From owner-svn-src-stable@FreeBSD.ORG Sun Feb 23 00:46:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1044891; Sun, 23 Feb 2014 00:46:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 88B6A1DD1; Sun, 23 Feb 2014 00:46:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1N0k7hx036169; Sun, 23 Feb 2014 00:46:07 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1N0k5ui036156; Sun, 23 Feb 2014 00:46:05 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201402230046.s1N0k5ui036156@svn.freebsd.org> From: John Baldwin Date: Sun, 23 Feb 2014 00:46:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262350 - in stable/10: lib/libvmmapi sys/amd64/include sys/amd64/vmm sys/amd64/vmm/intel sys/amd64/vmm/io usr.sbin/bhyve usr.sbin/bhyvectl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2014 00:46:07 -0000 Author: jhb Date: Sun Feb 23 00:46:05 2014 New Revision: 262350 URL: http://svnweb.freebsd.org/changeset/base/262350 Log: MFC 258859,259081,259085,259205,259213,259275,259482,259537,259702,259779: Several changes to the local APIC support in bhyve: - Rename 'vm_interrupt_hostcpu()' to 'vcpu_notify_event()'. - If a vcpu disables its local apic and then executes a 'HLT' then spin down the vcpu and destroy its thread context. Also modify the 'HLT' processing to ignore pending interrupts in the IRR if interrupts have been disabled by the guest. The interrupt cannot be injected into the guest in any case so resuming it is futile. - Use callout(9) to drive the vlapic timer instead of clocking it on each VM exit. - When the guest is bringing up the APs in the x2APIC mode a write to the ICR register will now trigger a return to userspace with an exitcode of VM_EXITCODE_SPINUP_AP. - Change the vlapic timer lock to be a spinlock because the vlapic can be accessed from within a critical section (vm run loop) when guest is using x2apic mode. - Fix the vlapic version register. - Add a command to bhyvectl to inject an NMI on a specific vcpu. - Add an API to deliver message signalled interrupts to vcpus. This allows callers to treat the MSI 'addr' and 'data' fields as opaque and also lets bhyve implement multiple destination modes: physical, flat and clustered. - Rename the ambiguously named 'vm_setup_msi()' and 'vm_setup_msix()' to 'vm_setup_pptdev_msi()' and 'vm_setup_pptdev_msix()' respectively. - Consolidate the virtual apic initialization in a single function: vlapic_reset() - Add a generic routine to trigger an LVT interrupt that supports both fixed and NMI delivery modes. - Add an ioctl and bhyvectl command to trigger local interrupts inside a guest. In particular, a global NMI similar to that raised by SERR# or PERR# can be simulated by asserting LINT1 on all vCPUs. - Extend the LVT table in the vCPU local APIC to support CMCI. - Flesh out the local APIC error reporting a bit to cache errors and report them via ESR when ESR is written to. Add support for asserting the error LVT when an error occurs. Raise illegal vector errors when attempting to signal an invalid vector for an interrupt or when sending an IPI. - Export table entries in the MADT and MP Table advertising the stock x86 config of LINT0 set to ExtInt and LINT1 wired to NMI. Modified: stable/10/lib/libvmmapi/vmmapi.c stable/10/lib/libvmmapi/vmmapi.h stable/10/sys/amd64/include/vmm.h stable/10/sys/amd64/include/vmm_dev.h stable/10/sys/amd64/vmm/intel/vmx.c stable/10/sys/amd64/vmm/io/ppt.c stable/10/sys/amd64/vmm/io/ppt.h stable/10/sys/amd64/vmm/io/vhpet.c stable/10/sys/amd64/vmm/io/vioapic.c stable/10/sys/amd64/vmm/io/vlapic.c stable/10/sys/amd64/vmm/io/vlapic.h stable/10/sys/amd64/vmm/vmm.c stable/10/sys/amd64/vmm/vmm_dev.c stable/10/sys/amd64/vmm/vmm_lapic.c stable/10/sys/amd64/vmm/vmm_lapic.h stable/10/sys/amd64/vmm/vmm_msr.c stable/10/sys/amd64/vmm/vmm_msr.h stable/10/usr.sbin/bhyve/acpi.c stable/10/usr.sbin/bhyve/bhyverun.c stable/10/usr.sbin/bhyve/mptbl.c stable/10/usr.sbin/bhyve/pci_emul.c stable/10/usr.sbin/bhyve/pci_emul.h stable/10/usr.sbin/bhyve/pci_passthru.c stable/10/usr.sbin/bhyvectl/bhyvectl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libvmmapi/vmmapi.c ============================================================================== --- stable/10/lib/libvmmapi/vmmapi.c Sat Feb 22 23:34:39 2014 (r262349) +++ stable/10/lib/libvmmapi/vmmapi.c Sun Feb 23 00:46:05 2014 (r262350) @@ -397,6 +397,30 @@ vm_lapic_irq(struct vmctx *ctx, int vcpu } int +vm_lapic_local_irq(struct vmctx *ctx, int vcpu, int vector) +{ + struct vm_lapic_irq vmirq; + + bzero(&vmirq, sizeof(vmirq)); + vmirq.cpuid = vcpu; + vmirq.vector = vector; + + return (ioctl(ctx->fd, VM_LAPIC_LOCAL_IRQ, &vmirq)); +} + +int +vm_lapic_msi(struct vmctx *ctx, uint64_t addr, uint64_t msg) +{ + struct vm_lapic_msi vmmsi; + + bzero(&vmmsi, sizeof(vmmsi)); + vmmsi.addr = addr; + vmmsi.msg = msg; + + return (ioctl(ctx->fd, VM_LAPIC_MSI, &vmmsi)); +} + +int vm_ioapic_assert_irq(struct vmctx *ctx, int irq) { struct vm_ioapic_irq ioapic_irq; @@ -551,8 +575,8 @@ vm_map_pptdev_mmio(struct vmctx *ctx, in } int -vm_setup_msi(struct vmctx *ctx, int vcpu, int bus, int slot, int func, - int destcpu, int vector, int numvec) +vm_setup_pptdev_msi(struct vmctx *ctx, int vcpu, int bus, int slot, int func, + uint64_t addr, uint64_t msg, int numvec) { struct vm_pptdev_msi pptmsi; @@ -561,16 +585,16 @@ vm_setup_msi(struct vmctx *ctx, int vcpu pptmsi.bus = bus; pptmsi.slot = slot; pptmsi.func = func; - pptmsi.destcpu = destcpu; - pptmsi.vector = vector; + pptmsi.msg = msg; + pptmsi.addr = addr; pptmsi.numvec = numvec; return (ioctl(ctx->fd, VM_PPTDEV_MSI, &pptmsi)); } int -vm_setup_msix(struct vmctx *ctx, int vcpu, int bus, int slot, int func, - int idx, uint32_t msg, uint32_t vector_control, uint64_t addr) +vm_setup_pptdev_msix(struct vmctx *ctx, int vcpu, int bus, int slot, int func, + int idx, uint64_t addr, uint64_t msg, uint32_t vector_control) { struct vm_pptdev_msix pptmsix; Modified: stable/10/lib/libvmmapi/vmmapi.h ============================================================================== --- stable/10/lib/libvmmapi/vmmapi.h Sat Feb 22 23:34:39 2014 (r262349) +++ stable/10/lib/libvmmapi/vmmapi.h Sun Feb 23 00:46:05 2014 (r262350) @@ -67,6 +67,8 @@ int vm_inject_event(struct vmctx *ctx, i int vm_inject_event2(struct vmctx *ctx, int vcpu, enum vm_event_type type, int vector, int error_code); int vm_lapic_irq(struct vmctx *ctx, int vcpu, int vector); +int vm_lapic_local_irq(struct vmctx *ctx, int vcpu, int vector); +int vm_lapic_msi(struct vmctx *ctx, uint64_t addr, uint64_t msg); int vm_ioapic_assert_irq(struct vmctx *ctx, int irq); int vm_ioapic_deassert_irq(struct vmctx *ctx, int irq); int vm_ioapic_pulse_irq(struct vmctx *ctx, int irq); @@ -81,10 +83,11 @@ int vm_assign_pptdev(struct vmctx *ctx, int vm_unassign_pptdev(struct vmctx *ctx, int bus, int slot, int func); int vm_map_pptdev_mmio(struct vmctx *ctx, int bus, int slot, int func, vm_paddr_t gpa, size_t len, vm_paddr_t hpa); -int vm_setup_msi(struct vmctx *ctx, int vcpu, int bus, int slot, int func, - int dest, int vector, int numvec); -int vm_setup_msix(struct vmctx *ctx, int vcpu, int bus, int slot, int func, - int idx, uint32_t msg, uint32_t vector_control, uint64_t addr); +int vm_setup_pptdev_msi(struct vmctx *ctx, int vcpu, int bus, int slot, + int func, uint64_t addr, uint64_t msg, int numvec); +int vm_setup_pptdev_msix(struct vmctx *ctx, int vcpu, int bus, int slot, + int func, int idx, uint64_t addr, uint64_t msg, + uint32_t vector_control); /* * Return a pointer to the statistics buffer. Note that this is not MT-safe. Modified: stable/10/sys/amd64/include/vmm.h ============================================================================== --- stable/10/sys/amd64/include/vmm.h Sat Feb 22 23:34:39 2014 (r262349) +++ stable/10/sys/amd64/include/vmm.h Sun Feb 23 00:46:05 2014 (r262350) @@ -158,7 +158,7 @@ vcpu_is_running(struct vm *vm, int vcpu, } void *vcpu_stats(struct vm *vm, int vcpu); -void vm_interrupt_hostcpu(struct vm *vm, int vcpu); +void vcpu_notify_event(struct vm *vm, int vcpuid); struct vmspace *vm_get_vmspace(struct vm *vm); int vm_assign_pptdev(struct vm *vm, int bus, int slot, int func); int vm_unassign_pptdev(struct vm *vm, int bus, int slot, int func); @@ -266,6 +266,7 @@ enum vm_exitcode { VM_EXITCODE_PAGING, VM_EXITCODE_INST_EMUL, VM_EXITCODE_SPINUP_AP, + VM_EXITCODE_SPINDOWN_CPU, VM_EXITCODE_MAX }; @@ -310,6 +311,9 @@ struct vm_exit { int vcpu; uint64_t rip; } spinup_ap; + struct { + uint64_t rflags; + } hlt; } u; }; Modified: stable/10/sys/amd64/include/vmm_dev.h ============================================================================== --- stable/10/sys/amd64/include/vmm_dev.h Sat Feb 22 23:34:39 2014 (r262349) +++ stable/10/sys/amd64/include/vmm_dev.h Sun Feb 23 00:46:05 2014 (r262350) @@ -66,6 +66,11 @@ struct vm_event { int error_code_valid; }; +struct vm_lapic_msi { + uint64_t msg; + uint64_t addr; +}; + struct vm_lapic_irq { int cpuid; int vector; @@ -103,8 +108,8 @@ struct vm_pptdev_msi { int slot; int func; int numvec; /* 0 means disabled */ - int vector; - int destcpu; + uint64_t msg; + uint64_t addr; }; struct vm_pptdev_msix { @@ -113,7 +118,7 @@ struct vm_pptdev_msix { int slot; int func; int idx; - uint32_t msg; + uint64_t msg; uint32_t vector_control; uint64_t addr; }; @@ -175,6 +180,8 @@ enum { IOCNUM_IOAPIC_ASSERT_IRQ = 33, IOCNUM_IOAPIC_DEASSERT_IRQ = 34, IOCNUM_IOAPIC_PULSE_IRQ = 35, + IOCNUM_LAPIC_MSI = 36, + IOCNUM_LAPIC_LOCAL_IRQ = 37, /* PCI pass-thru */ IOCNUM_BIND_PPTDEV = 40, @@ -211,6 +218,10 @@ enum { _IOW('v', IOCNUM_INJECT_EVENT, struct vm_event) #define VM_LAPIC_IRQ \ _IOW('v', IOCNUM_LAPIC_IRQ, struct vm_lapic_irq) +#define VM_LAPIC_LOCAL_IRQ \ + _IOW('v', IOCNUM_LAPIC_LOCAL_IRQ, struct vm_lapic_irq) +#define VM_LAPIC_MSI \ + _IOW('v', IOCNUM_LAPIC_MSI, struct vm_lapic_msi) #define VM_IOAPIC_ASSERT_IRQ \ _IOW('v', IOCNUM_IOAPIC_ASSERT_IRQ, struct vm_ioapic_irq) #define VM_IOAPIC_DEASSERT_IRQ \ Modified: stable/10/sys/amd64/vmm/intel/vmx.c ============================================================================== --- stable/10/sys/amd64/vmm/intel/vmx.c Sat Feb 22 23:34:39 2014 (r262349) +++ stable/10/sys/amd64/vmm/intel/vmx.c Sun Feb 23 00:46:05 2014 (r262350) @@ -1359,7 +1359,8 @@ vmx_exit_process(struct vmx *vmx, int vc struct vmcs *vmcs; struct vmxctx *vmxctx; uint32_t eax, ecx, edx, idtvec_info, idtvec_err, reason; - uint64_t qual, gpa; + uint64_t qual, gpa, rflags; + bool retu; handled = 0; vmcs = &vmx->vmcs[vcpu]; @@ -1405,31 +1406,46 @@ vmx_exit_process(struct vmx *vmx, int vc break; case EXIT_REASON_RDMSR: vmm_stat_incr(vmx->vm, vcpu, VMEXIT_RDMSR, 1); + retu = false; ecx = vmxctx->guest_rcx; - error = emulate_rdmsr(vmx->vm, vcpu, ecx); + error = emulate_rdmsr(vmx->vm, vcpu, ecx, &retu); if (error) { vmexit->exitcode = VM_EXITCODE_RDMSR; vmexit->u.msr.code = ecx; - } else + } else if (!retu) { handled = 1; + } else { + /* Return to userspace with a valid exitcode */ + KASSERT(vmexit->exitcode != VM_EXITCODE_BOGUS, + ("emulate_wrmsr retu with bogus exitcode")); + } break; case EXIT_REASON_WRMSR: vmm_stat_incr(vmx->vm, vcpu, VMEXIT_WRMSR, 1); + retu = false; eax = vmxctx->guest_rax; ecx = vmxctx->guest_rcx; edx = vmxctx->guest_rdx; error = emulate_wrmsr(vmx->vm, vcpu, ecx, - (uint64_t)edx << 32 | eax); + (uint64_t)edx << 32 | eax, &retu); if (error) { vmexit->exitcode = VM_EXITCODE_WRMSR; vmexit->u.msr.code = ecx; vmexit->u.msr.wval = (uint64_t)edx << 32 | eax; - } else + } else if (!retu) { handled = 1; + } else { + /* Return to userspace with a valid exitcode */ + KASSERT(vmexit->exitcode != VM_EXITCODE_BOGUS, + ("emulate_wrmsr retu with bogus exitcode")); + } break; case EXIT_REASON_HLT: vmm_stat_incr(vmx->vm, vcpu, VMEXIT_HLT, 1); + if ((error = vmread(VMCS_GUEST_RFLAGS, &rflags)) != 0) + panic("vmx_exit_process: vmread(rflags) %d", error); vmexit->exitcode = VM_EXITCODE_HLT; + vmexit->u.hlt.rflags = rflags; break; case EXIT_REASON_MTF: vmm_stat_incr(vmx->vm, vcpu, VMEXIT_MTRAP, 1); @@ -1584,7 +1600,6 @@ vmx_run(void *arg, int vcpu, register_t panic("vmx_run: error %d setting up pcpu defaults", error); do { - lapic_timer_tick(vmx->vm, vcpu); vmx_inject_interrupts(vmx, vcpu); vmx_run_trace(vmx, vcpu); rc = vmx_setjmp(vmxctx); Modified: stable/10/sys/amd64/vmm/io/ppt.c ============================================================================== --- stable/10/sys/amd64/vmm/io/ppt.c Sat Feb 22 23:34:39 2014 (r262349) +++ stable/10/sys/amd64/vmm/io/ppt.c Sun Feb 23 00:46:05 2014 (r262350) @@ -72,8 +72,8 @@ MALLOC_DEFINE(M_PPTMSIX, "pptmsix", "Pas struct pptintr_arg { /* pptintr(pptintr_arg) */ struct pptdev *pptdev; - int vec; - int vcpu; + uint64_t addr; + uint64_t msg_data; }; static struct pptdev { @@ -412,16 +412,14 @@ ppt_map_mmio(struct vm *vm, int bus, int static int pptintr(void *arg) { - int vec; struct pptdev *ppt; struct pptintr_arg *pptarg; pptarg = arg; ppt = pptarg->pptdev; - vec = pptarg->vec; if (ppt->vm != NULL) - lapic_intr_edge(ppt->vm, pptarg->vcpu, vec); + lapic_intr_msi(ppt->vm, pptarg->addr, pptarg->msg_data); else { /* * XXX @@ -441,15 +439,13 @@ pptintr(void *arg) int ppt_setup_msi(struct vm *vm, int vcpu, int bus, int slot, int func, - int destcpu, int vector, int numvec) + uint64_t addr, uint64_t msg, int numvec) { int i, rid, flags; int msi_count, startrid, error, tmp; struct pptdev *ppt; - if ((destcpu >= VM_MAXCPU || destcpu < 0) || - (vector < 0 || vector > 255) || - (numvec < 0 || numvec > MAX_MSIMSGS)) + if (numvec < 0 || numvec > MAX_MSIMSGS) return (EINVAL); ppt = ppt_find(bus, slot, func); @@ -513,8 +509,8 @@ ppt_setup_msi(struct vm *vm, int vcpu, i break; ppt->msi.arg[i].pptdev = ppt; - ppt->msi.arg[i].vec = vector + i; - ppt->msi.arg[i].vcpu = destcpu; + ppt->msi.arg[i].addr = addr; + ppt->msi.arg[i].msg_data = msg + i; error = bus_setup_intr(ppt->dev, ppt->msi.res[i], INTR_TYPE_NET | INTR_MPSAFE, @@ -534,7 +530,7 @@ ppt_setup_msi(struct vm *vm, int vcpu, i int ppt_setup_msix(struct vm *vm, int vcpu, int bus, int slot, int func, - int idx, uint32_t msg, uint32_t vector_control, uint64_t addr) + int idx, uint64_t addr, uint64_t msg, uint32_t vector_control) { struct pptdev *ppt; struct pci_devinfo *dinfo; @@ -605,8 +601,8 @@ ppt_setup_msix(struct vm *vm, int vcpu, return (ENXIO); ppt->msix.arg[idx].pptdev = ppt; - ppt->msix.arg[idx].vec = msg & 0xFF; - ppt->msix.arg[idx].vcpu = (addr >> 12) & 0xFF; + ppt->msix.arg[idx].addr = addr; + ppt->msix.arg[idx].msg_data = msg; /* Setup the MSI-X interrupt */ error = bus_setup_intr(ppt->dev, ppt->msix.res[idx], Modified: stable/10/sys/amd64/vmm/io/ppt.h ============================================================================== --- stable/10/sys/amd64/vmm/io/ppt.h Sat Feb 22 23:34:39 2014 (r262349) +++ stable/10/sys/amd64/vmm/io/ppt.h Sun Feb 23 00:46:05 2014 (r262350) @@ -33,9 +33,9 @@ int ppt_unassign_all(struct vm *vm); int ppt_map_mmio(struct vm *vm, int bus, int slot, int func, vm_paddr_t gpa, size_t len, vm_paddr_t hpa); int ppt_setup_msi(struct vm *vm, int vcpu, int bus, int slot, int func, - int destcpu, int vector, int numvec); + uint64_t addr, uint64_t msg, int numvec); int ppt_setup_msix(struct vm *vm, int vcpu, int bus, int slot, int func, - int idx, uint32_t msg, uint32_t vector_control, uint64_t addr); + int idx, uint64_t addr, uint64_t msg, uint32_t vector_control); int ppt_num_devices(struct vm *vm); boolean_t ppt_is_mmio(struct vm *vm, vm_paddr_t gpa); Modified: stable/10/sys/amd64/vmm/io/vhpet.c ============================================================================== --- stable/10/sys/amd64/vmm/io/vhpet.c Sat Feb 22 23:34:39 2014 (r262349) +++ stable/10/sys/amd64/vmm/io/vhpet.c Sun Feb 23 00:46:05 2014 (r262350) @@ -240,8 +240,7 @@ vhpet_timer_edge_trig(struct vhpet *vhpe static void vhpet_timer_interrupt(struct vhpet *vhpet, int n) { - int apicid, vector, vcpuid, pin; - cpuset_t dmask; + int pin; /* If interrupts are not enabled for this timer then just return. */ if (!vhpet_timer_interrupt_enabled(vhpet, n)) @@ -256,26 +255,8 @@ vhpet_timer_interrupt(struct vhpet *vhpe } if (vhpet_timer_msi_enabled(vhpet, n)) { - /* - * XXX should have an API 'vlapic_deliver_msi(vm, addr, data)' - * - assuming physical delivery mode - * - no need to interpret contents of 'msireg' here - */ - vector = vhpet->timer[n].msireg & 0xff; - apicid = (vhpet->timer[n].msireg >> (32 + 12)) & 0xff; - if (apicid != 0xff) { - /* unicast */ - vcpuid = vm_apicid2vcpuid(vhpet->vm, apicid); - lapic_intr_edge(vhpet->vm, vcpuid, vector); - } else { - /* broadcast */ - dmask = vm_active_cpus(vhpet->vm); - while ((vcpuid = CPU_FFS(&dmask)) != 0) { - vcpuid--; - CPU_CLR(vcpuid, &dmask); - lapic_intr_edge(vhpet->vm, vcpuid, vector); - } - } + lapic_intr_msi(vhpet->vm, vhpet->timer[n].msireg >> 32, + vhpet->timer[n].msireg & 0xffffffff); return; } Modified: stable/10/sys/amd64/vmm/io/vioapic.c ============================================================================== --- stable/10/sys/amd64/vmm/io/vioapic.c Sat Feb 22 23:34:39 2014 (r262349) +++ stable/10/sys/amd64/vmm/io/vioapic.c Sun Feb 23 00:46:05 2014 (r262350) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include "vmm_ktr.h" #include "vmm_lapic.h" +#include "vlapic.h" #include "vioapic.h" #define IOREGSEL 0x00 @@ -91,25 +92,14 @@ pinstate_str(bool asserted) else return ("deasserted"); } - -static const char * -trigger_str(bool level) -{ - - if (level) - return ("level"); - else - return ("edge"); -} #endif static void vioapic_send_intr(struct vioapic *vioapic, int pin) { - int vector, apicid, vcpuid; - uint32_t low, high; - cpuset_t dmask; - bool level; + int vector, delmode; + uint32_t low, high, dest; + bool level, phys; KASSERT(pin >= 0 && pin < REDIR_ENTRIES, ("vioapic_set_pinstate: invalid pin number %d", pin)); @@ -120,52 +110,20 @@ vioapic_send_intr(struct vioapic *vioapi low = vioapic->rtbl[pin].reg; high = vioapic->rtbl[pin].reg >> 32; - /* - * XXX We only deal with: - * - physical destination - * - fixed delivery mode - */ - if ((low & IOART_DESTMOD) != IOART_DESTPHY) { - VIOAPIC_CTR2(vioapic, "ioapic pin%d: unsupported dest mode " - "0x%08x", pin, low); - return; - } - - if ((low & IOART_DELMOD) != IOART_DELFIXED) { - VIOAPIC_CTR2(vioapic, "ioapic pin%d: unsupported delivery mode " - "0x%08x", pin, low); - return; - } - if ((low & IOART_INTMASK) == IOART_INTMSET) { VIOAPIC_CTR1(vioapic, "ioapic pin%d: masked", pin); return; } + phys = ((low & IOART_DESTMOD) == IOART_DESTPHY); + delmode = low & IOART_DELMOD; level = low & IOART_TRGRLVL ? true : false; if (level) vioapic->rtbl[pin].reg |= IOART_REM_IRR; vector = low & IOART_INTVEC; - apicid = high >> APIC_ID_SHIFT; - if (apicid != 0xff) { - /* unicast */ - vcpuid = vm_apicid2vcpuid(vioapic->vm, apicid); - VIOAPIC_CTR4(vioapic, "ioapic pin%d: %s triggered intr " - "vector %d on vcpuid %d", pin, trigger_str(level), - vector, vcpuid); - lapic_set_intr(vioapic->vm, vcpuid, vector, level); - } else { - /* broadcast */ - VIOAPIC_CTR3(vioapic, "ioapic pin%d: %s triggered intr " - "vector %d on all vcpus", pin, trigger_str(level), vector); - dmask = vm_active_cpus(vioapic->vm); - while ((vcpuid = CPU_FFS(&dmask)) != 0) { - vcpuid--; - CPU_CLR(vcpuid, &dmask); - lapic_set_intr(vioapic->vm, vcpuid, vector, level); - } - } + dest = high >> APIC_ID_SHIFT; + vlapic_deliver_intr(vioapic->vm, level, dest, phys, delmode, vector); } static void Modified: stable/10/sys/amd64/vmm/io/vlapic.c ============================================================================== --- stable/10/sys/amd64/vmm/io/vlapic.c Sat Feb 22 23:34:39 2014 (r262349) +++ stable/10/sys/amd64/vmm/io/vlapic.c Sun Feb 23 00:46:05 2014 (r262350) @@ -30,8 +30,10 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include +#include #include #include @@ -53,6 +55,9 @@ __FBSDID("$FreeBSD$"); #define VLAPIC_CTR1(vlapic, format, p1) \ VCPU_CTR1((vlapic)->vm, (vlapic)->vcpuid, format, p1) +#define VLAPIC_CTR2(vlapic, format, p1, p2) \ + VCPU_CTR2((vlapic)->vm, (vlapic)->vcpuid, format, p1, p2) + #define VLAPIC_CTR_IRR(vlapic, msg) \ do { \ uint32_t *irrptr = &(vlapic)->apic.irr0; \ @@ -86,7 +91,7 @@ static MALLOC_DEFINE(M_VLAPIC, "vlapic", #define PRIO(x) ((x) >> 4) #define VLAPIC_VERSION (16) -#define VLAPIC_MAXLVT_ENTRIES (5) +#define VLAPIC_MAXLVT_ENTRIES (APIC_LVT_CMCI) #define x2apic(vlapic) (((vlapic)->msr_apicbase & APICBASE_X2APIC) ? 1 : 0) @@ -100,12 +105,16 @@ struct vlapic { struct vm *vm; int vcpuid; - struct LAPIC apic; + struct LAPIC apic; - int esr_update; + uint32_t esr_pending; + int esr_firing; - int divisor; - int ccr_ticks; + struct callout callout; /* vlapic timer */ + struct bintime timer_fire_bt; /* callout expiry time */ + struct bintime timer_freq_bt; /* timer frequency */ + struct bintime timer_period_bt; /* timer period */ + struct mtx timer_mtx; /* * The 'isrvec_stk' is a stack of vectors injected by the local apic. @@ -120,8 +129,101 @@ struct vlapic { enum boot_state boot_state; }; +/* + * The 'vlapic->timer_mtx' is used to provide mutual exclusion between the + * vlapic_callout_handler() and vcpu accesses to the following registers: + * - initial count register aka icr_timer + * - current count register aka ccr_timer + * - divide config register aka dcr_timer + * - timer LVT register + * + * Note that the vlapic_callout_handler() does not write to any of these + * registers so they can be safely read from the vcpu context without locking. + */ +#define VLAPIC_TIMER_LOCK(vlapic) mtx_lock_spin(&((vlapic)->timer_mtx)) +#define VLAPIC_TIMER_UNLOCK(vlapic) mtx_unlock_spin(&((vlapic)->timer_mtx)) +#define VLAPIC_TIMER_LOCKED(vlapic) mtx_owned(&((vlapic)->timer_mtx)) + #define VLAPIC_BUS_FREQ tsc_freq +static __inline uint32_t +vlapic_get_id(struct vlapic *vlapic) +{ + + if (x2apic(vlapic)) + return (vlapic->vcpuid); + else + return (vlapic->vcpuid << 24); +} + +static __inline uint32_t +vlapic_get_ldr(struct vlapic *vlapic) +{ + struct LAPIC *lapic; + int apicid; + uint32_t ldr; + + lapic = &vlapic->apic; + if (x2apic(vlapic)) { + apicid = vlapic_get_id(vlapic); + ldr = 1 << (apicid & 0xf); + ldr |= (apicid & 0xffff0) << 12; + return (ldr); + } else + return (lapic->ldr); +} + +static __inline uint32_t +vlapic_get_dfr(struct vlapic *vlapic) +{ + struct LAPIC *lapic; + + lapic = &vlapic->apic; + if (x2apic(vlapic)) + return (0); + else + return (lapic->dfr); +} + +static void +vlapic_set_dfr(struct vlapic *vlapic, uint32_t data) +{ + uint32_t dfr; + struct LAPIC *lapic; + + if (x2apic(vlapic)) { + VM_CTR1(vlapic->vm, "write to DFR in x2apic mode: %#x", data); + return; + } + + lapic = &vlapic->apic; + dfr = (lapic->dfr & APIC_DFR_RESERVED) | (data & APIC_DFR_MODEL_MASK); + if ((dfr & APIC_DFR_MODEL_MASK) == APIC_DFR_MODEL_FLAT) + VLAPIC_CTR0(vlapic, "vlapic DFR in Flat Model"); + else if ((dfr & APIC_DFR_MODEL_MASK) == APIC_DFR_MODEL_CLUSTER) + VLAPIC_CTR0(vlapic, "vlapic DFR in Cluster Model"); + else + VLAPIC_CTR1(vlapic, "vlapic DFR in Unknown Model %#x", dfr); + + lapic->dfr = dfr; +} + +static void +vlapic_set_ldr(struct vlapic *vlapic, uint32_t data) +{ + struct LAPIC *lapic; + + /* LDR is read-only in x2apic mode */ + if (x2apic(vlapic)) { + VLAPIC_CTR1(vlapic, "write to LDR in x2apic mode: %#x", data); + return; + } + + lapic = &vlapic->apic; + lapic->ldr = data & ~APIC_LDR_RESERVED; + VLAPIC_CTR1(vlapic, "vlapic LDR set to %#x", lapic->ldr); +} + static int vlapic_timer_divisor(uint32_t dcr) { @@ -167,48 +269,92 @@ vlapic_dump_lvt(uint32_t offset, uint32_ } #endif -static uint64_t +static uint32_t vlapic_get_ccr(struct vlapic *vlapic) { - struct LAPIC *lapic = &vlapic->apic; - return lapic->ccr_timer; + struct bintime bt_now, bt_rem; + struct LAPIC *lapic; + uint32_t ccr; + + ccr = 0; + lapic = &vlapic->apic; + + VLAPIC_TIMER_LOCK(vlapic); + if (callout_active(&vlapic->callout)) { + /* + * If the timer is scheduled to expire in the future then + * compute the value of 'ccr' based on the remaining time. + */ + binuptime(&bt_now); + if (bintime_cmp(&vlapic->timer_fire_bt, &bt_now, >)) { + bt_rem = vlapic->timer_fire_bt; + bintime_sub(&bt_rem, &bt_now); + ccr += bt_rem.sec * BT2FREQ(&vlapic->timer_freq_bt); + ccr += bt_rem.frac / vlapic->timer_freq_bt.frac; + } + } + KASSERT(ccr <= lapic->icr_timer, ("vlapic_get_ccr: invalid ccr %#x, " + "icr_timer is %#x", ccr, lapic->icr_timer)); + VLAPIC_CTR2(vlapic, "vlapic ccr_timer = %#x, icr_timer = %#x", + ccr, lapic->icr_timer); + VLAPIC_TIMER_UNLOCK(vlapic); + return (ccr); } static void -vlapic_update_errors(struct vlapic *vlapic) +vlapic_set_dcr(struct vlapic *vlapic, uint32_t dcr) { - struct LAPIC *lapic = &vlapic->apic; - lapic->esr = 0; // XXX + struct LAPIC *lapic; + int divisor; + + lapic = &vlapic->apic; + VLAPIC_TIMER_LOCK(vlapic); + + lapic->dcr_timer = dcr; + divisor = vlapic_timer_divisor(dcr); + VLAPIC_CTR2(vlapic, "vlapic dcr_timer=%#x, divisor=%d", dcr, divisor); + + /* + * Update the timer frequency and the timer period. + * + * XXX changes to the frequency divider will not take effect until + * the timer is reloaded. + */ + FREQ2BT(VLAPIC_BUS_FREQ / divisor, &vlapic->timer_freq_bt); + vlapic->timer_period_bt = vlapic->timer_freq_bt; + bintime_mul(&vlapic->timer_period_bt, lapic->icr_timer); + + VLAPIC_TIMER_UNLOCK(vlapic); } static void -vlapic_init_ipi(struct vlapic *vlapic) +vlapic_update_errors(struct vlapic *vlapic) { struct LAPIC *lapic = &vlapic->apic; - lapic->version = VLAPIC_VERSION; - lapic->version |= (VLAPIC_MAXLVT_ENTRIES < MAXLVTSHIFT); - lapic->dfr = 0xffffffff; - lapic->svr = APIC_SVR_VECTOR; - vlapic_mask_lvts(&lapic->lvt_timer, VLAPIC_MAXLVT_ENTRIES+1); + lapic->esr = vlapic->esr_pending; + vlapic->esr_pending = 0; } -static int +static void vlapic_reset(struct vlapic *vlapic) { - struct LAPIC *lapic = &vlapic->apic; + struct LAPIC *lapic; + + lapic = &vlapic->apic; + bzero(lapic, sizeof(struct LAPIC)); - memset(lapic, 0, sizeof(*lapic)); - lapic->apr = vlapic->vcpuid; - vlapic_init_ipi(vlapic); - vlapic->divisor = vlapic_timer_divisor(lapic->dcr_timer); + lapic->version = VLAPIC_VERSION; + lapic->version |= (VLAPIC_MAXLVT_ENTRIES << MAXLVTSHIFT); + lapic->dfr = 0xffffffff; + lapic->svr = APIC_SVR_VECTOR; + vlapic_mask_lvts(&lapic->lvt_timer, 6); + vlapic_mask_lvts(&lapic->lvt_cmci, 1); + vlapic_set_dcr(vlapic, 0); if (vlapic->vcpuid == 0) vlapic->boot_state = BS_RUNNING; /* BSP */ else vlapic->boot_state = BS_INIT; /* AP */ - - return 0; - } void @@ -221,6 +367,17 @@ vlapic_set_intr_ready(struct vlapic *vla if (vector < 0 || vector >= 256) panic("vlapic_set_intr_ready: invalid vector %d\n", vector); + if (!(lapic->svr & APIC_SVR_ENABLE)) { + VLAPIC_CTR1(vlapic, "vlapic is software disabled, ignoring " + "interrupt %d", vector); + return; + } + + if (vector < 16) { + vlapic_set_error(vlapic, APIC_ESR_RECEIVE_ILLEGAL_VECTOR); + return; + } + idx = (vector / 32) * 4; mask = 1 << (vector % 32); @@ -241,39 +398,93 @@ vlapic_set_intr_ready(struct vlapic *vla VLAPIC_CTR_IRR(vlapic, "vlapic_set_intr_ready"); } +static __inline uint32_t * +vlapic_get_lvtptr(struct vlapic *vlapic, uint32_t offset) +{ + struct LAPIC *lapic = &vlapic->apic; + int i; + + switch (offset) { + case APIC_OFFSET_CMCI_LVT: + return (&lapic->lvt_cmci); + case APIC_OFFSET_TIMER_LVT ... APIC_OFFSET_ERROR_LVT: + i = (offset - APIC_OFFSET_TIMER_LVT) >> 2; + return ((&lapic->lvt_timer) + i);; + default: + panic("vlapic_get_lvt: invalid LVT\n"); + } +} + +static __inline uint32_t +vlapic_get_lvt(struct vlapic *vlapic, uint32_t offset) +{ + + return (*vlapic_get_lvtptr(vlapic, offset)); +} + static void -vlapic_start_timer(struct vlapic *vlapic, uint32_t elapsed) +vlapic_set_lvt(struct vlapic *vlapic, uint32_t offset, uint32_t val) { - uint32_t icr_timer; + uint32_t *lvtptr, mask; + struct LAPIC *lapic; + + lapic = &vlapic->apic; + lvtptr = vlapic_get_lvtptr(vlapic, offset); - icr_timer = vlapic->apic.icr_timer; + if (offset == APIC_OFFSET_TIMER_LVT) + VLAPIC_TIMER_LOCK(vlapic); - vlapic->ccr_ticks = ticks; - if (elapsed < icr_timer) - vlapic->apic.ccr_timer = icr_timer - elapsed; - else { - /* - * This can happen when the guest is trying to run its local - * apic timer higher that the setting of 'hz' in the host. - * - * We deal with this by running the guest local apic timer - * at the rate of the host's 'hz' setting. - */ - vlapic->apic.ccr_timer = 0; + if (!(lapic->svr & APIC_SVR_ENABLE)) + val |= APIC_LVT_M; + mask = APIC_LVT_M | APIC_LVT_DS | APIC_LVT_VECTOR; + switch (offset) { + case APIC_OFFSET_TIMER_LVT: + mask |= APIC_LVTT_TM; + break; + case APIC_OFFSET_ERROR_LVT: + break; + case APIC_OFFSET_LINT0_LVT: + case APIC_OFFSET_LINT1_LVT: + mask |= APIC_LVT_TM | APIC_LVT_RIRR | APIC_LVT_IIPP; + /* FALLTHROUGH */ + default: + mask |= APIC_LVT_DM; + break; } + *lvtptr = val & mask; + + if (offset == APIC_OFFSET_TIMER_LVT) + VLAPIC_TIMER_UNLOCK(vlapic); } -static __inline uint32_t * -vlapic_get_lvt(struct vlapic *vlapic, uint32_t offset) +static int +vlapic_fire_lvt(struct vlapic *vlapic, uint32_t lvt) { - struct LAPIC *lapic = &vlapic->apic; - int i; + uint32_t vec, mode; - if (offset < APIC_OFFSET_TIMER_LVT || offset > APIC_OFFSET_ERROR_LVT) { - panic("vlapic_get_lvt: invalid LVT\n"); + if (lvt & APIC_LVT_M) + return (0); + + vec = lvt & APIC_LVT_VECTOR; + mode = lvt & APIC_LVT_DM; + + switch (mode) { + case APIC_LVT_DM_FIXED: + if (vec < 16) { + vlapic_set_error(vlapic, APIC_ESR_SEND_ILLEGAL_VECTOR); + return (0); + } + vlapic_set_intr_ready(vlapic, vec, false); + vcpu_notify_event(vlapic->vm, vlapic->vcpuid); + break; + case APIC_LVT_DM_NMI: + vm_inject_nmi(vlapic->vm, vlapic->vcpuid); + break; + default: + // Other modes ignored + return (0); } - i = (offset - APIC_OFFSET_TIMER_LVT) >> 2; - return ((&lapic->lvt_timer) + i);; + return (1); } #if 1 @@ -398,44 +609,314 @@ vlapic_process_eoi(struct vlapic *vlapic } static __inline int -vlapic_get_lvt_field(uint32_t *lvt, uint32_t mask) +vlapic_get_lvt_field(uint32_t lvt, uint32_t mask) { - return (*lvt & mask); + + return (lvt & mask); } static __inline int vlapic_periodic_timer(struct vlapic *vlapic) { - uint32_t *lvt; + uint32_t lvt; lvt = vlapic_get_lvt(vlapic, APIC_OFFSET_TIMER_LVT); return (vlapic_get_lvt_field(lvt, APIC_LVTT_TM_PERIODIC)); } +static VMM_STAT(VLAPIC_INTR_ERROR, "error interrupts generated by vlapic"); + +void +vlapic_set_error(struct vlapic *vlapic, uint32_t mask) +{ + uint32_t lvt; + + vlapic->esr_pending |= mask; + if (vlapic->esr_firing) + return; + vlapic->esr_firing = 1; + + // The error LVT always uses the fixed delivery mode. + lvt = vlapic_get_lvt(vlapic, APIC_OFFSET_ERROR_LVT); + if (vlapic_fire_lvt(vlapic, lvt | APIC_LVT_DM_FIXED)) { + vmm_stat_incr(vlapic->vm, vlapic->vcpuid, VLAPIC_INTR_ERROR, 1); + } + vlapic->esr_firing = 0; +} + static VMM_STAT(VLAPIC_INTR_TIMER, "timer interrupts generated by vlapic"); static void vlapic_fire_timer(struct vlapic *vlapic) { - int vector; - uint32_t *lvt; + uint32_t lvt; + + KASSERT(VLAPIC_TIMER_LOCKED(vlapic), ("vlapic_fire_timer not locked")); + // The timer LVT always uses the fixed delivery mode. lvt = vlapic_get_lvt(vlapic, APIC_OFFSET_TIMER_LVT); - - if (!vlapic_get_lvt_field(lvt, APIC_LVTT_M)) { + if (vlapic_fire_lvt(vlapic, lvt | APIC_LVT_DM_FIXED)) { vmm_stat_incr(vlapic->vm, vlapic->vcpuid, VLAPIC_INTR_TIMER, 1); - vector = vlapic_get_lvt_field(lvt,APIC_LVTT_VECTOR); - vlapic_set_intr_ready(vlapic, vector, false); + } +} + +static VMM_STAT(VLAPIC_INTR_CMC, + "corrected machine check interrupts generated by vlapic"); + +void +vlapic_fire_cmci(struct vlapic *vlapic) +{ + uint32_t lvt; + + lvt = vlapic_get_lvt(vlapic, APIC_OFFSET_CMCI_LVT); + if (vlapic_fire_lvt(vlapic, lvt)) { + vmm_stat_incr(vlapic->vm, vlapic->vcpuid, VLAPIC_INTR_CMC, 1); + } +} + +static VMM_STAT_ARRAY(LVTS_TRIGGERRED, VLAPIC_MAXLVT_ENTRIES, + "lvts triggered"); + +int +vlapic_trigger_lvt(struct vlapic *vlapic, int vector) +{ + uint32_t lvt; + + switch (vector) { + case APIC_LVT_LINT0: + lvt = vlapic_get_lvt(vlapic, APIC_OFFSET_LINT0_LVT); + break; + case APIC_LVT_LINT1: + lvt = vlapic_get_lvt(vlapic, APIC_OFFSET_LINT1_LVT); + break; + case APIC_LVT_TIMER: + lvt = vlapic_get_lvt(vlapic, APIC_OFFSET_TIMER_LVT); + lvt |= APIC_LVT_DM_FIXED; + break; + case APIC_LVT_ERROR: + lvt = vlapic_get_lvt(vlapic, APIC_OFFSET_ERROR_LVT); + lvt |= APIC_LVT_DM_FIXED; + break; + case APIC_LVT_PMC: + lvt = vlapic_get_lvt(vlapic, APIC_OFFSET_PERF_LVT); + break; + case APIC_LVT_THERMAL: + lvt = vlapic_get_lvt(vlapic, APIC_OFFSET_THERM_LVT); + break; + case APIC_LVT_CMCI: + lvt = vlapic_get_lvt(vlapic, APIC_OFFSET_CMCI_LVT); + break; + default: + return (EINVAL); + } + if (vlapic_fire_lvt(vlapic, lvt)) { + vmm_stat_array_incr(vlapic->vm, vlapic->vcpuid, + LVTS_TRIGGERRED, vector, 1); + } + return (0); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sun Feb 23 01:34:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 36696530; Sun, 23 Feb 2014 01:34:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 06CC01285; Sun, 23 Feb 2014 01:34:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1N1YfQ9056172; Sun, 23 Feb 2014 01:34:41 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1N1YfDp056165; Sun, 23 Feb 2014 01:34:41 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201402230134.s1N1YfDp056165@svn.freebsd.org> From: John Baldwin Date: Sun, 23 Feb 2014 01:34:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262352 - stable/10/sys/amd64/vmm/intel X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2014 01:34:42 -0000 Author: jhb Date: Sun Feb 23 01:34:40 2014 New Revision: 262352 URL: http://svnweb.freebsd.org/changeset/base/262352 Log: MFC 259542: Use vmcs_read() and vmcs_write() in preference to vmread() and vmwrite() respectively. The vmcs_xxx() functions provide inline error checking of all accesses to the VMCS. Modified: stable/10/sys/amd64/vmm/intel/vmcs.c stable/10/sys/amd64/vmm/intel/vmcs.h stable/10/sys/amd64/vmm/intel/vmx.c stable/10/sys/amd64/vmm/intel/vmx_genassym.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/vmm/intel/vmcs.c ============================================================================== --- stable/10/sys/amd64/vmm/intel/vmcs.c Sun Feb 23 01:27:22 2014 (r262351) +++ stable/10/sys/amd64/vmm/intel/vmcs.c Sun Feb 23 01:34:40 2014 (r262352) @@ -41,8 +41,8 @@ __FBSDID("$FreeBSD$"); #include #include #include "vmm_host.h" -#include "vmcs.h" #include "vmx_cpufunc.h" +#include "vmcs.h" #include "ept.h" #include "vmx.h" @@ -454,19 +454,6 @@ done: return (error); } -uint64_t -vmcs_read(uint32_t encoding) -{ - int error; - uint64_t val; - - error = vmread(encoding, &val); - if (error != 0) - panic("vmcs_read(%u) error %d", encoding, error); - - return (val); -} - #ifdef DDB extern int vmxon_enabled[]; Modified: stable/10/sys/amd64/vmm/intel/vmcs.h ============================================================================== --- stable/10/sys/amd64/vmm/intel/vmcs.h Sun Feb 23 01:27:22 2014 (r262351) +++ stable/10/sys/amd64/vmm/intel/vmcs.h Sun Feb 23 01:34:40 2014 (r262352) @@ -58,7 +58,26 @@ int vmcs_getdesc(struct vmcs *vmcs, int struct seg_desc *desc); int vmcs_setdesc(struct vmcs *vmcs, int ident, struct seg_desc *desc); -uint64_t vmcs_read(uint32_t encoding); + +static __inline uint64_t +vmcs_read(uint32_t encoding) +{ + int error; + uint64_t val; + + error = vmread(encoding, &val); + KASSERT(error == 0, ("vmcs_read(%u) error %d", encoding, error)); + return (val); +} + +static __inline void +vmcs_write(uint32_t encoding, uint64_t val) +{ + int error; + + error = vmwrite(encoding, val); + KASSERT(error == 0, ("vmcs_write(%u) error %d", encoding, error)); +} #define vmexit_instruction_length() vmcs_read(VMCS_EXIT_INSTRUCTION_LENGTH) #define vmcs_guest_rip() vmcs_read(VMCS_GUEST_RIP) Modified: stable/10/sys/amd64/vmm/intel/vmx.c ============================================================================== --- stable/10/sys/amd64/vmm/intel/vmx.c Sun Feb 23 01:27:22 2014 (r262351) +++ stable/10/sys/amd64/vmm/intel/vmx.c Sun Feb 23 01:34:40 2014 (r262352) @@ -324,9 +324,8 @@ vmx_setjmp_trace(struct vmx *vmx, int vc VCPU_CTR2((vmx)->vm, (vcpu), "setjmp return code %s(%d)", vmx_setjmp_rc2str(rc), rc); - host_rsp = host_rip = ~0; - vmread(VMCS_HOST_RIP, &host_rip); - vmread(VMCS_HOST_RSP, &host_rsp); + host_rip = vmcs_read(VMCS_HOST_RIP); + host_rsp = vmcs_read(VMCS_HOST_RSP); VCPU_CTR2((vmx)->vm, (vcpu), "vmcs host_rip 0x%016lx, host_rsp %#lx", host_rip, host_rsp); @@ -917,10 +916,10 @@ vmx_astpending_trace(struct vmx *vmx, in #endif } -static int +static void vmx_set_pcpu_defaults(struct vmx *vmx, int vcpu) { - int error, lastcpu; + int lastcpu; struct vmxstate *vmxstate; struct invvpid_desc invvpid_desc = { 0 }; @@ -928,24 +927,14 @@ vmx_set_pcpu_defaults(struct vmx *vmx, i lastcpu = vmxstate->lastcpu; vmxstate->lastcpu = curcpu; - if (lastcpu == curcpu) { - error = 0; - goto done; - } + if (lastcpu == curcpu) + return; vmm_stat_incr(vmx->vm, vcpu, VCPU_MIGRATIONS, 1); - error = vmwrite(VMCS_HOST_TR_BASE, vmm_get_host_trbase()); - if (error != 0) - goto done; - - error = vmwrite(VMCS_HOST_GDTR_BASE, vmm_get_host_gdtrbase()); - if (error != 0) - goto done; - - error = vmwrite(VMCS_HOST_GS_BASE, vmm_get_host_gsbase()); - if (error != 0) - goto done; + vmcs_write(VMCS_HOST_TR_BASE, vmm_get_host_trbase()); + vmcs_write(VMCS_HOST_GDTR_BASE, vmm_get_host_gdtrbase()); + vmcs_write(VMCS_HOST_GS_BASE, vmm_get_host_gsbase()); /* * If we are using VPIDs then invalidate all mappings tagged with 'vpid' @@ -966,18 +955,6 @@ vmx_set_pcpu_defaults(struct vmx *vmx, i invvpid_desc.vpid = vmxstate->vpid; invvpid(INVVPID_TYPE_SINGLE_CONTEXT, invvpid_desc); } -done: - return (error); -} - -static void -vm_exit_update_rip(struct vm_exit *vmexit) -{ - int error; - - error = vmwrite(VMCS_GUEST_RIP, vmexit->rip + vmexit->inst_length); - if (error) - panic("vmx_run: error %d writing to VMCS_GUEST_RIP", error); } /* @@ -988,66 +965,45 @@ CTASSERT((PROCBASED_CTLS_ONE_SETTING & P static void __inline vmx_set_int_window_exiting(struct vmx *vmx, int vcpu) { - int error; vmx->cap[vcpu].proc_ctls |= PROCBASED_INT_WINDOW_EXITING; - - error = vmwrite(VMCS_PRI_PROC_BASED_CTLS, vmx->cap[vcpu].proc_ctls); - if (error) - panic("vmx_set_int_window_exiting: vmwrite error %d", error); + vmcs_write(VMCS_PRI_PROC_BASED_CTLS, vmx->cap[vcpu].proc_ctls); } static void __inline vmx_clear_int_window_exiting(struct vmx *vmx, int vcpu) { - int error; vmx->cap[vcpu].proc_ctls &= ~PROCBASED_INT_WINDOW_EXITING; - - error = vmwrite(VMCS_PRI_PROC_BASED_CTLS, vmx->cap[vcpu].proc_ctls); - if (error) - panic("vmx_clear_int_window_exiting: vmwrite error %d", error); + vmcs_write(VMCS_PRI_PROC_BASED_CTLS, vmx->cap[vcpu].proc_ctls); } static void __inline vmx_set_nmi_window_exiting(struct vmx *vmx, int vcpu) { - int error; vmx->cap[vcpu].proc_ctls |= PROCBASED_NMI_WINDOW_EXITING; - - error = vmwrite(VMCS_PRI_PROC_BASED_CTLS, vmx->cap[vcpu].proc_ctls); - if (error) - panic("vmx_set_nmi_window_exiting: vmwrite error %d", error); + vmcs_write(VMCS_PRI_PROC_BASED_CTLS, vmx->cap[vcpu].proc_ctls); } static void __inline vmx_clear_nmi_window_exiting(struct vmx *vmx, int vcpu) { - int error; vmx->cap[vcpu].proc_ctls &= ~PROCBASED_NMI_WINDOW_EXITING; - - error = vmwrite(VMCS_PRI_PROC_BASED_CTLS, vmx->cap[vcpu].proc_ctls); - if (error) - panic("vmx_clear_nmi_window_exiting: vmwrite error %d", error); + vmcs_write(VMCS_PRI_PROC_BASED_CTLS, vmx->cap[vcpu].proc_ctls); } static int vmx_inject_nmi(struct vmx *vmx, int vcpu) { - int error; uint64_t info, interruptibility; /* Bail out if no NMI requested */ if (!vm_nmi_pending(vmx->vm, vcpu)) return (0); - error = vmread(VMCS_GUEST_INTERRUPTIBILITY, &interruptibility); - if (error) { - panic("vmx_inject_nmi: vmread(interruptibility) %d", - error); - } + interruptibility = vmcs_read(VMCS_GUEST_INTERRUPTIBILITY); if (interruptibility & nmi_blocking_bits) goto nmiblocked; @@ -1057,10 +1013,7 @@ vmx_inject_nmi(struct vmx *vmx, int vcpu */ info = VMCS_INTERRUPTION_INFO_NMI | VMCS_INTERRUPTION_INFO_VALID; info |= IDT_NMI; - - error = vmwrite(VMCS_ENTRY_INTR_INFO, info); - if (error) - panic("vmx_inject_nmi: vmwrite(intrinfo) %d", error); + vmcs_write(VMCS_ENTRY_INTR_INFO, info); VCPU_CTR0(vmx->vm, vcpu, "Injecting vNMI"); @@ -1082,7 +1035,7 @@ nmiblocked: static void vmx_inject_interrupts(struct vmx *vmx, int vcpu) { - int error, vector; + int vector; uint64_t info, rflags, interruptibility; const int HWINTR_BLOCKED = VMCS_INTERRUPTIBILITY_STI_BLOCKING | @@ -1095,9 +1048,7 @@ vmx_inject_interrupts(struct vmx *vmx, i * VM entry but the actual entry into guest mode was aborted * because of a pending AST. */ - error = vmread(VMCS_ENTRY_INTR_INFO, &info); - if (error) - panic("vmx_inject_interrupts: vmread(intrinfo) %d", error); + info = vmcs_read(VMCS_ENTRY_INTR_INFO); if (info & VMCS_INTERRUPTION_INFO_VALID) return; @@ -1116,27 +1067,18 @@ vmx_inject_interrupts(struct vmx *vmx, i panic("vmx_inject_interrupts: invalid vector %d\n", vector); /* Check RFLAGS.IF and the interruptibility state of the guest */ - error = vmread(VMCS_GUEST_RFLAGS, &rflags); - if (error) - panic("vmx_inject_interrupts: vmread(rflags) %d", error); - + rflags = vmcs_read(VMCS_GUEST_RFLAGS); if ((rflags & PSL_I) == 0) goto cantinject; - error = vmread(VMCS_GUEST_INTERRUPTIBILITY, &interruptibility); - if (error) { - panic("vmx_inject_interrupts: vmread(interruptibility) %d", - error); - } + interruptibility = vmcs_read(VMCS_GUEST_INTERRUPTIBILITY); if (interruptibility & HWINTR_BLOCKED) goto cantinject; /* Inject the interrupt */ info = VMCS_INTERRUPTION_INFO_HW_INTR | VMCS_INTERRUPTION_INFO_VALID; info |= vector; - error = vmwrite(VMCS_ENTRY_INTR_INFO, info); - if (error) - panic("vmx_inject_interrupts: vmwrite(intrinfo) %d", error); + vmcs_write(VMCS_ENTRY_INTR_INFO, info); /* Update the Local APIC ISR */ lapic_intr_accepted(vmx->vm, vcpu, vector); @@ -1158,7 +1100,7 @@ cantinject: static int vmx_emulate_cr_access(struct vmx *vmx, int vcpu, uint64_t exitqual) { - int error, cr, vmcs_guest_cr, vmcs_shadow_cr; + int cr, vmcs_guest_cr, vmcs_shadow_cr; uint64_t crval, regval, ones_mask, zeros_mask; const struct vmxctx *vmxctx; @@ -1173,7 +1115,7 @@ vmx_emulate_cr_access(struct vmx *vmx, i vmxctx = &vmx->ctx[vcpu]; /* - * We must use vmwrite() directly here because vmcs_setreg() will + * We must use vmcs_write() directly here because vmcs_setreg() will * call vmclear(vmcs) as a side-effect which we certainly don't want. */ switch ((exitqual >> 8) & 0xf) { @@ -1190,11 +1132,7 @@ vmx_emulate_cr_access(struct vmx *vmx, i regval = vmxctx->guest_rbx; break; case 4: - error = vmread(VMCS_GUEST_RSP, ®val); - if (error) { - panic("vmx_emulate_cr_access: " - "error %d reading guest rsp", error); - } + regval = vmcs_read(VMCS_GUEST_RSP); break; case 5: regval = vmxctx->guest_rbp; @@ -1242,20 +1180,11 @@ vmx_emulate_cr_access(struct vmx *vmx, i vmcs_guest_cr = VMCS_GUEST_CR4; vmcs_shadow_cr = VMCS_CR4_SHADOW; } - - error = vmwrite(vmcs_shadow_cr, regval); - if (error) { - panic("vmx_emulate_cr_access: error %d writing cr%d shadow", - error, cr); - } + vmcs_write(vmcs_shadow_cr, regval); crval = regval | ones_mask; crval &= ~zeros_mask; - error = vmwrite(vmcs_guest_cr, crval); - if (error) { - panic("vmx_emulate_cr_access: error %d writing cr%d", - error, cr); - } + vmcs_write(vmcs_guest_cr, crval); if (cr == 0 && regval & CR0_PG) { uint64_t efer, entry_ctls; @@ -1265,29 +1194,13 @@ vmx_emulate_cr_access(struct vmx *vmx, i * the "IA-32e mode guest" bit in VM-entry control must be * equal. */ - error = vmread(VMCS_GUEST_IA32_EFER, &efer); - if (error) { - panic("vmx_emulate_cr_access: error %d efer read", - error); - } + efer = vmcs_read(VMCS_GUEST_IA32_EFER); if (efer & EFER_LME) { efer |= EFER_LMA; - error = vmwrite(VMCS_GUEST_IA32_EFER, efer); - if (error) { - panic("vmx_emulate_cr_access: error %d" - " efer write", error); - } - error = vmread(VMCS_ENTRY_CTLS, &entry_ctls); - if (error) { - panic("vmx_emulate_cr_access: error %d" - " entry ctls read", error); - } + vmcs_write(VMCS_GUEST_IA32_EFER, efer); + entry_ctls = vmcs_read(VMCS_ENTRY_CTLS); entry_ctls |= VM_ENTRY_GUEST_LMA; - error = vmwrite(VMCS_ENTRY_CTLS, entry_ctls); - if (error) { - panic("vmx_emulate_cr_access: error %d" - " entry ctls write", error); - } + vmcs_write(VMCS_ENTRY_CTLS, entry_ctls); } } @@ -1359,7 +1272,7 @@ vmx_exit_process(struct vmx *vmx, int vc struct vmcs *vmcs; struct vmxctx *vmxctx; uint32_t eax, ecx, edx, idtvec_info, idtvec_err, reason; - uint64_t qual, gpa, rflags; + uint64_t qual, gpa; bool retu; handled = 0; @@ -1388,12 +1301,13 @@ vmx_exit_process(struct vmx *vmx, int vc idtvec_info = vmcs_idt_vectoring_info(); if (idtvec_info & VMCS_IDT_VEC_VALID) { idtvec_info &= ~(1 << 12); /* clear undefined bit */ - vmwrite(VMCS_ENTRY_INTR_INFO, idtvec_info); + vmcs_write(VMCS_ENTRY_INTR_INFO, idtvec_info); if (idtvec_info & VMCS_IDT_VEC_ERRCODE_VALID) { idtvec_err = vmcs_idt_vectoring_err(); - vmwrite(VMCS_ENTRY_EXCEPTION_ERROR, idtvec_err); + vmcs_write(VMCS_ENTRY_EXCEPTION_ERROR, + idtvec_err); } - vmwrite(VMCS_ENTRY_INST_LENGTH, vmexit->inst_length); + vmcs_write(VMCS_ENTRY_INST_LENGTH, vmexit->inst_length); } default: break; @@ -1442,10 +1356,8 @@ vmx_exit_process(struct vmx *vmx, int vc break; case EXIT_REASON_HLT: vmm_stat_incr(vmx->vm, vcpu, VMEXIT_HLT, 1); - if ((error = vmread(VMCS_GUEST_RFLAGS, &rflags)) != 0) - panic("vmx_exit_process: vmread(rflags) %d", error); vmexit->exitcode = VM_EXITCODE_HLT; - vmexit->u.hlt.rflags = rflags; + vmexit->u.hlt.rflags = vmcs_read(VMCS_GUEST_RFLAGS); break; case EXIT_REASON_MTF: vmm_stat_incr(vmx->vm, vcpu, VMEXIT_MTRAP, 1); @@ -1533,9 +1445,9 @@ vmx_exit_process(struct vmx *vmx, int vc * the one we just processed. Therefore we update the * guest rip in the VMCS and in 'vmexit'. */ - vm_exit_update_rip(vmexit); vmexit->rip += vmexit->inst_length; vmexit->inst_length = 0; + vmcs_write(VMCS_GUEST_RIP, vmexit->rip); } else { if (vmexit->exitcode == VM_EXITCODE_BOGUS) { /* @@ -1557,7 +1469,7 @@ vmx_exit_process(struct vmx *vmx, int vc static int vmx_run(void *arg, int vcpu, register_t rip, pmap_t pmap) { - int error, vie, rc, handled, astpending; + int vie, rc, handled, astpending; uint32_t exit_reason; struct vmx *vmx; struct vmxctx *vmxctx; @@ -1590,14 +1502,9 @@ vmx_run(void *arg, int vcpu, register_t * If the life of a virtual machine was spent entirely in the context * of a single process we could do this once in vmcs_set_defaults(). */ - if ((error = vmwrite(VMCS_HOST_CR3, rcr3())) != 0) - panic("vmx_run: error %d writing to VMCS_HOST_CR3", error); - - if ((error = vmwrite(VMCS_GUEST_RIP, rip)) != 0) - panic("vmx_run: error %d writing to VMCS_GUEST_RIP", error); - - if ((error = vmx_set_pcpu_defaults(vmx, vcpu)) != 0) - panic("vmx_run: error %d setting up pcpu defaults", error); + vmcs_write(VMCS_HOST_CR3, rcr3()); + vmcs_write(VMCS_GUEST_RIP, rip); + vmx_set_pcpu_defaults(vmx, vcpu); do { vmx_inject_interrupts(vmx, vcpu); Modified: stable/10/sys/amd64/vmm/intel/vmx_genassym.c ============================================================================== --- stable/10/sys/amd64/vmm/intel/vmx_genassym.c Sun Feb 23 01:27:22 2014 (r262351) +++ stable/10/sys/amd64/vmm/intel/vmx_genassym.c Sun Feb 23 01:34:40 2014 (r262352) @@ -39,8 +39,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include "vmx.h" #include "vmx_cpufunc.h" +#include "vmx.h" ASSYM(VMXCTX_TMPSTKTOP, offsetof(struct vmxctx, tmpstktop)); ASSYM(VMXCTX_GUEST_RDI, offsetof(struct vmxctx, guest_rdi)); From owner-svn-src-stable@FreeBSD.ORG Sun Feb 23 09:44:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38E7283F; Sun, 23 Feb 2014 09:44:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2324B1AD3; Sun, 23 Feb 2014 09:44:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1N9iUwn051627; Sun, 23 Feb 2014 09:44:31 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1N9iUqN051626; Sun, 23 Feb 2014 09:44:30 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402230944.s1N9iUqN051626@svn.freebsd.org> From: Christian Brueffer Date: Sun, 23 Feb 2014 09:44:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262358 - stable/10/share/man/man7 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2014 09:44:31 -0000 Author: brueffer Date: Sun Feb 23 09:44:30 2014 New Revision: 262358 URL: http://svnweb.freebsd.org/changeset/base/262358 Log: MFC: r262243 Fix a cross-reference. Modified: stable/10/share/man/man7/hier.7 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man7/hier.7 ============================================================================== --- stable/10/share/man/man7/hier.7 Sun Feb 23 08:22:31 2014 (r262357) +++ stable/10/share/man/man7/hier.7 Sun Feb 23 09:44:30 2014 (r262358) @@ -703,7 +703,9 @@ source code for files in The .Fx test suite. -See tests(7) for more details. +See +.Xr tests 7 +for more details. .El .It Pa /var/ multi-purpose log, temporary, transient, and spool files From owner-svn-src-stable@FreeBSD.ORG Sun Feb 23 13:08:19 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6CC71EB7; Sun, 23 Feb 2014 13:08:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 48C151AEC; Sun, 23 Feb 2014 13:08:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1ND8JoV034200; Sun, 23 Feb 2014 13:08:19 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1ND8Jqv034199; Sun, 23 Feb 2014 13:08:19 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201402231308.s1ND8Jqv034199@svn.freebsd.org> From: Hans Petter Selasky Date: Sun, 23 Feb 2014 13:08:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r262359 - stable/9/sys/dev/usb/controller X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2014 13:08:19 -0000 Author: hselasky Date: Sun Feb 23 13:08:18 2014 New Revision: 262359 URL: http://svnweb.freebsd.org/changeset/base/262359 Log: MFC r261795: Issue doorbell twice before finally freeing the DMA descriptors. This should fix DMA descriptor caching issues seen with the EHCI controller found in Google Chromebook C720 during removal and insertion of USB devices. Modified: stable/9/sys/dev/usb/controller/ehci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/controller/ehci.c ============================================================================== --- stable/9/sys/dev/usb/controller/ehci.c Sun Feb 23 09:44:30 2014 (r262358) +++ stable/9/sys/dev/usb/controller/ehci.c Sun Feb 23 13:08:18 2014 (r262359) @@ -2258,10 +2258,26 @@ ehci_device_bulk_enter(struct usb_xfer * } static void +ehci_doorbell_async(struct ehci_softc *sc) +{ + uint32_t temp; + + /* + * XXX Performance quirk: Some Host Controllers have a too low + * interrupt rate. Issue an IAAD to stimulate the Host + * Controller after queueing the BULK transfer. + * + * XXX Force the host controller to refresh any QH caches. + */ + temp = EOREAD4(sc, EHCI_USBCMD); + if (!(temp & EHCI_CMD_IAAD)) + EOWRITE4(sc, EHCI_USBCMD, temp | EHCI_CMD_IAAD); +} + +static void ehci_device_bulk_start(struct usb_xfer *xfer) { ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus); - uint32_t temp; /* setup TD's and QH */ ehci_setup_standard_chain(xfer, &sc->sc_async_p_last); @@ -2276,13 +2292,7 @@ ehci_device_bulk_start(struct usb_xfer * if (sc->sc_flags & EHCI_SCFLG_IAADBUG) return; - /* XXX Performance quirk: Some Host Controllers have a too low - * interrupt rate. Issue an IAAD to stimulate the Host - * Controller after queueing the BULK transfer. - */ - temp = EOREAD4(sc, EHCI_USBCMD); - if (!(temp & EHCI_CMD_IAAD)) - EOWRITE4(sc, EHCI_USBCMD, temp | EHCI_CMD_IAAD); + ehci_doorbell_async(sc); } struct usb_pipe_methods ehci_device_bulk_methods = @@ -3899,6 +3909,41 @@ ehci_set_hw_power(struct usb_bus *bus) return; } +static void +ehci_start_dma_delay_second(struct usb_xfer *xfer) +{ + struct ehci_softc *sc = EHCI_BUS2SC(xfer->xroot->bus); + + DPRINTF("\n"); + + /* trigger doorbell */ + ehci_doorbell_async(sc); + + /* give the doorbell 4ms */ + usbd_transfer_timeout_ms(xfer, + (void (*)(void *))&usb_dma_delay_done_cb, 4); +} + +/* + * Ring the doorbell twice before freeing any DMA descriptors. Some host + * controllers apparently cache the QH descriptors and need a message + * that the cache needs to be discarded. + */ +static void +ehci_start_dma_delay(struct usb_xfer *xfer) +{ + struct ehci_softc *sc = EHCI_BUS2SC(xfer->xroot->bus); + + DPRINTF("\n"); + + /* trigger doorbell */ + ehci_doorbell_async(sc); + + /* give the doorbell 4ms */ + usbd_transfer_timeout_ms(xfer, + (void (*)(void *))&ehci_start_dma_delay_second, 4); +} + struct usb_bus_methods ehci_bus_methods = { .endpoint_init = ehci_ep_init, @@ -3911,4 +3956,5 @@ struct usb_bus_methods ehci_bus_methods .set_hw_power_sleep = ehci_set_hw_power_sleep, .roothub_exec = ehci_roothub_exec, .xfer_poll = ehci_do_poll, + .start_dma_delay = ehci_start_dma_delay, }; From owner-svn-src-stable@FreeBSD.ORG Sun Feb 23 13:11:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9EADB14E; Sun, 23 Feb 2014 13:11:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7F4F71B73; Sun, 23 Feb 2014 13:11:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1NDBX0l037661; Sun, 23 Feb 2014 13:11:33 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1NDBXv2037660; Sun, 23 Feb 2014 13:11:33 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201402231311.s1NDBXv2037660@svn.freebsd.org> From: Hans Petter Selasky Date: Sun, 23 Feb 2014 13:11:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262360 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2014 13:11:33 -0000 Author: hselasky Date: Sun Feb 23 13:11:33 2014 New Revision: 262360 URL: http://svnweb.freebsd.org/changeset/base/262360 Log: MFC r261795: Issue doorbell twice before finally freeing the DMA descriptors. This should fix DMA descriptor caching issues seen with the EHCI controller found in Google Chromebook C720 during removal and insertion of USB devices. Modified: stable/10/sys/dev/usb/controller/ehci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/ehci.c ============================================================================== --- stable/10/sys/dev/usb/controller/ehci.c Sun Feb 23 13:08:18 2014 (r262359) +++ stable/10/sys/dev/usb/controller/ehci.c Sun Feb 23 13:11:33 2014 (r262360) @@ -2261,10 +2261,26 @@ ehci_device_bulk_enter(struct usb_xfer * } static void +ehci_doorbell_async(struct ehci_softc *sc) +{ + uint32_t temp; + + /* + * XXX Performance quirk: Some Host Controllers have a too low + * interrupt rate. Issue an IAAD to stimulate the Host + * Controller after queueing the BULK transfer. + * + * XXX Force the host controller to refresh any QH caches. + */ + temp = EOREAD4(sc, EHCI_USBCMD); + if (!(temp & EHCI_CMD_IAAD)) + EOWRITE4(sc, EHCI_USBCMD, temp | EHCI_CMD_IAAD); +} + +static void ehci_device_bulk_start(struct usb_xfer *xfer) { ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus); - uint32_t temp; /* setup TD's and QH */ ehci_setup_standard_chain(xfer, &sc->sc_async_p_last); @@ -2279,13 +2295,7 @@ ehci_device_bulk_start(struct usb_xfer * if (sc->sc_flags & EHCI_SCFLG_IAADBUG) return; - /* XXX Performance quirk: Some Host Controllers have a too low - * interrupt rate. Issue an IAAD to stimulate the Host - * Controller after queueing the BULK transfer. - */ - temp = EOREAD4(sc, EHCI_USBCMD); - if (!(temp & EHCI_CMD_IAAD)) - EOWRITE4(sc, EHCI_USBCMD, temp | EHCI_CMD_IAAD); + ehci_doorbell_async(sc); } struct usb_pipe_methods ehci_device_bulk_methods = @@ -3902,6 +3912,41 @@ ehci_set_hw_power(struct usb_bus *bus) return; } +static void +ehci_start_dma_delay_second(struct usb_xfer *xfer) +{ + struct ehci_softc *sc = EHCI_BUS2SC(xfer->xroot->bus); + + DPRINTF("\n"); + + /* trigger doorbell */ + ehci_doorbell_async(sc); + + /* give the doorbell 4ms */ + usbd_transfer_timeout_ms(xfer, + (void (*)(void *))&usb_dma_delay_done_cb, 4); +} + +/* + * Ring the doorbell twice before freeing any DMA descriptors. Some host + * controllers apparently cache the QH descriptors and need a message + * that the cache needs to be discarded. + */ +static void +ehci_start_dma_delay(struct usb_xfer *xfer) +{ + struct ehci_softc *sc = EHCI_BUS2SC(xfer->xroot->bus); + + DPRINTF("\n"); + + /* trigger doorbell */ + ehci_doorbell_async(sc); + + /* give the doorbell 4ms */ + usbd_transfer_timeout_ms(xfer, + (void (*)(void *))&ehci_start_dma_delay_second, 4); +} + struct usb_bus_methods ehci_bus_methods = { .endpoint_init = ehci_ep_init, @@ -3914,4 +3959,5 @@ struct usb_bus_methods ehci_bus_methods .set_hw_power_sleep = ehci_set_hw_power_sleep, .roothub_exec = ehci_roothub_exec, .xfer_poll = ehci_do_poll, + .start_dma_delay = ehci_start_dma_delay, }; From owner-svn-src-stable@FreeBSD.ORG Sun Feb 23 13:14:00 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A05AE296; Sun, 23 Feb 2014 13:14:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7DD1C1B83; Sun, 23 Feb 2014 13:14:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1NDE02w038048; Sun, 23 Feb 2014 13:14:00 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1NDE0L6038046; Sun, 23 Feb 2014 13:14:00 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201402231314.s1NDE0L6038046@svn.freebsd.org> From: Hans Petter Selasky Date: Sun, 23 Feb 2014 13:14:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r262361 - stable/8/sys/dev/usb/controller X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2014 13:14:00 -0000 Author: hselasky Date: Sun Feb 23 13:13:59 2014 New Revision: 262361 URL: http://svnweb.freebsd.org/changeset/base/262361 Log: MFC r261795: Issue doorbell twice before finally freeing the DMA descriptors. This should fix DMA descriptor caching issues seen with the EHCI controller found in Google Chromebook C720 during removal and insertion of USB devices. Modified: stable/8/sys/dev/usb/controller/ehci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/controller/ehci.c ============================================================================== --- stable/8/sys/dev/usb/controller/ehci.c Sun Feb 23 13:11:33 2014 (r262360) +++ stable/8/sys/dev/usb/controller/ehci.c Sun Feb 23 13:13:59 2014 (r262361) @@ -2254,10 +2254,26 @@ ehci_device_bulk_enter(struct usb_xfer * } static void +ehci_doorbell_async(struct ehci_softc *sc) +{ + uint32_t temp; + + /* + * XXX Performance quirk: Some Host Controllers have a too low + * interrupt rate. Issue an IAAD to stimulate the Host + * Controller after queueing the BULK transfer. + * + * XXX Force the host controller to refresh any QH caches. + */ + temp = EOREAD4(sc, EHCI_USBCMD); + if (!(temp & EHCI_CMD_IAAD)) + EOWRITE4(sc, EHCI_USBCMD, temp | EHCI_CMD_IAAD); +} + +static void ehci_device_bulk_start(struct usb_xfer *xfer) { ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus); - uint32_t temp; /* setup TD's and QH */ ehci_setup_standard_chain(xfer, &sc->sc_async_p_last); @@ -2272,13 +2288,7 @@ ehci_device_bulk_start(struct usb_xfer * if (sc->sc_flags & EHCI_SCFLG_IAADBUG) return; - /* XXX Performance quirk: Some Host Controllers have a too low - * interrupt rate. Issue an IAAD to stimulate the Host - * Controller after queueing the BULK transfer. - */ - temp = EOREAD4(sc, EHCI_USBCMD); - if (!(temp & EHCI_CMD_IAAD)) - EOWRITE4(sc, EHCI_USBCMD, temp | EHCI_CMD_IAAD); + ehci_doorbell_async(sc); } struct usb_pipe_methods ehci_device_bulk_methods = @@ -3899,6 +3909,41 @@ ehci_set_hw_power(struct usb_bus *bus) return; } +static void +ehci_start_dma_delay_second(struct usb_xfer *xfer) +{ + struct ehci_softc *sc = EHCI_BUS2SC(xfer->xroot->bus); + + DPRINTF("\n"); + + /* trigger doorbell */ + ehci_doorbell_async(sc); + + /* give the doorbell 4ms */ + usbd_transfer_timeout_ms(xfer, + (void (*)(void *))&usb_dma_delay_done_cb, 4); +} + +/* + * Ring the doorbell twice before freeing any DMA descriptors. Some host + * controllers apparently cache the QH descriptors and need a message + * that the cache needs to be discarded. + */ +static void +ehci_start_dma_delay(struct usb_xfer *xfer) +{ + struct ehci_softc *sc = EHCI_BUS2SC(xfer->xroot->bus); + + DPRINTF("\n"); + + /* trigger doorbell */ + ehci_doorbell_async(sc); + + /* give the doorbell 4ms */ + usbd_transfer_timeout_ms(xfer, + (void (*)(void *))&ehci_start_dma_delay_second, 4); +} + struct usb_bus_methods ehci_bus_methods = { .endpoint_init = ehci_ep_init, @@ -3911,4 +3956,5 @@ struct usb_bus_methods ehci_bus_methods .set_hw_power_sleep = ehci_set_hw_power_sleep, .roothub_exec = ehci_roothub_exec, .xfer_poll = ehci_do_poll, + .start_dma_delay = ehci_start_dma_delay, }; From owner-svn-src-stable@FreeBSD.ORG Sun Feb 23 13:20:10 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0C9493F5; Sun, 23 Feb 2014 13:20:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E0DAA1BA8; Sun, 23 Feb 2014 13:20:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1NDK9DH039328; Sun, 23 Feb 2014 13:20:09 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1NDK8wh039322; Sun, 23 Feb 2014 13:20:08 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201402231320.s1NDK8wh039322@svn.freebsd.org> From: Hans Petter Selasky Date: Sun, 23 Feb 2014 13:20:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r262362 - in stable/9/sys: conf dev/usb dev/usb/net modules/usb modules/usb/urndis X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2014 13:20:10 -0000 Author: hselasky Date: Sun Feb 23 13:20:08 2014 New Revision: 262362 URL: http://svnweb.freebsd.org/changeset/base/262362 Log: MFC r261541, r261543 and r261544: Import USB RNDIS driver to FreeBSD from OpenBSD. Useful for so-called USB tethering. - Imported code from OpenBSD - Adapted code to FreeBSD - Removed some unused functions - Fixed some buffer encoding and decoding issues - Optimised data transport path a bit, by sending multiple packets at a time - Increased receive buffer to 16K Added: stable/9/sys/dev/usb/net/if_urndis.c - copied, changed from r261541, head/sys/dev/usb/net/if_urndis.c stable/9/sys/dev/usb/net/if_urndisreg.h - copied, changed from r261541, head/sys/dev/usb/net/if_urndisreg.h stable/9/sys/modules/usb/urndis/ - copied from r261541, head/sys/modules/usb/urndis/ Modified: stable/9/sys/conf/NOTES stable/9/sys/conf/files stable/9/sys/dev/usb/usb.h stable/9/sys/modules/usb/Makefile Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/conf/NOTES ============================================================================== --- stable/9/sys/conf/NOTES Sun Feb 23 13:13:59 2014 (r262361) +++ stable/9/sys/conf/NOTES Sun Feb 23 13:20:08 2014 (r262362) @@ -2751,6 +2751,8 @@ device upgt # Ralink Technology RT2500USB wireless driver device ural # +# RNDIS USB ethernet driver +device urndis # Realtek RTL8187B/L wireless driver device urtw # Modified: stable/9/sys/conf/files ============================================================================== --- stable/9/sys/conf/files Sun Feb 23 13:13:59 2014 (r262361) +++ stable/9/sys/conf/files Sun Feb 23 13:20:08 2014 (r262362) @@ -2028,9 +2028,10 @@ dev/usb/net/if_mos.c optional mos dev/usb/net/if_rue.c optional rue dev/usb/net/if_udav.c optional udav dev/usb/net/if_usie.c optional usie +dev/usb/net/if_urndis.c optional urndis dev/usb/net/ruephy.c optional rue dev/usb/net/usb_ethernet.c optional aue | axe | axge | cdce | cue | kue | \ - mos | rue | udav | ipheth + mos | rue | udav | ipheth | urndis dev/usb/net/uhso.c optional uhso # # USB WLAN drivers Copied and modified: stable/9/sys/dev/usb/net/if_urndis.c (from r261541, head/sys/dev/usb/net/if_urndis.c) ============================================================================== --- head/sys/dev/usb/net/if_urndis.c Thu Feb 6 08:47:14 2014 (r261541, copy source) +++ stable/9/sys/dev/usb/net/if_urndis.c Sun Feb 23 13:20:08 2014 (r262362) @@ -170,8 +170,11 @@ static const struct usb_ether_methods ur }; static const STRUCT_USB_HOST_ID urndis_host_devs[] = { +#if 0 + /* XXX this entry has a conflict an entry the umodem driver XXX */ {USB_IFACE_CLASS(UICLASS_CDC), USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), USB_IFACE_PROTOCOL(0xff)}, +#endif {USB_IFACE_CLASS(UICLASS_WIRELESS), USB_IFACE_SUBCLASS(UISUBCLASS_RF), USB_IFACE_PROTOCOL(UIPROTO_RNDIS)}, {USB_IFACE_CLASS(UICLASS_IAD), USB_IFACE_SUBCLASS(UISUBCLASS_SYNC), @@ -838,7 +841,7 @@ urndis_bulk_read_callback(struct usb_xfe DPRINTF("invalid dataoffset %u larger than %u\n", msg.rm_dataoffset + msg.rm_datalen + (uint32_t)__offsetof(struct urndis_packet_msg, - rm_dataoffset)); + rm_dataoffset), actlen); goto tr_setup; } else if (msg.rm_datalen < (uint32_t)sizeof(struct ether_header)) { ifp->if_ierrors++; Copied and modified: stable/9/sys/dev/usb/net/if_urndisreg.h (from r261541, head/sys/dev/usb/net/if_urndisreg.h) ============================================================================== --- head/sys/dev/usb/net/if_urndisreg.h Thu Feb 6 08:47:14 2014 (r261541, copy source) +++ stable/9/sys/dev/usb/net/if_urndisreg.h Sun Feb 23 13:20:08 2014 (r262362) @@ -53,7 +53,7 @@ struct urndis_softc { #define URNDIS_LOCK(sc) mtx_lock(&(sc)->sc_mtx) #define URNDIS_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx) -#define URNDIS_LOCK_ASSERT(sc, what) mtx_assert(&(sc)->sc_mtx, (x)) +#define URNDIS_LOCK_ASSERT(sc, what) mtx_assert(&(sc)->sc_mtx, (what)) #define RNDIS_STATUS_BUFFER_OVERFLOW 0x80000005L #define RNDIS_STATUS_FAILURE 0xC0000001L Modified: stable/9/sys/dev/usb/usb.h ============================================================================== --- stable/9/sys/dev/usb/usb.h Sun Feb 23 13:13:59 2014 (r262361) +++ stable/9/sys/dev/usb/usb.h Sun Feb 23 13:20:08 2014 (r262362) @@ -493,8 +493,11 @@ typedef struct usb_interface_assoc_descr #define UICLASS_WIRELESS 0xe0 #define UISUBCLASS_RF 0x01 #define UIPROTO_BLUETOOTH 0x01 +#define UIPROTO_RNDIS 0x03 #define UICLASS_IAD 0xEF /* Interface Association Descriptor */ +#define UISUBCLASS_SYNC 0x01 +#define UIPROTO_ACTIVESYNC 0x01 #define UICLASS_APPL_SPEC 0xfe #define UISUBCLASS_FIRMWARE_DOWNLOAD 1 Modified: stable/9/sys/modules/usb/Makefile ============================================================================== --- stable/9/sys/modules/usb/Makefile Sun Feb 23 13:13:59 2014 (r262361) +++ stable/9/sys/modules/usb/Makefile Sun Feb 23 13:20:08 2014 (r262362) @@ -37,6 +37,7 @@ SUBDIR += atp uhid ukbd ums udbp ufm uep SUBDIR += ucom u3g uark ubsa ubser uchcom ucycom ufoma uftdi ugensa uipaq ulpt \ umct umcs umodem umoscom uplcom uslcom uvisor uvscom SUBDIR += uether aue axe axge cdce cue ${_kue} mos rue udav uhso ipheth +SUBDIR += urndis SUBDIR += usfs umass urio SUBDIR += quirk template From owner-svn-src-stable@FreeBSD.ORG Sun Feb 23 13:22:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4BC4E540; Sun, 23 Feb 2014 13:22:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 29D4D1C10; Sun, 23 Feb 2014 13:22:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1NDM6lr041975; Sun, 23 Feb 2014 13:22:06 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1NDM4Fr041967; Sun, 23 Feb 2014 13:22:04 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201402231322.s1NDM4Fr041967@svn.freebsd.org> From: Hans Petter Selasky Date: Sun, 23 Feb 2014 13:22:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262363 - in stable/10/sys: conf dev/usb dev/usb/net modules/usb modules/usb/urndis X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2014 13:22:06 -0000 Author: hselasky Date: Sun Feb 23 13:22:04 2014 New Revision: 262363 URL: http://svnweb.freebsd.org/changeset/base/262363 Log: MFC r261541, r261543 and r261544: Import USB RNDIS driver to FreeBSD from OpenBSD. Useful for so-called USB tethering. - Imported code from OpenBSD - Adapted code to FreeBSD - Removed some unused functions - Fixed some buffer encoding and decoding issues - Optimised data transport path a bit, by sending multiple packets at a time - Increased receive buffer to 16K Added: stable/10/sys/dev/usb/net/if_urndis.c - copied, changed from r261541, head/sys/dev/usb/net/if_urndis.c stable/10/sys/dev/usb/net/if_urndisreg.h - copied, changed from r261541, head/sys/dev/usb/net/if_urndisreg.h stable/10/sys/modules/usb/urndis/ - copied from r261541, head/sys/modules/usb/urndis/ Modified: stable/10/sys/conf/NOTES stable/10/sys/conf/files stable/10/sys/dev/usb/usb.h stable/10/sys/modules/usb/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/NOTES ============================================================================== --- stable/10/sys/conf/NOTES Sun Feb 23 13:20:08 2014 (r262362) +++ stable/10/sys/conf/NOTES Sun Feb 23 13:22:04 2014 (r262363) @@ -2742,6 +2742,8 @@ device upgt # Ralink Technology RT2500USB wireless driver device ural # +# RNDIS USB ethernet driver +device urndis # Realtek RTL8187B/L wireless driver device urtw # Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Sun Feb 23 13:20:08 2014 (r262362) +++ stable/10/sys/conf/files Sun Feb 23 13:22:04 2014 (r262363) @@ -2359,9 +2359,11 @@ dev/usb/net/if_rue.c optional rue dev/usb/net/if_smsc.c optional smsc dev/usb/net/if_udav.c optional udav dev/usb/net/if_usie.c optional usie +dev/usb/net/if_urndis.c optional urndis dev/usb/net/ruephy.c optional rue dev/usb/net/usb_ethernet.c optional aue | axe | axge | cdce | cue | kue | \ - mos | rue | smsc | udav | ipheth + mos | rue | smsc | udav | ipheth | \ + urndis dev/usb/net/uhso.c optional uhso # # USB WLAN drivers Copied and modified: stable/10/sys/dev/usb/net/if_urndis.c (from r261541, head/sys/dev/usb/net/if_urndis.c) ============================================================================== --- head/sys/dev/usb/net/if_urndis.c Thu Feb 6 08:47:14 2014 (r261541, copy source) +++ stable/10/sys/dev/usb/net/if_urndis.c Sun Feb 23 13:22:04 2014 (r262363) @@ -170,8 +170,11 @@ static const struct usb_ether_methods ur }; static const STRUCT_USB_HOST_ID urndis_host_devs[] = { +#if 0 + /* XXX this entry has a conflict an entry the umodem driver XXX */ {USB_IFACE_CLASS(UICLASS_CDC), USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), USB_IFACE_PROTOCOL(0xff)}, +#endif {USB_IFACE_CLASS(UICLASS_WIRELESS), USB_IFACE_SUBCLASS(UISUBCLASS_RF), USB_IFACE_PROTOCOL(UIPROTO_RNDIS)}, {USB_IFACE_CLASS(UICLASS_IAD), USB_IFACE_SUBCLASS(UISUBCLASS_SYNC), @@ -838,7 +841,7 @@ urndis_bulk_read_callback(struct usb_xfe DPRINTF("invalid dataoffset %u larger than %u\n", msg.rm_dataoffset + msg.rm_datalen + (uint32_t)__offsetof(struct urndis_packet_msg, - rm_dataoffset)); + rm_dataoffset), actlen); goto tr_setup; } else if (msg.rm_datalen < (uint32_t)sizeof(struct ether_header)) { ifp->if_ierrors++; Copied and modified: stable/10/sys/dev/usb/net/if_urndisreg.h (from r261541, head/sys/dev/usb/net/if_urndisreg.h) ============================================================================== --- head/sys/dev/usb/net/if_urndisreg.h Thu Feb 6 08:47:14 2014 (r261541, copy source) +++ stable/10/sys/dev/usb/net/if_urndisreg.h Sun Feb 23 13:22:04 2014 (r262363) @@ -53,7 +53,7 @@ struct urndis_softc { #define URNDIS_LOCK(sc) mtx_lock(&(sc)->sc_mtx) #define URNDIS_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx) -#define URNDIS_LOCK_ASSERT(sc, what) mtx_assert(&(sc)->sc_mtx, (x)) +#define URNDIS_LOCK_ASSERT(sc, what) mtx_assert(&(sc)->sc_mtx, (what)) #define RNDIS_STATUS_BUFFER_OVERFLOW 0x80000005L #define RNDIS_STATUS_FAILURE 0xC0000001L Modified: stable/10/sys/dev/usb/usb.h ============================================================================== --- stable/10/sys/dev/usb/usb.h Sun Feb 23 13:20:08 2014 (r262362) +++ stable/10/sys/dev/usb/usb.h Sun Feb 23 13:22:04 2014 (r262363) @@ -499,8 +499,11 @@ typedef struct usb_interface_assoc_descr #define UICLASS_WIRELESS 0xe0 #define UISUBCLASS_RF 0x01 #define UIPROTO_BLUETOOTH 0x01 +#define UIPROTO_RNDIS 0x03 #define UICLASS_IAD 0xEF /* Interface Association Descriptor */ +#define UISUBCLASS_SYNC 0x01 +#define UIPROTO_ACTIVESYNC 0x01 #define UICLASS_APPL_SPEC 0xfe #define UISUBCLASS_FIRMWARE_DOWNLOAD 1 Modified: stable/10/sys/modules/usb/Makefile ============================================================================== --- stable/10/sys/modules/usb/Makefile Sun Feb 23 13:20:08 2014 (r262362) +++ stable/10/sys/modules/usb/Makefile Sun Feb 23 13:22:04 2014 (r262363) @@ -39,6 +39,7 @@ SUBDIR += atp uhid ukbd ums udbp ufm uep SUBDIR += ucom u3g uark ubsa ubser uchcom ucycom ufoma uftdi ugensa uipaq ulpt \ umct umcs umodem umoscom uplcom uslcom uvisor uvscom SUBDIR += uether aue axe axge cdce cue ${_kue} mos rue smsc udav uhso ipheth +SUBDIR += urndis SUBDIR += usfs umass urio SUBDIR += quirk template SUBDIR += ${_g_audio} ${_g_keyboard} ${_g_modem} ${_g_mouse} From owner-svn-src-stable@FreeBSD.ORG Sun Feb 23 13:25:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC6066A2; Sun, 23 Feb 2014 13:25:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A52151C2A; Sun, 23 Feb 2014 13:25:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1NDPhTi042379; Sun, 23 Feb 2014 13:25:43 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1NDPhtd042378; Sun, 23 Feb 2014 13:25:43 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201402231325.s1NDPhtd042378@svn.freebsd.org> From: Hans Petter Selasky Date: Sun, 23 Feb 2014 13:25:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262364 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2014 13:25:43 -0000 Author: hselasky Date: Sun Feb 23 13:25:43 2014 New Revision: 262364 URL: http://svnweb.freebsd.org/changeset/base/262364 Log: MFC r261981: Add new PCI ID for hardware which needs port routing for USB 3.0. PR: usb/186811 Modified: stable/10/sys/dev/usb/controller/xhci_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci_pci.c Sun Feb 23 13:22:04 2014 (r262363) +++ stable/10/sys/dev/usb/controller/xhci_pci.c Sun Feb 23 13:25:43 2014 (r262364) @@ -102,6 +102,7 @@ xhci_pci_match(device_t self) case 0x10421b21: return ("ASMedia ASM1042 USB 3.0 controller"); + case 0x9c318086: case 0x1e318086: return ("Intel Panther Point USB 3.0 controller"); case 0x8c318086: @@ -237,6 +238,7 @@ xhci_pci_attach(device_t self) /* On Intel chipsets reroute ports from EHCI to XHCI controller. */ switch (pci_get_devid(self)) { + case 0x9c318086: /* Panther Point */ case 0x1e318086: /* Panther Point */ case 0x8c318086: /* Lynx Point */ sc->sc_port_route = &xhci_pci_port_route; From owner-svn-src-stable@FreeBSD.ORG Sun Feb 23 13:27:20 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 234F486B; Sun, 23 Feb 2014 13:27:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0EA491C38; Sun, 23 Feb 2014 13:27:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1NDRJ4f042590; Sun, 23 Feb 2014 13:27:19 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1NDRJOv042589; Sun, 23 Feb 2014 13:27:19 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201402231327.s1NDRJOv042589@svn.freebsd.org> From: Hans Petter Selasky Date: Sun, 23 Feb 2014 13:27:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r262365 - stable/9/sys/dev/usb/controller X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2014 13:27:20 -0000 Author: hselasky Date: Sun Feb 23 13:27:19 2014 New Revision: 262365 URL: http://svnweb.freebsd.org/changeset/base/262365 Log: MFC r261981: Add new PCI ID for hardware which needs port routing for USB 3.0. PR: usb/186811 Modified: stable/9/sys/dev/usb/controller/xhci_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/9/sys/dev/usb/controller/xhci_pci.c Sun Feb 23 13:25:43 2014 (r262364) +++ stable/9/sys/dev/usb/controller/xhci_pci.c Sun Feb 23 13:27:19 2014 (r262365) @@ -102,6 +102,7 @@ xhci_pci_match(device_t self) case 0x10421b21: return ("ASMedia ASM1042 USB 3.0 controller"); + case 0x9c318086: case 0x1e318086: return ("Intel Panther Point USB 3.0 controller"); case 0x8c318086: @@ -221,6 +222,7 @@ xhci_pci_attach(device_t self) } /* On Intel chipsets reroute ports from EHCI to XHCI controller. */ switch (pci_get_devid(self)) { + case 0x9c318086: /* Panther Point */ case 0x1e318086: /* Panther Point */ case 0x8c318086: /* Lynx Point */ sc->sc_port_route = &xhci_pci_port_route; From owner-svn-src-stable@FreeBSD.ORG Sun Feb 23 13:28:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B820A9A9; Sun, 23 Feb 2014 13:28:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A1F631C40; Sun, 23 Feb 2014 13:28:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1NDSbVG042769; Sun, 23 Feb 2014 13:28:37 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1NDSbav042768; Sun, 23 Feb 2014 13:28:37 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201402231328.s1NDSbav042768@svn.freebsd.org> From: Hans Petter Selasky Date: Sun, 23 Feb 2014 13:28:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r262366 - stable/8/sys/dev/usb/controller X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2014 13:28:37 -0000 Author: hselasky Date: Sun Feb 23 13:28:37 2014 New Revision: 262366 URL: http://svnweb.freebsd.org/changeset/base/262366 Log: MFC r261981: Add new PCI ID for hardware which needs port routing for USB 3.0. PR: usb/186811 Modified: stable/8/sys/dev/usb/controller/xhci_pci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/8/sys/dev/usb/controller/xhci_pci.c Sun Feb 23 13:27:19 2014 (r262365) +++ stable/8/sys/dev/usb/controller/xhci_pci.c Sun Feb 23 13:28:37 2014 (r262366) @@ -99,6 +99,7 @@ xhci_pci_match(device_t self) case 0x01941033: return ("NEC uPD720200 USB 3.0 controller"); + case 0x9c318086: case 0x1e318086: return ("Intel Panther Point USB 3.0 controller"); case 0x8c318086: @@ -205,6 +206,7 @@ xhci_pci_attach(device_t self) } /* On Intel chipsets reroute ports from EHCI to XHCI controller. */ switch (pci_get_devid(self)) { + case 0x9c318086: /* Panther Point */ case 0x1e318086: /* Panther Point */ case 0x8c318086: /* Lynx Point */ sc->sc_port_route = &xhci_pci_port_route; From owner-svn-src-stable@FreeBSD.ORG Sun Feb 23 13:31:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62207B6D; Sun, 23 Feb 2014 13:31:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 325DA1CCF; Sun, 23 Feb 2014 13:31:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1NDVemO045960; Sun, 23 Feb 2014 13:31:40 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1NDVeNG045959; Sun, 23 Feb 2014 13:31:40 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201402231331.s1NDVeNG045959@svn.freebsd.org> From: Hans Petter Selasky Date: Sun, 23 Feb 2014 13:31:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r262368 - stable/9/sys/dev/usb/input X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2014 13:31:40 -0000 Author: hselasky Date: Sun Feb 23 13:31:39 2014 New Revision: 262368 URL: http://svnweb.freebsd.org/changeset/base/262368 Log: MFC r261827: - Remove not needed definitions from driver. - Get USB input report length from HID descriptor. - Use 1 finger TAP for devices which has no integrated button. - Move data buffer to softc instead of allocating it. Modified: stable/9/sys/dev/usb/input/wsp.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/input/wsp.c ============================================================================== --- stable/9/sys/dev/usb/input/wsp.c Sun Feb 23 13:31:36 2014 (r262367) +++ stable/9/sys/dev/usb/input/wsp.c Sun Feb 23 13:31:39 2014 (r262368) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #define WSP_DRIVER_NAME "wsp" +#define WSP_BUFFER_MAX 1024 #define WSP_CLAMP(x,low,high) do { \ if ((x) < (low)) \ @@ -124,12 +125,12 @@ SYSCTL_INT(_hw_usb_wsp, OID_AUTO, scr_ho #define WSP_IFACE_INDEX 1 /* - * Some tables, structures, definitions and initialisation values for - * the touchpad protocol has been copied from Linux's + * Some tables, structures, definitions and constant values for the + * touchpad protocol has been copied from Linux's * "drivers/input/mouse/bcm5974.c" which has the following copyright * holders under GPLv2. All device specific code in this driver has * been written from scratch. The decoding algorithm is based on - * output from usbdump. + * output from FreeBSD's usbdump. * * Copyright (C) 2008 Henrik Rydberg (rydberg@euromail.se) * Copyright (C) 2008 Scott Shawcroft (scott.shawcroft@gmail.com) @@ -205,20 +206,10 @@ struct tp_finger { #define MAX_FINGERS 16 #define SIZEOF_FINGER sizeof(struct tp_finger) #define SIZEOF_ALL_FINGERS (MAX_FINGERS * SIZEOF_FINGER) -#define MAX_FINGER_ORIENTATION 16384 -/* logical signal quality */ -#define SN_PRESSURE 45 /* pressure signal-to-noise ratio */ -#define SN_WIDTH 25 /* width signal-to-noise ratio */ -#define SN_COORD 250 /* coordinate signal-to-noise ratio */ -#define SN_ORIENT 10 /* orientation signal-to-noise ratio */ - -/* device-specific parameters */ -struct wsp_param { - int snratio; /* signal-to-noise ratio */ - int min; /* device minimum reading */ - int max; /* device maximum reading */ -}; +#if (WSP_BUFFER_MAX < ((MAX_FINGERS * 14 * 2) + FINGER_TYPE3)) +#error "WSP_BUFFER_MAX is too small" +#endif enum { WSP_FLAG_WELLSPRING1, @@ -239,282 +230,70 @@ enum { /* device-specific configuration */ struct wsp_dev_params { uint8_t caps; /* device capability bitmask */ - uint16_t bt_datalen; /* data length of the button interface */ uint8_t tp_type; /* type of trackpad interface */ uint8_t tp_offset; /* offset to trackpad finger data */ - uint16_t tp_datalen; /* data length of the trackpad - * interface */ - struct wsp_param p; /* finger pressure limits */ - struct wsp_param w; /* finger width limits */ - struct wsp_param x; /* horizontal limits */ - struct wsp_param y; /* vertical limits */ - struct wsp_param o; /* orientation limits */ }; static const struct wsp_dev_params wsp_dev_params[WSP_FLAG_MAX] = { [WSP_FLAG_WELLSPRING1] = { .caps = 0, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE1, .tp_offset = FINGER_TYPE1, - .tp_datalen = FINGER_TYPE1 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 256 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4824, 5342 - }, - .y = { - SN_COORD, -172, 5820 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING2] = { .caps = 0, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE1, .tp_offset = FINGER_TYPE1, - .tp_datalen = FINGER_TYPE1 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 256 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4824, 4824 - }, - .y = { - SN_COORD, -172, 4290 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING3] = { .caps = HAS_INTEGRATED_BUTTON, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE2, .tp_offset = FINGER_TYPE2, - .tp_datalen = FINGER_TYPE2 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 300 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4460, 5166 - }, - .y = { - SN_COORD, -75, 6700 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING4] = { .caps = HAS_INTEGRATED_BUTTON, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE2, .tp_offset = FINGER_TYPE2, - .tp_datalen = FINGER_TYPE2 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 300 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4620, 5140 - }, - .y = { - SN_COORD, -150, 6600 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING4A] = { .caps = HAS_INTEGRATED_BUTTON, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE2, .tp_offset = FINGER_TYPE2, - .tp_datalen = FINGER_TYPE2 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 300 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4616, 5112 - }, - .y = { - SN_COORD, -142, 5234 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING5] = { .caps = HAS_INTEGRATED_BUTTON, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE2, .tp_offset = FINGER_TYPE2, - .tp_datalen = FINGER_TYPE2 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 300 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4415, 5050 - }, - .y = { - SN_COORD, -55, 6680 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING6] = { .caps = HAS_INTEGRATED_BUTTON, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE2, .tp_offset = FINGER_TYPE2, - .tp_datalen = FINGER_TYPE2 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 300 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4620, 5140 - }, - .y = { - SN_COORD, -150, 6600 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING5A] = { .caps = HAS_INTEGRATED_BUTTON, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE2, .tp_offset = FINGER_TYPE2, - .tp_datalen = FINGER_TYPE2 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 300 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4750, 5280 - }, - .y = { - SN_COORD, -150, 6730 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING6A] = { .caps = HAS_INTEGRATED_BUTTON, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE2, .tp_offset = FINGER_TYPE2, - .tp_datalen = FINGER_TYPE2 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 300 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4620, 5140 - }, - .y = { - SN_COORD, -150, 6600 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING7] = { .caps = HAS_INTEGRATED_BUTTON, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE2, .tp_offset = FINGER_TYPE2, - .tp_datalen = FINGER_TYPE2 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 300 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4750, 5280 - }, - .y = { - SN_COORD, -150, 6730 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING7A] = { .caps = HAS_INTEGRATED_BUTTON, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE2, .tp_offset = FINGER_TYPE2, - .tp_datalen = FINGER_TYPE2 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 300 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4750, 5280 - }, - .y = { - SN_COORD, -150, 6730 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING8] = { .caps = HAS_INTEGRATED_BUTTON, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE3, .tp_offset = FINGER_TYPE3, - .tp_datalen = FINGER_TYPE3 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 300 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4620, 5140 - }, - .y = { - SN_COORD, -150, 6600 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, }; @@ -606,8 +385,6 @@ struct wsp_softc { u_int sc_state; #define WSP_ENABLED 0x01 - struct bt_data *bt_data; /* button transferred data */ - uint8_t *tp_data; /* trackpad transferred data */ struct tp_finger *index[MAX_FINGERS]; /* finger index data */ int16_t pos_x[MAX_FINGERS]; /* position array */ int16_t pos_y[MAX_FINGERS]; /* position array */ @@ -624,7 +401,7 @@ struct wsp_softc { int dz_count; #define WSP_DZ_MAX_COUNT 32 int dt_sum; /* T-axis cumulative movement */ - + int tp_datalen; uint8_t o_ntouch; /* old touch finger status */ uint8_t finger; /* 0 or 1 *, check which finger moving */ uint16_t intr_count; @@ -638,6 +415,7 @@ struct wsp_softc { #define WSP_SCR_NONE 0 #define WSP_SCR_VER 1 #define WSP_SCR_HOR 2 + uint8_t tp_data[WSP_BUFFER_MAX] __aligned(4); /* trackpad transferred data */ }; typedef enum interface_mode { @@ -677,7 +455,7 @@ static device_attach_t wsp_attach; static device_detach_t wsp_detach; static usb_callback_t wsp_intr_callback; -static struct usb_config wsp_config[WSP_N_TRANSFER] = { +static const struct usb_config wsp_config[WSP_N_TRANSFER] = { [WSP_INTR_DT] = { .type = UE_INTERRUPT, .endpoint = UE_ADDR_ANY, @@ -686,7 +464,7 @@ static struct usb_config wsp_config[WSP_ .pipe_bof = 0, .short_xfer_ok = 1, }, - .bufsize = 0, /* use wMaxPacketSize */ + .bufsize = WSP_BUFFER_MAX, .callback = &wsp_intr_callback, }, }; @@ -724,19 +502,6 @@ wsp_set_device_mode(struct wsp_softc *sc static int wsp_enable(struct wsp_softc *sc) { - const struct wsp_dev_params *params = sc->sc_params; - - if (params == NULL || params->tp_datalen == 0) { - DPRINTF("params uninitialized!\n"); - return (ENXIO); - } - /* Allocate the dynamic buffers */ - sc->tp_data = malloc(params->tp_datalen, M_USB, M_WAITOK | M_ZERO); - if (sc->tp_data == NULL) { - DPRINTF("Cannot allocate memory\n"); - return (ENXIO); - } - /* reset status */ memset(&sc->sc_status, 0, sizeof(sc->sc_status)); sc->sc_state |= WSP_ENABLED; @@ -748,9 +513,6 @@ wsp_enable(struct wsp_softc *sc) static void wsp_disable(struct wsp_softc *sc) { - free(sc->tp_data, M_USB); - sc->tp_data = NULL; - sc->sc_state &= ~WSP_ENABLED; DPRINTFN(WSP_LLEVEL_INFO, "disabled wsp\n"); } @@ -779,9 +541,29 @@ wsp_attach(device_t dev) struct wsp_softc *sc = device_get_softc(dev); struct usb_attach_arg *uaa = device_get_ivars(dev); usb_error_t err; + void *d_ptr = NULL; + uint16_t d_len; DPRINTFN(WSP_LLEVEL_INFO, "sc=%p\n", sc); + /* Get HID descriptor */ + err = usbd_req_get_hid_desc(uaa->device, NULL, &d_ptr, + &d_len, M_TEMP, uaa->info.bIfaceIndex); + + if (err == USB_ERR_NORMAL_COMPLETION) { + /* Get HID report descriptor length */ + sc->tp_datalen = hid_report_size(d_ptr, d_len, hid_input, NULL); + free(d_ptr, M_TEMP); + + if (sc->tp_datalen <= 0 || sc->tp_datalen > WSP_BUFFER_MAX) { + DPRINTF("Invalid datalength or too big " + "datalength: %d\n", sc->tp_datalen); + return (ENXIO); + } + } else { + return (ENXIO); + } + sc->sc_usb_device = uaa->device; /* @@ -816,13 +598,9 @@ wsp_attach(device_t dev) /* get device specific configuration */ sc->sc_params = wsp_dev_params + USB_GET_DRIVER_INFO(uaa); - /* set to 0 to use wMaxPacketSize is not enough */ - wsp_config[0].bufsize = sc->sc_params->tp_datalen; - err = usbd_transfer_setup(uaa->device, &uaa->info.bIfaceIndex, sc->sc_xfer, wsp_config, WSP_N_TRANSFER, sc, &sc->sc_mutex); - if (err) { DPRINTF("error=%s\n", usbd_errstr(err)); goto detach; @@ -903,19 +681,16 @@ wsp_intr_callback(struct usb_xfer *xfer, switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: - if (len > (int)params->tp_datalen) { - DPRINTFN(WSP_LLEVEL_ERROR, - "truncating large packet from %u to %u bytes\n", - len, params->tp_datalen); - len = params->tp_datalen; - } else { - /* make sure we don't process old data */ - memset(sc->tp_data + len, 0, params->tp_datalen - len); - } + /* copy out received data */ pc = usbd_xfer_get_frame(xfer, 0); usbd_copy_out(pc, 0, sc->tp_data, len); + if (len < sc->tp_datalen) { + /* make sure we don't process old data */ + memset(sc->tp_data + len, 0, sc->tp_datalen - len); + } + h = (struct tp_header *)(sc->tp_data); if (params->tp_type == TYPE2) { @@ -956,7 +731,7 @@ wsp_intr_callback(struct usb_xfer *xfer, f[i].touch_major, f[i].touch_minor, f[i].multi); sc->pos_x[i] = f[i].abs_x; - sc->pos_y[i] = params->y.min + params->y.max - f[i].abs_y; + sc->pos_y[i] = -f[i].abs_y; sc->index[i] = &f[i]; } @@ -1009,12 +784,12 @@ wsp_intr_callback(struct usb_xfer *xfer, * button-up). */ switch (sc->ntaps) { -#if 0 case 1: - wsp_add_to_queue(sc, 0, 0, 0, MOUSE_BUTTON1DOWN); - DPRINTFN(WSP_LLEVEL_INFO, "LEFT CLICK!\n"); + if (!(params->caps & HAS_INTEGRATED_BUTTON)) { + wsp_add_to_queue(sc, 0, 0, 0, MOUSE_BUTTON1DOWN); + DPRINTFN(WSP_LLEVEL_INFO, "LEFT CLICK!\n"); + } break; -#endif case 2: if (sc->distance < MAX_DISTANCE) wsp_add_to_queue(sc, 0, 0, 0, MOUSE_BUTTON3DOWN); @@ -1180,7 +955,7 @@ tr_setup: if (usb_fifo_put_bytes_max( sc->sc_fifo.fp[USB_FIFO_RX]) != 0) { usbd_xfer_set_frame_len(xfer, 0, - sc->sc_params->tp_datalen); + sc->tp_datalen); usbd_transfer_submit(xfer); } break; @@ -1193,8 +968,6 @@ tr_setup: } break; } - - return; } static void From owner-svn-src-stable@FreeBSD.ORG Sun Feb 23 13:33:22 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31A4DDA2; Sun, 23 Feb 2014 13:33:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F3D001CE6; Sun, 23 Feb 2014 13:33:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1NDXLZb046267; Sun, 23 Feb 2014 13:33:21 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1NDXLWL046266; Sun, 23 Feb 2014 13:33:21 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201402231333.s1NDXLWL046266@svn.freebsd.org> From: Hans Petter Selasky Date: Sun, 23 Feb 2014 13:33:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262369 - stable/10/sys/dev/usb/input X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2014 13:33:22 -0000 Author: hselasky Date: Sun Feb 23 13:33:21 2014 New Revision: 262369 URL: http://svnweb.freebsd.org/changeset/base/262369 Log: MFC r261827: - Remove not needed definitions from driver. - Get USB input report length from HID descriptor. - Use 1 finger TAP for devices which has no integrated button. - Move data buffer to softc instead of allocating it. Modified: stable/10/sys/dev/usb/input/wsp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/input/wsp.c ============================================================================== --- stable/10/sys/dev/usb/input/wsp.c Sun Feb 23 13:31:39 2014 (r262368) +++ stable/10/sys/dev/usb/input/wsp.c Sun Feb 23 13:33:21 2014 (r262369) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #define WSP_DRIVER_NAME "wsp" +#define WSP_BUFFER_MAX 1024 #define WSP_CLAMP(x,low,high) do { \ if ((x) < (low)) \ @@ -124,12 +125,12 @@ SYSCTL_INT(_hw_usb_wsp, OID_AUTO, scr_ho #define WSP_IFACE_INDEX 1 /* - * Some tables, structures, definitions and initialisation values for - * the touchpad protocol has been copied from Linux's + * Some tables, structures, definitions and constant values for the + * touchpad protocol has been copied from Linux's * "drivers/input/mouse/bcm5974.c" which has the following copyright * holders under GPLv2. All device specific code in this driver has * been written from scratch. The decoding algorithm is based on - * output from usbdump. + * output from FreeBSD's usbdump. * * Copyright (C) 2008 Henrik Rydberg (rydberg@euromail.se) * Copyright (C) 2008 Scott Shawcroft (scott.shawcroft@gmail.com) @@ -205,20 +206,10 @@ struct tp_finger { #define MAX_FINGERS 16 #define SIZEOF_FINGER sizeof(struct tp_finger) #define SIZEOF_ALL_FINGERS (MAX_FINGERS * SIZEOF_FINGER) -#define MAX_FINGER_ORIENTATION 16384 -/* logical signal quality */ -#define SN_PRESSURE 45 /* pressure signal-to-noise ratio */ -#define SN_WIDTH 25 /* width signal-to-noise ratio */ -#define SN_COORD 250 /* coordinate signal-to-noise ratio */ -#define SN_ORIENT 10 /* orientation signal-to-noise ratio */ - -/* device-specific parameters */ -struct wsp_param { - int snratio; /* signal-to-noise ratio */ - int min; /* device minimum reading */ - int max; /* device maximum reading */ -}; +#if (WSP_BUFFER_MAX < ((MAX_FINGERS * 14 * 2) + FINGER_TYPE3)) +#error "WSP_BUFFER_MAX is too small" +#endif enum { WSP_FLAG_WELLSPRING1, @@ -239,282 +230,70 @@ enum { /* device-specific configuration */ struct wsp_dev_params { uint8_t caps; /* device capability bitmask */ - uint16_t bt_datalen; /* data length of the button interface */ uint8_t tp_type; /* type of trackpad interface */ uint8_t tp_offset; /* offset to trackpad finger data */ - uint16_t tp_datalen; /* data length of the trackpad - * interface */ - struct wsp_param p; /* finger pressure limits */ - struct wsp_param w; /* finger width limits */ - struct wsp_param x; /* horizontal limits */ - struct wsp_param y; /* vertical limits */ - struct wsp_param o; /* orientation limits */ }; static const struct wsp_dev_params wsp_dev_params[WSP_FLAG_MAX] = { [WSP_FLAG_WELLSPRING1] = { .caps = 0, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE1, .tp_offset = FINGER_TYPE1, - .tp_datalen = FINGER_TYPE1 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 256 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4824, 5342 - }, - .y = { - SN_COORD, -172, 5820 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING2] = { .caps = 0, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE1, .tp_offset = FINGER_TYPE1, - .tp_datalen = FINGER_TYPE1 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 256 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4824, 4824 - }, - .y = { - SN_COORD, -172, 4290 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING3] = { .caps = HAS_INTEGRATED_BUTTON, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE2, .tp_offset = FINGER_TYPE2, - .tp_datalen = FINGER_TYPE2 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 300 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4460, 5166 - }, - .y = { - SN_COORD, -75, 6700 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING4] = { .caps = HAS_INTEGRATED_BUTTON, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE2, .tp_offset = FINGER_TYPE2, - .tp_datalen = FINGER_TYPE2 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 300 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4620, 5140 - }, - .y = { - SN_COORD, -150, 6600 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING4A] = { .caps = HAS_INTEGRATED_BUTTON, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE2, .tp_offset = FINGER_TYPE2, - .tp_datalen = FINGER_TYPE2 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 300 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4616, 5112 - }, - .y = { - SN_COORD, -142, 5234 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING5] = { .caps = HAS_INTEGRATED_BUTTON, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE2, .tp_offset = FINGER_TYPE2, - .tp_datalen = FINGER_TYPE2 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 300 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4415, 5050 - }, - .y = { - SN_COORD, -55, 6680 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING6] = { .caps = HAS_INTEGRATED_BUTTON, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE2, .tp_offset = FINGER_TYPE2, - .tp_datalen = FINGER_TYPE2 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 300 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4620, 5140 - }, - .y = { - SN_COORD, -150, 6600 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING5A] = { .caps = HAS_INTEGRATED_BUTTON, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE2, .tp_offset = FINGER_TYPE2, - .tp_datalen = FINGER_TYPE2 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 300 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4750, 5280 - }, - .y = { - SN_COORD, -150, 6730 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING6A] = { .caps = HAS_INTEGRATED_BUTTON, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE2, .tp_offset = FINGER_TYPE2, - .tp_datalen = FINGER_TYPE2 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 300 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4620, 5140 - }, - .y = { - SN_COORD, -150, 6600 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING7] = { .caps = HAS_INTEGRATED_BUTTON, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE2, .tp_offset = FINGER_TYPE2, - .tp_datalen = FINGER_TYPE2 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 300 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4750, 5280 - }, - .y = { - SN_COORD, -150, 6730 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING7A] = { .caps = HAS_INTEGRATED_BUTTON, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE2, .tp_offset = FINGER_TYPE2, - .tp_datalen = FINGER_TYPE2 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 300 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4750, 5280 - }, - .y = { - SN_COORD, -150, 6730 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING8] = { .caps = HAS_INTEGRATED_BUTTON, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE3, .tp_offset = FINGER_TYPE3, - .tp_datalen = FINGER_TYPE3 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 300 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4620, 5140 - }, - .y = { - SN_COORD, -150, 6600 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, }; @@ -606,8 +385,6 @@ struct wsp_softc { u_int sc_state; #define WSP_ENABLED 0x01 - struct bt_data *bt_data; /* button transferred data */ - uint8_t *tp_data; /* trackpad transferred data */ struct tp_finger *index[MAX_FINGERS]; /* finger index data */ int16_t pos_x[MAX_FINGERS]; /* position array */ int16_t pos_y[MAX_FINGERS]; /* position array */ @@ -624,7 +401,7 @@ struct wsp_softc { int dz_count; #define WSP_DZ_MAX_COUNT 32 int dt_sum; /* T-axis cumulative movement */ - + int tp_datalen; uint8_t o_ntouch; /* old touch finger status */ uint8_t finger; /* 0 or 1 *, check which finger moving */ uint16_t intr_count; @@ -638,6 +415,7 @@ struct wsp_softc { #define WSP_SCR_NONE 0 #define WSP_SCR_VER 1 #define WSP_SCR_HOR 2 + uint8_t tp_data[WSP_BUFFER_MAX] __aligned(4); /* trackpad transferred data */ }; typedef enum interface_mode { @@ -677,7 +455,7 @@ static device_attach_t wsp_attach; static device_detach_t wsp_detach; static usb_callback_t wsp_intr_callback; -static struct usb_config wsp_config[WSP_N_TRANSFER] = { +static const struct usb_config wsp_config[WSP_N_TRANSFER] = { [WSP_INTR_DT] = { .type = UE_INTERRUPT, .endpoint = UE_ADDR_ANY, @@ -686,7 +464,7 @@ static struct usb_config wsp_config[WSP_ .pipe_bof = 0, .short_xfer_ok = 1, }, - .bufsize = 0, /* use wMaxPacketSize */ + .bufsize = WSP_BUFFER_MAX, .callback = &wsp_intr_callback, }, }; @@ -724,19 +502,6 @@ wsp_set_device_mode(struct wsp_softc *sc static int wsp_enable(struct wsp_softc *sc) { - const struct wsp_dev_params *params = sc->sc_params; - - if (params == NULL || params->tp_datalen == 0) { - DPRINTF("params uninitialized!\n"); - return (ENXIO); - } - /* Allocate the dynamic buffers */ - sc->tp_data = malloc(params->tp_datalen, M_USB, M_WAITOK | M_ZERO); - if (sc->tp_data == NULL) { - DPRINTF("Cannot allocate memory\n"); - return (ENXIO); - } - /* reset status */ memset(&sc->sc_status, 0, sizeof(sc->sc_status)); sc->sc_state |= WSP_ENABLED; @@ -748,9 +513,6 @@ wsp_enable(struct wsp_softc *sc) static void wsp_disable(struct wsp_softc *sc) { - free(sc->tp_data, M_USB); - sc->tp_data = NULL; - sc->sc_state &= ~WSP_ENABLED; DPRINTFN(WSP_LLEVEL_INFO, "disabled wsp\n"); } @@ -779,9 +541,29 @@ wsp_attach(device_t dev) struct wsp_softc *sc = device_get_softc(dev); struct usb_attach_arg *uaa = device_get_ivars(dev); usb_error_t err; + void *d_ptr = NULL; + uint16_t d_len; DPRINTFN(WSP_LLEVEL_INFO, "sc=%p\n", sc); + /* Get HID descriptor */ + err = usbd_req_get_hid_desc(uaa->device, NULL, &d_ptr, + &d_len, M_TEMP, uaa->info.bIfaceIndex); + + if (err == USB_ERR_NORMAL_COMPLETION) { + /* Get HID report descriptor length */ + sc->tp_datalen = hid_report_size(d_ptr, d_len, hid_input, NULL); + free(d_ptr, M_TEMP); + + if (sc->tp_datalen <= 0 || sc->tp_datalen > WSP_BUFFER_MAX) { + DPRINTF("Invalid datalength or too big " + "datalength: %d\n", sc->tp_datalen); + return (ENXIO); + } + } else { + return (ENXIO); + } + sc->sc_usb_device = uaa->device; /* @@ -816,13 +598,9 @@ wsp_attach(device_t dev) /* get device specific configuration */ sc->sc_params = wsp_dev_params + USB_GET_DRIVER_INFO(uaa); - /* set to 0 to use wMaxPacketSize is not enough */ - wsp_config[0].bufsize = sc->sc_params->tp_datalen; - err = usbd_transfer_setup(uaa->device, &uaa->info.bIfaceIndex, sc->sc_xfer, wsp_config, WSP_N_TRANSFER, sc, &sc->sc_mutex); - if (err) { DPRINTF("error=%s\n", usbd_errstr(err)); goto detach; @@ -903,19 +681,16 @@ wsp_intr_callback(struct usb_xfer *xfer, switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: - if (len > (int)params->tp_datalen) { - DPRINTFN(WSP_LLEVEL_ERROR, - "truncating large packet from %u to %u bytes\n", - len, params->tp_datalen); - len = params->tp_datalen; - } else { - /* make sure we don't process old data */ - memset(sc->tp_data + len, 0, params->tp_datalen - len); - } + /* copy out received data */ pc = usbd_xfer_get_frame(xfer, 0); usbd_copy_out(pc, 0, sc->tp_data, len); + if (len < sc->tp_datalen) { + /* make sure we don't process old data */ + memset(sc->tp_data + len, 0, sc->tp_datalen - len); + } + h = (struct tp_header *)(sc->tp_data); if (params->tp_type == TYPE2) { @@ -956,7 +731,7 @@ wsp_intr_callback(struct usb_xfer *xfer, f[i].touch_major, f[i].touch_minor, f[i].multi); sc->pos_x[i] = f[i].abs_x; - sc->pos_y[i] = params->y.min + params->y.max - f[i].abs_y; + sc->pos_y[i] = -f[i].abs_y; sc->index[i] = &f[i]; } @@ -1009,12 +784,12 @@ wsp_intr_callback(struct usb_xfer *xfer, * button-up). */ switch (sc->ntaps) { -#if 0 case 1: - wsp_add_to_queue(sc, 0, 0, 0, MOUSE_BUTTON1DOWN); - DPRINTFN(WSP_LLEVEL_INFO, "LEFT CLICK!\n"); + if (!(params->caps & HAS_INTEGRATED_BUTTON)) { + wsp_add_to_queue(sc, 0, 0, 0, MOUSE_BUTTON1DOWN); + DPRINTFN(WSP_LLEVEL_INFO, "LEFT CLICK!\n"); + } break; -#endif case 2: if (sc->distance < MAX_DISTANCE) wsp_add_to_queue(sc, 0, 0, 0, MOUSE_BUTTON3DOWN); @@ -1180,7 +955,7 @@ tr_setup: if (usb_fifo_put_bytes_max( sc->sc_fifo.fp[USB_FIFO_RX]) != 0) { usbd_xfer_set_frame_len(xfer, 0, - sc->sc_params->tp_datalen); + sc->tp_datalen); usbd_transfer_submit(xfer); } break; @@ -1193,8 +968,6 @@ tr_setup: } break; } - - return; } static void From owner-svn-src-stable@FreeBSD.ORG Sun Feb 23 13:36:22 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 47BE0EF7; Sun, 23 Feb 2014 13:36:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2EA181CFE; Sun, 23 Feb 2014 13:36:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1NDaM0s046632; Sun, 23 Feb 2014 13:36:22 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1NDaL7H046630; Sun, 23 Feb 2014 13:36:21 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201402231336.s1NDaL7H046630@svn.freebsd.org> From: Hans Petter Selasky Date: Sun, 23 Feb 2014 13:36:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262370 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2014 13:36:22 -0000 Author: hselasky Date: Sun Feb 23 13:36:21 2014 New Revision: 262370 URL: http://svnweb.freebsd.org/changeset/base/262370 Log: MFC r261872: Fix minor logical error in the XHCI driver. Set correct SETUP packet direction value. Modified: stable/10/sys/dev/usb/controller/xhci.c stable/10/sys/dev/usb/controller/xhci.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci.c Sun Feb 23 13:33:21 2014 (r262369) +++ stable/10/sys/dev/usb/controller/xhci.c Sun Feb 23 13:36:21 2014 (r262370) @@ -1759,7 +1759,8 @@ restart: /* check wLength */ if (td->td_trb[0].qwTrb0 & htole64(XHCI_TRB_0_WLENGTH_MASK)) { - if (td->td_trb[0].qwTrb0 & htole64(1)) + if (td->td_trb[0].qwTrb0 & + htole64(XHCI_TRB_0_DIR_IN_MASK)) dword |= XHCI_TRB_3_TRT_IN; else dword |= XHCI_TRB_3_TRT_OUT; Modified: stable/10/sys/dev/usb/controller/xhci.h ============================================================================== --- stable/10/sys/dev/usb/controller/xhci.h Sun Feb 23 13:33:21 2014 (r262369) +++ stable/10/sys/dev/usb/controller/xhci.h Sun Feb 23 13:36:21 2014 (r262370) @@ -192,6 +192,7 @@ struct xhci_stream_ctx { struct xhci_trb { volatile uint64_t qwTrb0; +#define XHCI_TRB_0_DIR_IN_MASK (0x80ULL << 0) #define XHCI_TRB_0_WLENGTH_MASK (0xFFFFULL << 48) volatile uint32_t dwTrb2; #define XHCI_TRB_2_ERROR_GET(x) (((x) >> 24) & 0xFF) From owner-svn-src-stable@FreeBSD.ORG Sun Feb 23 13:37:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AA886A2; Sun, 23 Feb 2014 13:37:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 91D191D09; Sun, 23 Feb 2014 13:37:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1NDbk9r046808; Sun, 23 Feb 2014 13:37:46 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1NDbkcr046806; Sun, 23 Feb 2014 13:37:46 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201402231337.s1NDbkcr046806@svn.freebsd.org> From: Hans Petter Selasky Date: Sun, 23 Feb 2014 13:37:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r262371 - stable/9/sys/dev/usb/controller X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2014 13:37:46 -0000 Author: hselasky Date: Sun Feb 23 13:37:45 2014 New Revision: 262371 URL: http://svnweb.freebsd.org/changeset/base/262371 Log: MFC r261872: Fix minor logical error in the XHCI driver. Set correct SETUP packet direction value. Modified: stable/9/sys/dev/usb/controller/xhci.c stable/9/sys/dev/usb/controller/xhci.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/9/sys/dev/usb/controller/xhci.c Sun Feb 23 13:36:21 2014 (r262370) +++ stable/9/sys/dev/usb/controller/xhci.c Sun Feb 23 13:37:45 2014 (r262371) @@ -1725,7 +1725,8 @@ restart: /* check wLength */ if (td->td_trb[0].qwTrb0 & htole64(XHCI_TRB_0_WLENGTH_MASK)) { - if (td->td_trb[0].qwTrb0 & htole64(1)) + if (td->td_trb[0].qwTrb0 & + htole64(XHCI_TRB_0_DIR_IN_MASK)) dword |= XHCI_TRB_3_TRT_IN; else dword |= XHCI_TRB_3_TRT_OUT; Modified: stable/9/sys/dev/usb/controller/xhci.h ============================================================================== --- stable/9/sys/dev/usb/controller/xhci.h Sun Feb 23 13:36:21 2014 (r262370) +++ stable/9/sys/dev/usb/controller/xhci.h Sun Feb 23 13:37:45 2014 (r262371) @@ -184,6 +184,7 @@ struct xhci_stream_ctx { struct xhci_trb { volatile uint64_t qwTrb0; +#define XHCI_TRB_0_DIR_IN_MASK (0x80ULL << 0) #define XHCI_TRB_0_WLENGTH_MASK (0xFFFFULL << 48) volatile uint32_t dwTrb2; #define XHCI_TRB_2_ERROR_GET(x) (((x) >> 24) & 0xFF) From owner-svn-src-stable@FreeBSD.ORG Sun Feb 23 13:39:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE1871EA; Sun, 23 Feb 2014 13:39:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C71DF1D18; Sun, 23 Feb 2014 13:39:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1NDdFb7047017; Sun, 23 Feb 2014 13:39:15 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1NDdFXN047015; Sun, 23 Feb 2014 13:39:15 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201402231339.s1NDdFXN047015@svn.freebsd.org> From: Hans Petter Selasky Date: Sun, 23 Feb 2014 13:39:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r262372 - stable/8/sys/dev/usb/controller X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2014 13:39:16 -0000 Author: hselasky Date: Sun Feb 23 13:39:15 2014 New Revision: 262372 URL: http://svnweb.freebsd.org/changeset/base/262372 Log: MFC r261872: Fix minor logical error in the XHCI driver. Set correct SETUP packet direction value. Modified: stable/8/sys/dev/usb/controller/xhci.c stable/8/sys/dev/usb/controller/xhci.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/8/sys/dev/usb/controller/xhci.c Sun Feb 23 13:37:45 2014 (r262371) +++ stable/8/sys/dev/usb/controller/xhci.c Sun Feb 23 13:39:15 2014 (r262372) @@ -1725,7 +1725,8 @@ restart: /* check wLength */ if (td->td_trb[0].qwTrb0 & htole64(XHCI_TRB_0_WLENGTH_MASK)) { - if (td->td_trb[0].qwTrb0 & htole64(1)) + if (td->td_trb[0].qwTrb0 & + htole64(XHCI_TRB_0_DIR_IN_MASK)) dword |= XHCI_TRB_3_TRT_IN; else dword |= XHCI_TRB_3_TRT_OUT; Modified: stable/8/sys/dev/usb/controller/xhci.h ============================================================================== --- stable/8/sys/dev/usb/controller/xhci.h Sun Feb 23 13:37:45 2014 (r262371) +++ stable/8/sys/dev/usb/controller/xhci.h Sun Feb 23 13:39:15 2014 (r262372) @@ -184,6 +184,7 @@ struct xhci_stream_ctx { struct xhci_trb { volatile uint64_t qwTrb0; +#define XHCI_TRB_0_DIR_IN_MASK (0x80ULL << 0) #define XHCI_TRB_0_WLENGTH_MASK (0xFFFFULL << 48) volatile uint32_t dwTrb2; #define XHCI_TRB_2_ERROR_GET(x) (((x) >> 24) & 0xFF) From owner-svn-src-stable@FreeBSD.ORG Sun Feb 23 20:04:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7BADB7D2; Sun, 23 Feb 2014 20:04:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4A11710BC; Sun, 23 Feb 2014 20:04:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1NK4UbY005192; Sun, 23 Feb 2014 20:04:30 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1NK4TJU005189; Sun, 23 Feb 2014 20:04:29 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201402232004.s1NK4TJU005189@svn.freebsd.org> From: Bryan Drewery Date: Sun, 23 Feb 2014 20:04:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262384 - in stable/10: etc/defaults etc/rc.d share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2014 20:04:30 -0000 Author: bdrewery Date: Sun Feb 23 20:04:29 2014 New Revision: 262384 URL: http://svnweb.freebsd.org/changeset/base/262384 Log: MFC r261931,r261932: Allow overriding rctl.conf(5) file location for /etc/rc.d/rctl Approved by: bapt (mentor, implicit) Modified: stable/10/etc/defaults/rc.conf stable/10/etc/rc.d/rctl stable/10/share/man/man5/rc.conf.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/defaults/rc.conf ============================================================================== --- stable/10/etc/defaults/rc.conf Sun Feb 23 19:18:04 2014 (r262383) +++ stable/10/etc/defaults/rc.conf Sun Feb 23 20:04:29 2014 (r262384) @@ -663,6 +663,10 @@ newsyslog_flags="-CN" # Newsyslog flags mixer_enable="YES" # Run the sound mixer. opensm_enable="NO" # Opensm(8) for infiniband devices defaults to off +# rctl(8) requires kernel options RACCT and RCTL +rctl_enable="NO" # Load rctl(8) rules on boot +rctl_rules="/etc/rctl.conf" # rctl(8) ruleset. See rctl.conf(5). + ############################################################## ### Jail Configuration (see rc.conf(5) manual page) ########## ############################################################## Modified: stable/10/etc/rc.d/rctl ============================================================================== --- stable/10/etc/rc.d/rctl Sun Feb 23 19:18:04 2014 (r262383) +++ stable/10/etc/rc.d/rctl Sun Feb 23 20:04:29 2014 (r262384) @@ -15,7 +15,7 @@ stop_cmd="rctl_stop" rctl_start() { - if [ -f /etc/rctl.conf ]; then + if [ -f ${rctl_rules} ]; then while read var comments do case ${var} in @@ -25,7 +25,7 @@ rctl_start() rctl -a "${var}" ;; esac - done < /etc/rctl.conf + done < ${rctl_rules} fi } Modified: stable/10/share/man/man5/rc.conf.5 ============================================================================== --- stable/10/share/man/man5/rc.conf.5 Sun Feb 23 19:18:04 2014 (r262383) +++ stable/10/share/man/man5/rc.conf.5 Sun Feb 23 20:04:29 2014 (r262384) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 25, 2013 +.Dd February 15, 2014 .Dt RC.CONF 5 .Os .Sh NAME @@ -4416,6 +4416,26 @@ interface if desired. Defines the total number of seconds to wait for link to become usable, polled at a 1-second interval. The default is 30. +.It Va rctl_enable +.Pq Vt bool +Set to +.Dq Li YES +to load +.Xr rctl 8 +rules from the defined ruleset. +The kernel must be built with +.Cd "options RACCT" +and +.Cd "options RCTL" . +.It Va rctl_rules +.Pq Vt str +Set to +.Pa /etc/rctl.conf +by default. +This variables contains the +.Xr rctl.conf 5 +ruleset to load for +.Xr rctl 8 . .El .Sh FILES .Bl -tag -width ".Pa /etc/defaults/rc.conf" -compact From owner-svn-src-stable@FreeBSD.ORG Sun Feb 23 20:07:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D801922; Sun, 23 Feb 2014 20:07:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DE88010D3; Sun, 23 Feb 2014 20:07:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1NK7Ukj005657; Sun, 23 Feb 2014 20:07:30 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1NK7Um2005656; Sun, 23 Feb 2014 20:07:30 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201402232007.s1NK7Um2005656@svn.freebsd.org> From: Bryan Drewery Date: Sun, 23 Feb 2014 20:07:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262385 - stable/10/usr.bin/rctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2014 20:07:31 -0000 Author: bdrewery Date: Sun Feb 23 20:07:30 2014 New Revision: 262385 URL: http://svnweb.freebsd.org/changeset/base/262385 Log: MFC r261934: Rework rctl(8) manpage Approved by: bapt (mentor, implicit) Modified: stable/10/usr.bin/rctl/rctl.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/rctl/rctl.8 ============================================================================== --- stable/10/usr.bin/rctl/rctl.8 Sun Feb 23 20:04:29 2014 (r262384) +++ stable/10/usr.bin/rctl/rctl.8 Sun Feb 23 20:07:30 2014 (r262385) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 3, 2012 +.Dd February 14, 2014 .Dt RCTL 8 .Os .Sh NAME @@ -40,17 +40,24 @@ .Fl a .Op Ar rule .Nm +.Fl l .Op Fl h .Op Fl n -.Fl l .Op Ar filter .Nm .Fl r .Op Ar filter .Nm -.Op Fl h .Fl u +.Op Fl h .Op Ar filter +.Pp +.Nm +requires the kernel to be compiled with: +.Bd -ragged -offset indent +.Cd "options RACCT" +.Cd "options RCTL" +.Ed .Sh DESCRIPTION When called without options, the .Nm @@ -77,8 +84,15 @@ Remove rules matching .Ar filter from the RCTL database. .It Fl u Ar filter -Display resource usage for a subject (process, user, login class -or jail) matching the +Display resource usage for a subject +.Po +.Sy process , +.Sy user , +.Sy loginclass +or +.Sy jail +.Pc +matching the .Ar filter . .It Fl h "Human-readable" output. @@ -87,24 +101,49 @@ Gigabyte, Terabyte and Petabyte. .It Fl n Display user IDs numerically rather than converting them to a user name. .El +.Pp +Modifying rules affects all currently running and future processes matching +the rule. .Sh RULE SYNTAX Syntax for a rule is subject:subject-id:resource:action=amount/per. .Pp -Subject defines the kind of entity the rule applies to. -It can be either process, user, login class, or jail. -.Pp -Subject ID identifies the subject. -It can be a process ID, user name, numerical user ID, login class name, +.Bl -tag -width "subject-id" -compact -offset indent +.It subject +defines the kind of entity the rule applies to. +It can be either +.Sy process , +.Sy user , +.Sy loginclass , +or +.Sy jail . +.It subject-id +identifies the +.Em subject . +It can be a process ID, user name, numerical user ID, login class name from +.Xr login.conf 5 , or jail name. -.Pp -Resource identifies the resource the rule controls. -.Pp -Action defines what will happen when a process exceeds the allowed amount. -.Pp -Amount defines how much of the resource a process can use before -the defined action triggers. -.Pp -The per field defines what entity the amount gets accounted for. +.It resource +identifies the resource the rule controls. +See the +.Sx RESOURCES +section below for details. +.It action +defines what will happen when a process exceeds the allowed +.Em amount . +See the +.Sx ACTIONS +section below for details. +.It amount +defines how much of the resource a process can use before +the defined +.Em action +triggers. +Resources which limit bytes may use prefixes from +.Xr expand_number 3 . +.It per +defines what entity the +.Em amount +gets accounted for. For example, rule "loginclass:users:vmem:deny=100M/process" means that each process of any user belonging to login class "users" may allocate up to 100MB of virtual memory. @@ -114,58 +153,86 @@ by all the processes of that user will n Rule "loginclass:users:vmem:deny=100M/loginclass" would mean that the sum of virtual memory allocated by all processes of all users belonging to that login class will not exceed 100MB. +.El .Pp -Valid rule has all those fields specified, except for the per, which defaults -to the value of subject. -.Pp -A filter is a rule for which one of more fields other than per is left empty. +A valid rule has all those fields specified, except for +.Em per , +which defaults +to the value of +.Em subject . +.Pp +A filter is a rule for which one of more fields other than +.Em per +is left empty. For example, a filter that matches every rule could be written as ":::=/", or, in short, ":". A filter that matches all the login classes would be "loginclass:". -A filter that matches all defined rules for maxproc resource would be +A filter that matches all defined rules for +.Sy maxproc +resource would be "::maxproc". +.Sh SUBJECTS +.Bl -column -offset 3n "pseudoterminals" ".Sy username or numerical User ID" +.It Em subject Ta Em subject-id +.It Sy process Ta numerical Process ID +.It Sy user Ta user name or numerical User ID +.It Sy loginclass Ta login class from +.Xr login.conf 5 +.It Sy jail Ta jail name +.El .Sh RESOURCES .Bl -column -offset 3n "pseudoterminals" -.It cputime Ta "CPU time, in seconds" -.It datasize Ta "data size, in bytes" -.It stacksize Ta "stack size, in bytes" -.It coredumpsize Ta "core dump size, in bytes" -.It memoryuse Ta "resident set size, in bytes" -.It memorylocked Ta "locked memory, in bytes" -.It maxproc Ta "number of processes" -.It openfiles Ta "file descriptor table size" -.It vmemoryuse Ta "address space limit, in bytes" -.It pseudoterminals Ta "number of PTYs" -.It swapuse Ta "swap usage, in bytes" -.It nthr Ta "number of threads" -.It msgqqueued Ta "number of queued SysV messages" -.It msgqsize Ta "SysV message queue size, in bytes" -.It nmsgq Ta "number of SysV message queues" -.It nsem Ta "number of SysV semaphores" -.It nsemop Ta "number of SysV semaphores modified in a single semop(2) call" -.It nshm Ta "number of SysV shared memory segments" -.It shmsize Ta "SysV shared memory size, in bytes" -.It wallclock Ta "wallclock time, in seconds" -.It pcpu Ta "%CPU, in percents of a single CPU core" +.It Em resource +.It Sy cputime Ta "CPU time, in seconds" +.It Sy datasize Ta "data size, in bytes" +.It Sy stacksize Ta "stack size, in bytes" +.It Sy coredumpsize Ta "core dump size, in bytes" +.It Sy memoryuse Ta "resident set size, in bytes" +.It Sy memorylocked Ta "locked memory, in bytes" +.It Sy maxproc Ta "number of processes" +.It Sy openfiles Ta "file descriptor table size" +.It Sy vmemoryuse Ta "address space limit, in bytes" +.It Sy pseudoterminals Ta "number of PTYs" +.It Sy swapuse Ta "swap usage, in bytes" +.It Sy nthr Ta "number of threads" +.It Sy msgqqueued Ta "number of queued SysV messages" +.It Sy msgqsize Ta "SysV message queue size, in bytes" +.It Sy nmsgq Ta "number of SysV message queues" +.It Sy nsem Ta "number of SysV semaphores" +.It Sy nsemop Ta "number of SysV semaphores modified in a single semop(2) call" +.It Sy nshm Ta "number of SysV shared memory segments" +.It Sy shmsize Ta "SysV shared memory size, in bytes" +.It Sy wallclock Ta "wallclock time, in seconds" +.It Sy pcpu Ta "%CPU, in percents of a single CPU core" .El .Sh ACTIONS .Bl -column -offset 3n "pseudoterminals" -.It deny Ta "deny the allocation; not supported for cpu and wallclock" -.It log Ta "log a warning to the console" -.It devctl Ta "send notification to" +.It Em action +.It Sy deny Ta deny the allocation; not supported for +.Sy cpu +and +.Sy wallclock +.It Sy log Ta "log a warning to the console" +.It Sy devctl Ta "send notification to" .Xr devd 8 -.It "sig* e.g. sigterm; send a signal to the offending process" -.El -.Pp +using +.Sy system += "RCTL", +.Sy subsystem += "rule", +.Sy type += "matched" +.It sig* e.g. +.Sy sigterm ; +send a signal to the offending process. See .Xr signal 3 -for a list of supported signals. +for a list of supported signals +.El .Pp Not all actions are supported for all resources. -Attempt to add rule with action not supported by a given resource will result -in error. -.Pp -Note that limiting RSS may kill the machine due to thrashing. +Attempting to add a rule with an action not supported by a given resource will +result in error. .Sh EXIT STATUS .Ex -std .Sh EXAMPLES @@ -180,6 +247,15 @@ Display resource usage information for j .Pp Display all the rules applicable to process with PID 512: .Dl Nm Fl l Ar process:512 +.Pp +Display all rules: +.Dl Nm +.Pp +Display all rules matching user "joe": +.Dl Nm Ar user:joe +.Pp +Display all rules matching login classes: +.Dl Nm Ar loginclass: .Sh SEE ALSO .Xr rctl.conf 5 .Sh HISTORY @@ -193,3 +269,7 @@ The .Nm command was written by .An Edward Tomasz Napierala Aq trasz@FreeBSD.org . +.Sh BUGS +Limiting +.Sy memoryuse +may kill the machine due to thrashing. From owner-svn-src-stable@FreeBSD.ORG Sun Feb 23 20:13:01 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E6776C4A; Sun, 23 Feb 2014 20:13:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D0E3E1169; Sun, 23 Feb 2014 20:13:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1NKD1Tl009375; Sun, 23 Feb 2014 20:13:01 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1NKD1ps009372; Sun, 23 Feb 2014 20:13:01 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402232013.s1NKD1ps009372@svn.freebsd.org> From: Christian Brueffer Date: Sun, 23 Feb 2014 20:13:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262386 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2014 20:13:02 -0000 Author: brueffer Date: Sun Feb 23 20:13:01 2014 New Revision: 262386 URL: http://svnweb.freebsd.org/changeset/base/262386 Log: MFC: r261549 Add a manpage for the urndis driver. Obtained from: OpenBSD Added: stable/10/share/man/man4/urndis.4 - copied unchanged from r261549, head/share/man/man4/urndis.4 Modified: stable/10/share/man/man4/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Sun Feb 23 20:07:30 2014 (r262385) +++ stable/10/share/man/man4/Makefile Sun Feb 23 20:13:01 2014 (r262386) @@ -524,6 +524,7 @@ MAN= aac.4 \ uplcom.4 \ ural.4 \ urio.4 \ + urndis.4 \ ${_urtw.4} \ urtwn.4 \ usb.4 \ @@ -711,6 +712,7 @@ MLINKS+=uath.4 if_uath.4 MLINKS+=udav.4 if_udav.4 MLINKS+=upgt.4 if_upgt.4 MLINKS+=ural.4 if_ural.4 +MLINKS+=urndis.4 if_urndis.4 MLINKS+=${_urtw.4} ${_if_urtw.4} MLINKS+=vge.4 if_vge.4 MLINKS+=vlan.4 if_vlan.4 Copied: stable/10/share/man/man4/urndis.4 (from r261549, head/share/man/man4/urndis.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man4/urndis.4 Sun Feb 23 20:13:01 2014 (r262386, copy of r261549, head/share/man/man4/urndis.4) @@ -0,0 +1,97 @@ +.\" Copyright (c) 2010 Michael Knudsen +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" +.\" - Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" - 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 COPYRIGHT HOLDERS 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 +.\" COPYRIGHT HOLDERS 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. +.\" +.\" $OpenBSD: urndis.4,v 1.15 2013/07/16 16:05:49 schwarze Exp $ +.\" +.\" $FreeBSD$ +.\" +.Dd February 6, 2014 +.Dt URNDIS 4 +.Os +.Sh NAME +.Nm urndis +.Nd USB Remote NDIS Ethernet device +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device ehci" +.Cd "device uhci" +.Cd "device ohci" +.Cd "device xhci" +.Cd "device usb" +.Cd "device urndis" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_urndis_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides Ethernet access over Remote NDIS (RNDIS), +allowing mobile devices such as phones and tablets to provide network access. +It is often referred to as USB tethering, +and in most cases must be explicitly enabled on the device. +.Pp +.Nm +should work with any USB RNDIS devices, +such as those commonly found on Android devices. +It does not support different media types or options. +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh SEE ALSO +.Xr arp 4 , +.Xr netintro 4 , +.Xr usb 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Ox 4.7 . +The first +.Fx +release to include it was +.Fx 10.1 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Jonathan Armani Aq Mt armani@openbsd.org , +.An Michael Knudsen Aq Mt mk@openbsd.org , +and +.An Fabien Romano Aq Mt fabien@openbsd.org . +It was ported to +.Fx +by +.An Hans Petter Selasky Aq Mt hps@FreeBSD.org . From owner-svn-src-stable@FreeBSD.ORG Sun Feb 23 20:14:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5CE7ED86; Sun, 23 Feb 2014 20:14:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 47CD31177; Sun, 23 Feb 2014 20:14:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1NKEduQ009633; Sun, 23 Feb 2014 20:14:39 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1NKEc78009630; Sun, 23 Feb 2014 20:14:38 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402232014.s1NKEc78009630@svn.freebsd.org> From: Christian Brueffer Date: Sun, 23 Feb 2014 20:14:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r262387 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2014 20:14:39 -0000 Author: brueffer Date: Sun Feb 23 20:14:38 2014 New Revision: 262387 URL: http://svnweb.freebsd.org/changeset/base/262387 Log: MFC: r261549 Add a manpage for the urndis driver. Obtained from: OpenBSD Added: stable/9/share/man/man4/urndis.4 - copied unchanged from r261549, head/share/man/man4/urndis.4 Modified: stable/9/share/man/man4/Makefile Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/Makefile ============================================================================== --- stable/9/share/man/man4/Makefile Sun Feb 23 20:13:01 2014 (r262386) +++ stable/9/share/man/man4/Makefile Sun Feb 23 20:14:38 2014 (r262387) @@ -506,6 +506,7 @@ MAN= aac.4 \ uplcom.4 \ ural.4 \ urio.4 \ + urndis.4 \ ${_urtw.4} \ usb.4 \ usb_quirk.4 \ @@ -686,6 +687,7 @@ MLINKS+=uath.4 if_uath.4 MLINKS+=udav.4 if_udav.4 MLINKS+=upgt.4 if_upgt.4 MLINKS+=ural.4 if_ural.4 +MLINKS+=urndis.4 if_urndis.4 MLINKS+=${_urtw.4} ${_if_urtw.4} MLINKS+=vge.4 if_vge.4 MLINKS+=vlan.4 if_vlan.4 Copied: stable/9/share/man/man4/urndis.4 (from r261549, head/share/man/man4/urndis.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/share/man/man4/urndis.4 Sun Feb 23 20:14:38 2014 (r262387, copy of r261549, head/share/man/man4/urndis.4) @@ -0,0 +1,97 @@ +.\" Copyright (c) 2010 Michael Knudsen +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" +.\" - Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" - 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 COPYRIGHT HOLDERS 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 +.\" COPYRIGHT HOLDERS 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. +.\" +.\" $OpenBSD: urndis.4,v 1.15 2013/07/16 16:05:49 schwarze Exp $ +.\" +.\" $FreeBSD$ +.\" +.Dd February 6, 2014 +.Dt URNDIS 4 +.Os +.Sh NAME +.Nm urndis +.Nd USB Remote NDIS Ethernet device +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device ehci" +.Cd "device uhci" +.Cd "device ohci" +.Cd "device xhci" +.Cd "device usb" +.Cd "device urndis" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_urndis_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides Ethernet access over Remote NDIS (RNDIS), +allowing mobile devices such as phones and tablets to provide network access. +It is often referred to as USB tethering, +and in most cases must be explicitly enabled on the device. +.Pp +.Nm +should work with any USB RNDIS devices, +such as those commonly found on Android devices. +It does not support different media types or options. +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh SEE ALSO +.Xr arp 4 , +.Xr netintro 4 , +.Xr usb 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Ox 4.7 . +The first +.Fx +release to include it was +.Fx 10.1 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Jonathan Armani Aq Mt armani@openbsd.org , +.An Michael Knudsen Aq Mt mk@openbsd.org , +and +.An Fabien Romano Aq Mt fabien@openbsd.org . +It was ported to +.Fx +by +.An Hans Petter Selasky Aq Mt hps@FreeBSD.org . From owner-svn-src-stable@FreeBSD.ORG Sun Feb 23 21:03:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 113B6D81; Sun, 23 Feb 2014 21:03:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EF3A915BD; Sun, 23 Feb 2014 21:03:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1NL3WXA029824; Sun, 23 Feb 2014 21:03:32 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1NL3W3b029823; Sun, 23 Feb 2014 21:03:32 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201402232103.s1NL3W3b029823@svn.freebsd.org> From: Marius Strobl Date: Sun, 23 Feb 2014 21:03:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r262390 - stable/9/sys/pci X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2014 21:03:33 -0000 Author: marius Date: Sun Feb 23 21:03:32 2014 New Revision: 262390 URL: http://svnweb.freebsd.org/changeset/base/262390 Log: MFC: r261529 Try to make the style used here consistent. Modified: stable/9/sys/pci/if_rlreg.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/pci/if_rlreg.h ============================================================================== --- stable/9/sys/pci/if_rlreg.h Sun Feb 23 21:03:30 2014 (r262389) +++ stable/9/sys/pci/if_rlreg.h Sun Feb 23 21:03:32 2014 (r262390) @@ -163,7 +163,6 @@ #define RL_LOOPTEST_ON_CPLUS 0x00060000 /* Known revision codes. */ - #define RL_HWREV_8169 0x00000000 #define RL_HWREV_8169S 0x00800000 #define RL_HWREV_8110S 0x04000000 @@ -329,8 +328,8 @@ #define RL_RXSTAT_INDIV 0x00004000 #define RL_RXSTAT_MULTI 0x00008000 #define RL_RXSTAT_LENMASK 0xFFFF0000 +#define RL_RXSTAT_UNFINISHED 0x0000FFF0 /* DMA still in progress */ -#define RL_RXSTAT_UNFINISHED 0xFFF0 /* DMA still in progress */ /* * Command register. */ @@ -361,6 +360,7 @@ #define RL_PARA7C 0x7C #define RL_PARA7C_DEF 0xcb38de43 #define RL_PARA7C_RETUNE 0xfb38de03 + /* * EEPROM control register */ @@ -473,11 +473,9 @@ */ /* RL_DUMPSTATS_LO register */ - #define RL_DUMPSTATS_START 0x00000008 /* Transmit start register */ - #define RL_TXSTART_SWI 0x01 /* generate TX interrupt */ #define RL_TXSTART_START 0x40 /* start normal queue transmit */ #define RL_TXSTART_HPRIO_START 0x80 /* start hi prio queue transmit */ @@ -496,7 +494,6 @@ #define RL_BUSWIDTH_64BITS 0x08 /* C+ mode command register */ - #define RL_CPLUSCMD_TXENB 0x0001 /* enable C+ transmit mode */ #define RL_CPLUSCMD_RXENB 0x0002 /* enable C+ receive mode */ #define RL_CPLUSCMD_PCI_MRW 0x0008 /* enable PCI multi-read/write */ @@ -514,7 +511,6 @@ #define RL_CPLUSCMD_BIST_ENB 0x8000 /* 8168C/CP */ /* C+ early transmit threshold */ - #define RL_EARLYTXTHRESH_CNT 0x003F /* byte count times 8 */ /* Timer interrupt register */ @@ -528,7 +524,6 @@ /* * Gigabit PHY access register (8169 only) */ - #define RL_PHYAR_PHYDATA 0x0000FFFF #define RL_PHYAR_PHYREG 0x001F0000 #define RL_PHYAR_BUSY 0x80000000 @@ -559,7 +554,6 @@ * For reception, there's just one large buffer where the chip stores * all received packets. */ - #define RL_RX_BUF_SZ RL_RXBUF_64 #define RL_RXBUFLEN (1 << ((RL_RX_BUF_SZ >> 11) + 13)) #define RL_TX_LIST_CNT 4 @@ -642,11 +636,10 @@ struct rl_hwrev { /* * RX/TX descriptor definition. When large send mode is enabled, the - * lower 11 bits of the TX rl_cmd word are used to hold the MSS, and + * lower 11 bits of the TX rl_cmdstat word are used to hold the MSS, and * the checksum offload bits are disabled. The structure layout is * the same for RX and TX descriptors */ - struct rl_desc { uint32_t rl_cmdstat; uint32_t rl_vlanctl; @@ -679,7 +672,6 @@ struct rl_desc { * Error bits are valid only on the last descriptor of a frame * (i.e. RL_TDESC_CMD_EOF == 1) */ - #define RL_TDESC_STAT_COLCNT 0x000F0000 /* collision count */ #define RL_TDESC_STAT_EXCESSCOL 0x00100000 /* excessive collisions */ #define RL_TDESC_STAT_LINKFAIL 0x00200000 /* link faulure */ @@ -691,7 +683,6 @@ struct rl_desc { /* * RX descriptor cmd/vlan definitions */ - #define RL_RDESC_CMD_EOR 0x40000000 #define RL_RDESC_CMD_OWN 0x80000000 #define RL_RDESC_CMD_BUFLEN 0x00001FFF From owner-svn-src-stable@FreeBSD.ORG Sun Feb 23 21:03:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F526D80; Sun, 23 Feb 2014 21:03:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 570C315BC; Sun, 23 Feb 2014 21:03:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1NL3V4V029784; Sun, 23 Feb 2014 21:03:31 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1NL3VTk029783; Sun, 23 Feb 2014 21:03:31 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201402232103.s1NL3VTk029783@svn.freebsd.org> From: Marius Strobl Date: Sun, 23 Feb 2014 21:03:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262389 - stable/10/sys/pci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2014 21:03:31 -0000 Author: marius Date: Sun Feb 23 21:03:30 2014 New Revision: 262389 URL: http://svnweb.freebsd.org/changeset/base/262389 Log: MFC: r261529 Try to make the style used here consistent. Modified: stable/10/sys/pci/if_rlreg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/pci/if_rlreg.h ============================================================================== --- stable/10/sys/pci/if_rlreg.h Sun Feb 23 20:16:51 2014 (r262388) +++ stable/10/sys/pci/if_rlreg.h Sun Feb 23 21:03:30 2014 (r262389) @@ -163,7 +163,6 @@ #define RL_LOOPTEST_ON_CPLUS 0x00060000 /* Known revision codes. */ - #define RL_HWREV_8169 0x00000000 #define RL_HWREV_8169S 0x00800000 #define RL_HWREV_8110S 0x04000000 @@ -329,8 +328,8 @@ #define RL_RXSTAT_INDIV 0x00004000 #define RL_RXSTAT_MULTI 0x00008000 #define RL_RXSTAT_LENMASK 0xFFFF0000 +#define RL_RXSTAT_UNFINISHED 0x0000FFF0 /* DMA still in progress */ -#define RL_RXSTAT_UNFINISHED 0xFFF0 /* DMA still in progress */ /* * Command register. */ @@ -361,6 +360,7 @@ #define RL_PARA7C 0x7C #define RL_PARA7C_DEF 0xcb38de43 #define RL_PARA7C_RETUNE 0xfb38de03 + /* * EEPROM control register */ @@ -473,11 +473,9 @@ */ /* RL_DUMPSTATS_LO register */ - #define RL_DUMPSTATS_START 0x00000008 /* Transmit start register */ - #define RL_TXSTART_SWI 0x01 /* generate TX interrupt */ #define RL_TXSTART_START 0x40 /* start normal queue transmit */ #define RL_TXSTART_HPRIO_START 0x80 /* start hi prio queue transmit */ @@ -496,7 +494,6 @@ #define RL_BUSWIDTH_64BITS 0x08 /* C+ mode command register */ - #define RL_CPLUSCMD_TXENB 0x0001 /* enable C+ transmit mode */ #define RL_CPLUSCMD_RXENB 0x0002 /* enable C+ receive mode */ #define RL_CPLUSCMD_PCI_MRW 0x0008 /* enable PCI multi-read/write */ @@ -514,7 +511,6 @@ #define RL_CPLUSCMD_BIST_ENB 0x8000 /* 8168C/CP */ /* C+ early transmit threshold */ - #define RL_EARLYTXTHRESH_CNT 0x003F /* byte count times 8 */ /* Timer interrupt register */ @@ -528,7 +524,6 @@ /* * Gigabit PHY access register (8169 only) */ - #define RL_PHYAR_PHYDATA 0x0000FFFF #define RL_PHYAR_PHYREG 0x001F0000 #define RL_PHYAR_BUSY 0x80000000 @@ -559,7 +554,6 @@ * For reception, there's just one large buffer where the chip stores * all received packets. */ - #define RL_RX_BUF_SZ RL_RXBUF_64 #define RL_RXBUFLEN (1 << ((RL_RX_BUF_SZ >> 11) + 13)) #define RL_TX_LIST_CNT 4 @@ -642,11 +636,10 @@ struct rl_hwrev { /* * RX/TX descriptor definition. When large send mode is enabled, the - * lower 11 bits of the TX rl_cmd word are used to hold the MSS, and + * lower 11 bits of the TX rl_cmdstat word are used to hold the MSS, and * the checksum offload bits are disabled. The structure layout is * the same for RX and TX descriptors */ - struct rl_desc { uint32_t rl_cmdstat; uint32_t rl_vlanctl; @@ -679,7 +672,6 @@ struct rl_desc { * Error bits are valid only on the last descriptor of a frame * (i.e. RL_TDESC_CMD_EOF == 1) */ - #define RL_TDESC_STAT_COLCNT 0x000F0000 /* collision count */ #define RL_TDESC_STAT_EXCESSCOL 0x00100000 /* excessive collisions */ #define RL_TDESC_STAT_LINKFAIL 0x00200000 /* link faulure */ @@ -691,7 +683,6 @@ struct rl_desc { /* * RX descriptor cmd/vlan definitions */ - #define RL_RDESC_CMD_EOR 0x40000000 #define RL_RDESC_CMD_OWN 0x80000000 #define RL_RDESC_CMD_BUFLEN 0x00001FFF From owner-svn-src-stable@FreeBSD.ORG Sun Feb 23 21:08:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BBAC2189; Sun, 23 Feb 2014 21:08:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 97A2415DC; Sun, 23 Feb 2014 21:08:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1NL8g2d030665; Sun, 23 Feb 2014 21:08:42 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1NL8gKv030663; Sun, 23 Feb 2014 21:08:42 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201402232108.s1NL8gKv030663@svn.freebsd.org> From: Marius Strobl Date: Sun, 23 Feb 2014 21:08:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262391 - in stable/10/sys: dev/re pci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2014 21:08:42 -0000 Author: marius Date: Sun Feb 23 21:08:41 2014 New Revision: 262391 URL: http://svnweb.freebsd.org/changeset/base/262391 Log: MFC: r261531 - Implement the RX EARLYOFF and RXDV GATED bits as done by RealTek's Linux driver as iof version 8.037.00 for RTL8168{E-VL,EP,F,G,GU} and RTL8411B. This makes reception of packets work with the RTL8168G (HW rev. 0x4c000000) in my Shuttle DS47. - Consistently use RL_MSI_MESSAGES. In joint forces with: yongari Modified: stable/10/sys/dev/re/if_re.c stable/10/sys/pci/if_rlreg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/re/if_re.c ============================================================================== --- stable/10/sys/dev/re/if_re.c Sun Feb 23 21:03:32 2014 (r262390) +++ stable/10/sys/dev/re/if_re.c Sun Feb 23 21:08:41 2014 (r262391) @@ -655,6 +655,10 @@ re_set_rxmode(struct rl_softc *sc) ifp = sc->rl_ifp; rxfilt = RL_RXCFG_CONFIG | RL_RXCFG_RX_INDIV | RL_RXCFG_RX_BROAD; + if ((sc->rl_flags & RL_FLAG_EARLYOFF) != 0) + rxfilt |= RL_RXCFG_EARLYOFF; + else if ((sc->rl_flags & RL_FLAG_EARLYOFFV2) != 0) + rxfilt |= RL_RXCFG_EARLYOFFV2; if (ifp->if_flags & (IFF_ALLMULTI | IFF_PROMISC)) { if (ifp->if_flags & IFF_PROMISC) @@ -1264,7 +1268,7 @@ re_attach(device_t dev) msic = 0; /* Prefer MSI-X to MSI. */ if (msixc > 0) { - msixc = 1; + msixc = RL_MSI_MESSAGES; rid = PCIR_BAR(4); sc->rl_res_pba = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); @@ -1274,7 +1278,7 @@ re_attach(device_t dev) } if (sc->rl_res_pba != NULL && pci_alloc_msix(dev, &msixc) == 0) { - if (msixc == 1) { + if (msixc == RL_MSI_MESSAGES) { device_printf(dev, "Using %d MSI-X message\n", msixc); sc->rl_flags |= RL_FLAG_MSIX; @@ -1291,7 +1295,7 @@ re_attach(device_t dev) } /* Prefer MSI to INTx. */ if (msixc == 0 && msic > 0) { - msic = 1; + msic = RL_MSI_MESSAGES; if (pci_alloc_msi(dev, &msic) == 0) { if (msic == RL_MSI_MESSAGES) { device_printf(dev, "Using %d MSI message\n", @@ -1462,16 +1466,24 @@ re_attach(device_t dev) RL_FLAG_WOL_MANLINK; break; case RL_HWREV_8168E_VL: - case RL_HWREV_8168EP: case RL_HWREV_8168F: - case RL_HWREV_8168G: + sc->rl_flags |= RL_FLAG_EARLYOFF; + /* FALLTHROUGH */ case RL_HWREV_8411: - case RL_HWREV_8411B: sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD | RL_FLAG_JUMBOV2 | RL_FLAG_CMDSTOP_WAIT_TXQ | RL_FLAG_WOL_MANLINK; break; + case RL_HWREV_8168EP: + case RL_HWREV_8168G: + case RL_HWREV_8411B: + sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PAR | + RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_CMDSTOP | + RL_FLAG_AUTOPAD | RL_FLAG_JUMBOV2 | + RL_FLAG_CMDSTOP_WAIT_TXQ | RL_FLAG_WOL_MANLINK | + RL_FLAG_EARLYOFFV2 | RL_FLAG_RXDV_GATED; + break; case RL_HWREV_8168GU: if (pci_get_device(dev) == RT_DEVICEID_8101E) { /* RTL8106EUS */ @@ -1481,7 +1493,8 @@ re_attach(device_t dev) sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_CMDSTOP | - RL_FLAG_AUTOPAD | RL_FLAG_CMDSTOP_WAIT_TXQ; + RL_FLAG_AUTOPAD | RL_FLAG_CMDSTOP_WAIT_TXQ | + RL_FLAG_EARLYOFFV2 | RL_FLAG_RXDV_GATED; break; case RL_HWREV_8169_8110SB: case RL_HWREV_8169_8110SBL: @@ -3169,6 +3182,10 @@ re_init_locked(struct rl_softc *sc) CSR_WRITE_4(sc, RL_TXLIST_ADDR_LO, RL_ADDR_LO(sc->rl_ldata.rl_tx_list_addr)); + if ((sc->rl_flags & RL_FLAG_RXDV_GATED) != 0) + CSR_WRITE_4(sc, RL_MISC, CSR_READ_4(sc, RL_MISC) & + ~0x00080000); + /* * Enable transmit and receive. */ Modified: stable/10/sys/pci/if_rlreg.h ============================================================================== --- stable/10/sys/pci/if_rlreg.h Sun Feb 23 21:03:32 2014 (r262390) +++ stable/10/sys/pci/if_rlreg.h Sun Feb 23 21:08:41 2014 (r262391) @@ -145,6 +145,7 @@ #define RL_PMCH 0x006F /* 8 bits */ #define RL_MAXRXPKTLEN 0x00DA /* 16 bits, chip multiplies by 8 */ #define RL_INTRMOD 0x00E2 /* 16 bits */ +#define RL_MISC 0x00F0 /* * TX config register bits @@ -286,8 +287,10 @@ #define RL_RXCFG_RX_RUNT 0x00000010 #define RL_RXCFG_RX_ERRPKT 0x00000020 #define RL_RXCFG_WRAP 0x00000080 +#define RL_RXCFG_EARLYOFFV2 0x00000800 #define RL_RXCFG_MAXDMA 0x00000700 #define RL_RXCFG_BUFSZ 0x00001800 +#define RL_RXCFG_EARLYOFF 0x00003800 #define RL_RXCFG_FIFOTHRESH 0x0000E000 #define RL_RXCFG_EARLYTHRESH 0x07000000 @@ -926,6 +929,9 @@ struct rl_softc { #define RL_FLAG_WAIT_TXPOLL 0x00004000 #define RL_FLAG_CMDSTOP_WAIT_TXQ 0x00008000 #define RL_FLAG_WOL_MANLINK 0x00010000 +#define RL_FLAG_EARLYOFF 0x00020000 +#define RL_FLAG_EARLYOFFV2 0x00040000 +#define RL_FLAG_RXDV_GATED 0x00080000 #define RL_FLAG_PCIE 0x40000000 #define RL_FLAG_LINK 0x80000000 }; From owner-svn-src-stable@FreeBSD.ORG Sun Feb 23 21:08:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 15C81261; Sun, 23 Feb 2014 21:08:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EA8B015DD; Sun, 23 Feb 2014 21:08:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1NL8m4g030717; Sun, 23 Feb 2014 21:08:48 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1NL8mM9030715; Sun, 23 Feb 2014 21:08:48 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201402232108.s1NL8mM9030715@svn.freebsd.org> From: Marius Strobl Date: Sun, 23 Feb 2014 21:08:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r262392 - in stable/9/sys: dev/re pci X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2014 21:08:49 -0000 Author: marius Date: Sun Feb 23 21:08:48 2014 New Revision: 262392 URL: http://svnweb.freebsd.org/changeset/base/262392 Log: MFC: r261531 - Implement the RX EARLYOFF and RXDV GATED bits as done by RealTek's Linux driver as of version 8.037.00 for RTL8168{E-VL,EP,F,G,GU} and RTL8411B. This makes reception of packets work with the RTL8168G (HW rev. 0x4c000000) in my Shuttle DS47. - Consistently use RL_MSI_MESSAGES. In joint forces with: yongari Modified: stable/9/sys/dev/re/if_re.c stable/9/sys/pci/if_rlreg.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/re/if_re.c ============================================================================== --- stable/9/sys/dev/re/if_re.c Sun Feb 23 21:08:41 2014 (r262391) +++ stable/9/sys/dev/re/if_re.c Sun Feb 23 21:08:48 2014 (r262392) @@ -655,6 +655,10 @@ re_set_rxmode(struct rl_softc *sc) ifp = sc->rl_ifp; rxfilt = RL_RXCFG_CONFIG | RL_RXCFG_RX_INDIV | RL_RXCFG_RX_BROAD; + if ((sc->rl_flags & RL_FLAG_EARLYOFF) != 0) + rxfilt |= RL_RXCFG_EARLYOFF; + else if ((sc->rl_flags & RL_FLAG_EARLYOFFV2) != 0) + rxfilt |= RL_RXCFG_EARLYOFFV2; if (ifp->if_flags & (IFF_ALLMULTI | IFF_PROMISC)) { if (ifp->if_flags & IFF_PROMISC) @@ -1264,7 +1268,7 @@ re_attach(device_t dev) msic = 0; /* Prefer MSI-X to MSI. */ if (msixc > 0) { - msixc = 1; + msixc = RL_MSI_MESSAGES; rid = PCIR_BAR(4); sc->rl_res_pba = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); @@ -1274,7 +1278,7 @@ re_attach(device_t dev) } if (sc->rl_res_pba != NULL && pci_alloc_msix(dev, &msixc) == 0) { - if (msixc == 1) { + if (msixc == RL_MSI_MESSAGES) { device_printf(dev, "Using %d MSI-X message\n", msixc); sc->rl_flags |= RL_FLAG_MSIX; @@ -1291,7 +1295,7 @@ re_attach(device_t dev) } /* Prefer MSI to INTx. */ if (msixc == 0 && msic > 0) { - msic = 1; + msic = RL_MSI_MESSAGES; if (pci_alloc_msi(dev, &msic) == 0) { if (msic == RL_MSI_MESSAGES) { device_printf(dev, "Using %d MSI message\n", @@ -1462,16 +1466,24 @@ re_attach(device_t dev) RL_FLAG_WOL_MANLINK; break; case RL_HWREV_8168E_VL: - case RL_HWREV_8168EP: case RL_HWREV_8168F: - case RL_HWREV_8168G: + sc->rl_flags |= RL_FLAG_EARLYOFF; + /* FALLTHROUGH */ case RL_HWREV_8411: - case RL_HWREV_8411B: sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD | RL_FLAG_JUMBOV2 | RL_FLAG_CMDSTOP_WAIT_TXQ | RL_FLAG_WOL_MANLINK; break; + case RL_HWREV_8168EP: + case RL_HWREV_8168G: + case RL_HWREV_8411B: + sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PAR | + RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_CMDSTOP | + RL_FLAG_AUTOPAD | RL_FLAG_JUMBOV2 | + RL_FLAG_CMDSTOP_WAIT_TXQ | RL_FLAG_WOL_MANLINK | + RL_FLAG_EARLYOFFV2 | RL_FLAG_RXDV_GATED; + break; case RL_HWREV_8168GU: if (pci_get_device(dev) == RT_DEVICEID_8101E) { /* RTL8106EUS */ @@ -1481,7 +1493,8 @@ re_attach(device_t dev) sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_CMDSTOP | - RL_FLAG_AUTOPAD | RL_FLAG_CMDSTOP_WAIT_TXQ; + RL_FLAG_AUTOPAD | RL_FLAG_CMDSTOP_WAIT_TXQ | + RL_FLAG_EARLYOFFV2 | RL_FLAG_RXDV_GATED; break; case RL_HWREV_8169_8110SB: case RL_HWREV_8169_8110SBL: @@ -3169,6 +3182,10 @@ re_init_locked(struct rl_softc *sc) CSR_WRITE_4(sc, RL_TXLIST_ADDR_LO, RL_ADDR_LO(sc->rl_ldata.rl_tx_list_addr)); + if ((sc->rl_flags & RL_FLAG_RXDV_GATED) != 0) + CSR_WRITE_4(sc, RL_MISC, CSR_READ_4(sc, RL_MISC) & + ~0x00080000); + /* * Enable transmit and receive. */ Modified: stable/9/sys/pci/if_rlreg.h ============================================================================== --- stable/9/sys/pci/if_rlreg.h Sun Feb 23 21:08:41 2014 (r262391) +++ stable/9/sys/pci/if_rlreg.h Sun Feb 23 21:08:48 2014 (r262392) @@ -145,6 +145,7 @@ #define RL_PMCH 0x006F /* 8 bits */ #define RL_MAXRXPKTLEN 0x00DA /* 16 bits, chip multiplies by 8 */ #define RL_INTRMOD 0x00E2 /* 16 bits */ +#define RL_MISC 0x00F0 /* * TX config register bits @@ -286,8 +287,10 @@ #define RL_RXCFG_RX_RUNT 0x00000010 #define RL_RXCFG_RX_ERRPKT 0x00000020 #define RL_RXCFG_WRAP 0x00000080 +#define RL_RXCFG_EARLYOFFV2 0x00000800 #define RL_RXCFG_MAXDMA 0x00000700 #define RL_RXCFG_BUFSZ 0x00001800 +#define RL_RXCFG_EARLYOFF 0x00003800 #define RL_RXCFG_FIFOTHRESH 0x0000E000 #define RL_RXCFG_EARLYTHRESH 0x07000000 @@ -926,6 +929,9 @@ struct rl_softc { #define RL_FLAG_WAIT_TXPOLL 0x00004000 #define RL_FLAG_CMDSTOP_WAIT_TXQ 0x00008000 #define RL_FLAG_WOL_MANLINK 0x00010000 +#define RL_FLAG_EARLYOFF 0x00020000 +#define RL_FLAG_EARLYOFFV2 0x00040000 +#define RL_FLAG_RXDV_GATED 0x00080000 #define RL_FLAG_PCIE 0x40000000 #define RL_FLAG_LINK 0x80000000 }; From owner-svn-src-stable@FreeBSD.ORG Mon Feb 24 08:18:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5EECC6D; Mon, 24 Feb 2014 08:18:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2F73015E0; Mon, 24 Feb 2014 08:18:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1O8ICi5001351; Mon, 24 Feb 2014 08:18:12 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1O8IBop001345; Mon, 24 Feb 2014 08:18:11 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402240818.s1O8IBop001345@svn.freebsd.org> From: Christian Brueffer Date: Mon, 24 Feb 2014 08:18:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262434 - in stable/10/libexec: fingerd rbootd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2014 08:18:12 -0000 Author: brueffer Date: Mon Feb 24 08:18:11 2014 New Revision: 262434 URL: http://svnweb.freebsd.org/changeset/base/262434 Log: MFC: r262135 Add $FreeBSD$. Modified: stable/10/libexec/fingerd/pathnames.h stable/10/libexec/rbootd/pathnames.h stable/10/libexec/rbootd/rmp.h stable/10/libexec/rbootd/rmp_var.h Directory Properties: stable/10/ (props changed) Modified: stable/10/libexec/fingerd/pathnames.h ============================================================================== --- stable/10/libexec/fingerd/pathnames.h Mon Feb 24 05:55:00 2014 (r262433) +++ stable/10/libexec/fingerd/pathnames.h Mon Feb 24 08:18:11 2014 (r262434) @@ -31,6 +31,8 @@ * SUCH DAMAGE. * * @(#)pathnames.h 8.1 (Berkeley) 6/4/93 + * + * $FreeBSD$ */ #define _PATH_FINGER "/usr/bin/finger" Modified: stable/10/libexec/rbootd/pathnames.h ============================================================================== --- stable/10/libexec/rbootd/pathnames.h Mon Feb 24 05:55:00 2014 (r262433) +++ stable/10/libexec/rbootd/pathnames.h Mon Feb 24 08:18:11 2014 (r262434) @@ -42,6 +42,8 @@ * * From: Utah Hdr: pathnames.h 3.1 92/07/06 * Author: Jeff Forys, University of Utah CSS + * + * $FreeBSD$ */ #define _PATH_BPF "/dev/bpf%d" Modified: stable/10/libexec/rbootd/rmp.h ============================================================================== --- stable/10/libexec/rbootd/rmp.h Mon Feb 24 05:55:00 2014 (r262433) +++ stable/10/libexec/rbootd/rmp.h Mon Feb 24 08:18:11 2014 (r262434) @@ -42,6 +42,8 @@ * * From: Utah Hdr: rmp.h 3.1 92/07/06 * Author: Jeff Forys, University of Utah CSS + * + * $FreeBSD$ */ /* Modified: stable/10/libexec/rbootd/rmp_var.h ============================================================================== --- stable/10/libexec/rbootd/rmp_var.h Mon Feb 24 05:55:00 2014 (r262433) +++ stable/10/libexec/rbootd/rmp_var.h Mon Feb 24 08:18:11 2014 (r262434) @@ -42,6 +42,8 @@ * * from: Utah Hdr: rmp_var.h 3.1 92/07/06 * Author: Jeff Forys, University of Utah CSS + * + * $FreeBSD$ */ /* From owner-svn-src-stable@FreeBSD.ORG Mon Feb 24 08:22:01 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A527E1DE; Mon, 24 Feb 2014 08:22:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8D4E6165D; Mon, 24 Feb 2014 08:22:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1O8M1DN004675; Mon, 24 Feb 2014 08:22:01 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1O8Ln0K004543; Mon, 24 Feb 2014 08:21:49 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402240821.s1O8Ln0K004543@svn.freebsd.org> From: Christian Brueffer Date: Mon, 24 Feb 2014 08:21:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262435 - in stable/10/libexec: bootpd comsat fingerd ftpd getty mknetid rbootd revnetgroup rlogind rpc.rstatd rpc.rusersd rpc.rwalld rshd rtld-elf talkd tftpd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2014 08:22:01 -0000 Author: brueffer Date: Mon Feb 24 08:21:49 2014 New Revision: 262435 URL: http://svnweb.freebsd.org/changeset/base/262435 Log: MFC: r262136 Remove the 3rd clause ("advertising clause") of the BSD license as permitted by the University of Berkeley on July 22, 1999. Reviewed by: imp Modified: stable/10/libexec/bootpd/rtmsg.c stable/10/libexec/comsat/comsat.8 stable/10/libexec/comsat/comsat.c stable/10/libexec/fingerd/fingerd.8 stable/10/libexec/fingerd/fingerd.c stable/10/libexec/fingerd/pathnames.h stable/10/libexec/ftpd/extern.h stable/10/libexec/ftpd/ftpcmd.y stable/10/libexec/ftpd/ftpd.8 stable/10/libexec/ftpd/ftpd.c stable/10/libexec/ftpd/logwtmp.c stable/10/libexec/ftpd/pathnames.h stable/10/libexec/ftpd/popen.c stable/10/libexec/getty/extern.h stable/10/libexec/getty/getty.8 stable/10/libexec/getty/gettytab.5 stable/10/libexec/getty/gettytab.h stable/10/libexec/getty/init.c stable/10/libexec/getty/main.c stable/10/libexec/getty/pathnames.h stable/10/libexec/getty/subr.c stable/10/libexec/getty/ttys.5 stable/10/libexec/mknetid/parse_group.c stable/10/libexec/rbootd/bpf.c stable/10/libexec/rbootd/conf.c stable/10/libexec/rbootd/defs.h stable/10/libexec/rbootd/parseconf.c stable/10/libexec/rbootd/pathnames.h stable/10/libexec/rbootd/rbootd.8 stable/10/libexec/rbootd/rbootd.c stable/10/libexec/rbootd/rmp.h stable/10/libexec/rbootd/rmp_var.h stable/10/libexec/rbootd/rmpproto.c stable/10/libexec/rbootd/utils.c stable/10/libexec/revnetgroup/parse_netgroup.c stable/10/libexec/rlogind/rlogind.8 stable/10/libexec/rlogind/rlogind.c stable/10/libexec/rpc.rstatd/rpc.rstatd.8 stable/10/libexec/rpc.rstatd/rstatd.c stable/10/libexec/rpc.rusersd/extern.h stable/10/libexec/rpc.rusersd/rpc.rusersd.8 stable/10/libexec/rpc.rusersd/rusers_proc.c stable/10/libexec/rpc.rusersd/rusersd.c stable/10/libexec/rpc.rwalld/rpc.rwalld.8 stable/10/libexec/rshd/rshd.8 stable/10/libexec/rshd/rshd.c stable/10/libexec/rtld-elf/malloc.c stable/10/libexec/talkd/announce.c stable/10/libexec/talkd/print.c stable/10/libexec/talkd/process.c stable/10/libexec/talkd/table.c stable/10/libexec/talkd/talkd.8 stable/10/libexec/talkd/talkd.c stable/10/libexec/tftpd/tftpd.8 stable/10/libexec/tftpd/tftpd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/libexec/bootpd/rtmsg.c ============================================================================== --- stable/10/libexec/bootpd/rtmsg.c Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/bootpd/rtmsg.c Mon Feb 24 08:21:49 2014 (r262435) @@ -16,11 +16,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/comsat/comsat.8 ============================================================================== --- stable/10/libexec/comsat/comsat.8 Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/comsat/comsat.8 Mon Feb 24 08:21:49 2014 (r262435) @@ -9,11 +9,7 @@ .\" 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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors +.\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" Modified: stable/10/libexec/comsat/comsat.c ============================================================================== --- stable/10/libexec/comsat/comsat.c Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/comsat/comsat.c Mon Feb 24 08:21:49 2014 (r262435) @@ -10,11 +10,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/fingerd/fingerd.8 ============================================================================== --- stable/10/libexec/fingerd/fingerd.8 Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/fingerd/fingerd.8 Mon Feb 24 08:21:49 2014 (r262435) @@ -9,11 +9,7 @@ .\" 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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors +.\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" Modified: stable/10/libexec/fingerd/fingerd.c ============================================================================== --- stable/10/libexec/fingerd/fingerd.c Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/fingerd/fingerd.c Mon Feb 24 08:21:49 2014 (r262435) @@ -10,11 +10,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/fingerd/pathnames.h ============================================================================== --- stable/10/libexec/fingerd/pathnames.h Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/fingerd/pathnames.h Mon Feb 24 08:21:49 2014 (r262435) @@ -10,11 +10,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/ftpd/extern.h ============================================================================== --- stable/10/libexec/ftpd/extern.h Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/ftpd/extern.h Mon Feb 24 08:21:49 2014 (r262435) @@ -10,11 +10,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/ftpd/ftpcmd.y ============================================================================== --- stable/10/libexec/ftpd/ftpcmd.y Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/ftpd/ftpcmd.y Mon Feb 24 08:21:49 2014 (r262435) @@ -10,11 +10,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/ftpd/ftpd.8 ============================================================================== --- stable/10/libexec/ftpd/ftpd.8 Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/ftpd/ftpd.8 Mon Feb 24 08:21:49 2014 (r262435) @@ -9,11 +9,7 @@ .\" 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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors +.\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" Modified: stable/10/libexec/ftpd/ftpd.c ============================================================================== --- stable/10/libexec/ftpd/ftpd.c Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/ftpd/ftpd.c Mon Feb 24 08:21:49 2014 (r262435) @@ -10,11 +10,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/ftpd/logwtmp.c ============================================================================== --- stable/10/libexec/ftpd/logwtmp.c Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/ftpd/logwtmp.c Mon Feb 24 08:21:49 2014 (r262435) @@ -10,11 +10,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/ftpd/pathnames.h ============================================================================== --- stable/10/libexec/ftpd/pathnames.h Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/ftpd/pathnames.h Mon Feb 24 08:21:49 2014 (r262435) @@ -10,11 +10,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/ftpd/popen.c ============================================================================== --- stable/10/libexec/ftpd/popen.c Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/ftpd/popen.c Mon Feb 24 08:21:49 2014 (r262435) @@ -13,11 +13,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/getty/extern.h ============================================================================== --- stable/10/libexec/getty/extern.h Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/getty/extern.h Mon Feb 24 08:21:49 2014 (r262435) @@ -10,11 +10,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/getty/getty.8 ============================================================================== --- stable/10/libexec/getty/getty.8 Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/getty/getty.8 Mon Feb 24 08:21:49 2014 (r262435) @@ -9,11 +9,7 @@ .\" 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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors +.\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" Modified: stable/10/libexec/getty/gettytab.5 ============================================================================== --- stable/10/libexec/getty/gettytab.5 Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/getty/gettytab.5 Mon Feb 24 08:21:49 2014 (r262435) @@ -9,11 +9,7 @@ .\" 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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors +.\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" Modified: stable/10/libexec/getty/gettytab.h ============================================================================== --- stable/10/libexec/getty/gettytab.h Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/getty/gettytab.h Mon Feb 24 08:21:49 2014 (r262435) @@ -10,11 +10,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/getty/init.c ============================================================================== --- stable/10/libexec/getty/init.c Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/getty/init.c Mon Feb 24 08:21:49 2014 (r262435) @@ -10,11 +10,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/getty/main.c ============================================================================== --- stable/10/libexec/getty/main.c Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/getty/main.c Mon Feb 24 08:21:49 2014 (r262435) @@ -10,11 +10,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/getty/pathnames.h ============================================================================== --- stable/10/libexec/getty/pathnames.h Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/getty/pathnames.h Mon Feb 24 08:21:49 2014 (r262435) @@ -10,11 +10,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/getty/subr.c ============================================================================== --- stable/10/libexec/getty/subr.c Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/getty/subr.c Mon Feb 24 08:21:49 2014 (r262435) @@ -10,11 +10,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/getty/ttys.5 ============================================================================== --- stable/10/libexec/getty/ttys.5 Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/getty/ttys.5 Mon Feb 24 08:21:49 2014 (r262435) @@ -9,11 +9,7 @@ .\" 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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors +.\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" Modified: stable/10/libexec/mknetid/parse_group.c ============================================================================== --- stable/10/libexec/mknetid/parse_group.c Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/mknetid/parse_group.c Mon Feb 24 08:21:49 2014 (r262435) @@ -10,11 +10,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/rbootd/bpf.c ============================================================================== --- stable/10/libexec/rbootd/bpf.c Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/rbootd/bpf.c Mon Feb 24 08:21:49 2014 (r262435) @@ -18,11 +18,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/rbootd/conf.c ============================================================================== --- stable/10/libexec/rbootd/conf.c Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/rbootd/conf.c Mon Feb 24 08:21:49 2014 (r262435) @@ -18,11 +18,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/rbootd/defs.h ============================================================================== --- stable/10/libexec/rbootd/defs.h Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/rbootd/defs.h Mon Feb 24 08:21:49 2014 (r262435) @@ -18,11 +18,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/rbootd/parseconf.c ============================================================================== --- stable/10/libexec/rbootd/parseconf.c Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/rbootd/parseconf.c Mon Feb 24 08:21:49 2014 (r262435) @@ -18,11 +18,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/rbootd/pathnames.h ============================================================================== --- stable/10/libexec/rbootd/pathnames.h Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/rbootd/pathnames.h Mon Feb 24 08:21:49 2014 (r262435) @@ -18,11 +18,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/rbootd/rbootd.8 ============================================================================== --- stable/10/libexec/rbootd/rbootd.8 Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/rbootd/rbootd.8 Mon Feb 24 08:21:49 2014 (r262435) @@ -17,11 +17,7 @@ .\" 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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors +.\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" Modified: stable/10/libexec/rbootd/rbootd.c ============================================================================== --- stable/10/libexec/rbootd/rbootd.c Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/rbootd/rbootd.c Mon Feb 24 08:21:49 2014 (r262435) @@ -18,11 +18,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/rbootd/rmp.h ============================================================================== --- stable/10/libexec/rbootd/rmp.h Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/rbootd/rmp.h Mon Feb 24 08:21:49 2014 (r262435) @@ -18,11 +18,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/rbootd/rmp_var.h ============================================================================== --- stable/10/libexec/rbootd/rmp_var.h Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/rbootd/rmp_var.h Mon Feb 24 08:21:49 2014 (r262435) @@ -18,11 +18,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/rbootd/rmpproto.c ============================================================================== --- stable/10/libexec/rbootd/rmpproto.c Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/rbootd/rmpproto.c Mon Feb 24 08:21:49 2014 (r262435) @@ -18,11 +18,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/rbootd/utils.c ============================================================================== --- stable/10/libexec/rbootd/utils.c Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/rbootd/utils.c Mon Feb 24 08:21:49 2014 (r262435) @@ -18,11 +18,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/revnetgroup/parse_netgroup.c ============================================================================== --- stable/10/libexec/revnetgroup/parse_netgroup.c Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/revnetgroup/parse_netgroup.c Mon Feb 24 08:21:49 2014 (r262435) @@ -13,11 +13,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/rlogind/rlogind.8 ============================================================================== --- stable/10/libexec/rlogind/rlogind.8 Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/rlogind/rlogind.8 Mon Feb 24 08:21:49 2014 (r262435) @@ -9,11 +9,7 @@ .\" 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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors +.\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" Modified: stable/10/libexec/rlogind/rlogind.c ============================================================================== --- stable/10/libexec/rlogind/rlogind.c Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/rlogind/rlogind.c Mon Feb 24 08:21:49 2014 (r262435) @@ -17,11 +17,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/rpc.rstatd/rpc.rstatd.8 ============================================================================== --- stable/10/libexec/rpc.rstatd/rpc.rstatd.8 Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/rpc.rstatd/rpc.rstatd.8 Mon Feb 24 08:21:49 2014 (r262435) @@ -11,11 +11,7 @@ .\" 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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors +.\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" Modified: stable/10/libexec/rpc.rstatd/rstatd.c ============================================================================== --- stable/10/libexec/rpc.rstatd/rstatd.c Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/rpc.rstatd/rstatd.c Mon Feb 24 08:21:49 2014 (r262435) @@ -10,11 +10,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/rpc.rusersd/extern.h ============================================================================== --- stable/10/libexec/rpc.rusersd/extern.h Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/rpc.rusersd/extern.h Mon Feb 24 08:21:49 2014 (r262435) @@ -10,11 +10,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/rpc.rusersd/rpc.rusersd.8 ============================================================================== --- stable/10/libexec/rpc.rusersd/rpc.rusersd.8 Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/rpc.rusersd/rpc.rusersd.8 Mon Feb 24 08:21:49 2014 (r262435) @@ -11,11 +11,7 @@ .\" 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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors +.\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" Modified: stable/10/libexec/rpc.rusersd/rusers_proc.c ============================================================================== --- stable/10/libexec/rpc.rusersd/rusers_proc.c Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/rpc.rusersd/rusers_proc.c Mon Feb 24 08:21:49 2014 (r262435) @@ -10,11 +10,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/rpc.rusersd/rusersd.c ============================================================================== --- stable/10/libexec/rpc.rusersd/rusersd.c Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/rpc.rusersd/rusersd.c Mon Feb 24 08:21:49 2014 (r262435) @@ -10,11 +10,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/rpc.rwalld/rpc.rwalld.8 ============================================================================== --- stable/10/libexec/rpc.rwalld/rpc.rwalld.8 Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/rpc.rwalld/rpc.rwalld.8 Mon Feb 24 08:21:49 2014 (r262435) @@ -11,11 +11,7 @@ .\" 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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors +.\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" Modified: stable/10/libexec/rshd/rshd.8 ============================================================================== --- stable/10/libexec/rshd/rshd.8 Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/rshd/rshd.8 Mon Feb 24 08:21:49 2014 (r262435) @@ -9,11 +9,7 @@ .\" 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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors +.\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" Modified: stable/10/libexec/rshd/rshd.c ============================================================================== --- stable/10/libexec/rshd/rshd.c Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/rshd/rshd.c Mon Feb 24 08:21:49 2014 (r262435) @@ -17,11 +17,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/rtld-elf/malloc.c ============================================================================== --- stable/10/libexec/rtld-elf/malloc.c Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/rtld-elf/malloc.c Mon Feb 24 08:21:49 2014 (r262435) @@ -10,11 +10,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/talkd/announce.c ============================================================================== --- stable/10/libexec/talkd/announce.c Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/talkd/announce.c Mon Feb 24 08:21:49 2014 (r262435) @@ -10,11 +10,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/talkd/print.c ============================================================================== --- stable/10/libexec/talkd/print.c Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/talkd/print.c Mon Feb 24 08:21:49 2014 (r262435) @@ -10,11 +10,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/talkd/process.c ============================================================================== --- stable/10/libexec/talkd/process.c Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/talkd/process.c Mon Feb 24 08:21:49 2014 (r262435) @@ -10,11 +10,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/talkd/table.c ============================================================================== --- stable/10/libexec/talkd/table.c Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/talkd/table.c Mon Feb 24 08:21:49 2014 (r262435) @@ -10,11 +10,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/talkd/talkd.8 ============================================================================== --- stable/10/libexec/talkd/talkd.8 Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/talkd/talkd.8 Mon Feb 24 08:21:49 2014 (r262435) @@ -9,11 +9,7 @@ .\" 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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors +.\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" Modified: stable/10/libexec/talkd/talkd.c ============================================================================== --- stable/10/libexec/talkd/talkd.c Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/talkd/talkd.c Mon Feb 24 08:21:49 2014 (r262435) @@ -10,11 +10,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/libexec/tftpd/tftpd.8 ============================================================================== --- stable/10/libexec/tftpd/tftpd.8 Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/tftpd/tftpd.8 Mon Feb 24 08:21:49 2014 (r262435) @@ -9,11 +9,7 @@ .\" 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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors +.\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" Modified: stable/10/libexec/tftpd/tftpd.c ============================================================================== --- stable/10/libexec/tftpd/tftpd.c Mon Feb 24 08:18:11 2014 (r262434) +++ stable/10/libexec/tftpd/tftpd.c Mon Feb 24 08:21:49 2014 (r262435) @@ -10,11 +10,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * From owner-svn-src-stable@FreeBSD.ORG Mon Feb 24 08:50:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 44140CC5; Mon, 24 Feb 2014 08:50:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2B2F4188A; Mon, 24 Feb 2014 08:50:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1O8o7h8013465; Mon, 24 Feb 2014 08:50:07 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1O8o7th013464; Mon, 24 Feb 2014 08:50:07 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201402240850.s1O8o7th013464@svn.freebsd.org> From: Craig Rodrigues Date: Mon, 24 Feb 2014 08:50:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262436 - stable/10/sys/dev/usb/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2014 08:50:07 -0000 Author: rodrigc Date: Mon Feb 24 08:50:06 2014 New Revision: 262436 URL: http://svnweb.freebsd.org/changeset/base/262436 Log: MFC r262142: In ue_attach_post_task(), initialize curvnet to vnet0 before calling if_attach(). Before this patch, curvnet was NULL. When the VIMAGE kernel option is enabled, this eliminates kernel panics when USB ethernet devices are plugged in. PR: 183835 Submitted by: Hiroo Oono Modified: stable/10/sys/dev/usb/net/usb_ethernet.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/net/usb_ethernet.c ============================================================================== --- stable/10/sys/dev/usb/net/usb_ethernet.c Mon Feb 24 08:21:49 2014 (r262435) +++ stable/10/sys/dev/usb/net/usb_ethernet.c Mon Feb 24 08:50:06 2014 (r262436) @@ -207,6 +207,7 @@ ue_attach_post_task(struct usb_proc_msg sysctl_ctx_init(&ue->ue_sysctl_ctx); error = 0; + CURVNET_SET_QUIET(vnet0); ifp = if_alloc(IFT_ETHER); if (ifp == NULL) { device_printf(ue->ue_dev, "could not allocate ifnet\n"); @@ -253,6 +254,8 @@ ue_attach_post_task(struct usb_proc_msg if (ifp->if_capabilities & IFCAP_VLAN_MTU) ifp->if_hdrlen = sizeof(struct ether_vlan_header); + CURVNET_RESTORE(); + snprintf(num, sizeof(num), "%u", ue->ue_unit); ue->ue_sysctl_oid = SYSCTL_ADD_NODE(&ue->ue_sysctl_ctx, &SYSCTL_NODE_CHILDREN(_net, ue), @@ -266,6 +269,7 @@ ue_attach_post_task(struct usb_proc_msg return; fail: + CURVNET_RESTORE(); free_unr(ueunit, ue->ue_unit); if (ue->ue_ifp != NULL) { if_free(ue->ue_ifp); From owner-svn-src-stable@FreeBSD.ORG Mon Feb 24 17:01:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 084228A9; Mon, 24 Feb 2014 17:01:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E74931CFA; Mon, 24 Feb 2014 17:01:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1OH16Qp017606; Mon, 24 Feb 2014 17:01:06 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1OH16BF017605; Mon, 24 Feb 2014 17:01:06 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201402241701.s1OH16BF017605@svn.freebsd.org> From: Eitan Adler Date: Mon, 24 Feb 2014 17:01:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r262448 - stable/9/cddl/contrib/opensolaris/cmd/zpool X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2014 17:01:07 -0000 Author: eadler Date: Mon Feb 24 17:01:06 2014 New Revision: 262448 URL: http://svnweb.freebsd.org/changeset/base/262448 Log: MFC r261774 by feld: Add caveat to zpool manpage indicating that we do not automatically activate hot spares. This should be MFC'd to all STABLE branches. Upon the availability of zfsd, the zpool manpage on relevant branches should be updated to remove this caveat and document hot spare's reliance on zfsd. Requested by: feld Modified: stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Directory Properties: stable/9/cddl/contrib/opensolaris/cmd/zpool/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Mon Feb 24 14:40:28 2014 (r262447) +++ stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Mon Feb 24 17:01:06 2014 (r262448) @@ -1946,3 +1946,9 @@ The .Xr mdoc 7 implementation of this manual page was initially written by .An Martin Matuska Aq mm@FreeBSD.org . +.Sh CAVEATS +The +.Cm spare +feature requires a utility to detect zpool degradation and initiate +disk replacement within the zpool. FreeBSD does not provide such a +utility at this time. From owner-svn-src-stable@FreeBSD.ORG Mon Feb 24 17:01:28 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A0839E4; Mon, 24 Feb 2014 17:01:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E9A871D04; Mon, 24 Feb 2014 17:01:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1OH1R6S018298; Mon, 24 Feb 2014 17:01:27 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1OH1RfC018297; Mon, 24 Feb 2014 17:01:27 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201402241701.s1OH1RfC018297@svn.freebsd.org> From: Eitan Adler Date: Mon, 24 Feb 2014 17:01:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262449 - stable/10/cddl/contrib/opensolaris/cmd/zpool X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2014 17:01:28 -0000 Author: eadler Date: Mon Feb 24 17:01:27 2014 New Revision: 262449 URL: http://svnweb.freebsd.org/changeset/base/262449 Log: MFC r261774 by feld: Add caveat to zpool manpage indicating that we do not automatically activate hot spares. This should be MFC'd to all STABLE branches. Upon the availability of zfsd, the zpool manpage on relevant branches should be updated to remove this caveat and document hot spare's reliance on zfsd. Requested by: feld Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Mon Feb 24 17:01:06 2014 (r262448) +++ stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Mon Feb 24 17:01:27 2014 (r262449) @@ -1946,3 +1946,9 @@ The .Xr mdoc 7 implementation of this manual page was initially written by .An Martin Matuska Aq mm@FreeBSD.org . +.Sh CAVEATS +The +.Cm spare +feature requires a utility to detect zpool degradation and initiate +disk replacement within the zpool. FreeBSD does not provide such a +utility at this time. From owner-svn-src-stable@FreeBSD.ORG Mon Feb 24 17:03:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DBFA3B23; Mon, 24 Feb 2014 17:03:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C79961D12; Mon, 24 Feb 2014 17:03:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1OH32iY018594; Mon, 24 Feb 2014 17:03:02 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1OH32GX018593; Mon, 24 Feb 2014 17:03:02 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201402241703.s1OH32GX018593@svn.freebsd.org> From: Eitan Adler Date: Mon, 24 Feb 2014 17:03:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r262450 - stable/8/cddl/contrib/opensolaris/cmd/zpool X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2014 17:03:02 -0000 Author: eadler Date: Mon Feb 24 17:03:02 2014 New Revision: 262450 URL: http://svnweb.freebsd.org/changeset/base/262450 Log: MFC r261774 by feld: Add caveat to zpool manpage indicating that we do not automatically activate hot spares. This should be MFC'd to all STABLE branches. Upon the availability of zfsd, the zpool manpage on relevant branches should be updated to remove this caveat and document hot spare's reliance on zfsd. Requested by: feld Modified: stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Directory Properties: stable/8/cddl/contrib/opensolaris/cmd/zpool/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Mon Feb 24 17:01:27 2014 (r262449) +++ stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Mon Feb 24 17:03:02 2014 (r262450) @@ -1946,3 +1946,9 @@ The .Xr mdoc 7 implementation of this manual page was initially written by .An Martin Matuska Aq mm@FreeBSD.org . +.Sh CAVEATS +The +.Cm spare +feature requires a utility to detect zpool degradation and initiate +disk replacement within the zpool. FreeBSD does not provide such a +utility at this time. From owner-svn-src-stable@FreeBSD.ORG Mon Feb 24 19:36:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C90AD44C; Mon, 24 Feb 2014 19:36:33 +0000 (UTC) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6F96F1D7D; Mon, 24 Feb 2014 19:36:31 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.7/8.14.7) with ESMTP id s1OJaNCR066766; Mon, 24 Feb 2014 13:36:24 -0600 (CST) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.7/8.14.7/Submit) id s1OJaNZ9066765; Mon, 24 Feb 2014 13:36:23 -0600 (CST) (envelope-from brooks) Date: Mon, 24 Feb 2014 13:36:23 -0600 From: Brooks Davis To: Xin LI Subject: Re: svn commit: r262318 - stable/10/sys/geom/eli Message-ID: <20140224193623.GC18404@lor.one-eyed-alien.net> References: <201402220030.s1M0UX3T044248@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bCsyhTFzCvuiizWE" Content-Disposition: inline In-Reply-To: <201402220030.s1M0UX3T044248@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2014 19:36:33 -0000 --bCsyhTFzCvuiizWE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Feb 22, 2014 at 12:30:33AM +0000, Xin LI wrote: > Author: delphij > Date: Sat Feb 22 00:30:33 2014 > New Revision: 262318 > URL: http://svnweb.freebsd.org/changeset/base/262318 >=20 > Log: > MFC r261618: > =20 > In g_eli_crypto_hmac_init(), zero out after using the ipad buffer, > k_ipad. > =20 > Note that the two consumers in geli(4) are not affected by this > issue because the way the code is constructed and as such, we > believe there is no security impact with or without this change > with geli(4)'s usage. > =20 > Reported by: Serge van den Boom > Reviewed by: pjd >=20 > Modified: > stable/10/sys/geom/eli/g_eli_crypto.c > Directory Properties: > stable/10/ (props changed) >=20 > Modified: stable/10/sys/geom/eli/g_eli_crypto.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/10/sys/geom/eli/g_eli_crypto.c Sat Feb 22 00:16:27 2014 (r2623= 17) > +++ stable/10/sys/geom/eli/g_eli_crypto.c Sat Feb 22 00:30:33 2014 (r2623= 18) > @@ -265,6 +265,7 @@ g_eli_crypto_hmac_init(struct hmac_ctx * > /* Perform inner SHA512. */ > SHA512_Init(&ctx->shactx); > SHA512_Update(&ctx->shactx, k_ipad, sizeof(k_ipad)); > + bzero(k_ipad, sizeof(k_ipad)); > } > =20 > void >=20 Unless k_ipad is declared volatile there is some risk an overly smart compiler will optimize this bzero() away. It might make sense for us to use a non-standard function for such zeroing operations. -- Brooks --bCsyhTFzCvuiizWE Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iKYEARECAGYFAlMLnzZfFIAAAAAALgAoaXNzdWVyLWZwckBub3RhdGlvbnMub3Bl bnBncC5maWZ0aGhvcnNlbWFuLm5ldDY1NUQ1MTlDMjZBNzgyRTcyNTI5OUJGMDVE OEU4QkU5RjIzODFBRDQACgkQXY6L6fI4GtTTCQCfSiGFo7KrTv6YvPl6QfqIg5ut JeAAoMPUQ2xbAIIsGS/YHNtjF7kWQ6AV =SNZA -----END PGP SIGNATURE----- --bCsyhTFzCvuiizWE-- From owner-svn-src-stable@FreeBSD.ORG Mon Feb 24 20:29:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8224C307; Mon, 24 Feb 2014 20:29:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6A6301369; Mon, 24 Feb 2014 20:29:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1OKTes2099452; Mon, 24 Feb 2014 20:29:40 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1OKTeLT099451; Mon, 24 Feb 2014 20:29:40 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201402242029.s1OKTeLT099451@svn.freebsd.org> From: Dimitry Andric Date: Mon, 24 Feb 2014 20:29:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r262457 - in stable: 10/sys/dev/usb/controller 9/sys/dev/usb/controller X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2014 20:29:40 -0000 Author: dim Date: Mon Feb 24 20:29:39 2014 New Revision: 262457 URL: http://svnweb.freebsd.org/changeset/base/262457 Log: MFC r262125: In sys/dev/usb/controller/uss820dci.c, similar to r261977, fix a warning about uss820dci_odevd being unused, by adding it to the part that handles getting descriptors. Reported by: loos Reviewed by: hselasky Modified: stable/9/sys/dev/usb/controller/uss820dci.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/usb/controller/uss820dci.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/dev/usb/controller/uss820dci.c ============================================================================== --- stable/9/sys/dev/usb/controller/uss820dci.c Mon Feb 24 19:32:15 2014 (r262456) +++ stable/9/sys/dev/usb/controller/uss820dci.c Mon Feb 24 20:29:39 2014 (r262457) @@ -2004,6 +2004,13 @@ tr_handle_get_descriptor: len = sizeof(uss820dci_devd); ptr = (const void *)&uss820dci_devd; goto tr_valid; + case UDESC_DEVICE_QUALIFIER: + if (value & 0xff) { + goto tr_stalled; + } + len = sizeof(uss820dci_odevd); + ptr = (const void *)&uss820dci_odevd; + goto tr_valid; case UDESC_CONFIG: if (value & 0xff) { goto tr_stalled; From owner-svn-src-stable@FreeBSD.ORG Mon Feb 24 20:29:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E22F1308; Mon, 24 Feb 2014 20:29:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BEB8F136A; Mon, 24 Feb 2014 20:29:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1OKTexH099458; Mon, 24 Feb 2014 20:29:40 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1OKTe9r099457; Mon, 24 Feb 2014 20:29:40 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201402242029.s1OKTe9r099457@svn.freebsd.org> From: Dimitry Andric Date: Mon, 24 Feb 2014 20:29:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262457 - in stable: 10/sys/dev/usb/controller 9/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2014 20:29:41 -0000 Author: dim Date: Mon Feb 24 20:29:39 2014 New Revision: 262457 URL: http://svnweb.freebsd.org/changeset/base/262457 Log: MFC r262125: In sys/dev/usb/controller/uss820dci.c, similar to r261977, fix a warning about uss820dci_odevd being unused, by adding it to the part that handles getting descriptors. Reported by: loos Reviewed by: hselasky Modified: stable/10/sys/dev/usb/controller/uss820dci.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/dev/usb/controller/uss820dci.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/dev/usb/controller/uss820dci.c ============================================================================== --- stable/10/sys/dev/usb/controller/uss820dci.c Mon Feb 24 19:32:15 2014 (r262456) +++ stable/10/sys/dev/usb/controller/uss820dci.c Mon Feb 24 20:29:39 2014 (r262457) @@ -2005,6 +2005,13 @@ tr_handle_get_descriptor: len = sizeof(uss820dci_devd); ptr = (const void *)&uss820dci_devd; goto tr_valid; + case UDESC_DEVICE_QUALIFIER: + if (value & 0xff) { + goto tr_stalled; + } + len = sizeof(uss820dci_odevd); + ptr = (const void *)&uss820dci_odevd; + goto tr_valid; case UDESC_CONFIG: if (value & 0xff) { goto tr_stalled; From owner-svn-src-stable@FreeBSD.ORG Mon Feb 24 21:03:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3962F44; Mon, 24 Feb 2014 21:03:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AC7ED16E1; Mon, 24 Feb 2014 21:03:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1OL3c1A015254; Mon, 24 Feb 2014 21:03:38 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1OL3ck5015253; Mon, 24 Feb 2014 21:03:38 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201402242103.s1OL3ck5015253@svn.freebsd.org> From: Mateusz Guzik Date: Mon, 24 Feb 2014 21:03:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262458 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2014 21:03:38 -0000 Author: mjg Date: Mon Feb 24 21:03:38 2014 New Revision: 262458 URL: http://svnweb.freebsd.org/changeset/base/262458 Log: MFC r262309: Fix a race between kern_proc_{o,}filedesc_out and fdescfree leading to use-after-free. fdescfree proceeds to free file pointers once fd_refcnt reaches 0, but kern_proc_{o,}filedesc_out only checked for hold count. Modified: stable/10/sys/kern/kern_descrip.c Modified: stable/10/sys/kern/kern_descrip.c ============================================================================== --- stable/10/sys/kern/kern_descrip.c Mon Feb 24 20:29:39 2014 (r262457) +++ stable/10/sys/kern/kern_descrip.c Mon Feb 24 21:03:38 2014 (r262458) @@ -3052,7 +3052,7 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLE if (fdp->fd_jdir != NULL) export_vnode_for_osysctl(fdp->fd_jdir, KF_FD_TYPE_JAIL, kif, fdp, req); - for (i = 0; i < fdp->fd_nfiles; i++) { + for (i = 0; fdp->fd_refcnt > 0 && i < fdp->fd_nfiles; i++) { if ((fp = fdp->fd_ofiles[i].fde_file) == NULL) continue; bzero(kif, sizeof(*kif)); @@ -3422,7 +3422,7 @@ kern_proc_filedesc_out(struct proc *p, export_fd_to_sb(data, KF_TYPE_VNODE, KF_FD_TYPE_JAIL, FREAD, -1, -1, NULL, efbuf); } - for (i = 0; i < fdp->fd_nfiles; i++) { + for (i = 0; fdp->fd_refcnt > 0 && i < fdp->fd_nfiles; i++) { if ((fp = fdp->fd_ofiles[i].fde_file) == NULL) continue; data = NULL; From owner-svn-src-stable@FreeBSD.ORG Mon Feb 24 21:22:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4602841B; Mon, 24 Feb 2014 21:22:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 309F81864; Mon, 24 Feb 2014 21:22:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1OLMjiZ023678; Mon, 24 Feb 2014 21:22:45 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1OLMjcJ023677; Mon, 24 Feb 2014 21:22:45 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201402242122.s1OLMjcJ023677@svn.freebsd.org> From: Dimitry Andric Date: Mon, 24 Feb 2014 21:22:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r262459 - in stable: 10/share/mk 9/share/mk X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2014 21:22:45 -0000 Author: dim Date: Mon Feb 24 21:22:44 2014 New Revision: 262459 URL: http://svnweb.freebsd.org/changeset/base/262459 Log: MFC r262310: Move the part in bsd.own.mk that sets -Wno-c++11-extensions for clang to bsd.sys.mk, where it really belongs. This also causes the flag to get added when clang is *not* the default system compiler, but is still used, e.g. by setting WITH_CLANG_IS_CC manually. Modified: stable/9/share/mk/bsd.sys.mk (contents, props changed) Directory Properties: stable/9/share/mk/ (props changed) Changes in other areas also in this revision: Modified: stable/10/share/mk/bsd.own.mk stable/10/share/mk/bsd.sys.mk Directory Properties: stable/10/ (props changed) Modified: stable/9/share/mk/bsd.sys.mk ============================================================================== --- stable/9/share/mk/bsd.sys.mk Mon Feb 24 21:03:38 2014 (r262458) +++ stable/9/share/mk/bsd.sys.mk Mon Feb 24 21:22:44 2014 (r262459) @@ -116,6 +116,12 @@ CLANG_NO_IAS= -no-integrated-as CLANG_OPT_SMALL= -mstack-alignment=8 -mllvm -inline-threshold=3\ -mllvm -enable-load-pre=false -mllvm -simplifycfg-dup-ret CFLAGS+= -Qunused-arguments +# The libc++ headers use c++11 extensions. These are normally silenced because +# they are treated as system headers, but we explicitly disable that warning +# suppression when building the base system to catch bugs in our headers. +# Eventually we'll want to start building the base system C++ code as C++11, +# but not yet. +CXXFLAGS+= -Wno-c++11-extensions CFLAGS+= ${CFLAGS.clang} CXXFLAGS+= ${CXXFLAGS.clang} .else # !CLANG From owner-svn-src-stable@FreeBSD.ORG Mon Feb 24 21:22:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2F8D41C; Mon, 24 Feb 2014 21:22:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B55551865; Mon, 24 Feb 2014 21:22:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1OLMjsB023687; Mon, 24 Feb 2014 21:22:45 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1OLMj32023685; Mon, 24 Feb 2014 21:22:45 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201402242122.s1OLMj32023685@svn.freebsd.org> From: Dimitry Andric Date: Mon, 24 Feb 2014 21:22:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262459 - in stable: 10/share/mk 9/share/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2014 21:22:46 -0000 Author: dim Date: Mon Feb 24 21:22:44 2014 New Revision: 262459 URL: http://svnweb.freebsd.org/changeset/base/262459 Log: MFC r262310: Move the part in bsd.own.mk that sets -Wno-c++11-extensions for clang to bsd.sys.mk, where it really belongs. This also causes the flag to get added when clang is *not* the default system compiler, but is still used, e.g. by setting WITH_CLANG_IS_CC manually. Modified: stable/10/share/mk/bsd.own.mk stable/10/share/mk/bsd.sys.mk Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/share/mk/bsd.sys.mk (contents, props changed) Directory Properties: stable/9/share/mk/ (props changed) Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Mon Feb 24 21:03:38 2014 (r262458) +++ stable/10/share/mk/bsd.own.mk Mon Feb 24 21:22:44 2014 (r262459) @@ -418,15 +418,6 @@ __DEFAULT_YES_OPTIONS+=GCC .else __DEFAULT_NO_OPTIONS+=GCC GNUCXX .endif -# The libc++ headers use c++11 extensions. These are normally silenced because -# they are treated as system headers, but we explicitly disable that warning -# suppression when building the base system to catch bugs in our headers. -# Eventually we'll want to start building the base system C++ code as C++11, -# but not yet. -_COMPVERSION!= ${CC} --version -.if ${_COMPVERSION:Mclang} -CXXFLAGS+= -Wno-c++11-extensions -.endif .else # If clang is not cc, then build gcc by default __DEFAULT_NO_OPTIONS+=CLANG_IS_CC Modified: stable/10/share/mk/bsd.sys.mk ============================================================================== --- stable/10/share/mk/bsd.sys.mk Mon Feb 24 21:03:38 2014 (r262458) +++ stable/10/share/mk/bsd.sys.mk Mon Feb 24 21:22:44 2014 (r262459) @@ -120,6 +120,12 @@ CLANG_NO_IAS= -no-integrated-as CLANG_OPT_SMALL= -mstack-alignment=8 -mllvm -inline-threshold=3\ -mllvm -enable-load-pre=false -mllvm -simplifycfg-dup-ret CFLAGS+= -Qunused-arguments +# The libc++ headers use c++11 extensions. These are normally silenced because +# they are treated as system headers, but we explicitly disable that warning +# suppression when building the base system to catch bugs in our headers. +# Eventually we'll want to start building the base system C++ code as C++11, +# but not yet. +CXXFLAGS+= -Wno-c++11-extensions CFLAGS+= ${CFLAGS.clang} CXXFLAGS+= ${CXXFLAGS.clang} .else # !CLANG From owner-svn-src-stable@FreeBSD.ORG Tue Feb 25 05:39:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 205688EE; Tue, 25 Feb 2014 05:39:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 401121F59; Tue, 25 Feb 2014 04:19:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1P4JGnT094314; Tue, 25 Feb 2014 04:19:16 GMT (envelope-from daichi@svn.freebsd.org) Received: (from daichi@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1P4JGWT094313; Tue, 25 Feb 2014 04:19:16 GMT (envelope-from daichi@svn.freebsd.org) Message-Id: <201402250419.s1P4JGWT094313@svn.freebsd.org> From: Daichi GOTO Date: Tue, 25 Feb 2014 04:19:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r262469 - stable/9/bin/sh X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2014 05:39:05 -0000 Author: daichi (ports committer) Date: Tue Feb 25 04:19:15 2014 New Revision: 262469 URL: http://svnweb.freebsd.org/changeset/base/262469 Log: MFC r262467: sh: Add -h option to SYNOPSIS Reviewed by: jilles Modified: stable/9/bin/sh/sh.1 Modified: stable/9/bin/sh/sh.1 ============================================================================== --- stable/9/bin/sh/sh.1 Tue Feb 25 03:49:42 2014 (r262468) +++ stable/9/bin/sh/sh.1 Tue Feb 25 04:19:15 2014 (r262469) @@ -40,14 +40,14 @@ .Nd command interpreter (shell) .Sh SYNOPSIS .Nm -.Op Fl /+abCEefIimnPpTuVvx +.Op Fl /+abCEefhIimnPpTuVvx .Op Fl /+o Ar longname .Oo .Ar script .Op Ar arg ... .Oc .Nm -.Op Fl /+abCEefIimnPpTuVvx +.Op Fl /+abCEefhIimnPpTuVvx .Op Fl /+o Ar longname .Fl c Ar string .Oo @@ -55,7 +55,7 @@ .Op Ar arg ... .Oc .Nm -.Op Fl /+abCEefIimnPpTuVvx +.Op Fl /+abCEefhIimnPpTuVvx .Op Fl /+o Ar longname .Fl s .Op Ar arg ... From owner-svn-src-stable@FreeBSD.ORG Tue Feb 25 06:19:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C1DF73F; Tue, 25 Feb 2014 06:19:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2C6041A87; Tue, 25 Feb 2014 03:49:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1P3ngp8081894; Tue, 25 Feb 2014 03:49:42 GMT (envelope-from daichi@svn.freebsd.org) Received: (from daichi@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1P3nggF081892; Tue, 25 Feb 2014 03:49:42 GMT (envelope-from daichi@svn.freebsd.org) Message-Id: <201402250349.s1P3nggF081892@svn.freebsd.org> From: Daichi GOTO Date: Tue, 25 Feb 2014 03:49:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262468 - stable/10/bin/sh X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2014 06:19:05 -0000 Author: daichi (ports committer) Date: Tue Feb 25 03:49:42 2014 New Revision: 262468 URL: http://svnweb.freebsd.org/changeset/base/262468 Log: MFC r262467: sh: Add -h option to SYNOPSIS Reviewed by: jilles Modified: stable/10/bin/sh/sh.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/sh/sh.1 ============================================================================== --- stable/10/bin/sh/sh.1 Tue Feb 25 03:05:43 2014 (r262467) +++ stable/10/bin/sh/sh.1 Tue Feb 25 03:49:42 2014 (r262468) @@ -40,14 +40,14 @@ .Nd command interpreter (shell) .Sh SYNOPSIS .Nm -.Op Fl /+abCEefIimnPpTuVvx +.Op Fl /+abCEefhIimnPpTuVvx .Op Fl /+o Ar longname .Oo .Ar script .Op Ar arg ... .Oc .Nm -.Op Fl /+abCEefIimnPpTuVvx +.Op Fl /+abCEefhIimnPpTuVvx .Op Fl /+o Ar longname .Fl c Ar string .Oo @@ -55,7 +55,7 @@ .Op Ar arg ... .Oc .Nm -.Op Fl /+abCEefIimnPpTuVvx +.Op Fl /+abCEefhIimnPpTuVvx .Op Fl /+o Ar longname .Fl s .Op Ar arg ... From owner-svn-src-stable@FreeBSD.ORG Tue Feb 25 07:55:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ECAD8F1F; Tue, 25 Feb 2014 07:55:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D6BEE1835; Tue, 25 Feb 2014 07:55:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1P7t3Cs083362; Tue, 25 Feb 2014 07:55:03 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1P7t3Js083361; Tue, 25 Feb 2014 07:55:03 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402250755.s1P7t3Js083361@svn.freebsd.org> From: Christian Brueffer Date: Tue, 25 Feb 2014 07:55:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262474 - stable/10/usr.sbin/powerd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2014 07:55:04 -0000 Author: brueffer Date: Tue Feb 25 07:55:03 2014 New Revision: 262474 URL: http://svnweb.freebsd.org/changeset/base/262474 Log: MFC: r261773 In acline_init(), initialize ac_line to SRC_UNKNOWN. Previously this could lead to the -n option effectively being ignored (in case ac_line happened to be 0 aka SRC_AC), or other undefined behaviour. PR: 169779 Submitted by: Alex Gonzalez Reviewed by: jhb Modified: stable/10/usr.sbin/powerd/powerd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/powerd/powerd.c ============================================================================== --- stable/10/usr.sbin/powerd/powerd.c Tue Feb 25 07:40:37 2014 (r262473) +++ stable/10/usr.sbin/powerd/powerd.c Tue Feb 25 07:55:03 2014 (r262474) @@ -279,6 +279,7 @@ static void acline_init(void) { acline_mib_len = 4; + acline_status = SRC_UNKNOWN; if (sysctlnametomib(ACPIAC, acline_mib, &acline_mib_len) == 0) { acline_mode = ac_sysctl; From owner-svn-src-stable@FreeBSD.ORG Tue Feb 25 07:57:17 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E49DBE2; Tue, 25 Feb 2014 07:57:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CF5471844; Tue, 25 Feb 2014 07:57:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1P7vH8j083639; Tue, 25 Feb 2014 07:57:17 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1P7vHh7083638; Tue, 25 Feb 2014 07:57:17 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402250757.s1P7vHh7083638@svn.freebsd.org> From: Christian Brueffer Date: Tue, 25 Feb 2014 07:57:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r262475 - stable/9/usr.sbin/powerd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2014 07:57:18 -0000 Author: brueffer Date: Tue Feb 25 07:57:17 2014 New Revision: 262475 URL: http://svnweb.freebsd.org/changeset/base/262475 Log: MFC: r261773 In acline_init(), initialize ac_line to SRC_UNKNOWN. Previously this could lead to the -n option effectively being ignored (in case ac_line happened to be 0 aka SRC_AC), or other undefined behaviour. PR: 169779 Submitted by: Alex Gonzalez Reviewed by: jhb Modified: stable/9/usr.sbin/powerd/powerd.c Directory Properties: stable/9/usr.sbin/powerd/ (props changed) Modified: stable/9/usr.sbin/powerd/powerd.c ============================================================================== --- stable/9/usr.sbin/powerd/powerd.c Tue Feb 25 07:55:03 2014 (r262474) +++ stable/9/usr.sbin/powerd/powerd.c Tue Feb 25 07:57:17 2014 (r262475) @@ -278,6 +278,7 @@ static void acline_init(void) { acline_mib_len = 4; + acline_status = SRC_UNKNOWN; if (sysctlnametomib(ACPIAC, acline_mib, &acline_mib_len) == 0) { acline_mode = ac_sysctl; From owner-svn-src-stable@FreeBSD.ORG Tue Feb 25 07:59:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DFCD9246; Tue, 25 Feb 2014 07:59:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CB2CB185A; Tue, 25 Feb 2014 07:59:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1P7xXlJ083911; Tue, 25 Feb 2014 07:59:33 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1P7xXKI083910; Tue, 25 Feb 2014 07:59:33 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402250759.s1P7xXKI083910@svn.freebsd.org> From: Christian Brueffer Date: Tue, 25 Feb 2014 07:59:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r262476 - stable/8/usr.sbin/powerd X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2014 07:59:34 -0000 Author: brueffer Date: Tue Feb 25 07:59:33 2014 New Revision: 262476 URL: http://svnweb.freebsd.org/changeset/base/262476 Log: MFC: r261773 In acline_init(), initialize ac_line to SRC_UNKNOWN. Previously this could lead to the -n option effectively being ignored (in case ac_line happened to be 0 aka SRC_AC), or other undefined behaviour. PR: 169779 Submitted by: Alex Gonzalez Reviewed by: jhb Modified: stable/8/usr.sbin/powerd/powerd.c Directory Properties: stable/8/usr.sbin/powerd/ (props changed) Modified: stable/8/usr.sbin/powerd/powerd.c ============================================================================== --- stable/8/usr.sbin/powerd/powerd.c Tue Feb 25 07:57:17 2014 (r262475) +++ stable/8/usr.sbin/powerd/powerd.c Tue Feb 25 07:59:33 2014 (r262476) @@ -274,6 +274,7 @@ static void acline_init() { acline_mib_len = 4; + acline_status = SRC_UNKNOWN; if (sysctlnametomib(ACPIAC, acline_mib, &acline_mib_len) == 0) { acline_mode = ac_sysctl; From owner-svn-src-stable@FreeBSD.ORG Tue Feb 25 08:05:06 2014 Return-Path: Delivered-To: svn-src-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60CA95F5; Tue, 25 Feb 2014 08:05:06 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id EA1EA18F8; Tue, 25 Feb 2014 08:05:01 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id KAA06972; Tue, 25 Feb 2014 10:04:51 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1WID0U-000MEZ-Qq; Tue, 25 Feb 2014 10:04:50 +0200 Message-ID: <530C4E69.6050103@FreeBSD.org> Date: Tue, 25 Feb 2014 10:03:53 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Eitan Adler , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-stable@FreeBSD.org, svn-src-stable-9@FreeBSD.org Subject: Re: svn commit: r262448 - stable/9/cddl/contrib/opensolaris/cmd/zpool References: <201402241701.s1OH16BF017605@svn.freebsd.org> In-Reply-To: <201402241701.s1OH16BF017605@svn.freebsd.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2014 08:05:06 -0000 on 24/02/2014 19:01 Eitan Adler said the following: > Author: eadler > Date: Mon Feb 24 17:01:06 2014 > New Revision: 262448 > URL: http://svnweb.freebsd.org/changeset/base/262448 > > Log: > MFC r261774 by feld: Most likely this should have been MFC-ed in one go with r262051... > Add caveat to zpool manpage indicating that we do not automatically activate > hot spares. This should be MFC'd to all STABLE branches. > > Upon the availability of zfsd, the zpool manpage on relevant branches should > be updated to remove this caveat and document hot spare's reliance on zfsd. > > Requested by: feld > > Modified: > stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool.8 > Directory Properties: > stable/9/cddl/contrib/opensolaris/cmd/zpool/ (props changed) > > Modified: stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool.8 > ============================================================================== > --- stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Mon Feb 24 14:40:28 2014 (r262447) > +++ stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Mon Feb 24 17:01:06 2014 (r262448) > @@ -1946,3 +1946,9 @@ The > .Xr mdoc 7 > implementation of this manual page was initially written by > .An Martin Matuska Aq mm@FreeBSD.org . > +.Sh CAVEATS > +The > +.Cm spare > +feature requires a utility to detect zpool degradation and initiate > +disk replacement within the zpool. FreeBSD does not provide such a > +utility at this time. > -- Andriy Gapon From owner-svn-src-stable@FreeBSD.ORG Wed Feb 26 06:25:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 071342D4; Wed, 26 Feb 2014 06:25:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E62B410D0; Wed, 26 Feb 2014 06:25:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1Q6PaFB047111; Wed, 26 Feb 2014 06:25:36 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1Q6Patq047110; Wed, 26 Feb 2014 06:25:36 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201402260625.s1Q6Patq047110@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 26 Feb 2014 06:25:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262524 - stable/10/sys/dev/msk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2014 06:25:37 -0000 Author: yongari Date: Wed Feb 26 06:25:36 2014 New Revision: 262524 URL: http://svnweb.freebsd.org/changeset/base/262524 Log: MFC r261577: Revert r234666. Clearing TWSI IRQ seems to cause watchdog timeout on old Yukon II controllers. Modified: stable/10/sys/dev/msk/if_msk.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/msk/if_msk.c ============================================================================== --- stable/10/sys/dev/msk/if_msk.c Wed Feb 26 04:49:09 2014 (r262523) +++ stable/10/sys/dev/msk/if_msk.c Wed Feb 26 06:25:36 2014 (r262524) @@ -3749,9 +3749,6 @@ msk_intr(void *xsc) if ((status & Y2_IS_STAT_BMU) != 0 && domore == 0) CSR_WRITE_4(sc, STAT_CTRL, SC_STAT_CLR_IRQ); - /* Clear TWSI IRQ. */ - if ((status & Y2_IS_TWSI_RDY) != 0) - CSR_WRITE_4(sc, B2_I2C_IRQ, 1); /* Reenable interrupts. */ CSR_WRITE_4(sc, B0_Y2_SP_ICR, 2); From owner-svn-src-stable@FreeBSD.ORG Thu Feb 27 01:00:59 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26B8DD87 for ; Thu, 27 Feb 2014 01:00:59 +0000 (UTC) Received: from mail-qa0-x232.google.com (mail-qa0-x232.google.com [IPv6:2607:f8b0:400d:c00::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CEF36112B for ; Thu, 27 Feb 2014 01:00:58 +0000 (UTC) Received: by mail-qa0-f50.google.com with SMTP id cm18so3258590qab.23 for ; Wed, 26 Feb 2014 17:00:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=K43o+KZ/CU5h8eE2BWOMOUtRNafNNPjuILEPyIBNaWk=; b=OzukOgndE9HDVEfNx7CRyU7GmySCJUZi6PhDRLtVlG76C3Ohh18DOvn8xaqTS4AxPH xRk5Ol0zXtyQwnY8917j1KxDKFuJJhIFUzGRWPwy+09aDj7nnKnFcf9nnsQsSMKDTx8T PDNJNspfvfYg6GzTmslq9+VnHQRgNN64kxWIc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=K43o+KZ/CU5h8eE2BWOMOUtRNafNNPjuILEPyIBNaWk=; b=D2zI2BB6UXmvNfVIfZq7GIa2/bPRjlDbRmqpaH1lJB3XSluL1N/SIwqtC+KWp5x0jm 1VRvT++5cHrM07Vq8y8sTJ0IUmhh9o48BH/niN9wTi39O0BX/Z39Rr9E1n0yVZ8MjlsR cfit+9QYlUStUd7iuDh7tW3nP/rjCTkixPYJdKFTgfND1CrreVlDrMsMbo7OTxWKAiTM Bj82leNt+bx/IAURayrXt1ncsT9lhoBelmTWk7N7Cn14IlU4BRZTZkOWprflVr6pQ7X/ Fc8EMSzCZDmL0U9s+XLE4EX1GVXL93wl/0iEpodz07DF4VdkeKIXzMsZDrpHoUIkl85X 5SFg== X-Gm-Message-State: ALoCoQkw9yqaXRnF7SgIKDBb5R5TJ3Q0KiPNF8MkrylqlZp9567ODBK4DsBWTiohzIiIPcjf1GjZ X-Received: by 10.229.193.136 with SMTP id du8mr14680434qcb.11.1393462857934; Wed, 26 Feb 2014 17:00:57 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.96.147.225 with HTTP; Wed, 26 Feb 2014 17:00:27 -0800 (PST) In-Reply-To: <530C4E69.6050103@FreeBSD.org> References: <201402241701.s1OH16BF017605@svn.freebsd.org> <530C4E69.6050103@FreeBSD.org> From: Eitan Adler Date: Wed, 26 Feb 2014 20:00:27 -0500 X-Google-Sender-Auth: IvQIC7R2I183JOIShtXmKCxFq74 Message-ID: Subject: Re: svn commit: r262448 - stable/9/cddl/contrib/opensolaris/cmd/zpool To: Andriy Gapon Content-Type: text/plain; charset=UTF-8 Cc: svn-src-stable@freebsd.org, "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2014 01:00:59 -0000 On Tue, Feb 25, 2014 at 3:03 AM, Andriy Gapon wrote: > on 24/02/2014 19:01 Eitan Adler said the following: >> Author: eadler >> Date: Mon Feb 24 17:01:06 2014 >> New Revision: 262448 >> URL: http://svnweb.freebsd.org/changeset/base/262448 >> >> Log: >> MFC r261774 by feld: > > Most likely this should have been MFC-ed in one go with r262051... Yeap. Thanks for reminding me. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-stable@FreeBSD.ORG Thu Feb 27 01:01:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CA09FD90; Thu, 27 Feb 2014 01:01:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B53CF1131; Thu, 27 Feb 2014 01:01:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1R112w4006860; Thu, 27 Feb 2014 01:01:02 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1R112Ar006858; Thu, 27 Feb 2014 01:01:02 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201402270101.s1R112Ar006858@svn.freebsd.org> From: Eitan Adler Date: Thu, 27 Feb 2014 01:01:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262541 - stable/10/share/man/man7 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2014 01:01:02 -0000 Author: eadler Date: Thu Feb 27 01:01:02 2014 New Revision: 262541 URL: http://svnweb.freebsd.org/changeset/base/262541 Log: MFC r262451: hier(7): Add /usr/lib/private Modified: stable/10/share/man/man7/hier.7 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man7/hier.7 ============================================================================== --- stable/10/share/man/man7/hier.7 Thu Feb 27 00:52:34 2014 (r262540) +++ stable/10/share/man/man7/hier.7 Thu Feb 27 01:01:02 2014 (r262541) @@ -383,6 +383,9 @@ a.out backward compatibility libraries DTrace library scripts .It Pa engines/ OpenSSL (Cryptography/SSL toolkit) dynamically loadable engines +.It Pa private/ +Private system libraries not for use by third-party programs. +ABI and API stability are not guaranteed. .El .Pp .It Pa libdata/ From owner-svn-src-stable@FreeBSD.ORG Thu Feb 27 02:36:10 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0164B6B; Thu, 27 Feb 2014 02:36:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E153018FC; Thu, 27 Feb 2014 02:36:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1R2a9Bp047043; Thu, 27 Feb 2014 02:36:09 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1R2a9kN047042; Thu, 27 Feb 2014 02:36:09 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201402270236.s1R2a9kN047042@svn.freebsd.org> From: David Xu Date: Thu, 27 Feb 2014 02:36:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262544 - stable/10/libexec/rtld-elf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2014 02:36:10 -0000 Author: davidxu Date: Thu Feb 27 02:36:09 2014 New Revision: 262544 URL: http://svnweb.freebsd.org/changeset/base/262544 Log: MFC r262277: malloc_aligned() may not leave enough space for pointer to allocated memory, saving the pointer will overwrite bytes belongs to another memory block unexpectly, to fix the problem, use (allocated address + sizeof(void *)) as initial value, and slip to next aligned address, so maximum extra bytes is sizeof(void *) + align - 1. Tested by: Andre Albsmeier < mail at ma17 dot ata dot myota dot orgndre > MFC r262334: Increase alignment to size of pointer if the alignment is too small. Some modules do not align data at least to size of pointer, they uses a smaller alignment, but our pointer should be aligned to its native boundary, otherwise on some platforms, hardware alignment checking will cause bus error. Modified: stable/10/libexec/rtld-elf/xmalloc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/libexec/rtld-elf/xmalloc.c ============================================================================== --- stable/10/libexec/rtld-elf/xmalloc.c Thu Feb 27 01:24:47 2014 (r262543) +++ stable/10/libexec/rtld-elf/xmalloc.c Thu Feb 27 02:36:09 2014 (r262544) @@ -72,14 +72,12 @@ void * malloc_aligned(size_t size, size_t align) { void *mem, *res; - uintptr_t x; - size_t asize, r; - r = round(sizeof(void *), align); - asize = round(size, align) + r; - mem = xmalloc(asize); - x = (uintptr_t)mem; - res = (void *)round(x, align); + if (align < sizeof(void *)) + align = sizeof(void *); + + mem = xmalloc(size + sizeof(void *) + align - 1); + res = (void *)round((uintptr_t)mem + sizeof(void *), align); *(void **)((uintptr_t)res - sizeof(void *)) = mem; return (res); } From owner-svn-src-stable@FreeBSD.ORG Thu Feb 27 02:41:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1398B3A2; Thu, 27 Feb 2014 02:41:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F22A91999; Thu, 27 Feb 2014 02:41:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1R2ffIS050411; Thu, 27 Feb 2014 02:41:41 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1R2fflO050410; Thu, 27 Feb 2014 02:41:41 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201402270241.s1R2fflO050410@svn.freebsd.org> From: David Xu Date: Thu, 27 Feb 2014 02:41:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r262545 - stable/9/libexec/rtld-elf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2014 02:41:42 -0000 Author: davidxu Date: Thu Feb 27 02:41:41 2014 New Revision: 262545 URL: http://svnweb.freebsd.org/changeset/base/262545 Log: MFC r262277: malloc_aligned() may not leave enough space for pointer to allocated memory, saving the pointer will overwrite bytes belongs to another memory block unexpectly, to fix the problem, use (allocated address + sizeof(void *)) as initial value, and slip to next aligned address, so maximum extra bytes is sizeof(void *) + align - 1. Tested by: Andre Albsmeier < mail at ma17 dot ata dot myota dot orgndre > MFC r262334: Increase alignment to size of pointer if the alignment is too small. Some modules do not align data at least to size of pointer, they uses a smaller alignment, but our pointer should be aligned to its native boundary, otherwise on some platforms, hardware alignment checking will cause bus error. Modified: stable/9/libexec/rtld-elf/xmalloc.c Directory Properties: stable/9/ (props changed) stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/xmalloc.c ============================================================================== --- stable/9/libexec/rtld-elf/xmalloc.c Thu Feb 27 02:36:09 2014 (r262544) +++ stable/9/libexec/rtld-elf/xmalloc.c Thu Feb 27 02:41:41 2014 (r262545) @@ -72,14 +72,12 @@ void * malloc_aligned(size_t size, size_t align) { void *mem, *res; - uintptr_t x; - size_t asize, r; - r = round(sizeof(void *), align); - asize = round(size, align) + r; - mem = xmalloc(asize); - x = (uintptr_t)mem; - res = (void *)round(x, align); + if (align < sizeof(void *)) + align = sizeof(void *); + + mem = xmalloc(size + sizeof(void *) + align - 1); + res = (void *)round((uintptr_t)mem + sizeof(void *), align); *(void **)((uintptr_t)res - sizeof(void *)) = mem; return (res); } From owner-svn-src-stable@FreeBSD.ORG Thu Feb 27 13:08:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D79FC85D; Thu, 27 Feb 2014 13:08:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C2830160D; Thu, 27 Feb 2014 13:08:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1RD8hRY055026; Thu, 27 Feb 2014 13:08:43 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1RD8hen055025; Thu, 27 Feb 2014 13:08:43 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201402271308.s1RD8hen055025@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Thu, 27 Feb 2014 13:08:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262556 - stable/10/sbin/ifconfig X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2014 13:08:43 -0000 Author: des Date: Thu Feb 27 13:08:43 2014 New Revision: 262556 URL: http://svnweb.freebsd.org/changeset/base/262556 Log: MFH (r256768): don't report an error for no-op add / remove Modified: stable/10/sbin/ifconfig/ifgroup.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ifconfig/ifgroup.c ============================================================================== --- stable/10/sbin/ifconfig/ifgroup.c Thu Feb 27 13:05:56 2014 (r262555) +++ stable/10/sbin/ifconfig/ifgroup.c Thu Feb 27 13:08:43 2014 (r262556) @@ -57,7 +57,7 @@ setifgroup(const char *group_name, int d if (strlcpy(ifgr.ifgr_group, group_name, IFNAMSIZ) >= IFNAMSIZ) errx(1, "setifgroup: group name too long"); - if (ioctl(s, SIOCAIFGROUP, (caddr_t)&ifgr) == -1) + if (ioctl(s, SIOCAIFGROUP, (caddr_t)&ifgr) == -1 && errno != EEXIST) err(1," SIOCAIFGROUP"); } @@ -75,7 +75,7 @@ unsetifgroup(const char *group_name, int if (strlcpy(ifgr.ifgr_group, group_name, IFNAMSIZ) >= IFNAMSIZ) errx(1, "unsetifgroup: group name too long"); - if (ioctl(s, SIOCDIFGROUP, (caddr_t)&ifgr) == -1) + if (ioctl(s, SIOCDIFGROUP, (caddr_t)&ifgr) == -1 && errno != ENOENT) err(1, "SIOCDIFGROUP"); } From owner-svn-src-stable@FreeBSD.ORG Thu Feb 27 13:19:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1097C20; Thu, 27 Feb 2014 13:19:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DBB7716EC; Thu, 27 Feb 2014 13:19:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1RDJHsX059569; Thu, 27 Feb 2014 13:19:17 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1RDJH3L059567; Thu, 27 Feb 2014 13:19:17 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201402271319.s1RDJH3L059567@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Thu, 27 Feb 2014 13:19:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262557 - in stable/10/etc: . rc.d X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2014 13:19:18 -0000 Author: des Date: Thu Feb 27 13:19:17 2014 New Revision: 262557 URL: http://svnweb.freebsd.org/changeset/base/262557 Log: MFH (r256875): start rtsold if necessary MFH (r256878): add a reload command Modified: stable/10/etc/netstart stable/10/etc/rc.d/rtadvd Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/netstart ============================================================================== --- stable/10/etc/netstart Thu Feb 27 13:08:43 2014 (r262556) +++ stable/10/etc/netstart Thu Feb 27 13:19:17 2014 (r262557) @@ -59,6 +59,7 @@ _start=quietstart /etc/rc.d/route6d ${_start} /etc/rc.d/mrouted ${_start} /etc/rc.d/routed ${_start} +/etc/rc.d/rtsold ${_start} /etc/rc.d/nisdomain ${_start} exit 0 Modified: stable/10/etc/rc.d/rtadvd ============================================================================== --- stable/10/etc/rc.d/rtadvd Thu Feb 27 13:08:43 2014 (r262556) +++ stable/10/etc/rc.d/rtadvd Thu Feb 27 13:19:17 2014 (r262557) @@ -14,6 +14,8 @@ name="rtadvd" rcvar="rtadvd_enable" command="/usr/sbin/${name}" +extra_commands="reload" +reload_cmd="rtadvd_reload" start_precmd="rtadvd_precmd" rtadvd_precmd() @@ -62,5 +64,9 @@ rtadvd_precmd() return 0 } +rtadvd_reload() { + /usr/sbin/rtadvctl reload +} + load_rc_config $name run_rc_command "$1" From owner-svn-src-stable@FreeBSD.ORG Thu Feb 27 13:25:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B3725149; Thu, 27 Feb 2014 13:25:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8385117B1; Thu, 27 Feb 2014 13:25:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1RDPRDb063559; Thu, 27 Feb 2014 13:25:27 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1RDPRfX063557; Thu, 27 Feb 2014 13:25:27 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201402271325.s1RDPRfX063557@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Thu, 27 Feb 2014 13:25:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262558 - stable/10/usr.bin/fetch X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2014 13:25:27 -0000 Author: des Date: Thu Feb 27 13:25:26 2014 New Revision: 262558 URL: http://svnweb.freebsd.org/changeset/base/262558 Log: MFH (r261233): fix whitespace and bump copyright MFH (r261234): increase buffer size Modified: stable/10/usr.bin/fetch/fetch.1 stable/10/usr.bin/fetch/fetch.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/fetch/fetch.1 ============================================================================== --- stable/10/usr.bin/fetch/fetch.1 Thu Feb 27 13:19:17 2014 (r262557) +++ stable/10/usr.bin/fetch/fetch.1 Thu Feb 27 13:25:26 2014 (r262558) @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2000-2013 Dag-Erling Smørgrav +.\" Copyright (c) 2000-2014 Dag-Erling Smørgrav .\" Copyright (c) 2013 Michael Gmelin .\" All rights reserved. .\" Portions Copyright (c) 1999 Massachusetts Institute of Technology; used @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 30, 2013 +.Dd January 28, 2014 .Dt FETCH 1 .Os .Sh NAME @@ -118,7 +118,7 @@ Automatically retry the transfer upon so Allow SSL version 2 when negotiating the connection. .It Fl B Ar bytes , Fl -buffer-size= Ns Ar bytes Specify the read buffer size in bytes. -The default is 4096 bytes. +The default is 16,384 bytes. Attempts to set a buffer size lower than this will be silently ignored. The number of reads actually performed is reported at verbosity level Modified: stable/10/usr.bin/fetch/fetch.c ============================================================================== --- stable/10/usr.bin/fetch/fetch.c Thu Feb 27 13:19:17 2014 (r262557) +++ stable/10/usr.bin/fetch/fetch.c Thu Feb 27 13:25:26 2014 (r262558) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2000-2011 Dag-Erling Smørgrav + * Copyright (c) 2000-2014 Dag-Erling Smørgrav * Copyright (c) 2013 Michael Gmelin * All rights reserved. * @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); #include -#define MINBUFSIZE 4096 +#define MINBUFSIZE 16384 #define TIMEOUT 120 /* Option flags */ @@ -109,7 +109,7 @@ enum options OPTION_SSL_CLIENT_KEY_FILE, OPTION_SSL_CRL_FILE, OPTION_SSL_NO_SSL3, - OPTION_SSL_NO_TLS1, + OPTION_SSL_NO_TLS1, OPTION_SSL_NO_VERIFY_HOSTNAME, OPTION_SSL_NO_VERIFY_PEER }; @@ -147,7 +147,7 @@ static struct option longopts[] = { "passive-portrange-default", no_argument, NULL, 'T' }, { "verbose", no_argument, NULL, 'v' }, { "retry-delay", required_argument, NULL, 'w' }, - + /* options without a single character equivalent */ { "bind-address", required_argument, NULL, OPTION_BIND_ADDRESS }, { "no-passive", no_argument, NULL, OPTION_NO_FTP_PASSIVE_MODE }, @@ -716,6 +716,7 @@ fetch(char *URL, const char *path) sigalrm = siginfo = sigint = 0; /* suck in the data */ + setvbuf(f, NULL, _IOFBF, B_size); signal(SIGINFO, sig_handler); while (!sigint) { if (us.size != -1 && us.size - count < B_size && From owner-svn-src-stable@FreeBSD.ORG Thu Feb 27 13:27:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1445408; Thu, 27 Feb 2014 13:27:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AC15917CE; Thu, 27 Feb 2014 13:27:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1RDR5Qf063878; Thu, 27 Feb 2014 13:27:05 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1RDR5Vo063875; Thu, 27 Feb 2014 13:27:05 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201402271327.s1RDR5Vo063875@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Thu, 27 Feb 2014 13:27:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262560 - stable/10/lib/libfetch X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2014 13:27:05 -0000 Author: des Date: Thu Feb 27 13:27:04 2014 New Revision: 262560 URL: http://svnweb.freebsd.org/changeset/base/262560 Log: MFH (r260904): fix format string MFH (r261230, r261263): fix buffering issues MFH (r261284): bump copyright Modified: stable/10/lib/libfetch/common.c stable/10/lib/libfetch/common.h stable/10/lib/libfetch/http.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libfetch/common.c ============================================================================== --- stable/10/lib/libfetch/common.c Thu Feb 27 13:26:41 2014 (r262559) +++ stable/10/lib/libfetch/common.c Thu Feb 27 13:27:04 2014 (r262560) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1998-2011 Dag-Erling Smørgrav + * Copyright (c) 1998-2014 Dag-Erling Smørgrav * Copyright (c) 2013 Michael Gmelin * All rights reserved. * @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -641,7 +642,7 @@ fetch_ssl_verify_hname(X509 *cert, const struct addrinfo *ip; STACK_OF(GENERAL_NAME) *altnames; X509_NAME *subject; - int ret; + int ret; ret = 0; ip = fetch_ssl_get_numeric_addrinfo(host, strlen(host)); @@ -679,7 +680,7 @@ fetch_ssl_setup_transport_layer(SSL_CTX if (getenv("SSL_NO_TLS1") != NULL) ssl_ctx_options |= SSL_OP_NO_TLSv1; if (verbose) - fetch_info("SSL options: %x", ssl_ctx_options); + fetch_info("SSL options: %lx", ssl_ctx_options); SSL_CTX_set_options(ctx, ssl_ctx_options); } @@ -913,33 +914,6 @@ fetch_ssl_read(SSL *ssl, char *buf, size } #endif -/* - * Cache some data that was read from a socket but cannot be immediately - * returned because of an interrupted system call. - */ -static int -fetch_cache_data(conn_t *conn, char *src, size_t nbytes) -{ - char *tmp; - - if (conn->cache.size < nbytes) { - tmp = realloc(conn->cache.buf, nbytes); - if (tmp == NULL) { - fetch_syserr(); - return (-1); - } - conn->cache.buf = tmp; - conn->cache.size = nbytes; - } - - memcpy(conn->cache.buf, src, nbytes); - conn->cache.len = nbytes; - conn->cache.pos = 0; - - return (0); -} - - static ssize_t fetch_socket_read(int sd, char *buf, size_t len) { @@ -962,46 +936,31 @@ ssize_t fetch_read(conn_t *conn, char *buf, size_t len) { struct timeval now, timeout, delta; - fd_set readfds; - ssize_t rlen, total; - char *start; + struct pollfd pfd; + ssize_t rlen; + int deltams; if (fetchTimeout > 0) { gettimeofday(&timeout, NULL); timeout.tv_sec += fetchTimeout; } - total = 0; - start = buf; - - if (conn->cache.len > 0) { - /* - * The last invocation of fetch_read was interrupted by a - * signal after some data had been read from the socket. Copy - * the cached data into the supplied buffer before trying to - * read from the socket again. - */ - total = (conn->cache.len < len) ? conn->cache.len : len; - memcpy(buf, conn->cache.buf, total); - - conn->cache.len -= total; - conn->cache.pos += total; - len -= total; - buf += total; - } + deltams = INFTIM; + memset(&pfd, 0, sizeof pfd); + pfd.fd = conn->sd; + pfd.events = POLLIN | POLLERR; - while (len > 0) { + for (;;) { /* * The socket is non-blocking. Instead of the canonical - * select() -> read(), we do the following: + * poll() -> read(), we do the following: * * 1) call read() or SSL_read(). - * 2) if an error occurred, return -1. - * 3) if we received data but we still expect more, - * update our counters and loop. + * 2) if we received some data, return it. + * 3) if an error occurred, return -1. * 4) if read() or SSL_read() signaled EOF, return. * 5) if we did not receive any data but we're not at EOF, - * call select(). + * call poll(). * * In the SSL case, this is necessary because if we * receive a close notification, we have to call @@ -1017,46 +976,34 @@ fetch_read(conn_t *conn, char *buf, size else #endif rlen = fetch_socket_read(conn->sd, buf, len); - if (rlen == 0) { + if (rlen >= 0) { break; - } else if (rlen > 0) { - len -= rlen; - buf += rlen; - total += rlen; - continue; } else if (rlen == FETCH_READ_ERROR) { - if (errno == EINTR) - fetch_cache_data(conn, start, total); + fetch_syserr(); return (-1); } // assert(rlen == FETCH_READ_WAIT); - FD_ZERO(&readfds); - while (!FD_ISSET(conn->sd, &readfds)) { - FD_SET(conn->sd, &readfds); - if (fetchTimeout > 0) { - gettimeofday(&now, NULL); - if (!timercmp(&timeout, &now, >)) { - errno = ETIMEDOUT; - fetch_syserr(); - return (-1); - } - timersub(&timeout, &now, &delta); - } - errno = 0; - if (select(conn->sd + 1, &readfds, NULL, NULL, - fetchTimeout > 0 ? &delta : NULL) < 0) { - if (errno == EINTR) { - if (fetchRestartCalls) - continue; - /* Save anything that was read. */ - fetch_cache_data(conn, start, total); - } + if (fetchTimeout > 0) { + gettimeofday(&now, NULL); + if (!timercmp(&timeout, &now, >)) { + errno = ETIMEDOUT; fetch_syserr(); return (-1); } + timersub(&timeout, &now, &delta); + deltams = delta.tv_sec * 1000 + + delta.tv_usec / 1000;; + } + errno = 0; + pfd.revents = 0; + if (poll(&pfd, 1, deltams) < 0) { + if (errno == EINTR && fetchRestartCalls) + continue; + fetch_syserr(); + return (-1); } } - return (total); + return (rlen); } @@ -1130,35 +1077,33 @@ ssize_t fetch_writev(conn_t *conn, struct iovec *iov, int iovcnt) { struct timeval now, timeout, delta; - fd_set writefds; + struct pollfd pfd; ssize_t wlen, total; - int r; + int deltams; + memset(&pfd, 0, sizeof pfd); if (fetchTimeout) { - FD_ZERO(&writefds); + pfd.fd = conn->sd; + pfd.events = POLLOUT | POLLERR; gettimeofday(&timeout, NULL); timeout.tv_sec += fetchTimeout; } total = 0; while (iovcnt > 0) { - while (fetchTimeout && !FD_ISSET(conn->sd, &writefds)) { - FD_SET(conn->sd, &writefds); + while (fetchTimeout && pfd.revents == 0) { gettimeofday(&now, NULL); - delta.tv_sec = timeout.tv_sec - now.tv_sec; - delta.tv_usec = timeout.tv_usec - now.tv_usec; - if (delta.tv_usec < 0) { - delta.tv_usec += 1000000; - delta.tv_sec--; - } - if (delta.tv_sec < 0) { + if (!timercmp(&timeout, &now, >)) { errno = ETIMEDOUT; fetch_syserr(); return (-1); } + timersub(&timeout, &now, &delta); + deltams = delta.tv_sec * 1000 + + delta.tv_usec / 1000; errno = 0; - r = select(conn->sd + 1, NULL, &writefds, NULL, &delta); - if (r == -1) { + pfd.revents = 0; + if (poll(&pfd, 1, deltams) < 0) { if (errno == EINTR && fetchRestartCalls) continue; return (-1); @@ -1250,7 +1195,6 @@ fetch_close(conn_t *conn) } #endif ret = close(conn->sd); - free(conn->cache.buf); free(conn->buf); free(conn); return (ret); Modified: stable/10/lib/libfetch/common.h ============================================================================== --- stable/10/lib/libfetch/common.h Thu Feb 27 13:26:41 2014 (r262559) +++ stable/10/lib/libfetch/common.h Thu Feb 27 13:27:04 2014 (r262560) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1998-2011 Dag-Erling Smørgrav + * Copyright (c) 1998-2014 Dag-Erling Smørgrav * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -52,13 +52,6 @@ struct fetchconn { size_t bufsize; /* buffer size */ size_t buflen; /* length of buffer contents */ int err; /* last protocol reply code */ - struct { /* data cached after an interrupted - read */ - char *buf; - size_t size; - size_t pos; - size_t len; - } cache; #ifdef WITH_SSL SSL *ssl; /* SSL handle */ SSL_CTX *ssl_ctx; /* SSL context */ Modified: stable/10/lib/libfetch/http.c ============================================================================== --- stable/10/lib/libfetch/http.c Thu Feb 27 13:26:41 2014 (r262559) +++ stable/10/lib/libfetch/http.c Thu Feb 27 13:27:04 2014 (r262560) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2000-2013 Dag-Erling Smørgrav + * Copyright (c) 2000-2014 Dag-Erling Smørgrav * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -204,10 +204,11 @@ http_growbuf(struct httpio *io, size_t l /* * Fill the input buffer, do chunk decoding on the fly */ -static int +static ssize_t http_fillbuf(struct httpio *io, size_t len) { ssize_t nbytes; + char ch; if (io->error) return (-1); @@ -229,7 +230,7 @@ http_fillbuf(struct httpio *io, size_t l if (io->chunksize == 0) { switch (http_new_chunk(io)) { case -1: - io->error = 1; + io->error = EPROTO; return (-1); case 0: io->eof = 1; @@ -249,10 +250,8 @@ http_fillbuf(struct httpio *io, size_t l io->chunksize -= io->buflen; if (io->chunksize == 0) { - char endl[2]; - - if (fetch_read(io->conn, endl, 2) != 2 || - endl[0] != '\r' || endl[1] != '\n') + if (fetch_read(io->conn, &ch, 1) != 1 || ch != '\r' || + fetch_read(io->conn, &ch, 1) != 1 || ch != '\n') return (-1); } @@ -268,31 +267,30 @@ static int http_readfn(void *v, char *buf, int len) { struct httpio *io = (struct httpio *)v; - int l, pos; + int rlen; if (io->error) return (-1); if (io->eof) return (0); - for (pos = 0; len > 0; pos += l, len -= l) { - /* empty buffer */ - if (!io->buf || io->bufpos == io->buflen) - if (http_fillbuf(io, len) < 1) - break; - l = io->buflen - io->bufpos; - if (len < l) - l = len; - memcpy(buf + pos, io->buf + io->bufpos, l); - io->bufpos += l; + /* empty buffer */ + if (!io->buf || io->bufpos == io->buflen) { + if ((rlen = http_fillbuf(io, len)) < 0) { + if ((errno = io->error) == EINTR) + io->error = 0; + return (-1); + } else if (rlen == 0) { + return (0); + } } - if (!pos && io->error) { - if (io->error == EINTR) - io->error = 0; - return (-1); - } - return (pos); + rlen = io->buflen - io->bufpos; + if (len < rlen) + rlen = len; + memcpy(buf, io->buf + io->bufpos, rlen); + io->bufpos += rlen; + return (rlen); } /* From owner-svn-src-stable@FreeBSD.ORG Thu Feb 27 16:05:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 097EEAD4; Thu, 27 Feb 2014 16:05:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DE1A01591; Thu, 27 Feb 2014 16:05:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1RG5qQD038758; Thu, 27 Feb 2014 16:05:52 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1RG5qZD038756; Thu, 27 Feb 2014 16:05:52 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201402271605.s1RG5qZD038756@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Thu, 27 Feb 2014 16:05:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262563 - stable/10/sys/fs/ext2fs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2014 16:05:53 -0000 Author: pfg Date: Thu Feb 27 16:05:52 2014 New Revision: 262563 URL: http://svnweb.freebsd.org/changeset/base/262563 Log: MFC r262346: ext2fs: fully enable ext4 read-only support. The ext4 developers tend to tag Ext4-specific flags as "incompatible" even when such features are not relevant for read-only support. This is a consequence of the process though which this filesystem is implemented without design and the fact that some new features are not extensible to ext2/3. Organize the features according to what we support and sort them so that we can now read-only mount filesystems with some features that may be found in newly formatted ext4 fs. Submitted by: Zheng Liu Modified: stable/10/sys/fs/ext2fs/ext2_vfsops.c stable/10/sys/fs/ext2fs/ext2fs.h Modified: stable/10/sys/fs/ext2fs/ext2_vfsops.c ============================================================================== --- stable/10/sys/fs/ext2fs/ext2_vfsops.c Thu Feb 27 13:31:54 2014 (r262562) +++ stable/10/sys/fs/ext2fs/ext2_vfsops.c Thu Feb 27 16:05:52 2014 (r262563) @@ -290,7 +290,8 @@ ext2_check_sb_compat(struct ext2fs *es, return (1); } if (es->e2fs_rev > E2FS_REV0) { - if (es->e2fs_features_incompat & ~EXT2F_INCOMPAT_SUPP) { + if (es->e2fs_features_incompat & ~(EXT2F_INCOMPAT_SUPP | + EXT4F_RO_INCOMPAT_SUPP)) { printf( "WARNING: mount of %s denied due to unsupported optional features\n", devtoname(dev)); Modified: stable/10/sys/fs/ext2fs/ext2fs.h ============================================================================== --- stable/10/sys/fs/ext2fs/ext2fs.h Thu Feb 27 13:31:54 2014 (r262562) +++ stable/10/sys/fs/ext2fs/ext2fs.h Thu Feb 27 16:05:52 2014 (r262563) @@ -200,19 +200,26 @@ struct csum { * We support the following REV1 features: * - EXT2F_ROCOMPAT_SPARSESUPER * - EXT2F_ROCOMPAT_LARGEFILE + * - EXT2F_ROCOMPAT_EXTRA_ISIZE * - EXT2F_INCOMPAT_FTYPE * - * We partially (read-only) support the following EXT4 features: + * We partially support (read-only) the following EXT4 features: * - EXT2F_ROCOMPAT_HUGE_FILE - * - EXT2F_ROCOMPAT_EXTRA_ISIZE * - EXT2F_INCOMPAT_EXTENTS + * + * We do not support these EXT4 features but they are irrelevant + * for read-only support: + * - EXT2F_INCOMPAT_FLEX_BG + * - EXT2F_INCOMPAT_META_BG */ -#define EXT2F_COMPAT_SUPP 0x0000 +#define EXT2F_COMPAT_SUPP EXT2F_COMPAT_DIRHASHINDEX #define EXT2F_ROCOMPAT_SUPP (EXT2F_ROCOMPAT_SPARSESUPER | \ EXT2F_ROCOMPAT_LARGEFILE | \ EXT2F_ROCOMPAT_EXTRA_ISIZE) -#define EXT2F_INCOMPAT_SUPP (EXT2F_INCOMPAT_FTYPE | \ - EXT2F_INCOMPAT_EXTENTS) +#define EXT2F_INCOMPAT_SUPP EXT2F_INCOMPAT_FTYPE +#define EXT4F_RO_INCOMPAT_SUPP (EXT2F_INCOMPAT_EXTENTS | \ + EXT2F_INCOMPAT_FLEX_BG | \ + EXT2F_INCOMPAT_META_BG ) /* Assume that user mode programs are passing in an ext2fs superblock, not * a kernel struct super_block. This will allow us to call the feature-test From owner-svn-src-stable@FreeBSD.ORG Thu Feb 27 16:07:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE136D29; Thu, 27 Feb 2014 16:07:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8FF2515AC; Thu, 27 Feb 2014 16:07:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1RG7DDN039146; Thu, 27 Feb 2014 16:07:13 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1RG7Dfn039144; Thu, 27 Feb 2014 16:07:13 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201402271607.s1RG7Dfn039144@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Thu, 27 Feb 2014 16:07:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r262564 - stable/9/sys/fs/ext2fs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2014 16:07:13 -0000 Author: pfg Date: Thu Feb 27 16:07:12 2014 New Revision: 262564 URL: http://svnweb.freebsd.org/changeset/base/262564 Log: MFC r262346: ext2fs: fully enable ext4 read-only support. The ext4 developers tend to tag Ext4-specific flags as "incompatible" even when such features are not relevant for read-only support. This is a consequence of the process though which this filesystem is implemented without design and the fact that some new features are not extensible to ext2/3. Organize the features according to what we support and sort them so that we can now read-only mount filesystems with some features that may be found in newly formatted ext4 fs. Submitted by: Zheng Liu Modified: stable/9/sys/fs/ext2fs/ext2_vfsops.c stable/9/sys/fs/ext2fs/ext2fs.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/ext2fs/ext2_vfsops.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_vfsops.c Thu Feb 27 16:05:52 2014 (r262563) +++ stable/9/sys/fs/ext2fs/ext2_vfsops.c Thu Feb 27 16:07:12 2014 (r262564) @@ -290,7 +290,8 @@ ext2_check_sb_compat(struct ext2fs *es, return (1); } if (es->e2fs_rev > E2FS_REV0) { - if (es->e2fs_features_incompat & ~EXT2F_INCOMPAT_SUPP) { + if (es->e2fs_features_incompat & ~(EXT2F_INCOMPAT_SUPP | + EXT4F_RO_INCOMPAT_SUPP)) { printf( "WARNING: mount of %s denied due to unsupported optional features\n", devtoname(dev)); Modified: stable/9/sys/fs/ext2fs/ext2fs.h ============================================================================== --- stable/9/sys/fs/ext2fs/ext2fs.h Thu Feb 27 16:05:52 2014 (r262563) +++ stable/9/sys/fs/ext2fs/ext2fs.h Thu Feb 27 16:07:12 2014 (r262564) @@ -200,19 +200,26 @@ struct csum { * We support the following REV1 features: * - EXT2F_ROCOMPAT_SPARSESUPER * - EXT2F_ROCOMPAT_LARGEFILE + * - EXT2F_ROCOMPAT_EXTRA_ISIZE * - EXT2F_INCOMPAT_FTYPE * * We partially (read-only) support the following EXT4 features: * - EXT2F_ROCOMPAT_HUGE_FILE - * - EXT2F_ROCOMPAT_EXTRA_ISIZE * - EXT2F_INCOMPAT_EXTENTS + * + * We do not support these EXT4 features but they are irrelevant + * for read-only support: + * - EXT2F_INCOMPAT_FLEX_BG + * - EXT2F_INCOMPAT_META_BG */ -#define EXT2F_COMPAT_SUPP 0x0000 +#define EXT2F_COMPAT_SUPP EXT2F_COMPAT_DIRHASHINDEX #define EXT2F_ROCOMPAT_SUPP (EXT2F_ROCOMPAT_SPARSESUPER | \ EXT2F_ROCOMPAT_LARGEFILE | \ EXT2F_ROCOMPAT_EXTRA_ISIZE) -#define EXT2F_INCOMPAT_SUPP (EXT2F_INCOMPAT_FTYPE | \ - EXT2F_INCOMPAT_EXTENTS) +#define EXT2F_INCOMPAT_SUPP EXT2F_INCOMPAT_FTYPE +#define EXT4F_RO_INCOMPAT_SUPP (EXT2F_INCOMPAT_EXTENTS | \ + EXT2F_INCOMPAT_FLEX_BG | \ + EXT2F_INCOMPAT_META_BG ) /* Assume that user mode programs are passing in an ext2fs superblock, not * a kernel struct super_block. This will allow us to call the feature-test From owner-svn-src-stable@FreeBSD.ORG Thu Feb 27 17:29:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D8CC4435; Thu, 27 Feb 2014 17:29:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BF9F01FC8; Thu, 27 Feb 2014 17:29:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1RHT296075260; Thu, 27 Feb 2014 17:29:02 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1RHT2rx075258; Thu, 27 Feb 2014 17:29:02 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201402271729.s1RHT2rx075258@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Thu, 27 Feb 2014 17:29:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262566 - in stable/10: crypto/openssh crypto/openssh/contrib/caldera crypto/openssh/contrib/cygwin crypto/openssh/contrib/redhat crypto/openssh/contrib/suse crypto/openssh/openbsd-comp... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2014 17:29:02 -0000 Author: des Date: Thu Feb 27 17:29:02 2014 New Revision: 262566 URL: http://svnweb.freebsd.org/changeset/base/262566 Log: MFH (r261320): upgrade openssh to 6.5p1 MFH (r261340): enable sandboxing by default Added: stable/10/crypto/openssh/PROTOCOL.chacha20poly1305 - copied unchanged from r261320, head/crypto/openssh/PROTOCOL.chacha20poly1305 stable/10/crypto/openssh/PROTOCOL.key - copied unchanged from r261320, head/crypto/openssh/PROTOCOL.key stable/10/crypto/openssh/blocks.c - copied unchanged from r261320, head/crypto/openssh/blocks.c stable/10/crypto/openssh/chacha.c - copied unchanged from r261320, head/crypto/openssh/chacha.c stable/10/crypto/openssh/chacha.h - copied unchanged from r261320, head/crypto/openssh/chacha.h stable/10/crypto/openssh/cipher-chachapoly.c - copied unchanged from r261320, head/crypto/openssh/cipher-chachapoly.c stable/10/crypto/openssh/cipher-chachapoly.h - copied unchanged from r261320, head/crypto/openssh/cipher-chachapoly.h stable/10/crypto/openssh/crypto_api.h - copied unchanged from r261320, head/crypto/openssh/crypto_api.h stable/10/crypto/openssh/digest.c - copied unchanged from r261320, head/crypto/openssh/digest.c stable/10/crypto/openssh/digest.h - copied unchanged from r261320, head/crypto/openssh/digest.h stable/10/crypto/openssh/ed25519.c - copied unchanged from r261320, head/crypto/openssh/ed25519.c stable/10/crypto/openssh/fe25519.c - copied unchanged from r261320, head/crypto/openssh/fe25519.c stable/10/crypto/openssh/fe25519.h - copied unchanged from r261320, head/crypto/openssh/fe25519.h stable/10/crypto/openssh/ge25519.c - copied unchanged from r261320, head/crypto/openssh/ge25519.c stable/10/crypto/openssh/ge25519.h - copied unchanged from r261320, head/crypto/openssh/ge25519.h stable/10/crypto/openssh/ge25519_base.data - copied unchanged from r261320, head/crypto/openssh/ge25519_base.data stable/10/crypto/openssh/hash.c - copied unchanged from r261320, head/crypto/openssh/hash.c stable/10/crypto/openssh/kexc25519.c - copied unchanged from r261320, head/crypto/openssh/kexc25519.c stable/10/crypto/openssh/kexc25519c.c - copied unchanged from r261320, head/crypto/openssh/kexc25519c.c stable/10/crypto/openssh/kexc25519s.c - copied unchanged from r261320, head/crypto/openssh/kexc25519s.c stable/10/crypto/openssh/openbsd-compat/arc4random.c - copied unchanged from r261320, head/crypto/openssh/openbsd-compat/arc4random.c stable/10/crypto/openssh/openbsd-compat/bcrypt_pbkdf.c - copied unchanged from r261320, head/crypto/openssh/openbsd-compat/bcrypt_pbkdf.c stable/10/crypto/openssh/openbsd-compat/blf.h - copied unchanged from r261320, head/crypto/openssh/openbsd-compat/blf.h stable/10/crypto/openssh/openbsd-compat/blowfish.c - copied unchanged from r261320, head/crypto/openssh/openbsd-compat/blowfish.c stable/10/crypto/openssh/openbsd-compat/chacha_private.h - copied unchanged from r261320, head/crypto/openssh/openbsd-compat/chacha_private.h stable/10/crypto/openssh/poly1305.c - copied unchanged from r261320, head/crypto/openssh/poly1305.c stable/10/crypto/openssh/poly1305.h - copied unchanged from r261320, head/crypto/openssh/poly1305.h stable/10/crypto/openssh/regress/setuid-allowed.c - copied unchanged from r261320, head/crypto/openssh/regress/setuid-allowed.c stable/10/crypto/openssh/regress/sftp-perm.sh - copied unchanged from r261320, head/crypto/openssh/regress/sftp-perm.sh stable/10/crypto/openssh/sandbox-capsicum.c - copied unchanged from r261320, head/crypto/openssh/sandbox-capsicum.c stable/10/crypto/openssh/sc25519.c - copied unchanged from r261320, head/crypto/openssh/sc25519.c stable/10/crypto/openssh/sc25519.h - copied unchanged from r261320, head/crypto/openssh/sc25519.h stable/10/crypto/openssh/smult_curve25519_ref.c - copied unchanged from r261320, head/crypto/openssh/smult_curve25519_ref.c stable/10/crypto/openssh/ssh-ed25519.c - copied unchanged from r261320, head/crypto/openssh/ssh-ed25519.c stable/10/crypto/openssh/verify.c - copied unchanged from r261320, head/crypto/openssh/verify.c Deleted: stable/10/crypto/openssh/openbsd-compat/bsd-arc4random.c Modified: stable/10/crypto/openssh/ChangeLog stable/10/crypto/openssh/Makefile.in stable/10/crypto/openssh/PROTOCOL stable/10/crypto/openssh/README stable/10/crypto/openssh/aclocal.m4 stable/10/crypto/openssh/addrmatch.c stable/10/crypto/openssh/atomicio.c stable/10/crypto/openssh/auth-krb5.c stable/10/crypto/openssh/auth-options.c stable/10/crypto/openssh/auth-pam.c stable/10/crypto/openssh/auth2-hostbased.c stable/10/crypto/openssh/auth2-pubkey.c stable/10/crypto/openssh/authfd.c stable/10/crypto/openssh/authfile.c stable/10/crypto/openssh/authfile.h stable/10/crypto/openssh/bufaux.c stable/10/crypto/openssh/bufbn.c stable/10/crypto/openssh/buffer.c stable/10/crypto/openssh/buffer.h stable/10/crypto/openssh/canohost.c stable/10/crypto/openssh/channels.c stable/10/crypto/openssh/cipher.c stable/10/crypto/openssh/cipher.h stable/10/crypto/openssh/clientloop.c stable/10/crypto/openssh/compat.c stable/10/crypto/openssh/compat.h stable/10/crypto/openssh/config.h stable/10/crypto/openssh/config.h.in stable/10/crypto/openssh/configure stable/10/crypto/openssh/configure.ac stable/10/crypto/openssh/contrib/caldera/openssh.spec stable/10/crypto/openssh/contrib/cygwin/ssh-host-config stable/10/crypto/openssh/contrib/redhat/openssh.spec stable/10/crypto/openssh/contrib/suse/openssh.spec stable/10/crypto/openssh/defines.h stable/10/crypto/openssh/dh.c stable/10/crypto/openssh/dh.h stable/10/crypto/openssh/gss-serv-krb5.c stable/10/crypto/openssh/hostfile.c stable/10/crypto/openssh/kex.c stable/10/crypto/openssh/kex.h stable/10/crypto/openssh/kexdh.c stable/10/crypto/openssh/kexdhc.c stable/10/crypto/openssh/kexdhs.c stable/10/crypto/openssh/kexecdh.c stable/10/crypto/openssh/kexecdhc.c stable/10/crypto/openssh/kexecdhs.c stable/10/crypto/openssh/kexgex.c stable/10/crypto/openssh/kexgexc.c stable/10/crypto/openssh/kexgexs.c stable/10/crypto/openssh/key.c stable/10/crypto/openssh/key.h stable/10/crypto/openssh/loginrec.c stable/10/crypto/openssh/mac.c stable/10/crypto/openssh/mac.h stable/10/crypto/openssh/match.c stable/10/crypto/openssh/misc.c stable/10/crypto/openssh/misc.h stable/10/crypto/openssh/moduli.c stable/10/crypto/openssh/monitor.c stable/10/crypto/openssh/monitor_mm.c stable/10/crypto/openssh/monitor_mm.h stable/10/crypto/openssh/myproposal.h stable/10/crypto/openssh/openbsd-compat/Makefile.in stable/10/crypto/openssh/openbsd-compat/bsd-cygwin_util.h stable/10/crypto/openssh/openbsd-compat/bsd-misc.c stable/10/crypto/openssh/openbsd-compat/bsd-poll.c stable/10/crypto/openssh/openbsd-compat/bsd-setres_id.c stable/10/crypto/openssh/openbsd-compat/bsd-snprintf.c stable/10/crypto/openssh/openbsd-compat/bsd-statvfs.c stable/10/crypto/openssh/openbsd-compat/bsd-statvfs.h stable/10/crypto/openssh/openbsd-compat/openbsd-compat.h stable/10/crypto/openssh/openbsd-compat/openssl-compat.c stable/10/crypto/openssh/openbsd-compat/openssl-compat.h stable/10/crypto/openssh/openbsd-compat/setproctitle.c stable/10/crypto/openssh/packet.c stable/10/crypto/openssh/pathnames.h stable/10/crypto/openssh/pkcs11.h stable/10/crypto/openssh/platform.c stable/10/crypto/openssh/platform.h stable/10/crypto/openssh/progressmeter.c stable/10/crypto/openssh/readconf.c stable/10/crypto/openssh/readconf.h stable/10/crypto/openssh/regress/Makefile stable/10/crypto/openssh/regress/agent-ptrace.sh stable/10/crypto/openssh/regress/agent.sh stable/10/crypto/openssh/regress/cert-hostkey.sh stable/10/crypto/openssh/regress/cert-userkey.sh stable/10/crypto/openssh/regress/cipher-speed.sh stable/10/crypto/openssh/regress/forward-control.sh stable/10/crypto/openssh/regress/integrity.sh stable/10/crypto/openssh/regress/kextype.sh stable/10/crypto/openssh/regress/keytype.sh stable/10/crypto/openssh/regress/krl.sh stable/10/crypto/openssh/regress/modpipe.c stable/10/crypto/openssh/regress/rekey.sh stable/10/crypto/openssh/regress/scp-ssh-wrapper.sh stable/10/crypto/openssh/regress/scp.sh stable/10/crypto/openssh/regress/test-exec.sh stable/10/crypto/openssh/regress/try-ciphers.sh stable/10/crypto/openssh/roaming_client.c stable/10/crypto/openssh/roaming_common.c stable/10/crypto/openssh/sandbox-darwin.c stable/10/crypto/openssh/sandbox-null.c stable/10/crypto/openssh/sandbox-rlimit.c stable/10/crypto/openssh/sandbox-seccomp-filter.c stable/10/crypto/openssh/sandbox-systrace.c stable/10/crypto/openssh/schnorr.c stable/10/crypto/openssh/schnorr.h stable/10/crypto/openssh/scp.0 stable/10/crypto/openssh/scp.1 stable/10/crypto/openssh/scp.c stable/10/crypto/openssh/servconf.c stable/10/crypto/openssh/servconf.h stable/10/crypto/openssh/serverloop.c stable/10/crypto/openssh/session.c stable/10/crypto/openssh/session.h stable/10/crypto/openssh/sftp-client.c stable/10/crypto/openssh/sftp-client.h stable/10/crypto/openssh/sftp-common.c stable/10/crypto/openssh/sftp-glob.c stable/10/crypto/openssh/sftp-server.0 stable/10/crypto/openssh/sftp-server.8 stable/10/crypto/openssh/sftp-server.c stable/10/crypto/openssh/sftp.0 stable/10/crypto/openssh/sftp.1 stable/10/crypto/openssh/sftp.c stable/10/crypto/openssh/ssh-add.0 stable/10/crypto/openssh/ssh-add.1 stable/10/crypto/openssh/ssh-add.c stable/10/crypto/openssh/ssh-agent.0 stable/10/crypto/openssh/ssh-agent.1 stable/10/crypto/openssh/ssh-agent.c stable/10/crypto/openssh/ssh-dss.c stable/10/crypto/openssh/ssh-ecdsa.c stable/10/crypto/openssh/ssh-keygen.0 stable/10/crypto/openssh/ssh-keygen.1 stable/10/crypto/openssh/ssh-keygen.c stable/10/crypto/openssh/ssh-keyscan.0 stable/10/crypto/openssh/ssh-keyscan.1 stable/10/crypto/openssh/ssh-keyscan.c stable/10/crypto/openssh/ssh-keysign.0 stable/10/crypto/openssh/ssh-keysign.8 stable/10/crypto/openssh/ssh-keysign.c stable/10/crypto/openssh/ssh-pkcs11-helper.c stable/10/crypto/openssh/ssh-pkcs11.c stable/10/crypto/openssh/ssh-rsa.c stable/10/crypto/openssh/ssh-sandbox.h stable/10/crypto/openssh/ssh.0 stable/10/crypto/openssh/ssh.1 stable/10/crypto/openssh/ssh.c stable/10/crypto/openssh/ssh_config stable/10/crypto/openssh/ssh_config.0 stable/10/crypto/openssh/ssh_config.5 stable/10/crypto/openssh/ssh_namespace.h stable/10/crypto/openssh/sshconnect.c stable/10/crypto/openssh/sshconnect.h stable/10/crypto/openssh/sshconnect1.c stable/10/crypto/openssh/sshconnect2.c stable/10/crypto/openssh/sshd.0 stable/10/crypto/openssh/sshd.8 stable/10/crypto/openssh/sshd.c stable/10/crypto/openssh/sshd_config stable/10/crypto/openssh/sshd_config.0 stable/10/crypto/openssh/sshd_config.5 stable/10/crypto/openssh/uidswap.c stable/10/crypto/openssh/version.h stable/10/crypto/openssh/xmalloc.c stable/10/etc/rc.d/sshd stable/10/secure/lib/libssh/Makefile stable/10/secure/usr.sbin/sshd/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/crypto/openssh/ChangeLog ============================================================================== --- stable/10/crypto/openssh/ChangeLog Thu Feb 27 16:54:43 2014 (r262565) +++ stable/10/crypto/openssh/ChangeLog Thu Feb 27 17:29:02 2014 (r262566) @@ -1,25 +1,1042 @@ -20131108 +20140130 + - (djm) [configure.ac] Only check for width-specified integer types + in headers that actually exist. patch from Tom G. Christensen; + ok dtucker@ + - (djm) [configure.ac atomicio.c] Kludge around NetBSD offering + different symbols for 'read' when various compiler flags are + in use, causing atomicio.c comparisons against it to break and + read/write operations to hang; ok dtucker + - (djm) Release openssh-6.5p1 + +20140129 + - (djm) [configure.ac] Fix broken shell test '==' vs '='; patch from + Tom G. Christensen + +20140128 + - (djm) [configure.ac] Search for inet_ntop in libnsl and libresovl; + ok dtucker + - (djm) [sshd.c] Use kill(0, ...) instead of killpg(0, ...); the + latter being specified to have undefined behaviour in SUSv3; + ok dtucker + - (tim) [regress/agent.sh regress/agent-ptrace.sh] Assign $? to a variable + when used as an error message inside an if statement so we display the + correct into. agent.sh patch from Petr Lautrbach. + +20140127 + - (dtucker) [Makefile.in] Remove trailing backslash which some make + implementations (eg older Solaris) do not cope with. + +20140126 + - OpenBSD CVS Sync + - dtucker@cvs.openbsd.org 2014/01/25 10:12:50 + [cipher.c cipher.h kex.c kex.h kexgexc.c] + Add a special case for the DH group size for 3des-cbc, which has an + effective strength much lower than the key size. This causes problems + with some cryptlib implementations, which don't support group sizes larger + than 4k but also don't use the largest group size it does support as + specified in the RFC. Based on a patch from Petr Lautrbach at Redhat, + reduced by me with input from Markus. ok djm@ markus@ + - markus@cvs.openbsd.org 2014/01/25 20:35:37 + [kex.c] + dh_need needs to be set to max(seclen, blocksize, ivlen, mac_len) + ok dtucker@, noted by mancha + - (djm) [configure.ac sandbox-capsicum.c sandbox-rlimit.c] Disable + RLIMIT_NOFILE pseudo-sandbox on FreeBSD. In some configurations, + libc will attempt to open additional file descriptors for crypto + offload and crash if they cannot be opened. + - (djm) [configure.ac] correct AC_DEFINE for previous. + +20140125 + - (djm) [configure.ac] Fix detection of capsicum sandbox on FreeBSD + - (djm) [configure.ac] Do not attempt to use capsicum sandbox unless + sys/capability.h exists and cap_rights_limit is in libc. Fixes + build on FreeBSD9x which provides the header but not the libc + support. + - (djm) [configure.ac] autoconf sets finds to 'yes' not '1', so test + against the correct thing. + +20140124 + - (djm) [Makefile.in regress/scp-ssh-wrapper.sh regress/scp.sh] Make + the scp regress test actually test the built scp rather than the one + in $PATH. ok dtucker@ + +20140123 + - (tim) [session.c] Improve error reporting on set_id(). + - (dtucker) [configure.ac] NetBSD's (and FreeBSD's) strnvis is gratuitously + incompatible with OpenBSD's despite post-dating it by more than a decade. + Declare it as broken, and document FreeBSD's as the same. ok djm@ + +20140122 + - (djm) [openbsd-compat/setproctitle.c] Don't fail to compile if a + platform that is expected to use the reuse-argv style setproctitle + hack surprises us by providing a setproctitle in libc; ok dtucker + - (djm) [configure.ac] Unless specifically requested, only attempt + to build Position Independent Executables on gcc >= 4.x; ok dtucker + - (djm) [configure.ac aclocal.m4] More tests to detect fallout from + platform hardening options: include some long long int arithmatic + to detect missing support functions for -ftrapv in libgcc and + equivalents, actually test linking when -ftrapv is supplied and + set either both -pie/-fPIE or neither. feedback and ok dtucker@ + +20140121 + - (dtucker) [configure.ac] Make PIE a configure-time option which defaults + to on platforms where it's known to be reliably detected and off elsewhere. + Works around platforms such as FreeBSD 9.1 where it does not interop with + -ftrapv (it seems to work but fails when trying to link ssh). ok djm@ + - (dtucker) [aclocal.m4] Differentiate between compile-time and link-time + tests in the configure output. ok djm. + - (tim) [platform.c session.c] Fix bug affecting SVR5 platforms introduced + with sftp chroot support. Move set_id call after chroot. + - (djm) [aclocal.m4] Flesh out the code run in the OSSH_CHECK_CFLAG_COMPILE + and OSSH_CHECK_LDFLAG_LINK tests to give them a better chance of + detecting toolchain-related problems; ok dtucker + +20140120 + - (dtucker) [gss-serv-krb5.c] Fall back to krb5_cc_gen_new if the Kerberos + implementation does not have krb5_cc_new_unique, similar to what we do + in auth-krb5.c. + - (djm) [regress/cert-hostkey.sh] Fix regress failure on platforms that + skip one or more key types (e.g. RHEL/CentOS 6.5); ok dtucker@ + - (djm) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2014/01/20 00:08:48 + [digest.c] + memleak; found by Loganaden Velvindron @ AfriNIC; ok markus@ + +20140119 + - (dtucker) OpenBSD CVS Sync + - dtucker@cvs.openbsd.org 2014/01/17 06:23:24 + [sftp-server.c] + fix log message statvfs. ok djm + - dtucker@cvs.openbsd.org 2014/01/18 09:36:26 + [session.c] + explicitly define USE_PIPES to 1 to prevent redefinition warnings in + portable on platforms that use pipes for everything. From vinschen at + redhat. + - dtucker@cvs.openbsd.org 2014/01/19 04:17:29 + [canohost.c addrmatch.c] + Cast socklen_t when comparing to size_t and use socklen_t to iterate over + the ip options, both to prevent signed/unsigned comparison warnings. + Patch from vinschen at redhat via portable openssh, begrudging ok deraadt. + - djm@cvs.openbsd.org 2014/01/19 04:48:08 + [ssh_config.5] + fix inverted meaning of 'no' and 'yes' for CanonicalizeFallbackLocal + - dtucker@cvs.openbsd.org 2014/01/19 11:21:51 + [addrmatch.c] + Cast the sizeof to socklen_t so it'll work even if the supplied len is + negative. Suggested by and ok djm, ok deraadt. + +20140118 + - (dtucker) [uidswap.c] Prevent unused variable warnings on Cygwin. Patch + from vinschen at redhat.com + - (dtucker) [openbsd-compat/bsd-cygwin_util.h] Add missing function + declarations that stopped being included when we stopped including + from openbsd-compat/bsd-cygwin_util.h. Patch from vinschen at + redhat.com. + - (dtucker) [configure.ac] On Cygwin the getopt variables (like optargs, + optind) are defined in getopt.h already. Unfortunately they are defined as + "declspec(dllimport)" for historical reasons, because the GNU linker didn't + allow auto-import on PE/COFF targets way back when. The problem is the + dllexport attributes collide with the definitions in the various source + files in OpenSSH, which obviousy define the variables without + declspec(dllimport). The least intrusive way to get rid of these warnings + is to disable warnings for GCC compiler attributes when building on Cygwin. + Patch from vinschen at redhat.com. + - (dtucker) [sandbox-capsicum.c] Correct some error messages and make the + return value check for cap_enter() consistent with the other uses in + FreeBSD. From by Loganaden Velvindron @ AfriNIC via bz#2140. + +20140117 + - (dtucker) [aclocal.m4 configure.ac] Add some additional compiler/toolchain + hardening flags including -fstack-protector-strong. These default to on + if the toolchain supports them, but there is a configure-time knob + (--without-hardening) to disable them if necessary. ok djm@ + - (djm) [sftp-client.c] signed/unsigned comparison fix + - (dtucker) [loginrec.c] Cast to the types specfied in the format + specification to prevent warnings. + - (dtucker) [crypto_api.h] Wrap stdlib.h include inside #ifdef HAVE_STDINT_H. + - (dtucker) [poly1305.c] Wrap stdlib.h include inside #ifdef HAVE_STDINT_H. + - (dtucker) [blocks.c fe25519.c ge25519.c hash.c sc25519.c verify.c] Include + includes.h to pull in all of the compatibility stuff. + - (dtucker) [openbsd-compat/bcrypt_pbkdf.c] Wrap stdlib.h include inside + #ifdef HAVE_STDINT_H. + - (dtucker) [defines.h] Add typedefs for uintXX_t types for platforms that + don't have them. + - (dtucker) [configure.ac] Split AC_CHECK_FUNCS for OpenSSL functions into + separate lines and alphabetize for easier diffing of changes. + - (dtucker) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2014/01/17 00:21:06 + [sftp-client.c] + signed/unsigned comparison warning fix; from portable (Id sync only) + - dtucker@cvs.openbsd.org 2014/01/17 05:26:41 + [digest.c] + remove unused includes. ok djm@ + - (djm) [Makefile.in configure.ac sandbox-capsicum.c sandbox-darwin.c] + [sandbox-null.c sandbox-rlimit.c sandbox-seccomp-filter.c] + [sandbox-systrace.c ssh-sandbox.h sshd.c] Support preauth sandboxing + using the Capsicum API introduced in FreeBSD 10. Patch by Dag-Erling + Smorgrav, updated by Loganaden Velvindron @ AfriNIC; ok dtucker@ + - (dtucker) [configure.ac digest.c openbsd-compat/openssl-compat.c + openbsd-compat/openssl-compat.h] Add compatibility layer for older + openssl versions. ok djm@ + - (dtucker) Fix typo in #ifndef. + - (dtucker) [configure.ac openbsd-compat/bsd-statvfs.c + openbsd-compat/bsd-statvfs.h] Implement enough of statvfs on top of statfs + to be useful (and for the regression tests to pass) on platforms that + have statfs and fstatfs. ok djm@ + - (dtucker) [openbsd-compat/bsd-statvfs.h] Only start including headers if we + need them to cut down on the name collisions. + - (dtucker) [configure.ac] Also look in inttypes.h for uintXX_t types. + - (dtucker) [configure.ac] Have --without-hardening not turn off + stack-protector since that has a separate flag that's been around a while. + - (dtucker) [readconf.c] Wrap paths.h inside an ifdef. Allows building on + Solaris. + - (dtucker) [defines.h] Move our definitions of uintXX_t types down to after + they're defined if we have to define them ourselves. Fixes builds on old + AIX. + +20140118 - (djm) OpenBSD CVS Sync - - markus@cvs.openbsd.org 2013/11/06 16:52:11 - [monitor_wrap.c] - fix rekeying for AES-GCM modes; ok deraadt + - djm@cvs.openbsd.org 2014/01/16 07:31:09 + [sftp-client.c] + needless and incorrect cast to size_t can break resumption of + large download; patch from tobias@ + - djm@cvs.openbsd.org 2014/01/16 07:32:00 + [version.h] + openssh-6.5 + - (djm) [contrib/caldera/openssh.spec contrib/redhat/openssh.spec] + [contrib/suse/openssh.spec] Crank RPM spec version numbers. + - (djm) [README] update release notes URL. + +20140112 + - (djm) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2014/01/10 05:59:19 + [sshd_config] + the /etc/ssh/ssh_host_ed25519_key is loaded by default too + - djm@cvs.openbsd.org 2014/01/12 08:13:13 + [bufaux.c buffer.h kex.c kex.h kexc25519.c kexc25519c.c kexc25519s.c] + [kexdhc.c kexdhs.c kexecdhc.c kexecdhs.c kexgexc.c kexgexs.c] + avoid use of OpenSSL BIGNUM type and functions for KEX with + Curve25519 by adding a buffer_put_bignum2_from_string() that stores + a string using the bignum encoding rules. Will make it easier to + build a reduced-feature OpenSSH without OpenSSL in the future; + ok markus@ + +20140110 + - (djm) OpenBSD CVS Sync + - tedu@cvs.openbsd.org 2014/01/04 17:50:55 + [mac.c monitor_mm.c monitor_mm.h xmalloc.c] + use standard types and formats for size_t like variables. ok dtucker + - guenther@cvs.openbsd.org 2014/01/09 03:26:00 + [sftp-common.c] + When formating the time for "ls -l"-style output, show dates in the future + with the year, and rearrange a comparison to avoid a potentional signed + arithmetic overflow that would give the wrong result. + ok djm@ + - djm@cvs.openbsd.org 2014/01/09 23:20:00 + [digest.c digest.h hostfile.c kex.c kex.h kexc25519.c kexc25519c.c] + [kexc25519s.c kexdh.c kexecdh.c kexecdhc.c kexecdhs.c kexgex.c kexgexc.c] + [kexgexs.c key.c key.h roaming_client.c roaming_common.c schnorr.c] + [schnorr.h ssh-dss.c ssh-ecdsa.c ssh-rsa.c sshconnect2.c] + Introduce digest API and use it to perform all hashing operations + rather than calling OpenSSL EVP_Digest* directly. Will make it easier + to build a reduced-feature OpenSSH without OpenSSL in future; + feedback, ok markus@ + - djm@cvs.openbsd.org 2014/01/09 23:26:48 + [sshconnect.c sshd.c] + ban clients/servers that suffer from SSH_BUG_DERIVEKEY, they are ancient, + deranged and might make some attacks on KEX easier; ok markus@ + +20140108 + - (djm) [regress/.cvsignore] Ignore regress test droppings; ok dtucker@ + +20131231 + - (djm) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2013/12/30 23:52:28 + [auth2-hostbased.c auth2-pubkey.c compat.c compat.h ssh-rsa.c] + [sshconnect.c sshconnect2.c sshd.c] + refuse RSA keys from old proprietary clients/servers that use the + obsolete RSA+MD5 signature scheme. it will still be possible to connect + with these clients/servers but only DSA keys will be accepted, and we'll + deprecate them entirely in a future release. ok markus@ + +20131229 + - (djm) [loginrec.c] Check for username truncation when looking up lastlog + entries + - (djm) [regress/Makefile] Add some generated files for cleaning + - (djm) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2013/12/19 00:10:30 + [ssh-add.c] + skip requesting smartcard PIN when removing keys from agent; bz#2187 + patch from jay AT slushpupie.com; ok dtucker + - dtucker@cvs.openbsd.org 2013/12/19 00:19:12 + [serverloop.c] + Cast client_alive_interval to u_int64_t before assinging to + max_time_milliseconds to avoid potential integer overflow in the timeout. + bz#2170, patch from Loganaden Velvindron, ok djm@ + - djm@cvs.openbsd.org 2013/12/19 00:27:57 + [auth-options.c] + simplify freeing of source-address certificate restriction + - djm@cvs.openbsd.org 2013/12/19 01:04:36 + [channels.c] + bz#2147: fix multiple remote forwardings with dynamically assigned + listen ports. In the s->c message to open the channel we were sending + zero (the magic number to request a dynamic port) instead of the actual + listen port. The client therefore had no way of discriminating between + them. + + Diagnosis and fix by ronf AT timeheart.net + - djm@cvs.openbsd.org 2013/12/19 01:19:41 + [ssh-agent.c] + bz#2186: don't crash (NULL deref) when deleting PKCS#11 keys from an agent + that has a mix of normal and PKCS#11 keys; fix from jay AT slushpupie.com; + ok dtucker + - djm@cvs.openbsd.org 2013/12/19 22:57:13 + [poly1305.c poly1305.h] + use full name for author, with his permission + - tedu@cvs.openbsd.org 2013/12/21 07:10:47 + [ssh-keygen.1] + small typo + - djm@cvs.openbsd.org 2013/12/27 22:30:17 + [ssh-dss.c ssh-ecdsa.c ssh-rsa.c] + make the original RSA and DSA signing/verification code look more like + the ECDSA/Ed25519 ones: use key_type_plain() when checking the key type + rather than tediously listing all variants, use __func__ for debug/ + error messages + - djm@cvs.openbsd.org 2013/12/27 22:37:18 + [ssh-rsa.c] + correct comment + - djm@cvs.openbsd.org 2013/12/29 02:28:10 + [key.c] + allow ed25519 keys to appear as certificate authorities + - djm@cvs.openbsd.org 2013/12/29 02:37:04 + [key.c] + correct comment for key_to_certified() + - djm@cvs.openbsd.org 2013/12/29 02:49:52 + [key.c] + correct comment for key_drop_cert() + - djm@cvs.openbsd.org 2013/12/29 04:20:04 + [key.c] + to make sure we don't omit any key types as valid CA keys again, + factor the valid key type check into a key_type_is_valid_ca() + function + - djm@cvs.openbsd.org 2013/12/29 04:29:25 + [authfd.c] + allow deletion of ed25519 keys from the agent + - djm@cvs.openbsd.org 2013/12/29 04:35:50 + [authfile.c] + don't refuse to load Ed25519 certificates + - djm@cvs.openbsd.org 2013/12/29 05:42:16 + [ssh.c] + don't forget to load Ed25519 certs too + - djm@cvs.openbsd.org 2013/12/29 05:57:02 + [sshconnect.c] + when showing other hostkeys, don't forget Ed25519 keys + +20131221 + - (dtucker) [regress/keytype.sh] Actually test ecdsa key types. + +20131219 + - (dtucker) [configure.ac] bz#2178: Don't try to use BSM on Solaris versions + greater than 11 either rather than just 11. Patch from Tomas Kuthan. + - (dtucker) [auth-pam.c] bz#2163: check return value from pam_get_item(). + Patch from Loganaden Velvindron. + +20131218 + - (djm) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2013/12/07 08:08:26 + [ssh-keygen.1] + document -a and -o wrt new key format + - naddy@cvs.openbsd.org 2013/12/07 11:58:46 + [ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh-keyscan.1 ssh-keysign.8 ssh.1] + [ssh_config.5 sshd.8 sshd_config.5] + add missing mentions of ed25519; ok djm@ + - dtucker@cvs.openbsd.org 2013/12/08 09:53:27 + [sshd_config.5] + Use a literal for the default value of KEXAlgorithms. ok deraadt jmc + - markus@cvs.openbsd.org 2013/12/09 11:03:45 + [blocks.c ed25519.c fe25519.c fe25519.h ge25519.c ge25519.h] + [ge25519_base.data hash.c sc25519.c sc25519.h verify.c] + Add Authors for the public domain ed25519/nacl code. + see also http://nacl.cr.yp.to/features.html + All of the NaCl software is in the public domain. + and http://ed25519.cr.yp.to/software.html + The Ed25519 software is in the public domain. + - markus@cvs.openbsd.org 2013/12/09 11:08:17 + [crypto_api.h] + remove unused defines + - pascal@cvs.openbsd.org 2013/12/15 18:17:26 + [ssh-add.c] + Make ssh-add also add .ssh/id_ed25519; fixes lie in manual page. + ok markus@ + - djm@cvs.openbsd.org 2013/12/15 21:42:35 + [cipher-chachapoly.c] + add some comments and constify a constant + - markus@cvs.openbsd.org 2013/12/17 10:36:38 + [crypto_api.h] + I've assempled the header file by cut&pasting from generated headers + and the source files. + +20131208 + - (djm) [openbsd-compat/bsd-setres_id.c] Missing header; from Corinna + Vinschen + - (djm) [Makefile.in regress/Makefile regress/agent-ptrace.sh] + [regress/setuid-allowed.c] Check that ssh-agent is not on a no-setuid + filesystem before running agent-ptrace.sh; ok dtucker + +20131207 + - (djm) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2013/12/05 22:59:45 + [sftp-client.c] + fix memory leak in error path in do_readdir(); pointed out by + Loganaden Velvindron @ AfriNIC in bz#2163 + - djm@cvs.openbsd.org 2013/12/06 03:40:51 + [ssh-keygen.c] + remove duplicated character ('g') in getopt() string; + document the (few) remaining option characters so we don't have to + rummage next time. + - markus@cvs.openbsd.org 2013/12/06 13:30:08 + [authfd.c key.c key.h ssh-agent.c] + move private key (de)serialization to key.c; ok djm + - markus@cvs.openbsd.org 2013/12/06 13:34:54 + [authfile.c authfile.h cipher.c cipher.h key.c packet.c ssh-agent.c] + [ssh-keygen.c PROTOCOL.key] new private key format, bcrypt as KDF by + default; details in PROTOCOL.key; feedback and lots help from djm; + ok djm@ + - markus@cvs.openbsd.org 2013/12/06 13:39:49 + [authfd.c authfile.c key.c key.h myproposal.h pathnames.h readconf.c] + [servconf.c ssh-agent.c ssh-keygen.c ssh-keyscan.1 ssh-keyscan.c] + [ssh-keysign.c ssh.c ssh_config.5 sshd.8 sshd.c verify.c ssh-ed25519.c] + [sc25519.h sc25519.c hash.c ge25519_base.data ge25519.h ge25519.c] + [fe25519.h fe25519.c ed25519.c crypto_api.h blocks.c] + support ed25519 keys (hostkeys and user identities) using the public + domain ed25519 reference code from SUPERCOP, see + http://ed25519.cr.yp.to/software.html + feedback, help & ok djm@ + - jmc@cvs.openbsd.org 2013/12/06 15:29:07 + [sshd.8] + missing comma; + - djm@cvs.openbsd.org 2013/12/07 00:19:15 + [key.c] + set k->cert = NULL after freeing it + - markus@cvs.openbsd.org 2013/12/06 13:52:46 + [regress/Makefile regress/agent.sh regress/cert-hostkey.sh] + [regress/cert-userkey.sh regress/keytype.sh] + test ed25519 support; from djm@ + - (djm) [blocks.c ed25519.c fe25519.c fe25519.h ge25519.c ge25519.h] + [ge25519_base.data hash.c sc25519.c sc25519.h verify.c] Fix RCS idents + - (djm) [Makefile.in] Add ed25519 sources + - (djm) [authfile.c] Conditionalise inclusion of util.h + - (djm) [configure.ac openbsd-compat/Makefile.in openbsd-compat/bcrypt_pbkdf.c] + [openbsd-compat/blf.h openbsd-compat/blowfish.c] + [openbsd-compat/openbsd-compat.h] Start at supporting bcrypt_pbkdf in + portable. + - (djm) [ed25519.c ssh-ed25519.c openbsd-compat/Makefile.in] + [openbsd-compat/bcrypt_pbkdf.c] Make ed25519/new key format compile on + Linux + - (djm) [regress/cert-hostkey.sh] Fix merge botch + - (djm) [Makefile.in] PATHSUBS and keygen bits for Ed25519; from + Loganaden Velvindron @ AfriNIC in bz#2179 + +20131205 + - (djm) OpenBSD CVS Sync + - jmc@cvs.openbsd.org 2013/11/21 08:05:09 + [ssh_config.5 sshd_config.5] + no need for .Pp before displays; + - deraadt@cvs.openbsd.org 2013/11/25 18:04:21 + [ssh.1 ssh.c] + improve -Q usage and such. One usage change is that the option is now + case-sensitive + ok dtucker markus djm + - jmc@cvs.openbsd.org 2013/11/26 12:14:54 + [ssh.1 ssh.c] + - put -Q in the right place + - Ar was a poor choice for the arguments to -Q. i've chosen an + admittedly equally poor Cm, at least consistent with the rest + of the docs. also no need for multiple instances + - zap a now redundant Nm + - usage() sync + - deraadt@cvs.openbsd.org 2013/11/26 19:15:09 + [pkcs11.h] + cleanup 1 << 31 idioms. Resurrection of this issue pointed out by + Eitan Adler ok markus for ssh, implies same change in kerberosV + - djm@cvs.openbsd.org 2013/12/01 23:19:05 + [PROTOCOL] + mention curve25519-sha256@libssh.org key exchange algorithm + - djm@cvs.openbsd.org 2013/12/02 02:50:27 + [PROTOCOL.chacha20poly1305] + typo; from Jon Cave + - djm@cvs.openbsd.org 2013/12/02 02:56:17 + [ssh-pkcs11-helper.c] + use-after-free; bz#2175 patch from Loganaden Velvindron @ AfriNIC + - djm@cvs.openbsd.org 2013/12/02 03:09:22 + [key.c] + make key_to_blob() return a NULL blob on failure; part of + bz#2175 from Loganaden Velvindron @ AfriNIC + - djm@cvs.openbsd.org 2013/12/02 03:13:14 + [cipher.c] + correct bzero of chacha20+poly1305 key context. bz#2177 from + Loganaden Velvindron @ AfriNIC + + Also make it a memset for consistency with the rest of cipher.c + - djm@cvs.openbsd.org 2013/12/04 04:20:01 + [sftp-client.c] + bz#2171: don't leak local_fd on error; from Loganaden Velvindron @ + AfriNIC + - djm@cvs.openbsd.org 2013/12/05 01:16:41 + [servconf.c servconf.h] + bz#2161 - fix AuthorizedKeysCommand inside a Match block and + rearrange things so the same error is harder to make next time; + with and ok dtucker@ + - (dtucker) [configure.ac] bz#2173: use pkg-config --libs to include correct + -L location for libedit. Patch from Serge van den Boom. + +20131121 + - (djm) OpenBSD CVS Sync + - dtucker@cvs.openbsd.org 2013/11/08 11:15:19 + [bufaux.c bufbn.c buffer.c sftp-client.c sftp-common.c sftp-glob.c] + [uidswap.c] Include stdlib.h for free() as per the man page. + - markus@cvs.openbsd.org 2013/11/13 13:48:20 + [ssh-pkcs11.c] + add missing braces found by pedro + - djm@cvs.openbsd.org 2013/11/20 02:19:01 + [sshd.c] + delay closure of in/out fds until after "Bad protocol version + identification..." message, as get_remote_ipaddr/get_remote_port + require them open. + - deraadt@cvs.openbsd.org 2013/11/20 20:53:10 + [scp.c] + unsigned casts for ctype macros where neccessary + ok guenther millert markus + - deraadt@cvs.openbsd.org 2013/11/20 20:54:10 + [canohost.c clientloop.c match.c readconf.c sftp.c] + unsigned casts for ctype macros where neccessary + ok guenther millert markus + - djm@cvs.openbsd.org 2013/11/21 00:45:44 + [Makefile.in PROTOCOL PROTOCOL.chacha20poly1305 authfile.c chacha.c] + [chacha.h cipher-chachapoly.c cipher-chachapoly.h cipher.c cipher.h] + [dh.c myproposal.h packet.c poly1305.c poly1305.h servconf.c ssh.1] + [ssh.c ssh_config.5 sshd_config.5] Add a new protocol 2 transport + cipher "chacha20-poly1305@openssh.com" that combines Daniel + Bernstein's ChaCha20 stream cipher and Poly1305 MAC to build an + authenticated encryption mode. + + Inspired by and similar to Adam Langley's proposal for TLS: + http://tools.ietf.org/html/draft-agl-tls-chacha20poly1305-03 + but differs in layout used for the MAC calculation and the use of a + second ChaCha20 instance to separately encrypt packet lengths. + Details are in the PROTOCOL.chacha20poly1305 file. + + Feedback markus@, naddy@; manpage bits Loganden Velvindron @ AfriNIC + ok markus@ naddy@ + - naddy@cvs.openbsd.org 2013/11/18 05:09:32 + [regress/forward-control.sh] + bump timeout to 10 seconds to allow slow machines (e.g. Alpha PC164) + to successfully run this; ok djm@ + - djm@cvs.openbsd.org 2013/11/21 03:15:46 + [regress/krl.sh] + add some reminders for additional tests that I'd like to implement + - djm@cvs.openbsd.org 2013/11/21 03:16:47 + [regress/modpipe.c] + use unsigned long long instead of u_int64_t here to avoid warnings + on some systems portable OpenSSH is built on. + - djm@cvs.openbsd.org 2013/11/21 03:18:51 + [regress/cipher-speed.sh regress/integrity.sh regress/rekey.sh] + [regress/try-ciphers.sh] + use new "ssh -Q cipher-auth" query to obtain lists of authenticated + encryption ciphers instead of specifying them manually; ensures that + the new chacha20poly1305@openssh.com mode is tested; + + ok markus@ and naddy@ as part of the diff to add + chacha20poly1305@openssh.com + +20131110 + - (dtucker) [regress/keytype.sh] Populate ECDSA key types to be tested by + querying the ones that are compiled in. + +20131109 + - (dtucker) OpenBSD CVS Sync + - dtucker@cvs.openbsd.org 2013/11/09 05:41:34 + [regress/test-exec.sh regress/rekey.sh] + Use smaller test data files to speed up tests. Grow test datafiles + where necessary for a specific test. + - (dtucker) [configure.ac kex.c key.c myproposal.h] Test for the presence of + NID_X9_62_prime256v1, NID_secp384r1 and NID_secp521r1 and test that the + latter actually works before using it. Fedora (at least) has NID_secp521r1 + that doesn't work (see https://bugzilla.redhat.com/show_bug.cgi?id=1021897). + - (dtucker) [configure.ac] Fix brackets in NID_secp521r1 test. + - (dtucker) [configure.ac] Add missing "test". + - (dtucker) [key.c] Check for the correct defines for NID_secp521r1. + +20131108 + - (dtucker) OpenBSD CVS Sync + - dtucker@cvs.openbsd.org 2013/11/08 01:06:14 + [regress/rekey.sh] + Rekey less frequently during tests to speed them up + - (djm) OpenBSD CVS Sync + - dtucker@cvs.openbsd.org 2013/11/07 11:58:27 + [cipher.c cipher.h kex.c kex.h mac.c mac.h servconf.c ssh.c] + Output the effective values of Ciphers, MACs and KexAlgorithms when + the default has not been overridden. ok markus@ - djm@cvs.openbsd.org 2013/11/08 00:39:15 [auth-options.c auth2-chall.c authfd.c channels.c cipher-3des1.c] [clientloop.c gss-genr.c monitor_mm.c packet.c schnorr.c umac.c] [sftp-client.c sftp-glob.c] use calloc for all structure allocations; from markus@ - - (djm) [README contrib/caldera/openssh.spec contrib/redhat/openssh.spec] - [contrib/suse/openssh.spec] update version numbers - djm@cvs.openbsd.org 2013/11/08 01:38:11 [version.h] openssh-6.4 - - (djm) Release 6.4p1 + - (djm) [README contrib/caldera/openssh.spec contrib/redhat/openssh.spec] + [contrib/suse/openssh.spec] Update version numbers following release. + - (dtucker) [openbsd-compat/openbsd-compat.h] Add null implementation of + arc4random_stir for platforms that have arc4random but don't have + arc4random_stir (right now this is only OpenBSD -current). + - (dtucker) [kex.c] Only enable CURVE25519_SHA256 if we actually have + EVP_sha256. + - (dtucker) [myproposal.h] Conditionally enable CURVE25519_SHA256. + - (dtucker) [openbsd-compat/bsd-poll.c] Add headers to prevent compile + warnings. + - (dtucker) [Makefile.in configure.ac] Set MALLOC_OPTIONS per platform + and pass in TEST_ENV. use stderr to get polluted + and the stderr-data test to fail. + - (dtucker) [contrib/cygwin/ssh-host-config] Simplify host key generation: + rather than testing and generating each key, call ssh-keygen -A. + Patch from vinschen at redhat.com. + - (dtucker) OpenBSD CVS Sync + - dtucker@cvs.openbsd.org 2013/11/09 05:41:34 + [regress/test-exec.sh regress/rekey.sh] + Use smaller test data files to speed up tests. Grow test datafiles + where necessary for a specific test. + +20131107 + - (djm) [ssh-pkcs11.c] Bring back "non-constant initialiser" fix (rev 1.5) + that got lost in recent merge. + - (djm) [Makefile.in monitor.c] Missed chunks of curve25519 KEX diff + - (djm) [regress/modpipe.c regress/rekey.sh] Never intended to commit these + - (djm) [configure.ac defines.h] Skip arc4random_stir() calls on platforms + that lack it but have arc4random_uniform() + - (djm) OpenBSD CVS Sync + - markus@cvs.openbsd.org 2013/11/04 11:51:16 + [monitor.c] + fix rekeying for KEX_C25519_SHA256; noted by dtucker@ + RCSID sync only; I thought this was a merge botch and fixed it already + - markus@cvs.openbsd.org 2013/11/06 16:52:11 + [monitor_wrap.c] + fix rekeying for AES-GCM modes; ok deraadt + - djm@cvs.openbsd.org 2013/11/06 23:05:59 + [ssh-pkcs11.c] + from portable: s/true/true_val/ to avoid name collisions on dump platforms + RCSID sync only + - (dtucker) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2013/10/09 23:44:14 + [regress/Makefile] (ID sync only) + regression test for sftp request white/blacklisting and readonly mode. + - markus@cvs.openbsd.org 2013/11/02 22:39:53 + [regress/kextype.sh] + add curve25519-sha256@libssh.org + - dtucker@cvs.openbsd.org 2013/11/04 12:27:42 + [regress/rekey.sh] + Test rekeying with all KexAlgorithms. + - dtucker@cvs.openbsd.org 2013/11/07 00:12:05 + [regress/rekey.sh] + Test rekeying for every Cipher, MAC and KEX, plus test every KEX with + the GCM ciphers. + - dtucker@cvs.openbsd.org 2013/11/07 01:12:51 + [regress/rekey.sh] + Factor out the data transfer rekey tests + - dtucker@cvs.openbsd.org 2013/11/07 02:48:38 + [regress/integrity.sh regress/cipher-speed.sh regress/try-ciphers.sh] + Use ssh -Q instead of hardcoding lists of ciphers or MACs. + - dtucker@cvs.openbsd.org 2013/11/07 03:55:41 + [regress/kextype.sh] + Use ssh -Q to get kex types instead of a static list. + - dtucker@cvs.openbsd.org 2013/11/07 04:26:56 + [regress/kextype.sh] + trailing space + - (dtucker) [Makefile.in configure.ac] Remove TEST_SSH_SHA256 environment + variable. It's no longer used now that we get the supported MACs from + ssh -Q. -20130913 - - (djm) [channels.c] Fix unaligned access on sparc machines in SOCKS5 code; - ok dtucker@ - - (djm) [channels.c] sigh, typo s/buffet_/buffer_/ - - (djm) Release 6.3p1 +20131104 + - (djm) OpenBSD CVS Sync + - markus@cvs.openbsd.org 2013/11/02 20:03:54 + [ssh-pkcs11.c] + support pkcs#11 tokes that only provide x509 zerts instead of raw pubkeys; + fixes bz#1908; based on patch from Laurent Barbe; ok djm + - markus@cvs.openbsd.org 2013/11/02 21:59:15 + [kex.c kex.h myproposal.h ssh-keyscan.c sshconnect2.c sshd.c] + use curve25519 for default key exchange (curve25519-sha256@libssh.org); + initial patch from Aris Adamantiadis; ok djm@ + - markus@cvs.openbsd.org 2013/11/02 22:10:15 + [kexdhs.c kexecdhs.c] + no need to include monitor_wrap.h + - markus@cvs.openbsd.org 2013/11/02 22:24:24 + [kexdhs.c kexecdhs.c] + no need to include ssh-gss.h + - markus@cvs.openbsd.org 2013/11/02 22:34:01 + [auth-options.c] + no need to include monitor_wrap.h and ssh-gss.h + - markus@cvs.openbsd.org 2013/11/02 22:39:19 + [ssh_config.5 sshd_config.5] + the default kex is now curve25519-sha256@libssh.org + - djm@cvs.openbsd.org 2013/11/03 10:37:19 + [roaming_common.c] + fix a couple of function definitions foo() -> foo(void) + (-Wold-style-definition) + - (djm) [kexc25519.c kexc25519c.c kexc25519s.c] Import missed files from + KEX/curve25519 change + +20131103 + - (dtucker) [openbsd-compat/bsd-misc.c] Include time.h for nanosleep. + From OpenSMTPD where it prevents "implicit declaration" warnings (it's + a no-op in OpenSSH). From chl at openbsd. + - (dtucker) [openbsd-compat/setproctitle.c] Handle error case form the 2nd + vsnprintf. From eric at openbsd via chl@. + - (dtucker) [configure.ac defines.h] Add typedefs for intmax_t and uintmax_t + for platforms that don't have them. + +20131030 + - (djm) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2013/10/29 09:42:11 + [key.c key.h] + fix potential stack exhaustion caused by nested certificates; + report by Mateusz Kocielski; ok dtucker@ markus@ + - djm@cvs.openbsd.org 2013/10/29 09:48:02 + [servconf.c servconf.h session.c sshd_config sshd_config.5] + shd_config PermitTTY to disallow TTY allocation, mirroring the + longstanding no-pty authorized_keys option; + bz#2070, patch from Teran McKinney; ok markus@ + - jmc@cvs.openbsd.org 2013/10/29 18:49:32 + [sshd_config.5] + pty(4), not pty(7); + +20131026 + - (djm) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2013/10/25 23:04:51 + [ssh.c] + fix crash when using ProxyCommand caused by previous commit - was calling + freeaddrinfo(NULL); spotted by sthen@ and Tim Ruehsen, patch by sthen@ + +20131025 + - (djm) [ssh-keygen.c ssh-keysign.c sshconnect1.c sshd.c] Remove + unnecessary arc4random_stir() calls. The only ones left are to ensure + that the PRNG gets a different state after fork() for platforms that + have broken the API. + +20131024 + - (djm) [auth-krb5.c] bz#2032 - use local username in krb5_kuserok check + rather than full client name which may be of form user@REALM; + patch from Miguel Sanders; ok dtucker@ + - (djm) OpenBSD CVS Sync + - dtucker@cvs.openbsd.org 2013/10/23 05:40:58 + [servconf.c] + fix comment + - djm@cvs.openbsd.org 2013/10/23 23:35:32 + [sshd.c] + include local address and port in "Connection from ..." message (only + shown at loglevel>=verbose) + - dtucker@cvs.openbsd.org 2013/10/24 00:49:49 + [moduli.c] + Periodically print progress and, if possible, expected time to completion + when screening moduli for DH groups. ok deraadt djm + - dtucker@cvs.openbsd.org 2013/10/24 00:51:48 + [readconf.c servconf.c ssh_config.5 sshd_config.5] + Disallow empty Match statements and add "Match all" which matches + everything. ok djm, man page help jmc@ + - djm@cvs.openbsd.org 2013/10/24 08:19:36 + [ssh.c] + fix bug introduced in hostname canonicalisation commit: don't try to + resolve hostnames when a ProxyCommand is set unless the user has forced + canonicalisation; spotted by Iain Morgan + - (tim) [regress/sftp-perm.sh] We need a shell that understands "! somecmd" + +20131023 + - (djm) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2013/10/20 04:39:28 + [ssh_config.5] + document % expansions performed by "Match command ..." + - djm@cvs.openbsd.org 2013/10/20 06:19:28 + [readconf.c ssh_config.5] + rename "command" subclause of the recently-added "Match" keyword to + "exec"; it's shorter, clearer in intent and we might want to add the + ability to match against the command being executed at the remote end in + the future. + - djm@cvs.openbsd.org 2013/10/20 09:51:26 + [scp.1 sftp.1] + add canonicalisation options to -o lists + - jmc@cvs.openbsd.org 2013/10/20 18:00:13 + [ssh_config.5] + tweak the "exec" description, as worded by djm; + - djm@cvs.openbsd.org 2013/10/23 03:03:07 + [readconf.c] + Hostname may have %h sequences that should be expanded prior to Match + evaluation; spotted by Iain Morgan + - djm@cvs.openbsd.org 2013/10/23 03:05:19 + [readconf.c ssh.c] + comment + - djm@cvs.openbsd.org 2013/10/23 04:16:22 + [ssh-keygen.c] + Make code match documentation: relative-specified certificate expiry time + should be relative to current time and not the validity start time. + Reported by Petr Lautrbach; ok deraadt@ + +20131018 + - (djm) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2013/10/09 23:44:14 + [regress/Makefile regress/sftp-perm.sh] + regression test for sftp request white/blacklisting and readonly mode. + - jmc@cvs.openbsd.org 2013/10/17 07:35:48 + [sftp.1 sftp.c] + tweak previous; + - djm@cvs.openbsd.org 2013/10/17 22:08:04 + [sshd.c] + include remote port in bad banner message; bz#2162 + +20131017 + - (djm) OpenBSD CVS Sync + - jmc@cvs.openbsd.org 2013/10/15 14:10:25 + [ssh.1 ssh_config.5] + tweak previous; + - djm@cvs.openbsd.org 2013/10/16 02:31:47 + [readconf.c readconf.h roaming_client.c ssh.1 ssh.c ssh_config.5] + [sshconnect.c sshconnect.h] + Implement client-side hostname canonicalisation to allow an explicit + search path of domain suffixes to use to convert unqualified host names + to fully-qualified ones for host key matching. + This is particularly useful for host certificates, which would otherwise + need to list unqualified names alongside fully-qualified ones (and this + causes a number of problems). + "looks fine" markus@ + - jmc@cvs.openbsd.org 2013/10/16 06:42:25 + [ssh_config.5] + tweak previous; + - djm@cvs.openbsd.org 2013/10/16 22:49:39 + [readconf.c readconf.h ssh.1 ssh.c ssh_config.5] + s/canonicalise/canonicalize/ for consistency with existing spelling, + e.g. authorized_keys; pointed out by naddy@ + - djm@cvs.openbsd.org 2013/10/16 22:58:01 + [ssh.c ssh_config.5] + one I missed in previous: s/isation/ization/ + - djm@cvs.openbsd.org 2013/10/17 00:30:13 + [PROTOCOL sftp-client.c sftp-client.h sftp-server.c sftp.1 sftp.c] + fsync@openssh.com protocol extension for sftp-server + client support to allow calling fsync() faster successful transfer + patch mostly by imorgan AT nas.nasa.gov; bz#1798 + "fine" markus@ "grumble OK" deraadt@ "doesn't sound bad to me" millert@ + - djm@cvs.openbsd.org 2013/10/17 00:46:49 + [ssh.c] + rearrange check to reduce diff against -portable + (Id sync only) + +20131015 + - (djm) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2013/10/09 23:42:17 + [sftp-server.8 sftp-server.c] + Add ability to whitelist and/or blacklist sftp protocol requests by name. + Refactor dispatch loop and consolidate read-only mode checks. + Make global variables static, since sftp-server is linked into sshd(8). + ok dtucker@ + - djm@cvs.openbsd.org 2013/10/10 00:53:25 + [sftp-server.c] + add -Q, -P and -p to usage() before jmc@ catches me + - djm@cvs.openbsd.org 2013/10/10 01:43:03 + [sshd.c] + bz#2139: fix re-exec fallback by ensuring that startup_pipe is correctly + updated; ok dtucker@ + - djm@cvs.openbsd.org 2013/10/11 02:45:36 + [sftp-client.c] + rename flag arguments to be more clear and consistent. + reorder some internal function arguments to make adding additional flags + easier. + no functional change + - djm@cvs.openbsd.org 2013/10/11 02:52:23 + [sftp-client.c] + missed one arg reorder + - djm@cvs.openbsd.org 2013/10/11 02:53:45 + [sftp-client.h] + obsolete comment + - jmc@cvs.openbsd.org 2013/10/14 14:18:56 + [sftp-server.8 sftp-server.c] + tweak previous; + ok djm + - djm@cvs.openbsd.org 2013/10/14 21:20:52 + [session.c session.h] + Add logging of session starts in a useful format; ok markus@ feedback and + ok dtucker@ + - djm@cvs.openbsd.org 2013/10/14 22:22:05 + [readconf.c readconf.h ssh-keysign.c ssh.c ssh_config.5] + add a "Match" keyword to ssh_config that allows matching on hostname, + user and result of arbitrary commands. "nice work" markus@ + - djm@cvs.openbsd.org 2013/10/14 23:28:23 + [canohost.c misc.c misc.h readconf.c sftp-server.c ssh.c] + refactor client config code a little: + add multistate option partsing to readconf.c, similar to servconf.c's + existing code. + move checking of options that accept "none" as an argument to readconf.c + add a lowercase() function and use it instead of explicit tolower() in + loops + part of a larger diff that was ok markus@ + - djm@cvs.openbsd.org 2013/10/14 23:31:01 + [ssh.c] + whitespace at EOL; pointed out by markus@ + - [ssh.c] g/c unused variable. + +20131010 + - (dtucker) OpenBSD CVS Sync + - sthen@cvs.openbsd.org 2013/09/16 11:35:43 + [ssh_config] + Remove gssapi config parts from ssh_config, as was already done for + sshd_config. Req by/ok ajacoutot@ + ID SYNC ONLY for portable; kerberos/gssapi is still pretty popular + - djm@cvs.openbsd.org 2013/09/19 00:24:52 + [progressmeter.c] + store the initial file offset so the progress meter doesn't freak out + when resuming sftp transfers. bz#2137; patch from Iain Morgan; ok dtucker@` + - djm@cvs.openbsd.org 2013/09/19 00:49:12 + [sftp-client.c] + fix swapped pflag and printflag in sftp upload_dir; from Iain Morgan + - djm@cvs.openbsd.org 2013/09/19 01:24:46 + [channels.c] + bz#1297 - tell the client (via packet_send_debug) when their preferred + listen address has been overridden by the server's GatewayPorts; + ok dtucker@ + - djm@cvs.openbsd.org 2013/09/19 01:26:29 + [sshconnect.c] + bz#1211: make BindAddress work with UsePrivilegedPort=yes; patch from + swp AT swp.pp.ru; ok dtucker@ + - dtucker@cvs.openbsd.org 2013/10/08 11:42:13 + [dh.c dh.h] + Increase the size of the Diffie-Hellman groups requested for a each + symmetric key size. New values from NIST Special Publication 800-57 with + the upper limit specified by RFC4419. Pointed out by Peter Backes, ok + djm@. + +20131009 + - (djm) [openbsd-compat/arc4random.c openbsd-compat/chacha_private.h] Pull + in OpenBSD implementation of arc4random, shortly to replace the existing + bsd-arc4random.c + - (djm) [openbsd-compat/Makefile.in openbsd-compat/arc4random.c] + [openbsd-compat/bsd-arc4random.c] Replace old RC4-based arc4random + implementation with recent OpenBSD's ChaCha-based PRNG. ok dtucker@, + tested tim@ + +20130922 + - (dtucker) [platform.c platform.h sshd.c] bz#2156: restore Linux oom_adj + setting when handling SIGHUP to maintain behaviour over retart. Patch + from Matthew Ife. + +20130918 + - (dtucker) [sshd_config] Trailing whitespace; from jstjohn at purdue edu. + +20130914 + - (djm) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2013/08/22 19:02:21 + [sshd.c] + Stir PRNG after post-accept fork. The child gets a different PRNG state + anyway via rexec and explicit privsep reseeds, but it's good to be sure. + ok markus@ + - mikeb@cvs.openbsd.org 2013/08/28 12:34:27 + [ssh-keygen.c] + improve batch processing a bit by making use of the quite flag a bit + more often and exit with a non zero code if asked to find a hostname + in a known_hosts file and it wasn't there; + originally from reyk@, ok djm + - djm@cvs.openbsd.org 2013/08/31 00:13:54 + [sftp.c] + make ^w match ksh behaviour (delete previous word instead of entire line) + - deraadt@cvs.openbsd.org 2013/09/02 22:00:34 + [ssh-keygen.c sshconnect1.c sshd.c] + All the instances of arc4random_stir() are bogus, since arc4random() + does this itself, inside itself, and has for a very long time.. Actually, + this was probably reducing the entropy available. + ok djm + ID SYNC ONLY for portable; we don't trust other arc4random implementations + to do this right. + - sthen@cvs.openbsd.org 2013/09/07 13:53:11 + [sshd_config] + Remove commented-out kerberos/gssapi config options from sample config, + kerberos support is currently not enabled in ssh in OpenBSD. Discussed with + various people; ok deraadt@ + ID SYNC ONLY for portable; kerberos/gssapi is still pretty popular + - djm@cvs.openbsd.org 2013/09/12 01:41:12 + [clientloop.c] + fix connection crash when sending break (~B) on ControlPersist'd session; + ok dtucker@ + - djm@cvs.openbsd.org 2013/09/13 06:54:34 + [channels.c] + avoid unaligned access in code that reused a buffer to send a + struct in_addr in a reply; simpler just use use buffer_put_int(); + from portable; spotted by and ok dtucker@ + +20130828 + - (djm) [openbsd-compat/bsd-snprintf.c] teach our local snprintf code the + 'j' (intmax_t/uintmax_t) and 'z' (size_t/ssize_t) conversions in case we + start to use them in the future. + - (djm) [openbsd-compat/bsd-snprintf.c] #ifdef noytet for intmax_t bits + until we have configure support. + +20130821 + - (djm) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2013/08/06 23:03:49 + [sftp.c] + fix some whitespace at EOL + make list of commands an enum rather than a long list of defines + add -a to usage() + - djm@cvs.openbsd.org 2013/08/06 23:05:01 + [sftp.1] *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu Feb 27 17:32:00 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8C60F6D3; Thu, 27 Feb 2014 17:32:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 789E5109F; Thu, 27 Feb 2014 17:32:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1RHW014078818; Thu, 27 Feb 2014 17:32:00 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1RHW0b5078817; Thu, 27 Feb 2014 17:32:00 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201402271732.s1RHW0b5078817@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Thu, 27 Feb 2014 17:32:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262567 - stable/10/usr.sbin/pwd_mkdb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2014 17:32:00 -0000 Author: des Date: Thu Feb 27 17:31:59 2014 New Revision: 262567 URL: http://svnweb.freebsd.org/changeset/base/262567 Log: MFH (r261511, r261542): add an example to the man page Modified: stable/10/usr.sbin/pwd_mkdb/pwd_mkdb.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pwd_mkdb/pwd_mkdb.8 ============================================================================== --- stable/10/usr.sbin/pwd_mkdb/pwd_mkdb.8 Thu Feb 27 17:29:02 2014 (r262566) +++ stable/10/usr.sbin/pwd_mkdb/pwd_mkdb.8 Thu Feb 27 17:31:59 2014 (r262567) @@ -28,7 +28,7 @@ .\" @(#)pwd_mkdb.8 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd February 28, 2005 +.Dd February 5, 2014 .Dt PWD_MKDB 8 .Os .Sh NAME @@ -143,6 +143,12 @@ The current password file. .It Pa /etc/passwd A Version 7 format password file. .El +.Sh EXAMPLES +Regenerate the password database after manually editing or replacing +the password file: +.Bd -literal -offset -indent +/usr/sbin/pwd_mkdb -p /etc/master.passwd +.Ed .Sh COMPATIBILITY Previous versions of the system had a program similar to .Nm , From owner-svn-src-stable@FreeBSD.ORG Thu Feb 27 22:34:10 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D6B9720; Thu, 27 Feb 2014 22:34:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 095701D6F; Thu, 27 Feb 2014 22:34:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1RMY9m6016918; Thu, 27 Feb 2014 22:34:09 GMT (envelope-from hiren@svn.freebsd.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1RMY9u5016917; Thu, 27 Feb 2014 22:34:09 GMT (envelope-from hiren@svn.freebsd.org) Message-Id: <201402272234.s1RMY9u5016917@svn.freebsd.org> From: Hiren Panchasara Date: Thu, 27 Feb 2014 22:34:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262578 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2014 22:34:10 -0000 Author: hiren Date: Thu Feb 27 22:34:09 2014 New Revision: 262578 URL: http://svnweb.freebsd.org/changeset/base/262578 Log: MFC r257472 Rate limit (to once per minute) "Listen queue overflow" message in sonewconn(). 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.c Thu Feb 27 21:50:46 2014 (r262577) +++ stable/10/sys/kern/uipc_socket.c Thu Feb 27 22:34:09 2014 (r262578) @@ -486,6 +486,10 @@ SYSCTL_INT(_regression, OID_AUTO, sonewc struct socket * sonewconn(struct socket *head, int connstatus) { + static struct timeval lastover; + static struct timeval overinterval = { 60, 0 }; + static int overcount; + struct socket *so; int over; @@ -497,9 +501,17 @@ sonewconn(struct socket *head, int conns #else if (over) { #endif - log(LOG_DEBUG, "%s: pcb %p: Listen queue overflow: " - "%i already in queue awaiting acceptance\n", - __func__, head->so_pcb, head->so_qlen); + overcount++; + + if (ratecheck(&lastover, &overinterval)) { + log(LOG_DEBUG, "%s: pcb %p: Listen queue overflow: " + "%i already in queue awaiting acceptance " + "(%d occurrences)\n", + __func__, head->so_pcb, head->so_qlen, overcount); + + overcount = 0; + } + return (NULL); } VNET_ASSERT(head->so_vnet != NULL, ("%s:%d so_vnet is NULL, head=%p", From owner-svn-src-stable@FreeBSD.ORG Thu Feb 27 22:36:17 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8FC329DB; Thu, 27 Feb 2014 22:36:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7B5C41D8B; Thu, 27 Feb 2014 22:36:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1RMaHI3017429; Thu, 27 Feb 2014 22:36:17 GMT (envelope-from hiren@svn.freebsd.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1RMaHeF017428; Thu, 27 Feb 2014 22:36:17 GMT (envelope-from hiren@svn.freebsd.org) Message-Id: <201402272236.s1RMaHeF017428@svn.freebsd.org> From: Hiren Panchasara Date: Thu, 27 Feb 2014 22:36:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r262579 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2014 22:36:17 -0000 Author: hiren Date: Thu Feb 27 22:36:16 2014 New Revision: 262579 URL: http://svnweb.freebsd.org/changeset/base/262579 Log: MFC r257472 Rate limit (to once per minute) "Listen queue overflow" message in sonewconn(). Modified: stable/9/sys/kern/uipc_socket.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/uipc_socket.c ============================================================================== --- stable/9/sys/kern/uipc_socket.c Thu Feb 27 22:34:09 2014 (r262578) +++ stable/9/sys/kern/uipc_socket.c Thu Feb 27 22:36:16 2014 (r262579) @@ -483,6 +483,10 @@ SYSCTL_INT(_regression, OID_AUTO, sonewc struct socket * sonewconn(struct socket *head, int connstatus) { + static struct timeval lastover; + static struct timeval overinterval = { 60, 0 }; + static int overcount; + struct socket *so; int over; @@ -494,9 +498,17 @@ sonewconn(struct socket *head, int conns #else if (over) { #endif - log(LOG_DEBUG, "%s: pcb %p: Listen queue overflow: " - "%i already in queue awaiting acceptance\n", - __func__, head->so_pcb, head->so_qlen); + overcount++; + + if (ratecheck(&lastover, &overinterval)) { + log(LOG_DEBUG, "%s: pcb %p: Listen queue overflow: " + "%i already in queue awaiting acceptance " + "(%d occurrences)\n", + __func__, head->so_pcb, head->so_qlen, overcount); + + overcount = 0; + } + return (NULL); } VNET_ASSERT(head->so_vnet != NULL, ("%s:%d so_vnet is NULL, head=%p", From owner-svn-src-stable@FreeBSD.ORG Fri Feb 28 00:39:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 57F0A965; Fri, 28 Feb 2014 00:39:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 28DD418D4; Fri, 28 Feb 2014 00:39:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1S0daG1074368; Fri, 28 Feb 2014 00:39:36 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1S0dZ0p074365; Fri, 28 Feb 2014 00:39:35 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402280039.s1S0dZ0p074365@svn.freebsd.org> From: Christian Brueffer Date: Fri, 28 Feb 2014 00:39:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262586 - in stable/10/sys: arm/broadcom/bcm2835 dev/nand powerpc/ofw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2014 00:39:36 -0000 Author: brueffer Date: Fri Feb 28 00:39:35 2014 New Revision: 262586 URL: http://svnweb.freebsd.org/changeset/base/262586 Log: MFC: r261884 Correct the order of arguments to mtx_init(). PR: 186701 Submitted by: Takanori Sawada Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_mbox.c stable/10/sys/dev/nand/nandbus.c stable/10/sys/powerpc/ofw/ofw_real.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_mbox.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Fri Feb 28 00:26:57 2014 (r262585) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Fri Feb 28 00:39:35 2014 (r262586) @@ -167,7 +167,7 @@ bcm_mbox_attach(device_t dev) return (ENXIO); } - mtx_init(&sc->lock, "vcio mbox", MTX_DEF, 0); + mtx_init(&sc->lock, "vcio mbox", NULL, MTX_DEF); for (i = 0; i < BCM2835_MBOX_CHANS; i++) { sc->valid[0] = 0; sc->msg[0] = 0; Modified: stable/10/sys/dev/nand/nandbus.c ============================================================================== --- stable/10/sys/dev/nand/nandbus.c Fri Feb 28 00:26:57 2014 (r262585) +++ stable/10/sys/dev/nand/nandbus.c Fri Feb 28 00:39:35 2014 (r262586) @@ -174,7 +174,7 @@ nandbus_attach(device_t dev) nfc = device_get_parent(dev); nfc_sc = device_get_softc(nfc); - mtx_init(&sc->nandbus_mtx, "nandbus lock", MTX_DEF, 0); + mtx_init(&sc->nandbus_mtx, "nandbus lock", NULL, MTX_DEF); cv_init(&sc->nandbus_cv, "nandbus cv"); /* Check each possible CS for existing nand devices */ Modified: stable/10/sys/powerpc/ofw/ofw_real.c ============================================================================== --- stable/10/sys/powerpc/ofw/ofw_real.c Fri Feb 28 00:26:57 2014 (r262585) +++ stable/10/sys/powerpc/ofw/ofw_real.c Fri Feb 28 00:39:35 2014 (r262586) @@ -300,7 +300,7 @@ ofw_real_init(ofw_t ofw, void *openfirm) { openfirmware = (int (*)(void *))openfirm; - mtx_init(&of_bounce_mtx, "OF Bounce Page", MTX_DEF, 0); + mtx_init(&of_bounce_mtx, "OF Bounce Page", NULL, MTX_DEF); of_bounce_virt = NULL; return (0); } From owner-svn-src-stable@FreeBSD.ORG Fri Feb 28 00:43:28 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0FE37C06; Fri, 28 Feb 2014 00:43:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EEF131955; Fri, 28 Feb 2014 00:43:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1S0hROi077890; Fri, 28 Feb 2014 00:43:27 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1S0hRoJ077889; Fri, 28 Feb 2014 00:43:27 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402280043.s1S0hRoJ077889@svn.freebsd.org> From: Christian Brueffer Date: Fri, 28 Feb 2014 00:43:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262588 - stable/10/lib/libc/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2014 00:43:28 -0000 Author: brueffer Date: Fri Feb 28 00:43:27 2014 New Revision: 262588 URL: http://svnweb.freebsd.org/changeset/base/262588 Log: MFC: r262296 Match the correct variable to the variable description. PR: 121173 Submitted by: Thomas Mueller Modified: stable/10/lib/libc/sys/mq_getattr.2 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/mq_getattr.2 ============================================================================== --- stable/10/lib/libc/sys/mq_getattr.2 Fri Feb 28 00:41:55 2014 (r262587) +++ stable/10/lib/libc/sys/mq_getattr.2 Fri Feb 28 00:43:27 2014 (r262588) @@ -37,7 +37,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 29, 2005 +.Dd February 21, 2014 .Dt MQ_GETATTR 2 .Os .Sh NAME @@ -83,8 +83,8 @@ structure referenced by the .Fa mqstat argument will be set to the current state of the message queue: -.Bl -tag -width ".Va mq_flags" -.It Va mq_flags +.Bl -tag -width ".Va mq_curmsgs" +.It Va mq_curmsgs The number of messages currently on the queue. .El .Sh RETURN VALUES From owner-svn-src-stable@FreeBSD.ORG Fri Feb 28 00:44:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5558BD45; Fri, 28 Feb 2014 00:44:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 410D7195D; Fri, 28 Feb 2014 00:44:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1S0igCG078151; Fri, 28 Feb 2014 00:44:42 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1S0igho078150; Fri, 28 Feb 2014 00:44:42 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402280044.s1S0igho078150@svn.freebsd.org> From: Christian Brueffer Date: Fri, 28 Feb 2014 00:44:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r262589 - stable/9/lib/libc/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2014 00:44:42 -0000 Author: brueffer Date: Fri Feb 28 00:44:41 2014 New Revision: 262589 URL: http://svnweb.freebsd.org/changeset/base/262589 Log: MFC: r262296 Match the correct variable to the variable description. PR: 121173 Submitted by: Thomas Mueller Modified: stable/9/lib/libc/sys/mq_getattr.2 Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) Modified: stable/9/lib/libc/sys/mq_getattr.2 ============================================================================== --- stable/9/lib/libc/sys/mq_getattr.2 Fri Feb 28 00:43:27 2014 (r262588) +++ stable/9/lib/libc/sys/mq_getattr.2 Fri Feb 28 00:44:41 2014 (r262589) @@ -37,7 +37,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 29, 2005 +.Dd February 21, 2014 .Dt MQ_GETATTR 2 .Os .Sh NAME @@ -83,8 +83,8 @@ structure referenced by the .Fa mqstat argument will be set to the current state of the message queue: -.Bl -tag -width ".Va mq_flags" -.It Va mq_flags +.Bl -tag -width ".Va mq_curmsgs" +.It Va mq_curmsgs The number of messages currently on the queue. .El .Sh RETURN VALUES From owner-svn-src-stable@FreeBSD.ORG Fri Feb 28 00:45:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F1B1E97; Fri, 28 Feb 2014 00:45:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5AE9C1966; Fri, 28 Feb 2014 00:45:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1S0juwD078437; Fri, 28 Feb 2014 00:45:56 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1S0juxB078436; Fri, 28 Feb 2014 00:45:56 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402280045.s1S0juxB078436@svn.freebsd.org> From: Christian Brueffer Date: Fri, 28 Feb 2014 00:45:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r262590 - stable/8/lib/libc/sys X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2014 00:45:56 -0000 Author: brueffer Date: Fri Feb 28 00:45:55 2014 New Revision: 262590 URL: http://svnweb.freebsd.org/changeset/base/262590 Log: MFC: r262296 Match the correct variable to the variable description. PR: 121173 Submitted by: Thomas Mueller Modified: stable/8/lib/libc/sys/mq_getattr.2 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/sys/ (props changed) Modified: stable/8/lib/libc/sys/mq_getattr.2 ============================================================================== --- stable/8/lib/libc/sys/mq_getattr.2 Fri Feb 28 00:44:41 2014 (r262589) +++ stable/8/lib/libc/sys/mq_getattr.2 Fri Feb 28 00:45:55 2014 (r262590) @@ -37,7 +37,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 29, 2005 +.Dd February 21, 2014 .Dt MQ_GETATTR 2 .Os .Sh NAME @@ -83,8 +83,8 @@ structure referenced by the .Fa mqstat argument will be set to the current state of the message queue: -.Bl -tag -width ".Va mq_flags" -.It Va mq_flags +.Bl -tag -width ".Va mq_curmsgs" +.It Va mq_curmsgs The number of messages currently on the queue. .El .Sh RETURN VALUES From owner-svn-src-stable@FreeBSD.ORG Fri Feb 28 01:35:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 089CFD98; Fri, 28 Feb 2014 01:35:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E874E1D19; Fri, 28 Feb 2014 01:35:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1S1ZOL1001822; Fri, 28 Feb 2014 01:35:24 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1S1ZOpS001821; Fri, 28 Feb 2014 01:35:24 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201402280135.s1S1ZOpS001821@svn.freebsd.org> From: Craig Rodrigues Date: Fri, 28 Feb 2014 01:35:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r262594 - stable/9/sys/dev/usb/net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2014 01:35:25 -0000 Author: rodrigc Date: Fri Feb 28 01:35:24 2014 New Revision: 262594 URL: http://svnweb.freebsd.org/changeset/base/262594 Log: MFC r262142: In ue_attach_post_task(), initialize curvnet to vnet0 before calling if_attach(). Before this patch, curvnet was NULL. When the VIMAGE kernel option is enabled, this eliminates kernel panics when USB ethernet devices are plugged in. PR: 183835 Submitted by: Hiroo Oono Modified: stable/9/sys/dev/usb/net/usb_ethernet.c Directory Properties: stable/9/ (props changed) Modified: stable/9/sys/dev/usb/net/usb_ethernet.c ============================================================================== --- stable/9/sys/dev/usb/net/usb_ethernet.c Fri Feb 28 01:33:03 2014 (r262593) +++ stable/9/sys/dev/usb/net/usb_ethernet.c Fri Feb 28 01:35:24 2014 (r262594) @@ -207,6 +207,7 @@ ue_attach_post_task(struct usb_proc_msg sysctl_ctx_init(&ue->ue_sysctl_ctx); error = 0; + CURVNET_SET_QUIET(vnet0); ifp = if_alloc(IFT_ETHER); if (ifp == NULL) { device_printf(ue->ue_dev, "could not allocate ifnet\n"); @@ -254,6 +255,8 @@ ue_attach_post_task(struct usb_proc_msg if (ifp->if_capabilities & IFCAP_VLAN_MTU) ifp->if_hdrlen = sizeof(struct ether_vlan_header); + CURVNET_RESTORE(); + snprintf(num, sizeof(num), "%u", ue->ue_unit); ue->ue_sysctl_oid = SYSCTL_ADD_NODE(&ue->ue_sysctl_ctx, &SYSCTL_NODE_CHILDREN(_net, ue), @@ -267,6 +270,7 @@ ue_attach_post_task(struct usb_proc_msg return; fail: + CURVNET_RESTORE(); free_unr(ueunit, ue->ue_unit); if (ue->ue_ifp != NULL) { if_free(ue->ue_ifp); From owner-svn-src-stable@FreeBSD.ORG Fri Feb 28 16:08:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CCA17F69; Fri, 28 Feb 2014 16:08:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9D18F1A8D; Fri, 28 Feb 2014 16:08:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1SG8W0F060853; Fri, 28 Feb 2014 16:08:32 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1SG8Wji060851; Fri, 28 Feb 2014 16:08:32 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201402281608.s1SG8Wji060851@svn.freebsd.org> From: Kevin Lo Date: Fri, 28 Feb 2014 16:08:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262604 - stable/10/sys/dev/usb/wlan X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2014 16:08:32 -0000 Author: kevlo Date: Fri Feb 28 16:08:31 2014 New Revision: 262604 URL: http://svnweb.freebsd.org/changeset/base/262604 Log: MFC r262465: Add a flag to run's device list which uses a standard scsi eject. The flag indicates that the mcu doesn't need to load firmware. Tested by: Alex Deiter , myself Tested on: ASUS USB-N66 Modified: stable/10/sys/dev/usb/wlan/if_run.c stable/10/sys/dev/usb/wlan/if_runvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_run.c Fri Feb 28 15:55:35 2014 (r262603) +++ stable/10/sys/dev/usb/wlan/if_run.c Fri Feb 28 16:08:31 2014 (r262604) @@ -99,7 +99,8 @@ SYSCTL_INT(_hw_usb_run, OID_AUTO, debug, static const STRUCT_USB_HOST_ID run_devs[] = { #define RUN_DEV(v,p) { USB_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p) } #define RUN_DEV_EJECT(v,p) \ - { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, 0) } + { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, RUN_EJECT) } +#define RUN_EJECT 1 RUN_DEV(ABOCOM, RT2770), RUN_DEV(ABOCOM, RT2870), RUN_DEV(ABOCOM, RT3070), @@ -314,7 +315,7 @@ static const STRUCT_USB_HOST_ID run_devs RUN_DEV(ZINWELL, RT3072_2), RUN_DEV(ZYXEL, RT2870_1), RUN_DEV(ZYXEL, RT2870_2), - RUN_DEV(ZYXEL, NWD2705), + RUN_DEV_EJECT(ZYXEL, NWD2705), RUN_DEV_EJECT(RALINK, RT_STOR), #undef RUN_DEV_EJECT #undef RUN_DEV @@ -706,6 +707,8 @@ run_attach(device_t self) device_set_usb_desc(self); sc->sc_udev = uaa->device; sc->sc_dev = self; + if (USB_GET_DRIVER_INFO(uaa) != RUN_EJECT) + sc->sc_flags |= RUN_FLAG_FWLOAD_NEEDED; mtx_init(&sc->sc_mtx, device_get_nameunit(sc->sc_dev), MTX_NETWORK_LOCK, MTX_DEF); @@ -1150,7 +1153,7 @@ run_load_microcode(struct run_softc *sc) } /* write microcode image */ - if (sc->mac_ver != 0x3593) { + if (sc->sc_flags & RUN_FLAG_FWLOAD_NEEDED) { run_write_region_1(sc, RT2870_FW_BASE, base, 4096); run_write(sc, RT2860_H2M_MAILBOX_CID, 0xffffffff); run_write(sc, RT2860_H2M_MAILBOX_STATUS, 0xffffffff); Modified: stable/10/sys/dev/usb/wlan/if_runvar.h ============================================================================== --- stable/10/sys/dev/usb/wlan/if_runvar.h Fri Feb 28 15:55:35 2014 (r262603) +++ stable/10/sys/dev/usb/wlan/if_runvar.h Fri Feb 28 16:08:31 2014 (r262604) @@ -154,6 +154,11 @@ struct run_softc { device_t sc_dev; struct usb_device *sc_udev; struct ifnet *sc_ifp; + int sc_need_fwload; + + int sc_flags; +#define RUN_FLAG_FWLOAD_NEEDED 0x01 + uint16_t wcid_stats[RT2870_WCID_MAX + 1][3]; #define RUN_TXCNT 0 #define RUN_SUCCESS 1 From owner-svn-src-stable@FreeBSD.ORG Fri Feb 28 16:11:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF75C142; Fri, 28 Feb 2014 16:11:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A1E5F1AAB; Fri, 28 Feb 2014 16:11:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1SGBioN063783; Fri, 28 Feb 2014 16:11:44 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1SGBiWt063780; Fri, 28 Feb 2014 16:11:44 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201402281611.s1SGBiWt063780@svn.freebsd.org> From: Kevin Lo Date: Fri, 28 Feb 2014 16:11:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r262605 - stable/9/sys/dev/usb/wlan X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2014 16:11:44 -0000 Author: kevlo Date: Fri Feb 28 16:11:43 2014 New Revision: 262605 URL: http://svnweb.freebsd.org/changeset/base/262605 Log: MFC r262465: Add a flag to run's device list which uses a standard scsi eject. The flag indicates that the mcu doesn't need to load firmware. Tested by: Alex Deiter , myself Tested on: ASUS USB-N66 Modified: stable/9/sys/dev/usb/wlan/if_run.c (contents, props changed) stable/9/sys/dev/usb/wlan/if_runvar.h Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_run.c Fri Feb 28 16:08:31 2014 (r262604) +++ stable/9/sys/dev/usb/wlan/if_run.c Fri Feb 28 16:11:43 2014 (r262605) @@ -99,7 +99,8 @@ SYSCTL_INT(_hw_usb_run, OID_AUTO, debug, static const STRUCT_USB_HOST_ID run_devs[] = { #define RUN_DEV(v,p) { USB_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p) } #define RUN_DEV_EJECT(v,p) \ - { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, 0) } + { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, RUN_EJECT) } +#define RUN_EJECT 1 RUN_DEV(ABOCOM, RT2770), RUN_DEV(ABOCOM, RT2870), RUN_DEV(ABOCOM, RT3070), @@ -314,7 +315,7 @@ static const STRUCT_USB_HOST_ID run_devs RUN_DEV(ZINWELL, RT3072_2), RUN_DEV(ZYXEL, RT2870_1), RUN_DEV(ZYXEL, RT2870_2), - RUN_DEV(ZYXEL, NWD2705), + RUN_DEV_EJECT(ZYXEL, NWD2705), RUN_DEV_EJECT(RALINK, RT_STOR), #undef RUN_DEV_EJECT #undef RUN_DEV @@ -706,6 +707,8 @@ run_attach(device_t self) device_set_usb_desc(self); sc->sc_udev = uaa->device; sc->sc_dev = self; + if (USB_GET_DRIVER_INFO(uaa) != RUN_EJECT) + sc->sc_flags |= RUN_FLAG_FWLOAD_NEEDED; mtx_init(&sc->sc_mtx, device_get_nameunit(sc->sc_dev), MTX_NETWORK_LOCK, MTX_DEF); @@ -1150,7 +1153,7 @@ run_load_microcode(struct run_softc *sc) } /* write microcode image */ - if (sc->mac_ver != 0x3593) { + if (sc->sc_flags & RUN_FLAG_FWLOAD_NEEDED) { run_write_region_1(sc, RT2870_FW_BASE, base, 4096); run_write(sc, RT2860_H2M_MAILBOX_CID, 0xffffffff); run_write(sc, RT2860_H2M_MAILBOX_STATUS, 0xffffffff); Modified: stable/9/sys/dev/usb/wlan/if_runvar.h ============================================================================== --- stable/9/sys/dev/usb/wlan/if_runvar.h Fri Feb 28 16:08:31 2014 (r262604) +++ stable/9/sys/dev/usb/wlan/if_runvar.h Fri Feb 28 16:11:43 2014 (r262605) @@ -154,6 +154,11 @@ struct run_softc { device_t sc_dev; struct usb_device *sc_udev; struct ifnet *sc_ifp; + int sc_need_fwload; + + int sc_flags; +#define RUN_FLAG_FWLOAD_NEEDED 0x01 + uint16_t wcid_stats[RT2870_WCID_MAX + 1][3]; #define RUN_TXCNT 0 #define RUN_SUCCESS 1 From owner-svn-src-stable@FreeBSD.ORG Fri Feb 28 20:22:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ABB05257; Fri, 28 Feb 2014 20:22:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9734D1435; Fri, 28 Feb 2014 20:22:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1SKMnTa067758; Fri, 28 Feb 2014 20:22:49 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1SKMnsa067757; Fri, 28 Feb 2014 20:22:49 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201402282022.s1SKMnsa067757@svn.freebsd.org> From: Dimitry Andric Date: Fri, 28 Feb 2014 20:22:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262620 - in stable: 10/sys/sparc64/sparc64 9/sys/sparc64/sparc64 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2014 20:22:49 -0000 Author: dim Date: Fri Feb 28 20:22:48 2014 New Revision: 262620 URL: http://svnweb.freebsd.org/changeset/base/262620 Log: MFC r262471: In sys/sparc64/sparc64/spitfire.c, prevent signed shift overflow by casting to the appropriate type. (Note this fix cannot be done in sys/sparc64/sparc64/spitfire.c, since that file is also included by assembly source files.) Reviewed by: marius Modified: stable/10/sys/sparc64/sparc64/spitfire.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/sparc64/sparc64/spitfire.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/sparc64/sparc64/spitfire.c ============================================================================== --- stable/10/sys/sparc64/sparc64/spitfire.c Fri Feb 28 19:51:47 2014 (r262619) +++ stable/10/sys/sparc64/sparc64/spitfire.c Fri Feb 28 20:22:48 2014 (r262620) @@ -130,7 +130,7 @@ spitfire_icache_page_inval(vm_paddr_t pa : "=r" (tag) : "r" (addr), "n" (ASI_ICACHE_TAG)); if (((tag >> IC_VALID_SHIFT) & IC_VALID_MASK) == 0) continue; - tag &= IC_TAG_MASK << IC_TAG_SHIFT; + tag &= (u_long)IC_TAG_MASK << IC_TAG_SHIFT; if (tag == target) { PMAP_STATS_INC(spitfire_icache_npage_inval_match); stxa_sync(addr, ASI_ICACHE_TAG, tag); From owner-svn-src-stable@FreeBSD.ORG Fri Feb 28 20:22:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D629256; Fri, 28 Feb 2014 20:22:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 48B5B1434; Fri, 28 Feb 2014 20:22:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1SKMnCe067750; Fri, 28 Feb 2014 20:22:49 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1SKMnN0067749; Fri, 28 Feb 2014 20:22:49 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201402282022.s1SKMnN0067749@svn.freebsd.org> From: Dimitry Andric Date: Fri, 28 Feb 2014 20:22:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r262620 - in stable: 10/sys/sparc64/sparc64 9/sys/sparc64/sparc64 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2014 20:22:49 -0000 Author: dim Date: Fri Feb 28 20:22:48 2014 New Revision: 262620 URL: http://svnweb.freebsd.org/changeset/base/262620 Log: MFC r262471: In sys/sparc64/sparc64/spitfire.c, prevent signed shift overflow by casting to the appropriate type. (Note this fix cannot be done in sys/sparc64/sparc64/spitfire.c, since that file is also included by assembly source files.) Reviewed by: marius Modified: stable/9/sys/sparc64/sparc64/spitfire.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/sparc64/sparc64/spitfire.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/sparc64/sparc64/spitfire.c ============================================================================== --- stable/9/sys/sparc64/sparc64/spitfire.c Fri Feb 28 19:51:47 2014 (r262619) +++ stable/9/sys/sparc64/sparc64/spitfire.c Fri Feb 28 20:22:48 2014 (r262620) @@ -130,7 +130,7 @@ spitfire_icache_page_inval(vm_paddr_t pa : "=r" (tag) : "r" (addr), "n" (ASI_ICACHE_TAG)); if (((tag >> IC_VALID_SHIFT) & IC_VALID_MASK) == 0) continue; - tag &= IC_TAG_MASK << IC_TAG_SHIFT; + tag &= (u_long)IC_TAG_MASK << IC_TAG_SHIFT; if (tag == target) { PMAP_STATS_INC(spitfire_icache_npage_inval_match); stxa_sync(addr, ASI_ICACHE_TAG, tag); From owner-svn-src-stable@FreeBSD.ORG Fri Feb 28 20:30:00 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C52E866A; Fri, 28 Feb 2014 20:30:00 +0000 (UTC) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7FA0B1493; Fri, 28 Feb 2014 20:30:00 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::83f:465:d505:2ec0] (unknown [IPv6:2001:7b8:3a7:0:83f:465:d505:2ec0]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 79D375C45; Fri, 28 Feb 2014 21:29:56 +0100 (CET) From: Dimitry Andric Content-Type: multipart/signed; boundary="Apple-Mail=_0ECEE81A-7255-40FE-9F9E-71F23AFE3ECD"; protocol="application/pgp-signature"; micalg=pgp-sha1 Message-Id: Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) Subject: Re: svn commit: r262620 - in stable: 10/sys/sparc64/sparc64 9/sys/sparc64/sparc64 Date: Fri, 28 Feb 2014 21:29:35 +0100 References: <201402282022.s1SKMnsa067757@svn.freebsd.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org In-Reply-To: <201402282022.s1SKMnsa067757@svn.freebsd.org> X-Mailer: Apple Mail (2.1874) X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2014 20:30:00 -0000 --Apple-Mail=_0ECEE81A-7255-40FE-9F9E-71F23AFE3ECD Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 28 Feb 2014, at 21:22, Dimitry Andric wrote: > Author: dim > Date: Fri Feb 28 20:22:48 2014 > New Revision: 262620 > URL: http://svnweb.freebsd.org/changeset/base/262620 > > Log: > MFC r262471: > > In sys/sparc64/sparc64/spitfire.c, prevent signed shift overflow by > casting to the appropriate type. (Note this fix cannot be done in > sys/sparc64/sparc64/spitfire.c, since that file is also included by > assembly source files.) The second line should actually refer to sys/sparc64/include/cache.h. I pasted the wrong filename, sorry about that! -Dimitry --Apple-Mail=_0ECEE81A-7255-40FE-9F9E-71F23AFE3ECD Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iEYEARECAAYFAlMQ8cAACgkQsF6jCi4glqMg/gCgqAUvRVmZk6ZIMyCjjNpSQyuk JYsAoJqRIs/vy85tjjvQhg6g82LoQOmf =TKC9 -----END PGP SIGNATURE----- --Apple-Mail=_0ECEE81A-7255-40FE-9F9E-71F23AFE3ECD-- From owner-svn-src-stable@FreeBSD.ORG Fri Feb 28 20:31:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6DD62830; Fri, 28 Feb 2014 20:31:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 59CFA14B9; Fri, 28 Feb 2014 20:31:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1SKV8Fj070942; Fri, 28 Feb 2014 20:31:08 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1SKV8Zi070941; Fri, 28 Feb 2014 20:31:08 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201402282031.s1SKV8Zi070941@svn.freebsd.org> From: Dimitry Andric Date: Fri, 28 Feb 2014 20:31:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r262621 - in stable: 10/sys/sparc64/pci 9/sys/sparc64/pci X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2014 20:31:08 -0000 Author: dim Date: Fri Feb 28 20:31:07 2014 New Revision: 262621 URL: http://svnweb.freebsd.org/changeset/base/262621 Log: MFC r262472: Make sure a for loop in fire_alloc_msix() terminates, by making the loop counter signed. Reviewed by: marius Modified: stable/9/sys/sparc64/pci/fire.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/sparc64/pci/fire.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/sparc64/pci/fire.c ============================================================================== --- stable/9/sys/sparc64/pci/fire.c Fri Feb 28 20:22:48 2014 (r262620) +++ stable/9/sys/sparc64/pci/fire.c Fri Feb 28 20:31:07 2014 (r262621) @@ -1691,7 +1691,7 @@ static int fire_alloc_msix(device_t dev, device_t child, int *irq) { struct fire_softc *sc; - u_int i, msiq; + int i, msiq; sc = device_get_softc(dev); if ((sc->sc_flags & FIRE_MSIX) == 0) From owner-svn-src-stable@FreeBSD.ORG Fri Feb 28 20:31:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1624832; Fri, 28 Feb 2014 20:31:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ADF2F14BB; Fri, 28 Feb 2014 20:31:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1SKV85b070948; Fri, 28 Feb 2014 20:31:08 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1SKV8f1070947; Fri, 28 Feb 2014 20:31:08 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201402282031.s1SKV8f1070947@svn.freebsd.org> From: Dimitry Andric Date: Fri, 28 Feb 2014 20:31:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262621 - in stable: 10/sys/sparc64/pci 9/sys/sparc64/pci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2014 20:31:08 -0000 Author: dim Date: Fri Feb 28 20:31:07 2014 New Revision: 262621 URL: http://svnweb.freebsd.org/changeset/base/262621 Log: MFC r262472: Make sure a for loop in fire_alloc_msix() terminates, by making the loop counter signed. Reviewed by: marius Modified: stable/10/sys/sparc64/pci/fire.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/sparc64/pci/fire.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/sparc64/pci/fire.c ============================================================================== --- stable/10/sys/sparc64/pci/fire.c Fri Feb 28 20:22:48 2014 (r262620) +++ stable/10/sys/sparc64/pci/fire.c Fri Feb 28 20:31:07 2014 (r262621) @@ -1691,7 +1691,7 @@ static int fire_alloc_msix(device_t dev, device_t child, int *irq) { struct fire_softc *sc; - u_int i, msiq; + int i, msiq; sc = device_get_softc(dev); if ((sc->sc_flags & FIRE_MSIX) == 0) From owner-svn-src-stable@FreeBSD.ORG Sat Mar 1 03:09:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E101C19D; Sat, 1 Mar 2014 03:09:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BF75317BD; Sat, 1 Mar 2014 03:09:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2139IoE030977; Sat, 1 Mar 2014 03:09:18 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2139Gck030962; Sat, 1 Mar 2014 03:09:16 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201403010309.s2139Gck030962@svn.freebsd.org> From: Brooks Davis Date: Sat, 1 Mar 2014 03:09:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262643 - in stable/10: gnu/usr.bin/dialog lib/ncurses share/mk usr.bin/systat usr.bin/vi usr.sbin/bsdinstall/distextract usr.sbin/bsdinstall/distfetch usr.sbin/bsdinstall/partedit usr.... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Mar 2014 03:09:19 -0000 Author: brooks Date: Sat Mar 1 03:09:16 2014 New Revision: 262643 URL: http://svnweb.freebsd.org/changeset/base/262643 Log: MFC r261296: Merge from CheriBSD: commit c1acf022c533c5ae27e0cd556977eafe3f5959eb Author: Brooks Davis Date: Fri Jan 17 21:46:44 2014 +0000 Add an option WITHOUT_NCURSESW to suppress building and linking to libncursesw. While wide character support it useful we'd like to only need one ncurses library on embedded systems. Sponsored by: DARPA, AFRL Modified: stable/10/gnu/usr.bin/dialog/Makefile stable/10/lib/ncurses/Makefile stable/10/share/mk/bsd.own.mk stable/10/usr.bin/systat/Makefile stable/10/usr.bin/systat/main.c stable/10/usr.bin/vi/Makefile stable/10/usr.sbin/bsdinstall/distextract/Makefile stable/10/usr.sbin/bsdinstall/distfetch/Makefile stable/10/usr.sbin/bsdinstall/partedit/Makefile stable/10/usr.sbin/tzsetup/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/gnu/usr.bin/dialog/Makefile ============================================================================== --- stable/10/gnu/usr.bin/dialog/Makefile Sat Mar 1 02:57:22 2014 (r262642) +++ stable/10/gnu/usr.bin/dialog/Makefile Sat Mar 1 03:09:16 2014 (r262643) @@ -3,11 +3,21 @@ DIALOG= ${.CURDIR}/../../../contrib/dialog PROG= dialog -DPADD= ${LIBDIALOG} ${LIBNCURSESW} ${LIBM} -LDADD= -ldialog -lncursesw -lm +DPADD= ${LIBDIALOG} ${LIBM} +LDADD= -ldialog -lm CFLAGS+= -I${.CURDIR} -I${DIALOG} .PATH: ${DIALOG} WARNS?= 6 +.include + +.if ${MK_NCURSESW} == "no" +DPADD+= ${LIBNCURSES} +LDADD+= -lncurses +.else +DPADD+= ${LIBNCURSESW} +LDADD+= -lncursesw +.endif + .include Modified: stable/10/lib/ncurses/Makefile ============================================================================== --- stable/10/lib/ncurses/Makefile Sat Mar 1 02:57:22 2014 (r262642) +++ stable/10/lib/ncurses/Makefile Sat Mar 1 03:09:16 2014 (r262643) @@ -1,6 +1,11 @@ # $FreeBSD$ -SUBDIR= ncurses form menu panel \ - ncursesw formw menuw panelw +.include + +SUBDIR= ncurses form menu panel + +.if ${MK_NCURSESW} != "no" +SUBDIR+= ncursesw formw menuw panelw +.endif .include Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Sat Mar 1 02:57:22 2014 (r262642) +++ stable/10/share/mk/bsd.own.mk Sat Mar 1 03:09:16 2014 (r262643) @@ -313,6 +313,7 @@ __DEFAULT_YES_OPTIONS = \ MAILWRAPPER \ MAKE \ MAN \ + NCURSESW \ NDIS \ NETCAT \ NETGRAPH \ Modified: stable/10/usr.bin/systat/Makefile ============================================================================== --- stable/10/usr.bin/systat/Makefile Sat Mar 1 02:57:22 2014 (r262642) +++ stable/10/usr.bin/systat/Makefile Sat Mar 1 03:09:16 2014 (r262643) @@ -16,7 +16,16 @@ CFLAGS+= -DINET6 WARNS?= 0 -DPADD= ${LIBNCURSESW} ${LIBM} ${LIBDEVSTAT} ${LIBKVM} -LDADD= -lncursesw -lm -ldevstat -lkvm +DPADD= ${LIBM} ${LIBDEVSTAT} ${LIBKVM} +LDADD= -lm -ldevstat -lkvm + +.if ${MK_NCURSESW} == "no" +DPADD+= ${LIBNCURSES} +LDADD+= -lncurses +.else +CFLAGS+= -DUSE_WIDECHAR +DPADD+= ${LIBNCURSESW} +LDADD+= -lncursesw +.endif .include Modified: stable/10/usr.bin/systat/main.c ============================================================================== --- stable/10/usr.bin/systat/main.c Sat Mar 1 02:57:22 2014 (r262642) +++ stable/10/usr.bin/systat/main.c Sat Mar 1 03:09:16 2014 (r262643) @@ -84,7 +84,11 @@ main(int argc, char **argv) size_t size; double t; +#ifdef USE_WIDECHAR (void) setlocale(LC_ALL, ""); +#else + (void) setlocale(LC_TIME, ""); +#endif argc--, argv++; while (argc > 0) { Modified: stable/10/usr.bin/vi/Makefile ============================================================================== --- stable/10/usr.bin/vi/Makefile Sat Mar 1 02:57:22 2014 (r262642) +++ stable/10/usr.bin/vi/Makefile Sat Mar 1 03:09:16 2014 (r262643) @@ -36,7 +36,7 @@ CFLAGS+=-I${.CURDIR} -I${SRCDIR} -I${SRC DPADD= ${LIBUTIL} LDADD= -lutil -.if defined(RESCUE) || defined(RELEASE_CRUNCH) +.if defined(RESCUE) || defined(RELEASE_CRUNCH) || ${MK_NCURSESW} == "no" DPADD+= ${LIBNCURSES} LDADD+= -lncurses .else Modified: stable/10/usr.sbin/bsdinstall/distextract/Makefile ============================================================================== --- stable/10/usr.sbin/bsdinstall/distextract/Makefile Sat Mar 1 02:57:22 2014 (r262642) +++ stable/10/usr.sbin/bsdinstall/distextract/Makefile Sat Mar 1 03:09:16 2014 (r262643) @@ -2,10 +2,20 @@ BINDIR= /usr/libexec/bsdinstall PROG= distextract -DPADD= ${LIBARCHIVE} ${LIBNCURSESW} ${LIBDIALOG} ${LIBM} -LDADD= -larchive -lncursesw -ldialog -lm +DPADD= ${LIBARCHIVE} ${LIBDIALOG} ${LIBM} +LDADD= -larchive -ldialog -lm WARNS?= 6 NO_MAN= true +.include + +.if ${MK_NCURSESW} == "no" +DPADD+= ${LIBNCURSES} +LDADD+= -lncurses +.else +DPADD+= ${LIBNCURSESW} +LDADD+= -lncursesw +.endif + .include Modified: stable/10/usr.sbin/bsdinstall/distfetch/Makefile ============================================================================== --- stable/10/usr.sbin/bsdinstall/distfetch/Makefile Sat Mar 1 02:57:22 2014 (r262642) +++ stable/10/usr.sbin/bsdinstall/distfetch/Makefile Sat Mar 1 03:09:16 2014 (r262643) @@ -2,10 +2,20 @@ BINDIR= /usr/libexec/bsdinstall PROG= distfetch -DPADD= ${LIBFETCH} ${LIBNCURSESW} ${LIBDIALOG} ${LIBM} -LDADD= -lfetch -lncursesw -ldialog -lm +DPADD= ${LIBFETCH} ${LIBDIALOG} ${LIBM} +LDADD= -lfetch -ldialog -lm WARNS?= 6 NO_MAN= true +.include + +.if ${MK_NCURSESW} == "no" +DPADD+= ${LIBNCURSES} +LDADD+= -lncurses +.else +DPADD+= ${LIBNCURSESW} +LDADD+= -lncursesw +.endif + .include Modified: stable/10/usr.sbin/bsdinstall/partedit/Makefile ============================================================================== --- stable/10/usr.sbin/bsdinstall/partedit/Makefile Sat Mar 1 02:57:22 2014 (r262642) +++ stable/10/usr.sbin/bsdinstall/partedit/Makefile Sat Mar 1 03:09:16 2014 (r262643) @@ -5,8 +5,8 @@ PROG= partedit LINKS= ${BINDIR}/partedit ${BINDIR}/autopart \ ${BINDIR}/partedit ${BINDIR}/scriptedpart SYMLINKS= ${BINDIR}/partedit /usr/sbin/sade -DPADD= ${LIBGEOM} ${LIBNCURSESW} ${LIBUTIL} ${LIBDIALOG} ${LIBM} -LDADD= -lgeom -lncursesw -lutil -ldialog -lm +DPADD= ${LIBGEOM} ${LIBUTIL} ${LIBDIALOG} ${LIBM} +LDADD= -lgeom -lutil -ldialog -lm PARTEDIT_ARCH= ${MACHINE} .if ${MACHINE} == "i386" || ${MACHINE} == "amd64" @@ -22,4 +22,14 @@ SRCS= diskeditor.c partedit.c gpart_ops. WARNS?= 3 MAN= sade.8 +.include + +.if ${MK_NCURSESW} == "no" +DPADD+= ${LIBNCURSES} +LDADD+= -lncurses +.else +DPADD+= ${LIBNCURSESW} +LDADD+= -lncursesw +.endif + .include Modified: stable/10/usr.sbin/tzsetup/Makefile ============================================================================== --- stable/10/usr.sbin/tzsetup/Makefile Sat Mar 1 02:57:22 2014 (r262642) +++ stable/10/usr.sbin/tzsetup/Makefile Sat Mar 1 03:09:16 2014 (r262643) @@ -7,7 +7,17 @@ CFLAGS+= -I${.CURDIR}/../../contrib/dial WARNS?= 3 -DPADD= ${LIBDIALOG} ${LIBNCURSESW} ${LIBM} -LDADD= -ldialog -lncursesw -lm +DPADD= ${LIBDIALOG} ${LIBM} +LDADD= -ldialog -lm + +.include + +.if ${MK_NCURSESW} == "no" +DPADD+= ${LIBNCURSES} +LDADD+= -lncurses +.else +DPADD+= ${LIBNCURSESW} +LDADD+= -lncursesw +.endif .include From owner-svn-src-stable@FreeBSD.ORG Sat Mar 1 03:11:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3EA64AF; Sat, 1 Mar 2014 03:11:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AFB901854; Sat, 1 Mar 2014 03:11:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s213BQHX033440; Sat, 1 Mar 2014 03:11:26 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s213BQQF033439; Sat, 1 Mar 2014 03:11:26 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201403010311.s213BQQF033439@svn.freebsd.org> From: Brooks Davis Date: Sat, 1 Mar 2014 03:11:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262644 - stable/10/tools/build/options X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Mar 2014 03:11:26 -0000 Author: brooks Date: Sat Mar 1 03:11:26 2014 New Revision: 262644 URL: http://svnweb.freebsd.org/changeset/base/262644 Log: MFC r261300: Add a missing options file. Sponsored by: DARPA, AFRL Added: stable/10/tools/build/options/WITHOUT_NCURSESW - copied unchanged from r261300, head/tools/build/options/WITHOUT_NCURSESW Modified: Directory Properties: stable/10/ (props changed) Copied: stable/10/tools/build/options/WITHOUT_NCURSESW (from r261300, head/tools/build/options/WITHOUT_NCURSESW) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_NCURSESW Sat Mar 1 03:11:26 2014 (r262644, copy of r261300, head/tools/build/options/WITHOUT_NCURSESW) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not build or depend on the +.Nm libncursesw +library. From owner-svn-src-stable@FreeBSD.ORG Sat Mar 1 03:39:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7EF4EEBC; Sat, 1 Mar 2014 03:39:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6741D1A38; Sat, 1 Mar 2014 03:39:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s213dv4U042968; Sat, 1 Mar 2014 03:39:57 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s213dum7042965; Sat, 1 Mar 2014 03:39:56 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201403010339.s213dum7042965@svn.freebsd.org> From: Brooks Davis Date: Sat, 1 Mar 2014 03:39:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262648 - in stable/10/usr.sbin: mtree nmtree X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Mar 2014 03:39:57 -0000 Author: brooks Date: Sat Mar 1 03:39:56 2014 New Revision: 262648 URL: http://svnweb.freebsd.org/changeset/base/262648 Log: MFC: 261298 Merge from CheriBSD: commit 70b8f0c127db6b80411789d237b403cc64a93573 Author: Brooks Davis Date: Mon Jan 27 22:53:57 2014 +0000 Move mtree.5 to usr.sbin/nmtree. Remove note that mtree 2.0 format files aren't supported. Sponsored by: DARPA, AFRL Added: stable/10/usr.sbin/nmtree/mtree.5 - copied unchanged from r261298, head/usr.sbin/nmtree/mtree.5 Deleted: stable/10/usr.sbin/mtree/mtree.5 Modified: stable/10/usr.sbin/mtree/Makefile stable/10/usr.sbin/nmtree/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/mtree/Makefile ============================================================================== --- stable/10/usr.sbin/mtree/Makefile Sat Mar 1 03:36:46 2014 (r262647) +++ stable/10/usr.sbin/mtree/Makefile Sat Mar 1 03:39:56 2014 (r262648) @@ -6,7 +6,7 @@ .PATH: ${.CURDIR}/../../usr.bin/cksum PROG= fmtree -MAN= fmtree.8 mtree.5 +MAN= fmtree.8 SRCS= compare.c crc.c create.c excludes.c misc.c mtree.c spec.c verify.c SRCS+= specspec.c Modified: stable/10/usr.sbin/nmtree/Makefile ============================================================================== --- stable/10/usr.sbin/nmtree/Makefile Sat Mar 1 03:36:46 2014 (r262647) +++ stable/10/usr.sbin/nmtree/Makefile Sat Mar 1 03:39:56 2014 (r262648) @@ -4,8 +4,8 @@ .PATH: ${.CURDIR}/../../contrib/mtree -PROG= nmtree -MAN= nmtree.8 +PROG= mtree +MAN= mtree.5 mtree.8 SRCS= compare.c crc.c create.c excludes.c getid.c misc.c mtree.c \ only.c spec.c specspec.c verify.c LDADD+= -lmd -lutil Copied: stable/10/usr.sbin/nmtree/mtree.5 (from r261298, head/usr.sbin/nmtree/mtree.5) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.sbin/nmtree/mtree.5 Sat Mar 1 03:39:56 2014 (r262648, copy of r261298, head/usr.sbin/nmtree/mtree.5) @@ -0,0 +1,264 @@ +.\" Copyright (c) 1989, 1990, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" 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. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. +.\" +.\" From: @(#)mtree.8 8.2 (Berkeley) 12/11/93 +.\" $FreeBSD$ +.\" +.Dd December 31, 2007 +.Dt MTREE 5 +.Os +.Sh NAME +.Nm mtree +.Nd format of mtree dir hierarchy files +.Sh DESCRIPTION +The +.Nm +format is a textual format that describes a collection of filesystem objects. +Such files are typically used to create or verify directory hierarchies. +.Ss General Format +An +.Nm +file consists of a series of lines, each providing information +about a single filesystem object. +Leading whitespace is always ignored. +.Pp +When encoding file or pathnames, any backslash character or +character outside of the 95 printable ASCII characters must be +encoded as a backslash followed by three +octal digits. +When reading mtree files, any appearance of a backslash +followed by three octal digits should be converted into the +corresponding character. +.Pp +Each line is interpreted independently as one of the following types: +.Bl -tag -width Cm +.It Signature +The first line of any mtree file must begin with +.Dq #mtree . +If a file contains any full path entries, the first line should +begin with +.Dq #mtree v2.0 , +otherwise, the first line should begin with +.Dq #mtree v1.0 . +.It Blank +Blank lines are ignored. +.It Comment +Lines beginning with +.Cm # +are ignored. +.It Special +Lines beginning with +.Cm / +are special commands that influence +the interpretation of later lines. +.It Relative +If the first whitespace-delimited word has no +.Cm / +characters, +it is the name of a file in the current directory. +Any relative entry that describes a directory changes the +current directory. +.It dot-dot +As a special case, a relative entry with the filename +.Pa .. +changes the current directory to the parent directory. +Options on dot-dot entries are always ignored. +.It Full +If the first whitespace-delimited word has a +.Cm / +character after +the first character, it is the pathname of a file relative to the +starting directory. +There can be multiple full entries describing the same file. +.El +.Pp +Some tools that process +.Nm +files may require that multiple lines describing the same file +occur consecutively. +It is not permitted for the same file to be mentioned using +both a relative and a full file specification. +.Ss Special commands +Two special commands are currently defined: +.Bl -tag -width Cm +.It Cm /set +This command defines default values for one or more keywords. +It is followed on the same line by one or more whitespace-separated +keyword definitions. +These definitions apply to all following files that do not specify +a value for that keyword. +.It Cm /unset +This command removes any default value set by a previous +.Cm /set +command. +It is followed on the same line by one or more keywords +separated by whitespace. +.El +.Ss Keywords +After the filename, a full or relative entry consists of zero +or more whitespace-separated keyword definitions. +Each such definitions consists of a key from the following +list immediately followed by an '=' sign +and a value. +Software programs reading mtree files should warn about +unrecognized keywords. +.Pp +Currently supported keywords are as follows: +.Bl -tag -width Cm +.It Cm cksum +The checksum of the file using the default algorithm specified by +the +.Xr cksum 1 +utility. +.It Cm contents +The full pathname of a file whose contents should be +compared to the contents of this file. +.It Cm flags +The file flags as a symbolic name. +See +.Xr chflags 1 +for information on these names. +If no flags are to be set the string +.Dq none +may be used to override the current default. +.It Cm ignore +Ignore any file hierarchy below this file. +.It Cm gid +The file group as a numeric value. +.It Cm gname +The file group as a symbolic name. +.It Cm md5 +The MD5 message digest of the file. +.It Cm md5digest +A synonym for +.Cm md5 . +.It Cm sha1 +The +.Tn FIPS +160-1 +.Pq Dq Tn SHA-1 +message digest of the file. +.It Cm sha1digest +A synonym for +.Cm sha1 . +.It Cm sha256 +The +.Tn FIPS +180-2 +.Pq Dq Tn SHA-256 +message digest of the file. +.It Cm sha256digest +A synonym for +.Cm sha256 . +.It Cm ripemd160digest +The +.Tn RIPEMD160 +message digest of the file. +.It Cm rmd160 +A synonym for +.Cm ripemd160digest . +.It Cm rmd160digest +A synonym for +.Cm ripemd160digest . +.It Cm mode +The current file's permissions as a numeric (octal) or symbolic +value. +.It Cm nlink +The number of hard links the file is expected to have. +.It Cm nochange +Make sure this file or directory exists but otherwise ignore all attributes. +.It Cm uid +The file owner as a numeric value. +.It Cm uname +The file owner as a symbolic name. +.It Cm size +The size, in bytes, of the file. +.It Cm link +The file the symbolic link is expected to reference. +.It Cm time +The last modification time of the file, in seconds and nanoseconds. +The value should include a period character and exactly nine digits +after the period. +.It Cm type +The type of the file; may be set to any one of the following: +.Pp +.Bl -tag -width Cm -compact +.It Cm block +block special device +.It Cm char +character special device +.It Cm dir +directory +.It Cm fifo +fifo +.It Cm file +regular file +.It Cm link +symbolic link +.It Cm socket +socket +.El +.El +.Sh SEE ALSO +.Xr cksum 1 , +.Xr find 1 , +.Xr mtree 8 +.Sh HISTORY +The +.Nm +utility appeared in +.Bx 4.3 Reno . +The +.Tn MD5 +digest capability was added in +.Fx 2.1 , +in response to the widespread use of programs which can spoof +.Xr cksum 1 . +The +.Tn SHA-1 +and +.Tn RIPEMD160 +digests were added in +.Fx 4.0 , +as new attacks have demonstrated weaknesses in +.Tn MD5 . +The +.Tn SHA-256 +digest was added in +.Fx 6.0 . +Support for file flags was added in +.Fx 4.0 , +and mostly comes from +.Nx . +The +.Dq full +entry format was added by +.Nx . +.Sh BUGS +The requirement for a +.Dq #mtree +signature line is new and not yet widely implemented. From owner-svn-src-stable@FreeBSD.ORG Sat Mar 1 04:16:58 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 82021BF8; Sat, 1 Mar 2014 04:16:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6B22111C5; Sat, 1 Mar 2014 04:16:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s214GwAb058600; Sat, 1 Mar 2014 04:16:58 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s214GsTq058579; Sat, 1 Mar 2014 04:16:54 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201403010416.s214GsTq058579@svn.freebsd.org> From: Warner Losh Date: Sat, 1 Mar 2014 04:16:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262649 - in stable/10/sys: arm/s3c2xx0 arm/sa11x0 arm/xilinx dev/uart mips/adm5120 mips/atheros mips/cavium mips/rt305x X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Mar 2014 04:16:58 -0000 Author: imp Date: Sat Mar 1 04:16:54 2014 New Revision: 262649 URL: http://svnweb.freebsd.org/changeset/base/262649 Log: MFC: r260889, r260890, r260911: r260911 | imp | 2014-01-20 10:45:36 -0700 (Mon, 20 Jan 2014) | 5 lines Don't lock in the generic grab just to lock again in the specific grabs. r260890 | imp | 2014-01-19 12:39:13 -0700 (Sun, 19 Jan 2014) | 11 lines Introduce grab and ungrab upcalls. When the kernel desires to grab the console, it calls the grab functions. These functions should turn off the RX interrupts, and any others that interfere. This makes mountroot prompt work again. If there's more generalized need other than prompting, many of these routines should be expanded to do those new things. Reviewed by: bde (with reservations) Modified: stable/10/sys/arm/s3c2xx0/uart_dev_s3c2410.c stable/10/sys/arm/sa11x0/uart_dev_sa1110.c stable/10/sys/arm/xilinx/uart_dev_cdnc.c stable/10/sys/dev/uart/uart_core.c stable/10/sys/dev/uart/uart_cpu.h stable/10/sys/dev/uart/uart_dev_imx.c stable/10/sys/dev/uart/uart_dev_lpc.c stable/10/sys/dev/uart/uart_dev_ns8250.c stable/10/sys/dev/uart/uart_dev_ns8250.h stable/10/sys/dev/uart/uart_dev_pl011.c stable/10/sys/dev/uart/uart_dev_quicc.c stable/10/sys/dev/uart/uart_dev_sab82532.c stable/10/sys/dev/uart/uart_dev_z8530.c stable/10/sys/dev/uart/uart_if.m stable/10/sys/mips/adm5120/uart_dev_adm5120.c stable/10/sys/mips/atheros/uart_dev_ar933x.c stable/10/sys/mips/cavium/uart_dev_oct16550.c stable/10/sys/mips/rt305x/uart_dev_rt305x.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/s3c2xx0/uart_dev_s3c2410.c ============================================================================== --- stable/10/sys/arm/s3c2xx0/uart_dev_s3c2410.c Sat Mar 1 03:39:56 2014 (r262648) +++ stable/10/sys/arm/s3c2xx0/uart_dev_s3c2410.c Sat Mar 1 04:16:54 2014 (r262649) @@ -203,7 +203,6 @@ s3c2410_getc(struct uart_bas *bas, struc return sscom_getc(bas->bst, bas->bsh); } - static int s3c2410_bus_probe(struct uart_softc *sc); static int s3c2410_bus_attach(struct uart_softc *sc); static int s3c2410_bus_flush(struct uart_softc *, int); @@ -214,6 +213,8 @@ static int s3c2410_bus_param(struct uart static int s3c2410_bus_receive(struct uart_softc *); static int s3c2410_bus_setsig(struct uart_softc *, int); static int s3c2410_bus_transmit(struct uart_softc *); +static void s3c2410_bus_grab(struct uart_softc *); +static void s3c2410_bus_ungrab(struct uart_softc *); static kobj_method_t s3c2410_methods[] = { KOBJMETHOD(uart_probe, s3c2410_bus_probe), @@ -226,6 +227,8 @@ static kobj_method_t s3c2410_methods[] = KOBJMETHOD(uart_receive, s3c2410_bus_receive), KOBJMETHOD(uart_setsig, s3c2410_bus_setsig), KOBJMETHOD(uart_transmit, s3c2410_bus_transmit), + KOBJMETHOD(uart_grab, s3c2410_bus_grab), + KOBJMETHOD(uart_ungrab, s3c2410_bus_ungrab), {0, 0 } }; @@ -373,6 +376,25 @@ s3c2410_bus_ioctl(struct uart_softc *sc, return (EINVAL); } + +static void +s3c2410_bus_grab(struct uart_softc *sc) +{ + uintptr_t irq; + + irq = rman_get_start(sc->sc_ires); + arm_mask_irq(get_sub_irq(irq, RX_OFF)); +} + +static void +s3c2410_bus_ungrab(struct uart_softc *sc) +{ + uintptr_t irq; + + irq = rman_get_start(sc->sc_ires); + arm_unmask_irq(get_sub_irq(irq, RX_OFF)); +} + struct uart_class uart_s3c2410_class = { "s3c2410 class", s3c2410_methods, Modified: stable/10/sys/arm/sa11x0/uart_dev_sa1110.c ============================================================================== --- stable/10/sys/arm/sa11x0/uart_dev_sa1110.c Sat Mar 1 03:39:56 2014 (r262648) +++ stable/10/sys/arm/sa11x0/uart_dev_sa1110.c Sat Mar 1 04:16:54 2014 (r262649) @@ -137,6 +137,8 @@ static int sa1110_bus_param(struct uart_ static int sa1110_bus_receive(struct uart_softc *); static int sa1110_bus_setsig(struct uart_softc *, int); static int sa1110_bus_transmit(struct uart_softc *); +static void sa1110_bus_grab(struct uart_softc *); +static void sa1110_bus_ungrab(struct uart_softc *); static kobj_method_t sa1110_methods[] = { KOBJMETHOD(uart_probe, sa1110_bus_probe), @@ -149,6 +151,8 @@ static kobj_method_t sa1110_methods[] = KOBJMETHOD(uart_receive, sa1110_bus_receive), KOBJMETHOD(uart_setsig, sa1110_bus_setsig), KOBJMETHOD(uart_transmit, sa1110_bus_transmit), + KOBJMETHOD(uart_grab, sa1110_bus_grab), + KOBJMETHOD(uart_ungrab, sa1110_bus_ungrab), {0, 0 } }; @@ -164,10 +168,10 @@ sa1110_bus_probe(struct uart_softc *sc) static int sa1110_bus_attach(struct uart_softc *sc) { - bcopy(&sc->sc_sysdev->bas, &sc->sc_bas, sizeof(sc->sc_bas)); + bcopy(&sc->sc_sysdev->bas, &sc->sc_bas, sizeof(sc->sc_bas)); - sc->sc_hwiflow = 0; - uart_setreg(&sc->sc_bas, SACOM_CR3, CR3_RXE | CR3_TXE | CR3_RIE | CR3_TIE); + sc->sc_hwiflow = 0; + uart_setreg(&sc->sc_bas, SACOM_CR3, CR3_RXE | CR3_TXE | CR3_RIE | CR3_TIE); return (0); } static int @@ -273,6 +277,26 @@ sa1110_bus_ioctl(struct uart_softc *sc, return (EINVAL); } +static void +sa1110_bus_grab(struct uart_softc *sc) +{ + + /* Turn off Rx interrupts */ + uart_lock(sc->sc_hwmtx); + uart_setreg(&sc->sc_bas, SACOM_CR3, CR3_TXE | CR3_TIE); + uart_unlock(sc->sc_hwmtx); +} + +static void +sa1110_bus_ungrab(struct uart_softc *sc) +{ + + /* Turn on Rx interrupts */ + uart_lock(sc->sc_hwmtx); + uart_setreg(&sc->sc_bas, SACOM_CR3, CR3_RXE | CR3_TXE | CR3_RIE | CR3_TIE); + uart_unlock(sc->sc_hwmtx); +} + struct uart_class uart_sa1110_class = { "sa1110", sa1110_methods, Modified: stable/10/sys/arm/xilinx/uart_dev_cdnc.c ============================================================================== --- stable/10/sys/arm/xilinx/uart_dev_cdnc.c Sat Mar 1 03:39:56 2014 (r262648) +++ stable/10/sys/arm/xilinx/uart_dev_cdnc.c Sat Mar 1 04:16:54 2014 (r262649) @@ -398,6 +398,8 @@ static int cdnc_uart_bus_param(struct ua static int cdnc_uart_bus_receive(struct uart_softc *); static int cdnc_uart_bus_setsig(struct uart_softc *, int); static int cdnc_uart_bus_transmit(struct uart_softc *); +static void cdnc_uart_bus_grab(struct uart_softc *); +static void cdnc_uart_bus_ungrab(struct uart_softc *); static kobj_method_t cdnc_uart_bus_methods[] = { KOBJMETHOD(uart_probe, cdnc_uart_bus_probe), @@ -410,6 +412,8 @@ static kobj_method_t cdnc_uart_bus_metho KOBJMETHOD(uart_receive, cdnc_uart_bus_receive), KOBJMETHOD(uart_setsig, cdnc_uart_bus_setsig), KOBJMETHOD(uart_transmit, cdnc_uart_bus_transmit), + KOBJMETHOD(uart_grab, cdnc_uart_bus_grab), + KOBJMETHOD(uart_ungrab, cdnc_uart_bus_ungrab), KOBJMETHOD_END }; @@ -675,6 +679,27 @@ cdnc_uart_bus_ioctl(struct uart_softc *s return (error); } +static void +cdnc_uart_bus_grab(struct uart_softc *sc) +{ + + /* Enable interrupts. */ + WR4(&sc->sc_bas, CDNC_UART_IEN_REG, + CDNC_UART_INT_TXOVR | CDNC_UART_INT_RXOVR | + CDNC_UART_INT_DMSI); +} + +static void +cdnc_uart_bus_ungrab(struct uart_softc *sc) +{ + + /* Enable interrupts. */ + WR4(&sc->sc_bas, CDNC_UART_IEN_REG, + CDNC_UART_INT_RXTRIG | CDNC_UART_INT_RXTMOUT | + CDNC_UART_INT_TXOVR | CDNC_UART_INT_RXOVR | + CDNC_UART_INT_DMSI); +} + struct uart_class uart_cdnc_class = { "cdnc_uart", cdnc_uart_bus_methods, Modified: stable/10/sys/dev/uart/uart_core.c ============================================================================== --- stable/10/sys/dev/uart/uart_core.c Sat Mar 1 03:39:56 2014 (r262648) +++ stable/10/sys/dev/uart/uart_core.c Sat Mar 1 04:16:54 2014 (r262649) @@ -412,6 +412,13 @@ uart_bus_attach(device_t dev) sc = sc0; /* + * Now that we know the softc for this device, connect the back + * pointer from the sysdev for this device, if any + */ + if (sc->sc_sysdev != NULL) + sc->sc_sysdev->sc = sc; + + /* * Protect ourselves against interrupts while we're not completely * finished attaching and initializing. We don't expect interrupts * until after UART_ATTACH() though. @@ -617,3 +624,19 @@ uart_bus_resume(device_t dev) sc = device_get_softc(dev); return (UART_ATTACH(sc)); } + +void +uart_grab(struct uart_devinfo *di) +{ + + if (di->sc) + UART_GRAB(di->sc); +} + +void +uart_ungrab(struct uart_devinfo *di) +{ + + if (di->sc) + UART_UNGRAB(di->sc); +} Modified: stable/10/sys/dev/uart/uart_cpu.h ============================================================================== --- stable/10/sys/dev/uart/uart_cpu.h Sat Mar 1 03:39:56 2014 (r262648) +++ stable/10/sys/dev/uart/uart_cpu.h Sat Mar 1 04:16:54 2014 (r262649) @@ -33,6 +33,8 @@ #include #include +struct uart_softc; + /* * Low-level operations for use by console and/or debug port support. */ @@ -43,8 +45,6 @@ struct uart_ops { void (*putc)(struct uart_bas *, int); int (*rxready)(struct uart_bas *); int (*getc)(struct uart_bas *, struct mtx *); - void (*grab)(struct uart_bas *); - void (*ungrab)(struct uart_bas *); }; extern bus_space_tag_t uart_bus_space_io; @@ -53,7 +53,6 @@ extern bus_space_tag_t uart_bus_space_me /* * Console and debug port device info. */ -struct uart_softc; struct uart_devinfo { SLIST_ENTRY(uart_devinfo) next; struct uart_ops *ops; @@ -70,6 +69,7 @@ struct uart_devinfo { int (*detach)(struct uart_softc*); void *cookie; /* Type dependent use. */ struct mtx *hwmtx; + struct uart_softc *sc; /* valid only from start of attach */ }; int uart_cpu_eqres(struct uart_bas *, struct uart_bas *); @@ -137,27 +137,6 @@ uart_putc(struct uart_devinfo *di, int c uart_unlock(di->hwmtx); } -static __inline void -uart_grab(struct uart_devinfo *di) -{ - - uart_lock(di->hwmtx); - if (di->ops->grab) - di->ops->grab(&di->bas); - uart_unlock(di->hwmtx); -} - -static __inline void -uart_ungrab(struct uart_devinfo *di) -{ - - uart_lock(di->hwmtx); - if (di->ops->ungrab) - di->ops->ungrab(&di->bas); - uart_unlock(di->hwmtx); -} - - static __inline int uart_rxready(struct uart_devinfo *di) { @@ -190,4 +169,7 @@ uart_getc(struct uart_devinfo *di) return (di->ops->getc(&di->bas, di->hwmtx)); } +void uart_grab(struct uart_devinfo *di); +void uart_ungrab(struct uart_devinfo *di); + #endif /* _DEV_UART_CPU_H_ */ Modified: stable/10/sys/dev/uart/uart_dev_imx.c ============================================================================== --- stable/10/sys/dev/uart/uart_dev_imx.c Sat Mar 1 03:39:56 2014 (r262648) +++ stable/10/sys/dev/uart/uart_dev_imx.c Sat Mar 1 04:16:54 2014 (r262649) @@ -140,6 +140,8 @@ static int imx_uart_bus_probe(struct uar static int imx_uart_bus_receive(struct uart_softc *); static int imx_uart_bus_setsig(struct uart_softc *, int); static int imx_uart_bus_transmit(struct uart_softc *); +static void imx_uart_bus_grab(struct uart_softc *); +static void imx_uart_bus_ungrab(struct uart_softc *); static kobj_method_t imx_uart_methods[] = { KOBJMETHOD(uart_attach, imx_uart_bus_attach), @@ -153,6 +155,8 @@ static kobj_method_t imx_uart_methods[] KOBJMETHOD(uart_receive, imx_uart_bus_receive), KOBJMETHOD(uart_setsig, imx_uart_bus_setsig), KOBJMETHOD(uart_transmit, imx_uart_bus_transmit), + KOBJMETHOD(uart_grab, imx_uart_bus_grab), + KOBJMETHOD(uart_ungrab, imx_uart_bus_ungrab), { 0, 0 } }; @@ -189,12 +193,7 @@ imx_uart_bus_attach(struct uart_softc *s (void)imx_uart_bus_getsig(sc); - /* XXX workaround to have working console on manut prompt */ - if (sc->sc_sysdev != NULL && sc->sc_sysdev->type == UART_DEV_CONSOLE){ - DIS(bas, UCR4, DREN); - } else { - ENA(bas, UCR4, DREN); - } + ENA(bas, UCR4, DREN); DIS(bas, UCR1, RRDYEN); DIS(bas, UCR1, IDEN); DIS(bas, UCR3, RXDSEN); @@ -402,13 +401,6 @@ static int imx_uart_bus_setsig(struct uart_softc *sc, int sig) { - /* TODO: implement (?) */ - - /* XXX workaround to have working console on mount prompt */ - /* Enable RX interrupt */ - if (sc->sc_sysdev != NULL && sc->sc_sysdev->type == UART_DEV_CONSOLE) - if (!IS(&sc->sc_bas, UCR4, DREN)) - ENA(&sc->sc_bas, UCR4, DREN); return (0); } @@ -434,3 +426,25 @@ imx_uart_bus_transmit(struct uart_softc return (0); } + +static void +imx_uart_bus_grab(struct uart_softc *sc) +{ + struct uart_bas *bas = &sc->sc_bas; + + bas = &sc->sc_bas; + uart_lock(sc->sc_hwmtx); + DIS(bas, UCR4, DREN); + uart_unlock(sc->sc_hwmtx); +} + +static void +imx_uart_bus_ungrab(struct uart_softc *sc) +{ + struct uart_bas *bas = &sc->sc_bas; + + bas = &sc->sc_bas; + uart_lock(sc->sc_hwmtx); + ENA(bas, UCR4, DREN); + uart_unlock(sc->sc_hwmtx); +} Modified: stable/10/sys/dev/uart/uart_dev_lpc.c ============================================================================== --- stable/10/sys/dev/uart/uart_dev_lpc.c Sat Mar 1 03:39:56 2014 (r262648) +++ stable/10/sys/dev/uart/uart_dev_lpc.c Sat Mar 1 04:16:54 2014 (r262649) @@ -400,6 +400,8 @@ static int lpc_ns8250_bus_probe(struct u static int lpc_ns8250_bus_receive(struct uart_softc *); static int lpc_ns8250_bus_setsig(struct uart_softc *, int); static int lpc_ns8250_bus_transmit(struct uart_softc *); +static void lpc_ns8250_bus_grab(struct uart_softc *); +static void lpc_ns8250_bus_ungrab(struct uart_softc *); static kobj_method_t lpc_ns8250_methods[] = { KOBJMETHOD(uart_attach, lpc_ns8250_bus_attach), @@ -413,6 +415,8 @@ static kobj_method_t lpc_ns8250_methods[ KOBJMETHOD(uart_receive, lpc_ns8250_bus_receive), KOBJMETHOD(uart_setsig, lpc_ns8250_bus_setsig), KOBJMETHOD(uart_transmit, lpc_ns8250_bus_transmit), + KOBJMETHOD(uart_grab, lpc_ns8250_bus_grab), + KOBJMETHOD(uart_ungrab, lpc_ns8250_bus_ungrab), { 0, 0 } }; @@ -889,3 +893,34 @@ lpc_ns8250_bus_transmit(struct uart_soft uart_unlock(sc->sc_hwmtx); return (0); } + +void +lpc_ns8250_bus_grab(struct uart_softc *sc) +{ + struct uart_bas *bas = &sc->sc_bas; + + /* + * turn off all interrupts to enter polling mode. Leave the + * saved mask alone. We'll restore whatever it was in ungrab. + * All pending interupt signals are reset when IER is set to 0. + */ + uart_lock(sc->sc_hwmtx); + uart_setreg(bas, REG_IER, 0); + uart_barrier(bas); + uart_unlock(sc->sc_hwmtx); +} + +void +lpc_ns8250_bus_ungrab(struct uart_softc *sc) +{ + struct lpc_ns8250_softc *lpc_ns8250 = (struct lpc_ns8250_softc*)sc; + struct uart_bas *bas = &sc->sc_bas; + + /* + * Restore previous interrupt mask + */ + uart_lock(sc->sc_hwmtx); + uart_setreg(bas, REG_IER, lpc_ns8250->ier); + uart_barrier(bas); + uart_unlock(sc->sc_hwmtx); +} Modified: stable/10/sys/dev/uart/uart_dev_ns8250.c ============================================================================== --- stable/10/sys/dev/uart/uart_dev_ns8250.c Sat Mar 1 03:39:56 2014 (r262648) +++ stable/10/sys/dev/uart/uart_dev_ns8250.c Sat Mar 1 04:16:54 2014 (r262649) @@ -365,6 +365,8 @@ static kobj_method_t ns8250_methods[] = KOBJMETHOD(uart_receive, ns8250_bus_receive), KOBJMETHOD(uart_setsig, ns8250_bus_setsig), KOBJMETHOD(uart_transmit, ns8250_bus_transmit), + KOBJMETHOD(uart_grab, ns8250_bus_grab), + KOBJMETHOD(uart_ungrab, ns8250_bus_ungrab), { 0, 0 } }; @@ -898,3 +900,34 @@ ns8250_bus_transmit(struct uart_softc *s uart_sched_softih(sc, SER_INT_TXIDLE); return (0); } + +void +ns8250_bus_grab(struct uart_softc *sc) +{ + struct uart_bas *bas = &sc->sc_bas; + + /* + * turn off all interrupts to enter polling mode. Leave the + * saved mask alone. We'll restore whatever it was in ungrab. + * All pending interupt signals are reset when IER is set to 0. + */ + uart_lock(sc->sc_hwmtx); + uart_setreg(bas, REG_IER, 0); + uart_barrier(bas); + uart_unlock(sc->sc_hwmtx); +} + +void +ns8250_bus_ungrab(struct uart_softc *sc) +{ + struct ns8250_softc *ns8250 = (struct ns8250_softc*)sc; + struct uart_bas *bas = &sc->sc_bas; + + /* + * Restore previous interrupt mask + */ + uart_lock(sc->sc_hwmtx); + uart_setreg(bas, REG_IER, ns8250->ier); + uart_barrier(bas); + uart_unlock(sc->sc_hwmtx); +} Modified: stable/10/sys/dev/uart/uart_dev_ns8250.h ============================================================================== --- stable/10/sys/dev/uart/uart_dev_ns8250.h Sat Mar 1 03:39:56 2014 (r262648) +++ stable/10/sys/dev/uart/uart_dev_ns8250.h Sat Mar 1 04:16:54 2014 (r262649) @@ -56,5 +56,7 @@ int ns8250_bus_probe(struct uart_softc * int ns8250_bus_receive(struct uart_softc *); int ns8250_bus_setsig(struct uart_softc *, int); int ns8250_bus_transmit(struct uart_softc *); +void ns8250_bus_grab(struct uart_softc *); +void ns8250_bus_ungrab(struct uart_softc *); #endif /* _DEV_UART_DEV_NS8250_H_ */ Modified: stable/10/sys/dev/uart/uart_dev_pl011.c ============================================================================== --- stable/10/sys/dev/uart/uart_dev_pl011.c Sat Mar 1 03:39:56 2014 (r262648) +++ stable/10/sys/dev/uart/uart_dev_pl011.c Sat Mar 1 04:16:54 2014 (r262649) @@ -242,6 +242,8 @@ static int uart_pl011_bus_probe(struct u static int uart_pl011_bus_receive(struct uart_softc *); static int uart_pl011_bus_setsig(struct uart_softc *, int); static int uart_pl011_bus_transmit(struct uart_softc *); +static void uart_pl011_bus_grab(struct uart_softc *); +static void uart_pl011_bus_ungrab(struct uart_softc *); static kobj_method_t uart_pl011_methods[] = { KOBJMETHOD(uart_attach, uart_pl011_bus_attach), @@ -255,6 +257,9 @@ static kobj_method_t uart_pl011_methods[ KOBJMETHOD(uart_receive, uart_pl011_bus_receive), KOBJMETHOD(uart_setsig, uart_pl011_bus_setsig), KOBJMETHOD(uart_transmit, uart_pl011_bus_transmit), + KOBJMETHOD(uart_grab, uart_pl011_bus_grab), + KOBJMETHOD(uart_ungrab, uart_pl011_bus_ungrab), + { 0, 0 } }; @@ -441,3 +446,27 @@ uart_pl011_bus_transmit(struct uart_soft return (0); } + +static void +uart_pl011_bus_grab(struct uart_softc *sc) +{ + struct uart_bas *bas; + + bas = &sc->sc_bas; + uart_lock(sc->sc_hwmtx); + __uart_setreg(bas, UART_IMSC, /* Switch to RX polling while grabbed */ + ~UART_RXREADY & __uart_getreg(bas, UART_IMSC)); + uart_unlock(sc->sc_hwmtx); +} + +static void +uart_pl011_bus_ungrab(struct uart_softc *sc) +{ + struct uart_bas *bas; + + bas = &sc->sc_bas; + uart_lock(sc->sc_hwmtx); + __uart_setreg(bas, UART_IMSC, /* Switch to RX interrupts while not grabbed */ + UART_RXREADY | __uart_getreg(bas, UART_IMSC)); + uart_unlock(sc->sc_hwmtx); +} Modified: stable/10/sys/dev/uart/uart_dev_quicc.c ============================================================================== --- stable/10/sys/dev/uart/uart_dev_quicc.c Sat Mar 1 03:39:56 2014 (r262648) +++ stable/10/sys/dev/uart/uart_dev_quicc.c Sat Mar 1 04:16:54 2014 (r262649) @@ -245,6 +245,8 @@ static int quicc_bus_probe(struct uart_s static int quicc_bus_receive(struct uart_softc *); static int quicc_bus_setsig(struct uart_softc *, int); static int quicc_bus_transmit(struct uart_softc *); +static void quicc_bus_grab(struct uart_softc *); +static void quicc_bus_ungrab(struct uart_softc *); static kobj_method_t quicc_methods[] = { KOBJMETHOD(uart_attach, quicc_bus_attach), @@ -258,6 +260,8 @@ static kobj_method_t quicc_methods[] = { KOBJMETHOD(uart_receive, quicc_bus_receive), KOBJMETHOD(uart_setsig, quicc_bus_setsig), KOBJMETHOD(uart_transmit, quicc_bus_transmit), + KOBJMETHOD(uart_grab, quicc_bus_grab), + KOBJMETHOD(uart_ungrab, quicc_bus_ungrab), { 0, 0 } }; @@ -485,3 +489,34 @@ quicc_bus_transmit(struct uart_softc *sc uart_unlock(sc->sc_hwmtx); return (0); } + +static void +quicc_bus_grab(struct uart_softc *sc) +{ + struct uart_bas *bas; + uint16_t st, rb; + + /* Disable interrupts on the receive buffer. */ + bas = &sc->sc_bas; + uart_lock(sc->sc_hwmtx); + rb = quicc_read2(bas, QUICC_PRAM_SCC_RBASE(bas->chan - 1)); + st = quicc_read2(bas, rb); + quicc_write2(bas, rb, st & ~0x9000); + uart_unlock(sc->sc_hwmtx); +} + +static void +quicc_bus_ungrab(struct uart_softc *sc) +{ + struct uart_bas *bas; + uint16_t st, rb; + + /* Enable interrupts on the receive buffer. */ + bas = &sc->sc_bas; + uart_lock(sc->sc_hwmtx); + rb = quicc_read2(bas, QUICC_PRAM_SCC_RBASE(bas->chan - 1)); + st = quicc_read2(bas, rb); + quicc_write2(bas, rb, st | 0x9000); + uart_unlock(sc->sc_hwmtx); +} + Modified: stable/10/sys/dev/uart/uart_dev_sab82532.c ============================================================================== --- stable/10/sys/dev/uart/uart_dev_sab82532.c Sat Mar 1 03:39:56 2014 (r262648) +++ stable/10/sys/dev/uart/uart_dev_sab82532.c Sat Mar 1 04:16:54 2014 (r262649) @@ -365,6 +365,8 @@ static int sab82532_bus_probe(struct uar static int sab82532_bus_receive(struct uart_softc *); static int sab82532_bus_setsig(struct uart_softc *, int); static int sab82532_bus_transmit(struct uart_softc *); +static void sab82532_bus_grab(struct uart_softc *); +static void sab82532_bus_ungrab(struct uart_softc *); static kobj_method_t sab82532_methods[] = { KOBJMETHOD(uart_attach, sab82532_bus_attach), @@ -378,6 +380,8 @@ static kobj_method_t sab82532_methods[] KOBJMETHOD(uart_receive, sab82532_bus_receive), KOBJMETHOD(uart_setsig, sab82532_bus_setsig), KOBJMETHOD(uart_transmit, sab82532_bus_transmit), + KOBJMETHOD(uart_grab, sab82532_bus_grab), + KOBJMETHOD(uart_ungrab, sab82532_bus_ungrab), { 0, 0 } }; @@ -724,3 +728,32 @@ sab82532_bus_transmit(struct uart_softc uart_unlock(sc->sc_hwmtx); return (0); } + +static void +sab82532_bus_grab(struct uart_softc *sc) +{ + struct uart_bas *bas; + uint8_t imr0; + + bas = &sc->sc_bas; + imr0 = SAB_IMR0_TIME|SAB_IMR0_CDSC|SAB_IMR0_RFO; /* No TCD or RPF */ + uart_lock(sc->sc_hwmtx); + uart_setreg(bas, SAB_IMR0, 0xff & ~imr0); + uart_barrier(bas); + uart_unlock(sc->sc_hwmtx); +} + +static void +sab82532_bus_ungrab(struct uart_softc *sc) +{ + struct uart_bas *bas; + uint8_t imr0; + + bas = &sc->sc_bas; + imr0 = SAB_IMR0_TCD|SAB_IMR0_TIME|SAB_IMR0_CDSC|SAB_IMR0_RFO| + SAB_IMR0_RPF; + uart_lock(sc->sc_hwmtx); + uart_setreg(bas, SAB_IMR0, 0xff & ~imr0); + uart_barrier(bas); + uart_unlock(sc->sc_hwmtx); +} Modified: stable/10/sys/dev/uart/uart_dev_z8530.c ============================================================================== --- stable/10/sys/dev/uart/uart_dev_z8530.c Sat Mar 1 03:39:56 2014 (r262648) +++ stable/10/sys/dev/uart/uart_dev_z8530.c Sat Mar 1 04:16:54 2014 (r262649) @@ -281,6 +281,8 @@ static int z8530_bus_probe(struct uart_s static int z8530_bus_receive(struct uart_softc *); static int z8530_bus_setsig(struct uart_softc *, int); static int z8530_bus_transmit(struct uart_softc *); +static void z8530_bus_grab(struct uart_softc *); +static void z8530_bus_ungrab(struct uart_softc *); static kobj_method_t z8530_methods[] = { KOBJMETHOD(uart_attach, z8530_bus_attach), @@ -294,6 +296,8 @@ static kobj_method_t z8530_methods[] = { KOBJMETHOD(uart_receive, z8530_bus_receive), KOBJMETHOD(uart_setsig, z8530_bus_setsig), KOBJMETHOD(uart_transmit, z8530_bus_transmit), + KOBJMETHOD(uart_grab, z8530_bus_grab), + KOBJMETHOD(uart_ungrab, z8530_bus_ungrab), { 0, 0 } }; @@ -621,3 +625,27 @@ z8530_bus_transmit(struct uart_softc *sc uart_unlock(sc->sc_hwmtx); return (0); } + +static void +z8530_bus_grab(struct uart_softc *sc) +{ + struct uart_bas *bas; + + bas = &sc->sc_bas; + uart_lock(sc->sc_hwmtx); + uart_setmreg(bas, WR_IDT, IDT_XIE | IDT_TIE); + uart_barrier(bas); + uart_unlock(sc->sc_hwmtx); +} + +static void +z8530_bus_ungrab(struct uart_softc *sc) +{ + struct uart_bas *bas; + + bas = &sc->sc_bas; + uart_lock(sc->sc_hwmtx); + uart_setmreg(bas, WR_IDT, IDT_XIE | IDT_TIE | IDT_RIA); + uart_barrier(bas); + uart_unlock(sc->sc_hwmtx); +} Modified: stable/10/sys/dev/uart/uart_if.m ============================================================================== --- stable/10/sys/dev/uart/uart_if.m Sat Mar 1 03:39:56 2014 (r262648) +++ stable/10/sys/dev/uart/uart_if.m Sat Mar 1 04:16:54 2014 (r262649) @@ -141,3 +141,19 @@ METHOD int setsig { METHOD int transmit { struct uart_softc *this; }; + +# grab() - Up call from the console to the upper layers of the driver when +# the kernel asks to grab the console. This is valid only for console +# drivers. This method is responsible for transitioning the hardware +# from an interrupt driven state to a polled state that works with the +# low-level console interface defined for this device. The kernel +# currently only calls this when it wants to grab input from the +# console. Output can still happen asyncrhonously to these calls. +METHOD void grab { + struct uart_softc *this; +}; + +# ungrab() - Undoes the effects of grab(). +METHOD void ungrab { + struct uart_softc *this; +}; Modified: stable/10/sys/mips/adm5120/uart_dev_adm5120.c ============================================================================== --- stable/10/sys/mips/adm5120/uart_dev_adm5120.c Sat Mar 1 03:39:56 2014 (r262648) +++ stable/10/sys/mips/adm5120/uart_dev_adm5120.c Sat Mar 1 04:16:54 2014 (r262649) @@ -149,6 +149,8 @@ static int adm5120_uart_bus_probe(struct static int adm5120_uart_bus_receive(struct uart_softc *); static int adm5120_uart_bus_setsig(struct uart_softc *, int); static int adm5120_uart_bus_transmit(struct uart_softc *); +static void adm5120_uart_bus_grab(struct uart_softc *); +static void adm5120_uart_bus_ungrab(struct uart_softc *); static kobj_method_t adm5120_uart_methods[] = { KOBJMETHOD(uart_attach, adm5120_uart_bus_attach), @@ -162,6 +164,8 @@ static kobj_method_t adm5120_uart_method KOBJMETHOD(uart_receive, adm5120_uart_bus_receive), KOBJMETHOD(uart_setsig, adm5120_uart_bus_setsig), KOBJMETHOD(uart_transmit, adm5120_uart_bus_transmit), + KOBJMETHOD(uart_grab, adm5120_uart_bus_grab), + KOBJMETHOD(uart_ungrab, adm5120_uart_bus_ungrab), { 0, 0 } }; @@ -450,3 +454,26 @@ adm5120_uart_bus_transmit(struct uart_so uart_unlock(sc->sc_hwmtx); return (0); } + +static void +adm5120_uart_bus_grab(struct uart_softc *sc) +{ + + /* Enable interrupts - no RX_INT or RX_TIMEOUT */ + uart_lock(sc->sc_hwmtx); + uart_setreg(&sc->sc_bas, UART_CR_REG, + UART_CR_PORT_EN | UART_CR_MODEM_STATUS_INT_EN); + uart_unlock(sc->sc_hwmtx); +} + +static void +adm5120_uart_bus_ungrab(struct uart_softc *sc) +{ + + /* Enable interrupts */ + uart_lock(sc->sc_hwmtx); + uart_setreg(&sc->sc_bas, UART_CR_REG, + UART_CR_PORT_EN|UART_CR_RX_INT_EN|UART_CR_RX_TIMEOUT_INT_EN| + UART_CR_MODEM_STATUS_INT_EN); + uart_unlock(sc->sc_hwmtx); +} Modified: stable/10/sys/mips/atheros/uart_dev_ar933x.c ============================================================================== --- stable/10/sys/mips/atheros/uart_dev_ar933x.c Sat Mar 1 03:39:56 2014 (r262648) +++ stable/10/sys/mips/atheros/uart_dev_ar933x.c Sat Mar 1 04:16:54 2014 (r262649) @@ -325,6 +325,8 @@ static int ar933x_bus_probe(struct uart_ static int ar933x_bus_receive(struct uart_softc *); static int ar933x_bus_setsig(struct uart_softc *, int); static int ar933x_bus_transmit(struct uart_softc *); +static void ar933x_bus_grab(struct uart_softc *); +static void ar933x_bus_ungrab(struct uart_softc *); static kobj_method_t ar933x_methods[] = { KOBJMETHOD(uart_attach, ar933x_bus_attach), @@ -338,6 +340,8 @@ static kobj_method_t ar933x_methods[] = KOBJMETHOD(uart_receive, ar933x_bus_receive), KOBJMETHOD(uart_setsig, ar933x_bus_setsig), KOBJMETHOD(uart_transmit, ar933x_bus_transmit), + KOBJMETHOD(uart_grab, ar933x_bus_grab), + KOBJMETHOD(uart_ungrab, ar933x_bus_ungrab), { 0, 0 } }; @@ -752,3 +756,31 @@ ar933x_bus_transmit(struct uart_softc *s return (0); } + +static void +ar933x_bus_grab(struct uart_softc *sc) +{ + struct uart_bas *bas = &sc->sc_bas; + uint32_t reg; + + /* Disable the host interrupt now */ + uart_lock(sc->sc_hwmtx); + reg = ar933x_getreg(bas, AR933X_UART_CS_REG); + reg &= ~AR933X_UART_CS_HOST_INT_EN; + ar933x_setreg(bas, AR933X_UART_CS_REG, reg); + uart_unlock(sc->sc_hwmtx); +} + +static void +ar933x_bus_ungrab(struct uart_softc *sc) +{ + struct uart_bas *bas = &sc->sc_bas; + uint32_t reg; + + /* Enable the host interrupt now */ + uart_lock(sc->sc_hwmtx); + reg = ar933x_getreg(bas, AR933X_UART_CS_REG); + reg |= AR933X_UART_CS_HOST_INT_EN; + ar933x_setreg(bas, AR933X_UART_CS_REG, reg); + uart_unlock(sc->sc_hwmtx); +} Modified: stable/10/sys/mips/cavium/uart_dev_oct16550.c ============================================================================== --- stable/10/sys/mips/cavium/uart_dev_oct16550.c Sat Mar 1 03:39:56 2014 (r262648) +++ stable/10/sys/mips/cavium/uart_dev_oct16550.c Sat Mar 1 04:16:54 2014 (r262649) @@ -398,6 +398,8 @@ static int oct16550_bus_probe(struct uar static int oct16550_bus_receive(struct uart_softc *); static int oct16550_bus_setsig(struct uart_softc *, int); static int oct16550_bus_transmit(struct uart_softc *); +static void oct16550_bus_grab(struct uart_softc *); +static void oct16550_bus_ungrab(struct uart_softc *); static kobj_method_t oct16550_methods[] = { KOBJMETHOD(uart_attach, oct16550_bus_attach), @@ -411,6 +413,8 @@ static kobj_method_t oct16550_methods[] KOBJMETHOD(uart_receive, oct16550_bus_receive), KOBJMETHOD(uart_setsig, oct16550_bus_setsig), KOBJMETHOD(uart_transmit, oct16550_bus_transmit), + KOBJMETHOD(uart_grab, oct16550_bus_grab), + KOBJMETHOD(uart_ungrab, oct16550_bus_ungrab), { 0, 0 } }; @@ -810,3 +814,34 @@ oct16550_bus_transmit (struct uart_softc uart_unlock(sc->sc_hwmtx); return (0); } + +static void +oct16550_bus_grab(struct uart_softc *sc) +{ + struct uart_bas *bas = &sc->sc_bas; + + /* + * turn off all interrupts to enter polling mode. Leave the + * saved mask alone. We'll restore whatever it was in ungrab. + * All pending interupt signals are reset when IER is set to 0. + */ + uart_lock(sc->sc_hwmtx); + uart_setreg(bas, REG_IER, 0); + uart_barrier(bas); + uart_unlock(sc->sc_hwmtx); +} + +static void +oct16550_bus_ungrab(struct uart_softc *sc) +{ + struct oct16550_softc *oct16550 = (struct oct16550_softc*)sc; + struct uart_bas *bas = &sc->sc_bas; + + /* + * Restore previous interrupt mask + */ + uart_lock(sc->sc_hwmtx); + uart_setreg(bas, REG_IER, oct16550->ier); + uart_barrier(bas); + uart_unlock(sc->sc_hwmtx); +} Modified: stable/10/sys/mips/rt305x/uart_dev_rt305x.c ============================================================================== --- stable/10/sys/mips/rt305x/uart_dev_rt305x.c Sat Mar 1 03:39:56 2014 (r262648) +++ stable/10/sys/mips/rt305x/uart_dev_rt305x.c Sat Mar 1 04:16:54 2014 (r262649) @@ -195,6 +195,8 @@ static int rt305x_uart_bus_probe(struct static int rt305x_uart_bus_receive(struct uart_softc *); static int rt305x_uart_bus_setsig(struct uart_softc *, int); static int rt305x_uart_bus_transmit(struct uart_softc *); +static void rt305x_uart_bus_grab(struct uart_softc *); +static void rt305x_uart_bus_ungrab(struct uart_softc *); static kobj_method_t rt305x_uart_methods[] = { KOBJMETHOD(uart_attach, rt305x_uart_bus_attach), @@ -208,6 +210,8 @@ static kobj_method_t rt305x_uart_methods KOBJMETHOD(uart_receive, rt305x_uart_bus_receive), KOBJMETHOD(uart_setsig, rt305x_uart_bus_setsig), KOBJMETHOD(uart_transmit, rt305x_uart_bus_transmit), + KOBJMETHOD(uart_grab, rt305x_uart_bus_grab), + KOBJMETHOD(uart_ungrab, rt305x_uart_bus_ungrab), { 0, 0 } }; @@ -278,7 +282,7 @@ rt305x_uart_bus_attach(struct uart_softc uart_setreg(bas, UART_FCR_REG, uart_getreg(bas, UART_FCR_REG) | UART_FCR_FIFOEN | UART_FCR_TXTGR_1 | UART_FCR_RXTGR_1); - uart_barrier(bas); + uart_barrier(bas); /* Enable interrupts */ uart_setreg(bas, UART_IER_REG, UART_IER_EDSSI | UART_IER_ELSI | UART_IER_ERBFI); @@ -505,3 +509,28 @@ rt305x_uart_bus_transmit(struct uart_sof uart_unlock(sc->sc_hwmtx); return (0); } + +static void +rt305x_uart_bus_grab(struct uart_softc *sc) +{ + struct uart_bas *bas = &sc->sc_bas; + + /* disable interrupts -- XXX not sure which one is RX, so kill them all */ + uart_lock(sc->sc_hwmtx); + uart_setreg(bas, UART_IER_REG, 0); + uart_barrier(bas); + uart_unlock(sc->sc_hwmtx); +} + +static void +rt305x_uart_bus_ungrab(struct uart_softc *sc) +{ + struct uart_bas *bas = &sc->sc_bas; + + /* Enable interrupts */ + uart_lock(sc->sc_hwmtx); + uart_setreg(bas, UART_IER_REG, + UART_IER_EDSSI | UART_IER_ELSI | UART_IER_ERBFI); + uart_barrier(bas); + uart_unlock(sc->sc_hwmtx); +} From owner-svn-src-stable@FreeBSD.ORG Sat Mar 1 04:25:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1895EBD; Sat, 1 Mar 2014 04:25:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B255012D6; Sat, 1 Mar 2014 04:25:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s214PrtE062672; Sat, 1 Mar 2014 04:25:53 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s214PqeL062668; Sat, 1 Mar 2014 04:25:52 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201403010425.s214PqeL062668@svn.freebsd.org> From: Brooks Davis Date: Sat, 1 Mar 2014 04:25:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262650 - in stable/10: share/mk tools/build/mk tools/build/options usr.sbin X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Mar 2014 04:25:54 -0000 Author: brooks Date: Sat Mar 1 04:25:52 2014 New Revision: 262650 URL: http://svnweb.freebsd.org/changeset/base/262650 Log: MFC r261299: Merge from CheriBSD: commit 2d581e8caf79d7a0f5a24590eccd06da90cccb74 Author: Brooks Davis Date: Mon Jan 27 22:57:51 2014 +0000 Add WITHOUT_FMTREE to disable building fmtree. Sponsored by: DARPA, AFRL Added: stable/10/tools/build/options/WITHOUT_FMTREE - copied unchanged from r261299, head/tools/build/options/WITHOUT_FMTREE Modified: stable/10/share/mk/bsd.own.mk stable/10/tools/build/mk/OptionalObsoleteFiles.inc stable/10/usr.sbin/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Sat Mar 1 04:16:54 2014 (r262649) +++ stable/10/share/mk/bsd.own.mk Sat Mar 1 04:25:52 2014 (r262650) @@ -274,6 +274,7 @@ __DEFAULT_YES_OPTIONS = \ ED_CRYPTO \ EXAMPLES \ FLOPPY \ + FMTREE \ FORMAT_EXTENSIONS \ FORTH \ FP_LIBC \ Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Sat Mar 1 04:16:54 2014 (r262649) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Sat Mar 1 04:25:52 2014 (r262650) @@ -630,6 +630,11 @@ OLD_FILES+=usr/bin/g++ OLD_FILES+=usr/libexec/cc1plus .endif +.if ${MK_FMTREE} == no +OLD_FILES+=usr/sbin/fmtree +OLD_FILES+=usr/share/man/man8/fmtree.8.gz +.endif + .if ${MK_GNUCXX} == no OLD_FILES+=usr/bin/g++ OLD_FILES+=usr/include/c++/4.2/algorithm Copied: stable/10/tools/build/options/WITHOUT_FMTREE (from r261299, head/tools/build/options/WITHOUT_FMTREE) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_FMTREE Sat Mar 1 04:25:52 2014 (r262650, copy of r261299, head/tools/build/options/WITHOUT_FMTREE) @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to not build and install +.Pa /usr/sbin/fmtree . Modified: stable/10/usr.sbin/Makefile ============================================================================== --- stable/10/usr.sbin/Makefile Sat Mar 1 04:16:54 2014 (r262649) +++ stable/10/usr.sbin/Makefile Sat Mar 1 04:25:52 2014 (r262650) @@ -48,7 +48,7 @@ SUBDIR= adduser \ mountd \ mptutil \ mtest \ - mtree \ + ${_mtree} \ newsyslog \ nfscbd \ nfsd \ @@ -142,6 +142,10 @@ SUBDIR+= fdread SUBDIR+= fdwrite .endif +.if ${MK_FMTREE} != "no" +SUBDIR+= mtree +.endif + .if ${MK_FREEBSD_UPDATE} != "no" SUBDIR+= freebsd-update .endif From owner-svn-src-stable@FreeBSD.ORG Sat Mar 1 04:44:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E3034289; Sat, 1 Mar 2014 04:44:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CB51F147C; Sat, 1 Mar 2014 04:44:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s214iXUe070327; Sat, 1 Mar 2014 04:44:33 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s214iXkZ070326; Sat, 1 Mar 2014 04:44:33 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201403010444.s214iXkZ070326@svn.freebsd.org> From: Brooks Davis Date: Sat, 1 Mar 2014 04:44:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262651 - stable/10/share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Mar 2014 04:44:34 -0000 Author: brooks Date: Sat Mar 1 04:44:33 2014 New Revision: 262651 URL: http://svnweb.freebsd.org/changeset/base/262651 Log: MFC r261301 (notional merge): Regenerate for WITHOUT_FMTREE and WITHOUT_NCURSESW Large churn in comments due to regeneration with makeman script. Sponsored by: DARPA, AFRL Modified: stable/10/share/man/man5/src.conf.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man5/src.conf.5 ============================================================================== --- stable/10/share/man/man5/src.conf.5 Sat Mar 1 04:25:52 2014 (r262650) +++ stable/10/share/man/man5/src.conf.5 Sat Mar 1 04:44:33 2014 (r262651) @@ -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 January 27, 2014 +.Dd March 1, 2014 .Dt SRC.CONF 5 .Os .Sh NAME @@ -78,54 +78,54 @@ The following list provides a name and s that can be used for source builds. .Bl -tag -width indent .It Va WITHOUT_ACCT -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_ACCT 223201 2011-06-17 20:47:44Z ed +.\" from FreeBSD: head/tools/build/options/WITHOUT_ACCT 223201 2011-06-17 20:47:44Z ed Set to not build process accounting tools such as .Xr accton 8 and .Xr sa 8 . .It Va WITHOUT_ACPI -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_ACPI 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_ACPI 156932 2006-03-21 07:50:50Z ru Set to not build .Xr acpiconf 8 , .Xr acpidump 8 and related programs. .It Va WITHOUT_AMD -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_AMD 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: head/tools/build/options/WITHOUT_AMD 183242 2008-09-21 22:02:26Z sam Set to not build .Xr amd 8 , and related programs. .It Va WITHOUT_APM -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_APM 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: head/tools/build/options/WITHOUT_APM 183242 2008-09-21 22:02:26Z sam Set to not build .Xr apm 8 , .Xr apmd 8 and related programs. .It Va WITHOUT_ARM_EABI -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_ARM_EABI 253396 2013-07-16 19:15:19Z andrew +.\" from FreeBSD: head/tools/build/options/WITHOUT_ARM_EABI 253396 2013-07-16 19:15:19Z andrew Set the ARM ABI to OABI. .It Va WITHOUT_ASSERT_DEBUG -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_ASSERT_DEBUG 162215 2006-09-11 13:55:27Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_ASSERT_DEBUG 162215 2006-09-11 13:55:27Z ru Set to compile programs and libraries without the .Xr assert 3 checks. .It Va WITHOUT_AT -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_AT 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: head/tools/build/options/WITHOUT_AT 183242 2008-09-21 22:02:26Z sam Set to not build .Xr at 1 and related utilities. .It Va WITHOUT_ATM -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_ATM 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_ATM 156932 2006-03-21 07:50:50Z ru Set to not build programs and libraries related to ATM networking. .It Va WITHOUT_AUDIT -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_AUDIT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_AUDIT 156932 2006-03-21 07:50:50Z ru Set to not build audit support into system programs. .It Va WITHOUT_AUTHPF -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_AUTHPF 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_AUTHPF 156932 2006-03-21 07:50:50Z ru Set to not build .Xr authpf 8 . .It Va WITHOUT_BINUTILS -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BINUTILS 255974 2013-10-01 17:40:56Z emaste +.\" from FreeBSD: head/tools/build/options/WITHOUT_BINUTILS 255974 2013-10-01 17:40:56Z emaste Set to not install binutils (as, c++-filt, gconv, ld, nm, objcopy, objdump, readelf, size and strip). .Bf -symbolic @@ -133,10 +133,10 @@ The option does not generally work for b toolchain is enabled. .Ef .It Va WITHOUT_BLUETOOTH -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BLUETOOTH 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_BLUETOOTH 156932 2006-03-21 07:50:50Z ru Set to not build Bluetooth related kernel modules, programs and libraries. .It Va WITHOUT_BMAKE -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BMAKE 250839 2013-05-21 00:41:49Z delphij +.\" from FreeBSD: head/tools/build/options/WITHOUT_BMAKE 250839 2013-05-21 00:41:49Z delphij Set to not build and install the portable BSD make (bmake) as .Xr make 1 instead of the traditional FreeBSD make. @@ -145,22 +145,22 @@ It allows developers to switch to bmake kinks or issues. 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 +.\" from FreeBSD: head/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_BSD_CPIO -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BSD_CPIO 179813 2008-06-16 05:48:15Z dougb +.\" from FreeBSD: head/tools/build/options/WITHOUT_BSD_CPIO 179813 2008-06-16 05:48:15Z dougb Set to not build the BSD licensed version of cpio based on .Xr libarchive 3 . .It Va WITH_BSD_GREP -.\" from FreeBSD: stable/10/tools/build/options/WITH_BSD_GREP 222273 2011-05-25 01:04:12Z obrien +.\" from FreeBSD: head/tools/build/options/WITH_BSD_GREP 222273 2011-05-25 01:04:12Z obrien Install BSD-licensed grep as '[ef]grep' instead of GNU grep. .It Va WITHOUT_BSNMP -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BSNMP 183306 2008-09-23 16:15:42Z sam +.\" from FreeBSD: head/tools/build/options/WITHOUT_BSNMP 183306 2008-09-23 16:15:42Z sam Set to not build or install .Xr bsnmpd 1 and related libraries and data files. .It Va WITHOUT_BZIP2 -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BZIP2 174550 2007-12-12 16:43:17Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_BZIP2 174550 2007-12-12 16:43:17Z ru Set to not build contributed bzip2 software as a part of the base system. .Bf -symbolic The option has no effect yet. @@ -172,17 +172,17 @@ When set, it also enforces the following .Va WITHOUT_BZIP2_SUPPORT .El .It Va WITHOUT_BZIP2_SUPPORT -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BZIP2_SUPPORT 166255 2007-01-26 10:19:08Z delphij +.\" from FreeBSD: head/tools/build/options/WITHOUT_BZIP2_SUPPORT 166255 2007-01-26 10:19:08Z delphij Set to build some programs without optional bzip2 support. .It Va WITHOUT_CALENDAR -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_CALENDAR 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_CALENDAR 156932 2006-03-21 07:50:50Z ru Set to not build .Xr calendar 1 . .It Va WITHOUT_CAPSICUM -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_CAPSICUM 229319 2012-01-02 21:57:58Z rwatson +.\" from FreeBSD: head/tools/build/options/WITHOUT_CAPSICUM 229319 2012-01-02 21:57:58Z rwatson Set to not build Capsicum support into system programs. .It Va WITHOUT_CDDL -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_CDDL 163861 2006-11-01 09:02:11Z jb +.\" from FreeBSD: head/tools/build/options/WITHOUT_CDDL 163861 2006-11-01 09:02:11Z jb Set to not build code licensed under Sun's CDDL. When set, it also enforces the following options: .Pp @@ -193,7 +193,7 @@ When set, it also enforces the following .Va WITHOUT_ZFS .El .It Va WITHOUT_CLANG -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_CLANG 208971 2010-06-10 06:20:26Z ed +.\" from FreeBSD: head/tools/build/options/WITHOUT_CLANG 208971 2010-06-10 06:20:26Z ed Set to not build the Clang C/C++ compiler. .Pp It is a default setting on @@ -207,30 +207,30 @@ When set, it also enforces the following .Va WITHOUT_CLANG_FULL .El .It Va WITH_CLANG -.\" from FreeBSD: stable/10/tools/build/options/WITH_CLANG 221730 2011-05-10 11:14:40Z ru +.\" from FreeBSD: head/tools/build/options/WITH_CLANG 221730 2011-05-10 11:14:40Z ru Set to build the Clang C/C++ compiler. .Pp It is a default setting on amd64/amd64, arm/arm, arm/armv6, i386/i386, pc98/i386, powerpc/powerpc and powerpc/powerpc64. .It Va WITH_CLANG_EXTRAS -.\" from FreeBSD: stable/10/tools/build/options/WITH_CLANG_EXTRAS 231057 2012-02-05 23:56:22Z dim +.\" from FreeBSD: head/tools/build/options/WITH_CLANG_EXTRAS 231057 2012-02-05 23:56:22Z dim Set to build additional clang and llvm tools, such as bugpoint. .It Va WITHOUT_CLANG_FULL -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_CLANG_FULL 246259 2013-02-02 22:28:29Z dim +.\" from FreeBSD: head/tools/build/options/WITHOUT_CLANG_FULL 246259 2013-02-02 22:28:29Z dim Set to avoid building the ARCMigrate, Rewriter and StaticAnalyzer components of the Clang C/C++ compiler. .Pp It is a default setting on arm/arm, arm/armeb, arm/armv6, ia64/ia64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32 and sparc64/sparc64. .It Va WITH_CLANG_FULL -.\" from FreeBSD: stable/10/tools/build/options/WITH_CLANG_FULL 246259 2013-02-02 22:28:29Z dim +.\" from FreeBSD: head/tools/build/options/WITH_CLANG_FULL 246259 2013-02-02 22:28:29Z dim Set to build the ARCMigrate, Rewriter and StaticAnalyzer components of the Clang C/C++ compiler. .Pp It is a default setting on amd64/amd64, i386/i386, pc98/i386, powerpc/powerpc and powerpc/powerpc64. .It Va WITHOUT_CLANG_IS_CC -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_CLANG_IS_CC 242629 2012-11-05 21:53:23Z brooks +.\" from FreeBSD: head/tools/build/options/WITHOUT_CLANG_IS_CC 242629 2012-11-05 21:53:23Z brooks Set to install the GCC compiler as .Pa /usr/bin/cc , .Pa /usr/bin/c++ @@ -246,7 +246,7 @@ When set, it also enforces the following .Va WITHOUT_LLDB .El .It Va WITH_CLANG_IS_CC -.\" from FreeBSD: stable/10/tools/build/options/WITH_CLANG_IS_CC 235342 2012-05-12 16:12:36Z gjb +.\" from FreeBSD: head/tools/build/options/WITH_CLANG_IS_CC 235342 2012-05-12 16:12:36Z gjb Set to install the Clang C/C++ compiler as .Pa /usr/bin/cc , .Pa /usr/bin/c++ @@ -256,15 +256,15 @@ and It is a default setting on amd64/amd64, arm/arm, arm/armv6, i386/i386 and pc98/i386. .It Va WITHOUT_CPP -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_CPP 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_CPP 156932 2006-03-21 07:50:50Z ru Set to not build .Xr cpp 1 . .It Va WITHOUT_CROSS_COMPILER -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_CROSS_COMPILER 250659 2013-05-15 14:30:03Z brooks +.\" from FreeBSD: head/tools/build/options/WITHOUT_CROSS_COMPILER 250659 2013-05-15 14:30:03Z brooks Set to not build a cross compiler in the cross-tools stage of buildworld, buildkernel, etc. .It Va WITHOUT_CRYPT -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_CRYPT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_CRYPT 156932 2006-03-21 07:50:50Z ru Set to not build any crypto code. When set, it also enforces the following options: .Pp @@ -288,17 +288,17 @@ When set, the following options are also is set explicitly) .El .It Va WITH_CTF -.\" from FreeBSD: stable/10/tools/build/options/WITH_CTF 228159 2011-11-30 18:22:44Z fjoe +.\" from FreeBSD: head/tools/build/options/WITH_CTF 228159 2011-11-30 18:22:44Z fjoe Set to compile with CTF (Compact C Type Format) data. CTF data encapsulates a reduced form of debugging information similar to DWARF and the venerable stabs and is required for DTrace. .It Va WITHOUT_CTM -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_CTM 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: head/tools/build/options/WITHOUT_CTM 183242 2008-09-21 22:02:26Z sam Set to not build .Xr ctm 1 and related utilities. .It Va WITHOUT_CXX -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_CXX 220402 2011-04-06 20:19:07Z uqs +.\" from FreeBSD: head/tools/build/options/WITHOUT_CXX 220402 2011-04-06 20:19:07Z uqs Set to not build .Xr g++ 1 and related libraries. @@ -319,7 +319,7 @@ When set, it also enforces the following .Va WITHOUT_GROFF .El .It Va WITH_DEBUG_FILES -.\" from FreeBSD: stable/10/tools/build/options/WITH_DEBUG_FILES 251512 2013-06-07 21:40:02Z emaste +.\" from FreeBSD: head/tools/build/options/WITH_DEBUG_FILES 251512 2013-06-07 21:40:02Z emaste Set to strip debug info into a separate file for each executable binary and shared library. The debug files will be placed in a subdirectory of @@ -327,86 +327,90 @@ The debug files will be placed in a subd and are located automatically by .Xr gdb 1 . .It Va WITHOUT_DICT -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_DICT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_DICT 156932 2006-03-21 07:50:50Z ru Set to not build the Webster dictionary files. .It Va WITHOUT_DYNAMICROOT -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_DYNAMICROOT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_DYNAMICROOT 156932 2006-03-21 07:50:50Z ru Set this if you do not want to link .Pa /bin and .Pa /sbin dynamically. .It Va WITHOUT_ED_CRYPTO -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_ED_CRYPTO 235660 2012-05-19 20:05:27Z marcel +.\" from FreeBSD: head/tools/build/options/WITHOUT_ED_CRYPTO 235660 2012-05-19 20:05:27Z marcel Set to build .Xr ed 1 without support for encryption/decryption. .It Va WITHOUT_EXAMPLES -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_EXAMPLES 156938 2006-03-21 09:06:24Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_EXAMPLES 156938 2006-03-21 09:06:24Z ru Set to avoid installing examples to .Pa /usr/share/examples/ . .It Va WITHOUT_FDT -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_FDT 221539 2011-05-06 19:10:27Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_FDT 221539 2011-05-06 19:10:27Z ru Set to not build Flattened Device Tree support as part of the base system. This includes the device tree compiler (dtc) and libfdt support library. .Pp It is a default setting on amd64/amd64, i386/i386, ia64/ia64, pc98/i386 and sparc64/sparc64. .It Va WITH_FDT -.\" from FreeBSD: stable/10/tools/build/options/WITH_FDT 221730 2011-05-10 11:14:40Z ru +.\" from FreeBSD: head/tools/build/options/WITH_FDT 221730 2011-05-10 11:14:40Z ru Set to build Flattened Device Tree support as part of the base system. This includes the device tree compiler (dtc) and libfdt support library. .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_FLOPPY -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_FLOPPY 221540 2011-05-06 19:13:03Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_FLOPPY 221540 2011-05-06 19:13:03Z ru Set to not build or install programs for operating floppy disk driver. +.It Va WITHOUT_FMTREE +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_FMTREE 262650 2014-03-01 04:25:52Z brooks +Set to not build and install +.Pa /usr/sbin/fmtree . .It Va WITHOUT_FORMAT_EXTENSIONS -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_FORMAT_EXTENSIONS 250658 2013-05-15 13:04:10Z brooks +.\" from FreeBSD: head/tools/build/options/WITHOUT_FORMAT_EXTENSIONS 250658 2013-05-15 13:04:10Z brooks Set to not enable .Fl fformat-extensions when compiling the kernel. Also disables all format checking. .It Va WITHOUT_FORTH -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_FORTH 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_FORTH 156932 2006-03-21 07:50:50Z ru Set to build bootloaders without Forth support. .It Va WITHOUT_FP_LIBC -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_FP_LIBC 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_FP_LIBC 156932 2006-03-21 07:50:50Z ru Set to build .Nm libc without floating-point support. .It Va WITHOUT_FREEBSD_UPDATE -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_FREEBSD_UPDATE 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: head/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_GAMES -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_GAMES 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_GAMES 156932 2006-03-21 07:50:50Z ru Set to not build games. .It Va WITHOUT_GCC -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_GCC 255326 2013-09-06 20:49:48Z zeising +.\" from FreeBSD: head/tools/build/options/WITHOUT_GCC 255326 2013-09-06 20:49:48Z zeising Set to not build and install gcc and g++. .Pp It is a default setting on amd64/amd64, arm/arm, arm/armv6 and i386/i386. .It Va WITH_GCC -.\" from FreeBSD: stable/10/tools/build/options/WITH_GCC 255326 2013-09-06 20:49:48Z zeising +.\" from FreeBSD: head/tools/build/options/WITH_GCC 255326 2013-09-06 20:49:48Z zeising Set to build and install gcc and g++. .Pp It is a default setting on arm/armeb, ia64/ia64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_GCOV -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_GCOV 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_GCOV 156932 2006-03-21 07:50:50Z ru Set to not build the .Xr gcov 1 tool. .It Va WITHOUT_GDB -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_GDB 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_GDB 156932 2006-03-21 07:50:50Z ru Set to not build .Xr gdb 1 . .It Va WITHOUT_GNU -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_GNU 174550 2007-12-12 16:43:17Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_GNU 174550 2007-12-12 16:43:17Z ru Set to not build contributed GNU software as a part of the base system. This option can be useful if the system built must not contain any code covered by the GNU Public License due to legal reasons. @@ -420,36 +424,36 @@ When set, it also enforces the following .Va WITHOUT_GNU_SUPPORT .El .It Va WITHOUT_GNUCXX -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_GNUCXX 255321 2013-09-06 20:08:03Z theraven +.\" from FreeBSD: head/tools/build/options/WITHOUT_GNUCXX 255321 2013-09-06 20:08:03Z theraven Do not build the GNU C++ stack (g++, libstdc++). This is the default on platforms where clang is the system compiler. .Pp It is a default setting on amd64/amd64, arm/arm, arm/armv6, i386/i386 and pc98/i386. .It Va WITH_GNUCXX -.\" from FreeBSD: stable/10/tools/build/options/WITH_GNUCXX 255321 2013-09-06 20:08:03Z theraven +.\" from FreeBSD: head/tools/build/options/WITH_GNUCXX 255321 2013-09-06 20:08:03Z theraven Build the GNU C++ stack (g++, libstdc++). This is the default on platforms where gcc is the system compiler. .Pp It is a default setting on arm/armeb, ia64/ia64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_GNU_SUPPORT -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_GNU_SUPPORT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build some programs without optional GNU support. .It Va WITHOUT_GPIB -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_GPIB 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_GPIB 156932 2006-03-21 07:50:50Z ru Set to not build GPIB bus support. .It Va WITHOUT_GPIO -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_GPIO 228081 2011-11-28 17:54:34Z dim +.\" from FreeBSD: head/tools/build/options/WITHOUT_GPIO 228081 2011-11-28 17:54:34Z dim Set to not build .Xr gpioctl 8 as part of the base system. .It Va WITH_GPL_DTC -.\" from FreeBSD: stable/10/tools/build/options/WITH_GPL_DTC 246262 2013-02-02 22:42:46Z dim +.\" from FreeBSD: head/tools/build/options/WITH_GPL_DTC 246262 2013-02-02 22:42:46Z dim Set to build the GPL'd version of the device tree compiler from elinux.org, instead of the BSD licensed one. .It Va WITHOUT_GROFF -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_GROFF 218941 2011-02-22 08:13:49Z uqs +.\" from FreeBSD: head/tools/build/options/WITHOUT_GROFF 218941 2011-02-22 08:13:49Z uqs Set to not build .Xr groff 1 and @@ -457,19 +461,19 @@ and You should consider installing the textproc/groff port to not break .Xr man 1 . .It Va WITHOUT_GSSAPI -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_GSSAPI 174548 2007-12-12 16:39:32Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_GSSAPI 174548 2007-12-12 16:39:32Z ru Set to not build libgssapi. .It Va WITH_HESIOD -.\" from FreeBSD: stable/10/tools/build/options/WITH_HESIOD 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITH_HESIOD 156932 2006-03-21 07:50:50Z ru Set to build Hesiod support. .It Va WITHOUT_HTML -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_HTML 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_HTML 156932 2006-03-21 07:50:50Z ru Set to not build HTML docs. .It Va WITHOUT_ICONV -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_ICONV 254919 2013-08-26 17:15:56Z antoine +.\" from FreeBSD: head/tools/build/options/WITHOUT_ICONV 254919 2013-08-26 17:15:56Z antoine Set to not build iconv as part of libc. .It Va WITHOUT_INET -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_INET 221266 2011-04-30 17:58:28Z bz +.\" from FreeBSD: head/tools/build/options/WITHOUT_INET 221266 2011-04-30 17:58:28Z bz Set to not build programs and libraries related to IPv4 networking. When set, it also enforces the following options: .Pp @@ -478,7 +482,7 @@ When set, it also enforces the following .Va WITHOUT_INET_SUPPORT .El .It Va WITHOUT_INET6 -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_INET6 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_INET6 156932 2006-03-21 07:50:50Z ru Set to not build programs and libraries related to IPv6 networking. When set, it also enforces the following options: @@ -488,24 +492,24 @@ When set, it also enforces the following .Va WITHOUT_INET6_SUPPORT .El .It Va WITHOUT_INET6_SUPPORT -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_INET6_SUPPORT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/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_INET_SUPPORT -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_INET_SUPPORT 221266 2011-04-30 17:58:28Z bz +.\" from FreeBSD: head/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. .It Va WITHOUT_INFO -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_INFO 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_INFO 156932 2006-03-21 07:50:50Z ru Set to not make or install .Xr info 5 files. .It Va WITHOUT_INSTALLLIB -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_INSTALLLIB 174497 2007-12-09 21:56:21Z dougb +.\" from FreeBSD: head/tools/build/options/WITHOUT_INSTALLLIB 174497 2007-12-09 21:56:21Z dougb Set this if you do not want to install optional libraries. For example when creating a .Xr nanobsd 8 image. .It Va WITH_INSTALL_AS_USER -.\" from FreeBSD: stable/10/tools/build/options/WITH_INSTALL_AS_USER 238021 2012-07-02 20:24:01Z marcel +.\" from FreeBSD: head/tools/build/options/WITH_INSTALL_AS_USER 238021 2012-07-02 20:24:01Z marcel Set to make install targets succeed for non-root users by installing files with owner and group attributes set to that of the user running the @@ -515,13 +519,13 @@ The user still has to set the .Va DESTDIR variable to point to a directory where the user has write permissions. .It Va WITHOUT_IPFILTER -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_IPFILTER 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_IPFILTER 156932 2006-03-21 07:50:50Z ru Set to not build IP Filter package. .It Va WITHOUT_IPFW -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_IPFW 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: head/tools/build/options/WITHOUT_IPFW 183242 2008-09-21 22:02:26Z sam Set to not build IPFW tools. .It Va WITHOUT_IPX -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_IPX 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_IPX 156932 2006-03-21 07:50:50Z ru Set to not build programs and libraries related to IPX networking. When set, it also enforces the following options: .Pp @@ -530,20 +534,20 @@ When set, it also enforces the following .Va WITHOUT_IPX_SUPPORT .El .It Va WITHOUT_IPX_SUPPORT -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_IPX_SUPPORT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_IPX_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build some programs without IPX support. .It Va WITHOUT_JAIL -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_JAIL 249966 2013-04-27 04:09:09Z eadler +.\" from FreeBSD: head/tools/build/options/WITHOUT_JAIL 249966 2013-04-27 04:09:09Z eadler Set to not build tools for the support of jails; e.g., .Xr jail 8 . .It Va WITHOUT_KDUMP -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_KDUMP 240690 2012-09-19 11:38:37Z zeising +.\" from FreeBSD: head/tools/build/options/WITHOUT_KDUMP 240690 2012-09-19 11:38:37Z zeising Set to not build .Xr kdump 1 and .Xr truss 1 . .It Va WITHOUT_KERBEROS -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_KERBEROS 174549 2007-12-12 16:42:03Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_KERBEROS 174549 2007-12-12 16:42:03Z ru Set this if you do not want to build Kerberos 5 (KTH Heimdal). When set, it also enforces the following options: .Pp @@ -561,7 +565,7 @@ When set, the following options are also is set explicitly) .El .It Va WITHOUT_KERBEROS_SUPPORT -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_KERBEROS_SUPPORT 251794 2013-06-15 20:29:07Z eadler +.\" from FreeBSD: head/tools/build/options/WITHOUT_KERBEROS_SUPPORT 251794 2013-06-15 20:29:07Z eadler Set to build some programs without Kerberos support, like .Xr ssh 1 , .Xr telnet 1 , @@ -569,13 +573,13 @@ Set to build some programs without Kerbe and .Xr telnetd 8 . .It Va WITHOUT_KERNEL_SYMBOLS -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_KERNEL_SYMBOLS 222189 2011-05-22 18:23:17Z imp +.\" from FreeBSD: head/tools/build/options/WITHOUT_KERNEL_SYMBOLS 222189 2011-05-22 18:23:17Z imp Set to not install kernel symbol files. .Bf -symbolic This option is recommended for those people who have small root partitions. .Ef .It Va WITHOUT_KVM -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_KVM 174550 2007-12-12 16:43:17Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_KVM 174550 2007-12-12 16:43:17Z ru Set to not build the .Nm libkvm library as a part of the base system. @@ -589,12 +593,12 @@ When set, it also enforces the following .Va WITHOUT_KVM_SUPPORT .El .It Va WITHOUT_KVM_SUPPORT -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_KVM_SUPPORT 170644 2007-06-13 02:08:04Z sepotvin +.\" from FreeBSD: head/tools/build/options/WITHOUT_KVM_SUPPORT 170644 2007-06-13 02:08:04Z sepotvin Set to build some programs without optional .Nm libkvm support. .It Va WITHOUT_LDNS -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_LDNS 255591 2013-09-15 13:11:13Z des +.\" from FreeBSD: head/tools/build/options/WITHOUT_LDNS 255591 2013-09-15 13:11:13Z des Setting this variable will prevent the LDNS library from being built. When set, it also enforces the following options: .Pp @@ -605,27 +609,27 @@ When set, it also enforces the following .Va WITHOUT_UNBOUND .El .It Va WITHOUT_LDNS_UTILS -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_LDNS_UTILS 255850 2013-09-24 14:33:31Z des +.\" from FreeBSD: head/tools/build/options/WITHOUT_LDNS_UTILS 255850 2013-09-24 14:33:31Z des Setting this variable will prevent building the LDNS utilities .Xr drill 1 and .Xr host 1 . .It Va WITHOUT_LEGACY_CONSOLE -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_LEGACY_CONSOLE 249966 2013-04-27 04:09:09Z eadler +.\" from FreeBSD: head/tools/build/options/WITHOUT_LEGACY_CONSOLE 249966 2013-04-27 04:09:09Z eadler Set to not build programs that support a legacy PC console; e.g., .Xr kbdcontrol 8 and .Xr vidcontrol 8 . .It Va WITHOUT_LIB32 -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_LIB32 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_LIB32 156932 2006-03-21 07:50:50Z ru On amd64, set to not build 32-bit library set and a .Nm ld-elf32.so.1 runtime linker. -.It Va WITH_LIBCPLUSPLUS -.\" from FreeBSD: stable/10/tools/build/options/WITH_LIBCPLUSPLUS 228082 2011-11-28 17:56:46Z dim -Set to build libcxxrt and libc++. +.It Va WITHOUT_LIBCPLUSPLUS +.\" from FreeBSD: head/tools/build/options/WITHOUT_LIBCPLUSPLUS 246262 2013-02-02 22:42:46Z dim +Set to avoid building libcxxrt and libc++. .It Va WITHOUT_LIBPTHREAD -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_LIBPTHREAD 188848 2009-02-20 11:09:55Z mtm +.\" from FreeBSD: head/tools/build/options/WITHOUT_LIBPTHREAD 188848 2009-02-20 11:09:55Z mtm Set to not build the .Nm libpthread providing library, @@ -637,35 +641,35 @@ When set, it also enforces the following .Va WITHOUT_LIBTHR .El .It Va WITHOUT_LIBTHR -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_LIBTHR 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_LIBTHR 156932 2006-03-21 07:50:50Z ru Set to not build the .Nm libthr (1:1 threading) library. .It Va WITH_LLDB -.\" from FreeBSD: stable/10/tools/build/options/WITH_LLDB 255722 2013-09-20 01:52:02Z emaste +.\" from FreeBSD: head/tools/build/options/WITH_LLDB 255722 2013-09-20 01:52:02Z emaste Set to build the LLDB debugger. .It Va WITHOUT_LOCALES -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_LOCALES 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_LOCALES 156932 2006-03-21 07:50:50Z ru Set to not build localization files; see .Xr locale 1 . .It Va WITHOUT_LOCATE -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_LOCATE 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: head/tools/build/options/WITHOUT_LOCATE 183242 2008-09-21 22:02:26Z sam Set to not build .Xr locate 1 and related programs. .It Va WITHOUT_LPR -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_LPR 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_LPR 156932 2006-03-21 07:50:50Z ru Set to not build .Xr lpr 1 and related programs. .It Va WITHOUT_LS_COLORS -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_LS_COLORS 235660 2012-05-19 20:05:27Z marcel +.\" from FreeBSD: head/tools/build/options/WITHOUT_LS_COLORS 235660 2012-05-19 20:05:27Z marcel Set to build .Xr ls 1 without support for colors to distinguish file types. .It Va WITHOUT_MAIL -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_MAIL 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: head/tools/build/options/WITHOUT_MAIL 183242 2008-09-21 22:02:26Z sam Set to not build any mail support (MUA or MTA). When set, it also enforces the following options: .Pp @@ -676,17 +680,17 @@ When set, it also enforces the following .Va WITHOUT_SENDMAIL .El .It Va WITHOUT_MAILWRAPPER -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_MAILWRAPPER 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_MAILWRAPPER 156932 2006-03-21 07:50:50Z ru Set to not build the .Xr mailwrapper 8 MTA selector. .It Va WITHOUT_MAKE -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_MAKE 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: head/tools/build/options/WITHOUT_MAKE 183242 2008-09-21 22:02:26Z sam Set to not install .Xr make 1 and related support files. .It Va WITHOUT_MAN -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_MAN 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_MAN 156932 2006-03-21 07:50:50Z ru Set to not build manual pages. When set, the following options are also in effect: .Pp @@ -697,7 +701,7 @@ When set, the following options are also is set explicitly) .El .It Va WITHOUT_MAN_UTILS -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_MAN_UTILS 208322 2010-05-20 00:07:21Z jkim +.\" from FreeBSD: head/tools/build/options/WITHOUT_MAN_UTILS 208322 2010-05-20 00:07:21Z jkim Set to not build utilities for manual pages, .Xr apropos 1 , .Xr catman 1 , @@ -707,19 +711,24 @@ Set to not build utilities for manual pa .Xr manctl 8 , and related support files. .It Va WITH_NAND -.\" from FreeBSD: stable/10/tools/build/options/WITH_NAND 235537 2012-05-17 10:11:18Z gber +.\" from FreeBSD: head/tools/build/options/WITH_NAND 235537 2012-05-17 10:11:18Z gber Set to build the NAND Flash components. +.It Va WITHOUT_NCURSESW +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_NCURSESW 262644 2014-03-01 03:11:26Z brooks +Set to not build or depend on the +.Nm libncursesw +library. .It Va WITHOUT_NDIS -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_NDIS 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: head/tools/build/options/WITHOUT_NDIS 183242 2008-09-21 22:02:26Z sam Set to not build programs and libraries related to NDIS emulation support. .It Va WITHOUT_NETCAT -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_NETCAT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_NETCAT 156932 2006-03-21 07:50:50Z ru Set to not build .Xr nc 1 utility. .It Va WITHOUT_NETGRAPH -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_NETGRAPH 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: head/tools/build/options/WITHOUT_NETGRAPH 183242 2008-09-21 22:02:26Z sam Set to not build applications to support .Xr netgraph 4 . When set, it also enforces the following options: @@ -733,10 +742,10 @@ When set, it also enforces the following .Va WITHOUT_NETGRAPH_SUPPORT .El .It Va WITHOUT_NETGRAPH_SUPPORT -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_NETGRAPH_SUPPORT 183305 2008-09-23 16:11:15Z sam +.\" from FreeBSD: head/tools/build/options/WITHOUT_NETGRAPH_SUPPORT 183305 2008-09-23 16:11:15Z sam Set to build libraries, programs, and kernel modules without netgraph support. .It Va WITHOUT_NIS -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_NIS 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_NIS 156932 2006-03-21 07:50:50Z ru Set to not build .Xr NIS 8 support and related programs. @@ -746,10 +755,10 @@ and remove .Sq nis entries. .It Va WITHOUT_NLS -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_NLS 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_NLS 156932 2006-03-21 07:50:50Z ru Set to not build NLS catalogs. .It Va WITHOUT_NLS_CATALOGS -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_NLS_CATALOGS 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_NLS_CATALOGS 156932 2006-03-21 07:50:50Z ru Set to not build NLS catalog support for .Xr csh 1 . .It Va WITHOUT_NMTREE @@ -763,7 +772,7 @@ By default is installed as .Xr mtree 8 . .It Va WITHOUT_NS_CACHING -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_NS_CACHING 172803 2007-10-19 14:01:25Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_NS_CACHING 172803 2007-10-19 14:01:25Z ru Set to disable name caching in the .Pa nsswitch subsystem. @@ -771,20 +780,20 @@ The generic caching daemon, .Xr nscd 8 , will not be built either if this option is set. .It Va WITHOUT_NTP -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_NTP 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: head/tools/build/options/WITHOUT_NTP 183242 2008-09-21 22:02:26Z sam Set to not build .Xr ntpd 8 and related programs. .It Va WITH_OFED -.\" from FreeBSD: stable/10/tools/build/options/WITH_OFED 228081 2011-11-28 17:54:34Z dim +.\" from FreeBSD: head/tools/build/options/WITH_OFED 228081 2011-11-28 17:54:34Z dim Set to build the .Dq "OpenFabrics Enterprise Distribution" Infiniband software stack. .It Va WITHOUT_OPENSSH -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_OPENSSH 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_OPENSSH 156932 2006-03-21 07:50:50Z ru Set to not build OpenSSH. .It Va WITH_OPENSSH_NONE_CIPHER -.\" from FreeBSD: stable/10/tools/build/options/WITH_OPENSSH_NONE_CIPHER 245527 2013-01-17 01:51:04Z bz +.\" from FreeBSD: head/tools/build/options/WITH_OPENSSH_NONE_CIPHER 245527 2013-01-17 01:51:04Z bz Set to include the "None" cipher support in OpenSSH and its libraries. Additional adjustments may need to be done to system configuration files, such as @@ -794,7 +803,7 @@ Please see .Pa /usr/src/crypto/openssh/README.hpn for full details. .It Va WITHOUT_OPENSSL -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_OPENSSL 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_OPENSSL 156932 2006-03-21 07:50:50Z ru Set to not build OpenSSL. When set, it also enforces the following options: .Pp @@ -816,7 +825,7 @@ When set, the following options are also is set explicitly) .El .It Va WITHOUT_PAM -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_PAM 174550 2007-12-12 16:43:17Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_PAM 174550 2007-12-12 16:43:17Z ru Set to not build PAM library and modules. .Bf -symbolic This option is deprecated and does nothing. @@ -828,18 +837,18 @@ When set, it also enforces the following .Va WITHOUT_PAM_SUPPORT .El .It Va WITHOUT_PAM_SUPPORT -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_PAM_SUPPORT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_PAM_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build some programs without PAM support, particularly .Xr ftpd 8 and .Xr ppp 8 . .It Va WITHOUT_PC_SYSINSTALL -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_PC_SYSINSTALL 245606 2013-01-18 15:57:09Z eadler +.\" from FreeBSD: head/tools/build/options/WITHOUT_PC_SYSINSTALL 245606 2013-01-18 15:57:09Z eadler Set to not build .Xr pc-sysinstall 8 and related programs. .It Va WITHOUT_PF -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_PF 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_PF 156932 2006-03-21 07:50:50Z ru Set to not build PF firewall package. When set, it also enforces the following options: .Pp @@ -853,35 +862,35 @@ Set to not build .Xr pkg 7 bootstrap tool. .It Va WITH_PKGTOOLS -.\" from FreeBSD: stable/10/tools/build/options/WITH_PKGTOOLS 253305 2013-07-12 23:11:17Z bapt +.\" from FreeBSD: head/tools/build/options/WITH_PKGTOOLS 253305 2013-07-12 23:11:17Z bapt Set to build .Xr pkg_add 8 and related programs. .It Va WITHOUT_PMC -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_PMC 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: head/tools/build/options/WITHOUT_PMC 183242 2008-09-21 22:02:26Z sam Set to not build .Xr pmccontrol 8 and related programs. .It Va WITHOUT_PORTSNAP -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_PORTSNAP 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: head/tools/build/options/WITHOUT_PORTSNAP 183242 2008-09-21 22:02:26Z sam Set to not build or install .Xr portsnap 8 and related files. .It Va WITHOUT_PPP -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_PPP 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: head/tools/build/options/WITHOUT_PPP 183242 2008-09-21 22:02:26Z sam Set to not build .Xr ppp 8 and related programs. .It Va WITHOUT_PROFILE -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_PROFILE 228196 2011-12-02 09:09:54Z fjoe +.\" from FreeBSD: head/tools/build/options/WITHOUT_PROFILE 228196 2011-12-02 09:09:54Z fjoe Set to avoid compiling profiled libraries. .It Va WITHOUT_QUOTAS -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_QUOTAS 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: head/tools/build/options/WITHOUT_QUOTAS 183242 2008-09-21 22:02:26Z sam Set to not build .Xr quota 8 and related programs. .It Va WITHOUT_RCMDS -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_RCMDS 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_RCMDS 156932 2006-03-21 07:50:50Z ru Disable building of the .Bx r-commands. @@ -890,43 +899,43 @@ This includes .Xr rsh 1 , etc. .It Va WITHOUT_RCS -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_RCS 256198 2013-10-09 17:07:20Z gjb +.\" from FreeBSD: head/tools/build/options/WITHOUT_RCS 256198 2013-10-09 17:07:20Z gjb Set to not build .Xr rcs 1 and related utilities. .It Va WITHOUT_RESCUE -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_RESCUE 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_RESCUE 156932 2006-03-21 07:50:50Z ru Set to not build .Xr rescue 8 . .It Va WITHOUT_ROUTED -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_ROUTED 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: head/tools/build/options/WITHOUT_ROUTED 183242 2008-09-21 22:02:26Z sam Set to not build .Xr routed 8 utility. .It Va WITHOUT_SENDMAIL -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_SENDMAIL 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_SENDMAIL 156932 2006-03-21 07:50:50Z ru Set to not build .Xr sendmail 8 and related programs. .It Va WITHOUT_SETUID_LOGIN -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_SETUID_LOGIN 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_SETUID_LOGIN 156932 2006-03-21 07:50:50Z ru Set this to disable the installation of .Xr login 1 as a set-user-ID root program. .It Va WITHOUT_SHAREDOCS -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_SHAREDOCS 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_SHAREDOCS 156932 2006-03-21 07:50:50Z ru Set to not build the .Bx 4.4 legacy docs. .It Va WITH_SHARED_TOOLCHAIN -.\" from FreeBSD: stable/10/tools/build/options/WITH_SHARED_TOOLCHAIN 235342 2012-05-12 16:12:36Z gjb +.\" from FreeBSD: head/tools/build/options/WITH_SHARED_TOOLCHAIN 235342 2012-05-12 16:12:36Z gjb Set to build the toolchain binaries shared. The set includes .Xr cc 1 , .Xr make 1 and necessary utilities like assembler, linker and library archive manager. .It Va WITHOUT_SOURCELESS -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_SOURCELESS 230972 2012-02-04 00:54:43Z rmh +.\" from FreeBSD: head/tools/build/options/WITHOUT_SOURCELESS 230972 2012-02-04 00:54:43Z rmh Set to not build kernel modules that include sourceless code (either microcode or native code for host CPU). When set, it also enforces the following options: .Pp @@ -937,51 +946,51 @@ When set, it also enforces the following .Va WITHOUT_SOURCELESS_UCODE .El .It Va WITHOUT_SOURCELESS_HOST -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_SOURCELESS_HOST 230972 2012-02-04 00:54:43Z rmh +.\" from FreeBSD: head/tools/build/options/WITHOUT_SOURCELESS_HOST 230972 2012-02-04 00:54:43Z rmh Set to not build kernel modules that include sourceless native code for host CPU. .It Va WITHOUT_SOURCELESS_UCODE -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_SOURCELESS_UCODE 230972 2012-02-04 00:54:43Z rmh +.\" from FreeBSD: head/tools/build/options/WITHOUT_SOURCELESS_UCODE 230972 2012-02-04 00:54:43Z rmh Set to not build kernel modules that include sourceless microcode. .It Va WITHOUT_SSP -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_SSP 180012 2008-06-25 21:33:28Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_SSP 180012 2008-06-25 21:33:28Z ru Set to not build world with propolice stack smashing protection. .It Va WITH_SVN -.\" from FreeBSD: stable/10/tools/build/options/WITH_SVN 252561 2013-07-03 12:36:47Z zeising +.\" from FreeBSD: head/tools/build/options/WITH_SVN 252561 2013-07-03 12:36:47Z zeising Set to install .Xr svnlite 1 as .Xr svn 1 . .It Va WITHOUT_SVNLITE -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_SVNLITE 252561 2013-07-03 12:36:47Z zeising +.\" from FreeBSD: head/tools/build/options/WITHOUT_SVNLITE 252561 2013-07-03 12:36:47Z zeising Set to not build .Xr svnlite 1 and related programs. .It Va WITHOUT_SYMVER -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_SYMVER 169649 2007-05-17 05:03:24Z deischen +.\" from FreeBSD: head/tools/build/options/WITHOUT_SYMVER 169649 2007-05-17 05:03:24Z deischen Set to disable symbol versioning when building shared libraries. .It Va WITHOUT_SYSCONS -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_SYSCONS 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_SYSCONS 156932 2006-03-21 07:50:50Z ru Set to not build .Xr syscons 4 support files such as keyboard maps, fonts, and screen output maps. .It Va WITHOUT_SYSINSTALL -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_SYSINSTALL 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: head/tools/build/options/WITHOUT_SYSINSTALL 183242 2008-09-21 22:02:26Z sam Set to not build .Xr sysinstall 8 and related programs. .It Va WITHOUT_TCSH -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_TCSH 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_TCSH 156932 2006-03-21 07:50:50Z ru Set to not build and install .Pa /bin/csh (which is .Xr tcsh 1 ) . .It Va WITHOUT_TELNET -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_TELNET 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: head/tools/build/options/WITHOUT_TELNET 183242 2008-09-21 22:02:26Z sam Set to not build .Xr telnet 8 and related programs. .It Va WITHOUT_TEXTPROC -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_TEXTPROC 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: head/tools/build/options/WITHOUT_TEXTPROC 183242 2008-09-21 22:02:26Z sam Set to not build programs used for text processing. When set, it also enforces the following options: @@ -991,7 +1000,7 @@ When set, it also enforces the following .Va WITHOUT_GROFF .El .It Va WITHOUT_TOOLCHAIN -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_TOOLCHAIN 174550 2007-12-12 16:43:17Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_TOOLCHAIN 174550 2007-12-12 16:43:17Z ru Set to not install programs used for program development, compilers, debuggers etc. @@ -1015,18 +1024,18 @@ When set, it also enforces the following .Va WITHOUT_GDB .El .It Va WITHOUT_UNBOUND -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_UNBOUND 255597 2013-09-15 14:51:23Z des +.\" from FreeBSD: head/tools/build/options/WITHOUT_UNBOUND 255597 2013-09-15 14:51:23Z des Set to not build .Xr unbound 8 and related programs. .It Va WITHOUT_USB -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_USB 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_USB 156932 2006-03-21 07:50:50Z ru Set to not build USB-related programs and libraries. .It Va WITH_USB_GADGET_EXAMPLES -.\" from FreeBSD: stable/10/tools/build/options/WITH_USB_GADGET_EXAMPLES 254919 2013-08-26 17:15:56Z antoine +.\" from FreeBSD: head/tools/build/options/WITH_USB_GADGET_EXAMPLES 254919 2013-08-26 17:15:56Z antoine Set to build USB gadget kernel modules. .It Va WITHOUT_UTMPX -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_UTMPX 231530 2012-02-11 20:28:42Z ed +.\" from FreeBSD: head/tools/build/options/WITHOUT_UTMPX 231530 2012-02-11 20:28:42Z ed Set to not build user accounting tools such as .Xr last 1 , .Xr users 1 , @@ -1036,7 +1045,7 @@ Set to not build user accounting tools s and .Xr utx 8 . .It Va WITHOUT_WIRELESS -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_WIRELESS 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: head/tools/build/options/WITHOUT_WIRELESS 183242 2008-09-21 22:02:26Z sam Set to not build programs used for 802.11 wireless networks; especially .Xr wpa_supplicant 8 and @@ -1048,21 +1057,21 @@ When set, it also enforces the following .Va WITHOUT_WIRELESS_SUPPORT .El .It Va WITHOUT_WIRELESS_SUPPORT -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_WIRELESS_SUPPORT 183305 2008-09-23 16:11:15Z sam +.\" from FreeBSD: head/tools/build/options/WITHOUT_WIRELESS_SUPPORT 183305 2008-09-23 16:11:15Z sam Set to build libraries, programs, and kernel modules without 802.11 wireless support. .It Va WITHOUT_WPA_SUPPLICANT_EAPOL -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_WPA_SUPPLICANT_EAPOL 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_WPA_SUPPLICANT_EAPOL 156932 2006-03-21 07:50:50Z ru Build .Xr wpa_supplicant 8 without support for the IEEE 802.1X protocol and without support for EAP-PEAP, EAP-TLS, EAP-LEAP, and EAP-TTLS protocols (usable only via 802.1X). .It Va WITHOUT_ZFS -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_ZFS 168409 2007-04-06 02:13:30Z pjd +.\" from FreeBSD: head/tools/build/options/WITHOUT_ZFS 168409 2007-04-06 02:13:30Z pjd Set to not build ZFS file system. .It Va WITHOUT_ZONEINFO -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_ZONEINFO 235342 2012-05-12 16:12:36Z gjb *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat Mar 1 04:49:55 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EDDF244E; Sat, 1 Mar 2014 04:49:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D925614A7; Sat, 1 Mar 2014 04:49:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s214ntuM070940; Sat, 1 Mar 2014 04:49:55 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s214ntOC070939; Sat, 1 Mar 2014 04:49:55 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201403010449.s214ntOC070939@svn.freebsd.org> From: Brooks Davis Date: Sat, 1 Mar 2014 04:49:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262652 - stable/10/tools/tools/makeroot X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Mar 2014 04:49:56 -0000 Author: brooks Date: Sat Mar 1 04:49:55 2014 New Revision: 262652 URL: http://svnweb.freebsd.org/changeset/base/262652 Log: MFC r261302: The -B flag is intended to take an argument. Fix a couple typos in comments. Sponsored by: DARPA, AFRL Modified: stable/10/tools/tools/makeroot/makeroot.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/tools/makeroot/makeroot.sh ============================================================================== --- stable/10/tools/tools/makeroot/makeroot.sh Sat Mar 1 04:44:33 2014 (r262651) +++ stable/10/tools/tools/makeroot/makeroot.sh Sat Mar 1 04:49:55 2014 (r262652) @@ -65,7 +65,7 @@ atexit() } DEBUG= -# Allow duplice manifest entries when not file list is given because the +# Allow duplicate manifest entries when not file list is given because the # FreeBSD METALOG still includes it. DUPFLAG=-D EXTRAS= @@ -75,7 +75,7 @@ KEYDIR= KEYUSERS= PASSWD= -while getopts "Bde:f:g:K:k:p:s:" opt; do +while getopts "B:de:f:g:K:k:p:s:" opt; do case "$opt" in B) BFLAG="-B ${OPTARG}" ;; d) DEBUG=1 ;; @@ -174,7 +174,7 @@ else / type=/ { if ($1 != file) {print} }' >> ${manifest} fi -# For each extras file, add contents kyes relative to the directory the +# For each extras file, add contents keys relative to the directory the # manifest lives in for each file line that does not have one. Adjust # contents keys relative to ./ to be relative to the same directory. for eman in ${EXTRAS}; do From owner-svn-src-stable@FreeBSD.ORG Sat Mar 1 13:00:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2BBF7D08; Sat, 1 Mar 2014 13:00:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 160AA12D1; Sat, 1 Mar 2014 13:00:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s21D0eK4068261; Sat, 1 Mar 2014 13:00:40 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s21D0eO7068258; Sat, 1 Mar 2014 13:00:40 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201403011300.s21D0eO7068258@svn.freebsd.org> From: Tijl Coosemans Date: Sat, 1 Mar 2014 13:00:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262654 - in stable/10/usr.sbin: mtree nmtree X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Mar 2014 13:00:41 -0000 Author: tijl Date: Sat Mar 1 13:00:40 2014 New Revision: 262654 URL: http://svnweb.freebsd.org/changeset/base/262654 Log: Revert r262648 to stop severe tinderbox spamming on stable@. Added: stable/10/usr.sbin/mtree/mtree.5 - copied unchanged from r262647, stable/10/usr.sbin/mtree/mtree.5 Deleted: stable/10/usr.sbin/nmtree/mtree.5 Modified: stable/10/usr.sbin/mtree/Makefile stable/10/usr.sbin/nmtree/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/mtree/Makefile ============================================================================== --- stable/10/usr.sbin/mtree/Makefile Sat Mar 1 10:04:31 2014 (r262653) +++ stable/10/usr.sbin/mtree/Makefile Sat Mar 1 13:00:40 2014 (r262654) @@ -6,7 +6,7 @@ .PATH: ${.CURDIR}/../../usr.bin/cksum PROG= fmtree -MAN= fmtree.8 +MAN= fmtree.8 mtree.5 SRCS= compare.c crc.c create.c excludes.c misc.c mtree.c spec.c verify.c SRCS+= specspec.c Copied: stable/10/usr.sbin/mtree/mtree.5 (from r262647, stable/10/usr.sbin/mtree/mtree.5) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.sbin/mtree/mtree.5 Sat Mar 1 13:00:40 2014 (r262654, copy of r262647, stable/10/usr.sbin/mtree/mtree.5) @@ -0,0 +1,271 @@ +.\" Copyright (c) 1989, 1990, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" 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. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. +.\" +.\" From: @(#)mtree.8 8.2 (Berkeley) 12/11/93 +.\" $FreeBSD$ +.\" +.Dd December 31, 2007 +.Dt MTREE 5 +.Os +.Sh NAME +.Nm mtree +.Nd format of mtree dir hierarchy files +.Sh DESCRIPTION +The +.Nm +format is a textual format that describes a collection of filesystem objects. +Such files are typically used to create or verify directory hierarchies. +.Ss General Format +An +.Nm +file consists of a series of lines, each providing information +about a single filesystem object. +Leading whitespace is always ignored. +.Pp +When encoding file or pathnames, any backslash character or +character outside of the 95 printable ASCII characters must be +encoded as a backslash followed by three +octal digits. +When reading mtree files, any appearance of a backslash +followed by three octal digits should be converted into the +corresponding character. +.Pp +Each line is interpreted independently as one of the following types: +.Bl -tag -width Cm +.It Signature +The first line of any mtree file must begin with +.Dq #mtree . +If a file contains any full path entries, the first line should +begin with +.Dq #mtree v2.0 , +otherwise, the first line should begin with +.Dq #mtree v1.0 . +.It Blank +Blank lines are ignored. +.It Comment +Lines beginning with +.Cm # +are ignored. +.It Special +Lines beginning with +.Cm / +are special commands that influence +the interpretation of later lines. +.It Relative +If the first whitespace-delimited word has no +.Cm / +characters, +it is the name of a file in the current directory. +Any relative entry that describes a directory changes the +current directory. +.It dot-dot +As a special case, a relative entry with the filename +.Pa .. +changes the current directory to the parent directory. +Options on dot-dot entries are always ignored. +.It Full +If the first whitespace-delimited word has a +.Cm / +character after +the first character, it is the pathname of a file relative to the +starting directory. +There can be multiple full entries describing the same file. +.El +.Pp +Some tools that process +.Nm +files may require that multiple lines describing the same file +occur consecutively. +It is not permitted for the same file to be mentioned using +both a relative and a full file specification. +.Ss Special commands +Two special commands are currently defined: +.Bl -tag -width Cm +.It Cm /set +This command defines default values for one or more keywords. +It is followed on the same line by one or more whitespace-separated +keyword definitions. +These definitions apply to all following files that do not specify +a value for that keyword. +.It Cm /unset +This command removes any default value set by a previous +.Cm /set +command. +It is followed on the same line by one or more keywords +separated by whitespace. +.El +.Ss Keywords +After the filename, a full or relative entry consists of zero +or more whitespace-separated keyword definitions. +Each such definitions consists of a key from the following +list immediately followed by an '=' sign +and a value. +Software programs reading mtree files should warn about +unrecognized keywords. +.Pp +Currently supported keywords are as follows: +.Bl -tag -width Cm +.It Cm cksum +The checksum of the file using the default algorithm specified by +the +.Xr cksum 1 +utility. +.It Cm contents +The full pathname of a file whose contents should be +compared to the contents of this file. +.It Cm flags +The file flags as a symbolic name. +See +.Xr chflags 1 +for information on these names. +If no flags are to be set the string +.Dq none +may be used to override the current default. +.It Cm ignore +Ignore any file hierarchy below this file. +.It Cm gid +The file group as a numeric value. +.It Cm gname +The file group as a symbolic name. +.It Cm md5 +The MD5 message digest of the file. +.It Cm md5digest +A synonym for +.Cm md5 . +.It Cm sha1 +The +.Tn FIPS +160-1 +.Pq Dq Tn SHA-1 +message digest of the file. +.It Cm sha1digest +A synonym for +.Cm sha1 . +.It Cm sha256 +The +.Tn FIPS +180-2 +.Pq Dq Tn SHA-256 +message digest of the file. +.It Cm sha256digest +A synonym for +.Cm sha256 . +.It Cm ripemd160digest +The +.Tn RIPEMD160 +message digest of the file. +.It Cm rmd160 +A synonym for +.Cm ripemd160digest . +.It Cm rmd160digest +A synonym for +.Cm ripemd160digest . +.It Cm mode +The current file's permissions as a numeric (octal) or symbolic +value. +.It Cm nlink +The number of hard links the file is expected to have. +.It Cm nochange +Make sure this file or directory exists but otherwise ignore all attributes. +.It Cm uid +The file owner as a numeric value. +.It Cm uname +The file owner as a symbolic name. +.It Cm size +The size, in bytes, of the file. +.It Cm link +The file the symbolic link is expected to reference. +.It Cm time +The last modification time of the file, in seconds and nanoseconds. +The value should include a period character and exactly nine digits +after the period. +.It Cm type +The type of the file; may be set to any one of the following: +.Pp +.Bl -tag -width Cm -compact +.It Cm block +block special device +.It Cm char +character special device +.It Cm dir +directory +.It Cm fifo +fifo +.It Cm file +regular file +.It Cm link +symbolic link +.It Cm socket +socket +.El +.El +.Sh SEE ALSO +.Xr cksum 1 , +.Xr find 1 , +.Xr mtree 8 +.Sh HISTORY +The +.Nm +utility appeared in +.Bx 4.3 Reno . +The +.Tn MD5 +digest capability was added in +.Fx 2.1 , +in response to the widespread use of programs which can spoof +.Xr cksum 1 . +The +.Tn SHA-1 +and +.Tn RIPEMD160 +digests were added in +.Fx 4.0 , +as new attacks have demonstrated weaknesses in +.Tn MD5 . +The +.Tn SHA-256 +digest was added in +.Fx 6.0 . +Support for file flags was added in +.Fx 4.0 , +and mostly comes from +.Nx . +The +.Dq full +entry format was added by +.Nx . +.Sh BUGS +The +.Fx +implementation of mtree does not currently support +the +.Nm +2.0 +format. +The requirement for a +.Dq #mtree +signature line is new and not yet widely implemented. Modified: stable/10/usr.sbin/nmtree/Makefile ============================================================================== --- stable/10/usr.sbin/nmtree/Makefile Sat Mar 1 10:04:31 2014 (r262653) +++ stable/10/usr.sbin/nmtree/Makefile Sat Mar 1 13:00:40 2014 (r262654) @@ -4,8 +4,8 @@ .PATH: ${.CURDIR}/../../contrib/mtree -PROG= mtree -MAN= mtree.5 mtree.8 +PROG= nmtree +MAN= nmtree.8 SRCS= compare.c crc.c create.c excludes.c getid.c misc.c mtree.c \ only.c spec.c specspec.c verify.c LDADD+= -lmd -lutil From owner-svn-src-stable@FreeBSD.ORG Sat Mar 1 13:02:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7FED7E5A; Sat, 1 Mar 2014 13:02:42 +0000 (UTC) Received: from mailrelay008.isp.belgacom.be (mailrelay008.isp.belgacom.be [195.238.6.174]) by mx1.freebsd.org (Postfix) with ESMTP id 6953712EA; Sat, 1 Mar 2014 13:02:41 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmQGAAvaEVNR8Zjl/2dsb2JhbABYgwY7S8EpgRIXdIIlAQEFOhwjEAsUBAklDyoeBhOHfQEIy1kXjlUHhDgBA5g7gTOQeYMuOw Received: from 229.152-241-81.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([81.241.152.229]) by relay.skynet.be with ESMTP; 01 Mar 2014 14:02:34 +0100 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.8/8.14.8) with ESMTP id s21D2Wir003790; Sat, 1 Mar 2014 14:02:32 +0100 (CET) (envelope-from tijl@FreeBSD.org) Date: Sat, 1 Mar 2014 14:02:32 +0100 From: Tijl Coosemans To: Brooks Davis Subject: Re: svn commit: r262648 - in stable/10/usr.sbin: mtree nmtree Message-ID: <20140301140232.0c60d827@kalimero.tijl.coosemans.org> In-Reply-To: <201403010339.s213dum7042965@svn.freebsd.org> References: <201403010339.s213dum7042965@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Mar 2014 13:02:42 -0000 On Sat, 1 Mar 2014 03:39:56 +0000 (UTC) Brooks Davis wrote: > Author: brooks > Date: Sat Mar 1 03:39:56 2014 > New Revision: 262648 > URL: http://svnweb.freebsd.org/changeset/base/262648 > > Log: > MFC: 261298 > Merge from CheriBSD: > commit 70b8f0c127db6b80411789d237b403cc64a93573 > Author: Brooks Davis > Date: Mon Jan 27 22:53:57 2014 +0000 > > Move mtree.5 to usr.sbin/nmtree. > Remove note that mtree 2.0 format files aren't supported. > > Sponsored by: DARPA, AFRL This broke stable and caused a flood of tinderbox emails on stable@ so I've reverted this for now. From owner-svn-src-stable@FreeBSD.ORG Sat Mar 1 14:44:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6FE3785A; Sat, 1 Mar 2014 14:44:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 58EC41DA0; Sat, 1 Mar 2014 14:44:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s21EiuHF009947; Sat, 1 Mar 2014 14:44:56 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s21Eit6U009941; Sat, 1 Mar 2014 14:44:55 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201403011444.s21Eit6U009941@svn.freebsd.org> From: Ulrich Spoerlein Date: Sat, 1 Mar 2014 14:44:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262656 - in stable/10: contrib/groff/tmac gnu/usr.bin/groff/tmac X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Mar 2014 14:44:56 -0000 Author: uqs Date: Sat Mar 1 14:44:55 2014 New Revision: 262656 URL: http://svnweb.freebsd.org/changeset/base/262656 Log: MFH r261319,261345,261742 mdoc changes to stable/10 Modified: stable/10/contrib/groff/tmac/doc-common stable/10/contrib/groff/tmac/doc-syms stable/10/contrib/groff/tmac/doc.tmac stable/10/contrib/groff/tmac/groff_mdoc.man stable/10/gnu/usr.bin/groff/tmac/mdoc.local Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/groff/tmac/doc-common ============================================================================== --- stable/10/contrib/groff/tmac/doc-common Sat Mar 1 13:23:52 2014 (r262655) +++ stable/10/contrib/groff/tmac/doc-common Sat Mar 1 14:44:55 2014 (r262656) @@ -37,6 +37,7 @@ . .nr %A 1 .nr %B 1 +.nr %C 1 .nr %D 1 .nr %I 1 .nr %J 1 @@ -484,7 +485,15 @@ .ds doc-operating-system-NetBSD-5.0.1 5.0.1 .ds doc-operating-system-NetBSD-5.0.2 5.0.2 .ds doc-operating-system-NetBSD-5.1 5.1 +.ds doc-operating-system-NetBSD-5.1.2 5.1.2 +.ds doc-operating-system-NetBSD-5.1.3 5.1.3 +.ds doc-operating-system-NetBSD-5.2 5.2 +.ds doc-operating-system-NetBSD-5.2.1 5.2.1 .ds doc-operating-system-NetBSD-6.0 6.0 +.ds doc-operating-system-NetBSD-6.0.1 6.0.1 +.ds doc-operating-system-NetBSD-6.0.2 6.0.2 +.ds doc-operating-system-NetBSD-6.0.3 6.0.3 +.ds doc-operating-system-NetBSD-6.1 6.1 . .ds doc-operating-system-OpenBSD-2.0 2.0 .ds doc-operating-system-OpenBSD-2.1 2.1 @@ -517,6 +526,10 @@ .ds doc-operating-system-OpenBSD-4.8 4.8 .ds doc-operating-system-OpenBSD-4.9 4.9 .ds doc-operating-system-OpenBSD-5.0 5.0 +.ds doc-operating-system-OpenBSD-5.1 5.1 +.ds doc-operating-system-OpenBSD-5.2 5.2 +.ds doc-operating-system-OpenBSD-5.3 5.3 +.ds doc-operating-system-OpenBSD-5.4 5.4 . .ds doc-operating-system-FreeBSD-1.0 1.0 .ds doc-operating-system-FreeBSD-1.1 1.1 @@ -535,6 +548,7 @@ .ds doc-operating-system-FreeBSD-2.2.6 2.2.6 .ds doc-operating-system-FreeBSD-2.2.7 2.2.7 .ds doc-operating-system-FreeBSD-2.2.8 2.2.8 +.ds doc-operating-system-FreeBSD-2.2.9 2.2.9 .ds doc-operating-system-FreeBSD-3.0 3.0 .ds doc-operating-system-FreeBSD-3.1 3.1 .ds doc-operating-system-FreeBSD-3.2 3.2 @@ -575,6 +589,7 @@ .ds doc-operating-system-FreeBSD-8.1 8.1 .ds doc-operating-system-FreeBSD-8.2 8.2 .ds doc-operating-system-FreeBSD-9.0 9.0 +.ds doc-operating-system-FreeBSD-10.0 10.0 . .ds doc-operating-system-Darwin-8.0.0 8.0.0 .ds doc-operating-system-Darwin-8.1.0 8.1.0 @@ -613,21 +628,37 @@ .ds doc-operating-system-DragonFly-1.4 1.4 .ds doc-operating-system-DragonFly-1.5 1.5 .ds doc-operating-system-DragonFly-1.6 1.6 +.ds doc-operating-system-DragonFly-1.7 1.7 .ds doc-operating-system-DragonFly-1.8 1.8 .ds doc-operating-system-DragonFly-1.8.1 1.8.1 +.ds doc-operating-system-DragonFly-1.9 1.9 .ds doc-operating-system-DragonFly-1.10 1.10 +.ds doc-operating-system-DragonFly-1.11 1.11 .ds doc-operating-system-DragonFly-1.12 1.12 .ds doc-operating-system-DragonFly-1.12.2 1.12.2 +.ds doc-operating-system-DragonFly-1.13 1.13 .ds doc-operating-system-DragonFly-2.0 2.0 +.ds doc-operating-system-DragonFly-2.1 2.1 .ds doc-operating-system-DragonFly-2.2 2.2 +.ds doc-operating-system-DragonFly-2.3 2.3 .ds doc-operating-system-DragonFly-2.4 2.4 +.ds doc-operating-system-DragonFly-2.5 2.5 .ds doc-operating-system-DragonFly-2.6 2.6 +.ds doc-operating-system-DragonFly-2.7 2.7 .ds doc-operating-system-DragonFly-2.8 2.8 .ds doc-operating-system-DragonFly-2.9 2.9 .ds doc-operating-system-DragonFly-2.9.1 2.9.1 .ds doc-operating-system-DragonFly-2.10 2.10 .ds doc-operating-system-DragonFly-2.10.1 2.10.1 .ds doc-operating-system-DragonFly-2.11 2.11 +.ds doc-operating-system-DragonFly-3.0 3.0 +.ds doc-operating-system-DragonFly-3.1 3.1 +.ds doc-operating-system-DragonFly-3.2 3.2 +.ds doc-operating-system-DragonFly-3.3 3.3 +.ds doc-operating-system-DragonFly-3.4 3.4 +.ds doc-operating-system-DragonFly-3.5 3.5 +.ds doc-operating-system-DragonFly-3.6 3.6 +.ds doc-operating-system-DragonFly-3.7 3.7 . .de Os . ds doc-command-name Modified: stable/10/contrib/groff/tmac/doc-syms ============================================================================== --- stable/10/contrib/groff/tmac/doc-syms Sat Mar 1 13:23:52 2014 (r262655) +++ stable/10/contrib/groff/tmac/doc-syms Sat Mar 1 14:44:55 2014 (r262656) @@ -812,7 +812,6 @@ .ds doc-str-Lb-librpcsec_gss RPC GSS-API Authentication Library (librpcsec_gss, \-lrpcsec_gss) .ds doc-str-Lb-librpcsvc RPC Service Library (librpcsvc, \-lrpcsvc) .ds doc-str-Lb-librt \*[Px] \*[doc-str-Lb]Real-time Library (librt, \-lrt) -.ds doc-str-Lb-libsbuf Safe String Composition Library (libsbuf, \-lsbuf) .ds doc-str-Lb-libsdp Bluetooth Service Discovery Protocol User Library (libsdp, \-lsdp) .ds doc-str-Lb-libssp Buffer Overflow Protection Library (libssp, \-lssp) .ds doc-str-Lb-libSystem System Library (libSystem, \-lSystem) Modified: stable/10/contrib/groff/tmac/doc.tmac ============================================================================== --- stable/10/contrib/groff/tmac/doc.tmac Sat Mar 1 13:23:52 2014 (r262655) +++ stable/10/contrib/groff/tmac/doc.tmac Sat Mar 1 14:44:55 2014 (r262656) @@ -3423,6 +3423,8 @@ . . nr doc-book-count-saved \n[doc-book-count] . ds doc-book-name-saved "\*[doc-book-name] +. nr doc-city-count-saved \n[doc-city-count] +. ds doc-city-name-saved "\*[doc-city-name] . nr doc-date-count-saved \n[doc-date-count] . ds doc-date-saved "\*[doc-date] . nr doc-publisher-count-saved \n[doc-publisher-count] @@ -3565,6 +3567,8 @@ . . nr doc-book-count \n[doc-book-count-saved] . ds doc-book-name "\*[doc-book-name-saved] +. nr doc-city-count \n[doc-city-count-saved] +. ds doc-city-name "\*[doc-city-name-saved] . nr doc-date-count \n[doc-date-count-saved] . ds doc-date "\*[doc-date-saved] . nr doc-publisher-count \n[doc-publisher-count-saved] @@ -5190,6 +5194,8 @@ .\" NS doc-author-nameXXX .\" NS doc-book-count .\" NS doc-book-name +.\" NS doc-city-count +.\" NS doc-city-name .\" NS doc-corporate-count .\" NS doc-corporate-name .\" NS doc-date @@ -5228,6 +5234,7 @@ . nr doc-reference-title-count 0 . nr doc-url-count 0 . nr doc-volume-count 0 +. nr doc-city-count 0 . nr doc-date-count 0 . nr doc-page-number-count 0 . nr doc-book-count 0 @@ -5243,6 +5250,7 @@ . ds doc-reference-title-name-for-book . ds doc-url-name . ds doc-volume-name +. ds doc-city-name . ds doc-date . ds doc-page-number-string . ds doc-book-name @@ -5357,6 +5365,13 @@ . doc-finish-reference \n[doc-corporate-count] . \} . +. if \n[doc-city-count] \{\ +. unformat doc-city-name +. chop doc-city-name +. nop \*[doc-city-name]\c +. doc-finish-reference \n[doc-city-count] +. \} +. . if \n[doc-date-count] \{\ . unformat doc-date . chop doc-date @@ -5528,6 +5543,60 @@ .. . . +.\" NS doc-city-count global register +.\" NS counter of city references +. +.nr doc-city-count 0 +. +. +.\" NS doc-city-name global box +.\" NS string of collected city references +. +.ds doc-city-name +. +. +.\" NS %C user macro +.\" NS [reference] city +.\" NS +.\" NS modifies: +.\" NS doc-arg-ptr +.\" NS doc-curr-font +.\" NS doc-curr-size +.\" NS doc-city-count +.\" NS doc-macro-name +.\" NS doc-reference-count +.\" NS +.\" NS local variables: +.\" NS doc-env-%C +.\" NS +.\" NS width register `%C' set in doc-common +. +.de %C +. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\ +. tm Usage: .%C city_name ... (#\n[.c]) +. return +. \} +. +. nr doc-city-count +1 +. nr doc-reference-count +1 +. +. ds doc-macro-name %C +. doc-parse-args \$@ +. +. nr doc-arg-ptr +1 +. nr doc-curr-font \n[.f] +. nr doc-curr-size \n[.ps] +. +. \" append to reference box +. boxa doc-city-name +. ev doc-env-%C +. evc 0 +. in 0 +. nf +. doc-do-references +.. +. +. .\" NS doc-date-count global register .\" NS counter of date references . Modified: stable/10/contrib/groff/tmac/groff_mdoc.man ============================================================================== --- stable/10/contrib/groff/tmac/groff_mdoc.man Sat Mar 1 13:23:52 2014 (r262655) +++ stable/10/contrib/groff/tmac/groff_mdoc.man Sat Mar 1 14:44:55 2014 (r262656) @@ -1,3 +1,4 @@ +.\" t .\" groff_mdoc.man .\" .\" A complete reference of the mdoc macro package for GNU troff. @@ -613,10 +614,10 @@ These commands identify the page and are The remaining items in the template are section headers .Pf ( Li .Sh ) ; of which -.Sx NAME , -.Sx SYNOPSIS , +.Em NAME , +.Em SYNOPSIS , and -.Sx DESCRIPTION +.Em DESCRIPTION are mandatory. The headers are discussed in .Sx "PAGE STRUCTURE DOMAIN" , @@ -723,34 +724,36 @@ Under .Tn \*[operating-system] , the following sections are defined: .Pp -.Bl -column LOCAL -offset indent -compact -.It Li 1 Ta "\*[volume-operating-system] \*[volume-ds-1]" -.It Li 2 Ta "\*[volume-operating-system] \*[volume-ds-2]" -.It Li 3 Ta "\*[volume-operating-system] \*[volume-ds-3]" -.It Li 4 Ta "\*[volume-operating-system] \*[volume-ds-4]" -.It Li 5 Ta "\*[volume-operating-system] \*[volume-ds-5]" -.It Li 6 Ta "\*[volume-operating-system] \*[volume-ds-6]" -.It Li 7 Ta "\*[volume-operating-system] \*[volume-ds-7]" -.It Li 8 Ta "\*[volume-operating-system] \*[volume-ds-8]" -.It Li 9 Ta "\*[volume-operating-system] \*[volume-ds-9]" -.El +.TS +l l l. +1 \*[volume-operating-system] \*[volume-ds-1] +2 \*[volume-operating-system] \*[volume-ds-2] +3 \*[volume-operating-system] \*[volume-ds-3] +4 \*[volume-operating-system] \*[volume-ds-4] +5 \*[volume-operating-system] \*[volume-ds-5] +6 \*[volume-operating-system] \*[volume-ds-6] +7 \*[volume-operating-system] \*[volume-ds-7] +8 \*[volume-operating-system] \*[volume-ds-8] +9 \*[volume-operating-system] \*[volume-ds-9] +.TE .Pp . A volume name may be arbitrary or one of the following: . .Pp -.Bl -column LOCAL -offset indent -compact -.It Li USD Ta "\*[volume-ds-USD]" -.It Li PS1 Ta "\*[volume-ds-PS1]" -.It Li AMD Ta "\*[volume-ds-AMD]" -.It Li SMM Ta "\*[volume-ds-SMM]" -.It Li URM Ta "\*[volume-ds-URM]" -.It Li PRM Ta "\*[volume-ds-PRM]" -.It Li KM Ta "\*[volume-ds-KM]" -.It Li IND Ta "\*[volume-ds-IND]" -.It Li LOCAL Ta "\*[volume-ds-LOCAL]" -.It Li CON Ta "\*[volume-ds-CON]" -.El +.TS +l l. +USD \*[volume-ds-USD] +PS1 \*[volume-ds-PS1] +AMD \*[volume-ds-AMD] +SMM \*[volume-ds-SMM] +URM \*[volume-ds-URM] +PRM \*[volume-ds-PRM] +KM \*[volume-ds-KM] +IND \*[volume-ds-IND] +LOCAL \*[volume-ds-LOCAL] +CON \*[volume-ds-CON] +.TE .Pp . For compatibility, @@ -1208,7 +1211,7 @@ documented, or the name of the author of The default width is 12n. .Pp In the -.Sx AUTHORS +.Em AUTHORS section, the .Ql .An command causes a line break allowing each new name to appear on its own @@ -1834,7 +1837,7 @@ then denotes the keyword to be used with macro. .Pp In the -.Sx LIBRARY +.Em LIBRARY section an .Ql .Lb command causes a line break before and after its arguments are printed. @@ -1882,7 +1885,7 @@ section. Note: A section two or three document function name is addressed with the .Ql .Nm in the -.Sx NAME +.Em NAME section, and with .Ql .Fn in the @@ -2398,20 +2401,20 @@ respectively. .if t \ . ne 10 . -.Bd -filled -offset 4n -.Bl -column "quote" "close" "open" "Angle Bracket Enclosure" "`string' or string" -.Em Quote Ta Em Open Ta Em Close Ta Em Function Ta Em Result -.No .Aq Ta .Ao Ta .Ac Ta "Angle Bracket Enclosure" Ta Ao string Ac -.No .Bq Ta .Bo Ta .Bc Ta "Bracket Enclosure" Ta Bo string Bc -.No .Brq Ta .Bro Ta .Brc Ta "Brace Enclosure" Ta Bro string Brc -.No .Dq Ta .Do Ta .Dc Ta "Double Quote" Ta Do string Dc -.No .Eq Ta .Eo Ta .Ec Ta "Enclose String (in XX)" Ta XXstringXX -.No .Pq Ta .Po Ta .Pc Ta "Parenthesis Enclosure" Ta Po string Pc -.No .Ql Ta Ta Ta "Quoted Literal" Ta So string Sc or Li string -.No .Qq Ta .Qo Ta .Qc Ta "Straight Double Quote" Ta Qo string Qc -.No .Sq Ta .So Ta .Sc Ta "Single Quote" Ta So string Sc -.El -.Ed +.TS +lb lb lb lb lb +l l l l l. +Quote Open Close Function Result +\&.Aq .Ao .Ac Angle Bracket Enclosure +\&.Bq .Bo .Bc Bracket Enclosure [string] +\&.Brq .Bro .Brc Brace Enclosure {string} +\&.Dq .Do .Dc Double Quote "string" +\&.Eq .Eo .Ec Enclose String (in XX) XXstring +\&.Pq .Po .Pc Parenthesis Enclosure (string) +\&.Ql Quoted Literal \*[Lq]string\*[Rq] or string +\&.Qq .Qo .Qc Straight Double Quote "string" +\&.Sq .So .Sc Single Quote 'string' +.TE .Pp All macros ending with .Sq q @@ -2634,7 +2637,7 @@ Reference author name; one name per invo .It Li .%B Book title. .It Li .%C -City/place (not implemented yet). +City/place. .It Li .%D Date. .It Li .%I @@ -2681,7 +2684,8 @@ Example: \&.%A "John Foo" \&.%T "Implementation Notes on foobar(1)" \&.%R "Technical Report ABC\-DE\-12\-345" -\&.%Q "Drofnats College, Nowhere" +\&.%Q "Drofnats College" +\&.%C "Nowhere" \&.%D "April 1991" \&.Re .Ed @@ -2694,7 +2698,8 @@ produces .%A "John Foo" .%T "Implementation Notes on foobar(1)" .%R "Technical Report ABC-DE-12-345" -.%Q "Drofnats College, Nowhere" +.%Q "Drofnats College" +.%C "Nowhere" .%D "April 1991" .Re .Ed @@ -2839,7 +2844,7 @@ macro is mandatory. If not specified, headers, footers and page layout defaults will not be set and things will be rather unpleasant. The -.Sx NAME +.Em NAME section consists of at least three items. The first is the .Ql .Nm @@ -2949,7 +2954,7 @@ They are listed in the order in which th .Bl -tag -width ".Li .Sh\ COMPATIBILITY" .It Li ".Sh ENVIRONMENT" The -.Sx ENVIRONMENT +.Em ENVIRONMENT section should reveal any related environment variables and clues to their behavior and/or usage. . @@ -2964,7 +2969,7 @@ section. .It Li ".Sh EXAMPLES" There are several ways to create examples. See the -.Sx EXAMPLES +.Em EXAMPLES section below for details. . .It Li ".Sh DIAGNOSTICS" @@ -3019,7 +3024,7 @@ or this should be noted here. If the command does not adhere to any standard, its history should be noted in the -.Sx HISTORY +.Em HISTORY section. . .It Li ".Sh HISTORY" @@ -4045,28 +4050,30 @@ It is neither callable nor parsed and ta . The following strings are predefined: .Pp -.Bl -column String infinity "Troff " "straight double quote" -offset indent -.It Sy String Ta Sy Nroff Ta Sy Troff Ta Sy Meaning -.It Li <= Ta <= Ta \*[<=] Ta "less equal" -.It Li >= Ta >= Ta \*[>=] Ta "greater equal" -.It Li Rq Ta '' Ta \*[Rq] Ta "right double quote" -.It Li Lq Ta `` Ta \*[Lq] Ta "left double quote" -.It Li ua Ta ^ Ta \*[ua] Ta "upwards arrow" -.It Li aa Ta \' Ta \*[aa] Ta "acute accent" -.It Li ga Ta \` Ta \*[ga] Ta "grave accent" -.It Li q Ta \&" Ta \*[q] Ta "straight double quote" -.It Li Pi Ta pi Ta \*[Pi] Ta "greek pi" -.It Li Ne Ta != Ta \*[Ne] Ta "not equal" -.It Li Le Ta <= Ta \*[Le] Ta "less equal" -.It Li Ge Ta >= Ta \*[Ge] Ta "greater equal" -.It Li Lt Ta < Ta \*[Lt] Ta "less than" -.It Li Gt Ta > Ta \*[Gt] Ta "greater than" -.It Li Pm Ta +\- Ta \*[Pm] Ta "plus minus" -.It Li If Ta infinity Ta \*[If] Ta "infinity" -.It Li Am Ta \*[Am] Ta \*[Am] Ta "ampersand" -.It Li Na Ta \*[Na] Ta \*[Na] Ta "not a number" -.It Li Ba Ta \*[Ba] Ta \*[Ba] Ta "vertical bar" -.El +.TS +lb lb lb lb +l l l l. +String Nroff Troff Meaning +<= <= \*[<=] less equal +>= >= \*[>=] greater equal +Rq '' \*[Rq] right double quote +Lq `` \*[Lq] left double quote +ua ^ \*[ua] upwards arrow +aa \' \*[aa] acute accent +ga \` \*[ga] grave accent +q \&" \*[q] straight double quote +Pi pi \*[Pi] greek pi +Ne != \*[Ne] not equal +Le <= \*[Le] less equal +Ge >= \*[Ge] greater equal +Lt < \*[Lt] less than +Gt > \*[Gt] greater than +Pm +\- \*[Pm] plus minus +If infinity \*[If] infinity +Am \*[Am] \*[Am] ampersand +Na \*[Na] \*[Na] not a number +Ba \*[Ba] \*[Ba] vertical bar +.TE .Pp The names of the columns .Sy Nroff @@ -4212,7 +4219,7 @@ Section 3f has not been added to the hea .Pp .Ql \&.Nm font should be changed in -.Sx NAME +.Em NAME section. .Pp .Ql \&.Fn Modified: stable/10/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- stable/10/gnu/usr.bin/groff/tmac/mdoc.local Sat Mar 1 13:23:52 2014 (r262655) +++ stable/10/gnu/usr.bin/groff/tmac/mdoc.local Sat Mar 1 14:44:55 2014 (r262656) @@ -34,15 +34,18 @@ .\" FreeBSD .Lb values .ds doc-str-Lb-libarchive Streaming Archive Library (libarchive, \-larchive) .ds doc-str-Lb-libbluetooth Bluetooth User Library (libbluetooth, \-lbluetooth) +.ds doc-str-Lb-libcapsicum Capsicum Library (libcapsicum, \-lcapsicum) .ds doc-str-Lb-libedit Line Editor and History Library (libedit, \-ledit) .ds doc-str-Lb-libefi EFI Runtime Services Library (libefi, \-lefi) .ds doc-str-Lb-libelf ELF Parsing Library (libelf, \-lelf) .ds doc-str-Lb-libexecinfo Backtrace Access Library (libexecinfo, \-lexecinfo) .ds doc-str-Lb-libfetch File Transfer Library (libfetch, \-lfetch) +.ds doc-str-Lb-libnv Name/value pairs library (libnv, \-lnv) .ds doc-str-Lb-libpmc Performance Monitoring Counters Interface Library (libpmc, \-lpmc) .ds doc-str-Lb-libproc Processor Monitoring and Analysis Library (libproc, \-lproc) .ds doc-str-Lb-libprocstat Process and Files Information Retrieval (libprocstat, \-lprocstat) .ds doc-str-Lb-librtld_db Run-time Linker Debugging Library (librtld_db, \-lrtld_db) +.ds doc-str-Lb-libsbuf Safe String Composition Library (libsbuf, \-lsbuf) .ds doc-str-Lb-libstdthreads C11 Threads Library (libstdthreads, \-lstdthreads) . .\" Default .Os value @@ -55,6 +58,7 @@ .ds doc-operating-system-FreeBSD-9.1 9.1 .ds doc-operating-system-FreeBSD-9.2 9.2 .ds doc-operating-system-FreeBSD-10.0 10.0 +.ds doc-operating-system-NetBSD-7.0 7.0 . .\" Definitions not (yet) in doc-syms . From owner-svn-src-stable@FreeBSD.ORG Sun Mar 2 00:30:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A569881; Sun, 2 Mar 2014 00:30:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 468FB1112; Sun, 2 Mar 2014 00:30:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s220Uh4e051342; Sun, 2 Mar 2014 00:30:43 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s220UhBZ051341; Sun, 2 Mar 2014 00:30:43 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201403020030.s220UhBZ051341@svn.freebsd.org> From: Justin Hibbits Date: Sun, 2 Mar 2014 00:30:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262672 - stable/10/sys/dev/hwpmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Mar 2014 00:30:43 -0000 Author: jhibbits Date: Sun Mar 2 00:30:42 2014 New Revision: 262672 URL: http://svnweb.freebsd.org/changeset/base/262672 Log: MFC r261173 MPC74xx should not fall through, to the error case. Modified: stable/10/sys/dev/hwpmc/hwpmc_powerpc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hwpmc/hwpmc_powerpc.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_powerpc.c Sun Mar 2 00:20:00 2014 (r262671) +++ stable/10/sys/dev/hwpmc/hwpmc_powerpc.c Sun Mar 2 00:30:42 2014 (r262672) @@ -147,6 +147,7 @@ pmc_md_initialize() case MPC7455: case MPC7457: error = pmc_mpc7xxx_initialize(pmc_mdep); + break; case IBM970: case IBM970FX: case IBM970MP: From owner-svn-src-stable@FreeBSD.ORG Sun Mar 2 02:35:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2260527C; Sun, 2 Mar 2014 02:35:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 02C171077; Sun, 2 Mar 2014 02:35:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s222ZmUf000346; Sun, 2 Mar 2014 02:35:48 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s222ZkD6000327; Sun, 2 Mar 2014 02:35:46 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201403020235.s222ZkD6000327@svn.freebsd.org> From: Justin Hibbits Date: Sun, 2 Mar 2014 02:35:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262675 - in stable/10/sys: conf powerpc/aim powerpc/include powerpc/powermac powerpc/powerpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Mar 2014 02:35:49 -0000 Author: jhibbits Date: Sun Mar 2 02:35:46 2014 New Revision: 262675 URL: http://svnweb.freebsd.org/changeset/base/262675 Log: MFC r261309 Unbreak non-SMP builds. This was broken by r259284. Also, reorganize the code introduced in that revision a bit. Modified: stable/10/sys/conf/files.powerpc stable/10/sys/powerpc/aim/machdep.c stable/10/sys/powerpc/aim/mp_cpudep.c stable/10/sys/powerpc/aim/trap_subr32.S stable/10/sys/powerpc/aim/trap_subr64.S stable/10/sys/powerpc/include/cpu.h stable/10/sys/powerpc/include/platform.h stable/10/sys/powerpc/powermac/platform_powermac.c stable/10/sys/powerpc/powermac/pmu.c stable/10/sys/powerpc/powerpc/genassym.c stable/10/sys/powerpc/powerpc/mp_machdep.c stable/10/sys/powerpc/powerpc/platform.c stable/10/sys/powerpc/powerpc/platform_if.m Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files.powerpc ============================================================================== --- stable/10/sys/conf/files.powerpc Sun Mar 2 01:46:44 2014 (r262674) +++ stable/10/sys/conf/files.powerpc Sun Mar 2 02:35:46 2014 (r262675) @@ -94,7 +94,7 @@ powerpc/aim/mmu_oea.c optional aim powe powerpc/aim/mmu_oea64.c optional aim powerpc/aim/moea64_if.m optional aim powerpc/aim/moea64_native.c optional aim -powerpc/aim/mp_cpudep.c optional aim smp +powerpc/aim/mp_cpudep.c optional aim powerpc/aim/nexus.c optional aim powerpc/aim/slb.c optional aim powerpc64 powerpc/aim/swtch32.S optional aim powerpc Modified: stable/10/sys/powerpc/aim/machdep.c ============================================================================== --- stable/10/sys/powerpc/aim/machdep.c Sun Mar 2 01:46:44 2014 (r262674) +++ stable/10/sys/powerpc/aim/machdep.c Sun Mar 2 02:35:46 2014 (r262675) @@ -142,6 +142,8 @@ int cacheline_size = 32; #endif int hw_direct_map = 1; +extern void *ap_pcpu; + struct pcpu __pcpu[MAXCPU]; static struct trapframe frame0; @@ -237,9 +239,7 @@ extern void *rfid_patch, *rfi_patch1, *r extern void *trapcode64; #endif -#ifdef SMP extern void *rstcode, *rstsize; -#endif extern void *trapcode, *trapsize; extern void *slbtrap, *slbtrapsize; extern void *alitrap, *alisize; @@ -493,11 +493,7 @@ powerpc_init(vm_offset_t startkernel, vm generictrap = &trapcode; #endif -#ifdef SMP bcopy(&rstcode, (void *)(EXC_RST + trap_offset), (size_t)&rstsize); -#else - bcopy(generictrap, (void *)EXC_RST, (size_t)&trapsize); -#endif #ifdef KDB bcopy(&dblow, (void *)(EXC_MCHK + trap_offset), (size_t)&dbsize); @@ -788,3 +784,172 @@ va_to_vsid(pmap_t pm, vm_offset_t va) } #endif + +/* From p3-53 of the MPC7450 RISC Microprocessor Family Reference Manual */ +void +flush_disable_caches(void) +{ + register_t msr; + register_t msscr0; + register_t cache_reg; + volatile uint32_t *memp; + uint32_t temp; + int i; + int x; + + msr = mfmsr(); + powerpc_sync(); + mtmsr(msr & ~(PSL_EE | PSL_DR)); + msscr0 = mfspr(SPR_MSSCR0); + msscr0 &= ~MSSCR0_L2PFE; + mtspr(SPR_MSSCR0, msscr0); + powerpc_sync(); + isync(); + __asm__ __volatile__("dssall; sync"); + powerpc_sync(); + isync(); + __asm__ __volatile__("dcbf 0,%0" :: "r"(0)); + __asm__ __volatile__("dcbf 0,%0" :: "r"(0)); + __asm__ __volatile__("dcbf 0,%0" :: "r"(0)); + + /* Lock the L1 Data cache. */ + mtspr(SPR_LDSTCR, mfspr(SPR_LDSTCR) | 0xFF); + powerpc_sync(); + isync(); + + mtspr(SPR_LDSTCR, 0); + + /* + * Perform this in two stages: Flush the cache starting in RAM, then do it + * from ROM. + */ + memp = (volatile uint32_t *)0x00000000; + for (i = 0; i < 128 * 1024; i++) { + temp = *memp; + __asm__ __volatile__("dcbf 0,%0" :: "r"(memp)); + memp += 32/sizeof(*memp); + } + + memp = (volatile uint32_t *)0xfff00000; + x = 0xfe; + + for (; x != 0xff;) { + mtspr(SPR_LDSTCR, x); + for (i = 0; i < 128; i++) { + temp = *memp; + __asm__ __volatile__("dcbf 0,%0" :: "r"(memp)); + memp += 32/sizeof(*memp); + } + x = ((x << 1) | 1) & 0xff; + } + mtspr(SPR_LDSTCR, 0); + + cache_reg = mfspr(SPR_L2CR); + if (cache_reg & L2CR_L2E) { + cache_reg &= ~(L2CR_L2IO_7450 | L2CR_L2DO_7450); + mtspr(SPR_L2CR, cache_reg); + powerpc_sync(); + mtspr(SPR_L2CR, cache_reg | L2CR_L2HWF); + while (mfspr(SPR_L2CR) & L2CR_L2HWF) + ; /* Busy wait for cache to flush */ + powerpc_sync(); + cache_reg &= ~L2CR_L2E; + mtspr(SPR_L2CR, cache_reg); + powerpc_sync(); + mtspr(SPR_L2CR, cache_reg | L2CR_L2I); + powerpc_sync(); + while (mfspr(SPR_L2CR) & L2CR_L2I) + ; /* Busy wait for L2 cache invalidate */ + powerpc_sync(); + } + + cache_reg = mfspr(SPR_L3CR); + if (cache_reg & L3CR_L3E) { + cache_reg &= ~(L3CR_L3IO | L3CR_L3DO); + mtspr(SPR_L3CR, cache_reg); + powerpc_sync(); + mtspr(SPR_L3CR, cache_reg | L3CR_L3HWF); + while (mfspr(SPR_L3CR) & L3CR_L3HWF) + ; /* Busy wait for cache to flush */ + powerpc_sync(); + cache_reg &= ~L3CR_L3E; + mtspr(SPR_L3CR, cache_reg); + powerpc_sync(); + mtspr(SPR_L3CR, cache_reg | L3CR_L3I); + powerpc_sync(); + while (mfspr(SPR_L3CR) & L3CR_L3I) + ; /* Busy wait for L3 cache invalidate */ + powerpc_sync(); + } + + mtspr(SPR_HID0, mfspr(SPR_HID0) & ~HID0_DCE); + powerpc_sync(); + isync(); + + mtmsr(msr); +} + +void +cpu_sleep() +{ + static u_quad_t timebase = 0; + static register_t sprgs[4]; + static register_t srrs[2]; + + jmp_buf resetjb; + struct thread *fputd; + struct thread *vectd; + register_t hid0; + register_t msr; + register_t saved_msr; + + ap_pcpu = pcpup; + + PCPU_SET(restore, &resetjb); + + saved_msr = mfmsr(); + fputd = PCPU_GET(fputhread); + vectd = PCPU_GET(vecthread); + if (fputd != NULL) + save_fpu(fputd); + if (vectd != NULL) + save_vec(vectd); + if (setjmp(resetjb) == 0) { + sprgs[0] = mfspr(SPR_SPRG0); + sprgs[1] = mfspr(SPR_SPRG1); + sprgs[2] = mfspr(SPR_SPRG2); + sprgs[3] = mfspr(SPR_SPRG3); + srrs[0] = mfspr(SPR_SRR0); + srrs[1] = mfspr(SPR_SRR1); + timebase = mftb(); + powerpc_sync(); + flush_disable_caches(); + hid0 = mfspr(SPR_HID0); + hid0 = (hid0 & ~(HID0_DOZE | HID0_NAP)) | HID0_SLEEP; + powerpc_sync(); + isync(); + msr = mfmsr() | PSL_POW; + mtspr(SPR_HID0, hid0); + powerpc_sync(); + + while (1) + mtmsr(msr); + } + mttb(timebase); + PCPU_SET(curthread, curthread); + PCPU_SET(curpcb, curthread->td_pcb); + pmap_activate(curthread); + powerpc_sync(); + mtspr(SPR_SPRG0, sprgs[0]); + mtspr(SPR_SPRG1, sprgs[1]); + mtspr(SPR_SPRG2, sprgs[2]); + mtspr(SPR_SPRG3, sprgs[3]); + mtspr(SPR_SRR0, srrs[0]); + mtspr(SPR_SRR1, srrs[1]); + mtmsr(saved_msr); + if (fputd == curthread) + enable_fpu(curthread); + if (vectd == curthread) + enable_vec(curthread); + powerpc_sync(); +} Modified: stable/10/sys/powerpc/aim/mp_cpudep.c ============================================================================== --- stable/10/sys/powerpc/aim/mp_cpudep.c Sun Mar 2 01:46:44 2014 (r262674) +++ stable/10/sys/powerpc/aim/mp_cpudep.c Sun Mar 2 02:35:46 2014 (r262675) @@ -273,6 +273,14 @@ cpudep_ap_setup() vers = mfpvr() >> 16; + /* The following is needed for restoring from sleep. */ +#ifdef __powerpc64__ + /* Writing to the time base register is hypervisor-privileged */ + if (mfmsr() & PSL_HV) + mttb(0); +#else + mttb(0); +#endif switch(vers) { case IBM970: case IBM970FX: Modified: stable/10/sys/powerpc/aim/trap_subr32.S ============================================================================== --- stable/10/sys/powerpc/aim/trap_subr32.S Sun Mar 2 01:46:44 2014 (r262674) +++ stable/10/sys/powerpc/aim/trap_subr32.S Sun Mar 2 02:35:46 2014 (r262675) @@ -292,7 +292,6 @@ CNAME(restorebridge): isync CNAME(restorebridgesize) = .-CNAME(restorebridge) -#ifdef SMP /* * Processor reset exception handler. These are typically * the first instructions the processor executes after a @@ -320,12 +319,21 @@ cpu_reset: bla CNAME(pmap_cpu_bootstrap) bla CNAME(cpudep_ap_bootstrap) mr %r1,%r3 + bla CNAME(cpudep_ap_setup) + GET_CPUINFO(%r5) + lwz %r3,(PC_RESTORE)(%r5) + cmplwi %cr0,%r3,0 + beq %cr0,2f + li %r4, 1 + b CNAME(longjmp) +2: +#ifdef SMP bla CNAME(machdep_ap_bootstrap) +#endif /* Should not be reached */ 9: b 9b -#endif /* * This code gets copied to all the trap vectors Modified: stable/10/sys/powerpc/aim/trap_subr64.S ============================================================================== --- stable/10/sys/powerpc/aim/trap_subr64.S Sun Mar 2 01:46:44 2014 (r262674) +++ stable/10/sys/powerpc/aim/trap_subr64.S Sun Mar 2 02:35:46 2014 (r262675) @@ -287,7 +287,6 @@ dtrace_invop_calltrap_addr: .text #endif -#ifdef SMP /* * Processor reset exception handler. These are typically * the first instructions the processor executes after a @@ -322,13 +321,25 @@ cpu_reset: bl CNAME(cpudep_ap_bootstrap) /* Set up PCPU and stack */ nop mr %r1,%r3 /* Use new stack */ + bl CNAME(cpudep_ap_setup) + nop + GET_CPUINFO(%r5) + ld %r3,(PC_RESTORE)(%r5) + cmpldi %cr0,%r3,0 + beq %cr0,2f + nop + li %r4,1 + b CNAME(longjmp) + nop +2: +#ifdef SMP bl CNAME(machdep_ap_bootstrap) /* And away! */ nop +#endif /* Should not be reached */ 9: b 9b -#endif /* * This code gets copied to all the trap vectors Modified: stable/10/sys/powerpc/include/cpu.h ============================================================================== --- stable/10/sys/powerpc/include/cpu.h Sun Mar 2 01:46:44 2014 (r262674) +++ stable/10/sys/powerpc/include/cpu.h Sun Mar 2 02:35:46 2014 (r262675) @@ -95,9 +95,9 @@ extern char etext[]; void cpu_halt(void); void cpu_reset(void); +void cpu_sleep(void); +void flush_disable_caches(void); void fork_trampoline(void); void swi_vm(void *); -void flush_disable_caches(void); - #endif /* _MACHINE_CPU_H_ */ Modified: stable/10/sys/powerpc/include/platform.h ============================================================================== --- stable/10/sys/powerpc/include/platform.h Sun Mar 2 01:46:44 2014 (r262674) +++ stable/10/sys/powerpc/include/platform.h Sun Mar 2 02:35:46 2014 (r262675) @@ -56,5 +56,7 @@ void platform_smp_ap_init(void); const char *installed_platform(void); void platform_probe_and_attach(void); + +void platform_sleep(void); #endif /* _MACHINE_PLATFORM_H_ */ Modified: stable/10/sys/powerpc/powermac/platform_powermac.c ============================================================================== --- stable/10/sys/powerpc/powermac/platform_powermac.c Sun Mar 2 01:46:44 2014 (r262674) +++ stable/10/sys/powerpc/powermac/platform_powermac.c Sun Mar 2 02:35:46 2014 (r262675) @@ -38,11 +38,14 @@ __FBSDID("$FreeBSD$"); #include #include +#include /* For save_vec() */ #include #include +#include /* For save_fpu() */ #include #include #include +#include #include #include @@ -51,9 +54,7 @@ __FBSDID("$FreeBSD$"); #include "platform_if.h" -#ifdef SMP extern void *ap_pcpu; -#endif static int powermac_probe(platform_t); static int powermac_attach(platform_t); @@ -65,6 +66,7 @@ static int powermac_smp_next_cpu(platfor static int powermac_smp_get_bsp(platform_t, struct cpuref *cpuref); static int powermac_smp_start_cpu(platform_t, struct pcpu *cpu); static void powermac_reset(platform_t); +static void powermac_sleep(platform_t); static platform_method_t powermac_methods[] = { PLATFORMMETHOD(platform_probe, powermac_probe), @@ -78,6 +80,7 @@ static platform_method_t powermac_method PLATFORMMETHOD(platform_smp_start_cpu, powermac_smp_start_cpu), PLATFORMMETHOD(platform_reset, powermac_reset), + PLATFORMMETHOD(platform_sleep, powermac_sleep), PLATFORMMETHOD_END }; @@ -326,113 +329,17 @@ powermac_smp_start_cpu(platform_t plat, #endif } -/* From p3-53 of the MPC7450 RISC Microprocessor Family Reference Manual */ -void -flush_disable_caches(void) -{ - register_t msr; - register_t msscr0; - register_t cache_reg; - volatile uint32_t *memp; - uint32_t temp; - int i; - int x; - - msr = mfmsr(); - powerpc_sync(); - mtmsr(msr & ~(PSL_EE | PSL_DR)); - msscr0 = mfspr(SPR_MSSCR0); - msscr0 &= ~MSSCR0_L2PFE; - mtspr(SPR_MSSCR0, msscr0); - powerpc_sync(); - isync(); - __asm__ __volatile__("dssall; sync"); - powerpc_sync(); - isync(); - __asm__ __volatile__("dcbf 0,%0" :: "r"(0)); - __asm__ __volatile__("dcbf 0,%0" :: "r"(0)); - __asm__ __volatile__("dcbf 0,%0" :: "r"(0)); - - /* Lock the L1 Data cache. */ - mtspr(SPR_LDSTCR, mfspr(SPR_LDSTCR) | 0xFF); - powerpc_sync(); - isync(); - - mtspr(SPR_LDSTCR, 0); - - /* - * Perform this in two stages: Flush the cache starting in RAM, then do it - * from ROM. - */ - memp = (volatile uint32_t *)0x00000000; - for (i = 0; i < 128 * 1024; i++) { - temp = *memp; - __asm__ __volatile__("dcbf 0,%0" :: "r"(memp)); - memp += 32/sizeof(*memp); - } - - memp = (volatile uint32_t *)0xfff00000; - x = 0xfe; - - for (; x != 0xff;) { - mtspr(SPR_LDSTCR, x); - for (i = 0; i < 128; i++) { - temp = *memp; - __asm__ __volatile__("dcbf 0,%0" :: "r"(memp)); - memp += 32/sizeof(*memp); - } - x = ((x << 1) | 1) & 0xff; - } - mtspr(SPR_LDSTCR, 0); - - cache_reg = mfspr(SPR_L2CR); - if (cache_reg & L2CR_L2E) { - cache_reg &= ~(L2CR_L2IO_7450 | L2CR_L2DO_7450); - mtspr(SPR_L2CR, cache_reg); - powerpc_sync(); - mtspr(SPR_L2CR, cache_reg | L2CR_L2HWF); - while (mfspr(SPR_L2CR) & L2CR_L2HWF) - ; /* Busy wait for cache to flush */ - powerpc_sync(); - cache_reg &= ~L2CR_L2E; - mtspr(SPR_L2CR, cache_reg); - powerpc_sync(); - mtspr(SPR_L2CR, cache_reg | L2CR_L2I); - powerpc_sync(); - while (mfspr(SPR_L2CR) & L2CR_L2I) - ; /* Busy wait for L2 cache invalidate */ - powerpc_sync(); - } - - cache_reg = mfspr(SPR_L3CR); - if (cache_reg & L3CR_L3E) { - cache_reg &= ~(L3CR_L3IO | L3CR_L3DO); - mtspr(SPR_L3CR, cache_reg); - powerpc_sync(); - mtspr(SPR_L3CR, cache_reg | L3CR_L3HWF); - while (mfspr(SPR_L3CR) & L3CR_L3HWF) - ; /* Busy wait for cache to flush */ - powerpc_sync(); - cache_reg &= ~L3CR_L3E; - mtspr(SPR_L3CR, cache_reg); - powerpc_sync(); - mtspr(SPR_L3CR, cache_reg | L3CR_L3I); - powerpc_sync(); - while (mfspr(SPR_L3CR) & L3CR_L3I) - ; /* Busy wait for L3 cache invalidate */ - powerpc_sync(); - } - - mtspr(SPR_HID0, mfspr(SPR_HID0) & ~HID0_DCE); - powerpc_sync(); - isync(); - - mtmsr(msr); -} - static void powermac_reset(platform_t platform) { OF_reboot(); } +void +powermac_sleep(platform_t platform) +{ + + *(unsigned long *)0x80 = 0x100; + cpu_sleep(); +} + Modified: stable/10/sys/powerpc/powermac/pmu.c ============================================================================== --- stable/10/sys/powerpc/powermac/pmu.c Sun Mar 2 01:46:44 2014 (r262674) +++ stable/10/sys/powerpc/powermac/pmu.c Sun Mar 2 02:35:46 2014 (r262675) @@ -45,17 +45,14 @@ __FBSDID("$FreeBSD$"); #include #include -#include /* For save_vec() */ #include #include -#include /* For save_fpu() */ #include #include #include #include #include #include -#include #include #include @@ -106,7 +103,6 @@ static int pmu_acline_state(SYSCTL_HANDL static int pmu_query_battery(struct pmu_softc *sc, int batt, struct pmu_battstate *info); static int pmu_battquery_sysctl(SYSCTL_HANDLER_ARGS); -static void pmu_sleep_int(void); /* * List of battery-related sysctls we might ask for @@ -1031,72 +1027,6 @@ pmu_settime(device_t dev, struct timespe return (0); } -static register_t sprgs[4]; -static register_t srrs[2]; -extern void *ap_pcpu; - -void pmu_sleep_int(void) -{ - static u_quad_t timebase = 0; - jmp_buf resetjb; - struct thread *fputd; - struct thread *vectd; - register_t hid0; - register_t msr; - register_t saved_msr; - - ap_pcpu = pcpup; - - PCPU_SET(restore, &resetjb); - - *(unsigned long *)0x80 = 0x100; - saved_msr = mfmsr(); - fputd = PCPU_GET(fputhread); - vectd = PCPU_GET(vecthread); - if (fputd != NULL) - save_fpu(fputd); - if (vectd != NULL) - save_vec(vectd); - if (setjmp(resetjb) == 0) { - sprgs[0] = mfspr(SPR_SPRG0); - sprgs[1] = mfspr(SPR_SPRG1); - sprgs[2] = mfspr(SPR_SPRG2); - sprgs[3] = mfspr(SPR_SPRG3); - srrs[0] = mfspr(SPR_SRR0); - srrs[1] = mfspr(SPR_SRR1); - timebase = mftb(); - powerpc_sync(); - flush_disable_caches(); - hid0 = mfspr(SPR_HID0); - hid0 = (hid0 & ~(HID0_DOZE | HID0_NAP)) | HID0_SLEEP; - powerpc_sync(); - isync(); - msr = mfmsr() | PSL_POW; - mtspr(SPR_HID0, hid0); - powerpc_sync(); - - while (1) - mtmsr(msr); - } - mttb(timebase); - PCPU_SET(curthread, curthread); - PCPU_SET(curpcb, curthread->td_pcb); - pmap_activate(curthread); - powerpc_sync(); - mtspr(SPR_SPRG0, sprgs[0]); - mtspr(SPR_SPRG1, sprgs[1]); - mtspr(SPR_SPRG2, sprgs[2]); - mtspr(SPR_SPRG3, sprgs[3]); - mtspr(SPR_SRR0, srrs[0]); - mtspr(SPR_SRR1, srrs[1]); - mtmsr(saved_msr); - if (fputd == curthread) - enable_fpu(curthread); - if (vectd == curthread) - enable_vec(curthread); - powerpc_sync(); -} - int pmu_set_speed(int low_speed) { @@ -1114,7 +1044,7 @@ pmu_set_speed(int low_speed) sleepcmd[4] = low_speed; pmu_send(sc, PMU_CPU_SPEED, 5, sleepcmd, 16, resp); unin_chip_sleep(NULL, 1); - pmu_sleep_int(); + platform_sleep(); unin_chip_wake(NULL); mtdec(1); /* Force a decrementer exception */ Modified: stable/10/sys/powerpc/powerpc/genassym.c ============================================================================== --- stable/10/sys/powerpc/powerpc/genassym.c Sun Mar 2 01:46:44 2014 (r262674) +++ stable/10/sys/powerpc/powerpc/genassym.c Sun Mar 2 02:35:46 2014 (r262675) @@ -62,6 +62,7 @@ ASSYM(PC_CURPMAP, offsetof(struct pcpu, ASSYM(PC_TEMPSAVE, offsetof(struct pcpu, pc_tempsave)); ASSYM(PC_DISISAVE, offsetof(struct pcpu, pc_disisave)); ASSYM(PC_DBSAVE, offsetof(struct pcpu, pc_dbsave)); +ASSYM(PC_RESTORE, offsetof(struct pcpu, pc_restore)); #if defined(BOOKE) ASSYM(PC_BOOKE_CRITSAVE, offsetof(struct pcpu, pc_booke_critsave)); Modified: stable/10/sys/powerpc/powerpc/mp_machdep.c ============================================================================== --- stable/10/sys/powerpc/powerpc/mp_machdep.c Sun Mar 2 01:46:44 2014 (r262674) +++ stable/10/sys/powerpc/powerpc/mp_machdep.c Sun Mar 2 02:35:46 2014 (r262675) @@ -72,29 +72,12 @@ int longfault(faultbuf, int); void machdep_ap_bootstrap(void) { - jmp_buf *restore; - - /* The following is needed for restoring from sleep. */ -#ifdef __powerpc64__ - /* Writing to the time base register is hypervisor-privileged */ - if (mfmsr() & PSL_HV) - mttb(0); -#else - mttb(0); -#endif - /* Set up important bits on the CPU (HID registers, etc.) */ - cpudep_ap_setup(); /* Set PIR */ PCPU_SET(pir, mfspr(SPR_PIR)); PCPU_SET(awake, 1); __asm __volatile("msync; isync"); - restore = PCPU_GET(restore); - if (restore != NULL) { - longjmp(*restore, 1); - } - while (ap_letgo == 0) ; Modified: stable/10/sys/powerpc/powerpc/platform.c ============================================================================== --- stable/10/sys/powerpc/powerpc/platform.c Sun Mar 2 01:46:44 2014 (r262674) +++ stable/10/sys/powerpc/powerpc/platform.c Sun Mar 2 02:35:46 2014 (r262675) @@ -117,6 +117,15 @@ platform_timebase_freq(struct cpuref *cp return (PLATFORM_TIMEBASE_FREQ(plat_obj, cpu)); } +/* + * Put the current CPU, as last step in suspend, to sleep + */ +void +platform_sleep() +{ + PLATFORM_SLEEP(plat_obj); +} + int platform_smp_first_cpu(struct cpuref *cpu) { Modified: stable/10/sys/powerpc/powerpc/platform_if.m ============================================================================== --- stable/10/sys/powerpc/powerpc/platform_if.m Sun Mar 2 01:46:44 2014 (r262674) +++ stable/10/sys/powerpc/powerpc/platform_if.m Sun Mar 2 02:35:46 2014 (r262675) @@ -210,3 +210,10 @@ METHOD void reset { platform_t _plat; }; +/** + * @brief Suspend the CPU + */ +METHOD void sleep { + platform_t _plat; +}; + From owner-svn-src-stable@FreeBSD.ORG Sun Mar 2 00:20:01 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A29A862E; Sun, 2 Mar 2014 00:20:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8EF301064; Sun, 2 Mar 2014 00:20:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s220K1Wk044802; Sun, 2 Mar 2014 00:20:01 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s220K1e2044784; Sun, 2 Mar 2014 00:20:01 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201403020020.s220K1e2044784@svn.freebsd.org> From: Justin Hibbits Date: Sun, 2 Mar 2014 00:20:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r262671 - stable/9/sys/dev/adb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Mar 2014 00:20:01 -0000 Author: jhibbits Date: Sun Mar 2 00:20:00 2014 New Revision: 262671 URL: http://svnweb.freebsd.org/changeset/base/262671 Log: MFC r261068 Properly sort the arguments to mtx_init(9). PR: misc/186020 Submitted by: alfred Modified: stable/9/sys/dev/adb/adb_kbd.c stable/9/sys/dev/adb/adb_mouse.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/adb/adb_kbd.c ============================================================================== --- stable/9/sys/dev/adb/adb_kbd.c Sun Mar 2 00:14:57 2014 (r262670) +++ stable/9/sys/dev/adb/adb_kbd.c Sun Mar 2 00:20:00 2014 (r262671) @@ -304,7 +304,7 @@ adb_kbd_attach(device_t dev) /* Try stepping forward to the extended keyboard protocol */ adb_set_device_handler(dev,3); - mtx_init(&sc->sc_mutex,KBD_DRIVER_NAME,MTX_DEF,0); + mtx_init(&sc->sc_mutex, KBD_DRIVER_NAME, NULL, MTX_DEF); cv_init(&sc->sc_cv,KBD_DRIVER_NAME); callout_init(&sc->sc_repeater, 0); Modified: stable/9/sys/dev/adb/adb_mouse.c ============================================================================== --- stable/9/sys/dev/adb/adb_mouse.c Sun Mar 2 00:14:57 2014 (r262670) +++ stable/9/sys/dev/adb/adb_mouse.c Sun Mar 2 00:20:00 2014 (r262671) @@ -154,7 +154,7 @@ adb_mouse_attach(device_t dev) sc = device_get_softc(dev); sc->sc_dev = dev; - mtx_init(&sc->sc_mtx,"ams",MTX_DEF,0); + mtx_init(&sc->sc_mtx, "ams", NULL, MTX_DEF); cv_init(&sc->sc_cv,"ams"); sc->flags = 0; From owner-svn-src-stable@FreeBSD.ORG Sat Mar 1 21:50:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7ED47255; Sat, 1 Mar 2014 21:50:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6AB851237; Sat, 1 Mar 2014 21:50:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s21LoO8B084786; Sat, 1 Mar 2014 21:50:24 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s21LoOQX084784; Sat, 1 Mar 2014 21:50:24 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201403012150.s21LoOQX084784@svn.freebsd.org> From: Justin Hibbits Date: Sat, 1 Mar 2014 21:50:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262668 - stable/10/sys/dev/adb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Mar 2014 21:50:24 -0000 Author: jhibbits Date: Sat Mar 1 21:50:23 2014 New Revision: 262668 URL: http://svnweb.freebsd.org/changeset/base/262668 Log: MFC r261068 Properly sort the arguments to mtx_init(9). PR: misc/186020 Submitted by: alfred Modified: stable/10/sys/dev/adb/adb_kbd.c stable/10/sys/dev/adb/adb_mouse.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/adb/adb_kbd.c ============================================================================== --- stable/10/sys/dev/adb/adb_kbd.c Sat Mar 1 21:22:20 2014 (r262667) +++ stable/10/sys/dev/adb/adb_kbd.c Sat Mar 1 21:50:23 2014 (r262668) @@ -304,7 +304,7 @@ adb_kbd_attach(device_t dev) /* Try stepping forward to the extended keyboard protocol */ adb_set_device_handler(dev,3); - mtx_init(&sc->sc_mutex,KBD_DRIVER_NAME,MTX_DEF,0); + mtx_init(&sc->sc_mutex, KBD_DRIVER_NAME, NULL, MTX_DEF); cv_init(&sc->sc_cv,KBD_DRIVER_NAME); callout_init(&sc->sc_repeater, 0); Modified: stable/10/sys/dev/adb/adb_mouse.c ============================================================================== --- stable/10/sys/dev/adb/adb_mouse.c Sat Mar 1 21:22:20 2014 (r262667) +++ stable/10/sys/dev/adb/adb_mouse.c Sat Mar 1 21:50:23 2014 (r262668) @@ -154,7 +154,7 @@ adb_mouse_attach(device_t dev) sc = device_get_softc(dev); sc->sc_dev = dev; - mtx_init(&sc->sc_mtx,"ams",MTX_DEF,0); + mtx_init(&sc->sc_mtx, "ams", NULL, MTX_DEF); cv_init(&sc->sc_cv,"ams"); sc->flags = 0; From owner-svn-src-stable@FreeBSD.ORG Sun Mar 2 00:22:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C2E1972B; Sun, 2 Mar 2014 00:22:45 +0000 (UTC) Received: from mail-ee0-x229.google.com (mail-ee0-x229.google.com [IPv6:2a00:1450:4013:c00::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CF1F410E0; Sun, 2 Mar 2014 00:22:44 +0000 (UTC) Received: by mail-ee0-f41.google.com with SMTP id t10so683778eei.14 for ; Sat, 01 Mar 2014 16:22:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=oF1FTfkTlkLQUT5QKtBqaf++Y/MexBaMoQ+Sgy/zDK8=; b=zm6fHjD5ULKoN258/99YMQUrqAanW3aqL8IE+x/wUdwo05Pyxk8saonPIdds8BhJXk qeAJxOZRcwPL91aeIZScVUxUWs99E3xt/u414goVWTaVe2ntdpqaJGZS25DYSWKTSqGd RvGCjCvUSg5jRQcJN3rtn9GUpdIJGJcjKk+ODRmKxBphlDVg9UYRn0fOKC+E5HkAE/kz Y3LmskMTfL5dhPFOEQM4SnOZR+/Lr7R3u1fncXRkbjJqeAi0JqwRvYhPKamSTHSIaA1j Lz8gYxQUlrw71FTKSUVk0ryVfcKYvgCaaxEPCt2H/2i/CIoUmzG1dZOPuWUysmDP0LGV H7/A== MIME-Version: 1.0 X-Received: by 10.204.96.205 with SMTP id i13mr5323953bkn.20.1393719763057; Sat, 01 Mar 2014 16:22:43 -0800 (PST) Sender: chmeeedalf@gmail.com Received: by 10.205.21.68 with HTTP; Sat, 1 Mar 2014 16:22:42 -0800 (PST) Received: by 10.205.21.68 with HTTP; Sat, 1 Mar 2014 16:22:42 -0800 (PST) In-Reply-To: <201403020020.s220K1e2044784@svn.freebsd.org> References: <201403020020.s220K1e2044784@svn.freebsd.org> Date: Sat, 1 Mar 2014 16:22:43 -0800 X-Google-Sender-Auth: bFaqugcmnXgGkBULIasmZaBuqL8 Message-ID: Subject: Re: svn commit: r262671 - stable/9/sys/dev/adb From: Justin Hibbits To: svn-src-stable-9@freebsd.org, svn-src-stable@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Mar 2014 00:22:45 -0000 Sorry. Forgot with 9 to MFC to sys/. Any way to correct this? -Justin On Mar 1, 2014 4:20 PM, "Justin Hibbits" wrote: > Author: jhibbits > Date: Sun Mar 2 00:20:00 2014 > New Revision: 262671 > URL: http://svnweb.freebsd.org/changeset/base/262671 > > Log: > MFC r261068 > > Properly sort the arguments to mtx_init(9). > > PR: misc/186020 > Submitted by: alfred > > Modified: > stable/9/sys/dev/adb/adb_kbd.c > stable/9/sys/dev/adb/adb_mouse.c > Directory Properties: > stable/9/ (props changed) > stable/9/sys/ (props changed) > stable/9/sys/dev/ (props changed) > > Modified: stable/9/sys/dev/adb/adb_kbd.c > > ============================================================================== > --- stable/9/sys/dev/adb/adb_kbd.c Sun Mar 2 00:14:57 2014 > (r262670) > +++ stable/9/sys/dev/adb/adb_kbd.c Sun Mar 2 00:20:00 2014 > (r262671) > @@ -304,7 +304,7 @@ adb_kbd_attach(device_t dev) > /* Try stepping forward to the extended keyboard protocol */ > adb_set_device_handler(dev,3); > > - mtx_init(&sc->sc_mutex,KBD_DRIVER_NAME,MTX_DEF,0); > + mtx_init(&sc->sc_mutex, KBD_DRIVER_NAME, NULL, MTX_DEF); > cv_init(&sc->sc_cv,KBD_DRIVER_NAME); > callout_init(&sc->sc_repeater, 0); > > > Modified: stable/9/sys/dev/adb/adb_mouse.c > > ============================================================================== > --- stable/9/sys/dev/adb/adb_mouse.c Sun Mar 2 00:14:57 2014 > (r262670) > +++ stable/9/sys/dev/adb/adb_mouse.c Sun Mar 2 00:20:00 2014 > (r262671) > @@ -154,7 +154,7 @@ adb_mouse_attach(device_t dev) > sc = device_get_softc(dev); > sc->sc_dev = dev; > > - mtx_init(&sc->sc_mtx,"ams",MTX_DEF,0); > + mtx_init(&sc->sc_mtx, "ams", NULL, MTX_DEF); > cv_init(&sc->sc_cv,"ams"); > > sc->flags = 0; > > From owner-svn-src-stable@FreeBSD.ORG Sun Mar 2 01:46:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 34749675; Sun, 2 Mar 2014 01:46:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1FCEF1927; Sun, 2 Mar 2014 01:46:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s221kid3080046; Sun, 2 Mar 2014 01:46:44 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s221kimV080045; Sun, 2 Mar 2014 01:46:44 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201403020146.s221kimV080045@svn.freebsd.org> From: Julio Merino Date: Sun, 2 Mar 2014 01:46:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262674 - stable/10/sys/dev/syscons X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Mar 2014 01:46:45 -0000 Author: jmmv Date: Sun Mar 2 01:46:44 2014 New Revision: 262674 URL: http://svnweb.freebsd.org/changeset/base/262674 Log: Increase maximum number of columns to support 1920x1200 displays. This is a MFC of r262480 and r262502. Please note that this is changing a constant in a header file so it could affect ABIs. However, as far as I can tell, this is apparently only used in code to declare static arrays and thus it should be safe to change... PR: kern/180558 Modified: stable/10/sys/dev/syscons/syscons.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/syscons/syscons.h ============================================================================== --- stable/10/sys/dev/syscons/syscons.h Sun Mar 2 00:47:47 2014 (r262673) +++ stable/10/sys/dev/syscons/syscons.h Sun Mar 2 01:46:44 2014 (r262674) @@ -145,9 +145,9 @@ /* The following #defines are hard-coded for a maximum text resolution corresponding to a maximum framebuffer - resolution of 1600x1200 with an 8x8 font... + resolution of 1920x1200 with an 8x8 font... */ -#define COL 200 +#define COL 240 #define ROW 150 #define PCBURST 128 From owner-svn-src-stable@FreeBSD.ORG Sun Mar 2 12:11:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C2FD73F; Sun, 2 Mar 2014 12:11:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 375121B1E; Sun, 2 Mar 2014 12:11:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s22CBuNg053947; Sun, 2 Mar 2014 12:11:56 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s22CBtQC053945; Sun, 2 Mar 2014 12:11:55 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201403021211.s22CBtQC053945@svn.freebsd.org> From: Christian Brueffer Date: Sun, 2 Mar 2014 12:11:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262686 - in stable/10/release/doc: en_US.ISO8859-1/hardware share/misc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Mar 2014 12:11:56 -0000 Author: brueffer Date: Sun Mar 2 12:11:55 2014 New Revision: 262686 URL: http://svnweb.freebsd.org/changeset/base/262686 Log: MFC: r262574 Add tws(4) to the hardware notes. Modified: stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml stable/10/release/doc/share/misc/dev.archlist.txt Directory Properties: stable/10/ (props changed) Modified: stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Sun Mar 2 08:58:21 2014 (r262685) +++ stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Sun Mar 2 12:11:55 2014 (r262686) @@ -758,6 +758,8 @@ &hwlist.twe; + &hwlist.tws; + &hwlist.vpo; [&arch.i386;] The wds(4) driver supports the WD7000 SCSI Modified: stable/10/release/doc/share/misc/dev.archlist.txt ============================================================================== --- stable/10/release/doc/share/misc/dev.archlist.txt Sun Mar 2 08:58:21 2014 (r262685) +++ stable/10/release/doc/share/misc/dev.archlist.txt Sun Mar 2 12:11:55 2014 (r262686) @@ -153,6 +153,7 @@ tl i386,pc98,amd64 trm i386,amd64 twa i386,amd64 twe i386,amd64 +tws i386,amd64 ubsa i386,pc98,amd64 ubsec i386,pc98,amd64 ubser i386,pc98,amd64 From owner-svn-src-stable@FreeBSD.ORG Sun Mar 2 12:13:55 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87A028A9; Sun, 2 Mar 2014 12:13:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 728CF1B33; Sun, 2 Mar 2014 12:13:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s22CDtmb054211; Sun, 2 Mar 2014 12:13:55 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s22CDtUb054208; Sun, 2 Mar 2014 12:13:55 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201403021213.s22CDtUb054208@svn.freebsd.org> From: Christian Brueffer Date: Sun, 2 Mar 2014 12:13:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r262687 - in stable/9/release/doc: en_US.ISO8859-1/hardware share/misc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Mar 2014 12:13:55 -0000 Author: brueffer Date: Sun Mar 2 12:13:54 2014 New Revision: 262687 URL: http://svnweb.freebsd.org/changeset/base/262687 Log: MFC: r262574 Add tws(4) to the hardware notes. Modified: stable/9/release/doc/en_US.ISO8859-1/hardware/article.xml stable/9/release/doc/share/misc/dev.archlist.txt Directory Properties: stable/9/release/doc/ (props changed) stable/9/release/doc/en_US.ISO8859-1/hardware/ (props changed) Modified: stable/9/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/hardware/article.xml Sun Mar 2 12:11:55 2014 (r262686) +++ stable/9/release/doc/en_US.ISO8859-1/hardware/article.xml Sun Mar 2 12:13:54 2014 (r262687) @@ -819,6 +819,8 @@ &hwlist.twe; + &hwlist.tws; + &hwlist.vpo; [&arch.i386;] The wds(4) driver supports the WD7000 SCSI Modified: stable/9/release/doc/share/misc/dev.archlist.txt ============================================================================== --- stable/9/release/doc/share/misc/dev.archlist.txt Sun Mar 2 12:11:55 2014 (r262686) +++ stable/9/release/doc/share/misc/dev.archlist.txt Sun Mar 2 12:13:54 2014 (r262687) @@ -152,6 +152,7 @@ tl i386,pc98,amd64 trm i386,amd64 twa i386,amd64 twe i386,amd64 +tws i386,amd64 ubsa i386,pc98,amd64 ubsec i386,pc98,amd64 ubser i386,pc98,amd64 From owner-svn-src-stable@FreeBSD.ORG Sun Mar 2 12:15:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA0A7A12; Sun, 2 Mar 2014 12:15:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C4F8E1B48; Sun, 2 Mar 2014 12:15:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s22CFQa9054512; Sun, 2 Mar 2014 12:15:26 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s22CFQBF054509; Sun, 2 Mar 2014 12:15:26 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201403021215.s22CFQBF054509@svn.freebsd.org> From: Christian Brueffer Date: Sun, 2 Mar 2014 12:15:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r262688 - in stable/8/release/doc: en_US.ISO8859-1/hardware share/misc X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Mar 2014 12:15:26 -0000 Author: brueffer Date: Sun Mar 2 12:15:26 2014 New Revision: 262688 URL: http://svnweb.freebsd.org/changeset/base/262688 Log: MFC: r262574 Add tws(4) to the hardware notes. Modified: stable/8/release/doc/en_US.ISO8859-1/hardware/article.xml stable/8/release/doc/share/misc/dev.archlist.txt Directory Properties: stable/8/release/doc/ (props changed) stable/8/release/doc/en_US.ISO8859-1/hardware/ (props changed) Modified: stable/8/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/hardware/article.xml Sun Mar 2 12:13:54 2014 (r262687) +++ stable/8/release/doc/en_US.ISO8859-1/hardware/article.xml Sun Mar 2 12:15:26 2014 (r262688) @@ -817,6 +817,8 @@ &hwlist.twe; + &hwlist.tws; + &hwlist.vpo; [&arch.i386;] The wds(4) driver supports the WD7000 SCSI Modified: stable/8/release/doc/share/misc/dev.archlist.txt ============================================================================== --- stable/8/release/doc/share/misc/dev.archlist.txt Sun Mar 2 12:13:54 2014 (r262687) +++ stable/8/release/doc/share/misc/dev.archlist.txt Sun Mar 2 12:15:26 2014 (r262688) @@ -150,6 +150,7 @@ tl i386,pc98,amd64 trm i386,amd64 twa i386,amd64 twe i386,amd64 +tws i386,amd64 ubsa i386,pc98,amd64 ubsec i386,pc98,amd64 ubser i386,pc98,amd64 From owner-svn-src-stable@FreeBSD.ORG Sun Mar 2 15:53:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E297FB45; Sun, 2 Mar 2014 15:53:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CC9371D40; Sun, 2 Mar 2014 15:53:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s22Frdgn042457; Sun, 2 Mar 2014 15:53:39 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s22FrdNA042456; Sun, 2 Mar 2014 15:53:39 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201403021553.s22FrdNA042456@svn.freebsd.org> From: Justin Hibbits Date: Sun, 2 Mar 2014 15:53:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262691 - stable/10/sys/powerpc/aim X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Mar 2014 15:53:40 -0000 Author: jhibbits Date: Sun Mar 2 15:53:39 2014 New Revision: 262691 URL: http://svnweb.freebsd.org/changeset/base/262691 Log: MFC r261258 Use a loop of dcbz, instead of calling bzero() to zero a page. This matches what is done in mmu_oea64.c. Modified: stable/10/sys/powerpc/aim/mmu_oea.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/powerpc/aim/mmu_oea.c ============================================================================== --- stable/10/sys/powerpc/aim/mmu_oea.c Sun Mar 2 13:26:08 2014 (r262690) +++ stable/10/sys/powerpc/aim/mmu_oea.c Sun Mar 2 15:53:39 2014 (r262691) @@ -1084,10 +1084,10 @@ moea_copy_pages(mmu_t mmu, vm_page_t *ma void moea_zero_page(mmu_t mmu, vm_page_t m) { - vm_offset_t pa = VM_PAGE_TO_PHYS(m); - void *va = (void *)pa; + vm_offset_t off, pa = VM_PAGE_TO_PHYS(m); - bzero(va, PAGE_SIZE); + for (off = 0; off < PAGE_SIZE; off += cacheline_size) + __asm __volatile("dcbz 0,%0" :: "r"(pa + off)); } void @@ -1102,10 +1102,8 @@ moea_zero_page_area(mmu_t mmu, vm_page_t void moea_zero_page_idle(mmu_t mmu, vm_page_t m) { - vm_offset_t pa = VM_PAGE_TO_PHYS(m); - void *va = (void *)pa; - bzero(va, PAGE_SIZE); + moea_zero_page(mmu, m); } /* From owner-svn-src-stable@FreeBSD.ORG Sun Mar 2 16:04:28 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D5BDF71; Sun, 2 Mar 2014 16:04:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4843E1E2A; Sun, 2 Mar 2014 16:04:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s22G4SrT046637; Sun, 2 Mar 2014 16:04:28 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s22G4SRU046636; Sun, 2 Mar 2014 16:04:28 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201403021604.s22G4SRU046636@svn.freebsd.org> From: Bryan Drewery Date: Sun, 2 Mar 2014 16:04:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262692 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Mar 2014 16:04:28 -0000 Author: bdrewery Date: Sun Mar 2 16:04:27 2014 New Revision: 262692 URL: http://svnweb.freebsd.org/changeset/base/262692 Log: MFC r262005: Remove redundant memcpy of fd_ofiles in fdgrowtable() Approved by: bapt (mentor, implicit) Modified: stable/10/sys/kern/kern_descrip.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_descrip.c ============================================================================== --- stable/10/sys/kern/kern_descrip.c Sun Mar 2 15:53:39 2014 (r262691) +++ stable/10/sys/kern/kern_descrip.c Sun Mar 2 16:04:27 2014 (r262692) @@ -1538,7 +1538,6 @@ fdgrowtable(struct filedesc *fdp, int nf memcpy(nmap, omap, NDSLOTS(onfiles) * sizeof(*omap)); /* update the pointers and counters */ - memcpy(ntable, otable, onfiles * sizeof(ntable[0])); fdp->fd_ofiles = ntable; fdp->fd_map = nmap; From owner-svn-src-stable@FreeBSD.ORG Sun Mar 2 16:25:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DAF11436; Sun, 2 Mar 2014 16:25:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B9C9510CC; Sun, 2 Mar 2014 16:25:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s22GPurv055002; Sun, 2 Mar 2014 16:25:56 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s22GPuUI055001; Sun, 2 Mar 2014 16:25:56 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201403021625.s22GPuUI055001@svn.freebsd.org> From: Bryan Drewery Date: Sun, 2 Mar 2014 16:25:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262693 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Mar 2014 16:25:57 -0000 Author: bdrewery Date: Sun Mar 2 16:25:56 2014 New Revision: 262693 URL: http://svnweb.freebsd.org/changeset/base/262693 Log: MFC r262006,r262328: r262006: Fix M_FILEDESC leak in fdgrowtable() introduced in r244510. fdgrowtable() now only reallocates fd_map when necessary. r262328: Style. Approved by: bapt (mentor, implicit) Modified: stable/10/sys/kern/kern_descrip.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_descrip.c ============================================================================== --- stable/10/sys/kern/kern_descrip.c Sun Mar 2 16:04:27 2014 (r262692) +++ stable/10/sys/kern/kern_descrip.c Sun Mar 2 16:25:56 2014 (r262693) @@ -1522,7 +1522,7 @@ fdgrowtable(struct filedesc *fdp, int nf return; /* - * Allocate a new table and map. We need enough space for the + * Allocate a new table. We need enough space for the * file entries themselves and the struct freetable we will use * when we decommission the table and place it on the freelist. * We place the struct freetable in the middle so we don't have @@ -1530,16 +1530,22 @@ fdgrowtable(struct filedesc *fdp, int nf */ ntable = malloc(nnfiles * sizeof(ntable[0]) + sizeof(struct freetable), M_FILEDESC, M_ZERO | M_WAITOK); - nmap = malloc(NDSLOTS(nnfiles) * NDSLOTSIZE, M_FILEDESC, - M_ZERO | M_WAITOK); - /* copy the old data over and point at the new tables */ memcpy(ntable, otable, onfiles * sizeof(*otable)); - memcpy(nmap, omap, NDSLOTS(onfiles) * sizeof(*omap)); - - /* update the pointers and counters */ fdp->fd_ofiles = ntable; - fdp->fd_map = nmap; + + /* + * Allocate a new map only if the old is not large enough. It will + * grow at a slower rate than the table as it can map more + * entries than the table can hold. + */ + if (NDSLOTS(nnfiles) > NDSLOTS(onfiles)) { + nmap = malloc(NDSLOTS(nnfiles) * NDSLOTSIZE, M_FILEDESC, + M_ZERO | M_WAITOK); + /* copy over the old data and update the pointer */ + memcpy(nmap, omap, NDSLOTS(onfiles) * sizeof(*omap)); + fdp->fd_map = nmap; + } /* * In order to have a valid pattern for fget_unlocked() @@ -1555,8 +1561,6 @@ fdgrowtable(struct filedesc *fdp, int nf * reference entries within it. Instead, place it on a freelist * which will be processed when the struct filedesc is released. * - * Do, however, free the old map. - * * Note that if onfiles == NDFILE, we're dealing with the original * static allocation contained within (struct filedesc0 *)fdp, * which must not be freed. @@ -1566,8 +1570,14 @@ fdgrowtable(struct filedesc *fdp, int nf fdp0 = (struct filedesc0 *)fdp; ft->ft_table = otable; SLIST_INSERT_HEAD(&fdp0->fd_free, ft, ft_next); - free(omap, M_FILEDESC); } + /* + * The map does not have the same possibility of threads still + * holding references to it. So always free it as long as it + * does not reference the original static allocation. + */ + if (NDSLOTS(onfiles) > NDSLOTS(NDFILE)) + free(omap, M_FILEDESC); } /* From owner-svn-src-stable@FreeBSD.ORG Sun Mar 2 23:09:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D9EBE19; Sun, 2 Mar 2014 23:09:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D43CC1395; Sun, 2 Mar 2014 23:09:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s22N9aQX021307; Sun, 2 Mar 2014 23:09:36 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s22N9arG021306; Sun, 2 Mar 2014 23:09:36 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201403022309.s22N9arG021306@svn.freebsd.org> From: Warner Losh Date: Sun, 2 Mar 2014 23:09:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262698 - stable/10/sys/arm/at91 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Mar 2014 23:09:37 -0000 Author: imp Date: Sun Mar 2 23:09:36 2014 New Revision: 262698 URL: http://svnweb.freebsd.org/changeset/base/262698 Log: MRC: r260886 Merge only the uart_dev_at91usart.c part of this revision, since it has nothing to do with the commit log and was included by mistake there. This connects the new grab/ungrab upcalls that were revised in uart to fix mountroot>. Modified: stable/10/sys/arm/at91/uart_dev_at91usart.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/at91/uart_dev_at91usart.c ============================================================================== --- stable/10/sys/arm/at91/uart_dev_at91usart.c Sun Mar 2 22:59:34 2014 (r262697) +++ stable/10/sys/arm/at91/uart_dev_at91usart.c Sun Mar 2 23:09:36 2014 (r262698) @@ -219,20 +219,6 @@ at91_usart_param(struct uart_bas *bas, i return (0); } -static void -at91_usart_grab(struct uart_bas *bas) -{ - - WR4(bas, USART_IDR, USART_CSR_RXRDY); -} - -static void -at91_usart_ungrab(struct uart_bas *bas) -{ - - WR4(bas, USART_IER, USART_CSR_RXRDY); -} - static struct uart_ops at91_usart_ops = { .probe = at91_usart_probe, .init = at91_usart_init, @@ -240,8 +226,6 @@ static struct uart_ops at91_usart_ops = .putc = at91_usart_putc, .rxready = at91_usart_rxready, .getc = at91_usart_getc, - .grab = at91_usart_grab, - .ungrab = at91_usart_ungrab, }; static int @@ -331,6 +315,8 @@ static int at91_usart_bus_param(struct u static int at91_usart_bus_receive(struct uart_softc *); static int at91_usart_bus_setsig(struct uart_softc *, int); static int at91_usart_bus_transmit(struct uart_softc *); +static void at91_usart_bus_grab(struct uart_softc *); +static void at91_usart_bus_ungrab(struct uart_softc *); static kobj_method_t at91_usart_methods[] = { KOBJMETHOD(uart_probe, at91_usart_bus_probe), @@ -343,6 +329,8 @@ static kobj_method_t at91_usart_methods[ KOBJMETHOD(uart_receive, at91_usart_bus_receive), KOBJMETHOD(uart_setsig, at91_usart_bus_setsig), KOBJMETHOD(uart_transmit, at91_usart_bus_transmit), + KOBJMETHOD(uart_grab, at91_usart_bus_grab), + KOBJMETHOD(uart_ungrab, at91_usart_bus_ungrab), KOBJMETHOD_END }; @@ -815,6 +803,25 @@ at91_usart_bus_ioctl(struct uart_softc * return (EINVAL); } + +static void +at91_usart_bus_grab(struct uart_softc *sc) +{ + + uart_lock(sc->sc_hwmtx); + WR4(&sc->sc_bas, USART_IDR, USART_CSR_RXRDY); + uart_unlock(sc->sc_hwmtx); +} + +static void +at91_usart_bus_ungrab(struct uart_softc *sc) +{ + + uart_lock(sc->sc_hwmtx); + WR4(&sc->sc_bas, USART_IER, USART_CSR_RXRDY); + uart_unlock(sc->sc_hwmtx); +} + struct uart_class at91_usart_class = { "at91_usart", at91_usart_methods, From owner-svn-src-stable@FreeBSD.ORG Mon Mar 3 07:16:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6814187E; Mon, 3 Mar 2014 07:16:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4839A231; Mon, 3 Mar 2014 07:16:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s237GgWS073835; Mon, 3 Mar 2014 07:16:42 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s237Ge5I073823; Mon, 3 Mar 2014 07:16:40 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201403030716.s237Ge5I073823@svn.freebsd.org> From: Devin Teske Date: Mon, 3 Mar 2014 07:16:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262701 - in stable/10/sys/boot: forth i386/loader X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Mar 2014 07:16:42 -0000 Author: dteske Date: Mon Mar 3 07:16:39 2014 New Revision: 262701 URL: http://svnweb.freebsd.org/changeset/base/262701 Log: MFC r257650: Defer loading of kernel and modules if the beastie menu is enabled. Add a kernel selection menu to the beastie menu. List of kernels is taken from `kernels' in loader.conf(5) as a space (or comma) separated list of names to display (up to 9). If not set, default value is "kernel kernel.old". Does not validate that kernels exist because the next enhancement will be to allow selection of the root device. Discussed on: -current Modified: stable/10/sys/boot/forth/beastie.4th stable/10/sys/boot/forth/loader.4th stable/10/sys/boot/forth/loader.4th.8 stable/10/sys/boot/forth/loader.conf stable/10/sys/boot/forth/loader.conf.5 stable/10/sys/boot/forth/loader.rc stable/10/sys/boot/forth/menu-commands.4th stable/10/sys/boot/forth/menu.4th stable/10/sys/boot/forth/menu.rc stable/10/sys/boot/forth/menusets.4th stable/10/sys/boot/i386/loader/loader.rc Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/forth/beastie.4th ============================================================================== --- stable/10/sys/boot/forth/beastie.4th Mon Mar 3 00:27:51 2014 (r262700) +++ stable/10/sys/boot/forth/beastie.4th Mon Mar 3 07:16:39 2014 (r262701) @@ -30,6 +30,8 @@ marker task-beastie.4th include /boot/delay.4th +only forth definitions also support-functions + variable logoX variable logoY @@ -275,7 +277,11 @@ variable logoY s" beastie_disable" getenv dup -1 <> if s" YES" compare-insensitive 0= if - exit + any_conf_read? if + load_kernel + load_modules + then + exit \ to autoboot (default) then else drop @@ -292,3 +298,5 @@ variable logoY delay_execute then ; + +only forth also Modified: stable/10/sys/boot/forth/loader.4th ============================================================================== --- stable/10/sys/boot/forth/loader.4th Mon Mar 3 00:27:51 2014 (r262700) +++ stable/10/sys/boot/forth/loader.4th Mon Mar 3 07:16:39 2014 (r262701) @@ -44,6 +44,14 @@ include /boot/color.4th only forth also support-functions also builtins definitions +: bootmsg ( -- ) + loader_color? if + ." Booting..." cr + else + ." Booting..." cr + then +; + : try-menu-unset \ menu-unset may not be present s" beastie_disable" getenv @@ -71,12 +79,6 @@ only forth also support-functions also b : boot 0= if ( interpreted ) get_arguments then - loader_color? if - ." Booting..." cr - else - ." Booting..." cr - then - \ Unload only if a path was passed dup if >r over r> swap @@ -85,25 +87,25 @@ only forth also support-functions also b else s" kernelname" getenv? if ( a kernel has been loaded ) try-menu-unset - 1 boot exit + bootmsg 1 boot exit then load_kernel_and_modules ?dup if exit then try-menu-unset - 0 1 boot exit + bootmsg 0 1 boot exit then else s" kernelname" getenv? if ( a kernel has been loaded ) try-menu-unset - 1 boot exit + bootmsg 1 boot exit then load_kernel_and_modules ?dup if exit then try-menu-unset - 0 1 boot exit + bootmsg 0 1 boot exit then load_kernel_and_modules - ?dup 0= if 0 1 boot then + ?dup 0= if bootmsg 0 1 boot then ; \ ***** boot-conf @@ -129,8 +131,8 @@ include /boot/check-password.4th \ ***** start \ \ Initializes support.4th global variables, sets loader_conf_files, -\ process conf files, and, if any one such file was succesfully -\ read to the end, load kernel and modules. +\ processes conf files, and, if any one such file was succesfully +\ read to the end, loads kernel and modules. : start ( -- ) ( throws: abort & user-defined ) s" /boot/defaults/loader.conf" initialize Modified: stable/10/sys/boot/forth/loader.4th.8 ============================================================================== --- stable/10/sys/boot/forth/loader.4th.8 Mon Mar 3 00:27:51 2014 (r262700) +++ stable/10/sys/boot/forth/loader.4th.8 Mon Mar 3 07:16:39 2014 (r262701) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 30, 2004 +.Dd October 17, 2013 .Dt LOADER.4TH 8 .Os .Sh NAME @@ -94,31 +94,35 @@ Reads .Pa /boot/defaults/loader.conf , all other .Xr loader.conf 5 -files specified in it, and then proceeds to boot as specified in them. -This +files specified in it, then loads the desired kernel and modules +.Pq if not already loaded . +After which you can use the +.Ic boot +or +.Ic autoboot +commmands or simply exit (provided +.Va autoboot_delay +is not set to NO) to boot the system. +.Ic start is the command used in the default .Pa /boot/loader.rc -file, and it uses the -.Ic autoboot -command (see -.Xr loader 8 ) , -so it can be stopped for further interaction with -.Xr loader 8 . +file +.Pq see Xr loader 8 . .Pp .It Ic initialize -Initialize the supporting library so commands can be used without -executing +Initialize the support library so commands can be used without executing .Ic start first. Like .Ic start , -reads +it reads .Pa /boot/defaults/loader.conf and all other .Xr loader.conf 5 -files specified in it. +files specified in it +.Pq but does not load kernel or modules . Returns a flag on the stack to indicate -if any configuration file was successfully loaded. +if any configuration files were successfully loaded. .Pp .It Ic read-conf Ar filename Reads and processes a Modified: stable/10/sys/boot/forth/loader.conf ============================================================================== --- stable/10/sys/boot/forth/loader.conf Mon Mar 3 00:27:51 2014 (r262700) +++ stable/10/sys/boot/forth/loader.conf Mon Mar 3 07:16:39 2014 (r262701) @@ -59,6 +59,7 @@ entropy_cache_type="/boot/entropy" # escape to the loader prompt, set to # "NO" to disable autobooting #beastie_disable="NO" # Turn the beastie boot menu on and off +#kernels="kernel kernel.old" # Kernels to display in the boot menu #loader_logo="orbbw" # Desired logo: orbbw, orb, fbsdbw, beastiebw, beastie, none #comconsole_speed="9600" # Set the current serial console speed #console="vidconsole" # A comma separated list of console(s) Modified: stable/10/sys/boot/forth/loader.conf.5 ============================================================================== --- stable/10/sys/boot/forth/loader.conf.5 Mon Mar 3 00:27:51 2014 (r262700) +++ stable/10/sys/boot/forth/loader.conf.5 Mon Mar 3 07:16:39 2014 (r262701) @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd August 6, 2013 +.Dd October 18, 2013 .Dt LOADER.CONF 5 .Os .Sh NAME @@ -209,6 +209,9 @@ replacing it with character (useful for embedded products and such). .It Va kernel .Pq Dq kernel +.It Va kernels +.Pq Dq kernel kernel.old +Space or comma separated list of kernels to present in the boot menu. .It Va loader_conf_files .Pq Dq Pa /boot/loader.conf /boot/loader.conf.local .It Va splash_bmp_load Modified: stable/10/sys/boot/forth/loader.rc ============================================================================== --- stable/10/sys/boot/forth/loader.rc Mon Mar 3 00:27:51 2014 (r262700) +++ stable/10/sys/boot/forth/loader.rc Mon Mar 3 07:16:39 2014 (r262701) @@ -5,6 +5,7 @@ include /boot/loader.4th \ Reads and processes loader.conf variables +\ NOTE: Change to `initialize' if you enable the below boot menu start \ Tests for password -- executes autoboot first if a password was defined Modified: stable/10/sys/boot/forth/menu-commands.4th ============================================================================== --- stable/10/sys/boot/forth/menu-commands.4th Mon Mar 3 00:27:51 2014 (r262700) +++ stable/10/sys/boot/forth/menu-commands.4th Mon Mar 3 07:16:39 2014 (r262701) @@ -1,4 +1,4 @@ -\ Copyright (c) 2006-2012 Devin Teske +\ Copyright (c) 2006-2013 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without @@ -30,6 +30,8 @@ include /boot/menusets.4th variable kernel_state variable root_state +0 kernel_state ! +0 root_state ! \ \ Boot @@ -279,21 +281,21 @@ variable root_state init_cyclestate ( n k -- n ) ; -: cycle_kernel ( N -- N TRUE ) - cycle_menuitem - menu-redraw - - \ Now we're going to make the change effective - - dup cycle_stateN @ - dup kernel_state ! \ save a copy for re-initialization - 48 + \ convert to ASCII numeral +: activate_kernel ( N -- N ) + dup cycle_stateN @ ( n -- n n2 ) + dup kernel_state ! ( n n2 -- n n2 ) \ copy for re-initialization + 48 + ( n n2 -- n n2' ) \ kernel_state to ASCII num s" set kernel=${kernel_prefix}${kernel[N]}${kernel_suffix}" - 36 +c! \ replace 'N' with ASCII numeral - evaluate \ sets $kernel to full kernel-path + 36 +c! ( n n2 c-addr/u -- n c-addr/u ) \ 'N' to ASCII num + evaluate ( n c-addr/u -- n ) \ sets $kernel to full kernel-path +; - TRUE \ loop menu again +: cycle_kernel ( N -- N TRUE ) + cycle_menuitem \ cycle cycle_stateN to next value + activate_kernel \ apply current cycle_stateN + menu-redraw \ redraw menu + TRUE \ loop menu again ; \ @@ -305,21 +307,21 @@ variable root_state init_cyclestate ( n k -- n ) ; -: cycle_root ( N -- N TRUE ) - cycle_menuitem - menu-redraw - - \ Now we're going to make the change effective - - dup cycle_stateN @ - dup root_state ! \ save a copy for re-initialization - 48 + \ convert to ASCII numeral +: activate_root ( N -- N ) + dup cycle_stateN @ ( n -- n n2 ) + dup root_state ! ( n n2 -- n n2 ) \ copy for re-initialization + 48 + ( n n2 -- n n2' ) \ root_state to ASCII num s" set root=${root_prefix}${root[N]}${root_suffix}" - 30 +c! \ replace 'N' with ASCII numeral - evaluate \ sets $root to full root-path + 30 +c! ( n n2 c-addr/u -- n c-addr/u ) \ 'N' to ASCII num + evaluate ( n c-addr/u -- n ) \ sets $root to full kernel-path +; - TRUE \ loop menu again +: cycle_root ( N -- N TRUE ) + cycle_menuitem \ cycle cycle_stateN to next value + activate_root \ apply current cycle_stateN + menu-redraw \ redraw menu + TRUE \ loop menu again ; \ Modified: stable/10/sys/boot/forth/menu.4th ============================================================================== --- stable/10/sys/boot/forth/menu.4th Mon Mar 3 00:27:51 2014 (r262700) +++ stable/10/sys/boot/forth/menu.4th Mon Mar 3 07:16:39 2014 (r262701) @@ -70,6 +70,12 @@ variable menureboot variable menurebootadded variable menuacpi variable menuoptions +variable menukernel + +\ Parsing of kernels into menu-items +variable kernidx +variable kernlen +variable kernmenuidx \ Menu timer [count-down] variables variable menu_timeout_enabled \ timeout state (internal use only) @@ -109,14 +115,19 @@ variable cycle_state7 variable cycle_state8 \ Containers for storing the initial caption text -create init_text1 255 allot -create init_text2 255 allot -create init_text3 255 allot -create init_text4 255 allot -create init_text5 255 allot -create init_text6 255 allot -create init_text7 255 allot -create init_text8 255 allot +create init_text1 64 allot +create init_text2 64 allot +create init_text3 64 allot +create init_text4 64 allot +create init_text5 64 allot +create init_text6 64 allot +create init_text7 64 allot +create init_text8 64 allot + +\ Containers for parsing kernels into menu-items +create kerncapbuf 64 allot +create kerndefault 64 allot +create kernelsbuf 256 allot : +c! ( N C-ADDR/U K -- C-ADDR/U ) 3 pick 3 pick ( n c-addr/u k -- n c-addr/u k n c-addr ) @@ -124,45 +135,31 @@ create init_text8 255 allot rot drop ( n c-addr/u -- c-addr/u ) ; +: delim? ( C -- BOOL ) + dup 32 = ( c -- c bool ) \ [sp] space + over 9 = or ( c bool -- c bool ) \ [ht] horizontal tab + over 10 = or ( c bool -- c bool ) \ [nl] newline + over 13 = or ( c bool -- c bool ) \ [cr] carriage return + over [char] , = or ( c bool -- c bool ) \ comma + swap drop ( c bool -- bool ) \ return boolean +; + : menukeyN ( N -- ADDR ) s" menukeyN" 7 +c! evaluate ; : init_stateN ( N -- ADDR ) s" init_stateN" 10 +c! evaluate ; : toggle_stateN ( N -- ADDR ) s" toggle_stateN" 12 +c! evaluate ; : cycle_stateN ( N -- ADDR ) s" cycle_stateN" 11 +c! evaluate ; : init_textN ( N -- C-ADDR ) s" init_textN" 9 +c! evaluate ; -: str_loader_menu_frame ( -- C-ADDR/U ) s" loader_menu_frame" ; -: str_loader_menu_title ( -- C-ADDR/U ) s" loader_menu_title" ; -: str_loader_menu_title_align ( -- C-ADDR/U ) s" loader_menu_title_align" ; -: str_loader_menu_x ( -- C-ADDR/U ) s" loader_menu_x" ; -: str_loader_menu_y ( -- C-ADDR/U ) s" loader_menu_y" ; -: str_loader_menu_timeout_x ( -- C-ADDR/U ) s" loader_menu_timeout_x" ; -: str_loader_menu_timeout_y ( -- C-ADDR/U ) s" loader_menu_timeout_y" ; -: str_menu_init ( -- C-ADDR/U ) s" menu_init" ; -: str_menu_timeout_command ( -- C-ADDR/U ) s" menu_timeout_command" ; -: str_menu_reboot ( -- C-ADDR/U ) s" menu_reboot" ; -: str_menu_acpi ( -- C-ADDR/U ) s" menu_acpi" ; -: str_menu_options ( -- C-ADDR/U ) s" menu_options" ; -: str_menu_optionstext ( -- C-ADDR/U ) s" menu_optionstext" ; - -: str_menu_init[x] ( -- C-ADDR/U ) s" menu_init[x]" ; -: str_menu_command[x] ( -- C-ADDR/U ) s" menu_command[x]" ; -: str_menu_caption[x] ( -- C-ADDR/U ) s" menu_caption[x]" ; -: str_ansi_caption[x] ( -- C-ADDR/U ) s" ansi_caption[x]" ; -: str_menu_keycode[x] ( -- C-ADDR/U ) s" menu_keycode[x]" ; -: str_toggled_text[x] ( -- C-ADDR/U ) s" toggled_text[x]" ; -: str_toggled_ansi[x] ( -- C-ADDR/U ) s" toggled_ansi[x]" ; -: str_menu_caption[x][y] ( -- C-ADDR/U ) s" menu_caption[x][y]" ; -: str_ansi_caption[x][y] ( -- C-ADDR/U ) s" ansi_caption[x][y]" ; - -: menu_init[x] ( N -- C-ADDR/U ) str_menu_init[x] 10 +c! ; -: menu_command[x] ( N -- C-ADDR/U ) str_menu_command[x] 13 +c! ; -: menu_caption[x] ( N -- C-ADDR/U ) str_menu_caption[x] 13 +c! ; -: ansi_caption[x] ( N -- C-ADDR/U ) str_ansi_caption[x] 13 +c! ; -: menu_keycode[x] ( N -- C-ADDR/U ) str_menu_keycode[x] 13 +c! ; -: toggled_text[x] ( N -- C-ADDR/U ) str_toggled_text[x] 13 +c! ; -: toggled_ansi[x] ( N -- C-ADDR/U ) str_toggled_ansi[x] 13 +c! ; -: menu_caption[x][y] ( N M -- C-ADDR/U ) str_menu_caption[x][y] 16 +c! 13 +c! ; -: ansi_caption[x][y] ( N M -- C-ADDR/U ) str_ansi_caption[x][y] 16 +c! 13 +c! ; +: kernel[x] ( N -- C-ADDR/U ) s" kernel[x]" 7 +c! ; +: menu_init[x] ( N -- C-ADDR/U ) s" menu_init[x]" 10 +c! ; +: menu_command[x] ( N -- C-ADDR/U ) s" menu_command[x]" 13 +c! ; +: menu_caption[x] ( N -- C-ADDR/U ) s" menu_caption[x]" 13 +c! ; +: ansi_caption[x] ( N -- C-ADDR/U ) s" ansi_caption[x]" 13 +c! ; +: menu_keycode[x] ( N -- C-ADDR/U ) s" menu_keycode[x]" 13 +c! ; +: toggled_text[x] ( N -- C-ADDR/U ) s" toggled_text[x]" 13 +c! ; +: toggled_ansi[x] ( N -- C-ADDR/U ) s" toggled_ansi[x]" 13 +c! ; +: menu_caption[x][y] ( N M -- C-ADDR/U ) s" menu_caption[x][y]" 16 +c! 13 +c! ; +: ansi_caption[x][y] ( N M -- C-ADDR/U ) s" ansi_caption[x][y]" 16 +c! 13 +c! ; : arch-i386? ( -- BOOL ) \ Returns TRUE (-1) on i386, FALSE (0) otherwise. s" arch-i386" environment? dup if @@ -355,12 +352,9 @@ create init_text8 255 allot then ( n addr 0 n 48 -- n addr 0 c-addr/u ) getenv dup -1 = if - \ This is highly unlikely to occur, but to make - \ sure that things move along smoothly, allocate - \ a temporary NULL string - - drop ( n addr 0 -1 -- n addr 0 ) \ getenv cruft - s" " ( n addr 0 -- n addr 0 c-addr/u ) + \ Highly unlikely to occur, but to ensure things move + \ along smoothly, allocate a temporary NULL string + drop ( cruft ) s" " then then @@ -418,15 +412,15 @@ create init_text8 255 allot acpipresent? if acpienabled? if loader_color? if - str_toggled_ansi[x] + s" toggled_ansi[x]" else - str_toggled_text[x] + s" toggled_text[x]" then else loader_color? if - str_ansi_caption[x] + s" ansi_caption[x]" else - str_menu_caption[x] + s" menu_caption[x]" then then else @@ -438,17 +432,198 @@ create init_text8 255 allot then ; +\ This function parses $kernels into variables that are used by the menu to +\ display wich kernel to boot when the [overloaded] `boot' word is interpreted. +\ Used internally by menu-create, you need not (nor should you) call this +\ directly. +\ +: parse-kernels ( N -- ) \ kernidx + kernidx ! ( n -- ) \ store provided `x' value + [char] 0 kernmenuidx ! \ initialize `y' value for menu_caption[x][y] + + \ Attempt to get a list of kernels, fall back to sensible default + s" kernels" getenv dup -1 = if + drop ( cruft ) + s" kernel kernel.old" + then ( -- c-addr/u ) + + \ Check to see if the user has altered $kernel by comparing it against + \ $kernel[N] where N is kernel_state (the actively displayed kernel). + s" kernel_state" evaluate @ 48 + s" kernel[N]" 7 +c! getenv + dup -1 <> if + s" kernel" getenv dup -1 = if + drop ( cruft ) s" " + then + 2swap 2over compare 0= if + 2drop FALSE ( skip below conditional ) + else \ User has changed $kernel + TRUE ( slurp in new value ) + then + else \ We haven't yet parsed $kernels into $kernel[N] + drop ( getenv cruft ) + s" kernel" getenv dup -1 = if + drop ( cruft ) s" " + then + TRUE ( slurp in initial value ) + then ( c-addr/u -- c-addr/u c-addr/u,-1 | 0 ) + if \ slurp new value into kerndefault + kerndefault 1+ 0 2swap strcat swap 1- c! + then + + \ Clear out existing parsed-kernels + kernidx @ [char] 0 + begin + dup kernel[x] unsetenv + 2dup menu_caption[x][y] unsetenv + 2dup ansi_caption[x][y] unsetenv + 1+ dup [char] 8 > + until + 2drop + + \ Step through the string until we find the end + begin + 0 kernlen ! \ initialize length of value + + \ Skip leading whitespace and/or comma delimiters + begin + dup 0<> if + over c@ delim? ( c-addr/u -- c-addr/u bool ) + else + false ( c-addr/u -- c-addr/u bool ) + then + while + 1- swap 1+ swap ( c-addr/u -- c-addr'/u' ) + repeat + ( c-addr/u -- c-addr'/u' ) + + dup 0= if \ end of string while eating whitespace + 2drop ( c-addr/u -- ) + kernmenuidx @ [char] 0 <> if \ found at least one + exit \ all done + then + + \ No entries in $kernels; use $kernel instead + s" kernel" getenv dup -1 = if + drop ( cruft ) s" " + then ( -- c-addr/u ) + dup kernlen ! \ store entire value length as kernlen + else + \ We're still within $kernels parsing toward the end; + \ find delimiter/end to determine kernlen + 2dup ( c-addr/u -- c-addr/u c-addr/u ) + begin dup 0<> while + over c@ delim? if + drop 0 ( break ) \ found delimiter + else + kernlen @ 1+ kernlen ! \ incrememnt + 1- swap 1+ swap \ c-addr++ u-- + then + repeat + 2drop ( c-addr/u c-addr'/u' -- c-addr/u ) + + \ If this is the first entry, compare it to $kernel + \ If different, then insert $kernel beforehand + kernmenuidx @ [char] 0 = if + over kernlen @ kerndefault count compare if + kernelsbuf 0 kerndefault count strcat + s" ," strcat 2swap strcat + kerndefault count swap drop kernlen ! + then + then + then + ( c-addr/u -- c-addr'/u' ) + + \ At this point, we should have something on the stack to store + \ as the next kernel menu option; start assembling variables + + over kernlen @ ( c-addr/u -- c-addr/u c-addr/u2 ) + + \ Assign first to kernel[x] + 2dup kernmenuidx @ kernel[x] setenv + + \ Assign second to menu_caption[x][y] + kerncapbuf 0 s" [K]ernel: " strcat + 2over strcat + kernidx @ kernmenuidx @ menu_caption[x][y] + setenv + + \ Assign third to ansi_caption[x][y] + kerncapbuf 0 s" Kernel: " strcat + kernmenuidx @ [char] 0 = if + s" default/" + else + s" " + then strcat + 2over strcat + s" " strcat + kernidx @ kernmenuidx @ ansi_caption[x][y] + setenv + + 2drop ( c-addr/u c-addr/u2 -- c-addr/u ) + + kernmenuidx @ 1+ dup kernmenuidx ! [char] 8 > if + 2drop ( c-addr/u -- ) exit + then + + kernlen @ - swap kernlen @ + swap ( c-addr/u -- c-addr'/u' ) + again +; + +\ This function goes through the kernels that were discovered by the +\ parse-kernels function [above], adding " (# of #)" text to the end of each +\ caption. +\ +: tag-kernels ( -- ) + kernidx @ ( -- x ) dup 0= if exit then + [char] 0 s" (Y of Z)" ( x -- x y c-addr/u ) + kernmenuidx @ -rot 7 +c! \ Replace 'Z' with number of kernels parsed + begin + 2 pick 1+ -rot 2 +c! \ Replace 'Y' with current ASCII num + + 2over menu_caption[x][y] getenv dup -1 <> if + 2dup + 1- c@ [char] ) = if + 2drop \ Already tagged + else + kerncapbuf 0 2swap strcat + 2over strcat + 5 pick 5 pick menu_caption[x][y] setenv + then + else + drop ( getenv cruft ) + then + + 2over ansi_caption[x][y] getenv dup -1 <> if + 2dup + 1- c@ [char] ) = if + 2drop \ Already tagged + else + kerncapbuf 0 2swap strcat + 2over strcat + 5 pick 5 pick ansi_caption[x][y] setenv + then + else + drop ( getenv cruft ) + then + + rot 1+ dup [char] 8 > if + -rot 2drop TRUE ( break ) + else + -rot FALSE + then + until + 2drop ( x y -- ) +; + \ This function creates the list of menu items. This function is called by the \ menu-display function. You need not be call it directly. \ : menu-create ( -- ) \ Print the frame caption at (x,y) - str_loader_menu_title getenv dup -1 = if + s" loader_menu_title" getenv dup -1 = if drop s" Welcome to FreeBSD" then TRUE ( use default alignment ) - str_loader_menu_title_align getenv dup -1 <> if + s" loader_menu_title_align" getenv dup -1 <> if 2dup s" left" compare-insensitive 0= if ( 1 ) 2drop ( c-addr/u ) drop ( bool ) menuX @ menuY @ 1- @@ -470,7 +645,7 @@ create init_text8 255 allot \ constructed dynamically -- as this function could conceivably set \ the remaining environment variables to construct the menu entirely). \ - str_menu_init getenv dup -1 <> if + s" menu_init" getenv dup -1 <> if evaluate else drop @@ -495,7 +670,7 @@ create init_text8 255 allot \ Initialize the ACPI option status. \ 0 menuacpi ! - str_menu_acpi getenv -1 <> if + s" menu_acpi" getenv -1 <> if c@ dup 48 > over 57 < and if ( '1' <= c1 <= '8' ) menuacpi ! arch-i386? if acpipresent? if @@ -511,10 +686,51 @@ create init_text8 255 allot then \ + \ Initialize kernel captions after parsing $kernels + \ + 0 menukernel ! + s" menu_kernel" getenv -1 <> if + c@ dup 48 > over 57 < and if ( '1' <= c1 <= '8' ) + dup menukernel ! + dup parse-kernels tag-kernels + + \ Get the current cycle state (entry to use) + s" kernel_state" evaluate @ 48 + ( n -- n y ) + + \ If state is invalid, reset + dup kernmenuidx @ 1- > if + drop [char] 0 ( n y -- n 48 ) + 0 s" kernel_state" evaluate ! + over s" init_kernel" evaluate drop + then + + \ Set the current non-ANSI caption + 2dup swap dup ( n y -- n y y n n ) + s" set menu_caption[x]=$menu_caption[x][y]" + 17 +c! 34 +c! 37 +c! evaluate + ( n y y n n c-addr/u -- n y ) + + \ Set the current ANSI caption + 2dup swap dup ( n y -- n y y n n ) + s" set ansi_caption[x]=$ansi_caption[x][y]" + 17 +c! 34 +c! 37 +c! evaluate + ( n y y n n c-addr/u -- n y ) + + \ Initialize cycle state from stored value + 48 - ( n y -- n k ) + s" init_cyclestate" evaluate ( n k -- n ) + + \ Set $kernel to $kernel[y] + s" activate_kernel" evaluate ( n -- n ) + then + drop + then + + \ \ Initialize the menu_options visual separator. \ 0 menuoptions ! - str_menu_options getenv -1 <> if + s" menu_options" getenv -1 <> if c@ dup 48 > over 57 < and if ( '1' <= c1 <= '8' ) menuoptions ! else @@ -534,7 +750,7 @@ create init_text8 255 allot \ If the "Options:" separator, print it. dup menuoptions @ = if \ Optionally add a reboot option to the menu - str_menu_reboot getenv -1 <> if + s" menu_reboot" getenv -1 <> if drop s" Reboot" printmenuitem menureboot ! true menurebootadded ! @@ -544,7 +760,7 @@ create init_text8 255 allot menurow @ 2 + menurow ! menurow @ menuY @ + at-xy - str_menu_optionstext getenv dup -1 <> if + s" menu_optionstext" getenv dup -1 <> if type else drop ." Options:" @@ -603,7 +819,7 @@ create init_text8 255 allot \ Optionally add a reboot option to the menu menurebootadded @ true <> if - str_menu_reboot getenv -1 <> if + s" menu_reboot" getenv -1 <> if drop \ no need for the value s" Reboot" \ menu caption (required by printmenuitem) @@ -684,7 +900,7 @@ create init_text8 255 allot \ (user did not cancel by pressing ANY \ key) - str_menu_timeout_command getenv dup + s" menu_timeout_command" getenv dup -1 = if drop \ clean-up else @@ -758,7 +974,7 @@ create init_text8 255 allot 0 menurow ! \ Initialize the starting position for the menu \ Assign configuration values - str_loader_menu_y getenv dup -1 = if + s" loader_menu_y" getenv dup -1 = if drop \ no custom row position menu_default_y else @@ -768,7 +984,7 @@ create init_text8 255 allot then then menuY ! - str_loader_menu_x getenv dup -1 = if + s" loader_menu_x" getenv dup -1 = if drop \ no custom column position menu_default_x else @@ -781,7 +997,7 @@ create init_text8 255 allot \ Interpret a custom frame type for the menu TRUE ( draw a box? default yes, but might be altered below ) - str_loader_menu_frame getenv dup -1 = if ( 1 ) + s" loader_menu_frame" getenv dup -1 = if ( 1 ) drop \ no custom frame type else ( 1 ) 2dup s" single" compare-insensitive 0= if ( 2 ) f_single ( see frames.4th ) @@ -804,7 +1020,7 @@ create init_text8 255 allot 0 menu_timeout_enabled ! \ start with automatic timeout disabled \ check indication that automatic execution after delay is requested - str_menu_timeout_command getenv -1 <> if ( Addr C -1 -- | Addr ) + s" menu_timeout_command" getenv -1 <> if ( Addr C -1 -- | Addr ) drop ( just testing existence right now: Addr -- ) \ initialize state variables @@ -840,7 +1056,7 @@ create init_text8 255 allot menu_timeout_enabled @ 1 = if \ read custom column position (if set) - str_loader_menu_timeout_x getenv dup -1 = if + s" loader_menu_timeout_x" getenv dup -1 = if drop \ no custom column position menu_timeout_default_x \ use default setting else @@ -852,7 +1068,7 @@ create init_text8 255 allot menu_timeout_x ! ( store value on stack from above ) \ read custom row position (if set) - str_loader_menu_timeout_y getenv dup -1 = if + s" loader_menu_timeout_y" getenv dup -1 = if drop \ no custom row position menu_timeout_default_y \ use default setting else @@ -1005,12 +1221,13 @@ create init_text8 255 allot until drop \ iterator - str_menu_timeout_command unsetenv \ menu timeout command - str_menu_reboot unsetenv \ Reboot menu option flag - str_menu_acpi unsetenv \ ACPI menu option flag - str_menu_options unsetenv \ Options separator flag - str_menu_optionstext unsetenv \ separator display text - str_menu_init unsetenv \ menu initializer + s" menu_timeout_command" unsetenv \ menu timeout command + s" menu_reboot" unsetenv \ Reboot menu option flag + s" menu_acpi" unsetenv \ ACPI menu option flag + s" menu_kernel" unsetenv \ Kernel menu option flag + s" menu_options" unsetenv \ Options separator flag + s" menu_optionstext" unsetenv \ separator display text + s" menu_init" unsetenv \ menu initializer 0 menureboot ! 0 menuacpi ! Modified: stable/10/sys/boot/forth/menu.rc ============================================================================== --- stable/10/sys/boot/forth/menu.rc Mon Mar 3 00:27:51 2014 (r262700) +++ stable/10/sys/boot/forth/menu.rc Mon Mar 3 07:16:39 2014 (r262701) @@ -55,10 +55,14 @@ set mainmenu_reboot \ set mainmenu_options=5 -set mainmenu_caption[5]="Configure Boot [O]ptions..." -set mainmenu_command[5]="2 goto_menu" -set mainmenu_keycode[5]=111 -set mainansi_caption[5]="Configure Boot Options..." +set mainmenu_kernel=5 +set mainmenu_command[5]="cycle_kernel" +set mainmenu_keycode[5]=107 + +set mainmenu_caption[6]="Configure Boot [O]ptions..." +set mainmenu_command[6]="2 goto_menu" +set mainmenu_keycode[6]=111 +set mainansi_caption[6]="Configure Boot Options..." \ \ BOOT OPTIONS MENU Modified: stable/10/sys/boot/forth/menusets.4th ============================================================================== --- stable/10/sys/boot/forth/menusets.4th Mon Mar 3 00:27:51 2014 (r262700) +++ stable/10/sys/boot/forth/menusets.4th Mon Mar 3 07:16:39 2014 (r262701) @@ -366,6 +366,7 @@ create menuset_y 1 allot \ menuset1_command[x] -> menu_command[x] \ menuset1_init -> ``evaluated'' \ menuset1_init[x] -> menu_init[x] + \ menuset1_kernel -> menu_kernel \ menuset1_keycode[x] -> menu_keycode[x] \ menuset1_options -> menu_options \ menuset1_optionstext -> menu_optionstext @@ -382,6 +383,7 @@ create menuset_y 1 allot \ {name}menu_command[x] -> menu_command[x] \ {name}menu_init -> ``evaluated'' \ {name}menu_init[x] -> menu_init[x] + \ {name}menu_kernel -> menu_kernel \ {name}menu_keycode[x] -> menu_keycode[x] \ {name}menu_options -> menu_options \ {name}menu_optionstext -> menu_optionstext @@ -520,6 +522,10 @@ create menuset_y 1 allot s" set var=acpi" evaluate menuset-loadmenuvar + \ ... menu_kernel ... + s" set var=kernel" evaluate + menuset-loadmenuvar + \ ... menu_options ... s" set var=options" evaluate menuset-loadmenuvar @@ -597,6 +603,7 @@ create menuset_y 1 allot s" set var=acpi" evaluate menuset-unloadmenuvar s" set var=init" evaluate menuset-unloadmenuvar + s" set var=kernel" evaluate menuset-unloadmenuvar s" set var=options" evaluate menuset-unloadmenuvar s" set var=optionstext" evaluate menuset-unloadmenuvar s" set var=reboot" evaluate menuset-unloadmenuvar Modified: stable/10/sys/boot/i386/loader/loader.rc ============================================================================== --- stable/10/sys/boot/i386/loader/loader.rc Mon Mar 3 00:27:51 2014 (r262700) +++ stable/10/sys/boot/i386/loader/loader.rc Mon Mar 3 07:16:39 2014 (r262701) @@ -5,7 +5,7 @@ include /boot/loader.4th \ Reads and processes loader.conf variables -start +initialize \ Tests for password -- executes autoboot first if a password was defined check-password From owner-svn-src-stable@FreeBSD.ORG Mon Mar 3 07:24:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D53AA89; Mon, 3 Mar 2014 07:24:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7DB402F3; Mon, 3 Mar 2014 07:24:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s237OpVv077576; Mon, 3 Mar 2014 07:24:51 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s237Oogb077573; Mon, 3 Mar 2014 07:24:50 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201403030724.s237Oogb077573@svn.freebsd.org> From: Devin Teske Date: Mon, 3 Mar 2014 07:24:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262702 - stable/10/sys/boot/forth X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Mar 2014 07:24:51 -0000 Author: dteske Date: Mon Mar 3 07:24:50 2014 New Revision: 262702 URL: http://svnweb.freebsd.org/changeset/base/262702 Log: MFC r257821: Extend loader_delay as-documented in beastie.4th(8) and delay.4th(8), making it available to architectures that do not use or load the beastie menu. This is reported to save headaches on some PPC systems where unload followed by load does not produce the desired results wherein if-given the opportunity to abort the initial loading sequence, you can customize the first load. Reviewed by: nwhitehorn, kan Discussed on: -current Modified: stable/10/sys/boot/forth/beastie.4th stable/10/sys/boot/forth/loader.4th stable/10/sys/boot/forth/loader.conf Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/forth/beastie.4th ============================================================================== --- stable/10/sys/boot/forth/beastie.4th Mon Mar 3 07:16:39 2014 (r262701) +++ stable/10/sys/boot/forth/beastie.4th Mon Mar 3 07:24:50 2014 (r262702) @@ -28,8 +28,6 @@ marker task-beastie.4th -include /boot/delay.4th - only forth definitions also support-functions variable logoX Modified: stable/10/sys/boot/forth/loader.4th ============================================================================== --- stable/10/sys/boot/forth/loader.4th Mon Mar 3 07:16:39 2014 (r262701) +++ stable/10/sys/boot/forth/loader.4th Mon Mar 3 07:24:50 2014 (r262702) @@ -41,6 +41,7 @@ s" arch-i386" environment? [if] [if] include /boot/support.4th include /boot/color.4th +include /boot/delay.4th only forth also support-functions also builtins definitions @@ -141,8 +142,17 @@ include /boot/check-password.4th \ Will *NOT* try to load kernel and modules if no configuration file \ was succesfully loaded! any_conf_read? if - load_kernel - load_modules + s" loader_delay" getenv -1 = if + load_kernel + load_modules + else + drop + ." Loading Kernel and Modules (Ctrl-C to Abort)" cr + s" also support-functions" evaluate + s" set delay_command='load_kernel load_modules'" evaluate + s" set delay_showdots" evaluate + delay_execute + then then ; Modified: stable/10/sys/boot/forth/loader.conf ============================================================================== --- stable/10/sys/boot/forth/loader.conf Mon Mar 3 07:16:39 2014 (r262701) +++ stable/10/sys/boot/forth/loader.conf Mon Mar 3 07:24:50 2014 (r262702) @@ -53,6 +53,8 @@ entropy_cache_type="/boot/entropy" ### Loader settings ######################################## ############################################################## +#loader_delay="3" # Delay in seconds before loading anything. + # Default is unset and disabled (no delay). #autoboot_delay="10" # Delay in seconds before autobooting, # set to -1 if you don't want user to be # allowed to interrupt autoboot process and From owner-svn-src-stable@FreeBSD.ORG Mon Mar 3 07:28:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AC86ACD0; Mon, 3 Mar 2014 07:28:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7F4BA311; Mon, 3 Mar 2014 07:28:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s237Suaa078171; Mon, 3 Mar 2014 07:28:56 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s237Sun8078170; Mon, 3 Mar 2014 07:28:56 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201403030728.s237Sun8078170@svn.freebsd.org> From: Devin Teske Date: Mon, 3 Mar 2014 07:28:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262703 - stable/10/sys/boot/forth X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Mar 2014 07:28:56 -0000 Author: dteske Date: Mon Mar 3 07:28:56 2014 New Revision: 262703 URL: http://svnweb.freebsd.org/changeset/base/262703 Log: MFC r258269: Refactor draw-beastie function. Discussed on: -hackers Modified: stable/10/sys/boot/forth/beastie.4th Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/forth/beastie.4th ============================================================================== --- stable/10/sys/boot/forth/beastie.4th Mon Mar 3 07:24:50 2014 (r262702) +++ stable/10/sys/boot/forth/beastie.4th Mon Mar 3 07:28:56 2014 (r262703) @@ -202,56 +202,26 @@ variable logoY drop then - s" loader_logo" getenv dup -1 = if - logoX @ logoY @ - loader_color? if - orb-logo - else - orbbw-logo - then - drop exit - then - - 2dup s" beastie" compare-insensitive 0= if - logoX @ logoY @ beastie-logo - 2drop exit - then - 2dup s" beastiebw" compare-insensitive 0= if - logoX @ logoY @ beastiebw-logo - 2drop exit - then - 2dup s" fbsdbw" compare-insensitive 0= if - logoX @ logoY @ fbsdbw-logo - 2drop exit - then - 2dup s" orb" compare-insensitive 0= if - logoX @ logoY @ orb-logo - 2drop exit - then - 2dup s" orbbw" compare-insensitive 0= if - logoX @ logoY @ orbbw-logo - 2drop exit - then - 2dup s" tribute" compare-insensitive 0= if - logoX @ logoY @ - s" tribute-logo" sfind if - execute - else - drop orb-logo - then - 2drop exit + s" loader_logo" getenv dup -1 <> if + dup 5 + allocate if ENOMEM throw then + 0 2swap strcat s" -logo" strcat + over -rot ( a-addr/u -- a-addr a-addr/u ) + sfind ( a-addr a-addr/u -- a-addr xt bool ) + rot ( a-addr xt bool -- xt bool a-addr ) + free ( xt bool a-addr -- xt bool ior ) + if EFREE throw then + else + 0 ( cruft -- cruft bool ) \ load the default below then - 2dup s" tributebw" compare-insensitive 0= if - logoX @ logoY @ - s" tributebw-logo" sfind if - execute + 0= if + drop ( cruft -- ) + loader_color? if + ['] orb-logo else - drop orbbw-logo + ['] orbbw-logo then - 2drop exit then - - 2drop + logoX @ logoY @ rot execute ; : clear-beastie ( -- ) \ clears beastie from the screen From owner-svn-src-stable@FreeBSD.ORG Mon Mar 3 07:31:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F38CF76; Mon, 3 Mar 2014 07:31:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5B251391; Mon, 3 Mar 2014 07:31:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s237VuKt081185; Mon, 3 Mar 2014 07:31:56 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s237Vt9p081179; Mon, 3 Mar 2014 07:31:55 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201403030731.s237Vt9p081179@svn.freebsd.org> From: Devin Teske Date: Mon, 3 Mar 2014 07:31:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262704 - in stable/10/sys/boot: forth i386/loader X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Mar 2014 07:31:56 -0000 Author: dteske Date: Mon Mar 3 07:31:55 2014 New Revision: 262704 URL: http://svnweb.freebsd.org/changeset/base/262704 Log: MFC r258270: Add a try-include word (which acts the same as "include") and use it to conditionally include (but ignore failures) /boot/loader.rc.local and /boot/menu.rc.local -- to make customizing the menu easier. Reviewed by: alfred Discussed on: -hackers Modified: stable/10/sys/boot/forth/loader.4th stable/10/sys/boot/forth/loader.4th.8 stable/10/sys/boot/forth/loader.rc stable/10/sys/boot/forth/menu.rc stable/10/sys/boot/i386/loader/loader.rc Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/forth/loader.4th ============================================================================== --- stable/10/sys/boot/forth/loader.4th Mon Mar 3 07:28:56 2014 (r262703) +++ stable/10/sys/boot/forth/loader.4th Mon Mar 3 07:31:55 2014 (r262704) @@ -233,7 +233,16 @@ include /boot/check-password.4th s" disable-module" s" disable loading of a module" .? s" toggle-module" s" toggle loading of a module" .? s" show-module" s" show module load data" .? + s" try-include" s" try to load/interpret files" .? ; +: try-include ( -- ) \ see loader.4th(8) + ['] include ( -- xt ) \ get the execution token of `include' + catch ( xt -- exception# | 0 ) if \ failed + LF parse ( c -- s-addr/u ) 2drop \ advance >in to EOL (drop data) + \ ... prevents words unused by `include' from being interpreted + then +; immediate \ interpret immediately for access to `source' (aka tib) + only forth also Modified: stable/10/sys/boot/forth/loader.4th.8 ============================================================================== --- stable/10/sys/boot/forth/loader.4th.8 Mon Mar 3 07:28:56 2014 (r262703) +++ stable/10/sys/boot/forth/loader.4th.8 Mon Mar 3 07:31:55 2014 (r262704) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 17, 2013 +.Dd November 13, 2013 .Dt LOADER.4TH 8 .Os .Sh NAME @@ -158,6 +158,13 @@ files to specify the action after a modu Used inside .Xr loader.conf 5 files to specify the action after a module loading fails. +.It Ic try-include Ar file Op Ar +Process script files if they exist. +Each file, in turn, is completely read into memory, +and then each of its lines is passed to the command line interpreter. +If any error is returned by the interpreter, the try-include +command aborts immediately, without reading any other files, and +silently returns without error. .El .Sh FILES .Bl -tag -width /boot/loader.4th -compact Modified: stable/10/sys/boot/forth/loader.rc ============================================================================== --- stable/10/sys/boot/forth/loader.rc Mon Mar 3 07:28:56 2014 (r262703) +++ stable/10/sys/boot/forth/loader.rc Mon Mar 3 07:31:55 2014 (r262704) @@ -3,6 +3,7 @@ \ \ Includes additional commands include /boot/loader.4th +try-include /boot/loader.rc.local \ Reads and processes loader.conf variables \ NOTE: Change to `initialize' if you enable the below boot menu Modified: stable/10/sys/boot/forth/menu.rc ============================================================================== --- stable/10/sys/boot/forth/menu.rc Mon Mar 3 07:28:56 2014 (r262703) +++ stable/10/sys/boot/forth/menu.rc Mon Mar 3 07:31:55 2014 (r262704) @@ -120,6 +120,10 @@ set optionstoggled_ansi[6]="Ver \ set menu_timeout_command="boot" +\ Include optional elements defined in a local file +\ +try-include /boot/menu.rc.local + \ Display the main menu (see `menu.4th') set menuset_initial=1 menuset-loadinitial Modified: stable/10/sys/boot/i386/loader/loader.rc ============================================================================== --- stable/10/sys/boot/i386/loader/loader.rc Mon Mar 3 07:28:56 2014 (r262703) +++ stable/10/sys/boot/i386/loader/loader.rc Mon Mar 3 07:31:55 2014 (r262704) @@ -3,6 +3,7 @@ \ \ Includes additional commands include /boot/loader.4th +try-include /boot/loader.rc.local \ Reads and processes loader.conf variables initialize From owner-svn-src-stable@FreeBSD.ORG Mon Mar 3 09:18:22 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3F09A4A; Mon, 3 Mar 2014 09:18:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BBE25D9A; Mon, 3 Mar 2014 09:18:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s239IMqQ023190; Mon, 3 Mar 2014 09:18:22 GMT (envelope-from erwin@svn.freebsd.org) Received: (from erwin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s239IKkB023178; Mon, 3 Mar 2014 09:18:20 GMT (envelope-from erwin@svn.freebsd.org) Message-Id: <201403030918.s239IKkB023178@svn.freebsd.org> From: Erwin Lansing Date: Mon, 3 Mar 2014 09:18:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r262706 - in stable/9: contrib/bind9 contrib/bind9/bin/check contrib/bind9/bin/confgen contrib/bind9/bin/dig contrib/bind9/bin/dig/include/dig contrib/bind9/bin/dnssec contrib/bind9/bin... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Mar 2014 09:18:22 -0000 Author: erwin Date: Mon Mar 3 09:18:19 2014 New Revision: 262706 URL: http://svnweb.freebsd.org/changeset/base/262706 Log: MFV 262445: Update BIND to 9.9.5 Release note: https://lists.isc.org/pipermail/bind-announce/2013-September/000871.html https://lists.isc.org/pipermail/bind-announce/2014-January/000896.html Note this is a commit straight to stable as BIND no longer exists in head. Sponsored by: DK Hostmaster A/S Added: stable/9/contrib/bind9/bin/dnssec/dnssec-importkey.8 - copied unchanged from r262445, vendor/bind9/dist/bin/dnssec/dnssec-importkey.8 stable/9/contrib/bind9/bin/dnssec/dnssec-importkey.c - copied unchanged from r262445, vendor/bind9/dist/bin/dnssec/dnssec-importkey.c stable/9/contrib/bind9/bin/dnssec/dnssec-importkey.docbook - copied unchanged from r262445, vendor/bind9/dist/bin/dnssec/dnssec-importkey.docbook stable/9/contrib/bind9/bin/dnssec/dnssec-importkey.html - copied unchanged from r262445, vendor/bind9/dist/bin/dnssec/dnssec-importkey.html stable/9/contrib/bind9/doc/arm/man.dnssec-checkds.html - copied unchanged from r262445, vendor/bind9/dist/doc/arm/man.dnssec-checkds.html stable/9/contrib/bind9/doc/arm/man.dnssec-coverage.html - copied unchanged from r262445, vendor/bind9/dist/doc/arm/man.dnssec-coverage.html stable/9/contrib/bind9/lib/dns/include/dns/rrl.h - copied unchanged from r262445, vendor/bind9/dist/lib/dns/include/dns/rrl.h stable/9/contrib/bind9/lib/dns/rrl.c - copied unchanged from r262445, vendor/bind9/dist/lib/dns/rrl.c stable/9/contrib/bind9/lib/isc/include/isc/safe.h - copied unchanged from r262445, vendor/bind9/dist/lib/isc/include/isc/safe.h stable/9/contrib/bind9/lib/isc/include/isc/tm.h - copied unchanged from r262445, vendor/bind9/dist/lib/isc/include/isc/tm.h stable/9/contrib/bind9/lib/isc/safe.c - copied unchanged from r262445, vendor/bind9/dist/lib/isc/safe.c stable/9/contrib/bind9/lib/isc/tm.c - copied unchanged from r262445, vendor/bind9/dist/lib/isc/tm.c stable/9/usr.sbin/dnssec-importkey/ stable/9/usr.sbin/dnssec-importkey/Makefile (contents, props changed) Modified: stable/9/contrib/bind9/CHANGES stable/9/contrib/bind9/COPYRIGHT stable/9/contrib/bind9/Makefile.in stable/9/contrib/bind9/README stable/9/contrib/bind9/bin/check/named-checkconf.8 stable/9/contrib/bind9/bin/check/named-checkconf.c stable/9/contrib/bind9/bin/check/named-checkconf.docbook stable/9/contrib/bind9/bin/check/named-checkconf.html stable/9/contrib/bind9/bin/confgen/ddns-confgen.c stable/9/contrib/bind9/bin/confgen/rndc-confgen.c stable/9/contrib/bind9/bin/dig/dig.1 stable/9/contrib/bind9/bin/dig/dig.c stable/9/contrib/bind9/bin/dig/dig.docbook stable/9/contrib/bind9/bin/dig/dig.html stable/9/contrib/bind9/bin/dig/dighost.c stable/9/contrib/bind9/bin/dig/host.c stable/9/contrib/bind9/bin/dig/include/dig/dig.h stable/9/contrib/bind9/bin/dig/nslookup.1 stable/9/contrib/bind9/bin/dig/nslookup.c stable/9/contrib/bind9/bin/dig/nslookup.docbook stable/9/contrib/bind9/bin/dig/nslookup.html stable/9/contrib/bind9/bin/dnssec/Makefile.in stable/9/contrib/bind9/bin/dnssec/dnssec-keygen.c stable/9/contrib/bind9/bin/dnssec/dnssec-settime.c stable/9/contrib/bind9/bin/dnssec/dnssec-signzone.8 stable/9/contrib/bind9/bin/dnssec/dnssec-signzone.c stable/9/contrib/bind9/bin/dnssec/dnssec-signzone.docbook stable/9/contrib/bind9/bin/dnssec/dnssec-signzone.html stable/9/contrib/bind9/bin/dnssec/dnssectool.c stable/9/contrib/bind9/bin/named/Makefile.in stable/9/contrib/bind9/bin/named/bind9.ver3.xsl stable/9/contrib/bind9/bin/named/bind9.ver3.xsl.h stable/9/contrib/bind9/bin/named/builtin.c stable/9/contrib/bind9/bin/named/client.c stable/9/contrib/bind9/bin/named/config.c stable/9/contrib/bind9/bin/named/control.c stable/9/contrib/bind9/bin/named/controlconf.c stable/9/contrib/bind9/bin/named/include/named/globals.h stable/9/contrib/bind9/bin/named/include/named/main.h stable/9/contrib/bind9/bin/named/include/named/query.h stable/9/contrib/bind9/bin/named/include/named/server.h stable/9/contrib/bind9/bin/named/interfacemgr.c stable/9/contrib/bind9/bin/named/logconf.c stable/9/contrib/bind9/bin/named/lwaddr.c stable/9/contrib/bind9/bin/named/lwdgnba.c stable/9/contrib/bind9/bin/named/lwdgrbn.c stable/9/contrib/bind9/bin/named/main.c stable/9/contrib/bind9/bin/named/named.conf.5 stable/9/contrib/bind9/bin/named/named.conf.docbook stable/9/contrib/bind9/bin/named/named.conf.html stable/9/contrib/bind9/bin/named/query.c stable/9/contrib/bind9/bin/named/server.c stable/9/contrib/bind9/bin/named/statschannel.c stable/9/contrib/bind9/bin/named/unix/os.c stable/9/contrib/bind9/bin/named/update.c stable/9/contrib/bind9/bin/named/zoneconf.c stable/9/contrib/bind9/bin/nsupdate/Makefile.in stable/9/contrib/bind9/bin/nsupdate/nsupdate.c stable/9/contrib/bind9/bin/rndc/rndc.8 stable/9/contrib/bind9/bin/rndc/rndc.c stable/9/contrib/bind9/bin/rndc/rndc.docbook stable/9/contrib/bind9/bin/rndc/rndc.html stable/9/contrib/bind9/config.guess stable/9/contrib/bind9/config.h.in stable/9/contrib/bind9/config.sub stable/9/contrib/bind9/configure.in stable/9/contrib/bind9/doc/arm/Bv9ARM-book.xml stable/9/contrib/bind9/doc/arm/Bv9ARM.ch03.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch04.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch05.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch06.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch07.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch08.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch09.html stable/9/contrib/bind9/doc/arm/Bv9ARM.html stable/9/contrib/bind9/doc/arm/Bv9ARM.pdf stable/9/contrib/bind9/doc/arm/man.arpaname.html stable/9/contrib/bind9/doc/arm/man.ddns-confgen.html stable/9/contrib/bind9/doc/arm/man.dig.html stable/9/contrib/bind9/doc/arm/man.dnssec-dsfromkey.html stable/9/contrib/bind9/doc/arm/man.dnssec-keyfromlabel.html stable/9/contrib/bind9/doc/arm/man.dnssec-keygen.html stable/9/contrib/bind9/doc/arm/man.dnssec-revoke.html stable/9/contrib/bind9/doc/arm/man.dnssec-settime.html stable/9/contrib/bind9/doc/arm/man.dnssec-signzone.html stable/9/contrib/bind9/doc/arm/man.dnssec-verify.html stable/9/contrib/bind9/doc/arm/man.genrandom.html stable/9/contrib/bind9/doc/arm/man.host.html stable/9/contrib/bind9/doc/arm/man.isc-hmac-fixup.html stable/9/contrib/bind9/doc/arm/man.named-checkconf.html stable/9/contrib/bind9/doc/arm/man.named-checkzone.html stable/9/contrib/bind9/doc/arm/man.named-journalprint.html stable/9/contrib/bind9/doc/arm/man.named.html stable/9/contrib/bind9/doc/arm/man.nsec3hash.html stable/9/contrib/bind9/doc/arm/man.nsupdate.html stable/9/contrib/bind9/doc/arm/man.rndc-confgen.html stable/9/contrib/bind9/doc/arm/man.rndc.conf.html stable/9/contrib/bind9/doc/arm/man.rndc.html stable/9/contrib/bind9/doc/arm/pkcs11.xml stable/9/contrib/bind9/doc/misc/options stable/9/contrib/bind9/lib/bind9/api stable/9/contrib/bind9/lib/bind9/check.c stable/9/contrib/bind9/lib/dns/Makefile.in stable/9/contrib/bind9/lib/dns/acache.c stable/9/contrib/bind9/lib/dns/acl.c stable/9/contrib/bind9/lib/dns/adb.c stable/9/contrib/bind9/lib/dns/api stable/9/contrib/bind9/lib/dns/client.c stable/9/contrib/bind9/lib/dns/diff.c stable/9/contrib/bind9/lib/dns/dispatch.c stable/9/contrib/bind9/lib/dns/dns64.c stable/9/contrib/bind9/lib/dns/dnssec.c stable/9/contrib/bind9/lib/dns/dst_api.c stable/9/contrib/bind9/lib/dns/dst_internal.h stable/9/contrib/bind9/lib/dns/dst_parse.c stable/9/contrib/bind9/lib/dns/dst_result.c stable/9/contrib/bind9/lib/dns/gen.c stable/9/contrib/bind9/lib/dns/gssapi_link.c stable/9/contrib/bind9/lib/dns/gssapictx.c stable/9/contrib/bind9/lib/dns/hmac_link.c stable/9/contrib/bind9/lib/dns/include/dns/Makefile.in stable/9/contrib/bind9/lib/dns/include/dns/client.h stable/9/contrib/bind9/lib/dns/include/dns/dnssec.h stable/9/contrib/bind9/lib/dns/include/dns/log.h stable/9/contrib/bind9/lib/dns/include/dns/master.h stable/9/contrib/bind9/lib/dns/include/dns/masterdump.h stable/9/contrib/bind9/lib/dns/include/dns/message.h stable/9/contrib/bind9/lib/dns/include/dns/nsec3.h stable/9/contrib/bind9/lib/dns/include/dns/rdata.h stable/9/contrib/bind9/lib/dns/include/dns/view.h stable/9/contrib/bind9/lib/dns/include/dns/zone.h stable/9/contrib/bind9/lib/dns/include/dst/dst.h stable/9/contrib/bind9/lib/dns/include/dst/gssapi.h stable/9/contrib/bind9/lib/dns/journal.c stable/9/contrib/bind9/lib/dns/keydata.c stable/9/contrib/bind9/lib/dns/log.c stable/9/contrib/bind9/lib/dns/master.c stable/9/contrib/bind9/lib/dns/masterdump.c stable/9/contrib/bind9/lib/dns/message.c stable/9/contrib/bind9/lib/dns/name.c stable/9/contrib/bind9/lib/dns/nsec.c stable/9/contrib/bind9/lib/dns/nsec3.c stable/9/contrib/bind9/lib/dns/openssldh_link.c stable/9/contrib/bind9/lib/dns/openssldsa_link.c stable/9/contrib/bind9/lib/dns/opensslecdsa_link.c stable/9/contrib/bind9/lib/dns/opensslgost_link.c stable/9/contrib/bind9/lib/dns/opensslrsa_link.c stable/9/contrib/bind9/lib/dns/portlist.c stable/9/contrib/bind9/lib/dns/rbt.c stable/9/contrib/bind9/lib/dns/rbtdb.c stable/9/contrib/bind9/lib/dns/rcode.c stable/9/contrib/bind9/lib/dns/rdata.c stable/9/contrib/bind9/lib/dns/rdata/ch_3/a_1.c stable/9/contrib/bind9/lib/dns/rdata/generic/afsdb_18.c stable/9/contrib/bind9/lib/dns/rdata/generic/dnskey_48.c stable/9/contrib/bind9/lib/dns/rdata/generic/eui48_108.c stable/9/contrib/bind9/lib/dns/rdata/generic/eui64_109.c stable/9/contrib/bind9/lib/dns/rdata/generic/hip_55.c stable/9/contrib/bind9/lib/dns/rdata/generic/ipseckey_45.c stable/9/contrib/bind9/lib/dns/rdata/generic/isdn_20.c stable/9/contrib/bind9/lib/dns/rdata/generic/key_25.c stable/9/contrib/bind9/lib/dns/rdata/generic/keydata_65533.c stable/9/contrib/bind9/lib/dns/rdata/generic/l32_105.c stable/9/contrib/bind9/lib/dns/rdata/generic/l64_106.c stable/9/contrib/bind9/lib/dns/rdata/generic/nid_104.c stable/9/contrib/bind9/lib/dns/rdata/generic/opt_41.c stable/9/contrib/bind9/lib/dns/rdata/generic/rrsig_46.c stable/9/contrib/bind9/lib/dns/rdata/generic/rt_21.c stable/9/contrib/bind9/lib/dns/rdata/generic/soa_6.c stable/9/contrib/bind9/lib/dns/rdata/generic/spf_99.c stable/9/contrib/bind9/lib/dns/rdata/generic/txt_16.c stable/9/contrib/bind9/lib/dns/rdata/hs_4/a_1.c stable/9/contrib/bind9/lib/dns/rdata/in_1/a6_38.c stable/9/contrib/bind9/lib/dns/rdata/in_1/a_1.c stable/9/contrib/bind9/lib/dns/rdata/in_1/aaaa_28.c stable/9/contrib/bind9/lib/dns/rdata/in_1/apl_42.c stable/9/contrib/bind9/lib/dns/rdata/in_1/wks_11.c stable/9/contrib/bind9/lib/dns/rdataslab.c stable/9/contrib/bind9/lib/dns/resolver.c stable/9/contrib/bind9/lib/dns/rootns.c stable/9/contrib/bind9/lib/dns/rpz.c stable/9/contrib/bind9/lib/dns/spnego.c stable/9/contrib/bind9/lib/dns/spnego_asn1.c stable/9/contrib/bind9/lib/dns/ssu.c stable/9/contrib/bind9/lib/dns/ssu_external.c stable/9/contrib/bind9/lib/dns/time.c stable/9/contrib/bind9/lib/dns/tkey.c stable/9/contrib/bind9/lib/dns/tsig.c stable/9/contrib/bind9/lib/dns/ttl.c stable/9/contrib/bind9/lib/dns/update.c stable/9/contrib/bind9/lib/dns/validator.c stable/9/contrib/bind9/lib/dns/view.c stable/9/contrib/bind9/lib/dns/xfrin.c stable/9/contrib/bind9/lib/dns/zone.c stable/9/contrib/bind9/lib/export/isc/Makefile.in stable/9/contrib/bind9/lib/export/samples/nsprobe.c stable/9/contrib/bind9/lib/export/samples/sample-request.c stable/9/contrib/bind9/lib/export/samples/sample-update.c stable/9/contrib/bind9/lib/export/samples/sample.c stable/9/contrib/bind9/lib/irs/Makefile.in stable/9/contrib/bind9/lib/irs/api stable/9/contrib/bind9/lib/irs/getaddrinfo.c stable/9/contrib/bind9/lib/irs/include/irs/Makefile.in stable/9/contrib/bind9/lib/irs/include/irs/resconf.h stable/9/contrib/bind9/lib/irs/resconf.c stable/9/contrib/bind9/lib/isc/Makefile.in stable/9/contrib/bind9/lib/isc/api stable/9/contrib/bind9/lib/isc/app_api.c stable/9/contrib/bind9/lib/isc/backtrace.c stable/9/contrib/bind9/lib/isc/base32.c stable/9/contrib/bind9/lib/isc/base64.c stable/9/contrib/bind9/lib/isc/buffer.c stable/9/contrib/bind9/lib/isc/commandline.c stable/9/contrib/bind9/lib/isc/hash.c stable/9/contrib/bind9/lib/isc/heap.c stable/9/contrib/bind9/lib/isc/hex.c stable/9/contrib/bind9/lib/isc/hmacmd5.c stable/9/contrib/bind9/lib/isc/hmacsha.c stable/9/contrib/bind9/lib/isc/httpd.c stable/9/contrib/bind9/lib/isc/include/isc/Makefile.in stable/9/contrib/bind9/lib/isc/include/isc/app.h stable/9/contrib/bind9/lib/isc/include/isc/buffer.h stable/9/contrib/bind9/lib/isc/include/isc/file.h stable/9/contrib/bind9/lib/isc/include/isc/hash.h stable/9/contrib/bind9/lib/isc/include/isc/httpd.h stable/9/contrib/bind9/lib/isc/include/isc/namespace.h stable/9/contrib/bind9/lib/isc/include/isc/platform.h.in stable/9/contrib/bind9/lib/isc/include/isc/radix.h stable/9/contrib/bind9/lib/isc/include/isc/socket.h stable/9/contrib/bind9/lib/isc/include/isc/stdio.h stable/9/contrib/bind9/lib/isc/include/isc/string.h stable/9/contrib/bind9/lib/isc/include/isc/types.h stable/9/contrib/bind9/lib/isc/inet_aton.c stable/9/contrib/bind9/lib/isc/inet_pton.c stable/9/contrib/bind9/lib/isc/lex.c stable/9/contrib/bind9/lib/isc/log.c stable/9/contrib/bind9/lib/isc/md5.c stable/9/contrib/bind9/lib/isc/mem.c stable/9/contrib/bind9/lib/isc/netaddr.c stable/9/contrib/bind9/lib/isc/nothreads/include/isc/thread.h stable/9/contrib/bind9/lib/isc/pthreads/include/isc/thread.h stable/9/contrib/bind9/lib/isc/pthreads/thread.c stable/9/contrib/bind9/lib/isc/radix.c stable/9/contrib/bind9/lib/isc/random.c stable/9/contrib/bind9/lib/isc/sha1.c stable/9/contrib/bind9/lib/isc/sha2.c stable/9/contrib/bind9/lib/isc/sockaddr.c stable/9/contrib/bind9/lib/isc/stats.c stable/9/contrib/bind9/lib/isc/string.c stable/9/contrib/bind9/lib/isc/strtoul.c stable/9/contrib/bind9/lib/isc/unix/app.c stable/9/contrib/bind9/lib/isc/unix/file.c stable/9/contrib/bind9/lib/isc/unix/ifiter_getifaddrs.c stable/9/contrib/bind9/lib/isc/unix/ifiter_ioctl.c stable/9/contrib/bind9/lib/isc/unix/ifiter_sysctl.c stable/9/contrib/bind9/lib/isc/unix/include/isc/Makefile.in stable/9/contrib/bind9/lib/isc/unix/include/isc/time.h stable/9/contrib/bind9/lib/isc/unix/interfaceiter.c stable/9/contrib/bind9/lib/isc/unix/socket.c stable/9/contrib/bind9/lib/isc/unix/stdio.c stable/9/contrib/bind9/lib/isc/unix/time.c stable/9/contrib/bind9/lib/isccc/api stable/9/contrib/bind9/lib/isccc/base64.c stable/9/contrib/bind9/lib/isccc/cc.c stable/9/contrib/bind9/lib/isccc/include/isccc/util.h stable/9/contrib/bind9/lib/isccc/sexpr.c stable/9/contrib/bind9/lib/isccfg/api stable/9/contrib/bind9/lib/isccfg/include/isccfg/cfg.h stable/9/contrib/bind9/lib/isccfg/include/isccfg/grammar.h stable/9/contrib/bind9/lib/isccfg/namedconf.c stable/9/contrib/bind9/lib/isccfg/parser.c stable/9/contrib/bind9/lib/lwres/api stable/9/contrib/bind9/lib/lwres/context.c stable/9/contrib/bind9/lib/lwres/getaddrinfo.c stable/9/contrib/bind9/lib/lwres/gethost.c stable/9/contrib/bind9/lib/lwres/getipnode.c stable/9/contrib/bind9/lib/lwres/getrrset.c stable/9/contrib/bind9/lib/lwres/herror.c stable/9/contrib/bind9/lib/lwres/lwbuffer.c stable/9/contrib/bind9/lib/lwres/lwconfig.c stable/9/contrib/bind9/lib/lwres/lwinetaton.c stable/9/contrib/bind9/lib/lwres/lwinetpton.c stable/9/contrib/bind9/lib/lwres/lwres_gabn.c stable/9/contrib/bind9/lib/lwres/lwres_gnba.c stable/9/contrib/bind9/lib/lwres/lwres_grbn.c stable/9/contrib/bind9/lib/lwres/lwres_noop.c stable/9/contrib/bind9/lib/lwres/lwresutil.c stable/9/contrib/bind9/lib/lwres/strtoul.c stable/9/contrib/bind9/make/mkdep.in stable/9/contrib/bind9/version stable/9/lib/bind/config.h stable/9/lib/bind/dns/Makefile stable/9/lib/bind/dns/code.h stable/9/lib/bind/dns/dns/enumclass.h stable/9/lib/bind/dns/dns/enumtype.h stable/9/lib/bind/dns/dns/rdatastruct.h stable/9/lib/bind/isc/Makefile stable/9/lib/bind/isc/isc/platform.h stable/9/usr.sbin/named/Makefile Directory Properties: stable/9/contrib/bind9/ (props changed) Modified: stable/9/contrib/bind9/CHANGES ============================================================================== --- stable/9/contrib/bind9/CHANGES Mon Mar 3 08:01:36 2014 (r262705) +++ stable/9/contrib/bind9/CHANGES Mon Mar 3 09:18:19 2014 (r262706) @@ -1,13 +1,395 @@ - --- 9.9.3-P2 released --- + --- 9.9.5 released --- + + --- 9.9.5rc2 released --- + +3710. [bug] Address double dns_zone_detach when switching to + using automatic empty zones from regular zones. + [RT #35177] + +3709. [port] Use built-in versions of strptime() and timegm() + on all platforms to avoid portability issues. + [RT #35183] + +3708. [bug] Address a portentry locking issue in dispatch.c. + [RT #35128] + +3707. [bug] irs_resconf_load now returns ISC_R_FILENOTFOUND + on a missing resolv.conf file and initializes the + structure as if it had been configured with: + + nameserver ::1 + nameserver 127.0.0.1 + + Note: Callers will need to be updated to treat + ISC_R_FILENOTFOUND as a qualified success or else + they will leak memory. The following code fragment + will work with both old and new versions without + changing the behaviour of the existing code. + + resconf = NULL; + result = irs_resconf_load(mctx, "/etc/resolv.conf", + &resconf); + if (result != ISC_SUCCESS) { + if (resconf != NULL) + irs_resconf_destroy(&resconf); + .... + } + + [RT #35194] + +3706. [contrib] queryperf: Fixed a possible integer overflow when + printing results. [RT #35182] + +3704. [protocol] Accept integer timestamps in RRSIG records. [RT #35185] + + --- 9.9.5rc1 released --- + +3701. [func] named-checkconf can now obscure shared secrets + when printing by specifying '-x'. [RT #34465] + +3699. [bug] Improvements to statistics channel XSL stylesheet: + the stylesheet can now be cached by the browser; + section headers are omitted from the stats display + when there is no data in those sections to be + displayed; counters are now right-justified for + easier readability. (Only available with + configure --enable-newstats.) [RT #35117] + +3698. [cleanup] Replaced all uses of memcpy() with memmove(). + [RT #35120] + +3697. [bug] Handle "." as a search list element when IDN support + is enabled. [RT #35133] + +3696. [bug] dig failed to handle AXFR style IXFR responses which + span multiple messages. [RT #35137] + +3695. [bug] Address a possible race in dispatch.c. [RT #35107] + +3694. [bug] Warn when a key-directory is configured for a zone, + but does not exist or is not a directory. [RT #35108] + +3693. [security] memcpy was incorrectly called with overlapping + ranges resulting in malformed names being generated + on some platforms. This could cause INSIST failures + when serving NSEC3 signed zones (CVE-2014-0591). + [RT #35120] + +3692. [bug] Two calls to dns_db_getoriginnode were fatal if there + was no data at the node. [RT #35080] + +3690. [bug] Iterative responses could be missed when the source + port for an upstream query was the same as the + listener port (53). [RT #34925] + +3689. [bug] Fixed a bug causing an insecure delegation from one + static-stub zone to another to fail with a broken + trust chain. [RT #35081] + + --- 9.9.5b1 released --- + +3688. [bug] loadnode could return a freed node on out of memory. + [RT #35106] + +3687. [bug] Address null pointer dereference in zone_xfrdone. + [RT #35042] + +3686. [func] "dnssec-signzone -Q" drops signatures from keys + that are still published but no longer active. + [RT #34990] + +3685. [bug] "rndc refresh" didn't work correctly with slave + zones using inline-signing. [RT #35105] + +3683. [cleanup] Add a more detailed "not found" message to rndc + commands which specify a zone name. [RT #35059] + +3682. [bug] Correct the behavior of rndc retransfer to allow + inline-signing slave zones to retain NSEC3 parameters + instead of reverting to NSEC. [RT #34745] + +3681. [port] Update the Windows build system to support feature + selection and WIN64 builds. This is a work in + progress. [RT #34160] + +3679. [bug] dig could fail to clean up TCP sockets still + waiting on connect(). [RT #35074] + +3678. [port] Update config.guess and config.sub. [RT #35060] + +3677. [bug] 'nsupdate' leaked memory if 'realm' was used multiple + times. [RT #35073] + +3676. [bug] "named-checkconf -z" now checks zones of type + hint and redirect as well as master. [RT #35046] + +3675. [misc] Provide a place for third parties to add version + information for their extensions in the version + file by setting the EXTENSIONS variable. + +3674. [bug] RPZ zeroed ttls if the query type was '*'. [RT #35026] + +3672. [func] Local address can now be specified when using + dns_client API. [RT #34811] + +3671. [bug] Don't allow dnssec-importkey overwrite a existing + non-imported private key. + +3670. [bug] Address read after free in server side of + lwres_getrrsetbyname. [RT #29075] + +3669. [port] freebsd: --with-gssapi needs -lhx509. [RT #35001] + +3668. [bug] Fix cast in lex.c which could see 0xff treated as eof. + [RT #34993] + +3667. [test] dig: add support to keep the TCP socket open between + successive queries (+[no]keepopen). [RT #34918] + +3665. [bug] Failure to release lock on error in receive_secure_db. + [RT #34944] + +3664. [bug] Updated OpenSSL PKCS#11 patches to fix active list + locking and other bugs. [RT #34855] + +3663. [bug] Address bugs in dns_rdata_fromstruct and + dns_rdata_tostruct for WKS and ISDN types. [RT #34910] + +3662. [bug] 'host' could die if a UDP query timed out. [RT #34870] + +3661. [bug] Address lock order reversal deadlock with inline zones. + [RT #34856] + +3660. [cleanup] Changed the name of "isc-config.sh" to "bind9-config". + [RT #23825] + +3659. [port] solaris: don't add explict dependancies/rules for + python programs as make won't use the implicit rules. + [RT #34835] + +3658. [port] linux: Address platform specific compilation issue + when libcap-devel is installed. [RT #34838] + +3657. [port] Some readline clones don't accept NULL pointers when + calling add_history. [RT #34842] + +3656. [security] Treat an all zero netmask as invalid when generating + the localnets acl. (The prior behavior could + allow unexpected matches when using some versions + of Winsock: CVE-2013-6320.) [RT #34687] + +3655. [cleanup] Simplify TCP message processing when requesting a + zone transfer. [RT #34825] + +3654. [bug] Address race condition with manual notify requests. + [RT #34806] + +3653. [func] Create delegations for all "children" of empty zones + except "forward first". [RT #34826] + +3651. [tuning] Adjust when a master server is deemed unreachable. + [RT #27075] + +3650. [tuning] Use separate rate limiting queues for refresh and + notify requests. [RT #30589] + +3649. [cleanup] Include a comment in .nzf files, giving the name of + the associated view. [RT #34765] + +3648. [test] Updated the ATF test framework to version 0.17. + [RT #25627] + +3647. [bug] Address a race condition when shutting down a zone. + [RT #34750] + +3646. [bug] Journal filename string could be set incorrectly, + causing garbage in log messages. [RT #34738] + +3645. [protocol] Use case sensitive compression when responding to + queries. [RT #34737] + +3644. [protocol] Check that EDNS subnet client options are well formed. + [RT #34718] + +3642. [func] Allow externally generated DNSKEY to be imported + into the DNSKEY management framework. A new tool + dnssec-importkey is used to do this. [RT #34698] + +3641. [bug] Handle changes to sig-validity-interval settings + better. [RT #34625] + +3640. [bug] ndots was not being checked when searching. Only + continue searching on NXDOMAIN responses. Add the + ability to specify ndots to nslookup. [RT #34711] + +3639. [bug] Treat type 65533 (KEYDATA) as opaque except when used + in a key zone. [RT #34238] + + --- 9.9.4 released --- + +3643. [doc] Clarify RRL "slip" documentation. + +3638. [cleanup] Add the ability to handle ENOPROTOOPT in case it is + encountered. [RT #34668] + + --- 9.9.4rc2 released --- + +3637. [bug] 'allow-query-on' was checking the source address + rather than the destination address. [RT #34590] + +3636. [bug] Automatic empty zones now behave better with + forward only "zones" beneath them. [RT #34583] + +3635. [bug] Signatures were not being removed from a zone with + only KSK keys for a algorithm. [RT #34439] + +3634. [func] Report build-id in rndc status. Report build-id + when building from a git repository. [RT #20422] + +3633. [cleanup] Refactor OPT processing in named to make it easier + to support new EDNS options. [RT #34414] + +3632. [bug] Signature from newly inactive keys were not being + removed. [RT #32178] + +3631. [bug] Remove spurious warning about missing signatures when + qtype is SIG. [RT #34600] + +3630. [bug] Ensure correct ID computation for MD5 keys. [RT #33033] + +3627. [bug] RPZ changes were not effective on slaves. [RT #34450] + +3625. [bug] Don't send notify messages to machines outside of the + test setup. + +3623. [bug] zone-statistics was only effective in new statistics. + [RT #34466] + + --- 9.9.4rc1 released --- 3621. [security] Incorrect bounds checking on private type 'keydata' can lead to a remotely triggerable REQUIRE failure (CVE-2013-4854). [RT #34238] - --- 9.9.3-P1 released --- +3617. [bug] Named was failing to answer queries during + "rndc reload" [RT #34098] + +3616. [bug] Change #3613 was incomplete. [RT #34177] + +3615. [cleanup] "configure" now finishes by printing a summary + of optional BIND features and whether they are + active or inactive. ("configure --enable-full-report" + increases the verbosity of the summary.) [RT #31777] + +3614. [port] Check for . [RT #34162] + +3613. [bug] named could crash when deleting inline-signing + zones with "rndc delzone". [RT #34066] + +3611. [bug] Improved resistance to a theoretical authentication + attack based on differential timing. [RT #33939] + +3610. [cleanup] win32: Some executables had been omitted from the + installer. [RT #34116] + +3608. [port] win32: added todos.pl script to ensure all text files + the win32 build depends on are converted to DOS + newline format. [RT #22067] + +3607. [bug] dnssec-keygen had broken 'Invalid keyfile' error + message. [RT #34045] + + --- 9.9.4b1 released --- + +3605. [port] win32: Addressed several compatibility issues + with newer versions of Visual Studio. [RT #33916] + +3603. [bug] Install . [RT #33956] + +3601. [bug] Added to PKCS#11 openssl patches a value len + attribute in DH derive key. [RT #33928] + +3600. [cleanup] dig: Fixed a typo in the warning output when receiving + an oversized response. [RT #33910] + +3599. [tuning] Check for pointer equivalence in name comparisons. + [RT #18125] + +3596. [port] Updated win32 build documentation, added + dnssec-verify. [RT #22067] + +3594. [maint] Update config.guess and config.sub. [RT #33816] + +3592. [doc] Moved documentation of rndc command options to the + rndc man page. [RT #33506] + +3590. [bug] When using RRL on recursive servers, defer + rate-limiting until after recursion is complete; + also, use correct rcode for slipped NXDOMAIN + responses. [RT #33604] + +3588. [bug] dig: addressed a memory leak in the sigchase code + that could cause a shutdown crash. [RT #33733] + +3587. [func] 'named -g' now checks the logging configuration but + does not use it. [RT #33473] + +3586. [bug] Handle errors in xmlDocDumpFormatMemoryEnc. [RT #33706] 3584. [security] Caching data from an incompletely signed zone could - trigger an assertion failure in resolver.c [RT #33690] + trigger an assertion failure in resolver.c + (CVE-2013-3919). [RT #33690] + +3583. [bug] Address memory leak in GSS-API processing [RT #33574] + +3582. [bug] Silence false positive warning regarding missing file + directive for inline slave zones. [RT #33662] + +3581. [bug] Changed the tcp-listen-queue default to 10. [RT #33029] + +3580. [bug] Addressed a possible race in acache.c [RT #33602] + +3579. [maint] Updates to PKCS#11 openssl patches, supporting + versions 0.9.8y, 1.0.0k, 1.0.1e [RT #33463] + +3578. [bug] 'rndc -c file' now fails if 'file' does not exist. + [RT #33571] + +3577. [bug] Handle zero TTL values better. [RT #33411] + +3576. [bug] Address a shutdown race when validating. [RT #33573] + +3575. [func] Changed the logging category for RRL events from + 'queries' to 'query-errors'. [RT #33540] + +3574. [doc] The 'hostname' keyword was missing from server-id + description in the named.conf man page. [RT #33476] + +3573. [bug] "rndc addzone" and "rndc delzone" incorrectly handled + zone names containing punctuation marks and other + nonstandard characters. [RT #33419] + +3571. [bug] Address race condition in dns_client_startresolve(). + [RT #33234] + +3566. [func] Log when forwarding updates to master. [RT #33240] + +3554. [bug] RRL failed to correctly rate-limit upward + referrals and failed to count dropped error + responses in the statistics. [RT #33225] + +3545. [bug] RRL slip behavior was incorrect when set to 1. + [RT #33111] + +3518. [bug] Increase the size of dns_rrl_key.s.rtype by one bit + so that all dns_rrl_rtype_t enum values fit regardless + of whether it is teated as signed or unsigned by + the compiler. [RT #32792] + +3494. [func] DNS RRL: Blunt the impact of DNS reflection and + amplification attacks by rate-limiting substantially- + identical responses. To enable, use "configure + --enable-rrl". [RT #28130] --- 9.9.3 released --- Modified: stable/9/contrib/bind9/COPYRIGHT ============================================================================== --- stable/9/contrib/bind9/COPYRIGHT Mon Mar 3 08:01:36 2014 (r262705) +++ stable/9/contrib/bind9/COPYRIGHT Mon Mar 3 09:18:19 2014 (r262706) @@ -1,4 +1,4 @@ -Copyright (C) 2004-2013 Internet Systems Consortium, Inc. ("ISC") +Copyright (C) 2004-2014 Internet Systems Consortium, Inc. ("ISC") Copyright (C) 1996-2003 Internet Software Consortium. Permission to use, copy, modify, and/or distribute this software for any @@ -13,8 +13,6 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -$Id: COPYRIGHT,v 1.19 2012/01/03 23:46:59 tbox Exp $ - Portions of this code release fall under one or more of the following Copyright notices. Please see individual source files for details. @@ -99,11 +97,7 @@ are met: 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. -3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed by the University of - California, Berkeley and its contributors. -4. Neither the name of the University nor the names of its contributors +3. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. @@ -516,3 +510,29 @@ STRICT LIABILITY, OR TORT (INCLUDING NEG ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- + +Copyright (c) 1995, 1997, 1998 The NetBSD Foundation, Inc. +All rights reserved. + +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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. + Modified: stable/9/contrib/bind9/Makefile.in ============================================================================== --- stable/9/contrib/bind9/Makefile.in Mon Mar 3 08:01:36 2014 (r262705) +++ stable/9/contrib/bind9/Makefile.in Mon Mar 3 09:18:19 2014 (r262706) @@ -1,4 +1,4 @@ -# Copyright (C) 2004-2009, 2011-2013 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2004-2009, 2011-2014 Internet Systems Consortium, Inc. ("ISC") # Copyright (C) 1998-2002 Internet Software Consortium. # # Permission to use, copy, modify, and/or distribute this software for any @@ -54,7 +54,11 @@ installdirs: install:: isc-config.sh installdirs ${INSTALL_SCRIPT} isc-config.sh ${DESTDIR}${bindir} + rm -f ${DESTDIR}${bindir}/bind9-config + @LN@ ${DESTDIR}${bindir}/isc-config.sh ${DESTDIR}${bindir}/bind9-config ${INSTALL_DATA} ${top_srcdir}/isc-config.sh.1 ${DESTDIR}${mandir}/man1 + rm -f ${DESTDIR}${mandir}/man1/bind9-config.1 + @LN@ ${DESTDIR}${mandir}/man1/isc-config.sh.1 ${DESTDIR}${mandir}/man1/bind9-config.1 ${INSTALL_DATA} ${top_srcdir}/bind.keys ${DESTDIR}${sysconfdir} tags: @@ -86,5 +90,8 @@ FAQ: FAQ.xml LC_ALL=C ${W3M} -T text/html -dump -cols 72 >$@.tmp mv $@.tmp $@ +unit:: + sh ${top_srcdir}/unit/unittest.sh + clean:: rm -f FAQ.tmp Modified: stable/9/contrib/bind9/README ============================================================================== --- stable/9/contrib/bind9/README Mon Mar 3 08:01:36 2014 (r262705) +++ stable/9/contrib/bind9/README Mon Mar 3 09:18:19 2014 (r262706) @@ -48,8 +48,34 @@ BIND 9 For a detailed list of user-visible changes from previous releases, see the CHANGES file. - For up-to-date release notes and errata, see - http://www.isc.org/software/bind9/releasenotes + For up-to-date release notes and errata, see + http://www.isc.org/software/bind9/releasenotes + +BIND 9.9.5 + + BIND 9.9.5 is a maintenance release, and patches the security + flaws described in CVE-2013-6320 and CVE-2014-0591. It also + includes the following functional enhancements: + + - "named" now preserves the capitalization of names when + responding to queries. + - new "dnssec-importkey" command allows the use of offline + DNSSEC keys with automatic DNSKEY management. + - When re-signing a zone, the new "dnssec-signzone -Q" option + drops signatures from keys that are still published but are + no longer active. + - "named-checkconf -px" will print the contents of configuration + files with the shared secrets obscured, making it easier to + share configuration (e.g. when submitting a bug report) + without revealing private information. + +BIND 9.9.4 + + BIND 9.9.4 is a maintenance release, and patches the security + flaws described in CVE-2013-3919 and CVE-2013-4854. It also + introduces DNS Response Rate Limiting (DNS RRL) as a + compile-time option. To use this feature, configure with + the "--enable-rrl" option. BIND 9.9.3 @@ -70,45 +96,45 @@ BIND 9.9.0 BIND 9.9.0 includes a number of changes from BIND 9.8 and earlier releases. New features include: - - Inline signing, allowing automatic DNSSEC signing of - master zones without modification of the zonefile, or - "bump in the wire" signing in slaves. - - NXDOMAIN redirection. - - New 'rndc flushtree' command clears all data under a given - name from the DNS cache. - - New 'rndc sync' command dumps pending changes in a dynamic - zone to disk without a freeze/thaw cycle. - - New 'rndc signing' command displays or clears signing status - records in 'auto-dnssec' zones. - - NSEC3 parameters for 'auto-dnssec' zones can now be set prior - to signing, eliminating the need to initially sign with NSEC. - - Startup time improvements on large authoritative servers. - - Slave zones are now saved in raw format by default. - - Several improvements to response policy zones (RPZ). - - Improved hardware scalability by using multiple threads - to listen for queries and using finer-grained client locking - - The 'also-notify' option now takes the same syntax as - 'masters', so it can used named masterlists and TSIG keys. - - 'dnssec-signzone -D' writes an output file containing only DNSSEC - data, which can be included by the primary zone file. - - 'dnssec-signzone -R' forces removal of signatures that are - not expired but were created by a key which no longer exists. - - 'dnssec-signzone -X' allows a separate expiration date to - be specified for DNSKEY signatures from other signatures. - - New '-L' option to dnssec-keygen, dnssec-settime, and - dnssec-keyfromlabel sets the default TTL for the key. - - dnssec-dsfromkey now supports reading from standard input, - to make it easier to convert DNSKEY to DS. - - RFC 1918 reverse zones have been added to the empty-zones - table per RFC 6303. - - Dynamic updates can now optionally set the zone's SOA serial - number to the current UNIX time. - - DLZ modules can now retrieve the source IP address of - the querying client. - - 'request-ixfr' option can now be set at the per-zone level. - - 'dig +rrcomments' turns on comments about DNSKEY records, - indicating their key ID, algorithm and function - - Simplified nsupdate syntax and added readline support + - Inline signing, allowing automatic DNSSEC signing of + master zones without modification of the zonefile, or + "bump in the wire" signing in slaves. + - NXDOMAIN redirection. + - New 'rndc flushtree' command clears all data under a given + name from the DNS cache. + - New 'rndc sync' command dumps pending changes in a dynamic + zone to disk without a freeze/thaw cycle. + - New 'rndc signing' command displays or clears signing status + records in 'auto-dnssec' zones. + - NSEC3 parameters for 'auto-dnssec' zones can now be set prior + to signing, eliminating the need to initially sign with NSEC. + - Startup time improvements on large authoritative servers. + - Slave zones are now saved in raw format by default. + - Several improvements to response policy zones (RPZ). + - Improved hardware scalability by using multiple threads + to listen for queries and using finer-grained client locking + - The 'also-notify' option now takes the same syntax as + 'masters', so it can used named masterlists and TSIG keys. + - 'dnssec-signzone -D' writes an output file containing only DNSSEC + data, which can be included by the primary zone file. + - 'dnssec-signzone -R' forces removal of signatures that are + not expired but were created by a key which no longer exists. + - 'dnssec-signzone -X' allows a separate expiration date to + be specified for DNSKEY signatures from other signatures. + - New '-L' option to dnssec-keygen, dnssec-settime, and + dnssec-keyfromlabel sets the default TTL for the key. + - dnssec-dsfromkey now supports reading from standard input, + to make it easier to convert DNSKEY to DS. + - RFC 1918 reverse zones have been added to the empty-zones + table per RFC 6303. + - Dynamic updates can now optionally set the zone's SOA serial + number to the current UNIX time. + - DLZ modules can now retrieve the source IP address of + the querying client. + - 'request-ixfr' option can now be set at the per-zone level. + - 'dig +rrcomments' turns on comments about DNSKEY records, + indicating their key ID, algorithm and function + - Simplified nsupdate syntax and added readline support Building @@ -128,9 +154,9 @@ Building Ubuntu 7.04, 7.10 Windows XP/2003/2008 - NOTE: As of BIND 9.5.1, 9.4.3, and 9.3.6, older versions of - Windows, including Windows NT and Windows 2000, are no longer - supported. + NOTE: As of BIND 9.5.1, 9.4.3, and 9.3.6, older versions of + Windows, including Windows NT and Windows 2000, are no longer + supported. We have recent reports from the user community that a supported version of BIND will build and run on the following systems: @@ -231,10 +257,10 @@ Building on the configure command line. The default is operating system dependent. - Support for the "fixed" rrset-order option can be enabled - or disabled by specifying "--enable-fixed-rrset" or - "--disable-fixed-rrset" on the configure command line. - The default is "disabled", to reduce memory footprint. + Support for the "fixed" rrset-order option can be enabled + or disabled by specifying "--enable-fixed-rrset" or + "--disable-fixed-rrset" on the configure command line. + The default is "disabled", to reduce memory footprint. If your operating system has integrated support for IPv6, it will be used automatically. If you have installed KAME IPv6 @@ -305,8 +331,8 @@ Documentation Frequently asked questions and their answers can be found in FAQ. - Additional information on various subjects can be found - in the other README files. + Additional information on various subjects can be found + in the other README files. Change Log @@ -337,10 +363,10 @@ Change Log [protocol] Updates to the DNS protocol such as new RR types - [test] Changes to the automatic tests, not - affecting server functionality + [test] Changes to the automatic tests, not + affecting server functionality - [cleanup] Minor corrections and refactoring + [cleanup] Minor corrections and refactoring [doc] Documentation Modified: stable/9/contrib/bind9/bin/check/named-checkconf.8 ============================================================================== --- stable/9/contrib/bind9/bin/check/named-checkconf.8 Mon Mar 3 08:01:36 2014 (r262705) +++ stable/9/contrib/bind9/bin/check/named-checkconf.8 Mon Mar 3 09:18:19 2014 (r262706) @@ -1,4 +1,4 @@ -.\" Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC") +.\" Copyright (C) 2004, 2005, 2007, 2009, 2014 Internet Systems Consortium, Inc. ("ISC") .\" Copyright (C) 2000-2002 Internet Software Consortium. .\" .\" Permission to use, copy, modify, and/or distribute this software for any @@ -33,7 +33,7 @@ named\-checkconf \- named configuration file syntax checking tool .SH "SYNOPSIS" .HP 16 -\fBnamed\-checkconf\fR [\fB\-h\fR] [\fB\-v\fR] [\fB\-j\fR] [\fB\-t\ \fR\fB\fIdirectory\fR\fR] {filename} [\fB\-p\fR] [\fB\-z\fR] +\fBnamed\-checkconf\fR [\fB\-h\fR] [\fB\-v\fR] [\fB\-j\fR] [\fB\-t\ \fR\fB\fIdirectory\fR\fR] {filename} [\fB\-p\fR] [\fB\-x\fR] [\fB\-z\fR] .SH "DESCRIPTION" .PP \fBnamed\-checkconf\fR @@ -84,6 +84,14 @@ Print out the and included files in canonical form if no errors were detected. .RE .PP +\-x +.RS 4 +When printing the configuration files in canonical form, obscure shared secrets by replacing them with strings of question marks ('?'). This allows the contents of +\fInamed.conf\fR +and related files to be shared \(em for example, when submitting bug reports \(em without compromising private data. This option cannot be used without +\fB\-p\fR. +.RE +.PP \-z .RS 4 Perform a test load of all master zones found in @@ -113,7 +121,7 @@ BIND 9 Administrator Reference Manual. .PP Internet Systems Consortium .SH "COPYRIGHT" -Copyright \(co 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC") +Copyright \(co 2004, 2005, 2007, 2009, 2014 Internet Systems Consortium, Inc. ("ISC") .br Copyright \(co 2000\-2002 Internet Software Consortium. .br Modified: stable/9/contrib/bind9/bin/check/named-checkconf.c ============================================================================== --- stable/9/contrib/bind9/bin/check/named-checkconf.c Mon Mar 3 08:01:36 2014 (r262705) +++ stable/9/contrib/bind9/bin/check/named-checkconf.c Mon Mar 3 09:18:19 2014 (r262706) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2007, 2009-2013 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2007, 2009-2014 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2002 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -39,10 +39,13 @@ #include +#include #include #include #include +#include #include +#include #include #include "check-tool.h" @@ -151,6 +154,30 @@ config_get(const cfg_obj_t **maps, const } } +static isc_result_t +configure_hint(const char *zfile, const char *zclass, isc_mem_t *mctx) { + isc_result_t result; + dns_db_t *db = NULL; + dns_rdataclass_t rdclass; + isc_textregion_t r; + + if (zfile == NULL) + return (ISC_R_FAILURE); + + DE_CONST(zclass, r.base); + r.length = strlen(zclass); + result = dns_rdataclass_fromtext(&rdclass, &r); + if (result != ISC_R_SUCCESS) + return (result); + + result = dns_rootns_create(mctx, rdclass, zfile, &db); + if (result != ISC_R_SUCCESS) + return (result); + + dns_db_detach(&db); + return (ISC_R_SUCCESS); +} + /*% configure the zone */ static isc_result_t configure_zone(const char *vclass, const char *view, @@ -161,7 +188,7 @@ configure_zone(const char *vclass, const isc_result_t result; const char *zclass; const char *zname; - const char *zfile; + const char *zfile = NULL; const cfg_obj_t *maps[4]; const cfg_obj_t *zoptions = NULL; const cfg_obj_t *classobj = NULL; @@ -195,15 +222,28 @@ configure_zone(const char *vclass, const cfg_map_get(zoptions, "type", &typeobj); if (typeobj == NULL) return (ISC_R_FAILURE); - if (strcasecmp(cfg_obj_asstring(typeobj), "master") != 0) + + cfg_map_get(zoptions, "file", &fileobj); + if (fileobj != NULL) + zfile = cfg_obj_asstring(fileobj); + + /* + * Check hints files for hint zones. + * Skip loading checks for any type other than + * master and redirect + */ + if (strcasecmp(cfg_obj_asstring(typeobj), "hint") == 0) + return (configure_hint(zfile, zclass, mctx)); + else if ((strcasecmp(cfg_obj_asstring(typeobj), "master") != 0) && + (strcasecmp(cfg_obj_asstring(typeobj), "redirect") != 0)) return (ISC_R_SUCCESS); + + if (zfile == NULL) + return (ISC_R_FAILURE); + cfg_map_get(zoptions, "database", &dbobj); if (dbobj != NULL) return (ISC_R_SUCCESS); - cfg_map_get(zoptions, "file", &fileobj); - if (fileobj == NULL) - return (ISC_R_FAILURE); - zfile = cfg_obj_asstring(fileobj); obj = NULL; if (get_maps(maps, "check-dup-records", &obj)) { @@ -341,7 +381,7 @@ configure_zone(const char *vclass, const if (result != ISC_R_SUCCESS) fprintf(stderr, "%s/%s/%s: %s\n", view, zname, zclass, dns_result_totext(result)); - return(result); + return (result); } /*% configure a view */ @@ -442,10 +482,11 @@ main(int argc, char **argv) { isc_entropy_t *ectx = NULL; isc_boolean_t load_zones = ISC_FALSE; isc_boolean_t print = ISC_FALSE; + unsigned int flags = 0; isc_commandline_errprint = ISC_FALSE; - while ((c = isc_commandline_parse(argc, argv, "dhjt:pvz")) != EOF) { + while ((c = isc_commandline_parse(argc, argv, "dhjt:pvxz")) != EOF) { switch (c) { case 'd': debug++; @@ -472,6 +513,10 @@ main(int argc, char **argv) { printf(VERSION "\n"); exit(0); + case 'x': + flags |= CFG_PRINTER_XKEY; + break; + case 'z': load_zones = ISC_TRUE; docheckmx = ISC_FALSE; @@ -494,6 +539,11 @@ main(int argc, char **argv) { } } + if (((flags & CFG_PRINTER_XKEY) != 0) && !print) { + fprintf(stderr, "%s: -x cannot be used without -p\n", program); + exit(1); + } + if (isc_commandline_index + 1 < argc) usage(); if (argv[isc_commandline_index] != NULL) @@ -534,7 +584,7 @@ main(int argc, char **argv) { } if (print && exit_status == 0) - cfg_print(config, output, NULL); + cfg_printx(config, flags, output, NULL); cfg_obj_destroy(parser, &config); cfg_parser_destroy(&parser); Modified: stable/9/contrib/bind9/bin/check/named-checkconf.docbook ============================================================================== --- stable/9/contrib/bind9/bin/check/named-checkconf.docbook Mon Mar 3 08:01:36 2014 (r262705) +++ stable/9/contrib/bind9/bin/check/named-checkconf.docbook Mon Mar 3 09:18:19 2014 (r262706) @@ -2,7 +2,7 @@ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" []> - + - + - + - + @@ -48,7 +48,7 @@ - + From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 15:15:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE140BC4; Fri, 21 Mar 2014 15:15:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C2FBC84B; Fri, 21 Mar 2014 15:15:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LFFbt5064897; Fri, 21 Mar 2014 15:15:37 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LFFVUb064861; Fri, 21 Mar 2014 15:15:31 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201403211515.s2LFFVUb064861@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 21 Mar 2014 15:15:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263478 - in stable/10: share/man/man9 sys/contrib/ipfilter/netinet sys/net sys/netatalk sys/netinet sys/netinet6 sys/netipx sys/netpfil/pf sys/nfs usr.bin/netstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 15:15:38 -0000 Author: glebius Date: Fri Mar 21 15:15:30 2014 New Revision: 263478 URL: http://svnweb.freebsd.org/changeset/base/263478 Log: Merge r262763, r262767, r262771, r262806 from head: - Remove rt_metrics_lite and simply put its members into rtentry. - Use counter(9) for rt_pksent (former rt_rmx.rmx_pksent). This removes another cache trashing ++ from packet forwarding path. - Create zini/fini methods for the rtentry UMA zone. Via initialize mutex and counter in them. - Fix reporting of rmx_pksent to routing socket. - Fix netstat(1) to report "Use" both in kvm(3) and sysctl(3) mode. Modified: stable/10/share/man/man9/rtentry.9 stable/10/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c stable/10/sys/net/if_disc.c stable/10/sys/net/if_faith.c stable/10/sys/net/if_loop.c stable/10/sys/net/if_stf.c stable/10/sys/net/radix_mpath.c stable/10/sys/net/route.c stable/10/sys/net/route.h stable/10/sys/net/rtsock.c stable/10/sys/netatalk/at_proto.c stable/10/sys/netatalk/ddp_output.c stable/10/sys/netinet/in_rmx.c stable/10/sys/netinet/ip_fastfwd.c stable/10/sys/netinet/ip_input.c stable/10/sys/netinet/ip_ipsec.c stable/10/sys/netinet/ip_output.c stable/10/sys/netinet/sctp_os_bsd.h stable/10/sys/netinet/tcp_output.c stable/10/sys/netinet/tcp_subr.c stable/10/sys/netinet6/in6_rmx.c stable/10/sys/netinet6/ip6_ipsec.c stable/10/sys/netinet6/ip6_output.c stable/10/sys/netipx/ipx_input.c stable/10/sys/netipx/ipx_outputfl.c stable/10/sys/netpfil/pf/pf.c stable/10/sys/nfs/bootp_subr.c stable/10/usr.bin/netstat/main.c stable/10/usr.bin/netstat/netstat.h stable/10/usr.bin/netstat/route.c Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man9/rtentry.9 ============================================================================== --- stable/10/share/man/man9/rtentry.9 Fri Mar 21 15:04:09 2014 (r263477) +++ stable/10/share/man/man9/rtentry.9 Fri Mar 21 15:15:30 2014 (r263478) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 11, 2008 +.Dd March 5, 2014 .Dt RTENTRY 9 .Os .Sh NAME @@ -78,6 +78,12 @@ intermediate stop on the way to that des flag is set). .It Vt "int rt_flags" ; See below. +If the +.Dv RTF_UP +flag is not present, the +.Fn rtfree +function will delete the route from the radix tree when the last +reference drops. .It Vt "int rt_refcnt" ; Route entries are reference-counted; this field indicates the number of external (to the radix tree) references. @@ -89,14 +95,14 @@ as it were, to the question posed by a r name the interface and interface address to be used in sending a packet to the destination or set of destinations which this route represents. -.It Vt "struct rt_metrics_lite rt_rmx" ; -See below. -If the -.Dv RTF_UP -flag is not present, the -.Fn rtfree -function will delete the route from the radix tree when the last -reference drops. +.It Vt "u_long rt_mtu"; +See description of rmx_mtu below. +.It Vt "u_long rt_weight"; +See description of rmx_weight below. +.It Vt "u_long rt_expire"; +See description of rmx_expire below. +.It Vt "counter64_t rt_pksent"; +See description of rmx_pksent below. .It Vt "struct rtentry *rt_gwroute" ; This member is a reference to a route whose destination is .Va rt_gateway . @@ -165,9 +171,7 @@ Indicates that the destination is a broa Indicates that the destination is a multicast address. .El .Pp -Every route has associated with it a set of metrics, stored in -.Vt "struct rt_metrics_lite" . -Metrics are supplied in +Several metrics are supplied in .Vt "struct rt_metrics" passed with routing control messages via .Xr route 4 @@ -176,8 +180,7 @@ Currently only .Vt rmx_mtu , rmx_expire , and .Vt rmx_pksent -metrics are used in -.Vt "struct rt_metrics_lite" . +metrics are supplied. All others are ignored. .Pp The following metrics are defined by Modified: stable/10/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c ============================================================================== --- stable/10/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Fri Mar 21 15:04:09 2014 (r263477) +++ stable/10/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Fri Mar 21 15:15:30 2014 (r263478) @@ -802,7 +802,7 @@ ipf_fastroute(m0, mpp, fin, fdp) if (ro->ro_rt->rt_flags & RTF_GATEWAY) dst = (struct sockaddr_in *)ro->ro_rt->rt_gateway; if (ro->ro_rt) - ro->ro_rt->rt_use++; + counter_u64_add(ro->ro_rt->rt_pksent, 1); /* * For input packets which are being "fastrouted", they won't Modified: stable/10/sys/net/if_disc.c ============================================================================== --- stable/10/sys/net/if_disc.c Fri Mar 21 15:04:09 2014 (r263477) +++ stable/10/sys/net/if_disc.c Fri Mar 21 15:15:30 2014 (r263478) @@ -185,7 +185,7 @@ static void discrtrequest(int cmd, struct rtentry *rt, struct rt_addrinfo *info) { RT_LOCK_ASSERT(rt); - rt->rt_rmx.rmx_mtu = DSMTU; + rt->rt_mtu = DSMTU; } /* Modified: stable/10/sys/net/if_faith.c ============================================================================== --- stable/10/sys/net/if_faith.c Fri Mar 21 15:04:09 2014 (r263477) +++ stable/10/sys/net/if_faith.c Fri Mar 21 15:15:30 2014 (r263478) @@ -245,7 +245,7 @@ faithrtrequest(cmd, rt, info) struct rt_addrinfo *info; { RT_LOCK_ASSERT(rt); - rt->rt_rmx.rmx_mtu = rt->rt_ifp->if_mtu; + rt->rt_mtu = rt->rt_ifp->if_mtu; } /* Modified: stable/10/sys/net/if_loop.c ============================================================================== --- stable/10/sys/net/if_loop.c Fri Mar 21 15:04:09 2014 (r263477) +++ stable/10/sys/net/if_loop.c Fri Mar 21 15:15:30 2014 (r263478) @@ -394,7 +394,7 @@ lortrequest(int cmd, struct rtentry *rt, { RT_LOCK_ASSERT(rt); - rt->rt_rmx.rmx_mtu = rt->rt_ifp->if_mtu; + rt->rt_mtu = rt->rt_ifp->if_mtu; } /* Modified: stable/10/sys/net/if_stf.c ============================================================================== --- stable/10/sys/net/if_stf.c Fri Mar 21 15:04:09 2014 (r263477) +++ stable/10/sys/net/if_stf.c Fri Mar 21 15:15:30 2014 (r263478) @@ -784,7 +784,7 @@ stf_rtrequest(cmd, rt, info) struct rt_addrinfo *info; { RT_LOCK_ASSERT(rt); - rt->rt_rmx.rmx_mtu = rt->rt_ifp->if_mtu; + rt->rt_mtu = rt->rt_ifp->if_mtu; } static int Modified: stable/10/sys/net/radix_mpath.c ============================================================================== --- stable/10/sys/net/radix_mpath.c Fri Mar 21 15:04:09 2014 (r263477) +++ stable/10/sys/net/radix_mpath.c Fri Mar 21 15:15:30 2014 (r263478) @@ -85,7 +85,7 @@ rn_mpath_count(struct radix_node *rn) while (rn != NULL) { rt = (struct rtentry *)rn; - i += rt->rt_rmx.rmx_weight; + i += rt->rt_weight; rn = rn_mpath_next(rn); } return (i); @@ -288,8 +288,8 @@ rtalloc_mpath_fib(struct route *ro, uint hash += hashjitter; hash %= n; for (weight = abs((int32_t)hash), rt = ro->ro_rt; - weight >= rt->rt_rmx.rmx_weight && rn; - weight -= rt->rt_rmx.rmx_weight) { + weight >= rt->rt_weight && rn; + weight -= rt->rt_weight) { /* stay within the multipath routes */ if (rn->rn_dupedkey && rn->rn_mask != rn->rn_dupedkey->rn_mask) Modified: stable/10/sys/net/route.c ============================================================================== --- stable/10/sys/net/route.c Fri Mar 21 15:04:09 2014 (r263477) +++ stable/10/sys/net/route.c Fri Mar 21 15:15:30 2014 (r263478) @@ -200,6 +200,48 @@ route_init(void) } SYSINIT(route_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, route_init, 0); +static int +rtentry_zinit(void *mem, int size, int how) +{ + struct rtentry *rt = mem; + + rt->rt_pksent = counter_u64_alloc(how); + if (rt->rt_pksent == NULL) + return (ENOMEM); + + RT_LOCK_INIT(rt); + + return (0); +} + +static void +rtentry_zfini(void *mem, int size) +{ + struct rtentry *rt = mem; + + RT_LOCK_DESTROY(rt); + counter_u64_free(rt->rt_pksent); +} + +static int +rtentry_ctor(void *mem, int size, void *arg, int how) +{ + struct rtentry *rt = mem; + + bzero(rt, offsetof(struct rtentry, rt_endzero)); + counter_u64_zero(rt->rt_pksent); + + return (0); +} + +static void +rtentry_dtor(void *mem, int size, void *arg) +{ + struct rtentry *rt = mem; + + RT_UNLOCK_COND(rt); +} + static void vnet_route_init(const void *unused __unused) { @@ -211,8 +253,9 @@ vnet_route_init(const void *unused __unu V_rt_tables = malloc(rt_numfibs * (AF_MAX+1) * sizeof(struct radix_node_head *), M_RTABLE, M_WAITOK|M_ZERO); - V_rtzone = uma_zcreate("rtentry", sizeof(struct rtentry), NULL, NULL, - NULL, NULL, UMA_ALIGN_PTR, 0); + V_rtzone = uma_zcreate("rtentry", sizeof(struct rtentry), + rtentry_ctor, rtentry_dtor, + rtentry_zinit, rtentry_zfini, UMA_ALIGN_PTR, 0); for (dom = domains; dom; dom = dom->dom_next) { if (dom->dom_rtattach == NULL) continue; @@ -489,7 +532,6 @@ rtfree(struct rtentry *rt) /* * and the rtentry itself of course */ - RT_LOCK_DESTROY(rt); uma_zfree(V_rtzone, rt); return; } @@ -1173,12 +1215,11 @@ rtrequest1_fib(int req, struct rt_addrin } else ifa_ref(info->rti_ifa); ifa = info->rti_ifa; - rt = uma_zalloc(V_rtzone, M_NOWAIT | M_ZERO); + rt = uma_zalloc(V_rtzone, M_NOWAIT); if (rt == NULL) { ifa_free(ifa); senderr(ENOBUFS); } - RT_LOCK_INIT(rt); rt->rt_flags = RTF_UP | flags; rt->rt_fibnum = fibnum; /* @@ -1186,7 +1227,6 @@ rtrequest1_fib(int req, struct rt_addrin */ RT_LOCK(rt); if ((error = rt_setgate(rt, dst, gateway)) != 0) { - RT_LOCK_DESTROY(rt); ifa_free(ifa); uma_zfree(V_rtzone, rt); senderr(error); @@ -1212,7 +1252,7 @@ rtrequest1_fib(int req, struct rt_addrin */ rt->rt_ifa = ifa; rt->rt_ifp = ifa->ifa_ifp; - rt->rt_rmx.rmx_weight = 1; + rt->rt_weight = 1; #ifdef RADIX_MPATH /* do not permit exactly the same dst/mask/gw pair */ @@ -1220,7 +1260,6 @@ rtrequest1_fib(int req, struct rt_addrin rt_mpath_conflict(rnh, rt, netmask)) { ifa_free(rt->rt_ifa); Free(rt_key(rt)); - RT_LOCK_DESTROY(rt); uma_zfree(V_rtzone, rt); senderr(EEXIST); } @@ -1288,7 +1327,6 @@ rtrequest1_fib(int req, struct rt_addrin if (rn == NULL) { ifa_free(rt->rt_ifa); Free(rt_key(rt)); - RT_LOCK_DESTROY(rt); uma_zfree(V_rtzone, rt); #ifdef FLOWTABLE if (rt0 != NULL) Modified: stable/10/sys/net/route.h ============================================================================== --- stable/10/sys/net/route.h Fri Mar 21 15:04:09 2014 (r263477) +++ stable/10/sys/net/route.h Fri Mar 21 15:15:30 2014 (r263478) @@ -33,6 +33,8 @@ #ifndef _NET_ROUTE_H_ #define _NET_ROUTE_H_ +#include + /* * Kernel resident routing tables. * @@ -57,17 +59,6 @@ struct route { #define RT_CACHING_CONTEXT 0x1 /* XXX: not used anywhere */ #define RT_NORTREF 0x2 /* doesn't hold reference on ro_rt */ -/* - * These numbers are used by reliable protocols for determining - * retransmission behavior and are included in the routing structure. - */ -struct rt_metrics_lite { - u_long rmx_mtu; /* MTU for this path */ - u_long rmx_expire; /* lifetime for route, e.g. redirect */ - u_long rmx_pksent; /* packets sent using this route */ - u_long rmx_weight; /* absolute weight */ -}; - struct rt_metrics { u_long rmx_locks; /* Kernel must leave these values alone */ u_long rmx_mtu; /* MTU for this path */ @@ -112,6 +103,8 @@ struct mbuf; #include #endif #endif + +#if defined(_KERNEL) || defined(_WANT_RTENTRY) struct rtentry { struct radix_node rt_nodes[2]; /* tree glue, and other values */ /* @@ -122,17 +115,19 @@ struct rtentry { #define rt_key(r) (*((struct sockaddr **)(&(r)->rt_nodes->rn_key))) #define rt_mask(r) (*((struct sockaddr **)(&(r)->rt_nodes->rn_mask))) struct sockaddr *rt_gateway; /* value */ - int rt_flags; /* up/down?, host/net */ - int rt_refcnt; /* # held references */ struct ifnet *rt_ifp; /* the answer: interface to use */ struct ifaddr *rt_ifa; /* the answer: interface address to use */ - struct rt_metrics_lite rt_rmx; /* metrics used by rx'ing protocols */ - u_int rt_fibnum; /* which FIB */ -#ifdef _KERNEL - /* XXX ugly, user apps use this definition but don't have a mtx def */ - struct mtx rt_mtx; /* mutex for routing entry */ -#endif + int rt_flags; /* up/down?, host/net */ + int rt_refcnt; /* # held references */ + u_int rt_fibnum; /* which FIB */ + u_long rt_mtu; /* MTU for this path */ + u_long rt_weight; /* absolute weight */ + u_long rt_expire; /* lifetime for route, e.g. redirect */ +#define rt_endzero rt_pksent + counter_u64_t rt_pksent; /* packets sent using this route */ + struct mtx rt_mtx; /* mutex for routing entry */ }; +#endif /* _KERNEL || _WANT_RTENTRY */ /* * Following structure necessary for 4.3 compatibility; @@ -148,8 +143,6 @@ struct ortentry { struct ifnet *rt_ifp; /* the answer: interface to use */ }; -#define rt_use rt_rmx.rmx_pksent - #define RTF_UP 0x1 /* route usable */ #define RTF_GATEWAY 0x2 /* destination is a gateway */ #define RTF_HOST 0x4 /* host entry (net otherwise) */ @@ -314,6 +307,10 @@ struct rt_addrinfo { #define RT_UNLOCK(_rt) mtx_unlock(&(_rt)->rt_mtx) #define RT_LOCK_DESTROY(_rt) mtx_destroy(&(_rt)->rt_mtx) #define RT_LOCK_ASSERT(_rt) mtx_assert(&(_rt)->rt_mtx, MA_OWNED) +#define RT_UNLOCK_COND(_rt) do { \ + if (mtx_owned(&(_rt)->rt_mtx)) \ + mtx_unlock(&(_rt)->rt_mtx); \ +} while (0) #define RT_ADDREF(_rt) do { \ RT_LOCK_ASSERT(_rt); \ Modified: stable/10/sys/net/rtsock.c ============================================================================== --- stable/10/sys/net/rtsock.c Fri Mar 21 15:04:09 2014 (r263477) +++ stable/10/sys/net/rtsock.c Fri Mar 21 15:15:30 2014 (r263478) @@ -194,10 +194,8 @@ static int sysctl_dumpentry(struct radix static int sysctl_iflist(int af, struct walkarg *w); static int sysctl_ifmalist(int af, struct walkarg *w); static int route_output(struct mbuf *m, struct socket *so); -static void rt_setmetrics(u_long which, const struct rt_metrics *in, - struct rt_metrics_lite *out); -static void rt_getmetrics(const struct rt_metrics_lite *in, - struct rt_metrics *out); +static void rt_setmetrics(const struct rt_msghdr *rtm, struct rtentry *rt); +static void rt_getmetrics(const struct rtentry *rt, struct rt_metrics *out); static void rt_dispatch(struct mbuf *, sa_family_t); static struct netisr_handler rtsock_nh = { @@ -685,8 +683,7 @@ route_output(struct mbuf *m, struct sock rti_need_deembed = (V_deembed_scopeid) ? 1 : 0; #endif RT_LOCK(saved_nrt); - rt_setmetrics(rtm->rtm_inits, - &rtm->rtm_rmx, &saved_nrt->rt_rmx); + rt_setmetrics(rtm, saved_nrt); rtm->rtm_index = saved_nrt->rt_ifp->if_index; RT_REMREF(saved_nrt); RT_UNLOCK(saved_nrt); @@ -860,7 +857,7 @@ route_output(struct mbuf *m, struct sock (rt->rt_flags & ~RTF_GWFLAG_COMPAT); else rtm->rtm_flags = rt->rt_flags; - rt_getmetrics(&rt->rt_rmx, &rtm->rtm_rmx); + rt_getmetrics(rt, &rtm->rtm_rmx); rtm->rtm_addrs = info.rti_addrs; break; @@ -923,8 +920,7 @@ route_output(struct mbuf *m, struct sock /* Allow some flags to be toggled on change. */ rt->rt_flags = (rt->rt_flags & ~RTF_FMASK) | (rtm->rtm_flags & RTF_FMASK); - rt_setmetrics(rtm->rtm_inits, &rtm->rtm_rmx, - &rt->rt_rmx); + rt_setmetrics(rtm, rt); rtm->rtm_index = rt->rt_ifp->if_index; if (rt->rt_ifa && rt->rt_ifa->ifa_rtrequest) rt->rt_ifa->ifa_rtrequest(RTM_ADD, rt, &info); @@ -1012,34 +1008,30 @@ flush: } static void -rt_setmetrics(u_long which, const struct rt_metrics *in, - struct rt_metrics_lite *out) +rt_setmetrics(const struct rt_msghdr *rtm, struct rtentry *rt) { -#define metric(f, e) if (which & (f)) out->e = in->e; - /* - * Only these are stored in the routing entry since introduction - * of tcp hostcache. The rest is ignored. - */ - metric(RTV_MTU, rmx_mtu); - metric(RTV_WEIGHT, rmx_weight); - /* Userland -> kernel timebase conversion. */ - if (which & RTV_EXPIRE) - out->rmx_expire = in->rmx_expire ? - in->rmx_expire - time_second + time_uptime : 0; -#undef metric + + if (rtm->rtm_inits & RTV_MTU) + rt->rt_mtu = rtm->rtm_rmx.rmx_mtu; + if (rtm->rtm_inits & RTV_WEIGHT) + rt->rt_weight = rtm->rtm_rmx.rmx_weight; + /* Kernel -> userland timebase conversion. */ + if (rtm->rtm_inits & RTV_EXPIRE) + rt->rt_expire = rtm->rtm_rmx.rmx_expire ? + rtm->rtm_rmx.rmx_expire - time_second + time_uptime : 0; } static void -rt_getmetrics(const struct rt_metrics_lite *in, struct rt_metrics *out) +rt_getmetrics(const struct rtentry *rt, struct rt_metrics *out) { -#define metric(e) out->e = in->e; + bzero(out, sizeof(*out)); - metric(rmx_mtu); - metric(rmx_weight); + out->rmx_mtu = rt->rt_mtu; + out->rmx_weight = rt->rt_weight; + out->rmx_pksent = counter_u64_fetch(rt->rt_pksent); /* Kernel -> userland timebase conversion. */ - out->rmx_expire = in->rmx_expire ? - in->rmx_expire - time_uptime + time_second : 0; -#undef metric + out->rmx_expire = rt->rt_expire ? + rt->rt_expire - time_uptime + time_second : 0; } /* @@ -1603,11 +1595,7 @@ sysctl_dumpentry(struct radix_node *rn, (rt->rt_flags & ~RTF_GWFLAG_COMPAT); else rtm->rtm_flags = rt->rt_flags; - /* - * let's be honest about this being a retarded hack - */ - rtm->rtm_fmask = rt->rt_rmx.rmx_pksent; - rt_getmetrics(&rt->rt_rmx, &rtm->rtm_rmx); + rt_getmetrics(rt, &rtm->rtm_rmx); rtm->rtm_index = rt->rt_ifp->if_index; rtm->rtm_errno = rtm->rtm_pid = rtm->rtm_seq = 0; rtm->rtm_addrs = info.rti_addrs; Modified: stable/10/sys/netatalk/at_proto.c ============================================================================== --- stable/10/sys/netatalk/at_proto.c Fri Mar 21 15:04:09 2014 (r263477) +++ stable/10/sys/netatalk/at_proto.c Fri Mar 21 15:15:30 2014 (r263478) @@ -24,6 +24,7 @@ */ #include +#include #include #include #include Modified: stable/10/sys/netatalk/ddp_output.c ============================================================================== --- stable/10/sys/netatalk/ddp_output.c Fri Mar 21 15:04:09 2014 (r263477) +++ stable/10/sys/netatalk/ddp_output.c Fri Mar 21 15:15:30 2014 (r263478) @@ -221,7 +221,7 @@ ddp_route(struct mbuf *m, struct route * elh->el_type = ELAP_DDPEXTEND; elh->el_dnode = gate.sat_addr.s_node; } - ro->ro_rt->rt_use++; + counter_u64_add(ro->ro_rt->rt_pksent, 1); #ifdef NETATALK_DEBUG printf ("ddp_route: from %d.%d to %d.%d, via %d.%d (%s)\n", Modified: stable/10/sys/netinet/in_rmx.c ============================================================================== --- stable/10/sys/netinet/in_rmx.c Fri Mar 21 15:04:09 2014 (r263477) +++ stable/10/sys/netinet/in_rmx.c Fri Mar 21 15:15:30 2014 (r263478) @@ -93,8 +93,8 @@ in_addroute(void *v_arg, void *n_arg, st if (IN_MULTICAST(ntohl(sin->sin_addr.s_addr))) rt->rt_flags |= RTF_MULTICAST; - if (!rt->rt_rmx.rmx_mtu && rt->rt_ifp) - rt->rt_rmx.rmx_mtu = rt->rt_ifp->if_mtu; + if (rt->rt_mtu == 0 && rt->rt_ifp != NULL) + rt->rt_mtu = rt->rt_ifp->if_mtu; return (rn_addroute(v_arg, n_arg, head, treenodes)); } @@ -114,7 +114,7 @@ in_matroute(void *v_arg, struct radix_no RT_LOCK(rt); if (rt->rt_flags & RTPRF_OURS) { rt->rt_flags &= ~RTPRF_OURS; - rt->rt_rmx.rmx_expire = 0; + rt->rt_expire = 0; } RT_UNLOCK(rt); } @@ -167,7 +167,7 @@ in_clsroute(struct radix_node *rn, struc */ if (V_rtq_reallyold != 0) { rt->rt_flags |= RTPRF_OURS; - rt->rt_rmx.rmx_expire = time_uptime + V_rtq_reallyold; + rt->rt_expire = time_uptime + V_rtq_reallyold; } else { rtexpunge(rt); } @@ -199,7 +199,7 @@ in_rtqkill(struct radix_node *rn, void * if (rt->rt_flags & RTPRF_OURS) { ap->found++; - if (ap->draining || rt->rt_rmx.rmx_expire <= time_uptime) { + if (ap->draining || rt->rt_expire <= time_uptime) { if (rt->rt_refcnt > 0) panic("rtqkill route really not free"); @@ -215,13 +215,9 @@ in_rtqkill(struct radix_node *rn, void * } } else { if (ap->updating && - (rt->rt_rmx.rmx_expire - time_uptime > - V_rtq_reallyold)) { - rt->rt_rmx.rmx_expire = - time_uptime + V_rtq_reallyold; - } - ap->nextstop = lmin(ap->nextstop, - rt->rt_rmx.rmx_expire); + (rt->rt_expire - time_uptime > V_rtq_reallyold)) + rt->rt_expire = time_uptime + V_rtq_reallyold; + ap->nextstop = lmin(ap->nextstop, rt->rt_expire); } } Modified: stable/10/sys/netinet/ip_fastfwd.c ============================================================================== --- stable/10/sys/netinet/ip_fastfwd.c Fri Mar 21 15:04:09 2014 (r263477) +++ stable/10/sys/netinet/ip_fastfwd.c Fri Mar 21 15:15:30 2014 (r263478) @@ -491,8 +491,7 @@ passout: * Check if route is dampned (when ARP is unable to resolve) */ if ((ro.ro_rt->rt_flags & RTF_REJECT) && - (ro.ro_rt->rt_rmx.rmx_expire == 0 || - time_uptime < ro.ro_rt->rt_rmx.rmx_expire)) { + (ro.ro_rt->rt_expire == 0 || time_uptime < ro.ro_rt->rt_expire)) { icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_HOST, 0, 0); goto consumed; } @@ -520,8 +519,8 @@ passout: /* * Check if packet fits MTU or if hardware will fragment for us */ - if (ro.ro_rt->rt_rmx.rmx_mtu) - mtu = min(ro.ro_rt->rt_rmx.rmx_mtu, ifp->if_mtu); + if (ro.ro_rt->rt_mtu) + mtu = min(ro.ro_rt->rt_mtu, ifp->if_mtu); else mtu = ifp->if_mtu; @@ -586,7 +585,7 @@ passout: if (error != 0) IPSTAT_INC(ips_odropped); else { - ro.ro_rt->rt_rmx.rmx_pksent++; + counter_u64_add(ro.ro_rt->rt_pksent, 1); IPSTAT_INC(ips_forward); IPSTAT_INC(ips_fastforward); } Modified: stable/10/sys/netinet/ip_input.c ============================================================================== --- stable/10/sys/netinet/ip_input.c Fri Mar 21 15:04:09 2014 (r263477) +++ stable/10/sys/netinet/ip_input.c Fri Mar 21 15:15:30 2014 (r263478) @@ -1471,7 +1471,7 @@ ip_forward(struct mbuf *m, int srcrt) error = ip_output(m, NULL, &ro, IP_FORWARDING, NULL, NULL); if (error == EMSGSIZE && ro.ro_rt) - mtu = ro.ro_rt->rt_rmx.rmx_mtu; + mtu = ro.ro_rt->rt_mtu; RO_RTFREE(&ro); if (error) Modified: stable/10/sys/netinet/ip_ipsec.c ============================================================================== --- stable/10/sys/netinet/ip_ipsec.c Fri Mar 21 15:04:09 2014 (r263477) +++ stable/10/sys/netinet/ip_ipsec.c Fri Mar 21 15:15:30 2014 (r263478) @@ -236,9 +236,7 @@ ip_ipsec_mtu(struct mbuf *m, int mtu) sp->req->sav->sah != NULL) { ro = &sp->req->sav->sah->route_cache.sa_route; if (ro->ro_rt && ro->ro_rt->rt_ifp) { - mtu = - ro->ro_rt->rt_rmx.rmx_mtu ? - ro->ro_rt->rt_rmx.rmx_mtu : + mtu = ro->ro_rt->rt_mtu ? ro->ro_rt->rt_mtu : ro->ro_rt->rt_ifp->if_mtu; mtu -= ipsechdr; } Modified: stable/10/sys/netinet/ip_output.c ============================================================================== --- stable/10/sys/netinet/ip_output.c Fri Mar 21 15:04:09 2014 (r263477) +++ stable/10/sys/netinet/ip_output.c Fri Mar 21 15:15:30 2014 (r263478) @@ -296,7 +296,7 @@ again: } ia = ifatoia(rte->rt_ifa); ifp = rte->rt_ifp; - rte->rt_rmx.rmx_pksent++; + counter_u64_add(rte->rt_pksent, 1); if (rte->rt_flags & RTF_GATEWAY) gw = (struct sockaddr_in *)rte->rt_gateway; if (rte->rt_flags & RTF_HOST) @@ -316,9 +316,9 @@ again: * them, there is no way for one to update all its * routes when the MTU is changed. */ - if (rte->rt_rmx.rmx_mtu > ifp->if_mtu) - rte->rt_rmx.rmx_mtu = ifp->if_mtu; - mtu = rte->rt_rmx.rmx_mtu; + if (rte->rt_mtu > ifp->if_mtu) + rte->rt_mtu = ifp->if_mtu; + mtu = rte->rt_mtu; } else { mtu = ifp->if_mtu; } Modified: stable/10/sys/netinet/sctp_os_bsd.h ============================================================================== --- stable/10/sys/netinet/sctp_os_bsd.h Fri Mar 21 15:04:09 2014 (r263477) +++ stable/10/sys/netinet/sctp_os_bsd.h Fri Mar 21 15:15:30 2014 (r263478) @@ -328,11 +328,11 @@ typedef struct callout sctp_os_timer_t; /* MTU */ /*************************/ #define SCTP_GATHER_MTU_FROM_IFN_INFO(ifn, ifn_index, af) ((struct ifnet *)ifn)->if_mtu -#define SCTP_GATHER_MTU_FROM_ROUTE(sctp_ifa, sa, rt) ((rt != NULL) ? rt->rt_rmx.rmx_mtu : 0) +#define SCTP_GATHER_MTU_FROM_ROUTE(sctp_ifa, sa, rt) ((rt != NULL) ? rt->rt_mtu : 0) #define SCTP_GATHER_MTU_FROM_INTFC(sctp_ifn) ((sctp_ifn->ifn_p != NULL) ? ((struct ifnet *)(sctp_ifn->ifn_p))->if_mtu : 0) #define SCTP_SET_MTU_OF_ROUTE(sa, rt, mtu) do { \ if (rt != NULL) \ - rt->rt_rmx.rmx_mtu = mtu; \ + rt->rt_mtu = mtu; \ } while(0) /* (de-)register interface event notifications */ Modified: stable/10/sys/netinet/tcp_output.c ============================================================================== --- stable/10/sys/netinet/tcp_output.c Fri Mar 21 15:04:09 2014 (r263477) +++ stable/10/sys/netinet/tcp_output.c Fri Mar 21 15:15:30 2014 (r263478) @@ -1195,7 +1195,7 @@ send: NULL, NULL, tp->t_inpcb); if (error == EMSGSIZE && ro.ro_rt != NULL) - mtu = ro.ro_rt->rt_rmx.rmx_mtu; + mtu = ro.ro_rt->rt_mtu; RO_RTFREE(&ro); } #endif /* INET6 */ @@ -1233,7 +1233,7 @@ send: tp->t_inpcb); if (error == EMSGSIZE && ro.ro_rt != NULL) - mtu = ro.ro_rt->rt_rmx.rmx_mtu; + mtu = ro.ro_rt->rt_mtu; RO_RTFREE(&ro); } #endif /* INET */ Modified: stable/10/sys/netinet/tcp_subr.c ============================================================================== --- stable/10/sys/netinet/tcp_subr.c Fri Mar 21 15:04:09 2014 (r263477) +++ stable/10/sys/netinet/tcp_subr.c Fri Mar 21 15:15:30 2014 (r263478) @@ -1797,10 +1797,10 @@ tcp_maxmtu(struct in_conninfo *inc, stru } if (sro.ro_rt != NULL) { ifp = sro.ro_rt->rt_ifp; - if (sro.ro_rt->rt_rmx.rmx_mtu == 0) + if (sro.ro_rt->rt_mtu == 0) maxmtu = ifp->if_mtu; else - maxmtu = min(sro.ro_rt->rt_rmx.rmx_mtu, ifp->if_mtu); + maxmtu = min(sro.ro_rt->rt_mtu, ifp->if_mtu); /* Report additional interface capabilities. */ if (cap != NULL) { @@ -1834,10 +1834,10 @@ tcp_maxmtu6(struct in_conninfo *inc, str } if (sro6.ro_rt != NULL) { ifp = sro6.ro_rt->rt_ifp; - if (sro6.ro_rt->rt_rmx.rmx_mtu == 0) + if (sro6.ro_rt->rt_mtu == 0) maxmtu = IN6_LINKMTU(sro6.ro_rt->rt_ifp); else - maxmtu = min(sro6.ro_rt->rt_rmx.rmx_mtu, + maxmtu = min(sro6.ro_rt->rt_mtu, IN6_LINKMTU(sro6.ro_rt->rt_ifp)); /* Report additional interface capabilities. */ Modified: stable/10/sys/netinet6/in6_rmx.c ============================================================================== --- stable/10/sys/netinet6/in6_rmx.c Fri Mar 21 15:04:09 2014 (r263477) +++ stable/10/sys/netinet6/in6_rmx.c Fri Mar 21 15:15:30 2014 (r263478) @@ -135,8 +135,8 @@ in6_addroute(void *v_arg, void *n_arg, s } } - if (!rt->rt_rmx.rmx_mtu && rt->rt_ifp) - rt->rt_rmx.rmx_mtu = IN6_LINKMTU(rt->rt_ifp); + if (!rt->rt_mtu && rt->rt_ifp) + rt->rt_mtu = IN6_LINKMTU(rt->rt_ifp); ret = rn_addroute(v_arg, n_arg, head, treenodes); if (ret == NULL) { @@ -206,12 +206,11 @@ in6_mtuexpire(struct radix_node *rn, voi if (!rt) panic("rt == NULL in in6_mtuexpire"); - if (rt->rt_rmx.rmx_expire && !(rt->rt_flags & RTF_PROBEMTU)) { - if (rt->rt_rmx.rmx_expire <= time_uptime) { + if (rt->rt_expire && !(rt->rt_flags & RTF_PROBEMTU)) { + if (rt->rt_expire <= time_uptime) { rt->rt_flags |= RTF_PROBEMTU; } else { - ap->nextstop = lmin(ap->nextstop, - rt->rt_rmx.rmx_expire); + ap->nextstop = lmin(ap->nextstop, rt->rt_expire); } } Modified: stable/10/sys/netinet6/ip6_ipsec.c ============================================================================== --- stable/10/sys/netinet6/ip6_ipsec.c Fri Mar 21 15:04:09 2014 (r263477) +++ stable/10/sys/netinet6/ip6_ipsec.c Fri Mar 21 15:15:30 2014 (r263478) @@ -369,9 +369,7 @@ ip6_ipsec_mtu(struct mbuf *m) sp->req->sav->sah != NULL) { ro = &sp->req->sav->sah->route_cache.sa_route; if (ro->ro_rt && ro->ro_rt->rt_ifp) { - mtu = - ro->ro_rt->rt_rmx.rmx_mtu ? - ro->ro_rt->rt_rmx.rmx_mtu : + mtu = ro->ro_rt->rt_mtu ? ro->ro_rt->rt_mtu : ro->ro_rt->rt_ifp->if_mtu; mtu -= ipsechdr; } Modified: stable/10/sys/netinet6/ip6_output.c ============================================================================== --- stable/10/sys/netinet6/ip6_output.c Fri Mar 21 15:04:09 2014 (r263477) +++ stable/10/sys/netinet6/ip6_output.c Fri Mar 21 15:15:30 2014 (r263478) @@ -218,9 +218,9 @@ in6_delayed_cksum(struct mbuf *m, uint32 * skipped and ro->ro_rt would be used. If ro is present but ro->ro_rt is NULL, * then result of route lookup is stored in ro->ro_rt. * - * type of "mtu": rt_rmx.rmx_mtu is u_long, ifnet.ifr_mtu is int, and + * type of "mtu": rt_mtu is u_long, ifnet.ifr_mtu is int, and * nd_ifinfo.linkmtu is u_int32_t. so we use u_long to hold largest one, - * which is rt_rmx.rmx_mtu. + * which is rt_mtu. * * ifpp - XXX: just for statistics */ @@ -660,7 +660,7 @@ again: } if (rt != NULL) { ia = (struct in6_ifaddr *)(rt->rt_ifa); - rt->rt_use++; + counter_u64_add(rt->rt_pksent, 1); } @@ -1396,9 +1396,9 @@ ip6_getpmtu(struct route_in6 *ro_pmtu, s ifmtu = IN6_LINKMTU(ifp); mtu = tcp_hc_getmtu(&inc); if (mtu) - mtu = min(mtu, ro_pmtu->ro_rt->rt_rmx.rmx_mtu); + mtu = min(mtu, ro_pmtu->ro_rt->rt_mtu); else - mtu = ro_pmtu->ro_rt->rt_rmx.rmx_mtu; + mtu = ro_pmtu->ro_rt->rt_mtu; if (mtu == 0) mtu = ifmtu; else if (mtu < IPV6_MMTU) { @@ -1422,7 +1422,7 @@ ip6_getpmtu(struct route_in6 *ro_pmtu, s * field isn't locked). */ mtu = ifmtu; - ro_pmtu->ro_rt->rt_rmx.rmx_mtu = mtu; + ro_pmtu->ro_rt->rt_mtu = mtu; } } else if (ifp) { mtu = IN6_LINKMTU(ifp); Modified: stable/10/sys/netipx/ipx_input.c ============================================================================== --- stable/10/sys/netipx/ipx_input.c Fri Mar 21 15:04:09 2014 (r263477) +++ stable/10/sys/netipx/ipx_input.c Fri Mar 21 15:15:30 2014 (r263478) @@ -454,7 +454,7 @@ ipx_do_route(struct ipx_addr *src, struc if (ro->ro_rt == NULL || ro->ro_rt->rt_ifp == NULL) { return (0); } - ro->ro_rt->rt_use++; + counter_u64_add(ro->ro_rt->rt_pksent, 1); return (1); } Modified: stable/10/sys/netipx/ipx_outputfl.c ============================================================================== --- stable/10/sys/netipx/ipx_outputfl.c Fri Mar 21 15:04:09 2014 (r263477) +++ stable/10/sys/netipx/ipx_outputfl.c Fri Mar 21 15:15:30 2014 (r263478) @@ -129,7 +129,7 @@ ipx_outputfl(struct mbuf *m0, struct rou error = ENETUNREACH; goto bad; } - ro->ro_rt->rt_use++; + counter_u64_add(ro->ro_rt->rt_pksent, 1); if (ro->ro_rt->rt_flags & (RTF_GATEWAY|RTF_HOST)) dst = (struct sockaddr_ipx *)ro->ro_rt->rt_gateway; gotif: Modified: stable/10/sys/netpfil/pf/pf.c ============================================================================== --- stable/10/sys/netpfil/pf/pf.c Fri Mar 21 15:04:09 2014 (r263477) +++ stable/10/sys/netpfil/pf/pf.c Fri Mar 21 15:15:30 2014 (r263478) @@ -5267,7 +5267,7 @@ pf_route(struct mbuf **m, struct pf_rule } ifp = rt->rt_ifp; - rt->rt_rmx.rmx_pksent++; + counter_u64_add(rt->rt_pksent, 1); if (rt->rt_flags & RTF_GATEWAY) bcopy(satosin(rt->rt_gateway), &dst, sizeof(dst)); Modified: stable/10/sys/nfs/bootp_subr.c ============================================================================== --- stable/10/sys/nfs/bootp_subr.c Fri Mar 21 15:04:09 2014 (r263477) +++ stable/10/sys/nfs/bootp_subr.c Fri Mar 21 15:15:30 2014 (r263478) @@ -342,7 +342,7 @@ bootpboot_p_rtentry(struct rtentry *rt) bootpboot_p_sa(rt->rt_gateway, NULL); printf(" "); printf("flags %x", (unsigned short) rt->rt_flags); - printf(" %d", (int) rt->rt_rmx.rmx_expire); + printf(" %d", (int) rt->rt_expire); printf(" %s\n", rt->rt_ifp->if_xname); } Modified: stable/10/usr.bin/netstat/main.c ============================================================================== --- stable/10/usr.bin/netstat/main.c Fri Mar 21 15:04:09 2014 (r263477) +++ stable/10/usr.bin/netstat/main.c Fri Mar 21 15:15:30 2014 (r263478) @@ -749,6 +749,19 @@ kread(u_long addr, void *buf, size_t siz } /* + * Read single counter(9). + */ +uint64_t +kread_counter(u_long addr) +{ + + if (kvmd_init() < 0) + return (-1); + + return (kvm_counter_u64_fetch(kvmd, addr)); +} + +/* * Read an array of N counters in kernel memory into array of N uint64_t's. */ int Modified: stable/10/usr.bin/netstat/netstat.h ============================================================================== --- stable/10/usr.bin/netstat/netstat.h Fri Mar 21 15:04:09 2014 (r263477) +++ stable/10/usr.bin/netstat/netstat.h Fri Mar 21 15:15:30 2014 (r263478) @@ -60,6 +60,7 @@ extern int live; /* true if we are exami struct nlist; int kread(u_long addr, void *buf, size_t size); +uint64_t kread_counter(u_long addr); int kread_counters(u_long addr, void *buf, size_t size); int kresolve_list(struct nlist *); const char *plural(uintmax_t); Modified: stable/10/usr.bin/netstat/route.c ============================================================================== --- stable/10/usr.bin/netstat/route.c Fri Mar 21 15:04:09 2014 (r263477) +++ stable/10/usr.bin/netstat/route.c Fri Mar 21 15:15:30 2014 (r263478) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#define _WANT_RTENTRY #include #include @@ -181,7 +182,7 @@ routepr(int fibnum, int af) /* * Since kernel & userland use different timebase * (time_uptime vs time_second) and we are reading kernel memory - * directly we should do rt_rmx.rmx_expire --> expire_time conversion. + * directly we should do rt_expire --> expire_time conversion. */ if (clock_gettime(CLOCK_UPTIME, &uptime) < 0) err(EX_OSERR, "clock_gettime() failed"); @@ -256,8 +257,7 @@ pr_family(int af1) static int wid_dst; static int wid_gw; static int wid_flags; -static int wid_refs; -static int wid_use; +static int wid_pksent; static int wid_mtu; static int wid_if; static int wid_expire; @@ -268,8 +268,7 @@ size_cols(int ef, struct radix_node *rn) wid_dst = WID_DST_DEFAULT(ef); wid_gw = WID_GW_DEFAULT(ef); wid_flags = 6; - wid_refs = 6; - wid_use = 8; + wid_pksent = 8; wid_mtu = 6; wid_if = WID_IF_DEFAULT(ef); wid_expire = 6; @@ -329,16 +328,10 @@ size_cols_rtentry(struct rtentry *rt) len = strlen(bp); wid_flags = MAX(len, wid_flags); - if (addr.u_sa.sa_family == AF_INET || Wflag) { - len = snprintf(buffer, sizeof(buffer), "%d", rt->rt_refcnt); - wid_refs = MAX(len, wid_refs); - len = snprintf(buffer, sizeof(buffer), "%lu", rt->rt_use); - wid_use = MAX(len, wid_use); - if (Wflag && rt->rt_rmx.rmx_mtu != 0) { - len = snprintf(buffer, sizeof(buffer), - "%lu", rt->rt_rmx.rmx_mtu); - wid_mtu = MAX(len, wid_mtu); - } + if (Wflag) { + len = snprintf(buffer, sizeof(buffer), "%lu", + kread_counter((u_long )rt->rt_pksent)); + wid_pksent = MAX(len, wid_pksent); } if (rt->rt_ifp) { if (rt->rt_ifp != lastif) { @@ -349,11 +342,11 @@ size_cols_rtentry(struct rtentry *rt) lastif = rt->rt_ifp; wid_if = MAX(len, wid_if); } - if (rt->rt_rmx.rmx_expire) { + if (rt->rt_expire) { time_t expire_time; if ((expire_time = - rt->rt_rmx.rmx_expire - uptime.tv_sec) > 0) { + rt->rt_expire - uptime.tv_sec) > 0) { len = snprintf(buffer, sizeof(buffer), "%d", (int)expire_time); wid_expire = MAX(len, wid_expire); @@ -373,10 +366,11 @@ pr_rthdr(int af1) if (Aflag) printf("%-8.8s ","Address"); if (Wflag) { - printf("%-*.*s %-*.*s %-*.*s %*.*s %*.*s %*s\n", + printf("%-*.*s %-*.*s %-*.*s %*.*s %*.*s %*.*s %*s\n", wid_dst, wid_dst, "Destination", wid_gw, wid_gw, "Gateway", wid_flags, wid_flags, "Flags", + wid_pksent, wid_pksent, "Use", wid_mtu, wid_mtu, "Mtu", wid_if, wid_if, "Netif", wid_expire, "Expire"); @@ -661,6 +655,8 @@ p_rtentry_sysctl(struct rt_msghdr *rtm) snprintf(buffer, sizeof(buffer), "%%-%d.%ds ", wid_flags, wid_flags); p_flags(rtm->rtm_flags, buffer); if (Wflag) { + printf("%*lu ", wid_pksent, rtm->rtm_rmx.rmx_pksent); + if (rtm->rtm_rmx.rmx_mtu != 0) printf("%*lu ", wid_mtu, rtm->rtm_rmx.rmx_mtu); else @@ -870,17 +866,14 @@ p_rtentry_kvm(struct rtentry *rt) p_sockaddr(kgetsa(rt->rt_gateway), NULL, RTF_HOST, wid_gw); snprintf(buffer, sizeof(buffer), "%%-%d.%ds ", wid_flags, wid_flags); p_flags(rt->rt_flags, buffer); - if (addr.u_sa.sa_family == AF_INET || Wflag) { -#if 0 - printf("%*d %*lu ", wid_refs, rt->rt_refcnt, - wid_use, rt->rt_use); -#endif - if (Wflag) { - if (rt->rt_rmx.rmx_mtu != 0) - printf("%*lu ", wid_mtu, rt->rt_rmx.rmx_mtu); - else - printf("%*s ", wid_mtu, ""); - } + if (Wflag) { + printf("%*lu ", wid_pksent, + kread_counter((u_long )rt->rt_pksent)); + + if (rt->rt_mtu != 0) + printf("%*lu ", wid_mtu, rt->rt_mtu); + else + printf("%*s ", wid_mtu, ""); } if (rt->rt_ifp) { if (rt->rt_ifp != lastif) { @@ -892,11 +885,11 @@ p_rtentry_kvm(struct rtentry *rt) lastif = rt->rt_ifp; } printf("%*.*s", wid_if, wid_if, prettyname); - if (rt->rt_rmx.rmx_expire) { + if (rt->rt_expire) { time_t expire_time; if ((expire_time = - rt->rt_rmx.rmx_expire - uptime.tv_sec) > 0) + rt->rt_expire - uptime.tv_sec) > 0) printf(" %*d", wid_expire, (int)expire_time); } if (rt->rt_nodes[0].rn_dupedkey) From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 15:35:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 14216429; Fri, 21 Mar 2014 15:35:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F2439A55; Fri, 21 Mar 2014 15:35:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LFZaxx072837; Fri, 21 Mar 2014 15:35:36 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LFZafN072836; Fri, 21 Mar 2014 15:35:36 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211535.s2LFZafN072836@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 15:35:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263480 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 15:35:37 -0000 Author: gjb Date: Fri Mar 21 15:35:36 2014 New Revision: 263480 URL: http://svnweb.freebsd.org/changeset/base/263480 Log: Document r263410. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 15:30:31 2014 (r263479) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 15:35:36 2014 (r263480) @@ -198,7 +198,9 @@ File Systems -   + The &man.zfs.8; filesystem has been + updated to support the bookmarks + feature. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 15:35:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9E0953C; Fri, 21 Mar 2014 15:35:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D677BA56; Fri, 21 Mar 2014 15:35:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LFZccw072877; Fri, 21 Mar 2014 15:35:38 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LFZcJK072876; Fri, 21 Mar 2014 15:35:38 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211535.s2LFZcJK072876@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 15:35:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263481 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 15:35:39 -0000 Author: gjb Date: Fri Mar 21 15:35:38 2014 New Revision: 263481 URL: http://svnweb.freebsd.org/changeset/base/263481 Log: Document r263408. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 15:35:36 2014 (r263480) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 15:35:38 2014 (r263481) @@ -152,7 +152,8 @@ Kernel Changes -   + A memory leak has been fixed in + libzfs. Boot Loader Changes From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 15:35:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 65A18631; Fri, 21 Mar 2014 15:35:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 52467A57; Fri, 21 Mar 2014 15:35:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LFZfqr072917; Fri, 21 Mar 2014 15:35:41 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LFZf2C072916; Fri, 21 Mar 2014 15:35:41 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211535.s2LFZf2C072916@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 15:35:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263482 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 15:35:41 -0000 Author: gjb Date: Fri Mar 21 15:35:40 2014 New Revision: 263482 URL: http://svnweb.freebsd.org/changeset/base/263482 Log: Document r263406. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 15:35:38 2014 (r263481) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 15:35:40 2014 (r263482) @@ -209,6 +209,10 @@ Userland Changes + A new flag, -p, has + been added to the &man.zfs.8; list command, + providing output in a parseable form. + OpenPAM has been updated to Nummularia (20130907), which incorporates several bug fixes and documentation improvements. The From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 15:35:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A536A759; Fri, 21 Mar 2014 15:35:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4E4BCA58; Fri, 21 Mar 2014 15:35:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LFZhr8072958; Fri, 21 Mar 2014 15:35:43 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LFZhNP072957; Fri, 21 Mar 2014 15:35:43 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211535.s2LFZhNP072957@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 15:35:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263483 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 15:35:43 -0000 Author: gjb Date: Fri Mar 21 15:35:42 2014 New Revision: 263483 URL: http://svnweb.freebsd.org/changeset/base/263483 Log: Document r263404. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 15:35:40 2014 (r263482) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 15:35:42 2014 (r263483) @@ -209,6 +209,10 @@ Userland Changes + Aliases for the &man.zfs.8; commands + list -t snap and snap + have been added to match &oracle; Solaris 11. + A new flag, -p, has been added to the &man.zfs.8; list command, providing output in a parseable form. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 15:35:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8022A848; Fri, 21 Mar 2014 15:35:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 34B78A59; Fri, 21 Mar 2014 15:35:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LFZja2072999; Fri, 21 Mar 2014 15:35:45 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LFZjbo072998; Fri, 21 Mar 2014 15:35:45 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211535.s2LFZjbo072998@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 15:35:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263484 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 15:35:46 -0000 Author: gjb Date: Fri Mar 21 15:35:44 2014 New Revision: 263484 URL: http://svnweb.freebsd.org/changeset/base/263484 Log: Document r263391. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 15:35:42 2014 (r263483) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 15:35:44 2014 (r263484) @@ -152,6 +152,11 @@ Kernel Changes + The + extensible_dataset &man.zpool.8; feature + has been added. See &man.zpool-features.7; for more + information. + A memory leak has been fixed in libzfs. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 15:46:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 18081D1F; Fri, 21 Mar 2014 15:46:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 04374B5C; Fri, 21 Mar 2014 15:46:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LFkjCo077151; Fri, 21 Mar 2014 15:46:45 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LFkjxn077150; Fri, 21 Mar 2014 15:46:45 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211546.s2LFkjxn077150@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 15:46:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263485 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 15:46:46 -0000 Author: gjb Date: Fri Mar 21 15:46:45 2014 New Revision: 263485 URL: http://svnweb.freebsd.org/changeset/base/263485 Log: Document r263340. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 15:35:44 2014 (r263484) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 15:46:45 2014 (r263485) @@ -152,6 +152,9 @@ Kernel Changes + The &man.aacraid.4; driver has been + updated to version 3.2.5. + The extensible_dataset &man.zpool.8; feature has been added. See &man.zpool-features.7; for more From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 15:46:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 107E5DF0; Fri, 21 Mar 2014 15:46:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D05B6B5E; Fri, 21 Mar 2014 15:46:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LFklgP077189; Fri, 21 Mar 2014 15:46:47 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LFklQ1077188; Fri, 21 Mar 2014 15:46:47 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211546.s2LFklQ1077188@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 15:46:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263486 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 15:46:48 -0000 Author: gjb Date: Fri Mar 21 15:46:47 2014 New Revision: 263486 URL: http://svnweb.freebsd.org/changeset/base/263486 Log: Document r263326. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 15:46:45 2014 (r263485) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 15:46:47 2014 (r263486) @@ -217,6 +217,10 @@ Userland Changes + The &man.fetch.3; library now + supports Last-Modified timestamps which + return UTC instead of GMT. + Aliases for the &man.zfs.8; commands list -t snap and snap have been added to match &oracle; Solaris 11. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 16:27:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CEB63F6A; Fri, 21 Mar 2014 16:27:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BABCCFCF; Fri, 21 Mar 2014 16:27:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LGRmHE093560; Fri, 21 Mar 2014 16:27:48 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LGRmTw093559; Fri, 21 Mar 2014 16:27:48 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211627.s2LGRmTw093559@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 16:27:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263488 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 16:27:48 -0000 Author: gjb Date: Fri Mar 21 16:27:48 2014 New Revision: 263488 URL: http://svnweb.freebsd.org/changeset/base/263488 Log: Document r263286. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 16:11:49 2014 (r263487) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 16:27:48 2014 (r263488) @@ -217,6 +217,9 @@ Userland Changes + The &man.xz.1; utility has been updated + to a post-5.0.5 snapshot. + The &man.fetch.3; library now supports Last-Modified timestamps which return UTC instead of GMT. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 16:27:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF2ACD5; Fri, 21 Mar 2014 16:27:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D4E11FD0; Fri, 21 Mar 2014 16:27:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LGRoTC093598; Fri, 21 Mar 2014 16:27:50 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LGRoPt093597; Fri, 21 Mar 2014 16:27:50 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211627.s2LGRoPt093597@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 16:27:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263489 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 16:27:51 -0000 Author: gjb Date: Fri Mar 21 16:27:50 2014 New Revision: 263489 URL: http://svnweb.freebsd.org/changeset/base/263489 Log: Document r263212. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 16:27:48 2014 (r263488) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 16:27:50 2014 (r263489) @@ -217,6 +217,12 @@ Userland Changes + The NetBSD &man.make.1; utility, + bmake has been imported for compatibility + with the &os; Ports Collection. It is installed as + bmake, and the make + remains the &os; version. + The &man.xz.1; utility has been updated to a post-5.0.5 snapshot. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 16:27:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 15A1F1AB; Fri, 21 Mar 2014 16:27:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B5AE9FD1; Fri, 21 Mar 2014 16:27:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LGRqA1093642; Fri, 21 Mar 2014 16:27:52 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LGRq1T093641; Fri, 21 Mar 2014 16:27:52 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211627.s2LGRq1T093641@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 16:27:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263490 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 16:27:53 -0000 Author: gjb Date: Fri Mar 21 16:27:52 2014 New Revision: 263490 URL: http://svnweb.freebsd.org/changeset/base/263490 Log: Document r263171. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 16:27:50 2014 (r263489) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 16:27:52 2014 (r263490) @@ -152,6 +152,9 @@ Kernel Changes + The Radeon KMS driver has been + added. + The &man.aacraid.4; driver has been updated to version 3.2.5. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 16:32:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 060E6591; Fri, 21 Mar 2014 16:32:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E59BA120; Fri, 21 Mar 2014 16:32:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LGWd2V097100; Fri, 21 Mar 2014 16:32:39 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LGWdfv097099; Fri, 21 Mar 2014 16:32:39 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211632.s2LGWdfv097099@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 16:32:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263491 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 16:32:40 -0000 Author: gjb Date: Fri Mar 21 16:32:39 2014 New Revision: 263491 URL: http://svnweb.freebsd.org/changeset/base/263491 Log: Add reference to r263170. The Radeon KMS driver was added in r263170, and r263171 is the __FreeBSD_version bump. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 16:27:52 2014 (r263490) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 16:32:39 2014 (r263491) @@ -152,7 +152,7 @@ Kernel Changes - The Radeon KMS driver has been + The Radeon KMS driver has been added. The &man.aacraid.4; driver has been From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 16:49:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3ED1CC8; Fri, 21 Mar 2014 16:49:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B05CE2B5; Fri, 21 Mar 2014 16:49:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LGnjKt002012; Fri, 21 Mar 2014 16:49:45 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LGnjSP002011; Fri, 21 Mar 2014 16:49:45 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211649.s2LGnjSP002011@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 16:49:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263492 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 16:49:45 -0000 Author: gjb Date: Fri Mar 21 16:49:45 2014 New Revision: 263492 URL: http://svnweb.freebsd.org/changeset/base/263492 Log: Document r263128. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 16:32:39 2014 (r263491) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 16:49:45 2014 (r263492) @@ -152,6 +152,10 @@ Kernel Changes + A memory leak in the + zpool_in_use() function has been + fixed. + The Radeon KMS driver has been added. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 16:49:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A03FFDA4; Fri, 21 Mar 2014 16:49:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8D27C2B7; Fri, 21 Mar 2014 16:49:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LGnl2n002056; Fri, 21 Mar 2014 16:49:47 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LGnls3002055; Fri, 21 Mar 2014 16:49:47 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211649.s2LGnls3002055@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 16:49:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263493 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 16:49:47 -0000 Author: gjb Date: Fri Mar 21 16:49:47 2014 New Revision: 263493 URL: http://svnweb.freebsd.org/changeset/base/263493 Log: Document r263103. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 16:49:45 2014 (r263492) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 16:49:47 2014 (r263493) @@ -152,6 +152,10 @@ Kernel Changes + Support for + /sys/kernel/random/uuid has been added + to &man.linprocfs.5;. + A memory leak in the zpool_in_use() function has been fixed. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 16:49:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AEBC0EC9; Fri, 21 Mar 2014 16:49:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6D94C2B8; Fri, 21 Mar 2014 16:49:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LGnnGf002104; Fri, 21 Mar 2014 16:49:49 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LGnnQP002102; Fri, 21 Mar 2014 16:49:49 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211649.s2LGnnQP002102@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 16:49:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263494 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 16:49:49 -0000 Author: gjb Date: Fri Mar 21 16:49:48 2014 New Revision: 263494 URL: http://svnweb.freebsd.org/changeset/base/263494 Log: Document r263042. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 16:49:47 2014 (r263493) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 16:49:48 2014 (r263494) @@ -228,6 +228,9 @@ Userland Changes + The system timezone data files have + been updated to version tzdata2014a. + The NetBSD &man.make.1; utility, bmake has been imported for compatibility with the &os; Ports Collection. It is installed as From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 16:57:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F2675D5; Fri, 21 Mar 2014 16:57:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1B373395; Fri, 21 Mar 2014 16:57:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LGvWBg005953; Fri, 21 Mar 2014 16:57:32 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LGvW4B005952; Fri, 21 Mar 2014 16:57:32 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211657.s2LGvW4B005952@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 16:57:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263495 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 16:57:33 -0000 Author: gjb Date: Fri Mar 21 16:57:32 2014 New Revision: 263495 URL: http://svnweb.freebsd.org/changeset/base/263495 Log: Document r263038. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 16:49:48 2014 (r263494) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 16:57:32 2014 (r263495) @@ -228,6 +228,12 @@ Userland Changes + The &man.pkg.7; package management + utility has been syncronized with head/. + This implements binary package signature verification when + bootstrapping the system with pkg + bootstrap. + The system timezone data files have been updated to version tzdata2014a. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 16:57:35 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 210926B0; Fri, 21 Mar 2014 16:57:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0DF3B396; Fri, 21 Mar 2014 16:57:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LGvYL3005994; Fri, 21 Mar 2014 16:57:34 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LGvYb3005993; Fri, 21 Mar 2014 16:57:34 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211657.s2LGvYb3005993@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 16:57:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263496 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 16:57:35 -0000 Author: gjb Date: Fri Mar 21 16:57:34 2014 New Revision: 263496 URL: http://svnweb.freebsd.org/changeset/base/263496 Log: Document r263032. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 16:57:32 2014 (r263495) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 16:57:34 2014 (r263496) @@ -228,6 +228,10 @@ Userland Changes + The libucl library + a JSON-compatible configuration file parsing library,has been + imported. + The &man.pkg.7; package management utility has been syncronized with head/. This implements binary package signature verification when From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 17:17:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1346FEFF; Fri, 21 Mar 2014 17:17:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E80DA7CD; Fri, 21 Mar 2014 17:17:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LHHe6j014373; Fri, 21 Mar 2014 17:17:40 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LHHdSu014368; Fri, 21 Mar 2014 17:17:39 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211717.s2LHHdSu014368@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 17:17:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263499 - in stable/9/release/doc: en_US.ISO8859-1/share/xml share/mk share/xml X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 17:17:41 -0000 Author: gjb Date: Fri Mar 21 17:17:39 2014 New Revision: 263499 URL: http://svnweb.freebsd.org/changeset/base/263499 Log: MFC r260653 (partial), r260655: r260653 (hrs): Add missing footer due to DSSSL->XSLT migration and use XML catalog to resolve URI r260655 (hrs): Add missing arch= and revision= support. Sponsored by: The FreeBSD Foundation Added: stable/9/release/doc/en_US.ISO8859-1/share/xml/catalog.xml - copied unchanged from r260653, head/release/doc/en_US.ISO8859-1/share/xml/catalog.xml stable/9/release/doc/en_US.ISO8859-1/share/xml/release.xsl - copied unchanged from r260653, head/release/doc/en_US.ISO8859-1/share/xml/release.xsl stable/9/release/doc/share/xml/release.xsl - copied, changed from r260653, head/release/doc/share/xml/release.xsl Deleted: stable/9/release/doc/en_US.ISO8859-1/share/xml/catalog stable/9/release/doc/share/xml/catalog stable/9/release/doc/share/xml/default.dsl Modified: stable/9/release/doc/share/mk/doc.relnotes.mk stable/9/release/doc/share/xml/catalog.xml Directory Properties: stable/9/release/doc/ (props changed) Copied: stable/9/release/doc/en_US.ISO8859-1/share/xml/catalog.xml (from r260653, head/release/doc/en_US.ISO8859-1/share/xml/catalog.xml) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/release/doc/en_US.ISO8859-1/share/xml/catalog.xml Fri Mar 21 17:17:39 2014 (r263499, copy of r260653, head/release/doc/en_US.ISO8859-1/share/xml/catalog.xml) @@ -0,0 +1,12 @@ + + + + + + + + + Copied: stable/9/release/doc/en_US.ISO8859-1/share/xml/release.xsl (from r260653, head/release/doc/en_US.ISO8859-1/share/xml/release.xsl) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/release/doc/en_US.ISO8859-1/share/xml/release.xsl Fri Mar 21 17:17:39 2014 (r263499, copy of r260653, head/release/doc/en_US.ISO8859-1/share/xml/release.xsl) @@ -0,0 +1,27 @@ + + + + + + + + +

This file, and other release-related documents, + can be downloaded from .

+ +

For questions about FreeBSD, read the + documentation before + contacting <questions@FreeBSD.org>.

+ +

All users of FreeBSD should + subscribe to the <current@FreeBSD.org> + mailing list.

+ +

For questions about this documentation, + e-mail <doc@FreeBSD.org>.

+
+
Modified: stable/9/release/doc/share/mk/doc.relnotes.mk ============================================================================== --- stable/9/release/doc/share/mk/doc.relnotes.mk Fri Mar 21 17:17:19 2014 (r263498) +++ stable/9/release/doc/share/mk/doc.relnotes.mk Fri Mar 21 17:17:39 2014 (r263499) @@ -4,6 +4,8 @@ DOC_PREFIX?= ${RELN_ROOT}/../../../doc # XXX RELEASETYPE!= grep -o 'release.type "[a-z]*"' ${RELN_ROOT}/share/xml/release.ent | sed 's|[a-z.]* "\([a-z]*\)"|\1|' +RELEASEURL!= grep -o 'release.url \"[^\"]*\"' ${RELN_ROOT}/share/xml/release.ent | sed 's|[^ ]* "\([^"]*\)"|\1|' +RELEASEBRANCH!= grep -o 'release.branch "\([^"]*\)"' ${RELN_ROOT}/share/xml/release.ent | sed 's|[^ ]* "\([^"]*\)"|\1|' .if ${RELEASETYPE} == "current" PROFILING+= --param profile.attribute "'releasetype'" --param profile.value "'current'" .elif ${RELEASETYPE} == "snapshot" @@ -11,13 +13,14 @@ PROFILING+= --param profile.attribute "' .elif ${RELEASETYPE} == "release" PROFILING+= --param profile.attribute "'releasetype'" --param profile.value "'release'" .endif +XSLTPROCFLAGS+= --param release.url "'${RELEASEURL}'" +XSLTPROCFLAGS+= --param release.branch "'${RELEASEBRANCH}'" # Find the RELNOTESng document catalogs EXTRA_CATALOGS+= file://${RELN_ROOT}/${LANGCODE}/share/xml/catalog.xml \ - file://${RELN_ROOT}/share/xml/catalog.xml + file://${RELN_ROOT}/share/xml/catalog.xml -# Use the appropriate architecture-dependent RELNOTESng stylesheet -DSLPRINT?= ${RELN_ROOT}/share/xml/default.dsl +XSLXHTML= http://www.FreeBSD.org/release/XML/share/xml/release.xsl # # Automatic device list generation: Modified: stable/9/release/doc/share/xml/catalog.xml ============================================================================== --- stable/9/release/doc/share/xml/catalog.xml Fri Mar 21 17:17:19 2014 (r263498) +++ stable/9/release/doc/share/xml/catalog.xml Fri Mar 21 17:17:39 2014 (r263499) @@ -1,6 +1,11 @@ + + + Copied and modified: stable/9/release/doc/share/xml/release.xsl (from r260653, head/release/doc/share/xml/release.xsl) ============================================================================== --- head/release/doc/share/xml/release.xsl Tue Jan 14 22:46:23 2014 (r260653, copy source) +++ stable/9/release/doc/share/xml/release.xsl Fri Mar 21 17:17:39 2014 (r263499) @@ -12,4 +12,49 @@ + + + + + + +

+ + + + + + + + + + + + + + + + + + + + + + + + +

+
+ + + + + + + + + + + +
From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 17:34:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E059C920; Fri, 21 Mar 2014 17:34:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CCAFA9A4; Fri, 21 Mar 2014 17:34:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LHYst2022191; Fri, 21 Mar 2014 17:34:54 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LHYslE022190; Fri, 21 Mar 2014 17:34:54 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211734.s2LHYslE022190@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 17:34:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263500 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 17:34:55 -0000 Author: gjb Date: Fri Mar 21 17:34:54 2014 New Revision: 263500 URL: http://svnweb.freebsd.org/changeset/base/263500 Log: Document r263031. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 17:17:39 2014 (r263499) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 17:34:54 2014 (r263500) @@ -228,6 +228,17 @@ Userland Changes + Installation from a read-only + .OBJDIR has been fixed. + + A new shared library directory, + /usr/lib/private, + has been added for internal-use shared libraries. + + A default + libmap32.conf has been added, for 32-bit + applications. + The libucl library a JSON-compatible configuration file parsing library,has been imported. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 17:34:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5EB59F2; Fri, 21 Mar 2014 17:34:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A26C29A5; Fri, 21 Mar 2014 17:34:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LHYujf022232; Fri, 21 Mar 2014 17:34:56 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LHYuef022231; Fri, 21 Mar 2014 17:34:56 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211734.s2LHYuef022231@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 17:34:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263501 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 17:34:56 -0000 Author: gjb Date: Fri Mar 21 17:34:56 2014 New Revision: 263501 URL: http://svnweb.freebsd.org/changeset/base/263501 Log: Document r263028. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 17:34:54 2014 (r263500) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 17:34:56 2014 (r263501) @@ -304,7 +304,11 @@ Release Engineering and Integration -   + The &man.services.mkdb.8; utility has + been updated to support multiple byte orders. Similar to + &man.cap.mkdb.1;, the services.db will + be created with proper endinanness as part of + cross-architecture release builds. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 17:43:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1F6E1D16; Fri, 21 Mar 2014 17:43:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0BEAEA8D; Fri, 21 Mar 2014 17:43:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LHhQ4b026013; Fri, 21 Mar 2014 17:43:26 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LHhQIA026012; Fri, 21 Mar 2014 17:43:26 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211743.s2LHhQIA026012@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 17:43:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263502 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 17:43:27 -0000 Author: gjb Date: Fri Mar 21 17:43:26 2014 New Revision: 263502 URL: http://svnweb.freebsd.org/changeset/base/263502 Log: Document r262988. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 17:34:56 2014 (r263501) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 17:43:26 2014 (r263502) @@ -152,6 +152,9 @@ Kernel Changes + TTM, a memory manager used by video + drivers, has been merged. + Support for /sys/kernel/random/uuid has been added to &man.linprocfs.5;. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 17:43:29 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 02B19E5D; Fri, 21 Mar 2014 17:43:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E4937A8E; Fri, 21 Mar 2014 17:43:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LHhSer026053; Fri, 21 Mar 2014 17:43:28 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LHhSIm026052; Fri, 21 Mar 2014 17:43:28 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211743.s2LHhSIm026052@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 17:43:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263503 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 17:43:29 -0000 Author: gjb Date: Fri Mar 21 17:43:28 2014 New Revision: 263503 URL: http://svnweb.freebsd.org/changeset/base/263503 Log: Document r262968. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 17:43:26 2014 (r263502) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 17:43:28 2014 (r263503) @@ -187,7 +187,8 @@ Hardware Support -   + The &man.mfi.4; driver has been + updated to support MegaRAID Fury cards. Multimedia Support From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 17:43:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ECAF9F60; Fri, 21 Mar 2014 17:43:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D9EDBA91; Fri, 21 Mar 2014 17:43:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LHhUOe026094; Fri, 21 Mar 2014 17:43:30 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LHhU0M026093; Fri, 21 Mar 2014 17:43:30 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211743.s2LHhU0M026093@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 17:43:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263504 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 17:43:31 -0000 Author: gjb Date: Fri Mar 21 17:43:30 2014 New Revision: 263504 URL: http://svnweb.freebsd.org/changeset/base/263504 Log: Move the Radeon KMS and aacraid(4) to Hardware Support. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 17:43:28 2014 (r263503) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 17:43:30 2014 (r263504) @@ -163,12 +163,6 @@ zpool_in_use() function has been fixed.
- The Radeon KMS driver has been - added. - - The &man.aacraid.4; driver has been - updated to version 3.2.5. - The extensible_dataset &man.zpool.8; feature has been added. See &man.zpool-features.7; for more @@ -190,6 +184,12 @@ The &man.mfi.4; driver has been updated to support MegaRAID Fury cards. + The Radeon KMS driver has been + added. + + The &man.aacraid.4; driver has been + updated to version 3.2.5. + Multimedia Support From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 17:53:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6CD4F475; Fri, 21 Mar 2014 17:53:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5842BB95; Fri, 21 Mar 2014 17:53:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LHrBY1030167; Fri, 21 Mar 2014 17:53:11 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LHrAAP030163; Fri, 21 Mar 2014 17:53:10 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201403211753.s2LHrAAP030163@svn.freebsd.org> From: Ed Maste Date: Fri, 21 Mar 2014 17:53:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263505 - in stable/9/sys: amd64/include i386/include pc98/include x86/include X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 17:53:11 -0000 Author: emaste Date: Fri Mar 21 17:53:10 2014 New Revision: 263505 URL: http://svnweb.freebsd.org/changeset/base/263505 Log: MFC r232261 by tijl Copy amd64 _types.h to x86 and merge with i386 _types.h. Replace existing amd64/i386/pc98 _types.h with stubs. MFC (part of) r235939 by obrien Consitently use "__LP64__". Sponsored by: The FreeBSD Foundation Added: stable/9/sys/x86/include/_types.h - copied, changed from r232261, head/sys/x86/include/_types.h Modified: stable/9/sys/amd64/include/_types.h stable/9/sys/i386/include/_types.h stable/9/sys/pc98/include/_types.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/include/_types.h ============================================================================== --- stable/9/sys/amd64/include/_types.h Fri Mar 21 17:43:30 2014 (r263504) +++ stable/9/sys/amd64/include/_types.h Fri Mar 21 17:53:10 2014 (r263505) @@ -1,116 +1,6 @@ /*- - * Copyright (c) 2002 Mike Barcroft - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - * - * From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 - * From: @(#)types.h 8.3 (Berkeley) 1/5/94 - * $FreeBSD$ + * This file is in the public domain. */ +/* $FreeBSD$ */ -#ifndef _MACHINE__TYPES_H_ -#define _MACHINE__TYPES_H_ - -#ifndef _SYS_CDEFS_H_ -#error this file needs sys/cdefs.h as a prerequisite -#endif - -#define __NO_STRICT_ALIGNMENT - -/* - * Basic types upon which most other types are built. - */ -typedef __signed char __int8_t; -typedef unsigned char __uint8_t; -typedef short __int16_t; -typedef unsigned short __uint16_t; -typedef int __int32_t; -typedef unsigned int __uint32_t; -typedef long __int64_t; -typedef unsigned long __uint64_t; - -/* - * Standard type definitions. - */ -typedef __int32_t __clock_t; /* clock()... */ -typedef __int64_t __critical_t; -typedef double __double_t; -typedef float __float_t; -typedef __int64_t __intfptr_t; -typedef __int64_t __intmax_t; -typedef __int64_t __intptr_t; -typedef __int32_t __int_fast8_t; -typedef __int32_t __int_fast16_t; -typedef __int32_t __int_fast32_t; -typedef __int64_t __int_fast64_t; -typedef __int8_t __int_least8_t; -typedef __int16_t __int_least16_t; -typedef __int32_t __int_least32_t; -typedef __int64_t __int_least64_t; -typedef __int64_t __ptrdiff_t; /* ptr1 - ptr2 */ -typedef __int64_t __register_t; -typedef __int64_t __segsz_t; /* segment size (in pages) */ -typedef __uint64_t __size_t; /* sizeof() */ -typedef __int64_t __ssize_t; /* byte count or error */ -typedef __int64_t __time_t; /* time()... */ -typedef __uint64_t __uintfptr_t; -typedef __uint64_t __uintmax_t; -typedef __uint64_t __uintptr_t; -typedef __uint32_t __uint_fast8_t; -typedef __uint32_t __uint_fast16_t; -typedef __uint32_t __uint_fast32_t; -typedef __uint64_t __uint_fast64_t; -typedef __uint8_t __uint_least8_t; -typedef __uint16_t __uint_least16_t; -typedef __uint32_t __uint_least32_t; -typedef __uint64_t __uint_least64_t; -typedef __uint64_t __u_register_t; -typedef __uint64_t __vm_offset_t; -typedef __int64_t __vm_ooffset_t; -typedef __uint64_t __vm_paddr_t; -typedef __uint64_t __vm_pindex_t; -typedef __uint64_t __vm_size_t; - -/* - * Unusual type definitions. - */ -#ifdef __GNUCLIKE_BUILTIN_VARARGS -typedef __builtin_va_list __va_list; /* internally known to gcc */ -#elif defined(lint) -typedef char * __va_list; /* pretend */ -#endif -#if defined(__GNUC_VA_LIST_COMPATIBILITY) && !defined(__GNUC_VA_LIST) \ - && !defined(__NO_GNUC_VA_LIST) -#define __GNUC_VA_LIST -typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ -#endif - -#endif /* !_MACHINE__TYPES_H_ */ +#include Modified: stable/9/sys/i386/include/_types.h ============================================================================== --- stable/9/sys/i386/include/_types.h Fri Mar 21 17:43:30 2014 (r263504) +++ stable/9/sys/i386/include/_types.h Fri Mar 21 17:53:10 2014 (r263505) @@ -1,128 +1,6 @@ /*- - * Copyright (c) 2002 Mike Barcroft - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - * - * From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 - * From: @(#)types.h 8.3 (Berkeley) 1/5/94 - * $FreeBSD$ + * This file is in the public domain. */ +/* $FreeBSD$ */ -#ifndef _MACHINE__TYPES_H_ -#define _MACHINE__TYPES_H_ - -#ifndef _SYS_CDEFS_H_ -#error this file needs sys/cdefs.h as a prerequisite -#endif - -#define __NO_STRICT_ALIGNMENT - -/* - * Basic types upon which most other types are built. - */ -typedef __signed char __int8_t; -typedef unsigned char __uint8_t; -typedef short __int16_t; -typedef unsigned short __uint16_t; -typedef int __int32_t; -typedef unsigned int __uint32_t; -#ifndef lint -__extension__ -#endif -/* LONGLONG */ -typedef long long __int64_t; -#ifndef lint -__extension__ -#endif -/* LONGLONG */ -typedef unsigned long long __uint64_t; - -/* - * Standard type definitions. - */ -typedef unsigned long __clock_t; /* clock()... */ -typedef __int32_t __critical_t; -typedef long double __double_t; -typedef long double __float_t; -typedef __int32_t __intfptr_t; -typedef __int64_t __intmax_t; -typedef __int32_t __intptr_t; -typedef __int32_t __int_fast8_t; -typedef __int32_t __int_fast16_t; -typedef __int32_t __int_fast32_t; -typedef __int64_t __int_fast64_t; -typedef __int8_t __int_least8_t; -typedef __int16_t __int_least16_t; -typedef __int32_t __int_least32_t; -typedef __int64_t __int_least64_t; -typedef __int32_t __ptrdiff_t; /* ptr1 - ptr2 */ -typedef __int32_t __register_t; -typedef __int32_t __segsz_t; /* segment size (in pages) */ -typedef __uint32_t __size_t; /* sizeof() */ -typedef __int32_t __ssize_t; /* byte count or error */ -typedef __int32_t __time_t; /* time()... */ -typedef __uint32_t __uintfptr_t; -typedef __uint64_t __uintmax_t; -typedef __uint32_t __uintptr_t; -typedef __uint32_t __uint_fast8_t; -typedef __uint32_t __uint_fast16_t; -typedef __uint32_t __uint_fast32_t; -typedef __uint64_t __uint_fast64_t; -typedef __uint8_t __uint_least8_t; -typedef __uint16_t __uint_least16_t; -typedef __uint32_t __uint_least32_t; -typedef __uint64_t __uint_least64_t; -typedef __uint32_t __u_register_t; -typedef __uint32_t __vm_offset_t; -typedef __int64_t __vm_ooffset_t; -#ifdef PAE -typedef __uint64_t __vm_paddr_t; -#else -typedef __uint32_t __vm_paddr_t; -#endif -typedef __uint64_t __vm_pindex_t; -typedef __uint32_t __vm_size_t; - -/* - * Unusual type definitions. - */ -#ifdef __GNUCLIKE_BUILTIN_VARARGS -typedef __builtin_va_list __va_list; /* internally known to gcc */ -#else -typedef char * __va_list; -#endif /* __GNUCLIKE_BUILTIN_VARARGS */ -#if defined(__GNUC_VA_LIST_COMPATIBILITY) && !defined(__GNUC_VA_LIST) \ - && !defined(__NO_GNUC_VA_LIST) -#define __GNUC_VA_LIST -typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ -#endif - -#endif /* !_MACHINE__TYPES_H_ */ +#include Modified: stable/9/sys/pc98/include/_types.h ============================================================================== --- stable/9/sys/pc98/include/_types.h Fri Mar 21 17:43:30 2014 (r263504) +++ stable/9/sys/pc98/include/_types.h Fri Mar 21 17:53:10 2014 (r263505) @@ -3,4 +3,4 @@ */ /* $FreeBSD$ */ -#include +#include Copied and modified: stable/9/sys/x86/include/_types.h (from r232261, head/sys/x86/include/_types.h) ============================================================================== --- head/sys/x86/include/_types.h Tue Feb 28 18:15:28 2012 (r232261, copy source) +++ stable/9/sys/x86/include/_types.h Fri Mar 21 17:53:10 2014 (r263505) @@ -54,7 +54,7 @@ typedef short __int16_t; typedef unsigned short __uint16_t; typedef int __int32_t; typedef unsigned int __uint32_t; -#ifdef _LP64 +#ifdef __LP64__ typedef long __int64_t; typedef unsigned long __uint64_t; #else @@ -73,7 +73,7 @@ typedef unsigned long long __uint64_t; /* * Standard type definitions. */ -#ifdef _LP64 +#ifdef __LP64__ typedef __int32_t __clock_t; /* clock()... */ typedef __int64_t __critical_t; typedef double __double_t; @@ -97,7 +97,7 @@ typedef __int8_t __int_least8_t; typedef __int16_t __int_least16_t; typedef __int32_t __int_least32_t; typedef __int64_t __int_least64_t; -#ifdef _LP64 +#ifdef __LP64__ typedef __int64_t __ptrdiff_t; /* ptr1 - ptr2 */ typedef __int64_t __register_t; typedef __int64_t __segsz_t; /* segment size (in pages) */ @@ -125,7 +125,7 @@ typedef __uint8_t __uint_least8_t; typedef __uint16_t __uint_least16_t; typedef __uint32_t __uint_least32_t; typedef __uint64_t __uint_least64_t; -#ifdef _LP64 +#ifdef __LP64__ typedef __uint64_t __u_register_t; typedef __uint64_t __vm_offset_t; typedef __uint64_t __vm_paddr_t; From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 17:53:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E2075A8; Fri, 21 Mar 2014 17:53:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8A09EB9B; Fri, 21 Mar 2014 17:53:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LHrO0g030235; Fri, 21 Mar 2014 17:53:24 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LHrOV9030234; Fri, 21 Mar 2014 17:53:24 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211753.s2LHrOV9030234@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 17:53:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263506 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 17:53:24 -0000 Author: gjb Date: Fri Mar 21 17:53:24 2014 New Revision: 263506 URL: http://svnweb.freebsd.org/changeset/base/263506 Log: Document r262879. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 17:53:10 2014 (r263505) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 17:53:24 2014 (r263506) @@ -308,6 +308,11 @@ Release Engineering and Integration + The release.sh + script and release Makefile have been + updated to use &man.pkg.7; to populate the dvd installation + medium. + The &man.services.mkdb.8; utility has been updated to support multiple byte orders. Similar to &man.cap.mkdb.1;, the services.db will From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 17:53:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A67567C; Fri, 21 Mar 2014 17:53:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6B73AB9C; Fri, 21 Mar 2014 17:53:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LHrQMt030278; Fri, 21 Mar 2014 17:53:26 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LHrQrC030277; Fri, 21 Mar 2014 17:53:26 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211753.s2LHrQrC030277@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 17:53:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263507 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 17:53:27 -0000 Author: gjb Date: Fri Mar 21 17:53:25 2014 New Revision: 263507 URL: http://svnweb.freebsd.org/changeset/base/263507 Log: Document r262706. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 17:53:24 2014 (r263506) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 17:53:25 2014 (r263507) @@ -232,6 +232,9 @@ Userland Changes + BIND has + been updated to version 9.9.5. + Installation from a read-only .OBJDIR has been fixed. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 17:54:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A25382B; Fri, 21 Mar 2014 17:54:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 80A7CBA6; Fri, 21 Mar 2014 17:54:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LHs5kp030386; Fri, 21 Mar 2014 17:54:05 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LHs1Pk030364; Fri, 21 Mar 2014 17:54:01 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201403211754.s2LHs1Pk030364@svn.freebsd.org> From: Dimitry Andric Date: Fri, 21 Mar 2014 17:54:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263508 - in stable/10: . contrib/gcc contrib/llvm contrib/llvm/include/llvm contrib/llvm/include/llvm-c contrib/llvm/include/llvm-c/Transforms contrib/llvm/include/llvm/ADT contrib/llv... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 17:54:05 -0000 Author: dim Date: Fri Mar 21 17:53:59 2014 New Revision: 263508 URL: http://svnweb.freebsd.org/changeset/base/263508 Log: MFC 261991: Upgrade our copy of llvm/clang to 3.4 release. This version supports all of the features in the current working draft of the upcoming C++ standard, provisionally named C++1y. The code generator's performance is greatly increased, and the loop auto-vectorizer is now enabled at -Os and -O2 in addition to -O3. The PowerPC backend has made several major improvements to code generation quality and compile time, and the X86, SPARC, ARM32, Aarch64 and SystemZ backends have all seen major feature work. Release notes for llvm and clang can be found here: MFC 262121 (by emaste): Update lldb for clang/llvm 3.4 import This commit largely restores the lldb source to the upstream r196259 snapshot with the addition of threaded inferior support and a few bug fixes. Specific upstream lldb revisions restored include: SVN git 181387 779e6ac 181703 7bef4e2 182099 b31044e 182650 f2dcf35 182683 0d91b80 183862 15c1774 183929 99447a6 184177 0b2934b 184948 4dc3761 184954 007e7bc 186990 eebd175 Sponsored by: DARPA, AFRL MFC 262186 (by emaste): Fix mismerge in r262121 A break statement was lost in the merge. The error had no functional impact, but restore it to reduce the diff against upstream. MFC 262303: Pull in r197521 from upstream clang trunk (by rdivacky): Use the integrated assembler by default on FreeBSD/ppc and ppc64. Requested by: jhibbits MFC 262611: Pull in r196874 from upstream llvm trunk: Fix a crash that occurs when PWD is invalid. MCJIT needs to be able to run in hostile environments, even when PWD is invalid. There's no need to crash MCJIT in this case. The obvious fix is to simply leave MCContext's CompilationDir empty when PWD can't be determined. This way, MCJIT clients, and other clients that link with LLVM don't need a valid working directory. If we do want to guarantee valid CompilationDir, that should be done only for clients of getCompilationDir(). This is as simple as checking for an empty string. The only current use of getCompilationDir is EmitGenDwarfInfo, which won't conceivably run with an invalid working dir. However, in the purely hypothetically and untestable case that this happens, the AT_comp_dir will be omitted from the compilation_unit DIE. This should help fix assertions occurring with ports-mgmt/tinderbox, when it is using jails, and sometimes invalidates clang's current working directory. Reported by: decke MFC 262809: Pull in r203007 from upstream clang trunk: Don't produce an alias between destructors with different calling conventions. Fixes pr19007. (Please note that is an LLVM PR identifier, not a FreeBSD one.) This should fix Firefox and/or libxul crashes (due to problems with regparm/stdcall calling conventions) on i386. Reported by: multiple users on freebsd-current PR: bin/187103 MFC 263048: Repair recognition of "CC" as an alias for the C++ compiler, since it was silently broken by upstream for a Windows-specific use-case. Apparently some versions of CMake still rely on this archaic feature... Reported by: rakuco MFC 263049: Garbage collect the old way of adding the libstdc++ include directories in clang's InitHeaderSearch.cpp. This has been superseded by David Chisnall's commit in r255321. Moreover, if libc++ is used, the libstdc++ include directories should not be in the search path at all. These directories are now only used if you pass -stdlib=libstdc++. Added: stable/10/contrib/llvm/include/llvm-c/IRReader.h - copied unchanged from r261991, head/contrib/llvm/include/llvm-c/IRReader.h stable/10/contrib/llvm/include/llvm-c/Support.h - copied unchanged from r261991, head/contrib/llvm/include/llvm-c/Support.h stable/10/contrib/llvm/include/llvm/ADT/polymorphic_ptr.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/ADT/polymorphic_ptr.h stable/10/contrib/llvm/include/llvm/Analysis/CFG.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/Analysis/CFG.h stable/10/contrib/llvm/include/llvm/CodeGen/LiveRegUnits.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/CodeGen/LiveRegUnits.h stable/10/contrib/llvm/include/llvm/CodeGen/StackMaps.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/CodeGen/StackMaps.h stable/10/contrib/llvm/include/llvm/CodeGen/StackProtector.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/CodeGen/StackProtector.h stable/10/contrib/llvm/include/llvm/ExecutionEngine/RTDyldMemoryManager.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/ExecutionEngine/RTDyldMemoryManager.h stable/10/contrib/llvm/include/llvm/IR/IntrinsicsAArch64.td - copied unchanged from r261991, head/contrib/llvm/include/llvm/IR/IntrinsicsAArch64.td stable/10/contrib/llvm/include/llvm/IR/LegacyPassManager.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/IR/LegacyPassManager.h stable/10/contrib/llvm/include/llvm/IR/LegacyPassManagers.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/IR/LegacyPassManagers.h stable/10/contrib/llvm/include/llvm/IR/PassManager.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/IR/PassManager.h stable/10/contrib/llvm/include/llvm/LTO/ - copied from r261991, head/contrib/llvm/include/llvm/LTO/ stable/10/contrib/llvm/include/llvm/MC/MCAsmInfoELF.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/MC/MCAsmInfoELF.h stable/10/contrib/llvm/include/llvm/MC/MCExternalSymbolizer.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/MC/MCExternalSymbolizer.h stable/10/contrib/llvm/include/llvm/MC/MCFunction.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/MC/MCFunction.h stable/10/contrib/llvm/include/llvm/MC/MCModuleYAML.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/MC/MCModuleYAML.h stable/10/contrib/llvm/include/llvm/MC/MCObjectDisassembler.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/MC/MCObjectDisassembler.h stable/10/contrib/llvm/include/llvm/MC/MCObjectSymbolizer.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/MC/MCObjectSymbolizer.h stable/10/contrib/llvm/include/llvm/MC/MCRelocationInfo.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/MC/MCRelocationInfo.h stable/10/contrib/llvm/include/llvm/MC/MCSymbolizer.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/MC/MCSymbolizer.h stable/10/contrib/llvm/include/llvm/Object/COFFYAML.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/Object/COFFYAML.h stable/10/contrib/llvm/include/llvm/Object/ELFObjectFile.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/Object/ELFObjectFile.h stable/10/contrib/llvm/include/llvm/Object/ELFTypes.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/Object/ELFTypes.h stable/10/contrib/llvm/include/llvm/Object/ELFYAML.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/Object/ELFYAML.h stable/10/contrib/llvm/include/llvm/Object/MachOUniversal.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/Object/MachOUniversal.h stable/10/contrib/llvm/include/llvm/Object/YAML.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/Object/YAML.h stable/10/contrib/llvm/include/llvm/Support/MD5.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/Support/MD5.h stable/10/contrib/llvm/include/llvm/Support/StringRefMemoryObject.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/Support/StringRefMemoryObject.h stable/10/contrib/llvm/include/llvm/Support/Unicode.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/Support/Unicode.h stable/10/contrib/llvm/include/llvm/Support/UnicodeCharRanges.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/Support/UnicodeCharRanges.h stable/10/contrib/llvm/include/llvm/TableGen/StringToOffsetTable.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/TableGen/StringToOffsetTable.h stable/10/contrib/llvm/include/llvm/Transforms/Utils/GlobalStatus.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/Transforms/Utils/GlobalStatus.h stable/10/contrib/llvm/include/llvm/Transforms/Utils/LoopUtils.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/Transforms/Utils/LoopUtils.h stable/10/contrib/llvm/include/llvm/Transforms/Utils/SpecialCaseList.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/Transforms/Utils/SpecialCaseList.h stable/10/contrib/llvm/lib/Analysis/CFG.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Analysis/CFG.cpp stable/10/contrib/llvm/lib/Analysis/Delinearization.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Analysis/Delinearization.cpp stable/10/contrib/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp - copied unchanged from r261991, head/contrib/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp stable/10/contrib/llvm/lib/CodeGen/AsmPrinter/DIEHash.h - copied unchanged from r261991, head/contrib/llvm/lib/CodeGen/AsmPrinter/DIEHash.h stable/10/contrib/llvm/lib/CodeGen/LiveRegUnits.cpp - copied unchanged from r261991, head/contrib/llvm/lib/CodeGen/LiveRegUnits.cpp stable/10/contrib/llvm/lib/CodeGen/StackMaps.cpp - copied unchanged from r261991, head/contrib/llvm/lib/CodeGen/StackMaps.cpp stable/10/contrib/llvm/lib/DebugInfo/DWARFDebugLoc.cpp - copied unchanged from r261991, head/contrib/llvm/lib/DebugInfo/DWARFDebugLoc.cpp stable/10/contrib/llvm/lib/DebugInfo/DWARFDebugLoc.h - copied unchanged from r261991, head/contrib/llvm/lib/DebugInfo/DWARFDebugLoc.h stable/10/contrib/llvm/lib/DebugInfo/DWARFTypeUnit.cpp - copied unchanged from r261991, head/contrib/llvm/lib/DebugInfo/DWARFTypeUnit.cpp stable/10/contrib/llvm/lib/DebugInfo/DWARFTypeUnit.h - copied unchanged from r261991, head/contrib/llvm/lib/DebugInfo/DWARFTypeUnit.h stable/10/contrib/llvm/lib/DebugInfo/DWARFUnit.cpp - copied unchanged from r261991, head/contrib/llvm/lib/DebugInfo/DWARFUnit.cpp stable/10/contrib/llvm/lib/DebugInfo/DWARFUnit.h - copied unchanged from r261991, head/contrib/llvm/lib/DebugInfo/DWARFUnit.h stable/10/contrib/llvm/lib/ExecutionEngine/RTDyldMemoryManager.cpp - copied unchanged from r261991, head/contrib/llvm/lib/ExecutionEngine/RTDyldMemoryManager.cpp stable/10/contrib/llvm/lib/IR/AsmWriter.h - copied unchanged from r261991, head/contrib/llvm/lib/IR/AsmWriter.h stable/10/contrib/llvm/lib/IR/LegacyPassManager.cpp - copied unchanged from r261991, head/contrib/llvm/lib/IR/LegacyPassManager.cpp stable/10/contrib/llvm/lib/LTO/ - copied from r261991, head/contrib/llvm/lib/LTO/ stable/10/contrib/llvm/lib/MC/MCAsmInfoELF.cpp - copied unchanged from r261991, head/contrib/llvm/lib/MC/MCAsmInfoELF.cpp stable/10/contrib/llvm/lib/MC/MCExternalSymbolizer.cpp - copied unchanged from r261991, head/contrib/llvm/lib/MC/MCExternalSymbolizer.cpp stable/10/contrib/llvm/lib/MC/MCFunction.cpp - copied unchanged from r261991, head/contrib/llvm/lib/MC/MCFunction.cpp stable/10/contrib/llvm/lib/MC/MCModuleYAML.cpp - copied unchanged from r261991, head/contrib/llvm/lib/MC/MCModuleYAML.cpp stable/10/contrib/llvm/lib/MC/MCObjectDisassembler.cpp - copied unchanged from r261991, head/contrib/llvm/lib/MC/MCObjectDisassembler.cpp stable/10/contrib/llvm/lib/MC/MCObjectSymbolizer.cpp - copied unchanged from r261991, head/contrib/llvm/lib/MC/MCObjectSymbolizer.cpp stable/10/contrib/llvm/lib/MC/MCRelocationInfo.cpp - copied unchanged from r261991, head/contrib/llvm/lib/MC/MCRelocationInfo.cpp stable/10/contrib/llvm/lib/MC/MCSymbolizer.cpp - copied unchanged from r261991, head/contrib/llvm/lib/MC/MCSymbolizer.cpp stable/10/contrib/llvm/lib/Object/COFFYAML.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Object/COFFYAML.cpp stable/10/contrib/llvm/lib/Object/ELF.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Object/ELF.cpp stable/10/contrib/llvm/lib/Object/ELFYAML.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Object/ELFYAML.cpp stable/10/contrib/llvm/lib/Object/MachOUniversal.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Object/MachOUniversal.cpp stable/10/contrib/llvm/lib/Object/YAML.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Object/YAML.cpp stable/10/contrib/llvm/lib/Support/MD5.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Support/MD5.cpp stable/10/contrib/llvm/lib/Support/StringRefMemoryObject.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Support/StringRefMemoryObject.cpp stable/10/contrib/llvm/lib/Support/Unicode.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Support/Unicode.cpp stable/10/contrib/llvm/lib/Target/AArch64/AArch64InstrNEON.td - copied unchanged from r261991, head/contrib/llvm/lib/Target/AArch64/AArch64InstrNEON.td stable/10/contrib/llvm/lib/Target/ARM/ARMFPUName.def - copied unchanged from r261991, head/contrib/llvm/lib/Target/ARM/ARMFPUName.def stable/10/contrib/llvm/lib/Target/ARM/ARMFPUName.h - copied unchanged from r261991, head/contrib/llvm/lib/Target/ARM/ARMFPUName.h stable/10/contrib/llvm/lib/Target/ARM/ARMFeatures.h - copied unchanged from r261991, head/contrib/llvm/lib/Target/ARM/ARMFeatures.h stable/10/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMachORelocationInfo.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMachORelocationInfo.cpp stable/10/contrib/llvm/lib/Target/Hexagon/HexagonCopyToCombine.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/Hexagon/HexagonCopyToCombine.cpp stable/10/contrib/llvm/lib/Target/Hexagon/HexagonMachineFunctionInfo.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/Hexagon/HexagonMachineFunctionInfo.cpp stable/10/contrib/llvm/lib/Target/Hexagon/HexagonSplitConst32AndConst64.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/Hexagon/HexagonSplitConst32AndConst64.cpp stable/10/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp stable/10/contrib/llvm/lib/Target/Mips/MSA.txt - copied unchanged from r261991, head/contrib/llvm/lib/Target/Mips/MSA.txt stable/10/contrib/llvm/lib/Target/Mips/Mips16HardFloat.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/Mips/Mips16HardFloat.cpp stable/10/contrib/llvm/lib/Target/Mips/Mips16HardFloat.h - copied unchanged from r261991, head/contrib/llvm/lib/Target/Mips/Mips16HardFloat.h stable/10/contrib/llvm/lib/Target/Mips/MipsMSAInstrFormats.td - copied unchanged from r261991, head/contrib/llvm/lib/Target/Mips/MipsMSAInstrFormats.td stable/10/contrib/llvm/lib/Target/Mips/MipsMSAInstrInfo.td - copied unchanged from r261991, head/contrib/llvm/lib/Target/Mips/MipsMSAInstrInfo.td stable/10/contrib/llvm/lib/Target/Mips/MipsTargetStreamer.h - copied unchanged from r261991, head/contrib/llvm/lib/Target/Mips/MipsTargetStreamer.h stable/10/contrib/llvm/lib/Target/NVPTX/InstPrinter/NVPTXInstPrinter.h - copied unchanged from r261991, head/contrib/llvm/lib/Target/NVPTX/InstPrinter/NVPTXInstPrinter.h stable/10/contrib/llvm/lib/Target/NVPTX/NVPTXMCExpr.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/NVPTX/NVPTXMCExpr.cpp stable/10/contrib/llvm/lib/Target/NVPTX/NVPTXMCExpr.h - copied unchanged from r261991, head/contrib/llvm/lib/Target/NVPTX/NVPTXMCExpr.h stable/10/contrib/llvm/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp stable/10/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.cpp stable/10/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.h - copied unchanged from r261991, head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.h stable/10/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp stable/10/contrib/llvm/lib/Target/PowerPC/PPCFastISel.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/PowerPC/PPCFastISel.cpp stable/10/contrib/llvm/lib/Target/PowerPC/PPCTargetObjectFile.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/PowerPC/PPCTargetObjectFile.cpp stable/10/contrib/llvm/lib/Target/PowerPC/PPCTargetObjectFile.h - copied unchanged from r261991, head/contrib/llvm/lib/Target/PowerPC/PPCTargetObjectFile.h stable/10/contrib/llvm/lib/Target/PowerPC/PPCTargetStreamer.h - copied unchanged from r261991, head/contrib/llvm/lib/Target/PowerPC/PPCTargetStreamer.h stable/10/contrib/llvm/lib/Target/R600/AMDGPUISelDAGToDAG.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/R600/AMDGPUISelDAGToDAG.cpp stable/10/contrib/llvm/lib/Target/R600/AMDGPUTargetTransformInfo.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/R600/AMDGPUTargetTransformInfo.cpp stable/10/contrib/llvm/lib/Target/R600/MCTargetDesc/AMDGPUMCCodeEmitter.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/R600/MCTargetDesc/AMDGPUMCCodeEmitter.cpp stable/10/contrib/llvm/lib/Target/R600/R600ClauseMergePass.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/R600/R600ClauseMergePass.cpp stable/10/contrib/llvm/lib/Target/R600/R600InstrFormats.td - copied unchanged from r261991, head/contrib/llvm/lib/Target/R600/R600InstrFormats.td stable/10/contrib/llvm/lib/Target/R600/R600OptimizeVectorRegisters.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/R600/R600OptimizeVectorRegisters.cpp stable/10/contrib/llvm/lib/Target/R600/R600TextureIntrinsicsReplacer.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/R600/R600TextureIntrinsicsReplacer.cpp stable/10/contrib/llvm/lib/Target/R600/SIFixSGPRCopies.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/R600/SIFixSGPRCopies.cpp stable/10/contrib/llvm/lib/Target/R600/SITypeRewriter.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/R600/SITypeRewriter.cpp stable/10/contrib/llvm/lib/Target/Sparc/SparcCodeEmitter.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/Sparc/SparcCodeEmitter.cpp stable/10/contrib/llvm/lib/Target/Sparc/SparcJITInfo.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/Sparc/SparcJITInfo.cpp stable/10/contrib/llvm/lib/Target/Sparc/SparcJITInfo.h - copied unchanged from r261991, head/contrib/llvm/lib/Target/Sparc/SparcJITInfo.h stable/10/contrib/llvm/lib/Target/Sparc/SparcRelocations.h - copied unchanged from r261991, head/contrib/llvm/lib/Target/Sparc/SparcRelocations.h stable/10/contrib/llvm/lib/Target/SystemZ/Disassembler/ - copied from r261991, head/contrib/llvm/lib/Target/SystemZ/Disassembler/ stable/10/contrib/llvm/lib/Target/SystemZ/SystemZElimCompare.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/SystemZ/SystemZElimCompare.cpp stable/10/contrib/llvm/lib/Target/SystemZ/SystemZLongBranch.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/SystemZ/SystemZLongBranch.cpp stable/10/contrib/llvm/lib/Target/SystemZ/SystemZMachineFunctionInfo.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/SystemZ/SystemZMachineFunctionInfo.cpp stable/10/contrib/llvm/lib/Target/SystemZ/SystemZProcessors.td - copied unchanged from r261991, head/contrib/llvm/lib/Target/SystemZ/SystemZProcessors.td stable/10/contrib/llvm/lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp stable/10/contrib/llvm/lib/Target/SystemZ/SystemZSelectionDAGInfo.h - copied unchanged from r261991, head/contrib/llvm/lib/Target/SystemZ/SystemZSelectionDAGInfo.h stable/10/contrib/llvm/lib/Target/SystemZ/SystemZShortenInst.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/SystemZ/SystemZShortenInst.cpp stable/10/contrib/llvm/lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp stable/10/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MachORelocationInfo.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MachORelocationInfo.cpp stable/10/contrib/llvm/lib/Target/X86/X86CallingConv.h - copied unchanged from r261991, head/contrib/llvm/lib/Target/X86/X86CallingConv.h stable/10/contrib/llvm/lib/Target/X86/X86InstrAVX512.td - copied unchanged from r261991, head/contrib/llvm/lib/Target/X86/X86InstrAVX512.td stable/10/contrib/llvm/lib/Target/X86/X86ScheduleSLM.td - copied unchanged from r261991, head/contrib/llvm/lib/Target/X86/X86ScheduleSLM.td stable/10/contrib/llvm/lib/Target/XCore/XCoreTargetTransformInfo.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/XCore/XCoreTargetTransformInfo.cpp stable/10/contrib/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp stable/10/contrib/llvm/lib/Transforms/Instrumentation/DebugIR.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Transforms/Instrumentation/DebugIR.cpp stable/10/contrib/llvm/lib/Transforms/Instrumentation/DebugIR.h - copied unchanged from r261991, head/contrib/llvm/lib/Transforms/Instrumentation/DebugIR.h stable/10/contrib/llvm/lib/Transforms/ObjCARC/ARCRuntimeEntryPoints.h - copied unchanged from r261991, head/contrib/llvm/lib/Transforms/ObjCARC/ARCRuntimeEntryPoints.h stable/10/contrib/llvm/lib/Transforms/Scalar/FlattenCFGPass.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Transforms/Scalar/FlattenCFGPass.cpp stable/10/contrib/llvm/lib/Transforms/Scalar/LoopRerollPass.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Transforms/Scalar/LoopRerollPass.cpp stable/10/contrib/llvm/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp stable/10/contrib/llvm/lib/Transforms/Scalar/SampleProfile.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Transforms/Scalar/SampleProfile.cpp stable/10/contrib/llvm/lib/Transforms/Scalar/StructurizeCFG.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Transforms/Scalar/StructurizeCFG.cpp stable/10/contrib/llvm/lib/Transforms/Utils/FlattenCFG.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Transforms/Utils/FlattenCFG.cpp stable/10/contrib/llvm/lib/Transforms/Utils/GlobalStatus.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Transforms/Utils/GlobalStatus.cpp stable/10/contrib/llvm/lib/Transforms/Utils/SpecialCaseList.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Transforms/Utils/SpecialCaseList.cpp stable/10/contrib/llvm/tools/clang/include/clang/AST/ASTFwd.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/include/clang/AST/ASTFwd.h stable/10/contrib/llvm/tools/clang/include/clang/AST/ASTLambda.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/include/clang/AST/ASTLambda.h stable/10/contrib/llvm/tools/clang/include/clang/AST/MangleNumberingContext.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/include/clang/AST/MangleNumberingContext.h stable/10/contrib/llvm/tools/clang/include/clang/AST/StmtOpenMP.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/include/clang/AST/StmtOpenMP.h stable/10/contrib/llvm/tools/clang/include/clang/ASTMatchers/Dynamic/ - copied from r261991, head/contrib/llvm/tools/clang/include/clang/ASTMatchers/Dynamic/ stable/10/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/Consumed.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/Consumed.h stable/10/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsXCore.def - copied unchanged from r261991, head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsXCore.def stable/10/contrib/llvm/tools/clang/include/clang/CodeGen/CGFunctionInfo.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/include/clang/CodeGen/CGFunctionInfo.h stable/10/contrib/llvm/tools/clang/include/clang/CodeGen/CodeGenABITypes.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/include/clang/CodeGen/CodeGenABITypes.h stable/10/contrib/llvm/tools/clang/include/clang/Driver/CLCompatOptions.td - copied unchanged from r261991, head/contrib/llvm/tools/clang/include/clang/Driver/CLCompatOptions.td stable/10/contrib/llvm/tools/clang/include/clang/Driver/SanitizerArgs.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/include/clang/Driver/SanitizerArgs.h stable/10/contrib/llvm/tools/clang/include/clang/Index/ - copied from r261991, head/contrib/llvm/tools/clang/include/clang/Index/ stable/10/contrib/llvm/tools/clang/include/clang/Sema/SemaLambda.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/include/clang/Sema/SemaLambda.h stable/10/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/ObjCRetainCount.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/ObjCRetainCount.h stable/10/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/CommonBugCategories.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/CommonBugCategories.h stable/10/contrib/llvm/tools/clang/include/clang/Tooling/ReplacementsYaml.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/include/clang/Tooling/ReplacementsYaml.h stable/10/contrib/llvm/tools/clang/lib/AST/ASTTypeTraits.cpp - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/AST/ASTTypeTraits.cpp stable/10/contrib/llvm/tools/clang/lib/AST/MangleNumberingContext.cpp - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/AST/MangleNumberingContext.cpp stable/10/contrib/llvm/tools/clang/lib/ASTMatchers/Dynamic/ - copied from r261991, head/contrib/llvm/tools/clang/lib/ASTMatchers/Dynamic/ stable/10/contrib/llvm/tools/clang/lib/Analysis/Consumed.cpp - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/Analysis/Consumed.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CodeGenABITypes.cpp - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenABITypes.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/EHScopeStack.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/CodeGen/EHScopeStack.h stable/10/contrib/llvm/tools/clang/lib/CodeGen/MicrosoftVBTables.cpp - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/CodeGen/MicrosoftVBTables.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/MicrosoftVBTables.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/CodeGen/MicrosoftVBTables.h stable/10/contrib/llvm/tools/clang/lib/Driver/SanitizerArgs.cpp - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/Driver/SanitizerArgs.cpp stable/10/contrib/llvm/tools/clang/lib/Format/ContinuationIndenter.cpp - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/Format/ContinuationIndenter.cpp stable/10/contrib/llvm/tools/clang/lib/Format/ContinuationIndenter.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/Format/ContinuationIndenter.h stable/10/contrib/llvm/tools/clang/lib/Format/Encoding.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/Format/Encoding.h stable/10/contrib/llvm/tools/clang/lib/Format/FormatToken.cpp - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/Format/FormatToken.cpp stable/10/contrib/llvm/tools/clang/lib/Format/FormatToken.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/Format/FormatToken.h stable/10/contrib/llvm/tools/clang/lib/Headers/Intrin.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/Headers/Intrin.h stable/10/contrib/llvm/tools/clang/lib/Headers/shaintrin.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/Headers/shaintrin.h stable/10/contrib/llvm/tools/clang/lib/Headers/tbmintrin.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/Headers/tbmintrin.h stable/10/contrib/llvm/tools/clang/lib/Index/ - copied from r261991, head/contrib/llvm/tools/clang/lib/Index/ stable/10/contrib/llvm/tools/clang/lib/Sema/TypeLocBuilder.cpp - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/Sema/TypeLocBuilder.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/IdenticalExprChecker.cpp - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/IdenticalExprChecker.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CommonBugCategories.cpp - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CommonBugCategories.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/PrettyStackTraceLocationContext.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/PrettyStackTraceLocationContext.h stable/10/contrib/llvm/tools/lli/ChildTarget/ - copied from r261991, head/contrib/llvm/tools/lli/ChildTarget/ stable/10/contrib/llvm/tools/lli/RemoteMemoryManager.cpp - copied unchanged from r261991, head/contrib/llvm/tools/lli/RemoteMemoryManager.cpp stable/10/contrib/llvm/tools/lli/RemoteMemoryManager.h - copied unchanged from r261991, head/contrib/llvm/tools/lli/RemoteMemoryManager.h stable/10/contrib/llvm/tools/lli/RemoteTargetExternal.cpp - copied unchanged from r261991, head/contrib/llvm/tools/lli/RemoteTargetExternal.cpp stable/10/contrib/llvm/tools/lli/RemoteTargetExternal.h - copied unchanged from r261991, head/contrib/llvm/tools/lli/RemoteTargetExternal.h stable/10/contrib/llvm/tools/lli/RemoteTargetMessage.h - copied unchanged from r261991, head/contrib/llvm/tools/lli/RemoteTargetMessage.h stable/10/contrib/llvm/tools/lli/Unix/ - copied from r261991, head/contrib/llvm/tools/lli/Unix/ stable/10/contrib/llvm/tools/lli/Windows/ - copied from r261991, head/contrib/llvm/tools/lli/Windows/ stable/10/lib/clang/include/PPCGenFastISel.inc - copied unchanged from r261991, head/lib/clang/include/PPCGenFastISel.inc stable/10/lib/clang/include/clang/Parse/AttrIdentifierArg.inc - copied unchanged from r261991, head/lib/clang/include/clang/Parse/AttrIdentifierArg.inc stable/10/lib/clang/include/clang/Parse/AttrTypeArg.inc - copied unchanged from r261991, head/lib/clang/include/clang/Parse/AttrTypeArg.inc stable/10/lib/clang/include/clang/Sema/AttrParsedAttrImpl.inc - copied unchanged from r261991, head/lib/clang/include/clang/Sema/AttrParsedAttrImpl.inc stable/10/lib/clang/libllvmoption/ - copied from r261991, head/lib/clang/libllvmoption/ Deleted: stable/10/contrib/llvm/include/llvm/ADT/NullablePtr.h stable/10/contrib/llvm/include/llvm/Analysis/PathNumbering.h stable/10/contrib/llvm/include/llvm/Analysis/PathProfileInfo.h stable/10/contrib/llvm/include/llvm/Analysis/ProfileDataLoader.h stable/10/contrib/llvm/include/llvm/Analysis/ProfileDataTypes.h stable/10/contrib/llvm/include/llvm/Analysis/ProfileInfo.h stable/10/contrib/llvm/include/llvm/Analysis/ProfileInfoLoader.h stable/10/contrib/llvm/include/llvm/Analysis/ProfileInfoTypes.h stable/10/contrib/llvm/include/llvm/Bitcode/Archive.h stable/10/contrib/llvm/include/llvm/Object/MachOFormat.h stable/10/contrib/llvm/include/llvm/PassManagers.h stable/10/contrib/llvm/include/llvm/Support/IntegersSubset.h stable/10/contrib/llvm/include/llvm/Support/IntegersSubsetMapping.h stable/10/contrib/llvm/include/llvm/Support/PathV1.h stable/10/contrib/llvm/include/llvm/Support/PathV2.h stable/10/contrib/llvm/include/llvm/Transforms/Utils/BlackList.h stable/10/contrib/llvm/lib/Analysis/PathNumbering.cpp stable/10/contrib/llvm/lib/Analysis/PathProfileInfo.cpp stable/10/contrib/llvm/lib/Analysis/PathProfileVerifier.cpp stable/10/contrib/llvm/lib/Analysis/ProfileDataLoader.cpp stable/10/contrib/llvm/lib/Analysis/ProfileDataLoaderPass.cpp stable/10/contrib/llvm/lib/Analysis/ProfileEstimatorPass.cpp stable/10/contrib/llvm/lib/Analysis/ProfileInfo.cpp stable/10/contrib/llvm/lib/Analysis/ProfileInfoLoader.cpp stable/10/contrib/llvm/lib/Analysis/ProfileInfoLoaderPass.cpp stable/10/contrib/llvm/lib/Analysis/ProfileVerifierPass.cpp stable/10/contrib/llvm/lib/Archive/ stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/SDNodeOrdering.h stable/10/contrib/llvm/lib/CodeGen/ShrinkWrapping.cpp stable/10/contrib/llvm/lib/CodeGen/StrongPHIElimination.cpp stable/10/contrib/llvm/lib/DebugInfo/DWARFAttribute.h stable/10/contrib/llvm/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp stable/10/contrib/llvm/lib/ExecutionEngine/JIT/JITDwarfEmitter.h stable/10/contrib/llvm/lib/Support/LocaleGeneric.inc stable/10/contrib/llvm/lib/Support/LocaleWindows.inc stable/10/contrib/llvm/lib/Support/LocaleXlocale.inc stable/10/contrib/llvm/lib/Support/PathV2.cpp stable/10/contrib/llvm/lib/Support/Unix/PathV2.inc stable/10/contrib/llvm/lib/Support/Windows/PathV2.inc stable/10/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.h stable/10/contrib/llvm/lib/Target/MBlaze/ stable/10/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsDirectObjLower.cpp stable/10/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsDirectObjLower.h stable/10/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.cpp stable/10/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.h stable/10/contrib/llvm/lib/Target/NVPTX/NVPTXNumRegisters.h stable/10/contrib/llvm/lib/Target/R600/AMDGPUIndirectAddressing.cpp stable/10/contrib/llvm/lib/Target/R600/AMDGPUStructurizeCFG.cpp stable/10/contrib/llvm/lib/Target/R600/AMDIL.h stable/10/contrib/llvm/lib/Target/R600/AMDIL7XXDevice.cpp stable/10/contrib/llvm/lib/Target/R600/AMDIL7XXDevice.h stable/10/contrib/llvm/lib/Target/R600/AMDILDevice.cpp stable/10/contrib/llvm/lib/Target/R600/AMDILDevice.h stable/10/contrib/llvm/lib/Target/R600/AMDILDeviceInfo.cpp stable/10/contrib/llvm/lib/Target/R600/AMDILDeviceInfo.h stable/10/contrib/llvm/lib/Target/R600/AMDILDevices.h stable/10/contrib/llvm/lib/Target/R600/AMDILEvergreenDevice.cpp stable/10/contrib/llvm/lib/Target/R600/AMDILEvergreenDevice.h stable/10/contrib/llvm/lib/Target/R600/AMDILISelDAGToDAG.cpp stable/10/contrib/llvm/lib/Target/R600/AMDILNIDevice.cpp stable/10/contrib/llvm/lib/Target/R600/AMDILNIDevice.h stable/10/contrib/llvm/lib/Target/R600/AMDILSIDevice.cpp stable/10/contrib/llvm/lib/Target/R600/AMDILSIDevice.h stable/10/contrib/llvm/lib/Target/Sparc/FPMover.cpp stable/10/contrib/llvm/lib/Transforms/Instrumentation/BlackList.cpp stable/10/contrib/llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp stable/10/contrib/llvm/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp stable/10/contrib/llvm/lib/Transforms/Instrumentation/PathProfiling.cpp stable/10/contrib/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp stable/10/contrib/llvm/lib/Transforms/Instrumentation/ProfilingUtils.h stable/10/contrib/llvm/lib/Transforms/Scalar/BasicBlockPlacement.cpp stable/10/contrib/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp stable/10/contrib/llvm/lib/Transforms/Vectorize/VecUtils.cpp stable/10/contrib/llvm/lib/Transforms/Vectorize/VecUtils.h stable/10/contrib/llvm/tools/clang/include/clang/AST/LambdaMangleContext.h stable/10/contrib/llvm/tools/clang/include/clang/Analysis/Support/BlkExprDeclBitVector.h stable/10/contrib/llvm/tools/clang/include/clang/Analysis/Visitors/ stable/10/contrib/llvm/tools/clang/include/clang/Driver/Arg.h stable/10/contrib/llvm/tools/clang/include/clang/Driver/ArgList.h stable/10/contrib/llvm/tools/clang/include/clang/Driver/OptParser.td stable/10/contrib/llvm/tools/clang/include/clang/Driver/OptSpecifier.h stable/10/contrib/llvm/tools/clang/include/clang/Driver/OptTable.h stable/10/contrib/llvm/tools/clang/include/clang/Driver/Option.h stable/10/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/CommonBugCategories.h stable/10/contrib/llvm/tools/clang/lib/AST/DumpXML.cpp stable/10/contrib/llvm/tools/clang/lib/AST/LambdaMangleContext.cpp stable/10/contrib/llvm/tools/clang/lib/Driver/Arg.cpp stable/10/contrib/llvm/tools/clang/lib/Driver/ArgList.cpp stable/10/contrib/llvm/tools/clang/lib/Driver/OptTable.cpp stable/10/contrib/llvm/tools/clang/lib/Driver/Option.cpp stable/10/contrib/llvm/tools/clang/lib/Driver/SanitizerArgs.h stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CommonBugCategories.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/TextPathDiagnostics.cpp stable/10/contrib/llvm/tools/clang/utils/TableGen/OptParserEmitter.cpp stable/10/contrib/llvm/tools/lli/RecordingMemoryManager.cpp stable/10/contrib/llvm/tools/lli/RecordingMemoryManager.h stable/10/contrib/llvm/tools/llvm-objdump/MCFunction.cpp stable/10/contrib/llvm/tools/llvm-objdump/MCFunction.h stable/10/contrib/llvm/tools/llvm-prof/ stable/10/contrib/llvm/tools/llvm-ranlib/ stable/10/contrib/llvm/tools/llvm-stub/ stable/10/contrib/llvm/utils/TableGen/StringToOffsetTable.h stable/10/lib/clang/include/clang/Parse/AttrExprArgs.inc stable/10/lib/clang/libllvmarchive/ stable/10/usr.bin/clang/llvm-prof/ stable/10/usr.bin/clang/llvm-ranlib/ Modified: stable/10/ObsoleteFiles.inc stable/10/UPDATING stable/10/contrib/gcc/libgcc2.c stable/10/contrib/gcc/libgcc2.h stable/10/contrib/llvm/LICENSE.TXT stable/10/contrib/llvm/include/llvm-c/BitReader.h stable/10/contrib/llvm/include/llvm-c/BitWriter.h stable/10/contrib/llvm/include/llvm-c/Core.h stable/10/contrib/llvm/include/llvm-c/Disassembler.h stable/10/contrib/llvm/include/llvm-c/ExecutionEngine.h stable/10/contrib/llvm/include/llvm-c/LinkTimeOptimizer.h stable/10/contrib/llvm/include/llvm-c/Object.h stable/10/contrib/llvm/include/llvm-c/Target.h stable/10/contrib/llvm/include/llvm-c/TargetMachine.h stable/10/contrib/llvm/include/llvm-c/Transforms/Scalar.h stable/10/contrib/llvm/include/llvm-c/lto.h stable/10/contrib/llvm/include/llvm/ADT/APFloat.h stable/10/contrib/llvm/include/llvm/ADT/APInt.h stable/10/contrib/llvm/include/llvm/ADT/APSInt.h stable/10/contrib/llvm/include/llvm/ADT/ArrayRef.h stable/10/contrib/llvm/include/llvm/ADT/BitVector.h stable/10/contrib/llvm/include/llvm/ADT/DenseMap.h stable/10/contrib/llvm/include/llvm/ADT/FoldingSet.h stable/10/contrib/llvm/include/llvm/ADT/ImmutableMap.h stable/10/contrib/llvm/include/llvm/ADT/ImmutableSet.h stable/10/contrib/llvm/include/llvm/ADT/IntervalMap.h stable/10/contrib/llvm/include/llvm/ADT/OwningPtr.h stable/10/contrib/llvm/include/llvm/ADT/PointerIntPair.h stable/10/contrib/llvm/include/llvm/ADT/PointerUnion.h stable/10/contrib/llvm/include/llvm/ADT/STLExtras.h stable/10/contrib/llvm/include/llvm/ADT/SetVector.h stable/10/contrib/llvm/include/llvm/ADT/SmallBitVector.h stable/10/contrib/llvm/include/llvm/ADT/SmallPtrSet.h stable/10/contrib/llvm/include/llvm/ADT/SmallVector.h stable/10/contrib/llvm/include/llvm/ADT/SparseBitVector.h stable/10/contrib/llvm/include/llvm/ADT/StringExtras.h stable/10/contrib/llvm/include/llvm/ADT/StringMap.h stable/10/contrib/llvm/include/llvm/ADT/StringRef.h stable/10/contrib/llvm/include/llvm/ADT/Triple.h stable/10/contrib/llvm/include/llvm/ADT/ilist.h stable/10/contrib/llvm/include/llvm/Analysis/AliasAnalysis.h stable/10/contrib/llvm/include/llvm/Analysis/BlockFrequencyImpl.h stable/10/contrib/llvm/include/llvm/Analysis/BlockFrequencyInfo.h stable/10/contrib/llvm/include/llvm/Analysis/BranchProbabilityInfo.h stable/10/contrib/llvm/include/llvm/Analysis/CFGPrinter.h stable/10/contrib/llvm/include/llvm/Analysis/CallGraph.h stable/10/contrib/llvm/include/llvm/Analysis/ConstantFolding.h stable/10/contrib/llvm/include/llvm/Analysis/DependenceAnalysis.h stable/10/contrib/llvm/include/llvm/Analysis/Dominators.h stable/10/contrib/llvm/include/llvm/Analysis/InlineCost.h stable/10/contrib/llvm/include/llvm/Analysis/InstructionSimplify.h stable/10/contrib/llvm/include/llvm/Analysis/LoopInfo.h stable/10/contrib/llvm/include/llvm/Analysis/LoopInfoImpl.h stable/10/contrib/llvm/include/llvm/Analysis/LoopPass.h stable/10/contrib/llvm/include/llvm/Analysis/MemoryBuiltins.h stable/10/contrib/llvm/include/llvm/Analysis/Passes.h stable/10/contrib/llvm/include/llvm/Analysis/PostDominators.h stable/10/contrib/llvm/include/llvm/Analysis/RegionPass.h stable/10/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h stable/10/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h stable/10/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h stable/10/contrib/llvm/include/llvm/Analysis/TargetTransformInfo.h stable/10/contrib/llvm/include/llvm/Analysis/ValueTracking.h stable/10/contrib/llvm/include/llvm/AutoUpgrade.h stable/10/contrib/llvm/include/llvm/Bitcode/BitstreamReader.h stable/10/contrib/llvm/include/llvm/Bitcode/BitstreamWriter.h stable/10/contrib/llvm/include/llvm/Bitcode/LLVMBitCodes.h stable/10/contrib/llvm/include/llvm/CodeGen/Analysis.h stable/10/contrib/llvm/include/llvm/CodeGen/AsmPrinter.h stable/10/contrib/llvm/include/llvm/CodeGen/CalcSpillWeights.h stable/10/contrib/llvm/include/llvm/CodeGen/CallingConvLower.h stable/10/contrib/llvm/include/llvm/CodeGen/CommandFlags.h stable/10/contrib/llvm/include/llvm/CodeGen/FastISel.h stable/10/contrib/llvm/include/llvm/CodeGen/FunctionLoweringInfo.h stable/10/contrib/llvm/include/llvm/CodeGen/ISDOpcodes.h stable/10/contrib/llvm/include/llvm/CodeGen/LexicalScopes.h stable/10/contrib/llvm/include/llvm/CodeGen/LiveInterval.h stable/10/contrib/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h stable/10/contrib/llvm/include/llvm/CodeGen/LiveIntervalUnion.h stable/10/contrib/llvm/include/llvm/CodeGen/LiveRangeEdit.h stable/10/contrib/llvm/include/llvm/CodeGen/LiveVariables.h stable/10/contrib/llvm/include/llvm/CodeGen/MachineBasicBlock.h stable/10/contrib/llvm/include/llvm/CodeGen/MachineBranchProbabilityInfo.h stable/10/contrib/llvm/include/llvm/CodeGen/MachineConstantPool.h stable/10/contrib/llvm/include/llvm/CodeGen/MachineFrameInfo.h stable/10/contrib/llvm/include/llvm/CodeGen/MachineInstr.h stable/10/contrib/llvm/include/llvm/CodeGen/MachineInstrBuilder.h stable/10/contrib/llvm/include/llvm/CodeGen/MachineModuleInfo.h stable/10/contrib/llvm/include/llvm/CodeGen/MachineOperand.h stable/10/contrib/llvm/include/llvm/CodeGen/MachineRegisterInfo.h stable/10/contrib/llvm/include/llvm/CodeGen/MachineRelocation.h stable/10/contrib/llvm/include/llvm/CodeGen/MachineScheduler.h stable/10/contrib/llvm/include/llvm/CodeGen/PBQP/Graph.h stable/10/contrib/llvm/include/llvm/CodeGen/PBQP/HeuristicBase.h stable/10/contrib/llvm/include/llvm/CodeGen/PBQP/HeuristicSolver.h stable/10/contrib/llvm/include/llvm/CodeGen/PBQP/Heuristics/Briggs.h stable/10/contrib/llvm/include/llvm/CodeGen/PBQP/Solution.h stable/10/contrib/llvm/include/llvm/CodeGen/Passes.h stable/10/contrib/llvm/include/llvm/CodeGen/PseudoSourceValue.h stable/10/contrib/llvm/include/llvm/CodeGen/RegAllocPBQP.h stable/10/contrib/llvm/include/llvm/CodeGen/RegisterClassInfo.h stable/10/contrib/llvm/include/llvm/CodeGen/RegisterPressure.h stable/10/contrib/llvm/include/llvm/CodeGen/RegisterScavenging.h stable/10/contrib/llvm/include/llvm/CodeGen/RuntimeLibcalls.h stable/10/contrib/llvm/include/llvm/CodeGen/ScheduleDAG.h stable/10/contrib/llvm/include/llvm/CodeGen/ScheduleDAGInstrs.h stable/10/contrib/llvm/include/llvm/CodeGen/SelectionDAG.h stable/10/contrib/llvm/include/llvm/CodeGen/SelectionDAGISel.h stable/10/contrib/llvm/include/llvm/CodeGen/SelectionDAGNodes.h stable/10/contrib/llvm/include/llvm/CodeGen/SlotIndexes.h stable/10/contrib/llvm/include/llvm/CodeGen/TargetSchedule.h stable/10/contrib/llvm/include/llvm/CodeGen/ValueTypes.h stable/10/contrib/llvm/include/llvm/CodeGen/ValueTypes.td stable/10/contrib/llvm/include/llvm/DIBuilder.h stable/10/contrib/llvm/include/llvm/DebugInfo.h stable/10/contrib/llvm/include/llvm/DebugInfo/DIContext.h stable/10/contrib/llvm/include/llvm/DebugInfo/DWARFFormValue.h stable/10/contrib/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h stable/10/contrib/llvm/include/llvm/ExecutionEngine/JITMemoryManager.h stable/10/contrib/llvm/include/llvm/ExecutionEngine/ObjectBuffer.h stable/10/contrib/llvm/include/llvm/ExecutionEngine/ObjectCache.h stable/10/contrib/llvm/include/llvm/ExecutionEngine/ObjectImage.h stable/10/contrib/llvm/include/llvm/ExecutionEngine/RuntimeDyld.h stable/10/contrib/llvm/include/llvm/ExecutionEngine/SectionMemoryManager.h stable/10/contrib/llvm/include/llvm/GVMaterializer.h stable/10/contrib/llvm/include/llvm/IR/Argument.h stable/10/contrib/llvm/include/llvm/IR/Attributes.h stable/10/contrib/llvm/include/llvm/IR/CallingConv.h stable/10/contrib/llvm/include/llvm/IR/Constants.h stable/10/contrib/llvm/include/llvm/IR/DataLayout.h stable/10/contrib/llvm/include/llvm/IR/Function.h stable/10/contrib/llvm/include/llvm/IR/GlobalAlias.h stable/10/contrib/llvm/include/llvm/IR/GlobalValue.h stable/10/contrib/llvm/include/llvm/IR/GlobalVariable.h stable/10/contrib/llvm/include/llvm/IR/IRBuilder.h stable/10/contrib/llvm/include/llvm/IR/InlineAsm.h stable/10/contrib/llvm/include/llvm/IR/InstrTypes.h stable/10/contrib/llvm/include/llvm/IR/Instruction.def stable/10/contrib/llvm/include/llvm/IR/Instructions.h stable/10/contrib/llvm/include/llvm/IR/Intrinsics.h stable/10/contrib/llvm/include/llvm/IR/Intrinsics.td stable/10/contrib/llvm/include/llvm/IR/IntrinsicsARM.td stable/10/contrib/llvm/include/llvm/IR/IntrinsicsMips.td stable/10/contrib/llvm/include/llvm/IR/IntrinsicsNVVM.td stable/10/contrib/llvm/include/llvm/IR/IntrinsicsPowerPC.td stable/10/contrib/llvm/include/llvm/IR/IntrinsicsX86.td stable/10/contrib/llvm/include/llvm/IR/IntrinsicsXCore.td stable/10/contrib/llvm/include/llvm/IR/LLVMContext.h stable/10/contrib/llvm/include/llvm/IR/Metadata.h stable/10/contrib/llvm/include/llvm/IR/Module.h stable/10/contrib/llvm/include/llvm/IR/Operator.h stable/10/contrib/llvm/include/llvm/IR/Type.h stable/10/contrib/llvm/include/llvm/IR/TypeBuilder.h stable/10/contrib/llvm/include/llvm/IR/Use.h stable/10/contrib/llvm/include/llvm/IR/Value.h stable/10/contrib/llvm/include/llvm/InitializePasses.h stable/10/contrib/llvm/include/llvm/InstVisitor.h stable/10/contrib/llvm/include/llvm/LinkAllPasses.h stable/10/contrib/llvm/include/llvm/Linker.h stable/10/contrib/llvm/include/llvm/MC/MCAsmBackend.h stable/10/contrib/llvm/include/llvm/MC/MCAsmInfo.h stable/10/contrib/llvm/include/llvm/MC/MCAssembler.h stable/10/contrib/llvm/include/llvm/MC/MCAtom.h stable/10/contrib/llvm/include/llvm/MC/MCCodeGenInfo.h stable/10/contrib/llvm/include/llvm/MC/MCContext.h stable/10/contrib/llvm/include/llvm/MC/MCDisassembler.h stable/10/contrib/llvm/include/llvm/MC/MCDwarf.h stable/10/contrib/llvm/include/llvm/MC/MCELFObjectWriter.h stable/10/contrib/llvm/include/llvm/MC/MCELFStreamer.h stable/10/contrib/llvm/include/llvm/MC/MCELFSymbolFlags.h stable/10/contrib/llvm/include/llvm/MC/MCExpr.h stable/10/contrib/llvm/include/llvm/MC/MCInstPrinter.h stable/10/contrib/llvm/include/llvm/MC/MCInstrAnalysis.h stable/10/contrib/llvm/include/llvm/MC/MCInstrDesc.h stable/10/contrib/llvm/include/llvm/MC/MCInstrItineraries.h stable/10/contrib/llvm/include/llvm/MC/MCMachOSymbolFlags.h stable/10/contrib/llvm/include/llvm/MC/MCMachObjectWriter.h stable/10/contrib/llvm/include/llvm/MC/MCModule.h stable/10/contrib/llvm/include/llvm/MC/MCObjectFileInfo.h stable/10/contrib/llvm/include/llvm/MC/MCObjectStreamer.h stable/10/contrib/llvm/include/llvm/MC/MCParser/AsmLexer.h stable/10/contrib/llvm/include/llvm/MC/MCParser/MCAsmParser.h stable/10/contrib/llvm/include/llvm/MC/MCRegisterInfo.h stable/10/contrib/llvm/include/llvm/MC/MCSchedule.h stable/10/contrib/llvm/include/llvm/MC/MCSectionCOFF.h stable/10/contrib/llvm/include/llvm/MC/MCSectionMachO.h stable/10/contrib/llvm/include/llvm/MC/MCStreamer.h stable/10/contrib/llvm/include/llvm/MC/MCSubtargetInfo.h stable/10/contrib/llvm/include/llvm/MC/MCTargetAsmParser.h stable/10/contrib/llvm/include/llvm/MC/MCWinCOFFObjectWriter.h stable/10/contrib/llvm/include/llvm/MC/MachineLocation.h stable/10/contrib/llvm/include/llvm/MC/SubtargetFeature.h stable/10/contrib/llvm/include/llvm/Object/Archive.h stable/10/contrib/llvm/include/llvm/Object/Binary.h stable/10/contrib/llvm/include/llvm/Object/COFF.h stable/10/contrib/llvm/include/llvm/Object/ELF.h stable/10/contrib/llvm/include/llvm/Object/Error.h stable/10/contrib/llvm/include/llvm/Object/MachO.h stable/10/contrib/llvm/include/llvm/Object/ObjectFile.h stable/10/contrib/llvm/include/llvm/Object/RelocVisitor.h stable/10/contrib/llvm/include/llvm/Option/ArgList.h stable/10/contrib/llvm/include/llvm/Option/OptParser.td stable/10/contrib/llvm/include/llvm/Option/OptTable.h stable/10/contrib/llvm/include/llvm/Option/Option.h stable/10/contrib/llvm/include/llvm/PassManager.h stable/10/contrib/llvm/include/llvm/Support/Allocator.h stable/10/contrib/llvm/include/llvm/Support/BlockFrequency.h stable/10/contrib/llvm/include/llvm/Support/CFG.h stable/10/contrib/llvm/include/llvm/Support/COFF.h stable/10/contrib/llvm/include/llvm/Support/CallSite.h stable/10/contrib/llvm/include/llvm/Support/Casting.h stable/10/contrib/llvm/include/llvm/Support/CommandLine.h stable/10/contrib/llvm/include/llvm/Support/Compiler.h stable/10/contrib/llvm/include/llvm/Support/Compression.h stable/10/contrib/llvm/include/llvm/Support/ConstantRange.h stable/10/contrib/llvm/include/llvm/Support/ConvertUTF.h stable/10/contrib/llvm/include/llvm/Support/DataTypes.h.in stable/10/contrib/llvm/include/llvm/Support/Debug.h stable/10/contrib/llvm/include/llvm/Support/DebugLoc.h stable/10/contrib/llvm/include/llvm/Support/Dwarf.h stable/10/contrib/llvm/include/llvm/Support/ELF.h stable/10/contrib/llvm/include/llvm/Support/ErrorOr.h stable/10/contrib/llvm/include/llvm/Support/FileSystem.h stable/10/contrib/llvm/include/llvm/Support/FileUtilities.h stable/10/contrib/llvm/include/llvm/Support/FormattedStream.h stable/10/contrib/llvm/include/llvm/Support/GCOV.h stable/10/contrib/llvm/include/llvm/Support/GetElementPtrTypeIterator.h stable/10/contrib/llvm/include/llvm/Support/GraphWriter.h stable/10/contrib/llvm/include/llvm/Support/Host.h stable/10/contrib/llvm/include/llvm/Support/LEB128.h stable/10/contrib/llvm/include/llvm/Support/MachO.h stable/10/contrib/llvm/include/llvm/Support/ManagedStatic.h stable/10/contrib/llvm/include/llvm/Support/MathExtras.h stable/10/contrib/llvm/include/llvm/Support/MemoryBuffer.h stable/10/contrib/llvm/include/llvm/Support/MemoryObject.h stable/10/contrib/llvm/include/llvm/Support/PassNameParser.h stable/10/contrib/llvm/include/llvm/Support/Path.h stable/10/contrib/llvm/include/llvm/Support/PatternMatch.h stable/10/contrib/llvm/include/llvm/Support/PrettyStackTrace.h stable/10/contrib/llvm/include/llvm/Support/Process.h stable/10/contrib/llvm/include/llvm/Support/Program.h stable/10/contrib/llvm/include/llvm/Support/RecyclingAllocator.h stable/10/contrib/llvm/include/llvm/Support/Regex.h stable/10/contrib/llvm/include/llvm/Support/Registry.h stable/10/contrib/llvm/include/llvm/Support/Signals.h stable/10/contrib/llvm/include/llvm/Support/Solaris.h stable/10/contrib/llvm/include/llvm/Support/SourceMgr.h stable/10/contrib/llvm/include/llvm/Support/StreamableMemoryObject.h stable/10/contrib/llvm/include/llvm/Support/SystemUtils.h stable/10/contrib/llvm/include/llvm/Support/TargetRegistry.h stable/10/contrib/llvm/include/llvm/Support/TimeValue.h stable/10/contrib/llvm/include/llvm/Support/ToolOutputFile.h stable/10/contrib/llvm/include/llvm/Support/Valgrind.h stable/10/contrib/llvm/include/llvm/Support/ValueHandle.h stable/10/contrib/llvm/include/llvm/Support/YAMLParser.h stable/10/contrib/llvm/include/llvm/Support/YAMLTraits.h stable/10/contrib/llvm/include/llvm/Support/raw_ostream.h stable/10/contrib/llvm/include/llvm/TableGen/Record.h stable/10/contrib/llvm/include/llvm/TableGen/TableGenBackend.h stable/10/contrib/llvm/include/llvm/Target/CostTable.h stable/10/contrib/llvm/include/llvm/Target/Mangler.h stable/10/contrib/llvm/include/llvm/Target/Target.td stable/10/contrib/llvm/include/llvm/Target/TargetCallingConv.h stable/10/contrib/llvm/include/llvm/Target/TargetCallingConv.td stable/10/contrib/llvm/include/llvm/Target/TargetFrameLowering.h stable/10/contrib/llvm/include/llvm/Target/TargetInstrInfo.h stable/10/contrib/llvm/include/llvm/Target/TargetLibraryInfo.h stable/10/contrib/llvm/include/llvm/Target/TargetLowering.h stable/10/contrib/llvm/include/llvm/Target/TargetLoweringObjectFile.h stable/10/contrib/llvm/include/llvm/Target/TargetMachine.h stable/10/contrib/llvm/include/llvm/Target/TargetOpcodes.h stable/10/contrib/llvm/include/llvm/Target/TargetOptions.h stable/10/contrib/llvm/include/llvm/Target/TargetRegisterInfo.h stable/10/contrib/llvm/include/llvm/Target/TargetSchedule.td stable/10/contrib/llvm/include/llvm/Target/TargetSelectionDAG.td stable/10/contrib/llvm/include/llvm/Target/TargetSelectionDAGInfo.h stable/10/contrib/llvm/include/llvm/Target/TargetSubtargetInfo.h stable/10/contrib/llvm/include/llvm/Transforms/IPO.h stable/10/contrib/llvm/include/llvm/Transforms/IPO/PassManagerBuilder.h stable/10/contrib/llvm/include/llvm/Transforms/Instrumentation.h stable/10/contrib/llvm/include/llvm/Transforms/Scalar.h stable/10/contrib/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h stable/10/contrib/llvm/include/llvm/Transforms/Utils/Cloning.h stable/10/contrib/llvm/include/llvm/Transforms/Utils/Local.h stable/10/contrib/llvm/include/llvm/Transforms/Utils/ModuleUtils.h stable/10/contrib/llvm/include/llvm/Transforms/Utils/PromoteMemToReg.h stable/10/contrib/llvm/include/llvm/Transforms/Utils/SSAUpdater.h stable/10/contrib/llvm/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h stable/10/contrib/llvm/include/llvm/Transforms/Utils/ValueMapper.h stable/10/contrib/llvm/include/llvm/Transforms/Vectorize.h stable/10/contrib/llvm/lib/Analysis/AliasAnalysis.cpp stable/10/contrib/llvm/lib/Analysis/AliasSetTracker.cpp stable/10/contrib/llvm/lib/Analysis/Analysis.cpp stable/10/contrib/llvm/lib/Analysis/BasicAliasAnalysis.cpp stable/10/contrib/llvm/lib/Analysis/BlockFrequencyInfo.cpp stable/10/contrib/llvm/lib/Analysis/BranchProbabilityInfo.cpp stable/10/contrib/llvm/lib/Analysis/CaptureTracking.cpp stable/10/contrib/llvm/lib/Analysis/ConstantFolding.cpp stable/10/contrib/llvm/lib/Analysis/CostModel.cpp stable/10/contrib/llvm/lib/Analysis/DependenceAnalysis.cpp stable/10/contrib/llvm/lib/Analysis/IPA/CallGraph.cpp stable/10/contrib/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp stable/10/contrib/llvm/lib/Analysis/IPA/GlobalsModRef.cpp stable/10/contrib/llvm/lib/Analysis/IPA/IPA.cpp stable/10/contrib/llvm/lib/Analysis/IPA/InlineCost.cpp stable/10/contrib/llvm/lib/Analysis/InstructionSimplify.cpp stable/10/contrib/llvm/lib/Analysis/LazyValueInfo.cpp stable/10/contrib/llvm/lib/Analysis/Lint.cpp stable/10/contrib/llvm/lib/Analysis/LoopInfo.cpp stable/10/contrib/llvm/lib/Analysis/LoopPass.cpp stable/10/contrib/llvm/lib/Analysis/MemoryBuiltins.cpp stable/10/contrib/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp stable/10/contrib/llvm/lib/Analysis/RegionInfo.cpp stable/10/contrib/llvm/lib/Analysis/ScalarEvolution.cpp stable/10/contrib/llvm/lib/Analysis/ScalarEvolutionExpander.cpp stable/10/contrib/llvm/lib/Analysis/ScalarEvolutionNormalization.cpp stable/10/contrib/llvm/lib/Analysis/TargetTransformInfo.cpp stable/10/contrib/llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp stable/10/contrib/llvm/lib/Analysis/ValueTracking.cpp stable/10/contrib/llvm/lib/AsmParser/LLLexer.cpp stable/10/contrib/llvm/lib/AsmParser/LLParser.cpp stable/10/contrib/llvm/lib/AsmParser/LLParser.h stable/10/contrib/llvm/lib/AsmParser/LLToken.h stable/10/contrib/llvm/lib/AsmParser/Parser.cpp stable/10/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.cpp stable/10/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.h stable/10/contrib/llvm/lib/Bitcode/Reader/BitstreamReader.cpp stable/10/contrib/llvm/lib/Bitcode/Writer/BitWriter.cpp stable/10/contrib/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp stable/10/contrib/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp stable/10/contrib/llvm/lib/Bitcode/Writer/ValueEnumerator.h stable/10/contrib/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp stable/10/contrib/llvm/lib/CodeGen/Analysis.cpp stable/10/contrib/llvm/lib/CodeGen/AsmPrinter/ARMException.cpp stable/10/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp stable/10/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp stable/10/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp stable/10/contrib/llvm/lib/CodeGen/AsmPrinter/DIE.cpp stable/10/contrib/llvm/lib/CodeGen/AsmPrinter/DIE.h stable/10/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp stable/10/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.h stable/10/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp stable/10/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp stable/10/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h stable/10/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp stable/10/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h stable/10/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfException.h stable/10/contrib/llvm/lib/CodeGen/BasicTargetTransformInfo.cpp stable/10/contrib/llvm/lib/CodeGen/BranchFolding.cpp stable/10/contrib/llvm/lib/CodeGen/BranchFolding.h stable/10/contrib/llvm/lib/CodeGen/CalcSpillWeights.cpp stable/10/contrib/llvm/lib/CodeGen/CallingConvLower.cpp stable/10/contrib/llvm/lib/CodeGen/CodeGen.cpp stable/10/contrib/llvm/lib/CodeGen/CriticalAntiDepBreaker.cpp stable/10/contrib/llvm/lib/CodeGen/CriticalAntiDepBreaker.h stable/10/contrib/llvm/lib/CodeGen/DFAPacketizer.cpp stable/10/contrib/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp stable/10/contrib/llvm/lib/CodeGen/DwarfEHPrepare.cpp stable/10/contrib/llvm/lib/CodeGen/ExecutionDepsFix.cpp stable/10/contrib/llvm/lib/CodeGen/ExpandPostRAPseudos.cpp stable/10/contrib/llvm/lib/CodeGen/IfConversion.cpp stable/10/contrib/llvm/lib/CodeGen/InlineSpiller.cpp stable/10/contrib/llvm/lib/CodeGen/InterferenceCache.cpp stable/10/contrib/llvm/lib/CodeGen/InterferenceCache.h stable/10/contrib/llvm/lib/CodeGen/IntrinsicLowering.cpp stable/10/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp stable/10/contrib/llvm/lib/CodeGen/LexicalScopes.cpp stable/10/contrib/llvm/lib/CodeGen/LiveDebugVariables.cpp stable/10/contrib/llvm/lib/CodeGen/LiveDebugVariables.h stable/10/contrib/llvm/lib/CodeGen/LiveInterval.cpp stable/10/contrib/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp stable/10/contrib/llvm/lib/CodeGen/LiveRangeCalc.cpp stable/10/contrib/llvm/lib/CodeGen/LiveRangeCalc.h stable/10/contrib/llvm/lib/CodeGen/LiveRangeEdit.cpp stable/10/contrib/llvm/lib/CodeGen/LiveRegMatrix.cpp stable/10/contrib/llvm/lib/CodeGen/LiveVariables.cpp stable/10/contrib/llvm/lib/CodeGen/MachineBasicBlock.cpp stable/10/contrib/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp stable/10/contrib/llvm/lib/CodeGen/MachineBlockPlacement.cpp stable/10/contrib/llvm/lib/CodeGen/MachineCSE.cpp stable/10/contrib/llvm/lib/CodeGen/MachineCopyPropagation.cpp stable/10/contrib/llvm/lib/CodeGen/MachineFunction.cpp stable/10/contrib/llvm/lib/CodeGen/MachineInstr.cpp stable/10/contrib/llvm/lib/CodeGen/MachineLICM.cpp stable/10/contrib/llvm/lib/CodeGen/MachineModuleInfo.cpp stable/10/contrib/llvm/lib/CodeGen/MachineRegisterInfo.cpp stable/10/contrib/llvm/lib/CodeGen/MachineSSAUpdater.cpp stable/10/contrib/llvm/lib/CodeGen/MachineScheduler.cpp stable/10/contrib/llvm/lib/CodeGen/MachineSink.cpp stable/10/contrib/llvm/lib/CodeGen/MachineTraceMetrics.cpp stable/10/contrib/llvm/lib/CodeGen/MachineVerifier.cpp stable/10/contrib/llvm/lib/CodeGen/PHIElimination.cpp stable/10/contrib/llvm/lib/CodeGen/PHIEliminationUtils.h stable/10/contrib/llvm/lib/CodeGen/Passes.cpp stable/10/contrib/llvm/lib/CodeGen/PeepholeOptimizer.cpp stable/10/contrib/llvm/lib/CodeGen/PostRASchedulerList.cpp stable/10/contrib/llvm/lib/CodeGen/ProcessImplicitDefs.cpp stable/10/contrib/llvm/lib/CodeGen/PrologEpilogInserter.cpp stable/10/contrib/llvm/lib/CodeGen/PrologEpilogInserter.h stable/10/contrib/llvm/lib/CodeGen/RegAllocBase.cpp stable/10/contrib/llvm/lib/CodeGen/RegAllocBase.h stable/10/contrib/llvm/lib/CodeGen/RegAllocBasic.cpp stable/10/contrib/llvm/lib/CodeGen/RegAllocFast.cpp stable/10/contrib/llvm/lib/CodeGen/RegAllocGreedy.cpp stable/10/contrib/llvm/lib/CodeGen/RegAllocPBQP.cpp stable/10/contrib/llvm/lib/CodeGen/RegisterClassInfo.cpp stable/10/contrib/llvm/lib/CodeGen/RegisterCoalescer.cpp stable/10/contrib/llvm/lib/CodeGen/RegisterPressure.cpp stable/10/contrib/llvm/lib/CodeGen/RegisterScavenging.cpp stable/10/contrib/llvm/lib/CodeGen/ScheduleDAG.cpp stable/10/contrib/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp stable/10/contrib/llvm/lib/CodeGen/SjLjEHPrepare.cpp stable/10/contrib/llvm/lib/CodeGen/SpillPlacement.cpp stable/10/contrib/llvm/lib/CodeGen/SpillPlacement.h stable/10/contrib/llvm/lib/CodeGen/Spiller.cpp stable/10/contrib/llvm/lib/CodeGen/SplitKit.cpp stable/10/contrib/llvm/lib/CodeGen/SplitKit.h stable/10/contrib/llvm/lib/CodeGen/StackColoring.cpp stable/10/contrib/llvm/lib/CodeGen/StackProtector.cpp stable/10/contrib/llvm/lib/CodeGen/StackSlotColoring.cpp stable/10/contrib/llvm/lib/CodeGen/TailDuplication.cpp stable/10/contrib/llvm/lib/CodeGen/TargetInstrInfo.cpp stable/10/contrib/llvm/lib/CodeGen/TargetLoweringBase.cpp stable/10/contrib/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp stable/10/contrib/llvm/lib/CodeGen/TargetOptionsImpl.cpp stable/10/contrib/llvm/lib/CodeGen/TargetRegisterInfo.cpp stable/10/contrib/llvm/lib/CodeGen/TargetSchedule.cpp stable/10/contrib/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp stable/10/contrib/llvm/lib/CodeGen/UnreachableBlockElim.cpp stable/10/contrib/llvm/lib/CodeGen/VirtRegMap.cpp stable/10/contrib/llvm/lib/DebugInfo/DWARFAbbreviationDeclaration.cpp stable/10/contrib/llvm/lib/DebugInfo/DWARFAbbreviationDeclaration.h stable/10/contrib/llvm/lib/DebugInfo/DWARFCompileUnit.cpp stable/10/contrib/llvm/lib/DebugInfo/DWARFCompileUnit.h stable/10/contrib/llvm/lib/DebugInfo/DWARFContext.cpp stable/10/contrib/llvm/lib/DebugInfo/DWARFContext.h stable/10/contrib/llvm/lib/DebugInfo/DWARFDebugArangeSet.cpp stable/10/contrib/llvm/lib/DebugInfo/DWARFDebugArangeSet.h stable/10/contrib/llvm/lib/DebugInfo/DWARFDebugAranges.cpp stable/10/contrib/llvm/lib/DebugInfo/DWARFDebugAranges.h stable/10/contrib/llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp stable/10/contrib/llvm/lib/DebugInfo/DWARFDebugInfoEntry.h stable/10/contrib/llvm/lib/DebugInfo/DWARFDebugLine.cpp stable/10/contrib/llvm/lib/DebugInfo/DWARFFormValue.cpp stable/10/contrib/llvm/lib/ExecutionEngine/ExecutionEngine.cpp stable/10/contrib/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp stable/10/contrib/llvm/lib/ExecutionEngine/IntelJITEvents/IntelJITEventsWrapper.h stable/10/contrib/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp stable/10/contrib/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp stable/10/contrib/llvm/lib/ExecutionEngine/Interpreter/Interpreter.h stable/10/contrib/llvm/lib/ExecutionEngine/JIT/JIT.cpp stable/10/contrib/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp stable/10/contrib/llvm/lib/ExecutionEngine/JIT/JITMemoryManager.cpp stable/10/contrib/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp stable/10/contrib/llvm/lib/ExecutionEngine/MCJIT/MCJIT.h stable/10/contrib/llvm/lib/ExecutionEngine/MCJIT/SectionMemoryManager.cpp stable/10/contrib/llvm/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp stable/10/contrib/llvm/lib/ExecutionEngine/OProfileJIT/OProfileWrapper.cpp stable/10/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/JITRegistrar.h stable/10/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h stable/10/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp stable/10/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp stable/10/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h stable/10/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h stable/10/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp stable/10/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h stable/10/contrib/llvm/lib/ExecutionEngine/TargetSelect.cpp stable/10/contrib/llvm/lib/IR/AsmWriter.cpp stable/10/contrib/llvm/lib/IR/AttributeImpl.h stable/10/contrib/llvm/lib/IR/Attributes.cpp stable/10/contrib/llvm/lib/IR/AutoUpgrade.cpp stable/10/contrib/llvm/lib/IR/ConstantFold.cpp stable/10/contrib/llvm/lib/IR/Constants.cpp stable/10/contrib/llvm/lib/IR/Core.cpp stable/10/contrib/llvm/lib/IR/DIBuilder.cpp stable/10/contrib/llvm/lib/IR/DataLayout.cpp stable/10/contrib/llvm/lib/IR/DebugInfo.cpp stable/10/contrib/llvm/lib/IR/Function.cpp stable/10/contrib/llvm/lib/IR/GCOV.cpp stable/10/contrib/llvm/lib/IR/Globals.cpp stable/10/contrib/llvm/lib/IR/Instruction.cpp stable/10/contrib/llvm/lib/IR/Instructions.cpp stable/10/contrib/llvm/lib/IR/LLVMContextImpl.h stable/10/contrib/llvm/lib/IR/Metadata.cpp stable/10/contrib/llvm/lib/IR/Module.cpp stable/10/contrib/llvm/lib/IR/PassManager.cpp stable/10/contrib/llvm/lib/IR/PassRegistry.cpp stable/10/contrib/llvm/lib/IR/Type.cpp stable/10/contrib/llvm/lib/IR/TypeFinder.cpp stable/10/contrib/llvm/lib/IR/Value.cpp stable/10/contrib/llvm/lib/IR/ValueTypes.cpp stable/10/contrib/llvm/lib/IR/Verifier.cpp stable/10/contrib/llvm/lib/IRReader/IRReader.cpp stable/10/contrib/llvm/lib/Linker/LinkModules.cpp stable/10/contrib/llvm/lib/MC/ELFObjectWriter.cpp stable/10/contrib/llvm/lib/MC/MCAsmBackend.cpp stable/10/contrib/llvm/lib/MC/MCAsmInfo.cpp stable/10/contrib/llvm/lib/MC/MCAsmInfoCOFF.cpp stable/10/contrib/llvm/lib/MC/MCAsmInfoDarwin.cpp stable/10/contrib/llvm/lib/MC/MCAsmStreamer.cpp stable/10/contrib/llvm/lib/MC/MCAssembler.cpp stable/10/contrib/llvm/lib/MC/MCAtom.cpp stable/10/contrib/llvm/lib/MC/MCContext.cpp stable/10/contrib/llvm/lib/MC/MCDisassembler.cpp stable/10/contrib/llvm/lib/MC/MCDisassembler/Disassembler.cpp stable/10/contrib/llvm/lib/MC/MCDisassembler/Disassembler.h stable/10/contrib/llvm/lib/MC/MCDwarf.cpp stable/10/contrib/llvm/lib/MC/MCELF.cpp stable/10/contrib/llvm/lib/MC/MCELFObjectTargetWriter.cpp stable/10/contrib/llvm/lib/MC/MCELFStreamer.cpp stable/10/contrib/llvm/lib/MC/MCExpr.cpp stable/10/contrib/llvm/lib/MC/MCInstPrinter.cpp stable/10/contrib/llvm/lib/MC/MCInstrAnalysis.cpp stable/10/contrib/llvm/lib/MC/MCMachOStreamer.cpp stable/10/contrib/llvm/lib/MC/MCModule.cpp stable/10/contrib/llvm/lib/MC/MCNullStreamer.cpp stable/10/contrib/llvm/lib/MC/MCObjectFileInfo.cpp stable/10/contrib/llvm/lib/MC/MCObjectStreamer.cpp stable/10/contrib/llvm/lib/MC/MCParser/AsmLexer.cpp stable/10/contrib/llvm/lib/MC/MCParser/AsmParser.cpp stable/10/contrib/llvm/lib/MC/MCParser/COFFAsmParser.cpp stable/10/contrib/llvm/lib/MC/MCParser/DarwinAsmParser.cpp stable/10/contrib/llvm/lib/MC/MCParser/ELFAsmParser.cpp stable/10/contrib/llvm/lib/MC/MCPureStreamer.cpp stable/10/contrib/llvm/lib/MC/MCRegisterInfo.cpp stable/10/contrib/llvm/lib/MC/MCSectionCOFF.cpp stable/10/contrib/llvm/lib/MC/MCSectionELF.cpp stable/10/contrib/llvm/lib/MC/MCStreamer.cpp stable/10/contrib/llvm/lib/MC/MCSubtargetInfo.cpp stable/10/contrib/llvm/lib/MC/MCSymbol.cpp stable/10/contrib/llvm/lib/MC/MCWin64EH.cpp stable/10/contrib/llvm/lib/MC/MachObjectWriter.cpp stable/10/contrib/llvm/lib/MC/SubtargetFeature.cpp stable/10/contrib/llvm/lib/MC/WinCOFFObjectWriter.cpp stable/10/contrib/llvm/lib/MC/WinCOFFStreamer.cpp stable/10/contrib/llvm/lib/Object/Archive.cpp stable/10/contrib/llvm/lib/Object/Binary.cpp stable/10/contrib/llvm/lib/Object/COFFObjectFile.cpp stable/10/contrib/llvm/lib/Object/ELFObjectFile.cpp stable/10/contrib/llvm/lib/Object/Error.cpp stable/10/contrib/llvm/lib/Object/MachOObjectFile.cpp stable/10/contrib/llvm/lib/Object/Object.cpp stable/10/contrib/llvm/lib/Object/ObjectFile.cpp stable/10/contrib/llvm/lib/Option/ArgList.cpp stable/10/contrib/llvm/lib/Option/OptTable.cpp stable/10/contrib/llvm/lib/Option/Option.cpp stable/10/contrib/llvm/lib/Support/APFloat.cpp stable/10/contrib/llvm/lib/Support/APInt.cpp stable/10/contrib/llvm/lib/Support/Allocator.cpp stable/10/contrib/llvm/lib/Support/BlockFrequency.cpp stable/10/contrib/llvm/lib/Support/CommandLine.cpp stable/10/contrib/llvm/lib/Support/Compression.cpp stable/10/contrib/llvm/lib/Support/ConstantRange.cpp stable/10/contrib/llvm/lib/Support/ConvertUTFWrapper.cpp stable/10/contrib/llvm/lib/Support/CrashRecoveryContext.cpp stable/10/contrib/llvm/lib/Support/DataStream.cpp stable/10/contrib/llvm/lib/Support/Disassembler.cpp stable/10/contrib/llvm/lib/Support/Dwarf.cpp stable/10/contrib/llvm/lib/Support/DynamicLibrary.cpp stable/10/contrib/llvm/lib/Support/Errno.cpp stable/10/contrib/llvm/lib/Support/ErrorHandling.cpp stable/10/contrib/llvm/lib/Support/FileOutputBuffer.cpp stable/10/contrib/llvm/lib/Support/FileUtilities.cpp stable/10/contrib/llvm/lib/Support/FormattedStream.cpp stable/10/contrib/llvm/lib/Support/GraphWriter.cpp stable/10/contrib/llvm/lib/Support/Host.cpp stable/10/contrib/llvm/lib/Support/Locale.cpp stable/10/contrib/llvm/lib/Support/LockFileManager.cpp stable/10/contrib/llvm/lib/Support/MemoryBuffer.cpp stable/10/contrib/llvm/lib/Support/MemoryObject.cpp stable/10/contrib/llvm/lib/Support/Path.cpp stable/10/contrib/llvm/lib/Support/PrettyStackTrace.cpp stable/10/contrib/llvm/lib/Support/Process.cpp stable/10/contrib/llvm/lib/Support/Program.cpp stable/10/contrib/llvm/lib/Support/Regex.cpp stable/10/contrib/llvm/lib/Support/SmallPtrSet.cpp stable/10/contrib/llvm/lib/Support/SourceMgr.cpp stable/10/contrib/llvm/lib/Support/StreamableMemoryObject.cpp stable/10/contrib/llvm/lib/Support/StringRef.cpp stable/10/contrib/llvm/lib/Support/SystemUtils.cpp stable/10/contrib/llvm/lib/Support/TargetRegistry.cpp stable/10/contrib/llvm/lib/Support/ThreadLocal.cpp stable/10/contrib/llvm/lib/Support/Timer.cpp stable/10/contrib/llvm/lib/Support/ToolOutputFile.cpp stable/10/contrib/llvm/lib/Support/Triple.cpp stable/10/contrib/llvm/lib/Support/Unix/Memory.inc stable/10/contrib/llvm/lib/Support/Unix/Path.inc stable/10/contrib/llvm/lib/Support/Unix/Process.inc stable/10/contrib/llvm/lib/Support/Unix/Program.inc stable/10/contrib/llvm/lib/Support/Unix/Signals.inc stable/10/contrib/llvm/lib/Support/Unix/ThreadLocal.inc stable/10/contrib/llvm/lib/Support/Unix/TimeValue.inc stable/10/contrib/llvm/lib/Support/Unix/Unix.h stable/10/contrib/llvm/lib/Support/Windows/DynamicLibrary.inc stable/10/contrib/llvm/lib/Support/Windows/Memory.inc stable/10/contrib/llvm/lib/Support/Windows/Path.inc stable/10/contrib/llvm/lib/Support/Windows/Process.inc stable/10/contrib/llvm/lib/Support/Windows/Program.inc stable/10/contrib/llvm/lib/Support/Windows/RWMutex.inc stable/10/contrib/llvm/lib/Support/Windows/Signals.inc stable/10/contrib/llvm/lib/Support/Windows/TimeValue.inc stable/10/contrib/llvm/lib/Support/Windows/Windows.h stable/10/contrib/llvm/lib/Support/YAMLParser.cpp stable/10/contrib/llvm/lib/Support/YAMLTraits.cpp stable/10/contrib/llvm/lib/Support/raw_ostream.cpp stable/10/contrib/llvm/lib/TableGen/Main.cpp stable/10/contrib/llvm/lib/TableGen/Record.cpp stable/10/contrib/llvm/lib/TableGen/TGParser.cpp stable/10/contrib/llvm/lib/Target/AArch64/AArch64.td stable/10/contrib/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp stable/10/contrib/llvm/lib/Target/AArch64/AArch64AsmPrinter.h stable/10/contrib/llvm/lib/Target/AArch64/AArch64BranchFixupPass.cpp stable/10/contrib/llvm/lib/Target/AArch64/AArch64CallingConv.td stable/10/contrib/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp stable/10/contrib/llvm/lib/Target/AArch64/AArch64FrameLowering.h stable/10/contrib/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp stable/10/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp stable/10/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.h stable/10/contrib/llvm/lib/Target/AArch64/AArch64InstrFormats.td stable/10/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp stable/10/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.h stable/10/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.td stable/10/contrib/llvm/lib/Target/AArch64/AArch64MCInstLower.cpp stable/10/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp stable/10/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.h stable/10/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.td stable/10/contrib/llvm/lib/Target/AArch64/AArch64Subtarget.cpp stable/10/contrib/llvm/lib/Target/AArch64/AArch64Subtarget.h stable/10/contrib/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp stable/10/contrib/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp stable/10/contrib/llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp stable/10/contrib/llvm/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp stable/10/contrib/llvm/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.h stable/10/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp stable/10/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp stable/10/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp stable/10/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.h stable/10/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp stable/10/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp stable/10/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.h stable/10/contrib/llvm/lib/Target/AArch64/TargetInfo/AArch64TargetInfo.cpp stable/10/contrib/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.cpp stable/10/contrib/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h stable/10/contrib/llvm/lib/Target/ARM/A15SDOptimizer.cpp stable/10/contrib/llvm/lib/Target/ARM/ARM.td stable/10/contrib/llvm/lib/Target/ARM/ARMAsmPrinter.cpp stable/10/contrib/llvm/lib/Target/ARM/ARMAsmPrinter.h stable/10/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp stable/10/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.h stable/10/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp stable/10/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h stable/10/contrib/llvm/lib/Target/ARM/ARMBuildAttrs.h stable/10/contrib/llvm/lib/Target/ARM/ARMCallingConv.td stable/10/contrib/llvm/lib/Target/ARM/ARMCodeEmitter.cpp stable/10/contrib/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp stable/10/contrib/llvm/lib/Target/ARM/ARMConstantPoolValue.cpp stable/10/contrib/llvm/lib/Target/ARM/ARMConstantPoolValue.h stable/10/contrib/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp stable/10/contrib/llvm/lib/Target/ARM/ARMFastISel.cpp stable/10/contrib/llvm/lib/Target/ARM/ARMFrameLowering.cpp stable/10/contrib/llvm/lib/Target/ARM/ARMHazardRecognizer.cpp stable/10/contrib/llvm/lib/Target/ARM/ARMHazardRecognizer.h stable/10/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp stable/10/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp stable/10/contrib/llvm/lib/Target/ARM/ARMISelLowering.h stable/10/contrib/llvm/lib/Target/ARM/ARMInstrFormats.td stable/10/contrib/llvm/lib/Target/ARM/ARMInstrInfo.cpp stable/10/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td stable/10/contrib/llvm/lib/Target/ARM/ARMInstrNEON.td stable/10/contrib/llvm/lib/Target/ARM/ARMInstrThumb.td stable/10/contrib/llvm/lib/Target/ARM/ARMInstrThumb2.td stable/10/contrib/llvm/lib/Target/ARM/ARMInstrVFP.td stable/10/contrib/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp stable/10/contrib/llvm/lib/Target/ARM/ARMMCInstLower.cpp stable/10/contrib/llvm/lib/Target/ARM/ARMMachineFunctionInfo.h stable/10/contrib/llvm/lib/Target/ARM/ARMRegisterInfo.cpp stable/10/contrib/llvm/lib/Target/ARM/ARMRegisterInfo.h stable/10/contrib/llvm/lib/Target/ARM/ARMRegisterInfo.td stable/10/contrib/llvm/lib/Target/ARM/ARMSchedule.td stable/10/contrib/llvm/lib/Target/ARM/ARMScheduleA9.td stable/10/contrib/llvm/lib/Target/ARM/ARMScheduleSwift.td stable/10/contrib/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp stable/10/contrib/llvm/lib/Target/ARM/ARMSelectionDAGInfo.h stable/10/contrib/llvm/lib/Target/ARM/ARMSubtarget.cpp stable/10/contrib/llvm/lib/Target/ARM/ARMSubtarget.h stable/10/contrib/llvm/lib/Target/ARM/ARMTargetMachine.cpp stable/10/contrib/llvm/lib/Target/ARM/ARMTargetObjectFile.cpp stable/10/contrib/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp stable/10/contrib/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp stable/10/contrib/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp stable/10/contrib/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp stable/10/contrib/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.h stable/10/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAddressingModes.h stable/10/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp stable/10/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMBaseInfo.h stable/10/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp stable/10/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp stable/10/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.h stable/10/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp stable/10/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp stable/10/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.h stable/10/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp stable/10/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMUnwindOpAsm.cpp stable/10/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMUnwindOpAsm.h stable/10/contrib/llvm/lib/Target/ARM/Thumb1FrameLowering.cpp stable/10/contrib/llvm/lib/Target/ARM/Thumb1InstrInfo.cpp stable/10/contrib/llvm/lib/Target/ARM/Thumb1RegisterInfo.cpp stable/10/contrib/llvm/lib/Target/ARM/Thumb1RegisterInfo.h stable/10/contrib/llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp stable/10/contrib/llvm/lib/Target/ARM/Thumb2InstrInfo.cpp stable/10/contrib/llvm/lib/Target/ARM/Thumb2RegisterInfo.cpp stable/10/contrib/llvm/lib/Target/ARM/Thumb2RegisterInfo.h stable/10/contrib/llvm/lib/Target/CppBackend/CPPBackend.cpp stable/10/contrib/llvm/lib/Target/Hexagon/Hexagon.h stable/10/contrib/llvm/lib/Target/Hexagon/Hexagon.td stable/10/contrib/llvm/lib/Target/Hexagon/HexagonAsmPrinter.cpp stable/10/contrib/llvm/lib/Target/Hexagon/HexagonCallingConvLower.cpp stable/10/contrib/llvm/lib/Target/Hexagon/HexagonCallingConvLower.h stable/10/contrib/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp stable/10/contrib/llvm/lib/Target/Hexagon/HexagonHardwareLoops.cpp stable/10/contrib/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp stable/10/contrib/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp stable/10/contrib/llvm/lib/Target/Hexagon/HexagonISelLowering.h stable/10/contrib/llvm/lib/Target/Hexagon/HexagonInstrFormats.td stable/10/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp stable/10/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.h stable/10/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.td stable/10/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfoV4.td stable/10/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfoV5.td stable/10/contrib/llvm/lib/Target/Hexagon/HexagonMCInstLower.cpp stable/10/contrib/llvm/lib/Target/Hexagon/HexagonMachineFunctionInfo.h stable/10/contrib/llvm/lib/Target/Hexagon/HexagonMachineScheduler.cpp stable/10/contrib/llvm/lib/Target/Hexagon/HexagonMachineScheduler.h stable/10/contrib/llvm/lib/Target/Hexagon/HexagonNewValueJump.cpp stable/10/contrib/llvm/lib/Target/Hexagon/HexagonPeephole.cpp stable/10/contrib/llvm/lib/Target/Hexagon/HexagonRegisterInfo.cpp stable/10/contrib/llvm/lib/Target/Hexagon/HexagonRegisterInfo.h stable/10/contrib/llvm/lib/Target/Hexagon/HexagonRegisterInfo.td stable/10/contrib/llvm/lib/Target/Hexagon/HexagonSelectionDAGInfo.cpp stable/10/contrib/llvm/lib/Target/Hexagon/HexagonSelectionDAGInfo.h stable/10/contrib/llvm/lib/Target/Hexagon/HexagonSubtarget.cpp stable/10/contrib/llvm/lib/Target/Hexagon/HexagonSubtarget.h stable/10/contrib/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp stable/10/contrib/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp stable/10/contrib/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.h stable/10/contrib/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp stable/10/contrib/llvm/lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.cpp stable/10/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonBaseInfo.h stable/10/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.cpp stable/10/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.h stable/10/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp stable/10/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp stable/10/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.h stable/10/contrib/llvm/lib/Target/MSP430/MSP430AsmPrinter.cpp stable/10/contrib/llvm/lib/Target/MSP430/MSP430CallingConv.td stable/10/contrib/llvm/lib/Target/MSP430/MSP430FrameLowering.h stable/10/contrib/llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp stable/10/contrib/llvm/lib/Target/MSP430/MSP430ISelLowering.cpp stable/10/contrib/llvm/lib/Target/MSP430/MSP430ISelLowering.h stable/10/contrib/llvm/lib/Target/MSP430/MSP430InstrInfo.cpp stable/10/contrib/llvm/lib/Target/MSP430/MSP430InstrInfo.h stable/10/contrib/llvm/lib/Target/MSP430/MSP430InstrInfo.td stable/10/contrib/llvm/lib/Target/MSP430/MSP430MCInstLower.cpp stable/10/contrib/llvm/lib/Target/MSP430/MSP430RegisterInfo.cpp stable/10/contrib/llvm/lib/Target/MSP430/MSP430RegisterInfo.h stable/10/contrib/llvm/lib/Target/MSP430/MSP430RegisterInfo.td stable/10/contrib/llvm/lib/Target/MSP430/MSP430TargetMachine.cpp stable/10/contrib/llvm/lib/Target/Mangler.cpp stable/10/contrib/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp stable/10/contrib/llvm/lib/Target/Mips/Disassembler/MipsDisassembler.cpp stable/10/contrib/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp stable/10/contrib/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.h stable/10/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp stable/10/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp stable/10/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsFixupKinds.h stable/10/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp stable/10/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.h stable/10/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp stable/10/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp stable/10/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.h stable/10/contrib/llvm/lib/Target/Mips/MicroMipsInstrFormats.td stable/10/contrib/llvm/lib/Target/Mips/MicroMipsInstrInfo.td stable/10/contrib/llvm/lib/Target/Mips/Mips.h stable/10/contrib/llvm/lib/Target/Mips/Mips.td stable/10/contrib/llvm/lib/Target/Mips/Mips16FrameLowering.cpp stable/10/contrib/llvm/lib/Target/Mips/Mips16FrameLowering.h stable/10/contrib/llvm/lib/Target/Mips/Mips16ISelDAGToDAG.cpp stable/10/contrib/llvm/lib/Target/Mips/Mips16ISelDAGToDAG.h stable/10/contrib/llvm/lib/Target/Mips/Mips16ISelLowering.cpp stable/10/contrib/llvm/lib/Target/Mips/Mips16ISelLowering.h stable/10/contrib/llvm/lib/Target/Mips/Mips16InstrFormats.td stable/10/contrib/llvm/lib/Target/Mips/Mips16InstrInfo.cpp stable/10/contrib/llvm/lib/Target/Mips/Mips16InstrInfo.h stable/10/contrib/llvm/lib/Target/Mips/Mips16InstrInfo.td stable/10/contrib/llvm/lib/Target/Mips/Mips16RegisterInfo.cpp stable/10/contrib/llvm/lib/Target/Mips/Mips16RegisterInfo.h stable/10/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td stable/10/contrib/llvm/lib/Target/Mips/MipsAnalyzeImmediate.cpp stable/10/contrib/llvm/lib/Target/Mips/MipsAnalyzeImmediate.h stable/10/contrib/llvm/lib/Target/Mips/MipsAsmPrinter.cpp stable/10/contrib/llvm/lib/Target/Mips/MipsAsmPrinter.h stable/10/contrib/llvm/lib/Target/Mips/MipsCallingConv.td stable/10/contrib/llvm/lib/Target/Mips/MipsCodeEmitter.cpp stable/10/contrib/llvm/lib/Target/Mips/MipsCondMov.td stable/10/contrib/llvm/lib/Target/Mips/MipsConstantIslandPass.cpp stable/10/contrib/llvm/lib/Target/Mips/MipsDSPInstrInfo.td stable/10/contrib/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp stable/10/contrib/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp stable/10/contrib/llvm/lib/Target/Mips/MipsISelDAGToDAG.h stable/10/contrib/llvm/lib/Target/Mips/MipsISelLowering.cpp stable/10/contrib/llvm/lib/Target/Mips/MipsISelLowering.h stable/10/contrib/llvm/lib/Target/Mips/MipsInstrFPU.td stable/10/contrib/llvm/lib/Target/Mips/MipsInstrFormats.td stable/10/contrib/llvm/lib/Target/Mips/MipsInstrInfo.cpp stable/10/contrib/llvm/lib/Target/Mips/MipsInstrInfo.h stable/10/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td stable/10/contrib/llvm/lib/Target/Mips/MipsJITInfo.cpp stable/10/contrib/llvm/lib/Target/Mips/MipsLongBranch.cpp stable/10/contrib/llvm/lib/Target/Mips/MipsMCInstLower.cpp stable/10/contrib/llvm/lib/Target/Mips/MipsMCInstLower.h stable/10/contrib/llvm/lib/Target/Mips/MipsMachineFunction.cpp stable/10/contrib/llvm/lib/Target/Mips/MipsMachineFunction.h stable/10/contrib/llvm/lib/Target/Mips/MipsOs16.cpp stable/10/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.cpp stable/10/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.h stable/10/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.td stable/10/contrib/llvm/lib/Target/Mips/MipsSEFrameLowering.cpp stable/10/contrib/llvm/lib/Target/Mips/MipsSEFrameLowering.h stable/10/contrib/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.cpp stable/10/contrib/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.h stable/10/contrib/llvm/lib/Target/Mips/MipsSEISelLowering.cpp stable/10/contrib/llvm/lib/Target/Mips/MipsSEISelLowering.h stable/10/contrib/llvm/lib/Target/Mips/MipsSEInstrInfo.cpp stable/10/contrib/llvm/lib/Target/Mips/MipsSEInstrInfo.h stable/10/contrib/llvm/lib/Target/Mips/MipsSERegisterInfo.cpp stable/10/contrib/llvm/lib/Target/Mips/MipsSERegisterInfo.h stable/10/contrib/llvm/lib/Target/Mips/MipsSchedule.td stable/10/contrib/llvm/lib/Target/Mips/MipsSubtarget.cpp stable/10/contrib/llvm/lib/Target/Mips/MipsSubtarget.h stable/10/contrib/llvm/lib/Target/Mips/MipsTargetMachine.cpp stable/10/contrib/llvm/lib/Target/Mips/MipsTargetMachine.h stable/10/contrib/llvm/lib/Target/NVPTX/InstPrinter/NVPTXInstPrinter.cpp stable/10/contrib/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXBaseInfo.h stable/10/contrib/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.cpp stable/10/contrib/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.h stable/10/contrib/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXMCTargetDesc.cpp stable/10/contrib/llvm/lib/Target/NVPTX/ManagedStringPool.h stable/10/contrib/llvm/lib/Target/NVPTX/NVPTX.h stable/10/contrib/llvm/lib/Target/NVPTX/NVPTX.td stable/10/contrib/llvm/lib/Target/NVPTX/NVPTXAllocaHoisting.cpp stable/10/contrib/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp stable/10/contrib/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.h stable/10/contrib/llvm/lib/Target/NVPTX/NVPTXFrameLowering.cpp stable/10/contrib/llvm/lib/Target/NVPTX/NVPTXGenericToNVVM.cpp stable/10/contrib/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp stable/10/contrib/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.h stable/10/contrib/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp stable/10/contrib/llvm/lib/Target/NVPTX/NVPTXISelLowering.h stable/10/contrib/llvm/lib/Target/NVPTX/NVPTXInstrInfo.cpp stable/10/contrib/llvm/lib/Target/NVPTX/NVPTXInstrInfo.h stable/10/contrib/llvm/lib/Target/NVPTX/NVPTXInstrInfo.td stable/10/contrib/llvm/lib/Target/NVPTX/NVPTXIntrinsics.td stable/10/contrib/llvm/lib/Target/NVPTX/NVPTXRegisterInfo.cpp stable/10/contrib/llvm/lib/Target/NVPTX/NVPTXRegisterInfo.h stable/10/contrib/llvm/lib/Target/NVPTX/NVPTXRegisterInfo.td stable/10/contrib/llvm/lib/Target/NVPTX/NVPTXSection.h stable/10/contrib/llvm/lib/Target/NVPTX/NVPTXSplitBBatBar.cpp stable/10/contrib/llvm/lib/Target/NVPTX/NVPTXSubtarget.cpp stable/10/contrib/llvm/lib/Target/NVPTX/NVPTXSubtarget.h stable/10/contrib/llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp stable/10/contrib/llvm/lib/Target/NVPTX/NVPTXTargetObjectFile.h stable/10/contrib/llvm/lib/Target/NVPTX/NVVMReflect.cpp stable/10/contrib/llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp stable/10/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp stable/10/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h stable/10/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp stable/10/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp stable/10/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCFixupKinds.h stable/10/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp stable/10/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.h stable/10/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp stable/10/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp stable/10/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h stable/10/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.cpp stable/10/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h stable/10/contrib/llvm/lib/Target/PowerPC/PPC.h stable/10/contrib/llvm/lib/Target/PowerPC/PPC.td stable/10/contrib/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp stable/10/contrib/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp stable/10/contrib/llvm/lib/Target/PowerPC/PPCCallingConv.td stable/10/contrib/llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp stable/10/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp stable/10/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.h stable/10/contrib/llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp stable/10/contrib/llvm/lib/Target/PowerPC/PPCHazardRecognizers.h stable/10/contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp stable/10/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp stable/10/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.h stable/10/contrib/llvm/lib/Target/PowerPC/PPCInstr64Bit.td stable/10/contrib/llvm/lib/Target/PowerPC/PPCInstrAltivec.td stable/10/contrib/llvm/lib/Target/PowerPC/PPCInstrFormats.td stable/10/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp stable/10/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.h stable/10/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.td stable/10/contrib/llvm/lib/Target/PowerPC/PPCJITInfo.cpp stable/10/contrib/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp stable/10/contrib/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h stable/10/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp stable/10/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.h stable/10/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.td stable/10/contrib/llvm/lib/Target/PowerPC/PPCSchedule.td stable/10/contrib/llvm/lib/Target/PowerPC/PPCScheduleA2.td stable/10/contrib/llvm/lib/Target/PowerPC/PPCScheduleE500mc.td stable/10/contrib/llvm/lib/Target/PowerPC/PPCScheduleE5500.td stable/10/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.cpp stable/10/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.h stable/10/contrib/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp stable/10/contrib/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp stable/10/contrib/llvm/lib/Target/PowerPC/TargetInfo/PowerPCTargetInfo.cpp stable/10/contrib/llvm/lib/Target/R600/AMDGPU.h stable/10/contrib/llvm/lib/Target/R600/AMDGPU.td stable/10/contrib/llvm/lib/Target/R600/AMDGPUAsmPrinter.cpp stable/10/contrib/llvm/lib/Target/R600/AMDGPUAsmPrinter.h stable/10/contrib/llvm/lib/Target/R600/AMDGPUCallingConv.td stable/10/contrib/llvm/lib/Target/R600/AMDGPUFrameLowering.cpp stable/10/contrib/llvm/lib/Target/R600/AMDGPUISelLowering.cpp stable/10/contrib/llvm/lib/Target/R600/AMDGPUISelLowering.h stable/10/contrib/llvm/lib/Target/R600/AMDGPUInstrInfo.cpp stable/10/contrib/llvm/lib/Target/R600/AMDGPUInstrInfo.h stable/10/contrib/llvm/lib/Target/R600/AMDGPUInstrInfo.td stable/10/contrib/llvm/lib/Target/R600/AMDGPUInstructions.td stable/10/contrib/llvm/lib/Target/R600/AMDGPUIntrinsics.td stable/10/contrib/llvm/lib/Target/R600/AMDGPUMCInstLower.cpp stable/10/contrib/llvm/lib/Target/R600/AMDGPUMachineFunction.cpp stable/10/contrib/llvm/lib/Target/R600/AMDGPUMachineFunction.h stable/10/contrib/llvm/lib/Target/R600/AMDGPURegisterInfo.cpp stable/10/contrib/llvm/lib/Target/R600/AMDGPURegisterInfo.h stable/10/contrib/llvm/lib/Target/R600/AMDGPURegisterInfo.td stable/10/contrib/llvm/lib/Target/R600/AMDGPUSubtarget.cpp stable/10/contrib/llvm/lib/Target/R600/AMDGPUSubtarget.h stable/10/contrib/llvm/lib/Target/R600/AMDGPUTargetMachine.cpp stable/10/contrib/llvm/lib/Target/R600/AMDGPUTargetMachine.h stable/10/contrib/llvm/lib/Target/R600/AMDILBase.td stable/10/contrib/llvm/lib/Target/R600/AMDILCFGStructurizer.cpp stable/10/contrib/llvm/lib/Target/R600/AMDILISelLowering.cpp stable/10/contrib/llvm/lib/Target/R600/AMDILInstrInfo.td stable/10/contrib/llvm/lib/Target/R600/AMDILIntrinsicInfo.cpp stable/10/contrib/llvm/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp stable/10/contrib/llvm/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.h stable/10/contrib/llvm/lib/Target/R600/MCTargetDesc/AMDGPUAsmBackend.cpp stable/10/contrib/llvm/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp stable/10/contrib/llvm/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.h stable/10/contrib/llvm/lib/Target/R600/MCTargetDesc/AMDGPUMCCodeEmitter.h stable/10/contrib/llvm/lib/Target/R600/MCTargetDesc/AMDGPUMCTargetDesc.cpp stable/10/contrib/llvm/lib/Target/R600/MCTargetDesc/AMDGPUMCTargetDesc.h stable/10/contrib/llvm/lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp stable/10/contrib/llvm/lib/Target/R600/Processors.td stable/10/contrib/llvm/lib/Target/R600/R600ControlFlowFinalizer.cpp stable/10/contrib/llvm/lib/Target/R600/R600Defines.h stable/10/contrib/llvm/lib/Target/R600/R600EmitClauseMarkers.cpp stable/10/contrib/llvm/lib/Target/R600/R600ExpandSpecialInstrs.cpp stable/10/contrib/llvm/lib/Target/R600/R600ISelLowering.cpp stable/10/contrib/llvm/lib/Target/R600/R600ISelLowering.h stable/10/contrib/llvm/lib/Target/R600/R600InstrInfo.cpp stable/10/contrib/llvm/lib/Target/R600/R600InstrInfo.h stable/10/contrib/llvm/lib/Target/R600/R600Instructions.td stable/10/contrib/llvm/lib/Target/R600/R600Intrinsics.td stable/10/contrib/llvm/lib/Target/R600/R600MachineFunctionInfo.cpp stable/10/contrib/llvm/lib/Target/R600/R600MachineFunctionInfo.h stable/10/contrib/llvm/lib/Target/R600/R600MachineScheduler.cpp stable/10/contrib/llvm/lib/Target/R600/R600MachineScheduler.h stable/10/contrib/llvm/lib/Target/R600/R600Packetizer.cpp stable/10/contrib/llvm/lib/Target/R600/R600RegisterInfo.cpp stable/10/contrib/llvm/lib/Target/R600/R600RegisterInfo.h stable/10/contrib/llvm/lib/Target/R600/R600RegisterInfo.td stable/10/contrib/llvm/lib/Target/R600/R600Schedule.td stable/10/contrib/llvm/lib/Target/R600/SIAnnotateControlFlow.cpp stable/10/contrib/llvm/lib/Target/R600/SIDefines.h stable/10/contrib/llvm/lib/Target/R600/SIISelLowering.cpp stable/10/contrib/llvm/lib/Target/R600/SIISelLowering.h stable/10/contrib/llvm/lib/Target/R600/SIInsertWaits.cpp stable/10/contrib/llvm/lib/Target/R600/SIInstrFormats.td stable/10/contrib/llvm/lib/Target/R600/SIInstrInfo.cpp stable/10/contrib/llvm/lib/Target/R600/SIInstrInfo.h stable/10/contrib/llvm/lib/Target/R600/SIInstrInfo.td stable/10/contrib/llvm/lib/Target/R600/SIInstructions.td stable/10/contrib/llvm/lib/Target/R600/SIIntrinsics.td stable/10/contrib/llvm/lib/Target/R600/SILowerControlFlow.cpp stable/10/contrib/llvm/lib/Target/R600/SIMachineFunctionInfo.cpp stable/10/contrib/llvm/lib/Target/R600/SIMachineFunctionInfo.h stable/10/contrib/llvm/lib/Target/R600/SIRegisterInfo.cpp stable/10/contrib/llvm/lib/Target/R600/SIRegisterInfo.h stable/10/contrib/llvm/lib/Target/R600/SIRegisterInfo.td stable/10/contrib/llvm/lib/Target/R600/TargetInfo/AMDGPUTargetInfo.cpp stable/10/contrib/llvm/lib/Target/Sparc/DelaySlotFiller.cpp stable/10/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcBaseInfo.h stable/10/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp stable/10/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.h stable/10/contrib/llvm/lib/Target/Sparc/Sparc.h stable/10/contrib/llvm/lib/Target/Sparc/Sparc.td stable/10/contrib/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp stable/10/contrib/llvm/lib/Target/Sparc/SparcCallingConv.td stable/10/contrib/llvm/lib/Target/Sparc/SparcFrameLowering.cpp stable/10/contrib/llvm/lib/Target/Sparc/SparcFrameLowering.h stable/10/contrib/llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp stable/10/contrib/llvm/lib/Target/Sparc/SparcISelLowering.cpp stable/10/contrib/llvm/lib/Target/Sparc/SparcISelLowering.h stable/10/contrib/llvm/lib/Target/Sparc/SparcInstr64Bit.td stable/10/contrib/llvm/lib/Target/Sparc/SparcInstrFormats.td stable/10/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.cpp stable/10/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.h stable/10/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.td stable/10/contrib/llvm/lib/Target/Sparc/SparcMachineFunctionInfo.h stable/10/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp stable/10/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.h stable/10/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.td stable/10/contrib/llvm/lib/Target/Sparc/SparcSubtarget.cpp stable/10/contrib/llvm/lib/Target/Sparc/SparcSubtarget.h stable/10/contrib/llvm/lib/Target/Sparc/SparcTargetMachine.cpp stable/10/contrib/llvm/lib/Target/Sparc/SparcTargetMachine.h stable/10/contrib/llvm/lib/Target/Sparc/TargetInfo/SparcTargetInfo.cpp stable/10/contrib/llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp stable/10/contrib/llvm/lib/Target/SystemZ/InstPrinter/SystemZInstPrinter.cpp stable/10/contrib/llvm/lib/Target/SystemZ/InstPrinter/SystemZInstPrinter.h stable/10/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp stable/10/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp stable/10/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.h stable/10/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCCodeEmitter.cpp stable/10/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp stable/10/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.h stable/10/contrib/llvm/lib/Target/SystemZ/README.txt stable/10/contrib/llvm/lib/Target/SystemZ/SystemZ.h stable/10/contrib/llvm/lib/Target/SystemZ/SystemZ.td stable/10/contrib/llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp stable/10/contrib/llvm/lib/Target/SystemZ/SystemZCallingConv.td stable/10/contrib/llvm/lib/Target/SystemZ/SystemZConstantPoolValue.cpp stable/10/contrib/llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp stable/10/contrib/llvm/lib/Target/SystemZ/SystemZFrameLowering.h stable/10/contrib/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp stable/10/contrib/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp stable/10/contrib/llvm/lib/Target/SystemZ/SystemZISelLowering.h stable/10/contrib/llvm/lib/Target/SystemZ/SystemZInstrFP.td stable/10/contrib/llvm/lib/Target/SystemZ/SystemZInstrFormats.td stable/10/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp stable/10/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.h stable/10/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.td stable/10/contrib/llvm/lib/Target/SystemZ/SystemZMCInstLower.cpp stable/10/contrib/llvm/lib/Target/SystemZ/SystemZMCInstLower.h stable/10/contrib/llvm/lib/Target/SystemZ/SystemZMachineFunctionInfo.h stable/10/contrib/llvm/lib/Target/SystemZ/SystemZOperands.td stable/10/contrib/llvm/lib/Target/SystemZ/SystemZOperators.td stable/10/contrib/llvm/lib/Target/SystemZ/SystemZPatterns.td stable/10/contrib/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp stable/10/contrib/llvm/lib/Target/SystemZ/SystemZRegisterInfo.h stable/10/contrib/llvm/lib/Target/SystemZ/SystemZRegisterInfo.td stable/10/contrib/llvm/lib/Target/SystemZ/SystemZSubtarget.cpp stable/10/contrib/llvm/lib/Target/SystemZ/SystemZSubtarget.h stable/10/contrib/llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp stable/10/contrib/llvm/lib/Target/SystemZ/SystemZTargetMachine.h stable/10/contrib/llvm/lib/Target/Target.cpp stable/10/contrib/llvm/lib/Target/TargetLibraryInfo.cpp stable/10/contrib/llvm/lib/Target/TargetLoweringObjectFile.cpp stable/10/contrib/llvm/lib/Target/TargetMachine.cpp stable/10/contrib/llvm/lib/Target/TargetMachineC.cpp stable/10/contrib/llvm/lib/Target/TargetSubtargetInfo.cpp stable/10/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp stable/10/contrib/llvm/lib/Target/X86/Disassembler/X86Disassembler.cpp stable/10/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c stable/10/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h stable/10/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h stable/10/contrib/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp stable/10/contrib/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.h stable/10/contrib/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp stable/10/contrib/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.h stable/10/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp stable/10/contrib/llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h stable/10/contrib/llvm/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp stable/10/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp stable/10/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.h stable/10/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp stable/10/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp stable/10/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h stable/10/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp stable/10/contrib/llvm/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp stable/10/contrib/llvm/lib/Target/X86/X86.td stable/10/contrib/llvm/lib/Target/X86/X86AsmPrinter.cpp stable/10/contrib/llvm/lib/Target/X86/X86AsmPrinter.h stable/10/contrib/llvm/lib/Target/X86/X86CallingConv.td stable/10/contrib/llvm/lib/Target/X86/X86CodeEmitter.cpp stable/10/contrib/llvm/lib/Target/X86/X86FastISel.cpp stable/10/contrib/llvm/lib/Target/X86/X86FixupLEAs.cpp stable/10/contrib/llvm/lib/Target/X86/X86FloatingPoint.cpp stable/10/contrib/llvm/lib/Target/X86/X86FrameLowering.cpp stable/10/contrib/llvm/lib/Target/X86/X86FrameLowering.h stable/10/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp stable/10/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp stable/10/contrib/llvm/lib/Target/X86/X86ISelLowering.h stable/10/contrib/llvm/lib/Target/X86/X86InstrArithmetic.td stable/10/contrib/llvm/lib/Target/X86/X86InstrCompiler.td stable/10/contrib/llvm/lib/Target/X86/X86InstrControl.td stable/10/contrib/llvm/lib/Target/X86/X86InstrExtension.td stable/10/contrib/llvm/lib/Target/X86/X86InstrFMA.td stable/10/contrib/llvm/lib/Target/X86/X86InstrFPStack.td stable/10/contrib/llvm/lib/Target/X86/X86InstrFormats.td stable/10/contrib/llvm/lib/Target/X86/X86InstrFragmentsSIMD.td stable/10/contrib/llvm/lib/Target/X86/X86InstrInfo.cpp stable/10/contrib/llvm/lib/Target/X86/X86InstrInfo.h stable/10/contrib/llvm/lib/Target/X86/X86InstrInfo.td stable/10/contrib/llvm/lib/Target/X86/X86InstrMMX.td stable/10/contrib/llvm/lib/Target/X86/X86InstrSSE.td stable/10/contrib/llvm/lib/Target/X86/X86InstrSVM.td stable/10/contrib/llvm/lib/Target/X86/X86InstrShiftRotate.td stable/10/contrib/llvm/lib/Target/X86/X86InstrSystem.td stable/10/contrib/llvm/lib/Target/X86/X86InstrTSX.td stable/10/contrib/llvm/lib/Target/X86/X86InstrXOP.td stable/10/contrib/llvm/lib/Target/X86/X86JITInfo.cpp stable/10/contrib/llvm/lib/Target/X86/X86MCInstLower.cpp stable/10/contrib/llvm/lib/Target/X86/X86RegisterInfo.cpp stable/10/contrib/llvm/lib/Target/X86/X86RegisterInfo.h stable/10/contrib/llvm/lib/Target/X86/X86RegisterInfo.td stable/10/contrib/llvm/lib/Target/X86/X86SchedHaswell.td stable/10/contrib/llvm/lib/Target/X86/X86SchedSandyBridge.td stable/10/contrib/llvm/lib/Target/X86/X86Schedule.td stable/10/contrib/llvm/lib/Target/X86/X86ScheduleAtom.td stable/10/contrib/llvm/lib/Target/X86/X86SelectionDAGInfo.cpp stable/10/contrib/llvm/lib/Target/X86/X86SelectionDAGInfo.h stable/10/contrib/llvm/lib/Target/X86/X86Subtarget.cpp stable/10/contrib/llvm/lib/Target/X86/X86Subtarget.h stable/10/contrib/llvm/lib/Target/X86/X86TargetMachine.cpp stable/10/contrib/llvm/lib/Target/X86/X86TargetObjectFile.cpp stable/10/contrib/llvm/lib/Target/X86/X86TargetObjectFile.h stable/10/contrib/llvm/lib/Target/X86/X86TargetTransformInfo.cpp stable/10/contrib/llvm/lib/Target/X86/X86VZeroUpper.cpp stable/10/contrib/llvm/lib/Target/XCore/Disassembler/XCoreDisassembler.cpp stable/10/contrib/llvm/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp stable/10/contrib/llvm/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.h stable/10/contrib/llvm/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp stable/10/contrib/llvm/lib/Target/XCore/XCore.h stable/10/contrib/llvm/lib/Target/XCore/XCoreAsmPrinter.cpp stable/10/contrib/llvm/lib/Target/XCore/XCoreFrameLowering.cpp stable/10/contrib/llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp stable/10/contrib/llvm/lib/Target/XCore/XCoreISelLowering.cpp stable/10/contrib/llvm/lib/Target/XCore/XCoreISelLowering.h stable/10/contrib/llvm/lib/Target/XCore/XCoreInstrInfo.cpp stable/10/contrib/llvm/lib/Target/XCore/XCoreInstrInfo.h stable/10/contrib/llvm/lib/Target/XCore/XCoreInstrInfo.td stable/10/contrib/llvm/lib/Target/XCore/XCoreLowerThreadLocal.cpp stable/10/contrib/llvm/lib/Target/XCore/XCoreMCInstLower.cpp stable/10/contrib/llvm/lib/Target/XCore/XCoreRegisterInfo.cpp stable/10/contrib/llvm/lib/Target/XCore/XCoreRegisterInfo.h stable/10/contrib/llvm/lib/Target/XCore/XCoreTargetMachine.cpp stable/10/contrib/llvm/lib/Target/XCore/XCoreTargetMachine.h stable/10/contrib/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp stable/10/contrib/llvm/lib/Transforms/IPO/ConstantMerge.cpp stable/10/contrib/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp stable/10/contrib/llvm/lib/Transforms/IPO/ExtractGV.cpp stable/10/contrib/llvm/lib/Transforms/IPO/FunctionAttrs.cpp stable/10/contrib/llvm/lib/Transforms/IPO/GlobalDCE.cpp stable/10/contrib/llvm/lib/Transforms/IPO/GlobalOpt.cpp stable/10/contrib/llvm/lib/Transforms/IPO/InlineAlways.cpp stable/10/contrib/llvm/lib/Transforms/IPO/InlineSimple.cpp stable/10/contrib/llvm/lib/Transforms/IPO/Inliner.cpp stable/10/contrib/llvm/lib/Transforms/IPO/Internalize.cpp stable/10/contrib/llvm/lib/Transforms/IPO/MergeFunctions.cpp stable/10/contrib/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp stable/10/contrib/llvm/lib/Transforms/IPO/PruneEH.cpp stable/10/contrib/llvm/lib/Transforms/IPO/StripSymbols.cpp stable/10/contrib/llvm/lib/Transforms/InstCombine/InstCombine.h stable/10/contrib/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp stable/10/contrib/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp stable/10/contrib/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp stable/10/contrib/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp stable/10/contrib/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp stable/10/contrib/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp stable/10/contrib/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp stable/10/contrib/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp stable/10/contrib/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp stable/10/contrib/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp stable/10/contrib/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp stable/10/contrib/llvm/lib/Transforms/InstCombine/InstCombineWorklist.h stable/10/contrib/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp stable/10/contrib/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp stable/10/contrib/llvm/lib/Transforms/Instrumentation/BoundsChecking.cpp stable/10/contrib/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp stable/10/contrib/llvm/lib/Transforms/Instrumentation/Instrumentation.cpp stable/10/contrib/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp stable/10/contrib/llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp stable/10/contrib/llvm/lib/Transforms/ObjCARC/DependencyAnalysis.h stable/10/contrib/llvm/lib/Transforms/ObjCARC/ObjCARC.h stable/10/contrib/llvm/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.cpp stable/10/contrib/llvm/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.h stable/10/contrib/llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp stable/10/contrib/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp stable/10/contrib/llvm/lib/Transforms/ObjCARC/ObjCARCUtil.cpp stable/10/contrib/llvm/lib/Transforms/ObjCARC/ProvenanceAnalysis.h stable/10/contrib/llvm/lib/Transforms/Scalar/ADCE.cpp stable/10/contrib/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp stable/10/contrib/llvm/lib/Transforms/Scalar/EarlyCSE.cpp stable/10/contrib/llvm/lib/Transforms/Scalar/GVN.cpp stable/10/contrib/llvm/lib/Transforms/Scalar/GlobalMerge.cpp stable/10/contrib/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp stable/10/contrib/llvm/lib/Transforms/Scalar/JumpThreading.cpp stable/10/contrib/llvm/lib/Transforms/Scalar/LoopDeletion.cpp stable/10/contrib/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp stable/10/contrib/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp stable/10/contrib/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp stable/10/contrib/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp stable/10/contrib/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp stable/10/contrib/llvm/lib/Transforms/Scalar/Reassociate.cpp stable/10/contrib/llvm/lib/Transforms/Scalar/SCCP.cpp stable/10/contrib/llvm/lib/Transforms/Scalar/SROA.cpp stable/10/contrib/llvm/lib/Transforms/Scalar/Scalar.cpp stable/10/contrib/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp stable/10/contrib/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp stable/10/contrib/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp stable/10/contrib/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp stable/10/contrib/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp stable/10/contrib/llvm/lib/Transforms/Utils/CloneFunction.cpp stable/10/contrib/llvm/lib/Transforms/Utils/CodeExtractor.cpp stable/10/contrib/llvm/lib/Transforms/Utils/DemoteRegToStack.cpp stable/10/contrib/llvm/lib/Transforms/Utils/InlineFunction.cpp stable/10/contrib/llvm/lib/Transforms/Utils/LCSSA.cpp stable/10/contrib/llvm/lib/Transforms/Utils/Local.cpp stable/10/contrib/llvm/lib/Transforms/Utils/LoopSimplify.cpp stable/10/contrib/llvm/lib/Transforms/Utils/LoopUnroll.cpp stable/10/contrib/llvm/lib/Transforms/Utils/LowerExpectIntrinsic.cpp stable/10/contrib/llvm/lib/Transforms/Utils/LowerInvoke.cpp stable/10/contrib/llvm/lib/Transforms/Utils/LowerSwitch.cpp stable/10/contrib/llvm/lib/Transforms/Utils/MetaRenamer.cpp stable/10/contrib/llvm/lib/Transforms/Utils/ModuleUtils.cpp stable/10/contrib/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp stable/10/contrib/llvm/lib/Transforms/Utils/SSAUpdater.cpp stable/10/contrib/llvm/lib/Transforms/Utils/SimplifyCFG.cpp stable/10/contrib/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp stable/10/contrib/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp stable/10/contrib/llvm/lib/Transforms/Utils/ValueMapper.cpp stable/10/contrib/llvm/lib/Transforms/Vectorize/BBVectorize.cpp stable/10/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp stable/10/contrib/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp stable/10/contrib/llvm/tools/bugpoint/BugDriver.cpp stable/10/contrib/llvm/tools/bugpoint/BugDriver.h stable/10/contrib/llvm/tools/bugpoint/CrashDebugger.cpp stable/10/contrib/llvm/tools/bugpoint/ExecutionDriver.cpp stable/10/contrib/llvm/tools/bugpoint/ExtractFunction.cpp stable/10/contrib/llvm/tools/bugpoint/FindBugs.cpp stable/10/contrib/llvm/tools/bugpoint/Miscompilation.cpp stable/10/contrib/llvm/tools/bugpoint/OptimizerDriver.cpp stable/10/contrib/llvm/tools/bugpoint/ToolRunner.cpp stable/10/contrib/llvm/tools/bugpoint/ToolRunner.h stable/10/contrib/llvm/tools/bugpoint/bugpoint.cpp stable/10/contrib/llvm/tools/clang/include/clang-c/CXCompilationDatabase.h stable/10/contrib/llvm/tools/clang/include/clang-c/CXString.h stable/10/contrib/llvm/tools/clang/include/clang-c/Index.h stable/10/contrib/llvm/tools/clang/include/clang/ARCMigrate/ARCMT.h stable/10/contrib/llvm/tools/clang/include/clang/ARCMigrate/ARCMTActions.h stable/10/contrib/llvm/tools/clang/include/clang/ARCMigrate/FileRemapper.h stable/10/contrib/llvm/tools/clang/include/clang/AST/APValue.h stable/10/contrib/llvm/tools/clang/include/clang/AST/ASTConsumer.h stable/10/contrib/llvm/tools/clang/include/clang/AST/ASTContext.h stable/10/contrib/llvm/tools/clang/include/clang/AST/ASTDiagnostic.h stable/10/contrib/llvm/tools/clang/include/clang/AST/ASTImporter.h stable/10/contrib/llvm/tools/clang/include/clang/AST/ASTMutationListener.h stable/10/contrib/llvm/tools/clang/include/clang/AST/ASTTypeTraits.h stable/10/contrib/llvm/tools/clang/include/clang/AST/ASTUnresolvedSet.h stable/10/contrib/llvm/tools/clang/include/clang/AST/ASTVector.h stable/10/contrib/llvm/tools/clang/include/clang/AST/Attr.h stable/10/contrib/llvm/tools/clang/include/clang/AST/CXXInheritance.h stable/10/contrib/llvm/tools/clang/include/clang/AST/CanonicalType.h stable/10/contrib/llvm/tools/clang/include/clang/AST/CharUnits.h stable/10/contrib/llvm/tools/clang/include/clang/AST/Comment.h stable/10/contrib/llvm/tools/clang/include/clang/AST/CommentCommandTraits.h stable/10/contrib/llvm/tools/clang/include/clang/AST/CommentCommands.td stable/10/contrib/llvm/tools/clang/include/clang/AST/CommentDiagnostic.h stable/10/contrib/llvm/tools/clang/include/clang/AST/CommentParser.h stable/10/contrib/llvm/tools/clang/include/clang/AST/CommentSema.h stable/10/contrib/llvm/tools/clang/include/clang/AST/Decl.h stable/10/contrib/llvm/tools/clang/include/clang/AST/DeclAccessPair.h stable/10/contrib/llvm/tools/clang/include/clang/AST/DeclBase.h stable/10/contrib/llvm/tools/clang/include/clang/AST/DeclCXX.h stable/10/contrib/llvm/tools/clang/include/clang/AST/DeclContextInternals.h stable/10/contrib/llvm/tools/clang/include/clang/AST/DeclFriend.h stable/10/contrib/llvm/tools/clang/include/clang/AST/DeclLookups.h stable/10/contrib/llvm/tools/clang/include/clang/AST/DeclObjC.h stable/10/contrib/llvm/tools/clang/include/clang/AST/DeclOpenMP.h stable/10/contrib/llvm/tools/clang/include/clang/AST/DeclTemplate.h stable/10/contrib/llvm/tools/clang/include/clang/AST/DeclarationName.h stable/10/contrib/llvm/tools/clang/include/clang/AST/EvaluatedExprVisitor.h stable/10/contrib/llvm/tools/clang/include/clang/AST/Expr.h stable/10/contrib/llvm/tools/clang/include/clang/AST/ExprCXX.h stable/10/contrib/llvm/tools/clang/include/clang/AST/ExprObjC.h stable/10/contrib/llvm/tools/clang/include/clang/AST/ExternalASTSource.h stable/10/contrib/llvm/tools/clang/include/clang/AST/GlobalDecl.h stable/10/contrib/llvm/tools/clang/include/clang/AST/Mangle.h stable/10/contrib/llvm/tools/clang/include/clang/AST/NestedNameSpecifier.h stable/10/contrib/llvm/tools/clang/include/clang/AST/ParentMap.h stable/10/contrib/llvm/tools/clang/include/clang/AST/PrettyPrinter.h stable/10/contrib/llvm/tools/clang/include/clang/AST/RawCommentList.h stable/10/contrib/llvm/tools/clang/include/clang/AST/RecordLayout.h stable/10/contrib/llvm/tools/clang/include/clang/AST/RecursiveASTVisitor.h stable/10/contrib/llvm/tools/clang/include/clang/AST/Redeclarable.h stable/10/contrib/llvm/tools/clang/include/clang/AST/Stmt.h stable/10/contrib/llvm/tools/clang/include/clang/AST/StmtCXX.h stable/10/contrib/llvm/tools/clang/include/clang/AST/StmtIterator.h stable/10/contrib/llvm/tools/clang/include/clang/AST/StmtObjC.h stable/10/contrib/llvm/tools/clang/include/clang/AST/StmtVisitor.h stable/10/contrib/llvm/tools/clang/include/clang/AST/TemplateBase.h stable/10/contrib/llvm/tools/clang/include/clang/AST/Type.h stable/10/contrib/llvm/tools/clang/include/clang/AST/TypeLoc.h stable/10/contrib/llvm/tools/clang/include/clang/AST/TypeNodes.def stable/10/contrib/llvm/tools/clang/include/clang/AST/TypeOrdering.h stable/10/contrib/llvm/tools/clang/include/clang/AST/TypeVisitor.h stable/10/contrib/llvm/tools/clang/include/clang/AST/UnresolvedSet.h stable/10/contrib/llvm/tools/clang/include/clang/AST/VTTBuilder.h stable/10/contrib/llvm/tools/clang/include/clang/AST/VTableBuilder.h stable/10/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchFinder.h stable/10/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchers.h stable/10/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchersInternal.h stable/10/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchersMacros.h stable/10/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/FormatString.h stable/10/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ThreadSafety.h stable/10/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/UninitializedValues.h stable/10/contrib/llvm/tools/clang/include/clang/Analysis/AnalysisContext.h stable/10/contrib/llvm/tools/clang/include/clang/Analysis/AnalysisDiagnostic.h stable/10/contrib/llvm/tools/clang/include/clang/Analysis/CFG.h stable/10/contrib/llvm/tools/clang/include/clang/Analysis/CallGraph.h stable/10/contrib/llvm/tools/clang/include/clang/Analysis/FlowSensitive/DataflowSolver.h stable/10/contrib/llvm/tools/clang/include/clang/Basic/ABI.h stable/10/contrib/llvm/tools/clang/include/clang/Basic/Attr.td stable/10/contrib/llvm/tools/clang/include/clang/Basic/AttrKinds.h stable/10/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def stable/10/contrib/llvm/tools/clang/include/clang/Basic/Builtins.h stable/10/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsAArch64.def stable/10/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsARM.def stable/10/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsMips.def stable/10/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsNVPTX.def stable/10/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsX86.def stable/10/contrib/llvm/tools/clang/include/clang/Basic/CapturedStmt.h stable/10/contrib/llvm/tools/clang/include/clang/Basic/DeclNodes.td stable/10/contrib/llvm/tools/clang/include/clang/Basic/Diagnostic.h stable/10/contrib/llvm/tools/clang/include/clang/Basic/Diagnostic.td stable/10/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticASTKinds.td stable/10/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticCommentKinds.td stable/10/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticCommonKinds.td stable/10/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticDriverKinds.td stable/10/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticFrontendKinds.td stable/10/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticGroups.td stable/10/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticIDs.h stable/10/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticLexKinds.td stable/10/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticOptions.def stable/10/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticParseKinds.td stable/10/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td stable/10/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSerializationKinds.td stable/10/contrib/llvm/tools/clang/include/clang/Basic/FileManager.h stable/10/contrib/llvm/tools/clang/include/clang/Basic/FileSystemStatCache.h stable/10/contrib/llvm/tools/clang/include/clang/Basic/IdentifierTable.h stable/10/contrib/llvm/tools/clang/include/clang/Basic/Lambda.h stable/10/contrib/llvm/tools/clang/include/clang/Basic/LangOptions.def stable/10/contrib/llvm/tools/clang/include/clang/Basic/LangOptions.h stable/10/contrib/llvm/tools/clang/include/clang/Basic/Linkage.h stable/10/contrib/llvm/tools/clang/include/clang/Basic/Module.h stable/10/contrib/llvm/tools/clang/include/clang/Basic/ObjCRuntime.h stable/10/contrib/llvm/tools/clang/include/clang/Basic/OpenMPKinds.def stable/10/contrib/llvm/tools/clang/include/clang/Basic/OpenMPKinds.h stable/10/contrib/llvm/tools/clang/include/clang/Basic/OperatorKinds.h stable/10/contrib/llvm/tools/clang/include/clang/Basic/PartialDiagnostic.h stable/10/contrib/llvm/tools/clang/include/clang/Basic/Sanitizers.def stable/10/contrib/llvm/tools/clang/include/clang/Basic/SourceLocation.h stable/10/contrib/llvm/tools/clang/include/clang/Basic/SourceManager.h stable/10/contrib/llvm/tools/clang/include/clang/Basic/Specifiers.h stable/10/contrib/llvm/tools/clang/include/clang/Basic/StmtNodes.td stable/10/contrib/llvm/tools/clang/include/clang/Basic/TargetBuiltins.h stable/10/contrib/llvm/tools/clang/include/clang/Basic/TargetCXXABI.h stable/10/contrib/llvm/tools/clang/include/clang/Basic/TargetInfo.h stable/10/contrib/llvm/tools/clang/include/clang/Basic/TargetOptions.h stable/10/contrib/llvm/tools/clang/include/clang/Basic/TemplateKinds.h stable/10/contrib/llvm/tools/clang/include/clang/Basic/TokenKinds.def stable/10/contrib/llvm/tools/clang/include/clang/Basic/TypeTraits.h stable/10/contrib/llvm/tools/clang/include/clang/Basic/Visibility.h stable/10/contrib/llvm/tools/clang/include/clang/Basic/arm_neon.td stable/10/contrib/llvm/tools/clang/include/clang/Driver/Action.h stable/10/contrib/llvm/tools/clang/include/clang/Driver/CC1AsOptions.h stable/10/contrib/llvm/tools/clang/include/clang/Driver/CC1AsOptions.td stable/10/contrib/llvm/tools/clang/include/clang/Driver/CC1Options.td stable/10/contrib/llvm/tools/clang/include/clang/Driver/Compilation.h stable/10/contrib/llvm/tools/clang/include/clang/Driver/Driver.h stable/10/contrib/llvm/tools/clang/include/clang/Driver/DriverDiagnostic.h stable/10/contrib/llvm/tools/clang/include/clang/Driver/Job.h stable/10/contrib/llvm/tools/clang/include/clang/Driver/Options.h stable/10/contrib/llvm/tools/clang/include/clang/Driver/Options.td stable/10/contrib/llvm/tools/clang/include/clang/Driver/Tool.h stable/10/contrib/llvm/tools/clang/include/clang/Driver/ToolChain.h stable/10/contrib/llvm/tools/clang/include/clang/Driver/Types.def stable/10/contrib/llvm/tools/clang/include/clang/Driver/Types.h stable/10/contrib/llvm/tools/clang/include/clang/Driver/Util.h stable/10/contrib/llvm/tools/clang/include/clang/Edit/Commit.h stable/10/contrib/llvm/tools/clang/include/clang/Edit/EditedSource.h stable/10/contrib/llvm/tools/clang/include/clang/Edit/Rewriters.h stable/10/contrib/llvm/tools/clang/include/clang/Format/Format.h stable/10/contrib/llvm/tools/clang/include/clang/Frontend/ASTConsumers.h stable/10/contrib/llvm/tools/clang/include/clang/Frontend/ASTUnit.h stable/10/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.def stable/10/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.h stable/10/contrib/llvm/tools/clang/include/clang/Frontend/CompilerInstance.h stable/10/contrib/llvm/tools/clang/include/clang/Frontend/CompilerInvocation.h stable/10/contrib/llvm/tools/clang/include/clang/Frontend/DependencyOutputOptions.h stable/10/contrib/llvm/tools/clang/include/clang/Frontend/FrontendAction.h stable/10/contrib/llvm/tools/clang/include/clang/Frontend/FrontendActions.h stable/10/contrib/llvm/tools/clang/include/clang/Frontend/FrontendDiagnostic.h stable/10/contrib/llvm/tools/clang/include/clang/Frontend/FrontendOptions.h stable/10/contrib/llvm/tools/clang/include/clang/Frontend/TextDiagnostic.h stable/10/contrib/llvm/tools/clang/include/clang/Frontend/Utils.h stable/10/contrib/llvm/tools/clang/include/clang/Lex/DirectoryLookup.h stable/10/contrib/llvm/tools/clang/include/clang/Lex/HeaderSearch.h stable/10/contrib/llvm/tools/clang/include/clang/Lex/HeaderSearchOptions.h stable/10/contrib/llvm/tools/clang/include/clang/Lex/LexDiagnostic.h stable/10/contrib/llvm/tools/clang/include/clang/Lex/Lexer.h stable/10/contrib/llvm/tools/clang/include/clang/Lex/LiteralSupport.h stable/10/contrib/llvm/tools/clang/include/clang/Lex/MacroInfo.h stable/10/contrib/llvm/tools/clang/include/clang/Lex/ModuleLoader.h stable/10/contrib/llvm/tools/clang/include/clang/Lex/ModuleMap.h stable/10/contrib/llvm/tools/clang/include/clang/Lex/MultipleIncludeOpt.h stable/10/contrib/llvm/tools/clang/include/clang/Lex/PPCallbacks.h stable/10/contrib/llvm/tools/clang/include/clang/Lex/PPConditionalDirectiveRecord.h stable/10/contrib/llvm/tools/clang/include/clang/Lex/PTHLexer.h stable/10/contrib/llvm/tools/clang/include/clang/Lex/PreprocessingRecord.h stable/10/contrib/llvm/tools/clang/include/clang/Lex/Preprocessor.h stable/10/contrib/llvm/tools/clang/include/clang/Lex/PreprocessorLexer.h stable/10/contrib/llvm/tools/clang/include/clang/Lex/Token.h stable/10/contrib/llvm/tools/clang/include/clang/Lex/TokenLexer.h stable/10/contrib/llvm/tools/clang/include/clang/Parse/ParseDiagnostic.h stable/10/contrib/llvm/tools/clang/include/clang/Parse/Parser.h stable/10/contrib/llvm/tools/clang/include/clang/Rewrite/Core/HTMLRewrite.h stable/10/contrib/llvm/tools/clang/include/clang/Rewrite/Core/Rewriter.h stable/10/contrib/llvm/tools/clang/include/clang/Sema/AnalysisBasedWarnings.h stable/10/contrib/llvm/tools/clang/include/clang/Sema/AttributeList.h stable/10/contrib/llvm/tools/clang/include/clang/Sema/CodeCompleteConsumer.h stable/10/contrib/llvm/tools/clang/include/clang/Sema/DeclSpec.h stable/10/contrib/llvm/tools/clang/include/clang/Sema/DelayedDiagnostic.h stable/10/contrib/llvm/tools/clang/include/clang/Sema/ExternalSemaSource.h stable/10/contrib/llvm/tools/clang/include/clang/Sema/IdentifierResolver.h stable/10/contrib/llvm/tools/clang/include/clang/Sema/Initialization.h stable/10/contrib/llvm/tools/clang/include/clang/Sema/Lookup.h stable/10/contrib/llvm/tools/clang/include/clang/Sema/MultiplexExternalSemaSource.h stable/10/contrib/llvm/tools/clang/include/clang/Sema/Overload.h stable/10/contrib/llvm/tools/clang/include/clang/Sema/Ownership.h stable/10/contrib/llvm/tools/clang/include/clang/Sema/Scope.h stable/10/contrib/llvm/tools/clang/include/clang/Sema/ScopeInfo.h stable/10/contrib/llvm/tools/clang/include/clang/Sema/Sema.h stable/10/contrib/llvm/tools/clang/include/clang/Sema/SemaDiagnostic.h stable/10/contrib/llvm/tools/clang/include/clang/Sema/SemaInternal.h stable/10/contrib/llvm/tools/clang/include/clang/Sema/Template.h stable/10/contrib/llvm/tools/clang/include/clang/Sema/TemplateDeduction.h stable/10/contrib/llvm/tools/clang/include/clang/Sema/TypoCorrection.h stable/10/contrib/llvm/tools/clang/include/clang/Serialization/ASTBitCodes.h stable/10/contrib/llvm/tools/clang/include/clang/Serialization/ASTReader.h stable/10/contrib/llvm/tools/clang/include/clang/Serialization/ASTWriter.h stable/10/contrib/llvm/tools/clang/include/clang/Serialization/GlobalModuleIndex.h stable/10/contrib/llvm/tools/clang/include/clang/Serialization/ModuleManager.h stable/10/contrib/llvm/tools/clang/include/clang/Serialization/SerializationDiagnostic.h stable/10/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/Analyses.def stable/10/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h stable/10/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h stable/10/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h stable/10/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h stable/10/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/Checker.h stable/10/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h stable/10/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerRegistry.h stable/10/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathDiagnosticConsumers.h stable/10/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h stable/10/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h stable/10/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h stable/10/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h stable/10/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h stable/10/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h stable/10/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h stable/10/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h stable/10/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h stable/10/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h stable/10/contrib/llvm/tools/clang/include/clang/Tooling/ArgumentsAdjusters.h stable/10/contrib/llvm/tools/clang/include/clang/Tooling/CommonOptionsParser.h stable/10/contrib/llvm/tools/clang/include/clang/Tooling/CompilationDatabase.h stable/10/contrib/llvm/tools/clang/include/clang/Tooling/Refactoring.h stable/10/contrib/llvm/tools/clang/include/clang/Tooling/Tooling.h stable/10/contrib/llvm/tools/clang/lib/ARCMigrate/ARCMT.cpp stable/10/contrib/llvm/tools/clang/lib/ARCMigrate/FileRemapper.cpp stable/10/contrib/llvm/tools/clang/lib/ARCMigrate/ObjCMT.cpp stable/10/contrib/llvm/tools/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp stable/10/contrib/llvm/tools/clang/lib/ARCMigrate/Transforms.cpp stable/10/contrib/llvm/tools/clang/lib/ARCMigrate/Transforms.h stable/10/contrib/llvm/tools/clang/lib/AST/APValue.cpp stable/10/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp stable/10/contrib/llvm/tools/clang/lib/AST/ASTDiagnostic.cpp stable/10/contrib/llvm/tools/clang/lib/AST/ASTDumper.cpp stable/10/contrib/llvm/tools/clang/lib/AST/ASTImporter.cpp stable/10/contrib/llvm/tools/clang/lib/AST/AttrImpl.cpp stable/10/contrib/llvm/tools/clang/lib/AST/CXXABI.h stable/10/contrib/llvm/tools/clang/lib/AST/CXXInheritance.cpp stable/10/contrib/llvm/tools/clang/lib/AST/Comment.cpp stable/10/contrib/llvm/tools/clang/lib/AST/CommentCommandTraits.cpp stable/10/contrib/llvm/tools/clang/lib/AST/CommentLexer.cpp stable/10/contrib/llvm/tools/clang/lib/AST/CommentParser.cpp stable/10/contrib/llvm/tools/clang/lib/AST/CommentSema.cpp stable/10/contrib/llvm/tools/clang/lib/AST/Decl.cpp stable/10/contrib/llvm/tools/clang/lib/AST/DeclBase.cpp stable/10/contrib/llvm/tools/clang/lib/AST/DeclCXX.cpp stable/10/contrib/llvm/tools/clang/lib/AST/DeclFriend.cpp stable/10/contrib/llvm/tools/clang/lib/AST/DeclObjC.cpp stable/10/contrib/llvm/tools/clang/lib/AST/DeclOpenMP.cpp stable/10/contrib/llvm/tools/clang/lib/AST/DeclPrinter.cpp stable/10/contrib/llvm/tools/clang/lib/AST/DeclTemplate.cpp stable/10/contrib/llvm/tools/clang/lib/AST/DeclarationName.cpp stable/10/contrib/llvm/tools/clang/lib/AST/Expr.cpp stable/10/contrib/llvm/tools/clang/lib/AST/ExprCXX.cpp stable/10/contrib/llvm/tools/clang/lib/AST/ExprClassification.cpp stable/10/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp stable/10/contrib/llvm/tools/clang/lib/AST/InheritViz.cpp stable/10/contrib/llvm/tools/clang/lib/AST/ItaniumCXXABI.cpp stable/10/contrib/llvm/tools/clang/lib/AST/ItaniumMangle.cpp stable/10/contrib/llvm/tools/clang/lib/AST/Mangle.cpp stable/10/contrib/llvm/tools/clang/lib/AST/MicrosoftCXXABI.cpp stable/10/contrib/llvm/tools/clang/lib/AST/MicrosoftMangle.cpp stable/10/contrib/llvm/tools/clang/lib/AST/NestedNameSpecifier.cpp stable/10/contrib/llvm/tools/clang/lib/AST/ParentMap.cpp stable/10/contrib/llvm/tools/clang/lib/AST/RawCommentList.cpp stable/10/contrib/llvm/tools/clang/lib/AST/RecordLayout.cpp stable/10/contrib/llvm/tools/clang/lib/AST/RecordLayoutBuilder.cpp stable/10/contrib/llvm/tools/clang/lib/AST/Stmt.cpp stable/10/contrib/llvm/tools/clang/lib/AST/StmtIterator.cpp stable/10/contrib/llvm/tools/clang/lib/AST/StmtPrinter.cpp stable/10/contrib/llvm/tools/clang/lib/AST/StmtProfile.cpp stable/10/contrib/llvm/tools/clang/lib/AST/TemplateBase.cpp stable/10/contrib/llvm/tools/clang/lib/AST/Type.cpp stable/10/contrib/llvm/tools/clang/lib/AST/TypeLoc.cpp stable/10/contrib/llvm/tools/clang/lib/AST/TypePrinter.cpp stable/10/contrib/llvm/tools/clang/lib/AST/VTableBuilder.cpp stable/10/contrib/llvm/tools/clang/lib/ASTMatchers/ASTMatchFinder.cpp stable/10/contrib/llvm/tools/clang/lib/ASTMatchers/ASTMatchersInternal.cpp stable/10/contrib/llvm/tools/clang/lib/Analysis/AnalysisDeclContext.cpp stable/10/contrib/llvm/tools/clang/lib/Analysis/CFG.cpp stable/10/contrib/llvm/tools/clang/lib/Analysis/CFGReachabilityAnalysis.cpp stable/10/contrib/llvm/tools/clang/lib/Analysis/FormatString.cpp stable/10/contrib/llvm/tools/clang/lib/Analysis/LiveVariables.cpp stable/10/contrib/llvm/tools/clang/lib/Analysis/PrintfFormatString.cpp stable/10/contrib/llvm/tools/clang/lib/Analysis/ReachableCode.cpp stable/10/contrib/llvm/tools/clang/lib/Analysis/ScanfFormatString.cpp stable/10/contrib/llvm/tools/clang/lib/Analysis/ThreadSafety.cpp stable/10/contrib/llvm/tools/clang/lib/Analysis/UninitializedValues.cpp stable/10/contrib/llvm/tools/clang/lib/Basic/Builtins.cpp stable/10/contrib/llvm/tools/clang/lib/Basic/DiagnosticIDs.cpp stable/10/contrib/llvm/tools/clang/lib/Basic/FileManager.cpp stable/10/contrib/llvm/tools/clang/lib/Basic/FileSystemStatCache.cpp stable/10/contrib/llvm/tools/clang/lib/Basic/IdentifierTable.cpp stable/10/contrib/llvm/tools/clang/lib/Basic/Module.cpp stable/10/contrib/llvm/tools/clang/lib/Basic/ObjCRuntime.cpp stable/10/contrib/llvm/tools/clang/lib/Basic/OpenMPKinds.cpp stable/10/contrib/llvm/tools/clang/lib/Basic/OperatorPrecedence.cpp stable/10/contrib/llvm/tools/clang/lib/Basic/SourceManager.cpp stable/10/contrib/llvm/tools/clang/lib/Basic/TargetInfo.cpp stable/10/contrib/llvm/tools/clang/lib/Basic/Targets.cpp stable/10/contrib/llvm/tools/clang/lib/Basic/Version.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/ABIInfo.h stable/10/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGAtomic.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGBlocks.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGBuiltin.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGCUDARuntime.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGCXX.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGCXXABI.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGCXXABI.h stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGCall.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGCall.h stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGClass.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGCleanup.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGCleanup.h stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.h stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGDecl.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGException.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGExpr.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGExprAgg.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGExprCXX.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGExprComplex.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGExprConstant.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGExprScalar.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGObjC.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGObjCMac.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGObjCRuntime.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGRTTI.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGStmt.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGVTT.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.h stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGValue.h stable/10/contrib/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.h stable/10/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.h stable/10/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTBAA.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTBAA.h stable/10/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTypes.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTypes.h stable/10/contrib/llvm/tools/clang/lib/CodeGen/ItaniumCXXABI.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/MicrosoftCXXABI.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/ModuleBuilder.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.h stable/10/contrib/llvm/tools/clang/lib/Driver/Action.cpp stable/10/contrib/llvm/tools/clang/lib/Driver/CC1AsOptions.cpp stable/10/contrib/llvm/tools/clang/lib/Driver/Compilation.cpp stable/10/contrib/llvm/tools/clang/lib/Driver/Driver.cpp stable/10/contrib/llvm/tools/clang/lib/Driver/DriverOptions.cpp stable/10/contrib/llvm/tools/clang/lib/Driver/InputInfo.h stable/10/contrib/llvm/tools/clang/lib/Driver/Job.cpp stable/10/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp stable/10/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp stable/10/contrib/llvm/tools/clang/lib/Driver/ToolChains.h stable/10/contrib/llvm/tools/clang/lib/Driver/Tools.cpp stable/10/contrib/llvm/tools/clang/lib/Driver/Tools.h stable/10/contrib/llvm/tools/clang/lib/Driver/Types.cpp stable/10/contrib/llvm/tools/clang/lib/Driver/WindowsToolChain.cpp stable/10/contrib/llvm/tools/clang/lib/Edit/Commit.cpp stable/10/contrib/llvm/tools/clang/lib/Format/BreakableToken.cpp stable/10/contrib/llvm/tools/clang/lib/Format/BreakableToken.h stable/10/contrib/llvm/tools/clang/lib/Format/Format.cpp stable/10/contrib/llvm/tools/clang/lib/Format/TokenAnnotator.cpp stable/10/contrib/llvm/tools/clang/lib/Format/TokenAnnotator.h stable/10/contrib/llvm/tools/clang/lib/Format/UnwrappedLineParser.cpp stable/10/contrib/llvm/tools/clang/lib/Format/UnwrappedLineParser.h stable/10/contrib/llvm/tools/clang/lib/Format/WhitespaceManager.cpp stable/10/contrib/llvm/tools/clang/lib/Format/WhitespaceManager.h stable/10/contrib/llvm/tools/clang/lib/Frontend/ASTConsumers.cpp stable/10/contrib/llvm/tools/clang/lib/Frontend/ASTUnit.cpp stable/10/contrib/llvm/tools/clang/lib/Frontend/CacheTokens.cpp stable/10/contrib/llvm/tools/clang/lib/Frontend/ChainedIncludesSource.cpp stable/10/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp stable/10/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp stable/10/contrib/llvm/tools/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp stable/10/contrib/llvm/tools/clang/lib/Frontend/DependencyFile.cpp stable/10/contrib/llvm/tools/clang/lib/Frontend/FrontendAction.cpp stable/10/contrib/llvm/tools/clang/lib/Frontend/FrontendActions.cpp stable/10/contrib/llvm/tools/clang/lib/Frontend/FrontendOptions.cpp stable/10/contrib/llvm/tools/clang/lib/Frontend/HeaderIncludeGen.cpp stable/10/contrib/llvm/tools/clang/lib/Frontend/InitHeaderSearch.cpp stable/10/contrib/llvm/tools/clang/lib/Frontend/InitPreprocessor.cpp stable/10/contrib/llvm/tools/clang/lib/Frontend/MultiplexConsumer.cpp stable/10/contrib/llvm/tools/clang/lib/Frontend/PrintPreprocessedOutput.cpp stable/10/contrib/llvm/tools/clang/lib/Frontend/TextDiagnostic.cpp stable/10/contrib/llvm/tools/clang/lib/Frontend/TextDiagnosticPrinter.cpp stable/10/contrib/llvm/tools/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp stable/10/contrib/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp stable/10/contrib/llvm/tools/clang/lib/Headers/avx2intrin.h stable/10/contrib/llvm/tools/clang/lib/Headers/avxintrin.h stable/10/contrib/llvm/tools/clang/lib/Headers/emmintrin.h stable/10/contrib/llvm/tools/clang/lib/Headers/f16cintrin.h stable/10/contrib/llvm/tools/clang/lib/Headers/immintrin.h stable/10/contrib/llvm/tools/clang/lib/Headers/limits.h stable/10/contrib/llvm/tools/clang/lib/Headers/module.map stable/10/contrib/llvm/tools/clang/lib/Headers/prfchwintrin.h stable/10/contrib/llvm/tools/clang/lib/Headers/rdseedintrin.h stable/10/contrib/llvm/tools/clang/lib/Headers/rtmintrin.h stable/10/contrib/llvm/tools/clang/lib/Headers/smmintrin.h stable/10/contrib/llvm/tools/clang/lib/Headers/tgmath.h stable/10/contrib/llvm/tools/clang/lib/Headers/unwind.h stable/10/contrib/llvm/tools/clang/lib/Headers/x86intrin.h stable/10/contrib/llvm/tools/clang/lib/Headers/xmmintrin.h stable/10/contrib/llvm/tools/clang/lib/Headers/xopintrin.h stable/10/contrib/llvm/tools/clang/lib/Lex/HeaderMap.cpp stable/10/contrib/llvm/tools/clang/lib/Lex/HeaderSearch.cpp stable/10/contrib/llvm/tools/clang/lib/Lex/Lexer.cpp stable/10/contrib/llvm/tools/clang/lib/Lex/LiteralSupport.cpp stable/10/contrib/llvm/tools/clang/lib/Lex/ModuleMap.cpp stable/10/contrib/llvm/tools/clang/lib/Lex/PPConditionalDirectiveRecord.cpp stable/10/contrib/llvm/tools/clang/lib/Lex/PPDirectives.cpp stable/10/contrib/llvm/tools/clang/lib/Lex/PPExpressions.cpp stable/10/contrib/llvm/tools/clang/lib/Lex/PPLexerChange.cpp stable/10/contrib/llvm/tools/clang/lib/Lex/PPMacroExpansion.cpp stable/10/contrib/llvm/tools/clang/lib/Lex/PTHLexer.cpp stable/10/contrib/llvm/tools/clang/lib/Lex/Pragma.cpp stable/10/contrib/llvm/tools/clang/lib/Lex/PreprocessingRecord.cpp stable/10/contrib/llvm/tools/clang/lib/Lex/Preprocessor.cpp stable/10/contrib/llvm/tools/clang/lib/Lex/PreprocessorLexer.cpp stable/10/contrib/llvm/tools/clang/lib/Lex/TokenLexer.cpp stable/10/contrib/llvm/tools/clang/lib/Lex/UnicodeCharSets.h stable/10/contrib/llvm/tools/clang/lib/Parse/ParseAST.cpp stable/10/contrib/llvm/tools/clang/lib/Parse/ParseCXXInlineMethods.cpp stable/10/contrib/llvm/tools/clang/lib/Parse/ParseDecl.cpp stable/10/contrib/llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp stable/10/contrib/llvm/tools/clang/lib/Parse/ParseExpr.cpp stable/10/contrib/llvm/tools/clang/lib/Parse/ParseExprCXX.cpp stable/10/contrib/llvm/tools/clang/lib/Parse/ParseInit.cpp stable/10/contrib/llvm/tools/clang/lib/Parse/ParseObjc.cpp stable/10/contrib/llvm/tools/clang/lib/Parse/ParseOpenMP.cpp stable/10/contrib/llvm/tools/clang/lib/Parse/ParsePragma.cpp stable/10/contrib/llvm/tools/clang/lib/Parse/ParsePragma.h stable/10/contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp stable/10/contrib/llvm/tools/clang/lib/Parse/ParseTemplate.cpp stable/10/contrib/llvm/tools/clang/lib/Parse/ParseTentative.cpp stable/10/contrib/llvm/tools/clang/lib/Parse/Parser.cpp stable/10/contrib/llvm/tools/clang/lib/Parse/RAIIObjectsForParser.h stable/10/contrib/llvm/tools/clang/lib/Rewrite/Core/HTMLRewrite.cpp stable/10/contrib/llvm/tools/clang/lib/Rewrite/Core/Rewriter.cpp stable/10/contrib/llvm/tools/clang/lib/Rewrite/Frontend/FixItRewriter.cpp stable/10/contrib/llvm/tools/clang/lib/Rewrite/Frontend/FrontendActions.cpp stable/10/contrib/llvm/tools/clang/lib/Rewrite/Frontend/InclusionRewriter.cpp stable/10/contrib/llvm/tools/clang/lib/Rewrite/Frontend/RewriteMacros.cpp stable/10/contrib/llvm/tools/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp stable/10/contrib/llvm/tools/clang/lib/Rewrite/Frontend/RewriteObjC.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/AnalysisBasedWarnings.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/AttributeList.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/DeclSpec.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/IdentifierResolver.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/JumpDiagnostics.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/MultiplexExternalSemaSource.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/ScopeInfo.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/Sema.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/SemaAccess.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/SemaAttr.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/SemaCXXScopeSpec.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/SemaCast.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/SemaDeclAttr.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/SemaDeclObjC.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/SemaExceptionSpec.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/SemaExpr.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/SemaExprCXX.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/SemaExprMember.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/SemaExprObjC.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/SemaFixItUtils.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/SemaLambda.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/SemaLookup.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/SemaObjCProperty.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/SemaOpenMP.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/SemaOverload.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/SemaPseudoObject.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/SemaStmt.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/SemaStmtAsm.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/SemaTemplateDeduction.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/SemaTemplateVariadic.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/SemaType.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/TargetAttributesSema.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h stable/10/contrib/llvm/tools/clang/lib/Sema/TypeLocBuilder.h stable/10/contrib/llvm/tools/clang/lib/Serialization/ASTCommon.cpp stable/10/contrib/llvm/tools/clang/lib/Serialization/ASTCommon.h stable/10/contrib/llvm/tools/clang/lib/Serialization/ASTReader.cpp stable/10/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp stable/10/contrib/llvm/tools/clang/lib/Serialization/ASTReaderStmt.cpp stable/10/contrib/llvm/tools/clang/lib/Serialization/ASTWriter.cpp stable/10/contrib/llvm/tools/clang/lib/Serialization/ASTWriterDecl.cpp stable/10/contrib/llvm/tools/clang/lib/Serialization/ASTWriterStmt.cpp stable/10/contrib/llvm/tools/clang/lib/Serialization/GeneratePCH.cpp stable/10/contrib/llvm/tools/clang/lib/Serialization/GlobalModuleIndex.cpp stable/10/contrib/llvm/tools/clang/lib/Serialization/ModuleManager.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckerDocumentation.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/Checkers.td stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ClangSACheckers.h stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCContainersASTChecker.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BugReporter.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CallEvent.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerContext.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/MemRegion.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ProgramState.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/RegionStore.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.h stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/Store.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SymbolManager.cpp stable/10/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp stable/10/contrib/llvm/tools/clang/lib/Tooling/ArgumentsAdjusters.cpp stable/10/contrib/llvm/tools/clang/lib/Tooling/CommonOptionsParser.cpp stable/10/contrib/llvm/tools/clang/lib/Tooling/CompilationDatabase.cpp stable/10/contrib/llvm/tools/clang/lib/Tooling/FileMatchTrie.cpp stable/10/contrib/llvm/tools/clang/lib/Tooling/JSONCompilationDatabase.cpp stable/10/contrib/llvm/tools/clang/lib/Tooling/Refactoring.cpp stable/10/contrib/llvm/tools/clang/lib/Tooling/Tooling.cpp stable/10/contrib/llvm/tools/clang/tools/driver/cc1_main.cpp stable/10/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp stable/10/contrib/llvm/tools/clang/tools/driver/driver.cpp stable/10/contrib/llvm/tools/clang/utils/TableGen/ClangAttrEmitter.cpp stable/10/contrib/llvm/tools/clang/utils/TableGen/ClangCommentCommandInfoEmitter.cpp stable/10/contrib/llvm/tools/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp stable/10/contrib/llvm/tools/clang/utils/TableGen/NeonEmitter.cpp stable/10/contrib/llvm/tools/clang/utils/TableGen/TableGen.cpp stable/10/contrib/llvm/tools/clang/utils/TableGen/TableGenBackends.h stable/10/contrib/llvm/tools/llc/llc.cpp stable/10/contrib/llvm/tools/lldb/include/lldb/Expression/IRExecutionUnit.h stable/10/contrib/llvm/tools/lldb/source/Core/ArchSpec.cpp stable/10/contrib/llvm/tools/lldb/source/Expression/ClangExpressionParser.cpp stable/10/contrib/llvm/tools/lldb/source/Expression/IRExecutionUnit.cpp stable/10/contrib/llvm/tools/lldb/source/Expression/IRForTarget.cpp stable/10/contrib/llvm/tools/lldb/source/Host/common/FileSpec.cpp stable/10/contrib/llvm/tools/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp stable/10/contrib/llvm/tools/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp stable/10/contrib/llvm/tools/lldb/source/Symbol/ClangASTType.cpp stable/10/contrib/llvm/tools/lli/RemoteTarget.cpp stable/10/contrib/llvm/tools/lli/RemoteTarget.h stable/10/contrib/llvm/tools/lli/lli.cpp stable/10/contrib/llvm/tools/llvm-ar/llvm-ar.cpp stable/10/contrib/llvm/tools/llvm-as/llvm-as.cpp stable/10/contrib/llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp stable/10/contrib/llvm/tools/llvm-diff/DifferenceEngine.cpp stable/10/contrib/llvm/tools/llvm-diff/llvm-diff.cpp stable/10/contrib/llvm/tools/llvm-dis/llvm-dis.cpp stable/10/contrib/llvm/tools/llvm-extract/llvm-extract.cpp stable/10/contrib/llvm/tools/llvm-link/llvm-link.cpp stable/10/contrib/llvm/tools/llvm-mc/Disassembler.cpp stable/10/contrib/llvm/tools/llvm-mc/llvm-mc.cpp stable/10/contrib/llvm/tools/llvm-nm/llvm-nm.cpp stable/10/contrib/llvm/tools/llvm-objdump/COFFDump.cpp stable/10/contrib/llvm/tools/llvm-objdump/ELFDump.cpp stable/10/contrib/llvm/tools/llvm-objdump/MachODump.cpp stable/10/contrib/llvm/tools/llvm-objdump/llvm-objdump.cpp stable/10/contrib/llvm/tools/llvm-objdump/llvm-objdump.h stable/10/contrib/llvm/tools/llvm-readobj/COFFDumper.cpp stable/10/contrib/llvm/tools/llvm-readobj/ELFDumper.cpp stable/10/contrib/llvm/tools/llvm-readobj/MachODumper.cpp stable/10/contrib/llvm/tools/llvm-readobj/llvm-readobj.cpp stable/10/contrib/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp stable/10/contrib/llvm/tools/llvm-stress/llvm-stress.cpp stable/10/contrib/llvm/tools/llvm-symbolizer/LLVMSymbolize.cpp stable/10/contrib/llvm/tools/llvm-symbolizer/LLVMSymbolize.h stable/10/contrib/llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp stable/10/contrib/llvm/tools/macho-dump/macho-dump.cpp stable/10/contrib/llvm/tools/opt/opt.cpp stable/10/contrib/llvm/utils/TableGen/AsmMatcherEmitter.cpp stable/10/contrib/llvm/utils/TableGen/AsmWriterEmitter.cpp stable/10/contrib/llvm/utils/TableGen/AsmWriterInst.cpp stable/10/contrib/llvm/utils/TableGen/CodeGenDAGPatterns.cpp stable/10/contrib/llvm/utils/TableGen/CodeGenDAGPatterns.h stable/10/contrib/llvm/utils/TableGen/CodeGenInstruction.cpp stable/10/contrib/llvm/utils/TableGen/CodeGenInstruction.h stable/10/contrib/llvm/utils/TableGen/CodeGenIntrinsics.h stable/10/contrib/llvm/utils/TableGen/CodeGenMapTable.cpp stable/10/contrib/llvm/utils/TableGen/CodeGenRegisters.cpp stable/10/contrib/llvm/utils/TableGen/CodeGenRegisters.h stable/10/contrib/llvm/utils/TableGen/CodeGenSchedule.cpp stable/10/contrib/llvm/utils/TableGen/CodeGenSchedule.h stable/10/contrib/llvm/utils/TableGen/CodeGenTarget.cpp stable/10/contrib/llvm/utils/TableGen/DAGISelEmitter.cpp stable/10/contrib/llvm/utils/TableGen/DAGISelMatcher.cpp stable/10/contrib/llvm/utils/TableGen/DAGISelMatcher.h stable/10/contrib/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp stable/10/contrib/llvm/utils/TableGen/DAGISelMatcherOpt.cpp stable/10/contrib/llvm/utils/TableGen/FastISelEmitter.cpp stable/10/contrib/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp stable/10/contrib/llvm/utils/TableGen/InstrInfoEmitter.cpp stable/10/contrib/llvm/utils/TableGen/IntrinsicEmitter.cpp stable/10/contrib/llvm/utils/TableGen/OptParserEmitter.cpp stable/10/contrib/llvm/utils/TableGen/RegisterInfoEmitter.cpp stable/10/contrib/llvm/utils/TableGen/SequenceToOffsetTable.h stable/10/contrib/llvm/utils/TableGen/SetTheory.cpp stable/10/contrib/llvm/utils/TableGen/SubtargetEmitter.cpp stable/10/contrib/llvm/utils/TableGen/TGValueTypes.cpp stable/10/contrib/llvm/utils/TableGen/X86DisassemblerTables.cpp stable/10/contrib/llvm/utils/TableGen/X86DisassemblerTables.h stable/10/contrib/llvm/utils/TableGen/X86RecognizableInstr.cpp stable/10/contrib/llvm/utils/TableGen/X86RecognizableInstr.h stable/10/etc/mtree/BSD.include.dist stable/10/lib/clang/Makefile stable/10/lib/clang/clang.build.mk stable/10/lib/clang/include/Makefile stable/10/lib/clang/include/clang/Basic/Version.inc stable/10/lib/clang/include/llvm/Config/config.h stable/10/lib/clang/include/llvm/Config/llvm-config.h stable/10/lib/clang/libclanganalysis/Makefile stable/10/lib/clang/libclangast/Makefile stable/10/lib/clang/libclangcodegen/Makefile stable/10/lib/clang/libclangdriver/Makefile stable/10/lib/clang/libclangparse/Makefile stable/10/lib/clang/libclangsema/Makefile stable/10/lib/clang/libclangstaticanalyzercheckers/Makefile stable/10/lib/clang/libclangstaticanalyzercore/Makefile stable/10/lib/clang/libllvmanalysis/Makefile stable/10/lib/clang/libllvmarmdesc/Makefile stable/10/lib/clang/libllvmasmprinter/Makefile stable/10/lib/clang/libllvmcodegen/Makefile stable/10/lib/clang/libllvmcore/Makefile stable/10/lib/clang/libllvmdebuginfo/Makefile stable/10/lib/clang/libllvmexecutionengine/Makefile stable/10/lib/clang/libllvminstrumentation/Makefile stable/10/lib/clang/libllvmjit/Makefile stable/10/lib/clang/libllvmmc/Makefile stable/10/lib/clang/libllvmmipscodegen/Makefile stable/10/lib/clang/libllvmmipsdesc/Makefile stable/10/lib/clang/libllvmobject/Makefile stable/10/lib/clang/libllvmpowerpccodegen/Makefile stable/10/lib/clang/libllvmpowerpcdesc/Makefile stable/10/lib/clang/libllvmscalaropts/Makefile stable/10/lib/clang/libllvmsupport/Makefile stable/10/lib/clang/libllvmtransformutils/Makefile stable/10/lib/clang/libllvmvectorize/Makefile stable/10/lib/clang/libllvmx86desc/Makefile stable/10/share/mk/bsd.sys.mk stable/10/sys/amd64/conf/GENERIC stable/10/sys/conf/kern.mk stable/10/sys/i386/conf/GENERIC stable/10/sys/i386/conf/XEN stable/10/sys/sys/param.h stable/10/tools/build/mk/OptionalObsoleteFiles.inc stable/10/usr.bin/clang/Makefile stable/10/usr.bin/clang/bugpoint/bugpoint.1 stable/10/usr.bin/clang/clang-tblgen/Makefile stable/10/usr.bin/clang/clang.prog.mk stable/10/usr.bin/clang/clang/Makefile stable/10/usr.bin/clang/clang/clang.1 stable/10/usr.bin/clang/llc/Makefile stable/10/usr.bin/clang/llc/llc.1 stable/10/usr.bin/clang/lldb/Makefile stable/10/usr.bin/clang/lli/Makefile stable/10/usr.bin/clang/lli/lli.1 stable/10/usr.bin/clang/llvm-ar/Makefile stable/10/usr.bin/clang/llvm-ar/llvm-ar.1 stable/10/usr.bin/clang/llvm-as/llvm-as.1 stable/10/usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1 stable/10/usr.bin/clang/llvm-diff/llvm-diff.1 stable/10/usr.bin/clang/llvm-dis/llvm-dis.1 stable/10/usr.bin/clang/llvm-extract/llvm-extract.1 stable/10/usr.bin/clang/llvm-link/llvm-link.1 stable/10/usr.bin/clang/llvm-mc/Makefile stable/10/usr.bin/clang/llvm-nm/Makefile stable/10/usr.bin/clang/llvm-nm/llvm-nm.1 stable/10/usr.bin/clang/llvm-objdump/Makefile stable/10/usr.bin/clang/llvm-rtdyld/Makefile stable/10/usr.bin/clang/opt/Makefile stable/10/usr.bin/clang/opt/opt.1 stable/10/usr.bin/clang/tblgen/tblgen.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Fri Mar 21 17:53:25 2014 (r263507) +++ stable/10/ObsoleteFiles.inc Fri Mar 21 17:53:59 2014 (r263508) @@ -38,6 +38,43 @@ # xargs -n1 | sort | uniq -d; # done +# 20140321: new clang import which bumps version from 3.3 to 3.4. +OLD_FILES+=usr/bin/llvm-prof +OLD_FILES+=usr/bin/llvm-ranlib +OLD_FILES+=usr/include/clang/3.3/__wmmintrin_aes.h +OLD_FILES+=usr/include/clang/3.3/__wmmintrin_pclmul.h +OLD_FILES+=usr/include/clang/3.3/altivec.h +OLD_FILES+=usr/include/clang/3.3/ammintrin.h +OLD_FILES+=usr/include/clang/3.3/avx2intrin.h +OLD_FILES+=usr/include/clang/3.3/avxintrin.h +OLD_FILES+=usr/include/clang/3.3/bmi2intrin.h +OLD_FILES+=usr/include/clang/3.3/bmiintrin.h +OLD_FILES+=usr/include/clang/3.3/cpuid.h +OLD_FILES+=usr/include/clang/3.3/emmintrin.h +OLD_FILES+=usr/include/clang/3.3/f16cintrin.h +OLD_FILES+=usr/include/clang/3.3/fma4intrin.h +OLD_FILES+=usr/include/clang/3.3/fmaintrin.h +OLD_FILES+=usr/include/clang/3.3/immintrin.h +OLD_FILES+=usr/include/clang/3.3/lzcntintrin.h +OLD_FILES+=usr/include/clang/3.3/mm3dnow.h +OLD_FILES+=usr/include/clang/3.3/mm_malloc.h +OLD_FILES+=usr/include/clang/3.3/mmintrin.h +OLD_FILES+=usr/include/clang/3.3/module.map +OLD_FILES+=usr/include/clang/3.3/nmmintrin.h +OLD_FILES+=usr/include/clang/3.3/pmmintrin.h +OLD_FILES+=usr/include/clang/3.3/popcntintrin.h +OLD_FILES+=usr/include/clang/3.3/prfchwintrin.h +OLD_FILES+=usr/include/clang/3.3/rdseedintrin.h +OLD_FILES+=usr/include/clang/3.3/rtmintrin.h +OLD_FILES+=usr/include/clang/3.3/smmintrin.h +OLD_FILES+=usr/include/clang/3.3/tmmintrin.h +OLD_FILES+=usr/include/clang/3.3/wmmintrin.h +OLD_FILES+=usr/include/clang/3.3/x86intrin.h +OLD_FILES+=usr/include/clang/3.3/xmmintrin.h +OLD_FILES+=usr/include/clang/3.3/xopintrin.h +OLD_FILES+=usr/share/man/man1/llvm-prof.1.gz +OLD_FILES+=usr/share/man/man1/llvm-ranlib.1.gz +OLD_DIRS+=usr/include/clang/3.3 # 20131109: extattr(2) mlinks fixed OLD_FILES+=usr/share/man/man2/extattr_delete_list.2.gz OLD_FILES+=usr/share/man/man2/extattr_get_list.2.gz Modified: stable/10/UPDATING ============================================================================== --- stable/10/UPDATING Fri Mar 21 17:53:25 2014 (r263507) +++ stable/10/UPDATING Fri Mar 21 17:53:59 2014 (r263508) @@ -17,6 +17,9 @@ stable/10, and then rebuild without this older version of current is a bit fragile. +20140321: + Clang and llvm have been upgraded to 3.4 release. + 20140306: If a Makefile in a tests/ directory was auto-generating a Kyuafile instead of providing an explicit one, this would prevent such Modified: stable/10/contrib/gcc/libgcc2.c ============================================================================== --- stable/10/contrib/gcc/libgcc2.c Fri Mar 21 17:53:25 2014 (r263507) +++ stable/10/contrib/gcc/libgcc2.c Fri Mar 21 17:53:59 2014 (r263508) @@ -2007,8 +2007,8 @@ __eprintf (const char *string, const cha /* Clear part of an instruction cache. */ void -__clear_cache (char *beg __attribute__((__unused__)), - char *end __attribute__((__unused__))) +__clear_cache (void *beg __attribute__((__unused__)), + void *end __attribute__((__unused__))) { #ifdef CLEAR_INSN_CACHE CLEAR_INSN_CACHE (beg, end); Modified: stable/10/contrib/gcc/libgcc2.h ============================================================================== --- stable/10/contrib/gcc/libgcc2.h Fri Mar 21 17:53:25 2014 (r263507) +++ stable/10/contrib/gcc/libgcc2.h Fri Mar 21 17:53:59 2014 (r263508) @@ -35,7 +35,7 @@ Software Foundation, 51 Franklin Street, #endif extern int __gcc_bcmp (const unsigned char *, const unsigned char *, size_t); -extern void __clear_cache (char *, char *); +extern void __clear_cache (void *, void *); extern void __eprintf (const char *, const char *, unsigned int, const char *) __attribute__ ((__noreturn__)); Modified: stable/10/contrib/llvm/LICENSE.TXT ============================================================================== --- stable/10/contrib/llvm/LICENSE.TXT Fri Mar 21 17:53:25 2014 (r263507) +++ stable/10/contrib/llvm/LICENSE.TXT Fri Mar 21 17:53:59 2014 (r263508) @@ -68,3 +68,4 @@ Google Test llvm/utils/unittest/ OpenBSD regex llvm/lib/Support/{reg*, COPYRIGHT.regex} pyyaml tests llvm/test/YAMLParser/{*.data, LICENSE.TXT} ARM contributions llvm/lib/Target/ARM/LICENSE.TXT +md5 contributions llvm/lib/Support/MD5.cpp llvm/include/llvm/Support/MD5.h Modified: stable/10/contrib/llvm/include/llvm-c/BitReader.h ============================================================================== --- stable/10/contrib/llvm/include/llvm-c/BitReader.h Fri Mar 21 17:53:25 2014 (r263507) +++ stable/10/contrib/llvm/include/llvm-c/BitReader.h Fri Mar 21 17:53:59 2014 (r263508) @@ -34,7 +34,7 @@ extern "C" { /* Builds a module from the bitcode in the specified memory buffer, returning a reference to the module via the OutModule parameter. Returns 0 on success. - Optionally returns a human-readable error message via OutMessage. */ + Optionally returns a human-readable error message via OutMessage. */ LLVMBool LLVMParseBitcode(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutModule, char **OutMessage); @@ -44,7 +44,7 @@ LLVMBool LLVMParseBitcodeInContext(LLVMC /** Reads a module from the specified path, returning via the OutMP parameter a module provider which performs lazy deserialization. Returns 0 on success. - Optionally returns a human-readable error message via OutMessage. */ + Optionally returns a human-readable error message via OutMessage. */ LLVMBool LLVMGetBitcodeModuleInContext(LLVMContextRef ContextRef, LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM, Modified: stable/10/contrib/llvm/include/llvm-c/BitWriter.h ============================================================================== --- stable/10/contrib/llvm/include/llvm-c/BitWriter.h Fri Mar 21 17:53:25 2014 (r263507) +++ stable/10/contrib/llvm/include/llvm-c/BitWriter.h Fri Mar 21 17:53:59 2014 (r263508) @@ -34,7 +34,7 @@ extern "C" { /*===-- Operations on modules ---------------------------------------------===*/ -/** Writes a module to the specified path. Returns 0 on success. */ +/** Writes a module to the specified path. Returns 0 on success. */ int LLVMWriteBitcodeToFile(LLVMModuleRef M, const char *Path); /** Writes a module to an open file descriptor. Returns 0 on success. */ @@ -42,7 +42,7 @@ int LLVMWriteBitcodeToFD(LLVMModuleRef M int Unbuffered); /** Deprecated for LLVMWriteBitcodeToFD. Writes a module to an open file - descriptor. Returns 0 on success. Closes the Handle. */ + descriptor. Returns 0 on success. Closes the Handle. */ int LLVMWriteBitcodeToFileHandle(LLVMModuleRef M, int Handle); /** Modified: stable/10/contrib/llvm/include/llvm-c/Core.h ============================================================================== --- stable/10/contrib/llvm/include/llvm-c/Core.h Fri Mar 21 17:53:25 2014 (r263507) +++ stable/10/contrib/llvm/include/llvm-c/Core.h Fri Mar 21 17:53:59 2014 (r263508) @@ -165,7 +165,9 @@ typedef enum { a temporary measure until the API/ABI impact to the C API is understood and the path forward agreed upon. LLVMAddressSafety = 1ULL << 32, - LLVMStackProtectStrongAttribute = 1ULL<<33 + LLVMStackProtectStrongAttribute = 1ULL<<33, + LLVMCold = 1ULL << 34, + LLVMOptimizeNone = 1ULL << 35 */ } LLVMAttribute; @@ -220,6 +222,7 @@ typedef enum { LLVMPtrToInt = 39, LLVMIntToPtr = 40, LLVMBitCast = 41, + LLVMAddrSpaceCast = 60, /* Other Operators */ LLVMICmp = 42, @@ -272,7 +275,7 @@ typedef enum { LLVMLinkOnceAnyLinkage, /**< Keep one copy of function when linking (inline)*/ LLVMLinkOnceODRLinkage, /**< Same, but only replaced by something equivalent. */ - LLVMLinkOnceODRAutoHideLinkage, /**< Like LinkOnceODR, but possibly hidden. */ + LLVMLinkOnceODRAutoHideLinkage, /**< Obsolete */ LLVMWeakAnyLinkage, /**< Keep one copy of function when linking (weak) */ LLVMWeakODRLinkage, /**< Same, but only replaced by something equivalent. */ @@ -299,6 +302,8 @@ typedef enum { LLVMCCallConv = 0, LLVMFastCallConv = 8, LLVMColdCallConv = 9, + LLVMWebKitJSCallConv = 12, + LLVMAnyRegCallConv = 13, LLVMX86StdcallCallConv = 64, LLVMX86FastcallCallConv = 65 } LLVMCallConv; @@ -352,26 +357,26 @@ typedef enum { LLVMAtomicOrderingNotAtomic = 0, /**< A load or store which is not atomic */ LLVMAtomicOrderingUnordered = 1, /**< Lowest level of atomicity, guarantees somewhat sane results, lock free. */ - LLVMAtomicOrderingMonotonic = 2, /**< guarantees that if you take all the - operations affecting a specific address, + LLVMAtomicOrderingMonotonic = 2, /**< guarantees that if you take all the + operations affecting a specific address, a consistent ordering exists */ - LLVMAtomicOrderingAcquire = 4, /**< Acquire provides a barrier of the sort - necessary to acquire a lock to access other + LLVMAtomicOrderingAcquire = 4, /**< Acquire provides a barrier of the sort + necessary to acquire a lock to access other memory with normal loads and stores. */ - LLVMAtomicOrderingRelease = 5, /**< Release is similar to Acquire, but with - a barrier of the sort necessary to release + LLVMAtomicOrderingRelease = 5, /**< Release is similar to Acquire, but with + a barrier of the sort necessary to release a lock. */ - LLVMAtomicOrderingAcquireRelease = 6, /**< provides both an Acquire and a - Release barrier (for fences and + LLVMAtomicOrderingAcquireRelease = 6, /**< provides both an Acquire and a + Release barrier (for fences and operations which both read and write memory). */ - LLVMAtomicOrderingSequentiallyConsistent = 7 /**< provides Acquire semantics - for loads and Release - semantics for stores. - Additionally, it guarantees - that a total ordering exists - between all - SequentiallyConsistent + LLVMAtomicOrderingSequentiallyConsistent = 7 /**< provides Acquire semantics + for loads and Release + semantics for stores. + Additionally, it guarantees + that a total ordering exists + between all + SequentiallyConsistent operations. */ } LLVMAtomicOrdering; @@ -384,16 +389,16 @@ typedef enum { LLVMAtomicRMWBinOpOr, /**< OR a value and return the old one */ LLVMAtomicRMWBinOpXor, /**< Xor a value and return the old one */ LLVMAtomicRMWBinOpMax, /**< Sets the value if it's greater than the - original using a signed comparison and return + original using a signed comparison and return the old one */ LLVMAtomicRMWBinOpMin, /**< Sets the value if it's Smaller than the - original using a signed comparison and return + original using a signed comparison and return the old one */ LLVMAtomicRMWBinOpUMax, /**< Sets the value if it's greater than the - original using an unsigned comparison and return + original using an unsigned comparison and return the old one */ LLVMAtomicRMWBinOpUMin /**< Sets the value if it's greater than the - original using an unsigned comparison and return + original using an unsigned comparison and return the old one */ } LLVMAtomicRMWBinOp; @@ -406,13 +411,37 @@ void LLVMInitializeCore(LLVMPassRegistry /** Deallocate and destroy all ManagedStatic variables. @see llvm::llvm_shutdown @see ManagedStatic */ -void LLVMShutdown(); +void LLVMShutdown(void); /*===-- Error handling ----------------------------------------------------===*/ +char *LLVMCreateMessage(const char *Message); void LLVMDisposeMessage(char *Message); +typedef void (*LLVMFatalErrorHandler)(const char *Reason); + +/** + * Install a fatal error handler. By default, if LLVM detects a fatal error, it + * will call exit(1). This may not be appropriate in many contexts. For example, + * doing exit(1) will bypass many crash reporting/tracing system tools. This + * function allows you to install a callback that will be invoked prior to the + * call to exit(1). + */ +void LLVMInstallFatalErrorHandler(LLVMFatalErrorHandler Handler); + +/** + * Reset the fatal error handler. This resets LLVM's fatal error handling + * behavior to the default. + */ +void LLVMResetFatalErrorHandler(void); + +/** + * Enable LLVM's built-in stack trace code. This intercepts the OS's crash + * signals and prints which component of LLVM you were in at the time if the + * crash. + */ +void LLVMEnablePrettyStackTrace(void); /** * @defgroup LLVMCCoreContext Contexts @@ -458,7 +487,7 @@ unsigned LLVMGetMDKindID(const char* Nam /** * @defgroup LLVMCCoreModule Modules * - * Modules represent the top-level structure in a LLVM program. An LLVM + * Modules represent the top-level structure in an LLVM program. An LLVM * module is effectively a translation unit or a collection of * translation units merged together. * @@ -538,6 +567,14 @@ LLVMBool LLVMPrintModuleToFile(LLVMModul char **ErrorMessage); /** + * Return a string representation of the module. Use + * LLVMDisposeMessage to free the string. + * + * @see Module::print() + */ +char *LLVMPrintModuleToString(LLVMModuleRef M); + +/** * Set inline assembly for a module. * * @see Module::setModuleInlineAsm() @@ -689,6 +726,21 @@ LLVMBool LLVMTypeIsSized(LLVMTypeRef Ty) LLVMContextRef LLVMGetTypeContext(LLVMTypeRef Ty); /** + * Dump a representation of a type to stderr. + * + * @see llvm::Type::dump() + */ +void LLVMDumpType(LLVMTypeRef Val); + +/** + * Return a string representation of the type. Use + * LLVMDisposeMessage to free the string. + * + * @see llvm::Type::print() + */ +char *LLVMPrintTypeToString(LLVMTypeRef Val); + +/** * @defgroup LLVMCCoreTypeInt Integer Types * * Functions in this section operate on integer types. @@ -1039,7 +1091,7 @@ LLVMTypeRef LLVMX86MMXType(void); * hierarchy of classes within this type. Depending on the instance * obtained, not all APIs are available. * - * Callers can determine the type of a LLVMValueRef by calling the + * Callers can determine the type of an LLVMValueRef by calling the * LLVMIsA* family of functions (e.g. LLVMIsAArgument()). These * functions are defined by a macro, so it isn't obvious which are * available by looking at the Doxygen source code. Instead, look at the @@ -1061,6 +1113,9 @@ LLVMTypeRef LLVMX86MMXType(void); macro(BlockAddress) \ macro(ConstantAggregateZero) \ macro(ConstantArray) \ + macro(ConstantDataSequential) \ + macro(ConstantDataArray) \ + macro(ConstantDataVector) \ macro(ConstantExpr) \ macro(ConstantFP) \ macro(ConstantInt) \ @@ -1105,6 +1160,7 @@ LLVMTypeRef LLVMX86MMXType(void); macro(UnaryInstruction) \ macro(AllocaInst) \ macro(CastInst) \ + macro(AddrSpaceCastInst) \ macro(BitCastInst) \ macro(FPExtInst) \ macro(FPToSIInst) \ @@ -1160,6 +1216,14 @@ void LLVMSetValueName(LLVMValueRef Val, void LLVMDumpValue(LLVMValueRef Val); /** + * Return a string representation of the value. Use + * LLVMDisposeMessage to free the string. + * + * @see llvm::Value::print() + */ +char *LLVMPrintValueToString(LLVMValueRef Val); + +/** * Replace all uses of a value with another one. * * @see llvm::Value::replaceAllUsesWith() @@ -1179,7 +1243,7 @@ LLVMBool LLVMIsUndef(LLVMValueRef Val); /** * Convert value instances between types. * - * Internally, a LLVMValueRef is "pinned" to a specific type. This + * Internally, an LLVMValueRef is "pinned" to a specific type. This * series of functions allows you to cast an instance to a specific * type. * @@ -1201,7 +1265,7 @@ LLVM_FOR_EACH_VALUE_SUBCLASS(LLVM_DECLAR * This module defines functions that allow you to inspect the uses of a * LLVMValueRef. * - * It is possible to obtain a LLVMUseRef for any LLVMValueRef instance. + * It is possible to obtain an LLVMUseRef for any LLVMValueRef instance. * Each LLVMUseRef (which corresponds to a llvm::Use instance) holds a * llvm::User and llvm::Value. * @@ -1568,6 +1632,7 @@ LLVMValueRef LLVMConstFPToSI(LLVMValueRe LLVMValueRef LLVMConstPtrToInt(LLVMValueRef ConstantVal, LLVMTypeRef ToType); LLVMValueRef LLVMConstIntToPtr(LLVMValueRef ConstantVal, LLVMTypeRef ToType); LLVMValueRef LLVMConstBitCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType); +LLVMValueRef LLVMConstAddrSpaceCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType); LLVMValueRef LLVMConstZExtOrBitCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType); LLVMValueRef LLVMConstSExtOrBitCast(LLVMValueRef ConstantVal, @@ -1623,8 +1688,33 @@ const char *LLVMGetSection(LLVMValueRef void LLVMSetSection(LLVMValueRef Global, const char *Section); LLVMVisibility LLVMGetVisibility(LLVMValueRef Global); void LLVMSetVisibility(LLVMValueRef Global, LLVMVisibility Viz); -unsigned LLVMGetAlignment(LLVMValueRef Global); -void LLVMSetAlignment(LLVMValueRef Global, unsigned Bytes); + +/** + * @defgroup LLVMCCoreValueWithAlignment Values with alignment + * + * Functions in this group only apply to values with alignment, i.e. + * global variables, load and store instructions. + */ + +/** + * Obtain the preferred alignment of the value. + * @see llvm::LoadInst::getAlignment() + * @see llvm::StoreInst::getAlignment() + * @see llvm::GlobalValue::getAlignment() + */ +unsigned LLVMGetAlignment(LLVMValueRef V); + +/** + * Set the preferred alignment of the value. + * @see llvm::LoadInst::setAlignment() + * @see llvm::StoreInst::setAlignment() + * @see llvm::GlobalValue::setAlignment() + */ +void LLVMSetAlignment(LLVMValueRef V, unsigned Bytes); + +/** + * @} + */ /** * @defgroup LLVMCoreValueConstantGlobalVariable Global Variables @@ -1804,7 +1894,7 @@ LLVMValueRef LLVMGetParam(LLVMValueRef F /** * Obtain the function to which this argument belongs. * - * Unlike other functions in this group, this one takes a LLVMValueRef + * Unlike other functions in this group, this one takes an LLVMValueRef * that corresponds to a llvm::Attribute. * * The returned LLVMValueRef is the llvm::Function to which this @@ -1829,7 +1919,7 @@ LLVMValueRef LLVMGetLastParam(LLVMValueR /** * Obtain the next parameter to a function. * - * This takes a LLVMValueRef obtained from LLVMGetFirstParam() (which is + * This takes an LLVMValueRef obtained from LLVMGetFirstParam() (which is * actually a wrapped iterator) and obtains the next parameter from the * underlying iterator. */ @@ -1978,12 +2068,12 @@ void LLVMGetMDNodeOperands(LLVMValueRef LLVMValueRef LLVMBasicBlockAsValue(LLVMBasicBlockRef BB); /** - * Determine whether a LLVMValueRef is itself a basic block. + * Determine whether an LLVMValueRef is itself a basic block. */ LLVMBool LLVMValueIsBasicBlock(LLVMValueRef Val); /** - * Convert a LLVMValueRef to a LLVMBasicBlockRef instance. + * Convert an LLVMValueRef to an LLVMBasicBlockRef instance. */ LLVMBasicBlockRef LLVMValueAsBasicBlock(LLVMValueRef Val); @@ -2140,7 +2230,7 @@ LLVMValueRef LLVMGetFirstInstruction(LLV /** * Obtain the last instruction in a basic block. * - * The returned LLVMValueRef corresponds to a LLVM:Instruction. + * The returned LLVMValueRef corresponds to an LLVM:Instruction. */ LLVMValueRef LLVMGetLastInstruction(LLVMBasicBlockRef BB); @@ -2322,12 +2412,12 @@ void LLVMAddIncoming(LLVMValueRef PhiNod unsigned LLVMCountIncoming(LLVMValueRef PhiNode); /** - * Obtain an incoming value to a PHI node as a LLVMValueRef. + * Obtain an incoming value to a PHI node as an LLVMValueRef. */ LLVMValueRef LLVMGetIncomingValue(LLVMValueRef PhiNode, unsigned Index); /** - * Obtain an incoming value to a PHI node as a LLVMBasicBlockRef. + * Obtain an incoming value to a PHI node as an LLVMBasicBlockRef. */ LLVMBasicBlockRef LLVMGetIncomingBlock(LLVMValueRef PhiNode, unsigned Index); @@ -2518,6 +2608,8 @@ LLVMValueRef LLVMBuildIntToPtr(LLVMBuild LLVMTypeRef DestTy, const char *Name); LLVMValueRef LLVMBuildBitCast(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name); +LLVMValueRef LLVMBuildAddrSpaceCast(LLVMBuilderRef, LLVMValueRef Val, + LLVMTypeRef DestTy, const char *Name); LLVMValueRef LLVMBuildZExtOrBitCast(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name); LLVMValueRef LLVMBuildSExtOrBitCast(LLVMBuilderRef, LLVMValueRef Val, @@ -2571,9 +2663,9 @@ LLVMValueRef LLVMBuildIsNotNull(LLVMBuil const char *Name); LLVMValueRef LLVMBuildPtrDiff(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name); -LLVMValueRef LLVMBuildAtomicRMW(LLVMBuilderRef B,LLVMAtomicRMWBinOp op, - LLVMValueRef PTR, LLVMValueRef Val, - LLVMAtomicOrdering ordering, +LLVMValueRef LLVMBuildAtomicRMW(LLVMBuilderRef B,LLVMAtomicRMWBinOp op, + LLVMValueRef PTR, LLVMValueRef Val, + LLVMAtomicOrdering ordering, LLVMBool singleThread); /** @@ -2706,16 +2798,16 @@ void LLVMDisposePassManager(LLVMPassMana initialization succeeded. Must be executed in isolation from all other LLVM api calls. @see llvm::llvm_start_multithreaded */ -LLVMBool LLVMStartMultithreaded(); +LLVMBool LLVMStartMultithreaded(void); /** Deallocate structures necessary to make LLVM safe for multithreading. Must be executed in isolation from all other LLVM api calls. @see llvm::llvm_stop_multithreaded */ -void LLVMStopMultithreaded(); +void LLVMStopMultithreaded(void); /** Check whether LLVM is executing in thread-safe mode or not. @see llvm::llvm_is_multithreaded */ -LLVMBool LLVMIsMultithreaded(); +LLVMBool LLVMIsMultithreaded(void); /** * @} Modified: stable/10/contrib/llvm/include/llvm-c/Disassembler.h ============================================================================== --- stable/10/contrib/llvm/include/llvm-c/Disassembler.h Fri Mar 21 17:53:25 2014 (r263507) +++ stable/10/contrib/llvm/include/llvm-c/Disassembler.h Fri Mar 21 17:53:59 2014 (r263508) @@ -42,7 +42,7 @@ typedef void *LLVMDisasmContextRef; * instruction are specified by the Offset parameter and its byte widith is the * size parameter. For instructions sets with fixed widths and one symbolic * operand per instruction, the Offset parameter will be zero and Size parameter - * will be the instruction width. The information is returned in TagBuf and is + * will be the instruction width. The information is returned in TagBuf and is * Triple specific with its specific information defined by the value of * TagType for that Triple. If symbolic information is returned the function * returns 1, otherwise it returns 0. @@ -58,7 +58,7 @@ typedef int (*LLVMOpInfoCallback)(void * * SubtractSymbol can be link edited independent of each other. Many other * platforms only allow a relocatable expression of the form AddSymbol + Offset * to be encoded. - * + * * The LLVMOpInfoCallback() for the TagType value of 1 uses the struct * LLVMOpInfo1. The value of the relocatable expression for the operand, * including any PC adjustment, is passed in to the call back in the Value @@ -130,6 +130,17 @@ typedef const char *(*LLVMSymbolLookupCa /* The output reference is to a cstring address in a literal pool. */ #define LLVMDisassembler_ReferenceType_Out_LitPool_CstrAddr 3 +/* The output reference is to a Objective-C CoreFoundation string. */ +#define LLVMDisassembler_ReferenceType_Out_Objc_CFString_Ref 4 +/* The output reference is to a Objective-C message. */ +#define LLVMDisassembler_ReferenceType_Out_Objc_Message 5 +/* The output reference is to a Objective-C message ref. */ +#define LLVMDisassembler_ReferenceType_Out_Objc_Message_Ref 6 +/* The output reference is to a Objective-C selector ref. */ +#define LLVMDisassembler_ReferenceType_Out_Objc_Selector_Ref 7 +/* The output reference is to a Objective-C class ref. */ +#define LLVMDisassembler_ReferenceType_Out_Objc_Class_Ref 8 + #ifdef __cplusplus extern "C" { #endif /* !defined(__cplusplus) */ @@ -170,6 +181,10 @@ int LLVMSetDisasmOptions(LLVMDisasmConte #define LLVMDisassembler_Option_PrintImmHex 2 /* The option use the other assembler printer variant */ #define LLVMDisassembler_Option_AsmPrinterVariant 4 +/* The option to set comment on instructions */ +#define LLVMDisassembler_Option_SetInstrComments 8 + /* The option to print latency information alongside instructions */ +#define LLVMDisassembler_Option_PrintLatency 16 /** * Dispose of a disassembler context. Modified: stable/10/contrib/llvm/include/llvm-c/ExecutionEngine.h ============================================================================== --- stable/10/contrib/llvm/include/llvm-c/ExecutionEngine.h Fri Mar 21 17:53:25 2014 (r263507) +++ stable/10/contrib/llvm/include/llvm-c/ExecutionEngine.h Fri Mar 21 17:53:59 2014 (r263508) @@ -40,12 +40,14 @@ void LLVMLinkInInterpreter(void); typedef struct LLVMOpaqueGenericValue *LLVMGenericValueRef; typedef struct LLVMOpaqueExecutionEngine *LLVMExecutionEngineRef; +typedef struct LLVMOpaqueMCJITMemoryManager *LLVMMCJITMemoryManagerRef; struct LLVMMCJITCompilerOptions { unsigned OptLevel; LLVMCodeModel CodeModel; LLVMBool NoFramePointerElim; LLVMBool EnableFastISel; + LLVMMCJITMemoryManagerRef MCJMM; }; /*===-- Operations on generic values --------------------------------------===*/ @@ -167,12 +169,44 @@ void LLVMAddGlobalMapping(LLVMExecutionE void *LLVMGetPointerToGlobal(LLVMExecutionEngineRef EE, LLVMValueRef Global); +/*===-- Operations on memory managers -------------------------------------===*/ + +typedef uint8_t *(*LLVMMemoryManagerAllocateCodeSectionCallback)( + void *Opaque, uintptr_t Size, unsigned Alignment, unsigned SectionID, + const char *SectionName); +typedef uint8_t *(*LLVMMemoryManagerAllocateDataSectionCallback)( + void *Opaque, uintptr_t Size, unsigned Alignment, unsigned SectionID, + const char *SectionName, LLVMBool IsReadOnly); +typedef LLVMBool (*LLVMMemoryManagerFinalizeMemoryCallback)( + void *Opaque, char **ErrMsg); +typedef void (*LLVMMemoryManagerDestroyCallback)(void *Opaque); + +/** + * Create a simple custom MCJIT memory manager. This memory manager can + * intercept allocations in a module-oblivious way. This will return NULL + * if any of the passed functions are NULL. + * + * @param Opaque An opaque client object to pass back to the callbacks. + * @param AllocateCodeSection Allocate a block of memory for executable code. + * @param AllocateDataSection Allocate a block of memory for data. + * @param FinalizeMemory Set page permissions and flush cache. Return 0 on + * success, 1 on error. + */ +LLVMMCJITMemoryManagerRef LLVMCreateSimpleMCJITMemoryManager( + void *Opaque, + LLVMMemoryManagerAllocateCodeSectionCallback AllocateCodeSection, + LLVMMemoryManagerAllocateDataSectionCallback AllocateDataSection, + LLVMMemoryManagerFinalizeMemoryCallback FinalizeMemory, + LLVMMemoryManagerDestroyCallback Destroy); + +void LLVMDisposeMCJITMemoryManager(LLVMMCJITMemoryManagerRef MM); + /** * @} */ #ifdef __cplusplus -} +} #endif /* defined(__cplusplus) */ #endif Copied: stable/10/contrib/llvm/include/llvm-c/IRReader.h (from r261991, head/contrib/llvm/include/llvm-c/IRReader.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/llvm/include/llvm-c/IRReader.h Fri Mar 21 17:53:59 2014 (r263508, copy of r261991, head/contrib/llvm/include/llvm-c/IRReader.h) @@ -0,0 +1,40 @@ +/*===-- llvm-c/IRReader.h - IR Reader C Interface -----------------*- C -*-===*\ +|* *| +|* The LLVM Compiler Infrastructure *| +|* *| +|* This file is distributed under the University of Illinois Open Source *| +|* License. See LICENSE.TXT for details. *| +|* *| +|*===----------------------------------------------------------------------===*| +|* *| +|* This file defines the C interface to the IR Reader. *| +|* *| +\*===----------------------------------------------------------------------===*/ + +#ifndef LLVM_C_IRREADER_H +#define LLVM_C_IRREADER_H + +#include "llvm-c/Core.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Read LLVM IR from a memory buffer and convert it into an in-memory Module + * object. Returns 0 on success. + * Optionally returns a human-readable description of any errors that + * occured during parsing IR. OutMessage must be disposed with + * LLVMDisposeMessage. + * + * @see llvm::ParseIR() + */ +LLVMBool LLVMParseIRInContext(LLVMContextRef ContextRef, + LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM, + char **OutMessage); + +#ifdef __cplusplus +} +#endif + +#endif Modified: stable/10/contrib/llvm/include/llvm-c/LinkTimeOptimizer.h ============================================================================== --- stable/10/contrib/llvm/include/llvm-c/LinkTimeOptimizer.h Fri Mar 21 17:53:25 2014 (r263507) +++ stable/10/contrib/llvm/include/llvm-c/LinkTimeOptimizer.h Fri Mar 21 17:53:59 2014 (r263508) @@ -4,7 +4,7 @@ // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This header provides a C API to use the LLVM link time optimization @@ -46,7 +46,7 @@ extern "C" { // Added C-specific error codes LLVM_LTO_NULL_OBJECT } llvm_lto_status_t; - + /// This provides C interface to initialize link time optimizer. This allows /// linker to use dlopen() interface to dynamically load LinkTimeOptimizer. /// extern "C" helps, because dlopen() interface uses name to find the symbol. Modified: stable/10/contrib/llvm/include/llvm-c/Object.h ============================================================================== --- stable/10/contrib/llvm/include/llvm-c/Object.h Fri Mar 21 17:53:25 2014 (r263507) +++ stable/10/contrib/llvm/include/llvm-c/Object.h Fri Mar 21 17:53:59 2014 (r263508) @@ -100,4 +100,3 @@ const char *LLVMGetRelocationValueString #endif /* defined(__cplusplus) */ #endif - Copied: stable/10/contrib/llvm/include/llvm-c/Support.h (from r261991, head/contrib/llvm/include/llvm-c/Support.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/llvm/include/llvm-c/Support.h Fri Mar 21 17:53:59 2014 (r263508, copy of r261991, head/contrib/llvm/include/llvm-c/Support.h) @@ -0,0 +1,35 @@ +/*===-- llvm-c/Support.h - Support C Interface --------------------*- C -*-===*\ +|* *| +|* The LLVM Compiler Infrastructure *| +|* *| +|* This file is distributed under the University of Illinois Open Source *| +|* License. See LICENSE.TXT for details. *| +|* *| +|*===----------------------------------------------------------------------===*| +|* *| +|* This file defines the C interface to the LLVM support library. *| +|* *| +\*===----------------------------------------------------------------------===*/ + +#ifndef LLVM_C_SUPPORT_H +#define LLVM_C_SUPPORT_H + +#include "llvm-c/Core.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * This function permanently loads the dynamic library at the given path. + * It is safe to call this function multiple times for the same library. + * + * @see sys::DynamicLibrary::LoadLibraryPermanently() + */ +LLVMBool LLVMLoadLibraryPermanently(const char* Filename); + +#ifdef __cplusplus +} +#endif + +#endif Modified: stable/10/contrib/llvm/include/llvm-c/Target.h ============================================================================== --- stable/10/contrib/llvm/include/llvm-c/Target.h Fri Mar 21 17:53:25 2014 (r263507) +++ stable/10/contrib/llvm/include/llvm-c/Target.h Fri Mar 21 17:53:59 2014 (r263508) @@ -22,6 +22,10 @@ #include "llvm-c/Core.h" #include "llvm/Config/llvm-config.h" +#if defined(_MSC_VER) && !defined(inline) +#define inline __inline +#endif + #ifdef __cplusplus extern "C" { #endif @@ -37,14 +41,13 @@ enum LLVMByteOrdering { LLVMBigEndian, L typedef struct LLVMOpaqueTargetData *LLVMTargetDataRef; typedef struct LLVMOpaqueTargetLibraryInfotData *LLVMTargetLibraryInfoRef; -typedef struct LLVMStructLayout *LLVMStructLayoutRef; /* Declare all of the target-initialization functions that are available. */ #define LLVM_TARGET(TargetName) \ void LLVMInitialize##TargetName##TargetInfo(void); #include "llvm/Config/Targets.def" #undef LLVM_TARGET /* Explicit undef to make SWIG happier */ - + #define LLVM_TARGET(TargetName) void LLVMInitialize##TargetName##Target(void); #include "llvm/Config/Targets.def" #undef LLVM_TARGET /* Explicit undef to make SWIG happier */ @@ -53,7 +56,7 @@ typedef struct LLVMStructLayout *LLVMStr void LLVMInitialize##TargetName##TargetMC(void); #include "llvm/Config/Targets.def" #undef LLVM_TARGET /* Explicit undef to make SWIG happier */ - + /* Declare all of the available assembly printer initialization functions. */ #define LLVM_ASM_PRINTER(TargetName) \ void LLVMInitialize##TargetName##AsmPrinter(void); @@ -71,7 +74,7 @@ typedef struct LLVMStructLayout *LLVMStr void LLVMInitialize##TargetName##Disassembler(void); #include "llvm/Config/Disassemblers.def" #undef LLVM_DISASSEMBLER /* Explicit undef to make SWIG happier */ - + /** LLVMInitializeAllTargetInfos - The main program should call this function if it wants access to all available targets that LLVM is configured to support. */ @@ -98,7 +101,7 @@ static inline void LLVMInitializeAllTarg #include "llvm/Config/Targets.def" #undef LLVM_TARGET /* Explicit undef to make SWIG happier */ } - + /** LLVMInitializeAllAsmPrinters - The main program should call this function if it wants all asm printers that LLVM is configured to support, to make them available via the TargetRegistry. */ @@ -107,7 +110,7 @@ static inline void LLVMInitializeAllAsmP #include "llvm/Config/AsmPrinters.def" #undef LLVM_ASM_PRINTER /* Explicit undef to make SWIG happier */ } - + /** LLVMInitializeAllAsmParsers - The main program should call this function if it wants all asm parsers that LLVM is configured to support, to make them available via the TargetRegistry. */ @@ -116,7 +119,7 @@ static inline void LLVMInitializeAllAsmP #include "llvm/Config/AsmParsers.def" #undef LLVM_ASM_PARSER /* Explicit undef to make SWIG happier */ } - + /** LLVMInitializeAllDisassemblers - The main program should call this function if it wants all disassemblers that LLVM is configured to support, to make them available via the TargetRegistry. */ @@ -126,9 +129,9 @@ static inline void LLVMInitializeAllDisa #include "llvm/Config/Disassemblers.def" #undef LLVM_DISASSEMBLER /* Explicit undef to make SWIG happier */ } - + /** LLVMInitializeNativeTarget - The main program should call this function to - initialize the native target corresponding to the host. This is useful + initialize the native target corresponding to the host. This is useful for JIT applications to ensure that the target gets linked in correctly. */ static inline LLVMBool LLVMInitializeNativeTarget(void) { /* If we have a native target, initialize it to ensure it is linked in. */ @@ -140,7 +143,43 @@ static inline LLVMBool LLVMInitializeNat #else return 1; #endif -} +} + +/** LLVMInitializeNativeTargetAsmParser - The main program should call this + function to initialize the parser for the native target corresponding to the + host. */ +static inline LLVMBool LLVMInitializeNativeAsmParser(void) { +#ifdef LLVM_NATIVE_ASMPARSER + LLVM_NATIVE_ASMPARSER(); + return 0; +#else + return 1; +#endif +} + +/** LLVMInitializeNativeTargetAsmPrinter - The main program should call this + function to initialize the printer for the native target corresponding to + the host. */ +static inline LLVMBool LLVMInitializeNativeAsmPrinter(void) { +#ifdef LLVM_NATIVE_ASMPRINTER + LLVM_NATIVE_ASMPRINTER(); + return 0; +#else + return 1; +#endif +} + +/** LLVMInitializeNativeTargetDisassembler - The main program should call this + function to initialize the disassembler for the native target corresponding + to the host. */ +static inline LLVMBool LLVMInitializeNativeDisassembler(void) { +#ifdef LLVM_NATIVE_DISASSEMBLER + LLVM_NATIVE_DISASSEMBLER(); + return 0; +#else + return 1; +#endif +} /*===-- Target Data -------------------------------------------------------===*/ @@ -151,83 +190,94 @@ LLVMTargetDataRef LLVMCreateTargetData(c /** Adds target data information to a pass manager. This does not take ownership of the target data. See the method llvm::PassManagerBase::add. */ -void LLVMAddTargetData(LLVMTargetDataRef, LLVMPassManagerRef); +void LLVMAddTargetData(LLVMTargetDataRef TD, LLVMPassManagerRef PM); /** Adds target library information to a pass manager. This does not take ownership of the target library info. See the method llvm::PassManagerBase::add. */ -void LLVMAddTargetLibraryInfo(LLVMTargetLibraryInfoRef, LLVMPassManagerRef); +void LLVMAddTargetLibraryInfo(LLVMTargetLibraryInfoRef TLI, + LLVMPassManagerRef PM); /** Converts target data to a target layout string. The string must be disposed with LLVMDisposeMessage. See the constructor llvm::DataLayout::DataLayout. */ -char *LLVMCopyStringRepOfTargetData(LLVMTargetDataRef); +char *LLVMCopyStringRepOfTargetData(LLVMTargetDataRef TD); /** Returns the byte order of a target, either LLVMBigEndian or LLVMLittleEndian. See the method llvm::DataLayout::isLittleEndian. */ -enum LLVMByteOrdering LLVMByteOrder(LLVMTargetDataRef); +enum LLVMByteOrdering LLVMByteOrder(LLVMTargetDataRef TD); /** Returns the pointer size in bytes for a target. See the method llvm::DataLayout::getPointerSize. */ -unsigned LLVMPointerSize(LLVMTargetDataRef); +unsigned LLVMPointerSize(LLVMTargetDataRef TD); /** Returns the pointer size in bytes for a target for a specified address space. See the method llvm::DataLayout::getPointerSize. */ -unsigned LLVMPointerSizeForAS(LLVMTargetDataRef, unsigned AS); +unsigned LLVMPointerSizeForAS(LLVMTargetDataRef TD, unsigned AS); + +/** Returns the integer type that is the same size as a pointer on a target. + See the method llvm::DataLayout::getIntPtrType. */ +LLVMTypeRef LLVMIntPtrType(LLVMTargetDataRef TD); + +/** Returns the integer type that is the same size as a pointer on a target. + This version allows the address space to be specified. + See the method llvm::DataLayout::getIntPtrType. */ +LLVMTypeRef LLVMIntPtrTypeForAS(LLVMTargetDataRef TD, unsigned AS); /** Returns the integer type that is the same size as a pointer on a target. See the method llvm::DataLayout::getIntPtrType. */ -LLVMTypeRef LLVMIntPtrType(LLVMTargetDataRef); +LLVMTypeRef LLVMIntPtrTypeInContext(LLVMContextRef C, LLVMTargetDataRef TD); /** Returns the integer type that is the same size as a pointer on a target. This version allows the address space to be specified. See the method llvm::DataLayout::getIntPtrType. */ -LLVMTypeRef LLVMIntPtrTypeForAS(LLVMTargetDataRef, unsigned AS); +LLVMTypeRef LLVMIntPtrTypeForASInContext(LLVMContextRef C, LLVMTargetDataRef TD, + unsigned AS); /** Computes the size of a type in bytes for a target. See the method llvm::DataLayout::getTypeSizeInBits. */ -unsigned long long LLVMSizeOfTypeInBits(LLVMTargetDataRef, LLVMTypeRef); +unsigned long long LLVMSizeOfTypeInBits(LLVMTargetDataRef TD, LLVMTypeRef Ty); /** Computes the storage size of a type in bytes for a target. See the method llvm::DataLayout::getTypeStoreSize. */ -unsigned long long LLVMStoreSizeOfType(LLVMTargetDataRef, LLVMTypeRef); +unsigned long long LLVMStoreSizeOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty); /** Computes the ABI size of a type in bytes for a target. See the method llvm::DataLayout::getTypeAllocSize. */ -unsigned long long LLVMABISizeOfType(LLVMTargetDataRef, LLVMTypeRef); +unsigned long long LLVMABISizeOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty); /** Computes the ABI alignment of a type in bytes for a target. See the method llvm::DataLayout::getTypeABISize. */ -unsigned LLVMABIAlignmentOfType(LLVMTargetDataRef, LLVMTypeRef); +unsigned LLVMABIAlignmentOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty); /** Computes the call frame alignment of a type in bytes for a target. See the method llvm::DataLayout::getTypeABISize. */ -unsigned LLVMCallFrameAlignmentOfType(LLVMTargetDataRef, LLVMTypeRef); +unsigned LLVMCallFrameAlignmentOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty); /** Computes the preferred alignment of a type in bytes for a target. See the method llvm::DataLayout::getTypeABISize. */ -unsigned LLVMPreferredAlignmentOfType(LLVMTargetDataRef, LLVMTypeRef); +unsigned LLVMPreferredAlignmentOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty); /** Computes the preferred alignment of a global variable in bytes for a target. See the method llvm::DataLayout::getPreferredAlignment. */ -unsigned LLVMPreferredAlignmentOfGlobal(LLVMTargetDataRef, +unsigned LLVMPreferredAlignmentOfGlobal(LLVMTargetDataRef TD, LLVMValueRef GlobalVar); /** Computes the structure element that contains the byte offset for a target. See the method llvm::StructLayout::getElementContainingOffset. */ -unsigned LLVMElementAtOffset(LLVMTargetDataRef, LLVMTypeRef StructTy, +unsigned LLVMElementAtOffset(LLVMTargetDataRef TD, LLVMTypeRef StructTy, unsigned long long Offset); /** Computes the byte offset of the indexed struct element for a target. See the method llvm::StructLayout::getElementContainingOffset. */ -unsigned long long LLVMOffsetOfElement(LLVMTargetDataRef, LLVMTypeRef StructTy, - unsigned Element); +unsigned long long LLVMOffsetOfElement(LLVMTargetDataRef TD, + LLVMTypeRef StructTy, unsigned Element); /** Deallocates a TargetData. See the destructor llvm::DataLayout::~DataLayout. */ -void LLVMDisposeTargetData(LLVMTargetDataRef); +void LLVMDisposeTargetData(LLVMTargetDataRef TD); /** * @} Modified: stable/10/contrib/llvm/include/llvm-c/TargetMachine.h ============================================================================== --- stable/10/contrib/llvm/include/llvm-c/TargetMachine.h Fri Mar 21 17:53:25 2014 (r263507) +++ stable/10/contrib/llvm/include/llvm-c/TargetMachine.h Fri Mar 21 17:53:59 2014 (r263508) @@ -57,11 +57,21 @@ typedef enum { } LLVMCodeGenFileType; /** Returns the first llvm::Target in the registered targets list. */ -LLVMTargetRef LLVMGetFirstTarget(); +LLVMTargetRef LLVMGetFirstTarget(void); /** Returns the next llvm::Target given a previous one (or null if there's none) */ LLVMTargetRef LLVMGetNextTarget(LLVMTargetRef T); /*===-- Target ------------------------------------------------------------===*/ +/** Finds the target corresponding to the given name and stores it in \p T. + Returns 0 on success. */ +LLVMTargetRef LLVMGetTargetFromName(const char *Name); + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 17:56:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C6E39E0; Fri, 21 Mar 2014 17:56:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 32C67BD1; Fri, 21 Mar 2014 17:56:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LHudSx030764; Fri, 21 Mar 2014 17:56:39 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LHuZkH030742; Fri, 21 Mar 2014 17:56:35 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201403211756.s2LHuZkH030742@svn.freebsd.org> From: Dimitry Andric Date: Fri, 21 Mar 2014 17:56:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263509 - in stable/9: . contrib/gcc contrib/llvm contrib/llvm/include/llvm contrib/llvm/include/llvm-c contrib/llvm/include/llvm-c/Transforms contrib/llvm/include/llvm/ADT contrib/llvm... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 17:56:39 -0000 Author: dim Date: Fri Mar 21 17:56:32 2014 New Revision: 263509 URL: http://svnweb.freebsd.org/changeset/base/263509 Log: MFC 254790 (by emaste): Import llvm r187614 (git 44c8e34), for lldb's use: Author: Daniel Malea Date: Thu Aug 1 21:18:16 2013 +0000 Fixed the Intel-syntax X86 disassembler to respect the (existing) option for hexadecimal immediates, to match AT&T syntax. This also brings a new option for C-vs-MASM-style hex. Patch by Richard Mitton Reviewed: http://llvm-reviews.chandlerc.com/D1243 MFC 258003 (by emaste): Merge upstream LLVM r182803: [Mips] Add Mips specific dynamic table entry tags. This is to support an upcoming LLDB snapshot update. Reviewed by: dim@ Sponsored by: DARPA, AFRL MFC 258005: Merge upstream LLVM r192118: Formally added an explicit enum for DWARF TLS support. No functionality change. Reviewed by: dim@ Sponsored by: DARPA, AFRL MFC 261991: Upgrade our copy of llvm/clang to 3.4 release. This version supports all of the features in the current working draft of the upcoming C++ standard, provisionally named C++1y. The code generator's performance is greatly increased, and the loop auto-vectorizer is now enabled at -Os and -O2 in addition to -O3. The PowerPC backend has made several major improvements to code generation quality and compile time, and the X86, SPARC, ARM32, Aarch64 and SystemZ backends have all seen major feature work. Release notes for llvm and clang can be found here: MFC 262303: Pull in r197521 from upstream clang trunk (by rdivacky): Use the integrated assembler by default on FreeBSD/ppc and ppc64. Requested by: jhibbits MFC 262611: Pull in r196874 from upstream llvm trunk: Fix a crash that occurs when PWD is invalid. MCJIT needs to be able to run in hostile environments, even when PWD is invalid. There's no need to crash MCJIT in this case. The obvious fix is to simply leave MCContext's CompilationDir empty when PWD can't be determined. This way, MCJIT clients, and other clients that link with LLVM don't need a valid working directory. If we do want to guarantee valid CompilationDir, that should be done only for clients of getCompilationDir(). This is as simple as checking for an empty string. The only current use of getCompilationDir is EmitGenDwarfInfo, which won't conceivably run with an invalid working dir. However, in the purely hypothetically and untestable case that this happens, the AT_comp_dir will be omitted from the compilation_unit DIE. This should help fix assertions occurring with ports-mgmt/tinderbox, when it is using jails, and sometimes invalidates clang's current working directory. Reported by: decke MFC 262809: Pull in r203007 from upstream clang trunk: Don't produce an alias between destructors with different calling conventions. Fixes pr19007. (Please note that is an LLVM PR identifier, not a FreeBSD one.) This should fix Firefox and/or libxul crashes (due to problems with regparm/stdcall calling conventions) on i386. Reported by: multiple users on freebsd-current PR: bin/187103 MFC 263048: Repair recognition of "CC" as an alias for the C++ compiler, since it was silently broken by upstream for a Windows-specific use-case. Apparently some versions of CMake still rely on this archaic feature... Reported by: rakuco MFC 263049: Garbage collect the old way of adding the libstdc++ include directories in clang's InitHeaderSearch.cpp. This has been superseded by David Chisnall's commit in r255321. Moreover, if libc++ is used, the libstdc++ include directories should not be in the search path at all. These directories are now only used if you pass -stdlib=libstdc++. Added: stable/9/contrib/llvm/include/llvm-c/IRReader.h - copied unchanged from r261991, head/contrib/llvm/include/llvm-c/IRReader.h stable/9/contrib/llvm/include/llvm-c/Support.h - copied unchanged from r261991, head/contrib/llvm/include/llvm-c/Support.h stable/9/contrib/llvm/include/llvm/ADT/polymorphic_ptr.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/ADT/polymorphic_ptr.h stable/9/contrib/llvm/include/llvm/Analysis/CFG.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/Analysis/CFG.h stable/9/contrib/llvm/include/llvm/CodeGen/LiveRegUnits.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/CodeGen/LiveRegUnits.h stable/9/contrib/llvm/include/llvm/CodeGen/StackMaps.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/CodeGen/StackMaps.h stable/9/contrib/llvm/include/llvm/CodeGen/StackProtector.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/CodeGen/StackProtector.h stable/9/contrib/llvm/include/llvm/ExecutionEngine/RTDyldMemoryManager.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/ExecutionEngine/RTDyldMemoryManager.h stable/9/contrib/llvm/include/llvm/IR/IntrinsicsAArch64.td - copied unchanged from r261991, head/contrib/llvm/include/llvm/IR/IntrinsicsAArch64.td stable/9/contrib/llvm/include/llvm/IR/LegacyPassManager.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/IR/LegacyPassManager.h stable/9/contrib/llvm/include/llvm/IR/LegacyPassManagers.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/IR/LegacyPassManagers.h stable/9/contrib/llvm/include/llvm/IR/PassManager.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/IR/PassManager.h stable/9/contrib/llvm/include/llvm/LTO/ - copied from r261991, head/contrib/llvm/include/llvm/LTO/ stable/9/contrib/llvm/include/llvm/MC/MCAsmInfoELF.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/MC/MCAsmInfoELF.h stable/9/contrib/llvm/include/llvm/MC/MCExternalSymbolizer.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/MC/MCExternalSymbolizer.h stable/9/contrib/llvm/include/llvm/MC/MCFunction.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/MC/MCFunction.h stable/9/contrib/llvm/include/llvm/MC/MCModuleYAML.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/MC/MCModuleYAML.h stable/9/contrib/llvm/include/llvm/MC/MCObjectDisassembler.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/MC/MCObjectDisassembler.h stable/9/contrib/llvm/include/llvm/MC/MCObjectSymbolizer.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/MC/MCObjectSymbolizer.h stable/9/contrib/llvm/include/llvm/MC/MCRelocationInfo.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/MC/MCRelocationInfo.h stable/9/contrib/llvm/include/llvm/MC/MCSymbolizer.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/MC/MCSymbolizer.h stable/9/contrib/llvm/include/llvm/Object/COFFYAML.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/Object/COFFYAML.h stable/9/contrib/llvm/include/llvm/Object/ELFObjectFile.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/Object/ELFObjectFile.h stable/9/contrib/llvm/include/llvm/Object/ELFTypes.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/Object/ELFTypes.h stable/9/contrib/llvm/include/llvm/Object/ELFYAML.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/Object/ELFYAML.h stable/9/contrib/llvm/include/llvm/Object/MachOUniversal.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/Object/MachOUniversal.h stable/9/contrib/llvm/include/llvm/Object/YAML.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/Object/YAML.h stable/9/contrib/llvm/include/llvm/Support/MD5.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/Support/MD5.h stable/9/contrib/llvm/include/llvm/Support/StringRefMemoryObject.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/Support/StringRefMemoryObject.h stable/9/contrib/llvm/include/llvm/Support/Unicode.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/Support/Unicode.h stable/9/contrib/llvm/include/llvm/Support/UnicodeCharRanges.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/Support/UnicodeCharRanges.h stable/9/contrib/llvm/include/llvm/TableGen/StringToOffsetTable.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/TableGen/StringToOffsetTable.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/GlobalStatus.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/Transforms/Utils/GlobalStatus.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/LoopUtils.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/Transforms/Utils/LoopUtils.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/SpecialCaseList.h - copied unchanged from r261991, head/contrib/llvm/include/llvm/Transforms/Utils/SpecialCaseList.h stable/9/contrib/llvm/lib/Analysis/CFG.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Analysis/CFG.cpp stable/9/contrib/llvm/lib/Analysis/Delinearization.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Analysis/Delinearization.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp - copied unchanged from r261991, head/contrib/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DIEHash.h - copied unchanged from r261991, head/contrib/llvm/lib/CodeGen/AsmPrinter/DIEHash.h stable/9/contrib/llvm/lib/CodeGen/LiveRegUnits.cpp - copied unchanged from r261991, head/contrib/llvm/lib/CodeGen/LiveRegUnits.cpp stable/9/contrib/llvm/lib/CodeGen/StackMaps.cpp - copied unchanged from r261991, head/contrib/llvm/lib/CodeGen/StackMaps.cpp stable/9/contrib/llvm/lib/DebugInfo/DWARFDebugLoc.cpp - copied unchanged from r261991, head/contrib/llvm/lib/DebugInfo/DWARFDebugLoc.cpp stable/9/contrib/llvm/lib/DebugInfo/DWARFDebugLoc.h - copied unchanged from r261991, head/contrib/llvm/lib/DebugInfo/DWARFDebugLoc.h stable/9/contrib/llvm/lib/DebugInfo/DWARFTypeUnit.cpp - copied unchanged from r261991, head/contrib/llvm/lib/DebugInfo/DWARFTypeUnit.cpp stable/9/contrib/llvm/lib/DebugInfo/DWARFTypeUnit.h - copied unchanged from r261991, head/contrib/llvm/lib/DebugInfo/DWARFTypeUnit.h stable/9/contrib/llvm/lib/DebugInfo/DWARFUnit.cpp - copied unchanged from r261991, head/contrib/llvm/lib/DebugInfo/DWARFUnit.cpp stable/9/contrib/llvm/lib/DebugInfo/DWARFUnit.h - copied unchanged from r261991, head/contrib/llvm/lib/DebugInfo/DWARFUnit.h stable/9/contrib/llvm/lib/ExecutionEngine/RTDyldMemoryManager.cpp - copied unchanged from r261991, head/contrib/llvm/lib/ExecutionEngine/RTDyldMemoryManager.cpp stable/9/contrib/llvm/lib/IR/AsmWriter.h - copied unchanged from r261991, head/contrib/llvm/lib/IR/AsmWriter.h stable/9/contrib/llvm/lib/IR/LegacyPassManager.cpp - copied unchanged from r261991, head/contrib/llvm/lib/IR/LegacyPassManager.cpp stable/9/contrib/llvm/lib/LTO/ - copied from r261991, head/contrib/llvm/lib/LTO/ stable/9/contrib/llvm/lib/MC/MCAsmInfoELF.cpp - copied unchanged from r261991, head/contrib/llvm/lib/MC/MCAsmInfoELF.cpp stable/9/contrib/llvm/lib/MC/MCExternalSymbolizer.cpp - copied unchanged from r261991, head/contrib/llvm/lib/MC/MCExternalSymbolizer.cpp stable/9/contrib/llvm/lib/MC/MCFunction.cpp - copied unchanged from r261991, head/contrib/llvm/lib/MC/MCFunction.cpp stable/9/contrib/llvm/lib/MC/MCModuleYAML.cpp - copied unchanged from r261991, head/contrib/llvm/lib/MC/MCModuleYAML.cpp stable/9/contrib/llvm/lib/MC/MCObjectDisassembler.cpp - copied unchanged from r261991, head/contrib/llvm/lib/MC/MCObjectDisassembler.cpp stable/9/contrib/llvm/lib/MC/MCObjectSymbolizer.cpp - copied unchanged from r261991, head/contrib/llvm/lib/MC/MCObjectSymbolizer.cpp stable/9/contrib/llvm/lib/MC/MCRelocationInfo.cpp - copied unchanged from r261991, head/contrib/llvm/lib/MC/MCRelocationInfo.cpp stable/9/contrib/llvm/lib/MC/MCSymbolizer.cpp - copied unchanged from r261991, head/contrib/llvm/lib/MC/MCSymbolizer.cpp stable/9/contrib/llvm/lib/Object/COFFYAML.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Object/COFFYAML.cpp stable/9/contrib/llvm/lib/Object/ELF.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Object/ELF.cpp stable/9/contrib/llvm/lib/Object/ELFYAML.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Object/ELFYAML.cpp stable/9/contrib/llvm/lib/Object/MachOUniversal.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Object/MachOUniversal.cpp stable/9/contrib/llvm/lib/Object/YAML.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Object/YAML.cpp stable/9/contrib/llvm/lib/Support/MD5.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Support/MD5.cpp stable/9/contrib/llvm/lib/Support/StringRefMemoryObject.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Support/StringRefMemoryObject.cpp stable/9/contrib/llvm/lib/Support/Unicode.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Support/Unicode.cpp stable/9/contrib/llvm/lib/Target/AArch64/AArch64InstrNEON.td - copied unchanged from r261991, head/contrib/llvm/lib/Target/AArch64/AArch64InstrNEON.td stable/9/contrib/llvm/lib/Target/ARM/ARMFPUName.def - copied unchanged from r261991, head/contrib/llvm/lib/Target/ARM/ARMFPUName.def stable/9/contrib/llvm/lib/Target/ARM/ARMFPUName.h - copied unchanged from r261991, head/contrib/llvm/lib/Target/ARM/ARMFPUName.h stable/9/contrib/llvm/lib/Target/ARM/ARMFeatures.h - copied unchanged from r261991, head/contrib/llvm/lib/Target/ARM/ARMFeatures.h stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMachORelocationInfo.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMachORelocationInfo.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonCopyToCombine.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/Hexagon/HexagonCopyToCombine.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonMachineFunctionInfo.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/Hexagon/HexagonMachineFunctionInfo.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonSplitConst32AndConst64.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/Hexagon/HexagonSplitConst32AndConst64.cpp stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp stable/9/contrib/llvm/lib/Target/Mips/MSA.txt - copied unchanged from r261991, head/contrib/llvm/lib/Target/Mips/MSA.txt stable/9/contrib/llvm/lib/Target/Mips/Mips16HardFloat.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/Mips/Mips16HardFloat.cpp stable/9/contrib/llvm/lib/Target/Mips/Mips16HardFloat.h - copied unchanged from r261991, head/contrib/llvm/lib/Target/Mips/Mips16HardFloat.h stable/9/contrib/llvm/lib/Target/Mips/MipsMSAInstrFormats.td - copied unchanged from r261991, head/contrib/llvm/lib/Target/Mips/MipsMSAInstrFormats.td stable/9/contrib/llvm/lib/Target/Mips/MipsMSAInstrInfo.td - copied unchanged from r261991, head/contrib/llvm/lib/Target/Mips/MipsMSAInstrInfo.td stable/9/contrib/llvm/lib/Target/Mips/MipsTargetStreamer.h - copied unchanged from r261991, head/contrib/llvm/lib/Target/Mips/MipsTargetStreamer.h stable/9/contrib/llvm/lib/Target/NVPTX/InstPrinter/NVPTXInstPrinter.h - copied unchanged from r261991, head/contrib/llvm/lib/Target/NVPTX/InstPrinter/NVPTXInstPrinter.h stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXMCExpr.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/NVPTX/NVPTXMCExpr.cpp stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXMCExpr.h - copied unchanged from r261991, head/contrib/llvm/lib/Target/NVPTX/NVPTXMCExpr.h stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.cpp stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.h - copied unchanged from r261991, head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.h stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCFastISel.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/PowerPC/PPCFastISel.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCTargetObjectFile.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/PowerPC/PPCTargetObjectFile.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCTargetObjectFile.h - copied unchanged from r261991, head/contrib/llvm/lib/Target/PowerPC/PPCTargetObjectFile.h stable/9/contrib/llvm/lib/Target/PowerPC/PPCTargetStreamer.h - copied unchanged from r261991, head/contrib/llvm/lib/Target/PowerPC/PPCTargetStreamer.h stable/9/contrib/llvm/lib/Target/R600/AMDGPUISelDAGToDAG.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/R600/AMDGPUISelDAGToDAG.cpp stable/9/contrib/llvm/lib/Target/R600/AMDGPUTargetTransformInfo.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/R600/AMDGPUTargetTransformInfo.cpp stable/9/contrib/llvm/lib/Target/R600/MCTargetDesc/AMDGPUMCCodeEmitter.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/R600/MCTargetDesc/AMDGPUMCCodeEmitter.cpp stable/9/contrib/llvm/lib/Target/R600/R600ClauseMergePass.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/R600/R600ClauseMergePass.cpp stable/9/contrib/llvm/lib/Target/R600/R600InstrFormats.td - copied unchanged from r261991, head/contrib/llvm/lib/Target/R600/R600InstrFormats.td stable/9/contrib/llvm/lib/Target/R600/R600OptimizeVectorRegisters.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/R600/R600OptimizeVectorRegisters.cpp stable/9/contrib/llvm/lib/Target/R600/R600TextureIntrinsicsReplacer.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/R600/R600TextureIntrinsicsReplacer.cpp stable/9/contrib/llvm/lib/Target/R600/SIFixSGPRCopies.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/R600/SIFixSGPRCopies.cpp stable/9/contrib/llvm/lib/Target/R600/SITypeRewriter.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/R600/SITypeRewriter.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcCodeEmitter.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/Sparc/SparcCodeEmitter.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcJITInfo.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/Sparc/SparcJITInfo.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcJITInfo.h - copied unchanged from r261991, head/contrib/llvm/lib/Target/Sparc/SparcJITInfo.h stable/9/contrib/llvm/lib/Target/Sparc/SparcRelocations.h - copied unchanged from r261991, head/contrib/llvm/lib/Target/Sparc/SparcRelocations.h stable/9/contrib/llvm/lib/Target/SystemZ/Disassembler/ - copied from r261991, head/contrib/llvm/lib/Target/SystemZ/Disassembler/ stable/9/contrib/llvm/lib/Target/SystemZ/SystemZElimCompare.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/SystemZ/SystemZElimCompare.cpp stable/9/contrib/llvm/lib/Target/SystemZ/SystemZLongBranch.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/SystemZ/SystemZLongBranch.cpp stable/9/contrib/llvm/lib/Target/SystemZ/SystemZMachineFunctionInfo.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/SystemZ/SystemZMachineFunctionInfo.cpp stable/9/contrib/llvm/lib/Target/SystemZ/SystemZProcessors.td - copied unchanged from r261991, head/contrib/llvm/lib/Target/SystemZ/SystemZProcessors.td stable/9/contrib/llvm/lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp stable/9/contrib/llvm/lib/Target/SystemZ/SystemZSelectionDAGInfo.h - copied unchanged from r261991, head/contrib/llvm/lib/Target/SystemZ/SystemZSelectionDAGInfo.h stable/9/contrib/llvm/lib/Target/SystemZ/SystemZShortenInst.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/SystemZ/SystemZShortenInst.cpp stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MachORelocationInfo.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MachORelocationInfo.cpp stable/9/contrib/llvm/lib/Target/X86/X86CallingConv.h - copied unchanged from r261991, head/contrib/llvm/lib/Target/X86/X86CallingConv.h stable/9/contrib/llvm/lib/Target/X86/X86InstrAVX512.td - copied unchanged from r261991, head/contrib/llvm/lib/Target/X86/X86InstrAVX512.td stable/9/contrib/llvm/lib/Target/X86/X86ScheduleSLM.td - copied unchanged from r261991, head/contrib/llvm/lib/Target/X86/X86ScheduleSLM.td stable/9/contrib/llvm/lib/Target/XCore/XCoreTargetTransformInfo.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Target/XCore/XCoreTargetTransformInfo.cpp stable/9/contrib/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp stable/9/contrib/llvm/lib/Transforms/Instrumentation/DebugIR.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Transforms/Instrumentation/DebugIR.cpp stable/9/contrib/llvm/lib/Transforms/Instrumentation/DebugIR.h - copied unchanged from r261991, head/contrib/llvm/lib/Transforms/Instrumentation/DebugIR.h stable/9/contrib/llvm/lib/Transforms/ObjCARC/ARCRuntimeEntryPoints.h - copied unchanged from r261991, head/contrib/llvm/lib/Transforms/ObjCARC/ARCRuntimeEntryPoints.h stable/9/contrib/llvm/lib/Transforms/Scalar/FlattenCFGPass.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Transforms/Scalar/FlattenCFGPass.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/LoopRerollPass.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Transforms/Scalar/LoopRerollPass.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/SampleProfile.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Transforms/Scalar/SampleProfile.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/StructurizeCFG.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Transforms/Scalar/StructurizeCFG.cpp stable/9/contrib/llvm/lib/Transforms/Utils/FlattenCFG.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Transforms/Utils/FlattenCFG.cpp stable/9/contrib/llvm/lib/Transforms/Utils/GlobalStatus.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Transforms/Utils/GlobalStatus.cpp stable/9/contrib/llvm/lib/Transforms/Utils/SpecialCaseList.cpp - copied unchanged from r261991, head/contrib/llvm/lib/Transforms/Utils/SpecialCaseList.cpp stable/9/contrib/llvm/tools/clang/include/clang/AST/ASTFwd.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/include/clang/AST/ASTFwd.h stable/9/contrib/llvm/tools/clang/include/clang/AST/ASTLambda.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/include/clang/AST/ASTLambda.h stable/9/contrib/llvm/tools/clang/include/clang/AST/MangleNumberingContext.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/include/clang/AST/MangleNumberingContext.h stable/9/contrib/llvm/tools/clang/include/clang/AST/StmtOpenMP.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/include/clang/AST/StmtOpenMP.h stable/9/contrib/llvm/tools/clang/include/clang/ASTMatchers/Dynamic/ - copied from r261991, head/contrib/llvm/tools/clang/include/clang/ASTMatchers/Dynamic/ stable/9/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/Consumed.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/Consumed.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsXCore.def - copied unchanged from r261991, head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsXCore.def stable/9/contrib/llvm/tools/clang/include/clang/CodeGen/CGFunctionInfo.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/include/clang/CodeGen/CGFunctionInfo.h stable/9/contrib/llvm/tools/clang/include/clang/CodeGen/CodeGenABITypes.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/include/clang/CodeGen/CodeGenABITypes.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/CLCompatOptions.td - copied unchanged from r261991, head/contrib/llvm/tools/clang/include/clang/Driver/CLCompatOptions.td stable/9/contrib/llvm/tools/clang/include/clang/Driver/SanitizerArgs.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/include/clang/Driver/SanitizerArgs.h stable/9/contrib/llvm/tools/clang/include/clang/Index/ - copied from r261991, head/contrib/llvm/tools/clang/include/clang/Index/ stable/9/contrib/llvm/tools/clang/include/clang/Sema/SemaLambda.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/include/clang/Sema/SemaLambda.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/ObjCRetainCount.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/ObjCRetainCount.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/CommonBugCategories.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/CommonBugCategories.h stable/9/contrib/llvm/tools/clang/include/clang/Tooling/ReplacementsYaml.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/include/clang/Tooling/ReplacementsYaml.h stable/9/contrib/llvm/tools/clang/lib/AST/ASTTypeTraits.cpp - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/AST/ASTTypeTraits.cpp stable/9/contrib/llvm/tools/clang/lib/AST/MangleNumberingContext.cpp - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/AST/MangleNumberingContext.cpp stable/9/contrib/llvm/tools/clang/lib/ASTMatchers/Dynamic/ - copied from r261991, head/contrib/llvm/tools/clang/lib/ASTMatchers/Dynamic/ stable/9/contrib/llvm/tools/clang/lib/Analysis/Consumed.cpp - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/Analysis/Consumed.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenABITypes.cpp - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenABITypes.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/EHScopeStack.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/CodeGen/EHScopeStack.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/MicrosoftVBTables.cpp - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/CodeGen/MicrosoftVBTables.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/MicrosoftVBTables.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/CodeGen/MicrosoftVBTables.h stable/9/contrib/llvm/tools/clang/lib/Driver/SanitizerArgs.cpp - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/Driver/SanitizerArgs.cpp stable/9/contrib/llvm/tools/clang/lib/Format/ContinuationIndenter.cpp - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/Format/ContinuationIndenter.cpp stable/9/contrib/llvm/tools/clang/lib/Format/ContinuationIndenter.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/Format/ContinuationIndenter.h stable/9/contrib/llvm/tools/clang/lib/Format/Encoding.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/Format/Encoding.h stable/9/contrib/llvm/tools/clang/lib/Format/FormatToken.cpp - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/Format/FormatToken.cpp stable/9/contrib/llvm/tools/clang/lib/Format/FormatToken.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/Format/FormatToken.h stable/9/contrib/llvm/tools/clang/lib/Headers/Intrin.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/Headers/Intrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/shaintrin.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/Headers/shaintrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/tbmintrin.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/Headers/tbmintrin.h stable/9/contrib/llvm/tools/clang/lib/Index/ - copied from r261991, head/contrib/llvm/tools/clang/lib/Index/ stable/9/contrib/llvm/tools/clang/lib/Sema/TypeLocBuilder.cpp - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/Sema/TypeLocBuilder.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/IdenticalExprChecker.cpp - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/IdenticalExprChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CommonBugCategories.cpp - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CommonBugCategories.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/PrettyStackTraceLocationContext.h - copied unchanged from r261991, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/PrettyStackTraceLocationContext.h stable/9/contrib/llvm/tools/lli/ChildTarget/ - copied from r261991, head/contrib/llvm/tools/lli/ChildTarget/ stable/9/contrib/llvm/tools/lli/RemoteMemoryManager.cpp - copied unchanged from r261991, head/contrib/llvm/tools/lli/RemoteMemoryManager.cpp stable/9/contrib/llvm/tools/lli/RemoteMemoryManager.h - copied unchanged from r261991, head/contrib/llvm/tools/lli/RemoteMemoryManager.h stable/9/contrib/llvm/tools/lli/RemoteTargetExternal.cpp - copied unchanged from r261991, head/contrib/llvm/tools/lli/RemoteTargetExternal.cpp stable/9/contrib/llvm/tools/lli/RemoteTargetExternal.h - copied unchanged from r261991, head/contrib/llvm/tools/lli/RemoteTargetExternal.h stable/9/contrib/llvm/tools/lli/RemoteTargetMessage.h - copied unchanged from r261991, head/contrib/llvm/tools/lli/RemoteTargetMessage.h stable/9/contrib/llvm/tools/lli/Unix/ - copied from r261991, head/contrib/llvm/tools/lli/Unix/ stable/9/contrib/llvm/tools/lli/Windows/ - copied from r261991, head/contrib/llvm/tools/lli/Windows/ stable/9/lib/clang/include/PPCGenFastISel.inc - copied unchanged from r261991, head/lib/clang/include/PPCGenFastISel.inc stable/9/lib/clang/include/clang/Parse/AttrIdentifierArg.inc - copied unchanged from r261991, head/lib/clang/include/clang/Parse/AttrIdentifierArg.inc stable/9/lib/clang/include/clang/Parse/AttrTypeArg.inc - copied unchanged from r261991, head/lib/clang/include/clang/Parse/AttrTypeArg.inc stable/9/lib/clang/include/clang/Sema/AttrParsedAttrImpl.inc - copied unchanged from r261991, head/lib/clang/include/clang/Sema/AttrParsedAttrImpl.inc stable/9/lib/clang/libllvmoption/ - copied from r261991, head/lib/clang/libllvmoption/ Deleted: stable/9/contrib/llvm/include/llvm/ADT/NullablePtr.h stable/9/contrib/llvm/include/llvm/Analysis/PathNumbering.h stable/9/contrib/llvm/include/llvm/Analysis/PathProfileInfo.h stable/9/contrib/llvm/include/llvm/Analysis/ProfileDataLoader.h stable/9/contrib/llvm/include/llvm/Analysis/ProfileDataTypes.h stable/9/contrib/llvm/include/llvm/Analysis/ProfileInfo.h stable/9/contrib/llvm/include/llvm/Analysis/ProfileInfoLoader.h stable/9/contrib/llvm/include/llvm/Analysis/ProfileInfoTypes.h stable/9/contrib/llvm/include/llvm/Bitcode/Archive.h stable/9/contrib/llvm/include/llvm/Object/MachOFormat.h stable/9/contrib/llvm/include/llvm/PassManagers.h stable/9/contrib/llvm/include/llvm/Support/IntegersSubset.h stable/9/contrib/llvm/include/llvm/Support/IntegersSubsetMapping.h stable/9/contrib/llvm/include/llvm/Support/PathV1.h stable/9/contrib/llvm/include/llvm/Support/PathV2.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/BlackList.h stable/9/contrib/llvm/lib/Analysis/PathNumbering.cpp stable/9/contrib/llvm/lib/Analysis/PathProfileInfo.cpp stable/9/contrib/llvm/lib/Analysis/PathProfileVerifier.cpp stable/9/contrib/llvm/lib/Analysis/ProfileDataLoader.cpp stable/9/contrib/llvm/lib/Analysis/ProfileDataLoaderPass.cpp stable/9/contrib/llvm/lib/Analysis/ProfileEstimatorPass.cpp stable/9/contrib/llvm/lib/Analysis/ProfileInfo.cpp stable/9/contrib/llvm/lib/Analysis/ProfileInfoLoader.cpp stable/9/contrib/llvm/lib/Analysis/ProfileInfoLoaderPass.cpp stable/9/contrib/llvm/lib/Analysis/ProfileVerifierPass.cpp stable/9/contrib/llvm/lib/Archive/ stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SDNodeOrdering.h stable/9/contrib/llvm/lib/CodeGen/ShrinkWrapping.cpp stable/9/contrib/llvm/lib/CodeGen/StrongPHIElimination.cpp stable/9/contrib/llvm/lib/DebugInfo/DWARFAttribute.h stable/9/contrib/llvm/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp stable/9/contrib/llvm/lib/ExecutionEngine/JIT/JITDwarfEmitter.h stable/9/contrib/llvm/lib/Support/LocaleGeneric.inc stable/9/contrib/llvm/lib/Support/LocaleWindows.inc stable/9/contrib/llvm/lib/Support/LocaleXlocale.inc stable/9/contrib/llvm/lib/Support/PathV2.cpp stable/9/contrib/llvm/lib/Support/Unix/PathV2.inc stable/9/contrib/llvm/lib/Support/Windows/PathV2.inc stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.h stable/9/contrib/llvm/lib/Target/MBlaze/ stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsDirectObjLower.cpp stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsDirectObjLower.h stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.cpp stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.h stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXNumRegisters.h stable/9/contrib/llvm/lib/Target/R600/AMDGPUIndirectAddressing.cpp stable/9/contrib/llvm/lib/Target/R600/AMDGPUStructurizeCFG.cpp stable/9/contrib/llvm/lib/Target/R600/AMDIL.h stable/9/contrib/llvm/lib/Target/R600/AMDIL7XXDevice.cpp stable/9/contrib/llvm/lib/Target/R600/AMDIL7XXDevice.h stable/9/contrib/llvm/lib/Target/R600/AMDILDevice.cpp stable/9/contrib/llvm/lib/Target/R600/AMDILDevice.h stable/9/contrib/llvm/lib/Target/R600/AMDILDeviceInfo.cpp stable/9/contrib/llvm/lib/Target/R600/AMDILDeviceInfo.h stable/9/contrib/llvm/lib/Target/R600/AMDILDevices.h stable/9/contrib/llvm/lib/Target/R600/AMDILEvergreenDevice.cpp stable/9/contrib/llvm/lib/Target/R600/AMDILEvergreenDevice.h stable/9/contrib/llvm/lib/Target/R600/AMDILISelDAGToDAG.cpp stable/9/contrib/llvm/lib/Target/R600/AMDILNIDevice.cpp stable/9/contrib/llvm/lib/Target/R600/AMDILNIDevice.h stable/9/contrib/llvm/lib/Target/R600/AMDILSIDevice.cpp stable/9/contrib/llvm/lib/Target/R600/AMDILSIDevice.h stable/9/contrib/llvm/lib/Target/Sparc/FPMover.cpp stable/9/contrib/llvm/lib/Transforms/Instrumentation/BlackList.cpp stable/9/contrib/llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp stable/9/contrib/llvm/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp stable/9/contrib/llvm/lib/Transforms/Instrumentation/PathProfiling.cpp stable/9/contrib/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp stable/9/contrib/llvm/lib/Transforms/Instrumentation/ProfilingUtils.h stable/9/contrib/llvm/lib/Transforms/Scalar/BasicBlockPlacement.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp stable/9/contrib/llvm/lib/Transforms/Vectorize/VecUtils.cpp stable/9/contrib/llvm/lib/Transforms/Vectorize/VecUtils.h stable/9/contrib/llvm/tools/clang/include/clang/AST/LambdaMangleContext.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/Support/BlkExprDeclBitVector.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/Visitors/ stable/9/contrib/llvm/tools/clang/include/clang/Driver/Arg.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/ArgList.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/OptParser.td stable/9/contrib/llvm/tools/clang/include/clang/Driver/OptSpecifier.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/OptTable.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/Option.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/CommonBugCategories.h stable/9/contrib/llvm/tools/clang/lib/AST/DumpXML.cpp stable/9/contrib/llvm/tools/clang/lib/AST/LambdaMangleContext.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/Arg.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/ArgList.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/OptTable.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/Option.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/SanitizerArgs.h stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CommonBugCategories.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/TextPathDiagnostics.cpp stable/9/contrib/llvm/tools/clang/utils/TableGen/OptParserEmitter.cpp stable/9/contrib/llvm/tools/lli/RecordingMemoryManager.cpp stable/9/contrib/llvm/tools/lli/RecordingMemoryManager.h stable/9/contrib/llvm/tools/llvm-objdump/MCFunction.cpp stable/9/contrib/llvm/tools/llvm-objdump/MCFunction.h stable/9/contrib/llvm/tools/llvm-prof/ stable/9/contrib/llvm/tools/llvm-ranlib/ stable/9/contrib/llvm/tools/llvm-stub/ stable/9/contrib/llvm/utils/TableGen/StringToOffsetTable.h stable/9/lib/clang/include/clang/Parse/AttrExprArgs.inc stable/9/lib/clang/libllvmarchive/ stable/9/usr.bin/clang/llvm-prof/ stable/9/usr.bin/clang/llvm-ranlib/ Modified: stable/9/ObsoleteFiles.inc (contents, props changed) stable/9/UPDATING (contents, props changed) stable/9/contrib/gcc/libgcc2.c stable/9/contrib/gcc/libgcc2.h stable/9/contrib/llvm/LICENSE.TXT stable/9/contrib/llvm/include/llvm-c/BitReader.h stable/9/contrib/llvm/include/llvm-c/BitWriter.h stable/9/contrib/llvm/include/llvm-c/Core.h stable/9/contrib/llvm/include/llvm-c/Disassembler.h stable/9/contrib/llvm/include/llvm-c/ExecutionEngine.h stable/9/contrib/llvm/include/llvm-c/LinkTimeOptimizer.h stable/9/contrib/llvm/include/llvm-c/Object.h stable/9/contrib/llvm/include/llvm-c/Target.h stable/9/contrib/llvm/include/llvm-c/TargetMachine.h stable/9/contrib/llvm/include/llvm-c/Transforms/Scalar.h stable/9/contrib/llvm/include/llvm-c/lto.h stable/9/contrib/llvm/include/llvm/ADT/APFloat.h stable/9/contrib/llvm/include/llvm/ADT/APInt.h stable/9/contrib/llvm/include/llvm/ADT/APSInt.h stable/9/contrib/llvm/include/llvm/ADT/ArrayRef.h stable/9/contrib/llvm/include/llvm/ADT/BitVector.h stable/9/contrib/llvm/include/llvm/ADT/DenseMap.h stable/9/contrib/llvm/include/llvm/ADT/FoldingSet.h stable/9/contrib/llvm/include/llvm/ADT/ImmutableMap.h stable/9/contrib/llvm/include/llvm/ADT/ImmutableSet.h stable/9/contrib/llvm/include/llvm/ADT/IntervalMap.h stable/9/contrib/llvm/include/llvm/ADT/OwningPtr.h stable/9/contrib/llvm/include/llvm/ADT/PointerIntPair.h stable/9/contrib/llvm/include/llvm/ADT/PointerUnion.h stable/9/contrib/llvm/include/llvm/ADT/STLExtras.h stable/9/contrib/llvm/include/llvm/ADT/SetVector.h stable/9/contrib/llvm/include/llvm/ADT/SmallBitVector.h stable/9/contrib/llvm/include/llvm/ADT/SmallPtrSet.h stable/9/contrib/llvm/include/llvm/ADT/SmallVector.h stable/9/contrib/llvm/include/llvm/ADT/SparseBitVector.h stable/9/contrib/llvm/include/llvm/ADT/StringExtras.h stable/9/contrib/llvm/include/llvm/ADT/StringMap.h stable/9/contrib/llvm/include/llvm/ADT/StringRef.h stable/9/contrib/llvm/include/llvm/ADT/Triple.h stable/9/contrib/llvm/include/llvm/ADT/ilist.h stable/9/contrib/llvm/include/llvm/Analysis/AliasAnalysis.h stable/9/contrib/llvm/include/llvm/Analysis/BlockFrequencyImpl.h stable/9/contrib/llvm/include/llvm/Analysis/BlockFrequencyInfo.h stable/9/contrib/llvm/include/llvm/Analysis/BranchProbabilityInfo.h stable/9/contrib/llvm/include/llvm/Analysis/CFGPrinter.h stable/9/contrib/llvm/include/llvm/Analysis/CallGraph.h stable/9/contrib/llvm/include/llvm/Analysis/ConstantFolding.h stable/9/contrib/llvm/include/llvm/Analysis/DependenceAnalysis.h stable/9/contrib/llvm/include/llvm/Analysis/Dominators.h stable/9/contrib/llvm/include/llvm/Analysis/InlineCost.h stable/9/contrib/llvm/include/llvm/Analysis/InstructionSimplify.h stable/9/contrib/llvm/include/llvm/Analysis/LoopInfo.h stable/9/contrib/llvm/include/llvm/Analysis/LoopInfoImpl.h stable/9/contrib/llvm/include/llvm/Analysis/LoopPass.h stable/9/contrib/llvm/include/llvm/Analysis/MemoryBuiltins.h stable/9/contrib/llvm/include/llvm/Analysis/Passes.h stable/9/contrib/llvm/include/llvm/Analysis/PostDominators.h stable/9/contrib/llvm/include/llvm/Analysis/RegionPass.h stable/9/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h stable/9/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h stable/9/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h stable/9/contrib/llvm/include/llvm/Analysis/TargetTransformInfo.h stable/9/contrib/llvm/include/llvm/Analysis/ValueTracking.h stable/9/contrib/llvm/include/llvm/AutoUpgrade.h stable/9/contrib/llvm/include/llvm/Bitcode/BitstreamReader.h stable/9/contrib/llvm/include/llvm/Bitcode/BitstreamWriter.h stable/9/contrib/llvm/include/llvm/Bitcode/LLVMBitCodes.h stable/9/contrib/llvm/include/llvm/CodeGen/Analysis.h stable/9/contrib/llvm/include/llvm/CodeGen/AsmPrinter.h stable/9/contrib/llvm/include/llvm/CodeGen/CalcSpillWeights.h stable/9/contrib/llvm/include/llvm/CodeGen/CallingConvLower.h stable/9/contrib/llvm/include/llvm/CodeGen/CommandFlags.h stable/9/contrib/llvm/include/llvm/CodeGen/FastISel.h stable/9/contrib/llvm/include/llvm/CodeGen/FunctionLoweringInfo.h stable/9/contrib/llvm/include/llvm/CodeGen/ISDOpcodes.h stable/9/contrib/llvm/include/llvm/CodeGen/LexicalScopes.h stable/9/contrib/llvm/include/llvm/CodeGen/LiveInterval.h stable/9/contrib/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h stable/9/contrib/llvm/include/llvm/CodeGen/LiveIntervalUnion.h stable/9/contrib/llvm/include/llvm/CodeGen/LiveRangeEdit.h stable/9/contrib/llvm/include/llvm/CodeGen/LiveVariables.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineBasicBlock.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineBranchProbabilityInfo.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineConstantPool.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineFrameInfo.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineInstr.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineInstrBuilder.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineModuleInfo.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineOperand.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineRegisterInfo.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineRelocation.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineScheduler.h stable/9/contrib/llvm/include/llvm/CodeGen/PBQP/Graph.h stable/9/contrib/llvm/include/llvm/CodeGen/PBQP/HeuristicBase.h stable/9/contrib/llvm/include/llvm/CodeGen/PBQP/HeuristicSolver.h stable/9/contrib/llvm/include/llvm/CodeGen/PBQP/Heuristics/Briggs.h stable/9/contrib/llvm/include/llvm/CodeGen/PBQP/Solution.h stable/9/contrib/llvm/include/llvm/CodeGen/Passes.h stable/9/contrib/llvm/include/llvm/CodeGen/PseudoSourceValue.h stable/9/contrib/llvm/include/llvm/CodeGen/RegAllocPBQP.h stable/9/contrib/llvm/include/llvm/CodeGen/RegisterClassInfo.h stable/9/contrib/llvm/include/llvm/CodeGen/RegisterPressure.h stable/9/contrib/llvm/include/llvm/CodeGen/RegisterScavenging.h stable/9/contrib/llvm/include/llvm/CodeGen/RuntimeLibcalls.h stable/9/contrib/llvm/include/llvm/CodeGen/ScheduleDAG.h stable/9/contrib/llvm/include/llvm/CodeGen/ScheduleDAGInstrs.h stable/9/contrib/llvm/include/llvm/CodeGen/SelectionDAG.h stable/9/contrib/llvm/include/llvm/CodeGen/SelectionDAGISel.h stable/9/contrib/llvm/include/llvm/CodeGen/SelectionDAGNodes.h stable/9/contrib/llvm/include/llvm/CodeGen/SlotIndexes.h stable/9/contrib/llvm/include/llvm/CodeGen/TargetSchedule.h stable/9/contrib/llvm/include/llvm/CodeGen/ValueTypes.h stable/9/contrib/llvm/include/llvm/CodeGen/ValueTypes.td stable/9/contrib/llvm/include/llvm/DIBuilder.h stable/9/contrib/llvm/include/llvm/DebugInfo.h stable/9/contrib/llvm/include/llvm/DebugInfo/DIContext.h stable/9/contrib/llvm/include/llvm/DebugInfo/DWARFFormValue.h stable/9/contrib/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h stable/9/contrib/llvm/include/llvm/ExecutionEngine/JITMemoryManager.h stable/9/contrib/llvm/include/llvm/ExecutionEngine/ObjectBuffer.h stable/9/contrib/llvm/include/llvm/ExecutionEngine/ObjectCache.h stable/9/contrib/llvm/include/llvm/ExecutionEngine/ObjectImage.h stable/9/contrib/llvm/include/llvm/ExecutionEngine/RuntimeDyld.h stable/9/contrib/llvm/include/llvm/ExecutionEngine/SectionMemoryManager.h stable/9/contrib/llvm/include/llvm/GVMaterializer.h stable/9/contrib/llvm/include/llvm/IR/Argument.h stable/9/contrib/llvm/include/llvm/IR/Attributes.h stable/9/contrib/llvm/include/llvm/IR/CallingConv.h stable/9/contrib/llvm/include/llvm/IR/Constants.h stable/9/contrib/llvm/include/llvm/IR/DataLayout.h stable/9/contrib/llvm/include/llvm/IR/Function.h stable/9/contrib/llvm/include/llvm/IR/GlobalAlias.h stable/9/contrib/llvm/include/llvm/IR/GlobalValue.h stable/9/contrib/llvm/include/llvm/IR/GlobalVariable.h stable/9/contrib/llvm/include/llvm/IR/IRBuilder.h stable/9/contrib/llvm/include/llvm/IR/InlineAsm.h stable/9/contrib/llvm/include/llvm/IR/InstrTypes.h stable/9/contrib/llvm/include/llvm/IR/Instruction.def stable/9/contrib/llvm/include/llvm/IR/Instructions.h stable/9/contrib/llvm/include/llvm/IR/Intrinsics.h stable/9/contrib/llvm/include/llvm/IR/Intrinsics.td stable/9/contrib/llvm/include/llvm/IR/IntrinsicsARM.td stable/9/contrib/llvm/include/llvm/IR/IntrinsicsMips.td stable/9/contrib/llvm/include/llvm/IR/IntrinsicsNVVM.td stable/9/contrib/llvm/include/llvm/IR/IntrinsicsPowerPC.td stable/9/contrib/llvm/include/llvm/IR/IntrinsicsX86.td stable/9/contrib/llvm/include/llvm/IR/IntrinsicsXCore.td stable/9/contrib/llvm/include/llvm/IR/LLVMContext.h stable/9/contrib/llvm/include/llvm/IR/Metadata.h stable/9/contrib/llvm/include/llvm/IR/Module.h stable/9/contrib/llvm/include/llvm/IR/Operator.h stable/9/contrib/llvm/include/llvm/IR/Type.h stable/9/contrib/llvm/include/llvm/IR/TypeBuilder.h stable/9/contrib/llvm/include/llvm/IR/Use.h stable/9/contrib/llvm/include/llvm/IR/Value.h stable/9/contrib/llvm/include/llvm/InitializePasses.h stable/9/contrib/llvm/include/llvm/InstVisitor.h stable/9/contrib/llvm/include/llvm/LinkAllPasses.h stable/9/contrib/llvm/include/llvm/Linker.h stable/9/contrib/llvm/include/llvm/MC/MCAsmBackend.h stable/9/contrib/llvm/include/llvm/MC/MCAsmInfo.h stable/9/contrib/llvm/include/llvm/MC/MCAssembler.h stable/9/contrib/llvm/include/llvm/MC/MCAtom.h stable/9/contrib/llvm/include/llvm/MC/MCCodeGenInfo.h stable/9/contrib/llvm/include/llvm/MC/MCContext.h stable/9/contrib/llvm/include/llvm/MC/MCDisassembler.h stable/9/contrib/llvm/include/llvm/MC/MCDwarf.h stable/9/contrib/llvm/include/llvm/MC/MCELFObjectWriter.h stable/9/contrib/llvm/include/llvm/MC/MCELFStreamer.h stable/9/contrib/llvm/include/llvm/MC/MCELFSymbolFlags.h stable/9/contrib/llvm/include/llvm/MC/MCExpr.h stable/9/contrib/llvm/include/llvm/MC/MCInstPrinter.h stable/9/contrib/llvm/include/llvm/MC/MCInstrAnalysis.h stable/9/contrib/llvm/include/llvm/MC/MCInstrDesc.h stable/9/contrib/llvm/include/llvm/MC/MCInstrItineraries.h stable/9/contrib/llvm/include/llvm/MC/MCMachOSymbolFlags.h stable/9/contrib/llvm/include/llvm/MC/MCMachObjectWriter.h stable/9/contrib/llvm/include/llvm/MC/MCModule.h stable/9/contrib/llvm/include/llvm/MC/MCObjectFileInfo.h stable/9/contrib/llvm/include/llvm/MC/MCObjectStreamer.h stable/9/contrib/llvm/include/llvm/MC/MCParser/AsmLexer.h stable/9/contrib/llvm/include/llvm/MC/MCParser/MCAsmParser.h stable/9/contrib/llvm/include/llvm/MC/MCRegisterInfo.h stable/9/contrib/llvm/include/llvm/MC/MCSchedule.h stable/9/contrib/llvm/include/llvm/MC/MCSectionCOFF.h stable/9/contrib/llvm/include/llvm/MC/MCSectionMachO.h stable/9/contrib/llvm/include/llvm/MC/MCStreamer.h stable/9/contrib/llvm/include/llvm/MC/MCSubtargetInfo.h stable/9/contrib/llvm/include/llvm/MC/MCTargetAsmParser.h stable/9/contrib/llvm/include/llvm/MC/MCWinCOFFObjectWriter.h stable/9/contrib/llvm/include/llvm/MC/MachineLocation.h stable/9/contrib/llvm/include/llvm/MC/SubtargetFeature.h stable/9/contrib/llvm/include/llvm/Object/Archive.h stable/9/contrib/llvm/include/llvm/Object/Binary.h stable/9/contrib/llvm/include/llvm/Object/COFF.h stable/9/contrib/llvm/include/llvm/Object/ELF.h stable/9/contrib/llvm/include/llvm/Object/Error.h stable/9/contrib/llvm/include/llvm/Object/MachO.h stable/9/contrib/llvm/include/llvm/Object/ObjectFile.h stable/9/contrib/llvm/include/llvm/Object/RelocVisitor.h stable/9/contrib/llvm/include/llvm/Option/ArgList.h stable/9/contrib/llvm/include/llvm/Option/OptParser.td stable/9/contrib/llvm/include/llvm/Option/OptTable.h stable/9/contrib/llvm/include/llvm/Option/Option.h stable/9/contrib/llvm/include/llvm/PassManager.h stable/9/contrib/llvm/include/llvm/Support/Allocator.h stable/9/contrib/llvm/include/llvm/Support/BlockFrequency.h stable/9/contrib/llvm/include/llvm/Support/CFG.h stable/9/contrib/llvm/include/llvm/Support/COFF.h stable/9/contrib/llvm/include/llvm/Support/CallSite.h stable/9/contrib/llvm/include/llvm/Support/Casting.h stable/9/contrib/llvm/include/llvm/Support/CommandLine.h stable/9/contrib/llvm/include/llvm/Support/Compiler.h stable/9/contrib/llvm/include/llvm/Support/Compression.h stable/9/contrib/llvm/include/llvm/Support/ConstantRange.h stable/9/contrib/llvm/include/llvm/Support/ConvertUTF.h stable/9/contrib/llvm/include/llvm/Support/DataTypes.h.in stable/9/contrib/llvm/include/llvm/Support/Debug.h stable/9/contrib/llvm/include/llvm/Support/DebugLoc.h stable/9/contrib/llvm/include/llvm/Support/Dwarf.h stable/9/contrib/llvm/include/llvm/Support/ELF.h stable/9/contrib/llvm/include/llvm/Support/ErrorOr.h stable/9/contrib/llvm/include/llvm/Support/FileSystem.h stable/9/contrib/llvm/include/llvm/Support/FileUtilities.h stable/9/contrib/llvm/include/llvm/Support/FormattedStream.h stable/9/contrib/llvm/include/llvm/Support/GCOV.h stable/9/contrib/llvm/include/llvm/Support/GetElementPtrTypeIterator.h stable/9/contrib/llvm/include/llvm/Support/GraphWriter.h stable/9/contrib/llvm/include/llvm/Support/Host.h stable/9/contrib/llvm/include/llvm/Support/LEB128.h stable/9/contrib/llvm/include/llvm/Support/MachO.h stable/9/contrib/llvm/include/llvm/Support/ManagedStatic.h stable/9/contrib/llvm/include/llvm/Support/MathExtras.h stable/9/contrib/llvm/include/llvm/Support/MemoryBuffer.h stable/9/contrib/llvm/include/llvm/Support/MemoryObject.h stable/9/contrib/llvm/include/llvm/Support/PassNameParser.h stable/9/contrib/llvm/include/llvm/Support/Path.h stable/9/contrib/llvm/include/llvm/Support/PatternMatch.h stable/9/contrib/llvm/include/llvm/Support/PrettyStackTrace.h stable/9/contrib/llvm/include/llvm/Support/Process.h stable/9/contrib/llvm/include/llvm/Support/Program.h stable/9/contrib/llvm/include/llvm/Support/RecyclingAllocator.h stable/9/contrib/llvm/include/llvm/Support/Regex.h stable/9/contrib/llvm/include/llvm/Support/Registry.h stable/9/contrib/llvm/include/llvm/Support/Signals.h stable/9/contrib/llvm/include/llvm/Support/Solaris.h stable/9/contrib/llvm/include/llvm/Support/SourceMgr.h stable/9/contrib/llvm/include/llvm/Support/StreamableMemoryObject.h stable/9/contrib/llvm/include/llvm/Support/SystemUtils.h stable/9/contrib/llvm/include/llvm/Support/TargetRegistry.h stable/9/contrib/llvm/include/llvm/Support/TimeValue.h stable/9/contrib/llvm/include/llvm/Support/ToolOutputFile.h stable/9/contrib/llvm/include/llvm/Support/Valgrind.h stable/9/contrib/llvm/include/llvm/Support/ValueHandle.h stable/9/contrib/llvm/include/llvm/Support/YAMLParser.h stable/9/contrib/llvm/include/llvm/Support/YAMLTraits.h stable/9/contrib/llvm/include/llvm/Support/raw_ostream.h stable/9/contrib/llvm/include/llvm/TableGen/Record.h stable/9/contrib/llvm/include/llvm/TableGen/TableGenBackend.h stable/9/contrib/llvm/include/llvm/Target/CostTable.h stable/9/contrib/llvm/include/llvm/Target/Mangler.h stable/9/contrib/llvm/include/llvm/Target/Target.td stable/9/contrib/llvm/include/llvm/Target/TargetCallingConv.h stable/9/contrib/llvm/include/llvm/Target/TargetCallingConv.td stable/9/contrib/llvm/include/llvm/Target/TargetFrameLowering.h stable/9/contrib/llvm/include/llvm/Target/TargetInstrInfo.h stable/9/contrib/llvm/include/llvm/Target/TargetLibraryInfo.h stable/9/contrib/llvm/include/llvm/Target/TargetLowering.h stable/9/contrib/llvm/include/llvm/Target/TargetLoweringObjectFile.h stable/9/contrib/llvm/include/llvm/Target/TargetMachine.h stable/9/contrib/llvm/include/llvm/Target/TargetOpcodes.h stable/9/contrib/llvm/include/llvm/Target/TargetOptions.h stable/9/contrib/llvm/include/llvm/Target/TargetRegisterInfo.h stable/9/contrib/llvm/include/llvm/Target/TargetSchedule.td stable/9/contrib/llvm/include/llvm/Target/TargetSelectionDAG.td stable/9/contrib/llvm/include/llvm/Target/TargetSelectionDAGInfo.h stable/9/contrib/llvm/include/llvm/Target/TargetSubtargetInfo.h stable/9/contrib/llvm/include/llvm/Transforms/IPO.h stable/9/contrib/llvm/include/llvm/Transforms/IPO/PassManagerBuilder.h stable/9/contrib/llvm/include/llvm/Transforms/Instrumentation.h stable/9/contrib/llvm/include/llvm/Transforms/Scalar.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/Cloning.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/Local.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/ModuleUtils.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/PromoteMemToReg.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/SSAUpdater.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/ValueMapper.h stable/9/contrib/llvm/include/llvm/Transforms/Vectorize.h stable/9/contrib/llvm/lib/Analysis/AliasAnalysis.cpp stable/9/contrib/llvm/lib/Analysis/AliasSetTracker.cpp stable/9/contrib/llvm/lib/Analysis/Analysis.cpp stable/9/contrib/llvm/lib/Analysis/BasicAliasAnalysis.cpp stable/9/contrib/llvm/lib/Analysis/BlockFrequencyInfo.cpp stable/9/contrib/llvm/lib/Analysis/BranchProbabilityInfo.cpp stable/9/contrib/llvm/lib/Analysis/CaptureTracking.cpp stable/9/contrib/llvm/lib/Analysis/ConstantFolding.cpp stable/9/contrib/llvm/lib/Analysis/CostModel.cpp stable/9/contrib/llvm/lib/Analysis/DependenceAnalysis.cpp stable/9/contrib/llvm/lib/Analysis/IPA/CallGraph.cpp stable/9/contrib/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp stable/9/contrib/llvm/lib/Analysis/IPA/GlobalsModRef.cpp stable/9/contrib/llvm/lib/Analysis/IPA/IPA.cpp stable/9/contrib/llvm/lib/Analysis/IPA/InlineCost.cpp stable/9/contrib/llvm/lib/Analysis/InstructionSimplify.cpp stable/9/contrib/llvm/lib/Analysis/LazyValueInfo.cpp stable/9/contrib/llvm/lib/Analysis/Lint.cpp stable/9/contrib/llvm/lib/Analysis/LoopInfo.cpp stable/9/contrib/llvm/lib/Analysis/LoopPass.cpp stable/9/contrib/llvm/lib/Analysis/MemoryBuiltins.cpp stable/9/contrib/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp stable/9/contrib/llvm/lib/Analysis/RegionInfo.cpp stable/9/contrib/llvm/lib/Analysis/ScalarEvolution.cpp stable/9/contrib/llvm/lib/Analysis/ScalarEvolutionExpander.cpp stable/9/contrib/llvm/lib/Analysis/ScalarEvolutionNormalization.cpp stable/9/contrib/llvm/lib/Analysis/TargetTransformInfo.cpp stable/9/contrib/llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp stable/9/contrib/llvm/lib/Analysis/ValueTracking.cpp stable/9/contrib/llvm/lib/AsmParser/LLLexer.cpp stable/9/contrib/llvm/lib/AsmParser/LLParser.cpp stable/9/contrib/llvm/lib/AsmParser/LLParser.h stable/9/contrib/llvm/lib/AsmParser/LLToken.h stable/9/contrib/llvm/lib/AsmParser/Parser.cpp stable/9/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.cpp stable/9/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.h stable/9/contrib/llvm/lib/Bitcode/Reader/BitstreamReader.cpp stable/9/contrib/llvm/lib/Bitcode/Writer/BitWriter.cpp stable/9/contrib/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp stable/9/contrib/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp stable/9/contrib/llvm/lib/Bitcode/Writer/ValueEnumerator.h stable/9/contrib/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp stable/9/contrib/llvm/lib/CodeGen/Analysis.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/ARMException.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DIE.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DIE.h stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.h stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfException.h stable/9/contrib/llvm/lib/CodeGen/BasicTargetTransformInfo.cpp stable/9/contrib/llvm/lib/CodeGen/BranchFolding.cpp stable/9/contrib/llvm/lib/CodeGen/BranchFolding.h stable/9/contrib/llvm/lib/CodeGen/CalcSpillWeights.cpp stable/9/contrib/llvm/lib/CodeGen/CallingConvLower.cpp stable/9/contrib/llvm/lib/CodeGen/CodeGen.cpp stable/9/contrib/llvm/lib/CodeGen/CriticalAntiDepBreaker.cpp stable/9/contrib/llvm/lib/CodeGen/CriticalAntiDepBreaker.h stable/9/contrib/llvm/lib/CodeGen/DFAPacketizer.cpp stable/9/contrib/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp stable/9/contrib/llvm/lib/CodeGen/DwarfEHPrepare.cpp stable/9/contrib/llvm/lib/CodeGen/ExecutionDepsFix.cpp stable/9/contrib/llvm/lib/CodeGen/ExpandPostRAPseudos.cpp stable/9/contrib/llvm/lib/CodeGen/IfConversion.cpp stable/9/contrib/llvm/lib/CodeGen/InlineSpiller.cpp stable/9/contrib/llvm/lib/CodeGen/InterferenceCache.cpp stable/9/contrib/llvm/lib/CodeGen/InterferenceCache.h stable/9/contrib/llvm/lib/CodeGen/IntrinsicLowering.cpp stable/9/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp stable/9/contrib/llvm/lib/CodeGen/LexicalScopes.cpp stable/9/contrib/llvm/lib/CodeGen/LiveDebugVariables.cpp stable/9/contrib/llvm/lib/CodeGen/LiveDebugVariables.h stable/9/contrib/llvm/lib/CodeGen/LiveInterval.cpp stable/9/contrib/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp stable/9/contrib/llvm/lib/CodeGen/LiveRangeCalc.cpp stable/9/contrib/llvm/lib/CodeGen/LiveRangeCalc.h stable/9/contrib/llvm/lib/CodeGen/LiveRangeEdit.cpp stable/9/contrib/llvm/lib/CodeGen/LiveRegMatrix.cpp stable/9/contrib/llvm/lib/CodeGen/LiveVariables.cpp stable/9/contrib/llvm/lib/CodeGen/MachineBasicBlock.cpp stable/9/contrib/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp stable/9/contrib/llvm/lib/CodeGen/MachineBlockPlacement.cpp stable/9/contrib/llvm/lib/CodeGen/MachineCSE.cpp stable/9/contrib/llvm/lib/CodeGen/MachineCopyPropagation.cpp stable/9/contrib/llvm/lib/CodeGen/MachineFunction.cpp stable/9/contrib/llvm/lib/CodeGen/MachineInstr.cpp stable/9/contrib/llvm/lib/CodeGen/MachineLICM.cpp stable/9/contrib/llvm/lib/CodeGen/MachineModuleInfo.cpp stable/9/contrib/llvm/lib/CodeGen/MachineRegisterInfo.cpp stable/9/contrib/llvm/lib/CodeGen/MachineSSAUpdater.cpp stable/9/contrib/llvm/lib/CodeGen/MachineScheduler.cpp stable/9/contrib/llvm/lib/CodeGen/MachineSink.cpp stable/9/contrib/llvm/lib/CodeGen/MachineTraceMetrics.cpp stable/9/contrib/llvm/lib/CodeGen/MachineVerifier.cpp stable/9/contrib/llvm/lib/CodeGen/PHIElimination.cpp stable/9/contrib/llvm/lib/CodeGen/PHIEliminationUtils.h stable/9/contrib/llvm/lib/CodeGen/Passes.cpp stable/9/contrib/llvm/lib/CodeGen/PeepholeOptimizer.cpp stable/9/contrib/llvm/lib/CodeGen/PostRASchedulerList.cpp stable/9/contrib/llvm/lib/CodeGen/ProcessImplicitDefs.cpp stable/9/contrib/llvm/lib/CodeGen/PrologEpilogInserter.cpp stable/9/contrib/llvm/lib/CodeGen/PrologEpilogInserter.h stable/9/contrib/llvm/lib/CodeGen/RegAllocBase.cpp stable/9/contrib/llvm/lib/CodeGen/RegAllocBase.h stable/9/contrib/llvm/lib/CodeGen/RegAllocBasic.cpp stable/9/contrib/llvm/lib/CodeGen/RegAllocFast.cpp stable/9/contrib/llvm/lib/CodeGen/RegAllocGreedy.cpp stable/9/contrib/llvm/lib/CodeGen/RegAllocPBQP.cpp stable/9/contrib/llvm/lib/CodeGen/RegisterClassInfo.cpp stable/9/contrib/llvm/lib/CodeGen/RegisterCoalescer.cpp stable/9/contrib/llvm/lib/CodeGen/RegisterPressure.cpp stable/9/contrib/llvm/lib/CodeGen/RegisterScavenging.cpp stable/9/contrib/llvm/lib/CodeGen/ScheduleDAG.cpp stable/9/contrib/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp stable/9/contrib/llvm/lib/CodeGen/SjLjEHPrepare.cpp stable/9/contrib/llvm/lib/CodeGen/SpillPlacement.cpp stable/9/contrib/llvm/lib/CodeGen/SpillPlacement.h stable/9/contrib/llvm/lib/CodeGen/Spiller.cpp stable/9/contrib/llvm/lib/CodeGen/SplitKit.cpp stable/9/contrib/llvm/lib/CodeGen/SplitKit.h stable/9/contrib/llvm/lib/CodeGen/StackColoring.cpp stable/9/contrib/llvm/lib/CodeGen/StackProtector.cpp stable/9/contrib/llvm/lib/CodeGen/StackSlotColoring.cpp stable/9/contrib/llvm/lib/CodeGen/TailDuplication.cpp stable/9/contrib/llvm/lib/CodeGen/TargetInstrInfo.cpp stable/9/contrib/llvm/lib/CodeGen/TargetLoweringBase.cpp stable/9/contrib/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp stable/9/contrib/llvm/lib/CodeGen/TargetOptionsImpl.cpp stable/9/contrib/llvm/lib/CodeGen/TargetRegisterInfo.cpp stable/9/contrib/llvm/lib/CodeGen/TargetSchedule.cpp stable/9/contrib/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp stable/9/contrib/llvm/lib/CodeGen/UnreachableBlockElim.cpp stable/9/contrib/llvm/lib/CodeGen/VirtRegMap.cpp stable/9/contrib/llvm/lib/DebugInfo/DWARFAbbreviationDeclaration.cpp stable/9/contrib/llvm/lib/DebugInfo/DWARFAbbreviationDeclaration.h stable/9/contrib/llvm/lib/DebugInfo/DWARFCompileUnit.cpp stable/9/contrib/llvm/lib/DebugInfo/DWARFCompileUnit.h stable/9/contrib/llvm/lib/DebugInfo/DWARFContext.cpp stable/9/contrib/llvm/lib/DebugInfo/DWARFContext.h stable/9/contrib/llvm/lib/DebugInfo/DWARFDebugArangeSet.cpp stable/9/contrib/llvm/lib/DebugInfo/DWARFDebugArangeSet.h stable/9/contrib/llvm/lib/DebugInfo/DWARFDebugAranges.cpp stable/9/contrib/llvm/lib/DebugInfo/DWARFDebugAranges.h stable/9/contrib/llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp stable/9/contrib/llvm/lib/DebugInfo/DWARFDebugInfoEntry.h stable/9/contrib/llvm/lib/DebugInfo/DWARFDebugLine.cpp stable/9/contrib/llvm/lib/DebugInfo/DWARFFormValue.cpp stable/9/contrib/llvm/lib/ExecutionEngine/ExecutionEngine.cpp stable/9/contrib/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp stable/9/contrib/llvm/lib/ExecutionEngine/IntelJITEvents/IntelJITEventsWrapper.h stable/9/contrib/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp stable/9/contrib/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp stable/9/contrib/llvm/lib/ExecutionEngine/Interpreter/Interpreter.h stable/9/contrib/llvm/lib/ExecutionEngine/JIT/JIT.cpp stable/9/contrib/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp stable/9/contrib/llvm/lib/ExecutionEngine/JIT/JITMemoryManager.cpp stable/9/contrib/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp stable/9/contrib/llvm/lib/ExecutionEngine/MCJIT/MCJIT.h stable/9/contrib/llvm/lib/ExecutionEngine/MCJIT/SectionMemoryManager.cpp stable/9/contrib/llvm/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp stable/9/contrib/llvm/lib/ExecutionEngine/OProfileJIT/OProfileWrapper.cpp stable/9/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/JITRegistrar.h stable/9/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h stable/9/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp stable/9/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp stable/9/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h stable/9/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h stable/9/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp stable/9/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h stable/9/contrib/llvm/lib/ExecutionEngine/TargetSelect.cpp stable/9/contrib/llvm/lib/IR/AsmWriter.cpp stable/9/contrib/llvm/lib/IR/AttributeImpl.h stable/9/contrib/llvm/lib/IR/Attributes.cpp stable/9/contrib/llvm/lib/IR/AutoUpgrade.cpp stable/9/contrib/llvm/lib/IR/ConstantFold.cpp stable/9/contrib/llvm/lib/IR/Constants.cpp stable/9/contrib/llvm/lib/IR/Core.cpp stable/9/contrib/llvm/lib/IR/DIBuilder.cpp stable/9/contrib/llvm/lib/IR/DataLayout.cpp stable/9/contrib/llvm/lib/IR/DebugInfo.cpp stable/9/contrib/llvm/lib/IR/Function.cpp stable/9/contrib/llvm/lib/IR/GCOV.cpp stable/9/contrib/llvm/lib/IR/Globals.cpp stable/9/contrib/llvm/lib/IR/Instruction.cpp stable/9/contrib/llvm/lib/IR/Instructions.cpp stable/9/contrib/llvm/lib/IR/LLVMContextImpl.h stable/9/contrib/llvm/lib/IR/Metadata.cpp stable/9/contrib/llvm/lib/IR/Module.cpp stable/9/contrib/llvm/lib/IR/PassManager.cpp stable/9/contrib/llvm/lib/IR/PassRegistry.cpp stable/9/contrib/llvm/lib/IR/Type.cpp stable/9/contrib/llvm/lib/IR/TypeFinder.cpp stable/9/contrib/llvm/lib/IR/Value.cpp stable/9/contrib/llvm/lib/IR/ValueTypes.cpp stable/9/contrib/llvm/lib/IR/Verifier.cpp stable/9/contrib/llvm/lib/IRReader/IRReader.cpp stable/9/contrib/llvm/lib/Linker/LinkModules.cpp stable/9/contrib/llvm/lib/MC/ELFObjectWriter.cpp stable/9/contrib/llvm/lib/MC/MCAsmBackend.cpp stable/9/contrib/llvm/lib/MC/MCAsmInfo.cpp stable/9/contrib/llvm/lib/MC/MCAsmInfoCOFF.cpp stable/9/contrib/llvm/lib/MC/MCAsmInfoDarwin.cpp stable/9/contrib/llvm/lib/MC/MCAsmStreamer.cpp stable/9/contrib/llvm/lib/MC/MCAssembler.cpp stable/9/contrib/llvm/lib/MC/MCAtom.cpp stable/9/contrib/llvm/lib/MC/MCContext.cpp stable/9/contrib/llvm/lib/MC/MCDisassembler.cpp stable/9/contrib/llvm/lib/MC/MCDisassembler/Disassembler.cpp stable/9/contrib/llvm/lib/MC/MCDisassembler/Disassembler.h stable/9/contrib/llvm/lib/MC/MCDwarf.cpp stable/9/contrib/llvm/lib/MC/MCELF.cpp stable/9/contrib/llvm/lib/MC/MCELFObjectTargetWriter.cpp stable/9/contrib/llvm/lib/MC/MCELFStreamer.cpp stable/9/contrib/llvm/lib/MC/MCExpr.cpp stable/9/contrib/llvm/lib/MC/MCInstPrinter.cpp stable/9/contrib/llvm/lib/MC/MCInstrAnalysis.cpp stable/9/contrib/llvm/lib/MC/MCMachOStreamer.cpp stable/9/contrib/llvm/lib/MC/MCModule.cpp stable/9/contrib/llvm/lib/MC/MCNullStreamer.cpp stable/9/contrib/llvm/lib/MC/MCObjectFileInfo.cpp stable/9/contrib/llvm/lib/MC/MCObjectStreamer.cpp stable/9/contrib/llvm/lib/MC/MCParser/AsmLexer.cpp stable/9/contrib/llvm/lib/MC/MCParser/AsmParser.cpp stable/9/contrib/llvm/lib/MC/MCParser/COFFAsmParser.cpp stable/9/contrib/llvm/lib/MC/MCParser/DarwinAsmParser.cpp stable/9/contrib/llvm/lib/MC/MCParser/ELFAsmParser.cpp stable/9/contrib/llvm/lib/MC/MCPureStreamer.cpp stable/9/contrib/llvm/lib/MC/MCRegisterInfo.cpp stable/9/contrib/llvm/lib/MC/MCSectionCOFF.cpp stable/9/contrib/llvm/lib/MC/MCSectionELF.cpp stable/9/contrib/llvm/lib/MC/MCStreamer.cpp stable/9/contrib/llvm/lib/MC/MCSubtargetInfo.cpp stable/9/contrib/llvm/lib/MC/MCSymbol.cpp stable/9/contrib/llvm/lib/MC/MCWin64EH.cpp stable/9/contrib/llvm/lib/MC/MachObjectWriter.cpp stable/9/contrib/llvm/lib/MC/SubtargetFeature.cpp stable/9/contrib/llvm/lib/MC/WinCOFFObjectWriter.cpp stable/9/contrib/llvm/lib/MC/WinCOFFStreamer.cpp stable/9/contrib/llvm/lib/Object/Archive.cpp stable/9/contrib/llvm/lib/Object/Binary.cpp stable/9/contrib/llvm/lib/Object/COFFObjectFile.cpp stable/9/contrib/llvm/lib/Object/ELFObjectFile.cpp stable/9/contrib/llvm/lib/Object/Error.cpp stable/9/contrib/llvm/lib/Object/MachOObjectFile.cpp stable/9/contrib/llvm/lib/Object/Object.cpp stable/9/contrib/llvm/lib/Object/ObjectFile.cpp stable/9/contrib/llvm/lib/Option/ArgList.cpp stable/9/contrib/llvm/lib/Option/OptTable.cpp stable/9/contrib/llvm/lib/Option/Option.cpp stable/9/contrib/llvm/lib/Support/APFloat.cpp stable/9/contrib/llvm/lib/Support/APInt.cpp stable/9/contrib/llvm/lib/Support/Allocator.cpp stable/9/contrib/llvm/lib/Support/BlockFrequency.cpp stable/9/contrib/llvm/lib/Support/CommandLine.cpp stable/9/contrib/llvm/lib/Support/Compression.cpp stable/9/contrib/llvm/lib/Support/ConstantRange.cpp stable/9/contrib/llvm/lib/Support/ConvertUTFWrapper.cpp stable/9/contrib/llvm/lib/Support/CrashRecoveryContext.cpp stable/9/contrib/llvm/lib/Support/DataStream.cpp stable/9/contrib/llvm/lib/Support/Disassembler.cpp stable/9/contrib/llvm/lib/Support/Dwarf.cpp stable/9/contrib/llvm/lib/Support/DynamicLibrary.cpp stable/9/contrib/llvm/lib/Support/Errno.cpp stable/9/contrib/llvm/lib/Support/ErrorHandling.cpp stable/9/contrib/llvm/lib/Support/FileOutputBuffer.cpp stable/9/contrib/llvm/lib/Support/FileUtilities.cpp stable/9/contrib/llvm/lib/Support/FormattedStream.cpp stable/9/contrib/llvm/lib/Support/GraphWriter.cpp stable/9/contrib/llvm/lib/Support/Host.cpp stable/9/contrib/llvm/lib/Support/Locale.cpp stable/9/contrib/llvm/lib/Support/LockFileManager.cpp stable/9/contrib/llvm/lib/Support/MemoryBuffer.cpp stable/9/contrib/llvm/lib/Support/MemoryObject.cpp stable/9/contrib/llvm/lib/Support/Path.cpp stable/9/contrib/llvm/lib/Support/PrettyStackTrace.cpp stable/9/contrib/llvm/lib/Support/Process.cpp stable/9/contrib/llvm/lib/Support/Program.cpp stable/9/contrib/llvm/lib/Support/Regex.cpp stable/9/contrib/llvm/lib/Support/SmallPtrSet.cpp stable/9/contrib/llvm/lib/Support/SourceMgr.cpp stable/9/contrib/llvm/lib/Support/StreamableMemoryObject.cpp stable/9/contrib/llvm/lib/Support/StringRef.cpp stable/9/contrib/llvm/lib/Support/SystemUtils.cpp stable/9/contrib/llvm/lib/Support/TargetRegistry.cpp stable/9/contrib/llvm/lib/Support/ThreadLocal.cpp stable/9/contrib/llvm/lib/Support/Timer.cpp stable/9/contrib/llvm/lib/Support/ToolOutputFile.cpp stable/9/contrib/llvm/lib/Support/Triple.cpp stable/9/contrib/llvm/lib/Support/Unix/Memory.inc stable/9/contrib/llvm/lib/Support/Unix/Path.inc stable/9/contrib/llvm/lib/Support/Unix/Process.inc stable/9/contrib/llvm/lib/Support/Unix/Program.inc stable/9/contrib/llvm/lib/Support/Unix/Signals.inc stable/9/contrib/llvm/lib/Support/Unix/ThreadLocal.inc stable/9/contrib/llvm/lib/Support/Unix/TimeValue.inc stable/9/contrib/llvm/lib/Support/Unix/Unix.h stable/9/contrib/llvm/lib/Support/Windows/DynamicLibrary.inc stable/9/contrib/llvm/lib/Support/Windows/Memory.inc stable/9/contrib/llvm/lib/Support/Windows/Path.inc stable/9/contrib/llvm/lib/Support/Windows/Process.inc stable/9/contrib/llvm/lib/Support/Windows/Program.inc stable/9/contrib/llvm/lib/Support/Windows/RWMutex.inc stable/9/contrib/llvm/lib/Support/Windows/Signals.inc stable/9/contrib/llvm/lib/Support/Windows/TimeValue.inc stable/9/contrib/llvm/lib/Support/Windows/Windows.h stable/9/contrib/llvm/lib/Support/YAMLParser.cpp stable/9/contrib/llvm/lib/Support/YAMLTraits.cpp stable/9/contrib/llvm/lib/Support/raw_ostream.cpp stable/9/contrib/llvm/lib/TableGen/Main.cpp stable/9/contrib/llvm/lib/TableGen/Record.cpp stable/9/contrib/llvm/lib/TableGen/TGParser.cpp stable/9/contrib/llvm/lib/Target/AArch64/AArch64.td stable/9/contrib/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp stable/9/contrib/llvm/lib/Target/AArch64/AArch64AsmPrinter.h stable/9/contrib/llvm/lib/Target/AArch64/AArch64BranchFixupPass.cpp stable/9/contrib/llvm/lib/Target/AArch64/AArch64CallingConv.td stable/9/contrib/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp stable/9/contrib/llvm/lib/Target/AArch64/AArch64FrameLowering.h stable/9/contrib/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp stable/9/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp stable/9/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.h stable/9/contrib/llvm/lib/Target/AArch64/AArch64InstrFormats.td stable/9/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp stable/9/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.h stable/9/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.td stable/9/contrib/llvm/lib/Target/AArch64/AArch64MCInstLower.cpp stable/9/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp stable/9/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.h stable/9/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.td stable/9/contrib/llvm/lib/Target/AArch64/AArch64Subtarget.cpp stable/9/contrib/llvm/lib/Target/AArch64/AArch64Subtarget.h stable/9/contrib/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp stable/9/contrib/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp stable/9/contrib/llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp stable/9/contrib/llvm/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp stable/9/contrib/llvm/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.h stable/9/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp stable/9/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp stable/9/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp stable/9/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.h stable/9/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp stable/9/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp stable/9/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.h stable/9/contrib/llvm/lib/Target/AArch64/TargetInfo/AArch64TargetInfo.cpp stable/9/contrib/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.cpp stable/9/contrib/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h stable/9/contrib/llvm/lib/Target/ARM/A15SDOptimizer.cpp stable/9/contrib/llvm/lib/Target/ARM/ARM.td stable/9/contrib/llvm/lib/Target/ARM/ARMAsmPrinter.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMAsmPrinter.h stable/9/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.h stable/9/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h stable/9/contrib/llvm/lib/Target/ARM/ARMBuildAttrs.h stable/9/contrib/llvm/lib/Target/ARM/ARMCallingConv.td stable/9/contrib/llvm/lib/Target/ARM/ARMCodeEmitter.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMConstantPoolValue.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMConstantPoolValue.h stable/9/contrib/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMFastISel.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMFrameLowering.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMHazardRecognizer.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMHazardRecognizer.h stable/9/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMISelLowering.h stable/9/contrib/llvm/lib/Target/ARM/ARMInstrFormats.td stable/9/contrib/llvm/lib/Target/ARM/ARMInstrInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td stable/9/contrib/llvm/lib/Target/ARM/ARMInstrNEON.td stable/9/contrib/llvm/lib/Target/ARM/ARMInstrThumb.td stable/9/contrib/llvm/lib/Target/ARM/ARMInstrThumb2.td stable/9/contrib/llvm/lib/Target/ARM/ARMInstrVFP.td stable/9/contrib/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMMCInstLower.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMMachineFunctionInfo.h stable/9/contrib/llvm/lib/Target/ARM/ARMRegisterInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMRegisterInfo.h stable/9/contrib/llvm/lib/Target/ARM/ARMRegisterInfo.td stable/9/contrib/llvm/lib/Target/ARM/ARMSchedule.td stable/9/contrib/llvm/lib/Target/ARM/ARMScheduleA9.td stable/9/contrib/llvm/lib/Target/ARM/ARMScheduleSwift.td stable/9/contrib/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMSelectionDAGInfo.h stable/9/contrib/llvm/lib/Target/ARM/ARMSubtarget.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMSubtarget.h stable/9/contrib/llvm/lib/Target/ARM/ARMTargetMachine.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMTargetObjectFile.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp stable/9/contrib/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp stable/9/contrib/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp stable/9/contrib/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.h stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAddressingModes.h stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMBaseInfo.h stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.h stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.h stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMUnwindOpAsm.cpp stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMUnwindOpAsm.h stable/9/contrib/llvm/lib/Target/ARM/Thumb1FrameLowering.cpp stable/9/contrib/llvm/lib/Target/ARM/Thumb1InstrInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/Thumb1RegisterInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/Thumb1RegisterInfo.h stable/9/contrib/llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp stable/9/contrib/llvm/lib/Target/ARM/Thumb2InstrInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/Thumb2RegisterInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/Thumb2RegisterInfo.h stable/9/contrib/llvm/lib/Target/CppBackend/CPPBackend.cpp stable/9/contrib/llvm/lib/Target/Hexagon/Hexagon.h stable/9/contrib/llvm/lib/Target/Hexagon/Hexagon.td stable/9/contrib/llvm/lib/Target/Hexagon/HexagonAsmPrinter.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonCallingConvLower.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonCallingConvLower.h stable/9/contrib/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonHardwareLoops.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonISelLowering.h stable/9/contrib/llvm/lib/Target/Hexagon/HexagonInstrFormats.td stable/9/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.h stable/9/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.td stable/9/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfoV4.td stable/9/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfoV5.td stable/9/contrib/llvm/lib/Target/Hexagon/HexagonMCInstLower.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonMachineFunctionInfo.h stable/9/contrib/llvm/lib/Target/Hexagon/HexagonMachineScheduler.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonMachineScheduler.h stable/9/contrib/llvm/lib/Target/Hexagon/HexagonNewValueJump.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonPeephole.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonRegisterInfo.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonRegisterInfo.h stable/9/contrib/llvm/lib/Target/Hexagon/HexagonRegisterInfo.td stable/9/contrib/llvm/lib/Target/Hexagon/HexagonSelectionDAGInfo.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonSelectionDAGInfo.h stable/9/contrib/llvm/lib/Target/Hexagon/HexagonSubtarget.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonSubtarget.h stable/9/contrib/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.h stable/9/contrib/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp stable/9/contrib/llvm/lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.cpp stable/9/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonBaseInfo.h stable/9/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.cpp stable/9/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.h stable/9/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp stable/9/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp stable/9/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.h stable/9/contrib/llvm/lib/Target/MSP430/MSP430AsmPrinter.cpp stable/9/contrib/llvm/lib/Target/MSP430/MSP430CallingConv.td stable/9/contrib/llvm/lib/Target/MSP430/MSP430FrameLowering.h stable/9/contrib/llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp stable/9/contrib/llvm/lib/Target/MSP430/MSP430ISelLowering.cpp stable/9/contrib/llvm/lib/Target/MSP430/MSP430ISelLowering.h stable/9/contrib/llvm/lib/Target/MSP430/MSP430InstrInfo.cpp stable/9/contrib/llvm/lib/Target/MSP430/MSP430InstrInfo.h stable/9/contrib/llvm/lib/Target/MSP430/MSP430InstrInfo.td stable/9/contrib/llvm/lib/Target/MSP430/MSP430MCInstLower.cpp stable/9/contrib/llvm/lib/Target/MSP430/MSP430RegisterInfo.cpp stable/9/contrib/llvm/lib/Target/MSP430/MSP430RegisterInfo.h stable/9/contrib/llvm/lib/Target/MSP430/MSP430RegisterInfo.td stable/9/contrib/llvm/lib/Target/MSP430/MSP430TargetMachine.cpp stable/9/contrib/llvm/lib/Target/Mangler.cpp stable/9/contrib/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp stable/9/contrib/llvm/lib/Target/Mips/Disassembler/MipsDisassembler.cpp stable/9/contrib/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp stable/9/contrib/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.h stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsFixupKinds.h stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.h stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.h stable/9/contrib/llvm/lib/Target/Mips/MicroMipsInstrFormats.td stable/9/contrib/llvm/lib/Target/Mips/MicroMipsInstrInfo.td stable/9/contrib/llvm/lib/Target/Mips/Mips.h stable/9/contrib/llvm/lib/Target/Mips/Mips.td stable/9/contrib/llvm/lib/Target/Mips/Mips16FrameLowering.cpp stable/9/contrib/llvm/lib/Target/Mips/Mips16FrameLowering.h stable/9/contrib/llvm/lib/Target/Mips/Mips16ISelDAGToDAG.cpp stable/9/contrib/llvm/lib/Target/Mips/Mips16ISelDAGToDAG.h stable/9/contrib/llvm/lib/Target/Mips/Mips16ISelLowering.cpp stable/9/contrib/llvm/lib/Target/Mips/Mips16ISelLowering.h stable/9/contrib/llvm/lib/Target/Mips/Mips16InstrFormats.td stable/9/contrib/llvm/lib/Target/Mips/Mips16InstrInfo.cpp stable/9/contrib/llvm/lib/Target/Mips/Mips16InstrInfo.h stable/9/contrib/llvm/lib/Target/Mips/Mips16InstrInfo.td stable/9/contrib/llvm/lib/Target/Mips/Mips16RegisterInfo.cpp stable/9/contrib/llvm/lib/Target/Mips/Mips16RegisterInfo.h stable/9/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td stable/9/contrib/llvm/lib/Target/Mips/MipsAnalyzeImmediate.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsAnalyzeImmediate.h stable/9/contrib/llvm/lib/Target/Mips/MipsAsmPrinter.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsAsmPrinter.h stable/9/contrib/llvm/lib/Target/Mips/MipsCallingConv.td stable/9/contrib/llvm/lib/Target/Mips/MipsCodeEmitter.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsCondMov.td stable/9/contrib/llvm/lib/Target/Mips/MipsConstantIslandPass.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsDSPInstrInfo.td stable/9/contrib/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsISelDAGToDAG.h stable/9/contrib/llvm/lib/Target/Mips/MipsISelLowering.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsISelLowering.h stable/9/contrib/llvm/lib/Target/Mips/MipsInstrFPU.td stable/9/contrib/llvm/lib/Target/Mips/MipsInstrFormats.td stable/9/contrib/llvm/lib/Target/Mips/MipsInstrInfo.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsInstrInfo.h stable/9/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td stable/9/contrib/llvm/lib/Target/Mips/MipsJITInfo.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsLongBranch.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsMCInstLower.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsMCInstLower.h stable/9/contrib/llvm/lib/Target/Mips/MipsMachineFunction.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsMachineFunction.h stable/9/contrib/llvm/lib/Target/Mips/MipsOs16.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.h stable/9/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.td stable/9/contrib/llvm/lib/Target/Mips/MipsSEFrameLowering.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsSEFrameLowering.h stable/9/contrib/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.h stable/9/contrib/llvm/lib/Target/Mips/MipsSEISelLowering.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsSEISelLowering.h stable/9/contrib/llvm/lib/Target/Mips/MipsSEInstrInfo.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsSEInstrInfo.h stable/9/contrib/llvm/lib/Target/Mips/MipsSERegisterInfo.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsSERegisterInfo.h stable/9/contrib/llvm/lib/Target/Mips/MipsSchedule.td stable/9/contrib/llvm/lib/Target/Mips/MipsSubtarget.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsSubtarget.h stable/9/contrib/llvm/lib/Target/Mips/MipsTargetMachine.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsTargetMachine.h stable/9/contrib/llvm/lib/Target/NVPTX/InstPrinter/NVPTXInstPrinter.cpp stable/9/contrib/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXBaseInfo.h stable/9/contrib/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.cpp stable/9/contrib/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.h stable/9/contrib/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXMCTargetDesc.cpp stable/9/contrib/llvm/lib/Target/NVPTX/ManagedStringPool.h stable/9/contrib/llvm/lib/Target/NVPTX/NVPTX.h stable/9/contrib/llvm/lib/Target/NVPTX/NVPTX.td stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXAllocaHoisting.cpp stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.h stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXFrameLowering.cpp stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXGenericToNVVM.cpp stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.h stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXISelLowering.h stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXInstrInfo.cpp stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXInstrInfo.h stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXInstrInfo.td stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXIntrinsics.td stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXRegisterInfo.cpp stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXRegisterInfo.h stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXRegisterInfo.td stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXSection.h stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXSplitBBatBar.cpp stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXSubtarget.cpp stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXSubtarget.h stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXTargetObjectFile.h stable/9/contrib/llvm/lib/Target/NVPTX/NVVMReflect.cpp stable/9/contrib/llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp stable/9/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp stable/9/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCFixupKinds.h stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.h stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.cpp stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h stable/9/contrib/llvm/lib/Target/PowerPC/PPC.h stable/9/contrib/llvm/lib/Target/PowerPC/PPC.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCCallingConv.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.h stable/9/contrib/llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCHazardRecognizers.h stable/9/contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.h stable/9/contrib/llvm/lib/Target/PowerPC/PPCInstr64Bit.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCInstrAltivec.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCInstrFormats.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.h stable/9/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCJITInfo.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h stable/9/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.h stable/9/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCSchedule.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCScheduleA2.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCScheduleE500mc.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCScheduleE5500.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.h stable/9/contrib/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp stable/9/contrib/llvm/lib/Target/PowerPC/TargetInfo/PowerPCTargetInfo.cpp stable/9/contrib/llvm/lib/Target/R600/AMDGPU.h stable/9/contrib/llvm/lib/Target/R600/AMDGPU.td stable/9/contrib/llvm/lib/Target/R600/AMDGPUAsmPrinter.cpp stable/9/contrib/llvm/lib/Target/R600/AMDGPUAsmPrinter.h stable/9/contrib/llvm/lib/Target/R600/AMDGPUCallingConv.td stable/9/contrib/llvm/lib/Target/R600/AMDGPUFrameLowering.cpp stable/9/contrib/llvm/lib/Target/R600/AMDGPUISelLowering.cpp stable/9/contrib/llvm/lib/Target/R600/AMDGPUISelLowering.h stable/9/contrib/llvm/lib/Target/R600/AMDGPUInstrInfo.cpp stable/9/contrib/llvm/lib/Target/R600/AMDGPUInstrInfo.h stable/9/contrib/llvm/lib/Target/R600/AMDGPUInstrInfo.td stable/9/contrib/llvm/lib/Target/R600/AMDGPUInstructions.td stable/9/contrib/llvm/lib/Target/R600/AMDGPUIntrinsics.td stable/9/contrib/llvm/lib/Target/R600/AMDGPUMCInstLower.cpp stable/9/contrib/llvm/lib/Target/R600/AMDGPUMachineFunction.cpp stable/9/contrib/llvm/lib/Target/R600/AMDGPUMachineFunction.h stable/9/contrib/llvm/lib/Target/R600/AMDGPURegisterInfo.cpp stable/9/contrib/llvm/lib/Target/R600/AMDGPURegisterInfo.h stable/9/contrib/llvm/lib/Target/R600/AMDGPURegisterInfo.td stable/9/contrib/llvm/lib/Target/R600/AMDGPUSubtarget.cpp stable/9/contrib/llvm/lib/Target/R600/AMDGPUSubtarget.h stable/9/contrib/llvm/lib/Target/R600/AMDGPUTargetMachine.cpp stable/9/contrib/llvm/lib/Target/R600/AMDGPUTargetMachine.h stable/9/contrib/llvm/lib/Target/R600/AMDILBase.td stable/9/contrib/llvm/lib/Target/R600/AMDILCFGStructurizer.cpp stable/9/contrib/llvm/lib/Target/R600/AMDILISelLowering.cpp stable/9/contrib/llvm/lib/Target/R600/AMDILInstrInfo.td stable/9/contrib/llvm/lib/Target/R600/AMDILIntrinsicInfo.cpp stable/9/contrib/llvm/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp stable/9/contrib/llvm/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.h stable/9/contrib/llvm/lib/Target/R600/MCTargetDesc/AMDGPUAsmBackend.cpp stable/9/contrib/llvm/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp stable/9/contrib/llvm/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.h stable/9/contrib/llvm/lib/Target/R600/MCTargetDesc/AMDGPUMCCodeEmitter.h stable/9/contrib/llvm/lib/Target/R600/MCTargetDesc/AMDGPUMCTargetDesc.cpp stable/9/contrib/llvm/lib/Target/R600/MCTargetDesc/AMDGPUMCTargetDesc.h stable/9/contrib/llvm/lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp stable/9/contrib/llvm/lib/Target/R600/Processors.td stable/9/contrib/llvm/lib/Target/R600/R600ControlFlowFinalizer.cpp stable/9/contrib/llvm/lib/Target/R600/R600Defines.h stable/9/contrib/llvm/lib/Target/R600/R600EmitClauseMarkers.cpp stable/9/contrib/llvm/lib/Target/R600/R600ExpandSpecialInstrs.cpp stable/9/contrib/llvm/lib/Target/R600/R600ISelLowering.cpp stable/9/contrib/llvm/lib/Target/R600/R600ISelLowering.h stable/9/contrib/llvm/lib/Target/R600/R600InstrInfo.cpp stable/9/contrib/llvm/lib/Target/R600/R600InstrInfo.h stable/9/contrib/llvm/lib/Target/R600/R600Instructions.td stable/9/contrib/llvm/lib/Target/R600/R600Intrinsics.td stable/9/contrib/llvm/lib/Target/R600/R600MachineFunctionInfo.cpp stable/9/contrib/llvm/lib/Target/R600/R600MachineFunctionInfo.h stable/9/contrib/llvm/lib/Target/R600/R600MachineScheduler.cpp stable/9/contrib/llvm/lib/Target/R600/R600MachineScheduler.h stable/9/contrib/llvm/lib/Target/R600/R600Packetizer.cpp stable/9/contrib/llvm/lib/Target/R600/R600RegisterInfo.cpp stable/9/contrib/llvm/lib/Target/R600/R600RegisterInfo.h stable/9/contrib/llvm/lib/Target/R600/R600RegisterInfo.td stable/9/contrib/llvm/lib/Target/R600/R600Schedule.td stable/9/contrib/llvm/lib/Target/R600/SIAnnotateControlFlow.cpp stable/9/contrib/llvm/lib/Target/R600/SIDefines.h stable/9/contrib/llvm/lib/Target/R600/SIISelLowering.cpp stable/9/contrib/llvm/lib/Target/R600/SIISelLowering.h stable/9/contrib/llvm/lib/Target/R600/SIInsertWaits.cpp stable/9/contrib/llvm/lib/Target/R600/SIInstrFormats.td stable/9/contrib/llvm/lib/Target/R600/SIInstrInfo.cpp stable/9/contrib/llvm/lib/Target/R600/SIInstrInfo.h stable/9/contrib/llvm/lib/Target/R600/SIInstrInfo.td stable/9/contrib/llvm/lib/Target/R600/SIInstructions.td stable/9/contrib/llvm/lib/Target/R600/SIIntrinsics.td stable/9/contrib/llvm/lib/Target/R600/SILowerControlFlow.cpp stable/9/contrib/llvm/lib/Target/R600/SIMachineFunctionInfo.cpp stable/9/contrib/llvm/lib/Target/R600/SIMachineFunctionInfo.h stable/9/contrib/llvm/lib/Target/R600/SIRegisterInfo.cpp stable/9/contrib/llvm/lib/Target/R600/SIRegisterInfo.h stable/9/contrib/llvm/lib/Target/R600/SIRegisterInfo.td stable/9/contrib/llvm/lib/Target/R600/TargetInfo/AMDGPUTargetInfo.cpp stable/9/contrib/llvm/lib/Target/Sparc/DelaySlotFiller.cpp stable/9/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcBaseInfo.h stable/9/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp stable/9/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.h stable/9/contrib/llvm/lib/Target/Sparc/Sparc.h stable/9/contrib/llvm/lib/Target/Sparc/Sparc.td stable/9/contrib/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcCallingConv.td stable/9/contrib/llvm/lib/Target/Sparc/SparcFrameLowering.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcFrameLowering.h stable/9/contrib/llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcISelLowering.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcISelLowering.h stable/9/contrib/llvm/lib/Target/Sparc/SparcInstr64Bit.td stable/9/contrib/llvm/lib/Target/Sparc/SparcInstrFormats.td stable/9/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.h stable/9/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.td stable/9/contrib/llvm/lib/Target/Sparc/SparcMachineFunctionInfo.h stable/9/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.h stable/9/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.td stable/9/contrib/llvm/lib/Target/Sparc/SparcSubtarget.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcSubtarget.h stable/9/contrib/llvm/lib/Target/Sparc/SparcTargetMachine.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcTargetMachine.h stable/9/contrib/llvm/lib/Target/Sparc/TargetInfo/SparcTargetInfo.cpp stable/9/contrib/llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp stable/9/contrib/llvm/lib/Target/SystemZ/InstPrinter/SystemZInstPrinter.cpp stable/9/contrib/llvm/lib/Target/SystemZ/InstPrinter/SystemZInstPrinter.h stable/9/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp stable/9/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp stable/9/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.h stable/9/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCCodeEmitter.cpp stable/9/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp stable/9/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.h stable/9/contrib/llvm/lib/Target/SystemZ/README.txt stable/9/contrib/llvm/lib/Target/SystemZ/SystemZ.h stable/9/contrib/llvm/lib/Target/SystemZ/SystemZ.td stable/9/contrib/llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp stable/9/contrib/llvm/lib/Target/SystemZ/SystemZCallingConv.td stable/9/contrib/llvm/lib/Target/SystemZ/SystemZConstantPoolValue.cpp stable/9/contrib/llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp stable/9/contrib/llvm/lib/Target/SystemZ/SystemZFrameLowering.h stable/9/contrib/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp stable/9/contrib/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp stable/9/contrib/llvm/lib/Target/SystemZ/SystemZISelLowering.h stable/9/contrib/llvm/lib/Target/SystemZ/SystemZInstrFP.td stable/9/contrib/llvm/lib/Target/SystemZ/SystemZInstrFormats.td stable/9/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp stable/9/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.h stable/9/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.td stable/9/contrib/llvm/lib/Target/SystemZ/SystemZMCInstLower.cpp stable/9/contrib/llvm/lib/Target/SystemZ/SystemZMCInstLower.h stable/9/contrib/llvm/lib/Target/SystemZ/SystemZMachineFunctionInfo.h stable/9/contrib/llvm/lib/Target/SystemZ/SystemZOperands.td stable/9/contrib/llvm/lib/Target/SystemZ/SystemZOperators.td stable/9/contrib/llvm/lib/Target/SystemZ/SystemZPatterns.td stable/9/contrib/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp stable/9/contrib/llvm/lib/Target/SystemZ/SystemZRegisterInfo.h stable/9/contrib/llvm/lib/Target/SystemZ/SystemZRegisterInfo.td stable/9/contrib/llvm/lib/Target/SystemZ/SystemZSubtarget.cpp stable/9/contrib/llvm/lib/Target/SystemZ/SystemZSubtarget.h stable/9/contrib/llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp stable/9/contrib/llvm/lib/Target/SystemZ/SystemZTargetMachine.h stable/9/contrib/llvm/lib/Target/Target.cpp stable/9/contrib/llvm/lib/Target/TargetLibraryInfo.cpp stable/9/contrib/llvm/lib/Target/TargetLoweringObjectFile.cpp stable/9/contrib/llvm/lib/Target/TargetMachine.cpp stable/9/contrib/llvm/lib/Target/TargetMachineC.cpp stable/9/contrib/llvm/lib/Target/TargetSubtargetInfo.cpp stable/9/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp stable/9/contrib/llvm/lib/Target/X86/Disassembler/X86Disassembler.cpp stable/9/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c stable/9/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h stable/9/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h stable/9/contrib/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp stable/9/contrib/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.h stable/9/contrib/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp stable/9/contrib/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.h stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.h stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp stable/9/contrib/llvm/lib/Target/X86/X86.td stable/9/contrib/llvm/lib/Target/X86/X86AsmPrinter.cpp stable/9/contrib/llvm/lib/Target/X86/X86AsmPrinter.h stable/9/contrib/llvm/lib/Target/X86/X86CallingConv.td stable/9/contrib/llvm/lib/Target/X86/X86CodeEmitter.cpp stable/9/contrib/llvm/lib/Target/X86/X86FastISel.cpp stable/9/contrib/llvm/lib/Target/X86/X86FixupLEAs.cpp stable/9/contrib/llvm/lib/Target/X86/X86FloatingPoint.cpp stable/9/contrib/llvm/lib/Target/X86/X86FrameLowering.cpp stable/9/contrib/llvm/lib/Target/X86/X86FrameLowering.h stable/9/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp stable/9/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp stable/9/contrib/llvm/lib/Target/X86/X86ISelLowering.h stable/9/contrib/llvm/lib/Target/X86/X86InstrArithmetic.td stable/9/contrib/llvm/lib/Target/X86/X86InstrCompiler.td stable/9/contrib/llvm/lib/Target/X86/X86InstrControl.td stable/9/contrib/llvm/lib/Target/X86/X86InstrExtension.td stable/9/contrib/llvm/lib/Target/X86/X86InstrFMA.td stable/9/contrib/llvm/lib/Target/X86/X86InstrFPStack.td stable/9/contrib/llvm/lib/Target/X86/X86InstrFormats.td stable/9/contrib/llvm/lib/Target/X86/X86InstrFragmentsSIMD.td stable/9/contrib/llvm/lib/Target/X86/X86InstrInfo.cpp stable/9/contrib/llvm/lib/Target/X86/X86InstrInfo.h stable/9/contrib/llvm/lib/Target/X86/X86InstrInfo.td stable/9/contrib/llvm/lib/Target/X86/X86InstrMMX.td stable/9/contrib/llvm/lib/Target/X86/X86InstrSSE.td stable/9/contrib/llvm/lib/Target/X86/X86InstrSVM.td stable/9/contrib/llvm/lib/Target/X86/X86InstrShiftRotate.td stable/9/contrib/llvm/lib/Target/X86/X86InstrSystem.td stable/9/contrib/llvm/lib/Target/X86/X86InstrTSX.td stable/9/contrib/llvm/lib/Target/X86/X86InstrXOP.td stable/9/contrib/llvm/lib/Target/X86/X86JITInfo.cpp stable/9/contrib/llvm/lib/Target/X86/X86MCInstLower.cpp stable/9/contrib/llvm/lib/Target/X86/X86RegisterInfo.cpp stable/9/contrib/llvm/lib/Target/X86/X86RegisterInfo.h stable/9/contrib/llvm/lib/Target/X86/X86RegisterInfo.td stable/9/contrib/llvm/lib/Target/X86/X86SchedHaswell.td stable/9/contrib/llvm/lib/Target/X86/X86SchedSandyBridge.td stable/9/contrib/llvm/lib/Target/X86/X86Schedule.td stable/9/contrib/llvm/lib/Target/X86/X86ScheduleAtom.td stable/9/contrib/llvm/lib/Target/X86/X86SelectionDAGInfo.cpp stable/9/contrib/llvm/lib/Target/X86/X86SelectionDAGInfo.h stable/9/contrib/llvm/lib/Target/X86/X86Subtarget.cpp stable/9/contrib/llvm/lib/Target/X86/X86Subtarget.h stable/9/contrib/llvm/lib/Target/X86/X86TargetMachine.cpp stable/9/contrib/llvm/lib/Target/X86/X86TargetObjectFile.cpp stable/9/contrib/llvm/lib/Target/X86/X86TargetObjectFile.h stable/9/contrib/llvm/lib/Target/X86/X86TargetTransformInfo.cpp stable/9/contrib/llvm/lib/Target/X86/X86VZeroUpper.cpp stable/9/contrib/llvm/lib/Target/XCore/Disassembler/XCoreDisassembler.cpp stable/9/contrib/llvm/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp stable/9/contrib/llvm/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.h stable/9/contrib/llvm/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp stable/9/contrib/llvm/lib/Target/XCore/XCore.h stable/9/contrib/llvm/lib/Target/XCore/XCoreAsmPrinter.cpp stable/9/contrib/llvm/lib/Target/XCore/XCoreFrameLowering.cpp stable/9/contrib/llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp stable/9/contrib/llvm/lib/Target/XCore/XCoreISelLowering.cpp stable/9/contrib/llvm/lib/Target/XCore/XCoreISelLowering.h stable/9/contrib/llvm/lib/Target/XCore/XCoreInstrInfo.cpp stable/9/contrib/llvm/lib/Target/XCore/XCoreInstrInfo.h stable/9/contrib/llvm/lib/Target/XCore/XCoreInstrInfo.td stable/9/contrib/llvm/lib/Target/XCore/XCoreLowerThreadLocal.cpp stable/9/contrib/llvm/lib/Target/XCore/XCoreMCInstLower.cpp stable/9/contrib/llvm/lib/Target/XCore/XCoreRegisterInfo.cpp stable/9/contrib/llvm/lib/Target/XCore/XCoreRegisterInfo.h stable/9/contrib/llvm/lib/Target/XCore/XCoreTargetMachine.cpp stable/9/contrib/llvm/lib/Target/XCore/XCoreTargetMachine.h stable/9/contrib/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp stable/9/contrib/llvm/lib/Transforms/IPO/ConstantMerge.cpp stable/9/contrib/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp stable/9/contrib/llvm/lib/Transforms/IPO/ExtractGV.cpp stable/9/contrib/llvm/lib/Transforms/IPO/FunctionAttrs.cpp stable/9/contrib/llvm/lib/Transforms/IPO/GlobalDCE.cpp stable/9/contrib/llvm/lib/Transforms/IPO/GlobalOpt.cpp stable/9/contrib/llvm/lib/Transforms/IPO/InlineAlways.cpp stable/9/contrib/llvm/lib/Transforms/IPO/InlineSimple.cpp stable/9/contrib/llvm/lib/Transforms/IPO/Inliner.cpp stable/9/contrib/llvm/lib/Transforms/IPO/Internalize.cpp stable/9/contrib/llvm/lib/Transforms/IPO/MergeFunctions.cpp stable/9/contrib/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp stable/9/contrib/llvm/lib/Transforms/IPO/PruneEH.cpp stable/9/contrib/llvm/lib/Transforms/IPO/StripSymbols.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombine.h stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineWorklist.h stable/9/contrib/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp stable/9/contrib/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp stable/9/contrib/llvm/lib/Transforms/Instrumentation/BoundsChecking.cpp stable/9/contrib/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp stable/9/contrib/llvm/lib/Transforms/Instrumentation/Instrumentation.cpp stable/9/contrib/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp stable/9/contrib/llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp stable/9/contrib/llvm/lib/Transforms/ObjCARC/DependencyAnalysis.h stable/9/contrib/llvm/lib/Transforms/ObjCARC/ObjCARC.h stable/9/contrib/llvm/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.cpp stable/9/contrib/llvm/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.h stable/9/contrib/llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp stable/9/contrib/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp stable/9/contrib/llvm/lib/Transforms/ObjCARC/ObjCARCUtil.cpp stable/9/contrib/llvm/lib/Transforms/ObjCARC/ProvenanceAnalysis.h stable/9/contrib/llvm/lib/Transforms/Scalar/ADCE.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/EarlyCSE.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/GVN.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/GlobalMerge.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/JumpThreading.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/LoopDeletion.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/Reassociate.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/SCCP.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/SROA.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/Scalar.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp stable/9/contrib/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp stable/9/contrib/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp stable/9/contrib/llvm/lib/Transforms/Utils/CloneFunction.cpp stable/9/contrib/llvm/lib/Transforms/Utils/CodeExtractor.cpp stable/9/contrib/llvm/lib/Transforms/Utils/DemoteRegToStack.cpp stable/9/contrib/llvm/lib/Transforms/Utils/InlineFunction.cpp stable/9/contrib/llvm/lib/Transforms/Utils/LCSSA.cpp stable/9/contrib/llvm/lib/Transforms/Utils/Local.cpp stable/9/contrib/llvm/lib/Transforms/Utils/LoopSimplify.cpp stable/9/contrib/llvm/lib/Transforms/Utils/LoopUnroll.cpp stable/9/contrib/llvm/lib/Transforms/Utils/LowerExpectIntrinsic.cpp stable/9/contrib/llvm/lib/Transforms/Utils/LowerInvoke.cpp stable/9/contrib/llvm/lib/Transforms/Utils/LowerSwitch.cpp stable/9/contrib/llvm/lib/Transforms/Utils/MetaRenamer.cpp stable/9/contrib/llvm/lib/Transforms/Utils/ModuleUtils.cpp stable/9/contrib/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp stable/9/contrib/llvm/lib/Transforms/Utils/SSAUpdater.cpp stable/9/contrib/llvm/lib/Transforms/Utils/SimplifyCFG.cpp stable/9/contrib/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp stable/9/contrib/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp stable/9/contrib/llvm/lib/Transforms/Utils/ValueMapper.cpp stable/9/contrib/llvm/lib/Transforms/Vectorize/BBVectorize.cpp stable/9/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp stable/9/contrib/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp stable/9/contrib/llvm/tools/bugpoint/BugDriver.cpp stable/9/contrib/llvm/tools/bugpoint/BugDriver.h stable/9/contrib/llvm/tools/bugpoint/CrashDebugger.cpp stable/9/contrib/llvm/tools/bugpoint/ExecutionDriver.cpp stable/9/contrib/llvm/tools/bugpoint/ExtractFunction.cpp stable/9/contrib/llvm/tools/bugpoint/FindBugs.cpp stable/9/contrib/llvm/tools/bugpoint/Miscompilation.cpp stable/9/contrib/llvm/tools/bugpoint/OptimizerDriver.cpp stable/9/contrib/llvm/tools/bugpoint/ToolRunner.cpp stable/9/contrib/llvm/tools/bugpoint/ToolRunner.h stable/9/contrib/llvm/tools/bugpoint/bugpoint.cpp stable/9/contrib/llvm/tools/clang/include/clang-c/CXCompilationDatabase.h stable/9/contrib/llvm/tools/clang/include/clang-c/CXString.h stable/9/contrib/llvm/tools/clang/include/clang-c/Index.h stable/9/contrib/llvm/tools/clang/include/clang/ARCMigrate/ARCMT.h stable/9/contrib/llvm/tools/clang/include/clang/ARCMigrate/ARCMTActions.h stable/9/contrib/llvm/tools/clang/include/clang/ARCMigrate/FileRemapper.h stable/9/contrib/llvm/tools/clang/include/clang/AST/APValue.h stable/9/contrib/llvm/tools/clang/include/clang/AST/ASTConsumer.h stable/9/contrib/llvm/tools/clang/include/clang/AST/ASTContext.h stable/9/contrib/llvm/tools/clang/include/clang/AST/ASTDiagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/AST/ASTImporter.h stable/9/contrib/llvm/tools/clang/include/clang/AST/ASTMutationListener.h stable/9/contrib/llvm/tools/clang/include/clang/AST/ASTTypeTraits.h stable/9/contrib/llvm/tools/clang/include/clang/AST/ASTUnresolvedSet.h stable/9/contrib/llvm/tools/clang/include/clang/AST/ASTVector.h stable/9/contrib/llvm/tools/clang/include/clang/AST/Attr.h stable/9/contrib/llvm/tools/clang/include/clang/AST/CXXInheritance.h stable/9/contrib/llvm/tools/clang/include/clang/AST/CanonicalType.h stable/9/contrib/llvm/tools/clang/include/clang/AST/CharUnits.h stable/9/contrib/llvm/tools/clang/include/clang/AST/Comment.h stable/9/contrib/llvm/tools/clang/include/clang/AST/CommentCommandTraits.h stable/9/contrib/llvm/tools/clang/include/clang/AST/CommentCommands.td stable/9/contrib/llvm/tools/clang/include/clang/AST/CommentDiagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/AST/CommentParser.h stable/9/contrib/llvm/tools/clang/include/clang/AST/CommentSema.h stable/9/contrib/llvm/tools/clang/include/clang/AST/Decl.h stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclAccessPair.h stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclBase.h stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclCXX.h stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclContextInternals.h stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclFriend.h stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclLookups.h stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclObjC.h stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclOpenMP.h stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclTemplate.h stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclarationName.h stable/9/contrib/llvm/tools/clang/include/clang/AST/EvaluatedExprVisitor.h stable/9/contrib/llvm/tools/clang/include/clang/AST/Expr.h stable/9/contrib/llvm/tools/clang/include/clang/AST/ExprCXX.h stable/9/contrib/llvm/tools/clang/include/clang/AST/ExprObjC.h stable/9/contrib/llvm/tools/clang/include/clang/AST/ExternalASTSource.h stable/9/contrib/llvm/tools/clang/include/clang/AST/GlobalDecl.h stable/9/contrib/llvm/tools/clang/include/clang/AST/Mangle.h stable/9/contrib/llvm/tools/clang/include/clang/AST/NestedNameSpecifier.h stable/9/contrib/llvm/tools/clang/include/clang/AST/ParentMap.h stable/9/contrib/llvm/tools/clang/include/clang/AST/PrettyPrinter.h stable/9/contrib/llvm/tools/clang/include/clang/AST/RawCommentList.h stable/9/contrib/llvm/tools/clang/include/clang/AST/RecordLayout.h stable/9/contrib/llvm/tools/clang/include/clang/AST/RecursiveASTVisitor.h stable/9/contrib/llvm/tools/clang/include/clang/AST/Redeclarable.h stable/9/contrib/llvm/tools/clang/include/clang/AST/Stmt.h stable/9/contrib/llvm/tools/clang/include/clang/AST/StmtCXX.h stable/9/contrib/llvm/tools/clang/include/clang/AST/StmtIterator.h stable/9/contrib/llvm/tools/clang/include/clang/AST/StmtObjC.h stable/9/contrib/llvm/tools/clang/include/clang/AST/StmtVisitor.h stable/9/contrib/llvm/tools/clang/include/clang/AST/TemplateBase.h stable/9/contrib/llvm/tools/clang/include/clang/AST/Type.h stable/9/contrib/llvm/tools/clang/include/clang/AST/TypeLoc.h stable/9/contrib/llvm/tools/clang/include/clang/AST/TypeNodes.def stable/9/contrib/llvm/tools/clang/include/clang/AST/TypeOrdering.h stable/9/contrib/llvm/tools/clang/include/clang/AST/TypeVisitor.h stable/9/contrib/llvm/tools/clang/include/clang/AST/UnresolvedSet.h stable/9/contrib/llvm/tools/clang/include/clang/AST/VTTBuilder.h stable/9/contrib/llvm/tools/clang/include/clang/AST/VTableBuilder.h stable/9/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchFinder.h stable/9/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchers.h stable/9/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchersInternal.h stable/9/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchersMacros.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/FormatString.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ThreadSafety.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/UninitializedValues.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/AnalysisContext.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/AnalysisDiagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/CFG.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/CallGraph.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/FlowSensitive/DataflowSolver.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/ABI.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/Attr.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/AttrKinds.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def stable/9/contrib/llvm/tools/clang/include/clang/Basic/Builtins.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsAArch64.def stable/9/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsARM.def stable/9/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsMips.def stable/9/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsNVPTX.def stable/9/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsX86.def stable/9/contrib/llvm/tools/clang/include/clang/Basic/CapturedStmt.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/DeclNodes.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/Diagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/Diagnostic.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticASTKinds.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticCommentKinds.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticCommonKinds.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticDriverKinds.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticFrontendKinds.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticGroups.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticIDs.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticLexKinds.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticOptions.def stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticParseKinds.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSerializationKinds.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/FileManager.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/FileSystemStatCache.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/IdentifierTable.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/Lambda.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/LangOptions.def stable/9/contrib/llvm/tools/clang/include/clang/Basic/LangOptions.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/Linkage.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/Module.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/ObjCRuntime.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/OpenMPKinds.def stable/9/contrib/llvm/tools/clang/include/clang/Basic/OpenMPKinds.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/OperatorKinds.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/PartialDiagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/Sanitizers.def stable/9/contrib/llvm/tools/clang/include/clang/Basic/SourceLocation.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/SourceManager.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/Specifiers.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/StmtNodes.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/TargetBuiltins.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/TargetCXXABI.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/TargetInfo.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/TargetOptions.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/TemplateKinds.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/TokenKinds.def stable/9/contrib/llvm/tools/clang/include/clang/Basic/TypeTraits.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/Visibility.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/arm_neon.td stable/9/contrib/llvm/tools/clang/include/clang/Driver/Action.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/CC1AsOptions.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/CC1AsOptions.td stable/9/contrib/llvm/tools/clang/include/clang/Driver/CC1Options.td stable/9/contrib/llvm/tools/clang/include/clang/Driver/Compilation.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/Driver.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/DriverDiagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/Job.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/Options.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/Options.td stable/9/contrib/llvm/tools/clang/include/clang/Driver/Tool.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/ToolChain.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/Types.def stable/9/contrib/llvm/tools/clang/include/clang/Driver/Types.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/Util.h stable/9/contrib/llvm/tools/clang/include/clang/Edit/Commit.h stable/9/contrib/llvm/tools/clang/include/clang/Edit/EditedSource.h stable/9/contrib/llvm/tools/clang/include/clang/Edit/Rewriters.h stable/9/contrib/llvm/tools/clang/include/clang/Format/Format.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/ASTConsumers.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/ASTUnit.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.def stable/9/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/CompilerInstance.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/CompilerInvocation.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/DependencyOutputOptions.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/FrontendAction.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/FrontendActions.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/FrontendDiagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/FrontendOptions.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/TextDiagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/Utils.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/DirectoryLookup.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/HeaderSearch.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/HeaderSearchOptions.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/LexDiagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/Lexer.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/LiteralSupport.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/MacroInfo.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/ModuleLoader.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/ModuleMap.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/MultipleIncludeOpt.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/PPCallbacks.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/PPConditionalDirectiveRecord.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/PTHLexer.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/PreprocessingRecord.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/Preprocessor.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/PreprocessorLexer.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/Token.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/TokenLexer.h stable/9/contrib/llvm/tools/clang/include/clang/Parse/ParseDiagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/Parse/Parser.h stable/9/contrib/llvm/tools/clang/include/clang/Rewrite/Core/HTMLRewrite.h stable/9/contrib/llvm/tools/clang/include/clang/Rewrite/Core/Rewriter.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/AnalysisBasedWarnings.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/AttributeList.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/CodeCompleteConsumer.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/DeclSpec.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/DelayedDiagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/ExternalSemaSource.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/IdentifierResolver.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/Initialization.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/Lookup.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/MultiplexExternalSemaSource.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/Overload.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/Ownership.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/Scope.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/ScopeInfo.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/Sema.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/SemaDiagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/SemaInternal.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/Template.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/TemplateDeduction.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/TypoCorrection.h stable/9/contrib/llvm/tools/clang/include/clang/Serialization/ASTBitCodes.h stable/9/contrib/llvm/tools/clang/include/clang/Serialization/ASTReader.h stable/9/contrib/llvm/tools/clang/include/clang/Serialization/ASTWriter.h stable/9/contrib/llvm/tools/clang/include/clang/Serialization/GlobalModuleIndex.h stable/9/contrib/llvm/tools/clang/include/clang/Serialization/ModuleManager.h stable/9/contrib/llvm/tools/clang/include/clang/Serialization/SerializationDiagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/Analyses.def stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/Checker.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerRegistry.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathDiagnosticConsumers.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h stable/9/contrib/llvm/tools/clang/include/clang/Tooling/ArgumentsAdjusters.h stable/9/contrib/llvm/tools/clang/include/clang/Tooling/CommonOptionsParser.h stable/9/contrib/llvm/tools/clang/include/clang/Tooling/CompilationDatabase.h stable/9/contrib/llvm/tools/clang/include/clang/Tooling/Refactoring.h stable/9/contrib/llvm/tools/clang/include/clang/Tooling/Tooling.h stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/ARCMT.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/FileRemapper.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/ObjCMT.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/Transforms.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/Transforms.h stable/9/contrib/llvm/tools/clang/lib/AST/APValue.cpp stable/9/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp stable/9/contrib/llvm/tools/clang/lib/AST/ASTDiagnostic.cpp stable/9/contrib/llvm/tools/clang/lib/AST/ASTDumper.cpp stable/9/contrib/llvm/tools/clang/lib/AST/ASTImporter.cpp stable/9/contrib/llvm/tools/clang/lib/AST/AttrImpl.cpp stable/9/contrib/llvm/tools/clang/lib/AST/CXXABI.h stable/9/contrib/llvm/tools/clang/lib/AST/CXXInheritance.cpp stable/9/contrib/llvm/tools/clang/lib/AST/Comment.cpp stable/9/contrib/llvm/tools/clang/lib/AST/CommentCommandTraits.cpp stable/9/contrib/llvm/tools/clang/lib/AST/CommentLexer.cpp stable/9/contrib/llvm/tools/clang/lib/AST/CommentParser.cpp stable/9/contrib/llvm/tools/clang/lib/AST/CommentSema.cpp stable/9/contrib/llvm/tools/clang/lib/AST/Decl.cpp stable/9/contrib/llvm/tools/clang/lib/AST/DeclBase.cpp stable/9/contrib/llvm/tools/clang/lib/AST/DeclCXX.cpp stable/9/contrib/llvm/tools/clang/lib/AST/DeclFriend.cpp stable/9/contrib/llvm/tools/clang/lib/AST/DeclObjC.cpp stable/9/contrib/llvm/tools/clang/lib/AST/DeclOpenMP.cpp stable/9/contrib/llvm/tools/clang/lib/AST/DeclPrinter.cpp stable/9/contrib/llvm/tools/clang/lib/AST/DeclTemplate.cpp stable/9/contrib/llvm/tools/clang/lib/AST/DeclarationName.cpp stable/9/contrib/llvm/tools/clang/lib/AST/Expr.cpp stable/9/contrib/llvm/tools/clang/lib/AST/ExprCXX.cpp stable/9/contrib/llvm/tools/clang/lib/AST/ExprClassification.cpp stable/9/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp stable/9/contrib/llvm/tools/clang/lib/AST/InheritViz.cpp stable/9/contrib/llvm/tools/clang/lib/AST/ItaniumCXXABI.cpp stable/9/contrib/llvm/tools/clang/lib/AST/ItaniumMangle.cpp stable/9/contrib/llvm/tools/clang/lib/AST/Mangle.cpp stable/9/contrib/llvm/tools/clang/lib/AST/MicrosoftCXXABI.cpp stable/9/contrib/llvm/tools/clang/lib/AST/MicrosoftMangle.cpp stable/9/contrib/llvm/tools/clang/lib/AST/NestedNameSpecifier.cpp stable/9/contrib/llvm/tools/clang/lib/AST/ParentMap.cpp stable/9/contrib/llvm/tools/clang/lib/AST/RawCommentList.cpp stable/9/contrib/llvm/tools/clang/lib/AST/RecordLayout.cpp stable/9/contrib/llvm/tools/clang/lib/AST/RecordLayoutBuilder.cpp stable/9/contrib/llvm/tools/clang/lib/AST/Stmt.cpp stable/9/contrib/llvm/tools/clang/lib/AST/StmtIterator.cpp stable/9/contrib/llvm/tools/clang/lib/AST/StmtPrinter.cpp stable/9/contrib/llvm/tools/clang/lib/AST/StmtProfile.cpp stable/9/contrib/llvm/tools/clang/lib/AST/TemplateBase.cpp stable/9/contrib/llvm/tools/clang/lib/AST/Type.cpp stable/9/contrib/llvm/tools/clang/lib/AST/TypeLoc.cpp stable/9/contrib/llvm/tools/clang/lib/AST/TypePrinter.cpp stable/9/contrib/llvm/tools/clang/lib/AST/VTableBuilder.cpp stable/9/contrib/llvm/tools/clang/lib/ASTMatchers/ASTMatchFinder.cpp stable/9/contrib/llvm/tools/clang/lib/ASTMatchers/ASTMatchersInternal.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/AnalysisDeclContext.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/CFG.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/CFGReachabilityAnalysis.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/FormatString.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/LiveVariables.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/PrintfFormatString.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/ReachableCode.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/ScanfFormatString.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/ThreadSafety.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/UninitializedValues.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/Builtins.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/DiagnosticIDs.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/FileManager.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/FileSystemStatCache.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/IdentifierTable.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/Module.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/ObjCRuntime.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/OpenMPKinds.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/OperatorPrecedence.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/SourceManager.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/TargetInfo.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/Targets.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/Version.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/ABIInfo.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGAtomic.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGBlocks.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGBuiltin.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGCUDARuntime.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGCXX.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGCXXABI.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGCXXABI.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGCall.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGCall.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGClass.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGCleanup.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGCleanup.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDecl.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGException.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGExpr.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGExprAgg.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGExprCXX.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGExprComplex.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGExprConstant.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGExprScalar.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGObjC.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGObjCMac.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGObjCRuntime.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGRTTI.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGStmt.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGVTT.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGValue.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTBAA.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTBAA.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTypes.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTypes.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/ItaniumCXXABI.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/MicrosoftCXXABI.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/ModuleBuilder.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.h stable/9/contrib/llvm/tools/clang/lib/Driver/Action.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/CC1AsOptions.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/Compilation.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/Driver.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/DriverOptions.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/InputInfo.h stable/9/contrib/llvm/tools/clang/lib/Driver/Job.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/ToolChains.h stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.h stable/9/contrib/llvm/tools/clang/lib/Driver/Types.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/WindowsToolChain.cpp stable/9/contrib/llvm/tools/clang/lib/Edit/Commit.cpp stable/9/contrib/llvm/tools/clang/lib/Format/BreakableToken.cpp stable/9/contrib/llvm/tools/clang/lib/Format/BreakableToken.h stable/9/contrib/llvm/tools/clang/lib/Format/Format.cpp stable/9/contrib/llvm/tools/clang/lib/Format/TokenAnnotator.cpp stable/9/contrib/llvm/tools/clang/lib/Format/TokenAnnotator.h stable/9/contrib/llvm/tools/clang/lib/Format/UnwrappedLineParser.cpp stable/9/contrib/llvm/tools/clang/lib/Format/UnwrappedLineParser.h stable/9/contrib/llvm/tools/clang/lib/Format/WhitespaceManager.cpp stable/9/contrib/llvm/tools/clang/lib/Format/WhitespaceManager.h stable/9/contrib/llvm/tools/clang/lib/Frontend/ASTConsumers.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/ASTUnit.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/CacheTokens.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/ChainedIncludesSource.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/DependencyFile.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/FrontendAction.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/FrontendActions.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/FrontendOptions.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/HeaderIncludeGen.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/InitHeaderSearch.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/InitPreprocessor.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/MultiplexConsumer.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/PrintPreprocessedOutput.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/TextDiagnostic.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/TextDiagnosticPrinter.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp stable/9/contrib/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp stable/9/contrib/llvm/tools/clang/lib/Headers/avx2intrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/avxintrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/emmintrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/f16cintrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/immintrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/limits.h stable/9/contrib/llvm/tools/clang/lib/Headers/module.map stable/9/contrib/llvm/tools/clang/lib/Headers/prfchwintrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/rdseedintrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/rtmintrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/smmintrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/tgmath.h stable/9/contrib/llvm/tools/clang/lib/Headers/unwind.h stable/9/contrib/llvm/tools/clang/lib/Headers/x86intrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/xmmintrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/xopintrin.h stable/9/contrib/llvm/tools/clang/lib/Lex/HeaderMap.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/HeaderSearch.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/Lexer.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/LiteralSupport.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/ModuleMap.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/PPConditionalDirectiveRecord.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/PPDirectives.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/PPExpressions.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/PPLexerChange.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/PPMacroExpansion.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/PTHLexer.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/Pragma.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/PreprocessingRecord.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/Preprocessor.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/PreprocessorLexer.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/TokenLexer.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/UnicodeCharSets.h stable/9/contrib/llvm/tools/clang/lib/Parse/ParseAST.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParseCXXInlineMethods.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParseDecl.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParseExpr.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParseExprCXX.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParseInit.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParseObjc.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParseOpenMP.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParsePragma.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParsePragma.h stable/9/contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParseTemplate.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParseTentative.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/Parser.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/RAIIObjectsForParser.h stable/9/contrib/llvm/tools/clang/lib/Rewrite/Core/HTMLRewrite.cpp stable/9/contrib/llvm/tools/clang/lib/Rewrite/Core/Rewriter.cpp stable/9/contrib/llvm/tools/clang/lib/Rewrite/Frontend/FixItRewriter.cpp stable/9/contrib/llvm/tools/clang/lib/Rewrite/Frontend/FrontendActions.cpp stable/9/contrib/llvm/tools/clang/lib/Rewrite/Frontend/InclusionRewriter.cpp stable/9/contrib/llvm/tools/clang/lib/Rewrite/Frontend/RewriteMacros.cpp stable/9/contrib/llvm/tools/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp stable/9/contrib/llvm/tools/clang/lib/Rewrite/Frontend/RewriteObjC.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/AnalysisBasedWarnings.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/AttributeList.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/DeclSpec.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/IdentifierResolver.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/JumpDiagnostics.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/MultiplexExternalSemaSource.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/ScopeInfo.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/Sema.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaAccess.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaAttr.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaCXXScopeSpec.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaCast.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaDeclAttr.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaDeclObjC.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaExceptionSpec.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaExpr.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaExprCXX.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaExprMember.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaExprObjC.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaFixItUtils.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaLambda.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaLookup.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaObjCProperty.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaOpenMP.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaOverload.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaPseudoObject.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaStmt.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaStmtAsm.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaTemplateDeduction.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaTemplateVariadic.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaType.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/TargetAttributesSema.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h stable/9/contrib/llvm/tools/clang/lib/Sema/TypeLocBuilder.h stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTCommon.cpp stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTCommon.h stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReader.cpp stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReaderStmt.cpp stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTWriter.cpp stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTWriterDecl.cpp stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTWriterStmt.cpp stable/9/contrib/llvm/tools/clang/lib/Serialization/GeneratePCH.cpp stable/9/contrib/llvm/tools/clang/lib/Serialization/GlobalModuleIndex.cpp stable/9/contrib/llvm/tools/clang/lib/Serialization/ModuleManager.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckerDocumentation.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/Checkers.td stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ClangSACheckers.h stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCContainersASTChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BugReporter.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CallEvent.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerContext.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/MemRegion.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ProgramState.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/RegionStore.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.h stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/Store.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SymbolManager.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp stable/9/contrib/llvm/tools/clang/lib/Tooling/ArgumentsAdjusters.cpp stable/9/contrib/llvm/tools/clang/lib/Tooling/CommonOptionsParser.cpp stable/9/contrib/llvm/tools/clang/lib/Tooling/CompilationDatabase.cpp stable/9/contrib/llvm/tools/clang/lib/Tooling/FileMatchTrie.cpp stable/9/contrib/llvm/tools/clang/lib/Tooling/JSONCompilationDatabase.cpp stable/9/contrib/llvm/tools/clang/lib/Tooling/Refactoring.cpp stable/9/contrib/llvm/tools/clang/lib/Tooling/Tooling.cpp stable/9/contrib/llvm/tools/clang/tools/driver/cc1_main.cpp stable/9/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp stable/9/contrib/llvm/tools/clang/tools/driver/driver.cpp stable/9/contrib/llvm/tools/clang/utils/TableGen/ClangAttrEmitter.cpp stable/9/contrib/llvm/tools/clang/utils/TableGen/ClangCommentCommandInfoEmitter.cpp stable/9/contrib/llvm/tools/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp stable/9/contrib/llvm/tools/clang/utils/TableGen/NeonEmitter.cpp stable/9/contrib/llvm/tools/clang/utils/TableGen/TableGen.cpp stable/9/contrib/llvm/tools/clang/utils/TableGen/TableGenBackends.h stable/9/contrib/llvm/tools/llc/llc.cpp stable/9/contrib/llvm/tools/lli/RemoteTarget.cpp stable/9/contrib/llvm/tools/lli/RemoteTarget.h stable/9/contrib/llvm/tools/lli/lli.cpp stable/9/contrib/llvm/tools/llvm-ar/llvm-ar.cpp stable/9/contrib/llvm/tools/llvm-as/llvm-as.cpp stable/9/contrib/llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp stable/9/contrib/llvm/tools/llvm-diff/DifferenceEngine.cpp stable/9/contrib/llvm/tools/llvm-diff/llvm-diff.cpp stable/9/contrib/llvm/tools/llvm-dis/llvm-dis.cpp stable/9/contrib/llvm/tools/llvm-extract/llvm-extract.cpp stable/9/contrib/llvm/tools/llvm-link/llvm-link.cpp stable/9/contrib/llvm/tools/llvm-mc/Disassembler.cpp stable/9/contrib/llvm/tools/llvm-mc/llvm-mc.cpp stable/9/contrib/llvm/tools/llvm-nm/llvm-nm.cpp stable/9/contrib/llvm/tools/llvm-objdump/COFFDump.cpp stable/9/contrib/llvm/tools/llvm-objdump/ELFDump.cpp stable/9/contrib/llvm/tools/llvm-objdump/MachODump.cpp stable/9/contrib/llvm/tools/llvm-objdump/llvm-objdump.cpp stable/9/contrib/llvm/tools/llvm-objdump/llvm-objdump.h stable/9/contrib/llvm/tools/llvm-readobj/COFFDumper.cpp stable/9/contrib/llvm/tools/llvm-readobj/ELFDumper.cpp stable/9/contrib/llvm/tools/llvm-readobj/MachODumper.cpp stable/9/contrib/llvm/tools/llvm-readobj/llvm-readobj.cpp stable/9/contrib/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp stable/9/contrib/llvm/tools/llvm-stress/llvm-stress.cpp stable/9/contrib/llvm/tools/llvm-symbolizer/LLVMSymbolize.cpp stable/9/contrib/llvm/tools/llvm-symbolizer/LLVMSymbolize.h stable/9/contrib/llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp stable/9/contrib/llvm/tools/macho-dump/macho-dump.cpp stable/9/contrib/llvm/tools/opt/opt.cpp stable/9/contrib/llvm/utils/TableGen/AsmMatcherEmitter.cpp stable/9/contrib/llvm/utils/TableGen/AsmWriterEmitter.cpp stable/9/contrib/llvm/utils/TableGen/AsmWriterInst.cpp stable/9/contrib/llvm/utils/TableGen/CodeGenDAGPatterns.cpp stable/9/contrib/llvm/utils/TableGen/CodeGenDAGPatterns.h stable/9/contrib/llvm/utils/TableGen/CodeGenInstruction.cpp stable/9/contrib/llvm/utils/TableGen/CodeGenInstruction.h stable/9/contrib/llvm/utils/TableGen/CodeGenIntrinsics.h stable/9/contrib/llvm/utils/TableGen/CodeGenMapTable.cpp stable/9/contrib/llvm/utils/TableGen/CodeGenRegisters.cpp stable/9/contrib/llvm/utils/TableGen/CodeGenRegisters.h stable/9/contrib/llvm/utils/TableGen/CodeGenSchedule.cpp stable/9/contrib/llvm/utils/TableGen/CodeGenSchedule.h stable/9/contrib/llvm/utils/TableGen/CodeGenTarget.cpp stable/9/contrib/llvm/utils/TableGen/DAGISelEmitter.cpp stable/9/contrib/llvm/utils/TableGen/DAGISelMatcher.cpp stable/9/contrib/llvm/utils/TableGen/DAGISelMatcher.h stable/9/contrib/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp stable/9/contrib/llvm/utils/TableGen/DAGISelMatcherOpt.cpp stable/9/contrib/llvm/utils/TableGen/FastISelEmitter.cpp stable/9/contrib/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp stable/9/contrib/llvm/utils/TableGen/InstrInfoEmitter.cpp stable/9/contrib/llvm/utils/TableGen/IntrinsicEmitter.cpp stable/9/contrib/llvm/utils/TableGen/OptParserEmitter.cpp stable/9/contrib/llvm/utils/TableGen/RegisterInfoEmitter.cpp stable/9/contrib/llvm/utils/TableGen/SequenceToOffsetTable.h stable/9/contrib/llvm/utils/TableGen/SetTheory.cpp stable/9/contrib/llvm/utils/TableGen/SubtargetEmitter.cpp stable/9/contrib/llvm/utils/TableGen/TGValueTypes.cpp stable/9/contrib/llvm/utils/TableGen/X86DisassemblerTables.cpp stable/9/contrib/llvm/utils/TableGen/X86DisassemblerTables.h stable/9/contrib/llvm/utils/TableGen/X86RecognizableInstr.cpp stable/9/contrib/llvm/utils/TableGen/X86RecognizableInstr.h stable/9/etc/mtree/BSD.include.dist stable/9/lib/clang/Makefile stable/9/lib/clang/clang.build.mk stable/9/lib/clang/include/Makefile stable/9/lib/clang/include/clang/Basic/Version.inc stable/9/lib/clang/include/llvm/Config/config.h stable/9/lib/clang/include/llvm/Config/llvm-config.h stable/9/lib/clang/libclanganalysis/Makefile stable/9/lib/clang/libclangast/Makefile stable/9/lib/clang/libclangcodegen/Makefile stable/9/lib/clang/libclangdriver/Makefile stable/9/lib/clang/libclangparse/Makefile stable/9/lib/clang/libclangsema/Makefile stable/9/lib/clang/libclangstaticanalyzercheckers/Makefile stable/9/lib/clang/libclangstaticanalyzercore/Makefile stable/9/lib/clang/libllvmanalysis/Makefile stable/9/lib/clang/libllvmarmdesc/Makefile stable/9/lib/clang/libllvmasmprinter/Makefile stable/9/lib/clang/libllvmcodegen/Makefile stable/9/lib/clang/libllvmcore/Makefile stable/9/lib/clang/libllvmdebuginfo/Makefile stable/9/lib/clang/libllvmexecutionengine/Makefile stable/9/lib/clang/libllvminstrumentation/Makefile stable/9/lib/clang/libllvmjit/Makefile stable/9/lib/clang/libllvmmc/Makefile stable/9/lib/clang/libllvmmipscodegen/Makefile stable/9/lib/clang/libllvmmipsdesc/Makefile stable/9/lib/clang/libllvmobject/Makefile stable/9/lib/clang/libllvmpowerpccodegen/Makefile stable/9/lib/clang/libllvmpowerpcdesc/Makefile stable/9/lib/clang/libllvmscalaropts/Makefile stable/9/lib/clang/libllvmsupport/Makefile stable/9/lib/clang/libllvmtransformutils/Makefile stable/9/lib/clang/libllvmvectorize/Makefile stable/9/lib/clang/libllvmx86desc/Makefile stable/9/share/mk/bsd.sys.mk (contents, props changed) stable/9/sys/amd64/conf/GENERIC stable/9/sys/conf/kern.mk stable/9/sys/i386/conf/GENERIC stable/9/sys/i386/conf/XEN stable/9/sys/sys/param.h stable/9/tools/build/mk/OptionalObsoleteFiles.inc stable/9/usr.bin/clang/Makefile stable/9/usr.bin/clang/bugpoint/bugpoint.1 stable/9/usr.bin/clang/clang-tblgen/Makefile stable/9/usr.bin/clang/clang.prog.mk stable/9/usr.bin/clang/clang/Makefile stable/9/usr.bin/clang/clang/clang.1 stable/9/usr.bin/clang/llc/Makefile stable/9/usr.bin/clang/llc/llc.1 stable/9/usr.bin/clang/lli/Makefile stable/9/usr.bin/clang/lli/lli.1 stable/9/usr.bin/clang/llvm-ar/Makefile stable/9/usr.bin/clang/llvm-ar/llvm-ar.1 stable/9/usr.bin/clang/llvm-as/llvm-as.1 stable/9/usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1 stable/9/usr.bin/clang/llvm-diff/llvm-diff.1 stable/9/usr.bin/clang/llvm-dis/llvm-dis.1 stable/9/usr.bin/clang/llvm-extract/llvm-extract.1 stable/9/usr.bin/clang/llvm-link/llvm-link.1 stable/9/usr.bin/clang/llvm-mc/Makefile stable/9/usr.bin/clang/llvm-nm/Makefile stable/9/usr.bin/clang/llvm-nm/llvm-nm.1 stable/9/usr.bin/clang/llvm-objdump/Makefile stable/9/usr.bin/clang/llvm-rtdyld/Makefile stable/9/usr.bin/clang/opt/Makefile stable/9/usr.bin/clang/opt/opt.1 stable/9/usr.bin/clang/tblgen/tblgen.1 Directory Properties: stable/9/contrib/gcc/ (props changed) stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) stable/9/etc/ (props changed) stable/9/lib/clang/ (props changed) stable/9/share/mk/ (props changed) stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/sys/ (props changed) stable/9/tools/build/ (props changed) stable/9/usr.bin/clang/ (props changed) Modified: stable/9/ObsoleteFiles.inc ============================================================================== --- stable/9/ObsoleteFiles.inc Fri Mar 21 17:53:59 2014 (r263508) +++ stable/9/ObsoleteFiles.inc Fri Mar 21 17:56:32 2014 (r263509) @@ -38,6 +38,43 @@ # xargs -n1 | sort | uniq -d; # done +# 20140321: new clang import which bumps version from 3.3 to 3.4. +OLD_FILES+=usr/bin/llvm-prof +OLD_FILES+=usr/bin/llvm-ranlib +OLD_FILES+=usr/include/clang/3.3/__wmmintrin_aes.h +OLD_FILES+=usr/include/clang/3.3/__wmmintrin_pclmul.h +OLD_FILES+=usr/include/clang/3.3/altivec.h +OLD_FILES+=usr/include/clang/3.3/ammintrin.h +OLD_FILES+=usr/include/clang/3.3/avx2intrin.h +OLD_FILES+=usr/include/clang/3.3/avxintrin.h +OLD_FILES+=usr/include/clang/3.3/bmi2intrin.h +OLD_FILES+=usr/include/clang/3.3/bmiintrin.h +OLD_FILES+=usr/include/clang/3.3/cpuid.h +OLD_FILES+=usr/include/clang/3.3/emmintrin.h +OLD_FILES+=usr/include/clang/3.3/f16cintrin.h +OLD_FILES+=usr/include/clang/3.3/fma4intrin.h +OLD_FILES+=usr/include/clang/3.3/fmaintrin.h +OLD_FILES+=usr/include/clang/3.3/immintrin.h +OLD_FILES+=usr/include/clang/3.3/lzcntintrin.h +OLD_FILES+=usr/include/clang/3.3/mm3dnow.h +OLD_FILES+=usr/include/clang/3.3/mm_malloc.h +OLD_FILES+=usr/include/clang/3.3/mmintrin.h +OLD_FILES+=usr/include/clang/3.3/module.map +OLD_FILES+=usr/include/clang/3.3/nmmintrin.h +OLD_FILES+=usr/include/clang/3.3/pmmintrin.h +OLD_FILES+=usr/include/clang/3.3/popcntintrin.h +OLD_FILES+=usr/include/clang/3.3/prfchwintrin.h +OLD_FILES+=usr/include/clang/3.3/rdseedintrin.h +OLD_FILES+=usr/include/clang/3.3/rtmintrin.h +OLD_FILES+=usr/include/clang/3.3/smmintrin.h +OLD_FILES+=usr/include/clang/3.3/tmmintrin.h +OLD_FILES+=usr/include/clang/3.3/wmmintrin.h +OLD_FILES+=usr/include/clang/3.3/x86intrin.h +OLD_FILES+=usr/include/clang/3.3/xmmintrin.h +OLD_FILES+=usr/include/clang/3.3/xopintrin.h +OLD_FILES+=usr/share/man/man1/llvm-prof.1.gz +OLD_FILES+=usr/share/man/man1/llvm-ranlib.1.gz +OLD_DIRS+=usr/include/clang/3.3 # 20140314: libssh becomes private OLD_FILES+=usr/lib/libssh.a OLD_FILES+=usr/lib/libssh.so Modified: stable/9/UPDATING ============================================================================== --- stable/9/UPDATING Fri Mar 21 17:53:59 2014 (r263508) +++ stable/9/UPDATING Fri Mar 21 17:56:32 2014 (r263509) @@ -11,6 +11,9 @@ handbook: Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. +20140321: + Clang and llvm have been upgraded to 3.4 release. + 20140216: The nve(4) driver for NVIDIA nForce MCP Ethernet adapters has been deprecated and will not be part of FreeBSD 11.0 and later Modified: stable/9/contrib/gcc/libgcc2.c ============================================================================== --- stable/9/contrib/gcc/libgcc2.c Fri Mar 21 17:53:59 2014 (r263508) +++ stable/9/contrib/gcc/libgcc2.c Fri Mar 21 17:56:32 2014 (r263509) @@ -1983,8 +1983,8 @@ __eprintf (const char *string, const cha /* Clear part of an instruction cache. */ void -__clear_cache (char *beg __attribute__((__unused__)), - char *end __attribute__((__unused__))) +__clear_cache (void *beg __attribute__((__unused__)), + void *end __attribute__((__unused__))) { #ifdef CLEAR_INSN_CACHE CLEAR_INSN_CACHE (beg, end); Modified: stable/9/contrib/gcc/libgcc2.h ============================================================================== --- stable/9/contrib/gcc/libgcc2.h Fri Mar 21 17:53:59 2014 (r263508) +++ stable/9/contrib/gcc/libgcc2.h Fri Mar 21 17:56:32 2014 (r263509) @@ -35,7 +35,7 @@ Software Foundation, 51 Franklin Street, #endif extern int __gcc_bcmp (const unsigned char *, const unsigned char *, size_t); -extern void __clear_cache (char *, char *); +extern void __clear_cache (void *, void *); extern void __eprintf (const char *, const char *, unsigned int, const char *) __attribute__ ((__noreturn__)); Modified: stable/9/contrib/llvm/LICENSE.TXT ============================================================================== --- stable/9/contrib/llvm/LICENSE.TXT Fri Mar 21 17:53:59 2014 (r263508) +++ stable/9/contrib/llvm/LICENSE.TXT Fri Mar 21 17:56:32 2014 (r263509) @@ -68,3 +68,4 @@ Google Test llvm/utils/unittest/ OpenBSD regex llvm/lib/Support/{reg*, COPYRIGHT.regex} pyyaml tests llvm/test/YAMLParser/{*.data, LICENSE.TXT} ARM contributions llvm/lib/Target/ARM/LICENSE.TXT +md5 contributions llvm/lib/Support/MD5.cpp llvm/include/llvm/Support/MD5.h Modified: stable/9/contrib/llvm/include/llvm-c/BitReader.h ============================================================================== --- stable/9/contrib/llvm/include/llvm-c/BitReader.h Fri Mar 21 17:53:59 2014 (r263508) +++ stable/9/contrib/llvm/include/llvm-c/BitReader.h Fri Mar 21 17:56:32 2014 (r263509) @@ -34,7 +34,7 @@ extern "C" { /* Builds a module from the bitcode in the specified memory buffer, returning a reference to the module via the OutModule parameter. Returns 0 on success. - Optionally returns a human-readable error message via OutMessage. */ + Optionally returns a human-readable error message via OutMessage. */ LLVMBool LLVMParseBitcode(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutModule, char **OutMessage); @@ -44,7 +44,7 @@ LLVMBool LLVMParseBitcodeInContext(LLVMC /** Reads a module from the specified path, returning via the OutMP parameter a module provider which performs lazy deserialization. Returns 0 on success. - Optionally returns a human-readable error message via OutMessage. */ + Optionally returns a human-readable error message via OutMessage. */ LLVMBool LLVMGetBitcodeModuleInContext(LLVMContextRef ContextRef, LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM, Modified: stable/9/contrib/llvm/include/llvm-c/BitWriter.h ============================================================================== --- stable/9/contrib/llvm/include/llvm-c/BitWriter.h Fri Mar 21 17:53:59 2014 (r263508) +++ stable/9/contrib/llvm/include/llvm-c/BitWriter.h Fri Mar 21 17:56:32 2014 (r263509) @@ -34,7 +34,7 @@ extern "C" { /*===-- Operations on modules ---------------------------------------------===*/ -/** Writes a module to the specified path. Returns 0 on success. */ +/** Writes a module to the specified path. Returns 0 on success. */ int LLVMWriteBitcodeToFile(LLVMModuleRef M, const char *Path); /** Writes a module to an open file descriptor. Returns 0 on success. */ @@ -42,7 +42,7 @@ int LLVMWriteBitcodeToFD(LLVMModuleRef M int Unbuffered); /** Deprecated for LLVMWriteBitcodeToFD. Writes a module to an open file - descriptor. Returns 0 on success. Closes the Handle. */ + descriptor. Returns 0 on success. Closes the Handle. */ int LLVMWriteBitcodeToFileHandle(LLVMModuleRef M, int Handle); /** Modified: stable/9/contrib/llvm/include/llvm-c/Core.h ============================================================================== --- stable/9/contrib/llvm/include/llvm-c/Core.h Fri Mar 21 17:53:59 2014 (r263508) +++ stable/9/contrib/llvm/include/llvm-c/Core.h Fri Mar 21 17:56:32 2014 (r263509) @@ -165,7 +165,9 @@ typedef enum { a temporary measure until the API/ABI impact to the C API is understood and the path forward agreed upon. LLVMAddressSafety = 1ULL << 32, - LLVMStackProtectStrongAttribute = 1ULL<<33 + LLVMStackProtectStrongAttribute = 1ULL<<33, + LLVMCold = 1ULL << 34, + LLVMOptimizeNone = 1ULL << 35 */ } LLVMAttribute; @@ -220,6 +222,7 @@ typedef enum { LLVMPtrToInt = 39, LLVMIntToPtr = 40, LLVMBitCast = 41, + LLVMAddrSpaceCast = 60, /* Other Operators */ LLVMICmp = 42, @@ -272,7 +275,7 @@ typedef enum { LLVMLinkOnceAnyLinkage, /**< Keep one copy of function when linking (inline)*/ LLVMLinkOnceODRLinkage, /**< Same, but only replaced by something equivalent. */ - LLVMLinkOnceODRAutoHideLinkage, /**< Like LinkOnceODR, but possibly hidden. */ + LLVMLinkOnceODRAutoHideLinkage, /**< Obsolete */ LLVMWeakAnyLinkage, /**< Keep one copy of function when linking (weak) */ LLVMWeakODRLinkage, /**< Same, but only replaced by something equivalent. */ @@ -299,6 +302,8 @@ typedef enum { LLVMCCallConv = 0, LLVMFastCallConv = 8, LLVMColdCallConv = 9, + LLVMWebKitJSCallConv = 12, + LLVMAnyRegCallConv = 13, LLVMX86StdcallCallConv = 64, LLVMX86FastcallCallConv = 65 } LLVMCallConv; @@ -352,26 +357,26 @@ typedef enum { LLVMAtomicOrderingNotAtomic = 0, /**< A load or store which is not atomic */ LLVMAtomicOrderingUnordered = 1, /**< Lowest level of atomicity, guarantees somewhat sane results, lock free. */ - LLVMAtomicOrderingMonotonic = 2, /**< guarantees that if you take all the - operations affecting a specific address, + LLVMAtomicOrderingMonotonic = 2, /**< guarantees that if you take all the + operations affecting a specific address, a consistent ordering exists */ - LLVMAtomicOrderingAcquire = 4, /**< Acquire provides a barrier of the sort - necessary to acquire a lock to access other + LLVMAtomicOrderingAcquire = 4, /**< Acquire provides a barrier of the sort + necessary to acquire a lock to access other memory with normal loads and stores. */ - LLVMAtomicOrderingRelease = 5, /**< Release is similar to Acquire, but with - a barrier of the sort necessary to release + LLVMAtomicOrderingRelease = 5, /**< Release is similar to Acquire, but with + a barrier of the sort necessary to release a lock. */ - LLVMAtomicOrderingAcquireRelease = 6, /**< provides both an Acquire and a - Release barrier (for fences and + LLVMAtomicOrderingAcquireRelease = 6, /**< provides both an Acquire and a + Release barrier (for fences and operations which both read and write memory). */ - LLVMAtomicOrderingSequentiallyConsistent = 7 /**< provides Acquire semantics - for loads and Release - semantics for stores. - Additionally, it guarantees - that a total ordering exists - between all - SequentiallyConsistent + LLVMAtomicOrderingSequentiallyConsistent = 7 /**< provides Acquire semantics + for loads and Release + semantics for stores. + Additionally, it guarantees + that a total ordering exists + between all + SequentiallyConsistent operations. */ } LLVMAtomicOrdering; @@ -384,16 +389,16 @@ typedef enum { LLVMAtomicRMWBinOpOr, /**< OR a value and return the old one */ LLVMAtomicRMWBinOpXor, /**< Xor a value and return the old one */ LLVMAtomicRMWBinOpMax, /**< Sets the value if it's greater than the - original using a signed comparison and return + original using a signed comparison and return the old one */ LLVMAtomicRMWBinOpMin, /**< Sets the value if it's Smaller than the - original using a signed comparison and return + original using a signed comparison and return the old one */ LLVMAtomicRMWBinOpUMax, /**< Sets the value if it's greater than the - original using an unsigned comparison and return + original using an unsigned comparison and return the old one */ LLVMAtomicRMWBinOpUMin /**< Sets the value if it's greater than the - original using an unsigned comparison and return + original using an unsigned comparison and return the old one */ } LLVMAtomicRMWBinOp; @@ -406,13 +411,37 @@ void LLVMInitializeCore(LLVMPassRegistry /** Deallocate and destroy all ManagedStatic variables. @see llvm::llvm_shutdown @see ManagedStatic */ -void LLVMShutdown(); +void LLVMShutdown(void); /*===-- Error handling ----------------------------------------------------===*/ +char *LLVMCreateMessage(const char *Message); void LLVMDisposeMessage(char *Message); +typedef void (*LLVMFatalErrorHandler)(const char *Reason); + +/** + * Install a fatal error handler. By default, if LLVM detects a fatal error, it + * will call exit(1). This may not be appropriate in many contexts. For example, + * doing exit(1) will bypass many crash reporting/tracing system tools. This + * function allows you to install a callback that will be invoked prior to the + * call to exit(1). + */ +void LLVMInstallFatalErrorHandler(LLVMFatalErrorHandler Handler); + +/** + * Reset the fatal error handler. This resets LLVM's fatal error handling + * behavior to the default. + */ +void LLVMResetFatalErrorHandler(void); + +/** + * Enable LLVM's built-in stack trace code. This intercepts the OS's crash + * signals and prints which component of LLVM you were in at the time if the + * crash. + */ +void LLVMEnablePrettyStackTrace(void); /** * @defgroup LLVMCCoreContext Contexts @@ -458,7 +487,7 @@ unsigned LLVMGetMDKindID(const char* Nam /** * @defgroup LLVMCCoreModule Modules * - * Modules represent the top-level structure in a LLVM program. An LLVM + * Modules represent the top-level structure in an LLVM program. An LLVM * module is effectively a translation unit or a collection of * translation units merged together. * @@ -538,6 +567,14 @@ LLVMBool LLVMPrintModuleToFile(LLVMModul char **ErrorMessage); /** + * Return a string representation of the module. Use + * LLVMDisposeMessage to free the string. + * + * @see Module::print() + */ +char *LLVMPrintModuleToString(LLVMModuleRef M); + +/** * Set inline assembly for a module. * * @see Module::setModuleInlineAsm() @@ -689,6 +726,21 @@ LLVMBool LLVMTypeIsSized(LLVMTypeRef Ty) LLVMContextRef LLVMGetTypeContext(LLVMTypeRef Ty); /** + * Dump a representation of a type to stderr. + * + * @see llvm::Type::dump() + */ +void LLVMDumpType(LLVMTypeRef Val); + +/** + * Return a string representation of the type. Use + * LLVMDisposeMessage to free the string. + * + * @see llvm::Type::print() + */ +char *LLVMPrintTypeToString(LLVMTypeRef Val); + +/** * @defgroup LLVMCCoreTypeInt Integer Types * * Functions in this section operate on integer types. @@ -1039,7 +1091,7 @@ LLVMTypeRef LLVMX86MMXType(void); * hierarchy of classes within this type. Depending on the instance * obtained, not all APIs are available. * - * Callers can determine the type of a LLVMValueRef by calling the + * Callers can determine the type of an LLVMValueRef by calling the * LLVMIsA* family of functions (e.g. LLVMIsAArgument()). These * functions are defined by a macro, so it isn't obvious which are * available by looking at the Doxygen source code. Instead, look at the @@ -1061,6 +1113,9 @@ LLVMTypeRef LLVMX86MMXType(void); macro(BlockAddress) \ macro(ConstantAggregateZero) \ macro(ConstantArray) \ + macro(ConstantDataSequential) \ + macro(ConstantDataArray) \ + macro(ConstantDataVector) \ macro(ConstantExpr) \ macro(ConstantFP) \ macro(ConstantInt) \ @@ -1105,6 +1160,7 @@ LLVMTypeRef LLVMX86MMXType(void); macro(UnaryInstruction) \ macro(AllocaInst) \ macro(CastInst) \ + macro(AddrSpaceCastInst) \ macro(BitCastInst) \ macro(FPExtInst) \ macro(FPToSIInst) \ @@ -1160,6 +1216,14 @@ void LLVMSetValueName(LLVMValueRef Val, void LLVMDumpValue(LLVMValueRef Val); /** + * Return a string representation of the value. Use + * LLVMDisposeMessage to free the string. + * + * @see llvm::Value::print() + */ +char *LLVMPrintValueToString(LLVMValueRef Val); + +/** * Replace all uses of a value with another one. * * @see llvm::Value::replaceAllUsesWith() @@ -1179,7 +1243,7 @@ LLVMBool LLVMIsUndef(LLVMValueRef Val); /** * Convert value instances between types. * - * Internally, a LLVMValueRef is "pinned" to a specific type. This + * Internally, an LLVMValueRef is "pinned" to a specific type. This * series of functions allows you to cast an instance to a specific * type. * @@ -1201,7 +1265,7 @@ LLVM_FOR_EACH_VALUE_SUBCLASS(LLVM_DECLAR * This module defines functions that allow you to inspect the uses of a * LLVMValueRef. * - * It is possible to obtain a LLVMUseRef for any LLVMValueRef instance. + * It is possible to obtain an LLVMUseRef for any LLVMValueRef instance. * Each LLVMUseRef (which corresponds to a llvm::Use instance) holds a * llvm::User and llvm::Value. * @@ -1568,6 +1632,7 @@ LLVMValueRef LLVMConstFPToSI(LLVMValueRe LLVMValueRef LLVMConstPtrToInt(LLVMValueRef ConstantVal, LLVMTypeRef ToType); LLVMValueRef LLVMConstIntToPtr(LLVMValueRef ConstantVal, LLVMTypeRef ToType); LLVMValueRef LLVMConstBitCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType); +LLVMValueRef LLVMConstAddrSpaceCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType); LLVMValueRef LLVMConstZExtOrBitCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType); LLVMValueRef LLVMConstSExtOrBitCast(LLVMValueRef ConstantVal, @@ -1623,8 +1688,33 @@ const char *LLVMGetSection(LLVMValueRef void LLVMSetSection(LLVMValueRef Global, const char *Section); LLVMVisibility LLVMGetVisibility(LLVMValueRef Global); void LLVMSetVisibility(LLVMValueRef Global, LLVMVisibility Viz); -unsigned LLVMGetAlignment(LLVMValueRef Global); -void LLVMSetAlignment(LLVMValueRef Global, unsigned Bytes); + +/** + * @defgroup LLVMCCoreValueWithAlignment Values with alignment + * + * Functions in this group only apply to values with alignment, i.e. + * global variables, load and store instructions. + */ + +/** + * Obtain the preferred alignment of the value. + * @see llvm::LoadInst::getAlignment() + * @see llvm::StoreInst::getAlignment() + * @see llvm::GlobalValue::getAlignment() + */ +unsigned LLVMGetAlignment(LLVMValueRef V); + +/** + * Set the preferred alignment of the value. + * @see llvm::LoadInst::setAlignment() + * @see llvm::StoreInst::setAlignment() + * @see llvm::GlobalValue::setAlignment() + */ +void LLVMSetAlignment(LLVMValueRef V, unsigned Bytes); + +/** + * @} + */ /** * @defgroup LLVMCoreValueConstantGlobalVariable Global Variables @@ -1804,7 +1894,7 @@ LLVMValueRef LLVMGetParam(LLVMValueRef F /** * Obtain the function to which this argument belongs. * - * Unlike other functions in this group, this one takes a LLVMValueRef + * Unlike other functions in this group, this one takes an LLVMValueRef * that corresponds to a llvm::Attribute. * * The returned LLVMValueRef is the llvm::Function to which this @@ -1829,7 +1919,7 @@ LLVMValueRef LLVMGetLastParam(LLVMValueR /** * Obtain the next parameter to a function. * - * This takes a LLVMValueRef obtained from LLVMGetFirstParam() (which is + * This takes an LLVMValueRef obtained from LLVMGetFirstParam() (which is * actually a wrapped iterator) and obtains the next parameter from the * underlying iterator. */ @@ -1978,12 +2068,12 @@ void LLVMGetMDNodeOperands(LLVMValueRef LLVMValueRef LLVMBasicBlockAsValue(LLVMBasicBlockRef BB); /** - * Determine whether a LLVMValueRef is itself a basic block. + * Determine whether an LLVMValueRef is itself a basic block. */ LLVMBool LLVMValueIsBasicBlock(LLVMValueRef Val); /** - * Convert a LLVMValueRef to a LLVMBasicBlockRef instance. + * Convert an LLVMValueRef to an LLVMBasicBlockRef instance. */ LLVMBasicBlockRef LLVMValueAsBasicBlock(LLVMValueRef Val); @@ -2140,7 +2230,7 @@ LLVMValueRef LLVMGetFirstInstruction(LLV /** * Obtain the last instruction in a basic block. * - * The returned LLVMValueRef corresponds to a LLVM:Instruction. + * The returned LLVMValueRef corresponds to an LLVM:Instruction. */ LLVMValueRef LLVMGetLastInstruction(LLVMBasicBlockRef BB); @@ -2322,12 +2412,12 @@ void LLVMAddIncoming(LLVMValueRef PhiNod unsigned LLVMCountIncoming(LLVMValueRef PhiNode); /** - * Obtain an incoming value to a PHI node as a LLVMValueRef. + * Obtain an incoming value to a PHI node as an LLVMValueRef. */ LLVMValueRef LLVMGetIncomingValue(LLVMValueRef PhiNode, unsigned Index); /** - * Obtain an incoming value to a PHI node as a LLVMBasicBlockRef. + * Obtain an incoming value to a PHI node as an LLVMBasicBlockRef. */ LLVMBasicBlockRef LLVMGetIncomingBlock(LLVMValueRef PhiNode, unsigned Index); @@ -2518,6 +2608,8 @@ LLVMValueRef LLVMBuildIntToPtr(LLVMBuild LLVMTypeRef DestTy, const char *Name); LLVMValueRef LLVMBuildBitCast(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name); +LLVMValueRef LLVMBuildAddrSpaceCast(LLVMBuilderRef, LLVMValueRef Val, + LLVMTypeRef DestTy, const char *Name); LLVMValueRef LLVMBuildZExtOrBitCast(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name); LLVMValueRef LLVMBuildSExtOrBitCast(LLVMBuilderRef, LLVMValueRef Val, @@ -2571,9 +2663,9 @@ LLVMValueRef LLVMBuildIsNotNull(LLVMBuil const char *Name); LLVMValueRef LLVMBuildPtrDiff(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name); -LLVMValueRef LLVMBuildAtomicRMW(LLVMBuilderRef B,LLVMAtomicRMWBinOp op, - LLVMValueRef PTR, LLVMValueRef Val, - LLVMAtomicOrdering ordering, +LLVMValueRef LLVMBuildAtomicRMW(LLVMBuilderRef B,LLVMAtomicRMWBinOp op, + LLVMValueRef PTR, LLVMValueRef Val, + LLVMAtomicOrdering ordering, LLVMBool singleThread); /** @@ -2706,16 +2798,16 @@ void LLVMDisposePassManager(LLVMPassMana initialization succeeded. Must be executed in isolation from all other LLVM api calls. @see llvm::llvm_start_multithreaded */ -LLVMBool LLVMStartMultithreaded(); +LLVMBool LLVMStartMultithreaded(void); /** Deallocate structures necessary to make LLVM safe for multithreading. Must be executed in isolation from all other LLVM api calls. @see llvm::llvm_stop_multithreaded */ -void LLVMStopMultithreaded(); +void LLVMStopMultithreaded(void); /** Check whether LLVM is executing in thread-safe mode or not. @see llvm::llvm_is_multithreaded */ -LLVMBool LLVMIsMultithreaded(); +LLVMBool LLVMIsMultithreaded(void); /** * @} Modified: stable/9/contrib/llvm/include/llvm-c/Disassembler.h ============================================================================== --- stable/9/contrib/llvm/include/llvm-c/Disassembler.h Fri Mar 21 17:53:59 2014 (r263508) +++ stable/9/contrib/llvm/include/llvm-c/Disassembler.h Fri Mar 21 17:56:32 2014 (r263509) @@ -42,7 +42,7 @@ typedef void *LLVMDisasmContextRef; * instruction are specified by the Offset parameter and its byte widith is the * size parameter. For instructions sets with fixed widths and one symbolic * operand per instruction, the Offset parameter will be zero and Size parameter - * will be the instruction width. The information is returned in TagBuf and is + * will be the instruction width. The information is returned in TagBuf and is * Triple specific with its specific information defined by the value of * TagType for that Triple. If symbolic information is returned the function * returns 1, otherwise it returns 0. @@ -58,7 +58,7 @@ typedef int (*LLVMOpInfoCallback)(void * * SubtractSymbol can be link edited independent of each other. Many other * platforms only allow a relocatable expression of the form AddSymbol + Offset * to be encoded. - * + * * The LLVMOpInfoCallback() for the TagType value of 1 uses the struct * LLVMOpInfo1. The value of the relocatable expression for the operand, * including any PC adjustment, is passed in to the call back in the Value @@ -130,6 +130,17 @@ typedef const char *(*LLVMSymbolLookupCa /* The output reference is to a cstring address in a literal pool. */ #define LLVMDisassembler_ReferenceType_Out_LitPool_CstrAddr 3 +/* The output reference is to a Objective-C CoreFoundation string. */ +#define LLVMDisassembler_ReferenceType_Out_Objc_CFString_Ref 4 +/* The output reference is to a Objective-C message. */ +#define LLVMDisassembler_ReferenceType_Out_Objc_Message 5 +/* The output reference is to a Objective-C message ref. */ +#define LLVMDisassembler_ReferenceType_Out_Objc_Message_Ref 6 +/* The output reference is to a Objective-C selector ref. */ +#define LLVMDisassembler_ReferenceType_Out_Objc_Selector_Ref 7 +/* The output reference is to a Objective-C class ref. */ +#define LLVMDisassembler_ReferenceType_Out_Objc_Class_Ref 8 + #ifdef __cplusplus extern "C" { #endif /* !defined(__cplusplus) */ @@ -170,6 +181,10 @@ int LLVMSetDisasmOptions(LLVMDisasmConte #define LLVMDisassembler_Option_PrintImmHex 2 /* The option use the other assembler printer variant */ #define LLVMDisassembler_Option_AsmPrinterVariant 4 +/* The option to set comment on instructions */ +#define LLVMDisassembler_Option_SetInstrComments 8 + /* The option to print latency information alongside instructions */ +#define LLVMDisassembler_Option_PrintLatency 16 /** * Dispose of a disassembler context. Modified: stable/9/contrib/llvm/include/llvm-c/ExecutionEngine.h ============================================================================== --- stable/9/contrib/llvm/include/llvm-c/ExecutionEngine.h Fri Mar 21 17:53:59 2014 (r263508) +++ stable/9/contrib/llvm/include/llvm-c/ExecutionEngine.h Fri Mar 21 17:56:32 2014 (r263509) @@ -40,12 +40,14 @@ void LLVMLinkInInterpreter(void); typedef struct LLVMOpaqueGenericValue *LLVMGenericValueRef; typedef struct LLVMOpaqueExecutionEngine *LLVMExecutionEngineRef; +typedef struct LLVMOpaqueMCJITMemoryManager *LLVMMCJITMemoryManagerRef; struct LLVMMCJITCompilerOptions { unsigned OptLevel; LLVMCodeModel CodeModel; LLVMBool NoFramePointerElim; LLVMBool EnableFastISel; + LLVMMCJITMemoryManagerRef MCJMM; }; /*===-- Operations on generic values --------------------------------------===*/ @@ -167,12 +169,44 @@ void LLVMAddGlobalMapping(LLVMExecutionE void *LLVMGetPointerToGlobal(LLVMExecutionEngineRef EE, LLVMValueRef Global); +/*===-- Operations on memory managers -------------------------------------===*/ + +typedef uint8_t *(*LLVMMemoryManagerAllocateCodeSectionCallback)( + void *Opaque, uintptr_t Size, unsigned Alignment, unsigned SectionID, + const char *SectionName); +typedef uint8_t *(*LLVMMemoryManagerAllocateDataSectionCallback)( + void *Opaque, uintptr_t Size, unsigned Alignment, unsigned SectionID, + const char *SectionName, LLVMBool IsReadOnly); +typedef LLVMBool (*LLVMMemoryManagerFinalizeMemoryCallback)( + void *Opaque, char **ErrMsg); +typedef void (*LLVMMemoryManagerDestroyCallback)(void *Opaque); + +/** + * Create a simple custom MCJIT memory manager. This memory manager can + * intercept allocations in a module-oblivious way. This will return NULL + * if any of the passed functions are NULL. + * + * @param Opaque An opaque client object to pass back to the callbacks. + * @param AllocateCodeSection Allocate a block of memory for executable code. + * @param AllocateDataSection Allocate a block of memory for data. + * @param FinalizeMemory Set page permissions and flush cache. Return 0 on + * success, 1 on error. + */ +LLVMMCJITMemoryManagerRef LLVMCreateSimpleMCJITMemoryManager( + void *Opaque, + LLVMMemoryManagerAllocateCodeSectionCallback AllocateCodeSection, + LLVMMemoryManagerAllocateDataSectionCallback AllocateDataSection, + LLVMMemoryManagerFinalizeMemoryCallback FinalizeMemory, + LLVMMemoryManagerDestroyCallback Destroy); + +void LLVMDisposeMCJITMemoryManager(LLVMMCJITMemoryManagerRef MM); + /** * @} */ #ifdef __cplusplus -} +} #endif /* defined(__cplusplus) */ #endif Copied: stable/9/contrib/llvm/include/llvm-c/IRReader.h (from r261991, head/contrib/llvm/include/llvm-c/IRReader.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/llvm/include/llvm-c/IRReader.h Fri Mar 21 17:56:32 2014 (r263509, copy of r261991, head/contrib/llvm/include/llvm-c/IRReader.h) @@ -0,0 +1,40 @@ +/*===-- llvm-c/IRReader.h - IR Reader C Interface -----------------*- C -*-===*\ +|* *| +|* The LLVM Compiler Infrastructure *| +|* *| +|* This file is distributed under the University of Illinois Open Source *| +|* License. See LICENSE.TXT for details. *| +|* *| +|*===----------------------------------------------------------------------===*| +|* *| +|* This file defines the C interface to the IR Reader. *| +|* *| +\*===----------------------------------------------------------------------===*/ + +#ifndef LLVM_C_IRREADER_H +#define LLVM_C_IRREADER_H + +#include "llvm-c/Core.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Read LLVM IR from a memory buffer and convert it into an in-memory Module + * object. Returns 0 on success. + * Optionally returns a human-readable description of any errors that + * occured during parsing IR. OutMessage must be disposed with + * LLVMDisposeMessage. + * + * @see llvm::ParseIR() + */ +LLVMBool LLVMParseIRInContext(LLVMContextRef ContextRef, + LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM, + char **OutMessage); + +#ifdef __cplusplus +} +#endif + +#endif Modified: stable/9/contrib/llvm/include/llvm-c/LinkTimeOptimizer.h ============================================================================== --- stable/9/contrib/llvm/include/llvm-c/LinkTimeOptimizer.h Fri Mar 21 17:53:59 2014 (r263508) +++ stable/9/contrib/llvm/include/llvm-c/LinkTimeOptimizer.h Fri Mar 21 17:56:32 2014 (r263509) @@ -4,7 +4,7 @@ // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This header provides a C API to use the LLVM link time optimization @@ -46,7 +46,7 @@ extern "C" { // Added C-specific error codes LLVM_LTO_NULL_OBJECT } llvm_lto_status_t; - + /// This provides C interface to initialize link time optimizer. This allows /// linker to use dlopen() interface to dynamically load LinkTimeOptimizer. /// extern "C" helps, because dlopen() interface uses name to find the symbol. Modified: stable/9/contrib/llvm/include/llvm-c/Object.h ============================================================================== --- stable/9/contrib/llvm/include/llvm-c/Object.h Fri Mar 21 17:53:59 2014 (r263508) +++ stable/9/contrib/llvm/include/llvm-c/Object.h Fri Mar 21 17:56:32 2014 (r263509) @@ -100,4 +100,3 @@ const char *LLVMGetRelocationValueString #endif /* defined(__cplusplus) */ #endif - Copied: stable/9/contrib/llvm/include/llvm-c/Support.h (from r261991, head/contrib/llvm/include/llvm-c/Support.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/llvm/include/llvm-c/Support.h Fri Mar 21 17:56:32 2014 (r263509, copy of r261991, head/contrib/llvm/include/llvm-c/Support.h) @@ -0,0 +1,35 @@ +/*===-- llvm-c/Support.h - Support C Interface --------------------*- C -*-===*\ +|* *| +|* The LLVM Compiler Infrastructure *| +|* *| +|* This file is distributed under the University of Illinois Open Source *| +|* License. See LICENSE.TXT for details. *| +|* *| +|*===----------------------------------------------------------------------===*| +|* *| +|* This file defines the C interface to the LLVM support library. *| +|* *| +\*===----------------------------------------------------------------------===*/ + +#ifndef LLVM_C_SUPPORT_H +#define LLVM_C_SUPPORT_H + +#include "llvm-c/Core.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * This function permanently loads the dynamic library at the given path. + * It is safe to call this function multiple times for the same library. + * + * @see sys::DynamicLibrary::LoadLibraryPermanently() + */ +LLVMBool LLVMLoadLibraryPermanently(const char* Filename); + +#ifdef __cplusplus +} +#endif + +#endif Modified: stable/9/contrib/llvm/include/llvm-c/Target.h ============================================================================== --- stable/9/contrib/llvm/include/llvm-c/Target.h Fri Mar 21 17:53:59 2014 (r263508) +++ stable/9/contrib/llvm/include/llvm-c/Target.h Fri Mar 21 17:56:32 2014 (r263509) @@ -22,6 +22,10 @@ #include "llvm-c/Core.h" #include "llvm/Config/llvm-config.h" +#if defined(_MSC_VER) && !defined(inline) +#define inline __inline +#endif + #ifdef __cplusplus extern "C" { #endif @@ -37,14 +41,13 @@ enum LLVMByteOrdering { LLVMBigEndian, L typedef struct LLVMOpaqueTargetData *LLVMTargetDataRef; typedef struct LLVMOpaqueTargetLibraryInfotData *LLVMTargetLibraryInfoRef; -typedef struct LLVMStructLayout *LLVMStructLayoutRef; /* Declare all of the target-initialization functions that are available. */ #define LLVM_TARGET(TargetName) \ void LLVMInitialize##TargetName##TargetInfo(void); #include "llvm/Config/Targets.def" #undef LLVM_TARGET /* Explicit undef to make SWIG happier */ - + #define LLVM_TARGET(TargetName) void LLVMInitialize##TargetName##Target(void); #include "llvm/Config/Targets.def" #undef LLVM_TARGET /* Explicit undef to make SWIG happier */ @@ -53,7 +56,7 @@ typedef struct LLVMStructLayout *LLVMStr void LLVMInitialize##TargetName##TargetMC(void); #include "llvm/Config/Targets.def" #undef LLVM_TARGET /* Explicit undef to make SWIG happier */ - + /* Declare all of the available assembly printer initialization functions. */ #define LLVM_ASM_PRINTER(TargetName) \ void LLVMInitialize##TargetName##AsmPrinter(void); @@ -71,7 +74,7 @@ typedef struct LLVMStructLayout *LLVMStr void LLVMInitialize##TargetName##Disassembler(void); #include "llvm/Config/Disassemblers.def" #undef LLVM_DISASSEMBLER /* Explicit undef to make SWIG happier */ - + /** LLVMInitializeAllTargetInfos - The main program should call this function if it wants access to all available targets that LLVM is configured to support. */ @@ -98,7 +101,7 @@ static inline void LLVMInitializeAllTarg #include "llvm/Config/Targets.def" #undef LLVM_TARGET /* Explicit undef to make SWIG happier */ } - + /** LLVMInitializeAllAsmPrinters - The main program should call this function if it wants all asm printers that LLVM is configured to support, to make them available via the TargetRegistry. */ @@ -107,7 +110,7 @@ static inline void LLVMInitializeAllAsmP #include "llvm/Config/AsmPrinters.def" #undef LLVM_ASM_PRINTER /* Explicit undef to make SWIG happier */ } - + /** LLVMInitializeAllAsmParsers - The main program should call this function if it wants all asm parsers that LLVM is configured to support, to make them available via the TargetRegistry. */ @@ -116,7 +119,7 @@ static inline void LLVMInitializeAllAsmP #include "llvm/Config/AsmParsers.def" #undef LLVM_ASM_PARSER /* Explicit undef to make SWIG happier */ } - + /** LLVMInitializeAllDisassemblers - The main program should call this function if it wants all disassemblers that LLVM is configured to support, to make them available via the TargetRegistry. */ @@ -126,9 +129,9 @@ static inline void LLVMInitializeAllDisa #include "llvm/Config/Disassemblers.def" #undef LLVM_DISASSEMBLER /* Explicit undef to make SWIG happier */ } - + /** LLVMInitializeNativeTarget - The main program should call this function to - initialize the native target corresponding to the host. This is useful + initialize the native target corresponding to the host. This is useful for JIT applications to ensure that the target gets linked in correctly. */ static inline LLVMBool LLVMInitializeNativeTarget(void) { /* If we have a native target, initialize it to ensure it is linked in. */ @@ -140,7 +143,43 @@ static inline LLVMBool LLVMInitializeNat #else return 1; #endif -} +} + +/** LLVMInitializeNativeTargetAsmParser - The main program should call this + function to initialize the parser for the native target corresponding to the + host. */ +static inline LLVMBool LLVMInitializeNativeAsmParser(void) { +#ifdef LLVM_NATIVE_ASMPARSER + LLVM_NATIVE_ASMPARSER(); + return 0; +#else + return 1; +#endif +} + +/** LLVMInitializeNativeTargetAsmPrinter - The main program should call this + function to initialize the printer for the native target corresponding to + the host. */ +static inline LLVMBool LLVMInitializeNativeAsmPrinter(void) { +#ifdef LLVM_NATIVE_ASMPRINTER + LLVM_NATIVE_ASMPRINTER(); + return 0; +#else + return 1; +#endif +} + +/** LLVMInitializeNativeTargetDisassembler - The main program should call this + function to initialize the disassembler for the native target corresponding + to the host. */ +static inline LLVMBool LLVMInitializeNativeDisassembler(void) { +#ifdef LLVM_NATIVE_DISASSEMBLER + LLVM_NATIVE_DISASSEMBLER(); + return 0; +#else + return 1; +#endif +} /*===-- Target Data -------------------------------------------------------===*/ @@ -151,83 +190,94 @@ LLVMTargetDataRef LLVMCreateTargetData(c /** Adds target data information to a pass manager. This does not take ownership of the target data. See the method llvm::PassManagerBase::add. */ -void LLVMAddTargetData(LLVMTargetDataRef, LLVMPassManagerRef); +void LLVMAddTargetData(LLVMTargetDataRef TD, LLVMPassManagerRef PM); /** Adds target library information to a pass manager. This does not take ownership of the target library info. See the method llvm::PassManagerBase::add. */ -void LLVMAddTargetLibraryInfo(LLVMTargetLibraryInfoRef, LLVMPassManagerRef); +void LLVMAddTargetLibraryInfo(LLVMTargetLibraryInfoRef TLI, + LLVMPassManagerRef PM); /** Converts target data to a target layout string. The string must be disposed with LLVMDisposeMessage. See the constructor llvm::DataLayout::DataLayout. */ -char *LLVMCopyStringRepOfTargetData(LLVMTargetDataRef); +char *LLVMCopyStringRepOfTargetData(LLVMTargetDataRef TD); /** Returns the byte order of a target, either LLVMBigEndian or LLVMLittleEndian. See the method llvm::DataLayout::isLittleEndian. */ -enum LLVMByteOrdering LLVMByteOrder(LLVMTargetDataRef); +enum LLVMByteOrdering LLVMByteOrder(LLVMTargetDataRef TD); /** Returns the pointer size in bytes for a target. See the method llvm::DataLayout::getPointerSize. */ -unsigned LLVMPointerSize(LLVMTargetDataRef); +unsigned LLVMPointerSize(LLVMTargetDataRef TD); /** Returns the pointer size in bytes for a target for a specified address space. See the method llvm::DataLayout::getPointerSize. */ -unsigned LLVMPointerSizeForAS(LLVMTargetDataRef, unsigned AS); +unsigned LLVMPointerSizeForAS(LLVMTargetDataRef TD, unsigned AS); + +/** Returns the integer type that is the same size as a pointer on a target. + See the method llvm::DataLayout::getIntPtrType. */ +LLVMTypeRef LLVMIntPtrType(LLVMTargetDataRef TD); + +/** Returns the integer type that is the same size as a pointer on a target. + This version allows the address space to be specified. + See the method llvm::DataLayout::getIntPtrType. */ +LLVMTypeRef LLVMIntPtrTypeForAS(LLVMTargetDataRef TD, unsigned AS); /** Returns the integer type that is the same size as a pointer on a target. See the method llvm::DataLayout::getIntPtrType. */ -LLVMTypeRef LLVMIntPtrType(LLVMTargetDataRef); +LLVMTypeRef LLVMIntPtrTypeInContext(LLVMContextRef C, LLVMTargetDataRef TD); /** Returns the integer type that is the same size as a pointer on a target. This version allows the address space to be specified. See the method llvm::DataLayout::getIntPtrType. */ -LLVMTypeRef LLVMIntPtrTypeForAS(LLVMTargetDataRef, unsigned AS); +LLVMTypeRef LLVMIntPtrTypeForASInContext(LLVMContextRef C, LLVMTargetDataRef TD, + unsigned AS); /** Computes the size of a type in bytes for a target. See the method llvm::DataLayout::getTypeSizeInBits. */ -unsigned long long LLVMSizeOfTypeInBits(LLVMTargetDataRef, LLVMTypeRef); +unsigned long long LLVMSizeOfTypeInBits(LLVMTargetDataRef TD, LLVMTypeRef Ty); /** Computes the storage size of a type in bytes for a target. See the method llvm::DataLayout::getTypeStoreSize. */ -unsigned long long LLVMStoreSizeOfType(LLVMTargetDataRef, LLVMTypeRef); +unsigned long long LLVMStoreSizeOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty); /** Computes the ABI size of a type in bytes for a target. See the method llvm::DataLayout::getTypeAllocSize. */ -unsigned long long LLVMABISizeOfType(LLVMTargetDataRef, LLVMTypeRef); +unsigned long long LLVMABISizeOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty); /** Computes the ABI alignment of a type in bytes for a target. See the method llvm::DataLayout::getTypeABISize. */ -unsigned LLVMABIAlignmentOfType(LLVMTargetDataRef, LLVMTypeRef); +unsigned LLVMABIAlignmentOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty); /** Computes the call frame alignment of a type in bytes for a target. See the method llvm::DataLayout::getTypeABISize. */ -unsigned LLVMCallFrameAlignmentOfType(LLVMTargetDataRef, LLVMTypeRef); +unsigned LLVMCallFrameAlignmentOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty); /** Computes the preferred alignment of a type in bytes for a target. See the method llvm::DataLayout::getTypeABISize. */ -unsigned LLVMPreferredAlignmentOfType(LLVMTargetDataRef, LLVMTypeRef); +unsigned LLVMPreferredAlignmentOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty); /** Computes the preferred alignment of a global variable in bytes for a target. See the method llvm::DataLayout::getPreferredAlignment. */ -unsigned LLVMPreferredAlignmentOfGlobal(LLVMTargetDataRef, +unsigned LLVMPreferredAlignmentOfGlobal(LLVMTargetDataRef TD, LLVMValueRef GlobalVar); /** Computes the structure element that contains the byte offset for a target. See the method llvm::StructLayout::getElementContainingOffset. */ -unsigned LLVMElementAtOffset(LLVMTargetDataRef, LLVMTypeRef StructTy, +unsigned LLVMElementAtOffset(LLVMTargetDataRef TD, LLVMTypeRef StructTy, unsigned long long Offset); /** Computes the byte offset of the indexed struct element for a target. See the method llvm::StructLayout::getElementContainingOffset. */ -unsigned long long LLVMOffsetOfElement(LLVMTargetDataRef, LLVMTypeRef StructTy, - unsigned Element); +unsigned long long LLVMOffsetOfElement(LLVMTargetDataRef TD, + LLVMTypeRef StructTy, unsigned Element); /** Deallocates a TargetData. See the destructor llvm::DataLayout::~DataLayout. */ -void LLVMDisposeTargetData(LLVMTargetDataRef); +void LLVMDisposeTargetData(LLVMTargetDataRef TD); /** * @} Modified: stable/9/contrib/llvm/include/llvm-c/TargetMachine.h ============================================================================== --- stable/9/contrib/llvm/include/llvm-c/TargetMachine.h Fri Mar 21 17:53:59 2014 (r263508) +++ stable/9/contrib/llvm/include/llvm-c/TargetMachine.h Fri Mar 21 17:56:32 2014 (r263509) @@ -57,11 +57,21 @@ typedef enum { } LLVMCodeGenFileType; /** Returns the first llvm::Target in the registered targets list. */ -LLVMTargetRef LLVMGetFirstTarget(); +LLVMTargetRef LLVMGetFirstTarget(void); /** Returns the next llvm::Target given a previous one (or null if there's none) */ LLVMTargetRef LLVMGetNextTarget(LLVMTargetRef T); /*===-- Target ------------------------------------------------------------===*/ +/** Finds the target corresponding to the given name and stores it in \p T. + Returns 0 on success. */ +LLVMTargetRef LLVMGetTargetFromName(const char *Name); + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 18:08:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A5C9EF6; Fri, 21 Mar 2014 18:08:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 269B8CFE; Fri, 21 Mar 2014 18:08:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LI891R035124; Fri, 21 Mar 2014 18:08:09 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LI89sI035123; Fri, 21 Mar 2014 18:08:09 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211808.s2LI89sI035123@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 18:08:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263510 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 18:08:09 -0000 Author: gjb Date: Fri Mar 21 18:08:08 2014 New Revision: 263510 URL: http://svnweb.freebsd.org/changeset/base/263510 Log: Document r262594. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 17:56:32 2014 (r263509) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 18:08:08 2014 (r263510) @@ -152,6 +152,10 @@ Kernel Changes + A kernel panic triggered by inserting + a USB ethernet device on VIMAGE-enabled systems has been + fixed. + TTM, a memory manager used by video drivers, has been merged. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 18:08:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19AF8FC8; Fri, 21 Mar 2014 18:08:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 07353CFF; Fri, 21 Mar 2014 18:08:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LI8AA9035164; Fri, 21 Mar 2014 18:08:10 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LI8AMG035163; Fri, 21 Mar 2014 18:08:10 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211808.s2LI8AMG035163@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 18:08:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263511 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 18:08:11 -0000 Author: gjb Date: Fri Mar 21 18:08:10 2014 New Revision: 263511 URL: http://svnweb.freebsd.org/changeset/base/263511 Log: Document r262564. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 18:08:08 2014 (r263510) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 18:08:10 2014 (r263511) @@ -152,6 +152,9 @@ Kernel Changes + Support for the ext4 filesystem + has been enabled, supporting read-only mounts. + A kernel panic triggered by inserting a USB ethernet device on VIMAGE-enabled systems has been fixed. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 18:08:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1BFA2184; Fri, 21 Mar 2014 18:08:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CDF68D02; Fri, 21 Mar 2014 18:08:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LI8CDY035203; Fri, 21 Mar 2014 18:08:12 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LI8C8s035202; Fri, 21 Mar 2014 18:08:12 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211808.s2LI8C8s035202@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 18:08:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263512 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 18:08:13 -0000 Author: gjb Date: Fri Mar 21 18:08:12 2014 New Revision: 263512 URL: http://svnweb.freebsd.org/changeset/base/263512 Log: Remove reference to 6.2-RELEASE. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 18:08:10 2014 (r263511) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 18:08:12 2014 (r263512) @@ -339,7 +339,7 @@ Upgrading using &man.freebsd-update.8; or a source-based procedure - Beginning with &os; 6.2-RELEASE, binary + Binary upgrades between RELEASE versions (and snapshots of the various security branches) are supported using the &man.freebsd-update.8; utility. The binary upgrade procedure From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 18:08:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D16126D; Fri, 21 Mar 2014 18:08:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A7E61D03; Fri, 21 Mar 2014 18:08:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LI8EGV035245; Fri, 21 Mar 2014 18:08:14 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LI8EYX035244; Fri, 21 Mar 2014 18:08:14 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211808.s2LI8EYX035244@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 18:08:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263513 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 18:08:15 -0000 Author: gjb Date: Fri Mar 21 18:08:14 2014 New Revision: 263513 URL: http://svnweb.freebsd.org/changeset/base/263513 Log: Rewrap paragraph after rewording. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 18:08:12 2014 (r263512) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 18:08:14 2014 (r263513) @@ -339,13 +339,12 @@ Upgrading using &man.freebsd-update.8; or a source-based procedure - Binary - upgrades between RELEASE versions (and snapshots of the - various security branches) are supported using the - &man.freebsd-update.8; utility. The binary upgrade procedure - will update unmodified userland utilities, as well as an - unmodified GENERIC kernel, distributed as - a part of an official &os; release. The + Binary upgrades between RELEASE versions + (and snapshots of the various security branches) are supported + using the &man.freebsd-update.8; utility. The binary upgrade + procedure will update unmodified userland utilities, as well + as an unmodified GENERIC kernel, + distributed as a part of an official &os; release. The &man.freebsd-update.8; utility requires that the host being upgraded have Internet connectivity. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 18:29:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF48BA45; Fri, 21 Mar 2014 18:29:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AC3A0F1B; Fri, 21 Mar 2014 18:29:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LIT58p043443; Fri, 21 Mar 2014 18:29:05 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LIT5Bq043442; Fri, 21 Mar 2014 18:29:05 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211829.s2LIT5Bq043442@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 18:29:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263514 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 18:29:05 -0000 Author: gjb Date: Fri Mar 21 18:29:05 2014 New Revision: 263514 URL: http://svnweb.freebsd.org/changeset/base/263514 Log: Document r262362. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 18:08:14 2014 (r263513) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 18:29:05 2014 (r263514) @@ -188,6 +188,9 @@ Hardware Support + The &man.urndis.4; driver has been + imported from OpenBSD. + The &man.mfi.4; driver has been updated to support MegaRAID Fury cards. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 18:29:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8AE5B19; Fri, 21 Mar 2014 18:29:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A60FBF1C; Fri, 21 Mar 2014 18:29:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LIT74V043484; Fri, 21 Mar 2014 18:29:07 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LIT7Aw043483; Fri, 21 Mar 2014 18:29:07 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211829.s2LIT7Aw043483@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 18:29:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263515 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 18:29:07 -0000 Author: gjb Date: Fri Mar 21 18:29:07 2014 New Revision: 263515 URL: http://svnweb.freebsd.org/changeset/base/263515 Log: Document r262231. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 18:29:05 2014 (r263514) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 18:29:07 2014 (r263515) @@ -152,6 +152,9 @@ Kernel Changes + Support for SIIG X1 PCI-e has been added + to &man.ppc.4;. + Support for the ext4 filesystem has been enabled, supporting read-only mounts. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 18:29:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CA97BD21; Fri, 21 Mar 2014 18:29:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 55E26F1E; Fri, 21 Mar 2014 18:29:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LITB6P043564; Fri, 21 Mar 2014 18:29:11 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LITBeN043563; Fri, 21 Mar 2014 18:29:11 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211829.s2LITBeN043563@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 18:29:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263517 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 18:29:11 -0000 Author: gjb Date: Fri Mar 21 18:29:10 2014 New Revision: 263517 URL: http://svnweb.freebsd.org/changeset/base/263517 Log: Document r262160. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 18:29:08 2014 (r263516) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 18:29:10 2014 (r263517) @@ -248,6 +248,11 @@ Userland Changes + Receiving a &man.zfs.8; dataset with + zfs recv -F now properly destroys any + snapshots that were created since the incremental source + snapshot. + BIND has been updated to version 9.9.5. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 18:29:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B95E0C3E; Fri, 21 Mar 2014 18:29:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7A6FCF1D; Fri, 21 Mar 2014 18:29:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LIT9kA043525; Fri, 21 Mar 2014 18:29:09 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LIT9AS043524; Fri, 21 Mar 2014 18:29:09 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211829.s2LIT9AS043524@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 18:29:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263516 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 18:29:09 -0000 Author: gjb Date: Fri Mar 21 18:29:08 2014 New Revision: 263516 URL: http://svnweb.freebsd.org/changeset/base/263516 Log: Document r262175. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 18:29:07 2014 (r263515) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 18:29:08 2014 (r263516) @@ -152,6 +152,9 @@ Kernel Changes + A deadlock triggered by sending + a mounted &man.zfs.8; snapshot has been fixed. + Support for SIIG X1 PCI-e has been added to &man.ppc.4;. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 18:29:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78819E51; Fri, 21 Mar 2014 18:29:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 332B3F1F; Fri, 21 Mar 2014 18:29:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LITDPY043606; Fri, 21 Mar 2014 18:29:13 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LITD0D043605; Fri, 21 Mar 2014 18:29:13 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211829.s2LITD0D043605@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 18:29:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263518 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 18:29:14 -0000 Author: gjb Date: Fri Mar 21 18:29:12 2014 New Revision: 263518 URL: http://svnweb.freebsd.org/changeset/base/263518 Log: Document r262158. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 18:29:10 2014 (r263517) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 18:29:12 2014 (r263518) @@ -248,6 +248,10 @@ Userland Changes + A bug that would allow creating + a &man.zfs.8; snapshot of an inconsistent dataset has been + fixed. + Receiving a &man.zfs.8; dataset with zfs recv -F now properly destroys any snapshots that were created since the incremental source From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 18:48:21 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DBA5F847; Fri, 21 Mar 2014 18:48:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C85D919E; Fri, 21 Mar 2014 18:48:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LImLIB051719; Fri, 21 Mar 2014 18:48:21 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LImL1D051718; Fri, 21 Mar 2014 18:48:21 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211848.s2LImL1D051718@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 18:48:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263519 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 18:48:21 -0000 Author: gjb Date: Fri Mar 21 18:48:21 2014 New Revision: 263519 URL: http://svnweb.freebsd.org/changeset/base/263519 Log: Document r262153. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 18:29:12 2014 (r263518) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 18:48:21 2014 (r263519) @@ -152,6 +152,11 @@ Kernel Changes + The &man.netmap.4; framework has been + updated to match the version in head/, + which includes netmap pipes, kqueue support, and enhanced + VALE switch port. + A deadlock triggered by sending a mounted &man.zfs.8; snapshot has been fixed. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 18:48:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB1609FA; Fri, 21 Mar 2014 18:48:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8FB031A1; Fri, 21 Mar 2014 18:48:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LImPjL051801; Fri, 21 Mar 2014 18:48:25 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LImP6C051800; Fri, 21 Mar 2014 18:48:25 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211848.s2LImP6C051800@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 18:48:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263521 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 18:48:25 -0000 Author: gjb Date: Fri Mar 21 18:48:25 2014 New Revision: 263521 URL: http://svnweb.freebsd.org/changeset/base/263521 Log: Document r262153. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 18:48:23 2014 (r263520) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 18:48:25 2014 (r263521) @@ -218,6 +218,9 @@ Network Interface Support + The &man.axge.4; driver has been + added. + The &man.urndis.4; driver has been imported from OpenBSD. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 18:48:23 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3F1A91E; Fri, 21 Mar 2014 18:48:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ADC421A0; Fri, 21 Mar 2014 18:48:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LImNfV051763; Fri, 21 Mar 2014 18:48:23 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LImNWo051762; Fri, 21 Mar 2014 18:48:23 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211848.s2LImNWo051762@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 18:48:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263520 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 18:48:23 -0000 Author: gjb Date: Fri Mar 21 18:48:23 2014 New Revision: 263520 URL: http://svnweb.freebsd.org/changeset/base/263520 Log: Move the urndis(4) entry to 'Network Interface' section. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 18:48:21 2014 (r263519) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 18:48:23 2014 (r263520) @@ -199,9 +199,6 @@ Hardware Support - The &man.urndis.4; driver has been - imported from OpenBSD. - The &man.mfi.4; driver has been updated to support MegaRAID Fury cards. @@ -221,7 +218,8 @@ Network Interface Support -   + The &man.urndis.4; driver has been + imported from OpenBSD. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 18:48:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED4BAB20; Fri, 21 Mar 2014 18:48:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7541F1A2; Fri, 21 Mar 2014 18:48:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LImR8l051840; Fri, 21 Mar 2014 18:48:27 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LImRoh051839; Fri, 21 Mar 2014 18:48:27 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211848.s2LImRoh051839@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 18:48:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263522 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 18:48:28 -0000 Author: gjb Date: Fri Mar 21 18:48:26 2014 New Revision: 263522 URL: http://svnweb.freebsd.org/changeset/base/263522 Log: Document r262134. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 18:48:25 2014 (r263521) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 18:48:26 2014 (r263522) @@ -254,6 +254,10 @@ Userland Changes + The &man.pciconf.8; utility now has + a -V flag, which lists VPD data for + each device. + A bug that would allow creating a &man.zfs.8; snapshot of an inconsistent dataset has been fixed. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 18:48:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42E6FCB2; Fri, 21 Mar 2014 18:48:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3081A1A4; Fri, 21 Mar 2014 18:48:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LImVeN051919; Fri, 21 Mar 2014 18:48:31 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LImVsD051918; Fri, 21 Mar 2014 18:48:31 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211848.s2LImVsD051918@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 18:48:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263524 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 18:48:31 -0000 Author: gjb Date: Fri Mar 21 18:48:30 2014 New Revision: 263524 URL: http://svnweb.freebsd.org/changeset/base/263524 Log: VPD is an acronym for Vital Process Data, but is a misnomer. Reword the pciconf(8) entry to avoid using the acronym. Feedback from: jhb Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 18:48:28 2014 (r263523) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 18:48:30 2014 (r263524) @@ -261,8 +261,8 @@ sysctl -n hw.ncpu. The &man.pciconf.8; utility now has - a -V flag, which lists VPD data for - each device. + a -V flag, which lists information such + as serial numbers for each device. A bug that would allow creating a &man.zfs.8; snapshot of an inconsistent dataset has been From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 18:48:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BBB3CC5B; Fri, 21 Mar 2014 18:48:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 527521A3; Fri, 21 Mar 2014 18:48:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LImT1L051884; Fri, 21 Mar 2014 18:48:29 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LImTnP051883; Fri, 21 Mar 2014 18:48:29 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211848.s2LImTnP051883@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 18:48:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263523 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 18:48:30 -0000 Author: gjb Date: Fri Mar 21 18:48:28 2014 New Revision: 263523 URL: http://svnweb.freebsd.org/changeset/base/263523 Log: Document r262124. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 18:48:26 2014 (r263522) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 18:48:28 2014 (r263523) @@ -254,6 +254,12 @@ Userland Changes + The default number of &man.nfsd.8; + threads has been increased from 4 to + (8 * N), where N is + the number of CPUs as reported by + sysctl -n hw.ncpu. + The &man.pciconf.8; utility now has a -V flag, which lists VPD data for each device. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 19:03:21 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8FD2946C; Fri, 21 Mar 2014 19:03:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7BD6C374; Fri, 21 Mar 2014 19:03:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LJ3LeL059477; Fri, 21 Mar 2014 19:03:21 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LJ3LiJ059476; Fri, 21 Mar 2014 19:03:21 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211903.s2LJ3LiJ059476@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 19:03:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263525 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 19:03:21 -0000 Author: gjb Date: Fri Mar 21 19:03:20 2014 New Revision: 263525 URL: http://svnweb.freebsd.org/changeset/base/263525 Log: Document r262116. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 18:48:30 2014 (r263524) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 19:03:20 2014 (r263525) @@ -152,6 +152,10 @@ Kernel Changes + A memory leak of compressed buffers + has been fixed in + l2arc_write_done(). + The &man.netmap.4; framework has been updated to match the version in head/, which includes netmap pipes, kqueue support, and enhanced From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 19:03:23 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9289E53C; Fri, 21 Mar 2014 19:03:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5FFB0375; Fri, 21 Mar 2014 19:03:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LJ3N5w059522; Fri, 21 Mar 2014 19:03:23 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LJ3N3V059521; Fri, 21 Mar 2014 19:03:23 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211903.s2LJ3N3V059521@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 19:03:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263526 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 19:03:23 -0000 Author: gjb Date: Fri Mar 21 19:03:22 2014 New Revision: 263526 URL: http://svnweb.freebsd.org/changeset/base/263526 Log: Document r262105. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 19:03:20 2014 (r263525) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 19:03:22 2014 (r263526) @@ -258,6 +258,10 @@ Userland Changes + A bug in &man.zdb.8; which would cause + numeric parameters to a flag as being treated as additional + flags has been fixed. + The default number of &man.nfsd.8; threads has been increased from 4 to (8 * N), where N is From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 19:03:28 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 28C06796; Fri, 21 Mar 2014 19:03:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1D55D377; Fri, 21 Mar 2014 19:03:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LJ3Q51059603; Fri, 21 Mar 2014 19:03:26 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LJ3QBX059602; Fri, 21 Mar 2014 19:03:26 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211903.s2LJ3QBX059602@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 19:03:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263528 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 19:03:28 -0000 Author: gjb Date: Fri Mar 21 19:03:26 2014 New Revision: 263528 URL: http://svnweb.freebsd.org/changeset/base/263528 Log: Document r261973. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 19:03:24 2014 (r263527) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 19:03:26 2014 (r263528) @@ -203,6 +203,10 @@ Hardware Support + The &man.nve.4; driver has been + deprecated, and the &man.nfe.4; driver should be used + instead. + The &man.mfi.4; driver has been updated to support MegaRAID Fury cards. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 19:03:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A622866A; Fri, 21 Mar 2014 19:03:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 39E01376; Fri, 21 Mar 2014 19:03:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LJ3PLH059560; Fri, 21 Mar 2014 19:03:25 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LJ3PWO059559; Fri, 21 Mar 2014 19:03:25 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211903.s2LJ3PWO059559@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 19:03:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263527 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 19:03:25 -0000 Author: gjb Date: Fri Mar 21 19:03:24 2014 New Revision: 263527 URL: http://svnweb.freebsd.org/changeset/base/263527 Log: Document r262076. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 19:03:22 2014 (r263526) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 19:03:24 2014 (r263527) @@ -258,6 +258,11 @@ Userland Changes + The &man.newsyslog.8; utility has been + changed to use the size of the file, instead of the blocks the + file takes on the disk to matche the behavior documented in + &man.newsyslog.conf.5;. + A bug in &man.zdb.8; which would cause numeric parameters to a flag as being treated as additional flags has been fixed. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 19:03:29 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04F3F7E2; Fri, 21 Mar 2014 19:03:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E680B378; Fri, 21 Mar 2014 19:03:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LJ3SnL059641; Fri, 21 Mar 2014 19:03:28 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LJ3S2p059640; Fri, 21 Mar 2014 19:03:28 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211903.s2LJ3S2p059640@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 19:03:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263529 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 19:03:29 -0000 Author: gjb Date: Fri Mar 21 19:03:28 2014 New Revision: 263529 URL: http://svnweb.freebsd.org/changeset/base/263529 Log: Document r261933. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 19:03:26 2014 (r263528) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 19:03:28 2014 (r263529) @@ -226,6 +226,10 @@ Network Interface Support + The &man.run.4; driver has been + updated to include support for the DLINK DWA-127 wireless + adapter. + The &man.axge.4; driver has been added. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 19:08:01 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 90CAEB50; Fri, 21 Mar 2014 19:08:01 +0000 (UTC) Received: from frv154.fwdcdn.com (frv154.fwdcdn.com [212.42.77.154]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 452C63C4; Fri, 21 Mar 2014 19:08:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ukr.net; s=fsm; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=p9pp6iiGLRjrKWdsEYF41OnZtxJpGl7DbEiQ3IH5rYc=; b=fuFLt5122u+WU0s+m4gmsXXGmlHyqW/6pgkJVp+lXDKuMqdtrmM54YLQg3BIB1+g6l4dbmqdlNkMkgPyQ4YParjUun0y3L5iYJUmzJWLo6ju5zqU86LyziY2fR5M94CbrPqCqxDURTZzgx7bpX7afyaGWumSh64jd4ppUZNKbL4=; Received: from [134.249.90.229] (helo=nonamehost.local) by frv154.fwdcdn.com with esmtpsa ID 1WR4nJ-0000tk-3k ; Fri, 21 Mar 2014 21:07:53 +0200 Date: Fri, 21 Mar 2014 21:07:52 +0200 From: Ivan Klymenko To: Dimitry Andric Subject: Re: svn commit: r263508 - in stable/10: . contrib/gcc contrib/llvm contrib/llvm/include/llvm contrib/llvm/include/llvm-c contrib/llvm/include/llvm-c/Transforms contrib/llvm/include/llvm/ADT contrib/llv... Message-ID: <20140321210752.2b9098f6@nonamehost.local> In-Reply-To: <201403211754.s2LHs1Pk030364@svn.freebsd.org> References: <201403211754.s2LHs1Pk030364@svn.freebsd.org> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.22; amd64-portbld-freebsd10.0) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Authentication-Result: IP=134.249.90.229; mail.from=fidaj@ukr.net; dkim=pass; header.d=ukr.net Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 19:08:01 -0000 =D0=92 Fri, 21 Mar 2014 17:54:01 +0000 (UTC) Dimitry Andric =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > Author: dim > Date: Fri Mar 21 17:53:59 2014 > New Revision: 263508 > URL: http://svnweb.freebsd.org/changeset/base/263508 >=20 > Log: > MFC 261991: > =20 > Upgrade our copy of llvm/clang to 3.4 release. This version > supports all of the features in the current working draft of the > upcoming C++ standard, provisionally named C++1y. > =20 http://svnweb.freebsd.org/base/stable/10/share/mk/bsd.sys.mk?limit_changes= =3D0&r1=3D263508&r2=3D263507&pathrev=3D263508 /usr/local/libexec/ccache/world/cc --sysroot=3D/usr/obj/usr/src/tmp -B/usr/= obj/usr/src/tmp/usr/bin -O2 -pipe -O3 -march=3Dcorei7-avx -fpic -fvisibili= ty=3Dhidden -DVISIBILITY_HIDDEN -std=3Dgnu99 -Qunused-arguments -fstack-pr= otector -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -= Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-var= iable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality= -Wno-unused-function -Wno-enum-conversion -Wno-switch -Wno-switch-enum -Wn= o-knr-promoted-parameter -c /usr/src/lib/libcompiler_rt/../../contrib/compi= ler-rt/lib/addvdi3.c -o addvdi3.o --- absvsi2.o --- error: unknown warning option '-Wno-unused-const-variable'; did you mean '-= Wno-unused-variable'? [-Werror,-Wunknown-warning-option] *** [absvsi2.o] Error code 1 make[4]: stopped in /usr/src/lib/libcompiler_rt --- addvdi3.o --- error: unknown warning option '-Wno-unused-const-variable'; did you mean '-= Wno-unused-variable'? [-Werror,-Wunknown-warning-option] --- absvdi2.o --- error: unknown warning option '-Wno-unused-const-variable'; did you mean '-= Wno-unused-variable'? [-Werror,-Wunknown-warning-option] --- addvdi3.o --- *** [addvdi3.o] Error code 1 make[4]: stopped in /usr/src/lib/libcompiler_rt --- absvdi2.o --- *** [absvdi2.o] Error code 1 make[4]: stopped in /usr/src/lib/libcompiler_rt --- absvti2.o --- error: unknown warning option '-Wno-unused-const-variable'; did you mean '-= Wno-unused-variable'? [-Werror,-Wunknown-warning-option] *** [absvti2.o] Error code 1 make[4]: stopped in /usr/src/lib/libcompiler_rt 4 errors make[4]: stopped in /usr/src/lib/libcompiler_rt A failure has been detected in another branch of the parallel make make[3]: stopped in /usr/src *** [libraries] Error code 2 make[2]: stopped in /usr/src 1 error make[2]: stopped in /usr/src *** [_libraries] Error code 2 make[1]: stopped in /usr/src 1 error make[1]: stopped in /usr/src *** [buildworld] Error code 2 make: stopped in /usr/src 1 error make: stopped in /usr/src From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 19:17:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A8EDF12D; Fri, 21 Mar 2014 19:17:15 +0000 (UTC) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6281F69E; Fri, 21 Mar 2014 19:17:15 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::d046:1f4f:8cfd:8ab2] (unknown [IPv6:2001:7b8:3a7:0:d046:1f4f:8cfd:8ab2]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id E548F5C45; Fri, 21 Mar 2014 20:17:10 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_26184AD4-5F6C-44C4-A97E-A5536FB48E6F"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) Subject: Re: svn commit: r263508 - in stable/10: . contrib/gcc contrib/llvm contrib/llvm/include/llvm contrib/llvm/include/llvm-c contrib/llvm/include/llvm-c/Transforms contrib/llvm/include/llvm/ADT contrib/llv... From: Dimitry Andric In-Reply-To: <20140321210752.2b9098f6@nonamehost.local> Date: Fri, 21 Mar 2014 20:17:03 +0100 Message-Id: <0ACA0301-B69A-45C1-A752-AC23DAA1AC83@FreeBSD.org> References: <201403211754.s2LHs1Pk030364@svn.freebsd.org> <20140321210752.2b9098f6@nonamehost.local> To: Ivan Klymenko X-Mailer: Apple Mail (2.1874) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 19:17:15 -0000 --Apple-Mail=_26184AD4-5F6C-44C4-A97E-A5536FB48E6F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On 21 Mar 2014, at 20:07, Ivan Klymenko wrote: > =D0=92 Fri, 21 Mar 2014 17:54:01 +0000 (UTC) > Dimitry Andric =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >=20 >> Author: dim >> Date: Fri Mar 21 17:53:59 2014 >> New Revision: 263508 >> URL: http://svnweb.freebsd.org/changeset/base/263508 >>=20 >> Log: >> MFC 261991: >>=20 >> Upgrade our copy of llvm/clang to 3.4 release. This version >> supports all of the features in the current working draft of the >> upcoming C++ standard, provisionally named C++1y. >>=20 >=20 > = http://svnweb.freebsd.org/base/stable/10/share/mk/bsd.sys.mk?limit_changes= =3D0&r1=3D263508&r2=3D263507&pathrev=3D263508 >=20 > /usr/local/libexec/ccache/world/cc --sysroot=3D/usr/obj/usr/src/tmp = -B/usr/obj/usr/src/tmp/usr/bin -O2 -pipe -O3 -march=3Dcorei7-avx -fpic = -fvisibility=3Dhidden -DVISIBILITY_HIDDEN -std=3Dgnu99 = -Qunused-arguments -fstack-protector -Wsystem-headers -Werror -Wall = -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body = -Wno-string-plus-int -Wno-unused-const-variable = -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality = -Wno-unused-function -Wno-enum-conversion -Wno-switch -Wno-switch-enum = -Wno-knr-promoted-parameter -c = /usr/src/lib/libcompiler_rt/../../contrib/compiler-rt/lib/addvdi3.c -o = addvdi3.o > --- absvsi2.o --- > error: unknown warning option '-Wno-unused-const-variable'; did you = mean '-Wno-unused-variable'? [-Werror,-Wunknown-warning-option] > *** [absvsi2.o] Error code 1 Unfortunately ccache does not work properly for buildworld. At least, not when you are upgrading the compiler itself. In this case, it seems to be invoking the wrong compiler, e.g. running cc from /usr/bin instead of /usr/obj/usr/src/tmp/usr/bin. Please disable ccache, and try again. -Dimitry --Apple-Mail=_26184AD4-5F6C-44C4-A97E-A5536FB48E6F Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iEYEARECAAYFAlMskDUACgkQsF6jCi4glqMqUgCeLg/j2eXFXKSYwW6KbdqD5f6G LcwAoPemKxARWVXgk33XXGjoj/XFHNk+ =hh4P -----END PGP SIGNATURE----- --Apple-Mail=_26184AD4-5F6C-44C4-A97E-A5536FB48E6F-- From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 19:24:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2DF0588; Fri, 21 Mar 2014 19:24:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DF6ED81C; Fri, 21 Mar 2014 19:24:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LJOgCG068016; Fri, 21 Mar 2014 19:24:42 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LJOg4c068015; Fri, 21 Mar 2014 19:24:42 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211924.s2LJOg4c068015@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 19:24:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263531 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 19:24:43 -0000 Author: gjb Date: Fri Mar 21 19:24:42 2014 New Revision: 263531 URL: http://svnweb.freebsd.org/changeset/base/263531 Log: Document r261865. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 19:12:05 2014 (r263530) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 19:24:42 2014 (r263531) @@ -226,6 +226,10 @@ Network Interface Support + The &man.run.4; driver has been + updated to include support for the MediaTek/Ralink RT3593 + chipset. + The &man.run.4; driver has been updated to include support for the DLINK DWA-127 wireless adapter. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 19:24:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F8C2820; Fri, 21 Mar 2014 19:24:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8C9AD820; Fri, 21 Mar 2014 19:24:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LJOm8a068138; Fri, 21 Mar 2014 19:24:48 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LJOmHR068137; Fri, 21 Mar 2014 19:24:48 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211924.s2LJOmHR068137@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 19:24:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263534 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 19:24:49 -0000 Author: gjb Date: Fri Mar 21 19:24:48 2014 New Revision: 263534 URL: http://svnweb.freebsd.org/changeset/base/263534 Log: Document r261483. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 19:24:46 2014 (r263533) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 19:24:48 2014 (r263534) @@ -152,6 +152,9 @@ Kernel Changes + Support for GPS ports has been added + to the &man.uhso.4; driver. + A memory leak of compressed buffers has been fixed in l2arc_write_done(). From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 19:24:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C5CF9E0; Fri, 21 Mar 2014 19:24:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4912C822; Fri, 21 Mar 2014 19:24:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LJOq2R068217; Fri, 21 Mar 2014 19:24:52 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LJOqTJ068216; Fri, 21 Mar 2014 19:24:52 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211924.s2LJOqTJ068216@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 19:24:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263536 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 19:24:53 -0000 Author: gjb Date: Fri Mar 21 19:24:51 2014 New Revision: 263536 URL: http://svnweb.freebsd.org/changeset/base/263536 Log: Move xz(1), Sendmail, and BIND entries to the contributed software section. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 19:24:49 2014 (r263535) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 19:24:51 2014 (r263536) @@ -276,9 +276,6 @@ Userland Changes - Sendmail has - been updated to version 8.14.8. - A bug that could trigger an infinite loop in KDE and X has been fixed. @@ -310,9 +307,6 @@ snapshots that were created since the incremental source snapshot. - BIND has - been updated to version 9.9.5. - Installation from a read-only .OBJDIR has been fixed. @@ -343,9 +337,6 @@ bmake, and the make remains the &os; version. - The &man.xz.1; utility has been updated - to a post-5.0.5 snapshot. - The &man.fetch.3; library now supports Last-Modified timestamps which return UTC instead of GMT. @@ -382,7 +373,14 @@ Contributed Software -   + Sendmail has + been updated to version 8.14.8. + + BIND has + been updated to version 9.9.5. + + The &man.xz.1; utility has been updated + to a post-5.0.5 snapshot. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 19:24:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 206E9744; Fri, 21 Mar 2014 19:24:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AA65681F; Fri, 21 Mar 2014 19:24:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LJOk6Q068097; Fri, 21 Mar 2014 19:24:46 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LJOka1068096; Fri, 21 Mar 2014 19:24:46 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211924.s2LJOka1068096@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 19:24:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263533 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 19:24:47 -0000 Author: gjb Date: Fri Mar 21 19:24:46 2014 New Revision: 263533 URL: http://svnweb.freebsd.org/changeset/base/263533 Log: Document r261510. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 19:24:44 2014 (r263532) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 19:24:46 2014 (r263533) @@ -203,6 +203,9 @@ Hardware Support + Trackpad support for + &apple; MacBook products has been added. + The &man.nve.4; driver has been deprecated, and the &man.nfe.4; driver should be used instead. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 19:24:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F244833; Fri, 21 Mar 2014 19:24:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6C928821; Fri, 21 Mar 2014 19:24:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LJOoTT068173; Fri, 21 Mar 2014 19:24:50 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LJOoPM068172; Fri, 21 Mar 2014 19:24:50 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211924.s2LJOoPM068172@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 19:24:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263535 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 19:24:50 -0000 Author: gjb Date: Fri Mar 21 19:24:49 2014 New Revision: 263535 URL: http://svnweb.freebsd.org/changeset/base/263535 Log: Document r261375. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 19:24:48 2014 (r263534) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 19:24:49 2014 (r263535) @@ -276,6 +276,9 @@ Userland Changes + Sendmail has + been updated to version 8.14.8. + A bug that could trigger an infinite loop in KDE and X has been fixed. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 19:24:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E07AF668; Fri, 21 Mar 2014 19:24:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CE05F81D; Fri, 21 Mar 2014 19:24:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LJOiS2068056; Fri, 21 Mar 2014 19:24:44 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LJOiPn068055; Fri, 21 Mar 2014 19:24:44 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403211924.s2LJOiPn068055@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 19:24:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263532 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 19:24:45 -0000 Author: gjb Date: Fri Mar 21 19:24:44 2014 New Revision: 263532 URL: http://svnweb.freebsd.org/changeset/base/263532 Log: Document r261674. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 19:24:42 2014 (r263531) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 19:24:44 2014 (r263532) @@ -270,6 +270,9 @@ Userland Changes + A bug that could trigger an infinite + loop in KDE and X has been fixed. + The &man.newsyslog.8; utility has been changed to use the size of the file, instead of the blocks the file takes on the disk to matche the behavior documented in From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 19:49:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 540D45A6; Fri, 21 Mar 2014 19:49:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 343EBA5D; Fri, 21 Mar 2014 19:49:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LJnWsL076843; Fri, 21 Mar 2014 19:49:32 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LJnVio076839; Fri, 21 Mar 2014 19:49:31 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201403211949.s2LJnVio076839@svn.freebsd.org> From: Ed Maste Date: Fri, 21 Mar 2014 19:49:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263538 - in stable/9/sys: amd64/include i386/include pc98/include x86/include X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 19:49:32 -0000 Author: emaste Date: Fri Mar 21 19:49:31 2014 New Revision: 263538 URL: http://svnweb.freebsd.org/changeset/base/263538 Log: MFC r232262 by tijl: Copy amd64 _limits.h to x86 and merge with i386 _limits.h. Replace amd64/i386/pc98 _limits.h with stubs. MFC (part of) r235939 by obrien: Consitently use "__LP64__". Sponsored by: The FreeBSD Foundation Added: stable/9/sys/x86/include/_limits.h - copied, changed from r232262, head/sys/x86/include/_limits.h Modified: stable/9/sys/amd64/include/_limits.h stable/9/sys/i386/include/_limits.h stable/9/sys/pc98/include/_limits.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/include/_limits.h ============================================================================== --- stable/9/sys/amd64/include/_limits.h Fri Mar 21 19:40:05 2014 (r263537) +++ stable/9/sys/amd64/include/_limits.h Fri Mar 21 19:49:31 2014 (r263538) @@ -1,87 +1,6 @@ /*- - * Copyright (c) 1988, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - * - * @(#)limits.h 8.3 (Berkeley) 1/4/94 - * $FreeBSD$ + * This file is in the public domain. */ +/* $FreeBSD$ */ -#ifndef _MACHINE__LIMITS_H_ -#define _MACHINE__LIMITS_H_ - -/* - * According to ANSI (section 2.2.4.2), the values below must be usable by - * #if preprocessing directives. Additionally, the expression must have the - * same type as would an expression that is an object of the corresponding - * type converted according to the integral promotions. The subtraction for - * INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an - * unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). - */ - -#define __CHAR_BIT 8 /* number of bits in a char */ - -#define __SCHAR_MAX 0x7f /* max value for a signed char */ -#define __SCHAR_MIN (-0x7f - 1) /* min value for a signed char */ - -#define __UCHAR_MAX 0xff /* max value for an unsigned char */ - -#define __USHRT_MAX 0xffff /* max value for an unsigned short */ -#define __SHRT_MAX 0x7fff /* max value for a short */ -#define __SHRT_MIN (-0x7fff - 1) /* min value for a short */ - -#define __UINT_MAX 0xffffffff /* max value for an unsigned int */ -#define __INT_MAX 0x7fffffff /* max value for an int */ -#define __INT_MIN (-0x7fffffff - 1) /* min value for an int */ - -#define __ULONG_MAX 0xffffffffffffffff /* max for an unsigned long */ -#define __LONG_MAX 0x7fffffffffffffff /* max for a long */ -#define __LONG_MIN (-0x7fffffffffffffff - 1) /* min for a long */ - - /* max value for an unsigned long long */ -#define __ULLONG_MAX 0xffffffffffffffffULL -#define __LLONG_MAX 0x7fffffffffffffffLL /* max value for a long long */ -#define __LLONG_MIN (-0x7fffffffffffffffLL - 1) /* min for a long long */ - -#define __SSIZE_MAX __LONG_MAX /* max value for a ssize_t */ - -#define __SIZE_T_MAX __ULONG_MAX /* max value for a size_t */ - -#define __OFF_MAX __LONG_MAX /* max value for an off_t */ -#define __OFF_MIN __LONG_MIN /* min value for an off_t */ - -/* Quads and longs are the same on the amd64. Ensure they stay in sync. */ -#define __UQUAD_MAX __ULONG_MAX /* max value for a uquad_t */ -#define __QUAD_MAX __LONG_MAX /* max value for a quad_t */ -#define __QUAD_MIN __LONG_MIN /* min value for a quad_t */ - -#define __LONG_BIT 64 -#define __WORD_BIT 32 - -/* Minimum signal stack size. */ -#define __MINSIGSTKSZ (512 * 4) - -#endif /* !_MACHINE__LIMITS_H_ */ +#include Modified: stable/9/sys/i386/include/_limits.h ============================================================================== --- stable/9/sys/i386/include/_limits.h Fri Mar 21 19:40:05 2014 (r263537) +++ stable/9/sys/i386/include/_limits.h Fri Mar 21 19:49:31 2014 (r263538) @@ -1,87 +1,6 @@ /*- - * Copyright (c) 1988, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - * - * @(#)limits.h 8.3 (Berkeley) 1/4/94 - * $FreeBSD$ + * This file is in the public domain. */ +/* $FreeBSD$ */ -#ifndef _MACHINE__LIMITS_H_ -#define _MACHINE__LIMITS_H_ - -/* - * According to ANSI (section 2.2.4.2), the values below must be usable by - * #if preprocessing directives. Additionally, the expression must have the - * same type as would an expression that is an object of the corresponding - * type converted according to the integral promotions. The subtraction for - * INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an - * unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). - */ - -#define __CHAR_BIT 8 /* number of bits in a char */ - -#define __SCHAR_MAX 0x7f /* max value for a signed char */ -#define __SCHAR_MIN (-0x7f - 1) /* min value for a signed char */ - -#define __UCHAR_MAX 0xff /* max value for an unsigned char */ - -#define __USHRT_MAX 0xffff /* max value for an unsigned short */ -#define __SHRT_MAX 0x7fff /* max value for a short */ -#define __SHRT_MIN (-0x7fff - 1) /* min value for a short */ - -#define __UINT_MAX 0xffffffff /* max value for an unsigned int */ -#define __INT_MAX 0x7fffffff /* max value for an int */ -#define __INT_MIN (-0x7fffffff - 1) /* min value for an int */ - -#define __ULONG_MAX 0xffffffffUL /* max value for an unsigned long */ -#define __LONG_MAX 0x7fffffffL /* max value for a long */ -#define __LONG_MIN (-0x7fffffffL - 1) /* min value for a long */ - - /* max value for an unsigned long long */ -#define __ULLONG_MAX 0xffffffffffffffffULL -#define __LLONG_MAX 0x7fffffffffffffffLL /* max value for a long long */ -#define __LLONG_MIN (-0x7fffffffffffffffLL - 1) /* min for a long long */ - -#define __SSIZE_MAX __INT_MAX /* max value for a ssize_t */ - -#define __SIZE_T_MAX __UINT_MAX /* max value for a size_t */ - -#define __OFF_MAX __LLONG_MAX /* max value for an off_t */ -#define __OFF_MIN __LLONG_MIN /* min value for an off_t */ - -/* Quads and long longs are the same size. Ensure they stay in sync. */ -#define __UQUAD_MAX __ULLONG_MAX /* max value for a uquad_t */ -#define __QUAD_MAX __LLONG_MAX /* max value for a quad_t */ -#define __QUAD_MIN __LLONG_MIN /* min value for a quad_t */ - -#define __LONG_BIT 32 -#define __WORD_BIT 32 - -/* Minimum signal stack size. */ -#define __MINSIGSTKSZ (512 * 4) - -#endif /* !_MACHINE__LIMITS_H_ */ +#include Modified: stable/9/sys/pc98/include/_limits.h ============================================================================== --- stable/9/sys/pc98/include/_limits.h Fri Mar 21 19:40:05 2014 (r263537) +++ stable/9/sys/pc98/include/_limits.h Fri Mar 21 19:49:31 2014 (r263538) @@ -3,4 +3,4 @@ */ /* $FreeBSD$ */ -#include +#include Copied and modified: stable/9/sys/x86/include/_limits.h (from r232262, head/sys/x86/include/_limits.h) ============================================================================== --- head/sys/x86/include/_limits.h Tue Feb 28 18:24:28 2012 (r232262, copy source) +++ stable/9/sys/x86/include/_limits.h Fri Mar 21 19:49:31 2014 (r263538) @@ -57,7 +57,7 @@ #define __INT_MAX 0x7fffffff /* max value for an int */ #define __INT_MIN (-0x7fffffff - 1) /* min value for an int */ -#ifdef _LP64 +#ifdef __LP64__ #define __ULONG_MAX 0xffffffffffffffff /* max for an unsigned long */ #define __LONG_MAX 0x7fffffffffffffff /* max for a long */ #define __LONG_MIN (-0x7fffffffffffffff - 1) /* min for a long */ @@ -72,7 +72,7 @@ #define __LLONG_MAX 0x7fffffffffffffffLL /* max value for a long long */ #define __LLONG_MIN (-0x7fffffffffffffffLL - 1) /* min for a long long */ -#ifdef _LP64 +#ifdef __LP64__ #define __SSIZE_MAX __LONG_MAX /* max value for a ssize_t */ #define __SIZE_T_MAX __ULONG_MAX /* max value for a size_t */ #define __OFF_MAX __LONG_MAX /* max value for an off_t */ From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 19:58:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AC3DA917; Fri, 21 Mar 2014 19:58:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9693FB49; Fri, 21 Mar 2014 19:58:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LJwc9I080804; Fri, 21 Mar 2014 19:58:38 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LJwbNk080794; Fri, 21 Mar 2014 19:58:37 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201403211958.s2LJwbNk080794@svn.freebsd.org> From: Ed Maste Date: Fri, 21 Mar 2014 19:58:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263539 - in stable/9/sys: amd64/include i386/include pc98/include x86/include X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 19:58:38 -0000 Author: emaste Date: Fri Mar 21 19:58:37 2014 New Revision: 263539 URL: http://svnweb.freebsd.org/changeset/base/263539 Log: MFC r232264 by tijl: Copy amd64 _stdint.h to x86 and merge with i386 _stdint.h. Replace amd64/i386/pc98 _stdint.h with stubs. MFC r232519 by tijl: Do not use INT64_C and UINT64_C to define 64 bit integer limits. They aren't defined for C++ code unless __STDC_CONSTANT_MACROS is defined. Reported by: jhb MFC (part of) r235939 by obrien: Consitently use "__LP64__". [there are 33 __LP64__'s in the kernel (minus cddl/ and contrib/), and 11 _LP64's] Sponsored by: The FreeBSD Foundation Added: stable/9/sys/x86/include/_stdint.h - copied, changed from r232264, head/sys/x86/include/_stdint.h Modified: stable/9/sys/amd64/include/_stdint.h stable/9/sys/i386/include/_stdint.h stable/9/sys/pc98/include/_stdint.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/include/_stdint.h ============================================================================== --- stable/9/sys/amd64/include/_stdint.h Fri Mar 21 19:49:31 2014 (r263538) +++ stable/9/sys/amd64/include/_stdint.h Fri Mar 21 19:58:37 2014 (r263539) @@ -1,171 +1,6 @@ /*- - * Copyright (c) 2001, 2002 Mike Barcroft - * Copyright (c) 2001 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Klaus Klein. - * - * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - * - * $FreeBSD$ + * This file is in the public domain. */ +/* $FreeBSD$ */ -#ifndef _MACHINE__STDINT_H_ -#define _MACHINE__STDINT_H_ - -#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) - -#define INT8_C(c) (c) -#define INT16_C(c) (c) -#define INT32_C(c) (c) -#define INT64_C(c) (c ## L) - -#define UINT8_C(c) (c) -#define UINT16_C(c) (c) -#define UINT32_C(c) (c ## U) -#define UINT64_C(c) (c ## UL) - -#define INTMAX_C(c) INT64_C(c) -#define UINTMAX_C(c) UINT64_C(c) - -#endif /* !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) */ - -#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) - -/* - * ISO/IEC 9899:1999 - * 7.18.2.1 Limits of exact-width integer types - */ -/* Minimum values of exact-width signed integer types. */ -#define INT8_MIN (-0x7f-1) -#define INT16_MIN (-0x7fff-1) -#define INT32_MIN (-0x7fffffff-1) -#define INT64_MIN (-0x7fffffffffffffffL-1) - -/* Maximum values of exact-width signed integer types. */ -#define INT8_MAX 0x7f -#define INT16_MAX 0x7fff -#define INT32_MAX 0x7fffffff -#define INT64_MAX 0x7fffffffffffffffL - -/* Maximum values of exact-width unsigned integer types. */ -#define UINT8_MAX 0xff -#define UINT16_MAX 0xffff -#define UINT32_MAX 0xffffffffU -#define UINT64_MAX 0xffffffffffffffffUL - -/* - * ISO/IEC 9899:1999 - * 7.18.2.2 Limits of minimum-width integer types - */ -/* Minimum values of minimum-width signed integer types. */ -#define INT_LEAST8_MIN INT8_MIN -#define INT_LEAST16_MIN INT16_MIN -#define INT_LEAST32_MIN INT32_MIN -#define INT_LEAST64_MIN INT64_MIN - -/* Maximum values of minimum-width signed integer types. */ -#define INT_LEAST8_MAX INT8_MAX -#define INT_LEAST16_MAX INT16_MAX -#define INT_LEAST32_MAX INT32_MAX -#define INT_LEAST64_MAX INT64_MAX - -/* Maximum values of minimum-width unsigned integer types. */ -#define UINT_LEAST8_MAX UINT8_MAX -#define UINT_LEAST16_MAX UINT16_MAX -#define UINT_LEAST32_MAX UINT32_MAX -#define UINT_LEAST64_MAX UINT64_MAX - -/* - * ISO/IEC 9899:1999 - * 7.18.2.3 Limits of fastest minimum-width integer types - */ -/* Minimum values of fastest minimum-width signed integer types. */ -#define INT_FAST8_MIN INT32_MIN -#define INT_FAST16_MIN INT32_MIN -#define INT_FAST32_MIN INT32_MIN -#define INT_FAST64_MIN INT64_MIN - -/* Maximum values of fastest minimum-width signed integer types. */ -#define INT_FAST8_MAX INT32_MAX -#define INT_FAST16_MAX INT32_MAX -#define INT_FAST32_MAX INT32_MAX -#define INT_FAST64_MAX INT64_MAX - -/* Maximum values of fastest minimum-width unsigned integer types. */ -#define UINT_FAST8_MAX UINT32_MAX -#define UINT_FAST16_MAX UINT32_MAX -#define UINT_FAST32_MAX UINT32_MAX -#define UINT_FAST64_MAX UINT64_MAX - -/* - * ISO/IEC 9899:1999 - * 7.18.2.4 Limits of integer types capable of holding object pointers - */ -#define INTPTR_MIN INT64_MIN -#define INTPTR_MAX INT64_MAX -#define UINTPTR_MAX UINT64_MAX - -/* - * ISO/IEC 9899:1999 - * 7.18.2.5 Limits of greatest-width integer types - */ -#define INTMAX_MIN INT64_MIN -#define INTMAX_MAX INT64_MAX -#define UINTMAX_MAX UINT64_MAX - -/* - * ISO/IEC 9899:1999 - * 7.18.3 Limits of other integer types - */ -/* Limits of ptrdiff_t. */ -#define PTRDIFF_MIN INT64_MIN -#define PTRDIFF_MAX INT64_MAX - -/* Limits of sig_atomic_t. */ -#define SIG_ATOMIC_MIN INT32_MIN -#define SIG_ATOMIC_MAX INT32_MAX - -/* Limit of size_t. */ -#define SIZE_MAX UINT64_MAX - -#ifndef WCHAR_MIN /* Also possibly defined in */ -/* Limits of wchar_t. */ -#define WCHAR_MIN INT32_MIN -#define WCHAR_MAX INT32_MAX -#endif - -/* Limits of wint_t. */ -#define WINT_MIN INT32_MIN -#define WINT_MAX INT32_MAX - -#endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */ - -#endif /* !_MACHINE__STDINT_H_ */ +#include Modified: stable/9/sys/i386/include/_stdint.h ============================================================================== --- stable/9/sys/i386/include/_stdint.h Fri Mar 21 19:49:31 2014 (r263538) +++ stable/9/sys/i386/include/_stdint.h Fri Mar 21 19:58:37 2014 (r263539) @@ -1,171 +1,6 @@ /*- - * Copyright (c) 2001, 2002 Mike Barcroft - * Copyright (c) 2001 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Klaus Klein. - * - * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - * - * $FreeBSD$ + * This file is in the public domain. */ +/* $FreeBSD$ */ -#ifndef _MACHINE__STDINT_H_ -#define _MACHINE__STDINT_H_ - -#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) - -#define INT8_C(c) (c) -#define INT16_C(c) (c) -#define INT32_C(c) (c) -#define INT64_C(c) (c ## LL) - -#define UINT8_C(c) (c) -#define UINT16_C(c) (c) -#define UINT32_C(c) (c ## U) -#define UINT64_C(c) (c ## ULL) - -#define INTMAX_C(c) INT64_C(c) -#define UINTMAX_C(c) UINT64_C(c) - -#endif /* !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) */ - -#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) - -/* - * ISO/IEC 9899:1999 - * 7.18.2.1 Limits of exact-width integer types - */ -/* Minimum values of exact-width signed integer types. */ -#define INT8_MIN (-0x7f-1) -#define INT16_MIN (-0x7fff-1) -#define INT32_MIN (-0x7fffffff-1) -#define INT64_MIN (-0x7fffffffffffffffLL-1) - -/* Maximum values of exact-width signed integer types. */ -#define INT8_MAX 0x7f -#define INT16_MAX 0x7fff -#define INT32_MAX 0x7fffffff -#define INT64_MAX 0x7fffffffffffffffLL - -/* Maximum values of exact-width unsigned integer types. */ -#define UINT8_MAX 0xff -#define UINT16_MAX 0xffff -#define UINT32_MAX 0xffffffffU -#define UINT64_MAX 0xffffffffffffffffULL - -/* - * ISO/IEC 9899:1999 - * 7.18.2.2 Limits of minimum-width integer types - */ -/* Minimum values of minimum-width signed integer types. */ -#define INT_LEAST8_MIN INT8_MIN -#define INT_LEAST16_MIN INT16_MIN -#define INT_LEAST32_MIN INT32_MIN -#define INT_LEAST64_MIN INT64_MIN - -/* Maximum values of minimum-width signed integer types. */ -#define INT_LEAST8_MAX INT8_MAX -#define INT_LEAST16_MAX INT16_MAX -#define INT_LEAST32_MAX INT32_MAX -#define INT_LEAST64_MAX INT64_MAX - -/* Maximum values of minimum-width unsigned integer types. */ -#define UINT_LEAST8_MAX UINT8_MAX -#define UINT_LEAST16_MAX UINT16_MAX -#define UINT_LEAST32_MAX UINT32_MAX -#define UINT_LEAST64_MAX UINT64_MAX - -/* - * ISO/IEC 9899:1999 - * 7.18.2.3 Limits of fastest minimum-width integer types - */ -/* Minimum values of fastest minimum-width signed integer types. */ -#define INT_FAST8_MIN INT32_MIN -#define INT_FAST16_MIN INT32_MIN -#define INT_FAST32_MIN INT32_MIN -#define INT_FAST64_MIN INT64_MIN - -/* Maximum values of fastest minimum-width signed integer types. */ -#define INT_FAST8_MAX INT32_MAX -#define INT_FAST16_MAX INT32_MAX -#define INT_FAST32_MAX INT32_MAX -#define INT_FAST64_MAX INT64_MAX - -/* Maximum values of fastest minimum-width unsigned integer types. */ -#define UINT_FAST8_MAX UINT32_MAX -#define UINT_FAST16_MAX UINT32_MAX -#define UINT_FAST32_MAX UINT32_MAX -#define UINT_FAST64_MAX UINT64_MAX - -/* - * ISO/IEC 9899:1999 - * 7.18.2.4 Limits of integer types capable of holding object pointers - */ -#define INTPTR_MIN INT32_MIN -#define INTPTR_MAX INT32_MAX -#define UINTPTR_MAX UINT32_MAX - -/* - * ISO/IEC 9899:1999 - * 7.18.2.5 Limits of greatest-width integer types - */ -#define INTMAX_MIN INT64_MIN -#define INTMAX_MAX INT64_MAX -#define UINTMAX_MAX UINT64_MAX - -/* - * ISO/IEC 9899:1999 - * 7.18.3 Limits of other integer types - */ -/* Limits of ptrdiff_t. */ -#define PTRDIFF_MIN INT32_MIN -#define PTRDIFF_MAX INT32_MAX - -/* Limits of sig_atomic_t. */ -#define SIG_ATOMIC_MIN INT32_MIN -#define SIG_ATOMIC_MAX INT32_MAX - -/* Limit of size_t. */ -#define SIZE_MAX UINT32_MAX - -#ifndef WCHAR_MIN /* Also possibly defined in */ -/* Limits of wchar_t. */ -#define WCHAR_MIN INT32_MIN -#define WCHAR_MAX INT32_MAX -#endif - -/* Limits of wint_t. */ -#define WINT_MIN INT32_MIN -#define WINT_MAX INT32_MAX - -#endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */ - -#endif /* !_MACHINE__STDINT_H_ */ +#include Modified: stable/9/sys/pc98/include/_stdint.h ============================================================================== --- stable/9/sys/pc98/include/_stdint.h Fri Mar 21 19:49:31 2014 (r263538) +++ stable/9/sys/pc98/include/_stdint.h Fri Mar 21 19:58:37 2014 (r263539) @@ -3,4 +3,4 @@ */ /* $FreeBSD$ */ -#include +#include Copied and modified: stable/9/sys/x86/include/_stdint.h (from r232264, head/sys/x86/include/_stdint.h) ============================================================================== --- head/sys/x86/include/_stdint.h Tue Feb 28 18:38:33 2012 (r232264, copy source) +++ stable/9/sys/x86/include/_stdint.h Fri Mar 21 19:58:37 2014 (r263539) @@ -50,7 +50,7 @@ #define UINT16_C(c) (c) #define UINT32_C(c) (c ## U) -#ifdef _LP64 +#ifdef __LP64__ #define INT64_C(c) (c ## L) #define UINT64_C(c) (c ## UL) #else @@ -69,23 +69,27 @@ * ISO/IEC 9899:1999 * 7.18.2.1 Limits of exact-width integer types */ -/* Minimum values of exact-width signed integer types. */ #define INT8_MIN (-0x7f-1) #define INT16_MIN (-0x7fff-1) #define INT32_MIN (-0x7fffffff-1) -#define INT64_MIN (-INT64_C(0x7fffffffffffffff)-1) -/* Maximum values of exact-width signed integer types. */ #define INT8_MAX 0x7f #define INT16_MAX 0x7fff #define INT32_MAX 0x7fffffff -#define INT64_MAX INT64_C(0x7fffffffffffffff) -/* Maximum values of exact-width unsigned integer types. */ #define UINT8_MAX 0xff #define UINT16_MAX 0xffff #define UINT32_MAX 0xffffffffU -#define UINT64_MAX UINT64_C(0xffffffffffffffff) + +#ifdef __LP64__ +#define INT64_MIN (-0x7fffffffffffffff-1) +#define INT64_MAX 0x7fffffffffffffff +#define UINT64_MAX 0xffffffffffffffff +#else +#define INT64_MIN (-0x7fffffffffffffffLL-1) +#define INT64_MAX 0x7fffffffffffffffLL +#define UINT64_MAX 0xffffffffffffffffULL +#endif /* * ISO/IEC 9899:1999 @@ -135,7 +139,7 @@ * ISO/IEC 9899:1999 * 7.18.2.4 Limits of integer types capable of holding object pointers */ -#ifdef _LP64 +#ifdef __LP64__ #define INTPTR_MIN INT64_MIN #define INTPTR_MAX INT64_MAX #define UINTPTR_MAX UINT64_MAX @@ -157,7 +161,7 @@ * ISO/IEC 9899:1999 * 7.18.3 Limits of other integer types */ -#ifdef _LP64 +#ifdef __LP64__ /* Limits of ptrdiff_t. */ #define PTRDIFF_MIN INT64_MIN #define PTRDIFF_MAX INT64_MAX From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 20:07:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B59FAE8F for ; Fri, 21 Mar 2014 20:07:39 +0000 (UTC) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com [209.85.217.175]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 38A3EC46 for ; Fri, 21 Mar 2014 20:07:38 +0000 (UTC) Received: by mail-lb0-f175.google.com with SMTP id w7so1988765lbi.6 for ; Fri, 21 Mar 2014 13:07:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=u07PXG7j5uYNhwJ1GRRkLle6AnxH4oGoYi8uHwdpVVY=; b=e64mqkNtQDNYTPA/GmoCUzJ3IceoDUIL6KV6p1tiR8iJ86BLNRUmHI4Jk0xiFdRqCC dNGyvPWNVswlWCPrTxIoN2X4JBmhHVJVUtbf2mBKAwVLS7p8cn0I9kzD/B9UWmQHqEA7 3QJx57lt804myFTqikjitTBw9CrqETTaZHp+VSBaUa7gJEbMvy5eFtbXTnFHONYyy6gk kN9AQfDA80my/s1GEyvmkbx+vTW+yr1t58i8tJzcAbeL5FPGk2bYl9Xf0OApofY7/gnU cHRfN74vHI826Mlqa2BZPHjT8PkH2qnXl4OMSKSflWNnaYVl2NrCMiYF7ST02obaU/OH ENcA== X-Gm-Message-State: ALoCoQkwepPP/uN6gUKMVoxoJITaE2lITEgkA4O4DfsxUKzVUkoR/eufq64nVyfrN46+TbzzivXW X-Received: by 10.152.209.70 with SMTP id mk6mr35555637lac.13.1395432451497; Fri, 21 Mar 2014 13:07:31 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by mx.google.com with ESMTPSA id a2sm3980092lbz.25.2014.03.21.13.07.30 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 21 Mar 2014 13:07:30 -0700 (PDT) Message-ID: <532C9C02.5010409@freebsd.org> Date: Sat, 22 Mar 2014 00:07:30 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r263478 - in stable/10: share/man/man9 sys/contrib/ipfilter/netinet sys/net sys/netatalk sys/netinet sys/netinet6 sys/netipx sys/netpfil/pf sys/nfs usr.bin/netstat References: <201403211515.s2LFFVUb064861@svn.freebsd.org> In-Reply-To: <201403211515.s2LFFVUb064861@svn.freebsd.org> X-Enigmail-Version: 1.7a1pre Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 20:07:39 -0000 On 21.03.2014 19:15, Gleb Smirnoff wrote: > - Remove rt_metrics_lite and simply put its members into rtentry. > - Use counter(9) for rt_pksent (former rt_rmx.rmx_pksent). This > removes another cache trashing ++ from packet forwarding path. > - Create zini/fini methods for the rtentry UMA zone. Via initialize > mutex and counter in them. > - Fix reporting of rmx_pksent to routing socket. > - Fix netstat(1) to report "Use" both in kvm(3) and sysctl(3) mode. 'make world' on i386 recent stable-10: /usr/src/usr.bin/netstat/route.c:333:7: error: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat] kread_counter((u_long )rt->rt_pksent)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/src/usr.bin/netstat/route.c:871:7: error: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat] kread_counter((u_long )rt->rt_pksent)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 errors generated. *** Error code 1 Stop. -- http://ache.vniz.net/ From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 20:09:29 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1341DF8F; Fri, 21 Mar 2014 20:09:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 00B4AC56; Fri, 21 Mar 2014 20:09:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LK9S0N085210; Fri, 21 Mar 2014 20:09:28 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LK9SBd085209; Fri, 21 Mar 2014 20:09:28 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212009.s2LK9SBd085209@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 20:09:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263541 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 20:09:29 -0000 Author: gjb Date: Fri Mar 21 20:09:28 2014 New Revision: 263541 URL: http://svnweb.freebsd.org/changeset/base/263541 Log: Document r260891. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 20:09:26 2014 (r263540) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 20:09:28 2014 (r263541) @@ -392,6 +392,11 @@ Release Engineering and Integration + As part of the release build, the + &man.etcupdate.8; utility will bootstrap the system, allowing + &man.etcupdate.8; to work after the first upgrade of a + system. + The release.sh script and release Makefile have been updated to use &man.pkg.7; to populate the dvd installation From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 20:09:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 320BEEBD; Fri, 21 Mar 2014 20:09:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1E7B0C55; Fri, 21 Mar 2014 20:09:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LK9Qn5085166; Fri, 21 Mar 2014 20:09:26 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LK9QSM085165; Fri, 21 Mar 2014 20:09:26 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212009.s2LK9QSM085165@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 20:09:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263540 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 20:09:27 -0000 Author: gjb Date: Fri Mar 21 20:09:26 2014 New Revision: 263540 URL: http://svnweb.freebsd.org/changeset/base/263540 Log: Document r260909. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 19:58:37 2014 (r263539) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 20:09:26 2014 (r263540) @@ -276,6 +276,11 @@ Userland Changes + The &man.kldload.8; utility has been + updated to display a message directing to &man.dmesg.8;, + instead of the cryptic message Exec format + error. + A bug that could trigger an infinite loop in KDE and X has been fixed. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 20:09:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 728B9138; Fri, 21 Mar 2014 20:09:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E7C26C57; Fri, 21 Mar 2014 20:09:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LK9UtT085253; Fri, 21 Mar 2014 20:09:30 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LK9UEn085252; Fri, 21 Mar 2014 20:09:30 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212009.s2LK9UEn085252@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 20:09:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263542 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 20:09:31 -0000 Author: gjb Date: Fri Mar 21 20:09:30 2014 New Revision: 263542 URL: http://svnweb.freebsd.org/changeset/base/263542 Log: Document r260868, r260869. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 20:09:28 2014 (r263541) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 20:09:30 2014 (r263542) @@ -276,6 +276,10 @@ Userland Changes + The + hw.uart.console is now always updated when + the comconsole setup changes. + The &man.kldload.8; utility has been updated to display a message directing to &man.dmesg.8;, instead of the cryptic message Exec format From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 20:21:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E775603; Fri, 21 Mar 2014 20:21:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7EC89DBD; Fri, 21 Mar 2014 20:21:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LKLOPw090910; Fri, 21 Mar 2014 20:21:24 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LKLNAe090900; Fri, 21 Mar 2014 20:21:23 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201403212021.s2LKLNAe090900@svn.freebsd.org> From: Ed Maste Date: Fri, 21 Mar 2014 20:21:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263543 - in stable/9/sys: amd64/include i386/include pc98/include x86/include X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 20:21:24 -0000 Author: emaste Date: Fri Mar 21 20:21:23 2014 New Revision: 263543 URL: http://svnweb.freebsd.org/changeset/base/263543 Log: MFC r232491 by tijl: Copy amd64 float.h to x86 and merge with i386 float.h. Replace amd64/i386/pc98 float.h with stubs. MFC (part of) r235939 by obrien: Consitently use "__LP64__". [there are 33 __LP64__'s in the kernel (minus cddl/ and contrib/), and 11 _LP64's] Sponsored by: The FreeBSD Foundation Added: stable/9/sys/x86/include/float.h - copied, changed from r232491, head/sys/x86/include/float.h Modified: stable/9/sys/amd64/include/float.h stable/9/sys/i386/include/float.h stable/9/sys/pc98/include/float.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/include/float.h ============================================================================== --- stable/9/sys/amd64/include/float.h Fri Mar 21 20:09:30 2014 (r263542) +++ stable/9/sys/amd64/include/float.h Fri Mar 21 20:21:23 2014 (r263543) @@ -1,78 +1,6 @@ /*- - * Copyright (c) 1989 Regents of the University of California. - * All rights reserved. - * - * 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. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - * - * from: @(#)float.h 7.1 (Berkeley) 5/8/90 - * $FreeBSD$ + * This file is in the public domain. */ +/* $FreeBSD$ */ -#ifndef _MACHINE_FLOAT_H_ -#define _MACHINE_FLOAT_H_ 1 - -#include - -__BEGIN_DECLS -extern int __flt_rounds(void); -__END_DECLS - -#define FLT_RADIX 2 /* b */ -#define FLT_ROUNDS __flt_rounds() -#if __ISO_C_VISIBLE >= 1999 -#define FLT_EVAL_METHOD 0 /* no promotions */ -#define DECIMAL_DIG 21 /* max precision in decimal digits */ -#endif - -#define FLT_MANT_DIG 24 /* p */ -#define FLT_EPSILON 1.19209290E-07F /* b**(1-p) */ -#define FLT_DIG 6 /* floor((p-1)*log10(b))+(b == 10) */ -#define FLT_MIN_EXP (-125) /* emin */ -#define FLT_MIN 1.17549435E-38F /* b**(emin-1) */ -#define FLT_MIN_10_EXP (-37) /* ceil(log10(b**(emin-1))) */ -#define FLT_MAX_EXP 128 /* emax */ -#define FLT_MAX 3.40282347E+38F /* (1-b**(-p))*b**emax */ -#define FLT_MAX_10_EXP 38 /* floor(log10((1-b**(-p))*b**emax)) */ - -#define DBL_MANT_DIG 53 -#define DBL_EPSILON 2.2204460492503131E-16 -#define DBL_DIG 15 -#define DBL_MIN_EXP (-1021) -#define DBL_MIN 2.2250738585072014E-308 -#define DBL_MIN_10_EXP (-307) -#define DBL_MAX_EXP 1024 -#define DBL_MAX 1.7976931348623157E+308 -#define DBL_MAX_10_EXP 308 - -#define LDBL_MANT_DIG 64 -#define LDBL_EPSILON 1.0842021724855044340E-19L -#define LDBL_DIG 18 -#define LDBL_MIN_EXP (-16381) -#define LDBL_MIN 3.3621031431120935063E-4932L -#define LDBL_MIN_10_EXP (-4931) -#define LDBL_MAX_EXP 16384 -#define LDBL_MAX 1.1897314953572317650E+4932L -#define LDBL_MAX_10_EXP 4932 -#endif /* _MACHINE_FLOAT_H_ */ +#include Modified: stable/9/sys/i386/include/float.h ============================================================================== --- stable/9/sys/i386/include/float.h Fri Mar 21 20:09:30 2014 (r263542) +++ stable/9/sys/i386/include/float.h Fri Mar 21 20:21:23 2014 (r263543) @@ -1,78 +1,6 @@ /*- - * Copyright (c) 1989 Regents of the University of California. - * All rights reserved. - * - * 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. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - * - * from: @(#)float.h 7.1 (Berkeley) 5/8/90 - * $FreeBSD$ + * This file is in the public domain. */ +/* $FreeBSD$ */ -#ifndef _MACHINE_FLOAT_H_ -#define _MACHINE_FLOAT_H_ 1 - -#include - -__BEGIN_DECLS -extern int __flt_rounds(void); -__END_DECLS - -#define FLT_RADIX 2 /* b */ -#define FLT_ROUNDS __flt_rounds() -#if __ISO_C_VISIBLE >= 1999 -#define FLT_EVAL_METHOD (-1) /* i387 semantics are...interesting */ -#define DECIMAL_DIG 21 /* max precision in decimal digits */ -#endif - -#define FLT_MANT_DIG 24 /* p */ -#define FLT_EPSILON 1.19209290E-07F /* b**(1-p) */ -#define FLT_DIG 6 /* floor((p-1)*log10(b))+(b == 10) */ -#define FLT_MIN_EXP (-125) /* emin */ -#define FLT_MIN 1.17549435E-38F /* b**(emin-1) */ -#define FLT_MIN_10_EXP (-37) /* ceil(log10(b**(emin-1))) */ -#define FLT_MAX_EXP 128 /* emax */ -#define FLT_MAX 3.40282347E+38F /* (1-b**(-p))*b**emax */ -#define FLT_MAX_10_EXP 38 /* floor(log10((1-b**(-p))*b**emax)) */ - -#define DBL_MANT_DIG 53 -#define DBL_EPSILON 2.2204460492503131E-16 -#define DBL_DIG 15 -#define DBL_MIN_EXP (-1021) -#define DBL_MIN 2.2250738585072014E-308 -#define DBL_MIN_10_EXP (-307) -#define DBL_MAX_EXP 1024 -#define DBL_MAX 1.7976931348623157E+308 -#define DBL_MAX_10_EXP 308 - -#define LDBL_MANT_DIG 64 -#define LDBL_EPSILON 1.0842021724855044340E-19L -#define LDBL_DIG 18 -#define LDBL_MIN_EXP (-16381) -#define LDBL_MIN 3.3621031431120935063E-4932L -#define LDBL_MIN_10_EXP (-4931) -#define LDBL_MAX_EXP 16384 -#define LDBL_MAX 1.1897314953572317650E+4932L -#define LDBL_MAX_10_EXP 4932 -#endif /* _MACHINE_FLOAT_H_ */ +#include Modified: stable/9/sys/pc98/include/float.h ============================================================================== --- stable/9/sys/pc98/include/float.h Fri Mar 21 20:09:30 2014 (r263542) +++ stable/9/sys/pc98/include/float.h Fri Mar 21 20:21:23 2014 (r263543) @@ -3,4 +3,4 @@ */ /* $FreeBSD$ */ -#include +#include Copied and modified: stable/9/sys/x86/include/float.h (from r232491, head/sys/x86/include/float.h) ============================================================================== --- head/sys/x86/include/float.h Sun Mar 4 14:00:32 2012 (r232491, copy source) +++ stable/9/sys/x86/include/float.h Fri Mar 21 20:21:23 2014 (r263543) @@ -42,7 +42,7 @@ __END_DECLS #define FLT_RADIX 2 /* b */ #define FLT_ROUNDS __flt_rounds() #if __ISO_C_VISIBLE >= 1999 -#ifdef _LP64 +#ifdef __LP64__ #define FLT_EVAL_METHOD 0 /* no promotions */ #else #define FLT_EVAL_METHOD (-1) /* i387 semantics are...interesting */ From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 20:27:34 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 64447975 for ; Fri, 21 Mar 2014 20:27:34 +0000 (UTC) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com [209.85.217.181]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D7A84E09 for ; Fri, 21 Mar 2014 20:27:33 +0000 (UTC) Received: by mail-lb0-f181.google.com with SMTP id c11so1998475lbj.26 for ; Fri, 21 Mar 2014 13:27:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=RT0udrIkVGfLCY3embvPIWePYNOUFNRk2ZXWm7sX2NA=; b=KIiTultqvdOjkSsHEPIBiPicPsFfTqrsHjaXZJaHU7Zn4Xdasn4i1/c2vc2mzmxfiU F3Xeh/IzohHkDO+hsXdv3l9Tehc5a0jBX5i/gpAxwZhseZo47LoR0Uo2iF2c+ccuXShP dmCD+Pu6j0ICN6JJZhASXhNpcJczriRVjR/ZEUUbo88kSATy166S9YTXpgnGz+FLtJ7z q2iK1s3qc/94sZOpIjqKIeUVUucy1B5QEeVmdGzyG0hf6PN8WmNX0c3QHMm3tzMXB4dp nmHpBJFQEDo6Dmezk31l2I2LQD4TL/9+PUC3TrShcuKdYdmi5nco8Q1uCQbVyOdQm3xt ph3Q== X-Gm-Message-State: ALoCoQmv/8J2QZ9YOZjt0Z3hqWaWwg62hFCMn95UEIuq/vq+4y4iv2LSPQo9Ve1JFHZD8zgzq9cD X-Received: by 10.152.246.43 with SMTP id xt11mr3159176lac.34.1395433645860; Fri, 21 Mar 2014 13:27:25 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by mx.google.com with ESMTPSA id sx1sm5683681lac.1.2014.03.21.13.27.24 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 21 Mar 2014 13:27:25 -0700 (PDT) Message-ID: <532CA0AD.2000608@freebsd.org> Date: Sat, 22 Mar 2014 00:27:25 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r263478 - in stable/10: share/man/man9 sys/contrib/ipfilter/netinet sys/net sys/netatalk sys/netinet sys/netinet6 sys/netipx sys/netpfil/pf sys/nfs usr.bin/netstat References: <201403211515.s2LFFVUb064861@svn.freebsd.org> <532C9C02.5010409@freebsd.org> In-Reply-To: <532C9C02.5010409@freebsd.org> X-Enigmail-Version: 1.7a1pre Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 20:27:34 -0000 On 22.03.2014 0:07, Andrey Chernov wrote: > /usr/src/usr.bin/netstat/route.c:333:7: error: format specifies type > 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long > long') [-Werror,-Wformat] > kread_counter((u_long )rt->rt_pksent)); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The whole expression is len = snprintf(buffer, sizeof(buffer), "%lu", kread_counter((u_long )rt->rt_pksent)); You can't print uint64_t kread_counter() using %lu on i386. > /usr/src/usr.bin/netstat/route.c:871:7: error: format specifies type > 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long > long') [-Werror,-Wformat] > kread_counter((u_long )rt->rt_pksent)); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 2 errors generated. > *** Error code 1 > > Stop. -- http://ache.vniz.net/ From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 21:05:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 059192A6; Fri, 21 Mar 2014 21:05:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 57B60182; Fri, 21 Mar 2014 21:05:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LL5lJA009813; Fri, 21 Mar 2014 21:05:47 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LL5lPH009812; Fri, 21 Mar 2014 21:05:47 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212105.s2LL5lPH009812@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 21:05:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263546 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 21:05:48 -0000 Author: gjb Date: Fri Mar 21 21:05:46 2014 New Revision: 263546 URL: http://svnweb.freebsd.org/changeset/base/263546 Log: Document r260646, FreeBSD-SA-14:04.bind. Prune the SA list from stale entries. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 21:05:45 2014 (r263545) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 21:05:46 2014 (r263546) @@ -98,51 +98,10 @@ - SA-12:01.openssl - 3 May 2012 - OpenSSL multiple vulnerabilities - - - - SA-12:02.crypt - 30 May 2012 - Incorrect crypt() hashing - - - - SA-12:03.bind - 12 June 2012 - Incorrect handling of zero-length RDATA fields in &man.named.8; - - - - SA-12:04.sysret - 12 June 2012 - Privilege escalation when returning from kernel - - - - SA-12:05.bind - 6 August 2012 - &man.named.8; DNSSEC validation Denial of Service - - - - SA-12:06.bind - 22 November 2012 - Multiple Denial of Service vulnerabilities with &man.named.8; - - - - SA-12:07.hostapd - 22 November 2012 - Insufficient message length validation for EAP-TLS messages - - - - SA-12:08.linux - 22 November 2012 - Linux compatibility layer input validation error + FreeBSD-SA-14:04.bind + 1 January 2014 + Remote denial of service + vulnerability From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 21:05:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 95AF01DC; Fri, 21 Mar 2014 21:05:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 82DAF181; Fri, 21 Mar 2014 21:05:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LL5jel009778; Fri, 21 Mar 2014 21:05:45 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LL5jQR009777; Fri, 21 Mar 2014 21:05:45 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212105.s2LL5jQR009777@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 21:05:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263545 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 21:05:45 -0000 Author: gjb Date: Fri Mar 21 21:05:45 2014 New Revision: 263545 URL: http://svnweb.freebsd.org/changeset/base/263545 Log: Document r260650. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 21:05:43 2014 (r263544) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 21:05:45 2014 (r263545) @@ -276,6 +276,11 @@ Userland Changes + The &man.etcupdate.8; utility, a tool + for managing updates to files in /etc, has been merged from + head/. + The &man.find.1; utility has been updated to fix incorrect behavior with the -lname and -ilname From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 21:05:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BA78E108; Fri, 21 Mar 2014 21:05:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A6E0217F; Fri, 21 Mar 2014 21:05:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LL5hA3009740; Fri, 21 Mar 2014 21:05:43 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LL5hnD009739; Fri, 21 Mar 2014 21:05:43 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212105.s2LL5hnD009739@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 21:05:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263544 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 21:05:43 -0000 Author: gjb Date: Fri Mar 21 21:05:43 2014 New Revision: 263544 URL: http://svnweb.freebsd.org/changeset/base/263544 Log: Document r260651. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 20:21:23 2014 (r263543) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 21:05:43 2014 (r263544) @@ -276,6 +276,11 @@ Userland Changes + The &man.find.1; utility has been + updated to fix incorrect behavior with the + -lname and -ilname + flags. + The hw.uart.console is now always updated when the comconsole setup changes. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 21:22:58 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A8F9B99A; Fri, 21 Mar 2014 21:22:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 95779358; Fri, 21 Mar 2014 21:22:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LLMwG2017515; Fri, 21 Mar 2014 21:22:58 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LLMw1N017513; Fri, 21 Mar 2014 21:22:58 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212122.s2LLMw1N017513@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 21:22:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263547 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 21:22:58 -0000 Author: gjb Date: Fri Mar 21 21:22:58 2014 New Revision: 263547 URL: http://svnweb.freebsd.org/changeset/base/263547 Log: Document r260644. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 21:05:46 2014 (r263546) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 21:22:58 2014 (r263547) @@ -111,6 +111,9 @@ Kernel Changes + Hardware Random Number Generators have + been disabled by default. + Support for GPS ports has been added to the &man.uhso.4; driver. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 21:23:00 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96AB4A6C; Fri, 21 Mar 2014 21:23:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 83CCC359; Fri, 21 Mar 2014 21:23:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LLN0lu017562; Fri, 21 Mar 2014 21:23:00 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LLN0B1017561; Fri, 21 Mar 2014 21:23:00 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212123.s2LLN0B1017561@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 21:23:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263548 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 21:23:00 -0000 Author: gjb Date: Fri Mar 21 21:23:00 2014 New Revision: 263548 URL: http://svnweb.freebsd.org/changeset/base/263548 Log: Document r260643, FreeBSD-SA-14:02.ntpd. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 21:22:58 2014 (r263547) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 21:23:00 2014 (r263548) @@ -103,6 +103,13 @@ Remote denial of service vulnerability + + + FreeBSD-SA-14:02.ntpd + 1 January 2014 + Disable monitor feature in + &man.ntpd.8; by default + From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 21:23:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E423B99; Fri, 21 Mar 2014 21:23:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8BAC335A; Fri, 21 Mar 2014 21:23:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LLN2A3017611; Fri, 21 Mar 2014 21:23:02 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LLN26d017610; Fri, 21 Mar 2014 21:23:02 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212123.s2LLN26d017610@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 21:23:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263549 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 21:23:02 -0000 Author: gjb Date: Fri Mar 21 21:23:02 2014 New Revision: 263549 URL: http://svnweb.freebsd.org/changeset/base/263549 Log: Fix SA sorting. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 21:23:00 2014 (r263548) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 21:23:02 2014 (r263549) @@ -98,17 +98,17 @@ - FreeBSD-SA-14:04.bind + FreeBSD-SA-14:02.ntpd 1 January 2014 - Remote denial of service - vulnerability + Disable monitor feature in + &man.ntpd.8; by default - FreeBSD-SA-14:02.ntpd + FreeBSD-SA-14:04.bind 1 January 2014 - Disable monitor feature in - &man.ntpd.8; by default + Remote denial of service + vulnerability From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 21:23:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A6EBC84; Fri, 21 Mar 2014 21:23:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7717835B; Fri, 21 Mar 2014 21:23:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LLN45N017658; Fri, 21 Mar 2014 21:23:04 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LLN4h9017657; Fri, 21 Mar 2014 21:23:04 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212123.s2LLN4h9017657@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 21:23:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263550 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 21:23:05 -0000 Author: gjb Date: Fri Mar 21 21:23:03 2014 New Revision: 263550 URL: http://svnweb.freebsd.org/changeset/base/263550 Log: Document r260642, FreeBSD-SA-14:01.bsnmpd. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 21:23:02 2014 (r263549) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 21:23:03 2014 (r263550) @@ -98,6 +98,13 @@ + FreeBSD-SA-14:01.bsnmpd + 1 January 2014 + Fix &man.bsnmpd.1; remote denial of service + vulnerability + + + FreeBSD-SA-14:02.ntpd 1 January 2014 Disable monitor feature in From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 21:23:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0DCC7DA4; Fri, 21 Mar 2014 21:23:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5D2F235C; Fri, 21 Mar 2014 21:23:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LLN6T6017696; Fri, 21 Mar 2014 21:23:06 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LLN6BV017694; Fri, 21 Mar 2014 21:23:06 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212123.s2LLN6BV017694@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 21:23:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263551 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 21:23:08 -0000 Author: gjb Date: Fri Mar 21 21:23:05 2014 New Revision: 263551 URL: http://svnweb.freebsd.org/changeset/base/263551 Log: Document r260507. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 21:23:03 2014 (r263550) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 21:23:05 2014 (r263551) @@ -252,6 +252,14 @@ Userland Changes + The &man.gmirror.8; utility now prevents + deactivating the last component of a mirror. + + A new &man.gmirror.8; command, + gmirror destroy, has been added, which will + destroy the &man.geom.8; and erase the &man.gmirror.8; + metadata. + The &man.etcupdate.8; utility, a tool for managing updates to files in /etc, has been merged from From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 21:23:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6DBCFDF5; Fri, 21 Mar 2014 21:23:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5B1E635D; Fri, 21 Mar 2014 21:23:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LLN8lU017733; Fri, 21 Mar 2014 21:23:08 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LLN8Wd017732; Fri, 21 Mar 2014 21:23:08 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212123.s2LLN8Wd017732@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 21:23:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263552 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 21:23:08 -0000 Author: gjb Date: Fri Mar 21 21:23:07 2014 New Revision: 263552 URL: http://svnweb.freebsd.org/changeset/base/263552 Log: Document r260433. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 21:23:05 2014 (r263551) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 21:23:07 2014 (r263552) @@ -125,6 +125,14 @@ Kernel Changes + A new &man.sysctl.8;, + kern.panic_reboot_wait_time, has been + added. This allows tuning the amount of time the system + will wait before rebooting after &man.panic.9;. The + kern.panic_reboot_wait_time value defaults + to the kernel configuration option, + PANIC_REBOOT_WAIT_TIME. + Hardware Random Number Generators have been disabled by default. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 21:50:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5DBE7B8; Fri, 21 Mar 2014 21:50:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C26897AC; Fri, 21 Mar 2014 21:50:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LLoCdm028392; Fri, 21 Mar 2014 21:50:12 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LLoCOu028391; Fri, 21 Mar 2014 21:50:12 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212150.s2LLoCOu028391@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 21:50:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263553 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 21:50:12 -0000 Author: gjb Date: Fri Mar 21 21:50:12 2014 New Revision: 263553 URL: http://svnweb.freebsd.org/changeset/base/263553 Log: Document r260432. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 21:23:07 2014 (r263552) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 21:50:12 2014 (r263553) @@ -376,7 +376,9 @@ &man.rc.8; Scripts -   + The &man.rc.8; system will now + re-source &man.rc.conf.5; on receipt of + SIGALRM. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 21:50:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C88E288C; Fri, 21 Mar 2014 21:50:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B61577AD; Fri, 21 Mar 2014 21:50:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LLoEvx028430; Fri, 21 Mar 2014 21:50:14 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LLoE2v028429; Fri, 21 Mar 2014 21:50:14 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212150.s2LLoE2v028429@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 21:50:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263554 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 21:50:14 -0000 Author: gjb Date: Fri Mar 21 21:50:14 2014 New Revision: 263554 URL: http://svnweb.freebsd.org/changeset/base/263554 Log: Document r260252. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 21:50:12 2014 (r263553) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 21:50:14 2014 (r263554) @@ -216,6 +216,10 @@ Network Interface Support + The &man.bxe.4; driver has been + merged from head/, providing support + for Broadcom NetXtreme II 10Gb PCIe adapters. + The &man.run.4; driver has been updated to include support for the MediaTek/Ralink RT3593 chipset. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 21:50:16 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C53489B4; Fri, 21 Mar 2014 21:50:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9FD147AF; Fri, 21 Mar 2014 21:50:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LLoGCT028471; Fri, 21 Mar 2014 21:50:16 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LLoGUS028470; Fri, 21 Mar 2014 21:50:16 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212150.s2LLoGUS028470@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 21:50:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263555 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 21:50:16 -0000 Author: gjb Date: Fri Mar 21 21:50:16 2014 New Revision: 263555 URL: http://svnweb.freebsd.org/changeset/base/263555 Log: Document r260208. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 21:50:14 2014 (r263554) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 21:50:16 2014 (r263555) @@ -264,6 +264,10 @@ Userland Changes + The &man.protect.1; command has been + added, which allows exempting processes from being killed + when swap is exhausted. + The &man.gmirror.8; utility now prevents deactivating the last component of a mirror. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 21:50:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B392D05; Fri, 21 Mar 2014 21:50:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3858181D; Fri, 21 Mar 2014 21:50:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LLoOaa028829; Fri, 21 Mar 2014 21:50:24 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LLoOlx028828; Fri, 21 Mar 2014 21:50:24 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212150.s2LLoOlx028828@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 21:50:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263559 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 21:50:24 -0000 Author: gjb Date: Fri Mar 21 21:50:23 2014 New Revision: 263559 URL: http://svnweb.freebsd.org/changeset/base/263559 Log: Document r260082. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 21:50:21 2014 (r263558) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 21:50:23 2014 (r263559) @@ -125,6 +125,9 @@ Kernel Changes + A kernel panic triggered by some + multi-threaded applications has been fixed. + The &man.runfw.4; firmware has been renamed from runfw to run.fw for consistency with other firmware From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 21:50:19 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6139EADC; Fri, 21 Mar 2014 21:50:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9EB7D819; Fri, 21 Mar 2014 21:50:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LLoIgF028515; Fri, 21 Mar 2014 21:50:18 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LLoIuY028514; Fri, 21 Mar 2014 21:50:18 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212150.s2LLoIuY028514@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 21:50:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263556 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 21:50:19 -0000 Author: gjb Date: Fri Mar 21 21:50:18 2014 New Revision: 263556 URL: http://svnweb.freebsd.org/changeset/base/263556 Log: Document r260197. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 21:50:16 2014 (r263555) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 21:50:18 2014 (r263556) @@ -264,6 +264,9 @@ Userland Changes + The &man.ps.1; utility will no longer + truncate the command output column. + The &man.protect.1; command has been added, which allows exempting processes from being killed when swap is exhausted. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 21:50:20 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 91618AF4; Fri, 21 Mar 2014 21:50:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7ED6E81A; Fri, 21 Mar 2014 21:50:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LLoK61028554; Fri, 21 Mar 2014 21:50:20 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LLoKMe028553; Fri, 21 Mar 2014 21:50:20 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212150.s2LLoKMe028553@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 21:50:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263557 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 21:50:20 -0000 Author: gjb Date: Fri Mar 21 21:50:20 2014 New Revision: 263557 URL: http://svnweb.freebsd.org/changeset/base/263557 Log: Document r260134. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 21:50:18 2014 (r263556) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 21:50:20 2014 (r263557) @@ -125,6 +125,11 @@ Kernel Changes + The &man.runfw.4; firmware has been + renamed from runfw to + run.fw for consistency with other firmware + files. + A new &man.sysctl.8;, kern.panic_reboot_wait_time, has been added. This allows tuning the amount of time the system From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 21:50:23 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71C5DCE9; Fri, 21 Mar 2014 21:50:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5E79181B; Fri, 21 Mar 2014 21:50:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LLoMwT028594; Fri, 21 Mar 2014 21:50:22 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LLoMuA028592; Fri, 21 Mar 2014 21:50:22 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212150.s2LLoMuA028592@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 21:50:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263558 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 21:50:23 -0000 Author: gjb Date: Fri Mar 21 21:50:21 2014 New Revision: 263558 URL: http://svnweb.freebsd.org/changeset/base/263558 Log: Document r260119. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 21:50:20 2014 (r263557) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 21:50:21 2014 (r263558) @@ -221,6 +221,9 @@ Network Interface Support + The &man.run.4; firmware has been + updated to version 0.33. + The &man.bxe.4; driver has been merged from head/, providing support for Broadcom NetXtreme II 10Gb PCIe adapters. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 21:59:20 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E36235C; Fri, 21 Mar 2014 21:59:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 38600893; Fri, 21 Mar 2014 21:59:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LLxKre030858; Fri, 21 Mar 2014 21:59:20 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LLxBvS030801; Fri, 21 Mar 2014 21:59:11 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201403212159.s2LLxBvS030801@svn.freebsd.org> From: Dimitry Andric Date: Fri, 21 Mar 2014 21:59:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263560 - in stable/9/contrib/compiler-rt: . lib lib/arm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 21:59:20 -0000 Author: dim Date: Fri Mar 21 21:59:11 2014 New Revision: 263560 URL: http://svnweb.freebsd.org/changeset/base/263560 Log: MFC 239138 (by andrew): Import compiler-rt r160957. This is mostly a no-op other than for ARM where it adds missing __aeabi_mem* and __aeabi_*divmod functions. Even on ARM these will remain unused until the rest of the ARM EABI code is merged. MFC 245628 (by andrew): Import compiler-rt r172839. This brings in __aeabi_lcmp and __aeabi_ulcmp. It also fixes the spelling of __aeabi_f2lz. Both changes originated on the arm_eabi project branch. MFC 245641: Add a newline at the end of the file to stop gcc from complaining MFC 245642 (by andrew): Don't use the pcs attribute on compilers that don't support it. We can revert this when we stop supporting old versions of gcc. Added: stable/9/contrib/compiler-rt/lib/arm/aeabi_idivmod.S - copied unchanged from r239138, head/contrib/compiler-rt/lib/arm/aeabi_idivmod.S stable/9/contrib/compiler-rt/lib/arm/aeabi_ldivmod.S - copied unchanged from r239138, head/contrib/compiler-rt/lib/arm/aeabi_ldivmod.S stable/9/contrib/compiler-rt/lib/arm/aeabi_memcmp.S - copied unchanged from r239138, head/contrib/compiler-rt/lib/arm/aeabi_memcmp.S stable/9/contrib/compiler-rt/lib/arm/aeabi_memcpy.S - copied unchanged from r239138, head/contrib/compiler-rt/lib/arm/aeabi_memcpy.S stable/9/contrib/compiler-rt/lib/arm/aeabi_memmove.S - copied unchanged from r239138, head/contrib/compiler-rt/lib/arm/aeabi_memmove.S stable/9/contrib/compiler-rt/lib/arm/aeabi_memset.S - copied unchanged from r239138, head/contrib/compiler-rt/lib/arm/aeabi_memset.S stable/9/contrib/compiler-rt/lib/arm/aeabi_uidivmod.S - copied unchanged from r239138, head/contrib/compiler-rt/lib/arm/aeabi_uidivmod.S stable/9/contrib/compiler-rt/lib/arm/aeabi_uldivmod.S - copied, changed from r239138, head/contrib/compiler-rt/lib/arm/aeabi_uldivmod.S stable/9/contrib/compiler-rt/lib/atomic.c - copied unchanged from r239138, head/contrib/compiler-rt/lib/atomic.c Modified: stable/9/contrib/compiler-rt/LICENSE.TXT stable/9/contrib/compiler-rt/lib/absvti2.c stable/9/contrib/compiler-rt/lib/adddf3.c stable/9/contrib/compiler-rt/lib/addsf3.c stable/9/contrib/compiler-rt/lib/addvti3.c stable/9/contrib/compiler-rt/lib/arm/divsi3.S stable/9/contrib/compiler-rt/lib/arm/udivsi3.S stable/9/contrib/compiler-rt/lib/ashldi3.c stable/9/contrib/compiler-rt/lib/ashlti3.c stable/9/contrib/compiler-rt/lib/ashrdi3.c stable/9/contrib/compiler-rt/lib/ashrti3.c stable/9/contrib/compiler-rt/lib/assembly.h stable/9/contrib/compiler-rt/lib/clzti2.c stable/9/contrib/compiler-rt/lib/cmpdi2.c stable/9/contrib/compiler-rt/lib/cmpti2.c stable/9/contrib/compiler-rt/lib/ctzti2.c stable/9/contrib/compiler-rt/lib/divdf3.c stable/9/contrib/compiler-rt/lib/divmoddi4.c stable/9/contrib/compiler-rt/lib/divsf3.c stable/9/contrib/compiler-rt/lib/divsi3.c stable/9/contrib/compiler-rt/lib/divti3.c stable/9/contrib/compiler-rt/lib/extendsfdf2.c stable/9/contrib/compiler-rt/lib/ffsti2.c stable/9/contrib/compiler-rt/lib/fixdfdi.c stable/9/contrib/compiler-rt/lib/fixdfsi.c stable/9/contrib/compiler-rt/lib/fixdfti.c stable/9/contrib/compiler-rt/lib/fixsfdi.c stable/9/contrib/compiler-rt/lib/fixsfsi.c stable/9/contrib/compiler-rt/lib/fixsfti.c stable/9/contrib/compiler-rt/lib/fixunsdfdi.c stable/9/contrib/compiler-rt/lib/fixunsdfsi.c stable/9/contrib/compiler-rt/lib/fixunsdfti.c stable/9/contrib/compiler-rt/lib/fixunssfdi.c stable/9/contrib/compiler-rt/lib/fixunssfsi.c stable/9/contrib/compiler-rt/lib/fixunssfti.c stable/9/contrib/compiler-rt/lib/fixunsxfti.c stable/9/contrib/compiler-rt/lib/fixxfti.c stable/9/contrib/compiler-rt/lib/floatdidf.c stable/9/contrib/compiler-rt/lib/floatdisf.c stable/9/contrib/compiler-rt/lib/floatsidf.c stable/9/contrib/compiler-rt/lib/floatsisf.c stable/9/contrib/compiler-rt/lib/floattidf.c stable/9/contrib/compiler-rt/lib/floattisf.c stable/9/contrib/compiler-rt/lib/floattixf.c stable/9/contrib/compiler-rt/lib/floatundidf.c stable/9/contrib/compiler-rt/lib/floatundisf.c stable/9/contrib/compiler-rt/lib/floatunsidf.c stable/9/contrib/compiler-rt/lib/floatunsisf.c stable/9/contrib/compiler-rt/lib/floatuntidf.c stable/9/contrib/compiler-rt/lib/floatuntisf.c stable/9/contrib/compiler-rt/lib/floatuntixf.c stable/9/contrib/compiler-rt/lib/fp_lib.h stable/9/contrib/compiler-rt/lib/int_endianness.h stable/9/contrib/compiler-rt/lib/int_lib.h stable/9/contrib/compiler-rt/lib/int_util.c stable/9/contrib/compiler-rt/lib/int_util.h stable/9/contrib/compiler-rt/lib/lshrdi3.c stable/9/contrib/compiler-rt/lib/lshrti3.c stable/9/contrib/compiler-rt/lib/modti3.c stable/9/contrib/compiler-rt/lib/muldf3.c stable/9/contrib/compiler-rt/lib/muldi3.c stable/9/contrib/compiler-rt/lib/muloti4.c stable/9/contrib/compiler-rt/lib/mulsf3.c stable/9/contrib/compiler-rt/lib/multi3.c stable/9/contrib/compiler-rt/lib/mulvti3.c stable/9/contrib/compiler-rt/lib/negdf2.c stable/9/contrib/compiler-rt/lib/negsf2.c stable/9/contrib/compiler-rt/lib/negti2.c stable/9/contrib/compiler-rt/lib/negvti2.c stable/9/contrib/compiler-rt/lib/parityti2.c stable/9/contrib/compiler-rt/lib/popcountti2.c stable/9/contrib/compiler-rt/lib/powitf2.c stable/9/contrib/compiler-rt/lib/subdf3.c stable/9/contrib/compiler-rt/lib/subsf3.c stable/9/contrib/compiler-rt/lib/subvti3.c stable/9/contrib/compiler-rt/lib/truncdfsf2.c stable/9/contrib/compiler-rt/lib/ucmpdi2.c stable/9/contrib/compiler-rt/lib/ucmpti2.c stable/9/contrib/compiler-rt/lib/udivmoddi4.c stable/9/contrib/compiler-rt/lib/udivmodti4.c stable/9/contrib/compiler-rt/lib/udivsi3.c stable/9/contrib/compiler-rt/lib/udivti3.c stable/9/contrib/compiler-rt/lib/umodti3.c Directory Properties: stable/9/contrib/compiler-rt/ (props changed) Modified: stable/9/contrib/compiler-rt/LICENSE.TXT ============================================================================== --- stable/9/contrib/compiler-rt/LICENSE.TXT Fri Mar 21 21:50:23 2014 (r263559) +++ stable/9/contrib/compiler-rt/LICENSE.TXT Fri Mar 21 21:59:11 2014 (r263560) @@ -14,7 +14,7 @@ Full text of the relevant licenses is in University of Illinois/NCSA Open Source License -Copyright (c) 2009-2012 by the contributors listed in CREDITS.TXT +Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT All rights reserved. @@ -55,7 +55,7 @@ SOFTWARE. ============================================================================== -Copyright (c) 2009-2012 by the contributors listed in CREDITS.TXT +Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -94,5 +94,4 @@ licenses, and/or restrictions: Program Directory ------- --------- -sysinfo lib/asan/sysinfo -mach_override lib/asan/mach_override +mach_override lib/interception/mach_override Modified: stable/9/contrib/compiler-rt/lib/absvti2.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/absvti2.c Fri Mar 21 21:50:23 2014 (r263559) +++ stable/9/contrib/compiler-rt/lib/absvti2.c Fri Mar 21 21:59:11 2014 (r263560) @@ -12,10 +12,10 @@ * ===----------------------------------------------------------------------=== */ -#if __x86_64 - #include "int_lib.h" +#if __x86_64 + /* Returns: absolute value */ /* Effects: aborts if abs(x) < 0 */ Modified: stable/9/contrib/compiler-rt/lib/adddf3.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/adddf3.c Fri Mar 21 21:50:23 2014 (r263559) +++ stable/9/contrib/compiler-rt/lib/adddf3.c Fri Mar 21 21:59:11 2014 (r263560) @@ -15,7 +15,7 @@ #define DOUBLE_PRECISION #include "fp_lib.h" -ARM_EABI_FNALIAS(dadd, adddf3); +ARM_EABI_FNALIAS(dadd, adddf3) COMPILER_RT_ABI fp_t __adddf3(fp_t a, fp_t b) { @@ -85,7 +85,7 @@ __adddf3(fp_t a, fp_t b) { // Shift the significand of b by the difference in exponents, with a sticky // bottom bit to get rounding correct. - const int align = aExponent - bExponent; + const unsigned int align = aExponent - bExponent; if (align) { if (align < typeWidth) { const bool sticky = bSignificand << (typeWidth - align); Modified: stable/9/contrib/compiler-rt/lib/addsf3.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/addsf3.c Fri Mar 21 21:50:23 2014 (r263559) +++ stable/9/contrib/compiler-rt/lib/addsf3.c Fri Mar 21 21:59:11 2014 (r263560) @@ -15,7 +15,7 @@ #define SINGLE_PRECISION #include "fp_lib.h" -ARM_EABI_FNALIAS(fadd, addsf3); +ARM_EABI_FNALIAS(fadd, addsf3) fp_t __addsf3(fp_t a, fp_t b) { @@ -84,7 +84,7 @@ fp_t __addsf3(fp_t a, fp_t b) { // Shift the significand of b by the difference in exponents, with a sticky // bottom bit to get rounding correct. - const int align = aExponent - bExponent; + const unsigned int align = aExponent - bExponent; if (align) { if (align < typeWidth) { const bool sticky = bSignificand << (typeWidth - align); Modified: stable/9/contrib/compiler-rt/lib/addvti3.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/addvti3.c Fri Mar 21 21:50:23 2014 (r263559) +++ stable/9/contrib/compiler-rt/lib/addvti3.c Fri Mar 21 21:59:11 2014 (r263560) @@ -12,10 +12,10 @@ * ===----------------------------------------------------------------------=== */ -#if __x86_64 - #include "int_lib.h" +#if __x86_64 + /* Returns: a + b */ /* Effects: aborts if a + b overflows */ Copied: stable/9/contrib/compiler-rt/lib/arm/aeabi_idivmod.S (from r239138, head/contrib/compiler-rt/lib/arm/aeabi_idivmod.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/compiler-rt/lib/arm/aeabi_idivmod.S Fri Mar 21 21:59:11 2014 (r263560, copy of r239138, head/contrib/compiler-rt/lib/arm/aeabi_idivmod.S) @@ -0,0 +1,27 @@ +//===-- aeabi_idivmod.S - EABI idivmod implementation ---------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "../assembly.h" + +// struct { int quot, int rem} __aeabi_idivmod(int numerator, int denominator) { +// int rem, quot; +// quot = __divmodsi4(numerator, denominator, &rem); +// return {quot, rem}; +// } + + .syntax unified + .align 2 +DEFINE_COMPILERRT_FUNCTION(__aeabi_idivmod) + push { lr } + sub sp, sp, #4 + mov r2, sp + bl SYMBOL_NAME(__divmodsi4) + ldr r1, [sp] + add sp, sp, #4 + pop { pc } Copied: stable/9/contrib/compiler-rt/lib/arm/aeabi_ldivmod.S (from r239138, head/contrib/compiler-rt/lib/arm/aeabi_ldivmod.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/compiler-rt/lib/arm/aeabi_ldivmod.S Fri Mar 21 21:59:11 2014 (r263560, copy of r239138, head/contrib/compiler-rt/lib/arm/aeabi_ldivmod.S) @@ -0,0 +1,30 @@ +//===-- aeabi_ldivmod.S - EABI ldivmod implementation ---------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "../assembly.h" + +// struct { int64_t quot, int64_t rem} +// __aeabi_ldivmod(int64_t numerator, int64_t denominator) { +// int64_t rem, quot; +// quot = __divmoddi4(numerator, denominator, &rem); +// return {quot, rem}; +// } + + .syntax unified + .align 2 +DEFINE_COMPILERRT_FUNCTION(__aeabi_ldivmod) + push {r11, lr} + sub sp, sp, #16 + add r12, sp, #8 + str r12, [sp] + bl SYMBOL_NAME(__divmoddi4) + ldr r2, [sp, #8] + ldr r3, [sp, #12] + add sp, sp, #16 + pop {r11, pc} Copied: stable/9/contrib/compiler-rt/lib/arm/aeabi_memcmp.S (from r239138, head/contrib/compiler-rt/lib/arm/aeabi_memcmp.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/compiler-rt/lib/arm/aeabi_memcmp.S Fri Mar 21 21:59:11 2014 (r263560, copy of r239138, head/contrib/compiler-rt/lib/arm/aeabi_memcmp.S) @@ -0,0 +1,19 @@ +//===-- aeabi_memcmp.S - EABI memcmp implementation -----------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "../assembly.h" + +// void __aeabi_memcmp(void *dest, void *src, size_t n) { memcmp(dest, src, n); } + + .align 2 +DEFINE_COMPILERRT_FUNCTION(__aeabi_memcmp) + b memcmp + +DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memcmp4, __aeabi_memcmp) +DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memcmp8, __aeabi_memcmp) Copied: stable/9/contrib/compiler-rt/lib/arm/aeabi_memcpy.S (from r239138, head/contrib/compiler-rt/lib/arm/aeabi_memcpy.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/compiler-rt/lib/arm/aeabi_memcpy.S Fri Mar 21 21:59:11 2014 (r263560, copy of r239138, head/contrib/compiler-rt/lib/arm/aeabi_memcpy.S) @@ -0,0 +1,19 @@ +//===-- aeabi_memcpy.S - EABI memcpy implementation -----------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "../assembly.h" + +// void __aeabi_memcpy(void *dest, void *src, size_t n) { memcpy(dest, src, n); } + + .align 2 +DEFINE_COMPILERRT_FUNCTION(__aeabi_memcpy) + b memcpy + +DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memcpy4, __aeabi_memcpy) +DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memcpy8, __aeabi_memcpy) Copied: stable/9/contrib/compiler-rt/lib/arm/aeabi_memmove.S (from r239138, head/contrib/compiler-rt/lib/arm/aeabi_memmove.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/compiler-rt/lib/arm/aeabi_memmove.S Fri Mar 21 21:59:11 2014 (r263560, copy of r239138, head/contrib/compiler-rt/lib/arm/aeabi_memmove.S) @@ -0,0 +1,19 @@ +//===-- aeabi_memmove.S - EABI memmove implementation --------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===---------------------------------------------------------------------===// + +#include "../assembly.h" + +// void __aeabi_memmove(void *dest, void *src, size_t n) { memmove(dest, src, n); } + + .align 2 +DEFINE_COMPILERRT_FUNCTION(__aeabi_memmove) + b memmove + +DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memmove4, __aeabi_memmove) +DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memmove8, __aeabi_memmove) Copied: stable/9/contrib/compiler-rt/lib/arm/aeabi_memset.S (from r239138, head/contrib/compiler-rt/lib/arm/aeabi_memset.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/compiler-rt/lib/arm/aeabi_memset.S Fri Mar 21 21:59:11 2014 (r263560, copy of r239138, head/contrib/compiler-rt/lib/arm/aeabi_memset.S) @@ -0,0 +1,32 @@ +//===-- aeabi_memset.S - EABI memset implementation -----------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "../assembly.h" + +// void __aeabi_memset(void *dest, size_t n, int c) { memset(dest, c, n); } +// void __aeabi_memclr(void *dest, size_t n) { __aeabi_memset(dest, n, 0); } + + .align 2 +DEFINE_COMPILERRT_FUNCTION(__aeabi_memset) + mov r3, r1 + mov r1, r2 + mov r2, r3 + b memset + +DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memset4, __aeabi_memset) +DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memset8, __aeabi_memset) + +DEFINE_COMPILERRT_FUNCTION(__aeabi_memclr) + mov r2, r1 + mov r1, #0 + b memset + +DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memclr4, __aeabi_memclr) +DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memclr8, __aeabi_memclr) + Copied: stable/9/contrib/compiler-rt/lib/arm/aeabi_uidivmod.S (from r239138, head/contrib/compiler-rt/lib/arm/aeabi_uidivmod.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/compiler-rt/lib/arm/aeabi_uidivmod.S Fri Mar 21 21:59:11 2014 (r263560, copy of r239138, head/contrib/compiler-rt/lib/arm/aeabi_uidivmod.S) @@ -0,0 +1,28 @@ +//===-- aeabi_uidivmod.S - EABI uidivmod implementation -------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "../assembly.h" + +// struct { unsigned quot, unsigned rem} +// __aeabi_uidivmod(unsigned numerator, unsigned denominator) { +// unsigned rem, quot; +// quot = __udivmodsi4(numerator, denominator, &rem); +// return {quot, rem}; +// } + + .syntax unified + .align 2 +DEFINE_COMPILERRT_FUNCTION(__aeabi_uidivmod) + push { lr } + sub sp, sp, #4 + mov r2, sp + bl SYMBOL_NAME(__udivmodsi4) + ldr r1, [sp] + add sp, sp, #4 + pop { pc } Copied and modified: stable/9/contrib/compiler-rt/lib/arm/aeabi_uldivmod.S (from r239138, head/contrib/compiler-rt/lib/arm/aeabi_uldivmod.S) ============================================================================== --- head/contrib/compiler-rt/lib/arm/aeabi_uldivmod.S Wed Aug 8 09:42:44 2012 (r239138, copy source) +++ stable/9/contrib/compiler-rt/lib/arm/aeabi_uldivmod.S Fri Mar 21 21:59:11 2014 (r263560) @@ -27,4 +27,5 @@ DEFINE_COMPILERRT_FUNCTION(__aeabi_uldiv ldr r2, [sp, #8] ldr r3, [sp, #12] add sp, sp, #16 - pop {r11, pc} \ No newline at end of file + pop {r11, pc} + Modified: stable/9/contrib/compiler-rt/lib/arm/divsi3.S ============================================================================== --- stable/9/contrib/compiler-rt/lib/arm/divsi3.S Fri Mar 21 21:50:23 2014 (r263559) +++ stable/9/contrib/compiler-rt/lib/arm/divsi3.S Fri Mar 21 21:59:11 2014 (r263560) @@ -25,7 +25,16 @@ // Ok, APCS and AAPCS agree on 32 bit args, so it's safe to use the same routine. DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_idiv, __divsi3) DEFINE_COMPILERRT_FUNCTION(__divsi3) - ESTABLISH_FRAME +#if __ARM_ARCH_7S__ + tst r1,r1 + beq LOCAL_LABEL(divzero) + sdiv r0, r0, r1 + bx lr +LOCAL_LABEL(divzero): + mov r0,#0 + bx lr +#else +ESTABLISH_FRAME // Set aside the sign of the quotient. eor r4, r0, r1 // Take absolute value of a and b via abs(x) = (x^(x >> 31)) - (x >> 31). @@ -39,3 +48,4 @@ DEFINE_COMPILERRT_FUNCTION(__divsi3) eor r0, r0, r4, asr #31 sub r0, r0, r4, asr #31 CLEAR_FRAME_AND_RETURN +#endif Modified: stable/9/contrib/compiler-rt/lib/arm/udivsi3.S ============================================================================== --- stable/9/contrib/compiler-rt/lib/arm/udivsi3.S Fri Mar 21 21:50:23 2014 (r263559) +++ stable/9/contrib/compiler-rt/lib/arm/udivsi3.S Fri Mar 21 21:59:11 2014 (r263560) @@ -33,6 +33,15 @@ // Ok, APCS and AAPCS agree on 32 bit args, so it's safe to use the same routine. DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_uidiv, __udivsi3) DEFINE_COMPILERRT_FUNCTION(__udivsi3) +#if __ARM_ARCH_7S__ + tst r1,r1 + beq LOCAL_LABEL(divzero) + udiv r0, r0, r1 + bx lr + LOCAL_LABEL(divzero): + mov r0,#0 + bx lr +#else // We use a simple digit by digit algorithm; before we get into the actual // divide loop, we must calculate the left-shift amount necessary to align // the MSB of the divisor with that of the dividend (If this shift is @@ -78,3 +87,4 @@ LOCAL_LABEL(return): // Move the quotient to r0 and return. mov r0, q CLEAR_FRAME_AND_RETURN +#endif Modified: stable/9/contrib/compiler-rt/lib/ashldi3.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/ashldi3.c Fri Mar 21 21:50:23 2014 (r263559) +++ stable/9/contrib/compiler-rt/lib/ashldi3.c Fri Mar 21 21:59:11 2014 (r263560) @@ -18,7 +18,7 @@ /* Precondition: 0 <= b < bits_in_dword */ -ARM_EABI_FNALIAS(llsl, ashldi3); +ARM_EABI_FNALIAS(llsl, ashldi3) COMPILER_RT_ABI di_int __ashldi3(di_int a, si_int b) Modified: stable/9/contrib/compiler-rt/lib/ashlti3.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/ashlti3.c Fri Mar 21 21:50:23 2014 (r263559) +++ stable/9/contrib/compiler-rt/lib/ashlti3.c Fri Mar 21 21:59:11 2014 (r263560) @@ -12,10 +12,10 @@ * ===----------------------------------------------------------------------=== */ -#if __x86_64 - #include "int_lib.h" +#if __x86_64 + /* Returns: a << b */ /* Precondition: 0 <= b < bits_in_tword */ Modified: stable/9/contrib/compiler-rt/lib/ashrdi3.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/ashrdi3.c Fri Mar 21 21:50:23 2014 (r263559) +++ stable/9/contrib/compiler-rt/lib/ashrdi3.c Fri Mar 21 21:59:11 2014 (r263560) @@ -18,7 +18,7 @@ /* Precondition: 0 <= b < bits_in_dword */ -ARM_EABI_FNALIAS(lasr, ashrdi3); +ARM_EABI_FNALIAS(lasr, ashrdi3) COMPILER_RT_ABI di_int __ashrdi3(di_int a, si_int b) Modified: stable/9/contrib/compiler-rt/lib/ashrti3.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/ashrti3.c Fri Mar 21 21:50:23 2014 (r263559) +++ stable/9/contrib/compiler-rt/lib/ashrti3.c Fri Mar 21 21:59:11 2014 (r263560) @@ -12,10 +12,10 @@ * ===----------------------------------------------------------------------=== */ -#if __x86_64 - #include "int_lib.h" +#if __x86_64 + /* Returns: arithmetic a >> b */ /* Precondition: 0 <= b < bits_in_tword */ Modified: stable/9/contrib/compiler-rt/lib/assembly.h ============================================================================== --- stable/9/contrib/compiler-rt/lib/assembly.h Fri Mar 21 21:50:23 2014 (r263559) +++ stable/9/contrib/compiler-rt/lib/assembly.h Fri Mar 21 21:59:11 2014 (r263560) @@ -25,9 +25,11 @@ #if defined(__APPLE__) #define HIDDEN_DIRECTIVE .private_extern #define LOCAL_LABEL(name) L_##name +#define FILE_LEVEL_DIRECTIVE .subsections_via_symbols #else #define HIDDEN_DIRECTIVE .hidden #define LOCAL_LABEL(name) .L_##name +#define FILE_LEVEL_DIRECTIVE #endif #define GLUE2(a, b) a ## b @@ -42,6 +44,7 @@ #endif #define DEFINE_COMPILERRT_FUNCTION(name) \ + FILE_LEVEL_DIRECTIVE SEPARATOR \ .globl SYMBOL_NAME(name) SEPARATOR \ DECLARE_SYMBOL_VISIBILITY(name) \ SYMBOL_NAME(name): Copied: stable/9/contrib/compiler-rt/lib/atomic.c (from r239138, head/contrib/compiler-rt/lib/atomic.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/compiler-rt/lib/atomic.c Fri Mar 21 21:59:11 2014 (r263560, copy of r239138, head/contrib/compiler-rt/lib/atomic.c) @@ -0,0 +1,315 @@ +/*===-- atomic.c - Implement support functions for atomic operations.------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + *===----------------------------------------------------------------------=== + * + * atomic.c defines a set of functions for performing atomic accesses on + * arbitrary-sized memory locations. This design uses locks that should + * be fast in the uncontended case, for two reasons: + * + * 1) This code must work with C programs that do not link to anything + * (including pthreads) and so it should not depend on any pthread + * functions. + * 2) Atomic operations, rather than explicit mutexes, are most commonly used + * on code where contended operations are rate. + * + * To avoid needing a per-object lock, this code allocates an array of + * locks and hashes the object pointers to find the one that it should use. + * For operations that must be atomic on two locations, the lower lock is + * always acquired first, to avoid deadlock. + * + *===----------------------------------------------------------------------=== + */ + +#include +#include + +// Clang objects if you redefine a builtin. This little hack allows us to +// define a function with the same name as an intrinsic. +#pragma redefine_extname __atomic_load_c __atomic_load +#pragma redefine_extname __atomic_store_c __atomic_store +#pragma redefine_extname __atomic_exchange_c __atomic_exchange +#pragma redefine_extname __atomic_compare_exchange_c __atomic_compare_exchange + +/// Number of locks. This allocates one page on 32-bit platforms, two on +/// 64-bit. This can be specified externally if a different trade between +/// memory usage and contention probability is required for a given platform. +#ifndef SPINLOCK_COUNT +#define SPINLOCK_COUNT (1<<10) +#endif +static const long SPINLOCK_MASK = SPINLOCK_COUNT - 1; + +//////////////////////////////////////////////////////////////////////////////// +// Platform-specific lock implementation. Falls back to spinlocks if none is +// defined. Each platform should define the Lock type, and corresponding +// lock() and unlock() functions. +//////////////////////////////////////////////////////////////////////////////// +#ifdef __FreeBSD__ +#include +#include +#include +#include +typedef struct _usem Lock; +inline static void unlock(Lock *l) { + __c11_atomic_store((_Atomic(uint32_t)*)&l->_count, 1, __ATOMIC_RELEASE); + __c11_atomic_thread_fence(__ATOMIC_SEQ_CST); + if (l->_has_waiters) + _umtx_op(l, UMTX_OP_SEM_WAKE, 1, 0, 0); +} +inline static void lock(Lock *l) { + uint32_t old = 1; + while (!__c11_atomic_compare_exchange_weak((_Atomic(uint32_t)*)&l->_count, &old, + 0, __ATOMIC_ACQUIRE, __ATOMIC_RELAXED)) { + _umtx_op(l, UMTX_OP_SEM_WAIT, 0, 0, 0); + old = 1; + } +} +/// locks for atomic operations +static Lock locks[SPINLOCK_COUNT] = { [0 ... SPINLOCK_COUNT-1] = {0,1,0} }; +#else +typedef _Atomic(uintptr_t) Lock; +/// Unlock a lock. This is a release operation. +inline static void unlock(Lock *l) { + __c11_atomic_store(l, 0, __ATOMIC_RELEASE); +} +/// Locks a lock. In the current implementation, this is potentially +/// unbounded in the contended case. +inline static void lock(Lock *l) { + uintptr_t old = 0; + while (!__c11_atomic_compare_exchange_weak(l, &old, 1, __ATOMIC_ACQUIRE, + __ATOMIC_RELAXED)) + old = 0; +} +/// locks for atomic operations +static Lock locks[SPINLOCK_COUNT]; +#endif + + +/// Returns a lock to use for a given pointer. +static inline Lock *lock_for_pointer(void *ptr) { + intptr_t hash = (intptr_t)ptr; + // Disregard the lowest 4 bits. We want all values that may be part of the + // same memory operation to hash to the same value and therefore use the same + // lock. + hash >>= 4; + // Use the next bits as the basis for the hash + intptr_t low = hash & SPINLOCK_MASK; + // Now use the high(er) set of bits to perturb the hash, so that we don't + // get collisions from atomic fields in a single object + hash >>= 16; + hash ^= low; + // Return a pointer to the word to use + return locks + (hash & SPINLOCK_MASK); +} + +/// Macros for determining whether a size is lock free. Clang can not yet +/// codegen __atomic_is_lock_free(16), so for now we assume 16-byte values are +/// not lock free. +#define IS_LOCK_FREE_1 __c11_atomic_is_lock_free(1) +#define IS_LOCK_FREE_2 __c11_atomic_is_lock_free(2) +#define IS_LOCK_FREE_4 __c11_atomic_is_lock_free(4) +#define IS_LOCK_FREE_8 __c11_atomic_is_lock_free(8) +#define IS_LOCK_FREE_16 0 + +/// Macro that calls the compiler-generated lock-free versions of functions +/// when they exist. +#define LOCK_FREE_CASES() \ + do {\ + switch (size) {\ + case 2:\ + if (IS_LOCK_FREE_2) {\ + LOCK_FREE_ACTION(uint16_t);\ + }\ + case 4:\ + if (IS_LOCK_FREE_4) {\ + LOCK_FREE_ACTION(uint32_t);\ + }\ + case 8:\ + if (IS_LOCK_FREE_8) {\ + LOCK_FREE_ACTION(uint64_t);\ + }\ + case 16:\ + if (IS_LOCK_FREE_16) {\ + /* FIXME: __uint128_t isn't available on 32 bit platforms. + LOCK_FREE_ACTION(__uint128_t);*/\ + }\ + }\ + } while (0) + + +/// An atomic load operation. This is atomic with respect to the source +/// pointer only. +void __atomic_load_c(int size, void *src, void *dest, int model) { +#define LOCK_FREE_ACTION(type) \ + *((type*)dest) = __c11_atomic_load((_Atomic(type)*)src, model);\ + return; + LOCK_FREE_CASES(); +#undef LOCK_FREE_ACTION + Lock *l = lock_for_pointer(src); + lock(l); + memcpy(dest, src, size); + unlock(l); +} + +/// An atomic store operation. This is atomic with respect to the destination +/// pointer only. +void __atomic_store_c(int size, void *dest, void *src, int model) { +#define LOCK_FREE_ACTION(type) \ + __c11_atomic_store((_Atomic(type)*)dest, *(type*)dest, model);\ + return; + LOCK_FREE_CASES(); +#undef LOCK_FREE_ACTION + Lock *l = lock_for_pointer(dest); + lock(l); + memcpy(dest, src, size); + unlock(l); +} + +/// Atomic compare and exchange operation. If the value at *ptr is identical +/// to the value at *expected, then this copies value at *desired to *ptr. If +/// they are not, then this stores the current value from *ptr in *expected. +/// +/// This function returns 1 if the exchange takes place or 0 if it fails. +int __atomic_compare_exchange_c(int size, void *ptr, void *expected, + void *desired, int success, int failure) { +#define LOCK_FREE_ACTION(type) \ + return __c11_atomic_compare_exchange_strong((_Atomic(type)*)ptr, (type*)expected,\ + *(type*)desired, success, failure) + LOCK_FREE_CASES(); +#undef LOCK_FREE_ACTION + Lock *l = lock_for_pointer(ptr); + lock(l); + if (memcmp(ptr, expected, size) == 0) { + memcpy(ptr, desired, size); + unlock(l); + return 1; + } + memcpy(expected, ptr, size); + unlock(l); + return 0; +} + +/// Performs an atomic exchange operation between two pointers. This is atomic +/// with respect to the target address. +void __atomic_exchange_c(int size, void *ptr, void *val, void *old, int model) { +#define LOCK_FREE_ACTION(type) \ + *(type*)old = __c11_atomic_exchange((_Atomic(type)*)ptr, *(type*)val,\ + model);\ + return; + LOCK_FREE_CASES(); +#undef LOCK_FREE_ACTION + Lock *l = lock_for_pointer(ptr); + lock(l); + memcpy(old, ptr, size); + memcpy(ptr, val, size); + unlock(l); +} + +//////////////////////////////////////////////////////////////////////////////// +// Where the size is known at compile time, the compiler may emit calls to +// specialised versions of the above functions. +//////////////////////////////////////////////////////////////////////////////// +#define OPTIMISED_CASES\ + OPTIMISED_CASE(1, IS_LOCK_FREE_1, uint8_t)\ + OPTIMISED_CASE(2, IS_LOCK_FREE_2, uint16_t)\ + OPTIMISED_CASE(4, IS_LOCK_FREE_4, uint32_t)\ + OPTIMISED_CASE(8, IS_LOCK_FREE_8, uint64_t)\ + /* FIXME: __uint128_t isn't available on 32 bit platforms. + OPTIMISED_CASE(16, IS_LOCK_FREE_16, __uint128_t)*/\ + +#define OPTIMISED_CASE(n, lockfree, type)\ +type __atomic_load_##n(type *src, int model) {\ + if (lockfree)\ + return __c11_atomic_load((_Atomic(type)*)src, model);\ + Lock *l = lock_for_pointer(src);\ + lock(l);\ + type val = *src;\ + unlock(l);\ + return val;\ +} +OPTIMISED_CASES +#undef OPTIMISED_CASE + +#define OPTIMISED_CASE(n, lockfree, type)\ +void __atomic_store_##n(type *dest, type val, int model) {\ + if (lockfree) {\ + __c11_atomic_store((_Atomic(type)*)dest, val, model);\ + return;\ + }\ + Lock *l = lock_for_pointer(dest);\ + lock(l);\ + *dest = val;\ + unlock(l);\ + return;\ +} +OPTIMISED_CASES +#undef OPTIMISED_CASE + +#define OPTIMISED_CASE(n, lockfree, type)\ +type __atomic_exchange_##n(type *dest, type val, int model) {\ + if (lockfree)\ + return __c11_atomic_exchange((_Atomic(type)*)dest, val, model);\ + Lock *l = lock_for_pointer(dest);\ + lock(l);\ + type tmp = *dest;\ + *dest = val;\ + unlock(l);\ + return tmp;\ +} +OPTIMISED_CASES +#undef OPTIMISED_CASE + +#define OPTIMISED_CASE(n, lockfree, type)\ +int __atomic_compare_exchange_##n(type *ptr, type *expected, type desired,\ + int success, int failure) {\ + if (lockfree)\ + return __c11_atomic_compare_exchange_strong((_Atomic(type)*)ptr, expected, desired,\ + success, failure);\ + Lock *l = lock_for_pointer(ptr);\ + lock(l);\ + if (*ptr == *expected) {\ + *ptr = desired;\ + unlock(l);\ + return 1;\ + }\ + *expected = *ptr;\ + unlock(l);\ + return 0;\ +} +OPTIMISED_CASES +#undef OPTIMISED_CASE + +//////////////////////////////////////////////////////////////////////////////// +// Atomic read-modify-write operations for integers of various sizes. +//////////////////////////////////////////////////////////////////////////////// +#define ATOMIC_RMW(n, lockfree, type, opname, op) \ +type __atomic_fetch_##opname##_##n(type *ptr, type val, int model) {\ + if (lockfree) \ + return __c11_atomic_fetch_##opname((_Atomic(type)*)ptr, val, model);\ + Lock *l = lock_for_pointer(ptr);\ + lock(l);\ + type tmp = *ptr;\ + *ptr = tmp op val;\ + unlock(l);\ + return tmp;\ +} + +#define OPTIMISED_CASE(n, lockfree, type) ATOMIC_RMW(n, lockfree, type, add, +) +OPTIMISED_CASES +#undef OPTIMISED_CASE +#define OPTIMISED_CASE(n, lockfree, type) ATOMIC_RMW(n, lockfree, type, sub, -) +OPTIMISED_CASES +#undef OPTIMISED_CASE +#define OPTIMISED_CASE(n, lockfree, type) ATOMIC_RMW(n, lockfree, type, and, &) +OPTIMISED_CASES +#undef OPTIMISED_CASE +#define OPTIMISED_CASE(n, lockfree, type) ATOMIC_RMW(n, lockfree, type, or, |) +OPTIMISED_CASES +#undef OPTIMISED_CASE +#define OPTIMISED_CASE(n, lockfree, type) ATOMIC_RMW(n, lockfree, type, xor, ^) +OPTIMISED_CASES +#undef OPTIMISED_CASE Modified: stable/9/contrib/compiler-rt/lib/clzti2.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/clzti2.c Fri Mar 21 21:50:23 2014 (r263559) +++ stable/9/contrib/compiler-rt/lib/clzti2.c Fri Mar 21 21:59:11 2014 (r263560) @@ -12,10 +12,10 @@ * ===----------------------------------------------------------------------=== */ -#if __x86_64 - #include "int_lib.h" +#if __x86_64 + /* Returns: the number of leading 0-bits */ /* Precondition: a != 0 */ Modified: stable/9/contrib/compiler-rt/lib/cmpdi2.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/cmpdi2.c Fri Mar 21 21:50:23 2014 (r263559) +++ stable/9/contrib/compiler-rt/lib/cmpdi2.c Fri Mar 21 21:59:11 2014 (r263560) @@ -36,3 +36,16 @@ __cmpdi2(di_int a, di_int b) return 2; return 1; } + +#ifdef __ARM_EABI__ +/* Returns: if (a < b) returns -1 +* if (a == b) returns 0 +* if (a > b) returns 1 +*/ +COMPILER_RT_ABI si_int +__aeabi_lcmp(di_int a, di_int b) +{ + return __cmpdi2(a, b) - 1; +} +#endif + Modified: stable/9/contrib/compiler-rt/lib/cmpti2.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/cmpti2.c Fri Mar 21 21:50:23 2014 (r263559) +++ stable/9/contrib/compiler-rt/lib/cmpti2.c Fri Mar 21 21:59:11 2014 (r263560) @@ -12,10 +12,10 @@ * ===----------------------------------------------------------------------=== */ -#if __x86_64 - #include "int_lib.h" +#if __x86_64 + /* Returns: if (a < b) returns 0 * if (a == b) returns 1 * if (a > b) returns 2 Modified: stable/9/contrib/compiler-rt/lib/ctzti2.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/ctzti2.c Fri Mar 21 21:50:23 2014 (r263559) +++ stable/9/contrib/compiler-rt/lib/ctzti2.c Fri Mar 21 21:59:11 2014 (r263560) @@ -12,10 +12,10 @@ * ===----------------------------------------------------------------------=== */ -#if __x86_64 - #include "int_lib.h" +#if __x86_64 + /* Returns: the number of trailing 0-bits */ /* Precondition: a != 0 */ Modified: stable/9/contrib/compiler-rt/lib/divdf3.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/divdf3.c Fri Mar 21 21:50:23 2014 (r263559) +++ stable/9/contrib/compiler-rt/lib/divdf3.c Fri Mar 21 21:59:11 2014 (r263560) @@ -19,7 +19,7 @@ #define DOUBLE_PRECISION #include "fp_lib.h" -ARM_EABI_FNALIAS(ddiv, divdf3); +ARM_EABI_FNALIAS(ddiv, divdf3) fp_t __divdf3(fp_t a, fp_t b) { Modified: stable/9/contrib/compiler-rt/lib/divmoddi4.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/divmoddi4.c Fri Mar 21 21:50:23 2014 (r263559) +++ stable/9/contrib/compiler-rt/lib/divmoddi4.c Fri Mar 21 21:59:11 2014 (r263560) @@ -16,8 +16,6 @@ extern COMPILER_RT_ABI di_int __divdi3(di_int a, di_int b); -ARM_EABI_FNALIAS(ldivmod, divmoddi4); - /* Returns: a / b, *rem = a % b */ COMPILER_RT_ABI di_int Modified: stable/9/contrib/compiler-rt/lib/divsf3.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/divsf3.c Fri Mar 21 21:50:23 2014 (r263559) +++ stable/9/contrib/compiler-rt/lib/divsf3.c Fri Mar 21 21:59:11 2014 (r263560) @@ -19,7 +19,7 @@ #define SINGLE_PRECISION #include "fp_lib.h" -ARM_EABI_FNALIAS(fdiv, divsf3); +ARM_EABI_FNALIAS(fdiv, divsf3) fp_t __divsf3(fp_t a, fp_t b) { Modified: stable/9/contrib/compiler-rt/lib/divsi3.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/divsi3.c Fri Mar 21 21:50:23 2014 (r263559) +++ stable/9/contrib/compiler-rt/lib/divsi3.c Fri Mar 21 21:59:11 2014 (r263560) @@ -18,7 +18,7 @@ su_int COMPILER_RT_ABI __udivsi3(su_int /* Returns: a / b */ -ARM_EABI_FNALIAS(idiv, divsi3); +ARM_EABI_FNALIAS(idiv, divsi3) COMPILER_RT_ABI si_int __divsi3(si_int a, si_int b) @@ -29,5 +29,11 @@ __divsi3(si_int a, si_int b) a = (a ^ s_a) - s_a; /* negate if s_a == -1 */ b = (b ^ s_b) - s_b; /* negate if s_b == -1 */ s_a ^= s_b; /* sign of quotient */ - return (__udivsi3(a, b) ^ s_a) - s_a; /* negate if s_a == -1 */ + /* + * On CPUs without unsigned hardware division support, + * this calls __udivsi3 (notice the cast to su_int). + * On CPUs with unsigned hardware division support, + * this uses the unsigned division instruction. + */ + return ((su_int)a/(su_int)b ^ s_a) - s_a; /* negate if s_a == -1 */ } Modified: stable/9/contrib/compiler-rt/lib/divti3.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/divti3.c Fri Mar 21 21:50:23 2014 (r263559) +++ stable/9/contrib/compiler-rt/lib/divti3.c Fri Mar 21 21:59:11 2014 (r263560) @@ -12,10 +12,10 @@ * ===----------------------------------------------------------------------=== */ -#if __x86_64 - #include "int_lib.h" +#if __x86_64 + tu_int __udivmodti4(tu_int a, tu_int b, tu_int* rem); /* Returns: a / b */ Modified: stable/9/contrib/compiler-rt/lib/extendsfdf2.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/extendsfdf2.c Fri Mar 21 21:50:23 2014 (r263559) +++ stable/9/contrib/compiler-rt/lib/extendsfdf2.c Fri Mar 21 21:59:11 2014 (r263560) @@ -66,7 +66,7 @@ static inline dst_t dstFromRep(dst_rep_t // End helper routines. Conversion implementation follows. -ARM_EABI_FNALIAS(f2d, extendsfdf2); +ARM_EABI_FNALIAS(f2d, extendsfdf2) dst_t __extendsfdf2(src_t a) { Modified: stable/9/contrib/compiler-rt/lib/ffsti2.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/ffsti2.c Fri Mar 21 21:50:23 2014 (r263559) +++ stable/9/contrib/compiler-rt/lib/ffsti2.c Fri Mar 21 21:59:11 2014 (r263560) @@ -12,10 +12,10 @@ * ===----------------------------------------------------------------------=== */ -#if __x86_64 - #include "int_lib.h" +#if __x86_64 + /* Returns: the index of the least significant 1-bit in a, or * the value zero if a is zero. The least significant bit is index one. */ Modified: stable/9/contrib/compiler-rt/lib/fixdfdi.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/fixdfdi.c Fri Mar 21 21:50:23 2014 (r263559) +++ stable/9/contrib/compiler-rt/lib/fixdfdi.c Fri Mar 21 21:59:11 2014 (r263560) @@ -23,7 +23,7 @@ /* seee eeee eeee mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm */ -ARM_EABI_FNALIAS(d2lz, fixdfdi); +ARM_EABI_FNALIAS(d2lz, fixdfdi) di_int __fixdfdi(double a) Modified: stable/9/contrib/compiler-rt/lib/fixdfsi.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/fixdfsi.c Fri Mar 21 21:50:23 2014 (r263559) +++ stable/9/contrib/compiler-rt/lib/fixdfsi.c Fri Mar 21 21:59:11 2014 (r263560) @@ -18,7 +18,7 @@ #include "int_lib.h" -ARM_EABI_FNALIAS(d2iz, fixdfsi); +ARM_EABI_FNALIAS(d2iz, fixdfsi) int __fixdfsi(fp_t a) { Modified: stable/9/contrib/compiler-rt/lib/fixdfti.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/fixdfti.c Fri Mar 21 21:50:23 2014 (r263559) +++ stable/9/contrib/compiler-rt/lib/fixdfti.c Fri Mar 21 21:59:11 2014 (r263560) @@ -12,10 +12,10 @@ * ===----------------------------------------------------------------------=== */ -#if __x86_64 - #include "int_lib.h" +#if __x86_64 + /* Returns: convert a to a signed long long, rounding toward zero. */ /* Assumption: double is a IEEE 64 bit floating point type Modified: stable/9/contrib/compiler-rt/lib/fixsfdi.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/fixsfdi.c Fri Mar 21 21:50:23 2014 (r263559) +++ stable/9/contrib/compiler-rt/lib/fixsfdi.c Fri Mar 21 21:59:11 2014 (r263560) @@ -23,7 +23,7 @@ /* seee eeee emmm mmmm mmmm mmmm mmmm mmmm */ -ARM_EABI_FNALIAS(d2lz, fixsfdi); +ARM_EABI_FNALIAS(f2lz, fixsfdi) COMPILER_RT_ABI di_int __fixsfdi(float a) Modified: stable/9/contrib/compiler-rt/lib/fixsfsi.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/fixsfsi.c Fri Mar 21 21:50:23 2014 (r263559) +++ stable/9/contrib/compiler-rt/lib/fixsfsi.c Fri Mar 21 21:59:11 2014 (r263560) @@ -16,7 +16,7 @@ #define SINGLE_PRECISION #include "fp_lib.h" -ARM_EABI_FNALIAS(f2iz, fixsfsi); +ARM_EABI_FNALIAS(f2iz, fixsfsi) COMPILER_RT_ABI int __fixsfsi(fp_t a) { Modified: stable/9/contrib/compiler-rt/lib/fixsfti.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/fixsfti.c Fri Mar 21 21:50:23 2014 (r263559) +++ stable/9/contrib/compiler-rt/lib/fixsfti.c Fri Mar 21 21:59:11 2014 (r263560) @@ -12,10 +12,10 @@ * ===----------------------------------------------------------------------=== */ -#if __x86_64 - #include "int_lib.h" +#if __x86_64 + /* Returns: convert a to a signed long long, rounding toward zero. */ /* Assumption: float is a IEEE 32 bit floating point type Modified: stable/9/contrib/compiler-rt/lib/fixunsdfdi.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/fixunsdfdi.c Fri Mar 21 21:50:23 2014 (r263559) +++ stable/9/contrib/compiler-rt/lib/fixunsdfdi.c Fri Mar 21 21:59:11 2014 (r263560) @@ -26,7 +26,7 @@ /* seee eeee eeee mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm */ -ARM_EABI_FNALIAS(d2ulz, fixunsdfdi); +ARM_EABI_FNALIAS(d2ulz, fixunsdfdi) COMPILER_RT_ABI du_int __fixunsdfdi(double a) Modified: stable/9/contrib/compiler-rt/lib/fixunsdfsi.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/fixunsdfsi.c Fri Mar 21 21:50:23 2014 (r263559) +++ stable/9/contrib/compiler-rt/lib/fixunsdfsi.c Fri Mar 21 21:59:11 2014 (r263560) @@ -26,7 +26,7 @@ /* seee eeee eeee mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm */ -ARM_EABI_FNALIAS(d2uiz, fixunsdfsi); +ARM_EABI_FNALIAS(d2uiz, fixunsdfsi) COMPILER_RT_ABI su_int __fixunsdfsi(double a) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 22:32:01 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 86A49A77; Fri, 21 Mar 2014 22:32:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 738CCB88; Fri, 21 Mar 2014 22:32:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LMW1Z1046598; Fri, 21 Mar 2014 22:32:01 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LMW1oh046597; Fri, 21 Mar 2014 22:32:01 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212232.s2LMW1oh046597@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 22:32:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263561 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 22:32:01 -0000 Author: gjb Date: Fri Mar 21 22:32:00 2014 New Revision: 263561 URL: http://svnweb.freebsd.org/changeset/base/263561 Log: Document r260007. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 21:59:11 2014 (r263560) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:32:00 2014 (r263561) @@ -275,6 +275,9 @@ Userland Changes + The &man.hastctl.8; utility has been + updated to output the current queue sizes. + The &man.ps.1; utility will no longer truncate the command output column. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 22:32:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 803A0AE1; Fri, 21 Mar 2014 22:32:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5F5F2B89; Fri, 21 Mar 2014 22:32:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LMW3qu046645; Fri, 21 Mar 2014 22:32:03 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LMW3NU046644; Fri, 21 Mar 2014 22:32:03 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212232.s2LMW3NU046644@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 22:32:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263562 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 22:32:03 -0000 Author: gjb Date: Fri Mar 21 22:32:02 2014 New Revision: 263562 URL: http://svnweb.freebsd.org/changeset/base/263562 Log: Document r259519. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:32:00 2014 (r263561) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:32:02 2014 (r263562) @@ -125,6 +125,10 @@ Kernel Changes + Several problems that could trigger + kernel panic on &man.kldload.8; and &man.kldunload.8; have + been fixed. + A kernel panic triggered by some multi-threaded applications has been fixed. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 22:32:10 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EFB7CE83; Fri, 21 Mar 2014 22:32:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ED4C7B8D; Fri, 21 Mar 2014 22:32:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LMW8M6046773; Fri, 21 Mar 2014 22:32:08 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LMW8RP046772; Fri, 21 Mar 2014 22:32:08 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212232.s2LMW8RP046772@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 22:32:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263565 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 22:32:10 -0000 Author: gjb Date: Fri Mar 21 22:32:08 2014 New Revision: 263565 URL: http://svnweb.freebsd.org/changeset/base/263565 Log: Document r259457. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:32:06 2014 (r263564) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:32:08 2014 (r263565) @@ -233,6 +233,10 @@ Network Interface Support + The &man.run.4; driver has been + updated to support MediaTek/Ralink chipsets RT5370 and + RT5372. + The &man.usb.4; wireless radiotap headers have been realigned, allowing wireless adapters to work on &arch.arm;, &arch.mips;, and other similar From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 22:32:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E3239C51; Fri, 21 Mar 2014 22:32:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 41A3BB8A; Fri, 21 Mar 2014 22:32:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LMW5E7046690; Fri, 21 Mar 2014 22:32:05 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LMW5RP046689; Fri, 21 Mar 2014 22:32:05 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212232.s2LMW5RP046689@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 22:32:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263563 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 22:32:06 -0000 Author: gjb Date: Fri Mar 21 22:32:04 2014 New Revision: 263563 URL: http://svnweb.freebsd.org/changeset/base/263563 Log: Document r259466. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:32:02 2014 (r263562) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:32:04 2014 (r263563) @@ -125,6 +125,11 @@ Kernel Changes + A new &man.sysctl.8;, + kern.supported_archs has been added, + which will list the MACHINE_ARCH values + whose binaries can be run on the system. + Several problems that could trigger kernel panic on &man.kldload.8; and &man.kldunload.8; have been fixed. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 22:32:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2DDC0C84; Fri, 21 Mar 2014 22:32:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1B133B8B; Fri, 21 Mar 2014 22:32:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LMW6GK046729; Fri, 21 Mar 2014 22:32:06 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LMW6uk046728; Fri, 21 Mar 2014 22:32:06 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212232.s2LMW6uk046728@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 22:32:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263564 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 22:32:07 -0000 Author: gjb Date: Fri Mar 21 22:32:06 2014 New Revision: 263564 URL: http://svnweb.freebsd.org/changeset/base/263564 Log: Document r259460. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:32:04 2014 (r263563) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:32:06 2014 (r263564) @@ -233,6 +233,11 @@ Network Interface Support + The &man.usb.4; wireless radiotap + headers have been realigned, allowing wireless adapters + to work on &arch.arm;, &arch.mips;, and other similar + platforms where alignment is important. + The &man.run.4; firmware has been updated to version 0.33. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 22:32:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C5752FE3; Fri, 21 Mar 2014 22:32:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AE138B8F; Fri, 21 Mar 2014 22:32:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LMWCP2046851; Fri, 21 Mar 2014 22:32:12 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LMWC8U046850; Fri, 21 Mar 2014 22:32:12 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212232.s2LMWC8U046850@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 22:32:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263567 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 22:32:12 -0000 Author: gjb Date: Fri Mar 21 22:32:12 2014 New Revision: 263567 URL: http://svnweb.freebsd.org/changeset/base/263567 Log: Document r259406. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:32:10 2014 (r263566) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:32:12 2014 (r263567) @@ -293,6 +293,9 @@ Userland Changes + Several updates to &man.gcc.1; have + been imported from Google. + A byte-order bug in the Heimdal gss_pseudo_random() function which would prevent interoperability with other From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 22:32:16 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5A712EC; Fri, 21 Mar 2014 22:32:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9153BB93; Fri, 21 Mar 2014 22:32:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LMWGMw046936; Fri, 21 Mar 2014 22:32:16 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LMWGb0046935; Fri, 21 Mar 2014 22:32:16 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212232.s2LMWGb0046935@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 22:32:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263569 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 22:32:16 -0000 Author: gjb Date: Fri Mar 21 22:32:16 2014 New Revision: 263569 URL: http://svnweb.freebsd.org/changeset/base/263569 Log: Document r259243. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:32:14 2014 (r263568) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:32:16 2014 (r263569) @@ -293,6 +293,10 @@ Userland Changes + A segmentation fault and internal + compiler error bug in &man.gcc.1; triggered by throwing + a warning before parsing any tokens has been fixed. + Several updates to &man.gcc.1; have been imported from Google. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 22:32:10 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7754E99; Fri, 21 Mar 2014 22:32:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C4B67B8E; Fri, 21 Mar 2014 22:32:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LMWAi9046813; Fri, 21 Mar 2014 22:32:10 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LMWAA1046812; Fri, 21 Mar 2014 22:32:10 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212232.s2LMWAA1046812@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 22:32:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263566 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 22:32:10 -0000 Author: gjb Date: Fri Mar 21 22:32:10 2014 New Revision: 263566 URL: http://svnweb.freebsd.org/changeset/base/263566 Log: Document r259448. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:32:08 2014 (r263565) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:32:10 2014 (r263566) @@ -293,6 +293,13 @@ Userland Changes + A byte-order bug in the Heimdal + gss_pseudo_random() function which would + prevent interoperability with other + Kerberos implementations. + In particular, this would prevent interoperability with the + MIT implementation. + The &man.hastctl.8; utility has been updated to output the current queue sizes. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 22:32:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A839D290; Fri, 21 Mar 2014 22:32:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A75A9B91; Fri, 21 Mar 2014 22:32:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LMWEMT046894; Fri, 21 Mar 2014 22:32:14 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LMWEAP046893; Fri, 21 Mar 2014 22:32:14 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212232.s2LMWEAP046893@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 22:32:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263568 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 22:32:15 -0000 Author: gjb Date: Fri Mar 21 22:32:14 2014 New Revision: 263568 URL: http://svnweb.freebsd.org/changeset/base/263568 Log: Reference r259269 in the gcc(1) note. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:32:12 2014 (r263567) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:32:14 2014 (r263568) @@ -293,8 +293,8 @@ Userland Changes - Several updates to &man.gcc.1; have - been imported from Google. + Several updates to &man.gcc.1; + have been imported from Google. A byte-order bug in the Heimdal gss_pseudo_random() function which would From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 22:38:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5E53659; Fri, 21 Mar 2014 22:38:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A2206BD3; Fri, 21 Mar 2014 22:38:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LMcPZ5047749; Fri, 21 Mar 2014 22:38:25 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LMcPgq047748; Fri, 21 Mar 2014 22:38:25 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212238.s2LMcPgq047748@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 22:38:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263570 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 22:38:25 -0000 Author: gjb Date: Fri Mar 21 22:38:25 2014 New Revision: 263570 URL: http://svnweb.freebsd.org/changeset/base/263570 Log: Update the URL for the installation.html page. Since this does not exist yet, comment the reference for now. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:32:16 2014 (r263569) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:38:25 2014 (r263570) @@ -497,9 +497,11 @@ supported using to the instructions in /usr/src/UPDATING. + For more specific information about upgrading - instructions, see http://www.FreeBSD.org/releases/9.1R/installation.html. + instructions, see http://www.FreeBSD.org/releases/9.3R/installation.html. + ?> Upgrading &os; should, of course, only be attempted after backing up all data and From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 22:40:16 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E60EF79C; Fri, 21 Mar 2014 22:40:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D2A02C3E; Fri, 21 Mar 2014 22:40:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LMeG3G048040; Fri, 21 Mar 2014 22:40:16 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LMeGAj048039; Fri, 21 Mar 2014 22:40:16 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212240.s2LMeGAj048039@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 22:40:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263571 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 22:40:17 -0000 Author: gjb Date: Fri Mar 21 22:40:16 2014 New Revision: 263571 URL: http://svnweb.freebsd.org/changeset/base/263571 Log: Fix the wording of the gss_pseudo_random() note. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:38:25 2014 (r263570) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:40:16 2014 (r263571) @@ -303,9 +303,9 @@ A byte-order bug in the Heimdal gss_pseudo_random() function which would prevent interoperability with other - Kerberos implementations. - In particular, this would prevent interoperability with the - MIT implementation. + Kerberos implementations has been + fixed. In particular, this would prevent interoperability + with the MIT implementation. The &man.hastctl.8; utility has been updated to output the current queue sizes. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 22:43:01 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3AE5E8F7; Fri, 21 Mar 2014 22:43:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2736CC5F; Fri, 21 Mar 2014 22:43:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LMh1S0051189; Fri, 21 Mar 2014 22:43:01 GMT (envelope-from asomers@svn.freebsd.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LMh0cG051186; Fri, 21 Mar 2014 22:43:00 GMT (envelope-from asomers@svn.freebsd.org) Message-Id: <201403212243.s2LMh0cG051186@svn.freebsd.org> From: Alan Somers Date: Fri, 21 Mar 2014 22:43:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263572 - stable/10/tests/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 22:43:01 -0000 Author: asomers Date: Fri Mar 21 22:43:00 2014 New Revision: 263572 URL: http://svnweb.freebsd.org/changeset/base/263572 Log: MFC r262868 Only use -lpthread for unix_seqpacket_test, not for all test programs. MFC r262894 kern/Makefile Set WARNS=5 for all files in this directory kern/unix_seqpacket_test.c Fix compiler warnings. Most were benign, but rcvbuf_oversized wasn't working as intended because I forgot to set the buffer sizes. Modified: stable/10/tests/sys/kern/Makefile stable/10/tests/sys/kern/unix_seqpacket_test.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tests/sys/kern/Makefile ============================================================================== --- stable/10/tests/sys/kern/Makefile Fri Mar 21 22:40:16 2014 (r263571) +++ stable/10/tests/sys/kern/Makefile Fri Mar 21 22:43:00 2014 (r263572) @@ -5,6 +5,8 @@ TESTSDIR= ${TESTSBASE}/sys/kern ATF_TESTS_C= unix_seqpacket_test TEST_METADATA.unix_seqpacket_test+= timeout="15" -LDADD+= -lpthread +LDADD.unix_seqpacket_test+= -lpthread + +WARNS?= 5 .include Modified: stable/10/tests/sys/kern/unix_seqpacket_test.c ============================================================================== --- stable/10/tests/sys/kern/unix_seqpacket_test.c Fri Mar 21 22:40:16 2014 (r263571) +++ stable/10/tests/sys/kern/unix_seqpacket_test.c Fri Mar 21 22:43:00 2014 (r263572) @@ -43,7 +43,7 @@ __FBSDID("$FreeBSD$"); #define MIN(x, y) ((x) < (y) ? (x) : (y)) #define MAX(x, y) ((x) > (y) ? (x) : (y)) -void +static void do_socketpair(int *sv) { int s; @@ -55,7 +55,7 @@ do_socketpair(int *sv) ATF_REQUIRE(sv[0] != sv[1]); } -void +static void do_socketpair_nonblocking(int *sv) { int s; @@ -73,7 +73,7 @@ do_socketpair_nonblocking(int *sv) * Returns a pair of sockets made the hard way: bind, listen, connect & accept * @return const char* The path to the socket */ -const char* +static const char* mk_pair_of_sockets(int *sv) { struct sockaddr_un sun; @@ -116,7 +116,7 @@ mk_pair_of_sockets(int *sv) static volatile sig_atomic_t got_sigpipe = 0; static void -shutdown_send_sigpipe_handler(int x) +shutdown_send_sigpipe_handler(int __unused x) { got_sigpipe = 1; } @@ -124,16 +124,16 @@ shutdown_send_sigpipe_handler(int x) /* * Parameterized test function bodies */ -void +static void test_eagain(size_t sndbufsize, size_t rcvbufsize) { int i; int sv[2]; const size_t totalsize = (sndbufsize + rcvbufsize) * 2; const size_t pktsize = MIN(sndbufsize, rcvbufsize) / 4; + const int numpkts = totalsize / pktsize; char sndbuf[pktsize]; - char recv_buf[pktsize]; - ssize_t ssize, rsize; + ssize_t ssize; /* setup the socket pair */ do_socketpair_nonblocking(sv); @@ -145,7 +145,7 @@ test_eagain(size_t sndbufsize, size_t rc bzero(sndbuf, pktsize); /* Send data until we get EAGAIN */ - for(i=0; i < totalsize / pktsize; i++) { + for(i=0; i < numpkts; i++) { ssize = send(sv[0], sndbuf, pktsize, MSG_EOR); if (ssize == -1) { if (errno == EAGAIN) @@ -159,11 +159,11 @@ test_eagain(size_t sndbufsize, size_t rc atf_tc_fail("Never got EAGAIN"); } -void +static void test_sendrecv_symmetric_buffers(size_t bufsize, int blocking) { int s; int sv[2]; - const size_t pktsize = bufsize / 2; + const ssize_t pktsize = bufsize / 2; char sndbuf[pktsize]; char recv_buf[pktsize]; ssize_t ssize, rsize; @@ -201,12 +201,12 @@ test_sendrecv_symmetric_buffers(size_t b pktsize, rsize); } -void +static void test_pipe_simulator(size_t sndbufsize, size_t rcvbufsize) { - int s, num_sent, num_received; + int num_sent, num_received; int sv[2]; - const size_t pktsize = MIN(sndbufsize, rcvbufsize) / 4; + const ssize_t pktsize = MIN(sndbufsize, rcvbufsize) / 4; int numpkts; char sndbuf[pktsize]; char rcvbuf[pktsize]; @@ -331,12 +331,11 @@ test_pipe_reader(void* args) } -void +static void test_pipe(size_t sndbufsize, size_t rcvbufsize) { test_pipe_thread_data_t writer_data, reader_data; pthread_t writer, reader; - int num_sent, num_received; int sv[2]; const size_t pktsize = MIN(sndbufsize, rcvbufsize) / 4; int numpkts; @@ -605,12 +604,11 @@ ATF_TC_BODY(resize_connected_buffers, tc ATF_TC_WITHOUT_HEAD(send_recv); ATF_TC_BODY(send_recv, tc) { - int s; int sv[2]; const int bufsize = 64; const char *data = "data"; char recv_buf[bufsize]; - size_t datalen; + ssize_t datalen; ssize_t ssize, rsize; /* setup the socket pair */ @@ -642,12 +640,11 @@ ATF_TC_BODY(sendto_recvfrom, tc) { const char* path; struct sockaddr_storage from; - int s; int sv[2]; const int bufsize = 64; const char *data = "data"; char recv_buf[bufsize]; - size_t datalen; + ssize_t datalen; ssize_t ssize, rsize; socklen_t fromlen; @@ -690,12 +687,11 @@ ATF_TC_BODY(sendto_recvfrom, tc) ATF_TC_WITHOUT_HEAD(send_recv_with_connect); ATF_TC_BODY(send_recv_with_connect, tc) { - const char* path; int sv[2]; const int bufsize = 64; const char *data = "data"; char recv_buf[bufsize]; - size_t datalen; + ssize_t datalen; ssize_t ssize, rsize; mk_pair_of_sockets(sv); @@ -751,12 +747,11 @@ ATF_TC_BODY(shutdown_send_sigpipe, tc) ATF_TC_WITHOUT_HEAD(send_recv_nonblocking); ATF_TC_BODY(send_recv_nonblocking, tc) { - int s; int sv[2]; const int bufsize = 64; const char *data = "data"; char recv_buf[bufsize]; - size_t datalen; + ssize_t datalen; ssize_t ssize, rsize; /* setup the socket pair */ @@ -788,14 +783,12 @@ ATF_TC_BODY(send_recv_nonblocking, tc) ATF_TC_WITHOUT_HEAD(emsgsize); ATF_TC_BODY(emsgsize, tc) { - int s; int sv[2]; const size_t sndbufsize = 8192; const size_t rcvbufsize = 8192; const size_t pktsize = (sndbufsize + rcvbufsize) * 2; char sndbuf[pktsize]; - char recv_buf[pktsize]; - ssize_t ssize, rsize; + ssize_t ssize; /* setup the socket pair */ do_socketpair(sv); @@ -817,14 +810,12 @@ ATF_TC_BODY(emsgsize, tc) ATF_TC_WITHOUT_HEAD(emsgsize_nonblocking); ATF_TC_BODY(emsgsize_nonblocking, tc) { - int s; int sv[2]; const size_t sndbufsize = 8192; const size_t rcvbufsize = 8192; const size_t pktsize = (sndbufsize + rcvbufsize) * 2; char sndbuf[pktsize]; - char recv_buf[pktsize]; - ssize_t ssize, rsize; + ssize_t ssize; /* setup the socket pair */ do_socketpair_nonblocking(sv); @@ -877,25 +868,29 @@ ATF_TC_BODY(eagain_128k_128k, tc) ATF_TC_WITHOUT_HEAD(rcvbuf_oversized); ATF_TC_BODY(rcvbuf_oversized, tc) { - int s, i, j; + int i; int sv[2]; + const int pktsize = 1024; const size_t sndbufsize = 8192; const size_t rcvbufsize = 131072; - const size_t geom_mean_bufsize = 32768; - const int pktsize = 1024; + const size_t geometric_mean_bufsize = 32768; + const int numpkts = geometric_mean_bufsize / pktsize; char sndbuf[pktsize]; char recv_buf[pktsize]; - size_t datalen; ssize_t ssize, rsize; /* setup the socket pair */ do_socketpair_nonblocking(sv); + ATF_REQUIRE_EQ(0, setsockopt(sv[0], SOL_SOCKET, SO_SNDBUF, &sndbufsize, + sizeof(sndbufsize))); + ATF_REQUIRE_EQ(0, setsockopt(sv[1], SOL_SOCKET, SO_RCVBUF, &rcvbufsize, + sizeof(rcvbufsize))); /* * Send and receive packets that are collectively greater than the send * buffer, but less than the receive buffer */ - for (i=0; i < geom_mean_bufsize / pktsize; i++) { + for (i=0; i < numpkts; i++) { /* Fill the buffer */ memset(sndbuf, i, pktsize); From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 22:57:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BA7B2B8C; Fri, 21 Mar 2014 22:57:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A734DD53; Fri, 21 Mar 2014 22:57:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LMv2ax055698; Fri, 21 Mar 2014 22:57:02 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LMv2pt055697; Fri, 21 Mar 2014 22:57:02 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212257.s2LMv2pt055697@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 22:57:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263573 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 22:57:02 -0000 Author: gjb Date: Fri Mar 21 22:57:02 2014 New Revision: 263573 URL: http://svnweb.freebsd.org/changeset/base/263573 Log: Document r259002. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:43:00 2014 (r263572) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:57:02 2014 (r263573) @@ -125,6 +125,10 @@ Kernel Changes + A kernel panic when listing sysctls + on a system with INVARIANTS enabled has + been fixed. + A new &man.sysctl.8;, kern.supported_archs has been added, which will list the MACHINE_ARCH values From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 22:57:04 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB631C62; Fri, 21 Mar 2014 22:57:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 986D4D56; Fri, 21 Mar 2014 22:57:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LMv4b4055741; Fri, 21 Mar 2014 22:57:04 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LMv481055740; Fri, 21 Mar 2014 22:57:04 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212257.s2LMv481055740@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 22:57:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263574 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 22:57:04 -0000 Author: gjb Date: Fri Mar 21 22:57:04 2014 New Revision: 263574 URL: http://svnweb.freebsd.org/changeset/base/263574 Log: Document r258967. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:57:02 2014 (r263573) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:57:04 2014 (r263574) @@ -237,6 +237,10 @@ Network Interface Support + The &man.bge.4; driver has been + updated to support the BCM57764, BCM57767, BCM57782, + BCM57786 and BCM57787 chipsets. + The &man.run.4; driver has been updated to support MediaTek/Ralink chipsets RT5370 and RT5372. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 22:57:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 082A3D5A; Fri, 21 Mar 2014 22:57:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 79FD4D57; Fri, 21 Mar 2014 22:57:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LMv6c3055783; Fri, 21 Mar 2014 22:57:06 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LMv6xT055782; Fri, 21 Mar 2014 22:57:06 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212257.s2LMv6xT055782@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 22:57:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263575 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 22:57:07 -0000 Author: gjb Date: Fri Mar 21 22:57:05 2014 New Revision: 263575 URL: http://svnweb.freebsd.org/changeset/base/263575 Log: Document r258965. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:57:04 2014 (r263574) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:57:05 2014 (r263575) @@ -237,6 +237,9 @@ Network Interface Support + The &man.bge.4; driver has been + updated to support the BCM5725 chipset. + The &man.bge.4; driver has been updated to support the BCM57764, BCM57767, BCM57782, BCM57786 and BCM57787 chipsets. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 22:57:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 682DDDE7; Fri, 21 Mar 2014 22:57:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 55149D59; Fri, 21 Mar 2014 22:57:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LMv8SE055821; Fri, 21 Mar 2014 22:57:08 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LMv8CY055820; Fri, 21 Mar 2014 22:57:08 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212257.s2LMv8CY055820@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 22:57:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263576 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 22:57:08 -0000 Author: gjb Date: Fri Mar 21 22:57:07 2014 New Revision: 263576 URL: http://svnweb.freebsd.org/changeset/base/263576 Log: Document r258962. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:57:05 2014 (r263575) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:57:07 2014 (r263576) @@ -125,6 +125,9 @@ Kernel Changes + A workaround has been implemented + for hung transmission on BCM5719 and BCM5720 chipsets. + A kernel panic when listing sysctls on a system with INVARIANTS enabled has been fixed. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 22:57:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D598E27F; Fri, 21 Mar 2014 22:57:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C312ED60; Fri, 21 Mar 2014 22:57:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LMvFnB055980; Fri, 21 Mar 2014 22:57:15 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LMvF04055979; Fri, 21 Mar 2014 22:57:15 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212257.s2LMvF04055979@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 22:57:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263580 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 22:57:15 -0000 Author: gjb Date: Fri Mar 21 22:57:15 2014 New Revision: 263580 URL: http://svnweb.freebsd.org/changeset/base/263580 Log: Document r258870. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:57:13 2014 (r263579) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:57:15 2014 (r263580) @@ -125,6 +125,10 @@ Kernel Changes + The &man.mmap.2; system call has been + updated to more optimally use superpages and provide support + for tweaking the alignment of virtual mappings. + A workaround has been implemented in the &man.bge.4; driver for hung transmission on BCM5719 and BCM5720 chipsets. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 22:57:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96217F93; Fri, 21 Mar 2014 22:57:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2C0FCD5B; Fri, 21 Mar 2014 22:57:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LMvA6B055863; Fri, 21 Mar 2014 22:57:10 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LMvAtb055862; Fri, 21 Mar 2014 22:57:10 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212257.s2LMvAtb055862@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 22:57:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263577 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 22:57:11 -0000 Author: gjb Date: Fri Mar 21 22:57:09 2014 New Revision: 263577 URL: http://svnweb.freebsd.org/changeset/base/263577 Log: Reword r258962 entry to specify the affected driver. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:57:07 2014 (r263576) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:57:09 2014 (r263577) @@ -126,7 +126,8 @@ Kernel Changes A workaround has been implemented - for hung transmission on BCM5719 and BCM5720 chipsets. + in the &man.bge.4; driver for hung transmission on BCM5719 + and BCM5720 chipsets. A kernel panic when listing sysctls on a system with INVARIANTS enabled has From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 22:57:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17E46FE5; Fri, 21 Mar 2014 22:57:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 054CCD5C; Fri, 21 Mar 2014 22:57:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LMvBPX055901; Fri, 21 Mar 2014 22:57:11 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LMvBJP055900; Fri, 21 Mar 2014 22:57:11 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212257.s2LMvBJP055900@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 22:57:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263578 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 22:57:12 -0000 Author: gjb Date: Fri Mar 21 22:57:11 2014 New Revision: 263578 URL: http://svnweb.freebsd.org/changeset/base/263578 Log: Document r258898. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:57:09 2014 (r263577) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:57:11 2014 (r263578) @@ -241,6 +241,9 @@ Network Interface Support + The &man.qlxge.4; driver has been + imported from head/. + The &man.bge.4; driver has been updated to support the BCM5725 chipset. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 22:57:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 196D1152; Fri, 21 Mar 2014 22:57:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DCE30D5E; Fri, 21 Mar 2014 22:57:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LMvDVj055942; Fri, 21 Mar 2014 22:57:13 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LMvDPd055941; Fri, 21 Mar 2014 22:57:13 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403212257.s2LMvDPd055941@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Mar 2014 22:57:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263579 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 22:57:14 -0000 Author: gjb Date: Fri Mar 21 22:57:13 2014 New Revision: 263579 URL: http://svnweb.freebsd.org/changeset/base/263579 Log: Document r258898. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:57:11 2014 (r263578) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 22:57:13 2014 (r263579) @@ -241,6 +241,9 @@ Network Interface Support + The &man.qlxgbe.4; driver has been + imported from head/. + The &man.qlxge.4; driver has been imported from head/. From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 23:04:23 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC48B60C; Fri, 21 Mar 2014 23:04:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9A75CE02; Fri, 21 Mar 2014 23:04:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LN4NpD059843; Fri, 21 Mar 2014 23:04:23 GMT (envelope-from edavis@svn.freebsd.org) Received: (from edavis@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LN4NZU059842; Fri, 21 Mar 2014 23:04:23 GMT (envelope-from edavis@svn.freebsd.org) Message-Id: <201403212304.s2LN4NZU059842@svn.freebsd.org> From: Eric Davis Date: Fri, 21 Mar 2014 23:04:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263581 - stable/10/sys/dev/bxe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 23:04:23 -0000 Author: edavis Date: Fri Mar 21 23:04:23 2014 New Revision: 263581 URL: http://svnweb.freebsd.org/changeset/base/263581 Log: MFC 262999 Fixed MSI interrupt allocation and handling. Fixed a DMA mapping leak that occurs when defragmenting packet chains. Approved by: davidch (mentor) Modified: stable/10/sys/dev/bxe/bxe.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/bxe/bxe.c ============================================================================== --- stable/10/sys/dev/bxe/bxe.c Fri Mar 21 22:57:15 2014 (r263580) +++ stable/10/sys/dev/bxe/bxe.c Fri Mar 21 23:04:23 2014 (r263581) @@ -34,7 +34,7 @@ #include __FBSDID("$FreeBSD$"); -#define BXE_DRIVER_VERSION "1.78.77" +#define BXE_DRIVER_VERSION "1.78.78" #include "bxe.h" #include "ecore_sp.h" @@ -911,7 +911,7 @@ bxe_dma_map_addr(void *arg, bus_dma_segm dma->paddr = segs->ds_addr; dma->nseg = nseg; #if 0 - BLOGD(dma->sc, DBG_LOAD,, + BLOGD(dma->sc, DBG_LOAD, "DMA alloc '%s': vaddr=%p paddr=%p nseg=%d size=%lu\n", dma->msg, dma->vaddr, (void *)dma->paddr, dma->nseg, dma->size); @@ -5486,7 +5486,7 @@ bxe_tx_encap(struct bxe_fastpath *fp, st } /* make sure it fits in the packet window */ - if (__predict_false(nsegs > 12)) { + if (__predict_false(nsegs > BXE_MAX_SEGMENTS)) { /* * The mbuf may be to big for the controller to handle. If the frame * is a TSO frame we'll need to do an additional check. @@ -5501,8 +5501,9 @@ bxe_tx_encap(struct bxe_fastpath *fp, st fp->eth_q_stats.tx_window_violation_std++; } - /* lets try to defragment this mbuf */ + /* lets try to defragment this mbuf and remap it */ fp->eth_q_stats.mbuf_defrag_attempts++; + bus_dmamap_unload(fp->tx_mbuf_tag, tx_buf->m_map); m0 = m_defrag(*m_head, M_DONTWAIT); if (m0 == NULL) { @@ -5520,10 +5521,12 @@ bxe_tx_encap(struct bxe_fastpath *fp, st /* No sense in trying to defrag/copy chain, drop it. :( */ rc = error; } - - /* if the chain is still too long then drop it */ - if (__predict_false(nsegs > 12)) { - rc = ENODEV; + else { + /* if the chain is still too long then drop it */ + if (__predict_false(nsegs > BXE_MAX_SEGMENTS)) { + bus_dmamap_unload(fp->tx_mbuf_tag, tx_buf->m_map); + rc = ENODEV; + } } } } @@ -9397,13 +9400,13 @@ bxe_interrupt_alloc(struct bxe_softc *sc } if (((sc->devinfo.pcie_cap_flags & BXE_MSI_CAPABLE_FLAG) == 0) || - (msi_count < 2)) { + (msi_count < 1)) { sc->interrupt_mode = INTR_MODE_INTX; /* try INTx next */ break; } - /* ask for the necessary number of MSI vectors */ - num_requested = min((sc->num_queues + 1), msi_count); + /* ask for a single MSI vector */ + num_requested = 1; BLOGD(sc, DBG_LOAD, "Requesting %d MSI vectors\n", num_requested); @@ -9414,8 +9417,8 @@ bxe_interrupt_alloc(struct bxe_softc *sc break; } - if (num_allocated < 2) { /* possible? */ - BLOGE(sc, "MSI allocation less than 2!\n"); + if (num_allocated != 1) { /* possible? */ + BLOGE(sc, "MSI allocation is not 1!\n"); sc->interrupt_mode = INTR_MODE_INTX; /* try INTx next */ pci_release_msi(sc->dev); break; @@ -9426,38 +9429,26 @@ bxe_interrupt_alloc(struct bxe_softc *sc /* best effort so use the number of vectors allocated to us */ sc->intr_count = num_allocated; - sc->num_queues = num_allocated - 1; + sc->num_queues = num_allocated; rid = 1; /* initial resource identifier */ - /* allocate the MSI vectors */ - for (i = 0; i < num_allocated; i++) { - sc->intr[i].rid = (rid + i); - - if ((sc->intr[i].resource = - bus_alloc_resource_any(sc->dev, - SYS_RES_IRQ, - &sc->intr[i].rid, - RF_ACTIVE)) == NULL) { - BLOGE(sc, "Failed to map MSI[%d] (rid=%d)!\n", - i, (rid + i)); - - for (j = (i - 1); j >= 0; j--) { - bus_release_resource(sc->dev, - SYS_RES_IRQ, - sc->intr[j].rid, - sc->intr[j].resource); - } - - sc->intr_count = 0; - sc->num_queues = 0; - sc->interrupt_mode = INTR_MODE_INTX; /* try INTx next */ - pci_release_msi(sc->dev); - break; - } + sc->intr[0].rid = rid; - BLOGD(sc, DBG_LOAD, "Mapped MSI[%d] (rid=%d)\n", i, (rid + i)); + if ((sc->intr[0].resource = + bus_alloc_resource_any(sc->dev, + SYS_RES_IRQ, + &sc->intr[0].rid, + RF_ACTIVE)) == NULL) { + BLOGE(sc, "Failed to map MSI[0] (rid=%d)!\n", rid); + sc->intr_count = 0; + sc->num_queues = 0; + sc->interrupt_mode = INTR_MODE_INTX; /* try INTx next */ + pci_release_msi(sc->dev); + break; } + + BLOGD(sc, DBG_LOAD, "Mapped MSI[0] (rid=%d)\n", rid); } while (0); do { /* try allocating INTx vector resources */ @@ -9636,54 +9627,21 @@ bxe_interrupt_attach(struct bxe_softc *s fp->state = BXE_FP_STATE_IRQ; } } else if (sc->interrupt_mode == INTR_MODE_MSI) { - BLOGD(sc, DBG_LOAD, "Enabling slowpath MSI[0] vector.\n"); + BLOGD(sc, DBG_LOAD, "Enabling MSI[0] vector\n"); /* - * Setup the interrupt handler. Note that we pass the driver instance - * to the interrupt handler for the slowpath. + * Setup the interrupt handler. Note that we pass the + * driver instance to the interrupt handler which + * will handle both the slowpath and fastpath. */ if ((rc = bus_setup_intr(sc->dev, sc->intr[0].resource, (INTR_TYPE_NET | INTR_MPSAFE), - NULL, bxe_intr_sp, sc, + NULL, bxe_intr_legacy, sc, &sc->intr[0].tag)) != 0) { BLOGE(sc, "Failed to allocate MSI[0] vector (%d)\n", rc); goto bxe_interrupt_attach_exit; } - bus_describe_intr(sc->dev, sc->intr[0].resource, - sc->intr[0].tag, "sp"); - - /* bus_bind_intr(sc->dev, sc->intr[0].resource, 0); */ - - /* initialize the fastpath vectors (note the first was used for sp) */ - for (i = 0; i < sc->num_queues; i++) { - fp = &sc->fp[i]; - BLOGD(sc, DBG_LOAD, "Enabling MSI[%d] vector\n", (i + 1)); - - /* - * Setup the interrupt handler. Note that we pass the - * fastpath context to the interrupt handler in this - * case. - */ - if ((rc = bus_setup_intr(sc->dev, sc->intr[i + 1].resource, - (INTR_TYPE_NET | INTR_MPSAFE), - NULL, bxe_intr_fp, fp, - &sc->intr[i + 1].tag)) != 0) { - BLOGE(sc, "Failed to allocate MSI[%d] vector (%d)\n", - (i + 1), rc); - goto bxe_interrupt_attach_exit; - } - - bus_describe_intr(sc->dev, sc->intr[i + 1].resource, - sc->intr[i + 1].tag, "fp%02d", i); - - /* bind the fastpath instance to a cpu */ - if (sc->num_queues > 1) { - bus_bind_intr(sc->dev, sc->intr[i + 1].resource, i); - } - - fp->state = BXE_FP_STATE_IRQ; - } } else { /* (sc->interrupt_mode == INTR_MODE_INTX) */ BLOGD(sc, DBG_LOAD, "Enabling INTx interrupts\n"); From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 23:09:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A41E80D; Fri, 21 Mar 2014 23:09:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2AA33E38; Fri, 21 Mar 2014 23:09:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LN93Fa060455; Fri, 21 Mar 2014 23:09:03 GMT (envelope-from edavis@svn.freebsd.org) Received: (from edavis@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LN93mA060454; Fri, 21 Mar 2014 23:09:03 GMT (envelope-from edavis@svn.freebsd.org) Message-Id: <201403212309.s2LN93mA060454@svn.freebsd.org> From: Eric Davis Date: Fri, 21 Mar 2014 23:09:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263582 - stable/9/sys/dev/bxe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 23:09:03 -0000 Author: edavis Date: Fri Mar 21 23:09:02 2014 New Revision: 263582 URL: http://svnweb.freebsd.org/changeset/base/263582 Log: MFC 262999 Fixed MSI interrupt allocation and handling. Fixed a DMA mapping leak that occurs when defragmenting packet chains. Approved by: davidch (mentor) Modified: stable/9/sys/dev/bxe/bxe.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/bxe/bxe.c ============================================================================== --- stable/9/sys/dev/bxe/bxe.c Fri Mar 21 23:04:23 2014 (r263581) +++ stable/9/sys/dev/bxe/bxe.c Fri Mar 21 23:09:02 2014 (r263582) @@ -34,7 +34,7 @@ #include __FBSDID("$FreeBSD$"); -#define BXE_DRIVER_VERSION "1.78.77" +#define BXE_DRIVER_VERSION "1.78.78" #include "bxe.h" #include "ecore_sp.h" @@ -911,7 +911,7 @@ bxe_dma_map_addr(void *arg, bus_dma_segm dma->paddr = segs->ds_addr; dma->nseg = nseg; #if 0 - BLOGD(dma->sc, DBG_LOAD,, + BLOGD(dma->sc, DBG_LOAD, "DMA alloc '%s': vaddr=%p paddr=%p nseg=%d size=%lu\n", dma->msg, dma->vaddr, (void *)dma->paddr, dma->nseg, dma->size); @@ -5494,7 +5494,7 @@ bxe_tx_encap(struct bxe_fastpath *fp, st } /* make sure it fits in the packet window */ - if (__predict_false(nsegs > 12)) { + if (__predict_false(nsegs > BXE_MAX_SEGMENTS)) { /* * The mbuf may be to big for the controller to handle. If the frame * is a TSO frame we'll need to do an additional check. @@ -5509,8 +5509,9 @@ bxe_tx_encap(struct bxe_fastpath *fp, st fp->eth_q_stats.tx_window_violation_std++; } - /* lets try to defragment this mbuf */ + /* lets try to defragment this mbuf and remap it */ fp->eth_q_stats.mbuf_defrag_attempts++; + bus_dmamap_unload(fp->tx_mbuf_tag, tx_buf->m_map); m0 = m_defrag(*m_head, M_DONTWAIT); if (m0 == NULL) { @@ -5528,10 +5529,12 @@ bxe_tx_encap(struct bxe_fastpath *fp, st /* No sense in trying to defrag/copy chain, drop it. :( */ rc = error; } - - /* if the chain is still too long then drop it */ - if (__predict_false(nsegs > 12)) { - rc = ENODEV; + else { + /* if the chain is still too long then drop it */ + if (__predict_false(nsegs > BXE_MAX_SEGMENTS)) { + bus_dmamap_unload(fp->tx_mbuf_tag, tx_buf->m_map); + rc = ENODEV; + } } } } @@ -9405,13 +9408,13 @@ bxe_interrupt_alloc(struct bxe_softc *sc } if (((sc->devinfo.pcie_cap_flags & BXE_MSI_CAPABLE_FLAG) == 0) || - (msi_count < 2)) { + (msi_count < 1)) { sc->interrupt_mode = INTR_MODE_INTX; /* try INTx next */ break; } - /* ask for the necessary number of MSI vectors */ - num_requested = min((sc->num_queues + 1), msi_count); + /* ask for a single MSI vector */ + num_requested = 1; BLOGD(sc, DBG_LOAD, "Requesting %d MSI vectors\n", num_requested); @@ -9422,8 +9425,8 @@ bxe_interrupt_alloc(struct bxe_softc *sc break; } - if (num_allocated < 2) { /* possible? */ - BLOGE(sc, "MSI allocation less than 2!\n"); + if (num_allocated != 1) { /* possible? */ + BLOGE(sc, "MSI allocation is not 1!\n"); sc->interrupt_mode = INTR_MODE_INTX; /* try INTx next */ pci_release_msi(sc->dev); break; @@ -9434,38 +9437,26 @@ bxe_interrupt_alloc(struct bxe_softc *sc /* best effort so use the number of vectors allocated to us */ sc->intr_count = num_allocated; - sc->num_queues = num_allocated - 1; + sc->num_queues = num_allocated; rid = 1; /* initial resource identifier */ - /* allocate the MSI vectors */ - for (i = 0; i < num_allocated; i++) { - sc->intr[i].rid = (rid + i); - - if ((sc->intr[i].resource = - bus_alloc_resource_any(sc->dev, - SYS_RES_IRQ, - &sc->intr[i].rid, - RF_ACTIVE)) == NULL) { - BLOGE(sc, "Failed to map MSI[%d] (rid=%d)!\n", - i, (rid + i)); - - for (j = (i - 1); j >= 0; j--) { - bus_release_resource(sc->dev, - SYS_RES_IRQ, - sc->intr[j].rid, - sc->intr[j].resource); - } - - sc->intr_count = 0; - sc->num_queues = 0; - sc->interrupt_mode = INTR_MODE_INTX; /* try INTx next */ - pci_release_msi(sc->dev); - break; - } + sc->intr[0].rid = rid; - BLOGD(sc, DBG_LOAD, "Mapped MSI[%d] (rid=%d)\n", i, (rid + i)); + if ((sc->intr[0].resource = + bus_alloc_resource_any(sc->dev, + SYS_RES_IRQ, + &sc->intr[0].rid, + RF_ACTIVE)) == NULL) { + BLOGE(sc, "Failed to map MSI[0] (rid=%d)!\n", rid); + sc->intr_count = 0; + sc->num_queues = 0; + sc->interrupt_mode = INTR_MODE_INTX; /* try INTx next */ + pci_release_msi(sc->dev); + break; } + + BLOGD(sc, DBG_LOAD, "Mapped MSI[0] (rid=%d)\n", rid); } while (0); do { /* try allocating INTx vector resources */ @@ -9644,54 +9635,21 @@ bxe_interrupt_attach(struct bxe_softc *s fp->state = BXE_FP_STATE_IRQ; } } else if (sc->interrupt_mode == INTR_MODE_MSI) { - BLOGD(sc, DBG_LOAD, "Enabling slowpath MSI[0] vector.\n"); + BLOGD(sc, DBG_LOAD, "Enabling MSI[0] vector\n"); /* - * Setup the interrupt handler. Note that we pass the driver instance - * to the interrupt handler for the slowpath. + * Setup the interrupt handler. Note that we pass the + * driver instance to the interrupt handler which + * will handle both the slowpath and fastpath. */ if ((rc = bus_setup_intr(sc->dev, sc->intr[0].resource, (INTR_TYPE_NET | INTR_MPSAFE), - NULL, bxe_intr_sp, sc, + NULL, bxe_intr_legacy, sc, &sc->intr[0].tag)) != 0) { BLOGE(sc, "Failed to allocate MSI[0] vector (%d)\n", rc); goto bxe_interrupt_attach_exit; } - bus_describe_intr(sc->dev, sc->intr[0].resource, - sc->intr[0].tag, "sp"); - - /* bus_bind_intr(sc->dev, sc->intr[0].resource, 0); */ - - /* initialize the fastpath vectors (note the first was used for sp) */ - for (i = 0; i < sc->num_queues; i++) { - fp = &sc->fp[i]; - BLOGD(sc, DBG_LOAD, "Enabling MSI[%d] vector\n", (i + 1)); - - /* - * Setup the interrupt handler. Note that we pass the - * fastpath context to the interrupt handler in this - * case. - */ - if ((rc = bus_setup_intr(sc->dev, sc->intr[i + 1].resource, - (INTR_TYPE_NET | INTR_MPSAFE), - NULL, bxe_intr_fp, fp, - &sc->intr[i + 1].tag)) != 0) { - BLOGE(sc, "Failed to allocate MSI[%d] vector (%d)\n", - (i + 1), rc); - goto bxe_interrupt_attach_exit; - } - - bus_describe_intr(sc->dev, sc->intr[i + 1].resource, - sc->intr[i + 1].tag, "fp%02d", i); - - /* bind the fastpath instance to a cpu */ - if (sc->num_queues > 1) { - bus_bind_intr(sc->dev, sc->intr[i + 1].resource, i); - } - - fp->state = BXE_FP_STATE_IRQ; - } } else { /* (sc->interrupt_mode == INTR_MODE_INTX) */ BLOGD(sc, DBG_LOAD, "Enabling INTx interrupts\n"); From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 23:41:21 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB9A6E5; Fri, 21 Mar 2014 23:41:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BB7781A7; Fri, 21 Mar 2014 23:41:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LNfLLc074116; Fri, 21 Mar 2014 23:41:21 GMT (envelope-from edavis@svn.freebsd.org) Received: (from edavis@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LNfLC2074115; Fri, 21 Mar 2014 23:41:21 GMT (envelope-from edavis@svn.freebsd.org) Message-Id: <201403212341.s2LNfLC2074115@svn.freebsd.org> From: Eric Davis Date: Fri, 21 Mar 2014 23:41:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r263583 - stable/8/sys/dev/bxe X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 23:41:21 -0000 Author: edavis Date: Fri Mar 21 23:41:21 2014 New Revision: 263583 URL: http://svnweb.freebsd.org/changeset/base/263583 Log: MFC 262999 Fixed MSI interrupt allocation and handling. Fixed a DMA mapping leak that occurs when defragmenting packet chains. Approved by: davidch (mentor) Modified: stable/8/sys/dev/bxe/bxe.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) Modified: stable/8/sys/dev/bxe/bxe.c ============================================================================== --- stable/8/sys/dev/bxe/bxe.c Fri Mar 21 23:09:02 2014 (r263582) +++ stable/8/sys/dev/bxe/bxe.c Fri Mar 21 23:41:21 2014 (r263583) @@ -34,7 +34,7 @@ #include __FBSDID("$FreeBSD$"); -#define BXE_DRIVER_VERSION "1.78.77" +#define BXE_DRIVER_VERSION "1.78.78" #include "bxe.h" #include "ecore_sp.h" @@ -911,7 +911,7 @@ bxe_dma_map_addr(void *arg, bus_dma_segm dma->paddr = segs->ds_addr; dma->nseg = nseg; #if 0 - BLOGD(dma->sc, DBG_LOAD,, + BLOGD(dma->sc, DBG_LOAD, "DMA alloc '%s': vaddr=%p paddr=%p nseg=%d size=%lu\n", dma->msg, dma->vaddr, (void *)dma->paddr, dma->nseg, dma->size); @@ -5494,7 +5494,7 @@ bxe_tx_encap(struct bxe_fastpath *fp, st } /* make sure it fits in the packet window */ - if (__predict_false(nsegs > 12)) { + if (__predict_false(nsegs > BXE_MAX_SEGMENTS)) { /* * The mbuf may be to big for the controller to handle. If the frame * is a TSO frame we'll need to do an additional check. @@ -5509,8 +5509,9 @@ bxe_tx_encap(struct bxe_fastpath *fp, st fp->eth_q_stats.tx_window_violation_std++; } - /* lets try to defragment this mbuf */ + /* lets try to defragment this mbuf and remap it */ fp->eth_q_stats.mbuf_defrag_attempts++; + bus_dmamap_unload(fp->tx_mbuf_tag, tx_buf->m_map); m0 = m_defrag(*m_head, M_DONTWAIT); if (m0 == NULL) { @@ -5528,10 +5529,12 @@ bxe_tx_encap(struct bxe_fastpath *fp, st /* No sense in trying to defrag/copy chain, drop it. :( */ rc = error; } - - /* if the chain is still too long then drop it */ - if (__predict_false(nsegs > 12)) { - rc = ENODEV; + else { + /* if the chain is still too long then drop it */ + if (__predict_false(nsegs > BXE_MAX_SEGMENTS)) { + bus_dmamap_unload(fp->tx_mbuf_tag, tx_buf->m_map); + rc = ENODEV; + } } } } @@ -9405,13 +9408,13 @@ bxe_interrupt_alloc(struct bxe_softc *sc } if (((sc->devinfo.pcie_cap_flags & BXE_MSI_CAPABLE_FLAG) == 0) || - (msi_count < 2)) { + (msi_count < 1)) { sc->interrupt_mode = INTR_MODE_INTX; /* try INTx next */ break; } - /* ask for the necessary number of MSI vectors */ - num_requested = min((sc->num_queues + 1), msi_count); + /* ask for a single MSI vector */ + num_requested = 1; BLOGD(sc, DBG_LOAD, "Requesting %d MSI vectors\n", num_requested); @@ -9422,8 +9425,8 @@ bxe_interrupt_alloc(struct bxe_softc *sc break; } - if (num_allocated < 2) { /* possible? */ - BLOGE(sc, "MSI allocation less than 2!\n"); + if (num_allocated != 1) { /* possible? */ + BLOGE(sc, "MSI allocation is not 1!\n"); sc->interrupt_mode = INTR_MODE_INTX; /* try INTx next */ pci_release_msi(sc->dev); break; @@ -9434,38 +9437,26 @@ bxe_interrupt_alloc(struct bxe_softc *sc /* best effort so use the number of vectors allocated to us */ sc->intr_count = num_allocated; - sc->num_queues = num_allocated - 1; + sc->num_queues = num_allocated; rid = 1; /* initial resource identifier */ - /* allocate the MSI vectors */ - for (i = 0; i < num_allocated; i++) { - sc->intr[i].rid = (rid + i); - - if ((sc->intr[i].resource = - bus_alloc_resource_any(sc->dev, - SYS_RES_IRQ, - &sc->intr[i].rid, - RF_ACTIVE)) == NULL) { - BLOGE(sc, "Failed to map MSI[%d] (rid=%d)!\n", - i, (rid + i)); - - for (j = (i - 1); j >= 0; j--) { - bus_release_resource(sc->dev, - SYS_RES_IRQ, - sc->intr[j].rid, - sc->intr[j].resource); - } - - sc->intr_count = 0; - sc->num_queues = 0; - sc->interrupt_mode = INTR_MODE_INTX; /* try INTx next */ - pci_release_msi(sc->dev); - break; - } + sc->intr[0].rid = rid; - BLOGD(sc, DBG_LOAD, "Mapped MSI[%d] (rid=%d)\n", i, (rid + i)); + if ((sc->intr[0].resource = + bus_alloc_resource_any(sc->dev, + SYS_RES_IRQ, + &sc->intr[0].rid, + RF_ACTIVE)) == NULL) { + BLOGE(sc, "Failed to map MSI[0] (rid=%d)!\n", rid); + sc->intr_count = 0; + sc->num_queues = 0; + sc->interrupt_mode = INTR_MODE_INTX; /* try INTx next */ + pci_release_msi(sc->dev); + break; } + + BLOGD(sc, DBG_LOAD, "Mapped MSI[0] (rid=%d)\n", rid); } while (0); do { /* try allocating INTx vector resources */ @@ -9644,54 +9635,21 @@ bxe_interrupt_attach(struct bxe_softc *s fp->state = BXE_FP_STATE_IRQ; } } else if (sc->interrupt_mode == INTR_MODE_MSI) { - BLOGD(sc, DBG_LOAD, "Enabling slowpath MSI[0] vector.\n"); + BLOGD(sc, DBG_LOAD, "Enabling MSI[0] vector\n"); /* - * Setup the interrupt handler. Note that we pass the driver instance - * to the interrupt handler for the slowpath. + * Setup the interrupt handler. Note that we pass the + * driver instance to the interrupt handler which + * will handle both the slowpath and fastpath. */ if ((rc = bus_setup_intr(sc->dev, sc->intr[0].resource, (INTR_TYPE_NET | INTR_MPSAFE), - NULL, bxe_intr_sp, sc, + NULL, bxe_intr_legacy, sc, &sc->intr[0].tag)) != 0) { BLOGE(sc, "Failed to allocate MSI[0] vector (%d)\n", rc); goto bxe_interrupt_attach_exit; } - bus_describe_intr(sc->dev, sc->intr[0].resource, - sc->intr[0].tag, "sp"); - - /* bus_bind_intr(sc->dev, sc->intr[0].resource, 0); */ - - /* initialize the fastpath vectors (note the first was used for sp) */ - for (i = 0; i < sc->num_queues; i++) { - fp = &sc->fp[i]; - BLOGD(sc, DBG_LOAD, "Enabling MSI[%d] vector\n", (i + 1)); - - /* - * Setup the interrupt handler. Note that we pass the - * fastpath context to the interrupt handler in this - * case. - */ - if ((rc = bus_setup_intr(sc->dev, sc->intr[i + 1].resource, - (INTR_TYPE_NET | INTR_MPSAFE), - NULL, bxe_intr_fp, fp, - &sc->intr[i + 1].tag)) != 0) { - BLOGE(sc, "Failed to allocate MSI[%d] vector (%d)\n", - (i + 1), rc); - goto bxe_interrupt_attach_exit; - } - - bus_describe_intr(sc->dev, sc->intr[i + 1].resource, - sc->intr[i + 1].tag, "fp%02d", i); - - /* bind the fastpath instance to a cpu */ - if (sc->num_queues > 1) { - bus_bind_intr(sc->dev, sc->intr[i + 1].resource, i); - } - - fp->state = BXE_FP_STATE_IRQ; - } } else { /* (sc->interrupt_mode == INTR_MODE_INTX) */ BLOGD(sc, DBG_LOAD, "Enabling INTx interrupts\n"); From owner-svn-src-stable@FreeBSD.ORG Fri Mar 21 23:56:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 746CC70C; Fri, 21 Mar 2014 23:56:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 53BB0306; Fri, 21 Mar 2014 23:56:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2LNudk2080709; Fri, 21 Mar 2014 23:56:39 GMT (envelope-from edavis@svn.freebsd.org) Received: (from edavis@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2LNud2b080707; Fri, 21 Mar 2014 23:56:39 GMT (envelope-from edavis@svn.freebsd.org) Message-Id: <201403212356.s2LNud2b080707@svn.freebsd.org> From: Eric Davis Date: Fri, 21 Mar 2014 23:56:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r263584 - stable/7/sys/dev/bxe X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 23:56:39 -0000 Author: edavis Date: Fri Mar 21 23:56:38 2014 New Revision: 263584 URL: http://svnweb.freebsd.org/changeset/base/263584 Log: MFC 262999 Fixed MSI interrupt allocation and handling. Fixed a DMA mapping leak that occurs when defragmenting packet chains. Approved by: davidch (mentor) Modified: stable/7/sys/dev/bxe/bxe.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/bxe/bxe.c ============================================================================== --- stable/7/sys/dev/bxe/bxe.c Fri Mar 21 23:41:21 2014 (r263583) +++ stable/7/sys/dev/bxe/bxe.c Fri Mar 21 23:56:38 2014 (r263584) @@ -34,7 +34,7 @@ #include __FBSDID("$FreeBSD$"); -#define BXE_DRIVER_VERSION "1.78.77" +#define BXE_DRIVER_VERSION "1.78.78" #include "bxe.h" #include "ecore_sp.h" @@ -911,7 +911,7 @@ bxe_dma_map_addr(void *arg, bus_dma_segm dma->paddr = segs->ds_addr; dma->nseg = nseg; #if 0 - BLOGD(dma->sc, DBG_LOAD,, + BLOGD(dma->sc, DBG_LOAD, "DMA alloc '%s': vaddr=%p paddr=%p nseg=%d size=%lu\n", dma->msg, dma->vaddr, (void *)dma->paddr, dma->nseg, dma->size); @@ -5496,7 +5496,7 @@ bxe_tx_encap(struct bxe_fastpath *fp, st } /* make sure it fits in the packet window */ - if (__predict_false(nsegs > 12)) { + if (__predict_false(nsegs > BXE_MAX_SEGMENTS)) { /* * The mbuf may be to big for the controller to handle. If the frame * is a TSO frame we'll need to do an additional check. @@ -5511,8 +5511,9 @@ bxe_tx_encap(struct bxe_fastpath *fp, st fp->eth_q_stats.tx_window_violation_std++; } - /* lets try to defragment this mbuf */ + /* lets try to defragment this mbuf and remap it */ fp->eth_q_stats.mbuf_defrag_attempts++; + bus_dmamap_unload(fp->tx_mbuf_tag, tx_buf->m_map); m0 = m_defrag(*m_head, M_DONTWAIT); if (m0 == NULL) { @@ -5530,10 +5531,12 @@ bxe_tx_encap(struct bxe_fastpath *fp, st /* No sense in trying to defrag/copy chain, drop it. :( */ rc = error; } - - /* if the chain is still too long then drop it */ - if (__predict_false(nsegs > 12)) { - rc = ENODEV; + else { + /* if the chain is still too long then drop it */ + if (__predict_false(nsegs > BXE_MAX_SEGMENTS)) { + bus_dmamap_unload(fp->tx_mbuf_tag, tx_buf->m_map); + rc = ENODEV; + } } } } @@ -9407,13 +9410,13 @@ bxe_interrupt_alloc(struct bxe_softc *sc } if (((sc->devinfo.pcie_cap_flags & BXE_MSI_CAPABLE_FLAG) == 0) || - (msi_count < 2)) { + (msi_count < 1)) { sc->interrupt_mode = INTR_MODE_INTX; /* try INTx next */ break; } - /* ask for the necessary number of MSI vectors */ - num_requested = min((sc->num_queues + 1), msi_count); + /* ask for a single MSI vector */ + num_requested = 1; BLOGD(sc, DBG_LOAD, "Requesting %d MSI vectors\n", num_requested); @@ -9424,8 +9427,8 @@ bxe_interrupt_alloc(struct bxe_softc *sc break; } - if (num_allocated < 2) { /* possible? */ - BLOGE(sc, "MSI allocation less than 2!\n"); + if (num_allocated != 1) { /* possible? */ + BLOGE(sc, "MSI allocation is not 1!\n"); sc->interrupt_mode = INTR_MODE_INTX; /* try INTx next */ pci_release_msi(sc->dev); break; @@ -9436,38 +9439,26 @@ bxe_interrupt_alloc(struct bxe_softc *sc /* best effort so use the number of vectors allocated to us */ sc->intr_count = num_allocated; - sc->num_queues = num_allocated - 1; + sc->num_queues = num_allocated; rid = 1; /* initial resource identifier */ - /* allocate the MSI vectors */ - for (i = 0; i < num_allocated; i++) { - sc->intr[i].rid = (rid + i); - - if ((sc->intr[i].resource = - bus_alloc_resource_any(sc->dev, - SYS_RES_IRQ, - &sc->intr[i].rid, - RF_ACTIVE)) == NULL) { - BLOGE(sc, "Failed to map MSI[%d] (rid=%d)!\n", - i, (rid + i)); - - for (j = (i - 1); j >= 0; j--) { - bus_release_resource(sc->dev, - SYS_RES_IRQ, - sc->intr[j].rid, - sc->intr[j].resource); - } - - sc->intr_count = 0; - sc->num_queues = 0; - sc->interrupt_mode = INTR_MODE_INTX; /* try INTx next */ - pci_release_msi(sc->dev); - break; - } + sc->intr[0].rid = rid; - BLOGD(sc, DBG_LOAD, "Mapped MSI[%d] (rid=%d)\n", i, (rid + i)); + if ((sc->intr[0].resource = + bus_alloc_resource_any(sc->dev, + SYS_RES_IRQ, + &sc->intr[0].rid, + RF_ACTIVE)) == NULL) { + BLOGE(sc, "Failed to map MSI[0] (rid=%d)!\n", rid); + sc->intr_count = 0; + sc->num_queues = 0; + sc->interrupt_mode = INTR_MODE_INTX; /* try INTx next */ + pci_release_msi(sc->dev); + break; } + + BLOGD(sc, DBG_LOAD, "Mapped MSI[0] (rid=%d)\n", rid); } while (0); do { /* try allocating INTx vector resources */ @@ -9646,54 +9637,21 @@ bxe_interrupt_attach(struct bxe_softc *s fp->state = BXE_FP_STATE_IRQ; } } else if (sc->interrupt_mode == INTR_MODE_MSI) { - BLOGD(sc, DBG_LOAD, "Enabling slowpath MSI[0] vector.\n"); + BLOGD(sc, DBG_LOAD, "Enabling MSI[0] vector\n"); /* - * Setup the interrupt handler. Note that we pass the driver instance - * to the interrupt handler for the slowpath. + * Setup the interrupt handler. Note that we pass the + * driver instance to the interrupt handler which + * will handle both the slowpath and fastpath. */ if ((rc = bus_setup_intr(sc->dev, sc->intr[0].resource, (INTR_TYPE_NET | INTR_MPSAFE), - NULL, bxe_intr_sp, sc, + NULL, bxe_intr_legacy, sc, &sc->intr[0].tag)) != 0) { BLOGE(sc, "Failed to allocate MSI[0] vector (%d)\n", rc); goto bxe_interrupt_attach_exit; } - bus_describe_intr(sc->dev, sc->intr[0].resource, - sc->intr[0].tag, "sp"); - - /* bus_bind_intr(sc->dev, sc->intr[0].resource, 0); */ - - /* initialize the fastpath vectors (note the first was used for sp) */ - for (i = 0; i < sc->num_queues; i++) { - fp = &sc->fp[i]; - BLOGD(sc, DBG_LOAD, "Enabling MSI[%d] vector\n", (i + 1)); - - /* - * Setup the interrupt handler. Note that we pass the - * fastpath context to the interrupt handler in this - * case. - */ - if ((rc = bus_setup_intr(sc->dev, sc->intr[i + 1].resource, - (INTR_TYPE_NET | INTR_MPSAFE), - NULL, bxe_intr_fp, fp, - &sc->intr[i + 1].tag)) != 0) { - BLOGE(sc, "Failed to allocate MSI[%d] vector (%d)\n", - (i + 1), rc); - goto bxe_interrupt_attach_exit; - } - - bus_describe_intr(sc->dev, sc->intr[i + 1].resource, - sc->intr[i + 1].tag, "fp%02d", i); - - /* bind the fastpath instance to a cpu */ - if (sc->num_queues > 1) { - bus_bind_intr(sc->dev, sc->intr[i + 1].resource, i); - } - - fp->state = BXE_FP_STATE_IRQ; - } } else { /* (sc->interrupt_mode == INTR_MODE_INTX) */ BLOGD(sc, DBG_LOAD, "Enabling INTx interrupts\n"); From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 00:20:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 671089C; Sat, 22 Mar 2014 00:20:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 52F1D76E; Sat, 22 Mar 2014 00:20:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M0Km9O090772; Sat, 22 Mar 2014 00:20:48 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M0KmZD090771; Sat, 22 Mar 2014 00:20:48 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403220020.s2M0KmZD090771@svn.freebsd.org> From: Glen Barber Date: Sat, 22 Mar 2014 00:20:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263585 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 00:20:48 -0000 Author: gjb Date: Sat Mar 22 00:20:47 2014 New Revision: 263585 URL: http://svnweb.freebsd.org/changeset/base/263585 Log: Document r263582. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Mar 21 23:56:38 2014 (r263584) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 00:20:47 2014 (r263585) @@ -288,6 +288,9 @@ The &man.urndis.4; driver has been imported from OpenBSD. + The &man.bxe.4; driver has been + updated to version 1.78.78. + From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 00:20:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A8D81E1; Sat, 22 Mar 2014 00:20:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 370A6770; Sat, 22 Mar 2014 00:20:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M0Kq7U090846; Sat, 22 Mar 2014 00:20:52 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M0KqTZ090845; Sat, 22 Mar 2014 00:20:52 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403220020.s2M0KqTZ090845@svn.freebsd.org> From: Glen Barber Date: Sat, 22 Mar 2014 00:20:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263587 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 00:20:52 -0000 Author: gjb Date: Sat Mar 22 00:20:51 2014 New Revision: 263587 URL: http://svnweb.freebsd.org/changeset/base/263587 Log: Document r258818. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 00:20:49 2014 (r263586) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 00:20:51 2014 (r263587) @@ -321,6 +321,12 @@ Userland Changes + The &man.uname.1; utility has been + updated to include the -U and + -K flags, which print the + __FreeBSD_version for the running userland + and kernel, respectively. + The &man.fetch.3; library has been updated to support SNI (Server Name Identification), allowing to use virtual hosts on HTTPS. From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 00:20:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BEBF0183; Sat, 22 Mar 2014 00:20:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3DBE476F; Sat, 22 Mar 2014 00:20:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M0Kodg090810; Sat, 22 Mar 2014 00:20:50 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M0KoR8090809; Sat, 22 Mar 2014 00:20:50 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403220020.s2M0KoR8090809@svn.freebsd.org> From: Glen Barber Date: Sat, 22 Mar 2014 00:20:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263586 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 00:20:50 -0000 Author: gjb Date: Sat Mar 22 00:20:49 2014 New Revision: 263586 URL: http://svnweb.freebsd.org/changeset/base/263586 Log: Document r258844. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 00:20:47 2014 (r263585) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 00:20:49 2014 (r263586) @@ -321,6 +321,10 @@ Userland Changes + The &man.fetch.3; library has been + updated to support SNI (Server Name Identification), allowing + to use virtual hosts on HTTPS. + A segmentation fault and internal compiler error bug in &man.gcc.1; triggered by throwing a warning before parsing any tokens has been fixed. From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 00:47:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 518EBC4F; Sat, 22 Mar 2014 00:47:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3EC9A9D9; Sat, 22 Mar 2014 00:47:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M0l8kI002600; Sat, 22 Mar 2014 00:47:08 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M0l88W002599; Sat, 22 Mar 2014 00:47:08 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403220047.s2M0l88W002599@svn.freebsd.org> From: Glen Barber Date: Sat, 22 Mar 2014 00:47:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263589 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 00:47:08 -0000 Author: gjb Date: Sat Mar 22 00:47:07 2014 New Revision: 263589 URL: http://svnweb.freebsd.org/changeset/base/263589 Log: Document r258635. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 00:47:05 2014 (r263588) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 00:47:07 2014 (r263589) @@ -125,6 +125,10 @@ Kernel Changes + The &man.sysctl.8; + vfs.zfs.arc_meta_limit can now be changed + at runtime. + The &man.mmap.2; system call has been updated to more optimally use superpages and provide support for tweaking the alignment of virtual mappings. From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 00:47:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62606B7D; Sat, 22 Mar 2014 00:47:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4D4AE9D8; Sat, 22 Mar 2014 00:47:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M0l6Eh002557; Sat, 22 Mar 2014 00:47:06 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M0l6nE002556; Sat, 22 Mar 2014 00:47:06 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403220047.s2M0l6nE002556@svn.freebsd.org> From: Glen Barber Date: Sat, 22 Mar 2014 00:47:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263588 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 00:47:06 -0000 Author: gjb Date: Sat Mar 22 00:47:05 2014 New Revision: 263588 URL: http://svnweb.freebsd.org/changeset/base/263588 Log: Document r258818. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 00:20:51 2014 (r263587) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 00:47:05 2014 (r263588) @@ -321,6 +321,13 @@ Userland Changes + The /var/cache directory is now + created with mode 0755 instead of mode + 0750, since this directory is used by + many third-party applications, which makes dropping group + privileges impossible. + The &man.uname.1; utility has been updated to include the -U and -K flags, which print the From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 00:47:10 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 91F50D81; Sat, 22 Mar 2014 00:47:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 515069DA; Sat, 22 Mar 2014 00:47:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M0lABf002644; Sat, 22 Mar 2014 00:47:10 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M0lA2e002643; Sat, 22 Mar 2014 00:47:10 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403220047.s2M0lA2e002643@svn.freebsd.org> From: Glen Barber Date: Sat, 22 Mar 2014 00:47:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263590 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 00:47:10 -0000 Author: gjb Date: Sat Mar 22 00:47:09 2014 New Revision: 263590 URL: http://svnweb.freebsd.org/changeset/base/263590 Log: Document r258586. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 00:47:07 2014 (r263589) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 00:47:09 2014 (r263590) @@ -249,6 +249,9 @@ Network Interface Support + The &man.oce.4; driver has been + updated to version 10.0.664.0. + The &man.qlxgbe.4; driver has been imported from head/. From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 01:02:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F04064A5; Sat, 22 Mar 2014 01:02:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DD629B2F; Sat, 22 Mar 2014 01:02:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M12pto010347; Sat, 22 Mar 2014 01:02:51 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M12pua010346; Sat, 22 Mar 2014 01:02:51 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403220102.s2M12pua010346@svn.freebsd.org> From: Glen Barber Date: Sat, 22 Mar 2014 01:02:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263593 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 01:02:52 -0000 Author: gjb Date: Sat Mar 22 01:02:51 2014 New Revision: 263593 URL: http://svnweb.freebsd.org/changeset/base/263593 Log: Document r258214. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 01:02:48 2014 (r263592) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 01:02:51 2014 (r263593) @@ -125,6 +125,9 @@ Kernel Changes + The &man.ata.4; driver has been updated + to support Intel Lynx Point PCH SMBus devices. + The &man.ata.4; driver has been updated to support Coleto Creek devices. From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 01:02:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6638F342; Sat, 22 Mar 2014 01:02:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 52B7DB2E; Sat, 22 Mar 2014 01:02:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M12n8O010309; Sat, 22 Mar 2014 01:02:49 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M12n7H010308; Sat, 22 Mar 2014 01:02:49 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403220102.s2M12n7H010308@svn.freebsd.org> From: Glen Barber Date: Sat, 22 Mar 2014 01:02:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263592 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 01:02:49 -0000 Author: gjb Date: Sat Mar 22 01:02:48 2014 New Revision: 263592 URL: http://svnweb.freebsd.org/changeset/base/263592 Log: Document r258215. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 01:02:46 2014 (r263591) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 01:02:48 2014 (r263592) @@ -125,6 +125,9 @@ Kernel Changes + The &man.ata.4; driver has been updated + to support Coleto Creek devices. + The &man.ahci.4; driver has been updated to support the PCI-express solid state drive in the &apple; MacBook Air (model A1465). From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 01:02:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D86C26E; Sat, 22 Mar 2014 01:02:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 09275B2D; Sat, 22 Mar 2014 01:02:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M12kGt010267; Sat, 22 Mar 2014 01:02:46 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M12kND010266; Sat, 22 Mar 2014 01:02:46 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403220102.s2M12kND010266@svn.freebsd.org> From: Glen Barber Date: Sat, 22 Mar 2014 01:02:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263591 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 01:02:47 -0000 Author: gjb Date: Sat Mar 22 01:02:46 2014 New Revision: 263591 URL: http://svnweb.freebsd.org/changeset/base/263591 Log: Document r258217. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 00:47:09 2014 (r263590) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 01:02:46 2014 (r263591) @@ -125,6 +125,10 @@ Kernel Changes + The &man.ahci.4; driver has been updated + to support the PCI-express solid state drive in the + &apple; MacBook Air (model A1465). + The &man.sysctl.8; vfs.zfs.arc_meta_limit can now be changed at runtime. From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 01:02:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A194D595; Sat, 22 Mar 2014 01:02:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 24F99B31; Sat, 22 Mar 2014 01:02:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M12sRn010391; Sat, 22 Mar 2014 01:02:54 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M12saK010390; Sat, 22 Mar 2014 01:02:54 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403220102.s2M12saK010390@svn.freebsd.org> From: Glen Barber Date: Sat, 22 Mar 2014 01:02:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263594 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 01:02:54 -0000 Author: gjb Date: Sat Mar 22 01:02:53 2014 New Revision: 263594 URL: http://svnweb.freebsd.org/changeset/base/263594 Log: Document r258183. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 01:02:51 2014 (r263593) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 01:02:53 2014 (r263594) @@ -338,6 +338,10 @@ Userland Changes + Setting nmbcluster + values to their current value will now be ignored, instead of + failing with an error. + The /var/cache directory is now created with mode 0755 instead of mode From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 01:20:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3277AA95; Sat, 22 Mar 2014 01:20:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1FA92C52; Sat, 22 Mar 2014 01:20:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M1Ke4e017060; Sat, 22 Mar 2014 01:20:40 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M1KeQP017059; Sat, 22 Mar 2014 01:20:40 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403220120.s2M1KeQP017059@svn.freebsd.org> From: Glen Barber Date: Sat, 22 Mar 2014 01:20:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263596 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 01:20:41 -0000 Author: gjb Date: Sat Mar 22 01:20:40 2014 New Revision: 263596 URL: http://svnweb.freebsd.org/changeset/base/263596 Log: Note that r257618 is preliminary support. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 01:20:38 2014 (r263595) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 01:20:40 2014 (r263596) @@ -260,7 +260,8 @@ Network Interface Support The &man.re.4; driver has been - updated to support the RTL8168EP chipset. + updated to add preliminary support for the RTL8168EP + chipset. The &man.oce.4; driver has been updated to version 10.0.664.0. From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 01:20:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F35A9C3; Sat, 22 Mar 2014 01:20:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EFBD8C51; Sat, 22 Mar 2014 01:20:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M1KcUr017019; Sat, 22 Mar 2014 01:20:38 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M1KcnE017018; Sat, 22 Mar 2014 01:20:38 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403220120.s2M1KcnE017018@svn.freebsd.org> From: Glen Barber Date: Sat, 22 Mar 2014 01:20:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263595 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 01:20:39 -0000 Author: gjb Date: Sat Mar 22 01:20:38 2014 New Revision: 263595 URL: http://svnweb.freebsd.org/changeset/base/263595 Log: Document r257618. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 01:02:53 2014 (r263594) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 01:20:38 2014 (r263595) @@ -259,6 +259,9 @@ Network Interface Support + The &man.re.4; driver has been + updated to support the RTL8168EP chipset. + The &man.oce.4; driver has been updated to version 10.0.664.0. From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 01:20:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 77911BC1; Sat, 22 Mar 2014 01:20:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 64C77C53; Sat, 22 Mar 2014 01:20:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M1Kh2t017101; Sat, 22 Mar 2014 01:20:43 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M1KhiH017100; Sat, 22 Mar 2014 01:20:43 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403220120.s2M1KhiH017100@svn.freebsd.org> From: Glen Barber Date: Sat, 22 Mar 2014 01:20:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263597 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 01:20:43 -0000 Author: gjb Date: Sat Mar 22 01:20:42 2014 New Revision: 263597 URL: http://svnweb.freebsd.org/changeset/base/263597 Log: Document r257616. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 01:20:40 2014 (r263596) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 01:20:42 2014 (r263597) @@ -259,6 +259,10 @@ Network Interface Support + The &man.re.4; driver has been + updated to support the RTL8168G, RTL8168GU and RTL8411B + chipsets. + The &man.re.4; driver has been updated to add preliminary support for the RTL8168EP chipset. From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 01:20:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3F1ACEA; Sat, 22 Mar 2014 01:20:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8B6BFC54; Sat, 22 Mar 2014 01:20:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M1KjK2017146; Sat, 22 Mar 2014 01:20:45 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M1KjPo017145; Sat, 22 Mar 2014 01:20:45 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403220120.s2M1KjPo017145@svn.freebsd.org> From: Glen Barber Date: Sat, 22 Mar 2014 01:20:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263598 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 01:20:46 -0000 Author: gjb Date: Sat Mar 22 01:20:45 2014 New Revision: 263598 URL: http://svnweb.freebsd.org/changeset/base/263598 Log: Add r257614 to note about previous commit. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 01:20:42 2014 (r263597) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 01:20:45 2014 (r263598) @@ -259,9 +259,9 @@ Network Interface Support - The &man.re.4; driver has been - updated to support the RTL8168G, RTL8168GU and RTL8411B - chipsets. + The &man.re.4; driver has + been updated to support the RTL8168G, RTL8168GU and + RTL8411B chipsets. The &man.re.4; driver has been updated to add preliminary support for the RTL8168EP From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 01:20:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A769E0D; Sat, 22 Mar 2014 01:20:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BD13CC55; Sat, 22 Mar 2014 01:20:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M1KlWe017185; Sat, 22 Mar 2014 01:20:47 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M1Kl3L017184; Sat, 22 Mar 2014 01:20:47 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403220120.s2M1Kl3L017184@svn.freebsd.org> From: Glen Barber Date: Sat, 22 Mar 2014 01:20:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263599 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 01:20:48 -0000 Author: gjb Date: Sat Mar 22 01:20:47 2014 New Revision: 263599 URL: http://svnweb.freebsd.org/changeset/base/263599 Log: Document r257611. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 01:20:45 2014 (r263598) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 01:20:47 2014 (r263599) @@ -259,6 +259,10 @@ Network Interface Support + The &man.re.4; driver has been + updated to add preliminary support for the RTL8106E + chipset. + The &man.re.4; driver has been updated to support the RTL8168G, RTL8168GU and RTL8411B chipsets. From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 01:20:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D87A7E2D; Sat, 22 Mar 2014 01:20:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C4D2DC58; Sat, 22 Mar 2014 01:20:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M1KnPk017222; Sat, 22 Mar 2014 01:20:49 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M1KnvQ017221; Sat, 22 Mar 2014 01:20:49 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403220120.s2M1KnvQ017221@svn.freebsd.org> From: Glen Barber Date: Sat, 22 Mar 2014 01:20:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263600 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 01:20:49 -0000 Author: gjb Date: Sat Mar 22 01:20:49 2014 New Revision: 263600 URL: http://svnweb.freebsd.org/changeset/base/263600 Log: Document r257496. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 01:20:47 2014 (r263599) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 01:20:49 2014 (r263600) @@ -350,6 +350,10 @@ Userland Changes + The &man.ddb.8; utility has been updated + to add show ioapic and show all + ioapics. + Setting nmbcluster values to their current value will now be ignored, instead of failing with an error. From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 01:20:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3F3A76; Sat, 22 Mar 2014 01:20:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F2D1BCC5; Sat, 22 Mar 2014 01:20:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M1Kpv6017607; Sat, 22 Mar 2014 01:20:51 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M1KpQO017606; Sat, 22 Mar 2014 01:20:51 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403220120.s2M1KpQO017606@svn.freebsd.org> From: Glen Barber Date: Sat, 22 Mar 2014 01:20:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263601 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 01:20:53 -0000 Author: gjb Date: Sat Mar 22 01:20:51 2014 New Revision: 263601 URL: http://svnweb.freebsd.org/changeset/base/263601 Log: Document r257373. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 01:20:49 2014 (r263600) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 01:20:51 2014 (r263601) @@ -125,6 +125,9 @@ Kernel Changes + A deadlock triggered by powering off + a USB device has been fixed. + The &man.ata.4; driver has been updated to support Intel Lynx Point PCH SMBus devices. From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 01:30:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5943748C; Sat, 22 Mar 2014 01:30:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 45806D3F; Sat, 22 Mar 2014 01:30:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M1UPuZ020042; Sat, 22 Mar 2014 01:30:25 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M1UPAU020041; Sat, 22 Mar 2014 01:30:25 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403220130.s2M1UPAU020041@svn.freebsd.org> From: Glen Barber Date: Sat, 22 Mar 2014 01:30:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263602 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 01:30:25 -0000 Author: gjb Date: Sat Mar 22 01:30:24 2014 New Revision: 263602 URL: http://svnweb.freebsd.org/changeset/base/263602 Log: Document r257253. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 01:20:51 2014 (r263601) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 01:30:24 2014 (r263602) @@ -125,6 +125,9 @@ Kernel Changes + A kernel panic triggered by unmounting + a busy &man.zfs.8; filesystem has been fixed. + A deadlock triggered by powering off a USB device has been fixed. From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 01:30:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D861560; Sat, 22 Mar 2014 01:30:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8A707D41; Sat, 22 Mar 2014 01:30:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M1URs1020080; Sat, 22 Mar 2014 01:30:27 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M1URsa020079; Sat, 22 Mar 2014 01:30:27 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403220130.s2M1URsa020079@svn.freebsd.org> From: Glen Barber Date: Sat, 22 Mar 2014 01:30:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263603 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 01:30:27 -0000 Author: gjb Date: Sat Mar 22 01:30:27 2014 New Revision: 263603 URL: http://svnweb.freebsd.org/changeset/base/263603 Log: Document r257126. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 01:30:24 2014 (r263602) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 01:30:27 2014 (r263603) @@ -125,6 +125,12 @@ Kernel Changes + A new &man.sysctl.8;, + kern.disallow_high_osrel, has been added + which disables executing the images compiled on a userland + with a higher major version number than the major version + number of the running kernel. + A kernel panic triggered by unmounting a busy &man.zfs.8; filesystem has been fixed. From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 01:30:29 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DBD1A68B; Sat, 22 Mar 2014 01:30:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8A328D44; Sat, 22 Mar 2014 01:30:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M1UTn9020121; Sat, 22 Mar 2014 01:30:29 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M1UTrR020120; Sat, 22 Mar 2014 01:30:29 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403220130.s2M1UTrR020120@svn.freebsd.org> From: Glen Barber Date: Sat, 22 Mar 2014 01:30:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263604 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 01:30:29 -0000 Author: gjb Date: Sat Mar 22 01:30:29 2014 New Revision: 263604 URL: http://svnweb.freebsd.org/changeset/base/263604 Log: Document r257125. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 01:30:27 2014 (r263603) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 01:30:29 2014 (r263604) @@ -125,6 +125,11 @@ Kernel Changes + A new &man.sysctl.8;, + debug.devfs_iosize_max_clamp has been added + which enables and disables SSIZE_MAX-sized + I/O requests on &man.devfs.5; files. + A new &man.sysctl.8;, kern.disallow_high_osrel, has been added which disables executing the images compiled on a userland From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 01:30:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53F727B4; Sat, 22 Mar 2014 01:30:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A48D2D46; Sat, 22 Mar 2014 01:30:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M1UV80020162; Sat, 22 Mar 2014 01:30:31 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M1UV9C020161; Sat, 22 Mar 2014 01:30:31 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403220130.s2M1UV9C020161@svn.freebsd.org> From: Glen Barber Date: Sat, 22 Mar 2014 01:30:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263605 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 01:30:32 -0000 Author: gjb Date: Sat Mar 22 01:30:31 2014 New Revision: 263605 URL: http://svnweb.freebsd.org/changeset/base/263605 Log: Document r257119. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 01:30:29 2014 (r263604) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 01:30:31 2014 (r263605) @@ -125,6 +125,10 @@ Kernel Changes + A kernel panic triggered in + zfs_root() after a failed rollback has + been fixed. + A new &man.sysctl.8;, debug.devfs_iosize_max_clamp has been added which enables and disables SSIZE_MAX-sized From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 02:01:23 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79D2CB73; Sat, 22 Mar 2014 02:01:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 664F7FD7; Sat, 22 Mar 2014 02:01:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M21NBc034597; Sat, 22 Mar 2014 02:01:23 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M21N3S034596; Sat, 22 Mar 2014 02:01:23 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403220201.s2M21N3S034596@svn.freebsd.org> From: Glen Barber Date: Sat, 22 Mar 2014 02:01:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263606 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 02:01:23 -0000 Author: gjb Date: Sat Mar 22 02:01:22 2014 New Revision: 263606 URL: http://svnweb.freebsd.org/changeset/base/263606 Log: Document r256924. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 01:30:31 2014 (r263605) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 02:01:22 2014 (r263606) @@ -125,6 +125,9 @@ Kernel Changes + The &man.mfi.4; driver has been updated + to support MegaRAID Invader controllers. + A kernel panic triggered in zfs_root() after a failed rollback has been fixed. From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 02:01:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A45E4C4B; Sat, 22 Mar 2014 02:01:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9195AFD8; Sat, 22 Mar 2014 02:01:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M21POD034639; Sat, 22 Mar 2014 02:01:25 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M21P5W034638; Sat, 22 Mar 2014 02:01:25 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403220201.s2M21P5W034638@svn.freebsd.org> From: Glen Barber Date: Sat, 22 Mar 2014 02:01:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263607 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 02:01:25 -0000 Author: gjb Date: Sat Mar 22 02:01:25 2014 New Revision: 263607 URL: http://svnweb.freebsd.org/changeset/base/263607 Log: Document r256917. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 02:01:22 2014 (r263606) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 02:01:25 2014 (r263607) @@ -539,6 +539,10 @@ &man.rc.8; Scripts + Support for first boot + scripts has been added to &man.rc.8;. See &man.rc.8; and + &man.rc.conf.5; for implementation details. + The &man.rc.8; system will now re-source &man.rc.conf.5; on receipt of SIGALRM. From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 02:01:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A551EE57; Sat, 22 Mar 2014 02:01:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 091C3FDA; Sat, 22 Mar 2014 02:01:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M21TD7034722; Sat, 22 Mar 2014 02:01:29 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M21TsR034721; Sat, 22 Mar 2014 02:01:29 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403220201.s2M21TsR034721@svn.freebsd.org> From: Glen Barber Date: Sat, 22 Mar 2014 02:01:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263609 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 02:01:30 -0000 Author: gjb Date: Sat Mar 22 02:01:29 2014 New Revision: 263609 URL: http://svnweb.freebsd.org/changeset/base/263609 Log: Document r256437. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 02:01:27 2014 (r263608) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 02:01:29 2014 (r263609) @@ -125,6 +125,9 @@ Kernel Changes + The &man.isci.4; driver is now loadable + via &man.kldload.8;. + System-level &man.sysctl.8; values are now exposed to the system for the &man.ixgbe.4; device. From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 02:01:34 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4001DFD0; Sat, 22 Mar 2014 02:01:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2D44CFDE; Sat, 22 Mar 2014 02:01:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M21YIX034801; Sat, 22 Mar 2014 02:01:34 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M21YKk034800; Sat, 22 Mar 2014 02:01:34 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403220201.s2M21YKk034800@svn.freebsd.org> From: Glen Barber Date: Sat, 22 Mar 2014 02:01:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263611 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 02:01:34 -0000 Author: gjb Date: Sat Mar 22 02:01:33 2014 New Revision: 263611 URL: http://svnweb.freebsd.org/changeset/base/263611 Log: Document r256033. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 02:01:31 2014 (r263610) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 02:01:33 2014 (r263611) @@ -125,6 +125,9 @@ Kernel Changes + The &man.arcmsr.4; driver has been + updated to version 1.20.00.28. + The &man.isci.4; driver is now loadable via &man.kldload.8;. From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 02:01:28 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F40F5D70; Sat, 22 Mar 2014 02:01:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D6462FD9; Sat, 22 Mar 2014 02:01:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M21RxD034678; Sat, 22 Mar 2014 02:01:27 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M21R6g034677; Sat, 22 Mar 2014 02:01:27 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403220201.s2M21R6g034677@svn.freebsd.org> From: Glen Barber Date: Sat, 22 Mar 2014 02:01:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263608 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 02:01:28 -0000 Author: gjb Date: Sat Mar 22 02:01:27 2014 New Revision: 263608 URL: http://svnweb.freebsd.org/changeset/base/263608 Log: Document r256759. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 02:01:25 2014 (r263607) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 02:01:27 2014 (r263608) @@ -125,6 +125,9 @@ Kernel Changes + System-level &man.sysctl.8; values are + now exposed to the system for the &man.ixgbe.4; device. + The &man.mfi.4; driver has been updated to support MegaRAID Invader controllers. From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 02:01:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C61BF77; Sat, 22 Mar 2014 02:01:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2F0EAFDB; Sat, 22 Mar 2014 02:01:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M21WPs034762; Sat, 22 Mar 2014 02:01:32 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M21WpA034761; Sat, 22 Mar 2014 02:01:32 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403220201.s2M21WpA034761@svn.freebsd.org> From: Glen Barber Date: Sat, 22 Mar 2014 02:01:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263610 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 02:01:33 -0000 Author: gjb Date: Sat Mar 22 02:01:31 2014 New Revision: 263610 URL: http://svnweb.freebsd.org/changeset/base/263610 Log: Document r256054. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 02:01:29 2014 (r263609) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 02:01:31 2014 (r263610) @@ -380,6 +380,10 @@ Userland Changes + A new flag -c, has + been added to &man.pgrep.1; and &man.pkill.1;, which restricts + the process lookup to the specified login class. + The &man.ddb.8; utility has been updated to add show ioapic and show all ioapics. From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 02:06:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 013533FE; Sat, 22 Mar 2014 02:06:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E094F6B; Sat, 22 Mar 2014 02:06:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M26BYj035396; Sat, 22 Mar 2014 02:06:11 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M26BOU035395; Sat, 22 Mar 2014 02:06:11 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403220206.s2M26BOU035395@svn.freebsd.org> From: Glen Barber Date: Sat, 22 Mar 2014 02:06:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263612 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 02:06:12 -0000 Author: gjb Date: Sat Mar 22 02:06:11 2014 New Revision: 263612 URL: http://svnweb.freebsd.org/changeset/base/263612 Log: Document r255934. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 02:01:33 2014 (r263611) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 02:06:11 2014 (r263612) @@ -566,6 +566,9 @@ Contributed Software + The &man.readline.3; library has been + updated to version 1.104. + Sendmail has been updated to version 8.14.8. From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 02:06:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35C284D1; Sat, 22 Mar 2014 02:06:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 22AB26C; Sat, 22 Mar 2014 02:06:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M26Dvm035439; Sat, 22 Mar 2014 02:06:13 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M26DxC035438; Sat, 22 Mar 2014 02:06:13 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403220206.s2M26DxC035438@svn.freebsd.org> From: Glen Barber Date: Sat, 22 Mar 2014 02:06:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263613 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 02:06:14 -0000 Author: gjb Date: Sat Mar 22 02:06:13 2014 New Revision: 263613 URL: http://svnweb.freebsd.org/changeset/base/263613 Log: Fix a typo. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 02:06:11 2014 (r263612) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 02:06:13 2014 (r263613) @@ -468,7 +468,7 @@ The &man.newsyslog.8; utility has been changed to use the size of the file, instead of the blocks the - file takes on the disk to matche the behavior documented in + file takes on the disk to match the behavior documented in &man.newsyslog.conf.5;. A bug in &man.zdb.8; which would cause From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 02:15:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F52F6D2; Sat, 22 Mar 2014 02:15:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3EAB214E; Sat, 22 Mar 2014 02:15:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M2FV0L039470; Sat, 22 Mar 2014 02:15:31 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M2FVce039468; Sat, 22 Mar 2014 02:15:31 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403220215.s2M2FVce039468@svn.freebsd.org> From: Glen Barber Date: Sat, 22 Mar 2014 02:15:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263614 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 02:15:31 -0000 Author: gjb Date: Sat Mar 22 02:15:30 2014 New Revision: 263614 URL: http://svnweb.freebsd.org/changeset/base/263614 Log: Wrap long lines. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 02:06:13 2014 (r263613) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 02:15:30 2014 (r263614) @@ -13,7 +13,8 @@ 2014 - The &os; Documentation Project + The &os; Documentation + Project @@ -26,13 +27,13 @@ - The release notes for &os; &release.current; contain a summary - of the changes made to the &os; base system on the - &release.branch; development line. - This document lists applicable security advisories that were issued since - the last release, as well as significant changes to the &os; - kernel and userland. - Some brief remarks on upgrading are also presented. + The release notes for &os; &release.current; contain + a summary of the changes made to the &os; base system on the + &release.branch; development line. This document lists + applicable security advisories that were issued since the last + release, as well as significant changes to the &os; kernel and + userland. Some brief remarks on upgrading are also + presented. @@ -44,18 +45,22 @@ deleted features of &os;. It also provides some notes on upgrading from previous versions of &os;. - This distribution of &os; &release.current; is a - &release.type; distribution. It can be found at &release.url; or any of its mirrors. More - information on obtaining this (or other) &release.type; - distributions of &os; can be found in the Obtaining - &os; appendix to the &os; Handbook. + This distribution of &os; &release.current; is + a &release.type; distribution. It can be found at &release.url; or any of its + mirrors. More information on obtaining this (or other) + &release.type; distributions of &os; can be found in the Obtaining + &os; appendix to the &os; + Handbook. - All users are encouraged to consult the release errata before - installing &os;. The errata document is updated with + All users are encouraged to consult the release errata + before installing &os;. The errata document is updated with late-breaking information discovered late in the release cycle or after the release. Typically, it contains - information on known bugs, security advisories, and corrections to - documentation. An up-to-date copy of the errata for &os; + information on known bugs, security advisories, and corrections + to documentation. An up-to-date copy of the errata for &os; &release.current; can be found on the &os; Web site. @@ -78,10 +83,10 @@ Security Advisories - Problems described in the following security advisories have - been fixed. For more information, consult the individual - advisories available from - http://security.FreeBSD.org/. + Problems described in the following security advisories + have been fixed. For more information, consult the individual + advisories available from http://security.FreeBSD.org/. @@ -636,15 +641,17 @@ - User-visible incompatibilities + User-visible + incompatibilities FreeBSD 9.0 and later have several incompatibilities in system configuration which you might want to know before upgrading your system. Please read this section and - the Upgrading - Section in 9.0-RELEASE Release Notes carefully before - submitting a problem report and/or posting a question to the - FreeBSD mailing lists. + the Upgrading + Section in 9.0-RELEASE Release Notes carefully + before submitting a problem report and/or posting a question + to the FreeBSD mailing lists. From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 02:15:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 465476D3; Sat, 22 Mar 2014 02:15:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3209214F; Sat, 22 Mar 2014 02:15:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M2FXU1039514; Sat, 22 Mar 2014 02:15:33 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M2FXsJ039511; Sat, 22 Mar 2014 02:15:33 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403220215.s2M2FXsJ039511@svn.freebsd.org> From: Glen Barber Date: Sat, 22 Mar 2014 02:15:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263615 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 02:15:33 -0000 Author: gjb Date: Sat Mar 22 02:15:32 2014 New Revision: 263615 URL: http://svnweb.freebsd.org/changeset/base/263615 Log: Wrap long lines. Fix case in titles. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 02:15:30 2014 (r263614) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 02:15:32 2014 (r263615) @@ -1,11 +1,12 @@ - %release; + %release; ]>
- &os; &release.current; Release Notes + + &os; &release.current; Release Notes The &os; Project @@ -103,21 +104,24 @@ - FreeBSD-SA-14:01.bsnmpd + FreeBSD-SA-14:01.bsnmpd 1 January 2014 Fix &man.bsnmpd.1; remote denial of service vulnerability - FreeBSD-SA-14:02.ntpd + FreeBSD-SA-14:02.ntpd 1 January 2014 Disable monitor feature in &man.ntpd.8; by default - FreeBSD-SA-14:04.bind + FreeBSD-SA-14:04.bind 1 January 2014 Remote denial of service vulnerability @@ -608,11 +612,11 @@ - Upgrading from previous releases of &os; + Upgrading from Previous Releases of &os; - Upgrading using &man.freebsd-update.8; or a source-based - procedure + Upgrading Using &man.freebsd-update.8; or a Source-Based + Procedure Binary upgrades between RELEASE versions (and snapshots of the various security branches) are supported @@ -630,7 +634,8 @@ For more specific information about upgrading - instructions, see http://www.FreeBSD.org/releases/9.3R/installation.html. + instructions, see http://www.FreeBSD.org/releases/9.3R/installation.html. ?> @@ -641,8 +646,8 @@ - User-visible - incompatibilities + User-Visible + Incompatibilities FreeBSD 9.0 and later have several incompatibilities in system configuration which you might want to know before From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 02:15:35 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F0597FE; Sat, 22 Mar 2014 02:15:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3C4FD150; Sat, 22 Mar 2014 02:15:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M2FZNN039553; Sat, 22 Mar 2014 02:15:35 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M2FZqp039552; Sat, 22 Mar 2014 02:15:35 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403220215.s2M2FZqp039552@svn.freebsd.org> From: Glen Barber Date: Sat, 22 Mar 2014 02:15:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263616 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 02:15:35 -0000 Author: gjb Date: Sat Mar 22 02:15:34 2014 New Revision: 263616 URL: http://svnweb.freebsd.org/changeset/base/263616 Log: Replace 'FreeBSD' with &os; macro. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 02:15:32 2014 (r263615) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Mar 22 02:15:34 2014 (r263616) @@ -649,14 +649,14 @@ User-Visible Incompatibilities - FreeBSD 9.0 and later have several incompatibilities in + &os; 9.0 and later have several incompatibilities in system configuration which you might want to know before upgrading your system. Please read this section and the Upgrading Section in 9.0-RELEASE Release Notes carefully before submitting a problem report and/or posting a question - to the FreeBSD mailing lists. + to the &os; mailing lists.
From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 02:30:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F5F7B1C; Sat, 22 Mar 2014 02:30:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D5E08285; Sat, 22 Mar 2014 02:30:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M2Udrh047160; Sat, 22 Mar 2014 02:30:39 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M2Udmn047153; Sat, 22 Mar 2014 02:30:39 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403220230.s2M2Udmn047153@svn.freebsd.org> From: Glen Barber Date: Sat, 22 Mar 2014 02:30:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263617 - in stable/9/release/doc/en_US.ISO8859-1: errata hardware installation readme X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 02:30:40 -0000 Author: gjb Date: Sat Mar 22 02:30:38 2014 New Revision: 263617 URL: http://svnweb.freebsd.org/changeset/base/263617 Log: Gratuitous copyright bump for files that will be changed for the 9.3-RELEASE cycle. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/errata/article.xml stable/9/release/doc/en_US.ISO8859-1/hardware/article.xml stable/9/release/doc/en_US.ISO8859-1/installation/article.xml stable/9/release/doc/en_US.ISO8859-1/readme/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Sat Mar 22 02:15:34 2014 (r263616) +++ stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Sat Mar 22 02:30:38 2014 (r263617) @@ -26,7 +26,7 @@ $FreeBSD$ - 2012 + 2014 The &os; Documentation Project Modified: stable/9/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/hardware/article.xml Sat Mar 22 02:15:34 2014 (r263616) +++ stable/9/release/doc/en_US.ISO8859-1/hardware/article.xml Sat Mar 22 02:30:38 2014 (r263617) @@ -29,6 +29,7 @@ 2011 2012 2013 + 2014 The &os; Documentation Project Modified: stable/9/release/doc/en_US.ISO8859-1/installation/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/installation/article.xml Sat Mar 22 02:15:34 2014 (r263616) +++ stable/9/release/doc/en_US.ISO8859-1/installation/article.xml Sat Mar 22 02:30:38 2014 (r263617) @@ -13,7 +13,7 @@ $FreeBSD$ - 2012 + 2014 The &os; Documentation Project Modified: stable/9/release/doc/en_US.ISO8859-1/readme/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/readme/article.xml Sat Mar 22 02:15:34 2014 (r263616) +++ stable/9/release/doc/en_US.ISO8859-1/readme/article.xml Sat Mar 22 02:30:38 2014 (r263617) @@ -21,7 +21,7 @@ $FreeBSD$ - 2012 + 2014 The &os; Documentation Project From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 10:40:04 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D4574AF8; Sat, 22 Mar 2014 10:40:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A773ADE7; Sat, 22 Mar 2014 10:40:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2MAe496052041; Sat, 22 Mar 2014 10:40:04 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2MAe4jE052039; Sat, 22 Mar 2014 10:40:04 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201403221040.s2MAe4jE052039@svn.freebsd.org> From: Bryan Drewery Date: Sat, 22 Mar 2014 10:40:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263621 - stable/10/usr.sbin/pkg X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 10:40:04 -0000 Author: bdrewery Date: Sat Mar 22 10:40:04 2014 New Revision: 263621 URL: http://svnweb.freebsd.org/changeset/base/263621 Log: MFC r263180: Fix ABI from /usr/local/etc/pkg.conf not being respected. Modified: stable/10/usr.sbin/pkg/config.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pkg/config.c ============================================================================== --- stable/10/usr.sbin/pkg/config.c Sat Mar 22 10:26:09 2014 (r263620) +++ stable/10/usr.sbin/pkg/config.c Sat Mar 22 10:40:04 2014 (r263621) @@ -66,6 +66,7 @@ struct config_entry { char *value; STAILQ_HEAD(, config_value) *list; bool envset; + bool main_only; /* Only set in pkg.conf. */ }; static struct config_entry c[] = { @@ -76,6 +77,7 @@ static struct config_entry c[] = { NULL, NULL, false, + false, }, [ABI] = { PKG_CONFIG_STRING, @@ -84,6 +86,7 @@ static struct config_entry c[] = { NULL, NULL, false, + true, }, [MIRROR_TYPE] = { PKG_CONFIG_STRING, @@ -92,6 +95,7 @@ static struct config_entry c[] = { NULL, NULL, false, + false, }, [ASSUME_ALWAYS_YES] = { PKG_CONFIG_BOOL, @@ -100,6 +104,7 @@ static struct config_entry c[] = { NULL, NULL, false, + true, }, [SIGNATURE_TYPE] = { PKG_CONFIG_STRING, @@ -108,6 +113,7 @@ static struct config_entry c[] = { NULL, NULL, false, + false, }, [FINGERPRINTS] = { PKG_CONFIG_STRING, @@ -116,6 +122,7 @@ static struct config_entry c[] = { NULL, NULL, false, + false, }, [REPOS_DIR] = { PKG_CONFIG_LIST, @@ -124,6 +131,7 @@ static struct config_entry c[] = { NULL, NULL, false, + true, }, }; @@ -597,6 +605,9 @@ config_parse(ucl_object_t *obj, pkg_conf for (i = 0; i < CONFIG_SIZE; i++) { if (c[i].envset) continue; + /* Prevent overriding ABI, ASSUME_ALWAYS_YES, etc. */ + if (conftype != CONFFILE_PKG && c[i].main_only == true) + continue; switch (c[i].type) { case PKG_CONFIG_LIST: c[i].list = temp_config[i].list; From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 10:44:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D331D2F; Sat, 22 Mar 2014 10:44:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5021DE66; Sat, 22 Mar 2014 10:44:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2MAihjS055481; Sat, 22 Mar 2014 10:44:43 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2MAihBG055480; Sat, 22 Mar 2014 10:44:43 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201403221044.s2MAihBG055480@svn.freebsd.org> From: Bryan Drewery Date: Sat, 22 Mar 2014 10:44:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263623 - stable/9/usr.sbin/pkg X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 10:44:43 -0000 Author: bdrewery Date: Sat Mar 22 10:44:42 2014 New Revision: 263623 URL: http://svnweb.freebsd.org/changeset/base/263623 Log: MFC r263180: Fix ABI from /usr/local/etc/pkg.conf not being respected. Modified: stable/9/usr.sbin/pkg/config.c Directory Properties: stable/9/usr.sbin/pkg/ (props changed) Modified: stable/9/usr.sbin/pkg/config.c ============================================================================== --- stable/9/usr.sbin/pkg/config.c Sat Mar 22 10:42:01 2014 (r263622) +++ stable/9/usr.sbin/pkg/config.c Sat Mar 22 10:44:42 2014 (r263623) @@ -64,6 +64,7 @@ struct config_entry { char *value; STAILQ_HEAD(, config_value) *list; bool envset; + bool main_only; /* Only set in pkg.conf. */ }; static struct config_entry c[] = { @@ -74,6 +75,7 @@ static struct config_entry c[] = { NULL, NULL, false, + false, }, [ABI] = { PKG_CONFIG_STRING, @@ -82,6 +84,7 @@ static struct config_entry c[] = { NULL, NULL, false, + true, }, [MIRROR_TYPE] = { PKG_CONFIG_STRING, @@ -90,6 +93,7 @@ static struct config_entry c[] = { NULL, NULL, false, + false, }, [ASSUME_ALWAYS_YES] = { PKG_CONFIG_BOOL, @@ -98,6 +102,7 @@ static struct config_entry c[] = { NULL, NULL, false, + true, }, [SIGNATURE_TYPE] = { PKG_CONFIG_STRING, @@ -106,6 +111,7 @@ static struct config_entry c[] = { NULL, NULL, false, + false, }, [FINGERPRINTS] = { PKG_CONFIG_STRING, @@ -114,6 +120,7 @@ static struct config_entry c[] = { NULL, NULL, false, + false, }, [REPOS_DIR] = { PKG_CONFIG_LIST, @@ -122,6 +129,7 @@ static struct config_entry c[] = { NULL, NULL, false, + true, }, }; @@ -394,6 +402,9 @@ config_parse(ucl_object_t *obj, pkg_conf for (i = 0; i < CONFIG_SIZE; i++) { if (c[i].envset) continue; + /* Prevent overriding ABI, ASSUME_ALWAYS_YES, etc. */ + if (conftype != CONFFILE_PKG && c[i].main_only == true) + continue; switch (c[i].type) { case PKG_CONFIG_LIST: c[i].list = temp_config[i].list; From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 10:47:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70CCEE84; Sat, 22 Mar 2014 10:47:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5D800E77; Sat, 22 Mar 2014 10:47:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2MAloIF055889; Sat, 22 Mar 2014 10:47:50 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2MAlo3L055888; Sat, 22 Mar 2014 10:47:50 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201403221047.s2MAlo3L055888@svn.freebsd.org> From: Bryan Drewery Date: Sat, 22 Mar 2014 10:47:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263624 - stable/10/usr.sbin/pkg X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 10:47:50 -0000 Author: bdrewery Date: Sat Mar 22 10:47:49 2014 New Revision: 263624 URL: http://svnweb.freebsd.org/changeset/base/263624 Log: MFC r263181: Fix ASSUME_ALWAYS_YES not being parsed properly from config after UCL conversion. Modified: stable/10/usr.sbin/pkg/config.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pkg/config.c ============================================================================== --- stable/10/usr.sbin/pkg/config.c Sat Mar 22 10:44:42 2014 (r263623) +++ stable/10/usr.sbin/pkg/config.c Sat Mar 22 10:47:49 2014 (r263624) @@ -594,6 +594,10 @@ config_parse(ucl_object_t *obj, pkg_conf next); } break; + case PKG_CONFIG_BOOL: + temp_config[i].value = + strdup(ucl_object_toboolean(cur) ? "yes" : "no"); + break; default: /* Normal string value. */ temp_config[i].value = strdup(ucl_object_tostring(cur)); From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 10:48:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 136E6FB0; Sat, 22 Mar 2014 10:48:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F3F28E7B; Sat, 22 Mar 2014 10:48:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2MAm7uw055977; Sat, 22 Mar 2014 10:48:07 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2MAm72k055976; Sat, 22 Mar 2014 10:48:07 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201403221048.s2MAm72k055976@svn.freebsd.org> From: Bryan Drewery Date: Sat, 22 Mar 2014 10:48:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263625 - stable/9/usr.sbin/pkg X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 10:48:08 -0000 Author: bdrewery Date: Sat Mar 22 10:48:07 2014 New Revision: 263625 URL: http://svnweb.freebsd.org/changeset/base/263625 Log: MFC r263180: Fix ABI from /usr/local/etc/pkg.conf not being respected. Modified: stable/9/usr.sbin/pkg/config.c Directory Properties: stable/9/usr.sbin/pkg/ (props changed) Modified: stable/9/usr.sbin/pkg/config.c ============================================================================== --- stable/9/usr.sbin/pkg/config.c Sat Mar 22 10:47:49 2014 (r263624) +++ stable/9/usr.sbin/pkg/config.c Sat Mar 22 10:48:07 2014 (r263625) @@ -391,6 +391,10 @@ config_parse(ucl_object_t *obj, pkg_conf next); } break; + case PKG_CONFIG_BOOL: + temp_config[i].value = + strdup(ucl_object_toboolean(cur) ? "yes" : "no"); + break; default: /* Normal string value. */ temp_config[i].value = strdup(ucl_object_tostring(cur)); From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 10:53:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8FDE533B; Sat, 22 Mar 2014 10:53:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7BED1F2B; Sat, 22 Mar 2014 10:53:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2MArVr9059552; Sat, 22 Mar 2014 10:53:31 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2MArVFo059551; Sat, 22 Mar 2014 10:53:31 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201403221053.s2MArVFo059551@svn.freebsd.org> From: Bryan Drewery Date: Sat, 22 Mar 2014 10:53:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263626 - stable/9/usr.sbin/pkg X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 10:53:31 -0000 Author: bdrewery Date: Sat Mar 22 10:53:30 2014 New Revision: 263626 URL: http://svnweb.freebsd.org/changeset/base/263626 Log: Revert r263625 to fix commit msg for blame Modified: stable/9/usr.sbin/pkg/config.c Directory Properties: stable/9/usr.sbin/pkg/ (props changed) Modified: stable/9/usr.sbin/pkg/config.c ============================================================================== --- stable/9/usr.sbin/pkg/config.c Sat Mar 22 10:48:07 2014 (r263625) +++ stable/9/usr.sbin/pkg/config.c Sat Mar 22 10:53:30 2014 (r263626) @@ -391,10 +391,6 @@ config_parse(ucl_object_t *obj, pkg_conf next); } break; - case PKG_CONFIG_BOOL: - temp_config[i].value = - strdup(ucl_object_toboolean(cur) ? "yes" : "no"); - break; default: /* Normal string value. */ temp_config[i].value = strdup(ucl_object_tostring(cur)); From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 10:54:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D832546; Sat, 22 Mar 2014 10:54:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3A035F31; Sat, 22 Mar 2014 10:54:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2MAs3WX059726; Sat, 22 Mar 2014 10:54:03 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2MAs3IV059725; Sat, 22 Mar 2014 10:54:03 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201403221054.s2MAs3IV059725@svn.freebsd.org> From: Bryan Drewery Date: Sat, 22 Mar 2014 10:54:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263627 - stable/9/usr.sbin/pkg X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 10:54:03 -0000 Author: bdrewery Date: Sat Mar 22 10:54:02 2014 New Revision: 263627 URL: http://svnweb.freebsd.org/changeset/base/263627 Log: MFC r263181: Fix ASSUME_ALWAYS_YES not being parsed properly from config after UCL conversion. Modified: stable/9/usr.sbin/pkg/config.c Directory Properties: stable/9/usr.sbin/pkg/ (props changed) Modified: stable/9/usr.sbin/pkg/config.c ============================================================================== --- stable/9/usr.sbin/pkg/config.c Sat Mar 22 10:53:30 2014 (r263626) +++ stable/9/usr.sbin/pkg/config.c Sat Mar 22 10:54:02 2014 (r263627) @@ -391,6 +391,10 @@ config_parse(ucl_object_t *obj, pkg_conf next); } break; + case PKG_CONFIG_BOOL: + temp_config[i].value = + strdup(ucl_object_toboolean(cur) ? "yes" : "no"); + break; default: /* Normal string value. */ temp_config[i].value = strdup(ucl_object_tostring(cur)); From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 11:43:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1AC3CB; Sat, 22 Mar 2014 11:43:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C3CD73B6; Sat, 22 Mar 2014 11:43:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2MBhZc6080054; Sat, 22 Mar 2014 11:43:35 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2MBhZ4r080052; Sat, 22 Mar 2014 11:43:35 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201403221143.s2MBhZ4r080052@svn.freebsd.org> From: Kirk McKusick Date: Sat, 22 Mar 2014 11:43:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263629 - stable/10/sbin/fsck_ffs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 11:43:36 -0000 Author: mckusick Date: Sat Mar 22 11:43:35 2014 New Revision: 263629 URL: http://svnweb.freebsd.org/changeset/base/263629 Log: MFC of 263062: Avoid segment fault when attempting to clean up cylinder group buffer cache. PR: 187221 Submitted by: Petr Lampa Obtained from: Petr Lampa MFC after: 1 week MFC of 262488: Arguments for malloc and calloc should be size_t, not int. Use proper bounds check when trying to free cached memory. Spotted by: Xin Li Tested by: Dmitry Sivachenko MFC after: 2 weeks Modified: stable/10/sbin/fsck_ffs/fsck.h stable/10/sbin/fsck_ffs/fsutil.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/fsck_ffs/fsck.h ============================================================================== --- stable/10/sbin/fsck_ffs/fsck.h Sat Mar 22 11:26:39 2014 (r263628) +++ stable/10/sbin/fsck_ffs/fsck.h Sat Mar 22 11:43:35 2014 (r263629) @@ -369,7 +369,7 @@ int flushentry(void); * to get space. */ static inline void* -Malloc(int size) +Malloc(size_t size) { void *retval; @@ -384,7 +384,7 @@ Malloc(int size) * to get space. */ static inline void* -Calloc(int cnt, int size) +Calloc(size_t cnt, size_t size) { void *retval; Modified: stable/10/sbin/fsck_ffs/fsutil.c ============================================================================== --- stable/10/sbin/fsck_ffs/fsutil.c Sat Mar 22 11:26:39 2014 (r263628) +++ stable/10/sbin/fsck_ffs/fsutil.c Sat Mar 22 11:43:35 2014 (r263629) @@ -225,7 +225,7 @@ cgget(int cg) struct cg *cgp; if (cgbufs == NULL) { - cgbufs = Calloc(sblock.fs_ncg, sizeof(struct bufarea)); + cgbufs = calloc(sblock.fs_ncg, sizeof(struct bufarea)); if (cgbufs == NULL) errx(EEXIT, "cannot allocate cylinder group buffers"); } @@ -254,6 +254,8 @@ flushentry(void) { struct bufarea *cgbp; + if (flushtries == sblock.fs_ncg || cgbufs == NULL) + return (0); cgbp = &cgbufs[flushtries++]; if (cgbp->b_un.b_cg == NULL) return (0); @@ -434,13 +436,15 @@ ckfini(int markclean) } if (numbufs != cnt) errx(EEXIT, "panic: lost %d buffers", numbufs - cnt); - for (cnt = 0; cnt < sblock.fs_ncg; cnt++) { - if (cgbufs[cnt].b_un.b_cg == NULL) - continue; - flush(fswritefd, &cgbufs[cnt]); - free(cgbufs[cnt].b_un.b_cg); + if (cgbufs != NULL) { + for (cnt = 0; cnt < sblock.fs_ncg; cnt++) { + if (cgbufs[cnt].b_un.b_cg == NULL) + continue; + flush(fswritefd, &cgbufs[cnt]); + free(cgbufs[cnt].b_un.b_cg); + } + free(cgbufs); } - free(cgbufs); pbp = pdirbp = (struct bufarea *)0; if (cursnapshot == 0 && sblock.fs_clean != markclean) { if ((sblock.fs_clean = markclean) != 0) { From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 11:49:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0891245; Sat, 22 Mar 2014 11:49:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 72DFC3E5; Sat, 22 Mar 2014 11:49:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2MBnjPD080812; Sat, 22 Mar 2014 11:49:45 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2MBnjVK080807; Sat, 22 Mar 2014 11:49:45 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201403221149.s2MBnjVK080807@svn.freebsd.org> From: Kirk McKusick Date: Sat, 22 Mar 2014 11:49:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263630 - stable/9/sbin/fsck_ffs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 11:49:45 -0000 Author: mckusick Date: Sat Mar 22 11:49:44 2014 New Revision: 263630 URL: http://svnweb.freebsd.org/changeset/base/263630 Log: MFC of 263062: Avoid segment fault when attempting to clean up cylinder group buffer cache. PR: 187221 Submitted by: Petr Lampa Obtained from: Petr Lampa MFC after: 1 week MFC of 262488: Arguments for malloc and calloc should be size_t, not int. Use proper bounds check when trying to free cached memory. Spotted by: Xin Li Tested by: Dmitry Sivachenko MFC after: 2 weeks Modified: stable/9/sbin/fsck_ffs/fsck.h stable/9/sbin/fsck_ffs/fsutil.c Directory Properties: stable/9/ (props changed) stable/9/sbin/ (props changed) stable/9/sbin/fsck_ffs/ (props changed) stable/9/sbin/ggate/ (props changed) Modified: stable/9/sbin/fsck_ffs/fsck.h ============================================================================== --- stable/9/sbin/fsck_ffs/fsck.h Sat Mar 22 11:43:35 2014 (r263629) +++ stable/9/sbin/fsck_ffs/fsck.h Sat Mar 22 11:49:44 2014 (r263630) @@ -366,7 +366,7 @@ int flushentry(void); * to get space. */ static inline void* -Malloc(int size) +Malloc(size_t size) { void *retval; @@ -381,7 +381,7 @@ Malloc(int size) * to get space. */ static inline void* -Calloc(int cnt, int size) +Calloc(size_t cnt, size_t size) { void *retval; Modified: stable/9/sbin/fsck_ffs/fsutil.c ============================================================================== --- stable/9/sbin/fsck_ffs/fsutil.c Sat Mar 22 11:43:35 2014 (r263629) +++ stable/9/sbin/fsck_ffs/fsutil.c Sat Mar 22 11:49:44 2014 (r263630) @@ -205,7 +205,7 @@ cgget(int cg) struct cg *cgp; if (cgbufs == NULL) { - cgbufs = Calloc(sblock.fs_ncg, sizeof(struct bufarea)); + cgbufs = calloc(sblock.fs_ncg, sizeof(struct bufarea)); if (cgbufs == NULL) errx(EEXIT, "cannot allocate cylinder group buffers"); } @@ -234,6 +234,8 @@ flushentry(void) { struct bufarea *cgbp; + if (flushtries == sblock.fs_ncg || cgbufs == NULL) + return (0); cgbp = &cgbufs[flushtries++]; if (cgbp->b_un.b_cg == NULL) return (0); @@ -414,13 +416,15 @@ ckfini(int markclean) } if (numbufs != cnt) errx(EEXIT, "panic: lost %d buffers", numbufs - cnt); - for (cnt = 0; cnt < sblock.fs_ncg; cnt++) { - if (cgbufs[cnt].b_un.b_cg == NULL) - continue; - flush(fswritefd, &cgbufs[cnt]); - free(cgbufs[cnt].b_un.b_cg); + if (cgbufs != NULL) { + for (cnt = 0; cnt < sblock.fs_ncg; cnt++) { + if (cgbufs[cnt].b_un.b_cg == NULL) + continue; + flush(fswritefd, &cgbufs[cnt]); + free(cgbufs[cnt].b_un.b_cg); + } + free(cgbufs); } - free(cgbufs); pbp = pdirbp = (struct bufarea *)0; if (cursnapshot == 0 && sblock.fs_clean != markclean) { if ((sblock.fs_clean = markclean) != 0) { From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 13:58:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 97EB0FF3; Sat, 22 Mar 2014 13:58:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 840D2F48; Sat, 22 Mar 2014 13:58:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2MDw6iq033047; Sat, 22 Mar 2014 13:58:06 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2MDw6MH033046; Sat, 22 Mar 2014 13:58:06 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <201403221358.s2MDw6MH033046@svn.freebsd.org> From: Takahashi Yoshihiro Date: Sat, 22 Mar 2014 13:58:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263633 - stable/9/etc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 13:58:06 -0000 Author: nyan Date: Sat Mar 22 13:58:06 2014 New Revision: 263633 URL: http://svnweb.freebsd.org/changeset/base/263633 Log: MFC: r255425 The correct variable is apparently MACHINE_ARCH, not TARGET_ARCH. Modified: stable/9/etc/Makefile Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/Makefile ============================================================================== --- stable/9/etc/Makefile Sat Mar 22 13:06:32 2014 (r263632) +++ stable/9/etc/Makefile Sat Mar 22 13:58:06 2014 (r263633) @@ -50,7 +50,7 @@ BIN1= crontab \ syslog.conf \ termcap.small -.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "powerpc64" BIN1+= libmap32.conf .endif From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 17:12:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04AB0190; Sat, 22 Mar 2014 17:12:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E542F1F9; Sat, 22 Mar 2014 17:12:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2MHC64V013515; Sat, 22 Mar 2014 17:12:06 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2MHC6cJ013514; Sat, 22 Mar 2014 17:12:06 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201403221712.s2MHC6cJ013514@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 22 Mar 2014 17:12:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263640 - stable/9/sys/dev/sound/usb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 17:12:07 -0000 Author: hselasky Date: Sat Mar 22 17:12:06 2014 New Revision: 263640 URL: http://svnweb.freebsd.org/changeset/base/263640 Log: MFC r263155: Add support for more sample rates to USB audio driver. PR: usb/171254 Modified: stable/9/sys/dev/sound/usb/uaudio.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/9/sys/dev/sound/usb/uaudio.c Sat Mar 22 16:01:28 2014 (r263639) +++ stable/9/sys/dev/sound/usb/uaudio.c Sat Mar 22 17:12:06 2014 (r263640) @@ -182,7 +182,7 @@ struct uaudio_configure_msg { struct uaudio_softc *sc; }; -#define CHAN_MAX_ALT 20 +#define CHAN_MAX_ALT 24 struct uaudio_chan_alt { union uaudio_asf1d p_asf1d; @@ -1883,6 +1883,10 @@ uaudio_chan_fill_info_sub(struct uaudio_ /* This structure defines all the supported rates. */ static const uint32_t uaudio_rate_list[CHAN_MAX_ALT] = { + 384000, + 352800, + 192000, + 176400, 96000, 88200, 88000, From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 17:14:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76C832E6; Sat, 22 Mar 2014 17:14:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6304420D; Sat, 22 Mar 2014 17:14:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2MHE9gU013782; Sat, 22 Mar 2014 17:14:09 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2MHE9qU013781; Sat, 22 Mar 2014 17:14:09 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201403221714.s2MHE9qU013781@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 22 Mar 2014 17:14:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r263641 - stable/8/sys/dev/sound/usb X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 17:14:09 -0000 Author: hselasky Date: Sat Mar 22 17:14:08 2014 New Revision: 263641 URL: http://svnweb.freebsd.org/changeset/base/263641 Log: MFC r263155: Add support for more sample rates to USB audio driver. PR: usb/171254 Modified: stable/8/sys/dev/sound/usb/uaudio.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/usb/ (props changed) Modified: stable/8/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/8/sys/dev/sound/usb/uaudio.c Sat Mar 22 17:12:06 2014 (r263640) +++ stable/8/sys/dev/sound/usb/uaudio.c Sat Mar 22 17:14:08 2014 (r263641) @@ -182,7 +182,7 @@ struct uaudio_configure_msg { struct uaudio_softc *sc; }; -#define CHAN_MAX_ALT 20 +#define CHAN_MAX_ALT 24 struct uaudio_chan_alt { union uaudio_asf1d p_asf1d; @@ -1883,6 +1883,10 @@ uaudio_chan_fill_info_sub(struct uaudio_ /* This structure defines all the supported rates. */ static const uint32_t uaudio_rate_list[CHAN_MAX_ALT] = { + 384000, + 352800, + 192000, + 176400, 96000, 88200, 88000, From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 17:16:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78282440; Sat, 22 Mar 2014 17:16:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 64947224; Sat, 22 Mar 2014 17:16:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2MHGfPI014131; Sat, 22 Mar 2014 17:16:41 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2MHGfRd014130; Sat, 22 Mar 2014 17:16:41 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201403221716.s2MHGfRd014130@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 22 Mar 2014 17:16:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263642 - stable/10/sys/dev/sound/usb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 17:16:41 -0000 Author: hselasky Date: Sat Mar 22 17:16:40 2014 New Revision: 263642 URL: http://svnweb.freebsd.org/changeset/base/263642 Log: MFC r263155: Add support for more sample rates to USB audio driver. PR: usb/171254 Modified: stable/10/sys/dev/sound/usb/uaudio.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/10/sys/dev/sound/usb/uaudio.c Sat Mar 22 17:14:08 2014 (r263641) +++ stable/10/sys/dev/sound/usb/uaudio.c Sat Mar 22 17:16:40 2014 (r263642) @@ -182,7 +182,7 @@ struct uaudio_configure_msg { struct uaudio_softc *sc; }; -#define CHAN_MAX_ALT 20 +#define CHAN_MAX_ALT 24 struct uaudio_chan_alt { union uaudio_asf1d p_asf1d; @@ -1883,6 +1883,10 @@ uaudio_chan_fill_info_sub(struct uaudio_ /* This structure defines all the supported rates. */ static const uint32_t uaudio_rate_list[CHAN_MAX_ALT] = { + 384000, + 352800, + 192000, + 176400, 96000, 88200, 88000, From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 17:18:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB846583; Sat, 22 Mar 2014 17:18:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A793122C; Sat, 22 Mar 2014 17:18:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2MHIjve014393; Sat, 22 Mar 2014 17:18:45 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2MHIiP8014389; Sat, 22 Mar 2014 17:18:44 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201403221718.s2MHIiP8014389@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 22 Mar 2014 17:18:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263643 - in stable/10/sys/dev: sound/usb usb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 17:18:45 -0000 Author: hselasky Date: Sat Mar 22 17:18:44 2014 New Revision: 263643 URL: http://svnweb.freebsd.org/changeset/base/263643 Log: MFC r263159: Workaround for USB MIDI adapters which use non-supported values of wMaxPacketSize for BULK endpoints. Modified: stable/10/sys/dev/sound/usb/uaudio.c stable/10/sys/dev/usb/usb_core.h stable/10/sys/dev/usb/usb_transfer.c stable/10/sys/dev/usb/usbdi.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/10/sys/dev/sound/usb/uaudio.c Sat Mar 22 17:16:40 2014 (r263642) +++ stable/10/sys/dev/sound/usb/uaudio.c Sat Mar 22 17:18:44 2014 (r263643) @@ -5674,6 +5674,25 @@ umidi_probe(device_t dev) DPRINTF("error=%s\n", usbd_errstr(error)); goto detach; } + + /* + * Some USB MIDI device makers couldn't resist using + * wMaxPacketSize = 4 for RX and TX BULK endpoints, although + * that size is an unsupported value for FULL speed BULK + * endpoints. The same applies to some HIGH speed MIDI devices + * which are using a wMaxPacketSize different from 512 bytes. + * + * Refer to section 5.8.3 in USB 2.0 PDF: Cite: "All Host + * Controllers are required to have support for 8-, 16-, 32-, + * and 64-byte maximum packet sizes for full-speed bulk + * endpoints and 512 bytes for high-speed bulk endpoints." + */ + if (usbd_xfer_maxp_was_clamped(chan->xfer[UMIDI_TX_TRANSFER])) + chan->single_command = 1; + + if (chan->single_command != 0) + device_printf(dev, "Single command MIDI quirk enabled\n"); + if ((chan->max_cable > UMIDI_CABLES_MAX) || (chan->max_cable == 0)) { chan->max_cable = UMIDI_CABLES_MAX; Modified: stable/10/sys/dev/usb/usb_core.h ============================================================================== --- stable/10/sys/dev/usb/usb_core.h Sat Mar 22 17:16:40 2014 (r263642) +++ stable/10/sys/dev/usb/usb_core.h Sat Mar 22 17:18:44 2014 (r263643) @@ -114,6 +114,8 @@ struct usb_xfer_flags_int { uint8_t can_cancel_immed:1; /* set if USB transfer can be * cancelled immediately */ uint8_t doing_callback:1; /* set if executing the callback */ + uint8_t maxp_was_clamped:1; /* set if the max packet size + * was outside its allowed range */ }; /* Modified: stable/10/sys/dev/usb/usb_transfer.c ============================================================================== --- stable/10/sys/dev/usb/usb_transfer.c Sat Mar 22 17:16:40 2014 (r263642) +++ stable/10/sys/dev/usb/usb_transfer.c Sat Mar 22 17:18:44 2014 (r263643) @@ -346,6 +346,7 @@ usbd_transfer_setup_sub(struct usb_setup usb_frcount_t n_frlengths; usb_frcount_t n_frbuffers; usb_frcount_t x; + uint16_t maxp_old; uint8_t type; uint8_t zmps; @@ -433,6 +434,11 @@ usbd_transfer_setup_sub(struct usb_setup if (xfer->max_packet_count > parm->hc_max_packet_count) { xfer->max_packet_count = parm->hc_max_packet_count; } + + /* store max packet size value before filtering */ + + maxp_old = xfer->max_packet_size; + /* filter "wMaxPacketSize" according to HC capabilities */ if ((xfer->max_packet_size > parm->hc_max_packet_size) || @@ -465,6 +471,13 @@ usbd_transfer_setup_sub(struct usb_setup } } + /* + * Check if the max packet size was outside its allowed range + * and clamped to a valid value: + */ + if (maxp_old != xfer->max_packet_size) + xfer->flags_int.maxp_was_clamped = 1; + /* compute "max_frame_size" */ usbd_update_max_frame_size(xfer); @@ -3432,3 +3445,13 @@ usbd_xfer_get_timestamp(struct usb_xfer { return (xfer->isoc_time_complete); } + +/* + * The following function returns non-zero if the max packet size + * field was clamped to a valid value. Else it returns zero. + */ +uint8_t +usbd_xfer_maxp_was_clamped(struct usb_xfer *xfer) +{ + return (xfer->flags_int.maxp_was_clamped); +} Modified: stable/10/sys/dev/usb/usbdi.h ============================================================================== --- stable/10/sys/dev/usb/usbdi.h Sat Mar 22 17:16:40 2014 (r263642) +++ stable/10/sys/dev/usb/usbdi.h Sat Mar 22 17:18:44 2014 (r263643) @@ -569,6 +569,7 @@ int usbd_xfer_is_stalled(struct usb_xfer void usbd_xfer_set_flag(struct usb_xfer *xfer, int flag); void usbd_xfer_clr_flag(struct usb_xfer *xfer, int flag); uint16_t usbd_xfer_get_timestamp(struct usb_xfer *xfer); +uint8_t usbd_xfer_maxp_was_clamped(struct usb_xfer *xfer); void usbd_copy_in(struct usb_page_cache *cache, usb_frlength_t offset, const void *ptr, usb_frlength_t len); From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 17:20:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EFF2A71D; Sat, 22 Mar 2014 17:20:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DC64A23F; Sat, 22 Mar 2014 17:20:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2MHKBMf014665; Sat, 22 Mar 2014 17:20:11 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2MHKBfY014661; Sat, 22 Mar 2014 17:20:11 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201403221720.s2MHKBfY014661@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 22 Mar 2014 17:20:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263644 - in stable/9/sys/dev: sound/usb usb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 17:20:12 -0000 Author: hselasky Date: Sat Mar 22 17:20:10 2014 New Revision: 263644 URL: http://svnweb.freebsd.org/changeset/base/263644 Log: MFC r263159: Workaround for USB MIDI adapters which use non-supported values of wMaxPacketSize for BULK endpoints. Modified: stable/9/sys/dev/sound/usb/uaudio.c stable/9/sys/dev/usb/usb_core.h stable/9/sys/dev/usb/usb_transfer.c stable/9/sys/dev/usb/usbdi.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/9/sys/dev/sound/usb/uaudio.c Sat Mar 22 17:18:44 2014 (r263643) +++ stable/9/sys/dev/sound/usb/uaudio.c Sat Mar 22 17:20:10 2014 (r263644) @@ -5674,6 +5674,25 @@ umidi_probe(device_t dev) DPRINTF("error=%s\n", usbd_errstr(error)); goto detach; } + + /* + * Some USB MIDI device makers couldn't resist using + * wMaxPacketSize = 4 for RX and TX BULK endpoints, although + * that size is an unsupported value for FULL speed BULK + * endpoints. The same applies to some HIGH speed MIDI devices + * which are using a wMaxPacketSize different from 512 bytes. + * + * Refer to section 5.8.3 in USB 2.0 PDF: Cite: "All Host + * Controllers are required to have support for 8-, 16-, 32-, + * and 64-byte maximum packet sizes for full-speed bulk + * endpoints and 512 bytes for high-speed bulk endpoints." + */ + if (usbd_xfer_maxp_was_clamped(chan->xfer[UMIDI_TX_TRANSFER])) + chan->single_command = 1; + + if (chan->single_command != 0) + device_printf(dev, "Single command MIDI quirk enabled\n"); + if ((chan->max_cable > UMIDI_CABLES_MAX) || (chan->max_cable == 0)) { chan->max_cable = UMIDI_CABLES_MAX; Modified: stable/9/sys/dev/usb/usb_core.h ============================================================================== --- stable/9/sys/dev/usb/usb_core.h Sat Mar 22 17:18:44 2014 (r263643) +++ stable/9/sys/dev/usb/usb_core.h Sat Mar 22 17:20:10 2014 (r263644) @@ -113,6 +113,8 @@ struct usb_xfer_flags_int { uint8_t can_cancel_immed:1; /* set if USB transfer can be * cancelled immediately */ uint8_t doing_callback:1; /* set if executing the callback */ + uint8_t maxp_was_clamped:1; /* set if the max packet size + * was outside its allowed range */ }; /* Modified: stable/9/sys/dev/usb/usb_transfer.c ============================================================================== --- stable/9/sys/dev/usb/usb_transfer.c Sat Mar 22 17:18:44 2014 (r263643) +++ stable/9/sys/dev/usb/usb_transfer.c Sat Mar 22 17:20:10 2014 (r263644) @@ -322,6 +322,7 @@ usbd_transfer_setup_sub(struct usb_setup usb_frcount_t n_frlengths; usb_frcount_t n_frbuffers; usb_frcount_t x; + uint16_t maxp_old; uint8_t type; uint8_t zmps; @@ -407,6 +408,11 @@ usbd_transfer_setup_sub(struct usb_setup if (xfer->max_packet_count > parm->hc_max_packet_count) { xfer->max_packet_count = parm->hc_max_packet_count; } + + /* store max packet size value before filtering */ + + maxp_old = xfer->max_packet_size; + /* filter "wMaxPacketSize" according to HC capabilities */ if ((xfer->max_packet_size > parm->hc_max_packet_size) || @@ -439,6 +445,13 @@ usbd_transfer_setup_sub(struct usb_setup } } + /* + * Check if the max packet size was outside its allowed range + * and clamped to a valid value: + */ + if (maxp_old != xfer->max_packet_size) + xfer->flags_int.maxp_was_clamped = 1; + /* compute "max_frame_size" */ usbd_update_max_frame_size(xfer); @@ -3365,3 +3378,13 @@ usbd_xfer_get_timestamp(struct usb_xfer { return (xfer->isoc_time_complete); } + +/* + * The following function returns non-zero if the max packet size + * field was clamped to a valid value. Else it returns zero. + */ +uint8_t +usbd_xfer_maxp_was_clamped(struct usb_xfer *xfer) +{ + return (xfer->flags_int.maxp_was_clamped); +} Modified: stable/9/sys/dev/usb/usbdi.h ============================================================================== --- stable/9/sys/dev/usb/usbdi.h Sat Mar 22 17:18:44 2014 (r263643) +++ stable/9/sys/dev/usb/usbdi.h Sat Mar 22 17:20:10 2014 (r263644) @@ -549,6 +549,7 @@ int usbd_xfer_is_stalled(struct usb_xfer void usbd_xfer_set_flag(struct usb_xfer *xfer, int flag); void usbd_xfer_clr_flag(struct usb_xfer *xfer, int flag); uint16_t usbd_xfer_get_timestamp(struct usb_xfer *xfer); +uint8_t usbd_xfer_maxp_was_clamped(struct usb_xfer *xfer); void usbd_copy_in(struct usb_page_cache *cache, usb_frlength_t offset, const void *ptr, usb_frlength_t len); From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 17:21:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62D23856; Sat, 22 Mar 2014 17:21:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4F52B2B3; Sat, 22 Mar 2014 17:21:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2MHLkhh017823; Sat, 22 Mar 2014 17:21:46 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2MHLjxt017819; Sat, 22 Mar 2014 17:21:45 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201403221721.s2MHLjxt017819@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 22 Mar 2014 17:21:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r263645 - in stable/8/sys/dev: sound/usb usb X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 17:21:46 -0000 Author: hselasky Date: Sat Mar 22 17:21:45 2014 New Revision: 263645 URL: http://svnweb.freebsd.org/changeset/base/263645 Log: MFC r263159: Workaround for USB MIDI adapters which use non-supported values of wMaxPacketSize for BULK endpoints. Modified: stable/8/sys/dev/sound/usb/uaudio.c stable/8/sys/dev/usb/usb_core.h stable/8/sys/dev/usb/usb_transfer.c stable/8/sys/dev/usb/usbdi.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/usb/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/8/sys/dev/sound/usb/uaudio.c Sat Mar 22 17:20:10 2014 (r263644) +++ stable/8/sys/dev/sound/usb/uaudio.c Sat Mar 22 17:21:45 2014 (r263645) @@ -5674,6 +5674,25 @@ umidi_probe(device_t dev) DPRINTF("error=%s\n", usbd_errstr(error)); goto detach; } + + /* + * Some USB MIDI device makers couldn't resist using + * wMaxPacketSize = 4 for RX and TX BULK endpoints, although + * that size is an unsupported value for FULL speed BULK + * endpoints. The same applies to some HIGH speed MIDI devices + * which are using a wMaxPacketSize different from 512 bytes. + * + * Refer to section 5.8.3 in USB 2.0 PDF: Cite: "All Host + * Controllers are required to have support for 8-, 16-, 32-, + * and 64-byte maximum packet sizes for full-speed bulk + * endpoints and 512 bytes for high-speed bulk endpoints." + */ + if (usbd_xfer_maxp_was_clamped(chan->xfer[UMIDI_TX_TRANSFER])) + chan->single_command = 1; + + if (chan->single_command != 0) + device_printf(dev, "Single command MIDI quirk enabled\n"); + if ((chan->max_cable > UMIDI_CABLES_MAX) || (chan->max_cable == 0)) { chan->max_cable = UMIDI_CABLES_MAX; Modified: stable/8/sys/dev/usb/usb_core.h ============================================================================== --- stable/8/sys/dev/usb/usb_core.h Sat Mar 22 17:20:10 2014 (r263644) +++ stable/8/sys/dev/usb/usb_core.h Sat Mar 22 17:21:45 2014 (r263645) @@ -113,6 +113,8 @@ struct usb_xfer_flags_int { uint8_t can_cancel_immed:1; /* set if USB transfer can be * cancelled immediately */ uint8_t doing_callback:1; /* set if executing the callback */ + uint8_t maxp_was_clamped:1; /* set if the max packet size + * was outside its allowed range */ }; /* Modified: stable/8/sys/dev/usb/usb_transfer.c ============================================================================== --- stable/8/sys/dev/usb/usb_transfer.c Sat Mar 22 17:20:10 2014 (r263644) +++ stable/8/sys/dev/usb/usb_transfer.c Sat Mar 22 17:21:45 2014 (r263645) @@ -322,6 +322,7 @@ usbd_transfer_setup_sub(struct usb_setup usb_frcount_t n_frlengths; usb_frcount_t n_frbuffers; usb_frcount_t x; + uint16_t maxp_old; uint8_t type; uint8_t zmps; @@ -407,6 +408,11 @@ usbd_transfer_setup_sub(struct usb_setup if (xfer->max_packet_count > parm->hc_max_packet_count) { xfer->max_packet_count = parm->hc_max_packet_count; } + + /* store max packet size value before filtering */ + + maxp_old = xfer->max_packet_size; + /* filter "wMaxPacketSize" according to HC capabilities */ if ((xfer->max_packet_size > parm->hc_max_packet_size) || @@ -439,6 +445,13 @@ usbd_transfer_setup_sub(struct usb_setup } } + /* + * Check if the max packet size was outside its allowed range + * and clamped to a valid value: + */ + if (maxp_old != xfer->max_packet_size) + xfer->flags_int.maxp_was_clamped = 1; + /* compute "max_frame_size" */ usbd_update_max_frame_size(xfer); @@ -3365,3 +3378,13 @@ usbd_xfer_get_timestamp(struct usb_xfer { return (xfer->isoc_time_complete); } + +/* + * The following function returns non-zero if the max packet size + * field was clamped to a valid value. Else it returns zero. + */ +uint8_t +usbd_xfer_maxp_was_clamped(struct usb_xfer *xfer) +{ + return (xfer->flags_int.maxp_was_clamped); +} Modified: stable/8/sys/dev/usb/usbdi.h ============================================================================== --- stable/8/sys/dev/usb/usbdi.h Sat Mar 22 17:20:10 2014 (r263644) +++ stable/8/sys/dev/usb/usbdi.h Sat Mar 22 17:21:45 2014 (r263645) @@ -549,6 +549,7 @@ int usbd_xfer_is_stalled(struct usb_xfer void usbd_xfer_set_flag(struct usb_xfer *xfer, int flag); void usbd_xfer_clr_flag(struct usb_xfer *xfer, int flag); uint16_t usbd_xfer_get_timestamp(struct usb_xfer *xfer); +uint8_t usbd_xfer_maxp_was_clamped(struct usb_xfer *xfer); void usbd_copy_in(struct usb_page_cache *cache, usb_frlength_t offset, const void *ptr, usb_frlength_t len); From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 21:14:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EEF0DC35; Sat, 22 Mar 2014 21:14:39 +0000 (UTC) Received: from apnoea.adamw.org (apnoea.adamw.org [204.109.59.150]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C2330888; Sat, 22 Mar 2014 21:14:39 +0000 (UTC) Received: by apnoea.adamw.org (Postfix, from userid 1002) id DEC261207A0; Sat, 22 Mar 2014 17:14:29 -0400 (EDT) Date: Sat, 22 Mar 2014 17:14:29 -0400 From: Adam Weinberger To: Andrey Chernov Subject: Re: svn commit: r263478 - in stable/10: share/man/man9 sys/contrib/ipfilter/netinet sys/net sys/netatalk sys/netinet sys/netinet6 sys/netipx sys/netpfil/pf sys/nfs usr.bin/netstat Message-ID: <20140322211429.GA1584@apnoea.adamw.org> References: <201403211515.s2LFFVUb064861@svn.freebsd.org> <532C9C02.5010409@freebsd.org> <532CA0AD.2000608@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <532CA0AD.2000608@freebsd.org> X-Editor: Vim 7.3 http://www.vim.org X-Mailer: Mutt 1.5 http://www.mutt.org X-Adamw: ADAMW!!! X-URL: http://www.adamw.org User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 21:14:40 -0000 >> (2014/03/21 @ 1627 EST): Andrey Chernov said, in 1.1K: << > On 22.03.2014 0:07, Andrey Chernov wrote: > > /usr/src/usr.bin/netstat/route.c:333:7: error: format specifies type > > 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long > > long') [-Werror,-Wformat] > > kread_counter((u_long )rt->rt_pksent)); > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > The whole expression is > len = snprintf(buffer, sizeof(buffer), "%lu", > kread_counter((u_long )rt->rt_pksent)); > > You can't print uint64_t kread_counter() using %lu on i386. >> end of "Re: svn commit: r263478 - in stable/10: share/man/man9 sys/contrib/ipfilter/netinet sys/net sys/netatalk sys/netinet sys/netinet6 sys/netipx sys/netpfil/pf sys/nfs usr.bin/netstat" from Andrey Chernov << Can somebody maybe merge r262819? 10-STABLE is unbuildable on i386 right now. # Adam -- Adam Weinberger adamw@adamw.org http://www.adamw.org From owner-svn-src-stable@FreeBSD.ORG Sat Mar 22 21:36:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4210C487; Sat, 22 Mar 2014 21:36:13 +0000 (UTC) Received: from apnoea.adamw.org (apnoea.adamw.org [204.109.59.150]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EE784A07; Sat, 22 Mar 2014 21:36:12 +0000 (UTC) Received: by apnoea.adamw.org (Postfix, from userid 1002) id 2BBC2121759; Sat, 22 Mar 2014 17:36:12 -0400 (EDT) Date: Sat, 22 Mar 2014 17:36:11 -0400 From: Adam Weinberger To: Adam Weinberger Subject: Re: svn commit: r263478 - in stable/10: share/man/man9 sys/contrib/ipfilter/netinet sys/net sys/netatalk sys/netinet sys/netinet6 sys/netipx sys/netpfil/pf sys/nfs usr.bin/netstat Message-ID: <20140322213611.GA28948@apnoea.adamw.org> References: <201403211515.s2LFFVUb064861@svn.freebsd.org> <532C9C02.5010409@freebsd.org> <532CA0AD.2000608@freebsd.org> <20140322211429.GA1584@apnoea.adamw.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140322211429.GA1584@apnoea.adamw.org> X-Editor: Vim 7.3 http://www.vim.org X-Mailer: Mutt 1.5 http://www.mutt.org X-Adamw: ADAMW!!! X-URL: http://www.adamw.org User-Agent: Mutt/1.5.23 (2014-03-12) Cc: src-committers@freebsd.org, Andrey Chernov , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 21:36:13 -0000 >> (2014/03/22 @ 1714 EST): Adam Weinberger said, in 1.2K: << > >> (2014/03/21 @ 1627 EST): Andrey Chernov said, in 1.1K: << > > On 22.03.2014 0:07, Andrey Chernov wrote: > > > /usr/src/usr.bin/netstat/route.c:333:7: error: format specifies type > > > 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long > > > long') [-Werror,-Wformat] > > > kread_counter((u_long )rt->rt_pksent)); > > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > The whole expression is > > len = snprintf(buffer, sizeof(buffer), "%lu", > > kread_counter((u_long )rt->rt_pksent)); > > > > You can't print uint64_t kread_counter() using %lu on i386. > >> end of "Re: svn commit: r263478 - in stable/10: share/man/man9 sys/contrib/ipfilter/netinet sys/net sys/netatalk sys/netinet sys/netinet6 sys/netipx sys/netpfil/pf sys/nfs usr.bin/netstat" from Andrey Chernov << > > Can somebody maybe merge r262819? 10-STABLE is unbuildable on i386 right > now. > >> end of "Re: svn commit: r263478 - in stable/10: share/man/man9 sys/contrib/ipfilter/netinet sys/net sys/netatalk sys/netinet sys/netinet6 sys/netipx sys/netpfil/pf sys/nfs usr.bin/netstat" from Adam Weinberger << Well, with that commit applied, it still dies later on. glebius, what's the deal man, this one looks like it's from March 12. ===> usr.sbin/route6d (all) clang -O2 -pipe -mtune=native -march=native -O2 -pipe -Qunused-arguments -DHAVE_POLL_H -std=gnu99 -Qunused-arguments -fstack-protector -Wsystem-headers -Werror -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses -c /usr/src/usr.sbin/route6d/route6d.c In file included from /usr/src/usr.sbin/route6d/route6d.c:68: In file included from /usr/obj/usr/src/tmp/usr/include/net/route.h:36: In file included from /usr/obj/usr/src/tmp/usr/include/sys/counter.h:35: /usr/obj/usr/src/tmp/usr/include/machine/counter.h:170:3: error: implicit declaration of function 'critical_enter' is invalid in C99 [-Werror,-Wimplicit-function-declaration] critical_enter(); ^ /usr/obj/usr/src/tmp/usr/include/machine/counter.h:172:3: error: implicit declaration of function 'critical_exit' is invalid in C99 [-Werror,-Wimplicit-function-declaration] critical_exit(); ^ /usr/obj/usr/src/tmp/usr/include/machine/counter.h:172:3: note: did you mean 'critical_enter'? /usr/obj/usr/src/tmp/usr/include/machine/counter.h:170:3: note: 'critical_enter' declared here critical_enter(); ^ 2 errors generated. *** Error code 1 Stop. make[4]: stopped in /usr/src/usr.sbin/route6d *** Error code 1 Stop. make[3]: stopped in /usr/src/usr.sbin *** Error code 1 Stop. make[2]: stopped in /usr/src *** Error code 1 Stop. make[1]: stopped in /usr/src *** Error code 1 Stop. make: stopped in /usr/src -- Adam Weinberger adamw@adamw.org http://www.adamw.org From owner-svn-src-stable@FreeBSD.ORG Sun Mar 23 02:29:29 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 86B10815; Sun, 23 Mar 2014 02:29:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5879F194; Sun, 23 Mar 2014 02:29:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2N2TTli037925; Sun, 23 Mar 2014 02:29:29 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2N2TTAK037924; Sun, 23 Mar 2014 02:29:29 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403230229.s2N2TTAK037924@svn.freebsd.org> From: Glen Barber Date: Sun, 23 Mar 2014 02:29:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263655 - stable/10/contrib/subversion/subversion/svn X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Mar 2014 02:29:29 -0000 Author: gjb Date: Sun Mar 23 02:29:28 2014 New Revision: 263655 URL: http://svnweb.freebsd.org/changeset/base/263655 Log: MFC r263434: Update commit template to include 'Relnotes:' tag, to help re@ track release notes candidates. Sponsored by: The FreeBSD Foundation Modified: stable/10/contrib/subversion/subversion/svn/util.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/subversion/subversion/svn/util.c ============================================================================== --- stable/10/contrib/subversion/subversion/svn/util.c Sun Mar 23 01:17:02 2014 (r263654) +++ stable/10/contrib/subversion/subversion/svn/util.c Sun Mar 23 02:29:28 2014 (r263655) @@ -338,6 +338,7 @@ static const char *prefixes[] = { "Approved by:", "Obtained from:", "MFC after:", + "Relnotes:", "Security:", "Sponsored by:" }; @@ -408,6 +409,7 @@ svn_cl__get_log_message(const char **log svn_stringbuf_appendcstr(default_msg, "Approved by:\t" APR_EOL_STR); svn_stringbuf_appendcstr(default_msg, "Obtained from:\t" APR_EOL_STR); svn_stringbuf_appendcstr(default_msg, "MFC after:\t" APR_EOL_STR); + svn_stringbuf_appendcstr(default_msg, "Relnotes:\t" APR_EOL_STR); svn_stringbuf_appendcstr(default_msg, "Security:\t" APR_EOL_STR); svn_stringbuf_appendcstr(default_msg, "Sponsored by:\t" #ifdef HAS_ORGANIZATION_NAME @@ -423,6 +425,7 @@ svn_cl__get_log_message(const char **log svn_stringbuf_appendcstr(default_msg, "> Approved by: If you needed approval for this commit." APR_EOL_STR); svn_stringbuf_appendcstr(default_msg, "> Obtained from: If the change is from a third party." APR_EOL_STR); svn_stringbuf_appendcstr(default_msg, "> MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email." APR_EOL_STR); + svn_stringbuf_appendcstr(default_msg, "> Relnotes: Set to 'yes' for mention in release notes." APR_EOL_STR); svn_stringbuf_appendcstr(default_msg, "> Security: Vulnerability reference (one per line) or description." APR_EOL_STR); svn_stringbuf_appendcstr(default_msg, "> Sponsored by: If the change was sponsored by an organization." APR_EOL_STR); svn_stringbuf_appendcstr(default_msg, "> Empty fields above will be automatically removed." APR_EOL_STR); From owner-svn-src-stable@FreeBSD.ORG Sun Mar 23 02:44:29 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2097CBDD; Sun, 23 Mar 2014 02:44:29 +0000 (UTC) Received: from mail0.glenbarber.us (mail0.glenbarber.us [208.86.227.67]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E10392BC; Sun, 23 Mar 2014 02:44:28 +0000 (UTC) Received: from glenbarber.us (70.15.88.86.res-cmts.sewb.ptd.net [70.15.88.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gjb) by mail0.glenbarber.us (Postfix) with ESMTPSA id 1D37614F6B; Sun, 23 Mar 2014 02:44:27 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.8.3 mail0.glenbarber.us 1D37614F6B Authentication-Results: mail0.glenbarber.us; dkim=none reason="no signature"; dkim-adsp=none Date: Sat, 22 Mar 2014 22:44:25 -0400 From: Glen Barber To: Gleb Smirnoff Subject: Re: svn commit: r263335 - stable/10/usr.bin/netstat Message-ID: <20140323024425.GQ3452@glenbarber.us> References: <201403190936.s2J9aT6h055653@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="JaBjgNvtdKe5H086" Content-Disposition: inline In-Reply-To: <201403190936.s2J9aT6h055653@svn.freebsd.org> X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Mar 2014 02:44:29 -0000 --JaBjgNvtdKe5H086 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 19, 2014 at 09:36:29AM +0000, Gleb Smirnoff wrote: > Author: glebius > Date: Wed Mar 19 09:36:29 2014 > New Revision: 263335 > URL: http://svnweb.freebsd.org/changeset/base/263335 >=20 > Log: > Merge r259562,r259566,r259638,r259645,r260124 by melifaro: > =20 > Switch netstat -rn to use standard API for retrieving list > of routes instead of peeking inside in-kernel radix via kget. >=20 > Modified: > stable/10/usr.bin/netstat/if.c > stable/10/usr.bin/netstat/main.c > stable/10/usr.bin/netstat/mroute.c > stable/10/usr.bin/netstat/mroute6.c > stable/10/usr.bin/netstat/netgraph.c > stable/10/usr.bin/netstat/netstat.h > stable/10/usr.bin/netstat/route.c > Directory Properties: > stable/10/ (props changed) >=20 I think this breaks the build for all architectures except amd64. http://tinderbox.des.no/tinderbox-freebsd10-build-RELENG_10-i386-i386.full Glen --JaBjgNvtdKe5H086 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBCAAGBQJTLkqJAAoJELls3eqvi17QZqIQALJGme5HBR6+RywMcxseAgOC +6FzA5zd6hwkrgDzBdc9OhBPr5hILdXWyNoAfDwF+pY0RWTlGzHpdbeD3j/YAK3h oUJIyaMWz3HULKSEV2sNqut3OsVZGMS/k8sAt4qbtFHkItOLUR2Vwv9/CEw+XhwQ K0wiZdptFapog3xNVviAxl9EpewvqEnGTO1bJAQ+CwFy64ygxUyntJ6qauKFKoo5 1Yu5WaBRclNJF11Dv0X2KvgNrfIKpiWgY6HzbmqYfbuwqI9V9kJIv3lhzrbhW/3i z/IhzRZC47clmILcv56ZUBiiy0MsDkxTSqMY772pf+2S0bfnl2YgXrVIm4fQmiJ9 jxKqc/Y/ASCBiIzHiW2JG70MM6ScN8cGGDWQKmytPnDteGGnrrR8sa4jx13zU3TB wCVr/BfE6F0DNKEkVp6vfI/5zMV7PV94x65CSDSkCxrsPqCY++x9+j6hrpAB+aEJ ZW/JFB0dnObQjLgllC8Q28gnX4ee3HioOdFlTI3eOBXU6uWXB14jZIEbyJFtOvfp zfoaURb3jPtTBGfJi7iw8+RW8N8KwX69oxx60QWwIkGTqz4fSzcSbs9vIF0gu6Ea h1TbO7/maSf3MOdoLQjymd86y00DcVzqaj5Lzk+ME3gmnCEG0nq+Fo0Sfd7EGJsL PY4VbNay4N2CFyfThNO6 =lAAb -----END PGP SIGNATURE----- --JaBjgNvtdKe5H086-- From owner-svn-src-stable@FreeBSD.ORG Sun Mar 23 06:05:59 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 80305E1F; Sun, 23 Mar 2014 06:05:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6CC8E2D8; Sun, 23 Mar 2014 06:05:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2N65xUd026817; Sun, 23 Mar 2014 06:05:59 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2N65xSn026816; Sun, 23 Mar 2014 06:05:59 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201403230605.s2N65xSn026816@svn.freebsd.org> From: Gleb Smirnoff Date: Sun, 23 Mar 2014 06:05:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263657 - stable/10/usr.bin/netstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Mar 2014 06:05:59 -0000 Author: glebius Date: Sun Mar 23 06:05:58 2014 New Revision: 263657 URL: http://svnweb.freebsd.org/changeset/base/263657 Log: Merge missed r262819, that fixes broken build. Modified: stable/10/usr.bin/netstat/route.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/netstat/route.c ============================================================================== --- stable/10/usr.bin/netstat/route.c Sun Mar 23 04:21:56 2014 (r263656) +++ stable/10/usr.bin/netstat/route.c Sun Mar 23 06:05:58 2014 (r263657) @@ -329,8 +329,8 @@ size_cols_rtentry(struct rtentry *rt) wid_flags = MAX(len, wid_flags); if (Wflag) { - len = snprintf(buffer, sizeof(buffer), "%lu", - kread_counter((u_long )rt->rt_pksent)); + len = snprintf(buffer, sizeof(buffer), "%ju", + (uintmax_t )kread_counter((u_long )rt->rt_pksent)); wid_pksent = MAX(len, wid_pksent); } if (rt->rt_ifp) { @@ -867,8 +867,8 @@ p_rtentry_kvm(struct rtentry *rt) snprintf(buffer, sizeof(buffer), "%%-%d.%ds ", wid_flags, wid_flags); p_flags(rt->rt_flags, buffer); if (Wflag) { - printf("%*lu ", wid_pksent, - kread_counter((u_long )rt->rt_pksent)); + printf("%*ju ", wid_pksent, + (uintmax_t )kread_counter((u_long )rt->rt_pksent)); if (rt->rt_mtu != 0) printf("%*lu ", wid_mtu, rt->rt_mtu); From owner-svn-src-stable@FreeBSD.ORG Sun Mar 23 06:11:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E34AF85; Sun, 23 Mar 2014 06:11:38 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6312C309; Sun, 23 Mar 2014 06:11:37 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.8/8.14.8) with ESMTP id s2N6BXvU034992 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 23 Mar 2014 10:11:33 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.8/8.14.8/Submit) id s2N6BWCv034991; Sun, 23 Mar 2014 10:11:32 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sun, 23 Mar 2014 10:11:32 +0400 From: Gleb Smirnoff To: Adam Weinberger Subject: Re: svn commit: r263478 - in stable/10: share/man/man9 sys/contrib/ipfilter/netinet sys/net sys/netatalk sys/netinet sys/netinet6 sys/netipx sys/netpfil/pf sys/nfs usr.bin/netstat Message-ID: <20140323061132.GY1499@FreeBSD.org> References: <201403211515.s2LFFVUb064861@svn.freebsd.org> <532C9C02.5010409@freebsd.org> <532CA0AD.2000608@freebsd.org> <20140322211429.GA1584@apnoea.adamw.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140322211429.GA1584@apnoea.adamw.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Andrey Chernov , svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Mar 2014 06:11:38 -0000 On Sat, Mar 22, 2014 at 05:14:29PM -0400, Adam Weinberger wrote: A> >> (2014/03/21 @ 1627 EST): Andrey Chernov said, in 1.1K: << A> > On 22.03.2014 0:07, Andrey Chernov wrote: A> > > /usr/src/usr.bin/netstat/route.c:333:7: error: format specifies type A> > > 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long A> > > long') [-Werror,-Wformat] A> > > kread_counter((u_long )rt->rt_pksent)); A> > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ A> > A> > The whole expression is A> > len = snprintf(buffer, sizeof(buffer), "%lu", A> > kread_counter((u_long )rt->rt_pksent)); A> > A> > You can't print uint64_t kread_counter() using %lu on i386. A> >> end of "Re: svn commit: r263478 - in stable/10: share/man/man9 sys/contrib/ipfilter/netinet sys/net sys/netatalk sys/netinet sys/netinet6 sys/netipx sys/netpfil/pf sys/nfs usr.bin/netstat" from Andrey Chernov << A> A> Can somebody maybe merge r262819? 10-STABLE is unbuildable on i386 right A> now. I missed that one in the merge queue, sorry. It is merged now. I am investigating the counter.h breakage. -- Totus tuus, Glebius. From owner-svn-src-stable@FreeBSD.ORG Sun Mar 23 12:58:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC601A31; Sun, 23 Mar 2014 12:58:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D89DD789; Sun, 23 Mar 2014 12:58:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2NCwmSc095408; Sun, 23 Mar 2014 12:58:48 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2NCwmdA095407; Sun, 23 Mar 2014 12:58:48 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201403231258.s2NCwmdA095407@svn.freebsd.org> From: Christian Brueffer Date: Sun, 23 Mar 2014 12:58:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263661 - stable/10/etc/periodic/security X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Mar 2014 12:58:49 -0000 Author: brueffer Date: Sun Mar 23 12:58:48 2014 New Revision: 263661 URL: http://svnweb.freebsd.org/changeset/base/263661 Log: Further refine the auth fail regex to catch more auth failures and reduce false positives. The committed patch was provided by Christian Marg. PR: 91732 Submitted by: Daniel O'Connor Skye Poier Alan Amesbury Christian Marg Modified: stable/10/etc/periodic/security/800.loginfail Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/periodic/security/800.loginfail ============================================================================== --- stable/10/etc/periodic/security/800.loginfail Sun Mar 23 12:49:25 2014 (r263660) +++ stable/10/etc/periodic/security/800.loginfail Sun Mar 23 12:58:48 2014 (r263661) @@ -64,7 +64,7 @@ if check_yesno_period security_status_lo then echo "" echo "${host} login failures:" - n=$(catmsgs | egrep -ia "^$yesterday.*: .*(fail|invalid|bad|illegal)" | + n=$(catmsgs | egrep -ia "^$yesterday.*: .*\b(fail(ures?|ed)?|invalid|bad|illegal|auth.*error)\b" | tee /dev/stderr | wc -l) [ $n -gt 0 ] && rc=1 || rc=0 fi From owner-svn-src-stable@FreeBSD.ORG Sun Mar 23 13:03:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3D9ABF2; Sun, 23 Mar 2014 13:03:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C9B8580A; Sun, 23 Mar 2014 13:03:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2ND3kOB098998; Sun, 23 Mar 2014 13:03:46 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2ND3kAk098997; Sun, 23 Mar 2014 13:03:46 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201403231303.s2ND3kAk098997@svn.freebsd.org> From: Christian Brueffer Date: Sun, 23 Mar 2014 13:03:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263662 - stable/9/etc/periodic/security X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Mar 2014 13:03:47 -0000 Author: brueffer Date: Sun Mar 23 13:03:46 2014 New Revision: 263662 URL: http://svnweb.freebsd.org/changeset/base/263662 Log: MFC: r262273 Further refine the auth fail regex to catch more auth failures and reduce false positives. The committed patch was provided by Christian Marg. PR: 91732 Submitted by: Daniel O'Connor Skye Poier Alan Amesbury Christian Marg Modified: stable/9/etc/periodic/security/800.loginfail Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/periodic/security/800.loginfail ============================================================================== --- stable/9/etc/periodic/security/800.loginfail Sun Mar 23 12:58:48 2014 (r263661) +++ stable/9/etc/periodic/security/800.loginfail Sun Mar 23 13:03:46 2014 (r263662) @@ -59,7 +59,7 @@ case "$daily_status_security_loginfail_e [Yy][Ee][Ss]) echo "" echo "${host} login failures:" - n=$(catmsgs | egrep -ia "^$yesterday.*: .*(fail|invalid|bad|illegal)" | + n=$(catmsgs | egrep -ia "^$yesterday.*: .*\b(fail(ures?|ed)?|invalid|bad|illegal|auth.*error)\b" | tee /dev/stderr | wc -l) [ $n -gt 0 ] && rc=1 || rc=0;; *) rc=0;; From owner-svn-src-stable@FreeBSD.ORG Sun Mar 23 13:06:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A58C4D45; Sun, 23 Mar 2014 13:06:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 91A9E81E; Sun, 23 Mar 2014 13:06:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2ND6RB8099374; Sun, 23 Mar 2014 13:06:27 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2ND6RXt099373; Sun, 23 Mar 2014 13:06:27 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201403231306.s2ND6RXt099373@svn.freebsd.org> From: Christian Brueffer Date: Sun, 23 Mar 2014 13:06:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r263663 - stable/8/etc/periodic/security X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Mar 2014 13:06:27 -0000 Author: brueffer Date: Sun Mar 23 13:06:27 2014 New Revision: 263663 URL: http://svnweb.freebsd.org/changeset/base/263663 Log: MFC: r262273 Further refine the auth fail regex to catch more auth failures and reduce false positives. The committed patch was provided by Christian Marg. PR: 91732 Submitted by: Daniel O'Connor Skye Poier Alan Amesbury Christian Marg Modified: stable/8/etc/periodic/security/800.loginfail Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/periodic/security/800.loginfail ============================================================================== --- stable/8/etc/periodic/security/800.loginfail Sun Mar 23 13:03:46 2014 (r263662) +++ stable/8/etc/periodic/security/800.loginfail Sun Mar 23 13:06:27 2014 (r263663) @@ -59,7 +59,7 @@ case "$daily_status_security_loginfail_e [Yy][Ee][Ss]) echo "" echo "${host} login failures:" - n=$(catmsgs | egrep -ia "^$yesterday.*: .*(fail|invalid|bad|illegal)" | + n=$(catmsgs | egrep -ia "^$yesterday.*: .*\b(fail(ures?|ed)?|invalid|bad|illegal|auth.*error)\b" | tee /dev/stderr | wc -l) [ $n -gt 0 ] && rc=1 || rc=0;; *) rc=0;; From owner-svn-src-stable@FreeBSD.ORG Sun Mar 23 14:18:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 221BB736; Sun, 23 Mar 2014 14:18:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0E4C0DB6; Sun, 23 Mar 2014 14:18:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2NEIedu027936; Sun, 23 Mar 2014 14:18:40 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2NEIeTt027935; Sun, 23 Mar 2014 14:18:40 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201403231418.s2NEIeTt027935@svn.freebsd.org> From: Dimitry Andric Date: Sun, 23 Mar 2014 14:18:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r263665 - in stable: 10 7 8 9 X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Mar 2014 14:18:41 -0000 Author: dim Date: Sun Mar 23 14:18:40 2014 New Revision: 263665 URL: http://svnweb.freebsd.org/changeset/base/263665 Log: Turn off warnings for building aicasm. Various versions of yacc exist, which can result in different warnings-as-errors in this tool, but these are all completely harmless. This is a direct commit to stable/7, stable/8, stable/9 and stable/10, since this kernel build tool has already been removed in head. Modified: stable/8/Makefile.inc1 Changes in other areas also in this revision: Modified: stable/10/Makefile.inc1 stable/7/Makefile.inc1 stable/9/Makefile.inc1 Modified: stable/8/Makefile.inc1 ============================================================================== --- stable/8/Makefile.inc1 Sun Mar 23 14:06:09 2014 (r263664) +++ stable/8/Makefile.inc1 Sun Mar 23 14:18:40 2014 (r263665) @@ -779,7 +779,7 @@ buildkernel: cd ${KRNLOBJDIR}/${_kernel}; \ PATH=${BPATH}:${PATH} \ MAKESRCPATH=${KERNSRCDIR}/dev/aic7xxx/aicasm \ - ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF \ + ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF \ -f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile # XXX - Gratuitously builds aicasm in the ``makeoptions NO_MODULES'' case. .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KERNSRCDIR}/modules) @@ -787,7 +787,7 @@ buildkernel: cd ${KERNSRCDIR}/modules/aic7xxx/aicasm; \ PATH=${BPATH}:${PATH} \ MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \ - ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF ${target} + ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF ${target} .endfor .endif .if !defined(NO_KERNELDEPEND) From owner-svn-src-stable@FreeBSD.ORG Sun Mar 23 14:18:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76BD1737; Sun, 23 Mar 2014 14:18:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 63897DB7; Sun, 23 Mar 2014 14:18:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2NEIfgx027942; Sun, 23 Mar 2014 14:18:41 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2NEIfVx027941; Sun, 23 Mar 2014 14:18:41 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201403231418.s2NEIfVx027941@svn.freebsd.org> From: Dimitry Andric Date: Sun, 23 Mar 2014 14:18:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263665 - in stable: 10 7 8 9 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Mar 2014 14:18:41 -0000 Author: dim Date: Sun Mar 23 14:18:40 2014 New Revision: 263665 URL: http://svnweb.freebsd.org/changeset/base/263665 Log: Turn off warnings for building aicasm. Various versions of yacc exist, which can result in different warnings-as-errors in this tool, but these are all completely harmless. This is a direct commit to stable/7, stable/8, stable/9 and stable/10, since this kernel build tool has already been removed in head. Modified: stable/10/Makefile.inc1 Changes in other areas also in this revision: Modified: stable/7/Makefile.inc1 stable/8/Makefile.inc1 stable/9/Makefile.inc1 Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Sun Mar 23 14:06:09 2014 (r263664) +++ stable/10/Makefile.inc1 Sun Mar 23 14:18:40 2014 (r263665) @@ -1023,15 +1023,16 @@ buildkernel: cd ${KRNLOBJDIR}/${_kernel}; \ PATH=${BPATH}:${PATH} \ MAKESRCPATH=${KERNSRCDIR}/dev/aic7xxx/aicasm \ - ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF -DEARLY_BUILD \ - -f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile + ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF \ + -DEARLY_BUILD -f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile # XXX - Gratuitously builds aicasm in the ``makeoptions NO_MODULES'' case. .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KERNSRCDIR}/modules) .for target in obj depend all cd ${KERNSRCDIR}/modules/aic7xxx/aicasm; \ PATH=${BPATH}:${PATH} \ MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \ - ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF -DEARLY_BUILD ${target} + ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF \ + -DEARLY_BUILD ${target} .endfor .endif .if !defined(NO_KERNELDEPEND) From owner-svn-src-stable@FreeBSD.ORG Sun Mar 23 14:18:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C052C735; Sun, 23 Mar 2014 14:18:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AC7D4DB5; Sun, 23 Mar 2014 14:18:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2NEIeon027929; Sun, 23 Mar 2014 14:18:40 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2NEIeQw027928; Sun, 23 Mar 2014 14:18:40 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201403231418.s2NEIeQw027928@svn.freebsd.org> From: Dimitry Andric Date: Sun, 23 Mar 2014 14:18:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263665 - in stable: 10 7 8 9 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Mar 2014 14:18:40 -0000 Author: dim Date: Sun Mar 23 14:18:40 2014 New Revision: 263665 URL: http://svnweb.freebsd.org/changeset/base/263665 Log: Turn off warnings for building aicasm. Various versions of yacc exist, which can result in different warnings-as-errors in this tool, but these are all completely harmless. This is a direct commit to stable/7, stable/8, stable/9 and stable/10, since this kernel build tool has already been removed in head. Modified: stable/9/Makefile.inc1 Changes in other areas also in this revision: Modified: stable/10/Makefile.inc1 stable/7/Makefile.inc1 stable/8/Makefile.inc1 Modified: stable/9/Makefile.inc1 ============================================================================== --- stable/9/Makefile.inc1 Sun Mar 23 14:06:09 2014 (r263664) +++ stable/9/Makefile.inc1 Sun Mar 23 14:18:40 2014 (r263665) @@ -945,15 +945,16 @@ buildkernel: cd ${KRNLOBJDIR}/${_kernel}; \ PATH=${BPATH}:${PATH} \ MAKESRCPATH=${KERNSRCDIR}/dev/aic7xxx/aicasm \ - ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF -DEARLY_BUILD \ - -f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile + ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF \ + -DEARLY_BUILD -f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile # XXX - Gratuitously builds aicasm in the ``makeoptions NO_MODULES'' case. .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KERNSRCDIR}/modules) .for target in obj depend all cd ${KERNSRCDIR}/modules/aic7xxx/aicasm; \ PATH=${BPATH}:${PATH} \ MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \ - ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF -DEARLY_BUILD ${target} + ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF \ + -DEARLY_BUILD ${target} .endfor .endif .if !defined(NO_KERNELDEPEND) From owner-svn-src-stable@FreeBSD.ORG Sun Mar 23 14:18:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D1FBA738; Sun, 23 Mar 2014 14:18:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BE82BDB8; Sun, 23 Mar 2014 14:18:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2NEIfcn027950; Sun, 23 Mar 2014 14:18:41 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2NEIfiq027949; Sun, 23 Mar 2014 14:18:41 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201403231418.s2NEIfiq027949@svn.freebsd.org> From: Dimitry Andric Date: Sun, 23 Mar 2014 14:18:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r263665 - in stable: 10 7 8 9 X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Mar 2014 14:18:41 -0000 Author: dim Date: Sun Mar 23 14:18:40 2014 New Revision: 263665 URL: http://svnweb.freebsd.org/changeset/base/263665 Log: Turn off warnings for building aicasm. Various versions of yacc exist, which can result in different warnings-as-errors in this tool, but these are all completely harmless. This is a direct commit to stable/7, stable/8, stable/9 and stable/10, since this kernel build tool has already been removed in head. Modified: stable/7/Makefile.inc1 Changes in other areas also in this revision: Modified: stable/10/Makefile.inc1 stable/8/Makefile.inc1 stable/9/Makefile.inc1 Modified: stable/7/Makefile.inc1 ============================================================================== --- stable/7/Makefile.inc1 Sun Mar 23 14:06:09 2014 (r263664) +++ stable/7/Makefile.inc1 Sun Mar 23 14:18:40 2014 (r263665) @@ -737,7 +737,7 @@ buildkernel: cd ${KRNLOBJDIR}/${_kernel}; \ PATH=${BPATH}:${PATH} \ MAKESRCPATH=${KERNSRCDIR}/dev/aic7xxx/aicasm \ - ${MAKE} -DNO_CPU_CFLAGS -DNO_CTF \ + ${MAKE} -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF \ -f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile # XXX - Gratuitously builds aicasm in the ``makeoptions NO_MODULES'' case. .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KERNSRCDIR}/modules) @@ -745,7 +745,7 @@ buildkernel: cd ${KERNSRCDIR}/modules/aic7xxx/aicasm; \ PATH=${BPATH}:${PATH} \ MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \ - ${MAKE} -DNO_CPU_CFLAGS -DNO_CTF ${target} + ${MAKE} -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF ${target} .endfor .endif .if !defined(NO_KERNELDEPEND) From owner-svn-src-stable@FreeBSD.ORG Sun Mar 23 19:07:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 61A6D97C; Sun, 23 Mar 2014 19:07:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4D4AFA7B; Sun, 23 Mar 2014 19:07:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2NJ7Fu0048167; Sun, 23 Mar 2014 19:07:15 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2NJ7FEP048166; Sun, 23 Mar 2014 19:07:15 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201403231907.s2NJ7FEP048166@svn.freebsd.org> From: Gleb Smirnoff Date: Sun, 23 Mar 2014 19:07:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263668 - stable/10/usr.sbin/route6d X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Mar 2014 19:07:15 -0000 Author: glebius Date: Sun Mar 23 19:07:14 2014 New Revision: 263668 URL: http://svnweb.freebsd.org/changeset/base/263668 Log: Merge r263658 from head: remove unneeded fake _KERNEL definition. Should fix broken builds. Modified: stable/10/usr.sbin/route6d/route6d.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/route6d/route6d.c ============================================================================== --- stable/10/usr.sbin/route6d/route6d.c Sun Mar 23 16:49:03 2014 (r263667) +++ stable/10/usr.sbin/route6d/route6d.c Sun Mar 23 19:07:14 2014 (r263668) @@ -64,9 +64,7 @@ static const char _rcsid[] = "$KAME: rou #include #include #include -#define _KERNEL 1 #include -#undef _KERNEL #include #include #include From owner-svn-src-stable@FreeBSD.ORG Sun Mar 23 19:48:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23B6F8BF; Sun, 23 Mar 2014 19:48:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 10364E26; Sun, 23 Mar 2014 19:48:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2NJmUIA064695; Sun, 23 Mar 2014 19:48:30 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2NJmU76064694; Sun, 23 Mar 2014 19:48:30 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201403231948.s2NJmU76064694@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 23 Mar 2014 19:48:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263670 - stable/10/sys/fs/msdosfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Mar 2014 19:48:31 -0000 Author: pfg Date: Sun Mar 23 19:48:30 2014 New Revision: 263670 URL: http://svnweb.freebsd.org/changeset/base/263670 Log: MFC: r263441: msdosfs: minor format fix - spaces vs tab Modified: stable/10/sys/fs/msdosfs/msdosfs_fileno.c Modified: stable/10/sys/fs/msdosfs/msdosfs_fileno.c ============================================================================== --- stable/10/sys/fs/msdosfs/msdosfs_fileno.c Sun Mar 23 19:22:13 2014 (r263669) +++ stable/10/sys/fs/msdosfs/msdosfs_fileno.c Sun Mar 23 19:48:30 2014 (r263670) @@ -75,7 +75,7 @@ msdosfs_fileno_init(mp) RB_INIT(&pmp->pm_filenos); pmp->pm_nfileno = FILENO_FIRST_DYN; - if (pmp->pm_HugeSectors > 0xffffffff / + if (pmp->pm_HugeSectors > 0xffffffff / (pmp->pm_BytesPerSec / sizeof(struct direntry)) + 1) pmp->pm_flags |= MSDOSFS_LARGEFS; } From owner-svn-src-stable@FreeBSD.ORG Sun Mar 23 19:50:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E8756A0C; Sun, 23 Mar 2014 19:50:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D4C68EA2; Sun, 23 Mar 2014 19:50:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2NJoa9q065005; Sun, 23 Mar 2014 19:50:36 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2NJoa7U065004; Sun, 23 Mar 2014 19:50:36 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201403231950.s2NJoa7U065004@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 23 Mar 2014 19:50:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263671 - stable/9/sys/fs/msdosfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Mar 2014 19:50:37 -0000 Author: pfg Date: Sun Mar 23 19:50:36 2014 New Revision: 263671 URL: http://svnweb.freebsd.org/changeset/base/263671 Log: MFC: r263441: msdosfs: minor format fix - spaces vs tab Modified: stable/9/sys/fs/msdosfs/msdosfs_fileno.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/msdosfs/msdosfs_fileno.c ============================================================================== --- stable/9/sys/fs/msdosfs/msdosfs_fileno.c Sun Mar 23 19:48:30 2014 (r263670) +++ stable/9/sys/fs/msdosfs/msdosfs_fileno.c Sun Mar 23 19:50:36 2014 (r263671) @@ -75,7 +75,7 @@ msdosfs_fileno_init(mp) RB_INIT(&pmp->pm_filenos); pmp->pm_nfileno = FILENO_FIRST_DYN; - if (pmp->pm_HugeSectors > 0xffffffff / + if (pmp->pm_HugeSectors > 0xffffffff / (pmp->pm_BytesPerSec / sizeof(struct direntry)) + 1) pmp->pm_flags |= MSDOSFS_LARGEFS; } From owner-svn-src-stable@FreeBSD.ORG Mon Mar 24 00:50:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 295B936B; Mon, 24 Mar 2014 00:50:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 16A47A6A; Mon, 24 Mar 2014 00:50:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2O0oCgj091545; Mon, 24 Mar 2014 00:50:12 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2O0oCmh091544; Mon, 24 Mar 2014 00:50:12 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403240050.s2O0oCmh091544@svn.freebsd.org> From: Glen Barber Date: Mon, 24 Mar 2014 00:50:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263677 - stable/9/sys/boot/forth X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Mar 2014 00:50:13 -0000 Author: gjb Date: Mon Mar 24 00:50:12 2014 New Revision: 263677 URL: http://svnweb.freebsd.org/changeset/base/263677 Log: Turn off the tribute branding, now that we will soon be entering the 9.3-RELEASE cycle. This is a direct commit to stable/9. Sponsored by: The FreeBSD Foundation Modified: stable/9/sys/boot/forth/version.4th Modified: stable/9/sys/boot/forth/version.4th ============================================================================== --- stable/9/sys/boot/forth/version.4th Sun Mar 23 21:08:18 2014 (r263676) +++ stable/9/sys/boot/forth/version.4th Mon Mar 24 00:50:12 2014 (r263677) @@ -30,7 +30,7 @@ variable versionX variable versionY \ Default $loader_version value if not overridden or using tribute screen -: str_loader_version ( -- C-ADDR/U|-1 ) s" FreeBSD `Nakatomi Socrates' 9.2" ; +: str_loader_version ( -- C-ADDR/U|-1 ) s" " ; \ Initialize text placement to defaults 80 versionX ! \ NOTE: this is the ending column (text is right-justified) From owner-svn-src-stable@FreeBSD.ORG Mon Mar 24 10:19:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B1364384; Mon, 24 Mar 2014 10:19:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9D509CA3; Mon, 24 Mar 2014 10:19:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2OAJ7Rp021228; Mon, 24 Mar 2014 10:19:07 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2OAJ79G021227; Mon, 24 Mar 2014 10:19:07 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201403241019.s2OAJ79G021227@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 24 Mar 2014 10:19:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263680 - stable/10/sys/netpfil/ipfw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Mar 2014 10:19:07 -0000 Author: glebius Date: Mon Mar 24 10:19:07 2014 New Revision: 263680 URL: http://svnweb.freebsd.org/changeset/base/263680 Log: Merge r263497: fix ipfw + VIMAGE sysctls. PR: kern/187665 Modified: stable/10/sys/netpfil/ipfw/ip_fw_pfil.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netpfil/ipfw/ip_fw_pfil.c ============================================================================== --- stable/10/sys/netpfil/ipfw/ip_fw_pfil.c Mon Mar 24 08:24:32 2014 (r263679) +++ stable/10/sys/netpfil/ipfw/ip_fw_pfil.c Mon Mar 24 10:19:07 2014 (r263680) @@ -536,30 +536,22 @@ ipfw_attach_hooks(int arg) int ipfw_chg_hook(SYSCTL_HANDLER_ARGS) { - int *enable; int newval; int error; int af; - if (arg1 == &VNET_NAME(fw_enable)) { - enable = &V_fw_enable; + if (arg1 == &V_fw_enable) af = AF_INET; - } #ifdef INET6 - else if (arg1 == &VNET_NAME(fw6_enable)) { - enable = &V_fw6_enable; + else if (arg1 == &V_fw6_enable) af = AF_INET6; - } #endif - else if (arg1 == &VNET_NAME(fwlink_enable)) { - enable = &V_fwlink_enable; + else if (arg1 == &V_fwlink_enable) af = AF_LINK; - } else return (EINVAL); - newval = *enable; - + newval = *(int *)arg1; /* Handle sysctl change */ error = sysctl_handle_int(oidp, &newval, 0, req); @@ -569,13 +561,13 @@ ipfw_chg_hook(SYSCTL_HANDLER_ARGS) /* Formalize new value */ newval = (newval) ? 1 : 0; - if (*enable == newval) + if (*(int *)arg1 == newval) return (0); error = ipfw_hook(newval, af); if (error) return (error); - *enable = newval; + *(int *)arg1 = newval; return (0); } From owner-svn-src-stable@FreeBSD.ORG Mon Mar 24 12:40:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF75CDE4; Mon, 24 Mar 2014 12:40:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9AE30E2E; Mon, 24 Mar 2014 12:40:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2OCergD082418; Mon, 24 Mar 2014 12:40:53 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2OCer5g082417; Mon, 24 Mar 2014 12:40:53 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201403241240.s2OCer5g082417@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 24 Mar 2014 12:40:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263684 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Mar 2014 12:40:53 -0000 Author: kib Date: Mon Mar 24 12:40:53 2014 New Revision: 263684 URL: http://svnweb.freebsd.org/changeset/base/263684 Log: MFC r263471: Initialize vm_map_entry member wiring_thread on the map entry creation. Modified: stable/10/sys/vm/vm_map.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_map.c ============================================================================== --- stable/10/sys/vm/vm_map.c Mon Mar 24 11:54:00 2014 (r263683) +++ stable/10/sys/vm/vm_map.c Mon Mar 24 12:40:53 2014 (r263684) @@ -1275,6 +1275,7 @@ charged: new_entry->protection = prot; new_entry->max_protection = max; new_entry->wired_count = 0; + new_entry->wiring_thread = NULL; new_entry->read_ahead = VM_FAULT_READ_AHEAD_INIT; new_entry->next_read = OFF_TO_IDX(offset); From owner-svn-src-stable@FreeBSD.ORG Mon Mar 24 12:41:01 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B4F3F10; Mon, 24 Mar 2014 12:41:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 480CEE32; Mon, 24 Mar 2014 12:41:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2OCf1Lo082555; Mon, 24 Mar 2014 12:41:01 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2OCf1rP082553; Mon, 24 Mar 2014 12:41:01 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201403241241.s2OCf1rP082553@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 24 Mar 2014 12:41:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263685 - stable/9/sys/vm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Mar 2014 12:41:01 -0000 Author: kib Date: Mon Mar 24 12:41:00 2014 New Revision: 263685 URL: http://svnweb.freebsd.org/changeset/base/263685 Log: MFC r263471: Initialize vm_map_entry member wiring_thread on the map entry creation. Modified: stable/9/sys/vm/vm_map.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/vm_map.c ============================================================================== --- stable/9/sys/vm/vm_map.c Mon Mar 24 12:40:53 2014 (r263684) +++ stable/9/sys/vm/vm_map.c Mon Mar 24 12:41:00 2014 (r263685) @@ -1298,6 +1298,7 @@ charged: new_entry->protection = prot; new_entry->max_protection = max; new_entry->wired_count = 0; + new_entry->wiring_thread = NULL; new_entry->read_ahead = VM_FAULT_READ_AHEAD_INIT; new_entry->next_read = OFF_TO_IDX(offset); From owner-svn-src-stable@FreeBSD.ORG Mon Mar 24 13:48:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B21C4494; Mon, 24 Mar 2014 13:48:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9A6CF7F6; Mon, 24 Mar 2014 13:48:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2ODmDW1011869; Mon, 24 Mar 2014 13:48:13 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2ODm48X011815; Mon, 24 Mar 2014 13:48:04 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201403241348.s2ODm48X011815@svn.freebsd.org> From: Ed Maste Date: Mon, 24 Mar 2014 13:48:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263687 - in stable/10: contrib/file contrib/pf/pflogd contrib/tnftp contrib/vis lib/libedit share/man/man9 sys/compat/svr4 sys/dev/esp sys/dev/le sys/dev/usb/serial sys/mips/cavium sys... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Mar 2014 13:48:13 -0000 Author: emaste Date: Mon Mar 24 13:48:04 2014 New Revision: 263687 URL: http://svnweb.freebsd.org/changeset/base/263687 Log: MFC r263289: Update NetBSD Foundation copyrights to 2-clause BSD The NetBSD Foundation states "Third parties are encouraged to change the license on any files which have a 4-clause license contributed to the NetBSD Foundation to a 2-clause license." This change removes clauses 3 and 4 from copyright / license blocks that list The NetBSD Foundation as the only copyright holder. Sponsored by: The FreeBSD Foundation Modified: stable/10/contrib/file/mygetopt.h stable/10/contrib/pf/pflogd/pidfile.c stable/10/contrib/tnftp/COPYING stable/10/contrib/vis/extern.h stable/10/lib/libedit/chartype.h stable/10/share/man/man9/bus_dma.9 stable/10/share/man/man9/bus_space.9 stable/10/sys/compat/svr4/svr4_fuser.h stable/10/sys/compat/svr4/svr4_ipc.c stable/10/sys/compat/svr4/svr4_resource.c stable/10/sys/compat/svr4/svr4_resource.h stable/10/sys/dev/esp/ncr53c9xvar.h stable/10/sys/dev/le/am7990.c stable/10/sys/dev/le/am79900.c stable/10/sys/dev/le/am79900reg.h stable/10/sys/dev/le/am7990reg.h stable/10/sys/dev/le/if_le_isa.c stable/10/sys/dev/le/if_le_pci.c stable/10/sys/dev/le/lance.c stable/10/sys/dev/le/lancereg.h stable/10/sys/dev/usb/serial/ubsa.c stable/10/sys/dev/usb/serial/ubser.c stable/10/sys/dev/usb/serial/uchcom.c stable/10/sys/dev/usb/serial/ufoma.c stable/10/sys/dev/usb/serial/umodem.c stable/10/sys/dev/usb/serial/uplcom.c stable/10/sys/dev/usb/serial/usb_serial.c stable/10/sys/dev/usb/serial/usb_serial.h stable/10/sys/mips/cavium/octopci_bus_space.c stable/10/sys/mips/include/bus.h stable/10/sys/mips/mips/bus_space_fdt.c stable/10/sys/mips/mips/bus_space_generic.c stable/10/sys/mips/mips/gdb_machdep.c stable/10/sys/powerpc/aim/mmu_oea.c stable/10/sys/powerpc/aim/mmu_oea64.c stable/10/sys/powerpc/aim/moea64_native.c stable/10/sys/powerpc/include/bat.h stable/10/sys/powerpc/include/bus.h stable/10/sys/sys/bus_dma.h stable/10/sys/tools/miidevs2h.awk stable/10/sys/tools/pccarddevs2h.awk stable/10/sys/x86/include/bus.h Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/file/mygetopt.h ============================================================================== --- stable/10/contrib/file/mygetopt.h Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/contrib/file/mygetopt.h Mon Mar 24 13:48:04 2014 (r263687) @@ -15,13 +15,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/contrib/pf/pflogd/pidfile.c ============================================================================== --- stable/10/contrib/pf/pflogd/pidfile.c Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/contrib/pf/pflogd/pidfile.c Mon Mar 24 13:48:04 2014 (r263687) @@ -17,13 +17,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/contrib/tnftp/COPYING ============================================================================== --- stable/10/contrib/tnftp/COPYING Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/contrib/tnftp/COPYING Mon Mar 24 13:48:04 2014 (r263687) @@ -14,13 +14,6 @@ are met: 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. -3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed by the NetBSD - Foundation, Inc. and its contributors. -4. Neither the name of The NetBSD Foundation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/contrib/vis/extern.h ============================================================================== --- stable/10/contrib/vis/extern.h Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/contrib/vis/extern.h Mon Mar 24 13:48:04 2014 (r263687) @@ -15,13 +15,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/lib/libedit/chartype.h ============================================================================== --- stable/10/lib/libedit/chartype.h Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/lib/libedit/chartype.h Mon Mar 24 13:48:04 2014 (r263687) @@ -12,13 +12,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/share/man/man9/bus_dma.9 ============================================================================== --- stable/10/share/man/man9/bus_dma.9 Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/share/man/man9/bus_dma.9 Mon Mar 24 13:48:04 2014 (r263687) @@ -37,13 +37,6 @@ .\" 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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgment: -.\" This product includes software developed by the NetBSD -.\" Foundation, Inc. and its contributors. -.\" 4. Neither the name of The NetBSD Foundation nor the names of its -.\" contributors may be used to endorse or promote products derived -.\" from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/share/man/man9/bus_space.9 ============================================================================== --- stable/10/share/man/man9/bus_space.9 Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/share/man/man9/bus_space.9 Mon Mar 24 13:48:04 2014 (r263687) @@ -36,13 +36,6 @@ .\" 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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgment: -.\" This product includes software developed by the NetBSD -.\" Foundation, Inc. and its contributors. -.\" 4. Neither the name of The NetBSD Foundation nor the names of its -.\" contributors may be used to endorse or promote products derived -.\" from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/compat/svr4/svr4_fuser.h ============================================================================== --- stable/10/sys/compat/svr4/svr4_fuser.h Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/compat/svr4/svr4_fuser.h Mon Mar 24 13:48:04 2014 (r263687) @@ -20,13 +20,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/compat/svr4/svr4_ipc.c ============================================================================== --- stable/10/sys/compat/svr4/svr4_ipc.c Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/compat/svr4/svr4_ipc.c Mon Mar 24 13:48:04 2014 (r263687) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/compat/svr4/svr4_resource.c ============================================================================== --- stable/10/sys/compat/svr4/svr4_resource.c Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/compat/svr4/svr4_resource.c Mon Mar 24 13:48:04 2014 (r263687) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/compat/svr4/svr4_resource.h ============================================================================== --- stable/10/sys/compat/svr4/svr4_resource.h Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/compat/svr4/svr4_resource.h Mon Mar 24 13:48:04 2014 (r263687) @@ -18,13 +18,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/dev/esp/ncr53c9xvar.h ============================================================================== --- stable/10/sys/dev/esp/ncr53c9xvar.h Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/dev/esp/ncr53c9xvar.h Mon Mar 24 13:48:04 2014 (r263687) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/dev/le/am7990.c ============================================================================== --- stable/10/sys/dev/le/am7990.c Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/dev/le/am7990.c Mon Mar 24 13:48:04 2014 (r263687) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/dev/le/am79900.c ============================================================================== --- stable/10/sys/dev/le/am79900.c Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/dev/le/am79900.c Mon Mar 24 13:48:04 2014 (r263687) @@ -15,13 +15,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/dev/le/am79900reg.h ============================================================================== --- stable/10/sys/dev/le/am79900reg.h Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/dev/le/am79900reg.h Mon Mar 24 13:48:04 2014 (r263687) @@ -15,13 +15,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/dev/le/am7990reg.h ============================================================================== --- stable/10/sys/dev/le/am7990reg.h Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/dev/le/am7990reg.h Mon Mar 24 13:48:04 2014 (r263687) @@ -15,13 +15,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/dev/le/if_le_isa.c ============================================================================== --- stable/10/sys/dev/le/if_le_isa.c Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/dev/le/if_le_isa.c Mon Mar 24 13:48:04 2014 (r263687) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/dev/le/if_le_pci.c ============================================================================== --- stable/10/sys/dev/le/if_le_pci.c Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/dev/le/if_le_pci.c Mon Mar 24 13:48:04 2014 (r263687) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/dev/le/lance.c ============================================================================== --- stable/10/sys/dev/le/lance.c Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/dev/le/lance.c Mon Mar 24 13:48:04 2014 (r263687) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/dev/le/lancereg.h ============================================================================== --- stable/10/sys/dev/le/lancereg.h Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/dev/le/lancereg.h Mon Mar 24 13:48:04 2014 (r263687) @@ -15,13 +15,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/dev/usb/serial/ubsa.c ============================================================================== --- stable/10/sys/dev/usb/serial/ubsa.c Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/dev/usb/serial/ubsa.c Mon Mar 24 13:48:04 2014 (r263687) @@ -41,13 +41,6 @@ __FBSDID("$FreeBSD$"); * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/dev/usb/serial/ubser.c ============================================================================== --- stable/10/sys/dev/usb/serial/ubser.c Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/dev/usb/serial/ubser.c Mon Mar 24 13:48:04 2014 (r263687) @@ -48,13 +48,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/dev/usb/serial/uchcom.c ============================================================================== --- stable/10/sys/dev/usb/serial/uchcom.c Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/dev/usb/serial/uchcom.c Mon Mar 24 13:48:04 2014 (r263687) @@ -41,13 +41,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/dev/usb/serial/ufoma.c ============================================================================== --- stable/10/sys/dev/usb/serial/ufoma.c Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/dev/usb/serial/ufoma.c Mon Mar 24 13:48:04 2014 (r263687) @@ -46,13 +46,6 @@ __FBSDID("$FreeBSD$"); * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/dev/usb/serial/umodem.c ============================================================================== --- stable/10/sys/dev/usb/serial/umodem.c Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/dev/usb/serial/umodem.c Mon Mar 24 13:48:04 2014 (r263687) @@ -45,13 +45,6 @@ __FBSDID("$FreeBSD$"); * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/dev/usb/serial/uplcom.c ============================================================================== --- stable/10/sys/dev/usb/serial/uplcom.c Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/dev/usb/serial/uplcom.c Mon Mar 24 13:48:04 2014 (r263687) @@ -44,13 +44,6 @@ __FBSDID("$FreeBSD$"); * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/dev/usb/serial/usb_serial.c ============================================================================== --- stable/10/sys/dev/usb/serial/usb_serial.c Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/dev/usb/serial/usb_serial.c Mon Mar 24 13:48:04 2014 (r263687) @@ -46,13 +46,6 @@ __FBSDID("$FreeBSD$"); * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/dev/usb/serial/usb_serial.h ============================================================================== --- stable/10/sys/dev/usb/serial/usb_serial.h Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/dev/usb/serial/usb_serial.h Mon Mar 24 13:48:04 2014 (r263687) @@ -43,13 +43,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/mips/cavium/octopci_bus_space.c ============================================================================== --- stable/10/sys/mips/cavium/octopci_bus_space.c Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/mips/cavium/octopci_bus_space.c Mon Mar 24 13:48:04 2014 (r263687) @@ -17,13 +17,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/mips/include/bus.h ============================================================================== --- stable/10/sys/mips/include/bus.h Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/mips/include/bus.h Mon Mar 24 13:48:04 2014 (r263687) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/mips/mips/bus_space_fdt.c ============================================================================== --- stable/10/sys/mips/mips/bus_space_fdt.c Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/mips/mips/bus_space_fdt.c Mon Mar 24 13:48:04 2014 (r263687) @@ -17,13 +17,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/mips/mips/bus_space_generic.c ============================================================================== --- stable/10/sys/mips/mips/bus_space_generic.c Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/mips/mips/bus_space_generic.c Mon Mar 24 13:48:04 2014 (r263687) @@ -17,13 +17,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/mips/mips/gdb_machdep.c ============================================================================== --- stable/10/sys/mips/mips/gdb_machdep.c Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/mips/mips/gdb_machdep.c Mon Mar 24 13:48:04 2014 (r263687) @@ -41,13 +41,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/powerpc/aim/mmu_oea.c ============================================================================== --- stable/10/sys/powerpc/aim/mmu_oea.c Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/powerpc/aim/mmu_oea.c Mon Mar 24 13:48:04 2014 (r263687) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- stable/10/sys/powerpc/aim/mmu_oea64.c Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/powerpc/aim/mmu_oea64.c Mon Mar 24 13:48:04 2014 (r263687) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/powerpc/aim/moea64_native.c ============================================================================== --- stable/10/sys/powerpc/aim/moea64_native.c Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/powerpc/aim/moea64_native.c Mon Mar 24 13:48:04 2014 (r263687) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/powerpc/include/bat.h ============================================================================== --- stable/10/sys/powerpc/include/bat.h Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/powerpc/include/bat.h Mon Mar 24 13:48:04 2014 (r263687) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/powerpc/include/bus.h ============================================================================== --- stable/10/sys/powerpc/include/bus.h Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/powerpc/include/bus.h Mon Mar 24 13:48:04 2014 (r263687) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/sys/bus_dma.h ============================================================================== --- stable/10/sys/sys/bus_dma.h Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/sys/bus_dma.h Mon Mar 24 13:48:04 2014 (r263687) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/tools/miidevs2h.awk ============================================================================== --- stable/10/sys/tools/miidevs2h.awk Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/tools/miidevs2h.awk Mon Mar 24 13:48:04 2014 (r263687) @@ -16,13 +16,6 @@ # 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. -# 3. All advertising materials mentioning features or use of this software -# must display the following acknowledgement: -# This product includes software developed by the NetBSD -# Foundation, Inc. and its contributors. -# 4. Neither the name of The NetBSD Foundation nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/tools/pccarddevs2h.awk ============================================================================== --- stable/10/sys/tools/pccarddevs2h.awk Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/tools/pccarddevs2h.awk Mon Mar 24 13:48:04 2014 (r263687) @@ -17,13 +17,6 @@ # 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. -# 3. All advertising materials mentioning features or use of this software -# must display the following acknowledgement: -# This product includes software developed by the NetBSD -# Foundation, Inc. and its contributors. -# 4. Neither the name of The NetBSD Foundation nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/x86/include/bus.h ============================================================================== --- stable/10/sys/x86/include/bus.h Mon Mar 24 13:13:52 2014 (r263686) +++ stable/10/sys/x86/include/bus.h Mon Mar 24 13:48:04 2014 (r263687) @@ -49,13 +49,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED From owner-svn-src-stable@FreeBSD.ORG Mon Mar 24 13:50:20 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B60DC62C; Mon, 24 Mar 2014 13:50:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9E799821; Mon, 24 Mar 2014 13:50:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2ODoKgw012220; Mon, 24 Mar 2014 13:50:20 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2ODoBf9012168; Mon, 24 Mar 2014 13:50:11 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201403241350.s2ODoBf9012168@svn.freebsd.org> From: Ed Maste Date: Mon, 24 Mar 2014 13:50:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263688 - in stable/9: contrib/file contrib/pf/pflogd contrib/tnftp contrib/vis lib/libedit share/man/man9 sys/compat/svr4 sys/dev/esp sys/dev/le sys/dev/usb/serial sys/mips/cavium sys/... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Mar 2014 13:50:20 -0000 Author: emaste Date: Mon Mar 24 13:50:11 2014 New Revision: 263688 URL: http://svnweb.freebsd.org/changeset/base/263688 Log: MFC r263289: Update NetBSD Foundation copyrights to 2-clause BSD The NetBSD Foundation states "Third parties are encouraged to change the license on any files which have a 4-clause license contributed to the NetBSD Foundation to a 2-clause license." This change removes clauses 3 and 4 from copyright / license blocks that list The NetBSD Foundation as the only copyright holder. Sponsored by: The FreeBSD Foundation Modified: stable/9/contrib/file/mygetopt.h stable/9/contrib/pf/pflogd/pidfile.c stable/9/contrib/tnftp/COPYING stable/9/contrib/vis/extern.h stable/9/lib/libedit/chartype.h stable/9/share/man/man9/bus_dma.9 stable/9/share/man/man9/bus_space.9 stable/9/sys/compat/svr4/svr4_fuser.h stable/9/sys/compat/svr4/svr4_ipc.c stable/9/sys/compat/svr4/svr4_resource.c stable/9/sys/compat/svr4/svr4_resource.h stable/9/sys/dev/esp/ncr53c9xvar.h stable/9/sys/dev/le/am7990.c stable/9/sys/dev/le/am79900.c stable/9/sys/dev/le/am79900reg.h stable/9/sys/dev/le/am7990reg.h stable/9/sys/dev/le/if_le_isa.c stable/9/sys/dev/le/if_le_pci.c stable/9/sys/dev/le/lance.c stable/9/sys/dev/le/lancereg.h stable/9/sys/dev/usb/serial/ubsa.c stable/9/sys/dev/usb/serial/ubser.c stable/9/sys/dev/usb/serial/uchcom.c stable/9/sys/dev/usb/serial/ufoma.c stable/9/sys/dev/usb/serial/umodem.c stable/9/sys/dev/usb/serial/uplcom.c stable/9/sys/dev/usb/serial/usb_serial.c stable/9/sys/dev/usb/serial/usb_serial.h stable/9/sys/mips/cavium/octopci_bus_space.c stable/9/sys/mips/include/bus.h stable/9/sys/mips/mips/bus_space_generic.c stable/9/sys/mips/mips/gdb_machdep.c stable/9/sys/powerpc/aim/mmu_oea.c stable/9/sys/powerpc/aim/mmu_oea64.c stable/9/sys/powerpc/aim/moea64_native.c stable/9/sys/powerpc/include/bat.h stable/9/sys/powerpc/include/bus.h stable/9/sys/sys/bus_dma.h stable/9/sys/tools/miidevs2h.awk stable/9/sys/tools/pccarddevs2h.awk stable/9/sys/x86/include/bus.h Directory Properties: stable/9/contrib/file/ (props changed) stable/9/contrib/pf/ (props changed) stable/9/contrib/tnftp/ (props changed) stable/9/contrib/vis/ (props changed) stable/9/lib/libedit/ (props changed) stable/9/share/man/man9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/contrib/file/mygetopt.h ============================================================================== --- stable/9/contrib/file/mygetopt.h Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/contrib/file/mygetopt.h Mon Mar 24 13:50:11 2014 (r263688) @@ -15,13 +15,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/contrib/pf/pflogd/pidfile.c ============================================================================== --- stable/9/contrib/pf/pflogd/pidfile.c Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/contrib/pf/pflogd/pidfile.c Mon Mar 24 13:50:11 2014 (r263688) @@ -17,13 +17,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/contrib/tnftp/COPYING ============================================================================== --- stable/9/contrib/tnftp/COPYING Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/contrib/tnftp/COPYING Mon Mar 24 13:50:11 2014 (r263688) @@ -14,13 +14,6 @@ are met: 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. -3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed by the NetBSD - Foundation, Inc. and its contributors. -4. Neither the name of The NetBSD Foundation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/contrib/vis/extern.h ============================================================================== --- stable/9/contrib/vis/extern.h Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/contrib/vis/extern.h Mon Mar 24 13:50:11 2014 (r263688) @@ -15,13 +15,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/lib/libedit/chartype.h ============================================================================== --- stable/9/lib/libedit/chartype.h Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/lib/libedit/chartype.h Mon Mar 24 13:50:11 2014 (r263688) @@ -12,13 +12,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/share/man/man9/bus_dma.9 ============================================================================== --- stable/9/share/man/man9/bus_dma.9 Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/share/man/man9/bus_dma.9 Mon Mar 24 13:50:11 2014 (r263688) @@ -37,13 +37,6 @@ .\" 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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgment: -.\" This product includes software developed by the NetBSD -.\" Foundation, Inc. and its contributors. -.\" 4. Neither the name of The NetBSD Foundation nor the names of its -.\" contributors may be used to endorse or promote products derived -.\" from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/share/man/man9/bus_space.9 ============================================================================== --- stable/9/share/man/man9/bus_space.9 Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/share/man/man9/bus_space.9 Mon Mar 24 13:50:11 2014 (r263688) @@ -36,13 +36,6 @@ .\" 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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgment: -.\" This product includes software developed by the NetBSD -.\" Foundation, Inc. and its contributors. -.\" 4. Neither the name of The NetBSD Foundation nor the names of its -.\" contributors may be used to endorse or promote products derived -.\" from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/compat/svr4/svr4_fuser.h ============================================================================== --- stable/9/sys/compat/svr4/svr4_fuser.h Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/compat/svr4/svr4_fuser.h Mon Mar 24 13:50:11 2014 (r263688) @@ -20,13 +20,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/compat/svr4/svr4_ipc.c ============================================================================== --- stable/9/sys/compat/svr4/svr4_ipc.c Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/compat/svr4/svr4_ipc.c Mon Mar 24 13:50:11 2014 (r263688) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/compat/svr4/svr4_resource.c ============================================================================== --- stable/9/sys/compat/svr4/svr4_resource.c Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/compat/svr4/svr4_resource.c Mon Mar 24 13:50:11 2014 (r263688) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/compat/svr4/svr4_resource.h ============================================================================== --- stable/9/sys/compat/svr4/svr4_resource.h Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/compat/svr4/svr4_resource.h Mon Mar 24 13:50:11 2014 (r263688) @@ -18,13 +18,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/dev/esp/ncr53c9xvar.h ============================================================================== --- stable/9/sys/dev/esp/ncr53c9xvar.h Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/dev/esp/ncr53c9xvar.h Mon Mar 24 13:50:11 2014 (r263688) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/dev/le/am7990.c ============================================================================== --- stable/9/sys/dev/le/am7990.c Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/dev/le/am7990.c Mon Mar 24 13:50:11 2014 (r263688) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/dev/le/am79900.c ============================================================================== --- stable/9/sys/dev/le/am79900.c Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/dev/le/am79900.c Mon Mar 24 13:50:11 2014 (r263688) @@ -15,13 +15,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/dev/le/am79900reg.h ============================================================================== --- stable/9/sys/dev/le/am79900reg.h Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/dev/le/am79900reg.h Mon Mar 24 13:50:11 2014 (r263688) @@ -15,13 +15,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/dev/le/am7990reg.h ============================================================================== --- stable/9/sys/dev/le/am7990reg.h Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/dev/le/am7990reg.h Mon Mar 24 13:50:11 2014 (r263688) @@ -15,13 +15,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/dev/le/if_le_isa.c ============================================================================== --- stable/9/sys/dev/le/if_le_isa.c Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/dev/le/if_le_isa.c Mon Mar 24 13:50:11 2014 (r263688) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/dev/le/if_le_pci.c ============================================================================== --- stable/9/sys/dev/le/if_le_pci.c Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/dev/le/if_le_pci.c Mon Mar 24 13:50:11 2014 (r263688) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/dev/le/lance.c ============================================================================== --- stable/9/sys/dev/le/lance.c Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/dev/le/lance.c Mon Mar 24 13:50:11 2014 (r263688) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/dev/le/lancereg.h ============================================================================== --- stable/9/sys/dev/le/lancereg.h Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/dev/le/lancereg.h Mon Mar 24 13:50:11 2014 (r263688) @@ -15,13 +15,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/dev/usb/serial/ubsa.c ============================================================================== --- stable/9/sys/dev/usb/serial/ubsa.c Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/dev/usb/serial/ubsa.c Mon Mar 24 13:50:11 2014 (r263688) @@ -41,13 +41,6 @@ __FBSDID("$FreeBSD$"); * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/dev/usb/serial/ubser.c ============================================================================== --- stable/9/sys/dev/usb/serial/ubser.c Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/dev/usb/serial/ubser.c Mon Mar 24 13:50:11 2014 (r263688) @@ -48,13 +48,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/dev/usb/serial/uchcom.c ============================================================================== --- stable/9/sys/dev/usb/serial/uchcom.c Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/dev/usb/serial/uchcom.c Mon Mar 24 13:50:11 2014 (r263688) @@ -41,13 +41,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/dev/usb/serial/ufoma.c ============================================================================== --- stable/9/sys/dev/usb/serial/ufoma.c Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/dev/usb/serial/ufoma.c Mon Mar 24 13:50:11 2014 (r263688) @@ -46,13 +46,6 @@ __FBSDID("$FreeBSD$"); * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/dev/usb/serial/umodem.c ============================================================================== --- stable/9/sys/dev/usb/serial/umodem.c Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/dev/usb/serial/umodem.c Mon Mar 24 13:50:11 2014 (r263688) @@ -45,13 +45,6 @@ __FBSDID("$FreeBSD$"); * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/dev/usb/serial/uplcom.c ============================================================================== --- stable/9/sys/dev/usb/serial/uplcom.c Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/dev/usb/serial/uplcom.c Mon Mar 24 13:50:11 2014 (r263688) @@ -44,13 +44,6 @@ __FBSDID("$FreeBSD$"); * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/dev/usb/serial/usb_serial.c ============================================================================== --- stable/9/sys/dev/usb/serial/usb_serial.c Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/dev/usb/serial/usb_serial.c Mon Mar 24 13:50:11 2014 (r263688) @@ -46,13 +46,6 @@ __FBSDID("$FreeBSD$"); * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/dev/usb/serial/usb_serial.h ============================================================================== --- stable/9/sys/dev/usb/serial/usb_serial.h Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/dev/usb/serial/usb_serial.h Mon Mar 24 13:50:11 2014 (r263688) @@ -43,13 +43,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/mips/cavium/octopci_bus_space.c ============================================================================== --- stable/9/sys/mips/cavium/octopci_bus_space.c Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/mips/cavium/octopci_bus_space.c Mon Mar 24 13:50:11 2014 (r263688) @@ -17,13 +17,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/mips/include/bus.h ============================================================================== --- stable/9/sys/mips/include/bus.h Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/mips/include/bus.h Mon Mar 24 13:50:11 2014 (r263688) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/mips/mips/bus_space_generic.c ============================================================================== --- stable/9/sys/mips/mips/bus_space_generic.c Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/mips/mips/bus_space_generic.c Mon Mar 24 13:50:11 2014 (r263688) @@ -17,13 +17,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/mips/mips/gdb_machdep.c ============================================================================== --- stable/9/sys/mips/mips/gdb_machdep.c Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/mips/mips/gdb_machdep.c Mon Mar 24 13:50:11 2014 (r263688) @@ -41,13 +41,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/powerpc/aim/mmu_oea.c ============================================================================== --- stable/9/sys/powerpc/aim/mmu_oea.c Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/powerpc/aim/mmu_oea.c Mon Mar 24 13:50:11 2014 (r263688) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- stable/9/sys/powerpc/aim/mmu_oea64.c Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/powerpc/aim/mmu_oea64.c Mon Mar 24 13:50:11 2014 (r263688) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/powerpc/aim/moea64_native.c ============================================================================== --- stable/9/sys/powerpc/aim/moea64_native.c Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/powerpc/aim/moea64_native.c Mon Mar 24 13:50:11 2014 (r263688) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/powerpc/include/bat.h ============================================================================== --- stable/9/sys/powerpc/include/bat.h Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/powerpc/include/bat.h Mon Mar 24 13:50:11 2014 (r263688) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/powerpc/include/bus.h ============================================================================== --- stable/9/sys/powerpc/include/bus.h Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/powerpc/include/bus.h Mon Mar 24 13:50:11 2014 (r263688) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/sys/bus_dma.h ============================================================================== --- stable/9/sys/sys/bus_dma.h Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/sys/bus_dma.h Mon Mar 24 13:50:11 2014 (r263688) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/tools/miidevs2h.awk ============================================================================== --- stable/9/sys/tools/miidevs2h.awk Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/tools/miidevs2h.awk Mon Mar 24 13:50:11 2014 (r263688) @@ -16,13 +16,6 @@ # 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. -# 3. All advertising materials mentioning features or use of this software -# must display the following acknowledgement: -# This product includes software developed by the NetBSD -# Foundation, Inc. and its contributors. -# 4. Neither the name of The NetBSD Foundation nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/tools/pccarddevs2h.awk ============================================================================== --- stable/9/sys/tools/pccarddevs2h.awk Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/tools/pccarddevs2h.awk Mon Mar 24 13:50:11 2014 (r263688) @@ -17,13 +17,6 @@ # 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. -# 3. All advertising materials mentioning features or use of this software -# must display the following acknowledgement: -# This product includes software developed by the NetBSD -# Foundation, Inc. and its contributors. -# 4. Neither the name of The NetBSD Foundation nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/9/sys/x86/include/bus.h ============================================================================== --- stable/9/sys/x86/include/bus.h Mon Mar 24 13:48:04 2014 (r263687) +++ stable/9/sys/x86/include/bus.h Mon Mar 24 13:50:11 2014 (r263688) @@ -49,13 +49,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED From owner-svn-src-stable@FreeBSD.ORG Tue Mar 25 03:19:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D9E7F372; Tue, 25 Mar 2014 03:19:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BA4E7DAA; Tue, 25 Mar 2014 03:19:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2P3J5sZ050398; Tue, 25 Mar 2014 03:19:05 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2P3J3XK050387; Tue, 25 Mar 2014 03:19:03 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201403250319.s2P3J3XK050387@svn.freebsd.org> From: Devin Teske Date: Tue, 25 Mar 2014 03:19:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263701 - in stable/9/sys/boot: forth i386/loader X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 03:19:06 -0000 Author: dteske Date: Tue Mar 25 03:19:03 2014 New Revision: 263701 URL: http://svnweb.freebsd.org/changeset/base/263701 Log: MFC r257650: Defer loading of kernel and modules if the beastie menu is enabled. Add a kernel selection menu to the beastie menu. List of kernels is taken from `kernels' in loader.conf(5) as a space (or comma) separated list of names to display (up to 9). If not set, default value is "kernel kernel.old". Does not validate that kernels exist because the next enhancement will be to allow selection of the root device. Discussed on: -current Modified: stable/9/sys/boot/forth/beastie.4th stable/9/sys/boot/forth/loader.4th stable/9/sys/boot/forth/loader.4th.8 stable/9/sys/boot/forth/loader.conf stable/9/sys/boot/forth/loader.conf.5 stable/9/sys/boot/forth/loader.rc stable/9/sys/boot/forth/menu-commands.4th stable/9/sys/boot/forth/menu.4th stable/9/sys/boot/forth/menu.rc stable/9/sys/boot/forth/menusets.4th stable/9/sys/boot/i386/loader/loader.rc Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/forth/ (props changed) Modified: stable/9/sys/boot/forth/beastie.4th ============================================================================== --- stable/9/sys/boot/forth/beastie.4th Tue Mar 25 02:32:04 2014 (r263700) +++ stable/9/sys/boot/forth/beastie.4th Tue Mar 25 03:19:03 2014 (r263701) @@ -30,6 +30,8 @@ marker task-beastie.4th include /boot/delay.4th +only forth definitions also support-functions + variable logoX variable logoY @@ -345,7 +347,11 @@ variable logoY s" beastie_disable" getenv dup -1 <> if s" YES" compare-insensitive 0= if - exit + any_conf_read? if + load_kernel + load_modules + then + exit \ to autoboot (default) then else drop @@ -362,3 +368,5 @@ variable logoY delay_execute then ; + +only forth also Modified: stable/9/sys/boot/forth/loader.4th ============================================================================== --- stable/9/sys/boot/forth/loader.4th Tue Mar 25 02:32:04 2014 (r263700) +++ stable/9/sys/boot/forth/loader.4th Tue Mar 25 03:19:03 2014 (r263701) @@ -44,6 +44,14 @@ include /boot/color.4th only forth also support-functions also builtins definitions +: bootmsg ( -- ) + loader_color? if + ." Booting..." cr + else + ." Booting..." cr + then +; + : try-menu-unset \ menu-unset may not be present s" beastie_disable" getenv @@ -71,12 +79,6 @@ only forth also support-functions also b : boot 0= if ( interpreted ) get_arguments then - loader_color? if - ." Booting..." cr - else - ." Booting..." cr - then - \ Unload only if a path was passed dup if >r over r> swap @@ -85,25 +87,25 @@ only forth also support-functions also b else s" kernelname" getenv? if ( a kernel has been loaded ) try-menu-unset - 1 boot exit + bootmsg 1 boot exit then load_kernel_and_modules ?dup if exit then try-menu-unset - 0 1 boot exit + bootmsg 0 1 boot exit then else s" kernelname" getenv? if ( a kernel has been loaded ) try-menu-unset - 1 boot exit + bootmsg 1 boot exit then load_kernel_and_modules ?dup if exit then try-menu-unset - 0 1 boot exit + bootmsg 0 1 boot exit then load_kernel_and_modules - ?dup 0= if 0 1 boot then + ?dup 0= if bootmsg 0 1 boot then ; \ ***** boot-conf @@ -129,8 +131,8 @@ include /boot/check-password.4th \ ***** start \ \ Initializes support.4th global variables, sets loader_conf_files, -\ process conf files, and, if any one such file was succesfully -\ read to the end, load kernel and modules. +\ processes conf files, and, if any one such file was succesfully +\ read to the end, loads kernel and modules. : start ( -- ) ( throws: abort & user-defined ) s" /boot/defaults/loader.conf" initialize Modified: stable/9/sys/boot/forth/loader.4th.8 ============================================================================== --- stable/9/sys/boot/forth/loader.4th.8 Tue Mar 25 02:32:04 2014 (r263700) +++ stable/9/sys/boot/forth/loader.4th.8 Tue Mar 25 03:19:03 2014 (r263701) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 30, 2004 +.Dd October 17, 2013 .Dt LOADER.4TH 8 .Os .Sh NAME @@ -94,31 +94,35 @@ Reads .Pa /boot/defaults/loader.conf , all other .Xr loader.conf 5 -files specified in it, and then proceeds to boot as specified in them. -This +files specified in it, then loads the desired kernel and modules +.Pq if not already loaded . +After which you can use the +.Ic boot +or +.Ic autoboot +commmands or simply exit (provided +.Va autoboot_delay +is not set to NO) to boot the system. +.Ic start is the command used in the default .Pa /boot/loader.rc -file, and it uses the -.Ic autoboot -command (see -.Xr loader 8 ) , -so it can be stopped for further interaction with -.Xr loader 8 . +file +.Pq see Xr loader 8 . .Pp .It Ic initialize -Initialize the supporting library so commands can be used without -executing +Initialize the support library so commands can be used without executing .Ic start first. Like .Ic start , -reads +it reads .Pa /boot/defaults/loader.conf and all other .Xr loader.conf 5 -files specified in it. +files specified in it +.Pq but does not load kernel or modules . Returns a flag on the stack to indicate -if any configuration file was successfully loaded. +if any configuration files were successfully loaded. .Pp .It Ic read-conf Ar filename Reads and processes a Modified: stable/9/sys/boot/forth/loader.conf ============================================================================== --- stable/9/sys/boot/forth/loader.conf Tue Mar 25 02:32:04 2014 (r263700) +++ stable/9/sys/boot/forth/loader.conf Tue Mar 25 03:19:03 2014 (r263701) @@ -48,6 +48,7 @@ bitmap_type="splash_image_data" # and pl # escape to the loader prompt, set to # "NO" to disable autobooting #beastie_disable="NO" # Turn the beastie boot menu on and off +#kernels="kernel kernel.old" # Kernels to display in the boot menu #loader_logo="orbbw" # Desired logo: orbbw, orb, fbsdbw, beastiebw, beastie, none #comconsole_speed="9600" # Set the current serial console speed #console="vidconsole" # A comma separated list of console(s) Modified: stable/9/sys/boot/forth/loader.conf.5 ============================================================================== --- stable/9/sys/boot/forth/loader.conf.5 Tue Mar 25 02:32:04 2014 (r263700) +++ stable/9/sys/boot/forth/loader.conf.5 Tue Mar 25 03:19:03 2014 (r263701) @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd August 6, 2013 +.Dd October 18, 2013 .Dt LOADER.CONF 5 .Os .Sh NAME @@ -209,6 +209,9 @@ replacing it with character (useful for embedded products and such). .It Va kernel .Pq Dq kernel +.It Va kernels +.Pq Dq kernel kernel.old +Space or comma separated list of kernels to present in the boot menu. .It Va loader_conf_files .Pq Dq Pa /boot/loader.conf /boot/loader.conf.local .It Va splash_bmp_load Modified: stable/9/sys/boot/forth/loader.rc ============================================================================== --- stable/9/sys/boot/forth/loader.rc Tue Mar 25 02:32:04 2014 (r263700) +++ stable/9/sys/boot/forth/loader.rc Tue Mar 25 03:19:03 2014 (r263701) @@ -5,6 +5,7 @@ include /boot/loader.4th \ Reads and processes loader.conf variables +\ NOTE: Change to `initialize' if you enable the below boot menu start \ Tests for password -- executes autoboot first if a password was defined Modified: stable/9/sys/boot/forth/menu-commands.4th ============================================================================== --- stable/9/sys/boot/forth/menu-commands.4th Tue Mar 25 02:32:04 2014 (r263700) +++ stable/9/sys/boot/forth/menu-commands.4th Tue Mar 25 03:19:03 2014 (r263701) @@ -1,4 +1,4 @@ -\ Copyright (c) 2006-2012 Devin Teske +\ Copyright (c) 2006-2013 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without @@ -30,6 +30,8 @@ include /boot/menusets.4th variable kernel_state variable root_state +0 kernel_state ! +0 root_state ! \ \ Boot @@ -279,21 +281,21 @@ variable root_state init_cyclestate ( n k -- n ) ; -: cycle_kernel ( N -- N TRUE ) - cycle_menuitem - menu-redraw - - \ Now we're going to make the change effective - - dup cycle_stateN @ - dup kernel_state ! \ save a copy for re-initialization - 48 + \ convert to ASCII numeral +: activate_kernel ( N -- N ) + dup cycle_stateN @ ( n -- n n2 ) + dup kernel_state ! ( n n2 -- n n2 ) \ copy for re-initialization + 48 + ( n n2 -- n n2' ) \ kernel_state to ASCII num s" set kernel=${kernel_prefix}${kernel[N]}${kernel_suffix}" - 36 +c! \ replace 'N' with ASCII numeral - evaluate \ sets $kernel to full kernel-path + 36 +c! ( n n2 c-addr/u -- n c-addr/u ) \ 'N' to ASCII num + evaluate ( n c-addr/u -- n ) \ sets $kernel to full kernel-path +; - TRUE \ loop menu again +: cycle_kernel ( N -- N TRUE ) + cycle_menuitem \ cycle cycle_stateN to next value + activate_kernel \ apply current cycle_stateN + menu-redraw \ redraw menu + TRUE \ loop menu again ; \ @@ -305,21 +307,21 @@ variable root_state init_cyclestate ( n k -- n ) ; -: cycle_root ( N -- N TRUE ) - cycle_menuitem - menu-redraw - - \ Now we're going to make the change effective - - dup cycle_stateN @ - dup root_state ! \ save a copy for re-initialization - 48 + \ convert to ASCII numeral +: activate_root ( N -- N ) + dup cycle_stateN @ ( n -- n n2 ) + dup root_state ! ( n n2 -- n n2 ) \ copy for re-initialization + 48 + ( n n2 -- n n2' ) \ root_state to ASCII num s" set root=${root_prefix}${root[N]}${root_suffix}" - 30 +c! \ replace 'N' with ASCII numeral - evaluate \ sets $root to full root-path + 30 +c! ( n n2 c-addr/u -- n c-addr/u ) \ 'N' to ASCII num + evaluate ( n c-addr/u -- n ) \ sets $root to full kernel-path +; - TRUE \ loop menu again +: cycle_root ( N -- N TRUE ) + cycle_menuitem \ cycle cycle_stateN to next value + activate_root \ apply current cycle_stateN + menu-redraw \ redraw menu + TRUE \ loop menu again ; \ Modified: stable/9/sys/boot/forth/menu.4th ============================================================================== --- stable/9/sys/boot/forth/menu.4th Tue Mar 25 02:32:04 2014 (r263700) +++ stable/9/sys/boot/forth/menu.4th Tue Mar 25 03:19:03 2014 (r263701) @@ -70,6 +70,12 @@ variable menureboot variable menurebootadded variable menuacpi variable menuoptions +variable menukernel + +\ Parsing of kernels into menu-items +variable kernidx +variable kernlen +variable kernmenuidx \ Menu timer [count-down] variables variable menu_timeout_enabled \ timeout state (internal use only) @@ -109,14 +115,19 @@ variable cycle_state7 variable cycle_state8 \ Containers for storing the initial caption text -create init_text1 255 allot -create init_text2 255 allot -create init_text3 255 allot -create init_text4 255 allot -create init_text5 255 allot -create init_text6 255 allot -create init_text7 255 allot -create init_text8 255 allot +create init_text1 64 allot +create init_text2 64 allot +create init_text3 64 allot +create init_text4 64 allot +create init_text5 64 allot +create init_text6 64 allot +create init_text7 64 allot +create init_text8 64 allot + +\ Containers for parsing kernels into menu-items +create kerncapbuf 64 allot +create kerndefault 64 allot +create kernelsbuf 256 allot : +c! ( N C-ADDR/U K -- C-ADDR/U ) 3 pick 3 pick ( n c-addr/u k -- n c-addr/u k n c-addr ) @@ -124,45 +135,31 @@ create init_text8 255 allot rot drop ( n c-addr/u -- c-addr/u ) ; +: delim? ( C -- BOOL ) + dup 32 = ( c -- c bool ) \ [sp] space + over 9 = or ( c bool -- c bool ) \ [ht] horizontal tab + over 10 = or ( c bool -- c bool ) \ [nl] newline + over 13 = or ( c bool -- c bool ) \ [cr] carriage return + over [char] , = or ( c bool -- c bool ) \ comma + swap drop ( c bool -- bool ) \ return boolean +; + : menukeyN ( N -- ADDR ) s" menukeyN" 7 +c! evaluate ; : init_stateN ( N -- ADDR ) s" init_stateN" 10 +c! evaluate ; : toggle_stateN ( N -- ADDR ) s" toggle_stateN" 12 +c! evaluate ; : cycle_stateN ( N -- ADDR ) s" cycle_stateN" 11 +c! evaluate ; : init_textN ( N -- C-ADDR ) s" init_textN" 9 +c! evaluate ; -: str_loader_menu_frame ( -- C-ADDR/U ) s" loader_menu_frame" ; -: str_loader_menu_title ( -- C-ADDR/U ) s" loader_menu_title" ; -: str_loader_menu_title_align ( -- C-ADDR/U ) s" loader_menu_title_align" ; -: str_loader_menu_x ( -- C-ADDR/U ) s" loader_menu_x" ; -: str_loader_menu_y ( -- C-ADDR/U ) s" loader_menu_y" ; -: str_loader_menu_timeout_x ( -- C-ADDR/U ) s" loader_menu_timeout_x" ; -: str_loader_menu_timeout_y ( -- C-ADDR/U ) s" loader_menu_timeout_y" ; -: str_menu_init ( -- C-ADDR/U ) s" menu_init" ; -: str_menu_timeout_command ( -- C-ADDR/U ) s" menu_timeout_command" ; -: str_menu_reboot ( -- C-ADDR/U ) s" menu_reboot" ; -: str_menu_acpi ( -- C-ADDR/U ) s" menu_acpi" ; -: str_menu_options ( -- C-ADDR/U ) s" menu_options" ; -: str_menu_optionstext ( -- C-ADDR/U ) s" menu_optionstext" ; - -: str_menu_init[x] ( -- C-ADDR/U ) s" menu_init[x]" ; -: str_menu_command[x] ( -- C-ADDR/U ) s" menu_command[x]" ; -: str_menu_caption[x] ( -- C-ADDR/U ) s" menu_caption[x]" ; -: str_ansi_caption[x] ( -- C-ADDR/U ) s" ansi_caption[x]" ; -: str_menu_keycode[x] ( -- C-ADDR/U ) s" menu_keycode[x]" ; -: str_toggled_text[x] ( -- C-ADDR/U ) s" toggled_text[x]" ; -: str_toggled_ansi[x] ( -- C-ADDR/U ) s" toggled_ansi[x]" ; -: str_menu_caption[x][y] ( -- C-ADDR/U ) s" menu_caption[x][y]" ; -: str_ansi_caption[x][y] ( -- C-ADDR/U ) s" ansi_caption[x][y]" ; - -: menu_init[x] ( N -- C-ADDR/U ) str_menu_init[x] 10 +c! ; -: menu_command[x] ( N -- C-ADDR/U ) str_menu_command[x] 13 +c! ; -: menu_caption[x] ( N -- C-ADDR/U ) str_menu_caption[x] 13 +c! ; -: ansi_caption[x] ( N -- C-ADDR/U ) str_ansi_caption[x] 13 +c! ; -: menu_keycode[x] ( N -- C-ADDR/U ) str_menu_keycode[x] 13 +c! ; -: toggled_text[x] ( N -- C-ADDR/U ) str_toggled_text[x] 13 +c! ; -: toggled_ansi[x] ( N -- C-ADDR/U ) str_toggled_ansi[x] 13 +c! ; -: menu_caption[x][y] ( N M -- C-ADDR/U ) str_menu_caption[x][y] 16 +c! 13 +c! ; -: ansi_caption[x][y] ( N M -- C-ADDR/U ) str_ansi_caption[x][y] 16 +c! 13 +c! ; +: kernel[x] ( N -- C-ADDR/U ) s" kernel[x]" 7 +c! ; +: menu_init[x] ( N -- C-ADDR/U ) s" menu_init[x]" 10 +c! ; +: menu_command[x] ( N -- C-ADDR/U ) s" menu_command[x]" 13 +c! ; +: menu_caption[x] ( N -- C-ADDR/U ) s" menu_caption[x]" 13 +c! ; +: ansi_caption[x] ( N -- C-ADDR/U ) s" ansi_caption[x]" 13 +c! ; +: menu_keycode[x] ( N -- C-ADDR/U ) s" menu_keycode[x]" 13 +c! ; +: toggled_text[x] ( N -- C-ADDR/U ) s" toggled_text[x]" 13 +c! ; +: toggled_ansi[x] ( N -- C-ADDR/U ) s" toggled_ansi[x]" 13 +c! ; +: menu_caption[x][y] ( N M -- C-ADDR/U ) s" menu_caption[x][y]" 16 +c! 13 +c! ; +: ansi_caption[x][y] ( N M -- C-ADDR/U ) s" ansi_caption[x][y]" 16 +c! 13 +c! ; : arch-i386? ( -- BOOL ) \ Returns TRUE (-1) on i386, FALSE (0) otherwise. s" arch-i386" environment? dup if @@ -355,12 +352,9 @@ create init_text8 255 allot then ( n addr 0 n 48 -- n addr 0 c-addr/u ) getenv dup -1 = if - \ This is highly unlikely to occur, but to make - \ sure that things move along smoothly, allocate - \ a temporary NULL string - - drop ( n addr 0 -1 -- n addr 0 ) \ getenv cruft - s" " ( n addr 0 -- n addr 0 c-addr/u ) + \ Highly unlikely to occur, but to ensure things move + \ along smoothly, allocate a temporary NULL string + drop ( cruft ) s" " then then @@ -418,15 +412,15 @@ create init_text8 255 allot acpipresent? if acpienabled? if loader_color? if - str_toggled_ansi[x] + s" toggled_ansi[x]" else - str_toggled_text[x] + s" toggled_text[x]" then else loader_color? if - str_ansi_caption[x] + s" ansi_caption[x]" else - str_menu_caption[x] + s" menu_caption[x]" then then else @@ -438,17 +432,198 @@ create init_text8 255 allot then ; +\ This function parses $kernels into variables that are used by the menu to +\ display wich kernel to boot when the [overloaded] `boot' word is interpreted. +\ Used internally by menu-create, you need not (nor should you) call this +\ directly. +\ +: parse-kernels ( N -- ) \ kernidx + kernidx ! ( n -- ) \ store provided `x' value + [char] 0 kernmenuidx ! \ initialize `y' value for menu_caption[x][y] + + \ Attempt to get a list of kernels, fall back to sensible default + s" kernels" getenv dup -1 = if + drop ( cruft ) + s" kernel kernel.old" + then ( -- c-addr/u ) + + \ Check to see if the user has altered $kernel by comparing it against + \ $kernel[N] where N is kernel_state (the actively displayed kernel). + s" kernel_state" evaluate @ 48 + s" kernel[N]" 7 +c! getenv + dup -1 <> if + s" kernel" getenv dup -1 = if + drop ( cruft ) s" " + then + 2swap 2over compare 0= if + 2drop FALSE ( skip below conditional ) + else \ User has changed $kernel + TRUE ( slurp in new value ) + then + else \ We haven't yet parsed $kernels into $kernel[N] + drop ( getenv cruft ) + s" kernel" getenv dup -1 = if + drop ( cruft ) s" " + then + TRUE ( slurp in initial value ) + then ( c-addr/u -- c-addr/u c-addr/u,-1 | 0 ) + if \ slurp new value into kerndefault + kerndefault 1+ 0 2swap strcat swap 1- c! + then + + \ Clear out existing parsed-kernels + kernidx @ [char] 0 + begin + dup kernel[x] unsetenv + 2dup menu_caption[x][y] unsetenv + 2dup ansi_caption[x][y] unsetenv + 1+ dup [char] 8 > + until + 2drop + + \ Step through the string until we find the end + begin + 0 kernlen ! \ initialize length of value + + \ Skip leading whitespace and/or comma delimiters + begin + dup 0<> if + over c@ delim? ( c-addr/u -- c-addr/u bool ) + else + false ( c-addr/u -- c-addr/u bool ) + then + while + 1- swap 1+ swap ( c-addr/u -- c-addr'/u' ) + repeat + ( c-addr/u -- c-addr'/u' ) + + dup 0= if \ end of string while eating whitespace + 2drop ( c-addr/u -- ) + kernmenuidx @ [char] 0 <> if \ found at least one + exit \ all done + then + + \ No entries in $kernels; use $kernel instead + s" kernel" getenv dup -1 = if + drop ( cruft ) s" " + then ( -- c-addr/u ) + dup kernlen ! \ store entire value length as kernlen + else + \ We're still within $kernels parsing toward the end; + \ find delimiter/end to determine kernlen + 2dup ( c-addr/u -- c-addr/u c-addr/u ) + begin dup 0<> while + over c@ delim? if + drop 0 ( break ) \ found delimiter + else + kernlen @ 1+ kernlen ! \ incrememnt + 1- swap 1+ swap \ c-addr++ u-- + then + repeat + 2drop ( c-addr/u c-addr'/u' -- c-addr/u ) + + \ If this is the first entry, compare it to $kernel + \ If different, then insert $kernel beforehand + kernmenuidx @ [char] 0 = if + over kernlen @ kerndefault count compare if + kernelsbuf 0 kerndefault count strcat + s" ," strcat 2swap strcat + kerndefault count swap drop kernlen ! + then + then + then + ( c-addr/u -- c-addr'/u' ) + + \ At this point, we should have something on the stack to store + \ as the next kernel menu option; start assembling variables + + over kernlen @ ( c-addr/u -- c-addr/u c-addr/u2 ) + + \ Assign first to kernel[x] + 2dup kernmenuidx @ kernel[x] setenv + + \ Assign second to menu_caption[x][y] + kerncapbuf 0 s" [K]ernel: " strcat + 2over strcat + kernidx @ kernmenuidx @ menu_caption[x][y] + setenv + + \ Assign third to ansi_caption[x][y] + kerncapbuf 0 s" Kernel: " strcat + kernmenuidx @ [char] 0 = if + s" default/" + else + s" " + then strcat + 2over strcat + s" " strcat + kernidx @ kernmenuidx @ ansi_caption[x][y] + setenv + + 2drop ( c-addr/u c-addr/u2 -- c-addr/u ) + + kernmenuidx @ 1+ dup kernmenuidx ! [char] 8 > if + 2drop ( c-addr/u -- ) exit + then + + kernlen @ - swap kernlen @ + swap ( c-addr/u -- c-addr'/u' ) + again +; + +\ This function goes through the kernels that were discovered by the +\ parse-kernels function [above], adding " (# of #)" text to the end of each +\ caption. +\ +: tag-kernels ( -- ) + kernidx @ ( -- x ) dup 0= if exit then + [char] 0 s" (Y of Z)" ( x -- x y c-addr/u ) + kernmenuidx @ -rot 7 +c! \ Replace 'Z' with number of kernels parsed + begin + 2 pick 1+ -rot 2 +c! \ Replace 'Y' with current ASCII num + + 2over menu_caption[x][y] getenv dup -1 <> if + 2dup + 1- c@ [char] ) = if + 2drop \ Already tagged + else + kerncapbuf 0 2swap strcat + 2over strcat + 5 pick 5 pick menu_caption[x][y] setenv + then + else + drop ( getenv cruft ) + then + + 2over ansi_caption[x][y] getenv dup -1 <> if + 2dup + 1- c@ [char] ) = if + 2drop \ Already tagged + else + kerncapbuf 0 2swap strcat + 2over strcat + 5 pick 5 pick ansi_caption[x][y] setenv + then + else + drop ( getenv cruft ) + then + + rot 1+ dup [char] 8 > if + -rot 2drop TRUE ( break ) + else + -rot FALSE + then + until + 2drop ( x y -- ) +; + \ This function creates the list of menu items. This function is called by the \ menu-display function. You need not be call it directly. \ : menu-create ( -- ) \ Print the frame caption at (x,y) - str_loader_menu_title getenv dup -1 = if + s" loader_menu_title" getenv dup -1 = if drop s" Welcome to FreeBSD" then TRUE ( use default alignment ) - str_loader_menu_title_align getenv dup -1 <> if + s" loader_menu_title_align" getenv dup -1 <> if 2dup s" left" compare-insensitive 0= if ( 1 ) 2drop ( c-addr/u ) drop ( bool ) menuX @ menuY @ 1- @@ -470,7 +645,7 @@ create init_text8 255 allot \ constructed dynamically -- as this function could conceivably set \ the remaining environment variables to construct the menu entirely). \ - str_menu_init getenv dup -1 <> if + s" menu_init" getenv dup -1 <> if evaluate else drop @@ -495,7 +670,7 @@ create init_text8 255 allot \ Initialize the ACPI option status. \ 0 menuacpi ! - str_menu_acpi getenv -1 <> if + s" menu_acpi" getenv -1 <> if c@ dup 48 > over 57 < and if ( '1' <= c1 <= '8' ) menuacpi ! arch-i386? if acpipresent? if @@ -511,10 +686,51 @@ create init_text8 255 allot then \ + \ Initialize kernel captions after parsing $kernels + \ + 0 menukernel ! + s" menu_kernel" getenv -1 <> if + c@ dup 48 > over 57 < and if ( '1' <= c1 <= '8' ) + dup menukernel ! + dup parse-kernels tag-kernels + + \ Get the current cycle state (entry to use) + s" kernel_state" evaluate @ 48 + ( n -- n y ) + + \ If state is invalid, reset + dup kernmenuidx @ 1- > if + drop [char] 0 ( n y -- n 48 ) + 0 s" kernel_state" evaluate ! + over s" init_kernel" evaluate drop + then + + \ Set the current non-ANSI caption + 2dup swap dup ( n y -- n y y n n ) + s" set menu_caption[x]=$menu_caption[x][y]" + 17 +c! 34 +c! 37 +c! evaluate + ( n y y n n c-addr/u -- n y ) + + \ Set the current ANSI caption + 2dup swap dup ( n y -- n y y n n ) + s" set ansi_caption[x]=$ansi_caption[x][y]" + 17 +c! 34 +c! 37 +c! evaluate + ( n y y n n c-addr/u -- n y ) + + \ Initialize cycle state from stored value + 48 - ( n y -- n k ) + s" init_cyclestate" evaluate ( n k -- n ) + + \ Set $kernel to $kernel[y] + s" activate_kernel" evaluate ( n -- n ) + then + drop + then + + \ \ Initialize the menu_options visual separator. \ 0 menuoptions ! - str_menu_options getenv -1 <> if + s" menu_options" getenv -1 <> if c@ dup 48 > over 57 < and if ( '1' <= c1 <= '8' ) menuoptions ! else @@ -534,7 +750,7 @@ create init_text8 255 allot \ If the "Options:" separator, print it. dup menuoptions @ = if \ Optionally add a reboot option to the menu - str_menu_reboot getenv -1 <> if + s" menu_reboot" getenv -1 <> if drop s" Reboot" printmenuitem menureboot ! true menurebootadded ! @@ -544,7 +760,7 @@ create init_text8 255 allot menurow @ 2 + menurow ! menurow @ menuY @ + at-xy - str_menu_optionstext getenv dup -1 <> if + s" menu_optionstext" getenv dup -1 <> if type else drop ." Options:" @@ -603,7 +819,7 @@ create init_text8 255 allot \ Optionally add a reboot option to the menu menurebootadded @ true <> if - str_menu_reboot getenv -1 <> if + s" menu_reboot" getenv -1 <> if drop \ no need for the value s" Reboot" \ menu caption (required by printmenuitem) @@ -684,7 +900,7 @@ create init_text8 255 allot \ (user did not cancel by pressing ANY \ key) - str_menu_timeout_command getenv dup + s" menu_timeout_command" getenv dup -1 = if drop \ clean-up else @@ -758,7 +974,7 @@ create init_text8 255 allot 0 menurow ! \ Initialize the starting position for the menu \ Assign configuration values - str_loader_menu_y getenv dup -1 = if + s" loader_menu_y" getenv dup -1 = if drop \ no custom row position menu_default_y else @@ -768,7 +984,7 @@ create init_text8 255 allot then then menuY ! - str_loader_menu_x getenv dup -1 = if + s" loader_menu_x" getenv dup -1 = if drop \ no custom column position menu_default_x else @@ -781,7 +997,7 @@ create init_text8 255 allot \ Interpret a custom frame type for the menu TRUE ( draw a box? default yes, but might be altered below ) - str_loader_menu_frame getenv dup -1 = if ( 1 ) + s" loader_menu_frame" getenv dup -1 = if ( 1 ) drop \ no custom frame type else ( 1 ) 2dup s" single" compare-insensitive 0= if ( 2 ) f_single ( see frames.4th ) @@ -804,7 +1020,7 @@ create init_text8 255 allot 0 menu_timeout_enabled ! \ start with automatic timeout disabled \ check indication that automatic execution after delay is requested - str_menu_timeout_command getenv -1 <> if ( Addr C -1 -- | Addr ) + s" menu_timeout_command" getenv -1 <> if ( Addr C -1 -- | Addr ) drop ( just testing existence right now: Addr -- ) \ initialize state variables @@ -840,7 +1056,7 @@ create init_text8 255 allot menu_timeout_enabled @ 1 = if \ read custom column position (if set) - str_loader_menu_timeout_x getenv dup -1 = if + s" loader_menu_timeout_x" getenv dup -1 = if drop \ no custom column position menu_timeout_default_x \ use default setting else @@ -852,7 +1068,7 @@ create init_text8 255 allot menu_timeout_x ! ( store value on stack from above ) \ read custom row position (if set) - str_loader_menu_timeout_y getenv dup -1 = if + s" loader_menu_timeout_y" getenv dup -1 = if drop \ no custom row position menu_timeout_default_y \ use default setting else @@ -1005,12 +1221,13 @@ create init_text8 255 allot until drop \ iterator - str_menu_timeout_command unsetenv \ menu timeout command - str_menu_reboot unsetenv \ Reboot menu option flag - str_menu_acpi unsetenv \ ACPI menu option flag - str_menu_options unsetenv \ Options separator flag - str_menu_optionstext unsetenv \ separator display text - str_menu_init unsetenv \ menu initializer + s" menu_timeout_command" unsetenv \ menu timeout command + s" menu_reboot" unsetenv \ Reboot menu option flag + s" menu_acpi" unsetenv \ ACPI menu option flag + s" menu_kernel" unsetenv \ Kernel menu option flag + s" menu_options" unsetenv \ Options separator flag + s" menu_optionstext" unsetenv \ separator display text + s" menu_init" unsetenv \ menu initializer 0 menureboot ! 0 menuacpi ! Modified: stable/9/sys/boot/forth/menu.rc ============================================================================== --- stable/9/sys/boot/forth/menu.rc Tue Mar 25 02:32:04 2014 (r263700) +++ stable/9/sys/boot/forth/menu.rc Tue Mar 25 03:19:03 2014 (r263701) @@ -55,10 +55,14 @@ set mainmenu_reboot \ set mainmenu_options=5 -set mainmenu_caption[5]="Configure Boot [O]ptions..." -set mainmenu_command[5]="2 goto_menu" -set mainmenu_keycode[5]=111 -set mainansi_caption[5]="Configure Boot Options..." +set mainmenu_kernel=5 +set mainmenu_command[5]="cycle_kernel" +set mainmenu_keycode[5]=107 + +set mainmenu_caption[6]="Configure Boot [O]ptions..." +set mainmenu_command[6]="2 goto_menu" +set mainmenu_keycode[6]=111 +set mainansi_caption[6]="Configure Boot Options..." \ \ BOOT OPTIONS MENU Modified: stable/9/sys/boot/forth/menusets.4th ============================================================================== --- stable/9/sys/boot/forth/menusets.4th Tue Mar 25 02:32:04 2014 (r263700) +++ stable/9/sys/boot/forth/menusets.4th Tue Mar 25 03:19:03 2014 (r263701) @@ -366,6 +366,7 @@ create menuset_y 1 allot \ menuset1_command[x] -> menu_command[x] \ menuset1_init -> ``evaluated'' \ menuset1_init[x] -> menu_init[x] + \ menuset1_kernel -> menu_kernel \ menuset1_keycode[x] -> menu_keycode[x] \ menuset1_options -> menu_options \ menuset1_optionstext -> menu_optionstext @@ -382,6 +383,7 @@ create menuset_y 1 allot \ {name}menu_command[x] -> menu_command[x] \ {name}menu_init -> ``evaluated'' \ {name}menu_init[x] -> menu_init[x] + \ {name}menu_kernel -> menu_kernel \ {name}menu_keycode[x] -> menu_keycode[x] \ {name}menu_options -> menu_options \ {name}menu_optionstext -> menu_optionstext @@ -520,6 +522,10 @@ create menuset_y 1 allot s" set var=acpi" evaluate menuset-loadmenuvar + \ ... menu_kernel ... + s" set var=kernel" evaluate + menuset-loadmenuvar + \ ... menu_options ... s" set var=options" evaluate menuset-loadmenuvar @@ -597,6 +603,7 @@ create menuset_y 1 allot s" set var=acpi" evaluate menuset-unloadmenuvar s" set var=init" evaluate menuset-unloadmenuvar + s" set var=kernel" evaluate menuset-unloadmenuvar s" set var=options" evaluate menuset-unloadmenuvar s" set var=optionstext" evaluate menuset-unloadmenuvar s" set var=reboot" evaluate menuset-unloadmenuvar Modified: stable/9/sys/boot/i386/loader/loader.rc ============================================================================== --- stable/9/sys/boot/i386/loader/loader.rc Tue Mar 25 02:32:04 2014 (r263700) +++ stable/9/sys/boot/i386/loader/loader.rc Tue Mar 25 03:19:03 2014 (r263701) @@ -5,7 +5,7 @@ include /boot/loader.4th \ Reads and processes loader.conf variables -start +initialize \ Tests for password -- executes autoboot first if a password was defined check-password From owner-svn-src-stable@FreeBSD.ORG Tue Mar 25 03:23:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B594500; Tue, 25 Mar 2014 03:23:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0D115E4A; Tue, 25 Mar 2014 03:23:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2P3N66k053832; Tue, 25 Mar 2014 03:23:06 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2P3N6x4053828; Tue, 25 Mar 2014 03:23:06 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201403250323.s2P3N6x4053828@svn.freebsd.org> From: Devin Teske Date: Tue, 25 Mar 2014 03:23:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263702 - stable/9/sys/boot/forth X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 03:23:07 -0000 Author: dteske Date: Tue Mar 25 03:23:06 2014 New Revision: 263702 URL: http://svnweb.freebsd.org/changeset/base/263702 Log: MFC r257821: Extend loader_delay as-documented in beastie.4th(8) and delay.4th(8), making it available to architectures that do not use or load the beastie menu. This is reported to save headaches on some PPC systems where unload followed by load does not produce the desired results wherein if-given the opportunity to abort the initial loading sequence, you can customize the first load. Reviewed by: nwhitehorn, kan Discussed on: -current Modified: stable/9/sys/boot/forth/beastie.4th stable/9/sys/boot/forth/loader.4th stable/9/sys/boot/forth/loader.conf Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/forth/ (props changed) Modified: stable/9/sys/boot/forth/beastie.4th ============================================================================== --- stable/9/sys/boot/forth/beastie.4th Tue Mar 25 03:19:03 2014 (r263701) +++ stable/9/sys/boot/forth/beastie.4th Tue Mar 25 03:23:06 2014 (r263702) @@ -28,8 +28,6 @@ marker task-beastie.4th -include /boot/delay.4th - only forth definitions also support-functions variable logoX Modified: stable/9/sys/boot/forth/loader.4th ============================================================================== --- stable/9/sys/boot/forth/loader.4th Tue Mar 25 03:19:03 2014 (r263701) +++ stable/9/sys/boot/forth/loader.4th Tue Mar 25 03:23:06 2014 (r263702) @@ -41,6 +41,7 @@ s" arch-i386" environment? [if] [if] include /boot/support.4th include /boot/color.4th +include /boot/delay.4th only forth also support-functions also builtins definitions @@ -141,8 +142,17 @@ include /boot/check-password.4th \ Will *NOT* try to load kernel and modules if no configuration file \ was succesfully loaded! any_conf_read? if - load_kernel - load_modules + s" loader_delay" getenv -1 = if + load_kernel + load_modules + else + drop + ." Loading Kernel and Modules (Ctrl-C to Abort)" cr + s" also support-functions" evaluate + s" set delay_command='load_kernel load_modules'" evaluate + s" set delay_showdots" evaluate + delay_execute + then then ; Modified: stable/9/sys/boot/forth/loader.conf ============================================================================== --- stable/9/sys/boot/forth/loader.conf Tue Mar 25 03:19:03 2014 (r263701) +++ stable/9/sys/boot/forth/loader.conf Tue Mar 25 03:23:06 2014 (r263702) @@ -42,6 +42,8 @@ bitmap_type="splash_image_data" # and pl ### Loader settings ######################################## ############################################################## +#loader_delay="3" # Delay in seconds before loading anything. + # Default is unset and disabled (no delay). #autoboot_delay="10" # Delay in seconds before autobooting, # set to -1 if you don't want user to be # allowed to interrupt autoboot process and From owner-svn-src-stable@FreeBSD.ORG Tue Mar 25 03:25:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 51495658; Tue, 25 Mar 2014 03:25:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2525EE5D; Tue, 25 Mar 2014 03:25:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2P3PVIt054164; Tue, 25 Mar 2014 03:25:31 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2P3PUqN054163; Tue, 25 Mar 2014 03:25:30 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201403250325.s2P3PUqN054163@svn.freebsd.org> From: Devin Teske Date: Tue, 25 Mar 2014 03:25:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263703 - stable/9/sys/boot/forth X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 03:25:31 -0000 Author: dteske Date: Tue Mar 25 03:25:30 2014 New Revision: 263703 URL: http://svnweb.freebsd.org/changeset/base/263703 Log: MFC r258269: Refactor draw-beastie function. Discussed on: -hackers Modified: stable/9/sys/boot/forth/beastie.4th Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/forth/ (props changed) Modified: stable/9/sys/boot/forth/beastie.4th ============================================================================== --- stable/9/sys/boot/forth/beastie.4th Tue Mar 25 03:23:06 2014 (r263702) +++ stable/9/sys/boot/forth/beastie.4th Tue Mar 25 03:25:30 2014 (r263703) @@ -272,56 +272,26 @@ variable logoY drop then - s" loader_logo" getenv dup -1 = if - logoX @ logoY @ - loader_color? if - orb-logo - else - orbbw-logo - then - drop exit - then - - 2dup s" beastie" compare-insensitive 0= if - logoX @ logoY @ beastie-logo - 2drop exit - then - 2dup s" beastiebw" compare-insensitive 0= if - logoX @ logoY @ beastiebw-logo - 2drop exit - then - 2dup s" fbsdbw" compare-insensitive 0= if - logoX @ logoY @ fbsdbw-logo - 2drop exit - then - 2dup s" orb" compare-insensitive 0= if - logoX @ logoY @ orb-logo - 2drop exit - then - 2dup s" orbbw" compare-insensitive 0= if - logoX @ logoY @ orbbw-logo - 2drop exit - then - 2dup s" tribute" compare-insensitive 0= if - logoX @ logoY @ - s" tribute-logo" sfind if - execute - else - drop orb-logo - then - 2drop exit + s" loader_logo" getenv dup -1 <> if + dup 5 + allocate if ENOMEM throw then + 0 2swap strcat s" -logo" strcat + over -rot ( a-addr/u -- a-addr a-addr/u ) + sfind ( a-addr a-addr/u -- a-addr xt bool ) + rot ( a-addr xt bool -- xt bool a-addr ) + free ( xt bool a-addr -- xt bool ior ) + if EFREE throw then + else + 0 ( cruft -- cruft bool ) \ load the default below then - 2dup s" tributebw" compare-insensitive 0= if - logoX @ logoY @ - s" tributebw-logo" sfind if - execute + 0= if + drop ( cruft -- ) + loader_color? if + ['] orb-logo else - drop orbbw-logo + ['] orbbw-logo then - 2drop exit then - - 2drop + logoX @ logoY @ rot execute ; : clear-beastie ( -- ) \ clears beastie from the screen From owner-svn-src-stable@FreeBSD.ORG Tue Mar 25 03:30:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ABC828FE; Tue, 25 Mar 2014 03:30:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 98162E7F; Tue, 25 Mar 2014 03:30:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2P3UjEV057392; Tue, 25 Mar 2014 03:30:45 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2P3Uicl057386; Tue, 25 Mar 2014 03:30:44 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201403250330.s2P3Uicl057386@svn.freebsd.org> From: Devin Teske Date: Tue, 25 Mar 2014 03:30:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263705 - in stable/9/sys/boot: forth i386/loader X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 03:30:45 -0000 Author: dteske Date: Tue Mar 25 03:30:44 2014 New Revision: 263705 URL: http://svnweb.freebsd.org/changeset/base/263705 Log: MFC r258270: Add a try-include word (which acts the same as "include") and use it to conditionally include (but ignore failures) /boot/loader.rc.local and /boot/menu.rc.local -- to make customizing the menu easier. Reviewed by: alfred Discussed on: -hackers Modified: stable/9/sys/boot/forth/loader.4th stable/9/sys/boot/forth/loader.4th.8 stable/9/sys/boot/forth/loader.rc stable/9/sys/boot/forth/menu.rc stable/9/sys/boot/i386/loader/loader.rc Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/forth/ (props changed) Modified: stable/9/sys/boot/forth/loader.4th ============================================================================== --- stable/9/sys/boot/forth/loader.4th Tue Mar 25 03:28:58 2014 (r263704) +++ stable/9/sys/boot/forth/loader.4th Tue Mar 25 03:30:44 2014 (r263705) @@ -233,7 +233,16 @@ include /boot/check-password.4th s" disable-module" s" disable loading of a module" .? s" toggle-module" s" toggle loading of a module" .? s" show-module" s" show module load data" .? + s" try-include" s" try to load/interpret files" .? ; +: try-include ( -- ) \ see loader.4th(8) + ['] include ( -- xt ) \ get the execution token of `include' + catch ( xt -- exception# | 0 ) if \ failed + LF parse ( c -- s-addr/u ) 2drop \ advance >in to EOL (drop data) + \ ... prevents words unused by `include' from being interpreted + then +; immediate \ interpret immediately for access to `source' (aka tib) + only forth also Modified: stable/9/sys/boot/forth/loader.4th.8 ============================================================================== --- stable/9/sys/boot/forth/loader.4th.8 Tue Mar 25 03:28:58 2014 (r263704) +++ stable/9/sys/boot/forth/loader.4th.8 Tue Mar 25 03:30:44 2014 (r263705) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 17, 2013 +.Dd November 13, 2013 .Dt LOADER.4TH 8 .Os .Sh NAME @@ -158,6 +158,13 @@ files to specify the action after a modu Used inside .Xr loader.conf 5 files to specify the action after a module loading fails. +.It Ic try-include Ar file Op Ar +Process script files if they exist. +Each file, in turn, is completely read into memory, +and then each of its lines is passed to the command line interpreter. +If any error is returned by the interpreter, the try-include +command aborts immediately, without reading any other files, and +silently returns without error. .El .Sh FILES .Bl -tag -width /boot/loader.4th -compact Modified: stable/9/sys/boot/forth/loader.rc ============================================================================== --- stable/9/sys/boot/forth/loader.rc Tue Mar 25 03:28:58 2014 (r263704) +++ stable/9/sys/boot/forth/loader.rc Tue Mar 25 03:30:44 2014 (r263705) @@ -3,6 +3,7 @@ \ \ Includes additional commands include /boot/loader.4th +try-include /boot/loader.rc.local \ Reads and processes loader.conf variables \ NOTE: Change to `initialize' if you enable the below boot menu Modified: stable/9/sys/boot/forth/menu.rc ============================================================================== --- stable/9/sys/boot/forth/menu.rc Tue Mar 25 03:28:58 2014 (r263704) +++ stable/9/sys/boot/forth/menu.rc Tue Mar 25 03:30:44 2014 (r263705) @@ -120,6 +120,10 @@ set optionstoggled_ansi[6]="Ver \ set menu_timeout_command="boot" +\ Include optional elements defined in a local file +\ +try-include /boot/menu.rc.local + \ Display the main menu (see `menu.4th') set menuset_initial=1 menuset-loadinitial Modified: stable/9/sys/boot/i386/loader/loader.rc ============================================================================== --- stable/9/sys/boot/i386/loader/loader.rc Tue Mar 25 03:28:58 2014 (r263704) +++ stable/9/sys/boot/i386/loader/loader.rc Tue Mar 25 03:30:44 2014 (r263705) @@ -3,6 +3,7 @@ \ \ Includes additional commands include /boot/loader.4th +try-include /boot/loader.rc.local \ Reads and processes loader.conf variables initialize From owner-svn-src-stable@FreeBSD.ORG Tue Mar 25 04:29:58 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A96F0F55; Tue, 25 Mar 2014 04:29:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7BEE632F; Tue, 25 Mar 2014 04:29:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2P4TwL3079230; Tue, 25 Mar 2014 04:29:58 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2P4Twgb079229; Tue, 25 Mar 2014 04:29:58 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201403250429.s2P4Twgb079229@svn.freebsd.org> From: Devin Teske Date: Tue, 25 Mar 2014 04:29:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263707 - in stable/9: . usr.sbin usr.sbin/sysrc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 04:29:58 -0000 Author: dteske Date: Tue Mar 25 04:29:57 2014 New Revision: 263707 URL: http://svnweb.freebsd.org/changeset/base/263707 Log: Merge missing mergeinfo. Modified: Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/sysrc/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Tue Mar 25 04:40:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79A98222; Tue, 25 Mar 2014 04:40:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 66356651; Tue, 25 Mar 2014 04:40:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2P4egtX083715; Tue, 25 Mar 2014 04:40:42 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2P4egHT083713; Tue, 25 Mar 2014 04:40:42 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201403250440.s2P4egHT083713@svn.freebsd.org> From: Devin Teske Date: Tue, 25 Mar 2014 04:40:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263708 - stable/9/usr.sbin/sysrc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 04:40:42 -0000 Author: dteske Date: Tue Mar 25 04:40:41 2014 New Revision: 263708 URL: http://svnweb.freebsd.org/changeset/base/263708 Log: MFC r257824,257826-257830,258411: Updates to sysrc(8) 257824: Fix a bug with `-d' form working as documented 257826: Add `--version' long option 257827: Add a `-c' option for `check only' 257828: Comments and whitespace 257829: Fix a bug with `-e' introduced by above 257828 257830: Document SYSRC_VERBOSE enviroment variable in the manual 258411: Revert the above 257830 (both merged to get .Dd bump in man-page) Modified: stable/9/usr.sbin/sysrc/sysrc stable/9/usr.sbin/sysrc/sysrc.8 Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/sysrc/ (props changed) Modified: stable/9/usr.sbin/sysrc/sysrc ============================================================================== --- stable/9/usr.sbin/sysrc/sysrc Tue Mar 25 04:29:57 2014 (r263707) +++ stable/9/usr.sbin/sysrc/sysrc Tue Mar 25 04:40:41 2014 (r263708) @@ -28,6 +28,9 @@ # ############################################################ INCLUDES +# Prevent `-d' from being interpreted as a debug flag by common.subr +DEBUG_SELF_INITIALIZE= + BSDCFG_SHARE="/usr/share/bsdconfig" [ "$_COMMON_SUBR" ] || . $BSDCFG_SHARE/common.subr || exit 1 [ "$_SYSRC_SUBR" ] || f_include $BSDCFG_SHARE/sysrc.subr @@ -35,8 +38,14 @@ BSDCFG_SHARE="/usr/share/bsdconfig" ############################################################ GLOBALS # +# Version information +# +SYSRC_VERSION="6.0 Nov-07,2013" + +# # Options # +CHECK_ONLY= DELETE= DESCRIBE= IGNORE_UNKNOWNS= @@ -92,6 +101,8 @@ help() "Dump a list of all non-default configuration variables." f_err "$optfmt" "-A" \ "Dump a list of all configuration variables (incl. defaults)." + f_err "$optfmt" "-c" \ + "Check. Return success if no changes needed, else error." f_err "$optfmt" "-d" \ "Print a description of the given variable." f_err "$optfmt" "-D" \ @@ -130,6 +141,8 @@ help() "Verbose. Print the pathname of the specific rc.conf(5)" f_err "$optfmt" "" \ "file where the directive was found." + f_err "$optfmt" "--version" \ + "Print version information to stdout and exit." f_err "$optfmt" "-x" \ "Remove variable(s) from specified file(s)." f_err "\n" @@ -179,6 +192,7 @@ jail_depend() # # Print include dependencies # + echo DEBUG_SELF_INITIALIZE= cat $BSDCFG_SHARE/common.subr cat $BSDCFG_SHARE/sysrc.subr } @@ -191,27 +205,31 @@ jail_depend() [ $# -gt 0 ] || usage # -# Check for `--help' command-line option +# Check for `--help' and `--version' command-line option # ( # Operate in sub-shell to protect $@ in parent while [ $# -gt 0 ]; do case "$1" in - --help) exit 1;; + --help) help ;; + --version) # see GLOBALS + echo "$SYSRC_VERSION" + exit 1 ;; -[fRj]) # These flags take an argument - shift 1;; + shift 1 ;; esac shift 1 done exit 0 -) || help +) || die # # Process command-line flags # -while getopts aAdDef:Fhij:nNqR:vxX flag; do +while getopts aAcdDef:Fhij:nNqR:vxX flag; do case "$flag" in a) SHOW_ALL=${SHOW_ALL:-1};; A) SHOW_ALL=2;; + c) CHECK_ONLY=1;; d) DESCRIBE=1;; D) RC_CONFS=;; e) SHOW_EQUALS=1;; @@ -273,16 +291,23 @@ if [ "$DELETE" -a "$SHOW_ALL" ]; then fi # +# Pre-flight for `-c' command-line option +# +[ "$CHECK_ONLY" -a "$SHOW_ALL" ] && + die "$pgm: \`-c' option incompatible with \`-a'/\`-A' options" + +# # Process `-e', `-n', and `-N' command-line options # SEP=': ' -[ "$SHOW_EQUALS" ] && SEP='="' +[ "$SHOW_FILE" ] && SHOW_EQUALS= [ "$SHOW_NAME" ] || SHOW_EQUALS= [ "$SYSRC_VERBOSE" = "0" ] && SYSRC_VERBOSE= if [ ! "$SHOW_VALUE" ]; then SHOW_NAME=1 SHOW_EQUALS= fi +[ "$SHOW_EQUALS" ] && SEP='="' # # Process `-j jail' and `-R dir' command-line options @@ -298,6 +323,7 @@ if [ "$JAIL" -o "$ROOTDIR" ]; then $( [ "$DELETE" = "2" ] && echo \ -X ) $( [ "$SHOW_ALL" = "1" ] && echo \ -a ) $( [ "$SHOW_ALL" = "2" ] && echo \ -A ) + ${CHECK_ONLY:+-c} ${DESCRIBE:+-d} ${SHOW_EQUALS:+-e} ${IGNORE_UNKNOWNS:+-i} @@ -408,7 +434,7 @@ if [ "$SHOW_ALL" ]; then EXCEPT="IFS|EXCEPT|PATH|RC_DEFAULTS|OPTIND|DESCRIBE|SEP" EXCEPT="$EXCEPT|DELETE|SHOW_ALL|SHOW_EQUALS|SHOW_NAME" EXCEPT="$EXCEPT|SHOW_VALUE|SHOW_FILE|SYSRC_VERBOSE|RC_CONFS" - EXCEPT="$EXCEPT|pgm|SUCCESS|FAILURE" + EXCEPT="$EXCEPT|pgm|SUCCESS|FAILURE|CHECK_ONLY" EXCEPT="$EXCEPT|f_sysrc_desc_awk|f_sysrc_delete_awk" # @@ -501,6 +527,7 @@ fi # # Process command-line arguments # +costatus=$SUCCESS while [ $# -gt 0 ]; do NAME="${1%%=*}" @@ -511,14 +538,19 @@ while [ $# -gt 0 ]; do *=*) # # Like sysctl(8), if both `-d' AND "name=value" is passed, - # first describe, then attempt to set + # first describe (done above), then attempt to set # - if [ "$SYSRC_VERBOSE" ]; then + # If verbose, prefix line with where the directive lives + if [ "$SYSRC_VERBOSE" -a ! "$CHECK_ONLY" ]; then file=$( f_sysrc_find "$NAME" ) [ "$file" = "$RC_DEFAULTS" -o ! "$file" ] && \ file=$( f_sysrc_get 'rc_conf_files%%[$IFS]*' ) - echo -n "$file: " + if [ "$SHOW_EQUALS" ]; then + echo -n ": $file; " + else + echo -n "$file: " + fi fi # @@ -532,6 +564,20 @@ while [ $# -gt 0 ]; do fi # + # If `-c' is passed, simply compare and move on + # + if [ "$CHECK_ONLY" ]; then + if ! IGNORED=$( f_sysrc_get "$NAME?" ); then + costatus=$FAILURE + else + value=$( f_sysrc_get "$NAME" ) + [ "$value" = "${1#*=}" ] || costatus=$FAILURE + fi + shift 1 + continue + fi + + # # If `-N' is passed, simplify the output # if [ ! "$SHOW_VALUE" ]; then @@ -546,28 +592,34 @@ while [ $# -gt 0 ]; do if f_sysrc_set "$NAME" "${1#*=}"; then if [ "$SHOW_FILE" ]; then after=$( f_sysrc_find "$NAME" ) - echo -n "${SHOW_NAME:+$NAME$SEP}" - echo -n "$before${SHOW_EQUALS:+\"}" - echo " -> $after" else after=$( f_sysrc_get "$NAME" ) - echo -n "${SHOW_NAME:+$NAME$SEP}" - echo "$before -> $after" fi + echo -n "${SHOW_NAME:+$NAME$SEP}" + echo -n "$before${SHOW_EQUALS:+\" #}" + echo -n " -> ${SHOW_EQUALS:+\"}$after" + echo "${SHOW_EQUALS:+\"}" fi fi ;; *) - if ! IGNORED="$( f_sysrc_get "$NAME?" )"; then - [ "$IGNORE_UNKNOWNS" ] \ - || echo "$pgm: unknown variable '$NAME'" + if ! IGNORED=$( f_sysrc_get "$NAME?" ); then + [ "$IGNORE_UNKNOWNS" ] || + echo "$pgm: unknown variable '$NAME'" + shift 1 + costatus=$FAILURE + continue + fi + + # The above check told us what we needed for `-c' + if [ "$CHECK_ONLY" ]; then shift 1 continue fi # - # Like sysctl(8), when `-d' is passed, - # desribe it rather than expanding it + # Like sysctl(8), when `-d' is passed, desribe it + # (already done above) rather than expanding it # if [ "$DESCRIBE" ]; then @@ -594,8 +646,13 @@ while [ $# -gt 0 ]; do continue fi - [ "$SYSRC_VERBOSE" ] && \ - echo -n "$( f_sysrc_find "$NAME" ): " + if [ "$SYSRC_VERBOSE" ]; then + if [ "$SHOW_EQUALS" ]; then + echo -n ": $( f_sysrc_find "$NAME" ); " + else + echo -n "$( f_sysrc_find "$NAME" ): " + fi + fi # # If `-N' is passed, simplify the output @@ -609,3 +666,9 @@ while [ $# -gt 0 ]; do esac shift 1 done + +[ ! "$CHECK_ONLY" ] || exit $costatus + +################################################################################ +# END +################################################################################ Modified: stable/9/usr.sbin/sysrc/sysrc.8 ============================================================================== --- stable/9/usr.sbin/sysrc/sysrc.8 Tue Mar 25 04:29:57 2014 (r263707) +++ stable/9/usr.sbin/sysrc/sysrc.8 Tue Mar 25 04:40:41 2014 (r263708) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Jul 5, 2013 +.Dd Nov 20, 2013 .Dt SYSRC 8 .Os .Sh NAME @@ -32,13 +32,13 @@ .Nd safely edit system rc files .Sh SYNOPSIS .Nm -.Op Fl dDeFhinNqvx +.Op Fl cdDeFhinNqvx .Op Fl f Ar file .Op Fl j Ar jail | Fl R Ar dir .Ar name Ns Op = Ns Ar value .Ar ... .Nm -.Op Fl dDeFhinNqvx +.Op Fl cdDeFhinNqvx .Op Fl f Ar file .Op Fl j Ar jail | Fl R Ar dir .Fl a | A @@ -57,6 +57,12 @@ Dump a list of all non-default configura .It Fl A Dump a list of all configuration variables .Pq incl. defaults . +.It Fl c +Check if the value will change when assigning a new value. +If verbose +.Pq see Dq Fl v +prints a message stating whether a change would occur. +Exits with success if no change is necessary, else returns error status. .It Fl d Print a description of the given variable. .It Fl D @@ -64,10 +70,13 @@ Show default value(s) only (this is the passing `-f' with a NULL file-argument). .It Fl e Print query results as -.Ql var=value -.Pq useful for producing output to be fed back in . -Ignored if -.Fl n +.Xr sh 1 +compatible syntax +.Pq for example, Ql var=value . +Ignored if either +.Ql Fl n +or +.Ql Fl F is specified. .It Fl f Ar file Operate on the specified file(s) instead of the files obtained by reading the @@ -112,6 +121,8 @@ Verbose. Print the pathname of the specific .Xr rc.conf 5 file where the directive was found. +.It Fl -version +Print version information to stdout and exit. .It Fl x Remove variable(s) from specified file(s). .El From owner-svn-src-stable@FreeBSD.ORG Tue Mar 25 11:41:10 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE4DCDB4; Tue, 25 Mar 2014 11:41:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 80D65E36; Tue, 25 Mar 2014 11:41:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2PBfAxi059047; Tue, 25 Mar 2014 11:41:10 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2PBfA2I059046; Tue, 25 Mar 2014 11:41:10 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201403251141.s2PBfA2I059046@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 25 Mar 2014 11:41:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263713 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 11:41:10 -0000 Author: trasz Date: Tue Mar 25 11:41:10 2014 New Revision: 263713 URL: http://svnweb.freebsd.org/changeset/base/263713 Log: MFC r261765: Improve error reporting. Sponsored by: The FreeBSD Foundation 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.c Tue Mar 25 11:05:34 2014 (r263712) +++ stable/10/usr.sbin/ctld/kernel.c Tue Mar 25 11:41:10 2014 (r263713) @@ -678,8 +678,15 @@ kernel_listen(struct addrinfo *ai, bool req.data.listen.addr = ai->ai_addr; req.data.listen.addrlen = ai->ai_addrlen; - if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) - log_warn("error issuing CTL_ISCSI_LISTEN ioctl"); + if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) { + log_err(1, "error issuing CTL_ISCSI ioctl"); + return; + } + + if (req.status != CTL_ISCSI_OK) { + log_errx(1, "error returned from CTL iSCSI listen: %s", + req.error_str); + } } int @@ -692,7 +699,13 @@ kernel_accept(void) req.type = CTL_ISCSI_ACCEPT; if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) { - log_warn("error issuing CTL_ISCSI_LISTEN ioctl"); + log_warn("error issuing CTL_ISCSI ioctl"); + return (0); + } + + if (req.status != CTL_ISCSI_OK) { + log_warnx("error returned from CTL iSCSI accept: %s", + req.error_str); return (0); } @@ -712,13 +725,15 @@ kernel_send(struct pdu *pdu) req.data.send.data_segment_len = pdu->pdu_data_len; req.data.send.data_segment = pdu->pdu_data; - if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) + if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) { log_err(1, "error issuing CTL_ISCSI ioctl; " "dropping connection"); + } - if (req.status != CTL_ISCSI_OK) + if (req.status != CTL_ISCSI_OK) { log_errx(1, "error returned from CTL iSCSI send: " "%s; dropping connection", req.error_str); + } } void @@ -738,13 +753,15 @@ kernel_receive(struct pdu *pdu) req.data.receive.data_segment_len = MAX_DATA_SEGMENT_LENGTH; req.data.receive.data_segment = pdu->pdu_data; - if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) + if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) { log_err(1, "error issuing CTL_ISCSI ioctl; " "dropping connection"); + } - if (req.status != CTL_ISCSI_OK) + if (req.status != CTL_ISCSI_OK) { log_errx(1, "error returned from CTL iSCSI receive: " "%s; dropping connection", req.error_str); + } } From owner-svn-src-stable@FreeBSD.ORG Tue Mar 25 11:43:10 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 564CF158; Tue, 25 Mar 2014 11:43:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 42FD5EC1; Tue, 25 Mar 2014 11:43:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2PBhAgH059706; Tue, 25 Mar 2014 11:43:10 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2PBhA1H059705; Tue, 25 Mar 2014 11:43:10 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201403251143.s2PBhA1H059705@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 25 Mar 2014 11:43:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263714 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 11:43:10 -0000 Author: trasz Date: Tue Mar 25 11:43:09 2014 New Revision: 263714 URL: http://svnweb.freebsd.org/changeset/base/263714 Log: MFC r261766: Make ctld error out on invalid characters in ctl.conf. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/ctld/token.l Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/token.l ============================================================================== --- stable/10/usr.sbin/ctld/token.l Tue Mar 25 11:41:10 2014 (r263713) +++ stable/10/usr.sbin/ctld/token.l Tue Mar 25 11:43:09 2014 (r263714) @@ -82,4 +82,5 @@ timeout { return TIMEOUT; } #.*$ /* ignore comments */; \n { lineno++; } [ \t]+ /* ignore whitespace */; +. { yylval.str = strdup(yytext); return STR; } %% From owner-svn-src-stable@FreeBSD.ORG Tue Mar 25 11:45:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94DDE29E; Tue, 25 Mar 2014 11:45:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 81B9AED5; Tue, 25 Mar 2014 11:45:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2PBj3OK060042; Tue, 25 Mar 2014 11:45:03 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2PBj30T060041; Tue, 25 Mar 2014 11:45:03 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201403251145.s2PBj30T060041@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 25 Mar 2014 11:45:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263715 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 11:45:03 -0000 Author: trasz Date: Tue Mar 25 11:45:03 2014 New Revision: 263715 URL: http://svnweb.freebsd.org/changeset/base/263715 Log: MFC r261767: Show proper configuration file line numbers in error messages. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/ctld/parse.y Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/parse.y ============================================================================== --- stable/10/usr.sbin/ctld/parse.y Tue Mar 25 11:43:09 2014 (r263714) +++ stable/10/usr.sbin/ctld/parse.y Tue Mar 25 11:45:03 2014 (r263715) @@ -598,7 +598,7 @@ conf_new_from_file(const char *path) return (NULL); } check_perms(path); - lineno = 0; + lineno = 1; yyrestart(yyin); error = yyparse(); auth_group = NULL; From owner-svn-src-stable@FreeBSD.ORG Tue Mar 25 11:46:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 09A4B447; Tue, 25 Mar 2014 11:46:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E90AEF07; Tue, 25 Mar 2014 11:46:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2PBkkXm060269; Tue, 25 Mar 2014 11:46:46 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2PBkkHp060268; Tue, 25 Mar 2014 11:46:46 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201403251146.s2PBkkHp060268@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 25 Mar 2014 11:46:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263716 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 11:46:47 -0000 Author: trasz Date: Tue Mar 25 11:46:46 2014 New Revision: 263716 URL: http://svnweb.freebsd.org/changeset/base/263716 Log: MFC r261768: Make the debug messages during ctld(8) shutdown less confusing. Sponsored by: The FreeBSD Foundation 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 Tue Mar 25 11:45:03 2014 (r263715) +++ stable/10/usr.sbin/ctld/ctld.c Tue Mar 25 11:46:46 2014 (r263716) @@ -1057,8 +1057,8 @@ conf_apply(struct conf *oldconf, struct if (newtarg == NULL) { TAILQ_FOREACH_SAFE(oldlun, &oldtarg->t_luns, l_next, tmplun) { - log_debugx("target %s not found in the " - "configuration file; removing its lun %d, " + log_debugx("target %s not found in new " + "configuration; removing its lun %d, " "backed by CTL lun %d", oldtarg->t_iqn, oldlun->l_lun, oldlun->l_ctl_lun); @@ -1084,7 +1084,7 @@ conf_apply(struct conf *oldconf, struct newlun = lun_find(newtarg, oldlun->l_lun); if (newlun == NULL) { log_debugx("lun %d, target %s, CTL lun %d " - "not found in the configuration file; " + "not found in new configuration; " "removing", oldlun->l_lun, oldtarg->t_iqn, oldlun->l_ctl_lun); error = kernel_lun_remove(oldlun); From owner-svn-src-stable@FreeBSD.ORG Tue Mar 25 11:53:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 151F1711; Tue, 25 Mar 2014 11:53:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EA001FC8; Tue, 25 Mar 2014 11:53:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2PBrlps063994; Tue, 25 Mar 2014 11:53:47 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2PBrlso063993; Tue, 25 Mar 2014 11:53:47 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201403251153.s2PBrlso063993@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 25 Mar 2014 11:53:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263717 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 11:53:48 -0000 Author: trasz Date: Tue Mar 25 11:53:47 2014 New Revision: 263717 URL: http://svnweb.freebsd.org/changeset/base/263717 Log: MFC r261749: Refactor. Sponsored by: The FreeBSD Foundation 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 Tue Mar 25 11:46:46 2014 (r263716) +++ stable/10/usr.sbin/ctld/ctld.c Tue Mar 25 11:53:47 2014 (r263717) @@ -869,14 +869,74 @@ conf_print(struct conf *conf) } #endif +static int +conf_verify_lun(struct lun *lun) +{ + const struct lun *lun2; + + if (lun->l_backend == NULL) + lun_set_backend(lun, "block"); + if (strcmp(lun->l_backend, "block") == 0) { + if (lun->l_path == NULL) { + log_warnx("missing path for lun %d, target \"%s\"", + lun->l_lun, lun->l_target->t_iqn); + return (1); + } + } else if (strcmp(lun->l_backend, "ramdisk") == 0) { + if (lun->l_size == 0) { + log_warnx("missing size for ramdisk-backed lun %d, " + "target \"%s\"", lun->l_lun, lun->l_target->t_iqn); + return (1); + } + if (lun->l_path != NULL) { + log_warnx("path must not be specified " + "for ramdisk-backed lun %d, target \"%s\"", + lun->l_lun, lun->l_target->t_iqn); + return (1); + } + } + if (lun->l_lun < 0 || lun->l_lun > 255) { + log_warnx("invalid lun number for lun %d, target \"%s\"; " + "must be between 0 and 255", lun->l_lun, + lun->l_target->t_iqn); + return (1); + } +#if 1 /* Should we? */ + TAILQ_FOREACH(lun2, &lun->l_target->t_luns, l_next) { + if (lun == lun2) + continue; + if (lun->l_path != NULL && lun2->l_path != NULL && + strcmp(lun->l_path, lun2->l_path) == 0) + log_debugx("WARNING: duplicate path for lun %d, " + "target \"%s\"", lun->l_lun, lun->l_target->t_iqn); + } +#endif + if (lun->l_blocksize == 0) { + lun_set_blocksize(lun, DEFAULT_BLOCKSIZE); + } else if (lun->l_blocksize < 0) { + log_warnx("invalid blocksize for lun %d, target \"%s\"; " + "must be larger than 0", lun->l_lun, lun->l_target->t_iqn); + return (1); + } + if (lun->l_size != 0 && lun->l_size % lun->l_blocksize != 0) { + log_warnx("invalid size for lun %d, target \"%s\"; " + "must be multiple of blocksize", lun->l_lun, + lun->l_target->t_iqn); + return (1); + } + + return (0); +} + int conf_verify(struct conf *conf) { struct auth_group *ag; struct portal_group *pg; struct target *targ; - struct lun *lun, *lun2; + struct lun *lun; bool found_lun0; + int error; if (conf->conf_pidfile_path == NULL) conf->conf_pidfile_path = checked_strdup(DEFAULT_PIDFILE); @@ -895,65 +955,11 @@ conf_verify(struct conf *conf) } found_lun0 = false; TAILQ_FOREACH(lun, &targ->t_luns, l_next) { + error = conf_verify_lun(lun); + if (error != 0) + return (error); if (lun->l_lun == 0) found_lun0 = true; - if (lun->l_backend == NULL) - lun_set_backend(lun, "block"); - if (strcmp(lun->l_backend, "block") == 0 && - lun->l_path == NULL) { - log_warnx("missing path for lun %d, " - "target \"%s\"", lun->l_lun, targ->t_iqn); - return (1); - } - if (strcmp(lun->l_backend, "ramdisk") == 0) { - if (lun->l_size == 0) { - log_warnx("missing size for " - "ramdisk-backed lun %d, " - "target \"%s\"", - lun->l_lun, targ->t_iqn); - return (1); - } - if (lun->l_path != NULL) { - log_warnx("path must not be specified " - "for ramdisk-backed lun %d, " - "target \"%s\"", - lun->l_lun, targ->t_iqn); - return (1); - } - } - if (lun->l_lun < 0 || lun->l_lun > 255) { - log_warnx("invalid lun number for lun %d, " - "target \"%s\"; must be between 0 and 255", - lun->l_lun, targ->t_iqn); - return (1); - } -#if 1 /* Should we? */ - TAILQ_FOREACH(lun2, &targ->t_luns, l_next) { - if (lun == lun2) - continue; - if (lun->l_path != NULL && - lun2->l_path != NULL && - strcmp(lun->l_path, lun2->l_path) == 0) - log_debugx("WARNING: duplicate path " - "for lun %d, target \"%s\"", - lun->l_lun, targ->t_iqn); - } -#endif - if (lun->l_blocksize == 0) { - lun_set_blocksize(lun, DEFAULT_BLOCKSIZE); - } else if (lun->l_blocksize <= 0) { - log_warnx("invalid blocksize for lun %d, " - "target \"%s\"; must be larger than 0", - lun->l_lun, targ->t_iqn); - return (1); - } - if (lun->l_size != 0 && - lun->l_size % lun->l_blocksize != 0) { - log_warnx("invalid size for lun %d, target " - "\"%s\"; must be multiple of blocksize", - lun->l_lun, targ->t_iqn); - return (1); - } } if (!found_lun0) { log_warnx("mandatory LUN 0 not configured " From owner-svn-src-stable@FreeBSD.ORG Tue Mar 25 11:58:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E67C6885; Tue, 25 Mar 2014 11:58:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B9074FEE; Tue, 25 Mar 2014 11:58:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2PBwOwf064574; Tue, 25 Mar 2014 11:58:24 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2PBwOEh064573; Tue, 25 Mar 2014 11:58:24 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201403251158.s2PBwOEh064573@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 25 Mar 2014 11:58:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263718 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 11:58:25 -0000 Author: trasz Date: Tue Mar 25 11:58:24 2014 New Revision: 263718 URL: http://svnweb.freebsd.org/changeset/base/263718 Log: MFC r261750: Improve check for duplicated paths. It shows the warning twice for every path (once for each duplicate found), but it should do for now. Sponsored by: The FreeBSD Foundation 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 Tue Mar 25 11:53:47 2014 (r263717) +++ stable/10/usr.sbin/ctld/ctld.c Tue Mar 25 11:58:24 2014 (r263718) @@ -873,6 +873,7 @@ static int conf_verify_lun(struct lun *lun) { const struct lun *lun2; + const struct target *targ2; if (lun->l_backend == NULL) lun_set_backend(lun, "block"); @@ -901,16 +902,6 @@ conf_verify_lun(struct lun *lun) lun->l_target->t_iqn); return (1); } -#if 1 /* Should we? */ - TAILQ_FOREACH(lun2, &lun->l_target->t_luns, l_next) { - if (lun == lun2) - continue; - if (lun->l_path != NULL && lun2->l_path != NULL && - strcmp(lun->l_path, lun2->l_path) == 0) - log_debugx("WARNING: duplicate path for lun %d, " - "target \"%s\"", lun->l_lun, lun->l_target->t_iqn); - } -#endif if (lun->l_blocksize == 0) { lun_set_blocksize(lun, DEFAULT_BLOCKSIZE); } else if (lun->l_blocksize < 0) { @@ -924,6 +915,20 @@ conf_verify_lun(struct lun *lun) lun->l_target->t_iqn); return (1); } + TAILQ_FOREACH(targ2, &lun->l_target->t_conf->conf_targets, t_next) { + TAILQ_FOREACH(lun2, &targ2->t_luns, l_next) { + if (lun == lun2) + continue; + if (lun->l_path != NULL && lun2->l_path != NULL && + strcmp(lun->l_path, lun2->l_path) == 0) { + log_debugx("WARNING: path \"%s\" duplicated " + "between lun %d, target \"%s\", and " + "lun %d, target \"%s\"", lun->l_path, + lun->l_lun, lun->l_target->t_iqn, + lun2->l_lun, lun2->l_target->t_iqn); + } + } + } return (0); } From owner-svn-src-stable@FreeBSD.ORG Tue Mar 25 12:00:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 33C72BD5; Tue, 25 Mar 2014 12:00:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 211049; Tue, 25 Mar 2014 12:00:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2PC05wm066663; Tue, 25 Mar 2014 12:00:06 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2PC05Oa066662; Tue, 25 Mar 2014 12:00:05 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201403251200.s2PC05Oa066662@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 25 Mar 2014 12:00:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263719 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 12:00:06 -0000 Author: trasz Date: Tue Mar 25 12:00:05 2014 New Revision: 263719 URL: http://svnweb.freebsd.org/changeset/base/263719 Log: MFC r261753: Daemonize after applying configuration, not before, so that any problems - including "daemon already running" - are visible on the terminal and not just in logs. Sponsored by: The FreeBSD Foundation 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 Tue Mar 25 11:58:24 2014 (r263718) +++ stable/10/usr.sbin/ctld/ctld.c Tue Mar 25 12:00:05 2014 (r263719) @@ -1644,14 +1644,6 @@ main(int argc, char **argv) newconf->conf_debug = debug; } - if (dont_daemonize == false) { - if (daemon(0, 0) == -1) { - log_warn("cannot daemonize"); - pidfile_remove(newconf->conf_pidfh); - exit(1); - } - } - #ifdef ICL_KERNEL_PROXY log_debugx("enabling CTL iSCSI port"); error = kernel_port_on(); @@ -1674,6 +1666,15 @@ main(int argc, char **argv) log_errx(1, "failed to enable CTL iSCSI port, exiting"); #endif + if (dont_daemonize == false) { + log_debugx("daemonizing"); + if (daemon(0, 0) == -1) { + log_warn("cannot daemonize"); + pidfile_remove(newconf->conf_pidfh); + exit(1); + } + } + for (;;) { main_loop(newconf, dont_daemonize); if (sighup_received) { From owner-svn-src-stable@FreeBSD.ORG Tue Mar 25 12:01:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94848D6E; Tue, 25 Mar 2014 12:01:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 661D913C; Tue, 25 Mar 2014 12:01:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2PC1vcH068072; Tue, 25 Mar 2014 12:01:57 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2PC1u8X068066; Tue, 25 Mar 2014 12:01:56 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201403251201.s2PC1u8X068066@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 25 Mar 2014 12:01:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263720 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 12:01:57 -0000 Author: trasz Date: Tue Mar 25 12:01:55 2014 New Revision: 263720 URL: http://svnweb.freebsd.org/changeset/base/263720 Log: MFC r261754: Implement initiator-name and initiator-portal restrictions. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/ctld/ctl.conf.5 stable/10/usr.sbin/ctld/ctld.c stable/10/usr.sbin/ctld/ctld.h stable/10/usr.sbin/ctld/login.c stable/10/usr.sbin/ctld/parse.y stable/10/usr.sbin/ctld/token.l Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/ctl.conf.5 ============================================================================== --- stable/10/usr.sbin/ctld/ctl.conf.5 Tue Mar 25 12:00:05 2014 (r263719) +++ stable/10/usr.sbin/ctld/ctl.conf.5 Tue Mar 25 12:01:55 2014 (r263720) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 2, 2013 +.Dd February 11, 2014 .Dt CTL.CONF 5 .Os .Sh NAME @@ -107,6 +107,18 @@ Specifies CHAP authentication credential Specifies mutual CHAP authentication credentials. Note that for any auth-group, configuration may contain either chap, or chap-mutual entries; it's an error to mix them. +.It Ic initiator-name Ao Ar initiator-name Ac +Specifies iSCSI initiator name. +If not defined, there will be no restrictions based on initiator +name. +Otherwise, only initiators with names matching one of defined +ones will be allowed to connect. +.It Ic initiator-portal Ao Ar address Ac +Specifies iSCSI initiator portal - IPv4 or IPv6 address. +If not defined, there will be no restrictions based on initiator +address. +Otherwise, only initiators with addresses matching one of defined +ones will be allowed to connect. .El .Ss portal-group level The following statements are available at the portal-group level: @@ -143,6 +155,22 @@ or chap-mutual clauses; it's a configura Specifies mutual CHAP authentication credentials. Note that targets must use either auth-group, chap, or chap-mutual clauses; it's a configuration error to mix them in one target. +.It Ic initiator-name Ao Ar initiator-name Ac +Specifies iSCSI initiator name. +If not defined, there will be no restrictions based on initiator +name. +Otherwise, only initiators with names matching one of defined +ones will be allowed to connect. +This clause is mutually exclusive with auth-group; one cannot use +both in a single target. +.It Ic initiator-portal Ao Ar address Ac +Specifies iSCSI initiator portal - IPv4 or IPv6 address. +If not defined, there will be no restrictions based on initiator +address. +Otherwise, only initiators with addresses matching one of defined +ones will be allowed to connect. +This clause is mutually exclusive with auth-group; one cannot use +both in a single target. .It Ic portal-group Aq Ar name Assigns previously defined portal group to that target. Default portal group is "default", which makes the target available Modified: stable/10/usr.sbin/ctld/ctld.c ============================================================================== --- stable/10/usr.sbin/ctld/ctld.c Tue Mar 25 12:00:05 2014 (r263719) +++ stable/10/usr.sbin/ctld/ctld.c Tue Mar 25 12:01:55 2014 (r263720) @@ -149,6 +149,94 @@ auth_find(struct auth_group *ag, const c return (NULL); } +const struct auth_name * +auth_name_new(struct auth_group *ag, const char *name) +{ + struct auth_name *an; + + an = calloc(1, sizeof(*an)); + if (an == NULL) + log_err(1, "calloc"); + an->an_auth_group = ag; + an->an_initator_name = checked_strdup(name); + TAILQ_INSERT_TAIL(&ag->ag_names, an, an_next); + return (an); +} + +static void +auth_name_delete(struct auth_name *an) +{ + TAILQ_REMOVE(&an->an_auth_group->ag_names, an, an_next); + + free(an->an_initator_name); + free(an); +} + +bool +auth_name_defined(const struct auth_group *ag) +{ + if (TAILQ_EMPTY(&ag->ag_names)) + return (false); + return (true); +} + +const struct auth_name * +auth_name_find(const struct auth_group *ag, const char *name) +{ + const struct auth_name *auth_name; + + TAILQ_FOREACH(auth_name, &ag->ag_names, an_next) { + if (strcmp(auth_name->an_initator_name, name) == 0) + return (auth_name); + } + + return (NULL); +} + +const struct auth_portal * +auth_portal_new(struct auth_group *ag, const char *portal) +{ + struct auth_portal *ap; + + ap = calloc(1, sizeof(*ap)); + if (ap == NULL) + log_err(1, "calloc"); + ap->ap_auth_group = ag; + ap->ap_initator_portal = checked_strdup(portal); + TAILQ_INSERT_TAIL(&ag->ag_portals, ap, ap_next); + return (ap); +} + +static void +auth_portal_delete(struct auth_portal *ap) +{ + TAILQ_REMOVE(&ap->ap_auth_group->ag_portals, ap, ap_next); + + free(ap->ap_initator_portal); + free(ap); +} + +bool +auth_portal_defined(const struct auth_group *ag) +{ + if (TAILQ_EMPTY(&ag->ag_portals)) + return (false); + return (true); +} + +const struct auth_portal * +auth_portal_find(const struct auth_group *ag, const char *portal) +{ + const struct auth_portal *auth_portal; + + TAILQ_FOREACH(auth_portal, &ag->ag_portals, ap_next) { + if (strcmp(auth_portal->ap_initator_portal, portal) == 0) + return (auth_portal); + } + + return (NULL); +} + struct auth_group * auth_group_new(struct conf *conf, const char *name) { @@ -168,6 +256,8 @@ auth_group_new(struct conf *conf, const if (name != NULL) ag->ag_name = checked_strdup(name); TAILQ_INIT(&ag->ag_auths); + TAILQ_INIT(&ag->ag_names); + TAILQ_INIT(&ag->ag_portals); ag->ag_conf = conf; TAILQ_INSERT_TAIL(&conf->conf_auth_groups, ag, ag_next); @@ -177,12 +267,19 @@ auth_group_new(struct conf *conf, const void auth_group_delete(struct auth_group *ag) { - struct auth *auth, *tmp; + struct auth *auth, *auth_tmp; + struct auth_name *auth_name, *auth_name_tmp; + struct auth_portal *auth_portal, *auth_portal_tmp; TAILQ_REMOVE(&ag->ag_conf->conf_auth_groups, ag, ag_next); - TAILQ_FOREACH_SAFE(auth, &ag->ag_auths, a_next, tmp) + TAILQ_FOREACH_SAFE(auth, &ag->ag_auths, a_next, auth_tmp) auth_delete(auth); + TAILQ_FOREACH_SAFE(auth_name, &ag->ag_names, an_next, auth_name_tmp) + auth_name_delete(auth_name); + TAILQ_FOREACH_SAFE(auth_portal, &ag->ag_portals, ap_next, + auth_portal_tmp) + auth_portal_delete(auth_portal); free(ag->ag_name); free(ag); } @@ -832,6 +929,8 @@ conf_print(struct conf *conf) { struct auth_group *ag; struct auth *auth; + struct auth_name *auth_name; + struct auth_portal *auth_portal; struct portal_group *pg; struct portal *portal; struct target *targ; @@ -844,6 +943,12 @@ conf_print(struct conf *conf) fprintf(stderr, "\t chap-mutual %s %s %s %s\n", auth->a_user, auth->a_secret, auth->a_mutual_user, auth->a_mutual_secret); + TAILQ_FOREACH(auth_name, &ag->ag_names, an_next) + fprintf(stderr, "\t initiator-name %s\n", + auth_name->an_initator_name); + TAILQ_FOREACH(auth_portal, &ag->ag_portals, an_next) + fprintf(stderr, "\t initiator-portal %s\n", + auth_portal->an_initator_portal); fprintf(stderr, "}\n"); } TAILQ_FOREACH(pg, &conf->conf_portal_groups, pg_next) { Modified: stable/10/usr.sbin/ctld/ctld.h ============================================================================== --- stable/10/usr.sbin/ctld/ctld.h Tue Mar 25 12:00:05 2014 (r263719) +++ stable/10/usr.sbin/ctld/ctld.h Tue Mar 25 12:01:55 2014 (r263720) @@ -53,6 +53,18 @@ struct auth { char *a_mutual_secret; }; +struct auth_name { + TAILQ_ENTRY(auth_name) an_next; + struct auth_group *an_auth_group; + char *an_initator_name; +}; + +struct auth_portal { + TAILQ_ENTRY(auth_portal) ap_next; + struct auth_group *ap_auth_group; + char *ap_initator_portal; +}; + #define AG_TYPE_UNKNOWN 0 #define AG_TYPE_NO_AUTHENTICATION 1 #define AG_TYPE_CHAP 2 @@ -65,6 +77,8 @@ struct auth_group { struct target *ag_target; int ag_type; TAILQ_HEAD(, auth) ag_auths; + TAILQ_HEAD(, auth_name) ag_names; + TAILQ_HEAD(, auth_portal) ag_portals; }; struct portal { @@ -192,6 +206,18 @@ const struct auth *auth_new_chap_mutual( const struct auth *auth_find(struct auth_group *ag, const char *user); +const struct auth_name *auth_name_new(struct auth_group *ag, + const char *initiator_name); +bool auth_name_defined(const struct auth_group *ag); +const struct auth_name *auth_name_find(const struct auth_group *ag, + const char *initiator_name); + +const struct auth_portal *auth_portal_new(struct auth_group *ag, + const char *initiator_portal); +bool auth_portal_defined(const struct auth_group *ag); +const struct auth_portal *auth_portal_find(const struct auth_group *ag, + const char *initiator_portal); + struct portal_group *portal_group_new(struct conf *conf, const char *name); void portal_group_delete(struct portal_group *pg); struct portal_group *portal_group_find(struct conf *conf, const char *name); Modified: stable/10/usr.sbin/ctld/login.c ============================================================================== --- stable/10/usr.sbin/ctld/login.c Tue Mar 25 12:00:05 2014 (r263719) +++ stable/10/usr.sbin/ctld/login.c Tue Mar 25 12:01:55 2014 (r263720) @@ -940,6 +940,33 @@ login(struct connection *conn) } /* + * Enforce initiator-name and initiator-portal. + */ + if (auth_name_defined(ag)) { + if (auth_name_find(ag, initiator_name) == NULL) { + login_send_error(request, 0x02, 0x02); + log_errx(1, "initiator does not match allowed " + "initiator names"); + } + log_debugx("initiator matches allowed initiator names"); + } else { + log_debugx("auth-group does not define initiator name " + "restrictions"); + } + + if (auth_portal_defined(ag)) { + if (auth_portal_find(ag, conn->conn_initiator_addr) == NULL) { + login_send_error(request, 0x02, 0x02); + log_errx(1, "initiator does not match allowed " + "initiator portals"); + } + log_debugx("initiator matches allowed initiator portals"); + } else { + log_debugx("auth-group does not define initiator portal " + "restrictions"); + } + + /* * Let's see if the initiator intends to do any kind of authentication * at all. */ Modified: stable/10/usr.sbin/ctld/parse.y ============================================================================== --- stable/10/usr.sbin/ctld/parse.y Tue Mar 25 12:00:05 2014 (r263719) +++ stable/10/usr.sbin/ctld/parse.y Tue Mar 25 12:01:55 2014 (r263720) @@ -58,9 +58,9 @@ extern void yyrestart(FILE *); %} %token ALIAS AUTH_GROUP BACKEND BLOCKSIZE CHAP CHAP_MUTUAL CLOSING_BRACKET -%token DEBUG DEVICE_ID DISCOVERY_AUTH_GROUP LISTEN LISTEN_ISER LUN MAXPROC NUM -%token OPENING_BRACKET OPTION PATH PIDFILE PORTAL_GROUP SERIAL SIZE STR TARGET -%token TIMEOUT +%token DEBUG DEVICE_ID DISCOVERY_AUTH_GROUP INITIATOR_NAME INITIATOR_PORTAL +%token LISTEN LISTEN_ISER LUN MAXPROC NUM OPENING_BRACKET OPTION PATH PIDFILE +%token PORTAL_GROUP SERIAL SIZE STR TARGET TIMEOUT %union { @@ -148,6 +148,10 @@ auth_group_entry: auth_group_chap | auth_group_chap_mutual + | + auth_group_initiator_name + | + auth_group_initiator_portal ; auth_group_chap: CHAP STR STR @@ -176,6 +180,28 @@ auth_group_chap_mutual: CHAP_MUTUAL STR } ; +auth_group_initiator_name: INITIATOR_NAME STR + { + const struct auth_name *an; + + an = auth_name_new(auth_group, $2); + free($2); + if (an == NULL) + return (1); + } + ; + +auth_group_initiator_portal: INITIATOR_PORTAL STR + { + const struct auth_portal *ap; + + ap = auth_portal_new(auth_group, $2); + free($2); + if (ap == NULL) + return (1); + } + ; + portal_group_definition: PORTAL_GROUP portal_group_name OPENING_BRACKET portal_group_entries CLOSING_BRACKET { @@ -277,6 +303,10 @@ target_entry: | chap_mutual_statement | + initiator_name_statement + | + initiator_portal_statement + | portal_group_statement | lun_statement @@ -382,6 +412,60 @@ chap_mutual_statement: CHAP_MUTUAL STR S } ; +initiator_name_statement: INITIATOR_NAME STR + { + const struct auth_name *an; + + if (target->t_auth_group != NULL) { + if (target->t_auth_group->ag_name != NULL) { + log_warnx("cannot mix auth-group with " + "initiator-name for target \"%s\"", + target->t_iqn); + free($2); + return (1); + } + } else { + target->t_auth_group = auth_group_new(conf, NULL); + if (target->t_auth_group == NULL) { + free($2); + return (1); + } + target->t_auth_group->ag_target = target; + } + an = auth_name_new(target->t_auth_group, $2); + free($2); + if (an == NULL) + return (1); + } + ; + +initiator_portal_statement: INITIATOR_PORTAL STR + { + const struct auth_portal *ap; + + if (target->t_auth_group != NULL) { + if (target->t_auth_group->ag_name != NULL) { + log_warnx("cannot mix auth-group with " + "initiator-portal for target \"%s\"", + target->t_iqn); + free($2); + return (1); + } + } else { + target->t_auth_group = auth_group_new(conf, NULL); + if (target->t_auth_group == NULL) { + free($2); + return (1); + } + target->t_auth_group->ag_target = target; + } + ap = auth_portal_new(target->t_auth_group, $2); + free($2); + if (ap == NULL) + return (1); + } + ; + portal_group_statement: PORTAL_GROUP STR { if (target->t_portal_group != NULL) { Modified: stable/10/usr.sbin/ctld/token.l ============================================================================== --- stable/10/usr.sbin/ctld/token.l Tue Mar 25 12:00:05 2014 (r263719) +++ stable/10/usr.sbin/ctld/token.l Tue Mar 25 12:01:55 2014 (r263720) @@ -57,6 +57,8 @@ chap-mutual { return CHAP_MUTUAL; } debug { return DEBUG; } device-id { return DEVICE_ID; } discovery-auth-group { return DISCOVERY_AUTH_GROUP; } +initiator-name { return INITIATOR_NAME; } +initiator-portal { return INITIATOR_PORTAL; } listen { return LISTEN; } listen-iser { return LISTEN_ISER; } lun { return LUN; } From owner-svn-src-stable@FreeBSD.ORG Tue Mar 25 12:06:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA71AFA4; Tue, 25 Mar 2014 12:06:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BA8E3177; Tue, 25 Mar 2014 12:06:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2PC6g15068634; Tue, 25 Mar 2014 12:06:42 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2PC6g9o068633; Tue, 25 Mar 2014 12:06:42 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201403251206.s2PC6g9o068633@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 25 Mar 2014 12:06:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263721 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 12:06:42 -0000 Author: trasz Date: Tue Mar 25 12:06:42 2014 New Revision: 263721 URL: http://svnweb.freebsd.org/changeset/base/263721 Log: MFC r261755: Make function ordering slightly more logical; no functional changes. Sponsored by: The FreeBSD Foundation 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 Tue Mar 25 12:01:55 2014 (r263720) +++ stable/10/usr.sbin/ctld/ctld.c Tue Mar 25 12:06:42 2014 (r263721) @@ -149,6 +149,126 @@ auth_find(struct auth_group *ag, const c return (NULL); } +static void +auth_check_secret_length(struct auth *auth) +{ + size_t len; + + len = strlen(auth->a_secret); + if (len > 16) { + if (auth->a_auth_group->ag_name != NULL) + log_warnx("secret for user \"%s\", auth-group \"%s\", " + "is too long; it should be at most 16 characters " + "long", auth->a_user, auth->a_auth_group->ag_name); + else + log_warnx("secret for user \"%s\", target \"%s\", " + "is too long; it should be at most 16 characters " + "long", auth->a_user, + auth->a_auth_group->ag_target->t_iqn); + } + if (len < 12) { + if (auth->a_auth_group->ag_name != NULL) + log_warnx("secret for user \"%s\", auth-group \"%s\", " + "is too short; it should be at least 12 characters " + "long", auth->a_user, + auth->a_auth_group->ag_name); + else + log_warnx("secret for user \"%s\", target \"%s\", " + "is too short; it should be at least 16 characters " + "long", auth->a_user, + auth->a_auth_group->ag_target->t_iqn); + } + + if (auth->a_mutual_secret != NULL) { + len = strlen(auth->a_secret); + if (len > 16) { + if (auth->a_auth_group->ag_name != NULL) + log_warnx("mutual secret for user \"%s\", " + "auth-group \"%s\", is too long; it should " + "be at most 16 characters long", + auth->a_user, auth->a_auth_group->ag_name); + else + log_warnx("mutual secret for user \"%s\", " + "target \"%s\", is too long; it should " + "be at most 16 characters long", + auth->a_user, + auth->a_auth_group->ag_target->t_iqn); + } + if (len < 12) { + if (auth->a_auth_group->ag_name != NULL) + log_warnx("mutual secret for user \"%s\", " + "auth-group \"%s\", is too short; it " + "should be at least 12 characters long", + auth->a_user, auth->a_auth_group->ag_name); + else + log_warnx("mutual secret for user \"%s\", " + "target \"%s\", is too short; it should be " + "at least 16 characters long", + auth->a_user, + auth->a_auth_group->ag_target->t_iqn); + } + } +} + +const struct auth * +auth_new_chap(struct auth_group *ag, const char *user, + const char *secret) +{ + struct auth *auth; + + if (ag->ag_type == AG_TYPE_UNKNOWN) + ag->ag_type = AG_TYPE_CHAP; + if (ag->ag_type != AG_TYPE_CHAP) { + if (ag->ag_name != NULL) + log_warnx("cannot mix \"chap\" authentication with " + "other types for auth-group \"%s\"", ag->ag_name); + else + log_warnx("cannot mix \"chap\" authentication with " + "other types for target \"%s\"", + ag->ag_target->t_iqn); + return (NULL); + } + + auth = auth_new(ag); + auth->a_user = checked_strdup(user); + auth->a_secret = checked_strdup(secret); + + auth_check_secret_length(auth); + + return (auth); +} + +const struct auth * +auth_new_chap_mutual(struct auth_group *ag, const char *user, + const char *secret, const char *user2, const char *secret2) +{ + struct auth *auth; + + if (ag->ag_type == AG_TYPE_UNKNOWN) + ag->ag_type = AG_TYPE_CHAP_MUTUAL; + if (ag->ag_type != AG_TYPE_CHAP_MUTUAL) { + if (ag->ag_name != NULL) + log_warnx("cannot mix \"chap-mutual\" authentication " + "with other types for auth-group \"%s\"", + ag->ag_name); + else + log_warnx("cannot mix \"chap-mutual\" authentication " + "with other types for target \"%s\"", + ag->ag_target->t_iqn); + return (NULL); + } + + auth = auth_new(ag); + auth->a_user = checked_strdup(user); + auth->a_secret = checked_strdup(secret); + auth->a_mutual_user = checked_strdup(user2); + auth->a_mutual_secret = checked_strdup(secret2); + + auth_check_secret_length(auth); + + return (auth); +} + const struct auth_name * auth_name_new(struct auth_group *ag, const char *name) { @@ -297,126 +417,6 @@ auth_group_find(struct conf *conf, const return (NULL); } -static void -auth_check_secret_length(struct auth *auth) -{ - size_t len; - - len = strlen(auth->a_secret); - if (len > 16) { - if (auth->a_auth_group->ag_name != NULL) - log_warnx("secret for user \"%s\", auth-group \"%s\", " - "is too long; it should be at most 16 characters " - "long", auth->a_user, auth->a_auth_group->ag_name); - else - log_warnx("secret for user \"%s\", target \"%s\", " - "is too long; it should be at most 16 characters " - "long", auth->a_user, - auth->a_auth_group->ag_target->t_iqn); - } - if (len < 12) { - if (auth->a_auth_group->ag_name != NULL) - log_warnx("secret for user \"%s\", auth-group \"%s\", " - "is too short; it should be at least 12 characters " - "long", auth->a_user, - auth->a_auth_group->ag_name); - else - log_warnx("secret for user \"%s\", target \"%s\", " - "is too short; it should be at least 16 characters " - "long", auth->a_user, - auth->a_auth_group->ag_target->t_iqn); - } - - if (auth->a_mutual_secret != NULL) { - len = strlen(auth->a_secret); - if (len > 16) { - if (auth->a_auth_group->ag_name != NULL) - log_warnx("mutual secret for user \"%s\", " - "auth-group \"%s\", is too long; it should " - "be at most 16 characters long", - auth->a_user, auth->a_auth_group->ag_name); - else - log_warnx("mutual secret for user \"%s\", " - "target \"%s\", is too long; it should " - "be at most 16 characters long", - auth->a_user, - auth->a_auth_group->ag_target->t_iqn); - } - if (len < 12) { - if (auth->a_auth_group->ag_name != NULL) - log_warnx("mutual secret for user \"%s\", " - "auth-group \"%s\", is too short; it " - "should be at least 12 characters long", - auth->a_user, auth->a_auth_group->ag_name); - else - log_warnx("mutual secret for user \"%s\", " - "target \"%s\", is too short; it should be " - "at least 16 characters long", - auth->a_user, - auth->a_auth_group->ag_target->t_iqn); - } - } -} - -const struct auth * -auth_new_chap(struct auth_group *ag, const char *user, - const char *secret) -{ - struct auth *auth; - - if (ag->ag_type == AG_TYPE_UNKNOWN) - ag->ag_type = AG_TYPE_CHAP; - if (ag->ag_type != AG_TYPE_CHAP) { - if (ag->ag_name != NULL) - log_warnx("cannot mix \"chap\" authentication with " - "other types for auth-group \"%s\"", ag->ag_name); - else - log_warnx("cannot mix \"chap\" authentication with " - "other types for target \"%s\"", - ag->ag_target->t_iqn); - return (NULL); - } - - auth = auth_new(ag); - auth->a_user = checked_strdup(user); - auth->a_secret = checked_strdup(secret); - - auth_check_secret_length(auth); - - return (auth); -} - -const struct auth * -auth_new_chap_mutual(struct auth_group *ag, const char *user, - const char *secret, const char *user2, const char *secret2) -{ - struct auth *auth; - - if (ag->ag_type == AG_TYPE_UNKNOWN) - ag->ag_type = AG_TYPE_CHAP_MUTUAL; - if (ag->ag_type != AG_TYPE_CHAP_MUTUAL) { - if (ag->ag_name != NULL) - log_warnx("cannot mix \"chap-mutual\" authentication " - "with other types for auth-group \"%s\"", - ag->ag_name); - else - log_warnx("cannot mix \"chap-mutual\" authentication " - "with other types for target \"%s\"", - ag->ag_target->t_iqn); - return (NULL); - } - - auth = auth_new(ag); - auth->a_user = checked_strdup(user); - auth->a_secret = checked_strdup(secret); - auth->a_mutual_user = checked_strdup(user2); - auth->a_mutual_secret = checked_strdup(secret2); - - auth_check_secret_length(auth); - - return (auth); -} - static struct portal * portal_new(struct portal_group *pg) { From owner-svn-src-stable@FreeBSD.ORG Tue Mar 25 12:08:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8689029F; Tue, 25 Mar 2014 12:08:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 671941AE; Tue, 25 Mar 2014 12:08:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2PC8alU068903; Tue, 25 Mar 2014 12:08:36 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2PC8a2a068902; Tue, 25 Mar 2014 12:08:36 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201403251208.s2PC8a2a068902@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 25 Mar 2014 12:08:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263722 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 12:08:36 -0000 Author: trasz Date: Tue Mar 25 12:08:35 2014 New Revision: 263722 URL: http://svnweb.freebsd.org/changeset/base/263722 Log: MFC r261756: Yacc cleanup; no functional changes. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/ctld/parse.y Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/parse.y ============================================================================== --- stable/10/usr.sbin/ctld/parse.y Tue Mar 25 12:06:42 2014 (r263721) +++ stable/10/usr.sbin/ctld/parse.y Tue Mar 25 12:08:35 2014 (r263722) @@ -79,40 +79,40 @@ statements: ; statement: - debug_statement + debug | - timeout_statement + timeout | - maxproc_statement + maxproc | - pidfile_statement + pidfile | - auth_group_definition + auth_group | - portal_group_definition + portal_group | - target_statement + target ; -debug_statement: DEBUG NUM +debug: DEBUG NUM { conf->conf_debug = $2; } ; -timeout_statement: TIMEOUT NUM +timeout: TIMEOUT NUM { conf->conf_timeout = $2; } ; -maxproc_statement: MAXPROC NUM +maxproc: MAXPROC NUM { conf->conf_maxproc = $2; } ; -pidfile_statement: PIDFILE STR +pidfile: PIDFILE STR { if (conf->conf_pidfile_path != NULL) { log_warnx("pidfile specified more than once"); @@ -123,7 +123,7 @@ pidfile_statement: PIDFILE STR } ; -auth_group_definition: AUTH_GROUP auth_group_name +auth_group: AUTH_GROUP auth_group_name OPENING_BRACKET auth_group_entries CLOSING_BRACKET { auth_group = NULL; @@ -202,7 +202,7 @@ auth_group_initiator_portal: INITIATOR_P } ; -portal_group_definition: PORTAL_GROUP portal_group_name +portal_group: PORTAL_GROUP portal_group_name OPENING_BRACKET portal_group_entries CLOSING_BRACKET { portal_group = NULL; @@ -273,14 +273,14 @@ portal_group_listen_iser: LISTEN_ISER ST } ; -target_statement: TARGET target_iqn +target: TARGET target_name OPENING_BRACKET target_entries CLOSING_BRACKET { target = NULL; } ; -target_iqn: STR +target_name: STR { target = target_new(conf, $1); free($1); @@ -295,24 +295,24 @@ target_entries: ; target_entry: - alias_statement + target_alias | - auth_group_statement + target_auth_group | - chap_statement + target_chap | - chap_mutual_statement + target_chap_mutual | - initiator_name_statement + target_initiator_name | - initiator_portal_statement + target_initiator_portal | - portal_group_statement + target_portal_group | - lun_statement + target_lun ; -alias_statement: ALIAS STR +target_alias: ALIAS STR { if (target->t_alias != NULL) { log_warnx("alias for target \"%s\" " @@ -323,7 +323,7 @@ alias_statement: ALIAS STR } ; -auth_group_statement: AUTH_GROUP STR +target_auth_group: AUTH_GROUP STR { if (target->t_auth_group != NULL) { if (target->t_auth_group->ag_name != NULL) @@ -345,7 +345,7 @@ auth_group_statement: AUTH_GROUP STR } ; -chap_statement: CHAP STR STR +target_chap: CHAP STR STR { const struct auth *ca; @@ -375,7 +375,7 @@ chap_statement: CHAP STR STR } ; -chap_mutual_statement: CHAP_MUTUAL STR STR STR STR +target_chap_mutual: CHAP_MUTUAL STR STR STR STR { const struct auth *ca; @@ -412,7 +412,7 @@ chap_mutual_statement: CHAP_MUTUAL STR S } ; -initiator_name_statement: INITIATOR_NAME STR +target_initiator_name: INITIATOR_NAME STR { const struct auth_name *an; @@ -439,7 +439,7 @@ initiator_name_statement: INITIATOR_NAME } ; -initiator_portal_statement: INITIATOR_PORTAL STR +target_initiator_portal: INITIATOR_PORTAL STR { const struct auth_portal *ap; @@ -466,7 +466,7 @@ initiator_portal_statement: INITIATOR_PO } ; -portal_group_statement: PORTAL_GROUP STR +target_portal_group: PORTAL_GROUP STR { if (target->t_portal_group != NULL) { log_warnx("portal-group for target \"%s\" " @@ -485,8 +485,8 @@ portal_group_statement: PORTAL_GROUP STR } ; -lun_statement: LUN lun_number - OPENING_BRACKET lun_statement_entries CLOSING_BRACKET +target_lun: LUN lun_number + OPENING_BRACKET lun_entries CLOSING_BRACKET { lun = NULL; } @@ -500,28 +500,28 @@ lun_number: NUM } ; -lun_statement_entries: +lun_entries: | - lun_statement_entries lun_statement_entry + lun_entries lun_entry ; -lun_statement_entry: - backend_statement +lun_entry: + lun_backend | - blocksize_statement + lun_blocksize | - device_id_statement + lun_device_id | - option_statement + lun_option | - path_statement + lun_path | - serial_statement + lun_serial | - size_statement + lun_size ; -backend_statement: BACKEND STR +lun_backend: BACKEND STR { if (lun->l_backend != NULL) { log_warnx("backend for lun %d, target \"%s\" " @@ -535,7 +535,7 @@ backend_statement: BACKEND STR } ; -blocksize_statement: BLOCKSIZE NUM +lun_blocksize: BLOCKSIZE NUM { if (lun->l_blocksize != 0) { log_warnx("blocksize for lun %d, target \"%s\" " @@ -547,7 +547,7 @@ blocksize_statement: BLOCKSIZE NUM } ; -device_id_statement: DEVICE_ID STR +lun_device_id: DEVICE_ID STR { if (lun->l_device_id != NULL) { log_warnx("device_id for lun %d, target \"%s\" " @@ -561,7 +561,7 @@ device_id_statement: DEVICE_ID STR } ; -option_statement: OPTION STR STR +lun_option: OPTION STR STR { struct lun_option *clo; @@ -573,7 +573,7 @@ option_statement: OPTION STR STR } ; -path_statement: PATH STR +lun_path: PATH STR { if (lun->l_path != NULL) { log_warnx("path for lun %d, target \"%s\" " @@ -587,7 +587,7 @@ path_statement: PATH STR } ; -serial_statement: SERIAL STR +lun_serial: SERIAL STR { if (lun->l_serial != NULL) { log_warnx("serial for lun %d, target \"%s\" " @@ -601,7 +601,7 @@ serial_statement: SERIAL STR } ; -size_statement: SIZE NUM +lun_size: SIZE NUM { if (lun->l_size != 0) { log_warnx("size for lun %d, target \"%s\" " From owner-svn-src-stable@FreeBSD.ORG Tue Mar 25 12:10:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3155B4AA; Tue, 25 Mar 2014 12:10:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1C2ED1C5; Tue, 25 Mar 2014 12:10:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2PCAW3B070030; Tue, 25 Mar 2014 12:10:32 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2PCAUaa070023; Tue, 25 Mar 2014 12:10:30 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201403251210.s2PCAUaa070023@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 25 Mar 2014 12:10:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263723 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 12:10:32 -0000 Author: trasz Date: Tue Mar 25 12:10:30 2014 New Revision: 263723 URL: http://svnweb.freebsd.org/changeset/base/263723 Log: MFC r261757: Rename a variable, no functional changes. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/ctld/ctld.c stable/10/usr.sbin/ctld/ctld.h stable/10/usr.sbin/ctld/discovery.c stable/10/usr.sbin/ctld/kernel.c stable/10/usr.sbin/ctld/login.c stable/10/usr.sbin/ctld/parse.y Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/ctld.c ============================================================================== --- stable/10/usr.sbin/ctld/ctld.c Tue Mar 25 12:08:35 2014 (r263722) +++ stable/10/usr.sbin/ctld/ctld.c Tue Mar 25 12:10:30 2014 (r263723) @@ -164,7 +164,7 @@ auth_check_secret_length(struct auth *au log_warnx("secret for user \"%s\", target \"%s\", " "is too long; it should be at most 16 characters " "long", auth->a_user, - auth->a_auth_group->ag_target->t_iqn); + auth->a_auth_group->ag_target->t_name); } if (len < 12) { if (auth->a_auth_group->ag_name != NULL) @@ -176,7 +176,7 @@ auth_check_secret_length(struct auth *au log_warnx("secret for user \"%s\", target \"%s\", " "is too short; it should be at least 16 characters " "long", auth->a_user, - auth->a_auth_group->ag_target->t_iqn); + auth->a_auth_group->ag_target->t_name); } if (auth->a_mutual_secret != NULL) { @@ -192,7 +192,7 @@ auth_check_secret_length(struct auth *au "target \"%s\", is too long; it should " "be at most 16 characters long", auth->a_user, - auth->a_auth_group->ag_target->t_iqn); + auth->a_auth_group->ag_target->t_name); } if (len < 12) { if (auth->a_auth_group->ag_name != NULL) @@ -205,7 +205,7 @@ auth_check_secret_length(struct auth *au "target \"%s\", is too short; it should be " "at least 16 characters long", auth->a_user, - auth->a_auth_group->ag_target->t_iqn); + auth->a_auth_group->ag_target->t_name); } } } @@ -225,7 +225,7 @@ auth_new_chap(struct auth_group *ag, con else log_warnx("cannot mix \"chap\" authentication with " "other types for target \"%s\"", - ag->ag_target->t_iqn); + ag->ag_target->t_name); return (NULL); } @@ -254,7 +254,7 @@ auth_new_chap_mutual(struct auth_group * else log_warnx("cannot mix \"chap-mutual\" authentication " "with other types for target \"%s\"", - ag->ag_target->t_iqn); + ag->ag_target->t_name); return (NULL); } @@ -686,31 +686,31 @@ valid_iscsi_name(const char *name) } struct target * -target_new(struct conf *conf, const char *iqn) +target_new(struct conf *conf, const char *name) { struct target *targ; int i, len; - targ = target_find(conf, iqn); + targ = target_find(conf, name); if (targ != NULL) { - log_warnx("duplicated target \"%s\"", iqn); + log_warnx("duplicated target \"%s\"", name); return (NULL); } - if (valid_iscsi_name(iqn) == false) { - log_warnx("target name \"%s\" is invalid", iqn); + if (valid_iscsi_name(name) == false) { + log_warnx("target name \"%s\" is invalid", name); return (NULL); } targ = calloc(1, sizeof(*targ)); if (targ == NULL) log_err(1, "calloc"); - targ->t_iqn = checked_strdup(iqn); + targ->t_name = checked_strdup(name); /* * RFC 3722 requires us to normalize the name to lowercase. */ - len = strlen(iqn); + len = strlen(name); for (i = 0; i < len; i++) - targ->t_iqn[i] = tolower(targ->t_iqn[i]); + targ->t_name[i] = tolower(targ->t_name[i]); TAILQ_INIT(&targ->t_luns); targ->t_conf = conf; @@ -728,17 +728,17 @@ target_delete(struct target *targ) TAILQ_FOREACH_SAFE(lun, &targ->t_luns, l_next, tmp) lun_delete(lun); - free(targ->t_iqn); + free(targ->t_name); free(targ); } struct target * -target_find(struct conf *conf, const char *iqn) +target_find(struct conf *conf, const char *name) { struct target *targ; TAILQ_FOREACH(targ, &conf->conf_targets, t_next) { - if (strcasecmp(targ->t_iqn, iqn) == 0) + if (strcasecmp(targ->t_name, name) == 0) return (targ); } @@ -753,7 +753,7 @@ lun_new(struct target *targ, int lun_id) lun = lun_find(targ, lun_id); if (lun != NULL) { log_warnx("duplicated lun %d for target \"%s\"", - lun_id, targ->t_iqn); + lun_id, targ->t_name); return (NULL); } @@ -854,7 +854,7 @@ lun_option_new(struct lun *lun, const ch lo = lun_option_find(lun, name); if (lo != NULL) { log_warnx("duplicated lun option %s for lun %d, target \"%s\"", - name, lun->l_lun, lun->l_target->t_iqn); + name, lun->l_lun, lun->l_target->t_name); return (NULL); } @@ -958,7 +958,7 @@ conf_print(struct conf *conf) fprintf(stderr, "}\n"); } TAILQ_FOREACH(targ, &conf->conf_targets, t_next) { - fprintf(stderr, "target %s {\n", targ->t_iqn); + fprintf(stderr, "target %s {\n", targ->t_name); if (targ->t_alias != NULL) fprintf(stderr, "\t alias %s\n", targ->t_alias); TAILQ_FOREACH(lun, &targ->t_luns, l_next) { @@ -985,39 +985,39 @@ conf_verify_lun(struct lun *lun) if (strcmp(lun->l_backend, "block") == 0) { if (lun->l_path == NULL) { log_warnx("missing path for lun %d, target \"%s\"", - lun->l_lun, lun->l_target->t_iqn); + lun->l_lun, lun->l_target->t_name); return (1); } } else if (strcmp(lun->l_backend, "ramdisk") == 0) { if (lun->l_size == 0) { log_warnx("missing size for ramdisk-backed lun %d, " - "target \"%s\"", lun->l_lun, lun->l_target->t_iqn); + "target \"%s\"", lun->l_lun, lun->l_target->t_name); return (1); } if (lun->l_path != NULL) { log_warnx("path must not be specified " "for ramdisk-backed lun %d, target \"%s\"", - lun->l_lun, lun->l_target->t_iqn); + lun->l_lun, lun->l_target->t_name); return (1); } } if (lun->l_lun < 0 || lun->l_lun > 255) { log_warnx("invalid lun number for lun %d, target \"%s\"; " "must be between 0 and 255", lun->l_lun, - lun->l_target->t_iqn); + lun->l_target->t_name); return (1); } if (lun->l_blocksize == 0) { lun_set_blocksize(lun, DEFAULT_BLOCKSIZE); } else if (lun->l_blocksize < 0) { log_warnx("invalid blocksize for lun %d, target \"%s\"; " - "must be larger than 0", lun->l_lun, lun->l_target->t_iqn); + "must be larger than 0", lun->l_lun, lun->l_target->t_name); return (1); } if (lun->l_size != 0 && lun->l_size % lun->l_blocksize != 0) { log_warnx("invalid size for lun %d, target \"%s\"; " "must be multiple of blocksize", lun->l_lun, - lun->l_target->t_iqn); + lun->l_target->t_name); return (1); } TAILQ_FOREACH(targ2, &lun->l_target->t_conf->conf_targets, t_next) { @@ -1029,8 +1029,8 @@ conf_verify_lun(struct lun *lun) log_debugx("WARNING: path \"%s\" duplicated " "between lun %d, target \"%s\", and " "lun %d, target \"%s\"", lun->l_path, - lun->l_lun, lun->l_target->t_iqn, - lun2->l_lun, lun2->l_target->t_iqn); + lun->l_lun, lun->l_target->t_name, + lun2->l_lun, lun2->l_target->t_name); } } } @@ -1055,7 +1055,7 @@ conf_verify(struct conf *conf) if (targ->t_auth_group == NULL) { log_warnx("missing authentication for target \"%s\"; " "must specify either \"auth-group\", \"chap\", " - "or \"chap-mutual\"", targ->t_iqn); + "or \"chap-mutual\"", targ->t_name); return (1); } if (targ->t_portal_group == NULL) { @@ -1073,7 +1073,7 @@ conf_verify(struct conf *conf) } if (!found_lun0) { log_warnx("mandatory LUN 0 not configured " - "for target \"%s\"", targ->t_iqn); + "for target \"%s\"", targ->t_name); return (1); } } @@ -1169,20 +1169,20 @@ conf_apply(struct conf *oldconf, struct * First, remove any targets present in the old configuration * and missing in the new one. */ - newtarg = target_find(newconf, oldtarg->t_iqn); + newtarg = target_find(newconf, oldtarg->t_name); if (newtarg == NULL) { TAILQ_FOREACH_SAFE(oldlun, &oldtarg->t_luns, l_next, tmplun) { log_debugx("target %s not found in new " "configuration; removing its lun %d, " "backed by CTL lun %d", - oldtarg->t_iqn, oldlun->l_lun, + oldtarg->t_name, oldlun->l_lun, oldlun->l_ctl_lun); error = kernel_lun_remove(oldlun); if (error != 0) { log_warnx("failed to remove lun %d, " "target %s, CTL lun %d", - oldlun->l_lun, oldtarg->t_iqn, + oldlun->l_lun, oldtarg->t_name, oldlun->l_ctl_lun); cumulated_error++; } @@ -1201,13 +1201,13 @@ conf_apply(struct conf *oldconf, struct if (newlun == NULL) { log_debugx("lun %d, target %s, CTL lun %d " "not found in new configuration; " - "removing", oldlun->l_lun, oldtarg->t_iqn, + "removing", oldlun->l_lun, oldtarg->t_name, oldlun->l_ctl_lun); error = kernel_lun_remove(oldlun); if (error != 0) { log_warnx("failed to remove lun %d, " "target %s, CTL lun %d", - oldlun->l_lun, oldtarg->t_iqn, + oldlun->l_lun, oldtarg->t_name, oldlun->l_ctl_lun); cumulated_error++; } @@ -1224,14 +1224,14 @@ conf_apply(struct conf *oldconf, struct if (strcmp(newlun->l_backend, oldlun->l_backend) != 0) { log_debugx("backend for lun %d, target %s, " "CTL lun %d changed; removing", - oldlun->l_lun, oldtarg->t_iqn, + oldlun->l_lun, oldtarg->t_name, oldlun->l_ctl_lun); changed = 1; } if (oldlun->l_blocksize != newlun->l_blocksize) { log_debugx("blocksize for lun %d, target %s, " "CTL lun %d changed; removing", - oldlun->l_lun, oldtarg->t_iqn, + oldlun->l_lun, oldtarg->t_name, oldlun->l_ctl_lun); changed = 1; } @@ -1241,7 +1241,7 @@ conf_apply(struct conf *oldconf, struct 0)) { log_debugx("device-id for lun %d, target %s, " "CTL lun %d changed; removing", - oldlun->l_lun, oldtarg->t_iqn, + oldlun->l_lun, oldtarg->t_name, oldlun->l_ctl_lun); changed = 1; } @@ -1250,7 +1250,7 @@ conf_apply(struct conf *oldconf, struct strcmp(oldlun->l_path, newlun->l_path) != 0)) { log_debugx("path for lun %d, target %s, " "CTL lun %d, changed; removing", - oldlun->l_lun, oldtarg->t_iqn, + oldlun->l_lun, oldtarg->t_name, oldlun->l_ctl_lun); changed = 1; } @@ -1259,7 +1259,7 @@ conf_apply(struct conf *oldconf, struct strcmp(oldlun->l_serial, newlun->l_serial) != 0)) { log_debugx("serial for lun %d, target %s, " "CTL lun %d changed; removing", - oldlun->l_lun, oldtarg->t_iqn, + oldlun->l_lun, oldtarg->t_name, oldlun->l_ctl_lun); changed = 1; } @@ -1268,7 +1268,7 @@ conf_apply(struct conf *oldconf, struct if (error != 0) { log_warnx("failed to remove lun %d, " "target %s, CTL lun %d", - oldlun->l_lun, oldtarg->t_iqn, + oldlun->l_lun, oldtarg->t_name, oldlun->l_ctl_lun); cumulated_error++; } @@ -1284,7 +1284,7 @@ conf_apply(struct conf *oldconf, struct * Now add new targets or modify existing ones. */ TAILQ_FOREACH(newtarg, &newconf->conf_targets, t_next) { - oldtarg = target_find(oldconf, newtarg->t_iqn); + oldtarg = target_find(oldconf, newtarg->t_name); TAILQ_FOREACH(newlun, &newtarg->t_luns, l_next) { if (oldtarg != NULL) { @@ -1294,7 +1294,7 @@ conf_apply(struct conf *oldconf, struct log_debugx("resizing lun %d, " "target %s, CTL lun %d", newlun->l_lun, - newtarg->t_iqn, + newtarg->t_name, newlun->l_ctl_lun); error = kernel_lun_resize(newlun); @@ -1304,7 +1304,7 @@ conf_apply(struct conf *oldconf, struct "target %s, " "CTL lun %d", newlun->l_lun, - newtarg->t_iqn, + newtarg->t_name, newlun->l_lun); cumulated_error++; } @@ -1313,11 +1313,11 @@ conf_apply(struct conf *oldconf, struct } } log_debugx("adding lun %d, target %s", - newlun->l_lun, newtarg->t_iqn); + newlun->l_lun, newtarg->t_name); error = kernel_lun_add(newlun); if (error != 0) { log_warnx("failed to add lun %d, target %s", - newlun->l_lun, newtarg->t_iqn); + newlun->l_lun, newtarg->t_name); cumulated_error++; } } Modified: stable/10/usr.sbin/ctld/ctld.h ============================================================================== --- stable/10/usr.sbin/ctld/ctld.h Tue Mar 25 12:08:35 2014 (r263722) +++ stable/10/usr.sbin/ctld/ctld.h Tue Mar 25 12:10:30 2014 (r263723) @@ -131,7 +131,7 @@ struct target { struct conf *t_conf; struct auth_group *t_auth_group; struct portal_group *t_portal_group; - char *t_iqn; + char *t_name; char *t_alias; }; @@ -224,10 +224,10 @@ struct portal_group *portal_group_find(s int portal_group_add_listen(struct portal_group *pg, const char *listen, bool iser); -struct target *target_new(struct conf *conf, const char *iqn); +struct target *target_new(struct conf *conf, const char *name); void target_delete(struct target *target); struct target *target_find(struct conf *conf, - const char *iqn); + const char *name); struct lun *lun_new(struct target *target, int lun_id); void lun_delete(struct lun *lun); Modified: stable/10/usr.sbin/ctld/discovery.c ============================================================================== --- stable/10/usr.sbin/ctld/discovery.c Tue Mar 25 12:08:35 2014 (r263722) +++ stable/10/usr.sbin/ctld/discovery.c Tue Mar 25 12:10:30 2014 (r263723) @@ -186,10 +186,10 @@ discovery(struct connection *conn) conn->conn_portal->p_portal_group) { log_debugx("not returning target \"%s\"; " "belongs to a different portal group", - targ->t_iqn); + targ->t_name); continue; } - keys_add(response_keys, "TargetName", targ->t_iqn); + keys_add(response_keys, "TargetName", targ->t_name); } } else { targ = target_find(conn->conn_portal->p_portal_group->pg_conf, @@ -198,7 +198,7 @@ discovery(struct connection *conn) log_debugx("initiator requested information on unknown " "target \"%s\"; returning nothing", send_targets); } else { - keys_add(response_keys, "TargetName", targ->t_iqn); + keys_add(response_keys, "TargetName", targ->t_name); } } keys_save(response_keys, response); Modified: stable/10/usr.sbin/ctld/kernel.c ============================================================================== --- stable/10/usr.sbin/ctld/kernel.c Tue Mar 25 12:08:35 2014 (r263722) +++ stable/10/usr.sbin/ctld/kernel.c Tue Mar 25 12:10:30 2014 (r263723) @@ -352,7 +352,7 @@ retry: log_warnx("found CTL lun %ju, backing lun %d, target " "%s, also backed by CTL lun %d; ignoring", (uintmax_t) lun->lun_id, cl->l_lun, - cl->l_target->t_iqn, cl->l_ctl_lun); + cl->l_target->t_name, cl->l_ctl_lun); continue; } @@ -382,7 +382,7 @@ retry: log_warnx("unable to add CTL lun option %s " "for CTL lun %ju for lun %d, target %s", nv->name, (uintmax_t) lun->lun_id, - cl->l_lun, cl->l_target->t_iqn); + cl->l_lun, cl->l_target->t_name); } } @@ -434,10 +434,10 @@ kernel_lun_add(struct lun *lun) lo = lun_option_find(lun, "cfiscsi_target"); if (lo != NULL) { - lun_option_set(lo, lun->l_target->t_iqn); + lun_option_set(lo, lun->l_target->t_name); } else { lo = lun_option_new(lun, "cfiscsi_target", - lun->l_target->t_iqn); + lun->l_target->t_name); assert(lo != NULL); } @@ -598,7 +598,7 @@ kernel_handoff(struct connection *conn) conn->conn_initiator_alias, sizeof(req.data.handoff.initiator_alias)); } strlcpy(req.data.handoff.target_name, - conn->conn_target->t_iqn, sizeof(req.data.handoff.target_name)); + conn->conn_target->t_name, sizeof(req.data.handoff.target_name)); req.data.handoff.socket = conn->conn_socket; req.data.handoff.portal_group_tag = conn->conn_portal->p_portal_group->pg_tag; Modified: stable/10/usr.sbin/ctld/login.c ============================================================================== --- stable/10/usr.sbin/ctld/login.c Tue Mar 25 12:08:35 2014 (r263722) +++ stable/10/usr.sbin/ctld/login.c Tue Mar 25 12:10:30 2014 (r263723) @@ -922,11 +922,11 @@ login(struct connection *conn) if (ag->ag_name != NULL) { log_debugx("initiator requests to connect " "to target \"%s\"; auth-group \"%s\"", - conn->conn_target->t_iqn, + conn->conn_target->t_name, conn->conn_target->t_auth_group->ag_name); } else { log_debugx("initiator requests to connect " - "to target \"%s\"", conn->conn_target->t_iqn); + "to target \"%s\"", conn->conn_target->t_name); } } else { assert(conn->conn_session_type == CONN_SESSION_TYPE_DISCOVERY); Modified: stable/10/usr.sbin/ctld/parse.y ============================================================================== --- stable/10/usr.sbin/ctld/parse.y Tue Mar 25 12:08:35 2014 (r263722) +++ stable/10/usr.sbin/ctld/parse.y Tue Mar 25 12:10:30 2014 (r263723) @@ -316,7 +316,7 @@ target_alias: ALIAS STR { if (target->t_alias != NULL) { log_warnx("alias for target \"%s\" " - "specified more than once", target->t_iqn); + "specified more than once", target->t_name); return (1); } target->t_alias = $2; @@ -328,17 +328,17 @@ target_auth_group: AUTH_GROUP STR if (target->t_auth_group != NULL) { if (target->t_auth_group->ag_name != NULL) log_warnx("auth-group for target \"%s\" " - "specified more than once", target->t_iqn); + "specified more than once", target->t_name); else log_warnx("cannot mix auth-group with explicit " "authorisations for target \"%s\"", - target->t_iqn); + target->t_name); return (1); } target->t_auth_group = auth_group_find(conf, $2); if (target->t_auth_group == NULL) { log_warnx("unknown auth-group \"%s\" for target " - "\"%s\"", $2, target->t_iqn); + "\"%s\"", $2, target->t_name); return (1); } free($2); @@ -353,7 +353,7 @@ target_chap: CHAP STR STR if (target->t_auth_group->ag_name != NULL) { log_warnx("cannot mix auth-group with explicit " "authorisations for target \"%s\"", - target->t_iqn); + target->t_name); free($2); free($3); return (1); @@ -383,7 +383,7 @@ target_chap_mutual: CHAP_MUTUAL STR STR if (target->t_auth_group->ag_name != NULL) { log_warnx("cannot mix auth-group with explicit " "authorisations for target \"%s\"", - target->t_iqn); + target->t_name); free($2); free($3); free($4); @@ -420,7 +420,7 @@ target_initiator_name: INITIATOR_NAME ST if (target->t_auth_group->ag_name != NULL) { log_warnx("cannot mix auth-group with " "initiator-name for target \"%s\"", - target->t_iqn); + target->t_name); free($2); return (1); } @@ -447,7 +447,7 @@ target_initiator_portal: INITIATOR_PORTA if (target->t_auth_group->ag_name != NULL) { log_warnx("cannot mix auth-group with " "initiator-portal for target \"%s\"", - target->t_iqn); + target->t_name); free($2); return (1); } @@ -470,14 +470,14 @@ target_portal_group: PORTAL_GROUP STR { if (target->t_portal_group != NULL) { log_warnx("portal-group for target \"%s\" " - "specified more than once", target->t_iqn); + "specified more than once", target->t_name); free($2); return (1); } target->t_portal_group = portal_group_find(conf, $2); if (target->t_portal_group == NULL) { log_warnx("unknown portal-group \"%s\" for target " - "\"%s\"", $2, target->t_iqn); + "\"%s\"", $2, target->t_name); free($2); return (1); } @@ -526,7 +526,7 @@ lun_backend: BACKEND STR if (lun->l_backend != NULL) { log_warnx("backend for lun %d, target \"%s\" " "specified more than once", - lun->l_lun, target->t_iqn); + lun->l_lun, target->t_name); free($2); return (1); } @@ -540,7 +540,7 @@ lun_blocksize: BLOCKSIZE NUM if (lun->l_blocksize != 0) { log_warnx("blocksize for lun %d, target \"%s\" " "specified more than once", - lun->l_lun, target->t_iqn); + lun->l_lun, target->t_name); return (1); } lun_set_blocksize(lun, $2); @@ -552,7 +552,7 @@ lun_device_id: DEVICE_ID STR if (lun->l_device_id != NULL) { log_warnx("device_id for lun %d, target \"%s\" " "specified more than once", - lun->l_lun, target->t_iqn); + lun->l_lun, target->t_name); free($2); return (1); } @@ -578,7 +578,7 @@ lun_path: PATH STR if (lun->l_path != NULL) { log_warnx("path for lun %d, target \"%s\" " "specified more than once", - lun->l_lun, target->t_iqn); + lun->l_lun, target->t_name); free($2); return (1); } @@ -592,7 +592,7 @@ lun_serial: SERIAL STR if (lun->l_serial != NULL) { log_warnx("serial for lun %d, target \"%s\" " "specified more than once", - lun->l_lun, target->t_iqn); + lun->l_lun, target->t_name); free($2); return (1); } @@ -606,7 +606,7 @@ lun_size: SIZE NUM if (lun->l_size != 0) { log_warnx("size for lun %d, target \"%s\" " "specified more than once", - lun->l_lun, target->t_iqn); + lun->l_lun, target->t_name); return (1); } lun_set_size(lun, $2); From owner-svn-src-stable@FreeBSD.ORG Tue Mar 25 12:12:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD2BC69A; Tue, 25 Mar 2014 12:12:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8C46B257; Tue, 25 Mar 2014 12:12:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2PCCcaU072398; Tue, 25 Mar 2014 12:12:38 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2PCCb7A072391; Tue, 25 Mar 2014 12:12:37 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201403251212.s2PCCb7A072391@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 25 Mar 2014 12:12:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263724 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 12:12:38 -0000 Author: trasz Date: Tue Mar 25 12:12:37 2014 New Revision: 263724 URL: http://svnweb.freebsd.org/changeset/base/263724 Log: MFC r261758: Add auth-type. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/ctld/ctl.conf.5 stable/10/usr.sbin/ctld/ctld.c stable/10/usr.sbin/ctld/ctld.h stable/10/usr.sbin/ctld/parse.y stable/10/usr.sbin/ctld/token.l Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/ctl.conf.5 ============================================================================== --- stable/10/usr.sbin/ctld/ctl.conf.5 Tue Mar 25 12:10:30 2014 (r263723) +++ stable/10/usr.sbin/ctld/ctl.conf.5 Tue Mar 25 12:12:37 2014 (r263724) @@ -101,6 +101,11 @@ Setting it to 0 disables the timeout. .Ss auth-group level The following statements are available at the auth-group level: .Bl -tag -width indent +.It Ic auth-type Ao Ar type Ac +Specifies authentication type. +Type can be either "none", "chap", or "chap-mutual". +In most cases it is not neccessary to set the type using this clause; +it is usually used to disable authentication for a given auth-group. .It Ic chap Ao Ar user Ac Aq Ar secret Specifies CHAP authentication credentials. .It Ic chap-mutual Ao Ar user Ac Ao Ar secret Ac Ao Ar mutualuser Ac Aq Ar mutualsecret @@ -147,6 +152,13 @@ There is no default; every target must u or chap, or chap-mutual statements. A special auth-group, "no-authentication", may be used to permit access without authentication. +.It Ic auth-type Ao Ar type Ac +Specifies authentication type. +Type can be either "none", "chap", or "chap-mutual". +In most cases it is not neccessary to set the type using this clause; +it is usually used to disable authentication for a given target. +This clause is mutually exclusive with auth-group; one cannot use +both in a single target. .It Ic chap Ao Ar user Ac Aq Ar secret Specifies CHAP authentication credentials. Note that targets must use either auth-group, or chap, Modified: stable/10/usr.sbin/ctld/ctld.c ============================================================================== --- stable/10/usr.sbin/ctld/ctld.c Tue Mar 25 12:10:30 2014 (r263723) +++ stable/10/usr.sbin/ctld/ctld.c Tue Mar 25 12:12:37 2014 (r263724) @@ -417,6 +417,58 @@ auth_group_find(struct conf *conf, const return (NULL); } +static int +auth_group_set_type(struct auth_group *ag, int type) +{ + + if (ag->ag_type == AG_TYPE_UNKNOWN) { + ag->ag_type = type; + return (0); + } + + if (ag->ag_type == type) + return (0); + + return (1); +} + +int +auth_group_set_type_str(struct auth_group *ag, const char *str) +{ + int error, type; + + if (strcmp(str, "none") == 0) { + type = AG_TYPE_NO_AUTHENTICATION; + } else if (strcmp(str, "chap") == 0) { + type = AG_TYPE_CHAP; + } else if (strcmp(str, "chap-mutual") == 0) { + type = AG_TYPE_CHAP_MUTUAL; + } else { + if (ag->ag_name != NULL) + log_warnx("invalid auth-type \"%s\" for auth-group " + "\"%s\"", str, ag->ag_name); + else + log_warnx("invalid auth-type \"%s\" for target " + "\"%s\"", str, ag->ag_target->t_name); + return (1); + } + + error = auth_group_set_type(ag, type); + if (error != 0) { + if (ag->ag_name != NULL) + log_warnx("cannot set auth-type to \"%s\" for " + "auth-group \"%s\"; already has a different " + "type", str, ag->ag_name); + else + log_warnx("cannot set auth-type to \"%s\" for target " + "\"%s\"; already has a different type", + str, ag->ag_target->t_name); + return (1); + } + + return (error); +} + static struct portal * portal_new(struct portal_group *pg) { Modified: stable/10/usr.sbin/ctld/ctld.h ============================================================================== --- stable/10/usr.sbin/ctld/ctld.h Tue Mar 25 12:10:30 2014 (r263723) +++ stable/10/usr.sbin/ctld/ctld.h Tue Mar 25 12:12:37 2014 (r263724) @@ -197,6 +197,8 @@ int conf_verify(struct conf *conf); struct auth_group *auth_group_new(struct conf *conf, const char *name); void auth_group_delete(struct auth_group *ag); struct auth_group *auth_group_find(struct conf *conf, const char *name); +int auth_group_set_type_str(struct auth_group *ag, + const char *type); const struct auth *auth_new_chap(struct auth_group *ag, const char *user, const char *secret); Modified: stable/10/usr.sbin/ctld/parse.y ============================================================================== --- stable/10/usr.sbin/ctld/parse.y Tue Mar 25 12:10:30 2014 (r263723) +++ stable/10/usr.sbin/ctld/parse.y Tue Mar 25 12:12:37 2014 (r263724) @@ -57,10 +57,10 @@ extern void yyrestart(FILE *); %} -%token ALIAS AUTH_GROUP BACKEND BLOCKSIZE CHAP CHAP_MUTUAL CLOSING_BRACKET -%token DEBUG DEVICE_ID DISCOVERY_AUTH_GROUP INITIATOR_NAME INITIATOR_PORTAL -%token LISTEN LISTEN_ISER LUN MAXPROC NUM OPENING_BRACKET OPTION PATH PIDFILE -%token PORTAL_GROUP SERIAL SIZE STR TARGET TIMEOUT +%token ALIAS AUTH_GROUP AUTH_TYPE BACKEND BLOCKSIZE CHAP CHAP_MUTUAL +%token CLOSING_BRACKET DEBUG DEVICE_ID DISCOVERY_AUTH_GROUP INITIATOR_NAME +%token INITIATOR_PORTAL LISTEN LISTEN_ISER LUN MAXPROC NUM OPENING_BRACKET +%token OPTION PATH PIDFILE PORTAL_GROUP SERIAL SIZE STR TARGET TIMEOUT %union { @@ -145,6 +145,8 @@ auth_group_entries: ; auth_group_entry: + auth_group_auth_type + | auth_group_chap | auth_group_chap_mutual @@ -154,6 +156,17 @@ auth_group_entry: auth_group_initiator_portal ; +auth_group_auth_type: AUTH_TYPE STR + { + int error; + + error = auth_group_set_type_str(auth_group, $2); + free($2); + if (error != 0) + return (1); + } + ; + auth_group_chap: CHAP STR STR { const struct auth *ca; @@ -299,6 +312,8 @@ target_entry: | target_auth_group | + target_auth_type + | target_chap | target_chap_mutual @@ -330,7 +345,7 @@ target_auth_group: AUTH_GROUP STR log_warnx("auth-group for target \"%s\" " "specified more than once", target->t_name); else - log_warnx("cannot mix auth-group with explicit " + log_warnx("cannot use both auth-group and explicit " "authorisations for target \"%s\"", target->t_name); return (1); @@ -345,14 +360,40 @@ target_auth_group: AUTH_GROUP STR } ; +target_auth_type: AUTH_TYPE STR + { + int error; + + if (target->t_auth_group != NULL) { + if (target->t_auth_group->ag_name != NULL) { + log_warnx("cannot use both auth-group and " + "auth-type for target \"%s\"", + target->t_name); + return (1); + } + } else { + target->t_auth_group = auth_group_new(conf, NULL); + if (target->t_auth_group == NULL) { + free($2); + return (1); + } + target->t_auth_group->ag_target = target; + } + error = auth_group_set_type_str(target->t_auth_group, $2); + free($2); + if (error != 0) + return (1); + } + ; + target_chap: CHAP STR STR { const struct auth *ca; if (target->t_auth_group != NULL) { if (target->t_auth_group->ag_name != NULL) { - log_warnx("cannot mix auth-group with explicit " - "authorisations for target \"%s\"", + log_warnx("cannot use both auth-group and " + "chap for target \"%s\"", target->t_name); free($2); free($3); @@ -381,8 +422,8 @@ target_chap_mutual: CHAP_MUTUAL STR STR if (target->t_auth_group != NULL) { if (target->t_auth_group->ag_name != NULL) { - log_warnx("cannot mix auth-group with explicit " - "authorisations for target \"%s\"", + log_warnx("cannot use both auth-group and " + "chap-mutual for target \"%s\"", target->t_name); free($2); free($3); @@ -418,7 +459,7 @@ target_initiator_name: INITIATOR_NAME ST if (target->t_auth_group != NULL) { if (target->t_auth_group->ag_name != NULL) { - log_warnx("cannot mix auth-group with " + log_warnx("cannot use both auth-group and " "initiator-name for target \"%s\"", target->t_name); free($2); @@ -445,7 +486,7 @@ target_initiator_portal: INITIATOR_PORTA if (target->t_auth_group != NULL) { if (target->t_auth_group->ag_name != NULL) { - log_warnx("cannot mix auth-group with " + log_warnx("cannot use both auth-group and " "initiator-portal for target \"%s\"", target->t_name); free($2); Modified: stable/10/usr.sbin/ctld/token.l ============================================================================== --- stable/10/usr.sbin/ctld/token.l Tue Mar 25 12:10:30 2014 (r263723) +++ stable/10/usr.sbin/ctld/token.l Tue Mar 25 12:12:37 2014 (r263724) @@ -50,6 +50,7 @@ extern int yylex(void); %% alias { return ALIAS; } auth-group { return AUTH_GROUP; } +auth-type { return AUTH_TYPE; } backend { return BACKEND; } blocksize { return BLOCKSIZE; } chap { return CHAP; } From owner-svn-src-stable@FreeBSD.ORG Tue Mar 25 12:14:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB62C7EC; Tue, 25 Mar 2014 12:14:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AE02B26E; Tue, 25 Mar 2014 12:14:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2PCEmDv072680; Tue, 25 Mar 2014 12:14:48 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2PCEmtq072678; Tue, 25 Mar 2014 12:14:48 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201403251214.s2PCEmtq072678@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 25 Mar 2014 12:14:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263725 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 12:14:48 -0000 Author: trasz Date: Tue Mar 25 12:14:48 2014 New Revision: 263725 URL: http://svnweb.freebsd.org/changeset/base/263725 Log: MFC r261759: Make it possible to redefine portal-group "default". Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/ctld/ctld.h stable/10/usr.sbin/ctld/parse.y Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/ctld.h ============================================================================== --- stable/10/usr.sbin/ctld/ctld.h Tue Mar 25 12:12:37 2014 (r263724) +++ stable/10/usr.sbin/ctld/ctld.h Tue Mar 25 12:14:48 2014 (r263725) @@ -146,6 +146,9 @@ struct conf { uint16_t conf_last_portal_group_tag; struct pidfh *conf_pidfh; + + bool conf_default_pg_defined; + bool conf_default_ag_defined; }; #define CONN_SESSION_TYPE_NONE 0 Modified: stable/10/usr.sbin/ctld/parse.y ============================================================================== --- stable/10/usr.sbin/ctld/parse.y Tue Mar 25 12:12:37 2014 (r263724) +++ stable/10/usr.sbin/ctld/parse.y Tue Mar 25 12:14:48 2014 (r263725) @@ -224,7 +224,17 @@ portal_group: PORTAL_GROUP portal_group_ portal_group_name: STR { - portal_group = portal_group_new(conf, $1); + /* + * Make it possible to redefine default + * portal-group. but only once. + */ + if (strcmp($1, "default") == 0 && + conf->conf_default_pg_defined == false) { + portal_group = portal_group_find(conf, $1); + conf->conf_default_pg_defined = true; + } else { + portal_group = portal_group_new(conf, $1); + } free($1); if (portal_group == NULL) return (1); @@ -703,6 +713,7 @@ conf_new_from_file(const char *path) conf = conf_new(); ag = auth_group_new(conf, "no-authentication"); + assert(ag != NULL); ag->ag_type = AG_TYPE_NO_AUTHENTICATION; /* @@ -710,11 +721,11 @@ conf_new_from_file(const char *path) * any entries and thus will always deny access. */ ag = auth_group_new(conf, "no-access"); + assert(ag != NULL); ag->ag_type = AG_TYPE_CHAP; pg = portal_group_new(conf, "default"); - portal_group_add_listen(pg, "0.0.0.0:3260", false); - portal_group_add_listen(pg, "[::]:3260", false); + assert(pg != NULL); yyin = fopen(path, "r"); if (yyin == NULL) { @@ -736,6 +747,15 @@ conf_new_from_file(const char *path) return (NULL); } + if (conf->conf_default_pg_defined == false) { + log_debugx("portal-group \"default\" not defined; " + "going with defaults"); + pg = portal_group_find(conf, "default"); + assert(pg != NULL); + portal_group_add_listen(pg, "0.0.0.0:3260", false); + portal_group_add_listen(pg, "[::]:3260", false); + } + error = conf_verify(conf); if (error != 0) { conf_delete(conf); From owner-svn-src-stable@FreeBSD.ORG Tue Mar 25 12:16:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D0A47B76; Tue, 25 Mar 2014 12:16:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A2D03293; Tue, 25 Mar 2014 12:16:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2PCGr2P073060; Tue, 25 Mar 2014 12:16:53 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2PCGrwF073058; Tue, 25 Mar 2014 12:16:53 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201403251216.s2PCGrwF073058@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 25 Mar 2014 12:16:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263726 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 12:16:53 -0000 Author: trasz Date: Tue Mar 25 12:16:52 2014 New Revision: 263726 URL: http://svnweb.freebsd.org/changeset/base/263726 Log: MFC r261760: Add a new auth-group "default", defaulting to deny, and make it possible to redefine it. From now on, assigning auth-group to a target is no longer mandatory. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/ctld/ctld.c stable/10/usr.sbin/ctld/parse.y Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/ctld.c ============================================================================== --- stable/10/usr.sbin/ctld/ctld.c Tue Mar 25 12:14:48 2014 (r263725) +++ stable/10/usr.sbin/ctld/ctld.c Tue Mar 25 12:16:52 2014 (r263726) @@ -1105,10 +1105,9 @@ conf_verify(struct conf *conf) TAILQ_FOREACH(targ, &conf->conf_targets, t_next) { if (targ->t_auth_group == NULL) { - log_warnx("missing authentication for target \"%s\"; " - "must specify either \"auth-group\", \"chap\", " - "or \"chap-mutual\"", targ->t_name); - return (1); + targ->t_auth_group = auth_group_find(conf, + "default"); + assert(targ->t_auth_group != NULL); } if (targ->t_portal_group == NULL) { targ->t_portal_group = portal_group_find(conf, Modified: stable/10/usr.sbin/ctld/parse.y ============================================================================== --- stable/10/usr.sbin/ctld/parse.y Tue Mar 25 12:14:48 2014 (r263725) +++ stable/10/usr.sbin/ctld/parse.y Tue Mar 25 12:16:52 2014 (r263726) @@ -132,7 +132,17 @@ auth_group: AUTH_GROUP auth_group_name auth_group_name: STR { - auth_group = auth_group_new(conf, $1); + /* + * Make it possible to redefine default + * auth-group. but only once. + */ + if (strcmp($1, "default") == 0 && + conf->conf_default_ag_defined == false) { + auth_group = auth_group_find(conf, $1); + conf->conf_default_ag_defined = true; + } else { + auth_group = auth_group_new(conf, $1); + } free($1); if (auth_group == NULL) return (1); @@ -712,6 +722,9 @@ conf_new_from_file(const char *path) conf = conf_new(); + ag = auth_group_new(conf, "default"); + assert(ag != NULL); + ag = auth_group_new(conf, "no-authentication"); assert(ag != NULL); ag->ag_type = AG_TYPE_NO_AUTHENTICATION; @@ -747,6 +760,14 @@ conf_new_from_file(const char *path) return (NULL); } + if (conf->conf_default_ag_defined == false) { + log_debugx("auth-group \"default\" not defined; " + "going with defaults"); + ag = auth_group_find(conf, "default"); + assert(ag != NULL); + ag->ag_type = AG_TYPE_CHAP; + } + if (conf->conf_default_pg_defined == false) { log_debugx("portal-group \"default\" not defined; " "going with defaults"); From owner-svn-src-stable@FreeBSD.ORG Tue Mar 25 12:18:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D3D3E24; Tue, 25 Mar 2014 12:18:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 29C522AC; Tue, 25 Mar 2014 12:18:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2PCIcW3073308; Tue, 25 Mar 2014 12:18:38 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2PCIcXI073307; Tue, 25 Mar 2014 12:18:38 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201403251218.s2PCIcXI073307@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 25 Mar 2014 12:18:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263727 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 12:18:38 -0000 Author: trasz Date: Tue Mar 25 12:18:37 2014 New Revision: 263727 URL: http://svnweb.freebsd.org/changeset/base/263727 Log: MFC r261761: Update manual page to match recent auth-group "default" changes. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/ctld/ctl.conf.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/ctl.conf.5 ============================================================================== --- stable/10/usr.sbin/ctld/ctl.conf.5 Tue Mar 25 12:16:52 2014 (r263726) +++ stable/10/usr.sbin/ctld/ctl.conf.5 Tue Mar 25 12:18:37 2014 (r263727) @@ -148,9 +148,10 @@ Assigns human-readable description to th There is no default. .It Ic auth-group Aq Ar name Assigns previously defined authentication group to that target. -There is no default; every target must use either auth-group, -or chap, or chap-mutual statements. -A special auth-group, "no-authentication", may be used to permit access +By default, targets that do not specify their own auth settings, +using clauses such as "chap" or "initiator-name", are assigned +predefined auth-group "default", which denies all access. +Another predefined auth-group, "no-authentication", may be used to permit access without authentication. .It Ic auth-type Ao Ar type Ac Specifies authentication type. From owner-svn-src-stable@FreeBSD.ORG Tue Mar 25 12:20:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 408D1F75; Tue, 25 Mar 2014 12:20:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 132852BA; Tue, 25 Mar 2014 12:20:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2PCKTWP073938; Tue, 25 Mar 2014 12:20:29 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2PCKT8c073936; Tue, 25 Mar 2014 12:20:29 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201403251220.s2PCKT8c073936@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 25 Mar 2014 12:20:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263728 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 12:20:30 -0000 Author: trasz Date: Tue Mar 25 12:20:29 2014 New Revision: 263728 URL: http://svnweb.freebsd.org/changeset/base/263728 Log: MFC r261762: Use "default" as default discovery-auth-group, instead of "no-access". It doesn't change visible behaviour, as previously auth-group "default" wasn't redefinable, so by default access was always denied. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/ctld/ctl.conf.5 stable/10/usr.sbin/ctld/ctld.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/ctl.conf.5 ============================================================================== --- stable/10/usr.sbin/ctld/ctl.conf.5 Tue Mar 25 12:18:37 2014 (r263727) +++ stable/10/usr.sbin/ctld/ctl.conf.5 Tue Mar 25 12:20:29 2014 (r263728) @@ -131,9 +131,11 @@ The following statements are available a .It Ic discovery-auth-group Aq Ar name Assigns previously defined authentication group to that portal group, to be used for target discovery. -By default, the discovery will be denied. -A special auth-group, "no-authentication", may be used to allow for discovery -without authentication. +By default, portal groups that do not specify their own auth settings, +using clauses such as "chap" or "initiator-name", are assigned +predefined auth-group "default", which denies discovery. +Another predefined auth-group, "no-authentication", may be used +to permit discovery without authentication. .It Ic listen Aq Ar address Specifies IPv4 or IPv6 address and port to listen on for incoming connections. .It Ic listen-iser Aq Ar address Modified: stable/10/usr.sbin/ctld/ctld.c ============================================================================== --- stable/10/usr.sbin/ctld/ctld.c Tue Mar 25 12:18:37 2014 (r263727) +++ stable/10/usr.sbin/ctld/ctld.c Tue Mar 25 12:20:29 2014 (r263728) @@ -1132,7 +1132,7 @@ conf_verify(struct conf *conf) assert(pg->pg_name != NULL); if (pg->pg_discovery_auth_group == NULL) { pg->pg_discovery_auth_group = - auth_group_find(conf, "no-access"); + auth_group_find(conf, "default"); assert(pg->pg_discovery_auth_group != NULL); } @@ -1159,6 +1159,7 @@ conf_verify(struct conf *conf) break; } if (targ == NULL && ag->ag_name != NULL && + strcmp(ag->ag_name, "default") != 0 && strcmp(ag->ag_name, "no-authentication") != 0 && strcmp(ag->ag_name, "no-access") != 0) { log_warnx("auth-group \"%s\" not assigned " From owner-svn-src-stable@FreeBSD.ORG Tue Mar 25 12:22:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8891616A; Tue, 25 Mar 2014 12:22:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 73AEA34F; Tue, 25 Mar 2014 12:22:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2PCMV3P076767; Tue, 25 Mar 2014 12:22:31 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2PCMU9H076758; Tue, 25 Mar 2014 12:22:30 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201403251222.s2PCMU9H076758@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 25 Mar 2014 12:22:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263729 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 12:22:31 -0000 Author: trasz Date: Tue Mar 25 12:22:30 2014 New Revision: 263729 URL: http://svnweb.freebsd.org/changeset/base/263729 Log: MFC r261763: Use new auth-type "deny" instead of using "chap" with no chap entries; it's cleaner this way, and gives better feedback to the user. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/ctld/ctl.conf.5 stable/10/usr.sbin/ctld/ctld.c stable/10/usr.sbin/ctld/ctld.h stable/10/usr.sbin/ctld/login.c stable/10/usr.sbin/ctld/parse.y Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/ctl.conf.5 ============================================================================== --- stable/10/usr.sbin/ctld/ctl.conf.5 Tue Mar 25 12:20:29 2014 (r263728) +++ stable/10/usr.sbin/ctld/ctl.conf.5 Tue Mar 25 12:22:30 2014 (r263729) @@ -103,7 +103,7 @@ The following statements are available a .Bl -tag -width indent .It Ic auth-type Ao Ar type Ac Specifies authentication type. -Type can be either "none", "chap", or "chap-mutual". +Type can be either "none", "deny", "chap", or "chap-mutual". In most cases it is not neccessary to set the type using this clause; it is usually used to disable authentication for a given auth-group. .It Ic chap Ao Ar user Ac Aq Ar secret @@ -157,7 +157,7 @@ Another predefined auth-group, "no-authe without authentication. .It Ic auth-type Ao Ar type Ac Specifies authentication type. -Type can be either "none", "chap", or "chap-mutual". +Type can be either "none", "deny", "chap", or "chap-mutual". In most cases it is not neccessary to set the type using this clause; it is usually used to disable authentication for a given target. This clause is mutually exclusive with auth-group; one cannot use Modified: stable/10/usr.sbin/ctld/ctld.c ============================================================================== --- stable/10/usr.sbin/ctld/ctld.c Tue Mar 25 12:20:29 2014 (r263728) +++ stable/10/usr.sbin/ctld/ctld.c Tue Mar 25 12:22:30 2014 (r263729) @@ -439,6 +439,8 @@ auth_group_set_type_str(struct auth_grou if (strcmp(str, "none") == 0) { type = AG_TYPE_NO_AUTHENTICATION; + } else if (strcmp(str, "deny") == 0) { + type = AG_TYPE_DENY; } else if (strcmp(str, "chap") == 0) { type = AG_TYPE_CHAP; } else if (strcmp(str, "chap-mutual") == 0) { Modified: stable/10/usr.sbin/ctld/ctld.h ============================================================================== --- stable/10/usr.sbin/ctld/ctld.h Tue Mar 25 12:20:29 2014 (r263728) +++ stable/10/usr.sbin/ctld/ctld.h Tue Mar 25 12:22:30 2014 (r263729) @@ -66,9 +66,10 @@ struct auth_portal { }; #define AG_TYPE_UNKNOWN 0 -#define AG_TYPE_NO_AUTHENTICATION 1 -#define AG_TYPE_CHAP 2 -#define AG_TYPE_CHAP_MUTUAL 3 +#define AG_TYPE_DENY 1 +#define AG_TYPE_NO_AUTHENTICATION 2 +#define AG_TYPE_CHAP 3 +#define AG_TYPE_CHAP_MUTUAL 4 struct auth_group { TAILQ_ENTRY(auth_group) ag_next; Modified: stable/10/usr.sbin/ctld/login.c ============================================================================== --- stable/10/usr.sbin/ctld/login.c Tue Mar 25 12:20:29 2014 (r263728) +++ stable/10/usr.sbin/ctld/login.c Tue Mar 25 12:22:30 2014 (r263729) @@ -1034,6 +1034,11 @@ login(struct connection *conn) return; } + if (ag->ag_type == AG_TYPE_DENY) { + login_send_error(request, 0x02, 0x01); + log_errx(1, "auth-group type is \"deny\""); + } + if (ag->ag_type == AG_TYPE_UNKNOWN) { /* * This can happen with empty auth-group. Modified: stable/10/usr.sbin/ctld/parse.y ============================================================================== --- stable/10/usr.sbin/ctld/parse.y Tue Mar 25 12:20:29 2014 (r263728) +++ stable/10/usr.sbin/ctld/parse.y Tue Mar 25 12:22:30 2014 (r263729) @@ -729,13 +729,9 @@ conf_new_from_file(const char *path) assert(ag != NULL); ag->ag_type = AG_TYPE_NO_AUTHENTICATION; - /* - * Here, the type doesn't really matter, as the group doesn't contain - * any entries and thus will always deny access. - */ ag = auth_group_new(conf, "no-access"); assert(ag != NULL); - ag->ag_type = AG_TYPE_CHAP; + ag->ag_type = AG_TYPE_DENY; pg = portal_group_new(conf, "default"); assert(pg != NULL); @@ -765,7 +761,7 @@ conf_new_from_file(const char *path) "going with defaults"); ag = auth_group_find(conf, "default"); assert(ag != NULL); - ag->ag_type = AG_TYPE_CHAP; + ag->ag_type = AG_TYPE_DENY; } if (conf->conf_default_pg_defined == false) { From owner-svn-src-stable@FreeBSD.ORG Tue Mar 25 12:24:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C12D52C7; Tue, 25 Mar 2014 12:24:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AD78C35A; Tue, 25 Mar 2014 12:24:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2PCOIVJ077019; Tue, 25 Mar 2014 12:24:18 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2PCOIVl077018; Tue, 25 Mar 2014 12:24:18 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201403251224.s2PCOIVl077018@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 25 Mar 2014 12:24:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263730 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 12:24:18 -0000 Author: trasz Date: Tue Mar 25 12:24:18 2014 New Revision: 263730 URL: http://svnweb.freebsd.org/changeset/base/263730 Log: MFC r261764: So, it turns out SIGCHLD is discarded by default, so we have to set up a dummy handler to make it interrupt an ioctl(2) or select(2). This makes those short-lived ctld(8) zombies disappear. Sponsored by: The FreeBSD Foundation 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 Tue Mar 25 12:22:30 2014 (r263729) +++ stable/10/usr.sbin/ctld/ctld.c Tue Mar 25 12:24:18 2014 (r263730) @@ -1742,6 +1742,17 @@ sigterm_handler(int dummy __unused) } static void +sigchld_handler(int dummy __unused) +{ + + /* + * The only purpose of this handler is to make SIGCHLD + * interrupt the ISCSIDWAIT ioctl(2), so we can call + * wait_for_children(). + */ +} + +static void register_signals(void) { struct sigaction sa; @@ -1763,6 +1774,11 @@ register_signals(void) error = sigaction(SIGINT, &sa, NULL); if (error != 0) log_err(1, "sigaction"); + + sa.sa_handler = sigchld_handler; + error = sigaction(SIGCHLD, &sa, NULL); + if (error != 0) + log_err(1, "sigaction"); } int From owner-svn-src-stable@FreeBSD.ORG Tue Mar 25 12:26:01 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62998455; Tue, 25 Mar 2014 12:26:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4EACE374; Tue, 25 Mar 2014 12:26:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2PCQ1mD077295; Tue, 25 Mar 2014 12:26:01 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2PCQ1XI077294; Tue, 25 Mar 2014 12:26:01 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201403251226.s2PCQ1XI077294@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 25 Mar 2014 12:26:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263731 - stable/10/usr.bin/rctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 12:26:01 -0000 Author: trasz Date: Tue Mar 25 12:26:00 2014 New Revision: 263731 URL: http://svnweb.freebsd.org/changeset/base/263731 Log: MFC r261962: Mention that rctl(8) was sponsored by the Foundation. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.bin/rctl/rctl.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/rctl/rctl.8 ============================================================================== --- stable/10/usr.bin/rctl/rctl.8 Tue Mar 25 12:24:18 2014 (r263730) +++ stable/10/usr.bin/rctl/rctl.8 Tue Mar 25 12:26:00 2014 (r263731) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 14, 2014 +.Dd February 16, 2014 .Dt RCTL 8 .Os .Sh NAME @@ -267,8 +267,9 @@ command appeared in .An -nosplit The .Nm -command was written by -.An Edward Tomasz Napierala Aq trasz@FreeBSD.org . +was developed by +.An Edward Tomasz Napierala Aq trasz@FreeBSD.org +under sponsorship from the FreeBSD Foundation. .Sh BUGS Limiting .Sy memoryuse From owner-svn-src-stable@FreeBSD.ORG Tue Mar 25 12:31:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 236CC82F; Tue, 25 Mar 2014 12:31:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0E160614; Tue, 25 Mar 2014 12:31:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2PCV896078885; Tue, 25 Mar 2014 12:31:08 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2PCV8N7078884; Tue, 25 Mar 2014 12:31:08 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201403251231.s2PCV8N7078884@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 25 Mar 2014 12:31:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263732 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 12:31:09 -0000 Author: trasz Date: Tue Mar 25 12:31:08 2014 New Revision: 263732 URL: http://svnweb.freebsd.org/changeset/base/263732 Log: MFC r261751: The log_whatever() routines don't accept NULL for format strings, so mark them as __printflike instead of__printf0like. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/ctld/ctld.h Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/ctld.h ============================================================================== --- stable/10/usr.sbin/ctld/ctld.h Tue Mar 25 12:26:00 2014 (r263731) +++ stable/10/usr.sbin/ctld/ctld.h Tue Mar 25 12:31:08 2014 (r263732) @@ -295,12 +295,12 @@ void log_init(int level); void log_set_peer_name(const char *name); void log_set_peer_addr(const char *addr); void log_err(int, const char *, ...) - __dead2 __printf0like(2, 3); + __dead2 __printflike(2, 3); void log_errx(int, const char *, ...) - __dead2 __printf0like(2, 3); -void log_warn(const char *, ...) __printf0like(1, 2); + __dead2 __printflike(2, 3); +void log_warn(const char *, ...) __printflike(1, 2); void log_warnx(const char *, ...) __printflike(1, 2); -void log_debugx(const char *, ...) __printf0like(1, 2); +void log_debugx(const char *, ...) __printflike(1, 2); char *checked_strdup(const char *); bool valid_iscsi_name(const char *name); From owner-svn-src-stable@FreeBSD.ORG Tue Mar 25 12:33:17 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF10E98B; Tue, 25 Mar 2014 12:33:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C1783636; Tue, 25 Mar 2014 12:33:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2PCXH8m081243; Tue, 25 Mar 2014 12:33:17 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2PCXHgI081239; Tue, 25 Mar 2014 12:33:17 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201403251233.s2PCXHgI081239@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 25 Mar 2014 12:33:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263733 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 12:33:18 -0000 Author: trasz Date: Tue Mar 25 12:33:16 2014 New Revision: 263733 URL: http://svnweb.freebsd.org/changeset/base/263733 Log: MFC r261752: Empty data segment during Login Phase is rather unlikely, but it's not, by itself, a protocol error. This fixes interoperability with OpenBSD initiator. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/ctld/discovery.c stable/10/usr.sbin/ctld/keys.c stable/10/usr.sbin/ctld/login.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/discovery.c ============================================================================== --- stable/10/usr.sbin/ctld/discovery.c Tue Mar 25 12:31:08 2014 (r263732) +++ stable/10/usr.sbin/ctld/discovery.c Tue Mar 25 12:33:16 2014 (r263733) @@ -61,9 +61,6 @@ text_receive(struct connection *conn) */ if ((bhstr->bhstr_flags & BHSTR_FLAGS_CONTINUE) != 0) log_errx(1, "received Text PDU with unsupported \"C\" flag"); - if (request->pdu_data_len == 0) - log_errx(1, "received Text PDU with empty data segment"); - if (ntohl(bhstr->bhstr_cmdsn) < conn->conn_cmdsn) { log_errx(1, "received Text PDU with decreasing CmdSN: " "was %d, is %d", conn->conn_cmdsn, ntohl(bhstr->bhstr_cmdsn)); Modified: stable/10/usr.sbin/ctld/keys.c ============================================================================== --- stable/10/usr.sbin/ctld/keys.c Tue Mar 25 12:31:08 2014 (r263732) +++ stable/10/usr.sbin/ctld/keys.c Tue Mar 25 12:33:16 2014 (r263733) @@ -64,7 +64,7 @@ keys_load(struct keys *keys, const struc size_t pair_len; if (pdu->pdu_data_len == 0) - log_errx(1, "protocol error: empty data segment"); + return; if (pdu->pdu_data[pdu->pdu_data_len - 1] != '\0') log_errx(1, "protocol error: key not NULL-terminated\n"); Modified: stable/10/usr.sbin/ctld/login.c ============================================================================== --- stable/10/usr.sbin/ctld/login.c Tue Mar 25 12:31:08 2014 (r263732) +++ stable/10/usr.sbin/ctld/login.c Tue Mar 25 12:33:16 2014 (r263733) @@ -128,10 +128,6 @@ login_receive(struct connection *conn, b log_errx(1, "received Login PDU with unsupported " "Version-min 0x%x", bhslr->bhslr_version_min); } - if (request->pdu_data_len == 0) { - login_send_error(request, 0x02, 0x00); - log_errx(1, "received Login PDU with empty data segment"); - } if (ntohl(bhslr->bhslr_cmdsn) < conn->conn_cmdsn) { login_send_error(request, 0x02, 0x05); log_errx(1, "received Login PDU with decreasing CmdSN: " From owner-svn-src-stable@FreeBSD.ORG Tue Mar 25 12:38:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D0B0BBB0; Tue, 25 Mar 2014 12:38:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BD019688; Tue, 25 Mar 2014 12:38:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2PCchpY081886; Tue, 25 Mar 2014 12:38:43 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2PCch3N081885; Tue, 25 Mar 2014 12:38:43 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201403251238.s2PCch3N081885@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 25 Mar 2014 12:38:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263734 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 12:38:43 -0000 Author: trasz Date: Tue Mar 25 12:38:43 2014 New Revision: 263734 URL: http://svnweb.freebsd.org/changeset/base/263734 Log: MFC r263356: Make the error message more clear. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/ctld/login.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/login.c ============================================================================== --- stable/10/usr.sbin/ctld/login.c Tue Mar 25 12:33:16 2014 (r263733) +++ stable/10/usr.sbin/ctld/login.c Tue Mar 25 12:38:43 2014 (r263734) @@ -1032,7 +1032,7 @@ login(struct connection *conn) if (ag->ag_type == AG_TYPE_DENY) { login_send_error(request, 0x02, 0x01); - log_errx(1, "auth-group type is \"deny\""); + log_errx(1, "auth-type is \"deny\""); } if (ag->ag_type == AG_TYPE_UNKNOWN) { @@ -1040,7 +1040,7 @@ login(struct connection *conn) * This can happen with empty auth-group. */ login_send_error(request, 0x02, 0x01); - log_errx(1, "auth-group type not set, denying access"); + log_errx(1, "auth-type not set, denying access"); } log_debugx("CHAP authentication required"); From owner-svn-src-stable@FreeBSD.ORG Tue Mar 25 13:18:10 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B1D8971; Tue, 25 Mar 2014 13:18:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 568CFA4A; Tue, 25 Mar 2014 13:18:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2PDIAa5098462; Tue, 25 Mar 2014 13:18:10 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2PDIAlJ098461; Tue, 25 Mar 2014 13:18:10 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201403251318.s2PDIAlJ098461@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 25 Mar 2014 13:18:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263735 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 13:18:10 -0000 Author: trasz Date: Tue Mar 25 13:18:09 2014 New Revision: 263735 URL: http://svnweb.freebsd.org/changeset/base/263735 Log: MFC 262782: Fix missing unlock in persistent reservations code, which resulted in panics with Hyper-V Failover Cluster. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Tue Mar 25 12:38:43 2014 (r263734) +++ stable/10/sys/cam/ctl/ctl.c Tue Mar 25 13:18:09 2014 (r263735) @@ -8071,6 +8071,7 @@ ctl_persistent_reserve_out(struct ctl_sc ctl_done((union ctl_io *)ctsio); return (CTL_RETVAL_COMPLETE); } + mtx_unlock(&softc->ctl_lock); } else /* create a reservation */ { /* * If it's not an "all registrants" type record From owner-svn-src-stable@FreeBSD.ORG Tue Mar 25 15:35:34 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46265F11; Tue, 25 Mar 2014 15:35:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3260FC65; Tue, 25 Mar 2014 15:35:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2PFZYQC056416; Tue, 25 Mar 2014 15:35:34 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2PFZYX3056415; Tue, 25 Mar 2014 15:35:34 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201403251535.s2PFZYX3056415@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Tue, 25 Mar 2014 15:35:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263739 - stable/9/sbin/ifconfig X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 15:35:34 -0000 Author: des Date: Tue Mar 25 15:35:33 2014 New Revision: 263739 URL: http://svnweb.freebsd.org/changeset/base/263739 Log: MFH (r256768): don't report an error for no-op add / remove Modified: stable/9/sbin/ifconfig/ifgroup.c Directory Properties: stable/9/sbin/ifconfig/ (props changed) Modified: stable/9/sbin/ifconfig/ifgroup.c ============================================================================== --- stable/9/sbin/ifconfig/ifgroup.c Tue Mar 25 15:03:08 2014 (r263738) +++ stable/9/sbin/ifconfig/ifgroup.c Tue Mar 25 15:35:33 2014 (r263739) @@ -57,7 +57,7 @@ setifgroup(const char *group_name, int d if (strlcpy(ifgr.ifgr_group, group_name, IFNAMSIZ) >= IFNAMSIZ) errx(1, "setifgroup: group name too long"); - if (ioctl(s, SIOCAIFGROUP, (caddr_t)&ifgr) == -1) + if (ioctl(s, SIOCAIFGROUP, (caddr_t)&ifgr) == -1 && errno != EEXIST) err(1," SIOCAIFGROUP"); } @@ -75,7 +75,7 @@ unsetifgroup(const char *group_name, int if (strlcpy(ifgr.ifgr_group, group_name, IFNAMSIZ) >= IFNAMSIZ) errx(1, "unsetifgroup: group name too long"); - if (ioctl(s, SIOCDIFGROUP, (caddr_t)&ifgr) == -1) + if (ioctl(s, SIOCDIFGROUP, (caddr_t)&ifgr) == -1 && errno != ENOENT) err(1, "SIOCDIFGROUP"); } From owner-svn-src-stable@FreeBSD.ORG Tue Mar 25 20:16:28 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF25E429; Tue, 25 Mar 2014 20:16:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CB6CCEAE; Tue, 25 Mar 2014 20:16:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2PKGSO3073213; Tue, 25 Mar 2014 20:16:28 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2PKGSiv073212; Tue, 25 Mar 2014 20:16:28 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201403252016.s2PKGSiv073212@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 25 Mar 2014 20:16:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263746 - stable/10/sys/x86/iommu X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 20:16:29 -0000 Author: kib Date: Tue Mar 25 20:16:28 2014 New Revision: 263746 URL: http://svnweb.freebsd.org/changeset/base/263746 Log: MFC r263305: Provide a workaround by identity mapping the 32 pages after the bogus entry start, which seems to be enough for the reported BIOS. 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 Tue Mar 25 19:28:40 2014 (r263745) +++ stable/10/sys/x86/iommu/intel_ctx.c Tue Mar 25 20:16:28 2014 (r263746) @@ -182,6 +182,15 @@ ctx_init_rmrr(struct dmar_ctx *ctx, devi end = entry->end; entry->start = trunc_page(start); entry->end = round_page(end); + if (entry->start == entry->end) { + /* Workaround for some AMI (?) BIOSes */ + if (bootverbose) { + device_printf(dev, "BIOS bug: dmar%d RMRR " + "region (%jx, %jx) corrected\n", + ctx->dmar->unit, start, end); + } + entry->end += DMAR_PAGE_SIZE * 0x20; + } size = OFF_TO_IDX(entry->end - entry->start); ma = malloc(sizeof(vm_page_t) * size, M_TEMP, M_WAITOK); for (i = 0; i < size; i++) { From owner-svn-src-stable@FreeBSD.ORG Tue Mar 25 20:17:58 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3623584; Tue, 25 Mar 2014 20:17:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A42EDEC4; Tue, 25 Mar 2014 20:17:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2PKHwaF073409; Tue, 25 Mar 2014 20:17:58 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2PKHwMG073406; Tue, 25 Mar 2014 20:17:58 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201403252017.s2PKHwMG073406@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 25 Mar 2014 20:17:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263747 - stable/10/sys/x86/iommu X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 20:17:58 -0000 Author: kib Date: Tue Mar 25 20:17:57 2014 New Revision: 263747 URL: http://svnweb.freebsd.org/changeset/base/263747 Log: MFC r263306: Add some support for the PCI(e)-PCI bridges to the Intel VT-d driver. Modified: stable/10/sys/x86/iommu/busdma_dmar.c stable/10/sys/x86/iommu/intel_ctx.c stable/10/sys/x86/iommu/intel_dmar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/iommu/busdma_dmar.c ============================================================================== --- stable/10/sys/x86/iommu/busdma_dmar.c Tue Mar 25 20:16:28 2014 (r263746) +++ stable/10/sys/x86/iommu/busdma_dmar.c Tue Mar 25 20:17:57 2014 (r263747) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -69,15 +70,10 @@ __FBSDID("$FreeBSD$"); */ static bool -dmar_bus_dma_is_dev_disabled(device_t dev) +dmar_bus_dma_is_dev_disabled(int domain, int bus, int slot, int func) { char str[128], *env; - int domain, bus, slot, func; - domain = pci_get_domain(dev); - bus = pci_get_bus(dev); - slot = pci_get_slot(dev); - func = pci_get_function(dev); snprintf(str, sizeof(str), "hw.busdma.pci%d.%d.%d.%d.bounce", domain, bus, slot, func); env = getenv(str); @@ -87,11 +83,119 @@ dmar_bus_dma_is_dev_disabled(device_t de return (true); } +/* + * Given original device, find the requester ID that will be seen by + * the DMAR unit and used for page table lookup. PCI bridges may take + * ownership of transactions from downstream devices, so it may not be + * the same as the BSF of the target device. In those cases, all + * devices downstream of the bridge must share a single mapping + * domain, and must collectively be assigned to use either DMAR or + * bounce mapping. + */ +static device_t +dmar_get_requester(device_t dev, int *bus, int *slot, int *func) +{ + devclass_t pci_class; + device_t pci, pcib, requester; + int cap_offset; + + pci_class = devclass_find("pci"); + requester = dev; + + *bus = pci_get_bus(dev); + *slot = pci_get_slot(dev); + *func = pci_get_function(dev); + + /* + * Walk the bridge hierarchy from the target device to the + * host port to find the translating bridge nearest the DMAR + * 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))); + 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))); + + 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))); + + /* + * The parent of our "bridge" isn't another PCI bus, + * so pcib isn't a PCI->PCI bridge but rather a host + * port, and the requester ID won't be translated + * further. + */ + if (device_get_devclass(device_get_parent(pcib)) != pci_class) + break; + + if (pci_find_cap(dev, PCIY_EXPRESS, &cap_offset) != 0) { + /* + * Device is not PCIe, it cannot be seen as a + * requester by DMAR unit. + */ + requester = pcib; + + /* Check whether the bus above is PCIe. */ + if (pci_find_cap(pcib, PCIY_EXPRESS, + &cap_offset) == 0) { + /* + * The current device is not PCIe, but + * the bridge above it is. This is a + * PCIe->PCI bridge. Assume that the + * requester ID will be the secondary + * bus number with slot and function + * set to zero. + * + * XXX: Doesn't handle the case where + * the bridge is PCIe->PCI-X, and the + * bridge will only take ownership of + * requests in some cases. We should + * provide context entries with the + * same page tables for taken and + * non-taken transactions. + */ + *bus = pci_get_bus(dev); + *slot = *func = 0; + } else { + /* + * Neither the device nor the bridge + * above it are PCIe. This is a + * conventional PCI->PCI bridge, which + * will use the bridge's BSF as the + * requester ID. + */ + *bus = pci_get_bus(pcib); + *slot = pci_get_slot(pcib); + *func = pci_get_function(pcib); + } + } + /* + * 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. + */ + + dev = pcib; + } + return (requester); +} + struct dmar_ctx * dmar_instantiate_ctx(struct dmar_unit *dmar, device_t dev, bool rmrr) { + device_t requester; struct dmar_ctx *ctx; bool disabled; + int bus, slot, func; + + requester = dmar_get_requester(dev, &bus, &slot, &func); /* * If the user requested the IOMMU disabled for the device, we @@ -100,11 +204,11 @@ dmar_instantiate_ctx(struct dmar_unit *d * Instead provide the identity mapping for the device * context. */ - disabled = dmar_bus_dma_is_dev_disabled(dev); - ctx = dmar_get_ctx(dmar, dev, disabled, rmrr); + disabled = dmar_bus_dma_is_dev_disabled(pci_get_domain(dev), bus, + slot, func); + ctx = dmar_get_ctx(dmar, requester, bus, slot, func, disabled, rmrr); if (ctx == NULL) return (NULL); - ctx->ctx_tag.owner = dev; if (disabled) { /* * Keep the first reference on context, release the Modified: stable/10/sys/x86/iommu/intel_ctx.c ============================================================================== --- stable/10/sys/x86/iommu/intel_ctx.c Tue Mar 25 20:16:28 2014 (r263746) +++ stable/10/sys/x86/iommu/intel_ctx.c Tue Mar 25 20:17:57 2014 (r263747) @@ -262,17 +262,15 @@ dmar_ctx_dtr(struct dmar_ctx *ctx, bool } struct dmar_ctx * -dmar_get_ctx(struct dmar_unit *dmar, device_t dev, bool id_mapped, bool rmrr_init) +dmar_get_ctx(struct dmar_unit *dmar, device_t dev, int bus, int slot, int func, + bool id_mapped, bool rmrr_init) { struct dmar_ctx *ctx, *ctx1; dmar_ctx_entry_t *ctxp; struct sf_buf *sf; - int bus, slot, func, error, mgaw; + int error, mgaw; bool enable; - bus = pci_get_bus(dev); - slot = pci_get_slot(dev); - func = pci_get_function(dev); enable = false; TD_PREP_PINNED_ASSERT; DMAR_LOCK(dmar); @@ -356,6 +354,7 @@ dmar_get_ctx(struct dmar_unit *dmar, dev ctx = dmar_find_ctx_locked(dmar, bus, slot, func); if (ctx == NULL) { ctx = ctx1; + ctx->ctx_tag.owner = dev; ctx->domain = alloc_unrl(dmar->domids); if (ctx->domain == -1) { DMAR_UNLOCK(dmar); @@ -376,9 +375,11 @@ 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 agaw %d\n", + "dmar%d pci%d:%d:%d:%d domain %d mgaw %d " + "agaw %d %s-mapped\n", dmar->unit, dmar->segment, bus, slot, - func, ctx->domain, ctx->mgaw, ctx->agaw); + func, ctx->domain, ctx->mgaw, ctx->agaw, + id_mapped ? "id" : "re"); } else { dmar_ctx_dtr(ctx1, true, true); } Modified: stable/10/sys/x86/iommu/intel_dmar.h ============================================================================== --- stable/10/sys/x86/iommu/intel_dmar.h Tue Mar 25 20:16:28 2014 (r263746) +++ stable/10/sys/x86/iommu/intel_dmar.h Tue Mar 25 20:17:57 2014 (r263747) @@ -270,7 +270,7 @@ void ctx_free_pgtbl(struct dmar_ctx *ctx struct dmar_ctx *dmar_instantiate_ctx(struct dmar_unit *dmar, device_t dev, bool rmrr); struct dmar_ctx *dmar_get_ctx(struct dmar_unit *dmar, device_t dev, - bool id_mapped, bool rmrr_init); + int bus, int slot, int func, bool id_mapped, bool rmrr_init); void dmar_free_ctx_locked(struct dmar_unit *dmar, struct dmar_ctx *ctx); void dmar_free_ctx(struct dmar_ctx *ctx); struct dmar_ctx *dmar_find_ctx_locked(struct dmar_unit *dmar, int bus, From owner-svn-src-stable@FreeBSD.ORG Tue Mar 25 22:43:35 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66A97435; Tue, 25 Mar 2014 22:43:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 53870ED2; Tue, 25 Mar 2014 22:43:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2PMhZPg035248; Tue, 25 Mar 2014 22:43:35 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2PMhZb9035247; Tue, 25 Mar 2014 22:43:35 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201403252243.s2PMhZb9035247@svn.freebsd.org> From: Dimitry Andric Date: Tue, 25 Mar 2014 22:43:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263751 - stable/9 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 22:43:35 -0000 Author: dim Date: Tue Mar 25 22:43:34 2014 New Revision: 263751 URL: http://svnweb.freebsd.org/changeset/base/263751 Log: MFC r243322 (by marcel): Unbreak amd64 cross-build where amd64 is the target. While clang may be installed as cc and we don't need to build gcc as a cross-tools, we still build gcc and thus need cc_tools built as a build tool. Not doing this results in building gengenrtl with the target compiler while we need to run it on the build machine. Modified: stable/9/Makefile.inc1 (contents, props changed) Modified: stable/9/Makefile.inc1 ============================================================================== --- stable/9/Makefile.inc1 Tue Mar 25 22:32:13 2014 (r263750) +++ stable/9/Makefile.inc1 Tue Mar 25 22:43:34 2014 (r263751) @@ -1204,7 +1204,7 @@ _aicasm= sys/modules/aic7xxx/aicasm _share= share/syscons/scrnmaps .endif -.if ${MK_GCC} != "no" && (${MK_CLANG_IS_CC} == "no" || ${TARGET} == "pc98") +.if ${MK_GCC} != "no" _gcc_tools= gnu/usr.bin/cc/cc_tools .endif From owner-svn-src-stable@FreeBSD.ORG Wed Mar 26 07:32:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2BB43885; Wed, 26 Mar 2014 07:32:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1385D2B2; Wed, 26 Mar 2014 07:32:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2Q7W7E9054172; Wed, 26 Mar 2014 07:32:07 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2Q7VvM5054096; Wed, 26 Mar 2014 07:31:57 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201403260731.s2Q7VvM5054096@svn.freebsd.org> From: Dimitry Andric Date: Wed, 26 Mar 2014 07:31:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263763 - in stable/10: contrib/compiler-rt/lib contrib/gcc contrib/llvm/include/llvm/MC contrib/llvm/include/llvm/Object contrib/llvm/include/llvm/Support contrib/llvm/lib/CodeGen/AsmP... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Mar 2014 07:32:07 -0000 Author: dim Date: Wed Mar 26 07:31:57 2014 New Revision: 263763 URL: http://svnweb.freebsd.org/changeset/base/263763 Log: MFC r262613: Merge the projects/clang-sparc64 branch back to head. This brings in several updates from the llvm and clang trunks to make the sparc64 backend fully functional. Apart from one patch to sys/sparc64/include/pcpu.h which is still under discussion, this makes it possible to let clang fully build world and kernel for sparc64. Any assistance with testing this on actual sparc64 hardware is greatly appreciated, as there will unavoidably be bugs left. Many thanks go to Roman Divacky for his upstream work on getting the sparc64 backend into shape. MFC r262985: Repair a few minor mismerges from r262261 in the clang-sparc64 project branch. This is also to minimize differences with upstream. Added: stable/10/contrib/llvm/lib/Target/Sparc/AsmParser/ - copied from r262613, head/contrib/llvm/lib/Target/Sparc/AsmParser/ stable/10/contrib/llvm/lib/Target/Sparc/Disassembler/ - copied from r262613, head/contrib/llvm/lib/Target/Sparc/Disassembler/ stable/10/contrib/llvm/lib/Target/Sparc/InstPrinter/ - copied from r262613, head/contrib/llvm/lib/Target/Sparc/InstPrinter/ stable/10/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp - copied unchanged from r262613, head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp stable/10/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp - copied unchanged from r262613, head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp stable/10/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcFixupKinds.h - copied unchanged from r262613, head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcFixupKinds.h stable/10/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCCodeEmitter.cpp - copied, changed from r262613, head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCCodeEmitter.cpp stable/10/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCExpr.cpp - copied unchanged from r262613, head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCExpr.cpp stable/10/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCExpr.h - copied unchanged from r262613, head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCExpr.h stable/10/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcTargetStreamer.cpp - copied unchanged from r262613, head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcTargetStreamer.cpp stable/10/contrib/llvm/lib/Target/Sparc/SparcInstrAliases.td - copied unchanged from r262613, head/contrib/llvm/lib/Target/Sparc/SparcInstrAliases.td stable/10/contrib/llvm/lib/Target/Sparc/SparcMCInstLower.cpp - copied unchanged from r262613, head/contrib/llvm/lib/Target/Sparc/SparcMCInstLower.cpp stable/10/contrib/llvm/lib/Target/Sparc/SparcTargetObjectFile.cpp - copied unchanged from r262613, head/contrib/llvm/lib/Target/Sparc/SparcTargetObjectFile.cpp stable/10/contrib/llvm/lib/Target/Sparc/SparcTargetObjectFile.h - copied unchanged from r262613, head/contrib/llvm/lib/Target/Sparc/SparcTargetObjectFile.h stable/10/contrib/llvm/lib/Target/Sparc/SparcTargetStreamer.h - copied unchanged from r262613, head/contrib/llvm/lib/Target/Sparc/SparcTargetStreamer.h stable/10/lib/clang/include/SparcGenAsmMatcher.inc - copied unchanged from r262613, head/lib/clang/include/SparcGenAsmMatcher.inc stable/10/lib/clang/include/SparcGenAsmWriter.inc - copied unchanged from r262613, head/lib/clang/include/SparcGenAsmWriter.inc stable/10/lib/clang/include/SparcGenCallingConv.inc - copied unchanged from r262613, head/lib/clang/include/SparcGenCallingConv.inc stable/10/lib/clang/include/SparcGenCodeEmitter.inc - copied unchanged from r262613, head/lib/clang/include/SparcGenCodeEmitter.inc stable/10/lib/clang/include/SparcGenDAGISel.inc - copied unchanged from r262613, head/lib/clang/include/SparcGenDAGISel.inc stable/10/lib/clang/include/SparcGenDisassemblerTables.inc - copied unchanged from r262613, head/lib/clang/include/SparcGenDisassemblerTables.inc stable/10/lib/clang/include/SparcGenInstrInfo.inc - copied unchanged from r262613, head/lib/clang/include/SparcGenInstrInfo.inc stable/10/lib/clang/include/SparcGenMCCodeEmitter.inc - copied unchanged from r262613, head/lib/clang/include/SparcGenMCCodeEmitter.inc stable/10/lib/clang/include/SparcGenRegisterInfo.inc - copied unchanged from r262613, head/lib/clang/include/SparcGenRegisterInfo.inc stable/10/lib/clang/include/SparcGenSubtargetInfo.inc - copied unchanged from r262613, head/lib/clang/include/SparcGenSubtargetInfo.inc stable/10/lib/clang/libllvmsparcasmparser/ - copied from r262613, head/lib/clang/libllvmsparcasmparser/ stable/10/lib/clang/libllvmsparccodegen/ - copied from r262613, head/lib/clang/libllvmsparccodegen/ stable/10/lib/clang/libllvmsparcdesc/ - copied from r262613, head/lib/clang/libllvmsparcdesc/ stable/10/lib/clang/libllvmsparcdisassembler/ - copied from r262613, head/lib/clang/libllvmsparcdisassembler/ stable/10/lib/clang/libllvmsparcinfo/ - copied from r262613, head/lib/clang/libllvmsparcinfo/ stable/10/lib/clang/libllvmsparcinstprinter/ - copied from r262613, head/lib/clang/libllvmsparcinstprinter/ Deleted: stable/10/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcBaseInfo.h Modified: stable/10/contrib/compiler-rt/lib/absvti2.c stable/10/contrib/compiler-rt/lib/addvti3.c stable/10/contrib/compiler-rt/lib/ashlti3.c stable/10/contrib/compiler-rt/lib/ashrti3.c stable/10/contrib/compiler-rt/lib/clzti2.c stable/10/contrib/compiler-rt/lib/cmpti2.c stable/10/contrib/compiler-rt/lib/ctzti2.c stable/10/contrib/compiler-rt/lib/divti3.c stable/10/contrib/compiler-rt/lib/ffsti2.c stable/10/contrib/compiler-rt/lib/fixdfti.c stable/10/contrib/compiler-rt/lib/fixsfti.c stable/10/contrib/compiler-rt/lib/fixunsdfti.c stable/10/contrib/compiler-rt/lib/fixunssfti.c stable/10/contrib/compiler-rt/lib/fixunsxfti.c stable/10/contrib/compiler-rt/lib/fixxfti.c stable/10/contrib/compiler-rt/lib/floattidf.c stable/10/contrib/compiler-rt/lib/floattisf.c stable/10/contrib/compiler-rt/lib/floattixf.c stable/10/contrib/compiler-rt/lib/floatuntidf.c stable/10/contrib/compiler-rt/lib/floatuntisf.c stable/10/contrib/compiler-rt/lib/floatuntixf.c stable/10/contrib/compiler-rt/lib/int_types.h stable/10/contrib/compiler-rt/lib/lshrti3.c stable/10/contrib/compiler-rt/lib/modti3.c stable/10/contrib/compiler-rt/lib/muloti4.c stable/10/contrib/compiler-rt/lib/multi3.c stable/10/contrib/compiler-rt/lib/mulvti3.c stable/10/contrib/compiler-rt/lib/negti2.c stable/10/contrib/compiler-rt/lib/negvti2.c stable/10/contrib/compiler-rt/lib/parityti2.c stable/10/contrib/compiler-rt/lib/popcountti2.c stable/10/contrib/compiler-rt/lib/subvti3.c stable/10/contrib/compiler-rt/lib/ucmpti2.c stable/10/contrib/compiler-rt/lib/udivmodti4.c stable/10/contrib/compiler-rt/lib/udivti3.c stable/10/contrib/compiler-rt/lib/umodti3.c stable/10/contrib/gcc/longlong.h stable/10/contrib/llvm/include/llvm/MC/MCAsmInfo.h stable/10/contrib/llvm/include/llvm/Object/ELFObjectFile.h stable/10/contrib/llvm/include/llvm/Support/ELF.h stable/10/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp stable/10/contrib/llvm/lib/MC/MCObjectFileInfo.cpp stable/10/contrib/llvm/lib/Object/ELF.cpp stable/10/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp stable/10/contrib/llvm/lib/Target/Sparc/DelaySlotFiller.cpp stable/10/contrib/llvm/lib/Target/Sparc/InstPrinter/SparcInstPrinter.cpp stable/10/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp stable/10/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.h stable/10/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp stable/10/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.h stable/10/contrib/llvm/lib/Target/Sparc/Sparc.h stable/10/contrib/llvm/lib/Target/Sparc/Sparc.td stable/10/contrib/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp stable/10/contrib/llvm/lib/Target/Sparc/SparcCallingConv.td stable/10/contrib/llvm/lib/Target/Sparc/SparcCodeEmitter.cpp stable/10/contrib/llvm/lib/Target/Sparc/SparcISelLowering.cpp stable/10/contrib/llvm/lib/Target/Sparc/SparcISelLowering.h stable/10/contrib/llvm/lib/Target/Sparc/SparcInstr64Bit.td stable/10/contrib/llvm/lib/Target/Sparc/SparcInstrFormats.td stable/10/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.cpp stable/10/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.td stable/10/contrib/llvm/lib/Target/Sparc/SparcJITInfo.cpp stable/10/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp stable/10/contrib/llvm/lib/Target/Sparc/SparcRelocations.h stable/10/contrib/llvm/lib/Target/Sparc/SparcSubtarget.cpp stable/10/contrib/llvm/lib/Target/Sparc/SparcSubtarget.h stable/10/contrib/llvm/tools/clang/lib/Basic/Targets.cpp stable/10/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp stable/10/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp stable/10/contrib/llvm/tools/clang/lib/Driver/Tools.cpp stable/10/lib/clang/Makefile stable/10/lib/clang/clang.build.mk stable/10/lib/clang/include/llvm/Config/AsmParsers.def stable/10/lib/clang/include/llvm/Config/AsmPrinters.def stable/10/lib/clang/include/llvm/Config/Disassemblers.def stable/10/lib/clang/include/llvm/Config/Targets.def stable/10/lib/libc/sparc64/sys/__sparc_utrap_setup.c stable/10/lib/msun/Makefile stable/10/share/mk/bsd.sys.mk stable/10/sys/boot/sparc64/boot1/Makefile stable/10/sys/conf/kern.mk stable/10/sys/dev/esp/esp_sbus.c stable/10/sys/dev/fb/creator.c stable/10/sys/dev/fb/machfb.c stable/10/sys/dev/mk48txx/mk48txx.c stable/10/sys/sparc64/conf/GENERIC stable/10/sys/sparc64/isa/isa.c stable/10/sys/sparc64/pci/firereg.h stable/10/usr.bin/clang/clang/Makefile stable/10/usr.bin/clang/llc/Makefile stable/10/usr.bin/clang/llvm-mc/Makefile stable/10/usr.bin/clang/llvm-objdump/Makefile stable/10/usr.bin/clang/llvm-rtdyld/Makefile stable/10/usr.bin/clang/opt/Makefile stable/10/usr.sbin/eeprom/ofw_options.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/compiler-rt/lib/absvti2.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/absvti2.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/absvti2.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: absolute value */ @@ -30,4 +30,5 @@ __absvti2(ti_int a) return (a ^ s) - s; } -#endif +#endif /* CRT_HAS_128BIT */ + Modified: stable/10/contrib/compiler-rt/lib/addvti3.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/addvti3.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/addvti3.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: a + b */ @@ -37,4 +37,4 @@ __addvti3(ti_int a, ti_int b) return s; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/10/contrib/compiler-rt/lib/ashlti3.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/ashlti3.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/ashlti3.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: a << b */ @@ -42,4 +42,4 @@ __ashlti3(ti_int a, si_int b) return result.all; } -#endif /* __x86_64 */ +#endif /* CRT_HAS_128BIT */ Modified: stable/10/contrib/compiler-rt/lib/ashrti3.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/ashrti3.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/ashrti3.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: arithmetic a >> b */ @@ -43,4 +43,4 @@ __ashrti3(ti_int a, si_int b) return result.all; } -#endif /* __x86_64 */ +#endif /* CRT_HAS_128BIT */ Modified: stable/10/contrib/compiler-rt/lib/clzti2.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/clzti2.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/clzti2.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: the number of leading 0-bits */ @@ -30,4 +30,4 @@ __clzti2(ti_int a) ((si_int)f & ((si_int)(sizeof(di_int) * CHAR_BIT))); } -#endif /* __x86_64 */ +#endif /* CRT_HAS_128BIT */ Modified: stable/10/contrib/compiler-rt/lib/cmpti2.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/cmpti2.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/cmpti2.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: if (a < b) returns 0 * if (a == b) returns 1 @@ -39,4 +39,4 @@ __cmpti2(ti_int a, ti_int b) return 1; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/10/contrib/compiler-rt/lib/ctzti2.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/ctzti2.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/ctzti2.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: the number of trailing 0-bits */ @@ -30,4 +30,4 @@ __ctzti2(ti_int a) ((si_int)f & ((si_int)(sizeof(di_int) * CHAR_BIT))); } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/10/contrib/compiler-rt/lib/divti3.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/divti3.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/divti3.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT tu_int __udivmodti4(tu_int a, tu_int b, tu_int* rem); @@ -32,4 +32,4 @@ __divti3(ti_int a, ti_int b) return (__udivmodti4(a, b, (tu_int*)0) ^ s_a) - s_a; /* negate if s_a == -1 */ } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/10/contrib/compiler-rt/lib/ffsti2.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/ffsti2.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/ffsti2.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: the index of the least significant 1-bit in a, or * the value zero if a is zero. The least significant bit is index one. @@ -34,4 +34,4 @@ __ffsti2(ti_int a) return __builtin_ctzll(x.s.low) + 1; } -#endif /* __x86_64 */ +#endif /* CRT_HAS_128BIT */ Modified: stable/10/contrib/compiler-rt/lib/fixdfti.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/fixdfti.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/fixdfti.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: convert a to a signed long long, rounding toward zero. */ @@ -42,4 +42,4 @@ __fixdfti(double a) return (r ^ s) - s; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/10/contrib/compiler-rt/lib/fixsfti.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/fixsfti.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/fixsfti.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: convert a to a signed long long, rounding toward zero. */ @@ -42,4 +42,4 @@ __fixsfti(float a) return (r ^ s) - s; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/10/contrib/compiler-rt/lib/fixunsdfti.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/fixunsdfti.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/fixunsdfti.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: convert a to a unsigned long long, rounding toward zero. * Negative values all become zero. @@ -44,4 +44,4 @@ __fixunsdfti(double a) return r; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/10/contrib/compiler-rt/lib/fixunssfti.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/fixunssfti.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/fixunssfti.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: convert a to a unsigned long long, rounding toward zero. * Negative values all become zero. @@ -44,4 +44,4 @@ __fixunssfti(float a) return r; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/10/contrib/compiler-rt/lib/fixunsxfti.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/fixunsxfti.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/fixunsxfti.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: convert a to a unsigned long long, rounding toward zero. * Negative values all become zero. @@ -46,4 +46,4 @@ __fixunsxfti(long double a) return r; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/10/contrib/compiler-rt/lib/fixxfti.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/fixxfti.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/fixxfti.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: convert a to a signed long long, rounding toward zero. */ @@ -44,4 +44,4 @@ __fixxfti(long double a) return (r ^ s) - s; } -#endif /* __x86_64 */ +#endif /* CRT_HAS_128BIT */ Modified: stable/10/contrib/compiler-rt/lib/floattidf.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/floattidf.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/floattidf.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: convert a to a double, rounding toward even.*/ @@ -82,4 +82,4 @@ __floattidf(ti_int a) return fb.f; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/10/contrib/compiler-rt/lib/floattisf.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/floattisf.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/floattisf.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: convert a to a float, rounding toward even. */ @@ -81,4 +81,4 @@ __floattisf(ti_int a) return fb.f; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/10/contrib/compiler-rt/lib/floattixf.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/floattixf.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/floattixf.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: convert a to a long double, rounding toward even. */ @@ -47,7 +47,7 @@ __floattixf(ti_int a) * P = bit LDBL_MANT_DIG-1 bits to the right of 1 * Q = bit LDBL_MANT_DIG bits to the right of 1 * R = "or" of all bits to the right of Q - */ + */ switch (sd) { case LDBL_MANT_DIG + 1: @@ -83,4 +83,4 @@ __floattixf(ti_int a) return fb.f; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/10/contrib/compiler-rt/lib/floatuntidf.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/floatuntidf.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/floatuntidf.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: convert a to a double, rounding toward even. */ @@ -43,7 +43,7 @@ __floatuntidf(tu_int a) * P = bit DBL_MANT_DIG-1 bits to the right of 1 * Q = bit DBL_MANT_DIG bits to the right of 1 * R = "or" of all bits to the right of Q - */ + */ switch (sd) { case DBL_MANT_DIG + 1: @@ -79,4 +79,4 @@ __floatuntidf(tu_int a) return fb.f; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/10/contrib/compiler-rt/lib/floatuntisf.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/floatuntisf.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/floatuntisf.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: convert a to a float, rounding toward even. */ @@ -78,4 +78,4 @@ __floatuntisf(tu_int a) return fb.f; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/10/contrib/compiler-rt/lib/floatuntixf.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/floatuntixf.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/floatuntixf.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: convert a to a long double, rounding toward even. */ Modified: stable/10/contrib/compiler-rt/lib/int_types.h ============================================================================== --- stable/10/contrib/compiler-rt/lib/int_types.h Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/int_types.h Wed Mar 26 07:31:57 2014 (r263763) @@ -56,8 +56,11 @@ typedef union }s; } udwords; -#if __x86_64 +#if __LP64__ +#define CRT_HAS_128BIT +#endif +#ifdef CRT_HAS_128BIT typedef int ti_int __attribute__ ((mode (TI))); typedef unsigned tu_int __attribute__ ((mode (TI))); @@ -105,7 +108,7 @@ static inline tu_int make_tu(du_int h, d return r.all; } -#endif /* __x86_64 */ +#endif /* CRT_HAS_128BIT */ typedef union { Modified: stable/10/contrib/compiler-rt/lib/lshrti3.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/lshrti3.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/lshrti3.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: logical a >> b */ @@ -42,4 +42,4 @@ __lshrti3(ti_int a, si_int b) return result.all; } -#endif /* __x86_64 */ +#endif /* CRT_HAS_128BIT */ Modified: stable/10/contrib/compiler-rt/lib/modti3.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/modti3.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/modti3.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT tu_int __udivmodti4(tu_int a, tu_int b, tu_int* rem); @@ -33,4 +33,4 @@ __modti3(ti_int a, ti_int b) return (r ^ s) - s; /* negate if s == -1 */ } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/10/contrib/compiler-rt/lib/muloti4.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/muloti4.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/muloti4.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: a * b */ @@ -59,4 +59,4 @@ __muloti4(ti_int a, ti_int b, int* overf return result; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/10/contrib/compiler-rt/lib/multi3.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/multi3.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/multi3.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: a * b */ @@ -55,4 +55,4 @@ __multi3(ti_int a, ti_int b) return r.all; } -#endif /* __x86_64 */ +#endif /* CRT_HAS_128BIT */ Modified: stable/10/contrib/compiler-rt/lib/mulvti3.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/mulvti3.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/mulvti3.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: a * b */ @@ -57,4 +57,4 @@ __mulvti3(ti_int a, ti_int b) return a * b; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/10/contrib/compiler-rt/lib/negti2.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/negti2.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/negti2.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: -a */ @@ -27,4 +27,4 @@ __negti2(ti_int a) return -a; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/10/contrib/compiler-rt/lib/negvti2.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/negvti2.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/negvti2.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: -a */ @@ -29,4 +29,4 @@ __negvti2(ti_int a) return -a; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/10/contrib/compiler-rt/lib/parityti2.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/parityti2.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/parityti2.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: 1 if number of bits is odd else returns 0 */ @@ -28,4 +28,4 @@ __parityti2(ti_int a) return __paritydi2(x.s.high ^ x.s.low); } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/10/contrib/compiler-rt/lib/popcountti2.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/popcountti2.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/popcountti2.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: count of 1 bits */ @@ -41,4 +41,4 @@ __popcountti2(ti_int a) return (x + (x >> 8)) & 0xFF; /* (8 significant bits) */ } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/10/contrib/compiler-rt/lib/subvti3.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/subvti3.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/subvti3.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: a - b */ @@ -37,4 +37,4 @@ __subvti3(ti_int a, ti_int b) return s; } -#endif /* __x86_64 */ +#endif /* CRT_HAS_128BIT */ Modified: stable/10/contrib/compiler-rt/lib/ucmpti2.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/ucmpti2.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/ucmpti2.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: if (a < b) returns 0 * if (a == b) returns 1 @@ -39,4 +39,4 @@ __ucmpti2(tu_int a, tu_int b) return 1; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/10/contrib/compiler-rt/lib/udivmodti4.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/udivmodti4.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/udivmodti4.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Effects: if rem != 0, *rem = a % b * Returns: a / b @@ -253,4 +253,4 @@ __udivmodti4(tu_int a, tu_int b, tu_int* return q.all; } -#endif /* __x86_64 */ +#endif /* CRT_HAS_128BIT */ Modified: stable/10/contrib/compiler-rt/lib/udivti3.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/udivti3.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/udivti3.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT tu_int __udivmodti4(tu_int a, tu_int b, tu_int* rem); @@ -26,4 +26,4 @@ __udivti3(tu_int a, tu_int b) return __udivmodti4(a, b, 0); } -#endif /* __x86_64 */ +#endif /* CRT_HAS_128BIT */ Modified: stable/10/contrib/compiler-rt/lib/umodti3.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/umodti3.c Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/compiler-rt/lib/umodti3.c Wed Mar 26 07:31:57 2014 (r263763) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT tu_int __udivmodti4(tu_int a, tu_int b, tu_int* rem); @@ -28,4 +28,4 @@ __umodti3(tu_int a, tu_int b) return r; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/10/contrib/gcc/longlong.h ============================================================================== --- stable/10/contrib/gcc/longlong.h Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/gcc/longlong.h Wed Mar 26 07:31:57 2014 (r263763) @@ -1086,8 +1086,8 @@ UDItype __umulsidi3 (USItype, USItype); "bcs,a,pn %%xcc, 1f\n\t" \ "add %0, 1, %0\n" \ "1:" \ - : "=r" ((UDItype)(sh)), \ - "=&r" ((UDItype)(sl)) \ + : "=r" (sh), \ + "=&r" (sl) \ : "%rJ" ((UDItype)(ah)), \ "rI" ((UDItype)(bh)), \ "%rJ" ((UDItype)(al)), \ @@ -1100,8 +1100,8 @@ UDItype __umulsidi3 (USItype, USItype); "bcs,a,pn %%xcc, 1f\n\t" \ "sub %0, 1, %0\n\t" \ "1:" \ - : "=r" ((UDItype)(sh)), \ - "=&r" ((UDItype)(sl)) \ + : "=r" (sh), \ + "=&r" (sl) \ : "rJ" ((UDItype)(ah)), \ "rI" ((UDItype)(bh)), \ "rJ" ((UDItype)(al)), \ @@ -1133,8 +1133,8 @@ UDItype __umulsidi3 (USItype, USItype); "sllx %3,32,%3\n\t" \ "add %1,%3,%1\n\t" \ "add %5,%2,%0" \ - : "=r" ((UDItype)(wh)), \ - "=&r" ((UDItype)(wl)), \ + : "=r" (wh), \ + "=&r" (wl), \ "=&r" (tmp1), "=&r" (tmp2), "=&r" (tmp3), "=&r" (tmp4) \ : "r" ((UDItype)(u)), \ "r" ((UDItype)(v)) \ Modified: stable/10/contrib/llvm/include/llvm/MC/MCAsmInfo.h ============================================================================== --- stable/10/contrib/llvm/include/llvm/MC/MCAsmInfo.h Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/llvm/include/llvm/MC/MCAsmInfo.h Wed Mar 26 07:31:57 2014 (r263763) @@ -371,7 +371,7 @@ namespace llvm { unsigned Encoding, MCStreamer &Streamer) const; - const MCExpr * + virtual const MCExpr * getExprForFDESymbol(const MCSymbol *Sym, unsigned Encoding, MCStreamer &Streamer) const; Modified: stable/10/contrib/llvm/include/llvm/Object/ELFObjectFile.h ============================================================================== --- stable/10/contrib/llvm/include/llvm/Object/ELFObjectFile.h Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/llvm/include/llvm/Object/ELFObjectFile.h Wed Mar 26 07:31:57 2014 (r263763) @@ -922,6 +922,9 @@ StringRef ELFObjectFile::getFileFo return "ELF32-mips"; case ELF::EM_PPC: return "ELF32-ppc"; + case ELF::EM_SPARC: + case ELF::EM_SPARC32PLUS: + return "ELF32-sparc"; default: return "ELF32-unknown"; } @@ -937,6 +940,8 @@ StringRef ELFObjectFile::getFileFo return "ELF64-ppc64"; case ELF::EM_S390: return "ELF64-s390"; + case ELF::EM_SPARCV9: + return "ELF64-sparc"; default: return "ELF64-unknown"; } @@ -967,6 +972,13 @@ unsigned ELFObjectFile::getArch() : Triple::ppc64; case ELF::EM_S390: return Triple::systemz; + + case ELF::EM_SPARC: + case ELF::EM_SPARC32PLUS: + return Triple::sparc; + case ELF::EM_SPARCV9: + return Triple::sparcv9; + default: return Triple::UnknownArch; } Modified: stable/10/contrib/llvm/include/llvm/Support/ELF.h ============================================================================== --- stable/10/contrib/llvm/include/llvm/Support/ELF.h Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/llvm/include/llvm/Support/ELF.h Wed Mar 26 07:31:57 2014 (r263763) @@ -1087,6 +1087,94 @@ enum { R_390_IRELATIVE = 61 }; +// ELF Relocation type for Sparc. +enum { + R_SPARC_NONE = 0, + R_SPARC_8 = 1, + R_SPARC_16 = 2, + R_SPARC_32 = 3, + R_SPARC_DISP8 = 4, + R_SPARC_DISP16 = 5, + R_SPARC_DISP32 = 6, + R_SPARC_WDISP30 = 7, + R_SPARC_WDISP22 = 8, + R_SPARC_HI22 = 9, + R_SPARC_22 = 10, + R_SPARC_13 = 11, + R_SPARC_LO10 = 12, + R_SPARC_GOT10 = 13, + R_SPARC_GOT13 = 14, + R_SPARC_GOT22 = 15, + R_SPARC_PC10 = 16, + R_SPARC_PC22 = 17, + R_SPARC_WPLT30 = 18, + R_SPARC_COPY = 19, + R_SPARC_GLOB_DAT = 20, + R_SPARC_JMP_SLOT = 21, + R_SPARC_RELATIVE = 22, + R_SPARC_UA32 = 23, + R_SPARC_PLT32 = 24, + R_SPARC_HIPLT22 = 25, + R_SPARC_LOPLT10 = 26, + R_SPARC_PCPLT32 = 27, + R_SPARC_PCPLT22 = 28, + R_SPARC_PCPLT10 = 29, + R_SPARC_10 = 30, + R_SPARC_11 = 31, + R_SPARC_64 = 32, + R_SPARC_OLO10 = 33, + R_SPARC_HH22 = 34, + R_SPARC_HM10 = 35, + R_SPARC_LM22 = 36, + R_SPARC_PC_HH22 = 37, + R_SPARC_PC_HM10 = 38, + R_SPARC_PC_LM22 = 39, + R_SPARC_WDISP16 = 40, + R_SPARC_WDISP19 = 41, + R_SPARC_7 = 43, + R_SPARC_5 = 44, + R_SPARC_6 = 45, + R_SPARC_DISP64 = 46, + R_SPARC_PLT64 = 47, + R_SPARC_HIX22 = 48, + R_SPARC_LOX10 = 49, + R_SPARC_H44 = 50, + R_SPARC_M44 = 51, + R_SPARC_L44 = 52, + R_SPARC_REGISTER = 53, + R_SPARC_UA64 = 54, + R_SPARC_UA16 = 55, + R_SPARC_TLS_GD_HI22 = 56, + R_SPARC_TLS_GD_LO10 = 57, + R_SPARC_TLS_GD_ADD = 58, + R_SPARC_TLS_GD_CALL = 59, + R_SPARC_TLS_LDM_HI22 = 60, + R_SPARC_TLS_LDM_LO10 = 61, + R_SPARC_TLS_LDM_ADD = 62, + R_SPARC_TLS_LDM_CALL = 63, + R_SPARC_TLS_LDO_HIX22 = 64, + R_SPARC_TLS_LDO_LOX10 = 65, + R_SPARC_TLS_LDO_ADD = 66, + R_SPARC_TLS_IE_HI22 = 67, + R_SPARC_TLS_IE_LO10 = 68, + R_SPARC_TLS_IE_LD = 69, + R_SPARC_TLS_IE_LDX = 70, + R_SPARC_TLS_IE_ADD = 71, + R_SPARC_TLS_LE_HIX22 = 72, + R_SPARC_TLS_LE_LOX10 = 73, + R_SPARC_TLS_DTPMOD32 = 74, + R_SPARC_TLS_DTPMOD64 = 75, + R_SPARC_TLS_DTPOFF32 = 76, + R_SPARC_TLS_DTPOFF64 = 77, + R_SPARC_TLS_TPOFF32 = 78, + R_SPARC_TLS_TPOFF64 = 79, + R_SPARC_GOTDATA_HIX22 = 80, + R_SPARC_GOTDATA_LOX22 = 81, + R_SPARC_GOTDATA_OP_HIX22 = 82, + R_SPARC_GOTDATA_OP_LOX22 = 83, + R_SPARC_GOTDATA_OP = 84 +}; + // Section header. struct Elf32_Shdr { Elf32_Word sh_name; // Section name (index into string table) Modified: stable/10/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp ============================================================================== --- stable/10/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Wed Mar 26 07:31:57 2014 (r263763) @@ -23,6 +23,7 @@ #include "llvm/CodeGen/MachineConstantPool.h" #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/CodeGen/MachineFunction.h" +#include "llvm/CodeGen/MachineInstrBundle.h" #include "llvm/CodeGen/MachineJumpTableInfo.h" #include "llvm/CodeGen/MachineLoopInfo.h" #include "llvm/CodeGen/MachineModuleInfo.h" @@ -2221,14 +2222,13 @@ isBlockOnlyReachableByFallthrough(const if (!MI.isBranch() || MI.isIndirectBranch()) return false; - // If we are the operands of one of the branches, this is not - // a fall through. - for (MachineInstr::mop_iterator OI = MI.operands_begin(), - OE = MI.operands_end(); OI != OE; ++OI) { - const MachineOperand& OP = *OI; - if (OP.isJTI()) + // If we are the operands of one of the branches, this is not a fall + // through. Note that targets with delay slots will usually bundle + // terminators with the delay slot instruction. + for (ConstMIBundleOperands OP(&MI); OP.isValid(); ++OP) { + if (OP->isJTI()) return false; - if (OP.isMBB() && OP.getMBB() == MBB) + if (OP->isMBB() && OP->getMBB() == MBB) return false; } } Modified: stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp ============================================================================== --- stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp Wed Mar 26 07:31:57 2014 (r263763) @@ -220,10 +220,19 @@ void InstrEmitter::CreateVirtualRegister unsigned VRBase = 0; const TargetRegisterClass *RC = TRI->getAllocatableClass(TII->getRegClass(II, i, TRI, *MF)); - // If the register class is unknown for the given definition, then try to - // infer one from the value type. - if (!RC && i < NumResults) - RC = TLI->getRegClassFor(Node->getSimpleValueType(i)); + // Always let the value type influence the used register class. The + // constraints on the instruction may be too lax to represent the value + // type correctly. For example, a 64-bit float (X86::FR64) can't live in + // the 32-bit float super-class (X86::FR32). + if (i < NumResults && TLI->isTypeLegal(Node->getSimpleValueType(i))) { + const TargetRegisterClass *VTRC = + TLI->getRegClassFor(Node->getSimpleValueType(i)); + if (RC) + VTRC = TRI->getCommonSubClass(RC, VTRC); + if (VTRC) + RC = VTRC; + } + if (II.OpInfo[i].isOptionalDef()) { // Optional def must be a physical register. unsigned NumResults = CountResults(Node); Modified: stable/10/contrib/llvm/lib/MC/MCObjectFileInfo.cpp ============================================================================== --- stable/10/contrib/llvm/lib/MC/MCObjectFileInfo.cpp Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/llvm/lib/MC/MCObjectFileInfo.cpp Wed Mar 26 07:31:57 2014 (r263763) @@ -310,6 +310,33 @@ void MCObjectFileInfo::InitELFMCObjectFi FDEEncoding = dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_udata8; TTypeEncoding = dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_udata8; + } else if (T.getArch() == Triple::sparc) { + if (RelocM == Reloc::PIC_) { + LSDAEncoding = dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4; + PersonalityEncoding = dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel | + dwarf::DW_EH_PE_sdata4; + FDEEncoding = dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4; + TTypeEncoding = dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel | + dwarf::DW_EH_PE_sdata4; + } else { + LSDAEncoding = dwarf::DW_EH_PE_absptr; + PersonalityEncoding = dwarf::DW_EH_PE_absptr; + FDEEncoding = dwarf::DW_EH_PE_udata4; + TTypeEncoding = dwarf::DW_EH_PE_absptr; + } + } else if (T.getArch() == Triple::sparcv9) { + LSDAEncoding = dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4; + if (RelocM == Reloc::PIC_) { + PersonalityEncoding = dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel | + dwarf::DW_EH_PE_sdata4; + FDEEncoding = dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4; + TTypeEncoding = dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel | + dwarf::DW_EH_PE_sdata4; + } else { + PersonalityEncoding = dwarf::DW_EH_PE_absptr; + FDEEncoding = dwarf::DW_EH_PE_udata4; + TTypeEncoding = dwarf::DW_EH_PE_absptr; + } } else if (T.getArch() == Triple::systemz) { // All currently-defined code models guarantee that 4-byte PC-relative // values will be in range. Modified: stable/10/contrib/llvm/lib/Object/ELF.cpp ============================================================================== --- stable/10/contrib/llvm/lib/Object/ELF.cpp Wed Mar 26 06:26:53 2014 (r263762) +++ stable/10/contrib/llvm/lib/Object/ELF.cpp Wed Mar 26 07:31:57 2014 (r263763) @@ -702,6 +702,98 @@ StringRef getELFRelocationTypeName(uint3 break; } break; + case ELF::EM_SPARC: + case ELF::EM_SPARC32PLUS: + case ELF::EM_SPARCV9: + switch (Type) { + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_NONE); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_8); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_16); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_32); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_DISP8); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_DISP16); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_DISP32); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_WDISP30); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_WDISP22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_HI22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_13); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_LO10); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_GOT10); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_GOT13); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_GOT22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_PC10); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_PC22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_WPLT30); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_COPY); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_GLOB_DAT); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_JMP_SLOT); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_RELATIVE); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_UA32); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_PLT32); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_HIPLT22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_LOPLT10); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_PCPLT32); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_PCPLT22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_PCPLT10); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_10); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_11); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_64); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_OLO10); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_HH22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_HM10); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_LM22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_PC_HH22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_PC_HM10); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_PC_LM22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_WDISP16); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_WDISP19); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_7); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_5); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_6); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_DISP64); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_PLT64); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_HIX22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_LOX10); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_H44); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_M44); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_L44); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_REGISTER); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_UA64); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_UA16); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_GD_HI22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_GD_LO10); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_GD_ADD); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_GD_CALL); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_LDM_HI22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_LDM_LO10); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_LDM_ADD); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_LDM_CALL); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_LDO_HIX22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_LDO_LOX10); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_LDO_ADD); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_IE_HI22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_IE_LO10); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_IE_LD); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_IE_LDX); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_IE_ADD); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_LE_HIX22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_LE_LOX10); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_DTPMOD32); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_DTPMOD64); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_DTPOFF32); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_DTPOFF64); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_TPOFF32); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_TPOFF64); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_GOTDATA_HIX22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_GOTDATA_LOX22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_GOTDATA_OP_HIX22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_GOTDATA_OP_LOX22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_GOTDATA_OP); + default: + break; + } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Wed Mar 26 07:35:34 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 59350AB7; Wed, 26 Mar 2014 07:35:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 418882CE; Wed, 26 Mar 2014 07:35:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2Q7ZYNg054741; Wed, 26 Mar 2014 07:35:34 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2Q7ZOVj054682; Wed, 26 Mar 2014 07:35:24 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201403260735.s2Q7ZOVj054682@svn.freebsd.org> From: Dimitry Andric Date: Wed, 26 Mar 2014 07:35:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263764 - in stable/9: contrib/compiler-rt/lib contrib/gcc contrib/llvm/include/llvm/MC contrib/llvm/include/llvm/Object contrib/llvm/include/llvm/Support contrib/llvm/lib/CodeGen/AsmPr... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Mar 2014 07:35:34 -0000 Author: dim Date: Wed Mar 26 07:35:24 2014 New Revision: 263764 URL: http://svnweb.freebsd.org/changeset/base/263764 Log: MFC r262613: Merge the projects/clang-sparc64 branch back to head. This brings in several updates from the llvm and clang trunks to make the sparc64 backend fully functional. Apart from one patch to sys/sparc64/include/pcpu.h which is still under discussion, this makes it possible to let clang fully build world and kernel for sparc64. Any assistance with testing this on actual sparc64 hardware is greatly appreciated, as there will unavoidably be bugs left. Many thanks go to Roman Divacky for his upstream work on getting the sparc64 backend into shape. MFC r262985: Repair a few minor mismerges from r262261 in the clang-sparc64 project branch. This is also to minimize differences with upstream. Added: stable/9/contrib/llvm/lib/Target/Sparc/AsmParser/ - copied from r262613, head/contrib/llvm/lib/Target/Sparc/AsmParser/ stable/9/contrib/llvm/lib/Target/Sparc/Disassembler/ - copied from r262613, head/contrib/llvm/lib/Target/Sparc/Disassembler/ stable/9/contrib/llvm/lib/Target/Sparc/InstPrinter/ - copied from r262613, head/contrib/llvm/lib/Target/Sparc/InstPrinter/ stable/9/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp - copied unchanged from r262613, head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp stable/9/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp - copied unchanged from r262613, head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp stable/9/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcFixupKinds.h - copied unchanged from r262613, head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcFixupKinds.h stable/9/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCCodeEmitter.cpp - copied, changed from r262613, head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCCodeEmitter.cpp stable/9/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCExpr.cpp - copied unchanged from r262613, head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCExpr.cpp stable/9/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCExpr.h - copied unchanged from r262613, head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCExpr.h stable/9/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcTargetStreamer.cpp - copied unchanged from r262613, head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcTargetStreamer.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcInstrAliases.td - copied unchanged from r262613, head/contrib/llvm/lib/Target/Sparc/SparcInstrAliases.td stable/9/contrib/llvm/lib/Target/Sparc/SparcMCInstLower.cpp - copied unchanged from r262613, head/contrib/llvm/lib/Target/Sparc/SparcMCInstLower.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcTargetObjectFile.cpp - copied unchanged from r262613, head/contrib/llvm/lib/Target/Sparc/SparcTargetObjectFile.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcTargetObjectFile.h - copied unchanged from r262613, head/contrib/llvm/lib/Target/Sparc/SparcTargetObjectFile.h stable/9/contrib/llvm/lib/Target/Sparc/SparcTargetStreamer.h - copied unchanged from r262613, head/contrib/llvm/lib/Target/Sparc/SparcTargetStreamer.h stable/9/lib/clang/include/SparcGenAsmMatcher.inc - copied unchanged from r262613, head/lib/clang/include/SparcGenAsmMatcher.inc stable/9/lib/clang/include/SparcGenAsmWriter.inc - copied unchanged from r262613, head/lib/clang/include/SparcGenAsmWriter.inc stable/9/lib/clang/include/SparcGenCallingConv.inc - copied unchanged from r262613, head/lib/clang/include/SparcGenCallingConv.inc stable/9/lib/clang/include/SparcGenCodeEmitter.inc - copied unchanged from r262613, head/lib/clang/include/SparcGenCodeEmitter.inc stable/9/lib/clang/include/SparcGenDAGISel.inc - copied unchanged from r262613, head/lib/clang/include/SparcGenDAGISel.inc stable/9/lib/clang/include/SparcGenDisassemblerTables.inc - copied unchanged from r262613, head/lib/clang/include/SparcGenDisassemblerTables.inc stable/9/lib/clang/include/SparcGenInstrInfo.inc - copied unchanged from r262613, head/lib/clang/include/SparcGenInstrInfo.inc stable/9/lib/clang/include/SparcGenMCCodeEmitter.inc - copied unchanged from r262613, head/lib/clang/include/SparcGenMCCodeEmitter.inc stable/9/lib/clang/include/SparcGenRegisterInfo.inc - copied unchanged from r262613, head/lib/clang/include/SparcGenRegisterInfo.inc stable/9/lib/clang/include/SparcGenSubtargetInfo.inc - copied unchanged from r262613, head/lib/clang/include/SparcGenSubtargetInfo.inc stable/9/lib/clang/libllvmsparcasmparser/ - copied from r262613, head/lib/clang/libllvmsparcasmparser/ stable/9/lib/clang/libllvmsparccodegen/ - copied from r262613, head/lib/clang/libllvmsparccodegen/ stable/9/lib/clang/libllvmsparcdesc/ - copied from r262613, head/lib/clang/libllvmsparcdesc/ stable/9/lib/clang/libllvmsparcdisassembler/ - copied from r262613, head/lib/clang/libllvmsparcdisassembler/ stable/9/lib/clang/libllvmsparcinfo/ - copied from r262613, head/lib/clang/libllvmsparcinfo/ stable/9/lib/clang/libllvmsparcinstprinter/ - copied from r262613, head/lib/clang/libllvmsparcinstprinter/ Deleted: stable/9/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcBaseInfo.h Modified: stable/9/contrib/compiler-rt/lib/absvti2.c stable/9/contrib/compiler-rt/lib/addvti3.c stable/9/contrib/compiler-rt/lib/ashlti3.c stable/9/contrib/compiler-rt/lib/ashrti3.c stable/9/contrib/compiler-rt/lib/clzti2.c stable/9/contrib/compiler-rt/lib/cmpti2.c stable/9/contrib/compiler-rt/lib/ctzti2.c stable/9/contrib/compiler-rt/lib/divti3.c stable/9/contrib/compiler-rt/lib/ffsti2.c stable/9/contrib/compiler-rt/lib/fixdfti.c stable/9/contrib/compiler-rt/lib/fixsfti.c stable/9/contrib/compiler-rt/lib/fixunsdfti.c stable/9/contrib/compiler-rt/lib/fixunssfti.c stable/9/contrib/compiler-rt/lib/fixunsxfti.c stable/9/contrib/compiler-rt/lib/fixxfti.c stable/9/contrib/compiler-rt/lib/floattidf.c stable/9/contrib/compiler-rt/lib/floattisf.c stable/9/contrib/compiler-rt/lib/floattixf.c stable/9/contrib/compiler-rt/lib/floatuntidf.c stable/9/contrib/compiler-rt/lib/floatuntisf.c stable/9/contrib/compiler-rt/lib/floatuntixf.c stable/9/contrib/compiler-rt/lib/int_types.h stable/9/contrib/compiler-rt/lib/lshrti3.c stable/9/contrib/compiler-rt/lib/modti3.c stable/9/contrib/compiler-rt/lib/muloti4.c stable/9/contrib/compiler-rt/lib/multi3.c stable/9/contrib/compiler-rt/lib/mulvti3.c stable/9/contrib/compiler-rt/lib/negti2.c stable/9/contrib/compiler-rt/lib/negvti2.c stable/9/contrib/compiler-rt/lib/parityti2.c stable/9/contrib/compiler-rt/lib/popcountti2.c stable/9/contrib/compiler-rt/lib/subvti3.c stable/9/contrib/compiler-rt/lib/ucmpti2.c stable/9/contrib/compiler-rt/lib/udivmodti4.c stable/9/contrib/compiler-rt/lib/udivti3.c stable/9/contrib/compiler-rt/lib/umodti3.c stable/9/contrib/gcc/longlong.h stable/9/contrib/llvm/include/llvm/MC/MCAsmInfo.h stable/9/contrib/llvm/include/llvm/Object/ELFObjectFile.h stable/9/contrib/llvm/include/llvm/Support/ELF.h stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp stable/9/contrib/llvm/lib/MC/MCObjectFileInfo.cpp stable/9/contrib/llvm/lib/Object/ELF.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp stable/9/contrib/llvm/lib/Target/Sparc/DelaySlotFiller.cpp stable/9/contrib/llvm/lib/Target/Sparc/InstPrinter/SparcInstPrinter.cpp stable/9/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp stable/9/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.h stable/9/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp stable/9/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.h stable/9/contrib/llvm/lib/Target/Sparc/Sparc.h stable/9/contrib/llvm/lib/Target/Sparc/Sparc.td stable/9/contrib/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcCallingConv.td stable/9/contrib/llvm/lib/Target/Sparc/SparcCodeEmitter.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcISelLowering.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcISelLowering.h stable/9/contrib/llvm/lib/Target/Sparc/SparcInstr64Bit.td stable/9/contrib/llvm/lib/Target/Sparc/SparcInstrFormats.td stable/9/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.td stable/9/contrib/llvm/lib/Target/Sparc/SparcJITInfo.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcRelocations.h stable/9/contrib/llvm/lib/Target/Sparc/SparcSubtarget.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcSubtarget.h stable/9/contrib/llvm/tools/clang/lib/Basic/Targets.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp stable/9/lib/clang/Makefile stable/9/lib/clang/clang.build.mk stable/9/lib/clang/include/llvm/Config/AsmParsers.def stable/9/lib/clang/include/llvm/Config/AsmPrinters.def stable/9/lib/clang/include/llvm/Config/Disassemblers.def stable/9/lib/clang/include/llvm/Config/Targets.def stable/9/lib/libc/sparc64/sys/__sparc_utrap_setup.c stable/9/lib/msun/Makefile stable/9/share/mk/bsd.sys.mk (contents, props changed) stable/9/sys/boot/sparc64/boot1/Makefile stable/9/sys/conf/kern.mk stable/9/sys/dev/esp/esp_sbus.c stable/9/sys/dev/fb/creator.c stable/9/sys/dev/fb/machfb.c stable/9/sys/dev/mk48txx/mk48txx.c stable/9/sys/sparc64/conf/GENERIC stable/9/sys/sparc64/isa/isa.c stable/9/sys/sparc64/pci/firereg.h stable/9/usr.bin/clang/clang/Makefile stable/9/usr.bin/clang/llc/Makefile stable/9/usr.bin/clang/llvm-mc/Makefile stable/9/usr.bin/clang/llvm-objdump/Makefile stable/9/usr.bin/clang/llvm-rtdyld/Makefile stable/9/usr.bin/clang/opt/Makefile stable/9/usr.sbin/eeprom/ofw_options.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/contrib/compiler-rt/ (props changed) stable/9/contrib/gcc/ (props changed) stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) stable/9/contrib/openpam/ (props changed) stable/9/etc/ (props changed) stable/9/lib/clang/ (props changed) stable/9/lib/libc/ (props changed) stable/9/lib/msun/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man4/ (props changed) stable/9/share/mk/ (props changed) stable/9/sys/ (props changed) stable/9/usr.bin/clang/ (props changed) Modified: stable/9/contrib/compiler-rt/lib/absvti2.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/absvti2.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/absvti2.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: absolute value */ @@ -30,4 +30,5 @@ __absvti2(ti_int a) return (a ^ s) - s; } -#endif +#endif /* CRT_HAS_128BIT */ + Modified: stable/9/contrib/compiler-rt/lib/addvti3.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/addvti3.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/addvti3.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: a + b */ @@ -37,4 +37,4 @@ __addvti3(ti_int a, ti_int b) return s; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/9/contrib/compiler-rt/lib/ashlti3.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/ashlti3.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/ashlti3.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: a << b */ @@ -42,4 +42,4 @@ __ashlti3(ti_int a, si_int b) return result.all; } -#endif /* __x86_64 */ +#endif /* CRT_HAS_128BIT */ Modified: stable/9/contrib/compiler-rt/lib/ashrti3.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/ashrti3.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/ashrti3.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: arithmetic a >> b */ @@ -43,4 +43,4 @@ __ashrti3(ti_int a, si_int b) return result.all; } -#endif /* __x86_64 */ +#endif /* CRT_HAS_128BIT */ Modified: stable/9/contrib/compiler-rt/lib/clzti2.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/clzti2.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/clzti2.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: the number of leading 0-bits */ @@ -30,4 +30,4 @@ __clzti2(ti_int a) ((si_int)f & ((si_int)(sizeof(di_int) * CHAR_BIT))); } -#endif /* __x86_64 */ +#endif /* CRT_HAS_128BIT */ Modified: stable/9/contrib/compiler-rt/lib/cmpti2.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/cmpti2.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/cmpti2.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: if (a < b) returns 0 * if (a == b) returns 1 @@ -39,4 +39,4 @@ __cmpti2(ti_int a, ti_int b) return 1; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/9/contrib/compiler-rt/lib/ctzti2.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/ctzti2.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/ctzti2.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: the number of trailing 0-bits */ @@ -30,4 +30,4 @@ __ctzti2(ti_int a) ((si_int)f & ((si_int)(sizeof(di_int) * CHAR_BIT))); } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/9/contrib/compiler-rt/lib/divti3.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/divti3.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/divti3.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT tu_int __udivmodti4(tu_int a, tu_int b, tu_int* rem); @@ -32,4 +32,4 @@ __divti3(ti_int a, ti_int b) return (__udivmodti4(a, b, (tu_int*)0) ^ s_a) - s_a; /* negate if s_a == -1 */ } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/9/contrib/compiler-rt/lib/ffsti2.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/ffsti2.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/ffsti2.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: the index of the least significant 1-bit in a, or * the value zero if a is zero. The least significant bit is index one. @@ -34,4 +34,4 @@ __ffsti2(ti_int a) return __builtin_ctzll(x.s.low) + 1; } -#endif /* __x86_64 */ +#endif /* CRT_HAS_128BIT */ Modified: stable/9/contrib/compiler-rt/lib/fixdfti.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/fixdfti.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/fixdfti.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: convert a to a signed long long, rounding toward zero. */ @@ -42,4 +42,4 @@ __fixdfti(double a) return (r ^ s) - s; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/9/contrib/compiler-rt/lib/fixsfti.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/fixsfti.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/fixsfti.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: convert a to a signed long long, rounding toward zero. */ @@ -42,4 +42,4 @@ __fixsfti(float a) return (r ^ s) - s; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/9/contrib/compiler-rt/lib/fixunsdfti.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/fixunsdfti.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/fixunsdfti.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: convert a to a unsigned long long, rounding toward zero. * Negative values all become zero. @@ -44,4 +44,4 @@ __fixunsdfti(double a) return r; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/9/contrib/compiler-rt/lib/fixunssfti.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/fixunssfti.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/fixunssfti.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: convert a to a unsigned long long, rounding toward zero. * Negative values all become zero. @@ -44,4 +44,4 @@ __fixunssfti(float a) return r; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/9/contrib/compiler-rt/lib/fixunsxfti.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/fixunsxfti.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/fixunsxfti.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: convert a to a unsigned long long, rounding toward zero. * Negative values all become zero. @@ -46,4 +46,4 @@ __fixunsxfti(long double a) return r; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/9/contrib/compiler-rt/lib/fixxfti.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/fixxfti.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/fixxfti.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: convert a to a signed long long, rounding toward zero. */ @@ -44,4 +44,4 @@ __fixxfti(long double a) return (r ^ s) - s; } -#endif /* __x86_64 */ +#endif /* CRT_HAS_128BIT */ Modified: stable/9/contrib/compiler-rt/lib/floattidf.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/floattidf.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/floattidf.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: convert a to a double, rounding toward even.*/ @@ -82,4 +82,4 @@ __floattidf(ti_int a) return fb.f; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/9/contrib/compiler-rt/lib/floattisf.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/floattisf.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/floattisf.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: convert a to a float, rounding toward even. */ @@ -81,4 +81,4 @@ __floattisf(ti_int a) return fb.f; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/9/contrib/compiler-rt/lib/floattixf.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/floattixf.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/floattixf.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: convert a to a long double, rounding toward even. */ @@ -47,7 +47,7 @@ __floattixf(ti_int a) * P = bit LDBL_MANT_DIG-1 bits to the right of 1 * Q = bit LDBL_MANT_DIG bits to the right of 1 * R = "or" of all bits to the right of Q - */ + */ switch (sd) { case LDBL_MANT_DIG + 1: @@ -83,4 +83,4 @@ __floattixf(ti_int a) return fb.f; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/9/contrib/compiler-rt/lib/floatuntidf.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/floatuntidf.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/floatuntidf.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: convert a to a double, rounding toward even. */ @@ -43,7 +43,7 @@ __floatuntidf(tu_int a) * P = bit DBL_MANT_DIG-1 bits to the right of 1 * Q = bit DBL_MANT_DIG bits to the right of 1 * R = "or" of all bits to the right of Q - */ + */ switch (sd) { case DBL_MANT_DIG + 1: @@ -79,4 +79,4 @@ __floatuntidf(tu_int a) return fb.f; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/9/contrib/compiler-rt/lib/floatuntisf.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/floatuntisf.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/floatuntisf.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: convert a to a float, rounding toward even. */ @@ -78,4 +78,4 @@ __floatuntisf(tu_int a) return fb.f; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/9/contrib/compiler-rt/lib/floatuntixf.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/floatuntixf.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/floatuntixf.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: convert a to a long double, rounding toward even. */ Modified: stable/9/contrib/compiler-rt/lib/int_types.h ============================================================================== --- stable/9/contrib/compiler-rt/lib/int_types.h Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/int_types.h Wed Mar 26 07:35:24 2014 (r263764) @@ -56,8 +56,11 @@ typedef union }s; } udwords; -#if __x86_64 +#if __LP64__ +#define CRT_HAS_128BIT +#endif +#ifdef CRT_HAS_128BIT typedef int ti_int __attribute__ ((mode (TI))); typedef unsigned tu_int __attribute__ ((mode (TI))); @@ -105,7 +108,7 @@ static inline tu_int make_tu(du_int h, d return r.all; } -#endif /* __x86_64 */ +#endif /* CRT_HAS_128BIT */ typedef union { Modified: stable/9/contrib/compiler-rt/lib/lshrti3.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/lshrti3.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/lshrti3.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: logical a >> b */ @@ -42,4 +42,4 @@ __lshrti3(ti_int a, si_int b) return result.all; } -#endif /* __x86_64 */ +#endif /* CRT_HAS_128BIT */ Modified: stable/9/contrib/compiler-rt/lib/modti3.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/modti3.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/modti3.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT tu_int __udivmodti4(tu_int a, tu_int b, tu_int* rem); @@ -33,4 +33,4 @@ __modti3(ti_int a, ti_int b) return (r ^ s) - s; /* negate if s == -1 */ } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/9/contrib/compiler-rt/lib/muloti4.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/muloti4.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/muloti4.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: a * b */ @@ -59,4 +59,4 @@ __muloti4(ti_int a, ti_int b, int* overf return result; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/9/contrib/compiler-rt/lib/multi3.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/multi3.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/multi3.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: a * b */ @@ -55,4 +55,4 @@ __multi3(ti_int a, ti_int b) return r.all; } -#endif /* __x86_64 */ +#endif /* CRT_HAS_128BIT */ Modified: stable/9/contrib/compiler-rt/lib/mulvti3.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/mulvti3.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/mulvti3.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: a * b */ @@ -57,4 +57,4 @@ __mulvti3(ti_int a, ti_int b) return a * b; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/9/contrib/compiler-rt/lib/negti2.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/negti2.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/negti2.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: -a */ @@ -27,4 +27,4 @@ __negti2(ti_int a) return -a; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/9/contrib/compiler-rt/lib/negvti2.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/negvti2.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/negvti2.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: -a */ @@ -29,4 +29,4 @@ __negvti2(ti_int a) return -a; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/9/contrib/compiler-rt/lib/parityti2.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/parityti2.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/parityti2.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: 1 if number of bits is odd else returns 0 */ @@ -28,4 +28,4 @@ __parityti2(ti_int a) return __paritydi2(x.s.high ^ x.s.low); } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/9/contrib/compiler-rt/lib/popcountti2.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/popcountti2.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/popcountti2.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: count of 1 bits */ @@ -41,4 +41,4 @@ __popcountti2(ti_int a) return (x + (x >> 8)) & 0xFF; /* (8 significant bits) */ } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/9/contrib/compiler-rt/lib/subvti3.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/subvti3.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/subvti3.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: a - b */ @@ -37,4 +37,4 @@ __subvti3(ti_int a, ti_int b) return s; } -#endif /* __x86_64 */ +#endif /* CRT_HAS_128BIT */ Modified: stable/9/contrib/compiler-rt/lib/ucmpti2.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/ucmpti2.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/ucmpti2.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Returns: if (a < b) returns 0 * if (a == b) returns 1 @@ -39,4 +39,4 @@ __ucmpti2(tu_int a, tu_int b) return 1; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/9/contrib/compiler-rt/lib/udivmodti4.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/udivmodti4.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/udivmodti4.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT /* Effects: if rem != 0, *rem = a % b * Returns: a / b @@ -253,4 +253,4 @@ __udivmodti4(tu_int a, tu_int b, tu_int* return q.all; } -#endif /* __x86_64 */ +#endif /* CRT_HAS_128BIT */ Modified: stable/9/contrib/compiler-rt/lib/udivti3.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/udivti3.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/udivti3.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT tu_int __udivmodti4(tu_int a, tu_int b, tu_int* rem); @@ -26,4 +26,4 @@ __udivti3(tu_int a, tu_int b) return __udivmodti4(a, b, 0); } -#endif /* __x86_64 */ +#endif /* CRT_HAS_128BIT */ Modified: stable/9/contrib/compiler-rt/lib/umodti3.c ============================================================================== --- stable/9/contrib/compiler-rt/lib/umodti3.c Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/compiler-rt/lib/umodti3.c Wed Mar 26 07:35:24 2014 (r263764) @@ -14,7 +14,7 @@ #include "int_lib.h" -#if __x86_64 +#ifdef CRT_HAS_128BIT tu_int __udivmodti4(tu_int a, tu_int b, tu_int* rem); @@ -28,4 +28,4 @@ __umodti3(tu_int a, tu_int b) return r; } -#endif +#endif /* CRT_HAS_128BIT */ Modified: stable/9/contrib/gcc/longlong.h ============================================================================== --- stable/9/contrib/gcc/longlong.h Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/gcc/longlong.h Wed Mar 26 07:35:24 2014 (r263764) @@ -1086,8 +1086,8 @@ UDItype __umulsidi3 (USItype, USItype); "bcs,a,pn %%xcc, 1f\n\t" \ "add %0, 1, %0\n" \ "1:" \ - : "=r" ((UDItype)(sh)), \ - "=&r" ((UDItype)(sl)) \ + : "=r" (sh), \ + "=&r" (sl) \ : "%rJ" ((UDItype)(ah)), \ "rI" ((UDItype)(bh)), \ "%rJ" ((UDItype)(al)), \ @@ -1100,8 +1100,8 @@ UDItype __umulsidi3 (USItype, USItype); "bcs,a,pn %%xcc, 1f\n\t" \ "sub %0, 1, %0\n\t" \ "1:" \ - : "=r" ((UDItype)(sh)), \ - "=&r" ((UDItype)(sl)) \ + : "=r" (sh), \ + "=&r" (sl) \ : "rJ" ((UDItype)(ah)), \ "rI" ((UDItype)(bh)), \ "rJ" ((UDItype)(al)), \ @@ -1133,8 +1133,8 @@ UDItype __umulsidi3 (USItype, USItype); "sllx %3,32,%3\n\t" \ "add %1,%3,%1\n\t" \ "add %5,%2,%0" \ - : "=r" ((UDItype)(wh)), \ - "=&r" ((UDItype)(wl)), \ + : "=r" (wh), \ + "=&r" (wl), \ "=&r" (tmp1), "=&r" (tmp2), "=&r" (tmp3), "=&r" (tmp4) \ : "r" ((UDItype)(u)), \ "r" ((UDItype)(v)) \ Modified: stable/9/contrib/llvm/include/llvm/MC/MCAsmInfo.h ============================================================================== --- stable/9/contrib/llvm/include/llvm/MC/MCAsmInfo.h Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/llvm/include/llvm/MC/MCAsmInfo.h Wed Mar 26 07:35:24 2014 (r263764) @@ -371,7 +371,7 @@ namespace llvm { unsigned Encoding, MCStreamer &Streamer) const; - const MCExpr * + virtual const MCExpr * getExprForFDESymbol(const MCSymbol *Sym, unsigned Encoding, MCStreamer &Streamer) const; Modified: stable/9/contrib/llvm/include/llvm/Object/ELFObjectFile.h ============================================================================== --- stable/9/contrib/llvm/include/llvm/Object/ELFObjectFile.h Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/llvm/include/llvm/Object/ELFObjectFile.h Wed Mar 26 07:35:24 2014 (r263764) @@ -922,6 +922,9 @@ StringRef ELFObjectFile::getFileFo return "ELF32-mips"; case ELF::EM_PPC: return "ELF32-ppc"; + case ELF::EM_SPARC: + case ELF::EM_SPARC32PLUS: + return "ELF32-sparc"; default: return "ELF32-unknown"; } @@ -937,6 +940,8 @@ StringRef ELFObjectFile::getFileFo return "ELF64-ppc64"; case ELF::EM_S390: return "ELF64-s390"; + case ELF::EM_SPARCV9: + return "ELF64-sparc"; default: return "ELF64-unknown"; } @@ -967,6 +972,13 @@ unsigned ELFObjectFile::getArch() : Triple::ppc64; case ELF::EM_S390: return Triple::systemz; + + case ELF::EM_SPARC: + case ELF::EM_SPARC32PLUS: + return Triple::sparc; + case ELF::EM_SPARCV9: + return Triple::sparcv9; + default: return Triple::UnknownArch; } Modified: stable/9/contrib/llvm/include/llvm/Support/ELF.h ============================================================================== --- stable/9/contrib/llvm/include/llvm/Support/ELF.h Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/llvm/include/llvm/Support/ELF.h Wed Mar 26 07:35:24 2014 (r263764) @@ -1087,6 +1087,94 @@ enum { R_390_IRELATIVE = 61 }; +// ELF Relocation type for Sparc. +enum { + R_SPARC_NONE = 0, + R_SPARC_8 = 1, + R_SPARC_16 = 2, + R_SPARC_32 = 3, + R_SPARC_DISP8 = 4, + R_SPARC_DISP16 = 5, + R_SPARC_DISP32 = 6, + R_SPARC_WDISP30 = 7, + R_SPARC_WDISP22 = 8, + R_SPARC_HI22 = 9, + R_SPARC_22 = 10, + R_SPARC_13 = 11, + R_SPARC_LO10 = 12, + R_SPARC_GOT10 = 13, + R_SPARC_GOT13 = 14, + R_SPARC_GOT22 = 15, + R_SPARC_PC10 = 16, + R_SPARC_PC22 = 17, + R_SPARC_WPLT30 = 18, + R_SPARC_COPY = 19, + R_SPARC_GLOB_DAT = 20, + R_SPARC_JMP_SLOT = 21, + R_SPARC_RELATIVE = 22, + R_SPARC_UA32 = 23, + R_SPARC_PLT32 = 24, + R_SPARC_HIPLT22 = 25, + R_SPARC_LOPLT10 = 26, + R_SPARC_PCPLT32 = 27, + R_SPARC_PCPLT22 = 28, + R_SPARC_PCPLT10 = 29, + R_SPARC_10 = 30, + R_SPARC_11 = 31, + R_SPARC_64 = 32, + R_SPARC_OLO10 = 33, + R_SPARC_HH22 = 34, + R_SPARC_HM10 = 35, + R_SPARC_LM22 = 36, + R_SPARC_PC_HH22 = 37, + R_SPARC_PC_HM10 = 38, + R_SPARC_PC_LM22 = 39, + R_SPARC_WDISP16 = 40, + R_SPARC_WDISP19 = 41, + R_SPARC_7 = 43, + R_SPARC_5 = 44, + R_SPARC_6 = 45, + R_SPARC_DISP64 = 46, + R_SPARC_PLT64 = 47, + R_SPARC_HIX22 = 48, + R_SPARC_LOX10 = 49, + R_SPARC_H44 = 50, + R_SPARC_M44 = 51, + R_SPARC_L44 = 52, + R_SPARC_REGISTER = 53, + R_SPARC_UA64 = 54, + R_SPARC_UA16 = 55, + R_SPARC_TLS_GD_HI22 = 56, + R_SPARC_TLS_GD_LO10 = 57, + R_SPARC_TLS_GD_ADD = 58, + R_SPARC_TLS_GD_CALL = 59, + R_SPARC_TLS_LDM_HI22 = 60, + R_SPARC_TLS_LDM_LO10 = 61, + R_SPARC_TLS_LDM_ADD = 62, + R_SPARC_TLS_LDM_CALL = 63, + R_SPARC_TLS_LDO_HIX22 = 64, + R_SPARC_TLS_LDO_LOX10 = 65, + R_SPARC_TLS_LDO_ADD = 66, + R_SPARC_TLS_IE_HI22 = 67, + R_SPARC_TLS_IE_LO10 = 68, + R_SPARC_TLS_IE_LD = 69, + R_SPARC_TLS_IE_LDX = 70, + R_SPARC_TLS_IE_ADD = 71, + R_SPARC_TLS_LE_HIX22 = 72, + R_SPARC_TLS_LE_LOX10 = 73, + R_SPARC_TLS_DTPMOD32 = 74, + R_SPARC_TLS_DTPMOD64 = 75, + R_SPARC_TLS_DTPOFF32 = 76, + R_SPARC_TLS_DTPOFF64 = 77, + R_SPARC_TLS_TPOFF32 = 78, + R_SPARC_TLS_TPOFF64 = 79, + R_SPARC_GOTDATA_HIX22 = 80, + R_SPARC_GOTDATA_LOX22 = 81, + R_SPARC_GOTDATA_OP_HIX22 = 82, + R_SPARC_GOTDATA_OP_LOX22 = 83, + R_SPARC_GOTDATA_OP = 84 +}; + // Section header. struct Elf32_Shdr { Elf32_Word sh_name; // Section name (index into string table) Modified: stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp ============================================================================== --- stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Wed Mar 26 07:35:24 2014 (r263764) @@ -23,6 +23,7 @@ #include "llvm/CodeGen/MachineConstantPool.h" #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/CodeGen/MachineFunction.h" +#include "llvm/CodeGen/MachineInstrBundle.h" #include "llvm/CodeGen/MachineJumpTableInfo.h" #include "llvm/CodeGen/MachineLoopInfo.h" #include "llvm/CodeGen/MachineModuleInfo.h" @@ -2221,14 +2222,13 @@ isBlockOnlyReachableByFallthrough(const if (!MI.isBranch() || MI.isIndirectBranch()) return false; - // If we are the operands of one of the branches, this is not - // a fall through. - for (MachineInstr::mop_iterator OI = MI.operands_begin(), - OE = MI.operands_end(); OI != OE; ++OI) { - const MachineOperand& OP = *OI; - if (OP.isJTI()) + // If we are the operands of one of the branches, this is not a fall + // through. Note that targets with delay slots will usually bundle + // terminators with the delay slot instruction. + for (ConstMIBundleOperands OP(&MI); OP.isValid(); ++OP) { + if (OP->isJTI()) return false; - if (OP.isMBB() && OP.getMBB() == MBB) + if (OP->isMBB() && OP->getMBB() == MBB) return false; } } Modified: stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp ============================================================================== --- stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp Wed Mar 26 07:35:24 2014 (r263764) @@ -220,10 +220,19 @@ void InstrEmitter::CreateVirtualRegister unsigned VRBase = 0; const TargetRegisterClass *RC = TRI->getAllocatableClass(TII->getRegClass(II, i, TRI, *MF)); - // If the register class is unknown for the given definition, then try to - // infer one from the value type. - if (!RC && i < NumResults) - RC = TLI->getRegClassFor(Node->getSimpleValueType(i)); + // Always let the value type influence the used register class. The + // constraints on the instruction may be too lax to represent the value + // type correctly. For example, a 64-bit float (X86::FR64) can't live in + // the 32-bit float super-class (X86::FR32). + if (i < NumResults && TLI->isTypeLegal(Node->getSimpleValueType(i))) { + const TargetRegisterClass *VTRC = + TLI->getRegClassFor(Node->getSimpleValueType(i)); + if (RC) + VTRC = TRI->getCommonSubClass(RC, VTRC); + if (VTRC) + RC = VTRC; + } + if (II.OpInfo[i].isOptionalDef()) { // Optional def must be a physical register. unsigned NumResults = CountResults(Node); Modified: stable/9/contrib/llvm/lib/MC/MCObjectFileInfo.cpp ============================================================================== --- stable/9/contrib/llvm/lib/MC/MCObjectFileInfo.cpp Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/llvm/lib/MC/MCObjectFileInfo.cpp Wed Mar 26 07:35:24 2014 (r263764) @@ -310,6 +310,33 @@ void MCObjectFileInfo::InitELFMCObjectFi FDEEncoding = dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_udata8; TTypeEncoding = dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_udata8; + } else if (T.getArch() == Triple::sparc) { + if (RelocM == Reloc::PIC_) { + LSDAEncoding = dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4; + PersonalityEncoding = dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel | + dwarf::DW_EH_PE_sdata4; + FDEEncoding = dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4; + TTypeEncoding = dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel | + dwarf::DW_EH_PE_sdata4; + } else { + LSDAEncoding = dwarf::DW_EH_PE_absptr; + PersonalityEncoding = dwarf::DW_EH_PE_absptr; + FDEEncoding = dwarf::DW_EH_PE_udata4; + TTypeEncoding = dwarf::DW_EH_PE_absptr; + } + } else if (T.getArch() == Triple::sparcv9) { + LSDAEncoding = dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4; + if (RelocM == Reloc::PIC_) { + PersonalityEncoding = dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel | + dwarf::DW_EH_PE_sdata4; + FDEEncoding = dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4; + TTypeEncoding = dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel | + dwarf::DW_EH_PE_sdata4; + } else { + PersonalityEncoding = dwarf::DW_EH_PE_absptr; + FDEEncoding = dwarf::DW_EH_PE_udata4; + TTypeEncoding = dwarf::DW_EH_PE_absptr; + } } else if (T.getArch() == Triple::systemz) { // All currently-defined code models guarantee that 4-byte PC-relative // values will be in range. Modified: stable/9/contrib/llvm/lib/Object/ELF.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Object/ELF.cpp Wed Mar 26 07:31:57 2014 (r263763) +++ stable/9/contrib/llvm/lib/Object/ELF.cpp Wed Mar 26 07:35:24 2014 (r263764) @@ -702,6 +702,98 @@ StringRef getELFRelocationTypeName(uint3 break; } break; + case ELF::EM_SPARC: + case ELF::EM_SPARC32PLUS: + case ELF::EM_SPARCV9: + switch (Type) { + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_NONE); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_8); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_16); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_32); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_DISP8); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_DISP16); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_DISP32); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_WDISP30); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_WDISP22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_HI22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_13); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_LO10); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_GOT10); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_GOT13); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_GOT22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_PC10); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_PC22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_WPLT30); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_COPY); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_GLOB_DAT); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_JMP_SLOT); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_RELATIVE); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_UA32); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_PLT32); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_HIPLT22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_LOPLT10); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_PCPLT32); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_PCPLT22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_PCPLT10); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_10); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_11); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_64); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_OLO10); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_HH22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_HM10); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_LM22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_PC_HH22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_PC_HM10); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_PC_LM22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_WDISP16); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_WDISP19); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_7); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_5); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_6); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_DISP64); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_PLT64); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_HIX22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_LOX10); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_H44); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_M44); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_L44); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_REGISTER); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_UA64); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_UA16); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_GD_HI22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_GD_LO10); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_GD_ADD); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_GD_CALL); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_LDM_HI22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_LDM_LO10); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_LDM_ADD); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_LDM_CALL); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_LDO_HIX22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_LDO_LOX10); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_LDO_ADD); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_IE_HI22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_IE_LO10); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_IE_LD); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_IE_LDX); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_IE_ADD); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_LE_HIX22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_LE_LOX10); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_DTPMOD32); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_DTPMOD64); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_DTPOFF32); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_DTPOFF64); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_TPOFF32); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_TPOFF64); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_GOTDATA_HIX22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_GOTDATA_LOX22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_GOTDATA_OP_HIX22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_GOTDATA_OP_LOX22); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_GOTDATA_OP); + default: + break; + } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Wed Mar 26 07:42:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 95757D4A; Wed, 26 Mar 2014 07:42:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6745837B; Wed, 26 Mar 2014 07:42:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2Q7gm8c058506; Wed, 26 Mar 2014 07:42:48 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2Q7gkPX058491; Wed, 26 Mar 2014 07:42:46 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201403260742.s2Q7gkPX058491@svn.freebsd.org> From: Dimitry Andric Date: Wed, 26 Mar 2014 07:42:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263765 - in stable: 10/contrib/llvm/include/llvm/CodeGen 10/contrib/llvm/lib/CodeGen 10/contrib/llvm/lib/CodeGen/SelectionDAG 10/contrib/llvm/lib/MC/MCParser 10/contrib/llvm/lib/Target... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Mar 2014 07:42:48 -0000 Author: dim Date: Wed Mar 26 07:42:43 2014 New Revision: 263765 URL: http://svnweb.freebsd.org/changeset/base/263765 Log: MFC r263312: Pull in r196939 from upstream llvm trunk (by Reid Kleckner): Reland "Fix miscompile of MS inline assembly with stack realignment" This re-lands commit r196876, which was reverted in r196879. The tests have been fixed to pass on platforms with a stack alignment larger than 4. Update to clang side tests will land shortly. Pull in r196986 from upstream llvm trunk (by Reid Kleckner): Revert the backend fatal error from r196939 The combination of inline asm, stack realignment, and dynamic allocas turns out to be too common to reject out of hand. ASan inserts empy inline asm fragments and uses aligned allocas. Compiling any trivial function containing a dynamic alloca with ASan is enough to trigger the check. XFAIL the test cases that would be miscompiled and add one that uses the relevant functionality. Pull in r202930 from upstream llvm trunk (by Hans Wennborg): Check for dynamic allocas and inline asm that clobbers sp before building selection dag (PR19012) In X86SelectionDagInfo::EmitTargetCodeForMemcpy we check with MachineFrameInfo to make sure that ESI isn't used as a base pointer register before we choose to emit rep movs (which clobbers esi). The problem is that MachineFrameInfo wouldn't know about dynamic allocas or inline asm that clobbers the stack pointer until SelectionDAGBuilder has encountered them. This patch fixes the problem by checking for such things when building the FunctionLoweringInfo. Differential Revision: http://llvm-reviews.chandlerc.com/D2954 Together, these commits fix the problem encountered in the devel/emacs port on the i386 architecture, where a combination of stack realignment, alloca() and memcpy() could incidentally clobber the %esi register, leading to segfaults in the temacs build-time utility. See also: http://llvm.org/PR18171 and http://llvm.org/PR19012 Reported by: ashish PR: ports/183064 MFC r263313: Pull in r203311 from upstream llvm trunk (by Arnold Schwaighofer): ISel: Make VSELECT selection terminate in cases where the condition type has to be split and the result type widened. When the condition of a vselect has to be split it makes no sense widening the vselect and thereby widening the condition. We end up in an endless loop of widening (vselect result type) and splitting (condition mask type) doing this. Instead, split both the condition and the vselect and widen the result. I ran this over the test suite with i686 and mattr=+sse and saw no regressions. Fixes PR18036. With this fix the original problem case from the graphics/rawtherapee port (posted in http://llvm.org/PR18036 ) now compiles within ~97MB RSS. Reported by: mandree MFC r263320: Add separate patch files for all the customizations we have currently applied to our copy of llvm/clang. These can be applied in alphabetical order to a pristine llvm/clang 3.4 release source tree, to result in the same version used in FreeBSD. This is intended to clearly document all the changes until now, which mostly consist of cherry pickings from the respective upstream trunks, plus a number of hand-written FreeBSD-specific ones. Hopefully those can eventually be cleaned up and sent upstream too. Added: stable/10/contrib/llvm/patches/ - copied from r263320, head/contrib/llvm/patches/ Modified: stable/10/contrib/llvm/include/llvm/CodeGen/FunctionLoweringInfo.h stable/10/contrib/llvm/include/llvm/CodeGen/MachineFrameInfo.h stable/10/contrib/llvm/include/llvm/CodeGen/MachineFunction.h stable/10/contrib/llvm/lib/CodeGen/MachineFunction.cpp stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp stable/10/contrib/llvm/lib/MC/MCParser/AsmParser.cpp stable/10/contrib/llvm/lib/Target/X86/X86FrameLowering.cpp stable/10/contrib/llvm/lib/Target/X86/X86RegisterInfo.cpp Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Added: stable/9/contrib/llvm/patches/ - copied from r263320, head/contrib/llvm/patches/ Modified: stable/9/contrib/llvm/include/llvm/CodeGen/FunctionLoweringInfo.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineFrameInfo.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineFunction.h stable/9/contrib/llvm/lib/CodeGen/MachineFunction.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp stable/9/contrib/llvm/lib/MC/MCParser/AsmParser.cpp stable/9/contrib/llvm/lib/Target/X86/X86FrameLowering.cpp stable/9/contrib/llvm/lib/Target/X86/X86RegisterInfo.cpp Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/llvm/ (props changed) Modified: stable/10/contrib/llvm/include/llvm/CodeGen/FunctionLoweringInfo.h ============================================================================== --- stable/10/contrib/llvm/include/llvm/CodeGen/FunctionLoweringInfo.h Wed Mar 26 07:35:24 2014 (r263764) +++ stable/10/contrib/llvm/include/llvm/CodeGen/FunctionLoweringInfo.h Wed Mar 26 07:42:43 2014 (r263765) @@ -41,6 +41,7 @@ class MachineBasicBlock; class MachineFunction; class MachineModuleInfo; class MachineRegisterInfo; +class SelectionDAG; class TargetLowering; class Value; @@ -125,7 +126,7 @@ public: /// set - Initialize this FunctionLoweringInfo with the given Function /// and its associated MachineFunction. /// - void set(const Function &Fn, MachineFunction &MF); + void set(const Function &Fn, MachineFunction &MF, SelectionDAG *DAG); /// clear - Clear out all the function-specific state. This returns this /// FunctionLoweringInfo to an empty state, ready to be used for a Modified: stable/10/contrib/llvm/include/llvm/CodeGen/MachineFrameInfo.h ============================================================================== --- stable/10/contrib/llvm/include/llvm/CodeGen/MachineFrameInfo.h Wed Mar 26 07:35:24 2014 (r263764) +++ stable/10/contrib/llvm/include/llvm/CodeGen/MachineFrameInfo.h Wed Mar 26 07:42:43 2014 (r263765) @@ -223,6 +223,10 @@ class MachineFrameInfo { /// Whether the "realign-stack" option is on. bool RealignOption; + /// True if the function includes inline assembly that adjusts the stack + /// pointer. + bool HasInlineAsmWithSPAdjust; + const TargetFrameLowering *getFrameLowering() const; public: explicit MachineFrameInfo(const TargetMachine &TM, bool RealignOpt) @@ -240,6 +244,7 @@ public: LocalFrameSize = 0; LocalFrameMaxAlign = 0; UseLocalStackAllocationBlock = false; + HasInlineAsmWithSPAdjust = false; } /// hasStackObjects - Return true if there are any stack objects in this @@ -451,6 +456,10 @@ public: bool hasCalls() const { return HasCalls; } void setHasCalls(bool V) { HasCalls = V; } + /// Returns true if the function contains any stack-adjusting inline assembly. + bool hasInlineAsmWithSPAdjust() const { return HasInlineAsmWithSPAdjust; } + void setHasInlineAsmWithSPAdjust(bool B) { HasInlineAsmWithSPAdjust = B; } + /// getMaxCallFrameSize - Return the maximum size of a call frame that must be /// allocated for an outgoing function call. This is only available if /// CallFrameSetup/Destroy pseudo instructions are used by the target, and @@ -521,7 +530,7 @@ public: /// variable sized object is created, whether or not the index returned is /// actually used. /// - int CreateVariableSizedObject(unsigned Alignment); + int CreateVariableSizedObject(unsigned Alignment, const AllocaInst *Alloca); /// getCalleeSavedInfo - Returns a reference to call saved info vector for the /// current function. Modified: stable/10/contrib/llvm/include/llvm/CodeGen/MachineFunction.h ============================================================================== --- stable/10/contrib/llvm/include/llvm/CodeGen/MachineFunction.h Wed Mar 26 07:35:24 2014 (r263764) +++ stable/10/contrib/llvm/include/llvm/CodeGen/MachineFunction.h Wed Mar 26 07:42:43 2014 (r263765) @@ -131,8 +131,8 @@ class MachineFunction { /// about the control flow of such functions. bool ExposesReturnsTwice; - /// True if the function includes MS-style inline assembly. - bool HasMSInlineAsm; + /// True if the function includes any inline assembly. + bool HasInlineAsm; MachineFunction(const MachineFunction &) LLVM_DELETED_FUNCTION; void operator=(const MachineFunction&) LLVM_DELETED_FUNCTION; @@ -218,15 +218,14 @@ public: ExposesReturnsTwice = B; } - /// Returns true if the function contains any MS-style inline assembly. - bool hasMSInlineAsm() const { - return HasMSInlineAsm; + /// Returns true if the function contains any inline assembly. + bool hasInlineAsm() const { + return HasInlineAsm; } - /// Set a flag that indicates that the function contains MS-style inline - /// assembly. - void setHasMSInlineAsm(bool B) { - HasMSInlineAsm = B; + /// Set a flag that indicates that the function contains inline assembly. + void setHasInlineAsm(bool B) { + HasInlineAsm = B; } /// getInfo - Keep track of various per-function pieces of information for Modified: stable/10/contrib/llvm/lib/CodeGen/MachineFunction.cpp ============================================================================== --- stable/10/contrib/llvm/lib/CodeGen/MachineFunction.cpp Wed Mar 26 07:35:24 2014 (r263764) +++ stable/10/contrib/llvm/lib/CodeGen/MachineFunction.cpp Wed Mar 26 07:42:43 2014 (r263765) @@ -525,13 +525,14 @@ int MachineFrameInfo::CreateSpillStackOb /// variable sized object is created, whether or not the index returned is /// actually used. /// -int MachineFrameInfo::CreateVariableSizedObject(unsigned Alignment) { +int MachineFrameInfo::CreateVariableSizedObject(unsigned Alignment, + const AllocaInst *Alloca) { HasVarSizedObjects = true; Alignment = clampStackAlignment(!getFrameLowering()->isStackRealignable() || !RealignOption, Alignment, getFrameLowering()->getStackAlignment()); - Objects.push_back(StackObject(0, Alignment, 0, false, false, true, 0)); + Objects.push_back(StackObject(0, Alignment, 0, false, false, true, Alloca)); ensureMaxAlignment(Alignment); return (int)Objects.size()-NumFixedObjects-1; } Modified: stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp ============================================================================== --- stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp Wed Mar 26 07:35:24 2014 (r263764) +++ stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp Wed Mar 26 07:42:43 2014 (r263765) @@ -33,6 +33,7 @@ #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/MathExtras.h" #include "llvm/Target/TargetInstrInfo.h" +#include "llvm/Target/TargetFrameLowering.h" #include "llvm/Target/TargetLowering.h" #include "llvm/Target/TargetOptions.h" #include "llvm/Target/TargetRegisterInfo.h" @@ -55,7 +56,8 @@ static bool isUsedOutsideOfDefiningBlock return false; } -void FunctionLoweringInfo::set(const Function &fn, MachineFunction &mf) { +void FunctionLoweringInfo::set(const Function &fn, MachineFunction &mf, + SelectionDAG *DAG) { const TargetLowering *TLI = TM.getTargetLowering(); Fn = &fn; @@ -100,6 +102,43 @@ void FunctionLoweringInfo::set(const Fun for (; BB != EB; ++BB) for (BasicBlock::const_iterator I = BB->begin(), E = BB->end(); I != E; ++I) { + // Look for dynamic allocas. + if (const AllocaInst *AI = dyn_cast(I)) { + if (!AI->isStaticAlloca()) { + unsigned Align = std::max( + (unsigned)TLI->getDataLayout()->getPrefTypeAlignment( + AI->getAllocatedType()), + AI->getAlignment()); + unsigned StackAlign = TM.getFrameLowering()->getStackAlignment(); + if (Align <= StackAlign) + Align = 0; + // Inform the Frame Information that we have variable-sized objects. + MF->getFrameInfo()->CreateVariableSizedObject(Align ? Align : 1, AI); + } + } + + // Look for inline asm that clobbers the SP register. + if (isa(I) || isa(I)) { + ImmutableCallSite CS(I); + if (const InlineAsm *IA = dyn_cast(CS.getCalledValue())) { + unsigned SP = TLI->getStackPointerRegisterToSaveRestore(); + std::vector Ops = + TLI->ParseConstraints(CS); + for (size_t I = 0, E = Ops.size(); I != E; ++I) { + TargetLowering::AsmOperandInfo &Op = Ops[I]; + if (Op.Type == InlineAsm::isClobber) { + // Clobbers don't have SDValue operands, hence SDValue(). + TLI->ComputeConstraintToUse(Op, SDValue(), DAG); + std::pair PhysReg = + TLI->getRegForInlineAsmConstraint(Op.ConstraintCode, + Op.ConstraintVT); + if (PhysReg.first == SP) + MF->getFrameInfo()->setHasInlineAsmWithSPAdjust(true); + } + } + } + } + // Mark values used outside their block as exported, by allocating // a virtual register for them. if (isUsedOutsideOfDefiningBlock(I)) Modified: stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp ============================================================================== --- stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Wed Mar 26 07:35:24 2014 (r263764) +++ stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Wed Mar 26 07:42:43 2014 (r263765) @@ -2180,6 +2180,17 @@ SDValue DAGTypeLegalizer::WidenVecRes_SE if (getTypeAction(CondVT) == TargetLowering::TypeWidenVector) Cond1 = GetWidenedVector(Cond1); + // If we have to split the condition there is no point in widening the + // select. This would result in an cycle of widening the select -> + // widening the condition operand -> splitting the condition operand -> + // splitting the select -> widening the select. Instead split this select + // further and widen the resulting type. + if (getTypeAction(CondVT) == TargetLowering::TypeSplitVector) { + SDValue SplitSelect = SplitVecOp_VSELECT(N, 0); + SDValue Res = ModifyToType(SplitSelect, WidenVT); + return Res; + } + if (Cond1.getValueType() != CondWidenVT) Cond1 = ModifyToType(Cond1, CondWidenVT); } Modified: stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp ============================================================================== --- stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Wed Mar 26 07:35:24 2014 (r263764) +++ stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Wed Mar 26 07:42:43 2014 (r263765) @@ -851,12 +851,20 @@ void RegsForValue::AddInlineAsmOperands( SDValue Res = DAG.getTargetConstant(Flag, MVT::i32); Ops.push_back(Res); + unsigned SP = TLI.getStackPointerRegisterToSaveRestore(); for (unsigned Value = 0, Reg = 0, e = ValueVTs.size(); Value != e; ++Value) { unsigned NumRegs = TLI.getNumRegisters(*DAG.getContext(), ValueVTs[Value]); MVT RegisterVT = RegVTs[Value]; for (unsigned i = 0; i != NumRegs; ++i) { assert(Reg < Regs.size() && "Mismatch in # registers expected"); - Ops.push_back(DAG.getRegister(Regs[Reg++], RegisterVT)); + unsigned TheReg = Regs[Reg++]; + Ops.push_back(DAG.getRegister(TheReg, RegisterVT)); + + if (TheReg == SP && Code == InlineAsm::Kind_Clobber) { + // If we clobbered the stack pointer, MFI should know about it. + assert(DAG.getMachineFunction().getFrameInfo()-> + hasInlineAsmWithSPAdjust()); + } } } } @@ -3370,9 +3378,7 @@ void SelectionDAGBuilder::visitAlloca(co setValue(&I, DSA); DAG.setRoot(DSA.getValue(1)); - // Inform the Frame Information that we have just allocated a variable-sized - // object. - FuncInfo.MF->getFrameInfo()->CreateVariableSizedObject(Align ? Align : 1); + assert(FuncInfo.MF->getFrameInfo()->hasVarSizedObjects()); } void SelectionDAGBuilder::visitLoad(const LoadInst &I) { Modified: stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp ============================================================================== --- stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Mar 26 07:35:24 2014 (r263764) +++ stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Mar 26 07:42:43 2014 (r263765) @@ -419,7 +419,7 @@ bool SelectionDAGISel::runOnMachineFunct SplitCriticalSideEffectEdges(const_cast(Fn), this); CurDAG->init(*MF, TTI, TLI); - FuncInfo->set(Fn, *MF); + FuncInfo->set(Fn, *MF, CurDAG); if (UseMBPI && OptLevel != CodeGenOpt::None) FuncInfo->BPI = &getAnalysis(); @@ -428,7 +428,8 @@ bool SelectionDAGISel::runOnMachineFunct SDB->init(GFI, *AA, LibInfo); - MF->setHasMSInlineAsm(false); + MF->setHasInlineAsm(false); + SelectAllBasicBlocks(Fn); // If the first basic block in the function has live ins that need to be @@ -511,7 +512,7 @@ bool SelectionDAGISel::runOnMachineFunct for (MachineFunction::const_iterator I = MF->begin(), E = MF->end(); I != E; ++I) { - if (MFI->hasCalls() && MF->hasMSInlineAsm()) + if (MFI->hasCalls() && MF->hasInlineAsm()) break; const MachineBasicBlock *MBB = I; @@ -522,8 +523,8 @@ bool SelectionDAGISel::runOnMachineFunct II->isStackAligningInlineAsm()) { MFI->setHasCalls(true); } - if (II->isMSInlineAsm()) { - MF->setHasMSInlineAsm(true); + if (II->isInlineAsm()) { + MF->setHasInlineAsm(true); } } } Modified: stable/10/contrib/llvm/lib/MC/MCParser/AsmParser.cpp ============================================================================== --- stable/10/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Wed Mar 26 07:35:24 2014 (r263764) +++ stable/10/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Wed Mar 26 07:42:43 2014 (r263765) @@ -4192,6 +4192,11 @@ bool AsmParser::parseMSInlineAsm( AsmStrRewrites.push_back(AsmRewrite(AOK_Input, Start, SymName.size())); } } + + // Consider implicit defs to be clobbers. Think of cpuid and push. + const uint16_t *ImpDefs = Desc.getImplicitDefs(); + for (unsigned I = 0, E = Desc.getNumImplicitDefs(); I != E; ++I) + ClobberRegs.push_back(ImpDefs[I]); } // Set the number of Outputs and Inputs. Modified: stable/10/contrib/llvm/lib/Target/X86/X86FrameLowering.cpp ============================================================================== --- stable/10/contrib/llvm/lib/Target/X86/X86FrameLowering.cpp Wed Mar 26 07:35:24 2014 (r263764) +++ stable/10/contrib/llvm/lib/Target/X86/X86FrameLowering.cpp Wed Mar 26 07:42:43 2014 (r263765) @@ -50,7 +50,7 @@ bool X86FrameLowering::hasFP(const Machi return (MF.getTarget().Options.DisableFramePointerElim(MF) || RegInfo->needsStackRealignment(MF) || MFI->hasVarSizedObjects() || - MFI->isFrameAddressTaken() || MF.hasMSInlineAsm() || + MFI->isFrameAddressTaken() || MFI->hasInlineAsmWithSPAdjust() || MF.getInfo()->getForceFramePointer() || MMI.callsUnwindInit() || MMI.callsEHReturn()); } Modified: stable/10/contrib/llvm/lib/Target/X86/X86RegisterInfo.cpp ============================================================================== --- stable/10/contrib/llvm/lib/Target/X86/X86RegisterInfo.cpp Wed Mar 26 07:35:24 2014 (r263764) +++ stable/10/contrib/llvm/lib/Target/X86/X86RegisterInfo.cpp Wed Mar 26 07:42:43 2014 (r263765) @@ -403,18 +403,15 @@ bool X86RegisterInfo::hasBasePointer(con if (!EnableBasePointer) return false; - // When we need stack realignment and there are dynamic allocas, we can't - // reference off of the stack pointer, so we reserve a base pointer. - // - // This is also true if the function contain MS-style inline assembly. We - // do this because if any stack changes occur in the inline assembly, e.g., - // "pusha", then any C local variable or C argument references in the - // inline assembly will be wrong because the SP is not properly tracked. - if ((needsStackRealignment(MF) && MFI->hasVarSizedObjects()) || - MF.hasMSInlineAsm()) - return true; - - return false; + // When we need stack realignment, we can't address the stack from the frame + // pointer. When we have dynamic allocas or stack-adjusting inline asm, we + // can't address variables from the stack pointer. MS inline asm can + // reference locals while also adjusting the stack pointer. When we can't + // use both the SP and the FP, we need a separate base pointer register. + bool CantUseFP = needsStackRealignment(MF); + bool CantUseSP = + MFI->hasVarSizedObjects() || MFI->hasInlineAsmWithSPAdjust(); + return CantUseFP && CantUseSP; } bool X86RegisterInfo::canRealignStack(const MachineFunction &MF) const { From owner-svn-src-stable@FreeBSD.ORG Wed Mar 26 07:42:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04FF4C7C; Wed, 26 Mar 2014 07:42:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E2AB0379; Wed, 26 Mar 2014 07:42:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2Q7gjp1058486; Wed, 26 Mar 2014 07:42:45 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2Q7ghHR058472; Wed, 26 Mar 2014 07:42:43 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201403260742.s2Q7ghHR058472@svn.freebsd.org> From: Dimitry Andric Date: Wed, 26 Mar 2014 07:42:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263765 - in stable: 10/contrib/llvm/include/llvm/CodeGen 10/contrib/llvm/lib/CodeGen 10/contrib/llvm/lib/CodeGen/SelectionDAG 10/contrib/llvm/lib/MC/MCParser 10/contrib/llvm/lib/Target... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Mar 2014 07:42:46 -0000 Author: dim Date: Wed Mar 26 07:42:43 2014 New Revision: 263765 URL: http://svnweb.freebsd.org/changeset/base/263765 Log: MFC r263312: Pull in r196939 from upstream llvm trunk (by Reid Kleckner): Reland "Fix miscompile of MS inline assembly with stack realignment" This re-lands commit r196876, which was reverted in r196879. The tests have been fixed to pass on platforms with a stack alignment larger than 4. Update to clang side tests will land shortly. Pull in r196986 from upstream llvm trunk (by Reid Kleckner): Revert the backend fatal error from r196939 The combination of inline asm, stack realignment, and dynamic allocas turns out to be too common to reject out of hand. ASan inserts empy inline asm fragments and uses aligned allocas. Compiling any trivial function containing a dynamic alloca with ASan is enough to trigger the check. XFAIL the test cases that would be miscompiled and add one that uses the relevant functionality. Pull in r202930 from upstream llvm trunk (by Hans Wennborg): Check for dynamic allocas and inline asm that clobbers sp before building selection dag (PR19012) In X86SelectionDagInfo::EmitTargetCodeForMemcpy we check with MachineFrameInfo to make sure that ESI isn't used as a base pointer register before we choose to emit rep movs (which clobbers esi). The problem is that MachineFrameInfo wouldn't know about dynamic allocas or inline asm that clobbers the stack pointer until SelectionDAGBuilder has encountered them. This patch fixes the problem by checking for such things when building the FunctionLoweringInfo. Differential Revision: http://llvm-reviews.chandlerc.com/D2954 Together, these commits fix the problem encountered in the devel/emacs port on the i386 architecture, where a combination of stack realignment, alloca() and memcpy() could incidentally clobber the %esi register, leading to segfaults in the temacs build-time utility. See also: http://llvm.org/PR18171 and http://llvm.org/PR19012 Reported by: ashish PR: ports/183064 MFC r263313: Pull in r203311 from upstream llvm trunk (by Arnold Schwaighofer): ISel: Make VSELECT selection terminate in cases where the condition type has to be split and the result type widened. When the condition of a vselect has to be split it makes no sense widening the vselect and thereby widening the condition. We end up in an endless loop of widening (vselect result type) and splitting (condition mask type) doing this. Instead, split both the condition and the vselect and widen the result. I ran this over the test suite with i686 and mattr=+sse and saw no regressions. Fixes PR18036. With this fix the original problem case from the graphics/rawtherapee port (posted in http://llvm.org/PR18036 ) now compiles within ~97MB RSS. Reported by: mandree MFC r263320: Add separate patch files for all the customizations we have currently applied to our copy of llvm/clang. These can be applied in alphabetical order to a pristine llvm/clang 3.4 release source tree, to result in the same version used in FreeBSD. This is intended to clearly document all the changes until now, which mostly consist of cherry pickings from the respective upstream trunks, plus a number of hand-written FreeBSD-specific ones. Hopefully those can eventually be cleaned up and sent upstream too. Added: stable/9/contrib/llvm/patches/ - copied from r263320, head/contrib/llvm/patches/ Modified: stable/9/contrib/llvm/include/llvm/CodeGen/FunctionLoweringInfo.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineFrameInfo.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineFunction.h stable/9/contrib/llvm/lib/CodeGen/MachineFunction.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp stable/9/contrib/llvm/lib/MC/MCParser/AsmParser.cpp stable/9/contrib/llvm/lib/Target/X86/X86FrameLowering.cpp stable/9/contrib/llvm/lib/Target/X86/X86RegisterInfo.cpp Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/llvm/ (props changed) Changes in other areas also in this revision: Added: stable/10/contrib/llvm/patches/ - copied from r263320, head/contrib/llvm/patches/ Modified: stable/10/contrib/llvm/include/llvm/CodeGen/FunctionLoweringInfo.h stable/10/contrib/llvm/include/llvm/CodeGen/MachineFrameInfo.h stable/10/contrib/llvm/include/llvm/CodeGen/MachineFunction.h stable/10/contrib/llvm/lib/CodeGen/MachineFunction.cpp stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp stable/10/contrib/llvm/lib/MC/MCParser/AsmParser.cpp stable/10/contrib/llvm/lib/Target/X86/X86FrameLowering.cpp stable/10/contrib/llvm/lib/Target/X86/X86RegisterInfo.cpp Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/llvm/include/llvm/CodeGen/FunctionLoweringInfo.h ============================================================================== --- stable/9/contrib/llvm/include/llvm/CodeGen/FunctionLoweringInfo.h Wed Mar 26 07:35:24 2014 (r263764) +++ stable/9/contrib/llvm/include/llvm/CodeGen/FunctionLoweringInfo.h Wed Mar 26 07:42:43 2014 (r263765) @@ -41,6 +41,7 @@ class MachineBasicBlock; class MachineFunction; class MachineModuleInfo; class MachineRegisterInfo; +class SelectionDAG; class TargetLowering; class Value; @@ -125,7 +126,7 @@ public: /// set - Initialize this FunctionLoweringInfo with the given Function /// and its associated MachineFunction. /// - void set(const Function &Fn, MachineFunction &MF); + void set(const Function &Fn, MachineFunction &MF, SelectionDAG *DAG); /// clear - Clear out all the function-specific state. This returns this /// FunctionLoweringInfo to an empty state, ready to be used for a Modified: stable/9/contrib/llvm/include/llvm/CodeGen/MachineFrameInfo.h ============================================================================== --- stable/9/contrib/llvm/include/llvm/CodeGen/MachineFrameInfo.h Wed Mar 26 07:35:24 2014 (r263764) +++ stable/9/contrib/llvm/include/llvm/CodeGen/MachineFrameInfo.h Wed Mar 26 07:42:43 2014 (r263765) @@ -223,6 +223,10 @@ class MachineFrameInfo { /// Whether the "realign-stack" option is on. bool RealignOption; + /// True if the function includes inline assembly that adjusts the stack + /// pointer. + bool HasInlineAsmWithSPAdjust; + const TargetFrameLowering *getFrameLowering() const; public: explicit MachineFrameInfo(const TargetMachine &TM, bool RealignOpt) @@ -240,6 +244,7 @@ public: LocalFrameSize = 0; LocalFrameMaxAlign = 0; UseLocalStackAllocationBlock = false; + HasInlineAsmWithSPAdjust = false; } /// hasStackObjects - Return true if there are any stack objects in this @@ -451,6 +456,10 @@ public: bool hasCalls() const { return HasCalls; } void setHasCalls(bool V) { HasCalls = V; } + /// Returns true if the function contains any stack-adjusting inline assembly. + bool hasInlineAsmWithSPAdjust() const { return HasInlineAsmWithSPAdjust; } + void setHasInlineAsmWithSPAdjust(bool B) { HasInlineAsmWithSPAdjust = B; } + /// getMaxCallFrameSize - Return the maximum size of a call frame that must be /// allocated for an outgoing function call. This is only available if /// CallFrameSetup/Destroy pseudo instructions are used by the target, and @@ -521,7 +530,7 @@ public: /// variable sized object is created, whether or not the index returned is /// actually used. /// - int CreateVariableSizedObject(unsigned Alignment); + int CreateVariableSizedObject(unsigned Alignment, const AllocaInst *Alloca); /// getCalleeSavedInfo - Returns a reference to call saved info vector for the /// current function. Modified: stable/9/contrib/llvm/include/llvm/CodeGen/MachineFunction.h ============================================================================== --- stable/9/contrib/llvm/include/llvm/CodeGen/MachineFunction.h Wed Mar 26 07:35:24 2014 (r263764) +++ stable/9/contrib/llvm/include/llvm/CodeGen/MachineFunction.h Wed Mar 26 07:42:43 2014 (r263765) @@ -131,8 +131,8 @@ class MachineFunction { /// about the control flow of such functions. bool ExposesReturnsTwice; - /// True if the function includes MS-style inline assembly. - bool HasMSInlineAsm; + /// True if the function includes any inline assembly. + bool HasInlineAsm; MachineFunction(const MachineFunction &) LLVM_DELETED_FUNCTION; void operator=(const MachineFunction&) LLVM_DELETED_FUNCTION; @@ -218,15 +218,14 @@ public: ExposesReturnsTwice = B; } - /// Returns true if the function contains any MS-style inline assembly. - bool hasMSInlineAsm() const { - return HasMSInlineAsm; + /// Returns true if the function contains any inline assembly. + bool hasInlineAsm() const { + return HasInlineAsm; } - /// Set a flag that indicates that the function contains MS-style inline - /// assembly. - void setHasMSInlineAsm(bool B) { - HasMSInlineAsm = B; + /// Set a flag that indicates that the function contains inline assembly. + void setHasInlineAsm(bool B) { + HasInlineAsm = B; } /// getInfo - Keep track of various per-function pieces of information for Modified: stable/9/contrib/llvm/lib/CodeGen/MachineFunction.cpp ============================================================================== --- stable/9/contrib/llvm/lib/CodeGen/MachineFunction.cpp Wed Mar 26 07:35:24 2014 (r263764) +++ stable/9/contrib/llvm/lib/CodeGen/MachineFunction.cpp Wed Mar 26 07:42:43 2014 (r263765) @@ -525,13 +525,14 @@ int MachineFrameInfo::CreateSpillStackOb /// variable sized object is created, whether or not the index returned is /// actually used. /// -int MachineFrameInfo::CreateVariableSizedObject(unsigned Alignment) { +int MachineFrameInfo::CreateVariableSizedObject(unsigned Alignment, + const AllocaInst *Alloca) { HasVarSizedObjects = true; Alignment = clampStackAlignment(!getFrameLowering()->isStackRealignable() || !RealignOption, Alignment, getFrameLowering()->getStackAlignment()); - Objects.push_back(StackObject(0, Alignment, 0, false, false, true, 0)); + Objects.push_back(StackObject(0, Alignment, 0, false, false, true, Alloca)); ensureMaxAlignment(Alignment); return (int)Objects.size()-NumFixedObjects-1; } Modified: stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp ============================================================================== --- stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp Wed Mar 26 07:35:24 2014 (r263764) +++ stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp Wed Mar 26 07:42:43 2014 (r263765) @@ -33,6 +33,7 @@ #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/MathExtras.h" #include "llvm/Target/TargetInstrInfo.h" +#include "llvm/Target/TargetFrameLowering.h" #include "llvm/Target/TargetLowering.h" #include "llvm/Target/TargetOptions.h" #include "llvm/Target/TargetRegisterInfo.h" @@ -55,7 +56,8 @@ static bool isUsedOutsideOfDefiningBlock return false; } -void FunctionLoweringInfo::set(const Function &fn, MachineFunction &mf) { +void FunctionLoweringInfo::set(const Function &fn, MachineFunction &mf, + SelectionDAG *DAG) { const TargetLowering *TLI = TM.getTargetLowering(); Fn = &fn; @@ -100,6 +102,43 @@ void FunctionLoweringInfo::set(const Fun for (; BB != EB; ++BB) for (BasicBlock::const_iterator I = BB->begin(), E = BB->end(); I != E; ++I) { + // Look for dynamic allocas. + if (const AllocaInst *AI = dyn_cast(I)) { + if (!AI->isStaticAlloca()) { + unsigned Align = std::max( + (unsigned)TLI->getDataLayout()->getPrefTypeAlignment( + AI->getAllocatedType()), + AI->getAlignment()); + unsigned StackAlign = TM.getFrameLowering()->getStackAlignment(); + if (Align <= StackAlign) + Align = 0; + // Inform the Frame Information that we have variable-sized objects. + MF->getFrameInfo()->CreateVariableSizedObject(Align ? Align : 1, AI); + } + } + + // Look for inline asm that clobbers the SP register. + if (isa(I) || isa(I)) { + ImmutableCallSite CS(I); + if (const InlineAsm *IA = dyn_cast(CS.getCalledValue())) { + unsigned SP = TLI->getStackPointerRegisterToSaveRestore(); + std::vector Ops = + TLI->ParseConstraints(CS); + for (size_t I = 0, E = Ops.size(); I != E; ++I) { + TargetLowering::AsmOperandInfo &Op = Ops[I]; + if (Op.Type == InlineAsm::isClobber) { + // Clobbers don't have SDValue operands, hence SDValue(). + TLI->ComputeConstraintToUse(Op, SDValue(), DAG); + std::pair PhysReg = + TLI->getRegForInlineAsmConstraint(Op.ConstraintCode, + Op.ConstraintVT); + if (PhysReg.first == SP) + MF->getFrameInfo()->setHasInlineAsmWithSPAdjust(true); + } + } + } + } + // Mark values used outside their block as exported, by allocating // a virtual register for them. if (isUsedOutsideOfDefiningBlock(I)) Modified: stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp ============================================================================== --- stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Wed Mar 26 07:35:24 2014 (r263764) +++ stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Wed Mar 26 07:42:43 2014 (r263765) @@ -2180,6 +2180,17 @@ SDValue DAGTypeLegalizer::WidenVecRes_SE if (getTypeAction(CondVT) == TargetLowering::TypeWidenVector) Cond1 = GetWidenedVector(Cond1); + // If we have to split the condition there is no point in widening the + // select. This would result in an cycle of widening the select -> + // widening the condition operand -> splitting the condition operand -> + // splitting the select -> widening the select. Instead split this select + // further and widen the resulting type. + if (getTypeAction(CondVT) == TargetLowering::TypeSplitVector) { + SDValue SplitSelect = SplitVecOp_VSELECT(N, 0); + SDValue Res = ModifyToType(SplitSelect, WidenVT); + return Res; + } + if (Cond1.getValueType() != CondWidenVT) Cond1 = ModifyToType(Cond1, CondWidenVT); } Modified: stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp ============================================================================== --- stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Wed Mar 26 07:35:24 2014 (r263764) +++ stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Wed Mar 26 07:42:43 2014 (r263765) @@ -851,12 +851,20 @@ void RegsForValue::AddInlineAsmOperands( SDValue Res = DAG.getTargetConstant(Flag, MVT::i32); Ops.push_back(Res); + unsigned SP = TLI.getStackPointerRegisterToSaveRestore(); for (unsigned Value = 0, Reg = 0, e = ValueVTs.size(); Value != e; ++Value) { unsigned NumRegs = TLI.getNumRegisters(*DAG.getContext(), ValueVTs[Value]); MVT RegisterVT = RegVTs[Value]; for (unsigned i = 0; i != NumRegs; ++i) { assert(Reg < Regs.size() && "Mismatch in # registers expected"); - Ops.push_back(DAG.getRegister(Regs[Reg++], RegisterVT)); + unsigned TheReg = Regs[Reg++]; + Ops.push_back(DAG.getRegister(TheReg, RegisterVT)); + + if (TheReg == SP && Code == InlineAsm::Kind_Clobber) { + // If we clobbered the stack pointer, MFI should know about it. + assert(DAG.getMachineFunction().getFrameInfo()-> + hasInlineAsmWithSPAdjust()); + } } } } @@ -3370,9 +3378,7 @@ void SelectionDAGBuilder::visitAlloca(co setValue(&I, DSA); DAG.setRoot(DSA.getValue(1)); - // Inform the Frame Information that we have just allocated a variable-sized - // object. - FuncInfo.MF->getFrameInfo()->CreateVariableSizedObject(Align ? Align : 1); + assert(FuncInfo.MF->getFrameInfo()->hasVarSizedObjects()); } void SelectionDAGBuilder::visitLoad(const LoadInst &I) { Modified: stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp ============================================================================== --- stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Mar 26 07:35:24 2014 (r263764) +++ stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Mar 26 07:42:43 2014 (r263765) @@ -419,7 +419,7 @@ bool SelectionDAGISel::runOnMachineFunct SplitCriticalSideEffectEdges(const_cast(Fn), this); CurDAG->init(*MF, TTI, TLI); - FuncInfo->set(Fn, *MF); + FuncInfo->set(Fn, *MF, CurDAG); if (UseMBPI && OptLevel != CodeGenOpt::None) FuncInfo->BPI = &getAnalysis(); @@ -428,7 +428,8 @@ bool SelectionDAGISel::runOnMachineFunct SDB->init(GFI, *AA, LibInfo); - MF->setHasMSInlineAsm(false); + MF->setHasInlineAsm(false); + SelectAllBasicBlocks(Fn); // If the first basic block in the function has live ins that need to be @@ -511,7 +512,7 @@ bool SelectionDAGISel::runOnMachineFunct for (MachineFunction::const_iterator I = MF->begin(), E = MF->end(); I != E; ++I) { - if (MFI->hasCalls() && MF->hasMSInlineAsm()) + if (MFI->hasCalls() && MF->hasInlineAsm()) break; const MachineBasicBlock *MBB = I; @@ -522,8 +523,8 @@ bool SelectionDAGISel::runOnMachineFunct II->isStackAligningInlineAsm()) { MFI->setHasCalls(true); } - if (II->isMSInlineAsm()) { - MF->setHasMSInlineAsm(true); + if (II->isInlineAsm()) { + MF->setHasInlineAsm(true); } } } Modified: stable/9/contrib/llvm/lib/MC/MCParser/AsmParser.cpp ============================================================================== --- stable/9/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Wed Mar 26 07:35:24 2014 (r263764) +++ stable/9/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Wed Mar 26 07:42:43 2014 (r263765) @@ -4192,6 +4192,11 @@ bool AsmParser::parseMSInlineAsm( AsmStrRewrites.push_back(AsmRewrite(AOK_Input, Start, SymName.size())); } } + + // Consider implicit defs to be clobbers. Think of cpuid and push. + const uint16_t *ImpDefs = Desc.getImplicitDefs(); + for (unsigned I = 0, E = Desc.getNumImplicitDefs(); I != E; ++I) + ClobberRegs.push_back(ImpDefs[I]); } // Set the number of Outputs and Inputs. Modified: stable/9/contrib/llvm/lib/Target/X86/X86FrameLowering.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Target/X86/X86FrameLowering.cpp Wed Mar 26 07:35:24 2014 (r263764) +++ stable/9/contrib/llvm/lib/Target/X86/X86FrameLowering.cpp Wed Mar 26 07:42:43 2014 (r263765) @@ -50,7 +50,7 @@ bool X86FrameLowering::hasFP(const Machi return (MF.getTarget().Options.DisableFramePointerElim(MF) || RegInfo->needsStackRealignment(MF) || MFI->hasVarSizedObjects() || - MFI->isFrameAddressTaken() || MF.hasMSInlineAsm() || + MFI->isFrameAddressTaken() || MFI->hasInlineAsmWithSPAdjust() || MF.getInfo()->getForceFramePointer() || MMI.callsUnwindInit() || MMI.callsEHReturn()); } Modified: stable/9/contrib/llvm/lib/Target/X86/X86RegisterInfo.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Target/X86/X86RegisterInfo.cpp Wed Mar 26 07:35:24 2014 (r263764) +++ stable/9/contrib/llvm/lib/Target/X86/X86RegisterInfo.cpp Wed Mar 26 07:42:43 2014 (r263765) @@ -403,18 +403,15 @@ bool X86RegisterInfo::hasBasePointer(con if (!EnableBasePointer) return false; - // When we need stack realignment and there are dynamic allocas, we can't - // reference off of the stack pointer, so we reserve a base pointer. - // - // This is also true if the function contain MS-style inline assembly. We - // do this because if any stack changes occur in the inline assembly, e.g., - // "pusha", then any C local variable or C argument references in the - // inline assembly will be wrong because the SP is not properly tracked. - if ((needsStackRealignment(MF) && MFI->hasVarSizedObjects()) || - MF.hasMSInlineAsm()) - return true; - - return false; + // When we need stack realignment, we can't address the stack from the frame + // pointer. When we have dynamic allocas or stack-adjusting inline asm, we + // can't address variables from the stack pointer. MS inline asm can + // reference locals while also adjusting the stack pointer. When we can't + // use both the SP and the FP, we need a separate base pointer register. + bool CantUseFP = needsStackRealignment(MF); + bool CantUseSP = + MFI->hasVarSizedObjects() || MFI->hasInlineAsmWithSPAdjust(); + return CantUseFP && CantUseSP; } bool X86RegisterInfo::canRealignStack(const MachineFunction &MF) const { From owner-svn-src-stable@FreeBSD.ORG Wed Mar 26 16:59:28 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7448465; Wed, 26 Mar 2014 16:59:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2F0ACD2; Wed, 26 Mar 2014 16:59:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2QGxSiN084269; Wed, 26 Mar 2014 16:59:28 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2QGxSnJ084267; Wed, 26 Mar 2014 16:59:28 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201403261659.s2QGxSnJ084267@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 26 Mar 2014 16:59:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263770 - in stable/10/sys: compat/freebsd32 kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Mar 2014 16:59:28 -0000 Author: kib Date: Wed Mar 26 16:59:28 2014 New Revision: 263770 URL: http://svnweb.freebsd.org/changeset/base/263770 Log: MFC r263349: Make the array pointed to by AT_PAGESIZES auxv properly aligned. Modified: stable/10/sys/compat/freebsd32/freebsd32_misc.c stable/10/sys/kern/kern_exec.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_misc.c Wed Mar 26 14:01:41 2014 (r263769) +++ stable/10/sys/compat/freebsd32/freebsd32_misc.c Wed Mar 26 16:59:28 2014 (r263770) @@ -2790,7 +2790,8 @@ freebsd32_copyout_strings(struct image_p { int argc, envc, i; u_int32_t *vectp; - char *stringp, *destp; + char *stringp; + uintptr_t destp; u_int32_t *stack_base; struct freebsd32_ps_strings *arginfo; char canary[sizeof(long) * 8]; @@ -2812,35 +2813,34 @@ freebsd32_copyout_strings(struct image_p szsigcode = *(imgp->proc->p_sysent->sv_szsigcode); else szsigcode = 0; - destp = (caddr_t)arginfo - szsigcode - SPARE_USRSPACE - - roundup(execpath_len, sizeof(char *)) - - roundup(sizeof(canary), sizeof(char *)) - - roundup(sizeof(pagesizes32), sizeof(char *)) - - roundup((ARG_MAX - imgp->args->stringspace), sizeof(char *)); + destp = (uintptr_t)arginfo; /* * install sigcode */ - if (szsigcode != 0) - copyout(imgp->proc->p_sysent->sv_sigcode, - ((caddr_t)arginfo - szsigcode), szsigcode); + if (szsigcode != 0) { + destp -= szsigcode; + destp = rounddown2(destp, sizeof(uint32_t)); + copyout(imgp->proc->p_sysent->sv_sigcode, (void *)destp, + szsigcode); + } /* * Copy the image path for the rtld. */ if (execpath_len != 0) { - imgp->execpathp = (uintptr_t)arginfo - szsigcode - execpath_len; - copyout(imgp->execpath, (void *)imgp->execpathp, - execpath_len); + destp -= execpath_len; + imgp->execpathp = destp; + copyout(imgp->execpath, (void *)destp, execpath_len); } /* * Prepare the canary for SSP. */ arc4rand(canary, sizeof(canary), 0); - imgp->canary = (uintptr_t)arginfo - szsigcode - execpath_len - - sizeof(canary); - copyout(canary, (void *)imgp->canary, sizeof(canary)); + destp -= sizeof(canary); + imgp->canary = destp; + copyout(canary, (void *)destp, sizeof(canary)); imgp->canarylen = sizeof(canary); /* @@ -2848,11 +2848,15 @@ freebsd32_copyout_strings(struct image_p */ for (i = 0; i < MAXPAGESIZES; i++) pagesizes32[i] = (uint32_t)pagesizes[i]; - imgp->pagesizes = (uintptr_t)arginfo - szsigcode - execpath_len - - roundup(sizeof(canary), sizeof(char *)) - sizeof(pagesizes32); - copyout(pagesizes32, (void *)imgp->pagesizes, sizeof(pagesizes32)); + destp -= sizeof(pagesizes32); + destp = rounddown2(destp, sizeof(uint32_t)); + imgp->pagesizes = destp; + copyout(pagesizes32, (void *)destp, sizeof(pagesizes32)); imgp->pagesizeslen = sizeof(pagesizes32); + destp -= ARG_MAX - imgp->args->stringspace; + destp = rounddown2(destp, sizeof(uint32_t)); + /* * If we have a valid auxargs ptr, prepare some room * on the stack. @@ -2872,13 +2876,14 @@ freebsd32_copyout_strings(struct image_p vectp = (u_int32_t *) (destp - (imgp->args->argc + imgp->args->envc + 2 + imgp->auxarg_size + execpath_len) * sizeof(u_int32_t)); - } else + } else { /* * The '+ 2' is for the null pointers at the end of each of * the arg and env vector sets */ - vectp = (u_int32_t *) - (destp - (imgp->args->argc + imgp->args->envc + 2) * sizeof(u_int32_t)); + vectp = (u_int32_t *)(destp - (imgp->args->argc + + imgp->args->envc + 2) * sizeof(u_int32_t)); + } /* * vectp also becomes our initial stack base @@ -2891,7 +2896,7 @@ freebsd32_copyout_strings(struct image_p /* * Copy out strings - arguments and environment. */ - copyout(stringp, destp, ARG_MAX - imgp->args->stringspace); + copyout(stringp, (void *)destp, ARG_MAX - imgp->args->stringspace); /* * Fill in "ps_strings" struct for ps, w, etc. Modified: stable/10/sys/kern/kern_exec.c ============================================================================== --- stable/10/sys/kern/kern_exec.c Wed Mar 26 14:01:41 2014 (r263769) +++ stable/10/sys/kern/kern_exec.c Wed Mar 26 16:59:28 2014 (r263770) @@ -1232,7 +1232,8 @@ exec_copyout_strings(imgp) { int argc, envc; char **vectp; - char *stringp, *destp; + char *stringp; + uintptr_t destp; register_t *stack_base; struct ps_strings *arginfo; struct proc *p; @@ -1256,45 +1257,47 @@ exec_copyout_strings(imgp) if (p->p_sysent->sv_szsigcode != NULL) szsigcode = *(p->p_sysent->sv_szsigcode); } - destp = (caddr_t)arginfo - szsigcode - SPARE_USRSPACE - - roundup(execpath_len, sizeof(char *)) - - roundup(sizeof(canary), sizeof(char *)) - - roundup(szps, sizeof(char *)) - - roundup((ARG_MAX - imgp->args->stringspace), sizeof(char *)); + destp = (uintptr_t)arginfo; /* * install sigcode */ - if (szsigcode != 0) - copyout(p->p_sysent->sv_sigcode, ((caddr_t)arginfo - - szsigcode), szsigcode); + if (szsigcode != 0) { + destp -= szsigcode; + destp = rounddown2(destp, sizeof(void *)); + copyout(p->p_sysent->sv_sigcode, (void *)destp, szsigcode); + } /* * Copy the image path for the rtld. */ if (execpath_len != 0) { - imgp->execpathp = (uintptr_t)arginfo - szsigcode - execpath_len; - copyout(imgp->execpath, (void *)imgp->execpathp, - execpath_len); + destp -= execpath_len; + imgp->execpathp = destp; + copyout(imgp->execpath, (void *)destp, execpath_len); } /* * Prepare the canary for SSP. */ arc4rand(canary, sizeof(canary), 0); - imgp->canary = (uintptr_t)arginfo - szsigcode - execpath_len - - sizeof(canary); - copyout(canary, (void *)imgp->canary, sizeof(canary)); + destp -= sizeof(canary); + imgp->canary = destp; + copyout(canary, (void *)destp, sizeof(canary)); imgp->canarylen = sizeof(canary); /* * Prepare the pagesizes array. */ - imgp->pagesizes = (uintptr_t)arginfo - szsigcode - execpath_len - - roundup(sizeof(canary), sizeof(char *)) - szps; - copyout(pagesizes, (void *)imgp->pagesizes, szps); + destp -= szps; + destp = rounddown2(destp, sizeof(void *)); + imgp->pagesizes = destp; + copyout(pagesizes, (void *)destp, szps); imgp->pagesizeslen = szps; + destp -= ARG_MAX - imgp->args->stringspace; + destp = rounddown2(destp, sizeof(void *)); + /* * If we have a valid auxargs ptr, prepare some room * on the stack. @@ -1319,8 +1322,8 @@ exec_copyout_strings(imgp) * The '+ 2' is for the null pointers at the end of each of * the arg and env vector sets */ - vectp = (char **)(destp - (imgp->args->argc + imgp->args->envc + 2) * - sizeof(char *)); + vectp = (char **)(destp - (imgp->args->argc + imgp->args->envc + + 2) * sizeof(char *)); } /* @@ -1335,7 +1338,7 @@ exec_copyout_strings(imgp) /* * Copy out strings - arguments and environment. */ - copyout(stringp, destp, ARG_MAX - imgp->args->stringspace); + copyout(stringp, (void *)destp, ARG_MAX - imgp->args->stringspace); /* * Fill in "ps_strings" struct for ps, w, etc. From owner-svn-src-stable@FreeBSD.ORG Wed Mar 26 17:00:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A8F56A9; Wed, 26 Mar 2014 17:00:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2651CD68; Wed, 26 Mar 2014 17:00:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2QH0cbQ084975; Wed, 26 Mar 2014 17:00:38 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2QH0baw084973; Wed, 26 Mar 2014 17:00:37 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201403261700.s2QH0baw084973@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 26 Mar 2014 17:00:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263771 - in stable/9/sys: compat/freebsd32 kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Mar 2014 17:00:38 -0000 Author: kib Date: Wed Mar 26 17:00:37 2014 New Revision: 263771 URL: http://svnweb.freebsd.org/changeset/base/263771 Log: MFC r263349: Make the array pointed to by AT_PAGESIZES auxv properly aligned. Modified: stable/9/sys/compat/freebsd32/freebsd32_misc.c stable/9/sys/kern/kern_exec.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/9/sys/compat/freebsd32/freebsd32_misc.c Wed Mar 26 16:59:28 2014 (r263770) +++ stable/9/sys/compat/freebsd32/freebsd32_misc.c Wed Mar 26 17:00:37 2014 (r263771) @@ -2780,7 +2780,8 @@ freebsd32_copyout_strings(struct image_p { int argc, envc, i; u_int32_t *vectp; - char *stringp, *destp; + char *stringp; + uintptr_t destp; u_int32_t *stack_base; struct freebsd32_ps_strings *arginfo; char canary[sizeof(long) * 8]; @@ -2802,35 +2803,34 @@ freebsd32_copyout_strings(struct image_p szsigcode = *(imgp->proc->p_sysent->sv_szsigcode); else szsigcode = 0; - destp = (caddr_t)arginfo - szsigcode - SPARE_USRSPACE - - roundup(execpath_len, sizeof(char *)) - - roundup(sizeof(canary), sizeof(char *)) - - roundup(sizeof(pagesizes32), sizeof(char *)) - - roundup((ARG_MAX - imgp->args->stringspace), sizeof(char *)); + destp = (uintptr_t)arginfo; /* * install sigcode */ - if (szsigcode != 0) - copyout(imgp->proc->p_sysent->sv_sigcode, - ((caddr_t)arginfo - szsigcode), szsigcode); + if (szsigcode != 0) { + destp -= szsigcode; + destp = rounddown2(destp, sizeof(uint32_t)); + copyout(imgp->proc->p_sysent->sv_sigcode, (void *)destp, + szsigcode); + } /* * Copy the image path for the rtld. */ if (execpath_len != 0) { - imgp->execpathp = (uintptr_t)arginfo - szsigcode - execpath_len; - copyout(imgp->execpath, (void *)imgp->execpathp, - execpath_len); + destp -= execpath_len; + imgp->execpathp = destp; + copyout(imgp->execpath, (void *)destp, execpath_len); } /* * Prepare the canary for SSP. */ arc4rand(canary, sizeof(canary), 0); - imgp->canary = (uintptr_t)arginfo - szsigcode - execpath_len - - sizeof(canary); - copyout(canary, (void *)imgp->canary, sizeof(canary)); + destp -= sizeof(canary); + imgp->canary = destp; + copyout(canary, (void *)destp, sizeof(canary)); imgp->canarylen = sizeof(canary); /* @@ -2838,11 +2838,15 @@ freebsd32_copyout_strings(struct image_p */ for (i = 0; i < MAXPAGESIZES; i++) pagesizes32[i] = (uint32_t)pagesizes[i]; - imgp->pagesizes = (uintptr_t)arginfo - szsigcode - execpath_len - - roundup(sizeof(canary), sizeof(char *)) - sizeof(pagesizes32); - copyout(pagesizes32, (void *)imgp->pagesizes, sizeof(pagesizes32)); + destp -= sizeof(pagesizes32); + destp = rounddown2(destp, sizeof(uint32_t)); + imgp->pagesizes = destp; + copyout(pagesizes32, (void *)destp, sizeof(pagesizes32)); imgp->pagesizeslen = sizeof(pagesizes32); + destp -= ARG_MAX - imgp->args->stringspace; + destp = rounddown2(destp, sizeof(uint32_t)); + /* * If we have a valid auxargs ptr, prepare some room * on the stack. @@ -2862,13 +2866,14 @@ freebsd32_copyout_strings(struct image_p vectp = (u_int32_t *) (destp - (imgp->args->argc + imgp->args->envc + 2 + imgp->auxarg_size + execpath_len) * sizeof(u_int32_t)); - } else + } else { /* * The '+ 2' is for the null pointers at the end of each of * the arg and env vector sets */ - vectp = (u_int32_t *) - (destp - (imgp->args->argc + imgp->args->envc + 2) * sizeof(u_int32_t)); + vectp = (u_int32_t *)(destp - (imgp->args->argc + + imgp->args->envc + 2) * sizeof(u_int32_t)); + } /* * vectp also becomes our initial stack base @@ -2881,7 +2886,7 @@ freebsd32_copyout_strings(struct image_p /* * Copy out strings - arguments and environment. */ - copyout(stringp, destp, ARG_MAX - imgp->args->stringspace); + copyout(stringp, (void *)destp, ARG_MAX - imgp->args->stringspace); /* * Fill in "ps_strings" struct for ps, w, etc. Modified: stable/9/sys/kern/kern_exec.c ============================================================================== --- stable/9/sys/kern/kern_exec.c Wed Mar 26 16:59:28 2014 (r263770) +++ stable/9/sys/kern/kern_exec.c Wed Mar 26 17:00:37 2014 (r263771) @@ -1250,7 +1250,8 @@ exec_copyout_strings(imgp) { int argc, envc; char **vectp; - char *stringp, *destp; + char *stringp; + uintptr_t destp; register_t *stack_base; struct ps_strings *arginfo; struct proc *p; @@ -1274,45 +1275,47 @@ exec_copyout_strings(imgp) if (p->p_sysent->sv_szsigcode != NULL) szsigcode = *(p->p_sysent->sv_szsigcode); } - destp = (caddr_t)arginfo - szsigcode - SPARE_USRSPACE - - roundup(execpath_len, sizeof(char *)) - - roundup(sizeof(canary), sizeof(char *)) - - roundup(szps, sizeof(char *)) - - roundup((ARG_MAX - imgp->args->stringspace), sizeof(char *)); + destp = (uintptr_t)arginfo; /* * install sigcode */ - if (szsigcode != 0) - copyout(p->p_sysent->sv_sigcode, ((caddr_t)arginfo - - szsigcode), szsigcode); + if (szsigcode != 0) { + destp -= szsigcode; + destp = rounddown2(destp, sizeof(void *)); + copyout(p->p_sysent->sv_sigcode, (void *)destp, szsigcode); + } /* * Copy the image path for the rtld. */ if (execpath_len != 0) { - imgp->execpathp = (uintptr_t)arginfo - szsigcode - execpath_len; - copyout(imgp->execpath, (void *)imgp->execpathp, - execpath_len); + destp -= execpath_len; + imgp->execpathp = destp; + copyout(imgp->execpath, (void *)destp, execpath_len); } /* * Prepare the canary for SSP. */ arc4rand(canary, sizeof(canary), 0); - imgp->canary = (uintptr_t)arginfo - szsigcode - execpath_len - - sizeof(canary); - copyout(canary, (void *)imgp->canary, sizeof(canary)); + destp -= sizeof(canary); + imgp->canary = destp; + copyout(canary, (void *)destp, sizeof(canary)); imgp->canarylen = sizeof(canary); /* * Prepare the pagesizes array. */ - imgp->pagesizes = (uintptr_t)arginfo - szsigcode - execpath_len - - roundup(sizeof(canary), sizeof(char *)) - szps; - copyout(pagesizes, (void *)imgp->pagesizes, szps); + destp -= szps; + destp = rounddown2(destp, sizeof(void *)); + imgp->pagesizes = destp; + copyout(pagesizes, (void *)destp, szps); imgp->pagesizeslen = szps; + destp -= ARG_MAX - imgp->args->stringspace; + destp = rounddown2(destp, sizeof(void *)); + /* * If we have a valid auxargs ptr, prepare some room * on the stack. @@ -1337,8 +1340,8 @@ exec_copyout_strings(imgp) * The '+ 2' is for the null pointers at the end of each of * the arg and env vector sets */ - vectp = (char **)(destp - (imgp->args->argc + imgp->args->envc + 2) * - sizeof(char *)); + vectp = (char **)(destp - (imgp->args->argc + imgp->args->envc + + 2) * sizeof(char *)); } /* @@ -1353,7 +1356,7 @@ exec_copyout_strings(imgp) /* * Copy out strings - arguments and environment. */ - copyout(stringp, destp, ARG_MAX - imgp->args->stringspace); + copyout(stringp, (void *)destp, ARG_MAX - imgp->args->stringspace); /* * Fill in "ps_strings" struct for ps, w, etc. From owner-svn-src-stable@FreeBSD.ORG Wed Mar 26 20:10:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 958F2A81; Wed, 26 Mar 2014 20:10:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 820545EE; Wed, 26 Mar 2014 20:10:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2QKA7X9063260; Wed, 26 Mar 2014 20:10:07 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2QKA7Lp063259; Wed, 26 Mar 2014 20:10:07 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201403262010.s2QKA7Lp063259@svn.freebsd.org> From: Dimitry Andric Date: Wed, 26 Mar 2014 20:10:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263776 - stable/10/usr.bin/clang/lldb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Mar 2014 20:10:07 -0000 Author: dim Date: Wed Mar 26 20:10:07 2014 New Revision: 263776 URL: http://svnweb.freebsd.org/changeset/base/263776 Log: MFC r262657: Apply fix for lldb not linking after the sparc backend import. Reported by: se Pointy hat to: dim Modified: stable/10/usr.bin/clang/lldb/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/clang/lldb/Makefile ============================================================================== --- stable/10/usr.bin/clang/lldb/Makefile Wed Mar 26 19:57:50 2014 (r263775) +++ stable/10/usr.bin/clang/lldb/Makefile Wed Mar 26 20:10:07 2014 (r263776) @@ -115,6 +115,12 @@ LIBDEPS=\ llvmexecutionengine \ llvmcodegen \ llvmscalaropts \ + llvmsparcdisassembler \ + llvmsparccodegen \ + llvmsparcasmparser \ + llvmsparcdesc \ + llvmsparcinfo \ + llvmsparcinstprinter \ llvmarminfo \ llvmarminstprinter \ llvmmcparser \ From owner-svn-src-stable@FreeBSD.ORG Wed Mar 26 23:57:10 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87EAA136; Wed, 26 Mar 2014 23:57:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74817DFA; Wed, 26 Mar 2014 23:57:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2QNvAQe057602; Wed, 26 Mar 2014 23:57:10 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2QNvAmm057601; Wed, 26 Mar 2014 23:57:10 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201403262357.s2QNvAmm057601@svn.freebsd.org> From: Xin LI Date: Wed, 26 Mar 2014 23:57:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263781 - stable/10/sys/nlm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Mar 2014 23:57:10 -0000 Author: delphij Date: Wed Mar 26 23:57:09 2014 New Revision: 263781 URL: http://svnweb.freebsd.org/changeset/base/263781 Log: MFC r262991: Correct a typo in nlm_find_host_by_addr(): the intention of the code is to give "" rather than comparing the buffer against it. Modified: stable/10/sys/nlm/nlm_prot_impl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/nlm/nlm_prot_impl.c ============================================================================== --- stable/10/sys/nlm/nlm_prot_impl.c Wed Mar 26 23:34:27 2014 (r263780) +++ stable/10/sys/nlm/nlm_prot_impl.c Wed Mar 26 23:57:09 2014 (r263781) @@ -1072,7 +1072,7 @@ nlm_find_host_by_addr(const struct socka break; #endif default: - strcmp(tmp, ""); + strlcpy(tmp, "", sizeof(tmp)); } From owner-svn-src-stable@FreeBSD.ORG Wed Mar 26 23:58:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6AA1C28B; Wed, 26 Mar 2014 23:58:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 57250E12; Wed, 26 Mar 2014 23:58:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2QNwIlB057764; Wed, 26 Mar 2014 23:58:18 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2QNwITC057763; Wed, 26 Mar 2014 23:58:18 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201403262358.s2QNwITC057763@svn.freebsd.org> From: Xin LI Date: Wed, 26 Mar 2014 23:58:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263782 - in stable: 8/sys/nlm 9/sys/nlm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Mar 2014 23:58:18 -0000 Author: delphij Date: Wed Mar 26 23:58:17 2014 New Revision: 263782 URL: http://svnweb.freebsd.org/changeset/base/263782 Log: MFC r262991: Correct a typo in nlm_find_host_by_addr(): the intention of the code is to give "" rather than comparing the buffer against it. Modified: stable/9/sys/nlm/nlm_prot_impl.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/8/sys/nlm/nlm_prot_impl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/nlm/ (props changed) Modified: stable/9/sys/nlm/nlm_prot_impl.c ============================================================================== --- stable/9/sys/nlm/nlm_prot_impl.c Wed Mar 26 23:57:09 2014 (r263781) +++ stable/9/sys/nlm/nlm_prot_impl.c Wed Mar 26 23:58:17 2014 (r263782) @@ -1072,7 +1072,7 @@ nlm_find_host_by_addr(const struct socka break; #endif default: - strcmp(tmp, ""); + strlcpy(tmp, "", sizeof(tmp)); } From owner-svn-src-stable@FreeBSD.ORG Wed Mar 26 23:58:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BEB0828C; Wed, 26 Mar 2014 23:58:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB309E13; Wed, 26 Mar 2014 23:58:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2QNwIpN057770; Wed, 26 Mar 2014 23:58:18 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2QNwIn5057769; Wed, 26 Mar 2014 23:58:18 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201403262358.s2QNwIn5057769@svn.freebsd.org> From: Xin LI Date: Wed, 26 Mar 2014 23:58:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r263782 - in stable: 8/sys/nlm 9/sys/nlm X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Mar 2014 23:58:18 -0000 Author: delphij Date: Wed Mar 26 23:58:17 2014 New Revision: 263782 URL: http://svnweb.freebsd.org/changeset/base/263782 Log: MFC r262991: Correct a typo in nlm_find_host_by_addr(): the intention of the code is to give "" rather than comparing the buffer against it. Modified: stable/8/sys/nlm/nlm_prot_impl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/nlm/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/nlm/nlm_prot_impl.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/8/sys/nlm/nlm_prot_impl.c ============================================================================== --- stable/8/sys/nlm/nlm_prot_impl.c Wed Mar 26 23:57:09 2014 (r263781) +++ stable/8/sys/nlm/nlm_prot_impl.c Wed Mar 26 23:58:17 2014 (r263782) @@ -1014,7 +1014,7 @@ nlm_find_host_by_addr(const struct socka break; #endif default: - strcmp(tmp, ""); + strlcpy(tmp, "", sizeof(tmp)); } From owner-svn-src-stable@FreeBSD.ORG Thu Mar 27 00:23:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7BF35B95; Thu, 27 Mar 2014 00:23:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 67762131; Thu, 27 Mar 2014 00:23:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2R0NjL4070581; Thu, 27 Mar 2014 00:23:45 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2R0NjLL070580; Thu, 27 Mar 2014 00:23:45 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201403270023.s2R0NjLL070580@svn.freebsd.org> From: Xin LI Date: Thu, 27 Mar 2014 00:23:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263783 - stable/10/secure/lib/libcrypt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 00:23:45 -0000 Author: delphij Date: Thu Mar 27 00:23:44 2014 New Revision: 263783 URL: http://svnweb.freebsd.org/changeset/base/263783 Log: MFC r262501: Refresh our implementation of OpenBSD's Blowfish password format. Notable changes: - Support of $2b$ password format to address a problem where very long passwords (more than 256 characters, when an integer overflow would happen and cause the length to wrap at 256). - Updated pseudo code in comments to reflect the reality. - Removed our local shortcut of processing magic string and rely on the centralized and tigntened validation. - Diff reduction from upstream. For now we are still generating the older $2a$ format of password but we will migrate to the new format once the format is formally finalized. Modified: stable/10/secure/lib/libcrypt/crypt-blowfish.c Directory Properties: stable/10/ (props changed) Modified: stable/10/secure/lib/libcrypt/crypt-blowfish.c ============================================================================== --- stable/10/secure/lib/libcrypt/crypt-blowfish.c Wed Mar 26 23:58:17 2014 (r263782) +++ stable/10/secure/lib/libcrypt/crypt-blowfish.c Thu Mar 27 00:23:44 2014 (r263783) @@ -1,3 +1,5 @@ +/* $OpenBSD: bcrypt.c,v 1.29 2014/02/24 19:45:43 tedu Exp $ */ + /* * Copyright 1997 Niels Provos * All rights reserved. @@ -35,10 +37,10 @@ __FBSDID("$FreeBSD$"); * and works as follows: * * 1. state := InitState () - * 2. state := ExpandKey (state, salt, password) 3. - * REPEAT rounds: + * 2. state := ExpandKey (state, salt, password) + * 3. REPEAT rounds: + * state := ExpandKey (state, 0, password) * state := ExpandKey (state, 0, salt) - * state := ExpandKey(state, 0, password) * 4. ctext := "OrpheanBeholderScryDoubt" * 5. REPEAT 64: * ctext := Encrypt_ECB (state, ctext); @@ -48,6 +50,7 @@ __FBSDID("$FreeBSD$"); /* * FreeBSD implementation by Paul Herman + * and updated by Xin Li */ #include @@ -66,18 +69,18 @@ __FBSDID("$FreeBSD$"); #define BCRYPT_VERSION '2' #define BCRYPT_MAXSALT 16 /* Precomputation is just so nice */ #define BCRYPT_BLOCKS 6 /* Ciphertext blocks */ -#define BCRYPT_MINROUNDS 16 /* we have log2(rounds) in salt */ +#define BCRYPT_MINLOGROUNDS 4 /* we have log2(rounds) in salt */ + static void encode_base64(u_int8_t *, u_int8_t *, u_int16_t); static void decode_base64(u_int8_t *, u_int16_t, const u_int8_t *); static char encrypted[_PASSWORD_LEN]; -static const u_int8_t Base64Code[] = +const static u_int8_t Base64Code[] = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; -static const u_int8_t index_64[128] = -{ +const static u_int8_t index_64[128] = { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, @@ -108,7 +111,7 @@ decode_base64(u_int8_t *buffer, u_int16_ if (c1 == 255 || c2 == 255) break; - *bp++ = (u_int8_t)((c1 << 2) | ((c2 & 0x30) >> 4)); + *bp++ = (c1 << 2) | ((c2 & 0x30) >> 4); if (bp >= buffer + len) break; @@ -138,23 +141,19 @@ crypt_blowfish(const char *key, const ch blf_ctx state; u_int32_t rounds, i, k; u_int16_t j; - u_int8_t key_len, salt_len, logr, minr; + size_t key_len; + u_int8_t salt_len, logr, minr; u_int8_t ciphertext[4 * BCRYPT_BLOCKS] = "OrpheanBeholderScryDoubt"; u_int8_t csalt[BCRYPT_MAXSALT]; u_int32_t cdata[BCRYPT_BLOCKS]; - static const char *magic = "$2a$04$"; - - /* Defaults */ - minr = 'a'; - logr = 4; - rounds = 1 << logr; + char arounds[3]; - /* If it starts with the magic string, then skip that */ - if(!strncmp(salt, magic, strlen(magic))) { - salt += strlen(magic); - } - else if (*salt == '$') { + /* Defaults */ + minr = 'a'; + logr = BCRYPT_MINLOGROUNDS; + rounds = 1U << logr; + if (*salt == '$') { /* Discard "$" identifier */ salt++; @@ -166,9 +165,9 @@ crypt_blowfish(const char *key, const ch /* Check for minor versions */ if (salt[1] != '$') { switch (salt[1]) { - case 'a': - /* 'ab' should not yield the same as 'abab' */ - minr = (u_int8_t)salt[1]; + case 'a': /* 'ab' should not yield the same as 'abab' */ + case 'b': /* cap input length at 72 bytes */ + minr = salt[1]; salt++; break; default: @@ -184,21 +183,38 @@ crypt_blowfish(const char *key, const ch /* Out of sync with passwd entry */ return NULL; - /* Computer power doesnt increase linear, 2^x should be fine */ - logr = (u_int8_t)atoi(salt); - rounds = 1 << logr; - if (rounds < BCRYPT_MINROUNDS) + memcpy(arounds, salt, sizeof(arounds)); + if (arounds[sizeof(arounds) - 1] != '$') + return NULL; + arounds[sizeof(arounds) - 1] = 0; + logr = strtonum(arounds, BCRYPT_MINLOGROUNDS, 31, NULL); + if (logr == 0) return NULL; + /* Computer power doesn't increase linearly, 2^x should be fine */ + rounds = 1U << logr; /* Discard num rounds + "$" identifier */ salt += 3; } + if (strlen(salt) * 3 / 4 < BCRYPT_MAXSALT) + return NULL; /* We dont want the base64 salt but the raw data */ - decode_base64(csalt, BCRYPT_MAXSALT, (const u_int8_t *)salt); + decode_base64(csalt, BCRYPT_MAXSALT, (const u_int8_t *) salt); salt_len = BCRYPT_MAXSALT; - key_len = (u_int8_t)(strlen(key) + (minr >= 'a' ? 1 : 0)); + if (minr <= 'a') + key_len = (u_int8_t)(strlen(key) + (minr >= 'a' ? 1 : 0)); + else { + /* strlen() returns a size_t, but the function calls + * below result in implicit casts to a narrower integer + * type, so cap key_len at the actual maximum supported + * length here to avoid integer wraparound */ + key_len = strlen(key); + if (key_len > 72) + key_len = 72; + key_len++; /* include the NUL */ + } /* Setting up S-Boxes and Subkeys */ Blowfish_initstate(&state); @@ -233,7 +249,7 @@ crypt_blowfish(const char *key, const ch encrypted[i++] = '$'; encrypted[i++] = BCRYPT_VERSION; if (minr) - encrypted[i++] = (int8_t)minr; + encrypted[i++] = minr; encrypted[i++] = '$'; snprintf(encrypted + i, 4, "%2.2u$", logr); @@ -241,6 +257,10 @@ crypt_blowfish(const char *key, const ch encode_base64((u_int8_t *) encrypted + i + 3, csalt, BCRYPT_MAXSALT); encode_base64((u_int8_t *) encrypted + strlen(encrypted), ciphertext, 4 * BCRYPT_BLOCKS - 1); + memset(&state, 0, sizeof(state)); + memset(ciphertext, 0, sizeof(ciphertext)); + memset(csalt, 0, sizeof(csalt)); + memset(cdata, 0, sizeof(cdata)); return encrypted; } @@ -273,7 +293,6 @@ encode_base64(u_int8_t *buffer, u_int8_t } *bp = '\0'; } - #if 0 void main() @@ -288,11 +307,11 @@ main() snprintf(salt + 3, 4, "%2.2u$", 5); printf("24 bytes of salt: "); - fgets(salt + 6, 94, stdin); + fgets(salt + 6, sizeof(salt) - 6, stdin); salt[99] = 0; printf("72 bytes of password: "); fpurge(stdin); - fgets(blubber, 73, stdin); + fgets(blubber, sizeof(blubber), stdin); blubber[72] = 0; p = crypt(blubber, salt); From owner-svn-src-stable@FreeBSD.ORG Thu Mar 27 00:24:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E456ACE6; Thu, 27 Mar 2014 00:24:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF26E144; Thu, 27 Mar 2014 00:24:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2R0Om6C070748; Thu, 27 Mar 2014 00:24:48 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2R0OmYH070747; Thu, 27 Mar 2014 00:24:48 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201403270024.s2R0OmYH070747@svn.freebsd.org> From: Xin LI Date: Thu, 27 Mar 2014 00:24:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263784 - in stable: 8/secure/lib/libcrypt 9/secure/lib/libcrypt X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 00:24:49 -0000 Author: delphij Date: Thu Mar 27 00:24:48 2014 New Revision: 263784 URL: http://svnweb.freebsd.org/changeset/base/263784 Log: MFC r262501: Refresh our implementation of OpenBSD's Blowfish password format. Notable changes: - Support of $2b$ password format to address a problem where very long passwords (more than 256 characters, when an integer overflow would happen and cause the length to wrap at 256). - Updated pseudo code in comments to reflect the reality. - Removed our local shortcut of processing magic string and rely on the centralized and tigntened validation. - Diff reduction from upstream. For now we are still generating the older $2a$ format of password but we will migrate to the new format once the format is formally finalized. Modified: stable/9/secure/lib/libcrypt/crypt-blowfish.c Directory Properties: stable/9/secure/lib/libcrypt/ (props changed) Changes in other areas also in this revision: Modified: stable/8/secure/lib/libcrypt/crypt-blowfish.c Directory Properties: stable/8/secure/lib/libcrypt/ (props changed) Modified: stable/9/secure/lib/libcrypt/crypt-blowfish.c ============================================================================== --- stable/9/secure/lib/libcrypt/crypt-blowfish.c Thu Mar 27 00:23:44 2014 (r263783) +++ stable/9/secure/lib/libcrypt/crypt-blowfish.c Thu Mar 27 00:24:48 2014 (r263784) @@ -1,3 +1,5 @@ +/* $OpenBSD: bcrypt.c,v 1.29 2014/02/24 19:45:43 tedu Exp $ */ + /* * Copyright 1997 Niels Provos * All rights reserved. @@ -35,10 +37,10 @@ __FBSDID("$FreeBSD$"); * and works as follows: * * 1. state := InitState () - * 2. state := ExpandKey (state, salt, password) 3. - * REPEAT rounds: + * 2. state := ExpandKey (state, salt, password) + * 3. REPEAT rounds: + * state := ExpandKey (state, 0, password) * state := ExpandKey (state, 0, salt) - * state := ExpandKey(state, 0, password) * 4. ctext := "OrpheanBeholderScryDoubt" * 5. REPEAT 64: * ctext := Encrypt_ECB (state, ctext); @@ -48,6 +50,7 @@ __FBSDID("$FreeBSD$"); /* * FreeBSD implementation by Paul Herman + * and updated by Xin Li */ #include @@ -66,7 +69,8 @@ __FBSDID("$FreeBSD$"); #define BCRYPT_VERSION '2' #define BCRYPT_MAXSALT 16 /* Precomputation is just so nice */ #define BCRYPT_BLOCKS 6 /* Ciphertext blocks */ -#define BCRYPT_MINROUNDS 16 /* we have log2(rounds) in salt */ +#define BCRYPT_MINLOGROUNDS 4 /* we have log2(rounds) in salt */ + static void encode_base64(u_int8_t *, u_int8_t *, u_int16_t); static void decode_base64(u_int8_t *, u_int16_t, const u_int8_t *); @@ -74,11 +78,10 @@ static void decode_base64(u_int8_t *, u_ static char encrypted[_PASSWORD_LEN]; static char error[] = ":"; -static const u_int8_t Base64Code[] = +const static u_int8_t Base64Code[] = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; -static const u_int8_t index_64[128] = -{ +const static u_int8_t index_64[128] = { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, @@ -109,7 +112,7 @@ decode_base64(u_int8_t *buffer, u_int16_ if (c1 == 255 || c2 == 255) break; - *bp++ = (u_int8_t)((c1 << 2) | ((c2 & 0x30) >> 4)); + *bp++ = (c1 << 2) | ((c2 & 0x30) >> 4); if (bp >= buffer + len) break; @@ -139,23 +142,19 @@ crypt_blowfish(const char *key, const ch blf_ctx state; u_int32_t rounds, i, k; u_int16_t j; - u_int8_t key_len, salt_len, logr, minr; + size_t key_len; + u_int8_t salt_len, logr, minr; u_int8_t ciphertext[4 * BCRYPT_BLOCKS] = "OrpheanBeholderScryDoubt"; u_int8_t csalt[BCRYPT_MAXSALT]; u_int32_t cdata[BCRYPT_BLOCKS]; - static const char *magic = "$2a$04$"; - - /* Defaults */ - minr = 'a'; - logr = 4; - rounds = 1 << logr; + char arounds[3]; - /* If it starts with the magic string, then skip that */ - if(!strncmp(salt, magic, strlen(magic))) { - salt += strlen(magic); - } - else if (*salt == '$') { + /* Defaults */ + minr = 'a'; + logr = BCRYPT_MINLOGROUNDS; + rounds = 1U << logr; + if (*salt == '$') { /* Discard "$" identifier */ salt++; @@ -167,9 +166,9 @@ crypt_blowfish(const char *key, const ch /* Check for minor versions */ if (salt[1] != '$') { switch (salt[1]) { - case 'a': - /* 'ab' should not yield the same as 'abab' */ - minr = (u_int8_t)salt[1]; + case 'a': /* 'ab' should not yield the same as 'abab' */ + case 'b': /* cap input length at 72 bytes */ + minr = salt[1]; salt++; break; default: @@ -185,21 +184,38 @@ crypt_blowfish(const char *key, const ch /* Out of sync with passwd entry */ return error; - /* Computer power doesnt increase linear, 2^x should be fine */ - logr = (u_int8_t)atoi(salt); - rounds = 1 << logr; - if (rounds < BCRYPT_MINROUNDS) + memcpy(arounds, salt, sizeof(arounds)); + if (arounds[sizeof(arounds) - 1] != '$') return error; + arounds[sizeof(arounds) - 1] = 0; + logr = strtonum(arounds, BCRYPT_MINLOGROUNDS, 31, NULL); + if (logr == 0) + return NULL; + /* Computer power doesn't increase linearly, 2^x should be fine */ + rounds = 1U << logr; /* Discard num rounds + "$" identifier */ salt += 3; } + if (strlen(salt) * 3 / 4 < BCRYPT_MAXSALT) + return NULL; /* We dont want the base64 salt but the raw data */ - decode_base64(csalt, BCRYPT_MAXSALT, (const u_int8_t *)salt); + decode_base64(csalt, BCRYPT_MAXSALT, (const u_int8_t *) salt); salt_len = BCRYPT_MAXSALT; - key_len = (u_int8_t)(strlen(key) + (minr >= 'a' ? 1 : 0)); + if (minr <= 'a') + key_len = (u_int8_t)(strlen(key) + (minr >= 'a' ? 1 : 0)); + else { + /* strlen() returns a size_t, but the function calls + * below result in implicit casts to a narrower integer + * type, so cap key_len at the actual maximum supported + * length here to avoid integer wraparound */ + key_len = strlen(key); + if (key_len > 72) + key_len = 72; + key_len++; /* include the NUL */ + } /* Setting up S-Boxes and Subkeys */ Blowfish_initstate(&state); @@ -234,7 +250,7 @@ crypt_blowfish(const char *key, const ch encrypted[i++] = '$'; encrypted[i++] = BCRYPT_VERSION; if (minr) - encrypted[i++] = (int8_t)minr; + encrypted[i++] = minr; encrypted[i++] = '$'; snprintf(encrypted + i, 4, "%2.2u$", logr); @@ -242,6 +258,10 @@ crypt_blowfish(const char *key, const ch encode_base64((u_int8_t *) encrypted + i + 3, csalt, BCRYPT_MAXSALT); encode_base64((u_int8_t *) encrypted + strlen(encrypted), ciphertext, 4 * BCRYPT_BLOCKS - 1); + memset(&state, 0, sizeof(state)); + memset(ciphertext, 0, sizeof(ciphertext)); + memset(csalt, 0, sizeof(csalt)); + memset(cdata, 0, sizeof(cdata)); return encrypted; } @@ -274,7 +294,6 @@ encode_base64(u_int8_t *buffer, u_int8_t } *bp = '\0'; } - #if 0 void main() @@ -289,11 +308,11 @@ main() snprintf(salt + 3, 4, "%2.2u$", 5); printf("24 bytes of salt: "); - fgets(salt + 6, 94, stdin); + fgets(salt + 6, sizeof(salt) - 6, stdin); salt[99] = 0; printf("72 bytes of password: "); fpurge(stdin); - fgets(blubber, 73, stdin); + fgets(blubber, sizeof(blubber), stdin); blubber[72] = 0; p = crypt(blubber, salt); From owner-svn-src-stable@FreeBSD.ORG Thu Mar 27 00:24:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 45D96CE7; Thu, 27 Mar 2014 00:24:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 313DA145; Thu, 27 Mar 2014 00:24:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2R0Onr0070754; Thu, 27 Mar 2014 00:24:49 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2R0Onrn070753; Thu, 27 Mar 2014 00:24:49 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201403270024.s2R0Onrn070753@svn.freebsd.org> From: Xin LI Date: Thu, 27 Mar 2014 00:24:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r263784 - in stable: 8/secure/lib/libcrypt 9/secure/lib/libcrypt X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 00:24:49 -0000 Author: delphij Date: Thu Mar 27 00:24:48 2014 New Revision: 263784 URL: http://svnweb.freebsd.org/changeset/base/263784 Log: MFC r262501: Refresh our implementation of OpenBSD's Blowfish password format. Notable changes: - Support of $2b$ password format to address a problem where very long passwords (more than 256 characters, when an integer overflow would happen and cause the length to wrap at 256). - Updated pseudo code in comments to reflect the reality. - Removed our local shortcut of processing magic string and rely on the centralized and tigntened validation. - Diff reduction from upstream. For now we are still generating the older $2a$ format of password but we will migrate to the new format once the format is formally finalized. Modified: stable/8/secure/lib/libcrypt/crypt-blowfish.c Directory Properties: stable/8/secure/lib/libcrypt/ (props changed) Changes in other areas also in this revision: Modified: stable/9/secure/lib/libcrypt/crypt-blowfish.c Directory Properties: stable/9/secure/lib/libcrypt/ (props changed) Modified: stable/8/secure/lib/libcrypt/crypt-blowfish.c ============================================================================== --- stable/8/secure/lib/libcrypt/crypt-blowfish.c Thu Mar 27 00:23:44 2014 (r263783) +++ stable/8/secure/lib/libcrypt/crypt-blowfish.c Thu Mar 27 00:24:48 2014 (r263784) @@ -1,3 +1,5 @@ +/* $OpenBSD: bcrypt.c,v 1.29 2014/02/24 19:45:43 tedu Exp $ */ + /* * Copyright 1997 Niels Provos * All rights reserved. @@ -35,10 +37,10 @@ __FBSDID("$FreeBSD$"); * and works as follows: * * 1. state := InitState () - * 2. state := ExpandKey (state, salt, password) 3. - * REPEAT rounds: + * 2. state := ExpandKey (state, salt, password) + * 3. REPEAT rounds: + * state := ExpandKey (state, 0, password) * state := ExpandKey (state, 0, salt) - * state := ExpandKey(state, 0, password) * 4. ctext := "OrpheanBeholderScryDoubt" * 5. REPEAT 64: * ctext := Encrypt_ECB (state, ctext); @@ -48,6 +50,7 @@ __FBSDID("$FreeBSD$"); /* * FreeBSD implementation by Paul Herman + * and updated by Xin Li */ #include @@ -66,7 +69,8 @@ __FBSDID("$FreeBSD$"); #define BCRYPT_VERSION '2' #define BCRYPT_MAXSALT 16 /* Precomputation is just so nice */ #define BCRYPT_BLOCKS 6 /* Ciphertext blocks */ -#define BCRYPT_MINROUNDS 16 /* we have log2(rounds) in salt */ +#define BCRYPT_MINLOGROUNDS 4 /* we have log2(rounds) in salt */ + static void encode_base64(u_int8_t *, u_int8_t *, u_int16_t); static void decode_base64(u_int8_t *, u_int16_t, const u_int8_t *); @@ -74,11 +78,10 @@ static void decode_base64(u_int8_t *, u_ static char encrypted[_PASSWORD_LEN]; static char error[] = ":"; -static const u_int8_t Base64Code[] = +const static u_int8_t Base64Code[] = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; -static const u_int8_t index_64[128] = -{ +const static u_int8_t index_64[128] = { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, @@ -109,7 +112,7 @@ decode_base64(u_int8_t *buffer, u_int16_ if (c1 == 255 || c2 == 255) break; - *bp++ = (u_int8_t)((c1 << 2) | ((c2 & 0x30) >> 4)); + *bp++ = (c1 << 2) | ((c2 & 0x30) >> 4); if (bp >= buffer + len) break; @@ -139,23 +142,19 @@ crypt_blowfish(const char *key, const ch blf_ctx state; u_int32_t rounds, i, k; u_int16_t j; - u_int8_t key_len, salt_len, logr, minr; + size_t key_len; + u_int8_t salt_len, logr, minr; u_int8_t ciphertext[4 * BCRYPT_BLOCKS] = "OrpheanBeholderScryDoubt"; u_int8_t csalt[BCRYPT_MAXSALT]; u_int32_t cdata[BCRYPT_BLOCKS]; - static const char *magic = "$2a$04$"; - - /* Defaults */ - minr = 'a'; - logr = 4; - rounds = 1 << logr; + char arounds[3]; - /* If it starts with the magic string, then skip that */ - if(!strncmp(salt, magic, strlen(magic))) { - salt += strlen(magic); - } - else if (*salt == '$') { + /* Defaults */ + minr = 'a'; + logr = BCRYPT_MINLOGROUNDS; + rounds = 1U << logr; + if (*salt == '$') { /* Discard "$" identifier */ salt++; @@ -167,9 +166,9 @@ crypt_blowfish(const char *key, const ch /* Check for minor versions */ if (salt[1] != '$') { switch (salt[1]) { - case 'a': - /* 'ab' should not yield the same as 'abab' */ - minr = (u_int8_t)salt[1]; + case 'a': /* 'ab' should not yield the same as 'abab' */ + case 'b': /* cap input length at 72 bytes */ + minr = salt[1]; salt++; break; default: @@ -185,21 +184,38 @@ crypt_blowfish(const char *key, const ch /* Out of sync with passwd entry */ return error; - /* Computer power doesnt increase linear, 2^x should be fine */ - logr = (u_int8_t)atoi(salt); - rounds = 1 << logr; - if (rounds < BCRYPT_MINROUNDS) + memcpy(arounds, salt, sizeof(arounds)); + if (arounds[sizeof(arounds) - 1] != '$') return error; + arounds[sizeof(arounds) - 1] = 0; + logr = strtonum(arounds, BCRYPT_MINLOGROUNDS, 31, NULL); + if (logr == 0) + return NULL; + /* Computer power doesn't increase linearly, 2^x should be fine */ + rounds = 1U << logr; /* Discard num rounds + "$" identifier */ salt += 3; } + if (strlen(salt) * 3 / 4 < BCRYPT_MAXSALT) + return NULL; /* We dont want the base64 salt but the raw data */ - decode_base64(csalt, BCRYPT_MAXSALT, (const u_int8_t *)salt); + decode_base64(csalt, BCRYPT_MAXSALT, (const u_int8_t *) salt); salt_len = BCRYPT_MAXSALT; - key_len = (u_int8_t)(strlen(key) + (minr >= 'a' ? 1 : 0)); + if (minr <= 'a') + key_len = (u_int8_t)(strlen(key) + (minr >= 'a' ? 1 : 0)); + else { + /* strlen() returns a size_t, but the function calls + * below result in implicit casts to a narrower integer + * type, so cap key_len at the actual maximum supported + * length here to avoid integer wraparound */ + key_len = strlen(key); + if (key_len > 72) + key_len = 72; + key_len++; /* include the NUL */ + } /* Setting up S-Boxes and Subkeys */ Blowfish_initstate(&state); @@ -234,7 +250,7 @@ crypt_blowfish(const char *key, const ch encrypted[i++] = '$'; encrypted[i++] = BCRYPT_VERSION; if (minr) - encrypted[i++] = (int8_t)minr; + encrypted[i++] = minr; encrypted[i++] = '$'; snprintf(encrypted + i, 4, "%2.2u$", logr); @@ -242,6 +258,10 @@ crypt_blowfish(const char *key, const ch encode_base64((u_int8_t *) encrypted + i + 3, csalt, BCRYPT_MAXSALT); encode_base64((u_int8_t *) encrypted + strlen(encrypted), ciphertext, 4 * BCRYPT_BLOCKS - 1); + memset(&state, 0, sizeof(state)); + memset(ciphertext, 0, sizeof(ciphertext)); + memset(csalt, 0, sizeof(csalt)); + memset(cdata, 0, sizeof(cdata)); return encrypted; } @@ -274,7 +294,6 @@ encode_base64(u_int8_t *buffer, u_int8_t } *bp = '\0'; } - #if 0 void main() @@ -289,11 +308,11 @@ main() snprintf(salt + 3, 4, "%2.2u$", 5); printf("24 bytes of salt: "); - fgets(salt + 6, 94, stdin); + fgets(salt + 6, sizeof(salt) - 6, stdin); salt[99] = 0; printf("72 bytes of password: "); fpurge(stdin); - fgets(blubber, 73, stdin); + fgets(blubber, sizeof(blubber), stdin); blubber[72] = 0; p = crypt(blubber, salt); From owner-svn-src-stable@FreeBSD.ORG Thu Mar 27 03:20:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7767772B; Thu, 27 Mar 2014 03:20:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F4172EC; Thu, 27 Mar 2014 03:20:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2R3KswX045128; Thu, 27 Mar 2014 03:20:54 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2R3Klqv045092; Thu, 27 Mar 2014 03:20:47 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201403270320.s2R3Klqv045092@svn.freebsd.org> From: Devin Teske Date: Thu, 27 Mar 2014 03:20:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263791 - in stable/9: . usr.sbin/bsdconfig usr.sbin/bsdconfig/console usr.sbin/bsdconfig/console/include usr.sbin/bsdconfig/diskmgmt usr.sbin/bsdconfig/docsinstall usr.sbin/bsdconfig/d... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 03:20:54 -0000 Author: dteske Date: Thu Mar 27 03:20:47 2014 New Revision: 263791 URL: http://svnweb.freebsd.org/changeset/base/263791 Log: MFC revisions 253333,256181,256321-256323,256325,256330,256333,256335, 256391,257755-257756,257780-257785,257787-257793,258029,258263,258266, 258355,258360,258400-258401,258406-258407,258418,258430,258439,258458, 258589-258590,258592,258727-258728,258785,259054,260894,260899,262895- 262902,262904,262908-262910,262982,262984,263133-263137,263139,263141, 263144-263150, and (partially) 263249 (76 revisions; summarized below)... r253333: Re-implement $probe_only aspect of f_media_get_TYPE() r256181: Centralized [X]dialog(1) exit codes added to `dialog.subr' r256321: Add support for obtaining the capacity of disks. r256322: Fix include statements in strings.subr r256323: Add USE_DIALOG global r256325: Add keymap.subr r256330: Fix f_dialog_*_constrain() to support NULL variable arguments r256333: Fixes and additions to `device.subr' r256335: Add f_expand_number() (shadowing expand_number(3)) r256391: Fix signed integer overflow detection in f_expand_number() r257755: Update f_host_lookup() to support SRV records r257756: Fix spurious error message "f_media_shutdown_http: not found" r257780: Whitespace r257781: Make use of f_isset() r257782: Add DEBUG_INITIALIZE_FILE global boolean r257783: Add f_show_err() (like f_show_msg() but for errors) r257784: Add f_eval_catch() for debug and displaying errors automatically r257785: Fix dialog auto-sizing when running in a pipe-chain r257787: Fix a silly bug r257788: Add some helpful debugging r257789: Comments r257790: Fix a bug when using printf r257791: Add f_sprintf() and f_vsprintf() r257792: Comments r257793: Fix an off-by-one error r258029: Comments r258263: Move function name declarations/usages r258266: Always shutdown media and don't eject CDROM r258355: "Tim trailing" -> "Trim Trailing" r258360: Whitespace, style, sub-shells, and variable names r258400: Add new `includes' module for exploring the API r258401: Add `-d' flag [to includes module] for printing function descrs r258406: Make `-d' flag [of include module] implicitly enable `-f' r258407: Update function description for f_validate_hostname() r258418: Quote the interface name for good measure [in device.subr] r258430: Remove unused line [in device.subr] -- cruft from SVN r258360 r258439: Fix command-line only modules [dot, includes] to not use f_die() r258458: Improve network device scanning r258589: Add missing `$' before `pgm' in syscons_ttys module r258590: Add missing newline [in includes module] r258592: Sort messages r258727: Fix display output issue with `includes' module r258728: Fix [another] display output issue with `includes' module r258785: Sort function output [from includes module] on name of function r259054: Performance and debugging enhancements r260894: Optimize f_expand_number() (submitted by Christoph Mallon) r260899: Dummy commit r262895: Allow dispatched reswords to carry arguments r262896: Add missing local declaration [in common.subr] r262897: Fix a type in a comment [in common.subr] r262898: Fix incorrect return status [from f_getvar() in common.subr] r262899: Make f_show_err() [of common.subr] non-fatal r262900: Centralize function name [in f_script_load() of script.subr] r262901: Prevent localization of __number in f_expand_number() r262902: Add a comment above f_replaceall() [of strings.subr] r262904: Rewrite groupmgmt -- hooking it into the scripting system r262908: Change dispatch words from group* to *Group for backward compat r262909: Fix copy/paste error in a comment [in goupadd module] r262910: Take a group name on the command-line [of groupdel] if available r262982: Whitespace [in group_input.subr] r262984: Remove vestigial global [in group_input.subr] r263133: Remove extraneous debug statement r263134: Add debug statement just before attempting to exec a module r263135: Comments [in device.subr] r263136: Update copyright r263137: Fix future namespace issues [in dialog.subr] r263139: Remove useless NULL strings ('') in some compound strings r263141: Fix broken f_isinteger() [of strings.subr] r263144: Fix a code-type that prevented auto-sizing [in group_input.subr] r263145: Fix comments and whitespace [in new group.subr] r263146: Reduce dialog sleep cycle for confirmation dialogs [in group.subr] r263147: Fix bug preventing pw(8) errors from appearing [in group.subr] r263148: Check arguments when running non-interactive [in group.subr] r263149: Add i18n input protection [to group.subr and group_input.subr] r263150: Rewrite usermgmt -- hooking it into the scripting system r263249: (partial) Add old group_input and user_input to ObsoleteFiles.inc Added: stable/9/usr.sbin/bsdconfig/includes/ - copied from r258400, head/usr.sbin/bsdconfig/includes/ stable/9/usr.sbin/bsdconfig/share/keymap.subr - copied, changed from r256325, head/usr.sbin/bsdconfig/share/keymap.subr stable/9/usr.sbin/bsdconfig/usermgmt/share/group.subr - copied, changed from r262904, head/usr.sbin/bsdconfig/usermgmt/share/group.subr stable/9/usr.sbin/bsdconfig/usermgmt/share/user.subr - copied unchanged from r263150, head/usr.sbin/bsdconfig/usermgmt/share/user.subr Deleted: stable/9/usr.sbin/bsdconfig/usermgmt/groupinput stable/9/usr.sbin/bsdconfig/usermgmt/userinput Modified: stable/9/ObsoleteFiles.inc (contents, props changed) stable/9/usr.sbin/bsdconfig/Makefile stable/9/usr.sbin/bsdconfig/bsdconfig stable/9/usr.sbin/bsdconfig/console/console stable/9/usr.sbin/bsdconfig/console/font stable/9/usr.sbin/bsdconfig/console/include/messages.subr stable/9/usr.sbin/bsdconfig/console/keymap stable/9/usr.sbin/bsdconfig/console/repeat stable/9/usr.sbin/bsdconfig/console/saver stable/9/usr.sbin/bsdconfig/console/screenmap stable/9/usr.sbin/bsdconfig/console/ttys stable/9/usr.sbin/bsdconfig/diskmgmt/diskmgmt stable/9/usr.sbin/bsdconfig/docsinstall/docsinstall stable/9/usr.sbin/bsdconfig/dot/dot stable/9/usr.sbin/bsdconfig/include/messages.subr stable/9/usr.sbin/bsdconfig/includes/USAGE stable/9/usr.sbin/bsdconfig/includes/includes stable/9/usr.sbin/bsdconfig/mouse/disable stable/9/usr.sbin/bsdconfig/mouse/enable stable/9/usr.sbin/bsdconfig/mouse/flags stable/9/usr.sbin/bsdconfig/mouse/include/messages.subr stable/9/usr.sbin/bsdconfig/mouse/mouse stable/9/usr.sbin/bsdconfig/mouse/port stable/9/usr.sbin/bsdconfig/mouse/type stable/9/usr.sbin/bsdconfig/networking/defaultrouter stable/9/usr.sbin/bsdconfig/networking/devices stable/9/usr.sbin/bsdconfig/networking/hostname stable/9/usr.sbin/bsdconfig/networking/include/messages.subr stable/9/usr.sbin/bsdconfig/networking/nameservers stable/9/usr.sbin/bsdconfig/networking/networking stable/9/usr.sbin/bsdconfig/networking/share/device.subr stable/9/usr.sbin/bsdconfig/networking/share/hostname.subr stable/9/usr.sbin/bsdconfig/networking/share/ipaddr.subr stable/9/usr.sbin/bsdconfig/networking/share/media.subr stable/9/usr.sbin/bsdconfig/networking/share/netmask.subr stable/9/usr.sbin/bsdconfig/networking/share/resolv.subr stable/9/usr.sbin/bsdconfig/networking/share/routing.subr stable/9/usr.sbin/bsdconfig/networking/share/services.subr stable/9/usr.sbin/bsdconfig/packages/packages stable/9/usr.sbin/bsdconfig/password/password stable/9/usr.sbin/bsdconfig/password/share/password.subr stable/9/usr.sbin/bsdconfig/security/kern_securelevel stable/9/usr.sbin/bsdconfig/security/security stable/9/usr.sbin/bsdconfig/share/Makefile stable/9/usr.sbin/bsdconfig/share/common.subr stable/9/usr.sbin/bsdconfig/share/device.subr stable/9/usr.sbin/bsdconfig/share/dialog.subr stable/9/usr.sbin/bsdconfig/share/media/any.subr stable/9/usr.sbin/bsdconfig/share/media/cdrom.subr stable/9/usr.sbin/bsdconfig/share/media/common.subr stable/9/usr.sbin/bsdconfig/share/media/directory.subr stable/9/usr.sbin/bsdconfig/share/media/dos.subr stable/9/usr.sbin/bsdconfig/share/media/floppy.subr stable/9/usr.sbin/bsdconfig/share/media/ftp.subr stable/9/usr.sbin/bsdconfig/share/media/http.subr stable/9/usr.sbin/bsdconfig/share/media/httpproxy.subr stable/9/usr.sbin/bsdconfig/share/media/nfs.subr stable/9/usr.sbin/bsdconfig/share/media/options.subr stable/9/usr.sbin/bsdconfig/share/media/tcpip.subr stable/9/usr.sbin/bsdconfig/share/media/ufs.subr stable/9/usr.sbin/bsdconfig/share/media/usb.subr stable/9/usr.sbin/bsdconfig/share/mustberoot.subr stable/9/usr.sbin/bsdconfig/share/packages/categories.subr stable/9/usr.sbin/bsdconfig/share/packages/packages.subr stable/9/usr.sbin/bsdconfig/share/script.subr stable/9/usr.sbin/bsdconfig/share/strings.subr stable/9/usr.sbin/bsdconfig/share/sysrc.subr stable/9/usr.sbin/bsdconfig/share/variable.subr stable/9/usr.sbin/bsdconfig/startup/include/messages.subr stable/9/usr.sbin/bsdconfig/startup/misc stable/9/usr.sbin/bsdconfig/startup/rcadd stable/9/usr.sbin/bsdconfig/startup/rcconf stable/9/usr.sbin/bsdconfig/startup/rcdelete stable/9/usr.sbin/bsdconfig/startup/rcedit stable/9/usr.sbin/bsdconfig/startup/rcvar stable/9/usr.sbin/bsdconfig/startup/share/rcconf.subr stable/9/usr.sbin/bsdconfig/startup/share/rcedit.subr stable/9/usr.sbin/bsdconfig/startup/share/rcvar.subr stable/9/usr.sbin/bsdconfig/startup/startup stable/9/usr.sbin/bsdconfig/timezone/share/menus.subr stable/9/usr.sbin/bsdconfig/timezone/share/zones.subr stable/9/usr.sbin/bsdconfig/timezone/timezone stable/9/usr.sbin/bsdconfig/ttys/ttys stable/9/usr.sbin/bsdconfig/usermgmt/Makefile stable/9/usr.sbin/bsdconfig/usermgmt/groupadd stable/9/usr.sbin/bsdconfig/usermgmt/groupdel stable/9/usr.sbin/bsdconfig/usermgmt/groupedit stable/9/usr.sbin/bsdconfig/usermgmt/include/messages.subr stable/9/usr.sbin/bsdconfig/usermgmt/share/Makefile stable/9/usr.sbin/bsdconfig/usermgmt/share/group_input.subr stable/9/usr.sbin/bsdconfig/usermgmt/share/user_input.subr stable/9/usr.sbin/bsdconfig/usermgmt/useradd stable/9/usr.sbin/bsdconfig/usermgmt/userdel stable/9/usr.sbin/bsdconfig/usermgmt/useredit stable/9/usr.sbin/bsdconfig/usermgmt/usermgmt Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/bsdconfig/ (props changed) Modified: stable/9/ObsoleteFiles.inc ============================================================================== --- stable/9/ObsoleteFiles.inc Thu Mar 27 01:41:18 2014 (r263790) +++ stable/9/ObsoleteFiles.inc Thu Mar 27 03:20:47 2014 (r263791) @@ -84,6 +84,10 @@ OLD_FILES+=usr/lib32/libssh.a OLD_FILES+=usr/lib32/libssh.so OLD_LIBS+=usr/lib32/libssh.so.5 OLD_FILES+=usr/lib32/libssh_p.a +# 20140314: bsdconfig usermgmt rewrite +OLD_FILES+=usr/libexec/bsdconfig/070.usermgmt/userinput +# 20140307: bsdconfig groupmgmt rewrite +OLD_FILES+=usr/libexec/bsdconfig/070.usermgmt/groupinput # 20131109: extattr(2) mlinks fixed OLD_FILES+=usr/share/man/man2/extattr_delete_list.2.gz OLD_FILES+=usr/share/man/man2/extattr_get_list.2.gz Modified: stable/9/usr.sbin/bsdconfig/Makefile ============================================================================== --- stable/9/usr.sbin/bsdconfig/Makefile Thu Mar 27 01:41:18 2014 (r263790) +++ stable/9/usr.sbin/bsdconfig/Makefile Thu Mar 27 03:20:47 2014 (r263791) @@ -6,6 +6,7 @@ SUBDIR= console \ dot \ examples \ include \ + includes \ mouse \ networking \ packages \ Modified: stable/9/usr.sbin/bsdconfig/bsdconfig ============================================================================== --- stable/9/usr.sbin/bsdconfig/bsdconfig Thu Mar 27 01:41:18 2014 (r263790) +++ stable/9/usr.sbin/bsdconfig/bsdconfig Thu Mar 27 03:20:47 2014 (r263791) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2012 Ron McDowell -# Copyright (c) 2012-2013 Devin Teske +# Copyright (c) 2012-2014 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -300,7 +300,7 @@ dialog_menu_main() f_dialog_menutag_store "$menu_choice" # Only update default-item on success - [ $retval -eq 0 ] && f_dialog_default_store "$menu_choice" + [ $retval -eq $DIALOG_OK ] && f_dialog_default_store "$menu_choice" return $retval } @@ -315,8 +315,7 @@ if [ "$pgm" != "bsdconfig" ]; then if indexfile=$( f_index_file "$pgm" ) && cmd=$( f_index_menusel_command "$indexfile" "$pgm" ) then - f_dprintf "pgm=[%s] indexfile=[%s] cmd=[%s]" \ - "$pgm" "$indexfile" "$cmd" + f_dprintf "pgm=[%s] cmd=[%s] *=[%s]" "$pgm" "$cmd" "$*" exec "$cmd" "$@" || exit 1 else f_include $BSDCFG_SHARE/script.subr @@ -324,7 +323,7 @@ if [ "$pgm" != "bsdconfig" ]; then [ "$pgm" = "$resword" ] || continue # Found a match f_dprintf "pgm=[%s] A valid resWord!" "$pgm" - f_dispatch $resword + f_dispatch $resword $resword "$@" exit $? done fi @@ -342,7 +341,7 @@ while getopts f:h$GETOPTS_STDARGS flag; h|\?) usage ;; esac done -shift $(( $OPTIND -1 )) +shift $(( $OPTIND - 1 )) # If we've loaded any scripts, do not continue any further [ $scripts_loaded -gt 0 ] && exit @@ -382,6 +381,7 @@ if [ "$1" ]; then # Not reached fi + f_dprintf "cmd=[%s] *=[%s]" "$cmd" "$*" shift exec $cmd ${USE_XDIALOG:+-X} "$@" || exit 1 # Not reached @@ -396,11 +396,10 @@ while :; do f_dialog_menutag_fetch mtag f_dprintf "retval=%u mtag=[%s]" $retval "$mtag" - if [ $retval -eq 2 ]; then - # The Help button was pressed + if [ $retval -eq $DIALOG_HELP ]; then f_show_help "$BSDCONFIG_HELPFILE" continue - elif [ $retval -ne 0 ]; then + elif [ $retval -ne $DIALOG_OK ]; then f_die fi Modified: stable/9/usr.sbin/bsdconfig/console/console ============================================================================== --- stable/9/usr.sbin/bsdconfig/console/console Thu Mar 27 01:41:18 2014 (r263790) +++ stable/9/usr.sbin/bsdconfig/console/console Thu Mar 27 03:20:47 2014 (r263791) @@ -37,8 +37,8 @@ f_include $BSDCFG_SHARE/mustberoot.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="080.console" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ FUNCTIONS Modified: stable/9/usr.sbin/bsdconfig/console/font ============================================================================== --- stable/9/usr.sbin/bsdconfig/console/font Thu Mar 27 01:41:18 2014 (r263790) +++ stable/9/usr.sbin/bsdconfig/console/font Thu Mar 27 03:20:47 2014 (r263791) @@ -38,8 +38,8 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="080.console" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ FUNCTIONS @@ -174,14 +174,16 @@ esac [ "$f8" -a "$f14" -a "$f16" ] || f_die 1 "$msg_unknown_font_selection" -f_sysrc_set font8x8 "$f8" || f_die -f_sysrc_set font8x14 "$f14" || f_die -f_sysrc_set font8x16 "$f16" || f_die +f_eval_catch "$0" f_sysrc_set 'f_sysrc_set font8x8 "%s"' "$f8" || f_die +f_eval_catch "$0" f_sysrc_set 'f_sysrc_set font8x14 "%s"' "$f14" || f_die +f_eval_catch "$0" f_sysrc_set 'f_sysrc_set font8x16 "%s"' "$f16" || f_die if [ "$mc_start" ]; then - f_sysrc_set mousechar_start "$mc_start" || f_die + f_eval_catch "$0" f_sysrc_set \ + 'f_sysrc_set mousechar_start "%s"' "$mc_start" || f_die else - f_sysrc_delete mousechar_start || f_die + f_eval_catch "$0" f_sysrc_delete \ + 'f_sysrc_delete mousechar_start' || f_die fi exit $SUCCESS Modified: stable/9/usr.sbin/bsdconfig/console/include/messages.subr ============================================================================== --- stable/9/usr.sbin/bsdconfig/console/include/messages.subr Thu Mar 27 01:41:18 2014 (r263790) +++ stable/9/usr.sbin/bsdconfig/console/include/messages.subr Thu Mar 27 03:20:47 2014 (r263791) @@ -51,8 +51,8 @@ msg_cancel="Cancel" msg_central_european_iso="Central European ISO" msg_central_european_iso_desc="Central European ISO keymap" msg_choose_alternate_keyboard_map="Choose an alternate keyboard map" -msg_choose_alternate_screenmap="Choose an alternate screenmap" msg_choose_alternate_screen_font="Choose an alternate screen font" +msg_choose_alternate_screenmap="Choose an alternate screenmap" msg_choose_console_terminal_type="Choose console terminal type" msg_configure_screen_saver="Configure the screen saver" msg_console_menu_text="The system console driver for FreeBSD has a number of configuration\noptions which may be set according to your preference.\n\nWhen you are done setting configuration options, select Cancel." @@ -74,9 +74,9 @@ msg_enter_timeout_period="Enter time-out msg_estonian_cp850="Estonian CP850" msg_estonian_cp850_desc="Estonian Code Page 850 keymap" msg_estonian_iso="Estonian ISO" -msg_estonian_iso_desc="Estonian ISO keymap" msg_estonian_iso_15="Estonian ISO 15" msg_estonian_iso_15_desc="Estonian ISO 8859-15 keymap" +msg_estonian_iso_desc="Estonian ISO keymap" msg_exit="Exit" msg_exit_this_menu="Exit this menu" msg_fade="Fade" @@ -97,8 +97,6 @@ msg_french_iso_accent_desc="French ISO k msg_french_iso_desc="French ISO keymap" msg_french_iso_macbook="French ISO/Macbook" msg_french_iso_macbook_desc="French ISO keymap on macbook" -msg_green="Green" -msg_green_desc="\"Green\" power saving mode (if supported by monitor)" msg_german_cp850="German CP850" msg_german_cp850_desc="German Code Page 850 keymap" msg_german_iso="German ISO" @@ -109,10 +107,14 @@ msg_greek_104="Greek 104" msg_greek_104_desc="Greek ISO keymap (104 keys)" msg_greek_elot="Greek ELOT" msg_greek_elot_desc="Greek ISO keymap (ELOT 1000)" +msg_green="Green" +msg_green_desc="\"Green\" power saving mode (if supported by monitor)" msg_hungarian_101="Hungarian 101" msg_hungarian_101_desc="Hungarian ISO keymap (101 key)" msg_hungarian_102="Hungarian 102" msg_hungarian_102_desc="Hungarian ISO keymap (102 key)" +msg_ibm_1251="IBM 1251" +msg_ibm_1251_desc="Cyrillic, MS Windows encoding" msg_ibm_437="IBM 437" msg_ibm_437_desc="English and others, VGA default" msg_ibm_437_vga_default="IBM437 (VGA default)" @@ -124,12 +126,12 @@ msg_ibm_866="IBM 866" msg_ibm_866_desc="Russian, IBM encoding (use with KOI8-R screenmap)" msg_ibm_866u="IBM 866u" msg_ibm_866u_desc="Ukrainian, IBM encoding (use with KOI8-U screenmap)" -msg_ibm_1251="IBM 1251" -msg_ibm_1251_desc="Cyrillic, MS Windows encoding" msg_icelandic="Icelandic" msg_icelandic_accent="Icelandic (accent)" msg_icelandic_accent_desc="Icelandic ISO keymap (accent keys)" msg_icelandic_desc="Icelandic ISO keymap" +msg_iso_8859_15="ISO 8859-15" +msg_iso_8859_15_desc="Europe, ISO encoding" msg_iso_8859_1="ISO 8859-1" msg_iso_8859_1_desc="Western Europe, ISO encoding" msg_iso_8859_1_to_ibm437="ISO 8859-1 to IBM437" @@ -144,8 +146,6 @@ msg_iso_8859_7_to_ibm437="ISO 8859-7 to msg_iso_8859_7_to_ibm437_desc="Greek ISO 8859-1 to IBM 437 screenmap" msg_iso_8859_8="ISO 8859-8" msg_iso_8859_8_desc="Hebrew, ISO encoding" -msg_iso_8859_15="ISO 8859-15" -msg_iso_8859_15_desc="Europe, ISO encoding" msg_italian="Italian" msg_italian_desc="Italian ISO keymap" msg_japanese_106="Japanese 106" @@ -153,9 +153,9 @@ msg_japanese_106_desc="Japanese 106 keym msg_keymap="Keymap" msg_keymap_menu_text="The system console driver for FreeBSD defaults to a standard\n\"US\" keyboard map. Users may wish to choose one of the\nother keymaps below." msg_koi8_r="KOI8-R" -msg_koi8_u="KOI8-U" msg_koi8_r_to_ibm866="KOI8-R to IBM866" msg_koi8_r_to_ibm866_desc="Russian KOI8-R to IBM 866 screenmap" +msg_koi8_u="KOI8-U" msg_koi8_u_to_ibm866u="KOI8-U to IBM866u" msg_koi8_u_to_ibm866u_desc="Ukrainian KOI8-U to IBM 866u screenmap" msg_latin_american="Latin American" @@ -224,8 +224,8 @@ msg_swiss_german_iso_accent_desc="Swiss msg_swiss_german_iso_desc="Swiss German ISO keymap" msg_system_console_configuration="System Console Configuration" msg_system_console_font="System Console Font" -msg_system_console_keymap="System Console Keymap" msg_system_console_keyboard_repeat_rate="System Console Keyboard Repeat Rate" +msg_system_console_keymap="System Console Keymap" msg_system_console_screen_saver="System Console Screen Saver" msg_system_console_screenmap="System Console Screenmap" msg_system_console_terminal_type="System Console Terminal Type" Modified: stable/9/usr.sbin/bsdconfig/console/keymap ============================================================================== --- stable/9/usr.sbin/bsdconfig/console/keymap Thu Mar 27 01:41:18 2014 (r263790) +++ stable/9/usr.sbin/bsdconfig/console/keymap Thu Mar 27 03:20:47 2014 (r263791) @@ -38,8 +38,8 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="080.console" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ CONFIGURATION @@ -246,10 +246,8 @@ while :; do keymap_name= mtag="${mtag# }" # remove single leading-space if-present for name in $KEYMAP_NAMES; do - if [ "$( eval echo \"\$msg_$name\" )" = "$mtag" ]; then - keymap_name="$name" - break - fi + debug= f_getvar msg_$name msg + [ "$msg" = "$mtag" ] && keymap_name="$name" break done [ "$keymap_name" ] || continue @@ -319,7 +317,8 @@ while :; do esac if [ "$keymap_to_set" ]; then - f_sysrc_set keymap "$keymap_to_set" || f_die + f_eval_catch "$0" f_sysrc_set \ + 'f_sysrc_set keymap "%s"' "$keymap_to_set" || f_die break else f_die 1 "$msg_unknown_keymap" Modified: stable/9/usr.sbin/bsdconfig/console/repeat ============================================================================== --- stable/9/usr.sbin/bsdconfig/console/repeat Thu Mar 27 01:41:18 2014 (r263790) +++ stable/9/usr.sbin/bsdconfig/console/repeat Thu Mar 27 03:20:47 2014 (r263791) @@ -38,8 +38,8 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="080.console" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ FUNCTIONS @@ -129,7 +129,8 @@ case "$mtag" in esac if [ "$repeat_rate_to_set" ]; then - f_sysrc_set keyrate "$repeat_rate_to_set" || f_die + f_eval_catch "$0" f_sysrc_set \ + 'f_sysrc_set keyrate "%s"' "$repeat_rate_to_set" || f_die break else f_die 1 "$msg_unknown_repeat_rate" Modified: stable/9/usr.sbin/bsdconfig/console/saver ============================================================================== --- stable/9/usr.sbin/bsdconfig/console/saver Thu Mar 27 01:41:18 2014 (r263790) +++ stable/9/usr.sbin/bsdconfig/console/saver Thu Mar 27 03:20:47 2014 (r263791) @@ -38,8 +38,8 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="080.console" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ FUNCTIONS @@ -144,7 +144,8 @@ case "$mtag" in f_dialog_title "$msg_value_required" f_dialog_input blanktime "$msg_enter_timeout_period" \ "$( f_sysrc_get blanktime )" && - f_sysrc_set blanktime "$blanktime" || f_die + f_eval_catch "$0" f_sysrc_set \ + 'f_sysrc_set blanktime "%s"' "$blanktime" || f_die f_dialog_title_restore exit $SUCCESS esac @@ -180,7 +181,8 @@ case "$mtag" in esac if [ "$saver_to_set" ]; then - f_sysrc_set saver "$saver_to_set" || f_die + f_eval_catch "$0" f_sysrc_set \ + 'f_sysrc_set saver "%s"' "$saver_to_set" || f_die break else f_die 1 "$msg_unknown_saver" Modified: stable/9/usr.sbin/bsdconfig/console/screenmap ============================================================================== --- stable/9/usr.sbin/bsdconfig/console/screenmap Thu Mar 27 01:41:18 2014 (r263790) +++ stable/9/usr.sbin/bsdconfig/console/screenmap Thu Mar 27 03:20:47 2014 (r263791) @@ -38,8 +38,8 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="080.console" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ FUNCTIONS @@ -141,7 +141,8 @@ case "$mtag" in esac if [ "$scrnmap_to_set" ]; then - f_sysrc_set scrnmap "$scrnmap_to_set" || f_die + f_eval_catch "$0" f_sysrc_set \ + 'f_sysrc_set scrnmap "%s"' "$scrnmap_to_set" || f_die break else f_die 1 "$msg_unknown_screenmap_selection" Modified: stable/9/usr.sbin/bsdconfig/console/ttys ============================================================================== --- stable/9/usr.sbin/bsdconfig/console/ttys Thu Mar 27 01:41:18 2014 (r263790) +++ stable/9/usr.sbin/bsdconfig/console/ttys Thu Mar 27 03:20:47 2014 (r263791) @@ -38,8 +38,8 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="080.console" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ CONFIGURATION @@ -92,7 +92,7 @@ dialog_menu_main() local retval=$? f_dialog_menutag_store -s "$menu_choice" - if [ $retval -eq $SUCCESS ]; then + if [ $retval -eq $DIALOG_OK ]; then local item item=$( eval f_dialog_menutag2item \ \"\$menu_choice\" $menu_list ) @@ -108,23 +108,28 @@ dialog_menu_main() # ttys_set_type() { + local funcname=ttys_set_type local consterm="$1" err # # Create new temporary file to write our ttys(5) update with new types. # - local tmpfile="$( mktemp -t "pgm" )" - [ "$tmpfile" ] || return $FAILURE + local tmpfile + f_eval_catch -k tmpfile $funcname mktemp 'mktemp -t "%s"' "$pgm" || + return $FAILURE # # Fixup permissions and ownership (mktemp(1) creates the temporary file # with 0600 permissions -- change the permissions and ownership to # match ttys(5) before we write it out and mv(1) it into place). # - local mode="$( stat -f '%#Lp' "$ETC_TTYS" 2> /dev/null )" - local owner="$( stat -f '%u:%g' "$ETC_TTYS" 2> /dev/null )" - f_quietly chmod "${mode:-0644}" "$tmpfile" - f_quietly chown "${owner:-root:wheel}" "$tmpfile" + local mode owner + f_eval_catch -dk mode $funcname stat \ + 'stat -f "%%#Lp" "%s"' "$ETC_TTYS" || mode=0644 + f_eval_catch -dk owner $funcname stat \ + 'stat -f "%%u:%%g" "%s"' "$ETC_TTYS" || owner="root:wheel" + f_eval_catch -d $funcname chmod 'chmod "%s" "%s"' "$mode" "$tmpfile" + f_eval_catch -d $funcname chown 'chown "%s" "%s"' "$owner" "$tmpfile" # # Operate on ttys(5), replacing only the types of `ttyv*' and @@ -156,10 +161,8 @@ ttys_set_type() f_dialog_msgbox "$err" return $FAILURE fi - if ! err=$( mv -f "$tmpfile" "$ETC_TTYS" 2>&1 ); then - f_dialog_msgbox "$err" + f_eval_catch $funcname mv 'mv -f "%s" "%s"' "$tmpfile" "$ETC_TTYS" || return $FAILURE - fi return $SUCCESS } Modified: stable/9/usr.sbin/bsdconfig/diskmgmt/diskmgmt ============================================================================== --- stable/9/usr.sbin/bsdconfig/diskmgmt/diskmgmt Thu Mar 27 01:41:18 2014 (r263790) +++ stable/9/usr.sbin/bsdconfig/diskmgmt/diskmgmt Thu Mar 27 03:20:47 2014 (r263791) @@ -37,8 +37,8 @@ f_include $BSDCFG_SHARE/mustberoot.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="050.diskmgmt" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ CONFIGURATION Modified: stable/9/usr.sbin/bsdconfig/docsinstall/docsinstall ============================================================================== --- stable/9/usr.sbin/bsdconfig/docsinstall/docsinstall Thu Mar 27 01:41:18 2014 (r263790) +++ stable/9/usr.sbin/bsdconfig/docsinstall/docsinstall Thu Mar 27 03:20:47 2014 (r263791) @@ -37,8 +37,8 @@ f_include $BSDCFG_SHARE/mustberoot.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="020.docsinstall" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ CONFIGURATION Modified: stable/9/usr.sbin/bsdconfig/dot/dot ============================================================================== --- stable/9/usr.sbin/bsdconfig/dot/dot Thu Mar 27 01:41:18 2014 (r263790) +++ stable/9/usr.sbin/bsdconfig/dot/dot Thu Mar 27 03:20:47 2014 (r263791) @@ -41,8 +41,8 @@ BSDCFG_LIBE="/usr/libexec/bsdconfig" APP f_include_lang $BSDCFG_LIBE/include/messages.subr f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ CONFIGURATION @@ -163,7 +163,7 @@ while getopts cdhi flag; do done shift $(( $OPTIND - 1 )) -cd $BSDCFG_LIBE || f_die 1 "$msg_directory_not_found" "$BSDCFG_LIB" +cd $BSDCFG_LIBE || f_die # Pedantic # # Get a list of menu programs Modified: stable/9/usr.sbin/bsdconfig/include/messages.subr ============================================================================== --- stable/9/usr.sbin/bsdconfig/include/messages.subr Thu Mar 27 01:41:18 2014 (r263790) +++ stable/9/usr.sbin/bsdconfig/include/messages.subr Thu Mar 27 03:20:47 2014 (r263791) @@ -40,6 +40,7 @@ msg_afterstep_desc="Ports to support the msg_all="All" msg_all_desc="All available packages in all categories." msg_always_try_sudo_when_run_as="Always try sudo(8) when run as %s" +msg_an_unknown_error_occurred="An unknown error occurred" msg_arabic_desc="Ported software for Arab countries." msg_archivers_desc="Utilities for archiving and unarchiving data." msg_armenia="Armenia" @@ -166,8 +167,8 @@ msg_install_from_an_http_server="Install msg_install_from_the_existing_filesystem="Install from the existing filesystem" msg_install_over_nfs="Install over NFS" msg_installed="Installed" -msg_installed_lc="installed" msg_installed_desc="Leave package as-is, installed" +msg_installed_lc="installed" msg_invalid_gateway_ipv4_address_specified="Invalid gateway IPv4 address specified" msg_invalid_hostname_value="Invalid hostname value" msg_invalid_ipv4_address="Invalid IPv4 address" @@ -201,6 +202,7 @@ msg_lithuania="Lithuania" msg_loading_of_dependent_package_failed="Loading of dependent package %s failed" msg_located_index_now_reading_package_data_from_it="Located INDEX, now reading package data from it..." msg_logging_in_to_user_at_host="Logging in to %s@%s.." +msg_looking_for_keymap_files="Looking for keymap files..." msg_looking_up_host="Looking up host %s" msg_mail_desc="Electronic mail packages and utilities." msg_main_menu="Main Menu" Modified: stable/9/usr.sbin/bsdconfig/includes/USAGE ============================================================================== --- head/usr.sbin/bsdconfig/includes/USAGE Wed Nov 20 20:37:21 2013 (r258400) +++ stable/9/usr.sbin/bsdconfig/includes/USAGE Thu Mar 27 03:20:47 2014 (r263791) @@ -28,6 +28,7 @@ Usage: bsdconfig @PROGRAM_NAME@ [OPTIONS OPTIONS: -a Always use color even when output is not to a terminal. + -d Print description for each function selected. Implies `-f'. -f Show functions for selected includes. -F pattern If `-f', only print functions matching pattern. Without `-f' @@ -64,3 +65,7 @@ EXAMPLES: bsdconfig @PROGRAM_NAME@ -F show common NB: The `.subr' suffix on the end of the include is optional. + + Show descriptions of each of the `show' functions: + + bsdconfig @PROGRAM_NAME@ -dF show Modified: stable/9/usr.sbin/bsdconfig/includes/includes ============================================================================== --- head/usr.sbin/bsdconfig/includes/includes Wed Nov 20 20:37:21 2013 (r258400) +++ stable/9/usr.sbin/bsdconfig/includes/includes Thu Mar 27 03:20:47 2014 (r263791) @@ -29,7 +29,7 @@ ############################################################ INCLUDES # Prevent common.subr from auto initializing debugging (this is not an inter- -# active utility that requires debugging). +# active utility that requires debugging; also `-d' has been repurposed). # DEBUG_SELF_INITIALIZE=NO @@ -41,8 +41,8 @@ BSDCFG_LIBE="/usr/libexec/bsdconfig" APP f_include_lang $BSDCFG_LIBE/include/messages.subr f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ GLOBALS @@ -50,6 +50,7 @@ ipgm=$( f_index_menusel_keyword $BSDCFG_ # Options # USE_COLOR=1 +SHOW_DESC= SHOW_FUNCS= FUNC_PATTERN= @@ -64,24 +65,62 @@ show_include() local file="${1#./}" local pattern="${FUNC_PATTERN:-.*}" - output=$( awk -v use_color=${USE_COLOR:-0} -v re="$pattern" ' + output=$( awk \ + -v use_color=${USE_COLOR:-0} \ + -v re="$pattern" \ + -v show_desc=${SHOW_DESC:-0} ' + function asorti(src, dest) + { + # Copy src indices to dest and calculate array length + nitems = 0; for (i in src) dest[++nitems] = i + + # Sort the array of indices (dest) using insertion sort method + for (i = 1; i <= nitems; k = i++) + { + idx = dest[i] + while ((k > 0) && (dest[k] > idx)) + { + dest[k+1] = dest[k] + k-- + } + dest[k+1] = idx + } + + return nitems + } /^$/,/^#/ { if ($0 ~ /^# f_/) { if (!match($2, re)) next + fn = $2 if (use_color) - printf " %s%s%s\n", + syntax[fn] = sprintf("+%s%s%s\n", substr($0, 2, RSTART), substr($0, 2 + RSTART, RLENGTH), - substr($0, 2 + RSTART + RLENGTH) + substr($0, 2 + RSTART + RLENGTH)) else - print substr($0, 2) - print_more = substr($0, length($0)) == "\\" + syntax[fn] = "+" substr($0, 2) "\n" + if (show_desc) + print_more = 1 + else + print_more = substr($0, length($0)) == "\\" } - while (print_more) { + if (show_desc && print_more) { + getline + while ($0 ~ /^#/) { + syntax[fn] = syntax[fn] " " substr($0, 2) "\n" + getline + } + print_more = 0 + } else while (print_more) { getline - print substr($0, 2) + syntax[fn] = syntax[fn] " " substr($0, 2) "\n" print_more = substr($0, length($0)) == "\\" } + } + END { + n = asorti(syntax, sorted_indices) + for (i = 1; i <= n; i++) + printf "%s", syntax[sorted_indices[i]] }' "$file" ) if [ "$output" ]; then if [ ! "$SHOW_FUNCS" ]; then @@ -89,10 +128,10 @@ show_include() return $SUCCESS fi if [ "$FUNC_PATTERN" ]; then - printf "$msg_functions_in_matching\n" \ + printf ">>> $msg_functions_in_matching\n" \ "$file" "$FUNC_PATTERN" else - printf "$msg_functions_in\n" "$file" + printf ">>> $msg_functions_in\n" "$file" fi echo "$output" echo # blank line to simplify awk(1)-based reparse @@ -110,9 +149,10 @@ show_include() # # Process command-line arguments # -while getopts afF:hn flag; do +while getopts adfF:hn flag; do case "$flag" in a) USE_COLOR=1 ;; + d) SHOW_DESC=1 SHOW_FUNCS=1 ;; f) SHOW_FUNCS=1 ;; F) FUNC_PATTERN="$OPTARG" ;; n) USE_COLOR= ;; @@ -122,7 +162,7 @@ done shift $(( $OPTIND - 1 )) # cd(1) to `share' dir so relative paths work for find and positional args -cd $BSDCFG_SHARE || f_die 1 "$msg_directory_not_found" "$BSDCFG_SHARE" +cd $BSDCFG_SHARE || f_die # Pedantic # # If given an argument, operate on it specifically (implied `-f') and exit @@ -132,9 +172,11 @@ for include in "$@"; do # See if they've just omitted the `*.subr' suffix [ -f "$include.subr" -a ! -f "$include" ] && include="$include.subr" if [ ! -f "$include" ]; then - f_die 1 "$msg_no_such_file_or_directory" "$0" "$include" + printf "$msg_no_such_file_or_directory\n" "$0" "$include" + exit $FAILURE elif [ ! -r "$include" ]; then - f_die 1 "$msg_permission_denied" "$0" "$include" + printf "$msg_permission_denied\n" "$0" "$include" + exit $FAILURE fi show_include "$include" || f_die done Modified: stable/9/usr.sbin/bsdconfig/mouse/disable ============================================================================== --- stable/9/usr.sbin/bsdconfig/mouse/disable Thu Mar 27 01:41:18 2014 (r263790) +++ stable/9/usr.sbin/bsdconfig/mouse/disable Thu Mar 27 03:20:47 2014 (r263791) @@ -38,8 +38,8 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="110.mouse" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ CONFIGURATION @@ -73,12 +73,16 @@ f_mustberoot_init # # Stop the mouse daemon # -[ -r "$MOUSED_PIDFILE" ] && - f_quietly kill "$( cat "$MOUSED_PIDFILE" )" -f_sysrc_set moused_enable "NO" || f_die -f_sysrc_set moused_type "NO" || f_die -f_sysrc_delete moused_port || f_die -f_sysrc_delete moused_flags || f_die +if [ -r "$MOUSED_PIDFILE" ]; then + f_eval_catch -dk pid "$0" cat 'cat "%s"' "$MOUSED_PIDFILE" && + f_isinteger "$pid" && + [ $pid -gt 0 ] && + f_eval_catch -d "$0" kill 'kill %s' $pid +fi +f_eval_catch "$0" f_sysrc_set 'f_sysrc_set moused_enable NO' || f_die +f_eval_catch "$0" f_sysrc_set 'f_sysrc_set moused_type NO' || f_die +f_eval_catch "$0" f_sysrc_delete 'f_sysrc_delete moused_port' || f_die +f_eval_catch "$0" f_sysrc_delete 'f_sysrc_delete moused_flags' || f_die # # Message box Modified: stable/9/usr.sbin/bsdconfig/mouse/enable ============================================================================== --- stable/9/usr.sbin/bsdconfig/mouse/enable Thu Mar 27 01:41:18 2014 (r263790) +++ stable/9/usr.sbin/bsdconfig/mouse/enable Thu Mar 27 03:20:47 2014 (r263791) @@ -38,8 +38,8 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="110.mouse" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ CONFIGURATION @@ -85,10 +85,15 @@ flags=$( f_sysrc_get moused_flags ) # Start the mouse daemon # f_dialog_info "$msg_trying_to_start_the_mouse_daemon" -[ -r "$MOUSED_PIDFILE" ] && - f_quietly kill "$( cat "$MOUSED_PIDFILE" 2> /dev/null )" -f_quietly vidcontrol -m on -f_quietly moused -t "$type" -p "$port" $flags +if [ -r "$MOUSED_PIDFILE" ]; then + f_eval_catch -dk pid "$0" cat 'cat "%s"' "$MOUSED_PIDFILE" && + f_isinteger "$pid" && + [ $pid -gt 0 ] && + f_eval_catch -d "$0" kill 'kill %s' $pid +fi +f_eval_catch -d "$0" vidcontrol 'vidcontrol -m on' +f_eval_catch -d "$0" moused \ + 'moused -t "%s" -p "%s" %s' "$type" "$port" "$flags" # # Confirm with the user that the mouse is working @@ -101,14 +106,19 @@ f_dialog_title_restore # # Stop the mouse daemon # -f_quietly vidcontrol -m off -if [ $retval -eq $SUCCESS ]; then - f_sysrc_set moused_enable "YES" || f_die - ln -fs /dev/sysmouse /dev/mouse || f_die # backwards compat +f_eval_catch -d "$0" vidcontrol 'vidcontrol -m off' +if [ $retval -eq $DIALOG_OK ]; then + f_eval_catch "$0" f_sysrc_set 'f_sysrc_set moused_enable YES' || f_die + f_eval_catch "$0" ln \ + 'ln -fs /dev/sysmouse /dev/mouse' || f_die # backwards compat else - [ -r "$MOUSED_PIDFILE" ] && - f_quietly kill "$( cat "$MOUSED_PIDFILE" )" - f_sysrc_set moused_enable "NO" || f_die + if [ -r "$MOUSED_PIDFILE" ]; then + f_eval_catch -dk pid "$0" cat 'cat "%s"' "$MOUSED_PIDFILE" && + f_isinteger "$pid" && + [ $pid -gt 0 ] && + f_eval_catch -d "$0" kill 'kill %s' $pid + fi + f_eval_catch "$0" f_sysrc_set 'f_sysrc_set moused_enable NO' || f_die fi exit $SUCCESS Modified: stable/9/usr.sbin/bsdconfig/mouse/flags ============================================================================== --- stable/9/usr.sbin/bsdconfig/mouse/flags Thu Mar 27 01:41:18 2014 (r263790) +++ stable/9/usr.sbin/bsdconfig/mouse/flags Thu Mar 27 03:20:47 2014 (r263791) @@ -38,8 +38,8 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="110.mouse" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ CONFIGURATION @@ -86,7 +86,7 @@ f_dialog_title_restore # # Save the new value # -f_sysrc_set moused_flags "$flags" || f_die +f_eval_catch "$0" f_sysrc_set 'f_sysrc_set moused_flags "%s"' "$flags" || f_die exit $SUCCESS Modified: stable/9/usr.sbin/bsdconfig/mouse/include/messages.subr ============================================================================== --- stable/9/usr.sbin/bsdconfig/mouse/include/messages.subr Thu Mar 27 01:41:18 2014 (r263790) +++ stable/9/usr.sbin/bsdconfig/mouse/include/messages.subr Thu Mar 27 03:20:47 2014 (r263791) @@ -58,14 +58,14 @@ msg_microsoft="Microsoft" msg_microsoft_desc="Microsoft protocol (serial)" msg_mm_series="MM Series" msg_mm_series_desc="MM Series protocol (serial)" -msg_mouseman="MouseMan" -msg_mouseman_desc="Logitech MouseMan/TrackMan models (serial)" -msg_mousesystems="MouseSystems" -msg_mousesystems_desc="MouseSystems protocol (serial)" msg_mouse_daemon_is_disabled="The mouse daemon is disabled." msg_mouse_disable="Mouse Disable" msg_mouse_enable="Mouse Enable" msg_mouse_flags="Mouse Flags" +msg_mouseman="MouseMan" +msg_mouseman_desc="Logitech MouseMan/TrackMan models (serial)" +msg_mousesystems="MouseSystems" +msg_mousesystems_desc="MouseSystems protocol (serial)" msg_now_move_the_mouse="Now move the mouse and see if it works.\n(Note that buttons don't have any effect for now.)\n\n Is the mouse cursor moving?\n" msg_ok="OK" msg_please_configure_your_mouse="Please configure your mouse" Modified: stable/9/usr.sbin/bsdconfig/mouse/mouse ============================================================================== --- stable/9/usr.sbin/bsdconfig/mouse/mouse Thu Mar 27 01:41:18 2014 (r263790) +++ stable/9/usr.sbin/bsdconfig/mouse/mouse Thu Mar 27 03:20:47 2014 (r263791) @@ -37,8 +37,8 @@ f_include $BSDCFG_SHARE/mustberoot.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="110.mouse" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ FUNCTIONS Modified: stable/9/usr.sbin/bsdconfig/mouse/port ============================================================================== --- stable/9/usr.sbin/bsdconfig/mouse/port Thu Mar 27 01:41:18 2014 (r263790) +++ stable/9/usr.sbin/bsdconfig/mouse/port Thu Mar 27 03:20:47 2014 (r263791) @@ -38,8 +38,8 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="110.mouse" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ FUNCTIONS @@ -141,7 +141,8 @@ case "$mtag" in esac if [ "$moused_port_to_set" ]; then - f_sysrc_set moused_port "$moused_port_to_set" || f_die + f_eval_catch "$0" f_sysrc_set \ + 'f_sysrc_set moused_port "%s"' "$moused_port_to_set" || f_die else f_die 1 "$msg_unknown_mouse_port_selection" fi Modified: stable/9/usr.sbin/bsdconfig/mouse/type ============================================================================== --- stable/9/usr.sbin/bsdconfig/mouse/type Thu Mar 27 01:41:18 2014 (r263790) +++ stable/9/usr.sbin/bsdconfig/mouse/type Thu Mar 27 03:20:47 2014 (r263791) @@ -38,8 +38,8 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="110.mouse" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ FUNCTIONS @@ -157,7 +157,8 @@ case "$mtag" in esac if [ "$moused_type_to_set" ]; then - f_sysrc_set moused_type "$moused_type_to_set" || f_die + f_eval_catch "$0" f_sysrc_set \ + 'f_sysrc_set moused_type "%s"' "$moused_type_to_set" || f_die else f_die 1 "$msg_unknown_mouse_protocol_selection" fi Modified: stable/9/usr.sbin/bsdconfig/networking/defaultrouter ============================================================================== --- stable/9/usr.sbin/bsdconfig/networking/defaultrouter Thu Mar 27 01:41:18 2014 (r263790) +++ stable/9/usr.sbin/bsdconfig/networking/defaultrouter Thu Mar 27 03:20:47 2014 (r263791) @@ -28,6 +28,9 @@ # ############################################################ INCLUDES +# Prevent device.subr (included indirectly) from auto scanning on load +DEVICE_SELF_SCAN_ALL=NO + BSDCFG_SHARE="/usr/share/bsdconfig" . $BSDCFG_SHARE/common.subr || exit 1 f_dprintf "%s: loading includes..." "$0" @@ -38,8 +41,8 @@ f_include $BSDCFG_SHARE/networking/routi BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="120.networking" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ MAIN Modified: stable/9/usr.sbin/bsdconfig/networking/devices ============================================================================== --- stable/9/usr.sbin/bsdconfig/networking/devices Thu Mar 27 01:41:18 2014 (r263790) +++ stable/9/usr.sbin/bsdconfig/networking/devices Thu Mar 27 03:20:47 2014 (r263791) @@ -28,6 +28,12 @@ # ############################################################ INCLUDES +# Prevent device.subr (included indirectly) from auto scanning; this will be +# performed indirectly later via f_dialog_menu_netdev() -- but only after we've +# successfully completed f_mustberoot_init(). +# +DEVICE_SELF_SCAN_ALL=NO + BSDCFG_SHARE="/usr/share/bsdconfig" . $BSDCFG_SHARE/common.subr || exit 1 f_dprintf "%s: loading includes..." "$0" @@ -43,8 +49,8 @@ f_include $BSDCFG_SHARE/networking/netma BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="120.networking" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ MAIN @@ -137,8 +143,8 @@ while :; do # Fill in IP address/netmask from active settings if no # configuration could be extrapolated from rc.conf(5) # - [ "$_ipaddr" ] || _ipaddr=$( f_ifconfig_inet $interface ) - [ "$_netmask" ] || _netmask=$( f_ifconfig_netmask $interface ) + [ "$_ipaddr" ] || f_ifconfig_inet $interface _ipaddr + [ "$_netmask" ] || f_ifconfig_netmask $interface _netmask # Get the extra options (this always comes from rc.conf(5)) _options=$( f_ifconfig_options $interface ) @@ -148,7 +154,7 @@ while :; do "$interface" "$_ipaddr" "$_netmask" "$_options" $dhcp # Return to root menu if above returns success - [ $? -eq $SUCCESS ] && break + [ $? -eq $DIALOG_OK ] && break done exit $SUCCESS Modified: stable/9/usr.sbin/bsdconfig/networking/hostname ============================================================================== --- stable/9/usr.sbin/bsdconfig/networking/hostname Thu Mar 27 01:41:18 2014 (r263790) +++ stable/9/usr.sbin/bsdconfig/networking/hostname Thu Mar 27 03:20:47 2014 (r263791) @@ -41,8 +41,8 @@ f_include $BSDCFG_SHARE/networking/hostn BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="120.networking" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ MAIN Modified: stable/9/usr.sbin/bsdconfig/networking/include/messages.subr ============================================================================== --- stable/9/usr.sbin/bsdconfig/networking/include/messages.subr Thu Mar 27 01:41:18 2014 (r263790) +++ stable/9/usr.sbin/bsdconfig/networking/include/messages.subr Thu Mar 27 03:20:47 2014 (r263791) @@ -59,15 +59,15 @@ msg_ipv4_addr_octet_contains_invalid_cha msg_ipv4_addr_octet_exceeds_max_value="ERROR! One or more individual octets within the IPv4 address\n(separated by dots) exceeds the maximum of 255.\n\nInvalid IP Address: %s" msg_ipv4_addr_octet_is_null="ERROR! One or more individual octets within the IPv4 address\n(separated by dots) are null and/or missing.\n\nInvalid IP Address: %s" msg_ipv4_addr_octet_missing_or_extra="ERROR! The IPv4 address entered has either too few (less than\nfour) or too many (more than four) octets, separated by dots.\n\nInvalid IP Address: %s" -msg_ipv6_addr_segment_contains_invalid_chars="ERROR! One or more individual segments within the IP address\n(separated by colons) contains one or more invalid characters.\nSegments must contain only combinations of the characters 0-9,\nA-F, or a-f.\n\nInvalid IPv6 Address: %s" -msg_ipv6_addr_segment_contains_too_many_chars="ERROR! One or more individual segments within the IP address\n(separated by colons) exceeds the length of 4 hex-digits.\n\nInvalid IPv6 Address: %s" -msg_ipv6_addr_too_few_or_extra_segments="ERROR! The IP address entered has either too few (less than 3), too\nmany (more than 8), or not enough segments, separated by colons.\n\nInvalid IPv6 Address: %s" -msg_ipv6_addr_too_many_null_segments="ERROR! Too many/incorrect null segments. A single null\nsegment is allowed within the IP address (separated by\ncolons) but not allowed at the beginning or end (unless\na double-null segment; i.e., \"::*\" or \"*::\").\n\nInvalid IPv6 Address: %s" msg_ipv4_mask_field_contains_invalid_chars="ERROR! One or more individual fields within the subnet mask\n(separated by dots) contains one or more invalid characters.\n\nInvalid Subnet Mask: %s" msg_ipv4_mask_field_exceeds_max_value="ERROR! One or more individual fields within the subnet mask\n(separated by dots) exceeds the maximum of 255.\n\nInvalid Subnet Mask: %s" msg_ipv4_mask_field_invalid_value="ERROR! One or more individual fields within the subnet mask\n(separated by dots) contains one or more invalid integers.\nFields must be one of 0/128/192/224/240/248/252/254/255.\n\nInvalid Subnet Mask: %s" msg_ipv4_mask_field_is_null="ERROR! One or more individual fields within the subnet mask\n(separated by dots) are null and/or missing.\n\nInvalid Subnet Mask: %s" msg_ipv4_mask_field_missing_or_extra="ERROR! The subnet mask entered has either too few or too many\nfields.\n\nInvalid Subnet Mask: %s" +msg_ipv6_addr_segment_contains_invalid_chars="ERROR! One or more individual segments within the IP address\n(separated by colons) contains one or more invalid characters.\nSegments must contain only combinations of the characters 0-9,\nA-F, or a-f.\n\nInvalid IPv6 Address: %s" +msg_ipv6_addr_segment_contains_too_many_chars="ERROR! One or more individual segments within the IP address\n(separated by colons) exceeds the length of 4 hex-digits.\n\nInvalid IPv6 Address: %s" +msg_ipv6_addr_too_few_or_extra_segments="ERROR! The IP address entered has either too few (less than 3), too\nmany (more than 8), or not enough segments, separated by colons.\n\nInvalid IPv6 Address: %s" +msg_ipv6_addr_too_many_null_segments="ERROR! Too many/incorrect null segments. A single null\nsegment is allowed within the IP address (separated by\ncolons) but not allowed at the beginning or end (unless\na double-null segment; i.e., \"::*\" or \"*::\").\n\nInvalid IPv6 Address: %s" msg_netmask="netmask" msg_network_configuration="%s Network Configuration:\nChoose Save/Exit when finished or Cancel." msg_network_interfaces="Network Interfaces" Modified: stable/9/usr.sbin/bsdconfig/networking/nameservers ============================================================================== --- stable/9/usr.sbin/bsdconfig/networking/nameservers Thu Mar 27 01:41:18 2014 (r263790) +++ stable/9/usr.sbin/bsdconfig/networking/nameservers Thu Mar 27 03:20:47 2014 (r263791) @@ -41,8 +41,8 @@ f_include $BSDCFG_SHARE/networking/resol BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="120.networking" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ MAIN Modified: stable/9/usr.sbin/bsdconfig/networking/networking ============================================================================== --- stable/9/usr.sbin/bsdconfig/networking/networking Thu Mar 27 01:41:18 2014 (r263790) +++ stable/9/usr.sbin/bsdconfig/networking/networking Thu Mar 27 03:20:47 2014 (r263791) @@ -37,8 +37,8 @@ f_include $BSDCFG_SHARE/mustberoot.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="120.networking" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ FUNCTIONS Modified: stable/9/usr.sbin/bsdconfig/networking/share/device.subr ============================================================================== --- stable/9/usr.sbin/bsdconfig/networking/share/device.subr Thu Mar 27 01:41:18 2014 (r263790) +++ stable/9/usr.sbin/bsdconfig/networking/share/device.subr Thu Mar 27 03:20:47 2014 (r263791) @@ -40,6 +40,7 @@ f_include $BSDCFG_SHARE/networking/media f_include $BSDCFG_SHARE/networking/netmask.subr f_include $BSDCFG_SHARE/networking/resolv.subr f_include $BSDCFG_SHARE/networking/routing.subr +f_include $BSDCFG_SHARE/strings.subr f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="120.networking" @@ -62,7 +63,8 @@ f_include_lang $BSDCFG_LIBE/$APP_DIR/inc # f_dialog_menu_netdev() *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu Mar 27 06:55:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71663FF; Thu, 27 Mar 2014 06:55:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CD0A79E; Thu, 27 Mar 2014 06:55:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2R6tRXJ033130; Thu, 27 Mar 2014 06:55:27 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2R6tRMH033128; Thu, 27 Mar 2014 06:55:27 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201403270655.s2R6tRMH033128@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 27 Mar 2014 06:55:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263796 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 06:55:27 -0000 Author: hselasky Date: Thu Mar 27 06:55:26 2014 New Revision: 263796 URL: http://svnweb.freebsd.org/changeset/base/263796 Log: MFC r263291 and r263292: Update USB template manual page. Added: stable/10/share/man/man4/usb_template.4 - copied unchanged from r263292, head/share/man/man4/usb_template.4 Deleted: stable/10/share/man/man4/usb2_template.4 Modified: stable/10/share/man/man4/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Thu Mar 27 06:36:38 2014 (r263795) +++ stable/10/share/man/man4/Makefile Thu Mar 27 06:55:26 2014 (r263796) @@ -534,6 +534,7 @@ MAN= aac.4 \ ${_urtw.4} \ urtwn.4 \ usb.4 \ + usb_template.4 \ usb_quirk.4 \ uslcom.4 \ utopia.4 \ Copied: stable/10/share/man/man4/usb_template.4 (from r263292, head/share/man/man4/usb_template.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man4/usb_template.4 Thu Mar 27 06:55:26 2014 (r263796, copy of r263292, head/share/man/man4/usb_template.4) @@ -0,0 +1,83 @@ +.\" $FreeBSD$ +.\" +.\" Copyright (c) 2008 Hans Petter Selasky. All rights reserved. +.\" +.\" 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. +.\" +.Dd March 18, 2014 +.Dt USB_TEMPLATE 4 +.Os +. +.Sh NAME +. +. +.Nm usb_template +. +.Nd "USB templates" +. +. +.Sh SYNOPSIS +To compile this module into the kernel, place the following line in +your kernel configuration file: +.Bd -ragged -offset indent +.Cd "device usb_template" +.Ed +.Pp +To load the module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +usb_template_load="YES" +.Ed +. +.Sh DESCRIPTION +The +.Nm +module implements various USB templates that are needed when +programming an USB device side driver. +. +A USB template consists of an USB device descriptor, one or more USB +configuration descriptors, one or more USB interface descriptors, one +or more USB endpoint descriptors, USB strings and additional USB +descriptors. +. +The USB template module currently has templates for USB Mass Storage, +USB CDC Ethernet and Message Transfer Protocol. +. +USB templates are currently selected using the "hw.usb.template" +sysctl. +. +The "hw.usb.template" value can be changed at any time, but will not +have any effect until the USB device has been re-enumerated. +. +. +. +.Sh SEE ALSO +.Xr usb 4 +.Sh STANDARDS +The +.Nm +module complies to the USB 1.0, 2.0 and 3.0 standard. +.Sh HISTORY +The +.Nm +module was written by +.An Hans Petter Selasky Aq hselasky@FreeBSD.org . From owner-svn-src-stable@FreeBSD.ORG Thu Mar 27 06:57:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3F149321; Thu, 27 Mar 2014 06:57:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2AC3C7AC; Thu, 27 Mar 2014 06:57:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2R6vX75033441; Thu, 27 Mar 2014 06:57:33 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2R6vWxW033439; Thu, 27 Mar 2014 06:57:32 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201403270657.s2R6vWxW033439@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 27 Mar 2014 06:57:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263798 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 06:57:33 -0000 Author: hselasky Date: Thu Mar 27 06:57:32 2014 New Revision: 263798 URL: http://svnweb.freebsd.org/changeset/base/263798 Log: MFC r263291 and r263292: Update USB template manual page. Added: stable/9/share/man/man4/usb_template.4 - copied unchanged from r263292, head/share/man/man4/usb_template.4 Deleted: stable/9/share/man/man4/usb2_template.4 Modified: stable/9/share/man/man4/Makefile Directory Properties: stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/Makefile ============================================================================== --- stable/9/share/man/man4/Makefile Thu Mar 27 06:56:11 2014 (r263797) +++ stable/9/share/man/man4/Makefile Thu Mar 27 06:57:32 2014 (r263798) @@ -509,6 +509,7 @@ MAN= aac.4 \ urndis.4 \ ${_urtw.4} \ usb.4 \ + usb_template.4 \ usb_quirk.4 \ uslcom.4 \ utopia.4 \ Copied: stable/9/share/man/man4/usb_template.4 (from r263292, head/share/man/man4/usb_template.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/share/man/man4/usb_template.4 Thu Mar 27 06:57:32 2014 (r263798, copy of r263292, head/share/man/man4/usb_template.4) @@ -0,0 +1,83 @@ +.\" $FreeBSD$ +.\" +.\" Copyright (c) 2008 Hans Petter Selasky. All rights reserved. +.\" +.\" 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. +.\" +.Dd March 18, 2014 +.Dt USB_TEMPLATE 4 +.Os +. +.Sh NAME +. +. +.Nm usb_template +. +.Nd "USB templates" +. +. +.Sh SYNOPSIS +To compile this module into the kernel, place the following line in +your kernel configuration file: +.Bd -ragged -offset indent +.Cd "device usb_template" +.Ed +.Pp +To load the module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +usb_template_load="YES" +.Ed +. +.Sh DESCRIPTION +The +.Nm +module implements various USB templates that are needed when +programming an USB device side driver. +. +A USB template consists of an USB device descriptor, one or more USB +configuration descriptors, one or more USB interface descriptors, one +or more USB endpoint descriptors, USB strings and additional USB +descriptors. +. +The USB template module currently has templates for USB Mass Storage, +USB CDC Ethernet and Message Transfer Protocol. +. +USB templates are currently selected using the "hw.usb.template" +sysctl. +. +The "hw.usb.template" value can be changed at any time, but will not +have any effect until the USB device has been re-enumerated. +. +. +. +.Sh SEE ALSO +.Xr usb 4 +.Sh STANDARDS +The +.Nm +module complies to the USB 1.0, 2.0 and 3.0 standard. +.Sh HISTORY +The +.Nm +module was written by +.An Hans Petter Selasky Aq hselasky@FreeBSD.org . From owner-svn-src-stable@FreeBSD.ORG Thu Mar 27 06:59:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70C94486; Thu, 27 Mar 2014 06:59:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C9917C6; Thu, 27 Mar 2014 06:59:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2R6xveF033751; Thu, 27 Mar 2014 06:59:57 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2R6xuXY033747; Thu, 27 Mar 2014 06:59:56 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201403270659.s2R6xuXY033747@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 27 Mar 2014 06:59:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263799 - stable/10/sys/dev/usb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 06:59:57 -0000 Author: hselasky Date: Thu Mar 27 06:59:56 2014 New Revision: 263799 URL: http://svnweb.freebsd.org/changeset/base/263799 Log: MFC r263423: Try to resolve a possible deadlock when detaching USB devices which create character devices. The deadlock can happen if an application is issuing IOCTLs which require USB refcounting, at the same time the USB device is detaching. There is already a counter in place in the USB device structure to detect this situation, but it was not always checked ahead of invoking functions that might destroy character devices, like detach, set configuration, set alternate interface or detach active kernel driver. Modified: stable/10/sys/dev/usb/usb_dev.c stable/10/sys/dev/usb/usb_device.c stable/10/sys/dev/usb/usb_process.c stable/10/sys/dev/usb/usb_process.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/usb_dev.c ============================================================================== --- stable/10/sys/dev/usb/usb_dev.c Thu Mar 27 06:57:32 2014 (r263798) +++ stable/10/sys/dev/usb/usb_dev.c Thu Mar 27 06:59:56 2014 (r263799) @@ -214,12 +214,13 @@ usb_ref_device(struct usb_cdev_privdata DPRINTFN(2, "device is detached\n"); goto error; } - if (cpd->udev->refcount == USB_DEV_REF_MAX) { - DPRINTFN(2, "no dev ref\n"); - goto error; - } if (need_uref) { DPRINTFN(2, "ref udev - needed\n"); + + if (cpd->udev->refcount == USB_DEV_REF_MAX) { + DPRINTFN(2, "no dev ref\n"); + goto error; + } cpd->udev->refcount++; mtx_unlock(&usb_ref_lock); @@ -293,9 +294,8 @@ error: usbd_enum_unlock(cpd->udev); if (crd->is_uref) { - if (--(cpd->udev->refcount) == 0) { - cv_signal(&cpd->udev->ref_cv); - } + cpd->udev->refcount--; + cv_broadcast(&cpd->udev->ref_cv); } mtx_unlock(&usb_ref_lock); DPRINTFN(2, "fail\n"); @@ -361,10 +361,9 @@ usb_unref_device(struct usb_cdev_privdat crd->is_write = 0; } if (crd->is_uref) { - if (--(cpd->udev->refcount) == 0) { - cv_signal(&cpd->udev->ref_cv); - } crd->is_uref = 0; + cpd->udev->refcount--; + cv_broadcast(&cpd->udev->ref_cv); } mtx_unlock(&usb_ref_lock); } Modified: stable/10/sys/dev/usb/usb_device.c ============================================================================== --- stable/10/sys/dev/usb/usb_device.c Thu Mar 27 06:57:32 2014 (r263798) +++ stable/10/sys/dev/usb/usb_device.c Thu Mar 27 06:59:56 2014 (r263799) @@ -452,6 +452,65 @@ usb_endpoint_foreach(struct usb_device * } /*------------------------------------------------------------------------* + * usb_wait_pending_ref_locked + * + * This function will wait for any USB references to go away before + * returning and disable further USB device refcounting on the + * specified USB device. This function is used when detaching a USB + * device. + *------------------------------------------------------------------------*/ +static void +usb_wait_pending_ref_locked(struct usb_device *udev) +{ +#if USB_HAVE_UGEN + const uint16_t refcount = + usb_proc_is_called_from( + USB_BUS_EXPLORE_PROC(udev->bus)) ? 1 : 2; + + DPRINTF("Refcount = %d\n", (int)refcount); + + while (1) { + /* wait for any pending references to go away */ + mtx_lock(&usb_ref_lock); + if (udev->refcount == refcount) { + /* prevent further refs being taken */ + udev->refcount = USB_DEV_REF_MAX; + mtx_unlock(&usb_ref_lock); + break; + } + usbd_enum_unlock(udev); + cv_wait(&udev->ref_cv, &usb_ref_lock); + mtx_unlock(&usb_ref_lock); + (void) usbd_enum_lock(udev); + } +#endif +} + +/*------------------------------------------------------------------------* + * usb_ref_restore_locked + * + * This function will restore the reference count value after a call + * to "usb_wait_pending_ref_locked()". + *------------------------------------------------------------------------*/ +static void +usb_ref_restore_locked(struct usb_device *udev) +{ +#if USB_HAVE_UGEN + const uint16_t refcount = + usb_proc_is_called_from( + USB_BUS_EXPLORE_PROC(udev->bus)) ? 1 : 2; + + DPRINTF("Refcount = %d\n", (int)refcount); + + /* restore reference count and wakeup waiters, if any */ + mtx_lock(&usb_ref_lock); + udev->refcount = refcount; + cv_broadcast(&udev->ref_cv); + mtx_unlock(&usb_ref_lock); +#endif +} + +/*------------------------------------------------------------------------* * usb_unconfigure * * This function will free all USB interfaces and USB endpoints belonging @@ -1121,6 +1180,9 @@ usb_detach_device(struct usb_device *ude sx_assert(&udev->enum_sx, SA_LOCKED); + /* wait for pending refs to go away */ + usb_wait_pending_ref_locked(udev); + /* * First detach the child to give the child's detach routine a * chance to detach the sub-devices in the correct order. @@ -1147,6 +1209,8 @@ usb_detach_device(struct usb_device *ude usb_detach_device_sub(udev, &iface->subdev, &iface->pnpinfo, flag); } + + usb_ref_restore_locked(udev); } /*------------------------------------------------------------------------* @@ -2088,14 +2152,6 @@ usb_free_device(struct usb_device *udev, udev->ugen_symlink = NULL; } - /* wait for all pending references to go away: */ - mtx_lock(&usb_ref_lock); - udev->refcount--; - while (udev->refcount != 0) { - cv_wait(&udev->ref_cv, &usb_ref_lock); - } - mtx_unlock(&usb_ref_lock); - usb_destroy_dev(udev->ctrl_dev); #endif @@ -2612,8 +2668,14 @@ usb_fifo_free_wrap(struct usb_device *ud /* no need to free this FIFO */ continue; } + /* wait for pending refs to go away */ + usb_wait_pending_ref_locked(udev); + /* free this FIFO */ usb_fifo_free(f); + + /* restore refcount */ + usb_ref_restore_locked(udev); } } #endif Modified: stable/10/sys/dev/usb/usb_process.c ============================================================================== --- stable/10/sys/dev/usb/usb_process.c Thu Mar 27 06:57:32 2014 (r263798) +++ stable/10/sys/dev/usb/usb_process.c Thu Mar 27 06:59:56 2014 (r263799) @@ -501,3 +501,15 @@ usb_proc_rewakeup(struct usb_process *up cv_signal(&up->up_cv); } } + +/*------------------------------------------------------------------------* + * usb_proc_is_called_from + * + * This function will return non-zero if called from inside the USB + * process passed as first argument. Else this function returns zero. + *------------------------------------------------------------------------*/ +int +usb_proc_is_called_from(struct usb_process *up) +{ + return (up->up_curtd == curthread); +} Modified: stable/10/sys/dev/usb/usb_process.h ============================================================================== --- stable/10/sys/dev/usb/usb_process.h Thu Mar 27 06:57:32 2014 (r263798) +++ stable/10/sys/dev/usb/usb_process.h Thu Mar 27 06:59:56 2014 (r263799) @@ -81,6 +81,7 @@ void usb_proc_mwait(struct usb_process * void usb_proc_free(struct usb_process *up); void *usb_proc_msignal(struct usb_process *up, void *pm0, void *pm1); void usb_proc_rewakeup(struct usb_process *up); +int usb_proc_is_called_from(struct usb_process *up); void usb_proc_explore_mwait(struct usb_device *, void *, void *); void *usb_proc_explore_msignal(struct usb_device *, void *, void *); From owner-svn-src-stable@FreeBSD.ORG Thu Mar 27 07:03:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26E8F5F0; Thu, 27 Mar 2014 07:03:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12FF7877; Thu, 27 Mar 2014 07:03:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2R73pkI037227; Thu, 27 Mar 2014 07:03:51 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2R73pNn037223; Thu, 27 Mar 2014 07:03:51 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201403270703.s2R73pNn037223@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 27 Mar 2014 07:03:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263800 - stable/9/sys/dev/usb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 07:03:52 -0000 Author: hselasky Date: Thu Mar 27 07:03:50 2014 New Revision: 263800 URL: http://svnweb.freebsd.org/changeset/base/263800 Log: MFC r263423: Try to resolve a possible deadlock when detaching USB devices which create character devices. The deadlock can happen if an application is issuing IOCTLs which require USB refcounting, at the same time the USB device is detaching. There is already a counter in place in the USB device structure to detect this situation, but it was not always checked ahead of invoking functions that might destroy character devices, like detach, set configuration, set alternate interface or detach active kernel driver. Modified: stable/9/sys/dev/usb/usb_dev.c stable/9/sys/dev/usb/usb_device.c stable/9/sys/dev/usb/usb_process.c stable/9/sys/dev/usb/usb_process.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/usb_dev.c ============================================================================== --- stable/9/sys/dev/usb/usb_dev.c Thu Mar 27 06:59:56 2014 (r263799) +++ stable/9/sys/dev/usb/usb_dev.c Thu Mar 27 07:03:50 2014 (r263800) @@ -210,12 +210,13 @@ usb_ref_device(struct usb_cdev_privdata DPRINTFN(2, "device is detached\n"); goto error; } - if (cpd->udev->refcount == USB_DEV_REF_MAX) { - DPRINTFN(2, "no dev ref\n"); - goto error; - } if (need_uref) { DPRINTFN(2, "ref udev - needed\n"); + + if (cpd->udev->refcount == USB_DEV_REF_MAX) { + DPRINTFN(2, "no dev ref\n"); + goto error; + } cpd->udev->refcount++; mtx_unlock(&usb_ref_lock); @@ -289,9 +290,8 @@ error: usbd_enum_unlock(cpd->udev); if (crd->is_uref) { - if (--(cpd->udev->refcount) == 0) { - cv_signal(&cpd->udev->ref_cv); - } + cpd->udev->refcount--; + cv_broadcast(&cpd->udev->ref_cv); } mtx_unlock(&usb_ref_lock); DPRINTFN(2, "fail\n"); @@ -357,10 +357,9 @@ usb_unref_device(struct usb_cdev_privdat crd->is_write = 0; } if (crd->is_uref) { - if (--(cpd->udev->refcount) == 0) { - cv_signal(&cpd->udev->ref_cv); - } crd->is_uref = 0; + cpd->udev->refcount--; + cv_broadcast(&cpd->udev->ref_cv); } mtx_unlock(&usb_ref_lock); } Modified: stable/9/sys/dev/usb/usb_device.c ============================================================================== --- stable/9/sys/dev/usb/usb_device.c Thu Mar 27 06:59:56 2014 (r263799) +++ stable/9/sys/dev/usb/usb_device.c Thu Mar 27 07:03:50 2014 (r263800) @@ -431,6 +431,65 @@ usb_endpoint_foreach(struct usb_device * } /*------------------------------------------------------------------------* + * usb_wait_pending_ref_locked + * + * This function will wait for any USB references to go away before + * returning and disable further USB device refcounting on the + * specified USB device. This function is used when detaching a USB + * device. + *------------------------------------------------------------------------*/ +static void +usb_wait_pending_ref_locked(struct usb_device *udev) +{ +#if USB_HAVE_UGEN + const uint16_t refcount = + usb_proc_is_called_from( + &udev->bus->explore_proc) ? 1 : 2; + + DPRINTF("Refcount = %d\n", (int)refcount); + + while (1) { + /* wait for any pending references to go away */ + mtx_lock(&usb_ref_lock); + if (udev->refcount == refcount) { + /* prevent further refs being taken */ + udev->refcount = USB_DEV_REF_MAX; + mtx_unlock(&usb_ref_lock); + break; + } + usbd_enum_unlock(udev); + cv_wait(&udev->ref_cv, &usb_ref_lock); + mtx_unlock(&usb_ref_lock); + (void) usbd_enum_lock(udev); + } +#endif +} + +/*------------------------------------------------------------------------* + * usb_ref_restore_locked + * + * This function will restore the reference count value after a call + * to "usb_wait_pending_ref_locked()". + *------------------------------------------------------------------------*/ +static void +usb_ref_restore_locked(struct usb_device *udev) +{ +#if USB_HAVE_UGEN + const uint16_t refcount = + usb_proc_is_called_from( + &udev->bus->explore_proc) ? 1 : 2; + + DPRINTF("Refcount = %d\n", (int)refcount); + + /* restore reference count and wakeup waiters, if any */ + mtx_lock(&usb_ref_lock); + udev->refcount = refcount; + cv_broadcast(&udev->ref_cv); + mtx_unlock(&usb_ref_lock); +#endif +} + +/*------------------------------------------------------------------------* * usb_unconfigure * * This function will free all USB interfaces and USB endpoints belonging @@ -1091,6 +1150,9 @@ usb_detach_device(struct usb_device *ude sx_assert(&udev->enum_sx, SA_LOCKED); + /* wait for pending refs to go away */ + usb_wait_pending_ref_locked(udev); + /* * First detach the child to give the child's detach routine a * chance to detach the sub-devices in the correct order. @@ -1117,6 +1179,8 @@ usb_detach_device(struct usb_device *ude usb_detach_device_sub(udev, &iface->subdev, &iface->pnpinfo, flag); } + + usb_ref_restore_locked(udev); } /*------------------------------------------------------------------------* @@ -2054,14 +2118,6 @@ usb_free_device(struct usb_device *udev, udev->ugen_symlink = NULL; } - /* wait for all pending references to go away: */ - mtx_lock(&usb_ref_lock); - udev->refcount--; - while (udev->refcount != 0) { - cv_wait(&udev->ref_cv, &usb_ref_lock); - } - mtx_unlock(&usb_ref_lock); - usb_destroy_dev(udev->ctrl_dev); #endif @@ -2578,8 +2634,14 @@ usb_fifo_free_wrap(struct usb_device *ud /* no need to free this FIFO */ continue; } + /* wait for pending refs to go away */ + usb_wait_pending_ref_locked(udev); + /* free this FIFO */ usb_fifo_free(f); + + /* restore refcount */ + usb_ref_restore_locked(udev); } } #endif Modified: stable/9/sys/dev/usb/usb_process.c ============================================================================== --- stable/9/sys/dev/usb/usb_process.c Thu Mar 27 06:59:56 2014 (r263799) +++ stable/9/sys/dev/usb/usb_process.c Thu Mar 27 07:03:50 2014 (r263800) @@ -493,3 +493,15 @@ usb_proc_rewakeup(struct usb_process *up cv_signal(&up->up_cv); } } + +/*------------------------------------------------------------------------* + * usb_proc_is_called_from + * + * This function will return non-zero if called from inside the USB + * process passed as first argument. Else this function returns zero. + *------------------------------------------------------------------------*/ +int +usb_proc_is_called_from(struct usb_process *up) +{ + return (up->up_curtd == curthread); +} Modified: stable/9/sys/dev/usb/usb_process.h ============================================================================== --- stable/9/sys/dev/usb/usb_process.h Thu Mar 27 06:59:56 2014 (r263799) +++ stable/9/sys/dev/usb/usb_process.h Thu Mar 27 07:03:50 2014 (r263800) @@ -79,6 +79,7 @@ void usb_proc_mwait(struct usb_process * void usb_proc_free(struct usb_process *up); void *usb_proc_msignal(struct usb_process *up, void *pm0, void *pm1); void usb_proc_rewakeup(struct usb_process *up); +int usb_proc_is_called_from(struct usb_process *up); void usb_proc_explore_mwait(struct usb_device *, void *, void *); void *usb_proc_explore_msignal(struct usb_device *, void *, void *); From owner-svn-src-stable@FreeBSD.ORG Thu Mar 27 07:06:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 10FF2753; Thu, 27 Mar 2014 07:06:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1427897; Thu, 27 Mar 2014 07:06:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2R76Ujv037590; Thu, 27 Mar 2014 07:06:30 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2R76UHM037583; Thu, 27 Mar 2014 07:06:30 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201403270706.s2R76UHM037583@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 27 Mar 2014 07:06:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r263801 - stable/8/sys/dev/usb X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 07:06:31 -0000 Author: hselasky Date: Thu Mar 27 07:06:29 2014 New Revision: 263801 URL: http://svnweb.freebsd.org/changeset/base/263801 Log: MFC r263423: Try to resolve a possible deadlock when detaching USB devices which create character devices. The deadlock can happen if an application is issuing IOCTLs which require USB refcounting, at the same time the USB device is detaching. There is already a counter in place in the USB device structure to detect this situation, but it was not always checked ahead of invoking functions that might destroy character devices, like detach, set configuration, set alternate interface or detach active kernel driver. Modified: stable/8/sys/dev/usb/usb_dev.c stable/8/sys/dev/usb/usb_device.c stable/8/sys/dev/usb/usb_process.c stable/8/sys/dev/usb/usb_process.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/usb_dev.c ============================================================================== --- stable/8/sys/dev/usb/usb_dev.c Thu Mar 27 07:03:50 2014 (r263800) +++ stable/8/sys/dev/usb/usb_dev.c Thu Mar 27 07:06:29 2014 (r263801) @@ -208,12 +208,13 @@ usb_ref_device(struct usb_cdev_privdata DPRINTFN(2, "device is detached\n"); goto error; } - if (cpd->udev->refcount == USB_DEV_REF_MAX) { - DPRINTFN(2, "no dev ref\n"); - goto error; - } if (need_uref) { DPRINTFN(2, "ref udev - needed\n"); + + if (cpd->udev->refcount == USB_DEV_REF_MAX) { + DPRINTFN(2, "no dev ref\n"); + goto error; + } cpd->udev->refcount++; mtx_unlock(&usb_ref_lock); @@ -287,9 +288,8 @@ error: usbd_enum_unlock(cpd->udev); if (crd->is_uref) { - if (--(cpd->udev->refcount) == 0) { - cv_signal(&cpd->udev->ref_cv); - } + cpd->udev->refcount--; + cv_broadcast(&cpd->udev->ref_cv); } mtx_unlock(&usb_ref_lock); DPRINTFN(2, "fail\n"); @@ -355,10 +355,9 @@ usb_unref_device(struct usb_cdev_privdat crd->is_write = 0; } if (crd->is_uref) { - if (--(cpd->udev->refcount) == 0) { - cv_signal(&cpd->udev->ref_cv); - } crd->is_uref = 0; + cpd->udev->refcount--; + cv_broadcast(&cpd->udev->ref_cv); } mtx_unlock(&usb_ref_lock); } Modified: stable/8/sys/dev/usb/usb_device.c ============================================================================== --- stable/8/sys/dev/usb/usb_device.c Thu Mar 27 07:03:50 2014 (r263800) +++ stable/8/sys/dev/usb/usb_device.c Thu Mar 27 07:06:29 2014 (r263801) @@ -431,6 +431,65 @@ usb_endpoint_foreach(struct usb_device * } /*------------------------------------------------------------------------* + * usb_wait_pending_ref_locked + * + * This function will wait for any USB references to go away before + * returning and disable further USB device refcounting on the + * specified USB device. This function is used when detaching a USB + * device. + *------------------------------------------------------------------------*/ +static void +usb_wait_pending_ref_locked(struct usb_device *udev) +{ +#if USB_HAVE_UGEN + const uint16_t refcount = + usb_proc_is_called_from( + &udev->bus->explore_proc) ? 1 : 2; + + DPRINTF("Refcount = %d\n", (int)refcount); + + while (1) { + /* wait for any pending references to go away */ + mtx_lock(&usb_ref_lock); + if (udev->refcount == refcount) { + /* prevent further refs being taken */ + udev->refcount = USB_DEV_REF_MAX; + mtx_unlock(&usb_ref_lock); + break; + } + usbd_enum_unlock(udev); + cv_wait(&udev->ref_cv, &usb_ref_lock); + mtx_unlock(&usb_ref_lock); + (void) usbd_enum_lock(udev); + } +#endif +} + +/*------------------------------------------------------------------------* + * usb_ref_restore_locked + * + * This function will restore the reference count value after a call + * to "usb_wait_pending_ref_locked()". + *------------------------------------------------------------------------*/ +static void +usb_ref_restore_locked(struct usb_device *udev) +{ +#if USB_HAVE_UGEN + const uint16_t refcount = + usb_proc_is_called_from( + &udev->bus->explore_proc) ? 1 : 2; + + DPRINTF("Refcount = %d\n", (int)refcount); + + /* restore reference count and wakeup waiters, if any */ + mtx_lock(&usb_ref_lock); + udev->refcount = refcount; + cv_broadcast(&udev->ref_cv); + mtx_unlock(&usb_ref_lock); +#endif +} + +/*------------------------------------------------------------------------* * usb_unconfigure * * This function will free all USB interfaces and USB endpoints belonging @@ -1091,6 +1150,9 @@ usb_detach_device(struct usb_device *ude sx_assert(&udev->enum_sx, SA_LOCKED); + /* wait for pending refs to go away */ + usb_wait_pending_ref_locked(udev); + /* * First detach the child to give the child's detach routine a * chance to detach the sub-devices in the correct order. @@ -1117,6 +1179,8 @@ usb_detach_device(struct usb_device *ude usb_detach_device_sub(udev, &iface->subdev, &iface->pnpinfo, flag); } + + usb_ref_restore_locked(udev); } /*------------------------------------------------------------------------* @@ -2054,14 +2118,6 @@ usb_free_device(struct usb_device *udev, udev->ugen_symlink = NULL; } - /* wait for all pending references to go away: */ - mtx_lock(&usb_ref_lock); - udev->refcount--; - while (udev->refcount != 0) { - cv_wait(&udev->ref_cv, &usb_ref_lock); - } - mtx_unlock(&usb_ref_lock); - usb_destroy_dev(udev->ctrl_dev); #endif @@ -2653,8 +2709,14 @@ usb_fifo_free_wrap(struct usb_device *ud /* no need to free this FIFO */ continue; } + /* wait for pending refs to go away */ + usb_wait_pending_ref_locked(udev); + /* free this FIFO */ usb_fifo_free(f); + + /* restore refcount */ + usb_ref_restore_locked(udev); } } #endif Modified: stable/8/sys/dev/usb/usb_process.c ============================================================================== --- stable/8/sys/dev/usb/usb_process.c Thu Mar 27 07:03:50 2014 (r263800) +++ stable/8/sys/dev/usb/usb_process.c Thu Mar 27 07:06:29 2014 (r263801) @@ -497,3 +497,15 @@ usb_proc_rewakeup(struct usb_process *up cv_signal(&up->up_cv); } } + +/*------------------------------------------------------------------------* + * usb_proc_is_called_from + * + * This function will return non-zero if called from inside the USB + * process passed as first argument. Else this function returns zero. + *------------------------------------------------------------------------*/ +int +usb_proc_is_called_from(struct usb_process *up) +{ + return (up->up_curtd == curthread); +} Modified: stable/8/sys/dev/usb/usb_process.h ============================================================================== --- stable/8/sys/dev/usb/usb_process.h Thu Mar 27 07:03:50 2014 (r263800) +++ stable/8/sys/dev/usb/usb_process.h Thu Mar 27 07:06:29 2014 (r263801) @@ -79,6 +79,7 @@ void usb_proc_mwait(struct usb_process * void usb_proc_free(struct usb_process *up); void *usb_proc_msignal(struct usb_process *up, void *pm0, void *pm1); void usb_proc_rewakeup(struct usb_process *up); +int usb_proc_is_called_from(struct usb_process *up); void usb_proc_explore_mwait(struct usb_device *, void *, void *); void *usb_proc_explore_msignal(struct usb_device *, void *, void *); From owner-svn-src-stable@FreeBSD.ORG Thu Mar 27 09:40:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 1A703B94; Thu, 27 Mar 2014 09:40:03 +0000 (UTC) Date: Thu, 27 Mar 2014 09:40:03 +0000 From: Alexey Dokuchaev To: Konstantin Belousov Subject: Re: svn commit: r263355 - stable/9/sys/kern Message-ID: <20140327094003.GA30016@FreeBSD.org> References: <201403191257.s2JCvDKU037106@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201403191257.s2JCvDKU037106@svn.freebsd.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 09:40:03 -0000 On Wed, Mar 19, 2014 at 12:57:13PM +0000, Konstantin Belousov wrote: > New Revision: 263355 > URL: http://svnweb.freebsd.org/changeset/base/263355 > > Log: > MFC r263079: > The auio structure is only initialized when the vnode is symlink, > avoid reading from it otherwise. Is it applicable to stable/8, and if yes, can it be MFCed? Thanks, ./danfe From owner-svn-src-stable@FreeBSD.ORG Thu Mar 27 12:12:00 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9FE67555; Thu, 27 Mar 2014 12:12:00 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B05E934; Thu, 27 Mar 2014 12:11:59 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.8/8.14.8) with ESMTP id s2RCBtZk052166; Thu, 27 Mar 2014 14:11:55 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua s2RCBtZk052166 Received: (from kostik@localhost) by tom.home (8.14.8/8.14.8/Submit) id s2RCBtG9052165; Thu, 27 Mar 2014 14:11:55 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 27 Mar 2014 14:11:55 +0200 From: Konstantin Belousov To: Alexey Dokuchaev Subject: Re: svn commit: r263355 - stable/9/sys/kern Message-ID: <20140327121155.GO21331@kib.kiev.ua> References: <201403191257.s2JCvDKU037106@svn.freebsd.org> <20140327094003.GA30016@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pndui+VhQ7yNUqd0" Content-Disposition: inline In-Reply-To: <20140327094003.GA30016@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 12:12:00 -0000 --pndui+VhQ7yNUqd0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 27, 2014 at 09:40:03AM +0000, Alexey Dokuchaev wrote: > On Wed, Mar 19, 2014 at 12:57:13PM +0000, Konstantin Belousov wrote: > > New Revision: 263355 > > URL: http://svnweb.freebsd.org/changeset/base/263355 > >=20 > > Log: > > MFC r263079: > > The auio structure is only initialized when the vnode is symlink, > > avoid reading from it otherwise. >=20 > Is it applicable to stable/8, and if yes, can it be MFCed? Thanks, This is purely cosmetic commit. Why do you insist on merging ? --pndui+VhQ7yNUqd0 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBAgAGBQJTNBWKAAoJEJDCuSvBvK1B5ZoP+wcuDPRgBFLRceT9O6yXrOrS tqVaw0/1Ku7Kt1i+oHL1OMfOrRYrXRjkSCkR2+paX3c61bJiLE7N/dEVEbPtcTeS 39slomEK6aZ4VaD4vRm2E3ufjL8TEgaGVcpDheMnSe4tgV9JeFpl+EOFUT6YFuJp Aq9u0yrZUoaeLdfTOB9cAAbYnBmzM+RfJP6+Fu4D5QSKANyXXq+PeFyU7kFjDnYo S0Vfw7Yx/e0FovV2yUnHH0YAwmh1bLug9/1ee3ba4hl9pYT+mjz8dKtWqWJz5iUf w5pPoniWxNEGjZrZB3iKiI3PUJXm0P+9+ZEeDzQ03oshdF/SJr5IDqxqdg5x/vGS O2F3WhMLcs/FCz74WsUbPnRu/arlSzaiFieXdroJ/Au2hnZvvKtQTE9iy0g/qMJg 2vyvZfTFqRF9NmkxjvFGnUqI5s7D0QUfy3OVSOhQv0YTD2vncZmMyO2QEQw8MPIX 4HG6w5I2SLLxuaVn3+uX1ifg1t3VuCp86OH74BgdXxhYk/liHxhpM3zjh5ELoKS3 YlKc2DrLM0x4ainTasYNV0ZLnf0WZK0nDhNA2m2QdORp/ViMQFuqu7bFXU+hOKRW DYuP2eKkUbEYEMouXJQ+Vo4Vi0q+nA6wU+NaCsFiKN6XFnlC52T9z1mS2XvKcmwC wgcWWqTR8avDhcGrM4wp =b85T -----END PGP SIGNATURE----- --pndui+VhQ7yNUqd0-- From owner-svn-src-stable@FreeBSD.ORG Thu Mar 27 12:32:10 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id D829BD14; Thu, 27 Mar 2014 12:32:10 +0000 (UTC) Date: Thu, 27 Mar 2014 12:32:10 +0000 From: Alexey Dokuchaev To: Konstantin Belousov Subject: Re: svn commit: r263355 - stable/9/sys/kern Message-ID: <20140327123210.GA93483@FreeBSD.org> References: <201403191257.s2JCvDKU037106@svn.freebsd.org> <20140327094003.GA30016@FreeBSD.org> <20140327121155.GO21331@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140327121155.GO21331@kib.kiev.ua> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 12:32:10 -0000 On Thu, Mar 27, 2014 at 02:11:55PM +0200, Konstantin Belousov wrote: > On Thu, Mar 27, 2014 at 09:40:03AM +0000, Alexey Dokuchaev wrote: > > On Wed, Mar 19, 2014 at 12:57:13PM +0000, Konstantin Belousov wrote: > > > New Revision: 263355 > > > URL: http://svnweb.freebsd.org/changeset/base/263355 > > > > > > Log: > > > MFC r263079: > > > The auio structure is only initialized when the vnode is symlink, > > > avoid reading from it otherwise. > > > > Is it applicable to stable/8, and if yes, can it be MFCed? Thanks, > > This is purely cosmetic commit. Why do you insist on merging ? I am not insisting. ;-) I thought it was more than purely cosmetic, but then again, I did not study the code thoroughly enough. Sorry for the noise. My reason in that stable/8 is going to be EOLed sooner or later, yet I'm not willing to move from it since 9.x/10.x do not bring anything important for me except the bloat, and 8.x works perfectly fine. That said, I'm trying to get seemingly important bug fixes MFCed, albeit sometimes I overestimate their importance and/or relevance. ./danfe From owner-svn-src-stable@FreeBSD.ORG Thu Mar 27 15:58:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26F10CF7; Thu, 27 Mar 2014 15:58:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0EAD5187; Thu, 27 Mar 2014 15:58:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2RFwO5M052759; Thu, 27 Mar 2014 15:58:24 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2RFwIlj052728; Thu, 27 Mar 2014 15:58:18 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201403271558.s2RFwIlj052728@svn.freebsd.org> From: Aleksandr Rybalko Date: Thu, 27 Mar 2014 15:58:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263817 - in stable/9: sys/conf sys/dev/drm2 sys/dev/drm2/i915 sys/dev/drm2/radeon sys/dev/fb sys/dev/syscons sys/dev/vt sys/dev/vt/font sys/dev/vt/hw/fb sys/dev/vt/hw/ofwfb sys/dev/vt/... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 15:58:24 -0000 Author: ray Date: Thu Mar 27 15:58:18 2014 New Revision: 263817 URL: http://svnweb.freebsd.org/changeset/base/263817 Log: MFC 219886, 226100, 226111, 226341, 242529, 259015, 259016, 259019, 259049, 259071, 259102, 259110, 259129, 259130, 259178, 259179, 259203, 259221, 259261, 259532, 259615, 259650, 259651, 259667, 259680, 259727, 259761, 259772, 259776, 259777, 259830, 259882, 259915, 260160, 260449, 260450, 260688, 260888, 260953, 261269, 261547, 261551, 261552, 261553, 261585 o Merge vt(4) virtual terminal (a.k.a. newcons) to stable/9. o Merge teken updates. o Add few more tty methods required by vt(4). o Update syscons(4) to work with fresh teken. Sponsored by: The FreeBSD Foundation Added: stable/9/sys/dev/fb/fb_if.m - copied unchanged from r259016, head/sys/dev/fb/fb_if.m stable/9/sys/dev/fb/fbd.c - copied, changed from r259016, head/sys/dev/fb/fbd.c stable/9/sys/dev/vt/ - copied from r259016, head/sys/dev/vt/ stable/9/sys/kern/subr_terminal.c - copied, changed from r259016, head/sys/kern/subr_terminal.c stable/9/sys/sys/terminal.h - copied, changed from r259016, head/sys/sys/terminal.h stable/9/tools/tools/vt/ - copied from r259019, head/tools/tools/vt/ Modified: stable/9/sys/conf/files stable/9/sys/conf/files.amd64 stable/9/sys/conf/files.arm stable/9/sys/conf/files.i386 stable/9/sys/conf/files.powerpc stable/9/sys/conf/files.sparc64 stable/9/sys/conf/kmod.mk stable/9/sys/conf/options stable/9/sys/dev/drm2/drmP.h stable/9/sys/dev/drm2/drm_fb_helper.c stable/9/sys/dev/drm2/drm_os_freebsd.h stable/9/sys/dev/drm2/i915/i915_drv.c stable/9/sys/dev/drm2/i915/intel_fb.c stable/9/sys/dev/drm2/radeon/radeon.h stable/9/sys/dev/drm2/radeon/radeon_drv.c stable/9/sys/dev/drm2/radeon/radeon_fb.c stable/9/sys/dev/drm2/radeon/radeon_pm.c stable/9/sys/dev/syscons/scterm-teken.c stable/9/sys/dev/syscons/scvidctl.c stable/9/sys/dev/vt/font/vt_font_default.c stable/9/sys/dev/vt/font/vt_mouse_cursor.c stable/9/sys/dev/vt/hw/fb/vt_fb.c stable/9/sys/dev/vt/hw/ofwfb/ofwfb.c (contents, props changed) stable/9/sys/dev/vt/hw/vga/vga.c stable/9/sys/dev/vt/hw/xboxfb/xboxfb.c stable/9/sys/dev/vt/vt.h stable/9/sys/dev/vt/vt_buf.c stable/9/sys/dev/vt/vt_consolectl.c stable/9/sys/dev/vt/vt_core.c stable/9/sys/dev/vt/vt_font.c stable/9/sys/dev/vt/vt_sysmouse.c stable/9/sys/kern/tty.c stable/9/sys/modules/drm2/drm2/Makefile stable/9/sys/modules/drm2/i915kms/Makefile stable/9/sys/modules/drm2/radeonkms/Makefile stable/9/sys/sparc64/sparc64/machdep.c stable/9/sys/sys/consio.h stable/9/sys/sys/eventhandler.h stable/9/sys/sys/fbio.h stable/9/sys/sys/tty.h stable/9/sys/teken/demo/Makefile stable/9/sys/teken/demo/teken_demo.c stable/9/sys/teken/libteken/Symbol.map stable/9/sys/teken/stress/teken_stress.c stable/9/sys/teken/teken.c stable/9/sys/teken/teken.h stable/9/sys/teken/teken_subr.h stable/9/tools/tools/vt/mkkfont/mkkfont.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/modules/ (props changed) stable/9/sys/sys/ (props changed) stable/9/tools/tools/ (props changed) Modified: stable/9/sys/conf/files ============================================================================== --- stable/9/sys/conf/files Thu Mar 27 14:07:36 2014 (r263816) +++ stable/9/sys/conf/files Thu Mar 27 15:58:18 2014 (r263817) @@ -87,7 +87,7 @@ pccarddevs.h standard \ compile-with "${AWK} -f $S/tools/pccarddevs2h.awk $S/dev/pccard/pccarddevs" \ no-obj no-implicit-rule before-depend \ clean "pccarddevs.h" -teken_state.h optional sc \ +teken_state.h optional sc | vt \ dependency "$S/teken/gensequences $S/teken/sequences" \ compile-with "${AWK} -f $S/teken/gensequences $S/teken/sequences > teken_state.h" \ no-obj no-implicit-rule before-depend \ @@ -1143,7 +1143,9 @@ dev/ex/if_ex_isa.c optional ex isa dev/ex/if_ex_pccard.c optional ex pccard dev/exca/exca.c optional cbb dev/fatm/if_fatm.c optional fatm pci -dev/fb/splash.c optional splash +dev/fb/fbd.c optional fbd | vt +dev/fb/fb_if.m standard +dev/fb/splash.c optional sc splash dev/fdt/fdt_common.c optional fdt dev/fdt/fdt_pci.c optional fdt pci dev/fdt/fdt_static_dtb.S optional fdt fdt_dtb_static @@ -2122,6 +2124,17 @@ dev/utopia/utopia.c optional utopia dev/vge/if_vge.c optional vge dev/vkbd/vkbd.c optional vkbd dev/vr/if_vr.c optional vr pci +dev/vt/colors/vt_termcolors.c optional vt +dev/vt/font/vt_font_default.c optional vt +dev/vt/font/vt_mouse_cursor.c optional vt +dev/vt/hw/fb/vt_fb.c optional vt +dev/vt/hw/vga/vga.c optional vt vt_vga +dev/vt/logo/logo_freebsd.c optional vt splash +dev/vt/vt_buf.c optional vt +dev/vt/vt_consolectl.c optional vt +dev/vt/vt_core.c optional vt +dev/vt/vt_font.c optional vt +dev/vt/vt_sysmouse.c optional vt dev/vte/if_vte.c optional vte pci dev/vx/if_vx.c optional vx dev/vx/if_vx_eisa.c optional vx eisa @@ -2543,6 +2556,7 @@ kern/subr_sleepqueue.c standard kern/subr_smp.c standard kern/subr_stack.c optional ddb | stack | ktr kern/subr_taskqueue.c standard +kern/subr_terminal.c optional vt kern/subr_trap.c standard kern/subr_turnstile.c standard kern/subr_uio.c standard @@ -3431,7 +3445,7 @@ security/mac_portacl/mac_portacl.c optio security/mac_seeotheruids/mac_seeotheruids.c optional mac_seeotheruids security/mac_stub/mac_stub.c optional mac_stub security/mac_test/mac_test.c optional mac_test -teken/teken.c optional sc +teken/teken.c optional sc | vt ufs/ffs/ffs_alloc.c optional ffs ufs/ffs/ffs_balloc.c optional ffs ufs/ffs/ffs_inode.c optional ffs Modified: stable/9/sys/conf/files.amd64 ============================================================================== --- stable/9/sys/conf/files.amd64 Thu Mar 27 14:07:36 2014 (r263816) +++ stable/9/sys/conf/files.amd64 Thu Mar 27 15:58:18 2014 (r263817) @@ -227,7 +227,7 @@ dev/hwpmc/hwpmc_uncore.c optional hwpmc dev/hwpmc/hwpmc_piv.c optional hwpmc dev/hwpmc/hwpmc_tsc.c optional hwpmc dev/hwpmc/hwpmc_x86.c optional hwpmc -dev/kbd/kbd.c optional atkbd | sc | ukbd +dev/kbd/kbd.c optional atkbd | sc | ukbd | vt dev/lindev/full.c optional lindev dev/lindev/lindev.c optional lindev dev/nfe/if_nfe.c optional nfe pci Modified: stable/9/sys/conf/files.arm ============================================================================== --- stable/9/sys/conf/files.arm Thu Mar 27 14:07:36 2014 (r263816) +++ stable/9/sys/conf/files.arm Thu Mar 27 15:58:18 2014 (r263817) @@ -58,6 +58,7 @@ geom/geom_bsd.c optional geom_bsd geom/geom_bsd_enc.c optional geom_bsd geom/geom_mbr.c optional geom_mbr geom/geom_mbr_enc.c optional geom_mbr +dev/kbd/kbd.c optional sc | vt libkern/arm/divsi3.S standard libkern/arm/ffs.S standard libkern/arm/muldi3.c standard Modified: stable/9/sys/conf/files.i386 ============================================================================== --- stable/9/sys/conf/files.i386 Thu Mar 27 14:07:36 2014 (r263816) +++ stable/9/sys/conf/files.i386 Thu Mar 27 15:58:18 2014 (r263817) @@ -232,7 +232,7 @@ dev/ipmi/ipmi_smbios.c optional ipmi dev/ipmi/ipmi_ssif.c optional ipmi smbus dev/ipmi/ipmi_pci.c optional ipmi pci dev/ipmi/ipmi_linux.c optional ipmi compat_linux -dev/kbd/kbd.c optional atkbd | sc | ukbd +dev/kbd/kbd.c optional atkbd | sc | ukbd | vt dev/le/if_le_isa.c optional le isa dev/lindev/full.c optional lindev dev/lindev/lindev.c optional lindev @@ -275,6 +275,7 @@ dev/uart/uart_cpu_i386.c optional uart dev/viawd/viawd.c optional viawd dev/acpica/acpi_if.m standard dev/acpi_support/acpi_wmi_if.m standard +dev/vt/hw/xboxfb/xboxfb.c optional vt_xboxfb dev/wbwd/wbwd.c optional wbwd dev/wpi/if_wpi.c optional wpi dev/isci/isci.c optional isci Modified: stable/9/sys/conf/files.powerpc ============================================================================== --- stable/9/sys/conf/files.powerpc Thu Mar 27 14:07:36 2014 (r263816) +++ stable/9/sys/conf/files.powerpc Thu Mar 27 15:58:18 2014 (r263817) @@ -31,7 +31,7 @@ dev/hwpmc/hwpmc_powerpc.c optional hwpmc dev/iicbus/ad7417.c optional ad7417 powermac dev/iicbus/ds1775.c optional ds1775 powermac dev/iicbus/max6690.c optional max6690 powermac -dev/kbd/kbd.c optional sc +dev/kbd/kbd.c optional sc | vt dev/ofw/openfirm.c optional aim | fdt dev/ofw/openfirmio.c optional aim | fdt dev/ofw/ofw_bus_if.m optional aim | fdt @@ -57,6 +57,7 @@ dev/syscons/scvtb.c optional sc dev/tsec/if_tsec.c optional tsec dev/tsec/if_tsec_fdt.c optional tsec fdt dev/uart/uart_cpu_powerpc.c optional uart aim +dev/vt/hw/ofwfb/ofwfb.c optional vt aim kern/kern_clocksource.c standard kern/subr_dummy_vdso_tc.c standard kern/syscalls.c optional ktr Modified: stable/9/sys/conf/files.sparc64 ============================================================================== --- stable/9/sys/conf/files.sparc64 Thu Mar 27 14:07:36 2014 (r263816) +++ stable/9/sys/conf/files.sparc64 Thu Mar 27 15:58:18 2014 (r263817) @@ -38,7 +38,7 @@ dev/fb/fb.c optional sc dev/fb/gallant12x22.c optional sc dev/fb/machfb.c optional machfb sc dev/hwpmc/hwpmc_sparc64.c optional hwpmc -dev/kbd/kbd.c optional atkbd | sc | ukbd +dev/kbd/kbd.c optional atkbd | sc | ukbd | vt dev/le/if_le_lebuffer.c optional le sbus dev/le/if_le_ledma.c optional le sbus dev/le/lebuffer_sbus.c optional le sbus @@ -58,7 +58,8 @@ dev/syscons/scgfbrndr.c optional sc dev/syscons/scterm-teken.c optional sc dev/syscons/scvtb.c optional sc dev/uart/uart_cpu_sparc64.c optional uart -dev/uart/uart_kbd_sun.c optional uart sc +dev/uart/uart_kbd_sun.c optional uart sc | vt +dev/vt/hw/ofwfb/ofwfb.c optional vt kern/kern_clocksource.c standard kern/subr_dummy_vdso_tc.c standard kern/syscalls.c optional ktr Modified: stable/9/sys/conf/kmod.mk ============================================================================== --- stable/9/sys/conf/kmod.mk Thu Mar 27 14:07:36 2014 (r263816) +++ stable/9/sys/conf/kmod.mk Thu Mar 27 15:58:18 2014 (r263817) @@ -346,6 +346,7 @@ CFLAGS+= ${CONF_CFLAGS} MFILES?= dev/acpica/acpi_if.m dev/acpi_support/acpi_wmi_if.m \ dev/agp/agp_if.m dev/ata/ata_if.m dev/eisa/eisa_if.m \ + dev/fb/fb_if.m \ dev/iicbus/iicbb_if.m dev/iicbus/iicbus_if.m \ dev/mmc/mmcbr_if.m dev/mmc/mmcbus_if.m \ dev/mii/miibus_if.m dev/mvs/mvs_if.m dev/ofw/ofw_bus_if.m \ Modified: stable/9/sys/conf/options ============================================================================== --- stable/9/sys/conf/options Thu Mar 27 14:07:36 2014 (r263816) +++ stable/9/sys/conf/options Thu Mar 27 15:58:18 2014 (r263817) @@ -730,8 +730,10 @@ SAFE_DEBUG opt_safe.h SAFE_NO_RNG opt_safe.h SAFE_RNDTEST opt_safe.h -# syscons options +# syscons/vt options MAXCONS opt_syscons.h +VT_FB_DEFAULT_WIDTH opt_syscons.h +VT_FB_DEFAULT_HEIGHT opt_syscons.h SC_ALT_MOUSE_IMAGE opt_syscons.h SC_CUT_SPACES2TABS opt_syscons.h SC_CUT_SEPCHARS opt_syscons.h @@ -754,6 +756,9 @@ SC_NORM_REV_ATTR opt_syscons.h SC_PIXEL_MODE opt_syscons.h SC_RENDER_DEBUG opt_syscons.h SC_TWOBUTTON_MOUSE opt_syscons.h +DEV_SC opt_syscons.h +DEV_VT opt_syscons.h + # teken terminal emulator options TEKEN_CONS25 opt_teken.h Modified: stable/9/sys/dev/drm2/drmP.h ============================================================================== --- stable/9/sys/dev/drm2/drmP.h Thu Mar 27 14:07:36 2014 (r263816) +++ stable/9/sys/dev/drm2/drmP.h Thu Mar 27 15:58:18 2014 (r263817) @@ -112,6 +112,7 @@ struct drm_device; #include "opt_compat.h" #include "opt_drm.h" +#include "opt_syscons.h" #ifdef DRM_DEBUG #undef DRM_DEBUG #define DRM_DEBUG_DEFAULT_ON 1 Modified: stable/9/sys/dev/drm2/drm_fb_helper.c ============================================================================== --- stable/9/sys/dev/drm2/drm_fb_helper.c Thu Mar 27 14:07:36 2014 (r263816) +++ stable/9/sys/dev/drm2/drm_fb_helper.c Thu Mar 27 15:58:18 2014 (r263817) @@ -36,6 +36,41 @@ __FBSDID("$FreeBSD$"); #include #include +#if defined(__FreeBSD__) +struct vt_kms_softc { + struct drm_fb_helper *fb_helper; + struct task fb_mode_task; +}; + +static fb_enter_t vt_kms_postswitch; +static void vt_restore_fbdev_mode(void *, int); + +/* Call restore out of vt(9) locks. */ +static void +vt_restore_fbdev_mode(void *arg, int pending) +{ + struct drm_fb_helper *fb_helper; + struct vt_kms_softc *sc; + + sc = (struct vt_kms_softc *)arg; + fb_helper = sc->fb_helper; + sx_xlock(&fb_helper->dev->mode_config.mutex); + drm_fb_helper_restore_fbdev_mode(fb_helper); + sx_xunlock(&fb_helper->dev->mode_config.mutex); +} + +static int +vt_kms_postswitch(void *arg) +{ + struct vt_kms_softc *sc; + + sc = (struct vt_kms_softc *)arg; + taskqueue_enqueue_fast(taskqueue_thread, &sc->fb_mode_task); + + return (0); +} +#endif + static DRM_LIST_HEAD(kernel_fb_helper_list); /* simple single crtc case helper function */ @@ -216,6 +251,10 @@ static int fb_get_options(const char *connector_name, char **option) { + /* + * TODO: store mode options pointer in ${option} for connector with + * name ${connector_name} + */ return (1); } @@ -892,11 +931,13 @@ int drm_fb_helper_single_fb_probe(struct int new_fb = 0; int crtc_count = 0; int i; -#if 0 struct fb_info *info; -#endif struct drm_fb_helper_surface_size sizes; int gamma_size = 0; +#if defined(__FreeBSD__) + struct vt_kms_softc *sc; + device_t kdev; +#endif memset(&sizes, 0, sizeof(struct drm_fb_helper_surface_size)); sizes.surface_depth = 24; @@ -973,8 +1014,21 @@ int drm_fb_helper_single_fb_probe(struct if (new_fb < 0) return new_fb; -#if 0 +#if defined(__FreeBSD__) + sc = malloc(sizeof(struct vt_kms_softc), DRM_MEM_KMS, + M_WAITOK | M_ZERO); + sc->fb_helper = fb_helper; + TASK_INIT(&sc->fb_mode_task, 0, vt_restore_fbdev_mode, sc); + info = fb_helper->fbdev; + + info->fb_name = device_get_nameunit(fb_helper->dev->device); + info->fb_depth = fb_helper->fb->bits_per_pixel; + info->fb_height = fb_helper->fb->height; + info->fb_width = fb_helper->fb->width; + info->fb_stride = fb_helper->fb->pitches[0]; + info->fb_priv = sc; + info->enter = &vt_kms_postswitch; #endif /* set the fb pointer */ @@ -982,7 +1036,23 @@ int drm_fb_helper_single_fb_probe(struct fb_helper->crtc_info[i].mode_set.fb = fb_helper->fb; } -#if 0 +#if defined(__FreeBSD__) + 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); + else + ret = ENODEV; +#ifdef DEV_VT + if (ret != 0) + DRM_ERROR("Failed to attach fbd device: %d\n", ret); +#endif + } +#else if (new_fb) { info->var.pixclock = 0; if (register_framebuffer(info) < 0) { @@ -1006,7 +1076,6 @@ int drm_fb_helper_single_fb_probe(struct if (new_fb) list_add(&fb_helper->kernel_fb_list, &kernel_fb_helper_list); #endif - return 0; } Modified: stable/9/sys/dev/drm2/drm_os_freebsd.h ============================================================================== --- stable/9/sys/dev/drm2/drm_os_freebsd.h Thu Mar 27 14:07:36 2014 (r263816) +++ stable/9/sys/dev/drm2/drm_os_freebsd.h Thu Mar 27 15:58:18 2014 (r263817) @@ -6,6 +6,8 @@ #include __FBSDID("$FreeBSD$"); +#include + #if _BYTE_ORDER == _BIG_ENDIAN #define __BIG_ENDIAN 4321 #else Modified: stable/9/sys/dev/drm2/i915/i915_drv.c ============================================================================== --- stable/9/sys/dev/drm2/i915/i915_drv.c Thu Mar 27 14:07:36 2014 (r263816) +++ stable/9/sys/dev/drm2/i915/i915_drv.c Thu Mar 27 15:58:18 2014 (r263817) @@ -40,6 +40,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include "fb_if.h" + /* drv_PCI_IDs comes from drm_pciids.h, generated from drm_pciids.txt. */ static drm_pci_id_list_t i915_pciidlist[] = { i915_PCI_IDS @@ -380,6 +382,25 @@ i915_attach(device_t kdev) return (drm_attach(kdev, i915_pciidlist)); } +static struct fb_info * +i915_fb_helper_getinfo(device_t kdev) +{ + struct intel_fbdev *ifbdev; + drm_i915_private_t *dev_priv; + struct drm_device *dev; + struct fb_info *info; + + dev = device_get_softc(kdev); + dev_priv = dev->dev_private; + ifbdev = dev_priv->fbdev; + if (ifbdev == NULL) + return (NULL); + + info = ifbdev->helper.fbdev; + + return (info); +} + const struct intel_device_info * i915_get_device_id(int device) { @@ -400,6 +421,10 @@ static device_method_t i915_methods[] = DEVMETHOD(device_suspend, i915_suspend), DEVMETHOD(device_resume, i915_resume), DEVMETHOD(device_detach, drm_detach), + + /* Framebuffer service methods */ + DEVMETHOD(fb_getinfo, i915_fb_helper_getinfo), + DEVMETHOD_END }; Modified: stable/9/sys/dev/drm2/i915/intel_fb.c ============================================================================== --- stable/9/sys/dev/drm2/i915/intel_fb.c Thu Mar 27 14:07:36 2014 (r263816) +++ stable/9/sys/dev/drm2/i915/intel_fb.c Thu Mar 27 15:58:18 2014 (r263817) @@ -41,8 +41,8 @@ static int intelfb_create(struct intel_f struct drm_device *dev = ifbdev->helper.dev; #if 0 struct drm_i915_private *dev_priv = dev->dev_private; - struct fb_info *info; #endif + struct fb_info *info; struct drm_framebuffer *fb; struct drm_mode_fb_cmd2 mode_cmd; struct drm_i915_gem_object *obj; @@ -86,6 +86,16 @@ static int intelfb_create(struct intel_f } info->par = ifbdev; +#else + info = malloc(sizeof(struct fb_info), DRM_MEM_KMS, M_WAITOK | M_ZERO); + info->fb_size = size; + info->fb_bpp = sizes->surface_bpp; + info->fb_width = sizes->fb_width; + info->fb_height = sizes->fb_height; + info->fb_pbase = dev->agp->base + obj->gtt_offset; + info->fb_vbase = (vm_offset_t)pmap_mapdev_attr(info->fb_pbase, size, + PAT_WRITE_COMBINING); + #endif ret = intel_framebuffer_init(dev, &ifbdev->ifb, &mode_cmd, obj); @@ -95,8 +105,8 @@ static int intelfb_create(struct intel_f fb = &ifbdev->ifb.base; ifbdev->helper.fb = fb; -#if 0 ifbdev->helper.fbdev = info; +#if 0 strcpy(info->fix.id, "inteldrmfb"); @@ -135,9 +145,8 @@ static int intelfb_create(struct intel_f /* Use default scratch pixmap (info->pixmap.flags = FB_PIXMAP_SYSTEM) */ #endif - - DRM_DEBUG_KMS("allocated %dx%d fb: 0x%08x, bo %p\n", - fb->width, fb->height, + DRM_DEBUG_KMS("allocated %dx%d (s %dbits) fb: 0x%08x, bo %p\n", + fb->width, fb->height, fb->depth, obj->gtt_offset, obj); DRM_UNLOCK(dev); Modified: stable/9/sys/dev/drm2/radeon/radeon.h ============================================================================== --- stable/9/sys/dev/drm2/radeon/radeon.h Thu Mar 27 14:07:36 2014 (r263816) +++ stable/9/sys/dev/drm2/radeon/radeon.h Thu Mar 27 15:58:18 2014 (r263817) @@ -2041,6 +2041,9 @@ void radeon_pm_acpi_event_handler(struct int radeon_ttm_init(struct radeon_device *rdev); void radeon_ttm_fini(struct radeon_device *rdev); +/* radeon_fb.c */ +struct fb_info * radeon_fb_helper_getinfo(device_t kdev); + /* r600.c */ int r600_ih_ring_alloc(struct radeon_device *rdev); void r600_ih_ring_fini(struct radeon_device *rdev); Modified: stable/9/sys/dev/drm2/radeon/radeon_drv.c ============================================================================== --- stable/9/sys/dev/drm2/radeon/radeon_drv.c Thu Mar 27 14:07:36 2014 (r263816) +++ stable/9/sys/dev/drm2/radeon/radeon_drv.c Thu Mar 27 15:58:18 2014 (r263817) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include +#include "fb_if.h" /* * KMS wrapper. @@ -495,6 +496,8 @@ radeon_resume(device_t kdev) return (-ret); } +extern struct fb_info * radeon_fb_helper_getinfo(device_t kdev); + static device_method_t radeon_methods[] = { /* Device interface */ DEVMETHOD(device_probe, radeon_probe), @@ -502,6 +505,10 @@ static device_method_t radeon_methods[] DEVMETHOD(device_suspend, radeon_suspend), DEVMETHOD(device_resume, radeon_resume), DEVMETHOD(device_detach, drm_detach), + + /* Framebuffer service methods */ + DEVMETHOD(fb_getinfo, radeon_fb_helper_getinfo), + DEVMETHOD_END }; Modified: stable/9/sys/dev/drm2/radeon/radeon_fb.c ============================================================================== --- stable/9/sys/dev/drm2/radeon/radeon_fb.c Thu Mar 27 14:07:36 2014 (r263816) +++ stable/9/sys/dev/drm2/radeon/radeon_fb.c Thu Mar 27 15:58:18 2014 (r263817) @@ -27,6 +27,8 @@ #include __FBSDID("$FreeBSD$"); +#include + #include #include #include @@ -46,7 +48,7 @@ struct radeon_fbdev { struct radeon_device *rdev; }; -#ifdef DUMBBELL_WIP +#if defined(__linux__) static struct fb_ops radeonfb_ops = { .owner = THIS_MODULE, .fb_check_var = drm_fb_helper_check_var, @@ -60,7 +62,7 @@ static struct fb_ops radeonfb_ops = { .fb_debug_enter = drm_fb_helper_debug_enter, .fb_debug_leave = drm_fb_helper_debug_leave, }; -#endif /* DUMBBELL_WIP */ +#endif int radeon_align_pitch(struct radeon_device *rdev, int width, int bpp, bool tiled) @@ -191,20 +193,13 @@ static int radeonfb_create(struct radeon struct drm_fb_helper_surface_size *sizes) { struct radeon_device *rdev = rfbdev->rdev; -#ifdef DUMBBELL_WIP struct fb_info *info; -#endif /* DUMBBELL_WIP */ struct drm_framebuffer *fb = NULL; struct drm_mode_fb_cmd2 mode_cmd; struct drm_gem_object *gobj = NULL; struct radeon_bo *rbo = NULL; -#ifdef DUMBBELL_WIP - device_t device = rdev->dev; -#endif /* DUMBBELL_WIP */ int ret; -#ifdef DUMBBELL_WIP unsigned long tmp; -#endif /* DUMBBELL_WIP */ mode_cmd.width = sizes->surface_width; mode_cmd.height = sizes->surface_height; @@ -224,16 +219,7 @@ static int radeonfb_create(struct radeon rbo = gem_to_radeon_bo(gobj); -#ifdef DUMBBELL_WIP - /* okay we have an object now allocate the framebuffer */ - info = framebuffer_alloc(0, device); - if (info == NULL) { - ret = -ENOMEM; - goto out_unref; - } - - info->par = rfbdev; -#endif /* DUMBBELL_WIP */ + info = malloc(sizeof(*info), DRM_MEM_KMS, M_WAITOK | M_ZERO); ret = radeon_framebuffer_init(rdev->ddev, &rfbdev->rfb, &mode_cmd, gobj); if (ret) { @@ -245,61 +231,29 @@ static int radeonfb_create(struct radeon /* setup helper */ rfbdev->helper.fb = fb; -#ifdef DUMBBELL_WIP rfbdev->helper.fbdev = info; - memset_io(rbo->kptr, 0x0, radeon_bo_size(rbo)); - - strcpy(info->fix.id, "radeondrmfb"); - - drm_fb_helper_fill_fix(info, fb->pitches[0], fb->depth); - - info->flags = FBINFO_DEFAULT | FBINFO_CAN_FORCE_OUTPUT; - info->fbops = &radeonfb_ops; + memset(rbo->kptr, 0x0, radeon_bo_size(rbo)); tmp = radeon_bo_gpu_offset(rbo) - rdev->mc.vram_start; - info->fix.smem_start = rdev->mc.aper_base + tmp; - info->fix.smem_len = radeon_bo_size(rbo); - info->screen_base = rbo->kptr; - info->screen_size = radeon_bo_size(rbo); - - drm_fb_helper_fill_var(info, &rfbdev->helper, sizes->fb_width, sizes->fb_height); - - /* setup aperture base/size for vesafb takeover */ - info->apertures = alloc_apertures(1); - if (!info->apertures) { - ret = -ENOMEM; - goto out_unref; - } - info->apertures->ranges[0].base = rdev->ddev->mode_config.fb_base; - info->apertures->ranges[0].size = rdev->mc.aper_size; + info->fb_size = radeon_bo_size(rbo); + info->fb_bpp = sizes->surface_bpp; + info->fb_width = sizes->surface_width; + info->fb_height = sizes->surface_height; + info->fb_pbase = rdev->mc.aper_base + tmp; + info->fb_vbase = (vm_offset_t)rbo->kptr; - /* Use default scratch pixmap (info->pixmap.flags = FB_PIXMAP_SYSTEM) */ - - if (info->screen_base == NULL) { - ret = -ENOSPC; - goto out_unref; - } - - ret = fb_alloc_cmap(&info->cmap, 256, 0); - if (ret) { - ret = -ENOMEM; - goto out_unref; - } - - DRM_INFO("fb mappable at 0x%lX\n", info->fix.smem_start); + DRM_INFO("fb mappable at 0x%" PRIXPTR "\n", info->fb_pbase); DRM_INFO("vram apper at 0x%lX\n", (unsigned long)rdev->mc.aper_base); DRM_INFO("size %lu\n", (unsigned long)radeon_bo_size(rbo)); DRM_INFO("fb depth is %d\n", fb->depth); DRM_INFO(" pitch is %d\n", fb->pitches[0]); - vga_switcheroo_client_fb_set(rdev->ddev->pdev, info); -#endif /* DUMBBELL_WIP */ return 0; out_unref: if (rbo) { - + /* TODO? dumbbell@ */ } if (fb && ret) { drm_gem_object_unreference(gobj); @@ -332,21 +286,13 @@ void radeon_fb_output_poll_changed(struc static int radeon_fbdev_destroy(struct drm_device *dev, struct radeon_fbdev *rfbdev) { -#ifdef DUMBBELL_WIP struct fb_info *info; -#endif /* DUMBBELL_WIP */ struct radeon_framebuffer *rfb = &rfbdev->rfb; -#ifdef DUMBBELL_WIP if (rfbdev->helper.fbdev) { info = rfbdev->helper.fbdev; - - unregister_framebuffer(info); - if (info->cmap.len) - fb_dealloc_cmap(&info->cmap); - framebuffer_release(info); + free(info, DRM_MEM_KMS); } -#endif /* DUMBBELL_WIP */ if (rfb->obj) { DRM_UNLOCK(dev); /* Work around lock recursion. dumbbell@ */ @@ -431,3 +377,22 @@ bool radeon_fbdev_robj_is_fb(struct rade return true; return false; } + +struct fb_info * +radeon_fb_helper_getinfo(device_t kdev) +{ + struct drm_device *dev; + struct radeon_device *rdev; + struct radeon_fbdev *rfbdev; + struct fb_info *info; + + dev = device_get_softc(kdev); + rdev = dev->dev_private; + rfbdev = rdev->mode_info.rfbdev; + if (rfbdev == NULL) + return (NULL); + + info = rfbdev->helper.fbdev; + + return (info); +} Modified: stable/9/sys/dev/drm2/radeon/radeon_pm.c ============================================================================== --- stable/9/sys/dev/drm2/radeon/radeon_pm.c Thu Mar 27 14:07:36 2014 (r263816) +++ stable/9/sys/dev/drm2/radeon/radeon_pm.c Thu Mar 27 15:58:18 2014 (r263817) @@ -248,7 +248,7 @@ static void radeon_pm_set_clocks(struct (rdev->pm.requested_power_state_index == rdev->pm.current_power_state_index)) return; - DRM_LOCK(rdev->ddev); + //DRM_LOCK(rdev->ddev); XXX Recursion, already locked in drm_attach/drm_load -- dumbbell@ sx_xlock(&rdev->pm.mclk_lock); sx_xlock(&rdev->ring_lock); @@ -263,7 +263,7 @@ static void radeon_pm_set_clocks(struct /* needs a GPU reset dont reset here */ sx_xunlock(&rdev->ring_lock); sx_xunlock(&rdev->pm.mclk_lock); - DRM_UNLOCK(rdev->ddev); + //DRM_UNLOCK(rdev->ddev); XXX Recursion, already locked in drm_attach/drm_load -- dumbbell@ return; } } @@ -299,7 +299,7 @@ static void radeon_pm_set_clocks(struct sx_xunlock(&rdev->ring_lock); sx_xunlock(&rdev->pm.mclk_lock); - DRM_UNLOCK(rdev->ddev); + //DRM_UNLOCK(rdev->ddev); XXX Recursion, already locked in drm_attach/drm_load -- dumbbell@ } static void radeon_pm_print_states(struct radeon_device *rdev) Copied: stable/9/sys/dev/fb/fb_if.m (from r259016, head/sys/dev/fb/fb_if.m) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/sys/dev/fb/fb_if.m Thu Mar 27 15:58:18 2014 (r263817, copy of r259016, head/sys/dev/fb/fb_if.m) @@ -0,0 +1,13 @@ +#include +#include + +INTERFACE fb; + +METHOD int pin_max { + device_t dev; + int *npins; +}; + +METHOD struct fb_info * getinfo { + device_t dev; +}; Copied and modified: stable/9/sys/dev/fb/fbd.c (from r259016, head/sys/dev/fb/fbd.c) ============================================================================== --- head/sys/dev/fb/fbd.c Thu Dec 5 22:38:53 2013 (r259016, copy source) +++ stable/9/sys/dev/fb/fbd.c Thu Mar 27 15:58:18 2014 (r263817) @@ -255,8 +255,12 @@ fb_probe(struct fb_info *info) info->wr4 = &vt_fb_indir_wr4; info->copy = &vt_fb_indir_copy; } else if (info->fb_vbase != 0) { - if (info->fb_pbase == 0) + if (info->fb_pbase == 0) { info->fb_flags |= FB_FLAG_NOMMAP; + } else { + if (info->fb_mmap == NULL) + info->fb_mmap = &fb_mmap; + } info->wr1 = &vt_fb_mem_wr1; info->wr2 = &vt_fb_mem_wr2; info->wr4 = &vt_fb_mem_wr4; @@ -264,6 +268,10 @@ fb_probe(struct fb_info *info) } else return (ENXIO); + if (info->fb_ioctl == NULL) + info->fb_ioctl = &fb_ioctl; + + return (0); } @@ -277,6 +285,7 @@ fb_init(struct fb_list_entry *entry, int entry->fb_si = make_dev(&fb_cdevsw, unit, UID_ROOT, GID_WHEEL, 0600, "fb%d", unit); entry->fb_si->si_drv1 = info; + info->fb_cdev = entry->fb_si; return (0); } Modified: stable/9/sys/dev/syscons/scterm-teken.c ============================================================================== --- stable/9/sys/dev/syscons/scterm-teken.c Thu Mar 27 14:07:36 2014 (r263816) +++ stable/9/sys/dev/syscons/scterm-teken.c Thu Mar 27 15:58:18 2014 (r263817) @@ -542,7 +542,14 @@ scteken_putchar(void *arg, const teken_p vm_offset_t p; int cursor, attr; + /* + * No support for printing right hand sides for CJK fullwidth + * characters. Simply print a space and assume that the left + * hand side describes the entire character. + */ attr = scteken_attr(a) << 8; + if (a->ta_format & TF_CJK_RIGHT) + c = ' '; #ifdef TEKEN_UTF8 scteken_get_cp437(&c, &attr); #endif /* TEKEN_UTF8 */ Modified: stable/9/sys/dev/syscons/scvidctl.c ============================================================================== --- stable/9/sys/dev/syscons/scvidctl.c Thu Mar 27 14:07:36 2014 (r263816) +++ stable/9/sys/dev/syscons/scvidctl.c Thu Mar 27 15:58:18 2014 (r263817) @@ -137,6 +137,7 @@ sc_set_text_mode(scr_stat *scp, struct t int fontsize, int fontwidth) { video_info_t info; + struct winsize wsz; u_char *font; int prev_ysize; int error; @@ -234,16 +235,9 @@ sc_set_text_mode(scr_stat *scp, struct t if (tp == NULL) return 0; - DPRINTF(5, ("ws_*size (%d,%d), size (%d,%d)\n", - tp->t_winsize.ws_col, tp->t_winsize.ws_row, scp->xsize, scp->ysize)); - if (tp->t_winsize.ws_col != scp->xsize - || tp->t_winsize.ws_row != scp->ysize) { - tp->t_winsize.ws_col = scp->xsize; - tp->t_winsize.ws_row = scp->ysize; - - tty_signal_pgrp(tp, SIGWINCH); - } - + wsz.ws_col = scp->xsize; + wsz.ws_row = scp->ysize; + tty_set_winsize(tp, &wsz); return 0; } @@ -254,6 +248,7 @@ sc_set_graphics_mode(scr_stat *scp, stru return ENODEV; #else video_info_t info; + struct winsize wsz; int error; int s; @@ -300,14 +295,9 @@ sc_set_graphics_mode(scr_stat *scp, stru if (tp == NULL) return 0; - if (tp->t_winsize.ws_xpixel != scp->xpixel - || tp->t_winsize.ws_ypixel != scp->ypixel) { - tp->t_winsize.ws_xpixel = scp->xpixel; - tp->t_winsize.ws_ypixel = scp->ypixel; - - tty_signal_pgrp(tp, SIGWINCH); - } - + wsz.ws_col = scp->xsize; + wsz.ws_row = scp->ysize; + tty_set_winsize(tp, &wsz); return 0; #endif /* SC_NO_MODE_CHANGE */ } @@ -320,7 +310,7 @@ sc_set_pixel_mode(scr_stat *scp, struct return ENODEV; #else video_info_t info; - ksiginfo_t ksi; + struct winsize wsz; u_char *font; int prev_ysize; int error; @@ -425,20 +415,9 @@ sc_set_pixel_mode(scr_stat *scp, struct if (tp == NULL) return 0; - if (tp->t_winsize.ws_col != scp->xsize - || tp->t_winsize.ws_row != scp->ysize) { - tp->t_winsize.ws_col = scp->xsize; - tp->t_winsize.ws_row = scp->ysize; - if (tp->t_pgrp != NULL) { - ksiginfo_init(&ksi); - ksi.ksi_signo = SIGWINCH; - ksi.ksi_code = SI_KERNEL; - PGRP_LOCK(tp->t_pgrp); - pgsignal(tp->t_pgrp, SIGWINCH, 1, &ksi); - PGRP_UNLOCK(tp->t_pgrp); - } - } - + wsz.ws_col = scp->xsize; + wsz.ws_row = scp->ysize; + tty_set_winsize(tp, &wsz); return 0; #endif /* SC_PIXEL_MODE */ } Modified: stable/9/sys/dev/vt/font/vt_font_default.c ============================================================================== --- head/sys/dev/vt/font/vt_font_default.c Thu Dec 5 22:38:53 2013 (r259016) +++ stable/9/sys/dev/vt/font/vt_font_default.c Thu Mar 27 15:58:18 2014 (r263817) @@ -2194,9 +2194,12 @@ struct vt_font vt_font_default = { .vf_width = 8, .vf_height = 16, .vf_bytes = font_bytes, - .vf_normal = font_mapping_normal, - .vf_normal_length = 248, - .vf_bold = font_mapping_bold, - .vf_bold_length = 260, + .vf_map = { + font_mapping_normal, + NULL, + font_mapping_bold, + NULL, + }, + .vf_map_count = { 248, 0, 260, 0 }, .vf_refcount = 1, }; Modified: stable/9/sys/dev/vt/font/vt_mouse_cursor.c ============================================================================== --- head/sys/dev/vt/font/vt_mouse_cursor.c Thu Dec 5 22:38:53 2013 (r259016) +++ stable/9/sys/dev/vt/font/vt_mouse_cursor.c Thu Mar 27 15:58:18 2014 (r263817) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include +#ifndef SC_NO_CUTPASTE struct mouse_cursor vt_default_mouse_pointer = { .map = { 0x00, /* "__ " */ @@ -66,3 +67,4 @@ struct mouse_cursor vt_default_mouse_poi .w = 8, .h = 13, }; +#endif Modified: stable/9/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- head/sys/dev/vt/hw/fb/vt_fb.c Thu Dec 5 22:38:53 2013 (r259016) +++ stable/9/sys/dev/vt/hw/fb/vt_fb.c Thu Mar 27 15:58:18 2014 (r263817) @@ -41,14 +41,103 @@ __FBSDID("$FreeBSD$"); #include #include +static int vt_fb_ioctl(struct vt_device *vd, u_long cmd, caddr_t data, + struct thread *td); +static int vt_fb_mmap(struct vt_device *vd, vm_ooffset_t offset, + vm_paddr_t *paddr, int prot, vm_memattr_t *memattr); +void vt_fb_drawrect(struct vt_device *vd, int x1, int y1, int x2, int y2, + int fill, term_color_t color); +void vt_fb_setpixel(struct vt_device *vd, int x, int y, term_color_t color); + static struct vt_driver vt_fb_driver = { .vd_init = vt_fb_init, .vd_blank = vt_fb_blank, .vd_bitbltchr = vt_fb_bitbltchr, + .vd_drawrect = vt_fb_drawrect, + .vd_setpixel = vt_fb_setpixel, .vd_postswitch = vt_fb_postswitch, .vd_priority = VD_PRIORITY_GENERIC+10, + .vd_fb_ioctl = vt_fb_ioctl, + .vd_fb_mmap = vt_fb_mmap, }; +static int +vt_fb_ioctl(struct vt_device *vd, u_long cmd, caddr_t data, struct thread *td) +{ + struct fb_info *info; + + info = vd->vd_softc; + + if (info->fb_ioctl == NULL) + return (-1); + + return (info->fb_ioctl(info->fb_cdev, cmd, data, 0, td)); +} + +static int +vt_fb_mmap(struct vt_device *vd, vm_ooffset_t offset, vm_paddr_t *paddr, + int prot, vm_memattr_t *memattr) +{ + struct fb_info *info; + + info = vd->vd_softc; + + if (info->fb_ioctl == NULL) + return (ENXIO); + + return (info->fb_mmap(info->fb_cdev, offset, paddr, prot, memattr)); +} + +void +vt_fb_setpixel(struct vt_device *vd, int x, int y, term_color_t color) +{ + struct fb_info *info; + uint32_t c; + u_int o; + + info = vd->vd_softc; + c = info->fb_cmap[color]; + o = info->fb_stride * y + x * FBTYPE_GET_BYTESPP(info); + + switch (FBTYPE_GET_BYTESPP(info)) { + case 1: + info->wr1(info, o, c); + break; + case 2: + info->wr2(info, o, c); + break; + case 3: + info->wr1(info, o, (c >> 16) & 0xff); + info->wr1(info, o + 1, (c >> 8) & 0xff); + info->wr1(info, o + 2, c & 0xff); + break; + case 4: + info->wr4(info, o, c); + break; + default: + /* panic? */ + return; + } + +} + +void +vt_fb_drawrect(struct vt_device *vd, int x1, int y1, int x2, int y2, int fill, + term_color_t color) +{ + int x, y; + + for (y = y1; y <= y2; y++) { + if (fill || (y == y1) || (y == y2)) { + for (x = x1; x <= x2; x++) + vt_fb_setpixel(vd, x, y, color); + } else { + vt_fb_setpixel(vd, x1, y, color); + vt_fb_setpixel(vd, x2, y, color); + } + } +} + void vt_fb_blank(struct vt_device *vd, term_color_t color) { Modified: stable/9/sys/dev/vt/hw/ofwfb/ofwfb.c ============================================================================== --- head/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Dec 5 22:38:53 2013 (r259016) +++ stable/9/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Mar 27 15:58:18 2014 (r263817) @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: user/ed/newcons/sys/dev/vt/hw/ofwfb/ofwfb.c 219888 2011-03-22 21:31:31Z ed $"); +__FBSDID("$FreeBSD$"); #include #include @@ -78,17 +78,19 @@ static void ofwfb_blank(struct vt_device *vd, term_color_t color) { struct ofwfb_softc *sc = vd->vd_softc; - u_int ofs; + u_int ofs, size; uint32_t c; + size = sc->sc_stride * vd->vd_height; switch (sc->sc_depth) { case 8: - for (ofs = 0; ofs < sc->sc_stride*vd->vd_height; ofs++) - *(uint8_t *)(sc->sc_addr + ofs) = color; + c = (color << 24) | (color << 16) | (color << 8) | color; + for (ofs = 0; ofs < size/4; ofs++) + *(uint32_t *)(sc->sc_addr + 4*ofs) = c; break; case 32: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu Mar 27 16:00:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 25D44E8E; Thu, 27 Mar 2014 16:00:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1281B1AB; Thu, 27 Mar 2014 16:00:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2RG0rmp054986; Thu, 27 Mar 2014 16:00:53 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2RG0r9h054985; Thu, 27 Mar 2014 16:00:53 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201403271600.s2RG0r9h054985@svn.freebsd.org> From: Aleksandr Rybalko Date: Thu, 27 Mar 2014 16:00:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263818 - stable/9/sys/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 16:00:54 -0000 Author: ray Date: Thu Mar 27 16:00:53 2014 New Revision: 263818 URL: http://svnweb.freebsd.org/changeset/base/263818 Log: Bump __FreeBSD_version to reflect presence ov vt(4). Sponsored by: The FreeBSD Foundation Modified: stable/9/sys/sys/param.h Modified: stable/9/sys/sys/param.h ============================================================================== --- stable/9/sys/sys/param.h Thu Mar 27 15:58:18 2014 (r263817) +++ stable/9/sys/sys/param.h Thu Mar 27 16:00:53 2014 (r263818) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 902509 /* Master, propagated to newvers */ +#define __FreeBSD_version 902510 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-stable@FreeBSD.ORG Thu Mar 27 16:28:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8F2207A9; Thu, 27 Mar 2014 16:28:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B6FF65A; Thu, 27 Mar 2014 16:28:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2RGSld2065282; Thu, 27 Mar 2014 16:28:47 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2RGSlCf065281; Thu, 27 Mar 2014 16:28:47 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403271628.s2RGSlCf065281@svn.freebsd.org> From: Glen Barber Date: Thu, 27 Mar 2014 16:28:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263819 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 16:28:47 -0000 Author: gjb Date: Thu Mar 27 16:28:46 2014 New Revision: 263819 URL: http://svnweb.freebsd.org/changeset/base/263819 Log: Document r263817, r263818. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Mar 27 16:00:53 2014 (r263818) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Mar 27 16:28:46 2014 (r263819) @@ -265,6 +265,9 @@ A memory leak has been fixed in libzfs. + The vt driver + has been merged from head/. + Boot Loader Changes From owner-svn-src-stable@FreeBSD.ORG Thu Mar 27 16:47:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 61680C5; Thu, 27 Mar 2014 16:47:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41A3C89D; Thu, 27 Mar 2014 16:47:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2RGlaND073516; Thu, 27 Mar 2014 16:47:36 GMT (envelope-from asomers@svn.freebsd.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2RGlZtS073511; Thu, 27 Mar 2014 16:47:35 GMT (envelope-from asomers@svn.freebsd.org) Message-Id: <201403271647.s2RGlZtS073511@svn.freebsd.org> From: Alan Somers Date: Thu, 27 Mar 2014 16:47:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263820 - in stable/10: sys/kern sys/sys tests/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 16:47:36 -0000 Author: asomers Date: Thu Mar 27 16:47:35 2014 New Revision: 263820 URL: http://svnweb.freebsd.org/changeset/base/263820 Log: MFC r262867 Fix PR kern/185813 "SOCK_SEQPACKET AF_UNIX sockets with asymmetrical buffers drop packets". It was caused by a check for the space available in a sockbuf, but it was checking the wrong sockbuf. sys/sys/sockbuf.h sys/kern/uipc_sockbuf.c Add sbappendaddr_nospacecheck_locked(), which is just like sbappendaddr_locked but doesn't validate the receiving socket's space. Factor out common code into sbappendaddr_locked_internal(). We shouldn't simply make sbappendaddr_locked check the space and then call sbappendaddr_nospacecheck_locked, because that would cause the O(n) function m_length to be called twice. sys/kern/uipc_usrreq.c Use sbappendaddr_nospacecheck_locked for SOCK_SEQPACKET sockets, because the receiving sockbuf's size limit is irrelevant. tests/sys/kern/unix_seqpacket_test.c Now that 185813 is fixed, pipe_128k_8k fails intermittently due to 185812. Make it fail every time by adding a usleep after starting the writer thread and before starting the reader thread in test_pipe. That gives the writer time to fill up its send buffer. Also, clear the expected failure message due to 185813. It actually said "185812", but that was a typo. PR: kern/185813 Modified: stable/10/sys/kern/uipc_sockbuf.c stable/10/sys/kern/uipc_usrreq.c stable/10/sys/sys/sockbuf.h stable/10/tests/sys/kern/unix_seqpacket_test.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/uipc_sockbuf.c ============================================================================== --- stable/10/sys/kern/uipc_sockbuf.c Thu Mar 27 16:28:46 2014 (r263819) +++ stable/10/sys/kern/uipc_sockbuf.c Thu Mar 27 16:47:35 2014 (r263820) @@ -620,29 +620,12 @@ sbappendrecord(struct sockbuf *sb, struc SOCKBUF_UNLOCK(sb); } -/* - * Append address and data, and optionally, control (ancillary) data to the - * receive queue of a socket. If present, m0 must include a packet header - * with total length. Returns 0 if no space in sockbuf or insufficient - * mbufs. - */ -int -sbappendaddr_locked(struct sockbuf *sb, const struct sockaddr *asa, - struct mbuf *m0, struct mbuf *control) +/* Helper routine that appends data, control, and address to a sockbuf. */ +static int +sbappendaddr_locked_internal(struct sockbuf *sb, const struct sockaddr *asa, + struct mbuf *m0, struct mbuf *control, struct mbuf *ctrl_last) { struct mbuf *m, *n, *nlast; - int space = asa->sa_len; - - SOCKBUF_LOCK_ASSERT(sb); - - if (m0 && (m0->m_flags & M_PKTHDR) == 0) - panic("sbappendaddr_locked"); - if (m0) - space += m0->m_pkthdr.len; - space += m_length(control, &n); - - if (space > sbspace(sb)) - return (0); #if MSIZE <= 256 if (asa->sa_len > MLEN) return (0); @@ -652,8 +635,8 @@ sbappendaddr_locked(struct sockbuf *sb, return (0); m->m_len = asa->sa_len; bcopy(asa, mtod(m, caddr_t), asa->sa_len); - if (n) - n->m_next = m0; /* concatenate data to control */ + if (ctrl_last) + ctrl_last->m_next = m0; /* concatenate data to control */ else control = m0; m->m_next = control; @@ -677,6 +660,50 @@ sbappendaddr_locked(struct sockbuf *sb, * mbufs. */ int +sbappendaddr_locked(struct sockbuf *sb, const struct sockaddr *asa, + struct mbuf *m0, struct mbuf *control) +{ + struct mbuf *ctrl_last; + int space = asa->sa_len; + + SOCKBUF_LOCK_ASSERT(sb); + + if (m0 && (m0->m_flags & M_PKTHDR) == 0) + panic("sbappendaddr_locked"); + if (m0) + space += m0->m_pkthdr.len; + space += m_length(control, &ctrl_last); + + if (space > sbspace(sb)) + return (0); + return (sbappendaddr_locked_internal(sb, asa, m0, control, ctrl_last)); +} + +/* + * Append address and data, and optionally, control (ancillary) data to the + * receive queue of a socket. If present, m0 must include a packet header + * with total length. Returns 0 if insufficient mbufs. Does not validate space + * on the receiving sockbuf. + */ +int +sbappendaddr_nospacecheck_locked(struct sockbuf *sb, const struct sockaddr *asa, + struct mbuf *m0, struct mbuf *control) +{ + struct mbuf *ctrl_last; + + SOCKBUF_LOCK_ASSERT(sb); + + ctrl_last = (control == NULL) ? NULL : m_last(control); + return (sbappendaddr_locked_internal(sb, asa, m0, control, ctrl_last)); +} + +/* + * Append address and data, and optionally, control (ancillary) data to the + * receive queue of a socket. If present, m0 must include a packet header + * with total length. Returns 0 if no space in sockbuf or insufficient + * mbufs. + */ +int sbappendaddr(struct sockbuf *sb, const struct sockaddr *asa, struct mbuf *m0, struct mbuf *control) { Modified: stable/10/sys/kern/uipc_usrreq.c ============================================================================== --- stable/10/sys/kern/uipc_usrreq.c Thu Mar 27 16:28:46 2014 (r263819) +++ stable/10/sys/kern/uipc_usrreq.c Thu Mar 27 16:47:35 2014 (r263820) @@ -892,7 +892,8 @@ uipc_send(struct socket *so, int flags, from = &sun_noname; so2 = unp2->unp_socket; SOCKBUF_LOCK(&so2->so_rcv); - if (sbappendaddr_locked(&so2->so_rcv, from, m, control)) { + if (sbappendaddr_nospacecheck_locked(&so2->so_rcv, from, m, + control)) { sorwakeup_locked(so2); m = NULL; control = NULL; @@ -977,8 +978,14 @@ uipc_send(struct socket *so, int flags, const struct sockaddr *from; from = &sun_noname; - if (sbappendaddr_locked(&so2->so_rcv, from, m, - control)) + /* + * Don't check for space available in so2->so_rcv. + * Unix domain sockets only check for space in the + * sending sockbuf, and that check is performed one + * level up the stack. + */ + if (sbappendaddr_nospacecheck_locked(&so2->so_rcv, + from, m, control)) control = NULL; break; } Modified: stable/10/sys/sys/sockbuf.h ============================================================================== --- stable/10/sys/sys/sockbuf.h Thu Mar 27 16:28:46 2014 (r263819) +++ stable/10/sys/sys/sockbuf.h Thu Mar 27 16:47:35 2014 (r263820) @@ -127,6 +127,8 @@ int sbappendaddr(struct sockbuf *sb, con struct mbuf *m0, struct mbuf *control); int sbappendaddr_locked(struct sockbuf *sb, const struct sockaddr *asa, struct mbuf *m0, struct mbuf *control); +int sbappendaddr_nospacecheck_locked(struct sockbuf *sb, + const struct sockaddr *asa, struct mbuf *m0, struct mbuf *control); int sbappendcontrol(struct sockbuf *sb, struct mbuf *m0, struct mbuf *control); int sbappendcontrol_locked(struct sockbuf *sb, struct mbuf *m0, Modified: stable/10/tests/sys/kern/unix_seqpacket_test.c ============================================================================== --- stable/10/tests/sys/kern/unix_seqpacket_test.c Thu Mar 27 16:28:46 2014 (r263819) +++ stable/10/tests/sys/kern/unix_seqpacket_test.c Thu Mar 27 16:47:35 2014 (r263820) @@ -360,6 +360,12 @@ test_pipe(size_t sndbufsize, size_t rcvb reader_data.so = sv[1]; ATF_REQUIRE_EQ(0, pthread_create(&writer, NULL, test_pipe_writer, (void*)&writer_data)); + /* + * Give the writer time to start writing, and hopefully block, before + * starting the reader. This increases the likelihood of the test case + * failing due to PR kern/185812 + */ + usleep(1000); ATF_REQUIRE_EQ(0, pthread_create(&reader, NULL, test_pipe_reader, (void*)&reader_data)); @@ -946,7 +952,6 @@ ATF_TC_BODY(pipe_simulator_8k_128k, tc) ATF_TC_WITHOUT_HEAD(pipe_simulator_128k_8k); ATF_TC_BODY(pipe_simulator_128k_8k, tc) { - atf_tc_expect_fail("PR kern/185812 SOCK_SEQPACKET AF_UNIX sockets with asymmetrical buffers drop packets"); test_pipe_simulator(131072, 8192); } From owner-svn-src-stable@FreeBSD.ORG Thu Mar 27 16:55:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 954F76CE; Thu, 27 Mar 2014 16:55:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81DC298B; Thu, 27 Mar 2014 16:55:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2RGtDKr077362; Thu, 27 Mar 2014 16:55:13 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2RGtDu6077360; Thu, 27 Mar 2014 16:55:13 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403271655.s2RGtDu6077360@svn.freebsd.org> From: Glen Barber Date: Thu, 27 Mar 2014 16:55:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263821 - in stable/9/sys: amd64/conf i386/conf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 16:55:13 -0000 Author: gjb Date: Thu Mar 27 16:55:12 2014 New Revision: 263821 URL: http://svnweb.freebsd.org/changeset/base/263821 Log: Pull in the VT kernel configuration files, missed in r263817 (MFC r260888). This is a direct commit to stable/9, and the original mergeinfo already exists. Sponsored by: The FreeBSD Foundation Added: stable/9/sys/amd64/conf/VT - copied unchanged from r260888, head/sys/amd64/conf/VT stable/9/sys/i386/conf/VT - copied unchanged from r260888, head/sys/i386/conf/VT Copied: stable/9/sys/amd64/conf/VT (from r260888, head/sys/amd64/conf/VT) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/sys/amd64/conf/VT Thu Mar 27 16:55:12 2014 (r263821, copy of r260888, head/sys/amd64/conf/VT) @@ -0,0 +1,14 @@ +# VT -- kernel config using the vt(9) system console instead of legacy syscons +# +# For more information see https://wiki.freebsd.org/Newcons +# +# $FreeBSD$ + +include GENERIC +ident VT + +nodevice sc +nodevice vga + +device vt +device vt_vga Copied: stable/9/sys/i386/conf/VT (from r260888, head/sys/i386/conf/VT) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/sys/i386/conf/VT Thu Mar 27 16:55:12 2014 (r263821, copy of r260888, head/sys/i386/conf/VT) @@ -0,0 +1,14 @@ +# VT -- kernel config using the vt(9) system console instead of legacy syscons +# +# For more information see https://wiki.freebsd.org/Newcons +# +# $FreeBSD$ + +include GENERIC +ident VT + +nodevice sc +nodevice vga + +device vt +device vt_vga From owner-svn-src-stable@FreeBSD.ORG Thu Mar 27 19:04:16 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 186D998C; Thu, 27 Mar 2014 19:04:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 03AD2875; Thu, 27 Mar 2014 19:04:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2RJ4FXs030494; Thu, 27 Mar 2014 19:04:15 GMT (envelope-from asomers@svn.freebsd.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2RJ4Fsg030491; Thu, 27 Mar 2014 19:04:15 GMT (envelope-from asomers@svn.freebsd.org) Message-Id: <201403271904.s2RJ4Fsg030491@svn.freebsd.org> From: Alan Somers Date: Thu, 27 Mar 2014 19:04:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263823 - in stable/9/sys: kern sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 19:04:16 -0000 Author: asomers Date: Thu Mar 27 19:04:15 2014 New Revision: 263823 URL: http://svnweb.freebsd.org/changeset/base/263823 Log: MFC r258311 opensolaris/uts/common/dtrace/fasttrap.c Fix several problems that can cause panics on kldload and kldunload. * kproc_create(fasttrap_pid_cleanup_cb, ...) gets called before fasttrap_provs.fth_table gets allocated. This can lead to a panic on module load, because fasttrap_pid_cleanup_cb references fasttrap_provs.fth_table. Move kproc_create down after the point that fasttrap_provs.fth_table gets allocated, and modify the error handling accordingly. * dtrace_fasttrap_{fork,exec,exit} weren't getting NULLed until after fasttrap_provs.fth_table got freed. That caused panics on module unload because fasttrap_exec_exit calls fasttrap_provider_retire, which references fasttrap_provs.fth_table. NULL those function pointers earlier. * There wasn't any code to destroy the fasttrap_{tpoints,provs,procs}.fth_table mutexes on module unload, leading to a resource leak when WITNESS is enabled. Destroy those mutexes during fasttrap_unload(). Sponsored by: Spectra Logic Corporation Modified: stable/9/sys/kern/uipc_sockbuf.c stable/9/sys/kern/uipc_usrreq.c stable/9/sys/sys/sockbuf.h Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/kern/uipc_sockbuf.c ============================================================================== --- stable/9/sys/kern/uipc_sockbuf.c Thu Mar 27 18:23:02 2014 (r263822) +++ stable/9/sys/kern/uipc_sockbuf.c Thu Mar 27 19:04:15 2014 (r263823) @@ -617,29 +617,12 @@ sbappendrecord(struct sockbuf *sb, struc SOCKBUF_UNLOCK(sb); } -/* - * Append address and data, and optionally, control (ancillary) data to the - * receive queue of a socket. If present, m0 must include a packet header - * with total length. Returns 0 if no space in sockbuf or insufficient - * mbufs. - */ -int -sbappendaddr_locked(struct sockbuf *sb, const struct sockaddr *asa, - struct mbuf *m0, struct mbuf *control) +/* Helper routine that appends data, control, and address to a sockbuf. */ +static int +sbappendaddr_locked_internal(struct sockbuf *sb, const struct sockaddr *asa, + struct mbuf *m0, struct mbuf *control, struct mbuf *ctrl_last) { struct mbuf *m, *n, *nlast; - int space = asa->sa_len; - - SOCKBUF_LOCK_ASSERT(sb); - - if (m0 && (m0->m_flags & M_PKTHDR) == 0) - panic("sbappendaddr_locked"); - if (m0) - space += m0->m_pkthdr.len; - space += m_length(control, &n); - - if (space > sbspace(sb)) - return (0); #if MSIZE <= 256 if (asa->sa_len > MLEN) return (0); @@ -649,8 +632,8 @@ sbappendaddr_locked(struct sockbuf *sb, return (0); m->m_len = asa->sa_len; bcopy(asa, mtod(m, caddr_t), asa->sa_len); - if (n) - n->m_next = m0; /* concatenate data to control */ + if (ctrl_last) + ctrl_last->m_next = m0; /* concatenate data to control */ else control = m0; m->m_next = control; @@ -674,6 +657,50 @@ sbappendaddr_locked(struct sockbuf *sb, * mbufs. */ int +sbappendaddr_locked(struct sockbuf *sb, const struct sockaddr *asa, + struct mbuf *m0, struct mbuf *control) +{ + struct mbuf *ctrl_last; + int space = asa->sa_len; + + SOCKBUF_LOCK_ASSERT(sb); + + if (m0 && (m0->m_flags & M_PKTHDR) == 0) + panic("sbappendaddr_locked"); + if (m0) + space += m0->m_pkthdr.len; + space += m_length(control, &ctrl_last); + + if (space > sbspace(sb)) + return (0); + return (sbappendaddr_locked_internal(sb, asa, m0, control, ctrl_last)); +} + +/* + * Append address and data, and optionally, control (ancillary) data to the + * receive queue of a socket. If present, m0 must include a packet header + * with total length. Returns 0 if insufficient mbufs. Does not validate space + * on the receiving sockbuf. + */ +int +sbappendaddr_nospacecheck_locked(struct sockbuf *sb, const struct sockaddr *asa, + struct mbuf *m0, struct mbuf *control) +{ + struct mbuf *ctrl_last; + + SOCKBUF_LOCK_ASSERT(sb); + + ctrl_last = (control == NULL) ? NULL : m_last(control); + return (sbappendaddr_locked_internal(sb, asa, m0, control, ctrl_last)); +} + +/* + * Append address and data, and optionally, control (ancillary) data to the + * receive queue of a socket. If present, m0 must include a packet header + * with total length. Returns 0 if no space in sockbuf or insufficient + * mbufs. + */ +int sbappendaddr(struct sockbuf *sb, const struct sockaddr *asa, struct mbuf *m0, struct mbuf *control) { Modified: stable/9/sys/kern/uipc_usrreq.c ============================================================================== --- stable/9/sys/kern/uipc_usrreq.c Thu Mar 27 18:23:02 2014 (r263822) +++ stable/9/sys/kern/uipc_usrreq.c Thu Mar 27 19:04:15 2014 (r263823) @@ -876,7 +876,8 @@ uipc_send(struct socket *so, int flags, from = &sun_noname; so2 = unp2->unp_socket; SOCKBUF_LOCK(&so2->so_rcv); - if (sbappendaddr_locked(&so2->so_rcv, from, m, control)) { + if (sbappendaddr_nospacecheck_locked(&so2->so_rcv, from, m, + control)) { sorwakeup_locked(so2); m = NULL; control = NULL; @@ -961,8 +962,14 @@ uipc_send(struct socket *so, int flags, const struct sockaddr *from; from = &sun_noname; - if (sbappendaddr_locked(&so2->so_rcv, from, m, - control)) + /* + * Don't check for space available in so2->so_rcv. + * Unix domain sockets only check for space in the + * sending sockbuf, and that check is performed one + * level up the stack. + */ + if (sbappendaddr_nospacecheck_locked(&so2->so_rcv, + from, m, control)) control = NULL; break; } Modified: stable/9/sys/sys/sockbuf.h ============================================================================== --- stable/9/sys/sys/sockbuf.h Thu Mar 27 18:23:02 2014 (r263822) +++ stable/9/sys/sys/sockbuf.h Thu Mar 27 19:04:15 2014 (r263823) @@ -127,6 +127,8 @@ int sbappendaddr(struct sockbuf *sb, con struct mbuf *m0, struct mbuf *control); int sbappendaddr_locked(struct sockbuf *sb, const struct sockaddr *asa, struct mbuf *m0, struct mbuf *control); +int sbappendaddr_nospacecheck_locked(struct sockbuf *sb, + const struct sockaddr *asa, struct mbuf *m0, struct mbuf *control); int sbappendcontrol(struct sockbuf *sb, struct mbuf *m0, struct mbuf *control); int sbappendcontrol_locked(struct sockbuf *sb, struct mbuf *m0, From owner-svn-src-stable@FreeBSD.ORG Thu Mar 27 20:13:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 03DFA6C0; Thu, 27 Mar 2014 20:13:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9F1EEFD; Thu, 27 Mar 2014 20:13:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2RKDrW7059396; Thu, 27 Mar 2014 20:13:53 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2RKDrfX059395; Thu, 27 Mar 2014 20:13:53 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201403272013.s2RKDrfX059395@svn.freebsd.org> From: Christian Brueffer Date: Thu, 27 Mar 2014 20:13:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263830 - stable/10/libexec/bootpd/tools/bootptest X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 20:13:54 -0000 Author: brueffer Date: Thu Mar 27 20:13:53 2014 New Revision: 263830 URL: http://svnweb.freebsd.org/changeset/base/263830 Log: MFC: r263121 Re-format the license to conform to our BSD license template as much as possible. This does not change the wording in any way. Remove the 3rd clause ("advertising clause") of the BSD license as permitted by the University of Berkeley on July 22, 1999. While the clause itself mentions Lawrence Berkeley Laboratory, UCB is the sole copyright holder of this file. Reviewed by: imp, emaste, eadler Modified: stable/10/libexec/bootpd/tools/bootptest/print-bootp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/libexec/bootpd/tools/bootptest/print-bootp.c ============================================================================== --- stable/10/libexec/bootpd/tools/bootptest/print-bootp.c Thu Mar 27 20:10:26 2014 (r263829) +++ stable/10/libexec/bootpd/tools/bootptest/print-bootp.c Thu Mar 27 20:13:53 2014 (r263830) @@ -1,19 +1,18 @@ /* - * Copyright (c) 1988-1990 The Regents of the University of California. - * All rights reserved. + * Copyright (c) 1988-1990 + * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that: (1) source code distributions - * retain the above copyright notice and this paragraph in its entirety, (2) - * distributions including binary code include the above copyright notice and - * this paragraph in its entirety in the documentation or other materials - * provided with the distribution, and (3) all advertising materials mentioning - * features or use of this software display the following acknowledgement: - * ``This product includes software developed by the University of California, - * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of - * the University nor the names of its contributors may be used to endorse - * or promote products derived from this software without specific prior - * written permission. + * modification, are permitted provided that: + * 1. Source code distributions retain the above copyright + * notice and this paragraph in its entirety + * 2. Distributions including binary code include the above copyright + * notice and this paragraph in its entirety in the documentation + * or other materials provided with the distribution, and + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. From owner-svn-src-stable@FreeBSD.ORG Thu Mar 27 20:14:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 57E669B8; Thu, 27 Mar 2014 20:14:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29DA2F0C; Thu, 27 Mar 2014 20:14:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2RKEpa6059604; Thu, 27 Mar 2014 20:14:51 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2RKEpLF059603; Thu, 27 Mar 2014 20:14:51 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201403272014.s2RKEpLF059603@svn.freebsd.org> From: Christian Brueffer Date: Thu, 27 Mar 2014 20:14:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263832 - stable/9/libexec/bootpd/tools/bootptest X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 20:14:51 -0000 Author: brueffer Date: Thu Mar 27 20:14:50 2014 New Revision: 263832 URL: http://svnweb.freebsd.org/changeset/base/263832 Log: MFC: r263121 Re-format the license to conform to our BSD license template as much as possible. This does not change the wording in any way. Remove the 3rd clause ("advertising clause") of the BSD license as permitted by the University of Berkeley on July 22, 1999. While the clause itself mentions Lawrence Berkeley Laboratory, UCB is the sole copyright holder of this file. Reviewed by: imp, emaste, eadler Modified: stable/9/libexec/bootpd/tools/bootptest/print-bootp.c Directory Properties: stable/9/libexec/bootpd/ (props changed) Modified: stable/9/libexec/bootpd/tools/bootptest/print-bootp.c ============================================================================== --- stable/9/libexec/bootpd/tools/bootptest/print-bootp.c Thu Mar 27 20:14:40 2014 (r263831) +++ stable/9/libexec/bootpd/tools/bootptest/print-bootp.c Thu Mar 27 20:14:50 2014 (r263832) @@ -1,19 +1,18 @@ /* - * Copyright (c) 1988-1990 The Regents of the University of California. - * All rights reserved. + * Copyright (c) 1988-1990 + * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that: (1) source code distributions - * retain the above copyright notice and this paragraph in its entirety, (2) - * distributions including binary code include the above copyright notice and - * this paragraph in its entirety in the documentation or other materials - * provided with the distribution, and (3) all advertising materials mentioning - * features or use of this software display the following acknowledgement: - * ``This product includes software developed by the University of California, - * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of - * the University nor the names of its contributors may be used to endorse - * or promote products derived from this software without specific prior - * written permission. + * modification, are permitted provided that: + * 1. Source code distributions retain the above copyright + * notice and this paragraph in its entirety + * 2. Distributions including binary code include the above copyright + * notice and this paragraph in its entirety in the documentation + * or other materials provided with the distribution, and + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. From owner-svn-src-stable@FreeBSD.ORG Thu Mar 27 20:15:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3C7C0BC7; Thu, 27 Mar 2014 20:15:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 656A7F16; Thu, 27 Mar 2014 20:15:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2RKFad4059843; Thu, 27 Mar 2014 20:15:36 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2RKFaor059842; Thu, 27 Mar 2014 20:15:36 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201403272015.s2RKFaor059842@svn.freebsd.org> From: Christian Brueffer Date: Thu, 27 Mar 2014 20:15:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r263834 - stable/8/libexec/bootpd/tools/bootptest X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 20:15:37 -0000 Author: brueffer Date: Thu Mar 27 20:15:35 2014 New Revision: 263834 URL: http://svnweb.freebsd.org/changeset/base/263834 Log: MFC: r263121 Re-format the license to conform to our BSD license template as much as possible. This does not change the wording in any way. Remove the 3rd clause ("advertising clause") of the BSD license as permitted by the University of Berkeley on July 22, 1999. While the clause itself mentions Lawrence Berkeley Laboratory, UCB is the sole copyright holder of this file. Reviewed by: imp, emaste, eadler Modified: stable/8/libexec/bootpd/tools/bootptest/print-bootp.c Directory Properties: stable/8/libexec/bootpd/ (props changed) Modified: stable/8/libexec/bootpd/tools/bootptest/print-bootp.c ============================================================================== --- stable/8/libexec/bootpd/tools/bootptest/print-bootp.c Thu Mar 27 20:15:33 2014 (r263833) +++ stable/8/libexec/bootpd/tools/bootptest/print-bootp.c Thu Mar 27 20:15:35 2014 (r263834) @@ -1,19 +1,18 @@ /* - * Copyright (c) 1988-1990 The Regents of the University of California. - * All rights reserved. + * Copyright (c) 1988-1990 + * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that: (1) source code distributions - * retain the above copyright notice and this paragraph in its entirety, (2) - * distributions including binary code include the above copyright notice and - * this paragraph in its entirety in the documentation or other materials - * provided with the distribution, and (3) all advertising materials mentioning - * features or use of this software display the following acknowledgement: - * ``This product includes software developed by the University of California, - * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of - * the University nor the names of its contributors may be used to endorse - * or promote products derived from this software without specific prior - * written permission. + * modification, are permitted provided that: + * 1. Source code distributions retain the above copyright + * notice and this paragraph in its entirety + * 2. Distributions including binary code include the above copyright + * notice and this paragraph in its entirety in the documentation + * or other materials provided with the distribution, and + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. From owner-svn-src-stable@FreeBSD.ORG Thu Mar 27 20:19:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9841DDAB; Thu, 27 Mar 2014 20:19:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 845CEF40; Thu, 27 Mar 2014 20:19:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2RKJBoR060293; Thu, 27 Mar 2014 20:19:11 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2RKJBXj060292; Thu, 27 Mar 2014 20:19:11 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201403272019.s2RKJBXj060292@svn.freebsd.org> From: Christian Brueffer Date: Thu, 27 Mar 2014 20:19:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263835 - stable/10/usr.sbin/btxld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 20:19:11 -0000 Author: brueffer Date: Thu Mar 27 20:19:11 2014 New Revision: 263835 URL: http://svnweb.freebsd.org/changeset/base/263835 Log: MFC: r262484 In puthdr(), start the ELF .data section on a new page, as this is what btxldr expects (.set MEM_DATA,start+0x1000 in btxldr.S). This makes resulting ELF binaries bootable with grub, gptboot and boot2. PR: 153801 Submitted by: Gleb Kurtsou Tested by: Ruben Kerkhof Glanced at by: jhb, peter Modified: stable/10/usr.sbin/btxld/btxld.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/btxld/btxld.c ============================================================================== --- stable/10/usr.sbin/btxld/btxld.c Thu Mar 27 20:15:35 2014 (r263834) +++ stable/10/usr.sbin/btxld/btxld.c Thu Mar 27 20:19:11 2014 (r263835) @@ -426,7 +426,7 @@ puthdr(int fd, struct hdr *hdr) le32toh(eh.p[0].p_filesz)); eh.p[1].p_vaddr = eh.p[1].p_paddr = htole32(align(le32toh(eh.p[0].p_paddr) + le32toh(eh.p[0].p_memsz), - 4)); + 4096)); eh.p[1].p_filesz = eh.p[1].p_memsz = htole32(hdr->data); eh.sh[2].sh_addr = eh.p[0].p_vaddr; eh.sh[2].sh_offset = eh.p[0].p_offset; From owner-svn-src-stable@FreeBSD.ORG Thu Mar 27 20:20:21 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4CFD8F59; Thu, 27 Mar 2014 20:20:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 36C87F50; Thu, 27 Mar 2014 20:20:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2RKKLVt060986; Thu, 27 Mar 2014 20:20:21 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2RKKLwR060985; Thu, 27 Mar 2014 20:20:21 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201403272020.s2RKKLwR060985@svn.freebsd.org> From: Christian Brueffer Date: Thu, 27 Mar 2014 20:20:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263836 - stable/9/usr.sbin/btxld X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 20:20:21 -0000 Author: brueffer Date: Thu Mar 27 20:20:20 2014 New Revision: 263836 URL: http://svnweb.freebsd.org/changeset/base/263836 Log: MFC: r262484 In puthdr(), start the ELF .data section on a new page, as this is what btxldr expects (.set MEM_DATA,start+0x1000 in btxldr.S). This makes resulting ELF binaries bootable with grub, gptboot and boot2. PR: 153801 Submitted by: Gleb Kurtsou Tested by: Ruben Kerkhof Glanced at by: jhb, peter Modified: stable/9/usr.sbin/btxld/btxld.c Directory Properties: stable/9/usr.sbin/btxld/ (props changed) Modified: stable/9/usr.sbin/btxld/btxld.c ============================================================================== --- stable/9/usr.sbin/btxld/btxld.c Thu Mar 27 20:19:11 2014 (r263835) +++ stable/9/usr.sbin/btxld/btxld.c Thu Mar 27 20:20:20 2014 (r263836) @@ -426,7 +426,7 @@ puthdr(int fd, struct hdr *hdr) le32toh(eh.p[0].p_filesz)); eh.p[1].p_vaddr = eh.p[1].p_paddr = htole32(align(le32toh(eh.p[0].p_paddr) + le32toh(eh.p[0].p_memsz), - 4)); + 4096)); eh.p[1].p_filesz = eh.p[1].p_memsz = htole32(hdr->data); eh.sh[2].sh_addr = eh.p[0].p_vaddr; eh.sh[2].sh_offset = eh.p[0].p_offset; From owner-svn-src-stable@FreeBSD.ORG Thu Mar 27 20:21:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BD3AC127; Thu, 27 Mar 2014 20:21:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8FC4F5A; Thu, 27 Mar 2014 20:21:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2RKLDm9061203; Thu, 27 Mar 2014 20:21:13 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2RKLDpr061202; Thu, 27 Mar 2014 20:21:13 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201403272021.s2RKLDpr061202@svn.freebsd.org> From: Christian Brueffer Date: Thu, 27 Mar 2014 20:21:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r263837 - stable/8/usr.sbin/btxld X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 20:21:13 -0000 Author: brueffer Date: Thu Mar 27 20:21:13 2014 New Revision: 263837 URL: http://svnweb.freebsd.org/changeset/base/263837 Log: MFC: r262484 In puthdr(), start the ELF .data section on a new page, as this is what btxldr expects (.set MEM_DATA,start+0x1000 in btxldr.S). This makes resulting ELF binaries bootable with grub, gptboot and boot2. PR: 153801 Submitted by: Gleb Kurtsou Tested by: Ruben Kerkhof Glanced at by: jhb, peter Modified: stable/8/usr.sbin/btxld/btxld.c Directory Properties: stable/8/usr.sbin/btxld/ (props changed) Modified: stable/8/usr.sbin/btxld/btxld.c ============================================================================== --- stable/8/usr.sbin/btxld/btxld.c Thu Mar 27 20:20:20 2014 (r263836) +++ stable/8/usr.sbin/btxld/btxld.c Thu Mar 27 20:21:13 2014 (r263837) @@ -426,7 +426,7 @@ puthdr(int fd, struct hdr *hdr) le32toh(eh.p[0].p_filesz)); eh.p[1].p_vaddr = eh.p[1].p_paddr = htole32(align(le32toh(eh.p[0].p_paddr) + le32toh(eh.p[0].p_memsz), - 4)); + 4096)); eh.p[1].p_filesz = eh.p[1].p_memsz = htole32(hdr->data); eh.sh[2].sh_addr = eh.p[0].p_vaddr; eh.sh[2].sh_offset = eh.p[0].p_offset; From owner-svn-src-stable@FreeBSD.ORG Thu Mar 27 20:32:59 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 318F63D2; Thu, 27 Mar 2014 20:32:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E363157; Thu, 27 Mar 2014 20:32:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2RKWwoh067842; Thu, 27 Mar 2014 20:32:58 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2RKWwZ6067840; Thu, 27 Mar 2014 20:32:58 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201403272032.s2RKWwZ6067840@svn.freebsd.org> From: Dimitry Andric Date: Thu, 27 Mar 2014 20:32:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263838 - in stable: 10 9 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 20:32:59 -0000 Author: dim Date: Thu Mar 27 20:32:58 2014 New Revision: 263838 URL: http://svnweb.freebsd.org/changeset/base/263838 Log: MFC r263692: Add a note to UPDATING about customized kernel configuration files now requiring -gdwarf-2 for debug info, when using clang 3.4. Suggested by: adrian Modified: stable/9/UPDATING (contents, props changed) Changes in other areas also in this revision: Modified: stable/10/UPDATING Directory Properties: stable/10/ (props changed) Modified: stable/9/UPDATING ============================================================================== --- stable/9/UPDATING Thu Mar 27 20:21:13 2014 (r263837) +++ stable/9/UPDATING Thu Mar 27 20:32:58 2014 (r263838) @@ -12,7 +12,16 @@ Items affecting the ports and packages s /usr/ports/UPDATING. Please read that file before running portupgrade. 20140321: - Clang and llvm have been upgraded to 3.4 release. + Clang and llvm have been upgraded to 3.4 release. Please note that + clang 3.4 now defaults to DWARF4 debug information format when you + specify -g. Since kgdb(1) only supports DWARF2, you should update any + customized kernel configurations which include debug information to + explicitly use -gdwarf-2, e.g: + + makeoptions DEBUG=-gdwarf-2 + + This has already been applied to the appropriate GENERIC configuration + files, so if you inherit from those, no changes are required. 20140216: The nve(4) driver for NVIDIA nForce MCP Ethernet adapters has From owner-svn-src-stable@FreeBSD.ORG Thu Mar 27 20:32:59 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 878CE3D3; Thu, 27 Mar 2014 20:32:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73981159; Thu, 27 Mar 2014 20:32:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2RKWxce067848; Thu, 27 Mar 2014 20:32:59 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2RKWxuF067847; Thu, 27 Mar 2014 20:32:59 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201403272032.s2RKWxuF067847@svn.freebsd.org> From: Dimitry Andric Date: Thu, 27 Mar 2014 20:32:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263838 - in stable: 10 9 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 20:32:59 -0000 Author: dim Date: Thu Mar 27 20:32:58 2014 New Revision: 263838 URL: http://svnweb.freebsd.org/changeset/base/263838 Log: MFC r263692: Add a note to UPDATING about customized kernel configuration files now requiring -gdwarf-2 for debug info, when using clang 3.4. Suggested by: adrian Modified: stable/10/UPDATING Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/UPDATING (contents, props changed) Modified: stable/10/UPDATING ============================================================================== --- stable/10/UPDATING Thu Mar 27 20:21:13 2014 (r263837) +++ stable/10/UPDATING Thu Mar 27 20:32:58 2014 (r263838) @@ -18,7 +18,16 @@ older version of current is a bit fragil 20140321: - Clang and llvm have been upgraded to 3.4 release. + Clang and llvm have been upgraded to 3.4 release. Please note that + clang 3.4 now defaults to DWARF4 debug information format when you + specify -g. Since kgdb(1) only supports DWARF2, you should update any + customized kernel configurations which include debug information to + explicitly use -gdwarf-2, e.g: + + makeoptions DEBUG=-gdwarf-2 + + This has already been applied to the appropriate GENERIC configuration + files, so if you inherit from those, no changes are required. 20140306: If a Makefile in a tests/ directory was auto-generating a Kyuafile From owner-svn-src-stable@FreeBSD.ORG Thu Mar 27 20:46:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 407AE9D4; Thu, 27 Mar 2014 20:46:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2CCB0257; Thu, 27 Mar 2014 20:46:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2RKkl5n072555; Thu, 27 Mar 2014 20:46:47 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2RKklKa072554; Thu, 27 Mar 2014 20:46:47 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201403272046.s2RKklKa072554@svn.freebsd.org> From: Dimitry Andric Date: Thu, 27 Mar 2014 20:46:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263839 - in stable: 10/sbin/devd 9/sbin/devd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 20:46:47 -0000 Author: dim Date: Thu Mar 27 20:46:46 2014 New Revision: 263839 URL: http://svnweb.freebsd.org/changeset/base/263839 Log: MFC r263694: Apply a temporary band-aid for building devd with clang 3.4, libstdc++ and -Wsystem-headers enabled (which is the default for any non-zero WARNS level, crazily enough!). This is primarily meant to be MFC'd as soon as possible. Modified: stable/9/sbin/devd/Makefile Directory Properties: stable/9/sbin/devd/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sbin/devd/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/9/sbin/devd/Makefile ============================================================================== --- stable/9/sbin/devd/Makefile Thu Mar 27 20:32:58 2014 (r263838) +++ stable/9/sbin/devd/Makefile Thu Mar 27 20:46:46 2014 (r263839) @@ -13,6 +13,7 @@ LDADD= -ll -lutil YFLAGS+=-v CFLAGS+=-I. -I${.CURDIR} +CFLAGS.clang+=-Wno-keyword-compat CLEANFILES= y.output From owner-svn-src-stable@FreeBSD.ORG Thu Mar 27 20:46:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96B6C9D5; Thu, 27 Mar 2014 20:46:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83104258; Thu, 27 Mar 2014 20:46:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2RKklcd072563; Thu, 27 Mar 2014 20:46:47 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2RKklUT072562; Thu, 27 Mar 2014 20:46:47 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201403272046.s2RKklUT072562@svn.freebsd.org> From: Dimitry Andric Date: Thu, 27 Mar 2014 20:46:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263839 - in stable: 10/sbin/devd 9/sbin/devd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 20:46:47 -0000 Author: dim Date: Thu Mar 27 20:46:46 2014 New Revision: 263839 URL: http://svnweb.freebsd.org/changeset/base/263839 Log: MFC r263694: Apply a temporary band-aid for building devd with clang 3.4, libstdc++ and -Wsystem-headers enabled (which is the default for any non-zero WARNS level, crazily enough!). This is primarily meant to be MFC'd as soon as possible. Modified: stable/10/sbin/devd/Makefile Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sbin/devd/Makefile Directory Properties: stable/9/sbin/devd/ (props changed) Modified: stable/10/sbin/devd/Makefile ============================================================================== --- stable/10/sbin/devd/Makefile Thu Mar 27 20:32:58 2014 (r263838) +++ stable/10/sbin/devd/Makefile Thu Mar 27 20:46:46 2014 (r263839) @@ -13,6 +13,7 @@ LDADD= -ll -lutil YFLAGS+=-v CFLAGS+=-I. -I${.CURDIR} +CFLAGS.clang+=-Wno-keyword-compat CLEANFILES= y.output From owner-svn-src-stable@FreeBSD.ORG Fri Mar 28 01:13:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5FAF6A80; Fri, 28 Mar 2014 01:13:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3185621F; Fri, 28 Mar 2014 01:13:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2S1D9kv087864; Fri, 28 Mar 2014 01:13:09 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2S1D9Ps087863; Fri, 28 Mar 2014 01:13:09 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201403280113.s2S1D9Ps087863@svn.freebsd.org> From: Xin LI Date: Fri, 28 Mar 2014 01:13:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263853 - stable/10/sys/dev/hyperv/netvsc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Mar 2014 01:13:09 -0000 Author: delphij Date: Fri Mar 28 01:13:08 2014 New Revision: 263853 URL: http://svnweb.freebsd.org/changeset/base/263853 Log: MFC r259180 (pjd) + r263123: Hide a few messages under bootverbose. Modified: stable/10/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- stable/10/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Thu Mar 27 23:51:39 2014 (r263852) +++ stable/10/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Mar 28 01:13:08 2014 (r263853) @@ -182,7 +182,8 @@ netvsc_drv_init(void) static void netvsc_init(void) { - printf("Netvsc initializing... "); + if (bootverbose) + printf("Netvsc initializing... "); /* * XXXKYS: cleanup initialization @@ -190,9 +191,10 @@ netvsc_init(void) if (!cold && !g_netvsc_drv.drv_inited) { g_netvsc_drv.drv_inited = 1; netvsc_drv_init(); - } else { + if (bootverbose) + printf("done!\n"); + } else if (bootverbose) printf("Already initialized!\n"); - } } /* {F8615163-DF3E-46c5-913F-F2D2F965ED0E} */ @@ -213,7 +215,8 @@ netvsc_probe(device_t dev) p = vmbus_get_type(dev); if (!memcmp(p, &g_net_vsc_device_type.data, sizeof(hv_guid))) { device_set_desc(dev, "Synthetic Network Interface"); - printf("Netvsc probe... DONE \n"); + if (bootverbose) + printf("Netvsc probe... DONE \n"); return (0); } @@ -299,7 +302,8 @@ netvsc_detach(device_t dev) { struct hv_device *hv_device = vmbus_get_devctx(dev); - printf("netvsc_detach\n"); + if (bootverbose) + printf("netvsc_detach\n"); /* * XXXKYS: Need to clean up all our @@ -894,7 +898,8 @@ hn_stop(hn_softc_t *sc) ifp = sc->hn_ifp; - printf(" Closing Device ...\n"); + if (bootverbose) + printf(" Closing Device ...\n"); ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); sc->hn_initdone = 0; From owner-svn-src-stable@FreeBSD.ORG Fri Mar 28 08:55:34 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F4B6FCD; Fri, 28 Mar 2014 08:55:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8AFF8F90; Fri, 28 Mar 2014 08:55:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2S8tYXY075048; Fri, 28 Mar 2014 08:55:34 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2S8tYXj075047; Fri, 28 Mar 2014 08:55:34 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201403280855.s2S8tYXj075047@svn.freebsd.org> From: Christian Brueffer Date: Fri, 28 Mar 2014 08:55:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263869 - stable/10/sys/dev/amdtemp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Mar 2014 08:55:34 -0000 Author: brueffer Date: Fri Mar 28 08:55:34 2014 New Revision: 263869 URL: http://svnweb.freebsd.org/changeset/base/263869 Log: MFC: r263169 Add support for AMD Family 16h (Kabini) sensor devices. PR: 186587 Submitted by: David Rufino Modified: stable/10/sys/dev/amdtemp/amdtemp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/amdtemp/amdtemp.c ============================================================================== --- stable/10/sys/dev/amdtemp/amdtemp.c Fri Mar 28 08:23:39 2014 (r263868) +++ stable/10/sys/dev/amdtemp/amdtemp.c Fri Mar 28 08:55:34 2014 (r263869) @@ -79,6 +79,7 @@ struct amdtemp_softc { #define DEVICEID_AMD_MISC12 0x1403 #define DEVICEID_AMD_MISC14 0x1703 #define DEVICEID_AMD_MISC15 0x1603 +#define DEVICEID_AMD_MISC16 0x1533 static struct amdtemp_product { uint16_t amdtemp_vendorid; @@ -90,6 +91,7 @@ static struct amdtemp_product { { VENDORID_AMD, DEVICEID_AMD_MISC12 }, { VENDORID_AMD, DEVICEID_AMD_MISC14 }, { VENDORID_AMD, DEVICEID_AMD_MISC15 }, + { VENDORID_AMD, DEVICEID_AMD_MISC16 }, { 0, 0 } }; @@ -204,6 +206,7 @@ amdtemp_probe(device_t dev) case 0x12: case 0x14: case 0x15: + case 0x16: break; default: return (ENXIO); @@ -327,6 +330,7 @@ amdtemp_attach(device_t dev) case 0x12: case 0x14: case 0x15: + case 0x16: /* * There is only one sensor per package. */ From owner-svn-src-stable@FreeBSD.ORG Fri Mar 28 08:58:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 02CCB35B; Fri, 28 Mar 2014 08:58:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E32CAFAD; Fri, 28 Mar 2014 08:58:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2S8wp5x075601; Fri, 28 Mar 2014 08:58:51 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2S8wpSu075600; Fri, 28 Mar 2014 08:58:51 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201403280858.s2S8wpSu075600@svn.freebsd.org> From: Christian Brueffer Date: Fri, 28 Mar 2014 08:58:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263870 - stable/9/sys/dev/amdtemp X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Mar 2014 08:58:52 -0000 Author: brueffer Date: Fri Mar 28 08:58:51 2014 New Revision: 263870 URL: http://svnweb.freebsd.org/changeset/base/263870 Log: MFC: r263169 Add support for AMD Family 16h (Kabini) sensor devices. PR: 186587 Submitted by: David Rufino Modified: stable/9/sys/dev/amdtemp/amdtemp.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/amdtemp/amdtemp.c ============================================================================== --- stable/9/sys/dev/amdtemp/amdtemp.c Fri Mar 28 08:55:34 2014 (r263869) +++ stable/9/sys/dev/amdtemp/amdtemp.c Fri Mar 28 08:58:51 2014 (r263870) @@ -76,6 +76,7 @@ struct amdtemp_softc { #define DEVICEID_AMD_MISC0F 0x1103 #define DEVICEID_AMD_MISC10 0x1203 #define DEVICEID_AMD_MISC11 0x1303 +#define DEVICEID_AMD_MISC16 0x1533 static struct amdtemp_product { uint16_t amdtemp_vendorid; @@ -84,6 +85,7 @@ static struct amdtemp_product { { VENDORID_AMD, DEVICEID_AMD_MISC0F }, { VENDORID_AMD, DEVICEID_AMD_MISC10 }, { VENDORID_AMD, DEVICEID_AMD_MISC11 }, + { VENDORID_AMD, DEVICEID_AMD_MISC16 }, { 0, 0 } }; @@ -189,6 +191,7 @@ amdtemp_probe(device_t dev) break; case 0x10: case 0x11: + case 0x16: break; default: return (ENXIO); @@ -274,6 +277,7 @@ amdtemp_attach(device_t dev) break; case 0x10: case 0x11: + case 0x16: /* * There is only one sensor per package. */ From owner-svn-src-stable@FreeBSD.ORG Fri Mar 28 15:09:35 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C72E8FE9; Fri, 28 Mar 2014 15:09:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B323B8C0; Fri, 28 Mar 2014 15:09:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2SF9Zdg028091; Fri, 28 Mar 2014 15:09:35 GMT (envelope-from asomers@svn.freebsd.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2SF9ZT7028090; Fri, 28 Mar 2014 15:09:35 GMT (envelope-from asomers@svn.freebsd.org) Message-Id: <201403281509.s2SF9ZT7028090@svn.freebsd.org> From: Alan Somers Date: Fri, 28 Mar 2014 15:09:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263874 - stable/10/cddl/contrib/opensolaris/lib/libuutil/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Mar 2014 15:09:35 -0000 Author: asomers Date: Fri Mar 28 15:09:35 2014 New Revision: 263874 URL: http://svnweb.freebsd.org/changeset/base/263874 Log: MFC r262912 cddl/contrib/opensolaris/lib/libuutil/common/uu_avl.c Fix a memory leak in uu_avl_pool_create: pthread_mutex_init without a corresponding pthread_mutex_destroy. It shows up, among other places, when doing "zfs list". Modified: stable/10/cddl/contrib/opensolaris/lib/libuutil/common/uu_avl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/lib/libuutil/common/uu_avl.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libuutil/common/uu_avl.c Fri Mar 28 12:50:39 2014 (r263873) +++ stable/10/cddl/contrib/opensolaris/lib/libuutil/common/uu_avl.c Fri Mar 28 15:09:35 2014 (r263874) @@ -128,6 +128,7 @@ uu_avl_pool_destroy(uu_avl_pool_t *pp) pp->uap_next->uap_prev = pp->uap_prev; pp->uap_prev->uap_next = pp->uap_next; (void) pthread_mutex_unlock(&uu_apool_list_lock); + (void) pthread_mutex_destroy(&pp->uap_lock); pp->uap_prev = NULL; pp->uap_next = NULL; uu_free(pp); From owner-svn-src-stable@FreeBSD.ORG Fri Mar 28 15:38:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E743BB2B; Fri, 28 Mar 2014 15:38:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D22C4B8B; Fri, 28 Mar 2014 15:38:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2SFceko040246; Fri, 28 Mar 2014 15:38:40 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2SFcdO2040237; Fri, 28 Mar 2014 15:38:39 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201403281538.s2SFcdO2040237@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 28 Mar 2014 15:38:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263875 - in stable/10/sys: amd64/amd64 amd64/include kern sys vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Mar 2014 15:38:41 -0000 Author: kib Date: Fri Mar 28 15:38:38 2014 New Revision: 263875 URL: http://svnweb.freebsd.org/changeset/base/263875 Log: MFC r263475: Fix two issues with /dev/mem access on amd64, both causing kernel page faults. First, for accesses to direct map region should check for the limit by which direct map is instantiated. Second, for accesses to the kernel map, use a new thread private flag TDP_DEVMEMIO, which instructs vm_fault() to return error when fault happens on the MAP_ENTRY_NOFAULT entry, instead of panicing. MFC r263498: Add change forgotten in r263475. Make dmaplimit accessible outside amd64/pmap.c. Modified: stable/10/sys/amd64/amd64/mem.c stable/10/sys/amd64/amd64/pmap.c stable/10/sys/amd64/amd64/trap.c stable/10/sys/amd64/include/pmap.h stable/10/sys/kern/subr_trap.c stable/10/sys/sys/proc.h stable/10/sys/vm/vm_fault.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/mem.c ============================================================================== --- stable/10/sys/amd64/amd64/mem.c Fri Mar 28 15:09:35 2014 (r263874) +++ stable/10/sys/amd64/amd64/mem.c Fri Mar 28 15:38:38 2014 (r263875) @@ -76,14 +76,16 @@ MALLOC_DEFINE(M_MEMDESC, "memdesc", "mem int memrw(struct cdev *dev, struct uio *uio, int flags) { - int o; - u_long c = 0, v; struct iovec *iov; - int error = 0; + u_long c, v; + int error, o, sflags; vm_offset_t addr, eaddr; GIANT_REQUIRED; + error = 0; + c = 0; + sflags = curthread_pflags_set(TDP_DEVMEMIO); while (uio->uio_resid > 0 && error == 0) { iov = uio->uio_iov; if (iov->iov_len == 0) { @@ -98,7 +100,15 @@ memrw(struct cdev *dev, struct uio *uio, kmemphys: o = v & PAGE_MASK; c = min(uio->uio_resid, (u_int)(PAGE_SIZE - o)); - error = uiomove((void *)PHYS_TO_DMAP(v), (int)c, uio); + v = PHYS_TO_DMAP(v); + if (v < DMAP_MIN_ADDRESS || + (v > DMAP_MIN_ADDRESS + dmaplimit && + v <= DMAP_MAX_ADDRESS) || + pmap_kextract(v) == 0) { + error = EFAULT; + goto ret; + } + error = uiomove((void *)v, (int)c, uio); continue; } else if (dev2unit(dev) == CDEV_MINOR_KMEM) { @@ -119,22 +129,30 @@ kmemphys: addr = trunc_page(v); eaddr = round_page(v + c); - if (addr < VM_MIN_KERNEL_ADDRESS) - return (EFAULT); - for (; addr < eaddr; addr += PAGE_SIZE) - if (pmap_extract(kernel_pmap, addr) == 0) - return (EFAULT); - + if (addr < VM_MIN_KERNEL_ADDRESS) { + error = EFAULT; + goto ret; + } + for (; addr < eaddr; addr += PAGE_SIZE) { + if (pmap_extract(kernel_pmap, addr) == 0) { + error = EFAULT; + goto ret; + } + } if (!kernacc((caddr_t)(long)v, c, uio->uio_rw == UIO_READ ? - VM_PROT_READ : VM_PROT_WRITE)) - return (EFAULT); + VM_PROT_READ : VM_PROT_WRITE)) { + error = EFAULT; + goto ret; + } error = uiomove((caddr_t)(long)v, (int)c, uio); continue; } /* else panic! */ } +ret: + curthread_pflags_restore(sflags); return (error); } Modified: stable/10/sys/amd64/amd64/pmap.c ============================================================================== --- stable/10/sys/amd64/amd64/pmap.c Fri Mar 28 15:09:35 2014 (r263874) +++ stable/10/sys/amd64/amd64/pmap.c Fri Mar 28 15:38:38 2014 (r263875) @@ -321,7 +321,7 @@ SYSCTL_INT(_machdep, OID_AUTO, nkpt, CTL "Number of kernel page table pages allocated on bootup"); static int ndmpdp; -static vm_paddr_t dmaplimit; +vm_paddr_t dmaplimit; vm_offset_t kernel_vm_end = VM_MIN_KERNEL_ADDRESS; pt_entry_t pg_nx; Modified: stable/10/sys/amd64/amd64/trap.c ============================================================================== --- stable/10/sys/amd64/amd64/trap.c Fri Mar 28 15:09:35 2014 (r263874) +++ stable/10/sys/amd64/amd64/trap.c Fri Mar 28 15:38:38 2014 (r263875) @@ -788,6 +788,12 @@ nogo: frame->tf_rip = (long)curpcb->pcb_onfault; return (0); } + if ((td->td_pflags & TDP_DEVMEMIO) != 0) { + KASSERT(curpcb->pcb_onfault != NULL, + ("/dev/mem without pcb_onfault")); + frame->tf_rip = (long)curpcb->pcb_onfault; + return (0); + } trap_fatal(frame, eva); return (-1); } Modified: stable/10/sys/amd64/include/pmap.h ============================================================================== --- stable/10/sys/amd64/include/pmap.h Fri Mar 28 15:09:35 2014 (r263874) +++ stable/10/sys/amd64/include/pmap.h Fri Mar 28 15:38:38 2014 (r263875) @@ -368,6 +368,7 @@ extern vm_paddr_t phys_avail[]; extern vm_paddr_t dump_avail[]; extern vm_offset_t virtual_avail; extern vm_offset_t virtual_end; +extern vm_paddr_t dmaplimit; #define pmap_page_get_memattr(m) ((vm_memattr_t)(m)->md.pat_mode) #define pmap_page_is_write_mapped(m) (((m)->aflags & PGA_WRITEABLE) != 0) Modified: stable/10/sys/kern/subr_trap.c ============================================================================== --- stable/10/sys/kern/subr_trap.c Fri Mar 28 15:09:35 2014 (r263874) +++ stable/10/sys/kern/subr_trap.c Fri Mar 28 15:38:38 2014 (r263875) @@ -155,6 +155,8 @@ userret(struct thread *td, struct trapfr ("userret: Returning with %d locks held", td->td_locks)); KASSERT((td->td_pflags & TDP_NOFAULTING) == 0, ("userret: Returning with pagefaults disabled")); + KASSERT((td->td_pflags & TDP_DEVMEMIO) == 0, + ("userret: Returning with /dev/mem i/o leaked")); KASSERT(td->td_no_sleeping == 0, ("userret: Returning with sleep disabled")); KASSERT(td->td_pinned == 0 || (td->td_pflags & TDP_CALLCHAIN) != 0, Modified: stable/10/sys/sys/proc.h ============================================================================== --- stable/10/sys/sys/proc.h Fri Mar 28 15:09:35 2014 (r263874) +++ stable/10/sys/sys/proc.h Fri Mar 28 15:38:38 2014 (r263875) @@ -424,6 +424,7 @@ do { \ #define TDP_RESETSPUR 0x04000000 /* Reset spurious page fault history. */ #define TDP_NERRNO 0x08000000 /* Last errno is already in td_errno */ #define TDP_UIOHELD 0x10000000 /* Current uio has pages held in td_ma */ +#define TDP_DEVMEMIO 0x20000000 /* Accessing memory for /dev/mem */ /* * Reasons that the current thread can not be run yet. Modified: stable/10/sys/vm/vm_fault.c ============================================================================== --- stable/10/sys/vm/vm_fault.c Fri Mar 28 15:09:35 2014 (r263874) +++ stable/10/sys/vm/vm_fault.c Fri Mar 28 15:38:38 2014 (r263875) @@ -276,6 +276,10 @@ RetryFault:; map_generation = fs.map->timestamp; if (fs.entry->eflags & MAP_ENTRY_NOFAULT) { + if ((curthread->td_pflags & TDP_DEVMEMIO) != 0) { + vm_map_unlock_read(fs.map); + return (KERN_FAILURE); + } panic("vm_fault: fault on nofault entry, addr: %lx", (u_long)vaddr); } From owner-svn-src-stable@FreeBSD.ORG Fri Mar 28 15:38:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 45F23D31; Fri, 28 Mar 2014 15:38:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 31C56B91; Fri, 28 Mar 2014 15:38:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2SFcuT5040399; Fri, 28 Mar 2014 15:38:56 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2SFcscw040389; Fri, 28 Mar 2014 15:38:54 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201403281538.s2SFcscw040389@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 28 Mar 2014 15:38:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263876 - in stable/9/sys: amd64/amd64 amd64/include kern sys vm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Mar 2014 15:38:56 -0000 Author: kib Date: Fri Mar 28 15:38:54 2014 New Revision: 263876 URL: http://svnweb.freebsd.org/changeset/base/263876 Log: MFC r263475: Fix two issues with /dev/mem access on amd64, both causing kernel page faults. First, for accesses to direct map region should check for the limit by which direct map is instantiated. Second, for accesses to the kernel map, use a new thread private flag TDP_DEVMEMIO, which instructs vm_fault() to return error when fault happens on the MAP_ENTRY_NOFAULT entry, instead of panicing. MFC r263498: Add change forgotten in r263475. Make dmaplimit accessible outside amd64/pmap.c. Modified: stable/9/sys/amd64/amd64/mem.c stable/9/sys/amd64/amd64/pmap.c stable/9/sys/amd64/amd64/trap.c stable/9/sys/amd64/include/pmap.h stable/9/sys/kern/subr_trap.c stable/9/sys/sys/proc.h stable/9/sys/vm/vm_fault.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/mem.c ============================================================================== --- stable/9/sys/amd64/amd64/mem.c Fri Mar 28 15:38:38 2014 (r263875) +++ stable/9/sys/amd64/amd64/mem.c Fri Mar 28 15:38:54 2014 (r263876) @@ -76,14 +76,16 @@ MALLOC_DEFINE(M_MEMDESC, "memdesc", "mem int memrw(struct cdev *dev, struct uio *uio, int flags) { - int o; - u_long c = 0, v; struct iovec *iov; - int error = 0; + u_long c, v; + int error, o, sflags; vm_offset_t addr, eaddr; GIANT_REQUIRED; + error = 0; + c = 0; + sflags = curthread_pflags_set(TDP_DEVMEMIO); while (uio->uio_resid > 0 && error == 0) { iov = uio->uio_iov; if (iov->iov_len == 0) { @@ -98,7 +100,15 @@ memrw(struct cdev *dev, struct uio *uio, kmemphys: o = v & PAGE_MASK; c = min(uio->uio_resid, (u_int)(PAGE_SIZE - o)); - error = uiomove((void *)PHYS_TO_DMAP(v), (int)c, uio); + v = PHYS_TO_DMAP(v); + if (v < DMAP_MIN_ADDRESS || + (v > DMAP_MIN_ADDRESS + dmaplimit && + v <= DMAP_MAX_ADDRESS) || + pmap_kextract(v) == 0) { + error = EFAULT; + goto ret; + } + error = uiomove((void *)v, (int)c, uio); continue; } else if (dev2unit(dev) == CDEV_MINOR_KMEM) { @@ -119,22 +129,30 @@ kmemphys: addr = trunc_page(v); eaddr = round_page(v + c); - if (addr < VM_MIN_KERNEL_ADDRESS) - return (EFAULT); - for (; addr < eaddr; addr += PAGE_SIZE) - if (pmap_extract(kernel_pmap, addr) == 0) - return (EFAULT); - + if (addr < VM_MIN_KERNEL_ADDRESS) { + error = EFAULT; + goto ret; + } + for (; addr < eaddr; addr += PAGE_SIZE) { + if (pmap_extract(kernel_pmap, addr) == 0) { + error = EFAULT; + goto ret; + } + } if (!kernacc((caddr_t)(long)v, c, uio->uio_rw == UIO_READ ? - VM_PROT_READ : VM_PROT_WRITE)) - return (EFAULT); + VM_PROT_READ : VM_PROT_WRITE)) { + error = EFAULT; + goto ret; + } error = uiomove((caddr_t)(long)v, (int)c, uio); continue; } /* else panic! */ } +ret: + curthread_pflags_restore(sflags); return (error); } Modified: stable/9/sys/amd64/amd64/pmap.c ============================================================================== --- stable/9/sys/amd64/amd64/pmap.c Fri Mar 28 15:38:38 2014 (r263875) +++ stable/9/sys/amd64/amd64/pmap.c Fri Mar 28 15:38:54 2014 (r263876) @@ -210,7 +210,7 @@ vm_offset_t virtual_avail; /* VA of firs vm_offset_t virtual_end; /* VA of last avail page (end of kernel AS) */ static int ndmpdp; -static vm_paddr_t dmaplimit; +vm_paddr_t dmaplimit; vm_offset_t kernel_vm_end = VM_MIN_KERNEL_ADDRESS; pt_entry_t pg_nx; Modified: stable/9/sys/amd64/amd64/trap.c ============================================================================== --- stable/9/sys/amd64/amd64/trap.c Fri Mar 28 15:38:38 2014 (r263875) +++ stable/9/sys/amd64/amd64/trap.c Fri Mar 28 15:38:54 2014 (r263876) @@ -785,6 +785,12 @@ nogo: frame->tf_rip = (long)curpcb->pcb_onfault; return (0); } + if ((td->td_pflags & TDP_DEVMEMIO) != 0) { + KASSERT(curpcb->pcb_onfault != NULL, + ("/dev/mem without pcb_onfault")); + frame->tf_rip = (long)curpcb->pcb_onfault; + return (0); + } trap_fatal(frame, eva); return (-1); } Modified: stable/9/sys/amd64/include/pmap.h ============================================================================== --- stable/9/sys/amd64/include/pmap.h Fri Mar 28 15:38:38 2014 (r263875) +++ stable/9/sys/amd64/include/pmap.h Fri Mar 28 15:38:54 2014 (r263876) @@ -280,6 +280,7 @@ extern vm_paddr_t phys_avail[]; extern vm_paddr_t dump_avail[]; extern vm_offset_t virtual_avail; extern vm_offset_t virtual_end; +extern vm_paddr_t dmaplimit; #define pmap_page_get_memattr(m) ((vm_memattr_t)(m)->md.pat_mode) #define pmap_page_is_write_mapped(m) (((m)->aflags & PGA_WRITEABLE) != 0) Modified: stable/9/sys/kern/subr_trap.c ============================================================================== --- stable/9/sys/kern/subr_trap.c Fri Mar 28 15:38:38 2014 (r263875) +++ stable/9/sys/kern/subr_trap.c Fri Mar 28 15:38:54 2014 (r263876) @@ -139,6 +139,8 @@ userret(struct thread *td, struct trapfr sched_userret(td); KASSERT(td->td_locks == 0, ("userret: Returning with %d locks held.", td->td_locks)); + KASSERT((td->td_pflags & TDP_DEVMEMIO) == 0, + ("userret: Returning with /dev/mem i/o leaked")); KASSERT(td->td_vp_reserv == 0, ("userret: Returning while holding vnode reservation")); KASSERT((td->td_flags & TDF_SBDRY) == 0, Modified: stable/9/sys/sys/proc.h ============================================================================== --- stable/9/sys/sys/proc.h Fri Mar 28 15:38:38 2014 (r263875) +++ stable/9/sys/sys/proc.h Fri Mar 28 15:38:54 2014 (r263876) @@ -425,6 +425,7 @@ do { \ #define TDP_RESETSPUR 0x04000000 /* Reset spurious page fault history. */ #define TDP_NERRNO 0x08000000 /* Last errno is already in td_errno */ #define TDP_UIOHELD 0x10000000 /* Current uio has pages held in td_ma */ +#define TDP_DEVMEMIO 0x20000000 /* Accessing memory for /dev/mem */ /* * Reasons that the current thread can not be run yet. Modified: stable/9/sys/vm/vm_fault.c ============================================================================== --- stable/9/sys/vm/vm_fault.c Fri Mar 28 15:38:38 2014 (r263875) +++ stable/9/sys/vm/vm_fault.c Fri Mar 28 15:38:54 2014 (r263876) @@ -282,6 +282,10 @@ RetryFault:; map_generation = fs.map->timestamp; if (fs.entry->eflags & MAP_ENTRY_NOFAULT) { + if ((curthread->td_pflags & TDP_DEVMEMIO) != 0) { + vm_map_unlock_read(fs.map); + return (KERN_FAILURE); + } panic("vm_fault: fault on nofault entry, addr: %lx", (u_long)vaddr); } From owner-svn-src-stable@FreeBSD.ORG Fri Mar 28 15:41:04 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AAD1EF00; Fri, 28 Mar 2014 15:41:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97344C10; Fri, 28 Mar 2014 15:41:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2SFf4YI041430; Fri, 28 Mar 2014 15:41:04 GMT (envelope-from asomers@svn.freebsd.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2SFf4Du041429; Fri, 28 Mar 2014 15:41:04 GMT (envelope-from asomers@svn.freebsd.org) Message-Id: <201403281541.s2SFf4Du041429@svn.freebsd.org> From: Alan Somers Date: Fri, 28 Mar 2014 15:41:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263877 - stable/9/cddl/contrib/opensolaris/lib/libuutil/common X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Mar 2014 15:41:04 -0000 Author: asomers Date: Fri Mar 28 15:41:04 2014 New Revision: 263877 URL: http://svnweb.freebsd.org/changeset/base/263877 Log: MFC r262912 cddl/contrib/opensolaris/lib/libuutil/common/uu_avl.c Fix a memory leak in uu_avl_pool_create: pthread_mutex_init without a corresponding pthread_mutex_destroy. It shows up, among other places, when doing "zfs list Modified: stable/9/cddl/contrib/opensolaris/lib/libuutil/common/uu_avl.c Directory Properties: stable/9/ (props changed) stable/9/cddl/ (props changed) stable/9/cddl/contrib/ (props changed) stable/9/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libuutil/common/uu_avl.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libuutil/common/uu_avl.c Fri Mar 28 15:38:54 2014 (r263876) +++ stable/9/cddl/contrib/opensolaris/lib/libuutil/common/uu_avl.c Fri Mar 28 15:41:04 2014 (r263877) @@ -128,6 +128,7 @@ uu_avl_pool_destroy(uu_avl_pool_t *pp) pp->uap_next->uap_prev = pp->uap_prev; pp->uap_prev->uap_next = pp->uap_next; (void) pthread_mutex_unlock(&uu_apool_list_lock); + (void) pthread_mutex_destroy(&pp->uap_lock); pp->uap_prev = NULL; pp->uap_next = NULL; uu_free(pp); From owner-svn-src-stable@FreeBSD.ORG Fri Mar 28 16:27:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EDF072C4; Fri, 28 Mar 2014 16:27:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA37BBE; Fri, 28 Mar 2014 16:27:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2SGRmxN061168; Fri, 28 Mar 2014 16:27:48 GMT (envelope-from asomers@svn.freebsd.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2SGRmbZ061165; Fri, 28 Mar 2014 16:27:48 GMT (envelope-from asomers@svn.freebsd.org) Message-Id: <201403281627.s2SGRmbZ061165@svn.freebsd.org> From: Alan Somers Date: Fri, 28 Mar 2014 16:27:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263880 - stable/10/sbin/devd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Mar 2014 16:27:49 -0000 Author: asomers Date: Fri Mar 28 16:27:48 2014 New Revision: 263880 URL: http://svnweb.freebsd.org/changeset/base/263880 Log: MFC r262914 sbin/devd/devd.8 sbin/devd/devd.cc Add a -q flag to devd that will suppress syslog logging at LOG_NOTICE or below. Modified: stable/10/sbin/devd/devd.8 stable/10/sbin/devd/devd.cc Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/devd/devd.8 ============================================================================== --- stable/10/sbin/devd/devd.8 Fri Mar 28 16:11:20 2014 (r263879) +++ stable/10/sbin/devd/devd.8 Fri Mar 28 16:27:48 2014 (r263880) @@ -33,7 +33,7 @@ .Nd "device state change daemon" .Sh SYNOPSIS .Nm -.Op Fl dn +.Op Fl dnq .Op Fl f Ar file .Op Fl l Ar num .Sh DESCRIPTION @@ -63,6 +63,8 @@ The default connection limit is 10. .It Fl n Do not process all pending events before becoming a daemon. Instead, call daemon right away. +.It Fl q +Quiet mode. Only log messages at priority LOG_WARNING or above. .El .Sh IMPLEMENTATION NOTES The Modified: stable/10/sbin/devd/devd.cc ============================================================================== --- stable/10/sbin/devd/devd.cc Fri Mar 28 16:11:20 2014 (r263879) +++ stable/10/sbin/devd/devd.cc Fri Mar 28 16:27:48 2014 (r263880) @@ -129,8 +129,9 @@ static const char detach = '-'; static struct pidfh *pfh; -int dflag; -int nflag; +static int no_daemon = 0; +static int daemonize_quick = 0; +static int quiet_mode = 0; static unsigned total_events = 0; static volatile sig_atomic_t got_siginfo = 0; static volatile sig_atomic_t romeo_must_die = 0; @@ -291,7 +292,7 @@ match::do_match(config &c) * can consume excessive amounts of systime inside of connect(). Only * log when we're in -d mode. */ - if (dflag) { + if (no_daemon) { devdlog(LOG_DEBUG, "Testing %s=%s against %s, invert=%d\n", _var.c_str(), value.c_str(), _re.c_str(), _inv); } @@ -401,7 +402,7 @@ var_list::set_variable(const string &var * can consume excessive amounts of systime inside of connect(). Only * log when we're in -d mode. */ - if (dflag) + if (no_daemon) devdlog(LOG_DEBUG, "setting %s=%s\n", var.c_str(), val.c_str()); _vars[var] = val; } @@ -945,7 +946,7 @@ event_loop(void) accepting = 1; max_fd = max(fd, server_fd) + 1; while (!romeo_must_die) { - if (!once && !dflag && !nflag) { + if (!once && !no_daemon && !daemonize_quick) { // Check to see if we have any events pending. tv.tv_sec = 0; tv.tv_usec = 0; @@ -1139,9 +1140,9 @@ devdlog(int priority, const char* fmt, . va_list argp; va_start(argp, fmt); - if (dflag) + if (no_daemon) vfprintf(stderr, fmt, argp); - else + else if ((! quiet_mode) || (priority <= LOG_WARNING)) vsyslog(priority, fmt, argp); va_end(argp); } @@ -1149,7 +1150,7 @@ devdlog(int priority, const char* fmt, . static void usage() { - fprintf(stderr, "usage: %s [-dn] [-l connlimit] [-f file]\n", + fprintf(stderr, "usage: %s [-dnq] [-l connlimit] [-f file]\n", getprogname()); exit(1); } @@ -1179,10 +1180,10 @@ main(int argc, char **argv) int ch; check_devd_enabled(); - while ((ch = getopt(argc, argv, "df:l:n")) != -1) { + while ((ch = getopt(argc, argv, "df:l:nq")) != -1) { switch (ch) { case 'd': - dflag++; + no_daemon = 1; break; case 'f': configfile = optarg; @@ -1191,7 +1192,10 @@ main(int argc, char **argv) max_clients = MAX(1, strtoul(optarg, NULL, 0)); break; case 'n': - nflag++; + daemonize_quick = 1; + break; + case 'q': + quiet_mode = 1; break; default: usage(); @@ -1199,7 +1203,7 @@ main(int argc, char **argv) } cfg.parse(); - if (!dflag && nflag) { + if (!no_daemon && daemonize_quick) { cfg.open_pidfile(); daemon(0, 0); cfg.write_pidfile(); From owner-svn-src-stable@FreeBSD.ORG Fri Mar 28 20:12:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A08455F2; Fri, 28 Mar 2014 20:12:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82D7CD64; Fri, 28 Mar 2014 20:12:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2SKCVNq055537; Fri, 28 Mar 2014 20:12:31 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2SKCVcS055535; Fri, 28 Mar 2014 20:12:31 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201403282012.s2SKCVcS055535@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 28 Mar 2014 20:12:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263882 - in stable/10/share: examples/etc mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Mar 2014 20:12:31 -0000 Author: jkim Date: Fri Mar 28 20:12:30 2014 New Revision: 263882 URL: http://svnweb.freebsd.org/changeset/base/263882 Log: MFC: r263435 Add new CPUTYPEs supported by Clang 3.4. Modified: stable/10/share/examples/etc/make.conf stable/10/share/mk/bsd.cpu.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/examples/etc/make.conf ============================================================================== --- stable/10/share/examples/etc/make.conf Fri Mar 28 16:31:12 2014 (r263881) +++ stable/10/share/examples/etc/make.conf Fri Mar 28 20:12:30 2014 (r263882) @@ -45,8 +45,8 @@ # if omitted), ultrasparc3 # Additionally the following CPU types are recognized by clang: # Intel x86 architecture (for both amd64 and i386): -# (AMD CPUs) bdver2, bdver1, btver2, btver1 -# (Intel CPUs) core-avx2, core-avx-i, corei7-avx, corei7, atom +# (AMD CPUs) bdver3, bdver2, bdver1, btver2, btver1 +# (Intel CPUs) slm, core-avx2, core-avx-i, corei7-avx, corei7, atom # # (?= allows to buildworld for a different CPUTYPE.) # Modified: stable/10/share/mk/bsd.cpu.mk ============================================================================== --- stable/10/share/mk/bsd.cpu.mk Fri Mar 28 16:31:12 2014 (r263881) +++ stable/10/share/mk/bsd.cpu.mk Fri Mar 28 20:12:30 2014 (r263882) @@ -142,7 +142,8 @@ _CPUCFLAGS = -mcpu=ultrasparc3 # presence of a CPU feature. . if ${MACHINE_CPUARCH} == "i386" -. if ${CPUTYPE} == "bdver2" || ${CPUTYPE} == "bdver1" +. if ${CPUTYPE} == "bdver3" || ${CPUTYPE} == "bdver2" || \ + ${CPUTYPE} == "bdver1" MACHINE_CPU = xop avx sse42 sse41 ssse3 sse4a sse3 sse2 sse mmx k6 k5 i586 . elif ${CPUTYPE} == "btver2" MACHINE_CPU = avx sse42 sse41 ssse3 sse4a sse3 sse2 sse mmx k6 k5 i586 @@ -170,7 +171,7 @@ MACHINE_CPU = k5 i586 MACHINE_CPU = avx2 avx sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 . elif ${CPUTYPE} == "core-avx-i" || ${CPUTYPE} == "corei7-avx" MACHINE_CPU = avx sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 -. elif ${CPUTYPE} == "corei7" +. elif ${CPUTYPE} == "slm" || ${CPUTYPE} == "corei7" MACHINE_CPU = sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 . elif ${CPUTYPE} == "penryn" MACHINE_CPU = sse41 ssse3 sse3 sse2 sse i686 mmx i586 @@ -204,7 +205,8 @@ MACHINE_CPU = mmx . endif MACHINE_CPU += i486 . elif ${MACHINE_CPUARCH} == "amd64" -. if ${CPUTYPE} == "bdver2" || ${CPUTYPE} == "bdver1" +. if ${CPUTYPE} == "bdver3" || ${CPUTYPE} == "bdver2" || \ + ${CPUTYPE} == "bdver1" MACHINE_CPU = xop avx sse42 sse41 ssse3 sse4a sse3 . elif ${CPUTYPE} == "btver2" MACHINE_CPU = avx sse42 sse41 ssse3 sse4a sse3 @@ -222,7 +224,7 @@ MACHINE_CPU = k8 3dnow MACHINE_CPU = avx2 avx sse42 sse41 ssse3 sse3 . elif ${CPUTYPE} == "core-avx-i" || ${CPUTYPE} == "corei7-avx" MACHINE_CPU = avx sse42 sse41 ssse3 sse3 -. elif ${CPUTYPE} == "corei7" +. elif ${CPUTYPE} == "slm" || ${CPUTYPE} == "corei7" MACHINE_CPU = sse42 sse41 ssse3 sse3 . elif ${CPUTYPE} == "penryn" MACHINE_CPU = sse41 ssse3 sse3 From owner-svn-src-stable@FreeBSD.ORG Sat Mar 29 04:17:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31D58342; Sat, 29 Mar 2014 04:17:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F33DA8A; Sat, 29 Mar 2014 04:17:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2T4HlSW059844; Sat, 29 Mar 2014 04:17:47 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2T4HkQ8059839; Sat, 29 Mar 2014 04:17:46 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201403290417.s2T4HkQ8059839@svn.freebsd.org> From: Edwin Groothuis Date: Sat, 29 Mar 2014 04:17:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org Subject: svn commit: r263902 - stable/6/share/zoneinfo X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Mar 2014 04:17:48 -0000 Author: edwin Date: Sat Mar 29 04:17:46 2014 New Revision: 263902 URL: http://svnweb.freebsd.org/changeset/base/263902 Log: MFC of 263901, tzdata2014b - Update antartica. - Comments about historical data for Hawaii. - Update details for Crimea on 30 March - Move location data Simferopol. Modified: stable/6/share/zoneinfo/africa stable/6/share/zoneinfo/antarctica stable/6/share/zoneinfo/australasia stable/6/share/zoneinfo/europe stable/6/share/zoneinfo/zone.tab Directory Properties: stable/6/share/zoneinfo/ (props changed) Modified: stable/6/share/zoneinfo/africa ============================================================================== --- stable/6/share/zoneinfo/africa Sat Mar 29 04:15:11 2014 (r263901) +++ stable/6/share/zoneinfo/africa Sat Mar 29 04:17:46 2014 (r263902) @@ -868,7 +868,10 @@ Zone Indian/Mayotte 3:00:56 - LMT 1911 J # Another source (specifying the time for start and end in the decree): # http://www.lemag.ma/Heure-d-ete-au-Maroc-jusqu-au-27-octobre_a75620.html -# From Paul Eggert (2013-10-03): +# From Sebastien Willemijns (2014-03-18): +# http://www.afriquinfos.com/articles/2014/3/18/maroc-heure-dete-avancez-tous-horloges-247891.asp + +# From Paul Eggert (2014-03-19): # To estimate what the Moroccan government will do in future years, # transition dates for 2014 through 2038 were determined by running # the following program under GNU Emacs 24.3: Modified: stable/6/share/zoneinfo/antarctica ============================================================================== --- stable/6/share/zoneinfo/antarctica Sat Mar 29 04:15:11 2014 (r263901) +++ stable/6/share/zoneinfo/antarctica Sat Mar 29 04:17:46 2014 (r263902) @@ -230,24 +230,41 @@ Zone Antarctica/Syowa 0 - zzz 1957 Jan 2 # year-round base # Scott Base, Ross Island, since 1957-01. # See Pacific/Auckland. -# -# These rules for New Zealand are stolen from the 'australasia' file. -# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule NZAQ 1974 only - Nov 3 2:00s 1:00 D -Rule NZAQ 1975 1988 - Oct lastSun 2:00s 1:00 D -Rule NZAQ 1989 only - Oct 8 2:00s 1:00 D -Rule NZAQ 1990 2006 - Oct Sun>=1 2:00s 1:00 D -Rule NZAQ 1975 only - Feb 23 2:00s 0 S -Rule NZAQ 1976 1989 - Mar Sun>=1 2:00s 0 S -Rule NZAQ 1990 2007 - Mar Sun>=15 2:00s 0 S -Rule NZAQ 2007 max - Sep lastSun 2:00s 1:00 D -Rule NZAQ 2008 max - Apr Sun>=1 2:00s 0 S # Norway - territories # Bouvet (never inhabited) # # claims # Peter I Island (never inhabited) +# +# year-round base +# Troll, Queen Maud Land, -720041+0023206, since 2005-02-12 +# +# From Paul-Inge Flakstad (2014-03-10): +# I recently had a long dialog about this with the developer of timegenie.com. +# In the absence of specific dates, he decided to choose some likely ones: +# GMT +1 - From March 1 to the last Sunday in March +# GMT +2 - From the last Sunday in March until the last Sunday in October +# GMT +1 - From the last Sunday in October until November 7 +# GMT +0 - From November 7 until March 1 +# The dates for switching to and from UTC+0 will probably not be absolutely +# correct, but they should be quite close to the actual dates. +# +# From Paul Eggert (2014-03-21): +# The CET-switching Troll rules require zic from tzcode 2014b or later, so as +# suggested by Bengt-Inge Larsson comment them out for now, and approximate +# with only UTC and CEST. Uncomment them when 2014b is more prevalent. +# +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +#Rule Troll 2005 max - Mar 1 1:00u 1:00 CET +Rule Troll 2005 max - Mar lastSun 1:00u 2:00 CEST +#Rule Troll 2005 max - Oct lastSun 1:00u 1:00 CET +#Rule Troll 2004 max - Nov 7 1:00u 0:00 UTC +# Remove the following line when uncommenting the above '#Rule' lines. +Rule Troll 2004 max - Oct lastSun 1:00u 0:00 UTC +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Antarctica/Troll 0 - zzz 2005 Feb 12 + 0:00 Troll %s # Poland - year-round base # Arctowski, King George Island, -620945-0582745, since 1977 Modified: stable/6/share/zoneinfo/australasia ============================================================================== --- stable/6/share/zoneinfo/australasia Sat Mar 29 04:15:11 2014 (r263901) +++ stable/6/share/zoneinfo/australasia Sat Mar 29 04:17:46 2014 (r263902) @@ -763,14 +763,29 @@ Zone Pacific/Funafuti 11:56:52 - LMT 190 # Johnston # -# From Paul Eggert (2013-09-03): +# From Paul Eggert (2014-03-11): +# Sometimes Johnston kept Hawaii time, and sometimes it was an hour behind. +# Details are uncertain. We have no data for Johnston after 1970, so +# treat it like Hawaii for now. +# # In his memoirs of June 6th to October 4, 1945 # (2005), Herbert C. Bach writes, # "We started our letdown to Kwajalein Atoll and landed there at 5:00 AM # Johnston time, 1:30 AM Kwajalein time." This was in June 1945, and # confirms that Johnston kept the same time as Honolulu in summer 1945. -# We have no better information, so for now, assume this has been true -# indefinitely into the past. +# +# From Lyle McElhaney (2014-03-11): +# [W]hen JI was being used for that [atomic bomb] testing, the time being used +# was not Hawaiian time but rather the same time being used on the ships, +# which had a GMT offset of -11 hours. This apparently applied to at least the +# time from Operation Newsreel (Hardtack I/Teak shot, 1958-08-01) to the last +# Operation Fishbowl shot (Tightrope, 1962-11-04).... [See] Herman Hoerlin, +# "The United States High-Altitude Test Experience: A Review Emphasizing the +# Impact on the Environment", Los Alamos LA-6405, Oct 1976 +# . +# See the table on page 4 where he lists GMT and local times for the tests; a +# footnote for the JI tests reads that local time is "JI time = Hawaii Time +# Minus One Hour". # # See 'northamerica' for Pacific/Johnston. Modified: stable/6/share/zoneinfo/europe ============================================================================== --- stable/6/share/zoneinfo/europe Sat Mar 29 04:15:11 2014 (r263901) +++ stable/6/share/zoneinfo/europe Sat Mar 29 04:17:46 2014 (r263902) @@ -2963,7 +2963,11 @@ Zone Europe/Simferopol 2:16:24 - LMT 188 # Assume it happened in March by not changing the clocks. 3:00 Russia MSK/MSD 1997 3:00 - MSK 1997 Mar lastSun 1:00u - 2:00 EU EE%sT +# From Alexander Krivenyshev (2014-03-17): +# time change at 2:00 (2am) on March 30, 2014 +# http://vz.ru/news/2014/3/17/677464.html + 2:00 EU EE%sT 2014 Mar 30 2:00 + 4:00 - MSK # Vatican City # See Europe/Rome. Modified: stable/6/share/zoneinfo/zone.tab ============================================================================== --- stable/6/share/zoneinfo/zone.tab Sat Mar 29 04:15:11 2014 (r263901) +++ stable/6/share/zoneinfo/zone.tab Sat Mar 29 04:17:46 2014 (r263902) @@ -52,6 +52,7 @@ AQ -6617+11031 Antarctica/Casey Casey St AQ -7824+10654 Antarctica/Vostok Vostok Station, Lake Vostok AQ -6640+14001 Antarctica/DumontDUrville Dumont-d'Urville Station, Terre Adelie AQ -690022+0393524 Antarctica/Syowa Syowa Station, E Ongul I +AQ -720041+0023206 Antarctica/Troll Troll Station, Queen Maud Land AR -3436-05827 America/Argentina/Buenos_Aires Buenos Aires (BA, CF) AR -3124-06411 America/Argentina/Cordoba most locations (CB, CC, CN, ER, FM, MN, SE, SF) AR -2447-06525 America/Argentina/Salta (SA, LP, NQ, RN) @@ -344,6 +345,7 @@ RU +5443+02030 Europe/Kaliningrad Moscow RU +5545+03735 Europe/Moscow Moscow+00 - west Russia RU +4844+04425 Europe/Volgograd Moscow+00 - Caspian Sea RU +5312+05009 Europe/Samara Moscow+00 - Samara, Udmurtia +RU +4457+03406 Europe/Simferopol Moscow+00 - Crimea RU +5651+06036 Asia/Yekaterinburg Moscow+02 - Urals RU +5500+07324 Asia/Omsk Moscow+03 - west Siberia RU +5502+08255 Asia/Novosibirsk Moscow+03 - Novosibirsk @@ -399,7 +401,6 @@ TZ -0648+03917 Africa/Dar_es_Salaam UA +5026+03031 Europe/Kiev most locations UA +4837+02218 Europe/Uzhgorod Ruthenia UA +4750+03510 Europe/Zaporozhye Zaporozh'ye, E Lugansk / Zaporizhia, E Luhansk -UA +4457+03406 Europe/Simferopol central Crimea UG +0019+03225 Africa/Kampala UM +1645-16931 Pacific/Johnston Johnston Atoll UM +2813-17722 Pacific/Midway Midway Islands From owner-svn-src-stable@FreeBSD.ORG Sat Mar 29 04:19:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96B704B3; Sat, 29 Mar 2014 04:19:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74CB4A7; Sat, 29 Mar 2014 04:19:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2T4JnbQ060203; Sat, 29 Mar 2014 04:19:49 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2T4Jmt5060198; Sat, 29 Mar 2014 04:19:48 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201403290419.s2T4Jmt5060198@svn.freebsd.org> From: Edwin Groothuis Date: Sat, 29 Mar 2014 04:19:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r263903 - stable/7/share/zoneinfo X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Mar 2014 04:19:49 -0000 Author: edwin Date: Sat Mar 29 04:19:48 2014 New Revision: 263903 URL: http://svnweb.freebsd.org/changeset/base/263903 Log: MFC of 263901, tzdata2014b - Update antartica. - Comments about historical data for Hawaii. - Update details for Crimea on 30 March - Move location data Simferopol. Modified: stable/7/share/zoneinfo/africa stable/7/share/zoneinfo/antarctica stable/7/share/zoneinfo/australasia stable/7/share/zoneinfo/europe stable/7/share/zoneinfo/zone.tab Directory Properties: stable/7/share/zoneinfo/ (props changed) Modified: stable/7/share/zoneinfo/africa ============================================================================== --- stable/7/share/zoneinfo/africa Sat Mar 29 04:17:46 2014 (r263902) +++ stable/7/share/zoneinfo/africa Sat Mar 29 04:19:48 2014 (r263903) @@ -868,7 +868,10 @@ Zone Indian/Mayotte 3:00:56 - LMT 1911 J # Another source (specifying the time for start and end in the decree): # http://www.lemag.ma/Heure-d-ete-au-Maroc-jusqu-au-27-octobre_a75620.html -# From Paul Eggert (2013-10-03): +# From Sebastien Willemijns (2014-03-18): +# http://www.afriquinfos.com/articles/2014/3/18/maroc-heure-dete-avancez-tous-horloges-247891.asp + +# From Paul Eggert (2014-03-19): # To estimate what the Moroccan government will do in future years, # transition dates for 2014 through 2038 were determined by running # the following program under GNU Emacs 24.3: Modified: stable/7/share/zoneinfo/antarctica ============================================================================== --- stable/7/share/zoneinfo/antarctica Sat Mar 29 04:17:46 2014 (r263902) +++ stable/7/share/zoneinfo/antarctica Sat Mar 29 04:19:48 2014 (r263903) @@ -230,24 +230,41 @@ Zone Antarctica/Syowa 0 - zzz 1957 Jan 2 # year-round base # Scott Base, Ross Island, since 1957-01. # See Pacific/Auckland. -# -# These rules for New Zealand are stolen from the 'australasia' file. -# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule NZAQ 1974 only - Nov 3 2:00s 1:00 D -Rule NZAQ 1975 1988 - Oct lastSun 2:00s 1:00 D -Rule NZAQ 1989 only - Oct 8 2:00s 1:00 D -Rule NZAQ 1990 2006 - Oct Sun>=1 2:00s 1:00 D -Rule NZAQ 1975 only - Feb 23 2:00s 0 S -Rule NZAQ 1976 1989 - Mar Sun>=1 2:00s 0 S -Rule NZAQ 1990 2007 - Mar Sun>=15 2:00s 0 S -Rule NZAQ 2007 max - Sep lastSun 2:00s 1:00 D -Rule NZAQ 2008 max - Apr Sun>=1 2:00s 0 S # Norway - territories # Bouvet (never inhabited) # # claims # Peter I Island (never inhabited) +# +# year-round base +# Troll, Queen Maud Land, -720041+0023206, since 2005-02-12 +# +# From Paul-Inge Flakstad (2014-03-10): +# I recently had a long dialog about this with the developer of timegenie.com. +# In the absence of specific dates, he decided to choose some likely ones: +# GMT +1 - From March 1 to the last Sunday in March +# GMT +2 - From the last Sunday in March until the last Sunday in October +# GMT +1 - From the last Sunday in October until November 7 +# GMT +0 - From November 7 until March 1 +# The dates for switching to and from UTC+0 will probably not be absolutely +# correct, but they should be quite close to the actual dates. +# +# From Paul Eggert (2014-03-21): +# The CET-switching Troll rules require zic from tzcode 2014b or later, so as +# suggested by Bengt-Inge Larsson comment them out for now, and approximate +# with only UTC and CEST. Uncomment them when 2014b is more prevalent. +# +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +#Rule Troll 2005 max - Mar 1 1:00u 1:00 CET +Rule Troll 2005 max - Mar lastSun 1:00u 2:00 CEST +#Rule Troll 2005 max - Oct lastSun 1:00u 1:00 CET +#Rule Troll 2004 max - Nov 7 1:00u 0:00 UTC +# Remove the following line when uncommenting the above '#Rule' lines. +Rule Troll 2004 max - Oct lastSun 1:00u 0:00 UTC +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Antarctica/Troll 0 - zzz 2005 Feb 12 + 0:00 Troll %s # Poland - year-round base # Arctowski, King George Island, -620945-0582745, since 1977 Modified: stable/7/share/zoneinfo/australasia ============================================================================== --- stable/7/share/zoneinfo/australasia Sat Mar 29 04:17:46 2014 (r263902) +++ stable/7/share/zoneinfo/australasia Sat Mar 29 04:19:48 2014 (r263903) @@ -763,14 +763,29 @@ Zone Pacific/Funafuti 11:56:52 - LMT 190 # Johnston # -# From Paul Eggert (2013-09-03): +# From Paul Eggert (2014-03-11): +# Sometimes Johnston kept Hawaii time, and sometimes it was an hour behind. +# Details are uncertain. We have no data for Johnston after 1970, so +# treat it like Hawaii for now. +# # In his memoirs of June 6th to October 4, 1945 # (2005), Herbert C. Bach writes, # "We started our letdown to Kwajalein Atoll and landed there at 5:00 AM # Johnston time, 1:30 AM Kwajalein time." This was in June 1945, and # confirms that Johnston kept the same time as Honolulu in summer 1945. -# We have no better information, so for now, assume this has been true -# indefinitely into the past. +# +# From Lyle McElhaney (2014-03-11): +# [W]hen JI was being used for that [atomic bomb] testing, the time being used +# was not Hawaiian time but rather the same time being used on the ships, +# which had a GMT offset of -11 hours. This apparently applied to at least the +# time from Operation Newsreel (Hardtack I/Teak shot, 1958-08-01) to the last +# Operation Fishbowl shot (Tightrope, 1962-11-04).... [See] Herman Hoerlin, +# "The United States High-Altitude Test Experience: A Review Emphasizing the +# Impact on the Environment", Los Alamos LA-6405, Oct 1976 +# . +# See the table on page 4 where he lists GMT and local times for the tests; a +# footnote for the JI tests reads that local time is "JI time = Hawaii Time +# Minus One Hour". # # See 'northamerica' for Pacific/Johnston. Modified: stable/7/share/zoneinfo/europe ============================================================================== --- stable/7/share/zoneinfo/europe Sat Mar 29 04:17:46 2014 (r263902) +++ stable/7/share/zoneinfo/europe Sat Mar 29 04:19:48 2014 (r263903) @@ -2963,7 +2963,11 @@ Zone Europe/Simferopol 2:16:24 - LMT 188 # Assume it happened in March by not changing the clocks. 3:00 Russia MSK/MSD 1997 3:00 - MSK 1997 Mar lastSun 1:00u - 2:00 EU EE%sT +# From Alexander Krivenyshev (2014-03-17): +# time change at 2:00 (2am) on March 30, 2014 +# http://vz.ru/news/2014/3/17/677464.html + 2:00 EU EE%sT 2014 Mar 30 2:00 + 4:00 - MSK # Vatican City # See Europe/Rome. Modified: stable/7/share/zoneinfo/zone.tab ============================================================================== --- stable/7/share/zoneinfo/zone.tab Sat Mar 29 04:17:46 2014 (r263902) +++ stable/7/share/zoneinfo/zone.tab Sat Mar 29 04:19:48 2014 (r263903) @@ -52,6 +52,7 @@ AQ -6617+11031 Antarctica/Casey Casey St AQ -7824+10654 Antarctica/Vostok Vostok Station, Lake Vostok AQ -6640+14001 Antarctica/DumontDUrville Dumont-d'Urville Station, Terre Adelie AQ -690022+0393524 Antarctica/Syowa Syowa Station, E Ongul I +AQ -720041+0023206 Antarctica/Troll Troll Station, Queen Maud Land AR -3436-05827 America/Argentina/Buenos_Aires Buenos Aires (BA, CF) AR -3124-06411 America/Argentina/Cordoba most locations (CB, CC, CN, ER, FM, MN, SE, SF) AR -2447-06525 America/Argentina/Salta (SA, LP, NQ, RN) @@ -344,6 +345,7 @@ RU +5443+02030 Europe/Kaliningrad Moscow RU +5545+03735 Europe/Moscow Moscow+00 - west Russia RU +4844+04425 Europe/Volgograd Moscow+00 - Caspian Sea RU +5312+05009 Europe/Samara Moscow+00 - Samara, Udmurtia +RU +4457+03406 Europe/Simferopol Moscow+00 - Crimea RU +5651+06036 Asia/Yekaterinburg Moscow+02 - Urals RU +5500+07324 Asia/Omsk Moscow+03 - west Siberia RU +5502+08255 Asia/Novosibirsk Moscow+03 - Novosibirsk @@ -399,7 +401,6 @@ TZ -0648+03917 Africa/Dar_es_Salaam UA +5026+03031 Europe/Kiev most locations UA +4837+02218 Europe/Uzhgorod Ruthenia UA +4750+03510 Europe/Zaporozhye Zaporozh'ye, E Lugansk / Zaporizhia, E Luhansk -UA +4457+03406 Europe/Simferopol central Crimea UG +0019+03225 Africa/Kampala UM +1645-16931 Pacific/Johnston Johnston Atoll UM +2813-17722 Pacific/Midway Midway Islands From owner-svn-src-stable@FreeBSD.ORG Sat Mar 29 04:20:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D03D3606; Sat, 29 Mar 2014 04:20:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB412C2; Sat, 29 Mar 2014 04:20:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2T4KvO0060775; Sat, 29 Mar 2014 04:20:57 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2T4KuVA060770; Sat, 29 Mar 2014 04:20:56 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201403290420.s2T4KuVA060770@svn.freebsd.org> From: Edwin Groothuis Date: Sat, 29 Mar 2014 04:20:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r263904 - stable/8/share/zoneinfo X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Mar 2014 04:20:57 -0000 Author: edwin Date: Sat Mar 29 04:20:55 2014 New Revision: 263904 URL: http://svnweb.freebsd.org/changeset/base/263904 Log: MFC of 263901, tzdata2014b - Update antartica. - Comments about historical data for Hawaii. - Update details for Crimea on 30 March - Move location data Simferopol. Modified: stable/8/share/zoneinfo/africa stable/8/share/zoneinfo/antarctica stable/8/share/zoneinfo/australasia stable/8/share/zoneinfo/europe stable/8/share/zoneinfo/zone.tab Directory Properties: stable/8/share/zoneinfo/ (props changed) Modified: stable/8/share/zoneinfo/africa ============================================================================== --- stable/8/share/zoneinfo/africa Sat Mar 29 04:19:48 2014 (r263903) +++ stable/8/share/zoneinfo/africa Sat Mar 29 04:20:55 2014 (r263904) @@ -868,7 +868,10 @@ Zone Indian/Mayotte 3:00:56 - LMT 1911 J # Another source (specifying the time for start and end in the decree): # http://www.lemag.ma/Heure-d-ete-au-Maroc-jusqu-au-27-octobre_a75620.html -# From Paul Eggert (2013-10-03): +# From Sebastien Willemijns (2014-03-18): +# http://www.afriquinfos.com/articles/2014/3/18/maroc-heure-dete-avancez-tous-horloges-247891.asp + +# From Paul Eggert (2014-03-19): # To estimate what the Moroccan government will do in future years, # transition dates for 2014 through 2038 were determined by running # the following program under GNU Emacs 24.3: Modified: stable/8/share/zoneinfo/antarctica ============================================================================== --- stable/8/share/zoneinfo/antarctica Sat Mar 29 04:19:48 2014 (r263903) +++ stable/8/share/zoneinfo/antarctica Sat Mar 29 04:20:55 2014 (r263904) @@ -230,24 +230,41 @@ Zone Antarctica/Syowa 0 - zzz 1957 Jan 2 # year-round base # Scott Base, Ross Island, since 1957-01. # See Pacific/Auckland. -# -# These rules for New Zealand are stolen from the 'australasia' file. -# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule NZAQ 1974 only - Nov 3 2:00s 1:00 D -Rule NZAQ 1975 1988 - Oct lastSun 2:00s 1:00 D -Rule NZAQ 1989 only - Oct 8 2:00s 1:00 D -Rule NZAQ 1990 2006 - Oct Sun>=1 2:00s 1:00 D -Rule NZAQ 1975 only - Feb 23 2:00s 0 S -Rule NZAQ 1976 1989 - Mar Sun>=1 2:00s 0 S -Rule NZAQ 1990 2007 - Mar Sun>=15 2:00s 0 S -Rule NZAQ 2007 max - Sep lastSun 2:00s 1:00 D -Rule NZAQ 2008 max - Apr Sun>=1 2:00s 0 S # Norway - territories # Bouvet (never inhabited) # # claims # Peter I Island (never inhabited) +# +# year-round base +# Troll, Queen Maud Land, -720041+0023206, since 2005-02-12 +# +# From Paul-Inge Flakstad (2014-03-10): +# I recently had a long dialog about this with the developer of timegenie.com. +# In the absence of specific dates, he decided to choose some likely ones: +# GMT +1 - From March 1 to the last Sunday in March +# GMT +2 - From the last Sunday in March until the last Sunday in October +# GMT +1 - From the last Sunday in October until November 7 +# GMT +0 - From November 7 until March 1 +# The dates for switching to and from UTC+0 will probably not be absolutely +# correct, but they should be quite close to the actual dates. +# +# From Paul Eggert (2014-03-21): +# The CET-switching Troll rules require zic from tzcode 2014b or later, so as +# suggested by Bengt-Inge Larsson comment them out for now, and approximate +# with only UTC and CEST. Uncomment them when 2014b is more prevalent. +# +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +#Rule Troll 2005 max - Mar 1 1:00u 1:00 CET +Rule Troll 2005 max - Mar lastSun 1:00u 2:00 CEST +#Rule Troll 2005 max - Oct lastSun 1:00u 1:00 CET +#Rule Troll 2004 max - Nov 7 1:00u 0:00 UTC +# Remove the following line when uncommenting the above '#Rule' lines. +Rule Troll 2004 max - Oct lastSun 1:00u 0:00 UTC +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Antarctica/Troll 0 - zzz 2005 Feb 12 + 0:00 Troll %s # Poland - year-round base # Arctowski, King George Island, -620945-0582745, since 1977 Modified: stable/8/share/zoneinfo/australasia ============================================================================== --- stable/8/share/zoneinfo/australasia Sat Mar 29 04:19:48 2014 (r263903) +++ stable/8/share/zoneinfo/australasia Sat Mar 29 04:20:55 2014 (r263904) @@ -763,14 +763,29 @@ Zone Pacific/Funafuti 11:56:52 - LMT 190 # Johnston # -# From Paul Eggert (2013-09-03): +# From Paul Eggert (2014-03-11): +# Sometimes Johnston kept Hawaii time, and sometimes it was an hour behind. +# Details are uncertain. We have no data for Johnston after 1970, so +# treat it like Hawaii for now. +# # In his memoirs of June 6th to October 4, 1945 # (2005), Herbert C. Bach writes, # "We started our letdown to Kwajalein Atoll and landed there at 5:00 AM # Johnston time, 1:30 AM Kwajalein time." This was in June 1945, and # confirms that Johnston kept the same time as Honolulu in summer 1945. -# We have no better information, so for now, assume this has been true -# indefinitely into the past. +# +# From Lyle McElhaney (2014-03-11): +# [W]hen JI was being used for that [atomic bomb] testing, the time being used +# was not Hawaiian time but rather the same time being used on the ships, +# which had a GMT offset of -11 hours. This apparently applied to at least the +# time from Operation Newsreel (Hardtack I/Teak shot, 1958-08-01) to the last +# Operation Fishbowl shot (Tightrope, 1962-11-04).... [See] Herman Hoerlin, +# "The United States High-Altitude Test Experience: A Review Emphasizing the +# Impact on the Environment", Los Alamos LA-6405, Oct 1976 +# . +# See the table on page 4 where he lists GMT and local times for the tests; a +# footnote for the JI tests reads that local time is "JI time = Hawaii Time +# Minus One Hour". # # See 'northamerica' for Pacific/Johnston. Modified: stable/8/share/zoneinfo/europe ============================================================================== --- stable/8/share/zoneinfo/europe Sat Mar 29 04:19:48 2014 (r263903) +++ stable/8/share/zoneinfo/europe Sat Mar 29 04:20:55 2014 (r263904) @@ -2963,7 +2963,11 @@ Zone Europe/Simferopol 2:16:24 - LMT 188 # Assume it happened in March by not changing the clocks. 3:00 Russia MSK/MSD 1997 3:00 - MSK 1997 Mar lastSun 1:00u - 2:00 EU EE%sT +# From Alexander Krivenyshev (2014-03-17): +# time change at 2:00 (2am) on March 30, 2014 +# http://vz.ru/news/2014/3/17/677464.html + 2:00 EU EE%sT 2014 Mar 30 2:00 + 4:00 - MSK # Vatican City # See Europe/Rome. Modified: stable/8/share/zoneinfo/zone.tab ============================================================================== --- stable/8/share/zoneinfo/zone.tab Sat Mar 29 04:19:48 2014 (r263903) +++ stable/8/share/zoneinfo/zone.tab Sat Mar 29 04:20:55 2014 (r263904) @@ -52,6 +52,7 @@ AQ -6617+11031 Antarctica/Casey Casey St AQ -7824+10654 Antarctica/Vostok Vostok Station, Lake Vostok AQ -6640+14001 Antarctica/DumontDUrville Dumont-d'Urville Station, Terre Adelie AQ -690022+0393524 Antarctica/Syowa Syowa Station, E Ongul I +AQ -720041+0023206 Antarctica/Troll Troll Station, Queen Maud Land AR -3436-05827 America/Argentina/Buenos_Aires Buenos Aires (BA, CF) AR -3124-06411 America/Argentina/Cordoba most locations (CB, CC, CN, ER, FM, MN, SE, SF) AR -2447-06525 America/Argentina/Salta (SA, LP, NQ, RN) @@ -344,6 +345,7 @@ RU +5443+02030 Europe/Kaliningrad Moscow RU +5545+03735 Europe/Moscow Moscow+00 - west Russia RU +4844+04425 Europe/Volgograd Moscow+00 - Caspian Sea RU +5312+05009 Europe/Samara Moscow+00 - Samara, Udmurtia +RU +4457+03406 Europe/Simferopol Moscow+00 - Crimea RU +5651+06036 Asia/Yekaterinburg Moscow+02 - Urals RU +5500+07324 Asia/Omsk Moscow+03 - west Siberia RU +5502+08255 Asia/Novosibirsk Moscow+03 - Novosibirsk @@ -399,7 +401,6 @@ TZ -0648+03917 Africa/Dar_es_Salaam UA +5026+03031 Europe/Kiev most locations UA +4837+02218 Europe/Uzhgorod Ruthenia UA +4750+03510 Europe/Zaporozhye Zaporozh'ye, E Lugansk / Zaporizhia, E Luhansk -UA +4457+03406 Europe/Simferopol central Crimea UG +0019+03225 Africa/Kampala UM +1645-16931 Pacific/Johnston Johnston Atoll UM +2813-17722 Pacific/Midway Midway Islands From owner-svn-src-stable@FreeBSD.ORG Sat Mar 29 04:25:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B67AD7AF; Sat, 29 Mar 2014 04:25:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96A04171; Sat, 29 Mar 2014 04:25:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2T4P5at064101; Sat, 29 Mar 2014 04:25:05 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2T4P4uD064095; Sat, 29 Mar 2014 04:25:04 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201403290425.s2T4P4uD064095@svn.freebsd.org> From: Edwin Groothuis Date: Sat, 29 Mar 2014 04:25:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263905 - stable/9/contrib/tzdata X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Mar 2014 04:25:05 -0000 Author: edwin Date: Sat Mar 29 04:25:04 2014 New Revision: 263905 URL: http://svnweb.freebsd.org/changeset/base/263905 Log: MFC of 263901, tzdata2014b - Update antartica. - Comments about historical data for Hawaii. - Update details for Crimea on 30 March - Move location data Simferopol. Modified: stable/9/contrib/tzdata/africa stable/9/contrib/tzdata/antarctica stable/9/contrib/tzdata/australasia stable/9/contrib/tzdata/europe stable/9/contrib/tzdata/zone.tab Directory Properties: stable/9/contrib/tzdata/ (props changed) Modified: stable/9/contrib/tzdata/africa ============================================================================== --- stable/9/contrib/tzdata/africa Sat Mar 29 04:20:55 2014 (r263904) +++ stable/9/contrib/tzdata/africa Sat Mar 29 04:25:04 2014 (r263905) @@ -868,7 +868,10 @@ Zone Indian/Mayotte 3:00:56 - LMT 1911 J # Another source (specifying the time for start and end in the decree): # http://www.lemag.ma/Heure-d-ete-au-Maroc-jusqu-au-27-octobre_a75620.html -# From Paul Eggert (2013-10-03): +# From Sebastien Willemijns (2014-03-18): +# http://www.afriquinfos.com/articles/2014/3/18/maroc-heure-dete-avancez-tous-horloges-247891.asp + +# From Paul Eggert (2014-03-19): # To estimate what the Moroccan government will do in future years, # transition dates for 2014 through 2038 were determined by running # the following program under GNU Emacs 24.3: Modified: stable/9/contrib/tzdata/antarctica ============================================================================== --- stable/9/contrib/tzdata/antarctica Sat Mar 29 04:20:55 2014 (r263904) +++ stable/9/contrib/tzdata/antarctica Sat Mar 29 04:25:04 2014 (r263905) @@ -230,24 +230,41 @@ Zone Antarctica/Syowa 0 - zzz 1957 Jan 2 # year-round base # Scott Base, Ross Island, since 1957-01. # See Pacific/Auckland. -# -# These rules for New Zealand are stolen from the 'australasia' file. -# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule NZAQ 1974 only - Nov 3 2:00s 1:00 D -Rule NZAQ 1975 1988 - Oct lastSun 2:00s 1:00 D -Rule NZAQ 1989 only - Oct 8 2:00s 1:00 D -Rule NZAQ 1990 2006 - Oct Sun>=1 2:00s 1:00 D -Rule NZAQ 1975 only - Feb 23 2:00s 0 S -Rule NZAQ 1976 1989 - Mar Sun>=1 2:00s 0 S -Rule NZAQ 1990 2007 - Mar Sun>=15 2:00s 0 S -Rule NZAQ 2007 max - Sep lastSun 2:00s 1:00 D -Rule NZAQ 2008 max - Apr Sun>=1 2:00s 0 S # Norway - territories # Bouvet (never inhabited) # # claims # Peter I Island (never inhabited) +# +# year-round base +# Troll, Queen Maud Land, -720041+0023206, since 2005-02-12 +# +# From Paul-Inge Flakstad (2014-03-10): +# I recently had a long dialog about this with the developer of timegenie.com. +# In the absence of specific dates, he decided to choose some likely ones: +# GMT +1 - From March 1 to the last Sunday in March +# GMT +2 - From the last Sunday in March until the last Sunday in October +# GMT +1 - From the last Sunday in October until November 7 +# GMT +0 - From November 7 until March 1 +# The dates for switching to and from UTC+0 will probably not be absolutely +# correct, but they should be quite close to the actual dates. +# +# From Paul Eggert (2014-03-21): +# The CET-switching Troll rules require zic from tzcode 2014b or later, so as +# suggested by Bengt-Inge Larsson comment them out for now, and approximate +# with only UTC and CEST. Uncomment them when 2014b is more prevalent. +# +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +#Rule Troll 2005 max - Mar 1 1:00u 1:00 CET +Rule Troll 2005 max - Mar lastSun 1:00u 2:00 CEST +#Rule Troll 2005 max - Oct lastSun 1:00u 1:00 CET +#Rule Troll 2004 max - Nov 7 1:00u 0:00 UTC +# Remove the following line when uncommenting the above '#Rule' lines. +Rule Troll 2004 max - Oct lastSun 1:00u 0:00 UTC +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Antarctica/Troll 0 - zzz 2005 Feb 12 + 0:00 Troll %s # Poland - year-round base # Arctowski, King George Island, -620945-0582745, since 1977 Modified: stable/9/contrib/tzdata/australasia ============================================================================== --- stable/9/contrib/tzdata/australasia Sat Mar 29 04:20:55 2014 (r263904) +++ stable/9/contrib/tzdata/australasia Sat Mar 29 04:25:04 2014 (r263905) @@ -763,14 +763,29 @@ Zone Pacific/Funafuti 11:56:52 - LMT 190 # Johnston # -# From Paul Eggert (2013-09-03): +# From Paul Eggert (2014-03-11): +# Sometimes Johnston kept Hawaii time, and sometimes it was an hour behind. +# Details are uncertain. We have no data for Johnston after 1970, so +# treat it like Hawaii for now. +# # In his memoirs of June 6th to October 4, 1945 # (2005), Herbert C. Bach writes, # "We started our letdown to Kwajalein Atoll and landed there at 5:00 AM # Johnston time, 1:30 AM Kwajalein time." This was in June 1945, and # confirms that Johnston kept the same time as Honolulu in summer 1945. -# We have no better information, so for now, assume this has been true -# indefinitely into the past. +# +# From Lyle McElhaney (2014-03-11): +# [W]hen JI was being used for that [atomic bomb] testing, the time being used +# was not Hawaiian time but rather the same time being used on the ships, +# which had a GMT offset of -11 hours. This apparently applied to at least the +# time from Operation Newsreel (Hardtack I/Teak shot, 1958-08-01) to the last +# Operation Fishbowl shot (Tightrope, 1962-11-04).... [See] Herman Hoerlin, +# "The United States High-Altitude Test Experience: A Review Emphasizing the +# Impact on the Environment", Los Alamos LA-6405, Oct 1976 +# . +# See the table on page 4 where he lists GMT and local times for the tests; a +# footnote for the JI tests reads that local time is "JI time = Hawaii Time +# Minus One Hour". # # See 'northamerica' for Pacific/Johnston. Modified: stable/9/contrib/tzdata/europe ============================================================================== --- stable/9/contrib/tzdata/europe Sat Mar 29 04:20:55 2014 (r263904) +++ stable/9/contrib/tzdata/europe Sat Mar 29 04:25:04 2014 (r263905) @@ -2963,7 +2963,11 @@ Zone Europe/Simferopol 2:16:24 - LMT 188 # Assume it happened in March by not changing the clocks. 3:00 Russia MSK/MSD 1997 3:00 - MSK 1997 Mar lastSun 1:00u - 2:00 EU EE%sT +# From Alexander Krivenyshev (2014-03-17): +# time change at 2:00 (2am) on March 30, 2014 +# http://vz.ru/news/2014/3/17/677464.html + 2:00 EU EE%sT 2014 Mar 30 2:00 + 4:00 - MSK # Vatican City # See Europe/Rome. Modified: stable/9/contrib/tzdata/zone.tab ============================================================================== --- stable/9/contrib/tzdata/zone.tab Sat Mar 29 04:20:55 2014 (r263904) +++ stable/9/contrib/tzdata/zone.tab Sat Mar 29 04:25:04 2014 (r263905) @@ -52,6 +52,7 @@ AQ -6617+11031 Antarctica/Casey Casey St AQ -7824+10654 Antarctica/Vostok Vostok Station, Lake Vostok AQ -6640+14001 Antarctica/DumontDUrville Dumont-d'Urville Station, Terre Adelie AQ -690022+0393524 Antarctica/Syowa Syowa Station, E Ongul I +AQ -720041+0023206 Antarctica/Troll Troll Station, Queen Maud Land AR -3436-05827 America/Argentina/Buenos_Aires Buenos Aires (BA, CF) AR -3124-06411 America/Argentina/Cordoba most locations (CB, CC, CN, ER, FM, MN, SE, SF) AR -2447-06525 America/Argentina/Salta (SA, LP, NQ, RN) @@ -344,6 +345,7 @@ RU +5443+02030 Europe/Kaliningrad Moscow RU +5545+03735 Europe/Moscow Moscow+00 - west Russia RU +4844+04425 Europe/Volgograd Moscow+00 - Caspian Sea RU +5312+05009 Europe/Samara Moscow+00 - Samara, Udmurtia +RU +4457+03406 Europe/Simferopol Moscow+00 - Crimea RU +5651+06036 Asia/Yekaterinburg Moscow+02 - Urals RU +5500+07324 Asia/Omsk Moscow+03 - west Siberia RU +5502+08255 Asia/Novosibirsk Moscow+03 - Novosibirsk @@ -399,7 +401,6 @@ TZ -0648+03917 Africa/Dar_es_Salaam UA +5026+03031 Europe/Kiev most locations UA +4837+02218 Europe/Uzhgorod Ruthenia UA +4750+03510 Europe/Zaporozhye Zaporozh'ye, E Lugansk / Zaporizhia, E Luhansk -UA +4457+03406 Europe/Simferopol central Crimea UG +0019+03225 Africa/Kampala UM +1645-16931 Pacific/Johnston Johnston Atoll UM +2813-17722 Pacific/Midway Midway Islands From owner-svn-src-stable@FreeBSD.ORG Sat Mar 29 04:44:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF2C5F62; Sat, 29 Mar 2014 04:44:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF90430A; Sat, 29 Mar 2014 04:44:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2T4iPG3072355; Sat, 29 Mar 2014 04:44:25 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2T4iOhX072350; Sat, 29 Mar 2014 04:44:24 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201403290444.s2T4iOhX072350@svn.freebsd.org> From: Edwin Groothuis Date: Sat, 29 Mar 2014 04:44:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263906 - stable/10/contrib/tzdata X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Mar 2014 04:44:26 -0000 Author: edwin Date: Sat Mar 29 04:44:24 2014 New Revision: 263906 URL: http://svnweb.freebsd.org/changeset/base/263906 Log: MFC of 263901, tzdata2014b - Update antartica. - Comments about historical data for Hawaii. - Update details for Crimea on 30 March - Move location data Simferopol. Modified: stable/10/contrib/tzdata/africa stable/10/contrib/tzdata/antarctica stable/10/contrib/tzdata/australasia stable/10/contrib/tzdata/europe stable/10/contrib/tzdata/zone.tab Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/tzdata/africa ============================================================================== --- stable/10/contrib/tzdata/africa Sat Mar 29 04:25:04 2014 (r263905) +++ stable/10/contrib/tzdata/africa Sat Mar 29 04:44:24 2014 (r263906) @@ -868,7 +868,10 @@ Zone Indian/Mayotte 3:00:56 - LMT 1911 J # Another source (specifying the time for start and end in the decree): # http://www.lemag.ma/Heure-d-ete-au-Maroc-jusqu-au-27-octobre_a75620.html -# From Paul Eggert (2013-10-03): +# From Sebastien Willemijns (2014-03-18): +# http://www.afriquinfos.com/articles/2014/3/18/maroc-heure-dete-avancez-tous-horloges-247891.asp + +# From Paul Eggert (2014-03-19): # To estimate what the Moroccan government will do in future years, # transition dates for 2014 through 2038 were determined by running # the following program under GNU Emacs 24.3: Modified: stable/10/contrib/tzdata/antarctica ============================================================================== --- stable/10/contrib/tzdata/antarctica Sat Mar 29 04:25:04 2014 (r263905) +++ stable/10/contrib/tzdata/antarctica Sat Mar 29 04:44:24 2014 (r263906) @@ -230,24 +230,41 @@ Zone Antarctica/Syowa 0 - zzz 1957 Jan 2 # year-round base # Scott Base, Ross Island, since 1957-01. # See Pacific/Auckland. -# -# These rules for New Zealand are stolen from the 'australasia' file. -# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule NZAQ 1974 only - Nov 3 2:00s 1:00 D -Rule NZAQ 1975 1988 - Oct lastSun 2:00s 1:00 D -Rule NZAQ 1989 only - Oct 8 2:00s 1:00 D -Rule NZAQ 1990 2006 - Oct Sun>=1 2:00s 1:00 D -Rule NZAQ 1975 only - Feb 23 2:00s 0 S -Rule NZAQ 1976 1989 - Mar Sun>=1 2:00s 0 S -Rule NZAQ 1990 2007 - Mar Sun>=15 2:00s 0 S -Rule NZAQ 2007 max - Sep lastSun 2:00s 1:00 D -Rule NZAQ 2008 max - Apr Sun>=1 2:00s 0 S # Norway - territories # Bouvet (never inhabited) # # claims # Peter I Island (never inhabited) +# +# year-round base +# Troll, Queen Maud Land, -720041+0023206, since 2005-02-12 +# +# From Paul-Inge Flakstad (2014-03-10): +# I recently had a long dialog about this with the developer of timegenie.com. +# In the absence of specific dates, he decided to choose some likely ones: +# GMT +1 - From March 1 to the last Sunday in March +# GMT +2 - From the last Sunday in March until the last Sunday in October +# GMT +1 - From the last Sunday in October until November 7 +# GMT +0 - From November 7 until March 1 +# The dates for switching to and from UTC+0 will probably not be absolutely +# correct, but they should be quite close to the actual dates. +# +# From Paul Eggert (2014-03-21): +# The CET-switching Troll rules require zic from tzcode 2014b or later, so as +# suggested by Bengt-Inge Larsson comment them out for now, and approximate +# with only UTC and CEST. Uncomment them when 2014b is more prevalent. +# +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +#Rule Troll 2005 max - Mar 1 1:00u 1:00 CET +Rule Troll 2005 max - Mar lastSun 1:00u 2:00 CEST +#Rule Troll 2005 max - Oct lastSun 1:00u 1:00 CET +#Rule Troll 2004 max - Nov 7 1:00u 0:00 UTC +# Remove the following line when uncommenting the above '#Rule' lines. +Rule Troll 2004 max - Oct lastSun 1:00u 0:00 UTC +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Antarctica/Troll 0 - zzz 2005 Feb 12 + 0:00 Troll %s # Poland - year-round base # Arctowski, King George Island, -620945-0582745, since 1977 Modified: stable/10/contrib/tzdata/australasia ============================================================================== --- stable/10/contrib/tzdata/australasia Sat Mar 29 04:25:04 2014 (r263905) +++ stable/10/contrib/tzdata/australasia Sat Mar 29 04:44:24 2014 (r263906) @@ -763,14 +763,29 @@ Zone Pacific/Funafuti 11:56:52 - LMT 190 # Johnston # -# From Paul Eggert (2013-09-03): +# From Paul Eggert (2014-03-11): +# Sometimes Johnston kept Hawaii time, and sometimes it was an hour behind. +# Details are uncertain. We have no data for Johnston after 1970, so +# treat it like Hawaii for now. +# # In his memoirs of June 6th to October 4, 1945 # (2005), Herbert C. Bach writes, # "We started our letdown to Kwajalein Atoll and landed there at 5:00 AM # Johnston time, 1:30 AM Kwajalein time." This was in June 1945, and # confirms that Johnston kept the same time as Honolulu in summer 1945. -# We have no better information, so for now, assume this has been true -# indefinitely into the past. +# +# From Lyle McElhaney (2014-03-11): +# [W]hen JI was being used for that [atomic bomb] testing, the time being used +# was not Hawaiian time but rather the same time being used on the ships, +# which had a GMT offset of -11 hours. This apparently applied to at least the +# time from Operation Newsreel (Hardtack I/Teak shot, 1958-08-01) to the last +# Operation Fishbowl shot (Tightrope, 1962-11-04).... [See] Herman Hoerlin, +# "The United States High-Altitude Test Experience: A Review Emphasizing the +# Impact on the Environment", Los Alamos LA-6405, Oct 1976 +# . +# See the table on page 4 where he lists GMT and local times for the tests; a +# footnote for the JI tests reads that local time is "JI time = Hawaii Time +# Minus One Hour". # # See 'northamerica' for Pacific/Johnston. Modified: stable/10/contrib/tzdata/europe ============================================================================== --- stable/10/contrib/tzdata/europe Sat Mar 29 04:25:04 2014 (r263905) +++ stable/10/contrib/tzdata/europe Sat Mar 29 04:44:24 2014 (r263906) @@ -2963,7 +2963,11 @@ Zone Europe/Simferopol 2:16:24 - LMT 188 # Assume it happened in March by not changing the clocks. 3:00 Russia MSK/MSD 1997 3:00 - MSK 1997 Mar lastSun 1:00u - 2:00 EU EE%sT +# From Alexander Krivenyshev (2014-03-17): +# time change at 2:00 (2am) on March 30, 2014 +# http://vz.ru/news/2014/3/17/677464.html + 2:00 EU EE%sT 2014 Mar 30 2:00 + 4:00 - MSK # Vatican City # See Europe/Rome. Modified: stable/10/contrib/tzdata/zone.tab ============================================================================== --- stable/10/contrib/tzdata/zone.tab Sat Mar 29 04:25:04 2014 (r263905) +++ stable/10/contrib/tzdata/zone.tab Sat Mar 29 04:44:24 2014 (r263906) @@ -52,6 +52,7 @@ AQ -6617+11031 Antarctica/Casey Casey St AQ -7824+10654 Antarctica/Vostok Vostok Station, Lake Vostok AQ -6640+14001 Antarctica/DumontDUrville Dumont-d'Urville Station, Terre Adelie AQ -690022+0393524 Antarctica/Syowa Syowa Station, E Ongul I +AQ -720041+0023206 Antarctica/Troll Troll Station, Queen Maud Land AR -3436-05827 America/Argentina/Buenos_Aires Buenos Aires (BA, CF) AR -3124-06411 America/Argentina/Cordoba most locations (CB, CC, CN, ER, FM, MN, SE, SF) AR -2447-06525 America/Argentina/Salta (SA, LP, NQ, RN) @@ -344,6 +345,7 @@ RU +5443+02030 Europe/Kaliningrad Moscow RU +5545+03735 Europe/Moscow Moscow+00 - west Russia RU +4844+04425 Europe/Volgograd Moscow+00 - Caspian Sea RU +5312+05009 Europe/Samara Moscow+00 - Samara, Udmurtia +RU +4457+03406 Europe/Simferopol Moscow+00 - Crimea RU +5651+06036 Asia/Yekaterinburg Moscow+02 - Urals RU +5500+07324 Asia/Omsk Moscow+03 - west Siberia RU +5502+08255 Asia/Novosibirsk Moscow+03 - Novosibirsk @@ -399,7 +401,6 @@ TZ -0648+03917 Africa/Dar_es_Salaam UA +5026+03031 Europe/Kiev most locations UA +4837+02218 Europe/Uzhgorod Ruthenia UA +4750+03510 Europe/Zaporozhye Zaporozh'ye, E Lugansk / Zaporizhia, E Luhansk -UA +4457+03406 Europe/Simferopol central Crimea UG +0019+03225 Africa/Kampala UM +1645-16931 Pacific/Johnston Johnston Atoll UM +2813-17722 Pacific/Midway Midway Islands From owner-svn-src-stable@FreeBSD.ORG Sat Mar 29 11:33:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1672C944; Sat, 29 Mar 2014 11:33:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE24D75C; Sat, 29 Mar 2014 11:33:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2TBXrh2042446; Sat, 29 Mar 2014 11:33:53 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2TBXrSX042443; Sat, 29 Mar 2014 11:33:53 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201403291133.s2TBXrSX042443@svn.freebsd.org> From: Dimitry Andric Date: Sat, 29 Mar 2014 11:33:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263911 - in stable: 10/contrib/libstdc++/include/bits 10/sbin/devd 9/contrib/libstdc++/include/bits 9/sbin/devd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Mar 2014 11:33:54 -0000 Author: dim Date: Sat Mar 29 11:33:52 2014 New Revision: 263911 URL: http://svnweb.freebsd.org/changeset/base/263911 Log: MFC r263774: Revert r263694, and apply a better fix to squelch unnecessary warnings from clang about possible keywords being treated as identifiers for the remainder of the translation unit (a.k.a. -Wkeyword-compat), when using libstdc++ in combination with -Wsystem-headers. This will not only fix devd, but any C++ program using libstdc++. Modified: stable/10/contrib/libstdc++/include/bits/cpp_type_traits.h stable/10/sbin/devd/Makefile Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/contrib/libstdc++/include/bits/cpp_type_traits.h stable/9/sbin/devd/Makefile Directory Properties: stable/9/contrib/libstdc++/ (props changed) stable/9/sbin/devd/ (props changed) Modified: stable/10/contrib/libstdc++/include/bits/cpp_type_traits.h ============================================================================== --- stable/10/contrib/libstdc++/include/bits/cpp_type_traits.h Sat Mar 29 10:11:19 2014 (r263910) +++ stable/10/contrib/libstdc++/include/bits/cpp_type_traits.h Sat Mar 29 11:33:52 2014 (r263911) @@ -80,6 +80,13 @@ _GLIBCXX_END_NAMESPACE _GLIBCXX_BEGIN_NAMESPACE(std) +#ifdef __clang__ +// When using clang, suppress warnings about possible keywords (such as +// __is_void, __is_pod, etc) being used as identifiers. +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wkeyword-compat" +#endif + namespace __detail { // NB: g++ can not compile these if declared within the class @@ -398,6 +405,10 @@ namespace __detail }; #endif +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + _GLIBCXX_END_NAMESPACE #endif //_CPP_TYPE_TRAITS_H Modified: stable/10/sbin/devd/Makefile ============================================================================== --- stable/10/sbin/devd/Makefile Sat Mar 29 10:11:19 2014 (r263910) +++ stable/10/sbin/devd/Makefile Sat Mar 29 11:33:52 2014 (r263911) @@ -13,7 +13,6 @@ LDADD= -ll -lutil YFLAGS+=-v CFLAGS+=-I. -I${.CURDIR} -CFLAGS.clang+=-Wno-keyword-compat CLEANFILES= y.output From owner-svn-src-stable@FreeBSD.ORG Sat Mar 29 11:33:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 90733943; Sat, 29 Mar 2014 11:33:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 621C975B; Sat, 29 Mar 2014 11:33:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2TBXrS3042437; Sat, 29 Mar 2014 11:33:53 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2TBXrZR042435; Sat, 29 Mar 2014 11:33:53 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201403291133.s2TBXrZR042435@svn.freebsd.org> From: Dimitry Andric Date: Sat, 29 Mar 2014 11:33:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263911 - in stable: 10/contrib/libstdc++/include/bits 10/sbin/devd 9/contrib/libstdc++/include/bits 9/sbin/devd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Mar 2014 11:33:53 -0000 Author: dim Date: Sat Mar 29 11:33:52 2014 New Revision: 263911 URL: http://svnweb.freebsd.org/changeset/base/263911 Log: MFC r263774: Revert r263694, and apply a better fix to squelch unnecessary warnings from clang about possible keywords being treated as identifiers for the remainder of the translation unit (a.k.a. -Wkeyword-compat), when using libstdc++ in combination with -Wsystem-headers. This will not only fix devd, but any C++ program using libstdc++. Modified: stable/9/contrib/libstdc++/include/bits/cpp_type_traits.h stable/9/sbin/devd/Makefile Directory Properties: stable/9/contrib/libstdc++/ (props changed) stable/9/sbin/devd/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/libstdc++/include/bits/cpp_type_traits.h stable/10/sbin/devd/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/libstdc++/include/bits/cpp_type_traits.h ============================================================================== --- stable/9/contrib/libstdc++/include/bits/cpp_type_traits.h Sat Mar 29 10:11:19 2014 (r263910) +++ stable/9/contrib/libstdc++/include/bits/cpp_type_traits.h Sat Mar 29 11:33:52 2014 (r263911) @@ -80,6 +80,13 @@ _GLIBCXX_END_NAMESPACE _GLIBCXX_BEGIN_NAMESPACE(std) +#ifdef __clang__ +// When using clang, suppress warnings about possible keywords (such as +// __is_void, __is_pod, etc) being used as identifiers. +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wkeyword-compat" +#endif + namespace __detail { // NB: g++ can not compile these if declared within the class @@ -398,6 +405,10 @@ namespace __detail }; #endif +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + _GLIBCXX_END_NAMESPACE #endif //_CPP_TYPE_TRAITS_H Modified: stable/9/sbin/devd/Makefile ============================================================================== --- stable/9/sbin/devd/Makefile Sat Mar 29 10:11:19 2014 (r263910) +++ stable/9/sbin/devd/Makefile Sat Mar 29 11:33:52 2014 (r263911) @@ -13,7 +13,6 @@ LDADD= -ll -lutil YFLAGS+=-v CFLAGS+=-I. -I${.CURDIR} -CFLAGS.clang+=-Wno-keyword-compat CLEANFILES= y.output From owner-svn-src-stable@FreeBSD.ORG Sat Mar 29 17:18:23 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C093D3A8; Sat, 29 Mar 2014 17:18:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A1D55855; Sat, 29 Mar 2014 17:18:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2THINYK087356; Sat, 29 Mar 2014 17:18:23 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2THINd9087355; Sat, 29 Mar 2014 17:18:23 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201403291718.s2THINd9087355@svn.freebsd.org> From: Dimitry Andric Date: Sat, 29 Mar 2014 17:18:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263915 - in stable: 10/cddl/contrib/opensolaris/tools/ctf/cvt 9/cddl/contrib/opensolaris/tools/ctf/cvt X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Mar 2014 17:18:23 -0000 Author: dim Date: Sat Mar 29 17:18:23 2014 New Revision: 263915 URL: http://svnweb.freebsd.org/changeset/base/263915 Log: MFC r260880 (by kaiw, from projects/elftoolchain): * Make die_mem_offset() be able to handle DW_AT_data_member_location attributes generated by Clang 3.4. * Document how different compilers generate DW_AT_data_member_location attributes differently. * Document the quirks about DW_FORM_data[48]. This is a slightly modified version, adapted to work with the old libdwarf in stable/9 and stable/10. It should fix DTrace on these branches, when the kernel is compiled with clang 3.4. Note that you have to build *and* install the CTF tools first, before building the kernel. Otherwise you can possibly still get error messages similar to "failed to copy type of 'pr_uid': Type information is in parent and unavailable", when attempting to run dtrace(1). Submitted by: kaiw Modified: stable/9/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) Changes in other areas also in this revision: Modified: stable/10/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c Directory Properties: stable/10/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c Sat Mar 29 14:35:36 2014 (r263914) +++ stable/9/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c Sat Mar 29 17:18:23 2014 (r263915) @@ -489,16 +489,59 @@ die_mem_offset(dwarf_t *dw, Dwarf_Die di { Dwarf_Locdesc *loc = NULL; Dwarf_Signed locnum = 0; + Dwarf_Attribute at; + Dwarf_Half form; - if (dwarf_locdesc(die, name, &loc, &locnum, &dw->dw_err) != DW_DLV_OK) + if (name != DW_AT_data_member_location) + terminate("die %llu: can only process attribute " + "DW_AT_data_member_location\n", die_off(dw, die)); + + if ((at = die_attr(dw, die, name, 0)) == NULL) return (0); - if (locnum != 1 || loc->ld_s->lr_atom != DW_OP_plus_uconst) { - terminate("die %llu: cannot parse member offset\n", - die_off(dw, die)); - } + if (dwarf_whatform(at, &form, &dw->dw_err) != DW_DLV_OK) + return (0); - *valp = loc->ld_s->lr_number; + switch (form) { + case DW_FORM_block: + case DW_FORM_block1: + case DW_FORM_block2: + case DW_FORM_block4: + /* + * GCC in base and Clang (3.3 or below) generates + * DW_AT_data_member_location attribute with DW_FORM_block* + * form. The attribute contains one DW_OP_plus_uconst + * operator. The member offset stores in the operand. + */ + if (dwarf_locdesc(die, name, &loc, &locnum, &dw->dw_err) != + DW_DLV_OK) + return (0); + if (locnum != 1 || loc->ld_s->lr_atom != DW_OP_plus_uconst) { + terminate("die %llu: cannot parse member offset\n", + die_off(dw, die)); + } + *valp = loc->ld_s->lr_number; + break; + + case DW_FORM_data1: + case DW_FORM_data2: + case DW_FORM_data4: + case DW_FORM_data8: + case DW_FORM_udata: + /* + * Clang 3.4 generates DW_AT_data_member_location attribute + * with DW_FORM_data* form (constant class). The attribute + * stores a contant value which is the member offset. + */ + if (dwarf_attrval_unsigned(die, name, valp, &dw->dw_err) != + DW_DLV_OK) + return (0); + break; + + default: + terminate("die %llu: cannot parse member offset with form " + "%u\n", die_off(dw, die), form); + } if (loc != NULL) if (dwarf_locdesc_free(loc, &dw->dw_err) != DW_DLV_OK) @@ -872,6 +915,9 @@ die_sou_create(dwarf_t *dw, Dwarf_Die st int type, const char *typename) { Dwarf_Unsigned sz, bitsz, bitoff; +#if BYTE_ORDER == _LITTLE_ENDIAN + Dwarf_Unsigned bysz; +#endif Dwarf_Die mem; mlist_t *ml, **mlastp; iidesc_t *ii; @@ -944,8 +990,26 @@ die_sou_create(dwarf_t *dw, Dwarf_Die st #if BYTE_ORDER == _BIG_ENDIAN ml->ml_offset += bitoff; #else - ml->ml_offset += tdesc_bitsize(ml->ml_type) - bitoff - - ml->ml_size; + /* + * Note that Clang 3.4 will sometimes generate + * member DIE before generating the DIE for the + * member's type. The code can not handle this + * properly so that tdesc_bitsize(ml->ml_type) will + * return 0 because ml->ml_type is unknown. As a + * result, a wrong member offset will be calculated. + * To workaround this, we can instead try to + * retrieve the value of DW_AT_byte_size attribute + * which stores the byte size of the space occupied + * by the type. If this attribute exists, its value + * should equal to tdesc_bitsize(ml->ml_type)/NBBY. + */ + if (die_unsigned(dw, mem, DW_AT_byte_size, &bysz, 0) && + bysz > 0) + ml->ml_offset += bysz * NBBY - bitoff - + ml->ml_size; + else + ml->ml_offset += tdesc_bitsize(ml->ml_type) - + bitoff - ml->ml_size; #endif } From owner-svn-src-stable@FreeBSD.ORG Sat Mar 29 17:18:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 236B03A9; Sat, 29 Mar 2014 17:18:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 03753856; Sat, 29 Mar 2014 17:18:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2THINWn087362; Sat, 29 Mar 2014 17:18:23 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2THINAZ087361; Sat, 29 Mar 2014 17:18:23 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201403291718.s2THINAZ087361@svn.freebsd.org> From: Dimitry Andric Date: Sat, 29 Mar 2014 17:18:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263915 - in stable: 10/cddl/contrib/opensolaris/tools/ctf/cvt 9/cddl/contrib/opensolaris/tools/ctf/cvt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Mar 2014 17:18:24 -0000 Author: dim Date: Sat Mar 29 17:18:23 2014 New Revision: 263915 URL: http://svnweb.freebsd.org/changeset/base/263915 Log: MFC r260880 (by kaiw, from projects/elftoolchain): * Make die_mem_offset() be able to handle DW_AT_data_member_location attributes generated by Clang 3.4. * Document how different compilers generate DW_AT_data_member_location attributes differently. * Document the quirks about DW_FORM_data[48]. This is a slightly modified version, adapted to work with the old libdwarf in stable/9 and stable/10. It should fix DTrace on these branches, when the kernel is compiled with clang 3.4. Note that you have to build *and* install the CTF tools first, before building the kernel. Otherwise you can possibly still get error messages similar to "failed to copy type of 'pr_uid': Type information is in parent and unavailable", when attempting to run dtrace(1). Submitted by: kaiw Modified: stable/10/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c Sat Mar 29 14:35:36 2014 (r263914) +++ stable/10/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c Sat Mar 29 17:18:23 2014 (r263915) @@ -489,16 +489,59 @@ die_mem_offset(dwarf_t *dw, Dwarf_Die di { Dwarf_Locdesc *loc = NULL; Dwarf_Signed locnum = 0; + Dwarf_Attribute at; + Dwarf_Half form; - if (dwarf_locdesc(die, name, &loc, &locnum, &dw->dw_err) != DW_DLV_OK) + if (name != DW_AT_data_member_location) + terminate("die %llu: can only process attribute " + "DW_AT_data_member_location\n", die_off(dw, die)); + + if ((at = die_attr(dw, die, name, 0)) == NULL) return (0); - if (locnum != 1 || loc->ld_s->lr_atom != DW_OP_plus_uconst) { - terminate("die %llu: cannot parse member offset\n", - die_off(dw, die)); - } + if (dwarf_whatform(at, &form, &dw->dw_err) != DW_DLV_OK) + return (0); - *valp = loc->ld_s->lr_number; + switch (form) { + case DW_FORM_block: + case DW_FORM_block1: + case DW_FORM_block2: + case DW_FORM_block4: + /* + * GCC in base and Clang (3.3 or below) generates + * DW_AT_data_member_location attribute with DW_FORM_block* + * form. The attribute contains one DW_OP_plus_uconst + * operator. The member offset stores in the operand. + */ + if (dwarf_locdesc(die, name, &loc, &locnum, &dw->dw_err) != + DW_DLV_OK) + return (0); + if (locnum != 1 || loc->ld_s->lr_atom != DW_OP_plus_uconst) { + terminate("die %llu: cannot parse member offset\n", + die_off(dw, die)); + } + *valp = loc->ld_s->lr_number; + break; + + case DW_FORM_data1: + case DW_FORM_data2: + case DW_FORM_data4: + case DW_FORM_data8: + case DW_FORM_udata: + /* + * Clang 3.4 generates DW_AT_data_member_location attribute + * with DW_FORM_data* form (constant class). The attribute + * stores a contant value which is the member offset. + */ + if (dwarf_attrval_unsigned(die, name, valp, &dw->dw_err) != + DW_DLV_OK) + return (0); + break; + + default: + terminate("die %llu: cannot parse member offset with form " + "%u\n", die_off(dw, die), form); + } if (loc != NULL) if (dwarf_locdesc_free(loc, &dw->dw_err) != DW_DLV_OK) @@ -885,6 +928,9 @@ die_sou_create(dwarf_t *dw, Dwarf_Die st int type, const char *typename) { Dwarf_Unsigned sz, bitsz, bitoff, maxsz=0; +#if BYTE_ORDER == _LITTLE_ENDIAN + Dwarf_Unsigned bysz; +#endif Dwarf_Die mem; mlist_t *ml, **mlastp; iidesc_t *ii; @@ -959,8 +1005,26 @@ die_sou_create(dwarf_t *dw, Dwarf_Die st #if BYTE_ORDER == _BIG_ENDIAN ml->ml_offset += bitoff; #else - ml->ml_offset += tdesc_bitsize(ml->ml_type) - bitoff - - ml->ml_size; + /* + * Note that Clang 3.4 will sometimes generate + * member DIE before generating the DIE for the + * member's type. The code can not handle this + * properly so that tdesc_bitsize(ml->ml_type) will + * return 0 because ml->ml_type is unknown. As a + * result, a wrong member offset will be calculated. + * To workaround this, we can instead try to + * retrieve the value of DW_AT_byte_size attribute + * which stores the byte size of the space occupied + * by the type. If this attribute exists, its value + * should equal to tdesc_bitsize(ml->ml_type)/NBBY. + */ + if (die_unsigned(dw, mem, DW_AT_byte_size, &bysz, 0) && + bysz > 0) + ml->ml_offset += bysz * NBBY - bitoff - + ml->ml_size; + else + ml->ml_offset += tdesc_bitsize(ml->ml_type) - + bitoff - ml->ml_size; #endif } From owner-svn-src-stable@FreeBSD.ORG Sun Mar 30 15:29:55 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3CE4FE72; Sun, 30 Mar 2014 15:29:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 252ADAA7; Sun, 30 Mar 2014 15:29:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2UFTt4m036999; Sun, 30 Mar 2014 15:29:55 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2UFTsKH036998; Sun, 30 Mar 2014 15:29:54 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201403301529.s2UFTsKH036998@svn.freebsd.org> From: Bryan Drewery Date: Sun, 30 Mar 2014 15:29:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263938 - stable/10/etc/pkg X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Mar 2014 15:29:55 -0000 Author: bdrewery Date: Sun Mar 30 15:29:54 2014 New Revision: 263938 URL: http://svnweb.freebsd.org/changeset/base/263938 Log: MFC r263937: Give hint on how to disable the default repository. Modified: stable/10/etc/pkg/FreeBSD.conf Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/pkg/FreeBSD.conf ============================================================================== --- stable/10/etc/pkg/FreeBSD.conf Sun Mar 30 15:24:17 2014 (r263937) +++ stable/10/etc/pkg/FreeBSD.conf Sun Mar 30 15:29:54 2014 (r263938) @@ -1,4 +1,12 @@ # $FreeBSD$ +# +# To disable this repository, instead of modifying or removing this file, +# create a /usr/local/etc/pkg/repos/FreeBSD.conf file: +# +# mkdir -p /usr/local/etc/pkg/repos +# echo "FreeBSD: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf +# + FreeBSD: { url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest", mirror_type: "srv", From owner-svn-src-stable@FreeBSD.ORG Sun Mar 30 15:30:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C522AFD2; Sun, 30 Mar 2014 15:30:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2394B21; Sun, 30 Mar 2014 15:30:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2UFUXWE037215; Sun, 30 Mar 2014 15:30:33 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2UFUXJ9037214; Sun, 30 Mar 2014 15:30:33 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201403301530.s2UFUXJ9037214@svn.freebsd.org> From: Bryan Drewery Date: Sun, 30 Mar 2014 15:30:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263939 - stable/9/etc/pkg X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Mar 2014 15:30:33 -0000 Author: bdrewery Date: Sun Mar 30 15:30:33 2014 New Revision: 263939 URL: http://svnweb.freebsd.org/changeset/base/263939 Log: MFC r263937: Give hint on how to disable the default repository. Modified: stable/9/etc/pkg/FreeBSD.conf Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/pkg/FreeBSD.conf ============================================================================== --- stable/9/etc/pkg/FreeBSD.conf Sun Mar 30 15:29:54 2014 (r263938) +++ stable/9/etc/pkg/FreeBSD.conf Sun Mar 30 15:30:33 2014 (r263939) @@ -1,4 +1,12 @@ # $FreeBSD$ +# +# To disable this repository, instead of modifying or removing this file, +# create a /usr/local/etc/pkg/repos/FreeBSD.conf file: +# +# mkdir -p /usr/local/etc/pkg/repos +# echo "FreeBSD: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf +# + FreeBSD: { url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest", mirror_type: "srv", From owner-svn-src-stable@FreeBSD.ORG Sun Mar 30 16:48:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62A44358; Sun, 30 Mar 2014 16:48:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 423D510F; Sun, 30 Mar 2014 16:48:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2UGm5Ms070363; Sun, 30 Mar 2014 16:48:05 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2UGm5dL070362; Sun, 30 Mar 2014 16:48:05 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201403301648.s2UGm5dL070362@svn.freebsd.org> From: Bryan Drewery Date: Sun, 30 Mar 2014 16:48:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263941 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Mar 2014 16:48:05 -0000 Author: bdrewery Date: Sun Mar 30 16:48:04 2014 New Revision: 263941 URL: http://svnweb.freebsd.org/changeset/base/263941 Log: MFC r263129: Combine similar code from vprintf(9) and log(9). Modified: stable/10/sys/kern/subr_prf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/subr_prf.c ============================================================================== --- stable/10/sys/kern/subr_prf.c Sun Mar 30 16:04:47 2014 (r263940) +++ stable/10/sys/kern/subr_prf.c Sun Mar 30 16:48:04 2014 (r263941) @@ -248,23 +248,18 @@ ttyprintf(struct tty *tp, const char *fm return (retval); } -/* - * Log writes to the log buffer, and guarantees not to sleep (so can be - * called by interrupt routines). If there is no process reading the - * log yet, it writes to the console also. - */ -void -log(int level, const char *fmt, ...) +static int +_vprintf(int level, int flags, const char *fmt, va_list ap) { - va_list ap; struct putchar_arg pca; + int retval; #ifdef PRINTF_BUFR_SIZE char bufr[PRINTF_BUFR_SIZE]; #endif pca.tty = NULL; pca.pri = level; - pca.flags = log_open ? TOLOG : TOCONS; + pca.flags = flags; #ifdef PRINTF_BUFR_SIZE pca.p_bufr = bufr; pca.p_next = pca.p_bufr; @@ -272,12 +267,11 @@ log(int level, const char *fmt, ...) pca.remain = sizeof(bufr); *pca.p_next = '\0'; #else + /* Don't buffer console output. */ pca.p_bufr = NULL; #endif - va_start(ap, fmt); - kvprintf(fmt, putchar, &pca, 10, ap); - va_end(ap); + retval = kvprintf(fmt, putchar, &pca, 10, ap); #ifdef PRINTF_BUFR_SIZE /* Write any buffered console/log output: */ @@ -289,6 +283,24 @@ log(int level, const char *fmt, ...) cnputs(pca.p_bufr); } #endif + + return (retval); +} + +/* + * Log writes to the log buffer, and guarantees not to sleep (so can be + * called by interrupt routines). If there is no process reading the + * log yet, it writes to the console also. + */ +void +log(int level, const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + (void)_vprintf(level, log_open ? TOLOG : TOCONS, fmt, ap); + va_end(ap); + msgbuftrigger = 1; } @@ -374,35 +386,9 @@ printf(const char *fmt, ...) int vprintf(const char *fmt, va_list ap) { - struct putchar_arg pca; int retval; -#ifdef PRINTF_BUFR_SIZE - char bufr[PRINTF_BUFR_SIZE]; -#endif - pca.tty = NULL; - pca.flags = TOCONS | TOLOG; - pca.pri = -1; -#ifdef PRINTF_BUFR_SIZE - pca.p_bufr = bufr; - pca.p_next = pca.p_bufr; - pca.n_bufr = sizeof(bufr); - pca.remain = sizeof(bufr); - *pca.p_next = '\0'; -#else - /* Don't buffer console output. */ - pca.p_bufr = NULL; -#endif - - retval = kvprintf(fmt, putchar, &pca, 10, ap); - -#ifdef PRINTF_BUFR_SIZE - /* Write any buffered console/log output: */ - if (*pca.p_bufr != '\0') { - cnputs(pca.p_bufr); - msglogstr(pca.p_bufr, pca.pri, /*filter_cr*/ 1); - } -#endif + retval = _vprintf(-1, TOCONS | TOLOG, fmt, ap); if (!panicstr) msgbuftrigger = 1; From owner-svn-src-stable@FreeBSD.ORG Sun Mar 30 16:49:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0DCCB49A; Sun, 30 Mar 2014 16:49:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E2B0D122; Sun, 30 Mar 2014 16:49:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2UGnH4D070521; Sun, 30 Mar 2014 16:49:17 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2UGnH7R070520; Sun, 30 Mar 2014 16:49:17 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201403301649.s2UGnH7R070520@svn.freebsd.org> From: Bryan Drewery Date: Sun, 30 Mar 2014 16:49:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263942 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Mar 2014 16:49:18 -0000 Author: bdrewery Date: Sun Mar 30 16:49:17 2014 New Revision: 263942 URL: http://svnweb.freebsd.org/changeset/base/263942 Log: MFC r263129: Combine similar code from vprintf(9) and log(9). Modified: stable/9/sys/kern/subr_prf.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/subr_prf.c ============================================================================== --- stable/9/sys/kern/subr_prf.c Sun Mar 30 16:48:04 2014 (r263941) +++ stable/9/sys/kern/subr_prf.c Sun Mar 30 16:49:17 2014 (r263942) @@ -241,23 +241,18 @@ ttyprintf(struct tty *tp, const char *fm return (retval); } -/* - * Log writes to the log buffer, and guarantees not to sleep (so can be - * called by interrupt routines). If there is no process reading the - * log yet, it writes to the console also. - */ -void -log(int level, const char *fmt, ...) +static int +_vprintf(int level, int flags, const char *fmt, va_list ap) { - va_list ap; struct putchar_arg pca; + int retval; #ifdef PRINTF_BUFR_SIZE char bufr[PRINTF_BUFR_SIZE]; #endif pca.tty = NULL; pca.pri = level; - pca.flags = log_open ? TOLOG : TOCONS; + pca.flags = flags; #ifdef PRINTF_BUFR_SIZE pca.p_bufr = bufr; pca.p_next = pca.p_bufr; @@ -265,12 +260,11 @@ log(int level, const char *fmt, ...) pca.remain = sizeof(bufr); *pca.p_next = '\0'; #else + /* Don't buffer console output. */ pca.p_bufr = NULL; #endif - va_start(ap, fmt); - kvprintf(fmt, putchar, &pca, 10, ap); - va_end(ap); + retval = kvprintf(fmt, putchar, &pca, 10, ap); #ifdef PRINTF_BUFR_SIZE /* Write any buffered console/log output: */ @@ -282,6 +276,24 @@ log(int level, const char *fmt, ...) cnputs(pca.p_bufr); } #endif + + return (retval); +} + +/* + * Log writes to the log buffer, and guarantees not to sleep (so can be + * called by interrupt routines). If there is no process reading the + * log yet, it writes to the console also. + */ +void +log(int level, const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + (void)_vprintf(level, log_open ? TOLOG : TOCONS, fmt, ap); + va_end(ap); + msgbuftrigger = 1; } @@ -367,35 +379,9 @@ printf(const char *fmt, ...) int vprintf(const char *fmt, va_list ap) { - struct putchar_arg pca; int retval; -#ifdef PRINTF_BUFR_SIZE - char bufr[PRINTF_BUFR_SIZE]; -#endif - pca.tty = NULL; - pca.flags = TOCONS | TOLOG; - pca.pri = -1; -#ifdef PRINTF_BUFR_SIZE - pca.p_bufr = bufr; - pca.p_next = pca.p_bufr; - pca.n_bufr = sizeof(bufr); - pca.remain = sizeof(bufr); - *pca.p_next = '\0'; -#else - /* Don't buffer console output. */ - pca.p_bufr = NULL; -#endif - - retval = kvprintf(fmt, putchar, &pca, 10, ap); - -#ifdef PRINTF_BUFR_SIZE - /* Write any buffered console/log output: */ - if (*pca.p_bufr != '\0') { - cnputs(pca.p_bufr); - msglogstr(pca.p_bufr, pca.pri, /*filter_cr*/ 1); - } -#endif + retval = _vprintf(-1, TOCONS | TOLOG, fmt, ap); if (!panicstr) msgbuftrigger = 1; From owner-svn-src-stable@FreeBSD.ORG Sun Mar 30 16:51:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C7A65F5; Sun, 30 Mar 2014 16:51:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 192A513F; Sun, 30 Mar 2014 16:51:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2UGpCtH071645; Sun, 30 Mar 2014 16:51:12 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2UGpCmf071644; Sun, 30 Mar 2014 16:51:12 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201403301651.s2UGpCmf071644@svn.freebsd.org> From: Bryan Drewery Date: Sun, 30 Mar 2014 16:51:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263943 - stable/10/sys/fs/tmpfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Mar 2014 16:51:13 -0000 Author: bdrewery Date: Sun Mar 30 16:51:12 2014 New Revision: 263943 URL: http://svnweb.freebsd.org/changeset/base/263943 Log: MFC r263130: Fix -o size less than PAGE_SIZE resulting in SIZE_MAX being used. Modified: stable/10/sys/fs/tmpfs/tmpfs_vfsops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- stable/10/sys/fs/tmpfs/tmpfs_vfsops.c Sun Mar 30 16:49:17 2014 (r263942) +++ stable/10/sys/fs/tmpfs/tmpfs_vfsops.c Sun Mar 30 16:51:12 2014 (r263943) @@ -200,11 +200,13 @@ tmpfs_mount(struct mount *mp) * allowed to use, based on the maximum size the user passed in * the mount structure. A value of zero is treated as if the * maximum available space was requested. */ - if (size_max < PAGE_SIZE || size_max > OFF_MAX - PAGE_SIZE || + if (size_max == 0 || size_max > OFF_MAX - PAGE_SIZE || (SIZE_MAX < OFF_MAX && size_max / PAGE_SIZE >= SIZE_MAX)) pages = SIZE_MAX; - else + else { + size_max = roundup(size_max, PAGE_SIZE); pages = howmany(size_max, PAGE_SIZE); + } MPASS(pages > 0); if (nodes_max <= 3) { From owner-svn-src-stable@FreeBSD.ORG Sun Mar 30 16:56:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3DC6894; Sun, 30 Mar 2014 16:56:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFF0F1FB; Sun, 30 Mar 2014 16:56:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2UGuaFr074397; Sun, 30 Mar 2014 16:56:36 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2UGuaRM074396; Sun, 30 Mar 2014 16:56:36 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201403301656.s2UGuaRM074396@svn.freebsd.org> From: Bryan Drewery Date: Sun, 30 Mar 2014 16:56:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263944 - stable/9/sys/fs/tmpfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Mar 2014 16:56:36 -0000 Author: bdrewery Date: Sun Mar 30 16:56:36 2014 New Revision: 263944 URL: http://svnweb.freebsd.org/changeset/base/263944 Log: MFC r263130: Fix -o size less than PAGE_SIZE resulting in SIZE_MAX being used. Modified: stable/9/sys/fs/tmpfs/tmpfs_vfsops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- stable/9/sys/fs/tmpfs/tmpfs_vfsops.c Sun Mar 30 16:51:12 2014 (r263943) +++ stable/9/sys/fs/tmpfs/tmpfs_vfsops.c Sun Mar 30 16:56:36 2014 (r263944) @@ -237,11 +237,13 @@ tmpfs_mount(struct mount *mp) * allowed to use, based on the maximum size the user passed in * the mount structure. A value of zero is treated as if the * maximum available space was requested. */ - if (size_max < PAGE_SIZE || size_max > OFF_MAX - PAGE_SIZE || + if (size_max == 0 || size_max > OFF_MAX - PAGE_SIZE || (SIZE_MAX < OFF_MAX && size_max / PAGE_SIZE >= SIZE_MAX)) pages = SIZE_MAX; - else + else { + size_max = roundup(size_max, PAGE_SIZE); pages = howmany(size_max, PAGE_SIZE); + } MPASS(pages > 0); if (nodes_max <= 3) { From owner-svn-src-stable@FreeBSD.ORG Sun Mar 30 17:59:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19A511BA; Sun, 30 Mar 2014 17:59:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0359A8B8; Sun, 30 Mar 2014 17:59:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2UHxW1F099071; Sun, 30 Mar 2014 17:59:32 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2UHxWOO099070; Sun, 30 Mar 2014 17:59:32 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201403301759.s2UHxWOO099070@svn.freebsd.org> From: Jaakko Heinonen Date: Sun, 30 Mar 2014 17:59:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263945 - stable/9/sbin/devfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Mar 2014 17:59:33 -0000 Author: jh Date: Sun Mar 30 17:59:32 2014 New Revision: 263945 URL: http://svnweb.freebsd.org/changeset/base/263945 Log: MFC r253252: Clarify how "hide" and "unhide" commands work on directories. Modified: stable/9/sbin/devfs/devfs.8 Directory Properties: stable/9/sbin/devfs/ (props changed) Modified: stable/9/sbin/devfs/devfs.8 ============================================================================== --- stable/9/sbin/devfs/devfs.8 Sun Mar 30 16:56:36 2014 (r263944) +++ stable/9/sbin/devfs/devfs.8 Sun Mar 30 17:59:32 2014 (r263945) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 21, 2010 +.Dd July 12, 2013 .Dt DEVFS 8 .Os .Sh NAME @@ -190,6 +190,7 @@ Nodes may later be revived manually with or with the .Cm unhide action. +Hiding a directory node effectively hides all of its child nodes. .It Cm include Ar ruleset Apply all the rules in ruleset number .Ar ruleset @@ -213,6 +214,8 @@ which may be a user name or number. .It Cm unhide Unhide the node. +If the node resides in a subdirectory, +all parent directory nodes must be visible to be able to access the node. .El .Sh IMPLEMENTATION NOTES Rulesets are created by the kernel at the first reference From owner-svn-src-stable@FreeBSD.ORG Sun Mar 30 18:22:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D2291F91; Sun, 30 Mar 2014 18:22:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2390B57; Sun, 30 Mar 2014 18:22:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2UIMBuA011689; Sun, 30 Mar 2014 18:22:11 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2UIMBc4011686; Sun, 30 Mar 2014 18:22:11 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201403301822.s2UIMBc4011686@svn.freebsd.org> From: Bryan Drewery Date: Sun, 30 Mar 2014 18:22:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263946 - stable/10/sys/fs/tmpfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Mar 2014 18:22:11 -0000 Author: bdrewery Date: Sun Mar 30 18:22:10 2014 New Revision: 263946 URL: http://svnweb.freebsd.org/changeset/base/263946 Log: MFC r263131,r263174,r263175: Tmpfs readdir() redundant logic and code readability cleanup. r263131: Cleanup redundant logic and add some comments to help explain how it works in lieu of potentially less clear code. r263174: Rename cnt to maxcookies and change its use as the condition for when to lookup cookies to be less obscure. r263175: Add missing FALLTHROUGH comment in tmpfs_dir_getdents for looking up '.' and '..'. Modified: stable/10/sys/fs/tmpfs/tmpfs_subr.c stable/10/sys/fs/tmpfs/tmpfs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- stable/10/sys/fs/tmpfs/tmpfs_subr.c Sun Mar 30 17:59:32 2014 (r263945) +++ stable/10/sys/fs/tmpfs/tmpfs_subr.c Sun Mar 30 18:22:10 2014 (r263946) @@ -348,6 +348,9 @@ tmpfs_dirent_hash(const char *name, u_in static __inline off_t tmpfs_dirent_cookie(struct tmpfs_dirent *de) { + if (de == NULL) + return (TMPFS_DIRCOOKIE_EOF); + MPASS(de->td_cookie >= TMPFS_DIRCOOKIE_MIN); return (de->td_cookie); @@ -1144,7 +1147,7 @@ tmpfs_dir_getdotdotdent(struct tmpfs_nod * error code if another error happens. */ int -tmpfs_dir_getdents(struct tmpfs_node *node, struct uio *uio, int cnt, +tmpfs_dir_getdents(struct tmpfs_node *node, struct uio *uio, int maxcookies, u_long *cookies, int *ncookies) { struct tmpfs_dir_cursor dc; @@ -1155,25 +1158,33 @@ tmpfs_dir_getdents(struct tmpfs_node *no TMPFS_VALIDATE_DIR(node); off = 0; + + /* + * Lookup the node from the current offset. The starting offset of + * 0 will lookup both '.' and '..', and then the first real entry, + * or EOF if there are none. Then find all entries for the dir that + * fit into the buffer. Once no more entries are found (de == NULL), + * the offset is set to TMPFS_DIRCOOKIE_EOF, which will cause the next + * call to return 0. + */ switch (uio->uio_offset) { case TMPFS_DIRCOOKIE_DOT: error = tmpfs_dir_getdotdent(node, uio); if (error != 0) return (error); uio->uio_offset = TMPFS_DIRCOOKIE_DOTDOT; - if (cnt != 0) + if (cookies != NULL) cookies[(*ncookies)++] = off = uio->uio_offset; + /* FALLTHROUGH */ case TMPFS_DIRCOOKIE_DOTDOT: error = tmpfs_dir_getdotdotdent(node, uio); if (error != 0) return (error); de = tmpfs_dir_first(node, &dc); - if (de == NULL) - uio->uio_offset = TMPFS_DIRCOOKIE_EOF; - else - uio->uio_offset = tmpfs_dirent_cookie(de); - if (cnt != 0) + uio->uio_offset = tmpfs_dirent_cookie(de); + if (cookies != NULL) cookies[(*ncookies)++] = off = uio->uio_offset; + /* EOF. */ if (de == NULL) return (0); break; @@ -1183,7 +1194,7 @@ tmpfs_dir_getdents(struct tmpfs_node *no de = tmpfs_dir_lookup_cookie(node, uio->uio_offset, &dc); if (de == NULL) return (EINVAL); - if (cnt != 0) + if (cookies != NULL) off = tmpfs_dirent_cookie(de); } @@ -1251,25 +1262,19 @@ tmpfs_dir_getdents(struct tmpfs_node *no error = uiomove(&d, d.d_reclen, uio); if (error == 0) { de = tmpfs_dir_next(node, &dc); - if (cnt != 0) { - if (de == NULL) - off = TMPFS_DIRCOOKIE_EOF; - else - off = tmpfs_dirent_cookie(de); - MPASS(*ncookies < cnt); + if (cookies != NULL) { + off = tmpfs_dirent_cookie(de); + MPASS(*ncookies < maxcookies); cookies[(*ncookies)++] = off; } } } while (error == 0 && uio->uio_resid > 0 && de != NULL); - /* Update the offset and cache. */ - if (cnt == 0) { - if (de == NULL) - off = TMPFS_DIRCOOKIE_EOF; - else - off = tmpfs_dirent_cookie(de); - } + /* Skip setting off when using cookies as it is already done above. */ + if (cookies == NULL) + off = tmpfs_dirent_cookie(de); + /* Update the offset and cache. */ uio->uio_offset = off; node->tn_dir.tn_readdir_lastn = off; node->tn_dir.tn_readdir_lastp = de; Modified: stable/10/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- stable/10/sys/fs/tmpfs/tmpfs_vnops.c Sun Mar 30 17:59:32 2014 (r263945) +++ stable/10/sys/fs/tmpfs/tmpfs_vnops.c Sun Mar 30 18:22:10 2014 (r263946) @@ -1199,32 +1199,38 @@ tmpfs_readdir(struct vop_readdir_args *v int error; ssize_t startresid; - int cnt = 0; + int maxcookies; struct tmpfs_node *node; /* This operation only makes sense on directory nodes. */ if (vp->v_type != VDIR) return ENOTDIR; + maxcookies = 0; node = VP_TO_TMPFS_DIR(vp); startresid = uio->uio_resid; + /* Allocate cookies for NFS and compat modules. */ if (cookies != NULL && ncookies != NULL) { - cnt = howmany(node->tn_size, sizeof(struct tmpfs_dirent)) + 2; - *cookies = malloc(cnt * sizeof(**cookies), M_TEMP, M_WAITOK); + maxcookies = howmany(node->tn_size, + sizeof(struct tmpfs_dirent)) + 2; + *cookies = malloc(maxcookies * sizeof(**cookies), M_TEMP, + M_WAITOK); *ncookies = 0; } - if (cnt == 0) + if (cookies == NULL) error = tmpfs_dir_getdents(node, uio, 0, NULL, NULL); else - error = tmpfs_dir_getdents(node, uio, cnt, *cookies, ncookies); + error = tmpfs_dir_getdents(node, uio, maxcookies, *cookies, + ncookies); + /* Buffer was filled without hitting EOF. */ if (error == EJUSTRETURN) error = (uio->uio_resid != startresid) ? 0 : EINVAL; - if (error != 0 && cnt != 0) + if (error != 0 && cookies != NULL) free(*cookies, M_TEMP); if (eofflag != NULL) From owner-svn-src-stable@FreeBSD.ORG Mon Mar 31 00:28:55 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D3B04C3; Mon, 31 Mar 2014 00:28:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 302DBD9D; Mon, 31 Mar 2014 00:28:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2V0StNt067806; Mon, 31 Mar 2014 00:28:55 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2V0SsgM067799; Mon, 31 Mar 2014 00:28:54 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201403310028.s2V0SsgM067799@svn.freebsd.org> From: Glen Barber Date: Mon, 31 Mar 2014 00:28:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263955 - stable/10/lib/libmd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Mar 2014 00:28:55 -0000 Author: gjb Date: Mon Mar 31 00:28:54 2014 New Revision: 263955 URL: http://svnweb.freebsd.org/changeset/base/263955 Log: MFC r263863: Dereference nonexistent md2(3) manual. Sponsored by: The FreeBSD Foundation Modified: stable/10/lib/libmd/ripemd.3 stable/10/lib/libmd/sha.3 stable/10/lib/libmd/sha256.3 stable/10/lib/libmd/sha512.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libmd/ripemd.3 ============================================================================== --- stable/10/lib/libmd/ripemd.3 Sun Mar 30 23:43:36 2014 (r263954) +++ stable/10/lib/libmd/ripemd.3 Mon Mar 31 00:28:54 2014 (r263955) @@ -9,7 +9,7 @@ .\" From: Id: mdX.3,v 1.14 1999/02/11 20:31:49 wollman Exp .\" $FreeBSD$ .\" -.Dd February 26, 1999 +.Dd March 28, 2014 .Dt RIPEMD 3 .Os .Sh NAME @@ -123,7 +123,6 @@ If the .Fa buf argument is non-null it must point to at least 41 characters of buffer space. .Sh SEE ALSO -.Xr md2 3 , .Xr md4 3 , .Xr md5 3 , .Xr sha 3 Modified: stable/10/lib/libmd/sha.3 ============================================================================== --- stable/10/lib/libmd/sha.3 Sun Mar 30 23:43:36 2014 (r263954) +++ stable/10/lib/libmd/sha.3 Mon Mar 31 00:28:54 2014 (r263955) @@ -9,7 +9,7 @@ .\" From: Id: mdX.3,v 1.14 1999/02/11 20:31:49 wollman Exp .\" $FreeBSD$ .\" -.Dd February 25, 1999 +.Dd March 28, 2014 .Dt SHA 3 .Os .Sh NAME @@ -154,7 +154,6 @@ If the .Fa buf argument is non-null it must point to at least 41 characters of buffer space. .Sh SEE ALSO -.Xr md2 3 , .Xr md4 3 , .Xr md5 3 , .Xr ripemd 3 , Modified: stable/10/lib/libmd/sha256.3 ============================================================================== --- stable/10/lib/libmd/sha256.3 Sun Mar 30 23:43:36 2014 (r263954) +++ stable/10/lib/libmd/sha256.3 Mon Mar 31 00:28:54 2014 (r263955) @@ -9,7 +9,7 @@ .\" From: Id: mdX.3,v 1.14 1999/02/11 20:31:49 wollman Exp .\" $FreeBSD$ .\" -.Dd September 14, 2005 +.Dd March 28, 2014 .Dt SHA256 3 .Os .Sh NAME @@ -120,7 +120,6 @@ If the .Fa buf argument is non-null it must point to at least 65 characters of buffer space. .Sh SEE ALSO -.Xr md2 3 , .Xr md4 3 , .Xr md5 3 , .Xr ripemd 3 , Modified: stable/10/lib/libmd/sha512.3 ============================================================================== --- stable/10/lib/libmd/sha512.3 Sun Mar 30 23:43:36 2014 (r263954) +++ stable/10/lib/libmd/sha512.3 Mon Mar 31 00:28:54 2014 (r263955) @@ -9,7 +9,7 @@ .\" From: Id: mdX.3,v 1.14 1999/02/11 20:31:49 wollman Exp .\" $FreeBSD$ .\" -.Dd April 1, 2011 +.Dd March 28, 2014 .Dt SHA512 3 .Os .Sh NAME @@ -120,7 +120,6 @@ If the .Fa buf argument is non-null it must point to at least 65 characters of buffer space. .Sh SEE ALSO -.Xr md2 3 , .Xr md4 3 , .Xr md5 3 , .Xr ripemd 3 , From owner-svn-src-stable@FreeBSD.ORG Mon Mar 31 01:04:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81A0AC11; Mon, 31 Mar 2014 01:04:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C91BDC; Mon, 31 Mar 2014 01:04:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2V14itN088793; Mon, 31 Mar 2014 01:04:44 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2V14fvE088770; Mon, 31 Mar 2014 01:04:41 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201403310104.s2V14fvE088770@svn.freebsd.org> From: Devin Teske Date: Mon, 31 Mar 2014 01:04:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263956 - in stable/9: release usr.sbin/bsdinstall usr.sbin/bsdinstall/scripts X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Mar 2014 01:04:44 -0000 Author: dteske Date: Mon Mar 31 01:04:40 2014 New Revision: 263956 URL: http://svnweb.freebsd.org/changeset/base/263956 Log: MFC revisions 230804,254265,255908,256338,256345,256347-256348,256489, 257842-257845,257872,259115,259143,259276,259468-259469,259572,259686, 260260-260262,260866, and 260900 (25 revisions; summarized below)... r230804: Fix a whitespace nit (kevlo) r254265: (recording mergeinfo only) r255908: Remove the is (Iceland) mirror per mail from the admins (brd) r256338: Dump 4096 bytes from /dev/random to /entropy (des) r256345: Rewrite the keymap module r256347: Detect when an interface is wireless (Warren Block) r256348: Merge dumpdev into regular services; enable (Allan Jude) r256489: Add executable bit to docsinstall and entropy scripts r257842: Performance and debugging enhancements r257843: Remove ttys(5) munging from previous commit r257844: Copy install log to deployed /var/log for debugging r257845: Fixup to last commit r257872: Doc fixup -- add missing .El (joel) r259115: Prevent log file from becoming truncated r259143: Use sed(1) /i instead of /I (eadler) r259276: Fix `local: Not in a function' error in logfile r259468: Ignore mouse-release command from VMware r259469: Mask error from newaliases(1) when hostname not fully qualified r259572: Fix `rm: /tmp/bsdinstall_etc/fstab: ..." error in logfile r259686: Move VMware mouse-release solution r260260: Remove what appears to be a stray debugging printf r260261: Lower priority of open wireless access policy (gavin) r260262: Allow bsdinstall to use WPA-Enterprise networks (gavin) r260866: Fix bad comparison and fix file comment (Christoph Mallon) r260900: Whitespace and style nits Added: - copied unchanged from r256338, head/usr.sbin/bsdinstall/scripts/entropy Directory Properties: stable/9/usr.sbin/bsdinstall/scripts/entropy (props changed) Modified: stable/9/release/rc.local stable/9/usr.sbin/bsdinstall/bsdinstall stable/9/usr.sbin/bsdinstall/bsdinstall.8 stable/9/usr.sbin/bsdinstall/scripts/Makefile stable/9/usr.sbin/bsdinstall/scripts/auto stable/9/usr.sbin/bsdinstall/scripts/config stable/9/usr.sbin/bsdinstall/scripts/docsinstall (contents, props changed) stable/9/usr.sbin/bsdinstall/scripts/jail stable/9/usr.sbin/bsdinstall/scripts/keymap stable/9/usr.sbin/bsdinstall/scripts/mirrorselect stable/9/usr.sbin/bsdinstall/scripts/netconfig stable/9/usr.sbin/bsdinstall/scripts/netconfig_ipv4 stable/9/usr.sbin/bsdinstall/scripts/netconfig_ipv6 stable/9/usr.sbin/bsdinstall/scripts/script stable/9/usr.sbin/bsdinstall/scripts/services stable/9/usr.sbin/bsdinstall/scripts/wlanconfig Directory Properties: stable/9/ (props changed) stable/9/release/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/bsdinstall/ (props changed) stable/9/usr.sbin/bsdinstall/scripts/ (props changed) Modified: stable/9/release/rc.local ============================================================================== --- stable/9/release/rc.local Mon Mar 31 00:28:54 2014 (r263955) +++ stable/9/release/rc.local Mon Mar 31 01:04:40 2014 (r263956) @@ -19,6 +19,10 @@ if [ $? -eq 0 ]; then TERM=xterm fi + # Don't send ESC on function-key 62/63 (left/right command key) + kbdcontrol -f 62 '' > /dev/null 2>&1 + kbdcontrol -f 63 '' > /dev/null 2>&1 + if [ -z "$EXTERNAL_VTY_STARTED" ]; then # Init will clean these processes up if/when the system # goes multiuser Modified: stable/9/usr.sbin/bsdinstall/bsdinstall ============================================================================== --- stable/9/usr.sbin/bsdinstall/bsdinstall Mon Mar 31 00:28:54 2014 (r263955) +++ stable/9/usr.sbin/bsdinstall/bsdinstall Mon Mar 31 01:04:40 2014 (r263956) @@ -1,6 +1,7 @@ #!/bin/sh #- # Copyright (c) 2011 Nathan Whitehorn +# Copyright (c) 2013 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -25,15 +26,61 @@ # SUCH DAMAGE. # # $FreeBSD$ +# +############################################################ INCLUDES + +# Delay processing of debug flags as the parent until MAIN. export'd to disable +# re-processing of flags (all children log to the parent's log file). +# +export DEBUG_SELF_INITIALIZE= +export DEBUG_INITIALIZE_FILE= + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 + +############################################################ GLOBALS -: ${BSDINSTALL_LOG="/tmp/bsdinstall_log"}; export BSDINSTALL_LOG : ${BSDINSTALL_TMPETC="/tmp/bsdinstall_etc"}; export BSDINSTALL_TMPETC : ${PATH_FSTAB="$BSDINSTALL_TMPETC/fstab"}; export PATH_FSTAB : ${BSDINSTALL_DISTDIR="/usr/freebsd-dist"}; export BSDINSTALL_DISTDIR : ${BSDINSTALL_CHROOT="/mnt"}; export BSDINSTALL_CHROOT -VERB=${1:-auto}; shift +export debugFile="${debugFile-${BSDINSTALL_LOG-/tmp/bsdinstall_log}}" + +############################################################ MAIN + +# +# Process command-line arguments +# +while getopts $GETOPTS_STDARGS ignored; do + : just skipping known flags +done +shift $(( $OPTIND - 1 )) + +# What are we here to do? +VERB="${1:-auto}"; shift [ -d "$BSDINSTALL_TMPETC" ] || mkdir -p "$BSDINSTALL_TMPETC" -echo "Running installation step: $VERB $@" >> "$BSDINSTALL_LOG" -exec "/usr/libexec/bsdinstall/$VERB" "$@" 2>> "$BSDINSTALL_LOG" + +# Only enable debugging if debugFile is non-NULL and can be initialized +f_quietly f_debug_init +f_isset debugFile || debug= + +f_dprintf "Running installation step: %s %s" "$VERB" "$*" +if [ "$debug" ]; then + case "$debugFile" in + # If NULL, send errors to the bit-bucket + "") exec "/usr/libexec/bsdinstall/$VERB" "$@" 2> /dev/null ;; + # If begins with `+', send errors to both terminal and file (no `+') + +*) exec "/usr/libexec/bsdinstall/$VERB" "$@" \ + 2>&1 >&$TERMINAL_STDOUT_PASSTHRU | tee "${debugFile#+}" ;; + # Otherwise, just send errors to the file specified + *) exec "/usr/libexec/bsdinstall/$VERB" "$@" 2>> "$debugFile" + esac +else + exec "/usr/libexec/bsdinstall/$VERB" "$@" 2> /dev/null +fi + +################################################################################ +# END +################################################################################ Modified: stable/9/usr.sbin/bsdinstall/bsdinstall.8 ============================================================================== --- stable/9/usr.sbin/bsdinstall/bsdinstall.8 Mon Mar 31 00:28:54 2014 (r263955) +++ stable/9/usr.sbin/bsdinstall/bsdinstall.8 Mon Mar 31 01:04:40 2014 (r263956) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 21, 2013 +.Dd October 6, 2013 .Dt BSDINSTALL 8 .Os .Sh NAME @@ -33,6 +33,7 @@ .Nd system installer .Sh SYNOPSIS .Nm +.Op Ar options .Op Ar target .Op Ar ... .Sh DESCRIPTION @@ -49,6 +50,18 @@ invoked with no arguments, it will invok target, which provides a standard interactive installation, invoking the others in sequence. To perform a scripted installation, these subtargets can be invoked separately by an installation script. +.Sh OPTIONS +.Nm +supports the following options, global to all targets: +.Bl -tag -width indent+ +.It Fl D Ar file +Provide a path for the installation log file +.Pq overrides Ev BSDINSTALL_LOG . +See +.Sx ENVIRONMENT VARIABLES +for more information on +.Ev BSDINSTALL_LOG . +.El .Sh TARGETS Most of the following targets are only useful for scripting the installer. For interactive use, most users will be interested only in the @@ -60,6 +73,10 @@ targets. .Bl -tag -width ".Cm jail Ar destination" .It Cm auto Run the standard interactive installation, including disk partitioning. +.It Cm entropy +Reads a small amount of data from +.Pa /dev/random +and stores it in a file in the new system's root directory. .It Cm jail Ar destination Sets up a new chroot system at .Pa destination , Modified: stable/9/usr.sbin/bsdinstall/scripts/Makefile ============================================================================== --- stable/9/usr.sbin/bsdinstall/scripts/Makefile Mon Mar 31 00:28:54 2014 (r263955) +++ stable/9/usr.sbin/bsdinstall/scripts/Makefile Mon Mar 31 01:04:40 2014 (r263956) @@ -1,8 +1,8 @@ # $FreeBSD$ -SCRIPTS= auto adduser checksum config docsinstall hostname jail keymap \ - mirrorselect mount netconfig netconfig_ipv4 netconfig_ipv6 rootpass \ - script services time umount wlanconfig +SCRIPTS= auto adduser checksum config docsinstall entropy hostname jail \ + keymap mirrorselect mount netconfig netconfig_ipv4 netconfig_ipv6 \ + rootpass script services time umount wlanconfig BINDIR= /usr/libexec/bsdinstall NO_MAN= true Modified: stable/9/usr.sbin/bsdinstall/scripts/auto ============================================================================== --- stable/9/usr.sbin/bsdinstall/scripts/auto Mon Mar 31 00:28:54 2014 (r263955) +++ stable/9/usr.sbin/bsdinstall/scripts/auto Mon Mar 31 01:04:40 2014 (r263956) @@ -1,6 +1,7 @@ #!/bin/sh #- # Copyright (c) 2011 Nathan Whitehorn +# Copyright (c) 2013 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -25,8 +26,13 @@ # SUCH DAMAGE. # # $FreeBSD$ +# +############################################################ INCLUDES + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 -echo "Begun Installation at $(date)" > $BSDINSTALL_LOG +############################################################ FUNCTIONS error() { test -n "$DISTDIR_IS_UNIONFS" && umount -f $BSDINSTALL_DISTDIR @@ -41,6 +47,9 @@ error() { fi } +############################################################ MAIN + +f_dprintf "Began Installation at %s" "$( date )" rm -rf $BSDINSTALL_TMPETC mkdir $BSDINSTALL_TMPETC @@ -90,7 +99,7 @@ if [ -n "$FETCH_DISTRIBUTIONS" ]; then export BSDINSTALL_DISTSITE fi -rm $PATH_FSTAB +rm -f $PATH_FSTAB touch $PATH_FSTAB dialog --backtitle "FreeBSD Installer" --title "Partitioning" --extra-button \ @@ -108,7 +117,12 @@ case $? in sh 2>&1 ;; 3) # Manual - bsdinstall partedit || error + if f_isset debugFile; then + # Give partedit the path to our logfile so it can append + BSDINSTALL_LOG="${debugFile#+}" bsdinstall partedit || error + else + bsdinstall partedit || error + fi bsdinstall mount || error ;; *) @@ -222,5 +236,11 @@ if [ $? -eq 0 ]; then chroot "$BSDINSTALL_CHROOT" /bin/sh 2>&1 fi -echo "Installation Completed at $(date)" >> $BSDINSTALL_LOG +bsdinstall entropy +bsdinstall umount + +f_dprintf "Installation Completed at %s" "$( date )" +################################################################################ +# END +################################################################################ Modified: stable/9/usr.sbin/bsdinstall/scripts/config ============================================================================== --- stable/9/usr.sbin/bsdinstall/scripts/config Mon Mar 31 00:28:54 2014 (r263955) +++ stable/9/usr.sbin/bsdinstall/scripts/config Mon Mar 31 01:04:40 2014 (r263956) @@ -1,6 +1,7 @@ #!/bin/sh #- # Copyright (c) 2011 Nathan Whitehorn +# Copyright (c) 2013 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -25,12 +26,19 @@ # SUCH DAMAGE. # # $FreeBSD$ +# +############################################################ MAIN cat $BSDINSTALL_TMPETC/rc.conf.* >> $BSDINSTALL_TMPETC/rc.conf rm $BSDINSTALL_TMPETC/rc.conf.* cp $BSDINSTALL_TMPETC/* $BSDINSTALL_CHROOT/etc +[ "${debugFile#+}" ] && cp "${debugFile#+}" $BSDINSTALL_CHROOT/var/log/ + # Set up other things from installed config -chroot $BSDINSTALL_CHROOT /usr/bin/newaliases +chroot $BSDINSTALL_CHROOT /usr/bin/newaliases > /dev/null 2>&1 +################################################################################ +# END +################################################################################ Modified: stable/9/usr.sbin/bsdinstall/scripts/docsinstall ============================================================================== --- stable/9/usr.sbin/bsdinstall/scripts/docsinstall Mon Mar 31 00:28:54 2014 (r263955) +++ stable/9/usr.sbin/bsdinstall/scripts/docsinstall Mon Mar 31 01:04:40 2014 (r263956) @@ -1,6 +1,7 @@ #!/bin/sh #- # Copyright (c) 2011 Marc Fonvieille +# Copyright (c) 2013 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -25,55 +26,137 @@ # SUCH DAMAGE. # # $FreeBSD$ +# +############################################################ INCLUDES +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 +f_dprintf "%s: loading includes..." "$0" +f_include $BSDCFG_SHARE/dialog.subr +f_include $BSDCFG_SHARE/mustberoot.subr +f_include $BSDCFG_SHARE/packages/packages.subr -exec 3>&1 -DOCS=$(dialog --backtitle "FreeBSD Installer" \ - --title "FreeBSD Documentation Installation" --separate-output \ - --checklist "This menu will allow you to install the whole documentation set -from the FreeBSD Documentation Project: Handbook, FAQ and articles.\n\n -Please select the language versions you wish to install. At minimum, -you should install the English version, this is the original version -of the documentation.\n\n -NB: This requires a working, configured network connection." 0 0 0 \ - bn "Bengali Documentation" ${DIST_DOC_BN:-off} \ - da "Danish Documentation" ${DIST_DOC_DA:-off} \ - de "German Documentation" ${DIST_DOC_DE:-off} \ - el "Greek Documentation" ${DIST_DOC_EL:-off} \ - en "English Documentation (recommended)" ${DIST_DOC_EN:-on} \ - es "Spanish Documentation" ${DIST_DOC_ES:-off} \ - fr "French Documentation" ${DIST_DOC_FR:-off} \ - hu "Hungarian Documentation" ${DIST_DOC_HU:-off} \ - it "Italian Documentation" ${DIST_DOC_IT:-off} \ - ja "Japanese Documentation" ${DIST_DOC_JA:-off} \ - mn "Mongolian Documentation" ${DIST_DOC_MN:-off} \ - nl "Dutch Documentation" ${DIST_DOC_NL:-off} \ - pl "Polish Documentation" ${DIST_DOC_PL:-off} \ - pt "Portuguese Documentation" ${DIST_DOC_PT:-off} \ - ru "Russian Documentation" ${DIST_DOC_RU:-off} \ - sr "Serbian Documentation" ${DIST_DOC_SR:-off} \ - tr "Turkish Documentation" ${DIST_DOC_TR:-off} \ - zh_cn "Simplified Chinese Documentation" ${DIST_DOC_ZH_CN:-off} \ - zh_tw "Traditional Chinese Documentation" ${DIST_DOC_ZH_TW:-off} \ -2>&1 1>&3) -test $? -eq 0 || exit 0 -exec 3>&- +############################################################ CONFIGURATION -# Let pkg_add be able to use name servers -cp ${BSDINSTALL_TMPETC}/resolv.conf ${BSDINSTALL_CHROOT}/etc +# +# List of languages to display (descriptions pulled from $msg_{lang}doc_desc) +# +: ${DOCSINSTALL_LANGS:=\ + bn da de el en es fr hu it ja mn nl pl pt ru sr tr zh_cn zh_tw \ +} + +############################################################ GLOBALS -error() { - dialog --backtitle "FreeBSD Installer" --title "Error" --msgbox \ - "Could not install package $1 (`tail -n 1 ${BSDINSTALL_LOG}`)" 0 0 - exit 1 +# +# Strings that should be moved to an i18n file and loaded with f_include_lang() +# +hline_arrows_space_tab_enter="Use arrows, SPACE, TAB or ENTER" +msg_bndoc_desc="Bengali Documentation" +msg_cancel="Cancel" +msg_dadoc_desc="Danish Documentation" +msg_dedoc_desc="German Documentation" +msg_docsinstall_menu_text="This menu allows you to install the whole documentation set from\nthe FreeBSD Documentation Project: Handbook, FAQ, and articles.\n\nPlease select the language versions you wish to install. At\nminimum, you should install the English version, the original\nversion of the documentation." +msg_eldoc_desc="Greek Documentation" +msg_endoc_desc="English Documentation (recommended)" +msg_esdoc_desc="Spanish Documentation" +msg_frdoc_desc="French Documentation" +msg_freebsd_documentation_installation="FreeBSD Documentation Installation" +msg_freebsd_installer="FreeBSD Installer" +msg_hudoc_desc="Hungarian Documentation" +msg_itdoc_desc="Italian Documentation" +msg_jadoc_desc="Japanese Documentation" +msg_mndoc_desc="Mongolian Documentation" +msg_nldoc_desc="Dutch Documentation" +msg_ok="OK" +msg_pldoc_desc="Polish Documentation" +msg_ptdoc_desc="Portuguese Documentation" +msg_rudoc_desc="Russian Documentation" +msg_srdoc_desc="Serbian Documentation" +msg_trdoc_desc="Turkish Documentation" +msg_zh_cndoc_desc="Simplified Chinese Documentation" +msg_zh_twdoc_desc="Traditional Chinese Documentation" + +############################################################ FUNCTIONS + +# dialog_menu_main +# +# Display the dialog(1)-based application main menu. +# +dialog_menu_main() +{ + local title="$DIALOG_TITLE" + local btitle="$DIALOG_BACKTITLE" + local prompt="$msg_docsinstall_menu_text" + local check_list= # Calculated below + local hline="$hline_arrows_space_tab_enter" + + local lang desc upper status + for lang in $DOCSINSTALL_LANGS; do + # Fetch the i18n description to display + f_getvar msg_${lang}doc_desc desc + f_shell_escape "$desc" desc + + # Get default status for each language + upper=$( echo "$lang" | awk '{print toupper($0)}' ) + case "$lang" in + en) f_getvar DIST_DOC_$upper:-on status ;; + *) f_getvar DIST_DOC_$upper:-off status + esac + + check_list="$check_list + '$lang' '$desc' '$status' + " # END-QUOTE + done + + local height width rows + eval f_dialog_checklist_size height width rows \ + \"\$title\" \ + \"\$btitle\" \ + \"\$prompt\" \ + \"\$hline\" \ + $check_list + local selected + selected=$( eval $DIALOG \ + --title \"\$title\" \ + --backtitle \"\$btitle\" \ + --hline \"\$hline\" \ + --ok-label \"\$msg_ok\" \ + --cancel-label \"\$msg_cancel\" \ + --checklist \"\$prompt\" \ + $height $width $rows \ + $check_list \ + 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD + ) + local retval=$? + f_dialog_menutag_store -s "$selected" + return $retval } +############################################################ MAIN + +# +# Initialize +# +f_dialog_title "$msg_freebsd_documentation_installation" +f_dialog_backtitle "$msg_freebsd_installer" +f_mustberoot_init -clear -echo "FreeBSD Installer" -echo "========================" -echo +# +# Launch application main menu +# +dialog_menu_main || f_die +f_dialog_menutag_fetch selected -for i in $DOCS; do - pkg_add -C ${BSDINSTALL_CHROOT} -r ${i}-freebsd-doc || error $i-freebsd-doc +# Let pkg_add be able to use name servers +f_quietly cp -f $BSDINSTALL_TMPETC/resolv.conf $BSDINSTALL_CHROOT/etc/ + +# +# Install each of the selected packages +# +for lang in $selected; do + f_package_add $lang-freebsd-doc || return $FAILURE done + +################################################################################ +# END +################################################################################ Copied: stable/9/usr.sbin/bsdinstall/scripts/entropy (from r256338, head/usr.sbin/bsdinstall/scripts/entropy) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/usr.sbin/bsdinstall/scripts/entropy Mon Mar 31 01:04:40 2014 (r263956, copy of r256338, head/usr.sbin/bsdinstall/scripts/entropy) @@ -0,0 +1,29 @@ +#!/bin/sh +#- +# Copyright (c) 2013 Dag-Erling Smørgrav +# All rights reserved. +# +# 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. +# +# $FreeBSD$ + +dd if=/dev/random of=$BSDINSTALL_CHROOT/entropy bs=4096 count=1 Modified: stable/9/usr.sbin/bsdinstall/scripts/jail ============================================================================== --- stable/9/usr.sbin/bsdinstall/scripts/jail Mon Mar 31 00:28:54 2014 (r263955) +++ stable/9/usr.sbin/bsdinstall/scripts/jail Mon Mar 31 01:04:40 2014 (r263956) @@ -1,6 +1,7 @@ #!/bin/sh #- # Copyright (c) 2011 Nathan Whitehorn +# Copyright (c) 2013 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -25,8 +26,15 @@ # SUCH DAMAGE. # # $FreeBSD$ +# +############################################################ INCLUDES + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 -echo "Begun Installation at $(date)" > $BSDINSTALL_LOG +############################################################ MAIN + +f_dprintf "Began Installation at %s" "$( date )" export BSDINSTALL_CHROOT=$1 error() { @@ -110,5 +118,10 @@ bsdinstall config || error cp /etc/resolv.conf $1/etc cp /etc/localtime $1/etc -echo "Installation Completed at $(date)" >> $BSDINSTALL_LOG +bsdinstall entropy + +f_dprintf "Installation Completed at %s" "$(date)" +################################################################################ +# END +################################################################################ Modified: stable/9/usr.sbin/bsdinstall/scripts/keymap ============================================================================== --- stable/9/usr.sbin/bsdinstall/scripts/keymap Mon Mar 31 00:28:54 2014 (r263955) +++ stable/9/usr.sbin/bsdinstall/scripts/keymap Mon Mar 31 01:04:40 2014 (r263956) @@ -1,6 +1,7 @@ #!/bin/sh #- # Copyright (c) 2011 Nathan Whitehorn +# Copyright (c) 2013 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -25,11 +26,212 @@ # SUCH DAMAGE. # # $FreeBSD$ +# +############################################################ INCLUDES + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 +f_dprintf "%s: loading includes..." "$0" +f_include $BSDCFG_SHARE/dialog.subr +f_include $BSDCFG_SHARE/keymap.subr +f_include $BSDCFG_SHARE/sysrc.subr + +############################################################ CONFIGURATION + +# +# Default file to store keymap selection in +# +: ${KEYMAPFILE:=$BSDINSTALL_TMPETC/rc.conf.keymap} + +# +# Default path to keymap INDEX containing descriptions +# +: ${MAPDESCFILE:=/usr/share/syscons/keymaps/INDEX.keymaps} + +############################################################ GLOBALS + +# +# Strings that should be moved to an i18n file and loaded with f_include_lang() +# +hline_arrows_tab_enter="Press arrows, TAB or ENTER" +msg_continue_with_keymap="Continue with %s keymap" +msg_default="default" +msg_error="Error" +msg_freebsd_installer="FreeBSD Installer" +msg_keymap_menu_text="The system console driver for FreeBSD defaults to standard \"US\"\nkeyboard map. Other keymaps can be chosen below." +msg_keymap_selection="Keymap Selection" +msg_ok="OK" +msg_select="Select" +msg_test_keymap="Test %s keymap" +msg_test_the_currently_selected_keymap="Test the currently selected keymap" +msg_test_the_keymap_by_typing="Test the keymap by typing letters, numbers, and symbols. Characters\nshould match labels on the keyboard keys. Press Enter to stop testing." + +############################################################ FUNCTIONS + +# dialog_keymap_test $keymap +# +# Activate $keymap and display an input box (without cancel button) for the +# user to test keyboard input and return. Always returns success. +# +dialog_keymap_test() +{ + local keym="$1" + local title= # Calculated below + local btitle= # Calculated below + local prompt="$msg_test_the_keymap_by_typing" + local hline= + + # Attempt to activate the keymap + if [ "$keym" ]; then + local err + err=$( f_keymap_kbdcontrol "$keym" 2>&1 > /dev/null ) + if [ "$err" ]; then + f_dialog_title "$msg_error" + f_dialog_msgbox "$err" + f_dialog_title_restore + return $FAILURE + fi + fi + + f_dialog_title "$( printf "$msg_test_keymap" "${keym:-$msg_default}" )" + title="$DIALOG_TITLE" + btitle="$DIALOG_BACKTITLE" + f_dialog_title_restore + + local height width + f_dialog_inputbox_size height width \ + "$title" "$btitle" "$prompt" "" "$hline" + + $DIALOG \ + --title "$title" \ + --backtitle "$btitle" \ + --hline "$hline" \ + --ok-label "$msg_ok" \ + --no-cancel \ + --inputbox "$prompt" \ + $height $width \ + 2>/dev/null >&$DIALOG_TERMINAL_PASSTHRU_FD -kbdcontrol -d >/dev/null 2>&1 -if [ $? -eq 0 ]; then - dialog --backtitle "FreeBSD Installer" --title "Keymap Selection" \ - --yesno "Would you like to set a non-default key mapping for your keyboard?" 0 0 || exit 0 - exec 3>&1 - kbdmap 2>&1 1>&3 | grep 'keymap=' > $BSDINSTALL_TMPETC/rc.conf.keymap + return $DIALOG_OK +} + +############################################################ MAIN + +# +# Initialize +# +f_dialog_title "$msg_keymap_selection" +f_dialog_backtitle "$msg_freebsd_installer" + +# +# Die immediately if we can't dump the current keyboard map +# +#error=$( kbdcontrol -d 2>&1 > /dev/null ) || f_die $FAILURE "%s" "$error" + +# Capture Ctrl-C for clean-up +trap 'rm -f $KEYMAPFILE; exit $FAILURE' SIGINT + +# Get a value from rc.conf(5) as initial value (if not being scripted) +f_getvar $VAR_KEYMAP keymap +if [ ! "$keymap" ]; then + keymap=$( f_sysrc_get keymap ) + case "$keymap" in [Nn][Oo]) keymap="";; esac fi + +# +# Loop until the user has finalized their selection (by clicking the +# [relabeled] Cancel button). +# +width=67 first_pass=1 back_from_testing= +[ "$USE_XDIALOG" ] && width=70 +prompt="$msg_keymap_menu_text" +hline="$hline_arrows_tab_enter" +while :; do + # + # Re/Build list of keymaps + # + cont_msg=$( printf "$msg_continue_with_keymap" \ + "${keymap:-$msg_default}" ) + test_msg=$( printf "$msg_test_keymap" "${keymap:-$msg_default}" ) + menu_list=" + '>>> $cont_msg' '' '$msg_continue_with_current_keymap' + '->- $test_msg' '' '$msg_test_the_currently_selected_keymap' + " # END-QUOTE + if [ "$first_pass" ]; then + defaultitem= + first_pass= + else + defaultitem="->- $test_msg" + fi + for k in $KEYMAPS; do + keymap_$k get keym keym + keymap_$k get desc desc + radio=" " + if [ "$keym" = "$keymap" ]; then + radio="*" + if [ "$back_from_testing" ]; then + defaultitem="(*) $desc" + back_from_testing= + fi + fi + f_shell_escape "$desc" desc + menu_list="$menu_list + '($radio) $desc' '' '$keym: $desc' + " # END-QUOTE + done + back_from_testing= + + # + # Display keymap configuration menu + # + eval f_dialog_menu_with_help_size height \"\" rows \ + \"\$DIALOG_TITLE\" \ + \"\$DIALOG_BACKTITLE\" \ + \"\$prompt\" \ + \"\$hline\" \ + $menu_list + menu_choice=$( eval $DIALOG \ + --title \"\$DIALOG_TITLE\" \ + --backtitle \"\$DIALOG_BACKTITLE\" \ + --hline \"\$hline\" \ + --keep-tite \ + --item-help \ + --ok-label \"\$msg_select\" \ + --cancel-label \"\$msg_cancel\" \ + --default-item \"\$defaultitem\" \ + --menu \"\$prompt\" \ + $height $width $rows \ + $menu_list \ + 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD + ) || { + f_quietly rm -f "$KEYMAPFILE" + exit $FAILURE # Exit with an error so bsdinstall restarts + } + f_dialog_data_sanitize menu_choice + + case "$menu_choice" in + ">>> "*) # Continue with keymap + break ;; + "->-"*) # Test keymap + dialog_keymap_test "$keymap" + back_from_testing=1 + continue ;; + esac + + # Turn the user's choice into a number + n=$( eval f_dialog_menutag2index_with_help \ + \"\$menu_choice\" $menu_list ) + + # Turn that number ithe name of the keymap struct + k=$( set -- $KEYMAPS; eval echo \"\${$(( $n - 2))}\" ) + + # Get actual keymap setting while we update $keymap and $KEYMAPFILE + keymap_$k get keym keymap + echo "keymap=\"$keymap\"" > "$KEYMAPFILE" +done + +f_quietly f_keymap_kbdcontrol "$keymap" + +################################################################################ +# END +################################################################################ Modified: stable/9/usr.sbin/bsdinstall/scripts/mirrorselect ============================================================================== --- stable/9/usr.sbin/bsdinstall/scripts/mirrorselect Mon Mar 31 00:28:54 2014 (r263955) +++ stable/9/usr.sbin/bsdinstall/scripts/mirrorselect Mon Mar 31 01:04:40 2014 (r263956) @@ -87,7 +87,6 @@ MIRROR=`dialog --backtitle "FreeBSD Inst ftp://ftp8.de.freebsd.org "Germany #8"\ ftp://ftp.gr.freebsd.org "Greece"\ ftp://ftp2.gr.freebsd.org "Greece #2"\ - ftp://ftp.is.freebsd.org "Iceland"\ ftp://ftp3.ie.freebsd.org "Ireland #3"\ ftp://ftp.il.freebsd.org "Israel"\ ftp://ftp.it.freebsd.org "Italy"\ Modified: stable/9/usr.sbin/bsdinstall/scripts/netconfig ============================================================================== --- stable/9/usr.sbin/bsdinstall/scripts/netconfig Mon Mar 31 00:28:54 2014 (r263955) +++ stable/9/usr.sbin/bsdinstall/scripts/netconfig Mon Mar 31 01:04:40 2014 (r263956) @@ -41,11 +41,19 @@ DIALOG_TAGS="" : ${DIALOG_ITEM_HELP=4} : ${DIALOG_ESC=255} +# Do a dirty check to see if this a wireless interface -- there should be a +# better way +is_wireless_if() { + ifconfig $1 | grep -q 'media: IEEE 802.11 Wireless' +} + for IF in `ifconfig -l`; do test "$IF" = "lo0" && continue (ifconfig -g wlan | egrep -wq $IF) && continue INTERFACES="$INTERFACES $IF" DESC=`sysctl -n dev.$(echo $IF | sed -E 's/([[:alpha:]]*)([[:digit:]]*)/\1.\2/g').%desc` + is_wireless_if $IF && echo $DESC | + grep -iqv wireless && DESC="Wireless $DESC" DIALOG_TAGS="$DIALOG_TAGS $IF \"$DESC\"" done @@ -63,10 +71,8 @@ exec 3>&- : > $BSDINSTALL_TMPETC/._rc.conf.net -# Do a dirty check to see if this a wireless interface -- there should be a -# better way IFCONFIG_PREFIX="" -if ifconfig $INTERFACE | grep -q 'media: IEEE 802.11 Wireless'; then +if is_wireless_if $INTERFACE; then NEXT_WLAN_IFACE=wlan0 # XXX echo wlans_$INTERFACE=\"$NEXT_WLAN_IFACE\" >> $BSDINSTALL_TMPETC/._rc.conf.net IFCONFIG_PREFIX="WPA " Modified: stable/9/usr.sbin/bsdinstall/scripts/netconfig_ipv4 ============================================================================== --- stable/9/usr.sbin/bsdinstall/scripts/netconfig_ipv4 Mon Mar 31 00:28:54 2014 (r263955) +++ stable/9/usr.sbin/bsdinstall/scripts/netconfig_ipv4 Mon Mar 31 01:04:40 2014 (r263956) @@ -1,6 +1,7 @@ #!/bin/sh #- # Copyright (c) 2011 Nathan Whitehorn +# Copyright (c) 2013 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -25,13 +26,15 @@ # SUCH DAMAGE. # # $FreeBSD$ +# +############################################################ INCLUDES + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 +f_dprintf "%s: loading includes..." "$0" +f_include $BSDCFG_SHARE/dialog.subr -: ${DIALOG_OK=0} -: ${DIALOG_CANCEL=1} -: ${DIALOG_HELP=2} -: ${DIALOG_EXTRA=3} -: ${DIALOG_ITEM_HELP=4} -: ${DIALOG_ESC=255} +############################################################ MAIN INTERFACE=$1 IFCONFIG_PREFIX="$2" @@ -49,8 +52,9 @@ if [ $? -eq $DIALOG_OK ]; then if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then dialog --backtitle 'FreeBSD Installer' --infobox "Acquiring DHCP lease..." 0 0 - dhclient $INTERFACE 2>> $BSDINSTALL_LOG + err=$( dhclient $INTERFACE 2>&1 ) if [ $? -ne 0 ]; then + f_dprintf "%s" "$err" dialog --backtitle 'FreeBSD Installer' --msgbox "DHCP lease acquisition failed." 0 0 exec $0 ${INTERFACE} "${IFCONFIG_PREFIX}" fi @@ -73,7 +77,7 @@ exec 3>&- echo $INTERFACE $IF_CONFIG | awk -v prefix="$IFCONFIG_PREFIX" '{ - printf("ifconfig_%s=\"%s inet %s netmask %s\"\n", $1, prefix, $2, $3); + printf("ifconfig_%s=\"%s\inet %s netmask %s\"\n", $1, prefix, $2, $3); printf("defaultrouter=\"%s\"\n", $4); }' >> $BSDINSTALL_TMPETC/._rc.conf.net @@ -86,3 +90,6 @@ if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; t fi fi +################################################################################ +# END +################################################################################ Modified: stable/9/usr.sbin/bsdinstall/scripts/netconfig_ipv6 ============================================================================== --- stable/9/usr.sbin/bsdinstall/scripts/netconfig_ipv6 Mon Mar 31 00:28:54 2014 (r263955) +++ stable/9/usr.sbin/bsdinstall/scripts/netconfig_ipv6 Mon Mar 31 01:04:40 2014 (r263956) @@ -1,8 +1,8 @@ #!/bin/sh #- # Copyright (c) 2011 Nathan Whitehorn -# All rights reserved. # Copyright (c) 2011 The FreeBSD Foundation +# Copyright (c) 2013 Devin Teske # All rights reserved. # # Portions of this software were developed by Bjoern Zeeb @@ -30,19 +30,21 @@ # SUCH DAMAGE. # # $FreeBSD$ +# +############################################################ INCLUDES + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 +f_dprintf "%s: loading includes..." "$0" +f_include $BSDCFG_SHARE/dialog.subr + +############################################################ MAIN # # TODO: # - Add DHCPv6 support once FreeBSD ships with it. # -: ${DIALOG_OK=0} -: ${DIALOG_CANCEL=1} -: ${DIALOG_HELP=2} -: ${DIALOG_EXTRA=3} -: ${DIALOG_ITEM_HELP=4} -: ${DIALOG_ESC=255} - INTERFACE=$1 case "${INTERFACE}" in "") dialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' \ @@ -61,8 +63,9 @@ while : ; do dialog --backtitle 'FreeBSD Installer' \ --infobox "Sending Router Solicitation ..." 0 0 ifconfig ${INTERFACE} inet6 -ifdisabled accept_rtadv up - rtsol -F $INTERFACE 2>> $BSDINSTALL_LOG + err=$( rtsol -F $INTERFACE 2>&1 ) if [ $? -ne 0 ]; then + f_dprintf "%s" "$err" dialog --backtitle 'FreeBSD Installer' --msgbox "SLAAC failed." 0 0 AGAIN=" again" continue @@ -148,3 +151,6 @@ if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; t fi fi +################################################################################ +# END +################################################################################ Modified: stable/9/usr.sbin/bsdinstall/scripts/script ============================================================================== --- stable/9/usr.sbin/bsdinstall/scripts/script Mon Mar 31 00:28:54 2014 (r263955) +++ stable/9/usr.sbin/bsdinstall/scripts/script Mon Mar 31 01:04:40 2014 (r263956) @@ -1,6 +1,7 @@ #!/bin/sh #- # Copyright (c) 2013 Nathan Whitehorn +# Copyright (c) 2013 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -25,27 +26,55 @@ # SUCH DAMAGE. # # $FreeBSD$ +# +############################################################ INCLUDES + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 +f_dprintf "%s: loading includes..." "$0" +f_include $BSDCFG_SHARE/dialog.subr +f_include $BSDCFG_SHARE/variable.subr + +############################################################ CONFIGURATION # VARIABLES: # PARTITIONS # DISTRIBUTIONS # BSDINSTALL_DISTDIR -error() { - test -f $PATH_FSTAB && bsdinstall umount - echo "Installation Error!" - cat $BSDINSTALL_LOG - echo "Installation Error!" +############################################################ GLOBALS + +# +# Strings that should be moved to an i18n file and loaded with f_include_lang() +# +msg_installation_error="Installation Error!" + +############################################################ FUNCTIONS + +error() +{ + [ -f "$PATH_FSTAB" ] && bsdinstall umount + + local file + f_getvar "$VAR_DEBUG_FILE#+" file + if [ "$file" ]; then + f_dialog_title "$msg_installation_error" + f_dialog_textbox "$file" + # No need to restore title, pining for the fjords + fi + exit 1 } +############################################################ MAIN + set -e trap error EXIT SCRIPT="$1" shift -echo "Begun Installation at $(date)" > $BSDINSTALL_LOG +f_dprintf "Began Instalation at %s" "$( date )" rm -rf $BSDINSTALL_TMPETC mkdir $BSDINSTALL_TMPETC @@ -55,6 +84,14 @@ split -a 2 -p '^#!.*' "$SCRIPT" /tmp/bsd : ${DISTRIBUTIONS="kernel.txz base.txz"}; export DISTRIBUTIONS export BSDINSTALL_DISTDIR +# Re-initialize a new log if preamble changed BSDINSTALL_LOG +if [ "$BSDINSTALL_LOG" != "${debugFile#+}" ]; then + export debugFile="$BSDINSTALL_LOG" + f_quietly f_debug_init + # NB: Being scripted, let debug go to terminal for invalid debugFile + f_dprintf "Began Instalation at %s" "$( date )" +fi + # Make partitions rm -f $PATH_FSTAB touch $PATH_FSTAB @@ -83,8 +120,13 @@ if [ -f /tmp/bsdinstall-installscript-ab rm $BSDINSTALL_CHROOT/tmp/installscript fi +bsdinstall entropy bsdinstall umount *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Mon Mar 31 02:17:59 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 774125A5; Mon, 31 Mar 2014 02:17:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6417A7E5; Mon, 31 Mar 2014 02:17:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2V2HxIJ019400; Mon, 31 Mar 2014 02:17:59 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2V2Hxtt019399; Mon, 31 Mar 2014 02:17:59 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201403310217.s2V2Hxtt019399@svn.freebsd.org> From: Mateusz Guzik Date: Mon, 31 Mar 2014 02:17:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263958 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Mar 2014 02:17:59 -0000 Author: mjg Date: Mon Mar 31 02:17:58 2014 New Revision: 263958 URL: http://svnweb.freebsd.org/changeset/base/263958 Log: MFC r263460: Take filedesc lock only for reading when allocating new fdtable. Code populating the table does this already. Modified: stable/10/sys/kern/kern_descrip.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_descrip.c ============================================================================== --- stable/10/sys/kern/kern_descrip.c Mon Mar 31 01:54:59 2014 (r263957) +++ stable/10/sys/kern/kern_descrip.c Mon Mar 31 02:17:58 2014 (r263958) @@ -1809,7 +1809,7 @@ fdinit(struct filedesc *fdp) newfdp = malloc(sizeof *newfdp, M_FILEDESC, M_WAITOK | M_ZERO); FILEDESC_LOCK_INIT(&newfdp->fd_fd); if (fdp != NULL) { - FILEDESC_XLOCK(fdp); + FILEDESC_SLOCK(fdp); newfdp->fd_fd.fd_cdir = fdp->fd_cdir; if (newfdp->fd_fd.fd_cdir) VREF(newfdp->fd_fd.fd_cdir); @@ -1819,7 +1819,7 @@ fdinit(struct filedesc *fdp) newfdp->fd_fd.fd_jdir = fdp->fd_jdir; if (newfdp->fd_fd.fd_jdir) VREF(newfdp->fd_fd.fd_jdir); - FILEDESC_XUNLOCK(fdp); + FILEDESC_SUNLOCK(fdp); } /* Create the file descriptor table. */ From owner-svn-src-stable@FreeBSD.ORG Mon Mar 31 02:19:58 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6ABC86EB; Mon, 31 Mar 2014 02:19:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 579367ED; Mon, 31 Mar 2014 02:19:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2V2Jwea019662; Mon, 31 Mar 2014 02:19:58 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2V2JwMm019660; Mon, 31 Mar 2014 02:19:58 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201403310219.s2V2JwMm019660@svn.freebsd.org> From: Mateusz Guzik Date: Mon, 31 Mar 2014 02:19:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263959 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Mar 2014 02:19:58 -0000 Author: mjg Date: Mon Mar 31 02:19:57 2014 New Revision: 263959 URL: http://svnweb.freebsd.org/changeset/base/263959 Log: MFC r263530: Mark the following sysctls as MPSAFE: kern.file kern.proc.filedesc kern.proc.ofiledesc Modified: stable/10/sys/kern/kern_descrip.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_descrip.c ============================================================================== --- stable/10/sys/kern/kern_descrip.c Mon Mar 31 02:17:58 2014 (r263958) +++ stable/10/sys/kern/kern_descrip.c Mon Mar 31 02:19:57 2014 (r263959) @@ -2976,7 +2976,7 @@ sysctl_kern_file(SYSCTL_HANDLER_ARGS) return (error); } -SYSCTL_PROC(_kern, KERN_FILE, file, CTLTYPE_OPAQUE|CTLFLAG_RD, +SYSCTL_PROC(_kern, KERN_FILE, file, CTLTYPE_OPAQUE|CTLFLAG_RD|CTLFLAG_MPSAFE, 0, 0, sysctl_kern_file, "S,xfile", "Entire file table"); #ifdef KINFO_OFILE_SIZE @@ -3234,8 +3234,9 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLE return (0); } -static SYSCTL_NODE(_kern_proc, KERN_PROC_OFILEDESC, ofiledesc, CTLFLAG_RD, - sysctl_kern_proc_ofiledesc, "Process ofiledesc entries"); +static SYSCTL_NODE(_kern_proc, KERN_PROC_OFILEDESC, ofiledesc, + CTLFLAG_RD||CTLFLAG_MPSAFE, sysctl_kern_proc_ofiledesc, + "Process ofiledesc entries"); #endif /* COMPAT_FREEBSD7 */ #ifdef KINFO_FILE_SIZE @@ -3747,8 +3748,9 @@ fill_shm_info(struct file *fp, struct ki return (0); } -static SYSCTL_NODE(_kern_proc, KERN_PROC_FILEDESC, filedesc, CTLFLAG_RD, - sysctl_kern_proc_filedesc, "Process filedesc entries"); +static SYSCTL_NODE(_kern_proc, KERN_PROC_FILEDESC, filedesc, + CTLFLAG_RD|CTLFLAG_MPSAFE, sysctl_kern_proc_filedesc, + "Process filedesc entries"); #ifdef DDB /* From owner-svn-src-stable@FreeBSD.ORG Mon Mar 31 02:24:29 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C226A96A; Mon, 31 Mar 2014 02:24:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEB7D896; Mon, 31 Mar 2014 02:24:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2V2OTR5023168; Mon, 31 Mar 2014 02:24:29 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2V2OT2S023167; Mon, 31 Mar 2014 02:24:29 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201403310224.s2V2OT2S023167@svn.freebsd.org> From: Mateusz Guzik Date: Mon, 31 Mar 2014 02:24:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263960 - stable/10/sys/security/audit X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Mar 2014 02:24:29 -0000 Author: mjg Date: Mon Mar 31 02:24:29 2014 New Revision: 263960 URL: http://svnweb.freebsd.org/changeset/base/263960 Log: MFC r263458: audit: plug FILEDESC_LOCK leak in audit_canon_path. Modified: stable/10/sys/security/audit/audit_bsm_klib.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/security/audit/audit_bsm_klib.c ============================================================================== --- stable/10/sys/security/audit/audit_bsm_klib.c Mon Mar 31 02:19:57 2014 (r263959) +++ stable/10/sys/security/audit/audit_bsm_klib.c Mon Mar 31 02:24:29 2014 (r263960) @@ -497,6 +497,7 @@ audit_canon_path(struct thread *td, int /* XXX: fgetvp() that vhold()s vnode instead of vref()ing it would be better */ error = fgetvp(td, dirfd, NULL, &cvnp); if (error) { + FILEDESC_SUNLOCK(fdp); cpath[0] = '\0'; if (rvnp != NULL) vdrop(rvnp); From owner-svn-src-stable@FreeBSD.ORG Mon Mar 31 02:30:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 36051AD9; Mon, 31 Mar 2014 02:30:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 089298C1; Mon, 31 Mar 2014 02:30:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2V2Utdd024008; Mon, 31 Mar 2014 02:30:55 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2V2UtVl024007; Mon, 31 Mar 2014 02:30:55 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201403310230.s2V2UtVl024007@svn.freebsd.org> From: Mateusz Guzik Date: Mon, 31 Mar 2014 02:30:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263961 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Mar 2014 02:30:56 -0000 Author: mjg Date: Mon Mar 31 02:30:55 2014 New Revision: 263961 URL: http://svnweb.freebsd.org/changeset/base/263961 Log: MFC r263704: Make /dev/devctl mpsafe. MFC r263753: Remove lockless check in devopen, while correct it does not make much sense. Modified: stable/10/sys/kern/subr_bus.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/subr_bus.c ============================================================================== --- stable/10/sys/kern/subr_bus.c Mon Mar 31 02:24:29 2014 (r263960) +++ stable/10/sys/kern/subr_bus.c Mon Mar 31 02:30:55 2014 (r263961) @@ -358,15 +358,16 @@ device_sysctl_fini(device_t dev) /* Deprecated way to adjust queue length */ static int sysctl_devctl_disable(SYSCTL_HANDLER_ARGS); /* XXX Need to support old-style tunable hw.bus.devctl_disable" */ -SYSCTL_PROC(_hw_bus, OID_AUTO, devctl_disable, CTLTYPE_INT | CTLFLAG_RW, NULL, - 0, sysctl_devctl_disable, "I", "devctl disable -- deprecated"); +SYSCTL_PROC(_hw_bus, OID_AUTO, devctl_disable, CTLTYPE_INT | CTLFLAG_RW | + CTLFLAG_MPSAFE, NULL, 0, sysctl_devctl_disable, "I", + "devctl disable -- deprecated"); #define DEVCTL_DEFAULT_QUEUE_LEN 1000 static int sysctl_devctl_queue(SYSCTL_HANDLER_ARGS); static int devctl_queue_length = DEVCTL_DEFAULT_QUEUE_LEN; TUNABLE_INT("hw.bus.devctl_queue", &devctl_queue_length); -SYSCTL_PROC(_hw_bus, OID_AUTO, devctl_queue, CTLTYPE_INT | CTLFLAG_RW, NULL, - 0, sysctl_devctl_queue, "I", "devctl queue length"); +SYSCTL_PROC(_hw_bus, OID_AUTO, devctl_queue, CTLTYPE_INT | CTLFLAG_RW | + CTLFLAG_MPSAFE, NULL, 0, sysctl_devctl_queue, "I", "devctl queue length"); static d_open_t devopen; static d_close_t devclose; @@ -376,7 +377,6 @@ static d_poll_t devpoll; static struct cdevsw dev_cdevsw = { .d_version = D_VERSION, - .d_flags = D_NEEDGIANT, .d_open = devopen, .d_close = devclose, .d_read = devread, @@ -420,23 +420,29 @@ devinit(void) static int devopen(struct cdev *dev, int oflags, int devtype, struct thread *td) { - if (devsoftc.inuse) + + mtx_lock(&devsoftc.mtx); + if (devsoftc.inuse) { + mtx_unlock(&devsoftc.mtx); return (EBUSY); + } /* move to init */ devsoftc.inuse = 1; devsoftc.nonblock = 0; devsoftc.async_proc = NULL; + mtx_unlock(&devsoftc.mtx); return (0); } static int devclose(struct cdev *dev, int fflag, int devtype, struct thread *td) { - devsoftc.inuse = 0; + mtx_lock(&devsoftc.mtx); + devsoftc.inuse = 0; + devsoftc.async_proc = NULL; cv_broadcast(&devsoftc.cv); mtx_unlock(&devsoftc.mtx); - devsoftc.async_proc = NULL; return (0); } From owner-svn-src-stable@FreeBSD.ORG Mon Mar 31 02:44:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 131CFDCF; Mon, 31 Mar 2014 02:44:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F39FCA1A; Mon, 31 Mar 2014 02:44:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2V2ihFF031350; Mon, 31 Mar 2014 02:44:43 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2V2ihak031349; Mon, 31 Mar 2014 02:44:43 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201403310244.s2V2ihak031349@svn.freebsd.org> From: Mateusz Guzik Date: Mon, 31 Mar 2014 02:44:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263962 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Mar 2014 02:44:44 -0000 Author: mjg Date: Mon Mar 31 02:44:43 2014 New Revision: 263962 URL: http://svnweb.freebsd.org/changeset/base/263962 Log: MFC r263755: Document a known problem with handling the process intended to receive SIGIO in /dev/devctl. Modified: stable/10/sys/kern/subr_bus.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/subr_bus.c ============================================================================== --- stable/10/sys/kern/subr_bus.c Mon Mar 31 02:30:55 2014 (r263961) +++ stable/10/sys/kern/subr_bus.c Mon Mar 31 02:44:43 2014 (r263962) @@ -497,6 +497,21 @@ devioctl(struct cdev *dev, u_long cmd, c devsoftc.nonblock = 0; return (0); case FIOASYNC: + /* + * FIXME: + * Since this is a simple assignment there is no guarantee that + * devsoftc.async_proc consumers will get a valid pointer. + * + * Example scenario where things break (processes A and B): + * 1. A opens devctl + * 2. A sends fd to B + * 3. B sets itself as async_proc + * 4. B exits + * + * However, normally this requires root privileges and the only + * in-tree consumer does not behave in a dangerous way so the + * issue is not critical. + */ if (*(int*)data) devsoftc.async_proc = td->td_proc; else @@ -582,6 +597,7 @@ devctl_queue_data_f(char *data, int flag cv_broadcast(&devsoftc.cv); mtx_unlock(&devsoftc.mtx); selwakeup(&devsoftc.sel); + /* XXX see a comment in devioctl */ p = devsoftc.async_proc; if (p != NULL) { PROC_LOCK(p); From owner-svn-src-stable@FreeBSD.ORG Mon Mar 31 02:53:16 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A328CF88; Mon, 31 Mar 2014 02:53:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74C02AD6; Mon, 31 Mar 2014 02:53:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2V2rGWX035294; Mon, 31 Mar 2014 02:53:16 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2V2rFSZ035290; Mon, 31 Mar 2014 02:53:15 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201403310253.s2V2rFSZ035290@svn.freebsd.org> From: Mateusz Guzik Date: Mon, 31 Mar 2014 02:53:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263963 - in stable/10: etc/rc.d sbin/devd share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Mar 2014 02:53:16 -0000 Author: mjg Date: Mon Mar 31 02:53:15 2014 New Revision: 263963 URL: http://svnweb.freebsd.org/changeset/base/263963 Log: MFC r263758: Update userspace users of hw.bus.devctl_disable. This switches the code to use hw.bus.devctl_queue instead. Modified: stable/10/etc/rc.d/devd stable/10/sbin/devd/devd.cc stable/10/share/man/man4/devctl.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/devd ============================================================================== --- stable/10/etc/rc.d/devd Mon Mar 31 02:44:43 2014 (r263962) +++ stable/10/etc/rc.d/devd Mon Mar 31 02:53:15 2014 (r263963) @@ -30,9 +30,10 @@ devd_prestart() { find_pidfile - # If devd is disabled, turn it off in the kernel to avoid memory leaks. + # If devd is disabled, turn it off in the kernel to avoid unnecessary + # memory usage. if ! checkyesno ${rcvar}; then - $SYSCTL hw.bus.devctl_disable=1 + $SYSCTL hw.bus.devctl_queue=0 fi } Modified: stable/10/sbin/devd/devd.cc ============================================================================== --- stable/10/sbin/devd/devd.cc Mon Mar 31 02:44:43 2014 (r263962) +++ stable/10/sbin/devd/devd.cc Mon Mar 31 02:53:15 2014 (r263963) @@ -102,7 +102,7 @@ __FBSDID("$FreeBSD$"); #define PIPE "/var/run/devd.pipe" #define CF "/etc/devd.conf" -#define SYSCTL "hw.bus.devctl_disable" +#define SYSCTL "hw.bus.devctl_queue" /* * Since the client socket is nonblocking, we must increase its send buffer to @@ -1164,9 +1164,9 @@ check_devd_enabled() len = sizeof(val); if (sysctlbyname(SYSCTL, &val, &len, NULL, 0) != 0) errx(1, "devctl sysctl missing from kernel!"); - if (val) { - warnx("Setting " SYSCTL " to 0"); - val = 0; + if (val == 0) { + warnx("Setting " SYSCTL " to 1000"); + val = 1000; sysctlbyname(SYSCTL, NULL, NULL, &val, sizeof(val)); } } Modified: stable/10/share/man/man4/devctl.4 ============================================================================== --- stable/10/share/man/man4/devctl.4 Mon Mar 31 02:44:43 2014 (r263962) +++ stable/10/share/man/man4/devctl.4 Mon Mar 31 02:53:15 2014 (r263963) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 11, 2003 +.Dd March 26, 2014 .Dt DEVCTL 4 .Os .Sh NAME @@ -73,9 +73,9 @@ If you try to read this device a charact the rest of the data. Listening programs are expected to cope. .Pp -The sysctl and boot parameter -.Va hw.bus.devctl_disable -is used to disable +The sysctl +.Va hw.bus.devctl_queue +can be used to control queue length. It is set to 0 to disable .Nm when no .Xr devd 8 From owner-svn-src-stable@FreeBSD.ORG Mon Mar 31 09:34:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D5D19BF; Mon, 31 Mar 2014 09:34:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49887187; Mon, 31 Mar 2014 09:34:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2V9YlEq099448; Mon, 31 Mar 2014 09:34:47 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2V9Ylxg099447; Mon, 31 Mar 2014 09:34:47 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201403310934.s2V9Ylxg099447@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 31 Mar 2014 09:34:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263964 - stable/10/sys/boot/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Mar 2014 09:34:47 -0000 Author: ae Date: Mon Mar 31 09:34:46 2014 New Revision: 263964 URL: http://svnweb.freebsd.org/changeset/base/263964 Log: MFC r263468: When loader(8) inspects MBR, it chooses GPT as main partition table, when MBR contains only PMBR entry or it is bootcamp-compatible. If MBR has PMBR entry and some other, the loader rejects it. Make these checks to be less strict. If loader decided that PMBR isn't suitable for GPT, it will use MBR. Reported by: Paul Thornton Modified: stable/10/sys/boot/common/part.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/common/part.c ============================================================================== --- stable/10/sys/boot/common/part.c Mon Mar 31 02:53:15 2014 (r263963) +++ stable/10/sys/boot/common/part.c Mon Mar 31 09:34:46 2014 (r263964) @@ -634,7 +634,7 @@ ptable_open(void *dev, off_t sectors, ui for (i = 0, count = 0; i < NDOSPART; i++) { if (dp[i].dp_flag != 0 && dp[i].dp_flag != 0x80) { DEBUG("invalid partition flag %x", dp[i].dp_flag); - break; + goto out; } #ifdef LOADER_GPT_SUPPORT if (dp[i].dp_typ == DOSPTYP_PMBR) { @@ -646,15 +646,12 @@ ptable_open(void *dev, off_t sectors, ui count++; } /* Do we have some invalid values? */ - if (i != NDOSPART || - (table->type == PTABLE_GPT && count > 1)) { + if (table->type == PTABLE_GPT && count > 1) { if (dp[1].dp_typ != DOSPTYP_HFS) { table->type = PTABLE_NONE; - DEBUG("invalid values detected, ignore " - "partition table"); - goto out; - } - DEBUG("Bootcamp detected"); + DEBUG("Incorrect PMBR, ignore it"); + } else + DEBUG("Bootcamp detected"); } #ifdef LOADER_GPT_SUPPORT if (table->type == PTABLE_GPT) { From owner-svn-src-stable@FreeBSD.ORG Mon Mar 31 09:37:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B16DCB19; Mon, 31 Mar 2014 09:37:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E3D21A6; Mon, 31 Mar 2014 09:37:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2V9bB68099766; Mon, 31 Mar 2014 09:37:11 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2V9bB5p099765; Mon, 31 Mar 2014 09:37:11 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201403310937.s2V9bB5p099765@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 31 Mar 2014 09:37:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263965 - stable/9/sys/boot/common X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Mar 2014 09:37:11 -0000 Author: ae Date: Mon Mar 31 09:37:11 2014 New Revision: 263965 URL: http://svnweb.freebsd.org/changeset/base/263965 Log: MFC r263468: When loader(8) inspects MBR, it chooses GPT as main partition table, when MBR contains only PMBR entry or it is bootcamp-compatible. If MBR has PMBR entry and some other, the loader rejects it. Make these checks to be less strict. If loader decided that PMBR isn't suitable for GPT, it will use MBR. Reported by: Paul Thornton Modified: stable/9/sys/boot/common/part.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) Modified: stable/9/sys/boot/common/part.c ============================================================================== --- stable/9/sys/boot/common/part.c Mon Mar 31 09:34:46 2014 (r263964) +++ stable/9/sys/boot/common/part.c Mon Mar 31 09:37:11 2014 (r263965) @@ -634,7 +634,7 @@ ptable_open(void *dev, off_t sectors, ui for (i = 0, count = 0; i < NDOSPART; i++) { if (dp[i].dp_flag != 0 && dp[i].dp_flag != 0x80) { DEBUG("invalid partition flag %x", dp[i].dp_flag); - break; + goto out; } #ifdef LOADER_GPT_SUPPORT if (dp[i].dp_typ == DOSPTYP_PMBR) { @@ -646,15 +646,12 @@ ptable_open(void *dev, off_t sectors, ui count++; } /* Do we have some invalid values? */ - if (i != NDOSPART || - (table->type == PTABLE_GPT && count > 1)) { + if (table->type == PTABLE_GPT && count > 1) { if (dp[1].dp_typ != DOSPTYP_HFS) { table->type = PTABLE_NONE; - DEBUG("invalid values detected, ignore " - "partition table"); - goto out; - } - DEBUG("Bootcamp detected"); + DEBUG("Incorrect PMBR, ignore it"); + } else + DEBUG("Bootcamp detected"); } #ifdef LOADER_GPT_SUPPORT if (table->type == PTABLE_GPT) { From owner-svn-src-stable@FreeBSD.ORG Mon Mar 31 14:39:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C4FD7827; Mon, 31 Mar 2014 14:39:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ABEA07DB; Mon, 31 Mar 2014 14:39:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2VEdvQH025065; Mon, 31 Mar 2014 14:39:57 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2VEdvlR025063; Mon, 31 Mar 2014 14:39:57 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201403311439.s2VEdvlR025063@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Mon, 31 Mar 2014 14:39:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263970 - in stable/9: . crypto/openssh crypto/openssh/contrib crypto/openssh/contrib/caldera crypto/openssh/contrib/cygwin crypto/openssh/contrib/redhat crypto/openssh/contrib/suse cry... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Mar 2014 14:39:57 -0000 Author: des Date: Mon Mar 31 14:39:56 2014 New Revision: 263970 URL: http://svnweb.freebsd.org/changeset/base/263970 Log: MFH (r237568, r255422, r255460, r255766, r255767, r255774, r255829, r256126, r257954, r261320, r261499, r263691, r263712): upgrade to OpenSSH 6.6p1 via 6.3p1, 6.4p1 and 6.5p1. Differences relative to head: - No DNSSEC support since stable/9 does not have LDNS - Sandboxing off by default, and uses rlimit instead of Capsicum - ED25519 moved to the bottom of the order of preference to avoid "new public key" warnings Added: stable/9/crypto/openssh/Makefile.in - copied, changed from r255774, head/crypto/openssh/Makefile.in stable/9/crypto/openssh/PROTOCOL.chacha20poly1305 - copied unchanged from r261320, head/crypto/openssh/PROTOCOL.chacha20poly1305 stable/9/crypto/openssh/PROTOCOL.key - copied unchanged from r261320, head/crypto/openssh/PROTOCOL.key stable/9/crypto/openssh/blocks.c - copied unchanged from r261320, head/crypto/openssh/blocks.c stable/9/crypto/openssh/buildpkg.sh.in - copied unchanged from r255774, head/crypto/openssh/buildpkg.sh.in stable/9/crypto/openssh/chacha.c - copied unchanged from r261320, head/crypto/openssh/chacha.c stable/9/crypto/openssh/chacha.h - copied unchanged from r261320, head/crypto/openssh/chacha.h stable/9/crypto/openssh/cipher-chachapoly.c - copied, changed from r261320, head/crypto/openssh/cipher-chachapoly.c stable/9/crypto/openssh/cipher-chachapoly.h - copied unchanged from r261320, head/crypto/openssh/cipher-chachapoly.h stable/9/crypto/openssh/config.sub - copied unchanged from r255774, head/crypto/openssh/config.sub stable/9/crypto/openssh/configure - copied, changed from r255774, head/crypto/openssh/configure stable/9/crypto/openssh/configure.ac - copied, changed from r255774, head/crypto/openssh/configure.ac stable/9/crypto/openssh/contrib/ - copied from r255774, head/crypto/openssh/contrib/ stable/9/crypto/openssh/crypto_api.h - copied unchanged from r261320, head/crypto/openssh/crypto_api.h stable/9/crypto/openssh/digest-libc.c - copied unchanged from r263712, head/crypto/openssh/digest-libc.c stable/9/crypto/openssh/digest-openssl.c - copied unchanged from r263712, head/crypto/openssh/digest-openssl.c stable/9/crypto/openssh/digest.h - copied, changed from r261320, head/crypto/openssh/digest.h stable/9/crypto/openssh/ed25519.c - copied unchanged from r261320, head/crypto/openssh/ed25519.c stable/9/crypto/openssh/fe25519.c - copied unchanged from r261320, head/crypto/openssh/fe25519.c stable/9/crypto/openssh/fe25519.h - copied unchanged from r261320, head/crypto/openssh/fe25519.h stable/9/crypto/openssh/fixalgorithms - copied unchanged from r255767, head/crypto/openssh/fixalgorithms stable/9/crypto/openssh/freebsd-configure.sh - copied unchanged from r255829, head/crypto/openssh/freebsd-configure.sh stable/9/crypto/openssh/freebsd-post-merge.sh - copied unchanged from r263691, head/crypto/openssh/freebsd-post-merge.sh stable/9/crypto/openssh/freebsd-pre-merge.sh - copied unchanged from r263691, head/crypto/openssh/freebsd-pre-merge.sh stable/9/crypto/openssh/ge25519.c - copied unchanged from r261320, head/crypto/openssh/ge25519.c stable/9/crypto/openssh/ge25519.h - copied unchanged from r261320, head/crypto/openssh/ge25519.h stable/9/crypto/openssh/ge25519_base.data - copied unchanged from r261320, head/crypto/openssh/ge25519_base.data stable/9/crypto/openssh/hash.c - copied unchanged from r261320, head/crypto/openssh/hash.c stable/9/crypto/openssh/hmac.c - copied unchanged from r263712, head/crypto/openssh/hmac.c stable/9/crypto/openssh/hmac.h - copied unchanged from r263712, head/crypto/openssh/hmac.h stable/9/crypto/openssh/install-sh - copied unchanged from r255774, head/crypto/openssh/install-sh stable/9/crypto/openssh/kexc25519.c - copied, changed from r261320, head/crypto/openssh/kexc25519.c stable/9/crypto/openssh/kexc25519c.c - copied unchanged from r261320, head/crypto/openssh/kexc25519c.c stable/9/crypto/openssh/kexc25519s.c - copied unchanged from r261320, head/crypto/openssh/kexc25519s.c stable/9/crypto/openssh/krb5_config.h - copied, changed from r255829, head/crypto/openssh/krb5_config.h stable/9/crypto/openssh/mdoc2man.awk - copied unchanged from r255774, head/crypto/openssh/mdoc2man.awk stable/9/crypto/openssh/moduli.0 - copied, changed from r255774, head/crypto/openssh/moduli.0 stable/9/crypto/openssh/nchan.ms - copied unchanged from r255774, head/crypto/openssh/nchan.ms stable/9/crypto/openssh/nchan2.ms - copied unchanged from r255774, head/crypto/openssh/nchan2.ms stable/9/crypto/openssh/openbsd-compat/Makefile.in - copied, changed from r255774, head/crypto/openssh/openbsd-compat/Makefile.in stable/9/crypto/openssh/openbsd-compat/arc4random.c - copied unchanged from r261320, head/crypto/openssh/openbsd-compat/arc4random.c stable/9/crypto/openssh/openbsd-compat/bcrypt_pbkdf.c - copied unchanged from r261320, head/crypto/openssh/openbsd-compat/bcrypt_pbkdf.c stable/9/crypto/openssh/openbsd-compat/blf.h - copied unchanged from r261320, head/crypto/openssh/openbsd-compat/blf.h stable/9/crypto/openssh/openbsd-compat/blowfish.c (contents, props changed) - copied, changed from r261320, head/crypto/openssh/openbsd-compat/blowfish.c stable/9/crypto/openssh/openbsd-compat/chacha_private.h - copied unchanged from r261320, head/crypto/openssh/openbsd-compat/chacha_private.h stable/9/crypto/openssh/openbsd-compat/explicit_bzero.c - copied unchanged from r263712, head/crypto/openssh/openbsd-compat/explicit_bzero.c stable/9/crypto/openssh/openbsd-compat/getopt.h - copied unchanged from r255767, head/crypto/openssh/openbsd-compat/getopt.h stable/9/crypto/openssh/openbsd-compat/getopt_long.c - copied unchanged from r255767, head/crypto/openssh/openbsd-compat/getopt_long.c stable/9/crypto/openssh/openbsd-compat/getrrsetbyname-ldns.c - copied, changed from r255422, head/crypto/openssh/openbsd-compat/getrrsetbyname-ldns.c stable/9/crypto/openssh/openbsd-compat/regress/ - copied from r255774, head/crypto/openssh/openbsd-compat/regress/ stable/9/crypto/openssh/openbsd-compat/strnlen.c - copied unchanged from r255422, head/crypto/openssh/openbsd-compat/strnlen.c stable/9/crypto/openssh/openssh.xml.in - copied unchanged from r255774, head/crypto/openssh/openssh.xml.in stable/9/crypto/openssh/opensshd.init.in - copied unchanged from r255774, head/crypto/openssh/opensshd.init.in stable/9/crypto/openssh/poly1305.c - copied unchanged from r261320, head/crypto/openssh/poly1305.c stable/9/crypto/openssh/poly1305.h - copied unchanged from r261320, head/crypto/openssh/poly1305.h stable/9/crypto/openssh/regress/ - copied from r255774, head/crypto/openssh/regress/ stable/9/crypto/openssh/regress/dhgex.sh - copied unchanged from r263712, head/crypto/openssh/regress/dhgex.sh stable/9/crypto/openssh/regress/setuid-allowed.c - copied, changed from r261320, head/crypto/openssh/regress/setuid-allowed.c stable/9/crypto/openssh/regress/sftp-perm.sh - copied unchanged from r261320, head/crypto/openssh/regress/sftp-perm.sh stable/9/crypto/openssh/sandbox-capsicum.c (contents, props changed) - copied, changed from r261320, head/crypto/openssh/sandbox-capsicum.c stable/9/crypto/openssh/sandbox-seccomp-filter.c - copied, changed from r255422, head/crypto/openssh/sandbox-seccomp-filter.c stable/9/crypto/openssh/sc25519.c - copied unchanged from r261320, head/crypto/openssh/sc25519.c stable/9/crypto/openssh/sc25519.h - copied unchanged from r261320, head/crypto/openssh/sc25519.h stable/9/crypto/openssh/scp.0 - copied, changed from r255774, head/crypto/openssh/scp.0 stable/9/crypto/openssh/sftp-server.0 - copied, changed from r255774, head/crypto/openssh/sftp-server.0 stable/9/crypto/openssh/sftp.0 - copied, changed from r255774, head/crypto/openssh/sftp.0 stable/9/crypto/openssh/smult_curve25519_ref.c - copied unchanged from r261320, head/crypto/openssh/smult_curve25519_ref.c stable/9/crypto/openssh/ssh-add.0 - copied, changed from r255774, head/crypto/openssh/ssh-add.0 stable/9/crypto/openssh/ssh-agent.0 - copied, changed from r255774, head/crypto/openssh/ssh-agent.0 stable/9/crypto/openssh/ssh-ed25519.c - copied, changed from r261320, head/crypto/openssh/ssh-ed25519.c stable/9/crypto/openssh/ssh-keygen.0 - copied, changed from r255774, head/crypto/openssh/ssh-keygen.0 stable/9/crypto/openssh/ssh-keyscan.0 - copied, changed from r255774, head/crypto/openssh/ssh-keyscan.0 stable/9/crypto/openssh/ssh-keysign.0 - copied, changed from r255774, head/crypto/openssh/ssh-keysign.0 stable/9/crypto/openssh/ssh-pkcs11-helper.0 - copied, changed from r255774, head/crypto/openssh/ssh-pkcs11-helper.0 stable/9/crypto/openssh/ssh.0 - copied, changed from r255774, head/crypto/openssh/ssh.0 stable/9/crypto/openssh/ssh_config.0 - copied, changed from r255774, head/crypto/openssh/ssh_config.0 stable/9/crypto/openssh/sshd.0 - copied, changed from r255774, head/crypto/openssh/sshd.0 stable/9/crypto/openssh/sshd_config.0 - copied, changed from r255774, head/crypto/openssh/sshd_config.0 stable/9/crypto/openssh/survey.sh.in - copied unchanged from r255774, head/crypto/openssh/survey.sh.in stable/9/crypto/openssh/verify.c - copied unchanged from r261320, head/crypto/openssh/verify.c Deleted: stable/9/crypto/openssh/FREEBSD-tricks stable/9/crypto/openssh/auth2-jpake.c stable/9/crypto/openssh/jpake.c stable/9/crypto/openssh/jpake.h stable/9/crypto/openssh/openbsd-compat/bsd-arc4random.c stable/9/crypto/openssh/openbsd-compat/getopt.c stable/9/crypto/openssh/schnorr.h Modified: stable/9/Makefile.inc1 (contents, props changed) stable/9/crypto/openssh/ChangeLog stable/9/crypto/openssh/FREEBSD-upgrade stable/9/crypto/openssh/PROTOCOL stable/9/crypto/openssh/README stable/9/crypto/openssh/aclocal.m4 stable/9/crypto/openssh/addrmatch.c stable/9/crypto/openssh/atomicio.c stable/9/crypto/openssh/audit-linux.c stable/9/crypto/openssh/auth-chall.c stable/9/crypto/openssh/auth-krb5.c stable/9/crypto/openssh/auth-options.c stable/9/crypto/openssh/auth-pam.c stable/9/crypto/openssh/auth-rsa.c stable/9/crypto/openssh/auth.c stable/9/crypto/openssh/auth.h stable/9/crypto/openssh/auth1.c stable/9/crypto/openssh/auth2-chall.c stable/9/crypto/openssh/auth2-gss.c stable/9/crypto/openssh/auth2-hostbased.c stable/9/crypto/openssh/auth2-kbdint.c stable/9/crypto/openssh/auth2-passwd.c stable/9/crypto/openssh/auth2-pubkey.c stable/9/crypto/openssh/auth2.c stable/9/crypto/openssh/authfd.c stable/9/crypto/openssh/authfile.c stable/9/crypto/openssh/authfile.h stable/9/crypto/openssh/bufaux.c stable/9/crypto/openssh/bufbn.c stable/9/crypto/openssh/bufec.c stable/9/crypto/openssh/buffer.c stable/9/crypto/openssh/buffer.h stable/9/crypto/openssh/canohost.c stable/9/crypto/openssh/channels.c stable/9/crypto/openssh/channels.h stable/9/crypto/openssh/cipher-3des1.c stable/9/crypto/openssh/cipher-aes.c stable/9/crypto/openssh/cipher-ctr.c stable/9/crypto/openssh/cipher.c stable/9/crypto/openssh/cipher.h stable/9/crypto/openssh/clientloop.c stable/9/crypto/openssh/clientloop.h stable/9/crypto/openssh/compat.c stable/9/crypto/openssh/compat.h stable/9/crypto/openssh/config.guess stable/9/crypto/openssh/config.h stable/9/crypto/openssh/config.h.in stable/9/crypto/openssh/contrib/caldera/openssh.spec stable/9/crypto/openssh/contrib/cygwin/ssh-host-config stable/9/crypto/openssh/contrib/redhat/openssh.spec stable/9/crypto/openssh/contrib/ssh-copy-id.1 (contents, props changed) stable/9/crypto/openssh/contrib/suse/openssh.spec stable/9/crypto/openssh/defines.h stable/9/crypto/openssh/dh.c stable/9/crypto/openssh/dh.h stable/9/crypto/openssh/dns.c stable/9/crypto/openssh/groupaccess.c stable/9/crypto/openssh/gss-genr.c stable/9/crypto/openssh/gss-serv-krb5.c stable/9/crypto/openssh/gss-serv.c stable/9/crypto/openssh/hostfile.c stable/9/crypto/openssh/hostfile.h stable/9/crypto/openssh/includes.h stable/9/crypto/openssh/kex.c stable/9/crypto/openssh/kex.h stable/9/crypto/openssh/kexdh.c stable/9/crypto/openssh/kexdhc.c stable/9/crypto/openssh/kexdhs.c stable/9/crypto/openssh/kexecdh.c stable/9/crypto/openssh/kexecdhc.c stable/9/crypto/openssh/kexecdhs.c stable/9/crypto/openssh/kexgex.c stable/9/crypto/openssh/kexgexc.c stable/9/crypto/openssh/kexgexs.c stable/9/crypto/openssh/key.c stable/9/crypto/openssh/key.h stable/9/crypto/openssh/krl.c stable/9/crypto/openssh/log.c stable/9/crypto/openssh/log.h stable/9/crypto/openssh/loginrec.c stable/9/crypto/openssh/mac.c stable/9/crypto/openssh/mac.h stable/9/crypto/openssh/match.c stable/9/crypto/openssh/misc.c stable/9/crypto/openssh/misc.h stable/9/crypto/openssh/moduli.5 (contents, props changed) stable/9/crypto/openssh/moduli.c stable/9/crypto/openssh/monitor.c stable/9/crypto/openssh/monitor.h stable/9/crypto/openssh/monitor_mm.c stable/9/crypto/openssh/monitor_mm.h stable/9/crypto/openssh/monitor_wrap.c stable/9/crypto/openssh/monitor_wrap.h stable/9/crypto/openssh/mux.c (contents, props changed) stable/9/crypto/openssh/myproposal.h stable/9/crypto/openssh/openbsd-compat/bsd-cygwin_util.c stable/9/crypto/openssh/openbsd-compat/bsd-cygwin_util.h stable/9/crypto/openssh/openbsd-compat/bsd-misc.c stable/9/crypto/openssh/openbsd-compat/bsd-misc.h (contents, props changed) stable/9/crypto/openssh/openbsd-compat/bsd-poll.c stable/9/crypto/openssh/openbsd-compat/bsd-setres_id.c stable/9/crypto/openssh/openbsd-compat/bsd-snprintf.c stable/9/crypto/openssh/openbsd-compat/bsd-statvfs.c stable/9/crypto/openssh/openbsd-compat/bsd-statvfs.h stable/9/crypto/openssh/openbsd-compat/openbsd-compat.h stable/9/crypto/openssh/openbsd-compat/openssl-compat.c stable/9/crypto/openssh/openbsd-compat/openssl-compat.h stable/9/crypto/openssh/openbsd-compat/port-aix.c stable/9/crypto/openssh/openbsd-compat/port-linux.c stable/9/crypto/openssh/openbsd-compat/setproctitle.c stable/9/crypto/openssh/openbsd-compat/xcrypt.c stable/9/crypto/openssh/packet.c stable/9/crypto/openssh/packet.h stable/9/crypto/openssh/pathnames.h (contents, props changed) stable/9/crypto/openssh/pkcs11.h stable/9/crypto/openssh/platform.c stable/9/crypto/openssh/platform.h stable/9/crypto/openssh/progressmeter.c stable/9/crypto/openssh/readconf.c stable/9/crypto/openssh/readconf.h stable/9/crypto/openssh/readpass.c stable/9/crypto/openssh/regress/Makefile stable/9/crypto/openssh/regress/agent-ptrace.sh stable/9/crypto/openssh/regress/agent.sh stable/9/crypto/openssh/regress/cert-hostkey.sh stable/9/crypto/openssh/regress/cert-userkey.sh stable/9/crypto/openssh/regress/cipher-speed.sh stable/9/crypto/openssh/regress/forward-control.sh stable/9/crypto/openssh/regress/host-expand.sh stable/9/crypto/openssh/regress/integrity.sh stable/9/crypto/openssh/regress/kextype.sh stable/9/crypto/openssh/regress/keytype.sh stable/9/crypto/openssh/regress/krl.sh stable/9/crypto/openssh/regress/login-timeout.sh stable/9/crypto/openssh/regress/modpipe.c stable/9/crypto/openssh/regress/rekey.sh stable/9/crypto/openssh/regress/scp-ssh-wrapper.sh stable/9/crypto/openssh/regress/scp.sh stable/9/crypto/openssh/regress/sftp-chroot.sh stable/9/crypto/openssh/regress/test-exec.sh stable/9/crypto/openssh/regress/try-ciphers.sh stable/9/crypto/openssh/roaming_client.c stable/9/crypto/openssh/roaming_common.c stable/9/crypto/openssh/rsa.c stable/9/crypto/openssh/sandbox-darwin.c stable/9/crypto/openssh/sandbox-null.c stable/9/crypto/openssh/sandbox-rlimit.c stable/9/crypto/openssh/sandbox-systrace.c stable/9/crypto/openssh/schnorr.c stable/9/crypto/openssh/scp.1 (contents, props changed) stable/9/crypto/openssh/scp.c stable/9/crypto/openssh/servconf.c stable/9/crypto/openssh/servconf.h stable/9/crypto/openssh/serverloop.c stable/9/crypto/openssh/session.c stable/9/crypto/openssh/session.h stable/9/crypto/openssh/sftp-client.c stable/9/crypto/openssh/sftp-client.h stable/9/crypto/openssh/sftp-common.c (contents, props changed) stable/9/crypto/openssh/sftp-glob.c stable/9/crypto/openssh/sftp-server.8 stable/9/crypto/openssh/sftp-server.c stable/9/crypto/openssh/sftp.1 stable/9/crypto/openssh/sftp.c stable/9/crypto/openssh/ssh-add.1 (contents, props changed) stable/9/crypto/openssh/ssh-add.c stable/9/crypto/openssh/ssh-agent.1 stable/9/crypto/openssh/ssh-agent.c stable/9/crypto/openssh/ssh-dss.c stable/9/crypto/openssh/ssh-ecdsa.c stable/9/crypto/openssh/ssh-gss.h (contents, props changed) stable/9/crypto/openssh/ssh-keygen.1 stable/9/crypto/openssh/ssh-keygen.c stable/9/crypto/openssh/ssh-keyscan.1 stable/9/crypto/openssh/ssh-keyscan.c stable/9/crypto/openssh/ssh-keysign.8 (contents, props changed) stable/9/crypto/openssh/ssh-keysign.c stable/9/crypto/openssh/ssh-pkcs11-client.c stable/9/crypto/openssh/ssh-pkcs11-helper.8 (contents, props changed) stable/9/crypto/openssh/ssh-pkcs11-helper.c stable/9/crypto/openssh/ssh-pkcs11.c stable/9/crypto/openssh/ssh-rsa.c stable/9/crypto/openssh/ssh-sandbox.h stable/9/crypto/openssh/ssh.1 stable/9/crypto/openssh/ssh.c stable/9/crypto/openssh/ssh2.h stable/9/crypto/openssh/ssh_config stable/9/crypto/openssh/ssh_config.5 stable/9/crypto/openssh/ssh_namespace.h stable/9/crypto/openssh/sshconnect.c stable/9/crypto/openssh/sshconnect.h stable/9/crypto/openssh/sshconnect1.c stable/9/crypto/openssh/sshconnect2.c stable/9/crypto/openssh/sshd.8 stable/9/crypto/openssh/sshd.c stable/9/crypto/openssh/sshd_config stable/9/crypto/openssh/sshd_config.5 stable/9/crypto/openssh/sshlogin.c stable/9/crypto/openssh/sshlogin.h stable/9/crypto/openssh/uidswap.c stable/9/crypto/openssh/umac.c stable/9/crypto/openssh/umac.h stable/9/crypto/openssh/umac128.c stable/9/crypto/openssh/uuencode.c stable/9/crypto/openssh/version.h stable/9/crypto/openssh/xmalloc.c stable/9/crypto/openssh/xmalloc.h stable/9/etc/rc.d/sshd stable/9/secure/lib/libssh/Makefile stable/9/secure/libexec/sftp-server/Makefile stable/9/secure/libexec/ssh-keysign/Makefile stable/9/secure/libexec/ssh-pkcs11-helper/Makefile stable/9/secure/usr.bin/scp/Makefile stable/9/secure/usr.bin/sftp/Makefile stable/9/secure/usr.bin/ssh-add/Makefile stable/9/secure/usr.bin/ssh-agent/Makefile stable/9/secure/usr.bin/ssh-keygen/Makefile stable/9/secure/usr.bin/ssh-keyscan/Makefile stable/9/secure/usr.bin/ssh/Makefile stable/9/secure/usr.sbin/sshd/Makefile Directory Properties: stable/9/ (props changed) stable/9/bin/cat/ (props changed) stable/9/contrib/expat/ (props changed) stable/9/contrib/groff/ (props changed) stable/9/contrib/less/ (props changed) stable/9/contrib/one-true-awk/ (props changed) stable/9/contrib/openbsm/ (props changed) stable/9/contrib/tcpdump/ (props changed) stable/9/crypto/openssh/ (props changed) stable/9/etc/ (props changed) stable/9/etc/rc.d/ (props changed) stable/9/lib/libz/ (props changed) stable/9/secure/lib/libssh/ (props changed) stable/9/secure/libexec/ssh-keysign/ (props changed) stable/9/secure/usr.bin/ssh/ (props changed) stable/9/secure/usr.sbin/sshd/ (props changed) stable/9/usr.bin/less/ (props changed) stable/9/usr.bin/minigzip/ (props changed) stable/9/usr.bin/xinstall/ (props changed) stable/9/usr.sbin/makefs/ (props changed) stable/9/usr.sbin/tcpdump/ (props changed) Modified: stable/9/Makefile.inc1 ============================================================================== --- stable/9/Makefile.inc1 Mon Mar 31 14:27:22 2014 (r263969) +++ stable/9/Makefile.inc1 Mon Mar 31 14:39:56 2014 (r263970) @@ -1357,8 +1357,8 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 ${_cddl_lib_libumem} ${_cddl_lib_libnvpair} \ ${_cddl_lib_libzfs_core} \ lib/libutil ${_lib_libypclnt} lib/libz lib/msun \ - ${_secure_lib_libcrypto} ${_secure_lib_libssh} \ - ${_secure_lib_libssl} + ${_secure_lib_libcrypto} ${_lib_libldns} \ + ${_secure_lib_libssh} ${_secure_lib_libssl} .if ${MK_LIBTHR} != "no" _lib_libthr= lib/libthr Modified: stable/9/crypto/openssh/ChangeLog ============================================================================== --- stable/9/crypto/openssh/ChangeLog Mon Mar 31 14:27:22 2014 (r263969) +++ stable/9/crypto/openssh/ChangeLog Mon Mar 31 14:39:56 2014 (r263970) @@ -1,3056 +1,2887 @@ -20130510 - - (djm) OpenBSD CVS Cherrypick - - djm@cvs.openbsd.org 2013/04/11 02:27:50 - [packet.c] - quiet disconnect notifications on the server from error() back to logit() - if it is a normal client closure; bz#2057 ok+feedback dtucker@ - - (djm) [version.h contrib/caldera/openssh.spec contrib/redhat/openssh.spec] - [contrib/suse/openssh.spec] Crank version numbers for release. +20140313 + - (djm) Release OpenSSH 6.6 -20130404 - - (dtucker) OpenBSD CVS Sync - - dtucker@cvs.openbsd.org 2013/02/17 23:16:57 - [readconf.c ssh.c readconf.h sshconnect2.c] - Keep track of which IndentityFile options were manually supplied and which - were default options, and don't warn if the latter are missing. - ok markus@ - - dtucker@cvs.openbsd.org 2013/02/19 02:12:47 - [krl.c] - Remove bogus include. ok djm - - dtucker@cvs.openbsd.org 2013/02/22 04:45:09 - [ssh.c readconf.c readconf.h] - Don't complain if IdentityFiles specified in system-wide configs are - missing. ok djm, deraadt. - - markus@cvs.openbsd.org 2013/02/22 19:13:56 - [sshconnect.c] - support ProxyCommand=- (stdin/out already point to the proxy); ok djm@ - - djm@cvs.openbsd.org 2013/02/22 22:09:01 - [ssh.c] - Allow IdenityFile=none; ok markus deraadt (and dtucker for an earlier - version) +20140304 + - OpenBSD CVS Sync + - djm@cvs.openbsd.org 2014/03/03 22:22:30 + [session.c] + ignore enviornment variables with embedded '=' or '\0' characters; + spotted by Jann Horn; ok deraadt@ -20130401 - - (dtucker) [openbsd-compat/bsd-cygwin_util.{c,h}] Don't include windows.h - to avoid conflicting definitions of __int64, adding the required bits. - Patch from Corinna Vinschen. +20140301 + - (djm) [regress/Makefile] Disable dhgex regress test; it breaks when + no moduli file exists at the expected location. + +20140228 + - OpenBSD CVS Sync + - djm@cvs.openbsd.org 2014/02/27 00:41:49 + [bufbn.c] + fix unsigned overflow that could lead to reading a short ssh protocol + 1 bignum value; found by Ben Hawkes; ok deraadt@ + - djm@cvs.openbsd.org 2014/02/27 08:25:09 + [bufbn.c] + off by one in range check + - djm@cvs.openbsd.org 2014/02/27 22:47:07 + [sshd_config.5] + bz#2184 clarify behaviour of a keyword that appears in multiple + matching Match blocks; ok dtucker@ + - djm@cvs.openbsd.org 2014/02/27 22:57:40 + [version.h] + openssh-6.6 + - dtucker@cvs.openbsd.org 2014/01/19 23:43:02 + [regress/sftp-chroot.sh] + Don't use -q on sftp as it suppresses logging, instead redirect the + output to the regress logfile. + - dtucker@cvs.openbsd.org 2014/01/20 00:00:30 + [sregress/ftp-chroot.sh] + append to rather than truncating the log file + - dtucker@cvs.openbsd.org 2014/01/25 04:35:32 + [regress/Makefile regress/dhgex.sh] + Add a test for DH GEX sizes + - djm@cvs.openbsd.org 2014/01/26 10:22:10 + [regress/cert-hostkey.sh] + automatically generate revoked keys from listed keys rather than + manually specifying each type; from portable + (Id sync only) + - djm@cvs.openbsd.org 2014/01/26 10:49:17 + [scp-ssh-wrapper.sh scp.sh] + make sure $SCP is tested on the remote end rather than whichever one + happens to be in $PATH; from portable + (Id sync only) + - djm@cvs.openbsd.org 2014/02/27 20:04:16 + [login-timeout.sh] + remove any existing LoginGraceTime from sshd_config before adding + a specific one for the test back in + - djm@cvs.openbsd.org 2014/02/27 21:21:25 + [agent-ptrace.sh agent.sh] + keep return values that are printed in error messages; + from portable + (Id sync only) + - (djm) [README contrib/caldera/openssh.spec contrib/redhat/openssh.spec] + [contrib/suse/openssh.spec] Crank version numbers + - (djm) [regress/host-expand.sh] Add RCS Id -20120322 - - (djm) [contrib/ssh-copy-id contrib/ssh-copy-id.1] Updated to Phil - Hands' greatly revised version. - - (djm) Release 6.2p1 +20140227 + - OpenBSD CVS Sync + - djm@cvs.openbsd.org 2014/02/26 20:18:37 + [ssh.c] + bz#2205: avoid early hostname lookups unless canonicalisation is enabled; + ok dtucker@ markus@ + - djm@cvs.openbsd.org 2014/02/26 20:28:44 + [auth2-gss.c gss-serv.c ssh-gss.h sshd.c] + bz#2107 - cache OIDs of supported GSSAPI mechanisms before privsep + sandboxing, as running this code in the sandbox can cause violations; + ok markus@ + - djm@cvs.openbsd.org 2014/02/26 20:29:29 + [channels.c] + don't assume that the socks4 username is \0 terminated; + spotted by Ben Hawkes; ok markus@ + - markus@cvs.openbsd.org 2014/02/26 21:53:37 + [sshd.c] + ssh_gssapi_prepare_supported_oids needs GSSAPI -20120318 - - (djm) [configure.ac log.c scp.c sshconnect2.c openbsd-compat/vis.c] - [openbsd-compat/vis.h] FreeBSD's strnvis isn't compatible with OpenBSD's - so mark it as broken. Patch from des AT des.no +20140224 + - OpenBSD CVS Sync + - djm@cvs.openbsd.org 2014/02/07 06:55:54 + [cipher.c mac.c] + remove some logging that makes ssh debugging output very verbose; + ok markus + - djm@cvs.openbsd.org 2014/02/15 23:05:36 + [channels.c] + avoid spurious "getsockname failed: Bad file descriptor" errors in ssh -W; + bz#2200, debian#738692 via Colin Watson; ok dtucker@ + - djm@cvs.openbsd.org 2014/02/22 01:32:19 + [readconf.c] + when processing Match blocks, skip 'exec' clauses if previous predicates + failed to match; ok markus@ + - djm@cvs.openbsd.org 2014/02/23 20:03:42 + [ssh-ed25519.c] + check for unsigned overflow; not reachable in OpenSSH but others might + copy our code... + - djm@cvs.openbsd.org 2014/02/23 20:11:36 + [readconf.c readconf.h ssh.c ssh_config.5] + reparse ssh_config and ~/.ssh/config if hostname canonicalisation changes + the hostname. This allows users to write configurations that always + refer to canonical hostnames, e.g. + + CanonicalizeHostname yes + CanonicalDomains int.example.org example.org + CanonicalizeFallbackLocal no + + Host *.int.example.org + Compression off + Host *.example.org + User djm + + ok markus@ -20120317 - - (tim) [configure.ac] OpenServer 5 wants lastlog even though it has none - of the bits the configure test looks for. +20140213 + - (dtucker) [configure.ac openbsd-compat/openssl-compat.{c,h}] Add compat + code for older OpenSSL versions that don't have EVP_MD_CTX_copy_ex. -20120316 - - (djm) [configure.ac] Disable utmp, wtmp and/or lastlog if the platform - is unable to successfully compile them. Based on patch from des AT - des.no - - (djm) [configure.ac openbsd-compat/bsd-misc.c openbsd-compat/bsd-misc.h] - Add a usleep replacement for platforms that lack it; ok dtucker - - (djm) [session.c] FreeBSD needs setusercontext(..., LOGIN_SETUMASK) to - occur after UID switch; patch from John Marshall via des AT des.no; +20140207 + - OpenBSD CVS Sync + - naddy@cvs.openbsd.org 2014/02/05 20:13:25 + [ssh-keygen.1 ssh-keygen.c] + tweak synopsis: calling ssh-keygen without any arguments is fine; ok jmc@ + while here, fix ordering in usage(); requested by jmc@ + - djm@cvs.openbsd.org 2014/02/06 22:21:01 + [sshconnect.c] + in ssh_create_socket(), only do the getaddrinfo for BindAddress when + BindAddress is actually specified. Fixes regression in 6.5 for + UsePrivilegedPort=yes; patch from Corinna Vinschen + +20140206 + - (dtucker) [openbsd-compat/bsd-poll.c] Don't bother checking for non-NULL + before freeing since free(NULL) is a no-op. ok djm. + - (djm) [sandbox-seccomp-filter.c] Not all Linux architectures define + __NR_shutdown; some go via the socketcall(2) multiplexer. + +20140205 + - (djm) [sandbox-capsicum.c] Don't fatal if Capsicum is offered by + headers/libc but not supported by the kernel. Patch from Loganaden + Velvindron @ AfriNIC + +20140204 + - OpenBSD CVS Sync + - markus@cvs.openbsd.org 2014/01/27 18:58:14 + [Makefile.in digest.c digest.h hostfile.c kex.h mac.c hmac.c hmac.h] + replace openssl HMAC with an implementation based on our ssh_digest_* + ok and feedback djm@ + - markus@cvs.openbsd.org 2014/01/27 19:18:54 + [auth-rsa.c cipher.c ssh-agent.c sshconnect1.c sshd.c] + replace openssl MD5 with our ssh_digest_*; ok djm@ + - markus@cvs.openbsd.org 2014/01/27 20:13:46 + [digest.c digest-openssl.c digest-libc.c Makefile.in] + rename digest.c to digest-openssl.c and add libc variant; ok djm@ + - jmc@cvs.openbsd.org 2014/01/28 14:13:39 + [ssh-keyscan.1] + kill some bad Pa; + From: Jan Stary + - djm@cvs.openbsd.org 2014/01/29 00:19:26 + [sshd.c] + use kill(0, ...) instead of killpg(0, ...); on most operating systems + they are equivalent, but SUSv2 describes the latter as having undefined + behaviour; from portable; ok dtucker + (Id sync only; change is already in portable) + - djm@cvs.openbsd.org 2014/01/29 06:18:35 + [Makefile.in auth.h auth2-jpake.c auth2.c jpake.c jpake.h monitor.c] + [monitor.h monitor_wrap.c monitor_wrap.h readconf.c readconf.h] + [schnorr.c schnorr.h servconf.c servconf.h ssh2.h sshconnect2.c] + remove experimental, never-enabled JPAKE code; ok markus@ + - jmc@cvs.openbsd.org 2014/01/29 14:04:51 + [sshd_config.5] + document kbdinteractiveauthentication; + requested From: Ross L Richardson + + dtucker/markus helped explain its workings; + - djm@cvs.openbsd.org 2014/01/30 22:26:14 + [sandbox-systrace.c] + allow shutdown(2) syscall in sandbox - it may be called by packet_close() + from portable + (Id sync only; change is already in portable) + - tedu@cvs.openbsd.org 2014/01/31 16:39:19 + [auth2-chall.c authfd.c authfile.c bufaux.c bufec.c canohost.c] + [channels.c cipher-chachapoly.c clientloop.c configure.ac hostfile.c] + [kexc25519.c krl.c monitor.c sandbox-systrace.c session.c] + [sftp-client.c ssh-keygen.c ssh.c sshconnect2.c sshd.c sshlogin.c] + [openbsd-compat/explicit_bzero.c openbsd-compat/openbsd-compat.h] + replace most bzero with explicit_bzero, except a few that cna be memset + ok djm dtucker + - djm@cvs.openbsd.org 2014/02/02 03:44:32 + [auth1.c auth2-chall.c auth2-passwd.c authfile.c bufaux.c bufbn.c] + [buffer.c cipher-3des1.c cipher.c clientloop.c gss-serv.c kex.c] + [kexdhc.c kexdhs.c kexecdhc.c kexgexc.c kexecdhs.c kexgexs.c key.c] + [monitor.c monitor_wrap.c packet.c readpass.c rsa.c serverloop.c] + [ssh-add.c ssh-agent.c ssh-dss.c ssh-ecdsa.c ssh-ed25519.c] + [ssh-keygen.c ssh-rsa.c sshconnect.c sshconnect1.c sshconnect2.c] + [sshd.c] + convert memset of potentially-private data to explicit_bzero() + - djm@cvs.openbsd.org 2014/02/03 23:28:00 + [ssh-ecdsa.c] + fix memory leak; ECDSA_SIG_new() allocates 'r' and 's' for us, unlike + DSA_SIG_new. Reported by Batz Spear; ok markus@ + - djm@cvs.openbsd.org 2014/02/02 03:44:31 + [digest-libc.c digest-openssl.c] + convert memset of potentially-private data to explicit_bzero() + - djm@cvs.openbsd.org 2014/02/04 00:24:29 + [ssh.c] + delay lowercasing of hostname until right before hostname + canonicalisation to unbreak case-sensitive matching of ssh_config; + reported by Ike Devolder; ok markus@ + - (djm) [openbsd-compat/Makefile.in] Add missing explicit_bzero.o + - (djm) [regress/setuid-allowed.c] Missing string.h for strerror() + +20140131 + - (djm) [sandbox-seccomp-filter.c sandbox-systrace.c] Allow shutdown(2) + syscall from sandboxes; it may be called by packet_close. + - (dtucker) [readconf.c] Include for the hton macros. Fixes + build with HP-UX's compiler. Patch from Kevin Brott. + - (tim) [Makefile.in] build regress/setuid-allow. + +20140130 + - (djm) [configure.ac] Only check for width-specified integer types + in headers that actually exist. patch from Tom G. Christensen; ok dtucker@ + - (djm) [configure.ac atomicio.c] Kludge around NetBSD offering + different symbols for 'read' when various compiler flags are + in use, causing atomicio.c comparisons against it to break and + read/write operations to hang; ok dtucker + - (djm) Release openssh-6.5p1 + +20140129 + - (djm) [configure.ac] Fix broken shell test '==' vs '='; patch from + Tom G. Christensen -20120312 - - (dtucker) [regress/Makefile regress/cipher-speed.sh regress/test-exec.sh] - Improve portability of cipher-speed test, based mostly on a patch from - Iain Morgan. - - (dtucker) [auth.c configure.ac platform.c platform.h] Accept uid 2 ("bin") - in addition to root as an owner of system directories on AIX and HP-UX. - ok djm@ - -20130307 - - (dtucker) [INSTALL] Bump documented autoconf version to what we're - currently using. - - (dtucker) [defines.h] Remove SIZEOF_CHAR bits since the test for it - was removed in configure.ac rev 1.481 as it was redundant. - - (tim) [Makefile.in] Add another missing $(EXEEXT) I should have seen 3 days - ago. - - (djm) [configure.ac] Add a timeout to the select/rlimit test to give it a - chance to complete on broken systems; ok dtucker@ - -20130306 - - (dtucker) [regress/forward-control.sh] Wait longer for the forwarding - connection to start so that the test works on slower machines. - - (dtucker) [configure.ac] test that we can set number of file descriptors - to zero with setrlimit before enabling the rlimit sandbox. This affects - (at least) HPUX 11.11. - -20130305 - - (djm) [regress/modpipe.c] Compilation fix for AIX and parsing fix for - HP/UX. Spotted by Kevin Brott - - (dtucker) [configure.ac] use "=" for shell test and not "==". Spotted by - Amit Kulkarni and Kevin Brott. - - (dtucker) [Makefile.in] Remove trailing "\" on PATHS, which caused obscure - build breakage on (at least) HP-UX 11.11. Found by Amit Kulkarni and Kevin - Brott. - - (tim) [Makefile.in] Add missing $(EXEEXT). Found by Roumen Petrov. +20140128 + - (djm) [configure.ac] Search for inet_ntop in libnsl and libresovl; + ok dtucker + - (djm) [sshd.c] Use kill(0, ...) instead of killpg(0, ...); the + latter being specified to have undefined behaviour in SUSv3; + ok dtucker + - (tim) [regress/agent.sh regress/agent-ptrace.sh] Assign $? to a variable + when used as an error message inside an if statement so we display the + correct into. agent.sh patch from Petr Lautrbach. + +20140127 + - (dtucker) [Makefile.in] Remove trailing backslash which some make + implementations (eg older Solaris) do not cope with. + +20140126 + - OpenBSD CVS Sync + - dtucker@cvs.openbsd.org 2014/01/25 10:12:50 + [cipher.c cipher.h kex.c kex.h kexgexc.c] + Add a special case for the DH group size for 3des-cbc, which has an + effective strength much lower than the key size. This causes problems + with some cryptlib implementations, which don't support group sizes larger + than 4k but also don't use the largest group size it does support as + specified in the RFC. Based on a patch from Petr Lautrbach at Redhat, + reduced by me with input from Markus. ok djm@ markus@ + - markus@cvs.openbsd.org 2014/01/25 20:35:37 + [kex.c] + dh_need needs to be set to max(seclen, blocksize, ivlen, mac_len) + ok dtucker@, noted by mancha + - (djm) [configure.ac sandbox-capsicum.c sandbox-rlimit.c] Disable + RLIMIT_NOFILE pseudo-sandbox on FreeBSD. In some configurations, + libc will attempt to open additional file descriptors for crypto + offload and crash if they cannot be opened. + - (djm) [configure.ac] correct AC_DEFINE for previous. + +20140125 + - (djm) [configure.ac] Fix detection of capsicum sandbox on FreeBSD + - (djm) [configure.ac] Do not attempt to use capsicum sandbox unless + sys/capability.h exists and cap_rights_limit is in libc. Fixes + build on FreeBSD9x which provides the header but not the libc + support. + - (djm) [configure.ac] autoconf sets finds to 'yes' not '1', so test + against the correct thing. -20130227 - - (djm) [README contrib/caldera/openssh.spec contrib/redhat/openssh.spec] - [contrib/suse/openssh.spec] Crank version numbers - - (tim) [regress/forward-control.sh] use sh in case login shell is csh. - - (tim) [regress/integrity.sh] shell portability fix. - - (tim) [regress/integrity.sh] keep old solaris awk from hanging. - - (tim) [regress/krl.sh] keep old solaris awk from hanging. +20140124 + - (djm) [Makefile.in regress/scp-ssh-wrapper.sh regress/scp.sh] Make + the scp regress test actually test the built scp rather than the one + in $PATH. ok dtucker@ + +20140123 + - (tim) [session.c] Improve error reporting on set_id(). + - (dtucker) [configure.ac] NetBSD's (and FreeBSD's) strnvis is gratuitously + incompatible with OpenBSD's despite post-dating it by more than a decade. + Declare it as broken, and document FreeBSD's as the same. ok djm@ + +20140122 + - (djm) [openbsd-compat/setproctitle.c] Don't fail to compile if a + platform that is expected to use the reuse-argv style setproctitle + hack surprises us by providing a setproctitle in libc; ok dtucker + - (djm) [configure.ac] Unless specifically requested, only attempt + to build Position Independent Executables on gcc >= 4.x; ok dtucker + - (djm) [configure.ac aclocal.m4] More tests to detect fallout from + platform hardening options: include some long long int arithmatic + to detect missing support functions for -ftrapv in libgcc and + equivalents, actually test linking when -ftrapv is supplied and + set either both -pie/-fPIE or neither. feedback and ok dtucker@ + +20140121 + - (dtucker) [configure.ac] Make PIE a configure-time option which defaults + to on platforms where it's known to be reliably detected and off elsewhere. + Works around platforms such as FreeBSD 9.1 where it does not interop with + -ftrapv (it seems to work but fails when trying to link ssh). ok djm@ + - (dtucker) [aclocal.m4] Differentiate between compile-time and link-time + tests in the configure output. ok djm. + - (tim) [platform.c session.c] Fix bug affecting SVR5 platforms introduced + with sftp chroot support. Move set_id call after chroot. + - (djm) [aclocal.m4] Flesh out the code run in the OSSH_CHECK_CFLAG_COMPILE + and OSSH_CHECK_LDFLAG_LINK tests to give them a better chance of + detecting toolchain-related problems; ok dtucker + +20140120 + - (dtucker) [gss-serv-krb5.c] Fall back to krb5_cc_gen_new if the Kerberos + implementation does not have krb5_cc_new_unique, similar to what we do + in auth-krb5.c. + - (djm) [regress/cert-hostkey.sh] Fix regress failure on platforms that + skip one or more key types (e.g. RHEL/CentOS 6.5); ok dtucker@ + - (djm) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2014/01/20 00:08:48 + [digest.c] + memleak; found by Loganaden Velvindron @ AfriNIC; ok markus@ -20130226 - - OpenBSD CVS Sync - - djm@cvs.openbsd.org 2013/02/20 08:27:50 - [integrity.sh] - Add an option to modpipe that warns if the modification offset it not - reached in it's stream and turn it on for t-integrity. This should catch - cases where the session is not fuzzed for being too short (cf. my last - "oops" commit) - - (djm) [regress/integrity.sh] Run sshd via $SUDO; fixes tinderbox breakage - for UsePAM=yes configuration +20140119 + - (dtucker) OpenBSD CVS Sync + - dtucker@cvs.openbsd.org 2014/01/17 06:23:24 + [sftp-server.c] + fix log message statvfs. ok djm + - dtucker@cvs.openbsd.org 2014/01/18 09:36:26 + [session.c] + explicitly define USE_PIPES to 1 to prevent redefinition warnings in + portable on platforms that use pipes for everything. From vinschen at + redhat. + - dtucker@cvs.openbsd.org 2014/01/19 04:17:29 + [canohost.c addrmatch.c] + Cast socklen_t when comparing to size_t and use socklen_t to iterate over + the ip options, both to prevent signed/unsigned comparison warnings. + Patch from vinschen at redhat via portable openssh, begrudging ok deraadt. + - djm@cvs.openbsd.org 2014/01/19 04:48:08 + [ssh_config.5] + fix inverted meaning of 'no' and 'yes' for CanonicalizeFallbackLocal + - dtucker@cvs.openbsd.org 2014/01/19 11:21:51 + [addrmatch.c] + Cast the sizeof to socklen_t so it'll work even if the supplied len is + negative. Suggested by and ok djm, ok deraadt. -20130225 - - (dtucker) [configure.ac ssh-gss.h] bz#2073: additional #includes needed - to use Solaris native GSS libs. Patch from Pierre Ossman. +20140118 + - (dtucker) [uidswap.c] Prevent unused variable warnings on Cygwin. Patch + from vinschen at redhat.com + - (dtucker) [openbsd-compat/bsd-cygwin_util.h] Add missing function + declarations that stopped being included when we stopped including + from openbsd-compat/bsd-cygwin_util.h. Patch from vinschen at + redhat.com. + - (dtucker) [configure.ac] On Cygwin the getopt variables (like optargs, + optind) are defined in getopt.h already. Unfortunately they are defined as + "declspec(dllimport)" for historical reasons, because the GNU linker didn't + allow auto-import on PE/COFF targets way back when. The problem is the + dllexport attributes collide with the definitions in the various source + files in OpenSSH, which obviousy define the variables without + declspec(dllimport). The least intrusive way to get rid of these warnings + is to disable warnings for GCC compiler attributes when building on Cygwin. + Patch from vinschen at redhat.com. + - (dtucker) [sandbox-capsicum.c] Correct some error messages and make the + return value check for cap_enter() consistent with the other uses in + FreeBSD. From by Loganaden Velvindron @ AfriNIC via bz#2140. + +20140117 + - (dtucker) [aclocal.m4 configure.ac] Add some additional compiler/toolchain + hardening flags including -fstack-protector-strong. These default to on + if the toolchain supports them, but there is a configure-time knob + (--without-hardening) to disable them if necessary. ok djm@ + - (djm) [sftp-client.c] signed/unsigned comparison fix + - (dtucker) [loginrec.c] Cast to the types specfied in the format + specification to prevent warnings. + - (dtucker) [crypto_api.h] Wrap stdlib.h include inside #ifdef HAVE_STDINT_H. + - (dtucker) [poly1305.c] Wrap stdlib.h include inside #ifdef HAVE_STDINT_H. + - (dtucker) [blocks.c fe25519.c ge25519.c hash.c sc25519.c verify.c] Include + includes.h to pull in all of the compatibility stuff. + - (dtucker) [openbsd-compat/bcrypt_pbkdf.c] Wrap stdlib.h include inside + #ifdef HAVE_STDINT_H. + - (dtucker) [defines.h] Add typedefs for uintXX_t types for platforms that + don't have them. + - (dtucker) [configure.ac] Split AC_CHECK_FUNCS for OpenSSL functions into + separate lines and alphabetize for easier diffing of changes. + - (dtucker) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2014/01/17 00:21:06 + [sftp-client.c] + signed/unsigned comparison warning fix; from portable (Id sync only) + - dtucker@cvs.openbsd.org 2014/01/17 05:26:41 + [digest.c] + remove unused includes. ok djm@ + - (djm) [Makefile.in configure.ac sandbox-capsicum.c sandbox-darwin.c] + [sandbox-null.c sandbox-rlimit.c sandbox-seccomp-filter.c] + [sandbox-systrace.c ssh-sandbox.h sshd.c] Support preauth sandboxing + using the Capsicum API introduced in FreeBSD 10. Patch by Dag-Erling + Smorgrav, updated by Loganaden Velvindron @ AfriNIC; ok dtucker@ + - (dtucker) [configure.ac digest.c openbsd-compat/openssl-compat.c + openbsd-compat/openssl-compat.h] Add compatibility layer for older + openssl versions. ok djm@ + - (dtucker) Fix typo in #ifndef. + - (dtucker) [configure.ac openbsd-compat/bsd-statvfs.c + openbsd-compat/bsd-statvfs.h] Implement enough of statvfs on top of statfs + to be useful (and for the regression tests to pass) on platforms that + have statfs and fstatfs. ok djm@ + - (dtucker) [openbsd-compat/bsd-statvfs.h] Only start including headers if we + need them to cut down on the name collisions. + - (dtucker) [configure.ac] Also look in inttypes.h for uintXX_t types. + - (dtucker) [configure.ac] Have --without-hardening not turn off + stack-protector since that has a separate flag that's been around a while. + - (dtucker) [readconf.c] Wrap paths.h inside an ifdef. Allows building on + Solaris. + - (dtucker) [defines.h] Move our definitions of uintXX_t types down to after + they're defined if we have to define them ourselves. Fixes builds on old + AIX. -20130223 - - (djm) [configure.ac includes.h loginrec.c mux.c sftp.c] Prefer - bsd/libutil.h to libutil.h to avoid deprecation warnings on Ubuntu. - ok tim +20140118 + - (djm) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2014/01/16 07:31:09 + [sftp-client.c] + needless and incorrect cast to size_t can break resumption of + large download; patch from tobias@ + - djm@cvs.openbsd.org 2014/01/16 07:32:00 + [version.h] + openssh-6.5 + - (djm) [contrib/caldera/openssh.spec contrib/redhat/openssh.spec] + [contrib/suse/openssh.spec] Crank RPM spec version numbers. + - (djm) [README] update release notes URL. -20130222 - - (dtucker) [Makefile.in configure.ac] bz#2072: don't link krb5 libs to - ssh(1) since they're not needed. Patch from Pierre Ossman, ok djm. - - (dtucker) [configure.ac] bz#2073: look for Solaris' differently-named - libgss too. Patch from Pierre Ossman, ok djm. - - (djm) [configure.ac sandbox-seccomp-filter.c] Support for Linux - seccomp-bpf sandbox on ARM. Patch from shawnlandden AT gmail.com; - ok dtucker +20140112 + - (djm) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2014/01/10 05:59:19 + [sshd_config] + the /etc/ssh/ssh_host_ed25519_key is loaded by default too + - djm@cvs.openbsd.org 2014/01/12 08:13:13 + [bufaux.c buffer.h kex.c kex.h kexc25519.c kexc25519c.c kexc25519s.c] + [kexdhc.c kexdhs.c kexecdhc.c kexecdhs.c kexgexc.c kexgexs.c] + avoid use of OpenSSL BIGNUM type and functions for KEX with + Curve25519 by adding a buffer_put_bignum2_from_string() that stores + a string using the bignum encoding rules. Will make it easier to + build a reduced-feature OpenSSH without OpenSSL in the future; + ok markus@ -20130221 - - (tim) [regress/forward-control.sh] shell portability fix. +20140110 + - (djm) OpenBSD CVS Sync + - tedu@cvs.openbsd.org 2014/01/04 17:50:55 + [mac.c monitor_mm.c monitor_mm.h xmalloc.c] + use standard types and formats for size_t like variables. ok dtucker + - guenther@cvs.openbsd.org 2014/01/09 03:26:00 + [sftp-common.c] + When formating the time for "ls -l"-style output, show dates in the future + with the year, and rearrange a comparison to avoid a potentional signed + arithmetic overflow that would give the wrong result. + ok djm@ + - djm@cvs.openbsd.org 2014/01/09 23:20:00 + [digest.c digest.h hostfile.c kex.c kex.h kexc25519.c kexc25519c.c] + [kexc25519s.c kexdh.c kexecdh.c kexecdhc.c kexecdhs.c kexgex.c kexgexc.c] + [kexgexs.c key.c key.h roaming_client.c roaming_common.c schnorr.c] + [schnorr.h ssh-dss.c ssh-ecdsa.c ssh-rsa.c sshconnect2.c] + Introduce digest API and use it to perform all hashing operations + rather than calling OpenSSL EVP_Digest* directly. Will make it easier + to build a reduced-feature OpenSSH without OpenSSL in future; + feedback, ok markus@ + - djm@cvs.openbsd.org 2014/01/09 23:26:48 + [sshconnect.c sshd.c] + ban clients/servers that suffer from SSH_BUG_DERIVEKEY, they are ancient, + deranged and might make some attacks on KEX easier; ok markus@ -20130220 - - (tim) [regress/cipher-speed.sh regress/try-ciphers.sh] shell portability fix. - - (tim) [krl.c Makefile.in regress/Makefile regress/modpipe.c] remove unneeded - err.h include from krl.c. Additional portability fixes for modpipe. OK djm - - OpenBSD CVS Sync - - djm@cvs.openbsd.org 2013/02/20 08:27:50 - [regress/integrity.sh regress/modpipe.c] - Add an option to modpipe that warns if the modification offset it not - reached in it's stream and turn it on for t-integrity. This should catch - cases where the session is not fuzzed for being too short (cf. my last - "oops" commit) - - djm@cvs.openbsd.org 2013/02/20 08:29:27 - [regress/modpipe.c] - s/Id/OpenBSD/ in RCS tag +20140108 + - (djm) [regress/.cvsignore] Ignore regress test droppings; ok dtucker@ -20130219 - - OpenBSD CVS Sync - - djm@cvs.openbsd.org 2013/02/18 22:26:47 - [integrity.sh] - crank the offset yet again; it was still fuzzing KEX one of Darren's - portable test hosts at 2800 - - djm@cvs.openbsd.org 2013/02/19 02:14:09 - [integrity.sh] - oops, forgot to increase the output of the ssh command to ensure that - we actually reach $offset - - (djm) [regress/integrity.sh] Skip SHA2-based MACs on configurations that - lack support for SHA2. - - (djm) [regress/modpipe.c] Add local err, and errx functions for platforms - that do not have them. +20131231 + - (djm) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2013/12/30 23:52:28 + [auth2-hostbased.c auth2-pubkey.c compat.c compat.h ssh-rsa.c] + [sshconnect.c sshconnect2.c sshd.c] + refuse RSA keys from old proprietary clients/servers that use the + obsolete RSA+MD5 signature scheme. it will still be possible to connect + with these clients/servers but only DSA keys will be accepted, and we'll + deprecate them entirely in a future release. ok markus@ + +20131229 + - (djm) [loginrec.c] Check for username truncation when looking up lastlog + entries + - (djm) [regress/Makefile] Add some generated files for cleaning + - (djm) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2013/12/19 00:10:30 + [ssh-add.c] + skip requesting smartcard PIN when removing keys from agent; bz#2187 + patch from jay AT slushpupie.com; ok dtucker + - dtucker@cvs.openbsd.org 2013/12/19 00:19:12 + [serverloop.c] + Cast client_alive_interval to u_int64_t before assinging to + max_time_milliseconds to avoid potential integer overflow in the timeout. + bz#2170, patch from Loganaden Velvindron, ok djm@ + - djm@cvs.openbsd.org 2013/12/19 00:27:57 + [auth-options.c] + simplify freeing of source-address certificate restriction + - djm@cvs.openbsd.org 2013/12/19 01:04:36 + [channels.c] + bz#2147: fix multiple remote forwardings with dynamically assigned + listen ports. In the s->c message to open the channel we were sending + zero (the magic number to request a dynamic port) instead of the actual + listen port. The client therefore had no way of discriminating between + them. + + Diagnosis and fix by ronf AT timeheart.net + - djm@cvs.openbsd.org 2013/12/19 01:19:41 + [ssh-agent.c] + bz#2186: don't crash (NULL deref) when deleting PKCS#11 keys from an agent + that has a mix of normal and PKCS#11 keys; fix from jay AT slushpupie.com; + ok dtucker + - djm@cvs.openbsd.org 2013/12/19 22:57:13 + [poly1305.c poly1305.h] + use full name for author, with his permission + - tedu@cvs.openbsd.org 2013/12/21 07:10:47 + [ssh-keygen.1] + small typo + - djm@cvs.openbsd.org 2013/12/27 22:30:17 + [ssh-dss.c ssh-ecdsa.c ssh-rsa.c] + make the original RSA and DSA signing/verification code look more like + the ECDSA/Ed25519 ones: use key_type_plain() when checking the key type + rather than tediously listing all variants, use __func__ for debug/ + error messages + - djm@cvs.openbsd.org 2013/12/27 22:37:18 + [ssh-rsa.c] + correct comment + - djm@cvs.openbsd.org 2013/12/29 02:28:10 + [key.c] + allow ed25519 keys to appear as certificate authorities + - djm@cvs.openbsd.org 2013/12/29 02:37:04 + [key.c] + correct comment for key_to_certified() + - djm@cvs.openbsd.org 2013/12/29 02:49:52 + [key.c] + correct comment for key_drop_cert() + - djm@cvs.openbsd.org 2013/12/29 04:20:04 + [key.c] + to make sure we don't omit any key types as valid CA keys again, + factor the valid key type check into a key_type_is_valid_ca() + function + - djm@cvs.openbsd.org 2013/12/29 04:29:25 + [authfd.c] + allow deletion of ed25519 keys from the agent + - djm@cvs.openbsd.org 2013/12/29 04:35:50 + [authfile.c] + don't refuse to load Ed25519 certificates + - djm@cvs.openbsd.org 2013/12/29 05:42:16 + [ssh.c] + don't forget to load Ed25519 certs too + - djm@cvs.openbsd.org 2013/12/29 05:57:02 + [sshconnect.c] + when showing other hostkeys, don't forget Ed25519 keys -20130217 - - OpenBSD CVS Sync - - djm@cvs.openbsd.org 2013/02/17 23:16:55 - [integrity.sh] - make the ssh command generates some output to ensure that there are at - least offset+tries bytes in the stream. +20131221 + - (dtucker) [regress/keytype.sh] Actually test ecdsa key types. -20130216 - - OpenBSD CVS Sync - - djm@cvs.openbsd.org 2013/02/16 06:08:45 - [integrity.sh] - make sure the fuzz offset is actually past the end of KEX for all KEX - types. diffie-hellman-group-exchange-sha256 requires an offset around - 2700. Noticed via test failures in portable OpenSSH on platforms that - lack ECC and this the more byte-frugal ECDH KEX algorithms. +20131219 + - (dtucker) [configure.ac] bz#2178: Don't try to use BSM on Solaris versions + greater than 11 either rather than just 11. Patch from Tomas Kuthan. + - (dtucker) [auth-pam.c] bz#2163: check return value from pam_get_item(). + Patch from Loganaden Velvindron. -20130215 - - (djm) [contrib/suse/rc.sshd] Use SSHD_BIN consistently; bz#2056 from - Iain Morgan - - (dtucker) [configure.ac openbsd-compat/bsd-misc.c openbsd-compat/bsd-misc.h] - Use getpgrp() if we don't have getpgid() (old BSDs, maybe others). - - (dtucker) [configure.ac openbsd-compat/Makefile.in openbsd-compat/strtoull.c - openbsd-compat/openbsd-compat.h] Add strtoull to compat library for - platforms that don't have it. - - (dtucker) [openbsd-compat/openbsd-compat.h] Add prototype for strtoul, - group strto* function prototypes together. - - (dtucker) [openbsd-compat/bsd-misc.c] Handle the case where setpgrp() takes - an argument. Pointed out by djm. +20131218 - (djm) OpenBSD CVS Sync - - djm@cvs.openbsd.org 2013/02/14 21:35:59 - [auth2-pubkey.c] - Correct error message that had a typo and was logging the wrong thing; - patch from Petr Lautrbach - - dtucker@cvs.openbsd.org 2013/02/15 00:21:01 - [sshconnect2.c] - Warn more loudly if an IdentityFile provided by the user cannot be read. - bz #1981, ok djm@ + - djm@cvs.openbsd.org 2013/12/07 08:08:26 + [ssh-keygen.1] + document -a and -o wrt new key format + - naddy@cvs.openbsd.org 2013/12/07 11:58:46 + [ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh-keyscan.1 ssh-keysign.8 ssh.1] + [ssh_config.5 sshd.8 sshd_config.5] + add missing mentions of ed25519; ok djm@ + - dtucker@cvs.openbsd.org 2013/12/08 09:53:27 + [sshd_config.5] + Use a literal for the default value of KEXAlgorithms. ok deraadt jmc + - markus@cvs.openbsd.org 2013/12/09 11:03:45 + [blocks.c ed25519.c fe25519.c fe25519.h ge25519.c ge25519.h] + [ge25519_base.data hash.c sc25519.c sc25519.h verify.c] + Add Authors for the public domain ed25519/nacl code. + see also http://nacl.cr.yp.to/features.html + All of the NaCl software is in the public domain. + and http://ed25519.cr.yp.to/software.html + The Ed25519 software is in the public domain. + - markus@cvs.openbsd.org 2013/12/09 11:08:17 + [crypto_api.h] + remove unused defines + - pascal@cvs.openbsd.org 2013/12/15 18:17:26 + [ssh-add.c] + Make ssh-add also add .ssh/id_ed25519; fixes lie in manual page. + ok markus@ + - djm@cvs.openbsd.org 2013/12/15 21:42:35 + [cipher-chachapoly.c] + add some comments and constify a constant + - markus@cvs.openbsd.org 2013/12/17 10:36:38 + [crypto_api.h] + I've assempled the header file by cut&pasting from generated headers + and the source files. + +20131208 + - (djm) [openbsd-compat/bsd-setres_id.c] Missing header; from Corinna + Vinschen + - (djm) [Makefile.in regress/Makefile regress/agent-ptrace.sh] + [regress/setuid-allowed.c] Check that ssh-agent is not on a no-setuid + filesystem before running agent-ptrace.sh; ok dtucker -20130214 - - (djm) [regress/krl.sh] Don't use ecdsa keys in environment that lack ECC. - - (djm) [regress/krl.sh] typo; found by Iain Morgan - - (djm) [regress/integrity.sh] Start fuzzing from offset 2500 (instead - of 2300) to avoid clobbering the end of (non-MAC'd) KEX. Verified by - Iain Morgan +20131207 + - (djm) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2013/12/05 22:59:45 + [sftp-client.c] + fix memory leak in error path in do_readdir(); pointed out by + Loganaden Velvindron @ AfriNIC in bz#2163 + - djm@cvs.openbsd.org 2013/12/06 03:40:51 + [ssh-keygen.c] + remove duplicated character ('g') in getopt() string; + document the (few) remaining option characters so we don't have to + rummage next time. + - markus@cvs.openbsd.org 2013/12/06 13:30:08 + [authfd.c key.c key.h ssh-agent.c] + move private key (de)serialization to key.c; ok djm + - markus@cvs.openbsd.org 2013/12/06 13:34:54 + [authfile.c authfile.h cipher.c cipher.h key.c packet.c ssh-agent.c] + [ssh-keygen.c PROTOCOL.key] new private key format, bcrypt as KDF by + default; details in PROTOCOL.key; feedback and lots help from djm; + ok djm@ + - markus@cvs.openbsd.org 2013/12/06 13:39:49 + [authfd.c authfile.c key.c key.h myproposal.h pathnames.h readconf.c] + [servconf.c ssh-agent.c ssh-keygen.c ssh-keyscan.1 ssh-keyscan.c] + [ssh-keysign.c ssh.c ssh_config.5 sshd.8 sshd.c verify.c ssh-ed25519.c] + [sc25519.h sc25519.c hash.c ge25519_base.data ge25519.h ge25519.c] + [fe25519.h fe25519.c ed25519.c crypto_api.h blocks.c] + support ed25519 keys (hostkeys and user identities) using the public + domain ed25519 reference code from SUPERCOP, see + http://ed25519.cr.yp.to/software.html + feedback, help & ok djm@ + - jmc@cvs.openbsd.org 2013/12/06 15:29:07 + [sshd.8] + missing comma; + - djm@cvs.openbsd.org 2013/12/07 00:19:15 + [key.c] + set k->cert = NULL after freeing it + - markus@cvs.openbsd.org 2013/12/06 13:52:46 + [regress/Makefile regress/agent.sh regress/cert-hostkey.sh] + [regress/cert-userkey.sh regress/keytype.sh] + test ed25519 support; from djm@ + - (djm) [blocks.c ed25519.c fe25519.c fe25519.h ge25519.c ge25519.h] + [ge25519_base.data hash.c sc25519.c sc25519.h verify.c] Fix RCS idents + - (djm) [Makefile.in] Add ed25519 sources + - (djm) [authfile.c] Conditionalise inclusion of util.h + - (djm) [configure.ac openbsd-compat/Makefile.in openbsd-compat/bcrypt_pbkdf.c] + [openbsd-compat/blf.h openbsd-compat/blowfish.c] + [openbsd-compat/openbsd-compat.h] Start at supporting bcrypt_pbkdf in + portable. + - (djm) [ed25519.c ssh-ed25519.c openbsd-compat/Makefile.in] + [openbsd-compat/bcrypt_pbkdf.c] Make ed25519/new key format compile on + Linux + - (djm) [regress/cert-hostkey.sh] Fix merge botch + - (djm) [Makefile.in] PATHSUBS and keygen bits for Ed25519; from + Loganaden Velvindron @ AfriNIC in bz#2179 -20130212 +20131205 - (djm) OpenBSD CVS Sync - - djm@cvs.openbsd.org 2013/01/24 21:45:37 - [krl.c] - fix handling of (unused) KRL signatures; skip string in correct buffer - - djm@cvs.openbsd.org 2013/01/24 22:08:56 - [krl.c] - skip serial lookup when cert's serial number is zero - - krw@cvs.openbsd.org 2013/01/25 05:00:27 - [krl.c] - Revert last. Breaks due to likely typo. Let djm@ fix later. - ok djm@ via dlg@ - - djm@cvs.openbsd.org 2013/01/25 10:22:19 - [krl.c] - redo last commit without the vi-vomit that snuck in: - skip serial lookup when cert's serial number is zero - (now with 100% better comment) - - djm@cvs.openbsd.org 2013/01/26 06:11:05 - [Makefile.in acss.c acss.h cipher-acss.c cipher.c] - [openbsd-compat/openssl-compat.h] - remove ACSS, now that it is gone from libcrypto too - - djm@cvs.openbsd.org 2013/01/27 10:06:12 - [krl.c] - actually use the xrealloc() return value; spotted by xi.wang AT gmail.com - - dtucker@cvs.openbsd.org 2013/02/06 00:20:42 - [servconf.c sshd_config sshd_config.5] - Change default of MaxStartups to 10:30:100 to start doing random early - drop at 10 connections up to 100 connections. This will make it harder - to DoS as CPUs have come a long way since the original value was set - back in 2000. Prompted by nion at debian org, ok markus@ - - dtucker@cvs.openbsd.org 2013/02/06 00:22:21 - [auth.c] - Fix comment, from jfree.e1 at gmail - - djm@cvs.openbsd.org 2013/02/08 00:41:12 - [sftp.c] - fix NULL deref when built without libedit and control characters - entered as command; debugging and patch from Iain Morgan an - Loganaden Velvindron in bz#1956 - - markus@cvs.openbsd.org 2013/02/10 21:19:34 - [version.h] - openssh 6.2 - - djm@cvs.openbsd.org 2013/02/10 23:32:10 - [ssh-keygen.c] - append to moduli file when screening candidates rather than overwriting. - allows resumption of interrupted screen; patch from Christophe Garault - in bz#1957; ok dtucker@ - - djm@cvs.openbsd.org 2013/02/10 23:35:24 - [packet.c] - record "Received disconnect" messages at ERROR rather than INFO priority, - since they are abnormal and result in a non-zero ssh exit status; patch - from Iain Morgan in bz#2057; ok dtucker@ - - dtucker@cvs.openbsd.org 2013/02/11 21:21:58 + - jmc@cvs.openbsd.org 2013/11/21 08:05:09 + [ssh_config.5 sshd_config.5] + no need for .Pp before displays; + - deraadt@cvs.openbsd.org 2013/11/25 18:04:21 + [ssh.1 ssh.c] + improve -Q usage and such. One usage change is that the option is now + case-sensitive + ok dtucker markus djm + - jmc@cvs.openbsd.org 2013/11/26 12:14:54 + [ssh.1 ssh.c] + - put -Q in the right place + - Ar was a poor choice for the arguments to -Q. i've chosen an + admittedly equally poor Cm, at least consistent with the rest + of the docs. also no need for multiple instances + - zap a now redundant Nm + - usage() sync + - deraadt@cvs.openbsd.org 2013/11/26 19:15:09 + [pkcs11.h] + cleanup 1 << 31 idioms. Resurrection of this issue pointed out by + Eitan Adler ok markus for ssh, implies same change in kerberosV + - djm@cvs.openbsd.org 2013/12/01 23:19:05 + [PROTOCOL] + mention curve25519-sha256@libssh.org key exchange algorithm + - djm@cvs.openbsd.org 2013/12/02 02:50:27 + [PROTOCOL.chacha20poly1305] + typo; from Jon Cave + - djm@cvs.openbsd.org 2013/12/02 02:56:17 + [ssh-pkcs11-helper.c] + use-after-free; bz#2175 patch from Loganaden Velvindron @ AfriNIC + - djm@cvs.openbsd.org 2013/12/02 03:09:22 + [key.c] + make key_to_blob() return a NULL blob on failure; part of + bz#2175 from Loganaden Velvindron @ AfriNIC + - djm@cvs.openbsd.org 2013/12/02 03:13:14 + [cipher.c] + correct bzero of chacha20+poly1305 key context. bz#2177 from + Loganaden Velvindron @ AfriNIC + + Also make it a memset for consistency with the rest of cipher.c + - djm@cvs.openbsd.org 2013/12/04 04:20:01 + [sftp-client.c] + bz#2171: don't leak local_fd on error; from Loganaden Velvindron @ + AfriNIC + - djm@cvs.openbsd.org 2013/12/05 01:16:41 + [servconf.c servconf.h] + bz#2161 - fix AuthorizedKeysCommand inside a Match block and + rearrange things so the same error is harder to make next time; + with and ok dtucker@ + - (dtucker) [configure.ac] bz#2173: use pkg-config --libs to include correct + -L location for libedit. Patch from Serge van den Boom. + +20131121 + - (djm) OpenBSD CVS Sync + - dtucker@cvs.openbsd.org 2013/11/08 11:15:19 + [bufaux.c bufbn.c buffer.c sftp-client.c sftp-common.c sftp-glob.c] + [uidswap.c] Include stdlib.h for free() as per the man page. + - markus@cvs.openbsd.org 2013/11/13 13:48:20 + [ssh-pkcs11.c] + add missing braces found by pedro + - djm@cvs.openbsd.org 2013/11/20 02:19:01 [sshd.c] - Add openssl version to debug output similar to the client. ok markus@ - - djm@cvs.openbsd.org 2013/02/11 23:58:51 + delay closure of in/out fds until after "Bad protocol version + identification..." message, as get_remote_ipaddr/get_remote_port + require them open. + - deraadt@cvs.openbsd.org 2013/11/20 20:53:10 + [scp.c] + unsigned casts for ctype macros where neccessary + ok guenther millert markus + - deraadt@cvs.openbsd.org 2013/11/20 20:54:10 + [canohost.c clientloop.c match.c readconf.c sftp.c] + unsigned casts for ctype macros where neccessary + ok guenther millert markus + - djm@cvs.openbsd.org 2013/11/21 00:45:44 + [Makefile.in PROTOCOL PROTOCOL.chacha20poly1305 authfile.c chacha.c] + [chacha.h cipher-chachapoly.c cipher-chachapoly.h cipher.c cipher.h] + [dh.c myproposal.h packet.c poly1305.c poly1305.h servconf.c ssh.1] + [ssh.c ssh_config.5 sshd_config.5] Add a new protocol 2 transport + cipher "chacha20-poly1305@openssh.com" that combines Daniel + Bernstein's ChaCha20 stream cipher and Poly1305 MAC to build an + authenticated encryption mode. + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Mon Mar 31 14:51:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 945FDDC1; Mon, 31 Mar 2014 14:51:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E4188FF; Mon, 31 Mar 2014 14:51:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2VEpkQV032365; Mon, 31 Mar 2014 14:51:46 GMT (envelope-from asomers@svn.freebsd.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2VEpkZZ032364; Mon, 31 Mar 2014 14:51:46 GMT (envelope-from asomers@svn.freebsd.org) Message-Id: <201403311451.s2VEpkZZ032364@svn.freebsd.org> From: Alan Somers Date: Mon, 31 Mar 2014 14:51:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263972 - stable/10/share/man/man9 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Mar 2014 14:51:46 -0000 Author: asomers Date: Mon Mar 31 14:51:45 2014 New Revision: 263972 URL: http://svnweb.freebsd.org/changeset/base/263972 Log: MFC r263271 share/man/man9/counter.9 Fix logic error in the description of counter_u64_alloc: the command may fail only if M_NOWAIT is specified, not M_WAITOK. Modified: stable/10/share/man/man9/counter.9 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man9/counter.9 ============================================================================== --- stable/10/share/man/man9/counter.9 Mon Mar 31 14:40:35 2014 (r263971) +++ stable/10/share/man/man9/counter.9 Mon Mar 31 14:51:45 2014 (r263972) @@ -91,7 +91,7 @@ wait flag, should be either or .Va M_WAITOK . If -.Va M_WAITOK +.Va M_NOWAIT is specified the operation may fail. .It Fn counter_u64_free c Free the previously allocated counter From owner-svn-src-stable@FreeBSD.ORG Tue Apr 1 00:19:17 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C8555A3F; Tue, 1 Apr 2014 00:19:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B16EE8F6; Tue, 1 Apr 2014 00:19:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s310JHWG066609; Tue, 1 Apr 2014 00:19:17 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s310JEWZ066585; Tue, 1 Apr 2014 00:19:14 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201404010019.s310JEWZ066585@svn.freebsd.org> From: Devin Teske Date: Tue, 1 Apr 2014 00:19:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263980 - in stable/10: . usr.sbin/bsdconfig usr.sbin/bsdconfig/share usr.sbin/bsdconfig/timezone/share usr.sbin/bsdconfig/usermgmt usr.sbin/bsdconfig/usermgmt/include usr.sbin/bsdconfi... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Apr 2014 00:19:17 -0000 Author: dteske Date: Tue Apr 1 00:19:13 2014 New Revision: 263980 URL: http://svnweb.freebsd.org/changeset/base/263980 Log: MFC revisions 260894,260899,262895-262902,262904,262908-262910,262982, 262984,263133-263137,263139,263141,263144-263150, and (partially) 263249 (31 revisions; summarized below)... r260894: Optimize f_expand_number(), improving performance r260899: s/__number/__num/ in f_expand_number() r262895: Allow dispatched reswords to carry arguments r262896: Add missing local declaration r262897: Fix a typo in a comment r262898: Fix incorrect return status if var_to_set and var_to_get are same r262899: Make f_show_err non-fatal r262900: Centralize function name; Update a comment while here r262901: s/__num/__number/ in f_expand_number() r262902: Comment to go with NL global introduced by previous commit r262904: Rewrite groupmgmt -- hooking it into the scripting system r262908: Change dispatch words from group* to *Group for backward compat r262909: Fix copy/paste error in a comment r262910: Take a group name on the command-line if available r262982: Whitespace r262984: Remove vestigial global, no longer used since r262904 r263133: Remove indexfile from debug statement (already logged) r263134: Add debug statement just before attempting to exec a module r263135: Comments r263136: Update copyright r263137: Fix future namespace issues for functions taking $var_to_set r263139: Remove useless NULL string in compound strings r263141: Pointy hat! Fix a broken f_isinteger() r263144: Fix a code-typo that prevented auto-sizing of a dialog r263145: Fix comments and whitespace r263146: Reduce the sleep cycle when using dialog(1) [infobox] to 1-second r263147: Fix a bug preventing errors from pw(8) from appearing r263148: For non-interactive scripts, forgot to check argument r263149: Add protection against input containing single-quotes r263150: Rewrite usermgmt r263249: (partial) Add more obsolete files Added: stable/10/usr.sbin/bsdconfig/usermgmt/share/group.subr - copied, changed from r262904, head/usr.sbin/bsdconfig/usermgmt/share/group.subr stable/10/usr.sbin/bsdconfig/usermgmt/share/user.subr - copied unchanged from r263150, head/usr.sbin/bsdconfig/usermgmt/share/user.subr Deleted: stable/10/usr.sbin/bsdconfig/usermgmt/groupinput stable/10/usr.sbin/bsdconfig/usermgmt/userinput Modified: stable/10/ObsoleteFiles.inc stable/10/usr.sbin/bsdconfig/bsdconfig stable/10/usr.sbin/bsdconfig/share/common.subr stable/10/usr.sbin/bsdconfig/share/device.subr stable/10/usr.sbin/bsdconfig/share/dialog.subr stable/10/usr.sbin/bsdconfig/share/keymap.subr stable/10/usr.sbin/bsdconfig/share/script.subr stable/10/usr.sbin/bsdconfig/share/strings.subr stable/10/usr.sbin/bsdconfig/share/variable.subr stable/10/usr.sbin/bsdconfig/timezone/share/menus.subr stable/10/usr.sbin/bsdconfig/usermgmt/Makefile stable/10/usr.sbin/bsdconfig/usermgmt/groupadd stable/10/usr.sbin/bsdconfig/usermgmt/groupdel stable/10/usr.sbin/bsdconfig/usermgmt/groupedit stable/10/usr.sbin/bsdconfig/usermgmt/include/messages.subr stable/10/usr.sbin/bsdconfig/usermgmt/share/Makefile stable/10/usr.sbin/bsdconfig/usermgmt/share/group_input.subr stable/10/usr.sbin/bsdconfig/usermgmt/share/user_input.subr stable/10/usr.sbin/bsdconfig/usermgmt/useradd stable/10/usr.sbin/bsdconfig/usermgmt/userdel stable/10/usr.sbin/bsdconfig/usermgmt/useredit Directory Properties: stable/10/ (props changed) Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Mon Mar 31 21:04:15 2014 (r263979) +++ stable/10/ObsoleteFiles.inc Tue Apr 1 00:19:13 2014 (r263980) @@ -75,6 +75,10 @@ OLD_FILES+=usr/include/clang/3.3/xopintr OLD_FILES+=usr/share/man/man1/llvm-prof.1.gz OLD_FILES+=usr/share/man/man1/llvm-ranlib.1.gz OLD_DIRS+=usr/include/clang/3.3 +# 20140314: bsdconfig usermgmt rewrite +OLD_FILES+=usr/libexec/bsdconfig/070.usermgmt/userinput +# 20140307: bsdconfig groupmgmt rewrite +OLD_FILES+=usr/libexec/bsdconfig/070.usermgmt/groupinput # 20131109: extattr(2) mlinks fixed OLD_FILES+=usr/share/man/man2/extattr_delete_list.2.gz OLD_FILES+=usr/share/man/man2/extattr_get_list.2.gz Modified: stable/10/usr.sbin/bsdconfig/bsdconfig ============================================================================== --- stable/10/usr.sbin/bsdconfig/bsdconfig Mon Mar 31 21:04:15 2014 (r263979) +++ stable/10/usr.sbin/bsdconfig/bsdconfig Tue Apr 1 00:19:13 2014 (r263980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2012 Ron McDowell -# Copyright (c) 2012-2013 Devin Teske +# Copyright (c) 2012-2014 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -315,8 +315,7 @@ if [ "$pgm" != "bsdconfig" ]; then if indexfile=$( f_index_file "$pgm" ) && cmd=$( f_index_menusel_command "$indexfile" "$pgm" ) then - f_dprintf "pgm=[%s] indexfile=[%s] cmd=[%s]" \ - "$pgm" "$indexfile" "$cmd" + f_dprintf "pgm=[%s] cmd=[%s] *=[%s]" "$pgm" "$cmd" "$*" exec "$cmd" "$@" || exit 1 else f_include $BSDCFG_SHARE/script.subr @@ -324,7 +323,7 @@ if [ "$pgm" != "bsdconfig" ]; then [ "$pgm" = "$resword" ] || continue # Found a match f_dprintf "pgm=[%s] A valid resWord!" "$pgm" - f_dispatch $resword + f_dispatch $resword $resword "$@" exit $? done fi @@ -382,6 +381,7 @@ if [ "$1" ]; then # Not reached fi + f_dprintf "cmd=[%s] *=[%s]" "$cmd" "$*" shift exec $cmd ${USE_XDIALOG:+-X} "$@" || exit 1 # Not reached Modified: stable/10/usr.sbin/bsdconfig/share/common.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/common.subr Mon Mar 31 21:04:15 2014 (r263979) +++ stable/10/usr.sbin/bsdconfig/share/common.subr Tue Apr 1 00:19:13 2014 (r263980) @@ -1,7 +1,7 @@ if [ ! "$_COMMON_SUBR" ]; then _COMMON_SUBR=1 # # Copyright (c) 2012 Ron McDowell -# Copyright (c) 2012-2013 Devin Teske +# Copyright (c) 2012-2014 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -153,7 +153,7 @@ f_debug_init() # Process stored command-line arguments # set -- $ARGV - local OPTIND + local OPTIND flag f_dprintf "f_debug_init: ARGV=[%s] GETOPTS_STDARGS=[%s]" \ "$ARGV" "$GETOPTS_STDARGS" while getopts "$GETOPTS_STDARGS$GETOPTS_EXTRA$GETOPTS_ALLFLAGS" flag \ @@ -270,9 +270,9 @@ f_getvar() { local __var_to_get="$1" __var_to_set="$2" [ "$__var_to_set" ] || local value - eval ${__var_to_set:-value}=\"\${$__var_to_get}\" eval [ \"\${$__var_to_get+set}\" ] local __retval=$? + eval ${__var_to_set:-value}=\"\${$__var_to_get}\" eval f_dprintf '"f_getvar: var=[%s] value=[%s] r=%u"' \ \"\$__var_to_get\" \"\$${__var_to_set:-value}\" \$__retval [ "$__var_to_set" ] || { [ "$value" ] && echo "$value"; } @@ -368,13 +368,10 @@ f_show_msg() # f_show_err $format [$arguments ...] # # Display a message in a dialog box with ``Error'' i18n title (overridden by -# setting msg_error) using printf(1) syntax. If running non-interactively, -# the process will terminate (using [above] f_die()). +# setting msg_error) using printf(1) syntax. # f_show_err() { - [ "$nonInteractive" ] && f_die - local msg msg=$( printf "$@" ) @@ -523,7 +520,7 @@ f_include_lang() # f_usage $file "FOO" "BAR" # # Will cause instances of "@FOO@" appearing in $file to be replaced with the -# text "BAR" before bering printed to the screen. +# text "BAR" before being printed to the screen. # # This function is a two-parter. Below is the awk(1) portion of the function, # afterward is the sh(1) function which utilizes the below awk script. Modified: stable/10/usr.sbin/bsdconfig/share/device.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/device.subr Mon Mar 31 21:04:15 2014 (r263979) +++ stable/10/usr.sbin/bsdconfig/share/device.subr Tue Apr 1 00:19:13 2014 (r263980) @@ -1,6 +1,6 @@ if [ ! "$_DEVICE_SUBR" ]; then _DEVICE_SUBR=1 # -# Copyright (c) 2012-2013 Devin Teske +# Copyright (c) 2012-2014 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -170,11 +170,10 @@ f_device_reset() for dev in $DEVICES; do f_device_shutdown $dev - # - # XXX this potentially leaks $dev->private if it's being + # XXX This potentially leaks $dev->private if it's being # used to point to something dynamic, but you're not supposed # to call this routine at such times that some open instance - # has its private member pointing somewhere anyway. XXX + # has its private member pointing somewhere anyway. # f_struct_free device_$dev done @@ -325,8 +324,7 @@ f_device_get_all() case "$diskname" in cd*) - # XXX - # Due to unknown reasons, kern.disks returns SCSI + # XXX Due to unknown reasons, kern.disks returns SCSI # CDROM as a valid disk. This will prevent bsdconfig # from presenting SCSI CDROMs as available disks in # various menus. Why GEOM treats SCSI CDROM as a disk Modified: stable/10/usr.sbin/bsdconfig/share/dialog.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/dialog.subr Mon Mar 31 21:04:15 2014 (r263979) +++ stable/10/usr.sbin/bsdconfig/share/dialog.subr Tue Apr 1 00:19:13 2014 (r263980) @@ -1,6 +1,6 @@ if [ ! "$_DIALOG_SUBR" ]; then _DIALOG_SUBR=1 # -# Copyright (c) 2006-2013 Devin Teske +# Copyright (c) 2006-2014 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -469,16 +469,17 @@ f_dialog_menu_constrain() # Print debug warnings if any given (non-NULL) argument are invalid # NOTE: Don't change the name of $__{var,min,}{height,width,rows} # - local __height __width __rows + local __height_menu_constrain __width_menu_constrain + local __rows_menu_constrain local __arg __cp __fname=f_dialog_menu_constrain for __arg in height width rows; do debug= f_getvar __var_$__arg __cp [ "$__cp" ] || continue - if ! debug= f_getvar "$__cp" __$__arg; then + if ! debug= f_getvar "$__cp" __${__arg}_menu_constrain; then f_dprintf "%s: var_%s variable \`%s' not set" \ $__fname $__arg "$__cp" __retval=$FAILURE - elif ! eval f_isinteger \$__$__arg; then + elif ! eval f_isinteger \$__${__arg}_menu_constrain; then f_dprintf "%s: var_%s variable value not a number" \ $__fname $__arg __retval=$FAILURE @@ -502,9 +503,11 @@ f_dialog_menu_constrain() # Adjust height if desired if [ "$__var_height" ]; then - if [ $__height -lt ${__min_height:-0} ]; then + if [ $__height_menu_constrain -lt ${__min_height:-0} ]; then setvar "$__var_height" $__min_height - elif [ $__height -gt $__max_height_menu_constrain ]; then + elif [ $__height_menu_constrain -gt \ + $__max_height_menu_constrain ] + then setvar "$__var_height" $__max_height_menu_constrain fi fi @@ -516,9 +519,11 @@ f_dialog_menu_constrain() else : ${__min_width:=${DIALOG_MIN_WIDTH:-24}} fi - if [ $__width -lt $__min_width ]; then + if [ $__width_menu_constrain -lt $__min_width ]; then setvar "$__var_width" $__min_width - elif [ $__width -gt $__max_width_menu_constrain ]; then + elif [ $__width_menu_constrain -gt \ + $__max_width_menu_constrain ] + then setvar "$__var_width" $__max_width_menu_constrain fi fi @@ -531,16 +536,20 @@ f_dialog_menu_constrain() : ${__min_rows:=0} fi - local __max_rows=$(( $__max_height_menu_constrain - 7 )) + local __max_rows_menu_constrain=$(( + $__max_height_menu_constrain - 7 + )) # If prompt_len is zero (no prompt), bump the max-rows by 1 # Default assumption is (if no argument) that there's no prompt - [ ${__prompt_len:-0} -gt 0 ] || - __max_rows=$(( $__max_rows + 1 )) + [ ${__prompt_len:-0} -gt 0 ] || __max_rows_menu_constrain=$(( + $__max_rows_menu_constrain + 1 + )) - if [ $__rows -lt $__min_rows ]; then + if [ $__rows_menu_constrain -lt $__min_rows ]; then setvar "$__var_rows" $__min_rows - elif [ $__rows -gt $__max_rows ]; then - setvar "$__var_rows" $__max_rows + elif [ $__rows_menu_constrain -gt $__max_rows_menu_constrain ] + then + setvar "$__var_rows" $__max_rows_menu_constrain fi fi @@ -1100,19 +1109,20 @@ f_dialog_radiolist_size() # longest item-length (both used to bump the width), and the number of # rows (used to bump the height). # - local __longest_tag=0 __longest_item=0 __rows=0 + local __longest_tag=0 __longest_item=0 __rows_rlist_size=0 while [ $# -ge 3 ]; do local __tag="$1" __item="$2" shift 3 # tag/item/status [ ${#__tag} -gt $__longest_tag ] && __longest_tag=${#__tag} [ ${#__item} -gt $__longest_item ] && __longest_item=${#__item} - __rows=$(( $__rows + 1 )) + __rows_rlist_size=$(( $__rows_rlist_size + 1 )) done # Adjust rows early (for up-coming height calculation) if [ "$__var_height" -o "$__var_rows" ]; then # Add a row for visual aid if using Xdialog(1) - [ "$USE_XDIALOG" ] && __rows=$(( $__rows + 1 )) + [ "$USE_XDIALOG" ] && + __rows_rlist_size=$(( $__rows_rlist_size + 1 )) fi # Adjust height if desired @@ -1120,10 +1130,12 @@ f_dialog_radiolist_size() # Add rows to height if [ "$USE_XDIALOG" ]; then __height_rlist_size=$(( - $__height_rlist_size + $__rows + 7 )) + $__height_rlist_size + $__rows_rlist_size + 7 + )) else __height_rlist_size=$(( - $__height_rlist_size + $__rows + 4 )) + $__height_rlist_size + $__rows_rlist_size + 4 + )) fi setvar "$__var_height" $__height_rlist_size fi @@ -1140,7 +1152,7 @@ f_dialog_radiolist_size() fi # Store adjusted rows if desired - [ "$__var_rows" ] && setvar "$__var_rows" $__rows + [ "$__var_rows" ] && setvar "$__var_rows" $__rows_rlist_size # Constrain height, width, and rows to sensible minimum/maximum values # Return success if no-constrain, else return status from constrain @@ -1220,20 +1232,26 @@ f_dialog_radiolist_with_help_size() # all used to bump the width -- and the number of rows (used to bump # the height). # - local __longest_tag=0 __longest_item=0 __longest_help=0 __rows=0 + local __longest_tag=0 __longest_item=0 __longest_help=0 + local __rows_rlist_with_help_size=0 while [ $# -ge 4 ]; do local __tag="$1" __item="$2" __status="$3" __help="$4" shift 4 # tag/item/status/help [ ${#__tag} -gt $__longest_tag ] && __longest_tag=${#__tag} [ ${#__item} -gt $__longest_item ] && __longest_item=${#__item} [ ${#__help} -gt $__longest_help ] && __longest_help=${#__help} - __rows=$(( $__rows + 1 )) + __rows_rlist_with_help_size=$(( + $__rows_rlist_with_help_size + 1 + )) done # Adjust rows early (for up-coming height calculation) if [ "$__var_height" -o "$__var_rows" ]; then # Add a row for visual aid if using Xdialog(1) - [ "$USE_XDIALOG" ] && __rows=$(( $__rows + 1 )) + [ "$USE_XDIALOG" ] && + __rows_rlist_with_help_size=$(( + $__rows_rlist_with_help_size + 1 + )) fi # Adjust height if desired @@ -1241,10 +1259,14 @@ f_dialog_radiolist_with_help_size() # Add rows to height if [ "$USE_XDIALOG" ]; then __height_rlist_with_help_size=$(( - $__height_rlist_with_help_size + $__rows + 7 )) + $__height_rlist_with_help_size + + $__rows_rlist_with_help_size + 7 + )) else __height_rlist_with_help_size=$(( - $__height_rlist_with_help_size + $__rows + 4 )) + $__height_rlist_with_help_size + + $__rows_rlist_with_help_size + 4 + )) fi setvar "$__var_height" $__height fi @@ -1270,7 +1292,7 @@ f_dialog_radiolist_with_help_size() fi # Store adjusted rows if desired - [ "$__var_rows" ] && setvar "$__var_rows" $__rows + [ "$__var_rows" ] && setvar "$__var_rows" $__rows_rlist_with_help_size # Constrain height, width, and rows to sensible minimum/maximum values # Return success if no-constrain, else return status from constrain Modified: stable/10/usr.sbin/bsdconfig/share/keymap.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/keymap.subr Mon Mar 31 21:04:15 2014 (r263979) +++ stable/10/usr.sbin/bsdconfig/share/keymap.subr Tue Apr 1 00:19:13 2014 (r263980) @@ -165,7 +165,7 @@ f_keymap_get_all() marks[keym] = mark name = keym gsub(/[^[:alnum:]_]/, "_", name) - gsub(/'\''/, "'\''\\'\'''\''", desc); + gsub(/'\''/, "'\''\\'\'\''", desc); printf "f_keymap_checkfile %s && " \ "f_keymap_register %s '\'%s\'' %s %u\n", keym, name, desc, keym, mark Modified: stable/10/usr.sbin/bsdconfig/share/script.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/script.subr Mon Mar 31 21:04:15 2014 (r263979) +++ stable/10/usr.sbin/bsdconfig/share/script.subr Tue Apr 1 00:19:13 2014 (r263980) @@ -1,6 +1,6 @@ if [ ! "$_SCRIPT_SUBR" ]; then _SCRIPT_SUBR=1 # -# Copyright (c) 2012-2013 Devin Teske +# Copyright (c) 2012-2014 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -37,6 +37,8 @@ f_include $BSDCFG_SHARE/media/tcpip.subr f_include $BSDCFG_SHARE/mustberoot.subr f_include $BSDCFG_SHARE/networking/services.subr f_include $BSDCFG_SHARE/packages/packages.subr +f_include $BSDCFG_SHARE/usermgmt/group.subr +f_include $BSDCFG_SHARE/usermgmt/user.subr f_include $BSDCFG_SHARE/variable.subr ############################################################ GLOBALS @@ -50,25 +52,23 @@ RESWORDS= # Create a new `reserved' word for scripting purposes. Reswords call pre- # defined functions but differ from those functions in the following ways: # -# + Reswords do not take arguments but instead get all their data from -# the environment variable namespace. # + Unless noError is set (must be non-NULL), if calling the resword # results in failure, the application will terminate prematurely. # + noError is unset after each/every resword is called. # # Reswords should not be used in bsdconfig itself (hence the name `reserved -# word') but instead only in scripts loaded through f_script_load()). +# word') but instead only in scripts loaded through f_script_load(). # f_resword_new() { local resword="$1" func="$2" [ "$resword" ] || return $FAILURE f_dprintf "script.subr: New resWord %s -> %s" "$resword" "$func" - eval $resword\(\){ f_dispatch $func $resword\; } + eval $resword\(\){ f_dispatch $func $resword \"\$@\"\; } RESWORDS="$RESWORDS${RESWORDS:+ }$resword" } -# f_dispatch $func [$resword] +# f_dispatch $func $resword # # Wrapper function used by `reserved words' (reswords) to call other functions. # If $noError is set and non-NULL, a failure result from $func is ignored, @@ -78,9 +78,10 @@ f_resword_new() # f_dispatch() { - local func="$1" resword="${2:-$1}" + local func="$1" resword="$2" + shift 2 # func resword f_dprintf "f_dispatch: calling resword \`%s'" "$resword" - eval $func + eval $func "$@" local retval=$? if [ $retval -ne $SUCCESS ]; then local _ignore_this_error @@ -96,7 +97,7 @@ f_dispatch() # Load a script (usually filled with reswords). If $file is missing or NULL, # use one of the following instead (in order): # -# $configFile +# $configFile (global) # install.cfg # /stand/install.fg # /tmp/install.cfg @@ -108,9 +109,10 @@ f_dispatch() # f_script_load() { + local funcname=f_script_load local script="$1" config_file retval=$SUCCESS - f_dprintf "f_script_load: script=[%s]" "$script" + f_dprintf "$funcname: script=[%s]" "$script" if [ ! "$script" ]; then f_getvar $VAR_CONFIG_FILE config_file for script in \ @@ -130,11 +132,11 @@ f_script_load() setvar $VAR_NONINTERACTIVE yes if [ "$script" = "-" ]; then - f_dprintf "f_script_load: Loading script from stdin" + f_dprintf "$funcname: Loading script from stdin" eval "$( cat )" retval=$? else - f_dprintf "f_script_load: Loading script \`%s'" "$script" + f_dprintf "$funcname: Loading script \`%s'" "$script" if [ ! -e "$script" ]; then f_show_msg "$msg_unable_to_open" "$script" return $FAILURE @@ -198,6 +200,16 @@ f_resword_new packageAdd f_package_add f_resword_new packageDelete f_package_delete f_resword_new packageReinstall f_package_reinstall +# usermgmt/group.subr +f_resword_new addGroup f_group_add +f_resword_new deleteGroup f_group_delete +f_resword_new editGroup f_group_edit + +# usermgmt/user.subr +f_resword_new addUser f_user_add +f_resword_new deleteUser f_user_delete +f_resword_new editUser f_user_edit + # variable.subr f_resword_new installVarDefaults f_variable_set_defaults f_resword_new dumpVariables f_dump_variables Modified: stable/10/usr.sbin/bsdconfig/share/strings.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/strings.subr Mon Mar 31 21:04:15 2014 (r263979) +++ stable/10/usr.sbin/bsdconfig/share/strings.subr Tue Apr 1 00:19:13 2014 (r263980) @@ -34,6 +34,12 @@ BSDCFG_SHARE="/usr/share/bsdconfig" ############################################################ GLOBALS # +# A Literal newline (for use with f_replace_all(), or IFS, or whatever) +# +NL=" +" # END-QUOTE + +# # Valid characters that can appear in an sh(1) variable name # # Please note that the character ranges A-Z and a-z should be avoided because @@ -189,7 +195,7 @@ f_number_of_lines() f_isinteger() { local arg="${1#-}" - [ "${arg:-x}" = "${arg#[!0-9]*}" ] + [ "${arg:-x}" = "${arg%[!0-9]*}" ] } # f_uriencode [$text] @@ -265,6 +271,9 @@ f_uridecode() # capturing in a sub-shell (which is less recommended due to performance # degradation). # +# To replace newlines or a sequence containing the newline character, use $NL +# as `\n' is not supported. +# f_replaceall() { local __left="" __right="$1" @@ -372,14 +381,13 @@ f_expand_number() local __cp __num __bshift __maxinput # Remove any leading non-digits - while :; do - __cp="$__string" - __string="${__cp#[!0-9]}" - [ "$__string" = "$__cp" ] && break - done + __string="${__string#${__string%%[0-9]*}}" + + # Store the numbers (no trailing suffix) + __num="${__string%%[!0-9]*}" # Produce `-1' if string didn't contain any digits - if [ ! "$__string" ]; then + if [ ! "$__num" ]; then if [ "$__var_to_set" ]; then setvar "$__var_to_set" -1 else @@ -388,25 +396,8 @@ f_expand_number() return 1 # 1 = "Given $string contains no digits" fi - # Store the numbers - __num="${__string%%[!0-9]*}" - - # Shortcut - if [ $__num -eq 0 ]; then - if [ "$__var_to_set" ]; then - setvar "$__var_to_set" 0 - else - echo 0 - fi - return $SUCCESS - fi - # Remove all the leading numbers from the string to get at the prefix - while :; do - __cp="$__string" - __string="${__cp#[0-9]}" - [ "$__string" = "$__cp" ] && break - done + __string="${__string#"$__num"}" # # Test for invalid prefix (and determine bitshift length) Modified: stable/10/usr.sbin/bsdconfig/share/variable.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/variable.subr Mon Mar 31 21:04:15 2014 (r263979) +++ stable/10/usr.sbin/bsdconfig/share/variable.subr Tue Apr 1 00:19:13 2014 (r263980) @@ -1,6 +1,6 @@ if [ ! "$_VARIABLE_SUBR" ]; then _VARIABLE_SUBR=1 # -# Copyright (c) 2012-2013 Devin Teske +# Copyright (c) 2012-2014 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -241,6 +241,10 @@ f_variable_new VAR_FTP_PORT ftpPort f_variable_new VAR_FTP_STATE ftpState f_variable_new VAR_FTP_USER ftpUser f_variable_new VAR_GATEWAY defaultrouter +f_variable_new VAR_GROUP group +f_variable_new VAR_GROUP_GID groupGid +f_variable_new VAR_GROUP_MEMBERS groupMembers +f_variable_new VAR_GROUP_PASSWORD groupPassword f_variable_new VAR_HOSTNAME hostname f_variable_new VAR_HTTP_DIR httpDirectory f_variable_new VAR_HTTP_FTP_MODE httpFtpMode @@ -279,6 +283,21 @@ f_variable_new VAR_SLOW_ETHER slowEther f_variable_new VAR_TRY_DHCP tryDHCP f_variable_new VAR_TRY_RTSOL tryRTSOL f_variable_new VAR_UFS_PATH ufs +f_variable_new VAR_USER user +f_variable_new VAR_USER_ACCOUNT_EXPIRE userAccountExpire +f_variable_new VAR_USER_DOTFILES_CREATE userDotfilesCreate +f_variable_new VAR_USER_GECOS userGecos +f_variable_new VAR_USER_GID userGid +f_variable_new VAR_USER_GROUPS userGroups +f_variable_new VAR_USER_GROUP_DELETE userGroupDelete +f_variable_new VAR_USER_HOME userHome +f_variable_new VAR_USER_HOME_CREATE userHomeCreate +f_variable_new VAR_USER_HOME_DELETE userHomeDelete +f_variable_new VAR_USER_LOGIN_CLASS userLoginClass +f_variable_new VAR_USER_PASSWORD userPassword +f_variable_new VAR_USER_PASSWORD_EXPIRE userPasswordExpire +f_variable_new VAR_USER_SHELL userShell +f_variable_new VAR_USER_UID userUid f_variable_new VAR_ZFSINTERACTIVE zfsInteractive # Modified: stable/10/usr.sbin/bsdconfig/timezone/share/menus.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/timezone/share/menus.subr Mon Mar 31 21:04:15 2014 (r263979) +++ stable/10/usr.sbin/bsdconfig/timezone/share/menus.subr Tue Apr 1 00:19:13 2014 (r263980) @@ -104,7 +104,7 @@ f_make_menus_awk=' function add_zone_n_to_country_menu(tlc, n) { zone_title = ENVIRON["country_" tlc "_descr_" n] - gsub(/'\''/, "'\''\\'\'''\''", zone_title) + gsub(/'\''/, "'\''\\'\'\''", zone_title) country_menu_list[tlc] = country_menu_list[tlc] \ ( length(country_menu_list[tlc]) > 0 ? "\n" : "" ) \ n " '\''" zone_title "'\''" @@ -121,7 +121,7 @@ BEGIN { { tlc = countries[cp] title = ENVIRON["country_" tlc "_name"] - gsub(/'\''/, "'\''\\'\'''\''", title) + gsub(/'\''/, "'\''\\'\'\''", title) nzones = ENVIRON["country_" tlc "_nzones"] if (!nzones) { Modified: stable/10/usr.sbin/bsdconfig/usermgmt/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/usermgmt/Makefile Mon Mar 31 21:04:15 2014 (r263979) +++ stable/10/usr.sbin/bsdconfig/usermgmt/Makefile Tue Apr 1 00:19:13 2014 (r263980) @@ -8,8 +8,7 @@ FILESDIR= ${LIBEXECDIR}/bsdconfig/070.us FILES= INDEX USAGE SCRIPTSDIR= ${FILESDIR} -SCRIPTS= groupadd groupdel groupedit groupinput \ - useradd userdel useredit userinput usermgmt +SCRIPTS= groupadd groupdel groupedit useradd userdel useredit usermgmt beforeinstall: mkdir -p ${DESTDIR}${FILESDIR} Modified: stable/10/usr.sbin/bsdconfig/usermgmt/groupadd ============================================================================== --- stable/10/usr.sbin/bsdconfig/usermgmt/groupadd Mon Mar 31 21:04:15 2014 (r263979) +++ stable/10/usr.sbin/bsdconfig/usermgmt/groupadd Tue Apr 1 00:19:13 2014 (r263980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2012 Ron McDowell -# Copyright (c) 2012-2013 Devin Teske +# Copyright (c) 2012-2014 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -33,8 +33,11 @@ BSDCFG_SHARE="/usr/share/bsdconfig" . $BSDCFG_SHARE/common.subr || exit 1 f_dprintf "%s: loading includes..." "$0" f_include $BSDCFG_SHARE/dialog.subr +f_include $BSDCFG_SHARE/mustberoot.subr +f_include $BSDCFG_SHARE/usermgmt/group.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="070.usermgmt" +f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && pgm="${ipgm:-$pgm}" @@ -55,9 +58,19 @@ done shift $(( $OPTIND - 1 )) # -# Chain-load to groupinput to centralize code and minimize duplication +# Initialize # -$BSDCFG_LIBE/$APP_DIR/groupinput ${USE_XDIALOG:+-X} mode="Add" +f_dialog_title "$msg_add $msg_group" +f_dialog_backtitle "${ipgm:+bsdconfig }$pgm" +f_mustberoot_init + +# +# Add a group +# +# NB: If given an argument on the command-line use it; otherwise fall-back to +# environment variable $group (handle $VAR_GROUP). +# +f_group_add ${1:+"$1"} ################################################################################ # END Modified: stable/10/usr.sbin/bsdconfig/usermgmt/groupdel ============================================================================== --- stable/10/usr.sbin/bsdconfig/usermgmt/groupdel Mon Mar 31 21:04:15 2014 (r263979) +++ stable/10/usr.sbin/bsdconfig/usermgmt/groupdel Tue Apr 1 00:19:13 2014 (r263980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2012 Ron McDowell -# Copyright (c) 2012-2013 Devin Teske +# Copyright (c) 2012-2014 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -34,6 +34,7 @@ BSDCFG_SHARE="/usr/share/bsdconfig" f_dprintf "%s: loading includes..." "$0" f_include $BSDCFG_SHARE/dialog.subr f_include $BSDCFG_SHARE/mustberoot.subr +f_include $BSDCFG_SHARE/usermgmt/group.subr f_include $BSDCFG_SHARE/usermgmt/group_input.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="070.usermgmt" @@ -65,9 +66,17 @@ f_dialog_backtitle "${ipgm:+bsdconfig }$ f_mustberoot_init # +# If given a group name, operate on it and exit +# +if [ "$1" ]; then + f_group_delete "$1" + exit $SUCCESS +fi + +# # Loop until the user Exits, Cancels or presses ESC # -defaultitem="" +defaultitem= while :; do f_dialog_menu_group_list "$defaultitem" retval=$? @@ -81,8 +90,7 @@ while :; do # Anything else is a group name - $BSDCFG_LIBE/$APP_DIR/groupinput \ - ${USE_XDIALOG:+-X} mode="Delete" group="$mtag" + f_group_delete "$mtag" done exit $SUCCESS Modified: stable/10/usr.sbin/bsdconfig/usermgmt/groupedit ============================================================================== --- stable/10/usr.sbin/bsdconfig/usermgmt/groupedit Mon Mar 31 21:04:15 2014 (r263979) +++ stable/10/usr.sbin/bsdconfig/usermgmt/groupedit Tue Apr 1 00:19:13 2014 (r263980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2012 Ron McDowell -# Copyright (c) 2012-2013 Devin Teske +# Copyright (c) 2012-2014 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -34,6 +34,7 @@ BSDCFG_SHARE="/usr/share/bsdconfig" f_dprintf "%s: loading includes..." "$0" f_include $BSDCFG_SHARE/dialog.subr f_include $BSDCFG_SHARE/mustberoot.subr +f_include $BSDCFG_SHARE/usermgmt/group.subr f_include $BSDCFG_SHARE/usermgmt/group_input.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="070.usermgmt" @@ -65,9 +66,17 @@ f_dialog_backtitle "${ipgm:+bsdconfig }$ f_mustberoot_init # -# Loop until the user Exits, Cancels or presses ESC +# If given a group name, operate on it and exit # -defaultitem="" +if [ "$1" ]; then + f_group_edit "$1" + exit $SUCCESS +fi + +# +# Present a list of groups and loop until user Exits, Cancels or presses ESC +# +defaultitem= while :; do f_dialog_menu_group_list "$defaultitem" retval=$? @@ -81,8 +90,7 @@ while :; do # Anything else is a group name - $BSDCFG_LIBE/$APP_DIR/groupinput \ - ${USE_XDIALOG:+-X} mode="Edit/View" group="$mtag" + f_group_edit "$mtag" done exit $SUCCESS Modified: stable/10/usr.sbin/bsdconfig/usermgmt/include/messages.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/usermgmt/include/messages.subr Mon Mar 31 21:04:15 2014 (r263979) +++ stable/10/usr.sbin/bsdconfig/usermgmt/include/messages.subr Tue Apr 1 00:19:13 2014 (r263980) @@ -1,5 +1,5 @@ # Copyright (c) 2012 Ron McDowell -# Copyright (c) 2012-2013 Devin Teske +# Copyright (c) 2012-2014 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -33,7 +33,7 @@ hline_arrows_tab_enter="Press arrows, TA hline_num_arrows_tab_enter="Use numbers, arrows, TAB or ENTER" hline_num_tab_enter="Use numbers, TAB or ENTER" msg_account_does_not_expire="Account does not expire" -msg_account_expires_in_how_many_days="Account expires in how many days?" +msg_account_expire_manual_edit="Enter account expiration time. Format is one of:\n\n a) decimal for UNIX time since %s\n b) dd-mmm-yy[yy] for day, month, and 2- or 4-digit year\n c) +n[mhdwoy] for relative time from current date\n\nNOTE: Value of zero disables expiration." msg_account_expires_on="Account Expires on" msg_add="Add" msg_add_group="Add Group" @@ -56,6 +56,7 @@ msg_edit_group="Edit/View Group" msg_edit_login="Edit/View Login" msg_edit_view="Edit/View" msg_enter_group_members_manually="Enter Group Members manually" +msg_enter_groups_manually="Enter Groups manually" msg_enter_number_of_days_into_the_future="Enter number of days into the future" msg_enter_value_manually="Edit value manually" msg_error="ERROR!" @@ -74,9 +75,8 @@ msg_group_not_found="%s: Group not found msg_group_password="Group Password" msg_group_passwords_do_not_match="Group Passwords do not match." msg_group_updated="Group Updated" +msg_groups="Groups" msg_home_directory="Home Directory" -msg_invalid_number_of_days="Invalid number of days." -msg_invalid_number_of_seconds="Invalid number of seconds." msg_login="Login" msg_login_added="Login Added" msg_login_already_used="%s: Login is already used." @@ -85,23 +85,28 @@ msg_login_deleted="Login Deleted" msg_login_is_empty="Login is empty." msg_login_management="Login/Group Management" msg_login_must_start_with_letter="Login must start with a letter." -msg_login_not_found="Login not found." +msg_login_not_found="%s: Login not found." msg_login_updated="Login Updated" msg_member_of_groups="Member of Groups" msg_n_a="N/A" msg_no="No" +msg_no_group_specified="No group specified!" +msg_no_user_specified="No user specified!" msg_number_of_seconds_since_epoch="Number of seconds since the Epoch\n(1 = %s)\nNULL or zero to disable:" msg_ok="OK" msg_password="Password" msg_password_does_not_expire="Password does not expire" -msg_password_expires_in_how_many_days="Password expires in how many days?" +msg_password_expire_manual_edit="Enter password expiration time. Format is one of:\n\n a) decimal for UNIX time since %s\n b) dd-mmm-yy[yy] for day, month, and 2- or 4-digit year\n c) +n[mhdwoy] for relative time from current date\n\nNOTE: Value of zero disables expiration." msg_password_expires_on="Password Expires on" msg_passwords_do_not_match="Passwords do not match." +msg_please_enter_a_group_name="Please enter a group name!" +msg_please_enter_a_user_name="Please enter a user name!" msg_reenter_group_password="Re-enter Group Password" msg_reenter_password="Re-enter Password" msg_save="Save" msg_save_exit_or_cancel="Choose Save/Exit when finished or Cancel." msg_select_group_members_from_list="Select Group Members from a list" +msg_select_groups_from_list="Select Groups from a list" msg_select_login_shell="Select Login Shell" msg_separated_by_commas="Separated by commas" msg_shell="Shell" Modified: stable/10/usr.sbin/bsdconfig/usermgmt/share/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/usermgmt/share/Makefile Mon Mar 31 21:04:15 2014 (r263979) +++ stable/10/usr.sbin/bsdconfig/usermgmt/share/Makefile Tue Apr 1 00:19:13 2014 (r263980) @@ -3,7 +3,7 @@ NO_OBJ= FILESDIR= ${SHAREDIR}/bsdconfig/usermgmt -FILES= group_input.subr user_input.subr +FILES= group.subr group_input.subr user.subr user_input.subr beforeinstall: mkdir -p ${DESTDIR}${FILESDIR} Copied and modified: stable/10/usr.sbin/bsdconfig/usermgmt/share/group.subr (from r262904, head/usr.sbin/bsdconfig/usermgmt/share/group.subr) ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/share/group.subr Fri Mar 7 20:44:19 2014 (r262904, copy source) +++ stable/10/usr.sbin/bsdconfig/usermgmt/share/group.subr Tue Apr 1 00:19:13 2014 (r263980) @@ -96,6 +96,10 @@ f_group_add() [ "$group_name" ] || f_show_err "$msg_please_enter_a_group_name" done + if [ ! "$group_name" ]; then + f_show_err "$msg_no_group_specified" + return $FAILURE + fi local group_password group_gid group_members f_getvar $VAR_GROUP_PASSWORD group_password @@ -152,10 +156,17 @@ f_group_add() case "$mtag" in X) # Add/Exit - local cmd="pw groupadd -n '$group_name'" - [ "$group_gid" ] && cmd="$cmd -g '$group_gid'" + local var + for var in gid members name; do + local _group_$var + eval f_shell_escape \ + \"\$group_$var\" _group_$var + done + + local cmd="pw groupadd -n '$_group_name'" + [ "$group_gid" ] && cmd="$cmd -g '$_group_gid'" [ "$group_members" ] && - cmd="$cmd -M '$group_members'" + cmd="$cmd -M '$_group_members'" # Execute the command (break on success) if [ "$group_password_disable" ]; then @@ -163,7 +174,7 @@ f_group_add() elif [ "$group_password" ]; then echo "$group_password" | f_eval_catch $funcname \ - pw '%s -h 0' "$cmd" + pw '%s -h 0' "$cmd" else f_eval_catch $funcname pw '%s' "$cmd" fi && break @@ -192,18 +203,24 @@ f_group_add() esac done else + local var + for var in gid members name; do + local _group_$var + eval f_shell_escape \"\$group_$var\" _group_$var + done + # Form the command - local cmd="pw groupadd -n '$group_name'" - [ "$group_gid" ] && cmd="$cmd -g '$group_gid'" - [ "$group_members" ] && cmd="$cmd -M '$group_members'" + local cmd="pw groupadd -n '$_group_name'" + [ "$group_gid" ] && cmd="$cmd -g '$_group_gid'" + [ "$group_members" ] && cmd="$cmd -M '$_group_members'" # Execute the command local retval err if [ "$group_password_disable" ]; then f_eval_catch -k err $funcname pw '%s -h -' "$cmd" elif [ "$group_password" ]; then - echo "$group_password" | f_eval_catch -k err \ - $funcname pw '%s -h 0' "$cmd" + err=$( echo "$group_password" | f_eval_catch -de \ + $funcname pw '%s -h 0' "$cmd" 2>&1 ) else f_eval_catch -k err $funcname pw '%s' "$cmd" fi @@ -217,7 +234,7 @@ f_group_add() f_dialog_title "$title" $alert "$msg_group_added" f_dialog_title_restore - [ "$no_confirm" -a "$USE_DIALOG" ] && sleep 2 + [ "$no_confirm" -a "$USE_DIALOG" ] && sleep 1 return $SUCCESS } @@ -272,8 +289,10 @@ f_group_delete() case "$mtag" in X) # Delete/Exit + local _group_name + f_shell_escape "$group_name" _group_name f_eval_catch $funcname pw 'pw groupdel "%s"' \ - "$group_name" && break + "$_group_name" && break ;; 1) # Group Name (select different group from list) f_dialog_menu_group_list "$group_name" || continue @@ -292,9 +311,10 @@ f_group_delete() esac done else - local retval err + local retval err _group_name + f_shell_escape "$group_name" _group_name f_eval_catch -k err $funcname pw \ - 'pw groupdel "%s"' "$group_name" + "pw groupdel '%s'" "$_group_name" retval=$? if [ $retval -ne $SUCCESS ]; then f_show_err "%s" "$err" @@ -305,7 +325,7 @@ f_group_delete() f_dialog_title "$title" $alert "$msg_group_deleted" f_dialog_title_restore - [ "$no_confirm" -a "$USE_DIALOG" ] && sleep 2 + [ "$no_confirm" -a "$USE_DIALOG" ] && sleep 1 return $SUCCESS } @@ -324,7 +344,9 @@ f_group_delete() # unchanged. # VAR_GROUP_MEMBERS [Optional] # Comma separated list of users that are a member of this group. -# If NULL or unset, group membership is unmodified. +# If set but NULL, group memberships are reset (no users will be +# a member of this group). If unset, group membership is +# unmodified. # VAR_GROUP_PASSWORD [Optional] # newgrp(1) password to set for the group. If unset, the password # is unmodified. If NULL, the newgrp(1) password is disabled. @@ -400,18 +422,24 @@ f_group_edit() case "$mtag" in X) # Save/Exit - local cmd="pw groupmod -n '$group_name'" - [ "$group_gid" ] && cmd="$cmd -g '$group_gid'" + local var + for var in gid members name; do + local _group_$var + eval f_shell_escape \ + \"\$group_$var\" _group_$var + done + + local cmd="pw groupmod -n '$_group_name'" + [ "$group_gid" ] && cmd="$cmd -g '$_group_gid'" [ "$group_members" -o "$null_members" ] && - cmd="$cmd -M '$group_members'" + cmd="$cmd -M '$_group_members'" # Execute the command (break on success) if [ "$group_password_disable" ]; then f_eval_catch $funcname pw '%s -h -' "$cmd" elif [ "$group_password" ]; then - echo "$group_password" | - f_eval_catch $funcname \ - pw '%s -h 0' "$cmd" + echo "$group_password" | f_eval_catch \ + $funcname pw '%s -h 0' "$cmd" else f_eval_catch $funcname pw '%s' "$cmd" fi && break @@ -424,7 +452,7 @@ f_group_edit() if ! f_input_group "$mtag"; then f_show_err "$msg_group_not_found" "$mtag" - # Attempt to fall back to prevoius selection + # Attempt to fall back to previous selection f_input_group "$input" || return $FAILURE else input="$mtag" @@ -446,19 +474,25 @@ f_group_edit() esac *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Tue Apr 1 08:19:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6983721B; Tue, 1 Apr 2014 08:19:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 548BEEDA; Tue, 1 Apr 2014 08:19:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s318JV7w062579; Tue, 1 Apr 2014 08:19:31 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s318JVJE062578; Tue, 1 Apr 2014 08:19:31 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201404010819.s318JVJE062578@svn.freebsd.org> From: Dimitry Andric Date: Tue, 1 Apr 2014 08:19:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263984 - in stable: 10/contrib/llvm/tools/clang/lib/Driver 9/contrib/llvm/tools/clang/lib/Driver X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Apr 2014 08:19:31 -0000 Author: dim Date: Tue Apr 1 08:19:30 2014 New Revision: 263984 URL: http://svnweb.freebsd.org/changeset/base/263984 Log: MFC r263891: Make clang default to DWARF2 debug info format for FreeBSD 10.x and earlier. For head, this commit does not change anything, but it is purely meant to be MFC'd. Modified: stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Tue Apr 1 06:46:59 2014 (r263983) +++ stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Tue Apr 1 08:19:30 2014 (r263984) @@ -2628,8 +2628,10 @@ void Clang::ConstructJob(Compilation &C, CmdArgs.push_back("-gdwarf-4"); else if (!A->getOption().matches(options::OPT_g0) && !A->getOption().matches(options::OPT_ggdb0)) { - // Default is dwarf-2 for darwin. - if (getToolChain().getTriple().isOSDarwin()) + // Default is dwarf-2 for darwin and FreeBSD <= 10. + const llvm::Triple &Triple = getToolChain().getTriple(); + if (Triple.isOSDarwin() || (Triple.getOS() == llvm::Triple::FreeBSD && + Triple.getOSMajorVersion() <= 10)) CmdArgs.push_back("-gdwarf-2"); else CmdArgs.push_back("-g"); From owner-svn-src-stable@FreeBSD.ORG Tue Apr 1 08:19:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE8B121C; Tue, 1 Apr 2014 08:19:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA99BEDB; Tue, 1 Apr 2014 08:19:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s318JVtU062585; Tue, 1 Apr 2014 08:19:31 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s318JV6C062584; Tue, 1 Apr 2014 08:19:31 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201404010819.s318JV6C062584@svn.freebsd.org> From: Dimitry Andric Date: Tue, 1 Apr 2014 08:19:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263984 - in stable: 10/contrib/llvm/tools/clang/lib/Driver 9/contrib/llvm/tools/clang/lib/Driver X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Apr 2014 08:19:31 -0000 Author: dim Date: Tue Apr 1 08:19:30 2014 New Revision: 263984 URL: http://svnweb.freebsd.org/changeset/base/263984 Log: MFC r263891: Make clang default to DWARF2 debug info format for FreeBSD 10.x and earlier. For head, this commit does not change anything, but it is purely meant to be MFC'd. Modified: stable/10/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) Modified: stable/10/contrib/llvm/tools/clang/lib/Driver/Tools.cpp ============================================================================== --- stable/10/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Tue Apr 1 06:46:59 2014 (r263983) +++ stable/10/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Tue Apr 1 08:19:30 2014 (r263984) @@ -2628,8 +2628,10 @@ void Clang::ConstructJob(Compilation &C, CmdArgs.push_back("-gdwarf-4"); else if (!A->getOption().matches(options::OPT_g0) && !A->getOption().matches(options::OPT_ggdb0)) { - // Default is dwarf-2 for darwin. - if (getToolChain().getTriple().isOSDarwin()) + // Default is dwarf-2 for darwin and FreeBSD <= 10. + const llvm::Triple &Triple = getToolChain().getTriple(); + if (Triple.isOSDarwin() || (Triple.getOS() == llvm::Triple::FreeBSD && + Triple.getOSMajorVersion() <= 10)) CmdArgs.push_back("-gdwarf-2"); else CmdArgs.push_back("-g"); From owner-svn-src-stable@FreeBSD.ORG Tue Apr 1 12:07:16 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5DC0F6C5; Tue, 1 Apr 2014 12:07:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49B869B0; Tue, 1 Apr 2014 12:07:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s31C7GFs057162; Tue, 1 Apr 2014 12:07:16 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s31C7G27057161; Tue, 1 Apr 2014 12:07:16 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201404011207.s31C7G27057161@svn.freebsd.org> From: Alexander Motin Date: Tue, 1 Apr 2014 12:07:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r263987 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Apr 2014 12:07:16 -0000 Author: mav Date: Tue Apr 1 12:07:15 2014 New Revision: 263987 URL: http://svnweb.freebsd.org/changeset/base/263987 Log: MFC r263118: Report ZVOL block size as GEOM stripesize. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Tue Apr 1 10:36:11 2014 (r263986) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Tue Apr 1 12:07:15 2014 (r263987) @@ -925,12 +925,16 @@ zvol_open(struct g_provider *pp, int fla return (SET_ERROR(ENXIO)); } - if (zv->zv_total_opens == 0) + if (zv->zv_total_opens == 0) { err = zvol_first_open(zv); - if (err) { - if (locked) - mutex_exit(&spa_namespace_lock); - return (err); + if (err) { + if (locked) + mutex_exit(&spa_namespace_lock); + return (err); + } + pp->mediasize = zv->zv_volsize; + pp->stripeoffset = 0; + pp->stripesize = zv->zv_volblocksize; } if ((flag & FWRITE) && (zv->zv_flags & ZVOL_RDONLY)) { err = SET_ERROR(EROFS); From owner-svn-src-stable@FreeBSD.ORG Tue Apr 1 12:08:58 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF1A7A22; Tue, 1 Apr 2014 12:08:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA1FC9D2; Tue, 1 Apr 2014 12:08:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s31C8wKr057380; Tue, 1 Apr 2014 12:08:58 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s31C8wAB057379; Tue, 1 Apr 2014 12:08:58 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201404011208.s31C8wAB057379@svn.freebsd.org> From: Alexander Motin Date: Tue, 1 Apr 2014 12:08:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263988 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Apr 2014 12:08:59 -0000 Author: mav Date: Tue Apr 1 12:08:58 2014 New Revision: 263988 URL: http://svnweb.freebsd.org/changeset/base/263988 Log: MFC r263118: Report ZVOL block size as GEOM stripesize. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Tue Apr 1 12:07:15 2014 (r263987) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Tue Apr 1 12:08:58 2014 (r263988) @@ -931,12 +931,16 @@ zvol_open(struct g_provider *pp, int fla return (SET_ERROR(ENXIO)); } - if (zv->zv_total_opens == 0) + if (zv->zv_total_opens == 0) { err = zvol_first_open(zv); - if (err) { - if (locked) - mutex_exit(&spa_namespace_lock); - return (err); + if (err) { + if (locked) + mutex_exit(&spa_namespace_lock); + return (err); + } + pp->mediasize = zv->zv_volsize; + pp->stripeoffset = 0; + pp->stripesize = zv->zv_volblocksize; } if ((flag & FWRITE) && (zv->zv_flags & ZVOL_RDONLY)) { err = SET_ERROR(EROFS); From owner-svn-src-stable@FreeBSD.ORG Tue Apr 1 14:48:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4FBA1B9A; Tue, 1 Apr 2014 14:48:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B3FEC94; Tue, 1 Apr 2014 14:48:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s31EmBOj023948; Tue, 1 Apr 2014 14:48:11 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s31EmBpZ023946; Tue, 1 Apr 2014 14:48:11 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404011448.s31EmBpZ023946@svn.freebsd.org> From: Glen Barber Date: Tue, 1 Apr 2014 14:48:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263999 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Apr 2014 14:48:11 -0000 Author: gjb Date: Tue Apr 1 14:48:10 2014 New Revision: 263999 URL: http://svnweb.freebsd.org/changeset/base/263999 Log: Document r263970, OpenSSH update. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 1 14:46:11 2014 (r263998) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 1 14:48:10 2014 (r263999) @@ -590,6 +590,9 @@ The &man.xz.1; utility has been updated to a post-5.0.5 snapshot. + OpenSSH has + been updated to version 6.6p1. +
From owner-svn-src-stable@FreeBSD.ORG Tue Apr 1 17:57:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D0883B5; Tue, 1 Apr 2014 17:57:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E39C36CF; Tue, 1 Apr 2014 17:57:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s31Hvj4i003432; Tue, 1 Apr 2014 17:57:45 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s31Hvjm8003431; Tue, 1 Apr 2014 17:57:45 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404011757.s31Hvjm8003431@svn.freebsd.org> From: Glen Barber Date: Tue, 1 Apr 2014 17:57:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264014 - stable/9 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Apr 2014 17:57:46 -0000 Author: gjb Date: Tue Apr 1 17:57:45 2014 New Revision: 264014 URL: http://svnweb.freebsd.org/changeset/base/264014 Log: MFC r250143, r257079, r258086, r262670: r250143 (benno): Optimize SUBDIR_OVERRIDE such that SUBDIR isn't automatically defined if SUBDIR_OVERRIDE is defined. r257079: Fix build host pollution by avoiding calling 'uname -srp' to determine values for 'VERSION'. r262670 (marcel): Use ${MAKE} so that we always use the same version/implementation of make. r258086 (cperciva): Strip the -pN patch level from the VERSION string which gets encoded into CTF data. Otherwise FreeBSD Update builds think every kernel file has changed every time there's a security advisory, since the FreeBSD Update build code isn't smart enough to look inside CTF data to ignore those changes. Tested on: stable/9@r263881 Sponsored by: The FreeBSD Foundation Modified: stable/9/Makefile.inc1 (contents, props changed) Modified: stable/9/Makefile.inc1 ============================================================================== --- stable/9/Makefile.inc1 Tue Apr 1 17:35:31 2014 (r264013) +++ stable/9/Makefile.inc1 Tue Apr 1 17:57:45 2014 (r264014) @@ -62,6 +62,10 @@ TARGET_ARCH=${TARGET} # use that new version. And the new (dynamically-linked) /bin/sh # will expect to find appropriate libraries in /lib and /libexec. # +SRCDIR?= ${.CURDIR} +.if defined(SUBDIR_OVERRIDE) +SUBDIR= ${SUBDIR_OVERRIDE} +.else SUBDIR= share/info lib libexec SUBDIR+=bin .if ${MK_GAMES} != "no" @@ -100,9 +104,6 @@ SUBDIR+=etc SUBDIR+= ${_DIR} .endif .endfor - -.if defined(SUBDIR_OVERRIDE) -SUBDIR= ${SUBDIR_OVERRIDE} .endif .if defined(NOCLEAN) @@ -130,8 +131,11 @@ OSRELDATE= 0 .endif .if !defined(VERSION) -VERSION!= uname -srp -VERSION+= ${OSRELDATE} +REVISION!= ${MAKE} -C ${SRCDIR}/release -V REVISION +BRANCH!= ${MAKE} -C ${SRCDIR}/release -V BRANCH +SRCRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \ + ${SRCDIR}/sys/sys/param.h +VERSION= FreeBSD ${REVISION}-${BRANCH:C/-p[0-9]+$//} ${TARGET_ARCH} ${SRCRELDATE} .endif KNOWN_ARCHES?= amd64 arm armeb/arm i386 i386/pc98 ia64 mipsel/mips mipseb/mips mips64el/mips mips64eb/mips mipsn32el/mips mipsn32eb/mips powerpc powerpc64/powerpc sparc64 From owner-svn-src-stable@FreeBSD.ORG Wed Apr 2 06:17:58 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B9618C1A; Wed, 2 Apr 2014 06:17:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A01D5D9A; Wed, 2 Apr 2014 06:17:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s326HwXQ008998; Wed, 2 Apr 2014 06:17:58 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s326Hwx8008997; Wed, 2 Apr 2014 06:17:58 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201404020617.s326Hwx8008997@svn.freebsd.org> From: Dimitry Andric Date: Wed, 2 Apr 2014 06:17:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264032 - in stable: 10/contrib/gcclibs/libcpp 9/contrib/gcclibs/libcpp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Apr 2014 06:17:58 -0000 Author: dim Date: Wed Apr 2 06:17:57 2014 New Revision: 264032 URL: http://svnweb.freebsd.org/changeset/base/264032 Log: MFC r263775: Avoid "cc1: warning: is shorter than expected" when using GNU cpp in combination with dtrace scripts, which have "#!/usr/sbin/dtrace -Cs" shebang lines. This is because dtrace positions the file pointer after the shebang line, before passing the file to GNU cpp. To fix the warning, adjust the size downwards by the current position, after a bit of sanity checking. Suggested by: avg Modified: stable/10/contrib/gcclibs/libcpp/files.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/contrib/gcclibs/libcpp/files.c Directory Properties: stable/9/contrib/gcclibs/ (props changed) Modified: stable/10/contrib/gcclibs/libcpp/files.c ============================================================================== --- stable/10/contrib/gcclibs/libcpp/files.c Wed Apr 2 01:58:54 2014 (r264031) +++ stable/10/contrib/gcclibs/libcpp/files.c Wed Apr 2 06:17:57 2014 (r264032) @@ -546,6 +546,7 @@ static bool read_file_guts (cpp_reader *pfile, _cpp_file *file) { ssize_t size, total, count; + off_t offset; uchar *buf; bool regular; @@ -573,6 +574,21 @@ read_file_guts (cpp_reader *pfile, _cpp_ } size = file->st.st_size; + + if ((offset = lseek(file->fd, 0, SEEK_CUR)) < 0) + { + cpp_error (pfile, CPP_DL_ERROR, "%s has no current position", + file->path); + return false; + } + else if (offset > INTTYPE_MAXIMUM (ssize_t) || (ssize_t)offset > size) + { + cpp_error (pfile, CPP_DL_ERROR, "current position of %s is too large", + file->path); + return false; + } + + size -= (ssize_t)offset; } else /* 8 kilobytes is a sensible starting size. It ought to be bigger From owner-svn-src-stable@FreeBSD.ORG Wed Apr 2 06:17:58 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 604D1C19; Wed, 2 Apr 2014 06:17:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C448D99; Wed, 2 Apr 2014 06:17:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s326HwZU008992; Wed, 2 Apr 2014 06:17:58 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s326HwLU008991; Wed, 2 Apr 2014 06:17:58 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201404020617.s326HwLU008991@svn.freebsd.org> From: Dimitry Andric Date: Wed, 2 Apr 2014 06:17:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264032 - in stable: 10/contrib/gcclibs/libcpp 9/contrib/gcclibs/libcpp X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Apr 2014 06:17:58 -0000 Author: dim Date: Wed Apr 2 06:17:57 2014 New Revision: 264032 URL: http://svnweb.freebsd.org/changeset/base/264032 Log: MFC r263775: Avoid "cc1: warning: is shorter than expected" when using GNU cpp in combination with dtrace scripts, which have "#!/usr/sbin/dtrace -Cs" shebang lines. This is because dtrace positions the file pointer after the shebang line, before passing the file to GNU cpp. To fix the warning, adjust the size downwards by the current position, after a bit of sanity checking. Suggested by: avg Modified: stable/9/contrib/gcclibs/libcpp/files.c Directory Properties: stable/9/contrib/gcclibs/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/gcclibs/libcpp/files.c Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/gcclibs/libcpp/files.c ============================================================================== --- stable/9/contrib/gcclibs/libcpp/files.c Wed Apr 2 01:58:54 2014 (r264031) +++ stable/9/contrib/gcclibs/libcpp/files.c Wed Apr 2 06:17:57 2014 (r264032) @@ -546,6 +546,7 @@ static bool read_file_guts (cpp_reader *pfile, _cpp_file *file) { ssize_t size, total, count; + off_t offset; uchar *buf; bool regular; @@ -573,6 +574,21 @@ read_file_guts (cpp_reader *pfile, _cpp_ } size = file->st.st_size; + + if ((offset = lseek(file->fd, 0, SEEK_CUR)) < 0) + { + cpp_error (pfile, CPP_DL_ERROR, "%s has no current position", + file->path); + return false; + } + else if (offset > INTTYPE_MAXIMUM (ssize_t) || (ssize_t)offset > size) + { + cpp_error (pfile, CPP_DL_ERROR, "current position of %s is too large", + file->path); + return false; + } + + size -= (ssize_t)offset; } else /* 8 kilobytes is a sensible starting size. It ought to be bigger From owner-svn-src-stable@FreeBSD.ORG Wed Apr 2 17:10:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D1B6BA38; Wed, 2 Apr 2014 17:10:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4383C46; Wed, 2 Apr 2014 17:10:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s32HAI7Z076593; Wed, 2 Apr 2014 17:10:18 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s32HAH2l076588; Wed, 2 Apr 2014 17:10:17 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201404021710.s32HAH2l076588@svn.freebsd.org> From: Jaakko Heinonen Date: Wed, 2 Apr 2014 17:10:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264047 - stable/9/usr.bin/tail X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Apr 2014 17:10:18 -0000 Author: jh Date: Wed Apr 2 17:10:17 2014 New Revision: 264047 URL: http://svnweb.freebsd.org/changeset/base/264047 Log: MFC r251565: Print file names without stdio buffering to avoid mixing buffered and unbuffered ouput. PR: bin/176886 Modified: stable/9/usr.bin/tail/extern.h stable/9/usr.bin/tail/forward.c stable/9/usr.bin/tail/misc.c stable/9/usr.bin/tail/tail.c Directory Properties: stable/9/usr.bin/tail/ (props changed) Modified: stable/9/usr.bin/tail/extern.h ============================================================================== --- stable/9/usr.bin/tail/extern.h Wed Apr 2 16:53:07 2014 (r264046) +++ stable/9/usr.bin/tail/extern.h Wed Apr 2 17:10:17 2014 (r264047) @@ -67,5 +67,6 @@ void ierr(const char *); void oerr(void); int mapprint(struct mapinfo *, off_t, off_t); int maparound(struct mapinfo *, off_t); +void printfn(const char *, int); extern int Fflag, fflag, qflag, rflag, rval, no_files; Modified: stable/9/usr.bin/tail/forward.c ============================================================================== --- stable/9/usr.bin/tail/forward.c Wed Apr 2 16:53:07 2014 (r264046) +++ stable/9/usr.bin/tail/forward.c Wed Apr 2 17:10:17 2014 (r264047) @@ -243,7 +243,7 @@ show(file_info_t *file) while ((ch = getc(file->fp)) != EOF) { if (last != file && no_files > 1) { if (!qflag) - (void)printf("\n==> %s <==\n", file->file_name); + printfn(file->file_name, 1); last = file; } if (putchar(ch) == EOF) @@ -320,7 +320,7 @@ follow(file_info_t *files, enum STYLE st active = 1; n++; if (no_files > 1 && !qflag) - (void)printf("\n==> %s <==\n", file->file_name); + printfn(file->file_name, 1); forward(file->fp, file->file_name, style, off, &file->st); if (Fflag && fileno(file->fp) != STDIN_FILENO) n++; Modified: stable/9/usr.bin/tail/misc.c ============================================================================== --- stable/9/usr.bin/tail/misc.c Wed Apr 2 16:53:07 2014 (r264046) +++ stable/9/usr.bin/tail/misc.c Wed Apr 2 17:10:17 2014 (r264047) @@ -113,3 +113,17 @@ maparound(struct mapinfo *mip, off_t off return (0); } + +/* + * Print the file name without stdio buffering. + */ +void +printfn(const char *fn, int print_nl) +{ + + if (print_nl) + WR("\n", 1); + WR("==> ", 4); + WR(fn, strlen(fn)); + WR(" <==\n", 5); +} Modified: stable/9/usr.bin/tail/tail.c ============================================================================== --- stable/9/usr.bin/tail/tail.c Wed Apr 2 16:53:07 2014 (r264046) +++ stable/9/usr.bin/tail/tail.c Wed Apr 2 17:10:17 2014 (r264047) @@ -203,10 +203,8 @@ main(int argc, char *argv[]) continue; } if (argc > 1 && !qflag) { - (void)printf("%s==> %s <==\n", - first ? "" : "\n", fn); + printfn(fn, !first); first = 0; - (void)fflush(stdout); } if (rflag) From owner-svn-src-stable@FreeBSD.ORG Thu Apr 3 01:00:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2185B9F9; Thu, 3 Apr 2014 01:00:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DC54135; Thu, 3 Apr 2014 01:00:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3310pBK074069; Thu, 3 Apr 2014 01:00:51 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3310pSV074068; Thu, 3 Apr 2014 01:00:51 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201404030100.s3310pSV074068@svn.freebsd.org> From: Xin LI Date: Thu, 3 Apr 2014 01:00:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264060 - stable/10/cddl/contrib/opensolaris/cmd/zpool X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Apr 2014 01:00:52 -0000 Author: delphij Date: Thu Apr 3 01:00:51 2014 New Revision: 264060 URL: http://svnweb.freebsd.org/changeset/base/264060 Log: MFC r263385: Remove unused option -r from zpool. Submitted by: Richard Yao Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Thu Apr 3 00:55:16 2014 (r264059) +++ stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Thu Apr 3 01:00:51 2014 (r264060) @@ -1969,7 +1969,7 @@ zpool_do_import(int argc, char **argv) char *endptr; /* check options */ - while ((c = getopt(argc, argv, ":aCc:d:DEfFmnNo:rR:T:VX")) != -1) { + while ((c = getopt(argc, argv, ":aCc:d:DEfFmnNo:R:T:VX")) != -1) { switch (c) { case 'a': do_all = B_TRUE; From owner-svn-src-stable@FreeBSD.ORG Thu Apr 3 01:02:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC97BB2C; Thu, 3 Apr 2014 01:02:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A90241AF; Thu, 3 Apr 2014 01:02:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3312ExU074626; Thu, 3 Apr 2014 01:02:14 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3312EnM074625; Thu, 3 Apr 2014 01:02:14 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201404030102.s3312EnM074625@svn.freebsd.org> From: Xin LI Date: Thu, 3 Apr 2014 01:02:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264061 - stable/9/cddl/contrib/opensolaris/cmd/zpool X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Apr 2014 01:02:14 -0000 Author: delphij Date: Thu Apr 3 01:02:14 2014 New Revision: 264061 URL: http://svnweb.freebsd.org/changeset/base/264061 Log: MFC r263385: Remove unused option -r from zpool. Submitted by: Richard Yao Modified: stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Directory Properties: stable/9/cddl/contrib/opensolaris/cmd/zpool/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Thu Apr 3 01:00:51 2014 (r264060) +++ stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Thu Apr 3 01:02:14 2014 (r264061) @@ -1961,7 +1961,7 @@ zpool_do_import(int argc, char **argv) char *endptr; /* check options */ - while ((c = getopt(argc, argv, ":aCc:d:DEfFmnNo:rR:T:VX")) != -1) { + while ((c = getopt(argc, argv, ":aCc:d:DEfFmnNo:R:T:VX")) != -1) { switch (c) { case 'a': do_all = B_TRUE; From owner-svn-src-stable@FreeBSD.ORG Thu Apr 3 11:59:04 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E605149C; Thu, 3 Apr 2014 11:59:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D244E260; Thu, 3 Apr 2014 11:59:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s33Bx4jo055564; Thu, 3 Apr 2014 11:59:04 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s33Bx4pg055563; Thu, 3 Apr 2014 11:59:04 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201404031159.s33Bx4pg055563@svn.freebsd.org> From: Aleksandr Rybalko Date: Thu, 3 Apr 2014 11:59:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264071 - stable/10/sys/dev/vt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Apr 2014 11:59:05 -0000 Author: ray Date: Thu Apr 3 11:59:04 2014 New Revision: 264071 URL: http://svnweb.freebsd.org/changeset/base/264071 Log: MFC r263809 Fix crash on resume in vt(9). Statically allocated terminal window have not initialized callout handler, so we have to initialize it even for existing window if it is console window. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/vt_core.c Modified: stable/10/sys/dev/vt/vt_core.c ============================================================================== --- stable/10/sys/dev/vt/vt_core.c Thu Apr 3 08:16:45 2014 (r264070) +++ stable/10/sys/dev/vt/vt_core.c Thu Apr 3 11:59:04 2014 (r264071) @@ -1872,6 +1872,9 @@ vt_upgrade(struct vt_device *vd) if (vw == NULL) { /* New window. */ vw = vt_allocate_window(vd, i); + } else if (vw->vw_flags & VWF_CONSOLE) { + /* For existing console window. */ + callout_init(&vw->vw_proc_dead_timer, 0); } if (i == VT_CONSWINDOW) { /* Console window. */ From owner-svn-src-stable@FreeBSD.ORG Thu Apr 3 12:03:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A813F899; Thu, 3 Apr 2014 12:03:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 94604329; Thu, 3 Apr 2014 12:03:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s33C3Uht059098; Thu, 3 Apr 2014 12:03:30 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s33C3UEo059097; Thu, 3 Apr 2014 12:03:30 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201404031203.s33C3UEo059097@svn.freebsd.org> From: Aleksandr Rybalko Date: Thu, 3 Apr 2014 12:03:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264072 - stable/9/sys/dev/vt X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Apr 2014 12:03:30 -0000 Author: ray Date: Thu Apr 3 12:03:30 2014 New Revision: 264072 URL: http://svnweb.freebsd.org/changeset/base/264072 Log: MFC r263809 Fix crash on resume in vt(9). Statically allocated terminal window have not initialized callout handler, so we have to initialize it even for existing window if it is console window. Sponsored by: The FreeBSD Foundation Modified: stable/9/sys/dev/vt/vt_core.c Modified: stable/9/sys/dev/vt/vt_core.c ============================================================================== --- stable/9/sys/dev/vt/vt_core.c Thu Apr 3 11:59:04 2014 (r264071) +++ stable/9/sys/dev/vt/vt_core.c Thu Apr 3 12:03:30 2014 (r264072) @@ -1872,6 +1872,9 @@ vt_upgrade(struct vt_device *vd) if (vw == NULL) { /* New window. */ vw = vt_allocate_window(vd, i); + } else if (vw->vw_flags & VWF_CONSOLE) { + /* For existing console window. */ + callout_init(&vw->vw_proc_dead_timer, 0); } if (i == VT_CONSWINDOW) { /* Console window. */ From owner-svn-src-stable@FreeBSD.ORG Thu Apr 3 14:13:58 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7257D356; Thu, 3 Apr 2014 14:13:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DE37178; Thu, 3 Apr 2014 14:13:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s33EDwrh013113; Thu, 3 Apr 2014 14:13:58 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s33EDw2L013112; Thu, 3 Apr 2014 14:13:58 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404031413.s33EDw2L013112@svn.freebsd.org> From: Glen Barber Date: Thu, 3 Apr 2014 14:13:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264074 - stable/10/release/doc/en_US.ISO8859-1/errata X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Apr 2014 14:13:58 -0000 Author: gjb Date: Thu Apr 3 14:13:57 2014 New Revision: 264074 URL: http://svnweb.freebsd.org/changeset/base/264074 Log: Document that the FreeBSD/i386 instability with vfs.unmapped_buf_allowed=1 may be present on VMs running on hypervisors other than VirtualBox. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Thu Apr 3 12:04:05 2014 (r264073) +++ stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Thu Apr 3 14:13:57 2014 (r264074) @@ -167,6 +167,10 @@ boot It disables unmapped I/O at every boot:
vfs.unmapped_buf_allowed=0 + + [2014-04-03 update] It has been reported that + instability may be present on virtual machines running + on other hypervisors, such as Xen or KVM. From owner-svn-src-stable@FreeBSD.ORG Thu Apr 3 14:47:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 863B2177; Thu, 3 Apr 2014 14:47:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 722C06D2; Thu, 3 Apr 2014 14:47:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s33Elbo7027318; Thu, 3 Apr 2014 14:47:37 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s33Elbtd027317; Thu, 3 Apr 2014 14:47:37 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201404031447.s33Elbtd027317@svn.freebsd.org> From: Bryan Drewery Date: Thu, 3 Apr 2014 14:47:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264075 - stable/10/share/man/man7 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Apr 2014 14:47:37 -0000 Author: bdrewery Date: Thu Apr 3 14:47:36 2014 New Revision: 264075 URL: http://svnweb.freebsd.org/changeset/base/264075 Log: MFC r263812: Update build(7) with LOCAL_* vars Modified: stable/10/share/man/man7/build.7 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man7/build.7 ============================================================================== --- stable/10/share/man/man7/build.7 Thu Apr 3 14:13:57 2014 (r264074) +++ stable/10/share/man/man7/build.7 Thu Apr 3 14:47:36 2014 (r264075) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 10, 2012 +.Dd March 27, 2014 .Dt BUILD 7 .Os .Sh NAME @@ -411,8 +411,25 @@ then is set to the value of .Va KERNFAST . .It Va LOCAL_DIRS -If set, this variable supplies a list of additional directories to -build, relative to the root of the source tree. +If set, this variable supplies a list of additional directories relative to +the root of the source tree to build as part of the +.Cm everything +target. +.It Va LOCAL_LIB_DIRS +If set, this variable supplies a list of additional directories relative to +the root of the source tree to build as part of the +.Cm libraries +target. +.It Va LOCAL_MTREE +If set, this variable supplies a list of additional mtrees relative to the +root of the source tree to use as part of the +.Cm hierarchy +target. +.It Va LOCAL_TOOL_DIRS +If set, this variable supplies a list of additional directories relative to +the root of the source tree to build as part of the +.Cm build-tools +target. .It Va PORTS_MODULES A list of ports with kernel modules that should be built and installed as part of the From owner-svn-src-stable@FreeBSD.ORG Thu Apr 3 14:58:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89BB766B; Thu, 3 Apr 2014 14:58:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7561A826; Thu, 3 Apr 2014 14:58:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s33Ewr49031778; Thu, 3 Apr 2014 14:58:53 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s33Ewq90031775; Thu, 3 Apr 2014 14:58:52 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201404031458.s33Ewq90031775@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 3 Apr 2014 14:58:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264076 - in stable/10: sys/net usr.bin/netstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Apr 2014 14:58:53 -0000 Author: glebius Date: Thu Apr 3 14:58:52 2014 New Revision: 264076 URL: http://svnweb.freebsd.org/changeset/base/264076 Log: o Provide a compatibility shim for netstat(1) to obtain output queue drops via NET_RT_IFLISTL sysctl. The sysctl handler appends oqdrops at the end of struct if_msghdrl, and netstat(1) sees that as an additional field of struct if_data. This allows us to fetch the data keeping ABI and API compatibility. This is direct commit to stable/10. o Merge r263331 from head, to restore printing of queue drops. Sponsored by: Nginx, Inc. Sponsored by: Netflix Modified: stable/10/sys/net/if.h stable/10/sys/net/rtsock.c stable/10/usr.bin/netstat/if.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/if.h ============================================================================== --- stable/10/sys/net/if.h Thu Apr 3 14:47:36 2014 (r264075) +++ stable/10/sys/net/if.h Thu Apr 3 14:58:52 2014 (r264076) @@ -106,6 +106,9 @@ struct if_data { uint64_t ifi_hwassist; /* HW offload capabilities, see IFCAP */ time_t ifi_epoch; /* uptime at attach or stat reset */ struct timeval ifi_lastchange; /* time of last administrative change */ +#ifdef _IFI_OQDROPS + u_long ifi_oqdrops; /* dropped on output */ +#endif }; /*- @@ -283,6 +286,9 @@ struct if_msghdrl { u_short ifm_len; /* length of if_msghdrl incl. if_data */ u_short ifm_data_off; /* offset of if_data from beginning */ struct if_data ifm_data;/* statistics and other data about if */ +#ifdef _IN_NET_RTSOCK_C + u_long ifi_oqdrops; +#endif }; /* Modified: stable/10/sys/net/rtsock.c ============================================================================== --- stable/10/sys/net/rtsock.c Thu Apr 3 14:47:36 2014 (r264075) +++ stable/10/sys/net/rtsock.c Thu Apr 3 14:58:52 2014 (r264076) @@ -52,6 +52,7 @@ #include #include +#define _IN_NET_RTSOCK_C #include #include #include @@ -105,6 +106,7 @@ struct if_data32 { uint32_t ifi_hwassist; int32_t ifi_epoch; struct timeval32 ifi_lastchange; + uint32_t ifi_oqdrops; }; struct if_msghdr32 { @@ -1662,6 +1664,7 @@ sysctl_iflist_ifml(struct ifnet *ifp, st if (carp_get_vhid_p != NULL) ifm32->ifm_data.ifi_vhid = (*carp_get_vhid_p)(ifp->if_addr); + ifm32->ifm_data.ifi_oqdrops = ifp->if_snd.ifq_drops; return (SYSCTL_OUT(w->w_req, (caddr_t)ifm32, len)); } @@ -1679,6 +1682,9 @@ sysctl_iflist_ifml(struct ifnet *ifp, st if (carp_get_vhid_p != NULL) ifm->ifm_data.ifi_vhid = (*carp_get_vhid_p)(ifp->if_addr); + ifm->ifm_data.ifi_datalen += sizeof(u_long); + ifm->ifi_oqdrops = ifp->if_snd.ifq_drops; + return (SYSCTL_OUT(w->w_req, (caddr_t)ifm, len)); } Modified: stable/10/usr.bin/netstat/if.c ============================================================================== --- stable/10/usr.bin/netstat/if.c Thu Apr 3 14:47:36 2014 (r264075) +++ stable/10/usr.bin/netstat/if.c Thu Apr 3 14:58:52 2014 (r264076) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include +#define _IFI_OQDROPS #include #include #include @@ -251,7 +252,7 @@ intpr(int interval, void (*pfunc)(char * printf(" %10.10s","Obytes"); printf(" %5s", "Coll"); if (dflag) - printf(" %s", "Drop"); + printf(" %s", "Drop"); putchar('\n'); } @@ -382,7 +383,8 @@ intpr(int interval, void (*pfunc)(char * if (bflag) show_stat("lu", 10, IFA_STAT(obytes), link|network); show_stat("NRSlu", 5, IFA_STAT(collisions), link); - /* XXXGL: output queue drops */ + if (dflag) + show_stat("LSlu", 5, IFA_STAT(oqdrops), link); putchar('\n'); if (!aflag) @@ -460,6 +462,7 @@ struct iftot { u_long ift_id; /* input drops */ u_long ift_op; /* output packets */ u_long ift_oe; /* output errors */ + u_long ift_od; /* output drops */ u_long ift_co; /* collisions */ u_long ift_ib; /* input bytes */ u_long ift_ob; /* output bytes */ @@ -495,6 +498,7 @@ fill_iftot(struct iftot *st) st->ift_ib += IFA_STAT(ibytes); st->ift_op += IFA_STAT(opackets); st->ift_oe += IFA_STAT(oerrors); + st->ift_od += IFA_STAT(oqdrops); st->ift_ob += IFA_STAT(obytes); st->ift_co += IFA_STAT(collisions); } @@ -573,7 +577,8 @@ loop: show_stat("lu", 5, new->ift_oe - old->ift_oe, 1); show_stat("lu", 10, new->ift_ob - old->ift_ob, 1); show_stat("NRSlu", 5, new->ift_co - old->ift_co, 1); - /* XXXGL: output queue drops */ + if (dflag) + show_stat("LSlu", 5, new->ift_od - old->ift_od, 1); putchar('\n'); fflush(stdout); From owner-svn-src-stable@FreeBSD.ORG Thu Apr 3 16:57:17 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 665F1430; Thu, 3 Apr 2014 16:57:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 468BE3E4; Thu, 3 Apr 2014 16:57:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s33GvHTP080987; Thu, 3 Apr 2014 16:57:17 GMT (envelope-from asomers@svn.freebsd.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s33GvG04080980; Thu, 3 Apr 2014 16:57:16 GMT (envelope-from asomers@svn.freebsd.org) Message-Id: <201404031657.s33GvG04080980@svn.freebsd.org> From: Alan Somers Date: Thu, 3 Apr 2014 16:57:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264080 - in stable/10: sys/kern sys/sys tests/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Apr 2014 16:57:17 -0000 Author: asomers Date: Thu Apr 3 16:57:16 2014 New Revision: 264080 URL: http://svnweb.freebsd.org/changeset/base/264080 Log: MFC r263116 Replace 4.4BSD Lite's unix domain socket backpressure hack with a cleaner mechanism, based on the new SB_STOP sockbuf flag. The old hack dynamically changed the sending sockbuf's high water mark whenever adding or removing data from the receiving sockbuf. It worked for stream sockets, but it never worked for SOCK_SEQPACKET sockets because of their atomic nature. If the sockbuf was partially full, it might return EMSGSIZE instead of blocking. The new solution is based on DragonFlyBSD's fix from commit 3a6117bbe0ed6a87605c1e43e12a1438d8844380 on 2008-05-27. It adds an SB_STOP flag to sockbufs. Whenever uipc_send surpasses the socket's size limit, it sets SB_STOP on the sending sockbuf. sbspace() will then return 0 for that sockbuf, causing sosend_generic and friends to block. uipc_rcvd will likewise clear SB_STOP. There are two fringe benefits: uipc_{send,rcvd} no longer need to call chgsbsize() on every send and receive because they don't change the sockbuf's high water mark. Also, uipc_sense no longer needs to acquire the UIPC linkage lock, because it's simpler to compute the st_blksizes. There is one drawback: since sbspace() will only ever return 0 or the maximum, sosend_generic will allow the sockbuf to exceed its nominal maximum size by at most one packet of size less than the max. I don't think that's a serious problem. In fact, I'm not even positive that FreeBSD guarantees a socket will always stay within its nominal size limit. sys/sys/sockbuf.h Add the SB_STOP flag and adjust sbspace() sys/sys/unpcb.h Delete the obsolete unp_cc and unp_mbcnt fields from struct unpcb. sys/kern/uipc_usrreq.c Adjust uipc_rcvd, uipc_send, and uipc_sense to use the SB_STOP backpressure mechanism. Removing obsolete unpcb fields from db_show_unpcb. tests/sys/kern/unix_seqpacket_test.c Clear expected failures from ATF. Modified: stable/10/sys/kern/uipc_usrreq.c stable/10/sys/sys/sockbuf.h stable/10/sys/sys/unpcb.h stable/10/tests/sys/kern/unix_seqpacket_test.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/uipc_usrreq.c ============================================================================== --- stable/10/sys/kern/uipc_usrreq.c Thu Apr 3 16:24:49 2014 (r264079) +++ stable/10/sys/kern/uipc_usrreq.c Thu Apr 3 16:57:16 2014 (r264080) @@ -51,7 +51,6 @@ * * TODO: * RDM - * distinguish datagram size limits from flow control limits in SEQPACKET * rethink name space problems * need a proper out-of-band */ @@ -789,7 +788,6 @@ uipc_rcvd(struct socket *so, int flags) struct unpcb *unp, *unp2; struct socket *so2; u_int mbcnt, sbcc; - u_long newhiwat; unp = sotounpcb(so); KASSERT(unp != NULL, ("uipc_rcvd: unp == NULL")); @@ -811,6 +809,15 @@ uipc_rcvd(struct socket *so, int flags) mbcnt = so->so_rcv.sb_mbcnt; sbcc = so->so_rcv.sb_cc; SOCKBUF_UNLOCK(&so->so_rcv); + /* + * There is a benign race condition at this point. If we're planning to + * clear SB_STOP, but uipc_send is called on the connected socket at + * this instant, it might add data to the sockbuf and set SB_STOP. Then + * we would erroneously clear SB_STOP below, even though the sockbuf is + * full. The race is benign because the only ill effect is to allow the + * sockbuf to exceed its size limit, and the size limits are not + * strictly guaranteed anyway. + */ UNP_PCB_LOCK(unp); unp2 = unp->unp_conn; if (unp2 == NULL) { @@ -819,13 +826,9 @@ uipc_rcvd(struct socket *so, int flags) } so2 = unp2->unp_socket; SOCKBUF_LOCK(&so2->so_snd); - so2->so_snd.sb_mbmax += unp->unp_mbcnt - mbcnt; - newhiwat = so2->so_snd.sb_hiwat + unp->unp_cc - sbcc; - (void)chgsbsize(so2->so_cred->cr_uidinfo, &so2->so_snd.sb_hiwat, - newhiwat, RLIM_INFINITY); + if (sbcc < so2->so_snd.sb_hiwat && mbcnt < so2->so_snd.sb_mbmax) + so2->so_snd.sb_flags &= ~SB_STOP; sowwakeup_locked(so2); - unp->unp_mbcnt = mbcnt; - unp->unp_cc = sbcc; UNP_PCB_UNLOCK(unp); return (0); } @@ -836,8 +839,7 @@ uipc_send(struct socket *so, int flags, { struct unpcb *unp, *unp2; struct socket *so2; - u_int mbcnt_delta, sbcc; - u_int newhiwat; + u_int mbcnt, sbcc; int error = 0; unp = sotounpcb(so); @@ -991,27 +993,21 @@ uipc_send(struct socket *so, int flags, } } - /* - * XXXRW: While fine for SOCK_STREAM, this conflates maximum - * datagram size and back-pressure for SOCK_SEQPACKET, which - * can lead to undesired return of EMSGSIZE on send instead - * of more desirable blocking. - */ - mbcnt_delta = so2->so_rcv.sb_mbcnt - unp2->unp_mbcnt; - unp2->unp_mbcnt = so2->so_rcv.sb_mbcnt; + mbcnt = so2->so_rcv.sb_mbcnt; sbcc = so2->so_rcv.sb_cc; sorwakeup_locked(so2); + /* + * The PCB lock on unp2 protects the SB_STOP flag. Without it, + * it would be possible for uipc_rcvd to be called at this + * point, drain the receiving sockbuf, clear SB_STOP, and then + * we would set SB_STOP below. That could lead to an empty + * sockbuf having SB_STOP set + */ SOCKBUF_LOCK(&so->so_snd); - if ((int)so->so_snd.sb_hiwat >= (int)(sbcc - unp2->unp_cc)) - newhiwat = so->so_snd.sb_hiwat - (sbcc - unp2->unp_cc); - else - newhiwat = 0; - (void)chgsbsize(so->so_cred->cr_uidinfo, &so->so_snd.sb_hiwat, - newhiwat, RLIM_INFINITY); - so->so_snd.sb_mbmax -= mbcnt_delta; + if (sbcc >= so->so_snd.sb_hiwat || mbcnt >= so->so_snd.sb_mbmax) + so->so_snd.sb_flags |= SB_STOP; SOCKBUF_UNLOCK(&so->so_snd); - unp2->unp_cc = sbcc; UNP_PCB_UNLOCK(unp2); m = NULL; break; @@ -1049,27 +1045,18 @@ release: static int uipc_sense(struct socket *so, struct stat *sb) { - struct unpcb *unp, *unp2; - struct socket *so2; + struct unpcb *unp; unp = sotounpcb(so); KASSERT(unp != NULL, ("uipc_sense: unp == NULL")); sb->st_blksize = so->so_snd.sb_hiwat; - UNP_LINK_RLOCK(); UNP_PCB_LOCK(unp); - unp2 = unp->unp_conn; - if ((so->so_type == SOCK_STREAM || so->so_type == SOCK_SEQPACKET) && - unp2 != NULL) { - so2 = unp2->unp_socket; - sb->st_blksize += so2->so_rcv.sb_cc; - } sb->st_dev = NODEV; if (unp->unp_ino == 0) unp->unp_ino = (++unp_ino == 0) ? ++unp_ino : unp_ino; sb->st_ino = unp->unp_ino; UNP_PCB_UNLOCK(unp); - UNP_LINK_RUNLOCK(); return (0); } @@ -2497,8 +2484,7 @@ DB_SHOW_COMMAND(unpcb, db_show_unpcb) /* XXXRW: Would be nice to print the full address, if any. */ db_printf("unp_addr: %p\n", unp->unp_addr); - db_printf("unp_cc: %d unp_mbcnt: %d unp_gencnt: %llu\n", - unp->unp_cc, unp->unp_mbcnt, + db_printf("unp_gencnt: %llu\n", (unsigned long long)unp->unp_gencnt); db_printf("unp_flags: %x (", unp->unp_flags); Modified: stable/10/sys/sys/sockbuf.h ============================================================================== --- stable/10/sys/sys/sockbuf.h Thu Apr 3 16:24:49 2014 (r264079) +++ stable/10/sys/sys/sockbuf.h Thu Apr 3 16:57:16 2014 (r264080) @@ -52,6 +52,7 @@ #define SB_NOCOALESCE 0x200 /* don't coalesce new data into existing mbufs */ #define SB_IN_TOE 0x400 /* socket buffer is in the middle of an operation */ #define SB_AUTOSIZE 0x800 /* automatically size socket buffer */ +#define SB_STOP 0x1000 /* backpressure indicator */ #define SBS_CANTSENDMORE 0x0010 /* can't send more data to peer */ #define SBS_CANTRCVMORE 0x0020 /* can't receive more data from peer */ @@ -168,9 +169,19 @@ void sbunlock(struct sockbuf *sb); * still be negative (cc > hiwat or mbcnt > mbmax). Should detect * overflow and return 0. Should use "lmin" but it doesn't exist now. */ -#define sbspace(sb) \ - ((long) imin((int)((sb)->sb_hiwat - (sb)->sb_cc), \ - (int)((sb)->sb_mbmax - (sb)->sb_mbcnt))) +static __inline +long +sbspace(struct sockbuf *sb) +{ + long bleft; + long mleft; + + if (sb->sb_flags & SB_STOP) + return(0); + bleft = sb->sb_hiwat - sb->sb_cc; + mleft = sb->sb_mbmax - sb->sb_mbcnt; + return((bleft < mleft) ? bleft : mleft); +} /* adjust counters in sb reflecting allocation of m */ #define sballoc(sb, m) { \ Modified: stable/10/sys/sys/unpcb.h ============================================================================== --- stable/10/sys/sys/unpcb.h Thu Apr 3 16:24:49 2014 (r264079) +++ stable/10/sys/sys/unpcb.h Thu Apr 3 16:57:16 2014 (r264080) @@ -74,8 +74,8 @@ struct unpcb { struct unp_head unp_refs; /* referencing socket linked list */ LIST_ENTRY(unpcb) unp_reflink; /* link in unp_refs list */ struct sockaddr_un *unp_addr; /* bound address of socket */ - int unp_cc; /* copy of rcv.sb_cc */ - int unp_mbcnt; /* copy of rcv.sb_mbcnt */ + int reserved1; + int reserved2; unp_gen_t unp_gencnt; /* generation count of this instance */ short unp_flags; /* flags */ short unp_gcflag; /* Garbage collector flags. */ Modified: stable/10/tests/sys/kern/unix_seqpacket_test.c ============================================================================== --- stable/10/tests/sys/kern/unix_seqpacket_test.c Thu Apr 3 16:24:49 2014 (r264079) +++ stable/10/tests/sys/kern/unix_seqpacket_test.c Thu Apr 3 16:57:16 2014 (r264080) @@ -844,25 +844,21 @@ ATF_TC_BODY(emsgsize_nonblocking, tc) ATF_TC_WITHOUT_HEAD(eagain_8k_8k); ATF_TC_BODY(eagain_8k_8k, tc) { - atf_tc_expect_fail("PR kern/185812 send(2) on a UNIX domain SEQPACKET socket returns EMSGSIZE instead of EAGAIN"); test_eagain(8192, 8192); } ATF_TC_WITHOUT_HEAD(eagain_8k_128k); ATF_TC_BODY(eagain_8k_128k, tc) { - atf_tc_expect_fail("PR kern/185812 send(2) on a UNIX domain SEQPACKET socket returns EMSGSIZE instead of EAGAIN"); test_eagain(8192, 131072); } ATF_TC_WITHOUT_HEAD(eagain_128k_8k); ATF_TC_BODY(eagain_128k_8k, tc) { - atf_tc_expect_fail("PR kern/185812 send(2) on a UNIX domain SEQPACKET socket returns EMSGSIZE instead of EAGAIN"); test_eagain(131072, 8192); } ATF_TC_WITHOUT_HEAD(eagain_128k_128k); ATF_TC_BODY(eagain_128k_128k, tc) { - atf_tc_expect_fail("PR kern/185812 send(2) on a UNIX domain SEQPACKET socket returns EMSGSIZE instead of EAGAIN"); test_eagain(131072, 131072); } @@ -969,37 +965,24 @@ ATF_TC_BODY(pipe_simulator_128k_128k, tc ATF_TC_WITHOUT_HEAD(pipe_8k_8k); ATF_TC_BODY(pipe_8k_8k, tc) { - atf_tc_expect_fail("PR kern/185812 send(2) on a UNIX domain SEQPACKET socket returns EMSGSIZE instead of EAGAIN"); test_pipe(8192, 8192); } ATF_TC_WITHOUT_HEAD(pipe_8k_128k); ATF_TC_BODY(pipe_8k_128k, tc) { - atf_tc_expect_fail("PR kern/185812 send(2) on a UNIX domain SEQPACKET socket returns EMSGSIZE instead of EAGAIN"); test_pipe(8192, 131072); } ATF_TC_WITHOUT_HEAD(pipe_128k_8k); ATF_TC_BODY(pipe_128k_8k, tc) { - /* - * kern/185812 causes this test case to both fail and timeout. The - * atf-c-api(3) doesn't have a way to set such an expectation. - * If you use atf_tc_expect_fail, then it will timeout. If you use - * atf_tc_expect_timeout, then it will fail. If you use both, then it - * will show up as an unexpected pass, which is much worse - * - * https://code.google.com/p/kyua/issues/detail?id=76 - */ - atf_tc_expect_fail("PR kern/185812 send(2) on a UNIX domain SEQPACKET socket returns EMSGSIZE instead of EAGAIN"); test_pipe(131072, 8192); } ATF_TC_WITHOUT_HEAD(pipe_128k_128k); ATF_TC_BODY(pipe_128k_128k, tc) { - atf_tc_expect_fail("PR kern/185812 send(2) on a UNIX domain SEQPACKET socket returns EMSGSIZE instead of EAGAIN"); test_pipe(131072, 131072); } From owner-svn-src-stable@FreeBSD.ORG Thu Apr 3 17:26:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B327F2B; Thu, 3 Apr 2014 17:26:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEA2A90A; Thu, 3 Apr 2014 17:26:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s33HQjVR093269; Thu, 3 Apr 2014 17:26:45 GMT (envelope-from asomers@svn.freebsd.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s33HQjGQ093268; Thu, 3 Apr 2014 17:26:45 GMT (envelope-from asomers@svn.freebsd.org) Message-Id: <201404031726.s33HQjGQ093268@svn.freebsd.org> From: Alan Somers Date: Thu, 3 Apr 2014 17:26:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264081 - stable/10/share/man/man7 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Apr 2014 17:26:46 -0000 Author: asomers Date: Thu Apr 3 17:26:45 2014 New Revision: 264081 URL: http://svnweb.freebsd.org/changeset/base/264081 Log: MFC r263428 share/man/man7/tests.7 Added a section on test suite configuration, and cleaned up up grammar errors and awkward prose. The config variables were discussed on freebsd-testing. Modified: stable/10/share/man/man7/tests.7 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man7/tests.7 ============================================================================== --- stable/10/share/man/man7/tests.7 Thu Apr 3 16:57:16 2014 (r264080) +++ stable/10/share/man/man7/tests.7 Thu Apr 3 17:26:45 2014 (r264081) @@ -26,7 +26,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 19, 2013 +.Dd March 20, 2014 .Dt TESTS 7 .Os .Sh NAME @@ -36,30 +36,29 @@ The .Fx test suite provides a collection of automated tests for two major purposes. -On the one hand, the test suite aids +On one hand, the test suite aids .Em developers -in catching bugs and regressions in the code when they performing modifications -to the source tree. -On the other hand, the test suite allows +to detect bugs and regressions when they modify the source tree. On the other +hand, it allows .Em end users (and, in particular, system administrators) to verify that fresh installations of the .Fx -operating system behave correctly in their hardware platform and also to ensure -that the system does not suffer from regressions during regular system -operation and maintenance. +operating system behave correctly on their hardware platform and also to ensure +that the system does not suffer from regressions during regular operation and +maintenance. .Pp The .Fx -test suite is installed under the +test suite is installed in the .Pa /usr/tests hierarchy. .Pp -This manual page describes how to execute the test suite and how to configure +This manual page describes how to run the test suite and how to configure some of its optional features. .Ss When to run the tests? Before diving into the details of how to run the test suite, here are some -scenarios in which you should be running them: +scenarios in which you should run it: .Bl -bullet -offset indent .It After a fresh installation of @@ -72,8 +71,7 @@ to a different version to ensure that th hardware platform and that the upgrade did not introduce regressions in your configuration. .It -After performing changes to the source tree to catch any bugs and/or regressions -introduced by the modifications. +After modifying the source tree to detect any new bugs and/or regressions. .It Periodically, maybe from a .Xr cron 8 @@ -82,18 +80,18 @@ third-party packages or manual modificat introduce unexpected failures. .El .Ss Running the tests -First of all, you will need to install the -.Sq ports/devel/kyua -package. -.Pp -Use the following command to run the whole test suite: +First, you will need to install the +.Sq devel/kyua +package from +.Xr ports 7 . +Then use the following command to run the whole test suite: .Bd -literal -offset indent $ kyua test -k /usr/tests/Kyuafile .Ed .Pp -The above will go through all test programs in +The above will iterate through all test programs in .Pa /usr/tests -recursively, execute them, store their results and debugging data in Kyua +recursively, execute them, store their results and debugging data in Kyua's database (by default in .Pa ~/.kyua/store.db ) , and print a summary of the results. @@ -111,15 +109,15 @@ utilities: $ kyua test -k /usr/tests/Kyuafile bin/cp usr.bin/cut .Ed .Ss Obtaining reports of the tests execution -Additional information of the results of the execution can be later extracted -from the database by using the various reporting commands of Kyua. -For example, the following would extract a plain-text report of the executed +Additional information about the test results can be retrieved +by using Kyua's various reporting commands. +For example, the following would print a plain-text report of the executed tests and show which ones failed: .Bd -literal -offset indent $ kyua report .Ed .Pp -This other example would generate an HTML report ready to be published on a +This example would generate an HTML report ready to be published on a web server: .Bd -literal -offset indent $ kyua report-html --output ~/public_html/tests @@ -128,30 +126,47 @@ $ kyua report-html --output ~/public_htm For further details on the command-line interface of Kyua, please refer to its manual page .Xr kyua 1 . -.\".Ss Configuring the tests -.\"Some test cases in the -.\".Fx -.\"test suite require the administrator to manually set up some configuration -.\"properties before they can run. -.\"Unless these properties are defined, the tests that require them will be marked -.\"as skipped and thus they will not be really executed. -.\".Pp -.\"Test suites are configured by defining the values to their configuration -.\"variables in -.\".Pa /usr/local/etc/kyua/kyua.conf . -.\"The format of this file is detailed in -.\".Xr kyua.conf 5 . -.\".Pp -.\"The following configuration variables are available in the -.\".Fx -.\"test suite: -.\".Bl -tag -.\".It NONE REGISTERED YET -.\"TBD. +.Ss Configuring the tests +Some test cases in the +.Fx +test suite require manual configuration by the administrator before they can be +run. Unless certain properties are defined, the tests that require them will +be skipped. +.Pp +Test suites are configured by defining their configuration +variables in +.Pa /usr/local/etc/kyua/kyua.conf . +The format of this file is detailed in +.Xr kyua.conf 5 . +.Pp +The following configuration variables are available in the +.Fx +test suite: +.Bl -tag -width "allow_sysctl_side_effects" +.It allow_devfs_side_effects +If defined, enables tests that may destroy and recreate semipermanent device +nodes, like disk devices. Without this variable, tests may still create and +destroy devices nodes that are normally transient, like /dev/tap* and +/dev/pts*, as long as they clean them up afterwards. However, tests that +require this variable have a relaxed cleanup requirement; they must recreate +any devices that they destroyed, but not necessarily with the same devnames. +.It allow_sysctl_side_effects +Enables tests that change globally significant +.Xr sysctl 8 +variables. The tests will undo any changes in their cleanup phases. +.It disks +Must be set to a space delimited list of disk device nodes. Tests that need +destructive access to disks must use these devices. Tests are not required to +preserve any data present on these disks. +.It fibs +Must be set to a space delimited list of FIBs (routing tables). Tests that +need to modify a routing table may use any of these. Tests will cleanup any +new routes that they create. +.El .Ss What to do if something fails? If there is .Em any failure -during the execution of the test suite, please considering reporting it to the +during the execution of the test suite, please consider reporting it to the .Fx developers so that the failure can be analyzed and fixed. To do so, either send a message to the appropriate mailing list or file a @@ -173,7 +188,7 @@ User-specific configuration file for .Xr kyua 1 ; overrides the system file. .It Pa ~/.kyua/store.db -Default database used by Kyua to maintain the data of the executed tests. +Default result database used by Kyua. .It Pa /usr/tests/ Location of the .Fx @@ -184,9 +199,7 @@ Top-level test suite definition file. .Sh SEE ALSO .Xr kyua 1 . .Sh HISTORY -The collection of test programs in -.Pa /usr/tests -first appeared in +This test suite first appeared in .Fx 11.0 . .Pp The From owner-svn-src-stable@FreeBSD.ORG Fri Apr 4 07:34:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 25B8CC99; Fri, 4 Apr 2014 07:34:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 107A28EA; Fri, 4 Apr 2014 07:34:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s347YmhP053320; Fri, 4 Apr 2014 07:34:48 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s347Yl1j053311; Fri, 4 Apr 2014 07:34:47 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404040734.s347Yl1j053311@svn.freebsd.org> From: Glen Barber Date: Fri, 4 Apr 2014 07:34:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264106 - in stable/10: release release/arm release/tools release/tools/arm share/man/man7 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Apr 2014 07:34:49 -0000 Author: gjb Date: Fri Apr 4 07:34:46 2014 New Revision: 264106 URL: http://svnweb.freebsd.org/changeset/base/264106 Log: MFC r262810, r262862, r264105: r262810: Merge enabling building FreeBSD/arm images as part of the release build process. r262862: Provide backwards-compatibility with release.conf SVNROOT entries that do not have a trailing '/'. r264105: Add ZEDBOARD support for release builds. * Local modifications: - Set SRCBRANCH from head/ to stable/10/. - Strip svn:merginfo from ^/projects/release-embedded to avoid pollution. Sponsored by: The FreeBSD Foundation Added: stable/10/release/arm/ - copied from r262810, head/release/arm/ stable/10/release/arm/ZEDBOARD.conf - copied, changed from r264105, head/release/arm/ZEDBOARD.conf stable/10/release/tools/ - copied from r262810, head/release/tools/ stable/10/release/tools/arm/crochet-ZEDBOARD.conf - copied unchanged from r264105, head/release/tools/arm/crochet-ZEDBOARD.conf Modified: stable/10/release/arm/BEAGLEBONE.conf stable/10/release/arm/PANDABOARD.conf stable/10/release/arm/RPI-B.conf stable/10/release/arm/WANDBOARD-QUAD.conf stable/10/release/release.conf.sample stable/10/release/release.sh stable/10/share/man/man7/release.7 Directory Properties: stable/10/ (props changed) Modified: stable/10/release/arm/BEAGLEBONE.conf ============================================================================== --- head/release/arm/BEAGLEBONE.conf Wed Mar 5 23:17:53 2014 (r262810) +++ stable/10/release/arm/BEAGLEBONE.conf Fri Apr 4 07:34:46 2014 (r264106) @@ -14,7 +14,7 @@ fi TARGET="amd64" TARGET_ARCH="amd64" SVNROOT="svn://svn.FreeBSD.org/" -SRCBRANCH="base/head@rHEAD" +SRCBRANCH="base/stable/10@rHEAD" DOCBRANCH="doc/head@rHEAD" PORTBRANCH="ports/head@rHEAD" NODOC=yes Modified: stable/10/release/arm/PANDABOARD.conf ============================================================================== --- head/release/arm/PANDABOARD.conf Wed Mar 5 23:17:53 2014 (r262810) +++ stable/10/release/arm/PANDABOARD.conf Fri Apr 4 07:34:46 2014 (r264106) @@ -14,7 +14,7 @@ fi TARGET="amd64" TARGET_ARCH="amd64" SVNROOT="svn://svn.FreeBSD.org/" -SRCBRANCH="base/head@rHEAD" +SRCBRANCH="base/stable/10@rHEAD" DOCBRANCH="doc/head@rHEAD" PORTBRANCH="ports/head@rHEAD" NODOC=yes Modified: stable/10/release/arm/RPI-B.conf ============================================================================== --- head/release/arm/RPI-B.conf Wed Mar 5 23:17:53 2014 (r262810) +++ stable/10/release/arm/RPI-B.conf Fri Apr 4 07:34:46 2014 (r264106) @@ -14,7 +14,7 @@ fi TARGET="amd64" TARGET_ARCH="amd64" SVNROOT="svn://svn.FreeBSD.org/" -SRCBRANCH="base/head@rHEAD" +SRCBRANCH="base/stable/10@rHEAD" DOCBRANCH="doc/head@rHEAD" PORTBRANCH="ports/head@rHEAD" NODOC=yes Modified: stable/10/release/arm/WANDBOARD-QUAD.conf ============================================================================== --- head/release/arm/WANDBOARD-QUAD.conf Wed Mar 5 23:17:53 2014 (r262810) +++ stable/10/release/arm/WANDBOARD-QUAD.conf Fri Apr 4 07:34:46 2014 (r264106) @@ -14,7 +14,7 @@ fi TARGET="amd64" TARGET_ARCH="amd64" SVNROOT="svn://svn.FreeBSD.org/" -SRCBRANCH="base/head@rHEAD" +SRCBRANCH="base/stable/10@rHEAD" DOCBRANCH="doc/head@rHEAD" PORTBRANCH="ports/head@rHEAD" NODOC=yes Copied and modified: stable/10/release/arm/ZEDBOARD.conf (from r264105, head/release/arm/ZEDBOARD.conf) ============================================================================== --- head/release/arm/ZEDBOARD.conf Fri Apr 4 07:02:38 2014 (r264105, copy source) +++ stable/10/release/arm/ZEDBOARD.conf Fri Apr 4 07:34:46 2014 (r264106) @@ -6,7 +6,7 @@ TARGET="amd64" TARGET_ARCH="amd64" SVNROOT="svn://svn.FreeBSD.org/" -SRCBRANCH="base/head@rHEAD" +SRCBRANCH="base/stable/10@rHEAD" DOCBRANCH="doc/head@rHEAD" PORTBRANCH="ports/head@rHEAD" NODOC=yes Modified: stable/10/release/release.conf.sample ============================================================================== --- stable/10/release/release.conf.sample Fri Apr 4 07:02:38 2014 (r264105) +++ stable/10/release/release.conf.sample Fri Apr 4 07:34:46 2014 (r264106) @@ -10,7 +10,7 @@ CHROOTDIR="/scratch" SVNROOT="svn://svn.FreeBSD.org/" ## Set the src/, ports/, and doc/ branches or tags. -SRCBRANCH="base/head@rHEAD" +SRCBRANCH="base/stable/10@rHEAD" DOCBRANCH="doc/head@rHEAD" PORTBRANCH="ports/head@rHEAD" @@ -45,5 +45,17 @@ PORTBRANCH="ports/head@rHEAD" ## Set miscellaneous 'make release' settings. #NODOC= #NOPORTS= -#RELSTRING= #WITH_DVD= + +## Set when building embedded images. +#EMBEDDEDBUILD= + +## Set to skip the chroot environment buildworld/installworld/distribution +## step if it is expected the build environment will exist via alternate +## means. +#CHROOTBUILD_SKIP= + +## Set to pass additional flags to make(1) for the build chroot setup, such +## as TARGET/TARGET_ARCH. +#CHROOT_MAKEENV= + Modified: stable/10/release/release.sh ============================================================================== --- stable/10/release/release.sh Fri Apr 4 07:02:38 2014 (r264105) +++ stable/10/release/release.sh Fri Apr 4 07:34:46 2014 (r264106) @@ -41,6 +41,7 @@ export PATH # The directory within which the release will be built. CHROOTDIR="/scratch" +RELENGDIR="$(realpath $(dirname $(basename ${0})))" # The default version control system command to obtain the sources. VCSCMD="svn checkout" @@ -52,6 +53,9 @@ SRCBRANCH="base/head@rHEAD" DOCBRANCH="doc/head@rHEAD" PORTBRANCH="ports/head@rHEAD" +# Set for embedded device builds. +EMBEDDEDBUILD= + # Sometimes one needs to checkout src with --force svn option. # If custom kernel configs copied to src tree before checkout, e.g. SRC_FORCE_CHECKOUT= @@ -103,14 +107,33 @@ while getopts c: opt; do done shift $(($OPTIND - 1)) +# Fix for backwards-compatibility with release.conf that does not have the +# trailing '/'. +case ${SVNROOT} in + *svn*) + SVNROOT="${SVNROOT}/" + ;; + *) + ;; +esac + # Prefix the branches with the SVNROOT for the full checkout URL. SRCBRANCH="${SVNROOT}${SRCBRANCH}" DOCBRANCH="${SVNROOT}${DOCBRANCH}" PORTBRANCH="${SVNROOT}${PORTBRANCH}" +if [ -n "${EMBEDDEDBUILD}" ]; then + if [ -z "${XDEV}" ] || [ -z "${XDEV_ARCH}" ]; then + echo "ERROR: XDEV and XDEV_ARCH must be set in ${RELEASECONF}." + exit 1 + fi + WITH_DVD= + NODOC=yes +fi + # If PORTS is set and NODOC is unset, force NODOC=yes because the ports tree # is required to build the documentation set. -if [ "x${NOPORTS}" != "x" ] && [ "x${NODOC}" = "x" ]; then +if [ -n "${NOPORTS}" ] && [ -z "${NODOC}" ]; then echo "*** NOTICE: Setting NODOC=1 since ports tree is required" echo " and NOPORTS is set." NODOC=yes @@ -120,10 +143,10 @@ fi # The release makefile verifies definedness of NOPORTS/NODOC variables # instead of their values. DOCPORTS= -if [ "x${NOPORTS}" != "x" ]; then +if [ -n "${NOPORTS}" ]; then DOCPORTS="NOPORTS=yes " fi -if [ "x${NODOC}" != "x" ]; then +if [ -n "${NODOC}" ]; then DOCPORTS="${DOCPORTS}NODOC=yes" fi @@ -131,12 +154,12 @@ fi # this file, unless overridden by release.conf. In most cases, these # will not need to be changed. CONF_FILES="__MAKE_CONF=${MAKE_CONF} SRCCONF=${SRC_CONF}" -if [ "x${TARGET}" != "x" ] && [ "x${TARGET_ARCH}" != "x" ]; then +if [ -n "${TARGET}" ] && [ -n "${TARGET_ARCH}" ]; then ARCH_FLAGS="TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH}" else ARCH_FLAGS= fi -CHROOT_MAKEENV="MAKEOBJDIRPREFIX=${CHROOTDIR}/tmp/obj" +CHROOT_MAKEENV="${CHROOT_MAKEENV} MAKEOBJDIRPREFIX=${CHROOTDIR}/tmp/obj" CHROOT_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${CONF_FILES}" CHROOT_IMAKEFLAGS="${CONF_FILES}" CHROOT_DMAKEFLAGS="${CONF_FILES}" @@ -147,11 +170,11 @@ RELEASE_RMAKEFLAGS="${ARCH_FLAGS} KERNCO # Force src checkout if configured FORCE_SRC_KEY= -if [ "x${SRC_FORCE_CHECKOUT}" != "x" ]; then +if [ -n "${SRC_FORCE_CHECKOUT}" ]; then FORCE_SRC_KEY="--force" fi -if [ ! ${CHROOTDIR} ]; then +if [ -z "${CHROOTDIR}" ]; then echo "Please set CHROOTDIR." exit 1 fi @@ -166,19 +189,21 @@ set -e # Everything must succeed mkdir -p ${CHROOTDIR}/usr ${VCSCMD} ${FORCE_SRC_KEY} ${SRCBRANCH} ${CHROOTDIR}/usr/src -if [ "x${NODOC}" = "x" ]; then +if [ -z "${NODOC}" ]; then ${VCSCMD} ${DOCBRANCH} ${CHROOTDIR}/usr/doc fi -if [ "x${NOPORTS}" = "x" ]; then +if [ -z "${NOPORTS}" ]; then ${VCSCMD} ${PORTBRANCH} ${CHROOTDIR}/usr/ports fi -cd ${CHROOTDIR}/usr/src -env ${CHROOT_MAKEENV} make ${CHROOT_WMAKEFLAGS} buildworld -env ${CHROOT_MAKEENV} make ${CHROOT_IMAKEFLAGS} installworld \ - DESTDIR=${CHROOTDIR} -env ${CHROOT_MAKEENV} make ${CHROOT_DMAKEFLAGS} distribution \ - DESTDIR=${CHROOTDIR} +if [ -z "${CHROOTBUILD_SKIP}" ]; then + cd ${CHROOTDIR}/usr/src + env ${CHROOT_MAKEENV} make ${CHROOT_WMAKEFLAGS} buildworld + env ${CHROOT_MAKEENV} make ${CHROOT_IMAKEFLAGS} installworld \ + DESTDIR=${CHROOTDIR} + env ${CHROOT_MAKEENV} make ${CHROOT_DMAKEFLAGS} distribution \ + DESTDIR=${CHROOTDIR} +fi mount -t devfs devfs ${CHROOTDIR}/dev cp /etc/resolv.conf ${CHROOTDIR}/etc/resolv.conf trap "umount ${CHROOTDIR}/dev" EXIT # Clean up devfs mount on exit @@ -194,6 +219,29 @@ if [ -e ${SRC_CONF} ] && [ ! -c ${SRC_CO cp ${SRC_CONF} ${CHROOTDIR}/${SRC_CONF} fi +# Embedded builds do not use the 'make release' target. +if [ -n "${EMBEDDEDBUILD}" ]; then + # If a crochet configuration file exists in *this* checkout of + # release/, copy it to the /tmp/external directory within the chroot. + # This allows building embedded releases without relying on updated + # scripts and/or configurations to exist in the branch being built. + if [ -e ${RELENGDIR}/tools/${XDEV}/crochet-${KERNEL}.conf ] && \ + [ -e ${RELENGDIR}/${XDEV}/release.sh ]; then + mkdir -p ${CHROOTDIR}/tmp/external/${XDEV}/ + cp ${RELENGDIR}/tools/${XDEV}/crochet-${KERNEL}.conf \ + ${CHROOTDIR}/tmp/external/${XDEV}/crochet-${KERNEL}.conf + /bin/sh ${RELENGDIR}/${XDEV}/release.sh + fi + # If the script does not exist for this architecture, exit. + # This probably should be checked earlier, but allowing the rest + # of the build process to get this far will at least set up the + # chroot environment for testing. + exit 0 +else + # Not embedded. + continue +fi + if [ -d ${CHROOTDIR}/usr/ports ]; then # Run ldconfig(8) in the chroot directory so /var/run/ld-elf*.so.hints # is created. This is needed by ports-mgmt/pkg. @@ -201,7 +249,7 @@ if [ -d ${CHROOTDIR}/usr/ports ]; then ## Trick the ports 'run-autotools-fixup' target to do the right thing. _OSVERSION=$(sysctl -n kern.osreldate) - if [ -d ${CHROOTDIR}/usr/doc ] && [ "x${NODOC}" = "x" ]; then + if [ -d ${CHROOTDIR}/usr/doc ] && [ -z "${NODOC}" ]; then PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes" PBUILD_FLAGS="${PBUILD_FLAGS}" chroot ${CHROOTDIR} make -C /usr/ports/textproc/docproj \ @@ -209,13 +257,9 @@ if [ -d ${CHROOTDIR}/usr/ports ]; then fi fi -if [ "x${RELSTRING}" = "x" ]; then - RELSTRING="$(chroot ${CHROOTDIR} uname -s)-${OSRELEASE}-${TARGET_ARCH}" -fi - eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_WMAKEFLAGS} buildworld eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_KMAKEFLAGS} buildkernel eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \ - release RELSTRING=${RELSTRING} + release eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \ - install DESTDIR=/R RELSTRING=${RELSTRING} + install DESTDIR=/R Copied: stable/10/release/tools/arm/crochet-ZEDBOARD.conf (from r264105, head/release/tools/arm/crochet-ZEDBOARD.conf) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/release/tools/arm/crochet-ZEDBOARD.conf Fri Apr 4 07:34:46 2014 (r264106, copy of r264105, head/release/tools/arm/crochet-ZEDBOARD.conf) @@ -0,0 +1,29 @@ +# +# $FreeBSD$ +# + +# This is the configuration file for use with crochet to produce +# FreeBSD ZedBoard images. + +board_setup ZedBoard +option ImageSize 1gb +option AutoSize + +export MAKEOBJDIRPREFIX=/usr/obj +FREEBSD_SRC=/usr/src +__MAKE_CONF=/dev/null +SRCCONF=/dev/null +WORKDIR=/usr/obj +_BRANCH=$(make -C ${FREEBSD_SRC}/release -V BRANCH) +_REVISION=$(make -C ${FREEBSD_SRC}/release -V REVISION) +KERNCONF=ZEDBOARD +TARGET=arm +TARGET_ARCH=armv6 +FREEBSD_BUILDWORLD_EXTRA_ARGS="${WORLD_FLAGS}" +FREEBSD_BUILDKERNEL_EXTRA_ARGS="${KERNEL_FLAGS}" +FREEBSD_INSTALLWORLD_EXTRA_ARGS="" +FREEBSD_INSTALLKERNEL_EXTRA_ARGS="" +FREEBSD_WORLD_EXTRA_ARGS="" +FREEBSD_KERNEL_EXTRA_ARGS="" +FREEBSD_EXTRA_ARGS="" +IMG=${WORKDIR}/FreeBSD-${_REVISION}-${_BRANCH}-${TARGET}-${TARGET_ARCH}-${KERNCONF}.img Modified: stable/10/share/man/man7/release.7 ============================================================================== --- stable/10/share/man/man7/release.7 Fri Apr 4 07:02:38 2014 (r264105) +++ stable/10/share/man/man7/release.7 Fri Apr 4 07:34:46 2014 (r264106) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 25, 2014 +.Dd March 5, 2014 .Dt RELEASE 7 .Os .Sh NAME @@ -138,6 +138,11 @@ configuration file supports the followin .Bl -tag -width Ev .It Va CHROOTDIR The directory within which the release will be built. +.It Va CHROOT_MAKEENV +Additional +.Xr make 1 +arguments to pass through, which directly affect the +tuning of the build chroot. .It Va SVNROOT The .Xr svn 1 @@ -249,6 +254,72 @@ target. The command run to obtain the source trees. Defaults to .Qq Cm svn checkout . +.It Va CHROOTBUILD_SKIP +If defined, the +.Li buildworld , +.Li installworld , +and +.Li distribution +stages of the +.Xr chroot 8 +build environment setup are skipped. +This is intended solely for cases where the +.Xr chroot 8 +userland are provided by alternate means. +.El +.Sh EMBEDDED BUILDS +The following +.Fa release.conf +variables are relevant only to release builds for embedded systems: +.Bl -tag -width Ev +.It Va EMBEDDEDBUILD +Set to a non-null value to enable functionality for embedded device +release builds. +.Pq This option is considered highly experimental. +.Pp +When set, +.Va WITH_DVD +is unset, and +.Va NODOC +is defined. +Additionally, +.Va XDEV +and +.Va XDEV_ARCH +must also be defined. +When the build environment is created, +.Fa release.sh +runs a separate build script located in an architecture-specific +directory in +.Pa src/release/${XDEV}/ . +.It Va EMBEDDEDPORTS +Set to the list of any ports that are required for the target device +in the format of +.Fa category/port . +The +.Fa devel/subversion +port is built by default. +.It Va CROCHETSRC +Set to the source URL for the Crochet build tool. +.It Va CROCHETBRANCH +Set to the subversion branch from +.Va ${CROCHETSRC} +to use. +Defaults to +.Pa trunk . +.It Va UBOOTSRC +Set to the source URL of u-boot, if required. +.It Va UBOOTBRANCH +Set to the subversion branch from +.Va ${UBOOTSRC} +to use. +Defaults to +.Pa trunk . +.It Va UBOOTDIR +Set to the target directory within +.Va ${CHROOTDIR} +to check out +.Va ${UBOOTSRC}/${UBOOTBRANCH} . .El .Sh MAKEFILE TARGETS The release makefile From owner-svn-src-stable@FreeBSD.ORG Fri Apr 4 07:43:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 91F03164; Fri, 4 Apr 2014 07:43:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 725DF9C5; Fri, 4 Apr 2014 07:43:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s347hCvh057358; Fri, 4 Apr 2014 07:43:12 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s347hB4s057353; Fri, 4 Apr 2014 07:43:11 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404040743.s347hB4s057353@svn.freebsd.org> From: Glen Barber Date: Fri, 4 Apr 2014 07:43:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264108 - stable/10/release/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Apr 2014 07:43:12 -0000 Author: gjb Date: Fri Apr 4 07:43:11 2014 New Revision: 264108 URL: http://svnweb.freebsd.org/changeset/base/264108 Log: MFC r264107: Remove only-works-on-amd64 restriction. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/arm/BEAGLEBONE.conf stable/10/release/arm/PANDABOARD.conf stable/10/release/arm/RPI-B.conf stable/10/release/arm/WANDBOARD-QUAD.conf Directory Properties: stable/10/ (props changed) Modified: stable/10/release/arm/BEAGLEBONE.conf ============================================================================== --- stable/10/release/arm/BEAGLEBONE.conf Fri Apr 4 07:42:12 2014 (r264107) +++ stable/10/release/arm/BEAGLEBONE.conf Fri Apr 4 07:43:11 2014 (r264108) @@ -2,14 +2,6 @@ # $FreeBSD$ # -# This is only supported on amd64 right now. It may work on -# i386, but I do not have the hardware to test, so until I get -# a VM set up to make sure, be cautious and assume it will not. -if [ "$(uname -p)" != "amd64" ] || [ "$(uname -m)" != "amd64" ]; then - echo "This is only supported on amd64 right now." - exit 0 -fi - # Build chroot configuration TARGET="amd64" TARGET_ARCH="amd64" Modified: stable/10/release/arm/PANDABOARD.conf ============================================================================== --- stable/10/release/arm/PANDABOARD.conf Fri Apr 4 07:42:12 2014 (r264107) +++ stable/10/release/arm/PANDABOARD.conf Fri Apr 4 07:43:11 2014 (r264108) @@ -2,14 +2,6 @@ # $FreeBSD$ # -# This is only supported on amd64 right now. It may work on -# i386, but I do not have the hardware to test, so until I get -# a VM set up to make sure, be cautious and assume it will not. -if [ "$(uname -p)" != "amd64" ] || [ "$(uname -m)" != "amd64" ]; then - echo "This is only supported on amd64 right now." - exit 0 -fi - # Build chroot configuration TARGET="amd64" TARGET_ARCH="amd64" Modified: stable/10/release/arm/RPI-B.conf ============================================================================== --- stable/10/release/arm/RPI-B.conf Fri Apr 4 07:42:12 2014 (r264107) +++ stable/10/release/arm/RPI-B.conf Fri Apr 4 07:43:11 2014 (r264108) @@ -2,14 +2,6 @@ # $FreeBSD$ # -# This is only supported on amd64 right now. It may work on -# i386, but I do not have the hardware to test, so until I get -# a VM set up to make sure, be cautious and assume it will not. -if [ "$(uname -p)" != "amd64" ] || [ "$(uname -m)" != "amd64" ]; then - echo "This is only supported on amd64 right now." - exit 0 -fi - # Build chroot configuration TARGET="amd64" TARGET_ARCH="amd64" Modified: stable/10/release/arm/WANDBOARD-QUAD.conf ============================================================================== --- stable/10/release/arm/WANDBOARD-QUAD.conf Fri Apr 4 07:42:12 2014 (r264107) +++ stable/10/release/arm/WANDBOARD-QUAD.conf Fri Apr 4 07:43:11 2014 (r264108) @@ -2,14 +2,6 @@ # $FreeBSD$ # -# This is only supported on amd64 right now. It may work on -# i386, but I do not have the hardware to test, so until I get -# a VM set up to make sure, be cautious and assume it will not. -if [ "$(uname -p)" != "amd64" ] || [ "$(uname -m)" != "amd64" ]; then - echo "This is only supported on amd64 right now." - exit 0 -fi - # Build chroot configuration TARGET="amd64" TARGET_ARCH="amd64" From owner-svn-src-stable@FreeBSD.ORG Fri Apr 4 07:47:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF01B35C; Fri, 4 Apr 2014 07:47:08 +0000 (UTC) Received: from mail0.glenbarber.us (mail0.glenbarber.us [208.86.227.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.glenbarber.us", Issuer "RapidSSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8FBEF9E8; Fri, 4 Apr 2014 07:47:08 +0000 (UTC) Received: from glenbarber.us (c-71-224-221-174.hsd1.nj.comcast.net [71.224.221.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gjb) by mail0.glenbarber.us (Postfix) with ESMTPSA id A0A57BDDB; Fri, 4 Apr 2014 07:47:06 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.8.3 mail0.glenbarber.us A0A57BDDB Authentication-Results: mail0.glenbarber.us; dkim=none reason="no signature"; dkim-adsp=none Date: Fri, 4 Apr 2014 03:47:05 -0400 From: Glen Barber To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r264108 - stable/10/release/arm Message-ID: <20140404074705.GO14379@glenbarber.us> References: <201404040743.s347hB4s057353@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="dLxyWiplEfGRIOx4" Content-Disposition: inline In-Reply-To: <201404040743.s347hB4s057353@svn.freebsd.org> X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Apr 2014 07:47:08 -0000 --dLxyWiplEfGRIOx4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 04, 2014 at 07:43:11AM +0000, Glen Barber wrote: > Author: gjb > Date: Fri Apr 4 07:43:11 2014 > New Revision: 264108 > URL: http://svnweb.freebsd.org/changeset/base/264108 >=20 > Log: > MFC r264107: > Remove only-works-on-amd64 restriction. Yes, I realize this was an insta-MFC, but to avoid pain of requiring the build system to be amd64 (which seems is not necessary), this is effectively a noop, and should have been merged much sooner. It was, however, extensively tested for the past several weeks. Glen --dLxyWiplEfGRIOx4 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBCAAGBQJTPmN4AAoJELls3eqvi17Q2CMP+wcAJuMXNwC2ox/1vJ6ceKcc 5hMICN5e06oRnfgFHaBGZtnChACgULArGcKUOdFBaFQEeMTJsXbMyYS6zHHF51Xu qU7G0sOYU3cduhpJ4VAEa98/cgkXTldvsQ7JIgMbGNp9y+CRtpCOnMSj1Md0Cyfg E7NuTSdNhSfc2YhfaLg14kSE6ZhO2x/Zbdyv0/PbDuQ9qWVfuWkMjcku1u4rlZJB jUXJFbnDFV1b+qBFqCdkYQ5JCHtOJxHlYgOuw1pVffnDWu4n7HSq/Ee40boSjCd8 b1B/4VhI7C4cvyvWN6bk3a02XhQiVI4USqr/g9cNBZcySv+v0Wg/kgzAGAOmgBjL SHx2Q+jZ+U0h1WQuaXxYciQsa7dIUWaiBL1ns0c7Bq7T7yBKrWurcXTaDbFklb+f vp0JmI1H9oIp3k6skVDv89lyszGcISlzorf8WZy0TXzwp8mBYosW9ZwpjscESfVM 3eUuV5RoO6gYIqlgwmHaXuWkZLYz82eS3l+dsjRgG4O680hMzGv+pGJXBtTCXgPV 7TlF20bEuRqPADJ4s+xBrbTQcLJsLOzPHlIemyt1mpEEVPaOndYwf6sN5ecrynHe p1YargvrIOUwTObFcHZJljArzk18ZjCXmO5bHv1oa5y5EuPxcDM3MIBUxdCEaWjN 8bn72iEX9qyP40ICYiTD =OtGq -----END PGP SIGNATURE----- --dLxyWiplEfGRIOx4-- From owner-svn-src-stable@FreeBSD.ORG Fri Apr 4 10:34:00 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2BB5C156; Fri, 4 Apr 2014 10:34:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C10FB22; Fri, 4 Apr 2014 10:34:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s34AXxUU029285; Fri, 4 Apr 2014 10:33:59 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s34AXx1N029284; Fri, 4 Apr 2014 10:33:59 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201404041033.s34AXx1N029284@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 4 Apr 2014 10:33:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264111 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Apr 2014 10:34:00 -0000 Author: glebius Date: Fri Apr 4 10:33:59 2014 New Revision: 264111 URL: http://svnweb.freebsd.org/changeset/base/264111 Log: Merge r262341: - Improve logging of send errors, reporting error code and interface. - Reduce code duplication between INET and INET6. Modified: stable/10/sys/netinet/ip_carp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/ip_carp.c ============================================================================== --- stable/10/sys/netinet/ip_carp.c Fri Apr 4 08:48:55 2014 (r264110) +++ stable/10/sys/netinet/ip_carp.c Fri Apr 4 10:33:59 2014 (r264111) @@ -761,6 +761,35 @@ carp_send_ad(void *v) } static void +carp_send_ad_error(struct carp_softc *sc, int error) +{ + + if (error) { + if (sc->sc_sendad_errors < INT_MAX) + sc->sc_sendad_errors++; + if (sc->sc_sendad_errors == CARP_SENDAD_MAX_ERRORS) { + static const char fmt[] = "send error %d on %s"; + char msg[sizeof(fmt) + IFNAMSIZ]; + + sprintf(msg, fmt, error, sc->sc_carpdev->if_xname); + carp_demote_adj(V_carp_senderr_adj, msg); + } + sc->sc_sendad_success = 0; + } else { + if (sc->sc_sendad_errors >= CARP_SENDAD_MAX_ERRORS && + ++sc->sc_sendad_success >= CARP_SENDAD_MIN_SUCCESS) { + static const char fmt[] = "send ok on %s"; + char msg[sizeof(fmt) + IFNAMSIZ]; + + sprintf(msg, fmt, sc->sc_carpdev->if_xname); + carp_demote_adj(-V_carp_senderr_adj, msg); + sc->sc_sendad_errors = 0; + } else + sc->sc_sendad_errors = 0; + } +} + +static void carp_send_ad_locked(struct carp_softc *sc) { struct carp_header ch; @@ -836,25 +865,8 @@ carp_send_ad_locked(struct carp_softc *s CARPSTATS_INC(carps_opackets); - if (ip_output(m, NULL, NULL, IP_RAWOUTPUT, - &sc->sc_carpdev->if_carp->cif_imo, NULL)) { - if (sc->sc_sendad_errors < INT_MAX) - sc->sc_sendad_errors++; - if (sc->sc_sendad_errors == CARP_SENDAD_MAX_ERRORS) - carp_demote_adj(V_carp_senderr_adj, - "send error"); - sc->sc_sendad_success = 0; - } else { - if (sc->sc_sendad_errors >= CARP_SENDAD_MAX_ERRORS) { - if (++sc->sc_sendad_success >= - CARP_SENDAD_MIN_SUCCESS) { - carp_demote_adj(-V_carp_senderr_adj, - "send ok"); - sc->sc_sendad_errors = 0; - } - } else - sc->sc_sendad_errors = 0; - } + carp_send_ad_error(sc, ip_output(m, NULL, NULL, IP_RAWOUTPUT, + &sc->sc_carpdev->if_carp->cif_imo, NULL)); } #endif /* INET */ #ifdef INET6 @@ -910,25 +922,8 @@ carp_send_ad_locked(struct carp_softc *s CARPSTATS_INC(carps_opackets6); - if (ip6_output(m, NULL, NULL, 0, - &sc->sc_carpdev->if_carp->cif_im6o, NULL, NULL)) { - if (sc->sc_sendad_errors < INT_MAX) - sc->sc_sendad_errors++; - if (sc->sc_sendad_errors == CARP_SENDAD_MAX_ERRORS) - carp_demote_adj(V_carp_senderr_adj, - "send6 error"); - sc->sc_sendad_success = 0; - } else { - if (sc->sc_sendad_errors >= CARP_SENDAD_MAX_ERRORS) { - if (++sc->sc_sendad_success >= - CARP_SENDAD_MIN_SUCCESS) { - carp_demote_adj(-V_carp_senderr_adj, - "send6 ok"); - sc->sc_sendad_errors = 0; - } - } else - sc->sc_sendad_errors = 0; - } + carp_send_ad_error(sc, ip6_output(m, NULL, NULL, 0, + &sc->sc_carpdev->if_carp->cif_im6o, NULL, NULL)); } #endif /* INET6 */ From owner-svn-src-stable@FreeBSD.ORG Fri Apr 4 11:17:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4083F6E; Fri, 4 Apr 2014 11:17:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F675ED9; Fri, 4 Apr 2014 11:17:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s34BHoFY046729; Fri, 4 Apr 2014 11:17:50 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s34BHosS046726; Fri, 4 Apr 2014 11:17:50 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201404041117.s34BHosS046726@svn.freebsd.org> From: Aleksandr Rybalko Date: Fri, 4 Apr 2014 11:17:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264112 - in stable/10/sys/dev/vt: . hw/vga X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Apr 2014 11:17:50 -0000 Author: ray Date: Fri Apr 4 11:17:49 2014 New Revision: 264112 URL: http://svnweb.freebsd.org/changeset/base/264112 Log: MFC r263885 o Add new vd_driver method to do bitblt with mask, named vd_maskbitbltchr. o Move vd_bitbltchr vga's driver method to vd_maskbitbltchr. o Implement new vd_bitbltchr method for vga driver. (It do single write for 8 pixels, have to be a bit faster). Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/hw/vga/vga.c stable/10/sys/dev/vt/vt.h stable/10/sys/dev/vt/vt_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/hw/vga/vga.c ============================================================================== --- stable/10/sys/dev/vt/hw/vga/vga.c Fri Apr 4 10:33:59 2014 (r264111) +++ stable/10/sys/dev/vt/hw/vga/vga.c Fri Apr 4 11:17:49 2014 (r264112) @@ -74,6 +74,7 @@ struct vga_softc { static vd_init_t vga_init; static vd_blank_t vga_blank; static vd_bitbltchr_t vga_bitbltchr; +static vd_maskbitbltchr_t vga_maskbitbltchr; static vd_drawrect_t vga_drawrect; static vd_setpixel_t vga_setpixel; static vd_putchar_t vga_putchar; @@ -83,6 +84,7 @@ static const struct vt_driver vt_vga_dri .vd_init = vga_init, .vd_blank = vga_blank, .vd_bitbltchr = vga_bitbltchr, + .vd_maskbitbltchr = vga_maskbitbltchr, .vd_drawrect = vga_drawrect, .vd_setpixel = vga_setpixel, .vd_putchar = vga_putchar, @@ -204,6 +206,34 @@ vga_bitbltchr(struct vt_device *vd, cons int bpl, vt_axis_t top, vt_axis_t left, unsigned int width, unsigned int height, term_color_t fg, term_color_t bg) { + u_long dst, ldst; + int w; + + /* Don't try to put off screen pixels */ + if (((left + width) > VT_VGA_WIDTH) || ((top + height) > + VT_VGA_HEIGHT)) + return; + + dst = (VT_VGA_WIDTH * top + left) / 8; + + for (; height > 0; height--) { + ldst = dst; + for (w = width; w > 0; w -= 8) { + vga_bitblt_put(vd, ldst, fg, *src); + vga_bitblt_put(vd, ldst, bg, ~*src); + ldst++; + src++; + } + dst += VT_VGA_WIDTH / 8; + } +} + +/* Bitblt with mask support. Slow. */ +static void +vga_maskbitbltchr(struct vt_device *vd, const uint8_t *src, const uint8_t *mask, + int bpl, vt_axis_t top, vt_axis_t left, unsigned int width, + unsigned int height, term_color_t fg, term_color_t bg) +{ struct vga_softc *sc = vd->vd_softc; u_long dst; uint8_t shift; Modified: stable/10/sys/dev/vt/vt.h ============================================================================== --- stable/10/sys/dev/vt/vt.h Fri Apr 4 10:33:59 2014 (r264111) +++ stable/10/sys/dev/vt/vt.h Fri Apr 4 11:17:49 2014 (r264112) @@ -282,6 +282,9 @@ typedef void vd_blank_t(struct vt_device typedef void vd_bitbltchr_t(struct vt_device *vd, const uint8_t *src, const uint8_t *mask, int bpl, vt_axis_t top, vt_axis_t left, unsigned int width, unsigned int height, term_color_t fg, term_color_t bg); +typedef void vd_maskbitbltchr_t(struct vt_device *vd, const uint8_t *src, + const uint8_t *mask, int bpl, vt_axis_t top, vt_axis_t left, + unsigned int width, unsigned int height, term_color_t fg, term_color_t bg); typedef void vd_putchar_t(struct vt_device *vd, term_char_t, vt_axis_t top, vt_axis_t left, term_color_t fg, term_color_t bg); typedef int vd_fb_ioctl_t(struct vt_device *, u_long, caddr_t, struct thread *); @@ -298,6 +301,7 @@ struct vt_driver { /* Drawing. */ vd_blank_t *vd_blank; vd_bitbltchr_t *vd_bitbltchr; + vd_maskbitbltchr_t *vd_maskbitbltchr; vd_drawrect_t *vd_drawrect; vd_setpixel_t *vd_setpixel; Modified: stable/10/sys/dev/vt/vt_core.c ============================================================================== --- stable/10/sys/dev/vt/vt_core.c Fri Apr 4 10:33:59 2014 (r264111) +++ stable/10/sys/dev/vt/vt_core.c Fri Apr 4 11:17:49 2014 (r264112) @@ -775,7 +775,7 @@ vt_flush(struct vt_device *vd) if ((vd->vd_my + m->h) > (size.tp_row * vf->vf_height)) h = (size.tp_row * vf->vf_height) - vd->vd_my - 1; - vd->vd_driver->vd_bitbltchr(vd, m->map, m->mask, bpl, + vd->vd_driver->vd_maskbitbltchr(vd, m->map, m->mask, bpl, vd->vd_offset.tp_row + vd->vd_my, vd->vd_offset.tp_col + vd->vd_mx, w, h, TC_WHITE, TC_BLACK); @@ -1930,6 +1930,8 @@ vt_allocate(struct vt_driver *drv, void printf("%s: Replace existing VT driver.\n", __func__); } vd = main_vd; + if (drv->vd_maskbitbltchr == NULL) + drv->vd_maskbitbltchr = drv->vd_bitbltchr; /* Stop vt_flush periodic task. */ if (vd->vd_curwindow != NULL) From owner-svn-src-stable@FreeBSD.ORG Fri Apr 4 11:19:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E21F6139; Fri, 4 Apr 2014 11:19:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CDD4CEE3; Fri, 4 Apr 2014 11:19:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s34BJ3Jp046918; Fri, 4 Apr 2014 11:19:03 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s34BJ3ds046914; Fri, 4 Apr 2014 11:19:03 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201404041119.s34BJ3ds046914@svn.freebsd.org> From: Aleksandr Rybalko Date: Fri, 4 Apr 2014 11:19:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264113 - in stable/9/sys/dev/vt: . hw/vga X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Apr 2014 11:19:04 -0000 Author: ray Date: Fri Apr 4 11:19:02 2014 New Revision: 264113 URL: http://svnweb.freebsd.org/changeset/base/264113 Log: MFC r263885 o Add new vd_driver method to do bitblt with mask, named vd_maskbitbltchr. o Move vd_bitbltchr vga's driver method to vd_maskbitbltchr. o Implement new vd_bitbltchr method for vga driver. (It do single write for 8 pixels, have to be a bit faster). Sponsored by: The FreeBSD Foundation Modified: stable/9/sys/dev/vt/hw/vga/vga.c stable/9/sys/dev/vt/vt.h stable/9/sys/dev/vt/vt_core.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/vt/hw/vga/vga.c ============================================================================== --- stable/9/sys/dev/vt/hw/vga/vga.c Fri Apr 4 11:17:49 2014 (r264112) +++ stable/9/sys/dev/vt/hw/vga/vga.c Fri Apr 4 11:19:02 2014 (r264113) @@ -74,6 +74,7 @@ struct vga_softc { static vd_init_t vga_init; static vd_blank_t vga_blank; static vd_bitbltchr_t vga_bitbltchr; +static vd_maskbitbltchr_t vga_maskbitbltchr; static vd_drawrect_t vga_drawrect; static vd_setpixel_t vga_setpixel; static vd_putchar_t vga_putchar; @@ -83,6 +84,7 @@ static const struct vt_driver vt_vga_dri .vd_init = vga_init, .vd_blank = vga_blank, .vd_bitbltchr = vga_bitbltchr, + .vd_maskbitbltchr = vga_maskbitbltchr, .vd_drawrect = vga_drawrect, .vd_setpixel = vga_setpixel, .vd_putchar = vga_putchar, @@ -204,6 +206,34 @@ vga_bitbltchr(struct vt_device *vd, cons int bpl, vt_axis_t top, vt_axis_t left, unsigned int width, unsigned int height, term_color_t fg, term_color_t bg) { + u_long dst, ldst; + int w; + + /* Don't try to put off screen pixels */ + if (((left + width) > VT_VGA_WIDTH) || ((top + height) > + VT_VGA_HEIGHT)) + return; + + dst = (VT_VGA_WIDTH * top + left) / 8; + + for (; height > 0; height--) { + ldst = dst; + for (w = width; w > 0; w -= 8) { + vga_bitblt_put(vd, ldst, fg, *src); + vga_bitblt_put(vd, ldst, bg, ~*src); + ldst++; + src++; + } + dst += VT_VGA_WIDTH / 8; + } +} + +/* Bitblt with mask support. Slow. */ +static void +vga_maskbitbltchr(struct vt_device *vd, const uint8_t *src, const uint8_t *mask, + int bpl, vt_axis_t top, vt_axis_t left, unsigned int width, + unsigned int height, term_color_t fg, term_color_t bg) +{ struct vga_softc *sc = vd->vd_softc; u_long dst; uint8_t shift; Modified: stable/9/sys/dev/vt/vt.h ============================================================================== --- stable/9/sys/dev/vt/vt.h Fri Apr 4 11:17:49 2014 (r264112) +++ stable/9/sys/dev/vt/vt.h Fri Apr 4 11:19:02 2014 (r264113) @@ -282,6 +282,9 @@ typedef void vd_blank_t(struct vt_device typedef void vd_bitbltchr_t(struct vt_device *vd, const uint8_t *src, const uint8_t *mask, int bpl, vt_axis_t top, vt_axis_t left, unsigned int width, unsigned int height, term_color_t fg, term_color_t bg); +typedef void vd_maskbitbltchr_t(struct vt_device *vd, const uint8_t *src, + const uint8_t *mask, int bpl, vt_axis_t top, vt_axis_t left, + unsigned int width, unsigned int height, term_color_t fg, term_color_t bg); typedef void vd_putchar_t(struct vt_device *vd, term_char_t, vt_axis_t top, vt_axis_t left, term_color_t fg, term_color_t bg); typedef int vd_fb_ioctl_t(struct vt_device *, u_long, caddr_t, struct thread *); @@ -298,6 +301,7 @@ struct vt_driver { /* Drawing. */ vd_blank_t *vd_blank; vd_bitbltchr_t *vd_bitbltchr; + vd_maskbitbltchr_t *vd_maskbitbltchr; vd_drawrect_t *vd_drawrect; vd_setpixel_t *vd_setpixel; Modified: stable/9/sys/dev/vt/vt_core.c ============================================================================== --- stable/9/sys/dev/vt/vt_core.c Fri Apr 4 11:17:49 2014 (r264112) +++ stable/9/sys/dev/vt/vt_core.c Fri Apr 4 11:19:02 2014 (r264113) @@ -775,7 +775,7 @@ vt_flush(struct vt_device *vd) if ((vd->vd_my + m->h) > (size.tp_row * vf->vf_height)) h = (size.tp_row * vf->vf_height) - vd->vd_my - 1; - vd->vd_driver->vd_bitbltchr(vd, m->map, m->mask, bpl, + vd->vd_driver->vd_maskbitbltchr(vd, m->map, m->mask, bpl, vd->vd_offset.tp_row + vd->vd_my, vd->vd_offset.tp_col + vd->vd_mx, w, h, TC_WHITE, TC_BLACK); @@ -1930,6 +1930,8 @@ vt_allocate(struct vt_driver *drv, void printf("%s: Replace existing VT driver.\n", __func__); } vd = main_vd; + if (drv->vd_maskbitbltchr == NULL) + drv->vd_maskbitbltchr = drv->vd_bitbltchr; /* Stop vt_flush periodic task. */ if (vd->vd_curwindow != NULL) From owner-svn-src-stable@FreeBSD.ORG Fri Apr 4 14:18:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2591D6F3; Fri, 4 Apr 2014 14:18:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EBC0A350; Fri, 4 Apr 2014 14:18:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s34EIb7x022013; Fri, 4 Apr 2014 14:18:37 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s34EIbwq022012; Fri, 4 Apr 2014 14:18:37 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201404041418.s34EIbwq022012@svn.freebsd.org> From: Ed Maste Date: Fri, 4 Apr 2014 14:18:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264116 - stable/10/tools/build/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Apr 2014 14:18:38 -0000 Author: emaste Date: Fri Apr 4 14:18:37 2014 New Revision: 264116 URL: http://svnweb.freebsd.org/changeset/base/264116 Log: MFC r261521 by antoine: Add files to remove WITHOUT_NIS PR: misc/186412 Sponsored by: The FreeBSD Foundation Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Fri Apr 4 13:35:36 2014 (r264115) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Fri Apr 4 14:18:37 2014 (r264116) @@ -3278,9 +3278,60 @@ OLD_FILES+=usr/bin/nc OLD_FILES+=usr/share/man/man1/nc.1.gz .endif -#.if ${MK_NIS} == no -# to be filled in -#.endif +.if ${MK_NIS} == no +OLD_FILES+=usr/bin/ypcat +OLD_FILES+=usr/bin/ypchfn +OLD_FILES+=usr/bin/ypchpass +OLD_FILES+=usr/bin/ypchsh +OLD_FILES+=usr/bin/ypmatch +OLD_FILES+=usr/bin/yppasswd +OLD_FILES+=usr/bin/ypwhich +OLD_FILES+=usr/include/ypclnt.h +OLD_FILES+=usr/lib/libypclnt.a +OLD_FILES+=usr/lib/libypclnt.so +OLD_LIBS+=usr/lib/libypclnt.so.4 +OLD_FILES+=usr/lib/libypclnt_p.a +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" +OLD_FILES+=usr/lib32/libypclnt.a +OLD_FILES+=usr/lib32/libypclnt.so +OLD_LIBS+=usr/lib32/libypclnt.so.4 +OLD_FILES+=usr/lib32/libypclnt_p.a +.endif +OLD_FILES+=usr/libexec/mknetid +OLD_FILES+=usr/libexec/yppwupdate +OLD_FILES+=usr/libexec/ypxfr +OLD_FILES+=usr/sbin/rpc.yppasswdd +OLD_FILES+=usr/sbin/rpc.ypupdated +OLD_FILES+=usr/sbin/rpc.ypxfrd +OLD_FILES+=usr/sbin/yp_mkdb +OLD_FILES+=usr/sbin/ypbind +OLD_FILES+=usr/sbin/ypinit +OLD_FILES+=usr/sbin/yppoll +OLD_FILES+=usr/sbin/yppush +OLD_FILES+=usr/sbin/ypserv +OLD_FILES+=usr/sbin/ypset +OLD_FILES+=usr/share/man/man1/ypcat.1.gz +OLD_FILES+=usr/share/man/man1/ypchfn.1.gz +OLD_FILES+=usr/share/man/man1/ypchpass.1.gz +OLD_FILES+=usr/share/man/man1/ypchsh.1.gz +OLD_FILES+=usr/share/man/man1/ypmatch.1.gz +OLD_FILES+=usr/share/man/man1/yppasswd.1.gz +OLD_FILES+=usr/share/man/man1/ypwhich.1.gz +OLD_FILES+=usr/share/man/man5/netid.5.gz +OLD_FILES+=usr/share/man/man8/mknetid.8.gz +OLD_FILES+=usr/share/man/man8/rpc.yppasswdd.8.gz +OLD_FILES+=usr/share/man/man8/rpc.ypxfrd.8.gz +OLD_FILES+=usr/share/man/man8/yp_mkdb.8.gz +OLD_FILES+=usr/share/man/man8/ypbind.8.gz +OLD_FILES+=usr/share/man/man8/ypinit.8.gz +OLD_FILES+=usr/share/man/man8/yppoll.8.gz +OLD_FILES+=usr/share/man/man8/yppush.8.gz +OLD_FILES+=usr/share/man/man8/ypserv.8.gz +OLD_FILES+=usr/share/man/man8/ypset.8.gz +OLD_FILES+=usr/share/man/man8/ypxfr.8.gz +OLD_FILES+=var/yp/Makefile +OLD_FILES+=var/yp/Makefile.dist +.endif #.if ${MK_NLS} == no # to be filled in From owner-svn-src-stable@FreeBSD.ORG Fri Apr 4 14:42:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD70CF53; Fri, 4 Apr 2014 14:42:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF750819; Fri, 4 Apr 2014 14:42:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s34EghUE034591; Fri, 4 Apr 2014 14:42:43 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s34Eghhb034590; Fri, 4 Apr 2014 14:42:43 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201404041442.s34Eghhb034590@svn.freebsd.org> From: Ed Maste Date: Fri, 4 Apr 2014 14:42:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264117 - stable/9/tools/build/mk X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Apr 2014 14:42:43 -0000 Author: emaste Date: Fri Apr 4 14:42:43 2014 New Revision: 264117 URL: http://svnweb.freebsd.org/changeset/base/264117 Log: MFC r261521 by antoine: Add files to remove WITHOUT_NIS PR: misc/186412 Sponsored by: The FreeBSD Foundation Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/9/tools/build/ (props changed) Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/9/tools/build/mk/OptionalObsoleteFiles.inc Fri Apr 4 14:18:37 2014 (r264116) +++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc Fri Apr 4 14:42:43 2014 (r264117) @@ -2935,9 +2935,60 @@ OLD_FILES+=usr/bin/nc OLD_FILES+=usr/share/man/man1/nc.1.gz .endif -#.if ${MK_NIS} == no -# to be filled in -#.endif +.if ${MK_NIS} == no +OLD_FILES+=usr/bin/ypcat +OLD_FILES+=usr/bin/ypchfn +OLD_FILES+=usr/bin/ypchpass +OLD_FILES+=usr/bin/ypchsh +OLD_FILES+=usr/bin/ypmatch +OLD_FILES+=usr/bin/yppasswd +OLD_FILES+=usr/bin/ypwhich +OLD_FILES+=usr/include/ypclnt.h +OLD_FILES+=usr/lib/libypclnt.a +OLD_FILES+=usr/lib/libypclnt.so +OLD_LIBS+=usr/lib/libypclnt.so.4 +OLD_FILES+=usr/lib/libypclnt_p.a +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" +OLD_FILES+=usr/lib32/libypclnt.a +OLD_FILES+=usr/lib32/libypclnt.so +OLD_LIBS+=usr/lib32/libypclnt.so.4 +OLD_FILES+=usr/lib32/libypclnt_p.a +.endif +OLD_FILES+=usr/libexec/mknetid +OLD_FILES+=usr/libexec/yppwupdate +OLD_FILES+=usr/libexec/ypxfr +OLD_FILES+=usr/sbin/rpc.yppasswdd +OLD_FILES+=usr/sbin/rpc.ypupdated +OLD_FILES+=usr/sbin/rpc.ypxfrd +OLD_FILES+=usr/sbin/yp_mkdb +OLD_FILES+=usr/sbin/ypbind +OLD_FILES+=usr/sbin/ypinit +OLD_FILES+=usr/sbin/yppoll +OLD_FILES+=usr/sbin/yppush +OLD_FILES+=usr/sbin/ypserv +OLD_FILES+=usr/sbin/ypset +OLD_FILES+=usr/share/man/man1/ypcat.1.gz +OLD_FILES+=usr/share/man/man1/ypchfn.1.gz +OLD_FILES+=usr/share/man/man1/ypchpass.1.gz +OLD_FILES+=usr/share/man/man1/ypchsh.1.gz +OLD_FILES+=usr/share/man/man1/ypmatch.1.gz +OLD_FILES+=usr/share/man/man1/yppasswd.1.gz +OLD_FILES+=usr/share/man/man1/ypwhich.1.gz +OLD_FILES+=usr/share/man/man5/netid.5.gz +OLD_FILES+=usr/share/man/man8/mknetid.8.gz +OLD_FILES+=usr/share/man/man8/rpc.yppasswdd.8.gz +OLD_FILES+=usr/share/man/man8/rpc.ypxfrd.8.gz +OLD_FILES+=usr/share/man/man8/yp_mkdb.8.gz +OLD_FILES+=usr/share/man/man8/ypbind.8.gz +OLD_FILES+=usr/share/man/man8/ypinit.8.gz +OLD_FILES+=usr/share/man/man8/yppoll.8.gz +OLD_FILES+=usr/share/man/man8/yppush.8.gz +OLD_FILES+=usr/share/man/man8/ypserv.8.gz +OLD_FILES+=usr/share/man/man8/ypset.8.gz +OLD_FILES+=usr/share/man/man8/ypxfr.8.gz +OLD_FILES+=var/yp/Makefile +OLD_FILES+=var/yp/Makefile.dist +.endif #.if ${MK_NLS} == no # to be filled in From owner-svn-src-stable@FreeBSD.ORG Fri Apr 4 14:54:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 18C4B83B; Fri, 4 Apr 2014 14:54:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02F60962; Fri, 4 Apr 2014 14:54:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s34EstGR039681; Fri, 4 Apr 2014 14:54:55 GMT (envelope-from royger@svn.freebsd.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s34EssAp039673; Fri, 4 Apr 2014 14:54:54 GMT (envelope-from royger@svn.freebsd.org) Message-Id: <201404041454.s34EssAp039673@svn.freebsd.org> From: Roger Pau Monné Date: Fri, 4 Apr 2014 14:54:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264118 - in stable/10/sys: amd64/amd64 amd64/include i386/i386 i386/include i386/xen x86/xen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Apr 2014 14:54:56 -0000 Author: royger Date: Fri Apr 4 14:54:54 2014 New Revision: 264118 URL: http://svnweb.freebsd.org/changeset/base/264118 Log: MFC r263001 Move asm IPIs handlers to C code, so both Xen and native IPI handlers share the same code. Approved by: gibbs Sponsored by: Citrix Systems R&D Modified: stable/10/sys/amd64/amd64/apic_vector.S stable/10/sys/amd64/amd64/mp_machdep.c stable/10/sys/amd64/include/smp.h stable/10/sys/i386/i386/apic_vector.s stable/10/sys/i386/i386/mp_machdep.c stable/10/sys/i386/include/smp.h stable/10/sys/i386/xen/mp_machdep.c stable/10/sys/x86/xen/hvm.c Modified: stable/10/sys/amd64/amd64/apic_vector.S ============================================================================== --- stable/10/sys/amd64/amd64/apic_vector.S Fri Apr 4 14:42:43 2014 (r264117) +++ stable/10/sys/amd64/amd64/apic_vector.S Fri Apr 4 14:54:54 2014 (r264118) @@ -159,101 +159,26 @@ IDTVEC(xen_intr_upcall) #define NAKE_INTR_CS 24 SUPERALIGN_TEXT -global_invltlb: - movq %cr4,%rax - andq $~0x80,%rax /* PGE */ - movq %rax,%cr4 - orq $0x80,%rax - movq %rax,%cr4 -invltlb_ret_clear_pm_save: - movq smp_tlb_pmap,%rdx - testq %rdx,%rdx - jz invltlb_ret_rdx - testb $SEL_RPL_MASK,NAKE_INTR_CS(%rsp) - jz 1f - swapgs -1: - movl PCPU(CPUID),%eax - jz 2f - swapgs -2: - LK btcl %eax,PM_SAVE(%rdx) - SUPERALIGN_TEXT -invltlb_ret_rdx: - popq %rdx -invltlb_ret_rax: +invltlb_ret: movq lapic, %rax movl $0, LA_EOI(%rax) /* End Of Interrupt to APIC */ - LK incl smp_tlb_wait - popq %rax + POP_FRAME jmp doreti_iret SUPERALIGN_TEXT IDTVEC(invltlb_pcid) -#if defined(COUNT_XINVLTLB_HITS) || defined(COUNT_IPIS) PUSH_FRAME - movl PCPU(CPUID), %eax -#ifdef COUNT_XINVLTLB_HITS - incl xhits_gbl(,%rax,4) -#endif -#ifdef COUNT_IPIS - movq ipi_invltlb_counts(,%rax,8),%rax - incq (%rax) -#endif - POP_FRAME -#endif - - pushq %rax - pushq %rdx - movq %cr3,%rax + call invltlb_pcid_handler + jmp invltlb_ret - movq $smp_tlb_invpcid,%rdx - cmpl $0,(%rdx) - je global_invltlb - cmpl $-1,(%rdx) - je global_invltlb - - /* - * Only invalidate TLB for entries with current PCID. - */ - cmpl $0,invpcid_works - je 1f - /* Use invpcid if available. */ - movl $1,%eax /* INVPCID_CTX */ - /* invpcid (%rdx),%rax */ - .byte 0x66,0x0f,0x38,0x82,0x02 - jmp invltlb_ret_clear_pm_save -1: - /* Otherwise reload %cr3 twice. */ - movq pcid_cr3,%rdx - cmpq %rax,%rdx - je 2f - movq %rdx,%cr3 /* Invalidate, bit 63 is zero. */ - btsq $63,%rax -2: - movq %rax,%cr3 - jmp invltlb_ret_clear_pm_save SUPERALIGN_TEXT IDTVEC(invltlb) -#if defined(COUNT_XINVLTLB_HITS) || defined(COUNT_IPIS) PUSH_FRAME - movl PCPU(CPUID), %eax -#ifdef COUNT_XINVLTLB_HITS - incl xhits_gbl(,%rax,4) -#endif -#ifdef COUNT_IPIS - movq ipi_invltlb_counts(,%rax,8),%rax - incq (%rax) -#endif - POP_FRAME -#endif - pushq %rax - movq %cr3, %rax /* invalidate the TLB */ - movq %rax, %cr3 - jmp invltlb_ret_rax + call invltlb_handler + jmp invltlb_ret /* * Single page TLB shootdown @@ -261,86 +186,17 @@ IDTVEC(invltlb) .text SUPERALIGN_TEXT IDTVEC(invlpg_pcid) -#if defined(COUNT_XINVLTLB_HITS) || defined(COUNT_IPIS) PUSH_FRAME - movl PCPU(CPUID), %eax -#ifdef COUNT_XINVLTLB_HITS - incl xhits_pg(,%rax,4) -#endif -#ifdef COUNT_IPIS - movq ipi_invlpg_counts(,%rax,8),%rax - incq (%rax) -#endif - POP_FRAME -#endif - pushq %rax - pushq %rdx - movq $smp_tlb_invpcid,%rdx - cmpl $0,invpcid_works - jne 2f - - /* kernel pmap - use invlpg to invalidate global mapping */ - cmpl $0,(%rdx) - je 3f - cmpl $-1,(%rdx) - je global_invltlb - - /* - * PCID supported, but INVPCID is not. - * Temporarily switch to the target address space and do INVLPG. - */ - pushq %rcx - movq %cr3,%rcx - movq pcid_cr3,%rax - cmp %rcx,%rax - je 1f - btsq $63,%rax - movq %rax,%cr3 -1: movq 8(%rdx),%rax - invlpg (%rax) - btsq $63,%rcx - movq %rcx,%cr3 - popq %rcx - jmp invltlb_ret_rdx - - /* - * Invalidate the TLB entry using INVPCID_ADDR. - */ -2: - xorl %eax,%eax -/* invpcid (%rdx),%rax */ - .byte 0x66,0x0f,0x38,0x82,0x02 - jmp invltlb_ret_rdx - - /* - * PCID is not supported or kernel pmap. - * Invalidate single page using INVLPG. - */ -3: - movq 8(%rdx),%rax - invlpg (%rax) - jmp invltlb_ret_rdx + call invlpg_pcid_handler + jmp invltlb_ret SUPERALIGN_TEXT IDTVEC(invlpg) -#if defined(COUNT_XINVLTLB_HITS) || defined(COUNT_IPIS) PUSH_FRAME - movl PCPU(CPUID), %eax -#ifdef COUNT_XINVLTLB_HITS - incl xhits_pg(,%rax,4) -#endif -#ifdef COUNT_IPIS - movq ipi_invlpg_counts(,%rax,8),%rax - incq (%rax) -#endif - POP_FRAME -#endif - pushq %rax - movq smp_tlb_invpcid+8,%rax - invlpg (%rax) /* invalidate single page */ - jmp invltlb_ret_rax + call invlpg_handler + jmp invltlb_ret /* * Page range TLB shootdown. @@ -348,81 +204,10 @@ IDTVEC(invlpg) .text SUPERALIGN_TEXT IDTVEC(invlrng) -#if defined(COUNT_XINVLTLB_HITS) || defined(COUNT_IPIS) PUSH_FRAME - movl PCPU(CPUID), %eax -#ifdef COUNT_XINVLTLB_HITS - incl xhits_rng(,%rax,4) -#endif -#ifdef COUNT_IPIS - movq ipi_invlrng_counts(,%rax,8),%rax - incq (%rax) -#endif - POP_FRAME -#endif - pushq %rax - pushq %rdx - movq $smp_tlb_invpcid,%rdx - cmpl $0,pmap_pcid_enabled - je invlrng_single_page - - /* kernel pmap - use invlpg to invalidate global mapping */ - cmpl $0,(%rdx) - je invlrng_single_page - cmpl $-1,(%rdx) - je global_invltlb - cmpl $0,invpcid_works - jne invlrng_invpcid - - pushq %rcx - movq %cr3,%rcx - movq pcid_cr3,%rax - cmpq %rcx,%rax - je 1f - btsq $63,%rax - movq %rax,%cr3 -1: - movq 8(%rdx),%rdx - movq smp_tlb_addr2,%rax -2: - invlpg (%rdx) - addq $PAGE_SIZE,%rdx - cmpq %rax,%rdx - jb 2b - btsq $63,%rcx - movq %rcx,%cr3 - popq %rcx - jmp invltlb_ret_rdx - -invlrng_invpcid: - pushq %rcx - subq $16,%rsp - movq (%rdx),%rcx - movq %rcx,(%rsp) - movq 8(%rdx),%rax - movq %rax,8(%rsp) - movq smp_tlb_addr2,%rcx - subq %rax,%rcx - shrq $PAGE_SHIFT,%rcx -1: -// invpcid (%rdx),%rax - .byte 0x66,0x0f,0x38,0x82,0x02 - addq $PAGE_SIZE,8(%rsp) - dec %rcx - jne 1b - addq $16,%rsp - popq %rcx - jmp invltlb_ret_rdx - -invlrng_single_page: - movq 8(%rdx),%rdx - movq smp_tlb_addr2,%rax -1: invlpg (%rdx) /* invalidate single page */ - addq $PAGE_SIZE,%rdx - cmpq %rax,%rdx - jb 1b - jmp invltlb_ret_rdx + call invlrng_handler + jmp invltlb_ret /* * Invalidate cache. @@ -430,17 +215,10 @@ invlrng_single_page: .text SUPERALIGN_TEXT IDTVEC(invlcache) -#ifdef COUNT_IPIS PUSH_FRAME - movl PCPU(CPUID), %eax - movq ipi_invlcache_counts(,%rax,8),%rax - incq (%rax) - POP_FRAME -#endif - pushq %rax - wbinvd - jmp invltlb_ret_rax + call invlcache_handler + jmp invltlb_ret /* * Handler for IPIs sent via the per-cpu IPI bitmap. Modified: stable/10/sys/amd64/amd64/mp_machdep.c ============================================================================== --- stable/10/sys/amd64/amd64/mp_machdep.c Fri Apr 4 14:42:43 2014 (r264117) +++ stable/10/sys/amd64/amd64/mp_machdep.c Fri Apr 4 14:54:54 2014 (r264118) @@ -109,6 +109,7 @@ struct invpcid_descr smp_tlb_invpcid; volatile int smp_tlb_wait; uint64_t pcid_cr3; pmap_t smp_tlb_pmap; +extern int invpcid_works; #ifdef COUNT_IPIS /* Interrupt counts. */ @@ -1496,6 +1497,175 @@ cpususpend_handler(void) } /* + * Handlers for TLB related IPIs + */ +void +invltlb_handler(void) +{ +#ifdef COUNT_XINVLTLB_HITS + xhits_gbl[PCPU_GET(cpuid)]++; +#endif /* COUNT_XINVLTLB_HITS */ +#ifdef COUNT_IPIS + (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; +#endif /* COUNT_IPIS */ + + invltlb(); + atomic_add_int(&smp_tlb_wait, 1); +} + +void +invltlb_pcid_handler(void) +{ + uint64_t cr3; +#ifdef COUNT_XINVLTLB_HITS + xhits_gbl[PCPU_GET(cpuid)]++; +#endif /* COUNT_XINVLTLB_HITS */ +#ifdef COUNT_IPIS + (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; +#endif /* COUNT_IPIS */ + + cr3 = rcr3(); + if (smp_tlb_invpcid.pcid != (uint64_t)-1 && + smp_tlb_invpcid.pcid != 0) { + + if (invpcid_works) { + invpcid(&smp_tlb_invpcid, INVPCID_CTX); + } else { + /* Otherwise reload %cr3 twice. */ + if (cr3 != pcid_cr3) { + load_cr3(pcid_cr3); + cr3 |= CR3_PCID_SAVE; + } + load_cr3(cr3); + } + } else { + invltlb_globpcid(); + } + if (smp_tlb_pmap != NULL) + CPU_CLR_ATOMIC(PCPU_GET(cpuid), &smp_tlb_pmap->pm_save); + + atomic_add_int(&smp_tlb_wait, 1); +} + +void +invlpg_handler(void) +{ +#ifdef COUNT_XINVLTLB_HITS + xhits_pg[PCPU_GET(cpuid)]++; +#endif /* COUNT_XINVLTLB_HITS */ +#ifdef COUNT_IPIS + (*ipi_invlpg_counts[PCPU_GET(cpuid)])++; +#endif /* COUNT_IPIS */ + + invlpg(smp_tlb_invpcid.addr); + atomic_add_int(&smp_tlb_wait, 1); +} + +void +invlpg_pcid_handler(void) +{ +#ifdef COUNT_XINVLTLB_HITS + xhits_pg[PCPU_GET(cpuid)]++; +#endif /* COUNT_XINVLTLB_HITS */ +#ifdef COUNT_IPIS + (*ipi_invlpg_counts[PCPU_GET(cpuid)])++; +#endif /* COUNT_IPIS */ + + if (invpcid_works) { + invpcid(&smp_tlb_invpcid, INVPCID_ADDR); + } else if (smp_tlb_invpcid.pcid == 0) { + invlpg(smp_tlb_invpcid.addr); + } else if (smp_tlb_invpcid.pcid == (uint64_t)-1) { + invltlb_globpcid(); + } else { + uint64_t cr3; + + /* + * PCID supported, but INVPCID is not. + * Temporarily switch to the target address + * space and do INVLPG. + */ + cr3 = rcr3(); + if (cr3 != pcid_cr3) + load_cr3(pcid_cr3 | CR3_PCID_SAVE); + invlpg(smp_tlb_invpcid.addr); + load_cr3(cr3 | CR3_PCID_SAVE); + } + + atomic_add_int(&smp_tlb_wait, 1); +} + +static inline void +invlpg_range(vm_offset_t start, vm_offset_t end) +{ + + do { + invlpg(start); + start += PAGE_SIZE; + } while (start < end); +} + +void +invlrng_handler(void) +{ + vm_offset_t addr; +#ifdef COUNT_XINVLTLB_HITS + xhits_rng[PCPU_GET(cpuid)]++; +#endif /* COUNT_XINVLTLB_HITS */ +#ifdef COUNT_IPIS + (*ipi_invlrng_counts[PCPU_GET(cpuid)])++; +#endif /* COUNT_IPIS */ + + addr = smp_tlb_invpcid.addr; + if (pmap_pcid_enabled) { + if (invpcid_works) { + struct invpcid_descr d; + + d = smp_tlb_invpcid; + do { + invpcid(&d, INVPCID_ADDR); + d.addr += PAGE_SIZE; + } while (d.addr < smp_tlb_addr2); + } else if (smp_tlb_invpcid.pcid == 0) { + /* + * kernel pmap - use invlpg to invalidate + * global mapping. + */ + invlpg_range(addr, smp_tlb_addr2); + } else if (smp_tlb_invpcid.pcid == (uint64_t)-1) { + invltlb_globpcid(); + if (smp_tlb_pmap != NULL) { + CPU_CLR_ATOMIC(PCPU_GET(cpuid), + &smp_tlb_pmap->pm_save); + } + } else { + uint64_t cr3; + + cr3 = rcr3(); + if (cr3 != pcid_cr3) + load_cr3(pcid_cr3 | CR3_PCID_SAVE); + invlpg_range(addr, smp_tlb_addr2); + load_cr3(cr3 | CR3_PCID_SAVE); + } + } else { + invlpg_range(addr, smp_tlb_addr2); + } + + atomic_add_int(&smp_tlb_wait, 1); +} + +void +invlcache_handler(void) +{ +#ifdef COUNT_IPIS + (*ipi_invlcache_counts[PCPU_GET(cpuid)])++; +#endif /* COUNT_IPIS */ + + wbinvd(); + atomic_add_int(&smp_tlb_wait, 1); +} + +/* * This is called once the rest of the system is up and running and we're * ready to let the AP's out of the pen. */ Modified: stable/10/sys/amd64/include/smp.h ============================================================================== --- stable/10/sys/amd64/include/smp.h Fri Apr 4 14:42:43 2014 (r264117) +++ stable/10/sys/amd64/include/smp.h Fri Apr 4 14:54:54 2014 (r264118) @@ -62,6 +62,12 @@ struct pmap; void cpu_add(u_int apic_id, char boot_cpu); void cpustop_handler(void); void cpususpend_handler(void); +void invltlb_handler(void); +void invltlb_pcid_handler(void); +void invlpg_handler(void); +void invlpg_pcid_handler(void); +void invlrng_handler(void); +void invlcache_handler(void); void init_secondary(void); void ipi_startup(int apic_id, int vector); void ipi_all_but_self(u_int ipi); Modified: stable/10/sys/i386/i386/apic_vector.s ============================================================================== --- stable/10/sys/i386/i386/apic_vector.s Fri Apr 4 14:42:43 2014 (r264117) +++ stable/10/sys/i386/i386/apic_vector.s Fri Apr 4 14:54:54 2014 (r264118) @@ -163,39 +163,21 @@ IDTVEC(xen_intr_upcall) */ .text SUPERALIGN_TEXT -IDTVEC(invltlb) - pushl %eax - pushl %ds - movl $KDSEL, %eax /* Kernel data selector */ - movl %eax, %ds - -#if defined(COUNT_XINVLTLB_HITS) || defined(COUNT_IPIS) - pushl %fs - movl $KPSEL, %eax /* Private space selector */ - movl %eax, %fs - movl PCPU(CPUID), %eax - popl %fs -#ifdef COUNT_XINVLTLB_HITS - incl xhits_gbl(,%eax,4) -#endif -#ifdef COUNT_IPIS - movl ipi_invltlb_counts(,%eax,4),%eax - incl (%eax) -#endif -#endif - - movl %cr3, %eax /* invalidate the TLB */ - movl %eax, %cr3 - +invltlb_ret: movl lapic, %eax movl $0, LA_EOI(%eax) /* End Of Interrupt to APIC */ + POP_FRAME + iret + + SUPERALIGN_TEXT +IDTVEC(invltlb) + PUSH_FRAME + SET_KERNEL_SREGS + cld - lock - incl smp_tlb_wait + call invltlb_handler - popl %ds - popl %eax - iret + jmp invltlb_ret /* * Single page TLB shootdown @@ -203,38 +185,13 @@ IDTVEC(invltlb) .text SUPERALIGN_TEXT IDTVEC(invlpg) - pushl %eax - pushl %ds - movl $KDSEL, %eax /* Kernel data selector */ - movl %eax, %ds - -#if defined(COUNT_XINVLTLB_HITS) || defined(COUNT_IPIS) - pushl %fs - movl $KPSEL, %eax /* Private space selector */ - movl %eax, %fs - movl PCPU(CPUID), %eax - popl %fs -#ifdef COUNT_XINVLTLB_HITS - incl xhits_pg(,%eax,4) -#endif -#ifdef COUNT_IPIS - movl ipi_invlpg_counts(,%eax,4),%eax - incl (%eax) -#endif -#endif - - movl smp_tlb_addr1, %eax - invlpg (%eax) /* invalidate single page */ - - movl lapic, %eax - movl $0, LA_EOI(%eax) /* End Of Interrupt to APIC */ + PUSH_FRAME + SET_KERNEL_SREGS + cld - lock - incl smp_tlb_wait + call invlpg_handler - popl %ds - popl %eax - iret + jmp invltlb_ret /* * Page range TLB shootdown. @@ -242,44 +199,13 @@ IDTVEC(invlpg) .text SUPERALIGN_TEXT IDTVEC(invlrng) - pushl %eax - pushl %edx - pushl %ds - movl $KDSEL, %eax /* Kernel data selector */ - movl %eax, %ds - -#if defined(COUNT_XINVLTLB_HITS) || defined(COUNT_IPIS) - pushl %fs - movl $KPSEL, %eax /* Private space selector */ - movl %eax, %fs - movl PCPU(CPUID), %eax - popl %fs -#ifdef COUNT_XINVLTLB_HITS - incl xhits_rng(,%eax,4) -#endif -#ifdef COUNT_IPIS - movl ipi_invlrng_counts(,%eax,4),%eax - incl (%eax) -#endif -#endif + PUSH_FRAME + SET_KERNEL_SREGS + cld - movl smp_tlb_addr1, %edx - movl smp_tlb_addr2, %eax -1: invlpg (%edx) /* invalidate single page */ - addl $PAGE_SIZE, %edx - cmpl %eax, %edx - jb 1b + call invlrng_handler - movl lapic, %eax - movl $0, LA_EOI(%eax) /* End Of Interrupt to APIC */ - - lock - incl smp_tlb_wait - - popl %ds - popl %edx - popl %eax - iret + jmp invltlb_ret /* * Invalidate cache. @@ -287,32 +213,13 @@ IDTVEC(invlrng) .text SUPERALIGN_TEXT IDTVEC(invlcache) - pushl %eax - pushl %ds - movl $KDSEL, %eax /* Kernel data selector */ - movl %eax, %ds - -#ifdef COUNT_IPIS - pushl %fs - movl $KPSEL, %eax /* Private space selector */ - movl %eax, %fs - movl PCPU(CPUID), %eax - popl %fs - movl ipi_invlcache_counts(,%eax,4),%eax - incl (%eax) -#endif - - wbinvd - - movl lapic, %eax - movl $0, LA_EOI(%eax) /* End Of Interrupt to APIC */ + PUSH_FRAME + SET_KERNEL_SREGS + cld - lock - incl smp_tlb_wait + call invlcache_handler - popl %ds - popl %eax - iret + jmp invltlb_ret /* * Handler for IPIs sent via the per-cpu IPI bitmap. Modified: stable/10/sys/i386/i386/mp_machdep.c ============================================================================== --- stable/10/sys/i386/i386/mp_machdep.c Fri Apr 4 14:42:43 2014 (r264117) +++ stable/10/sys/i386/i386/mp_machdep.c Fri Apr 4 14:54:54 2014 (r264118) @@ -1551,6 +1551,72 @@ cpususpend_handler(void) CPU_CLR_ATOMIC(cpu, &suspended_cpus); CPU_CLR_ATOMIC(cpu, &started_cpus); } + +/* + * Handlers for TLB related IPIs + */ +void +invltlb_handler(void) +{ + uint64_t cr3; +#ifdef COUNT_XINVLTLB_HITS + xhits_gbl[PCPU_GET(cpuid)]++; +#endif /* COUNT_XINVLTLB_HITS */ +#ifdef COUNT_IPIS + (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; +#endif /* COUNT_IPIS */ + + cr3 = rcr3(); + load_cr3(cr3); + atomic_add_int(&smp_tlb_wait, 1); +} + +void +invlpg_handler(void) +{ +#ifdef COUNT_XINVLTLB_HITS + xhits_pg[PCPU_GET(cpuid)]++; +#endif /* COUNT_XINVLTLB_HITS */ +#ifdef COUNT_IPIS + (*ipi_invlpg_counts[PCPU_GET(cpuid)])++; +#endif /* COUNT_IPIS */ + + invlpg(smp_tlb_addr1); + + atomic_add_int(&smp_tlb_wait, 1); +} + +void +invlrng_handler(void) +{ + vm_offset_t addr; +#ifdef COUNT_XINVLTLB_HITS + xhits_rng[PCPU_GET(cpuid)]++; +#endif /* COUNT_XINVLTLB_HITS */ +#ifdef COUNT_IPIS + (*ipi_invlrng_counts[PCPU_GET(cpuid)])++; +#endif /* COUNT_IPIS */ + + addr = smp_tlb_addr1; + do { + invlpg(addr); + addr += PAGE_SIZE; + } while (addr < smp_tlb_addr2); + + atomic_add_int(&smp_tlb_wait, 1); +} + +void +invlcache_handler(void) +{ +#ifdef COUNT_IPIS + (*ipi_invlcache_counts[PCPU_GET(cpuid)])++; +#endif /* COUNT_IPIS */ + + wbinvd(); + atomic_add_int(&smp_tlb_wait, 1); +} + /* * This is called once the rest of the system is up and running and we're * ready to let the AP's out of the pen. Modified: stable/10/sys/i386/include/smp.h ============================================================================== --- stable/10/sys/i386/include/smp.h Fri Apr 4 14:42:43 2014 (r264117) +++ stable/10/sys/i386/include/smp.h Fri Apr 4 14:54:54 2014 (r264118) @@ -63,6 +63,10 @@ void cpustop_handler(void); #ifndef XEN void cpususpend_handler(void); #endif +void invltlb_handler(void); +void invlpg_handler(void); +void invlrng_handler(void); +void invlcache_handler(void); void init_secondary(void); void ipi_startup(int apic_id, int vector); void ipi_all_but_self(u_int ipi); Modified: stable/10/sys/i386/xen/mp_machdep.c ============================================================================== --- stable/10/sys/i386/xen/mp_machdep.c Fri Apr 4 14:42:43 2014 (r264117) +++ stable/10/sys/i386/xen/mp_machdep.c Fri Apr 4 14:54:54 2014 (r264118) @@ -1276,6 +1276,31 @@ cpustop_handler(void) } /* + * Handlers for TLB related IPIs + * + * On i386 Xen PV this are no-ops since this port doesn't support SMP. + */ +void +invltlb_handler(void) +{ +} + +void +invlpg_handler(void) +{ +} + +void +invlrng_handler(void) +{ +} + +void +invlcache_handler(void) +{ +} + +/* * This is called once the rest of the system is up and running and we're * ready to let the AP's out of the pen. */ Modified: stable/10/sys/x86/xen/hvm.c ============================================================================== --- stable/10/sys/x86/xen/hvm.c Fri Apr 4 14:42:43 2014 (r264117) +++ stable/10/sys/x86/xen/hvm.c Fri Apr 4 14:54:54 2014 (r264118) @@ -77,22 +77,12 @@ static void xen_hvm_cpu_resume(void); static void xen_hvm_cpu_init(void); /*---------------------------- Extern Declarations ---------------------------*/ -/* Variables used by mp_machdep to perform the MMU related IPIs */ -extern volatile int smp_tlb_wait; -extern vm_offset_t smp_tlb_addr2; -#ifdef __i386__ -extern vm_offset_t smp_tlb_addr1; -#else -extern struct invpcid_descr smp_tlb_invpcid; -extern uint64_t pcid_cr3; -extern int invpcid_works; -extern int pmap_pcid_enabled; -extern pmap_t smp_tlb_pmap; -#endif - #ifdef __i386__ extern void pmap_lazyfix_action(void); #endif +#ifdef __amd64__ +extern int pmap_pcid_enabled; +#endif /* Variables used by mp_machdep to perform the bitmap IPI */ extern volatile u_int cpu_ipi_pending[MAXCPU]; @@ -179,10 +169,7 @@ static int xen_smp_rendezvous_action(void *arg) { #ifdef COUNT_IPIS - int cpu; - - cpu = PCPU_GET(cpuid); - (*ipi_rendezvous_counts[cpu])++; + (*ipi_rendezvous_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ smp_rendezvous_action(); @@ -192,20 +179,8 @@ xen_smp_rendezvous_action(void *arg) static int xen_invltlb(void *arg) { -#if defined(COUNT_XINVLTLB_HITS) || defined(COUNT_IPIS) - int cpu; - - cpu = PCPU_GET(cpuid); -#ifdef COUNT_XINVLTLB_HITS - xhits_gbl[cpu]++; -#endif /* COUNT_XINVLTLB_HITS */ -#ifdef COUNT_IPIS - (*ipi_invltlb_counts[cpu])++; -#endif /* COUNT_IPIS */ -#endif /* COUNT_XINVLTLB_HITS || COUNT_IPIS */ - invltlb(); - atomic_add_int(&smp_tlb_wait, 1); + invltlb_handler(); return (FILTER_HANDLED); } @@ -213,40 +188,8 @@ xen_invltlb(void *arg) static int xen_invltlb_pcid(void *arg) { - uint64_t cr3; -#if defined(COUNT_XINVLTLB_HITS) || defined(COUNT_IPIS) - int cpu; - - cpu = PCPU_GET(cpuid); -#ifdef COUNT_XINVLTLB_HITS - xhits_gbl[cpu]++; -#endif /* COUNT_XINVLTLB_HITS */ -#ifdef COUNT_IPIS - (*ipi_invltlb_counts[cpu])++; -#endif /* COUNT_IPIS */ -#endif /* COUNT_XINVLTLB_HITS || COUNT_IPIS */ - cr3 = rcr3(); - if (smp_tlb_invpcid.pcid != (uint64_t)-1 && - smp_tlb_invpcid.pcid != 0) { - - if (invpcid_works) { - invpcid(&smp_tlb_invpcid, INVPCID_CTX); - } else { - /* Otherwise reload %cr3 twice. */ - if (cr3 != pcid_cr3) { - load_cr3(pcid_cr3); - cr3 |= CR3_PCID_SAVE; - } - load_cr3(cr3); - } - } else { - invltlb_globpcid(); - } - if (smp_tlb_pmap != NULL) - CPU_CLR_ATOMIC(PCPU_GET(cpuid), &smp_tlb_pmap->pm_save); - - atomic_add_int(&smp_tlb_wait, 1); + invltlb_pcid_handler(); return (FILTER_HANDLED); } #endif @@ -254,24 +197,8 @@ xen_invltlb_pcid(void *arg) static int xen_invlpg(void *arg) { -#if defined(COUNT_XINVLTLB_HITS) || defined(COUNT_IPIS) - int cpu; - - cpu = PCPU_GET(cpuid); -#ifdef COUNT_XINVLTLB_HITS - xhits_pg[cpu]++; -#endif /* COUNT_XINVLTLB_HITS */ -#ifdef COUNT_IPIS - (*ipi_invlpg_counts[cpu])++; -#endif /* COUNT_IPIS */ -#endif /* COUNT_XINVLTLB_HITS || COUNT_IPIS */ -#ifdef __i386__ - invlpg(smp_tlb_addr1); -#else - invlpg(smp_tlb_invpcid.addr); -#endif - atomic_add_int(&smp_tlb_wait, 1); + invlpg_handler(); return (FILTER_HANDLED); } @@ -279,125 +206,25 @@ xen_invlpg(void *arg) static int xen_invlpg_pcid(void *arg) { -#if defined(COUNT_XINVLTLB_HITS) || defined(COUNT_IPIS) - int cpu; - - cpu = PCPU_GET(cpuid); -#ifdef COUNT_XINVLTLB_HITS - xhits_pg[cpu]++; -#endif /* COUNT_XINVLTLB_HITS */ -#ifdef COUNT_IPIS - (*ipi_invlpg_counts[cpu])++; -#endif /* COUNT_IPIS */ -#endif /* COUNT_XINVLTLB_HITS || COUNT_IPIS */ - - if (invpcid_works) { - invpcid(&smp_tlb_invpcid, INVPCID_ADDR); - } else if (smp_tlb_invpcid.pcid == 0) { - invlpg(smp_tlb_invpcid.addr); - } else if (smp_tlb_invpcid.pcid == (uint64_t)-1) { - invltlb_globpcid(); - } else { - uint64_t cr3; - - /* - * PCID supported, but INVPCID is not. - * Temporarily switch to the target address - * space and do INVLPG. - */ - cr3 = rcr3(); - if (cr3 != pcid_cr3) - load_cr3(pcid_cr3 | CR3_PCID_SAVE); - invlpg(smp_tlb_invpcid.addr); - load_cr3(cr3 | CR3_PCID_SAVE); - } - atomic_add_int(&smp_tlb_wait, 1); + invlpg_pcid_handler(); return (FILTER_HANDLED); } #endif -static inline void -invlpg_range(vm_offset_t start, vm_offset_t end) -{ - do { - invlpg(start); - start += PAGE_SIZE; - } while (start < end); -} - static int xen_invlrng(void *arg) { - vm_offset_t addr; -#if defined(COUNT_XINVLTLB_HITS) || defined(COUNT_IPIS) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Fri Apr 4 19:17:34 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 825E02C9; Fri, 4 Apr 2014 19:17:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6EC1E6E9; Fri, 4 Apr 2014 19:17:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s34JHYkD048022; Fri, 4 Apr 2014 19:17:34 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s34JHYeL048020; Fri, 4 Apr 2014 19:17:34 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201404041917.s34JHYeL048020@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 4 Apr 2014 19:17:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264134 - stable/10/sys/amd64/amd64 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Apr 2014 19:17:34 -0000 Author: kib Date: Fri Apr 4 19:17:33 2014 New Revision: 264134 URL: http://svnweb.freebsd.org/changeset/base/264134 Log: MFC r263878: Several fixes for the PCID implementation. Modified: stable/10/sys/amd64/amd64/mp_machdep.c stable/10/sys/amd64/amd64/pmap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/mp_machdep.c ============================================================================== --- stable/10/sys/amd64/amd64/mp_machdep.c Fri Apr 4 18:10:11 2014 (r264133) +++ stable/10/sys/amd64/amd64/mp_machdep.c Fri Apr 4 19:17:33 2014 (r264134) @@ -1257,7 +1257,7 @@ smp_masked_invltlb(cpuset_t mask, pmap_t { if (smp_started) { - smp_targeted_tlb_shootdown(mask, IPI_INVLTLB, NULL, 0, 0); + smp_targeted_tlb_shootdown(mask, IPI_INVLTLB, pmap, 0, 0); #ifdef COUNT_XINVLTLB_HITS ipi_masked_global++; #endif @@ -1517,6 +1517,7 @@ void invltlb_pcid_handler(void) { uint64_t cr3; + u_int cpuid; #ifdef COUNT_XINVLTLB_HITS xhits_gbl[PCPU_GET(cpuid)]++; #endif /* COUNT_XINVLTLB_HITS */ @@ -1524,14 +1525,13 @@ invltlb_pcid_handler(void) (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ - cr3 = rcr3(); if (smp_tlb_invpcid.pcid != (uint64_t)-1 && smp_tlb_invpcid.pcid != 0) { - if (invpcid_works) { invpcid(&smp_tlb_invpcid, INVPCID_CTX); } else { /* Otherwise reload %cr3 twice. */ + cr3 = rcr3(); if (cr3 != pcid_cr3) { load_cr3(pcid_cr3); cr3 |= CR3_PCID_SAVE; @@ -1541,8 +1541,11 @@ invltlb_pcid_handler(void) } else { invltlb_globpcid(); } - if (smp_tlb_pmap != NULL) - CPU_CLR_ATOMIC(PCPU_GET(cpuid), &smp_tlb_pmap->pm_save); + if (smp_tlb_pmap != NULL) { + cpuid = PCPU_GET(cpuid); + if (!CPU_ISSET(cpuid, &smp_tlb_pmap->pm_active)) + CPU_CLR_ATOMIC(cpuid, &smp_tlb_pmap->pm_save); + } atomic_add_int(&smp_tlb_wait, 1); } @@ -1608,7 +1611,10 @@ invlpg_range(vm_offset_t start, vm_offse void invlrng_handler(void) { + struct invpcid_descr d; vm_offset_t addr; + uint64_t cr3; + u_int cpuid; #ifdef COUNT_XINVLTLB_HITS xhits_rng[PCPU_GET(cpuid)]++; #endif /* COUNT_XINVLTLB_HITS */ @@ -1618,15 +1624,7 @@ invlrng_handler(void) addr = smp_tlb_invpcid.addr; if (pmap_pcid_enabled) { - if (invpcid_works) { - struct invpcid_descr d; - - d = smp_tlb_invpcid; - do { - invpcid(&d, INVPCID_ADDR); - d.addr += PAGE_SIZE; - } while (d.addr < smp_tlb_addr2); - } else if (smp_tlb_invpcid.pcid == 0) { + if (smp_tlb_invpcid.pcid == 0) { /* * kernel pmap - use invlpg to invalidate * global mapping. @@ -1635,12 +1633,18 @@ invlrng_handler(void) } else if (smp_tlb_invpcid.pcid == (uint64_t)-1) { invltlb_globpcid(); if (smp_tlb_pmap != NULL) { - CPU_CLR_ATOMIC(PCPU_GET(cpuid), - &smp_tlb_pmap->pm_save); + cpuid = PCPU_GET(cpuid); + if (!CPU_ISSET(cpuid, &smp_tlb_pmap->pm_active)) + CPU_CLR_ATOMIC(cpuid, + &smp_tlb_pmap->pm_save); } + } else if (invpcid_works) { + d = smp_tlb_invpcid; + do { + invpcid(&d, INVPCID_ADDR); + d.addr += PAGE_SIZE; + } while (d.addr <= smp_tlb_addr2); } else { - uint64_t cr3; - cr3 = rcr3(); if (cr3 != pcid_cr3) load_cr3(pcid_cr3 | CR3_PCID_SAVE); Modified: stable/10/sys/amd64/amd64/pmap.c ============================================================================== --- stable/10/sys/amd64/amd64/pmap.c Fri Apr 4 18:10:11 2014 (r264133) +++ stable/10/sys/amd64/amd64/pmap.c Fri Apr 4 19:17:33 2014 (r264134) @@ -838,7 +838,7 @@ pmap_bootstrap(vm_paddr_t *firstaddr) kernel_pmap->pm_pml4 = (pdp_entry_t *)PHYS_TO_DMAP(KPML4phys); kernel_pmap->pm_cr3 = KPML4phys; CPU_FILL(&kernel_pmap->pm_active); /* don't allow deactivation */ - CPU_ZERO(&kernel_pmap->pm_save); + CPU_FILL(&kernel_pmap->pm_save); /* always superset of pm_active */ TAILQ_INIT(&kernel_pmap->pm_pvchunk); kernel_pmap->pm_flags = pmap_flags; @@ -1492,7 +1492,8 @@ pmap_invalidate_all(pmap_t pmap) } else { invltlb_globpcid(); } - CPU_CLR_ATOMIC(cpuid, &pmap->pm_save); + if (!CPU_ISSET(cpuid, &pmap->pm_active)) + CPU_CLR_ATOMIC(cpuid, &pmap->pm_save); smp_invltlb(pmap); } else { other_cpus = all_cpus; @@ -1526,7 +1527,8 @@ pmap_invalidate_all(pmap_t pmap) } } else if (CPU_ISSET(cpuid, &pmap->pm_active)) invltlb(); - CPU_CLR_ATOMIC(cpuid, &pmap->pm_save); + if (!CPU_ISSET(cpuid, &pmap->pm_active)) + CPU_CLR_ATOMIC(cpuid, &pmap->pm_save); if (pmap_pcid_enabled) CPU_AND(&other_cpus, &pmap->pm_save); else From owner-svn-src-stable@FreeBSD.ORG Fri Apr 4 21:35:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5DFC1D16; Fri, 4 Apr 2014 21:35:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4AA35405; Fri, 4 Apr 2014 21:35:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s34LZIb3007117; Fri, 4 Apr 2014 21:35:18 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s34LZIhA007116; Fri, 4 Apr 2014 21:35:18 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404042135.s34LZIhA007116@svn.freebsd.org> From: Glen Barber Date: Fri, 4 Apr 2014 21:35:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264140 - stable/10/release/doc/en_US.ISO8859-1/errata X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Apr 2014 21:35:18 -0000 Author: gjb Date: Fri Apr 4 21:35:17 2014 New Revision: 264140 URL: http://svnweb.freebsd.org/changeset/base/264140 Log: Document a potential panic or hang when using sas2flash to update firmware on mps(4) LSI controllers. Submitted by: smh Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Fri Apr 4 21:09:06 2014 (r264139) +++ stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Fri Apr 4 21:35:17 2014 (r264140) @@ -243,6 +243,16 @@ boot it from mounting any UDF file system. This has been fixed in &os;-CURRENT and &os; &release.current;.
+ + + Updating LSI firmware on &man.mps.4; controllers with + the sas2flash utility may cause + the system to hang, or may cause the sytem to panic. This + is fixed in the stable/10 branch with + revisions r262553 and + r262575, and will be included in + &os; 10.1-RELEASE. + From owner-svn-src-stable@FreeBSD.ORG Fri Apr 4 22:20:35 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BABBEDC2; Fri, 4 Apr 2014 22:20:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4EC39E9; Fri, 4 Apr 2014 22:20:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s34MKZ2Z024644; Fri, 4 Apr 2014 22:20:35 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s34MKXI4024632; Fri, 4 Apr 2014 22:20:33 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404042220.s34MKXI4024632@svn.freebsd.org> From: Glen Barber Date: Fri, 4 Apr 2014 22:20:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264141 - in stable/9: release release/arm release/tools release/tools/arm share/man/man7 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Apr 2014 22:20:35 -0000 Author: gjb Date: Fri Apr 4 22:20:33 2014 New Revision: 264141 URL: http://svnweb.freebsd.org/changeset/base/264141 Log: MFC r262810, r262862, r264105, r264107: r262810: Merge enabling building FreeBSD/arm images as part of the release build process. r262862: Provide backwards-compatibility with release.conf SVNROOT entries that do not have a trailing '/'. r264105: Add ZEDBOARD support for release builds. r264107: Remove only-works-on-amd64 restriction. * Local modifications to stable/9: - Set SRCBRANCH from head/ to stable/9/. Sponsored by: The FreeBSD Foundation Added: stable/9/release/arm/ - copied from r262810, head/release/arm/ stable/9/release/arm/ZEDBOARD.conf - copied, changed from r264105, head/release/arm/ZEDBOARD.conf stable/9/release/tools/ - copied from r262810, head/release/tools/ stable/9/release/tools/arm/crochet-ZEDBOARD.conf - copied unchanged from r264105, head/release/tools/arm/crochet-ZEDBOARD.conf Modified: stable/9/release/arm/BEAGLEBONE.conf stable/9/release/arm/PANDABOARD.conf stable/9/release/arm/RPI-B.conf stable/9/release/arm/WANDBOARD-QUAD.conf stable/9/release/release.conf.sample stable/9/release/release.sh stable/9/share/man/man7/release.7 Directory Properties: stable/9/release/ (props changed) stable/9/share/man/man7/ (props changed) Modified: stable/9/release/arm/BEAGLEBONE.conf ============================================================================== --- head/release/arm/BEAGLEBONE.conf Wed Mar 5 23:17:53 2014 (r262810) +++ stable/9/release/arm/BEAGLEBONE.conf Fri Apr 4 22:20:33 2014 (r264141) @@ -2,19 +2,11 @@ # $FreeBSD$ # -# This is only supported on amd64 right now. It may work on -# i386, but I do not have the hardware to test, so until I get -# a VM set up to make sure, be cautious and assume it will not. -if [ "$(uname -p)" != "amd64" ] || [ "$(uname -m)" != "amd64" ]; then - echo "This is only supported on amd64 right now." - exit 0 -fi - # Build chroot configuration TARGET="amd64" TARGET_ARCH="amd64" SVNROOT="svn://svn.FreeBSD.org/" -SRCBRANCH="base/head@rHEAD" +SRCBRANCH="base/stable/9@rHEAD" DOCBRANCH="doc/head@rHEAD" PORTBRANCH="ports/head@rHEAD" NODOC=yes Modified: stable/9/release/arm/PANDABOARD.conf ============================================================================== --- head/release/arm/PANDABOARD.conf Wed Mar 5 23:17:53 2014 (r262810) +++ stable/9/release/arm/PANDABOARD.conf Fri Apr 4 22:20:33 2014 (r264141) @@ -2,19 +2,11 @@ # $FreeBSD$ # -# This is only supported on amd64 right now. It may work on -# i386, but I do not have the hardware to test, so until I get -# a VM set up to make sure, be cautious and assume it will not. -if [ "$(uname -p)" != "amd64" ] || [ "$(uname -m)" != "amd64" ]; then - echo "This is only supported on amd64 right now." - exit 0 -fi - # Build chroot configuration TARGET="amd64" TARGET_ARCH="amd64" SVNROOT="svn://svn.FreeBSD.org/" -SRCBRANCH="base/head@rHEAD" +SRCBRANCH="base/stable/9@rHEAD" DOCBRANCH="doc/head@rHEAD" PORTBRANCH="ports/head@rHEAD" NODOC=yes Modified: stable/9/release/arm/RPI-B.conf ============================================================================== --- head/release/arm/RPI-B.conf Wed Mar 5 23:17:53 2014 (r262810) +++ stable/9/release/arm/RPI-B.conf Fri Apr 4 22:20:33 2014 (r264141) @@ -2,19 +2,11 @@ # $FreeBSD$ # -# This is only supported on amd64 right now. It may work on -# i386, but I do not have the hardware to test, so until I get -# a VM set up to make sure, be cautious and assume it will not. -if [ "$(uname -p)" != "amd64" ] || [ "$(uname -m)" != "amd64" ]; then - echo "This is only supported on amd64 right now." - exit 0 -fi - # Build chroot configuration TARGET="amd64" TARGET_ARCH="amd64" SVNROOT="svn://svn.FreeBSD.org/" -SRCBRANCH="base/head@rHEAD" +SRCBRANCH="base/stable/9@rHEAD" DOCBRANCH="doc/head@rHEAD" PORTBRANCH="ports/head@rHEAD" NODOC=yes Modified: stable/9/release/arm/WANDBOARD-QUAD.conf ============================================================================== --- head/release/arm/WANDBOARD-QUAD.conf Wed Mar 5 23:17:53 2014 (r262810) +++ stable/9/release/arm/WANDBOARD-QUAD.conf Fri Apr 4 22:20:33 2014 (r264141) @@ -2,19 +2,11 @@ # $FreeBSD$ # -# This is only supported on amd64 right now. It may work on -# i386, but I do not have the hardware to test, so until I get -# a VM set up to make sure, be cautious and assume it will not. -if [ "$(uname -p)" != "amd64" ] || [ "$(uname -m)" != "amd64" ]; then - echo "This is only supported on amd64 right now." - exit 0 -fi - # Build chroot configuration TARGET="amd64" TARGET_ARCH="amd64" SVNROOT="svn://svn.FreeBSD.org/" -SRCBRANCH="base/head@rHEAD" +SRCBRANCH="base/stable/9@rHEAD" DOCBRANCH="doc/head@rHEAD" PORTBRANCH="ports/head@rHEAD" NODOC=yes Copied and modified: stable/9/release/arm/ZEDBOARD.conf (from r264105, head/release/arm/ZEDBOARD.conf) ============================================================================== --- head/release/arm/ZEDBOARD.conf Fri Apr 4 07:02:38 2014 (r264105, copy source) +++ stable/9/release/arm/ZEDBOARD.conf Fri Apr 4 22:20:33 2014 (r264141) @@ -6,7 +6,7 @@ TARGET="amd64" TARGET_ARCH="amd64" SVNROOT="svn://svn.FreeBSD.org/" -SRCBRANCH="base/head@rHEAD" +SRCBRANCH="base/stable/9@rHEAD" DOCBRANCH="doc/head@rHEAD" PORTBRANCH="ports/head@rHEAD" NODOC=yes Modified: stable/9/release/release.conf.sample ============================================================================== --- stable/9/release/release.conf.sample Fri Apr 4 21:35:17 2014 (r264140) +++ stable/9/release/release.conf.sample Fri Apr 4 22:20:33 2014 (r264141) @@ -45,5 +45,17 @@ PORTBRANCH="ports/head@rHEAD" ## Set miscellaneous 'make release' settings. #NODOC= #NOPORTS= -#RELSTRING= #WITH_DVD= + +## Set when building embedded images. +#EMBEDDEDBUILD= + +## Set to skip the chroot environment buildworld/installworld/distribution +## step if it is expected the build environment will exist via alternate +## means. +#CHROOTBUILD_SKIP= + +## Set to pass additional flags to make(1) for the build chroot setup, such +## as TARGET/TARGET_ARCH. +#CHROOT_MAKEENV= + Modified: stable/9/release/release.sh ============================================================================== --- stable/9/release/release.sh Fri Apr 4 21:35:17 2014 (r264140) +++ stable/9/release/release.sh Fri Apr 4 22:20:33 2014 (r264141) @@ -41,6 +41,7 @@ export PATH # The directory within which the release will be built. CHROOTDIR="/scratch" +RELENGDIR="$(realpath $(dirname $(basename ${0})))" # The default version control system command to obtain the sources. VCSCMD="svn checkout" @@ -52,6 +53,9 @@ SRCBRANCH="base/head@rHEAD" DOCBRANCH="doc/head@rHEAD" PORTBRANCH="ports/head@rHEAD" +# Set for embedded device builds. +EMBEDDEDBUILD= + # Sometimes one needs to checkout src with --force svn option. # If custom kernel configs copied to src tree before checkout, e.g. SRC_FORCE_CHECKOUT= @@ -103,14 +107,33 @@ while getopts c: opt; do done shift $(($OPTIND - 1)) +# Fix for backwards-compatibility with release.conf that does not have the +# trailing '/'. +case ${SVNROOT} in + *svn*) + SVNROOT="${SVNROOT}/" + ;; + *) + ;; +esac + # Prefix the branches with the SVNROOT for the full checkout URL. SRCBRANCH="${SVNROOT}${SRCBRANCH}" DOCBRANCH="${SVNROOT}${DOCBRANCH}" PORTBRANCH="${SVNROOT}${PORTBRANCH}" +if [ -n "${EMBEDDEDBUILD}" ]; then + if [ -z "${XDEV}" ] || [ -z "${XDEV_ARCH}" ]; then + echo "ERROR: XDEV and XDEV_ARCH must be set in ${RELEASECONF}." + exit 1 + fi + WITH_DVD= + NODOC=yes +fi + # If PORTS is set and NODOC is unset, force NODOC=yes because the ports tree # is required to build the documentation set. -if [ "x${NOPORTS}" != "x" ] && [ "x${NODOC}" = "x" ]; then +if [ -n "${NOPORTS}" ] && [ -z "${NODOC}" ]; then echo "*** NOTICE: Setting NODOC=1 since ports tree is required" echo " and NOPORTS is set." NODOC=yes @@ -120,10 +143,10 @@ fi # The release makefile verifies definedness of NOPORTS/NODOC variables # instead of their values. DOCPORTS= -if [ "x${NOPORTS}" != "x" ]; then +if [ -n "${NOPORTS}" ]; then DOCPORTS="NOPORTS=yes " fi -if [ "x${NODOC}" != "x" ]; then +if [ -n "${NODOC}" ]; then DOCPORTS="${DOCPORTS}NODOC=yes" fi @@ -131,12 +154,12 @@ fi # this file, unless overridden by release.conf. In most cases, these # will not need to be changed. CONF_FILES="__MAKE_CONF=${MAKE_CONF} SRCCONF=${SRC_CONF}" -if [ "x${TARGET}" != "x" ] && [ "x${TARGET_ARCH}" != "x" ]; then +if [ -n "${TARGET}" ] && [ -n "${TARGET_ARCH}" ]; then ARCH_FLAGS="TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH}" else ARCH_FLAGS= fi -CHROOT_MAKEENV="MAKEOBJDIRPREFIX=${CHROOTDIR}/tmp/obj" +CHROOT_MAKEENV="${CHROOT_MAKEENV} MAKEOBJDIRPREFIX=${CHROOTDIR}/tmp/obj" CHROOT_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${CONF_FILES}" CHROOT_IMAKEFLAGS="${CONF_FILES}" CHROOT_DMAKEFLAGS="${CONF_FILES}" @@ -147,11 +170,11 @@ RELEASE_RMAKEFLAGS="${ARCH_FLAGS} KERNCO # Force src checkout if configured FORCE_SRC_KEY= -if [ "x${SRC_FORCE_CHECKOUT}" != "x" ]; then +if [ -n "${SRC_FORCE_CHECKOUT}" ]; then FORCE_SRC_KEY="--force" fi -if [ ! ${CHROOTDIR} ]; then +if [ -z "${CHROOTDIR}" ]; then echo "Please set CHROOTDIR." exit 1 fi @@ -166,19 +189,21 @@ set -e # Everything must succeed mkdir -p ${CHROOTDIR}/usr ${VCSCMD} ${FORCE_SRC_KEY} ${SRCBRANCH} ${CHROOTDIR}/usr/src -if [ "x${NODOC}" = "x" ]; then +if [ -z "${NODOC}" ]; then ${VCSCMD} ${DOCBRANCH} ${CHROOTDIR}/usr/doc fi -if [ "x${NOPORTS}" = "x" ]; then +if [ -z "${NOPORTS}" ]; then ${VCSCMD} ${PORTBRANCH} ${CHROOTDIR}/usr/ports fi -cd ${CHROOTDIR}/usr/src -env ${CHROOT_MAKEENV} make ${CHROOT_WMAKEFLAGS} buildworld -env ${CHROOT_MAKEENV} make ${CHROOT_IMAKEFLAGS} installworld \ - DESTDIR=${CHROOTDIR} -env ${CHROOT_MAKEENV} make ${CHROOT_DMAKEFLAGS} distribution \ - DESTDIR=${CHROOTDIR} +if [ -z "${CHROOTBUILD_SKIP}" ]; then + cd ${CHROOTDIR}/usr/src + env ${CHROOT_MAKEENV} make ${CHROOT_WMAKEFLAGS} buildworld + env ${CHROOT_MAKEENV} make ${CHROOT_IMAKEFLAGS} installworld \ + DESTDIR=${CHROOTDIR} + env ${CHROOT_MAKEENV} make ${CHROOT_DMAKEFLAGS} distribution \ + DESTDIR=${CHROOTDIR} +fi mount -t devfs devfs ${CHROOTDIR}/dev cp /etc/resolv.conf ${CHROOTDIR}/etc/resolv.conf trap "umount ${CHROOTDIR}/dev" EXIT # Clean up devfs mount on exit @@ -194,6 +219,29 @@ if [ -e ${SRC_CONF} ] && [ ! -c ${SRC_CO cp ${SRC_CONF} ${CHROOTDIR}/${SRC_CONF} fi +# Embedded builds do not use the 'make release' target. +if [ -n "${EMBEDDEDBUILD}" ]; then + # If a crochet configuration file exists in *this* checkout of + # release/, copy it to the /tmp/external directory within the chroot. + # This allows building embedded releases without relying on updated + # scripts and/or configurations to exist in the branch being built. + if [ -e ${RELENGDIR}/tools/${XDEV}/crochet-${KERNEL}.conf ] && \ + [ -e ${RELENGDIR}/${XDEV}/release.sh ]; then + mkdir -p ${CHROOTDIR}/tmp/external/${XDEV}/ + cp ${RELENGDIR}/tools/${XDEV}/crochet-${KERNEL}.conf \ + ${CHROOTDIR}/tmp/external/${XDEV}/crochet-${KERNEL}.conf + /bin/sh ${RELENGDIR}/${XDEV}/release.sh + fi + # If the script does not exist for this architecture, exit. + # This probably should be checked earlier, but allowing the rest + # of the build process to get this far will at least set up the + # chroot environment for testing. + exit 0 +else + # Not embedded. + continue +fi + if [ -d ${CHROOTDIR}/usr/ports ]; then # Run ldconfig(8) in the chroot directory so /var/run/ld-elf*.so.hints # is created. This is needed by ports-mgmt/pkg. @@ -201,7 +249,7 @@ if [ -d ${CHROOTDIR}/usr/ports ]; then ## Trick the ports 'run-autotools-fixup' target to do the right thing. _OSVERSION=$(sysctl -n kern.osreldate) - if [ -d ${CHROOTDIR}/usr/doc ] && [ "x${NODOC}" = "x" ]; then + if [ -d ${CHROOTDIR}/usr/doc ] && [ -z "${NODOC}" ]; then PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes" PBUILD_FLAGS="${PBUILD_FLAGS}" chroot ${CHROOTDIR} make -C /usr/ports/textproc/docproj \ @@ -209,13 +257,9 @@ if [ -d ${CHROOTDIR}/usr/ports ]; then fi fi -if [ "x${RELSTRING}" = "x" ]; then - RELSTRING="$(chroot ${CHROOTDIR} uname -s)-${OSRELEASE}-${TARGET_ARCH}" -fi - eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_WMAKEFLAGS} buildworld eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_KMAKEFLAGS} buildkernel eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \ - release RELSTRING=${RELSTRING} + release eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \ - install DESTDIR=/R RELSTRING=${RELSTRING} + install DESTDIR=/R Copied: stable/9/release/tools/arm/crochet-ZEDBOARD.conf (from r264105, head/release/tools/arm/crochet-ZEDBOARD.conf) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/release/tools/arm/crochet-ZEDBOARD.conf Fri Apr 4 22:20:33 2014 (r264141, copy of r264105, head/release/tools/arm/crochet-ZEDBOARD.conf) @@ -0,0 +1,29 @@ +# +# $FreeBSD$ +# + +# This is the configuration file for use with crochet to produce +# FreeBSD ZedBoard images. + +board_setup ZedBoard +option ImageSize 1gb +option AutoSize + +export MAKEOBJDIRPREFIX=/usr/obj +FREEBSD_SRC=/usr/src +__MAKE_CONF=/dev/null +SRCCONF=/dev/null +WORKDIR=/usr/obj +_BRANCH=$(make -C ${FREEBSD_SRC}/release -V BRANCH) +_REVISION=$(make -C ${FREEBSD_SRC}/release -V REVISION) +KERNCONF=ZEDBOARD +TARGET=arm +TARGET_ARCH=armv6 +FREEBSD_BUILDWORLD_EXTRA_ARGS="${WORLD_FLAGS}" +FREEBSD_BUILDKERNEL_EXTRA_ARGS="${KERNEL_FLAGS}" +FREEBSD_INSTALLWORLD_EXTRA_ARGS="" +FREEBSD_INSTALLKERNEL_EXTRA_ARGS="" +FREEBSD_WORLD_EXTRA_ARGS="" +FREEBSD_KERNEL_EXTRA_ARGS="" +FREEBSD_EXTRA_ARGS="" +IMG=${WORKDIR}/FreeBSD-${_REVISION}-${_BRANCH}-${TARGET}-${TARGET_ARCH}-${KERNCONF}.img Modified: stable/9/share/man/man7/release.7 ============================================================================== --- stable/9/share/man/man7/release.7 Fri Apr 4 21:35:17 2014 (r264140) +++ stable/9/share/man/man7/release.7 Fri Apr 4 22:20:33 2014 (r264141) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 25, 2014 +.Dd March 5, 2014 .Dt RELEASE 7 .Os .Sh NAME @@ -138,6 +138,11 @@ configuration file supports the followin .Bl -tag -width Ev .It Va CHROOTDIR The directory within which the release will be built. +.It Va CHROOT_MAKEENV +Additional +.Xr make 1 +arguments to pass through, which directly affect the +tuning of the build chroot. .It Va SVNROOT The .Xr svn 1 @@ -249,6 +254,72 @@ target. The command run to obtain the source trees. Defaults to .Qq Cm svn checkout . +.It Va CHROOTBUILD_SKIP +If defined, the +.Li buildworld , +.Li installworld , +and +.Li distribution +stages of the +.Xr chroot 8 +build environment setup are skipped. +This is intended solely for cases where the +.Xr chroot 8 +userland are provided by alternate means. +.El +.Sh EMBEDDED BUILDS +The following +.Fa release.conf +variables are relevant only to release builds for embedded systems: +.Bl -tag -width Ev +.It Va EMBEDDEDBUILD +Set to a non-null value to enable functionality for embedded device +release builds. +.Pq This option is considered highly experimental. +.Pp +When set, +.Va WITH_DVD +is unset, and +.Va NODOC +is defined. +Additionally, +.Va XDEV +and +.Va XDEV_ARCH +must also be defined. +When the build environment is created, +.Fa release.sh +runs a separate build script located in an architecture-specific +directory in +.Pa src/release/${XDEV}/ . +.It Va EMBEDDEDPORTS +Set to the list of any ports that are required for the target device +in the format of +.Fa category/port . +The +.Fa devel/subversion +port is built by default. +.It Va CROCHETSRC +Set to the source URL for the Crochet build tool. +.It Va CROCHETBRANCH +Set to the subversion branch from +.Va ${CROCHETSRC} +to use. +Defaults to +.Pa trunk . +.It Va UBOOTSRC +Set to the source URL of u-boot, if required. +.It Va UBOOTBRANCH +Set to the subversion branch from +.Va ${UBOOTSRC} +to use. +Defaults to +.Pa trunk . +.It Va UBOOTDIR +Set to the target directory within +.Va ${CHROOTDIR} +to check out +.Va ${UBOOTSRC}/${UBOOTBRANCH} . .El .Sh MAKEFILE TARGETS The release makefile From owner-svn-src-stable@FreeBSD.ORG Sat Apr 5 14:24:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17A6855E; Sat, 5 Apr 2014 14:24:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02F02607; Sat, 5 Apr 2014 14:24:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s35EOTVf021479; Sat, 5 Apr 2014 14:24:29 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s35EOTr3021476; Sat, 5 Apr 2014 14:24:29 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201404051424.s35EOTr3021476@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 5 Apr 2014 14:24:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264147 - in stable/10/sys: amd64/amd64 i386/i386 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Apr 2014 14:24:30 -0000 Author: kib Date: Sat Apr 5 14:24:29 2014 New Revision: 264147 URL: http://svnweb.freebsd.org/changeset/base/264147 Log: MFC r263912: Clear the kernel grab of the FPU state on fork. Modified: stable/10/sys/amd64/amd64/vm_machdep.c stable/10/sys/i386/i386/vm_machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/vm_machdep.c ============================================================================== --- stable/10/sys/amd64/amd64/vm_machdep.c Sat Apr 5 14:09:16 2014 (r264146) +++ stable/10/sys/amd64/amd64/vm_machdep.c Sat Apr 5 14:24:29 2014 (r264147) @@ -446,7 +446,8 @@ cpu_set_upcall(struct thread *td, struct * values here. */ bcopy(td0->td_pcb, pcb2, sizeof(*pcb2)); - clear_pcb_flags(pcb2, PCB_FPUINITDONE | PCB_USERFPUINITDONE); + clear_pcb_flags(pcb2, PCB_FPUINITDONE | PCB_USERFPUINITDONE | + PCB_KERNFPU); pcb2->pcb_save = get_pcb_user_save_pcb(pcb2); bcopy(get_pcb_user_save_td(td0), pcb2->pcb_save, cpu_max_ext_state_size); Modified: stable/10/sys/i386/i386/vm_machdep.c ============================================================================== --- stable/10/sys/i386/i386/vm_machdep.c Sat Apr 5 14:09:16 2014 (r264146) +++ stable/10/sys/i386/i386/vm_machdep.c Sat Apr 5 14:24:29 2014 (r264147) @@ -457,7 +457,8 @@ cpu_set_upcall(struct thread *td, struct * values here. */ bcopy(td0->td_pcb, pcb2, sizeof(*pcb2)); - pcb2->pcb_flags &= ~(PCB_NPXINITDONE | PCB_NPXUSERINITDONE); + pcb2->pcb_flags &= ~(PCB_NPXINITDONE | PCB_NPXUSERINITDONE | + PCB_KERNNPX); pcb2->pcb_save = &pcb2->pcb_user_save; /* From owner-svn-src-stable@FreeBSD.ORG Sat Apr 5 14:24:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1380268D; Sat, 5 Apr 2014 14:24:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F3B7160A; Sat, 5 Apr 2014 14:24:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s35EOjF6021541; Sat, 5 Apr 2014 14:24:45 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s35EOjXj021539; Sat, 5 Apr 2014 14:24:45 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201404051424.s35EOjXj021539@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 5 Apr 2014 14:24:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264148 - in stable/9/sys: amd64/amd64 i386/i386 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Apr 2014 14:24:46 -0000 Author: kib Date: Sat Apr 5 14:24:45 2014 New Revision: 264148 URL: http://svnweb.freebsd.org/changeset/base/264148 Log: MFC r263912: Clear the kernel grab of the FPU state on fork. Modified: stable/9/sys/amd64/amd64/vm_machdep.c stable/9/sys/i386/i386/vm_machdep.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/vm_machdep.c ============================================================================== --- stable/9/sys/amd64/amd64/vm_machdep.c Sat Apr 5 14:24:29 2014 (r264147) +++ stable/9/sys/amd64/amd64/vm_machdep.c Sat Apr 5 14:24:45 2014 (r264148) @@ -446,7 +446,8 @@ cpu_set_upcall(struct thread *td, struct * values here. */ bcopy(td0->td_pcb, pcb2, sizeof(*pcb2)); - clear_pcb_flags(pcb2, PCB_FPUINITDONE | PCB_USERFPUINITDONE); + clear_pcb_flags(pcb2, PCB_FPUINITDONE | PCB_USERFPUINITDONE | + PCB_KERNFPU); pcb2->pcb_save = get_pcb_user_save_pcb(pcb2); bcopy(get_pcb_user_save_td(td0), pcb2->pcb_save, cpu_max_ext_state_size); Modified: stable/9/sys/i386/i386/vm_machdep.c ============================================================================== --- stable/9/sys/i386/i386/vm_machdep.c Sat Apr 5 14:24:29 2014 (r264147) +++ stable/9/sys/i386/i386/vm_machdep.c Sat Apr 5 14:24:45 2014 (r264148) @@ -444,7 +444,8 @@ cpu_set_upcall(struct thread *td, struct * values here. */ bcopy(td0->td_pcb, pcb2, sizeof(*pcb2)); - pcb2->pcb_flags &= ~(PCB_NPXINITDONE | PCB_NPXUSERINITDONE); + pcb2->pcb_flags &= ~(PCB_NPXINITDONE | PCB_NPXUSERINITDONE | + PCB_KERNNPX); pcb2->pcb_save = &pcb2->pcb_user_save; /* From owner-svn-src-stable@FreeBSD.ORG Sat Apr 5 19:43:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53E0679C; Sat, 5 Apr 2014 19:43:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26A406E8; Sat, 5 Apr 2014 19:43:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s35Jhlg7052762; Sat, 5 Apr 2014 19:43:47 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s35JhlpX052761; Sat, 5 Apr 2014 19:43:47 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201404051943.s35JhlpX052761@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 5 Apr 2014 19:43:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264166 - stable/10/bin/sh X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Apr 2014 19:43:48 -0000 Author: jilles Date: Sat Apr 5 19:43:47 2014 New Revision: 264166 URL: http://svnweb.freebsd.org/changeset/base/264166 Log: MFC r262755: sh: Make argstr() return where it stopped and simplify expari() using this. Modified: stable/10/bin/sh/expand.c Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/sh/expand.c ============================================================================== --- stable/10/bin/sh/expand.c Sat Apr 5 19:08:16 2014 (r264165) +++ stable/10/bin/sh/expand.c Sat Apr 5 19:43:47 2014 (r264166) @@ -98,7 +98,7 @@ static struct ifsregion ifsfirst; /* fir static struct ifsregion *ifslastp; /* last struct in list */ static struct arglist exparg; /* holds expanded arg list */ -static void argstr(char *, int); +static char *argstr(char *, int); static char *exptilde(char *, int); static char *expari(char *); static void expbackq(union node *, int, int); @@ -213,7 +213,7 @@ expandarg(union node *arg, struct arglis * characters to allow for further processing. * If EXP_FULL is set, also preserve CTLQUOTEMARK characters. */ -static void +static char * argstr(char *p, int flag) { char c; @@ -231,9 +231,10 @@ argstr(char *p, int flag) CHECKSTRSPACE(2, expdest); switch (c = *p++) { case '\0': + return (p - 1); case CTLENDVAR: case CTLENDARI: - goto breakloop; + return (p); case CTLQUOTEMARK: lit_quoted = 1; /* "$@" syntax adherence hack */ @@ -290,7 +291,6 @@ argstr(char *p, int flag) expdest - stackblock(), 0); } } -breakloop:; } /* @@ -399,13 +399,11 @@ expari(char *p) arith_t result; int begoff; int quoted; - int c; - int nesting; int adj; quoted = *p++ == '"'; begoff = expdest - stackblock(); - argstr(p, 0); + p = argstr(p, 0); removerecordregions(begoff); STPUTC('\0', expdest); start = stackblock() + begoff; @@ -424,20 +422,6 @@ expari(char *p) STADJUST(adj, expdest); if (!quoted) recordregion(begoff, expdest - stackblock(), 0); - nesting = 1; - while (nesting > 0) { - c = *p++; - if (c == CTLESC) - p++; - else if (c == CTLARI) - nesting++; - else if (c == CTLENDARI) - nesting--; - else if (c == CTLVAR) - p++; /* ignore variable substitution byte */ - else if (c == '\0') - return p - 1; - } return p; } From owner-svn-src-stable@FreeBSD.ORG Sat Apr 5 20:01:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 13F25D15; Sat, 5 Apr 2014 20:01:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9A17852; Sat, 5 Apr 2014 20:01:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s35K18CN058719; Sat, 5 Apr 2014 20:01:08 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s35K18Wh058715; Sat, 5 Apr 2014 20:01:08 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201404052001.s35K18Wh058715@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 5 Apr 2014 20:01:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264168 - stable/10/bin/sh X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Apr 2014 20:01:09 -0000 Author: jilles Date: Sat Apr 5 20:01:08 2014 New Revision: 264168 URL: http://svnweb.freebsd.org/changeset/base/264168 Log: MFC r263195: sh: Add some consts. Modified: stable/10/bin/sh/expand.c stable/10/bin/sh/jobs.c stable/10/bin/sh/redir.c Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/sh/expand.c ============================================================================== --- stable/10/bin/sh/expand.c Sat Apr 5 19:48:19 2014 (r264167) +++ stable/10/bin/sh/expand.c Sat Apr 5 20:01:08 2014 (r264168) @@ -104,8 +104,8 @@ static char *expari(char *); static void expbackq(union node *, int, int); static int subevalvar(char *, char *, int, int, int, int, int); static char *evalvar(char *, int); -static int varisset(char *, int); -static void varvalue(char *, int, int, int); +static int varisset(const char *, int); +static void varvalue(const char *, int, int, int); static void recordregion(int, int, int); static void removerecordregions(int); static void ifsbreakup(char *, struct arglist *); @@ -633,7 +633,7 @@ evalvar(char *p, int flag) int subtype; int varflags; char *var; - char *val; + const char *val; int patloc; int c; int set; @@ -827,7 +827,7 @@ record: */ static int -varisset(char *name, int nulok) +varisset(const char *name, int nulok) { if (*name == '!') @@ -876,7 +876,7 @@ strtodest(const char *p, int flag, int s */ static void -varvalue(char *name, int quoted, int subtype, int flag) +varvalue(const char *name, int quoted, int subtype, int flag) { int num; char *p; Modified: stable/10/bin/sh/jobs.c ============================================================================== --- stable/10/bin/sh/jobs.c Sat Apr 5 19:48:19 2014 (r264167) +++ stable/10/bin/sh/jobs.c Sat Apr 5 20:01:08 2014 (r264168) @@ -95,9 +95,9 @@ static void restartjob(struct job *); #endif static void freejob(struct job *); static int waitcmdloop(struct job *); -static struct job *getjob_nonotfound(char *); -static struct job *getjob(char *); pid_t getjobpgrp(char *); +static struct job *getjob_nonotfound(const char *); +static struct job *getjob(const char *); static pid_t dowait(int, struct job *); static void checkzombies(void); static void cmdtxt(union node *); @@ -558,7 +558,7 @@ jobidcmd(int argc __unused, char **argv */ static struct job * -getjob_nonotfound(char *name) +getjob_nonotfound(const char *name) { int jobno; struct job *found, *jp; @@ -628,7 +628,7 @@ currentjob: if ((jp = getcurjob(NULL)) = static struct job * -getjob(char *name) +getjob(const char *name) { struct job *jp; Modified: stable/10/bin/sh/redir.c ============================================================================== --- stable/10/bin/sh/redir.c Sat Apr 5 19:48:19 2014 (r264167) +++ stable/10/bin/sh/redir.c Sat Apr 5 20:01:08 2014 (r264168) @@ -152,7 +152,7 @@ openredirect(union node *redir, char mem { struct stat sb; int fd = redir->nfile.fd; - char *fname; + const char *fname; int f; int e; @@ -250,7 +250,7 @@ movefd: static int openhere(union node *redir) { - char *p; + const char *p; int pip[2]; size_t len = 0; int flags; From owner-svn-src-stable@FreeBSD.ORG Sat Apr 5 20:05:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B7CA5F59; Sat, 5 Apr 2014 20:05:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A3DA28EC; Sat, 5 Apr 2014 20:05:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s35K5ou0061504; Sat, 5 Apr 2014 20:05:50 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s35K5ojY061503; Sat, 5 Apr 2014 20:05:50 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201404052005.s35K5ojY061503@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 5 Apr 2014 20:05:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264169 - stable/10/usr.bin/find X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Apr 2014 20:05:50 -0000 Author: jilles Date: Sat Apr 5 20:05:50 2014 New Revision: 264169 URL: http://svnweb.freebsd.org/changeset/base/264169 Log: MFC r263244: find: When performing -quit, finish pending -exec ... + command lines. This avoids unexpected partial processing when a find command uses both -quit and -exec ... +. GNU find does the same. Modified: stable/10/usr.bin/find/function.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/find/function.c ============================================================================== --- stable/10/usr.bin/find/function.c Sat Apr 5 20:01:08 2014 (r264168) +++ stable/10/usr.bin/find/function.c Sat Apr 5 20:05:50 2014 (r264169) @@ -1768,6 +1768,7 @@ f_false(PLAN *plan __unused, FTSENT *ent int f_quit(PLAN *plan __unused, FTSENT *entry __unused) { + finish_execplus(); exit(0); } From owner-svn-src-stable@FreeBSD.ORG Sat Apr 5 20:09:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A2F41E1; Sat, 5 Apr 2014 20:09:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EABC8927; Sat, 5 Apr 2014 20:09:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s35K9pMD061957; Sat, 5 Apr 2014 20:09:51 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s35K9p5K061956; Sat, 5 Apr 2014 20:09:51 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201404052009.s35K9p5K061956@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 5 Apr 2014 20:09:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264170 - stable/10/lib/libc/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Apr 2014 20:09:52 -0000 Author: jilles Date: Sat Apr 5 20:09:51 2014 New Revision: 264170 URL: http://svnweb.freebsd.org/changeset/base/264170 Log: waitid(2): Do not tell userland programmers to include . Userland should get these definitions by including . Modified: stable/10/lib/libc/sys/wait.2 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/wait.2 ============================================================================== --- stable/10/lib/libc/sys/wait.2 Sat Apr 5 20:05:50 2014 (r264169) +++ stable/10/lib/libc/sys/wait.2 Sat Apr 5 20:09:51 2014 (r264170) @@ -48,7 +48,7 @@ .Fn wait "int *status" .Ft pid_t .Fn waitpid "pid_t wpid" "int *status" "int options" -.In sys/signal.h +.In signal.h .Ft int .Fn waitid "idtype_t idtype" "id_t id" "siginfo_t *info" "int options" .In sys/time.h From owner-svn-src-stable@FreeBSD.ORG Sat Apr 5 20:11:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E43FB34C; Sat, 5 Apr 2014 20:11:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D09B399A; Sat, 5 Apr 2014 20:11:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s35KBeeu064979; Sat, 5 Apr 2014 20:11:40 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s35KBeWK064978; Sat, 5 Apr 2014 20:11:40 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201404052011.s35KBeWK064978@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 5 Apr 2014 20:11:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264171 - stable/10/lib/libc/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Apr 2014 20:11:41 -0000 Author: jilles Date: Sat Apr 5 20:11:40 2014 New Revision: 264171 URL: http://svnweb.freebsd.org/changeset/base/264171 Log: MFC r258794: chmod(2): Document S_ISVTX following SUSv3/SUSv4. S_ISTXT is non-standard. While here, also update fchmodat() standards entry to POSIX.1-2008. Modified: stable/10/lib/libc/sys/chmod.2 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/chmod.2 ============================================================================== --- stable/10/lib/libc/sys/chmod.2 Sat Apr 5 20:09:51 2014 (r264170) +++ stable/10/lib/libc/sys/chmod.2 Sat Apr 5 20:11:40 2014 (r264171) @@ -28,7 +28,7 @@ .\" @(#)chmod.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd April 10, 2008 +.Dd December 1, 2013 .Dt CHMOD 2 .Os .Sh NAME @@ -139,21 +139,24 @@ defined in #define S_ISUID 0004000 /* set user id on execution */ #define S_ISGID 0002000 /* set group id on execution */ -#ifndef __BSD_VISIBLE -#define S_ISTXT 0001000 /* sticky bit */ -#endif +#define S_ISVTX 0001000 /* sticky bit */ .Ed .Pp +The non-standard +.Dv S_ISTXT +is a synonym for +.Dv S_ISVTX . +.Pp The .Fx VM system totally ignores the sticky bit -.Pq Dv ISTXT +.Pq Dv S_ISVTX for executables. On UFS-based file systems (FFS, LFS) the sticky bit may only be set upon directories. .Pp If mode -.Dv ISTXT +.Dv S_ISVTX (the `sticky bit') is set on a directory, an unprivileged user may not delete or rename files of other users in that directory. @@ -296,12 +299,15 @@ The system call is expected to conform to .St -p1003.1-90 , except for the return of -.Er EFTYPE -and the use of -.Dv S_ISTXT . +.Er EFTYPE . +The +.Dv S_ISVTX +bit on directories is expected to conform to +.St -susv3 . The .Fn fchmodat -system call follows The Open Group Extended API Set 2 specification. +system call is expected to conform to +.St -p1003.1-2008 . .Sh HISTORY The .Fn chmod From owner-svn-src-stable@FreeBSD.ORG Sat Apr 5 20:26:17 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5976884; Sat, 5 Apr 2014 20:26:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2149AA0; Sat, 5 Apr 2014 20:26:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s35KQHgL070056; Sat, 5 Apr 2014 20:26:17 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s35KQHEh070055; Sat, 5 Apr 2014 20:26:17 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201404052026.s35KQHEh070055@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 5 Apr 2014 20:26:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264172 - stable/10/lib/libc/gen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Apr 2014 20:26:17 -0000 Author: jilles Date: Sat Apr 5 20:26:17 2014 New Revision: 264172 URL: http://svnweb.freebsd.org/changeset/base/264172 Log: MFC r262872: fts: Don't abort if an empty pathname is given. Make fts_open(3) treat an empty pathname like any other pathname that cannot be lstatted because of [ENOENT]. It is rather confusing if rm -rf file1 "" file2 does not remove file1 and file2. PR: bin/187264 Modified: stable/10/lib/libc/gen/fts.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/fts.c ============================================================================== --- stable/10/lib/libc/gen/fts.c Sat Apr 5 20:11:40 2014 (r264171) +++ stable/10/lib/libc/gen/fts.c Sat Apr 5 20:26:17 2014 (r264172) @@ -161,11 +161,7 @@ fts_open(argv, options, compar) /* Allocate/initialize root(s). */ for (root = NULL, nitems = 0; *argv != NULL; ++argv, ++nitems) { - /* Don't allow zero-length paths. */ - if ((len = strlen(*argv)) == 0) { - errno = ENOENT; - goto mem3; - } + len = strlen(*argv); p = fts_alloc(sp, *argv, len); p->fts_level = FTS_ROOTLEVEL; From owner-svn-src-stable@FreeBSD.ORG Sun Apr 6 10:56:28 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 90C43C18; Sun, 6 Apr 2014 10:56:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 703A213F; Sun, 6 Apr 2014 10:56:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s36AuS2I037420; Sun, 6 Apr 2014 10:56:28 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s36AuSK0037419; Sun, 6 Apr 2014 10:56:28 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201404061056.s36AuSK0037419@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 6 Apr 2014 10:56:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264192 - stable/10/usr.bin/login X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Apr 2014 10:56:28 -0000 Author: jilles Date: Sun Apr 6 10:56:27 2014 New Revision: 264192 URL: http://svnweb.freebsd.org/changeset/base/264192 Log: login: Clean up PAM and audit, then exit, on SIGHUP and SIGTERM. This avoids leaving stale entries in utmpx after the connection is closed on an open login session. It also allows a clean way (SIGTERM) to forcibly terminate a user's terminal session. This does not affect the situation for "hung" processes after the connection is closed. The foreground process group receives SIGHUP and the tty becomes inaccessible. Also replace all use of the obsolete signal() function with sigaction() (not only the part where it is actually required: SIGHUP and SIGTERM must mask the other as well when caught). PR: misc/183495 Modified: stable/10/usr.bin/login/login.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/login/login.c ============================================================================== --- stable/10/usr.bin/login/login.c Sun Apr 6 10:13:14 2014 (r264191) +++ stable/10/usr.bin/login/login.c Sun Apr 6 10:56:27 2014 (r264192) @@ -83,6 +83,7 @@ __FBSDID("$FreeBSD$"); static int auth_pam(void); static void bail(int, int); +static void bail_internal(int, int, int); static int export(const char *); static void export_pam_environment(void); static int motd(const char *); @@ -94,6 +95,7 @@ static void refused(const char *, cons static const char *stypeof(char *); static void sigint(int); static void timedout(int); +static void bail_sig(int); static void usage(void); #define TTYGRPNAME "tty" /* group to own ttys */ @@ -172,13 +174,18 @@ main(int argc, char *argv[]) login_cap_t *lc = NULL; login_cap_t *lc_user = NULL; pid_t pid; + sigset_t mask, omask; + struct sigaction sa; #ifdef USE_BSM_AUDIT char auditsuccess = 1; #endif - (void)signal(SIGQUIT, SIG_IGN); - (void)signal(SIGINT, SIG_IGN); - (void)signal(SIGHUP, SIG_IGN); + sa.sa_flags = SA_RESTART; + (void)sigfillset(&sa.sa_mask); + sa.sa_handler = SIG_IGN; + (void)sigaction(SIGQUIT, &sa, NULL); + (void)sigaction(SIGINT, &sa, NULL); + (void)sigaction(SIGHUP, &sa, NULL); if (setjmp(timeout_buf)) { if (failures) badlogin(username); @@ -186,7 +193,8 @@ main(int argc, char *argv[]) timeout); bail(NO_SLEEP_EXIT, 0); } - (void)signal(SIGALRM, timedout); + sa.sa_handler = timedout; + (void)sigaction(SIGALRM, &sa, NULL); (void)alarm(timeout); (void)setpriority(PRIO_PROCESS, 0, 0); @@ -370,7 +378,14 @@ main(int argc, char *argv[]) /* committed to login -- turn off timeout */ (void)alarm((u_int)0); - (void)signal(SIGHUP, SIG_DFL); + + (void)sigemptyset(&mask); + (void)sigaddset(&mask, SIGHUP); + (void)sigaddset(&mask, SIGTERM); + (void)sigprocmask(SIG_BLOCK, &mask, &omask); + sa.sa_handler = bail_sig; + (void)sigaction(SIGHUP, &sa, NULL); + (void)sigaction(SIGTERM, &sa, NULL); endpwent(); @@ -550,10 +565,17 @@ main(int argc, char *argv[]) /* * Parent: wait for child to finish, then clean up * session. + * + * If we get SIGHUP or SIGTERM, clean up the session + * and exit right away. This will make the terminal + * inaccessible and send SIGHUP to the foreground + * process group. */ int status; setproctitle("-%s [pam]", getprogname()); + (void)sigprocmask(SIG_SETMASK, &omask, NULL); waitpid(pid, &status, 0); + (void)sigprocmask(SIG_BLOCK, &mask, NULL); bail(NO_SLEEP_EXIT, 0); } @@ -627,10 +649,15 @@ main(int argc, char *argv[]) login_close(lc_user); login_close(lc); - (void)signal(SIGALRM, SIG_DFL); - (void)signal(SIGQUIT, SIG_DFL); - (void)signal(SIGINT, SIG_DFL); - (void)signal(SIGTSTP, SIG_IGN); + sa.sa_handler = SIG_DFL; + (void)sigaction(SIGALRM, &sa, NULL); + (void)sigaction(SIGQUIT, &sa, NULL); + (void)sigaction(SIGINT, &sa, NULL); + (void)sigaction(SIGTERM, &sa, NULL); + (void)sigaction(SIGHUP, &sa, NULL); + sa.sa_handler = SIG_IGN; + (void)sigaction(SIGTSTP, &sa, NULL); + (void)sigprocmask(SIG_SETMASK, &omask, NULL); /* * Login shells have a leading '-' in front of argv[0] @@ -847,17 +874,20 @@ sigint(int signo __unused) static int motd(const char *motdfile) { - sig_t oldint; + struct sigaction newint, oldint; FILE *f; int ch; if ((f = fopen(motdfile, "r")) == NULL) return (-1); motdinterrupt = 0; - oldint = signal(SIGINT, sigint); + newint.sa_handler = sigint; + newint.sa_flags = 0; + sigfillset(&newint.sa_mask); + sigaction(SIGINT, &newint, &oldint); while ((ch = fgetc(f)) != EOF && !motdinterrupt) putchar(ch); - signal(SIGINT, oldint); + sigaction(SIGINT, &oldint, NULL); if (ch != EOF || ferror(f)) { fclose(f); return (-1); @@ -966,12 +996,10 @@ pam_cleanup(void) } } -/* - * Exit, optionally after sleeping a few seconds - */ -void -bail(int sec, int eval) +static void +bail_internal(int sec, int eval, int signo) { + struct sigaction sa; pam_cleanup(); #ifdef USE_BSM_AUDIT @@ -979,5 +1007,36 @@ bail(int sec, int eval) audit_logout(); #endif (void)sleep(sec); - exit(eval); + if (signo == 0) + exit(eval); + else { + sa.sa_handler = SIG_DFL; + sa.sa_flags = 0; + (void)sigemptyset(&sa.sa_mask); + (void)sigaction(signo, &sa, NULL); + (void)sigaddset(&sa.sa_mask, signo); + (void)sigprocmask(SIG_UNBLOCK, &sa.sa_mask, NULL); + raise(signo); + exit(128 + signo); + } +} + +/* + * Exit, optionally after sleeping a few seconds + */ +static void +bail(int sec, int eval) +{ + bail_internal(sec, eval, 0); +} + +/* + * Exit because of a signal. + * This is not async-signal safe, so only call async-signal safe functions + * while the signal is unmasked. + */ +static void +bail_sig(int signo) +{ + bail_internal(NO_SLEEP_EXIT, 0, signo); } From owner-svn-src-stable@FreeBSD.ORG Mon Apr 7 01:49:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87E5F4C8; Mon, 7 Apr 2014 01:49:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 694F5776; Mon, 7 Apr 2014 01:49:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s371nVVa061567; Mon, 7 Apr 2014 01:49:31 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s371nU8u061563; Mon, 7 Apr 2014 01:49:30 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201404070149.s371nU8u061563@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Mon, 7 Apr 2014 01:49:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264210 - stable/10/sys/ddb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Apr 2014 01:49:31 -0000 Author: pfg Date: Mon Apr 7 01:49:30 2014 New Revision: 264210 URL: http://svnweb.freebsd.org/changeset/base/264210 Log: MFC r263973; ddb: Minor style cleanups. #define should be followed by tab. Modified: stable/10/sys/ddb/db_break.h stable/10/sys/ddb/db_sym.h stable/10/sys/ddb/db_variables.h stable/10/sys/ddb/ddb.h Modified: stable/10/sys/ddb/db_break.h ============================================================================== --- stable/10/sys/ddb/db_break.h Mon Apr 7 01:46:30 2014 (r264209) +++ stable/10/sys/ddb/db_break.h Mon Apr 7 01:49:30 2014 (r264210) @@ -38,7 +38,7 @@ */ #ifndef BKPT_INST_TYPE -#define BKPT_INST_TYPE int +#define BKPT_INST_TYPE int #endif struct db_breakpoint { Modified: stable/10/sys/ddb/db_sym.h ============================================================================== --- stable/10/sys/ddb/db_sym.h Mon Apr 7 01:46:30 2014 (r264209) +++ stable/10/sys/ddb/db_sym.h Mon Apr 7 01:49:30 2014 (r264210) @@ -63,8 +63,8 @@ typedef const char * c_db_sym_t; /* cons typedef int db_strategy_t; /* search strategy */ #define DB_STGY_ANY 0 /* anything goes */ -#define DB_STGY_XTRN 1 /* only external symbols */ -#define DB_STGY_PROC 2 /* only procedures */ +#define DB_STGY_XTRN 1 /* only external symbols */ +#define DB_STGY_PROC 2 /* only procedures */ /* * Functions exported by the symtable module @@ -78,11 +78,11 @@ c_db_sym_t db_search_symbol(db_addr_t, d void db_symbol_values(c_db_sym_t, const char **, db_expr_t *); /* return name and value of symbol */ -#define db_find_sym_and_offset(val,namep,offp) \ +#define db_find_sym_and_offset(val,namep,offp) \ db_symbol_values(db_search_symbol(val,DB_STGY_ANY,offp),namep,0) /* find name&value given approx val */ -#define db_find_xtrn_sym_and_offset(val,namep,offp) \ +#define db_find_xtrn_sym_and_offset(val,namep,offp) \ db_symbol_values(db_search_symbol(val,DB_STGY_XTRN,offp),namep,0) /* ditto, but no locals */ Modified: stable/10/sys/ddb/db_variables.h ============================================================================== --- stable/10/sys/ddb/db_variables.h Mon Apr 7 01:46:30 2014 (r264209) +++ stable/10/sys/ddb/db_variables.h Mon Apr 7 01:49:30 2014 (r264210) @@ -44,8 +44,8 @@ struct db_variable { db_expr_t *valuep; /* value of variable */ /* function to call when reading/writing */ db_varfcn_t *fcn; -#define DB_VAR_GET 0 -#define DB_VAR_SET 1 +#define DB_VAR_GET 0 +#define DB_VAR_SET 1 }; #define FCN_NULL ((db_varfcn_t *)0) Modified: stable/10/sys/ddb/ddb.h ============================================================================== --- stable/10/sys/ddb/ddb.h Mon Apr 7 01:46:30 2014 (r264209) +++ stable/10/sys/ddb/ddb.h Mon Apr 7 01:49:30 2014 (r264210) @@ -118,7 +118,7 @@ struct command { * in modules in which case they will be available only when * the module is loaded. */ -#define _DB_SET(_suffix, _name, _func, list, _flag, _more) \ +#define _DB_SET(_suffix, _name, _func, list, _flag, _more) \ static struct command __CONCAT(_name,_suffix) = { \ .name = __STRING(_name), \ .fcn = _func, \ @@ -145,27 +145,27 @@ SYSUNINIT(__CONCAT(_name,_suffix), SI_SU * This macro is mostly used to define commands placed in one of * the ddb command tables; see DB_COMMAND, etc. below. */ -#define _DB_FUNC(_suffix, _name, _func, list, _flag, _more) \ +#define _DB_FUNC(_suffix, _name, _func, list, _flag, _more) \ static db_cmdfcn_t _func; \ _DB_SET(_suffix, _name, _func, list, _flag, _more); \ static void \ _func(db_expr_t addr, boolean_t have_addr, db_expr_t count, char *modif) /* common idom provided for backwards compatibility */ -#define DB_FUNC(_name, _func, list, _flag, _more) \ +#define DB_FUNC(_name, _func, list, _flag, _more) \ _DB_FUNC(_cmd, _name, _func, list, _flag, _more) -#define DB_COMMAND(cmd_name, func_name) \ +#define DB_COMMAND(cmd_name, func_name) \ _DB_FUNC(_cmd, cmd_name, func_name, db_cmd_table, 0, NULL) -#define DB_ALIAS(alias_name, func_name) \ +#define DB_ALIAS(alias_name, func_name) \ _DB_SET(_cmd, alias_name, func_name, db_cmd_table, 0, NULL) -#define DB_SHOW_COMMAND(cmd_name, func_name) \ +#define DB_SHOW_COMMAND(cmd_name, func_name) \ _DB_FUNC(_show, cmd_name, func_name, db_show_table, 0, NULL) -#define DB_SHOW_ALIAS(alias_name, func_name) \ +#define DB_SHOW_ALIAS(alias_name, func_name) \ _DB_SET(_show, alias_name, func_name, db_show_table, 0, NULL) -#define DB_SHOW_ALL_COMMAND(cmd_name, func_name) \ +#define DB_SHOW_ALL_COMMAND(cmd_name, func_name) \ _DB_FUNC(_show_all, cmd_name, func_name, db_show_all_table, 0, NULL) -#define DB_SHOW_ALL_ALIAS(alias_name, func_name) \ +#define DB_SHOW_ALL_ALIAS(alias_name, func_name) \ _DB_SET(_show_all, alias_name, func_name, db_show_all_table, 0, NULL) extern db_expr_t db_maxoff; From owner-svn-src-stable@FreeBSD.ORG Mon Apr 7 01:55:55 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67CF7A46; Mon, 7 Apr 2014 01:55:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55063855; Mon, 7 Apr 2014 01:55:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s371tt1U065353; Mon, 7 Apr 2014 01:55:55 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s371ts3c065351; Mon, 7 Apr 2014 01:55:54 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201404070155.s371ts3c065351@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Mon, 7 Apr 2014 01:55:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264214 - in stable/10: contrib/gcc sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Apr 2014 01:55:55 -0000 Author: pfg Date: Mon Apr 7 01:55:54 2014 New Revision: 264214 URL: http://svnweb.freebsd.org/changeset/base/264214 Log: MFC r264121; gcc: define __block when block support is enabled This mimics the behaviour in clang and lets us build cleanly the libdispatch port on platforms where the base gcc is still the default compiler. Bump __FreeBSD_version for ports. Tested by: theraven Modified: stable/10/contrib/gcc/c-cppbuiltin.c stable/10/sys/sys/param.h Modified: stable/10/contrib/gcc/c-cppbuiltin.c ============================================================================== --- stable/10/contrib/gcc/c-cppbuiltin.c Mon Apr 7 01:55:53 2014 (r264213) +++ stable/10/contrib/gcc/c-cppbuiltin.c Mon Apr 7 01:55:54 2014 (r264214) @@ -504,7 +504,10 @@ c_cpp_builtins (cpp_reader *pfile) /* APPLE LOCAL begin blocks */ /* APPLE LOCAL radar 5868913 */ if (flag_blocks) - cpp_define (pfile, "__BLOCKS__=1"); + { + cpp_define (pfile, "__block=__attribute__((__blocks__(byref)))"); + cpp_define (pfile, "__BLOCKS__=1"); + } /* APPLE LOCAL end blocks */ if (optimize_size) cpp_define (pfile, "__OPTIMIZE_SIZE__"); Modified: stable/10/sys/sys/param.h ============================================================================== --- stable/10/sys/sys/param.h Mon Apr 7 01:55:53 2014 (r264213) +++ stable/10/sys/sys/param.h Mon Apr 7 01:55:54 2014 (r264214) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1000705 /* Master, propagated to newvers */ +#define __FreeBSD_version 1000706 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-stable@FreeBSD.ORG Mon Apr 7 02:36:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60667473; Mon, 7 Apr 2014 02:36:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40966B1D; Mon, 7 Apr 2014 02:36:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s372aVvY081733; Mon, 7 Apr 2014 02:36:31 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s372aUYT081729; Mon, 7 Apr 2014 02:36:30 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201404070236.s372aUYT081729@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Mon, 7 Apr 2014 02:36:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264217 - stable/9/sys/ddb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Apr 2014 02:36:31 -0000 Author: pfg Date: Mon Apr 7 02:36:30 2014 New Revision: 264217 URL: http://svnweb.freebsd.org/changeset/base/264217 Log: MFC r263973; ddb: Minor style cleanups. #define should be followed by tab. Modified: stable/9/sys/ddb/db_break.h stable/9/sys/ddb/db_sym.h stable/9/sys/ddb/db_variables.h stable/9/sys/ddb/ddb.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ddb/db_break.h ============================================================================== --- stable/9/sys/ddb/db_break.h Mon Apr 7 02:31:10 2014 (r264216) +++ stable/9/sys/ddb/db_break.h Mon Apr 7 02:36:30 2014 (r264217) @@ -38,7 +38,7 @@ */ #ifndef BKPT_INST_TYPE -#define BKPT_INST_TYPE int +#define BKPT_INST_TYPE int #endif struct db_breakpoint { Modified: stable/9/sys/ddb/db_sym.h ============================================================================== --- stable/9/sys/ddb/db_sym.h Mon Apr 7 02:31:10 2014 (r264216) +++ stable/9/sys/ddb/db_sym.h Mon Apr 7 02:36:30 2014 (r264217) @@ -63,8 +63,8 @@ typedef const char * c_db_sym_t; /* cons typedef int db_strategy_t; /* search strategy */ #define DB_STGY_ANY 0 /* anything goes */ -#define DB_STGY_XTRN 1 /* only external symbols */ -#define DB_STGY_PROC 2 /* only procedures */ +#define DB_STGY_XTRN 1 /* only external symbols */ +#define DB_STGY_PROC 2 /* only procedures */ /* * Functions exported by the symtable module @@ -78,11 +78,11 @@ c_db_sym_t db_search_symbol(db_addr_t, d void db_symbol_values(c_db_sym_t, const char **, db_expr_t *); /* return name and value of symbol */ -#define db_find_sym_and_offset(val,namep,offp) \ +#define db_find_sym_and_offset(val,namep,offp) \ db_symbol_values(db_search_symbol(val,DB_STGY_ANY,offp),namep,0) /* find name&value given approx val */ -#define db_find_xtrn_sym_and_offset(val,namep,offp) \ +#define db_find_xtrn_sym_and_offset(val,namep,offp) \ db_symbol_values(db_search_symbol(val,DB_STGY_XTRN,offp),namep,0) /* ditto, but no locals */ Modified: stable/9/sys/ddb/db_variables.h ============================================================================== --- stable/9/sys/ddb/db_variables.h Mon Apr 7 02:31:10 2014 (r264216) +++ stable/9/sys/ddb/db_variables.h Mon Apr 7 02:36:30 2014 (r264217) @@ -44,8 +44,8 @@ struct db_variable { db_expr_t *valuep; /* value of variable */ /* function to call when reading/writing */ db_varfcn_t *fcn; -#define DB_VAR_GET 0 -#define DB_VAR_SET 1 +#define DB_VAR_GET 0 +#define DB_VAR_SET 1 }; #define FCN_NULL ((db_varfcn_t *)0) Modified: stable/9/sys/ddb/ddb.h ============================================================================== --- stable/9/sys/ddb/ddb.h Mon Apr 7 02:31:10 2014 (r264216) +++ stable/9/sys/ddb/ddb.h Mon Apr 7 02:36:30 2014 (r264217) @@ -118,7 +118,7 @@ struct command { * in modules in which case they will be available only when * the module is loaded. */ -#define _DB_SET(_suffix, _name, _func, list, _flag, _more) \ +#define _DB_SET(_suffix, _name, _func, list, _flag, _more) \ static struct command __CONCAT(_name,_suffix) = { \ .name = __STRING(_name), \ .fcn = _func, \ @@ -145,27 +145,27 @@ SYSUNINIT(__CONCAT(_name,_suffix), SI_SU * This macro is mostly used to define commands placed in one of * the ddb command tables; see DB_COMMAND, etc. below. */ -#define _DB_FUNC(_suffix, _name, _func, list, _flag, _more) \ +#define _DB_FUNC(_suffix, _name, _func, list, _flag, _more) \ static db_cmdfcn_t _func; \ _DB_SET(_suffix, _name, _func, list, _flag, _more); \ static void \ _func(db_expr_t addr, boolean_t have_addr, db_expr_t count, char *modif) /* common idom provided for backwards compatibility */ -#define DB_FUNC(_name, _func, list, _flag, _more) \ +#define DB_FUNC(_name, _func, list, _flag, _more) \ _DB_FUNC(_cmd, _name, _func, list, _flag, _more) -#define DB_COMMAND(cmd_name, func_name) \ +#define DB_COMMAND(cmd_name, func_name) \ _DB_FUNC(_cmd, cmd_name, func_name, db_cmd_table, 0, NULL) -#define DB_ALIAS(alias_name, func_name) \ +#define DB_ALIAS(alias_name, func_name) \ _DB_SET(_cmd, alias_name, func_name, db_cmd_table, 0, NULL) -#define DB_SHOW_COMMAND(cmd_name, func_name) \ +#define DB_SHOW_COMMAND(cmd_name, func_name) \ _DB_FUNC(_show, cmd_name, func_name, db_show_table, 0, NULL) -#define DB_SHOW_ALIAS(alias_name, func_name) \ +#define DB_SHOW_ALIAS(alias_name, func_name) \ _DB_SET(_show, alias_name, func_name, db_show_table, 0, NULL) -#define DB_SHOW_ALL_COMMAND(cmd_name, func_name) \ +#define DB_SHOW_ALL_COMMAND(cmd_name, func_name) \ _DB_FUNC(_show_all, cmd_name, func_name, db_show_all_table, 0, NULL) -#define DB_SHOW_ALL_ALIAS(alias_name, func_name) \ +#define DB_SHOW_ALL_ALIAS(alias_name, func_name) \ _DB_SET(_show_all, alias_name, func_name, db_show_all_table, 0, NULL) extern db_expr_t db_maxoff; From owner-svn-src-stable@FreeBSD.ORG Mon Apr 7 12:50:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 51186D51; Mon, 7 Apr 2014 12:50:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DEE9A02; Mon, 7 Apr 2014 12:50:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s37Co92A036647; Mon, 7 Apr 2014 12:50:09 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s37Co9vP036646; Mon, 7 Apr 2014 12:50:09 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201404071250.s37Co9vP036646@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 7 Apr 2014 12:50:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264221 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Apr 2014 12:50:09 -0000 Author: ae Date: Mon Apr 7 12:50:08 2014 New Revision: 264221 URL: http://svnweb.freebsd.org/changeset/base/264221 Log: MFC r263966: Don't copy the MF flag from original IP header to ICMP error message. PR: 188092 Sponsored by: Yandex LLC Modified: stable/10/sys/netinet/ip_icmp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/ip_icmp.c ============================================================================== --- stable/10/sys/netinet/ip_icmp.c Mon Apr 7 07:06:13 2014 (r264220) +++ stable/10/sys/netinet/ip_icmp.c Mon Apr 7 12:50:08 2014 (r264221) @@ -347,6 +347,7 @@ stdreply: icmpelen = max(8, min(V_icmp_q nip->ip_hl = 5; nip->ip_p = IPPROTO_ICMP; nip->ip_tos = 0; + nip->ip_off = 0; icmp_reflect(m); freeit: From owner-svn-src-stable@FreeBSD.ORG Mon Apr 7 12:50:35 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 027FCE83; Mon, 7 Apr 2014 12:50:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E35EDA73; Mon, 7 Apr 2014 12:50:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s37CoYJ2037187; Mon, 7 Apr 2014 12:50:34 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s37CoYxU037186; Mon, 7 Apr 2014 12:50:34 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201404071250.s37CoYxU037186@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 7 Apr 2014 12:50:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264222 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Apr 2014 12:50:35 -0000 Author: ae Date: Mon Apr 7 12:50:34 2014 New Revision: 264222 URL: http://svnweb.freebsd.org/changeset/base/264222 Log: MFC r263966: Don't copy the MF flag from original IP header to ICMP error message. PR: 188092 Sponsored by: Yandex LLC Modified: stable/9/sys/netinet/ip_icmp.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/ip_icmp.c ============================================================================== --- stable/9/sys/netinet/ip_icmp.c Mon Apr 7 12:50:08 2014 (r264221) +++ stable/9/sys/netinet/ip_icmp.c Mon Apr 7 12:50:34 2014 (r264222) @@ -343,6 +343,7 @@ stdreply: icmpelen = max(8, min(V_icmp_q nip->ip_hl = 5; nip->ip_p = IPPROTO_ICMP; nip->ip_tos = 0; + nip->ip_off = 0; icmp_reflect(m); freeit: From owner-svn-src-stable@FreeBSD.ORG Mon Apr 7 12:51:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D8B35FBB; Mon, 7 Apr 2014 12:51:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5762A7F; Mon, 7 Apr 2014 12:51:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s37CpfeF038026; Mon, 7 Apr 2014 12:51:41 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s37CpfDd038025; Mon, 7 Apr 2014 12:51:41 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201404071251.s37CpfDd038025@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 7 Apr 2014 12:51:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r264223 - stable/8/sys/netinet X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Apr 2014 12:51:41 -0000 Author: ae Date: Mon Apr 7 12:51:41 2014 New Revision: 264223 URL: http://svnweb.freebsd.org/changeset/base/264223 Log: MFC r263966: Don't copy the MF flag from original IP header to ICMP error message. PR: 188092 Sponsored by: Yandex LLC Modified: stable/8/sys/netinet/ip_icmp.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/netinet/ip_icmp.c ============================================================================== --- stable/8/sys/netinet/ip_icmp.c Mon Apr 7 12:50:34 2014 (r264222) +++ stable/8/sys/netinet/ip_icmp.c Mon Apr 7 12:51:41 2014 (r264223) @@ -339,6 +339,7 @@ stdreply: icmpelen = max(8, min(V_icmp_q nip->ip_hl = 5; nip->ip_p = IPPROTO_ICMP; nip->ip_tos = 0; + nip->ip_off = 0; icmp_reflect(m); freeit: From owner-svn-src-stable@FreeBSD.ORG Mon Apr 7 12:58:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8C062E2; Mon, 7 Apr 2014 12:58:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A434BB01; Mon, 7 Apr 2014 12:58:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s37Cws0O040579; Mon, 7 Apr 2014 12:58:54 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s37Cwsts040578; Mon, 7 Apr 2014 12:58:54 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201404071258.s37Cwsts040578@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 7 Apr 2014 12:58:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264224 - stable/10/sys/netinet6 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Apr 2014 12:58:54 -0000 Author: ae Date: Mon Apr 7 12:58:54 2014 New Revision: 264224 URL: http://svnweb.freebsd.org/changeset/base/264224 Log: MFC r263969,263971: Don't generate an ICMPv6 error message if packet was consumed by filter. Remove unused label. Sponsored by: Yandex LLC Modified: stable/10/sys/netinet6/ip6_forward.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/ip6_forward.c ============================================================================== --- stable/10/sys/netinet6/ip6_forward.c Mon Apr 7 12:51:41 2014 (r264223) +++ stable/10/sys/netinet6/ip6_forward.c Mon Apr 7 12:58:54 2014 (r264224) @@ -563,10 +563,8 @@ skip_routing: odst = ip6->ip6_dst; /* Run through list of hooks for output packets. */ error = pfil_run_hooks(&V_inet6_pfil_hook, &m, rt->rt_ifp, PFIL_OUT, NULL); - if (error != 0) - goto senderr; - if (m == NULL) - goto freecopy; + if (error != 0 || m == NULL) + goto freecopy; /* consumed by filter */ ip6 = mtod(m, struct ip6_hdr *); /* See if destination IP address was changed by packet filter. */ @@ -635,7 +633,6 @@ pass: } } -senderr: if (mcopy == NULL) goto out; switch (error) { From owner-svn-src-stable@FreeBSD.ORG Mon Apr 7 12:59:17 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AFFB140E; Mon, 7 Apr 2014 12:59:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CF98B05; Mon, 7 Apr 2014 12:59:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s37CxHvv040668; Mon, 7 Apr 2014 12:59:17 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s37CxHi0040667; Mon, 7 Apr 2014 12:59:17 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201404071259.s37CxHi0040667@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 7 Apr 2014 12:59:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264225 - stable/9/sys/netinet6 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Apr 2014 12:59:17 -0000 Author: ae Date: Mon Apr 7 12:59:17 2014 New Revision: 264225 URL: http://svnweb.freebsd.org/changeset/base/264225 Log: MFC r263969,263971: Don't generate an ICMPv6 error message if packet was consumed by filter. Remove unused label. Sponsored by: Yandex LLC Modified: stable/9/sys/netinet6/ip6_forward.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet6/ip6_forward.c ============================================================================== --- stable/9/sys/netinet6/ip6_forward.c Mon Apr 7 12:58:54 2014 (r264224) +++ stable/9/sys/netinet6/ip6_forward.c Mon Apr 7 12:59:17 2014 (r264225) @@ -563,10 +563,8 @@ skip_routing: odst = ip6->ip6_dst; /* Run through list of hooks for output packets. */ error = pfil_run_hooks(&V_inet6_pfil_hook, &m, rt->rt_ifp, PFIL_OUT, NULL); - if (error != 0) - goto senderr; - if (m == NULL) - goto freecopy; + if (error != 0 || m == NULL) + goto freecopy; /* consumed by filter */ ip6 = mtod(m, struct ip6_hdr *); /* See if destination IP address was changed by packet filter. */ @@ -635,7 +633,6 @@ pass: } } -senderr: if (mcopy == NULL) goto out; switch (error) { From owner-svn-src-stable@FreeBSD.ORG Mon Apr 7 12:59:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB700540; Mon, 7 Apr 2014 12:59:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98387B09; Mon, 7 Apr 2014 12:59:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s37CxU07040732; Mon, 7 Apr 2014 12:59:30 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s37CxUD5040731; Mon, 7 Apr 2014 12:59:30 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201404071259.s37CxUD5040731@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 7 Apr 2014 12:59:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r264226 - stable/8/sys/netinet6 X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Apr 2014 12:59:30 -0000 Author: ae Date: Mon Apr 7 12:59:30 2014 New Revision: 264226 URL: http://svnweb.freebsd.org/changeset/base/264226 Log: MFC r263969,263971: Don't generate an ICMPv6 error message if packet was consumed by filter. Remove unused label. Sponsored by: Yandex LLC Modified: stable/8/sys/netinet6/ip6_forward.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/netinet6/ (props changed) Modified: stable/8/sys/netinet6/ip6_forward.c ============================================================================== --- stable/8/sys/netinet6/ip6_forward.c Mon Apr 7 12:59:17 2014 (r264225) +++ stable/8/sys/netinet6/ip6_forward.c Mon Apr 7 12:59:30 2014 (r264226) @@ -556,10 +556,8 @@ skip_routing: /* Run through list of hooks for output packets. */ error = pfil_run_hooks(&V_inet6_pfil_hook, &m, rt->rt_ifp, PFIL_OUT, NULL); - if (error != 0) - goto senderr; - if (m == NULL) - goto freecopy; + if (error != 0 || m == NULL) + goto freecopy; /* consumed by filter */ ip6 = mtod(m, struct ip6_hdr *); pass: @@ -578,7 +576,6 @@ pass: } } -senderr: if (mcopy == NULL) goto out; switch (error) { From owner-svn-src-stable@FreeBSD.ORG Tue Apr 8 00:53:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DCCA890A; Tue, 8 Apr 2014 00:53:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BCD9B19D8; Tue, 8 Apr 2014 00:53:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s380rWED016107; Tue, 8 Apr 2014 00:53:32 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s380rVas016103; Tue, 8 Apr 2014 00:53:31 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404080053.s380rVas016103@svn.freebsd.org> From: Glen Barber Date: Tue, 8 Apr 2014 00:53:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264245 - in stable/10: release share/man/man7 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Apr 2014 00:53:32 -0000 Author: gjb Date: Tue Apr 8 00:53:31 2014 New Revision: 264245 URL: http://svnweb.freebsd.org/changeset/base/264245 Log: MFC r264027, r264028, r264029, r264030, r264046, r264073: r264027: Add a new release build variable, WITH_COMPRESSED_IMAGES. When set to a non-empty value, the installation medium is compressed as part of the 'install' target in the release/ directory. r264028: Clean up trailing whitespace in release/Makefile. r264029: Fix logic error. r264030: If WITH_COMPRESSED_IMAGES is set, add the compressed images to the CLEANFILES list. r264046: Use xz(1) instead of gzip(1) to compress release images when WITH_COMPRESSED_IMAGES is used. r264073: Allow overriding xz(1) path. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/Makefile stable/10/release/release.conf.sample stable/10/release/release.sh stable/10/share/man/man7/release.7 Directory Properties: stable/10/ (props changed) Modified: stable/10/release/Makefile ============================================================================== --- stable/10/release/Makefile Mon Apr 7 22:49:41 2014 (r264244) +++ stable/10/release/Makefile Tue Apr 8 00:53:31 2014 (r264245) @@ -1,7 +1,7 @@ # $FreeBSD$ # # Makefile for building releases and release media. -# +# # User-driven targets: # cdrom: Builds release CD-ROM media (disc1.iso) # dvdrom: Builds release DVD-ROM media (dvd1.iso) @@ -13,7 +13,7 @@ # # Variables affecting the build process: # WORLDDIR: location of src tree -- must have built world and default kernel -# (by default, the directory above this one) +# (by default, the directory above this one) # PORTSDIR: location of ports tree to distribute (default: /usr/ports) # DOCDIR: location of doc tree (default: /usr/doc) # NOPKG: if set, do not distribute third-party packages @@ -21,13 +21,16 @@ # NOSRC: if set, do not distribute source tree # NODOC: if set, do not generate release documentation # WITH_DVD: if set, generate dvd1.iso -# TARGET/TARGET_ARCH: architecture of built release +# WITH_COMPRESSED_IMAGES: if set, compress installation images with xz(1) +# (uncompressed images are not removed) +# TARGET/TARGET_ARCH: architecture of built release # WORLDDIR?= ${.CURDIR}/.. PORTSDIR?= /usr/ports DOCDIR?= /usr/doc RELNOTES_LANG?= en_US.ISO8859-1 +XZCMD?= /usr/bin/xz .if !defined(TARGET) || empty(TARGET) TARGET= ${MACHINE} @@ -63,7 +66,7 @@ NODOC= true NOPORTS= true .endif -EXTRA_PACKAGES= +EXTRA_PACKAGES= .if !defined(NOPORTS) EXTRA_PACKAGES+= ports.txz .endif @@ -92,6 +95,11 @@ IMAGES+= mini-memstick.img .endif CLEANFILES= packagesystem *.txz MANIFEST system ${IMAGES} +.if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES) +. for I in ${IMAGES} +CLEANFILES+= ${I}.xz +. endfor +.endif CLEANDIRS= dist ftp release bootonly dvd beforeclean: chflags -R noschg . @@ -251,6 +259,9 @@ install: cp -a ftp ${DESTDIR}/ .for I in ${IMAGES} cp -p ${I} ${DESTDIR}/${OSRELEASE}-${I} +. if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES) + ${XZCMD} -k ${DESTDIR}/${OSRELEASE}-${I} +. endif .endfor cd ${DESTDIR} && sha256 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA256 cd ${DESTDIR} && md5 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.MD5 Modified: stable/10/release/release.conf.sample ============================================================================== --- stable/10/release/release.conf.sample Mon Apr 7 22:49:41 2014 (r264244) +++ stable/10/release/release.conf.sample Tue Apr 8 00:53:31 2014 (r264245) @@ -46,6 +46,7 @@ PORTBRANCH="ports/head@rHEAD" #NODOC= #NOPORTS= #WITH_DVD= +#WITH_COMPRESSED_IMAGES= ## Set when building embedded images. #EMBEDDEDBUILD= Modified: stable/10/release/release.sh ============================================================================== --- stable/10/release/release.sh Mon Apr 7 22:49:41 2014 (r264244) +++ stable/10/release/release.sh Tue Apr 8 00:53:31 2014 (r264245) @@ -83,6 +83,7 @@ NOPORTS= # Set to non-empty value to build dvd1.iso as part of the release. WITH_DVD= +WITH_COMPRESSED_IMAGES= usage() { echo "Usage: $0 [-c release.conf]" @@ -128,6 +129,7 @@ if [ -n "${EMBEDDEDBUILD}" ]; then exit 1 fi WITH_DVD= + WITH_COMPRESSED_IMAGES= NODOC=yes fi @@ -262,4 +264,4 @@ eval chroot ${CHROOTDIR} make -C /usr/sr eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \ release eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \ - install DESTDIR=/R + install DESTDIR=/R WITH_COMPRESSED_IMAGES=${WITH_COMPRESSED_IMAGES} Modified: stable/10/share/man/man7/release.7 ============================================================================== --- stable/10/share/man/man7/release.7 Mon Apr 7 22:49:41 2014 (r264244) +++ stable/10/share/man/man7/release.7 Tue Apr 8 00:53:31 2014 (r264245) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 5, 2014 +.Dd April 2, 2014 .Dt RELEASE 7 .Os .Sh NAME @@ -250,6 +250,12 @@ Setting this also sets Set to a non-empty value to include the .Cm dvdrom target. +.It Va WITH_COMPRESSED_IMAGES +Set to a non-empty value to compress the release images with +.Xr xz 1 . +The original +.Pq uncompressed +images are not removed. .It Va VCSCMD The command run to obtain the source trees. Defaults to From owner-svn-src-stable@FreeBSD.ORG Tue Apr 8 00:54:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 37682A90; Tue, 8 Apr 2014 00:54:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 196D91A10; Tue, 8 Apr 2014 00:54:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s380sCx4016227; Tue, 8 Apr 2014 00:54:12 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s380sC2P016221; Tue, 8 Apr 2014 00:54:12 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404080054.s380sC2P016221@svn.freebsd.org> From: Glen Barber Date: Tue, 8 Apr 2014 00:54:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264246 - in stable/9: release share/man/man7 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Apr 2014 00:54:13 -0000 Author: gjb Date: Tue Apr 8 00:54:11 2014 New Revision: 264246 URL: http://svnweb.freebsd.org/changeset/base/264246 Log: MFC r264027, r264028, r264029, r264030, r264046, r264073: r264027: Add a new release build variable, WITH_COMPRESSED_IMAGES. When set to a non-empty value, the installation medium is compressed as part of the 'install' target in the release/ directory. r264028: Clean up trailing whitespace in release/Makefile. r264029: Fix logic error. r264030: If WITH_COMPRESSED_IMAGES is set, add the compressed images to the CLEANFILES list. r264046: Use xz(1) instead of gzip(1) to compress release images when WITH_COMPRESSED_IMAGES is used. r264073: Allow overriding xz(1) path. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/Makefile stable/9/release/release.conf.sample stable/9/release/release.sh stable/9/share/man/man7/release.7 Directory Properties: stable/9/release/ (props changed) stable/9/share/man/man7/ (props changed) Modified: stable/9/release/Makefile ============================================================================== --- stable/9/release/Makefile Tue Apr 8 00:53:31 2014 (r264245) +++ stable/9/release/Makefile Tue Apr 8 00:54:11 2014 (r264246) @@ -1,7 +1,7 @@ # $FreeBSD$ # # Makefile for building releases and release media. -# +# # User-driven targets: # cdrom: Builds release CD-ROM media (disc1.iso) # dvdrom: Builds release DVD-ROM media (dvd1.iso) @@ -13,7 +13,7 @@ # # Variables affecting the build process: # WORLDDIR: location of src tree -- must have built world and default kernel -# (by default, the directory above this one) +# (by default, the directory above this one) # PORTSDIR: location of ports tree to distribute (default: /usr/ports) # DOCDIR: location of doc tree (default: /usr/doc) # NOPKG: if set, do not distribute third-party packages @@ -21,13 +21,16 @@ # NOSRC: if set, do not distribute source tree # NODOC: if set, do not generate release documentation # WITH_DVD: if set, generate dvd1.iso -# TARGET/TARGET_ARCH: architecture of built release +# WITH_COMPRESSED_IMAGES: if set, compress installation images with xz(1) +# (uncompressed images are not removed) +# TARGET/TARGET_ARCH: architecture of built release # WORLDDIR?= ${.CURDIR}/.. PORTSDIR?= /usr/ports DOCDIR?= /usr/doc RELNOTES_LANG?= en_US.ISO8859-1 +XZCMD?= /usr/bin/xz .if !defined(TARGET) || empty(TARGET) TARGET= ${MACHINE} @@ -63,7 +66,7 @@ NODOC= true NOPORTS= true .endif -EXTRA_PACKAGES= +EXTRA_PACKAGES= .if !defined(NOPORTS) EXTRA_PACKAGES+= ports.txz .endif @@ -92,6 +95,11 @@ IMAGES+= mini-memstick.img .endif CLEANFILES= packagesystem *.txz MANIFEST system ${IMAGES} +.if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES) +. for I in ${IMAGES} +CLEANFILES+= ${I}.xz +. endfor +.endif CLEANDIRS= dist ftp release bootonly dvd beforeclean: chflags -R noschg . @@ -260,6 +268,9 @@ install: cp -a ftp ${DESTDIR}/ .for I in ${IMAGES} cp -p ${I} ${DESTDIR}/${OSRELEASE}-${I} +. if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES) + ${XZCMD} -k ${DESTDIR}/${OSRELEASE}-${I} +. endif .endfor cd ${DESTDIR} && sha256 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA256 cd ${DESTDIR} && md5 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.MD5 Modified: stable/9/release/release.conf.sample ============================================================================== --- stable/9/release/release.conf.sample Tue Apr 8 00:53:31 2014 (r264245) +++ stable/9/release/release.conf.sample Tue Apr 8 00:54:11 2014 (r264246) @@ -46,6 +46,7 @@ PORTBRANCH="ports/head@rHEAD" #NODOC= #NOPORTS= #WITH_DVD= +#WITH_COMPRESSED_IMAGES= ## Set when building embedded images. #EMBEDDEDBUILD= Modified: stable/9/release/release.sh ============================================================================== --- stable/9/release/release.sh Tue Apr 8 00:53:31 2014 (r264245) +++ stable/9/release/release.sh Tue Apr 8 00:54:11 2014 (r264246) @@ -83,6 +83,7 @@ NOPORTS= # Set to non-empty value to build dvd1.iso as part of the release. WITH_DVD= +WITH_COMPRESSED_IMAGES= usage() { echo "Usage: $0 [-c release.conf]" @@ -128,6 +129,7 @@ if [ -n "${EMBEDDEDBUILD}" ]; then exit 1 fi WITH_DVD= + WITH_COMPRESSED_IMAGES= NODOC=yes fi @@ -262,4 +264,4 @@ eval chroot ${CHROOTDIR} make -C /usr/sr eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \ release eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \ - install DESTDIR=/R + install DESTDIR=/R WITH_COMPRESSED_IMAGES=${WITH_COMPRESSED_IMAGES} Modified: stable/9/share/man/man7/release.7 ============================================================================== --- stable/9/share/man/man7/release.7 Tue Apr 8 00:53:31 2014 (r264245) +++ stable/9/share/man/man7/release.7 Tue Apr 8 00:54:11 2014 (r264246) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 5, 2014 +.Dd April 2, 2014 .Dt RELEASE 7 .Os .Sh NAME @@ -250,6 +250,12 @@ Setting this also sets Set to a non-empty value to include the .Cm dvdrom target. +.It Va WITH_COMPRESSED_IMAGES +Set to a non-empty value to compress the release images with +.Xr xz 1 . +The original +.Pq uncompressed +images are not removed. .It Va VCSCMD The command run to obtain the source trees. Defaults to From owner-svn-src-stable@FreeBSD.ORG Tue Apr 8 01:04:23 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A96CBF47; Tue, 8 Apr 2014 01:04:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95E281BFB; Tue, 8 Apr 2014 01:04:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3814NDO020470; Tue, 8 Apr 2014 01:04:23 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3814NN0020469; Tue, 8 Apr 2014 01:04:23 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201404080104.s3814NN0020469@svn.freebsd.org> From: Devin Teske Date: Tue, 8 Apr 2014 01:04:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264247 - stable/9/sys/netpfil/ipfw X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Apr 2014 01:04:23 -0000 Author: dteske Date: Tue Apr 8 01:04:23 2014 New Revision: 264247 URL: http://svnweb.freebsd.org/changeset/base/264247 Log: MFC a modified version of r258588 (modification suggested by Mikolaj Golub; tested stable both original and modified versions) that fixes kernel panic when starting/stopping VIMAGE jails. Discussed with: rodrigc, Mikolaj Golub Modified: stable/9/sys/netpfil/ipfw/ip_fw_nat.c Modified: stable/9/sys/netpfil/ipfw/ip_fw_nat.c ============================================================================== --- stable/9/sys/netpfil/ipfw/ip_fw_nat.c Tue Apr 8 00:54:11 2014 (r264246) +++ stable/9/sys/netpfil/ipfw/ip_fw_nat.c Tue Apr 8 01:04:23 2014 (r264247) @@ -676,7 +676,7 @@ static moduledata_t ipfw_nat_mod = { /* Define startup order. */ #define IPFW_NAT_SI_SUB_FIREWALL SI_SUB_PROTO_IFATTACHDOMAIN -#define IPFW_NAT_MODEVENT_ORDER (SI_ORDER_ANY - 255) +#define IPFW_NAT_MODEVENT_ORDER (SI_ORDER_ANY - 128) #define IPFW_NAT_MODULE_ORDER (IPFW_NAT_MODEVENT_ORDER + 1) #define IPFW_NAT_VNET_ORDER (IPFW_NAT_MODEVENT_ORDER + 2) From owner-svn-src-stable@FreeBSD.ORG Tue Apr 8 02:32:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F369585; Tue, 8 Apr 2014 02:32:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0369B1530; Tue, 8 Apr 2014 02:32:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s382Wdii056837; Tue, 8 Apr 2014 02:32:39 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s382WdHZ056836; Tue, 8 Apr 2014 02:32:39 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201404080232.s382WdHZ056836@svn.freebsd.org> From: Devin Teske Date: Tue, 8 Apr 2014 02:32:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264249 - in stable/9: . sys sys/netpfil X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Apr 2014 02:32:40 -0000 Author: dteske Date: Tue Apr 8 02:32:39 2014 New Revision: 264249 URL: http://svnweb.freebsd.org/changeset/base/264249 Log: Merge missing mergeinfo for SVN r258588 Modified: Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/netpfil/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Tue Apr 8 18:27:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A41D7D7; Tue, 8 Apr 2014 18:27:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A87B1243; Tue, 8 Apr 2014 18:27:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s38IRfAK049047; Tue, 8 Apr 2014 18:27:41 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s38IRd0D049041; Tue, 8 Apr 2014 18:27:39 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201404081827.s38IRd0D049041@svn.freebsd.org> From: Xin LI Date: Tue, 8 Apr 2014 18:27:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264266 - in stable/10: crypto/openssl/crypto/bn crypto/openssl/crypto/ec crypto/openssl/ssl sys/fs/nfsserver X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Apr 2014 18:27:41 -0000 Author: delphij Date: Tue Apr 8 18:27:39 2014 New Revision: 264266 URL: http://svnweb.freebsd.org/changeset/base/264266 Log: Fix NFS deadlock vulnerability. [SA-14:05] Fix "Heartbleed" vulnerability and ECDSA Cache Side-channel Attack in OpenSSL. [SA-14:06] Modified: stable/10/crypto/openssl/crypto/bn/bn.h stable/10/crypto/openssl/crypto/bn/bn_lib.c stable/10/crypto/openssl/crypto/ec/ec2_mult.c stable/10/crypto/openssl/ssl/d1_both.c stable/10/crypto/openssl/ssl/t1_lib.c stable/10/sys/fs/nfsserver/nfs_nfsdserv.c Modified: stable/10/crypto/openssl/crypto/bn/bn.h ============================================================================== --- stable/10/crypto/openssl/crypto/bn/bn.h Tue Apr 8 18:27:32 2014 (r264265) +++ stable/10/crypto/openssl/crypto/bn/bn.h Tue Apr 8 18:27:39 2014 (r264266) @@ -538,6 +538,8 @@ BIGNUM *BN_mod_inverse(BIGNUM *ret, BIGNUM *BN_mod_sqrt(BIGNUM *ret, const BIGNUM *a, const BIGNUM *n,BN_CTX *ctx); +void BN_consttime_swap(BN_ULONG swap, BIGNUM *a, BIGNUM *b, int nwords); + /* Deprecated versions */ #ifndef OPENSSL_NO_DEPRECATED BIGNUM *BN_generate_prime(BIGNUM *ret,int bits,int safe, @@ -774,11 +776,20 @@ int RAND_pseudo_bytes(unsigned char *buf #define bn_fix_top(a) bn_check_top(a) +#define bn_check_size(bn, bits) bn_wcheck_size(bn, ((bits+BN_BITS2-1))/BN_BITS2) +#define bn_wcheck_size(bn, words) \ + do { \ + const BIGNUM *_bnum2 = (bn); \ + assert(words <= (_bnum2)->dmax && words >= (_bnum2)->top); \ + } while(0) + #else /* !BN_DEBUG */ #define bn_pollute(a) #define bn_check_top(a) #define bn_fix_top(a) bn_correct_top(a) +#define bn_check_size(bn, bits) +#define bn_wcheck_size(bn, words) #endif Modified: stable/10/crypto/openssl/crypto/bn/bn_lib.c ============================================================================== --- stable/10/crypto/openssl/crypto/bn/bn_lib.c Tue Apr 8 18:27:32 2014 (r264265) +++ stable/10/crypto/openssl/crypto/bn/bn_lib.c Tue Apr 8 18:27:39 2014 (r264266) @@ -824,3 +824,55 @@ int bn_cmp_part_words(const BN_ULONG *a, } return bn_cmp_words(a,b,cl); } + +/* + * Constant-time conditional swap of a and b. + * a and b are swapped if condition is not 0. The code assumes that at most one bit of condition is set. + * nwords is the number of words to swap. The code assumes that at least nwords are allocated in both a and b, + * and that no more than nwords are used by either a or b. + * a and b cannot be the same number + */ +void BN_consttime_swap(BN_ULONG condition, BIGNUM *a, BIGNUM *b, int nwords) + { + BN_ULONG t; + int i; + + bn_wcheck_size(a, nwords); + bn_wcheck_size(b, nwords); + + assert(a != b); + assert((condition & (condition - 1)) == 0); + assert(sizeof(BN_ULONG) >= sizeof(int)); + + condition = ((condition - 1) >> (BN_BITS2 - 1)) - 1; + + t = (a->top^b->top) & condition; + a->top ^= t; + b->top ^= t; + +#define BN_CONSTTIME_SWAP(ind) \ + do { \ + t = (a->d[ind] ^ b->d[ind]) & condition; \ + a->d[ind] ^= t; \ + b->d[ind] ^= t; \ + } while (0) + + + switch (nwords) { + default: + for (i = 10; i < nwords; i++) + BN_CONSTTIME_SWAP(i); + /* Fallthrough */ + case 10: BN_CONSTTIME_SWAP(9); /* Fallthrough */ + case 9: BN_CONSTTIME_SWAP(8); /* Fallthrough */ + case 8: BN_CONSTTIME_SWAP(7); /* Fallthrough */ + case 7: BN_CONSTTIME_SWAP(6); /* Fallthrough */ + case 6: BN_CONSTTIME_SWAP(5); /* Fallthrough */ + case 5: BN_CONSTTIME_SWAP(4); /* Fallthrough */ + case 4: BN_CONSTTIME_SWAP(3); /* Fallthrough */ + case 3: BN_CONSTTIME_SWAP(2); /* Fallthrough */ + case 2: BN_CONSTTIME_SWAP(1); /* Fallthrough */ + case 1: BN_CONSTTIME_SWAP(0); + } +#undef BN_CONSTTIME_SWAP +} Modified: stable/10/crypto/openssl/crypto/ec/ec2_mult.c ============================================================================== --- stable/10/crypto/openssl/crypto/ec/ec2_mult.c Tue Apr 8 18:27:32 2014 (r264265) +++ stable/10/crypto/openssl/crypto/ec/ec2_mult.c Tue Apr 8 18:27:39 2014 (r264266) @@ -208,11 +208,15 @@ static int gf2m_Mxy(const EC_GROUP *grou return ret; } + /* Computes scalar*point and stores the result in r. * point can not equal r. - * Uses algorithm 2P of + * Uses a modified algorithm 2P of * Lopez, J. and Dahab, R. "Fast multiplication on elliptic curves over * GF(2^m) without precomputation" (CHES '99, LNCS 1717). + * + * To protect against side-channel attack the function uses constant time swap, + * avoiding conditional branches. */ static int ec_GF2m_montgomery_point_multiply(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, const EC_POINT *point, BN_CTX *ctx) @@ -246,6 +250,11 @@ static int ec_GF2m_montgomery_point_mult x2 = &r->X; z2 = &r->Y; + bn_wexpand(x1, group->field.top); + bn_wexpand(z1, group->field.top); + bn_wexpand(x2, group->field.top); + bn_wexpand(z2, group->field.top); + if (!BN_GF2m_mod_arr(x1, &point->X, group->poly)) goto err; /* x1 = x */ if (!BN_one(z1)) goto err; /* z1 = 1 */ if (!group->meth->field_sqr(group, z2, x1, ctx)) goto err; /* z2 = x1^2 = x^2 */ @@ -270,16 +279,12 @@ static int ec_GF2m_montgomery_point_mult word = scalar->d[i]; while (mask) { - if (word & mask) - { - if (!gf2m_Madd(group, &point->X, x1, z1, x2, z2, ctx)) goto err; - if (!gf2m_Mdouble(group, x2, z2, ctx)) goto err; - } - else - { - if (!gf2m_Madd(group, &point->X, x2, z2, x1, z1, ctx)) goto err; - if (!gf2m_Mdouble(group, x1, z1, ctx)) goto err; - } + BN_consttime_swap(word & mask, x1, x2, group->field.top); + BN_consttime_swap(word & mask, z1, z2, group->field.top); + if (!gf2m_Madd(group, &point->X, x2, z2, x1, z1, ctx)) goto err; + if (!gf2m_Mdouble(group, x1, z1, ctx)) goto err; + BN_consttime_swap(word & mask, x1, x2, group->field.top); + BN_consttime_swap(word & mask, z1, z2, group->field.top); mask >>= 1; } mask = BN_TBIT; Modified: stable/10/crypto/openssl/ssl/d1_both.c ============================================================================== --- stable/10/crypto/openssl/ssl/d1_both.c Tue Apr 8 18:27:32 2014 (r264265) +++ stable/10/crypto/openssl/ssl/d1_both.c Tue Apr 8 18:27:39 2014 (r264266) @@ -1458,26 +1458,36 @@ dtls1_process_heartbeat(SSL *s) unsigned int payload; unsigned int padding = 16; /* Use minimum padding */ - /* Read type and payload length first */ - hbtype = *p++; - n2s(p, payload); - pl = p; - if (s->msg_callback) s->msg_callback(0, s->version, TLS1_RT_HEARTBEAT, &s->s3->rrec.data[0], s->s3->rrec.length, s, s->msg_callback_arg); + /* Read type and payload length first */ + if (1 + 2 + 16 > s->s3->rrec.length) + return 0; /* silently discard */ + hbtype = *p++; + n2s(p, payload); + if (1 + 2 + payload + 16 > s->s3->rrec.length) + return 0; /* silently discard per RFC 6520 sec. 4 */ + pl = p; + if (hbtype == TLS1_HB_REQUEST) { unsigned char *buffer, *bp; + unsigned int write_length = 1 /* heartbeat type */ + + 2 /* heartbeat length */ + + payload + padding; int r; + if (write_length > SSL3_RT_MAX_PLAIN_LENGTH) + return 0; + /* Allocate memory for the response, size is 1 byte * message type, plus 2 bytes payload length, plus * payload, plus padding */ - buffer = OPENSSL_malloc(1 + 2 + payload + padding); + buffer = OPENSSL_malloc(write_length); bp = buffer; /* Enter response type, length and copy payload */ @@ -1488,11 +1498,11 @@ dtls1_process_heartbeat(SSL *s) /* Random padding */ RAND_pseudo_bytes(bp, padding); - r = dtls1_write_bytes(s, TLS1_RT_HEARTBEAT, buffer, 3 + payload + padding); + r = dtls1_write_bytes(s, TLS1_RT_HEARTBEAT, buffer, write_length); if (r >= 0 && s->msg_callback) s->msg_callback(1, s->version, TLS1_RT_HEARTBEAT, - buffer, 3 + payload + padding, + buffer, write_length, s, s->msg_callback_arg); OPENSSL_free(buffer); Modified: stable/10/crypto/openssl/ssl/t1_lib.c ============================================================================== --- stable/10/crypto/openssl/ssl/t1_lib.c Tue Apr 8 18:27:32 2014 (r264265) +++ stable/10/crypto/openssl/ssl/t1_lib.c Tue Apr 8 18:27:39 2014 (r264266) @@ -2486,16 +2486,20 @@ tls1_process_heartbeat(SSL *s) unsigned int payload; unsigned int padding = 16; /* Use minimum padding */ - /* Read type and payload length first */ - hbtype = *p++; - n2s(p, payload); - pl = p; - if (s->msg_callback) s->msg_callback(0, s->version, TLS1_RT_HEARTBEAT, &s->s3->rrec.data[0], s->s3->rrec.length, s, s->msg_callback_arg); + /* Read type and payload length first */ + if (1 + 2 + 16 > s->s3->rrec.length) + return 0; /* silently discard */ + hbtype = *p++; + n2s(p, payload); + if (1 + 2 + payload + 16 > s->s3->rrec.length) + return 0; /* silently discard per RFC 6520 sec. 4 */ + pl = p; + if (hbtype == TLS1_HB_REQUEST) { unsigned char *buffer, *bp; Modified: stable/10/sys/fs/nfsserver/nfs_nfsdserv.c ============================================================================== --- stable/10/sys/fs/nfsserver/nfs_nfsdserv.c Tue Apr 8 18:27:32 2014 (r264265) +++ stable/10/sys/fs/nfsserver/nfs_nfsdserv.c Tue Apr 8 18:27:39 2014 (r264266) @@ -1457,10 +1457,23 @@ nfsrvd_rename(struct nfsrv_descript *nd, nfsvno_relpathbuf(&fromnd); goto out; } + /* + * Unlock dp in this code section, so it is unlocked before + * tdp gets locked. This avoids a potential LOR if tdp is the + * parent directory of dp. + */ if (nd->nd_flag & ND_NFSV4) { tdp = todp; tnes = *toexp; - tdirfor_ret = nfsvno_getattr(tdp, &tdirfor, nd->nd_cred, p, 0); + if (dp != tdp) { + NFSVOPUNLOCK(dp, 0); + tdirfor_ret = nfsvno_getattr(tdp, &tdirfor, nd->nd_cred, + p, 0); /* Might lock tdp. */ + } else { + tdirfor_ret = nfsvno_getattr(tdp, &tdirfor, nd->nd_cred, + p, 1); + NFSVOPUNLOCK(dp, 0); + } } else { tfh.nfsrvfh_len = 0; error = nfsrv_mtofh(nd, &tfh); @@ -1481,10 +1494,12 @@ nfsrvd_rename(struct nfsrv_descript *nd, tnes = *exp; tdirfor_ret = nfsvno_getattr(tdp, &tdirfor, nd->nd_cred, p, 1); + NFSVOPUNLOCK(dp, 0); } else { + NFSVOPUNLOCK(dp, 0); nd->nd_cred->cr_uid = nd->nd_saveduid; nfsd_fhtovp(nd, &tfh, LK_EXCLUSIVE, &tdp, &tnes, NULL, - 0, p); + 0, p); /* Locks tdp. */ if (tdp) { tdirfor_ret = nfsvno_getattr(tdp, &tdirfor, nd->nd_cred, p, 1); @@ -1499,7 +1514,7 @@ nfsrvd_rename(struct nfsrv_descript *nd, if (error) { if (tdp) vrele(tdp); - vput(dp); + vrele(dp); nfsvno_relpathbuf(&fromnd); nfsvno_relpathbuf(&tond); goto out; @@ -1514,7 +1529,7 @@ nfsrvd_rename(struct nfsrv_descript *nd, } if (tdp) vrele(tdp); - vput(dp); + vrele(dp); nfsvno_relpathbuf(&fromnd); nfsvno_relpathbuf(&tond); goto out; @@ -1523,7 +1538,7 @@ nfsrvd_rename(struct nfsrv_descript *nd, /* * Done parsing, now down to business. */ - nd->nd_repstat = nfsvno_namei(nd, &fromnd, dp, 1, exp, p, &fdirp); + nd->nd_repstat = nfsvno_namei(nd, &fromnd, dp, 0, exp, p, &fdirp); if (nd->nd_repstat) { if (nd->nd_flag & ND_NFSV3) { nfsrv_wcc(nd, fdirfor_ret, &fdirfor, fdiraft_ret, From owner-svn-src-stable@FreeBSD.ORG Tue Apr 8 20:40:55 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5BD4E307; Tue, 8 Apr 2014 20:40:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BDEA1173; Tue, 8 Apr 2014 20:40:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s38Ketll006277; Tue, 8 Apr 2014 20:40:55 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s38Kes0P006272; Tue, 8 Apr 2014 20:40:54 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201404082040.s38Kes0P006272@svn.freebsd.org> From: John Baldwin Date: Tue, 8 Apr 2014 20:40:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264273 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Apr 2014 20:40:55 -0000 Author: jhb Date: Tue Apr 8 20:40:54 2014 New Revision: 264273 URL: http://svnweb.freebsd.org/changeset/base/264273 Log: MFC 259635: Add an option to ignore accesses by the guest to unimplemented MSRs. Also, ignore a couple of SandyBridge uncore PMC MSRs that Centos 6.4 writes to during boot. Modified: stable/10/usr.sbin/bhyve/bhyve.8 stable/10/usr.sbin/bhyve/bhyverun.c stable/10/usr.sbin/bhyve/xmsr.c stable/10/usr.sbin/bhyve/xmsr.h Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/bhyve.8 ============================================================================== --- stable/10/usr.sbin/bhyve/bhyve.8 Tue Apr 8 20:17:11 2014 (r264272) +++ stable/10/usr.sbin/bhyve/bhyve.8 Tue Apr 8 20:40:54 2014 (r264273) @@ -32,7 +32,7 @@ .Nd "run a guest operating system inside a virtual machine" .Sh SYNOPSIS .Nm -.Op Fl aehAHPW +.Op Fl aehwAHPW .Op Fl c Ar numcpus .Op Fl g Ar gdbport .Op Fl p Ar pinnedcpu @@ -229,6 +229,8 @@ Force .Nm to exit when a guest issues an access to an I/O port that is not emulated. This is intended for debug purposes. +.It Fl w +Ignore accesses to unimplemented Model Specific Registers (MSRs). This is intended for debug purposes. .It Fl h Print help message and exit. .It Ar vmname Modified: stable/10/usr.sbin/bhyve/bhyverun.c ============================================================================== --- stable/10/usr.sbin/bhyve/bhyverun.c Tue Apr 8 20:17:11 2014 (r264272) +++ stable/10/usr.sbin/bhyve/bhyverun.c Tue Apr 8 20:40:54 2014 (r264273) @@ -88,6 +88,7 @@ static int guest_vmexit_on_hlt, guest_vm static int virtio_msix = 1; static int strictio; +static int strictmsr = 1; static int acpi; @@ -123,7 +124,7 @@ usage(int code) { fprintf(stderr, - "Usage: %s [-aehAHIPW] [-g ] [-s ] [-S ]\n" + "Usage: %s [-aehwAHIPW] [-g ] [-s ] [-S ]\n" " %*s [-c vcpus] [-p pincpu] [-m mem] [-l ] \n" " -a: local apic is in XAPIC mode (default is X2APIC)\n" " -A: create an ACPI table\n" @@ -138,7 +139,8 @@ usage(int code) " -s: PCI slot config\n" " -S: legacy PCI slot config\n" " -l: LPC device configuration\n" - " -m: memory size in MB\n", + " -m: memory size in MB\n" + " -w: ignore unimplemented MSRs\n", progname, (int)strlen(progname), ""); exit(code); @@ -316,20 +318,43 @@ vmexit_inout(struct vmctx *ctx, struct v static int vmexit_rdmsr(struct vmctx *ctx, struct vm_exit *vme, int *pvcpu) { - fprintf(stderr, "vm exit rdmsr 0x%x, cpu %d\n", vme->u.msr.code, - *pvcpu); - return (VMEXIT_ABORT); + uint64_t val; + uint32_t eax, edx; + int error; + + val = 0; + error = emulate_rdmsr(ctx, *pvcpu, vme->u.msr.code, &val); + if (error != 0) { + fprintf(stderr, "rdmsr to register %#x on vcpu %d\n", + vme->u.msr.code, *pvcpu); + if (strictmsr) + return (VMEXIT_ABORT); + } + + eax = val; + error = vm_set_register(ctx, *pvcpu, VM_REG_GUEST_RAX, eax); + assert(error == 0); + + edx = val >> 32; + error = vm_set_register(ctx, *pvcpu, VM_REG_GUEST_RDX, edx); + assert(error == 0); + + return (VMEXIT_CONTINUE); } static int vmexit_wrmsr(struct vmctx *ctx, struct vm_exit *vme, int *pvcpu) { - int newcpu; - int retval = VMEXIT_CONTINUE; - - newcpu = emulate_wrmsr(ctx, *pvcpu, vme->u.msr.code,vme->u.msr.wval); + int error; - return (retval); + error = emulate_wrmsr(ctx, *pvcpu, vme->u.msr.code, vme->u.msr.wval); + if (error != 0) { + fprintf(stderr, "wrmsr to register %#x(%#lx) on vcpu %d\n", + vme->u.msr.code, vme->u.msr.wval, *pvcpu); + if (strictmsr) + return (VMEXIT_ABORT); + } + return (VMEXIT_CONTINUE); } static int @@ -583,7 +608,7 @@ main(int argc, char *argv[]) guest_ncpus = 1; memsize = 256 * MB; - while ((c = getopt(argc, argv, "abehAHIPWp:g:c:s:S:m:l:")) != -1) { + while ((c = getopt(argc, argv, "abehwAHIPWp:g:c:s:S:m:l:")) != -1) { switch (c) { case 'a': disable_x2apic = 1; @@ -642,6 +667,9 @@ main(int argc, char *argv[]) case 'e': strictio = 1; break; + case 'w': + strictmsr = 0; + break; case 'W': virtio_msix = 0; break; Modified: stable/10/usr.sbin/bhyve/xmsr.c ============================================================================== --- stable/10/usr.sbin/bhyve/xmsr.c Tue Apr 8 20:17:11 2014 (r264272) +++ stable/10/usr.sbin/bhyve/xmsr.c Tue Apr 8 20:40:54 2014 (r264273) @@ -43,6 +43,19 @@ int emulate_wrmsr(struct vmctx *ctx, int vcpu, uint32_t code, uint64_t val) { - printf("Unknown WRMSR code %x, val %lx, cpu %d\n", code, val, vcpu); - exit(1); + switch (code) { + case 0xd04: /* Sandy Bridge uncore PMC MSRs */ + case 0xc24: + return (0); + default: + break; + } + return (-1); +} + +int +emulate_rdmsr(struct vmctx *ctx, int vcpu, uint32_t code, uint64_t *val) +{ + + return (-1); } Modified: stable/10/usr.sbin/bhyve/xmsr.h ============================================================================== --- stable/10/usr.sbin/bhyve/xmsr.h Tue Apr 8 20:17:11 2014 (r264272) +++ stable/10/usr.sbin/bhyve/xmsr.h Tue Apr 8 20:40:54 2014 (r264273) @@ -30,5 +30,6 @@ #define _XMSR_H_ int emulate_wrmsr(struct vmctx *ctx, int vcpu, uint32_t code, uint64_t val); +int emulate_rdmsr(struct vmctx *ctx, int vcpu, uint32_t code, uint64_t *val); #endif From owner-svn-src-stable@FreeBSD.ORG Tue Apr 8 23:16:20 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C37F322A; Tue, 8 Apr 2014 23:16:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A40921308; Tue, 8 Apr 2014 23:16:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s38NGKXG068818; Tue, 8 Apr 2014 23:16:20 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s38NGJKS068814; Tue, 8 Apr 2014 23:16:19 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201404082316.s38NGJKS068814@svn.freebsd.org> From: Xin LI Date: Tue, 8 Apr 2014 23:16:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264285 - in stable: 8/crypto/openssl/crypto/bn 8/crypto/openssl/crypto/ec 8/sys/fs/nfsserver 9/crypto/openssl/crypto/bn 9/crypto/openssl/crypto/ec 9/sys/fs/nfsserver X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Apr 2014 23:16:20 -0000 Author: delphij Date: Tue Apr 8 23:16:19 2014 New Revision: 264285 URL: http://svnweb.freebsd.org/changeset/base/264285 Log: Fix NFS deadlock vulnerability. [SA-14:05] Fix ECDSA Cache Side-channel Attack in OpenSSL. [SA-14:06] Modified: stable/9/crypto/openssl/crypto/bn/bn.h stable/9/crypto/openssl/crypto/bn/bn_lib.c stable/9/crypto/openssl/crypto/ec/ec2_mult.c stable/9/sys/fs/nfsserver/nfs_nfsdserv.c Changes in other areas also in this revision: Modified: stable/8/crypto/openssl/crypto/bn/bn.h stable/8/crypto/openssl/crypto/bn/bn_lib.c stable/8/crypto/openssl/crypto/ec/ec2_mult.c stable/8/sys/fs/nfsserver/nfs_nfsdserv.c Modified: stable/9/crypto/openssl/crypto/bn/bn.h ============================================================================== --- stable/9/crypto/openssl/crypto/bn/bn.h Tue Apr 8 23:16:05 2014 (r264284) +++ stable/9/crypto/openssl/crypto/bn/bn.h Tue Apr 8 23:16:19 2014 (r264285) @@ -511,6 +511,8 @@ BIGNUM *BN_mod_inverse(BIGNUM *ret, BIGNUM *BN_mod_sqrt(BIGNUM *ret, const BIGNUM *a, const BIGNUM *n,BN_CTX *ctx); +void BN_consttime_swap(BN_ULONG swap, BIGNUM *a, BIGNUM *b, int nwords); + /* Deprecated versions */ #ifndef OPENSSL_NO_DEPRECATED BIGNUM *BN_generate_prime(BIGNUM *ret,int bits,int safe, @@ -740,11 +742,20 @@ int RAND_pseudo_bytes(unsigned char *buf #define bn_fix_top(a) bn_check_top(a) +#define bn_check_size(bn, bits) bn_wcheck_size(bn, ((bits+BN_BITS2-1))/BN_BITS2) +#define bn_wcheck_size(bn, words) \ + do { \ + const BIGNUM *_bnum2 = (bn); \ + assert(words <= (_bnum2)->dmax && words >= (_bnum2)->top); \ + } while(0) + #else /* !BN_DEBUG */ #define bn_pollute(a) #define bn_check_top(a) #define bn_fix_top(a) bn_correct_top(a) +#define bn_check_size(bn, bits) +#define bn_wcheck_size(bn, words) #endif Modified: stable/9/crypto/openssl/crypto/bn/bn_lib.c ============================================================================== --- stable/9/crypto/openssl/crypto/bn/bn_lib.c Tue Apr 8 23:16:05 2014 (r264284) +++ stable/9/crypto/openssl/crypto/bn/bn_lib.c Tue Apr 8 23:16:19 2014 (r264285) @@ -824,3 +824,55 @@ int bn_cmp_part_words(const BN_ULONG *a, } return bn_cmp_words(a,b,cl); } + +/* + * Constant-time conditional swap of a and b. + * a and b are swapped if condition is not 0. The code assumes that at most one bit of condition is set. + * nwords is the number of words to swap. The code assumes that at least nwords are allocated in both a and b, + * and that no more than nwords are used by either a or b. + * a and b cannot be the same number + */ +void BN_consttime_swap(BN_ULONG condition, BIGNUM *a, BIGNUM *b, int nwords) + { + BN_ULONG t; + int i; + + bn_wcheck_size(a, nwords); + bn_wcheck_size(b, nwords); + + assert(a != b); + assert((condition & (condition - 1)) == 0); + assert(sizeof(BN_ULONG) >= sizeof(int)); + + condition = ((condition - 1) >> (BN_BITS2 - 1)) - 1; + + t = (a->top^b->top) & condition; + a->top ^= t; + b->top ^= t; + +#define BN_CONSTTIME_SWAP(ind) \ + do { \ + t = (a->d[ind] ^ b->d[ind]) & condition; \ + a->d[ind] ^= t; \ + b->d[ind] ^= t; \ + } while (0) + + + switch (nwords) { + default: + for (i = 10; i < nwords; i++) + BN_CONSTTIME_SWAP(i); + /* Fallthrough */ + case 10: BN_CONSTTIME_SWAP(9); /* Fallthrough */ + case 9: BN_CONSTTIME_SWAP(8); /* Fallthrough */ + case 8: BN_CONSTTIME_SWAP(7); /* Fallthrough */ + case 7: BN_CONSTTIME_SWAP(6); /* Fallthrough */ + case 6: BN_CONSTTIME_SWAP(5); /* Fallthrough */ + case 5: BN_CONSTTIME_SWAP(4); /* Fallthrough */ + case 4: BN_CONSTTIME_SWAP(3); /* Fallthrough */ + case 3: BN_CONSTTIME_SWAP(2); /* Fallthrough */ + case 2: BN_CONSTTIME_SWAP(1); /* Fallthrough */ + case 1: BN_CONSTTIME_SWAP(0); + } +#undef BN_CONSTTIME_SWAP +} Modified: stable/9/crypto/openssl/crypto/ec/ec2_mult.c ============================================================================== --- stable/9/crypto/openssl/crypto/ec/ec2_mult.c Tue Apr 8 23:16:05 2014 (r264284) +++ stable/9/crypto/openssl/crypto/ec/ec2_mult.c Tue Apr 8 23:16:19 2014 (r264285) @@ -208,9 +208,12 @@ static int gf2m_Mxy(const EC_GROUP *grou /* Computes scalar*point and stores the result in r. * point can not equal r. - * Uses algorithm 2P of + * Uses a modified algorithm 2P of * Lopex, J. and Dahab, R. "Fast multiplication on elliptic curves over * GF(2^m) without precomputation". + * + * To protect against side-channel attack the function uses constant time + * swap avoiding conditional branches. */ static int ec_GF2m_montgomery_point_multiply(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, const EC_POINT *point, BN_CTX *ctx) @@ -244,6 +247,11 @@ static int ec_GF2m_montgomery_point_mult x2 = &r->X; z2 = &r->Y; + bn_wexpand(x1, group->field.top); + bn_wexpand(z1, group->field.top); + bn_wexpand(x2, group->field.top); + bn_wexpand(z2, group->field.top); + if (!BN_GF2m_mod_arr(x1, &point->X, group->poly)) goto err; /* x1 = x */ if (!BN_one(z1)) goto err; /* z1 = 1 */ if (!group->meth->field_sqr(group, z2, x1, ctx)) goto err; /* z2 = x1^2 = x^2 */ @@ -266,16 +274,12 @@ static int ec_GF2m_montgomery_point_mult { for (; j >= 0; j--) { - if (scalar->d[i] & mask) - { - if (!gf2m_Madd(group, &point->X, x1, z1, x2, z2, ctx)) goto err; - if (!gf2m_Mdouble(group, x2, z2, ctx)) goto err; - } - else - { - if (!gf2m_Madd(group, &point->X, x2, z2, x1, z1, ctx)) goto err; - if (!gf2m_Mdouble(group, x1, z1, ctx)) goto err; - } + BN_consttime_swap(scalar->d[i] & mask, x1, x2, group->field.top); + BN_consttime_swap(scalar->d[i] & mask, z1, z2, group->field.top); + if (!gf2m_Madd(group, &point->X, x2, z2, x1, z1, ctx)) goto err; + if (!gf2m_Mdouble(group, x1, z1, ctx)) goto err; + BN_consttime_swap(scalar->d[i] & mask, x1, x2, group->field.top); + BN_consttime_swap(scalar->d[i] & mask, z1, z2, group->field.top); mask >>= 1; } j = BN_BITS2 - 1; Modified: stable/9/sys/fs/nfsserver/nfs_nfsdserv.c ============================================================================== --- stable/9/sys/fs/nfsserver/nfs_nfsdserv.c Tue Apr 8 23:16:05 2014 (r264284) +++ stable/9/sys/fs/nfsserver/nfs_nfsdserv.c Tue Apr 8 23:16:19 2014 (r264285) @@ -1457,10 +1457,23 @@ nfsrvd_rename(struct nfsrv_descript *nd, nfsvno_relpathbuf(&fromnd); goto out; } + /* + * Unlock dp in this code section, so it is unlocked before + * tdp gets locked. This avoids a potential LOR if tdp is the + * parent directory of dp. + */ if (nd->nd_flag & ND_NFSV4) { tdp = todp; tnes = *toexp; - tdirfor_ret = nfsvno_getattr(tdp, &tdirfor, nd->nd_cred, p, 0); + if (dp != tdp) { + NFSVOPUNLOCK(dp, 0); + tdirfor_ret = nfsvno_getattr(tdp, &tdirfor, nd->nd_cred, + p, 0); /* Might lock tdp. */ + } else { + tdirfor_ret = nfsvno_getattr(tdp, &tdirfor, nd->nd_cred, + p, 1); + NFSVOPUNLOCK(dp, 0); + } } else { tfh.nfsrvfh_len = 0; error = nfsrv_mtofh(nd, &tfh); @@ -1481,10 +1494,12 @@ nfsrvd_rename(struct nfsrv_descript *nd, tnes = *exp; tdirfor_ret = nfsvno_getattr(tdp, &tdirfor, nd->nd_cred, p, 1); + NFSVOPUNLOCK(dp, 0); } else { + NFSVOPUNLOCK(dp, 0); nd->nd_cred->cr_uid = nd->nd_saveduid; nfsd_fhtovp(nd, &tfh, LK_EXCLUSIVE, &tdp, &tnes, NULL, - 0, p); + 0, p); /* Locks tdp. */ if (tdp) { tdirfor_ret = nfsvno_getattr(tdp, &tdirfor, nd->nd_cred, p, 1); @@ -1499,7 +1514,7 @@ nfsrvd_rename(struct nfsrv_descript *nd, if (error) { if (tdp) vrele(tdp); - vput(dp); + vrele(dp); nfsvno_relpathbuf(&fromnd); nfsvno_relpathbuf(&tond); goto out; @@ -1514,7 +1529,7 @@ nfsrvd_rename(struct nfsrv_descript *nd, } if (tdp) vrele(tdp); - vput(dp); + vrele(dp); nfsvno_relpathbuf(&fromnd); nfsvno_relpathbuf(&tond); goto out; @@ -1523,7 +1538,7 @@ nfsrvd_rename(struct nfsrv_descript *nd, /* * Done parsing, now down to business. */ - nd->nd_repstat = nfsvno_namei(nd, &fromnd, dp, 1, exp, p, &fdirp); + nd->nd_repstat = nfsvno_namei(nd, &fromnd, dp, 0, exp, p, &fdirp); if (nd->nd_repstat) { if (nd->nd_flag & ND_NFSV3) { nfsrv_wcc(nd, fdirfor_ret, &fdirfor, fdiraft_ret, From owner-svn-src-stable@FreeBSD.ORG Tue Apr 8 23:16:21 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD32C22B; Tue, 8 Apr 2014 23:16:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F117130A; Tue, 8 Apr 2014 23:16:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s38NGLtl068827; Tue, 8 Apr 2014 23:16:21 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s38NGKt1068823; Tue, 8 Apr 2014 23:16:20 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201404082316.s38NGKt1068823@svn.freebsd.org> From: Xin LI Date: Tue, 8 Apr 2014 23:16:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r264285 - in stable: 8/crypto/openssl/crypto/bn 8/crypto/openssl/crypto/ec 8/sys/fs/nfsserver 9/crypto/openssl/crypto/bn 9/crypto/openssl/crypto/ec 9/sys/fs/nfsserver X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Apr 2014 23:16:21 -0000 Author: delphij Date: Tue Apr 8 23:16:19 2014 New Revision: 264285 URL: http://svnweb.freebsd.org/changeset/base/264285 Log: Fix NFS deadlock vulnerability. [SA-14:05] Fix ECDSA Cache Side-channel Attack in OpenSSL. [SA-14:06] Modified: stable/8/crypto/openssl/crypto/bn/bn.h stable/8/crypto/openssl/crypto/bn/bn_lib.c stable/8/crypto/openssl/crypto/ec/ec2_mult.c stable/8/sys/fs/nfsserver/nfs_nfsdserv.c Changes in other areas also in this revision: Modified: stable/9/crypto/openssl/crypto/bn/bn.h stable/9/crypto/openssl/crypto/bn/bn_lib.c stable/9/crypto/openssl/crypto/ec/ec2_mult.c stable/9/sys/fs/nfsserver/nfs_nfsdserv.c Modified: stable/8/crypto/openssl/crypto/bn/bn.h ============================================================================== --- stable/8/crypto/openssl/crypto/bn/bn.h Tue Apr 8 23:16:05 2014 (r264284) +++ stable/8/crypto/openssl/crypto/bn/bn.h Tue Apr 8 23:16:19 2014 (r264285) @@ -511,6 +511,8 @@ BIGNUM *BN_mod_inverse(BIGNUM *ret, BIGNUM *BN_mod_sqrt(BIGNUM *ret, const BIGNUM *a, const BIGNUM *n,BN_CTX *ctx); +void BN_consttime_swap(BN_ULONG swap, BIGNUM *a, BIGNUM *b, int nwords); + /* Deprecated versions */ #ifndef OPENSSL_NO_DEPRECATED BIGNUM *BN_generate_prime(BIGNUM *ret,int bits,int safe, @@ -740,11 +742,20 @@ int RAND_pseudo_bytes(unsigned char *buf #define bn_fix_top(a) bn_check_top(a) +#define bn_check_size(bn, bits) bn_wcheck_size(bn, ((bits+BN_BITS2-1))/BN_BITS2) +#define bn_wcheck_size(bn, words) \ + do { \ + const BIGNUM *_bnum2 = (bn); \ + assert(words <= (_bnum2)->dmax && words >= (_bnum2)->top); \ + } while(0) + #else /* !BN_DEBUG */ #define bn_pollute(a) #define bn_check_top(a) #define bn_fix_top(a) bn_correct_top(a) +#define bn_check_size(bn, bits) +#define bn_wcheck_size(bn, words) #endif Modified: stable/8/crypto/openssl/crypto/bn/bn_lib.c ============================================================================== --- stable/8/crypto/openssl/crypto/bn/bn_lib.c Tue Apr 8 23:16:05 2014 (r264284) +++ stable/8/crypto/openssl/crypto/bn/bn_lib.c Tue Apr 8 23:16:19 2014 (r264285) @@ -824,3 +824,55 @@ int bn_cmp_part_words(const BN_ULONG *a, } return bn_cmp_words(a,b,cl); } + +/* + * Constant-time conditional swap of a and b. + * a and b are swapped if condition is not 0. The code assumes that at most one bit of condition is set. + * nwords is the number of words to swap. The code assumes that at least nwords are allocated in both a and b, + * and that no more than nwords are used by either a or b. + * a and b cannot be the same number + */ +void BN_consttime_swap(BN_ULONG condition, BIGNUM *a, BIGNUM *b, int nwords) + { + BN_ULONG t; + int i; + + bn_wcheck_size(a, nwords); + bn_wcheck_size(b, nwords); + + assert(a != b); + assert((condition & (condition - 1)) == 0); + assert(sizeof(BN_ULONG) >= sizeof(int)); + + condition = ((condition - 1) >> (BN_BITS2 - 1)) - 1; + + t = (a->top^b->top) & condition; + a->top ^= t; + b->top ^= t; + +#define BN_CONSTTIME_SWAP(ind) \ + do { \ + t = (a->d[ind] ^ b->d[ind]) & condition; \ + a->d[ind] ^= t; \ + b->d[ind] ^= t; \ + } while (0) + + + switch (nwords) { + default: + for (i = 10; i < nwords; i++) + BN_CONSTTIME_SWAP(i); + /* Fallthrough */ + case 10: BN_CONSTTIME_SWAP(9); /* Fallthrough */ + case 9: BN_CONSTTIME_SWAP(8); /* Fallthrough */ + case 8: BN_CONSTTIME_SWAP(7); /* Fallthrough */ + case 7: BN_CONSTTIME_SWAP(6); /* Fallthrough */ + case 6: BN_CONSTTIME_SWAP(5); /* Fallthrough */ + case 5: BN_CONSTTIME_SWAP(4); /* Fallthrough */ + case 4: BN_CONSTTIME_SWAP(3); /* Fallthrough */ + case 3: BN_CONSTTIME_SWAP(2); /* Fallthrough */ + case 2: BN_CONSTTIME_SWAP(1); /* Fallthrough */ + case 1: BN_CONSTTIME_SWAP(0); + } +#undef BN_CONSTTIME_SWAP +} Modified: stable/8/crypto/openssl/crypto/ec/ec2_mult.c ============================================================================== --- stable/8/crypto/openssl/crypto/ec/ec2_mult.c Tue Apr 8 23:16:05 2014 (r264284) +++ stable/8/crypto/openssl/crypto/ec/ec2_mult.c Tue Apr 8 23:16:19 2014 (r264285) @@ -208,9 +208,12 @@ static int gf2m_Mxy(const EC_GROUP *grou /* Computes scalar*point and stores the result in r. * point can not equal r. - * Uses algorithm 2P of + * Uses a modified algorithm 2P of * Lopex, J. and Dahab, R. "Fast multiplication on elliptic curves over * GF(2^m) without precomputation". + * + * To protect against side-channel attack the function uses constant time + * swap avoiding conditional branches. */ static int ec_GF2m_montgomery_point_multiply(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, const EC_POINT *point, BN_CTX *ctx) @@ -244,6 +247,11 @@ static int ec_GF2m_montgomery_point_mult x2 = &r->X; z2 = &r->Y; + bn_wexpand(x1, group->field.top); + bn_wexpand(z1, group->field.top); + bn_wexpand(x2, group->field.top); + bn_wexpand(z2, group->field.top); + if (!BN_GF2m_mod_arr(x1, &point->X, group->poly)) goto err; /* x1 = x */ if (!BN_one(z1)) goto err; /* z1 = 1 */ if (!group->meth->field_sqr(group, z2, x1, ctx)) goto err; /* z2 = x1^2 = x^2 */ @@ -266,16 +274,12 @@ static int ec_GF2m_montgomery_point_mult { for (; j >= 0; j--) { - if (scalar->d[i] & mask) - { - if (!gf2m_Madd(group, &point->X, x1, z1, x2, z2, ctx)) goto err; - if (!gf2m_Mdouble(group, x2, z2, ctx)) goto err; - } - else - { - if (!gf2m_Madd(group, &point->X, x2, z2, x1, z1, ctx)) goto err; - if (!gf2m_Mdouble(group, x1, z1, ctx)) goto err; - } + BN_consttime_swap(scalar->d[i] & mask, x1, x2, group->field.top); + BN_consttime_swap(scalar->d[i] & mask, z1, z2, group->field.top); + if (!gf2m_Madd(group, &point->X, x2, z2, x1, z1, ctx)) goto err; + if (!gf2m_Mdouble(group, x1, z1, ctx)) goto err; + BN_consttime_swap(scalar->d[i] & mask, x1, x2, group->field.top); + BN_consttime_swap(scalar->d[i] & mask, z1, z2, group->field.top); mask >>= 1; } j = BN_BITS2 - 1; Modified: stable/8/sys/fs/nfsserver/nfs_nfsdserv.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdserv.c Tue Apr 8 23:16:05 2014 (r264284) +++ stable/8/sys/fs/nfsserver/nfs_nfsdserv.c Tue Apr 8 23:16:19 2014 (r264285) @@ -1446,10 +1446,23 @@ nfsrvd_rename(struct nfsrv_descript *nd, nfsvno_relpathbuf(&fromnd); goto out; } + /* + * Unlock dp in this code section, so it is unlocked before + * tdp gets locked. This avoids a potential LOR if tdp is the + * parent directory of dp. + */ if (nd->nd_flag & ND_NFSV4) { tdp = todp; tnes = *toexp; - tdirfor_ret = nfsvno_getattr(tdp, &tdirfor, nd->nd_cred, p, 0); + if (dp != tdp) { + NFSVOPUNLOCK(dp, 0); + tdirfor_ret = nfsvno_getattr(tdp, &tdirfor, nd->nd_cred, + p, 0); /* Might lock tdp. */ + } else { + tdirfor_ret = nfsvno_getattr(tdp, &tdirfor, nd->nd_cred, + p, 1); + NFSVOPUNLOCK(dp, 0); + } } else { tfh.nfsrvfh_len = 0; error = nfsrv_mtofh(nd, &tfh); @@ -1470,10 +1483,12 @@ nfsrvd_rename(struct nfsrv_descript *nd, tnes = *exp; tdirfor_ret = nfsvno_getattr(tdp, &tdirfor, nd->nd_cred, p, 1); + NFSVOPUNLOCK(dp, 0); } else { + NFSVOPUNLOCK(dp, 0); nd->nd_cred->cr_uid = nd->nd_saveduid; nfsd_fhtovp(nd, &tfh, LK_EXCLUSIVE, &tdp, &tnes, NULL, - 0, p); + 0, p); /* Locks tdp. */ if (tdp) { tdirfor_ret = nfsvno_getattr(tdp, &tdirfor, nd->nd_cred, p, 1); @@ -1488,7 +1503,7 @@ nfsrvd_rename(struct nfsrv_descript *nd, if (error) { if (tdp) vrele(tdp); - vput(dp); + vrele(dp); nfsvno_relpathbuf(&fromnd); nfsvno_relpathbuf(&tond); goto out; @@ -1503,7 +1518,7 @@ nfsrvd_rename(struct nfsrv_descript *nd, } if (tdp) vrele(tdp); - vput(dp); + vrele(dp); nfsvno_relpathbuf(&fromnd); nfsvno_relpathbuf(&tond); goto out; @@ -1512,7 +1527,7 @@ nfsrvd_rename(struct nfsrv_descript *nd, /* * Done parsing, now down to business. */ - nd->nd_repstat = nfsvno_namei(nd, &fromnd, dp, 1, exp, p, &fdirp); + nd->nd_repstat = nfsvno_namei(nd, &fromnd, dp, 0, exp, p, &fdirp); if (nd->nd_repstat) { if (nd->nd_flag & ND_NFSV3) { nfsrv_wcc(nd, fdirfor_ret, &fdirfor, fdiraft_ret, From owner-svn-src-stable@FreeBSD.ORG Wed Apr 9 00:40:16 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 457B7680; Wed, 9 Apr 2014 00:40:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 31A1C1D38; Wed, 9 Apr 2014 00:40:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s390eGOv025426; Wed, 9 Apr 2014 00:40:16 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s390eGTc025425; Wed, 9 Apr 2014 00:40:16 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404090040.s390eGTc025425@svn.freebsd.org> From: Glen Barber Date: Wed, 9 Apr 2014 00:40:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264286 - stable/10/release/doc/en_US.ISO8859-1/errata X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2014 00:40:16 -0000 Author: gjb Date: Wed Apr 9 00:40:15 2014 New Revision: 264286 URL: http://svnweb.freebsd.org/changeset/base/264286 Log: Document SA-14:05.nfsserver, SA-14:06.openssl. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Tue Apr 8 23:16:19 2014 (r264285) +++ stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Wed Apr 9 00:40:15 2014 (r264286) @@ -135,6 +135,24 @@ BIND remote denial of service vulnerability + + + SA-14:05.nfsserver + + 8 April 2014 + + Deadlock in the NFS server + + + + SA-14:06.openssl + + 8 April 2014 + + OpenSSL multiple vulnerabilities + From owner-svn-src-stable@FreeBSD.ORG Wed Apr 9 00:40:22 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 085DA7A9; Wed, 9 Apr 2014 00:40:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8B121D39; Wed, 9 Apr 2014 00:40:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s390eL3U025479; Wed, 9 Apr 2014 00:40:21 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s390eLVe025478; Wed, 9 Apr 2014 00:40:21 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404090040.s390eLVe025478@svn.freebsd.org> From: Glen Barber Date: Wed, 9 Apr 2014 00:40:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264287 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2014 00:40:22 -0000 Author: gjb Date: Wed Apr 9 00:40:21 2014 New Revision: 264287 URL: http://svnweb.freebsd.org/changeset/base/264287 Log: Document SA-14:05.nfsserver, SA-14:06.openssl. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 9 00:40:15 2014 (r264286) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 9 00:40:21 2014 (r264287) @@ -126,6 +126,21 @@ Remote denial of service vulnerability + + + FreeBSD-SA-14:05.nfsserver + 8 April 2014 + Deadlock in the NFS server + + + + FreeBSD-SA-14:06.openssl + 8 April 2014 + OpenSSL multiple + vulnerabilities + From owner-svn-src-stable@FreeBSD.ORG Wed Apr 9 00:46:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1803D91C; Wed, 9 Apr 2014 00:46:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0403C1DD1; Wed, 9 Apr 2014 00:46:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s390kC20029080; Wed, 9 Apr 2014 00:46:12 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s390kC0P029079; Wed, 9 Apr 2014 00:46:12 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404090046.s390kC0P029079@svn.freebsd.org> From: Glen Barber Date: Wed, 9 Apr 2014 00:46:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264288 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2014 00:46:13 -0000 Author: gjb Date: Wed Apr 9 00:46:12 2014 New Revision: 264288 URL: http://svnweb.freebsd.org/changeset/base/264288 Log: Correct description of SA-14:06.openssl for stable/9 Submitted by: delphij Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 9 00:40:21 2014 (r264287) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 9 00:46:12 2014 (r264288) @@ -138,8 +138,7 @@ FreeBSD-SA-14:06.openssl 8 April 2014 - OpenSSL multiple - vulnerabilities + ECDSA side channel leak From owner-svn-src-stable@FreeBSD.ORG Wed Apr 9 01:26:58 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB2E2DCB; Wed, 9 Apr 2014 01:26:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97239142F; Wed, 9 Apr 2014 01:26:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s391QwJl045755; Wed, 9 Apr 2014 01:26:58 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s391QwvD045754; Wed, 9 Apr 2014 01:26:58 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201404090126.s391QwvD045754@svn.freebsd.org> From: Peter Wemm Date: Wed, 9 Apr 2014 01:26:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264289 - head/sys/sys stable/10/sys/sys stable/9/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2014 01:26:58 -0000 Author: peter Date: Wed Apr 9 01:26:58 2014 New Revision: 264289 URL: http://svnweb.freebsd.org/changeset/base/264289 Log: Bump osreldate for tracking SA-14:06 Modified: stable/10/sys/sys/param.h Changes in other areas also in this revision: Modified: head/sys/sys/param.h stable/9/sys/sys/param.h Modified: stable/10/sys/sys/param.h ============================================================================== --- stable/10/sys/sys/param.h Wed Apr 9 00:46:12 2014 (r264288) +++ stable/10/sys/sys/param.h Wed Apr 9 01:26:58 2014 (r264289) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1000706 /* Master, propagated to newvers */ +#define __FreeBSD_version 1000707 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-stable@FreeBSD.ORG Wed Apr 9 01:26:59 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55E3DDCD; Wed, 9 Apr 2014 01:26:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 422971432; Wed, 9 Apr 2014 01:26:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s391Qxgl045767; Wed, 9 Apr 2014 01:26:59 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s391QxWY045766; Wed, 9 Apr 2014 01:26:59 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201404090126.s391QxWY045766@svn.freebsd.org> From: Peter Wemm Date: Wed, 9 Apr 2014 01:26:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264289 - head/sys/sys stable/10/sys/sys stable/9/sys/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2014 01:26:59 -0000 Author: peter Date: Wed Apr 9 01:26:58 2014 New Revision: 264289 URL: http://svnweb.freebsd.org/changeset/base/264289 Log: Bump osreldate for tracking SA-14:06 Modified: stable/9/sys/sys/param.h Changes in other areas also in this revision: Modified: head/sys/sys/param.h stable/10/sys/sys/param.h Modified: stable/9/sys/sys/param.h ============================================================================== --- stable/9/sys/sys/param.h Wed Apr 9 00:46:12 2014 (r264288) +++ stable/9/sys/sys/param.h Wed Apr 9 01:26:58 2014 (r264289) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 902510 /* Master, propagated to newvers */ +#define __FreeBSD_version 902511 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-stable@FreeBSD.ORG Wed Apr 9 03:39:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE90B66C; Wed, 9 Apr 2014 03:39:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF15E10DF; Wed, 9 Apr 2014 03:39:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s393dvlg039597; Wed, 9 Apr 2014 03:39:57 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s393dvaO039596; Wed, 9 Apr 2014 03:39:57 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404090339.s393dvaO039596@svn.freebsd.org> From: Glen Barber Date: Wed, 9 Apr 2014 03:39:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264290 - stable/9 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2014 03:39:58 -0000 Author: gjb Date: Wed Apr 9 03:39:57 2014 New Revision: 264290 URL: http://svnweb.freebsd.org/changeset/base/264290 Log: MFC r257350: In r257079, SRCDIR is pointed to ${.CURDIR} when not set. However, Makefile.inc1 is being called in sub-make's where make(1) would, by default, implicitly chdir(2) to ${.OBJDIR} before executing any targets. This would make some targets, like delete-old, when trying to derive various variables introduced by change r256921 using ``make -f Makefile.inc1'' that also rely on SRCDIR to fail. This changeset adds an explicit cd ${.CURDIR} before these unwrapped make calls, making them in line with the other ones that are already being wrapped with the explicit chdir's. Submitted by: Jeremy Chadwick Helped by: Ben Morrow Sponsored by: The FreeBSD Foundation Modified: stable/9/Makefile.inc1 (contents, props changed) Modified: stable/9/Makefile.inc1 ============================================================================== --- stable/9/Makefile.inc1 Wed Apr 9 01:26:58 2014 (r264289) +++ stable/9/Makefile.inc1 Wed Apr 9 03:39:57 2014 (r264290) @@ -1530,6 +1530,7 @@ delete-old-files: # argument list will get too long. Using .for/.endfor make "loops" will make # the Makefile parser segfault. @exec 3<&0; \ + cd ${.CURDIR}; \ ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ -V OLD_FILES -V "OLD_FILES:Musr/share/*.gz:R" | xargs -n1 | \ while read file; do \ @@ -1552,7 +1553,8 @@ delete-old-files: check-old-files: @echo ">>> Checking for old files" - @${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ + @cd ${.CURDIR}; \ + ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ -V OLD_FILES -V "OLD_FILES:Musr/share/*.gz:R" | xargs -n1 | \ while read file; do \ if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \ @@ -1573,6 +1575,7 @@ delete-old-libs: @echo ">>> Removing old libraries" @echo "${OLD_LIBS_MESSAGE}" | fmt @exec 3<&0; \ + cd ${.CURDIR}; \ ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ -V OLD_LIBS | xargs -n1 | \ while read file; do \ @@ -1592,7 +1595,8 @@ delete-old-libs: check-old-libs: @echo ">>> Checking for old libraries" - @${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ + @cd ${.CURDIR}; \ + ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ -V OLD_LIBS | xargs -n1 | \ while read file; do \ if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \ @@ -1607,7 +1611,8 @@ check-old-libs: delete-old-dirs: @echo ">>> Removing old directories" - @${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ + @cd ${.CURDIR}; \ + ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ -V OLD_DIRS | xargs -n1 | \ while read dir; do \ if [ -d "${DESTDIR}/$${dir}" ]; then \ @@ -1620,7 +1625,8 @@ delete-old-dirs: check-old-dirs: @echo ">>> Checking for old directories" - @${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ + @cd ${.CURDIR}; \ + ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ -V OLD_DIRS | xargs -n1 | \ while read dir; do \ if [ -d "${DESTDIR}/$${dir}" ]; then \ From owner-svn-src-stable@FreeBSD.ORG Wed Apr 9 11:10:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A6AA190; Wed, 9 Apr 2014 11:10:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 673EF1689; Wed, 9 Apr 2014 11:10:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s39BAjxB087581; Wed, 9 Apr 2014 11:10:45 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s39BAjKf087580; Wed, 9 Apr 2014 11:10:45 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201404091110.s39BAjKf087580@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 9 Apr 2014 11:10:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264298 - stable/10/usr.sbin/IPXrouted X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2014 11:10:45 -0000 Author: glebius Date: Wed Apr 9 11:10:44 2014 New Revision: 264298 URL: http://svnweb.freebsd.org/changeset/base/264298 Log: Remove useless embedding of kernel struct rtentry into userland one. This is direct commit to stable/10. Sponsored by: Nginx, Inc. Modified: stable/10/usr.sbin/IPXrouted/table.h Modified: stable/10/usr.sbin/IPXrouted/table.h ============================================================================== --- stable/10/usr.sbin/IPXrouted/table.h Wed Apr 9 10:58:52 2014 (r264297) +++ stable/10/usr.sbin/IPXrouted/table.h Wed Apr 9 11:10:44 2014 (r264298) @@ -54,15 +54,10 @@ struct rthash { struct rt_entry *rt_back; }; -#ifdef RTM_ADD -#define rtentry ortentry -#endif - struct rt_entry { struct rt_entry *rt_forw; struct rt_entry *rt_back; union { - struct rtentry rtu_rt; struct rtuentry { u_long rtu_hash; struct sockaddr rtu_dst; From owner-svn-src-stable@FreeBSD.ORG Wed Apr 9 11:15:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8846834E; Wed, 9 Apr 2014 11:15:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72777173C; Wed, 9 Apr 2014 11:15:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s39BFqaA090776; Wed, 9 Apr 2014 11:15:52 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s39BFoOT090765; Wed, 9 Apr 2014 11:15:50 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201404091115.s39BFoOT090765@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 9 Apr 2014 11:15:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264299 - in stable/10: share/man/man4 share/man/man9 sys/net sys/sys usr.bin/netstat usr.sbin/ppp usr.sbin/route6d X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2014 11:15:52 -0000 Author: glebius Date: Wed Apr 9 11:15:50 2014 New Revision: 264299 URL: http://svnweb.freebsd.org/changeset/base/264299 Log: Merge r263203: garbage collect long time obsoleted (or never used) stuff from routing API. Modified: stable/10/share/man/man4/route.4 stable/10/share/man/man9/rtentry.9 stable/10/sys/net/iso88025.h stable/10/sys/net/route.c stable/10/sys/net/route.h stable/10/sys/sys/sockio.h stable/10/usr.bin/netstat/netstat.1 stable/10/usr.bin/netstat/route.c stable/10/usr.sbin/ppp/route.c stable/10/usr.sbin/route6d/route6d.c Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/route.4 ============================================================================== --- stable/10/share/man/man4/route.4 Wed Apr 9 11:10:44 2014 (r264298) +++ stable/10/share/man/man4/route.4 Wed Apr 9 11:15:50 2014 (r264299) @@ -196,8 +196,6 @@ Messages include: #define RTM_REDIRECT 0x6 /* Told to use different route */ #define RTM_MISS 0x7 /* Lookup failed on this address */ #define RTM_LOCK 0x8 /* fix specified metrics */ -#define RTM_OLDADD 0x9 /* caused by SIOCADDRT */ -#define RTM_OLDDEL 0xa /* caused by SIOCDELRT */ #define RTM_RESOLVE 0xb /* request to resolve dst to LL addr - unused */ #define RTM_NEWADDR 0xc /* address being added to iface */ #define RTM_DELADDR 0xd /* address being removed from iface */ Modified: stable/10/share/man/man9/rtentry.9 ============================================================================== --- stable/10/share/man/man9/rtentry.9 Wed Apr 9 11:10:44 2014 (r264298) +++ stable/10/share/man/man9/rtentry.9 Wed Apr 9 11:15:50 2014 (r264299) @@ -157,8 +157,6 @@ Requests that output sent via this route .It Dv RTF_PROTO2 .It Dv RTF_PROTO3 Protocol-specific. -.It Dv RTF_PRCLONING -This flag is obsolete and simply ignored by facility. .It Dv RTF_PINNED (Reserved for future use to indicate routes which are not to be modified by a routing protocol.) Modified: stable/10/sys/net/iso88025.h ============================================================================== --- stable/10/sys/net/iso88025.h Wed Apr 9 11:10:44 2014 (r264298) +++ stable/10/sys/net/iso88025.h Wed Apr 9 11:15:50 2014 (r264299) @@ -162,11 +162,13 @@ struct iso88025_addr { #define ISO88025_BPF_UNSUPPORTED 0 #define ISO88025_BPF_SUPPORTED 1 +#ifdef _KERNEL void iso88025_ifattach (struct ifnet *, const u_int8_t *, int); void iso88025_ifdetach (struct ifnet *, int); int iso88025_ioctl (struct ifnet *, u_long, caddr_t ); int iso88025_output (struct ifnet *, struct mbuf *, const struct sockaddr *, struct route *); void iso88025_input (struct ifnet *, struct mbuf *); +#endif /* _KERNEL */ -#endif +#endif /* !_NET_ISO88025_H_ */ Modified: stable/10/sys/net/route.c ============================================================================== --- stable/10/sys/net/route.c Wed Apr 9 11:10:44 2014 (r264298) +++ stable/10/sys/net/route.c Wed Apr 9 11:15:50 2014 (r264299) @@ -1682,15 +1682,6 @@ rtinit1(struct ifaddr *ifa, int cmd, int return (error); } -#ifndef BURN_BRIDGES -/* special one for inet internal use. may not use. */ -int -rtinit_fib(struct ifaddr *ifa, int cmd, int flags) -{ - return (rtinit1(ifa, cmd, flags, -1)); -} -#endif - /* * Set up a routing table entry, normally * for an interface. Modified: stable/10/sys/net/route.h ============================================================================== --- stable/10/sys/net/route.h Wed Apr 9 11:10:44 2014 (r264298) +++ stable/10/sys/net/route.h Wed Apr 9 11:15:50 2014 (r264299) @@ -84,10 +84,6 @@ struct rt_metrics { #define RT_DEFAULT_FIB 0 /* Explicitly mark fib=0 restricted cases */ extern u_int rt_numfibs; /* number fo usable routing tables */ -/* - * XXX kernel function pointer `rt_output' is visible to applications. - */ -struct mbuf; /* * We distinguish between routes to hosts and routes to networks, @@ -129,20 +125,6 @@ struct rtentry { }; #endif /* _KERNEL || _WANT_RTENTRY */ -/* - * Following structure necessary for 4.3 compatibility; - * We should eventually move it to a compat file. - */ -struct ortentry { - u_long rt_hash; /* to speed lookups */ - struct sockaddr rt_dst; /* key */ - struct sockaddr rt_gateway; /* value */ - short rt_flags; /* up/down?, host/net */ - short rt_refcnt; /* # held references */ - u_long rt_use; /* raw # packets forwarded */ - struct ifnet *rt_ifp; /* the answer: interface to use */ -}; - #define RTF_UP 0x1 /* route usable */ #define RTF_GATEWAY 0x2 /* destination is a gateway */ #define RTF_HOST 0x4 /* host entry (net otherwise) */ @@ -160,12 +142,7 @@ struct ortentry { #define RTF_BLACKHOLE 0x1000 /* just discard pkts (during updates) */ #define RTF_PROTO2 0x4000 /* protocol specific routing flag */ #define RTF_PROTO1 0x8000 /* protocol specific routing flag */ - -/* XXX: temporary to stay API/ABI compatible with userland */ -#ifndef _KERNEL -#define RTF_PRCLONING 0x10000 /* unused, for compatibility */ -#endif - +/* 0x10000 unused, was RTF_PRCLONING */ /* 0x20000 unused, was RTF_WASCLONED */ #define RTF_PROTO3 0x40000 /* protocol specific routing flag */ /* 0x80000 unused */ @@ -227,8 +204,8 @@ struct rt_msghdr { #define RTM_REDIRECT 0x6 /* Told to use different route */ #define RTM_MISS 0x7 /* Lookup failed on this address */ #define RTM_LOCK 0x8 /* fix specified metrics */ -#define RTM_OLDADD 0x9 /* caused by SIOCADDRT */ -#define RTM_OLDDEL 0xa /* caused by SIOCDELRT */ + /* 0x9 */ + /* 0xa */ #define RTM_RESOLVE 0xb /* req to resolve dst to LL addr */ #define RTM_NEWADDR 0xc /* address being added to iface */ #define RTM_DELADDR 0xd /* address being removed from iface */ @@ -398,11 +375,6 @@ void rtredirect(struct sockaddr *, stru int rtrequest(int, struct sockaddr *, struct sockaddr *, struct sockaddr *, int, struct rtentry **); -#ifndef BURN_BRIDGES -/* defaults to "all" FIBs */ -int rtinit_fib(struct ifaddr *, int, int); -#endif - /* XXX MRT NEW VERSIONS THAT USE FIBs * For now the protocol indepedent versions are the same as the AF_INET ones * but this will change.. Modified: stable/10/sys/sys/sockio.h ============================================================================== --- stable/10/sys/sys/sockio.h Wed Apr 9 11:10:44 2014 (r264298) +++ stable/10/sys/sys/sockio.h Wed Apr 9 11:15:50 2014 (r264299) @@ -44,8 +44,8 @@ #define SIOCSPGRP _IOW('s', 8, int) /* set process group */ #define SIOCGPGRP _IOR('s', 9, int) /* get process group */ -#define SIOCADDRT _IOW('r', 10, struct ortentry) /* add route */ -#define SIOCDELRT _IOW('r', 11, struct ortentry) /* delete route */ +/* SIOCADDRT _IOW('r', 10, struct ortentry) 4.3BSD */ +/* SIOCDELRT _IOW('r', 11, struct ortentry) 4.3BSD */ #define SIOCGETVIFCNT _IOWR('r', 15, struct sioc_vif_req)/* get vif pkt cnt */ #define SIOCGETSGCNT _IOWR('r', 16, struct sioc_sg_req) /* get s,g pkt cnt */ Modified: stable/10/usr.bin/netstat/netstat.1 ============================================================================== --- stable/10/usr.bin/netstat/netstat.1 Wed Apr 9 11:10:44 2014 (r264298) +++ stable/10/usr.bin/netstat/netstat.1 Wed Apr 9 11:15:50 2014 (r264299) @@ -243,14 +243,6 @@ If is also present, show the contents of the internal Patricia tree structures; used for debugging. -If -.Fl a -is also present, -show protocol-cloned routes -(routes generated by an -.Dv RTF_PRCLONING -parent route); -normally these routes are not shown. When .Fl W is also present, @@ -430,8 +422,6 @@ The mapping between letters and flags is .It Li 3 Ta Dv RTF_PROTO3 Ta "Protocol specific routing flag #3" .It Li B Ta Dv RTF_BLACKHOLE Ta "Just discard pkts (during updates)" .It Li b Ta Dv RTF_BROADCAST Ta "The route represents a broadcast address" -.It Li C Ta Dv RTF_CLONING Ta "Generate new routes on use" -.It Li c Ta Dv RTF_PRCLONING Ta "Protocol-specified generate new routes on use" .It Li D Ta Dv RTF_DYNAMIC Ta "Created dynamically (by redirect)" .It Li G Ta Dv RTF_GATEWAY Ta "Destination requires forwarding by intermediary" .It Li H Ta Dv RTF_HOST Ta "Host entry (net otherwise)" @@ -440,7 +430,6 @@ The mapping between letters and flags is .It Li R Ta Dv RTF_REJECT Ta "Host or net unreachable" .It Li S Ta Dv RTF_STATIC Ta "Manually added" .It Li U Ta Dv RTF_UP Ta "Route usable" -.It Li W Ta Dv RTF_WASCLONED Ta "Route was generated as a result of cloning" .It Li X Ta Dv RTF_XRESOLVE Ta "External daemon translates proto to link address" .El .Pp Modified: stable/10/usr.bin/netstat/route.c ============================================================================== --- stable/10/usr.bin/netstat/route.c Wed Apr 9 11:10:44 2014 (r264298) +++ stable/10/usr.bin/netstat/route.c Wed Apr 9 11:15:50 2014 (r264299) @@ -92,19 +92,12 @@ struct bits { { RTF_STATIC, 'S' }, { RTF_PROTO1, '1' }, { RTF_PROTO2, '2' }, - { RTF_PRCLONING,'c' }, { RTF_PROTO3, '3' }, { RTF_BLACKHOLE,'B' }, { RTF_BROADCAST,'b' }, #ifdef RTF_LLINFO { RTF_LLINFO, 'L' }, #endif -#ifdef RTF_WASCLONED - { RTF_WASCLONED,'W' }, -#endif -#ifdef RTF_CLONING - { RTF_CLONING, 'C' }, -#endif { 0 , 0 } }; Modified: stable/10/usr.sbin/ppp/route.c ============================================================================== --- stable/10/usr.sbin/ppp/route.c Wed Apr 9 11:10:44 2014 (r264298) +++ stable/10/usr.sbin/ppp/route.c Wed Apr 9 11:15:50 2014 (r264299) @@ -158,26 +158,16 @@ static struct bits { { RTF_MODIFIED, 'M' }, { RTF_DONE, 'd' }, { RTF_XRESOLVE, 'X' }, -#ifdef RTF_CLONING - { RTF_CLONING, 'C' }, -#endif { RTF_STATIC, 'S' }, { RTF_PROTO1, '1' }, { RTF_PROTO2, '2' }, { RTF_BLACKHOLE, 'B' }, - #ifdef RTF_LLINFO { RTF_LLINFO, 'L' }, #endif #ifdef RTF_CLONING { RTF_CLONING, 'C' }, #endif -#ifdef RTF_WASCLONED - { RTF_WASCLONED, 'W' }, -#endif -#ifdef RTF_PRCLONING - { RTF_PRCLONING, 'c' }, -#endif #ifdef RTF_PROTO3 { RTF_PROTO3, '3' }, #endif @@ -187,10 +177,6 @@ static struct bits { { 0, '\0' } }; -#ifndef RTF_WASCLONED -#define RTF_WASCLONED (0) -#endif - static void p_flags(struct prompt *prompt, u_int32_t f, unsigned max) { @@ -434,7 +420,7 @@ route_IfDelete(struct bundle *bundle, in * route X was cloned from route Y (and is no longer there 'cos it * may have gone with route Y). */ - if (RTF_WASCLONED == 0 && pass == 0) + if (pass == 0) /* So we can't tell ! */ continue; for (cp = sp; cp < ep; cp += rtm->rtm_msglen) { @@ -461,8 +447,7 @@ route_IfDelete(struct bundle *bundle, in sa[RTAX_GATEWAY]->sa_family == AF_INET6 || #endif sa[RTAX_GATEWAY]->sa_family == AF_LINK) { - if ((pass == 0 && (rtm->rtm_flags & RTF_WASCLONED)) || - (pass == 1 && !(rtm->rtm_flags & RTF_WASCLONED))) { + if (pass == 1) { ncprange_setsa(&range, sa[RTAX_DST], sa[RTAX_NETMASK]); rt_Set(bundle, RTM_DELETE, &range, NULL, 0, 0); } else Modified: stable/10/usr.sbin/route6d/route6d.c ============================================================================== --- stable/10/usr.sbin/route6d/route6d.c Wed Apr 9 11:10:44 2014 (r264298) +++ stable/10/usr.sbin/route6d/route6d.c Wed Apr 9 11:15:50 2014 (r264299) @@ -1899,10 +1899,6 @@ rtrecv(void) if (!rt_deladdr(ifcp, rta[RTAX_IFA], rta[RTAX_NETMASK])) iface++; break; - case RTM_OLDADD: - case RTM_OLDDEL: - trace(1, "\tnot supported yet, ignored\n"); - break; } } @@ -2465,17 +2461,9 @@ do { \ RTTYPE("REDIRECT", RTM_REDIRECT); RTTYPE("MISS", RTM_MISS); RTTYPE("LOCK", RTM_LOCK); - RTTYPE("OLDADD", RTM_OLDADD); - RTTYPE("OLDDEL", RTM_OLDDEL); RTTYPE("NEWADDR", RTM_NEWADDR); RTTYPE("DELADDR", RTM_DELADDR); RTTYPE("IFINFO", RTM_IFINFO); -#ifdef RTM_OLDADD - RTTYPE("OLDADD", RTM_OLDADD); -#endif -#ifdef RTM_OLDDEL - RTTYPE("OLDDEL", RTM_OLDDEL); -#endif #ifdef RTM_OIFINFO RTTYPE("OIFINFO", RTM_OIFINFO); #endif @@ -2516,18 +2504,9 @@ do { \ #ifdef RTF_MASK RTFLAG("m", RTF_MASK); #endif -#ifdef RTF_CLONING - RTFLAG("C", RTF_CLONING); -#endif #ifdef RTF_CLONED RTFLAG("c", RTF_CLONED); #endif -#ifdef RTF_PRCLONING - RTFLAG("c", RTF_PRCLONING); -#endif -#ifdef RTF_WASCLONED - RTFLAG("W", RTF_WASCLONED); -#endif RTFLAG("X", RTF_XRESOLVE); #ifdef RTF_LLINFO RTFLAG("L", RTF_LLINFO); From owner-svn-src-stable@FreeBSD.ORG Wed Apr 9 13:35:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD739A95; Wed, 9 Apr 2014 13:35:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B01B71862; Wed, 9 Apr 2014 13:35:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s39DZdra049606; Wed, 9 Apr 2014 13:35:39 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s39DZdVc049605; Wed, 9 Apr 2014 13:35:39 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201404091335.s39DZdVc049605@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 9 Apr 2014 13:35:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264300 - stable/10/sbin/geom/class/part X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2014 13:35:40 -0000 Author: ae Date: Wed Apr 9 13:35:39 2014 New Revision: 264300 URL: http://svnweb.freebsd.org/changeset/base/264300 Log: MFC r264039: Document more parition types. Modified: stable/10/sbin/geom/class/part/gpart.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/geom/class/part/gpart.8 ============================================================================== --- stable/10/sbin/geom/class/part/gpart.8 Wed Apr 9 11:15:50 2014 (r264299) +++ stable/10/sbin/geom/class/part/gpart.8 Wed Apr 9 13:35:39 2014 (r264300) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 1, 2013 +.Dd April 2, 2014 .Dt GPART 8 .Os .Sh NAME @@ -557,6 +557,16 @@ Interface (EFI). In such cases, the GPT partitioning scheme is used and the actual partition type for the system partition can also be specified as .Qq Li "!c12a7328-f81f-11d2-ba4b-00a0c93ec93b" . +.It Cm fat16 +A partition that contains a FAT16 filesystem. +The scheme-specific type is +.Qq Li "!6" +for MBR. +.It Cm fat32 +A partition that contains a FAT32 filesystem. +The scheme-specific type is +.Qq Li "!11" +for MBR. .It Cm freebsd A .Fx @@ -620,6 +630,16 @@ A partition that is sub-partitioned by a This type is known as .Qq Li "!024dee41-33e7-11d3-9d69-0008c781f39f" by GPT. +.It Cm ms-basic-data +A basic data partition (BDP) for Microsoft operating systems. +In the GPT this type is the equivalent to partition types +.Cm fat16 , fat32 +and +.Cm ntfs +in MBR. +The scheme-specific type is +.Qq Li "!ebd0a0a2-b9e5-4433-87c0-68b6b72699c7" +for GPT. .It Cm ms-ldm-data A partition that contains Logical Disk Manager (LDM) volumes. The scheme-specific types are @@ -632,6 +652,11 @@ A partition that contains Logical Disk M The scheme-specific type is .Qq Li "!5808c8aa-7e8f-42e0-85d2-e1e90434cfb3" for GPT. +.It Cm ntfs +A partition that contains a NTFS or exFAT filesystem. +The scheme-specific type is +.Qq Li "!7" +for MBR. .El .Sh ATTRIBUTES The scheme-specific attributes for EBR: From owner-svn-src-stable@FreeBSD.ORG Wed Apr 9 13:35:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 14F31BBE; Wed, 9 Apr 2014 13:35:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC79A1865; Wed, 9 Apr 2014 13:35:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s39DZqR2049667; Wed, 9 Apr 2014 13:35:52 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s39DZqON049666; Wed, 9 Apr 2014 13:35:52 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201404091335.s39DZqON049666@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 9 Apr 2014 13:35:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264301 - stable/9/sbin/geom/class/part X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2014 13:35:53 -0000 Author: ae Date: Wed Apr 9 13:35:52 2014 New Revision: 264301 URL: http://svnweb.freebsd.org/changeset/base/264301 Log: MFC r264039: Document more parition types. Modified: stable/9/sbin/geom/class/part/gpart.8 Directory Properties: stable/9/sbin/geom/class/part/ (props changed) Modified: stable/9/sbin/geom/class/part/gpart.8 ============================================================================== --- stable/9/sbin/geom/class/part/gpart.8 Wed Apr 9 13:35:39 2014 (r264300) +++ stable/9/sbin/geom/class/part/gpart.8 Wed Apr 9 13:35:52 2014 (r264301) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 1, 2013 +.Dd April 2, 2014 .Dt GPART 8 .Os .Sh NAME @@ -557,6 +557,16 @@ Interface (EFI). In such cases, the GPT partitioning scheme is used and the actual partition type for the system partition can also be specified as .Qq Li "!c12a7328-f81f-11d2-ba4b-00a0c93ec93b" . +.It Cm fat16 +A partition that contains a FAT16 filesystem. +The scheme-specific type is +.Qq Li "!6" +for MBR. +.It Cm fat32 +A partition that contains a FAT32 filesystem. +The scheme-specific type is +.Qq Li "!11" +for MBR. .It Cm freebsd A .Fx @@ -620,6 +630,16 @@ A partition that is sub-partitioned by a This type is known as .Qq Li "!024dee41-33e7-11d3-9d69-0008c781f39f" by GPT. +.It Cm ms-basic-data +A basic data partition (BDP) for Microsoft operating systems. +In the GPT this type is the equivalent to partition types +.Cm fat16 , fat32 +and +.Cm ntfs +in MBR. +The scheme-specific type is +.Qq Li "!ebd0a0a2-b9e5-4433-87c0-68b6b72699c7" +for GPT. .It Cm ms-ldm-data A partition that contains Logical Disk Manager (LDM) volumes. The scheme-specific types are @@ -632,6 +652,11 @@ A partition that contains Logical Disk M The scheme-specific type is .Qq Li "!5808c8aa-7e8f-42e0-85d2-e1e90434cfb3" for GPT. +.It Cm ntfs +A partition that contains a NTFS or exFAT filesystem. +The scheme-specific type is +.Qq Li "!7" +for MBR. .El .Sh ATTRIBUTES The scheme-specific attributes for EBR: From owner-svn-src-stable@FreeBSD.ORG Wed Apr 9 18:17:00 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F2B48E5; Wed, 9 Apr 2014 18:17:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68FC71B9A; Wed, 9 Apr 2014 18:17:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s39IH0Y4067599; Wed, 9 Apr 2014 18:17:00 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s39IGwcR067582; Wed, 9 Apr 2014 18:16:58 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201404091816.s39IGwcR067582@svn.freebsd.org> From: Dimitry Andric Date: Wed, 9 Apr 2014 18:16:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264303 - in stable: 10/bin 10/gnu/usr.bin 10/lib 10/lib/clang 10/sbin 10/share/mk 10/usr.bin 10/usr.bin/clang 10/usr.sbin 8/bin 8/gnu/usr.bin 8/lib 8/sbin 8/share/mk 8/usr.bin 8/usr.sb... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2014 18:17:00 -0000 Author: dim Date: Wed Apr 9 18:16:58 2014 New Revision: 264303 URL: http://svnweb.freebsd.org/changeset/base/264303 Log: MFC r263778: Add a SUBDIR_PARALLEL option to bsd.subdir.mk, to allow make to process all the SUBDIR entries in parallel, instead of serially. Apply this option to a selected number of Makefiles, which can greatly speed up the build on multi-core machines, when using make -j. This can be extended to more Makefiles later on, whenever they are verified to work correctly with parallel building. I tested this on a 24-core machine, with make -j48 buildworld (N = 6): before stddev after stddev ======= ====== ======= ====== real time 1741.1 16.5 959.8 2.7 user time 12468.7 16.4 14393.0 16.8 sys time 1825.0 54.8 2110.6 22.8 (user+sys)/real 8.2 17.1 E.g. the build was approximately 45% faster in real time. On machines with less cores, or with lower -j settings, the speedup will not be as impressive. But at least you can now almost max out a machine with buildworld! Submitted by: jilles MFC r263833: Enable parallel building for gnu/usr.bin and usr.bin/clang too. Modified: stable/9/bin/Makefile stable/9/gnu/usr.bin/Makefile stable/9/lib/Makefile (contents, props changed) stable/9/lib/clang/Makefile stable/9/sbin/Makefile stable/9/share/mk/bsd.subdir.mk stable/9/usr.bin/Makefile stable/9/usr.bin/clang/Makefile stable/9/usr.sbin/Makefile (contents, props changed) Directory Properties: stable/9/bin/ (props changed) stable/9/lib/ (props changed) stable/9/lib/clang/ (props changed) stable/9/sbin/ (props changed) stable/9/share/ (props changed) stable/9/share/mk/ (props changed) stable/9/usr.bin/ (props changed) stable/9/usr.bin/clang/ (props changed) stable/9/usr.sbin/ (props changed) Changes in other areas also in this revision: Modified: stable/10/bin/Makefile stable/10/gnu/usr.bin/Makefile stable/10/lib/Makefile stable/10/lib/clang/Makefile stable/10/sbin/Makefile stable/10/share/mk/bsd.subdir.mk stable/10/usr.bin/Makefile stable/10/usr.bin/clang/Makefile stable/10/usr.sbin/Makefile stable/8/bin/Makefile stable/8/gnu/usr.bin/Makefile (contents, props changed) stable/8/lib/Makefile (contents, props changed) stable/8/sbin/Makefile stable/8/share/mk/bsd.subdir.mk stable/8/usr.bin/Makefile stable/8/usr.sbin/Makefile (contents, props changed) Directory Properties: stable/10/ (props changed) stable/8/bin/ (props changed) stable/8/gnu/ (props changed) stable/8/gnu/usr.bin/ (props changed) stable/8/lib/ (props changed) stable/8/sbin/ (props changed) stable/8/share/ (props changed) stable/8/share/mk/ (props changed) stable/8/usr.bin/ (props changed) stable/8/usr.sbin/ (props changed) Modified: stable/9/bin/Makefile ============================================================================== --- stable/9/bin/Makefile Wed Apr 9 14:50:55 2014 (r264302) +++ stable/9/bin/Makefile Wed Apr 9 18:16:58 2014 (r264303) @@ -55,4 +55,6 @@ SUBDIR+= csh SUBDIR:= ${SUBDIR:O} +SUBDIR_PARALLEL= + .include Modified: stable/9/gnu/usr.bin/Makefile ============================================================================== --- stable/9/gnu/usr.bin/Makefile Wed Apr 9 14:50:55 2014 (r264302) +++ stable/9/gnu/usr.bin/Makefile Wed Apr 9 18:16:58 2014 (r264303) @@ -53,4 +53,6 @@ _cc= cc _gdb= gdb .endif +SUBDIR_PARALLEL= + .include Modified: stable/9/lib/Makefile ============================================================================== --- stable/9/lib/Makefile Wed Apr 9 14:50:55 2014 (r264302) +++ stable/9/lib/Makefile Wed Apr 9 18:16:58 2014 (r264303) @@ -240,4 +240,8 @@ _libusbhid= libusbhid _libusb= libusb .endif +.if !make(install) +SUBDIR_PARALLEL= +.endif + .include Modified: stable/9/lib/clang/Makefile ============================================================================== --- stable/9/lib/clang/Makefile Wed Apr 9 14:50:55 2014 (r264302) +++ stable/9/lib/clang/Makefile Wed Apr 9 18:16:58 2014 (r264303) @@ -101,4 +101,6 @@ SUBDIR+=libllvmdebuginfo \ SUBDIR+= include +SUBDIR_PARALLEL= + .include Modified: stable/9/sbin/Makefile ============================================================================== --- stable/9/sbin/Makefile Wed Apr 9 14:50:55 2014 (r264302) +++ stable/9/sbin/Makefile Wed Apr 9 18:16:58 2014 (r264303) @@ -113,4 +113,6 @@ SUBDIR+= routed SUBDIR:= ${SUBDIR:O} +SUBDIR_PARALLEL= + .include Modified: stable/9/share/mk/bsd.subdir.mk ============================================================================== --- stable/9/share/mk/bsd.subdir.mk Wed Apr 9 14:50:55 2014 (r264302) +++ stable/9/share/mk/bsd.subdir.mk Wed Apr 9 18:16:58 2014 (r264303) @@ -68,7 +68,26 @@ ${SUBDIR}: .PHONY .for __target in all all-man checkdpadd clean cleandepend cleandir \ cleanilinks depend distribute lint maninstall manlint obj objlink \ realinstall regress tags ${SUBDIR_TARGETS} +.ifdef SUBDIR_PARALLEL +.for __dir in ${SUBDIR} +${__target}: ${__target}_subdir_${__dir} +${__target}_subdir_${__dir}: .MAKE + @${_+_}set -e; \ + if test -d ${.CURDIR}/${__dir}.${MACHINE_ARCH}; then \ + ${ECHODIR} "===> ${DIRPRFX}${__dir}.${MACHINE_ARCH} (${__target:realinstall=install})"; \ + edir=${__dir}.${MACHINE_ARCH}; \ + cd ${.CURDIR}/$${edir}; \ + else \ + ${ECHODIR} "===> ${DIRPRFX}${__dir} (${__target:realinstall=install})"; \ + edir=${__dir}; \ + cd ${.CURDIR}/$${edir}; \ + fi; \ + ${MAKE} ${__target:realinstall=install} \ + DIRPRFX=${DIRPRFX}$$edir/ +.endfor +.else ${__target}: _SUBDIR +.endif .endfor .for __target in files includes Modified: stable/9/usr.bin/Makefile ============================================================================== --- stable/9/usr.bin/Makefile Wed Apr 9 14:50:55 2014 (r264302) +++ stable/9/usr.bin/Makefile Wed Apr 9 18:16:58 2014 (r264303) @@ -351,4 +351,6 @@ SUBDIR+= wtmpcvt SUBDIR:= ${SUBDIR:O} +SUBDIR_PARALLEL= + .include Modified: stable/9/usr.bin/clang/Makefile ============================================================================== --- stable/9/usr.bin/clang/Makefile Wed Apr 9 14:50:55 2014 (r264302) +++ stable/9/usr.bin/clang/Makefile Wed Apr 9 18:16:58 2014 (r264303) @@ -23,4 +23,6 @@ SUBDIR+=bugpoint \ opt .endif +SUBDIR_PARALLEL= + .include Modified: stable/9/usr.sbin/Makefile ============================================================================== --- stable/9/usr.sbin/Makefile Wed Apr 9 14:50:55 2014 (r264302) +++ stable/9/usr.sbin/Makefile Wed Apr 9 18:16:58 2014 (r264303) @@ -335,4 +335,6 @@ SUBDIR+= wpa SUBDIR:= ${SUBDIR:O} +SUBDIR_PARALLEL= + .include From owner-svn-src-stable@FreeBSD.ORG Wed Apr 9 18:17:04 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3C8E59D4; Wed, 9 Apr 2014 18:17:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 258981B9C; Wed, 9 Apr 2014 18:17:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s39IH3wv067647; Wed, 9 Apr 2014 18:17:03 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s39IH2ga067633; Wed, 9 Apr 2014 18:17:02 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201404091817.s39IH2ga067633@svn.freebsd.org> From: Dimitry Andric Date: Wed, 9 Apr 2014 18:17:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264303 - in stable: 10/bin 10/gnu/usr.bin 10/lib 10/lib/clang 10/sbin 10/share/mk 10/usr.bin 10/usr.bin/clang 10/usr.sbin 8/bin 8/gnu/usr.bin 8/lib 8/sbin 8/share/mk 8/usr.bin 8/usr.sb... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2014 18:17:04 -0000 Author: dim Date: Wed Apr 9 18:16:58 2014 New Revision: 264303 URL: http://svnweb.freebsd.org/changeset/base/264303 Log: MFC r263778: Add a SUBDIR_PARALLEL option to bsd.subdir.mk, to allow make to process all the SUBDIR entries in parallel, instead of serially. Apply this option to a selected number of Makefiles, which can greatly speed up the build on multi-core machines, when using make -j. This can be extended to more Makefiles later on, whenever they are verified to work correctly with parallel building. I tested this on a 24-core machine, with make -j48 buildworld (N = 6): before stddev after stddev ======= ====== ======= ====== real time 1741.1 16.5 959.8 2.7 user time 12468.7 16.4 14393.0 16.8 sys time 1825.0 54.8 2110.6 22.8 (user+sys)/real 8.2 17.1 E.g. the build was approximately 45% faster in real time. On machines with less cores, or with lower -j settings, the speedup will not be as impressive. But at least you can now almost max out a machine with buildworld! Submitted by: jilles MFC r263833: Enable parallel building for gnu/usr.bin and usr.bin/clang too. Modified: stable/10/bin/Makefile stable/10/gnu/usr.bin/Makefile stable/10/lib/Makefile stable/10/lib/clang/Makefile stable/10/sbin/Makefile stable/10/share/mk/bsd.subdir.mk stable/10/usr.bin/Makefile stable/10/usr.bin/clang/Makefile stable/10/usr.sbin/Makefile Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/8/bin/Makefile stable/8/gnu/usr.bin/Makefile (contents, props changed) stable/8/lib/Makefile (contents, props changed) stable/8/sbin/Makefile stable/8/share/mk/bsd.subdir.mk stable/8/usr.bin/Makefile stable/8/usr.sbin/Makefile (contents, props changed) stable/9/bin/Makefile stable/9/gnu/usr.bin/Makefile stable/9/lib/Makefile (contents, props changed) stable/9/lib/clang/Makefile stable/9/sbin/Makefile stable/9/share/mk/bsd.subdir.mk stable/9/usr.bin/Makefile stable/9/usr.bin/clang/Makefile stable/9/usr.sbin/Makefile (contents, props changed) Directory Properties: stable/8/bin/ (props changed) stable/8/gnu/ (props changed) stable/8/gnu/usr.bin/ (props changed) stable/8/lib/ (props changed) stable/8/sbin/ (props changed) stable/8/share/ (props changed) stable/8/share/mk/ (props changed) stable/8/usr.bin/ (props changed) stable/8/usr.sbin/ (props changed) stable/9/bin/ (props changed) stable/9/lib/ (props changed) stable/9/lib/clang/ (props changed) stable/9/sbin/ (props changed) stable/9/share/ (props changed) stable/9/share/mk/ (props changed) stable/9/usr.bin/ (props changed) stable/9/usr.bin/clang/ (props changed) stable/9/usr.sbin/ (props changed) Modified: stable/10/bin/Makefile ============================================================================== --- stable/10/bin/Makefile Wed Apr 9 14:50:55 2014 (r264302) +++ stable/10/bin/Makefile Wed Apr 9 18:16:58 2014 (r264303) @@ -60,4 +60,6 @@ SUBDIR+= tests SUBDIR:= ${SUBDIR:O} +SUBDIR_PARALLEL= + .include Modified: stable/10/gnu/usr.bin/Makefile ============================================================================== --- stable/10/gnu/usr.bin/Makefile Wed Apr 9 14:50:55 2014 (r264302) +++ stable/10/gnu/usr.bin/Makefile Wed Apr 9 18:16:58 2014 (r264303) @@ -46,4 +46,6 @@ _cc= cc _gdb= gdb .endif +SUBDIR_PARALLEL= + .include Modified: stable/10/lib/Makefile ============================================================================== --- stable/10/lib/Makefile Wed Apr 9 14:50:55 2014 (r264302) +++ stable/10/lib/Makefile Wed Apr 9 18:16:58 2014 (r264303) @@ -271,4 +271,8 @@ afterinstall: ${INSTALL_SYMLINK} ../include ${DESTDIR}/usr/lib/include .endif +.if !make(install) +SUBDIR_PARALLEL= +.endif + .include Modified: stable/10/lib/clang/Makefile ============================================================================== --- stable/10/lib/clang/Makefile Wed Apr 9 14:50:55 2014 (r264302) +++ stable/10/lib/clang/Makefile Wed Apr 9 18:16:58 2014 (r264303) @@ -147,4 +147,6 @@ SUBDIR+=liblldb \ SUBDIR+= include +SUBDIR_PARALLEL= + .include Modified: stable/10/sbin/Makefile ============================================================================== --- stable/10/sbin/Makefile Wed Apr 9 14:50:55 2014 (r264302) +++ stable/10/sbin/Makefile Wed Apr 9 18:16:58 2014 (r264303) @@ -118,4 +118,6 @@ SUBDIR+= routed SUBDIR:= ${SUBDIR:O} +SUBDIR_PARALLEL= + .include Modified: stable/10/share/mk/bsd.subdir.mk ============================================================================== --- stable/10/share/mk/bsd.subdir.mk Wed Apr 9 14:50:55 2014 (r264302) +++ stable/10/share/mk/bsd.subdir.mk Wed Apr 9 18:16:58 2014 (r264303) @@ -71,7 +71,26 @@ ${SUBDIR}: .PHONY .MAKE .for __target in all all-man checkdpadd clean cleandepend cleandir \ cleanilinks depend distribute lint maninstall manlint obj objlink \ realinstall regress tags ${SUBDIR_TARGETS} +.ifdef SUBDIR_PARALLEL +.for __dir in ${SUBDIR} +${__target}: ${__target}_subdir_${__dir} +${__target}_subdir_${__dir}: .MAKE + @${_+_}set -e; \ + if test -d ${.CURDIR}/${__dir}.${MACHINE_ARCH}; then \ + ${ECHODIR} "===> ${DIRPRFX}${__dir}.${MACHINE_ARCH} (${__target:realinstall=install})"; \ + edir=${__dir}.${MACHINE_ARCH}; \ + cd ${.CURDIR}/$${edir}; \ + else \ + ${ECHODIR} "===> ${DIRPRFX}${__dir} (${__target:realinstall=install})"; \ + edir=${__dir}; \ + cd ${.CURDIR}/$${edir}; \ + fi; \ + ${MAKE} ${__target:realinstall=install} \ + DIRPRFX=${DIRPRFX}$$edir/ +.endfor +.else ${__target}: _SUBDIR +.endif .endfor .for __target in files includes Modified: stable/10/usr.bin/Makefile ============================================================================== --- stable/10/usr.bin/Makefile Wed Apr 9 14:50:55 2014 (r264302) +++ stable/10/usr.bin/Makefile Wed Apr 9 18:16:58 2014 (r264303) @@ -376,4 +376,6 @@ SUBDIR+= svn SUBDIR:= ${SUBDIR:O} +SUBDIR_PARALLEL= + .include Modified: stable/10/usr.bin/clang/Makefile ============================================================================== --- stable/10/usr.bin/clang/Makefile Wed Apr 9 14:50:55 2014 (r264302) +++ stable/10/usr.bin/clang/Makefile Wed Apr 9 18:16:58 2014 (r264303) @@ -29,4 +29,6 @@ SUBDIR+=lldb .endif .endif # TOOLS_PREFIX +SUBDIR_PARALLEL= + .include Modified: stable/10/usr.sbin/Makefile ============================================================================== --- stable/10/usr.sbin/Makefile Wed Apr 9 14:50:55 2014 (r264302) +++ stable/10/usr.sbin/Makefile Wed Apr 9 18:16:58 2014 (r264303) @@ -324,4 +324,6 @@ SUBDIR+= wpa SUBDIR:= ${SUBDIR:O} +SUBDIR_PARALLEL= + .include From owner-svn-src-stable@FreeBSD.ORG Wed Apr 9 18:17:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20C8D8F1; Wed, 9 Apr 2014 18:17:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A4D51B9B; Wed, 9 Apr 2014 18:17:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s39IH1to067625; Wed, 9 Apr 2014 18:17:01 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s39IH0a3067606; Wed, 9 Apr 2014 18:17:00 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201404091817.s39IH0a3067606@svn.freebsd.org> From: Dimitry Andric Date: Wed, 9 Apr 2014 18:17:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r264303 - in stable: 10/bin 10/gnu/usr.bin 10/lib 10/lib/clang 10/sbin 10/share/mk 10/usr.bin 10/usr.bin/clang 10/usr.sbin 8/bin 8/gnu/usr.bin 8/lib 8/sbin 8/share/mk 8/usr.bin 8/usr.sb... X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2014 18:17:02 -0000 Author: dim Date: Wed Apr 9 18:16:58 2014 New Revision: 264303 URL: http://svnweb.freebsd.org/changeset/base/264303 Log: MFC r263778: Add a SUBDIR_PARALLEL option to bsd.subdir.mk, to allow make to process all the SUBDIR entries in parallel, instead of serially. Apply this option to a selected number of Makefiles, which can greatly speed up the build on multi-core machines, when using make -j. This can be extended to more Makefiles later on, whenever they are verified to work correctly with parallel building. I tested this on a 24-core machine, with make -j48 buildworld (N = 6): before stddev after stddev ======= ====== ======= ====== real time 1741.1 16.5 959.8 2.7 user time 12468.7 16.4 14393.0 16.8 sys time 1825.0 54.8 2110.6 22.8 (user+sys)/real 8.2 17.1 E.g. the build was approximately 45% faster in real time. On machines with less cores, or with lower -j settings, the speedup will not be as impressive. But at least you can now almost max out a machine with buildworld! Submitted by: jilles MFC r263833: Enable parallel building for gnu/usr.bin and usr.bin/clang too. Modified: stable/8/bin/Makefile stable/8/gnu/usr.bin/Makefile (contents, props changed) stable/8/lib/Makefile (contents, props changed) stable/8/sbin/Makefile stable/8/share/mk/bsd.subdir.mk stable/8/usr.bin/Makefile stable/8/usr.sbin/Makefile (contents, props changed) Directory Properties: stable/8/bin/ (props changed) stable/8/gnu/ (props changed) stable/8/gnu/usr.bin/ (props changed) stable/8/lib/ (props changed) stable/8/sbin/ (props changed) stable/8/share/ (props changed) stable/8/share/mk/ (props changed) stable/8/usr.bin/ (props changed) stable/8/usr.sbin/ (props changed) Changes in other areas also in this revision: Modified: stable/10/bin/Makefile stable/10/gnu/usr.bin/Makefile stable/10/lib/Makefile stable/10/lib/clang/Makefile stable/10/sbin/Makefile stable/10/share/mk/bsd.subdir.mk stable/10/usr.bin/Makefile stable/10/usr.bin/clang/Makefile stable/10/usr.sbin/Makefile stable/9/bin/Makefile stable/9/gnu/usr.bin/Makefile stable/9/lib/Makefile (contents, props changed) stable/9/lib/clang/Makefile stable/9/sbin/Makefile stable/9/share/mk/bsd.subdir.mk stable/9/usr.bin/Makefile stable/9/usr.bin/clang/Makefile stable/9/usr.sbin/Makefile (contents, props changed) Directory Properties: stable/10/ (props changed) stable/9/bin/ (props changed) stable/9/lib/ (props changed) stable/9/lib/clang/ (props changed) stable/9/sbin/ (props changed) stable/9/share/ (props changed) stable/9/share/mk/ (props changed) stable/9/usr.bin/ (props changed) stable/9/usr.bin/clang/ (props changed) stable/9/usr.sbin/ (props changed) Modified: stable/8/bin/Makefile ============================================================================== --- stable/8/bin/Makefile Wed Apr 9 14:50:55 2014 (r264302) +++ stable/8/bin/Makefile Wed Apr 9 18:16:58 2014 (r264303) @@ -54,4 +54,6 @@ _rmail= rmail _csh= csh .endif +SUBDIR_PARALLEL= + .include Modified: stable/8/gnu/usr.bin/Makefile ============================================================================== --- stable/8/gnu/usr.bin/Makefile Wed Apr 9 14:50:55 2014 (r264302) +++ stable/8/gnu/usr.bin/Makefile Wed Apr 9 18:16:58 2014 (r264303) @@ -63,4 +63,6 @@ _cc= cc _gdb= gdb .endif +SUBDIR_PARALLEL= + .include Modified: stable/8/lib/Makefile ============================================================================== --- stable/8/lib/Makefile Wed Apr 9 14:50:55 2014 (r264302) +++ stable/8/lib/Makefile Wed Apr 9 18:16:58 2014 (r264303) @@ -203,4 +203,8 @@ _libusbhid= libusbhid _libusb= libusb .endif +.if !make(install) +SUBDIR_PARALLEL= +.endif + .include Modified: stable/8/sbin/Makefile ============================================================================== --- stable/8/sbin/Makefile Wed Apr 9 14:50:55 2014 (r264302) +++ stable/8/sbin/Makefile Wed Apr 9 18:16:58 2014 (r264303) @@ -154,4 +154,6 @@ _mca= mca _sunlabel= sunlabel .endif +SUBDIR_PARALLEL= + .include Modified: stable/8/share/mk/bsd.subdir.mk ============================================================================== --- stable/8/share/mk/bsd.subdir.mk Wed Apr 9 14:50:55 2014 (r264302) +++ stable/8/share/mk/bsd.subdir.mk Wed Apr 9 18:16:58 2014 (r264303) @@ -69,7 +69,26 @@ ${SUBDIR}: .PHONY depend distribute lint maninstall manlint \ obj objlink realinstall regress tags \ ${SUBDIR_TARGETS} +.ifdef SUBDIR_PARALLEL +.for __dir in ${SUBDIR} +${__target}: ${__target}_subdir_${__dir} +${__target}_subdir_${__dir}: .MAKE + @${_+_}set -e; \ + if test -d ${.CURDIR}/${__dir}.${MACHINE_ARCH}; then \ + ${ECHODIR} "===> ${DIRPRFX}${__dir}.${MACHINE_ARCH} (${__target:realinstall=install})"; \ + edir=${__dir}.${MACHINE_ARCH}; \ + cd ${.CURDIR}/$${edir}; \ + else \ + ${ECHODIR} "===> ${DIRPRFX}${__dir} (${__target:realinstall=install})"; \ + edir=${__dir}; \ + cd ${.CURDIR}/$${edir}; \ + fi; \ + ${MAKE} ${__target:realinstall=install} \ + DIRPRFX=${DIRPRFX}$$edir/ +.endfor +.else ${__target}: _SUBDIR +.endif .endfor .for __target in files includes Modified: stable/8/usr.bin/Makefile ============================================================================== --- stable/8/usr.bin/Makefile Wed Apr 9 14:50:55 2014 (r264302) +++ stable/8/usr.bin/Makefile Wed Apr 9 18:16:58 2014 (r264303) @@ -393,4 +393,6 @@ _smbutil= smbutil _smbutil= smbutil .endif +SUBDIR_PARALLEL= + .include Modified: stable/8/usr.sbin/Makefile ============================================================================== --- stable/8/usr.sbin/Makefile Wed Apr 9 14:50:55 2014 (r264302) +++ stable/8/usr.sbin/Makefile Wed Apr 9 18:16:58 2014 (r264303) @@ -520,4 +520,6 @@ _eeprom= eeprom _ofwdump= ofwdump .endif +SUBDIR_PARALLEL= + .include From owner-svn-src-stable@FreeBSD.ORG Wed Apr 9 21:19:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3FA389B6; Wed, 9 Apr 2014 21:19:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20F9E1196; Wed, 9 Apr 2014 21:19:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s39LJkTL042549; Wed, 9 Apr 2014 21:19:46 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s39LJkUv042548; Wed, 9 Apr 2014 21:19:46 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201404092119.s39LJkUv042548@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 9 Apr 2014 21:19:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264309 - stable/9/usr.bin/login X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2014 21:19:47 -0000 Author: jilles Date: Wed Apr 9 21:19:46 2014 New Revision: 264309 URL: http://svnweb.freebsd.org/changeset/base/264309 Log: MFC r261193: login: Clean up PAM and audit, then exit, on SIGHUP and SIGTERM This avoids leaving stale entries in utmpx after the connection is closed on an open login session. It also allows a clean way (SIGTERM) to forcibly terminate a user's terminal session. This does not affect the situation for "hung" processes after the connection is closed. The foreground process group receives SIGHUP and the tty becomes inaccessible. Also replace all use of the obsolete signal() function with sigaction() (not only the part where it is actually required: SIGHUP and SIGTERM must mask the other as well when caught). PR: misc/183495 Modified: stable/9/usr.bin/login/login.c Directory Properties: stable/9/usr.bin/login/ (props changed) Modified: stable/9/usr.bin/login/login.c ============================================================================== --- stable/9/usr.bin/login/login.c Wed Apr 9 20:42:00 2014 (r264308) +++ stable/9/usr.bin/login/login.c Wed Apr 9 21:19:46 2014 (r264309) @@ -83,6 +83,7 @@ __FBSDID("$FreeBSD$"); static int auth_pam(void); static void bail(int, int); +static void bail_internal(int, int, int); static int export(const char *); static void export_pam_environment(void); static int motd(const char *); @@ -94,6 +95,7 @@ static void refused(const char *, cons static const char *stypeof(char *); static void sigint(int); static void timedout(int); +static void bail_sig(int); static void usage(void); #define TTYGRPNAME "tty" /* group to own ttys */ @@ -172,13 +174,18 @@ main(int argc, char *argv[]) login_cap_t *lc = NULL; login_cap_t *lc_user = NULL; pid_t pid; + sigset_t mask, omask; + struct sigaction sa; #ifdef USE_BSM_AUDIT char auditsuccess = 1; #endif - (void)signal(SIGQUIT, SIG_IGN); - (void)signal(SIGINT, SIG_IGN); - (void)signal(SIGHUP, SIG_IGN); + sa.sa_flags = SA_RESTART; + (void)sigfillset(&sa.sa_mask); + sa.sa_handler = SIG_IGN; + (void)sigaction(SIGQUIT, &sa, NULL); + (void)sigaction(SIGINT, &sa, NULL); + (void)sigaction(SIGHUP, &sa, NULL); if (setjmp(timeout_buf)) { if (failures) badlogin(username); @@ -186,7 +193,8 @@ main(int argc, char *argv[]) timeout); bail(NO_SLEEP_EXIT, 0); } - (void)signal(SIGALRM, timedout); + sa.sa_handler = timedout; + (void)sigaction(SIGALRM, &sa, NULL); (void)alarm(timeout); (void)setpriority(PRIO_PROCESS, 0, 0); @@ -370,7 +378,14 @@ main(int argc, char *argv[]) /* committed to login -- turn off timeout */ (void)alarm((u_int)0); - (void)signal(SIGHUP, SIG_DFL); + + (void)sigemptyset(&mask); + (void)sigaddset(&mask, SIGHUP); + (void)sigaddset(&mask, SIGTERM); + (void)sigprocmask(SIG_BLOCK, &mask, &omask); + sa.sa_handler = bail_sig; + (void)sigaction(SIGHUP, &sa, NULL); + (void)sigaction(SIGTERM, &sa, NULL); endpwent(); @@ -550,10 +565,17 @@ main(int argc, char *argv[]) /* * Parent: wait for child to finish, then clean up * session. + * + * If we get SIGHUP or SIGTERM, clean up the session + * and exit right away. This will make the terminal + * inaccessible and send SIGHUP to the foreground + * process group. */ int status; setproctitle("-%s [pam]", getprogname()); + (void)sigprocmask(SIG_SETMASK, &omask, NULL); waitpid(pid, &status, 0); + (void)sigprocmask(SIG_BLOCK, &mask, NULL); bail(NO_SLEEP_EXIT, 0); } @@ -627,10 +649,15 @@ main(int argc, char *argv[]) login_close(lc_user); login_close(lc); - (void)signal(SIGALRM, SIG_DFL); - (void)signal(SIGQUIT, SIG_DFL); - (void)signal(SIGINT, SIG_DFL); - (void)signal(SIGTSTP, SIG_IGN); + sa.sa_handler = SIG_DFL; + (void)sigaction(SIGALRM, &sa, NULL); + (void)sigaction(SIGQUIT, &sa, NULL); + (void)sigaction(SIGINT, &sa, NULL); + (void)sigaction(SIGTERM, &sa, NULL); + (void)sigaction(SIGHUP, &sa, NULL); + sa.sa_handler = SIG_IGN; + (void)sigaction(SIGTSTP, &sa, NULL); + (void)sigprocmask(SIG_SETMASK, &omask, NULL); /* * Login shells have a leading '-' in front of argv[0] @@ -847,17 +874,20 @@ sigint(int signo __unused) static int motd(const char *motdfile) { - sig_t oldint; + struct sigaction newint, oldint; FILE *f; int ch; if ((f = fopen(motdfile, "r")) == NULL) return (-1); motdinterrupt = 0; - oldint = signal(SIGINT, sigint); + newint.sa_handler = sigint; + newint.sa_flags = 0; + sigfillset(&newint.sa_mask); + sigaction(SIGINT, &newint, &oldint); while ((ch = fgetc(f)) != EOF && !motdinterrupt) putchar(ch); - signal(SIGINT, oldint); + sigaction(SIGINT, &oldint, NULL); if (ch != EOF || ferror(f)) { fclose(f); return (-1); @@ -966,12 +996,10 @@ pam_cleanup(void) } } -/* - * Exit, optionally after sleeping a few seconds - */ -void -bail(int sec, int eval) +static void +bail_internal(int sec, int eval, int signo) { + struct sigaction sa; pam_cleanup(); #ifdef USE_BSM_AUDIT @@ -979,5 +1007,36 @@ bail(int sec, int eval) audit_logout(); #endif (void)sleep(sec); - exit(eval); + if (signo == 0) + exit(eval); + else { + sa.sa_handler = SIG_DFL; + sa.sa_flags = 0; + (void)sigemptyset(&sa.sa_mask); + (void)sigaction(signo, &sa, NULL); + (void)sigaddset(&sa.sa_mask, signo); + (void)sigprocmask(SIG_UNBLOCK, &sa.sa_mask, NULL); + raise(signo); + exit(128 + signo); + } +} + +/* + * Exit, optionally after sleeping a few seconds + */ +static void +bail(int sec, int eval) +{ + bail_internal(sec, eval, 0); +} + +/* + * Exit because of a signal. + * This is not async-signal safe, so only call async-signal safe functions + * while the signal is unmasked. + */ +static void +bail_sig(int signo) +{ + bail_internal(NO_SLEEP_EXIT, 0, signo); } From owner-svn-src-stable@FreeBSD.ORG Thu Apr 10 07:00:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B99CB841; Thu, 10 Apr 2014 07:00:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D40F1A98; Thu, 10 Apr 2014 07:00:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3A70Pb5085181; Thu, 10 Apr 2014 07:00:25 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3A70PTx085180; Thu, 10 Apr 2014 07:00:25 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201404100700.s3A70PTx085180@svn.freebsd.org> From: Dimitry Andric Date: Thu, 10 Apr 2014 07:00:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r264312 - in stable: 10/contrib/binutils/opcodes 8/contrib/binutils/include/opcode 9/contrib/binutils/opcodes X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Apr 2014 07:00:25 -0000 Author: dim Date: Thu Apr 10 07:00:24 2014 New Revision: 264312 URL: http://svnweb.freebsd.org/changeset/base/264312 Log: MFC r264238: For GNU as, add two missing modes for each of the fcomip and fucomip instructions. Partially obtained from OpenBSD by Pedro Giffuni, while I added the fcomip variants. Apparently this should help with compiling certain variants of WebKit. Modified: stable/8/contrib/binutils/include/opcode/i386.h Changes in other areas also in this revision: Modified: stable/10/contrib/binutils/opcodes/i386-opc.tbl stable/10/contrib/binutils/opcodes/i386-tbl.h stable/9/contrib/binutils/opcodes/i386-opc.tbl stable/9/contrib/binutils/opcodes/i386-tbl.h Directory Properties: stable/10/ (props changed) stable/9/contrib/binutils/ (props changed) Modified: stable/8/contrib/binutils/include/opcode/i386.h ============================================================================== --- stable/8/contrib/binutils/include/opcode/i386.h Thu Apr 10 05:04:23 2014 (r264311) +++ stable/8/contrib/binutils/include/opcode/i386.h Thu Apr 10 07:00:24 2014 (r264312) @@ -957,10 +957,14 @@ static const template i386_optab[] = { {"fucomi", 0, 0xdbe9, X, Cpu686, FP|ShortForm, { 0, 0, 0} }, {"fucomi", 1, 0xdbe8, X, Cpu686, FP|ShortForm, { FloatReg, 0, 0} }, {"fcomip", 2, 0xdff0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} }, +{"fcomip", 0, 0xdff1, X, Cpu686, FP|ShortForm, { 0, 0, 0} }, +{"fcomip", 1, 0xdff0, X, Cpu686, FP|ShortForm, { FloatReg, 0, 0} }, {"fcompi", 2, 0xdff0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} }, {"fcompi", 0, 0xdff1, X, Cpu686, FP|ShortForm, { 0, 0, 0} }, {"fcompi", 1, 0xdff0, X, Cpu686, FP|ShortForm, { FloatReg, 0, 0} }, {"fucomip", 2, 0xdfe8, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} }, +{"fucomip", 0, 0xdfe9, X, Cpu686, FP|ShortForm, { 0, 0, 0} }, +{"fucomip", 1, 0xdfe8, X, Cpu686, FP|ShortForm, { FloatReg, 0, 0} }, {"fucompi", 2, 0xdfe8, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} }, {"fucompi", 0, 0xdfe9, X, Cpu686, FP|ShortForm, { 0, 0, 0} }, {"fucompi", 1, 0xdfe8, X, Cpu686, FP|ShortForm, { FloatReg, 0, 0} }, From owner-svn-src-stable@FreeBSD.ORG Thu Apr 10 07:00:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 30A81842; Thu, 10 Apr 2014 07:00:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C7911A99; Thu, 10 Apr 2014 07:00:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3A70Pg0085188; Thu, 10 Apr 2014 07:00:25 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3A70PjE085186; Thu, 10 Apr 2014 07:00:25 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201404100700.s3A70PjE085186@svn.freebsd.org> From: Dimitry Andric Date: Thu, 10 Apr 2014 07:00:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264312 - in stable: 10/contrib/binutils/opcodes 8/contrib/binutils/include/opcode 9/contrib/binutils/opcodes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Apr 2014 07:00:26 -0000 Author: dim Date: Thu Apr 10 07:00:24 2014 New Revision: 264312 URL: http://svnweb.freebsd.org/changeset/base/264312 Log: MFC r264238: For GNU as, add two missing modes for each of the fcomip and fucomip instructions. Partially obtained from OpenBSD by Pedro Giffuni, while I added the fcomip variants. Apparently this should help with compiling certain variants of WebKit. Modified: stable/10/contrib/binutils/opcodes/i386-opc.tbl stable/10/contrib/binutils/opcodes/i386-tbl.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/8/contrib/binutils/include/opcode/i386.h stable/9/contrib/binutils/opcodes/i386-opc.tbl stable/9/contrib/binutils/opcodes/i386-tbl.h Directory Properties: stable/9/contrib/binutils/ (props changed) Modified: stable/10/contrib/binutils/opcodes/i386-opc.tbl ============================================================================== --- stable/10/contrib/binutils/opcodes/i386-opc.tbl Thu Apr 10 05:04:23 2014 (r264311) +++ stable/10/contrib/binutils/opcodes/i386-opc.tbl Thu Apr 10 07:00:24 2014 (r264312) @@ -895,10 +895,14 @@ fucomi, 2, 0xdbe8, None, Cpu686, ShortFo fucomi, 0, 0xdbe9, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 } fucomi, 1, 0xdbe8, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg } fcomip, 2, 0xdff0, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc } +fcomip, 0, 0xdff1, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 } +fcomip, 1, 0xdff0, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg } fcompi, 2, 0xdff0, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc } fcompi, 0, 0xdff1, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 } fcompi, 1, 0xdff0, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg } fucomip, 2, 0xdfe8, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc } +fucomip, 0, 0xdfe9, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 } +fucomip, 1, 0xdfe8, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg } fucompi, 2, 0xdfe8, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc } fucompi, 0, 0xdfe9, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 } fucompi, 1, 0xdfe8, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg } Modified: stable/10/contrib/binutils/opcodes/i386-tbl.h ============================================================================== --- stable/10/contrib/binutils/opcodes/i386-tbl.h Thu Apr 10 05:04:23 2014 (r264311) +++ stable/10/contrib/binutils/opcodes/i386-tbl.h Thu Apr 10 07:00:24 2014 (r264312) @@ -2236,6 +2236,12 @@ const template i386_optab[] = ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc } }, + { "fcomip", 0, 0xdff1, None, Cpu686, + ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, + { 0 } }, + { "fcomip", 1, 0xdff0, None, Cpu686, + ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, + { FloatReg } }, { "fcompi", 2, 0xdff0, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, @@ -2250,6 +2256,12 @@ const template i386_optab[] = ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc } }, + { "fucomip", 0, 0xdfe9, None, Cpu686, + ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, + { 0 } }, + { "fucomip", 1, 0xdfe8, None, Cpu686, + ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, + { FloatReg } }, { "fucompi", 2, 0xdfe8, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, From owner-svn-src-stable@FreeBSD.ORG Thu Apr 10 07:00:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E4FE840; Thu, 10 Apr 2014 07:00:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 395D91A97; Thu, 10 Apr 2014 07:00:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3A70PSw085175; Thu, 10 Apr 2014 07:00:25 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3A70OHH085172; Thu, 10 Apr 2014 07:00:24 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201404100700.s3A70OHH085172@svn.freebsd.org> From: Dimitry Andric Date: Thu, 10 Apr 2014 07:00:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264312 - in stable: 10/contrib/binutils/opcodes 8/contrib/binutils/include/opcode 9/contrib/binutils/opcodes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Apr 2014 07:00:25 -0000 Author: dim Date: Thu Apr 10 07:00:24 2014 New Revision: 264312 URL: http://svnweb.freebsd.org/changeset/base/264312 Log: MFC r264238: For GNU as, add two missing modes for each of the fcomip and fucomip instructions. Partially obtained from OpenBSD by Pedro Giffuni, while I added the fcomip variants. Apparently this should help with compiling certain variants of WebKit. Modified: stable/9/contrib/binutils/opcodes/i386-opc.tbl stable/9/contrib/binutils/opcodes/i386-tbl.h Directory Properties: stable/9/contrib/binutils/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/binutils/opcodes/i386-opc.tbl stable/10/contrib/binutils/opcodes/i386-tbl.h stable/8/contrib/binutils/include/opcode/i386.h Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/binutils/opcodes/i386-opc.tbl ============================================================================== --- stable/9/contrib/binutils/opcodes/i386-opc.tbl Thu Apr 10 05:04:23 2014 (r264311) +++ stable/9/contrib/binutils/opcodes/i386-opc.tbl Thu Apr 10 07:00:24 2014 (r264312) @@ -895,10 +895,14 @@ fucomi, 2, 0xdbe8, None, Cpu686, ShortFo fucomi, 0, 0xdbe9, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 } fucomi, 1, 0xdbe8, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg } fcomip, 2, 0xdff0, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc } +fcomip, 0, 0xdff1, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 } +fcomip, 1, 0xdff0, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg } fcompi, 2, 0xdff0, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc } fcompi, 0, 0xdff1, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 } fcompi, 1, 0xdff0, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg } fucomip, 2, 0xdfe8, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc } +fucomip, 0, 0xdfe9, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 } +fucomip, 1, 0xdfe8, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg } fucompi, 2, 0xdfe8, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc } fucompi, 0, 0xdfe9, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 } fucompi, 1, 0xdfe8, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg } Modified: stable/9/contrib/binutils/opcodes/i386-tbl.h ============================================================================== --- stable/9/contrib/binutils/opcodes/i386-tbl.h Thu Apr 10 05:04:23 2014 (r264311) +++ stable/9/contrib/binutils/opcodes/i386-tbl.h Thu Apr 10 07:00:24 2014 (r264312) @@ -2236,6 +2236,12 @@ const template i386_optab[] = ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc } }, + { "fcomip", 0, 0xdff1, None, Cpu686, + ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, + { 0 } }, + { "fcomip", 1, 0xdff0, None, Cpu686, + ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, + { FloatReg } }, { "fcompi", 2, 0xdff0, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, @@ -2250,6 +2256,12 @@ const template i386_optab[] = ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc } }, + { "fucomip", 0, 0xdfe9, None, Cpu686, + ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, + { 0 } }, + { "fucomip", 1, 0xdfe8, None, Cpu686, + ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, + { FloatReg } }, { "fucompi", 2, 0xdfe8, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, From owner-svn-src-stable@FreeBSD.ORG Thu Apr 10 19:51:35 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A24759F; Thu, 10 Apr 2014 19:51:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE8B41BE6; Thu, 10 Apr 2014 19:51:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3AJpYQx004864; Thu, 10 Apr 2014 19:51:34 GMT (envelope-from asomers@svn.freebsd.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3AJpXnj004858; Thu, 10 Apr 2014 19:51:33 GMT (envelope-from asomers@svn.freebsd.org) Message-Id: <201404101951.s3AJpXnj004858@svn.freebsd.org> From: Alan Somers Date: Thu, 10 Apr 2014 19:51:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264325 - in stable/10: . usr.sbin/config X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Apr 2014 19:51:35 -0000 Author: asomers Date: Thu Apr 10 19:51:33 2014 New Revision: 264325 URL: http://svnweb.freebsd.org/changeset/base/264325 Log: MFC r263429 Fix kern/187712: config(8) does not respect KERNCONFDIR. The impact of this bug is that you cannot build a kernel if both of the following are true: 1) The kernel config file is in a non-default location 2) The kernel config file uses the "include" statement from config(5). usr.sbin/config/main.c usr.sbin/config/config.8 usr.sbin/config/config.h usr.sbin/config/lang.l Added a "-I path" option to config(8). By analogy to cc(1), it adds an extra path in which the "include" statement will search for files. Makefile.inc1 Pass "-I ${KERNCONFDIR}" to config(8). Modified: stable/10/Makefile.inc1 stable/10/usr.sbin/config/config.8 stable/10/usr.sbin/config/config.h stable/10/usr.sbin/config/lang.l stable/10/usr.sbin/config/main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Thu Apr 10 19:15:58 2014 (r264324) +++ stable/10/Makefile.inc1 Thu Apr 10 19:51:33 2014 (r264325) @@ -1000,7 +1000,7 @@ buildkernel: cd ${KRNLCONFDIR}; \ PATH=${TMPPATH} \ config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \ - ${KERNCONFDIR}/${_kernel} + -I ${KERNCONFDIR} ${KERNCONFDIR}/${_kernel} .endif .if !defined(NO_CLEAN) && !defined(NO_KERNELCLEAN) @echo Modified: stable/10/usr.sbin/config/config.8 ============================================================================== --- stable/10/usr.sbin/config/config.8 Thu Apr 10 19:15:58 2014 (r264324) +++ stable/10/usr.sbin/config/config.8 Thu Apr 10 19:51:33 2014 (r264325) @@ -37,6 +37,7 @@ .Sh SYNOPSIS .Nm .Op Fl CVgp +.Op Fl I Ar path .Op Fl d Ar destdir .Ar SYSTEM_NAME .Nm @@ -69,6 +70,12 @@ If the INCLUDE_CONFIG_FILE is present in kernel image will contain full configuration files included literally (preserving comments). This flag is kept for backward compatibility. +.It Fl I Ar path +Search in +.Ar path +for any file included by the +.Ic include +directive. This option may be specified more than once. .It Fl d Ar destdir Use .Ar destdir Modified: stable/10/usr.sbin/config/config.h ============================================================================== --- stable/10/usr.sbin/config/config.h Thu Apr 10 19:15:58 2014 (r264324) +++ stable/10/usr.sbin/config/config.h Thu Apr 10 19:51:33 2014 (r264325) @@ -144,6 +144,13 @@ struct hint { STAILQ_HEAD(hint_head, hint) hints; +struct includepath { + char *path; + SLIST_ENTRY(includepath) path_next; +}; + +SLIST_HEAD(, includepath) includepath; + /* * Tag present in the kernelconf.tmlp template file. It's mandatory for those * two strings to be the same. Otherwise you'll get into trouble. Modified: stable/10/usr.sbin/config/lang.l ============================================================================== --- stable/10/usr.sbin/config/lang.l Thu Apr 10 19:15:58 2014 (r264324) +++ stable/10/usr.sbin/config/lang.l Thu Apr 10 19:51:33 2014 (r264325) @@ -34,6 +34,7 @@ #include #include #include +#include #include #include "y.tab.h" #include "config.h" @@ -257,6 +258,7 @@ include(const char *fname, int ateof) { FILE *fp; struct incl *in; + struct includepath* ipath; char *fnamebuf; fnamebuf = NULL; @@ -269,6 +271,17 @@ include(const char *fname, int ateof) } } if (fp == NULL) { + SLIST_FOREACH(ipath, &includepath, path_next) { + asprintf(&fnamebuf, "%s/%s", ipath->path, fname); + if (fnamebuf != NULL) { + fp = fopen(fnamebuf, "r"); + free(fnamebuf); + } + if (fp != NULL) + break; + } + } + if (fp == NULL) { yyerror("cannot open included file"); return (-1); } Modified: stable/10/usr.sbin/config/main.c ============================================================================== --- stable/10/usr.sbin/config/main.c Thu Apr 10 19:15:58 2014 (r264324) +++ stable/10/usr.sbin/config/main.c Thu Apr 10 19:51:33 2014 (r264325) @@ -110,15 +110,25 @@ main(int argc, char **argv) int ch, len; char *p; char *kernfile; + struct includepath* ipath; int printmachine; printmachine = 0; kernfile = NULL; - while ((ch = getopt(argc, argv, "Cd:gmpVx:")) != -1) + SLIST_INIT(&includepath); + while ((ch = getopt(argc, argv, "CI:d:gmpVx:")) != -1) switch (ch) { case 'C': filebased = 1; break; + case 'I': + ipath = (struct includepath *) \ + calloc(1, sizeof (struct includepath)); + if (ipath == NULL) + err(EXIT_FAILURE, "calloc"); + ipath->path = optarg; + SLIST_INSERT_HEAD(&includepath, ipath, path_next); + break; case 'm': printmachine = 1; break; From owner-svn-src-stable@FreeBSD.ORG Thu Apr 10 19:53:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71F217F6; Thu, 10 Apr 2014 19:53:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 526E41C9C; Thu, 10 Apr 2014 19:53:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3AJrgnx007630; Thu, 10 Apr 2014 19:53:42 GMT (envelope-from asomers@svn.freebsd.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3AJrfg5007625; Thu, 10 Apr 2014 19:53:41 GMT (envelope-from asomers@svn.freebsd.org) Message-Id: <201404101953.s3AJrfg5007625@svn.freebsd.org> From: Alan Somers Date: Thu, 10 Apr 2014 19:53:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264326 - in stable/9: . usr.sbin/config X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Apr 2014 19:53:42 -0000 Author: asomers Date: Thu Apr 10 19:53:40 2014 New Revision: 264326 URL: http://svnweb.freebsd.org/changeset/base/264326 Log: MFC r263429 Fix kern/187712: config(8) does not respect KERNCONFDIR. The impact of this bug is that you cannot build a kernel if both of the following are true: 1) The kernel config file is in a non-default location 2) The kernel config file uses the "include" statement from config(5). usr.sbin/config/main.c usr.sbin/config/config.8 usr.sbin/config/config.h usr.sbin/config/lang.l Added a "-I path" option to config(8). By analogy to cc(1), it adds an extra path in which the "include" statement will search for files. Makefile.inc1 Pass "-I ${KERNCONFDIR}" to config(8). Modified: stable/9/Makefile.inc1 (contents, props changed) stable/9/usr.sbin/config/config.8 stable/9/usr.sbin/config/config.h stable/9/usr.sbin/config/lang.l stable/9/usr.sbin/config/main.c Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/config/ (props changed) Modified: stable/9/Makefile.inc1 ============================================================================== --- stable/9/Makefile.inc1 Thu Apr 10 19:51:33 2014 (r264325) +++ stable/9/Makefile.inc1 Thu Apr 10 19:53:40 2014 (r264326) @@ -926,7 +926,7 @@ buildkernel: cd ${KRNLCONFDIR}; \ PATH=${TMPPATH} \ config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \ - ${KERNCONFDIR}/${_kernel} + -I ${KERNCONFDIR} ${KERNCONFDIR}/${_kernel} .endif .if !defined(NO_CLEAN) && !defined(NO_KERNELCLEAN) @echo Modified: stable/9/usr.sbin/config/config.8 ============================================================================== --- stable/9/usr.sbin/config/config.8 Thu Apr 10 19:51:33 2014 (r264325) +++ stable/9/usr.sbin/config/config.8 Thu Apr 10 19:53:40 2014 (r264326) @@ -37,6 +37,7 @@ .Sh SYNOPSIS .Nm .Op Fl CVgp +.Op Fl I Ar path .Op Fl d Ar destdir .Ar SYSTEM_NAME .Nm @@ -69,6 +70,12 @@ If the INCLUDE_CONFIG_FILE is present in kernel image will contain full configuration files included literally (preserving comments). This flag is kept for backward compatibility. +.It Fl I Ar path +Search in +.Ar path +for any file included by the +.Ic include +directive. This option may be specified more than once. .It Fl d Ar destdir Use .Ar destdir Modified: stable/9/usr.sbin/config/config.h ============================================================================== --- stable/9/usr.sbin/config/config.h Thu Apr 10 19:51:33 2014 (r264325) +++ stable/9/usr.sbin/config/config.h Thu Apr 10 19:53:40 2014 (r264326) @@ -144,6 +144,13 @@ struct hint { STAILQ_HEAD(hint_head, hint) hints; +struct includepath { + char *path; + SLIST_ENTRY(includepath) path_next; +}; + +SLIST_HEAD(, includepath) includepath; + /* * Tag present in the kernelconf.tmlp template file. It's mandatory for those * two strings to be the same. Otherwise you'll get into trouble. Modified: stable/9/usr.sbin/config/lang.l ============================================================================== --- stable/9/usr.sbin/config/lang.l Thu Apr 10 19:51:33 2014 (r264325) +++ stable/9/usr.sbin/config/lang.l Thu Apr 10 19:53:40 2014 (r264326) @@ -34,6 +34,7 @@ #include #include #include +#include #include #include "y.tab.h" #include "config.h" @@ -257,6 +258,7 @@ include(const char *fname, int ateof) { FILE *fp; struct incl *in; + struct includepath* ipath; char *fnamebuf; fnamebuf = NULL; @@ -269,6 +271,17 @@ include(const char *fname, int ateof) } } if (fp == NULL) { + SLIST_FOREACH(ipath, &includepath, path_next) { + asprintf(&fnamebuf, "%s/%s", ipath->path, fname); + if (fnamebuf != NULL) { + fp = fopen(fnamebuf, "r"); + free(fnamebuf); + } + if (fp != NULL) + break; + } + } + if (fp == NULL) { yyerror("cannot open included file"); return (-1); } Modified: stable/9/usr.sbin/config/main.c ============================================================================== --- stable/9/usr.sbin/config/main.c Thu Apr 10 19:51:33 2014 (r264325) +++ stable/9/usr.sbin/config/main.c Thu Apr 10 19:53:40 2014 (r264326) @@ -109,15 +109,25 @@ main(int argc, char **argv) int ch, len; char *p; char *kernfile; + struct includepath* ipath; int printmachine; printmachine = 0; kernfile = NULL; - while ((ch = getopt(argc, argv, "Cd:gmpVx:")) != -1) + SLIST_INIT(&includepath); + while ((ch = getopt(argc, argv, "CI:d:gmpVx:")) != -1) switch (ch) { case 'C': filebased = 1; break; + case 'I': + ipath = (struct includepath *) \ + calloc(1, sizeof (struct includepath)); + if (ipath == NULL) + err(EXIT_FAILURE, "calloc"); + ipath->path = optarg; + SLIST_INSERT_HEAD(&includepath, ipath, path_next); + break; case 'm': printmachine = 1; break; From owner-svn-src-stable@FreeBSD.ORG Thu Apr 10 21:53:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62C78585; Thu, 10 Apr 2014 21:53:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4EB7218FF; Thu, 10 Apr 2014 21:53:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3ALrpXh059276; Thu, 10 Apr 2014 21:53:51 GMT (envelope-from joerg@svn.freebsd.org) Received: (from joerg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3ALro0c059274; Thu, 10 Apr 2014 21:53:50 GMT (envelope-from joerg@svn.freebsd.org) Message-Id: <201404102153.s3ALro0c059274@svn.freebsd.org> From: Joerg Wunsch Date: Thu, 10 Apr 2014 21:53:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264328 - in stable/10/sys/dev/usb: . serial X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Apr 2014 21:53:51 -0000 Author: joerg Date: Thu Apr 10 21:53:50 2014 New Revision: 264328 URL: http://svnweb.freebsd.org/changeset/base/264328 Log: Merge r264084: make the Dresden Elektronik "USB Level Shifter Low Cost" known to the FTDI driver. Modified: stable/10/sys/dev/usb/serial/uftdi.c stable/10/sys/dev/usb/usbdevs Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/serial/uftdi.c ============================================================================== --- stable/10/sys/dev/usb/serial/uftdi.c Thu Apr 10 21:03:46 2014 (r264327) +++ stable/10/sys/dev/usb/serial/uftdi.c Thu Apr 10 21:53:50 2014 (r264328) @@ -235,6 +235,7 @@ static const STRUCT_USB_HOST_ID uftdi_de UFTDI_DEV(CONTEC, COM1USBH, UFTDI_TYPE_AUTO), UFTDI_DEV(DRESDENELEKTRONIK, SENSORTERMINALBOARD, UFTDI_TYPE_8U232AM), UFTDI_DEV(DRESDENELEKTRONIK, WIRELESSHANDHELDTERMINAL, UFTDI_TYPE_8U232AM), + UFTDI_DEV(DRESDENELEKTRONIK, LEVELSHIFTERSTICKLOWCOST, UFTDI_TYPE_8U232AM), UFTDI_DEV(ELEKTOR, FT323R, UFTDI_TYPE_AUTO), UFTDI_DEV(EVOLUTION, ER1, UFTDI_TYPE_AUTO), UFTDI_DEV(EVOLUTION, HYBRID, UFTDI_TYPE_AUTO), Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Thu Apr 10 21:03:46 2014 (r264327) +++ stable/10/sys/dev/usb/usbdevs Thu Apr 10 21:53:50 2014 (r264328) @@ -1650,6 +1650,7 @@ product DRAYTEK VIGOR550 0x0550 Vigor550 /* dresden elektronik products */ product DRESDENELEKTRONIK SENSORTERMINALBOARD 0x0001 SensorTerminalBoard product DRESDENELEKTRONIK WIRELESSHANDHELDTERMINAL 0x0004 Wireless Handheld Terminal +product DRESDENELEKTRONIK LEVELSHIFTERSTICKLOWCOST 0x0022 Levelshifter Stick Low Cost /* Dynastream Innovations */ product DYNASTREAM ANTDEVBOARD 0x1003 ANT dev board From owner-svn-src-stable@FreeBSD.ORG Thu Apr 10 22:05:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1CA0BF6; Thu, 10 Apr 2014 22:05:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA3CD19F9; Thu, 10 Apr 2014 22:05:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3AM5phV063801; Thu, 10 Apr 2014 22:05:51 GMT (envelope-from joerg@svn.freebsd.org) Received: (from joerg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3AM5pIX063799; Thu, 10 Apr 2014 22:05:51 GMT (envelope-from joerg@svn.freebsd.org) Message-Id: <201404102205.s3AM5pIX063799@svn.freebsd.org> From: Joerg Wunsch Date: Thu, 10 Apr 2014 22:05:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264329 - in stable/9/sys/dev/usb: . serial X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Apr 2014 22:05:51 -0000 Author: joerg Date: Thu Apr 10 22:05:50 2014 New Revision: 264329 URL: http://svnweb.freebsd.org/changeset/base/264329 Log: MFC r264084: make the Dresden Elektronik "USB Level Shifter Stick Low Cost" known to the FTDI driver. Modified: stable/9/sys/dev/usb/serial/uftdi.c stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/serial/uftdi.c ============================================================================== --- stable/9/sys/dev/usb/serial/uftdi.c Thu Apr 10 21:53:50 2014 (r264328) +++ stable/9/sys/dev/usb/serial/uftdi.c Thu Apr 10 22:05:50 2014 (r264329) @@ -235,6 +235,7 @@ static const STRUCT_USB_HOST_ID uftdi_de UFTDI_DEV(CONTEC, COM1USBH, UFTDI_TYPE_AUTO), UFTDI_DEV(DRESDENELEKTRONIK, SENSORTERMINALBOARD, UFTDI_TYPE_8U232AM), UFTDI_DEV(DRESDENELEKTRONIK, WIRELESSHANDHELDTERMINAL, UFTDI_TYPE_8U232AM), + UFTDI_DEV(DRESDENELEKTRONIK, LEVELSHIFTERSTICKLOWCOST, UFTDI_TYPE_8U232AM), UFTDI_DEV(ELEKTOR, FT323R, UFTDI_TYPE_AUTO), UFTDI_DEV(EVOLUTION, ER1, UFTDI_TYPE_AUTO), UFTDI_DEV(EVOLUTION, HYBRID, UFTDI_TYPE_AUTO), Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Thu Apr 10 21:53:50 2014 (r264328) +++ stable/9/sys/dev/usb/usbdevs Thu Apr 10 22:05:50 2014 (r264329) @@ -1654,6 +1654,7 @@ product DRAYTEK VIGOR550 0x0550 Vigor550 /* dresden elektronik products */ product DRESDENELEKTRONIK SENSORTERMINALBOARD 0x0001 SensorTerminalBoard product DRESDENELEKTRONIK WIRELESSHANDHELDTERMINAL 0x0004 Wireless Handheld Terminal +product DRESDENELEKTRONIK LEVELSHIFTERSTICKLOWCOST 0x0022 Levelshifter Stick Low Cost /* Dynastream Innovations */ product DYNASTREAM ANTDEVBOARD 0x1003 ANT dev board From owner-svn-src-stable@FreeBSD.ORG Thu Apr 10 22:10:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 32E45146; Thu, 10 Apr 2014 22:10:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FBDB1A41; Thu, 10 Apr 2014 22:10:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3AMATkB064970; Thu, 10 Apr 2014 22:10:29 GMT (envelope-from joerg@svn.freebsd.org) Received: (from joerg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3AMATtW064968; Thu, 10 Apr 2014 22:10:29 GMT (envelope-from joerg@svn.freebsd.org) Message-Id: <201404102210.s3AMATtW064968@svn.freebsd.org> From: Joerg Wunsch Date: Thu, 10 Apr 2014 22:10:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r264330 - in stable/8/sys/dev/usb: . serial X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Apr 2014 22:10:30 -0000 Author: joerg Date: Thu Apr 10 22:10:29 2014 New Revision: 264330 URL: http://svnweb.freebsd.org/changeset/base/264330 Log: MFC r264084: make the Dresden Elektronik "USB Level Shifter Stick Low Cost" known to the FTDI driver. Modified: stable/8/sys/dev/usb/serial/uftdi.c stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/serial/uftdi.c ============================================================================== --- stable/8/sys/dev/usb/serial/uftdi.c Thu Apr 10 22:05:50 2014 (r264329) +++ stable/8/sys/dev/usb/serial/uftdi.c Thu Apr 10 22:10:29 2014 (r264330) @@ -235,6 +235,7 @@ static const STRUCT_USB_HOST_ID uftdi_de UFTDI_DEV(CONTEC, COM1USBH, UFTDI_TYPE_AUTO), UFTDI_DEV(DRESDENELEKTRONIK, SENSORTERMINALBOARD, UFTDI_TYPE_8U232AM), UFTDI_DEV(DRESDENELEKTRONIK, WIRELESSHANDHELDTERMINAL, UFTDI_TYPE_8U232AM), + UFTDI_DEV(DRESDENELEKTRONIK, LEVELSHIFTERSTICKLOWCOST, UFTDI_TYPE_8U232AM), UFTDI_DEV(ELEKTOR, FT323R, UFTDI_TYPE_AUTO), UFTDI_DEV(EVOLUTION, ER1, UFTDI_TYPE_AUTO), UFTDI_DEV(EVOLUTION, HYBRID, UFTDI_TYPE_AUTO), Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Thu Apr 10 22:05:50 2014 (r264329) +++ stable/8/sys/dev/usb/usbdevs Thu Apr 10 22:10:29 2014 (r264330) @@ -1654,6 +1654,7 @@ product DRAYTEK VIGOR550 0x0550 Vigor550 /* dresden elektronik products */ product DRESDENELEKTRONIK SENSORTERMINALBOARD 0x0001 SensorTerminalBoard product DRESDENELEKTRONIK WIRELESSHANDHELDTERMINAL 0x0004 Wireless Handheld Terminal +product DRESDENELEKTRONIK LEVELSHIFTERSTICKLOWCOST 0x0022 Levelshifter Stick Low Cost /* Dynastream Innovations */ product DYNASTREAM ANTDEVBOARD 0x1003 ANT dev board From owner-svn-src-stable@FreeBSD.ORG Thu Apr 10 22:39:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4272A6BC; Thu, 10 Apr 2014 22:39:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A0151C99; Thu, 10 Apr 2014 22:39:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3AMdRXU076663; Thu, 10 Apr 2014 22:39:27 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3AMdOYK076647; Thu, 10 Apr 2014 22:39:24 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201404102239.s3AMdOYK076647@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 10 Apr 2014 22:39:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264331 - in stable/10: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes/asm crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Apr 2014 22:39:27 -0000 Author: jkim Date: Thu Apr 10 22:39:22 2014 New Revision: 264331 URL: http://svnweb.freebsd.org/changeset/base/264331 Log: MFC: r261037, r264278 Merge OpenSSL 1.0.1f and 1.0.1g. Modified: stable/10/crypto/openssl/CHANGES stable/10/crypto/openssl/Configure stable/10/crypto/openssl/FAQ stable/10/crypto/openssl/Makefile stable/10/crypto/openssl/Makefile.org stable/10/crypto/openssl/NEWS stable/10/crypto/openssl/README stable/10/crypto/openssl/apps/Makefile stable/10/crypto/openssl/apps/apps.c stable/10/crypto/openssl/apps/apps.h stable/10/crypto/openssl/apps/crl.c stable/10/crypto/openssl/apps/dgst.c stable/10/crypto/openssl/apps/ecparam.c stable/10/crypto/openssl/apps/openssl.c stable/10/crypto/openssl/apps/pkcs12.c stable/10/crypto/openssl/apps/req.c stable/10/crypto/openssl/config stable/10/crypto/openssl/crypto/Makefile stable/10/crypto/openssl/crypto/aes/asm/aes-parisc.pl stable/10/crypto/openssl/crypto/aes/asm/bsaes-x86_64.pl stable/10/crypto/openssl/crypto/aes/asm/vpaes-x86_64.pl stable/10/crypto/openssl/crypto/armcap.c stable/10/crypto/openssl/crypto/asn1/a_int.c stable/10/crypto/openssl/crypto/asn1/asn1_err.c stable/10/crypto/openssl/crypto/bio/bss_dgram.c stable/10/crypto/openssl/crypto/bio/bss_log.c stable/10/crypto/openssl/crypto/bn/Makefile stable/10/crypto/openssl/crypto/bn/asm/mips-mont.pl stable/10/crypto/openssl/crypto/bn/asm/mips.pl stable/10/crypto/openssl/crypto/bn/asm/parisc-mont.pl stable/10/crypto/openssl/crypto/bn/asm/x86_64-gf2m.pl stable/10/crypto/openssl/crypto/bn/asm/x86_64-mont5.pl stable/10/crypto/openssl/crypto/bn/bn_nist.c stable/10/crypto/openssl/crypto/buffer/buffer.c stable/10/crypto/openssl/crypto/buffer/buffer.h stable/10/crypto/openssl/crypto/cms/cms_lib.c stable/10/crypto/openssl/crypto/cryptlib.c stable/10/crypto/openssl/crypto/ec/ec_ameth.c stable/10/crypto/openssl/crypto/ec/ec_asn1.c stable/10/crypto/openssl/crypto/ec/ec_lib.c stable/10/crypto/openssl/crypto/engine/eng_list.c stable/10/crypto/openssl/crypto/engine/eng_rdrand.c stable/10/crypto/openssl/crypto/evp/Makefile stable/10/crypto/openssl/crypto/evp/bio_b64.c stable/10/crypto/openssl/crypto/evp/digest.c stable/10/crypto/openssl/crypto/evp/e_aes.c stable/10/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c stable/10/crypto/openssl/crypto/evp/e_des3.c stable/10/crypto/openssl/crypto/evp/p5_crpt2.c stable/10/crypto/openssl/crypto/modes/Makefile stable/10/crypto/openssl/crypto/modes/asm/ghash-parisc.pl stable/10/crypto/openssl/crypto/modes/cbc128.c stable/10/crypto/openssl/crypto/modes/ccm128.c stable/10/crypto/openssl/crypto/modes/cts128.c stable/10/crypto/openssl/crypto/modes/gcm128.c stable/10/crypto/openssl/crypto/modes/modes_lcl.h stable/10/crypto/openssl/crypto/opensslv.h stable/10/crypto/openssl/crypto/pariscid.pl stable/10/crypto/openssl/crypto/pem/pem_info.c stable/10/crypto/openssl/crypto/pkcs12/p12_crt.c stable/10/crypto/openssl/crypto/rand/md_rand.c stable/10/crypto/openssl/crypto/rand/rand.h stable/10/crypto/openssl/crypto/rand/rand_err.c stable/10/crypto/openssl/crypto/rand/rand_lib.c stable/10/crypto/openssl/crypto/rc4/asm/rc4-parisc.pl stable/10/crypto/openssl/crypto/rsa/rsa_ameth.c stable/10/crypto/openssl/crypto/rsa/rsa_chk.c stable/10/crypto/openssl/crypto/rsa/rsa_pmeth.c stable/10/crypto/openssl/crypto/sha/Makefile stable/10/crypto/openssl/crypto/sha/asm/sha1-parisc.pl stable/10/crypto/openssl/crypto/sha/asm/sha1-x86_64.pl stable/10/crypto/openssl/crypto/sha/asm/sha512-mips.pl stable/10/crypto/openssl/crypto/sha/asm/sha512-parisc.pl stable/10/crypto/openssl/crypto/sha/sha512.c stable/10/crypto/openssl/crypto/srp/srp_grps.h stable/10/crypto/openssl/crypto/srp/srp_lib.c stable/10/crypto/openssl/crypto/symhacks.h stable/10/crypto/openssl/crypto/x509/by_dir.c stable/10/crypto/openssl/crypto/x509/x509_vfy.c stable/10/crypto/openssl/crypto/x509/x_all.c stable/10/crypto/openssl/crypto/x86cpuid.pl stable/10/crypto/openssl/doc/apps/cms.pod stable/10/crypto/openssl/doc/apps/config.pod stable/10/crypto/openssl/doc/apps/crl.pod stable/10/crypto/openssl/doc/apps/ec.pod stable/10/crypto/openssl/doc/apps/pkcs12.pod stable/10/crypto/openssl/doc/apps/req.pod stable/10/crypto/openssl/doc/apps/rsa.pod stable/10/crypto/openssl/doc/apps/s_client.pod stable/10/crypto/openssl/doc/apps/s_server.pod stable/10/crypto/openssl/doc/apps/smime.pod stable/10/crypto/openssl/doc/apps/ts.pod stable/10/crypto/openssl/doc/apps/tsget.pod stable/10/crypto/openssl/doc/crypto/BN_BLINDING_new.pod stable/10/crypto/openssl/doc/crypto/ERR_get_error.pod stable/10/crypto/openssl/doc/crypto/EVP_BytesToKey.pod stable/10/crypto/openssl/doc/crypto/EVP_EncryptInit.pod stable/10/crypto/openssl/doc/crypto/X509_STORE_CTX_get_error.pod stable/10/crypto/openssl/doc/crypto/X509_VERIFY_PARAM_set_flags.pod stable/10/crypto/openssl/doc/crypto/ecdsa.pod stable/10/crypto/openssl/doc/crypto/pem.pod stable/10/crypto/openssl/doc/ssl/SSL_COMP_add_compression_method.pod stable/10/crypto/openssl/doc/ssl/SSL_CTX_add_session.pod stable/10/crypto/openssl/doc/ssl/SSL_CTX_load_verify_locations.pod stable/10/crypto/openssl/doc/ssl/SSL_CTX_set_client_CA_list.pod stable/10/crypto/openssl/doc/ssl/SSL_CTX_set_options.pod stable/10/crypto/openssl/doc/ssl/SSL_CTX_set_session_id_context.pod stable/10/crypto/openssl/doc/ssl/SSL_CTX_set_ssl_version.pod stable/10/crypto/openssl/doc/ssl/SSL_CTX_set_verify.pod stable/10/crypto/openssl/doc/ssl/SSL_CTX_use_psk_identity_hint.pod stable/10/crypto/openssl/doc/ssl/SSL_accept.pod stable/10/crypto/openssl/doc/ssl/SSL_clear.pod stable/10/crypto/openssl/doc/ssl/SSL_connect.pod stable/10/crypto/openssl/doc/ssl/SSL_do_handshake.pod stable/10/crypto/openssl/doc/ssl/SSL_read.pod stable/10/crypto/openssl/doc/ssl/SSL_session_reused.pod stable/10/crypto/openssl/doc/ssl/SSL_set_fd.pod stable/10/crypto/openssl/doc/ssl/SSL_set_session.pod stable/10/crypto/openssl/doc/ssl/SSL_set_shutdown.pod stable/10/crypto/openssl/doc/ssl/SSL_shutdown.pod stable/10/crypto/openssl/doc/ssl/SSL_write.pod stable/10/crypto/openssl/e_os.h stable/10/crypto/openssl/engines/ccgost/gost89.h stable/10/crypto/openssl/engines/ccgost/gosthash.c stable/10/crypto/openssl/ssl/d1_both.c stable/10/crypto/openssl/ssl/d1_clnt.c stable/10/crypto/openssl/ssl/d1_lib.c stable/10/crypto/openssl/ssl/d1_pkt.c stable/10/crypto/openssl/ssl/d1_srvr.c stable/10/crypto/openssl/ssl/kssl.h stable/10/crypto/openssl/ssl/s23_clnt.c stable/10/crypto/openssl/ssl/s3_both.c stable/10/crypto/openssl/ssl/s3_clnt.c stable/10/crypto/openssl/ssl/s3_lib.c stable/10/crypto/openssl/ssl/s3_pkt.c stable/10/crypto/openssl/ssl/s3_srvr.c stable/10/crypto/openssl/ssl/ssl.h stable/10/crypto/openssl/ssl/ssl3.h stable/10/crypto/openssl/ssl/ssl_lib.c stable/10/crypto/openssl/ssl/ssl_locl.h stable/10/crypto/openssl/ssl/ssltest.c stable/10/crypto/openssl/ssl/t1_enc.c stable/10/crypto/openssl/ssl/t1_lib.c stable/10/crypto/openssl/ssl/tls1.h stable/10/crypto/openssl/util/libeay.num stable/10/crypto/openssl/util/pl/BC-32.pl stable/10/crypto/openssl/util/pl/VC-32.pl stable/10/crypto/openssl/util/shlib_wrap.sh stable/10/secure/lib/libcrypto/Makefile.inc stable/10/secure/lib/libcrypto/amd64/bsaes-x86_64.S stable/10/secure/lib/libcrypto/amd64/vpaes-x86_64.S stable/10/secure/lib/libcrypto/i386/x86cpuid.s stable/10/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 stable/10/secure/lib/libcrypto/man/ASN1_STRING_length.3 stable/10/secure/lib/libcrypto/man/ASN1_STRING_new.3 stable/10/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 stable/10/secure/lib/libcrypto/man/ASN1_generate_nconf.3 stable/10/secure/lib/libcrypto/man/BIO_ctrl.3 stable/10/secure/lib/libcrypto/man/BIO_f_base64.3 stable/10/secure/lib/libcrypto/man/BIO_f_buffer.3 stable/10/secure/lib/libcrypto/man/BIO_f_cipher.3 stable/10/secure/lib/libcrypto/man/BIO_f_md.3 stable/10/secure/lib/libcrypto/man/BIO_f_null.3 stable/10/secure/lib/libcrypto/man/BIO_f_ssl.3 stable/10/secure/lib/libcrypto/man/BIO_find_type.3 stable/10/secure/lib/libcrypto/man/BIO_new.3 stable/10/secure/lib/libcrypto/man/BIO_new_CMS.3 stable/10/secure/lib/libcrypto/man/BIO_push.3 stable/10/secure/lib/libcrypto/man/BIO_read.3 stable/10/secure/lib/libcrypto/man/BIO_s_accept.3 stable/10/secure/lib/libcrypto/man/BIO_s_bio.3 stable/10/secure/lib/libcrypto/man/BIO_s_connect.3 stable/10/secure/lib/libcrypto/man/BIO_s_fd.3 stable/10/secure/lib/libcrypto/man/BIO_s_file.3 stable/10/secure/lib/libcrypto/man/BIO_s_mem.3 stable/10/secure/lib/libcrypto/man/BIO_s_null.3 stable/10/secure/lib/libcrypto/man/BIO_s_socket.3 stable/10/secure/lib/libcrypto/man/BIO_set_callback.3 stable/10/secure/lib/libcrypto/man/BIO_should_retry.3 stable/10/secure/lib/libcrypto/man/BN_BLINDING_new.3 stable/10/secure/lib/libcrypto/man/BN_CTX_new.3 stable/10/secure/lib/libcrypto/man/BN_CTX_start.3 stable/10/secure/lib/libcrypto/man/BN_add.3 stable/10/secure/lib/libcrypto/man/BN_add_word.3 stable/10/secure/lib/libcrypto/man/BN_bn2bin.3 stable/10/secure/lib/libcrypto/man/BN_cmp.3 stable/10/secure/lib/libcrypto/man/BN_copy.3 stable/10/secure/lib/libcrypto/man/BN_generate_prime.3 stable/10/secure/lib/libcrypto/man/BN_mod_inverse.3 stable/10/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 stable/10/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 stable/10/secure/lib/libcrypto/man/BN_new.3 stable/10/secure/lib/libcrypto/man/BN_num_bytes.3 stable/10/secure/lib/libcrypto/man/BN_rand.3 stable/10/secure/lib/libcrypto/man/BN_set_bit.3 stable/10/secure/lib/libcrypto/man/BN_swap.3 stable/10/secure/lib/libcrypto/man/BN_zero.3 stable/10/secure/lib/libcrypto/man/CMS_add0_cert.3 stable/10/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 stable/10/secure/lib/libcrypto/man/CMS_compress.3 stable/10/secure/lib/libcrypto/man/CMS_decrypt.3 stable/10/secure/lib/libcrypto/man/CMS_encrypt.3 stable/10/secure/lib/libcrypto/man/CMS_final.3 stable/10/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 stable/10/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 stable/10/secure/lib/libcrypto/man/CMS_get0_type.3 stable/10/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 stable/10/secure/lib/libcrypto/man/CMS_sign.3 stable/10/secure/lib/libcrypto/man/CMS_sign_add1_signer.3 stable/10/secure/lib/libcrypto/man/CMS_sign_receipt.3 stable/10/secure/lib/libcrypto/man/CMS_uncompress.3 stable/10/secure/lib/libcrypto/man/CMS_verify.3 stable/10/secure/lib/libcrypto/man/CMS_verify_receipt.3 stable/10/secure/lib/libcrypto/man/CONF_modules_free.3 stable/10/secure/lib/libcrypto/man/CONF_modules_load_file.3 stable/10/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 stable/10/secure/lib/libcrypto/man/DH_generate_key.3 stable/10/secure/lib/libcrypto/man/DH_generate_parameters.3 stable/10/secure/lib/libcrypto/man/DH_get_ex_new_index.3 stable/10/secure/lib/libcrypto/man/DH_new.3 stable/10/secure/lib/libcrypto/man/DH_set_method.3 stable/10/secure/lib/libcrypto/man/DH_size.3 stable/10/secure/lib/libcrypto/man/DSA_SIG_new.3 stable/10/secure/lib/libcrypto/man/DSA_do_sign.3 stable/10/secure/lib/libcrypto/man/DSA_dup_DH.3 stable/10/secure/lib/libcrypto/man/DSA_generate_key.3 stable/10/secure/lib/libcrypto/man/DSA_generate_parameters.3 stable/10/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 stable/10/secure/lib/libcrypto/man/DSA_new.3 stable/10/secure/lib/libcrypto/man/DSA_set_method.3 stable/10/secure/lib/libcrypto/man/DSA_sign.3 stable/10/secure/lib/libcrypto/man/DSA_size.3 stable/10/secure/lib/libcrypto/man/ERR_GET_LIB.3 stable/10/secure/lib/libcrypto/man/ERR_clear_error.3 stable/10/secure/lib/libcrypto/man/ERR_error_string.3 stable/10/secure/lib/libcrypto/man/ERR_get_error.3 stable/10/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 stable/10/secure/lib/libcrypto/man/ERR_load_strings.3 stable/10/secure/lib/libcrypto/man/ERR_print_errors.3 stable/10/secure/lib/libcrypto/man/ERR_put_error.3 stable/10/secure/lib/libcrypto/man/ERR_remove_state.3 stable/10/secure/lib/libcrypto/man/ERR_set_mark.3 stable/10/secure/lib/libcrypto/man/EVP_BytesToKey.3 stable/10/secure/lib/libcrypto/man/EVP_DigestInit.3 stable/10/secure/lib/libcrypto/man/EVP_DigestSignInit.3 stable/10/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 stable/10/secure/lib/libcrypto/man/EVP_EncryptInit.3 stable/10/secure/lib/libcrypto/man/EVP_OpenInit.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_derive.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_new.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_sign.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_verify.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 stable/10/secure/lib/libcrypto/man/EVP_SealInit.3 stable/10/secure/lib/libcrypto/man/EVP_SignInit.3 stable/10/secure/lib/libcrypto/man/EVP_VerifyInit.3 stable/10/secure/lib/libcrypto/man/OBJ_nid2obj.3 stable/10/secure/lib/libcrypto/man/OPENSSL_Applink.3 stable/10/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 stable/10/secure/lib/libcrypto/man/OPENSSL_config.3 stable/10/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 stable/10/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 stable/10/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 stable/10/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 stable/10/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 stable/10/secure/lib/libcrypto/man/PKCS12_create.3 stable/10/secure/lib/libcrypto/man/PKCS12_parse.3 stable/10/secure/lib/libcrypto/man/PKCS7_decrypt.3 stable/10/secure/lib/libcrypto/man/PKCS7_encrypt.3 stable/10/secure/lib/libcrypto/man/PKCS7_sign.3 stable/10/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 stable/10/secure/lib/libcrypto/man/PKCS7_verify.3 stable/10/secure/lib/libcrypto/man/RAND_add.3 stable/10/secure/lib/libcrypto/man/RAND_bytes.3 stable/10/secure/lib/libcrypto/man/RAND_cleanup.3 stable/10/secure/lib/libcrypto/man/RAND_egd.3 stable/10/secure/lib/libcrypto/man/RAND_load_file.3 stable/10/secure/lib/libcrypto/man/RAND_set_rand_method.3 stable/10/secure/lib/libcrypto/man/RSA_blinding_on.3 stable/10/secure/lib/libcrypto/man/RSA_check_key.3 stable/10/secure/lib/libcrypto/man/RSA_generate_key.3 stable/10/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 stable/10/secure/lib/libcrypto/man/RSA_new.3 stable/10/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 stable/10/secure/lib/libcrypto/man/RSA_print.3 stable/10/secure/lib/libcrypto/man/RSA_private_encrypt.3 stable/10/secure/lib/libcrypto/man/RSA_public_encrypt.3 stable/10/secure/lib/libcrypto/man/RSA_set_method.3 stable/10/secure/lib/libcrypto/man/RSA_sign.3 stable/10/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 stable/10/secure/lib/libcrypto/man/RSA_size.3 stable/10/secure/lib/libcrypto/man/SMIME_read_CMS.3 stable/10/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 stable/10/secure/lib/libcrypto/man/SMIME_write_CMS.3 stable/10/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 stable/10/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 stable/10/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 stable/10/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 stable/10/secure/lib/libcrypto/man/X509_NAME_print_ex.3 stable/10/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 stable/10/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 stable/10/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 stable/10/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 stable/10/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 stable/10/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 stable/10/secure/lib/libcrypto/man/X509_new.3 stable/10/secure/lib/libcrypto/man/X509_verify_cert.3 stable/10/secure/lib/libcrypto/man/bio.3 stable/10/secure/lib/libcrypto/man/blowfish.3 stable/10/secure/lib/libcrypto/man/bn.3 stable/10/secure/lib/libcrypto/man/bn_internal.3 stable/10/secure/lib/libcrypto/man/buffer.3 stable/10/secure/lib/libcrypto/man/crypto.3 stable/10/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 stable/10/secure/lib/libcrypto/man/d2i_DHparams.3 stable/10/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 stable/10/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 stable/10/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 stable/10/secure/lib/libcrypto/man/d2i_X509.3 stable/10/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 stable/10/secure/lib/libcrypto/man/d2i_X509_CRL.3 stable/10/secure/lib/libcrypto/man/d2i_X509_NAME.3 stable/10/secure/lib/libcrypto/man/d2i_X509_REQ.3 stable/10/secure/lib/libcrypto/man/d2i_X509_SIG.3 stable/10/secure/lib/libcrypto/man/des.3 stable/10/secure/lib/libcrypto/man/dh.3 stable/10/secure/lib/libcrypto/man/dsa.3 stable/10/secure/lib/libcrypto/man/ecdsa.3 stable/10/secure/lib/libcrypto/man/engine.3 stable/10/secure/lib/libcrypto/man/err.3 stable/10/secure/lib/libcrypto/man/evp.3 stable/10/secure/lib/libcrypto/man/hmac.3 stable/10/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 stable/10/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 stable/10/secure/lib/libcrypto/man/lh_stats.3 stable/10/secure/lib/libcrypto/man/lhash.3 stable/10/secure/lib/libcrypto/man/md5.3 stable/10/secure/lib/libcrypto/man/mdc2.3 stable/10/secure/lib/libcrypto/man/pem.3 stable/10/secure/lib/libcrypto/man/rand.3 stable/10/secure/lib/libcrypto/man/rc4.3 stable/10/secure/lib/libcrypto/man/ripemd.3 stable/10/secure/lib/libcrypto/man/rsa.3 stable/10/secure/lib/libcrypto/man/sha.3 stable/10/secure/lib/libcrypto/man/threads.3 stable/10/secure/lib/libcrypto/man/ui.3 stable/10/secure/lib/libcrypto/man/ui_compat.3 stable/10/secure/lib/libcrypto/man/x509.3 stable/10/secure/lib/libssl/man/SSL_CIPHER_get_name.3 stable/10/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 stable/10/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 stable/10/secure/lib/libssl/man/SSL_CTX_add_session.3 stable/10/secure/lib/libssl/man/SSL_CTX_ctrl.3 stable/10/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 stable/10/secure/lib/libssl/man/SSL_CTX_free.3 stable/10/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 stable/10/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 stable/10/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 stable/10/secure/lib/libssl/man/SSL_CTX_new.3 stable/10/secure/lib/libssl/man/SSL_CTX_sess_number.3 stable/10/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 stable/10/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 stable/10/secure/lib/libssl/man/SSL_CTX_sessions.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_mode.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_options.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_timeout.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_verify.3 stable/10/secure/lib/libssl/man/SSL_CTX_use_certificate.3 stable/10/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 stable/10/secure/lib/libssl/man/SSL_SESSION_free.3 stable/10/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 stable/10/secure/lib/libssl/man/SSL_SESSION_get_time.3 stable/10/secure/lib/libssl/man/SSL_accept.3 stable/10/secure/lib/libssl/man/SSL_alert_type_string.3 stable/10/secure/lib/libssl/man/SSL_clear.3 stable/10/secure/lib/libssl/man/SSL_connect.3 stable/10/secure/lib/libssl/man/SSL_do_handshake.3 stable/10/secure/lib/libssl/man/SSL_free.3 stable/10/secure/lib/libssl/man/SSL_get_SSL_CTX.3 stable/10/secure/lib/libssl/man/SSL_get_ciphers.3 stable/10/secure/lib/libssl/man/SSL_get_client_CA_list.3 stable/10/secure/lib/libssl/man/SSL_get_current_cipher.3 stable/10/secure/lib/libssl/man/SSL_get_default_timeout.3 stable/10/secure/lib/libssl/man/SSL_get_error.3 stable/10/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 stable/10/secure/lib/libssl/man/SSL_get_ex_new_index.3 stable/10/secure/lib/libssl/man/SSL_get_fd.3 stable/10/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 stable/10/secure/lib/libssl/man/SSL_get_peer_certificate.3 stable/10/secure/lib/libssl/man/SSL_get_psk_identity.3 stable/10/secure/lib/libssl/man/SSL_get_rbio.3 stable/10/secure/lib/libssl/man/SSL_get_session.3 stable/10/secure/lib/libssl/man/SSL_get_verify_result.3 stable/10/secure/lib/libssl/man/SSL_get_version.3 stable/10/secure/lib/libssl/man/SSL_library_init.3 stable/10/secure/lib/libssl/man/SSL_load_client_CA_file.3 stable/10/secure/lib/libssl/man/SSL_new.3 stable/10/secure/lib/libssl/man/SSL_pending.3 stable/10/secure/lib/libssl/man/SSL_read.3 stable/10/secure/lib/libssl/man/SSL_rstate_string.3 stable/10/secure/lib/libssl/man/SSL_session_reused.3 stable/10/secure/lib/libssl/man/SSL_set_bio.3 stable/10/secure/lib/libssl/man/SSL_set_connect_state.3 stable/10/secure/lib/libssl/man/SSL_set_fd.3 stable/10/secure/lib/libssl/man/SSL_set_session.3 stable/10/secure/lib/libssl/man/SSL_set_shutdown.3 stable/10/secure/lib/libssl/man/SSL_set_verify_result.3 stable/10/secure/lib/libssl/man/SSL_shutdown.3 stable/10/secure/lib/libssl/man/SSL_state_string.3 stable/10/secure/lib/libssl/man/SSL_want.3 stable/10/secure/lib/libssl/man/SSL_write.3 stable/10/secure/lib/libssl/man/d2i_SSL_SESSION.3 stable/10/secure/lib/libssl/man/ssl.3 stable/10/secure/usr.bin/openssl/man/CA.pl.1 stable/10/secure/usr.bin/openssl/man/asn1parse.1 stable/10/secure/usr.bin/openssl/man/ca.1 stable/10/secure/usr.bin/openssl/man/ciphers.1 stable/10/secure/usr.bin/openssl/man/cms.1 stable/10/secure/usr.bin/openssl/man/crl.1 stable/10/secure/usr.bin/openssl/man/crl2pkcs7.1 stable/10/secure/usr.bin/openssl/man/dgst.1 stable/10/secure/usr.bin/openssl/man/dhparam.1 stable/10/secure/usr.bin/openssl/man/dsa.1 stable/10/secure/usr.bin/openssl/man/dsaparam.1 stable/10/secure/usr.bin/openssl/man/ec.1 stable/10/secure/usr.bin/openssl/man/ecparam.1 stable/10/secure/usr.bin/openssl/man/enc.1 stable/10/secure/usr.bin/openssl/man/errstr.1 stable/10/secure/usr.bin/openssl/man/gendsa.1 stable/10/secure/usr.bin/openssl/man/genpkey.1 stable/10/secure/usr.bin/openssl/man/genrsa.1 stable/10/secure/usr.bin/openssl/man/nseq.1 stable/10/secure/usr.bin/openssl/man/ocsp.1 stable/10/secure/usr.bin/openssl/man/openssl.1 stable/10/secure/usr.bin/openssl/man/passwd.1 stable/10/secure/usr.bin/openssl/man/pkcs12.1 stable/10/secure/usr.bin/openssl/man/pkcs7.1 stable/10/secure/usr.bin/openssl/man/pkcs8.1 stable/10/secure/usr.bin/openssl/man/pkey.1 stable/10/secure/usr.bin/openssl/man/pkeyparam.1 stable/10/secure/usr.bin/openssl/man/pkeyutl.1 stable/10/secure/usr.bin/openssl/man/rand.1 stable/10/secure/usr.bin/openssl/man/req.1 stable/10/secure/usr.bin/openssl/man/rsa.1 stable/10/secure/usr.bin/openssl/man/rsautl.1 stable/10/secure/usr.bin/openssl/man/s_client.1 stable/10/secure/usr.bin/openssl/man/s_server.1 stable/10/secure/usr.bin/openssl/man/s_time.1 stable/10/secure/usr.bin/openssl/man/sess_id.1 stable/10/secure/usr.bin/openssl/man/smime.1 stable/10/secure/usr.bin/openssl/man/speed.1 stable/10/secure/usr.bin/openssl/man/spkac.1 stable/10/secure/usr.bin/openssl/man/ts.1 stable/10/secure/usr.bin/openssl/man/tsget.1 stable/10/secure/usr.bin/openssl/man/verify.1 stable/10/secure/usr.bin/openssl/man/version.1 stable/10/secure/usr.bin/openssl/man/x509.1 stable/10/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/crypto/openssl/CHANGES ============================================================================== --- stable/10/crypto/openssl/CHANGES Thu Apr 10 22:10:29 2014 (r264330) +++ stable/10/crypto/openssl/CHANGES Thu Apr 10 22:39:22 2014 (r264331) @@ -2,9 +2,60 @@ OpenSSL CHANGES _______________ + Changes between 1.0.1f and 1.0.1g [7 Apr 2014] + + *) A missing bounds check in the handling of the TLS heartbeat extension + can be used to reveal up to 64k of memory to a connected client or + server. + + Thanks for Neel Mehta of Google Security for discovering this bug and to + Adam Langley and Bodo Moeller for + preparing the fix (CVE-2014-0160) + [Adam Langley, Bodo Moeller] + + *) Fix for the attack described in the paper "Recovering OpenSSL + ECDSA Nonces Using the FLUSH+RELOAD Cache Side-channel Attack" + by Yuval Yarom and Naomi Benger. Details can be obtained from: + http://eprint.iacr.org/2014/140 + + Thanks to Yuval Yarom and Naomi Benger for discovering this + flaw and to Yuval Yarom for supplying a fix (CVE-2014-0076) + [Yuval Yarom and Naomi Benger] + + *) TLS pad extension: draft-agl-tls-padding-03 + + Workaround for the "TLS hang bug" (see FAQ and PR#2771): if the + TLS client Hello record length value would otherwise be > 255 and + less that 512 pad with a dummy extension containing zeroes so it + is at least 512 bytes long. + + [Adam Langley, Steve Henson] + + Changes between 1.0.1e and 1.0.1f [6 Jan 2014] + + *) Fix for TLS record tampering bug. A carefully crafted invalid + handshake could crash OpenSSL with a NULL pointer exception. + Thanks to Anton Johansson for reporting this issues. + (CVE-2013-4353) + + *) Keep original DTLS digest and encryption contexts in retransmission + structures so we can use the previous session parameters if they need + to be resent. (CVE-2013-6450) + [Steve Henson] + + *) Add option SSL_OP_SAFARI_ECDHE_ECDSA_BUG (part of SSL_OP_ALL) which + avoids preferring ECDHE-ECDSA ciphers when the client appears to be + Safari on OS X. Safari on OS X 10.8..10.8.3 advertises support for + several ECDHE-ECDSA ciphers, but fails to negotiate them. The bug + is fixed in OS X 10.8.4, but Apple have ruled out both hot fixing + 10.8..10.8.3 and forcing users to upgrade to 10.8.4 or newer. + [Rob Stradling, Adam Langley] + Changes between 1.0.1d and 1.0.1e [11 Feb 2013] - *) + *) Correct fix for CVE-2013-0169. The original didn't work on AES-NI + supporting platforms or when small records were transferred. + [Andy Polyakov, Steve Henson] Changes between 1.0.1c and 1.0.1d [5 Feb 2013] @@ -404,6 +455,63 @@ Add command line options to s_client/s_server. [Steve Henson] + Changes between 1.0.0j and 1.0.0k [5 Feb 2013] + + *) Make the decoding of SSLv3, TLS and DTLS CBC records constant time. + + This addresses the flaw in CBC record processing discovered by + Nadhem Alfardan and Kenny Paterson. Details of this attack can be found + at: http://www.isg.rhul.ac.uk/tls/ + + Thanks go to Nadhem Alfardan and Kenny Paterson of the Information + Security Group at Royal Holloway, University of London + (www.isg.rhul.ac.uk) for discovering this flaw and Adam Langley and + Emilia Käsper for the initial patch. + (CVE-2013-0169) + [Emilia Käsper, Adam Langley, Ben Laurie, Andy Polyakov, Steve Henson] + + *) Return an error when checking OCSP signatures when key is NULL. + This fixes a DoS attack. (CVE-2013-0166) + [Steve Henson] + + *) Call OCSP Stapling callback after ciphersuite has been chosen, so + the right response is stapled. Also change SSL_get_certificate() + so it returns the certificate actually sent. + See http://rt.openssl.org/Ticket/Display.html?id=2836. + (This is a backport) + [Rob Stradling ] + + *) Fix possible deadlock when decoding public keys. + [Steve Henson] + + Changes between 1.0.0i and 1.0.0j [10 May 2012] + + [NB: OpenSSL 1.0.0i and later 1.0.0 patch levels were released after + OpenSSL 1.0.1.] + + *) Sanity check record length before skipping explicit IV in DTLS + to fix DoS attack. + + Thanks to Codenomicon for discovering this issue using Fuzz-o-Matic + fuzzing as a service testing platform. + (CVE-2012-2333) + [Steve Henson] + + *) Initialise tkeylen properly when encrypting CMS messages. + Thanks to Solar Designer of Openwall for reporting this issue. + [Steve Henson] + + Changes between 1.0.0h and 1.0.0i [19 Apr 2012] + + *) Check for potentially exploitable overflows in asn1_d2i_read_bio + BUF_mem_grow and BUF_mem_grow_clean. Refuse attempts to shrink buffer + in CRYPTO_realloc_clean. + + Thanks to Tavis Ormandy, Google Security Team, for discovering this + issue and to Adam Langley for fixing it. + (CVE-2012-2110) + [Adam Langley (Google), Tavis Ormandy, Google Security Team] + Changes between 1.0.0g and 1.0.0h [12 Mar 2012] *) Fix MMA (Bleichenbacher's attack on PKCS #1 v1.5 RSA padding) weakness @@ -1394,6 +1502,86 @@ *) Change 'Configure' script to enable Camellia by default. [NTT] + Changes between 0.9.8x and 0.9.8y [5 Feb 2013] + + *) Make the decoding of SSLv3, TLS and DTLS CBC records constant time. + + This addresses the flaw in CBC record processing discovered by + Nadhem Alfardan and Kenny Paterson. Details of this attack can be found + at: http://www.isg.rhul.ac.uk/tls/ + + Thanks go to Nadhem Alfardan and Kenny Paterson of the Information + Security Group at Royal Holloway, University of London + (www.isg.rhul.ac.uk) for discovering this flaw and Adam Langley and + Emilia Käsper for the initial patch. + (CVE-2013-0169) + [Emilia Käsper, Adam Langley, Ben Laurie, Andy Polyakov, Steve Henson] + + *) Return an error when checking OCSP signatures when key is NULL. + This fixes a DoS attack. (CVE-2013-0166) + [Steve Henson] + + *) Call OCSP Stapling callback after ciphersuite has been chosen, so + the right response is stapled. Also change SSL_get_certificate() + so it returns the certificate actually sent. + See http://rt.openssl.org/Ticket/Display.html?id=2836. + (This is a backport) + [Rob Stradling ] + + *) Fix possible deadlock when decoding public keys. + [Steve Henson] + + Changes between 0.9.8w and 0.9.8x [10 May 2012] + + *) Sanity check record length before skipping explicit IV in DTLS + to fix DoS attack. + + Thanks to Codenomicon for discovering this issue using Fuzz-o-Matic + fuzzing as a service testing platform. + (CVE-2012-2333) + [Steve Henson] + + *) Initialise tkeylen properly when encrypting CMS messages. + Thanks to Solar Designer of Openwall for reporting this issue. + [Steve Henson] + + Changes between 0.9.8v and 0.9.8w [23 Apr 2012] + + *) The fix for CVE-2012-2110 did not take into account that the + 'len' argument to BUF_MEM_grow and BUF_MEM_grow_clean is an + int in OpenSSL 0.9.8, making it still vulnerable. Fix by + rejecting negative len parameter. (CVE-2012-2131) + [Tomas Hoger ] + + Changes between 0.9.8u and 0.9.8v [19 Apr 2012] + + *) Check for potentially exploitable overflows in asn1_d2i_read_bio + BUF_mem_grow and BUF_mem_grow_clean. Refuse attempts to shrink buffer + in CRYPTO_realloc_clean. + + Thanks to Tavis Ormandy, Google Security Team, for discovering this + issue and to Adam Langley for fixing it. + (CVE-2012-2110) + [Adam Langley (Google), Tavis Ormandy, Google Security Team] + + Changes between 0.9.8t and 0.9.8u [12 Mar 2012] + + *) Fix MMA (Bleichenbacher's attack on PKCS #1 v1.5 RSA padding) weakness + in CMS and PKCS7 code. When RSA decryption fails use a random key for + content decryption and always return the same error. Note: this attack + needs on average 2^20 messages so it only affects automated senders. The + old behaviour can be reenabled in the CMS code by setting the + CMS_DEBUG_DECRYPT flag: this is useful for debugging and testing where + an MMA defence is not necessary. + Thanks to Ivan Nestlerode for discovering + this issue. (CVE-2012-0884) + [Steve Henson] + + *) Fix CVE-2011-4619: make sure we really are receiving a + client hello before rejecting multiple SGC restarts. Thanks to + Ivan Nestlerode for discovering this bug. + [Steve Henson] + Changes between 0.9.8s and 0.9.8t [18 Jan 2012] *) Fix for DTLS DoS issue introduced by fix for CVE-2011-4109. @@ -1401,7 +1589,7 @@ Development, Cisco Systems, Inc. for discovering this bug and preparing a fix. (CVE-2012-0050) [Antonio Martin] - + Changes between 0.9.8r and 0.9.8s [4 Jan 2012] *) Nadhem Alfardan and Kenny Paterson have discovered an extension Modified: stable/10/crypto/openssl/Configure ============================================================================== --- stable/10/crypto/openssl/Configure Thu Apr 10 22:10:29 2014 (r264330) +++ stable/10/crypto/openssl/Configure Thu Apr 10 22:39:22 2014 (r264331) @@ -178,7 +178,7 @@ my %table=( "debug-ben-no-opt", "gcc: -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG -Werror -DL_ENDIAN -DTERMIOS -Wall -g3::(unknown)::::::", "debug-ben-strict", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe::(unknown)::::::", "debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", -"debug-bodo", "gcc:$gcc_devteam_warn -DBN_DEBUG -DBN_DEBUG_RAND -DCONF_DEBUG -DBIO_PAIR_DEBUG -m64 -DL_ENDIAN -DTERMIO -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", +"debug-bodo", "gcc:$gcc_devteam_warn -Wno-error=overlength-strings -DBN_DEBUG -DBN_DEBUG_RAND -DCONF_DEBUG -DBIO_PAIR_DEBUG -m64 -DL_ENDIAN -DTERMIO -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", "debug-ulf", "gcc:-DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG -DBN_DEBUG_RAND -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations:::CYGWIN32:::${no_asm}:win32:cygwin-shared:::.dll", "debug-steve64", "gcc:$gcc_devteam_warn -m64 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -Wno-overlength-strings -g::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-steve32", "gcc:$gcc_devteam_warn -m32 -DL_ENDIAN -DCONF_DEBUG -DDEBUG_SAFESTACK -g -pipe::-D_REENTRANT::-rdynamic -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC:-m32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", @@ -526,7 +526,7 @@ my %table=( # 'perl Configure VC-WIN32' with '-DUNICODE -D_UNICODE' "VC-WIN32","cl:-W3 -Gs0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", # Unified CE target -"debug-VC-WIN32","cl:-W3 -WX -Gs0 -GF -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", +"debug-VC-WIN32","cl:-W3 -Gs0 -GF -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", "VC-CE","cl::::WINCE::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${no_asm}:win32", # Borland C++ 4.5 Modified: stable/10/crypto/openssl/FAQ ============================================================================== --- stable/10/crypto/openssl/FAQ Thu Apr 10 22:10:29 2014 (r264330) +++ stable/10/crypto/openssl/FAQ Thu Apr 10 22:39:22 2014 (r264331) @@ -768,6 +768,9 @@ openssl-security@openssl.org if you don' acknowledging receipt then resend or mail it directly to one of the more active team members (e.g. Steve). +Note that bugs only present in the openssl utility are not in general +considered to be security issues. + [PROG] ======================================================================== * Is OpenSSL thread-safe? Modified: stable/10/crypto/openssl/Makefile ============================================================================== --- stable/10/crypto/openssl/Makefile Thu Apr 10 22:10:29 2014 (r264330) +++ stable/10/crypto/openssl/Makefile Thu Apr 10 22:39:22 2014 (r264331) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.1e +VERSION=1.0.1g MAJOR=1 MINOR=0.1 SHLIB_VERSION_NUMBER=1.0.0 @@ -304,7 +304,8 @@ libcrypto$(SHLIB_EXT): libcrypto.a fips_ FIPSLD_CC="$(CC)"; CC=$(FIPSDIR)/bin/fipsld; \ export CC FIPSLD_CC FIPSLD_LIBCRYPTO; \ fi; \ - $(MAKE) -e SHLIBDIRS=crypto build-shared; \ + $(MAKE) -e SHLIBDIRS=crypto CC="$${CC:-$(CC)}" build-shared && \ + (touch -c fips_premain_dso$(EXE_EXT) || :); \ else \ echo "There's no support for shared libraries on this platform" >&2; \ exit 1; \ Modified: stable/10/crypto/openssl/Makefile.org ============================================================================== --- stable/10/crypto/openssl/Makefile.org Thu Apr 10 22:10:29 2014 (r264330) +++ stable/10/crypto/openssl/Makefile.org Thu Apr 10 22:39:22 2014 (r264331) @@ -302,7 +302,8 @@ libcrypto$(SHLIB_EXT): libcrypto.a fips_ FIPSLD_CC="$(CC)"; CC=$(FIPSDIR)/bin/fipsld; \ export CC FIPSLD_CC FIPSLD_LIBCRYPTO; \ fi; \ - $(MAKE) -e SHLIBDIRS=crypto build-shared; \ + $(MAKE) -e SHLIBDIRS=crypto CC="$${CC:-$(CC)}" build-shared && \ + (touch -c fips_premain_dso$(EXE_EXT) || :); \ else \ echo "There's no support for shared libraries on this platform" >&2; \ exit 1; \ Modified: stable/10/crypto/openssl/NEWS ============================================================================== --- stable/10/crypto/openssl/NEWS Thu Apr 10 22:10:29 2014 (r264330) +++ stable/10/crypto/openssl/NEWS Thu Apr 10 22:39:22 2014 (r264331) @@ -5,11 +5,24 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. - Major changes between OpenSSL 1.0.1d and OpenSSL 1.0.1e: + Major changes between OpenSSL 1.0.1f and OpenSSL 1.0.1g [7 Apr 2014] + + o Fix for CVE-2014-0160 + o Add TLS padding extension workaround for broken servers. + o Fix for CVE-2014-0076 + + Major changes between OpenSSL 1.0.1e and OpenSSL 1.0.1f [6 Jan 2014] + + o Don't include gmt_unix_time in TLS server and client random values + o Fix for TLS record tampering bug CVE-2013-4353 + o Fix for TLS version checking bug CVE-2013-6449 + o Fix for DTLS retransmission bug CVE-2013-6450 + + Major changes between OpenSSL 1.0.1d and OpenSSL 1.0.1e [11 Feb 2013]: o Corrected fix for CVE-2013-0169 - Major changes between OpenSSL 1.0.1c and OpenSSL 1.0.1d: + Major changes between OpenSSL 1.0.1c and OpenSSL 1.0.1d [4 Feb 2013]: o Fix renegotiation in TLS 1.1, 1.2 by using the correct TLS version. o Include the fips configuration module. @@ -17,24 +30,24 @@ o Fix for SSL/TLS/DTLS CBC plaintext recovery attack CVE-2013-0169 o Fix for TLS AESNI record handling flaw CVE-2012-2686 - Major changes between OpenSSL 1.0.1b and OpenSSL 1.0.1c: + Major changes between OpenSSL 1.0.1b and OpenSSL 1.0.1c [10 May 2012]: o Fix TLS/DTLS record length checking bug CVE-2012-2333 o Don't attempt to use non-FIPS composite ciphers in FIPS mode. - Major changes between OpenSSL 1.0.1a and OpenSSL 1.0.1b: + Major changes between OpenSSL 1.0.1a and OpenSSL 1.0.1b [26 Apr 2012]: o Fix compilation error on non-x86 platforms. o Make FIPS capable OpenSSL ciphers work in non-FIPS mode. o Fix SSL_OP_NO_TLSv1_1 clash with SSL_OP_ALL in OpenSSL 1.0.0 - Major changes between OpenSSL 1.0.1 and OpenSSL 1.0.1a: + Major changes between OpenSSL 1.0.1 and OpenSSL 1.0.1a [19 Apr 2012]: o Fix for ASN1 overflow bug CVE-2012-2110 o Workarounds for some servers that hang on long client hellos. o Fix SEGV in AES code. - Major changes between OpenSSL 1.0.0h and OpenSSL 1.0.1: + Major changes between OpenSSL 1.0.0h and OpenSSL 1.0.1 [14 Mar 2012]: o TLS/DTLS heartbeat support. o SCTP support. @@ -47,17 +60,30 @@ o Preliminary FIPS capability for unvalidated 2.0 FIPS module. o SRP support. - Major changes between OpenSSL 1.0.0g and OpenSSL 1.0.0h: + Major changes between OpenSSL 1.0.0j and OpenSSL 1.0.0k [5 Feb 2013]: + + o Fix for SSL/TLS/DTLS CBC plaintext recovery attack CVE-2013-0169 + o Fix OCSP bad key DoS attack CVE-2013-0166 + + Major changes between OpenSSL 1.0.0i and OpenSSL 1.0.0j [10 May 2012]: + + o Fix DTLS record length checking bug CVE-2012-2333 + + Major changes between OpenSSL 1.0.0h and OpenSSL 1.0.0i [19 Apr 2012]: + + o Fix for ASN1 overflow bug CVE-2012-2110 + + Major changes between OpenSSL 1.0.0g and OpenSSL 1.0.0h [12 Mar 2012]: o Fix for CMS/PKCS#7 MMA CVE-2012-0884 o Corrected fix for CVE-2011-4619 o Various DTLS fixes. - Major changes between OpenSSL 1.0.0f and OpenSSL 1.0.0g: + Major changes between OpenSSL 1.0.0f and OpenSSL 1.0.0g [18 Jan 2012]: o Fix for DTLS DoS issue CVE-2012-0050 - Major changes between OpenSSL 1.0.0e and OpenSSL 1.0.0f: + Major changes between OpenSSL 1.0.0e and OpenSSL 1.0.0f [4 Jan 2012]: o Fix for DTLS plaintext recovery attack CVE-2011-4108 o Clear block padding bytes of SSL 3.0 records CVE-2011-4576 @@ -65,7 +91,7 @@ o Check parameters are not NULL in GOST ENGINE CVE-2012-0027 o Check for malformed RFC3779 data CVE-2011-4577 - Major changes between OpenSSL 1.0.0d and OpenSSL 1.0.0e: + Major changes between OpenSSL 1.0.0d and OpenSSL 1.0.0e [6 Sep 2011]: o Fix for CRL vulnerability issue CVE-2011-3207 o Fix for ECDH crashes CVE-2011-3210 @@ -73,11 +99,11 @@ o Support ECDH ciphersuites for certificates using SHA2 algorithms. o Various DTLS fixes. - Major changes between OpenSSL 1.0.0c and OpenSSL 1.0.0d: + Major changes between OpenSSL 1.0.0c and OpenSSL 1.0.0d [8 Feb 2011]: o Fix for security issue CVE-2011-0014 - Major changes between OpenSSL 1.0.0b and OpenSSL 1.0.0c: + Major changes between OpenSSL 1.0.0b and OpenSSL 1.0.0c [2 Dec 2010]: o Fix for security issue CVE-2010-4180 o Fix for CVE-2010-4252 @@ -85,18 +111,18 @@ o Fix various platform compilation issues. o Corrected fix for security issue CVE-2010-3864. - Major changes between OpenSSL 1.0.0a and OpenSSL 1.0.0b: + Major changes between OpenSSL 1.0.0a and OpenSSL 1.0.0b [16 Nov 2010]: o Fix for security issue CVE-2010-3864. o Fix for CVE-2010-2939 o Fix WIN32 build system for GOST ENGINE. - Major changes between OpenSSL 1.0.0 and OpenSSL 1.0.0a: + Major changes between OpenSSL 1.0.0 and OpenSSL 1.0.0a [1 Jun 2010]: o Fix for security issue CVE-2010-1633. o GOST MAC and CFB fixes. - Major changes between OpenSSL 0.9.8n and OpenSSL 1.0.0: + Major changes between OpenSSL 0.9.8n and OpenSSL 1.0.0 [29 Mar 2010]: o RFC3280 path validation: sufficient to process PKITS tests. o Integrated support for PVK files and keyblobs. @@ -119,20 +145,55 @@ o Opaque PRF Input TLS extension support. o Updated time routines to avoid OS limitations. - Major changes between OpenSSL 0.9.8q and OpenSSL 0.9.8r: + Major changes between OpenSSL 0.9.8x and OpenSSL 0.9.8y [5 Feb 2013]: + + o Fix for SSL/TLS/DTLS CBC plaintext recovery attack CVE-2013-0169 + o Fix OCSP bad key DoS attack CVE-2013-0166 + + Major changes between OpenSSL 0.9.8w and OpenSSL 0.9.8x [10 May 2012]: + + o Fix DTLS record length checking bug CVE-2012-2333 + + Major changes between OpenSSL 0.9.8v and OpenSSL 0.9.8w [23 Apr 2012]: + + o Fix for CVE-2012-2131 (corrected fix for 0.9.8 and CVE-2012-2110) + + Major changes between OpenSSL 0.9.8u and OpenSSL 0.9.8v [19 Apr 2012]: + + o Fix for ASN1 overflow bug CVE-2012-2110 + + Major changes between OpenSSL 0.9.8t and OpenSSL 0.9.8u [12 Mar 2012]: + + o Fix for CMS/PKCS#7 MMA CVE-2012-0884 + o Corrected fix for CVE-2011-4619 + o Various DTLS fixes. + + Major changes between OpenSSL 0.9.8s and OpenSSL 0.9.8t [18 Jan 2012]: + + o Fix for DTLS DoS issue CVE-2012-0050 + + Major changes between OpenSSL 0.9.8r and OpenSSL 0.9.8s [4 Jan 2012]: + + o Fix for DTLS plaintext recovery attack CVE-2011-4108 + o Fix policy check double free error CVE-2011-4109 + o Clear block padding bytes of SSL 3.0 records CVE-2011-4576 + o Only allow one SGC handshake restart for SSL/TLS CVE-2011-4619 + o Check for malformed RFC3779 data CVE-2011-4577 + + Major changes between OpenSSL 0.9.8q and OpenSSL 0.9.8r [8 Feb 2011]: o Fix for security issue CVE-2011-0014 - Major changes between OpenSSL 0.9.8p and OpenSSL 0.9.8q: + Major changes between OpenSSL 0.9.8p and OpenSSL 0.9.8q [2 Dec 2010]: o Fix for security issue CVE-2010-4180 o Fix for CVE-2010-4252 - Major changes between OpenSSL 0.9.8o and OpenSSL 0.9.8p: + Major changes between OpenSSL 0.9.8o and OpenSSL 0.9.8p [16 Nov 2010]: o Fix for security issue CVE-2010-3864. - Major changes between OpenSSL 0.9.8n and OpenSSL 0.9.8o: + Major changes between OpenSSL 0.9.8n and OpenSSL 0.9.8o [1 Jun 2010]: o Fix for security issue CVE-2010-0742. o Various DTLS fixes. @@ -140,12 +201,12 @@ o Fix for no-rc4 compilation. o Chil ENGINE unload workaround. - Major changes between OpenSSL 0.9.8m and OpenSSL 0.9.8n: + Major changes between OpenSSL 0.9.8m and OpenSSL 0.9.8n [24 Mar 2010]: o CFB cipher definition fixes. o Fix security issues CVE-2010-0740 and CVE-2010-0433. - Major changes between OpenSSL 0.9.8l and OpenSSL 0.9.8m: + Major changes between OpenSSL 0.9.8l and OpenSSL 0.9.8m [25 Feb 2010]: o Cipher definition fixes. o Workaround for slow RAND_poll() on some WIN32 versions. @@ -157,33 +218,33 @@ o Ticket and SNI coexistence fixes. o Many fixes to DTLS handling. - Major changes between OpenSSL 0.9.8k and OpenSSL 0.9.8l: + Major changes between OpenSSL 0.9.8k and OpenSSL 0.9.8l [5 Nov 2009]: o Temporary work around for CVE-2009-3555: disable renegotiation. - Major changes between OpenSSL 0.9.8j and OpenSSL 0.9.8k: + Major changes between OpenSSL 0.9.8j and OpenSSL 0.9.8k [25 Mar 2009]: o Fix various build issues. o Fix security issues (CVE-2009-0590, CVE-2009-0591, CVE-2009-0789) - Major changes between OpenSSL 0.9.8i and OpenSSL 0.9.8j: + Major changes between OpenSSL 0.9.8i and OpenSSL 0.9.8j [7 Jan 2009]: o Fix security issue (CVE-2008-5077) o Merge FIPS 140-2 branch code. - Major changes between OpenSSL 0.9.8g and OpenSSL 0.9.8h: + Major changes between OpenSSL 0.9.8g and OpenSSL 0.9.8h [28 May 2008]: o CryptoAPI ENGINE support. o Various precautionary measures. o Fix for bugs affecting certificate request creation. o Support for local machine keyset attribute in PKCS#12 files. - Major changes between OpenSSL 0.9.8f and OpenSSL 0.9.8g: + Major changes between OpenSSL 0.9.8f and OpenSSL 0.9.8g [19 Oct 2007]: o Backport of CMS functionality to 0.9.8. o Fixes for bugs introduced with 0.9.8f. - Major changes between OpenSSL 0.9.8e and OpenSSL 0.9.8f: + Major changes between OpenSSL 0.9.8e and OpenSSL 0.9.8f [11 Oct 2007]: o Add gcc 4.2 support. o Add support for AES and SSE2 assembly lanugauge optimization @@ -194,23 +255,23 @@ o RFC4507bis support. o TLS Extensions support. - Major changes between OpenSSL 0.9.8d and OpenSSL 0.9.8e: + Major changes between OpenSSL 0.9.8d and OpenSSL 0.9.8e [23 Feb 2007]: o Various ciphersuite selection fixes. o RFC3779 support. - Major changes between OpenSSL 0.9.8c and OpenSSL 0.9.8d: + Major changes between OpenSSL 0.9.8c and OpenSSL 0.9.8d [28 Sep 2006]: o Introduce limits to prevent malicious key DoS (CVE-2006-2940) o Fix security issues (CVE-2006-2937, CVE-2006-3737, CVE-2006-4343) o Changes to ciphersuite selection algorithm - Major changes between OpenSSL 0.9.8b and OpenSSL 0.9.8c: + Major changes between OpenSSL 0.9.8b and OpenSSL 0.9.8c [5 Sep 2006]: o Fix Daniel Bleichenbacher forged signature attack, CVE-2006-4339 o New cipher Camellia - Major changes between OpenSSL 0.9.8a and OpenSSL 0.9.8b: + Major changes between OpenSSL 0.9.8a and OpenSSL 0.9.8b [4 May 2006]: o Cipher string fixes. o Fixes for VC++ 2005. @@ -220,12 +281,12 @@ o Built in dynamic engine compilation support on Win32. o Fixes auto dynamic engine loading in Win32. - Major changes between OpenSSL 0.9.8 and OpenSSL 0.9.8a: + Major changes between OpenSSL 0.9.8 and OpenSSL 0.9.8a [11 Oct 2005]: o Fix potential SSL 2.0 rollback, CVE-2005-2969 o Extended Windows CE support - Major changes between OpenSSL 0.9.7g and OpenSSL 0.9.8: + Major changes between OpenSSL 0.9.7g and OpenSSL 0.9.8 [5 Jul 2005]: o Major work on the BIGNUM library for higher efficiency and to make operations more streamlined and less contradictory. This @@ -299,36 +360,36 @@ o Added initial support for Win64. o Added alternate pkg-config files. - Major changes between OpenSSL 0.9.7l and OpenSSL 0.9.7m: + Major changes between OpenSSL 0.9.7l and OpenSSL 0.9.7m [23 Feb 2007]: o FIPS 1.1.1 module linking. o Various ciphersuite selection fixes. - Major changes between OpenSSL 0.9.7k and OpenSSL 0.9.7l: + Major changes between OpenSSL 0.9.7k and OpenSSL 0.9.7l [28 Sep 2006]: o Introduce limits to prevent malicious key DoS (CVE-2006-2940) o Fix security issues (CVE-2006-2937, CVE-2006-3737, CVE-2006-4343) - Major changes between OpenSSL 0.9.7j and OpenSSL 0.9.7k: + Major changes between OpenSSL 0.9.7j and OpenSSL 0.9.7k [5 Sep 2006]: o Fix Daniel Bleichenbacher forged signature attack, CVE-2006-4339 - Major changes between OpenSSL 0.9.7i and OpenSSL 0.9.7j: + Major changes between OpenSSL 0.9.7i and OpenSSL 0.9.7j [4 May 2006]: o Visual C++ 2005 fixes. o Update Windows build system for FIPS. - Major changes between OpenSSL 0.9.7h and OpenSSL 0.9.7i: + Major changes between OpenSSL 0.9.7h and OpenSSL 0.9.7i [14 Oct 2005]: o Give EVP_MAX_MD_SIZE it's old value, except for a FIPS build. - Major changes between OpenSSL 0.9.7g and OpenSSL 0.9.7h: + Major changes between OpenSSL 0.9.7g and OpenSSL 0.9.7h [11 Oct 2005]: o Fix SSL 2.0 Rollback, CVE-2005-2969 o Allow use of fixed-length exponent on DSA signing o Default fixed-window RSA, DSA, DH private-key operations - Major changes between OpenSSL 0.9.7f and OpenSSL 0.9.7g: + Major changes between OpenSSL 0.9.7f and OpenSSL 0.9.7g [11 Apr 2005]: o More compilation issues fixed. o Adaptation to more modern Kerberos API. @@ -337,7 +398,7 @@ o More constification. o Added processing of proxy certificates (RFC 3820). - Major changes between OpenSSL 0.9.7e and OpenSSL 0.9.7f: + Major changes between OpenSSL 0.9.7e and OpenSSL 0.9.7f [22 Mar 2005]: o Several compilation issues fixed. o Many memory allocation failure checks added. @@ -345,12 +406,12 @@ o Mandatory basic checks on certificates. o Performance improvements. - Major changes between OpenSSL 0.9.7d and OpenSSL 0.9.7e: + Major changes between OpenSSL 0.9.7d and OpenSSL 0.9.7e [25 Oct 2004]: o Fix race condition in CRL checking code. o Fixes to PKCS#7 (S/MIME) code. - Major changes between OpenSSL 0.9.7c and OpenSSL 0.9.7d: + Major changes between OpenSSL 0.9.7c and OpenSSL 0.9.7d [17 Mar 2004]: o Security: Fix Kerberos ciphersuite SSL/TLS handshaking bug o Security: Fix null-pointer assignment in do_change_cipher_spec() @@ -358,14 +419,14 @@ o Multiple X509 verification fixes o Speed up HMAC and other operations - Major changes between OpenSSL 0.9.7b and OpenSSL 0.9.7c: + Major changes between OpenSSL 0.9.7b and OpenSSL 0.9.7c [30 Sep 2003]: o Security: fix various ASN1 parsing bugs. o New -ignore_err option to OCSP utility. o Various interop and bug fixes in S/MIME code. o SSL/TLS protocol fix for unrequested client certificates. - Major changes between OpenSSL 0.9.7a and OpenSSL 0.9.7b: + Major changes between OpenSSL 0.9.7a and OpenSSL 0.9.7b [10 Apr 2003]: o Security: counter the Klima-Pokorny-Rosa extension of Bleichbacher's attack @@ -376,7 +437,7 @@ o ASN.1: treat domainComponent correctly. o Documentation: fixes and additions. - Major changes between OpenSSL 0.9.7 and OpenSSL 0.9.7a: + Major changes between OpenSSL 0.9.7 and OpenSSL 0.9.7a [19 Feb 2003]: o Security: Important security related bugfixes. o Enhanced compatibility with MIT Kerberos. @@ -387,7 +448,7 @@ o SSL/TLS: now handles manual certificate chain building. o SSL/TLS: certain session ID malfunctions corrected. - Major changes between OpenSSL 0.9.6 and OpenSSL 0.9.7: + Major changes between OpenSSL 0.9.6 and OpenSSL 0.9.7 [30 Dec 2002]: o New library section OCSP. o Complete rewrite of ASN1 code. @@ -433,23 +494,23 @@ o SSL/TLS: add callback to retrieve SSL/TLS messages. o SSL/TLS: support AES cipher suites (RFC3268). - Major changes between OpenSSL 0.9.6j and OpenSSL 0.9.6k: + Major changes between OpenSSL 0.9.6j and OpenSSL 0.9.6k [30 Sep 2003]: o Security: fix various ASN1 parsing bugs. o SSL/TLS protocol fix for unrequested client certificates. - Major changes between OpenSSL 0.9.6i and OpenSSL 0.9.6j: + Major changes between OpenSSL 0.9.6i and OpenSSL 0.9.6j [10 Apr 2003]: o Security: counter the Klima-Pokorny-Rosa extension of Bleichbacher's attack o Security: make RSA blinding default. o Build: shared library support fixes. - Major changes between OpenSSL 0.9.6h and OpenSSL 0.9.6i: + Major changes between OpenSSL 0.9.6h and OpenSSL 0.9.6i [19 Feb 2003]: o Important security related bugfixes. - Major changes between OpenSSL 0.9.6g and OpenSSL 0.9.6h: + Major changes between OpenSSL 0.9.6g and OpenSSL 0.9.6h [5 Dec 2002]: o New configuration targets for Tandem OSS and A/UX. o New OIDs for Microsoft attributes. @@ -463,25 +524,25 @@ o Fixes for smaller building problems. o Updates of manuals, FAQ and other instructive documents. - Major changes between OpenSSL 0.9.6f and OpenSSL 0.9.6g: + Major changes between OpenSSL 0.9.6f and OpenSSL 0.9.6g [9 Aug 2002]: o Important building fixes on Unix. - Major changes between OpenSSL 0.9.6e and OpenSSL 0.9.6f: + Major changes between OpenSSL 0.9.6e and OpenSSL 0.9.6f [8 Aug 2002]: o Various important bugfixes. - Major changes between OpenSSL 0.9.6d and OpenSSL 0.9.6e: + Major changes between OpenSSL 0.9.6d and OpenSSL 0.9.6e [30 Jul 2002]: o Important security related bugfixes. o Various SSL/TLS library bugfixes. - Major changes between OpenSSL 0.9.6c and OpenSSL 0.9.6d: + Major changes between OpenSSL 0.9.6c and OpenSSL 0.9.6d [9 May 2002]: o Various SSL/TLS library bugfixes. o Fix DH parameter generation for 'non-standard' generators. - Major changes between OpenSSL 0.9.6b and OpenSSL 0.9.6c: + Major changes between OpenSSL 0.9.6b and OpenSSL 0.9.6c [21 Dec 2001]: o Various SSL/TLS library bugfixes. o BIGNUM library fixes. @@ -494,7 +555,7 @@ Broadcom and Cryptographic Appliance's keyserver [in 0.9.6c-engine release]. - Major changes between OpenSSL 0.9.6a and OpenSSL 0.9.6b: + Major changes between OpenSSL 0.9.6a and OpenSSL 0.9.6b [9 Jul 2001]: o Security fix: PRNG improvements. o Security fix: RSA OAEP check. @@ -511,7 +572,7 @@ o Increase default size for BIO buffering filter. o Compatibility fixes in some scripts. - Major changes between OpenSSL 0.9.6 and OpenSSL 0.9.6a: + Major changes between OpenSSL 0.9.6 and OpenSSL 0.9.6a [5 Apr 2001]: o Security fix: change behavior of OpenSSL to avoid using environment variables when running as root. @@ -536,7 +597,7 @@ o New function BN_rand_range(). o Add "-rand" option to openssl s_client and s_server. - Major changes between OpenSSL 0.9.5a and OpenSSL 0.9.6: + Major changes between OpenSSL 0.9.5a and OpenSSL 0.9.6 [10 Oct 2000]: o Some documentation for BIO and SSL libraries. o Enhanced chain verification using key identifiers. @@ -551,7 +612,7 @@ [1] The support for external crypto devices is currently a separate distribution. See the file README.ENGINE. - Major changes between OpenSSL 0.9.5 and OpenSSL 0.9.5a: + Major changes between OpenSSL 0.9.5 and OpenSSL 0.9.5a [1 Apr 2000]: o Bug fixes for Win32, SuSE Linux, NeXTSTEP and FreeBSD 2.2.8 o Shared library support for HPUX and Solaris-gcc @@ -560,7 +621,7 @@ o New 'rand' application o New way to check for existence of algorithms from scripts - Major changes between OpenSSL 0.9.4 and OpenSSL 0.9.5: + Major changes between OpenSSL 0.9.4 and OpenSSL 0.9.5 [25 May 2000]: o S/MIME support in new 'smime' command o Documentation for the OpenSSL command line application @@ -596,7 +657,7 @@ o Enhanced support for Alpha Linux o Experimental MacOS support - Major changes between OpenSSL 0.9.3 and OpenSSL 0.9.4: + Major changes between OpenSSL 0.9.3 and OpenSSL 0.9.4 [9 Aug 1999]: o Transparent support for PKCS#8 format private keys: these are used by several software packages and are more secure than the standard @@ -607,7 +668,7 @@ o New pipe-like BIO that allows using the SSL library when actual I/O must be handled by the application (BIO pair) - Major changes between OpenSSL 0.9.2b and OpenSSL 0.9.3: + Major changes between OpenSSL 0.9.2b and OpenSSL 0.9.3 [24 May 1999]: o Lots of enhancements and cleanups to the Configuration mechanism o RSA OEAP related fixes o Added `openssl ca -revoke' option for revoking a certificate @@ -621,7 +682,7 @@ o Sparc assembler bignum implementation, optimized hash functions o Option to disable selected ciphers - Major changes between OpenSSL 0.9.1c and OpenSSL 0.9.2b: + Major changes between OpenSSL 0.9.1c and OpenSSL 0.9.2b [22 Mar 1999]: o Fixed a security hole related to session resumption o Fixed RSA encryption routines for the p < q case o "ALL" in cipher lists now means "everything except NULL ciphers" @@ -643,7 +704,7 @@ o Lots of memory leak fixes. o Lots of bug fixes. - Major changes between SSLeay 0.9.0b and OpenSSL 0.9.1c: + Major changes between SSLeay 0.9.0b and OpenSSL 0.9.1c [23 Dec 1998]: o Integration of the popular NO_RSA/NO_DSA patches o Initial support for compression inside the SSL record layer o Added BIO proxy and filtering functionality Modified: stable/10/crypto/openssl/README ============================================================================== --- stable/10/crypto/openssl/README Thu Apr 10 22:10:29 2014 (r264330) +++ stable/10/crypto/openssl/README Thu Apr 10 22:39:22 2014 (r264331) @@ -1,5 +1,5 @@ - OpenSSL 1.0.1e 11 Feb 2013 + OpenSSL 1.0.1g 7 Apr 2014 Copyright (c) 1998-2011 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: stable/10/crypto/openssl/apps/Makefile ============================================================================== --- stable/10/crypto/openssl/apps/Makefile Thu Apr 10 22:10:29 2014 (r264330) +++ stable/10/crypto/openssl/apps/Makefile Thu Apr 10 22:39:22 2014 (r264331) @@ -577,14 +577,15 @@ openssl.o: ../include/openssl/objects.h openssl.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h openssl.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h openssl.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -openssl.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h -openssl.o: ../include/openssl/sha.h ../include/openssl/srtp.h -openssl.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -openssl.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h -openssl.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -openssl.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h -openssl.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -openssl.o: ../include/openssl/x509v3.h apps.h openssl.c progs.h s_apps.h +openssl.o: ../include/openssl/pqueue.h ../include/openssl/rand.h +openssl.o: ../include/openssl/safestack.h ../include/openssl/sha.h +openssl.o: ../include/openssl/srtp.h ../include/openssl/ssl.h +openssl.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +openssl.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +openssl.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +openssl.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +openssl.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h +openssl.o: openssl.c progs.h s_apps.h passwd.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h passwd.o: ../include/openssl/buffer.h ../include/openssl/conf.h passwd.o: ../include/openssl/crypto.h ../include/openssl/des.h Modified: stable/10/crypto/openssl/apps/apps.c ============================================================================== --- stable/10/crypto/openssl/apps/apps.c Thu Apr 10 22:10:29 2014 (r264330) +++ stable/10/crypto/openssl/apps/apps.c Thu Apr 10 22:39:22 2014 (r264331) @@ -586,12 +586,12 @@ int password_callback(char *buf, int buf if (ok >= 0) ok = UI_add_input_string(ui,prompt,ui_flags,buf, - PW_MIN_LENGTH,BUFSIZ-1); + PW_MIN_LENGTH,bufsiz-1); if (ok >= 0 && verify) { buff = (char *)OPENSSL_malloc(bufsiz); ok = UI_add_verify_string(ui,prompt,ui_flags,buff, - PW_MIN_LENGTH,BUFSIZ-1, buf); + PW_MIN_LENGTH,bufsiz-1, buf); } if (ok >= 0) do @@ -2841,7 +2841,7 @@ double app_tminterval(int stop,int usert if (proc==NULL) { - if (GetVersion() < 0x80000000) + if (check_winnt()) proc = OpenProcess(PROCESS_QUERY_INFORMATION,FALSE, GetCurrentProcessId()); if (proc==NULL) proc = (HANDLE)-1; Modified: stable/10/crypto/openssl/apps/apps.h ============================================================================== --- stable/10/crypto/openssl/apps/apps.h Thu Apr 10 22:10:29 2014 (r264330) +++ stable/10/crypto/openssl/apps/apps.h Thu Apr 10 22:39:22 2014 (r264331) @@ -188,6 +188,7 @@ extern BIO *bio_err; do { CONF_modules_unload(1); destroy_ui_method(); \ OBJ_cleanup(); EVP_cleanup(); ENGINE_cleanup(); \ CRYPTO_cleanup_all_ex_data(); ERR_remove_thread_state(NULL); \ + RAND_cleanup(); \ ERR_free_strings(); zlib_cleanup();} while(0) # else # define apps_startup() \ @@ -198,6 +199,7 @@ extern BIO *bio_err; do { CONF_modules_unload(1); destroy_ui_method(); \ OBJ_cleanup(); EVP_cleanup(); \ CRYPTO_cleanup_all_ex_data(); ERR_remove_thread_state(NULL); \ + RAND_cleanup(); \ ERR_free_strings(); zlib_cleanup(); } while(0) # endif #endif Modified: stable/10/crypto/openssl/apps/crl.c ============================================================================== --- stable/10/crypto/openssl/apps/crl.c Thu Apr 10 22:10:29 2014 (r264330) +++ stable/10/crypto/openssl/apps/crl.c Thu Apr 10 22:39:22 2014 (r264331) @@ -81,6 +81,9 @@ static const char *crl_usage[]={ " -in arg - input file - default stdin\n", " -out arg - output file - default stdout\n", " -hash - print hash value\n", +#ifndef OPENSSL_NO_MD5 +" -hash_old - print old-style (MD5) hash value\n", +#endif " -fingerprint - print the crl fingerprint\n", " -issuer - print issuer DN\n", " -lastupdate - lastUpdate field\n", @@ -108,6 +111,9 @@ int MAIN(int argc, char **argv) int informat,outformat; char *infile=NULL,*outfile=NULL; int hash=0,issuer=0,lastupdate=0,nextupdate=0,noout=0,text=0; +#ifndef OPENSSL_NO_MD5 + int hash_old=0; +#endif int fingerprint = 0, crlnumber = 0; const char **pp; X509_STORE *store = NULL; @@ -192,6 +198,10 @@ int MAIN(int argc, char **argv) text = 1; else if (strcmp(*argv,"-hash") == 0) hash= ++num; +#ifndef OPENSSL_NO_MD5 + else if (strcmp(*argv,"-hash_old") == 0) + hash_old= ++num; +#endif else if (strcmp(*argv,"-nameopt") == 0) { if (--argc < 1) goto bad; @@ -304,6 +314,14 @@ bad: BIO_printf(bio_out,"%08lx\n", X509_NAME_hash(X509_CRL_get_issuer(x))); } +#ifndef OPENSSL_NO_MD5 + if (hash_old == i) + { + BIO_printf(bio_out,"%08lx\n", + X509_NAME_hash_old( + X509_CRL_get_issuer(x))); + } +#endif if (lastupdate == i) { BIO_printf(bio_out,"lastUpdate="); Modified: stable/10/crypto/openssl/apps/dgst.c ============================================================================== --- stable/10/crypto/openssl/apps/dgst.c Thu Apr 10 22:10:29 2014 (r264330) +++ stable/10/crypto/openssl/apps/dgst.c Thu Apr 10 22:39:22 2014 (r264331) @@ -427,9 +427,9 @@ int MAIN(int argc, char **argv) goto end; } if (do_verify) - r = EVP_DigestVerifyInit(mctx, &pctx, md, e, sigkey); + r = EVP_DigestVerifyInit(mctx, &pctx, md, NULL, sigkey); else - r = EVP_DigestSignInit(mctx, &pctx, md, e, sigkey); + r = EVP_DigestSignInit(mctx, &pctx, md, NULL, sigkey); if (!r) { BIO_printf(bio_err, "Error setting context\n"); Modified: stable/10/crypto/openssl/apps/ecparam.c ============================================================================== --- stable/10/crypto/openssl/apps/ecparam.c Thu Apr 10 22:10:29 2014 (r264330) +++ stable/10/crypto/openssl/apps/ecparam.c Thu Apr 10 22:39:22 2014 (r264331) @@ -105,7 +105,7 @@ * in the asn1 der encoding * possible values: named_curve (default) * explicit - * -no_seed - if 'explicit' parameters are choosen do not use the seed + * -no_seed - if 'explicit' parameters are chosen do not use the seed * -genkey - generate ec key * -rand file - files to use for random number input * -engine e - use engine e, possibly a hardware device @@ -286,7 +286,7 @@ bad: BIO_printf(bio_err, " " " explicit\n"); BIO_printf(bio_err, " -no_seed if 'explicit'" - " parameters are choosen do not" + " parameters are chosen do not" " use the seed\n"); BIO_printf(bio_err, " -genkey generate ec" " key\n"); Modified: stable/10/crypto/openssl/apps/openssl.c ============================================================================== --- stable/10/crypto/openssl/apps/openssl.c Thu Apr 10 22:10:29 2014 (r264330) +++ stable/10/crypto/openssl/apps/openssl.c Thu Apr 10 22:39:22 2014 (r264331) @@ -117,6 +117,7 @@ #include "apps.h" #include #include +#include #include #include #include Modified: stable/10/crypto/openssl/apps/pkcs12.c ============================================================================== --- stable/10/crypto/openssl/apps/pkcs12.c Thu Apr 10 22:10:29 2014 (r264330) +++ stable/10/crypto/openssl/apps/pkcs12.c Thu Apr 10 22:39:22 2014 (r264331) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Fri Apr 11 01:00:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66493D81; Fri, 11 Apr 2014 01:00:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5181A19DC; Fri, 11 Apr 2014 01:00:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3B10q0o035795; Fri, 11 Apr 2014 01:00:52 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3B10pQv035793; Fri, 11 Apr 2014 01:00:51 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201404110100.s3B10pQv035793@svn.freebsd.org> From: Bryan Drewery Date: Fri, 11 Apr 2014 01:00:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264332 - stable/10/usr.bin/kdump X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Apr 2014 01:00:52 -0000 Author: bdrewery Date: Fri Apr 11 01:00:51 2014 New Revision: 264332 URL: http://svnweb.freebsd.org/changeset/base/264332 Log: MFC r263879: Add `-S' to display syscall numbers in the output as well. Modified: stable/10/usr.bin/kdump/kdump.1 stable/10/usr.bin/kdump/kdump.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/kdump/kdump.1 ============================================================================== --- stable/10/usr.bin/kdump/kdump.1 Thu Apr 10 22:39:22 2014 (r264331) +++ stable/10/usr.bin/kdump/kdump.1 Fri Apr 11 01:00:51 2014 (r264332) @@ -28,7 +28,7 @@ .\" @(#)kdump.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd June 4, 2012 +.Dd March 28, 2014 .Dt KDUMP 1 .Os .Sh NAME @@ -36,7 +36,7 @@ .Nd display kernel trace data .Sh SYNOPSIS .Nm -.Op Fl dEnlHRsTA +.Op Fl dEnlHRSsTA .Op Fl f Ar trfile .Op Fl m Ar maxdata .Op Fl p Ar pid @@ -95,6 +95,8 @@ Display relative timestamps (time since .It Fl r When decoding STRU records, display structure members such as UIDs, GIDs, dates etc. symbolically instead of numerically. +.It Fl S +Display system call numbers. .It Fl s Suppress display of I/O data. .It Fl T Modified: stable/10/usr.bin/kdump/kdump.c ============================================================================== --- stable/10/usr.bin/kdump/kdump.c Thu Apr 10 22:39:22 2014 (r264331) +++ stable/10/usr.bin/kdump/kdump.c Fri Apr 11 01:00:51 2014 (r264332) @@ -116,7 +116,7 @@ void usage(void); void ioctlname(unsigned long, int); int timestamp, decimal, fancy = 1, suppressdata, tail, threads, maxdata, - resolv = 0, abiflag = 0; + resolv = 0, abiflag = 0, syscallno = 0; const char *tracefile = DEF_TRACEFILE; struct ktr_header ktr_header; @@ -204,7 +204,7 @@ main(int argc, char *argv[]) setlocale(LC_CTYPE, ""); - while ((ch = getopt(argc,argv,"f:dElm:np:AHRrsTt:")) != -1) + while ((ch = getopt(argc,argv,"f:dElm:np:AHRrSsTt:")) != -1) switch (ch) { case 'A': abiflag = 1; @@ -230,6 +230,9 @@ main(int argc, char *argv[]) case 'r': resolv = 1; break; + case 'S': + syscallno = 1; + break; case 's': suppressdata = 1; break; @@ -600,8 +603,11 @@ ktrsyscall(struct ktr_syscall *ktr, u_in if ((flags != 0 && ((flags & SV_ABI_MASK) != SV_ABI_FREEBSD)) || (ktr->ktr_code >= nsyscalls || ktr->ktr_code < 0)) printf("[%d]", ktr->ktr_code); - else + else { printf("%s", syscallnames[ktr->ktr_code]); + if (syscallno) + printf("[%d]", ktr->ktr_code); + } ip = &ktr->ktr_args[0]; if (narg) { char c = '('; @@ -1193,8 +1199,12 @@ ktrsysret(struct ktr_sysret *ktr, u_int if ((flags != 0 && ((flags & SV_ABI_MASK) != SV_ABI_FREEBSD)) || (code >= nsyscalls || code < 0)) printf("[%d] ", code); - else - printf("%s ", syscallnames[code]); + else { + printf("%s", syscallnames[code]); + if (syscallno) + printf("[%d]", code); + printf(" "); + } if (error == 0) { if (fancy) { @@ -1840,8 +1850,11 @@ linux_ktrsyscall(struct ktr_syscall *ktr if (ktr->ktr_code >= nlinux_syscalls || ktr->ktr_code < 0) printf("[%d]", ktr->ktr_code); - else + else { printf("%s", linux_syscallnames[ktr->ktr_code]); + if (syscallno) + printf("[%d]", ktr->ktr_code); + } ip = &ktr->ktr_args[0]; if (narg) { char c = '('; @@ -1861,8 +1874,12 @@ linux_ktrsysret(struct ktr_sysret *ktr) if (code >= nlinux_syscalls || code < 0) printf("[%d] ", code); - else - printf("%s ", linux_syscallnames[code]); + else { + printf("%s", linux_syscallnames[code]); + if (syscallno) + printf("[%d]", code); + printf(" "); + } if (error == 0) { if (fancy) { @@ -1895,7 +1912,7 @@ linux_ktrsysret(struct ktr_sysret *ktr) void usage(void) { - fprintf(stderr, "usage: kdump [-dEnlHRrsTA] [-f trfile] " + fprintf(stderr, "usage: kdump [-dEnlHRrSsTA] [-f trfile] " "[-m maxdata] [-p pid] [-t trstr]\n"); exit(1); } From owner-svn-src-stable@FreeBSD.ORG Fri Apr 11 01:04:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B17F54C2; Fri, 11 Apr 2014 01:04:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C63A1A86; Fri, 11 Apr 2014 01:04:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3B148fI039164; Fri, 11 Apr 2014 01:04:08 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3B148Pd039161; Fri, 11 Apr 2014 01:04:08 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201404110104.s3B148Pd039161@svn.freebsd.org> From: Bryan Drewery Date: Fri, 11 Apr 2014 01:04:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264333 - stable/9/usr.bin/kdump X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Apr 2014 01:04:08 -0000 Author: bdrewery Date: Fri Apr 11 01:04:07 2014 New Revision: 264333 URL: http://svnweb.freebsd.org/changeset/base/264333 Log: MFC r263879: Add `-S' to display syscall numbers in the output as well. Modified: stable/9/usr.bin/kdump/kdump.1 stable/9/usr.bin/kdump/kdump.c Directory Properties: stable/9/usr.bin/kdump/ (props changed) Modified: stable/9/usr.bin/kdump/kdump.1 ============================================================================== --- stable/9/usr.bin/kdump/kdump.1 Fri Apr 11 01:00:51 2014 (r264332) +++ stable/9/usr.bin/kdump/kdump.1 Fri Apr 11 01:04:07 2014 (r264333) @@ -28,7 +28,7 @@ .\" @(#)kdump.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd June 4, 2012 +.Dd March 28, 2014 .Dt KDUMP 1 .Os .Sh NAME @@ -36,7 +36,7 @@ .Nd display kernel trace data .Sh SYNOPSIS .Nm -.Op Fl dEnlHRsTA +.Op Fl dEnlHRSsTA .Op Fl f Ar trfile .Op Fl m Ar maxdata .Op Fl p Ar pid @@ -95,6 +95,8 @@ Display relative timestamps (time since .It Fl r When decoding STRU records, display structure members such as UIDs, GIDs, dates etc. symbolically instead of numerically. +.It Fl S +Display system call numbers. .It Fl s Suppress display of I/O data. .It Fl T Modified: stable/9/usr.bin/kdump/kdump.c ============================================================================== --- stable/9/usr.bin/kdump/kdump.c Fri Apr 11 01:00:51 2014 (r264332) +++ stable/9/usr.bin/kdump/kdump.c Fri Apr 11 01:04:07 2014 (r264333) @@ -109,7 +109,7 @@ void usage(void); void ioctlname(unsigned long, int); int timestamp, decimal, fancy = 1, suppressdata, tail, threads, maxdata, - resolv = 0, abiflag = 0; + resolv = 0, abiflag = 0, syscallno = 0; const char *tracefile = DEF_TRACEFILE; struct ktr_header ktr_header; @@ -172,7 +172,7 @@ main(int argc, char *argv[]) setlocale(LC_CTYPE, ""); - while ((ch = getopt(argc,argv,"f:dElm:np:AHRrsTt:")) != -1) + while ((ch = getopt(argc,argv,"f:dElm:np:AHRrSsTt:")) != -1) switch (ch) { case 'A': abiflag = 1; @@ -198,6 +198,9 @@ main(int argc, char *argv[]) case 'r': resolv = 1; break; + case 'S': + syscallno = 1; + break; case 's': suppressdata = 1; break; @@ -515,8 +518,11 @@ ktrsyscall(struct ktr_syscall *ktr, u_in if ((flags != 0 && ((flags & SV_ABI_MASK) != SV_ABI_FREEBSD)) || (ktr->ktr_code >= nsyscalls || ktr->ktr_code < 0)) printf("[%d]", ktr->ktr_code); - else + else { printf("%s", syscallnames[ktr->ktr_code]); + if (syscallno) + printf("[%d]", ktr->ktr_code); + } ip = &ktr->ktr_args[0]; if (narg) { char c = '('; @@ -1063,8 +1069,12 @@ ktrsysret(struct ktr_sysret *ktr, u_int if ((flags != 0 && ((flags & SV_ABI_MASK) != SV_ABI_FREEBSD)) || (code >= nsyscalls || code < 0)) printf("[%d] ", code); - else - printf("%s ", syscallnames[code]); + else { + printf("%s", syscallnames[code]); + if (syscallno) + printf("[%d]", code); + printf(" "); + } if (error == 0) { if (fancy) { @@ -1651,8 +1661,11 @@ linux_ktrsyscall(struct ktr_syscall *ktr if (ktr->ktr_code >= nlinux_syscalls || ktr->ktr_code < 0) printf("[%d]", ktr->ktr_code); - else + else { printf("%s", linux_syscallnames[ktr->ktr_code]); + if (syscallno) + printf("[%d]", ktr->ktr_code); + } ip = &ktr->ktr_args[0]; if (narg) { char c = '('; @@ -1672,8 +1685,12 @@ linux_ktrsysret(struct ktr_sysret *ktr) if (code >= nlinux_syscalls || code < 0) printf("[%d] ", code); - else - printf("%s ", linux_syscallnames[code]); + else { + printf("%s", linux_syscallnames[code]); + if (syscallno) + printf("[%d]", code); + printf(" "); + } if (error == 0) { if (fancy) { @@ -1706,7 +1723,7 @@ linux_ktrsysret(struct ktr_sysret *ktr) void usage(void) { - fprintf(stderr, "usage: kdump [-dEnlHRrsTA] [-f trfile] " + fprintf(stderr, "usage: kdump [-dEnlHRrSsTA] [-f trfile] " "[-m maxdata] [-p pid] [-t trstr]\n"); exit(1); } From owner-svn-src-stable@FreeBSD.ORG Fri Apr 11 01:23:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E0455DA8; Fri, 11 Apr 2014 01:23:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA2B51C60; Fri, 11 Apr 2014 01:23:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3B1NlYC047355; Fri, 11 Apr 2014 01:23:47 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3B1NlEF047350; Fri, 11 Apr 2014 01:23:47 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201404110123.s3B1NlEF047350@svn.freebsd.org> From: Xin LI Date: Fri, 11 Apr 2014 01:23:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264334 - in stable/10/cddl/contrib/opensolaris/cmd: zdb zfs zpool X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Apr 2014 01:23:48 -0000 Author: delphij Date: Fri Apr 11 01:23:46 2014 New Revision: 264334 URL: http://svnweb.freebsd.org/changeset/base/264334 Log: MFC r263459: MFV 263436-263438: 3947 zpool(1M) references nonexistent zfs-features(5) 4540 zpool(1M) man page doesn't describe "readonly" property 3948 zfs sync=default is not accepted 4611 zfs(1M) still mentions 'send -r' in synopsis 4415 zpool(1M) man page missing "import -m" description 4570 Document dedupditto pool property 4572 Dedup-related documentation additions for zpool and zdb. 1371 Add -D option description to zpool(1M) manpage 4571 Add documentation for -T and interval to "zpool list" Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.8 stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.8 ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Fri Apr 11 01:04:07 2014 (r264333) +++ stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Fri Apr 11 01:23:46 2014 (r264334) @@ -19,7 +19,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 31, 2013 +.Dd March 20, 2014 .Dt ZDB 8 .Os .Sh NAME @@ -127,6 +127,12 @@ compression ratio (compress), inflation If specified twice, display a histogram of deduplication statistics, showing the allocated (physically present on disk) and referenced (logically referenced in the pool) block counts and sizes by reference count. +.Pp +If specified a third time, display the statistics independently for each deduplication table. +.Pp +If specified a fourth time, dump the contents of the deduplication tables describing duplicate blocks. +.Pp +If specified a fifth time, also dump the contents of the deduplication tables describing unique blocks. .It Fl h Display pool history similar to .Cm zpool history , Modified: stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Fri Apr 11 01:04:07 2014 (r264333) +++ stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Fri Apr 11 01:23:46 2014 (r264334) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 2, 2014 +.Dd March 20, 2014 .Dt ZFS 8 .Os .Sh NAME @@ -1335,10 +1335,21 @@ features being supported, the new file s these properties. .Bl -tag -width 4n .It Sy casesensitivity Ns = Ns Cm sensitive | insensitive | mixed +Indicates whether the file name matching algorithm used by the file system +should be case-sensitive, case-insensitive, or allow a combination of both +styles of matching. The default value for the +.Sy casesensitivity +property is +.Cm sensitive . +Traditionally, UNIX and POSIX file systems have case-sensitive file names. +.Pp The +.Cm mixed +value for the .Sy casesensitivity -property is currently not supported on -.Fx . +property indicates that the +file system can support requests for both case-sensitive and case-insensitive +matching behavior. .It Sy normalization Ns = Ns Cm none | formC | formD | formKC | formKD Indicates whether the file system should perform a .Sy unicode Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Fri Apr 11 01:04:07 2014 (r264333) +++ stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Fri Apr 11 01:23:46 2014 (r264334) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 31, 2013 +.Dd March 20, 2014 .Dt ZPOOL 8 .Os .Sh NAME @@ -624,6 +624,9 @@ Datasets of this pool can only be mounte .It To write to a read-only pool, a export and import of the pool is required. .El +.Pp +This property can also be referred to by its shortened column name, +.Sy rdonly . .El .Pp The following properties can be set at creation time and import time, and later @@ -682,7 +685,9 @@ property. Threshold for the number of block ditto copies. If the reference count for a deduplicated block increases above this number, a new ditto copy of this block is automatically stored. Default setting is -.Cm 0 . +.Cm 0 +which causes no ditto copies to be created for deduplicated blocks. +The miniumum legal nonzero setting is 100. .It Sy delegation Ns = Ns Cm on No | Cm off Controls whether a non-privileged user is granted access based on the dataset permissions defined on the dataset. See @@ -1152,9 +1157,10 @@ option is also required. .It Fl f Forces import, even if the pool appears to be potentially active. .It Fl m -Enables import with missing log devices. +Allows a pool to import when there is a missing log device. Recent transactions +can be lost because the log device will be discarded. .It Fl N -Do not mount any filesystems from the imported pool. +Import the pool without mounting any file systems. .It Fl R Ar root Sets the .Qq Sy cachefile @@ -1245,9 +1251,10 @@ option is also required. .It Fl f Forces import, even if the pool appears to be potentially active. .It Fl m -Enables import with missing log devices. +Allows a pool to import when there is a missing log device. Recent transactions +can be lost because the log device will be discarded. .It Fl N -Do not mount any filesystems from the imported pool. +Import the pool without mounting any file systems. .It Fl R Ar root Equivalent to .Qq Fl o Cm cachefile=none,altroot= Ns Pa root @@ -1336,8 +1343,9 @@ Treat exported or foreign devices as ina .Op Ar inverval Op Ar count .Xc .Pp -Lists the given pools along with a health status and space usage. When given no -arguments, all pools in the system are listed. +Lists the given pools along with a health status and space usage. If no +.Ar pools +are specified, all pools in the system are listed. .Pp When given an interval, the output is printed every .Ar interval @@ -1349,6 +1357,17 @@ is specified, the command exits after .Ar count reports are printed. .Bl -tag -width indent +.It Fl T Cm d Ns | Ns Cm u +Print a timestamp. +.Pp +Use modifier +.Cm d +for standard date format. See +.Xr date 1 . +Use modifier +.Cm u +for unixtime +.Pq equals Qq Ic date +%s . .It Fl H Scripted mode. Do not display headers, and separate fields by a single tab instead of arbitrary space. @@ -1677,7 +1696,7 @@ Once this is done, the pool will no long not support feature flags. See .Xr zpool-features 7 -for details on compatability with system sthat support feature flags, but do +for details on compatibility with systems that support feature flags, but do not support all features enabled on the pool. .Bl -tag -width indent .It Fl a From owner-svn-src-stable@FreeBSD.ORG Fri Apr 11 01:27:35 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53D49F9A; Fri, 11 Apr 2014 01:27:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33AA41C98; Fri, 11 Apr 2014 01:27:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3B1RZXn047853; Fri, 11 Apr 2014 01:27:35 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3B1RYSo047848; Fri, 11 Apr 2014 01:27:34 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201404110127.s3B1RYSo047848@svn.freebsd.org> From: Xin LI Date: Fri, 11 Apr 2014 01:27:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264335 - in stable/10/cddl/contrib/opensolaris: cmd/zpool lib/libzfs/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Apr 2014 01:27:35 -0000 Author: delphij Date: Fri Apr 11 01:27:33 2014 New Revision: 264335 URL: http://svnweb.freebsd.org/changeset/base/264335 Log: MFC r263889 (MFV r263887): 3993 zpool(1M) and zfs(1M) should support -p for "list" and "get" 4700 "zpool get" doesn't support -H or -o options Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Fri Apr 11 01:23:46 2014 (r264334) +++ stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Fri Apr 11 01:27:33 2014 (r264335) @@ -1,5 +1,6 @@ '\" te .\" Copyright (c) 2012, Martin Matuska . +.\" Copyright (c) 2013-2014, Xin Li . .\" All Rights Reserved. .\" .\" The contents of this file are subject to the terms of the @@ -25,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 20, 2014 +.Dd March 28, 2014 .Dt ZPOOL 8 .Os .Sh NAME @@ -70,6 +71,8 @@ .Ar pool ... .Nm .Cm get +.Op Fl Hp +.Op Fl o Ar field Ns Op , Ns Ar ... .Ar all | property Ns Op , Ns Ar ... .Ar pool ... .Nm @@ -120,7 +123,7 @@ .Ar device .Nm .Cm list -.Op Fl H +.Op Fl Hpv .Op Fl o Ar property Ns Op , Ns Ar ... .Op Fl T Cm d Ns | Ns Cm u .Op Ar pool @@ -1018,6 +1021,8 @@ is currently being used. This may lead t .It Xo .Nm .Cm get +.Op Fl Hp +.Op Fl o Ar field Ns Op , Ns Ar ... .Ar all | property Ns Op , Ns Ar ... .Ar pool ... .Xc @@ -1036,6 +1041,19 @@ the following fields: See the .Qq Sx Properties section for more information on the available pool properties. +.Pp +.It Fl H +Scripted mode. Do not display headers, and separate fields by a single tab +instead of arbitrary space. +.It Fl p +Display numbers in parsable (exact) values. +.It Fl o Ar field +A comma-separated list of columns to display. +.Sy name Ns , Ns +.Sy property Ns , Ns +.Sy value Ns , Ns +.Sy source +is the default value. .It Xo .Nm .Cm history @@ -1335,7 +1353,7 @@ Treat exported or foreign devices as ina .It Xo .Nm .Cm list -.Op Fl Hv +.Op Fl Hpv .Op Fl o Ar property Ns Op , Ns Ar ... .Op Fl T Cm d Ns | Ns Cm u .Op Ar pool @@ -1371,6 +1389,8 @@ for unixtime .It Fl H Scripted mode. Do not display headers, and separate fields by a single tab instead of arbitrary space. +.It Fl p +Display numbers in parsable (exact) values. .It Fl v Show more detailed information. .It Fl o Ar property Ns Op , Ns Ar ... Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Fri Apr 11 01:23:46 2014 (r264334) +++ stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Fri Apr 11 01:27:33 2014 (r264335) @@ -236,7 +236,7 @@ get_usage(zpool_help_t idx) { case HELP_LABELCLEAR: return (gettext("\tlabelclear [-f] \n")); case HELP_LIST: - return (gettext("\tlist [-Hv] [-o property[,...]] " + return (gettext("\tlist [-Hpv] [-o property[,...]] " "[-T d|u] [pool] ... [interval [count]]\n")); case HELP_OFFLINE: return (gettext("\toffline [-t] ...\n")); @@ -258,8 +258,8 @@ get_usage(zpool_help_t idx) { return (gettext("\tupgrade [-v]\n" "\tupgrade [-V version] <-a | pool ...>\n")); case HELP_GET: - return (gettext("\tget <\"all\" | property[,...]> " - " ...\n")); + return (gettext("\tget [-Hp] [-o \"all\" | field[,...]] " + "<\"all\" | property[,...]> ...\n")); case HELP_SET: return (gettext("\tset \n")); case HELP_SPLIT: @@ -2765,6 +2765,7 @@ typedef struct list_cbdata { int cb_namewidth; boolean_t cb_scripted; zprop_list_t *cb_proplist; + boolean_t cb_literal; } list_cbdata_t; /* @@ -2860,7 +2861,7 @@ print_pool(zpool_handle_t *zhp, list_cbd zpool_get_prop_int(zhp, pl->pl_prop, NULL) == 0) propstr = "-"; else if (zpool_get_prop(zhp, pl->pl_prop, property, - sizeof (property), NULL) != 0) + sizeof (property), NULL, cb->cb_literal) != 0) propstr = "-"; else propstr = property; @@ -3011,12 +3012,13 @@ list_callback(zpool_handle_t *zhp, void } /* - * zpool list [-H] [-o prop[,prop]*] [-T d|u] [pool] ... [interval [count]] + * zpool list [-Hp] [-o prop[,prop]*] [-T d|u] [pool] ... [interval [count]] * * -H Scripted mode. Don't display headers, and separate properties * by a single tab. * -o List of properties to display. Defaults to * "name,size,allocated,free,capacity,health,altroot" + * -p Diplay values in parsable (exact) format. * -T Display a timestamp in date(1) or Unix format * * List all pools in the system, whether or not they're healthy. Output space @@ -3037,7 +3039,7 @@ zpool_do_list(int argc, char **argv) boolean_t first = B_TRUE; /* check options */ - while ((c = getopt(argc, argv, ":Ho:T:v")) != -1) { + while ((c = getopt(argc, argv, ":Ho:pT:v")) != -1) { switch (c) { case 'H': cb.cb_scripted = B_TRUE; @@ -3045,6 +3047,9 @@ zpool_do_list(int argc, char **argv) case 'o': props = optarg; break; + case 'p': + cb.cb_literal = B_TRUE; + break; case 'T': get_timestamp_arg(*optarg); break; @@ -5199,7 +5204,7 @@ get_callback(zpool_handle_t *zhp, void * } } else { if (zpool_get_prop(zhp, pl->pl_prop, value, - sizeof (value), &srctype) != 0) + sizeof (value), &srctype, cbp->cb_literal) != 0) continue; zprop_print_one_property(zpool_get_name(zhp), cbp, @@ -5210,20 +5215,32 @@ get_callback(zpool_handle_t *zhp, void * return (0); } +/* + * zpool get [-Hp] [-o "all" | field[,...]] <"all" | property[,...]> ... + * + * -H Scripted mode. Don't display headers, and separate properties + * by a single tab. + * -o List of columns to display. Defaults to + * "name,property,value,source". + * -p Diplay values in parsable (exact) format. + * + * Get properties of pools in the system. Output space statistics + * for each one as well as other attributes. + */ int zpool_do_get(int argc, char **argv) { zprop_get_cbdata_t cb = { 0 }; zprop_list_t fake_name = { 0 }; int ret; - - if (argc < 2) { - (void) fprintf(stderr, gettext("missing property " - "argument\n")); - usage(B_FALSE); - } + int c, i; + char *value; cb.cb_first = B_TRUE; + + /* + * Set up default columns and sources. + */ cb.cb_sources = ZPROP_SRC_ALL; cb.cb_columns[0] = GET_COL_NAME; cb.cb_columns[1] = GET_COL_PROPERTY; @@ -5231,10 +5248,89 @@ zpool_do_get(int argc, char **argv) cb.cb_columns[3] = GET_COL_SOURCE; cb.cb_type = ZFS_TYPE_POOL; - if (zprop_get_list(g_zfs, argv[1], &cb.cb_proplist, + /* check options */ + while ((c = getopt(argc, argv, ":Hpo:")) != -1) { + switch (c) { + case 'p': + cb.cb_literal = B_TRUE; + break; + case 'H': + cb.cb_scripted = B_TRUE; + break; + case 'o': + bzero(&cb.cb_columns, sizeof (cb.cb_columns)); + i = 0; + while (*optarg != '\0') { + static char *col_subopts[] = + { "name", "property", "value", "source", + "all", NULL }; + + if (i == ZFS_GET_NCOLS) { + (void) fprintf(stderr, gettext("too " + "many fields given to -o " + "option\n")); + usage(B_FALSE); + } + + switch (getsubopt(&optarg, col_subopts, + &value)) { + case 0: + cb.cb_columns[i++] = GET_COL_NAME; + break; + case 1: + cb.cb_columns[i++] = GET_COL_PROPERTY; + break; + case 2: + cb.cb_columns[i++] = GET_COL_VALUE; + break; + case 3: + cb.cb_columns[i++] = GET_COL_SOURCE; + break; + case 4: + if (i > 0) { + (void) fprintf(stderr, + gettext("\"all\" conflicts " + "with specific fields " + "given to -o option\n")); + usage(B_FALSE); + } + cb.cb_columns[0] = GET_COL_NAME; + cb.cb_columns[1] = GET_COL_PROPERTY; + cb.cb_columns[2] = GET_COL_VALUE; + cb.cb_columns[3] = GET_COL_SOURCE; + i = ZFS_GET_NCOLS; + break; + default: + (void) fprintf(stderr, + gettext("invalid column name " + "'%s'\n"), value); + usage(B_FALSE); + } + } + break; + case '?': + (void) fprintf(stderr, gettext("invalid option '%c'\n"), + optopt); + usage(B_FALSE); + } + } + + argc -= optind; + argv += optind; + + if (argc < 1) { + (void) fprintf(stderr, gettext("missing property " + "argument\n")); + usage(B_FALSE); + } + + if (zprop_get_list(g_zfs, argv[0], &cb.cb_proplist, ZFS_TYPE_POOL) != 0) usage(B_FALSE); + argc--; + argv++; + if (cb.cb_proplist != NULL) { fake_name.pl_prop = ZPOOL_PROP_NAME; fake_name.pl_width = strlen(gettext("NAME")); @@ -5242,7 +5338,7 @@ zpool_do_get(int argc, char **argv) cb.cb_proplist = &fake_name; } - ret = for_each_pool(argc - 2, argv + 2, B_TRUE, &cb.cb_proplist, + ret = for_each_pool(argc, argv, B_TRUE, &cb.cb_proplist, get_callback, &cb); if (cb.cb_proplist == &fake_name) Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Fri Apr 11 01:23:46 2014 (r264334) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Fri Apr 11 01:27:33 2014 (r264335) @@ -270,7 +270,7 @@ extern int zpool_label_disk(libzfs_handl */ extern int zpool_set_prop(zpool_handle_t *, const char *, const char *); extern int zpool_get_prop(zpool_handle_t *, zpool_prop_t, char *, - size_t proplen, zprop_source_t *); + size_t proplen, zprop_source_t *, boolean_t); extern uint64_t zpool_get_prop_int(zpool_handle_t *, zpool_prop_t, zprop_source_t *); Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Fri Apr 11 01:23:46 2014 (r264334) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Fri Apr 11 01:27:33 2014 (r264335) @@ -2237,8 +2237,8 @@ zfs_prop_get(zfs_handle_t *zhp, zfs_prop } if ((zpool_get_prop(zhp->zpool_hdl, - ZPOOL_PROP_ALTROOT, buf, MAXPATHLEN, NULL)) || - (strcmp(root, "-") == 0)) + ZPOOL_PROP_ALTROOT, buf, MAXPATHLEN, NULL, + B_FALSE)) || (strcmp(root, "-") == 0)) root[0] = '\0'; /* * Special case an alternate root of '/'. This will Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Fri Apr 11 01:23:46 2014 (r264334) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Fri Apr 11 01:27:33 2014 (r264335) @@ -240,7 +240,7 @@ zpool_pool_state_to_name(pool_state_t st */ int zpool_get_prop(zpool_handle_t *zhp, zpool_prop_t prop, char *buf, size_t len, - zprop_source_t *srctype) + zprop_source_t *srctype, boolean_t literal) { uint64_t intval; const char *strval; @@ -272,9 +272,7 @@ zpool_get_prop(zpool_handle_t *zhp, zpoo (void) strlcpy(buf, zpool_get_prop_string(zhp, prop, &src), len); - if (srctype != NULL) - *srctype = src; - return (0); + break; } /* FALLTHROUGH */ default: @@ -306,12 +304,22 @@ zpool_get_prop(zpool_handle_t *zhp, zpoo case ZPOOL_PROP_FREE: case ZPOOL_PROP_FREEING: case ZPOOL_PROP_EXPANDSZ: - (void) zfs_nicenum(intval, buf, len); + if (literal) { + (void) snprintf(buf, len, "%llu", + (u_longlong_t)intval); + } else { + (void) zfs_nicenum(intval, buf, len); + } break; case ZPOOL_PROP_CAPACITY: - (void) snprintf(buf, len, "%llu%%", - (u_longlong_t)intval); + if (literal) { + (void) snprintf(buf, len, "%llu", + (u_longlong_t)intval); + } else { + (void) snprintf(buf, len, "%llu%%", + (u_longlong_t)intval); + } break; case ZPOOL_PROP_DEDUPRATIO: @@ -407,7 +415,7 @@ zpool_is_bootable(zpool_handle_t *zhp) char bootfs[ZPOOL_MAXNAMELEN]; return (zpool_get_prop(zhp, ZPOOL_PROP_BOOTFS, bootfs, - sizeof (bootfs), NULL) == 0 && strncmp(bootfs, "-", + sizeof (bootfs), NULL, B_FALSE) == 0 && strncmp(bootfs, "-", sizeof (bootfs)) != 0); } @@ -806,7 +814,7 @@ zpool_expand_proplist(zpool_handle_t *zh if (entry->pl_prop != ZPROP_INVAL && zpool_get_prop(zhp, entry->pl_prop, buf, sizeof (buf), - NULL) == 0) { + NULL, B_FALSE) == 0) { if (strlen(buf) > entry->pl_width) entry->pl_width = strlen(buf); } From owner-svn-src-stable@FreeBSD.ORG Fri Apr 11 06:13:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C609F3A5; Fri, 11 Apr 2014 06:13:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B30BB18F1; Fri, 11 Apr 2014 06:13:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3B6Duat068394; Fri, 11 Apr 2014 06:13:56 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3B6Du2M068393; Fri, 11 Apr 2014 06:13:56 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201404110613.s3B6Du2M068393@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 11 Apr 2014 06:13:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264336 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Apr 2014 06:13:56 -0000 Author: hselasky Date: Fri Apr 11 06:13:56 2014 New Revision: 264336 URL: http://svnweb.freebsd.org/changeset/base/264336 Log: MFC r264294: Fix for infinite XHCI reset loops when the set address USB request fails. Modified: stable/10/sys/dev/usb/controller/xhci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci.c Fri Apr 11 01:27:33 2014 (r264335) +++ stable/10/sys/dev/usb/controller/xhci.c Fri Apr 11 06:13:56 2014 (r264336) @@ -1218,8 +1218,20 @@ retry: */ if (timeout == 0 && xhci_reset_command_queue_locked(sc) == 0) { - timeout = 1; - goto retry; + temp = le32toh(trb->dwTrb3); + + /* + * Avoid infinite XHCI reset loops if the set + * address command fails to respond due to a + * non-enumerating device: + */ + if (XHCI_TRB_3_TYPE_GET(temp) == XHCI_TRB_TYPE_ADDRESS_DEVICE && + (temp & XHCI_TRB_3_BSR_BIT) == 0) { + DPRINTF("Set address timeout\n"); + } else { + timeout = 1; + goto retry; + } } else { DPRINTF("Controller reset!\n"); usb_bus_reset_async_locked(&sc->sc_bus); From owner-svn-src-stable@FreeBSD.ORG Fri Apr 11 06:15:58 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD65652A; Fri, 11 Apr 2014 06:15:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA0981916; Fri, 11 Apr 2014 06:15:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3B6FwQT068701; Fri, 11 Apr 2014 06:15:58 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3B6FwuP068700; Fri, 11 Apr 2014 06:15:58 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201404110615.s3B6FwuP068700@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 11 Apr 2014 06:15:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264337 - stable/9/sys/dev/usb/controller X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Apr 2014 06:15:58 -0000 Author: hselasky Date: Fri Apr 11 06:15:58 2014 New Revision: 264337 URL: http://svnweb.freebsd.org/changeset/base/264337 Log: MFC r264294: Fix for infinite XHCI reset loops when the set address USB request fails. Modified: stable/9/sys/dev/usb/controller/xhci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/9/sys/dev/usb/controller/xhci.c Fri Apr 11 06:13:56 2014 (r264336) +++ stable/9/sys/dev/usb/controller/xhci.c Fri Apr 11 06:15:58 2014 (r264337) @@ -1184,8 +1184,20 @@ retry: */ if (timeout == 0 && xhci_reset_command_queue_locked(sc) == 0) { - timeout = 1; - goto retry; + temp = le32toh(trb->dwTrb3); + + /* + * Avoid infinite XHCI reset loops if the set + * address command fails to respond due to a + * non-enumerating device: + */ + if (XHCI_TRB_3_TYPE_GET(temp) == XHCI_TRB_TYPE_ADDRESS_DEVICE && + (temp & XHCI_TRB_3_BSR_BIT) == 0) { + DPRINTF("Set address timeout\n"); + } else { + timeout = 1; + goto retry; + } } else { DPRINTF("Controller reset!\n"); usb_bus_reset_async_locked(&sc->sc_bus); From owner-svn-src-stable@FreeBSD.ORG Fri Apr 11 06:18:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D0ABA96C; Fri, 11 Apr 2014 06:18:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD8011933; Fri, 11 Apr 2014 06:18:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3B6IOVF069106; Fri, 11 Apr 2014 06:18:24 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3B6IORS069105; Fri, 11 Apr 2014 06:18:24 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201404110618.s3B6IORS069105@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 11 Apr 2014 06:18:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r264339 - stable/8/sys/dev/usb/controller X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Apr 2014 06:18:24 -0000 Author: hselasky Date: Fri Apr 11 06:18:24 2014 New Revision: 264339 URL: http://svnweb.freebsd.org/changeset/base/264339 Log: MFC r264294: Fix for infinite XHCI reset loops when the set address USB request fails. Modified: stable/8/sys/dev/usb/controller/xhci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/8/sys/dev/usb/controller/xhci.c Fri Apr 11 06:17:44 2014 (r264338) +++ stable/8/sys/dev/usb/controller/xhci.c Fri Apr 11 06:18:24 2014 (r264339) @@ -1184,8 +1184,20 @@ retry: */ if (timeout == 0 && xhci_reset_command_queue_locked(sc) == 0) { - timeout = 1; - goto retry; + temp = le32toh(trb->dwTrb3); + + /* + * Avoid infinite XHCI reset loops if the set + * address command fails to respond due to a + * non-enumerating device: + */ + if (XHCI_TRB_3_TYPE_GET(temp) == XHCI_TRB_TYPE_ADDRESS_DEVICE && + (temp & XHCI_TRB_3_BSR_BIT) == 0) { + DPRINTF("Set address timeout\n"); + } else { + timeout = 1; + goto retry; + } } else { DPRINTF("Controller reset!\n"); usb_bus_reset_async_locked(&sc->sc_bus); From owner-svn-src-stable@FreeBSD.ORG Sat Apr 12 06:49:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0389EC8; Sat, 12 Apr 2014 06:49:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E43F21171; Sat, 12 Apr 2014 06:49:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3C6nAvO087323; Sat, 12 Apr 2014 06:49:10 GMT (envelope-from dchagin@svn.freebsd.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3C6nAN8087322; Sat, 12 Apr 2014 06:49:10 GMT (envelope-from dchagin@svn.freebsd.org) Message-Id: <201404120649.s3C6nAN8087322@svn.freebsd.org> From: Dmitry Chagin Date: Sat, 12 Apr 2014 06:49:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264365 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2014 06:49:11 -0000 Author: dchagin Date: Sat Apr 12 06:49:10 2014 New Revision: 264365 URL: http://svnweb.freebsd.org/changeset/base/264365 Log: MFC r264151: Prevent alq from panic when the invalid alq_file path specified. Modified: stable/9/sys/kern/kern_alq.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_alq.c ============================================================================== --- stable/9/sys/kern/kern_alq.c Sat Apr 12 02:05:31 2014 (r264364) +++ stable/9/sys/kern/kern_alq.c Sat Apr 12 06:49:10 2014 (r264365) @@ -494,10 +494,12 @@ alq_open(struct alq **alqp, const char * KASSERT((count >= 0), ("%s: count < 0", __func__)); if (count > 0) { - ret = alq_open_flags(alqp, file, cred, cmode, size*count, 0); - (*alqp)->aq_flags |= AQ_LEGACY; - (*alqp)->aq_entmax = count; - (*alqp)->aq_entlen = size; + if ((ret = alq_open_flags(alqp, file, cred, cmode, + size*count, 0)) == 0) { + (*alqp)->aq_flags |= AQ_LEGACY; + (*alqp)->aq_entmax = count; + (*alqp)->aq_entlen = size; + } } else ret = alq_open_flags(alqp, file, cred, cmode, size, 0); From owner-svn-src-stable@FreeBSD.ORG Sat Apr 12 06:50:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BA2D8205; Sat, 12 Apr 2014 06:50:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A6575117F; Sat, 12 Apr 2014 06:50:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3C6oBPi087595; Sat, 12 Apr 2014 06:50:11 GMT (envelope-from dchagin@svn.freebsd.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3C6oBuv087594; Sat, 12 Apr 2014 06:50:11 GMT (envelope-from dchagin@svn.freebsd.org) Message-Id: <201404120650.s3C6oBuv087594@svn.freebsd.org> From: Dmitry Chagin Date: Sat, 12 Apr 2014 06:50:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264366 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2014 06:50:11 -0000 Author: dchagin Date: Sat Apr 12 06:50:11 2014 New Revision: 264366 URL: http://svnweb.freebsd.org/changeset/base/264366 Log: MFC r264151: Prevent alq from panic when the invalid alq_file path specified. Modified: stable/10/sys/kern/kern_alq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_alq.c ============================================================================== --- stable/10/sys/kern/kern_alq.c Sat Apr 12 06:49:10 2014 (r264365) +++ stable/10/sys/kern/kern_alq.c Sat Apr 12 06:50:11 2014 (r264366) @@ -488,10 +488,12 @@ alq_open(struct alq **alqp, const char * KASSERT((count >= 0), ("%s: count < 0", __func__)); if (count > 0) { - ret = alq_open_flags(alqp, file, cred, cmode, size*count, 0); - (*alqp)->aq_flags |= AQ_LEGACY; - (*alqp)->aq_entmax = count; - (*alqp)->aq_entlen = size; + if ((ret = alq_open_flags(alqp, file, cred, cmode, + size*count, 0)) == 0) { + (*alqp)->aq_flags |= AQ_LEGACY; + (*alqp)->aq_entmax = count; + (*alqp)->aq_entlen = size; + } } else ret = alq_open_flags(alqp, file, cred, cmode, size, 0); From owner-svn-src-stable@FreeBSD.ORG Sat Apr 12 14:08:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DBFDBB6A; Sat, 12 Apr 2014 14:08:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7ADE1A86; Sat, 12 Apr 2014 14:08:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3CE8rWi068366; Sat, 12 Apr 2014 14:08:53 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3CE8rAX068364; Sat, 12 Apr 2014 14:08:53 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201404121408.s3CE8rAX068364@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 12 Apr 2014 14:08:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264368 - in stable/10/sys: kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2014 14:08:53 -0000 Author: kib Date: Sat Apr 12 14:08:53 2014 New Revision: 264368 URL: http://svnweb.freebsd.org/changeset/base/264368 Log: MFC r264146: Fix a race between kqueue_register() and kqueue_scan() setting KN_INFLUX flag while knlist is not locked, which caused lost notifications from parallel knote(). Modified: stable/10/sys/kern/kern_event.c stable/10/sys/sys/event.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_event.c ============================================================================== --- stable/10/sys/kern/kern_event.c Sat Apr 12 12:44:09 2014 (r264367) +++ stable/10/sys/kern/kern_event.c Sat Apr 12 14:08:53 2014 (r264368) @@ -468,7 +468,7 @@ knote_fork(struct knlist *list, int pid) continue; kq = kn->kn_kq; KQ_LOCK(kq); - if ((kn->kn_status & KN_INFLUX) == KN_INFLUX) { + if ((kn->kn_status & (KN_INFLUX | KN_SCAN)) == KN_INFLUX) { KQ_UNLOCK(kq); continue; } @@ -1145,7 +1145,7 @@ findkn: * but doing so will not reset any filter which has already been * triggered. */ - kn->kn_status |= KN_INFLUX; + kn->kn_status |= KN_INFLUX | KN_SCAN; KQ_UNLOCK(kq); KN_LIST_LOCK(kn); kn->kn_kevent.udata = kev->udata; @@ -1168,7 +1168,7 @@ done_ev_add: KQ_LOCK(kq); if (event) KNOTE_ACTIVATE(kn, 1); - kn->kn_status &= ~KN_INFLUX; + kn->kn_status &= ~(KN_INFLUX | KN_SCAN); KN_LIST_UNLOCK(kn); if ((kev->flags & EV_DISABLE) && @@ -1477,7 +1477,7 @@ retry: KQ_LOCK(kq); kn = NULL; } else { - kn->kn_status |= KN_INFLUX; + kn->kn_status |= KN_INFLUX | KN_SCAN; KQ_UNLOCK(kq); if ((kn->kn_status & KN_KQUEUE) == KN_KQUEUE) KQ_GLOBAL_LOCK(&kq_global, haskqglobal); @@ -1486,7 +1486,8 @@ retry: KQ_LOCK(kq); KQ_GLOBAL_UNLOCK(&kq_global, haskqglobal); kn->kn_status &= - ~(KN_QUEUED | KN_ACTIVE | KN_INFLUX); + ~(KN_QUEUED | KN_ACTIVE | KN_INFLUX | + KN_SCAN); kq->kq_count--; KN_LIST_UNLOCK(kn); influx = 1; @@ -1516,7 +1517,7 @@ retry: } else TAILQ_INSERT_TAIL(&kq->kq_head, kn, kn_tqe); - kn->kn_status &= ~(KN_INFLUX); + kn->kn_status &= ~(KN_INFLUX | KN_SCAN); KN_LIST_UNLOCK(kn); influx = 1; } @@ -1834,28 +1835,33 @@ knote(struct knlist *list, long hint, in */ SLIST_FOREACH(kn, &list->kl_list, kn_selnext) { kq = kn->kn_kq; - if ((kn->kn_status & KN_INFLUX) != KN_INFLUX) { + KQ_LOCK(kq); + if ((kn->kn_status & (KN_INFLUX | KN_SCAN)) == KN_INFLUX) { + /* + * Do not process the influx notes, except for + * the influx coming from the kq unlock in the + * kqueue_scan(). In the later case, we do + * not interfere with the scan, since the code + * fragment in kqueue_scan() locks the knlist, + * and cannot proceed until we finished. + */ + KQ_UNLOCK(kq); + } else if ((lockflags & KNF_NOKQLOCK) != 0) { + kn->kn_status |= KN_INFLUX; + KQ_UNLOCK(kq); + error = kn->kn_fop->f_event(kn, hint); KQ_LOCK(kq); - if ((kn->kn_status & KN_INFLUX) == KN_INFLUX) { - KQ_UNLOCK(kq); - } else if ((lockflags & KNF_NOKQLOCK) != 0) { - kn->kn_status |= KN_INFLUX; - KQ_UNLOCK(kq); - error = kn->kn_fop->f_event(kn, hint); - KQ_LOCK(kq); - kn->kn_status &= ~KN_INFLUX; - if (error) - KNOTE_ACTIVATE(kn, 1); - KQ_UNLOCK_FLUX(kq); - } else { - kn->kn_status |= KN_HASKQLOCK; - if (kn->kn_fop->f_event(kn, hint)) - KNOTE_ACTIVATE(kn, 1); - kn->kn_status &= ~KN_HASKQLOCK; - KQ_UNLOCK(kq); - } + kn->kn_status &= ~KN_INFLUX; + if (error) + KNOTE_ACTIVATE(kn, 1); + KQ_UNLOCK_FLUX(kq); + } else { + kn->kn_status |= KN_HASKQLOCK; + if (kn->kn_fop->f_event(kn, hint)) + KNOTE_ACTIVATE(kn, 1); + kn->kn_status &= ~KN_HASKQLOCK; + KQ_UNLOCK(kq); } - kq = NULL; } if ((lockflags & KNF_LISTLOCKED) == 0) list->kl_unlock(list->kl_lockarg); Modified: stable/10/sys/sys/event.h ============================================================================== --- stable/10/sys/sys/event.h Sat Apr 12 12:44:09 2014 (r264367) +++ stable/10/sys/sys/event.h Sat Apr 12 14:08:53 2014 (r264368) @@ -206,6 +206,7 @@ struct knote { #define KN_MARKER 0x20 /* ignore this knote */ #define KN_KQUEUE 0x40 /* this knote belongs to a kq */ #define KN_HASKQLOCK 0x80 /* for _inevent */ +#define KN_SCAN 0x100 /* flux set in kqueue_scan() */ int kn_sfflags; /* saved filter flags */ intptr_t kn_sdata; /* saved data field */ union { From owner-svn-src-stable@FreeBSD.ORG Sat Apr 12 14:09:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 916ECCBD; Sat, 12 Apr 2014 14:09:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D4B71A8A; Sat, 12 Apr 2014 14:09:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3CE9abD068498; Sat, 12 Apr 2014 14:09:36 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3CE9arl068496; Sat, 12 Apr 2014 14:09:36 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201404121409.s3CE9arl068496@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 12 Apr 2014 14:09:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264369 - in stable/9/sys: kern sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2014 14:09:36 -0000 Author: kib Date: Sat Apr 12 14:09:35 2014 New Revision: 264369 URL: http://svnweb.freebsd.org/changeset/base/264369 Log: MFC r264146: Fix a race between kqueue_register() and kqueue_scan() setting KN_INFLUX flag while knlist is not locked, which caused lost notifications from parallel knote(). Modified: stable/9/sys/kern/kern_event.c stable/9/sys/sys/event.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/kern/kern_event.c ============================================================================== --- stable/9/sys/kern/kern_event.c Sat Apr 12 14:08:53 2014 (r264368) +++ stable/9/sys/kern/kern_event.c Sat Apr 12 14:09:35 2014 (r264369) @@ -465,7 +465,7 @@ knote_fork(struct knlist *list, int pid) continue; kq = kn->kn_kq; KQ_LOCK(kq); - if ((kn->kn_status & KN_INFLUX) == KN_INFLUX) { + if ((kn->kn_status & (KN_INFLUX | KN_SCAN)) == KN_INFLUX) { KQ_UNLOCK(kq); continue; } @@ -1129,7 +1129,7 @@ findkn: * but doing so will not reset any filter which has already been * triggered. */ - kn->kn_status |= KN_INFLUX; + kn->kn_status |= KN_INFLUX | KN_SCAN; KQ_UNLOCK(kq); KN_LIST_LOCK(kn); kn->kn_kevent.udata = kev->udata; @@ -1152,7 +1152,7 @@ done_ev_add: KQ_LOCK(kq); if (event) KNOTE_ACTIVATE(kn, 1); - kn->kn_status &= ~KN_INFLUX; + kn->kn_status &= ~(KN_INFLUX | KN_SCAN); KN_LIST_UNLOCK(kn); if ((kev->flags & EV_DISABLE) && @@ -1469,7 +1469,7 @@ start: KQ_LOCK(kq); kn = NULL; } else { - kn->kn_status |= KN_INFLUX; + kn->kn_status |= KN_INFLUX | KN_SCAN; KQ_UNLOCK(kq); if ((kn->kn_status & KN_KQUEUE) == KN_KQUEUE) KQ_GLOBAL_LOCK(&kq_global, haskqglobal); @@ -1478,7 +1478,8 @@ start: KQ_LOCK(kq); KQ_GLOBAL_UNLOCK(&kq_global, haskqglobal); kn->kn_status &= - ~(KN_QUEUED | KN_ACTIVE | KN_INFLUX); + ~(KN_QUEUED | KN_ACTIVE | KN_INFLUX | + KN_SCAN); kq->kq_count--; KN_LIST_UNLOCK(kn); influx = 1; @@ -1508,7 +1509,7 @@ start: } else TAILQ_INSERT_TAIL(&kq->kq_head, kn, kn_tqe); - kn->kn_status &= ~(KN_INFLUX); + kn->kn_status &= ~(KN_INFLUX | KN_SCAN); KN_LIST_UNLOCK(kn); influx = 1; } @@ -1826,28 +1827,33 @@ knote(struct knlist *list, long hint, in */ SLIST_FOREACH(kn, &list->kl_list, kn_selnext) { kq = kn->kn_kq; - if ((kn->kn_status & KN_INFLUX) != KN_INFLUX) { + KQ_LOCK(kq); + if ((kn->kn_status & (KN_INFLUX | KN_SCAN)) == KN_INFLUX) { + /* + * Do not process the influx notes, except for + * the influx coming from the kq unlock in the + * kqueue_scan(). In the later case, we do + * not interfere with the scan, since the code + * fragment in kqueue_scan() locks the knlist, + * and cannot proceed until we finished. + */ + KQ_UNLOCK(kq); + } else if ((lockflags & KNF_NOKQLOCK) != 0) { + kn->kn_status |= KN_INFLUX; + KQ_UNLOCK(kq); + error = kn->kn_fop->f_event(kn, hint); KQ_LOCK(kq); - if ((kn->kn_status & KN_INFLUX) == KN_INFLUX) { - KQ_UNLOCK(kq); - } else if ((lockflags & KNF_NOKQLOCK) != 0) { - kn->kn_status |= KN_INFLUX; - KQ_UNLOCK(kq); - error = kn->kn_fop->f_event(kn, hint); - KQ_LOCK(kq); - kn->kn_status &= ~KN_INFLUX; - if (error) - KNOTE_ACTIVATE(kn, 1); - KQ_UNLOCK_FLUX(kq); - } else { - kn->kn_status |= KN_HASKQLOCK; - if (kn->kn_fop->f_event(kn, hint)) - KNOTE_ACTIVATE(kn, 1); - kn->kn_status &= ~KN_HASKQLOCK; - KQ_UNLOCK(kq); - } + kn->kn_status &= ~KN_INFLUX; + if (error) + KNOTE_ACTIVATE(kn, 1); + KQ_UNLOCK_FLUX(kq); + } else { + kn->kn_status |= KN_HASKQLOCK; + if (kn->kn_fop->f_event(kn, hint)) + KNOTE_ACTIVATE(kn, 1); + kn->kn_status &= ~KN_HASKQLOCK; + KQ_UNLOCK(kq); } - kq = NULL; } if ((lockflags & KNF_LISTLOCKED) == 0) list->kl_unlock(list->kl_lockarg); Modified: stable/9/sys/sys/event.h ============================================================================== --- stable/9/sys/sys/event.h Sat Apr 12 14:08:53 2014 (r264368) +++ stable/9/sys/sys/event.h Sat Apr 12 14:09:35 2014 (r264369) @@ -210,6 +210,7 @@ struct knote { #define KN_MARKER 0x20 /* ignore this knote */ #define KN_KQUEUE 0x40 /* this knote belongs to a kq */ #define KN_HASKQLOCK 0x80 /* for _inevent */ +#define KN_SCAN 0x100 /* flux set in kqueue_scan() */ int kn_sfflags; /* saved filter flags */ intptr_t kn_sdata; /* saved data field */ union { From owner-svn-src-stable@FreeBSD.ORG Sat Apr 12 14:18:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9862FB5; Sat, 12 Apr 2014 14:18:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4F8B1B31; Sat, 12 Apr 2014 14:18:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3CEIPTi072514; Sat, 12 Apr 2014 14:18:25 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3CEIPDM072513; Sat, 12 Apr 2014 14:18:25 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201404121418.s3CEIPDM072513@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 12 Apr 2014 14:18:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264370 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2014 14:18:26 -0000 Author: kib Date: Sat Apr 12 14:18:25 2014 New Revision: 264370 URL: http://svnweb.freebsd.org/changeset/base/264370 Log: MFC r264173: Use realloc(9) instead of doing the reallocation inline. Modified: stable/10/sys/kern/kern_linker.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_linker.c ============================================================================== --- stable/10/sys/kern/kern_linker.c Sat Apr 12 14:09:35 2014 (r264369) +++ stable/10/sys/kern/kern_linker.c Sat Apr 12 14:18:25 2014 (r264370) @@ -725,14 +725,8 @@ linker_file_add_dependency(linker_file_t linker_file_t *newdeps; sx_assert(&kld_sx, SA_XLOCKED); - newdeps = malloc((file->ndeps + 1) * sizeof(*newdeps), M_LINKER, - M_WAITOK | M_ZERO); - - if (file->deps) { - bcopy(file->deps, newdeps, file->ndeps * sizeof(*newdeps)); - free(file->deps, M_LINKER); - } - file->deps = newdeps; + file->deps = realloc(file->deps, (file->ndeps + 1) * sizeof(*newdeps), + M_LINKER, M_WAITOK | M_ZERO); file->deps[file->ndeps] = dep; file->ndeps++; KLD_DPF(FILE, ("linker_file_add_dependency:" From owner-svn-src-stable@FreeBSD.ORG Sat Apr 12 14:18:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5ABA189; Sat, 12 Apr 2014 14:18:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 922461B38; Sat, 12 Apr 2014 14:18:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3CEImuf072585; Sat, 12 Apr 2014 14:18:48 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3CEImIp072584; Sat, 12 Apr 2014 14:18:48 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201404121418.s3CEImIp072584@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 12 Apr 2014 14:18:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264371 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2014 14:18:48 -0000 Author: kib Date: Sat Apr 12 14:18:48 2014 New Revision: 264371 URL: http://svnweb.freebsd.org/changeset/base/264371 Log: MFC r264173: Use realloc(9) instead of doing the reallocation inline. Modified: stable/9/sys/kern/kern_linker.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_linker.c ============================================================================== --- stable/9/sys/kern/kern_linker.c Sat Apr 12 14:18:25 2014 (r264370) +++ stable/9/sys/kern/kern_linker.c Sat Apr 12 14:18:48 2014 (r264371) @@ -733,14 +733,8 @@ linker_file_add_dependency(linker_file_t linker_file_t *newdeps; sx_assert(&kld_sx, SA_XLOCKED); - newdeps = malloc((file->ndeps + 1) * sizeof(*newdeps), M_LINKER, - M_WAITOK | M_ZERO); - - if (file->deps) { - bcopy(file->deps, newdeps, file->ndeps * sizeof(*newdeps)); - free(file->deps, M_LINKER); - } - file->deps = newdeps; + file->deps = realloc(file->deps, (file->ndeps + 1) * sizeof(*newdeps), + M_LINKER, M_WAITOK | M_ZERO); file->deps[file->ndeps] = dep; file->ndeps++; KLD_DPF(FILE, ("linker_file_add_dependency:" From owner-svn-src-stable@FreeBSD.ORG Sat Apr 12 15:06:16 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2E43E346; Sat, 12 Apr 2014 15:06:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A16D1096; Sat, 12 Apr 2014 15:06:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3CF6FLs093468; Sat, 12 Apr 2014 15:06:15 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3CF6FQH093467; Sat, 12 Apr 2014 15:06:15 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201404121506.s3CF6FQH093467@svn.freebsd.org> From: Baptiste Daroussin Date: Sat, 12 Apr 2014 15:06:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264372 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2014 15:06:16 -0000 Author: bapt Date: Sat Apr 12 15:06:15 2014 New Revision: 264372 URL: http://svnweb.freebsd.org/changeset/base/264372 Log: MFC: r263881, r263952, r263983, r264068, r264090, r264131 Some xdev fixes: - if TARGET_ARCH is not defined and XDEV_ARCH is defined then early define TARGET_ARCH to the valud of XDEV_ARCH: This allow the xdev-build target to be able to correctly chose the compiler it needs to build - Allow overwriting XDTP to allow a user to not chose where the xdev env will live in - Fix build for gcc only xdev (like ia64) by providing the proper -B to the toolchain and not relying on gcc being installed already in base - Fix TOOLS_PREFIX so the generated toolchain has the right default sysroot when installed intead of getting the DESTDIR one - Fix supporting DESTDIR - Also overwrite CXX (needed for cross building c++ libraries with clang) and CPP (needed to cross build some libraries when gcc is the target default compiler but gcc is not installed on the building host) - Prevent XDTP from being a relative path: XDTP is used as the default SYSROOT for clang and thus should be an absolute path. - Respect default CC Modified: stable/10/Makefile.inc1 Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Sat Apr 12 14:18:48 2014 (r264371) +++ stable/10/Makefile.inc1 Sat Apr 12 15:06:15 2014 (r264372) @@ -975,6 +975,8 @@ INSTALLKERNEL= ${_kernel} .endif .endfor +buildkernel ${WMAKE_TGTS} ${.ALLTARGETS:M_*}: .MAKE + # # buildkernel # @@ -1369,6 +1371,9 @@ build-tools: .MAKE # # cross-tools: Build cross-building tools # +.if !defined(TARGET_ARCH) && defined(XDEV_ARCH) +TARGET_ARCH= ${XDEV_ARCH} +.endif .if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${BOOTSTRAPPING} < 800035 .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" _btxld= usr.sbin/btxld @@ -1875,15 +1880,21 @@ NOFUN=-DNO_FSCHG -DWITHOUT_HTML -DWITHOU CPUTYPE=${XDEV_CPUTYPE} XDDIR=${XDEV_ARCH}-freebsd -XDTP=usr/${XDDIR} +XDTP?=/usr/${XDDIR} +.if ${XDTP:N/*} +.error XDTP variable should be an absolute path +.endif + CDBENV=MAKEOBJDIRPREFIX=${MAKEOBJDIRPREFIX}/${XDDIR} \ INSTALL="sh ${.CURDIR}/tools/install.sh" CDENV= ${CDBENV} \ _SHLIBDIRPREFIX=${XDDESTDIR} \ - TOOLS_PREFIX=${XDDESTDIR} + TOOLS_PREFIX=${XDTP} CD2CFLAGS=-isystem ${XDDESTDIR}/usr/include -L${XDDESTDIR}/usr/lib \ - -B${XDDESTDIR}/usr/lib -CD2ENV=${CDENV} CC="${CC} ${CD2CFLAGS}" \ + --sysroot=${XDDESTDIR}/ -B${XDDESTDIR}/usr/libexec \ + -B${XDDESTDIR}/usr/bin -B${XDDESTDIR}/usr/lib +CD2ENV=${CDENV} CC="${CC} ${CD2CFLAGS}" CXX="${CXX} ${CD2CFLAGS}" \ + CPP="${CPP} ${CD2CFLAGS}" \ MACHINE=${XDEV} MACHINE_ARCH=${XDEV_ARCH} CDTMP= ${MAKEOBJDIRPREFIX}/${XDDIR}/${.CURDIR}/tmp @@ -1922,11 +1933,11 @@ _xb-build-tools: _xb-cross-tools: .for _tool in \ - gnu/usr.bin/binutils \ - gnu/usr.bin/cc \ + ${_binutils} \ usr.bin/ar \ ${_clang_libs} \ - ${_clang} + ${_clang} \ + ${_cc} ${_+_}@${ECHODIR} "===> xdev ${_tool} (obj,depend,all)"; \ cd ${.CURDIR}/${_tool} && \ ${CDMAKE} DIRPRFX=${_tool}/ obj && \ @@ -1950,10 +1961,11 @@ xdev-install: xdev-build _xi-mtree _xi-c _xi-cross-tools: @echo "_xi-cross-tools" .for _tool in \ - gnu/usr.bin/binutils \ - gnu/usr.bin/cc \ + ${_binutils} \ usr.bin/ar \ - ${_clang} + ${_clang_libs} \ + ${_clang} \ + ${_cc} ${_+_}@${ECHODIR} "===> xdev ${_tool} (install)"; \ cd ${.CURDIR}/${_tool}; \ ${CDMAKE} DIRPRFX=${_tool}/ install DESTDIR=${XDDESTDIR} @@ -1980,5 +1992,3 @@ _xi-links: xdev xdev-build xdev-install: @echo "*** Error: Both XDEV and XDEV_ARCH must be defined for \"${.TARGET}\" target" .endif - -buildkernel ${WMAKE_TGTS} ${.ALLTARGETS:M_*}: .MAKE From owner-svn-src-stable@FreeBSD.ORG Sat Apr 12 15:13:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D4083506; Sat, 12 Apr 2014 15:13:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0547113F; Sat, 12 Apr 2014 15:13:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3CFDhDe097296; Sat, 12 Apr 2014 15:13:43 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3CFDhQR097295; Sat, 12 Apr 2014 15:13:43 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201404121513.s3CFDhQR097295@svn.freebsd.org> From: Baptiste Daroussin Date: Sat, 12 Apr 2014 15:13:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264373 - stable/10/contrib/byacc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2014 15:13:43 -0000 Author: bapt Date: Sat Apr 12 15:13:43 2014 New Revision: 264373 URL: http://svnweb.freebsd.org/changeset/base/264373 Log: MFC: r263948 Convert an unused banner from skeleton.c into a comment. It is added to every generated files and fix build at certain warning level with clang 3.4 Submitted by: Thomas Dickey (byacc upstream) Spotted by: glebius Modified: stable/10/contrib/byacc/skeleton.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/byacc/skeleton.c ============================================================================== --- stable/10/contrib/byacc/skeleton.c Sat Apr 12 15:06:15 2014 (r264372) +++ stable/10/contrib/byacc/skeleton.c Sat Apr 12 15:13:43 2014 (r264373) @@ -16,9 +16,9 @@ const char *const banner[] = { - "#ifndef lint", - "static const char yysccsid[] = \"@(#)yaccpar 1.9 (Berkeley) 02/21/93\";", - "#endif", + "/* original parser id follows */", + "/* yysccsid[] = \"@(#)yaccpar 1.9 (Berkeley) 02/21/93\" */", + "/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */", "", "#define YYBYACC 1", CONCAT1("#define YYMAJOR ", YYMAJOR), From owner-svn-src-stable@FreeBSD.ORG Sat Apr 12 19:57:16 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52A0435F; Sat, 12 Apr 2014 19:57:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DCC4190A; Sat, 12 Apr 2014 19:57:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3CJvGmI013627; Sat, 12 Apr 2014 19:57:16 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3CJvFnc013622; Sat, 12 Apr 2014 19:57:15 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201404121957.s3CJvFnc013622@svn.freebsd.org> From: Andreas Tobler Date: Sat, 12 Apr 2014 19:57:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264375 - in stable/10/sys: modules/sound/driver/ai2s powerpc/include powerpc/powermac X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2014 19:57:16 -0000 Author: andreast Date: Sat Apr 12 19:57:15 2014 New Revision: 264375 URL: http://svnweb.freebsd.org/changeset/base/264375 Log: MFC r260607, r260610, r260934: r260607: The onyx codec works also as module, so add it. r260610: Described in the man page but not implemented. Here it comes, atomic_swap_32/64. The latter only for powerpc64. r260934: Fix the resource information for the i2s-a node on certain G5 PowerMacs. This is the first step needed to get the snapper codec working on those machines. The second step is to enable the corresponding I2S device and its clock. Tested on machines where the snapper codec was already working, a G4 PowerBook and a PowerMac9,1 with a Shasta based macio. The PowerMac7,2/7,3 with a K2 based macio can now also play sound. Modified: stable/10/sys/modules/sound/driver/ai2s/Makefile stable/10/sys/powerpc/include/atomic.h stable/10/sys/powerpc/powermac/macio.c stable/10/sys/powerpc/powermac/maciovar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/modules/sound/driver/ai2s/Makefile ============================================================================== --- stable/10/sys/modules/sound/driver/ai2s/Makefile Sat Apr 12 18:01:25 2014 (r264374) +++ stable/10/sys/modules/sound/driver/ai2s/Makefile Sat Apr 12 19:57:15 2014 (r264375) @@ -5,6 +5,6 @@ KMOD= snd_ai2s SRCS= device_if.h bus_if.h ofw_bus_if.h SRCS+= channel_if.h feeder_if.h mixer_if.h -SRCS+= snapper.c tumbler.c aoa.c i2s.c +SRCS+= onyx.c snapper.c tumbler.c aoa.c i2s.c .include Modified: stable/10/sys/powerpc/include/atomic.h ============================================================================== --- stable/10/sys/powerpc/include/atomic.h Sat Apr 12 18:01:25 2014 (r264374) +++ stable/10/sys/powerpc/include/atomic.h Sat Apr 12 19:57:15 2014 (r264375) @@ -684,10 +684,47 @@ atomic_fetchadd_long(volatile u_long *p, return (value); } +static __inline u_int +atomic_swap_32(volatile u_int *p, u_int v) +{ + u_int prev; + + __asm __volatile( + "1: lwarx %0,0,%2\n" + " stwcx. %3,0,%2\n" + " bne- 1b\n" + : "=&r" (prev), "+m" (*(volatile u_int *)p) + : "r" (p), "r" (v) + : "cc", "memory"); + + return (prev); +} + +#ifdef __powerpc64__ +static __inline u_long +atomic_swap_64(volatile u_long *p, u_long v) +{ + u_long prev; + + __asm __volatile( + "1: ldarx %0,0,%2\n" + " stdcx. %3,0,%2\n" + " bne- 1b\n" + : "=&r" (prev), "+m" (*(volatile u_long *)p) + : "r" (p), "r" (v) + : "cc", "memory"); + + return (prev); +} +#endif + #define atomic_fetchadd_32 atomic_fetchadd_int +#define atomic_swap_int atomic_swap_32 #ifdef __powerpc64__ #define atomic_fetchadd_64 atomic_fetchadd_long +#define atomic_swap_long atomic_swap_64 +#define atomic_swap_ptr atomic_swap_64 #endif #undef __ATOMIC_REL Modified: stable/10/sys/powerpc/powermac/macio.c ============================================================================== --- stable/10/sys/powerpc/powermac/macio.c Sat Apr 12 18:01:25 2014 (r264374) +++ stable/10/sys/powerpc/powermac/macio.c Sat Apr 12 19:57:15 2014 (r264375) @@ -236,13 +236,45 @@ macio_add_intr(phandle_t devnode, struct static void macio_add_reg(phandle_t devnode, struct macio_devinfo *dinfo) { - struct macio_reg *reg; - int i, nreg; + struct macio_reg *reg, *regp; + phandle_t child; + char buf[8]; + int i, layout_id = 0, nreg, res; nreg = OF_getprop_alloc(devnode, "reg", sizeof(*reg), (void **)®); if (nreg == -1) return; + /* + * Some G5's have broken properties in the i2s-a area. If so we try + * to fix it. Right now we know of two different cases, one for + * sound layout-id 36 and the other one for sound layout-id 76. + * What is missing is the base address for the memory addresses. + * We take them from the parent node (i2s) and use the size + * information from the child. + */ + + if (reg[0].mr_base == 0) { + child = OF_child(devnode); + while (child != 0) { + res = OF_getprop(child, "name", buf, sizeof(buf)); + if (res > 0 && strcmp(buf, "sound") == 0) + break; + child = OF_peer(child); + } + + res = OF_getprop(child, "layout-id", &layout_id, + sizeof(layout_id)); + + if (res > 0 && (layout_id == 36 || layout_id == 76)) { + res = OF_getprop_alloc(OF_parent(devnode), "reg", + sizeof(*regp), (void **)®p); + reg[0] = regp[0]; + reg[1].mr_base = regp[1].mr_base; + reg[2].mr_base = regp[1].mr_base + reg[1].mr_size; + } + } + for (i = 0; i < nreg; i++) { resource_list_add(&dinfo->mdi_resources, SYS_RES_MEMORY, i, reg[i].mr_base, reg[i].mr_base + reg[i].mr_size, @@ -284,6 +316,7 @@ macio_attach(device_t dev) phandle_t subchild; device_t cdev; u_int reg[3]; + char compat[32]; int error, quirks; sc = device_get_softc(dev); @@ -297,6 +330,9 @@ macio_attach(device_t dev) return (ENXIO); } + /* Used later to see if we have to enable the I2S part. */ + OF_getprop(root, "compatible", compat, sizeof(compat)); + sc->sc_base = reg[2]; sc->sc_size = MACIO_REG_SIZE; @@ -378,6 +414,21 @@ macio_attach(device_t dev) bus_write_4(sc->sc_memr, HEATHROW_FCR, fcr); } + + /* + * Make sure the I2S0 and the I2S0_CLK are enabled. + * On certain G5's they are not. + */ + if ((strcmp(ofw_bus_get_name(cdev), "i2s") == 0) && + (strcmp(compat, "K2-Keylargo") == 0)) { + + uint32_t fcr1; + + fcr1 = bus_read_4(sc->sc_memr, KEYLARGO_FCR1); + fcr1 |= FCR1_I2S0_CLK_ENABLE | FCR1_I2S0_ENABLE; + bus_write_4(sc->sc_memr, KEYLARGO_FCR1, fcr1); + } + } return (bus_generic_attach(dev)); Modified: stable/10/sys/powerpc/powermac/maciovar.h ============================================================================== --- stable/10/sys/powerpc/powermac/maciovar.h Sat Apr 12 18:01:25 2014 (r264374) +++ stable/10/sys/powerpc/powermac/maciovar.h Sat Apr 12 19:57:15 2014 (r264375) @@ -48,6 +48,9 @@ #define FCR_ENET_ENABLE 0x60000000 #define FCR_ENET_RESET 0x80000000 +#define FCR1_I2S0_CLK_ENABLE 0x00001000 +#define FCR1_I2S0_ENABLE 0x00002000 + /* Used only by macio_enable_wireless() for now. */ #define KEYLARGO_GPIO_BASE 0x6a #define KEYLARGO_EXTINT_GPIO_REG_BASE 0x58 From owner-svn-src-stable@FreeBSD.ORG Sat Apr 12 19:58:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B370B490; Sat, 12 Apr 2014 19:58:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F73A190F; Sat, 12 Apr 2014 19:58:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3CJwVNH013796; Sat, 12 Apr 2014 19:58:31 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3CJwVSJ013795; Sat, 12 Apr 2014 19:58:31 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201404121958.s3CJwVSJ013795@svn.freebsd.org> From: Andreas Tobler Date: Sat, 12 Apr 2014 19:58:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264376 - stable/9/sys/powerpc/include X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2014 19:58:31 -0000 Author: andreast Date: Sat Apr 12 19:58:31 2014 New Revision: 264376 URL: http://svnweb.freebsd.org/changeset/base/264376 Log: MFC r260610: Described in the man page but not implemented. Here it comes, atomic_swap_32/64. The latter only for powerpc64. Modified: stable/9/sys/powerpc/include/atomic.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/powerpc/include/atomic.h ============================================================================== --- stable/9/sys/powerpc/include/atomic.h Sat Apr 12 19:57:15 2014 (r264375) +++ stable/9/sys/powerpc/include/atomic.h Sat Apr 12 19:58:31 2014 (r264376) @@ -666,10 +666,47 @@ atomic_fetchadd_long(volatile u_long *p, return (value); } +static __inline u_int +atomic_swap_32(volatile u_int *p, u_int v) +{ + u_int prev; + + __asm __volatile( + "1: lwarx %0,0,%2\n" + " stwcx. %3,0,%2\n" + " bne- 1b\n" + : "=&r" (prev), "+m" (*(volatile u_int *)p) + : "r" (p), "r" (v) + : "cc", "memory"); + + return (prev); +} + +#ifdef __powerpc64__ +static __inline u_long +atomic_swap_64(volatile u_long *p, u_long v) +{ + u_long prev; + + __asm __volatile( + "1: ldarx %0,0,%2\n" + " stdcx. %3,0,%2\n" + " bne- 1b\n" + : "=&r" (prev), "+m" (*(volatile u_long *)p) + : "r" (p), "r" (v) + : "cc", "memory"); + + return (prev); +} +#endif + #define atomic_fetchadd_32 atomic_fetchadd_int +#define atomic_swap_int atomic_swap_32 #ifdef __powerpc64__ #define atomic_fetchadd_64 atomic_fetchadd_long +#define atomic_swap_long atomic_swap_64 +#define atomic_swap_ptr atomic_swap_64 #endif #endif /* ! _MACHINE_ATOMIC_H_ */ From owner-svn-src-stable@FreeBSD.ORG Sat Apr 12 20:23:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4ABF39E2; Sat, 12 Apr 2014 20:23:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 324181B12; Sat, 12 Apr 2014 20:23:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3CKN5k3025698; Sat, 12 Apr 2014 20:23:05 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3CKN0Js025661; Sat, 12 Apr 2014 20:23:00 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201404122023.s3CKN0Js025661@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sat, 12 Apr 2014 20:23:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264377 - in stable/10: crypto/openssh crypto/openssh/contrib/caldera crypto/openssh/contrib/redhat crypto/openssh/contrib/suse crypto/openssh/openbsd-compat crypto/openssh/regress secu... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2014 20:23:05 -0000 Author: des Date: Sat Apr 12 20:22:59 2014 New Revision: 264377 URL: http://svnweb.freebsd.org/changeset/base/264377 Log: MFH (r263712): upgrade openssh to 6.6p1 MFH (r264308): restore p level in debugging output Added: stable/10/crypto/openssh/digest-libc.c - copied unchanged from r263712, head/crypto/openssh/digest-libc.c stable/10/crypto/openssh/digest-openssl.c - copied unchanged from r263712, head/crypto/openssh/digest-openssl.c stable/10/crypto/openssh/hmac.c - copied unchanged from r263712, head/crypto/openssh/hmac.c stable/10/crypto/openssh/hmac.h - copied unchanged from r263712, head/crypto/openssh/hmac.h stable/10/crypto/openssh/openbsd-compat/explicit_bzero.c - copied unchanged from r263712, head/crypto/openssh/openbsd-compat/explicit_bzero.c stable/10/crypto/openssh/regress/dhgex.sh - copied unchanged from r263712, head/crypto/openssh/regress/dhgex.sh Deleted: stable/10/crypto/openssh/auth2-jpake.c stable/10/crypto/openssh/digest.c stable/10/crypto/openssh/jpake.c stable/10/crypto/openssh/jpake.h stable/10/crypto/openssh/schnorr.h Modified: stable/10/crypto/openssh/ChangeLog stable/10/crypto/openssh/Makefile.in stable/10/crypto/openssh/README stable/10/crypto/openssh/auth-rsa.c stable/10/crypto/openssh/auth.h stable/10/crypto/openssh/auth1.c stable/10/crypto/openssh/auth2-chall.c stable/10/crypto/openssh/auth2-gss.c stable/10/crypto/openssh/auth2-passwd.c stable/10/crypto/openssh/auth2.c stable/10/crypto/openssh/authfd.c stable/10/crypto/openssh/authfile.c stable/10/crypto/openssh/bufaux.c stable/10/crypto/openssh/bufbn.c stable/10/crypto/openssh/bufec.c stable/10/crypto/openssh/buffer.c stable/10/crypto/openssh/canohost.c stable/10/crypto/openssh/channels.c stable/10/crypto/openssh/cipher-3des1.c stable/10/crypto/openssh/cipher-chachapoly.c stable/10/crypto/openssh/cipher.c stable/10/crypto/openssh/clientloop.c stable/10/crypto/openssh/config.h stable/10/crypto/openssh/config.h.in stable/10/crypto/openssh/configure stable/10/crypto/openssh/configure.ac stable/10/crypto/openssh/contrib/caldera/openssh.spec stable/10/crypto/openssh/contrib/redhat/openssh.spec stable/10/crypto/openssh/contrib/suse/openssh.spec stable/10/crypto/openssh/digest.h stable/10/crypto/openssh/gss-serv.c stable/10/crypto/openssh/hostfile.c stable/10/crypto/openssh/kex.c stable/10/crypto/openssh/kex.h stable/10/crypto/openssh/kexc25519.c stable/10/crypto/openssh/kexdhc.c stable/10/crypto/openssh/kexdhs.c stable/10/crypto/openssh/kexecdhc.c stable/10/crypto/openssh/kexecdhs.c stable/10/crypto/openssh/kexgexc.c stable/10/crypto/openssh/kexgexs.c stable/10/crypto/openssh/key.c stable/10/crypto/openssh/krl.c stable/10/crypto/openssh/mac.c stable/10/crypto/openssh/moduli.0 stable/10/crypto/openssh/monitor.c stable/10/crypto/openssh/monitor.h stable/10/crypto/openssh/monitor_wrap.c stable/10/crypto/openssh/monitor_wrap.h stable/10/crypto/openssh/openbsd-compat/Makefile.in stable/10/crypto/openssh/openbsd-compat/bsd-poll.c stable/10/crypto/openssh/openbsd-compat/openbsd-compat.h stable/10/crypto/openssh/openbsd-compat/openssl-compat.c stable/10/crypto/openssh/openbsd-compat/openssl-compat.h stable/10/crypto/openssh/packet.c stable/10/crypto/openssh/readconf.c stable/10/crypto/openssh/readconf.h stable/10/crypto/openssh/readpass.c stable/10/crypto/openssh/regress/Makefile stable/10/crypto/openssh/regress/agent-ptrace.sh stable/10/crypto/openssh/regress/agent.sh stable/10/crypto/openssh/regress/cert-hostkey.sh stable/10/crypto/openssh/regress/host-expand.sh stable/10/crypto/openssh/regress/login-timeout.sh stable/10/crypto/openssh/regress/scp-ssh-wrapper.sh stable/10/crypto/openssh/regress/scp.sh stable/10/crypto/openssh/regress/setuid-allowed.c stable/10/crypto/openssh/regress/sftp-chroot.sh stable/10/crypto/openssh/rsa.c stable/10/crypto/openssh/sandbox-capsicum.c stable/10/crypto/openssh/sandbox-seccomp-filter.c stable/10/crypto/openssh/sandbox-systrace.c stable/10/crypto/openssh/scp.0 stable/10/crypto/openssh/servconf.c stable/10/crypto/openssh/servconf.h stable/10/crypto/openssh/serverloop.c stable/10/crypto/openssh/session.c stable/10/crypto/openssh/sftp-client.c stable/10/crypto/openssh/sftp-server.0 stable/10/crypto/openssh/sftp.0 stable/10/crypto/openssh/ssh-add.0 stable/10/crypto/openssh/ssh-add.c stable/10/crypto/openssh/ssh-agent.0 stable/10/crypto/openssh/ssh-agent.c stable/10/crypto/openssh/ssh-dss.c stable/10/crypto/openssh/ssh-ecdsa.c stable/10/crypto/openssh/ssh-ed25519.c stable/10/crypto/openssh/ssh-gss.h stable/10/crypto/openssh/ssh-keygen.0 stable/10/crypto/openssh/ssh-keygen.1 stable/10/crypto/openssh/ssh-keygen.c stable/10/crypto/openssh/ssh-keyscan.0 stable/10/crypto/openssh/ssh-keyscan.1 stable/10/crypto/openssh/ssh-keysign.0 stable/10/crypto/openssh/ssh-pkcs11-helper.0 stable/10/crypto/openssh/ssh-rsa.c stable/10/crypto/openssh/ssh.0 stable/10/crypto/openssh/ssh.c stable/10/crypto/openssh/ssh2.h stable/10/crypto/openssh/ssh_config stable/10/crypto/openssh/ssh_config.0 stable/10/crypto/openssh/ssh_config.5 stable/10/crypto/openssh/ssh_namespace.h stable/10/crypto/openssh/sshconnect.c stable/10/crypto/openssh/sshconnect1.c stable/10/crypto/openssh/sshconnect2.c stable/10/crypto/openssh/sshd.0 stable/10/crypto/openssh/sshd.c stable/10/crypto/openssh/sshd_config stable/10/crypto/openssh/sshd_config.0 stable/10/crypto/openssh/sshd_config.5 stable/10/crypto/openssh/sshlogin.c stable/10/crypto/openssh/version.h stable/10/secure/lib/libssh/Makefile stable/10/secure/usr.sbin/sshd/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/crypto/openssh/ChangeLog ============================================================================== --- stable/10/crypto/openssh/ChangeLog Sat Apr 12 19:58:31 2014 (r264376) +++ stable/10/crypto/openssh/ChangeLog Sat Apr 12 20:22:59 2014 (r264377) @@ -1,3 +1,224 @@ +20140313 + - (djm) Release OpenSSH 6.6 + +20140304 + - OpenBSD CVS Sync + - djm@cvs.openbsd.org 2014/03/03 22:22:30 + [session.c] + ignore enviornment variables with embedded '=' or '\0' characters; + spotted by Jann Horn; ok deraadt@ + +20140301 + - (djm) [regress/Makefile] Disable dhgex regress test; it breaks when + no moduli file exists at the expected location. + +20140228 + - OpenBSD CVS Sync + - djm@cvs.openbsd.org 2014/02/27 00:41:49 + [bufbn.c] + fix unsigned overflow that could lead to reading a short ssh protocol + 1 bignum value; found by Ben Hawkes; ok deraadt@ + - djm@cvs.openbsd.org 2014/02/27 08:25:09 + [bufbn.c] + off by one in range check + - djm@cvs.openbsd.org 2014/02/27 22:47:07 + [sshd_config.5] + bz#2184 clarify behaviour of a keyword that appears in multiple + matching Match blocks; ok dtucker@ + - djm@cvs.openbsd.org 2014/02/27 22:57:40 + [version.h] + openssh-6.6 + - dtucker@cvs.openbsd.org 2014/01/19 23:43:02 + [regress/sftp-chroot.sh] + Don't use -q on sftp as it suppresses logging, instead redirect the + output to the regress logfile. + - dtucker@cvs.openbsd.org 2014/01/20 00:00:30 + [sregress/ftp-chroot.sh] + append to rather than truncating the log file + - dtucker@cvs.openbsd.org 2014/01/25 04:35:32 + [regress/Makefile regress/dhgex.sh] + Add a test for DH GEX sizes + - djm@cvs.openbsd.org 2014/01/26 10:22:10 + [regress/cert-hostkey.sh] + automatically generate revoked keys from listed keys rather than + manually specifying each type; from portable + (Id sync only) + - djm@cvs.openbsd.org 2014/01/26 10:49:17 + [scp-ssh-wrapper.sh scp.sh] + make sure $SCP is tested on the remote end rather than whichever one + happens to be in $PATH; from portable + (Id sync only) + - djm@cvs.openbsd.org 2014/02/27 20:04:16 + [login-timeout.sh] + remove any existing LoginGraceTime from sshd_config before adding + a specific one for the test back in + - djm@cvs.openbsd.org 2014/02/27 21:21:25 + [agent-ptrace.sh agent.sh] + keep return values that are printed in error messages; + from portable + (Id sync only) + - (djm) [README contrib/caldera/openssh.spec contrib/redhat/openssh.spec] + [contrib/suse/openssh.spec] Crank version numbers + - (djm) [regress/host-expand.sh] Add RCS Id + +20140227 + - OpenBSD CVS Sync + - djm@cvs.openbsd.org 2014/02/26 20:18:37 + [ssh.c] + bz#2205: avoid early hostname lookups unless canonicalisation is enabled; + ok dtucker@ markus@ + - djm@cvs.openbsd.org 2014/02/26 20:28:44 + [auth2-gss.c gss-serv.c ssh-gss.h sshd.c] + bz#2107 - cache OIDs of supported GSSAPI mechanisms before privsep + sandboxing, as running this code in the sandbox can cause violations; + ok markus@ + - djm@cvs.openbsd.org 2014/02/26 20:29:29 + [channels.c] + don't assume that the socks4 username is \0 terminated; + spotted by Ben Hawkes; ok markus@ + - markus@cvs.openbsd.org 2014/02/26 21:53:37 + [sshd.c] + ssh_gssapi_prepare_supported_oids needs GSSAPI + +20140224 + - OpenBSD CVS Sync + - djm@cvs.openbsd.org 2014/02/07 06:55:54 + [cipher.c mac.c] + remove some logging that makes ssh debugging output very verbose; + ok markus + - djm@cvs.openbsd.org 2014/02/15 23:05:36 + [channels.c] + avoid spurious "getsockname failed: Bad file descriptor" errors in ssh -W; + bz#2200, debian#738692 via Colin Watson; ok dtucker@ + - djm@cvs.openbsd.org 2014/02/22 01:32:19 + [readconf.c] + when processing Match blocks, skip 'exec' clauses if previous predicates + failed to match; ok markus@ + - djm@cvs.openbsd.org 2014/02/23 20:03:42 + [ssh-ed25519.c] + check for unsigned overflow; not reachable in OpenSSH but others might + copy our code... + - djm@cvs.openbsd.org 2014/02/23 20:11:36 + [readconf.c readconf.h ssh.c ssh_config.5] + reparse ssh_config and ~/.ssh/config if hostname canonicalisation changes + the hostname. This allows users to write configurations that always + refer to canonical hostnames, e.g. + + CanonicalizeHostname yes + CanonicalDomains int.example.org example.org + CanonicalizeFallbackLocal no + + Host *.int.example.org + Compression off + Host *.example.org + User djm + + ok markus@ + +20140213 + - (dtucker) [configure.ac openbsd-compat/openssl-compat.{c,h}] Add compat + code for older OpenSSL versions that don't have EVP_MD_CTX_copy_ex. + +20140207 + - OpenBSD CVS Sync + - naddy@cvs.openbsd.org 2014/02/05 20:13:25 + [ssh-keygen.1 ssh-keygen.c] + tweak synopsis: calling ssh-keygen without any arguments is fine; ok jmc@ + while here, fix ordering in usage(); requested by jmc@ + - djm@cvs.openbsd.org 2014/02/06 22:21:01 + [sshconnect.c] + in ssh_create_socket(), only do the getaddrinfo for BindAddress when + BindAddress is actually specified. Fixes regression in 6.5 for + UsePrivilegedPort=yes; patch from Corinna Vinschen + +20140206 + - (dtucker) [openbsd-compat/bsd-poll.c] Don't bother checking for non-NULL + before freeing since free(NULL) is a no-op. ok djm. + - (djm) [sandbox-seccomp-filter.c] Not all Linux architectures define + __NR_shutdown; some go via the socketcall(2) multiplexer. + +20140205 + - (djm) [sandbox-capsicum.c] Don't fatal if Capsicum is offered by + headers/libc but not supported by the kernel. Patch from Loganaden + Velvindron @ AfriNIC + +20140204 + - OpenBSD CVS Sync + - markus@cvs.openbsd.org 2014/01/27 18:58:14 + [Makefile.in digest.c digest.h hostfile.c kex.h mac.c hmac.c hmac.h] + replace openssl HMAC with an implementation based on our ssh_digest_* + ok and feedback djm@ + - markus@cvs.openbsd.org 2014/01/27 19:18:54 + [auth-rsa.c cipher.c ssh-agent.c sshconnect1.c sshd.c] + replace openssl MD5 with our ssh_digest_*; ok djm@ + - markus@cvs.openbsd.org 2014/01/27 20:13:46 + [digest.c digest-openssl.c digest-libc.c Makefile.in] + rename digest.c to digest-openssl.c and add libc variant; ok djm@ + - jmc@cvs.openbsd.org 2014/01/28 14:13:39 + [ssh-keyscan.1] + kill some bad Pa; + From: Jan Stary + - djm@cvs.openbsd.org 2014/01/29 00:19:26 + [sshd.c] + use kill(0, ...) instead of killpg(0, ...); on most operating systems + they are equivalent, but SUSv2 describes the latter as having undefined + behaviour; from portable; ok dtucker + (Id sync only; change is already in portable) + - djm@cvs.openbsd.org 2014/01/29 06:18:35 + [Makefile.in auth.h auth2-jpake.c auth2.c jpake.c jpake.h monitor.c] + [monitor.h monitor_wrap.c monitor_wrap.h readconf.c readconf.h] + [schnorr.c schnorr.h servconf.c servconf.h ssh2.h sshconnect2.c] + remove experimental, never-enabled JPAKE code; ok markus@ + - jmc@cvs.openbsd.org 2014/01/29 14:04:51 + [sshd_config.5] + document kbdinteractiveauthentication; + requested From: Ross L Richardson + + dtucker/markus helped explain its workings; + - djm@cvs.openbsd.org 2014/01/30 22:26:14 + [sandbox-systrace.c] + allow shutdown(2) syscall in sandbox - it may be called by packet_close() + from portable + (Id sync only; change is already in portable) + - tedu@cvs.openbsd.org 2014/01/31 16:39:19 + [auth2-chall.c authfd.c authfile.c bufaux.c bufec.c canohost.c] + [channels.c cipher-chachapoly.c clientloop.c configure.ac hostfile.c] + [kexc25519.c krl.c monitor.c sandbox-systrace.c session.c] + [sftp-client.c ssh-keygen.c ssh.c sshconnect2.c sshd.c sshlogin.c] + [openbsd-compat/explicit_bzero.c openbsd-compat/openbsd-compat.h] + replace most bzero with explicit_bzero, except a few that cna be memset + ok djm dtucker + - djm@cvs.openbsd.org 2014/02/02 03:44:32 + [auth1.c auth2-chall.c auth2-passwd.c authfile.c bufaux.c bufbn.c] + [buffer.c cipher-3des1.c cipher.c clientloop.c gss-serv.c kex.c] + [kexdhc.c kexdhs.c kexecdhc.c kexgexc.c kexecdhs.c kexgexs.c key.c] + [monitor.c monitor_wrap.c packet.c readpass.c rsa.c serverloop.c] + [ssh-add.c ssh-agent.c ssh-dss.c ssh-ecdsa.c ssh-ed25519.c] + [ssh-keygen.c ssh-rsa.c sshconnect.c sshconnect1.c sshconnect2.c] + [sshd.c] + convert memset of potentially-private data to explicit_bzero() + - djm@cvs.openbsd.org 2014/02/03 23:28:00 + [ssh-ecdsa.c] + fix memory leak; ECDSA_SIG_new() allocates 'r' and 's' for us, unlike + DSA_SIG_new. Reported by Batz Spear; ok markus@ + - djm@cvs.openbsd.org 2014/02/02 03:44:31 + [digest-libc.c digest-openssl.c] + convert memset of potentially-private data to explicit_bzero() + - djm@cvs.openbsd.org 2014/02/04 00:24:29 + [ssh.c] + delay lowercasing of hostname until right before hostname + canonicalisation to unbreak case-sensitive matching of ssh_config; + reported by Ike Devolder; ok markus@ + - (djm) [openbsd-compat/Makefile.in] Add missing explicit_bzero.o + - (djm) [regress/setuid-allowed.c] Missing string.h for strerror() + +20140131 + - (djm) [sandbox-seccomp-filter.c sandbox-systrace.c] Allow shutdown(2) + syscall from sandboxes; it may be called by packet_close. + - (dtucker) [readconf.c] Include for the hton macros. Fixes + build with HP-UX's compiler. Patch from Kevin Brott. + - (tim) [Makefile.in] build regress/setuid-allow. + 20140130 - (djm) [configure.ac] Only check for width-specified integer types in headers that actually exist. patch from Tom G. Christensen; @@ -2663,3 +2884,4 @@ [contrib/suse/openssh.spec] Update for release 6.0 - (djm) [README] Update URL to release notes. - (djm) Release openssh-6.0 + Modified: stable/10/crypto/openssh/Makefile.in ============================================================================== --- stable/10/crypto/openssh/Makefile.in Sat Apr 12 19:58:31 2014 (r264376) +++ stable/10/crypto/openssh/Makefile.in Sat Apr 12 20:22:59 2014 (r264377) @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.352 2014/01/27 06:35:04 dtucker Exp $ +# $Id: Makefile.in,v 1.356 2014/02/04 00:12:56 djm Exp $ # uncomment if you run a non bourne compatable shell. Ie. csh #SHELL = @SH@ @@ -73,9 +73,9 @@ LIBSSH_OBJS=authfd.o authfile.o bufaux.o monitor_fdpass.o rijndael.o ssh-dss.o ssh-ecdsa.o ssh-rsa.o dh.o \ kexdh.o kexgex.o kexdhc.o kexgexc.o bufec.o kexecdh.o kexecdhc.o \ msg.o progressmeter.o dns.o entropy.o gss-genr.o umac.o umac128.o \ - jpake.o schnorr.o ssh-pkcs11.o krl.o smult_curve25519_ref.o \ + ssh-pkcs11.o krl.o smult_curve25519_ref.o \ kexc25519.o kexc25519c.o poly1305.o chacha.o cipher-chachapoly.o \ - ssh-ed25519.o digest.o \ + ssh-ed25519.o digest-openssl.o hmac.o \ sc25519.o ge25519.o fe25519.o ed25519.o verify.o hash.o blocks.o SSHOBJS= ssh.o readconf.o clientloop.o sshtty.o \ @@ -88,7 +88,7 @@ SSHDOBJS=sshd.o auth-rhosts.o auth-passw auth.o auth1.o auth2.o auth-options.o session.o \ auth-chall.o auth2-chall.o groupaccess.o \ auth-skey.o auth-bsdauth.o auth2-hostbased.o auth2-kbdint.o \ - auth2-none.o auth2-passwd.o auth2-pubkey.o auth2-jpake.o \ + auth2-none.o auth2-passwd.o auth2-pubkey.o \ monitor_mm.o monitor.o monitor_wrap.o kexdhs.o kexgexs.o kexecdhs.o \ kexc25519s.o auth-krb5.o \ auth2-gss.o gss-serv.o gss-serv-krb5.o \ @@ -408,7 +408,7 @@ regress/setuid-allowed$(EXEEXT): $(srcdi $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $? \ $(LDFLAGS) -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS) -tests interop-tests: $(TARGETS) regress/modpipe$(EXEEXT) +tests interop-tests: $(TARGETS) regress/modpipe$(EXEEXT) regress/setuid-allowed$(EXEEXT) BUILDDIR=`pwd`; \ TEST_SHELL="@TEST_SHELL@"; \ TEST_SSH_SCP="$${BUILDDIR}/scp"; \ Modified: stable/10/crypto/openssh/README ============================================================================== --- stable/10/crypto/openssh/README Sat Apr 12 19:58:31 2014 (r264376) +++ stable/10/crypto/openssh/README Sat Apr 12 20:22:59 2014 (r264377) @@ -1,4 +1,4 @@ -See http://www.openssh.com/txt/release-6.5 for the release notes. +See http://www.openssh.com/txt/release-6.6 for the release notes. - A Japanese translation of this document and of the OpenSSH FAQ is - available at http://www.unixuser.org/~haruyama/security/openssh/index.html @@ -62,4 +62,4 @@ References - [6] http://www.openbsd.org/cgi-bin/man.cgi?query=style&sektion=9 [7] http://www.openssh.com/faq.html -$Id: README,v 1.85 2014/01/16 07:51:45 djm Exp $ +$Id: README,v 1.86 2014/02/27 23:03:53 djm Exp $ Modified: stable/10/crypto/openssh/auth-rsa.c ============================================================================== --- stable/10/crypto/openssh/auth-rsa.c Sat Apr 12 19:58:31 2014 (r264376) +++ stable/10/crypto/openssh/auth-rsa.c Sat Apr 12 20:22:59 2014 (r264377) @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-rsa.c,v 1.85 2013/07/12 00:19:58 djm Exp $ */ +/* $OpenBSD: auth-rsa.c,v 1.86 2014/01/27 19:18:54 markus Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -20,7 +20,6 @@ #include #include -#include #include #include @@ -48,6 +47,8 @@ #include "ssh.h" #include "misc.h" +#include "digest.h" + /* import */ extern ServerOptions options; @@ -91,12 +92,13 @@ int auth_rsa_verify_response(Key *key, BIGNUM *challenge, u_char response[16]) { u_char buf[32], mdbuf[16]; - MD5_CTX md; + struct ssh_digest_ctx *md; int len; /* don't allow short keys */ if (BN_num_bits(key->rsa->n) < SSH_RSA_MINIMUM_MODULUS_SIZE) { - error("auth_rsa_verify_response: RSA modulus too small: %d < minimum %d bits", + error("%s: RSA modulus too small: %d < minimum %d bits", + __func__, BN_num_bits(key->rsa->n), SSH_RSA_MINIMUM_MODULUS_SIZE); return (0); } @@ -104,13 +106,15 @@ auth_rsa_verify_response(Key *key, BIGNU /* The response is MD5 of decrypted challenge plus session id. */ len = BN_num_bytes(challenge); if (len <= 0 || len > 32) - fatal("auth_rsa_verify_response: bad challenge length %d", len); + fatal("%s: bad challenge length %d", __func__, len); memset(buf, 0, 32); BN_bn2bin(challenge, buf + 32 - len); - MD5_Init(&md); - MD5_Update(&md, buf, 32); - MD5_Update(&md, session_id, 16); - MD5_Final(mdbuf, &md); + if ((md = ssh_digest_start(SSH_DIGEST_MD5)) == NULL || + ssh_digest_update(md, buf, 32) < 0 || + ssh_digest_update(md, session_id, 16) < 0 || + ssh_digest_final(md, mdbuf, sizeof(mdbuf)) < 0) + fatal("%s: md5 failed", __func__); + ssh_digest_free(md); /* Verify that the response is the original challenge. */ if (timingsafe_bcmp(response, mdbuf, 16) != 0) { Modified: stable/10/crypto/openssh/auth.h ============================================================================== --- stable/10/crypto/openssh/auth.h Sat Apr 12 19:58:31 2014 (r264376) +++ stable/10/crypto/openssh/auth.h Sat Apr 12 20:22:59 2014 (r264377) @@ -1,4 +1,4 @@ -/* $OpenBSD: auth.h,v 1.76 2013/07/19 07:37:48 markus Exp $ */ +/* $OpenBSD: auth.h,v 1.77 2014/01/29 06:18:35 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. @@ -61,7 +61,6 @@ struct Authctxt { char *style; void *kbdintctxt; char *info; /* Extra info for next auth_log */ - void *jpake_ctx; #ifdef BSD_AUTH auth_session_t *as; #endif @@ -175,9 +174,6 @@ int bsdauth_respond(void *, u_int, char int skey_query(void *, char **, char **, u_int *, char ***, u_int **); int skey_respond(void *, u_int, char **); -void auth2_jpake_get_pwdata(Authctxt *, BIGNUM **, char **, char **); -void auth2_jpake_stop(Authctxt *); - int allowed_user(struct passwd *); struct passwd * getpwnamallow(const char *user); Modified: stable/10/crypto/openssh/auth1.c ============================================================================== --- stable/10/crypto/openssh/auth1.c Sat Apr 12 19:58:31 2014 (r264376) +++ stable/10/crypto/openssh/auth1.c Sat Apr 12 20:22:59 2014 (r264377) @@ -1,4 +1,4 @@ -/* $OpenBSD: auth1.c,v 1.79 2013/05/19 02:42:42 djm Exp $ */ +/* $OpenBSD: auth1.c,v 1.80 2014/02/02 03:44:31 djm Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -129,7 +129,7 @@ auth1_process_password(Authctxt *authctx /* Try authentication with the password. */ authenticated = PRIVSEP(auth_password(authctxt, password)); - memset(password, 0, dlen); + explicit_bzero(password, dlen); free(password); return (authenticated); @@ -222,7 +222,7 @@ auth1_process_tis_response(Authctxt *aut response = packet_get_string(&dlen); packet_check_eom(); authenticated = verify_response(authctxt, response); - memset(response, 'r', dlen); + explicit_bzero(response, dlen); free(response); return (authenticated); Modified: stable/10/crypto/openssh/auth2-chall.c ============================================================================== --- stable/10/crypto/openssh/auth2-chall.c Sat Apr 12 19:58:31 2014 (r264376) +++ stable/10/crypto/openssh/auth2-chall.c Sat Apr 12 20:22:59 2014 (r264377) @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-chall.c,v 1.39 2013/11/08 00:39:14 djm Exp $ */ +/* $OpenBSD: auth2-chall.c,v 1.41 2014/02/02 03:44:31 djm Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * Copyright (c) 2001 Per Allansson. All rights reserved. @@ -148,7 +148,7 @@ kbdint_free(KbdintAuthctxt *kbdintctxt) if (kbdintctxt->device) kbdint_reset_device(kbdintctxt); free(kbdintctxt->devices); - bzero(kbdintctxt, sizeof(*kbdintctxt)); + explicit_bzero(kbdintctxt, sizeof(*kbdintctxt)); free(kbdintctxt); } /* get next device */ @@ -312,7 +312,7 @@ input_userauth_info_response(int type, u res = kbdintctxt->device->respond(kbdintctxt->ctxt, nresp, response); for (i = 0; i < nresp; i++) { - memset(response[i], 'r', strlen(response[i])); + explicit_bzero(response[i], strlen(response[i])); free(response[i]); } free(response); Modified: stable/10/crypto/openssh/auth2-gss.c ============================================================================== --- stable/10/crypto/openssh/auth2-gss.c Sat Apr 12 19:58:31 2014 (r264376) +++ stable/10/crypto/openssh/auth2-gss.c Sat Apr 12 20:22:59 2014 (r264377) @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-gss.c,v 1.20 2013/05/17 00:13:13 djm Exp $ */ +/* $OpenBSD: auth2-gss.c,v 1.21 2014/02/26 20:28:44 djm Exp $ */ /* * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. @@ -62,7 +62,6 @@ userauth_gssapi(Authctxt *authctxt) gss_OID_desc goid = {0, NULL}; Gssctxt *ctxt = NULL; int mechs; - gss_OID_set supported; int present; OM_uint32 ms; u_int len; @@ -77,7 +76,6 @@ userauth_gssapi(Authctxt *authctxt) return (0); } - ssh_gssapi_supported_oids(&supported); do { mechs--; @@ -90,15 +88,12 @@ userauth_gssapi(Authctxt *authctxt) doid[1] == len - 2) { goid.elements = doid + 2; goid.length = len - 2; - gss_test_oid_set_member(&ms, &goid, supported, - &present); + ssh_gssapi_test_oid_supported(&ms, &goid, &present); } else { logit("Badly formed OID received"); } } while (mechs > 0 && !present); - gss_release_oid_set(&ms, &supported); - if (!present) { free(doid); authctxt->server_caused_failure = 1; Modified: stable/10/crypto/openssh/auth2-passwd.c ============================================================================== --- stable/10/crypto/openssh/auth2-passwd.c Sat Apr 12 19:58:31 2014 (r264376) +++ stable/10/crypto/openssh/auth2-passwd.c Sat Apr 12 20:22:59 2014 (r264377) @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-passwd.c,v 1.10 2013/05/17 00:13:13 djm Exp $ */ +/* $OpenBSD: auth2-passwd.c,v 1.11 2014/02/02 03:44:31 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -59,7 +59,7 @@ userauth_passwd(Authctxt *authctxt) if (change) { /* discard new password from packet */ newpass = packet_get_string(&newlen); - memset(newpass, 0, newlen); + explicit_bzero(newpass, newlen); free(newpass); } packet_check_eom(); @@ -68,7 +68,7 @@ userauth_passwd(Authctxt *authctxt) logit("password change not supported"); else if (PRIVSEP(auth_password(authctxt, password)) == 1) authenticated = 1; - memset(password, 0, len); + explicit_bzero(password, len); free(password); return authenticated; } Modified: stable/10/crypto/openssh/auth2.c ============================================================================== --- stable/10/crypto/openssh/auth2.c Sat Apr 12 19:58:31 2014 (r264376) +++ stable/10/crypto/openssh/auth2.c Sat Apr 12 20:22:59 2014 (r264377) @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2.c,v 1.129 2013/05/19 02:42:42 djm Exp $ */ +/* $OpenBSD: auth2.c,v 1.130 2014/01/29 06:18:35 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -73,9 +73,6 @@ extern Authmethod method_hostbased; #ifdef GSSAPI extern Authmethod method_gssapi; #endif -#ifdef JPAKE -extern Authmethod method_jpake; -#endif Authmethod *authmethods[] = { &method_none, @@ -83,9 +80,6 @@ Authmethod *authmethods[] = { #ifdef GSSAPI &method_gssapi, #endif -#ifdef JPAKE - &method_jpake, -#endif &method_passwd, &method_kbdint, &method_hostbased, @@ -300,9 +294,6 @@ input_userauth_request(int type, u_int32 /* reset state */ auth2_challenge_stop(authctxt); -#ifdef JPAKE - auth2_jpake_stop(authctxt); -#endif #ifdef GSSAPI /* XXX move to auth2_gssapi_stop() */ Modified: stable/10/crypto/openssh/authfd.c ============================================================================== --- stable/10/crypto/openssh/authfd.c Sat Apr 12 19:58:31 2014 (r264376) +++ stable/10/crypto/openssh/authfd.c Sat Apr 12 20:22:59 2014 (r264377) @@ -1,4 +1,4 @@ -/* $OpenBSD: authfd.c,v 1.91 2013/12/29 04:29:25 djm Exp $ */ +/* $OpenBSD: authfd.c,v 1.92 2014/01/31 16:39:19 tedu Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -102,7 +102,7 @@ ssh_get_authentication_socket(void) if (!authsocket) return -1; - bzero(&sunaddr, sizeof(sunaddr)); + memset(&sunaddr, 0, sizeof(sunaddr)); sunaddr.sun_family = AF_UNIX; strlcpy(sunaddr.sun_path, authsocket, sizeof(sunaddr.sun_path)); Modified: stable/10/crypto/openssh/authfile.c ============================================================================== --- stable/10/crypto/openssh/authfile.c Sat Apr 12 19:58:31 2014 (r264376) +++ stable/10/crypto/openssh/authfile.c Sat Apr 12 20:22:59 2014 (r264377) @@ -1,4 +1,4 @@ -/* $OpenBSD: authfile.c,v 1.101 2013/12/29 04:35:50 djm Exp $ */ +/* $OpenBSD: authfile.c,v 1.103 2014/02/02 03:44:31 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -131,7 +131,7 @@ key_private_to_blob2(Key *prv, Buffer *b buffer_put_int(&kdf, rounds); } cipher_init(&ctx, c, key, keylen, key + keylen , ivlen, 1); - memset(key, 0, keylen + ivlen); + explicit_bzero(key, keylen + ivlen); free(key); buffer_init(&encoded); @@ -143,7 +143,7 @@ key_private_to_blob2(Key *prv, Buffer *b key_to_blob(prv, &cp, &len); /* public key */ buffer_put_string(&encoded, cp, len); - memset(cp, 0, len); + explicit_bzero(cp, len); free(cp); buffer_free(&kdf); @@ -409,7 +409,7 @@ key_parse_private2(Buffer *blob, int typ free(salt); free(comment); if (key) - memset(key, 0, keylen + ivlen); + explicit_bzero(key, keylen + ivlen); free(key); buffer_free(&encoded); buffer_free(©); @@ -496,10 +496,10 @@ key_private_rsa1_to_blob(Key *key, Buffe buffer_ptr(&buffer), buffer_len(&buffer), 0, 0) != 0) fatal("%s: cipher_crypt failed", __func__); cipher_cleanup(&ciphercontext); - memset(&ciphercontext, 0, sizeof(ciphercontext)); + explicit_bzero(&ciphercontext, sizeof(ciphercontext)); /* Destroy temporary data. */ - memset(buf, 0, sizeof(buf)); + explicit_bzero(buf, sizeof(buf)); buffer_free(&buffer); buffer_append(blob, buffer_ptr(&encrypted), buffer_len(&encrypted)); @@ -703,17 +703,17 @@ key_load_file(int fd, const char *filena __func__, filename == NULL ? "" : filename, filename == NULL ? "" : " ", strerror(errno)); buffer_clear(blob); - bzero(buf, sizeof(buf)); + explicit_bzero(buf, sizeof(buf)); return 0; } buffer_append(blob, buf, len); if (buffer_len(blob) > MAX_KEY_FILE_SIZE) { buffer_clear(blob); - bzero(buf, sizeof(buf)); + explicit_bzero(buf, sizeof(buf)); goto toobig; } } - bzero(buf, sizeof(buf)); + explicit_bzero(buf, sizeof(buf)); if ((st.st_mode & (S_IFSOCK|S_IFCHR|S_IFIFO)) == 0 && st.st_size != buffer_len(blob)) { debug("%s: key file %.200s%schanged size while reading", @@ -831,7 +831,7 @@ key_parse_private_rsa1(Buffer *blob, con buffer_ptr(©), buffer_len(©), 0, 0) != 0) fatal("%s: cipher_crypt failed", __func__); cipher_cleanup(&ciphercontext); - memset(&ciphercontext, 0, sizeof(ciphercontext)); + explicit_bzero(&ciphercontext, sizeof(ciphercontext)); buffer_free(©); check1 = buffer_get_char(&decrypted); Modified: stable/10/crypto/openssh/bufaux.c ============================================================================== --- stable/10/crypto/openssh/bufaux.c Sat Apr 12 19:58:31 2014 (r264376) +++ stable/10/crypto/openssh/bufaux.c Sat Apr 12 20:22:59 2014 (r264377) @@ -1,4 +1,4 @@ -/* $OpenBSD: bufaux.c,v 1.54 2014/01/12 08:13:13 djm Exp $ */ +/* $OpenBSD: bufaux.c,v 1.56 2014/02/02 03:44:31 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -216,7 +216,7 @@ buffer_get_cstring_ret(Buffer *buffer, u if (cp == ret + length - 1) error("buffer_get_cstring_ret: string contains \\0"); else { - bzero(ret, length); + explicit_bzero(ret, length); free(ret); return NULL; } @@ -346,7 +346,7 @@ buffer_get_bignum2_as_string_ret(Buffer } ret = xmalloc(len); memcpy(ret, p, len); - memset(p, '\0', len); + explicit_bzero(p, len); free(bin); return ret; } @@ -383,7 +383,7 @@ buffer_put_bignum2_from_string(Buffer *b } memcpy(p, s, l); buffer_put_string(buffer, buf, l + pad); - memset(buf, '\0', l + pad); + explicit_bzero(buf, l + pad); free(buf); } Modified: stable/10/crypto/openssh/bufbn.c ============================================================================== --- stable/10/crypto/openssh/bufbn.c Sat Apr 12 19:58:31 2014 (r264376) +++ stable/10/crypto/openssh/bufbn.c Sat Apr 12 20:22:59 2014 (r264377) @@ -1,4 +1,4 @@ -/* $OpenBSD: bufbn.c,v 1.8 2013/11/08 11:15:19 dtucker Exp $*/ +/* $OpenBSD: bufbn.c,v 1.11 2014/02/27 08:25:09 djm Exp $*/ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -80,7 +80,7 @@ buffer_put_bignum_ret(Buffer *buffer, co /* Store the binary data. */ buffer_append(buffer, buf, oi); - memset(buf, 0, bin_size); + explicit_bzero(buf, bin_size); free(buf); return (0); @@ -108,6 +108,11 @@ buffer_get_bignum_ret(Buffer *buffer, BI return (-1); } bits = get_u16(buf); + if (bits > 65535-7) { + error("buffer_get_bignum_ret: cannot handle BN of size %d", + bits); + return (-1); + } /* Compute the number of binary bytes that follow. */ bytes = (bits + 7) / 8; if (bytes > 8 * 1024) { @@ -173,7 +178,7 @@ buffer_put_bignum2_ret(Buffer *buffer, c } hasnohigh = (buf[1] & 0x80) ? 0 : 1; buffer_put_string(buffer, buf+hasnohigh, bytes-hasnohigh); - memset(buf, 0, bytes); + explicit_bzero(buf, bytes); free(buf); return (0); } Modified: stable/10/crypto/openssh/bufec.c ============================================================================== --- stable/10/crypto/openssh/bufec.c Sat Apr 12 19:58:31 2014 (r264376) +++ stable/10/crypto/openssh/bufec.c Sat Apr 12 20:22:59 2014 (r264377) @@ -1,4 +1,4 @@ -/* $OpenBSD: bufec.c,v 1.2 2013/05/17 00:13:13 djm Exp $ */ +/* $OpenBSD: bufec.c,v 1.3 2014/01/31 16:39:19 tedu Exp $ */ /* * Copyright (c) 2010 Damien Miller * @@ -77,7 +77,7 @@ buffer_put_ecpoint_ret(Buffer *buffer, c ret = 0; out: if (buf != NULL) { - bzero(buf, len); + explicit_bzero(buf, len); free(buf); } BN_CTX_free(bnctx); @@ -130,7 +130,7 @@ buffer_get_ecpoint_ret(Buffer *buffer, c ret = 0; out: BN_CTX_free(bnctx); - bzero(buf, len); + explicit_bzero(buf, len); free(buf); return ret; } Modified: stable/10/crypto/openssh/buffer.c ============================================================================== --- stable/10/crypto/openssh/buffer.c Sat Apr 12 19:58:31 2014 (r264376) +++ stable/10/crypto/openssh/buffer.c Sat Apr 12 20:22:59 2014 (r264377) @@ -1,4 +1,4 @@ -/* $OpenBSD: buffer.c,v 1.34 2013/11/08 11:15:19 dtucker Exp $ */ +/* $OpenBSD: buffer.c,v 1.35 2014/02/02 03:44:31 djm Exp $ */ /* $FreeBSD$ */ /* * Author: Tatu Ylonen @@ -50,7 +50,7 @@ void buffer_free(Buffer *buffer) { if (buffer->alloc > 0) { - memset(buffer->buf, 0, buffer->alloc); + explicit_bzero(buffer->buf, buffer->alloc); buffer->alloc = 0; free(buffer->buf); } Modified: stable/10/crypto/openssh/canohost.c ============================================================================== --- stable/10/crypto/openssh/canohost.c Sat Apr 12 19:58:31 2014 (r264376) +++ stable/10/crypto/openssh/canohost.c Sat Apr 12 20:22:59 2014 (r264377) @@ -192,7 +192,7 @@ ipv64_normalise_mapped(struct sockaddr_s memcpy(&inaddr, ((char *)&a6->sin6_addr) + 12, sizeof(inaddr)); port = a6->sin6_port; - bzero(a4, sizeof(*a4)); + memset(a4, 0, sizeof(*a4)); a4->sin_family = AF_INET; *len = sizeof(*a4); Modified: stable/10/crypto/openssh/channels.c ============================================================================== --- stable/10/crypto/openssh/channels.c Sat Apr 12 19:58:31 2014 (r264376) +++ stable/10/crypto/openssh/channels.c Sat Apr 12 20:22:59 2014 (r264377) @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.328 2013/12/19 01:04:36 djm Exp $ */ +/* $OpenBSD: channels.c,v 1.331 2014/02/26 20:29:29 djm Exp $ */ /* $FreeBSD$ */ /* * Author: Tatu Ylonen @@ -430,7 +430,7 @@ channel_free(Channel *c) if (cc->abandon_cb != NULL) cc->abandon_cb(c, cc->ctx); TAILQ_REMOVE(&c->status_confirms, cc, entry); - bzero(cc, sizeof(*cc)); + explicit_bzero(cc, sizeof(*cc)); free(cc); } if (c->filter_cleanup != NULL && c->filter_ctx != NULL) @@ -1114,6 +1114,9 @@ channel_decode_socks4(Channel *c, fd_set buffer_get(&c->input, (char *)&s4_req.dest_addr, 4); have = buffer_len(&c->input); p = buffer_ptr(&c->input); + if (memchr(p, '\0', have) == NULL) + fatal("channel %d: decode socks4: user not nul terminated", + c->self); len = strlen(p); debug2("channel %d: decode socks4: user %s/%d", c->self, p, len); len++; /* trailing '\0' */ @@ -1428,7 +1431,7 @@ port_open_helper(Channel *c, char *rtype int direct; char buf[1024]; char *local_ipaddr = get_local_ipaddr(c->sock); - int local_port = get_sock_port(c->sock, 1); + int local_port = c->sock == -1 ? 65536 : get_sock_port(c->sock, 1); char *remote_ipaddr = get_peer_ipaddr(c->sock); int remote_port = get_peer_port(c->sock); @@ -2724,7 +2727,7 @@ channel_input_status_confirm(int type, u return; cc->cb(type, c, cc->ctx); TAILQ_REMOVE(&c->status_confirms, cc, entry); - bzero(cc, sizeof(*cc)); + explicit_bzero(cc, sizeof(*cc)); free(cc); } @@ -3373,9 +3376,7 @@ channel_connect_ctx_free(struct channel_ free(cctx->host); if (cctx->aitop) freeaddrinfo(cctx->aitop); - bzero(cctx, sizeof(*cctx)); - cctx->host = NULL; - cctx->ai = cctx->aitop = NULL; + memset(cctx, 0, sizeof(*cctx)); } /* Return CONNECTING channel to remote host, port */ Modified: stable/10/crypto/openssh/cipher-3des1.c ============================================================================== --- stable/10/crypto/openssh/cipher-3des1.c Sat Apr 12 19:58:31 2014 (r264376) +++ stable/10/crypto/openssh/cipher-3des1.c Sat Apr 12 20:22:59 2014 (r264377) @@ -1,4 +1,4 @@ -/* $OpenBSD: cipher-3des1.c,v 1.9 2013/11/08 00:39:15 djm Exp $ */ +/* $OpenBSD: cipher-3des1.c,v 1.10 2014/02/02 03:44:31 djm Exp $ */ /* * Copyright (c) 2003 Markus Friedl. All rights reserved. * @@ -93,7 +93,7 @@ ssh1_3des_init(EVP_CIPHER_CTX *ctx, cons if (EVP_CipherInit(&c->k1, EVP_des_cbc(), k1, NULL, enc) == 0 || EVP_CipherInit(&c->k2, EVP_des_cbc(), k2, NULL, !enc) == 0 || EVP_CipherInit(&c->k3, EVP_des_cbc(), k3, NULL, enc) == 0) { - memset(c, 0, sizeof(*c)); + explicit_bzero(c, sizeof(*c)); free(c); EVP_CIPHER_CTX_set_app_data(ctx, NULL); return (0); @@ -134,7 +134,7 @@ ssh1_3des_cleanup(EVP_CIPHER_CTX *ctx) EVP_CIPHER_CTX_cleanup(&c->k1); EVP_CIPHER_CTX_cleanup(&c->k2); EVP_CIPHER_CTX_cleanup(&c->k3); - memset(c, 0, sizeof(*c)); + explicit_bzero(c, sizeof(*c)); free(c); EVP_CIPHER_CTX_set_app_data(ctx, NULL); } Modified: stable/10/crypto/openssh/cipher-chachapoly.c ============================================================================== --- stable/10/crypto/openssh/cipher-chachapoly.c Sat Apr 12 19:58:31 2014 (r264376) +++ stable/10/crypto/openssh/cipher-chachapoly.c Sat Apr 12 20:22:59 2014 (r264377) @@ -14,7 +14,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $OpenBSD: cipher-chachapoly.c,v 1.3 2013/12/15 21:42:35 djm Exp $ */ +/* $OpenBSD: cipher-chachapoly.c,v 1.4 2014/01/31 16:39:19 tedu Exp $ */ #include "includes.h" @@ -58,7 +58,7 @@ chachapoly_crypt(struct chachapoly_ctx * * Run ChaCha20 once to generate the Poly1305 key. The IV is the * packet sequence number. */ - bzero(poly_key, sizeof(poly_key)); + memset(poly_key, 0, sizeof(poly_key)); put_u64(seqbuf, seqnr); chacha_ivsetup(&ctx->main_ctx, seqbuf, NULL); chacha_encrypt_bytes(&ctx->main_ctx, @@ -90,9 +90,9 @@ chachapoly_crypt(struct chachapoly_ctx * r = 0; out: - bzero(expected_tag, sizeof(expected_tag)); - bzero(seqbuf, sizeof(seqbuf)); - bzero(poly_key, sizeof(poly_key)); + explicit_bzero(expected_tag, sizeof(expected_tag)); + explicit_bzero(seqbuf, sizeof(seqbuf)); + explicit_bzero(poly_key, sizeof(poly_key)); return r; } Modified: stable/10/crypto/openssh/cipher.c ============================================================================== --- stable/10/crypto/openssh/cipher.c Sat Apr 12 19:58:31 2014 (r264376) +++ stable/10/crypto/openssh/cipher.c Sat Apr 12 20:22:59 2014 (r264377) @@ -1,4 +1,4 @@ -/* $OpenBSD: cipher.c,v 1.94 2014/01/25 10:12:50 dtucker Exp $ */ +/* $OpenBSD: cipher.c,v 1.97 2014/02/07 06:55:54 djm Exp $ */ /* $FreeBSD$ */ /* * Author: Tatu Ylonen @@ -40,8 +40,6 @@ #include -#include - #include #include #include @@ -50,6 +48,8 @@ #include "log.h" #include "misc.h" #include "cipher.h" +#include "buffer.h" +#include "digest.h" /* compatibility with old or broken OpenSSL versions */ #include "openbsd-compat/openssl-compat.h" @@ -234,8 +234,6 @@ ciphers_valid(const char *names) debug("bad cipher %s [%s]", p, names); free(cipher_list); return 0; - } else { - debug3("cipher ok: %s [%s]", p, names); } } debug3("ciphers ok: [%s]", names); @@ -343,7 +341,7 @@ cipher_init(CipherContext *cc, const Cip if (EVP_Cipher(&cc->evp, discard, junk, cipher->discard_len) == 0) fatal("evp_crypt: EVP_Cipher failed during discard"); - memset(discard, 0, cipher->discard_len); + explicit_bzero(discard, cipher->discard_len); free(junk); free(discard); } @@ -428,7 +426,7 @@ void cipher_cleanup(CipherContext *cc) { if ((cc->cipher->flags & CFLAG_CHACHAPOLY) != 0) - memset(&cc->cp_ctx, 0, sizeof(cc->cp_ctx)); + explicit_bzero(&cc->cp_ctx, sizeof(cc->cp_ctx)); else if (EVP_CIPHER_CTX_cleanup(&cc->evp) == 0) error("cipher_cleanup: EVP_CIPHER_CTX_cleanup failed"); } @@ -442,17 +440,15 @@ void cipher_set_key_string(CipherContext *cc, const Cipher *cipher, const char *passphrase, int do_encrypt) { - MD5_CTX md; u_char digest[16]; - MD5_Init(&md); - MD5_Update(&md, (const u_char *)passphrase, strlen(passphrase)); - MD5_Final(digest, &md); + if (ssh_digest_memory(SSH_DIGEST_MD5, passphrase, strlen(passphrase), + digest, sizeof(digest)) < 0) + fatal("%s: md5 failed", __func__); cipher_init(cc, cipher, digest, 16, NULL, 0, do_encrypt); - memset(digest, 0, sizeof(digest)); - memset(&md, 0, sizeof(md)); + explicit_bzero(digest, sizeof(digest)); } /* Modified: stable/10/crypto/openssh/clientloop.c ============================================================================== --- stable/10/crypto/openssh/clientloop.c Sat Apr 12 19:58:31 2014 (r264376) +++ stable/10/crypto/openssh/clientloop.c Sat Apr 12 20:22:59 2014 (r264377) @@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.256 2013/11/20 20:54:10 deraadt Exp $ */ +/* $OpenBSD: clientloop.c,v 1.258 2014/02/02 03:44:31 djm Exp $ */ /* $FreeBSD$ */ /* * Author: Tatu Ylonen @@ -550,7 +550,7 @@ client_global_request_reply(int type, u_ gc->cb(type, seq, gc->ctx); if (--gc->ref_count <= 0) { TAILQ_REMOVE(&global_confirms, gc, entry); - bzero(gc, sizeof(*gc)); + explicit_bzero(gc, sizeof(*gc)); free(gc); } @@ -877,7 +877,7 @@ process_cmdline(void) int cancel_port, ok; Forward fwd; - bzero(&fwd, sizeof(fwd)); + memset(&fwd, 0, sizeof(fwd)); fwd.listen_host = fwd.connect_host = NULL; leave_raw_mode(options.request_tty == REQUEST_TTY_FORCE); @@ -1762,7 +1762,7 @@ client_input_stdout_data(int type, u_int char *data = packet_get_string(&data_len); packet_check_eom(); buffer_append(&stdout_buffer, data, data_len); - memset(data, 0, data_len); + explicit_bzero(data, data_len); free(data); } static void @@ -1772,7 +1772,7 @@ client_input_stderr_data(int type, u_int char *data = packet_get_string(&data_len); packet_check_eom(); buffer_append(&stderr_buffer, data, data_len); - memset(data, 0, data_len); + explicit_bzero(data, data_len); free(data); } static void Modified: stable/10/crypto/openssh/config.h ============================================================================== --- stable/10/crypto/openssh/config.h Sat Apr 12 19:58:31 2014 (r264376) +++ stable/10/crypto/openssh/config.h Sat Apr 12 20:22:59 2014 (r264377) @@ -415,6 +415,9 @@ /* Define to 1 if you have the `EVP_MD_CTX_cleanup' function. */ #define HAVE_EVP_MD_CTX_CLEANUP 1 +/* Define to 1 if you have the `EVP_MD_CTX_copy_ex' function. */ +#define HAVE_EVP_MD_CTX_COPY_EX 1 + /* Define to 1 if you have the `EVP_MD_CTX_init' function. */ #define HAVE_EVP_MD_CTX_INIT 1 @@ -424,6 +427,9 @@ /* Define if you have ut_exit in utmp.h */ /* #undef HAVE_EXIT_IN_UTMP */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat Apr 12 20:32:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 99B0CD43; Sat, 12 Apr 2014 20:32:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85A8B1BF3; Sat, 12 Apr 2014 20:32:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3CKWlbE029850; Sat, 12 Apr 2014 20:32:47 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3CKWlAF029848; Sat, 12 Apr 2014 20:32:47 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404122032.s3CKWlAF029848@svn.freebsd.org> From: Glen Barber Date: Sat, 12 Apr 2014 20:32:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264379 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2014 20:32:47 -0000 Author: gjb Date: Sat Apr 12 20:32:46 2014 New Revision: 264379 URL: http://svnweb.freebsd.org/changeset/base/264379 Log: Document r264377, OpenSSH update to 6.6p1. While here, bump copyright year. Todo: strip old entries from this file since 10.0-RELEASE. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Apr 12 20:28:39 2014 (r264378) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Apr 12 20:32:46 2014 (r264379) @@ -27,6 +27,7 @@ 2011 2012 2013 + 2014 The &os; Documentation Project @@ -455,6 +456,9 @@ hv_vmbus_load="YES" Al Userland Changes + OpenSSH has + been updated to version 6.6p1. + On platforms where &man.clang.1; is the default system compiler, (such as i386, amd64, arm) GCC and GNU libstdc++ are no longer built by default. &man.clang.1; and libc++ from LLVM are used on From owner-svn-src-stable@FreeBSD.ORG Sat Apr 12 20:42:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB4A0CC; Sat, 12 Apr 2014 20:42:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D555C1CAC; Sat, 12 Apr 2014 20:42:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3CKg3Y0033916; Sat, 12 Apr 2014 20:42:03 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3CKg3kZ033915; Sat, 12 Apr 2014 20:42:03 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404122042.s3CKg3kZ033915@svn.freebsd.org> From: Glen Barber Date: Sat, 12 Apr 2014 20:42:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264380 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2014 20:42:04 -0000 Author: gjb Date: Sat Apr 12 20:42:03 2014 New Revision: 264380 URL: http://svnweb.freebsd.org/changeset/base/264380 Log: Trim stale entries. Use consistent   for empty sections. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Apr 12 20:32:46 2014 (r264379) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Apr 12 20:42:03 2014 (r264380) @@ -111,238 +111,52 @@ Security Advisories - +   Kernel Changes - The use of unmapped VMIO buffers eliminates the need to perform - TLB shootdown for mapping on buffer creation and reuse, greatly reducing the - amount of IPIs for shootdown on big-SMP machines and eliminating up to 25-30% - of the system time on i/o intensive workloads. - - The maximum amount of memory the &os; kernel - can address has been increased from 1TB to 4TB. - - A new &man.cpuset.2; API has been added - for thread to CPU binding and CPU resource grouping and - assignment. The &man.cpuset.1; userland utility has been added - to allow manipulation of processor sets. - - The &man.ddb.4; kernel debugger now has an output capture - facility. Input and output from &man.ddb.4; can now be captured - to a memory buffer for later inspection using &man.sysctl.8; or - a textdump. The new capture command controls - this feature. - - The &man.ddb.4; debugger now supports a simple scripting - facility, which supports a set of named scripts consisting of a - set of &man.ddb.4; commands. These commands can be managed from - within &man.ddb.4; or with the use of the new &man.ddb.8; - utility. More details can be found in the &man.ddb.4; manual - page. - - The kernel now supports a new textdump format of kernel - dumps. A textdump provides higher-level information via - mechanically generated/extracted debugging output, rather than a - simple memory dump. This facility can be used to generate brief - kernel bug reports that are rich in debugging information, but - are not dependent on kernel symbol tables or precisely - synchronized source code. More information can be found in the - &man.textdump.4; manual page. - - Kernel support for M:N threading has been removed. While - the KSE (Kernel Scheduled Entities) project was quite successful - in bringing threading to FreeBSD, the M:N approach taken by the - KSE library was never developed to its full potential. - Backwards compatibility for applications using KSE threading - will be provided via &man.libmap.conf.5; for dynamically linked - binaries. The &os; Project greatly appreciates the work of - &a.julian;, &a.deischen;, and &a.davidxu; on KSE support. - - The &os; kernel now exports information about certain kernel - features via the kern.features sysctl tree. - The &man.feature.present.3; library call provides a convenient - interface for user applications to test the presence of - features. - - The &os; kernel now has support for large - memory page mappings (superpages). - - The ULE - scheduler is now the default process scheduler - in GENERIC kernels. - - Support was added for - the new Intel on-CPU Bull Mountain random number - generator, found on IvyBridge and supposedly later CPUs, - accessible with RDRAND instruction. +   Virtualization support - The BSD Hypervisor, &man.bhyve.8; is included - with &os;. &man.bhyve.8; requires Intel CPUs with VT-x and Extended Page Table (EPT) - support. These features are on all Nehalem models and beyond - (e.g. Nehalem and newer), but not on the lower-end Atom CPUs. - - &man.virtio.4; support has been added. &man.virtio.4; is the - name for the paravirtualization interface developed for the Linux KVM, but - since adopted to other virtual machine hypervisors (with the notable exception of Xen). - This work brings in a BSD-licensed clean-room implementation of the virtio kernel drivers - for disk IO (&man.virtio_blk.4; and &man.virtio_scsi.4;), network IO (&man.vtnet.4;), - memory ballooning (&man.virtio_balloon.4;), and PCI. - Tested with on Qemu/KVM, VirtualBox, and &man.bhyve.4;. - - Paravirtualized drivers which - support Microsoft Hyper-V have been imported and made - part of the amd64 GENERIC kernel. For i386, these drivers are not part of - GENERIC, so the following lines must be added to - /boot/loader.conf to load these drivers: - hv_ata_pci_disengage_load="YES" -hv_netsvc_load="YES" -hv_utils_load="YES" -hv_vmbus_load="YES" Alternatively, the Hyper-V drivers can be added to the i386 - kernel by adding device hyperv to the kernel config, and then - recompiling the kernel. Please refer to: - FreeBSD and Microsoft Windows Server Hyper-V support - for full instructions on how to set up Hyper-V support under FreeBSD. - - The &man.vmx.4; driver has been added. - &man.vmx.4; is a VMware VMXNET3 ethernet driver ported from - OpenBSD. - Xen PVHVM virtualization is now - part of the GENERIC kernel. +   ARM support - Raspberry PI support has been added. - Refer to these setup instructions - and quick start - guide. - - The default ABI on ARM is now the ARM EABI. This brings a number of - improvements and allows future support for VFP and Thumb-2. - - ARM support has been greatly improved, including support - for ARMv6 and ARMv7, SMP and thread-local storage (TLS). - Additionally support for some newer SoC like the MV78x60 and OMAP4 was added. - See this announcement - for further details. - - Superpages support on ARM has been added. Superpages support - provides improved performance and scalability by allowing TLB - translations to dynamically cover large physical memory regions. - All ARMv6 and ARMv7-based platforms can take advantage of this feature. - See this page - for further details. +   Boot Loader Changes - The BTX kernel used by the boot - loader has been changed to invoke BIOS routines from real - mode. This change makes it possible to boot &os; from USB - devices. - - A new gptboot boot loader has - been added to support booting from a GPT labeled disk. A - new boot command has been added to - &man.gpt.8;, which makes a GPT disk bootable by writing the - required bits of the boot loader, creating a new boot - partition if required. +   Hardware Support - The &man.cmx.4; driver, a driver for Omnikey CardMan 4040 - PCMCIA smartcard readers, has been added. - - The &man.syscons.4; driver now supports Colemak keyboard layout. - - The &man.uslcom.4; driver, a driver for Silicon - Laboratories CP2101/CP2102-based USB serial adapters, has been - imported from OpenBSD. +   Multimedia Support - Support for version 2.0 of the USB Audio reference design - has been added. New devices should support higher bandwidth, - increased sampling frequency and wider dynamic range. +   Network Interface Support - The &man.ale.4; driver has been added to provide support - for Atheros AR8121/AR8113/AR8114 Gigabit/Fast Ethernet controllers. - - The &man.em.4; driver has been split into two drivers - with some common parts. The &man.em.4; driver will continue - to support adapters up to the 82575, as well as new - client/desktop adapters. A new &man.igb.4; driver - will support new server adapters. - - The &man.jme.4; driver has been added to provide support - for PCIe network adapters based on JMicron JMC250 Gigabit - Ethernet and JMC260 Fast Ethernet controllers. - - The &man.malo.4; driver has been added to provide - support for Marvell Libertas 88W8335 based PCI network - adapters. - - The firmware for the &man.mxge.4; driver has been - updated from 1.4.25 to 1.4.29. - - The &man.sf.4; driver has been overhauled to improve its - performance and to add support for checksum offloading. It - should also work on all architectures. - - The &man.re.4; driver has been overhauled to fix a - number of issues. This driver now has Wake On LAN (WOL) - support. - - The &man.vr.4; driver has been overhauled to fix a - number of outstanding issues. It also now works on all - architectures. - - The &man.wpi.4; driver has - been updated to include a number of stability fixes. - - The &man.cxgbe.4; driver has been updated to support - 40G/10G Ethernet NICs based on Chelsio's Terminator 5 (T5) ASIC. - - The iw_cxgbe driver has been added. This is an - experimental iWARP/RDMA driver - (kernel verbs only) for Chelsio's T4 and T5 based cards. - - The Open Fabrics Enterprise Distribution (OFED) and - OFED Infiniband core has been - updated to the same version as supplied by Linux version 3.7 - - The Mellanox Infiniband driver has been updated to firmware - version 2.30.3200 for ConnectX3 NICs. Support has been added for ConnectX3 VPI NICs, where - each port can be used as Infiniband 56 GB/s or Ethernet 40 GB/s. Support has been added - for dynamically loading kernel modules for Infiniband core (ibcore) and - IP over Infiniband (ipoib). - - &man.netmap.4; has been added. &man.netmap.4; is a framework for - high-performance direct-to-hardware packet IO, offering low latency and high PPS - rates to userland applications while bypassing any kernel-side packet processing. - With &man.netmap.4; it is trivially possible to fully saturate a 10 Gbps network interface with - minimal packet sizes. For more information, see: - Netmap Project. +   @@ -350,107 +164,23 @@ hv_vmbus_load="YES" Al Network Protocols - &man.carp.4; has been rewritten to make addresses - more sane from the viewpoint of routing daemons such as - quagga/zebra. It also brings support for a single redundant - address on the subnet (carpdev), switching state with - &man.ifconfig.8;, better locking and using modern kernel - interfaces to allocate multicast memberships. - Configuration of the CARP protocol via &man.ifconfig.8; has changed, as well as format - of CARP events submitted to &man.devd.8; has changed. See &man.carp.4; - for more information. The arpbalance feature of &man.carp.4; is currently - not supported anymore. - - The &man.pf.4; firewall now supports fine-grain locking - and better utilization on multi-cpu machines resulting in - significant improvements in performance. - - Support for up to 65536 routing tables has been - introduced. - - Support for setting/matching differentiated services - codepoints (DSCP) in IP header has been added to - &man.ipfw.8;. +   Disks and Storage - The &man.aac.4; driver now supports volumes larger than - 2TB in size. - - The &man.ata.4; driver now supports a spindown command for - disks; after a configurable amount of time, if no requests - have been received for a disk, the disk will be spun down - until the next request. The &man.atacontrol.8; utility now - supports a spindown command to configure - this feature. - - The &man.hptrr.4; driver has been updated to version 1.2 - from Highpoint. - - &man.nvme.4; has been added and provides NVM Express support. - NVM Express is an optimized register interface, command set and feature set of - PCI Express (PCIe)-based Solid-State Drives (SSDs). For more information, - see nvmexpress.org. +   File Systems - A new kernel-based iSCSI target and initiator has been - added - - UFS filesystems can now be enlarged with &man.growfs.8; while - mounted read-write. This is especially useful for virtual - machines, allowing the addition of more harddrive space without - interruption of service. - - A state of the art FUSE implementation is now part of the - base system. It allows the use of nearly all fusefs file - systems - - - ZFS - - &man.bsdinstall.8; now supports installing - ZFS on the root file system. It includes a single configuration menu - that allows you to select all of the required details, including - which drives to use, what ZFS RAID level to use (taking into consideration - the selected number of drives), GPT or MBR, GELI encryption, forcing 4K sectors, - pool name, etc. - - TRIM support has been added for - ZFS. - - Support for the high performance LZ4 compression algorithm - has been added to ZFS. LZ4 is usually faster and can achieve a - higher compression ratio than LZJB, the default compression - algorithm - - Support for L2ARC compression has been added to ZFS. - - The zio nop-write improvement from Illumos - was imported into &os;. To reduce I/O, nop-write skips overwriting - data if the checksum (cryptographically secure) of new data - matches the checksum of existing data. It also saves space if - snapshots are in use. This improvement only works only on - datasets with enabled compression, disabled deduplication and - sha256 checksums. - - ZFS will now compare the checksums of incoming writes to - the checksum of the existing on-disk data and avoid issuing any - write I/O for data that has not changed. This will reduce I/O - as well as space usage because if the old block is referenced - by a snapshot, both copies of the block are kept even though - both contain the same data. - - +   - @@ -459,167 +189,10 @@ hv_vmbus_load="YES" Al OpenSSH has been updated to version 6.6p1. - On platforms where &man.clang.1; is the default - system compiler, (such as i386, amd64, arm) GCC and GNU libstdc++ are no - longer built by default. &man.clang.1; and libc++ from LLVM are used on - these platforms by instead. GCC 4.2.1 and libstdc++ are still built - and used by default on pc98 and all other platforms where &man.clang.1; - is not the default system compiler. - - - &man.clang.1; and llvm have been updated to - version 3.3 release. Please refer to - - Clang 3.3 Release Notes. - - BIND has been replaced by &man.unbound.8; for - local dns resolution in the base system. With this change, nslookup - and dig are no longer a part of the base system. Users should - instead use &man.host.1; and &man.drill.1; Alternatively, - nslookup and dig can be obtained by installing the - dns/bind-tools port. - - sysinstall has been removed from the base system. - Auxiliary libraries and tools used by sysinstall such as libdisk, libftpio, - and sade have also been removed. sysinstall has been replaced by - &man.bsdinstall.8; and &man.bsdconfig.8;. - - &man.freebsd-version.1; has been added. This tool - makes a best effort to determine the version and patch level of - the installed kernel and userland. - - GNU patch has been removed from the base system, and replaced - by a BSD-licensed &man.patch.1; program. - - GNU sort has been removed from the base system, and replaced - by a BSD-licensed &man.sort.1; program. - - Berkely yacc (byacc) has been imported - from invisible island. - This brings bison compatibilities to &man.yacc.1; while preserving full - backwards compatibility with previous version of &man.yacc.1;. - - &man.lex.1; has been replaced by flex 2.5.37 - - &man.make.1; has been replaced with the - "Portable" BSD make tool (bmake) from NetBSD. - - The &man.adduser.8; utility now supports - a option to set the mode of a new user's - home directory. - - BSD-licensed versions of &man.ar.1; and &man.ranlib.1;, - based on libarchive, have replaced the GNU - Binutils versions of these utilities. - - BSD-licensed versions of &man.bc.1; and &man.dc.1; have - replaced their GNU counterparts. - - &man.chflags.1; now supports a flag for - verbose output and a flag to ignore errors - with the same semantics as (for example) - &man.chmod.1;. - - For compatibility with other implementations, &man.cp.1; now - supports a flag, which is equivalent to - specifying the flags. - - BSD-licensed version of &man.cpio.1; based on - libarchive, has replaced the GNU cpio. - Note that the GNU cpio is still installed as - gcpio. - - The &man.env.1; program now supports - which will completely unset the given variable - name by removing it from the environment, - instead of just setting it to a null value. - - The &man.fdopendir.3; library function has been added. - - The &man.fetch.3; library now support HTTP 1.1 - If-Modified-Since behavior. The &man.fetch.1; program now - supports - which will only download the specified HTTP URL if the content - is newer than filename. - - &man.find.1; has been enhanced by the addition of a number - of primaries that were present in GNU find but not &os; - &man.find.1;. - - &man.kgdb.1; now supports a new add-kld - command to make it easier to debug crash dumps with kernel - modules. - - The &man.ls.1; program now supports a - option to specify a date format string to be used with the long - format () output. - - &man.nc.1; now supports a switch to - disable the use of TCP options. - - &man.nc.1;'s switch has been deprecated. - It will be removed in a future release. - - The &man.ping6.8; utility now returns 2 - when the packet transmission was successful but no responses - were received (this is the same behavior as &man.ping.8;). - It returned a non-zero value before this change. - - The &man.procstat.1; utility has been added to display - detailed information about processes. - - The &man.realpath.1; utility now supports - a flag to suppress warnings; it now also - accepts multiple paths on its command line. - - &man.sh.1; has many bug fixes, some new features, and will now - refuse to parse some invalid scripts. Additionally, it now - has filename completion and defaults to the "emacs" editing - mode. - - The &man.split.1; utility now supports a - flag to split a file into a certain number of chunks. - - The &man.tar.1; utility now supports a - flag to enable &man.compress.1;-style - compression/decompression. - - The &man.tar.1; utility now supports a - flag to ignore user/group names - on create and extract. - - The &man.tar.1; utility now supports an - flag to sparsify files on extraction. - - The &man.tar.1; utility now supports a - flag to substitute filenames based on the specified regular - expression. - - The &man.tcgetsid.3; library function has been added to - return the process group ID for the session leader for the - controlling terminal. It is defined in IEEE Std 1003.1-2001 - (POSIX). - - &man.top.1; now supports a flag to - provide per-CPU usage statistics. - - &man.zdump.8; is now working properly on 64 bit architectures. - - - &man.traceroute.8; now has the ability to print the AS - number for each hop with the new switch; a - new option allows selecting a particular - WHOIS server. - - &man.traceroute6.8; now supports a flag - to send probe packets with no upper-layer protocol, rather than - the usual UDP probe packets. - <filename>/etc/rc.d</filename> Scripts - +   @@ -627,99 +200,28 @@ hv_vmbus_load="YES" Al Contributed Software - &man.jemalloc.3; has been updated to 3.4.0. - See this link. - for more details. - - AMD has been updated from 6.0.10 - to 6.1.5. - - awk has been updated from 1 May - 2007 release to the 23 October 2007 release. - - bzip2 has been updated from 1.0.4 - to 1.0.5. - - CVS has been removed from the - base system, but is still available from ports - - Subversion has been imported into the base system and - is installed as svnlite. svnlite - should only be used for checking out &os; source and committing, and does not - replace the full Subversion port. - - file has been updated to 5.11. - - hostapd has been - updated from 0.5.8 to 0.5.10. - - IPFilter has been updated to 5.1.2. - - less has been updated to - v458. - - ncurses has been updated from - to 5.7-20081102. - - OpenSSH has been updated - to 6.4. - - OpenPAM has been updated to - the Micrampelis release. - - sendmail has been updated from - 8.14.1 to 8.14.7. - - The timezone database has been updated from - the tzdata2008h release to - the tzdata2009m release. - - The stdtime part of libc, &man.zdump.8; and &man.zic.8; - have been updated from the tzcode2004a - release to the tzcode2009h release. - If you have upgraded from source or via the &man.freebsd-update.8;, - then please run &man.tzsetup.8; to install a new /etc/localtime. - - - WPA Supplicant has been - updated to 2.0. - - xz has been updated - from snapshot as of 12 April 2010 to 5.0.0. - - &man.nvi.1; has been updated to 2.1.2. - - &man.nvi.1; supports wide character locales. - +   - sendmail has been - updated from 8.14.7 to 8.14.8. Ports/Packages Collection Infrastructure - The pkg_add, pkg_create, pkg_delete, pkg_info, - pkg_updating, and pkg_version utilities have been removed. - &man.pkg.7; must now be used to install binary packages. &man.pkg.7; - is the next generation &os; package manager, also referred to as "pkgng". +   Release Engineering and Integration - The supported version of - the GNOME desktop environment - (x11/gnome2) has been - updated from 2.20.1 to 2.22. +   Documentation - +   From owner-svn-src-stable@FreeBSD.ORG Sat Apr 12 20:49:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3F118365; Sat, 12 Apr 2014 20:49:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F5071CE9; Sat, 12 Apr 2014 20:49:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3CKn7O8034855; Sat, 12 Apr 2014 20:49:07 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3CKn7qG034854; Sat, 12 Apr 2014 20:49:07 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404122049.s3CKn7qG034854@svn.freebsd.org> From: Glen Barber Date: Sat, 12 Apr 2014 20:49:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264381 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2014 20:49:08 -0000 Author: gjb Date: Sat Apr 12 20:49:07 2014 New Revision: 264381 URL: http://svnweb.freebsd.org/changeset/base/264381 Log: Clean up leading/trailing whitespace. Rewrap paragraphs and long lines. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Apr 12 20:42:03 2014 (r264380) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Apr 12 20:49:07 2014 (r264381) @@ -1,14 +1,16 @@ %release; ]>
-&os; &release.current; Release Notes - + + &os; &release.current; Release Notes - The &os; Project + + The &os; Project + $FreeBSD$ @@ -41,13 +43,13 @@ - The release notes for &os; &release.current; contain a summary - of the changes made to the &os; base system on the - &release.branch; development line. - This document lists applicable security advisories that were issued since - the last release, as well as significant changes to the &os; - kernel and userland. - Some brief remarks on upgrading are also presented. + The release notes for &os; &release.current; contain + a summary of the changes made to the &os; base system on the + &release.branch; development line. This document lists + applicable security advisories that were issued since the last + release, as well as significant changes to the &os; kernel and + userland. Some brief remarks on upgrading are also + presented. @@ -55,30 +57,32 @@ Introduction This document contains the release notes for &os; - &release.current;. It - describes recently added, changed, or deleted features of &os;. - It also provides some notes on upgrading - from previous versions of &os;. - - The &release.type; distribution to which these release notes - apply represents the latest point along the &release.branch; development - branch since &release.branch; was created. Information regarding pre-built, binary - &release.type; distributions along this branch - can be found at &release.url;. - - The &release.type; distribution to which these release notes - apply represents a point along the &release.branch; development - branch between &release.prev; and the future &release.next;. - Information regarding - pre-built, binary &release.type; distributions along this branch - can be found at &release.url;. - - This distribution of &os; &release.current; is a - &release.type; distribution. It can be found at &release.url; or any of its mirrors. More - information on obtaining this (or other) &release.type; - distributions of &os; can be found in the Obtaining - &os; appendix to the &os; - Handbook. + &release.current;. It describes recently added, changed, or + deleted features of &os;. It also provides some notes on + upgrading from previous versions of &os;. + + The &release.type; distribution to which + these release notes apply represents the latest point along the + &release.branch; development branch since &release.branch; was + created. Information regarding pre-built, binary &release.type; + distributions along this branch can be found at &release.url;. + + The &release.type; distribution to + which these release notes apply represents a point along the + &release.branch; development branch between &release.prev; and the + future &release.next;. Information regarding pre-built, binary + &release.type; distributions along this branch can be found at + &release.url;. + + This distribution of &os; + &release.current; is a &release.type; distribution. It can be + found at &release.url; or + any of its mirrors. More information on obtaining this (or other) + &release.type; distributions of &os; can be found in the Obtaining + &os; appendix to the &os; Handbook. All users are encouraged to consult the release errata before installing &os;. The errata document is updated with @@ -87,26 +91,22 @@ information on known bugs, security advisories, and corrections to documentation. An up-to-date copy of the errata for &os; &release.current; can be found on the &os; Web site. - What's New - This section describes - the most user-visible new or changed features in &os; - since &release.prev;. - - Typical release note items - document recent security advisories issued after - &release.prev;, - new drivers or hardware support, new commands or options, - major bug fixes, or contributed software upgrades. They may also - list changes to major ports/packages or release engineering - practices. Clearly the release notes cannot list every single - change made to &os; between releases; this document focuses - primarily on security advisories, user-visible changes, and major - architectural improvements. + This section describes the most user-visible new or changed + features in &os; since &release.prev;. + + Typical release note items document recent security advisories + issued after &release.prev;, new drivers or hardware support, new + commands or options, major bug fixes, or contributed software + upgrades. They may also list changes to major ports/packages or + release engineering practices. Clearly the release notes cannot + list every single change made to &os; between releases; this + document focuses primarily on security advisories, user-visible + changes, and major architectural improvements. Security Advisories @@ -227,15 +227,15 @@ - Upgrading from previous releases of &os; + Upgrading from Previous Releases of &os; - Beginning with &os; 6.2-RELEASE, - binary upgrades between RELEASE versions (and snapshots of the - various security branches) are supported using the - &man.freebsd-update.8; utility. The binary upgrade procedure will - update unmodified userland utilities, as well as unmodified GENERIC or - SMP kernels distributed as a part of an official &os; release. - The &man.freebsd-update.8; utility requires that the host being + Beginning with &os; 6.2-RELEASE, binary + upgrades between RELEASE versions (and snapshots of the various + security branches) are supported using the &man.freebsd-update.8; + utility. The binary upgrade procedure will update unmodified + userland utilities, as well as unmodified GENERIC or SMP kernels + distributed as a part of an official &os; release. The + &man.freebsd-update.8; utility requires that the host being upgraded have Internet connectivity. Source-based upgrades (those based on recompiling the &os; From owner-svn-src-stable@FreeBSD.ORG Sat Apr 12 20:50:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD8D55A8; Sat, 12 Apr 2014 20:50:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 998991CF7; Sat, 12 Apr 2014 20:50:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3CKoVGB035649; Sat, 12 Apr 2014 20:50:31 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3CKoVlC035648; Sat, 12 Apr 2014 20:50:31 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404122050.s3CKoVlC035648@svn.freebsd.org> From: Glen Barber Date: Sat, 12 Apr 2014 20:50:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264382 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2014 20:50:31 -0000 Author: gjb Date: Sat Apr 12 20:50:31 2014 New Revision: 264382 URL: http://svnweb.freebsd.org/changeset/base/264382 Log: Remove reference to FreeBSD 6.2-R in the freebsd-update(8) note. Rewrap. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Apr 12 20:49:07 2014 (r264381) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Apr 12 20:50:31 2014 (r264382) @@ -229,14 +229,14 @@ Upgrading from Previous Releases of &os; - Beginning with &os; 6.2-RELEASE, binary - upgrades between RELEASE versions (and snapshots of the various - security branches) are supported using the &man.freebsd-update.8; - utility. The binary upgrade procedure will update unmodified - userland utilities, as well as unmodified GENERIC or SMP kernels - distributed as a part of an official &os; release. The - &man.freebsd-update.8; utility requires that the host being - upgraded have Internet connectivity. + Binary upgrades between RELEASE versions + (and snapshots of the various security branches) are supported + using the &man.freebsd-update.8; utility. The binary upgrade + procedure will update unmodified userland utilities, as well as + unmodified GENERIC or SMP kernels distributed as a part of an + official &os; release. The &man.freebsd-update.8; utility + requires that the host being upgraded have Internet + connectivity. Source-based upgrades (those based on recompiling the &os; base system from source code) from previous versions are From owner-svn-src-stable@FreeBSD.ORG Sat Apr 12 20:51:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7DBA36D8; Sat, 12 Apr 2014 20:51:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69A211D6E; Sat, 12 Apr 2014 20:51:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3CKpdBt038190; Sat, 12 Apr 2014 20:51:39 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3CKpdKe038189; Sat, 12 Apr 2014 20:51:39 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404122051.s3CKpdKe038189@svn.freebsd.org> From: Glen Barber Date: Sat, 12 Apr 2014 20:51:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264383 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2014 20:51:39 -0000 Author: gjb Date: Sat Apr 12 20:51:38 2014 New Revision: 264383 URL: http://svnweb.freebsd.org/changeset/base/264383 Log: Move OpenSSH entry to 'contrib' where it belongs. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Apr 12 20:50:31 2014 (r264382) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Apr 12 20:51:38 2014 (r264383) @@ -186,8 +186,7 @@ Userland Changes - OpenSSH has - been updated to version 6.6p1. +   <filename>/etc/rc.d</filename> Scripts @@ -200,7 +199,8 @@ Contributed Software -   + OpenSSH has + been updated to version 6.6p1. From owner-svn-src-stable@FreeBSD.ORG Sat Apr 12 23:48:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 007A07BB; Sat, 12 Apr 2014 23:48:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DFB841BB7; Sat, 12 Apr 2014 23:48:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3CNm2YY011121; Sat, 12 Apr 2014 23:48:02 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3CNm2ZO011120; Sat, 12 Apr 2014 23:48:02 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201404122348.s3CNm2ZO011120@svn.freebsd.org> From: Rui Paulo Date: Sat, 12 Apr 2014 23:48:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264390 - stable/10/contrib/wpa/src/drivers X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2014 23:48:03 -0000 Author: rpaulo Date: Sat Apr 12 23:48:02 2014 New Revision: 264390 URL: http://svnweb.freebsd.org/changeset/base/264390 Log: MFC r263925 Enable all cryptocaps because net80211 can do software encryption. Modified: stable/10/contrib/wpa/src/drivers/driver_bsd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/wpa/src/drivers/driver_bsd.c ============================================================================== --- stable/10/contrib/wpa/src/drivers/driver_bsd.c Sat Apr 12 23:40:54 2014 (r264389) +++ stable/10/contrib/wpa/src/drivers/driver_bsd.c Sat Apr 12 23:48:02 2014 (r264390) @@ -1446,6 +1446,17 @@ static int wpa_driver_bsd_capa(struct bs drv->capa.key_mgmt = WPA_DRIVER_CAPA_KEY_MGMT_WPA2 | WPA_DRIVER_CAPA_KEY_MGMT_WPA2_PSK; +#ifdef __FreeBSD__ + drv->capa.enc |= WPA_DRIVER_CAPA_ENC_WEP40 | + WPA_DRIVER_CAPA_ENC_WEP104 | + WPA_DRIVER_CAPA_ENC_TKIP | + WPA_DRIVER_CAPA_ENC_CCMP; +#else + /* + * XXX + * FreeBSD exports hardware cryptocaps. These have no meaning for wpa + * since net80211 performs software crypto. + */ if (devcaps.dc_cryptocaps & IEEE80211_CRYPTO_WEP) drv->capa.enc |= WPA_DRIVER_CAPA_ENC_WEP40 | WPA_DRIVER_CAPA_ENC_WEP104; @@ -1453,6 +1464,7 @@ static int wpa_driver_bsd_capa(struct bs drv->capa.enc |= WPA_DRIVER_CAPA_ENC_TKIP; if (devcaps.dc_cryptocaps & IEEE80211_CRYPTO_AES_CCM) drv->capa.enc |= WPA_DRIVER_CAPA_ENC_CCMP; +#endif if (devcaps.dc_drivercaps & IEEE80211_C_HOSTAP) drv->capa.flags |= WPA_DRIVER_FLAGS_AP; From owner-svn-src-stable@FreeBSD.ORG Sun Apr 13 21:49:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C26492F7; Sun, 13 Apr 2014 21:49:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A21C7190C; Sun, 13 Apr 2014 21:49:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3DLnkgj057208; Sun, 13 Apr 2014 21:49:46 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3DLniqu057196; Sun, 13 Apr 2014 21:49:44 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201404132149.s3DLniqu057196@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 13 Apr 2014 21:49:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264423 - in stable/9: bin/sh tools/regression/bin/sh/expansion X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Apr 2014 21:49:46 -0000 Author: jilles Date: Sun Apr 13 21:49:44 2014 New Revision: 264423 URL: http://svnweb.freebsd.org/changeset/base/264423 Log: MFC r238468: sh: Expand assignment-like words specially for export/readonly/local. Examples: export x=~ now expands the tilde local y=$1 is now safe, even if $1 contains IFS characters or metacharacters. For a word to "look like an assignment", it must start with a name followed by an equals sign, none of which may be quoted. The special treatment applies when the first word (potentially after "command") is "export", "readonly" or "local". There may be quoting characters but no expansions. If "local" is overridden with a function there is no special treatment ("export" and "readonly" cannot be overridden with a function). If things like local arr=(1 2 3) are ever allowed in the future, they cannot call a "local" function. This would either be a run-time error or it would call the builtin. This matches Austin Group bug #351, planned for the next issue of POSIX.1. As for the MFC, it is easy to depend on this feature inadvertently, and adding this fixes a regression from stable/8 that may be apparent in things like local x=${y+a @}. PR: bin/166771 Relnotes: yes Added: stable/9/tools/regression/bin/sh/expansion/export2.0 - copied unchanged from r238468, head/tools/regression/bin/sh/expansion/export2.0 stable/9/tools/regression/bin/sh/expansion/export3.0 - copied unchanged from r238468, head/tools/regression/bin/sh/expansion/export3.0 stable/9/tools/regression/bin/sh/expansion/local1.0 - copied unchanged from r238468, head/tools/regression/bin/sh/expansion/local1.0 stable/9/tools/regression/bin/sh/expansion/local2.0 - copied unchanged from r238468, head/tools/regression/bin/sh/expansion/local2.0 stable/9/tools/regression/bin/sh/expansion/readonly1.0 - copied unchanged from r238468, head/tools/regression/bin/sh/expansion/readonly1.0 Modified: stable/9/bin/sh/eval.c stable/9/bin/sh/exec.c stable/9/bin/sh/exec.h stable/9/bin/sh/sh.1 Directory Properties: stable/9/bin/sh/ (props changed) stable/9/tools/regression/bin/sh/ (props changed) Modified: stable/9/bin/sh/eval.c ============================================================================== --- stable/9/bin/sh/eval.c Sun Apr 13 21:23:15 2014 (r264422) +++ stable/9/bin/sh/eval.c Sun Apr 13 21:49:44 2014 (r264423) @@ -657,6 +657,52 @@ out: result->fd, result->buf, result->nleft, result->jp)); } +static int +mustexpandto(const char *argtext, const char *mask) +{ + for (;;) { + if (*argtext == CTLQUOTEMARK || *argtext == CTLQUOTEEND) { + argtext++; + continue; + } + if (*argtext == CTLESC) + argtext++; + else if (BASESYNTAX[(int)*argtext] == CCTL) + return (0); + if (*argtext != *mask) + return (0); + if (*argtext == '\0') + return (1); + argtext++; + mask++; + } +} + +static int +isdeclarationcmd(struct narg *arg) +{ + int have_command = 0; + + if (arg == NULL) + return (0); + while (mustexpandto(arg->text, "command")) { + have_command = 1; + arg = &arg->next->narg; + if (arg == NULL) + return (0); + /* + * To also allow "command -p" and "command --" as part of + * a declaration command, add code here. + * We do not do this, as ksh does not do it either and it + * is not required by POSIX. + */ + } + return (mustexpandto(arg->text, "export") || + mustexpandto(arg->text, "readonly") || + (mustexpandto(arg->text, "local") && + (have_command || !isfunc("local")))); +} + /* * Check if a builtin can safely be executed in the same process, * even though it should be in a subshell (command substitution). @@ -728,11 +774,12 @@ evalcommand(union node *cmd, int flags, exitstatus = 0; for (argp = cmd->ncmd.args ; argp ; argp = argp->narg.next) { if (varflag && isassignment(argp->narg.text)) { - expandarg(argp, &varlist, EXP_VARTILDE); + expandarg(argp, varflag == 1 ? &varlist : &arglist, + EXP_VARTILDE); continue; - } + } else if (varflag == 1) + varflag = isdeclarationcmd(&argp->narg) ? 2 : 0; expandarg(argp, &arglist, EXP_FULL | EXP_TILDE); - varflag = 0; } *arglist.lastp = NULL; *varlist.lastp = NULL; Modified: stable/9/bin/sh/exec.c ============================================================================== --- stable/9/bin/sh/exec.c Sun Apr 13 21:23:15 2014 (r264422) +++ stable/9/bin/sh/exec.c Sun Apr 13 21:49:44 2014 (r264423) @@ -644,6 +644,19 @@ unsetfunc(const char *name) return (0); } + +/* + * Check if a function by a certain name exists. + */ +int +isfunc(const char *name) +{ + struct tblentry *cmdp; + cmdp = cmdlookup(name, 0); + return (cmdp != NULL && cmdp->cmdtype == CMDFUNCTION); +} + + /* * Shared code for the following builtin commands: * type, command -v, command -V Modified: stable/9/bin/sh/exec.h ============================================================================== --- stable/9/bin/sh/exec.h Sun Apr 13 21:23:15 2014 (r264422) +++ stable/9/bin/sh/exec.h Sun Apr 13 21:49:44 2014 (r264423) @@ -72,5 +72,6 @@ void hashcd(void); void changepath(const char *); void defun(const char *, union node *); int unsetfunc(const char *); +int isfunc(const char *); int typecmd_impl(int, char **, int, const char *); void clearcmdentry(void); Modified: stable/9/bin/sh/sh.1 ============================================================================== --- stable/9/bin/sh/sh.1 Sun Apr 13 21:23:15 2014 (r264422) +++ stable/9/bin/sh/sh.1 Sun Apr 13 21:49:44 2014 (r264423) @@ -1171,6 +1171,20 @@ Assignments are expanded differently fro tilde expansion is also performed after the equals sign and after any colon and usernames are also terminated by colons, and field splitting and pathname expansion are not performed. +.Pp +This special expansion applies not only to assignments that form a simple +command by themselves or precede a command word, +but also to words passed to the +.Ic export , +.Ic local +or +.Ic readonly +built-in commands that have this form. +For this, the builtin's name must be literal +(not the result of an expansion) +and may optionally be preceded by one or more literal instances of +.Ic command +without options. .Ss Positional Parameters A positional parameter is a parameter denoted by a number greater than zero. The shell sets these initially to the values of its command line Copied: stable/9/tools/regression/bin/sh/expansion/export2.0 (from r238468, head/tools/regression/bin/sh/expansion/export2.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/tools/regression/bin/sh/expansion/export2.0 Sun Apr 13 21:49:44 2014 (r264423, copy of r238468, head/tools/regression/bin/sh/expansion/export2.0) @@ -0,0 +1,24 @@ +# $FreeBSD$ + +w='@ @' +check() { + [ "$v" = "$w" ] || echo "Expected $w got $v" +} + +export v=$w +check + +HOME=/known/value +check() { + [ "$v" = ~ ] || echo "Expected $HOME got $v" +} + +export v=~ +check + +check() { + [ "$v" = "x:$HOME" ] || echo "Expected x:$HOME got $v" +} + +export v=x:~ +check Copied: stable/9/tools/regression/bin/sh/expansion/export3.0 (from r238468, head/tools/regression/bin/sh/expansion/export3.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/tools/regression/bin/sh/expansion/export3.0 Sun Apr 13 21:49:44 2014 (r264423, copy of r238468, head/tools/regression/bin/sh/expansion/export3.0) @@ -0,0 +1,30 @@ +# $FreeBSD$ + +w='@ @' +check() { + [ "$v" = "$w" ] || echo "Expected $w got $v" +} + +command export v=$w +check +command command export v=$w +check + +HOME=/known/value +check() { + [ "$v" = ~ ] || echo "Expected $HOME got $v" +} + +command export v=~ +check +command command export v=~ +check + +check() { + [ "$v" = "x:$HOME" ] || echo "Expected x:$HOME got $v" +} + +command export v=x:~ +check +command command export v=x:~ +check Copied: stable/9/tools/regression/bin/sh/expansion/local1.0 (from r238468, head/tools/regression/bin/sh/expansion/local1.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/tools/regression/bin/sh/expansion/local1.0 Sun Apr 13 21:49:44 2014 (r264423, copy of r238468, head/tools/regression/bin/sh/expansion/local1.0) @@ -0,0 +1,28 @@ +# $FreeBSD$ + +run_test() { + w='@ @' + check() { + [ "$v" = "$w" ] || echo "Expected $w got $v" + } + + local v=$w + check + + HOME=/known/value + check() { + [ "$v" = ~ ] || echo "Expected $HOME got $v" + } + + local v=~ + check + + check() { + [ "$v" = "x:$HOME" ] || echo "Expected x:$HOME got $v" + } + + local v=x:~ + check +} + +run_test Copied: stable/9/tools/regression/bin/sh/expansion/local2.0 (from r238468, head/tools/regression/bin/sh/expansion/local2.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/tools/regression/bin/sh/expansion/local2.0 Sun Apr 13 21:49:44 2014 (r264423, copy of r238468, head/tools/regression/bin/sh/expansion/local2.0) @@ -0,0 +1,34 @@ +# $FreeBSD$ + +run_test() { + w='@ @' + check() { + [ "$v" = "$w" ] || echo "Expected $w got $v" + } + + command local v=$w + check + command command local v=$w + check + + HOME=/known/value + check() { + [ "$v" = ~ ] || echo "Expected $HOME got $v" + } + + command local v=~ + check + command command local v=~ + check + + check() { + [ "$v" = "x:$HOME" ] || echo "Expected x:$HOME got $v" + } + + command local v=x:~ + check + command command local v=x:~ + check +} + +run_test Copied: stable/9/tools/regression/bin/sh/expansion/readonly1.0 (from r238468, head/tools/regression/bin/sh/expansion/readonly1.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/tools/regression/bin/sh/expansion/readonly1.0 Sun Apr 13 21:49:44 2014 (r264423, copy of r238468, head/tools/regression/bin/sh/expansion/readonly1.0) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +w='@ @' + +v=0 HOME=/known/value +readonly v=~:~/:$w +[ "$v" = "$HOME:$HOME/:$w" ] || echo "Expected $HOME/:$w got $v" From owner-svn-src-stable@FreeBSD.ORG Sun Apr 13 22:00:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B7339854; Sun, 13 Apr 2014 22:00:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 895C019F2; Sun, 13 Apr 2014 22:00:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3DM0omU064118; Sun, 13 Apr 2014 22:00:50 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3DM0ohM064117; Sun, 13 Apr 2014 22:00:50 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201404132200.s3DM0ohM064117@svn.freebsd.org> From: Devin Teske Date: Sun, 13 Apr 2014 22:00:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264425 - stable/9/sys/netsmb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Apr 2014 22:00:50 -0000 Author: dteske Date: Sun Apr 13 22:00:50 2014 New Revision: 264425 URL: http://svnweb.freebsd.org/changeset/base/264425 Log: MFC r250243: If the kernel is compiled with VMIMAGE support, the first attempt of mounting smbfs share will cause a panic. Fix setting/restoring vnet context when needed. PR: kern/168077 Submitted by: dteske Modified: stable/9/sys/netsmb/smb_trantcp.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/netsmb/smb_trantcp.c ============================================================================== --- stable/9/sys/netsmb/smb_trantcp.c Sun Apr 13 21:52:27 2014 (r264424) +++ stable/9/sys/netsmb/smb_trantcp.c Sun Apr 13 22:00:50 2014 (r264425) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -79,13 +80,17 @@ static int nb_setsockopt_int(struct socket *so, int level, int name, int val) { struct sockopt sopt; + int error; bzero(&sopt, sizeof(sopt)); sopt.sopt_level = level; sopt.sopt_name = name; sopt.sopt_val = &val; sopt.sopt_valsize = sizeof(val); - return sosetopt(so, &sopt); + CURVNET_SET(so->so_vnet); + error = sosetopt(so, &sopt); + CURVNET_RESTORE(); + return error; } static int @@ -286,8 +291,10 @@ nbssn_recvhdr(struct nbpcb *nbp, int *le auio.uio_offset = 0; auio.uio_resid = sizeof(len); auio.uio_td = td; + CURVNET_SET(so->so_vnet); error = soreceive(so, (struct sockaddr **)NULL, &auio, (struct mbuf **)NULL, (struct mbuf **)NULL, &flags); + CURVNET_RESTORE(); if (error) return error; if (auio.uio_resid > 0) { @@ -371,8 +378,10 @@ nbssn_recv(struct nbpcb *nbp, struct mbu */ do { rcvflg = MSG_WAITALL; + CURVNET_SET(so->so_vnet); error = soreceive(so, (struct sockaddr **)NULL, &auio, &tm, (struct mbuf **)NULL, &rcvflg); + CURVNET_RESTORE(); } while (error == EWOULDBLOCK || error == EINTR || error == ERESTART); if (error) From owner-svn-src-stable@FreeBSD.ORG Sun Apr 13 22:16:19 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38AC9E73; Sun, 13 Apr 2014 22:16:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B2CE1B73; Sun, 13 Apr 2014 22:16:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3DMGI6R069602; Sun, 13 Apr 2014 22:16:18 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3DMGIti069601; Sun, 13 Apr 2014 22:16:18 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201404132216.s3DMGIti069601@svn.freebsd.org> From: Devin Teske Date: Sun, 13 Apr 2014 22:16:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r264426 - stable/8/sys/netsmb X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Apr 2014 22:16:19 -0000 Author: dteske Date: Sun Apr 13 22:16:18 2014 New Revision: 264426 URL: http://svnweb.freebsd.org/changeset/base/264426 Log: MFC r250243: If the kernel is compiled with VMIMAGE support, the first attempt of mounting smbfs share will cause a panic. Fix setting/restoring vnet context when needed. PR: kern/168077 Submitted by: dteske Modified: stable/8/sys/netsmb/smb_trantcp.c Directory Properties: stable/8/ (props changed) stable/8/sys/ (props changed) stable/8/sys/netsmb/ (props changed) Modified: stable/8/sys/netsmb/smb_trantcp.c ============================================================================== --- stable/8/sys/netsmb/smb_trantcp.c Sun Apr 13 22:00:50 2014 (r264425) +++ stable/8/sys/netsmb/smb_trantcp.c Sun Apr 13 22:16:18 2014 (r264426) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -85,13 +86,17 @@ static int nb_setsockopt_int(struct socket *so, int level, int name, int val) { struct sockopt sopt; + int error; bzero(&sopt, sizeof(sopt)); sopt.sopt_level = level; sopt.sopt_name = name; sopt.sopt_val = &val; sopt.sopt_valsize = sizeof(val); - return sosetopt(so, &sopt); + CURVNET_SET(so->so_vnet); + error = sosetopt(so, &sopt); + CURVNET_RESTORE(); + return error; } static int @@ -292,8 +297,10 @@ nbssn_recvhdr(struct nbpcb *nbp, int *le auio.uio_offset = 0; auio.uio_resid = sizeof(len); auio.uio_td = td; + CURVNET_SET(so->so_vnet); error = soreceive(so, (struct sockaddr **)NULL, &auio, (struct mbuf **)NULL, (struct mbuf **)NULL, &flags); + CURVNET_RESTORE(); if (error) return error; if (auio.uio_resid > 0) { @@ -377,8 +384,10 @@ nbssn_recv(struct nbpcb *nbp, struct mbu */ do { rcvflg = MSG_WAITALL; + CURVNET_SET(so->so_vnet); error = soreceive(so, (struct sockaddr **)NULL, &auio, &tm, (struct mbuf **)NULL, &rcvflg); + CURVNET_RESTORE(); } while (error == EWOULDBLOCK || error == EINTR || error == ERESTART); if (error) From owner-svn-src-stable@FreeBSD.ORG Sun Apr 13 22:32:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E0485E5; Sun, 13 Apr 2014 22:32:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1AC61CBB; Sun, 13 Apr 2014 22:32:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3DMWk2o077531; Sun, 13 Apr 2014 22:32:46 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3DMWkNI077529; Sun, 13 Apr 2014 22:32:46 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201404132232.s3DMWkNI077529@svn.freebsd.org> From: Devin Teske Date: Sun, 13 Apr 2014 22:32:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264427 - stable/9/usr.sbin/bsdconfig/share X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Apr 2014 22:32:47 -0000 Author: dteske Date: Sun Apr 13 22:32:46 2014 New Revision: 264427 URL: http://svnweb.freebsd.org/changeset/base/264427 Log: MFC r256331: Add $VAR_ZFSINTERACTIVE (zfsInteractive) and new f_zfsinteractive() for determining when a script wants to be nonInteractive but selectively wants ZFS operations to be *interactive* (this is analgous to already existing $VAR_NETINTERACTIVE (netInteractive) and f_netinteractive() used for the same purpose (script wants to be nonInteractive but wants network operations to be *interactive*). Approved by: re (glebius) Modified: stable/9/usr.sbin/bsdconfig/share/variable.subr Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/bsdconfig/ (props changed) Modified: stable/9/usr.sbin/bsdconfig/share/variable.subr ============================================================================== --- stable/9/usr.sbin/bsdconfig/share/variable.subr Sun Apr 13 22:16:18 2014 (r264426) +++ stable/9/usr.sbin/bsdconfig/share/variable.subr Sun Apr 13 22:32:46 2014 (r264427) @@ -205,6 +205,21 @@ f_netinteractive() f_getvar $VAR_NETINTERACTIVE value && [ "$value" ] } +# f_zfsinteractive() +# +# Has the user specifically requested the ZFS-portion of configuration and +# setup to be performed interactively? Returns success if the user has asked +# for the ZFS configuration to be done interactively even if perhaps overall +# non-interactive mode has been requested (by setting nonInteractive). +# +# Returns success if $zfsInteractive is set and non-NULL. +# +f_zfsinteractive() +{ + local value + f_getvar $VAR_ZFSINTERACTIVE value && [ "$value" ] +} + ############################################################ MAIN # @@ -283,6 +298,7 @@ f_variable_new VAR_USER_PASSWORD userPas f_variable_new VAR_USER_PASSWORD_EXPIRE userPasswordExpire f_variable_new VAR_USER_SHELL userShell f_variable_new VAR_USER_UID userUid +f_variable_new VAR_ZFSINTERACTIVE zfsInteractive # # Self-initialize unless requested otherwise From owner-svn-src-stable@FreeBSD.ORG Sun Apr 13 22:41:23 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5356060C; Sun, 13 Apr 2014 22:41:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B3411D9A; Sun, 13 Apr 2014 22:41:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3DMfNCj080826; Sun, 13 Apr 2014 22:41:23 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3DMfNYV080825; Sun, 13 Apr 2014 22:41:23 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404132241.s3DMfNYV080825@svn.freebsd.org> From: Glen Barber Date: Sun, 13 Apr 2014 22:41:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264429 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Apr 2014 22:41:23 -0000 Author: gjb Date: Sun Apr 13 22:41:22 2014 New Revision: 264429 URL: http://svnweb.freebsd.org/changeset/base/264429 Log: Document r260177, camcontrol '-b' addition. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Apr 13 22:35:39 2014 (r264428) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Apr 13 22:41:22 2014 (r264429) @@ -186,7 +186,9 @@ Userland Changes -   + A new flag is added to &man.camcontrol.8;, + -b, which outputs the existing buses and + their parents. <filename>/etc/rc.d</filename> Scripts From owner-svn-src-stable@FreeBSD.ORG Sun Apr 13 22:41:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8CED7808; Sun, 13 Apr 2014 22:41:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E62B1D9D; Sun, 13 Apr 2014 22:41:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3DMfRbo080994; Sun, 13 Apr 2014 22:41:27 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3DMfR9Z080967; Sun, 13 Apr 2014 22:41:27 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404132241.s3DMfR9Z080967@svn.freebsd.org> From: Glen Barber Date: Sun, 13 Apr 2014 22:41:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264431 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Apr 2014 22:41:27 -0000 Author: gjb Date: Sun Apr 13 22:41:26 2014 New Revision: 264431 URL: http://svnweb.freebsd.org/changeset/base/264431 Log: Document r260385, unmapped I/O in GEOM RAID. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Apr 13 22:41:24 2014 (r264430) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Apr 13 22:41:26 2014 (r264431) @@ -118,6 +118,9 @@ Kernel Changes + The &man.geom.4; RAID driver has been + updated to support unmapped I/O. + The vfs.zfs.zio.use_uma &man.sysctl.8; has been re-enabled. On multi-CPU machines with enough RAM, this can easily double &man.zfs.8; performance or From owner-svn-src-stable@FreeBSD.ORG Sun Apr 13 22:41:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C1226E0; Sun, 13 Apr 2014 22:41:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 489EC1D9C; Sun, 13 Apr 2014 22:41:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3DMfP2R080865; Sun, 13 Apr 2014 22:41:25 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3DMfPJZ080864; Sun, 13 Apr 2014 22:41:25 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404132241.s3DMfPJZ080864@svn.freebsd.org> From: Glen Barber Date: Sun, 13 Apr 2014 22:41:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264430 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Apr 2014 22:41:25 -0000 Author: gjb Date: Sun Apr 13 22:41:24 2014 New Revision: 264430 URL: http://svnweb.freebsd.org/changeset/base/264430 Log: Document r260338 Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Apr 13 22:41:22 2014 (r264429) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Apr 13 22:41:24 2014 (r264430) @@ -118,7 +118,13 @@ Kernel Changes -   + The vfs.zfs.zio.use_uma + &man.sysctl.8; has been re-enabled. On multi-CPU machines with + enough RAM, this can easily double &man.zfs.8; performance or + reduce CPU usage in half. It was originally disabled due to + memory and KVA exhastion problem reports, + which should be resolved due to several change in the VM + subsystem. Virtualization support From owner-svn-src-stable@FreeBSD.ORG Sun Apr 13 22:41:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2DC038EF; Sun, 13 Apr 2014 22:41:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2EE671DA3; Sun, 13 Apr 2014 22:41:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3DMfTGE081301; Sun, 13 Apr 2014 22:41:29 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3DMfTkN081300; Sun, 13 Apr 2014 22:41:29 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404132241.s3DMfTkN081300@svn.freebsd.org> From: Glen Barber Date: Sun, 13 Apr 2014 22:41:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264432 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Apr 2014 22:41:30 -0000 Author: gjb Date: Sun Apr 13 22:41:28 2014 New Revision: 264432 URL: http://svnweb.freebsd.org/changeset/base/264432 Log: Fix order by svn revision. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Apr 13 22:41:26 2014 (r264431) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Apr 13 22:41:28 2014 (r264432) @@ -118,9 +118,6 @@ Kernel Changes - The &man.geom.4; RAID driver has been - updated to support unmapped I/O. - The vfs.zfs.zio.use_uma &man.sysctl.8; has been re-enabled. On multi-CPU machines with enough RAM, this can easily double &man.zfs.8; performance or @@ -129,6 +126,9 @@ which should be resolved due to several change in the VM subsystem. + The &man.geom.4; RAID driver has been + updated to support unmapped I/O. + Virtualization support From owner-svn-src-stable@FreeBSD.ORG Sun Apr 13 22:41:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 30D5B987; Sun, 13 Apr 2014 22:41:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D4A31DA4; Sun, 13 Apr 2014 22:41:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3DMfUAn081336; Sun, 13 Apr 2014 22:41:30 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3DMfUQT081335; Sun, 13 Apr 2014 22:41:30 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404132241.s3DMfUQT081335@svn.freebsd.org> From: Glen Barber Date: Sun, 13 Apr 2014 22:41:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264433 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Apr 2014 22:41:31 -0000 Author: gjb Date: Sun Apr 13 22:41:30 2014 New Revision: 264433 URL: http://svnweb.freebsd.org/changeset/base/264433 Log: Document r260431, kern.panic_reboot_wait_time sysctl. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Apr 13 22:41:28 2014 (r264432) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Apr 13 22:41:30 2014 (r264433) @@ -129,6 +129,11 @@ The &man.geom.4; RAID driver has been updated to support unmapped I/O. + A new &man.sysctl.8;, + kern.panic_reboot_wait_time, has been added, + which allows controlling how long the system will wait after + &man.panic.9; before rebooting. + Virtualization support From owner-svn-src-stable@FreeBSD.ORG Mon Apr 14 01:18:04 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53808C33; Mon, 14 Apr 2014 01:18:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E68E1B0F; Mon, 14 Apr 2014 01:18:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3E1I46e045063; Mon, 14 Apr 2014 01:18:04 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3E1I2WN045050; Mon, 14 Apr 2014 01:18:02 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201404140118.s3E1I2WN045050@svn.freebsd.org> From: Devin Teske Date: Mon, 14 Apr 2014 01:18:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264437 - in stable/9/usr.sbin/bsdinstall: . scripts X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2014 01:18:04 -0000 Author: dteske Date: Mon Apr 14 01:18:02 2014 New Revision: 264437 URL: http://svnweb.freebsd.org/changeset/base/264437 Log: MFC r256343,256540-256541,256544,256549,256551,256553,257939,258021,258927, 259144,259148,259470,259472,259474,259476-259478,259480-259481,259570, 259597-259598, and 261960 (24 revisions; summarized below)... r256343: Add zfsboot module as an option for automatic configuration r256540: Add zpool_cache_* variables to loader.conf(5) r256541: Document BSDINSTALL_TMPBOOT in bsdinstall.8 r256544: Fix a typo when setting up loader.conf(5) GELI entries r256549: Document zfsboot in bsdinstall.8 r256551: Bump .Dd date in bsdinstall.8 r256553: Align ZFSBOOT_BEROOT_NAME with sysutils/beadm + Solaris beadm r257939: Validate scripted partition entry before acting on disks r258021: Switch default MBR bootcode from /boot/boot0 to /boot/mbr r258927: Fix early regression in enabling the Encryption feature r259144: Fix early regression in entering passphrase for Encryption r259148: Fix typo that broke booting from Encrypted setup r259470: Add default /var/mail with atime=on for mail apps r259472: Accept NULL input as also meaning zero swap r259474: Bug fixes and debugging improvements r259476: Improve default ZFS disk layout r259477: fletcher4 is currently the default r259478: De-uglify the geli(8)-setup infobox by adding a newline r259480: Fix ghosted zroot pool issue r259481: Auto-enable 4k alignment with Encryption r259570: Fix "[: -eq: argument expected" error r259597: Fix installation to 3-4+ disks r259598: Set the cachefile property so bootpools get imported r261960: Add zfsboot to scripted interface of bsdinstall Added: stable/9/usr.sbin/bsdinstall/scripts/zfsboot - copied, changed from r256343, head/usr.sbin/bsdinstall/scripts/zfsboot Modified: stable/9/usr.sbin/bsdinstall/bsdinstall stable/9/usr.sbin/bsdinstall/bsdinstall.8 stable/9/usr.sbin/bsdinstall/scripts/Makefile stable/9/usr.sbin/bsdinstall/scripts/auto stable/9/usr.sbin/bsdinstall/scripts/config stable/9/usr.sbin/bsdinstall/scripts/script Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/bsdinstall/ (props changed) stable/9/usr.sbin/bsdinstall/scripts/ (props changed) Modified: stable/9/usr.sbin/bsdinstall/bsdinstall ============================================================================== --- stable/9/usr.sbin/bsdinstall/bsdinstall Mon Apr 14 00:24:04 2014 (r264436) +++ stable/9/usr.sbin/bsdinstall/bsdinstall Mon Apr 14 01:18:02 2014 (r264437) @@ -41,6 +41,7 @@ BSDCFG_SHARE="/usr/share/bsdconfig" ############################################################ GLOBALS : ${BSDINSTALL_TMPETC="/tmp/bsdinstall_etc"}; export BSDINSTALL_TMPETC +: ${BSDINSTALL_TMPBOOT="/tmp/bsdinstall_boot"}; export BSDINSTALL_TMPBOOT : ${PATH_FSTAB="$BSDINSTALL_TMPETC/fstab"}; export PATH_FSTAB : ${BSDINSTALL_DISTDIR="/usr/freebsd-dist"}; export BSDINSTALL_DISTDIR : ${BSDINSTALL_CHROOT="/mnt"}; export BSDINSTALL_CHROOT @@ -61,6 +62,7 @@ shift $(( $OPTIND - 1 )) VERB="${1:-auto}"; shift [ -d "$BSDINSTALL_TMPETC" ] || mkdir -p "$BSDINSTALL_TMPETC" +[ -d "$BSDINSTALL_TMPBOOT" ] || mkdir -p "$BSDINSTALL_TMPBOOT" # Only enable debugging if debugFile is non-NULL and can be initialized f_quietly f_debug_init Modified: stable/9/usr.sbin/bsdinstall/bsdinstall.8 ============================================================================== --- stable/9/usr.sbin/bsdinstall/bsdinstall.8 Mon Apr 14 00:24:04 2014 (r264436) +++ stable/9/usr.sbin/bsdinstall/bsdinstall.8 Mon Apr 14 01:18:02 2014 (r264437) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 6, 2013 +.Dd October 15, 2013 .Dt BSDINSTALL 8 .Os .Sh NAME @@ -121,6 +121,21 @@ installations. Partitions disks, runs .Xr newfs 8 , and writes the new system's .Pa fstab . +.It Cm zfsboot +Provides the installer's +.Pq experimental +interactive/scriptable ZFS partitioner for multi-disk installations. +Creates a single +.Ic zpool +with datasets and writes to the new system's +.Pa rc.conf , +.Pa loader.conf , +and +.Pa fstab . +Supports +.Xr geli 8 , +.Xr gnop 8 , +and many other features. .It Cm partedit Provides the installer's interactive manual disk partitioner, with support for multi disk setups, non-UFS file systems, and manual selection of @@ -267,6 +282,14 @@ will be stored until the target is executed. If this directory does not already exist, it will be created. Default: .Pa /tmp/bsdinstall_etc +.It Ev BSDINSTALL_TMPBOOT +Directory where files destined for the new system's +.Pa /boot +will be stored until the +.Cm config +target is executed. If this directory does not already exist, it will be +created. Default: +.Pa /tmp/bsdinstall_boot .El .Sh SCRIPTING .Nm @@ -320,6 +343,15 @@ the preamble can contain a variable which is passed to the .Cm scriptedpart target to control disk setup. +Alternatively, +instead of +.Ev PARTITIONS , +the preamble can contain the variable +.Ev ZFSBOOT_DATASETS +which is parsed by the +.Pq experimental +.Cm zfsboot +target to control ZFS datasets/options of the boot pool setup. .Ss SETUP SCRIPT Following the preamble is an optional shell script, beginning with a #! declaration. This script will be run at the end of the installation process Modified: stable/9/usr.sbin/bsdinstall/scripts/Makefile ============================================================================== --- stable/9/usr.sbin/bsdinstall/scripts/Makefile Mon Apr 14 00:24:04 2014 (r264436) +++ stable/9/usr.sbin/bsdinstall/scripts/Makefile Mon Apr 14 01:18:02 2014 (r264437) @@ -2,7 +2,7 @@ SCRIPTS= auto adduser checksum config docsinstall entropy hostname jail \ keymap mirrorselect mount netconfig netconfig_ipv4 netconfig_ipv6 \ - rootpass script services time umount wlanconfig + rootpass script services time umount wlanconfig zfsboot BINDIR= /usr/libexec/bsdinstall NO_MAN= true Modified: stable/9/usr.sbin/bsdinstall/scripts/auto ============================================================================== --- stable/9/usr.sbin/bsdinstall/scripts/auto Mon Apr 14 00:24:04 2014 (r264436) +++ stable/9/usr.sbin/bsdinstall/scripts/auto Mon Apr 14 01:18:02 2014 (r264437) @@ -102,21 +102,38 @@ fi rm -f $PATH_FSTAB touch $PATH_FSTAB -dialog --backtitle "FreeBSD Installer" --title "Partitioning" --extra-button \ - --extra-label "Manual" --ok-label "Guided" --cancel-label "Shell" \ - --yesno "Would you like to use the guided partitioning tool (recommended for beginners) or to set up partitions manually (experts)? You can also open a shell and set up partitions entirely by hand." 0 0 +PMODES="\ +Guided \"Partitioning Tool (Recommended for Beginners)\" \ +Manual \"Manually Configure Partitions (Expert)\" \ +Shell \"Open a shell and partition by hand\"" + +CURARCH=$( uname -m ) +case $CURARCH in + amd64|i386) # Booting ZFS Supported + PMODES="$PMODES ZFS \"Automatic Root-on-ZFS (Experimental)\"" + ;; + *) # Booting ZFS Unspported + ;; +esac -case $? in -0) # Guided +exec 3>&1 +PARTMODE=`echo $PMODES | xargs dialog --backtitle "FreeBSD Installer" \ + --title "Partitioning" \ + --menu "How would you like to partition your disk?" \ + 0 0 0 2>&1 1>&3` || exit 1 +exec 3>&- + +case "$PARTMODE" in +"Guided") # Guided bsdinstall autopart || error bsdinstall mount || error ;; -1) # Shell +"Shell") # Shell clear echo "Use this shell to set up partitions for the new system. When finished, mount the system at $BSDINSTALL_CHROOT and place an fstab file for the new system at $PATH_FSTAB. Then type 'exit'. You can also enter the partition editor at any time by entering 'bsdinstall partedit'." sh 2>&1 ;; -3) # Manual +"Manual") # Manual if f_isset debugFile; then # Give partedit the path to our logfile so it can append BSDINSTALL_LOG="${debugFile#+}" bsdinstall partedit || error @@ -125,6 +142,10 @@ case $? in fi bsdinstall mount || error ;; +"ZFS") # ZFS + bsdinstall zfsboot || error + bsdinstall mount || error + ;; *) error ;; Modified: stable/9/usr.sbin/bsdinstall/scripts/config ============================================================================== --- stable/9/usr.sbin/bsdinstall/scripts/config Mon Apr 14 00:24:04 2014 (r264436) +++ stable/9/usr.sbin/bsdinstall/scripts/config Mon Apr 14 01:18:02 2014 (r264437) @@ -34,6 +34,11 @@ rm $BSDINSTALL_TMPETC/rc.conf.* cp $BSDINSTALL_TMPETC/* $BSDINSTALL_CHROOT/etc +cat $BSDINSTALL_TMPBOOT/loader.conf.* >> $BSDINSTALL_TMPBOOT/loader.conf +rm $BSDINSTALL_TMPBOOT/loader.conf.* + +cp $BSDINSTALL_TMPBOOT/* $BSDINSTALL_CHROOT/boot + [ "${debugFile#+}" ] && cp "${debugFile#+}" $BSDINSTALL_CHROOT/var/log/ # Set up other things from installed config Modified: stable/9/usr.sbin/bsdinstall/scripts/script ============================================================================== --- stable/9/usr.sbin/bsdinstall/scripts/script Mon Apr 14 00:24:04 2014 (r264436) +++ stable/9/usr.sbin/bsdinstall/scripts/script Mon Apr 14 01:18:02 2014 (r264437) @@ -95,7 +95,11 @@ fi # Make partitions rm -f $PATH_FSTAB touch $PATH_FSTAB -bsdinstall scriptedpart "$PARTITIONS" +if [ "$ZFSBOOT_DISKS" ]; then + bsdinstall zfsboot +else + bsdinstall scriptedpart "$PARTITIONS" +fi bsdinstall mount # Unpack distributions Copied and modified: stable/9/usr.sbin/bsdinstall/scripts/zfsboot (from r256343, head/usr.sbin/bsdinstall/scripts/zfsboot) ============================================================================== --- head/usr.sbin/bsdinstall/scripts/zfsboot Fri Oct 11 20:41:35 2013 (r256343, copy source) +++ stable/9/usr.sbin/bsdinstall/scripts/zfsboot Mon Apr 14 01:18:02 2014 (r264437) @@ -47,7 +47,7 @@ f_include $BSDCFG_SHARE/variable.subr # # Default name for the boot environment parent dataset # -: ${ZFSBOOT_BEROOT_NAME:=bootenv} +: ${ZFSBOOT_BEROOT_NAME:=ROOT} # # Default name for the primany boot environment @@ -66,23 +66,30 @@ f_include $BSDCFG_SHARE/variable.subr # # Should we use geli(8) to encrypt the drives? +# NB: Automatically enables ZFSBOOT_BOOT_POOL # -: ${ZFSBOOT_GELI_ENCRYPTION:=} +: ${ZFSBOOT_GELI_ENCRYPTION=} # -# Default name the unencrypted pool when using geli(8) to encrypt the drives +# Default path to the geli(8) keyfile used in drive encryption # -: ${ZFSBOOT_GELI_POOL_NAME:=bootpool} +: ${ZFSBOOT_GELI_KEY_FILE:=/boot/encryption.key} # -# Default size for the unencrypted boot pool when using geli(8) +# Create a separate boot pool? +# NB: Automatically set when using geli(8) or MBR # -: ${ZFSBOOT_GELI_BOOT_SIZE:=2g} +: ${ZFSBOOT_BOOT_POOL=} # -# Default path to the geli(8) keyfile used in drive encryption +# Default name for boot pool when enabled (e.g., geli(8) or MBR) # -: ${ZFSBOOT_GELI_KEY_FILE:=/boot/encryption.key} +: ${ZFSBOOT_BOOT_POOL_NAME:=bootpool} + +# +# Default size for boot pool when enabled (e.g., geli(8) or MBR) +# +: ${ZFSBOOT_BOOT_POOL_SIZE:=2g} # # Default disks to use (always empty unless being scripted) @@ -101,7 +108,7 @@ f_include $BSDCFG_SHARE/variable.subr : ${ZFSBOOT_SWAP_SIZE:=2g} # -# Default ZFS layout for root zpool +# Default ZFS datasets for root zpool # # NOTE: Requires /tmp, /var/tmp, /$ZFSBOOT_BOOTFS_NAME/$ZFSBOOT_BOOTFS_NAME # NOTE: Anything after pound/hash character [#] is ignored as a comment. @@ -119,69 +126,117 @@ f_isset ZFSBOOT_DATASETS || ZFSBOOT_DATA # Don't mount /usr so that 'base' files go to the BEROOT /usr mountpoint=/usr,canmount=off - /usr/local # local files (i.e. from packages) separate from base system - # Home directories separated so they are common to all BEs - /usr/home setuid=off + /usr/home # NB: /home is a symlink to /usr/home # Ports tree /usr/ports compression=lz4,setuid=off - /usr/ports/distfiles compression=off,exec=off,setuid=off - /usr/ports/packages compression=off,exec=off,setuid=off # Source tree (compressed) /usr/src compression=lz4,exec=off,setuid=off - /usr/obj # Object files # Create /var and friends /var mountpoint=/var /var/crash compression=lz4,exec=off,setuid=off - /var/db exec=off,setuid=off - /var/db/pkg compression=lz4,exec=off,setuid=off - /var/empty exec=off,setuid=off /var/log compression=lz4,exec=off,setuid=off - /var/mail compression=lz4,exec=off,setuid=off - /var/run exec=off,setuid=off + /var/mail compression=lz4,atime=on /var/tmp compression=lz4,exec=on,setuid=off " # END-QUOTE +# +# If interactive and the user has not explicitly chosen a vdev type or disks, +# make the user confirm scripted/default choices when proceeding to install. +# +: ${ZFSBOOT_CONFIRM_LAYOUT:=1} + ############################################################ GLOBALS # +# Format of a line in printf(1) syntax to add to fstab(5) +# +FSTAB_FMT="%s\t\t%s\t%s\t%s\t\t%s\t%s\n" + +# +# Command strings for various tasks +# +CHMOD_MODE='chmod %s "%s"' +DD_WITH_OPTIONS='dd if="%s" of="%s" %s' +ECHO_APPEND='echo "%s" >> "%s"' +GELI_ATTACH='geli attach -j - -k "%s" "%s"' +GELI_DETACH_F='geli detach -f "%s"' +GELI_PASSWORD_INIT='geli init -b -B "%s" -e %s -J - -K "%s" -l 256 -s 4096 "%s"' +GNOP_CREATE='gnop create -S 4096 "%s"' +GNOP_DESTROY='gnop destroy "%s"' +GPART_ADD='gpart add -t %s "%s"' +GPART_ADD_INDEX='gpart add -i %s -t %s "%s"' +GPART_ADD_INDEX_WITH_SIZE='gpart add -i %s -t %s -s %s "%s"' +GPART_ADD_LABEL='gpart add -l %s -t %s "%s"' +GPART_ADD_LABEL_WITH_SIZE='gpart add -l %s -t %s -s %s "%s"' +GPART_BOOTCODE='gpart bootcode -b "%s" "%s"' +GPART_BOOTCODE_PART='gpart bootcode -b "%s" -p "%s" -i %s "%s"' +GPART_CREATE='gpart create -s %s "%s"' +GPART_DESTROY_F='gpart destroy -F "%s"' +GPART_SET_ACTIVE='gpart set -a active -i %s "%s"' +GRAID_DELETE='graid delete "%s"' +LN_SF='ln -sf "%s" "%s"' +MKDIR_P='mkdir -p "%s"' +MOUNT_TYPE='mount -t %s "%s" "%s"' +PRINTF_CONF="printf '%s=\"%%s\"\\\n' %s >> \"%s\"" +PRINTF_FSTAB='printf "$FSTAB_FMT" "%s" "%s" "%s" "%s" "%s" "%s" >> "%s"' +SHELL_TRUNCATE=':> "%s"' +UMOUNT='umount "%s"' +ZFS_CREATE_WITH_OPTIONS='zfs create %s "%s"' +ZFS_SET='zfs set "%s" "%s"' +ZFS_UNMOUNT='zfs unmount "%s"' +ZPOOL_CREATE_WITH_OPTIONS='zpool create %s "%s" %s %s' +ZPOOL_EXPORT='zpool export "%s"' +ZPOOL_IMPORT_WITH_OPTIONS='zpool import %s "%s"' +ZPOOL_LABELCLEAR_F='zpool labelclear -f "%s"' +ZPOOL_SET='zpool set %s "%s"' + +# # Strings that should be moved to an i18n file and loaded with f_include_lang() # hline_alnum_arrows_punc_tab_enter="Use alnum, arrows, punctuation, TAB or ENTER" hline_arrows_space_tab_enter="Use arrows, SPACE, TAB or ENTER" hline_arrows_tab_enter="Press arrows, TAB or ENTER" +msg_an_unknown_error_occurred="An unknown error occurred" msg_back="Back" msg_cancel="Cancel" -msg_change="Change Selection" +msg_change_selection="Change Selection" msg_configure_options="Configure Options:" -msg_create="Install" -msg_create_desc="Proceed with Installation" -msg_create_help="Create ZFS boot pool with displayed options" msg_detailed_disk_info="gpart(8) show %s:\n%s\n\ncamcontrol(8) inquiry %s:\n%s\n\n\ncamcontrol(8) identify %s:\n%s\n" msg_disk_info="Disk Info" msg_disk_info_help="Get detailed information on disk device(s)" -msg_disks_to_use="Disks To Use" -msg_disks_to_use_help="Choose which disks to use for the Virtual Device (Required)" +msg_encrypt_disks="Encrypt Disks?" +msg_encrypt_disks_help="Use geli(8) to encrypt all data partitions" +msg_error="Error" msg_force_4k_sectors="Force 4K Sectors?" msg_force_4k_sectors_help="Use gnop(8) to configure forced 4K sector alignment" msg_freebsd_installer="FreeBSD Installer" -msg_geli_encryption="Encrypt Disks?" -msg_geli_encryption_help="Use geli(8) to encrypt all data partitions" msg_geli_password="Enter a strong passphrase, used to protect your encryption keys. You will be required to enter this passphrase each time the system is booted" -msg_geli_setup="Initializing encryption on the selected disks, this will take several seconds per disk" +msg_geli_setup="Initializing encryption on selected disks,\n this will take several seconds per disk" +msg_install="Install" +msg_install_desc="Proceed with Installation" +msg_install_help="Create ZFS boot pool with displayed options" +msg_invalid_boot_pool_size="Invalid boot pool size \`%s'" +msg_invalid_disk_argument="Invalid disk argument \`%s'" +msg_invalid_index_argument="Invalid index argument \`%s'" +msg_invalid_swap_size="Invalid swap size \`%s'" msg_invalid_virtual_device_type="Invalid Virtual Device type \`%s'" -msg_invalid_virtual_device_type_help="Select another Virtual Device type or Cancel to\nreturn to the ZFS menu. From there you can select\nmore disks or rescan for additional devices." -msg_last_chance_are_you_sure="Last Chance! Are you sure you want to destroy the current contents of the following disks:\n%s" -msg_last_chance_are_you_sure_color="\\\\ZrLast Chance!\\\\ZR Are you \\\\Z1sure\\\\Zn you want to \\\\Zr\\\\Z1destroy\\\\Zn the current contents of the following disks:\n%s" +msg_last_chance_are_you_sure="Last Chance! Are you sure you want to destroy\nthe current contents of the following disks:\n\n %s" +msg_last_chance_are_you_sure_color='\\ZrLast Chance!\\ZR Are you \\Z1sure\\Zn you want to \\Zr\\Z1destroy\\Zn\nthe current contents of the following disks:\n\n %s' msg_mirror_desc="Mirror - n-Way Mirroring" msg_mirror_help="[2+ Disks] Mirroring provides the best performance, but the least storage" +msg_missing_disk_arguments="missing disk arguments" +msg_missing_one_or_more_scripted_disks="Missing one or more scripted disks!" msg_no="NO" msg_no_disks_present_to_configure="No disk(s) present to configure" msg_no_disks_selected="No disks selected." -msg_not_enough_disks_selected="Not enough disks selected. (%u < %u wanted)" +msg_not_enough_disks_selected="Not enough disks selected. (%u < %u minimum)" +msg_null_disk_argument="NULL disk argument" +msg_null_index_argument="NULL index argument" +msg_null_poolname="NULL poolname" msg_ok="OK" msg_partition_scheme="Partition Scheme" msg_partition_scheme_help="Toggle between GPT and MBR partitioning schemes" @@ -191,6 +246,8 @@ msg_please_select_one_or_more_disks="Ple msg_pool_name="Pool Name" msg_pool_name_cannot_be_empty="Pool name cannot be empty." msg_pool_name_help="Customize the name of the zpool to be created (Required)" +msg_pool_type_disks="Pool Type/Disks:" +msg_pool_type_disks_help="Choose type of ZFS Virtual Device and disks to use (Required)" msg_processing_selection="Processing selection..." msg_raidz1_desc="RAID-Z1 - Single Redundant RAID" msg_raidz1_help="[3+ Disks] Withstand failure of 1 disk. Recommended for: 3, 5 or 9 disks" @@ -207,11 +264,12 @@ msg_stripe_desc="Stripe - No Redundancy" msg_stripe_help="[1+ Disks] Striping provides maximum storage but no redundancy" msg_swap_size="Swap Size" msg_swap_size_help="Customize how much swap space is allocated to each selected disk" -msg_these_disks_are_too_small="These disks are too small given the amount of requested\nswap (%s) and/or GELI (%s) partitions, which would take\n50%% or more (not recommended) of each of the following\nselected disk devices:\n\n %s\n\nRecommend changing partition size(s) and/or selecting a\ndifferent set of devices." +msg_these_disks_are_too_small="These disks are too small given the amount of requested\nswap (%s) and/or geli(8) (%s) partitions, which would\ntake 50%% or more of each of the following selected disk\ndevices (not recommended):\n\n %s\n\nRecommend changing partition size(s) and/or selecting a\ndifferent set of devices." +msg_unable_to_get_disk_capacity="Unable to get disk capacity of \`%s'" +msg_unsupported_partition_scheme="%s is an unsupported partition scheme" +msg_user_cancelled="User Cancelled." msg_yes="YES" msg_zfs_configuration="ZFS Configuration" -msg_zfs_vdev_type="ZFS VDev Type" -msg_zfs_vdev_type_help="Select type of ZFS Virtual Device to create" ############################################################ FUNCTIONS @@ -228,26 +286,26 @@ dialog_menu_main() local usegeli="$msg_no" [ "$ZFSBOOT_GNOP_4K_FORCE_ALIGN" ] && force4k="$msg_yes" [ "$ZFSBOOT_GELI_ENCRYPTION" ] && usegeli="$msg_yes" + local disks n=$( set -- $ZFSBOOT_DISKS; echo $# ) + { [ $n -eq 1 ] && disks=disk; } || disks=disks # grammar local menu_list=" - '>>> $msg_create' '$msg_create_desc' - '$msg_create_help' + '>>> $msg_install' '$msg_install_desc' + '$msg_install_help' + 'T $msg_pool_type_disks' '$ZFSBOOT_VDEV_TYPE: $n $disks' + '$msg_pool_type_disks_help' '- $msg_rescan_devices' '*' '$msg_rescan_devices_help' '- $msg_disk_info' '*' '$msg_disk_info_help' - '1 $msg_pool_name' '$ZFSBOOT_POOL_NAME' + 'N $msg_pool_name' '$ZFSBOOT_POOL_NAME' '$msg_pool_name_help' - '2 $msg_disks_to_use' '$ZFSBOOT_DISKS' - '$msg_disks_to_use_help' - '3 $msg_zfs_vdev_type' '$ZFSBOOT_VDEV_TYPE' - '$msg_zfs_vdev_type_help' '4 $msg_force_4k_sectors' '$force4k' '$msg_force_4k_sectors_help' - '5 $msg_geli_encryption' '$usegeli' - '$msg_geli_encryption_help' - '6 $msg_partition_scheme' '$ZFSBOOT_PARTITION_SCHEME' + 'E $msg_encrypt_disks' '$usegeli' + '$msg_encrypt_disks_help' + 'P $msg_partition_scheme' '$ZFSBOOT_PARTITION_SCHEME' '$msg_partition_scheme_help' - '7 $msg_swap_size' '$ZFSBOOT_SWAP_SIZE' + 'S $msg_swap_size' '$ZFSBOOT_SWAP_SIZE' '$msg_swap_size_help' " # END-QUOTE local defaultitem= # Calculated below @@ -284,158 +342,279 @@ dialog_menu_main() return $retval } -# dialog_edit_disks +# dialog_last_chance $disks ... # -# Edit the list of disks to be used by the ZFS boot pool. +# Display a list of the disks that the user is about to destroy. The default +# action is to return error status unless the user explicitly (non-default) +# selects "Yes" from the noyes dialog. # -dialog_edit_disks() +dialog_last_chance() { local title="$DIALOG_TITLE" local btitle="$DIALOG_BACKTITLE" - local prompt="$msg_please_select_one_or_more_disks" - local check_list= # Calculated below - local hline="$hline_arrows_space_tab_enter" - local dev vardev disks= + local prompt # Calculated below + local hline="$hline_arrows_tab_enter" - # - # Get a [new] list of disk devices - # - f_device_find "" $DEVICE_TYPE_DISK disks - if [ ! "$disks" ]; then - f_show_msg "$msg_no_disks_present_to_configure" - return $FAILURE + local height=8 width=50 prefix=" " + local plen=${#prefix} list= line= + local max_width=$(( $width - 3 - $plen )) + + local yes no defaultno extra_args format + if [ "$USE_XDIALOG" ]; then + yes=ok no=cancel defaultno=default-no + extra_args="--wrap --left" + format="$msg_last_chance_are_you_sure" + else + yes=yes no=no defaultno=defaultno + extra_args="--colors --cr-wrap" + format="$msg_last_chance_are_you_sure_color" fi - # Lets sort the disks array to be more user friendly - disks=$( echo "$disks" | tr ' ' '\n' | sort | tr '\n' ' ' ) - - # - # Loop through the list of selected disks and create temporary local - # variables mapping their status onto an up-to-date list of disks. - # - for dev in $ZFSBOOT_DISKS; do - f_str2varname "$dev" vardev - local _${vardev}_status=on - done - - # - # Create the checklist menu of discovered disk devices - # - local on_off - for dev in $disks; do - local desc= - device_$dev get desc desc - f_shell_escape "$desc" desc - f_str2varname "$dev" vardev - f_getvar _${vardev}_status:-off on_off - check_list="$check_list '$dev' '$desc' $on_off" + local disk line_width + for disk in $*; do + if [ "$line" ]; then + line_width=${#line} + else + line_width=$plen + fi + line_width=$(( $line_width + 1 + ${#disk} )) + # Add newline before disk if it would exceed max_width + if [ $line_width -gt $max_width ]; then + list="$list$line\n" + line="$prefix" + height=$(( $height + 1 )) + fi + # Add the disk to the list + line="$line $disk" done + # Append the left-overs + if [ "${line#$prefix}" ]; then + list="$list$line" + height=$(( $height + 1 )) + fi - # - # Prompt the user to check some disks - # - local height width rows - eval f_dialog_checklist_size height width rows \ - \"\$title\" \"\$btitle\" \"\$prompt\" \"\$hline\" $check_list - disks=$( eval $DIALOG \ - --title \"\$DIALOG_TITLE\" \ - --backtitle \"\$DIALOG_BACKTITLE\" \ - --hline \"\$hline\" \ - --ok-label \"\$msg_ok\" \ - --cancel-label \"\$msg_cancel\" \ - --checklist \"\$prompt\" \ - $height $width $rows \ - $check_list \ - 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD - ) || return $? - # Exit if user either pressed ESC or chose Cancel/No - f_dialog_data_sanitize disks - - ZFSBOOT_DISKS="$disks" + # Add height for Xdialog(1) + [ "$USE_XDIALOG" ] && height=$(( $height + $height / 5 + 3 )) - return $DIALOG_OK + prompt=$( printf "$format" "$list" ) + f_dprintf "%s: Last Chance!" "$0" + $DIALOG \ + --title "$title" \ + --backtitle "$btitle" \ + --hline "$hline" \ + --$defaultno \ + --$yes-label "$msg_yes" \ + --$no-label "$msg_no" \ + $extra_args \ + --yesno "$prompt" $height $width } -# dialog_menu_vdev +# dialog_menu_layout # -# Prompt the user to select a a Virtual Device type. +# Configure Virtual Device type and disks to use for the ZFS boot pool. User +# must select enough disks to satisfy the chosen vdev type. # -dialog_menu_vdev() +dialog_menu_layout() { + local funcname=dialog_menu_layout local title="$DIALOG_TITLE" local btitle="$DIALOG_BACKTITLE" - local prompt="$msg_select_virtual_device_type" - - # Make sure [potentially scripted] selections are real - real_disks= - for disk in $ZFSBOOT_DISKS; do - f_struct device_$disk && real_disks="$real_disks $disk" - done - # Make sure we have at least one real disk selected - ndisks=$( set -- $real_disks; echo $# ) - - local menu_list=" + local vdev_prompt="$msg_select_virtual_device_type" + local disk_prompt="$msg_please_select_one_or_more_disks" + local vdev_menu_list=" 'stripe' '$msg_stripe_desc' '$msg_stripe_help' 'mirror' '$msg_mirror_desc' '$msg_mirror_help' 'raidz1' '$msg_raidz1_desc' '$msg_raidz1_help' 'raidz2' '$msg_raidz2_desc' '$msg_raidz2_help' 'raidz3' '$msg_raidz3_desc' '$msg_raidz3_help' " # END-QUOTE + local disk_check_list= # Calculated below + local vdev_hline="$hline_arrows_tab_enter" + local disk_hline="$hline_arrows_space_tab_enter" + + # Warn the user if vdev type is not valid + case "$ZFSBOOT_VDEV_TYPE" in + stripe|mirror|raidz1|raidz2|raidz3) : known good ;; + *) + f_dprintf "%s: Invalid virtual device type \`%s'" \ + $funcname "$ZFSBOOT_VDEV_TYPE" + f_show_err "$msg_invalid_virtual_device_type" \ + "$ZFSBOOT_VDEV_TYPE" + f_interactive || return $FAILURE + esac - local defaultitem="$ZFSBOOT_VDEV_TYPE" - local hline="$hline_arrows_tab_enter" - local error_msg revalidate_choice + # Calculate size of vdev menu once only + local vheight vwidth vrows + eval f_dialog_menu_with_help_size vheight vwidth vrows \ + \"\$title\" \"\$btitle\" \"\$vdev_prompt\" \"\$vdev_hline\" \ + $vdev_menu_list - local mheight mwidth mrows - eval f_dialog_menu_size mheight mwidth mrows \ - \"\$title\" \"\$btitle\" \"\$prompt\" \"\$hline\" $menu_list - local iheight iwidth - f_dialog_infobox_size iheight iwidth \ - "$DIALOG_TITLE" "$DIALOG_BACKTITLE" "$msg_processing_selection" + # Get a list of probed disk devices + local disks= + f_device_find "" $DEVICE_TYPE_DISK disks + f_dprintf "$funcname: disks=[%s]" "$disks" + if [ ! "$disks" ]; then + f_dprintf "No disk(s) present to configure" + f_show_err "$msg_no_disks_present_to_configure" + return $FAILURE + fi - local menu_choice - menu_choice=$( eval $DIALOG \ - --title \"\$title\" \ - --backtitle \"\$btitle\" \ - --hline \"\$hline\" \ - --ok-label \"\$msg_ok\" \ - --cancel-label \"\$msg_cancel\" \ - --item-help \ - --default-item \"\$defaultitem\" \ - --menu \"\$prompt\" \ - $mheight $mwidth $mrows \ - $menu_list \ - --and-widget \ - ${USE_XDIALOG:+--no-buttons} \ - --infobox \"\$msg_processing_selection\" \ - $iheight $iwidth \ - 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD - ) || return $FAILURE - f_dialog_data_sanitize menu_choice - sleep 0.5 # Give time to read `--and-widget --info-box' + # Lets sort the disks array to be more user friendly + disks=$( echo "$disks" | tr ' ' '\n' | sort | tr '\n' ' ' ) - # Make sure we have enough disks for the desired vdev type - case "$menu_choice" in - stripe) want_disks=1 ;; - mirror) want_disks=2 ;; - raidz1) want_disks=3 ;; - raidz2) want_disks=4 ;; - raidz3) want_disks=5 ;; - *) - f_show_msg "$msg_invalid_virtual_device_type" \ - "$menu_choice" - continue - esac - if [ $ndisks -lt $want_disks ]; then - msg_yes="$msg_change" msg_no="$msg_cancel" f_yesno \ - "%s: $msg_not_enough_disks_selected\n%s" \ - "$menu_choice" $ndisks $want_disks \ - "$msg_invalid_virtual_device_type_help" || - return $FAILURE - dialog_menu_vdev - else - ZFSBOOT_VDEV_TYPE="$menu_choice" - fi + # + # Operate in a loop so we can (if interactive) repeat if not enough + # disks are selected to satisfy the chosen vdev type or user wants to + # back-up to the previous menu. + # + local vardisk ndisks onoff selections vdev_choice + while :; do + # + # Confirm the vdev type that was selected + # + if f_interactive && [ "$ZFSBOOT_CONFIRM_LAYOUT" ]; then + vdev_choice=$( eval $DIALOG \ + --title \"\$title\" \ + --backtitle \"\$btitle\" \ + --hline \"\$vdev_hline\" \ + --ok-label \"\$msg_ok\" \ + --cancel-label \"\$msg_cancel\" \ + --item-help \ + --default-item \"\$ZFSBOOT_VDEV_TYPE\" \ + --menu \"\$vdev_prompt\" \ + $vheight $vwidth $vrows \ + $vdev_menu_list \ + 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD + ) || return $? + # Exit if user pressed ESC or chose Cancel/No + f_dialog_data_sanitize vdev_choice + + ZFSBOOT_VDEV_TYPE="$vdev_choice" + f_dprintf "$funcname: ZFSBOOT_VDEV_TYPE=[%s]" \ + "$ZFSBOOT_VDEV_TYPE" + fi + + # Determine the number of disks needed for this vdev type + local want_disks=0 + case "$ZFSBOOT_VDEV_TYPE" in + stripe) want_disks=1 ;; + mirror) want_disks=2 ;; + raidz1) want_disks=3 ;; + raidz2) want_disks=4 ;; + raidz3) want_disks=5 ;; + esac + + # Warn the user if any scripted disks are invalid + local disk valid_disks= + local all_valid=${ZFSBOOT_DISKS:+1} # optimism + for disk in $ZFSBOOT_DISKS; do + if f_struct device_$disk; then + valid_disks="$valid_disks $disk" + continue + fi + f_dprintf "$funcname: \`%s' is not a real disk" "$disk" + all_valid= + done + if [ ! "$all_valid" ]; then + if [ "$ZFSBOOT_DISKS" ]; then + f_show_err \ + "$msg_missing_one_or_more_scripted_disks" + else + f_dprintf "No disks selected." + f_interactive || + f_show_err "$msg_no_disks_selected" + fi + f_interactive || return $FAILURE + fi + ZFSBOOT_DISKS="${valid_disks# }" + + # + # Short-circuit if we're running non-interactively + # + if ! f_interactive || [ ! "$ZFSBOOT_CONFIRM_LAYOUT" ]; then + ndisks=$( set -- $ZFSBOOT_DISKS; echo $# ) + [ $ndisks -ge $want_disks ] && break # to success + + # Not enough disks selected + f_dprintf "$funcname: %s: %s (%u < %u minimum)" \ + "$ZFSBOOT_VDEV_TYPE" \ + "Not enough disks selected." \ + $ndisks $want_disks + f_interactive || return $FAILURE + msg_yes="$msg_change_selection" msg_no="$msg_cancel" \ + f_yesno "%s: $msg_not_enough_disks_selected" \ + "$ZFSBOOT_VDEV_TYPE" $ndisks $want_disks || + return $FAILURE + fi + + # + # Confirm the disks that were selected + # Loop until the user cancels or selects enough disks + # + local breakout= + while :; do + # Loop over list of available disks, resetting state + for disk in $disks; do unset _${disk}_status; done + + # Loop over list of selected disks and create temporary + # locals to map statuses onto up-to-date list of disks + for disk in $ZFSBOOT_DISKS; do + local _${disk}_status=on + done + + # Create the checklist menu of discovered disk devices + disk_check_list= + for disk in $disks; do + local desc= + device_$disk get desc desc + f_shell_escape "$desc" desc + f_getvar _${disk}_status:-off onoff + disk_check_list="$disk_check_list + $disk '$desc' $onoff" + done + + local height width rows + eval f_dialog_checklist_size height width rows \ + \"\$title\" \"\$btitle\" \"\$prompt\" \ + \"\$hline\" $disk_check_list + + selections=$( eval $DIALOG \ + --title \"\$DIALOG_TITLE\" \ + --backtitle \"\$DIALOG_BACKTITLE\" \ + --hline \"\$hline\" \ + --ok-label \"\$msg_ok\" \ + --cancel-label \"\$msg_back\" \ + --checklist \"\$prompt\" \ + $height $width $rows \ + $disk_check_list \ + 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD + ) || break + # Loop if user pressed ESC or chose Cancel/No + f_dialog_data_sanitize selections + + ZFSBOOT_DISKS="$selections" + f_dprintf "$funcname: ZFSBOOT_DISKS=[%s]" \ + "$ZFSBOOT_DISKS" + + ndisks=$( set -- $ZFSBOOT_DISKS; echo $# ) + [ $ndisks -ge $want_disks ] && + breakout=break && break + + # Not enough disks selected + f_dprintf "$funcname: %s: %s (%u < %u minimum)" \ + "$ZFSBOOT_VDEV_TYPE" \ + "Not enough disks selected." \ + $ndisks $want_disks + msg_yes="$msg_change_selection" msg_no="$msg_cancel" \ + f_yesno "%s: $msg_not_enough_disks_selected" \ + "$ZFSBOOT_VDEV_TYPE" $ndisks $want_disks || + break + done + [ "$breakout" = "break" ] && break + [ "$ZFSBOOT_CONFIRM_LAYOUT" ] || return $FAILURE + done + + return $DIALOG_OK } # zfs_create_diskpart $disk $index @@ -445,295 +624,446 @@ dialog_menu_vdev() # so we can have some real swap. This also provides wiggle room incase your # replacement drivers do not have the exact same sector counts. # -# NOTE: The MBR layout is more complicated (GPT is preferred). +# NOTE: $swapsize and $bootsize should be defined by the calling function. +# NOTE: Sets $bootpart and $targetpart for the calling function. # zfs_create_diskpart() { - local disk="$1" index="$2" local funcname=zfs_create_diskpart - local disksize partsize + local disk="$1" index="$2" # Check arguments - [ "$disk" -a "$index" ] || return $FAILURE + if [ ! "$disk" ]; then + f_dprintf "$funcname: NULL disk argument" + msg_error="$msg_error: $funcname" \ + f_show_err "$msg_null_disk_argument" + return $FAILURE + fi + if [ "${disk#*[$IFS]}" != "$disk" ]; then + f_dprintf "$funcname: Invalid disk argument \`%s'" "$disk" + msg_error="$msg_error: $funcname" \ + f_show_err "$msg_invalid_disk_argument" "$disk" + return $FAILURE + fi + if [ ! "$index" ]; then + f_dprintf "$funcname: NULL index argument" + msg_error="$msg_error: $funcname" \ + f_show_err "$msg_null_index_argument" + return $FAILURE + fi + if ! f_isinteger "$index"; then + f_dprintf "$funcname: Invalid index argument \`%s'" "$index" + msg_error="$msg_error: $funcname" \ + f_show_err "$msg_invalid_index_argument" "$index" + return $FAILURE + fi + f_dprintf "$funcname: disk=[%s] index=[%s]" "$disk" "$index" + + # Check for unknown partition scheme before proceeding further + case "$ZFSBOOT_PARTITION_SCHEME" in + ""|MBR|GPT) : known good ;; + *) + f_dprintf "$funcname: %s is an unsupported partition scheme" \ + "$ZFSBOOT_PARTITION_SCHEME" + msg_error="$msg_error: $funcname" f_show_err \ + "$msg_unsupported_partition_scheme" \ + "$ZFSBOOT_PARTITION_SCHEME" + return $FAILURE + esac # # Destroy whatever partition layout is currently on disk. # NOTE: `-F' required to destroy if partitions still exist. # NOTE: Failure is ok here, blank disk will have nothing to destroy. # - f_quietly gpart destroy -F $disk - f_quietly zpool labelclear -f /dev/$disk # Kill it with fire + f_dprintf "$funcname: Destroying all data/layouts on \`%s'..." "$disk" + f_eval_catch -d $funcname gpart "$GPART_DESTROY_F" $disk + f_eval_catch -d $funcname graid "$GRAID_DELETE" $disk + f_eval_catch -d $funcname zpool "$ZPOOL_LABELCLEAR_F" /dev/$disk # Make doubly-sure backup GPT is destroyed - f_quietly gpart create -s gpt $disk || return $FAILURE - f_quietly gpart destroy -F $disk || return $FAILURE + f_eval_catch -d $funcname gpart "$GPART_CREATE" gpt $disk + f_eval_catch -d $funcname gpart "$GPART_DESTROY_F" $disk - # Calculate partition size given desired amount of swap - device_$disk get capacity disksize || return $FAILURE - partsize=$(( $disksize - $swapsize )) + # + # Enable boot pool if encryption is desired + # + [ "$ZFSBOOT_GELI_ENCRYPTION" ] && ZFSBOOT_BOOT_POOL=1 # # Lay down the desired type of partition scheme # local setsize mbrindex case "$ZFSBOOT_PARTITION_SCHEME" in - ""|GPT) + ""|GPT) f_dprintf "$funcname: Creating GPT layout..." # # 1. Create GPT layout using labels # - gpart create -s gpt $disk || return $FAILURE + f_eval_catch $funcname gpart "$GPART_CREATE" gpt $disk || + return $FAILURE # # 2. Add small freebsd-boot partition labeled `boot#' # - gpart add -l gptboot$index -t freebsd-boot -s 512k $disk || - return $FAILURE - gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 $disk || - return $FAILURE + f_eval_catch $funcname gpart "$GPART_ADD_LABEL_WITH_SIZE" \ + gptboot$index freebsd-boot 512k $disk || + return $FAILURE + f_eval_catch $funcname gpart "$GPART_BOOTCODE_PART" \ + /boot/pmbr /boot/gptzfsboot 1 $disk || + return $FAILURE - # zpool will use the `zfs#' GPT labels + # NB: zpool will use the `zfs#' GPT labels bootpart=p2 targetpart=p2 + [ ${swapsize:-0} -gt 0 ] && targetpart=p3 - # Change things around if we are using GELI - if [ "$ZFSBOOT_GELI_ENCRYPTION" ]; then + # + # Prepare boot pool if enabled (e.g., for geli(8)) + # + if [ "$ZFSBOOT_BOOT_POOL" ]; then bootpart=p2 targetpart=p3 - partsize=$(( $partsize - $gelisize )) - gpart add -l boot$index -t freebsd-zfs \ - -s ${gelisize}b -a 1m $disk || return $FAILURE - # Pedantically nuke any old labels, stop geli - f_quietly zpool labelclear -f /dev/$disk$bootpart - f_quietly geli detach -f /dev/$disk$targetpart + [ ${swapsize:-0} -gt 0 ] && targetpart=p4 + f_eval_catch $funcname gpart \ + "$GPART_ADD_LABEL_WITH_SIZE" boot$index \ + freebsd-zfs ${bootsize}b $disk || + return $FAILURE + # Pedantically nuke any old labels + f_eval_catch -d $funcname zpool "$ZPOOL_LABELCLEAR_F" \ + /dev/$disk$bootpart + if [ "$ZFSBOOT_GELI_ENCRYPTION" ]; then + # Pedantically detach targetpart for later + f_eval_catch -d $funcname geli \ + "$GELI_DETACH_F" \ + /dev/$disk$targetpart + fi fi # - # 3. Add freebsd-zfs partition labeled `zfs#' for zpool - # NOTE: Using above calculated partsize to leave room for swap. + # 3. Add freebsd-swap partition labeled `swap#' # - [ $swapsize -gt 0 ] && setsize="-s ${partsize}b" - gpart add -l zfs$index -t freebsd-zfs $setsize -a 1m $disk || - return $FAILURE - f_quietly zpool labelclear -f /dev/$disk$targetpart # Pedantic *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Mon Apr 14 01:44:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87F80FCE; Mon, 14 Apr 2014 01:44:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7322F1D43; Mon, 14 Apr 2014 01:44:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3E1iv06056829; Mon, 14 Apr 2014 01:44:57 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3E1iuvS056823; Mon, 14 Apr 2014 01:44:56 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201404140144.s3E1iuvS056823@svn.freebsd.org> From: Devin Teske Date: Mon, 14 Apr 2014 01:44:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264438 - in stable/10/etc: . rc.d X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2014 01:44:57 -0000 Author: dteske Date: Mon Apr 14 01:44:56 2014 New Revision: 264438 URL: http://svnweb.freebsd.org/changeset/base/264438 Log: MFC r264243: Loosen the processing of *_IF_aliasN vars to be less strict. Previously, the first alias had to be _alias0 and processing stopped at the first non- defined variable (preventing gaps). Allowing gaps gives the administrator the ability to group aliases in an adhoc manner and also lifts the requirement to renumber aliases simply to comment-out an existing one. Aliases are processed in numerical ascending order. NB: Also Patches mdconfig{,2} rc(8) boot scripts to loosen the numbering scheme for mdconfig_mdN settings to be less strict in the same manner. Discussed on: -rc Modified: stable/10/etc/network.subr stable/10/etc/rc.d/mdconfig stable/10/etc/rc.d/mdconfig2 stable/10/etc/rc.subr Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/network.subr ============================================================================== --- stable/10/etc/network.subr Mon Apr 14 01:18:02 2014 (r264437) +++ stable/10/etc/network.subr Mon Apr 14 01:44:56 2014 (r264438) @@ -285,10 +285,8 @@ get_if_var() fi _if=$1 - _punct=". - / +" - for _punct_c in $_punct; do - _if=`ltr ${_if} ${_punct_c} '_'` - done + _punct=".-/+" + ltr ${_if} "${_punct}" '_' _if _var=$2 _default=$3 @@ -1081,6 +1079,7 @@ ifalias_af_common_handler() ifalias_af_common() { local _ret _if _af _action alias ifconfig_args _aliasn _c _tmpargs _iaf + local _punct=".-/+" _ret=1 _aliasn= @@ -1088,10 +1087,14 @@ ifalias_af_common() _af=$2 _action=$3 + # Normalize $_if before using it in a pattern to list_vars() + ltr "$_if" "$_punct" "_" _if + # ifconfig_IF_aliasN which starts with $_af - alias=0 - while : ; do - ifconfig_args=`get_if_var $_if ifconfig_IF_alias${alias}` + for alias in `list_vars ifconfig_${_if}_alias[0-9]\* | + sort_lite -nk1.$((9+${#_if}+7))` + do + eval ifconfig_args=\"\$$alias\" _iaf= case $ifconfig_args in inet\ *) _iaf=inet ;; @@ -1113,15 +1116,15 @@ ifalias_af_common() warn "\$ifconfig_${_if}_alias${alias} needs " \ "\"inet\" keyword for an IPv4 address." esac - alias=$(($alias + 1)) done # backward compatibility: ipv6_ifconfig_IF_aliasN. case $_af in inet6) - alias=0 - while : ; do - ifconfig_args=`get_if_var $_if ipv6_ifconfig_IF_alias${alias}` + for alias in `list_vars ipv6_ifconfig_${_if}_alias[0-9]\* | + sort_lite -nk1.$((14+${#_if}+7))` + do + eval ifconfig_args=\"\$$alias\" case ${_action}:"${ifconfig_args}" in *:"") break @@ -1133,7 +1136,6 @@ ifalias_af_common() "instead." ;; esac - alias=$(($alias + 1)) done esac Modified: stable/10/etc/rc.d/mdconfig ============================================================================== --- stable/10/etc/rc.d/mdconfig Mon Apr 14 01:18:02 2014 (r264437) +++ stable/10/etc/rc.d/mdconfig Mon Apr 14 01:44:56 2014 (r264438) @@ -181,17 +181,14 @@ fi load_rc_config $name -_mdconfig_unit=0 if [ -z "${_mdconfig_list}" ]; then - while :; do - eval _mdconfig_config=\$mdconfig_md${_mdconfig_unit} - if [ -z "${_mdconfig_config}" ]; then - break - else - _mdconfig_list="${_mdconfig_list}${_mdconfig_list:+ }md${_mdconfig_unit}" - _mdconfig_unit=$((${_mdconfig_unit} + 1)) - fi + for _mdconfig_config in `list_vars mdconfig_md[0-9]\* | + sort_lite -nk1.12` + do + _mdconfig_unit=${_mdconfig_config#mdconfig_md} + _mdconfig_list="$_mdconfig_list md$_mdconfig_unit" done + _mdconfig_list="${_mdconfig_list# }" fi run_rc_command "${_mdconfig_cmd}" Modified: stable/10/etc/rc.d/mdconfig2 ============================================================================== --- stable/10/etc/rc.d/mdconfig2 Mon Apr 14 01:18:02 2014 (r264437) +++ stable/10/etc/rc.d/mdconfig2 Mon Apr 14 01:44:56 2014 (r264438) @@ -211,17 +211,14 @@ fi load_rc_config $name -_mdconfig2_unit=0 if [ -z "${_mdconfig2_list}" ]; then - while :; do - eval _mdconfig2_config=\$mdconfig_md${_mdconfig2_unit} - if [ -z "${_mdconfig2_config}" ]; then - break - else - _mdconfig2_list="${_mdconfig2_list}${_mdconfig2_list:+ }md${_mdconfig2_unit}" - _mdconfig2_unit=$((${_mdconfig2_unit} + 1)) - fi + for _mdconfig2_config in `list_vars mdconfig_md[0-9]\* | + sort_lite -nk1.12` + do + _mdconfig2_unit=${_mdconfig2_config#mdconfig_md} + _mdconfig2_list="$_mdconfig2_list md$_mdconfig2_unit" done + _mdconfig2_list="${_mdconfig2_list# }" fi run_rc_command "${_mdconfig2_cmd}" Modified: stable/10/etc/rc.subr ============================================================================== --- stable/10/etc/rc.subr Mon Apr 14 01:18:02 2014 (r264437) +++ stable/10/etc/rc.subr Mon Apr 14 01:44:56 2014 (r264438) @@ -54,6 +54,20 @@ JID=`$PS -p $$ -o jid=` # functions # --------- +# list_vars pattern +# List vars matching pattern. +# +list_vars() +{ + set | { while read LINE; do + var="${LINE%%=*}" + case "$var" in + "$LINE"|*[!a-zA-Z0-9_]*) continue ;; + $1) echo $var + esac + done; } +} + # set_rcvar_obsolete oldvar [newvar] [msg] # Define obsolete variable. # Global variable $rcvars_obsolete is used. @@ -314,6 +328,246 @@ _find_processes() eval $_proccheck } +# sort_lite [-b] [-n] [-k POS] [-t SEP] +# A lite version of sort(1) (supporting a few options) that can be used +# before the real sort(1) is available (e.g., in scripts that run prior +# to mountcritremote). Requires only shell built-in functionality. +# +sort_lite() +{ + local funcname=sort_lite + local sort_sep="$IFS" sort_ignore_leading_space= + local sort_field=0 sort_strict_fields= sort_numeric= + local nitems=0 skip_leading=0 trim= + + local OPTIND flag + while getopts bnk:t: flag; do + case "$flag" in + b) sort_ignore_leading_space=1 ;; + n) sort_numeric=1 sort_ignore_leading_space=1 ;; + k) sort_field="${OPTARG%%,*}" ;; # only up to first comma + # NB: Unlike sort(1) only one POS allowed + t) sort_sep="$OPTARG" + if [ ${#sort_sep} -gt 1 ]; then + echo "$funcname: multi-character tab \`$sort_sep'" >&2 + return 1 + fi + sort_strict_fields=1 + ;; + \?) return 1 ;; + esac + done + shift $(( $OPTIND - 1 )) + + # Create transformation pattern to trim leading text if desired + case "$sort_field" in + ""|[!0-9]*|*[!0-9.]*) + echo "$funcname: invalid sort field \`$sort_field'" >&2 + return 1 + ;; + *.*) + skip_leading=${sort_field#*.} sort_field=${sort_field%%.*} + while [ ${skip_leading:-0} -gt 1 ] 2> /dev/null; do + trim="$trim?" skip_leading=$(( $skip_leading - 1 )) + done + esac + + # Copy input to series of local numbered variables + # NB: IFS of NULL preserves leading whitespace + local LINE + while IFS= read -r LINE || [ "$LINE" ]; do + nitems=$(( $nitems + 1 )) + local src_$nitems="$LINE" + done + + # + # Sort numbered locals using insertion sort + # + local curitem curitem_orig curitem_mod curitem_haskey + local dest dest_orig dest_mod dest_haskey + local d gt n + local i=1 + while [ $i -le $nitems ]; do + curitem_haskey=1 # Assume sort field (-k POS) exists + eval curitem=\"\$src_$i\" + curitem_mod="$curitem" # for modified comparison + curitem_orig="$curitem" # for original comparison + + # Trim leading whitespace if desired + if [ "$sort_ignore_leading_space" ]; then + while case "$curitem_orig" in + [$IFS]*) : ;; *) false; esac + do + curitem_orig="${curitem_orig#?}" + done + curitem_mod="$curitem_orig" + fi + + # Shift modified comparison value if sort field (-k POS) is > 1 + n=$sort_field + while [ $n -gt 1 ]; do + case "$curitem_mod" in + *[$sort_sep]*) + # Cut text up-to (and incl.) first separator + curitem_mod="${curitem_mod#*[$sort_sep]}" + + # Skip NULLs unless strict field splitting + [ "$sort_strict_fields" ] || + [ "${curitem_mod%%[$sort_sep]*}" ] || + [ $n -eq 2 ] || + continue + ;; + *) + # Asked for a field that doesn't exist + curitem_haskey= break + esac + n=$(( $n - 1 )) + done + + # Trim trailing words if sort field >= 1 + [ $sort_field -ge 1 -a "$sort_numeric" ] && + curitem_mod="${curitem_mod%%[$sort_sep]*}" + + # Apply optional trim (-k POS.TRIM) to cut leading characters + curitem_mod="${curitem_mod#$trim}" + + # Determine the type of modified comparison to use initially + # NB: Prefer numerical if requested but fallback to standard + case "$curitem_mod" in + ""|[!0-9]*) # NULL or begins with non-number + gt=">" + [ "$sort_numeric" ] && curitem_mod=0 + ;; + *) + if [ "$sort_numeric" ]; then + gt="-gt" + curitem_mod="${curitem_mod%%[!0-9]*}" + # NB: trailing non-digits removed + # otherwise numeric comparison fails + else + gt=">" + fi + esac + + # If first time through, short-circuit below position-search + if [ $i -le 1 ]; then + d=0 + else + d=1 + fi + + # + # Find appropriate element position + # + while [ $d -gt 0 ] + do + dest_haskey=$curitem_haskey + eval dest=\"\$dest_$d\" + dest_mod="$dest" # for modified comparison + dest_orig="$dest" # for original comparison + + # Trim leading whitespace if desired + if [ "$sort_ignore_leading_space" ]; then + while case "$dest_orig" in + [$IFS]*) : ;; *) false; esac + do + dest_orig="${dest_orig#?}" + done + dest_mod="$dest_orig" + fi + + # Shift modified value if sort field (-k POS) is > 1 + n=$sort_field + while [ $n -gt 1 ]; do + case "$dest_mod" in + *[$sort_sep]*) + # Cut text up-to (and incl.) 1st sep + dest_mod="${dest_mod#*[$sort_sep]}" + + # Skip NULLs unless strict fields + [ "$sort_strict_fields" ] || + [ "${dest_mod%%[$sort_sep]*}" ] || + [ $n -eq 2 ] || + continue + ;; + *) + # Asked for a field that doesn't exist + dest_haskey= break + esac + n=$(( $n - 1 )) + done + + # Trim trailing words if sort field >= 1 + [ $sort_field -ge 1 -a "$sort_numeric" ] && + dest_mod="${dest_mod%%[$sort_sep]*}" + + # Apply optional trim (-k POS.TRIM), cut leading chars + dest_mod="${dest_mod#$trim}" + + # Determine type of modified comparison to use + # NB: Prefer numerical if requested, fallback to std + case "$dest_mod" in + ""|[!0-9]*) # NULL or begins with non-number + gt=">" + [ "$sort_numeric" ] && dest_mod=0 + ;; + *) + if [ "$sort_numeric" ]; then + gt="-gt" + dest_mod="${dest_mod%%[!0-9]*}" + # NB: kill trailing non-digits + # for numeric comparison safety + else + gt=">" + fi + esac + + # Break if we've found the proper element position + if [ "$curitem_haskey" -a "$dest_haskey" ]; then + if [ "$dest_mod" = "$curitem_mod" ]; then + [ "$dest_orig" ">" "$curitem_orig" ] && + break + elif [ "$dest_mod" $gt "$curitem_mod" ] \ + 2> /dev/null + then + break + fi + else + [ "$dest_orig" ">" "$curitem_orig" ] && break + fi + + # Break if we've hit the end + [ $d -ge $i ] && break + + d=$(( $d + 1 )) + done + + # Shift remaining positions forward, making room for new item + n=$i + while [ $n -ge $d ]; do + # Shift destination item forward one placement + eval dest_$(( $n + 1 ))=\"\$dest_$n\" + n=$(( $n - 1 )) + done + + # Place the element + if [ $i -eq 1 ]; then + local dest_1="$curitem" + else + local dest_$d="$curitem" + fi + + i=$(( $i + 1 )) + done + + # Print sorted results + d=1 + while [ $d -le $nitems ]; do + eval echo \"\$dest_$d\" + d=$(( $d + 1 )) + done +} + # # wait_for_pids pid [pid ...] # spins until none of the pids exist @@ -1524,19 +1778,20 @@ load_kld() return 0 } -# ltr str src dst +# ltr str src dst [var] # Change every $src in $str to $dst. # Useful when /usr is not yet mounted and we cannot use tr(1), sed(1) nor -# awk(1). +# awk(1). If var is non-NULL, set it to the result. ltr() { - local _str _src _dst _out _com - _str=$1 - _src=$2 - _dst=$3 + local _str _src _dst _out _com _var + _str="$1" + _src="$2" + _dst="$3" + _var="$4" _out="" - IFS=${_src} + local IFS="${_src}" for _com in ${_str}; do if [ -z "${_out}" ]; then _out="${_com}" @@ -1544,7 +1799,11 @@ ltr() _out="${_out}${_dst}${_com}" fi done - echo "${_out}" + if [ -n "${_var}" ]; then + setvar "${_var}" "${_out}" + else + echo "${_out}" + fi } # Creates a list of providers for GELI encryption. From owner-svn-src-stable@FreeBSD.ORG Mon Apr 14 01:49:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 650D71BA; Mon, 14 Apr 2014 01:49:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 515ED1D61; Mon, 14 Apr 2014 01:49:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3E1nRVk057399; Mon, 14 Apr 2014 01:49:27 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3E1nQcZ057395; Mon, 14 Apr 2014 01:49:26 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201404140149.s3E1nQcZ057395@svn.freebsd.org> From: Devin Teske Date: Mon, 14 Apr 2014 01:49:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264439 - in stable/9/etc: . rc.d X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2014 01:49:27 -0000 Author: dteske Date: Mon Apr 14 01:49:26 2014 New Revision: 264439 URL: http://svnweb.freebsd.org/changeset/base/264439 Log: MFC r264243: Loosen the processing of *_IF_aliasN vars to be less strict. Previously, the first alias had to be _alias0 and processing stopped at the first non- defined variable (preventing gaps). Allowing gaps gives the administrator the ability to group aliases in an adhoc manner and also lifts the requirement to renumber aliases simply to comment-out an existing one. Aliases are processed in numerical ascending order. NB: Also Patches mdconfig{,2} rc(8) boot scripts to loosen the numbering scheme for mdconfig_mdN settings to be less strict in the same manner. Discussed on: -rc Modified: stable/9/etc/network.subr stable/9/etc/rc.d/mdconfig stable/9/etc/rc.d/mdconfig2 stable/9/etc/rc.subr Directory Properties: stable/9/ (props changed) stable/9/etc/ (props changed) stable/9/etc/rc.d/ (props changed) Modified: stable/9/etc/network.subr ============================================================================== --- stable/9/etc/network.subr Mon Apr 14 01:44:56 2014 (r264438) +++ stable/9/etc/network.subr Mon Apr 14 01:49:26 2014 (r264439) @@ -246,10 +246,8 @@ get_if_var() fi _if=$1 - _punct=". - / +" - for _punct_c in $_punct; do - _if=`ltr ${_if} ${_punct_c} '_'` - done + _punct=".-/+" + ltr ${_if} "${_punct}" '_' _if _var=$2 _default=$3 @@ -1013,6 +1011,7 @@ ifalias_af_common_handler() ifalias_af_common() { local _ret _if _af _action alias ifconfig_args _aliasn _c _tmpargs _iaf + local _punct=".-/+" _ret=1 _aliasn= @@ -1020,10 +1019,14 @@ ifalias_af_common() _af=$2 _action=$3 + # Normalize $_if before using it in a pattern to list_vars() + ltr "$_if" "$_punct" "_" _if + # ifconfig_IF_aliasN which starts with $_af - alias=0 - while : ; do - ifconfig_args=`get_if_var $_if ifconfig_IF_alias${alias}` + for alias in `list_vars ifconfig_${_if}_alias[0-9]\* | + sort_lite -nk1.$((9+${#_if}+7))` + do + eval ifconfig_args=\"\$$alias\" _iaf= case $ifconfig_args in inet\ *) _iaf=inet ;; @@ -1045,15 +1048,15 @@ ifalias_af_common() warn "\$ifconfig_${_if}_alias${alias} needs " \ "\"inet\" keyword for an IPv4 address." esac - alias=$(($alias + 1)) done # backward compatibility: ipv6_ifconfig_IF_aliasN. case $_af in inet6) - alias=0 - while : ; do - ifconfig_args=`get_if_var $_if ipv6_ifconfig_IF_alias${alias}` + for alias in `list_vars ipv6_ifconfig_${_if}_alias[0-9]\* | + sort_lite -nk1.$((14+${#_if}+7))` + do + eval ifconfig_args=\"\$$alias\" case ${_action}:"${ifconfig_args}" in *:"") break @@ -1065,7 +1068,6 @@ ifalias_af_common() "instead." ;; esac - alias=$(($alias + 1)) done esac Modified: stable/9/etc/rc.d/mdconfig ============================================================================== --- stable/9/etc/rc.d/mdconfig Mon Apr 14 01:44:56 2014 (r264438) +++ stable/9/etc/rc.d/mdconfig Mon Apr 14 01:49:26 2014 (r264439) @@ -181,17 +181,14 @@ fi load_rc_config $name -_mdconfig_unit=0 if [ -z "${_mdconfig_list}" ]; then - while :; do - eval _mdconfig_config=\$mdconfig_md${_mdconfig_unit} - if [ -z "${_mdconfig_config}" ]; then - break - else - _mdconfig_list="${_mdconfig_list}${_mdconfig_list:+ }md${_mdconfig_unit}" - _mdconfig_unit=$((${_mdconfig_unit} + 1)) - fi + for _mdconfig_config in `list_vars mdconfig_md[0-9]\* | + sort_lite -nk1.12` + do + _mdconfig_unit=${_mdconfig_config#mdconfig_md} + _mdconfig_list="$_mdconfig_list md$_mdconfig_unit" done + _mdconfig_list="${_mdconfig_list# }" fi run_rc_command "${_mdconfig_cmd}" Modified: stable/9/etc/rc.d/mdconfig2 ============================================================================== --- stable/9/etc/rc.d/mdconfig2 Mon Apr 14 01:44:56 2014 (r264438) +++ stable/9/etc/rc.d/mdconfig2 Mon Apr 14 01:49:26 2014 (r264439) @@ -211,17 +211,14 @@ fi load_rc_config $name -_mdconfig2_unit=0 if [ -z "${_mdconfig2_list}" ]; then - while :; do - eval _mdconfig2_config=\$mdconfig_md${_mdconfig2_unit} - if [ -z "${_mdconfig2_config}" ]; then - break - else - _mdconfig2_list="${_mdconfig2_list}${_mdconfig2_list:+ }md${_mdconfig2_unit}" - _mdconfig2_unit=$((${_mdconfig2_unit} + 1)) - fi + for _mdconfig2_config in `list_vars mdconfig_md[0-9]\* | + sort_lite -nk1.12` + do + _mdconfig2_unit=${_mdconfig2_config#mdconfig_md} + _mdconfig2_list="$_mdconfig2_list md$_mdconfig2_unit" done + _mdconfig2_list="${_mdconfig2_list# }" fi run_rc_command "${_mdconfig2_cmd}" Modified: stable/9/etc/rc.subr ============================================================================== --- stable/9/etc/rc.subr Mon Apr 14 01:44:56 2014 (r264438) +++ stable/9/etc/rc.subr Mon Apr 14 01:49:26 2014 (r264439) @@ -54,6 +54,20 @@ JID=`$PS -p $$ -o jid=` # functions # --------- +# list_vars pattern +# List vars matching pattern. +# +list_vars() +{ + set | { while read LINE; do + var="${LINE%%=*}" + case "$var" in + "$LINE"|*[!a-zA-Z0-9_]*) continue ;; + $1) echo $var + esac + done; } +} + # set_rcvar [var] [defval] [desc] # # Echo or define a rc.conf(5) variable name. Global variable @@ -355,6 +369,246 @@ _find_processes() eval $_proccheck } +# sort_lite [-b] [-n] [-k POS] [-t SEP] +# A lite version of sort(1) (supporting a few options) that can be used +# before the real sort(1) is available (e.g., in scripts that run prior +# to mountcritremote). Requires only shell built-in functionality. +# +sort_lite() +{ + local funcname=sort_lite + local sort_sep="$IFS" sort_ignore_leading_space= + local sort_field=0 sort_strict_fields= sort_numeric= + local nitems=0 skip_leading=0 trim= + + local OPTIND flag + while getopts bnk:t: flag; do + case "$flag" in + b) sort_ignore_leading_space=1 ;; + n) sort_numeric=1 sort_ignore_leading_space=1 ;; + k) sort_field="${OPTARG%%,*}" ;; # only up to first comma + # NB: Unlike sort(1) only one POS allowed + t) sort_sep="$OPTARG" + if [ ${#sort_sep} -gt 1 ]; then + echo "$funcname: multi-character tab \`$sort_sep'" >&2 + return 1 + fi + sort_strict_fields=1 + ;; + \?) return 1 ;; + esac + done + shift $(( $OPTIND - 1 )) + + # Create transformation pattern to trim leading text if desired + case "$sort_field" in + ""|[!0-9]*|*[!0-9.]*) + echo "$funcname: invalid sort field \`$sort_field'" >&2 + return 1 + ;; + *.*) + skip_leading=${sort_field#*.} sort_field=${sort_field%%.*} + while [ ${skip_leading:-0} -gt 1 ] 2> /dev/null; do + trim="$trim?" skip_leading=$(( $skip_leading - 1 )) + done + esac + + # Copy input to series of local numbered variables + # NB: IFS of NULL preserves leading whitespace + local LINE + while IFS= read -r LINE || [ "$LINE" ]; do + nitems=$(( $nitems + 1 )) + local src_$nitems="$LINE" + done + + # + # Sort numbered locals using insertion sort + # + local curitem curitem_orig curitem_mod curitem_haskey + local dest dest_orig dest_mod dest_haskey + local d gt n + local i=1 + while [ $i -le $nitems ]; do + curitem_haskey=1 # Assume sort field (-k POS) exists + eval curitem=\"\$src_$i\" + curitem_mod="$curitem" # for modified comparison + curitem_orig="$curitem" # for original comparison + + # Trim leading whitespace if desired + if [ "$sort_ignore_leading_space" ]; then + while case "$curitem_orig" in + [$IFS]*) : ;; *) false; esac + do + curitem_orig="${curitem_orig#?}" + done + curitem_mod="$curitem_orig" + fi + + # Shift modified comparison value if sort field (-k POS) is > 1 + n=$sort_field + while [ $n -gt 1 ]; do + case "$curitem_mod" in + *[$sort_sep]*) + # Cut text up-to (and incl.) first separator + curitem_mod="${curitem_mod#*[$sort_sep]}" + + # Skip NULLs unless strict field splitting + [ "$sort_strict_fields" ] || + [ "${curitem_mod%%[$sort_sep]*}" ] || + [ $n -eq 2 ] || + continue + ;; + *) + # Asked for a field that doesn't exist + curitem_haskey= break + esac + n=$(( $n - 1 )) + done + + # Trim trailing words if sort field >= 1 + [ $sort_field -ge 1 -a "$sort_numeric" ] && + curitem_mod="${curitem_mod%%[$sort_sep]*}" + + # Apply optional trim (-k POS.TRIM) to cut leading characters + curitem_mod="${curitem_mod#$trim}" + + # Determine the type of modified comparison to use initially + # NB: Prefer numerical if requested but fallback to standard + case "$curitem_mod" in + ""|[!0-9]*) # NULL or begins with non-number + gt=">" + [ "$sort_numeric" ] && curitem_mod=0 + ;; + *) + if [ "$sort_numeric" ]; then + gt="-gt" + curitem_mod="${curitem_mod%%[!0-9]*}" + # NB: trailing non-digits removed + # otherwise numeric comparison fails + else + gt=">" + fi + esac + + # If first time through, short-circuit below position-search + if [ $i -le 1 ]; then + d=0 + else + d=1 + fi + + # + # Find appropriate element position + # + while [ $d -gt 0 ] + do + dest_haskey=$curitem_haskey + eval dest=\"\$dest_$d\" + dest_mod="$dest" # for modified comparison + dest_orig="$dest" # for original comparison + + # Trim leading whitespace if desired + if [ "$sort_ignore_leading_space" ]; then + while case "$dest_orig" in + [$IFS]*) : ;; *) false; esac + do + dest_orig="${dest_orig#?}" + done + dest_mod="$dest_orig" + fi + + # Shift modified value if sort field (-k POS) is > 1 + n=$sort_field + while [ $n -gt 1 ]; do + case "$dest_mod" in + *[$sort_sep]*) + # Cut text up-to (and incl.) 1st sep + dest_mod="${dest_mod#*[$sort_sep]}" + + # Skip NULLs unless strict fields + [ "$sort_strict_fields" ] || + [ "${dest_mod%%[$sort_sep]*}" ] || + [ $n -eq 2 ] || + continue + ;; + *) + # Asked for a field that doesn't exist + dest_haskey= break + esac + n=$(( $n - 1 )) + done + + # Trim trailing words if sort field >= 1 + [ $sort_field -ge 1 -a "$sort_numeric" ] && + dest_mod="${dest_mod%%[$sort_sep]*}" + + # Apply optional trim (-k POS.TRIM), cut leading chars + dest_mod="${dest_mod#$trim}" + + # Determine type of modified comparison to use + # NB: Prefer numerical if requested, fallback to std + case "$dest_mod" in + ""|[!0-9]*) # NULL or begins with non-number + gt=">" + [ "$sort_numeric" ] && dest_mod=0 + ;; + *) + if [ "$sort_numeric" ]; then + gt="-gt" + dest_mod="${dest_mod%%[!0-9]*}" + # NB: kill trailing non-digits + # for numeric comparison safety + else + gt=">" + fi + esac + + # Break if we've found the proper element position + if [ "$curitem_haskey" -a "$dest_haskey" ]; then + if [ "$dest_mod" = "$curitem_mod" ]; then + [ "$dest_orig" ">" "$curitem_orig" ] && + break + elif [ "$dest_mod" $gt "$curitem_mod" ] \ + 2> /dev/null + then + break + fi + else + [ "$dest_orig" ">" "$curitem_orig" ] && break + fi + + # Break if we've hit the end + [ $d -ge $i ] && break + + d=$(( $d + 1 )) + done + + # Shift remaining positions forward, making room for new item + n=$i + while [ $n -ge $d ]; do + # Shift destination item forward one placement + eval dest_$(( $n + 1 ))=\"\$dest_$n\" + n=$(( $n - 1 )) + done + + # Place the element + if [ $i -eq 1 ]; then + local dest_1="$curitem" + else + local dest_$d="$curitem" + fi + + i=$(( $i + 1 )) + done + + # Print sorted results + d=1 + while [ $d -le $nitems ]; do + eval echo \"\$dest_$d\" + d=$(( $d + 1 )) + done +} + # # wait_for_pids pid [pid ...] # spins until none of the pids exist @@ -1580,19 +1834,20 @@ load_kld() return 0 } -# ltr str src dst +# ltr str src dst [var] # Change every $src in $str to $dst. # Useful when /usr is not yet mounted and we cannot use tr(1), sed(1) nor -# awk(1). +# awk(1). If var is non-NULL, set it to the result. ltr() { - local _str _src _dst _out _com - _str=$1 - _src=$2 - _dst=$3 + local _str _src _dst _out _com _var + _str="$1" + _src="$2" + _dst="$3" + _var="$4" _out="" - IFS=${_src} + local IFS="${_src}" for _com in ${_str}; do if [ -z "${_out}" ]; then _out="${_com}" @@ -1600,7 +1855,11 @@ ltr() _out="${_out}${_dst}${_com}" fi done - echo "${_out}" + if [ -n "${_var}" ]; then + setvar "${_var}" "${_out}" + else + echo "${_out}" + fi } # Creates a list of providers for GELI encryption. From owner-svn-src-stable@FreeBSD.ORG Mon Apr 14 03:57:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D611F1AB; Mon, 14 Apr 2014 03:57:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2BCF1963; Mon, 14 Apr 2014 03:57:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3E3vksO011936; Mon, 14 Apr 2014 03:57:46 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3E3vkDp011932; Mon, 14 Apr 2014 03:57:46 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404140357.s3E3vkDp011932@svn.freebsd.org> From: Glen Barber Date: Mon, 14 Apr 2014 03:57:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264440 - in stable/10: release share/man/man7 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2014 03:57:47 -0000 Author: gjb Date: Mon Apr 14 03:57:45 2014 New Revision: 264440 URL: http://svnweb.freebsd.org/changeset/base/264440 Log: MFC r264343: Add SRC_UPDATE_SKIP, DOC_UPDATE_SKIP, and PORTS_UPDATE_SKIP variables. These are intended to allow bypassing the 'svn co /usr/{src,doc,ports}' step in the chroot when the tree exists from external means. The use case here is that /usr/src, /usr/doc, and /usr/ports in the chroot exist as result of zfs dataset clones, so it is possible (and happens quite often) that the included distributions may not be consistent. (This is not the case for -RELEASE builds, but does happen for snapshot builds.) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/release.conf.sample stable/10/release/release.sh stable/10/share/man/man7/release.7 Directory Properties: stable/10/ (props changed) Modified: stable/10/release/release.conf.sample ============================================================================== --- stable/10/release/release.conf.sample Mon Apr 14 01:49:26 2014 (r264439) +++ stable/10/release/release.conf.sample Mon Apr 14 03:57:45 2014 (r264440) @@ -56,6 +56,18 @@ PORTBRANCH="ports/head@rHEAD" ## means. #CHROOTBUILD_SKIP= +## Set to a non-empty value skip checkout or update of /usr/src in +## the chroot. This is intended for use when /usr/src already exists. +#SRC_UPDATE_SKIP= + +## Set to a non-empty value skip checkout or update of /usr/doc in +## the chroot. This is intended for use when /usr/doc already exists. +#DOC_UPDATE_SKIP= + +## Set to a non-empty value skip checkout or update of /usr/ports in +## the chroot. This is intended for use when /usr/ports already exists. +#PORTS_UPDATE_SKIP= + ## Set to pass additional flags to make(1) for the build chroot setup, such ## as TARGET/TARGET_ARCH. #CHROOT_MAKEENV= Modified: stable/10/release/release.sh ============================================================================== --- stable/10/release/release.sh Mon Apr 14 01:49:26 2014 (r264439) +++ stable/10/release/release.sh Mon Apr 14 03:57:45 2014 (r264440) @@ -190,11 +190,13 @@ set -e # Everything must succeed mkdir -p ${CHROOTDIR}/usr -${VCSCMD} ${FORCE_SRC_KEY} ${SRCBRANCH} ${CHROOTDIR}/usr/src -if [ -z "${NODOC}" ]; then +if [ -z "${SRC_UPDATE_SKIP}" ]; then + ${VCSCMD} ${FORCE_SRC_KEY} ${SRCBRANCH} ${CHROOTDIR}/usr/src +fi +if [ -z "${NODOC}" ] && [ -z "${DOC_UPDATE_SKIP}" ]; then ${VCSCMD} ${DOCBRANCH} ${CHROOTDIR}/usr/doc fi -if [ -z "${NOPORTS}" ]; then +if [ -z "${NOPORTS}" ] && [ -z "${PORTS_UPDATE_SKIP}" ]; then ${VCSCMD} ${PORTBRANCH} ${CHROOTDIR}/usr/ports fi Modified: stable/10/share/man/man7/release.7 ============================================================================== --- stable/10/share/man/man7/release.7 Mon Apr 14 01:49:26 2014 (r264439) +++ stable/10/share/man/man7/release.7 Mon Apr 14 03:57:45 2014 (r264440) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 2, 2014 +.Dd April 11, 2014 .Dt RELEASE 7 .Os .Sh NAME @@ -272,6 +272,30 @@ build environment setup are skipped. This is intended solely for cases where the .Xr chroot 8 userland are provided by alternate means. +.It Va SRC_UPDATE_SKIP +Set to a non-empty value to prevent checkout or update of +.Fa /usr/src +within the +.Xr chroot 8 . +This is intended for use only when +.Fa /usr/src +is expected to exist by alternative means. +.It Va DOC_UPDATE_SKIP +Set to a non-empty value to prevent checkout or update of +.Fa /usr/doc +within the +.Xr chroot 8 . +This is intended for use only when +.Fa /usr/doc +is expected to exist by alternative means. +.It Va PORTS_UPDATE_SKIP +Set to a non-empty value to prevent checkout or update of +.Fa /usr/ports +within the +.Xr chroot 8 . +This is intended for use only when +.Fa /usr/ports +is expected to exist by alternative means. .El .Sh EMBEDDED BUILDS The following From owner-svn-src-stable@FreeBSD.ORG Mon Apr 14 03:58:19 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A6BE371; Mon, 14 Apr 2014 03:58:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 57034196E; Mon, 14 Apr 2014 03:58:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3E3wJWA012045; Mon, 14 Apr 2014 03:58:19 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3E3wIvM012042; Mon, 14 Apr 2014 03:58:18 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404140358.s3E3wIvM012042@svn.freebsd.org> From: Glen Barber Date: Mon, 14 Apr 2014 03:58:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264441 - in stable/9: release share/man/man7 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2014 03:58:19 -0000 Author: gjb Date: Mon Apr 14 03:58:18 2014 New Revision: 264441 URL: http://svnweb.freebsd.org/changeset/base/264441 Log: MFC r264343: Add SRC_UPDATE_SKIP, DOC_UPDATE_SKIP, and PORTS_UPDATE_SKIP variables. These are intended to allow bypassing the 'svn co /usr/{src,doc,ports}' step in the chroot when the tree exists from external means. The use case here is that /usr/src, /usr/doc, and /usr/ports in the chroot exist as result of zfs dataset clones, so it is possible (and happens quite often) that the included distributions may not be consistent. (This is not the case for -RELEASE builds, but does happen for snapshot builds.) Sponsored by: The FreeBSD Foundation Modified: stable/9/release/release.conf.sample stable/9/release/release.sh stable/9/share/man/man7/release.7 Directory Properties: stable/9/release/ (props changed) stable/9/share/man/man7/ (props changed) Modified: stable/9/release/release.conf.sample ============================================================================== --- stable/9/release/release.conf.sample Mon Apr 14 03:57:45 2014 (r264440) +++ stable/9/release/release.conf.sample Mon Apr 14 03:58:18 2014 (r264441) @@ -56,6 +56,18 @@ PORTBRANCH="ports/head@rHEAD" ## means. #CHROOTBUILD_SKIP= +## Set to a non-empty value skip checkout or update of /usr/src in +## the chroot. This is intended for use when /usr/src already exists. +#SRC_UPDATE_SKIP= + +## Set to a non-empty value skip checkout or update of /usr/doc in +## the chroot. This is intended for use when /usr/doc already exists. +#DOC_UPDATE_SKIP= + +## Set to a non-empty value skip checkout or update of /usr/ports in +## the chroot. This is intended for use when /usr/ports already exists. +#PORTS_UPDATE_SKIP= + ## Set to pass additional flags to make(1) for the build chroot setup, such ## as TARGET/TARGET_ARCH. #CHROOT_MAKEENV= Modified: stable/9/release/release.sh ============================================================================== --- stable/9/release/release.sh Mon Apr 14 03:57:45 2014 (r264440) +++ stable/9/release/release.sh Mon Apr 14 03:58:18 2014 (r264441) @@ -190,11 +190,13 @@ set -e # Everything must succeed mkdir -p ${CHROOTDIR}/usr -${VCSCMD} ${FORCE_SRC_KEY} ${SRCBRANCH} ${CHROOTDIR}/usr/src -if [ -z "${NODOC}" ]; then +if [ -z "${SRC_UPDATE_SKIP}" ]; then + ${VCSCMD} ${FORCE_SRC_KEY} ${SRCBRANCH} ${CHROOTDIR}/usr/src +fi +if [ -z "${NODOC}" ] && [ -z "${DOC_UPDATE_SKIP}" ]; then ${VCSCMD} ${DOCBRANCH} ${CHROOTDIR}/usr/doc fi -if [ -z "${NOPORTS}" ]; then +if [ -z "${NOPORTS}" ] && [ -z "${PORTS_UPDATE_SKIP}" ]; then ${VCSCMD} ${PORTBRANCH} ${CHROOTDIR}/usr/ports fi Modified: stable/9/share/man/man7/release.7 ============================================================================== --- stable/9/share/man/man7/release.7 Mon Apr 14 03:57:45 2014 (r264440) +++ stable/9/share/man/man7/release.7 Mon Apr 14 03:58:18 2014 (r264441) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 2, 2014 +.Dd April 11, 2014 .Dt RELEASE 7 .Os .Sh NAME @@ -272,6 +272,30 @@ build environment setup are skipped. This is intended solely for cases where the .Xr chroot 8 userland are provided by alternate means. +.It Va SRC_UPDATE_SKIP +Set to a non-empty value to prevent checkout or update of +.Fa /usr/src +within the +.Xr chroot 8 . +This is intended for use only when +.Fa /usr/src +is expected to exist by alternative means. +.It Va DOC_UPDATE_SKIP +Set to a non-empty value to prevent checkout or update of +.Fa /usr/doc +within the +.Xr chroot 8 . +This is intended for use only when +.Fa /usr/doc +is expected to exist by alternative means. +.It Va PORTS_UPDATE_SKIP +Set to a non-empty value to prevent checkout or update of +.Fa /usr/ports +within the +.Xr chroot 8 . +This is intended for use only when +.Fa /usr/ports +is expected to exist by alternative means. .El .Sh EMBEDDED BUILDS The following From owner-svn-src-stable@FreeBSD.ORG Mon Apr 14 04:52:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 022ECDCE; Mon, 14 Apr 2014 04:52:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1C561E01; Mon, 14 Apr 2014 04:52:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3E4q1V8035873; Mon, 14 Apr 2014 04:52:01 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3E4pxMX035845; Mon, 14 Apr 2014 04:51:59 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201404140451.s3E4pxMX035845@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 14 Apr 2014 04:51:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264442 - in stable/10/sys: dev/age dev/alc dev/ale dev/bce dev/bge dev/fxp dev/jme dev/msk dev/nfe dev/sge pci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2014 04:52:02 -0000 Author: yongari Date: Mon Apr 14 04:51:59 2014 New Revision: 264442 URL: http://svnweb.freebsd.org/changeset/base/264442 Log: MFC r263957: Increase the number of TX DMA segments from 32 to 35. It turned out 32 is not enough to support a full sized TSO packet. While I'm here fix a long standing bug introduced in r169632 in bce(4) where it didn't include L2 header length of TSO packet in the maximum DMA segment size calculation. Modified: stable/10/sys/dev/age/if_agevar.h stable/10/sys/dev/alc/if_alcvar.h stable/10/sys/dev/ale/if_alevar.h stable/10/sys/dev/bce/if_bcereg.h stable/10/sys/dev/bge/if_bgereg.h stable/10/sys/dev/fxp/if_fxpreg.h stable/10/sys/dev/jme/if_jmevar.h stable/10/sys/dev/msk/if_mskreg.h stable/10/sys/dev/nfe/if_nfereg.h stable/10/sys/dev/sge/if_sgereg.h stable/10/sys/pci/if_rlreg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/age/if_agevar.h ============================================================================== --- stable/10/sys/dev/age/if_agevar.h Mon Apr 14 03:58:18 2014 (r264441) +++ stable/10/sys/dev/age/if_agevar.h Mon Apr 14 04:51:59 2014 (r264442) @@ -42,7 +42,7 @@ #define AGE_TSO_MAXSEGSIZE 4096 #define AGE_TSO_MAXSIZE (65535 + sizeof(struct ether_vlan_header)) -#define AGE_MAXTXSEGS 32 +#define AGE_MAXTXSEGS 35 #define AGE_RX_BUF_ALIGN 8 #ifndef __NO_STRICT_ALIGNMENT #define AGE_RX_BUF_SIZE (MCLBYTES - AGE_RX_BUF_ALIGN) Modified: stable/10/sys/dev/alc/if_alcvar.h ============================================================================== --- stable/10/sys/dev/alc/if_alcvar.h Mon Apr 14 03:58:18 2014 (r264441) +++ stable/10/sys/dev/alc/if_alcvar.h Mon Apr 14 04:51:59 2014 (r264442) @@ -42,7 +42,7 @@ #define ALC_TSO_MAXSEGSIZE 4096 #define ALC_TSO_MAXSIZE (65535 + sizeof(struct ether_vlan_header)) -#define ALC_MAXTXSEGS 32 +#define ALC_MAXTXSEGS 35 #define ALC_ADDR_LO(x) ((uint64_t) (x) & 0xFFFFFFFF) #define ALC_ADDR_HI(x) ((uint64_t) (x) >> 32) Modified: stable/10/sys/dev/ale/if_alevar.h ============================================================================== --- stable/10/sys/dev/ale/if_alevar.h Mon Apr 14 03:58:18 2014 (r264441) +++ stable/10/sys/dev/ale/if_alevar.h Mon Apr 14 04:51:59 2014 (r264442) @@ -40,7 +40,7 @@ #define ALE_TSO_MAXSEGSIZE 4096 #define ALE_TSO_MAXSIZE (65535 + sizeof(struct ether_vlan_header)) -#define ALE_MAXTXSEGS 32 +#define ALE_MAXTXSEGS 35 #define ALE_ADDR_LO(x) ((uint64_t) (x) & 0xFFFFFFFF) #define ALE_ADDR_HI(x) ((uint64_t) (x) >> 32) Modified: stable/10/sys/dev/bce/if_bcereg.h ============================================================================== --- stable/10/sys/dev/bce/if_bcereg.h Mon Apr 14 03:58:18 2014 (r264441) +++ stable/10/sys/dev/bce/if_bcereg.h Mon Apr 14 04:51:59 2014 (r264442) @@ -6354,8 +6354,8 @@ struct fw_info { #define BCE_TX_TIMEOUT 5 -#define BCE_MAX_SEGMENTS 32 -#define BCE_TSO_MAX_SIZE 65536 +#define BCE_MAX_SEGMENTS 35 +#define BCE_TSO_MAX_SIZE (65535 + sizeof(struct ether_vlan_header)) #define BCE_TSO_MAX_SEG_SIZE 4096 #define BCE_DMA_ALIGN 8 Modified: stable/10/sys/dev/bge/if_bgereg.h ============================================================================== --- stable/10/sys/dev/bge/if_bgereg.h Mon Apr 14 03:58:18 2014 (r264441) +++ stable/10/sys/dev/bge/if_bgereg.h Mon Apr 14 04:51:59 2014 (r264442) @@ -2852,7 +2852,7 @@ struct bge_gib { */ #define BGE_NSEG_JUMBO 4 -#define BGE_NSEG_NEW 32 +#define BGE_NSEG_NEW 35 #define BGE_TSOSEG_SZ 4096 /* Maximum DMA address for controllers that have 40bit DMA address bug. */ Modified: stable/10/sys/dev/fxp/if_fxpreg.h ============================================================================== --- stable/10/sys/dev/fxp/if_fxpreg.h Mon Apr 14 03:58:18 2014 (r264441) +++ stable/10/sys/dev/fxp/if_fxpreg.h Mon Apr 14 04:51:59 2014 (r264442) @@ -250,7 +250,7 @@ struct fxp_cb_ucode { /* * Number of DMA segments in a TxCB. */ -#define FXP_NTXSEG 32 +#define FXP_NTXSEG 35 struct fxp_tbd { uint32_t tb_addr; Modified: stable/10/sys/dev/jme/if_jmevar.h ============================================================================== --- stable/10/sys/dev/jme/if_jmevar.h Mon Apr 14 03:58:18 2014 (r264441) +++ stable/10/sys/dev/jme/if_jmevar.h Mon Apr 14 04:51:59 2014 (r264442) @@ -49,7 +49,7 @@ #define JME_RX_RING_ALIGN 16 #define JME_TSO_MAXSEGSIZE 4096 #define JME_TSO_MAXSIZE (65535 + sizeof(struct ether_vlan_header)) -#define JME_MAXTXSEGS 32 +#define JME_MAXTXSEGS 35 #define JME_RX_BUF_ALIGN sizeof(uint64_t) #define JME_SSB_ALIGN 16 Modified: stable/10/sys/dev/msk/if_mskreg.h ============================================================================== --- stable/10/sys/dev/msk/if_mskreg.h Mon Apr 14 03:58:18 2014 (r264441) +++ stable/10/sys/dev/msk/if_mskreg.h Mon Apr 14 04:51:59 2014 (r264442) @@ -2338,7 +2338,7 @@ struct msk_stat_desc { #endif #define MSK_RX_BUF_ALIGN 8 #define MSK_JUMBO_RX_RING_CNT MSK_RX_RING_CNT -#define MSK_MAXTXSEGS 32 +#define MSK_MAXTXSEGS 35 #define MSK_TSO_MAXSGSIZE 4096 #define MSK_TSO_MAXSIZE (65535 + sizeof(struct ether_vlan_header)) Modified: stable/10/sys/dev/nfe/if_nfereg.h ============================================================================== --- stable/10/sys/dev/nfe/if_nfereg.h Mon Apr 14 03:58:18 2014 (r264441) +++ stable/10/sys/dev/nfe/if_nfereg.h Mon Apr 14 04:51:59 2014 (r264442) @@ -40,7 +40,7 @@ (NFE_JUMBO_FRAMELEN - NFE_RX_HEADERS) #define NFE_MIN_FRAMELEN (ETHER_MIN_LEN - ETHER_CRC_LEN) -#define NFE_MAX_SCATTER 32 +#define NFE_MAX_SCATTER 35 #define NFE_TSO_MAXSGSIZE 4096 #define NFE_TSO_MAXSIZE (65535 + sizeof(struct ether_vlan_header)) Modified: stable/10/sys/dev/sge/if_sgereg.h ============================================================================== --- stable/10/sys/dev/sge/if_sgereg.h Mon Apr 14 03:58:18 2014 (r264441) +++ stable/10/sys/dev/sge/if_sgereg.h Mon Apr 14 04:51:59 2014 (r264442) @@ -284,7 +284,7 @@ struct sge_desc { #define SGE_RX_RING_CNT 256 /* [8, 1024] */ #define SGE_TX_RING_CNT 256 /* [8, 8192] */ #define SGE_DESC_ALIGN 16 -#define SGE_MAXTXSEGS 32 +#define SGE_MAXTXSEGS 35 #define SGE_TSO_MAXSIZE (65535 + sizeof(struct ether_vlan_header)) #define SGE_TSO_MAXSEGSIZE 4096 #define SGE_RX_BUF_ALIGN sizeof(uint64_t) Modified: stable/10/sys/pci/if_rlreg.h ============================================================================== --- stable/10/sys/pci/if_rlreg.h Mon Apr 14 03:58:18 2014 (r264441) +++ stable/10/sys/pci/if_rlreg.h Mon Apr 14 04:51:59 2014 (r264442) @@ -776,7 +776,7 @@ struct rl_stats { #define RL_TX_DESC_CNT RL_8169_TX_DESC_CNT #define RL_RX_DESC_CNT RL_8169_RX_DESC_CNT #define RL_RX_JUMBO_DESC_CNT RL_RX_DESC_CNT -#define RL_NTXSEGS 32 +#define RL_NTXSEGS 35 #define RL_RING_ALIGN 256 #define RL_DUMP_ALIGN 64 From owner-svn-src-stable@FreeBSD.ORG Mon Apr 14 04:53:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 049C6F1D; Mon, 14 Apr 2014 04:53:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E3A7F1E4C; Mon, 14 Apr 2014 04:53:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3E4raot036076; Mon, 14 Apr 2014 04:53:36 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3E4rYHt036062; Mon, 14 Apr 2014 04:53:34 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201404140453.s3E4rYHt036062@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 14 Apr 2014 04:53:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264443 - in stable/9/sys: dev/age dev/alc dev/ale dev/bce dev/bge dev/fxp dev/jme dev/msk dev/nfe dev/sge pci X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2014 04:53:37 -0000 Author: yongari Date: Mon Apr 14 04:53:34 2014 New Revision: 264443 URL: http://svnweb.freebsd.org/changeset/base/264443 Log: MFC r263957: Increase the number of TX DMA segments from 32 to 35. It turned out 32 is not enough to support a full sized TSO packet. While I'm here fix a long standing bug introduced in r169632 in bce(4) where it didn't include L2 header length of TSO packet in the maximum DMA segment size calculation. Modified: stable/9/sys/dev/age/if_agevar.h stable/9/sys/dev/alc/if_alcvar.h stable/9/sys/dev/ale/if_alevar.h stable/9/sys/dev/bce/if_bcereg.h stable/9/sys/dev/bge/if_bgereg.h stable/9/sys/dev/fxp/if_fxpreg.h stable/9/sys/dev/jme/if_jmevar.h stable/9/sys/dev/msk/if_mskreg.h stable/9/sys/dev/nfe/if_nfereg.h stable/9/sys/dev/sge/if_sgereg.h stable/9/sys/pci/if_rlreg.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/age/if_agevar.h ============================================================================== --- stable/9/sys/dev/age/if_agevar.h Mon Apr 14 04:51:59 2014 (r264442) +++ stable/9/sys/dev/age/if_agevar.h Mon Apr 14 04:53:34 2014 (r264443) @@ -42,7 +42,7 @@ #define AGE_TSO_MAXSEGSIZE 4096 #define AGE_TSO_MAXSIZE (65535 + sizeof(struct ether_vlan_header)) -#define AGE_MAXTXSEGS 32 +#define AGE_MAXTXSEGS 35 #define AGE_RX_BUF_ALIGN 8 #ifndef __NO_STRICT_ALIGNMENT #define AGE_RX_BUF_SIZE (MCLBYTES - AGE_RX_BUF_ALIGN) Modified: stable/9/sys/dev/alc/if_alcvar.h ============================================================================== --- stable/9/sys/dev/alc/if_alcvar.h Mon Apr 14 04:51:59 2014 (r264442) +++ stable/9/sys/dev/alc/if_alcvar.h Mon Apr 14 04:53:34 2014 (r264443) @@ -42,7 +42,7 @@ #define ALC_TSO_MAXSEGSIZE 4096 #define ALC_TSO_MAXSIZE (65535 + sizeof(struct ether_vlan_header)) -#define ALC_MAXTXSEGS 32 +#define ALC_MAXTXSEGS 35 #define ALC_ADDR_LO(x) ((uint64_t) (x) & 0xFFFFFFFF) #define ALC_ADDR_HI(x) ((uint64_t) (x) >> 32) Modified: stable/9/sys/dev/ale/if_alevar.h ============================================================================== --- stable/9/sys/dev/ale/if_alevar.h Mon Apr 14 04:51:59 2014 (r264442) +++ stable/9/sys/dev/ale/if_alevar.h Mon Apr 14 04:53:34 2014 (r264443) @@ -40,7 +40,7 @@ #define ALE_TSO_MAXSEGSIZE 4096 #define ALE_TSO_MAXSIZE (65535 + sizeof(struct ether_vlan_header)) -#define ALE_MAXTXSEGS 32 +#define ALE_MAXTXSEGS 35 #define ALE_ADDR_LO(x) ((uint64_t) (x) & 0xFFFFFFFF) #define ALE_ADDR_HI(x) ((uint64_t) (x) >> 32) Modified: stable/9/sys/dev/bce/if_bcereg.h ============================================================================== --- stable/9/sys/dev/bce/if_bcereg.h Mon Apr 14 04:51:59 2014 (r264442) +++ stable/9/sys/dev/bce/if_bcereg.h Mon Apr 14 04:53:34 2014 (r264443) @@ -6355,8 +6355,8 @@ struct fw_info { #define BCE_TX_TIMEOUT 5 -#define BCE_MAX_SEGMENTS 32 -#define BCE_TSO_MAX_SIZE 65536 +#define BCE_MAX_SEGMENTS 35 +#define BCE_TSO_MAX_SIZE (65535 + sizeof(struct ether_vlan_header)) #define BCE_TSO_MAX_SEG_SIZE 4096 #define BCE_DMA_ALIGN 8 Modified: stable/9/sys/dev/bge/if_bgereg.h ============================================================================== --- stable/9/sys/dev/bge/if_bgereg.h Mon Apr 14 04:51:59 2014 (r264442) +++ stable/9/sys/dev/bge/if_bgereg.h Mon Apr 14 04:53:34 2014 (r264443) @@ -2851,7 +2851,7 @@ struct bge_gib { */ #define BGE_NSEG_JUMBO 4 -#define BGE_NSEG_NEW 32 +#define BGE_NSEG_NEW 35 #define BGE_TSOSEG_SZ 4096 /* Maximum DMA address for controllers that have 40bit DMA address bug. */ Modified: stable/9/sys/dev/fxp/if_fxpreg.h ============================================================================== --- stable/9/sys/dev/fxp/if_fxpreg.h Mon Apr 14 04:51:59 2014 (r264442) +++ stable/9/sys/dev/fxp/if_fxpreg.h Mon Apr 14 04:53:34 2014 (r264443) @@ -250,7 +250,7 @@ struct fxp_cb_ucode { /* * Number of DMA segments in a TxCB. */ -#define FXP_NTXSEG 32 +#define FXP_NTXSEG 35 struct fxp_tbd { uint32_t tb_addr; Modified: stable/9/sys/dev/jme/if_jmevar.h ============================================================================== --- stable/9/sys/dev/jme/if_jmevar.h Mon Apr 14 04:51:59 2014 (r264442) +++ stable/9/sys/dev/jme/if_jmevar.h Mon Apr 14 04:53:34 2014 (r264443) @@ -49,7 +49,7 @@ #define JME_RX_RING_ALIGN 16 #define JME_TSO_MAXSEGSIZE 4096 #define JME_TSO_MAXSIZE (65535 + sizeof(struct ether_vlan_header)) -#define JME_MAXTXSEGS 32 +#define JME_MAXTXSEGS 35 #define JME_RX_BUF_ALIGN sizeof(uint64_t) #define JME_SSB_ALIGN 16 Modified: stable/9/sys/dev/msk/if_mskreg.h ============================================================================== --- stable/9/sys/dev/msk/if_mskreg.h Mon Apr 14 04:51:59 2014 (r264442) +++ stable/9/sys/dev/msk/if_mskreg.h Mon Apr 14 04:53:34 2014 (r264443) @@ -2338,7 +2338,7 @@ struct msk_stat_desc { #endif #define MSK_RX_BUF_ALIGN 8 #define MSK_JUMBO_RX_RING_CNT MSK_RX_RING_CNT -#define MSK_MAXTXSEGS 32 +#define MSK_MAXTXSEGS 35 #define MSK_TSO_MAXSGSIZE 4096 #define MSK_TSO_MAXSIZE (65535 + sizeof(struct ether_vlan_header)) Modified: stable/9/sys/dev/nfe/if_nfereg.h ============================================================================== --- stable/9/sys/dev/nfe/if_nfereg.h Mon Apr 14 04:51:59 2014 (r264442) +++ stable/9/sys/dev/nfe/if_nfereg.h Mon Apr 14 04:53:34 2014 (r264443) @@ -40,7 +40,7 @@ (NFE_JUMBO_FRAMELEN - NFE_RX_HEADERS) #define NFE_MIN_FRAMELEN (ETHER_MIN_LEN - ETHER_CRC_LEN) -#define NFE_MAX_SCATTER 32 +#define NFE_MAX_SCATTER 35 #define NFE_TSO_MAXSGSIZE 4096 #define NFE_TSO_MAXSIZE (65535 + sizeof(struct ether_vlan_header)) Modified: stable/9/sys/dev/sge/if_sgereg.h ============================================================================== --- stable/9/sys/dev/sge/if_sgereg.h Mon Apr 14 04:51:59 2014 (r264442) +++ stable/9/sys/dev/sge/if_sgereg.h Mon Apr 14 04:53:34 2014 (r264443) @@ -284,7 +284,7 @@ struct sge_desc { #define SGE_RX_RING_CNT 256 /* [8, 1024] */ #define SGE_TX_RING_CNT 256 /* [8, 8192] */ #define SGE_DESC_ALIGN 16 -#define SGE_MAXTXSEGS 32 +#define SGE_MAXTXSEGS 35 #define SGE_TSO_MAXSIZE (65535 + sizeof(struct ether_vlan_header)) #define SGE_TSO_MAXSEGSIZE 4096 #define SGE_RX_BUF_ALIGN sizeof(uint64_t) Modified: stable/9/sys/pci/if_rlreg.h ============================================================================== --- stable/9/sys/pci/if_rlreg.h Mon Apr 14 04:51:59 2014 (r264442) +++ stable/9/sys/pci/if_rlreg.h Mon Apr 14 04:53:34 2014 (r264443) @@ -776,7 +776,7 @@ struct rl_stats { #define RL_TX_DESC_CNT RL_8169_TX_DESC_CNT #define RL_RX_DESC_CNT RL_8169_RX_DESC_CNT #define RL_RX_JUMBO_DESC_CNT RL_RX_DESC_CNT -#define RL_NTXSEGS 32 +#define RL_NTXSEGS 35 #define RL_RING_ALIGN 256 #define RL_DUMP_ALIGN 64 From owner-svn-src-stable@FreeBSD.ORG Mon Apr 14 04:58:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7015811C; Mon, 14 Apr 2014 04:58:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42E881E6B; Mon, 14 Apr 2014 04:58:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3E4wp82036725; Mon, 14 Apr 2014 04:58:51 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3E4wpV1036724; Mon, 14 Apr 2014 04:58:51 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201404140458.s3E4wpV1036724@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 14 Apr 2014 04:58:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264444 - stable/10/sys/dev/ae X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2014 04:58:51 -0000 Author: yongari Date: Mon Apr 14 04:58:50 2014 New Revision: 264444 URL: http://svnweb.freebsd.org/changeset/base/264444 Log: MFC r259543: Failed m_devget(9) indicates lack of free mbuf cluster. Update if_iqdrops counter for that case since the received frame is ok. While here, simplify updating counter logic. Modified: stable/10/sys/dev/ae/if_ae.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ae/if_ae.c ============================================================================== --- stable/10/sys/dev/ae/if_ae.c Mon Apr 14 04:53:34 2014 (r264443) +++ stable/10/sys/dev/ae/if_ae.c Mon Apr 14 04:58:50 2014 (r264444) @@ -132,7 +132,7 @@ static void ae_mac_config(ae_softc_t *sc static int ae_intr(void *arg); static void ae_int_task(void *arg, int pending); static void ae_tx_intr(ae_softc_t *sc); -static int ae_rxeof(ae_softc_t *sc, ae_rxd_t *rxd); +static void ae_rxeof(ae_softc_t *sc, ae_rxd_t *rxd); static void ae_rx_intr(ae_softc_t *sc); static void ae_watchdog(ae_softc_t *sc); static void ae_tick(void *arg); @@ -1881,7 +1881,7 @@ ae_tx_intr(ae_softc_t *sc) BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); } -static int +static void ae_rxeof(ae_softc_t *sc, ae_rxd_t *rxd) { struct ifnet *ifp; @@ -1900,12 +1900,15 @@ ae_rxeof(ae_softc_t *sc, ae_rxd_t *rxd) size = le16toh(rxd->len) - ETHER_CRC_LEN; if (size < (ETHER_MIN_LEN - ETHER_CRC_LEN - ETHER_VLAN_ENCAP_LEN)) { if_printf(ifp, "Runt frame received."); - return (EIO); + ifp->if_ierrors++; + return; } m = m_devget(&rxd->data[0], size, ETHER_ALIGN, ifp, NULL); - if (m == NULL) - return (ENOBUFS); + if (m == NULL) { + ifp->if_iqdrops++; + return; + } if ((ifp->if_capenable & IFCAP_VLAN_HWTAGGING) != 0 && (flags & AE_RXD_HAS_VLAN) != 0) { @@ -1913,14 +1916,13 @@ ae_rxeof(ae_softc_t *sc, ae_rxd_t *rxd) m->m_flags |= M_VLANTAG; } + ifp->if_ipackets++; /* * Pass it through. */ AE_UNLOCK(sc); (*ifp->if_input)(ifp, m); AE_LOCK(sc); - - return (0); } static void @@ -1929,7 +1931,7 @@ ae_rx_intr(ae_softc_t *sc) ae_rxd_t *rxd; struct ifnet *ifp; uint16_t flags; - int count, error; + int count; KASSERT(sc != NULL, ("[ae, %d]: sc is NULL!", __LINE__)); @@ -1957,17 +1959,10 @@ ae_rx_intr(ae_softc_t *sc) */ sc->rxd_cur = (sc->rxd_cur + 1) % AE_RXD_COUNT_DEFAULT; - if ((flags & AE_RXD_SUCCESS) == 0) { - ifp->if_ierrors++; - continue; - } - error = ae_rxeof(sc, rxd); - if (error != 0) { + if ((flags & AE_RXD_SUCCESS) != 0) + ae_rxeof(sc, rxd); + else ifp->if_ierrors++; - continue; - } else { - ifp->if_ipackets++; - } } if (count > 0) { From owner-svn-src-stable@FreeBSD.ORG Mon Apr 14 04:59:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 875F5251; Mon, 14 Apr 2014 04:59:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A33E1E71; Mon, 14 Apr 2014 04:59:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3E4xl1k036857; Mon, 14 Apr 2014 04:59:47 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3E4xlVk036856; Mon, 14 Apr 2014 04:59:47 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201404140459.s3E4xlVk036856@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 14 Apr 2014 04:59:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264445 - stable/9/sys/dev/ae X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2014 04:59:47 -0000 Author: yongari Date: Mon Apr 14 04:59:46 2014 New Revision: 264445 URL: http://svnweb.freebsd.org/changeset/base/264445 Log: MFC r259543: Failed m_devget(9) indicates lack of free mbuf cluster. Update if_iqdrops counter for that case since the received frame is ok. While here, simplify updating counter logic. Modified: stable/9/sys/dev/ae/if_ae.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ae/if_ae.c ============================================================================== --- stable/9/sys/dev/ae/if_ae.c Mon Apr 14 04:58:50 2014 (r264444) +++ stable/9/sys/dev/ae/if_ae.c Mon Apr 14 04:59:46 2014 (r264445) @@ -132,7 +132,7 @@ static void ae_mac_config(ae_softc_t *sc static int ae_intr(void *arg); static void ae_int_task(void *arg, int pending); static void ae_tx_intr(ae_softc_t *sc); -static int ae_rxeof(ae_softc_t *sc, ae_rxd_t *rxd); +static void ae_rxeof(ae_softc_t *sc, ae_rxd_t *rxd); static void ae_rx_intr(ae_softc_t *sc); static void ae_watchdog(ae_softc_t *sc); static void ae_tick(void *arg); @@ -1881,7 +1881,7 @@ ae_tx_intr(ae_softc_t *sc) BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); } -static int +static void ae_rxeof(ae_softc_t *sc, ae_rxd_t *rxd) { struct ifnet *ifp; @@ -1900,12 +1900,15 @@ ae_rxeof(ae_softc_t *sc, ae_rxd_t *rxd) size = le16toh(rxd->len) - ETHER_CRC_LEN; if (size < (ETHER_MIN_LEN - ETHER_CRC_LEN - ETHER_VLAN_ENCAP_LEN)) { if_printf(ifp, "Runt frame received."); - return (EIO); + ifp->if_ierrors++; + return; } m = m_devget(&rxd->data[0], size, ETHER_ALIGN, ifp, NULL); - if (m == NULL) - return (ENOBUFS); + if (m == NULL) { + ifp->if_iqdrops++; + return; + } if ((ifp->if_capenable & IFCAP_VLAN_HWTAGGING) != 0 && (flags & AE_RXD_HAS_VLAN) != 0) { @@ -1913,14 +1916,13 @@ ae_rxeof(ae_softc_t *sc, ae_rxd_t *rxd) m->m_flags |= M_VLANTAG; } + ifp->if_ipackets++; /* * Pass it through. */ AE_UNLOCK(sc); (*ifp->if_input)(ifp, m); AE_LOCK(sc); - - return (0); } static void @@ -1929,7 +1931,7 @@ ae_rx_intr(ae_softc_t *sc) ae_rxd_t *rxd; struct ifnet *ifp; uint16_t flags; - int count, error; + int count; KASSERT(sc != NULL, ("[ae, %d]: sc is NULL!", __LINE__)); @@ -1957,17 +1959,10 @@ ae_rx_intr(ae_softc_t *sc) */ sc->rxd_cur = (sc->rxd_cur + 1) % AE_RXD_COUNT_DEFAULT; - if ((flags & AE_RXD_SUCCESS) == 0) { - ifp->if_ierrors++; - continue; - } - error = ae_rxeof(sc, rxd); - if (error != 0) { + if ((flags & AE_RXD_SUCCESS) != 0) + ae_rxeof(sc, rxd); + else ifp->if_ierrors++; - continue; - } else { - ifp->if_ipackets++; - } } if (count > 0) { From owner-svn-src-stable@FreeBSD.ORG Mon Apr 14 05:04:23 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD11E3D8; Mon, 14 Apr 2014 05:04:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9AC11047; Mon, 14 Apr 2014 05:04:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3E54NPH040459; Mon, 14 Apr 2014 05:04:23 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3E54Nl9040458; Mon, 14 Apr 2014 05:04:23 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201404140504.s3E54Nl9040458@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 14 Apr 2014 05:04:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264446 - stable/10/sys/dev/ale X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2014 05:04:23 -0000 Author: yongari Date: Mon Apr 14 05:04:23 2014 New Revision: 264446 URL: http://svnweb.freebsd.org/changeset/base/264446 Log: MFC r260429: m_defrag(9) does not touch original mbuf chain when it can't allocate new mbuf. Free original mbuf chain when driver is not able to send the packet. Modified: stable/10/sys/dev/ale/if_ale.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ale/if_ale.c ============================================================================== --- stable/10/sys/dev/ale/if_ale.c Mon Apr 14 04:59:46 2014 (r264445) +++ stable/10/sys/dev/ale/if_ale.c Mon Apr 14 05:04:23 2014 (r264446) @@ -1659,6 +1659,7 @@ ale_encap(struct ale_softc *sc, struct m (mtod(m, intptr_t) & 3) != 0) { m = m_defrag(*m_head, M_NOWAIT); if (m == NULL) { + m_freem(*m_head); *m_head = NULL; return (ENOBUFS); } From owner-svn-src-stable@FreeBSD.ORG Mon Apr 14 05:05:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3CB25FB; Mon, 14 Apr 2014 05:05:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E01B01063; Mon, 14 Apr 2014 05:05:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3E557oe040600; Mon, 14 Apr 2014 05:05:07 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3E557wq040599; Mon, 14 Apr 2014 05:05:07 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201404140505.s3E557wq040599@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 14 Apr 2014 05:05:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264447 - stable/9/sys/dev/ale X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2014 05:05:08 -0000 Author: yongari Date: Mon Apr 14 05:05:07 2014 New Revision: 264447 URL: http://svnweb.freebsd.org/changeset/base/264447 Log: MFC r260429: m_defrag(9) does not touch original mbuf chain when it can't allocate new mbuf. Free original mbuf chain when driver is not able to send the packet. Modified: stable/9/sys/dev/ale/if_ale.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ale/if_ale.c ============================================================================== --- stable/9/sys/dev/ale/if_ale.c Mon Apr 14 05:04:23 2014 (r264446) +++ stable/9/sys/dev/ale/if_ale.c Mon Apr 14 05:05:07 2014 (r264447) @@ -1659,6 +1659,7 @@ ale_encap(struct ale_softc *sc, struct m (mtod(m, intptr_t) & 3) != 0) { m = m_defrag(*m_head, M_NOWAIT); if (m == NULL) { + m_freem(*m_head); *m_head = NULL; return (ENOBUFS); } From owner-svn-src-stable@FreeBSD.ORG Mon Apr 14 05:37:22 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 145B9D36; Mon, 14 Apr 2014 05:37:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00A5012FB; Mon, 14 Apr 2014 05:37:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3E5bLVi052950; Mon, 14 Apr 2014 05:37:21 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3E5bLWu052949; Mon, 14 Apr 2014 05:37:21 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201404140537.s3E5bLWu052949@svn.freebsd.org> From: Devin Teske Date: Mon, 14 Apr 2014 05:37:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264449 - stable/10/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2014 05:37:22 -0000 Author: dteske Date: Mon Apr 14 05:37:21 2014 New Revision: 264449 URL: http://svnweb.freebsd.org/changeset/base/264449 Log: MFC r264448: Fix typo in debug/log statement. Submitted by: Rick Miller Modified: stable/10/usr.sbin/bsdinstall/scripts/script Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/script ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/script Mon Apr 14 05:35:01 2014 (r264448) +++ stable/10/usr.sbin/bsdinstall/scripts/script Mon Apr 14 05:37:21 2014 (r264449) @@ -74,7 +74,7 @@ trap error EXIT SCRIPT="$1" shift -f_dprintf "Began Instalation at %s" "$( date )" +f_dprintf "Began Installation at %s" "$( date )" rm -rf $BSDINSTALL_TMPETC mkdir $BSDINSTALL_TMPETC From owner-svn-src-stable@FreeBSD.ORG Mon Apr 14 05:38:29 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C4CE5E6A; Mon, 14 Apr 2014 05:38:29 +0000 (UTC) Received: from mail0.glenbarber.us (mail0.glenbarber.us [IPv6:2607:fc50:1:2300:1001:1001:1001:face]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail0.glenbarber.us", Issuer "Gandi Standard SSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 923A41302; Mon, 14 Apr 2014 05:38:29 +0000 (UTC) Received: from glenbarber.us (70.15.88.86.res-cmts.sewb.ptd.net [70.15.88.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gjb) by mail0.glenbarber.us (Postfix) with ESMTPSA id 238A9E500; Mon, 14 Apr 2014 05:38:28 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.8.3 mail0.glenbarber.us 238A9E500 Authentication-Results: mail0.glenbarber.us; dkim=none reason="no signature"; dkim-adsp=none Date: Mon, 14 Apr 2014 01:38:26 -0400 From: Glen Barber To: Devin Teske Subject: Re: svn commit: r264449 - stable/10/usr.sbin/bsdinstall/scripts Message-ID: <20140414053826.GM92266@glenbarber.us> References: <201404140537.s3E5bLWu052949@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="xtx0sNU5lZ46KfgK" Content-Disposition: inline In-Reply-To: <201404140537.s3E5bLWu052949@svn.freebsd.org> X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2014 05:38:29 -0000 --xtx0sNU5lZ46KfgK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 14, 2014 at 05:37:21AM +0000, Devin Teske wrote: > Author: dteske > Date: Mon Apr 14 05:37:21 2014 > New Revision: 264449 > URL: http://svnweb.freebsd.org/changeset/base/264449 >=20 > Log: > MFC r264448: Fix typo in debug/log statement. > =20 MFCs have a default minimal timeframe of 3 days. Glen --xtx0sNU5lZ46KfgK Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBCAAGBQJTS3RSAAoJELls3eqvi17Q7jgP/iNdF0N4d35aSTKJ+mbbf8l2 bPSwrYBC+c2QW1sDGHKd9eBq+p7MgWmWfCQTR5QlV1G0dwfF5Mbv9X2l/G40Tb2I LVnW06zdh3oSInlgU06/NjsiA4mKsVIIrQzbJhtBJK2wsjbRXtmp5+0Dv7eLIFAw SRU8WBwmp6Ev/0VskPp2gtcV6kDhSUrtV5r8+1Irg4oilltDZI7Bth8HEp5QGGiI swYc79rwrAHebZjTMuhAUcx733rJquvyY5Msc5Ay0TXiAyZhEiv+XZZOO4GQtsKF mi0HDTZ8W/XzGGY6afhTnHxH+8RF/3YNqbxvCshOiEcK0Ond4yaXIsf5eMIQPYId s36gFCxDdTMBgRArBa9VZniFibCc4y7a4iDx6ZaYt1IK7ThIoe26PZZK4feRU0LO lh8/JvoWn9JZi4yo4sV2x4/boRo5MLs9FVkFVJUKRrXCraO1YSC33D0x5AHkP0Qy RpcgMtqdkBUK0upilrk9s3aE5mlqiLAQ9vt67Hdm9BxTTjsXjBhWCmF1vCy+8fTz e2tcx/h6BgteIyVqZuQ5LxCBPCheFgBrlzfxFNPA7kE8qrWL+aiGLRAdGBoOEEbQ c/6mYcHh92GUORJ+RdLHT91kxb6JIo5c7kEYx1LetgOLZmr6mUbuSAf/JNMMelpR 5tlKZhgvhUDF+gk6n6u5 =4vkt -----END PGP SIGNATURE----- --xtx0sNU5lZ46KfgK-- From owner-svn-src-stable@FreeBSD.ORG Mon Apr 14 05:38:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6F17F96; Mon, 14 Apr 2014 05:38:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93AD81307; Mon, 14 Apr 2014 05:38:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3E5codN053139; Mon, 14 Apr 2014 05:38:50 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3E5cooF053138; Mon, 14 Apr 2014 05:38:50 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201404140538.s3E5cooF053138@svn.freebsd.org> From: Devin Teske Date: Mon, 14 Apr 2014 05:38:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264450 - stable/9/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2014 05:38:50 -0000 Author: dteske Date: Mon Apr 14 05:38:50 2014 New Revision: 264450 URL: http://svnweb.freebsd.org/changeset/base/264450 Log: MFC r264448: Fix typo in debug/log statement. Submitted by: Rick Miller Modified: stable/9/usr.sbin/bsdinstall/scripts/script Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/bsdinstall/ (props changed) stable/9/usr.sbin/bsdinstall/scripts/ (props changed) Modified: stable/9/usr.sbin/bsdinstall/scripts/script ============================================================================== --- stable/9/usr.sbin/bsdinstall/scripts/script Mon Apr 14 05:37:21 2014 (r264449) +++ stable/9/usr.sbin/bsdinstall/scripts/script Mon Apr 14 05:38:50 2014 (r264450) @@ -74,7 +74,7 @@ trap error EXIT SCRIPT="$1" shift -f_dprintf "Began Instalation at %s" "$( date )" +f_dprintf "Began Installation at %s" "$( date )" rm -rf $BSDINSTALL_TMPETC mkdir $BSDINSTALL_TMPETC From owner-svn-src-stable@FreeBSD.ORG Mon Apr 14 05:40:35 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 65BFF1FD; Mon, 14 Apr 2014 05:40:35 +0000 (UTC) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx1.fisglobal.com", Issuer "VeriSign Class 3 Secure Server CA - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2E5B5131E; Mon, 14 Apr 2014 05:40:34 +0000 (UTC) Received: from smarthost.fisglobal.com ([10.132.206.191]) by ltcfislmsgpa06.fnfis.com (8.14.5/8.14.5) with ESMTP id s3E5eXX6007300 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Mon, 14 Apr 2014 00:40:34 -0500 Received: from THEMADHATTER (10.242.181.54) by smarthost.fisglobal.com (10.132.206.191) with Microsoft SMTP Server id 14.3.174.1; Mon, 14 Apr 2014 00:40:31 -0500 From: Sender: Devin Teske To: "'Glen Barber'" , "'Devin Teske'" References: <201404140537.s3E5bLWu052949@svn.freebsd.org> <20140414053826.GM92266@glenbarber.us> In-Reply-To: <20140414053826.GM92266@glenbarber.us> Subject: RE: svn commit: r264449 - stable/10/usr.sbin/bsdinstall/scripts Date: Sun, 13 Apr 2014 22:40:16 -0700 Message-ID: <014a01cf57a4$05619cd0$1024d670$@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQFxgxHsZtj7oF0ie6E/nuEG6xoniALFyoqBm7YTTLA= Content-Language: en-us X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.11.96, 1.0.14, 0.0.0000 definitions=2014-04-12_01:2014-04-11,2014-04-12,1970-01-01 signatures=0 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2014 05:40:35 -0000 > -----Original Message----- > From: Glen Barber [mailto:gjb@FreeBSD.org] > Sent: Sunday, April 13, 2014 10:38 PM > To: Devin Teske > Cc: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src- > stable@freebsd.org; svn-src-stable-10@freebsd.org > Subject: Re: svn commit: r264449 - stable/10/usr.sbin/bsdinstall/scripts > > On Mon, Apr 14, 2014 at 05:37:21AM +0000, Devin Teske wrote: > > Author: dteske > > Date: Mon Apr 14 05:37:21 2014 > > New Revision: 264449 > > URL: > https://urldefense.proofpoint.com/v1/url?u=http://svnweb.freebsd.org/ch > angeset/base/264449&k=%2FbkpAUdJWZuiTILCq%2FFnQg%3D%3D%0A&r= > Mrjs6vR4%2Faj2Ns9%2FssHJjg%3D%3D%0A&m=rcQ%2Fw0BwuT3SHeUjHm > %2Fq7pysiSrhQUwRWG7pee6lsCw%3D%0A&s=a05d45bd044a68ba178857af1 > dac1f207319326fa6f53a72919816ac9649fa20 > > > > Log: > > MFC r264448: Fix typo in debug/log statement. > > > > MFCs have a default minimal timeframe of 3 days. > I've often heard folks say that this doesn't apply to blatantly simple/trivial things like a typo. But I'll keep that in mind next time. Thanks. -- Devin _____________ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. From owner-svn-src-stable@FreeBSD.ORG Mon Apr 14 09:36:16 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2B362A8; Mon, 14 Apr 2014 09:36:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5B9818DB; Mon, 14 Apr 2014 09:36:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3E9aFmW052872; Mon, 14 Apr 2014 09:36:15 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3E9aFmi052871; Mon, 14 Apr 2014 09:36:15 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201404140936.s3E9aFmi052871@svn.freebsd.org> From: Martin Matuska Date: Mon, 14 Apr 2014 09:36:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264454 - stable/10/sys/netpfil/pf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2014 09:36:16 -0000 Author: mm Date: Mon Apr 14 09:36:15 2014 New Revision: 264454 URL: http://svnweb.freebsd.org/changeset/base/264454 Log: MFC r264220: Execute pf_overload_task() in vnet context. Fixes a vnet kernel panic. Reviewed by: trociny Modified: stable/10/sys/netpfil/pf/pf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netpfil/pf/pf.c ============================================================================== --- stable/10/sys/netpfil/pf/pf.c Mon Apr 14 06:59:49 2014 (r264453) +++ stable/10/sys/netpfil/pf/pf.c Mon Apr 14 09:36:15 2014 (r264454) @@ -277,7 +277,7 @@ static int pf_addr_wrap_neq(struct pf_ static struct pf_state *pf_find_state(struct pfi_kif *, struct pf_state_key_cmp *, u_int); static int pf_src_connlimit(struct pf_state **); -static void pf_overload_task(void *c, int pending); +static void pf_overload_task(void *v, int pending); static int pf_insert_src_node(struct pf_src_node **, struct pf_rule *, struct pf_addr *, sa_family_t); static u_int pf_purge_expired_states(u_int, int); @@ -509,16 +509,18 @@ pf_src_connlimit(struct pf_state **state } static void -pf_overload_task(void *c, int pending) +pf_overload_task(void *v, int pending) { struct pf_overload_head queue; struct pfr_addr p; struct pf_overload_entry *pfoe, *pfoe1; uint32_t killed = 0; + CURVNET_SET((struct vnet *)v); + PF_OVERLOADQ_LOCK(); - queue = *(struct pf_overload_head *)c; - SLIST_INIT((struct pf_overload_head *)c); + queue = V_pf_overloadqueue; + SLIST_INIT(&V_pf_overloadqueue); PF_OVERLOADQ_UNLOCK(); bzero(&p, sizeof(p)); @@ -562,8 +564,10 @@ pf_overload_task(void *c, int pending) V_pf_status.lcounters[LCNT_OVERLOAD_FLUSH]++; /* If nothing to flush, return. */ - if (SLIST_EMPTY(&queue)) + if (SLIST_EMPTY(&queue)) { + CURVNET_RESTORE(); return; + } for (int i = 0; i <= V_pf_hashmask; i++) { struct pf_idhash *ih = &V_pf_idhash[i]; @@ -592,6 +596,8 @@ pf_overload_task(void *c, int pending) free(pfoe, M_PFTEMP); if (V_pf_status.debug >= PF_DEBUG_MISC) printf("%s: %u states killed", __func__, killed); + + CURVNET_RESTORE(); } /* @@ -788,7 +794,7 @@ pf_initialize() /* Send & overload+flush queues. */ STAILQ_INIT(&V_pf_sendqueue); SLIST_INIT(&V_pf_overloadqueue); - TASK_INIT(&V_pf_overloadtask, 0, pf_overload_task, &V_pf_overloadqueue); + TASK_INIT(&V_pf_overloadtask, 0, pf_overload_task, curvnet); mtx_init(&pf_sendqueue_mtx, "pf send queue", NULL, MTX_DEF); mtx_init(&pf_overloadqueue_mtx, "pf overload/flush queue", NULL, MTX_DEF); From owner-svn-src-stable@FreeBSD.ORG Mon Apr 14 12:40:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8ADF326; Mon, 14 Apr 2014 12:40:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4C9E1324; Mon, 14 Apr 2014 12:40:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3ECecDH028545; Mon, 14 Apr 2014 12:40:38 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3ECeckX028543; Mon, 14 Apr 2014 12:40:38 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201404141240.s3ECeckX028543@svn.freebsd.org> From: Aleksandr Rybalko Date: Mon, 14 Apr 2014 12:40:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264455 - in stable/10/sys: dev/vt kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2014 12:40:38 -0000 Author: ray Date: Mon Apr 14 12:40:37 2014 New Revision: 264455 URL: http://svnweb.freebsd.org/changeset/base/264455 Log: MFC 264242,264244,264259 Fix panic on load new driver while vt(4) is in VGA textmode. o Mute terminal while vt(4) driver change in progress. o Reset VDF_TEXTMODE before init new driver. o Assign default font, if new driver is not in TEXTMODE. o Do not update screen while driver changing. o Unmute terminal when done with driver replacement. o Move init fonts to early point. o Minor cleanup. o Do not fill screen, while muted. (kern/subr_terminal.c) Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/vt_core.c stable/10/sys/kern/subr_terminal.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/vt_core.c ============================================================================== --- stable/10/sys/dev/vt/vt_core.c Mon Apr 14 09:36:15 2014 (r264454) +++ stable/10/sys/dev/vt/vt_core.c Mon Apr 14 12:40:37 2014 (r264455) @@ -705,8 +705,8 @@ vt_bitblt_char(struct vt_device *vd, str static void vt_flush(struct vt_device *vd) { - struct vt_window *vw = vd->vd_curwindow; - struct vt_font *vf = vw->vw_font; + struct vt_window *vw; + struct vt_font *vf; struct vt_bufmask tmask; unsigned int row, col; term_rect_t tarea; @@ -717,6 +717,13 @@ vt_flush(struct vt_device *vd) int bpl, h, w; #endif + vw = vd->vd_curwindow; + if (vw == NULL) + return; + vf = vw->vw_font; + if (((vd->vd_flags & VDF_TEXTMODE) == 0) && (vf == NULL)) + return; + if (vd->vd_flags & VDF_SPLASH || vw->vw_flags & VWF_BUSY) return; @@ -794,6 +801,7 @@ vt_timer(void *arg) vd = arg; /* Update screen if required. */ vt_flush(vd); + /* Schedule for next update. */ callout_schedule(&vd->vd_timer, hz / VT_TIMERFREQ); } @@ -1882,6 +1890,7 @@ vt_upgrade(struct vt_device *vd) vt_window_switch, vw, SHUTDOWN_PRI_DEFAULT); } terminal_maketty(vw->vw_terminal, "v%r", VT_UNIT(vw)); + } if (vd->vd_curwindow == NULL) vd->vd_curwindow = vd->vd_windows[VT_CONSWINDOW]; @@ -1902,6 +1911,9 @@ vt_resize(struct vt_device *vd) for (i = 0; i < VT_MAXWINDOWS; i++) { vw = vd->vd_windows[i]; + /* Assign default font to window, if not textmode. */ + if (!(vd->vd_flags & VDF_TEXTMODE) && vw->vw_font == NULL) + vw->vw_font = vtfont_ref(&vt_font_default); /* Resize terminal windows */ vt_change_font(vw, vw->vw_font); } @@ -1933,9 +1945,21 @@ vt_allocate(struct vt_driver *drv, void if (drv->vd_maskbitbltchr == NULL) drv->vd_maskbitbltchr = drv->vd_bitbltchr; - /* Stop vt_flush periodic task. */ - if (vd->vd_curwindow != NULL) + if (vd->vd_flags & VDF_ASYNC) { + /* Stop vt_flush periodic task. */ callout_drain(&vd->vd_timer); + /* + * Mute current terminal until we done. vt_change_font (called + * from vt_resize) will unmute it. + */ + terminal_mute(vd->vd_curwindow->vw_terminal, 1); + } + + /* + * Reset VDF_TEXTMODE flag, driver who require that flag (vt_vga) will + * set it. + */ + vd->vd_flags &= ~VDF_TEXTMODE; vd->vd_driver = drv; vd->vd_softc = softc; @@ -1951,8 +1975,10 @@ vt_allocate(struct vt_driver *drv, void vtterm_splash(vd); #endif - if (vd->vd_curwindow != NULL) + if (vd->vd_flags & VDF_ASYNC) { + terminal_mute(vd->vd_curwindow->vw_terminal, 0); callout_schedule(&vd->vd_timer, hz / VT_TIMERFREQ); + } termcn_cnregister(vd->vd_windows[VT_CONSWINDOW]->vw_terminal); Modified: stable/10/sys/kern/subr_terminal.c ============================================================================== --- stable/10/sys/kern/subr_terminal.c Mon Apr 14 09:36:15 2014 (r264454) +++ stable/10/sys/kern/subr_terminal.c Mon Apr 14 12:40:37 2014 (r264455) @@ -208,7 +208,7 @@ terminal_set_winsize_blank(struct termin teken_set_winsize(&tm->tm_emulator, &r.tr_end); TERMINAL_UNLOCK(tm); - if (blank != 0) + if ((blank != 0) && !(tm->tm_flags & TF_MUTE)) tm->tm_class->tc_fill(tm, &r, TCHAR_CREATE((teken_char_t)' ', &default_message)); From owner-svn-src-stable@FreeBSD.ORG Mon Apr 14 12:49:19 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E97EF545; Mon, 14 Apr 2014 12:49:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D58971372; Mon, 14 Apr 2014 12:49:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3ECnIkW030839; Mon, 14 Apr 2014 12:49:18 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3ECnIX7030836; Mon, 14 Apr 2014 12:49:18 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201404141249.s3ECnIX7030836@svn.freebsd.org> From: Aleksandr Rybalko Date: Mon, 14 Apr 2014 12:49:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264456 - in stable/9/sys: dev/vt kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2014 12:49:19 -0000 Author: ray Date: Mon Apr 14 12:49:18 2014 New Revision: 264456 URL: http://svnweb.freebsd.org/changeset/base/264456 Log: MFC 264242,264244,264259 Fix panic on load new driver while vt(4) is in VGA textmode. o Mute terminal while vt(4) driver change in progress. o Reset VDF_TEXTMODE before init new driver. o Assign default font, if new driver is not in TEXTMODE. o Do not update screen while driver changing. o Unmute terminal when done with driver replacement. o Move init fonts to early point. o Minor cleanup. o Do not fill screen, while muted. (kern/subr_terminal.c) Sponsored by: The FreeBSD Foundation Modified: stable/9/sys/dev/vt/vt_core.c stable/9/sys/kern/subr_terminal.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/vt/vt_core.c ============================================================================== --- stable/9/sys/dev/vt/vt_core.c Mon Apr 14 12:40:37 2014 (r264455) +++ stable/9/sys/dev/vt/vt_core.c Mon Apr 14 12:49:18 2014 (r264456) @@ -705,8 +705,8 @@ vt_bitblt_char(struct vt_device *vd, str static void vt_flush(struct vt_device *vd) { - struct vt_window *vw = vd->vd_curwindow; - struct vt_font *vf = vw->vw_font; + struct vt_window *vw; + struct vt_font *vf; struct vt_bufmask tmask; unsigned int row, col; term_rect_t tarea; @@ -717,6 +717,13 @@ vt_flush(struct vt_device *vd) int bpl, h, w; #endif + vw = vd->vd_curwindow; + if (vw == NULL) + return; + vf = vw->vw_font; + if (((vd->vd_flags & VDF_TEXTMODE) == 0) && (vf == NULL)) + return; + if (vd->vd_flags & VDF_SPLASH || vw->vw_flags & VWF_BUSY) return; @@ -794,6 +801,7 @@ vt_timer(void *arg) vd = arg; /* Update screen if required. */ vt_flush(vd); + /* Schedule for next update. */ callout_schedule(&vd->vd_timer, hz / VT_TIMERFREQ); } @@ -1882,6 +1890,7 @@ vt_upgrade(struct vt_device *vd) vt_window_switch, vw, SHUTDOWN_PRI_DEFAULT); } terminal_maketty(vw->vw_terminal, "v%r", VT_UNIT(vw)); + } if (vd->vd_curwindow == NULL) vd->vd_curwindow = vd->vd_windows[VT_CONSWINDOW]; @@ -1902,6 +1911,9 @@ vt_resize(struct vt_device *vd) for (i = 0; i < VT_MAXWINDOWS; i++) { vw = vd->vd_windows[i]; + /* Assign default font to window, if not textmode. */ + if (!(vd->vd_flags & VDF_TEXTMODE) && vw->vw_font == NULL) + vw->vw_font = vtfont_ref(&vt_font_default); /* Resize terminal windows */ vt_change_font(vw, vw->vw_font); } @@ -1933,9 +1945,21 @@ vt_allocate(struct vt_driver *drv, void if (drv->vd_maskbitbltchr == NULL) drv->vd_maskbitbltchr = drv->vd_bitbltchr; - /* Stop vt_flush periodic task. */ - if (vd->vd_curwindow != NULL) + if (vd->vd_flags & VDF_ASYNC) { + /* Stop vt_flush periodic task. */ callout_drain(&vd->vd_timer); + /* + * Mute current terminal until we done. vt_change_font (called + * from vt_resize) will unmute it. + */ + terminal_mute(vd->vd_curwindow->vw_terminal, 1); + } + + /* + * Reset VDF_TEXTMODE flag, driver who require that flag (vt_vga) will + * set it. + */ + vd->vd_flags &= ~VDF_TEXTMODE; vd->vd_driver = drv; vd->vd_softc = softc; @@ -1951,8 +1975,10 @@ vt_allocate(struct vt_driver *drv, void vtterm_splash(vd); #endif - if (vd->vd_curwindow != NULL) + if (vd->vd_flags & VDF_ASYNC) { + terminal_mute(vd->vd_curwindow->vw_terminal, 0); callout_schedule(&vd->vd_timer, hz / VT_TIMERFREQ); + } termcn_cnregister(vd->vd_windows[VT_CONSWINDOW]->vw_terminal); Modified: stable/9/sys/kern/subr_terminal.c ============================================================================== --- stable/9/sys/kern/subr_terminal.c Mon Apr 14 12:40:37 2014 (r264455) +++ stable/9/sys/kern/subr_terminal.c Mon Apr 14 12:49:18 2014 (r264456) @@ -208,7 +208,7 @@ terminal_set_winsize_blank(struct termin teken_set_winsize(&tm->tm_emulator, &r.tr_end); TERMINAL_UNLOCK(tm); - if (blank != 0) + if ((blank != 0) && !(tm->tm_flags & TF_MUTE)) tm->tm_class->tc_fill(tm, &r, TCHAR_CREATE((teken_char_t)' ', &default_message)); From owner-svn-src-stable@FreeBSD.ORG Mon Apr 14 13:30:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB4DF2BA; Mon, 14 Apr 2014 13:30:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D3A1217A7; Mon, 14 Apr 2014 13:30:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3EDUCZU047671; Mon, 14 Apr 2014 13:30:12 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3EDU8JH047639; Mon, 14 Apr 2014 13:30:08 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201404141330.s3EDU8JH047639@svn.freebsd.org> From: Julio Merino Date: Mon, 14 Apr 2014 13:30:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264457 - in stable/10: sys/net tools/regression/lib/libc/net tools/regression/lib/libc/string tools/regression/priv tools/regression/sbin/mdconfig tools/regression/usr.bin/lastcomm too... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2014 13:30:13 -0000 Author: jmmv Date: Mon Apr 14 13:30:08 2014 New Revision: 264457 URL: http://svnweb.freebsd.org/changeset/base/264457 Log: MFC various fixes to the tools/regression/ tests. - r262953 Fix m4 tests so that they run cleanly with prove. - r262954 Fix printf tests so that they run cleanly with prove. - r262959 Fix sed tests so that they run cleanly with prove. - r262960 Fix yacc tests so that they run cleanly with prove. - r262961 Fix pkill tests so that they run cleanly with prove. - r262962 Fix ncal tests so that they run cleanly with prove. - r263081 Fix lastcomm tests under amd64. - r263082 Only run the make tests when make is fmake. - r263083 Fix sa tests. - r263084 Turn a test precondition into a skip in the mdconfig tests. - r263085 Make the strerror tests work without libtap. - r263087 Remove broken tests for eui64_line. - r263221 Change etcupdate tests to return 1 on test failures. - r263352 Make the priv test program exit with non-zero if any failures are detected. - r263353 errx prepends the program name to the message; don't do it by hand. - r263362 Include strings.h so that bpf_filter.c can be built in userland. Deleted: stable/10/tools/regression/lib/libc/net/test-eui64_line.c stable/10/tools/regression/lib/libc/net/test-eui64_line.t Modified: stable/10/sys/net/bpf_filter.c stable/10/tools/regression/lib/libc/net/Makefile stable/10/tools/regression/lib/libc/string/Makefile stable/10/tools/regression/lib/libc/string/test-strerror.c stable/10/tools/regression/priv/main.c stable/10/tools/regression/sbin/mdconfig/00.t stable/10/tools/regression/usr.bin/lastcomm/regress.t stable/10/tools/regression/usr.bin/lastcomm/v1-amd64.out stable/10/tools/regression/usr.bin/lastcomm/v2-amd64.out stable/10/tools/regression/usr.bin/m4/regress.gnusofterror.out stable/10/tools/regression/usr.bin/m4/regress.sh stable/10/tools/regression/usr.bin/m4/regress.t stable/10/tools/regression/usr.bin/make/common.sh stable/10/tools/regression/usr.bin/ncal/regress.sh stable/10/tools/regression/usr.bin/pkill/pgrep-_s.t stable/10/tools/regression/usr.bin/printf/regress.sh stable/10/tools/regression/usr.bin/sed/regress.sh stable/10/tools/regression/usr.bin/yacc/regress.00.out stable/10/tools/regression/usr.bin/yacc/regress.01.out stable/10/tools/regression/usr.bin/yacc/regress.02.out stable/10/tools/regression/usr.bin/yacc/regress.03.out stable/10/tools/regression/usr.bin/yacc/regress.04.out stable/10/tools/regression/usr.bin/yacc/regress.05.out stable/10/tools/regression/usr.bin/yacc/regress.06.out stable/10/tools/regression/usr.bin/yacc/regress.07.out stable/10/tools/regression/usr.bin/yacc/regress.08.out stable/10/tools/regression/usr.bin/yacc/regress.09.out stable/10/tools/regression/usr.bin/yacc/regress.10.out stable/10/tools/regression/usr.bin/yacc/regress.11.out stable/10/tools/regression/usr.bin/yacc/regress.12.out stable/10/tools/regression/usr.bin/yacc/regress.13.out stable/10/tools/regression/usr.bin/yacc/regress.14.out stable/10/tools/regression/usr.bin/yacc/regress.sh stable/10/tools/regression/usr.sbin/etcupdate/always.sh stable/10/tools/regression/usr.sbin/etcupdate/conflicts.sh stable/10/tools/regression/usr.sbin/etcupdate/fbsdid.sh stable/10/tools/regression/usr.sbin/etcupdate/ignore.sh stable/10/tools/regression/usr.sbin/etcupdate/preworld.sh stable/10/tools/regression/usr.sbin/etcupdate/tests.sh stable/10/tools/regression/usr.sbin/etcupdate/tzsetup.sh stable/10/tools/regression/usr.sbin/sa/regress.t stable/10/tools/regression/usr.sbin/sa/v1-amd64-sav.out stable/10/tools/regression/usr.sbin/sa/v1-amd64-u.out stable/10/tools/regression/usr.sbin/sa/v1-amd64-usr.out stable/10/tools/regression/usr.sbin/sa/v1-i386-sav.out stable/10/tools/regression/usr.sbin/sa/v1-i386-u.out stable/10/tools/regression/usr.sbin/sa/v1-i386-usr.out stable/10/tools/regression/usr.sbin/sa/v1-sparc64-sav.out stable/10/tools/regression/usr.sbin/sa/v1-sparc64-u.out stable/10/tools/regression/usr.sbin/sa/v1-sparc64-usr.out stable/10/tools/regression/usr.sbin/sa/v2-amd64-u.out stable/10/tools/regression/usr.sbin/sa/v2-i386-u.out stable/10/tools/regression/usr.sbin/sa/v2-sparc64-u.out Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/bpf_filter.c ============================================================================== --- stable/10/sys/net/bpf_filter.c Mon Apr 14 12:49:18 2014 (r264456) +++ stable/10/sys/net/bpf_filter.c Mon Apr 14 13:30:08 2014 (r264457) @@ -39,6 +39,9 @@ __FBSDID("$FreeBSD$"); #include +#if !defined(_KERNEL) +#include +#endif #if !defined(_KERNEL) || defined(sun) #include #endif Modified: stable/10/tools/regression/lib/libc/net/Makefile ============================================================================== --- stable/10/tools/regression/lib/libc/net/Makefile Mon Apr 14 12:49:18 2014 (r264456) +++ stable/10/tools/regression/lib/libc/net/Makefile Mon Apr 14 13:30:08 2014 (r264457) @@ -1,6 +1,6 @@ # $FreeBSD$ -TESTS= test-ether test-eui64_aton test-eui64_line test-eui64_ntoa +TESTS= test-ether test-eui64_aton test-eui64_ntoa CFLAGS+= -g -Wall .PHONY: tests Modified: stable/10/tools/regression/lib/libc/string/Makefile ============================================================================== --- stable/10/tools/regression/lib/libc/string/Makefile Mon Apr 14 12:49:18 2014 (r264456) +++ stable/10/tools/regression/lib/libc/string/Makefile Mon Apr 14 13:30:08 2014 (r264457) @@ -1,9 +1,5 @@ # $FreeBSD$ -CFLAGS+= -I/usr/local/include -LDFLAGS+= -L/usr/local/lib -LDLIBS= -ltap - TESTS= test-stpncpy test-strerror test-wcscasecmp test-wcsnlen .PHONY: tests Modified: stable/10/tools/regression/lib/libc/string/test-strerror.c ============================================================================== --- stable/10/tools/regression/lib/libc/string/test-strerror.c Mon Apr 14 12:49:18 2014 (r264456) +++ stable/10/tools/regression/lib/libc/string/test-strerror.c Mon Apr 14 13:30:08 2014 (r264457) @@ -33,7 +33,19 @@ #include #include -#include +static int test_count = 1; +static int exit_status = EXIT_SUCCESS; + +#define CHECK(x) \ + do { \ + if (x) { \ + printf("ok %d\n", test_count); \ + } else { \ + printf("not ok %d # %s\n", test_count, #x); \ + exit_status = EXIT_FAILURE; \ + } \ + ++test_count; \ + } while (0) int main(void) @@ -42,7 +54,7 @@ main(void) char *sret; int iret; - plan_tests(27); + printf("1..27\n"); /* * strerror() failure tests. @@ -50,86 +62,86 @@ main(void) errno = 0; sret = strerror(INT_MAX); snprintf(buf, sizeof(buf), "Unknown error: %d", INT_MAX); - ok1(strcmp(sret, buf) == 0); - ok1(errno == EINVAL); + CHECK(strcmp(sret, buf) == 0); + CHECK(errno == EINVAL); /* * strerror() success tests. */ errno = 0; sret = strerror(0); - ok1(strcmp(sret, "No error: 0") == 0); - ok1(errno == 0); + CHECK(strcmp(sret, "No error: 0") == 0); + CHECK(errno == 0); errno = 0; sret = strerror(EPERM); - ok1(strcmp(sret, "Operation not permitted") == 0); - ok1(errno == 0); + CHECK(strcmp(sret, "Operation not permitted") == 0); + CHECK(errno == 0); errno = 0; sret = strerror(EPFNOSUPPORT); - ok1(strcmp(sret, "Protocol family not supported") == 0); - ok1(errno == 0); + CHECK(strcmp(sret, "Protocol family not supported") == 0); + CHECK(errno == 0); errno = 0; sret = strerror(ELAST); - ok1(errno == 0); + CHECK(errno == 0); /* * strerror_r() failure tests. */ memset(buf, '*', sizeof(buf)); iret = strerror_r(-1, buf, sizeof(buf)); - ok1(strcmp(buf, "Unknown error: -1") == 0); - ok1(iret == EINVAL); + CHECK(strcmp(buf, "Unknown error: -1") == 0); + CHECK(iret == EINVAL); memset(buf, '*', sizeof(buf)); /* One byte too short. */ iret = strerror_r(EPERM, buf, strlen("Operation not permitted")); - ok1(strcmp(buf, "Operation not permitte") == 0); - ok1(iret == ERANGE); + CHECK(strcmp(buf, "Operation not permitte") == 0); + CHECK(iret == ERANGE); memset(buf, '*', sizeof(buf)); /* One byte too short. */ iret = strerror_r(-1, buf, strlen("Unknown error: -1")); - ok1(strcmp(buf, "Unknown error: -") == 0); - ok1(iret == EINVAL); + CHECK(strcmp(buf, "Unknown error: -") == 0); + CHECK(iret == EINVAL); memset(buf, '*', sizeof(buf)); /* Two bytes too short. */ iret = strerror_r(-2, buf, strlen("Unknown error: -2") - 1); - ok1(strcmp(buf, "Unknown error: ") == 0); - ok1(iret == EINVAL); + CHECK(strcmp(buf, "Unknown error: ") == 0); + CHECK(iret == EINVAL); memset(buf, '*', sizeof(buf)); /* Three bytes too short. */ iret = strerror_r(-2, buf, strlen("Unknown error: -2") - 2); - ok1(strcmp(buf, "Unknown error:") == 0); - ok1(iret == EINVAL); + CHECK(strcmp(buf, "Unknown error:") == 0); + CHECK(iret == EINVAL); memset(buf, '*', sizeof(buf)); /* One byte too short. */ iret = strerror_r(12345, buf, strlen("Unknown error: 12345")); - ok1(strcmp(buf, "Unknown error: 1234") == 0); - ok1(iret == EINVAL); + CHECK(strcmp(buf, "Unknown error: 1234") == 0); + CHECK(iret == EINVAL); /* * strerror_r() success tests. */ memset(buf, '*', sizeof(buf)); iret = strerror_r(0, buf, sizeof(buf)); - ok1(strcmp(buf, "No error: 0") == 0); - ok1(iret == 0); + CHECK(strcmp(buf, "No error: 0") == 0); + CHECK(iret == 0); memset(buf, '*', sizeof(buf)); iret = strerror_r(EDEADLK, buf, sizeof(buf)); - ok1(strcmp(buf, "Resource deadlock avoided") == 0); - ok1(iret == 0); + CHECK(strcmp(buf, "Resource deadlock avoided") == 0); + CHECK(iret == 0); memset(buf, '*', sizeof(buf)); iret = strerror_r(EPROCLIM, buf, sizeof(buf)); - ok1(strcmp(buf, "Too many processes") == 0); - ok1(iret == 0); + CHECK(strcmp(buf, "Too many processes") == 0); + CHECK(iret == 0); - return exit_status(); + return exit_status; } Modified: stable/10/tools/regression/priv/main.c ============================================================================== --- stable/10/tools/regression/priv/main.c Mon Apr 14 12:49:18 2014 (r264456) +++ stable/10/tools/regression/priv/main.c Mon Apr 14 13:30:08 2014 (r264457) @@ -53,6 +53,16 @@ #include "main.h" /* + * If true, some test or preparatory step failed along the execution of this + * program. + * + * Intuitively, we would define a counter instead of a boolean. However, + * we fork to run the subtests and keeping proper track of the number of + * failed tests would be tricky and not provide any real value. + */ +static int something_failed = 0; + +/* * Registration table of privilege tests. Each test registers a name, a test * function, and a cleanup function to run after the test has completed, * regardless of success/failure. @@ -358,13 +368,18 @@ expect(const char *test, int error, int { if (error == 0) { - if (expected_error != 0) + if (expected_error != 0) { + something_failed = 1; warnx("%s: returned 0", test); + } } else { - if (expected_error == 0) + if (expected_error == 0) { + something_failed = 1; warn("%s: returned (%d, %d)", test, error, errno); - else if (expected_errno != errno) + } else if (expected_errno != errno) { + something_failed = 1; warn("%s: returned (%d, %d)", test, error, errno); + } } } @@ -488,14 +503,24 @@ run(struct test *test, int asroot, int i run_child(test, asroot, injail); fflush(stdout); fflush(stderr); - exit(0); + exit(something_failed ? EXIT_FAILURE : EXIT_SUCCESS); } else { while (1) { - pid = waitpid(childpid, NULL, 0); - if (pid == -1) + int status; + pid = waitpid(childpid, &status, 0); + if (pid == -1) { + something_failed = 1; warn("test: waitpid %s", test->t_name); - if (pid == childpid) + } + if (pid == childpid) { + if (WIFEXITED(status) && + WEXITSTATUS(status) == EXIT_SUCCESS) { + /* All good in the subprocess! */ + } else { + something_failed = 1; + } break; + } } } fflush(stdout); @@ -518,7 +543,7 @@ main(int argc, char *argv[]) * force the use of privilege, and will likely need checking. */ if (getuid() != 0 && geteuid() != 0) - errx(-1, "priv: must be run as root"); + errx(-1, "must be run as root"); /* * Run each test four times, varying whether the process is running @@ -530,5 +555,5 @@ main(int argc, char *argv[]) run(&tests[i], 1, 0); run(&tests[i], 1, 1); } - return (0); + return (something_failed ? EXIT_FAILURE : EXIT_SUCCESS); } Modified: stable/10/tools/regression/sbin/mdconfig/00.t ============================================================================== --- stable/10/tools/regression/sbin/mdconfig/00.t Mon Apr 14 12:49:18 2014 (r264456) +++ stable/10/tools/regression/sbin/mdconfig/00.t Mon Apr 14 13:30:08 2014 (r264457) @@ -32,8 +32,8 @@ echo "1..1" if [ `whoami` != "root" ]; then - echo "not ok 1 - you need to be root to run this test." - exit 1 + echo "ok 1 # skip You need to be root to run this test." + exit 0 fi TESTDIR=$(dirname $(realpath $0)) Modified: stable/10/tools/regression/usr.bin/lastcomm/regress.t ============================================================================== --- stable/10/tools/regression/usr.bin/lastcomm/regress.t Mon Apr 14 12:49:18 2014 (r264456) +++ stable/10/tools/regression/usr.bin/lastcomm/regress.t Mon Apr 14 13:30:08 2014 (r264457) @@ -6,6 +6,8 @@ DIR=`dirname $0` ARCH=`uname -m` +TZ=UTC; export TZ + check() { NUM=$1 Modified: stable/10/tools/regression/usr.bin/lastcomm/v1-amd64.out ============================================================================== --- stable/10/tools/regression/usr.bin/lastcomm/v1-amd64.out Mon Apr 14 12:49:18 2014 (r264456) +++ stable/10/tools/regression/usr.bin/lastcomm/v1-amd64.out Mon Apr 14 13:30:08 2014 (r264457) @@ -1,28 +1,28 @@ -core -FDX root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 06:44 -core -DX root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 06:44 -cc - root 0.000 secs 0.000 us 0.000 sy 0.016 es Wed May 16 06:44 -ld - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 06:44 -as - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 06:44 -cc1 - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 06:44 -time - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 06:44 -time -F root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 06:44 -ln - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 06:44 -time - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 06:44 -time -F root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 06:44 -ln - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 06:44 -time - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 06:44 -time -F root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 06:44 -ln - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 06:44 -time - root 0.000 secs 0.000 us 0.000 sy 0.234 es Wed May 16 06:44 -diff - root 0.203 secs 0.203 us 0.000 sy 0.234 es Wed May 16 06:44 -time - root 0.000 secs 0.000 us 0.000 sy 0.016 es Wed May 16 06:44 -dd - root 0.016 secs 0.000 us 0.016 sy 0.016 es Wed May 16 06:44 -time - root 0.000 secs 0.000 us 0.000 sy 3.016 es Wed May 16 06:44 -sleep - root 0.000 secs 0.000 us 0.000 sy 3.000 es Wed May 16 06:44 -time - root 0.000 secs 0.000 us 0.000 sy 1.938 es Wed May 16 06:44 -find - root 0.250 secs 0.031 us 0.219 sy 1.938 es Wed May 16 06:44 -time - root 0.000 secs 0.000 us 0.000 sy 3.062 es Wed May 16 06:44 -egrep - root 3.031 secs 3.031 us 0.000 sy 3.062 es Wed May 16 06:44 -time - root 0.000 secs 0.000 us 0.000 sy 0.188 es Wed May 16 06:44 -awk - root 0.172 secs 0.172 us 0.000 sy 0.188 es Wed May 16 06:44 -accton - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 06:44 +core -FDX root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44 +core -DX root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44 +cc - root 0.000 secs 0.000 us 0.000 sy 0.016 es Wed May 16 11:44 +ld - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44 +as - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44 +cc1 - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44 +time - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44 +time -F root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44 +ln - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44 +time - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44 +time -F root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44 +ln - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44 +time - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44 +time -F root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44 +ln - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44 +time - root 0.000 secs 0.000 us 0.000 sy 0.234 es Wed May 16 11:44 +diff - root 0.203 secs 0.203 us 0.000 sy 0.234 es Wed May 16 11:44 +time - root 0.000 secs 0.000 us 0.000 sy 0.016 es Wed May 16 11:44 +dd - root 0.016 secs 0.000 us 0.016 sy 0.016 es Wed May 16 11:44 +time - root 0.000 secs 0.000 us 0.000 sy 3.016 es Wed May 16 11:44 +sleep - root 0.000 secs 0.000 us 0.000 sy 3.000 es Wed May 16 11:44 +time - root 0.000 secs 0.000 us 0.000 sy 1.938 es Wed May 16 11:44 +find - root 0.250 secs 0.031 us 0.219 sy 1.938 es Wed May 16 11:44 +time - root 0.000 secs 0.000 us 0.000 sy 3.062 es Wed May 16 11:44 +egrep - root 3.031 secs 3.031 us 0.000 sy 3.062 es Wed May 16 11:44 +time - root 0.000 secs 0.000 us 0.000 sy 0.188 es Wed May 16 11:44 +awk - root 0.172 secs 0.172 us 0.000 sy 0.188 es Wed May 16 11:44 +accton - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44 Modified: stable/10/tools/regression/usr.bin/lastcomm/v2-amd64.out ============================================================================== --- stable/10/tools/regression/usr.bin/lastcomm/v2-amd64.out Mon Apr 14 12:49:18 2014 (r264456) +++ stable/10/tools/regression/usr.bin/lastcomm/v2-amd64.out Mon Apr 14 13:30:08 2014 (r264457) @@ -1,28 +1,28 @@ -core -FDX root 0.002 secs 0.000 us 0.002 sy 0.009 es Thu May 17 00:57 -core -DX root 0.005 secs 0.000 us 0.005 sy 0.010 es Thu May 17 00:57 -cc - root 0.005 secs 0.000 us 0.005 sy 0.652 es Thu May 17 00:57 -ld - root 0.014 secs 0.005 us 0.009 sy 0.150 es Thu May 17 00:57 -as - root 0.005 secs 0.000 us 0.005 sy 0.078 es Thu May 17 00:57 -cc1 - root 0.024 secs 0.008 us 0.016 sy 0.347 es Thu May 17 00:57 -time - root 0.003 secs 0.000 us 0.003 sy 0.005 es Thu May 17 00:57 -1234567890123456 - root 0.002 secs 0.000 us 0.002 sy 0.002 es Thu May 17 00:57 -ln - root 0.002 secs 0.000 us 0.002 sy 0.002 es Thu May 17 00:57 -time - root 0.003 secs 0.000 us 0.003 sy 0.005 es Thu May 17 00:57 -1234567890123456 - root 0.002 secs 0.000 us 0.002 sy 0.002 es Thu May 17 00:57 -ln - root 0.002 secs 0.000 us 0.002 sy 0.002 es Thu May 17 00:57 -time - root 0.003 secs 0.000 us 0.003 sy 0.013 es Thu May 17 00:57 -123456789012345 - root 0.002 secs 0.000 us 0.002 sy 0.010 es Thu May 17 00:57 -ln - root 0.003 secs 0.000 us 0.003 sy 0.003 es Thu May 17 00:57 -time - root 0.003 secs 0.000 us 0.003 sy 0.246 es Thu May 17 00:57 -diff - root 0.223 secs 0.164 us 0.060 sy 0.243 es Thu May 17 00:57 -time - root 0.003 secs 0.000 us 0.003 sy 0.079 es Thu May 17 00:57 -dd - root 0.076 secs 0.000 us 0.076 sy 0.076 es Thu May 17 00:57 -time - root 0.004 secs 0.000 us 0.004 sy 3.006 es Thu May 17 00:57 -sleep - root 0.002 secs 0.000 us 0.002 sy 3.002 es Thu May 17 00:57 -time - root 0.003 secs 0.000 us 0.003 sy 9.945 es Thu May 17 00:57 -find - root 0.822 secs 0.055 us 0.767 sy 9.942 es Thu May 17 00:57 -time - root 0.003 secs 0.000 us 0.003 sy 3.313 es Thu May 17 00:57 -egrep - root 3.247 secs 3.247 us 0.000 sy 3.310 es Thu May 17 00:57 -time - root 0.003 secs 0.000 us 0.003 sy 0.185 es Thu May 17 00:57 -awk - root 0.163 secs 0.156 us 0.007 sy 0.164 es Thu May 17 00:57 -accton - root 0.002 secs 0.000 us 0.002 sy 0.019 es Thu May 17 00:57 +core -FDX root 0.002 secs 0.000 us 0.002 sy 0.009 es Thu May 17 05:57 +core -DX root 0.005 secs 0.000 us 0.005 sy 0.010 es Thu May 17 05:57 +cc - root 0.005 secs 0.000 us 0.005 sy 0.652 es Thu May 17 05:57 +ld - root 0.014 secs 0.005 us 0.009 sy 0.150 es Thu May 17 05:57 +as - root 0.005 secs 0.000 us 0.005 sy 0.078 es Thu May 17 05:57 +cc1 - root 0.024 secs 0.008 us 0.016 sy 0.347 es Thu May 17 05:57 +time - root 0.003 secs 0.000 us 0.003 sy 0.005 es Thu May 17 05:57 +1234567890123456 - root 0.002 secs 0.000 us 0.002 sy 0.002 es Thu May 17 05:57 +ln - root 0.002 secs 0.000 us 0.002 sy 0.002 es Thu May 17 05:57 +time - root 0.003 secs 0.000 us 0.003 sy 0.005 es Thu May 17 05:57 +1234567890123456 - root 0.002 secs 0.000 us 0.002 sy 0.002 es Thu May 17 05:57 +ln - root 0.002 secs 0.000 us 0.002 sy 0.002 es Thu May 17 05:57 +time - root 0.003 secs 0.000 us 0.003 sy 0.013 es Thu May 17 05:57 +123456789012345 - root 0.002 secs 0.000 us 0.002 sy 0.010 es Thu May 17 05:57 +ln - root 0.003 secs 0.000 us 0.003 sy 0.003 es Thu May 17 05:57 +time - root 0.003 secs 0.000 us 0.003 sy 0.246 es Thu May 17 05:57 +diff - root 0.223 secs 0.164 us 0.060 sy 0.243 es Thu May 17 05:57 +time - root 0.003 secs 0.000 us 0.003 sy 0.079 es Thu May 17 05:57 +dd - root 0.076 secs 0.000 us 0.076 sy 0.076 es Thu May 17 05:57 +time - root 0.004 secs 0.000 us 0.004 sy 3.006 es Thu May 17 05:57 +sleep - root 0.002 secs 0.000 us 0.002 sy 3.002 es Thu May 17 05:57 +time - root 0.003 secs 0.000 us 0.003 sy 9.945 es Thu May 17 05:57 +find - root 0.822 secs 0.055 us 0.767 sy 9.942 es Thu May 17 05:57 +time - root 0.003 secs 0.000 us 0.003 sy 3.313 es Thu May 17 05:57 +egrep - root 3.247 secs 3.247 us 0.000 sy 3.310 es Thu May 17 05:57 +time - root 0.003 secs 0.000 us 0.003 sy 0.185 es Thu May 17 05:57 +awk - root 0.163 secs 0.156 us 0.007 sy 0.164 es Thu May 17 05:57 +accton - root 0.002 secs 0.000 us 0.002 sy 0.019 es Thu May 17 05:57 Modified: stable/10/tools/regression/usr.bin/m4/regress.gnusofterror.out ============================================================================== --- stable/10/tools/regression/usr.bin/m4/regress.gnusofterror.out Mon Apr 14 12:49:18 2014 (r264456) +++ stable/10/tools/regression/usr.bin/m4/regress.gnusofterror.out Mon Apr 14 13:30:08 2014 (r264457) @@ -1 +1,2 @@ +m4: gnusofterror.m4 at line 3: include(hey I do not exit): No such file or directory abc Modified: stable/10/tools/regression/usr.bin/m4/regress.sh ============================================================================== --- stable/10/tools/regression/usr.bin/m4/regress.sh Mon Apr 14 12:49:18 2014 (r264456) +++ stable/10/tools/regression/usr.bin/m4/regress.sh Mon Apr 14 13:30:08 2014 (r264457) @@ -2,7 +2,7 @@ LC_ALL=C; export LC_ALL -echo 1..22 +echo 1..21 REGRESSION_START($1) @@ -17,7 +17,7 @@ REGRESSION_TEST(`gnuformat', `m4 -g gnuf REGRESSION_TEST(`gnupatterns', `m4 -g gnupatterns.m4') REGRESSION_TEST(`gnupatterns2', `m4 -g gnupatterns2.m4') REGRESSION_TEST(`gnuprefix', `m4 -P gnuprefix.m4 2>&1') -REGRESSION_TEST(`gnusofterror', `m4 -g gnusofterror.m4') +REGRESSION_TEST(`gnusofterror', `m4 -g gnusofterror.m4 2>&1') REGRESSION_TEST(`gnutranslit2', `m4 -g translit2.m4') REGRESSION_TEST(`includes', `m4 -I. includes.m4') REGRESSION_TEST(`m4wrap3', `m4 m4wrap3.m4') Modified: stable/10/tools/regression/usr.bin/m4/regress.t ============================================================================== --- stable/10/tools/regression/usr.bin/m4/regress.t Mon Apr 14 12:49:18 2014 (r264456) +++ stable/10/tools/regression/usr.bin/m4/regress.t Mon Apr 14 13:30:08 2014 (r264457) @@ -3,4 +3,4 @@ cd `dirname $0` -sh regress.sh +m4 ../regress.m4 regress.sh | sh Modified: stable/10/tools/regression/usr.bin/make/common.sh ============================================================================== --- stable/10/tools/regression/usr.bin/make/common.sh Mon Apr 14 12:49:18 2014 (r264456) +++ stable/10/tools/regression/usr.bin/make/common.sh Mon Apr 14 13:30:08 2014 (r264457) @@ -13,6 +13,13 @@ fatal() exit 1 } +make_is_fmake() { + # This test is not very reliable but works for now: the old fmake + # does have a -v option while bmake doesn't. + ${MAKE_PROG} -f Makefile.non-existent -v 2>&1 | \ + grep -q "cannot open.*non-existent" +} + # # Check whether the working directory exists - it must. # @@ -322,19 +329,25 @@ eval_compare() while [ ${N} -le ${TEST_N} ] ; do fail= todo= + skip= if ! skip_test ${N} ; then do_compare stdout ${N} || fail="${fail}stdout " do_compare stderr ${N} || fail="${fail}stderr " do_compare status ${N} || fail="${fail}status " eval todo=\${TEST_${N}_TODO} + else + eval skip=\${TEST_${N}_SKIP} fi if [ ! -z "$fail" ]; then echo -n "not " fi echo -n "ok ${N} ${SUBDIR}/${N}" - if [ ! -z "$fail" -o ! -z "$todo" ]; then + if [ ! -z "$fail" -o ! -z "$todo" -o ! -z "$skip" ]; then echo -n " # " fi + if [ ! -z "$skip" ] ; then + echo -n "skip $skip; " + fi if [ ! -z "$todo" ] ; then echo -n "TODO $todo; " fi @@ -473,6 +486,12 @@ eval_cmd() set -- prove fi + if ! make_is_fmake ; then + for i in $(jot ${TEST_N:-1}) ; do + eval TEST_${i}_SKIP=\"make is not fmake\" + done + fi + for i do case $i in Modified: stable/10/tools/regression/usr.bin/ncal/regress.sh ============================================================================== --- stable/10/tools/regression/usr.bin/ncal/regress.sh Mon Apr 14 12:49:18 2014 (r264456) +++ stable/10/tools/regression/usr.bin/ncal/regress.sh Mon Apr 14 13:30:08 2014 (r264457) @@ -6,6 +6,8 @@ NCAL="${CAL_BIN} -N" YEARS="2008 2009 2010 2011" ONEYEAR="2009" +echo 1..89 + REGRESSION_START($1) # @@ -15,8 +17,6 @@ REGRESSION_START($1) # Full year calendars -echo 1..16 - for y in ${YEARS}; do # Regular calendar, Month days, No-highlight REGRESSION_TEST(`r-y${y}-md-nhl', `$NCAL -h ${y}') @@ -30,8 +30,6 @@ done # 3 month calendars -echo 17 .. 29 - for m in $(jot -w %02d 12); do # Regular calendar, Month days, No-highlight REGRESSION_TEST(`r-3m${ONEYEAR}${m}-md-nhl', Modified: stable/10/tools/regression/usr.bin/pkill/pgrep-_s.t ============================================================================== --- stable/10/tools/regression/usr.bin/pkill/pgrep-_s.t Mon Apr 14 12:49:18 2014 (r264456) +++ stable/10/tools/regression/usr.bin/pkill/pgrep-_s.t Mon Apr 14 13:30:08 2014 (r264457) @@ -5,15 +5,17 @@ base=`basename $0` echo "1..2" +exp_pid="$(ps ax | grep '\[idle\]' | awk '{print $1}')" + name="pgrep -S" -pid=`pgrep -Sx g_event` -if [ "$pid" = "2" ]; then +pid=`pgrep -Sx idle` +if [ "$pid" = "$exp_pid" ]; then echo "ok 1 - $name" else echo "not ok 1 - $name" fi -pid=`pgrep -x g_event` -if [ "$pid" != "2" ]; then +pid=`pgrep -x idle` +if [ "$pid" != "$exp_pid" ]; then echo "ok 2 - $name" else echo "not ok 2 - $name" Modified: stable/10/tools/regression/usr.bin/printf/regress.sh ============================================================================== --- stable/10/tools/regression/usr.bin/printf/regress.sh Mon Apr 14 12:49:18 2014 (r264456) +++ stable/10/tools/regression/usr.bin/printf/regress.sh Mon Apr 14 13:30:08 2014 (r264457) @@ -2,7 +2,7 @@ REGRESSION_START($1) -echo '1..12' +echo '1..15' REGRESSION_TEST(`b', `printf "abc%b%b" "def\n" "\cghi"') REGRESSION_TEST(`d', `printf "%d,%5d,%.5d,%0*d,%.*d\n" 123 123 123 5 123 5 123') Modified: stable/10/tools/regression/usr.bin/sed/regress.sh ============================================================================== --- stable/10/tools/regression/usr.bin/sed/regress.sh Mon Apr 14 12:49:18 2014 (r264456) +++ stable/10/tools/regression/usr.bin/sed/regress.sh Mon Apr 14 13:30:08 2014 (r264457) @@ -2,7 +2,7 @@ REGRESSION_START($1) -echo '1..25' +echo '1..26' REGRESSION_TEST(`G', `sed G < regress.in') REGRESSION_TEST(`P', `sed P < regress.in') Modified: stable/10/tools/regression/usr.bin/yacc/regress.00.out ============================================================================== --- stable/10/tools/regression/usr.bin/yacc/regress.00.out Mon Apr 14 12:49:18 2014 (r264456) +++ stable/10/tools/regression/usr.bin/yacc/regress.00.out Mon Apr 14 13:30:08 2014 (r264457) @@ -5,6 +5,7 @@ static const char yysccsid[] = "@(#)yacc #define YYBYACC 1 #define YYMAJOR 1 #define YYMINOR 9 +#define YYPATCH 20140101 #define YYEMPTY (-1) #define yyclearin (yychar = YYEMPTY) @@ -77,10 +78,11 @@ static const short yycheck[] = { #define YYDEBUG 0 #endif #define YYMAXTOKEN 0 +#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? (YYMAXTOKEN + 1) : (a)) #if YYDEBUG static const char *yyname[] = { -"end-of-file", +"end-of-file","illegal-symbol", }; static const char *yyrule[] = { "$accept : rule", @@ -105,12 +107,12 @@ YYSTYPE yylval; #ifdef YYMAXDEPTH #define YYSTACKSIZE YYMAXDEPTH #else -#define YYSTACKSIZE 500 -#define YYMAXDEPTH 500 +#define YYSTACKSIZE 10000 +#define YYMAXDEPTH 10000 #endif #endif -#define YYINITSTACKSIZE 500 +#define YYINITSTACKSIZE 200 typedef struct { unsigned stacksize; @@ -145,7 +147,7 @@ static int yygrowstack(YYSTACKDATA *data else if ((newsize *= 2) > YYMAXDEPTH) newsize = YYMAXDEPTH; - i = data->s_mark - data->s_base; + i = (int) (data->s_mark - data->s_base); newss = (short *)realloc(data->s_base, newsize * sizeof(*newss)); if (newss == 0) return -1; @@ -219,9 +221,7 @@ yyloop: #if YYDEBUG if (yydebug) { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; + yys = yyname[YYTRANSLATE(yychar)]; printf("%sdebug: state %d, reading %d (%s)\n", YYPREFIX, yystate, yychar, yys); } @@ -303,9 +303,7 @@ yyinrecovery: #if YYDEBUG if (yydebug) { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; + yys = yyname[YYTRANSLATE(yychar)]; printf("%sdebug: state %d, error recovery discards token %d (%s)\n", YYPREFIX, yystate, yychar, yys); } @@ -348,9 +346,7 @@ yyreduce: #if YYDEBUG if (yydebug) { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; + yys = yyname[YYTRANSLATE(yychar)]; printf("%sdebug: state %d, reading %d (%s)\n", YYPREFIX, YYFINAL, yychar, yys); } Modified: stable/10/tools/regression/usr.bin/yacc/regress.01.out ============================================================================== --- stable/10/tools/regression/usr.bin/yacc/regress.01.out Mon Apr 14 12:49:18 2014 (r264456) +++ stable/10/tools/regression/usr.bin/yacc/regress.01.out Mon Apr 14 13:30:08 2014 (r264457) @@ -5,6 +5,7 @@ static const char yysccsid[] = "@(#)yacc #define YYBYACC 1 #define YYMAJOR 1 #define YYMINOR 9 +#define YYPATCH 20140101 #define YYEMPTY (-1) #define yyclearin (yychar = YYEMPTY) @@ -25,7 +26,7 @@ int base; extern int yylex(void); static void yyerror(const char *s); -#line 28 "/dev/stdout" +#line 29 "/dev/stdout" #ifndef YYSTYPE typedef int YYSTYPE; @@ -152,6 +153,7 @@ static const short yycheck[] = { #define YYDEBUG 0 #endif #define YYMAXTOKEN 259 +#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? (YYMAXTOKEN + 1) : (a)) #if YYDEBUG static const char *yyname[] = { @@ -162,7 +164,7 @@ static const char *yyname[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,"DIGIT","LETTER","UMINUS", +0,0,0,0,0,0,"DIGIT","LETTER","UMINUS","illegal-symbol", }; static const char *yyrule[] = { "$accept : list", @@ -204,12 +206,12 @@ YYSTYPE yylval; #ifdef YYMAXDEPTH #define YYSTACKSIZE YYMAXDEPTH #else -#define YYSTACKSIZE 500 -#define YYMAXDEPTH 500 +#define YYSTACKSIZE 10000 +#define YYMAXDEPTH 10000 #endif #endif -#define YYINITSTACKSIZE 500 +#define YYINITSTACKSIZE 200 typedef struct { unsigned stacksize; @@ -263,7 +265,7 @@ yylex(void) } return( c ); } -#line 266 "/dev/stdout" +#line 267 "/dev/stdout" #if YYDEBUG #include /* needed for printf */ @@ -287,7 +289,7 @@ static int yygrowstack(YYSTACKDATA *data else if ((newsize *= 2) > YYMAXDEPTH) newsize = YYMAXDEPTH; - i = data->s_mark - data->s_base; + i = (int) (data->s_mark - data->s_base); newss = (short *)realloc(data->s_base, newsize * sizeof(*newss)); if (newss == 0) return -1; @@ -361,9 +363,7 @@ yyloop: #if YYDEBUG if (yydebug) { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; + yys = yyname[YYTRANSLATE(yychar)]; printf("%sdebug: state %d, reading %d (%s)\n", YYPREFIX, yystate, yychar, yys); } @@ -445,9 +445,7 @@ yyinrecovery: #if YYDEBUG if (yydebug) { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; + yys = yyname[YYTRANSLATE(yychar)]; printf("%sdebug: state %d, error recovery discards token %d (%s)\n", YYPREFIX, yystate, yychar, yys); } @@ -529,7 +527,7 @@ case 18: #line 63 "calc.y" { yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; } break; -#line 532 "/dev/stdout" +#line 529 "/dev/stdout" } yystack.s_mark -= yym; yystate = *yystack.s_mark; @@ -551,9 +549,7 @@ break; #if YYDEBUG if (yydebug) { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; + yys = yyname[YYTRANSLATE(yychar)]; printf("%sdebug: state %d, reading %d (%s)\n", YYPREFIX, YYFINAL, yychar, yys); } Modified: stable/10/tools/regression/usr.bin/yacc/regress.02.out ============================================================================== --- stable/10/tools/regression/usr.bin/yacc/regress.02.out Mon Apr 14 12:49:18 2014 (r264456) +++ stable/10/tools/regression/usr.bin/yacc/regress.02.out Mon Apr 14 13:30:08 2014 (r264457) @@ -5,6 +5,7 @@ static const char yysccsid[] = "@(#)yacc #define YYBYACC 1 #define YYMAJOR 1 #define YYMINOR 9 +#define YYPATCH 20140101 #define YYEMPTY (-1) #define yyclearin (yychar = YYEMPTY) @@ -55,7 +56,7 @@ typedef union INTERVAL vval; } YYSTYPE; #endif /* !YYSTYPE_IS_DECLARED */ -#line 58 "/dev/stdout" +#line 59 "/dev/stdout" /* compatibility with bison */ #ifdef YYPARSE_PARAM @@ -192,6 +193,7 @@ static const short yycheck[] = { #define YYDEBUG 0 #endif #define YYMAXTOKEN 260 +#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? (YYMAXTOKEN + 1) : (a)) #if YYDEBUG static const char *yyname[] = { @@ -202,7 +204,7 @@ static const char *yyname[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,"DREG","VREG","CONST","UMINUS", +0,0,"DREG","VREG","CONST","UMINUS","illegal-symbol", }; static const char *yyrule[] = { "$accept : line", @@ -254,12 +256,12 @@ YYSTYPE yylval; #ifdef YYMAXDEPTH #define YYSTACKSIZE YYMAXDEPTH #else -#define YYSTACKSIZE 500 -#define YYMAXDEPTH 500 +#define YYSTACKSIZE 10000 +#define YYMAXDEPTH 10000 #endif #endif -#define YYINITSTACKSIZE 500 +#define YYINITSTACKSIZE 200 typedef struct { unsigned stacksize; @@ -402,7 +404,7 @@ vdiv(double a, double b, INTERVAL v) { return (hilo(a / v.hi, a / v.lo, b / v.hi, b / v.lo)); } -#line 405 "/dev/stdout" +#line 406 "/dev/stdout" #if YYDEBUG #include /* needed for printf */ @@ -426,7 +428,7 @@ static int yygrowstack(YYSTACKDATA *data else if ((newsize *= 2) > YYMAXDEPTH) newsize = YYMAXDEPTH; - i = data->s_mark - data->s_base; + i = (int) (data->s_mark - data->s_base); newss = (short *)realloc(data->s_base, newsize * sizeof(*newss)); if (newss == 0) return -1; @@ -500,9 +502,7 @@ yyloop: #if YYDEBUG if (yydebug) { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; + yys = yyname[YYTRANSLATE(yychar)]; printf("%sdebug: state %d, reading %d (%s)\n", YYPREFIX, yystate, yychar, yys); } @@ -584,9 +584,7 @@ yyinrecovery: #if YYDEBUG if (yydebug) { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; + yys = yyname[YYTRANSLATE(yychar)]; printf("%sdebug: state %d, error recovery discards token %d (%s)\n", YYPREFIX, yystate, yychar, yys); } @@ -771,7 +769,7 @@ case 28: yyval.vval = yystack.l_mark[-1].vval; } break; -#line 774 "/dev/stdout" +#line 771 "/dev/stdout" } yystack.s_mark -= yym; yystate = *yystack.s_mark; @@ -793,9 +791,7 @@ break; #if YYDEBUG if (yydebug) { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; + yys = yyname[YYTRANSLATE(yychar)]; printf("%sdebug: state %d, reading %d (%s)\n", YYPREFIX, YYFINAL, yychar, yys); } Modified: stable/10/tools/regression/usr.bin/yacc/regress.03.out ============================================================================== --- stable/10/tools/regression/usr.bin/yacc/regress.03.out Mon Apr 14 12:49:18 2014 (r264456) +++ stable/10/tools/regression/usr.bin/yacc/regress.03.out Mon Apr 14 13:30:08 2014 (r264457) @@ -5,6 +5,7 @@ static const char yysccsid[] = "@(#)yacc #define YYBYACC 1 #define YYMAJOR 1 #define YYMINOR 9 +#define YYPATCH 20140101 #define YYEMPTY (-1) #define yyclearin (yychar = YYEMPTY) @@ -28,7 +29,7 @@ int YYLEX_DECL(); static void YYERROR_DECL(); #endif -#line 31 "/dev/stdout" +#line 32 "/dev/stdout" #ifndef YYSTYPE typedef int YYSTYPE; @@ -159,6 +160,7 @@ static const short yycheck[] = { #define YYDEBUG 0 #endif #define YYMAXTOKEN 259 +#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? (YYMAXTOKEN + 1) : (a)) #if YYDEBUG static const char *yyname[] = { @@ -169,7 +171,7 @@ static const char *yyname[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,"DIGIT","LETTER","UMINUS", +0,0,0,0,0,0,"DIGIT","LETTER","UMINUS","illegal-symbol", }; static const char *yyrule[] = { "$accept : list", @@ -206,12 +208,12 @@ int yynerrs; #ifdef YYMAXDEPTH #define YYSTACKSIZE YYMAXDEPTH #else -#define YYSTACKSIZE 500 -#define YYMAXDEPTH 500 +#define YYSTACKSIZE 10000 +#define YYMAXDEPTH 10000 #endif #endif -#define YYINITSTACKSIZE 500 +#define YYINITSTACKSIZE 200 typedef struct { unsigned stacksize; @@ -270,7 +272,7 @@ YYLEX_DECL() } return( c ); } -#line 273 "/dev/stdout" +#line 274 "/dev/stdout" #if YYDEBUG #include /* needed for printf */ @@ -294,7 +296,7 @@ static int yygrowstack(YYSTACKDATA *data else if ((newsize *= 2) > YYMAXDEPTH) newsize = YYMAXDEPTH; - i = data->s_mark - data->s_base; + i = (int) (data->s_mark - data->s_base); newss = (short *)realloc(data->s_base, newsize * sizeof(*newss)); if (newss == 0) return -1; @@ -375,9 +377,7 @@ yyloop: #if YYDEBUG if (yydebug) { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; + yys = yyname[YYTRANSLATE(yychar)]; printf("%sdebug: state %d, reading %d (%s)\n", YYPREFIX, yystate, yychar, yys); } @@ -459,9 +459,7 @@ yyinrecovery: #if YYDEBUG if (yydebug) { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; + yys = yyname[YYTRANSLATE(yychar)]; printf("%sdebug: state %d, error recovery discards token %d (%s)\n", YYPREFIX, yystate, yychar, yys); } @@ -543,7 +541,7 @@ case 18: #line 73 "calc3.y" { yyval = (*base) * yystack.l_mark[-1] + yystack.l_mark[0]; } break; -#line 546 "/dev/stdout" +#line 543 "/dev/stdout" } yystack.s_mark -= yym; yystate = *yystack.s_mark; @@ -565,9 +563,7 @@ break; #if YYDEBUG if (yydebug) { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; + yys = yyname[YYTRANSLATE(yychar)]; printf("%sdebug: state %d, reading %d (%s)\n", YYPREFIX, YYFINAL, yychar, yys); } Modified: stable/10/tools/regression/usr.bin/yacc/regress.04.out ============================================================================== --- stable/10/tools/regression/usr.bin/yacc/regress.04.out Mon Apr 14 12:49:18 2014 (r264456) +++ stable/10/tools/regression/usr.bin/yacc/regress.04.out Mon Apr 14 13:30:08 2014 (r264457) @@ -5,6 +5,7 @@ static const char yysccsid[] = "@(#)yacc #define YYBYACC 1 #define YYMAJOR 1 #define YYMINOR 9 +#define YYPATCH 20140101 #define YYEMPTY (-1) #define yyclearin (yychar = YYEMPTY) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Mon Apr 14 17:54:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 073FE5C1; Mon, 14 Apr 2014 17:54:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB21016AC; Mon, 14 Apr 2014 17:54:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3EHs2gS058170; Mon, 14 Apr 2014 17:54:02 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3EHs2Vv058168; Mon, 14 Apr 2014 17:54:02 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201404141754.s3EHs2Vv058168@svn.freebsd.org> From: Dimitry Andric Date: Mon, 14 Apr 2014 17:54:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264464 - in stable: 10 10/contrib/llvm/tools/clang/lib/Driver 9 9/contrib/llvm/tools/clang/lib/Driver X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2014 17:54:03 -0000 Author: dim Date: Mon Apr 14 17:54:01 2014 New Revision: 264464 URL: http://svnweb.freebsd.org/changeset/base/264464 Log: MFC r264345: Amend r263891, by making clang default to DWARF2 debug info format for all FreeBSD versions, not just 10.x and earlier. Apparently too many people seem to have trouble with post-1993 formats. Also remove the related notes about messing with kernel configuration files from UPDATING, which are now superfluous. Requested by: many Modified: stable/10/UPDATING stable/10/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/UPDATING (contents, props changed) stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) Modified: stable/10/UPDATING ============================================================================== --- stable/10/UPDATING Mon Apr 14 16:55:09 2014 (r264463) +++ stable/10/UPDATING Mon Apr 14 17:54:01 2014 (r264464) @@ -16,18 +16,8 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. - 20140321: - Clang and llvm have been upgraded to 3.4 release. Please note that - clang 3.4 now defaults to DWARF4 debug information format when you - specify -g. Since kgdb(1) only supports DWARF2, you should update any - customized kernel configurations which include debug information to - explicitly use -gdwarf-2, e.g: - - makeoptions DEBUG=-gdwarf-2 - - This has already been applied to the appropriate GENERIC configuration - files, so if you inherit from those, no changes are required. + Clang and llvm have been upgraded to 3.4 release. 20140306: If a Makefile in a tests/ directory was auto-generating a Kyuafile Modified: stable/10/contrib/llvm/tools/clang/lib/Driver/Tools.cpp ============================================================================== --- stable/10/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Mon Apr 14 16:55:09 2014 (r264463) +++ stable/10/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Mon Apr 14 17:54:01 2014 (r264464) @@ -2628,10 +2628,9 @@ void Clang::ConstructJob(Compilation &C, CmdArgs.push_back("-gdwarf-4"); else if (!A->getOption().matches(options::OPT_g0) && !A->getOption().matches(options::OPT_ggdb0)) { - // Default is dwarf-2 for darwin and FreeBSD <= 10. + // Default is dwarf-2 for darwin and FreeBSD. const llvm::Triple &Triple = getToolChain().getTriple(); - if (Triple.isOSDarwin() || (Triple.getOS() == llvm::Triple::FreeBSD && - Triple.getOSMajorVersion() <= 10)) + if (Triple.isOSDarwin() || Triple.getOS() == llvm::Triple::FreeBSD) CmdArgs.push_back("-gdwarf-2"); else CmdArgs.push_back("-g"); From owner-svn-src-stable@FreeBSD.ORG Mon Apr 14 17:54:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 735C85C0; Mon, 14 Apr 2014 17:54:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53F7B16AB; Mon, 14 Apr 2014 17:54:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3EHs2VI058163; Mon, 14 Apr 2014 17:54:02 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3EHs1WB058161; Mon, 14 Apr 2014 17:54:01 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201404141754.s3EHs1WB058161@svn.freebsd.org> From: Dimitry Andric Date: Mon, 14 Apr 2014 17:54:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264464 - in stable: 10 10/contrib/llvm/tools/clang/lib/Driver 9 9/contrib/llvm/tools/clang/lib/Driver X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2014 17:54:02 -0000 Author: dim Date: Mon Apr 14 17:54:01 2014 New Revision: 264464 URL: http://svnweb.freebsd.org/changeset/base/264464 Log: MFC r264345: Amend r263891, by making clang default to DWARF2 debug info format for all FreeBSD versions, not just 10.x and earlier. Apparently too many people seem to have trouble with post-1993 formats. Also remove the related notes about messing with kernel configuration files from UPDATING, which are now superfluous. Requested by: many Modified: stable/9/UPDATING (contents, props changed) stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) Changes in other areas also in this revision: Modified: stable/10/UPDATING stable/10/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Directory Properties: stable/10/ (props changed) Modified: stable/9/UPDATING ============================================================================== --- stable/9/UPDATING Mon Apr 14 16:55:09 2014 (r264463) +++ stable/9/UPDATING Mon Apr 14 17:54:01 2014 (r264464) @@ -12,16 +12,7 @@ Items affecting the ports and packages s /usr/ports/UPDATING. Please read that file before running portupgrade. 20140321: - Clang and llvm have been upgraded to 3.4 release. Please note that - clang 3.4 now defaults to DWARF4 debug information format when you - specify -g. Since kgdb(1) only supports DWARF2, you should update any - customized kernel configurations which include debug information to - explicitly use -gdwarf-2, e.g: - - makeoptions DEBUG=-gdwarf-2 - - This has already been applied to the appropriate GENERIC configuration - files, so if you inherit from those, no changes are required. + Clang and llvm have been upgraded to 3.4 release. 20140216: The nve(4) driver for NVIDIA nForce MCP Ethernet adapters has Modified: stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Mon Apr 14 16:55:09 2014 (r264463) +++ stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Mon Apr 14 17:54:01 2014 (r264464) @@ -2628,10 +2628,9 @@ void Clang::ConstructJob(Compilation &C, CmdArgs.push_back("-gdwarf-4"); else if (!A->getOption().matches(options::OPT_g0) && !A->getOption().matches(options::OPT_ggdb0)) { - // Default is dwarf-2 for darwin and FreeBSD <= 10. + // Default is dwarf-2 for darwin and FreeBSD. const llvm::Triple &Triple = getToolChain().getTriple(); - if (Triple.isOSDarwin() || (Triple.getOS() == llvm::Triple::FreeBSD && - Triple.getOSMajorVersion() <= 10)) + if (Triple.isOSDarwin() || Triple.getOS() == llvm::Triple::FreeBSD) CmdArgs.push_back("-gdwarf-2"); else CmdArgs.push_back("-g"); From owner-svn-src-stable@FreeBSD.ORG Mon Apr 14 21:04:59 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C60E59A; Mon, 14 Apr 2014 21:04:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C8A21BD2; Mon, 14 Apr 2014 21:04:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3EL4xHD038202; Mon, 14 Apr 2014 21:04:59 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3EL4wb3038200; Mon, 14 Apr 2014 21:04:58 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201404142104.s3EL4wb3038200@svn.freebsd.org> From: Devin Teske Date: Mon, 14 Apr 2014 21:04:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264472 - stable/10/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2014 21:04:59 -0000 Author: dteske Date: Mon Apr 14 21:04:58 2014 New Revision: 264472 URL: http://svnweb.freebsd.org/changeset/base/264472 Log: MFC r260866,260900,261960 (3 revisions; summarized below): 260866: Fix a bad comparison operator and fix dumpdev comment 260900: Dummy commit; show r260866 was in-part by Christoph Mallon 261960: Add zfsboot to bsdinstall(8) scripted interface Modified: stable/10/usr.sbin/bsdinstall/scripts/script stable/10/usr.sbin/bsdinstall/scripts/services Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/script ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/script Mon Apr 14 21:02:20 2014 (r264471) +++ stable/10/usr.sbin/bsdinstall/scripts/script Mon Apr 14 21:04:58 2014 (r264472) @@ -95,7 +95,11 @@ fi # Make partitions rm -f $PATH_FSTAB touch $PATH_FSTAB -bsdinstall scriptedpart "$PARTITIONS" +if [ "$ZFSBOOT_DISKS" ]; then + bsdinstall zfsboot +else + bsdinstall scriptedpart "$PARTITIONS" +fi bsdinstall mount # Unpack distributions Modified: stable/10/usr.sbin/bsdinstall/scripts/services ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/services Mon Apr 14 21:02:20 2014 (r264471) +++ stable/10/usr.sbin/bsdinstall/scripts/services Mon Apr 14 21:04:58 2014 (r264472) @@ -29,7 +29,8 @@ : ${DIALOG_OK=0} if [ -f $BSDINSTALL_TMPETC/rc.conf.services ]; then - eval `sed -e s/YES/on/i -e s/NO/off/i $BSDINSTALL_TMPETC/rc.conf.services` + eval $( sed -e s/YES/on/i -e s/NO/off/i \ + $BSDINSTALL_TMPETC/rc.conf.services ) else # Default service states. Everything is off if not enabled. sshd_enable="on" @@ -38,30 +39,29 @@ fi echo -n > $BSDINSTALL_TMPETC/rc.conf.services exec 3>&1 -DAEMONS=$(dialog --backtitle "FreeBSD Installer" \ +DAEMONS=$( dialog --backtitle "FreeBSD Installer" \ --title "System Configuration" --nocancel --separate-output \ --checklist "Choose the services you would like to be started at boot:" \ 0 0 0 \ sshd "Secure shell daemon" ${sshd_enable:-off} \ moused "PS/2 mouse pointer on console" ${moused_enable:-off} \ ntpd "Synchronize system and network time" ${ntpd_enable:-off} \ - powerd "Adjust CPU frequency dynamically if supported" ${powerd_enable:-off} \ + powerd "Adjust CPU frequency dynamically if supported" \ + ${powerd_enable:-off} \ dumpdev "Enable kernel crash dumps to /var/crash" ${dumpdev:-on} \ -2>&1 1>&3) +2>&1 1>&3 ) exec 3>&- havedump= for daemon in $DAEMONS; do - if [ "$daemon" == "dumpdev" ]; then - havedump=1 - echo '# Set dumpdev to "AUTO" to enable crash dumps, "NO"' \ - 'to disable' >> $BSDINSTALL_TMPETC/rc.conf.services - echo dumpdev=\"AUTO\" >> $BSDINSTALL_TMPETC/rc.conf.services - continue - fi + [ "$daemon" = "dumpdev" ] && havedump=1 continue echo ${daemon}_enable=\"YES\" >> $BSDINSTALL_TMPETC/rc.conf.services done -if [ ! "$havedump" ]; then +echo '# Set dumpdev to "AUTO" to enable crash dumps, "NO"' \ + 'to disable' >> $BSDINSTALL_TMPETC/rc.conf.services +if [ "$havedump" ]; then + echo dumpdev=\"AUTO\" >> $BSDINSTALL_TMPETC/rc.conf.services +else echo dumpdev=\"NO\" >> $BSDINSTALL_TMPETC/rc.conf.services fi From owner-svn-src-stable@FreeBSD.ORG Mon Apr 14 21:07:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB321704; Mon, 14 Apr 2014 21:07:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A6EC91BFE; Mon, 14 Apr 2014 21:07:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3EL7aEr038565; Mon, 14 Apr 2014 21:07:36 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3EL7aSm038564; Mon, 14 Apr 2014 21:07:36 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404142107.s3EL7aSm038564@svn.freebsd.org> From: Christian Brueffer Date: Mon, 14 Apr 2014 21:07:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264473 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2014 21:07:36 -0000 Author: brueffer Date: Mon Apr 14 21:07:36 2014 New Revision: 264473 URL: http://svnweb.freebsd.org/changeset/base/264473 Log: MFC: r264349 mdoc and spelling cleanup. Modified: stable/10/share/man/man4/wsp.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/wsp.4 ============================================================================== --- stable/10/share/man/man4/wsp.4 Mon Apr 14 21:04:58 2014 (r264472) +++ stable/10/share/man/man4/wsp.4 Mon Apr 14 21:07:36 2014 (r264473) @@ -41,7 +41,7 @@ your kernel configuration file: .Cd "device usb" .Ed .Pp -Alternativly, to load the driver as a module at boot time, +Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent @@ -53,31 +53,28 @@ The driver provides support for the Apple Internal Trackpad device found in many Apple laptops. .Pp -The driver simulates a three\-button mouse using multi\-finger tap +The driver simulates a three-button mouse using multi-finger tap detection. -. -A single\-finger press generates a left button click. -A two\-finger tap maps to the right button; whereas a three\-finger tap +A single-finger press generates a left button click. +A two-finger tap maps to the right button; whereas a three-finger tap gets treated as a middle button click. -. .Pp .Nm supports dynamic reconfiguration using -.Xr sysctl 8 ; +.Xr sysctl 8 through nodes under .Nm hw.usb.wsp . Pointer sensitivity can be controlled using the sysctl tunable .Nm hw.usb.wsp.scale_factor . -. .Sh FILES .Nm -creates a blocking pseudo\-device file, +creates a blocking pseudo-device file, .Pa /dev/wsp0 , which presents the mouse as a -.Ar sysmouse +.Em sysmouse or -.Ar mousesystems -type device\-\-see +.Em mousesystems +type device--see .Xr moused 8 for an explanation of these mouse types. From owner-svn-src-stable@FreeBSD.ORG Mon Apr 14 21:10:10 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 92993BBE; Mon, 14 Apr 2014 21:10:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7ED2C1C28; Mon, 14 Apr 2014 21:10:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3ELAAsF039292; Mon, 14 Apr 2014 21:10:10 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3ELAAdH039291; Mon, 14 Apr 2014 21:10:10 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404142110.s3ELAAdH039291@svn.freebsd.org> From: Christian Brueffer Date: Mon, 14 Apr 2014 21:10:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264476 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2014 21:10:10 -0000 Author: brueffer Date: Mon Apr 14 21:10:10 2014 New Revision: 264476 URL: http://svnweb.freebsd.org/changeset/base/264476 Log: MFC: r264349 mdoc and spelling cleanup. Modified: stable/9/share/man/man4/wsp.4 Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/wsp.4 ============================================================================== --- stable/9/share/man/man4/wsp.4 Mon Apr 14 21:09:47 2014 (r264475) +++ stable/9/share/man/man4/wsp.4 Mon Apr 14 21:10:10 2014 (r264476) @@ -41,7 +41,7 @@ your kernel configuration file: .Cd "device usb" .Ed .Pp -Alternativly, to load the driver as a module at boot time, +Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent @@ -53,31 +53,28 @@ The driver provides support for the Apple Internal Trackpad device found in many Apple laptops. .Pp -The driver simulates a three\-button mouse using multi\-finger tap +The driver simulates a three-button mouse using multi-finger tap detection. -. -A single\-finger press generates a left button click. -A two\-finger tap maps to the right button; whereas a three\-finger tap +A single-finger press generates a left button click. +A two-finger tap maps to the right button; whereas a three-finger tap gets treated as a middle button click. -. .Pp .Nm supports dynamic reconfiguration using -.Xr sysctl 8 ; +.Xr sysctl 8 through nodes under .Nm hw.usb.wsp . Pointer sensitivity can be controlled using the sysctl tunable .Nm hw.usb.wsp.scale_factor . -. .Sh FILES .Nm -creates a blocking pseudo\-device file, +creates a blocking pseudo-device file, .Pa /dev/wsp0 , which presents the mouse as a -.Ar sysmouse +.Em sysmouse or -.Ar mousesystems -type device\-\-see +.Em mousesystems +type device--see .Xr moused 8 for an explanation of these mouse types. From owner-svn-src-stable@FreeBSD.ORG Mon Apr 14 21:12:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 763F5D54; Mon, 14 Apr 2014 21:12:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 629351CBB; Mon, 14 Apr 2014 21:12:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3ELCdhG042405; Mon, 14 Apr 2014 21:12:39 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3ELCdnj042404; Mon, 14 Apr 2014 21:12:39 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404142112.s3ELCdnj042404@svn.freebsd.org> From: Christian Brueffer Date: Mon, 14 Apr 2014 21:12:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264477 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2014 21:12:39 -0000 Author: brueffer Date: Mon Apr 14 21:12:38 2014 New Revision: 264477 URL: http://svnweb.freebsd.org/changeset/base/264477 Log: MFC: r264362 Remove stray .Nm macro. Modified: stable/10/share/man/man4/terasic_mtl.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/terasic_mtl.4 ============================================================================== --- stable/10/share/man/man4/terasic_mtl.4 Mon Apr 14 21:10:10 2014 (r264476) +++ stable/10/share/man/man4/terasic_mtl.4 Mon Apr 14 21:12:38 2014 (r264477) @@ -109,7 +109,6 @@ as part of the DARPA CRASH research prog This device driver was written by .An Robert N. M. Watson . .Sh BUGS -.Nm The .Xr syscons 4 attachment does not support the hardware cursor feature. From owner-svn-src-stable@FreeBSD.ORG Mon Apr 14 21:26:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 680729E; Mon, 14 Apr 2014 21:26:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53F781DC0; Mon, 14 Apr 2014 21:26:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3ELQaM4046947; Mon, 14 Apr 2014 21:26:36 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3ELQZh7046940; Mon, 14 Apr 2014 21:26:35 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201404142126.s3ELQZh7046940@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 14 Apr 2014 21:26:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264478 - stable/10/bin/sh X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2014 21:26:36 -0000 Author: jilles Date: Mon Apr 14 21:26:34 2014 New Revision: 264478 URL: http://svnweb.freebsd.org/changeset/base/264478 Log: MFC r263777: sh: Fix possible memory leaks and double frees with unexpected SIGINT. Modified: stable/10/bin/sh/alias.c stable/10/bin/sh/exec.c stable/10/bin/sh/expand.c stable/10/bin/sh/redir.c stable/10/bin/sh/var.c Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/sh/alias.c ============================================================================== --- stable/10/bin/sh/alias.c Mon Apr 14 21:12:38 2014 (r264477) +++ stable/10/bin/sh/alias.c Mon Apr 14 21:26:34 2014 (r264478) @@ -180,6 +180,7 @@ printaliases(void) int i, j; struct alias **sorted, *ap; + INTOFF; sorted = ckmalloc(aliases * sizeof(*sorted)); j = 0; for (i = 0; i < ATABSIZE; i++) @@ -187,9 +188,13 @@ printaliases(void) if (*ap->name != '\0') sorted[j++] = ap; qsort(sorted, aliases, sizeof(*sorted), comparealiases); - for (i = 0; i < aliases; i++) + for (i = 0; i < aliases; i++) { printalias(sorted[i]); + if (int_pending()) + break; + } ckfree(sorted); + INTON; } int Modified: stable/10/bin/sh/exec.c ============================================================================== --- stable/10/bin/sh/exec.c Mon Apr 14 21:12:38 2014 (r264477) +++ stable/10/bin/sh/exec.c Mon Apr 14 21:26:34 2014 (r264478) @@ -612,6 +612,7 @@ defun(const char *name, union node *func /* * Delete a function if it exists. + * Called with interrupts off. */ int Modified: stable/10/bin/sh/expand.c ============================================================================== --- stable/10/bin/sh/expand.c Mon Apr 14 21:12:38 2014 (r264477) +++ stable/10/bin/sh/expand.c Mon Apr 14 21:26:34 2014 (r264478) @@ -956,6 +956,7 @@ recordregion(int start, int end, int inq { struct ifsregion *ifsp; + INTOFF; if (ifslastp == NULL) { ifsp = &ifsfirst; } else { @@ -963,6 +964,7 @@ recordregion(int start, int end, int inq && ifslastp->inquotes == inquotes) { /* extend previous area */ ifslastp->endoff = end; + INTON; return; } ifsp = (struct ifsregion *)ckmalloc(sizeof (struct ifsregion)); @@ -973,6 +975,7 @@ recordregion(int start, int end, int inq ifslastp->begoff = start; ifslastp->endoff = end; ifslastp->inquotes = inquotes; + INTON; } Modified: stable/10/bin/sh/redir.c ============================================================================== --- stable/10/bin/sh/redir.c Mon Apr 14 21:12:38 2014 (r264477) +++ stable/10/bin/sh/redir.c Mon Apr 14 21:26:34 2014 (r264478) @@ -92,6 +92,13 @@ static int openhere(union node *); * undone by calling popredir. If the REDIR_BACKQ flag is set, then the * standard output, and the standard error if it becomes a duplicate of * stdout, is saved in memory. +* + * We suppress interrupts so that we won't leave open file + * descriptors around. Because the signal handler remains + * installed and we do not use system call restart, interrupts + * will still abort blocking opens such as fifos (they will fail + * with EINTR). There is, however, a race condition if an interrupt + * arrives after INTOFF and before open blocks. */ void @@ -103,6 +110,7 @@ redirect(union node *redir, int flags) int fd; char memory[10]; /* file descriptors to write to memory */ + INTOFF; for (i = 10 ; --i >= 0 ; ) memory[i] = 0; memory[1] = flags & REDIR_BACKQ; @@ -139,11 +147,14 @@ redirect(union node *redir, int flags) INTON; } openredirect(n, memory); + INTON; + INTOFF; } if (memory[1]) out1 = &memout; if (memory[2]) out2 = &memout; + INTON; } @@ -156,15 +167,6 @@ openredirect(union node *redir, char mem int f; int e; - /* - * We suppress interrupts so that we won't leave open file - * descriptors around. Because the signal handler remains - * installed and we do not use system call restart, interrupts - * will still abort blocking opens such as fifos (they will fail - * with EINTR). There is, however, a race condition if an interrupt - * arrives after INTOFF and before open blocks. - */ - INTOFF; memory[fd] = 0; switch (redir->nfile.type) { case NFROM: @@ -237,7 +239,6 @@ movefd: default: abort(); } - INTON; } Modified: stable/10/bin/sh/var.c ============================================================================== --- stable/10/bin/sh/var.c Mon Apr 14 21:12:38 2014 (r264477) +++ stable/10/bin/sh/var.c Mon Apr 14 21:26:34 2014 (r264478) @@ -249,6 +249,7 @@ setvar(const char *name, const char *val vallen = strlen(val); len += vallen; } + INTOFF; nameeq = ckmalloc(len); memcpy(nameeq, name, namelen); nameeq[namelen] = '='; @@ -257,6 +258,7 @@ setvar(const char *name, const char *val else nameeq[namelen + 1] = '\0'; setvareq(nameeq, flags); + INTON; } static int @@ -289,6 +291,7 @@ change_env(const char *s, int set) char *eqp; char *ss; + INTOFF; ss = savestr(s); if ((eqp = strchr(ss, '=')) != NULL) *eqp = '\0'; @@ -297,6 +300,7 @@ change_env(const char *s, int set) else (void) unsetenv(ss); ckfree(ss); + INTON; return; } @@ -359,13 +363,13 @@ setvareq(char *s, int flags) /* not found */ if (flags & VNOSET) return; + INTOFF; vp = ckmalloc(sizeof (*vp)); vp->flags = flags; vp->text = s; vp->name_len = nlen; vp->next = *vpp; vp->func = NULL; - INTOFF; *vpp = vp; if ((vp->flags & VEXPORT) && localevar(s)) { change_env(s, 1); @@ -773,6 +777,7 @@ poplocalvars(void) struct localvar *lvp; struct var *vp; + INTOFF; while ((lvp = localvars) != NULL) { localvars = lvp->next; vp = lvp->vp; @@ -790,6 +795,7 @@ poplocalvars(void) } ckfree(lvp); } + INTON; } @@ -828,18 +834,21 @@ unsetcmd(int argc __unused, char **argv if (flg_func == 0 && flg_var == 0) flg_var = 1; + INTOFF; for (ap = argptr; *ap ; ap++) { if (flg_func) ret |= unsetfunc(*ap); if (flg_var) ret |= unsetvar(*ap); } + INTON; return ret; } /* * Unset the specified variable. + * Called with interrupts off. */ int @@ -853,7 +862,6 @@ unsetvar(const char *s) return (0); if (vp->flags & VREADONLY) return (1); - INTOFF; if (vp->text[vp->name_len + 1] != '\0') setvar(s, nullstr, 0); if ((vp->flags & VEXPORT) && localevar(vp->text)) { @@ -869,7 +877,6 @@ unsetvar(const char *s) *vpp = vp->next; ckfree(vp); } - INTON; return (0); } From owner-svn-src-stable@FreeBSD.ORG Mon Apr 14 23:52:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 641E3E1A; Mon, 14 Apr 2014 23:52:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D09B1BEF; Mon, 14 Apr 2014 23:52:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3ENq2q8007903; Mon, 14 Apr 2014 23:52:02 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3ENpvm4007855; Mon, 14 Apr 2014 23:51:57 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201404142351.s3ENpvm4007855@svn.freebsd.org> From: Julio Merino Date: Mon, 14 Apr 2014 23:51:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264483 - in stable/10: bin/date/tests bin/mv/tests bin/pax/tests bin/sh/tests bin/test/tests lib/atf/libatf-c++/tests lib/atf/libatf-c++/tests/detail lib/atf/libatf-c/tests lib/atf/lib... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2014 23:52:02 -0000 Author: jmmv Date: Mon Apr 14 23:51:57 2014 New Revision: 264483 URL: http://svnweb.freebsd.org/changeset/base/264483 Log: MFC refactoring of the *.test.mk files. - r263161 Make bsd.test.mk the only public mk fragment for the building of tests. - r263172 Move FreeBSD Test Suite-specific code to a suite.test.mk file. - r263204 Add some documentation for bsd.test.mk. - r263217 Document support for TAP-compliant Perl test programs. This is "make tinderbox" clean. Added: stable/10/share/mk/suite.test.mk - copied unchanged from r263172, head/share/mk/suite.test.mk Modified: stable/10/bin/date/tests/Makefile stable/10/bin/mv/tests/Makefile stable/10/bin/pax/tests/Makefile stable/10/bin/sh/tests/Makefile stable/10/bin/test/tests/Makefile stable/10/lib/atf/libatf-c++/tests/Makefile stable/10/lib/atf/libatf-c++/tests/detail/Makefile stable/10/lib/atf/libatf-c/tests/Makefile stable/10/lib/atf/libatf-c/tests/detail/Makefile stable/10/lib/atf/tests/test-programs/Makefile stable/10/lib/libcrypt/tests/Makefile stable/10/libexec/atf/atf-check/tests/Makefile stable/10/share/examples/tests/tests/atf/Makefile stable/10/share/examples/tests/tests/plain/Makefile stable/10/share/mk/Makefile stable/10/share/mk/atf.test.mk stable/10/share/mk/bsd.README stable/10/share/mk/bsd.test.mk stable/10/share/mk/plain.test.mk stable/10/share/mk/tap.test.mk stable/10/tests/sys/kern/Makefile stable/10/usr.bin/atf/atf-sh/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/date/tests/Makefile ============================================================================== --- stable/10/bin/date/tests/Makefile Mon Apr 14 22:49:37 2014 (r264482) +++ stable/10/bin/date/tests/Makefile Mon Apr 14 23:51:57 2014 (r264483) @@ -6,4 +6,4 @@ TESTSDIR= ${TESTSBASE}/bin/date TAP_TESTS_SH= legacy_test -.include +.include Modified: stable/10/bin/mv/tests/Makefile ============================================================================== --- stable/10/bin/mv/tests/Makefile Mon Apr 14 22:49:37 2014 (r264482) +++ stable/10/bin/mv/tests/Makefile Mon Apr 14 23:51:57 2014 (r264483) @@ -6,4 +6,4 @@ TESTSDIR= ${TESTSBASE}/bin/mv TAP_TESTS_SH= legacy_test -.include +.include Modified: stable/10/bin/pax/tests/Makefile ============================================================================== --- stable/10/bin/pax/tests/Makefile Mon Apr 14 22:49:37 2014 (r264482) +++ stable/10/bin/pax/tests/Makefile Mon Apr 14 23:51:57 2014 (r264483) @@ -6,4 +6,4 @@ TESTSDIR= ${TESTSBASE}/bin/pax TAP_TESTS_PERL= legacy_test -.include +.include Modified: stable/10/bin/sh/tests/Makefile ============================================================================== --- stable/10/bin/sh/tests/Makefile Mon Apr 14 22:49:37 2014 (r264482) +++ stable/10/bin/sh/tests/Makefile Mon Apr 14 23:51:57 2014 (r264483) @@ -15,4 +15,4 @@ TEST_METADATA.legacy_test+= required_use SUBDIR+= builtins errors execution expansion parameters parser set-e -.include +.include Modified: stable/10/bin/test/tests/Makefile ============================================================================== --- stable/10/bin/test/tests/Makefile Mon Apr 14 22:49:37 2014 (r264482) +++ stable/10/bin/test/tests/Makefile Mon Apr 14 23:51:57 2014 (r264483) @@ -12,4 +12,4 @@ TAP_TESTS_SH= legacy_test # requested. See https://code.google.com/p/kyua/issues/detail?id=6 TEST_METADATA.legacy_test+= required_user="unprivileged" -.include +.include Modified: stable/10/lib/atf/libatf-c++/tests/Makefile ============================================================================== --- stable/10/lib/atf/libatf-c++/tests/Makefile Mon Apr 14 22:49:37 2014 (r264482) +++ stable/10/lib/atf/libatf-c++/tests/Makefile Mon Apr 14 23:51:57 2014 (r264483) @@ -28,4 +28,4 @@ SRCS.${_T}= ${_T}.cpp test_helpers.cpp ATF_TESTS_SH= pkg_config_test -.include +.include Modified: stable/10/lib/atf/libatf-c++/tests/detail/Makefile ============================================================================== --- stable/10/lib/atf/libatf-c++/tests/detail/Makefile Mon Apr 14 22:49:37 2014 (r264482) +++ stable/10/lib/atf/libatf-c++/tests/detail/Makefile Mon Apr 14 23:51:57 2014 (r264483) @@ -29,4 +29,4 @@ BINDIR.${p}= ${TESTSDIR} version_helper.o: atf-version .include "../../../common.mk" -.include +.include Modified: stable/10/lib/atf/libatf-c/tests/Makefile ============================================================================== --- stable/10/lib/atf/libatf-c/tests/Makefile Mon Apr 14 22:49:37 2014 (r264482) +++ stable/10/lib/atf/libatf-c/tests/Makefile Mon Apr 14 23:51:57 2014 (r264483) @@ -35,4 +35,4 @@ SRCS.${_T}= ${_T}.c test_helpers.c ATF_TESTS_SH= pkg_config_test -.include +.include Modified: stable/10/lib/atf/libatf-c/tests/detail/Makefile ============================================================================== --- stable/10/lib/atf/libatf-c/tests/detail/Makefile Mon Apr 14 22:49:37 2014 (r264482) +++ stable/10/lib/atf/libatf-c/tests/detail/Makefile Mon Apr 14 23:51:57 2014 (r264483) @@ -31,4 +31,4 @@ BINDIR.${p}= ${TESTSDIR} version_helper.o: atf-version .include "../../../common.mk" -.include +.include Modified: stable/10/lib/atf/tests/test-programs/Makefile ============================================================================== --- stable/10/lib/atf/tests/test-programs/Makefile Mon Apr 14 22:49:37 2014 (r264482) +++ stable/10/lib/atf/tests/test-programs/Makefile Mon Apr 14 23:51:57 2014 (r264483) @@ -21,4 +21,4 @@ ATF_TESTS_SH+= ${_T} ATF_TESTS_SH_SRC_${_T}= common.sh ${_T}.sh .endfor -.include +.include Modified: stable/10/lib/libcrypt/tests/Makefile ============================================================================== --- stable/10/lib/libcrypt/tests/Makefile Mon Apr 14 22:49:37 2014 (r264482) +++ stable/10/lib/libcrypt/tests/Makefile Mon Apr 14 23:51:57 2014 (r264483) @@ -9,4 +9,4 @@ ATF_TESTS_C= crypt_tests CFLAGS+= -I${.CURDIR:H} LDADD+= -L${.OBJDIR:H} -lcrypt -.include +.include Modified: stable/10/libexec/atf/atf-check/tests/Makefile ============================================================================== --- stable/10/libexec/atf/atf-check/tests/Makefile Mon Apr 14 22:49:37 2014 (r264482) +++ stable/10/libexec/atf/atf-check/tests/Makefile Mon Apr 14 23:51:57 2014 (r264483) @@ -9,4 +9,4 @@ ATF= ${.CURDIR:H:H:H:H}/contrib/atf ATF_TESTS_SH= atf-check_test -.include +.include Modified: stable/10/share/examples/tests/tests/atf/Makefile ============================================================================== --- stable/10/share/examples/tests/tests/atf/Makefile Mon Apr 14 22:49:37 2014 (r264482) +++ stable/10/share/examples/tests/tests/atf/Makefile Mon Apr 14 23:51:57 2014 (r264483) @@ -27,4 +27,4 @@ ATF_TESTS_SH= cp_test # definitions from above. KYUAFILE= yes -.include +.include Modified: stable/10/share/examples/tests/tests/plain/Makefile ============================================================================== --- stable/10/share/examples/tests/tests/plain/Makefile Mon Apr 14 22:49:37 2014 (r264482) +++ stable/10/share/examples/tests/tests/plain/Makefile Mon Apr 14 23:51:57 2014 (r264483) @@ -27,4 +27,4 @@ PLAIN_TESTS_SH= cp_test # definitions from above. KYUAFILE= yes -.include +.include Modified: stable/10/share/mk/Makefile ============================================================================== --- stable/10/share/mk/Makefile Mon Apr 14 22:49:37 2014 (r264482) +++ stable/10/share/mk/Makefile Mon Apr 14 23:51:57 2014 (r264483) @@ -46,6 +46,7 @@ FILESDIR= ${BINDIR}/mk .if ${MK_TESTS} != "no" FILES+= atf.test.mk FILES+= plain.test.mk +FILES+= suite.test.mk FILES+= tap.test.mk .endif Modified: stable/10/share/mk/atf.test.mk ============================================================================== --- stable/10/share/mk/atf.test.mk Mon Apr 14 22:49:37 2014 (r264482) +++ stable/10/share/mk/atf.test.mk Mon Apr 14 23:51:57 2014 (r264483) @@ -1,9 +1,13 @@ # $FreeBSD$ # +# You must include bsd.test.mk instead of this file from your Makefile. +# # Logic to build and install ATF test programs; i.e. test programs linked # against the ATF libraries. -.include +.if !target(____) +.error atf.test.mk cannot be included directly. +.endif # List of C, C++ and shell test programs to build. # @@ -164,5 +168,3 @@ realtest: .PHONY .endif .endif - -.include Modified: stable/10/share/mk/bsd.README ============================================================================== --- stable/10/share/mk/bsd.README Mon Apr 14 22:49:37 2014 (r264482) +++ stable/10/share/mk/bsd.README Mon Apr 14 23:51:57 2014 (r264483) @@ -39,6 +39,7 @@ bsd.prog.mk - building programs from so bsd.snmpmod.mk - building modules for the SNMP daemon bsnmpd bsd.subdir.mk - targets for building subdirectories bsd.sys.mk - common settings used for building FreeBSD sources +bsd.test.mk - building test programs from source files sys.mk - default rules for all makes This file does not document bsd.port*.mk. They are documented in ports(7). @@ -365,3 +366,97 @@ It has rules for building profiled objec built by default. Libraries are ranlib'd before installation. + +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +The include file handles building one or more test programs +intended to be used in the FreeBSD Test Suite under /usr/tests/. + +It has seven targets: + + all: + build the test programs. + clean: + remove the test programs and any object files. + cleandir: + remove all of the files removed by the target clean, as + well as .depend and tags. + depend: + make the dependencies for the source files, and store + them in the file .depend. + install: + install the test programs and their data files; if the + Makefile does not itself define the target install, the + targets beforeinstall and afterinstall may also be used + to cause actions immediately before and after the + install target is executed. + lint: + run lint on the source files. + tags: + create a tags file for the source files. + test: + runs the test programs from the object directory; if the + Makefile does not itself define the target test, the + targets beforetest and aftertest may also be used to + cause actions immediately before and after the test + target is executed. + +It sets/uses the following variables, among many others: + +TESTDIR Path to the installed tests. Must be a subdirectory of + TESTSBASE and the subpath should match the relative + location of the tests within the src tree. + +KYUAFILE If 'auto' (the default), generate a Kyuafile out of the + test programs defined in the Makefile. If 'yes', then a + manually-crafted Kyuafile must be supplied with the + sources. If 'no', no Kyuafile is installed (useful for + subdirectories providing helper programs or data files + only). + +ATF_TESTS_C The names of the ATF C test programs to build. + +ATF_TESTS_CXX The names of the ATF C++ test programs to build. + +ATF_TESTS_SH The names of the ATF sh test programs to build. + +PLAIN_TESTS_C The names of the plain (legacy) programs to build. + +PLAIN_TESTS_CXX The names of the plain (legacy) test programs to build. + +PLAIN_TESTS_SH The names of the plain (legacy) test programs to build. + +TAP_PERL_INTERPRETER + Path to the Perl interpreter to be used for + TAP-compliant test programs that are written in Perl. + Refer to TAP_TESTS_PERL for details. + +TAP_TESTS_C The names of the TAP-compliant C test programs to build. + +TAP_TESTS_CXX The names of the TAP-compliant C++ test programs to + build. + +TAP_TESTS_PERL The names of the TAP-compliant Perl test programs to + build. The corresponding source files should end with + the .pl extension; the test program is marked as + requiring Perl; and TAP_PERL_INTERPRETER is used in the + built scripts as the interpreter of choice. + +TAP_TESTS_SH The names of the TAP-compliant sh test programs to + build. + +TESTS_SUBDIRS List of subdirectories containing tests into which to + recurse. Differs from SUBDIR in that these directories + get registered into the automatically-generated + Kyuafile (if any). + +NOT_FOR_TEST_SUITE + If defined, none of the built test programs get + installed under /usr/tests/ and no Kyuafile is + automatically generated. Should not be used within the + FreeBSD source tree but is provided for the benefit of + third-parties. + +The actual building of the test programs is performed by . +Please see the documentation above for this other file for additional +details on the behavior of . Modified: stable/10/share/mk/bsd.test.mk ============================================================================== --- stable/10/share/mk/bsd.test.mk Mon Apr 14 22:49:37 2014 (r264482) +++ stable/10/share/mk/bsd.test.mk Mon Apr 14 23:51:57 2014 (r264483) @@ -2,23 +2,13 @@ # # Generic build infrastructure for test programs. # -# The code in this file is independent of the implementation of the test -# programs being built; this file just provides generic infrastructure for the -# build and the definition of various helper variables and targets. -# -# Makefiles should never include this file directly. Instead, they should -# include one of the various *.test.mk depending on the specific test programs -# being built. +# This is the only public file that should be included by Makefiles when +# tests are to be built. All other *.test.mk files are internal and not +# to be included directly. .include -# Directory in which to install tests defined by the current Makefile. -# Makefiles have to override this to point to a subdirectory of TESTSBASE. -TESTSDIR?= . - -# Name of the test suite these tests belong to. Should rarely be changed for -# Makefiles built into the FreeBSD src tree. -TESTSUITE?= FreeBSD +____: # List of subdirectories containing tests into which to recurse. This has the # same semantics as SUBDIR at build-time. However, the directories listed here @@ -29,31 +19,10 @@ TESTSUITE?= FreeBSD # SUBDIR for directories that may contain helper binaries and/or data files. TESTS_SUBDIRS?= -# Knob to control the handling of the Kyuafile for this Makefile. -# -# If 'yes', a Kyuafile exists in the source tree and is installed into -# TESTSDIR. -# -# If 'auto', a Kyuafile is automatically generated based on the list of test -# programs built by the Makefile and is installed into TESTSDIR. This is the -# default and is sufficient in the majority of the cases. -# -# If 'no', no Kyuafile is installed. -KYUAFILE?= auto - -# Per-test program interface definition. -# -# The name provided here must match one of the interface names supported by -# Kyua as this is later encoded in the Kyuafile test program definitions. -#TEST_INTERFACE.= interface-name - -# Per-test program metadata properties as a list of key/value pairs. -# -# All the variables for a particular program are appended to the program's -# definition in the Kyuafile. This feature can be used to avoid having to -# explicitly supply a Kyuafile in the source directory, allowing the caller -# Makefile to rely on the KYUAFILE=auto behavior defined here. -#TEST_METADATA.+= key="value" +# If defined, indicates that the tests built by the Makefile are not part of +# the FreeBSD Test Suite. The implication of this is that the tests won't be +# installed under /usr/tests/ and that Kyua won't be able to run them. +#NOT_FOR_TEST_SUITE= # List of variables to pass to the tests at run-time via the environment. TESTS_ENV?= @@ -67,17 +36,14 @@ TESTS_ENV+= PATH=${TESTS_PATH:tW:C/ +/:/ TESTS_LD_LIBRARY_PATH+= ${DESTDIR}/lib ${DESTDIR}/usr/lib TESTS_ENV+= LD_LIBRARY_PATH=${TESTS_LD_LIBRARY_PATH:tW:C/ +/:/g} -# List of all tests being built. This variable is internal should not be -# defined by the Makefile. The various *.test.mk modules extend this variable -# as needed. -_TESTS?= - -# Path to the prefix of the installed Kyua CLI, if any. -# -# If kyua is installed from ports, we automatically define a realtest target -# below to run the tests using this tool. The tools are searched for in the -# hierarchy specified by this variable. -KYUA_PREFIX?= /usr/local +# List of all tests being built. The various *.test.mk modules extend this +# variable as needed. +_TESTS= + +# Pull in the definitions of all supported test interfaces. +.include +.include +.include .if !empty(TESTS_SUBDIRS) SUBDIR+= ${TESTS_SUBDIRS} @@ -93,82 +59,9 @@ WITHOUT_MAN=yes PROG_VARS+= BINDIR PROGS_TARGETS+= install -.if ${KYUAFILE:tl} == "yes" -FILES+= Kyuafile -FILESDIR_Kyuafile= ${TESTSDIR} - -CLEANFILES+= Kyuafile.auto Kyuafile.auto.tmp -.elif ${KYUAFILE:tl} == "auto" -FILES+= Kyuafile.auto -FILESDIR_Kyuafile.auto= ${TESTSDIR} -FILESNAME_Kyuafile.auto= Kyuafile - -CLEANFILES+= Kyuafile.auto Kyuafile.auto.tmp - -.NOPATH: Kyuafile.auto -Kyuafile.auto: Makefile - @{ \ - echo '-- Automatically generated by bsd.test.mk.'; \ - echo; \ - echo 'syntax(2)'; \ - echo; \ - echo 'test_suite("${TESTSUITE}")'; \ - echo; \ - } >Kyuafile.auto.tmp -.for _T in ${_TESTS} - @echo '${TEST_INTERFACE.${_T}}_test_program{name="${_T}"${TEST_METADATA.${_T}:C/$/,/:tW:C/^/, /W:C/,$//W}}' \ - >>Kyuafile.auto.tmp -.endfor -.for _T in ${TESTS_SUBDIRS:N.WAIT} - @echo "include(\"${_T}/Kyuafile\")" >>Kyuafile.auto.tmp -.endfor - @mv Kyuafile.auto.tmp Kyuafile.auto -.endif - -KYUA?= ${KYUA_PREFIX}/bin/kyua -.if exists(${KYUA}) -# Definition of the "make test" target and supporting variables. -# -# This target, by necessity, can only work for native builds (i.e. a FreeBSD -# host building a release for the same system). The target runs Kyua, which is -# not in the toolchain, and the tests execute code built for the target host. -# -# Due to the dependencies of the binaries built by the source tree and how they -# are used by tests, it is highly possible for a execution of "make test" to -# report bogus results unless the new binaries are put in place. -realtest: .PHONY - @echo "*** WARNING: make test is experimental" - @echo "***" - @echo "*** Using this test does not preclude you from running the tests" - @echo "*** installed in ${TESTSBASE}. This test run may raise false" - @echo "*** positives and/or false negatives." - @echo - @set -e; \ - ${KYUA} test -k ${DESTDIR}${TESTSDIR}/Kyuafile; \ - result=0; \ - echo; \ - echo "*** Once again, note that "make test" is unsupported."; \ - test $${result} -eq 0 -.endif - -beforetest: .PHONY -.if defined(TESTSDIR) -.if ${TESTSDIR} == ${TESTSBASE} -# Forbid running from ${TESTSBASE}. It can cause false positives/negatives and -# it does not cover all the tests (e.g. it misses testing software in external). - @echo "*** Sorry, you cannot use make test from src/tests. Install the" - @echo "*** tests into their final location and run them from ${TESTSBASE}" - @false -.else - @echo "*** Using this test does not preclude you from running the tests" - @echo "*** installed in ${TESTSBASE}. This test run may raise false" - @echo "*** positives and/or false negatives." -.endif -.else - @echo "*** No TESTSDIR defined; nothing to do." - @false +.if !defined(NOT_FOR_TEST_SUITE) +.include .endif - @echo .if !target(realtest) realtest: .PHONY Modified: stable/10/share/mk/plain.test.mk ============================================================================== --- stable/10/share/mk/plain.test.mk Mon Apr 14 22:49:37 2014 (r264482) +++ stable/10/share/mk/plain.test.mk Mon Apr 14 23:51:57 2014 (r264483) @@ -1,10 +1,14 @@ # $FreeBSD$ # +# You must include bsd.test.mk instead of this file from your Makefile. +# # Logic to build and install plain test programs. A plain test programs it not # supposed to use any specific testing framework: all it does is run some code # and report the test's pass or fail status via a 0 or 1 exit code. -.include +.if !target(____) +.error plain.test.mk cannot be included directly. +.endif # List of C, C++ and shell test programs to build. # @@ -58,5 +62,3 @@ ${_T}: ${PLAIN_TESTS_SH_SRC_${_T}} mv ${.TARGET}.tmp ${.TARGET} .endfor .endif - -.include Copied: stable/10/share/mk/suite.test.mk (from r263172, head/share/mk/suite.test.mk) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/mk/suite.test.mk Mon Apr 14 23:51:57 2014 (r264483, copy of r263172, head/share/mk/suite.test.mk) @@ -0,0 +1,127 @@ +# $FreeBSD$ +# +# You must include bsd.test.mk instead of this file from your Makefile. +# +# Internal glue for the build of /usr/tests/. + +.if !target(____) +.error suite.test.mk cannot be included directly. +.endif + +# Directory in which to install tests defined by the current Makefile. +# Makefiles have to override this to point to a subdirectory of TESTSBASE. +TESTSDIR?= . + +# Name of the test suite these tests belong to. Should rarely be changed for +# Makefiles built into the FreeBSD src tree. +TESTSUITE?= FreeBSD + +# Knob to control the handling of the Kyuafile for this Makefile. +# +# If 'yes', a Kyuafile exists in the source tree and is installed into +# TESTSDIR. +# +# If 'auto', a Kyuafile is automatically generated based on the list of test +# programs built by the Makefile and is installed into TESTSDIR. This is the +# default and is sufficient in the majority of the cases. +# +# If 'no', no Kyuafile is installed. +KYUAFILE?= auto + +# Per-test program interface definition. +# +# The name provided here must match one of the interface names supported by +# Kyua as this is later encoded in the Kyuafile test program definitions. +#TEST_INTERFACE.= interface-name + +# Per-test program metadata properties as a list of key/value pairs. +# +# All the variables for a particular program are appended to the program's +# definition in the Kyuafile. This feature can be used to avoid having to +# explicitly supply a Kyuafile in the source directory, allowing the caller +# Makefile to rely on the KYUAFILE=auto behavior defined here. +#TEST_METADATA.+= key="value" + +# Path to the prefix of the installed Kyua CLI, if any. +# +# If kyua is installed from ports, we automatically define a realtest target +# below to run the tests using this tool. The tools are searched for in the +# hierarchy specified by this variable. +KYUA_PREFIX?= /usr/local + +.if ${KYUAFILE:tl} == "yes" +FILES+= Kyuafile +FILESDIR_Kyuafile= ${TESTSDIR} + +CLEANFILES+= Kyuafile.auto Kyuafile.auto.tmp +.elif ${KYUAFILE:tl} == "auto" +FILES+= Kyuafile.auto +FILESDIR_Kyuafile.auto= ${TESTSDIR} +FILESNAME_Kyuafile.auto= Kyuafile + +CLEANFILES+= Kyuafile.auto Kyuafile.auto.tmp + +.NOPATH: Kyuafile.auto +Kyuafile.auto: Makefile + @{ \ + echo '-- Automatically generated by bsd.test.mk.'; \ + echo; \ + echo 'syntax(2)'; \ + echo; \ + echo 'test_suite("${TESTSUITE}")'; \ + echo; \ + } >Kyuafile.auto.tmp +.for _T in ${_TESTS} + @echo '${TEST_INTERFACE.${_T}}_test_program{name="${_T}"${TEST_METADATA.${_T}:C/$/,/:tW:C/^/, /W:C/,$//W}}' \ + >>Kyuafile.auto.tmp +.endfor +.for _T in ${TESTS_SUBDIRS:N.WAIT} + @echo "include(\"${_T}/Kyuafile\")" >>Kyuafile.auto.tmp +.endfor + @mv Kyuafile.auto.tmp Kyuafile.auto +.endif + +KYUA?= ${KYUA_PREFIX}/bin/kyua +.if exists(${KYUA}) +# Definition of the "make test" target and supporting variables. +# +# This target, by necessity, can only work for native builds (i.e. a FreeBSD +# host building a release for the same system). The target runs Kyua, which is +# not in the toolchain, and the tests execute code built for the target host. +# +# Due to the dependencies of the binaries built by the source tree and how they +# are used by tests, it is highly possible for a execution of "make test" to +# report bogus results unless the new binaries are put in place. +realtest: .PHONY + @echo "*** WARNING: make test is experimental" + @echo "***" + @echo "*** Using this test does not preclude you from running the tests" + @echo "*** installed in ${TESTSBASE}. This test run may raise false" + @echo "*** positives and/or false negatives." + @echo + @set -e; \ + ${KYUA} test -k ${DESTDIR}${TESTSDIR}/Kyuafile; \ + result=0; \ + echo; \ + echo "*** Once again, note that "make test" is unsupported."; \ + test $${result} -eq 0 +.endif + +beforetest: .PHONY +.if defined(TESTSDIR) +.if ${TESTSDIR} == ${TESTSBASE} +# Forbid running from ${TESTSBASE}. It can cause false positives/negatives and +# it does not cover all the tests (e.g. it misses testing software in external). + @echo "*** Sorry, you cannot use make test from src/tests. Install the" + @echo "*** tests into their final location and run them from ${TESTSBASE}" + @false +.else + @echo "*** Using this test does not preclude you from running the tests" + @echo "*** installed in ${TESTSBASE}. This test run may raise false" + @echo "*** positives and/or false negatives." +.endif +.else + @echo "*** No TESTSDIR defined; nothing to do." + @false +.endif + @echo Modified: stable/10/share/mk/tap.test.mk ============================================================================== --- stable/10/share/mk/tap.test.mk Mon Apr 14 22:49:37 2014 (r264482) +++ stable/10/share/mk/tap.test.mk Mon Apr 14 23:51:57 2014 (r264483) @@ -1,12 +1,16 @@ # $FreeBSD$ # +# You must include bsd.test.mk instead of this file from your Makefile. +# # Logic to build and install TAP-compliant test programs. # # This is provided to support existing tests in the FreeBSD source tree # (particularly those coming from tools/regression/) that comply with the # Test Anything Protocol. It should not be used for new tests. -.include +.if !target(____) +.error tap.test.mk cannot be included directly. +.endif # List of C, C++ and shell test programs to build. # @@ -87,5 +91,3 @@ ${_T}: ${TAP_TESTS_SH_SRC_${_T}} mv ${.TARGET}.tmp ${.TARGET} .endfor .endif - -.include Modified: stable/10/tests/sys/kern/Makefile ============================================================================== --- stable/10/tests/sys/kern/Makefile Mon Apr 14 22:49:37 2014 (r264482) +++ stable/10/tests/sys/kern/Makefile Mon Apr 14 23:51:57 2014 (r264483) @@ -9,4 +9,4 @@ LDADD.unix_seqpacket_test+= -lpthread WARNS?= 5 -.include +.include Modified: stable/10/usr.bin/atf/atf-sh/tests/Makefile ============================================================================== --- stable/10/usr.bin/atf/atf-sh/tests/Makefile Mon Apr 14 22:49:37 2014 (r264482) +++ stable/10/usr.bin/atf/atf-sh/tests/Makefile Mon Apr 14 23:51:57 2014 (r264483) @@ -23,4 +23,4 @@ misc_helpers: misc_helpers.sh chmod +x ${.TARGET}.tmp mv ${.TARGET}.tmp ${.TARGET} -.include +.include From owner-svn-src-stable@FreeBSD.ORG Tue Apr 15 02:17:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3191C728; Tue, 15 Apr 2014 02:17:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E1D2191D; Tue, 15 Apr 2014 02:17:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3F2HkXX066573; Tue, 15 Apr 2014 02:17:46 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3F2Hkok066572; Tue, 15 Apr 2014 02:17:46 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201404150217.s3F2Hkok066572@svn.freebsd.org> From: "George V. Neville-Neil" Date: Tue, 15 Apr 2014 02:17:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264485 - stable/10/tools/test/ppsapi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2014 02:17:47 -0000 Author: gnn Date: Tue Apr 15 02:17:46 2014 New Revision: 264485 URL: http://svnweb.freebsd.org/changeset/base/264485 Log: MFC: 264016 Silence an unnecessary warning. Modified: stable/10/tools/test/ppsapi/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/test/ppsapi/Makefile ============================================================================== --- stable/10/tools/test/ppsapi/Makefile Tue Apr 15 00:45:38 2014 (r264484) +++ stable/10/tools/test/ppsapi/Makefile Tue Apr 15 02:17:46 2014 (r264485) @@ -7,5 +7,7 @@ WARNS?= 5 .include +CFLAGS+=-Wno-format-security + test: ${PROG} ./${PROG} /dev/cuau0 From owner-svn-src-stable@FreeBSD.ORG Tue Apr 15 07:50:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B838072D; Tue, 15 Apr 2014 07:50:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4649183E; Tue, 15 Apr 2014 07:50:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3F7oIEx003586; Tue, 15 Apr 2014 07:50:18 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3F7oIcJ003585; Tue, 15 Apr 2014 07:50:18 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201404150750.s3F7oIcJ003585@svn.freebsd.org> From: Scott Long Date: Tue, 15 Apr 2014 07:50:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264490 - stable/10/sys/ufs/ufs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2014 07:50:18 -0000 Author: scottl Date: Tue Apr 15 07:50:18 2014 New Revision: 264490 URL: http://svnweb.freebsd.org/changeset/base/264490 Log: MFC r262812 - Gracefully handle truncation failures when trying to shrink directories. This could cause dirhash panics since the dirhash state would be successfully truncated while the directory was not. Submitted by: jeffr Modified: stable/10/sys/ufs/ufs/ufs_lookup.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ufs/ufs_lookup.c ============================================================================== --- stable/10/sys/ufs/ufs/ufs_lookup.c Tue Apr 15 07:37:56 2014 (r264489) +++ stable/10/sys/ufs/ufs/ufs_lookup.c Tue Apr 15 07:50:18 2014 (r264490) @@ -1130,12 +1130,15 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdir dp->i_endoff && dp->i_endoff < dp->i_size) { if (tvp != NULL) VOP_UNLOCK(tvp, 0); + error = UFS_TRUNCATE(dvp, (off_t)dp->i_endoff, + IO_NORMAL | IO_SYNC, cr); + if (error != 0) + vprint("ufs_direnter: failted to truncate", dvp); #ifdef UFS_DIRHASH - if (dp->i_dirhash != NULL) + if (error == 0 && dp->i_dirhash != NULL) ufsdirhash_dirtrunc(dp, dp->i_endoff); #endif - (void) UFS_TRUNCATE(dvp, (off_t)dp->i_endoff, - IO_NORMAL | IO_SYNC, cr); + error = 0; if (tvp != NULL) vn_lock(tvp, LK_EXCLUSIVE | LK_RETRY); } From owner-svn-src-stable@FreeBSD.ORG Tue Apr 15 07:54:17 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC9588B6; Tue, 15 Apr 2014 07:54:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8A071877; Tue, 15 Apr 2014 07:54:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3F7sH8q006908; Tue, 15 Apr 2014 07:54:17 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3F7sHtb006907; Tue, 15 Apr 2014 07:54:17 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201404150754.s3F7sHtb006907@svn.freebsd.org> From: Scott Long Date: Tue, 15 Apr 2014 07:54:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264491 - stable/10/sys/ufs/ffs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2014 07:54:17 -0000 Author: scottl Date: Tue Apr 15 07:54:17 2014 New Revision: 264491 URL: http://svnweb.freebsd.org/changeset/base/264491 Log: MFC r262814 - If we fail to do a non-blocking acquire of a buf lock while doing a waiting sync pass we need to do a blocking acquire and restart. Another thread, typically the buf daemon, may have this buf locked and if we don't wait we can fail to sync the file. This lead to a great variety of softdep panics because we rely on all dependencies being flushed before proceeding in several cases. Submitted by: jeffr Modified: stable/10/sys/ufs/ffs/ffs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ffs/ffs_vnops.c ============================================================================== --- stable/10/sys/ufs/ffs/ffs_vnops.c Tue Apr 15 07:50:18 2014 (r264490) +++ stable/10/sys/ufs/ffs/ffs_vnops.c Tue Apr 15 07:54:17 2014 (r264491) @@ -259,9 +259,17 @@ loop: continue; if (bp->b_lblkno > lbn) panic("ffs_syncvnode: syncing truncated data."); - if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL)) + if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL) == 0) { + BO_UNLOCK(bo); + } else if (wait != 0) { + if (BUF_LOCK(bp, + LK_EXCLUSIVE | LK_SLEEPFAIL | LK_INTERLOCK, + BO_LOCKPTR(bo)) != 0) { + bp->b_vflags &= ~BV_SCANNED; + goto next; + } + } else continue; - BO_UNLOCK(bo); if ((bp->b_flags & B_DELWRI) == 0) panic("ffs_fsync: not dirty"); /* From owner-svn-src-stable@FreeBSD.ORG Tue Apr 15 08:02:58 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C89B8C28; Tue, 15 Apr 2014 08:02:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A79671945; Tue, 15 Apr 2014 08:02:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3F82wiQ011060; Tue, 15 Apr 2014 08:02:58 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3F82wcB011055; Tue, 15 Apr 2014 08:02:58 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201404150802.s3F82wcB011055@svn.freebsd.org> From: Scott Long Date: Tue, 15 Apr 2014 08:02:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264492 - stable/10/sys/dev/mps X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2014 08:02:59 -0000 Author: scottl Date: Tue Apr 15 08:02:57 2014 New Revision: 264492 URL: http://svnweb.freebsd.org/changeset/base/264492 Log: MFC r264229 Add some assertions to ensure that the target array doesn't get accessed out of bounds. Modified: stable/10/sys/dev/mps/mps_sas.c stable/10/sys/dev/mps/mps_sas.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mps/mps_sas.c ============================================================================== --- stable/10/sys/dev/mps/mps_sas.c Tue Apr 15 07:54:17 2014 (r264491) +++ stable/10/sys/dev/mps/mps_sas.c Tue Apr 15 08:02:57 2014 (r264492) @@ -154,7 +154,7 @@ mpssas_find_target_by_handle(struct mpss struct mpssas_target *target; int i; - for (i = start; i < sassc->sc->facts->MaxTargets; i++) { + for (i = start; i < sassc->maxtargets; i++) { target = &sassc->targets[i]; if (target->handle == handle) return (target); @@ -709,8 +709,16 @@ mps_attach_sas(struct mps_softc *sc) __func__, __LINE__); return (ENOMEM); } + + /* + * XXX MaxTargets could change during a reinit. Since we don't + * resize the targets[] array during such an event, cache the value + * of MaxTargets here so that we don't get into trouble later. This + * should move into the reinit logic. + */ + sassc->maxtargets = sc->facts->MaxTargets; sassc->targets = malloc(sizeof(struct mpssas_target) * - sc->facts->MaxTargets, M_MPT2, M_WAITOK|M_ZERO); + sassc->maxtargets, M_MPT2, M_WAITOK|M_ZERO); if(!sassc->targets) { device_printf(sc->mps_dev, "Cannot allocate memory %s %d\n", __func__, __LINE__); @@ -868,7 +876,7 @@ mps_detach_sas(struct mps_softc *sc) if (sassc->devq != NULL) cam_simq_free(sassc->devq); - for(i=0; i< sc->facts->MaxTargets ;i++) { + for(i=0; i< sassc->maxtargets ;i++) { targ = &sassc->targets[i]; SLIST_FOREACH_SAFE(lun, &targ->luns, lun_link, lun_tmp) { free(lun, M_MPT2); @@ -959,9 +967,9 @@ mpssas_action(struct cam_sim *sim, union cpi->hba_misc = PIM_NOBUSRESET | PIM_UNMAPPED; #endif cpi->hba_eng_cnt = 0; - cpi->max_target = sassc->sc->facts->MaxTargets - 1; + cpi->max_target = sassc->maxtargets - 1; cpi->max_lun = 255; - cpi->initiator_id = sassc->sc->facts->MaxTargets - 1; + cpi->initiator_id = sassc->maxtargets - 1; strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); strncpy(cpi->hba_vid, "LSILogic", HBA_IDLEN); strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); @@ -992,6 +1000,9 @@ mpssas_action(struct cam_sim *sim, union sas = &cts->xport_specific.sas; scsi = &cts->proto_specific.scsi; + KASSERT(cts->ccb_h.target_id < sassc->maxtargets, + ("Target %d out of bounds in XPT_GET_TRANS_SETTINGS\n", + cts->ccb_h.target_id)); targ = &sassc->targets[cts->ccb_h.target_id]; if (targ->handle == 0x0) { cts->ccb_h.status = CAM_SEL_TIMEOUT; @@ -1155,7 +1166,7 @@ mpssas_handle_reinit(struct mps_softc *s * reset, and we have to rediscover all the targets and use the new * handles. */ - for (i = 0; i < sc->facts->MaxTargets; i++) { + for (i = 0; i < sc->sassc->maxtargets; i++) { if (sc->sassc->targets[i].outstanding != 0) mps_dprint(sc, MPS_INIT, "target %u outstanding %u\n", i, sc->sassc->targets[i].outstanding); @@ -1631,6 +1642,9 @@ mpssas_action_scsiio(struct mpssas_softc mtx_assert(&sc->mps_mtx, MA_OWNED); csio = &ccb->csio; + KASSERT(csio->ccb_h.target_id < sassc->maxtargets, + ("Target %d out of bounds in XPT_SCSI_IO\n", + csio->ccb_h.target_id)); targ = &sassc->targets[csio->ccb_h.target_id]; mps_dprint(sc, MPS_TRACE, "ccb %p target flag %x\n", ccb, targ->flags); if (targ->handle == 0x0) { @@ -2929,6 +2943,8 @@ mpssas_action_smpio(struct mpssas_softc /* * Make sure the target exists. */ + KASSERT(ccb->ccb_h.target_id < sassc->maxtargets, + ("Target %d out of bounds in XPT_SMP_IO\n", ccb->ccb_h.target_id)); targ = &sassc->targets[ccb->ccb_h.target_id]; if (targ->handle == 0x0) { mps_dprint(sc, MPS_ERROR, @@ -3063,6 +3079,9 @@ mpssas_action_resetdev(struct mpssas_sof MPS_FUNCTRACE(sassc->sc); mtx_assert(&sassc->sc->mps_mtx, MA_OWNED); + KASSERT(ccb->ccb_h.target_id < sassc->maxtargets, + ("Target %d out of bounds in XPT_RESET_DEV\n", + ccb->ccb_h.target_id)); sc = sassc->sc; tm = mps_alloc_command(sc); if (tm == NULL) { @@ -3191,6 +3210,9 @@ mpssas_async(void *callback_arg, uint32_ /* * We should have a handle for this, but check to make sure. */ + KASSERT(xpt_path_target_id(path) < sassc->maxtargets, + ("Target %d out of bounds in mpssas_async\n", + xpt_path_target_id(path))); target = &sassc->targets[xpt_path_target_id(path)]; if (target->handle == 0) break; @@ -3278,6 +3300,9 @@ mpssas_check_eedp(struct mps_softc *sc, targetid = xpt_path_target_id(path); lunid = xpt_path_lun_id(path); + KASSERT(targetid < sassc->maxtargets, + ("Target %d out of bounds in mpssas_check_eedp\n", + targetid)); target = &sassc->targets[targetid]; if (target->handle == 0x0) return; @@ -3413,6 +3438,9 @@ mpssas_read_cap_done(struct cam_periph * * target. */ sassc = (struct mpssas_softc *)done_ccb->ccb_h.ppriv_ptr1; + KASSERT(done_ccb->ccb_h.target_id < sassc->maxtargets, + ("Target %d out of bounds in mpssas_read_cap_done\n", + done_ccb->ccb_h.target_id)); target = &sassc->targets[done_ccb->ccb_h.target_id]; SLIST_FOREACH(lun, &target->luns, lun_link) { if (lun->lun_id != done_ccb->ccb_h.target_lun) Modified: stable/10/sys/dev/mps/mps_sas.h ============================================================================== --- stable/10/sys/dev/mps/mps_sas.h Tue Apr 15 07:54:17 2014 (r264491) +++ stable/10/sys/dev/mps/mps_sas.h Tue Apr 15 08:02:57 2014 (r264492) @@ -87,6 +87,7 @@ struct mpssas_softc { #define MPSSAS_DISCOVERY_TIMEOUT_PENDING (1 << 2) #define MPSSAS_QUEUE_FROZEN (1 << 3) #define MPSSAS_SHUTDOWN (1 << 4) + u_int maxtargets; struct mpssas_target *targets; struct cam_devq *devq; struct cam_sim *sim; From owner-svn-src-stable@FreeBSD.ORG Tue Apr 15 08:08:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A01FDD6; Tue, 15 Apr 2014 08:08:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 454AB1989; Tue, 15 Apr 2014 08:08:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3F88jBd011751; Tue, 15 Apr 2014 08:08:45 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3F88ikA011749; Tue, 15 Apr 2014 08:08:44 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201404150808.s3F88ikA011749@svn.freebsd.org> From: Scott Long Date: Tue, 15 Apr 2014 08:08:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264493 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2014 08:08:45 -0000 Author: scottl Date: Tue Apr 15 08:08:44 2014 New Revision: 264493 URL: http://svnweb.freebsd.org/changeset/base/264493 Log: MFC r261558 Add a new sysctl, dev.cxgbe.N.rsrv_noflow, and a companion tunable, hw.cxgbe.rsrv_noflow. When set, queue 0 of the port is reserved for TX packets without a flowid. The hash value of packets with a flowid is bumped up by 1. The intent is to provide a private queue for link-level packets like LACP that is unlikely to overflow or suffer deep queue latency. Modified: stable/10/sys/dev/cxgbe/adapter.h stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/10/sys/dev/cxgbe/adapter.h Tue Apr 15 08:02:57 2014 (r264492) +++ stable/10/sys/dev/cxgbe/adapter.h Tue Apr 15 08:08:44 2014 (r264493) @@ -208,6 +208,7 @@ struct port_info { /* These need to be int as they are used in sysctl */ int ntxq; /* # of tx queues */ int first_txq; /* index of first tx queue */ + int rsrv_noflowq; /* Reserve queue 0 for non-flowid packets */ int nrxq; /* # of rx queues */ int first_rxq; /* index of first rx queue */ #ifdef TCP_OFFLOAD Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Tue Apr 15 08:02:57 2014 (r264492) +++ stable/10/sys/dev/cxgbe/t4_main.c Tue Apr 15 08:08:44 2014 (r264493) @@ -197,6 +197,9 @@ TUNABLE_INT("hw.cxgbe.ntxq1g", &t4_ntxq1 static int t4_nrxq1g = -1; TUNABLE_INT("hw.cxgbe.nrxq1g", &t4_nrxq1g); +static int t4_rsrv_noflowq = 0; +TUNABLE_INT("hw.cxgbe.rsrv_noflowq", &t4_rsrv_noflowq); + #ifdef TCP_OFFLOAD #define NOFLDTXQ_10G 8 static int t4_nofldtxq10g = -1; @@ -299,6 +302,7 @@ struct intrs_and_queues { int nrxq10g; /* # of NIC rxq's for each 10G port */ int ntxq1g; /* # of NIC txq's for each 1G port */ int nrxq1g; /* # of NIC rxq's for each 1G port */ + int rsrv_noflowq; /* Flag whether to reserve queue 0 */ #ifdef TCP_OFFLOAD int nofldtxq10g; /* # of TOE txq's for each 10G port */ int nofldrxq10g; /* # of TOE rxq's for each 10G port */ @@ -375,6 +379,7 @@ static int cxgbe_sysctls(struct port_inf static int sysctl_int_array(SYSCTL_HANDLER_ARGS); static int sysctl_bitfield(SYSCTL_HANDLER_ARGS); static int sysctl_btphy(SYSCTL_HANDLER_ARGS); +static int sysctl_noflowq(SYSCTL_HANDLER_ARGS); static int sysctl_holdoff_tmr_idx(SYSCTL_HANDLER_ARGS); static int sysctl_holdoff_pktc_idx(SYSCTL_HANDLER_ARGS); static int sysctl_qsize_rxq(SYSCTL_HANDLER_ARGS); @@ -782,6 +787,11 @@ t4_attach(device_t dev) pi->ntxq = iaq.ntxq1g; } + if (pi->ntxq > 1) + pi->rsrv_noflowq = iaq.rsrv_noflowq ? 1 : 0; + else + pi->rsrv_noflowq = 0; + rqidx += pi->nrxq; tqidx += pi->ntxq; @@ -1267,7 +1277,8 @@ cxgbe_transmit(struct ifnet *ifp, struct } if (m->m_flags & M_FLOWID) - txq += (m->m_pkthdr.flowid % pi->ntxq); + txq += ((m->m_pkthdr.flowid % (pi->ntxq - pi->rsrv_noflowq)) + + pi->rsrv_noflowq); br = txq->br; if (TXQ_TRYLOCK(txq) == 0) { @@ -1719,6 +1730,7 @@ cfg_itype_and_nqueues(struct adapter *sc iaq->ntxq1g = t4_ntxq1g; iaq->nrxq10g = nrxq10g = t4_nrxq10g; iaq->nrxq1g = nrxq1g = t4_nrxq1g; + iaq->rsrv_noflowq = t4_rsrv_noflowq; #ifdef TCP_OFFLOAD if (is_offload(sc)) { iaq->nofldtxq10g = t4_nofldtxq10g; @@ -4498,6 +4510,9 @@ cxgbe_sysctls(struct port_info *pi) &pi->first_rxq, 0, "index of first rx queue"); SYSCTL_ADD_INT(ctx, children, OID_AUTO, "first_txq", CTLFLAG_RD, &pi->first_txq, 0, "index of first tx queue"); + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "rsrv_noflowq", CTLTYPE_INT | + CTLFLAG_RW, pi, 0, sysctl_noflowq, "IU", + "Reserve queue 0 for non-flowid packets"); #ifdef TCP_OFFLOAD if (is_offload(pi->adapter)) { @@ -4752,6 +4767,25 @@ sysctl_btphy(SYSCTL_HANDLER_ARGS) } static int +sysctl_noflowq(SYSCTL_HANDLER_ARGS) +{ + struct port_info *pi = arg1; + int rc, val; + + val = pi->rsrv_noflowq; + rc = sysctl_handle_int(oidp, &val, 0, req); + if (rc != 0 || req->newptr == NULL) + return (rc); + + if ((val >= 1) && (pi->ntxq > 1)) + pi->rsrv_noflowq = 1; + else + pi->rsrv_noflowq = 0; + + return (rc); +} + +static int sysctl_holdoff_tmr_idx(SYSCTL_HANDLER_ARGS) { struct port_info *pi = arg1; From owner-svn-src-stable@FreeBSD.ORG Tue Apr 15 09:40:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5112651D; Tue, 15 Apr 2014 09:40:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D01A1370; Tue, 15 Apr 2014 09:40:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3F9elZ0049341; Tue, 15 Apr 2014 09:40:47 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3F9ekss049335; Tue, 15 Apr 2014 09:40:46 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201404150940.s3F9ekss049335@svn.freebsd.org> From: Tijl Coosemans Date: Tue, 15 Apr 2014 09:40:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264495 - in stable/9: include sys/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2014 09:40:47 -0000 Author: tijl Date: Tue Apr 15 09:40:45 2014 New Revision: 264495 URL: http://svnweb.freebsd.org/changeset/base/264495 Log: MFC r263998: Rename __wchar_t so it no longer conflicts with __wchar_t from clang 3.4 -fms-extensions. Modified: stable/9/include/inttypes.h stable/9/include/stdatomic.h stable/9/include/stddef.h stable/9/include/stdlib.h stable/9/include/wchar.h stable/9/sys/sys/_types.h Directory Properties: stable/9/ (props changed) stable/9/include/ (props changed) stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/include/inttypes.h ============================================================================== --- stable/9/include/inttypes.h Tue Apr 15 09:10:01 2014 (r264494) +++ stable/9/include/inttypes.h Tue Apr 15 09:40:45 2014 (r264495) @@ -34,7 +34,7 @@ #ifndef __cplusplus #ifndef _WCHAR_T_DECLARED -typedef __wchar_t wchar_t; +typedef ___wchar_t wchar_t; #define _WCHAR_T_DECLARED #endif #endif Modified: stable/9/include/stdatomic.h ============================================================================== --- stable/9/include/stdatomic.h Tue Apr 15 09:10:01 2014 (r264494) +++ stable/9/include/stdatomic.h Tue Apr 15 09:40:45 2014 (r264495) @@ -149,7 +149,7 @@ typedef _Atomic(unsigned long long) atom typedef _Atomic(__char16_t) atomic_char16_t; typedef _Atomic(__char32_t) atomic_char32_t; #endif -typedef _Atomic(__wchar_t) atomic_wchar_t; +typedef _Atomic(___wchar_t) atomic_wchar_t; typedef _Atomic(__int_least8_t) atomic_int_least8_t; typedef _Atomic(__uint_least8_t) atomic_uint_least8_t; typedef _Atomic(__int_least16_t) atomic_int_least16_t; Modified: stable/9/include/stddef.h ============================================================================== --- stable/9/include/stddef.h Tue Apr 15 09:10:01 2014 (r264494) +++ stable/9/include/stddef.h Tue Apr 15 09:40:45 2014 (r264495) @@ -54,7 +54,7 @@ typedef __size_t size_t; #ifndef __cplusplus #ifndef _WCHAR_T_DECLARED -typedef __wchar_t wchar_t; +typedef ___wchar_t wchar_t; #define _WCHAR_T_DECLARED #endif #endif Modified: stable/9/include/stdlib.h ============================================================================== --- stable/9/include/stdlib.h Tue Apr 15 09:10:01 2014 (r264494) +++ stable/9/include/stdlib.h Tue Apr 15 09:40:45 2014 (r264495) @@ -51,7 +51,7 @@ typedef __size_t size_t; #ifndef __cplusplus #ifndef _WCHAR_T_DECLARED -typedef __wchar_t wchar_t; +typedef ___wchar_t wchar_t; #define _WCHAR_T_DECLARED #endif #endif Modified: stable/9/include/wchar.h ============================================================================== --- stable/9/include/wchar.h Tue Apr 15 09:10:01 2014 (r264494) +++ stable/9/include/wchar.h Tue Apr 15 09:40:45 2014 (r264495) @@ -78,7 +78,7 @@ typedef __size_t size_t; #ifndef __cplusplus #ifndef _WCHAR_T_DECLARED -typedef __wchar_t wchar_t; +typedef ___wchar_t wchar_t; #define _WCHAR_T_DECLARED #endif #endif Modified: stable/9/sys/sys/_types.h ============================================================================== --- stable/9/sys/sys/_types.h Tue Apr 15 09:10:01 2014 (r264494) +++ stable/9/sys/sys/_types.h Tue Apr 15 09:40:45 2014 (r264495) @@ -87,7 +87,7 @@ typedef int __cpusetid_t; /* cpuset ide */ typedef int __ct_rune_t; /* arg type for ctype funcs */ typedef __ct_rune_t __rune_t; /* rune_t (see above) */ -typedef __ct_rune_t __wchar_t; /* wchar_t (see above) */ +typedef __ct_rune_t ___wchar_t; /* wchar_t (see above) */ typedef __ct_rune_t __wint_t; /* wint_t (see above) */ typedef __uint32_t __dev_t; /* device number */ From owner-svn-src-stable@FreeBSD.ORG Tue Apr 15 09:41:55 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F0CA654; Tue, 15 Apr 2014 09:41:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 37F86137B; Tue, 15 Apr 2014 09:41:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3F9fti5052406; Tue, 15 Apr 2014 09:41:55 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3F9fqv4052392; Tue, 15 Apr 2014 09:41:52 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201404150941.s3F9fqv4052392@svn.freebsd.org> From: Tijl Coosemans Date: Tue, 15 Apr 2014 09:41:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264496 - in stable/10: include sys/arm/include sys/ia64/include sys/mips/include sys/powerpc/include sys/sparc64/include sys/sys sys/x86/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2014 09:41:55 -0000 Author: tijl Date: Tue Apr 15 09:41:52 2014 New Revision: 264496 URL: http://svnweb.freebsd.org/changeset/base/264496 Log: MFC r263998: Rename __wchar_t so it no longer conflicts with __wchar_t from clang 3.4 -fms-extensions. Modified: stable/10/include/inttypes.h stable/10/include/stddef.h stable/10/include/stdlib.h stable/10/include/wchar.h stable/10/sys/arm/include/_types.h stable/10/sys/ia64/include/_types.h stable/10/sys/mips/include/_types.h stable/10/sys/powerpc/include/_types.h stable/10/sys/sparc64/include/_types.h stable/10/sys/sys/stdatomic.h stable/10/sys/x86/include/_types.h Directory Properties: stable/10/ (props changed) Modified: stable/10/include/inttypes.h ============================================================================== --- stable/10/include/inttypes.h Tue Apr 15 09:40:45 2014 (r264495) +++ stable/10/include/inttypes.h Tue Apr 15 09:41:52 2014 (r264496) @@ -34,7 +34,7 @@ #ifndef __cplusplus #ifndef _WCHAR_T_DECLARED -typedef __wchar_t wchar_t; +typedef ___wchar_t wchar_t; #define _WCHAR_T_DECLARED #endif #endif Modified: stable/10/include/stddef.h ============================================================================== --- stable/10/include/stddef.h Tue Apr 15 09:40:45 2014 (r264495) +++ stable/10/include/stddef.h Tue Apr 15 09:41:52 2014 (r264496) @@ -54,7 +54,7 @@ typedef __size_t size_t; #ifndef __cplusplus #ifndef _WCHAR_T_DECLARED -typedef __wchar_t wchar_t; +typedef ___wchar_t wchar_t; #define _WCHAR_T_DECLARED #endif #endif Modified: stable/10/include/stdlib.h ============================================================================== --- stable/10/include/stdlib.h Tue Apr 15 09:40:45 2014 (r264495) +++ stable/10/include/stdlib.h Tue Apr 15 09:41:52 2014 (r264496) @@ -51,7 +51,7 @@ typedef __size_t size_t; #ifndef __cplusplus #ifndef _WCHAR_T_DECLARED -typedef __wchar_t wchar_t; +typedef ___wchar_t wchar_t; #define _WCHAR_T_DECLARED #endif #endif Modified: stable/10/include/wchar.h ============================================================================== --- stable/10/include/wchar.h Tue Apr 15 09:40:45 2014 (r264495) +++ stable/10/include/wchar.h Tue Apr 15 09:41:52 2014 (r264496) @@ -78,7 +78,7 @@ typedef __size_t size_t; #ifndef __cplusplus #ifndef _WCHAR_T_DECLARED -typedef __wchar_t wchar_t; +typedef ___wchar_t wchar_t; #define _WCHAR_T_DECLARED #endif #endif Modified: stable/10/sys/arm/include/_types.h ============================================================================== --- stable/10/sys/arm/include/_types.h Tue Apr 15 09:40:45 2014 (r264495) +++ stable/10/sys/arm/include/_types.h Tue Apr 15 09:41:52 2014 (r264496) @@ -106,11 +106,11 @@ typedef __uint64_t __vm_pindex_t; typedef __uint32_t __vm_size_t; #ifdef __ARM_EABI__ -typedef unsigned int __wchar_t; +typedef unsigned int ___wchar_t; #define __WCHAR_MIN 0 /* min value for a wchar_t */ #define __WCHAR_MAX __UINT_MAX /* max value for a wchar_t */ #else -typedef int __wchar_t; +typedef int ___wchar_t; #define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */ #define __WCHAR_MAX __INT_MAX /* max value for a wchar_t */ #endif Modified: stable/10/sys/ia64/include/_types.h ============================================================================== --- stable/10/sys/ia64/include/_types.h Tue Apr 15 09:40:45 2014 (r264495) +++ stable/10/sys/ia64/include/_types.h Tue Apr 15 09:41:52 2014 (r264496) @@ -96,7 +96,7 @@ typedef __int64_t __vm_ooffset_t; typedef __uint64_t __vm_paddr_t; typedef __uint64_t __vm_pindex_t; typedef __uint64_t __vm_size_t; -typedef int __wchar_t; +typedef int ___wchar_t; #define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */ #define __WCHAR_MAX __INT_MAX /* max value for a wchar_t */ Modified: stable/10/sys/mips/include/_types.h ============================================================================== --- stable/10/sys/mips/include/_types.h Tue Apr 15 09:40:45 2014 (r264495) +++ stable/10/sys/mips/include/_types.h Tue Apr 15 09:41:52 2014 (r264496) @@ -145,7 +145,7 @@ typedef __uint32_t __vm_paddr_t; typedef __int64_t __vm_ooffset_t; typedef __uint64_t __vm_pindex_t; -typedef int __wchar_t; +typedef int ___wchar_t; #define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */ #define __WCHAR_MAX __INT_MAX /* max value for a wchar_t */ Modified: stable/10/sys/powerpc/include/_types.h ============================================================================== --- stable/10/sys/powerpc/include/_types.h Tue Apr 15 09:40:45 2014 (r264495) +++ stable/10/sys/powerpc/include/_types.h Tue Apr 15 09:41:52 2014 (r264496) @@ -133,7 +133,7 @@ typedef __uint32_t __vm_size_t; #endif typedef __int64_t __vm_ooffset_t; typedef __uint64_t __vm_pindex_t; -typedef int __wchar_t; +typedef int ___wchar_t; #define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */ #define __WCHAR_MAX __INT_MAX /* max value for a wchar_t */ Modified: stable/10/sys/sparc64/include/_types.h ============================================================================== --- stable/10/sys/sparc64/include/_types.h Tue Apr 15 09:40:45 2014 (r264495) +++ stable/10/sys/sparc64/include/_types.h Tue Apr 15 09:41:52 2014 (r264496) @@ -92,7 +92,7 @@ typedef __int64_t __vm_ooffset_t; typedef __uint64_t __vm_paddr_t; typedef __uint64_t __vm_pindex_t; typedef __uint64_t __vm_size_t; -typedef int __wchar_t; +typedef int ___wchar_t; #define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */ #define __WCHAR_MAX __INT_MAX /* max value for a wchar_t */ Modified: stable/10/sys/sys/stdatomic.h ============================================================================== --- stable/10/sys/sys/stdatomic.h Tue Apr 15 09:40:45 2014 (r264495) +++ stable/10/sys/sys/stdatomic.h Tue Apr 15 09:41:52 2014 (r264496) @@ -198,7 +198,7 @@ typedef _Atomic(long long) atomic_llong typedef _Atomic(unsigned long long) atomic_ullong; typedef _Atomic(__char16_t) atomic_char16_t; typedef _Atomic(__char32_t) atomic_char32_t; -typedef _Atomic(__wchar_t) atomic_wchar_t; +typedef _Atomic(___wchar_t) atomic_wchar_t; typedef _Atomic(__int_least8_t) atomic_int_least8_t; typedef _Atomic(__uint_least8_t) atomic_uint_least8_t; typedef _Atomic(__int_least16_t) atomic_int_least16_t; Modified: stable/10/sys/x86/include/_types.h ============================================================================== --- stable/10/sys/x86/include/_types.h Tue Apr 15 09:40:45 2014 (r264495) +++ stable/10/sys/x86/include/_types.h Tue Apr 15 09:41:52 2014 (r264496) @@ -142,7 +142,7 @@ typedef __uint32_t __vm_size_t; #endif typedef __int64_t __vm_ooffset_t; typedef __uint64_t __vm_pindex_t; -typedef int __wchar_t; +typedef int ___wchar_t; #define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */ #define __WCHAR_MAX __INT_MAX /* max value for a wchar_t */ From owner-svn-src-stable@FreeBSD.ORG Tue Apr 15 09:49:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 196DE83B; Tue, 15 Apr 2014 09:49:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0250A13DB; Tue, 15 Apr 2014 09:49:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3F9nmLr053392; Tue, 15 Apr 2014 09:49:48 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3F9ni6V053367; Tue, 15 Apr 2014 09:49:44 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201404150949.s3F9ni6V053367@svn.freebsd.org> From: Tijl Coosemans Date: Tue, 15 Apr 2014 09:49:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264497 - in stable/10/lib: libc/iconv libiconv_modules/BIG5 libiconv_modules/DECHanyu libiconv_modules/EUCTW libiconv_modules/ISO2022 libiconv_modules/UES libiconv_modules/VIQR libicon... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2014 09:49:49 -0000 Author: tijl Date: Tue Apr 15 09:49:44 2014 New Revision: 264497 URL: http://svnweb.freebsd.org/changeset/base/264497 Log: MFC r263986: - In the libiconv module for ISO 2022 restore the original order of the fields of a private struct such that variables of this type are initialised correctly. Fixes conversion from ISO 2022. Also do this in the BIG5 module to prevent similar errors in the future. - In the libiconv module for EUC-TW replace 2^cs with 1<ci_ops->io_uninit_shared == NULL || ci->ci_ops->io_init_context == NULL || ci->ci_ops->io_uninit_context == NULL || - ci->ci_ops->io_convert == NULL) + ci->ci_ops->io_convert == NULL) { + ret = EINVAL; goto err; + } /* initialize the converter */ ret = (*ci->ci_ops->io_init_shared)(ci, src, dst); Modified: stable/10/lib/libc/iconv/citrus_lookup.c ============================================================================== --- stable/10/lib/libc/iconv/citrus_lookup.c Tue Apr 15 09:41:52 2014 (r264496) +++ stable/10/lib/libc/iconv/citrus_lookup.c Tue Apr 15 09:49:44 2014 (r264497) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $NetBSD: citrus_lookup.c,v 1.6 2009/02/03 04:58:38 lukem Exp $ */ +/* $NetBSD: citrus_lookup.c,v 1.7 2012/05/04 16:45:05 joerg Exp $ */ /*- * Copyright (c)2003 Citrus Project, Modified: stable/10/lib/libc/iconv/citrus_mapper.c ============================================================================== --- stable/10/lib/libc/iconv/citrus_mapper.c Tue Apr 15 09:41:52 2014 (r264496) +++ stable/10/lib/libc/iconv/citrus_mapper.c Tue Apr 15 09:49:44 2014 (r264497) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $NetBSD: citrus_mapper.c,v 1.7 2008/07/25 14:05:25 christos Exp $ */ +/* $NetBSD: citrus_mapper.c,v 1.10 2012/06/08 07:49:42 martin Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -244,8 +244,10 @@ mapper_open(struct _citrus_mapper_area * if (!cm->cm_ops->mo_init || !cm->cm_ops->mo_uninit || !cm->cm_ops->mo_convert || - !cm->cm_ops->mo_init_state) + !cm->cm_ops->mo_init_state) { + ret = EINVAL; goto err; + } /* allocate traits structure */ cm->cm_traits = malloc(sizeof(*cm->cm_traits)); Modified: stable/10/lib/libc/iconv/citrus_memstream.c ============================================================================== --- stable/10/lib/libc/iconv/citrus_memstream.c Tue Apr 15 09:41:52 2014 (r264496) +++ stable/10/lib/libc/iconv/citrus_memstream.c Tue Apr 15 09:49:44 2014 (r264497) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $NetBSD: citrus_memstream.c,v 1.4 2009/02/03 05:02:12 lukem Exp $ */ +/* $NetBSD: citrus_memstream.c,v 1.5 2012/03/13 21:13:31 christos Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -44,8 +44,7 @@ _citrus_memory_stream_getln(struct _citr size_t * __restrict rlen) { const uint8_t *h, *p; - size_t ret; - int i; + size_t i, ret; if (ms->ms_pos>=_region_size(&ms->ms_region)) return (NULL); Modified: stable/10/lib/libc/iconv/citrus_mmap.c ============================================================================== --- stable/10/lib/libc/iconv/citrus_mmap.c Tue Apr 15 09:41:52 2014 (r264496) +++ stable/10/lib/libc/iconv/citrus_mmap.c Tue Apr 15 09:49:44 2014 (r264497) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $NetBSD: citrus_mmap.c,v 1.3 2005/01/19 00:52:37 mycroft Exp $ */ +/* $NetBSD: citrus_mmap.c,v 1.4 2011/10/15 23:00:01 christos Exp $ */ /*- * Copyright (c)2003 Citrus Project, Modified: stable/10/lib/libc/iconv/citrus_prop.c ============================================================================== --- stable/10/lib/libc/iconv/citrus_prop.c Tue Apr 15 09:41:52 2014 (r264496) +++ stable/10/lib/libc/iconv/citrus_prop.c Tue Apr 15 09:49:44 2014 (r264497) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $NetBSD: citrus_prop.c,v 1.3 2006/11/22 23:47:21 tnozaki Exp $ */ +/* $NetBSD: citrus_prop.c,v 1.4 2011/03/30 08:22:01 jruoho Exp $ */ /*- * Copyright (c)2006 Citrus Project, Modified: stable/10/lib/libc/iconv/citrus_prop.h ============================================================================== --- stable/10/lib/libc/iconv/citrus_prop.h Tue Apr 15 09:41:52 2014 (r264496) +++ stable/10/lib/libc/iconv/citrus_prop.h Tue Apr 15 09:49:44 2014 (r264497) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $NetBSD: citrus_prop.h,v 1.3 2006/11/23 13:59:03 tnozaki Exp $ */ +/* $NetBSD: citrus_prop.h,v 1.5 2011/05/23 14:52:32 joerg Exp $ */ /*- * Copyright (c)2006 Citrus Project, @@ -82,7 +82,7 @@ struct _citrus_prop_hint_t { #define _CITRUS_PROP_HINT_NUM(name, cb) \ { name, _CITRUS_PROP_NUM, { .num = { cb } } } #define _CITRUS_PROP_HINT_END \ - { NULL, _CITRUS_PROP_NUM, { .num = { 0 } } } + { .name = NULL } __BEGIN_DECLS int _citrus_prop_parse_variable(const _citrus_prop_hint_t * __restrict, Modified: stable/10/lib/libc/iconv/citrus_stdenc.c ============================================================================== --- stable/10/lib/libc/iconv/citrus_stdenc.c Tue Apr 15 09:41:52 2014 (r264496) +++ stable/10/lib/libc/iconv/citrus_stdenc.c Tue Apr 15 09:49:44 2014 (r264497) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $NetBSD: citrus_stdenc.c,v 1.3 2005/10/29 18:02:04 tshiozak Exp $ */ +/* $NetBSD: citrus_stdenc.c,v 1.4 2011/11/19 18:39:58 tnozaki Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -102,8 +102,10 @@ _citrus_stdenc_open(struct _citrus_stden ce->ce_ops->eo_cstomb == NULL || ce->ce_ops->eo_mbtowc == NULL || ce->ce_ops->eo_wctomb == NULL || - ce->ce_ops->eo_get_state_desc == NULL) + ce->ce_ops->eo_get_state_desc == NULL) { + ret = EINVAL; goto bad; + } /* allocate traits */ ce->ce_traits = malloc(sizeof(*ce->ce_traits)); Modified: stable/10/lib/libiconv_modules/BIG5/citrus_big5.c ============================================================================== --- stable/10/lib/libiconv_modules/BIG5/citrus_big5.c Tue Apr 15 09:41:52 2014 (r264496) +++ stable/10/lib/libiconv_modules/BIG5/citrus_big5.c Tue Apr 15 09:49:44 2014 (r264497) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $NetBSD: citrus_big5.c,v 1.12 2008/06/14 16:01:07 tnozaki Exp $ */ +/* $NetBSD: citrus_big5.c,v 1.13 2011/05/23 14:53:46 joerg Exp $ */ /*- * Copyright (c)2002, 2006 Citrus Project, @@ -92,8 +92,8 @@ typedef struct { typedef struct _BIG5Exclude { TAILQ_ENTRY(_BIG5Exclude) entry; - wint_t end; wint_t start; + wint_t end; } _BIG5Exclude; typedef TAILQ_HEAD(_BIG5ExcludeList, _BIG5Exclude) _BIG5ExcludeList; @@ -358,7 +358,7 @@ _citrus_BIG5_wcrtomb_priv(_BIG5EncodingI size_t n, wchar_t wc, _BIG5State * __restrict psenc __unused, size_t * __restrict nresult) { - unsigned char l; + size_t l; int ret; /* check invalid sequence */ Modified: stable/10/lib/libiconv_modules/DECHanyu/citrus_dechanyu.c ============================================================================== --- stable/10/lib/libiconv_modules/DECHanyu/citrus_dechanyu.c Tue Apr 15 09:41:52 2014 (r264496) +++ stable/10/lib/libiconv_modules/DECHanyu/citrus_dechanyu.c Tue Apr 15 09:49:44 2014 (r264497) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $NetBSD: citrus_dechanyu.c,v 1.3 2008/06/14 16:01:07 tnozaki Exp $ */ +/* $NetBSD: citrus_dechanyu.c,v 1.4 2011/11/19 18:20:13 tnozaki Exp $ */ /*- * Copyright (c)2007 Citrus Project, Modified: stable/10/lib/libiconv_modules/EUCTW/citrus_euctw.c ============================================================================== --- stable/10/lib/libiconv_modules/EUCTW/citrus_euctw.c Tue Apr 15 09:41:52 2014 (r264496) +++ stable/10/lib/libiconv_modules/EUCTW/citrus_euctw.c Tue Apr 15 09:49:44 2014 (r264497) @@ -119,7 +119,7 @@ _citrus_EUCTW_count(int cs) case 1: /*FALLTHROUGH*/ case 2: - return (2^cs); + return (1 << cs); case 3: abort(); /*NOTREACHED*/ Modified: stable/10/lib/libiconv_modules/ISO2022/citrus_iso2022.c ============================================================================== --- stable/10/lib/libiconv_modules/ISO2022/citrus_iso2022.c Tue Apr 15 09:41:52 2014 (r264496) +++ stable/10/lib/libiconv_modules/ISO2022/citrus_iso2022.c Tue Apr 15 09:49:44 2014 (r264497) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $NetBSD: citrus_iso2022.c,v 1.19 2008/06/14 16:01:07 tnozaki Exp $ */ +/* $NetBSD: citrus_iso2022.c,v 1.20 2010/12/07 22:01:45 joerg Exp $ */ /*- * Copyright (c)1999, 2002 Citrus Project, @@ -78,9 +78,9 @@ #define CS96MULTI (3U) typedef struct { - unsigned char interm; - unsigned char final; unsigned char type; + unsigned char final; + unsigned char interm; unsigned char vers; } _ISO2022Charset; Modified: stable/10/lib/libiconv_modules/UES/citrus_ues.c ============================================================================== --- stable/10/lib/libiconv_modules/UES/citrus_ues.c Tue Apr 15 09:41:52 2014 (r264496) +++ stable/10/lib/libiconv_modules/UES/citrus_ues.c Tue Apr 15 09:49:44 2014 (r264497) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $NetBSD: citrus_ues.c,v 1.1 2006/11/13 15:16:31 tnozaki Exp $ */ +/* $NetBSD: citrus_ues.c,v 1.3 2012/02/12 13:51:29 wiz Exp $ */ /*- * Copyright (c)2006 Citrus Project, Modified: stable/10/lib/libiconv_modules/VIQR/citrus_viqr.c ============================================================================== --- stable/10/lib/libiconv_modules/VIQR/citrus_viqr.c Tue Apr 15 09:41:52 2014 (r264496) +++ stable/10/lib/libiconv_modules/VIQR/citrus_viqr.c Tue Apr 15 09:49:44 2014 (r264497) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $NetBSD: citrus_viqr.c,v 1.4 2008/06/14 16:01:08 tnozaki Exp $ */ +/* $NetBSD: citrus_viqr.c,v 1.5 2011/11/19 18:20:13 tnozaki Exp $ */ /*- * Copyright (c)2006 Citrus Project, Modified: stable/10/lib/libiconv_modules/iconv_none/citrus_iconv_none.c ============================================================================== --- stable/10/lib/libiconv_modules/iconv_none/citrus_iconv_none.c Tue Apr 15 09:41:52 2014 (r264496) +++ stable/10/lib/libiconv_modules/iconv_none/citrus_iconv_none.c Tue Apr 15 09:49:44 2014 (r264497) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $NetBSD: citrus_iconv_none.c,v 1.2 2003/07/01 09:42:16 tshiozak Exp $ */ +/* $NetBSD: citrus_iconv_none.c,v 1.3 2011/05/23 14:45:44 joerg Exp $ */ /*- * Copyright (c)2003 Citrus Project, Modified: stable/10/lib/libiconv_modules/iconv_std/citrus_iconv_std.c ============================================================================== --- stable/10/lib/libiconv_modules/iconv_std/citrus_iconv_std.c Tue Apr 15 09:41:52 2014 (r264496) +++ stable/10/lib/libiconv_modules/iconv_std/citrus_iconv_std.c Tue Apr 15 09:49:44 2014 (r264497) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $NetBSD: citrus_iconv_std.c,v 1.15 2006/11/13 19:08:19 tnozaki Exp $ */ +/* $NetBSD: citrus_iconv_std.c,v 1.16 2012/02/12 13:51:29 wiz Exp $ */ /*- * Copyright (c)2003 Citrus Project, Modified: stable/10/lib/libiconv_modules/mapper_std/citrus_mapper_std.c ============================================================================== --- stable/10/lib/libiconv_modules/mapper_std/citrus_mapper_std.c Tue Apr 15 09:41:52 2014 (r264496) +++ stable/10/lib/libiconv_modules/mapper_std/citrus_mapper_std.c Tue Apr 15 09:49:44 2014 (r264497) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $NetBSD: citrus_mapper_std.c,v 1.8 2006/09/11 13:06:33 tnozaki Exp $ */ +/* $NetBSD: citrus_mapper_std.c,v 1.10 2011/11/19 18:48:39 tnozaki Exp $ */ /*- * Copyright (c)2003, 2006 Citrus Project, @@ -174,8 +174,11 @@ rowcol_parse_variable_compat(struct _cit n = be32toh(rcx->rcx_src_row_end); if (m + n > 0) { ret = set_linear_zone(lz, m, n); - if (ret != 0) + if (ret != 0) { + free(rc->rc_src_rowcol); + rc->rc_src_rowcol = NULL; return (ret); + } ++rc->rc_src_rowcol_len, ++lz; } m = be32toh(rcx->rcx_src_col_begin); From owner-svn-src-stable@FreeBSD.ORG Tue Apr 15 15:18:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A0B4B48; Tue, 15 Apr 2014 15:18:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15EDB177E; Tue, 15 Apr 2014 15:18:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3FFIWYD089009; Tue, 15 Apr 2014 15:18:32 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3FFIW7I089008; Tue, 15 Apr 2014 15:18:32 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201404151518.s3FFIW7I089008@svn.freebsd.org> From: Bryan Drewery Date: Tue, 15 Apr 2014 15:18:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264502 - stable/10/etc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2014 15:18:33 -0000 Author: bdrewery Date: Tue Apr 15 15:18:32 2014 New Revision: 264502 URL: http://svnweb.freebsd.org/changeset/base/264502 Log: MFC r264420: Always install pkg.conf. Don't depend on MK_PKGBOOTSTRAP. Modified: stable/10/etc/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/Makefile ============================================================================== --- stable/10/etc/Makefile Tue Apr 15 15:11:10 2014 (r264501) +++ stable/10/etc/Makefile Tue Apr 15 15:18:32 2014 (r264502) @@ -225,9 +225,7 @@ distribution: ${_+_}cd ${.CURDIR}/devd; ${MAKE} install ${_+_}cd ${.CURDIR}/gss; ${MAKE} install ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install -.if ${MK_PKGBOOTSTRAP} != "no" ${_+_}cd ${.CURDIR}/pkg; ${MAKE} install -.endif ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install ${_+_}cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap From owner-svn-src-stable@FreeBSD.ORG Tue Apr 15 15:20:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39DF0CFD; Tue, 15 Apr 2014 15:20:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26AE71823; Tue, 15 Apr 2014 15:20:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3FFKcDa090129; Tue, 15 Apr 2014 15:20:38 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3FFKcUb090128; Tue, 15 Apr 2014 15:20:38 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201404151520.s3FFKcUb090128@svn.freebsd.org> From: Bryan Drewery Date: Tue, 15 Apr 2014 15:20:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264503 - stable/9/etc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2014 15:20:38 -0000 Author: bdrewery Date: Tue Apr 15 15:20:37 2014 New Revision: 264503 URL: http://svnweb.freebsd.org/changeset/base/264503 Log: MFC r264420: Always install pkg.conf. Don't depend on MK_PKGBOOTSTRAP. Modified: stable/9/etc/Makefile Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/Makefile ============================================================================== --- stable/9/etc/Makefile Tue Apr 15 15:18:32 2014 (r264502) +++ stable/9/etc/Makefile Tue Apr 15 15:20:37 2014 (r264503) @@ -228,9 +228,7 @@ distribution: ${_+_}cd ${.CURDIR}/devd; ${MAKE} install ${_+_}cd ${.CURDIR}/gss; ${MAKE} install ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install -.if ${MK_PKGBOOTSTRAP} != "no" ${_+_}cd ${.CURDIR}/pkg; ${MAKE} install -.endif ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install ${_+_}cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap From owner-svn-src-stable@FreeBSD.ORG Tue Apr 15 15:58:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C49A2AF6; Tue, 15 Apr 2014 15:58:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0AB31B4C; Tue, 15 Apr 2014 15:58:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3FFw6Ue005725; Tue, 15 Apr 2014 15:58:06 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3FFw6DB005724; Tue, 15 Apr 2014 15:58:06 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201404151558.s3FFw6DB005724@svn.freebsd.org> From: John Baldwin Date: Tue, 15 Apr 2014 15:58:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r264505 - in stable: 8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2014 15:58:06 -0000 Author: jhb Date: Tue Apr 15 15:58:06 2014 New Revision: 264505 URL: http://svnweb.freebsd.org/changeset/base/264505 Log: Don't pass a timeout of 0 ticks to pause() for a delay of less than 1 hz tick. On 8.x this results in an infinite sleep as pause() does not support a delay of 0 ticks. Since all delay values are converted from nanoseconds to ticks using a floor function, skipping the sleep for a delay smaller than 1 tick is the more consistent than rounding up to a single tick. This is a direct commit to 8 and 9 as 10.x and later use pause_sbt() instead. Reviewed by: avg Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Changes in other areas also in this revision: Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Tue Apr 15 15:41:57 2014 (r264504) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Tue Apr 15 15:58:06 2014 (r264505) @@ -1062,9 +1062,13 @@ dmu_tx_delay(dmu_tx_t *tx, uint64_t dirt continue; mutex_exit(&curthread->t_delay_lock); #else + int timo; + /* XXX High resolution callouts are not available */ ASSERT(wakeup >= now); - pause("dmu_tx_delay", NSEC_TO_TICK(wakeup - now)); + timo = NSEC_TO_TICK(wakeup - now); + if (timo != 0) + pause("dmu_tx_delay", timo); #endif #else hrtime_t delta = wakeup - gethrtime(); From owner-svn-src-stable@FreeBSD.ORG Tue Apr 15 15:58:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 22592AF8; Tue, 15 Apr 2014 15:58:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E6AE1B4D; Tue, 15 Apr 2014 15:58:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3FFw65A005731; Tue, 15 Apr 2014 15:58:06 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3FFw6wO005730; Tue, 15 Apr 2014 15:58:06 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201404151558.s3FFw6wO005730@svn.freebsd.org> From: John Baldwin Date: Tue, 15 Apr 2014 15:58:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264505 - in stable: 8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2014 15:58:07 -0000 Author: jhb Date: Tue Apr 15 15:58:06 2014 New Revision: 264505 URL: http://svnweb.freebsd.org/changeset/base/264505 Log: Don't pass a timeout of 0 ticks to pause() for a delay of less than 1 hz tick. On 8.x this results in an infinite sleep as pause() does not support a delay of 0 ticks. Since all delay values are converted from nanoseconds to ticks using a floor function, skipping the sleep for a delay smaller than 1 tick is the more consistent than rounding up to a single tick. This is a direct commit to 8 and 9 as 10.x and later use pause_sbt() instead. Reviewed by: avg Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Changes in other areas also in this revision: Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Tue Apr 15 15:41:57 2014 (r264504) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Tue Apr 15 15:58:06 2014 (r264505) @@ -1062,9 +1062,13 @@ dmu_tx_delay(dmu_tx_t *tx, uint64_t dirt continue; mutex_exit(&curthread->t_delay_lock); #else + int timo; + /* XXX High resolution callouts are not available */ ASSERT(wakeup >= now); - pause("dmu_tx_delay", NSEC_TO_TICK(wakeup - now)); + timo = NSEC_TO_TICK(wakeup - now); + if (timo != 0) + pause("dmu_tx_delay", timo); #endif #else hrtime_t delta = wakeup - gethrtime(); From owner-svn-src-stable@FreeBSD.ORG Tue Apr 15 16:10:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2AD40FDE; Tue, 15 Apr 2014 16:10:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F178D1C88; Tue, 15 Apr 2014 16:10:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3FGAlOD011215; Tue, 15 Apr 2014 16:10:47 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3FGAlwW011214; Tue, 15 Apr 2014 16:10:47 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201404151610.s3FGAlwW011214@svn.freebsd.org> From: Tijl Coosemans Date: Tue, 15 Apr 2014 16:10:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264506 - stable/9/lib/libelf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2014 16:10:48 -0000 Author: tijl Date: Tue Apr 15 16:10:47 2014 New Revision: 264506 URL: http://svnweb.freebsd.org/changeset/base/264506 Log: MFC r237528: Create a symlink to sys/elf32.h, sys/elf64.h, and sys/elf_common.h. When building libelf in the bootstrap stage this would include the tree versions of, for example, sys/_types.h. This would work as long as the tree's version of this file was close enough to the system's version of the file. If, however, there was a change in the tree such that the location of a typedef was moved this would cause problems. In this case the version of sys/_types.h in the tree no longer defines __wchar_t and expects it to to be defined in machine/_types.h, however we pick up machine/_types.h from the system and find it is not defined there. The solution is to restrict the parts of sys er include from the tree to those that are needed. This fixes the recent Tinderbox failure. MFC r237531: Add the sys directory we create to the list of items to clean. MFC r238741: Don't ever build files depending on the directory where they are placed in. It is obvious that its modification time will change with each such file builded. This bug cause whole libelf to rebuild itself each second make run (and relink that files on each first make run) in the loop. Modified: stable/9/lib/libelf/Makefile Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libelf/ (props changed) Modified: stable/9/lib/libelf/Makefile ============================================================================== --- stable/9/lib/libelf/Makefile Tue Apr 15 15:58:06 2014 (r264505) +++ stable/9/lib/libelf/Makefile Tue Apr 15 16:10:47 2014 (r264506) @@ -55,9 +55,22 @@ SRCS= elf_begin.c \ ${GENSRCS} INCS= libelf.h gelf.h +# +# We need to link against the correct version of these files. One +# solution is to include ../../sys in the include path. This causes +# problems when a header file in sys depends on a file in another +# part of the tree, e.g. a machine dependent header. +# +SRCS+= sys/elf32.h sys/elf64.h sys/elf_common.h + GENSRCS= libelf_fsize.c libelf_msize.c libelf_convert.c CLEANFILES= ${GENSRCS} -CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../../sys +CLEANDIRS= sys +CFLAGS+= -I${.CURDIR} -I. + +sys/elf32.h sys/elf64.h sys/elf_common.h: ${.CURDIR}/../../sys/${.TARGET} + mkdir -p ${.OBJDIR}/sys + ln -sf ${.CURDIR}/../../sys/${.TARGET} ${.TARGET} SHLIB_MAJOR= 1 From owner-svn-src-stable@FreeBSD.ORG Tue Apr 15 17:49:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A4511ED1; Tue, 15 Apr 2014 17:49:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76DC117CE; Tue, 15 Apr 2014 17:49:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3FHnmW1052397; Tue, 15 Apr 2014 17:49:48 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3FHnmLl052396; Tue, 15 Apr 2014 17:49:48 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201404151749.s3FHnmLl052396@svn.freebsd.org> From: Sean Bruno Date: Tue, 15 Apr 2014 17:49:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264510 - stable/10/sys/dev/ciss X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2014 17:49:48 -0000 Author: sbruno Date: Tue Apr 15 17:49:47 2014 New Revision: 264510 URL: http://svnweb.freebsd.org/changeset/base/264510 Log: MFC r264354 Fix insta-panic on assert of unlocked periph mtx in ciss(4) when logical volume state changes. Sponsored by: Yahoo! Inc. Modified: stable/10/sys/dev/ciss/ciss.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ciss/ciss.c ============================================================================== --- stable/10/sys/dev/ciss/ciss.c Tue Apr 15 17:06:26 2014 (r264509) +++ stable/10/sys/dev/ciss/ciss.c Tue Apr 15 17:49:47 2014 (r264510) @@ -180,8 +180,6 @@ static int ciss_cam_emulate(struct ciss_ static void ciss_cam_poll(struct cam_sim *sim); static void ciss_cam_complete(struct ciss_request *cr); static void ciss_cam_complete_fixup(struct ciss_softc *sc, struct ccb_scsiio *csio); -static struct cam_periph *ciss_find_periph(struct ciss_softc *sc, - int bus, int target); static int ciss_name_device(struct ciss_softc *sc, int bus, int target); /* periodic status monitoring */ @@ -3398,27 +3396,6 @@ ciss_cam_complete_fixup(struct ciss_soft /******************************************************************************** - * Find a peripheral attached at (target) - */ -static struct cam_periph * -ciss_find_periph(struct ciss_softc *sc, int bus, int target) -{ - struct cam_periph *periph; - struct cam_path *path; - int status; - - status = xpt_create_path(&path, NULL, cam_sim_path(sc->ciss_cam_sim[bus]), - target, 0); - if (status == CAM_REQ_CMP) { - periph = cam_periph_find(path, NULL); - xpt_free_path(path); - } else { - periph = NULL; - } - return(periph); -} - -/******************************************************************************** * Name the device at (target) * * XXX is this strictly correct? @@ -3427,12 +3404,22 @@ static int ciss_name_device(struct ciss_softc *sc, int bus, int target) { struct cam_periph *periph; + struct cam_path *path; + int status; if (CISS_IS_PHYSICAL(bus)) return (0); - if ((periph = ciss_find_periph(sc, bus, target)) != NULL) { + + status = xpt_create_path(&path, NULL, cam_sim_path(sc->ciss_cam_sim[bus]), + target, 0); + + if (status == CAM_REQ_CMP) { + xpt_path_lock(path); + periph = cam_periph_find(path, NULL); sprintf(sc->ciss_logical[bus][target].cl_name, "%s%d", periph->periph_name, periph->unit_number); + xpt_path_unlock(path); + xpt_free_path(path); return(0); } sc->ciss_logical[bus][target].cl_name[0] = 0; From owner-svn-src-stable@FreeBSD.ORG Tue Apr 15 17:52:23 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3C04CD7; Tue, 15 Apr 2014 17:52:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E3C2187C; Tue, 15 Apr 2014 17:52:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3FHqMd3055649; Tue, 15 Apr 2014 17:52:22 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3FHqMmC055648; Tue, 15 Apr 2014 17:52:22 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201404151752.s3FHqMmC055648@svn.freebsd.org> From: Sean Bruno Date: Tue, 15 Apr 2014 17:52:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264511 - stable/9/sys/dev/ciss X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2014 17:52:23 -0000 Author: sbruno Date: Tue Apr 15 17:52:22 2014 New Revision: 264511 URL: http://svnweb.freebsd.org/changeset/base/264511 Log: MFC r264354 but change the lock arg and implementation to fit the current state of CAM in stable/9 Fix insta-panic on assert of unlocked periph mtx in ciss(4) when logical volume state changes. I'm still setting the mergeinfo as done here as the intent of the MFC, if not the EXACT code is being implemented. Reviewed by: mav@ Sponsored by: Yahoo! Inc Modified: stable/9/sys/dev/ciss/ciss.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ciss/ciss.c ============================================================================== --- stable/9/sys/dev/ciss/ciss.c Tue Apr 15 17:49:47 2014 (r264510) +++ stable/9/sys/dev/ciss/ciss.c Tue Apr 15 17:52:22 2014 (r264511) @@ -180,8 +180,6 @@ static int ciss_cam_emulate(struct ciss_ static void ciss_cam_poll(struct cam_sim *sim); static void ciss_cam_complete(struct ciss_request *cr); static void ciss_cam_complete_fixup(struct ciss_softc *sc, struct ccb_scsiio *csio); -static struct cam_periph *ciss_find_periph(struct ciss_softc *sc, - int bus, int target); static int ciss_name_device(struct ciss_softc *sc, int bus, int target); /* periodic status monitoring */ @@ -3398,27 +3396,6 @@ ciss_cam_complete_fixup(struct ciss_soft /******************************************************************************** - * Find a peripheral attached at (target) - */ -static struct cam_periph * -ciss_find_periph(struct ciss_softc *sc, int bus, int target) -{ - struct cam_periph *periph; - struct cam_path *path; - int status; - - status = xpt_create_path(&path, NULL, cam_sim_path(sc->ciss_cam_sim[bus]), - target, 0); - if (status == CAM_REQ_CMP) { - periph = cam_periph_find(path, NULL); - xpt_free_path(path); - } else { - periph = NULL; - } - return(periph); -} - -/******************************************************************************** * Name the device at (target) * * XXX is this strictly correct? @@ -3427,12 +3404,22 @@ static int ciss_name_device(struct ciss_softc *sc, int bus, int target) { struct cam_periph *periph; + struct cam_path *path; + int status; if (CISS_IS_PHYSICAL(bus)) return (0); - if ((periph = ciss_find_periph(sc, bus, target)) != NULL) { + + status = xpt_create_path(&path, NULL, cam_sim_path(sc->ciss_cam_sim[bus]), + target, 0); + + if (status == CAM_REQ_CMP) { + mtx_lock(&sc->ciss_mtx); + periph = cam_periph_find(path, NULL); sprintf(sc->ciss_logical[bus][target].cl_name, "%s%d", periph->periph_name, periph->unit_number); + mtx_unlock(&sc->ciss_mtx); + xpt_free_path(path); return(0); } sc->ciss_logical[bus][target].cl_name[0] = 0; From owner-svn-src-stable@FreeBSD.ORG Tue Apr 15 18:24:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 83F25780; Tue, 15 Apr 2014 18:24:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FF561BB7; Tue, 15 Apr 2014 18:24:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3FIOPAe068231; Tue, 15 Apr 2014 18:24:25 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3FIOPgl068230; Tue, 15 Apr 2014 18:24:25 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201404151824.s3FIOPgl068230@svn.freebsd.org> From: Jilles Tjoelker Date: Tue, 15 Apr 2014 18:24:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264512 - stable/10/bin/sh X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2014 18:24:25 -0000 Author: jilles Date: Tue Apr 15 18:24:24 2014 New Revision: 264512 URL: http://svnweb.freebsd.org/changeset/base/264512 Log: MFC r263846: sh: Fix memory leak when trying to set a read only variable. Modified: stable/10/bin/sh/var.c Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/sh/var.c ============================================================================== --- stable/10/bin/sh/var.c Tue Apr 15 17:52:22 2014 (r264511) +++ stable/10/bin/sh/var.c Tue Apr 15 18:24:24 2014 (r264512) @@ -325,8 +325,11 @@ setvareq(char *s, int flags) mklocal(s); vp = find_var(s, &vpp, &nlen); if (vp != NULL) { - if (vp->flags & VREADONLY) + if (vp->flags & VREADONLY) { + if ((flags & (VTEXTFIXED|VSTACK)) == 0) + ckfree(s); error("%.*s: is read only", vp->name_len, s); + } if (flags & VNOSET) return; INTOFF; From owner-svn-src-stable@FreeBSD.ORG Tue Apr 15 18:29:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 678A690D; Tue, 15 Apr 2014 18:29:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 544C41BF0; Tue, 15 Apr 2014 18:29:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3FIT6c5068764; Tue, 15 Apr 2014 18:29:06 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3FIT6F1068763; Tue, 15 Apr 2014 18:29:06 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201404151829.s3FIT6F1068763@svn.freebsd.org> From: Jilles Tjoelker Date: Tue, 15 Apr 2014 18:29:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264513 - stable/10/bin/sh X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2014 18:29:06 -0000 Author: jilles Date: Tue Apr 15 18:29:05 2014 New Revision: 264513 URL: http://svnweb.freebsd.org/changeset/base/264513 Log: MFC r263847: sh: Fix memory leak with an assignment before a regular builtin Modified: stable/10/bin/sh/var.c Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/sh/var.c ============================================================================== --- stable/10/bin/sh/var.c Tue Apr 15 18:24:24 2014 (r264512) +++ stable/10/bin/sh/var.c Tue Apr 15 18:29:05 2014 (r264513) @@ -330,8 +330,11 @@ setvareq(char *s, int flags) ckfree(s); error("%.*s: is read only", vp->name_len, s); } - if (flags & VNOSET) + if (flags & VNOSET) { + if ((flags & (VTEXTFIXED|VSTACK)) == 0) + ckfree(s); return; + } INTOFF; if (vp->func && (flags & VNOFUNC) == 0) @@ -364,8 +367,11 @@ setvareq(char *s, int flags) return; } /* not found */ - if (flags & VNOSET) + if (flags & VNOSET) { + if ((flags & (VTEXTFIXED|VSTACK)) == 0) + ckfree(s); return; + } INTOFF; vp = ckmalloc(sizeof (*vp)); vp->flags = flags; From owner-svn-src-stable@FreeBSD.ORG Tue Apr 15 23:40:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB2B034B; Tue, 15 Apr 2014 23:40:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB36C1B2C; Tue, 15 Apr 2014 23:40:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3FNentW097801; Tue, 15 Apr 2014 23:40:49 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3FNemle097788; Tue, 15 Apr 2014 23:40:48 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201404152340.s3FNemle097788@svn.freebsd.org> From: Bryan Drewery Date: Tue, 15 Apr 2014 23:40:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r264519 - in stable/8: etc etc/mtree etc/pkg share share/keys/pkg/trusted share/man/man7 usr.sbin/pkg X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2014 23:40:50 -0000 Author: bdrewery Date: Tue Apr 15 23:40:47 2014 New Revision: 264519 URL: http://svnweb.freebsd.org/changeset/base/264519 Log: MFC Pkg configuration, known public key, and pkg(7) changes to align with pkg(8) This partially merges: r229068,r237795,r252048,r257145,r257147,r257150,r257150,r257159,r257164, r257168,r257344,r257344,r257667,r257668,r258227,r258550,r263937,r264420 - etc/ - Bring in current pkg configuration from head - Add /etc/pkg/ and /usr/share/keys to mtree - share/keys - Bring in trusted key fingerprint from head - share/man/man7 - Document /usr/share/keys/pkg - usr.sbin/pkg - No longer create pkg.conf as it is deprecated in pkg(8). - Show security warning when bootstrapping. * This is a direct commit as the signature verification is not being MFC'd due to being too large. Discussed with: bapt, gjb Added: stable/8/etc/pkg/ - copied from r257145, head/etc/pkg/ - copied from r257344, head/share/keys/ Directory Properties: stable/8/share/keys/ (props changed) Modified: stable/8/etc/Makefile stable/8/etc/mtree/BSD.root.dist stable/8/etc/mtree/BSD.usr.dist stable/8/etc/pkg/FreeBSD.conf stable/8/share/Makefile stable/8/share/keys/pkg/trusted/pkg.freebsd.org.2013102301 stable/8/share/man/man7/hier.7 stable/8/usr.sbin/pkg/pkg.c Directory Properties: stable/8/etc/ (props changed) stable/8/share/ (props changed) stable/8/share/man/ (props changed) stable/8/share/man/man7/ (props changed) stable/8/usr.sbin/pkg/ (props changed) Modified: stable/8/etc/Makefile ============================================================================== --- stable/8/etc/Makefile Tue Apr 15 23:27:14 2014 (r264518) +++ stable/8/etc/Makefile Tue Apr 15 23:40:47 2014 (r264519) @@ -172,6 +172,7 @@ distribution: ${_+_}cd ${.CURDIR}/devd; ${MAKE} install ${_+_}cd ${.CURDIR}/gss; ${MAKE} install ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install + ${_+_}cd ${.CURDIR}/pkg; ${MAKE} install ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install ${_+_}cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap Modified: stable/8/etc/mtree/BSD.root.dist ============================================================================== --- stable/8/etc/mtree/BSD.root.dist Tue Apr 15 23:27:14 2014 (r264518) +++ stable/8/etc/mtree/BSD.root.dist Tue Apr 15 23:40:47 2014 (r264519) @@ -52,6 +52,8 @@ weekly .. .. + pkg + .. ppp .. rc.d Modified: stable/8/etc/mtree/BSD.usr.dist ============================================================================== --- stable/8/etc/mtree/BSD.usr.dist Tue Apr 15 23:27:14 2014 (r264518) +++ stable/8/etc/mtree/BSD.usr.dist Tue Apr 15 23:40:47 2014 (r264519) @@ -340,6 +340,14 @@ .. info .. + keys + pkg + revoked + .. + trusted + .. + .. + .. locale UTF-8 .. Modified: stable/8/etc/pkg/FreeBSD.conf ============================================================================== --- head/etc/pkg/FreeBSD.conf Sat Oct 26 03:31:05 2013 (r257145) +++ stable/8/etc/pkg/FreeBSD.conf Tue Apr 15 23:40:47 2014 (r264519) @@ -1,6 +1,16 @@ # $FreeBSD$ +# +# To disable this repository, instead of modifying or removing this file, +# create a /usr/local/etc/pkg/repos/FreeBSD.conf file: +# +# mkdir -p /usr/local/etc/pkg/repos +# echo "FreeBSD: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf +# + FreeBSD: { - url: "pkg+http://pkg.freebsd.org/${ABI}/latest", + url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest", mirror_type: "srv", - enabled: "yes" + signature_type: "fingerprints", + fingerprints: "/usr/share/keys/pkg", + enabled: yes } Modified: stable/8/share/Makefile ============================================================================== --- stable/8/share/Makefile Tue Apr 15 23:27:14 2014 (r264518) +++ stable/8/share/Makefile Tue Apr 15 23:40:47 2014 (r264519) @@ -9,6 +9,7 @@ SUBDIR= ${_colldef} \ ${_dict} \ ${_doc} \ ${_examples} \ + keys \ ${_man} \ ${_me} \ misc \ Modified: stable/8/share/keys/pkg/trusted/pkg.freebsd.org.2013102301 ============================================================================== --- head/share/keys/pkg/trusted/pkg.freebsd.org.2013102301 Tue Oct 29 15:07:54 2013 (r257344) +++ stable/8/share/keys/pkg/trusted/pkg.freebsd.org.2013102301 Tue Apr 15 23:40:47 2014 (r264519) @@ -1,5 +1,4 @@ # $FreeBSD$ -# This key is for testing purposes only and will be revoked before 10.0-RELEASE function: "sha256" fingerprint: "b0170035af3acc5f3f3ae1859dc717101b4e6c1d0a794ad554928ca0cbb2f438" Modified: stable/8/share/man/man7/hier.7 ============================================================================== --- stable/8/share/man/man7/hier.7 Tue Apr 15 23:27:14 2014 (r264518) +++ stable/8/share/man/man7/hier.7 Tue Apr 15 23:40:47 2014 (r264519) @@ -32,7 +32,7 @@ .\" @(#)hier.7 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd October 23, 2013 +.Dd October 29, 2013 .Dt HIER 7 .Os .Sh NAME @@ -546,6 +546,16 @@ ASCII text files used by various games device description file for device name .It Pa info/ GNU Info hypertext system +.It Pa keys/ +known trusted and revoked keys. +.Bl -tag -width ".Pa keys/pkg/" -compact +.It Pa keys/pkg/ +fingerprints for +.Xr pkg 7 +and +.Xr pkg 8 +.El +.Pp .It Pa locale/ localization files; see Modified: stable/8/usr.sbin/pkg/pkg.c ============================================================================== --- stable/8/usr.sbin/pkg/pkg.c Tue Apr 15 23:27:14 2014 (r264518) +++ stable/8/usr.sbin/pkg/pkg.c Tue Apr 15 23:40:47 2014 (r264519) @@ -284,13 +284,10 @@ bootstrap_pkg(void) { struct url *u; FILE *remote; - FILE *config; - char *site; struct dns_srvinfo *mirrors, *current; /* To store _https._tcp. + hostname + \0 */ char zone[MAXHOSTNAMELEN + 13]; char url[MAXPATHLEN]; - char conf[MAXPATHLEN]; char abi[BUFSIZ]; char tmppkg[MAXPATHLEN]; char buf[10240]; @@ -306,7 +303,6 @@ bootstrap_pkg(void) max_retry = 3; ret = -1; remote = NULL; - config = NULL; current = mirrors = NULL; printf("Bootstrapping pkg please wait\n"); @@ -387,26 +383,6 @@ bootstrap_pkg(void) if ((ret = extract_pkg_static(fd, pkgstatic, MAXPATHLEN)) == 0) ret = install_pkg_static(pkgstatic, tmppkg); - snprintf(conf, MAXPATHLEN, "%s/etc/pkg.conf", - getenv("LOCALBASE") ? getenv("LOCALBASE") : _LOCALBASE); - - if (access(conf, R_OK) == -1) { - site = strrchr(url, '/'); - if (site == NULL) - goto cleanup; - site[0] = '\0'; - site = strrchr(url, '/'); - if (site == NULL) - goto cleanup; - site[0] = '\0'; - - config = fopen(conf, "w+"); - if (config == NULL) - goto cleanup; - fprintf(config, "packagesite: %s\n", url); - fclose(config); - } - goto cleanup; fetchfail: @@ -423,7 +399,11 @@ cleanup: static const char confirmation_message[] = "The package management tool is not yet installed on your system.\n" -"Do you want to fetch and install it now? [y/N]: "; +"The mechanism for doing this is not secure on FreeBSD 8. To securely install\n" +"pkg(8), use ports from a portsnap checkout:\n" +" # portsnap fetch extract\n" +" # make -C /usr/ports/ports-mgmt/pkg install clean\n" +"Do you still want to fetch and install it now? [y/N]: "; static int pkg_query_yes_no(void) From owner-svn-src-stable@FreeBSD.ORG Wed Apr 16 10:04:20 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D3DE776; Wed, 16 Apr 2014 10:04:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87A15171A; Wed, 16 Apr 2014 10:04:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3GA4K2q052571; Wed, 16 Apr 2014 10:04:20 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3GA4K4u052569; Wed, 16 Apr 2014 10:04:20 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201404161004.s3GA4K4u052569@svn.freebsd.org> From: Alexander Motin Date: Wed, 16 Apr 2014 10:04:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264522 - in stable/10: share/man/man4 sys/cam/scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Apr 2014 10:04:20 -0000 Author: mav Date: Wed Apr 16 10:04:19 2014 New Revision: 264522 URL: http://svnweb.freebsd.org/changeset/base/264522 Log: MFC r264295: Remove support of LUN-based CD changers from cd(4) driver. This code was heavily broken few months ago during CAM locking changes. Fixing it would require almost complete rewrite. Since there are no known devices on market using this interface younger then ~15 years, and they are CD, not even DVD, I don't see much reason to rewrite it. This change does not mean those devices won't work. They will just work slower due to inefficient disks load/unload schedule if several LUNs accessed same time. Modified: stable/10/share/man/man4/cd.4 stable/10/sys/cam/scsi/scsi_cd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/cd.4 ============================================================================== --- stable/10/share/man/man4/cd.4 Wed Apr 16 09:25:20 2014 (r264521) +++ stable/10/share/man/man4/cd.4 Wed Apr 16 10:04:19 2014 (r264522) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 8, 2012 +.Dd April 9, 2014 .Dt CD 4 .Os .Sh NAME @@ -33,8 +33,6 @@ .Nd SCSI CD-ROM driver .Sh SYNOPSIS .Cd device cd -.Cd "options ""CHANGER_MIN_BUSY_SECONDS=3""" -.Cd "options ""CHANGER_MAX_BUSY_SECONDS=11""" .Sh DESCRIPTION The .Nm @@ -288,65 +286,6 @@ Some work is planned to support some of the more common `broken' .Tn CD-ROM drives; however, this is not yet under way. -.Sh CHANGER OPERATION -This driver has built-in support for LUN-based CD changers. -A LUN-based CD -changer is a drive that can hold two or more CDs, but only has one CD -player mechanism. -Each CD in the drive shows up as a separate logical unit -on the -.Tn SCSI -bus. -The -.Nm -driver automatically recognizes LUN-based changers, and routes commands for -changers through an internal scheduler. -The scheduler prevents changer -"thrashing", which is caused by sending commands to different LUNs in the -changer at the same time. -.Pp -The scheduler honors minimum and maximum time -quanta that the driver will spend on a particular LUN. -The minimum time -is the guaranteed minimum amount of time that the driver will spend on a -given LUN, even if there is no outstanding I/O for that LUN. -The maximum -time is the maximum amount of time the changer will spend on a LUN if there -is outstanding I/O for another LUN. -If there is no outstanding I/O for -another LUN, the driver will allow indefinite access to a given LUN. -.Pp -The minimum and maximum time quanta are configurable via kernel options and -also via sysctl and kernel tunable variables. -The kernel options are: -.Pp -.Bl -item -compact -.It -.Cd "options ""CHANGER_MIN_BUSY_SECONDS=3""" -.It -.Cd "options ""CHANGER_MAX_BUSY_SECONDS=11""" -.El -.Pp -The sysctl/kernel tunable variables are: -.Pp -.Bl -item -compact -.It -.Va kern.cam.cd.changer.min_busy_seconds -.It -.Va kern.cam.cd.changer.max_busy_seconds -.El -.Pp -It is suggested that the user try experimenting with the minimum and -maximum timeouts via the sysctl variables to arrive at the proper values -for your changer. -Once you have settled on the proper timeouts for your -changer, you can then put them in your kernel config file. -.Pp -If your system does have a LUN-based changer, you may notice that the -probe messages for the various LUNs of the changer will continue to appear -while the boot process is going on. -This is normal, and is caused by the -changer scheduling code. .Sh SYSCTL VARIABLES The following variables are available as both .Xr sysctl 8 @@ -397,12 +336,6 @@ Valid minimum command sizes are 6 and 10. Any value above 6 will be rounded to 10, and any value below 6 will be rounded to 6. -.It kern.cam.cd.changer.min_busy_seconds -.It kern.cam.cd.changer.max_busy_seconds -.Pp -Tune how long individual LUNs are 'locked' for I/O operations to -optimize changer operation. -See CHANGER OPERATION section for information on how to use these items. .El .Sh FILES .Bl -tag -width /dev/cd[0-9][a-h] -compact @@ -437,21 +370,3 @@ were poorly chosen, and a number of spel the names of the .Fn ioctl commands. -.Pp -There is no mechanism currently to set different minimum and maximum -timeouts for different CD changers; the timeout values set by the kernel -options or the sysctl variables apply to all LUN-based CD changers in the -system. -It is possible to implement such support, but the sysctl -implementation at least would be rather inelegant, because of the current -inability of the sysctl code to handle the addition of nodes after compile -time. -Thus, it would take one dynamically sized sysctl variable and a -userland utility to get/set the timeout values. -Implementation of separate -timeouts for different CD devices in the kernel config file would likely -require modification of -.Xr config 8 -to support the two timeouts when hardwiring -.Nm -devices. Modified: stable/10/sys/cam/scsi/scsi_cd.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_cd.c Wed Apr 16 09:25:20 2014 (r264521) +++ stable/10/sys/cam/scsi/scsi_cd.c Wed Apr 16 10:04:19 2014 (r264522) @@ -87,8 +87,6 @@ typedef enum { CD_Q_NONE = 0x00, CD_Q_NO_TOUCH = 0x01, CD_Q_BCD_TRACKS = 0x02, - CD_Q_NO_CHANGER = 0x04, - CD_Q_CHANGER = 0x08, CD_Q_10_BYTE_ONLY = 0x10 } cd_quirks; @@ -96,8 +94,6 @@ typedef enum { "\020" \ "\001NO_TOUCH" \ "\002BCD_TRACKS" \ - "\003NO_CHANGER" \ - "\004CHANGER" \ "\00510_BYTE_ONLY" typedef enum { @@ -106,7 +102,6 @@ typedef enum { CD_FLAG_DISC_LOCKED = 0x0004, CD_FLAG_DISC_REMOVABLE = 0x0008, CD_FLAG_SAW_MEDIA = 0x0010, - CD_FLAG_CHANGER = 0x0040, CD_FLAG_ACTIVE = 0x0080, CD_FLAG_SCHED_ON_COMP = 0x0100, CD_FLAG_RETRY_UA = 0x0200, @@ -123,13 +118,6 @@ typedef enum { CD_CCB_RETRY_UA = 0x10 } cd_ccb_state; -typedef enum { - CHANGER_TIMEOUT_SCHED = 0x01, - CHANGER_SHORT_TMOUT_SCHED = 0x02, - CHANGER_MANUAL_CALL = 0x04, - CHANGER_NEED_TIMEOUT = 0x08 -} cd_changer_flags; - #define ccb_state ppriv_field0 #define ccb_bp ppriv_ptr1 @@ -157,9 +145,6 @@ struct cd_softc { struct cd_params params; union ccb saved_ccb; cd_quirks quirks; - STAILQ_ENTRY(cd_softc) changer_links; - struct cdchanger *changer; - int bufs_left; struct cam_periph *periph; int minimum_command_size; int outstanding_cmds; @@ -189,13 +174,6 @@ struct cd_quirk_entry { }; /* - * The changer quirk entries aren't strictly necessary. Basically, what - * they do is tell cdregister() up front that a device is a changer. - * Otherwise, it will figure that fact out once it sees a LUN on the device - * that is greater than 0. If it is known up front that a device is a changer, - * all I/O to the device will go through the changer scheduling routines, as - * opposed to the "normal" CD code. - * * NOTE ON 10_BYTE_ONLY quirks: Any 10_BYTE_ONLY quirks MUST be because * your device hangs when it gets a 10 byte command. Adding a quirk just * to get rid of the informative diagnostic message is not acceptable. All @@ -209,18 +187,6 @@ struct cd_quirk_entry { static struct cd_quirk_entry cd_quirk_table[] = { { - { T_CDROM, SIP_MEDIA_REMOVABLE, "NRC", "MBR-7", "*"}, - /*quirks*/ CD_Q_CHANGER - }, - { - { T_CDROM, SIP_MEDIA_REMOVABLE, "PIONEER", "CD-ROM DRM*", - "*"}, /* quirks */ CD_Q_CHANGER - }, - { - { T_CDROM, SIP_MEDIA_REMOVABLE, "NAKAMICH", "MJ-*", "*"}, - /* quirks */ CD_Q_CHANGER - }, - { { T_CDROM, SIP_MEDIA_REMOVABLE, "CHINON", "CD-ROM CDS-535","*"}, /* quirks */ CD_Q_BCD_TRACKS } @@ -241,15 +207,11 @@ static void cdasync(void *callback_arg, static int cdcmdsizesysctl(SYSCTL_HANDLER_ARGS); static void cdshorttimeout(void *arg); static void cdschedule(struct cam_periph *periph, int priority); -static void cdrunchangerqueue(void *arg); -static void cdchangerschedule(struct cd_softc *softc); static int cdrunccb(union ccb *ccb, int (*error_routine)(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags), u_int32_t cam_flags, u_int32_t sense_flags); -static union ccb *cdgetccb(struct cam_periph *periph, - u_int32_t priority); static void cddone(struct cam_periph *periph, union ccb *start_ccb); static union cd_pages *cdgetpage(struct cd_mode_params *mode_params); @@ -311,22 +273,12 @@ PERIPHDRIVER_DECLARE(cd, cddriver); #ifndef CD_DEFAULT_TIMEOUT #define CD_DEFAULT_TIMEOUT 30000 #endif -#ifndef CHANGER_MIN_BUSY_SECONDS -#define CHANGER_MIN_BUSY_SECONDS 5 -#endif -#ifndef CHANGER_MAX_BUSY_SECONDS -#define CHANGER_MAX_BUSY_SECONDS 15 -#endif static int cd_poll_period = CD_DEFAULT_POLL_PERIOD; static int cd_retry_count = CD_DEFAULT_RETRY; static int cd_timeout = CD_DEFAULT_TIMEOUT; -static int changer_min_busy_seconds = CHANGER_MIN_BUSY_SECONDS; -static int changer_max_busy_seconds = CHANGER_MAX_BUSY_SECONDS; static SYSCTL_NODE(_kern_cam, OID_AUTO, cd, CTLFLAG_RD, 0, "CAM CDROM driver"); -static SYSCTL_NODE(_kern_cam_cd, OID_AUTO, changer, CTLFLAG_RD, 0, - "CD Changer"); SYSCTL_INT(_kern_cam_cd, OID_AUTO, poll_period, CTLFLAG_RW, &cd_poll_period, 0, "Media polling period in seconds"); TUNABLE_INT("kern.cam.cd.poll_period", &cd_poll_period); @@ -336,30 +288,6 @@ TUNABLE_INT("kern.cam.cd.retry_count", & SYSCTL_INT(_kern_cam_cd, OID_AUTO, timeout, CTLFLAG_RW, &cd_timeout, 0, "Timeout, in us, for read operations"); TUNABLE_INT("kern.cam.cd.timeout", &cd_timeout); -SYSCTL_INT(_kern_cam_cd_changer, OID_AUTO, min_busy_seconds, CTLFLAG_RW, - &changer_min_busy_seconds, 0, "Minimum changer scheduling quantum"); -TUNABLE_INT("kern.cam.cd.changer.min_busy_seconds", &changer_min_busy_seconds); -SYSCTL_INT(_kern_cam_cd_changer, OID_AUTO, max_busy_seconds, CTLFLAG_RW, - &changer_max_busy_seconds, 0, "Maximum changer scheduling quantum"); -TUNABLE_INT("kern.cam.cd.changer.max_busy_seconds", &changer_max_busy_seconds); - -struct cdchanger { - path_id_t path_id; - target_id_t target_id; - int num_devices; - struct camq devq; - struct timeval start_time; - struct cd_softc *cur_device; - struct callout short_handle; - struct callout long_handle; - volatile cd_changer_flags flags; - STAILQ_ENTRY(cdchanger) changer_links; - STAILQ_HEAD(chdevlist, cd_softc) chluns; -}; - -static struct mtx changerq_mtx; -static STAILQ_HEAD(changerlist, cdchanger) changerq; -static int num_changers; static MALLOC_DEFINE(M_SCSICD, "scsi_cd", "scsi_cd buffers"); @@ -368,9 +296,6 @@ cdinit(void) { cam_status status; - mtx_init(&changerq_mtx, "cdchangerq", "SCSI CD Changer List", MTX_DEF); - STAILQ_INIT(&changerq); - /* * Install a global async callback. This callback will * receive async callbacks like "new device found". @@ -417,15 +342,6 @@ cdoninvalidate(struct cam_periph *periph */ bioq_flush(&softc->bio_queue, NULL, ENXIO); - /* - * If this device is part of a changer, and it was scheduled - * to run, remove it from the run queue since we just nuked - * all of its scheduled I/O. - */ - if ((softc->flags & CD_FLAG_CHANGER) - && (softc->pinfo.index != CAM_UNQUEUED_INDEX)) - camq_remove(&softc->changer->devq, softc->pinfo.index); - disk_gone(softc->disk); } @@ -436,73 +352,6 @@ cdcleanup(struct cam_periph *periph) softc = (struct cd_softc *)periph->softc; - /* - * In the queued, non-active case, the device in question - * has already been removed from the changer run queue. Since this - * device is active, we need to de-activate it, and schedule - * another device to run. (if there is another one to run) - */ - if ((softc->flags & CD_FLAG_CHANGER) - && (softc->flags & CD_FLAG_ACTIVE)) { - - /* - * The purpose of the short timeout is soley to determine - * whether the current device has finished or not. Well, - * since we're removing the active device, we know that it - * is finished. So, get rid of the short timeout. - * Otherwise, if we're in the time period before the short - * timeout fires, and there are no other devices in the - * queue to run, there won't be any other device put in the - * active slot. i.e., when we call cdrunchangerqueue() - * below, it won't do anything. Then, when the short - * timeout fires, it'll look at the "current device", which - * we are free below, and possibly panic the kernel on a - * bogus pointer reference. - * - * The long timeout doesn't really matter, since we - * decrement the qfrozen_cnt to indicate that there is - * nothing in the active slot now. Therefore, there won't - * be any bogus pointer references there. - */ - if (softc->changer->flags & CHANGER_SHORT_TMOUT_SCHED) { - callout_stop(&softc->changer->short_handle); - softc->changer->flags &= ~CHANGER_SHORT_TMOUT_SCHED; - } - softc->changer->devq.qfrozen_cnt--; - softc->changer->flags |= CHANGER_MANUAL_CALL; - cdrunchangerqueue(softc->changer); - } - - /* - * If we're removing the last device on the changer, go ahead and - * remove the changer device structure. - */ - if ((softc->flags & CD_FLAG_CHANGER) - && (--softc->changer->num_devices == 0)) { - - /* - * Theoretically, there shouldn't be any timeouts left, but - * I'm not completely sure that that will be the case. So, - * it won't hurt to check and see if there are any left. - */ - if (softc->changer->flags & CHANGER_TIMEOUT_SCHED) { - callout_stop(&softc->changer->long_handle); - softc->changer->flags &= ~CHANGER_TIMEOUT_SCHED; - } - - if (softc->changer->flags & CHANGER_SHORT_TMOUT_SCHED) { - callout_stop(&softc->changer->short_handle); - softc->changer->flags &= ~CHANGER_SHORT_TMOUT_SCHED; - } - - mtx_lock(&changerq_mtx); - STAILQ_REMOVE(&changerq, softc->changer, cdchanger, - changer_links); - num_changers--; - mtx_unlock(&changerq_mtx); - xpt_print(periph->path, "removing changer entry\n"); - free(softc->changer, M_DEVBUF); - } cam_periph_unlock(periph); if ((softc->flags & CD_FLAG_SCTX_INIT) != 0 && sysctl_ctx_free(&softc->sysctl_ctx) != 0) { @@ -834,237 +683,16 @@ cdregister(struct cam_periph *periph, vo AC_SCSI_AEN | AC_UNIT_ATTENTION, cdasync, periph, periph->path); /* - * If the target lun is greater than 0, we most likely have a CD - * changer device. Check the quirk entries as well, though, just - * in case someone has a CD tower with one lun per drive or - * something like that. Also, if we know up front that a - * particular device is a changer, we can mark it as such starting - * with lun 0, instead of lun 1. It shouldn't be necessary to have - * a quirk entry to define something as a changer, however. - */ - if (((cgd->ccb_h.target_lun > 0) - && ((softc->quirks & CD_Q_NO_CHANGER) == 0)) - || ((softc->quirks & CD_Q_CHANGER) != 0)) { - struct cdchanger *nchanger; - struct cam_periph *nperiph; - struct cam_path *path; - cam_status status; - int found; - - /* Set the changer flag in the current device's softc */ - softc->flags |= CD_FLAG_CHANGER; - - /* - * Now, look around for an existing changer device with the - * same path and target ID as the current device. - */ - mtx_lock(&changerq_mtx); - for (found = 0, - nchanger = (struct cdchanger *)STAILQ_FIRST(&changerq); - nchanger != NULL; - nchanger = STAILQ_NEXT(nchanger, changer_links)){ - if ((nchanger->path_id == cgd->ccb_h.path_id) - && (nchanger->target_id == cgd->ccb_h.target_id)) { - found = 1; - break; - } - } - mtx_unlock(&changerq_mtx); - - /* - * If we found a matching entry, just add this device to - * the list of devices on this changer. - */ - if (found == 1) { - struct chdevlist *chlunhead; - - chlunhead = &nchanger->chluns; - - /* - * XXX KDM look at consolidating this code with the - * code below in a separate function. - */ - - /* - * Create a path with lun id 0, and see if we can - * find a matching device - */ - status = xpt_create_path(&path, /*periph*/ periph, - cgd->ccb_h.path_id, - cgd->ccb_h.target_id, 0); - - if ((status == CAM_REQ_CMP) - && ((nperiph = cam_periph_find(path, "cd")) != NULL)){ - struct cd_softc *nsoftc; - - nsoftc = (struct cd_softc *)nperiph->softc; - - if ((nsoftc->flags & CD_FLAG_CHANGER) == 0){ - nsoftc->flags |= CD_FLAG_CHANGER; - nchanger->num_devices++; - if (camq_resize(&nchanger->devq, - nchanger->num_devices)!=CAM_REQ_CMP){ - printf("cdregister: " - "camq_resize " - "failed, changer " - "support may " - "be messed up\n"); - } - nsoftc->changer = nchanger; - nsoftc->pinfo.index =CAM_UNQUEUED_INDEX; - - STAILQ_INSERT_TAIL(&nchanger->chluns, - nsoftc,changer_links); - } - xpt_free_path(path); - } else if (status == CAM_REQ_CMP) - xpt_free_path(path); - else { - printf("cdregister: unable to allocate path\n" - "cdregister: changer support may be " - "broken\n"); - } - - nchanger->num_devices++; - - softc->changer = nchanger; - softc->pinfo.index = CAM_UNQUEUED_INDEX; - - if (camq_resize(&nchanger->devq, - nchanger->num_devices) != CAM_REQ_CMP) { - printf("cdregister: camq_resize " - "failed, changer support may " - "be messed up\n"); - } - - STAILQ_INSERT_TAIL(chlunhead, softc, changer_links); - } - /* - * In this case, we don't already have an entry for this - * particular changer, so we need to create one, add it to - * the queue, and queue this device on the list for this - * changer. Before we queue this device, however, we need - * to search for lun id 0 on this target, and add it to the - * queue first, if it exists. (and if it hasn't already - * been marked as part of the changer.) - */ - else { - nchanger = malloc(sizeof(struct cdchanger), - M_DEVBUF, M_NOWAIT | M_ZERO); - if (nchanger == NULL) { - softc->flags &= ~CD_FLAG_CHANGER; - printf("cdregister: unable to malloc " - "changer structure\ncdregister: " - "changer support disabled\n"); - - /* - * Yes, gotos can be gross but in this case - * I think it's justified.. - */ - goto cdregisterexit; - } - if (camq_init(&nchanger->devq, 1) != 0) { - softc->flags &= ~CD_FLAG_CHANGER; - printf("cdregister: changer support " - "disabled\n"); - goto cdregisterexit; - } - - nchanger->path_id = cgd->ccb_h.path_id; - nchanger->target_id = cgd->ccb_h.target_id; - - /* this is superfluous, but it makes things clearer */ - nchanger->num_devices = 0; - - STAILQ_INIT(&nchanger->chluns); - - callout_init_mtx(&nchanger->long_handle, - cam_periph_mtx(periph), 0); - callout_init_mtx(&nchanger->short_handle, - cam_periph_mtx(periph), 0); - - mtx_lock(&changerq_mtx); - num_changers++; - STAILQ_INSERT_TAIL(&changerq, nchanger, - changer_links); - mtx_unlock(&changerq_mtx); - - /* - * Create a path with lun id 0, and see if we can - * find a matching device - */ - status = xpt_create_path(&path, /*periph*/ periph, - cgd->ccb_h.path_id, - cgd->ccb_h.target_id, 0); - - /* - * If we were able to allocate the path, and if we - * find a matching device and it isn't already - * marked as part of a changer, then we add it to - * the current changer. - */ - if ((status == CAM_REQ_CMP) - && ((nperiph = cam_periph_find(path, "cd")) != NULL) - && ((((struct cd_softc *)periph->softc)->flags & - CD_FLAG_CHANGER) == 0)) { - struct cd_softc *nsoftc; - - nsoftc = (struct cd_softc *)nperiph->softc; - - nsoftc->flags |= CD_FLAG_CHANGER; - nchanger->num_devices++; - if (camq_resize(&nchanger->devq, - nchanger->num_devices) != CAM_REQ_CMP) { - printf("cdregister: camq_resize " - "failed, changer support may " - "be messed up\n"); - } - nsoftc->changer = nchanger; - nsoftc->pinfo.index = CAM_UNQUEUED_INDEX; - - STAILQ_INSERT_TAIL(&nchanger->chluns, - nsoftc, changer_links); - xpt_free_path(path); - } else if (status == CAM_REQ_CMP) - xpt_free_path(path); - else { - printf("cdregister: unable to allocate path\n" - "cdregister: changer support may be " - "broken\n"); - } - - softc->changer = nchanger; - softc->pinfo.index = CAM_UNQUEUED_INDEX; - nchanger->num_devices++; - if (camq_resize(&nchanger->devq, - nchanger->num_devices) != CAM_REQ_CMP) { - printf("cdregister: camq_resize " - "failed, changer support may " - "be messed up\n"); - } - STAILQ_INSERT_TAIL(&nchanger->chluns, softc, - changer_links); - } - } - - /* * Schedule a periodic media polling events. */ callout_init_mtx(&softc->mediapoll_c, cam_periph_mtx(periph), 0); if ((softc->flags & CD_FLAG_DISC_REMOVABLE) && - (softc->flags & CD_FLAG_CHANGER) == 0 && (cgd->inq_flags & SID_AEN) == 0 && cd_poll_period != 0) callout_reset(&softc->mediapoll_c, cd_poll_period * hz, cdmediapoll, periph); -cdregisterexit: - - if ((softc->flags & CD_FLAG_CHANGER) == 0) - xpt_schedule(periph, CAM_PRIORITY_DEV); - else - cdschedule(periph, CAM_PRIORITY_DEV); - + xpt_schedule(periph, CAM_PRIORITY_DEV); return(CAM_REQ_CMP); } @@ -1153,251 +781,6 @@ cdclose(struct disk *dp) return (0); } -static void -cdshorttimeout(void *arg) -{ - struct cdchanger *changer; - - changer = (struct cdchanger *)arg; - - /* Always clear the short timeout flag, since that's what we're in */ - changer->flags &= ~CHANGER_SHORT_TMOUT_SCHED; - - /* - * Check to see if there is any more pending or outstanding I/O for - * this device. If not, move it out of the active slot. - */ - if ((bioq_first(&changer->cur_device->bio_queue) == NULL) - && (changer->cur_device->outstanding_cmds == 0)) { - changer->flags |= CHANGER_MANUAL_CALL; - cdrunchangerqueue(changer); - } -} - -/* - * This is a wrapper for xpt_schedule. It only applies to changers. - */ -static void -cdschedule(struct cam_periph *periph, int priority) -{ - struct cd_softc *softc; - - softc = (struct cd_softc *)periph->softc; - - /* - * If this device isn't currently queued, and if it isn't - * the active device, then we queue this device and run the - * changer queue if there is no timeout scheduled to do it. - * If this device is the active device, just schedule it - * to run again. If this device is queued, there should be - * a timeout in place already that will make sure it runs. - */ - if ((softc->pinfo.index == CAM_UNQUEUED_INDEX) - && ((softc->flags & CD_FLAG_ACTIVE) == 0)) { - /* - * We don't do anything with the priority here. - * This is strictly a fifo queue. - */ - softc->pinfo.priority = CAM_PRIORITY_NORMAL; - softc->pinfo.generation = ++softc->changer->devq.generation; - camq_insert(&softc->changer->devq, (cam_pinfo *)softc); - - /* - * Since we just put a device in the changer queue, - * check and see if there is a timeout scheduled for - * this changer. If so, let the timeout handle - * switching this device into the active slot. If - * not, manually call the timeout routine to - * bootstrap things. - */ - if (((softc->changer->flags & CHANGER_TIMEOUT_SCHED)==0) - && ((softc->changer->flags & CHANGER_NEED_TIMEOUT)==0) - && ((softc->changer->flags & CHANGER_SHORT_TMOUT_SCHED)==0)){ - softc->changer->flags |= CHANGER_MANUAL_CALL; - cdrunchangerqueue(softc->changer); - } - } else if ((softc->flags & CD_FLAG_ACTIVE) - && ((softc->flags & CD_FLAG_SCHED_ON_COMP) == 0)) - xpt_schedule(periph, priority); -} - -static void -cdrunchangerqueue(void *arg) -{ - struct cd_softc *softc; - struct cdchanger *changer; - int called_from_timeout; - - changer = (struct cdchanger *)arg; - - /* - * If we have NOT been called from cdstrategy() or cddone(), and - * instead from a timeout routine, go ahead and clear the - * timeout flag. - */ - if ((changer->flags & CHANGER_MANUAL_CALL) == 0) { - changer->flags &= ~CHANGER_TIMEOUT_SCHED; - called_from_timeout = 1; - } else - called_from_timeout = 0; - - /* Always clear the manual call flag */ - changer->flags &= ~CHANGER_MANUAL_CALL; - - /* nothing to do if the queue is empty */ - if (changer->devq.entries <= 0) { - return; - } - - /* - * If the changer queue is frozen, that means we have an active - * device. - */ - if (changer->devq.qfrozen_cnt > 0) { - - /* - * We always need to reset the frozen count and clear the - * active flag. - */ - changer->devq.qfrozen_cnt--; - changer->cur_device->flags &= ~CD_FLAG_ACTIVE; - changer->cur_device->flags &= ~CD_FLAG_SCHED_ON_COMP; - - if (changer->cur_device->outstanding_cmds > 0) { - changer->cur_device->flags |= CD_FLAG_SCHED_ON_COMP; - changer->cur_device->bufs_left = - changer->cur_device->outstanding_cmds; - if (called_from_timeout) { - callout_reset(&changer->long_handle, - changer_max_busy_seconds * hz, - cdrunchangerqueue, changer); - changer->flags |= CHANGER_TIMEOUT_SCHED; - } - return; - } - - /* - * Check to see whether the current device has any I/O left - * to do. If so, requeue it at the end of the queue. If - * not, there is no need to requeue it. - */ - if (bioq_first(&changer->cur_device->bio_queue) != NULL) { - - changer->cur_device->pinfo.generation = - ++changer->devq.generation; - camq_insert(&changer->devq, - (cam_pinfo *)changer->cur_device); - } - } - - softc = (struct cd_softc *)camq_remove(&changer->devq, CAMQ_HEAD); - - changer->cur_device = softc; - - changer->devq.qfrozen_cnt++; - softc->flags |= CD_FLAG_ACTIVE; - - /* Just in case this device is waiting */ - wakeup(&softc->changer); - xpt_schedule(softc->periph, CAM_PRIORITY_NORMAL); - - /* - * Get rid of any pending timeouts, and set a flag to schedule new - * ones so this device gets its full time quantum. - */ - if (changer->flags & CHANGER_TIMEOUT_SCHED) { - callout_stop(&changer->long_handle); - changer->flags &= ~CHANGER_TIMEOUT_SCHED; - } - - if (changer->flags & CHANGER_SHORT_TMOUT_SCHED) { - callout_stop(&changer->short_handle); - changer->flags &= ~CHANGER_SHORT_TMOUT_SCHED; - } - - /* - * We need to schedule timeouts, but we only do this after the - * first transaction has completed. This eliminates the changer - * switch time. - */ - changer->flags |= CHANGER_NEED_TIMEOUT; -} - -static void -cdchangerschedule(struct cd_softc *softc) -{ - struct cdchanger *changer; - - changer = softc->changer; - - /* - * If this is a changer, and this is the current device, - * and this device has at least the minimum time quantum to - * run, see if we can switch it out. - */ - if ((softc->flags & CD_FLAG_ACTIVE) - && ((changer->flags & CHANGER_SHORT_TMOUT_SCHED) == 0) - && ((changer->flags & CHANGER_NEED_TIMEOUT) == 0)) { - /* - * We try three things here. The first is that we - * check to see whether the schedule on completion - * flag is set. If it is, we decrement the number - * of buffers left, and if it's zero, we reschedule. - * Next, we check to see whether the pending buffer - * queue is empty and whether there are no - * outstanding transactions. If so, we reschedule. - * Next, we see if the pending buffer queue is empty. - * If it is, we set the number of buffers left to - * the current active buffer count and set the - * schedule on complete flag. - */ - if (softc->flags & CD_FLAG_SCHED_ON_COMP) { - if (--softc->bufs_left == 0) { - softc->changer->flags |= - CHANGER_MANUAL_CALL; - softc->flags &= ~CD_FLAG_SCHED_ON_COMP; - cdrunchangerqueue(softc->changer); - } - } else if ((bioq_first(&softc->bio_queue) == NULL) - && (softc->outstanding_cmds == 0)) { - softc->changer->flags |= CHANGER_MANUAL_CALL; - cdrunchangerqueue(softc->changer); - } - } else if ((softc->changer->flags & CHANGER_NEED_TIMEOUT) - && (softc->flags & CD_FLAG_ACTIVE)) { - - /* - * Now that the first transaction to this - * particular device has completed, we can go ahead - * and schedule our timeouts. - */ - if ((changer->flags & CHANGER_TIMEOUT_SCHED) == 0) { - callout_reset(&changer->long_handle, - changer_max_busy_seconds * hz, - cdrunchangerqueue, changer); - changer->flags |= CHANGER_TIMEOUT_SCHED; - } else - printf("cdchangerschedule: already have a long" - " timeout!\n"); - - if ((changer->flags & CHANGER_SHORT_TMOUT_SCHED) == 0) { - callout_reset(&changer->short_handle, - changer_min_busy_seconds * hz, - cdshorttimeout, changer); - changer->flags |= CHANGER_SHORT_TMOUT_SCHED; - } else - printf("cdchangerschedule: already have a short " - "timeout!\n"); - - /* - * We just scheduled timeouts, no need to schedule - * more. - */ - changer->flags &= ~CHANGER_NEED_TIMEOUT; - - } -} - static int cdrunccb(union ccb *ccb, int (*error_routine)(union ccb *ccb, u_int32_t cam_flags, @@ -1414,50 +797,9 @@ cdrunccb(union ccb *ccb, int (*error_rou error = cam_periph_runccb(ccb, error_routine, cam_flags, sense_flags, softc->disk->d_devstat); - if (softc->flags & CD_FLAG_CHANGER) - cdchangerschedule(softc); - return(error); } -static union ccb * -cdgetccb(struct cam_periph *periph, u_int32_t priority) -{ - struct cd_softc *softc; - - softc = (struct cd_softc *)periph->softc; - - if (softc->flags & CD_FLAG_CHANGER) { - /* - * This should work the first time this device is woken up, - * but just in case it doesn't, we use a while loop. - */ - while ((softc->flags & CD_FLAG_ACTIVE) == 0) { - /* - * If this changer isn't already queued, queue it up. - */ - if (softc->pinfo.index == CAM_UNQUEUED_INDEX) { - softc->pinfo.priority = CAM_PRIORITY_NORMAL; - softc->pinfo.generation = - ++softc->changer->devq.generation; - camq_insert(&softc->changer->devq, - (cam_pinfo *)softc); - } - if (((softc->changer->flags & CHANGER_TIMEOUT_SCHED)==0) - && ((softc->changer->flags & CHANGER_NEED_TIMEOUT)==0) - && ((softc->changer->flags - & CHANGER_SHORT_TMOUT_SCHED)==0)) { - softc->changer->flags |= CHANGER_MANUAL_CALL; - cdrunchangerqueue(softc->changer); - } else - cam_periph_sleep(periph, &softc->changer, - PRIBIO, "cgticb", 0); - } - } - return(cam_periph_getccb(periph, priority)); -} - - /* * Actually translate the requested transfer into one the physical driver * can understand. The transfer is described by a buf and will include @@ -1505,14 +847,7 @@ cdstrategy(struct bio *bp) */ bioq_disksort(&softc->bio_queue, bp); - /* - * Schedule ourselves for performing the work. We do things - * differently for changers. - */ - if ((softc->flags & CD_FLAG_CHANGER) == 0) - xpt_schedule(periph, CAM_PRIORITY_NORMAL); - else - cdschedule(periph, CAM_PRIORITY_NORMAL); + xpt_schedule(periph, CAM_PRIORITY_NORMAL); cam_periph_unlock(periph); return; @@ -1699,9 +1034,6 @@ cddone(struct cam_periph *periph, union LIST_REMOVE(&done_ccb->ccb_h, periph_links.le); softc->outstanding_cmds--; - if (softc->flags & CD_FLAG_CHANGER) - cdchangerschedule(softc); - biofinish(bp, NULL, 0); break; } @@ -1864,8 +1196,6 @@ cddone(struct cam_periph *periph, union xpt_announce_periph(periph, announce_buf); xpt_announce_quirks(periph, softc->quirks, CD_Q_BIT_STRING); - if (softc->flags & CD_FLAG_CHANGER) - cdchangerschedule(softc); /* * Create our sysctl variables, now that we know * we have successfully attached. @@ -2841,7 +2171,7 @@ cdprevent(struct cam_periph *periph, int return; } - ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL); + ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); scsi_prevent(&ccb->csio, /*retries*/ cd_retry_count, @@ -3021,7 +2351,7 @@ cdsize(struct cam_periph *periph, u_int3 softc = (struct cd_softc *)periph->softc; - ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL); + ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); /* XXX Should be M_WAITOK */ rcap_buf = malloc(sizeof(struct scsi_read_capacity_data), @@ -3266,9 +2596,6 @@ cdmediapoll(void *arg) struct cam_periph *periph = arg; struct cd_softc *softc = periph->softc; - if (softc->flags & CD_FLAG_CHANGER) - return; - if (softc->state == CD_STATE_NORMAL && !softc->tur && softc->outstanding_cmds == 0) { if (cam_periph_acquire(periph) == CAM_REQ_CMP) { @@ -3297,7 +2624,7 @@ cdreadtoc(struct cam_periph *periph, u_i ntoc = len; error = 0; - ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL); + ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); csio = &ccb->csio; @@ -3344,7 +2671,7 @@ cdreadsubchannel(struct cam_periph *peri error = 0; - ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL); + ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); csio = &ccb->csio; @@ -3396,7 +2723,7 @@ cdgetmode(struct cam_periph *periph, str *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Wed Apr 16 10:05:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6FDCD8D3; Wed, 16 Apr 2014 10:05:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BB59173B; Wed, 16 Apr 2014 10:05:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3GA5aE0052770; Wed, 16 Apr 2014 10:05:36 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3GA5axE052769; Wed, 16 Apr 2014 10:05:36 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201404161005.s3GA5axE052769@svn.freebsd.org> From: Alexander Motin Date: Wed, 16 Apr 2014 10:05:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264523 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Apr 2014 10:05:36 -0000 Author: mav Date: Wed Apr 16 10:05:35 2014 New Revision: 264523 URL: http://svnweb.freebsd.org/changeset/base/264523 Log: MFC r264307: Fix three refcounter leaks and lock recursion they covered. Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed Apr 16 10:04:19 2014 (r264522) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed Apr 16 10:05:35 2014 (r264523) @@ -1448,6 +1448,7 @@ cfiscsi_ioctl_handoff(struct ctl_iscsi * mtx_unlock(&cfiscsi_softc.lock); snprintf(ci->error_str, sizeof(ci->error_str), "connection not found"); ci->status = CTL_ISCSI_ERROR; + cfiscsi_target_release(ct); return; } mtx_unlock(&cfiscsi_softc.lock); @@ -2086,15 +2087,9 @@ cfiscsi_target_hold(struct cfiscsi_targe static void cfiscsi_target_release(struct cfiscsi_target *ct) { - int old; struct cfiscsi_softc *softc; softc = ct->ct_softc; - - old = ct->ct_refcount; - if (old > 1 && atomic_cmpset_int(&ct->ct_refcount, old, old - 1)) - return; - mtx_lock(&softc->lock); if (refcount_release(&ct->ct_refcount)) { TAILQ_REMOVE(&softc->targets, ct, ct_next); @@ -2271,6 +2266,7 @@ cfiscsi_lun_enable(void *arg, struct ctl tmp = strtoul(lun, NULL, 10); cfiscsi_target_set_lun(ct, tmp, lun_id); + cfiscsi_target_release(ct); return (0); } @@ -2290,8 +2286,9 @@ cfiscsi_lun_disable(void *arg, struct ct continue; if (ct->ct_luns[i] != lun_id) continue; + mtx_unlock(&softc->lock); cfiscsi_target_unset_lun(ct, i); - break; + return (0); } } mtx_unlock(&softc->lock); From owner-svn-src-stable@FreeBSD.ORG Wed Apr 16 14:45:00 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60CC79C1; Wed, 16 Apr 2014 14:45:00 +0000 (UTC) Received: from smtp1.multiplay.co.uk (smtp1.multiplay.co.uk [85.236.96.35]) by mx1.freebsd.org (Postfix) with ESMTP id 5056A178A; Wed, 16 Apr 2014 14:44:59 +0000 (UTC) Received: by smtp1.multiplay.co.uk (Postfix, from userid 65534) id 8103A20E7088B; Wed, 16 Apr 2014 14:44:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.multiplay.co.uk X-Spam-Level: ** X-Spam-Status: No, score=2.3 required=8.0 tests=AWL,BAYES_00,DOS_OE_TO_MX, FSL_HELO_NON_FQDN_1,HELO_NO_DOMAIN,RDNS_DYNAMIC,STOX_REPLY_TYPE autolearn=no version=3.3.1 Received: from r2d2 (82-69-141-170.dsl.in-addr.zen.co.uk [82.69.141.170]) by smtp1.multiplay.co.uk (Postfix) with ESMTPS id 1157720E70886; Wed, 16 Apr 2014 14:44:47 +0000 (UTC) Message-ID: <0A192F0FA084413FA4840BDCE2F3CAA8@multiplay.co.uk> From: "Steven Hartland" To: "Alexander Motin" , , , , References: <201404161004.s3GA4K4u052569@svn.freebsd.org> Subject: Re: svn commit: r264522 - in stable/10: share/man/man4 sys/cam/scsi Date: Wed, 16 Apr 2014 15:44:43 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="utf-8"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Apr 2014 14:45:00 -0000 Does this need r264311 MFC'ed too mav? Regards Steve ----- Original Message ----- From: "Alexander Motin" To: ; ; ; Sent: Wednesday, April 16, 2014 11:04 AM Subject: svn commit: r264522 - in stable/10: share/man/man4 sys/cam/scsi > Author: mav > Date: Wed Apr 16 10:04:19 2014 > New Revision: 264522 > URL: http://svnweb.freebsd.org/changeset/base/264522 > > Log: > MFC r264295: > Remove support of LUN-based CD changers from cd(4) driver. > > This code was heavily broken few months ago during CAM locking changes. > Fixing it would require almost complete rewrite. Since there are no > known devices on market using this interface younger then ~15 years, and > they are CD, not even DVD, I don't see much reason to rewrite it. > > This change does not mean those devices won't work. They will just work > slower due to inefficient disks load/unload schedule if several LUNs > accessed same time. > > Modified: > stable/10/share/man/man4/cd.4 > stable/10/sys/cam/scsi/scsi_cd.c > Directory Properties: > stable/10/ (props changed) > > Modified: stable/10/share/man/man4/cd.4 > ============================================================================== > --- stable/10/share/man/man4/cd.4 Wed Apr 16 09:25:20 2014 (r264521) > +++ stable/10/share/man/man4/cd.4 Wed Apr 16 10:04:19 2014 (r264522) > @@ -25,7 +25,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd February 8, 2012 > +.Dd April 9, 2014 > .Dt CD 4 > .Os > .Sh NAME > @@ -33,8 +33,6 @@ > .Nd SCSI CD-ROM driver > .Sh SYNOPSIS > .Cd device cd > -.Cd "options ""CHANGER_MIN_BUSY_SECONDS=3""" > -.Cd "options ""CHANGER_MAX_BUSY_SECONDS=11""" > .Sh DESCRIPTION > The > .Nm > @@ -288,65 +286,6 @@ Some work is planned to support > some of the more common `broken' > .Tn CD-ROM > drives; however, this is not yet under way. > -.Sh CHANGER OPERATION > -This driver has built-in support for LUN-based CD changers. > -A LUN-based CD > -changer is a drive that can hold two or more CDs, but only has one CD > -player mechanism. > -Each CD in the drive shows up as a separate logical unit > -on the > -.Tn SCSI > -bus. > -The > -.Nm > -driver automatically recognizes LUN-based changers, and routes commands for > -changers through an internal scheduler. > -The scheduler prevents changer > -"thrashing", which is caused by sending commands to different LUNs in the > -changer at the same time. > -.Pp > -The scheduler honors minimum and maximum time > -quanta that the driver will spend on a particular LUN. > -The minimum time > -is the guaranteed minimum amount of time that the driver will spend on a > -given LUN, even if there is no outstanding I/O for that LUN. > -The maximum > -time is the maximum amount of time the changer will spend on a LUN if there > -is outstanding I/O for another LUN. > -If there is no outstanding I/O for > -another LUN, the driver will allow indefinite access to a given LUN. > -.Pp > -The minimum and maximum time quanta are configurable via kernel options and > -also via sysctl and kernel tunable variables. > -The kernel options are: > -.Pp > -.Bl -item -compact > -.It > -.Cd "options ""CHANGER_MIN_BUSY_SECONDS=3""" > -.It > -.Cd "options ""CHANGER_MAX_BUSY_SECONDS=11""" > -.El > -.Pp > -The sysctl/kernel tunable variables are: > -.Pp > -.Bl -item -compact > -.It > -.Va kern.cam.cd.changer.min_busy_seconds > -.It > -.Va kern.cam.cd.changer.max_busy_seconds > -.El > -.Pp > -It is suggested that the user try experimenting with the minimum and > -maximum timeouts via the sysctl variables to arrive at the proper values > -for your changer. > -Once you have settled on the proper timeouts for your > -changer, you can then put them in your kernel config file. > -.Pp > -If your system does have a LUN-based changer, you may notice that the > -probe messages for the various LUNs of the changer will continue to appear > -while the boot process is going on. > -This is normal, and is caused by the > -changer scheduling code. > .Sh SYSCTL VARIABLES > The following variables are available as both > .Xr sysctl 8 > @@ -397,12 +336,6 @@ Valid minimum command sizes > are 6 and 10. > Any value above 6 will be rounded to 10, and any value below > 6 will be rounded to 6. > -.It kern.cam.cd.changer.min_busy_seconds > -.It kern.cam.cd.changer.max_busy_seconds > -.Pp > -Tune how long individual LUNs are 'locked' for I/O operations to > -optimize changer operation. > -See CHANGER OPERATION section for information on how to use these items. > .El > .Sh FILES > .Bl -tag -width /dev/cd[0-9][a-h] -compact > @@ -437,21 +370,3 @@ were poorly chosen, and a number of spel > the names of the > .Fn ioctl > commands. > -.Pp > -There is no mechanism currently to set different minimum and maximum > -timeouts for different CD changers; the timeout values set by the kernel > -options or the sysctl variables apply to all LUN-based CD changers in the > -system. > -It is possible to implement such support, but the sysctl > -implementation at least would be rather inelegant, because of the current > -inability of the sysctl code to handle the addition of nodes after compile > -time. > -Thus, it would take one dynamically sized sysctl variable and a > -userland utility to get/set the timeout values. > -Implementation of separate > -timeouts for different CD devices in the kernel config file would likely > -require modification of > -.Xr config 8 > -to support the two timeouts when hardwiring > -.Nm > -devices. > > Modified: stable/10/sys/cam/scsi/scsi_cd.c > ============================================================================== > --- stable/10/sys/cam/scsi/scsi_cd.c Wed Apr 16 09:25:20 2014 (r264521) > +++ stable/10/sys/cam/scsi/scsi_cd.c Wed Apr 16 10:04:19 2014 (r264522) > @@ -87,8 +87,6 @@ typedef enum { > CD_Q_NONE = 0x00, > CD_Q_NO_TOUCH = 0x01, > CD_Q_BCD_TRACKS = 0x02, > - CD_Q_NO_CHANGER = 0x04, > - CD_Q_CHANGER = 0x08, > CD_Q_10_BYTE_ONLY = 0x10 > } cd_quirks; > > @@ -96,8 +94,6 @@ typedef enum { > "\020" \ > "\001NO_TOUCH" \ > "\002BCD_TRACKS" \ > - "\003NO_CHANGER" \ > - "\004CHANGER" \ > "\00510_BYTE_ONLY" > > typedef enum { > @@ -106,7 +102,6 @@ typedef enum { > CD_FLAG_DISC_LOCKED = 0x0004, > CD_FLAG_DISC_REMOVABLE = 0x0008, > CD_FLAG_SAW_MEDIA = 0x0010, > - CD_FLAG_CHANGER = 0x0040, > CD_FLAG_ACTIVE = 0x0080, > CD_FLAG_SCHED_ON_COMP = 0x0100, > CD_FLAG_RETRY_UA = 0x0200, > @@ -123,13 +118,6 @@ typedef enum { > CD_CCB_RETRY_UA = 0x10 > } cd_ccb_state; > > -typedef enum { > - CHANGER_TIMEOUT_SCHED = 0x01, > - CHANGER_SHORT_TMOUT_SCHED = 0x02, > - CHANGER_MANUAL_CALL = 0x04, > - CHANGER_NEED_TIMEOUT = 0x08 > -} cd_changer_flags; > - > #define ccb_state ppriv_field0 > #define ccb_bp ppriv_ptr1 > > @@ -157,9 +145,6 @@ struct cd_softc { > struct cd_params params; > union ccb saved_ccb; > cd_quirks quirks; > - STAILQ_ENTRY(cd_softc) changer_links; > - struct cdchanger *changer; > - int bufs_left; > struct cam_periph *periph; > int minimum_command_size; > int outstanding_cmds; > @@ -189,13 +174,6 @@ struct cd_quirk_entry { > }; > > /* > - * The changer quirk entries aren't strictly necessary. Basically, what > - * they do is tell cdregister() up front that a device is a changer. > - * Otherwise, it will figure that fact out once it sees a LUN on the device > - * that is greater than 0. If it is known up front that a device is a changer, > - * all I/O to the device will go through the changer scheduling routines, as > - * opposed to the "normal" CD code. > - * > * NOTE ON 10_BYTE_ONLY quirks: Any 10_BYTE_ONLY quirks MUST be because > * your device hangs when it gets a 10 byte command. Adding a quirk just > * to get rid of the informative diagnostic message is not acceptable. All > @@ -209,18 +187,6 @@ struct cd_quirk_entry { > static struct cd_quirk_entry cd_quirk_table[] = > { > { > - { T_CDROM, SIP_MEDIA_REMOVABLE, "NRC", "MBR-7", "*"}, > - /*quirks*/ CD_Q_CHANGER > - }, > - { > - { T_CDROM, SIP_MEDIA_REMOVABLE, "PIONEER", "CD-ROM DRM*", > - "*"}, /* quirks */ CD_Q_CHANGER > - }, > - { > - { T_CDROM, SIP_MEDIA_REMOVABLE, "NAKAMICH", "MJ-*", "*"}, > - /* quirks */ CD_Q_CHANGER > - }, > - { > { T_CDROM, SIP_MEDIA_REMOVABLE, "CHINON", "CD-ROM CDS-535","*"}, > /* quirks */ CD_Q_BCD_TRACKS > } > @@ -241,15 +207,11 @@ static void cdasync(void *callback_arg, > static int cdcmdsizesysctl(SYSCTL_HANDLER_ARGS); > static void cdshorttimeout(void *arg); > static void cdschedule(struct cam_periph *periph, int priority); > -static void cdrunchangerqueue(void *arg); > -static void cdchangerschedule(struct cd_softc *softc); > static int cdrunccb(union ccb *ccb, > int (*error_routine)(union ccb *ccb, > u_int32_t cam_flags, > u_int32_t sense_flags), > u_int32_t cam_flags, u_int32_t sense_flags); > -static union ccb *cdgetccb(struct cam_periph *periph, > - u_int32_t priority); > static void cddone(struct cam_periph *periph, > union ccb *start_ccb); > static union cd_pages *cdgetpage(struct cd_mode_params *mode_params); > @@ -311,22 +273,12 @@ PERIPHDRIVER_DECLARE(cd, cddriver); > #ifndef CD_DEFAULT_TIMEOUT > #define CD_DEFAULT_TIMEOUT 30000 > #endif > -#ifndef CHANGER_MIN_BUSY_SECONDS > -#define CHANGER_MIN_BUSY_SECONDS 5 > -#endif > -#ifndef CHANGER_MAX_BUSY_SECONDS > -#define CHANGER_MAX_BUSY_SECONDS 15 > -#endif > > static int cd_poll_period = CD_DEFAULT_POLL_PERIOD; > static int cd_retry_count = CD_DEFAULT_RETRY; > static int cd_timeout = CD_DEFAULT_TIMEOUT; > -static int changer_min_busy_seconds = CHANGER_MIN_BUSY_SECONDS; > -static int changer_max_busy_seconds = CHANGER_MAX_BUSY_SECONDS; > > static SYSCTL_NODE(_kern_cam, OID_AUTO, cd, CTLFLAG_RD, 0, "CAM CDROM driver"); > -static SYSCTL_NODE(_kern_cam_cd, OID_AUTO, changer, CTLFLAG_RD, 0, > - "CD Changer"); > SYSCTL_INT(_kern_cam_cd, OID_AUTO, poll_period, CTLFLAG_RW, > &cd_poll_period, 0, "Media polling period in seconds"); > TUNABLE_INT("kern.cam.cd.poll_period", &cd_poll_period); > @@ -336,30 +288,6 @@ TUNABLE_INT("kern.cam.cd.retry_count", & > SYSCTL_INT(_kern_cam_cd, OID_AUTO, timeout, CTLFLAG_RW, > &cd_timeout, 0, "Timeout, in us, for read operations"); > TUNABLE_INT("kern.cam.cd.timeout", &cd_timeout); > -SYSCTL_INT(_kern_cam_cd_changer, OID_AUTO, min_busy_seconds, CTLFLAG_RW, > - &changer_min_busy_seconds, 0, "Minimum changer scheduling quantum"); > -TUNABLE_INT("kern.cam.cd.changer.min_busy_seconds", &changer_min_busy_seconds); > -SYSCTL_INT(_kern_cam_cd_changer, OID_AUTO, max_busy_seconds, CTLFLAG_RW, > - &changer_max_busy_seconds, 0, "Maximum changer scheduling quantum"); > -TUNABLE_INT("kern.cam.cd.changer.max_busy_seconds", &changer_max_busy_seconds); > - > -struct cdchanger { > - path_id_t path_id; > - target_id_t target_id; > - int num_devices; > - struct camq devq; > - struct timeval start_time; > - struct cd_softc *cur_device; > - struct callout short_handle; > - struct callout long_handle; > - volatile cd_changer_flags flags; > - STAILQ_ENTRY(cdchanger) changer_links; > - STAILQ_HEAD(chdevlist, cd_softc) chluns; > -}; > - > -static struct mtx changerq_mtx; > -static STAILQ_HEAD(changerlist, cdchanger) changerq; > -static int num_changers; > > static MALLOC_DEFINE(M_SCSICD, "scsi_cd", "scsi_cd buffers"); > > @@ -368,9 +296,6 @@ cdinit(void) > { > cam_status status; > > - mtx_init(&changerq_mtx, "cdchangerq", "SCSI CD Changer List", MTX_DEF); > - STAILQ_INIT(&changerq); > - > /* > * Install a global async callback. This callback will > * receive async callbacks like "new device found". > @@ -417,15 +342,6 @@ cdoninvalidate(struct cam_periph *periph > */ > bioq_flush(&softc->bio_queue, NULL, ENXIO); > > - /* > - * If this device is part of a changer, and it was scheduled > - * to run, remove it from the run queue since we just nuked > - * all of its scheduled I/O. > - */ > - if ((softc->flags & CD_FLAG_CHANGER) > - && (softc->pinfo.index != CAM_UNQUEUED_INDEX)) > - camq_remove(&softc->changer->devq, softc->pinfo.index); > - > disk_gone(softc->disk); > } > > @@ -436,73 +352,6 @@ cdcleanup(struct cam_periph *periph) > > softc = (struct cd_softc *)periph->softc; > > - /* > - * In the queued, non-active case, the device in question > - * has already been removed from the changer run queue. Since this > - * device is active, we need to de-activate it, and schedule > - * another device to run. (if there is another one to run) > - */ > - if ((softc->flags & CD_FLAG_CHANGER) > - && (softc->flags & CD_FLAG_ACTIVE)) { > - > - /* > - * The purpose of the short timeout is soley to determine > - * whether the current device has finished or not. Well, > - * since we're removing the active device, we know that it > - * is finished. So, get rid of the short timeout. > - * Otherwise, if we're in the time period before the short > - * timeout fires, and there are no other devices in the > - * queue to run, there won't be any other device put in the > - * active slot. i.e., when we call cdrunchangerqueue() > - * below, it won't do anything. Then, when the short > - * timeout fires, it'll look at the "current device", which > - * we are free below, and possibly panic the kernel on a > - * bogus pointer reference. > - * > - * The long timeout doesn't really matter, since we > - * decrement the qfrozen_cnt to indicate that there is > - * nothing in the active slot now. Therefore, there won't > - * be any bogus pointer references there. > - */ > - if (softc->changer->flags & CHANGER_SHORT_TMOUT_SCHED) { > - callout_stop(&softc->changer->short_handle); > - softc->changer->flags &= ~CHANGER_SHORT_TMOUT_SCHED; > - } > - softc->changer->devq.qfrozen_cnt--; > - softc->changer->flags |= CHANGER_MANUAL_CALL; > - cdrunchangerqueue(softc->changer); > - } > - > - /* > - * If we're removing the last device on the changer, go ahead and > - * remove the changer device structure. > - */ > - if ((softc->flags & CD_FLAG_CHANGER) > - && (--softc->changer->num_devices == 0)) { > - > - /* > - * Theoretically, there shouldn't be any timeouts left, but > - * I'm not completely sure that that will be the case. So, > - * it won't hurt to check and see if there are any left. > - */ > - if (softc->changer->flags & CHANGER_TIMEOUT_SCHED) { > - callout_stop(&softc->changer->long_handle); > - softc->changer->flags &= ~CHANGER_TIMEOUT_SCHED; > - } > - > - if (softc->changer->flags & CHANGER_SHORT_TMOUT_SCHED) { > - callout_stop(&softc->changer->short_handle); > - softc->changer->flags &= ~CHANGER_SHORT_TMOUT_SCHED; > - } > - > - mtx_lock(&changerq_mtx); > - STAILQ_REMOVE(&changerq, softc->changer, cdchanger, > - changer_links); > - num_changers--; > - mtx_unlock(&changerq_mtx); > - xpt_print(periph->path, "removing changer entry\n"); > - free(softc->changer, M_DEVBUF); > - } > cam_periph_unlock(periph); > if ((softc->flags & CD_FLAG_SCTX_INIT) != 0 > && sysctl_ctx_free(&softc->sysctl_ctx) != 0) { > @@ -834,237 +683,16 @@ cdregister(struct cam_periph *periph, vo > AC_SCSI_AEN | AC_UNIT_ATTENTION, cdasync, periph, periph->path); > > /* > - * If the target lun is greater than 0, we most likely have a CD > - * changer device. Check the quirk entries as well, though, just > - * in case someone has a CD tower with one lun per drive or > - * something like that. Also, if we know up front that a > - * particular device is a changer, we can mark it as such starting > - * with lun 0, instead of lun 1. It shouldn't be necessary to have > - * a quirk entry to define something as a changer, however. > - */ > - if (((cgd->ccb_h.target_lun > 0) > - && ((softc->quirks & CD_Q_NO_CHANGER) == 0)) > - || ((softc->quirks & CD_Q_CHANGER) != 0)) { > - struct cdchanger *nchanger; > - struct cam_periph *nperiph; > - struct cam_path *path; > - cam_status status; > - int found; > - > - /* Set the changer flag in the current device's softc */ > - softc->flags |= CD_FLAG_CHANGER; > - > - /* > - * Now, look around for an existing changer device with the > - * same path and target ID as the current device. > - */ > - mtx_lock(&changerq_mtx); > - for (found = 0, > - nchanger = (struct cdchanger *)STAILQ_FIRST(&changerq); > - nchanger != NULL; > - nchanger = STAILQ_NEXT(nchanger, changer_links)){ > - if ((nchanger->path_id == cgd->ccb_h.path_id) > - && (nchanger->target_id == cgd->ccb_h.target_id)) { > - found = 1; > - break; > - } > - } > - mtx_unlock(&changerq_mtx); > - > - /* > - * If we found a matching entry, just add this device to > - * the list of devices on this changer. > - */ > - if (found == 1) { > - struct chdevlist *chlunhead; > - > - chlunhead = &nchanger->chluns; > - > - /* > - * XXX KDM look at consolidating this code with the > - * code below in a separate function. > - */ > - > - /* > - * Create a path with lun id 0, and see if we can > - * find a matching device > - */ > - status = xpt_create_path(&path, /*periph*/ periph, > - cgd->ccb_h.path_id, > - cgd->ccb_h.target_id, 0); > - > - if ((status == CAM_REQ_CMP) > - && ((nperiph = cam_periph_find(path, "cd")) != NULL)){ > - struct cd_softc *nsoftc; > - > - nsoftc = (struct cd_softc *)nperiph->softc; > - > - if ((nsoftc->flags & CD_FLAG_CHANGER) == 0){ > - nsoftc->flags |= CD_FLAG_CHANGER; > - nchanger->num_devices++; > - if (camq_resize(&nchanger->devq, > - nchanger->num_devices)!=CAM_REQ_CMP){ > - printf("cdregister: " > - "camq_resize " > - "failed, changer " > - "support may " > - "be messed up\n"); > - } > - nsoftc->changer = nchanger; > - nsoftc->pinfo.index =CAM_UNQUEUED_INDEX; > - > - STAILQ_INSERT_TAIL(&nchanger->chluns, > - nsoftc,changer_links); > - } > - xpt_free_path(path); > - } else if (status == CAM_REQ_CMP) > - xpt_free_path(path); > - else { > - printf("cdregister: unable to allocate path\n" > - "cdregister: changer support may be " > - "broken\n"); > - } > - > - nchanger->num_devices++; > - > - softc->changer = nchanger; > - softc->pinfo.index = CAM_UNQUEUED_INDEX; > - > - if (camq_resize(&nchanger->devq, > - nchanger->num_devices) != CAM_REQ_CMP) { > - printf("cdregister: camq_resize " > - "failed, changer support may " > - "be messed up\n"); > - } > - > - STAILQ_INSERT_TAIL(chlunhead, softc, changer_links); > - } > - /* > - * In this case, we don't already have an entry for this > - * particular changer, so we need to create one, add it to > - * the queue, and queue this device on the list for this > - * changer. Before we queue this device, however, we need > - * to search for lun id 0 on this target, and add it to the > - * queue first, if it exists. (and if it hasn't already > - * been marked as part of the changer.) > - */ > - else { > - nchanger = malloc(sizeof(struct cdchanger), > - M_DEVBUF, M_NOWAIT | M_ZERO); > - if (nchanger == NULL) { > - softc->flags &= ~CD_FLAG_CHANGER; > - printf("cdregister: unable to malloc " > - "changer structure\ncdregister: " > - "changer support disabled\n"); > - > - /* > - * Yes, gotos can be gross but in this case > - * I think it's justified.. > - */ > - goto cdregisterexit; > - } > - if (camq_init(&nchanger->devq, 1) != 0) { > - softc->flags &= ~CD_FLAG_CHANGER; > - printf("cdregister: changer support " > - "disabled\n"); > - goto cdregisterexit; > - } > - > - nchanger->path_id = cgd->ccb_h.path_id; > - nchanger->target_id = cgd->ccb_h.target_id; > - > - /* this is superfluous, but it makes things clearer */ > - nchanger->num_devices = 0; > - > - STAILQ_INIT(&nchanger->chluns); > - > - callout_init_mtx(&nchanger->long_handle, > - cam_periph_mtx(periph), 0); > - callout_init_mtx(&nchanger->short_handle, > - cam_periph_mtx(periph), 0); > - > - mtx_lock(&changerq_mtx); > - num_changers++; > - STAILQ_INSERT_TAIL(&changerq, nchanger, > - changer_links); > - mtx_unlock(&changerq_mtx); > - > - /* > - * Create a path with lun id 0, and see if we can > - * find a matching device > - */ > - status = xpt_create_path(&path, /*periph*/ periph, > - cgd->ccb_h.path_id, > - cgd->ccb_h.target_id, 0); > - > - /* > - * If we were able to allocate the path, and if we > - * find a matching device and it isn't already > - * marked as part of a changer, then we add it to > - * the current changer. > - */ > - if ((status == CAM_REQ_CMP) > - && ((nperiph = cam_periph_find(path, "cd")) != NULL) > - && ((((struct cd_softc *)periph->softc)->flags & > - CD_FLAG_CHANGER) == 0)) { > - struct cd_softc *nsoftc; > - > - nsoftc = (struct cd_softc *)nperiph->softc; > - > - nsoftc->flags |= CD_FLAG_CHANGER; > - nchanger->num_devices++; > - if (camq_resize(&nchanger->devq, > - nchanger->num_devices) != CAM_REQ_CMP) { > - printf("cdregister: camq_resize " > - "failed, changer support may " > - "be messed up\n"); > - } > - nsoftc->changer = nchanger; > - nsoftc->pinfo.index = CAM_UNQUEUED_INDEX; > - > - STAILQ_INSERT_TAIL(&nchanger->chluns, > - nsoftc, changer_links); > - xpt_free_path(path); > - } else if (status == CAM_REQ_CMP) > - xpt_free_path(path); > - else { > - printf("cdregister: unable to allocate path\n" > - "cdregister: changer support may be " > - "broken\n"); > - } > - > - softc->changer = nchanger; > - softc->pinfo.index = CAM_UNQUEUED_INDEX; > - nchanger->num_devices++; > - if (camq_resize(&nchanger->devq, > - nchanger->num_devices) != CAM_REQ_CMP) { > - printf("cdregister: camq_resize " > - "failed, changer support may " > - "be messed up\n"); > - } > - STAILQ_INSERT_TAIL(&nchanger->chluns, softc, > - changer_links); > - } > - } > - > - /* > * Schedule a periodic media polling events. > */ > callout_init_mtx(&softc->mediapoll_c, cam_periph_mtx(periph), 0); > if ((softc->flags & CD_FLAG_DISC_REMOVABLE) && > - (softc->flags & CD_FLAG_CHANGER) == 0 && > (cgd->inq_flags & SID_AEN) == 0 && > cd_poll_period != 0) > callout_reset(&softc->mediapoll_c, cd_poll_period * hz, > cdmediapoll, periph); > > -cdregisterexit: > - > - if ((softc->flags & CD_FLAG_CHANGER) == 0) > - xpt_schedule(periph, CAM_PRIORITY_DEV); > - else > - cdschedule(periph, CAM_PRIORITY_DEV); > - > + xpt_schedule(periph, CAM_PRIORITY_DEV); > return(CAM_REQ_CMP); > } > > @@ -1153,251 +781,6 @@ cdclose(struct disk *dp) > return (0); > } > > -static void > -cdshorttimeout(void *arg) > -{ > - struct cdchanger *changer; > - > - changer = (struct cdchanger *)arg; > - > - /* Always clear the short timeout flag, since that's what we're in */ > - changer->flags &= ~CHANGER_SHORT_TMOUT_SCHED; > - > - /* > - * Check to see if there is any more pending or outstanding I/O for > - * this device. If not, move it out of the active slot. > - */ > - if ((bioq_first(&changer->cur_device->bio_queue) == NULL) > - && (changer->cur_device->outstanding_cmds == 0)) { > - changer->flags |= CHANGER_MANUAL_CALL; > - cdrunchangerqueue(changer); > - } > -} > - > -/* > - * This is a wrapper for xpt_schedule. It only applies to changers. > - */ > -static void > -cdschedule(struct cam_periph *periph, int priority) > -{ > - struct cd_softc *softc; > - > - softc = (struct cd_softc *)periph->softc; > - > - /* > - * If this device isn't currently queued, and if it isn't > - * the active device, then we queue this device and run the > - * changer queue if there is no timeout scheduled to do it. > - * If this device is the active device, just schedule it > - * to run again. If this device is queued, there should be > - * a timeout in place already that will make sure it runs. > - */ > - if ((softc->pinfo.index == CAM_UNQUEUED_INDEX) > - && ((softc->flags & CD_FLAG_ACTIVE) == 0)) { > - /* > - * We don't do anything with the priority here. > - * This is strictly a fifo queue. > - */ > - softc->pinfo.priority = CAM_PRIORITY_NORMAL; > - softc->pinfo.generation = ++softc->changer->devq.generation; > - camq_insert(&softc->changer->devq, (cam_pinfo *)softc); > - > - /* > - * Since we just put a device in the changer queue, > - * check and see if there is a timeout scheduled for > - * this changer. If so, let the timeout handle > - * switching this device into the active slot. If > - * not, manually call the timeout routine to > - * bootstrap things. > - */ > - if (((softc->changer->flags & CHANGER_TIMEOUT_SCHED)==0) > - && ((softc->changer->flags & CHANGER_NEED_TIMEOUT)==0) > - && ((softc->changer->flags & CHANGER_SHORT_TMOUT_SCHED)==0)){ > - softc->changer->flags |= CHANGER_MANUAL_CALL; > - cdrunchangerqueue(softc->changer); > - } > - } else if ((softc->flags & CD_FLAG_ACTIVE) > - && ((softc->flags & CD_FLAG_SCHED_ON_COMP) == 0)) > - xpt_schedule(periph, priority); > -} > - > -static void > -cdrunchangerqueue(void *arg) > -{ > - struct cd_softc *softc; > - struct cdchanger *changer; > - int called_from_timeout; > - > - changer = (struct cdchanger *)arg; > - > - /* > - * If we have NOT been called from cdstrategy() or cddone(), and > - * instead from a timeout routine, go ahead and clear the > - * timeout flag. > - */ > - if ((changer->flags & CHANGER_MANUAL_CALL) == 0) { > - changer->flags &= ~CHANGER_TIMEOUT_SCHED; > - called_from_timeout = 1; > - } else > - called_from_timeout = 0; > - > - /* Always clear the manual call flag */ > - changer->flags &= ~CHANGER_MANUAL_CALL; > - > - /* nothing to do if the queue is empty */ > - if (changer->devq.entries <= 0) { > - return; > - } > - > - /* > - * If the changer queue is frozen, that means we have an active > - * device. > - */ > - if (changer->devq.qfrozen_cnt > 0) { > - > - /* > - * We always need to reset the frozen count and clear the > - * active flag. > - */ > - changer->devq.qfrozen_cnt--; > - changer->cur_device->flags &= ~CD_FLAG_ACTIVE; > - changer->cur_device->flags &= ~CD_FLAG_SCHED_ON_COMP; > - > - if (changer->cur_device->outstanding_cmds > 0) { > - changer->cur_device->flags |= CD_FLAG_SCHED_ON_COMP; > - changer->cur_device->bufs_left = > - changer->cur_device->outstanding_cmds; > - if (called_from_timeout) { > - callout_reset(&changer->long_handle, > - changer_max_busy_seconds * hz, > - cdrunchangerqueue, changer); > - changer->flags |= CHANGER_TIMEOUT_SCHED; > - } > - return; > - } > - > - /* > - * Check to see whether the current device has any I/O left > - * to do. If so, requeue it at the end of the queue. If > - * not, there is no need to requeue it. > - */ > - if (bioq_first(&changer->cur_device->bio_queue) != NULL) { > - > - changer->cur_device->pinfo.generation = > - ++changer->devq.generation; > - camq_insert(&changer->devq, > - (cam_pinfo *)changer->cur_device); > - } > - } > - > - softc = (struct cd_softc *)camq_remove(&changer->devq, CAMQ_HEAD); > - > - changer->cur_device = softc; > - > - changer->devq.qfrozen_cnt++; > - softc->flags |= CD_FLAG_ACTIVE; > - > - /* Just in case this device is waiting */ > - wakeup(&softc->changer); > - xpt_schedule(softc->periph, CAM_PRIORITY_NORMAL); > - > - /* > - * Get rid of any pending timeouts, and set a flag to schedule new > - * ones so this device gets its full time quantum. > - */ > - if (changer->flags & CHANGER_TIMEOUT_SCHED) { > - callout_stop(&changer->long_handle); > - changer->flags &= ~CHANGER_TIMEOUT_SCHED; > - } > - > - if (changer->flags & CHANGER_SHORT_TMOUT_SCHED) { > - callout_stop(&changer->short_handle); > - changer->flags &= ~CHANGER_SHORT_TMOUT_SCHED; > - } > - > - /* > - * We need to schedule timeouts, but we only do this after the > - * first transaction has completed. This eliminates the changer > - * switch time. > - */ > - changer->flags |= CHANGER_NEED_TIMEOUT; > -} > - > -static void > -cdchangerschedule(struct cd_softc *softc) > -{ > - struct cdchanger *changer; > - > - changer = softc->changer; > - > - /* > - * If this is a changer, and this is the current device, > - * and this device has at least the minimum time quantum to > - * run, see if we can switch it out. > - */ > - if ((softc->flags & CD_FLAG_ACTIVE) > - && ((changer->flags & CHANGER_SHORT_TMOUT_SCHED) == 0) > - && ((changer->flags & CHANGER_NEED_TIMEOUT) == 0)) { > - /* > - * We try three things here. The first is that we > - * check to see whether the schedule on completion > - * flag is set. If it is, we decrement the number > - * of buffers left, and if it's zero, we reschedule. > - * Next, we check to see whether the pending buffer > - * queue is empty and whether there are no > - * outstanding transactions. If so, we reschedule. > - * Next, we see if the pending buffer queue is empty. > - * If it is, we set the number of buffers left to > - * the current active buffer count and set the > - * schedule on complete flag. > - */ > - if (softc->flags & CD_FLAG_SCHED_ON_COMP) { > - if (--softc->bufs_left == 0) { > - softc->changer->flags |= > - CHANGER_MANUAL_CALL; > - softc->flags &= ~CD_FLAG_SCHED_ON_COMP; > - cdrunchangerqueue(softc->changer); > - } > - } else if ((bioq_first(&softc->bio_queue) == NULL) > - && (softc->outstanding_cmds == 0)) { > - softc->changer->flags |= CHANGER_MANUAL_CALL; > - cdrunchangerqueue(softc->changer); > - } > - } else if ((softc->changer->flags & CHANGER_NEED_TIMEOUT) > - && (softc->flags & CD_FLAG_ACTIVE)) { > - > - /* > - * Now that the first transaction to this > - * particular device has completed, we can go ahead > - * and schedule our timeouts. > - */ > - if ((changer->flags & CHANGER_TIMEOUT_SCHED) == 0) { > - callout_reset(&changer->long_handle, > - changer_max_busy_seconds * hz, > - cdrunchangerqueue, changer); > - changer->flags |= CHANGER_TIMEOUT_SCHED; > - } else > - printf("cdchangerschedule: already have a long" > - " timeout!\n"); > - > - if ((changer->flags & CHANGER_SHORT_TMOUT_SCHED) == 0) { > - callout_reset(&changer->short_handle, > - changer_min_busy_seconds * hz, > - cdshorttimeout, changer); > - changer->flags |= CHANGER_SHORT_TMOUT_SCHED; > - } else > - printf("cdchangerschedule: already have a short " > - "timeout!\n"); > - > - /* > - * We just scheduled timeouts, no need to schedule > - * more. > - */ > - changer->flags &= ~CHANGER_NEED_TIMEOUT; > - > - } > -} > - > static int > cdrunccb(union ccb *ccb, int (*error_routine)(union ccb *ccb, > u_int32_t cam_flags, > @@ -1414,50 +797,9 @@ cdrunccb(union ccb *ccb, int (*error_rou > error = cam_periph_runccb(ccb, error_routine, cam_flags, sense_flags, > softc->disk->d_devstat); > > - if (softc->flags & CD_FLAG_CHANGER) > - cdchangerschedule(softc); > - > return(error); > } > > -static union ccb * > -cdgetccb(struct cam_periph *periph, u_int32_t priority) > -{ > - struct cd_softc *softc; > - > - softc = (struct cd_softc *)periph->softc; > - > - if (softc->flags & CD_FLAG_CHANGER) { > - /* > - * This should work the first time this device is woken up, > - * but just in case it doesn't, we use a while loop. > - */ > - while ((softc->flags & CD_FLAG_ACTIVE) == 0) { > - /* > - * If this changer isn't already queued, queue it up. > - */ > - if (softc->pinfo.index == CAM_UNQUEUED_INDEX) { > - softc->pinfo.priority = CAM_PRIORITY_NORMAL; > - softc->pinfo.generation = > - ++softc->changer->devq.generation; > - camq_insert(&softc->changer->devq, > - (cam_pinfo *)softc); > - } > - if (((softc->changer->flags & CHANGER_TIMEOUT_SCHED)==0) > - && ((softc->changer->flags & CHANGER_NEED_TIMEOUT)==0) > - && ((softc->changer->flags > - & CHANGER_SHORT_TMOUT_SCHED)==0)) { > - softc->changer->flags |= CHANGER_MANUAL_CALL; > - cdrunchangerqueue(softc->changer); > - } else > - cam_periph_sleep(periph, &softc->changer, > - PRIBIO, "cgticb", 0); > - } > - } > - return(cam_periph_getccb(periph, priority)); > -} > - > - > /* > * Actually translate the requested transfer into one the physical driver > * can understand. The transfer is described by a buf and will include > @@ -1505,14 +847,7 @@ cdstrategy(struct bio *bp) > */ > bioq_disksort(&softc->bio_queue, bp); > > - /* > - * Schedule ourselves for performing the work. We do things > - * differently for changers. > - */ > - if ((softc->flags & CD_FLAG_CHANGER) == 0) > - xpt_schedule(periph, CAM_PRIORITY_NORMAL); > - else > - cdschedule(periph, CAM_PRIORITY_NORMAL); > + xpt_schedule(periph, CAM_PRIORITY_NORMAL); > > cam_periph_unlock(periph); > return; > @@ -1699,9 +1034,6 @@ cddone(struct cam_periph *periph, union > LIST_REMOVE(&done_ccb->ccb_h, periph_links.le); > softc->outstanding_cmds--; > > - if (softc->flags & CD_FLAG_CHANGER) > - cdchangerschedule(softc); > - > biofinish(bp, NULL, 0); > break; > } > @@ -1864,8 +1196,6 @@ cddone(struct cam_periph *periph, union > xpt_announce_periph(periph, announce_buf); > xpt_announce_quirks(periph, softc->quirks, > CD_Q_BIT_STRING); > - if (softc->flags & CD_FLAG_CHANGER) > - cdchangerschedule(softc); > /* > * Create our sysctl variables, now that we know > * we have successfully attached. > @@ -2841,7 +2171,7 @@ cdprevent(struct cam_periph *periph, int > return; > } > > - ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL); > + ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); > > scsi_prevent(&ccb->csio, > /*retries*/ cd_retry_count, > @@ -3021,7 +2351,7 @@ cdsize(struct cam_periph *periph, u_int3 > > softc = (struct cd_softc *)periph->softc; > > - ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL); > + ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); > > /* XXX Should be M_WAITOK */ > rcap_buf = malloc(sizeof(struct scsi_read_capacity_data), > @@ -3266,9 +2596,6 @@ cdmediapoll(void *arg) > struct cam_periph *periph = arg; > struct cd_softc *softc = periph->softc; > > - if (softc->flags & CD_FLAG_CHANGER) > - return; > - > if (softc->state == CD_STATE_NORMAL && !softc->tur && > softc->outstanding_cmds == 0) { > if (cam_periph_acquire(periph) == CAM_REQ_CMP) { > @@ -3297,7 +2624,7 @@ cdreadtoc(struct cam_periph *periph, u_i > ntoc = len; > error = 0; > > - ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL); > + ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); > > csio = &ccb->csio; > > @@ -3344,7 +2671,7 @@ cdreadsubchannel(struct cam_periph *peri > > error = 0; > > - ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL); > + ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); > > csio = &ccb->csio; > > @@ -3396,7 +2723,7 @@ cdgetmode(struct cam_periph *periph, str > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > > From owner-svn-src-stable@FreeBSD.ORG Wed Apr 16 15:27:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B7D393A; Wed, 16 Apr 2014 15:27:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47C691B65; Wed, 16 Apr 2014 15:27:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3GFRFSg084817; Wed, 16 Apr 2014 15:27:15 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3GFRFEt084816; Wed, 16 Apr 2014 15:27:15 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201404161527.s3GFRFEt084816@svn.freebsd.org> From: Alexander Motin Date: Wed, 16 Apr 2014 15:27:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264541 - stable/10/sys/cam/scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Apr 2014 15:27:15 -0000 Author: mav Date: Wed Apr 16 15:27:14 2014 New Revision: 264541 URL: http://svnweb.freebsd.org/changeset/base/264541 Log: MFC r264311 (by smh): Fix build breakage caused by r264295 Modified: stable/10/sys/cam/scsi/scsi_cd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_cd.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_cd.c Wed Apr 16 14:37:11 2014 (r264540) +++ stable/10/sys/cam/scsi/scsi_cd.c Wed Apr 16 15:27:14 2014 (r264541) @@ -205,8 +205,6 @@ static periph_oninv_t cdoninvalidate; static void cdasync(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg); static int cdcmdsizesysctl(SYSCTL_HANDLER_ARGS); -static void cdshorttimeout(void *arg); -static void cdschedule(struct cam_periph *periph, int priority); static int cdrunccb(union ccb *ccb, int (*error_routine)(union ccb *ccb, u_int32_t cam_flags, From owner-svn-src-stable@FreeBSD.ORG Wed Apr 16 17:57:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 925FA45E; Wed, 16 Apr 2014 17:57:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7EA9D1CAE; Wed, 16 Apr 2014 17:57:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3GHv9jX046859; Wed, 16 Apr 2014 17:57:09 GMT (envelope-from emax@svn.freebsd.org) Received: (from emax@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3GHv9Bf046858; Wed, 16 Apr 2014 17:57:09 GMT (envelope-from emax@svn.freebsd.org) Message-Id: <201404161757.s3GHv9Bf046858@svn.freebsd.org> From: Maksim Yevmenkin Date: Wed, 16 Apr 2014 17:57:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264546 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Apr 2014 17:57:09 -0000 Author: emax Date: Wed Apr 16 17:57:08 2014 New Revision: 264546 URL: http://svnweb.freebsd.org/changeset/base/264546 Log: MFC r263690 change defaule permissions on /dev/devstat. while i'm here remove D_NEEDGIANT flag Submitted by: jhb Reviewed by: jhb, scottl, rwatson, delphij, phk Modified: stable/10/sys/kern/subr_devstat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/subr_devstat.c ============================================================================== --- stable/10/sys/kern/subr_devstat.c Wed Apr 16 17:39:59 2014 (r264545) +++ stable/10/sys/kern/subr_devstat.c Wed Apr 16 17:57:08 2014 (r264546) @@ -462,7 +462,6 @@ static d_mmap_t devstat_mmap; static struct cdevsw devstat_cdevsw = { .d_version = D_VERSION, - .d_flags = D_NEEDGIANT, .d_mmap = devstat_mmap, .d_name = "devstat", }; @@ -484,13 +483,16 @@ devstat_mmap(struct cdev *dev, vm_ooffse if (nprot != VM_PROT_READ) return (-1); + mtx_lock(&devstat_mutex); TAILQ_FOREACH(spp, &pagelist, list) { if (offset == 0) { *paddr = vtophys(spp->stat); + mtx_unlock(&devstat_mutex); return (0); } offset -= PAGE_SIZE; } + mtx_unlock(&devstat_mutex); return (-1); } @@ -505,7 +507,7 @@ devstat_alloc(void) mtx_assert(&devstat_mutex, MA_NOTOWNED); if (!once) { make_dev_credf(MAKEDEV_ETERNAL | MAKEDEV_CHECKNAME, - &devstat_cdevsw, 0, NULL, UID_ROOT, GID_WHEEL, 0400, + &devstat_cdevsw, 0, NULL, UID_ROOT, GID_WHEEL, 0444, DEVSTAT_DEVICE_NAME); once = 1; } From owner-svn-src-stable@FreeBSD.ORG Wed Apr 16 18:09:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D343097E; Wed, 16 Apr 2014 18:09:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFE9C1DD1; Wed, 16 Apr 2014 18:09:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3GI9BxY051330; Wed, 16 Apr 2014 18:09:11 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3GI9BPZ051329; Wed, 16 Apr 2014 18:09:11 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201404161809.s3GI9BPZ051329@svn.freebsd.org> From: Eitan Adler Date: Wed, 16 Apr 2014 18:09:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264547 - stable/9/sys/dev/uart X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Apr 2014 18:09:11 -0000 Author: eadler Date: Wed Apr 16 18:09:11 2014 New Revision: 264547 URL: http://svnweb.freebsd.org/changeset/base/264547 Log: MFC r249803: Add support for Intel C600/X79 Series Chipset KT Controller. PR: kern/177072 Modified: stable/9/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/uart/uart_bus_pci.c ============================================================================== --- stable/9/sys/dev/uart/uart_bus_pci.c Wed Apr 16 17:57:08 2014 (r264546) +++ stable/9/sys/dev/uart/uart_bus_pci.c Wed Apr 16 18:09:11 2014 (r264547) @@ -114,6 +114,7 @@ static const struct pci_id pci_ns8250_id { 0x14e4, 0x4344, 0xffff, 0, "Sony Ericsson GC89 PC Card", 0x10}, { 0x151f, 0x0000, 0xffff, 0, "TOPIC Semiconductor TP560 56k modem", 0x10 }, { 0x8086, 0x1c3d, 0xffff, 0, "Intel AMT - KT Controller", 0x10 }, +{ 0x8086, 0x1d3d, 0xffff, 0, "Intel C600/X79 Series Chipset KT Controller", 0x10 }, { 0x8086, 0x2e17, 0xffff, 0, "4 Series Chipset Serial KT Controller", 0x10 }, { 0x8086, 0x3b67, 0xffff, 0, "5 Series/3400 Series Chipset KT Controller", 0x10 }, From owner-svn-src-stable@FreeBSD.ORG Wed Apr 16 18:09:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5670BAB2; Wed, 16 Apr 2014 18:09:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 435801DD7; Wed, 16 Apr 2014 18:09:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3GI9eqe051409; Wed, 16 Apr 2014 18:09:40 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3GI9eSV051408; Wed, 16 Apr 2014 18:09:40 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201404161809.s3GI9eSV051408@svn.freebsd.org> From: Eitan Adler Date: Wed, 16 Apr 2014 18:09:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r264548 - stable/8/sys/dev/uart X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Apr 2014 18:09:40 -0000 Author: eadler Date: Wed Apr 16 18:09:39 2014 New Revision: 264548 URL: http://svnweb.freebsd.org/changeset/base/264548 Log: MFC r249803: Add support for Intel C600/X79 Series Chipset KT Controller. PR: kern/177072 Modified: stable/8/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/uart/ (props changed) Modified: stable/8/sys/dev/uart/uart_bus_pci.c ============================================================================== --- stable/8/sys/dev/uart/uart_bus_pci.c Wed Apr 16 18:09:11 2014 (r264547) +++ stable/8/sys/dev/uart/uart_bus_pci.c Wed Apr 16 18:09:39 2014 (r264548) @@ -114,6 +114,7 @@ static const struct pci_id pci_ns8250_id { 0x14e4, 0x4344, 0xffff, 0, "Sony Ericsson GC89 PC Card", 0x10}, { 0x151f, 0x0000, 0xffff, 0, "TOPIC Semiconductor TP560 56k modem", 0x10 }, { 0x8086, 0x1c3d, 0xffff, 0, "Intel AMT - KT Controller", 0x10 }, +{ 0x8086, 0x1d3d, 0xffff, 0, "Intel C600/X79 Series Chipset KT Controller", 0x10 }, { 0x8086, 0x2e17, 0xffff, 0, "4 Series Chipset Serial KT Controller", 0x10 }, { 0x8086, 0x3b67, 0xffff, 0, "5 Series/3400 Series Chipset KT Controller", 0x10 }, From owner-svn-src-stable@FreeBSD.ORG Wed Apr 16 23:12:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38512C24; Wed, 16 Apr 2014 23:12:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 229281FF6; Wed, 16 Apr 2014 23:12:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3GNCacO092421; Wed, 16 Apr 2014 23:12:36 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3GNCacw092416; Wed, 16 Apr 2014 23:12:36 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201404162312.s3GNCacw092416@svn.freebsd.org> From: Julio Merino Date: Wed, 16 Apr 2014 23:12:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264572 - in stable/10: gnu/usr.bin/groff/tmac share/man/man7 tools/build/options X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Apr 2014 23:12:37 -0000 Author: jmmv Date: Wed Apr 16 23:12:35 2014 New Revision: 264572 URL: http://svnweb.freebsd.org/changeset/base/264572 Log: MFC several WITH_TESTS-related documentation fixes. - r258014 Document WITH_TESTS src.conf(5) option. - r263089 Fix description of WITHOUT_BMAKE's purpose. - r264408 Fix test suite name in src.conf(5). - r264410 Document how to install the test suite. - r264412 Add FreeBSD 10.1 to the list of recognized releases for Fx. - r264413 Miscellaneous fixes to tests(7). Added: stable/10/tools/build/options/WITH_TESTS - copied, changed from r258014, head/tools/build/options/WITH_TESTS Modified: stable/10/gnu/usr.bin/groff/tmac/mdoc.local stable/10/share/man/man7/Makefile stable/10/share/man/man7/tests.7 stable/10/tools/build/options/WITHOUT_BMAKE Directory Properties: stable/10/ (props changed) Modified: stable/10/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- stable/10/gnu/usr.bin/groff/tmac/mdoc.local Wed Apr 16 22:26:42 2014 (r264571) +++ stable/10/gnu/usr.bin/groff/tmac/mdoc.local Wed Apr 16 23:12:35 2014 (r264572) @@ -58,6 +58,7 @@ .ds doc-operating-system-FreeBSD-9.1 9.1 .ds doc-operating-system-FreeBSD-9.2 9.2 .ds doc-operating-system-FreeBSD-10.0 10.0 +.ds doc-operating-system-FreeBSD-10.1 10.1 .ds doc-operating-system-NetBSD-7.0 7.0 . .\" Definitions not (yet) in doc-syms Modified: stable/10/share/man/man7/Makefile ============================================================================== --- stable/10/share/man/man7/Makefile Wed Apr 16 22:26:42 2014 (r264571) +++ stable/10/share/man/man7/Makefile Wed Apr 16 23:12:35 2014 (r264572) @@ -27,12 +27,9 @@ MAN= adding_user.7 \ sprog.7 \ stdint.7 \ sticky.7 \ + tests.7 \ tuning.7 -.if ${MK_TESTS} != "no" -MAN+= tests.7 -.endif - MLINKS= intro.7 miscellaneous.7 MLINKS+= security.7 securelevel.7 MLINKS+= c99.7 c.7 Modified: stable/10/share/man/man7/tests.7 ============================================================================== --- stable/10/share/man/man7/tests.7 Wed Apr 16 22:26:42 2014 (r264571) +++ stable/10/share/man/man7/tests.7 Wed Apr 16 23:12:35 2014 (r264572) @@ -26,16 +26,16 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd March 20, 2014 +.Dd April 13, 2014 .Dt TESTS 7 .Os .Sh NAME .Nm tests -.Nd introduction to the FreeBSD test suite +.Nd introduction to the FreeBSD Test Suite .Sh DESCRIPTION The .Fx -test suite provides a collection of automated tests for two major purposes. +Test Suite provides a collection of automated tests for two major purposes. On one hand, the test suite aids .Em developers to detect bugs and regressions when they modify the source tree. On the other @@ -50,12 +50,31 @@ maintenance. .Pp The .Fx -test suite is installed in the +Test Suite can be found in the .Pa /usr/tests hierarchy. .Pp This manual page describes how to run the test suite and how to configure some of its optional features. +.Ss Installing the test suite +The test suite is not yet installed by default as part of +.Fx , +but this is bound to change during the development of +.Fx 11.0 . +.Pp +If the +.Pa /usr/tests +directory is missing, then you will have to enable the build of the test +suite, rebuild your system and install the results. +You can do so by setting +.Sq WITH_TESTS=yes +in your +.Pa /etc/src.conf +file (see +.Xr src.conf 5 +for details) +and rebuilding the system as described in +.Xr build 7 . .Ss When to run the tests? Before diving into the details of how to run the test suite, here are some scenarios in which you should run it: @@ -129,7 +148,7 @@ to its manual page .Ss Configuring the tests Some test cases in the .Fx -test suite require manual configuration by the administrator before they can be +Test Suite require manual configuration by the administrator before they can be run. Unless certain properties are defined, the tests that require them will be skipped. .Pp @@ -141,7 +160,7 @@ The format of this file is detailed in .Pp The following configuration variables are available in the .Fx -test suite: +Test Suite: .Bl -tag -width "allow_sysctl_side_effects" .It allow_devfs_side_effects If defined, enables tests that may destroy and recreate semipermanent device @@ -192,21 +211,24 @@ Default result database used by Kyua. .It Pa /usr/tests/ Location of the .Fx -test suite. +Test Suite. .It Pa /usr/tests/Kyuafile Top-level test suite definition file. .El .Sh SEE ALSO -.Xr kyua 1 . +.Xr kyua 1 , +.Xr build 7 .Sh HISTORY -This test suite first appeared in -.Fx 11.0 . +The +.Fx +Test Suite first appeared in +.Fx 10.1 . .Pp The .Nm manual page first appeared in .Nx 6.0 and was later ported to -.Fx 11.0 . +.Fx 10.1 . .Sh AUTHORS -.An Julio Merino Aq Mt jmmv@google.com +.An Julio Merino Aq Mt jmmv@FreeBSD.org Modified: stable/10/tools/build/options/WITHOUT_BMAKE ============================================================================== --- stable/10/tools/build/options/WITHOUT_BMAKE Wed Apr 16 22:26:42 2014 (r264571) +++ stable/10/tools/build/options/WITHOUT_BMAKE Wed Apr 16 23:12:35 2014 (r264572) @@ -3,6 +3,6 @@ Set to not build and install the portabl .Xr make 1 instead of the traditional FreeBSD make. This build option is temporary. -It allows developers to switch to bmake in order to work out any remaining -kinks or issues. +It allows developers to switch to the traditional FreeBSD make in order to +work out any remaining kinks or issues. This option will be removed in due time. Copied and modified: stable/10/tools/build/options/WITH_TESTS (from r258014, head/tools/build/options/WITH_TESTS) ============================================================================== --- head/tools/build/options/WITH_TESTS Mon Nov 11 21:13:14 2013 (r258014, copy source) +++ stable/10/tools/build/options/WITH_TESTS Wed Apr 16 23:12:35 2014 (r264572) @@ -1,2 +1,7 @@ .\" $FreeBSD$ -Set to install the Kyua test suite. +Set to install the +.Fx +Test Suite. +See +.Xr tests 7 +for more details. From owner-svn-src-stable@FreeBSD.ORG Thu Apr 17 00:31:21 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9769AFF3; Thu, 17 Apr 2014 00:31:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 772961A7D; Thu, 17 Apr 2014 00:31:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3H0VLDN024990; Thu, 17 Apr 2014 00:31:21 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3H0VK5X024986; Thu, 17 Apr 2014 00:31:20 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201404170031.s3H0VK5X024986@svn.freebsd.org> From: Xin LI Date: Thu, 17 Apr 2014 00:31:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264577 - stable/10/bin/dd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2014 00:31:21 -0000 Author: delphij Date: Thu Apr 17 00:31:20 2014 New Revision: 264577 URL: http://svnweb.freebsd.org/changeset/base/264577 Log: MFC r264059+264067: Implement GNU's extension of 'status' operand. The GNU syntax is borrowed where syntax status=noxfer means no transfer statistics and status=none means no status information at all. This feature is useful because the statistics information can sometimes be annoying, and redirecting stderr to /dev/null would mean error messages also gets silenced. Obtained from: OpenBSD Modified: stable/10/bin/dd/args.c stable/10/bin/dd/dd.1 stable/10/bin/dd/dd.h stable/10/bin/dd/misc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/dd/args.c ============================================================================== --- stable/10/bin/dd/args.c Thu Apr 17 00:31:02 2014 (r264576) +++ stable/10/bin/dd/args.c Thu Apr 17 00:31:20 2014 (r264577) @@ -66,6 +66,7 @@ static void f_obs(char *); static void f_of(char *); static void f_seek(char *); static void f_skip(char *); +static void f_status(char *); static uintmax_t get_num(const char *); static off_t get_off_t(const char *); @@ -88,6 +89,7 @@ static const struct arg { { "oseek", f_seek, C_SEEK, C_SEEK }, { "seek", f_seek, C_SEEK, C_SEEK }, { "skip", f_skip, C_SKIP, C_SKIP }, + { "status", f_status, C_STATUS,C_STATUS }, }; static char *oper; @@ -292,6 +294,18 @@ f_skip(char *arg) in.offset = get_off_t(arg); } +static void +f_status(char *arg) +{ + + if (strcmp(arg, "none") == 0) + ddflags |= C_NOINFO; + else if (strcmp(arg, "noxfer") == 0) + ddflags |= C_NOXFER; + else + errx(1, "unknown status %s", arg); +} + static const struct conv { const char *name; u_int set, noset; Modified: stable/10/bin/dd/dd.1 ============================================================================== --- stable/10/bin/dd/dd.1 Thu Apr 17 00:31:02 2014 (r264576) +++ stable/10/bin/dd/dd.1 Thu Apr 17 00:31:20 2014 (r264577) @@ -32,7 +32,7 @@ .\" @(#)dd.1 8.2 (Berkeley) 1/13/94 .\" $FreeBSD$ .\" -.Dd October 1, 2013 +.Dd April 2, 2014 .Dt DD 1 .Os .Sh NAME @@ -156,6 +156,17 @@ Otherwise, input data is read and discar For pipes, the correct number of bytes is read. For all other devices, the correct number of blocks is read without distinguishing between a partial or complete block being read. +.It Cm status Ns = Ns Ar value +Where +.Cm value +is one of the symbols from the following list. +.Bl -tag -width ".Cm noxfer" +.It Cm noxfer +Do not print the transfer statistics as the last line of status output. +.It Cm none +Do not print the status output. +Error messages are shown; informational messages are not. +.El .It Cm conv Ns = Ns Ar value Ns Op , Ns Ar value ... Where .Cm value @@ -410,7 +421,9 @@ utility is expected to be a superset of standard. The .Cm files -operand and the +and +.Cm status +operands and the .Cm ascii , .Cm ebcdic , .Cm ibm , Modified: stable/10/bin/dd/dd.h ============================================================================== --- stable/10/bin/dd/dd.h Thu Apr 17 00:31:02 2014 (r264576) +++ stable/10/bin/dd/dd.h Thu Apr 17 00:31:20 2014 (r264577) @@ -68,32 +68,35 @@ typedef struct { } STAT; /* Flags (in ddflags). */ -#define C_ASCII 0x00001 -#define C_BLOCK 0x00002 -#define C_BS 0x00004 -#define C_CBS 0x00008 -#define C_COUNT 0x00010 -#define C_EBCDIC 0x00020 -#define C_FILES 0x00040 -#define C_IBS 0x00080 -#define C_IF 0x00100 -#define C_LCASE 0x00200 -#define C_NOERROR 0x00400 -#define C_NOTRUNC 0x00800 -#define C_OBS 0x01000 -#define C_OF 0x02000 -#define C_OSYNC 0x04000 -#define C_PAREVEN 0x08000 -#define C_PARNONE 0x100000 -#define C_PARODD 0x200000 -#define C_PARSET 0x400000 -#define C_SEEK 0x800000 -#define C_SKIP 0x1000000 -#define C_SPARSE 0x2000000 -#define C_SWAB 0x4000000 -#define C_SYNC 0x8000000 -#define C_UCASE 0x10000000 -#define C_UNBLOCK 0x20000000 -#define C_FILL 0x40000000 +#define C_ASCII 0x00000001 +#define C_BLOCK 0x00000002 +#define C_BS 0x00000004 +#define C_CBS 0x00000008 +#define C_COUNT 0x00000010 +#define C_EBCDIC 0x00000020 +#define C_FILES 0x00000040 +#define C_IBS 0x00000080 +#define C_IF 0x00000100 +#define C_LCASE 0x00000200 +#define C_NOERROR 0x00000400 +#define C_NOTRUNC 0x00000800 +#define C_OBS 0x00001000 +#define C_OF 0x00002000 +#define C_OSYNC 0x00004000 +#define C_PAREVEN 0x00008000 +#define C_PARNONE 0x00010000 +#define C_PARODD 0x00020000 +#define C_PARSET 0x00040000 +#define C_SEEK 0x00080000 +#define C_SKIP 0x00100000 +#define C_SPARSE 0x00200000 +#define C_SWAB 0x00400000 +#define C_SYNC 0x00800000 +#define C_UCASE 0x01000000 +#define C_UNBLOCK 0x02000000 +#define C_FILL 0x04000000 +#define C_STATUS 0x08000000 +#define C_NOXFER 0x10000000 +#define C_NOINFO 0x20000000 #define C_PARITY (C_PAREVEN | C_PARODD | C_PARNONE | C_PARSET) Modified: stable/10/bin/dd/misc.c ============================================================================== --- stable/10/bin/dd/misc.c Thu Apr 17 00:31:02 2014 (r264576) +++ stable/10/bin/dd/misc.c Thu Apr 17 00:31:20 2014 (r264577) @@ -59,6 +59,9 @@ summary(void) struct timeval tv; double secs; + if (ddflags & C_NOINFO) + return; + (void)gettimeofday(&tv, NULL); secs = tv.tv_sec + tv.tv_usec * 1e-6 - st.start; if (secs < 1e-6) @@ -72,9 +75,11 @@ summary(void) if (st.trunc) (void)fprintf(stderr, "%ju truncated %s\n", st.trunc, (st.trunc == 1) ? "block" : "blocks"); - (void)fprintf(stderr, - "%ju bytes transferred in %.6f secs (%.0f bytes/sec)\n", - st.bytes, secs, st.bytes / secs); + if (!(ddflags & C_NOXFER)) { + (void)fprintf(stderr, + "%ju bytes transferred in %.6f secs (%.0f bytes/sec)\n", + st.bytes, secs, st.bytes / secs); + } need_summary = 0; } From owner-svn-src-stable@FreeBSD.ORG Thu Apr 17 00:34:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0F472BC; Thu, 17 Apr 2014 00:34:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 806231A98; Thu, 17 Apr 2014 00:34:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3H0YpqN026352; Thu, 17 Apr 2014 00:34:51 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3H0YnoW026331; Thu, 17 Apr 2014 00:34:49 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201404170034.s3H0YnoW026331@svn.freebsd.org> From: Xin LI Date: Thu, 17 Apr 2014 00:34:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264579 - stable/9/bin/dd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2014 00:34:51 -0000 Author: delphij Date: Thu Apr 17 00:34:49 2014 New Revision: 264579 URL: http://svnweb.freebsd.org/changeset/base/264579 Log: MFC all recent changes on -HEAD to dd(1). Modified: stable/9/bin/dd/args.c stable/9/bin/dd/conv_tab.c stable/9/bin/dd/dd.1 stable/9/bin/dd/dd.c stable/9/bin/dd/dd.h stable/9/bin/dd/extern.h stable/9/bin/dd/misc.c stable/9/bin/dd/position.c Directory Properties: stable/9/bin/dd/ (props changed) Modified: stable/9/bin/dd/args.c ============================================================================== --- stable/9/bin/dd/args.c Thu Apr 17 00:31:54 2014 (r264578) +++ stable/9/bin/dd/args.c Thu Apr 17 00:34:49 2014 (r264579) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -65,6 +66,7 @@ static void f_obs(char *); static void f_of(char *); static void f_seek(char *); static void f_skip(char *); +static void f_status(char *); static uintmax_t get_num(const char *); static off_t get_off_t(const char *); @@ -87,6 +89,7 @@ static const struct arg { { "oseek", f_seek, C_SEEK, C_SEEK }, { "seek", f_seek, C_SEEK, C_SEEK }, { "skip", f_skip, C_SKIP, C_SKIP }, + { "status", f_status, C_STATUS,C_STATUS }, }; static char *oper; @@ -291,6 +294,18 @@ f_skip(char *arg) in.offset = get_off_t(arg); } +static void +f_status(char *arg) +{ + + if (strcmp(arg, "none") == 0) + ddflags |= C_NOINFO; + else if (strcmp(arg, "noxfer") == 0) + ddflags |= C_NOXFER; + else + errx(1, "unknown status %s", arg); +} + static const struct conv { const char *name; u_int set, noset; Modified: stable/9/bin/dd/conv_tab.c ============================================================================== --- stable/9/bin/dd/conv_tab.c Thu Apr 17 00:31:54 2014 (r264578) +++ stable/9/bin/dd/conv_tab.c Thu Apr 17 00:34:49 2014 (r264579) @@ -41,6 +41,12 @@ __FBSDID("$FreeBSD$"); #include +#include +#include + +#include "dd.h" +#include "extern.h" + /* * There are currently six tables: * Modified: stable/9/bin/dd/dd.1 ============================================================================== --- stable/9/bin/dd/dd.1 Thu Apr 17 00:31:54 2014 (r264578) +++ stable/9/bin/dd/dd.1 Thu Apr 17 00:34:49 2014 (r264579) @@ -32,7 +32,7 @@ .\" @(#)dd.1 8.2 (Berkeley) 1/13/94 .\" $FreeBSD$ .\" -.Dd January 23, 2009 +.Dd April 2, 2014 .Dt DD 1 .Os .Sh NAME @@ -156,6 +156,17 @@ Otherwise, input data is read and discar For pipes, the correct number of bytes is read. For all other devices, the correct number of blocks is read without distinguishing between a partial or complete block being read. +.It Cm status Ns = Ns Ar value +Where +.Cm value +is one of the symbols from the following list. +.Bl -tag -width ".Cm noxfer" +.It Cm noxfer +Do not print the transfer statistics as the last line of status output. +.It Cm none +Do not print the status output. +Error messages are shown; informational messages are not. +.El .It Cm conv Ns = Ns Ar value Ns Op , Ns Ar value ... Where .Cm value @@ -378,12 +389,12 @@ will exit. .Sh EXAMPLES Check that a disk drive contains no bad blocks: .Pp -.Dl "dd if=/dev/ad0 of=/dev/null bs=1m" +.Dl "dd if=/dev/ada0 of=/dev/null bs=1m" .Pp Do a refresh of a disk drive, in order to prevent presently recoverable read errors from progressing into unrecoverable read errors: .Pp -.Dl "dd if=/dev/ad0 of=/dev/ad0 bs=1m" +.Dl "dd if=/dev/ada0 of=/dev/ada0 bs=1m" .Pp Remove parity bit from a file: .Pp @@ -410,7 +421,9 @@ utility is expected to be a superset of standard. The .Cm files -operand and the +and +.Cm status +operands and the .Cm ascii , .Cm ebcdic , .Cm ibm , Modified: stable/9/bin/dd/dd.c ============================================================================== --- stable/9/bin/dd/dd.c Thu Apr 17 00:31:54 2014 (r264578) +++ stable/9/bin/dd/dd.c Thu Apr 17 00:34:49 2014 (r264579) @@ -81,6 +81,7 @@ size_t cbsz; /* conversion block size uintmax_t files_cnt = 1; /* # of files to copy */ const u_char *ctab; /* conversion table */ char fill_char; /* Character to fill with if defined */ +volatile sig_atomic_t need_summary; int main(int argc __unused, char *argv[]) @@ -89,7 +90,7 @@ main(int argc __unused, char *argv[]) jcl(argv); setup(); - (void)signal(SIGINFO, summaryx); + (void)signal(SIGINFO, siginfo_handler); (void)signal(SIGINT, terminate); atexit(summary); @@ -98,6 +99,13 @@ main(int argc __unused, char *argv[]) dd_in(); dd_close(); + /* + * Some devices such as cfi(4) may perform significant amounts + * of work when a write descriptor is closed. Close the out + * descriptor explicitly so that the summary handler (called + * from an atexit() hook) includes this work. + */ + close(out.fd); exit(0); } @@ -232,8 +240,8 @@ setup(void) ctab = casetab; } - (void)gettimeofday(&tv, (struct timezone *)NULL); - st.start = tv.tv_sec + tv.tv_usec * 1e-6; + (void)gettimeofday(&tv, NULL); + st.start = tv.tv_sec + tv.tv_usec * 1e-6; } static void @@ -368,6 +376,9 @@ dd_in(void) in.dbp += in.dbrcnt; (*cfunc)(); + if (need_summary) { + summary(); + } } } Modified: stable/9/bin/dd/dd.h ============================================================================== --- stable/9/bin/dd/dd.h Thu Apr 17 00:31:54 2014 (r264578) +++ stable/9/bin/dd/dd.h Thu Apr 17 00:34:49 2014 (r264579) @@ -68,32 +68,35 @@ typedef struct { } STAT; /* Flags (in ddflags). */ -#define C_ASCII 0x00001 -#define C_BLOCK 0x00002 -#define C_BS 0x00004 -#define C_CBS 0x00008 -#define C_COUNT 0x00010 -#define C_EBCDIC 0x00020 -#define C_FILES 0x00040 -#define C_IBS 0x00080 -#define C_IF 0x00100 -#define C_LCASE 0x00200 -#define C_NOERROR 0x00400 -#define C_NOTRUNC 0x00800 -#define C_OBS 0x01000 -#define C_OF 0x02000 -#define C_OSYNC 0x04000 -#define C_PAREVEN 0x08000 -#define C_PARNONE 0x100000 -#define C_PARODD 0x200000 -#define C_PARSET 0x400000 -#define C_SEEK 0x800000 -#define C_SKIP 0x1000000 -#define C_SPARSE 0x2000000 -#define C_SWAB 0x4000000 -#define C_SYNC 0x8000000 -#define C_UCASE 0x10000000 -#define C_UNBLOCK 0x20000000 -#define C_FILL 0x40000000 +#define C_ASCII 0x00000001 +#define C_BLOCK 0x00000002 +#define C_BS 0x00000004 +#define C_CBS 0x00000008 +#define C_COUNT 0x00000010 +#define C_EBCDIC 0x00000020 +#define C_FILES 0x00000040 +#define C_IBS 0x00000080 +#define C_IF 0x00000100 +#define C_LCASE 0x00000200 +#define C_NOERROR 0x00000400 +#define C_NOTRUNC 0x00000800 +#define C_OBS 0x00001000 +#define C_OF 0x00002000 +#define C_OSYNC 0x00004000 +#define C_PAREVEN 0x00008000 +#define C_PARNONE 0x00010000 +#define C_PARODD 0x00020000 +#define C_PARSET 0x00040000 +#define C_SEEK 0x00080000 +#define C_SKIP 0x00100000 +#define C_SPARSE 0x00200000 +#define C_SWAB 0x00400000 +#define C_SYNC 0x00800000 +#define C_UCASE 0x01000000 +#define C_UNBLOCK 0x02000000 +#define C_FILL 0x04000000 +#define C_STATUS 0x08000000 +#define C_NOXFER 0x10000000 +#define C_NOINFO 0x20000000 #define C_PARITY (C_PAREVEN | C_PARODD | C_PARNONE | C_PARSET) Modified: stable/9/bin/dd/extern.h ============================================================================== --- stable/9/bin/dd/extern.h Thu Apr 17 00:31:54 2014 (r264578) +++ stable/9/bin/dd/extern.h Thu Apr 17 00:34:49 2014 (r264579) @@ -43,7 +43,7 @@ void jcl(char **); void pos_in(void); void pos_out(void); void summary(void); -void summaryx(int); +void siginfo_handler(int); void terminate(int); void unblock(void); void unblock_close(void); @@ -61,3 +61,4 @@ extern const u_char e2a_32V[], e2a_POSIX extern const u_char a2ibm_32V[], a2ibm_POSIX[]; extern u_char casetab[]; extern char fill_char; +extern volatile sig_atomic_t need_summary; Modified: stable/9/bin/dd/misc.c ============================================================================== --- stable/9/bin/dd/misc.c Thu Apr 17 00:31:54 2014 (r264578) +++ stable/9/bin/dd/misc.c Thu Apr 17 00:34:49 2014 (r264579) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -57,41 +58,37 @@ summary(void) { struct timeval tv; double secs; - char buf[100]; - (void)gettimeofday(&tv, (struct timezone *)NULL); + if (ddflags & C_NOINFO) + return; + + (void)gettimeofday(&tv, NULL); secs = tv.tv_sec + tv.tv_usec * 1e-6 - st.start; if (secs < 1e-6) secs = 1e-6; - /* Use snprintf(3) so that we don't reenter stdio(3). */ - (void)snprintf(buf, sizeof(buf), + (void)fprintf(stderr, "%ju+%ju records in\n%ju+%ju records out\n", st.in_full, st.in_part, st.out_full, st.out_part); - (void)write(STDERR_FILENO, buf, strlen(buf)); - if (st.swab) { - (void)snprintf(buf, sizeof(buf), "%ju odd length swab %s\n", + if (st.swab) + (void)fprintf(stderr, "%ju odd length swab %s\n", st.swab, (st.swab == 1) ? "block" : "blocks"); - (void)write(STDERR_FILENO, buf, strlen(buf)); - } - if (st.trunc) { - (void)snprintf(buf, sizeof(buf), "%ju truncated %s\n", + if (st.trunc) + (void)fprintf(stderr, "%ju truncated %s\n", st.trunc, (st.trunc == 1) ? "block" : "blocks"); - (void)write(STDERR_FILENO, buf, strlen(buf)); + if (!(ddflags & C_NOXFER)) { + (void)fprintf(stderr, + "%ju bytes transferred in %.6f secs (%.0f bytes/sec)\n", + st.bytes, secs, st.bytes / secs); } - (void)snprintf(buf, sizeof(buf), - "%ju bytes transferred in %.6f secs (%.0f bytes/sec)\n", - st.bytes, secs, st.bytes / secs); - (void)write(STDERR_FILENO, buf, strlen(buf)); + need_summary = 0; } /* ARGSUSED */ void -summaryx(int notused __unused) +siginfo_handler(int signo __unused) { - int save_errno = errno; - summary(); - errno = save_errno; + need_summary = 1; } /* ARGSUSED */ Modified: stable/9/bin/dd/position.c ============================================================================== --- stable/9/bin/dd/position.c Thu Apr 17 00:31:54 2014 (r264578) +++ stable/9/bin/dd/position.c Thu Apr 17 00:34:49 2014 (r264579) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "dd.h" @@ -91,6 +92,8 @@ pos_in(void) } } else --cnt; + if (need_summary) + summary(); continue; } From owner-svn-src-stable@FreeBSD.ORG Thu Apr 17 10:37:22 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4BBA556A; Thu, 17 Apr 2014 10:37:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3839C18F0; Thu, 17 Apr 2014 10:37:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3HAbMJd081163; Thu, 17 Apr 2014 10:37:22 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3HAbMnQ081162; Thu, 17 Apr 2014 10:37:22 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404171037.s3HAbMnQ081162@svn.freebsd.org> From: Christian Brueffer Date: Thu, 17 Apr 2014 10:37:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264586 - stable/10/usr.sbin/wlandebug X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2014 10:37:22 -0000 Author: brueffer Date: Thu Apr 17 10:37:21 2014 New Revision: 264586 URL: http://svnweb.freebsd.org/changeset/base/264586 Log: MFC: r264315, r264316 Fix Xref order in SEE ALSO. Modified: stable/10/usr.sbin/wlandebug/wlandebug.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/wlandebug/wlandebug.8 ============================================================================== --- stable/10/usr.sbin/wlandebug/wlandebug.8 Thu Apr 17 10:27:18 2014 (r264585) +++ stable/10/usr.sbin/wlandebug/wlandebug.8 Thu Apr 17 10:37:21 2014 (r264586) @@ -153,10 +153,10 @@ The following might be used to debug bas it enables debug messages while scanning, authenticating to an access point, and associating to an access point. .Sh SEE ALSO -.Xr ifconfig 8 , -.Xr wlanstats 8 , .Xr athdebug 8 , -.Xr athstats 8 . +.Xr athstats 8 , +.Xr ifconfig 8 , +.Xr wlanstats 8 .Sh NOTES Different wireless drivers support different debugging messages. Drivers such as From owner-svn-src-stable@FreeBSD.ORG Thu Apr 17 10:39:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 996CE6C8; Thu, 17 Apr 2014 10:39:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 857B2191B; Thu, 17 Apr 2014 10:39:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3HAdITx081422; Thu, 17 Apr 2014 10:39:18 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3HAdIAe081421; Thu, 17 Apr 2014 10:39:18 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404171039.s3HAdIAe081421@svn.freebsd.org> From: Christian Brueffer Date: Thu, 17 Apr 2014 10:39:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264587 - stable/9/usr.sbin/wlandebug X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2014 10:39:18 -0000 Author: brueffer Date: Thu Apr 17 10:39:18 2014 New Revision: 264587 URL: http://svnweb.freebsd.org/changeset/base/264587 Log: MFC: r264315, r264316 Fix Xref order in SEE ALSO. Modified: stable/9/usr.sbin/wlandebug/wlandebug.8 Directory Properties: stable/9/usr.sbin/wlandebug/ (props changed) Modified: stable/9/usr.sbin/wlandebug/wlandebug.8 ============================================================================== --- stable/9/usr.sbin/wlandebug/wlandebug.8 Thu Apr 17 10:37:21 2014 (r264586) +++ stable/9/usr.sbin/wlandebug/wlandebug.8 Thu Apr 17 10:39:18 2014 (r264587) @@ -153,10 +153,10 @@ The following might be used to debug bas it enables debug messages while scanning, authenticating to an access point, and associating to an access point. .Sh SEE ALSO -.Xr ifconfig 8 , -.Xr wlanstats 8 , .Xr athdebug 8 , -.Xr athstats 8 . +.Xr athstats 8 , +.Xr ifconfig 8 , +.Xr wlanstats 8 .Sh NOTES Different wireless drivers support different debugging messages. Drivers such as From owner-svn-src-stable@FreeBSD.ORG Thu Apr 17 10:41:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DAF558B3; Thu, 17 Apr 2014 10:41:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C76BF19BD; Thu, 17 Apr 2014 10:41:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3HAfQix084193; Thu, 17 Apr 2014 10:41:26 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3HAfQNq084187; Thu, 17 Apr 2014 10:41:26 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404171041.s3HAfQNq084187@svn.freebsd.org> From: Christian Brueffer Date: Thu, 17 Apr 2014 10:41:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r264588 - stable/8/usr.sbin/wlandebug X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2014 10:41:26 -0000 Author: brueffer Date: Thu Apr 17 10:41:26 2014 New Revision: 264588 URL: http://svnweb.freebsd.org/changeset/base/264588 Log: MFC: r264315, r264316 Fix Xref order in SEE ALSO. Modified: stable/8/usr.sbin/wlandebug/wlandebug.8 Directory Properties: stable/8/usr.sbin/wlandebug/ (props changed) Modified: stable/8/usr.sbin/wlandebug/wlandebug.8 ============================================================================== --- stable/8/usr.sbin/wlandebug/wlandebug.8 Thu Apr 17 10:39:18 2014 (r264587) +++ stable/8/usr.sbin/wlandebug/wlandebug.8 Thu Apr 17 10:41:26 2014 (r264588) @@ -153,10 +153,10 @@ The following might be used to debug bas it enables debug messages while scanning, authenticating to an access point, and associating to an access point. .Sh SEE ALSO -.Xr ifconfig 8 , -.Xr wlanstats 8 , .Xr athdebug 8 , -.Xr athstats 8 . +.Xr athstats 8 , +.Xr ifconfig 8 , +.Xr wlanstats 8 .Sh NOTES Different wireless drivers support different debugging messages. Drivers such as From owner-svn-src-stable@FreeBSD.ORG Thu Apr 17 10:43:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 217BCA16; Thu, 17 Apr 2014 10:43:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C54F19E0; Thu, 17 Apr 2014 10:43:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3HAhcsg084948; Thu, 17 Apr 2014 10:43:38 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3HAhcp8084947; Thu, 17 Apr 2014 10:43:38 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404171043.s3HAhcp8084947@svn.freebsd.org> From: Christian Brueffer Date: Thu, 17 Apr 2014 10:43:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264589 - stable/10/share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2014 10:43:39 -0000 Author: brueffer Date: Thu Apr 17 10:43:38 2014 New Revision: 264589 URL: http://svnweb.freebsd.org/changeset/base/264589 Log: MFC: r264453 Correct geli parameter. PR: 188582 Submitted by: Michael Hall Modified: stable/10/share/man/man5/fstab.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man5/fstab.5 ============================================================================== --- stable/10/share/man/man5/fstab.5 Thu Apr 17 10:41:26 2014 (r264588) +++ stable/10/share/man/man5/fstab.5 Thu Apr 17 10:43:38 2014 (r264589) @@ -32,7 +32,7 @@ .\" @(#)fstab.5 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd September 10, 2013 +.Dd April 14, 2014 .Dt FSTAB 5 .Os .Sh NAME @@ -245,7 +245,7 @@ devices will cause automatic creation of The .Dq ealgo , .Dq aalgo , -.Dq keylength , +.Dq keylen , and .Dq sectorsize options may be passed to control those From owner-svn-src-stable@FreeBSD.ORG Thu Apr 17 11:49:19 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC04B94C; Thu, 17 Apr 2014 11:49:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C848610C5; Thu, 17 Apr 2014 11:49:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3HBnJ3i010948; Thu, 17 Apr 2014 11:49:19 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3HBnJrW010947; Thu, 17 Apr 2014 11:49:19 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201404171149.s3HBnJrW010947@svn.freebsd.org> From: Julio Merino Date: Thu, 17 Apr 2014 11:49:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264592 - stable/10/lib/libc/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2014 11:49:19 -0000 Author: jmmv Date: Thu Apr 17 11:49:19 2014 New Revision: 264592 URL: http://svnweb.freebsd.org/changeset/base/264592 Log: MFC r263090: Make ether_line really report an error when all input is invalid. Modified: stable/10/lib/libc/net/ether_addr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/net/ether_addr.c ============================================================================== --- stable/10/lib/libc/net/ether_addr.c Thu Apr 17 11:48:34 2014 (r264591) +++ stable/10/lib/libc/net/ether_addr.c Thu Apr 17 11:49:19 2014 (r264592) @@ -72,11 +72,13 @@ ether_line(const char *l, struct ether_a i = sscanf(l, "%x:%x:%x:%x:%x:%x %s", &o[0], &o[1], &o[2], &o[3], &o[4], &o[5], hostname); - if (i != 7) - return (i); - for (i=0; i<6; i++) - e->octet[i] = o[i]; - return (0); + if (i == 7) { + for (i = 0; i < 6; i++) + e->octet[i] = o[i]; + return (0); + } else { + return (-1); + } } /* From owner-svn-src-stable@FreeBSD.ORG Thu Apr 17 12:11:01 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5CCDD43F; Thu, 17 Apr 2014 12:11:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4906112DE; Thu, 17 Apr 2014 12:11:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3HCB1B4020198; Thu, 17 Apr 2014 12:11:01 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3HCB18v020196; Thu, 17 Apr 2014 12:11:01 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201404171211.s3HCB18v020196@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Thu, 17 Apr 2014 12:11:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264597 - stable/9/usr.sbin/pwd_mkdb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2014 12:11:01 -0000 Author: des Date: Thu Apr 17 12:11:00 2014 New Revision: 264597 URL: http://svnweb.freebsd.org/changeset/base/264597 Log: MFH (r261511, r261542): add an example to the man page Modified: stable/9/usr.sbin/pwd_mkdb/pwd_mkdb.8 Directory Properties: stable/9/usr.sbin/pwd_mkdb/ (props changed) Modified: stable/9/usr.sbin/pwd_mkdb/pwd_mkdb.8 ============================================================================== --- stable/9/usr.sbin/pwd_mkdb/pwd_mkdb.8 Thu Apr 17 12:01:34 2014 (r264596) +++ stable/9/usr.sbin/pwd_mkdb/pwd_mkdb.8 Thu Apr 17 12:11:00 2014 (r264597) @@ -28,7 +28,7 @@ .\" @(#)pwd_mkdb.8 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd February 28, 2005 +.Dd February 5, 2014 .Dt PWD_MKDB 8 .Os .Sh NAME @@ -143,6 +143,12 @@ The current password file. .It Pa /etc/passwd A Version 7 format password file. .El +.Sh EXAMPLES +Regenerate the password database after manually editing or replacing +the password file: +.Bd -literal -offset -indent +/usr/sbin/pwd_mkdb -p /etc/master.passwd +.Ed .Sh COMPATIBILITY Previous versions of the system had a program similar to .Nm , From owner-svn-src-stable@FreeBSD.ORG Thu Apr 17 12:16:28 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0C3E572C; Thu, 17 Apr 2014 12:16:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA3AB13BA; Thu, 17 Apr 2014 12:16:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3HCGRpq023507; Thu, 17 Apr 2014 12:16:27 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3HCGRJ6023506; Thu, 17 Apr 2014 12:16:27 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201404171216.s3HCGRJ6023506@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Thu, 17 Apr 2014 12:16:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264598 - stable/10/usr.sbin/ntp/sntp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2014 12:16:28 -0000 Author: des Date: Thu Apr 17 12:16:27 2014 New Revision: 264598 URL: http://svnweb.freebsd.org/changeset/base/264598 Log: MFH (r262555): install the sntp(1) man page Modified: stable/10/usr.sbin/ntp/sntp/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ntp/sntp/Makefile ============================================================================== --- stable/10/usr.sbin/ntp/sntp/Makefile Thu Apr 17 12:11:00 2014 (r264597) +++ stable/10/usr.sbin/ntp/sntp/Makefile Thu Apr 17 12:16:27 2014 (r264598) @@ -3,7 +3,7 @@ .PATH: ${.CURDIR}/../../../contrib/ntp/sntp PROG= sntp -NO_MAN= +MAN= sntp.1 SRCS= internet.c main.c socket.c timing.c unix.c CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../ \ From owner-svn-src-stable@FreeBSD.ORG Thu Apr 17 12:16:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 713D185F; Thu, 17 Apr 2014 12:16:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CFB213C2; Thu, 17 Apr 2014 12:16:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3HCGqsU023588; Thu, 17 Apr 2014 12:16:52 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3HCGqUt023586; Thu, 17 Apr 2014 12:16:52 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201404171216.s3HCGqUt023586@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Thu, 17 Apr 2014 12:16:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264599 - stable/9/usr.sbin/ntp/sntp X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2014 12:16:52 -0000 Author: des Date: Thu Apr 17 12:16:51 2014 New Revision: 264599 URL: http://svnweb.freebsd.org/changeset/base/264599 Log: MFH (r262555): install the sntp(1) man page Modified: stable/9/usr.sbin/ntp/sntp/Makefile Directory Properties: stable/9/usr.sbin/ntp/ (props changed) Modified: stable/9/usr.sbin/ntp/sntp/Makefile ============================================================================== --- stable/9/usr.sbin/ntp/sntp/Makefile Thu Apr 17 12:16:27 2014 (r264598) +++ stable/9/usr.sbin/ntp/sntp/Makefile Thu Apr 17 12:16:51 2014 (r264599) @@ -3,7 +3,7 @@ .PATH: ${.CURDIR}/../../../contrib/ntp/sntp PROG= sntp -NO_MAN= +MAN= sntp.1 SRCS= internet.c main.c socket.c timing.c unix.c CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../ \ From owner-svn-src-stable@FreeBSD.ORG Thu Apr 17 12:41:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9BDB65AB; Thu, 17 Apr 2014 12:41:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87C901739; Thu, 17 Apr 2014 12:41:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3HCfC7O033210; Thu, 17 Apr 2014 12:41:12 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3HCfCYJ033209; Thu, 17 Apr 2014 12:41:12 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201404171241.s3HCfCYJ033209@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 17 Apr 2014 12:41:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264602 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2014 12:41:12 -0000 Author: trasz Date: Thu Apr 17 12:41:12 2014 New Revision: 264602 URL: http://svnweb.freebsd.org/changeset/base/264602 Log: MFC r262837: Make reset handling in iSCSI target RFC-compliant. This fixes some rare hangs with Open-iSCSI (Linux). Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Thu Apr 17 12:33:26 2014 (r264601) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Thu Apr 17 12:41:12 2014 (r264602) @@ -633,11 +633,11 @@ cfiscsi_pdu_handle_task_request(struct i #endif io->taskio.task_action = CTL_TASK_LUN_RESET; break; - case BHSTMR_FUNCTION_TARGET_COLD_RESET: + case BHSTMR_FUNCTION_TARGET_WARM_RESET: #if 0 - CFISCSI_SESSION_DEBUG(cs, "BHSTMR_FUNCTION_TARGET_COLD_RESET"); + CFISCSI_SESSION_DEBUG(cs, "BHSTMR_FUNCTION_TARGET_WARM_RESET"); #endif - io->taskio.task_action = CTL_TASK_BUS_RESET; + io->taskio.task_action = CTL_TASK_TARGET_RESET; break; default: CFISCSI_SESSION_DEBUG(cs, "unsupported function 0x%x", From owner-svn-src-stable@FreeBSD.ORG Thu Apr 17 12:42:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D5266E9; Thu, 17 Apr 2014 12:42:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2FC1C1749; Thu, 17 Apr 2014 12:42:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3HCggJt035956; Thu, 17 Apr 2014 12:42:42 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3HCggot035955; Thu, 17 Apr 2014 12:42:42 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201404171242.s3HCggot035955@svn.freebsd.org> From: Julio Merino Date: Thu, 17 Apr 2014 12:42:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264603 - stable/10/share/examples/tests/tests/atf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2014 12:42:42 -0000 Author: jmmv Date: Thu Apr 17 12:42:41 2014 New Revision: 264603 URL: http://svnweb.freebsd.org/changeset/base/264603 Log: MFC r263173: Remove unnecessary svn:executable property from source file. Modified: Directory Properties: stable/10/ (props changed) stable/10/share/examples/tests/tests/atf/cp_test.sh (props changed) From owner-svn-src-stable@FreeBSD.ORG Thu Apr 17 13:10:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D366548A; Thu, 17 Apr 2014 13:10:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD32619D7; Thu, 17 Apr 2014 13:10:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3HDAU51046215; Thu, 17 Apr 2014 13:10:30 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3HDAUj7046214; Thu, 17 Apr 2014 13:10:30 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201404171310.s3HDAUj7046214@svn.freebsd.org> From: Julio Merino Date: Thu, 17 Apr 2014 13:10:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264606 - stable/10/share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2014 13:10:30 -0000 Author: jmmv Date: Thu Apr 17 13:10:30 2014 New Revision: 264606 URL: http://svnweb.freebsd.org/changeset/base/264606 Log: Regen src.conf.5. Notional merge of r264409 which regenerated this manpage after the rewording of WITH_TESTS. 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 Thu Apr 17 13:02:59 2014 (r264605) +++ stable/10/share/man/man5/src.conf.5 Thu Apr 17 13:10:30 2014 (r264606) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. -.\" from FreeBSD: head/tools/build/options/makeman 255964 2013-10-01 07:22:04Z des +.\" from FreeBSD: stable/10/tools/build/options/makeman 255964 2013-10-01 07:22:04Z des .\" $FreeBSD$ -.Dd March 1, 2014 +.Dd April 14, 2014 .Dt SRC.CONF 5 .Os .Sh NAME @@ -78,54 +78,54 @@ The following list provides a name and s that can be used for source builds. .Bl -tag -width indent .It Va WITHOUT_ACCT -.\" from FreeBSD: head/tools/build/options/WITHOUT_ACCT 223201 2011-06-17 20:47:44Z ed +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_ACCT 223201 2011-06-17 20:47:44Z ed Set to not build process accounting tools such as .Xr accton 8 and .Xr sa 8 . .It Va WITHOUT_ACPI -.\" from FreeBSD: head/tools/build/options/WITHOUT_ACPI 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_ACPI 156932 2006-03-21 07:50:50Z ru Set to not build .Xr acpiconf 8 , .Xr acpidump 8 and related programs. .It Va WITHOUT_AMD -.\" from FreeBSD: head/tools/build/options/WITHOUT_AMD 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_AMD 183242 2008-09-21 22:02:26Z sam Set to not build .Xr amd 8 , and related programs. .It Va WITHOUT_APM -.\" from FreeBSD: head/tools/build/options/WITHOUT_APM 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_APM 183242 2008-09-21 22:02:26Z sam Set to not build .Xr apm 8 , .Xr apmd 8 and related programs. .It Va WITHOUT_ARM_EABI -.\" from FreeBSD: head/tools/build/options/WITHOUT_ARM_EABI 253396 2013-07-16 19:15:19Z andrew +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_ARM_EABI 253396 2013-07-16 19:15:19Z andrew Set the ARM ABI to OABI. .It Va WITHOUT_ASSERT_DEBUG -.\" from FreeBSD: head/tools/build/options/WITHOUT_ASSERT_DEBUG 162215 2006-09-11 13:55:27Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_ASSERT_DEBUG 162215 2006-09-11 13:55:27Z ru Set to compile programs and libraries without the .Xr assert 3 checks. .It Va WITHOUT_AT -.\" from FreeBSD: head/tools/build/options/WITHOUT_AT 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_AT 183242 2008-09-21 22:02:26Z sam Set to not build .Xr at 1 and related utilities. .It Va WITHOUT_ATM -.\" from FreeBSD: head/tools/build/options/WITHOUT_ATM 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_ATM 156932 2006-03-21 07:50:50Z ru Set to not build programs and libraries related to ATM networking. .It Va WITHOUT_AUDIT -.\" from FreeBSD: head/tools/build/options/WITHOUT_AUDIT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_AUDIT 156932 2006-03-21 07:50:50Z ru Set to not build audit support into system programs. .It Va WITHOUT_AUTHPF -.\" from FreeBSD: head/tools/build/options/WITHOUT_AUTHPF 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_AUTHPF 156932 2006-03-21 07:50:50Z ru Set to not build .Xr authpf 8 . .It Va WITHOUT_BINUTILS -.\" from FreeBSD: head/tools/build/options/WITHOUT_BINUTILS 255974 2013-10-01 17:40:56Z emaste +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BINUTILS 255974 2013-10-01 17:40:56Z emaste Set to not install binutils (as, c++-filt, gconv, ld, nm, objcopy, objdump, readelf, size and strip). .Bf -symbolic @@ -133,34 +133,34 @@ The option does not generally work for b toolchain is enabled. .Ef .It Va WITHOUT_BLUETOOTH -.\" from FreeBSD: head/tools/build/options/WITHOUT_BLUETOOTH 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BLUETOOTH 156932 2006-03-21 07:50:50Z ru Set to not build Bluetooth related kernel modules, programs and libraries. .It Va WITHOUT_BMAKE -.\" from FreeBSD: head/tools/build/options/WITHOUT_BMAKE 250839 2013-05-21 00:41:49Z delphij +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BMAKE 264572 2014-04-16 23:12:35Z jmmv Set to not build and install the portable BSD make (bmake) as .Xr make 1 instead of the traditional FreeBSD make. This build option is temporary. -It allows developers to switch to bmake in order to work out any remaining -kinks or issues. +It allows developers to switch to the traditional FreeBSD make in order to +work out any remaining kinks or issues. This option will be removed in due time. .It Va WITHOUT_BOOT -.\" from FreeBSD: head/tools/build/options/WITHOUT_BOOT 156932 2006-03-21 07:50:50Z ru +.\" 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_BSD_CPIO -.\" from FreeBSD: head/tools/build/options/WITHOUT_BSD_CPIO 179813 2008-06-16 05:48:15Z dougb +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BSD_CPIO 179813 2008-06-16 05:48:15Z dougb Set to not build the BSD licensed version of cpio based on .Xr libarchive 3 . .It Va WITH_BSD_GREP -.\" from FreeBSD: head/tools/build/options/WITH_BSD_GREP 222273 2011-05-25 01:04:12Z obrien +.\" from FreeBSD: stable/10/tools/build/options/WITH_BSD_GREP 222273 2011-05-25 01:04:12Z obrien Install BSD-licensed grep as '[ef]grep' instead of GNU grep. .It Va WITHOUT_BSNMP -.\" from FreeBSD: head/tools/build/options/WITHOUT_BSNMP 183306 2008-09-23 16:15:42Z sam +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BSNMP 183306 2008-09-23 16:15:42Z sam Set to not build or install .Xr bsnmpd 1 and related libraries and data files. .It Va WITHOUT_BZIP2 -.\" from FreeBSD: head/tools/build/options/WITHOUT_BZIP2 174550 2007-12-12 16:43:17Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BZIP2 174550 2007-12-12 16:43:17Z ru Set to not build contributed bzip2 software as a part of the base system. .Bf -symbolic The option has no effect yet. @@ -172,17 +172,17 @@ When set, it also enforces the following .Va WITHOUT_BZIP2_SUPPORT .El .It Va WITHOUT_BZIP2_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_BZIP2_SUPPORT 166255 2007-01-26 10:19:08Z delphij +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BZIP2_SUPPORT 166255 2007-01-26 10:19:08Z delphij Set to build some programs without optional bzip2 support. .It Va WITHOUT_CALENDAR -.\" from FreeBSD: head/tools/build/options/WITHOUT_CALENDAR 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_CALENDAR 156932 2006-03-21 07:50:50Z ru Set to not build .Xr calendar 1 . .It Va WITHOUT_CAPSICUM -.\" from FreeBSD: head/tools/build/options/WITHOUT_CAPSICUM 229319 2012-01-02 21:57:58Z rwatson +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_CAPSICUM 229319 2012-01-02 21:57:58Z rwatson Set to not build Capsicum support into system programs. .It Va WITHOUT_CDDL -.\" from FreeBSD: head/tools/build/options/WITHOUT_CDDL 163861 2006-11-01 09:02:11Z jb +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_CDDL 163861 2006-11-01 09:02:11Z jb Set to not build code licensed under Sun's CDDL. When set, it also enforces the following options: .Pp @@ -193,7 +193,7 @@ When set, it also enforces the following .Va WITHOUT_ZFS .El .It Va WITHOUT_CLANG -.\" from FreeBSD: head/tools/build/options/WITHOUT_CLANG 208971 2010-06-10 06:20:26Z ed +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_CLANG 208971 2010-06-10 06:20:26Z ed Set to not build the Clang C/C++ compiler. .Pp It is a default setting on @@ -207,30 +207,30 @@ When set, it also enforces the following .Va WITHOUT_CLANG_FULL .El .It Va WITH_CLANG -.\" from FreeBSD: head/tools/build/options/WITH_CLANG 221730 2011-05-10 11:14:40Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITH_CLANG 221730 2011-05-10 11:14:40Z ru Set to build the Clang C/C++ compiler. .Pp It is a default setting on amd64/amd64, arm/arm, arm/armv6, i386/i386, pc98/i386, powerpc/powerpc and powerpc/powerpc64. .It Va WITH_CLANG_EXTRAS -.\" from FreeBSD: head/tools/build/options/WITH_CLANG_EXTRAS 231057 2012-02-05 23:56:22Z dim +.\" from FreeBSD: stable/10/tools/build/options/WITH_CLANG_EXTRAS 231057 2012-02-05 23:56:22Z dim Set to build additional clang and llvm tools, such as bugpoint. .It Va WITHOUT_CLANG_FULL -.\" from FreeBSD: head/tools/build/options/WITHOUT_CLANG_FULL 246259 2013-02-02 22:28:29Z dim +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_CLANG_FULL 246259 2013-02-02 22:28:29Z dim Set to avoid building the ARCMigrate, Rewriter and StaticAnalyzer components of the Clang C/C++ compiler. .Pp It is a default setting on arm/arm, arm/armeb, arm/armv6, ia64/ia64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32 and sparc64/sparc64. .It Va WITH_CLANG_FULL -.\" from FreeBSD: head/tools/build/options/WITH_CLANG_FULL 246259 2013-02-02 22:28:29Z dim +.\" from FreeBSD: stable/10/tools/build/options/WITH_CLANG_FULL 246259 2013-02-02 22:28:29Z dim Set to build the ARCMigrate, Rewriter and StaticAnalyzer components of the Clang C/C++ compiler. .Pp It is a default setting on amd64/amd64, i386/i386, pc98/i386, powerpc/powerpc and powerpc/powerpc64. .It Va WITHOUT_CLANG_IS_CC -.\" from FreeBSD: head/tools/build/options/WITHOUT_CLANG_IS_CC 242629 2012-11-05 21:53:23Z brooks +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_CLANG_IS_CC 242629 2012-11-05 21:53:23Z brooks Set to install the GCC compiler as .Pa /usr/bin/cc , .Pa /usr/bin/c++ @@ -246,7 +246,7 @@ When set, it also enforces the following .Va WITHOUT_LLDB .El .It Va WITH_CLANG_IS_CC -.\" from FreeBSD: head/tools/build/options/WITH_CLANG_IS_CC 235342 2012-05-12 16:12:36Z gjb +.\" from FreeBSD: stable/10/tools/build/options/WITH_CLANG_IS_CC 235342 2012-05-12 16:12:36Z gjb Set to install the Clang C/C++ compiler as .Pa /usr/bin/cc , .Pa /usr/bin/c++ @@ -256,15 +256,15 @@ and It is a default setting on amd64/amd64, arm/arm, arm/armv6, i386/i386 and pc98/i386. .It Va WITHOUT_CPP -.\" from FreeBSD: head/tools/build/options/WITHOUT_CPP 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_CPP 156932 2006-03-21 07:50:50Z ru Set to not build .Xr cpp 1 . .It Va WITHOUT_CROSS_COMPILER -.\" from FreeBSD: head/tools/build/options/WITHOUT_CROSS_COMPILER 250659 2013-05-15 14:30:03Z brooks +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_CROSS_COMPILER 250659 2013-05-15 14:30:03Z brooks Set to not build a cross compiler in the cross-tools stage of buildworld, buildkernel, etc. .It Va WITHOUT_CRYPT -.\" from FreeBSD: head/tools/build/options/WITHOUT_CRYPT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_CRYPT 156932 2006-03-21 07:50:50Z ru Set to not build any crypto code. When set, it also enforces the following options: .Pp @@ -288,17 +288,17 @@ When set, the following options are also is set explicitly) .El .It Va WITH_CTF -.\" from FreeBSD: head/tools/build/options/WITH_CTF 228159 2011-11-30 18:22:44Z fjoe +.\" from FreeBSD: stable/10/tools/build/options/WITH_CTF 228159 2011-11-30 18:22:44Z fjoe Set to compile with CTF (Compact C Type Format) data. CTF data encapsulates a reduced form of debugging information similar to DWARF and the venerable stabs and is required for DTrace. .It Va WITHOUT_CTM -.\" from FreeBSD: head/tools/build/options/WITHOUT_CTM 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_CTM 183242 2008-09-21 22:02:26Z sam Set to not build .Xr ctm 1 and related utilities. .It Va WITHOUT_CXX -.\" from FreeBSD: head/tools/build/options/WITHOUT_CXX 220402 2011-04-06 20:19:07Z uqs +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_CXX 220402 2011-04-06 20:19:07Z uqs Set to not build .Xr g++ 1 and related libraries. @@ -319,7 +319,7 @@ When set, it also enforces the following .Va WITHOUT_GROFF .El .It Va WITH_DEBUG_FILES -.\" from FreeBSD: head/tools/build/options/WITH_DEBUG_FILES 251512 2013-06-07 21:40:02Z emaste +.\" from FreeBSD: stable/10/tools/build/options/WITH_DEBUG_FILES 251512 2013-06-07 21:40:02Z emaste Set to strip debug info into a separate file for each executable binary and shared library. The debug files will be placed in a subdirectory of @@ -327,40 +327,40 @@ The debug files will be placed in a subd and are located automatically by .Xr gdb 1 . .It Va WITHOUT_DICT -.\" from FreeBSD: head/tools/build/options/WITHOUT_DICT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_DICT 156932 2006-03-21 07:50:50Z ru Set to not build the Webster dictionary files. .It Va WITHOUT_DYNAMICROOT -.\" from FreeBSD: head/tools/build/options/WITHOUT_DYNAMICROOT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_DYNAMICROOT 156932 2006-03-21 07:50:50Z ru Set this if you do not want to link .Pa /bin and .Pa /sbin dynamically. .It Va WITHOUT_ED_CRYPTO -.\" from FreeBSD: head/tools/build/options/WITHOUT_ED_CRYPTO 235660 2012-05-19 20:05:27Z marcel +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_ED_CRYPTO 235660 2012-05-19 20:05:27Z marcel Set to build .Xr ed 1 without support for encryption/decryption. .It Va WITHOUT_EXAMPLES -.\" from FreeBSD: head/tools/build/options/WITHOUT_EXAMPLES 156938 2006-03-21 09:06:24Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_EXAMPLES 156938 2006-03-21 09:06:24Z ru Set to avoid installing examples to .Pa /usr/share/examples/ . .It Va WITHOUT_FDT -.\" from FreeBSD: head/tools/build/options/WITHOUT_FDT 221539 2011-05-06 19:10:27Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_FDT 221539 2011-05-06 19:10:27Z ru Set to not build Flattened Device Tree support as part of the base system. This includes the device tree compiler (dtc) and libfdt support library. .Pp It is a default setting on amd64/amd64, i386/i386, ia64/ia64, pc98/i386 and sparc64/sparc64. .It Va WITH_FDT -.\" from FreeBSD: head/tools/build/options/WITH_FDT 221730 2011-05-10 11:14:40Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITH_FDT 221730 2011-05-10 11:14:40Z ru Set to build Flattened Device Tree support as part of the base system. This includes the device tree compiler (dtc) and libfdt support library. .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_FLOPPY -.\" from FreeBSD: head/tools/build/options/WITHOUT_FLOPPY 221540 2011-05-06 19:13:03Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_FLOPPY 221540 2011-05-06 19:13:03Z ru Set to not build or install programs for operating floppy disk driver. .It Va WITHOUT_FMTREE @@ -368,49 +368,49 @@ for operating floppy disk driver. Set to not build and install .Pa /usr/sbin/fmtree . .It Va WITHOUT_FORMAT_EXTENSIONS -.\" from FreeBSD: head/tools/build/options/WITHOUT_FORMAT_EXTENSIONS 250658 2013-05-15 13:04:10Z brooks +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_FORMAT_EXTENSIONS 250658 2013-05-15 13:04:10Z brooks Set to not enable .Fl fformat-extensions when compiling the kernel. Also disables all format checking. .It Va WITHOUT_FORTH -.\" from FreeBSD: head/tools/build/options/WITHOUT_FORTH 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_FORTH 156932 2006-03-21 07:50:50Z ru Set to build bootloaders without Forth support. .It Va WITHOUT_FP_LIBC -.\" from FreeBSD: head/tools/build/options/WITHOUT_FP_LIBC 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_FP_LIBC 156932 2006-03-21 07:50:50Z ru Set to build .Nm libc without floating-point support. .It Va WITHOUT_FREEBSD_UPDATE -.\" from FreeBSD: head/tools/build/options/WITHOUT_FREEBSD_UPDATE 183242 2008-09-21 22:02:26Z sam +.\" 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_GAMES -.\" from FreeBSD: head/tools/build/options/WITHOUT_GAMES 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_GAMES 156932 2006-03-21 07:50:50Z ru Set to not build games. .It Va WITHOUT_GCC -.\" from FreeBSD: head/tools/build/options/WITHOUT_GCC 255326 2013-09-06 20:49:48Z zeising +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_GCC 255326 2013-09-06 20:49:48Z zeising Set to not build and install gcc and g++. .Pp It is a default setting on amd64/amd64, arm/arm, arm/armv6 and i386/i386. .It Va WITH_GCC -.\" from FreeBSD: head/tools/build/options/WITH_GCC 255326 2013-09-06 20:49:48Z zeising +.\" from FreeBSD: stable/10/tools/build/options/WITH_GCC 255326 2013-09-06 20:49:48Z zeising Set to build and install gcc and g++. .Pp It is a default setting on arm/armeb, ia64/ia64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_GCOV -.\" from FreeBSD: head/tools/build/options/WITHOUT_GCOV 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_GCOV 156932 2006-03-21 07:50:50Z ru Set to not build the .Xr gcov 1 tool. .It Va WITHOUT_GDB -.\" from FreeBSD: head/tools/build/options/WITHOUT_GDB 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_GDB 156932 2006-03-21 07:50:50Z ru Set to not build .Xr gdb 1 . .It Va WITHOUT_GNU -.\" from FreeBSD: head/tools/build/options/WITHOUT_GNU 174550 2007-12-12 16:43:17Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_GNU 174550 2007-12-12 16:43:17Z ru Set to not build contributed GNU software as a part of the base system. This option can be useful if the system built must not contain any code covered by the GNU Public License due to legal reasons. @@ -424,36 +424,36 @@ When set, it also enforces the following .Va WITHOUT_GNU_SUPPORT .El .It Va WITHOUT_GNUCXX -.\" from FreeBSD: head/tools/build/options/WITHOUT_GNUCXX 255321 2013-09-06 20:08:03Z theraven +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_GNUCXX 255321 2013-09-06 20:08:03Z theraven Do not build the GNU C++ stack (g++, libstdc++). This is the default on platforms where clang is the system compiler. .Pp It is a default setting on amd64/amd64, arm/arm, arm/armv6, i386/i386 and pc98/i386. .It Va WITH_GNUCXX -.\" from FreeBSD: head/tools/build/options/WITH_GNUCXX 255321 2013-09-06 20:08:03Z theraven +.\" from FreeBSD: stable/10/tools/build/options/WITH_GNUCXX 255321 2013-09-06 20:08:03Z theraven Build the GNU C++ stack (g++, libstdc++). This is the default on platforms where gcc is the system compiler. .Pp It is a default setting on arm/armeb, ia64/ia64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_GNU_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_SUPPORT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_GNU_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build some programs without optional GNU support. .It Va WITHOUT_GPIB -.\" from FreeBSD: head/tools/build/options/WITHOUT_GPIB 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_GPIB 156932 2006-03-21 07:50:50Z ru Set to not build GPIB bus support. .It Va WITHOUT_GPIO -.\" from FreeBSD: head/tools/build/options/WITHOUT_GPIO 228081 2011-11-28 17:54:34Z dim +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_GPIO 228081 2011-11-28 17:54:34Z dim Set to not build .Xr gpioctl 8 as part of the base system. .It Va WITH_GPL_DTC -.\" from FreeBSD: head/tools/build/options/WITH_GPL_DTC 246262 2013-02-02 22:42:46Z dim +.\" from FreeBSD: stable/10/tools/build/options/WITH_GPL_DTC 246262 2013-02-02 22:42:46Z dim Set to build the GPL'd version of the device tree compiler from elinux.org, instead of the BSD licensed one. .It Va WITHOUT_GROFF -.\" from FreeBSD: head/tools/build/options/WITHOUT_GROFF 218941 2011-02-22 08:13:49Z uqs +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_GROFF 218941 2011-02-22 08:13:49Z uqs Set to not build .Xr groff 1 and @@ -461,19 +461,19 @@ and You should consider installing the textproc/groff port to not break .Xr man 1 . .It Va WITHOUT_GSSAPI -.\" from FreeBSD: head/tools/build/options/WITHOUT_GSSAPI 174548 2007-12-12 16:39:32Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_GSSAPI 174548 2007-12-12 16:39:32Z ru Set to not build libgssapi. .It Va WITH_HESIOD -.\" from FreeBSD: head/tools/build/options/WITH_HESIOD 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITH_HESIOD 156932 2006-03-21 07:50:50Z ru Set to build Hesiod support. .It Va WITHOUT_HTML -.\" from FreeBSD: head/tools/build/options/WITHOUT_HTML 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_HTML 156932 2006-03-21 07:50:50Z ru Set to not build HTML docs. .It Va WITHOUT_ICONV -.\" from FreeBSD: head/tools/build/options/WITHOUT_ICONV 254919 2013-08-26 17:15:56Z antoine +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_ICONV 254919 2013-08-26 17:15:56Z antoine Set to not build iconv as part of libc. .It Va WITHOUT_INET -.\" from FreeBSD: head/tools/build/options/WITHOUT_INET 221266 2011-04-30 17:58:28Z bz +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_INET 221266 2011-04-30 17:58:28Z bz Set to not build programs and libraries related to IPv4 networking. When set, it also enforces the following options: .Pp @@ -482,7 +482,7 @@ When set, it also enforces the following .Va WITHOUT_INET_SUPPORT .El .It Va WITHOUT_INET6 -.\" from FreeBSD: head/tools/build/options/WITHOUT_INET6 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_INET6 156932 2006-03-21 07:50:50Z ru Set to not build programs and libraries related to IPv6 networking. When set, it also enforces the following options: @@ -492,24 +492,24 @@ When set, it also enforces the following .Va WITHOUT_INET6_SUPPORT .El .It Va WITHOUT_INET6_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_INET6_SUPPORT 156932 2006-03-21 07:50:50Z ru +.\" 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_INET_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_INET_SUPPORT 221266 2011-04-30 17:58:28Z bz +.\" 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. .It Va WITHOUT_INFO -.\" from FreeBSD: head/tools/build/options/WITHOUT_INFO 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_INFO 156932 2006-03-21 07:50:50Z ru Set to not make or install .Xr info 5 files. .It Va WITHOUT_INSTALLLIB -.\" from FreeBSD: head/tools/build/options/WITHOUT_INSTALLLIB 174497 2007-12-09 21:56:21Z dougb +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_INSTALLLIB 174497 2007-12-09 21:56:21Z dougb Set this if you do not want to install optional libraries. For example when creating a .Xr nanobsd 8 image. .It Va WITH_INSTALL_AS_USER -.\" from FreeBSD: head/tools/build/options/WITH_INSTALL_AS_USER 238021 2012-07-02 20:24:01Z marcel +.\" from FreeBSD: stable/10/tools/build/options/WITH_INSTALL_AS_USER 238021 2012-07-02 20:24:01Z marcel Set to make install targets succeed for non-root users by installing files with owner and group attributes set to that of the user running the @@ -519,13 +519,13 @@ The user still has to set the .Va DESTDIR variable to point to a directory where the user has write permissions. .It Va WITHOUT_IPFILTER -.\" from FreeBSD: head/tools/build/options/WITHOUT_IPFILTER 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_IPFILTER 156932 2006-03-21 07:50:50Z ru Set to not build IP Filter package. .It Va WITHOUT_IPFW -.\" from FreeBSD: head/tools/build/options/WITHOUT_IPFW 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_IPFW 183242 2008-09-21 22:02:26Z sam Set to not build IPFW tools. .It Va WITHOUT_IPX -.\" from FreeBSD: head/tools/build/options/WITHOUT_IPX 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_IPX 156932 2006-03-21 07:50:50Z ru Set to not build programs and libraries related to IPX networking. When set, it also enforces the following options: .Pp @@ -534,20 +534,20 @@ When set, it also enforces the following .Va WITHOUT_IPX_SUPPORT .El .It Va WITHOUT_IPX_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_IPX_SUPPORT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_IPX_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build some programs without IPX support. .It Va WITHOUT_JAIL -.\" from FreeBSD: head/tools/build/options/WITHOUT_JAIL 249966 2013-04-27 04:09:09Z eadler +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_JAIL 249966 2013-04-27 04:09:09Z eadler Set to not build tools for the support of jails; e.g., .Xr jail 8 . .It Va WITHOUT_KDUMP -.\" from FreeBSD: head/tools/build/options/WITHOUT_KDUMP 240690 2012-09-19 11:38:37Z zeising +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_KDUMP 240690 2012-09-19 11:38:37Z zeising Set to not build .Xr kdump 1 and .Xr truss 1 . .It Va WITHOUT_KERBEROS -.\" from FreeBSD: head/tools/build/options/WITHOUT_KERBEROS 174549 2007-12-12 16:42:03Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_KERBEROS 174549 2007-12-12 16:42:03Z ru Set this if you do not want to build Kerberos 5 (KTH Heimdal). When set, it also enforces the following options: .Pp @@ -565,7 +565,7 @@ When set, the following options are also is set explicitly) .El .It Va WITHOUT_KERBEROS_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_KERBEROS_SUPPORT 251794 2013-06-15 20:29:07Z eadler +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_KERBEROS_SUPPORT 251794 2013-06-15 20:29:07Z eadler Set to build some programs without Kerberos support, like .Xr ssh 1 , .Xr telnet 1 , @@ -573,13 +573,13 @@ Set to build some programs without Kerbe and .Xr telnetd 8 . .It Va WITHOUT_KERNEL_SYMBOLS -.\" from FreeBSD: head/tools/build/options/WITHOUT_KERNEL_SYMBOLS 222189 2011-05-22 18:23:17Z imp +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_KERNEL_SYMBOLS 222189 2011-05-22 18:23:17Z imp Set to not install kernel symbol files. .Bf -symbolic This option is recommended for those people who have small root partitions. .Ef .It Va WITHOUT_KVM -.\" from FreeBSD: head/tools/build/options/WITHOUT_KVM 174550 2007-12-12 16:43:17Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_KVM 174550 2007-12-12 16:43:17Z ru Set to not build the .Nm libkvm library as a part of the base system. @@ -593,12 +593,12 @@ When set, it also enforces the following .Va WITHOUT_KVM_SUPPORT .El .It Va WITHOUT_KVM_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_KVM_SUPPORT 170644 2007-06-13 02:08:04Z sepotvin +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_KVM_SUPPORT 170644 2007-06-13 02:08:04Z sepotvin Set to build some programs without optional .Nm libkvm support. .It Va WITHOUT_LDNS -.\" from FreeBSD: head/tools/build/options/WITHOUT_LDNS 255591 2013-09-15 13:11:13Z des +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_LDNS 255591 2013-09-15 13:11:13Z des Setting this variable will prevent the LDNS library from being built. When set, it also enforces the following options: .Pp @@ -609,27 +609,27 @@ When set, it also enforces the following .Va WITHOUT_UNBOUND .El .It Va WITHOUT_LDNS_UTILS -.\" from FreeBSD: head/tools/build/options/WITHOUT_LDNS_UTILS 255850 2013-09-24 14:33:31Z des +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_LDNS_UTILS 255850 2013-09-24 14:33:31Z des Setting this variable will prevent building the LDNS utilities .Xr drill 1 and .Xr host 1 . .It Va WITHOUT_LEGACY_CONSOLE -.\" from FreeBSD: head/tools/build/options/WITHOUT_LEGACY_CONSOLE 249966 2013-04-27 04:09:09Z eadler +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_LEGACY_CONSOLE 249966 2013-04-27 04:09:09Z eadler Set to not build programs that support a legacy PC console; e.g., .Xr kbdcontrol 8 and .Xr vidcontrol 8 . .It Va WITHOUT_LIB32 -.\" from FreeBSD: head/tools/build/options/WITHOUT_LIB32 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_LIB32 156932 2006-03-21 07:50:50Z ru On amd64, set to not build 32-bit library set and a .Nm ld-elf32.so.1 runtime linker. .It Va WITHOUT_LIBCPLUSPLUS -.\" from FreeBSD: head/tools/build/options/WITHOUT_LIBCPLUSPLUS 246262 2013-02-02 22:42:46Z dim +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_LIBCPLUSPLUS 246262 2013-02-02 22:42:46Z dim Set to avoid building libcxxrt and libc++. .It Va WITHOUT_LIBPTHREAD -.\" from FreeBSD: head/tools/build/options/WITHOUT_LIBPTHREAD 188848 2009-02-20 11:09:55Z mtm +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_LIBPTHREAD 188848 2009-02-20 11:09:55Z mtm Set to not build the .Nm libpthread providing library, @@ -641,35 +641,35 @@ When set, it also enforces the following .Va WITHOUT_LIBTHR .El .It Va WITHOUT_LIBTHR -.\" from FreeBSD: head/tools/build/options/WITHOUT_LIBTHR 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_LIBTHR 156932 2006-03-21 07:50:50Z ru Set to not build the .Nm libthr (1:1 threading) library. .It Va WITH_LLDB -.\" from FreeBSD: head/tools/build/options/WITH_LLDB 255722 2013-09-20 01:52:02Z emaste +.\" from FreeBSD: stable/10/tools/build/options/WITH_LLDB 255722 2013-09-20 01:52:02Z emaste Set to build the LLDB debugger. .It Va WITHOUT_LOCALES -.\" from FreeBSD: head/tools/build/options/WITHOUT_LOCALES 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_LOCALES 156932 2006-03-21 07:50:50Z ru Set to not build localization files; see .Xr locale 1 . .It Va WITHOUT_LOCATE -.\" from FreeBSD: head/tools/build/options/WITHOUT_LOCATE 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_LOCATE 183242 2008-09-21 22:02:26Z sam Set to not build .Xr locate 1 and related programs. .It Va WITHOUT_LPR -.\" from FreeBSD: head/tools/build/options/WITHOUT_LPR 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_LPR 156932 2006-03-21 07:50:50Z ru Set to not build .Xr lpr 1 and related programs. .It Va WITHOUT_LS_COLORS -.\" from FreeBSD: head/tools/build/options/WITHOUT_LS_COLORS 235660 2012-05-19 20:05:27Z marcel +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_LS_COLORS 235660 2012-05-19 20:05:27Z marcel Set to build .Xr ls 1 without support for colors to distinguish file types. .It Va WITHOUT_MAIL -.\" from FreeBSD: head/tools/build/options/WITHOUT_MAIL 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_MAIL 183242 2008-09-21 22:02:26Z sam Set to not build any mail support (MUA or MTA). When set, it also enforces the following options: .Pp @@ -680,17 +680,17 @@ When set, it also enforces the following .Va WITHOUT_SENDMAIL .El .It Va WITHOUT_MAILWRAPPER -.\" from FreeBSD: head/tools/build/options/WITHOUT_MAILWRAPPER 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_MAILWRAPPER 156932 2006-03-21 07:50:50Z ru Set to not build the .Xr mailwrapper 8 MTA selector. .It Va WITHOUT_MAKE -.\" from FreeBSD: head/tools/build/options/WITHOUT_MAKE 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_MAKE 183242 2008-09-21 22:02:26Z sam Set to not install .Xr make 1 and related support files. .It Va WITHOUT_MAN -.\" from FreeBSD: head/tools/build/options/WITHOUT_MAN 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_MAN 156932 2006-03-21 07:50:50Z ru Set to not build manual pages. When set, the following options are also in effect: .Pp @@ -701,7 +701,7 @@ When set, the following options are also is set explicitly) .El .It Va WITHOUT_MAN_UTILS -.\" from FreeBSD: head/tools/build/options/WITHOUT_MAN_UTILS 208322 2010-05-20 00:07:21Z jkim +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_MAN_UTILS 208322 2010-05-20 00:07:21Z jkim Set to not build utilities for manual pages, .Xr apropos 1 , .Xr catman 1 , @@ -711,7 +711,7 @@ Set to not build utilities for manual pa .Xr manctl 8 , and related support files. .It Va WITH_NAND -.\" from FreeBSD: head/tools/build/options/WITH_NAND 235537 2012-05-17 10:11:18Z gber +.\" from FreeBSD: stable/10/tools/build/options/WITH_NAND 235537 2012-05-17 10:11:18Z gber Set to build the NAND Flash components. .It Va WITHOUT_NCURSESW .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_NCURSESW 262644 2014-03-01 03:11:26Z brooks @@ -719,16 +719,16 @@ Set to not build or depend on the .Nm libncursesw library. .It Va WITHOUT_NDIS -.\" from FreeBSD: head/tools/build/options/WITHOUT_NDIS 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_NDIS 183242 2008-09-21 22:02:26Z sam Set to not build programs and libraries related to NDIS emulation support. .It Va WITHOUT_NETCAT -.\" from FreeBSD: head/tools/build/options/WITHOUT_NETCAT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_NETCAT 156932 2006-03-21 07:50:50Z ru Set to not build .Xr nc 1 utility. .It Va WITHOUT_NETGRAPH -.\" from FreeBSD: head/tools/build/options/WITHOUT_NETGRAPH 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_NETGRAPH 183242 2008-09-21 22:02:26Z sam Set to not build applications to support .Xr netgraph 4 . When set, it also enforces the following options: @@ -742,10 +742,10 @@ When set, it also enforces the following .Va WITHOUT_NETGRAPH_SUPPORT .El .It Va WITHOUT_NETGRAPH_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_NETGRAPH_SUPPORT 183305 2008-09-23 16:11:15Z sam +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_NETGRAPH_SUPPORT 183305 2008-09-23 16:11:15Z sam Set to build libraries, programs, and kernel modules without netgraph support. .It Va WITHOUT_NIS -.\" from FreeBSD: head/tools/build/options/WITHOUT_NIS 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_NIS 156932 2006-03-21 07:50:50Z ru Set to not build .Xr NIS 8 support and related programs. @@ -755,10 +755,10 @@ and remove .Sq nis entries. .It Va WITHOUT_NLS -.\" from FreeBSD: head/tools/build/options/WITHOUT_NLS 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_NLS 156932 2006-03-21 07:50:50Z ru Set to not build NLS catalogs. .It Va WITHOUT_NLS_CATALOGS -.\" from FreeBSD: head/tools/build/options/WITHOUT_NLS_CATALOGS 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_NLS_CATALOGS 156932 2006-03-21 07:50:50Z ru Set to not build NLS catalog support for .Xr csh 1 . .It Va WITHOUT_NMTREE @@ -772,7 +772,7 @@ By default is installed as .Xr mtree 8 . .It Va WITHOUT_NS_CACHING -.\" from FreeBSD: head/tools/build/options/WITHOUT_NS_CACHING 172803 2007-10-19 14:01:25Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_NS_CACHING 172803 2007-10-19 14:01:25Z ru Set to disable name caching in the .Pa nsswitch subsystem. @@ -780,20 +780,20 @@ The generic caching daemon, .Xr nscd 8 , will not be built either if this option is set. .It Va WITHOUT_NTP -.\" from FreeBSD: head/tools/build/options/WITHOUT_NTP 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_NTP 183242 2008-09-21 22:02:26Z sam Set to not build .Xr ntpd 8 and related programs. .It Va WITH_OFED -.\" from FreeBSD: head/tools/build/options/WITH_OFED 228081 2011-11-28 17:54:34Z dim +.\" from FreeBSD: stable/10/tools/build/options/WITH_OFED 228081 2011-11-28 17:54:34Z dim Set to build the .Dq "OpenFabrics Enterprise Distribution" Infiniband software stack. .It Va WITHOUT_OPENSSH -.\" from FreeBSD: head/tools/build/options/WITHOUT_OPENSSH 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_OPENSSH 156932 2006-03-21 07:50:50Z ru Set to not build OpenSSH. .It Va WITH_OPENSSH_NONE_CIPHER -.\" from FreeBSD: head/tools/build/options/WITH_OPENSSH_NONE_CIPHER 245527 2013-01-17 01:51:04Z bz +.\" from FreeBSD: stable/10/tools/build/options/WITH_OPENSSH_NONE_CIPHER 245527 2013-01-17 01:51:04Z bz Set to include the "None" cipher support in OpenSSH and its libraries. Additional adjustments may need to be done to system configuration files, such as @@ -803,7 +803,7 @@ Please see .Pa /usr/src/crypto/openssh/README.hpn for full details. .It Va WITHOUT_OPENSSL -.\" from FreeBSD: head/tools/build/options/WITHOUT_OPENSSL 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_OPENSSL 156932 2006-03-21 07:50:50Z ru Set to not build OpenSSL. When set, it also enforces the following options: .Pp @@ -825,7 +825,7 @@ When set, the following options are also is set explicitly) .El .It Va WITHOUT_PAM -.\" from FreeBSD: head/tools/build/options/WITHOUT_PAM 174550 2007-12-12 16:43:17Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_PAM 174550 2007-12-12 16:43:17Z ru Set to not build PAM library and modules. .Bf -symbolic This option is deprecated and does nothing. @@ -837,18 +837,18 @@ When set, it also enforces the following .Va WITHOUT_PAM_SUPPORT .El .It Va WITHOUT_PAM_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_PAM_SUPPORT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_PAM_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build some programs without PAM support, particularly .Xr ftpd 8 and .Xr ppp 8 . .It Va WITHOUT_PC_SYSINSTALL -.\" from FreeBSD: head/tools/build/options/WITHOUT_PC_SYSINSTALL 245606 2013-01-18 15:57:09Z eadler +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_PC_SYSINSTALL 245606 2013-01-18 15:57:09Z eadler Set to not build .Xr pc-sysinstall 8 and related programs. .It Va WITHOUT_PF -.\" from FreeBSD: head/tools/build/options/WITHOUT_PF 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_PF 156932 2006-03-21 07:50:50Z ru Set to not build PF firewall package. When set, it also enforces the following options: .Pp @@ -862,35 +862,35 @@ Set to not build .Xr pkg 7 bootstrap tool. .It Va WITH_PKGTOOLS -.\" from FreeBSD: head/tools/build/options/WITH_PKGTOOLS 253305 2013-07-12 23:11:17Z bapt +.\" from FreeBSD: stable/10/tools/build/options/WITH_PKGTOOLS 253305 2013-07-12 23:11:17Z bapt Set to build .Xr pkg_add 8 and related programs. .It Va WITHOUT_PMC -.\" from FreeBSD: head/tools/build/options/WITHOUT_PMC 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_PMC 183242 2008-09-21 22:02:26Z sam Set to not build .Xr pmccontrol 8 and related programs. .It Va WITHOUT_PORTSNAP -.\" from FreeBSD: head/tools/build/options/WITHOUT_PORTSNAP 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_PORTSNAP 183242 2008-09-21 22:02:26Z sam Set to not build or install .Xr portsnap 8 and related files. .It Va WITHOUT_PPP -.\" from FreeBSD: head/tools/build/options/WITHOUT_PPP 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_PPP 183242 2008-09-21 22:02:26Z sam Set to not build .Xr ppp 8 and related programs. .It Va WITHOUT_PROFILE -.\" from FreeBSD: head/tools/build/options/WITHOUT_PROFILE 228196 2011-12-02 09:09:54Z fjoe +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_PROFILE 228196 2011-12-02 09:09:54Z fjoe Set to avoid compiling profiled libraries. .It Va WITHOUT_QUOTAS -.\" from FreeBSD: head/tools/build/options/WITHOUT_QUOTAS 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_QUOTAS 183242 2008-09-21 22:02:26Z sam Set to not build .Xr quota 8 and related programs. .It Va WITHOUT_RCMDS -.\" from FreeBSD: head/tools/build/options/WITHOUT_RCMDS 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_RCMDS 156932 2006-03-21 07:50:50Z ru Disable building of the .Bx r-commands. @@ -899,43 +899,43 @@ This includes .Xr rsh 1 , etc. .It Va WITHOUT_RCS -.\" from FreeBSD: head/tools/build/options/WITHOUT_RCS 256198 2013-10-09 17:07:20Z gjb +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_RCS 256198 2013-10-09 17:07:20Z gjb Set to not build .Xr rcs 1 and related utilities. .It Va WITHOUT_RESCUE -.\" from FreeBSD: head/tools/build/options/WITHOUT_RESCUE 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_RESCUE 156932 2006-03-21 07:50:50Z ru Set to not build .Xr rescue 8 . .It Va WITHOUT_ROUTED -.\" from FreeBSD: head/tools/build/options/WITHOUT_ROUTED 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_ROUTED 183242 2008-09-21 22:02:26Z sam Set to not build .Xr routed 8 utility. .It Va WITHOUT_SENDMAIL -.\" from FreeBSD: head/tools/build/options/WITHOUT_SENDMAIL 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_SENDMAIL 156932 2006-03-21 07:50:50Z ru Set to not build .Xr sendmail 8 and related programs. .It Va WITHOUT_SETUID_LOGIN -.\" from FreeBSD: head/tools/build/options/WITHOUT_SETUID_LOGIN 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_SETUID_LOGIN 156932 2006-03-21 07:50:50Z ru Set this to disable the installation of .Xr login 1 as a set-user-ID root program. .It Va WITHOUT_SHAREDOCS -.\" from FreeBSD: head/tools/build/options/WITHOUT_SHAREDOCS 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_SHAREDOCS 156932 2006-03-21 07:50:50Z ru Set to not build the .Bx 4.4 legacy docs. .It Va WITH_SHARED_TOOLCHAIN -.\" from FreeBSD: head/tools/build/options/WITH_SHARED_TOOLCHAIN 235342 2012-05-12 16:12:36Z gjb +.\" from FreeBSD: stable/10/tools/build/options/WITH_SHARED_TOOLCHAIN 235342 2012-05-12 16:12:36Z gjb Set to build the toolchain binaries shared. The set includes .Xr cc 1 , .Xr make 1 and necessary utilities like assembler, linker and library archive manager. .It Va WITHOUT_SOURCELESS -.\" from FreeBSD: head/tools/build/options/WITHOUT_SOURCELESS 230972 2012-02-04 00:54:43Z rmh +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_SOURCELESS 230972 2012-02-04 00:54:43Z rmh Set to not build kernel modules that include sourceless code (either microcode or native code for host CPU). When set, it also enforces the following options: .Pp @@ -946,51 +946,59 @@ When set, it also enforces the following .Va WITHOUT_SOURCELESS_UCODE .El .It Va WITHOUT_SOURCELESS_HOST -.\" from FreeBSD: head/tools/build/options/WITHOUT_SOURCELESS_HOST 230972 2012-02-04 00:54:43Z rmh +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_SOURCELESS_HOST 230972 2012-02-04 00:54:43Z rmh Set to not build kernel modules that include sourceless native code for host CPU. .It Va WITHOUT_SOURCELESS_UCODE -.\" from FreeBSD: head/tools/build/options/WITHOUT_SOURCELESS_UCODE 230972 2012-02-04 00:54:43Z rmh +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_SOURCELESS_UCODE 230972 2012-02-04 00:54:43Z rmh Set to not build kernel modules that include sourceless microcode. .It Va WITHOUT_SSP -.\" from FreeBSD: head/tools/build/options/WITHOUT_SSP 180012 2008-06-25 21:33:28Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_SSP 180012 2008-06-25 21:33:28Z ru Set to not build world with propolice stack smashing protection. .It Va WITH_SVN -.\" from FreeBSD: head/tools/build/options/WITH_SVN 252561 2013-07-03 12:36:47Z zeising +.\" from FreeBSD: stable/10/tools/build/options/WITH_SVN 252561 2013-07-03 12:36:47Z zeising Set to install .Xr svnlite 1 as .Xr svn 1 . .It Va WITHOUT_SVNLITE -.\" from FreeBSD: head/tools/build/options/WITHOUT_SVNLITE 252561 2013-07-03 12:36:47Z zeising +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_SVNLITE 252561 2013-07-03 12:36:47Z zeising Set to not build .Xr svnlite 1 and related programs. .It Va WITHOUT_SYMVER -.\" from FreeBSD: head/tools/build/options/WITHOUT_SYMVER 169649 2007-05-17 05:03:24Z deischen +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_SYMVER 169649 2007-05-17 05:03:24Z deischen Set to disable symbol versioning when building shared libraries. .It Va WITHOUT_SYSCONS -.\" from FreeBSD: head/tools/build/options/WITHOUT_SYSCONS 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_SYSCONS 156932 2006-03-21 07:50:50Z ru Set to not build .Xr syscons 4 support files such as keyboard maps, fonts, and screen output maps. .It Va WITHOUT_SYSINSTALL -.\" from FreeBSD: head/tools/build/options/WITHOUT_SYSINSTALL 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_SYSINSTALL 183242 2008-09-21 22:02:26Z sam Set to not build .Xr sysinstall 8 and related programs. .It Va WITHOUT_TCSH -.\" from FreeBSD: head/tools/build/options/WITHOUT_TCSH 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_TCSH 156932 2006-03-21 07:50:50Z ru Set to not build and install .Pa /bin/csh (which is .Xr tcsh 1 ) . .It Va WITHOUT_TELNET -.\" from FreeBSD: head/tools/build/options/WITHOUT_TELNET 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_TELNET 183242 2008-09-21 22:02:26Z sam Set to not build .Xr telnet 8 and related programs. +.It Va WITH_TESTS +.\" from FreeBSD: stable/10/tools/build/options/WITH_TESTS 264572 2014-04-16 23:12:35Z jmmv +Set to install the +.Fx +Test Suite. +See +.Xr tests 7 +for more details. .It Va WITHOUT_TEXTPROC -.\" from FreeBSD: head/tools/build/options/WITHOUT_TEXTPROC 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_TEXTPROC 183242 2008-09-21 22:02:26Z sam Set to not build programs used for text processing. When set, it also enforces the following options: @@ -1000,7 +1008,7 @@ When set, it also enforces the following .Va WITHOUT_GROFF .El .It Va WITHOUT_TOOLCHAIN -.\" from FreeBSD: head/tools/build/options/WITHOUT_TOOLCHAIN 174550 2007-12-12 16:43:17Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_TOOLCHAIN 174550 2007-12-12 16:43:17Z ru Set to not install programs used for program development, compilers, debuggers etc. @@ -1024,18 +1032,18 @@ When set, it also enforces the following .Va WITHOUT_GDB .El .It Va WITHOUT_UNBOUND -.\" from FreeBSD: head/tools/build/options/WITHOUT_UNBOUND 255597 2013-09-15 14:51:23Z des +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_UNBOUND 255597 2013-09-15 14:51:23Z des Set to not build .Xr unbound 8 and related programs. .It Va WITHOUT_USB -.\" from FreeBSD: head/tools/build/options/WITHOUT_USB 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_USB 156932 2006-03-21 07:50:50Z ru Set to not build USB-related programs and libraries. .It Va WITH_USB_GADGET_EXAMPLES -.\" from FreeBSD: head/tools/build/options/WITH_USB_GADGET_EXAMPLES 254919 2013-08-26 17:15:56Z antoine +.\" from FreeBSD: stable/10/tools/build/options/WITH_USB_GADGET_EXAMPLES 254919 2013-08-26 17:15:56Z antoine Set to build USB gadget kernel modules. .It Va WITHOUT_UTMPX -.\" from FreeBSD: head/tools/build/options/WITHOUT_UTMPX 231530 2012-02-11 20:28:42Z ed +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_UTMPX 231530 2012-02-11 20:28:42Z ed Set to not build user accounting tools such as .Xr last 1 , .Xr users 1 , @@ -1045,7 +1053,7 @@ Set to not build user accounting tools s and .Xr utx 8 . .It Va WITHOUT_WIRELESS -.\" from FreeBSD: head/tools/build/options/WITHOUT_WIRELESS 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_WIRELESS 183242 2008-09-21 22:02:26Z sam Set to not build programs used for 802.11 wireless networks; especially .Xr wpa_supplicant 8 and @@ -1057,21 +1065,21 @@ When set, it also enforces the following .Va WITHOUT_WIRELESS_SUPPORT .El .It Va WITHOUT_WIRELESS_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_WIRELESS_SUPPORT 183305 2008-09-23 16:11:15Z sam +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_WIRELESS_SUPPORT 183305 2008-09-23 16:11:15Z sam Set to build libraries, programs, and kernel modules without 802.11 wireless support. .It Va WITHOUT_WPA_SUPPLICANT_EAPOL -.\" from FreeBSD: head/tools/build/options/WITHOUT_WPA_SUPPLICANT_EAPOL 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_WPA_SUPPLICANT_EAPOL 156932 2006-03-21 07:50:50Z ru Build .Xr wpa_supplicant 8 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu Apr 17 13:11:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 341AA5C3; Thu, 17 Apr 2014 13:11:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 207431A5A; Thu, 17 Apr 2014 13:11:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3HDBuiP048687; Thu, 17 Apr 2014 13:11:56 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3HDBupY048686; Thu, 17 Apr 2014 13:11:56 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201404171311.s3HDBupY048686@svn.freebsd.org> From: Julio Merino Date: Thu, 17 Apr 2014 13:11:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264607 - stable/10/tests/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2014 13:11:57 -0000 Author: jmmv Date: Thu Apr 17 13:11:56 2014 New Revision: 264607 URL: http://svnweb.freebsd.org/changeset/base/264607 Log: MFC r264133: Fix variable type to avoid printf formatter warning. Modified: stable/10/tests/sys/kern/unix_seqpacket_test.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tests/sys/kern/unix_seqpacket_test.c ============================================================================== --- stable/10/tests/sys/kern/unix_seqpacket_test.c Thu Apr 17 13:10:30 2014 (r264606) +++ stable/10/tests/sys/kern/unix_seqpacket_test.c Thu Apr 17 13:11:56 2014 (r264607) @@ -872,7 +872,7 @@ ATF_TC_BODY(rcvbuf_oversized, tc) { int i; int sv[2]; - const int pktsize = 1024; + const ssize_t pktsize = 1024; const size_t sndbufsize = 8192; const size_t rcvbufsize = 131072; const size_t geometric_mean_bufsize = 32768; From owner-svn-src-stable@FreeBSD.ORG Thu Apr 17 14:18:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1C0835C; Thu, 17 Apr 2014 14:18:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDCE31434; Thu, 17 Apr 2014 14:18:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3HEIUXp075342; Thu, 17 Apr 2014 14:18:30 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3HEIUQm075341; Thu, 17 Apr 2014 14:18:30 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201404171418.s3HEIUQm075341@svn.freebsd.org> From: Aleksandr Rybalko Date: Thu, 17 Apr 2014 14:18:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264611 - stable/10/sys/dev/vt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2014 14:18:31 -0000 Author: ray Date: Thu Apr 17 14:18:30 2014 New Revision: 264611 URL: http://svnweb.freebsd.org/changeset/base/264611 Log: MFC r264258 Fix cursor color in reverse video mode. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/vt_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/vt_core.c ============================================================================== --- stable/10/sys/dev/vt/vt_core.c Thu Apr 17 14:16:02 2014 (r264610) +++ stable/10/sys/dev/vt/vt_core.c Thu Apr 17 14:18:30 2014 (r264611) @@ -652,24 +652,26 @@ static inline void vt_determine_colors(term_char_t c, int cursor, term_color_t *fg, term_color_t *bg) { + term_color_t tmp; + int invert; + + invert = 0; *fg = TCHAR_FGCOLOR(c); if (TCHAR_FORMAT(c) & TF_BOLD) *fg = TCOLOR_LIGHT(*fg); *bg = TCHAR_BGCOLOR(c); - if (TCHAR_FORMAT(c) & TF_REVERSE) { - term_color_t tmp; + if (TCHAR_FORMAT(c) & TF_REVERSE) + invert ^= 1; + if (cursor) + invert ^= 1; + if (invert) { tmp = *fg; *fg = *bg; *bg = tmp; } - - if (cursor) { - *fg = *bg; - *bg = TC_WHITE; - } } static void From owner-svn-src-stable@FreeBSD.ORG Thu Apr 17 14:19:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B9F1A4AD; Thu, 17 Apr 2014 14:19:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A685B1445; Thu, 17 Apr 2014 14:19:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3HEJWsV075497; Thu, 17 Apr 2014 14:19:32 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3HEJW2a075496; Thu, 17 Apr 2014 14:19:32 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201404171419.s3HEJW2a075496@svn.freebsd.org> From: Aleksandr Rybalko Date: Thu, 17 Apr 2014 14:19:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264612 - stable/9/sys/dev/vt X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2014 14:19:32 -0000 Author: ray Date: Thu Apr 17 14:19:32 2014 New Revision: 264612 URL: http://svnweb.freebsd.org/changeset/base/264612 Log: MFC r264258 Fix cursor color in reverse video mode. Sponsored by: The FreeBSD Foundation Modified: stable/9/sys/dev/vt/vt_core.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/vt/vt_core.c ============================================================================== --- stable/9/sys/dev/vt/vt_core.c Thu Apr 17 14:18:30 2014 (r264611) +++ stable/9/sys/dev/vt/vt_core.c Thu Apr 17 14:19:32 2014 (r264612) @@ -652,24 +652,26 @@ static inline void vt_determine_colors(term_char_t c, int cursor, term_color_t *fg, term_color_t *bg) { + term_color_t tmp; + int invert; + + invert = 0; *fg = TCHAR_FGCOLOR(c); if (TCHAR_FORMAT(c) & TF_BOLD) *fg = TCOLOR_LIGHT(*fg); *bg = TCHAR_BGCOLOR(c); - if (TCHAR_FORMAT(c) & TF_REVERSE) { - term_color_t tmp; + if (TCHAR_FORMAT(c) & TF_REVERSE) + invert ^= 1; + if (cursor) + invert ^= 1; + if (invert) { tmp = *fg; *fg = *bg; *bg = tmp; } - - if (cursor) { - *fg = *bg; - *bg = TC_WHITE; - } } static void From owner-svn-src-stable@FreeBSD.ORG Thu Apr 17 17:20:58 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8333286A; Thu, 17 Apr 2014 17:20:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C3BF195F; Thu, 17 Apr 2014 17:20:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3HHKwTl053569; Thu, 17 Apr 2014 17:20:58 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3HHKu0P053557; Thu, 17 Apr 2014 17:20:56 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201404171720.s3HHKu0P053557@svn.freebsd.org> From: Julio Merino Date: Thu, 17 Apr 2014 17:20:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264618 - in stable/10: contrib/atf contrib/atf/atf-c contrib/atf/atf-c++ contrib/atf/atf-sh etc/mtree lib/atf/libatf-c lib/atf/libatf-c++ usr.bin/atf/atf-sh X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2014 17:20:58 -0000 Author: jmmv Date: Thu Apr 17 17:20:56 2014 New Revision: 264618 URL: http://svnweb.freebsd.org/changeset/base/264618 Log: MFC r263989: Add atf m4 files from the vendor branch. Added: stable/10/contrib/atf/atf-c++/atf-c++.m4 - copied unchanged from r263989, head/contrib/atf/atf-c++/atf-c++.m4 stable/10/contrib/atf/atf-c/atf-c.m4 - copied unchanged from r263989, head/contrib/atf/atf-c/atf-c.m4 stable/10/contrib/atf/atf-c/atf-common.m4 - copied unchanged from r263989, head/contrib/atf/atf-c/atf-common.m4 stable/10/contrib/atf/atf-sh/atf-sh.m4 - copied unchanged from r263989, head/contrib/atf/atf-sh/atf-sh.m4 Modified: stable/10/contrib/atf/FREEBSD-Xlist stable/10/etc/mtree/BSD.tests.dist stable/10/lib/atf/libatf-c++/Makefile stable/10/lib/atf/libatf-c/Makefile stable/10/usr.bin/atf/atf-sh/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/atf/FREEBSD-Xlist ============================================================================== --- stable/10/contrib/atf/FREEBSD-Xlist Thu Apr 17 16:00:26 2014 (r264617) +++ stable/10/contrib/atf/FREEBSD-Xlist Thu Apr 17 17:20:56 2014 (r264618) @@ -7,7 +7,6 @@ INSTALL Makefile* aclocal.m4 admin/ -atf-*/atf-*.m4 atf-config/ atf-report/ atf-run/ Copied: stable/10/contrib/atf/atf-c++/atf-c++.m4 (from r263989, head/contrib/atf/atf-c++/atf-c++.m4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/atf/atf-c++/atf-c++.m4 Thu Apr 17 17:20:56 2014 (r264618, copy of r263989, head/contrib/atf/atf-c++/atf-c++.m4) @@ -0,0 +1,48 @@ +dnl +dnl Automated Testing Framework (atf) +dnl +dnl Copyright 2011 Google Inc. +dnl All rights reserved. +dnl +dnl Redistribution and use in source and binary forms, with or without +dnl modification, are permitted provided that the following conditions are +dnl met: +dnl +dnl * Redistributions of source code must retain the above copyright +dnl notice, this list of conditions and the following disclaimer. +dnl * Redistributions in binary form must reproduce the above copyright +dnl notice, this list of conditions and the following disclaimer in the +dnl documentation and/or other materials provided with the distribution. +dnl * Neither the name of Google Inc. nor the names of its contributors +dnl may be used to endorse or promote products derived from this software +dnl without specific prior written permission. +dnl +dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +dnl "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +dnl LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +dnl A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +dnl OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +dnl SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +dnl LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +dnl DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +dnl THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +dnl (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +dnl + +dnl ATF_CHECK_CXX([version-spec]) +dnl +dnl Checks if atf-c++ is present. If version-spec is provided, ensures that +dnl the installed version of atf-sh matches the required version. This +dnl argument must be something like '>= 0.14' and accepts any version +dnl specification supported by pkg-config. +dnl +dnl Defines and substitutes ATF_CXX_CFLAGS and ATF_CXX_LIBS with the compiler +dnl and linker flags need to build against atf-c++. +AC_DEFUN([ATF_CHECK_CXX], [ + spec="atf-c++[]m4_default_nblank([ $1], [])" + _ATF_CHECK_ARG_WITH( + [PKG_CHECK_MODULES([ATF_CXX], [${spec}], + [found=yes found_atf_cxx=yes], [found=no])], + [required ${spec} not found]) +]) Copied: stable/10/contrib/atf/atf-c/atf-c.m4 (from r263989, head/contrib/atf/atf-c/atf-c.m4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/atf/atf-c/atf-c.m4 Thu Apr 17 17:20:56 2014 (r264618, copy of r263989, head/contrib/atf/atf-c/atf-c.m4) @@ -0,0 +1,48 @@ +dnl +dnl Automated Testing Framework (atf) +dnl +dnl Copyright 2011 Google Inc. +dnl All rights reserved. +dnl +dnl Redistribution and use in source and binary forms, with or without +dnl modification, are permitted provided that the following conditions are +dnl met: +dnl +dnl * Redistributions of source code must retain the above copyright +dnl notice, this list of conditions and the following disclaimer. +dnl * Redistributions in binary form must reproduce the above copyright +dnl notice, this list of conditions and the following disclaimer in the +dnl documentation and/or other materials provided with the distribution. +dnl * Neither the name of Google Inc. nor the names of its contributors +dnl may be used to endorse or promote products derived from this software +dnl without specific prior written permission. +dnl +dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +dnl "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +dnl LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +dnl A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +dnl OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +dnl SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +dnl LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +dnl DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +dnl THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +dnl (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +dnl + +dnl ATF_CHECK_C([version-spec]) +dnl +dnl Checks if atf-c is present. If version-spec is provided, ensures that +dnl the installed version of atf-sh matches the required version. This +dnl argument must be something like '>= 0.14' and accepts any version +dnl specification supported by pkg-config. +dnl +dnl Defines and substitutes ATF_C_CFLAGS and ATF_C_LIBS with the compiler +dnl and linker flags need to build against atf-c. +AC_DEFUN([ATF_CHECK_C], [ + spec="atf-c[]m4_default_nblank([ $1], [])" + _ATF_CHECK_ARG_WITH( + [PKG_CHECK_MODULES([ATF_C], [${spec}], + [found=yes found_atf_c=yes], [found=no])], + [required ${spec} not found]) +]) Copied: stable/10/contrib/atf/atf-c/atf-common.m4 (from r263989, head/contrib/atf/atf-c/atf-common.m4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/atf/atf-c/atf-common.m4 Thu Apr 17 17:20:56 2014 (r264618, copy of r263989, head/contrib/atf/atf-c/atf-common.m4) @@ -0,0 +1,92 @@ +dnl +dnl Automated Testing Framework (atf) +dnl +dnl Copyright 2011 Google Inc. +dnl All rights reserved. +dnl +dnl Redistribution and use in source and binary forms, with or without +dnl modification, are permitted provided that the following conditions are +dnl met: +dnl +dnl * Redistributions of source code must retain the above copyright +dnl notice, this list of conditions and the following disclaimer. +dnl * Redistributions in binary form must reproduce the above copyright +dnl notice, this list of conditions and the following disclaimer in the +dnl documentation and/or other materials provided with the distribution. +dnl * Neither the name of Google Inc. nor the names of its contributors +dnl may be used to endorse or promote products derived from this software +dnl without specific prior written permission. +dnl +dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +dnl "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +dnl LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +dnl A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +dnl OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +dnl SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +dnl LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +dnl DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +dnl THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +dnl (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +dnl + +dnl ATF_ARG_WITH +dnl +dnl Adds a --with-atf flag to the configure script that allows the user to +dnl enable or disable atf support. +dnl +dnl The ATF_CHECK_{C,CXX,SH} macros honor the flag defined herein if +dnl instantiated. If not instantiated, they will request the presence of +dnl the libraries unconditionally. +dnl +dnl Defines the WITH_ATF Automake conditional if ATF has been found by any +dnl of the ATF_CHECK_{C,CXX,SH} macros. +AC_DEFUN([ATF_ARG_WITH], [ + m4_define([atf_arg_with_called], [yes]) + + m4_divert_text([DEFAULTS], [with_atf=auto]) + AC_ARG_WITH([atf], + [AS_HELP_STRING([--with-atf=], + [build atf-based test programs])], + [with_atf=${withval}], [with_atf=auto]) + + m4_divert_text([DEFAULTS], [ + found_atf_c=no + found_atf_cxx=no + found_atf_sh=no + ]) + AM_CONDITIONAL([WITH_ATF], [test x"${found_atf_c}" = x"yes" -o \ + x"${found_atf_cxx}" = x"yes" -o \ + x"${found_atf_sh}" = x"yes"]) +]) + +dnl _ATF_CHECK_ARG_WITH(check, error_message) +dnl +dnl Internal macro to execute a check conditional on the --with-atf flag +dnl and handle the result accordingly. +dnl +dnl 'check' specifies the piece of code to be run to detect the feature. +dnl This code must set the 'found' shell variable to yes or no depending +dnl on the raw result of the check. +AC_DEFUN([_ATF_CHECK_ARG_WITH], [ + m4_ifdef([atf_arg_with_called], [ + m4_fatal([ATF_ARG_WITH must be called after the ATF_CHECK_* checks]) + ]) + + m4_divert_text([DEFAULTS], [with_atf=yes]) + + if test x"${with_atf}" = x"no"; then + _found=no + else + $1 + if test x"${with_atf}" = x"auto"; then + _found="${found}" + else + if test x"${found}" = x"yes"; then + _found=yes + else + AC_MSG_ERROR([$2]) + fi + fi + fi +]) Copied: stable/10/contrib/atf/atf-sh/atf-sh.m4 (from r263989, head/contrib/atf/atf-sh/atf-sh.m4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/atf/atf-sh/atf-sh.m4 Thu Apr 17 17:20:56 2014 (r264618, copy of r263989, head/contrib/atf/atf-sh/atf-sh.m4) @@ -0,0 +1,53 @@ +dnl +dnl Automated Testing Framework (atf) +dnl +dnl Copyright 2011 Google Inc. +dnl All rights reserved. +dnl +dnl Redistribution and use in source and binary forms, with or without +dnl modification, are permitted provided that the following conditions are +dnl met: +dnl +dnl * Redistributions of source code must retain the above copyright +dnl notice, this list of conditions and the following disclaimer. +dnl * Redistributions in binary form must reproduce the above copyright +dnl notice, this list of conditions and the following disclaimer in the +dnl documentation and/or other materials provided with the distribution. +dnl * Neither the name of Google Inc. nor the names of its contributors +dnl may be used to endorse or promote products derived from this software +dnl without specific prior written permission. +dnl +dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +dnl "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +dnl LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +dnl A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +dnl OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +dnl SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +dnl LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +dnl DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +dnl THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +dnl (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +dnl + +dnl ATF_CHECK_SH([version-spec]) +dnl +dnl Checks if atf-sh is present. If version-spec is provided, ensures that +dnl the installed version of atf-sh matches the required version. This +dnl argument must be something like '>= 0.14' and accepts any version +dnl specification supported by pkg-config. +dnl +dnl Defines and substitutes ATF_SH with the full path to the atf-sh interpreter. +AC_DEFUN([ATF_CHECK_SH], [ + spec="atf-sh[]m4_default_nblank([ $1], [])" + _ATF_CHECK_ARG_WITH( + [AC_MSG_CHECKING([for ${spec}]) + PKG_CHECK_EXISTS([${spec}], [found=yes], [found=no]) + if test "${found}" = yes; then + ATF_SH="$(${PKG_CONFIG} --variable=interpreter atf-sh)" + AC_SUBST([ATF_SH], [${ATF_SH}]) + found_atf_sh=yes + fi + AC_MSG_RESULT([${ATF_SH}])], + [required ${spec} not found]) +]) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Thu Apr 17 16:00:26 2014 (r264617) +++ stable/10/etc/mtree/BSD.tests.dist Thu Apr 17 17:20:56 2014 (r264618) @@ -12,6 +12,8 @@ .. .. share + aclocal + .. atf .. doc Modified: stable/10/lib/atf/libatf-c++/Makefile ============================================================================== --- stable/10/lib/atf/libatf-c++/Makefile Thu Apr 17 16:00:26 2014 (r264617) +++ stable/10/lib/atf/libatf-c++/Makefile Thu Apr 17 17:20:56 2014 (r264618) @@ -83,6 +83,8 @@ atf-c++.pc: atf-c++.pc.in atf-version beforeinstall: ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ atf-c++.pc ${DESTDIR}${LIBDATADIR}/pkgconfig + ${INSTALL} -C -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \ + ${ATF}/atf-c++/atf-c++.m4 ${DESTDIR}${SHAREDIR}/aclocal .if ${MK_TESTS} != "no" SUBDIR= tests Modified: stable/10/lib/atf/libatf-c/Makefile ============================================================================== --- stable/10/lib/atf/libatf-c/Makefile Thu Apr 17 16:00:26 2014 (r264617) +++ stable/10/lib/atf/libatf-c/Makefile Thu Apr 17 17:20:56 2014 (r264618) @@ -85,6 +85,10 @@ atf-c.pc: atf-c.pc.in atf-version beforeinstall: ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ atf-c.pc ${DESTDIR}${LIBDATADIR}/pkgconfig + ${INSTALL} -C -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \ + ${ATF}/atf-c/atf-common.m4 ${DESTDIR}${SHAREDIR}/aclocal + ${INSTALL} -C -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \ + ${ATF}/atf-c/atf-c.m4 ${DESTDIR}${SHAREDIR}/aclocal .if ${MK_TESTS} != "no" SUBDIR= tests Modified: stable/10/usr.bin/atf/atf-sh/Makefile ============================================================================== --- stable/10/usr.bin/atf/atf-sh/Makefile Thu Apr 17 16:00:26 2014 (r264617) +++ stable/10/usr.bin/atf/atf-sh/Makefile Thu Apr 17 17:20:56 2014 (r264618) @@ -54,6 +54,8 @@ atf-sh.pc: atf-sh.pc.in atf-version beforeinstall: ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ atf-sh.pc ${DESTDIR}${LIBDATADIR}/pkgconfig + ${INSTALL} -C -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \ + ${ATF}/atf-sh/atf-sh.m4 ${DESTDIR}${SHAREDIR}/aclocal .if ${MK_TESTS} != "no" SUBDIR+= tests From owner-svn-src-stable@FreeBSD.ORG Thu Apr 17 18:00:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8CC8C1D6; Thu, 17 Apr 2014 18:00:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 781EE1D3A; Thu, 17 Apr 2014 18:00:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3HI092U069045; Thu, 17 Apr 2014 18:00:09 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3HI08iO069034; Thu, 17 Apr 2014 18:00:08 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201404171800.s3HI08iO069034@svn.freebsd.org> From: John Baldwin Date: Thu, 17 Apr 2014 18:00:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264619 - in stable/10: sys/amd64/include sys/amd64/vmm/intel usr.sbin/bhyve usr.sbin/bhyvectl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2014 18:00:09 -0000 Author: jhb Date: Thu Apr 17 18:00:07 2014 New Revision: 264619 URL: http://svnweb.freebsd.org/changeset/base/264619 Log: MFC 258860,260167,260238,260397: - Restructure the VMX code to enter and exit the guest. In large part this change hides the setjmp/longjmp semantics of VM enter/exit. vmx_enter_guest() is used to enter guest context and vmx_exit_guest() is used to transition back into host context. Fix a longstanding race where a vcpu interrupt notification might be ignored if it happens after vmx_inject_interrupts() but before host interrupts are disabled in vmx_resume/vmx_launch. We now call vmx_inject_interrupts() with host interrupts disabled to prevent this. - The 'protection' field in the VM exit collateral for the PAGING exit is not used - get rid of it. Reviewed by: grehan Modified: stable/10/sys/amd64/include/vmm.h stable/10/sys/amd64/vmm/intel/vmx.c stable/10/sys/amd64/vmm/intel/vmx.h stable/10/sys/amd64/vmm/intel/vmx_genassym.c stable/10/sys/amd64/vmm/intel/vmx_support.S stable/10/usr.sbin/bhyve/bhyverun.c stable/10/usr.sbin/bhyvectl/bhyvectl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/include/vmm.h ============================================================================== --- stable/10/sys/amd64/include/vmm.h Thu Apr 17 17:20:56 2014 (r264618) +++ stable/10/sys/amd64/include/vmm.h Thu Apr 17 18:00:07 2014 (r264619) @@ -286,7 +286,6 @@ struct vm_exit { struct { uint64_t gpa; int fault_type; - int protection; } paging; struct { uint64_t gpa; @@ -299,9 +298,19 @@ struct vm_exit { * exitcode to represent the VM-exit. */ struct { - int error; /* vmx inst error */ + int status; /* vmx inst status */ + /* + * 'exit_reason' and 'exit_qualification' are valid + * only if 'status' is zero. + */ uint32_t exit_reason; uint64_t exit_qualification; + /* + * 'inst_error' and 'inst_type' are valid + * only if 'status' is non-zero. + */ + int inst_type; + int inst_error; } vmx; struct { uint32_t code; /* ecx value */ Modified: stable/10/sys/amd64/vmm/intel/vmx.c ============================================================================== --- stable/10/sys/amd64/vmm/intel/vmx.c Thu Apr 17 17:20:56 2014 (r264618) +++ stable/10/sys/amd64/vmm/intel/vmx.c Thu Apr 17 18:00:07 2014 (r264619) @@ -286,82 +286,6 @@ exit_reason_to_str(int reason) return (reasonbuf); } } - -#ifdef SETJMP_TRACE -static const char * -vmx_setjmp_rc2str(int rc) -{ - switch (rc) { - case VMX_RETURN_DIRECT: - return "direct"; - case VMX_RETURN_LONGJMP: - return "longjmp"; - case VMX_RETURN_VMRESUME: - return "vmresume"; - case VMX_RETURN_VMLAUNCH: - return "vmlaunch"; - case VMX_RETURN_AST: - return "ast"; - default: - return "unknown"; - } -} - -#define SETJMP_TRACE(vmx, vcpu, vmxctx, regname) \ - VCPU_CTR1((vmx)->vm, (vcpu), "setjmp trace " #regname " 0x%016lx", \ - (vmxctx)->regname) - -static void -vmx_setjmp_trace(struct vmx *vmx, int vcpu, struct vmxctx *vmxctx, int rc) -{ - uint64_t host_rip, host_rsp; - - if (vmxctx != &vmx->ctx[vcpu]) - panic("vmx_setjmp_trace: invalid vmxctx %p; should be %p", - vmxctx, &vmx->ctx[vcpu]); - - VCPU_CTR1((vmx)->vm, (vcpu), "vmxctx = %p", vmxctx); - VCPU_CTR2((vmx)->vm, (vcpu), "setjmp return code %s(%d)", - vmx_setjmp_rc2str(rc), rc); - - host_rip = vmcs_read(VMCS_HOST_RIP); - host_rsp = vmcs_read(VMCS_HOST_RSP); - VCPU_CTR2((vmx)->vm, (vcpu), "vmcs host_rip 0x%016lx, host_rsp %#lx", - host_rip, host_rsp); - - SETJMP_TRACE(vmx, vcpu, vmxctx, host_r15); - SETJMP_TRACE(vmx, vcpu, vmxctx, host_r14); - SETJMP_TRACE(vmx, vcpu, vmxctx, host_r13); - SETJMP_TRACE(vmx, vcpu, vmxctx, host_r12); - SETJMP_TRACE(vmx, vcpu, vmxctx, host_rbp); - SETJMP_TRACE(vmx, vcpu, vmxctx, host_rsp); - SETJMP_TRACE(vmx, vcpu, vmxctx, host_rbx); - SETJMP_TRACE(vmx, vcpu, vmxctx, host_rip); - - SETJMP_TRACE(vmx, vcpu, vmxctx, guest_rdi); - SETJMP_TRACE(vmx, vcpu, vmxctx, guest_rsi); - SETJMP_TRACE(vmx, vcpu, vmxctx, guest_rdx); - SETJMP_TRACE(vmx, vcpu, vmxctx, guest_rcx); - SETJMP_TRACE(vmx, vcpu, vmxctx, guest_r8); - SETJMP_TRACE(vmx, vcpu, vmxctx, guest_r9); - SETJMP_TRACE(vmx, vcpu, vmxctx, guest_rax); - SETJMP_TRACE(vmx, vcpu, vmxctx, guest_rbx); - SETJMP_TRACE(vmx, vcpu, vmxctx, guest_rbp); - SETJMP_TRACE(vmx, vcpu, vmxctx, guest_r10); - SETJMP_TRACE(vmx, vcpu, vmxctx, guest_r11); - SETJMP_TRACE(vmx, vcpu, vmxctx, guest_r12); - SETJMP_TRACE(vmx, vcpu, vmxctx, guest_r13); - SETJMP_TRACE(vmx, vcpu, vmxctx, guest_r14); - SETJMP_TRACE(vmx, vcpu, vmxctx, guest_r15); - SETJMP_TRACE(vmx, vcpu, vmxctx, guest_cr2); -} -#endif -#else -static void __inline -vmx_setjmp_trace(struct vmx *vmx, int vcpu, struct vmxctx *vmxctx, int rc) -{ - return; -} #endif /* KTR */ u_long @@ -825,7 +749,7 @@ vmx_vminit(struct vm *vm, pmap_t pmap) } error = vmcs_set_defaults(&vmx->vmcs[i], - (u_long)vmx_longjmp, + (u_long)vmx_exit_guest, (u_long)&vmx->ctx[i], vmx->eptp, pinbased_ctls, @@ -1222,21 +1146,6 @@ ept_fault_type(uint64_t ept_qual) return (fault_type); } -static int -ept_protection(uint64_t ept_qual) -{ - int prot = 0; - - if (ept_qual & EPT_VIOLATION_GPA_READABLE) - prot |= VM_PROT_READ; - if (ept_qual & EPT_VIOLATION_GPA_WRITEABLE) - prot |= VM_PROT_WRITE; - if (ept_qual & EPT_VIOLATION_GPA_EXECUTABLE) - prot |= VM_PROT_EXECUTE; - - return (prot); -} - static boolean_t ept_emulation_fault(uint64_t ept_qual) { @@ -1269,15 +1178,14 @@ static int vmx_exit_process(struct vmx *vmx, int vcpu, struct vm_exit *vmexit) { int error, handled; - struct vmcs *vmcs; struct vmxctx *vmxctx; uint32_t eax, ecx, edx, idtvec_info, idtvec_err, reason; uint64_t qual, gpa; bool retu; handled = 0; - vmcs = &vmx->vmcs[vcpu]; vmxctx = &vmx->ctx[vcpu]; + qual = vmexit->u.vmx.exit_qualification; reason = vmexit->u.vmx.exit_reason; vmexit->exitcode = VM_EXITCODE_BOGUS; @@ -1421,7 +1329,6 @@ vmx_exit_process(struct vmx *vmx, int vc vmexit->exitcode = VM_EXITCODE_PAGING; vmexit->u.paging.gpa = gpa; vmexit->u.paging.fault_type = ept_fault_type(qual); - vmexit->u.paging.protection = ept_protection(qual); } else if (ept_emulation_fault(qual)) { vmexit->exitcode = VM_EXITCODE_INST_EMUL; vmexit->u.inst_emul.gpa = gpa; @@ -1455,7 +1362,7 @@ vmx_exit_process(struct vmx *vmx, int vc * treat it as a generic VMX exit. */ vmexit->exitcode = VM_EXITCODE_VMX; - vmexit->u.vmx.error = 0; + vmexit->u.vmx.status = VM_SUCCESS; } else { /* * The exitcode and collateral have been populated. @@ -1466,32 +1373,69 @@ vmx_exit_process(struct vmx *vmx, int vc return (handled); } +static __inline int +vmx_exit_astpending(struct vmx *vmx, int vcpu, struct vm_exit *vmexit) +{ + + vmexit->rip = vmcs_guest_rip(); + vmexit->inst_length = 0; + vmexit->exitcode = VM_EXITCODE_BOGUS; + vmx_astpending_trace(vmx, vcpu, vmexit->rip); + vmm_stat_incr(vmx->vm, vcpu, VMEXIT_ASTPENDING, 1); + + return (HANDLED); +} + +static __inline int +vmx_exit_inst_error(struct vmxctx *vmxctx, int rc, struct vm_exit *vmexit) +{ + + KASSERT(vmxctx->inst_fail_status != VM_SUCCESS, + ("vmx_exit_inst_error: invalid inst_fail_status %d", + vmxctx->inst_fail_status)); + + vmexit->inst_length = 0; + vmexit->exitcode = VM_EXITCODE_VMX; + vmexit->u.vmx.status = vmxctx->inst_fail_status; + vmexit->u.vmx.inst_error = vmcs_instruction_error(); + vmexit->u.vmx.exit_reason = ~0; + vmexit->u.vmx.exit_qualification = ~0; + + switch (rc) { + case VMX_VMRESUME_ERROR: + case VMX_VMLAUNCH_ERROR: + case VMX_INVEPT_ERROR: + vmexit->u.vmx.inst_type = rc; + break; + default: + panic("vm_exit_inst_error: vmx_enter_guest returned %d", rc); + } + + return (UNHANDLED); +} + static int -vmx_run(void *arg, int vcpu, register_t rip, pmap_t pmap) +vmx_run(void *arg, int vcpu, register_t startrip, pmap_t pmap) { - int vie, rc, handled, astpending; - uint32_t exit_reason; + int rc, handled, launched; struct vmx *vmx; struct vmxctx *vmxctx; struct vmcs *vmcs; struct vm_exit *vmexit; + uint64_t rip; + uint32_t exit_reason; vmx = arg; vmcs = &vmx->vmcs[vcpu]; vmxctx = &vmx->ctx[vcpu]; - vmxctx->launched = 0; - - astpending = 0; vmexit = vm_exitinfo(vmx->vm, vcpu); + launched = 0; KASSERT(vmxctx->pmap == pmap, ("pmap %p different than ctx pmap %p", pmap, vmxctx->pmap)); KASSERT(vmxctx->eptp == vmx->eptp, ("eptp %p different than ctx eptp %#lx", eptp, vmxctx->eptp)); - /* - * XXX Can we avoid doing this every time we do a vm run? - */ VMPTRLD(vmcs); /* @@ -1503,76 +1447,55 @@ vmx_run(void *arg, int vcpu, register_t * of a single process we could do this once in vmcs_set_defaults(). */ vmcs_write(VMCS_HOST_CR3, rcr3()); - vmcs_write(VMCS_GUEST_RIP, rip); - vmx_set_pcpu_defaults(vmx, vcpu); + vmcs_write(VMCS_GUEST_RIP, startrip); + vmx_set_pcpu_defaults(vmx, vcpu); do { - vmx_inject_interrupts(vmx, vcpu); - vmx_run_trace(vmx, vcpu); - rc = vmx_setjmp(vmxctx); -#ifdef SETJMP_TRACE - vmx_setjmp_trace(vmx, vcpu, vmxctx, rc); -#endif - switch (rc) { - case VMX_RETURN_DIRECT: - if (vmxctx->launched == 0) { - vmxctx->launched = 1; - vmx_launch(vmxctx); - } else - vmx_resume(vmxctx); - panic("vmx_launch/resume should not return"); - break; - case VMX_RETURN_LONGJMP: - break; /* vm exit */ - case VMX_RETURN_AST: - astpending = 1; - break; - case VMX_RETURN_VMRESUME: - vie = vmcs_instruction_error(); - if (vmxctx->launch_error == VM_FAIL_INVALID || - vie != VMRESUME_WITH_NON_LAUNCHED_VMCS) { - printf("vmresume error %d vmcs inst error %d\n", - vmxctx->launch_error, vie); - goto err_exit; - } - vmx_launch(vmxctx); /* try to launch the guest */ - panic("vmx_launch should not return"); + /* + * Interrupts are disabled from this point on until the + * guest starts executing. This is done for the following + * reasons: + * + * If an AST is asserted on this thread after the check below, + * then the IPI_AST notification will not be lost, because it + * will cause a VM exit due to external interrupt as soon as + * the guest state is loaded. + * + * A posted interrupt after 'vmx_inject_interrupts()' will + * not be "lost" because it will be held pending in the host + * APIC because interrupts are disabled. The pending interrupt + * will be recognized as soon as the guest state is loaded. + * + * The same reasoning applies to the IPI generated by + * pmap_invalidate_ept(). + */ + disable_intr(); + if (curthread->td_flags & (TDF_ASTPENDING | TDF_NEEDRESCHED)) { + enable_intr(); + handled = vmx_exit_astpending(vmx, vcpu, vmexit); break; - case VMX_RETURN_VMLAUNCH: - vie = vmcs_instruction_error(); -#if 1 - printf("vmlaunch error %d vmcs inst error %d\n", - vmxctx->launch_error, vie); -#endif - goto err_exit; - case VMX_RETURN_INVEPT: - panic("vm %s:%d invept error %d", - vm_name(vmx->vm), vcpu, vmxctx->launch_error); - default: - panic("vmx_setjmp returned %d", rc); } - - /* enable interrupts */ + + vmx_inject_interrupts(vmx, vcpu); + vmx_run_trace(vmx, vcpu); + rc = vmx_enter_guest(vmxctx, launched); + enable_intr(); - /* collect some basic information for VM exit processing */ + /* Collect some information for VM exit processing */ vmexit->rip = rip = vmcs_guest_rip(); vmexit->inst_length = vmexit_instruction_length(); vmexit->u.vmx.exit_reason = exit_reason = vmcs_exit_reason(); vmexit->u.vmx.exit_qualification = vmcs_exit_qualification(); - if (astpending) { - handled = 1; - vmexit->inst_length = 0; - vmexit->exitcode = VM_EXITCODE_BOGUS; - vmx_astpending_trace(vmx, vcpu, rip); - vmm_stat_incr(vmx->vm, vcpu, VMEXIT_ASTPENDING, 1); - break; + if (rc == VMX_GUEST_VMEXIT) { + launched = 1; + handled = vmx_exit_process(vmx, vcpu, vmexit); + } else { + handled = vmx_exit_inst_error(vmxctx, rc, vmexit); } - handled = vmx_exit_process(vmx, vcpu, vmexit); vmx_exit_trace(vmx, vcpu, rip, exit_reason, handled); - } while (handled); /* @@ -1588,26 +1511,11 @@ vmx_run(void *arg, int vcpu, register_t if (!handled) vmm_stat_incr(vmx->vm, vcpu, VMEXIT_USERSPACE, 1); - VCPU_CTR1(vmx->vm, vcpu, "goto userland: exitcode %d",vmexit->exitcode); + VCPU_CTR1(vmx->vm, vcpu, "returning from vmx_run: exitcode %d", + vmexit->exitcode); - /* - * XXX - * We need to do this to ensure that any VMCS state cached by the - * processor is flushed to memory. We need to do this in case the - * VM moves to a different cpu the next time it runs. - * - * Can we avoid doing this? - */ VMCLEAR(vmcs); return (0); - -err_exit: - vmexit->exitcode = VM_EXITCODE_VMX; - vmexit->u.vmx.exit_reason = (uint32_t)-1; - vmexit->u.vmx.exit_qualification = (uint32_t)-1; - vmexit->u.vmx.error = vie; - VMCLEAR(vmcs); - return (ENOEXEC); } static void Modified: stable/10/sys/amd64/vmm/intel/vmx.h ============================================================================== --- stable/10/sys/amd64/vmm/intel/vmx.h Thu Apr 17 17:20:56 2014 (r264618) +++ stable/10/sys/amd64/vmm/intel/vmx.h Thu Apr 17 18:00:07 2014 (r264619) @@ -36,9 +36,6 @@ struct pmap; #define GUEST_MSR_MAX_ENTRIES 64 /* arbitrary */ struct vmxctx { - register_t tmpstk[32]; /* vmx_return() stack */ - register_t tmpstktop; - register_t guest_rdi; /* Guest state */ register_t guest_rsi; register_t guest_rdx; @@ -68,8 +65,7 @@ struct vmxctx { * XXX todo debug registers and fpu state */ - int launched; /* vmcs launch state */ - int launch_error; + int inst_fail_status; long eptgen[MAXCPU]; /* cached pmap->pm_eptgen */ @@ -107,25 +103,12 @@ CTASSERT((offsetof(struct vmx, vmcs) & P CTASSERT((offsetof(struct vmx, msr_bitmap) & PAGE_MASK) == 0); CTASSERT((offsetof(struct vmx, guest_msrs) & 15) == 0); -#define VMX_RETURN_DIRECT 0 -#define VMX_RETURN_LONGJMP 1 -#define VMX_RETURN_VMRESUME 2 -#define VMX_RETURN_VMLAUNCH 3 -#define VMX_RETURN_AST 4 -#define VMX_RETURN_INVEPT 5 -/* - * vmx_setjmp() returns: - * - 0 when it returns directly - * - 1 when it returns from vmx_longjmp - * - 2 when it returns from vmx_resume (which would only be in the error case) - * - 3 when it returns from vmx_launch (which would only be in the error case) - * - 4 when it returns from vmx_resume or vmx_launch because of AST pending - * - 5 when it returns from vmx_launch/vmx_resume because of invept error - */ -int vmx_setjmp(struct vmxctx *ctx); -void vmx_longjmp(void); /* returns via vmx_setjmp */ -void vmx_launch(struct vmxctx *ctx) __dead2; /* may return via vmx_setjmp */ -void vmx_resume(struct vmxctx *ctx) __dead2; /* may return via vmx_setjmp */ +#define VMX_GUEST_VMEXIT 0 +#define VMX_VMRESUME_ERROR 1 +#define VMX_VMLAUNCH_ERROR 2 +#define VMX_INVEPT_ERROR 3 +int vmx_enter_guest(struct vmxctx *ctx, int launched); +void vmx_exit_guest(void); u_long vmx_fix_cr0(u_long cr0); u_long vmx_fix_cr4(u_long cr4); Modified: stable/10/sys/amd64/vmm/intel/vmx_genassym.c ============================================================================== --- stable/10/sys/amd64/vmm/intel/vmx_genassym.c Thu Apr 17 17:20:56 2014 (r264618) +++ stable/10/sys/amd64/vmm/intel/vmx_genassym.c Thu Apr 17 18:00:07 2014 (r264619) @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -42,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include "vmx_cpufunc.h" #include "vmx.h" -ASSYM(VMXCTX_TMPSTKTOP, offsetof(struct vmxctx, tmpstktop)); ASSYM(VMXCTX_GUEST_RDI, offsetof(struct vmxctx, guest_rdi)); ASSYM(VMXCTX_GUEST_RSI, offsetof(struct vmxctx, guest_rsi)); ASSYM(VMXCTX_GUEST_RDX, offsetof(struct vmxctx, guest_rdx)); @@ -69,27 +67,19 @@ ASSYM(VMXCTX_HOST_RSP, offsetof(struct v ASSYM(VMXCTX_HOST_RBX, offsetof(struct vmxctx, host_rbx)); ASSYM(VMXCTX_HOST_RIP, offsetof(struct vmxctx, host_rip)); -ASSYM(VMXCTX_LAUNCH_ERROR, offsetof(struct vmxctx, launch_error)); +ASSYM(VMXCTX_INST_FAIL_STATUS, offsetof(struct vmxctx, inst_fail_status)); ASSYM(VMXCTX_EPTGEN, offsetof(struct vmxctx, eptgen)); ASSYM(VMXCTX_PMAP, offsetof(struct vmxctx, pmap)); ASSYM(VMXCTX_EPTP, offsetof(struct vmxctx, eptp)); -ASSYM(VM_SUCCESS, VM_SUCCESS); ASSYM(VM_FAIL_INVALID, VM_FAIL_INVALID); ASSYM(VM_FAIL_VALID, VM_FAIL_VALID); +ASSYM(VMX_GUEST_VMEXIT, VMX_GUEST_VMEXIT); +ASSYM(VMX_VMRESUME_ERROR, VMX_VMRESUME_ERROR); +ASSYM(VMX_VMLAUNCH_ERROR, VMX_VMLAUNCH_ERROR); +ASSYM(VMX_INVEPT_ERROR, VMX_INVEPT_ERROR); -ASSYM(VMX_RETURN_DIRECT, VMX_RETURN_DIRECT); -ASSYM(VMX_RETURN_LONGJMP, VMX_RETURN_LONGJMP); -ASSYM(VMX_RETURN_VMRESUME, VMX_RETURN_VMRESUME); -ASSYM(VMX_RETURN_VMLAUNCH, VMX_RETURN_VMLAUNCH); -ASSYM(VMX_RETURN_AST, VMX_RETURN_AST); -ASSYM(VMX_RETURN_INVEPT, VMX_RETURN_INVEPT); - -ASSYM(TDF_ASTPENDING, TDF_ASTPENDING); -ASSYM(TDF_NEEDRESCHED, TDF_NEEDRESCHED); -ASSYM(TD_FLAGS, offsetof(struct thread, td_flags)); -ASSYM(PC_CURTHREAD, offsetof(struct pcpu, pc_curthread)); ASSYM(PC_CPUID, offsetof(struct pcpu, pc_cpuid)); ASSYM(PM_ACTIVE, offsetof(struct pmap, pm_active)); Modified: stable/10/sys/amd64/vmm/intel/vmx_support.S ============================================================================== --- stable/10/sys/amd64/vmm/intel/vmx_support.S Thu Apr 17 17:20:56 2014 (r264618) +++ stable/10/sys/amd64/vmm/intel/vmx_support.S Thu Apr 17 18:00:07 2014 (r264619) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2011 NetApp, Inc. + * Copyright (c) 2013 Neel Natu * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,32 +38,6 @@ #endif /* - * Disable interrupts before updating %rsp in VMX_CHECK_AST or - * VMX_GUEST_RESTORE. - * - * The location that %rsp points to is a 'vmxctx' and not a - * real stack so we don't want an interrupt handler to trash it - */ -#define VMX_DISABLE_INTERRUPTS cli - -/* - * If the thread hosting the vcpu has an ast pending then take care of it - * by returning from vmx_setjmp() with a return value of VMX_RETURN_AST. - * - * Assumes that %rdi holds a pointer to the 'vmxctx' and that interrupts - * are disabled. - */ -#define VMX_CHECK_AST \ - movq PCPU(CURTHREAD),%rax; \ - testl $TDF_ASTPENDING | TDF_NEEDRESCHED,TD_FLAGS(%rax); \ - je 9f; \ - movq $VMX_RETURN_AST,%rsi; \ - movq %rdi,%rsp; \ - addq $VMXCTX_TMPSTKTOP,%rsp; \ - callq vmx_return; \ -9: - -/* * Assumes that %rdi holds a pointer to the 'vmxctx'. * * On "return" all registers are updated to reflect guest state. The two @@ -93,132 +68,132 @@ movq VMXCTX_GUEST_RDI(%rdi),%rdi; /* restore rdi the last */ /* - * Check for an error after executing a VMX instruction. - * 'errreg' will be zero on success and non-zero otherwise. - * 'ctxreg' points to the 'struct vmxctx' associated with the vcpu. + * Save and restore the host context. + * + * Assumes that %rdi holds a pointer to the 'vmxctx'. */ -#define VM_INSTRUCTION_ERROR(errreg, ctxreg) \ - jnc 1f; \ - movl $VM_FAIL_INVALID,errreg; /* CF is set */ \ - jmp 3f; \ -1: jnz 2f; \ - movl $VM_FAIL_VALID,errreg; /* ZF is set */ \ - jmp 3f; \ -2: movl $VM_SUCCESS,errreg; \ -3: movl errreg,VMXCTX_LAUNCH_ERROR(ctxreg) +#define VMX_HOST_SAVE(tmpreg) \ + movq (%rsp), tmpreg; /* return address */ \ + movq %r15, VMXCTX_HOST_R15(%rdi); \ + movq %r14, VMXCTX_HOST_R14(%rdi); \ + movq %r13, VMXCTX_HOST_R13(%rdi); \ + movq %r12, VMXCTX_HOST_R12(%rdi); \ + movq %rbp, VMXCTX_HOST_RBP(%rdi); \ + movq %rsp, VMXCTX_HOST_RSP(%rdi); \ + movq %rbx, VMXCTX_HOST_RBX(%rdi); \ + movq tmpreg, VMXCTX_HOST_RIP(%rdi) + +#define VMX_HOST_RESTORE(tmpreg) \ + movq VMXCTX_HOST_R15(%rdi), %r15; \ + movq VMXCTX_HOST_R14(%rdi), %r14; \ + movq VMXCTX_HOST_R13(%rdi), %r13; \ + movq VMXCTX_HOST_R12(%rdi), %r12; \ + movq VMXCTX_HOST_RBP(%rdi), %rbp; \ + movq VMXCTX_HOST_RSP(%rdi), %rsp; \ + movq VMXCTX_HOST_RBX(%rdi), %rbx; \ + movq VMXCTX_HOST_RIP(%rdi), tmpreg; \ + movq tmpreg, (%rsp) /* return address */ + +/* + * vmx_enter_guest(struct vmxctx *vmxctx, int launched) + * %rdi: pointer to the 'vmxctx' + * %esi: launch state of the VMCS + * Interrupts must be disabled on entry. + */ +ENTRY(vmx_enter_guest) + /* + * Save host state before doing anything else. + */ + VMX_HOST_SAVE(%r10) -/* - * set or clear the appropriate bit in 'pm_active' - * %rdi = vmxctx - * %rax, %r11 = scratch registers - */ -#define VMX_SET_PM_ACTIVE \ - movq VMXCTX_PMAP(%rdi), %r11; \ - movl PCPU(CPUID), %eax; \ + /* + * Activate guest pmap on this cpu. + */ + movq VMXCTX_PMAP(%rdi), %r11 + movl PCPU(CPUID), %eax LK btsl %eax, PM_ACTIVE(%r11) -#define VMX_CLEAR_PM_ACTIVE \ - movq VMXCTX_PMAP(%rdi), %r11; \ - movl PCPU(CPUID), %eax; \ - LK btrl %eax, PM_ACTIVE(%r11) - -/* - * If 'vmxctx->eptgen[curcpu]' is not identical to 'pmap->pm_eptgen' - * then we must invalidate all mappings associated with this eptp. - * - * %rdi = vmxctx - * %rax, %rbx, %r11 = scratch registers - */ -#define VMX_CHECK_EPTGEN \ - movl PCPU(CPUID), %ebx; \ - movq VMXCTX_PMAP(%rdi), %r11; \ - movq PM_EPTGEN(%r11), %rax; \ - cmpq %rax, VMXCTX_EPTGEN(%rdi, %rbx, 8); \ - je 9f; \ - \ - /* Refresh 'vmxctx->eptgen[curcpu]' */ \ - movq %rax, VMXCTX_EPTGEN(%rdi, %rbx, 8); \ - \ - /* Setup the invept descriptor at the top of tmpstk */ \ - mov %rdi, %r11; \ - addq $VMXCTX_TMPSTKTOP, %r11; \ - movq VMXCTX_EPTP(%rdi), %rax; \ - movq %rax, -16(%r11); \ - movq $0x0, -8(%r11); \ - mov $0x1, %eax; /* Single context invalidate */ \ - invept -16(%r11), %rax; \ - \ - /* Check for invept error */ \ - VM_INSTRUCTION_ERROR(%eax, %rdi); \ - testl %eax, %eax; \ - jz 9f; \ - \ - /* Return via vmx_setjmp with retval of VMX_RETURN_INVEPT */ \ - movq $VMX_RETURN_INVEPT, %rsi; \ - movq %rdi,%rsp; \ - addq $VMXCTX_TMPSTKTOP, %rsp; \ - callq vmx_return; \ -9: ; + /* + * If 'vmxctx->eptgen[curcpu]' is not identical to 'pmap->pm_eptgen' + * then we must invalidate all mappings associated with this EPTP. + */ + movq PM_EPTGEN(%r11), %r10 + cmpq %r10, VMXCTX_EPTGEN(%rdi, %rax, 8) + je guest_restore + + /* Refresh 'vmxctx->eptgen[curcpu]' */ + movq %r10, VMXCTX_EPTGEN(%rdi, %rax, 8) + + /* Setup the invept descriptor on the host stack */ + mov %rsp, %r11 + movq VMXCTX_EPTP(%rdi), %rax + movq %rax, -16(%r11) + movq $0x0, -8(%r11) + mov $0x1, %eax /* Single context invalidate */ + invept -16(%r11), %rax + jbe invept_error /* Check invept instruction error */ + +guest_restore: + cmpl $0, %esi + je do_launch - .text -/* - * int vmx_setjmp(ctxp) - * %rdi = ctxp - * - * Return value is '0' when it returns directly from here. - * Return value is '1' when it returns after a vm exit through vmx_longjmp. - */ -ENTRY(vmx_setjmp) - movq (%rsp),%rax /* return address */ - movq %r15,VMXCTX_HOST_R15(%rdi) - movq %r14,VMXCTX_HOST_R14(%rdi) - movq %r13,VMXCTX_HOST_R13(%rdi) - movq %r12,VMXCTX_HOST_R12(%rdi) - movq %rbp,VMXCTX_HOST_RBP(%rdi) - movq %rsp,VMXCTX_HOST_RSP(%rdi) - movq %rbx,VMXCTX_HOST_RBX(%rdi) - movq %rax,VMXCTX_HOST_RIP(%rdi) + VMX_GUEST_RESTORE + vmresume + /* + * In the common case 'vmresume' returns back to the host through + * 'vmx_exit_guest' with %rsp pointing to 'vmxctx'. + * + * If there is an error we return VMX_VMRESUME_ERROR to the caller. + */ + movq %rsp, %rdi /* point %rdi back to 'vmxctx' */ + movl $VMX_VMRESUME_ERROR, %eax + jmp decode_inst_error +do_launch: + VMX_GUEST_RESTORE + vmlaunch /* - * XXX save host debug registers + * In the common case 'vmlaunch' returns back to the host through + * 'vmx_exit_guest' with %rsp pointing to 'vmxctx'. + * + * If there is an error we return VMX_VMLAUNCH_ERROR to the caller. */ - movl $VMX_RETURN_DIRECT,%eax - ret -END(vmx_setjmp) + movq %rsp, %rdi /* point %rdi back to 'vmxctx' */ + movl $VMX_VMLAUNCH_ERROR, %eax + jmp decode_inst_error -/* - * void vmx_return(struct vmxctx *ctxp, int retval) - * %rdi = ctxp - * %rsi = retval - * Return to vmm context through vmx_setjmp() with a value of 'retval'. - */ -ENTRY(vmx_return) - /* The pmap is no longer active on the host cpu */ - VMX_CLEAR_PM_ACTIVE - - /* Restore host context. */ - movq VMXCTX_HOST_R15(%rdi),%r15 - movq VMXCTX_HOST_R14(%rdi),%r14 - movq VMXCTX_HOST_R13(%rdi),%r13 - movq VMXCTX_HOST_R12(%rdi),%r12 - movq VMXCTX_HOST_RBP(%rdi),%rbp - movq VMXCTX_HOST_RSP(%rdi),%rsp - movq VMXCTX_HOST_RBX(%rdi),%rbx - movq VMXCTX_HOST_RIP(%rdi),%rax - movq %rax,(%rsp) /* return address */ +invept_error: + movl $VMX_INVEPT_ERROR, %eax + jmp decode_inst_error + +decode_inst_error: + movl $VM_FAIL_VALID, %r11d + jz inst_error + movl $VM_FAIL_INVALID, %r11d +inst_error: + movl %r11d, VMXCTX_INST_FAIL_STATUS(%rdi) + + /* + * The return value is already populated in %eax so we cannot use + * it as a scratch register beyond this point. + */ /* - * XXX restore host debug registers + * Deactivate guest pmap from this cpu. */ - movl %esi,%eax + movq VMXCTX_PMAP(%rdi), %r11 + movl PCPU(CPUID), %r10d + LK btrl %r10d, PM_ACTIVE(%r11) + + VMX_HOST_RESTORE(%r10) ret -END(vmx_return) +END(vmx_enter_guest) /* - * void vmx_longjmp(void) + * void vmx_exit_guest(void) * %rsp points to the struct vmxctx */ -ENTRY(vmx_longjmp) +ENTRY(vmx_exit_guest) /* * Save guest state that is not automatically saved in the vmcs. */ @@ -242,80 +217,20 @@ ENTRY(vmx_longjmp) movq %rdi,VMXCTX_GUEST_CR2(%rsp) movq %rsp,%rdi - movq $VMX_RETURN_LONGJMP,%rsi - - addq $VMXCTX_TMPSTKTOP,%rsp - callq vmx_return -END(vmx_longjmp) - -/* - * void vmx_resume(struct vmxctx *ctxp) - * %rdi = ctxp - * - * Although the return type is a 'void' this function may return indirectly - * through vmx_setjmp() with a return value of 2. - */ -ENTRY(vmx_resume) - VMX_DISABLE_INTERRUPTS - - VMX_CHECK_AST - - VMX_SET_PM_ACTIVE /* This vcpu is now active on the host cpu */ - - VMX_CHECK_EPTGEN /* Check if we have to invalidate TLB */ - - /* - * Restore guest state that is not automatically loaded from the vmcs. - */ - VMX_GUEST_RESTORE - - vmresume - - /* - * Capture the reason why vmresume failed. - */ - VM_INSTRUCTION_ERROR(%eax, %rsp) - - /* Return via vmx_setjmp with return value of VMX_RETURN_VMRESUME */ - movq %rsp,%rdi - movq $VMX_RETURN_VMRESUME,%rsi - - addq $VMXCTX_TMPSTKTOP,%rsp - callq vmx_return -END(vmx_resume) - -/* - * void vmx_launch(struct vmxctx *ctxp) - * %rdi = ctxp - * - * Although the return type is a 'void' this function may return indirectly - * through vmx_setjmp() with a return value of 3. - */ -ENTRY(vmx_launch) - VMX_DISABLE_INTERRUPTS - - VMX_CHECK_AST - - VMX_SET_PM_ACTIVE /* This vcpu is now active on the host cpu */ - - VMX_CHECK_EPTGEN /* Check if we have to invalidate TLB */ /* - * Restore guest state that is not automatically loaded from the vmcs. + * Deactivate guest pmap from this cpu. */ - VMX_GUEST_RESTORE + movq VMXCTX_PMAP(%rdi), %r11 + movl PCPU(CPUID), %r10d + LK btrl %r10d, PM_ACTIVE(%r11) - vmlaunch + VMX_HOST_RESTORE(%r10) /* - * Capture the reason why vmlaunch failed. + * This will return to the caller of 'vmx_enter_guest()' with a return + * value of VMX_GUEST_VMEXIT. */ - VM_INSTRUCTION_ERROR(%eax, %rsp) - - /* Return via vmx_setjmp with return value of VMX_RETURN_VMLAUNCH */ - movq %rsp,%rdi - movq $VMX_RETURN_VMLAUNCH,%rsi - - addq $VMXCTX_TMPSTKTOP,%rsp - callq vmx_return -END(vmx_launch) + movl $VMX_GUEST_VMEXIT, %eax + ret +END(vmx_exit_guest) Modified: stable/10/usr.sbin/bhyve/bhyverun.c ============================================================================== --- stable/10/usr.sbin/bhyve/bhyverun.c Thu Apr 17 17:20:56 2014 (r264618) +++ stable/10/usr.sbin/bhyve/bhyverun.c Thu Apr 17 18:00:07 2014 (r264619) @@ -388,10 +388,12 @@ vmexit_vmx(struct vmctx *ctx, struct vm_ fprintf(stderr, "\treason\t\tVMX\n"); fprintf(stderr, "\trip\t\t0x%016lx\n", vmexit->rip); fprintf(stderr, "\tinst_length\t%d\n", vmexit->inst_length); - fprintf(stderr, "\terror\t\t%d\n", vmexit->u.vmx.error); + fprintf(stderr, "\tstatus\t\t%d\n", vmexit->u.vmx.status); fprintf(stderr, "\texit_reason\t%u\n", vmexit->u.vmx.exit_reason); fprintf(stderr, "\tqualification\t0x%016lx\n", vmexit->u.vmx.exit_qualification); + fprintf(stderr, "\tinst_type\t\t%d\n", vmexit->u.vmx.inst_type); + fprintf(stderr, "\tinst_error\t\t%d\n", vmexit->u.vmx.inst_error); return (VMEXIT_ABORT); } Modified: stable/10/usr.sbin/bhyvectl/bhyvectl.c ============================================================================== --- stable/10/usr.sbin/bhyvectl/bhyvectl.c Thu Apr 17 17:20:56 2014 (r264618) +++ stable/10/usr.sbin/bhyvectl/bhyvectl.c Thu Apr 17 18:00:07 2014 (r264619) @@ -273,11 +273,13 @@ dump_vm_run_exitcode(struct vm_exit *vme break; case VM_EXITCODE_VMX: printf("\treason\t\tVMX\n"); - printf("\terror\t\t%d\n", vmexit->u.vmx.error); + printf("\tstatus\t\t%d\n", vmexit->u.vmx.status); printf("\texit_reason\t0x%08x (%u)\n", vmexit->u.vmx.exit_reason, vmexit->u.vmx.exit_reason); printf("\tqualification\t0x%016lx\n", vmexit->u.vmx.exit_qualification); + printf("\tinst_type\t\t%d\n", vmexit->u.vmx.inst_type); + printf("\tinst_error\t\t%d\n", vmexit->u.vmx.inst_error); break; default: printf("*** unknown vm run exitcode %d\n", vmexit->exitcode); From owner-svn-src-stable@FreeBSD.ORG Thu Apr 17 20:09:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D50AFB3; Thu, 17 Apr 2014 20:09:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69E021CA7; Thu, 17 Apr 2014 20:09:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3HK9gKX024021; Thu, 17 Apr 2014 20:09:42 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3HK9gwF024020; Thu, 17 Apr 2014 20:09:42 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201404172009.s3HK9gwF024020@svn.freebsd.org> From: Xin LI Date: Thu, 17 Apr 2014 20:09:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264624 - in stable: 8/crypto/openssl/crypto/rand 9/crypto/openssl/crypto/rand X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2014 20:09:42 -0000 Author: delphij Date: Thu Apr 17 20:09:41 2014 New Revision: 264624 URL: http://svnweb.freebsd.org/changeset/base/264624 Log: Cherry-pick OpenSSL changeset 5be1ae2: ==== Author: Dr. Stephen Henson Treat a zero length passed to ssleay_rand_add a no op: the existing logic zeroes the md value which is very bad. OpenSSL itself never does this internally and the actual call doesn't make sense as it would be passing zero bytes of entropy. Thanks to Marcus Meissner for reporting this bug. ==== This is a direct commit to stable/8 and stable/9. -HEAD and stable/10 already have this fix as part of OpenSSL 1.0.1g. Noticed by: koobs Reviewed by: benl (maintainer) Modified: stable/9/crypto/openssl/crypto/rand/md_rand.c Changes in other areas also in this revision: Modified: stable/8/crypto/openssl/crypto/rand/md_rand.c Modified: stable/9/crypto/openssl/crypto/rand/md_rand.c ============================================================================== --- stable/9/crypto/openssl/crypto/rand/md_rand.c Thu Apr 17 19:37:12 2014 (r264623) +++ stable/9/crypto/openssl/crypto/rand/md_rand.c Thu Apr 17 20:09:41 2014 (r264624) @@ -199,6 +199,9 @@ static void ssleay_rand_add(const void * EVP_MD_CTX m; int do_not_lock; + if (!num) + return; + /* * (Based on the rand(3) manpage) * From owner-svn-src-stable@FreeBSD.ORG Thu Apr 17 20:09:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF3BEFB7; Thu, 17 Apr 2014 20:09:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC4561CA9; Thu, 17 Apr 2014 20:09:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3HK9gYS024029; Thu, 17 Apr 2014 20:09:42 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3HK9g4P024028; Thu, 17 Apr 2014 20:09:42 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201404172009.s3HK9g4P024028@svn.freebsd.org> From: Xin LI Date: Thu, 17 Apr 2014 20:09:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r264624 - in stable: 8/crypto/openssl/crypto/rand 9/crypto/openssl/crypto/rand X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2014 20:09:42 -0000 Author: delphij Date: Thu Apr 17 20:09:41 2014 New Revision: 264624 URL: http://svnweb.freebsd.org/changeset/base/264624 Log: Cherry-pick OpenSSL changeset 5be1ae2: ==== Author: Dr. Stephen Henson Treat a zero length passed to ssleay_rand_add a no op: the existing logic zeroes the md value which is very bad. OpenSSL itself never does this internally and the actual call doesn't make sense as it would be passing zero bytes of entropy. Thanks to Marcus Meissner for reporting this bug. ==== This is a direct commit to stable/8 and stable/9. -HEAD and stable/10 already have this fix as part of OpenSSL 1.0.1g. Noticed by: koobs Reviewed by: benl (maintainer) Modified: stable/8/crypto/openssl/crypto/rand/md_rand.c Changes in other areas also in this revision: Modified: stable/9/crypto/openssl/crypto/rand/md_rand.c Modified: stable/8/crypto/openssl/crypto/rand/md_rand.c ============================================================================== --- stable/8/crypto/openssl/crypto/rand/md_rand.c Thu Apr 17 19:37:12 2014 (r264623) +++ stable/8/crypto/openssl/crypto/rand/md_rand.c Thu Apr 17 20:09:41 2014 (r264624) @@ -199,6 +199,9 @@ static void ssleay_rand_add(const void * EVP_MD_CTX m; int do_not_lock; + if (!num) + return; + /* * (Based on the rand(3) manpage) * From owner-svn-src-stable@FreeBSD.ORG Thu Apr 17 21:43:35 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8C1EFC9E; Thu, 17 Apr 2014 21:43:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77F6316E0; Thu, 17 Apr 2014 21:43:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3HLhZ9N065543; Thu, 17 Apr 2014 21:43:35 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3HLhYrS065535; Thu, 17 Apr 2014 21:43:34 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201404172143.s3HLhYrS065535@svn.freebsd.org> From: Jilles Tjoelker Date: Thu, 17 Apr 2014 21:43:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264629 - stable/9/bin/sh X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2014 21:43:35 -0000 Author: jilles Date: Thu Apr 17 21:43:34 2014 New Revision: 264629 URL: http://svnweb.freebsd.org/changeset/base/264629 Log: MFC r263777: sh: Fix possible memory leaks and double frees with unexpected SIGINT. Modified: stable/9/bin/sh/alias.c stable/9/bin/sh/exec.c stable/9/bin/sh/expand.c stable/9/bin/sh/redir.c stable/9/bin/sh/var.c Directory Properties: stable/9/bin/sh/ (props changed) Modified: stable/9/bin/sh/alias.c ============================================================================== --- stable/9/bin/sh/alias.c Thu Apr 17 21:29:22 2014 (r264628) +++ stable/9/bin/sh/alias.c Thu Apr 17 21:43:34 2014 (r264629) @@ -224,6 +224,7 @@ printaliases(void) int i, j; struct alias **sorted, *ap; + INTOFF; sorted = ckmalloc(aliases * sizeof(*sorted)); j = 0; for (i = 0; i < ATABSIZE; i++) @@ -231,9 +232,13 @@ printaliases(void) if (*ap->name != '\0') sorted[j++] = ap; qsort(sorted, aliases, sizeof(*sorted), comparealiases); - for (i = 0; i < aliases; i++) + for (i = 0; i < aliases; i++) { printalias(sorted[i]); + if (int_pending()) + break; + } ckfree(sorted); + INTON; } int Modified: stable/9/bin/sh/exec.c ============================================================================== --- stable/9/bin/sh/exec.c Thu Apr 17 21:29:22 2014 (r264628) +++ stable/9/bin/sh/exec.c Thu Apr 17 21:43:34 2014 (r264629) @@ -629,6 +629,7 @@ defun(const char *name, union node *func /* * Delete a function if it exists. + * Called with interrupts off. */ int Modified: stable/9/bin/sh/expand.c ============================================================================== --- stable/9/bin/sh/expand.c Thu Apr 17 21:29:22 2014 (r264628) +++ stable/9/bin/sh/expand.c Thu Apr 17 21:43:34 2014 (r264629) @@ -986,6 +986,7 @@ recordregion(int start, int end, int inq { struct ifsregion *ifsp; + INTOFF; if (ifslastp == NULL) { ifsp = &ifsfirst; } else { @@ -993,6 +994,7 @@ recordregion(int start, int end, int inq && ifslastp->inquotes == inquotes) { /* extend previous area */ ifslastp->endoff = end; + INTON; return; } ifsp = (struct ifsregion *)ckmalloc(sizeof (struct ifsregion)); @@ -1003,6 +1005,7 @@ recordregion(int start, int end, int inq ifslastp->begoff = start; ifslastp->endoff = end; ifslastp->inquotes = inquotes; + INTON; } Modified: stable/9/bin/sh/redir.c ============================================================================== --- stable/9/bin/sh/redir.c Thu Apr 17 21:29:22 2014 (r264628) +++ stable/9/bin/sh/redir.c Thu Apr 17 21:43:34 2014 (r264629) @@ -93,6 +93,13 @@ static int openhere(union node *); * undone by calling popredir. If the REDIR_BACKQ flag is set, then the * standard output, and the standard error if it becomes a duplicate of * stdout, is saved in memory. +* + * We suppress interrupts so that we won't leave open file + * descriptors around. Because the signal handler remains + * installed and we do not use system call restart, interrupts + * will still abort blocking opens such as fifos (they will fail + * with EINTR). There is, however, a race condition if an interrupt + * arrives after INTOFF and before open blocks. */ void @@ -104,6 +111,7 @@ redirect(union node *redir, int flags) int fd; char memory[10]; /* file descriptors to write to memory */ + INTOFF; for (i = 10 ; --i >= 0 ; ) memory[i] = 0; memory[1] = flags & REDIR_BACKQ; @@ -140,11 +148,14 @@ redirect(union node *redir, int flags) if (fd == 0) fd0_redirected++; openredirect(n, memory); + INTON; + INTOFF; } if (memory[1]) out1 = &memout; if (memory[2]) out2 = &memout; + INTON; } @@ -157,15 +168,6 @@ openredirect(union node *redir, char mem int f; int e; - /* - * We suppress interrupts so that we won't leave open file - * descriptors around. Because the signal handler remains - * installed and we do not use system call restart, interrupts - * will still abort blocking opens such as fifos (they will fail - * with EINTR). There is, however, a race condition if an interrupt - * arrives after INTOFF and before open blocks. - */ - INTOFF; memory[fd] = 0; switch (redir->nfile.type) { case NFROM: @@ -238,7 +240,6 @@ movefd: default: abort(); } - INTON; } Modified: stable/9/bin/sh/var.c ============================================================================== --- stable/9/bin/sh/var.c Thu Apr 17 21:29:22 2014 (r264628) +++ stable/9/bin/sh/var.c Thu Apr 17 21:43:34 2014 (r264629) @@ -263,6 +263,7 @@ setvar(const char *name, const char *val } else { len += strlen(val); } + INTOFF; nameeq = ckmalloc(len); memcpy(nameeq, name, namelen); nameeq[namelen] = '='; @@ -271,6 +272,7 @@ setvar(const char *name, const char *val else nameeq[namelen + 1] = '\0'; setvareq(nameeq, flags); + INTON; } static int @@ -303,6 +305,7 @@ change_env(const char *s, int set) char *eqp; char *ss; + INTOFF; ss = savestr(s); if ((eqp = strchr(ss, '=')) != NULL) *eqp = '\0'; @@ -311,6 +314,7 @@ change_env(const char *s, int set) else (void) unsetenv(ss); ckfree(ss); + INTON; return; } @@ -373,13 +377,13 @@ setvareq(char *s, int flags) /* not found */ if (flags & VNOSET) return; + INTOFF; vp = ckmalloc(sizeof (*vp)); vp->flags = flags; vp->text = s; vp->name_len = nlen; vp->next = *vpp; vp->func = NULL; - INTOFF; *vpp = vp; if ((vp->flags & VEXPORT) && localevar(s)) { change_env(s, 1); @@ -792,6 +796,7 @@ poplocalvars(void) struct localvar *lvp; struct var *vp; + INTOFF; while ((lvp = localvars) != NULL) { localvars = lvp->next; vp = lvp->vp; @@ -809,6 +814,7 @@ poplocalvars(void) } ckfree(lvp); } + INTON; } @@ -847,18 +853,21 @@ unsetcmd(int argc __unused, char **argv if (flg_func == 0 && flg_var == 0) flg_var = 1; + INTOFF; for (ap = argptr; *ap ; ap++) { if (flg_func) ret |= unsetfunc(*ap); if (flg_var) ret |= unsetvar(*ap); } + INTON; return ret; } /* * Unset the specified variable. + * Called with interrupts off. */ int @@ -872,7 +881,6 @@ unsetvar(const char *s) return (0); if (vp->flags & VREADONLY) return (1); - INTOFF; if (vp->text[vp->name_len + 1] != '\0') setvar(s, nullstr, 0); if ((vp->flags & VEXPORT) && localevar(vp->text)) { @@ -888,7 +896,6 @@ unsetvar(const char *s) *vpp = vp->next; ckfree(vp); } - INTON; return (0); } From owner-svn-src-stable@FreeBSD.ORG Fri Apr 18 00:48:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BFFE3C96; Fri, 18 Apr 2014 00:48:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0070175F; Fri, 18 Apr 2014 00:48:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3I0mRZs041978; Fri, 18 Apr 2014 00:48:27 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3I0mRCb041976; Fri, 18 Apr 2014 00:48:27 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201404180048.s3I0mRCb041976@svn.freebsd.org> From: Devin Teske Date: Fri, 18 Apr 2014 00:48:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264632 - stable/10/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2014 00:48:27 -0000 Author: dteske Date: Fri Apr 18 00:48:26 2014 New Revision: 264632 URL: http://svnweb.freebsd.org/changeset/base/264632 Log: MFC r264488: When merging docsinstall and zfsboot updates to stable/9 it was discovered that the slightly older dialog(1) requires --separate-output when using the --checklist widget to force response to produce unquoted values (whereas in stable/10 --checklist widget without --separate-output will only quote the checklist labels in the response if the label is multi-word (contains any whitespace). Since these enhancements (see revisions 263956 and 264437) were developed originally on 10, the --separate-output option was omitted. When merged to stable/9, we (Allan Jude) and I found during testing that the "always- quoting" of the response was causing things like struct interpolation to fail (`f_struct device_$dev' would produce `f_struct device_\"da0\"' for example -- literal quotes inherited from dialog(1) --checklist response). To see the behavior, execute the following on stable/9 versus stable/10: dialog --checklist disks: 0 0 0 da0 "" off da1 "" off Check both items and hit enter. On stable/10, the response is: da0 da1 On stable/9 the response is: "da0" "da1" If you use the --separate-output option, the response is the same for both: da0 da1 So applying --separate-output on every platform until either one of two things occurs 1) dialog(1,3) gets synchronized between stable/9, higher or 2) we drop support for stable/9. Reviewed by: Allan Jude Modified: stable/10/usr.sbin/bsdinstall/scripts/docsinstall stable/10/usr.sbin/bsdinstall/scripts/zfsboot Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/docsinstall ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/docsinstall Fri Apr 18 00:02:06 2014 (r264631) +++ stable/10/usr.sbin/bsdinstall/scripts/docsinstall Fri Apr 18 00:48:26 2014 (r264632) @@ -119,6 +119,7 @@ dialog_menu_main() selected=$( eval $DIALOG \ --title \"\$title\" \ --backtitle \"\$btitle\" \ + --separate-output \ --hline \"\$hline\" \ --ok-label \"\$msg_ok\" \ --cancel-label \"\$msg_cancel\" \ Modified: stable/10/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/zfsboot Fri Apr 18 00:02:06 2014 (r264631) +++ stable/10/usr.sbin/bsdinstall/scripts/zfsboot Fri Apr 18 00:48:26 2014 (r264632) @@ -581,6 +581,7 @@ dialog_menu_layout() selections=$( eval $DIALOG \ --title \"\$DIALOG_TITLE\" \ --backtitle \"\$DIALOG_BACKTITLE\" \ + --separate-output \ --hline \"\$hline\" \ --ok-label \"\$msg_ok\" \ --cancel-label \"\$msg_back\" \ From owner-svn-src-stable@FreeBSD.ORG Fri Apr 18 00:53:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DCEB8DF8; Fri, 18 Apr 2014 00:53:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC885180A; Fri, 18 Apr 2014 00:53:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3I0rZ1m045485; Fri, 18 Apr 2014 00:53:35 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3I0rZe7045483; Fri, 18 Apr 2014 00:53:35 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201404180053.s3I0rZe7045483@svn.freebsd.org> From: Devin Teske Date: Fri, 18 Apr 2014 00:53:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264633 - stable/9/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2014 00:53:36 -0000 Author: dteske Date: Fri Apr 18 00:53:35 2014 New Revision: 264633 URL: http://svnweb.freebsd.org/changeset/base/264633 Log: MFC r264488: When merging docsinstall and zfsboot updates to stable/9 it was discovered that the slightly older dialog(1) requires --separate-output when using the --checklist widget to force response to produce unquoted values (whereas in stable/10 --checklist widget without --separate-output will only quote the checklist labels in the response if the label is multi-word (contains any whitespace). Since these enhancements (see revisions 263956 and 264437) were developed originally on 10, the --separate-output option was omitted. When merged to stable/9, we (Allan Jude) and I found during testing that the "always- quoting" of the response was causing things like struct interpolation to fail (`f_struct device_$dev' would produce `f_struct device_\"da0\"' for example -- literal quotes inherited from dialog(1) --checklist response). To see the behavior, execute the following on stable/9 versus stable/10: dialog --checklist disks: 0 0 0 da0 "" off da1 "" off Check both items and hit enter. On stable/10, the response is: da0 da1 On stable/9 the response is: "da0" "da1" If you use the --separate-output option, the response is the same for both: da0 da1 So applying --separate-output on every platform until either one of two things occurs 1) dialog(1,3) gets synchronized between stable/9, higher or 2) we drop support for stable/9. Reviewed by: Allan Jude Modified: stable/9/usr.sbin/bsdinstall/scripts/docsinstall stable/9/usr.sbin/bsdinstall/scripts/zfsboot Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/bsdinstall/ (props changed) stable/9/usr.sbin/bsdinstall/scripts/ (props changed) Modified: stable/9/usr.sbin/bsdinstall/scripts/docsinstall ============================================================================== --- stable/9/usr.sbin/bsdinstall/scripts/docsinstall Fri Apr 18 00:48:26 2014 (r264632) +++ stable/9/usr.sbin/bsdinstall/scripts/docsinstall Fri Apr 18 00:53:35 2014 (r264633) @@ -119,6 +119,7 @@ dialog_menu_main() selected=$( eval $DIALOG \ --title \"\$title\" \ --backtitle \"\$btitle\" \ + --separate-output \ --hline \"\$hline\" \ --ok-label \"\$msg_ok\" \ --cancel-label \"\$msg_cancel\" \ Modified: stable/9/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- stable/9/usr.sbin/bsdinstall/scripts/zfsboot Fri Apr 18 00:48:26 2014 (r264632) +++ stable/9/usr.sbin/bsdinstall/scripts/zfsboot Fri Apr 18 00:53:35 2014 (r264633) @@ -581,6 +581,7 @@ dialog_menu_layout() selections=$( eval $DIALOG \ --title \"\$DIALOG_TITLE\" \ --backtitle \"\$DIALOG_BACKTITLE\" \ + --separate-output \ --hline \"\$hline\" \ --ok-label \"\$msg_ok\" \ --cancel-label \"\$msg_back\" \ From owner-svn-src-stable@FreeBSD.ORG Fri Apr 18 07:40:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1855389A; Fri, 18 Apr 2014 07:40:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 04D4B1E4B; Fri, 18 Apr 2014 07:40:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3I7eNfb017036; Fri, 18 Apr 2014 07:40:23 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3I7eNRY017035; Fri, 18 Apr 2014 07:40:23 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201404180740.s3I7eNRY017035@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 18 Apr 2014 07:40:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264636 - stable/9/sys/dev/usb/controller X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2014 07:40:24 -0000 Author: hselasky Date: Fri Apr 18 07:40:23 2014 New Revision: 264636 URL: http://svnweb.freebsd.org/changeset/base/264636 Log: MFC r264340: Correct IMOD default value according to comment. Modified: stable/9/sys/dev/usb/controller/xhcireg.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/controller/xhcireg.h ============================================================================== --- stable/9/sys/dev/usb/controller/xhcireg.h Fri Apr 18 06:39:00 2014 (r264635) +++ stable/9/sys/dev/usb/controller/xhcireg.h Fri Apr 18 07:40:23 2014 (r264636) @@ -166,7 +166,7 @@ #define XHCI_IMOD_IVAL_SET(x) (((x) & 0xFFFF) << 0) /* 250ns unit */ #define XHCI_IMOD_ICNT_GET(x) (((x) >> 16) & 0xFFFF) /* 250ns unit */ #define XHCI_IMOD_ICNT_SET(x) (((x) & 0xFFFF) << 16) /* 250ns unit */ -#define XHCI_IMOD_DEFAULT 0x000003E8U /* 8000 IRQ/second */ +#define XHCI_IMOD_DEFAULT 0x000001F4U /* 8000 IRQ/second */ #define XHCI_ERSTSZ(n) (0x0028 + (0x20 * (n))) /* XHCI event ring segment table size */ #define XHCI_ERSTS_GET(x) ((x) & 0xFFFF) #define XHCI_ERSTS_SET(x) ((x) & 0xFFFF) From owner-svn-src-stable@FreeBSD.ORG Fri Apr 18 07:42:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B54459F6; Fri, 18 Apr 2014 07:42:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0D8E1E5F; Fri, 18 Apr 2014 07:42:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3I7gmgO018518; Fri, 18 Apr 2014 07:42:48 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3I7gmkd018515; Fri, 18 Apr 2014 07:42:48 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201404180742.s3I7gmkd018515@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 18 Apr 2014 07:42:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264637 - stable/9/lib/libusb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2014 07:42:48 -0000 Author: hselasky Date: Fri Apr 18 07:42:47 2014 New Revision: 264637 URL: http://svnweb.freebsd.org/changeset/base/264637 Log: MFC r264344: Tune buffer sizes for SuperSpeed USB when using LibUSB v0.1 and v1.0 APIs to increase the maximum bandwidth limit. Modified: stable/9/lib/libusb/libusb01.c stable/9/lib/libusb/libusb10.c Directory Properties: stable/9/lib/ (props changed) stable/9/lib/libusb/ (props changed) Modified: stable/9/lib/libusb/libusb01.c ============================================================================== --- stable/9/lib/libusb/libusb01.c Fri Apr 18 07:40:23 2014 (r264636) +++ stable/9/lib/libusb/libusb01.c Fri Apr 18 07:42:47 2014 (r264637) @@ -122,6 +122,8 @@ usb_get_transfer_by_ep_no(usb_dev_handle bufsize = 256; } else if (speed == LIBUSB20_SPEED_FULL) { bufsize = 4096; + } else if (speed == LIBUSB20_SPEED_SUPER) { + bufsize = 65536; } else { bufsize = 16384; } Modified: stable/9/lib/libusb/libusb10.c ============================================================================== --- stable/9/lib/libusb/libusb10.c Fri Apr 18 07:40:23 2014 (r264636) +++ stable/9/lib/libusb/libusb10.c Fri Apr 18 07:42:47 2014 (r264637) @@ -929,6 +929,9 @@ libusb10_get_buffsize(struct libusb20_de case LIBUSB20_SPEED_FULL: ret = 4096; break; + case LIBUSB20_SPEED_SUPER: + ret = 65536; + break; default: ret = 16384; break; From owner-svn-src-stable@FreeBSD.ORG Fri Apr 18 07:44:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A4211B6B; Fri, 18 Apr 2014 07:44:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FBD31E6F; Fri, 18 Apr 2014 07:44:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3I7ihkl018810; Fri, 18 Apr 2014 07:44:43 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3I7ihrj018809; Fri, 18 Apr 2014 07:44:43 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201404180744.s3I7ihrj018809@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 18 Apr 2014 07:44:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r264638 - stable/8/sys/dev/usb/controller X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2014 07:44:43 -0000 Author: hselasky Date: Fri Apr 18 07:44:43 2014 New Revision: 264638 URL: http://svnweb.freebsd.org/changeset/base/264638 Log: MFC r264340: Correct IMOD default value according to comment. Modified: stable/8/sys/dev/usb/controller/xhcireg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/controller/xhcireg.h ============================================================================== --- stable/8/sys/dev/usb/controller/xhcireg.h Fri Apr 18 07:42:47 2014 (r264637) +++ stable/8/sys/dev/usb/controller/xhcireg.h Fri Apr 18 07:44:43 2014 (r264638) @@ -166,7 +166,7 @@ #define XHCI_IMOD_IVAL_SET(x) (((x) & 0xFFFF) << 0) /* 250ns unit */ #define XHCI_IMOD_ICNT_GET(x) (((x) >> 16) & 0xFFFF) /* 250ns unit */ #define XHCI_IMOD_ICNT_SET(x) (((x) & 0xFFFF) << 16) /* 250ns unit */ -#define XHCI_IMOD_DEFAULT 0x000003E8U /* 8000 IRQ/second */ +#define XHCI_IMOD_DEFAULT 0x000001F4U /* 8000 IRQ/second */ #define XHCI_ERSTSZ(n) (0x0028 + (0x20 * (n))) /* XHCI event ring segment table size */ #define XHCI_ERSTS_GET(x) ((x) & 0xFFFF) #define XHCI_ERSTS_SET(x) ((x) & 0xFFFF) From owner-svn-src-stable@FreeBSD.ORG Fri Apr 18 07:46:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60D6ECBF; Fri, 18 Apr 2014 07:46:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D7CE1E81; Fri, 18 Apr 2014 07:46:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3I7kRaq019093; Fri, 18 Apr 2014 07:46:27 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3I7kQeq019091; Fri, 18 Apr 2014 07:46:26 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201404180746.s3I7kQeq019091@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 18 Apr 2014 07:46:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r264639 - stable/8/lib/libusb X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2014 07:46:27 -0000 Author: hselasky Date: Fri Apr 18 07:46:26 2014 New Revision: 264639 URL: http://svnweb.freebsd.org/changeset/base/264639 Log: MFC r264344: Tune buffer sizes for SuperSpeed USB when using LibUSB v0.1 and v1.0 APIs to increase the maximum bandwidth limit. Modified: stable/8/lib/libusb/libusb01.c stable/8/lib/libusb/libusb10.c Directory Properties: stable/8/lib/ (props changed) stable/8/lib/libusb/ (props changed) Modified: stable/8/lib/libusb/libusb01.c ============================================================================== --- stable/8/lib/libusb/libusb01.c Fri Apr 18 07:44:43 2014 (r264638) +++ stable/8/lib/libusb/libusb01.c Fri Apr 18 07:46:26 2014 (r264639) @@ -122,6 +122,8 @@ usb_get_transfer_by_ep_no(usb_dev_handle bufsize = 256; } else if (speed == LIBUSB20_SPEED_FULL) { bufsize = 4096; + } else if (speed == LIBUSB20_SPEED_SUPER) { + bufsize = 65536; } else { bufsize = 16384; } Modified: stable/8/lib/libusb/libusb10.c ============================================================================== --- stable/8/lib/libusb/libusb10.c Fri Apr 18 07:44:43 2014 (r264638) +++ stable/8/lib/libusb/libusb10.c Fri Apr 18 07:46:26 2014 (r264639) @@ -916,6 +916,9 @@ libusb10_get_buffsize(struct libusb20_de case LIBUSB20_SPEED_FULL: ret = 4096; break; + case LIBUSB20_SPEED_SUPER: + ret = 65536; + break; default: ret = 16384; break; From owner-svn-src-stable@FreeBSD.ORG Fri Apr 18 07:48:29 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E5588E3D; Fri, 18 Apr 2014 07:48:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D17C71FA3; Fri, 18 Apr 2014 07:48:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3I7mTTT019354; Fri, 18 Apr 2014 07:48:29 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3I7mTWq019353; Fri, 18 Apr 2014 07:48:29 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201404180748.s3I7mTWq019353@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 18 Apr 2014 07:48:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264640 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2014 07:48:30 -0000 Author: hselasky Date: Fri Apr 18 07:48:29 2014 New Revision: 264640 URL: http://svnweb.freebsd.org/changeset/base/264640 Log: MFC r264340: Correct IMOD default value according to comment. Modified: stable/10/sys/dev/usb/controller/xhcireg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/xhcireg.h ============================================================================== --- stable/10/sys/dev/usb/controller/xhcireg.h Fri Apr 18 07:46:26 2014 (r264639) +++ stable/10/sys/dev/usb/controller/xhcireg.h Fri Apr 18 07:48:29 2014 (r264640) @@ -166,7 +166,7 @@ #define XHCI_IMOD_IVAL_SET(x) (((x) & 0xFFFF) << 0) /* 250ns unit */ #define XHCI_IMOD_ICNT_GET(x) (((x) >> 16) & 0xFFFF) /* 250ns unit */ #define XHCI_IMOD_ICNT_SET(x) (((x) & 0xFFFF) << 16) /* 250ns unit */ -#define XHCI_IMOD_DEFAULT 0x000003E8U /* 8000 IRQ/second */ +#define XHCI_IMOD_DEFAULT 0x000001F4U /* 8000 IRQ/second */ #define XHCI_ERSTSZ(n) (0x0028 + (0x20 * (n))) /* XHCI event ring segment table size */ #define XHCI_ERSTS_GET(x) ((x) & 0xFFFF) #define XHCI_ERSTS_SET(x) ((x) & 0xFFFF) From owner-svn-src-stable@FreeBSD.ORG Fri Apr 18 07:50:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 473B2FC2; Fri, 18 Apr 2014 07:50:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 345281052; Fri, 18 Apr 2014 07:50:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3I7oQkP020000; Fri, 18 Apr 2014 07:50:26 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3I7oPus019998; Fri, 18 Apr 2014 07:50:25 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201404180750.s3I7oPus019998@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 18 Apr 2014 07:50:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264641 - stable/10/lib/libusb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2014 07:50:26 -0000 Author: hselasky Date: Fri Apr 18 07:50:25 2014 New Revision: 264641 URL: http://svnweb.freebsd.org/changeset/base/264641 Log: MFC r264344: Tune buffer sizes for SuperSpeed USB when using LibUSB v0.1 and v1.0 APIs to increase the maximum bandwidth limit. Modified: stable/10/lib/libusb/libusb01.c stable/10/lib/libusb/libusb10.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libusb/libusb01.c ============================================================================== --- stable/10/lib/libusb/libusb01.c Fri Apr 18 07:48:29 2014 (r264640) +++ stable/10/lib/libusb/libusb01.c Fri Apr 18 07:50:25 2014 (r264641) @@ -127,6 +127,8 @@ usb_get_transfer_by_ep_no(usb_dev_handle bufsize = 256; } else if (speed == LIBUSB20_SPEED_FULL) { bufsize = 4096; + } else if (speed == LIBUSB20_SPEED_SUPER) { + bufsize = 65536; } else { bufsize = 16384; } Modified: stable/10/lib/libusb/libusb10.c ============================================================================== --- stable/10/lib/libusb/libusb10.c Fri Apr 18 07:48:29 2014 (r264640) +++ stable/10/lib/libusb/libusb10.c Fri Apr 18 07:50:25 2014 (r264641) @@ -935,6 +935,9 @@ libusb10_get_buffsize(struct libusb20_de case LIBUSB20_SPEED_FULL: ret = 4096; break; + case LIBUSB20_SPEED_SUPER: + ret = 65536; + break; default: ret = 16384; break; From owner-svn-src-stable@FreeBSD.ORG Fri Apr 18 12:34:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 730055CC; Fri, 18 Apr 2014 12:34:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F78E1A85; Fri, 18 Apr 2014 12:34:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3ICYBQB038673; Fri, 18 Apr 2014 12:34:11 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3ICYBOB038672; Fri, 18 Apr 2014 12:34:11 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201404181234.s3ICYBOB038672@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 18 Apr 2014 12:34:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264643 - stable/9/bin/sh X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2014 12:34:11 -0000 Author: jilles Date: Fri Apr 18 12:34:10 2014 New Revision: 264643 URL: http://svnweb.freebsd.org/changeset/base/264643 Log: MFC r263846: sh: Fix memory leak when trying to set a read only variable. Modified: stable/9/bin/sh/var.c Directory Properties: stable/9/bin/sh/ (props changed) Modified: stable/9/bin/sh/var.c ============================================================================== --- stable/9/bin/sh/var.c Fri Apr 18 08:31:55 2014 (r264642) +++ stable/9/bin/sh/var.c Fri Apr 18 12:34:10 2014 (r264643) @@ -339,8 +339,11 @@ setvareq(char *s, int flags) mklocal(s); vp = find_var(s, &vpp, &nlen); if (vp != NULL) { - if (vp->flags & VREADONLY) + if (vp->flags & VREADONLY) { + if ((flags & (VTEXTFIXED|VSTACK)) == 0) + ckfree(s); error("%.*s: is read only", vp->name_len, s); + } if (flags & VNOSET) return; INTOFF; From owner-svn-src-stable@FreeBSD.ORG Fri Apr 18 12:42:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8BD047E9; Fri, 18 Apr 2014 12:42:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7729B1B4C; Fri, 18 Apr 2014 12:42:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3ICgpL9042540; Fri, 18 Apr 2014 12:42:51 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3ICgpQe042539; Fri, 18 Apr 2014 12:42:51 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201404181242.s3ICgpQe042539@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 18 Apr 2014 12:42:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264644 - stable/9/bin/sh X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2014 12:42:51 -0000 Author: jilles Date: Fri Apr 18 12:42:50 2014 New Revision: 264644 URL: http://svnweb.freebsd.org/changeset/base/264644 Log: MFC r263847: sh: Fix memory leak with an assignment before a regular builtin Modified: stable/9/bin/sh/var.c Directory Properties: stable/9/bin/sh/ (props changed) Modified: stable/9/bin/sh/var.c ============================================================================== --- stable/9/bin/sh/var.c Fri Apr 18 12:34:10 2014 (r264643) +++ stable/9/bin/sh/var.c Fri Apr 18 12:42:50 2014 (r264644) @@ -344,8 +344,11 @@ setvareq(char *s, int flags) ckfree(s); error("%.*s: is read only", vp->name_len, s); } - if (flags & VNOSET) + if (flags & VNOSET) { + if ((flags & (VTEXTFIXED|VSTACK)) == 0) + ckfree(s); return; + } INTOFF; if (vp->func && (flags & VNOFUNC) == 0) @@ -378,8 +381,11 @@ setvareq(char *s, int flags) return; } /* not found */ - if (flags & VNOSET) + if (flags & VNOSET) { + if ((flags & (VTEXTFIXED|VSTACK)) == 0) + ckfree(s); return; + } INTOFF; vp = ckmalloc(sizeof (*vp)); vp->flags = flags; From owner-svn-src-stable@FreeBSD.ORG Fri Apr 18 12:51:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F749A1B; Fri, 18 Apr 2014 12:51:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BC2E1C33; Fri, 18 Apr 2014 12:51:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3ICpV9B044778; Fri, 18 Apr 2014 12:51:31 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3ICpVmP044777; Fri, 18 Apr 2014 12:51:31 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201404181251.s3ICpVmP044777@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 18 Apr 2014 12:51:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264645 - stable/9/bin/sh X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2014 12:51:31 -0000 Author: jilles Date: Fri Apr 18 12:51:30 2014 New Revision: 264645 URL: http://svnweb.freebsd.org/changeset/base/264645 Log: MFC r260246: sh(1): Discourage use of -e. Also, do not say that ! before a pipeline is an operator, because it is syntactically a keyword. Modified: stable/9/bin/sh/sh.1 Directory Properties: stable/9/bin/sh/ (props changed) Modified: stable/9/bin/sh/sh.1 ============================================================================== --- stable/9/bin/sh/sh.1 Fri Apr 18 12:42:50 2014 (r264644) +++ stable/9/bin/sh/sh.1 Fri Apr 18 12:51:30 2014 (r264645) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd June 14, 2013 +.Dd January 3, 2014 .Dt SH 1 .Os .Sh NAME @@ -235,10 +235,16 @@ or .Dq Li || operator; or if the command is a pipeline preceded by the .Ic !\& -operator. +keyword. If a shell function is executed and its exit status is explicitly tested, all commands of the function are considered to be tested as well. +.Pp +It is recommended to check for failures explicitly +instead of relying on +.Fl e +because it tends to behave in unexpected ways, +particularly in larger scripts. .It Fl f Li noglob Disable pathname expansion. .It Fl h Li trackall From owner-svn-src-stable@FreeBSD.ORG Fri Apr 18 14:59:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 18207374; Fri, 18 Apr 2014 14:59:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0418218CF; Fri, 18 Apr 2014 14:59:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3IExduE096566; Fri, 18 Apr 2014 14:59:39 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3IExdaj096565; Fri, 18 Apr 2014 14:59:39 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201404181459.s3IExdaj096565@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 18 Apr 2014 14:59:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264647 - stable/9/usr.bin/find X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2014 14:59:40 -0000 Author: jilles Date: Fri Apr 18 14:59:39 2014 New Revision: 264647 URL: http://svnweb.freebsd.org/changeset/base/264647 Log: MFC r263244: find: When performing -quit, finish pending -exec ... + command lines. This avoids unexpected partial processing when a find command uses both -quit and -exec ... +. GNU find does the same. Modified: stable/9/usr.bin/find/function.c Directory Properties: stable/9/usr.bin/find/ (props changed) Modified: stable/9/usr.bin/find/function.c ============================================================================== --- stable/9/usr.bin/find/function.c Fri Apr 18 14:21:10 2014 (r264646) +++ stable/9/usr.bin/find/function.c Fri Apr 18 14:59:39 2014 (r264647) @@ -1705,6 +1705,7 @@ f_false(PLAN *plan __unused, FTSENT *ent int f_quit(PLAN *plan __unused, FTSENT *entry __unused) { + finish_execplus(); exit(0); } From owner-svn-src-stable@FreeBSD.ORG Sun Apr 20 01:37:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1FF30ADE; Sun, 20 Apr 2014 01:37:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C60A16F2; Sun, 20 Apr 2014 01:37:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3K1bU4k054601; Sun, 20 Apr 2014 01:37:30 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3K1bUqG054600; Sun, 20 Apr 2014 01:37:30 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201404200137.s3K1bUqG054600@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 20 Apr 2014 01:37:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264684 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Apr 2014 01:37:31 -0000 Author: kib Date: Sun Apr 20 01:37:30 2014 New Revision: 264684 URL: http://svnweb.freebsd.org/changeset/base/264684 Log: MFC r264620: Fix typo. Modified: stable/10/sys/kern/subr_fattime.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/subr_fattime.c ============================================================================== --- stable/10/sys/kern/subr_fattime.c Sat Apr 19 22:18:57 2014 (r264683) +++ stable/10/sys/kern/subr_fattime.c Sun Apr 20 01:37:30 2014 (r264684) @@ -49,7 +49,7 @@ * "New Technology". Anyway... * * The 'utc' argument determines if the resulting FATTIME timestamp - * should b on the UTC or local timezone calendar. + * should be on the UTC or local timezone calendar. * * The conversion functions below cut time into four-year leap-second * cycles rather than single years and uses table lookups inside those From owner-svn-src-stable@FreeBSD.ORG Sun Apr 20 01:45:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F641CFA; Sun, 20 Apr 2014 01:45:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF791178E; Sun, 20 Apr 2014 01:45:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3K1jNNt058404; Sun, 20 Apr 2014 01:45:23 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3K1jNsc058403; Sun, 20 Apr 2014 01:45:23 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201404200145.s3K1jNsc058403@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 20 Apr 2014 01:45:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264685 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Apr 2014 01:45:24 -0000 Author: kib Date: Sun Apr 20 01:45:23 2014 New Revision: 264685 URL: http://svnweb.freebsd.org/changeset/base/264685 Log: MFC r264620: Fix typo. Modified: stable/9/sys/kern/subr_fattime.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/subr_fattime.c ============================================================================== --- stable/9/sys/kern/subr_fattime.c Sun Apr 20 01:37:30 2014 (r264684) +++ stable/9/sys/kern/subr_fattime.c Sun Apr 20 01:45:23 2014 (r264685) @@ -49,7 +49,7 @@ * "New Technology". Anyway... * * The 'utc' argument determines if the resulting FATTIME timestamp - * should b on the UTC or local timezone calendar. + * should be on the UTC or local timezone calendar. * * The conversion functions below cut time into four-year leap-second * cycles rather than single years and uses table lookups inside those From owner-svn-src-stable@FreeBSD.ORG Sun Apr 20 06:46:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D337C2C; Sun, 20 Apr 2014 06:46:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F27A1052; Sun, 20 Apr 2014 06:46:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3K6k52O080846; Sun, 20 Apr 2014 06:46:05 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3K6k5SD080845; Sun, 20 Apr 2014 06:46:05 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201404200646.s3K6k5SD080845@svn.freebsd.org> From: "George V. Neville-Neil" Date: Sun, 20 Apr 2014 06:46:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264688 - stable/10/usr.sbin/arp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Apr 2014 06:46:05 -0000 Author: gnn Date: Sun Apr 20 06:46:04 2014 New Revision: 264688 URL: http://svnweb.freebsd.org/changeset/base/264688 Log: MFC: 264174 Speed up the lookup of interfaces when there are a large number of them, such in a system with a large number of VLANs. Submitted by: Nick Rogers Modified: stable/10/usr.sbin/arp/arp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/arp/arp.c ============================================================================== --- stable/10/usr.sbin/arp/arp.c Sun Apr 20 05:40:13 2014 (r264687) +++ stable/10/usr.sbin/arp/arp.c Sun Apr 20 06:46:04 2014 (r264688) @@ -104,6 +104,8 @@ static char *rifname; static time_t expire_time; static int flags, doing_proxy; +struct if_nameindex *ifnameindex; + /* which function we're supposed to do */ #define F_GET 1 #define F_SET 2 @@ -200,6 +202,9 @@ main(int argc, char *argv[]) break; } + if (ifnameindex != NULL) + if_freenameindex(ifnameindex); + return (rtn); } @@ -558,8 +563,6 @@ search(u_long addr, action_fn *action) /* * Display an arp entry */ -static char lifname[IF_NAMESIZE]; -static int64_t lifindex = -1; static void print_entry(struct sockaddr_dl *sdl, @@ -568,8 +571,13 @@ print_entry(struct sockaddr_dl *sdl, const char *host; struct hostent *hp; struct iso88025_sockaddr_dl_data *trld; + struct if_nameindex *p; int seg; + if (ifnameindex == NULL) + if ((ifnameindex = if_nameindex()) == NULL) + err(1, "cannot retrieve interface names"); + if (nflag == 0) hp = gethostbyaddr((caddr_t)&(addr->sin_addr), sizeof addr->sin_addr, AF_INET); @@ -596,12 +604,15 @@ print_entry(struct sockaddr_dl *sdl, } } else printf("(incomplete)"); - if (sdl->sdl_index != lifindex && - if_indextoname(sdl->sdl_index, lifname) != NULL) { - lifindex = sdl->sdl_index; - printf(" on %s", lifname); - } else if (sdl->sdl_index == lifindex) - printf(" on %s", lifname); + + for (p = ifnameindex; p && ifnameindex->if_index && + ifnameindex->if_name; p++) { + if (p->if_index == sdl->sdl_index) { + printf(" on %s", p->if_name); + break; + } + } + if (rtm->rtm_rmx.rmx_expire == 0) printf(" permanent"); else { From owner-svn-src-stable@FreeBSD.ORG Sun Apr 20 12:46:21 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1CD5F61; Sun, 20 Apr 2014 12:46:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D37371B98; Sun, 20 Apr 2014 12:46:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3KCkKoj027269; Sun, 20 Apr 2014 12:46:20 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3KCkI5L027257; Sun, 20 Apr 2014 12:46:18 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201404201246.s3KCkI5L027257@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 20 Apr 2014 12:46:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264692 - stable/10/crypto/openssh X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Apr 2014 12:46:21 -0000 Author: des Date: Sun Apr 20 12:46:18 2014 New Revision: 264692 URL: http://svnweb.freebsd.org/changeset/base/264692 Log: MFH (r264691): merge upstream patch for EC calculation bug Modified: stable/10/crypto/openssh/bufaux.c stable/10/crypto/openssh/compat.c stable/10/crypto/openssh/compat.h stable/10/crypto/openssh/ssh_config stable/10/crypto/openssh/ssh_config.5 stable/10/crypto/openssh/sshconnect2.c stable/10/crypto/openssh/sshd.c stable/10/crypto/openssh/sshd_config stable/10/crypto/openssh/sshd_config.5 stable/10/crypto/openssh/version.h Directory Properties: stable/10/ (props changed) Modified: stable/10/crypto/openssh/bufaux.c ============================================================================== --- stable/10/crypto/openssh/bufaux.c Sun Apr 20 11:34:33 2014 (r264691) +++ stable/10/crypto/openssh/bufaux.c Sun Apr 20 12:46:18 2014 (r264692) @@ -1,4 +1,4 @@ -/* $OpenBSD: bufaux.c,v 1.56 2014/02/02 03:44:31 djm Exp $ */ +/* $OpenBSD: bufaux.c,v 1.57 2014/04/16 23:22:45 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -372,6 +372,9 @@ buffer_put_bignum2_from_string(Buffer *b if (l > 8 * 1024) fatal("%s: length %u too long", __func__, l); + /* Skip leading zero bytes */ + for (; l > 0 && *s == 0; l--, s++) + ; p = buf = xmalloc(l + 1); /* * If most significant bit is set then prepend a zero byte to Modified: stable/10/crypto/openssh/compat.c ============================================================================== --- stable/10/crypto/openssh/compat.c Sun Apr 20 11:34:33 2014 (r264691) +++ stable/10/crypto/openssh/compat.c Sun Apr 20 12:46:18 2014 (r264692) @@ -96,6 +96,9 @@ compat_datafellows(const char *version) { "Sun_SSH_1.0*", SSH_BUG_NOREKEY|SSH_BUG_EXTEOF}, { "OpenSSH_4*", 0 }, { "OpenSSH_5*", SSH_NEW_OPENSSH|SSH_BUG_DYNAMIC_RPORT}, + { "OpenSSH_6.6.1*", SSH_NEW_OPENSSH}, + { "OpenSSH_6.5*," + "OpenSSH_6.6*", SSH_NEW_OPENSSH|SSH_BUG_CURVE25519PAD}, { "OpenSSH*", SSH_NEW_OPENSSH }, { "*MindTerm*", 0 }, { "2.1.0*", SSH_BUG_SIGBLOB|SSH_BUG_HMAC| @@ -262,7 +265,6 @@ compat_cipher_proposal(char *cipher_prop return cipher_prop; } - char * compat_pkalg_proposal(char *pkalg_prop) { @@ -276,3 +278,16 @@ compat_pkalg_proposal(char *pkalg_prop) return pkalg_prop; } +char * +compat_kex_proposal(char *kex_prop) +{ + if (!(datafellows & SSH_BUG_CURVE25519PAD)) + return kex_prop; + debug2("%s: original KEX proposal: %s", __func__, kex_prop); + kex_prop = filter_proposal(kex_prop, "curve25519-sha256@libssh.org"); + debug2("%s: compat KEX proposal: %s", __func__, kex_prop); + if (*kex_prop == '\0') + fatal("No supported key exchange algorithms found"); + return kex_prop; +} + Modified: stable/10/crypto/openssh/compat.h ============================================================================== --- stable/10/crypto/openssh/compat.h Sun Apr 20 11:34:33 2014 (r264691) +++ stable/10/crypto/openssh/compat.h Sun Apr 20 12:46:18 2014 (r264692) @@ -60,7 +60,9 @@ #define SSH_BUG_RFWD_ADDR 0x02000000 #define SSH_NEW_OPENSSH 0x04000000 #define SSH_BUG_DYNAMIC_RPORT 0x08000000 -#define SSH_BUG_LARGEWINDOW 0x10000000 +#define SSH_BUG_CURVE25519PAD 0x10000000 + +#define SSH_BUG_LARGEWINDOW 0x80000000 void enable_compat13(void); void enable_compat20(void); @@ -68,6 +70,7 @@ void compat_datafellows(const char * int proto_spec(const char *); char *compat_cipher_proposal(char *); char *compat_pkalg_proposal(char *); +char *compat_kex_proposal(char *); extern int compat13; extern int compat20; Modified: stable/10/crypto/openssh/ssh_config ============================================================================== --- stable/10/crypto/openssh/ssh_config Sun Apr 20 11:34:33 2014 (r264691) +++ stable/10/crypto/openssh/ssh_config Sun Apr 20 12:46:18 2014 (r264692) @@ -48,4 +48,4 @@ # ProxyCommand ssh -q -W %h:%p gateway.example.com # RekeyLimit 1G 1h # VerifyHostKeyDNS yes -# VersionAddendum FreeBSD-20140324 +# VersionAddendum FreeBSD-20140420 Modified: stable/10/crypto/openssh/ssh_config.5 ============================================================================== --- stable/10/crypto/openssh/ssh_config.5 Sun Apr 20 11:34:33 2014 (r264691) +++ stable/10/crypto/openssh/ssh_config.5 Sun Apr 20 12:46:18 2014 (r264692) @@ -1423,7 +1423,7 @@ See also VERIFYING HOST KEYS in Specifies a string to append to the regular version string to identify OS- or site-specific modifications. The default is -.Dq FreeBSD-20140324 . +.Dq FreeBSD-20140420 . .It Cm VisualHostKey If this flag is set to .Dq yes , Modified: stable/10/crypto/openssh/sshconnect2.c ============================================================================== --- stable/10/crypto/openssh/sshconnect2.c Sun Apr 20 11:34:33 2014 (r264691) +++ stable/10/crypto/openssh/sshconnect2.c Sun Apr 20 12:46:18 2014 (r264692) @@ -206,6 +206,8 @@ ssh_kex2(char *host, struct sockaddr *ho } if (options.kex_algorithms != NULL) myproposal[PROPOSAL_KEX_ALGS] = options.kex_algorithms; + myproposal[PROPOSAL_KEX_ALGS] = compat_kex_proposal( + myproposal[PROPOSAL_KEX_ALGS]); if (options.rekey_limit || options.rekey_interval) packet_set_rekey_limits((u_int32_t)options.rekey_limit, Modified: stable/10/crypto/openssh/sshd.c ============================================================================== --- stable/10/crypto/openssh/sshd.c Sun Apr 20 11:34:33 2014 (r264691) +++ stable/10/crypto/openssh/sshd.c Sun Apr 20 12:46:18 2014 (r264692) @@ -2528,6 +2528,9 @@ do_ssh2_kex(void) if (options.kex_algorithms != NULL) myproposal[PROPOSAL_KEX_ALGS] = options.kex_algorithms; + myproposal[PROPOSAL_KEX_ALGS] = compat_kex_proposal( + myproposal[PROPOSAL_KEX_ALGS]); + if (options.rekey_limit || options.rekey_interval) packet_set_rekey_limits((u_int32_t)options.rekey_limit, (time_t)options.rekey_interval); Modified: stable/10/crypto/openssh/sshd_config ============================================================================== --- stable/10/crypto/openssh/sshd_config Sun Apr 20 11:34:33 2014 (r264691) +++ stable/10/crypto/openssh/sshd_config Sun Apr 20 12:46:18 2014 (r264692) @@ -120,7 +120,7 @@ #MaxStartups 10:30:100 #PermitTunnel no #ChrootDirectory none -#VersionAddendum FreeBSD-20140324 +#VersionAddendum FreeBSD-20140420 # no default banner path #Banner none Modified: stable/10/crypto/openssh/sshd_config.5 ============================================================================== --- stable/10/crypto/openssh/sshd_config.5 Sun Apr 20 11:34:33 2014 (r264691) +++ stable/10/crypto/openssh/sshd_config.5 Sun Apr 20 12:46:18 2014 (r264692) @@ -1253,7 +1253,7 @@ restrictions. Optionally specifies additional text to append to the SSH protocol banner sent by the server upon connection. The default is -.Dq FreeBSD-20140324 . +.Dq FreeBSD-20140420 . .It Cm X11DisplayOffset Specifies the first display number available for .Xr sshd 8 Ns 's Modified: stable/10/crypto/openssh/version.h ============================================================================== --- stable/10/crypto/openssh/version.h Sun Apr 20 11:34:33 2014 (r264691) +++ stable/10/crypto/openssh/version.h Sun Apr 20 12:46:18 2014 (r264692) @@ -1,10 +1,10 @@ /* $OpenBSD: version.h,v 1.70 2014/02/27 22:57:40 djm Exp $ */ /* $FreeBSD$ */ -#define SSH_VERSION "OpenSSH_6.6" +#define SSH_VERSION "OpenSSH_6.6.1" #define SSH_PORTABLE "p1" #define SSH_RELEASE SSH_VERSION SSH_PORTABLE -#define SSH_VERSION_FREEBSD "FreeBSD-20140324" +#define SSH_VERSION_FREEBSD "FreeBSD-20140420" #define SSH_VERSION_HPN "_hpn13v11" From owner-svn-src-stable@FreeBSD.ORG Sun Apr 20 13:12:35 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0C0AA521; Sun, 20 Apr 2014 13:12:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DFE091D89; Sun, 20 Apr 2014 13:12:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3KDCYkn039141; Sun, 20 Apr 2014 13:12:34 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3KDCWFl039130; Sun, 20 Apr 2014 13:12:32 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201404201312.s3KDCWFl039130@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 20 Apr 2014 13:12:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264693 - stable/9/crypto/openssh X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Apr 2014 13:12:35 -0000 Author: des Date: Sun Apr 20 13:12:32 2014 New Revision: 264693 URL: http://svnweb.freebsd.org/changeset/base/264693 Log: MFH (r264691): merge upstream patch for EC calculation bug Modified: stable/9/crypto/openssh/bufaux.c stable/9/crypto/openssh/compat.c stable/9/crypto/openssh/compat.h stable/9/crypto/openssh/ssh_config stable/9/crypto/openssh/ssh_config.5 stable/9/crypto/openssh/sshconnect2.c stable/9/crypto/openssh/sshd.c stable/9/crypto/openssh/sshd_config stable/9/crypto/openssh/sshd_config.5 stable/9/crypto/openssh/version.h Directory Properties: stable/9/ (props changed) stable/9/crypto/openssh/ (props changed) Modified: stable/9/crypto/openssh/bufaux.c ============================================================================== --- stable/9/crypto/openssh/bufaux.c Sun Apr 20 12:46:18 2014 (r264692) +++ stable/9/crypto/openssh/bufaux.c Sun Apr 20 13:12:32 2014 (r264693) @@ -1,4 +1,4 @@ -/* $OpenBSD: bufaux.c,v 1.56 2014/02/02 03:44:31 djm Exp $ */ +/* $OpenBSD: bufaux.c,v 1.57 2014/04/16 23:22:45 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -372,6 +372,9 @@ buffer_put_bignum2_from_string(Buffer *b if (l > 8 * 1024) fatal("%s: length %u too long", __func__, l); + /* Skip leading zero bytes */ + for (; l > 0 && *s == 0; l--, s++) + ; p = buf = xmalloc(l + 1); /* * If most significant bit is set then prepend a zero byte to Modified: stable/9/crypto/openssh/compat.c ============================================================================== --- stable/9/crypto/openssh/compat.c Sun Apr 20 12:46:18 2014 (r264692) +++ stable/9/crypto/openssh/compat.c Sun Apr 20 13:12:32 2014 (r264693) @@ -97,6 +97,9 @@ compat_datafellows(const char *version) { "Sun_SSH_1.0*", SSH_BUG_NOREKEY|SSH_BUG_EXTEOF}, { "OpenSSH_4*", 0 }, { "OpenSSH_5*", SSH_NEW_OPENSSH|SSH_BUG_DYNAMIC_RPORT}, + { "OpenSSH_6.6.1*", SSH_NEW_OPENSSH}, + { "OpenSSH_6.5*," + "OpenSSH_6.6*", SSH_NEW_OPENSSH|SSH_BUG_CURVE25519PAD}, { "OpenSSH*", SSH_NEW_OPENSSH }, { "*MindTerm*", 0 }, { "2.1.0*", SSH_BUG_SIGBLOB|SSH_BUG_HMAC| @@ -263,7 +266,6 @@ compat_cipher_proposal(char *cipher_prop return cipher_prop; } - char * compat_pkalg_proposal(char *pkalg_prop) { @@ -277,3 +279,16 @@ compat_pkalg_proposal(char *pkalg_prop) return pkalg_prop; } +char * +compat_kex_proposal(char *kex_prop) +{ + if (!(datafellows & SSH_BUG_CURVE25519PAD)) + return kex_prop; + debug2("%s: original KEX proposal: %s", __func__, kex_prop); + kex_prop = filter_proposal(kex_prop, "curve25519-sha256@libssh.org"); + debug2("%s: compat KEX proposal: %s", __func__, kex_prop); + if (*kex_prop == '\0') + fatal("No supported key exchange algorithms found"); + return kex_prop; +} + Modified: stable/9/crypto/openssh/compat.h ============================================================================== --- stable/9/crypto/openssh/compat.h Sun Apr 20 12:46:18 2014 (r264692) +++ stable/9/crypto/openssh/compat.h Sun Apr 20 13:12:32 2014 (r264693) @@ -60,7 +60,9 @@ #define SSH_BUG_RFWD_ADDR 0x02000000 #define SSH_NEW_OPENSSH 0x04000000 #define SSH_BUG_DYNAMIC_RPORT 0x08000000 -#define SSH_BUG_LARGEWINDOW 0x10000000 +#define SSH_BUG_CURVE25519PAD 0x10000000 + +#define SSH_BUG_LARGEWINDOW 0x80000000 void enable_compat13(void); void enable_compat20(void); @@ -68,6 +70,7 @@ void compat_datafellows(const char * int proto_spec(const char *); char *compat_cipher_proposal(char *); char *compat_pkalg_proposal(char *); +char *compat_kex_proposal(char *); extern int compat13; extern int compat20; Modified: stable/9/crypto/openssh/ssh_config ============================================================================== --- stable/9/crypto/openssh/ssh_config Sun Apr 20 12:46:18 2014 (r264692) +++ stable/9/crypto/openssh/ssh_config Sun Apr 20 13:12:32 2014 (r264693) @@ -47,4 +47,4 @@ # VisualHostKey no # ProxyCommand ssh -q -W %h:%p gateway.example.com # RekeyLimit 1G 1h -# VersionAddendum FreeBSD-20140324 +# VersionAddendum FreeBSD-20140420 Modified: stable/9/crypto/openssh/ssh_config.5 ============================================================================== --- stable/9/crypto/openssh/ssh_config.5 Sun Apr 20 12:46:18 2014 (r264692) +++ stable/9/crypto/openssh/ssh_config.5 Sun Apr 20 13:12:32 2014 (r264693) @@ -1420,7 +1420,7 @@ See also VERIFYING HOST KEYS in Specifies a string to append to the regular version string to identify OS- or site-specific modifications. The default is -.Dq FreeBSD-20140324 . +.Dq FreeBSD-20140420 . .It Cm VisualHostKey If this flag is set to .Dq yes , Modified: stable/9/crypto/openssh/sshconnect2.c ============================================================================== --- stable/9/crypto/openssh/sshconnect2.c Sun Apr 20 12:46:18 2014 (r264692) +++ stable/9/crypto/openssh/sshconnect2.c Sun Apr 20 13:12:32 2014 (r264693) @@ -207,6 +207,8 @@ ssh_kex2(char *host, struct sockaddr *ho } if (options.kex_algorithms != NULL) myproposal[PROPOSAL_KEX_ALGS] = options.kex_algorithms; + myproposal[PROPOSAL_KEX_ALGS] = compat_kex_proposal( + myproposal[PROPOSAL_KEX_ALGS]); if (options.rekey_limit || options.rekey_interval) packet_set_rekey_limits((u_int32_t)options.rekey_limit, Modified: stable/9/crypto/openssh/sshd.c ============================================================================== --- stable/9/crypto/openssh/sshd.c Sun Apr 20 12:46:18 2014 (r264692) +++ stable/9/crypto/openssh/sshd.c Sun Apr 20 13:12:32 2014 (r264693) @@ -2528,6 +2528,9 @@ do_ssh2_kex(void) if (options.kex_algorithms != NULL) myproposal[PROPOSAL_KEX_ALGS] = options.kex_algorithms; + myproposal[PROPOSAL_KEX_ALGS] = compat_kex_proposal( + myproposal[PROPOSAL_KEX_ALGS]); + if (options.rekey_limit || options.rekey_interval) packet_set_rekey_limits((u_int32_t)options.rekey_limit, (time_t)options.rekey_interval); Modified: stable/9/crypto/openssh/sshd_config ============================================================================== --- stable/9/crypto/openssh/sshd_config Sun Apr 20 12:46:18 2014 (r264692) +++ stable/9/crypto/openssh/sshd_config Sun Apr 20 13:12:32 2014 (r264693) @@ -120,7 +120,7 @@ #MaxStartups 10:30:100 #PermitTunnel no #ChrootDirectory none -#VersionAddendum FreeBSD-20140324 +#VersionAddendum FreeBSD-20140420 # no default banner path #Banner none Modified: stable/9/crypto/openssh/sshd_config.5 ============================================================================== --- stable/9/crypto/openssh/sshd_config.5 Sun Apr 20 12:46:18 2014 (r264692) +++ stable/9/crypto/openssh/sshd_config.5 Sun Apr 20 13:12:32 2014 (r264693) @@ -1253,7 +1253,7 @@ restrictions. Optionally specifies additional text to append to the SSH protocol banner sent by the server upon connection. The default is -.Dq FreeBSD-20140324 . +.Dq FreeBSD-20140420 . .It Cm X11DisplayOffset Specifies the first display number available for .Xr sshd 8 Ns 's Modified: stable/9/crypto/openssh/version.h ============================================================================== --- stable/9/crypto/openssh/version.h Sun Apr 20 12:46:18 2014 (r264692) +++ stable/9/crypto/openssh/version.h Sun Apr 20 13:12:32 2014 (r264693) @@ -1,10 +1,10 @@ /* $OpenBSD: version.h,v 1.70 2014/02/27 22:57:40 djm Exp $ */ /* $FreeBSD$ */ -#define SSH_VERSION "OpenSSH_6.6" +#define SSH_VERSION "OpenSSH_6.6.1" #define SSH_PORTABLE "p1" #define SSH_RELEASE SSH_VERSION SSH_PORTABLE -#define SSH_VERSION_FREEBSD "FreeBSD-20140324" +#define SSH_VERSION_FREEBSD "FreeBSD-20140420" #define SSH_VERSION_HPN "_hpn13v11" From owner-svn-src-stable@FreeBSD.ORG Sun Apr 20 16:41:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0A428EA; Sun, 20 Apr 2014 16:41:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9022C1DFD; Sun, 20 Apr 2014 16:41:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3KGfWYh032230; Sun, 20 Apr 2014 16:41:32 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3KGfVm7032220; Sun, 20 Apr 2014 16:41:31 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201404201641.s3KGfVm7032220@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 20 Apr 2014 16:41:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264699 - stable/9/usr.bin/find X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Apr 2014 16:41:32 -0000 Author: jilles Date: Sun Apr 20 16:41:30 2014 New Revision: 264699 URL: http://svnweb.freebsd.org/changeset/base/264699 Log: MFC r238780,r238948: find: Implement real -ignore_readdir_race. If -ignore_readdir_race is present, [ENOENT] errors caused by deleting a file after find has read its name from a directory are ignored. Formerly, -ignore_readdir_race did nothing. PR: bin/169723 Submitted by: Valery Khromov and Andrey Ignatov (original version) Relnotes: yes Modified: stable/9/usr.bin/find/extern.h stable/9/usr.bin/find/find.1 stable/9/usr.bin/find/find.c stable/9/usr.bin/find/function.c stable/9/usr.bin/find/main.c stable/9/usr.bin/find/option.c Directory Properties: stable/9/usr.bin/find/ (props changed) Modified: stable/9/usr.bin/find/extern.h ============================================================================== --- stable/9/usr.bin/find/extern.h Sun Apr 20 16:34:10 2014 (r264698) +++ stable/9/usr.bin/find/extern.h Sun Apr 20 16:41:30 2014 (r264699) @@ -58,6 +58,7 @@ creat_f c_flags; creat_f c_follow; creat_f c_fstype; creat_f c_group; +creat_f c_ignore_readdir_race; creat_f c_inum; creat_f c_links; creat_f c_ls; @@ -111,7 +112,8 @@ exec_f f_size; exec_f f_type; exec_f f_user; -extern int ftsoptions, isdeprecated, isdepth, isoutput, issort, isxargs; +extern int ftsoptions, ignore_readdir_race, isdeprecated, isdepth, isoutput; +extern int issort, isxargs; extern int mindepth, maxdepth; extern int regexp_flags; extern time_t now; Modified: stable/9/usr.bin/find/find.1 ============================================================================== --- stable/9/usr.bin/find/find.1 Sun Apr 20 16:34:10 2014 (r264698) +++ stable/9/usr.bin/find/find.1 Sun Apr 20 16:41:30 2014 (r264699) @@ -468,7 +468,9 @@ is numeric and there is no such group na .Ar gname is treated as a group ID. .It Ic -ignore_readdir_race -This option is for GNU find compatibility and is ignored. +Ignore errors because a file or a directory is deleted +after reading the name from a directory. +This option does not affect errors occurring on starting points. .It Ic -ilname Ar pattern Like .Ic -lname , @@ -618,7 +620,9 @@ is equivalent to .It Ic -nogroup True if the file belongs to an unknown group. .It Ic -noignore_readdir_race -This option is for GNU find compatibility and is ignored. +Turn off the effect of +.Ic -ignore_readdir_race . +This is default behaviour. .It Ic -noleaf This option is for GNU find compatibility. In GNU find it disables an optimization not relevant to Modified: stable/9/usr.bin/find/find.c ============================================================================== --- stable/9/usr.bin/find/find.c Sun Apr 20 16:34:10 2014 (r264698) +++ stable/9/usr.bin/find/find.c Sun Apr 20 16:41:30 2014 (r264699) @@ -197,8 +197,12 @@ find_execute(PLAN *plan, char *paths[]) continue; break; case FTS_DNR: - case FTS_ERR: case FTS_NS: + if (ignore_readdir_race && + entry->fts_errno == ENOENT && entry->fts_level > 0) + continue; + /* FALLTHROUGH */ + case FTS_ERR: (void)fflush(stdout); warnx("%s: %s", entry->fts_path, strerror(entry->fts_errno)); @@ -228,7 +232,7 @@ find_execute(PLAN *plan, char *paths[]) for (p = plan; p && (p->execute)(p, entry); p = p->next); } finish_execplus(); - if (errno) + if (errno && (!ignore_readdir_race || errno != ENOENT)) err(1, "fts_read"); return (rval); } Modified: stable/9/usr.bin/find/function.c ============================================================================== --- stable/9/usr.bin/find/function.c Sun Apr 20 16:34:10 2014 (r264698) +++ stable/9/usr.bin/find/function.c Sun Apr 20 16:41:30 2014 (r264699) @@ -977,6 +977,25 @@ c_group(OPTION *option, char ***argvp) } /* + * -ignore_readdir_race functions -- + * + * Always true. Ignore errors which occur if a file or a directory + * in a starting point gets deleted between reading the name and calling + * stat on it while find is traversing the starting point. + */ + +PLAN * +c_ignore_readdir_race(OPTION *option, char ***argvp __unused) +{ + if (strcmp(option->name, "-ignore_readdir_race") == 0) + ignore_readdir_race = 1; + else + ignore_readdir_race = 0; + + return palloc(option); +} + +/* * -inum n functions -- * * True if the file has inode # n. Modified: stable/9/usr.bin/find/main.c ============================================================================== --- stable/9/usr.bin/find/main.c Sun Apr 20 16:34:10 2014 (r264698) +++ stable/9/usr.bin/find/main.c Sun Apr 20 16:41:30 2014 (r264699) @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); time_t now; /* time find was run */ int dotfd; /* starting directory */ int ftsoptions; /* options for the ftsopen(3) call */ +int ignore_readdir_race; /* ignore readdir race */ int isdeprecated; /* using deprecated syntax */ int isdepth; /* do directories on post-order visit */ int isoutput; /* user specified output operator */ Modified: stable/9/usr.bin/find/option.c ============================================================================== --- stable/9/usr.bin/find/option.c Sun Apr 20 16:34:10 2014 (r264698) +++ stable/9/usr.bin/find/option.c Sun Apr 20 16:41:30 2014 (r264699) @@ -88,7 +88,7 @@ static OPTION const options[] = { { "-fstype", c_fstype, f_fstype, 0 }, { "-gid", c_group, f_group, 0 }, { "-group", c_group, f_group, 0 }, - { "-ignore_readdir_race",c_simple, f_always_true,0 }, + { "-ignore_readdir_race",c_ignore_readdir_race, f_always_true,0 }, { "-ilname", c_name, f_name, F_LINK | F_IGNCASE }, { "-iname", c_name, f_name, F_IGNCASE }, { "-inum", c_inum, f_inum, 0 }, @@ -127,7 +127,7 @@ static OPTION const options[] = { { "-newermm", c_newer, f_newer, 0 }, { "-newermt", c_newer, f_newer, F_TIME2_T }, { "-nogroup", c_nogroup, f_nogroup, 0 }, - { "-noignore_readdir_race",c_simple, f_always_true,0 }, + { "-noignore_readdir_race",c_ignore_readdir_race, f_always_true,0 }, { "-noleaf", c_simple, f_always_true, 0 }, { "-not", c_simple, f_not, 0 }, { "-nouser", c_nouser, f_nouser, 0 }, From owner-svn-src-stable@FreeBSD.ORG Sun Apr 20 22:57:16 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F5F53EE; Sun, 20 Apr 2014 22:57:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B96C1CB6; Sun, 20 Apr 2014 22:57:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3KMvGhW086127; Sun, 20 Apr 2014 22:57:16 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3KMvG1l086126; Sun, 20 Apr 2014 22:57:16 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404202257.s3KMvG1l086126@svn.freebsd.org> From: Glen Barber Date: Sun, 20 Apr 2014 22:57:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264706 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Apr 2014 22:57:16 -0000 Author: gjb Date: Sun Apr 20 22:57:15 2014 New Revision: 264706 URL: http://svnweb.freebsd.org/changeset/base/264706 Log: MFC r260689 (partial): Remove 'of course' statement from upgrading note. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Apr 20 22:19:00 2014 (r264705) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Apr 20 22:57:15 2014 (r264706) @@ -260,7 +260,7 @@ /usr/src/UPDATING. - Upgrading &os; should, of course, only be attempted after + Upgrading &os; should only be attempted after backing up all data and configuration files. From owner-svn-src-stable@FreeBSD.ORG Sun Apr 20 23:01:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C7FA160D; Sun, 20 Apr 2014 23:01:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B4D541D3C; Sun, 20 Apr 2014 23:01:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3KN1ujX089701; Sun, 20 Apr 2014 23:01:56 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3KN1uPK089700; Sun, 20 Apr 2014 23:01:56 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404202301.s3KN1uPK089700@svn.freebsd.org> From: Glen Barber Date: Sun, 20 Apr 2014 23:01:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264707 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Apr 2014 23:01:56 -0000 Author: gjb Date: Sun Apr 20 23:01:56 2014 New Revision: 264707 URL: http://svnweb.freebsd.org/changeset/base/264707 Log: Remove 'of course' from upgrading comment. This is a direct commit to stable/9, since these documents have changed drastically, and merge conflicts are too irrelevant to deal with for a 14-character removal. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Apr 20 22:57:15 2014 (r264706) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Apr 20 23:01:56 2014 (r264707) @@ -659,7 +659,7 @@ ?> - Upgrading &os; should, of course, only be attempted + Upgrading &os; should only be attempted after backing up all data and configuration files. From owner-svn-src-stable@FreeBSD.ORG Mon Apr 21 02:48:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0307F16D; Mon, 21 Apr 2014 02:48:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E2A2710D6; Mon, 21 Apr 2014 02:48:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3L2m4Cj080849; Mon, 21 Apr 2014 02:48:04 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3L2m4Ze080848; Mon, 21 Apr 2014 02:48:04 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201404210248.s3L2m4Ze080848@svn.freebsd.org> From: Bryan Drewery Date: Mon, 21 Apr 2014 02:48:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264712 - stable/10/sys/geom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2014 02:48:05 -0000 Author: bdrewery Date: Mon Apr 21 02:48:04 2014 New Revision: 264712 URL: http://svnweb.freebsd.org/changeset/base/264712 Log: MFC r264320: Fix spelling error in g_trace() call. Modified: stable/10/sys/geom/geom_disk.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/geom_disk.c ============================================================================== --- stable/10/sys/geom/geom_disk.c Mon Apr 21 02:09:14 2014 (r264711) +++ stable/10/sys/geom/geom_disk.c Mon Apr 21 02:48:04 2014 (r264712) @@ -184,7 +184,7 @@ g_disk_kerneldump(struct bio *bp, struct gkd = (struct g_kerneldump*)bp->bio_data; gp = bp->bio_to->geom; - g_trace(G_T_TOPOLOGY, "g_disk_kernedump(%s, %jd, %jd)", + g_trace(G_T_TOPOLOGY, "g_disk_kerneldump(%s, %jd, %jd)", gp->name, (intmax_t)gkd->offset, (intmax_t)gkd->length); if (dp->d_dump == NULL) { g_io_deliver(bp, ENODEV); From owner-svn-src-stable@FreeBSD.ORG Mon Apr 21 02:49:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 404702A1; Mon, 21 Apr 2014 02:49:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2BFCD10DE; Mon, 21 Apr 2014 02:49:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3L2ngxp081036; Mon, 21 Apr 2014 02:49:42 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3L2ngHw081035; Mon, 21 Apr 2014 02:49:42 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201404210249.s3L2ngHw081035@svn.freebsd.org> From: Bryan Drewery Date: Mon, 21 Apr 2014 02:49:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264713 - stable/10/sys/geom/mirror X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2014 02:49:42 -0000 Author: bdrewery Date: Mon Apr 21 02:49:41 2014 New Revision: 264713 URL: http://svnweb.freebsd.org/changeset/base/264713 Log: MFC r264142: Show error code when failing to destroy a mirror on delay Modified: stable/10/sys/geom/mirror/g_mirror.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/mirror/g_mirror.c ============================================================================== --- stable/10/sys/geom/mirror/g_mirror.c Mon Apr 21 02:48:04 2014 (r264712) +++ stable/10/sys/geom/mirror/g_mirror.c Mon Apr 21 02:49:41 2014 (r264713) @@ -2824,7 +2824,8 @@ g_mirror_destroy_delayed(void *arg, int G_MIRROR_DEBUG(1, "Destroying %s (delayed).", sc->sc_name); error = g_mirror_destroy(sc, G_MIRROR_DESTROY_SOFT); if (error != 0) { - G_MIRROR_DEBUG(0, "Cannot destroy %s.", sc->sc_name); + G_MIRROR_DEBUG(0, "Cannot destroy %s (error=%d).", + sc->sc_name, error); sx_xunlock(&sc->sc_lock); } g_topology_lock(); From owner-svn-src-stable@FreeBSD.ORG Mon Apr 21 02:50:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E61213D0; Mon, 21 Apr 2014 02:50:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D230B10E7; Mon, 21 Apr 2014 02:50:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3L2ogmd082056; Mon, 21 Apr 2014 02:50:42 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3L2ogDs082055; Mon, 21 Apr 2014 02:50:42 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201404210250.s3L2ogDs082055@svn.freebsd.org> From: Bryan Drewery Date: Mon, 21 Apr 2014 02:50:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264714 - stable/9/sys/geom X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2014 02:50:43 -0000 Author: bdrewery Date: Mon Apr 21 02:50:42 2014 New Revision: 264714 URL: http://svnweb.freebsd.org/changeset/base/264714 Log: MFC r264320: Fix spelling error in g_trace() call. Modified: stable/9/sys/geom/geom_disk.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/geom_disk.c ============================================================================== --- stable/9/sys/geom/geom_disk.c Mon Apr 21 02:49:41 2014 (r264713) +++ stable/9/sys/geom/geom_disk.c Mon Apr 21 02:50:42 2014 (r264714) @@ -187,7 +187,7 @@ g_disk_kerneldump(struct bio *bp, struct gkd = (struct g_kerneldump*)bp->bio_data; gp = bp->bio_to->geom; - g_trace(G_T_TOPOLOGY, "g_disk_kernedump(%s, %jd, %jd)", + g_trace(G_T_TOPOLOGY, "g_disk_kerneldump(%s, %jd, %jd)", gp->name, (intmax_t)gkd->offset, (intmax_t)gkd->length); if (dp->d_dump == NULL) { g_io_deliver(bp, ENODEV); From owner-svn-src-stable@FreeBSD.ORG Mon Apr 21 02:52:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 68F9552C; Mon, 21 Apr 2014 02:52:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54BCE1179; Mon, 21 Apr 2014 02:52:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3L2q9Fq084323; Mon, 21 Apr 2014 02:52:09 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3L2q9c1084322; Mon, 21 Apr 2014 02:52:09 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201404210252.s3L2q9c1084322@svn.freebsd.org> From: Bryan Drewery Date: Mon, 21 Apr 2014 02:52:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264715 - stable/9/sys/geom/mirror X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2014 02:52:09 -0000 Author: bdrewery Date: Mon Apr 21 02:52:08 2014 New Revision: 264715 URL: http://svnweb.freebsd.org/changeset/base/264715 Log: MFC r264142: Show error code when failing to destroy a mirror on delay Modified: stable/9/sys/geom/mirror/g_mirror.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/mirror/g_mirror.c ============================================================================== --- stable/9/sys/geom/mirror/g_mirror.c Mon Apr 21 02:50:42 2014 (r264714) +++ stable/9/sys/geom/mirror/g_mirror.c Mon Apr 21 02:52:08 2014 (r264715) @@ -2802,7 +2802,8 @@ g_mirror_destroy_delayed(void *arg, int G_MIRROR_DEBUG(1, "Destroying %s (delayed).", sc->sc_name); error = g_mirror_destroy(sc, G_MIRROR_DESTROY_SOFT); if (error != 0) { - G_MIRROR_DEBUG(0, "Cannot destroy %s.", sc->sc_name); + G_MIRROR_DEBUG(0, "Cannot destroy %s (error=%d).", + sc->sc_name, error); sx_xunlock(&sc->sc_lock); } g_topology_lock(); From owner-svn-src-stable@FreeBSD.ORG Mon Apr 21 02:53:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 896D5668; Mon, 21 Apr 2014 02:53:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74C171183; Mon, 21 Apr 2014 02:53:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3L2rhuf084516; Mon, 21 Apr 2014 02:53:43 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3L2rhgf084515; Mon, 21 Apr 2014 02:53:43 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201404210253.s3L2rhgf084515@svn.freebsd.org> From: Bryan Drewery Date: Mon, 21 Apr 2014 02:53:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r264716 - stable/8/sys/geom X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2014 02:53:43 -0000 Author: bdrewery Date: Mon Apr 21 02:53:42 2014 New Revision: 264716 URL: http://svnweb.freebsd.org/changeset/base/264716 Log: MFC r264320: Fix spelling error in g_trace() call. Modified: stable/8/sys/geom/geom_disk.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/geom/ (props changed) Modified: stable/8/sys/geom/geom_disk.c ============================================================================== --- stable/8/sys/geom/geom_disk.c Mon Apr 21 02:52:08 2014 (r264715) +++ stable/8/sys/geom/geom_disk.c Mon Apr 21 02:53:42 2014 (r264716) @@ -193,7 +193,7 @@ g_disk_kerneldump(struct bio *bp, struct gkd = (struct g_kerneldump*)bp->bio_data; gp = bp->bio_to->geom; - g_trace(G_T_TOPOLOGY, "g_disk_kernedump(%s, %jd, %jd)", + g_trace(G_T_TOPOLOGY, "g_disk_kerneldump(%s, %jd, %jd)", gp->name, (intmax_t)gkd->offset, (intmax_t)gkd->length); if (dp->d_dump == NULL) { g_io_deliver(bp, ENODEV); From owner-svn-src-stable@FreeBSD.ORG Mon Apr 21 02:54:16 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 36246795; Mon, 21 Apr 2014 02:54:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 21DDF1186; Mon, 21 Apr 2014 02:54:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3L2sG01084625; Mon, 21 Apr 2014 02:54:16 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3L2sFaw084624; Mon, 21 Apr 2014 02:54:15 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201404210254.s3L2sFaw084624@svn.freebsd.org> From: Bryan Drewery Date: Mon, 21 Apr 2014 02:54:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r264717 - stable/8/sys/geom/mirror X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2014 02:54:16 -0000 Author: bdrewery Date: Mon Apr 21 02:54:15 2014 New Revision: 264717 URL: http://svnweb.freebsd.org/changeset/base/264717 Log: MFC r264142: Show error code when failing to destroy a mirror on delay Modified: stable/8/sys/geom/mirror/g_mirror.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/geom/ (props changed) Modified: stable/8/sys/geom/mirror/g_mirror.c ============================================================================== --- stable/8/sys/geom/mirror/g_mirror.c Mon Apr 21 02:53:42 2014 (r264716) +++ stable/8/sys/geom/mirror/g_mirror.c Mon Apr 21 02:54:15 2014 (r264717) @@ -2775,7 +2775,8 @@ g_mirror_destroy_delayed(void *arg, int G_MIRROR_DEBUG(1, "Destroying %s (delayed).", sc->sc_name); error = g_mirror_destroy(sc, G_MIRROR_DESTROY_SOFT); if (error != 0) { - G_MIRROR_DEBUG(0, "Cannot destroy %s.", sc->sc_name); + G_MIRROR_DEBUG(0, "Cannot destroy %s (error=%d).", + sc->sc_name, error); sx_xunlock(&sc->sc_lock); } g_topology_lock(); From owner-svn-src-stable@FreeBSD.ORG Mon Apr 21 02:55:28 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 376EA8C1; Mon, 21 Apr 2014 02:55:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 09516118B; Mon, 21 Apr 2014 02:55:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3L2tR2x084853; Mon, 21 Apr 2014 02:55:27 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3L2tR0j084852; Mon, 21 Apr 2014 02:55:27 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201404210255.s3L2tR0j084852@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 21 Apr 2014 02:55:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264718 - stable/10/libexec/rtld-elf/amd64 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2014 02:55:28 -0000 Author: kib Date: Mon Apr 21 02:55:27 2014 New Revision: 264718 URL: http://svnweb.freebsd.org/changeset/base/264718 Log: MFC r264481: Add dwarf annotations to the amd64 _rtld_bind_start to allow debuggers to unwind around the calls from PLT to binder. Modified: stable/10/libexec/rtld-elf/amd64/rtld_start.S Directory Properties: stable/10/ (props changed) Modified: stable/10/libexec/rtld-elf/amd64/rtld_start.S ============================================================================== --- stable/10/libexec/rtld-elf/amd64/rtld_start.S Mon Apr 21 02:54:15 2014 (r264717) +++ stable/10/libexec/rtld-elf/amd64/rtld_start.S Mon Apr 21 02:55:27 2014 (r264718) @@ -79,17 +79,39 @@ .globl _rtld_bind_start .type _rtld_bind_start,@function _rtld_bind_start: + .cfi_startproc + .cfi_adjust_cfa_offset 16 subq $8,%rsp + .cfi_adjust_cfa_offset 8 pushfq # Save rflags + .cfi_adjust_cfa_offset 8 pushq %rax # Save %rax + .cfi_adjust_cfa_offset 8 + .cfi_offset %rax,-32 pushq %rdx # Save %rdx + .cfi_adjust_cfa_offset 8 + .cfi_offset %rdx,-40 pushq %rcx # Save %rcx + .cfi_adjust_cfa_offset 8 + .cfi_offset %rcx,-48 pushq %rsi # Save %rsi + .cfi_adjust_cfa_offset 8 + .cfi_offset %rsi,-56 pushq %rdi # Save %rdi + .cfi_adjust_cfa_offset 8 + .cfi_offset %rdi,-64 pushq %r8 # Save %r8 + .cfi_adjust_cfa_offset 8 + .cfi_offset %r8,-72 pushq %r9 # Save %r9 + .cfi_adjust_cfa_offset 8 + .cfi_offset %r9,-80 pushq %r10 # Save %r10 + .cfi_adjust_cfa_offset 8 + .cfi_offset %r10,-88 pushq %r11 # Save %r11 + .cfi_adjust_cfa_offset 8 + .cfi_offset %r11,-96 movq 0x58(%rsp),%rdi # Fetch obj argument movq 0x60(%rsp),%rsi # Fetch reloff argument @@ -101,16 +123,37 @@ _rtld_bind_start: movq %rax,0x60(%rsp) # Store target over reloff argument popq %r11 # Restore %r11 + .cfi_adjust_cfa_offset -8 + .cfi_restore %r11 popq %r10 # Restore %r10 + .cfi_adjust_cfa_offset -8 + .cfi_restore %r10 popq %r9 # Restore %r9 + .cfi_adjust_cfa_offset -8 + .cfi_restore %r9 popq %r8 # Restore %r8 + .cfi_adjust_cfa_offset -8 + .cfi_restore %r8 popq %rdi # Restore %rdi + .cfi_adjust_cfa_offset -8 + .cfi_restore %rdi popq %rsi # Restore %rsi + .cfi_adjust_cfa_offset -8 + .cfi_restore %rsi popq %rcx # Restore %rcx + .cfi_adjust_cfa_offset -8 + .cfi_restore %rcx popq %rdx # Restore %rdx + .cfi_adjust_cfa_offset -8 + .cfi_restore %rdx popq %rax # Restore %rax + .cfi_adjust_cfa_offset -8 + .cfi_restore %rax popfq # Restore rflags + .cfi_adjust_cfa_offset -8 leaq 16(%rsp),%rsp # Discard spare, obj, do not change rflags ret # "Return" to target address + .cfi_endproc + .size _rtld_bind_start, . - _rtld_bind_start .section .note.GNU-stack,"",%progbits From owner-svn-src-stable@FreeBSD.ORG Mon Apr 21 02:55:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 405109E9; Mon, 21 Apr 2014 02:55:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 13773118E; Mon, 21 Apr 2014 02:55:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3L2tkE7084917; Mon, 21 Apr 2014 02:55:46 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3L2tk6B084916; Mon, 21 Apr 2014 02:55:46 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201404210255.s3L2tk6B084916@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 21 Apr 2014 02:55:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264719 - stable/9/libexec/rtld-elf/amd64 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2014 02:55:47 -0000 Author: kib Date: Mon Apr 21 02:55:46 2014 New Revision: 264719 URL: http://svnweb.freebsd.org/changeset/base/264719 Log: MFC r264481: Add dwarf annotations to the amd64 _rtld_bind_start to allow debuggers to unwind around the calls from PLT to binder. Modified: stable/9/libexec/rtld-elf/amd64/rtld_start.S Directory Properties: stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/amd64/rtld_start.S ============================================================================== --- stable/9/libexec/rtld-elf/amd64/rtld_start.S Mon Apr 21 02:55:27 2014 (r264718) +++ stable/9/libexec/rtld-elf/amd64/rtld_start.S Mon Apr 21 02:55:46 2014 (r264719) @@ -79,17 +79,39 @@ .globl _rtld_bind_start .type _rtld_bind_start,@function _rtld_bind_start: + .cfi_startproc + .cfi_adjust_cfa_offset 16 subq $8,%rsp + .cfi_adjust_cfa_offset 8 pushfq # Save rflags + .cfi_adjust_cfa_offset 8 pushq %rax # Save %rax + .cfi_adjust_cfa_offset 8 + .cfi_offset %rax,-32 pushq %rdx # Save %rdx + .cfi_adjust_cfa_offset 8 + .cfi_offset %rdx,-40 pushq %rcx # Save %rcx + .cfi_adjust_cfa_offset 8 + .cfi_offset %rcx,-48 pushq %rsi # Save %rsi + .cfi_adjust_cfa_offset 8 + .cfi_offset %rsi,-56 pushq %rdi # Save %rdi + .cfi_adjust_cfa_offset 8 + .cfi_offset %rdi,-64 pushq %r8 # Save %r8 + .cfi_adjust_cfa_offset 8 + .cfi_offset %r8,-72 pushq %r9 # Save %r9 + .cfi_adjust_cfa_offset 8 + .cfi_offset %r9,-80 pushq %r10 # Save %r10 + .cfi_adjust_cfa_offset 8 + .cfi_offset %r10,-88 pushq %r11 # Save %r11 + .cfi_adjust_cfa_offset 8 + .cfi_offset %r11,-96 movq 0x58(%rsp),%rdi # Fetch obj argument movq 0x60(%rsp),%rsi # Fetch reloff argument @@ -101,16 +123,37 @@ _rtld_bind_start: movq %rax,0x60(%rsp) # Store target over reloff argument popq %r11 # Restore %r11 + .cfi_adjust_cfa_offset -8 + .cfi_restore %r11 popq %r10 # Restore %r10 + .cfi_adjust_cfa_offset -8 + .cfi_restore %r10 popq %r9 # Restore %r9 + .cfi_adjust_cfa_offset -8 + .cfi_restore %r9 popq %r8 # Restore %r8 + .cfi_adjust_cfa_offset -8 + .cfi_restore %r8 popq %rdi # Restore %rdi + .cfi_adjust_cfa_offset -8 + .cfi_restore %rdi popq %rsi # Restore %rsi + .cfi_adjust_cfa_offset -8 + .cfi_restore %rsi popq %rcx # Restore %rcx + .cfi_adjust_cfa_offset -8 + .cfi_restore %rcx popq %rdx # Restore %rdx + .cfi_adjust_cfa_offset -8 + .cfi_restore %rdx popq %rax # Restore %rax + .cfi_adjust_cfa_offset -8 + .cfi_restore %rax popfq # Restore rflags + .cfi_adjust_cfa_offset -8 leaq 16(%rsp),%rsp # Discard spare, obj, do not change rflags ret # "Return" to target address + .cfi_endproc + .size _rtld_bind_start, . - _rtld_bind_start .section .note.GNU-stack,"",%progbits From owner-svn-src-stable@FreeBSD.ORG Mon Apr 21 11:17:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 801DEA08; Mon, 21 Apr 2014 11:17:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6BD521B99; Mon, 21 Apr 2014 11:17:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3LBHUH1088446; Mon, 21 Apr 2014 11:17:30 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3LBHUDL088445; Mon, 21 Apr 2014 11:17:30 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201404211117.s3LBHUDL088445@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 21 Apr 2014 11:17:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264722 - stable/10/sys/netinet6 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2014 11:17:30 -0000 Author: ae Date: Mon Apr 21 11:17:29 2014 New Revision: 264722 URL: http://svnweb.freebsd.org/changeset/base/264722 Log: MFC r264364: Properly release the in6_multi lock. Sponsored by: Yandex LLC Modified: stable/10/sys/netinet6/in6_mcast.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/in6_mcast.c ============================================================================== --- stable/10/sys/netinet6/in6_mcast.c Mon Apr 21 09:43:22 2014 (r264721) +++ stable/10/sys/netinet6/in6_mcast.c Mon Apr 21 11:17:29 2014 (r264722) @@ -1449,16 +1449,15 @@ in6p_block_unblock_source(struct inpcb * CTR1(KTR_MLD, "%s: merge inm state", __func__); error = in6m_merge(inm, imf); - if (error) { + if (error) CTR1(KTR_MLD, "%s: failed to merge inm state", __func__); - goto out_im6f_rollback; + else { + CTR1(KTR_MLD, "%s: doing mld downcall", __func__); + error = mld_change_state(inm, 0); + if (error) + CTR1(KTR_MLD, "%s: failed mld downcall", __func__); } - CTR1(KTR_MLD, "%s: doing mld downcall", __func__); - error = mld_change_state(inm, 0); - if (error) - CTR1(KTR_MLD, "%s: failed mld downcall", __func__); - IN6_MULTI_UNLOCK(); out_im6f_rollback: @@ -2046,29 +2045,27 @@ in6p_join_group(struct inpcb *inp, struc if (is_new) { error = in6_mc_join_locked(ifp, &gsa->sin6.sin6_addr, imf, &inm, 0); - if (error) + if (error) { + IN6_MULTI_UNLOCK(); goto out_im6o_free; + } imo->im6o_membership[idx] = inm; } else { CTR1(KTR_MLD, "%s: merge inm state", __func__); error = in6m_merge(inm, imf); - if (error) { + if (error) CTR1(KTR_MLD, "%s: failed to merge inm state", __func__); - goto out_im6f_rollback; - } - CTR1(KTR_MLD, "%s: doing mld downcall", __func__); - error = mld_change_state(inm, 0); - if (error) { - CTR1(KTR_MLD, "%s: failed mld downcall", - __func__); - goto out_im6f_rollback; + else { + CTR1(KTR_MLD, "%s: doing mld downcall", __func__); + error = mld_change_state(inm, 0); + if (error) + CTR1(KTR_MLD, "%s: failed mld downcall", + __func__); } } IN6_MULTI_UNLOCK(); - -out_im6f_rollback: INP_WLOCK_ASSERT(inp); if (error) { im6f_rollback(imf); @@ -2295,23 +2292,20 @@ in6p_leave_group(struct inpcb *inp, stru } else { CTR1(KTR_MLD, "%s: merge inm state", __func__); error = in6m_merge(inm, imf); - if (error) { + if (error) CTR1(KTR_MLD, "%s: failed to merge inm state", __func__); - goto out_im6f_rollback; - } - - CTR1(KTR_MLD, "%s: doing mld downcall", __func__); - error = mld_change_state(inm, 0); - if (error) { - CTR1(KTR_MLD, "%s: failed mld downcall", - __func__); + else { + CTR1(KTR_MLD, "%s: doing mld downcall", __func__); + error = mld_change_state(inm, 0); + if (error) + CTR1(KTR_MLD, "%s: failed mld downcall", + __func__); } } IN6_MULTI_UNLOCK(); -out_im6f_rollback: if (error) im6f_rollback(imf); else @@ -2520,16 +2514,15 @@ in6p_set_source_filters(struct inpcb *in */ CTR1(KTR_MLD, "%s: merge inm state", __func__); error = in6m_merge(inm, imf); - if (error) { + if (error) CTR1(KTR_MLD, "%s: failed to merge inm state", __func__); - goto out_im6f_rollback; + else { + CTR1(KTR_MLD, "%s: doing mld downcall", __func__); + error = mld_change_state(inm, 0); + if (error) + CTR1(KTR_MLD, "%s: failed mld downcall", __func__); } - CTR1(KTR_MLD, "%s: doing mld downcall", __func__); - error = mld_change_state(inm, 0); - if (error) - CTR1(KTR_MLD, "%s: failed mld downcall", __func__); - IN6_MULTI_UNLOCK(); out_im6f_rollback: From owner-svn-src-stable@FreeBSD.ORG Mon Apr 21 11:24:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E740BCB7; Mon, 21 Apr 2014 11:24:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0BE21C4C; Mon, 21 Apr 2014 11:24:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3LBO1lN092230; Mon, 21 Apr 2014 11:24:01 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3LBO1Ns092229; Mon, 21 Apr 2014 11:24:01 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201404211124.s3LBO1Ns092229@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 21 Apr 2014 11:24:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264723 - stable/9/sys/netinet6 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2014 11:24:02 -0000 Author: ae Date: Mon Apr 21 11:24:01 2014 New Revision: 264723 URL: http://svnweb.freebsd.org/changeset/base/264723 Log: MFC r264364: Properly release the in6_multi lock. Sponsored by: Yandex LLC Modified: stable/9/sys/netinet6/in6_mcast.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet6/in6_mcast.c ============================================================================== --- stable/9/sys/netinet6/in6_mcast.c Mon Apr 21 11:17:29 2014 (r264722) +++ stable/9/sys/netinet6/in6_mcast.c Mon Apr 21 11:24:01 2014 (r264723) @@ -1449,16 +1449,15 @@ in6p_block_unblock_source(struct inpcb * CTR1(KTR_MLD, "%s: merge inm state", __func__); error = in6m_merge(inm, imf); - if (error) { + if (error) CTR1(KTR_MLD, "%s: failed to merge inm state", __func__); - goto out_im6f_rollback; + else { + CTR1(KTR_MLD, "%s: doing mld downcall", __func__); + error = mld_change_state(inm, 0); + if (error) + CTR1(KTR_MLD, "%s: failed mld downcall", __func__); } - CTR1(KTR_MLD, "%s: doing mld downcall", __func__); - error = mld_change_state(inm, 0); - if (error) - CTR1(KTR_MLD, "%s: failed mld downcall", __func__); - IN6_MULTI_UNLOCK(); out_im6f_rollback: @@ -2046,29 +2045,27 @@ in6p_join_group(struct inpcb *inp, struc if (is_new) { error = in6_mc_join_locked(ifp, &gsa->sin6.sin6_addr, imf, &inm, 0); - if (error) + if (error) { + IN6_MULTI_UNLOCK(); goto out_im6o_free; + } imo->im6o_membership[idx] = inm; } else { CTR1(KTR_MLD, "%s: merge inm state", __func__); error = in6m_merge(inm, imf); - if (error) { + if (error) CTR1(KTR_MLD, "%s: failed to merge inm state", __func__); - goto out_im6f_rollback; - } - CTR1(KTR_MLD, "%s: doing mld downcall", __func__); - error = mld_change_state(inm, 0); - if (error) { - CTR1(KTR_MLD, "%s: failed mld downcall", - __func__); - goto out_im6f_rollback; + else { + CTR1(KTR_MLD, "%s: doing mld downcall", __func__); + error = mld_change_state(inm, 0); + if (error) + CTR1(KTR_MLD, "%s: failed mld downcall", + __func__); } } IN6_MULTI_UNLOCK(); - -out_im6f_rollback: INP_WLOCK_ASSERT(inp); if (error) { im6f_rollback(imf); @@ -2295,23 +2292,20 @@ in6p_leave_group(struct inpcb *inp, stru } else { CTR1(KTR_MLD, "%s: merge inm state", __func__); error = in6m_merge(inm, imf); - if (error) { + if (error) CTR1(KTR_MLD, "%s: failed to merge inm state", __func__); - goto out_im6f_rollback; - } - - CTR1(KTR_MLD, "%s: doing mld downcall", __func__); - error = mld_change_state(inm, 0); - if (error) { - CTR1(KTR_MLD, "%s: failed mld downcall", - __func__); + else { + CTR1(KTR_MLD, "%s: doing mld downcall", __func__); + error = mld_change_state(inm, 0); + if (error) + CTR1(KTR_MLD, "%s: failed mld downcall", + __func__); } } IN6_MULTI_UNLOCK(); -out_im6f_rollback: if (error) im6f_rollback(imf); else @@ -2520,16 +2514,15 @@ in6p_set_source_filters(struct inpcb *in */ CTR1(KTR_MLD, "%s: merge inm state", __func__); error = in6m_merge(inm, imf); - if (error) { + if (error) CTR1(KTR_MLD, "%s: failed to merge inm state", __func__); - goto out_im6f_rollback; + else { + CTR1(KTR_MLD, "%s: doing mld downcall", __func__); + error = mld_change_state(inm, 0); + if (error) + CTR1(KTR_MLD, "%s: failed mld downcall", __func__); } - CTR1(KTR_MLD, "%s: doing mld downcall", __func__); - error = mld_change_state(inm, 0); - if (error) - CTR1(KTR_MLD, "%s: failed mld downcall", __func__); - IN6_MULTI_UNLOCK(); out_im6f_rollback: From owner-svn-src-stable@FreeBSD.ORG Mon Apr 21 11:26:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0CE9E0E; Mon, 21 Apr 2014 11:26:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D0EE1C68; Mon, 21 Apr 2014 11:26:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3LBQkBI092554; Mon, 21 Apr 2014 11:26:46 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3LBQkkA092553; Mon, 21 Apr 2014 11:26:46 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201404211126.s3LBQkkA092553@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 21 Apr 2014 11:26:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r264724 - stable/8/sys/netinet6 X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2014 11:26:46 -0000 Author: ae Date: Mon Apr 21 11:26:46 2014 New Revision: 264724 URL: http://svnweb.freebsd.org/changeset/base/264724 Log: MFC r264364: Properly release the in6_multi lock. Sponsored by: Yandex LLC Modified: stable/8/sys/netinet6/in6_mcast.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/netinet6/ (props changed) Modified: stable/8/sys/netinet6/in6_mcast.c ============================================================================== --- stable/8/sys/netinet6/in6_mcast.c Mon Apr 21 11:24:01 2014 (r264723) +++ stable/8/sys/netinet6/in6_mcast.c Mon Apr 21 11:26:46 2014 (r264724) @@ -1444,16 +1444,15 @@ in6p_block_unblock_source(struct inpcb * CTR1(KTR_MLD, "%s: merge inm state", __func__); error = in6m_merge(inm, imf); - if (error) { + if (error) CTR1(KTR_MLD, "%s: failed to merge inm state", __func__); - goto out_im6f_rollback; + else { + CTR1(KTR_MLD, "%s: doing mld downcall", __func__); + error = mld_change_state(inm, 0); + if (error) + CTR1(KTR_MLD, "%s: failed mld downcall", __func__); } - CTR1(KTR_MLD, "%s: doing mld downcall", __func__); - error = mld_change_state(inm, 0); - if (error) - CTR1(KTR_MLD, "%s: failed mld downcall", __func__); - IN6_MULTI_UNLOCK(); out_im6f_rollback: @@ -2041,29 +2040,27 @@ in6p_join_group(struct inpcb *inp, struc if (is_new) { error = in6_mc_join_locked(ifp, &gsa->sin6.sin6_addr, imf, &inm, 0); - if (error) + if (error) { + IN6_MULTI_UNLOCK(); goto out_im6o_free; + } imo->im6o_membership[idx] = inm; } else { CTR1(KTR_MLD, "%s: merge inm state", __func__); error = in6m_merge(inm, imf); - if (error) { + if (error) CTR1(KTR_MLD, "%s: failed to merge inm state", __func__); - goto out_im6f_rollback; - } - CTR1(KTR_MLD, "%s: doing mld downcall", __func__); - error = mld_change_state(inm, 0); - if (error) { - CTR1(KTR_MLD, "%s: failed mld downcall", - __func__); - goto out_im6f_rollback; + else { + CTR1(KTR_MLD, "%s: doing mld downcall", __func__); + error = mld_change_state(inm, 0); + if (error) + CTR1(KTR_MLD, "%s: failed mld downcall", + __func__); } } IN6_MULTI_UNLOCK(); - -out_im6f_rollback: INP_WLOCK_ASSERT(inp); if (error) { im6f_rollback(imf); @@ -2290,23 +2287,20 @@ in6p_leave_group(struct inpcb *inp, stru } else { CTR1(KTR_MLD, "%s: merge inm state", __func__); error = in6m_merge(inm, imf); - if (error) { + if (error) CTR1(KTR_MLD, "%s: failed to merge inm state", __func__); - goto out_im6f_rollback; - } - - CTR1(KTR_MLD, "%s: doing mld downcall", __func__); - error = mld_change_state(inm, 0); - if (error) { - CTR1(KTR_MLD, "%s: failed mld downcall", - __func__); + else { + CTR1(KTR_MLD, "%s: doing mld downcall", __func__); + error = mld_change_state(inm, 0); + if (error) + CTR1(KTR_MLD, "%s: failed mld downcall", + __func__); } } IN6_MULTI_UNLOCK(); -out_im6f_rollback: if (error) im6f_rollback(imf); else @@ -2515,16 +2509,15 @@ in6p_set_source_filters(struct inpcb *in */ CTR1(KTR_MLD, "%s: merge inm state", __func__); error = in6m_merge(inm, imf); - if (error) { + if (error) CTR1(KTR_MLD, "%s: failed to merge inm state", __func__); - goto out_im6f_rollback; + else { + CTR1(KTR_MLD, "%s: doing mld downcall", __func__); + error = mld_change_state(inm, 0); + if (error) + CTR1(KTR_MLD, "%s: failed mld downcall", __func__); } - CTR1(KTR_MLD, "%s: doing mld downcall", __func__); - error = mld_change_state(inm, 0); - if (error) - CTR1(KTR_MLD, "%s: failed mld downcall", __func__); - IN6_MULTI_UNLOCK(); out_im6f_rollback: From owner-svn-src-stable@FreeBSD.ORG Mon Apr 21 16:26:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2DFB459; Mon, 21 Apr 2014 16:26:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE9FA1928; Mon, 21 Apr 2014 16:26:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3LGQPfX015297; Mon, 21 Apr 2014 16:26:25 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3LGQPKr015291; Mon, 21 Apr 2014 16:26:25 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201404211626.s3LGQPKr015291@svn.freebsd.org> From: Alexander Motin Date: Mon, 21 Apr 2014 16:26:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264727 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2014 16:26:26 -0000 Author: mav Date: Mon Apr 21 16:26:24 2014 New Revision: 264727 URL: http://svnweb.freebsd.org/changeset/base/264727 Log: MFC r264191: Report stripe size and offset of the backing device in READ CAPACITY (16) as physical sector size and offset. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_backend.h stable/10/sys/cam/ctl/ctl_backend_block.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Apr 21 15:36:28 2014 (r264726) +++ stable/10/sys/cam/ctl/ctl.c Mon Apr 21 16:26:24 2014 (r264727) @@ -6883,6 +6883,8 @@ ctl_read_capacity_16(struct ctl_scsiio * scsi_u64to8b(lun->be_lun->maxlba, data->addr); /* XXX KDM this may not be 512 bytes... */ scsi_ulto4b(lun->be_lun->blocksize, data->length); + data->prot_lbppbe = lun->be_lun->pblockexp & SRC16_LBPPBE; + scsi_ulto2b(lun->be_lun->pblockoff & SRC16_LALBA_A, data->lalba_lbp); ctsio->scsi_status = SCSI_STATUS_OK; Modified: stable/10/sys/cam/ctl/ctl_backend.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend.h Mon Apr 21 15:36:28 2014 (r264726) +++ stable/10/sys/cam/ctl/ctl_backend.h Mon Apr 21 16:26:24 2014 (r264727) @@ -137,6 +137,10 @@ typedef void (*be_lun_config_t)(void *be * this should be 512. In theory CTL should be able to handle other block * sizes. Host application software may not deal with it very well, though. * + * pblockexp is the log2() of number of LBAs on the LUN per physical sector. + * + * pblockoff is the lowest LBA on the LUN aligned ot physical sector. + * * req_lun_id is the requested LUN ID. CTL only pays attention to this * field if the CTL_LUN_FLAG_ID_REQ flag is set. If the requested LUN ID is * not available, the LUN addition will fail. If a particular LUN ID isn't @@ -185,6 +189,8 @@ struct ctl_be_lun { void *be_lun; /* passed to CTL */ uint64_t maxlba; /* passed to CTL */ uint32_t blocksize; /* passed to CTL */ + uint16_t pblockexp; /* passed to CTL */ + uint16_t pblockoff; /* passed to CTL */ uint32_t req_lun_id; /* passed to CTL */ uint32_t lun_id; /* returned from CTL */ uint8_t serial_num[CTL_SN_LEN]; /* passed to CTL */ Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Mon Apr 21 15:36:28 2014 (r264726) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Mon Apr 21 16:26:24 2014 (r264727) @@ -158,6 +158,8 @@ struct ctl_be_block_lun { uint64_t size_bytes; uint32_t blocksize; int blocksize_shift; + uint16_t pblockexp; + uint16_t pblockoff; struct ctl_be_block_softc *softc; struct devstat *disk_stats; ctl_be_block_lun_flags flags; @@ -1370,6 +1372,7 @@ ctl_be_block_open_dev(struct ctl_be_bloc struct cdev *dev; struct cdevsw *devsw; int error; + off_t ps, pss, po, pos; params = &req->reqdata.create; @@ -1467,6 +1470,24 @@ ctl_be_block_open_dev(struct ctl_be_bloc be_lun->size_bytes = params->lun_size_bytes; } + error = devsw->d_ioctl(dev, DIOCGSTRIPESIZE, + (caddr_t)&ps, FREAD, curthread); + if (error) + ps = po = 0; + else { + error = devsw->d_ioctl(dev, DIOCGSTRIPEOFFSET, + (caddr_t)&po, FREAD, curthread); + if (error) + po = 0; + } + pss = ps / be_lun->blocksize; + pos = po / be_lun->blocksize; + if ((pss > 0) && (pss * be_lun->blocksize == ps) && (pss >= pos) && + ((pss & (pss - 1)) == 0) && (pos * be_lun->blocksize == po)) { + be_lun->pblockexp = fls(pss) - 1; + be_lun->pblockoff = (pss - pos) % pss; + } + return (0); } @@ -1691,6 +1712,8 @@ ctl_be_block_create(struct ctl_be_block_ * For processor devices, we don't have any size. */ be_lun->blocksize = 0; + be_lun->pblockexp = 0; + be_lun->pblockoff = 0; be_lun->size_blocks = 0; be_lun->size_bytes = 0; be_lun->ctl_be_lun.maxlba = 0; @@ -1751,6 +1774,8 @@ ctl_be_block_create(struct ctl_be_block_ be_lun->ctl_be_lun.flags = CTL_LUN_FLAG_PRIMARY; be_lun->ctl_be_lun.be_lun = be_lun; be_lun->ctl_be_lun.blocksize = be_lun->blocksize; + be_lun->ctl_be_lun.pblockexp = be_lun->pblockexp; + be_lun->ctl_be_lun.pblockoff = be_lun->pblockoff; /* Tell the user the blocksize we ended up using */ params->blocksize_bytes = be_lun->blocksize; if (params->flags & CTL_LUN_FLAG_ID_REQ) { From owner-svn-src-stable@FreeBSD.ORG Mon Apr 21 16:29:55 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AC81B5C8; Mon, 21 Apr 2014 16:29:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98E1D1953; Mon, 21 Apr 2014 16:29:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3LGTtlN015665; Mon, 21 Apr 2014 16:29:55 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3LGTt0M015662; Mon, 21 Apr 2014 16:29:55 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201404211629.s3LGTt0M015662@svn.freebsd.org> From: Alexander Motin Date: Mon, 21 Apr 2014 16:29:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264728 - stable/9/sys/cam/ctl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2014 16:29:55 -0000 Author: mav Date: Mon Apr 21 16:29:54 2014 New Revision: 264728 URL: http://svnweb.freebsd.org/changeset/base/264728 Log: MFC r264191: Report stripe size and offset of the backing device in READ CAPACITY (16) as physical sector size and offset. Modified: stable/9/sys/cam/ctl/ctl.c stable/9/sys/cam/ctl/ctl_backend.h stable/9/sys/cam/ctl/ctl_backend_block.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ctl/ctl.c ============================================================================== --- stable/9/sys/cam/ctl/ctl.c Mon Apr 21 16:26:24 2014 (r264727) +++ stable/9/sys/cam/ctl/ctl.c Mon Apr 21 16:29:54 2014 (r264728) @@ -6886,6 +6886,8 @@ ctl_read_capacity_16(struct ctl_scsiio * scsi_u64to8b(lun->be_lun->maxlba, data->addr); /* XXX KDM this may not be 512 bytes... */ scsi_ulto4b(lun->be_lun->blocksize, data->length); + data->prot_lbppbe = lun->be_lun->pblockexp & SRC16_LBPPBE; + scsi_ulto2b(lun->be_lun->pblockoff & SRC16_LALBA_A, data->lalba_lbp); ctsio->scsi_status = SCSI_STATUS_OK; Modified: stable/9/sys/cam/ctl/ctl_backend.h ============================================================================== --- stable/9/sys/cam/ctl/ctl_backend.h Mon Apr 21 16:26:24 2014 (r264727) +++ stable/9/sys/cam/ctl/ctl_backend.h Mon Apr 21 16:29:54 2014 (r264728) @@ -137,6 +137,10 @@ typedef void (*be_lun_config_t)(void *be * this should be 512. In theory CTL should be able to handle other block * sizes. Host application software may not deal with it very well, though. * + * pblockexp is the log2() of number of LBAs on the LUN per physical sector. + * + * pblockoff is the lowest LBA on the LUN aligned ot physical sector. + * * req_lun_id is the requested LUN ID. CTL only pays attention to this * field if the CTL_LUN_FLAG_ID_REQ flag is set. If the requested LUN ID is * not available, the LUN addition will fail. If a particular LUN ID isn't @@ -179,6 +183,8 @@ struct ctl_be_lun { void *be_lun; /* passed to CTL */ uint64_t maxlba; /* passed to CTL */ uint32_t blocksize; /* passed to CTL */ + uint16_t pblockexp; /* passed to CTL */ + uint16_t pblockoff; /* passed to CTL */ uint32_t req_lun_id; /* passed to CTL */ uint32_t lun_id; /* returned from CTL */ uint8_t serial_num[CTL_SN_LEN]; /* passed to CTL */ Modified: stable/9/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/9/sys/cam/ctl/ctl_backend_block.c Mon Apr 21 16:26:24 2014 (r264727) +++ stable/9/sys/cam/ctl/ctl_backend_block.c Mon Apr 21 16:29:54 2014 (r264728) @@ -158,6 +158,8 @@ struct ctl_be_block_lun { uint64_t size_bytes; uint32_t blocksize; int blocksize_shift; + uint16_t pblockexp; + uint16_t pblockoff; struct ctl_be_block_softc *softc; struct devstat *disk_stats; ctl_be_block_lun_flags flags; @@ -1376,6 +1378,7 @@ ctl_be_block_open_dev(struct ctl_be_bloc struct cdev *dev; struct cdevsw *devsw; int error; + off_t ps, pss, po, pos; params = &req->reqdata.create; @@ -1473,6 +1476,24 @@ ctl_be_block_open_dev(struct ctl_be_bloc be_lun->size_bytes = params->lun_size_bytes; } + error = devsw->d_ioctl(dev, DIOCGSTRIPESIZE, + (caddr_t)&ps, FREAD, curthread); + if (error) + ps = po = 0; + else { + error = devsw->d_ioctl(dev, DIOCGSTRIPEOFFSET, + (caddr_t)&po, FREAD, curthread); + if (error) + po = 0; + } + pss = ps / be_lun->blocksize; + pos = po / be_lun->blocksize; + if ((pss > 0) && (pss * be_lun->blocksize == ps) && (pss >= pos) && + ((pss & (pss - 1)) == 0) && (pos * be_lun->blocksize == po)) { + be_lun->pblockexp = fls(pss) - 1; + be_lun->pblockoff = (pss - pos) % pss; + } + return (0); } @@ -1701,6 +1722,8 @@ ctl_be_block_create(struct ctl_be_block_ * For processor devices, we don't have any size. */ be_lun->blocksize = 0; + be_lun->pblockexp = 0; + be_lun->pblockoff = 0; be_lun->size_blocks = 0; be_lun->size_bytes = 0; be_lun->ctl_be_lun.maxlba = 0; @@ -1751,6 +1774,8 @@ ctl_be_block_create(struct ctl_be_block_ be_lun->ctl_be_lun.flags = CTL_LUN_FLAG_PRIMARY; be_lun->ctl_be_lun.be_lun = be_lun; be_lun->ctl_be_lun.blocksize = be_lun->blocksize; + be_lun->ctl_be_lun.pblockexp = be_lun->pblockexp; + be_lun->ctl_be_lun.pblockoff = be_lun->pblockoff; /* Tell the user the blocksize we ended up using */ params->blocksize_bytes = be_lun->blocksize; if (params->flags & CTL_LUN_FLAG_ID_REQ) { From owner-svn-src-stable@FreeBSD.ORG Mon Apr 21 16:33:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0708F8BD; Mon, 21 Apr 2014 16:33:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E684019FA; Mon, 21 Apr 2014 16:33:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3LGXnoF019166; Mon, 21 Apr 2014 16:33:49 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3LGXnon019165; Mon, 21 Apr 2014 16:33:49 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201404211633.s3LGXnon019165@svn.freebsd.org> From: Alexander Motin Date: Mon, 21 Apr 2014 16:33:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264729 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2014 16:33:50 -0000 Author: mav Date: Mon Apr 21 16:33:49 2014 New Revision: 264729 URL: http://svnweb.freebsd.org/changeset/base/264729 Log: MFC r264341: Create zvol devices on zfs clone. While big and shiny patch is not ready, it is better to have something. PR: kern/178999 Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Apr 21 16:29:54 2014 (r264728) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Apr 21 16:33:49 2014 (r264729) @@ -3352,6 +3352,10 @@ zfs_ioc_clone(const char *fsname, nvlist if (error != 0) (void) dsl_destroy_head(fsname); } +#ifdef __FreeBSD__ + if (error == 0) + zvol_create_minors(fsname); +#endif return (error); } From owner-svn-src-stable@FreeBSD.ORG Mon Apr 21 16:35:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ABDE29F9; Mon, 21 Apr 2014 16:35:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9817E1A04; Mon, 21 Apr 2014 16:35:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3LGZEiQ019412; Mon, 21 Apr 2014 16:35:14 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3LGZEqs019411; Mon, 21 Apr 2014 16:35:14 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201404211635.s3LGZEqs019411@svn.freebsd.org> From: Alexander Motin Date: Mon, 21 Apr 2014 16:35:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264730 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2014 16:35:14 -0000 Author: mav Date: Mon Apr 21 16:35:14 2014 New Revision: 264730 URL: http://svnweb.freebsd.org/changeset/base/264730 Log: MFC r264341: Create zvol devices on zfs clone. While big and shiny patch is not ready, it is better to have something. PR: kern/178999 Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Apr 21 16:33:49 2014 (r264729) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Apr 21 16:35:14 2014 (r264730) @@ -3352,6 +3352,10 @@ zfs_ioc_clone(const char *fsname, nvlist if (error != 0) (void) dsl_destroy_head(fsname); } +#ifdef __FreeBSD__ + if (error == 0) + zvol_create_minors(fsname); +#endif return (error); } From owner-svn-src-stable@FreeBSD.ORG Mon Apr 21 16:42:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A69C0EAF; Mon, 21 Apr 2014 16:42:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88CA51AD3; Mon, 21 Apr 2014 16:42:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3LGgFwa023476; Mon, 21 Apr 2014 16:42:15 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3LGgFwL023475; Mon, 21 Apr 2014 16:42:15 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201404211642.s3LGgFwL023475@svn.freebsd.org> From: Alexander Motin Date: Mon, 21 Apr 2014 16:42:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264732 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2014 16:42:15 -0000 Author: mav Date: Mon Apr 21 16:42:15 2014 New Revision: 264732 URL: http://svnweb.freebsd.org/changeset/base/264732 Log: MFC r264077: Add BIO_DELETE support to ZVOL. It is an adapted merge from the vendor branch of: 701 UNMAP support for COMSTAR (in part related to ZFS) 2130 zvol DKIOCFREE uses nested DMU transactions Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Mon Apr 21 16:35:19 2014 (r264731) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Mon Apr 21 16:42:15 2014 (r264732) @@ -25,9 +25,12 @@ * All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. + * + * Portions Copyright 2010 Robert Milkowski + * + * Copyright 2011 Nexenta Systems, Inc. All rights reserved. */ -/* Portions Copyright 2010 Robert Milkowski */ /* Portions Copyright 2011 Martin Matuska */ /* @@ -153,6 +156,8 @@ int zvol_maxphys = DMU_MAX_ACCESS/2; extern int zfs_set_prop_nvlist(const char *, zprop_source_t, nvlist_t *, nvlist_t *); +static void zvol_log_truncate(zvol_state_t *zv, dmu_tx_t *tx, uint64_t off, + uint64_t len, boolean_t sync); static int zvol_remove_zv(zvol_state_t *); static int zvol_get_data(void *arg, lr_write_t *lr, char *buf, zio_t *zio); static int zvol_dumpify(zvol_state_t *zv); @@ -386,6 +391,24 @@ zvol_create_cb(objset_t *os, void *arg, } /* + * Replay a TX_TRUNCATE ZIL transaction if asked. TX_TRUNCATE is how we + * implement DKIOCFREE/free-long-range. + */ +static int +zvol_replay_truncate(zvol_state_t *zv, lr_truncate_t *lr, boolean_t byteswap) +{ + uint64_t offset, length; + + if (byteswap) + byteswap_uint64_array(lr, sizeof (*lr)); + + offset = lr->lr_offset; + length = lr->lr_length; + + return (dmu_free_long_range(zv->zv_objset, ZVOL_OBJ, offset, length)); +} + +/* * Replay a TX_WRITE ZIL transaction that didn't get committed * after a system failure */ @@ -435,7 +458,7 @@ zvol_replay_err(zvol_state_t *zv, lr_t * /* * Callback vectors for replaying records. - * Only TX_WRITE is needed for zvol. + * Only TX_WRITE and TX_TRUNCATE are needed for zvol. */ zil_replay_func_t *zvol_replay_vector[TX_MAX_TYPE] = { zvol_replay_err, /* 0 no such transaction type */ @@ -448,7 +471,7 @@ zil_replay_func_t *zvol_replay_vector[TX zvol_replay_err, /* TX_LINK */ zvol_replay_err, /* TX_RENAME */ zvol_replay_write, /* TX_WRITE */ - zvol_replay_err, /* TX_TRUNCATE */ + zvol_replay_truncate, /* TX_TRUNCATE */ zvol_replay_err, /* TX_SETATTR */ zvol_replay_err, /* TX_ACL */ zvol_replay_err, /* TX_CREATE_ACL */ @@ -1316,6 +1339,21 @@ zvol_strategy(struct bio *bp) rl = zfs_range_lock(&zv->zv_znode, off, resid, doread ? RL_READER : RL_WRITER); + if (bp->bio_cmd == BIO_DELETE) { + dmu_tx_t *tx = dmu_tx_create(zv->zv_objset); + error = dmu_tx_assign(tx, TXG_WAIT); + if (error != 0) { + dmu_tx_abort(tx); + } else { + zvol_log_truncate(zv, tx, off, resid, B_TRUE); + dmu_tx_commit(tx); + error = dmu_free_long_range(zv->zv_objset, ZVOL_OBJ, + off, resid); + resid = 0; + } + goto unlock; + } + while (resid != 0 && off < volsize) { size_t size = MIN(resid, zvol_maxphys); #ifdef illumos @@ -1351,6 +1389,7 @@ zvol_strategy(struct bio *bp) addr += size; resid -= size; } +unlock: zfs_range_unlock(rl); bp->bio_completed = bp->bio_length - resid; @@ -1648,9 +1687,36 @@ zvol_log_write_minor(void *minor_hdl, dm /* * END entry points to allow external callers access to the volume. */ +#endif /* sun */ /* + * Log a DKIOCFREE/free-long-range to the ZIL with TX_TRUNCATE. + */ +static void +zvol_log_truncate(zvol_state_t *zv, dmu_tx_t *tx, uint64_t off, uint64_t len, + boolean_t sync) +{ + itx_t *itx; + lr_truncate_t *lr; + zilog_t *zilog = zv->zv_zilog; + + if (zil_replaying(zilog, tx)) + return; + + itx = zil_itx_create(TX_TRUNCATE, sizeof (*lr)); + lr = (lr_truncate_t *)&itx->itx_lr; + lr->lr_foid = ZVOL_OBJ; + lr->lr_offset = off; + lr->lr_length = len; + + itx->itx_sync = sync; + zil_itx_assign(zilog, itx, tx); +} + +#ifdef sun +/* * Dirtbag ioctls to support mkfs(1M) for UFS filesystems. See dkio(7I). + * Also a dirtbag dkio ioctl for unmap/free-block functionality. */ /*ARGSUSED*/ int @@ -2271,12 +2337,12 @@ zvol_geom_start(struct bio *bp) break; case BIO_READ: case BIO_WRITE: + case BIO_DELETE: if (!THREAD_CAN_SLEEP()) goto enqueue; zvol_strategy(bp); break; case BIO_GETATTR: - case BIO_DELETE: default: g_io_deliver(bp, EOPNOTSUPP); break; From owner-svn-src-stable@FreeBSD.ORG Mon Apr 21 16:46:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 706D3DC; Mon, 21 Apr 2014 16:46:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BFF41B0A; Mon, 21 Apr 2014 16:46:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3LGkj0j024094; Mon, 21 Apr 2014 16:46:45 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3LGkjAp024093; Mon, 21 Apr 2014 16:46:45 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201404211646.s3LGkjAp024093@svn.freebsd.org> From: Alexander Motin Date: Mon, 21 Apr 2014 16:46:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264733 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2014 16:46:45 -0000 Author: mav Date: Mon Apr 21 16:46:44 2014 New Revision: 264733 URL: http://svnweb.freebsd.org/changeset/base/264733 Log: MFC r264193: In addition to r264077, tell GEOM that we do support BIO_DELETE now. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Mon Apr 21 16:42:15 2014 (r264732) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Mon Apr 21 16:46:44 2014 (r264733) @@ -2343,6 +2343,9 @@ zvol_geom_start(struct bio *bp) zvol_strategy(bp); break; case BIO_GETATTR: + if (g_handleattr_int(bp, "GEOM::candelete", 1)) + return; + /* FALLTHROUGH */ default: g_io_deliver(bp, EOPNOTSUPP); break; From owner-svn-src-stable@FreeBSD.ORG Mon Apr 21 16:54:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2898C3FE; Mon, 21 Apr 2014 16:54:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 13D3A1BFD; Mon, 21 Apr 2014 16:54:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3LGsck6027963; Mon, 21 Apr 2014 16:54:38 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3LGscDa027961; Mon, 21 Apr 2014 16:54:38 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201404211654.s3LGscDa027961@svn.freebsd.org> From: Sean Bruno Date: Mon, 21 Apr 2014 16:54:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264734 - stable/10/sys/dev/ciss X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2014 16:54:39 -0000 Author: sbruno Date: Mon Apr 21 16:54:38 2014 New Revision: 264734 URL: http://svnweb.freebsd.org/changeset/base/264734 Log: MFC r264127 Add PCI-IDs for TBD Gen9 RAID controller HBAs from HP to ciss(4) Submitted by: Benesh, Scott Sponsored by: Yahoo! Inc. Modified: stable/10/sys/dev/ciss/ciss.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ciss/ciss.c ============================================================================== --- stable/10/sys/dev/ciss/ciss.c Mon Apr 21 16:46:44 2014 (r264733) +++ stable/10/sys/dev/ciss/ciss.c Mon Apr 21 16:54:38 2014 (r264734) @@ -345,6 +345,21 @@ static struct { 0x103C, 0x1928, CISS_BOARD_SA5, "HP Smart Array P230i" }, { 0x103C, 0x1929, CISS_BOARD_SA5, "HP Smart Array P530" }, { 0x103C, 0x192A, CISS_BOARD_SA5, "HP Smart Array P531" }, + { 0x103C, 0x21BD, CISS_BOARD_SA5, "HP Smart Array TBD" }, + { 0x103C, 0x21BE, CISS_BOARD_SA5, "HP Smart Array TBD" }, + { 0x103C, 0x21BF, CISS_BOARD_SA5, "HP Smart Array TBD" }, + { 0x103C, 0x21C0, CISS_BOARD_SA5, "HP Smart Array TBD" }, + { 0x103C, 0x21C2, CISS_BOARD_SA5, "HP Smart Array TBD" }, + { 0x103C, 0x21C3, CISS_BOARD_SA5, "HP Smart Array TBD" }, + { 0x103C, 0x21C5, CISS_BOARD_SA5, "HP Smart Array TBD" }, + { 0x103C, 0x21C6, CISS_BOARD_SA5, "HP Smart Array TBD" }, + { 0x103C, 0x21C7, CISS_BOARD_SA5, "HP Smart Array TBD" }, + { 0x103C, 0x21C8, CISS_BOARD_SA5, "HP Smart Array TBD" }, + { 0x103C, 0x21CA, CISS_BOARD_SA5, "HP Smart Array TBD" }, + { 0x103C, 0x21CB, CISS_BOARD_SA5, "HP Smart Array TBD" }, + { 0x103C, 0x21CC, CISS_BOARD_SA5, "HP Smart Array TBD" }, + { 0x103C, 0x21CD, CISS_BOARD_SA5, "HP Smart Array TBD" }, + { 0x103C, 0x21CE, CISS_BOARD_SA5, "HP Smart Array TBD" }, { 0, 0, 0, NULL } }; From owner-svn-src-stable@FreeBSD.ORG Mon Apr 21 16:55:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1848535; Mon, 21 Apr 2014 16:55:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEC9B1C07; Mon, 21 Apr 2014 16:55:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3LGt2Kq028112; Mon, 21 Apr 2014 16:55:02 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3LGt2JX028111; Mon, 21 Apr 2014 16:55:02 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201404211655.s3LGt2JX028111@svn.freebsd.org> From: Sean Bruno Date: Mon, 21 Apr 2014 16:55:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264735 - stable/9/sys/dev/ciss X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2014 16:55:02 -0000 Author: sbruno Date: Mon Apr 21 16:55:02 2014 New Revision: 264735 URL: http://svnweb.freebsd.org/changeset/base/264735 Log: MFC r264127 Add PCI-IDs for TBD Gen9 RAID controller HBAs from HP to ciss(4) Submitted by: Benesh, Scott Sponsored by: Yahoo! Inc. Modified: stable/9/sys/dev/ciss/ciss.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ciss/ciss.c ============================================================================== --- stable/9/sys/dev/ciss/ciss.c Mon Apr 21 16:54:38 2014 (r264734) +++ stable/9/sys/dev/ciss/ciss.c Mon Apr 21 16:55:02 2014 (r264735) @@ -345,6 +345,21 @@ static struct { 0x103C, 0x1928, CISS_BOARD_SA5, "HP Smart Array P230i" }, { 0x103C, 0x1929, CISS_BOARD_SA5, "HP Smart Array P530" }, { 0x103C, 0x192A, CISS_BOARD_SA5, "HP Smart Array P531" }, + { 0x103C, 0x21BD, CISS_BOARD_SA5, "HP Smart Array TBD" }, + { 0x103C, 0x21BE, CISS_BOARD_SA5, "HP Smart Array TBD" }, + { 0x103C, 0x21BF, CISS_BOARD_SA5, "HP Smart Array TBD" }, + { 0x103C, 0x21C0, CISS_BOARD_SA5, "HP Smart Array TBD" }, + { 0x103C, 0x21C2, CISS_BOARD_SA5, "HP Smart Array TBD" }, + { 0x103C, 0x21C3, CISS_BOARD_SA5, "HP Smart Array TBD" }, + { 0x103C, 0x21C5, CISS_BOARD_SA5, "HP Smart Array TBD" }, + { 0x103C, 0x21C6, CISS_BOARD_SA5, "HP Smart Array TBD" }, + { 0x103C, 0x21C7, CISS_BOARD_SA5, "HP Smart Array TBD" }, + { 0x103C, 0x21C8, CISS_BOARD_SA5, "HP Smart Array TBD" }, + { 0x103C, 0x21CA, CISS_BOARD_SA5, "HP Smart Array TBD" }, + { 0x103C, 0x21CB, CISS_BOARD_SA5, "HP Smart Array TBD" }, + { 0x103C, 0x21CC, CISS_BOARD_SA5, "HP Smart Array TBD" }, + { 0x103C, 0x21CD, CISS_BOARD_SA5, "HP Smart Array TBD" }, + { 0x103C, 0x21CE, CISS_BOARD_SA5, "HP Smart Array TBD" }, { 0, 0, 0, NULL } }; From owner-svn-src-stable@FreeBSD.ORG Mon Apr 21 17:17:23 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E71F4910; Mon, 21 Apr 2014 17:17:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D35741E4C; Mon, 21 Apr 2014 17:17:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3LHHNl5036602; Mon, 21 Apr 2014 17:17:23 GMT (envelope-from emax@svn.freebsd.org) Received: (from emax@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3LHHNVw036601; Mon, 21 Apr 2014 17:17:23 GMT (envelope-from emax@svn.freebsd.org) Message-Id: <201404211717.s3LHHNVw036601@svn.freebsd.org> From: Maksim Yevmenkin Date: Mon, 21 Apr 2014 17:17:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264736 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2014 17:17:24 -0000 Author: emax Date: Mon Apr 21 17:17:23 2014 New Revision: 264736 URL: http://svnweb.freebsd.org/changeset/base/264736 Log: MFC r264621 use correct (integer) type for the temperature sysctl Reviewed by: np, scottl Obtained from: Netflix Modified: stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Mon Apr 21 16:55:02 2014 (r264735) +++ stable/10/sys/dev/cxgbe/t4_main.c Mon Apr 21 17:17:23 2014 (r264736) @@ -4266,7 +4266,7 @@ t4_sysctls(struct adapter *sc) NULL, sc->tids.nftids, "number of filters"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "temperature", CTLTYPE_INT | - CTLFLAG_RD, sc, 0, sysctl_temperature, "A", + CTLFLAG_RD, sc, 0, sysctl_temperature, "I", "chip temperature (in Celsius)"); t4_sge_sysctls(sc, ctx, children); From owner-svn-src-stable@FreeBSD.ORG Tue Apr 22 04:30:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9194B3BC; Tue, 22 Apr 2014 04:30:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 726881001; Tue, 22 Apr 2014 04:30:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3M4UPin014856; Tue, 22 Apr 2014 04:30:25 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3M4UPVG014855; Tue, 22 Apr 2014 04:30:25 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201404220430.s3M4UPVG014855@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 22 Apr 2014 04:30:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264745 - stable/10/sys/dev/usb/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Apr 2014 04:30:25 -0000 Author: yongari Date: Tue Apr 22 04:30:24 2014 New Revision: 264745 URL: http://svnweb.freebsd.org/changeset/base/264745 Log: MFC r264062: Correct endianness handling in getting station address from EEPROM. While I'm here, remove aue_eeprom_getword() as its only usage is to read station address and make it more readable. This change is inspired by NetBSD. With this change, aue(4) should work on big endian architectures. PR: 188177 Modified: stable/10/sys/dev/usb/net/if_aue.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/net/if_aue.c ============================================================================== --- stable/10/sys/dev/usb/net/if_aue.c Mon Apr 21 22:52:18 2014 (r264744) +++ stable/10/sys/dev/usb/net/if_aue.c Tue Apr 22 04:30:24 2014 (r264745) @@ -208,9 +208,7 @@ static uint8_t aue_csr_read_1(struct aue static uint16_t aue_csr_read_2(struct aue_softc *, uint16_t); static void aue_csr_write_1(struct aue_softc *, uint16_t, uint8_t); static void aue_csr_write_2(struct aue_softc *, uint16_t, uint16_t); -static void aue_eeprom_getword(struct aue_softc *, int, uint16_t *); -static void aue_read_eeprom(struct aue_softc *, uint8_t *, uint16_t, - uint16_t); +static uint16_t aue_eeprom_getword(struct aue_softc *, int); static void aue_reset(struct aue_softc *); static void aue_reset_pegasus_II(struct aue_softc *); @@ -372,11 +370,10 @@ aue_csr_write_2(struct aue_softc *sc, ui /* * Read a word of data stored in the EEPROM at address 'addr.' */ -static void -aue_eeprom_getword(struct aue_softc *sc, int addr, uint16_t *dest) +static uint16_t +aue_eeprom_getword(struct aue_softc *sc, int addr) { int i; - uint16_t word = 0; aue_csr_write_1(sc, AUE_EE_REG, addr); aue_csr_write_1(sc, AUE_EE_CTL, AUE_EECTL_READ); @@ -391,22 +388,23 @@ aue_eeprom_getword(struct aue_softc *sc, if (i == AUE_TIMEOUT) device_printf(sc->sc_ue.ue_dev, "EEPROM read timed out\n"); - word = aue_csr_read_2(sc, AUE_EE_DATA); - *dest = word; + return (aue_csr_read_2(sc, AUE_EE_DATA)); } /* - * Read a sequence of words from the EEPROM. + * Read station address(offset 0) from the EEPROM. */ static void -aue_read_eeprom(struct aue_softc *sc, uint8_t *dest, - uint16_t off, uint16_t len) +aue_read_mac(struct aue_softc *sc, uint8_t *eaddr) { - uint16_t *ptr = (uint16_t *)dest; - int i; + int i, offset; + uint16_t word; - for (i = 0; i != len; i++, ptr++) - aue_eeprom_getword(sc, off + i, ptr); + for (i = 0, offset = 0; i < ETHER_ADDR_LEN / 2; i++) { + word = aue_eeprom_getword(sc, offset + i); + eaddr[i * 2] = (uint8_t)word; + eaddr[i * 2 + 1] = (uint8_t)(word >> 8); + } } static int @@ -632,7 +630,7 @@ aue_attach_post(struct usb_ether *ue) aue_reset(sc); /* get station address from the EEPROM */ - aue_read_eeprom(sc, ue->ue_eaddr, 0, 3); + aue_read_mac(sc, ue->ue_eaddr); } /* From owner-svn-src-stable@FreeBSD.ORG Tue Apr 22 04:31:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E1554EE; Tue, 22 Apr 2014 04:31:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E50310AB; Tue, 22 Apr 2014 04:31:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3M4V8Zc016684; Tue, 22 Apr 2014 04:31:08 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3M4V8bu016683; Tue, 22 Apr 2014 04:31:08 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201404220431.s3M4V8bu016683@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 22 Apr 2014 04:31:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264746 - stable/9/sys/dev/usb/net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Apr 2014 04:31:08 -0000 Author: yongari Date: Tue Apr 22 04:31:07 2014 New Revision: 264746 URL: http://svnweb.freebsd.org/changeset/base/264746 Log: MFC r264062: Correct endianness handling in getting station address from EEPROM. While I'm here, remove aue_eeprom_getword() as its only usage is to read station address and make it more readable. This change is inspired by NetBSD. With this change, aue(4) should work on big endian architectures. PR: 188177 Modified: stable/9/sys/dev/usb/net/if_aue.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/net/if_aue.c ============================================================================== --- stable/9/sys/dev/usb/net/if_aue.c Tue Apr 22 04:30:24 2014 (r264745) +++ stable/9/sys/dev/usb/net/if_aue.c Tue Apr 22 04:31:07 2014 (r264746) @@ -208,9 +208,7 @@ static uint8_t aue_csr_read_1(struct aue static uint16_t aue_csr_read_2(struct aue_softc *, uint16_t); static void aue_csr_write_1(struct aue_softc *, uint16_t, uint8_t); static void aue_csr_write_2(struct aue_softc *, uint16_t, uint16_t); -static void aue_eeprom_getword(struct aue_softc *, int, uint16_t *); -static void aue_read_eeprom(struct aue_softc *, uint8_t *, uint16_t, - uint16_t); +static uint16_t aue_eeprom_getword(struct aue_softc *, int); static void aue_reset(struct aue_softc *); static void aue_reset_pegasus_II(struct aue_softc *); @@ -372,11 +370,10 @@ aue_csr_write_2(struct aue_softc *sc, ui /* * Read a word of data stored in the EEPROM at address 'addr.' */ -static void -aue_eeprom_getword(struct aue_softc *sc, int addr, uint16_t *dest) +static uint16_t +aue_eeprom_getword(struct aue_softc *sc, int addr) { int i; - uint16_t word = 0; aue_csr_write_1(sc, AUE_EE_REG, addr); aue_csr_write_1(sc, AUE_EE_CTL, AUE_EECTL_READ); @@ -391,22 +388,23 @@ aue_eeprom_getword(struct aue_softc *sc, if (i == AUE_TIMEOUT) device_printf(sc->sc_ue.ue_dev, "EEPROM read timed out\n"); - word = aue_csr_read_2(sc, AUE_EE_DATA); - *dest = word; + return (aue_csr_read_2(sc, AUE_EE_DATA)); } /* - * Read a sequence of words from the EEPROM. + * Read station address(offset 0) from the EEPROM. */ static void -aue_read_eeprom(struct aue_softc *sc, uint8_t *dest, - uint16_t off, uint16_t len) +aue_read_mac(struct aue_softc *sc, uint8_t *eaddr) { - uint16_t *ptr = (uint16_t *)dest; - int i; + int i, offset; + uint16_t word; - for (i = 0; i != len; i++, ptr++) - aue_eeprom_getword(sc, off + i, ptr); + for (i = 0, offset = 0; i < ETHER_ADDR_LEN / 2; i++) { + word = aue_eeprom_getword(sc, offset + i); + eaddr[i * 2] = (uint8_t)word; + eaddr[i * 2 + 1] = (uint8_t)(word >> 8); + } } static int @@ -632,7 +630,7 @@ aue_attach_post(struct usb_ether *ue) aue_reset(sc); /* get station address from the EEPROM */ - aue_read_eeprom(sc, ue->ue_eaddr, 0, 3); + aue_read_mac(sc, ue->ue_eaddr); } /* From owner-svn-src-stable@FreeBSD.ORG Tue Apr 22 04:35:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 751C171C; Tue, 22 Apr 2014 04:35:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4946D10CB; Tue, 22 Apr 2014 04:35:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3M4Z8OP018463; Tue, 22 Apr 2014 04:35:08 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3M4Z8YW018462; Tue, 22 Apr 2014 04:35:08 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201404220435.s3M4Z8YW018462@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 22 Apr 2014 04:35:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264747 - stable/10/sys/dev/nfe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Apr 2014 04:35:08 -0000 Author: yongari Date: Tue Apr 22 04:35:07 2014 New Revision: 264747 URL: http://svnweb.freebsd.org/changeset/base/264747 Log: MFC r264293: Add workaround for MCP61 Ethernet controller found on MSI K9 motherboard. PHY hardware used for the controller responded at all possible addresses which in turn resulted in having 32 PHYs for the controller. If driver detects "MSI K9N6PGM2-V2 (MS-7309)" motherboard, tell miibus(4) PHY is located at 0. Modified: stable/10/sys/dev/nfe/if_nfe.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/nfe/if_nfe.c ============================================================================== --- stable/10/sys/dev/nfe/if_nfe.c Tue Apr 22 04:31:07 2014 (r264746) +++ stable/10/sys/dev/nfe/if_nfe.c Tue Apr 22 04:35:07 2014 (r264747) @@ -78,6 +78,7 @@ static int nfe_suspend(device_t); static int nfe_resume(device_t); static int nfe_shutdown(device_t); static int nfe_can_use_msix(struct nfe_softc *); +static int nfe_detect_msik9(struct nfe_softc *); static void nfe_power(struct nfe_softc *); static int nfe_miibus_readreg(device_t, int, int); static int nfe_miibus_writereg(device_t, int, int, int); @@ -333,13 +334,38 @@ nfe_alloc_msix(struct nfe_softc *sc, int } } + +static int +nfe_detect_msik9(struct nfe_softc *sc) +{ + static const char *maker = "MSI"; + static const char *product = "K9N6PGM2-V2 (MS-7309)"; + char *m, *p; + int found; + + found = 0; + m = getenv("smbios.planar.maker"); + p = getenv("smbios.planar.product"); + if (m != NULL && p != NULL) { + if (strcmp(m, maker) == 0 && strcmp(p, product) == 0) + found = 1; + } + if (m != NULL) + freeenv(m); + if (p != NULL) + freeenv(p); + + return (found); +} + + static int nfe_attach(device_t dev) { struct nfe_softc *sc; struct ifnet *ifp; bus_addr_t dma_addr_max; - int error = 0, i, msic, reg, rid; + int error = 0, i, msic, phyloc, reg, rid; sc = device_get_softc(dev); sc->nfe_dev = dev; @@ -607,8 +633,16 @@ nfe_attach(device_t dev) #endif /* Do MII setup */ + phyloc = MII_PHY_ANY; + if (sc->nfe_devid == PCI_PRODUCT_NVIDIA_MCP61_LAN1 || + sc->nfe_devid == PCI_PRODUCT_NVIDIA_MCP61_LAN2 || + sc->nfe_devid == PCI_PRODUCT_NVIDIA_MCP61_LAN3 || + sc->nfe_devid == PCI_PRODUCT_NVIDIA_MCP61_LAN4) { + if (nfe_detect_msik9(sc) != 0) + phyloc = 0; + } error = mii_attach(dev, &sc->nfe_miibus, ifp, nfe_ifmedia_upd, - nfe_ifmedia_sts, BMSR_DEFCAPMASK, MII_PHY_ANY, MII_OFFSET_ANY, + nfe_ifmedia_sts, BMSR_DEFCAPMASK, phyloc, MII_OFFSET_ANY, MIIF_DOPAUSE); if (error != 0) { device_printf(dev, "attaching PHYs failed\n"); From owner-svn-src-stable@FreeBSD.ORG Tue Apr 22 04:36:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 36F4884C; Tue, 22 Apr 2014 04:36:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0945710D6; Tue, 22 Apr 2014 04:36:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3M4arKY018698; Tue, 22 Apr 2014 04:36:53 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3M4arhd018697; Tue, 22 Apr 2014 04:36:53 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201404220436.s3M4arhd018697@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 22 Apr 2014 04:36:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264748 - stable/9/sys/dev/nfe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Apr 2014 04:36:54 -0000 Author: yongari Date: Tue Apr 22 04:36:53 2014 New Revision: 264748 URL: http://svnweb.freebsd.org/changeset/base/264748 Log: MFC r264293: Add workaround for MCP61 Ethernet controller found on MSI K9 motherboard. PHY hardware used for the controller responded at all possible addresses which in turn resulted in having 32 PHYs for the controller. If driver detects "MSI K9N6PGM2-V2 (MS-7309)" motherboard, tell miibus(4) PHY is located at 0. Modified: stable/9/sys/dev/nfe/if_nfe.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/nfe/if_nfe.c ============================================================================== --- stable/9/sys/dev/nfe/if_nfe.c Tue Apr 22 04:35:07 2014 (r264747) +++ stable/9/sys/dev/nfe/if_nfe.c Tue Apr 22 04:36:53 2014 (r264748) @@ -78,6 +78,7 @@ static int nfe_suspend(device_t); static int nfe_resume(device_t); static int nfe_shutdown(device_t); static int nfe_can_use_msix(struct nfe_softc *); +static int nfe_detect_msik9(struct nfe_softc *); static void nfe_power(struct nfe_softc *); static int nfe_miibus_readreg(device_t, int, int); static int nfe_miibus_writereg(device_t, int, int, int); @@ -333,13 +334,38 @@ nfe_alloc_msix(struct nfe_softc *sc, int } } + +static int +nfe_detect_msik9(struct nfe_softc *sc) +{ + static const char *maker = "MSI"; + static const char *product = "K9N6PGM2-V2 (MS-7309)"; + char *m, *p; + int found; + + found = 0; + m = getenv("smbios.planar.maker"); + p = getenv("smbios.planar.product"); + if (m != NULL && p != NULL) { + if (strcmp(m, maker) == 0 && strcmp(p, product) == 0) + found = 1; + } + if (m != NULL) + freeenv(m); + if (p != NULL) + freeenv(p); + + return (found); +} + + static int nfe_attach(device_t dev) { struct nfe_softc *sc; struct ifnet *ifp; bus_addr_t dma_addr_max; - int error = 0, i, msic, reg, rid; + int error = 0, i, msic, phyloc, reg, rid; sc = device_get_softc(dev); sc->nfe_dev = dev; @@ -608,8 +634,16 @@ nfe_attach(device_t dev) #endif /* Do MII setup */ + phyloc = MII_PHY_ANY; + if (sc->nfe_devid == PCI_PRODUCT_NVIDIA_MCP61_LAN1 || + sc->nfe_devid == PCI_PRODUCT_NVIDIA_MCP61_LAN2 || + sc->nfe_devid == PCI_PRODUCT_NVIDIA_MCP61_LAN3 || + sc->nfe_devid == PCI_PRODUCT_NVIDIA_MCP61_LAN4) { + if (nfe_detect_msik9(sc) != 0) + phyloc = 0; + } error = mii_attach(dev, &sc->nfe_miibus, ifp, nfe_ifmedia_upd, - nfe_ifmedia_sts, BMSR_DEFCAPMASK, MII_PHY_ANY, MII_OFFSET_ANY, + nfe_ifmedia_sts, BMSR_DEFCAPMASK, phyloc, MII_OFFSET_ANY, MIIF_DOPAUSE); if (error != 0) { device_printf(dev, "attaching PHYs failed\n"); From owner-svn-src-stable@FreeBSD.ORG Tue Apr 22 13:02:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E982673C; Tue, 22 Apr 2014 13:02:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5D3E13AF; Tue, 22 Apr 2014 13:02:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3MD26kv031713; Tue, 22 Apr 2014 13:02:06 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3MD26Q2031711; Tue, 22 Apr 2014 13:02:06 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201404221302.s3MD26Q2031711@svn.freebsd.org> From: Marius Strobl Date: Tue, 22 Apr 2014 13:02:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264762 - in stable/9/sys/dev: puc uart X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Apr 2014 13:02:07 -0000 Author: marius Date: Tue Apr 22 13:02:06 2014 New Revision: 264762 URL: http://svnweb.freebsd.org/changeset/base/264762 Log: MFC: r264257, r264327, r264514 Distinguish between the different variants and configurations of Sunix {MIO,SER}5xxxx chips instead of treating all of them as PUC_PORT_2S. Among others, this fixes the hang seen when trying to probe the none- existent second UART on an actually 1-port chip. Obtained from: NetBSD (BAR layouts) Sponsored by: Bally Wulff Games & Entertainment GmbH Modified: stable/9/sys/dev/puc/pucdata.c stable/9/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/puc/ (props changed) Modified: stable/9/sys/dev/puc/pucdata.c ============================================================================== --- stable/9/sys/dev/puc/pucdata.c Tue Apr 22 13:02:03 2014 (r264761) +++ stable/9/sys/dev/puc/pucdata.c Tue Apr 22 13:02:06 2014 (r264762) @@ -58,6 +58,7 @@ static puc_config_f puc_config_oxford_pc static puc_config_f puc_config_quatech; static puc_config_f puc_config_syba; static puc_config_f puc_config_siig; +static puc_config_f puc_config_sunix; static puc_config_f puc_config_timedia; static puc_config_f puc_config_titan; @@ -986,12 +987,46 @@ const struct puc_cfg puc_pci_devices[] = .config_function = puc_config_syba }, - { 0x1fd4, 0x1999, 0xffff, 0, - "Sunix SER5437A", + { 0x1fd4, 0x1999, 0x1fd4, 0x0002, + "Sunix SER5xxxx 2-port serial", DEFAULT_RCLK * 8, PUC_PORT_2S, 0x10, 0, 8, }, + { 0x1fd4, 0x1999, 0x1fd4, 0x0004, + "Sunix SER5xxxx 4-port serial", + DEFAULT_RCLK * 8, + PUC_PORT_4S, 0x10, 0, 8, + }, + + { 0x1fd4, 0x1999, 0x1fd4, 0x0008, + "Sunix SER5xxxx 8-port serial", + DEFAULT_RCLK * 8, + PUC_PORT_8S, -1, -1, -1, + .config_function = puc_config_sunix + }, + + { 0x1fd4, 0x1999, 0x1fd4, 0x0101, + "Sunix MIO5xxxx 1-port serial and 1284 Printer port", + DEFAULT_RCLK * 8, + PUC_PORT_1S1P, -1, -1, -1, + .config_function = puc_config_sunix + }, + + { 0x1fd4, 0x1999, 0x1fd4, 0x0102, + "Sunix MIO5xxxx 2-port serial and 1284 Printer port", + DEFAULT_RCLK * 8, + PUC_PORT_2S1P, -1, -1, -1, + .config_function = puc_config_sunix + }, + + { 0x1fd4, 0x1999, 0x1fd4, 0x0104, + "Sunix MIO5xxxx 4-port serial and 1284 Printer port", + DEFAULT_RCLK * 8, + PUC_PORT_4S1P, -1, -1, -1, + .config_function = puc_config_sunix + }, + { 0x5372, 0x6873, 0xffff, 0, "Sun 1040 PCI Quad Serial", DEFAULT_RCLK, @@ -1023,8 +1058,8 @@ const struct puc_cfg puc_pci_devices[] = }, /* - * This is more specific than the generic NM9835 entry that follows, and - * is placed here to _prevent_ puc from claiming this single port card. + * This is more specific than the generic NM9835 entry, and is placed + * here to _prevent_ puc(4) from claiming this single port card. * * uart(4) will claim this device. */ @@ -1613,6 +1648,31 @@ puc_config_oxford_pcie(struct puc_softc } static int +puc_config_sunix(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port, + intptr_t *res) +{ + int error; + + switch (cmd) { + case PUC_CFG_GET_OFS: + error = puc_config(sc, PUC_CFG_GET_TYPE, port, res); + if (error != 0) + return (error); + *res = (*res == PUC_TYPE_SERIAL) ? (port & 3) * 8 : 0; + return (0); + case PUC_CFG_GET_RID: + error = puc_config(sc, PUC_CFG_GET_TYPE, port, res); + if (error != 0) + return (error); + *res = (*res == PUC_TYPE_SERIAL && port <= 3) ? 0x10 : 0x14; + return (0); + default: + break; + } + return (ENXIO); +} + +static int puc_config_titan(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port, intptr_t *res) { Modified: stable/9/sys/dev/uart/uart_bus_pci.c ============================================================================== --- stable/9/sys/dev/uart/uart_bus_pci.c Tue Apr 22 13:02:03 2014 (r264761) +++ stable/9/sys/dev/uart/uart_bus_pci.c Tue Apr 22 13:02:06 2014 (r264762) @@ -113,6 +113,8 @@ static const struct pci_id pci_ns8250_id 0x10, 16384000 }, { 0x14e4, 0x4344, 0xffff, 0, "Sony Ericsson GC89 PC Card", 0x10}, { 0x151f, 0x0000, 0xffff, 0, "TOPIC Semiconductor TP560 56k modem", 0x10 }, +{ 0x1fd4, 0x1999, 0x1fd4, 0x0001, "Sunix SER5xxxx Serial Port", 0x10, + 8 * DEFAULT_RCLK }, { 0x8086, 0x1c3d, 0xffff, 0, "Intel AMT - KT Controller", 0x10 }, { 0x8086, 0x1d3d, 0xffff, 0, "Intel C600/X79 Series Chipset KT Controller", 0x10 }, { 0x8086, 0x2e17, 0xffff, 0, "4 Series Chipset Serial KT Controller", 0x10 }, From owner-svn-src-stable@FreeBSD.ORG Tue Apr 22 13:02:04 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E700366A; Tue, 22 Apr 2014 13:02:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8AC3813AE; Tue, 22 Apr 2014 13:02:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3MD24SG031671; Tue, 22 Apr 2014 13:02:04 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3MD24Jr031668; Tue, 22 Apr 2014 13:02:04 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201404221302.s3MD24Jr031668@svn.freebsd.org> From: Marius Strobl Date: Tue, 22 Apr 2014 13:02:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264761 - in stable/10/sys/dev: puc uart X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Apr 2014 13:02:05 -0000 Author: marius Date: Tue Apr 22 13:02:03 2014 New Revision: 264761 URL: http://svnweb.freebsd.org/changeset/base/264761 Log: MFC: r264257, r264327, r264514 Distinguish between the different variants and configurations of Sunix {MIO,SER}5xxxx chips instead of treating all of them as PUC_PORT_2S. Among others, this fixes the hang seen when trying to probe the none- existent second UART on an actually 1-port chip. Obtained from: NetBSD (BAR layouts) Sponsored by: Bally Wulff Games & Entertainment GmbH Modified: stable/10/sys/dev/puc/pucdata.c stable/10/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/puc/pucdata.c ============================================================================== --- stable/10/sys/dev/puc/pucdata.c Tue Apr 22 11:08:33 2014 (r264760) +++ stable/10/sys/dev/puc/pucdata.c Tue Apr 22 13:02:03 2014 (r264761) @@ -58,6 +58,7 @@ static puc_config_f puc_config_oxford_pc static puc_config_f puc_config_quatech; static puc_config_f puc_config_syba; static puc_config_f puc_config_siig; +static puc_config_f puc_config_sunix; static puc_config_f puc_config_timedia; static puc_config_f puc_config_titan; @@ -986,12 +987,46 @@ const struct puc_cfg puc_pci_devices[] = .config_function = puc_config_syba }, - { 0x1fd4, 0x1999, 0xffff, 0, - "Sunix SER5437A", + { 0x1fd4, 0x1999, 0x1fd4, 0x0002, + "Sunix SER5xxxx 2-port serial", DEFAULT_RCLK * 8, PUC_PORT_2S, 0x10, 0, 8, }, + { 0x1fd4, 0x1999, 0x1fd4, 0x0004, + "Sunix SER5xxxx 4-port serial", + DEFAULT_RCLK * 8, + PUC_PORT_4S, 0x10, 0, 8, + }, + + { 0x1fd4, 0x1999, 0x1fd4, 0x0008, + "Sunix SER5xxxx 8-port serial", + DEFAULT_RCLK * 8, + PUC_PORT_8S, -1, -1, -1, + .config_function = puc_config_sunix + }, + + { 0x1fd4, 0x1999, 0x1fd4, 0x0101, + "Sunix MIO5xxxx 1-port serial and 1284 Printer port", + DEFAULT_RCLK * 8, + PUC_PORT_1S1P, -1, -1, -1, + .config_function = puc_config_sunix + }, + + { 0x1fd4, 0x1999, 0x1fd4, 0x0102, + "Sunix MIO5xxxx 2-port serial and 1284 Printer port", + DEFAULT_RCLK * 8, + PUC_PORT_2S1P, -1, -1, -1, + .config_function = puc_config_sunix + }, + + { 0x1fd4, 0x1999, 0x1fd4, 0x0104, + "Sunix MIO5xxxx 4-port serial and 1284 Printer port", + DEFAULT_RCLK * 8, + PUC_PORT_4S1P, -1, -1, -1, + .config_function = puc_config_sunix + }, + { 0x5372, 0x6873, 0xffff, 0, "Sun 1040 PCI Quad Serial", DEFAULT_RCLK, @@ -1023,8 +1058,8 @@ const struct puc_cfg puc_pci_devices[] = }, /* - * This is more specific than the generic NM9835 entry that follows, and - * is placed here to _prevent_ puc from claiming this single port card. + * This is more specific than the generic NM9835 entry, and is placed + * here to _prevent_ puc(4) from claiming this single port card. * * uart(4) will claim this device. */ @@ -1613,6 +1648,31 @@ puc_config_oxford_pcie(struct puc_softc } static int +puc_config_sunix(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port, + intptr_t *res) +{ + int error; + + switch (cmd) { + case PUC_CFG_GET_OFS: + error = puc_config(sc, PUC_CFG_GET_TYPE, port, res); + if (error != 0) + return (error); + *res = (*res == PUC_TYPE_SERIAL) ? (port & 3) * 8 : 0; + return (0); + case PUC_CFG_GET_RID: + error = puc_config(sc, PUC_CFG_GET_TYPE, port, res); + if (error != 0) + return (error); + *res = (*res == PUC_TYPE_SERIAL && port <= 3) ? 0x10 : 0x14; + return (0); + default: + break; + } + return (ENXIO); +} + +static int puc_config_titan(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port, intptr_t *res) { Modified: stable/10/sys/dev/uart/uart_bus_pci.c ============================================================================== --- stable/10/sys/dev/uart/uart_bus_pci.c Tue Apr 22 11:08:33 2014 (r264760) +++ stable/10/sys/dev/uart/uart_bus_pci.c Tue Apr 22 13:02:03 2014 (r264761) @@ -114,6 +114,8 @@ static const struct pci_id pci_ns8250_id 0x10, 16384000 }, { 0x14e4, 0x4344, 0xffff, 0, "Sony Ericsson GC89 PC Card", 0x10}, { 0x151f, 0x0000, 0xffff, 0, "TOPIC Semiconductor TP560 56k modem", 0x10 }, +{ 0x1fd4, 0x1999, 0x1fd4, 0x0001, "Sunix SER5xxxx Serial Port", 0x10, + 8 * DEFAULT_RCLK }, { 0x8086, 0x1c3d, 0xffff, 0, "Intel AMT - KT Controller", 0x10 }, { 0x8086, 0x1d3d, 0xffff, 0, "Intel C600/X79 Series Chipset KT Controller", 0x10 }, { 0x8086, 0x2e17, 0xffff, 0, "4 Series Chipset Serial KT Controller", 0x10 }, From owner-svn-src-stable@FreeBSD.ORG Tue Apr 22 13:02:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9945C877; Tue, 22 Apr 2014 13:02:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84FCB13B5; Tue, 22 Apr 2014 13:02:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3MD2DU7031767; Tue, 22 Apr 2014 13:02:13 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3MD2Dc0031765; Tue, 22 Apr 2014 13:02:13 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201404221302.s3MD2Dc0031765@svn.freebsd.org> From: Marius Strobl Date: Tue, 22 Apr 2014 13:02:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r264763 - in stable/8/sys/dev: puc uart X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Apr 2014 13:02:13 -0000 Author: marius Date: Tue Apr 22 13:02:12 2014 New Revision: 264763 URL: http://svnweb.freebsd.org/changeset/base/264763 Log: MFC: r229379 Add support for Intel EG20T serial ports MFC: r248340 Add support for Exar XR17V358 8-port serial device to puc(4) MFC: r248472 Correct the definition for Exar XR17V258IV: we must use a config_function to specify the offset into the PCI memory spare at which each serial port will find its registers. This was already done for other Exar PCI serial devices; it was accidentally omitted for this specific device. MFC: r251713 Fix whitespace and normalize some entries. MFC: r251715 All of Oxford/PLX OX16PCI954, OXm16PCI954 and OXu16PCI954 share the exact same (subsystem) device and vendor IDs. However, the reference design for the OXu16PCI954 uses a 14.7456 MHz clock (as does the EXSYS EX-41098-2 equipped with these), while at least the OX16PCI954 defaults to a 1.8432 MHz one. According to the datasheets of these chips, the only difference in PCI configuration space is that OXu16PCI954 have a revision ID of 1 while the other two are at 0. So employ the latter for determining the default clock rates of this family. MFC: r264257, r264327, r264514 Distinguish between the different variants and configurations of Sunix {MIO,SER}5xxxx chips instead of treating all of them as PUC_PORT_2S. Among others, this fixes the hang seen when trying to probe the none- existent second UART on an actually 1-port chip. Obtained from: NetBSD (BAR layouts) Sponsored by: Bally Wulff Games & Entertainment GmbH Modified: stable/8/sys/dev/puc/pucdata.c stable/8/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/puc/ (props changed) stable/8/sys/dev/uart/ (props changed) Modified: stable/8/sys/dev/puc/pucdata.c ============================================================================== --- stable/8/sys/dev/puc/pucdata.c Tue Apr 22 13:02:06 2014 (r264762) +++ stable/8/sys/dev/puc/pucdata.c Tue Apr 22 13:02:12 2014 (r264763) @@ -50,12 +50,15 @@ __FBSDID("$FreeBSD$"); static puc_config_f puc_config_amc; static puc_config_f puc_config_diva; static puc_config_f puc_config_exar; +static puc_config_f puc_config_exar_pcie; static puc_config_f puc_config_icbook; static puc_config_f puc_config_moxa; +static puc_config_f puc_config_oxford_pci954; static puc_config_f puc_config_oxford_pcie; static puc_config_f puc_config_quatech; static puc_config_f puc_config_syba; static puc_config_f puc_config_siig; +static puc_config_f puc_config_sunix; static puc_config_f puc_config_timedia; static puc_config_f puc_config_titan; @@ -511,14 +514,14 @@ const struct puc_cfg puc_pci_devices[] = "Moxa Technologies, Smartio CP-102E/PCIe", DEFAULT_RCLK * 8, PUC_PORT_2S, 0x14, 0, -1, - .config_function = puc_config_moxa + .config_function = puc_config_moxa }, { 0x1393, 0x1025, 0xffff, 0, "Moxa Technologies, Smartio CP-102EL/PCIe", DEFAULT_RCLK * 8, PUC_PORT_2S, 0x14, 0, -1, - .config_function = puc_config_moxa + .config_function = puc_config_moxa }, { 0x1393, 0x1040, 0xffff, 0, @@ -549,7 +552,7 @@ const struct puc_cfg puc_pci_devices[] = "Moxa Technologies, Smartio CP-104EL-A/PCIe", DEFAULT_RCLK * 8, PUC_PORT_4S, 0x14, 0, -1, - .config_function = puc_config_moxa + .config_function = puc_config_moxa }, { 0x1393, 0x1120, 0xffff, 0, @@ -568,14 +571,14 @@ const struct puc_cfg puc_pci_devices[] = "Moxa Technologies, Smartio CP-114EL/PCIe", DEFAULT_RCLK * 8, PUC_PORT_4S, 0x14, 0, -1, - .config_function = puc_config_moxa + .config_function = puc_config_moxa }, { 0x1393, 0x1182, 0xffff, 0, "Moxa Technologies, Smartio CP-118EL-A/PCIe", DEFAULT_RCLK * 8, PUC_PORT_8S, 0x14, 0, -1, - .config_function = puc_config_moxa + .config_function = puc_config_moxa }, { 0x1393, 0x1680, 0xffff, 0, @@ -600,7 +603,7 @@ const struct puc_cfg puc_pci_devices[] = "Moxa Technologies, Smartio CP-168EL-A/PCIe", DEFAULT_RCLK * 8, PUC_PORT_8S, 0x14, 0, -1, - .config_function = puc_config_moxa + .config_function = puc_config_moxa }, { 0x13a8, 0x0152, 0xffff, 0, @@ -628,6 +631,15 @@ const struct puc_cfg puc_pci_devices[] = "Exar XR17V258IV", DEFAULT_RCLK * 8, PUC_PORT_8S, 0x10, 0, -1, + .config_function = puc_config_exar + }, + + /* The XR17V358 uses the 125MHz PCIe clock as its reference clock. */ + { 0x13a8, 0x0358, 0xffff, 0, + "Exar XR17V358", + 125000000, + PUC_PORT_8S, 0x10, 0, -1, + .config_function = puc_config_exar_pcie }, { 0x13fe, 0x1600, 0x1602, 0x0002, @@ -701,10 +713,10 @@ const struct puc_cfg puc_pci_devices[] = * I/O Flex PCI I/O Card Model-223 with 4 serial and 1 parallel ports. */ { - 0x1415, 0x9501, 0x10fc ,0xc070, - "I-O DATA RSA-PCI2/R", - DEFAULT_RCLK * 8, - PUC_PORT_2S, 0x10, 0, 8, + 0x1415, 0x9501, 0x10fc, 0xc070, + "I-O DATA RSA-PCI2/R", + DEFAULT_RCLK * 8, + PUC_PORT_2S, 0x10, 0, 8, }, { 0x1415, 0x9501, 0x131f, 0x2050, @@ -733,8 +745,9 @@ const struct puc_cfg puc_pci_devices[] = { 0x1415, 0x9501, 0xffff, 0, "Oxford Semiconductor OX16PCI954 UARTs", - DEFAULT_RCLK, + 0, PUC_PORT_4S, 0x10, 0, 8, + .config_function = puc_config_oxford_pci954 }, { 0x1415, 0x950a, 0x131f, 0x2030, @@ -820,7 +833,7 @@ const struct puc_cfg puc_pci_devices[] = * * Lindy 51189 (4 port) * - * + * * StarTech.com PEX4S952 (4 port) and PEX8S952 (8 port) * */ @@ -974,16 +987,50 @@ const struct puc_cfg puc_pci_devices[] = .config_function = puc_config_syba }, - { 0x1fd4, 0x1999, 0xffff, 0, - "Sunix SER5437A", + { 0x1fd4, 0x1999, 0x1fd4, 0x0002, + "Sunix SER5xxxx 2-port serial", DEFAULT_RCLK * 8, PUC_PORT_2S, 0x10, 0, 8, }, - { 0x5372, 0x6873, 0xffff, 0, - "Sun 1040 PCI Quad Serial", - DEFAULT_RCLK, - PUC_PORT_4S, 0x10, 4, 0, + { 0x1fd4, 0x1999, 0x1fd4, 0x0004, + "Sunix SER5xxxx 4-port serial", + DEFAULT_RCLK * 8, + PUC_PORT_4S, 0x10, 0, 8, + }, + + { 0x1fd4, 0x1999, 0x1fd4, 0x0008, + "Sunix SER5xxxx 8-port serial", + DEFAULT_RCLK * 8, + PUC_PORT_8S, -1, -1, -1, + .config_function = puc_config_sunix + }, + + { 0x1fd4, 0x1999, 0x1fd4, 0x0101, + "Sunix MIO5xxxx 1-port serial and 1284 Printer port", + DEFAULT_RCLK * 8, + PUC_PORT_1S1P, -1, -1, -1, + .config_function = puc_config_sunix + }, + + { 0x1fd4, 0x1999, 0x1fd4, 0x0102, + "Sunix MIO5xxxx 2-port serial and 1284 Printer port", + DEFAULT_RCLK * 8, + PUC_PORT_2S1P, -1, -1, -1, + .config_function = puc_config_sunix + }, + + { 0x1fd4, 0x1999, 0x1fd4, 0x0104, + "Sunix MIO5xxxx 4-port serial and 1284 Printer port", + DEFAULT_RCLK * 8, + PUC_PORT_4S1P, -1, -1, -1, + .config_function = puc_config_sunix + }, + + { 0x5372, 0x6873, 0xffff, 0, + "Sun 1040 PCI Quad Serial", + DEFAULT_RCLK, + PUC_PORT_4S, 0x10, 4, 0, }, { 0x6666, 0x0001, 0xffff, 0, @@ -1005,14 +1052,14 @@ const struct puc_cfg puc_pci_devices[] = }, { 0x9710, 0x9815, 0xffff, 0, - "NetMos NM9815 Dual 1284 Printer port", + "NetMos NM9815 Dual 1284 Printer port", 0, PUC_PORT_2P, 0x10, 8, 0, - }, + }, /* - * This is more specific than the generic NM9835 entry that follows, and - * is placed here to _prevent_ puc from claiming this single port card. + * This is more specific than the generic NM9835 entry, and is placed + * here to _prevent_ puc(4) from claiming this single port card. * * uart(4) will claim this device. */ @@ -1186,6 +1233,17 @@ puc_config_exar(struct puc_softc *sc, en } static int +puc_config_exar_pcie(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port, + intptr_t *res) +{ + if (cmd == PUC_CFG_GET_OFS) { + *res = port * 0x400; + return (0); + } + return (ENXIO); +} + +static int puc_config_icbook(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port, intptr_t *res) { @@ -1423,19 +1481,19 @@ puc_config_timedia(struct puc_softc *sc, { static const uint16_t dual[] = { 0x0002, 0x4036, 0x4037, 0x4038, 0x4078, 0x4079, 0x4085, - 0x4088, 0x4089, 0x5037, 0x5078, 0x5079, 0x5085, 0x6079, - 0x7079, 0x8079, 0x8137, 0x8138, 0x8237, 0x8238, 0x9079, + 0x4088, 0x4089, 0x5037, 0x5078, 0x5079, 0x5085, 0x6079, + 0x7079, 0x8079, 0x8137, 0x8138, 0x8237, 0x8238, 0x9079, 0x9137, 0x9138, 0x9237, 0x9238, 0xA079, 0xB079, 0xC079, 0xD079, 0 }; static const uint16_t quad[] = { - 0x4055, 0x4056, 0x4095, 0x4096, 0x5056, 0x8156, 0x8157, - 0x8256, 0x8257, 0x9056, 0x9156, 0x9157, 0x9158, 0x9159, + 0x4055, 0x4056, 0x4095, 0x4096, 0x5056, 0x8156, 0x8157, + 0x8256, 0x8257, 0x9056, 0x9156, 0x9157, 0x9158, 0x9159, 0x9256, 0x9257, 0xA056, 0xA157, 0xA158, 0xA159, 0xB056, 0xB157, 0 }; static const uint16_t octa[] = { - 0x4065, 0x4066, 0x5065, 0x5066, 0x8166, 0x9066, 0x9166, + 0x4065, 0x4066, 0x5065, 0x5066, 0x8166, 0x9066, 0x9166, 0x9167, 0x9168, 0xA066, 0xA167, 0xA168, 0 }; static const struct { @@ -1495,6 +1553,28 @@ puc_config_timedia(struct puc_softc *sc, } static int +puc_config_oxford_pci954(struct puc_softc *sc, enum puc_cfg_cmd cmd, + int port __unused, intptr_t *res) +{ + + switch (cmd) { + case PUC_CFG_GET_CLOCK: + /* + * OXu16PCI954 use a 14.7456 MHz clock by default while + * OX16PCI954 and OXm16PCI954 employ a 1.8432 MHz one. + */ + if (pci_get_revid(sc->sc_dev) == 1) + *res = DEFAULT_RCLK * 8; + else + *res = DEFAULT_RCLK; + return (0); + default: + break; + } + return (ENXIO); +} + +static int puc_config_oxford_pcie(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port, intptr_t *res) { @@ -1568,6 +1648,31 @@ puc_config_oxford_pcie(struct puc_softc } static int +puc_config_sunix(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port, + intptr_t *res) +{ + int error; + + switch (cmd) { + case PUC_CFG_GET_OFS: + error = puc_config(sc, PUC_CFG_GET_TYPE, port, res); + if (error != 0) + return (error); + *res = (*res == PUC_TYPE_SERIAL) ? (port & 3) * 8 : 0; + return (0); + case PUC_CFG_GET_RID: + error = puc_config(sc, PUC_CFG_GET_TYPE, port, res); + if (error != 0) + return (error); + *res = (*res == PUC_TYPE_SERIAL && port <= 3) ? 0x10 : 0x14; + return (0); + default: + break; + } + return (ENXIO); +} + +static int puc_config_titan(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port, intptr_t *res) { Modified: stable/8/sys/dev/uart/uart_bus_pci.c ============================================================================== --- stable/8/sys/dev/uart/uart_bus_pci.c Tue Apr 22 13:02:06 2014 (r264762) +++ stable/8/sys/dev/uart/uart_bus_pci.c Tue Apr 22 13:02:12 2014 (r264763) @@ -113,11 +113,17 @@ static const struct pci_id pci_ns8250_id 0x10, 16384000 }, { 0x14e4, 0x4344, 0xffff, 0, "Sony Ericsson GC89 PC Card", 0x10}, { 0x151f, 0x0000, 0xffff, 0, "TOPIC Semiconductor TP560 56k modem", 0x10 }, +{ 0x1fd4, 0x1999, 0x1fd4, 0x0001, "Sunix SER5xxxx Serial Port", 0x10, + 8 * DEFAULT_RCLK }, { 0x8086, 0x1c3d, 0xffff, 0, "Intel AMT - KT Controller", 0x10 }, { 0x8086, 0x1d3d, 0xffff, 0, "Intel C600/X79 Series Chipset KT Controller", 0x10 }, { 0x8086, 0x2e17, 0xffff, 0, "4 Series Chipset Serial KT Controller", 0x10 }, { 0x8086, 0x3b67, 0xffff, 0, "5 Series/3400 Series Chipset KT Controller", 0x10 }, +{ 0x8086, 0x8811, 0xffff, 0, "Intel EG20T Serial Port 0", 0x10 }, +{ 0x8086, 0x8812, 0xffff, 0, "Intel EG20T Serial Port 1", 0x10 }, +{ 0x8086, 0x8813, 0xffff, 0, "Intel EG20T Serial Port 2", 0x10 }, +{ 0x8086, 0x8814, 0xffff, 0, "Intel EG20T Serial Port 3", 0x10 }, { 0x9710, 0x9820, 0x1000, 1, "NetMos NM9820 Serial Port", 0x10 }, { 0x9710, 0x9835, 0x1000, 1, "NetMos NM9835 Serial Port", 0x10 }, { 0x9710, 0x9865, 0xa000, 0x1000, "NetMos NM9865 Serial Port", 0x10 }, From owner-svn-src-stable@FreeBSD.ORG Tue Apr 22 13:58:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 44F4B9A6; Tue, 22 Apr 2014 13:58:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2529E1908; Tue, 22 Apr 2014 13:58:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3MDweq8053286; Tue, 22 Apr 2014 13:58:40 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3MDwd7c053284; Tue, 22 Apr 2014 13:58:39 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201404221358.s3MDwd7c053284@svn.freebsd.org> From: Marius Strobl Date: Tue, 22 Apr 2014 13:58:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r264764 - stable/8/sys/dev/usb/controller X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Apr 2014 13:58:40 -0000 Author: marius Date: Tue Apr 22 13:58:39 2014 New Revision: 264764 URL: http://svnweb.freebsd.org/changeset/base/264764 Log: MFC: r249336 Add ID for ASMedia ASM1042 USB 3.0 controller. MFC: r253094 Use MSI for xhci(4), if supported. MFC: r253398 Add a tunable to force disable MSI use for xhci(4). Modified: stable/8/sys/dev/usb/controller/xhci.h stable/8/sys/dev/usb/controller/xhci_pci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/controller/xhci.h ============================================================================== --- stable/8/sys/dev/usb/controller/xhci.h Tue Apr 22 13:02:12 2014 (r264763) +++ stable/8/sys/dev/usb/controller/xhci.h Tue Apr 22 13:58:39 2014 (r264764) @@ -441,6 +441,7 @@ struct xhci_softc { struct usb_device *sc_devices[XHCI_MAX_DEVICES]; struct resource *sc_io_res; + int sc_irq_rid; struct resource *sc_irq_res; void *sc_intr_hdl; Modified: stable/8/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/8/sys/dev/usb/controller/xhci_pci.c Tue Apr 22 13:02:12 2014 (r264763) +++ stable/8/sys/dev/usb/controller/xhci_pci.c Tue Apr 22 13:58:39 2014 (r264764) @@ -99,6 +99,9 @@ xhci_pci_match(device_t self) case 0x01941033: return ("NEC uPD720200 USB 3.0 controller"); + case 0x10421b21: + return ("ASMedia ASM1042 USB 3.0 controller"); + case 0x9c318086: case 0x1e318086: return ("Intel Panther Point USB 3.0 controller"); @@ -130,6 +133,9 @@ xhci_pci_probe(device_t self) } } +static int xhci_use_msi = 1; +TUNABLE_INT("hw.usb.xhci.msi", &xhci_use_msi); + static int xhci_pci_port_route(device_t self, uint32_t set, uint32_t clear) { @@ -153,8 +159,7 @@ static int xhci_pci_attach(device_t self) { struct xhci_softc *sc = device_get_softc(self); - int err; - int rid; + int count, err, rid; /* XXX check for 64-bit capability */ @@ -176,9 +181,20 @@ xhci_pci_attach(device_t self) sc->sc_io_hdl = rman_get_bushandle(sc->sc_io_res); sc->sc_io_size = rman_get_size(sc->sc_io_res); - rid = 0; - sc->sc_irq_res = bus_alloc_resource_any(self, SYS_RES_IRQ, &rid, - RF_SHAREABLE | RF_ACTIVE); + sc->sc_irq_rid = 0; + if (xhci_use_msi) { + count = pci_msi_count(self); + if (count >= 1) { + count = 1; + if (pci_alloc_msi(self, &count) == 0) { + if (bootverbose) + device_printf(self, "MSI enabled\n"); + sc->sc_irq_rid = 1; + } + } + } + sc->sc_irq_res = bus_alloc_resource_any(self, SYS_RES_IRQ, + &sc->sc_irq_rid, RF_SHAREABLE | RF_ACTIVE); if (sc->sc_irq_res == NULL) { device_printf(self, "Could not allocate IRQ\n"); goto error; @@ -260,7 +276,10 @@ xhci_pci_detach(device_t self) sc->sc_intr_hdl = NULL; } if (sc->sc_irq_res) { - bus_release_resource(self, SYS_RES_IRQ, 0, sc->sc_irq_res); + if (sc->sc_irq_rid == 1) + pci_release_msi(self); + bus_release_resource(self, SYS_RES_IRQ, sc->sc_irq_rid, + sc->sc_irq_res); sc->sc_irq_res = NULL; } if (sc->sc_io_res) { From owner-svn-src-stable@FreeBSD.ORG Tue Apr 22 16:04:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1B18DC62; Tue, 22 Apr 2014 16:04:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07349187E; Tue, 22 Apr 2014 16:04:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3MG4VcA007607; Tue, 22 Apr 2014 16:04:31 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3MG4V1R007606; Tue, 22 Apr 2014 16:04:31 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201404221604.s3MG4V1R007606@svn.freebsd.org> From: Marius Strobl Date: Tue, 22 Apr 2014 16:04:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r264767 - stable/8/sys/conf X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Apr 2014 16:04:32 -0000 Author: marius Date: Tue Apr 22 16:04:31 2014 New Revision: 264767 URL: http://svnweb.freebsd.org/changeset/base/264767 Log: MFC: r216746 Make it possible to specify WITHOUT_MODULES in a kernel config file. Modified: stable/8/sys/conf/kern.pre.mk Directory Properties: stable/8/sys/ (props changed) stable/8/sys/conf/ (props changed) Modified: stable/8/sys/conf/kern.pre.mk ============================================================================== --- stable/8/sys/conf/kern.pre.mk Tue Apr 22 15:17:32 2014 (r264766) +++ stable/8/sys/conf/kern.pre.mk Tue Apr 22 16:04:31 2014 (r264767) @@ -167,6 +167,9 @@ MKMODULESENV+= ALL_MODULES=LINT .if defined(MODULES_OVERRIDE) MKMODULESENV+= MODULES_OVERRIDE="${MODULES_OVERRIDE}" .endif +.if defined(WITHOUT_MODULES) +MKMODULESENV+= WITHOUT_MODULES="${WITHOUT_MODULES}" +.endif .if defined(DEBUG) MKMODULESENV+= DEBUG_FLAGS="${DEBUG}" .endif From owner-svn-src-stable@FreeBSD.ORG Tue Apr 22 20:51:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 22C9FE7D; Tue, 22 Apr 2014 20:51:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E2111ACB; Tue, 22 Apr 2014 20:51:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3MKp72b025746; Tue, 22 Apr 2014 20:51:07 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3MKp7qQ025745; Tue, 22 Apr 2014 20:51:07 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404222051.s3MKp7qQ025745@svn.freebsd.org> From: Christian Brueffer Date: Tue, 22 Apr 2014 20:51:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264775 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Apr 2014 20:51:08 -0000 Author: brueffer Date: Tue Apr 22 20:51:07 2014 New Revision: 264775 URL: http://svnweb.freebsd.org/changeset/base/264775 Log: MFC: r264384, r264415 mdoc and language improvements. Modified: stable/10/share/man/man4/timecounters.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/timecounters.4 ============================================================================== --- stable/10/share/man/man4/timecounters.4 Tue Apr 22 20:37:07 2014 (r264774) +++ stable/10/share/man/man4/timecounters.4 Tue Apr 22 20:51:07 2014 (r264775) @@ -24,27 +24,27 @@ .\" .\" $FreeBSD$ .\" -.Dd December 20, 2011 +.Dd April 12, 2014 .Dt TIMECOUNTERS 4 .Os .Sh NAME .Nm timecounters .Nd kernel time counters subsystem .Sh SYNOPSIS -Kernel uses several types of time-related devices, such as: real time clocks, +The kernel uses several types of time-related devices, such as: real time clocks, time counters and event timers. -Real time clocks responsible for tracking real world time, mostly when system +Real time clocks are responsible for tracking real world time, mostly when the system is down. -Time counters are responsible for tracking purposes, when system is running. -Event timers are responsible for generating interrupts at specified time or +Time counters are responsible for tracking purposes, when the system is running. +Event timers are responsible for generating interrupts at a specified time or periodically, to run different time-based events. This page is about the second. .Sh DESCRIPTION -Time counters are the lowest level of time tracking in kernel. +Time counters are the lowest level of time tracking in the kernel. They provide monotonically increasing timestamps with known width and update frequency. -They can overflow, drift, etc and so in raw form used only in very limited -performance-critical places like process scheduler. +They can overflow, drift, etc and so in raw form can be used only in very limited +performance-critical places like the process scheduler. .Pp More usable time is created by scaling the values read from the selected time counter and combining it with some offset, regularly updated by @@ -54,13 +54,14 @@ on invocation. .Pp Different platforms provide different kinds of timer hardware. -The goal of the time counters subsystem is to provide unified way to access +The goal of the time counters subsystem is to provide a unified way to access that hardware. .Pp -Each driver implementing time counters, registers them at the subsystem. -It is possible to see the list of present time counters, like this, via +Each driver implementing time counters registers them with the subsystem. +It is possible to see the list of present time counters, via the .Va kern.timecounter -sysctl: +.Xr sysctl 8 +variable: .Bd -literal kern.timecounter.choice: TSC-low(-100) HPET(950) i8254(0) ACPI-fast(900) dummy(-1000000) kern.timecounter.tc.ACPI-fast.mask: 16777215 @@ -81,7 +82,7 @@ kern.timecounter.tc.TSC-low.frequency: 1 kern.timecounter.tc.TSC-low.quality: -100 .Ed .Pp -where: +The output nodes are defined as follows: .Bl -inset .It Va kern.timecounter.tc. Ns Ar X Ns Va .mask is a bitmask, defining valid counter bits, @@ -90,13 +91,13 @@ is a present counter value, .It Va kern.timecounter.tc. Ns Ar X Ns Va .frequency is a counter update frequency, .It Va kern.timecounter.tc. Ns Ar X Ns Va .quality -is an integral value, defining how good is this time counter, -comparing to others. -Negative value means that this time counter is broken and should not be used. +is an integral value, defining the quality of this time counter +compared to others. +A negative value means this time counter is broken and should not be used. .El .Pp -Time management code of the kernel chooses one time counter from that list. -Current choice can be read and affected via +The time management code of the kernel chooses one time counter from that list. +The current choice can be read and affected via the .Va kern.timecounter.hardware tunable/sysctl. .Sh SEE ALSO From owner-svn-src-stable@FreeBSD.ORG Tue Apr 22 20:53:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1FD64FE0; Tue, 22 Apr 2014 20:53:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B4491AF4; Tue, 22 Apr 2014 20:53:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3MKr5Pn028174; Tue, 22 Apr 2014 20:53:05 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3MKr5ex028173; Tue, 22 Apr 2014 20:53:05 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404222053.s3MKr5ex028173@svn.freebsd.org> From: Christian Brueffer Date: Tue, 22 Apr 2014 20:53:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264776 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Apr 2014 20:53:06 -0000 Author: brueffer Date: Tue Apr 22 20:53:05 2014 New Revision: 264776 URL: http://svnweb.freebsd.org/changeset/base/264776 Log: MFC: r264384, r264415 mdoc and language improvements. Modified: stable/9/share/man/man4/timecounters.4 Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/timecounters.4 ============================================================================== --- stable/9/share/man/man4/timecounters.4 Tue Apr 22 20:51:07 2014 (r264775) +++ stable/9/share/man/man4/timecounters.4 Tue Apr 22 20:53:05 2014 (r264776) @@ -24,27 +24,27 @@ .\" .\" $FreeBSD$ .\" -.Dd December 20, 2011 +.Dd April 12, 2014 .Dt TIMECOUNTERS 4 .Os .Sh NAME .Nm timecounters .Nd kernel time counters subsystem .Sh SYNOPSIS -Kernel uses several types of time-related devices, such as: real time clocks, +The kernel uses several types of time-related devices, such as: real time clocks, time counters and event timers. -Real time clocks responsible for tracking real world time, mostly when system +Real time clocks are responsible for tracking real world time, mostly when the system is down. -Time counters are responsible for tracking purposes, when system is running. -Event timers are responsible for generating interrupts at specified time or +Time counters are responsible for tracking purposes, when the system is running. +Event timers are responsible for generating interrupts at a specified time or periodically, to run different time-based events. This page is about the second. .Sh DESCRIPTION -Time counters are the lowest level of time tracking in kernel. +Time counters are the lowest level of time tracking in the kernel. They provide monotonically increasing timestamps with known width and update frequency. -They can overflow, drift, etc and so in raw form used only in very limited -performance-critical places like process scheduler. +They can overflow, drift, etc and so in raw form can be used only in very limited +performance-critical places like the process scheduler. .Pp More usable time is created by scaling the values read from the selected time counter and combining it with some offset, regularly updated by @@ -54,13 +54,14 @@ on invocation. .Pp Different platforms provide different kinds of timer hardware. -The goal of the time counters subsystem is to provide unified way to access +The goal of the time counters subsystem is to provide a unified way to access that hardware. .Pp -Each driver implementing time counters, registers them at the subsystem. -It is possible to see the list of present time counters, like this, via +Each driver implementing time counters registers them with the subsystem. +It is possible to see the list of present time counters, via the .Va kern.timecounter -sysctl: +.Xr sysctl 8 +variable: .Bd -literal kern.timecounter.choice: TSC-low(-100) HPET(950) i8254(0) ACPI-fast(900) dummy(-1000000) kern.timecounter.tc.ACPI-fast.mask: 16777215 @@ -81,7 +82,7 @@ kern.timecounter.tc.TSC-low.frequency: 1 kern.timecounter.tc.TSC-low.quality: -100 .Ed .Pp -where: +The output nodes are defined as follows: .Bl -inset .It Va kern.timecounter.tc. Ns Ar X Ns Va .mask is a bitmask, defining valid counter bits, @@ -90,13 +91,13 @@ is a present counter value, .It Va kern.timecounter.tc. Ns Ar X Ns Va .frequency is a counter update frequency, .It Va kern.timecounter.tc. Ns Ar X Ns Va .quality -is an integral value, defining how good is this time counter, -comparing to others. -Negative value means that this time counter is broken and should not be used. +is an integral value, defining the quality of this time counter +compared to others. +A negative value means this time counter is broken and should not be used. .El .Pp -Time management code of the kernel chooses one time counter from that list. -Current choice can be read and affected via +The time management code of the kernel chooses one time counter from that list. +The current choice can be read and affected via the .Va kern.timecounter.hardware tunable/sysctl. .Sh SEE ALSO From owner-svn-src-stable@FreeBSD.ORG Tue Apr 22 20:55:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9D0C1CA; Tue, 22 Apr 2014 20:55:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B45D1B0E; Tue, 22 Apr 2014 20:55:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3MKtlgs028578; Tue, 22 Apr 2014 20:55:47 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3MKtlBM028577; Tue, 22 Apr 2014 20:55:47 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404222055.s3MKtlBM028577@svn.freebsd.org> From: Christian Brueffer Date: Tue, 22 Apr 2014 20:55:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264777 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Apr 2014 20:55:47 -0000 Author: brueffer Date: Tue Apr 22 20:55:46 2014 New Revision: 264777 URL: http://svnweb.freebsd.org/changeset/base/264777 Log: MFC: r264386 Improve markup and remove contractions. Modified: stable/10/share/man/man4/usb_quirk.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/usb_quirk.4 ============================================================================== --- stable/10/share/man/man4/usb_quirk.4 Tue Apr 22 20:53:05 2014 (r264776) +++ stable/10/share/man/man4/usb_quirk.4 Tue Apr 22 20:55:46 2014 (r264777) @@ -49,13 +49,13 @@ swap left and right channels .It UQ_AU_INP_ASYNC input is async despite claim of adaptive .It UQ_AU_NO_FRAC -don't adjust for fractional samples +do not adjust for fractional samples .It UQ_AU_NO_XU audio device has broken extension unit .It UQ_BAD_ADC bad audio spec version number .It UQ_BAD_AUDIO -device claims audio class, but isn't +device claims audio class, but is not .It UQ_BROKEN_BIDIR printer has broken bidir mode .It UQ_BUS_POWERED @@ -69,7 +69,7 @@ device should set the boot protocol .It UQ_UMS_IGNORE device should be ignored by ums class .It UQ_MS_BAD_CLASS -doesn't identify properly +does not identify properly .It UQ_MS_LEADING_BYTE mouse sends an unknown leading byte .It UQ_MS_REVZ @@ -150,27 +150,28 @@ ejects after Huawei USB command ejects after Sierra USB command .It UQ_MSC_EJECT_SCSIEJECT ejects after SCSI eject command -0x1b0000000200 +.Dv 0x1b0000000200 .It UQ_MSC_EJECT_REZERO ejects after SCSI rezero command -0x010000000000 +.Dv 0x010000000000 .It UQ_MSC_EJECT_ZTESTOR ejects after ZTE SCSI command -0x850101011801010101010000 +.Dv 0x850101011801010101010000 .It UQ_MSC_EJECT_CMOTECH ejects after C-motech SCSI command -0xff52444556434847 +.Dv 0xff52444556434847 .It UQ_MSC_EJECT_WAIT wait for the device to eject .It UQ_MSC_EJECT_SAEL_M460 ejects after Sael USB commands .It UQ_MSC_EJECT_HUAWEISCSI ejects after Huawei SCSI command -0x11060000000000000000000000000000 +.Dv 0x11060000000000000000000000000000 .It UQ_MSC_EJECT_TCT ejects after TCT SCSI command -0x06f504025270 +.Dv 0x06f504025270 .El +.Pp See .Pa /sys/dev/usb/quirk/usb_quirk.h for the complete list of supported quirks. From owner-svn-src-stable@FreeBSD.ORG Tue Apr 22 20:57:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5ADB1307; Tue, 22 Apr 2014 20:57:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2CAD21B1D; Tue, 22 Apr 2014 20:57:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3MKvOKJ028801; Tue, 22 Apr 2014 20:57:24 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3MKvOKq028800; Tue, 22 Apr 2014 20:57:24 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404222057.s3MKvOKq028800@svn.freebsd.org> From: Christian Brueffer Date: Tue, 22 Apr 2014 20:57:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264778 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Apr 2014 20:57:24 -0000 Author: brueffer Date: Tue Apr 22 20:57:23 2014 New Revision: 264778 URL: http://svnweb.freebsd.org/changeset/base/264778 Log: MFC: r264386 Improve markup and remove contractions. Modified: stable/9/share/man/man4/usb_quirk.4 Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/usb_quirk.4 ============================================================================== --- stable/9/share/man/man4/usb_quirk.4 Tue Apr 22 20:55:46 2014 (r264777) +++ stable/9/share/man/man4/usb_quirk.4 Tue Apr 22 20:57:23 2014 (r264778) @@ -49,13 +49,13 @@ swap left and right channels .It UQ_AU_INP_ASYNC input is async despite claim of adaptive .It UQ_AU_NO_FRAC -don't adjust for fractional samples +do not adjust for fractional samples .It UQ_AU_NO_XU audio device has broken extension unit .It UQ_BAD_ADC bad audio spec version number .It UQ_BAD_AUDIO -device claims audio class, but isn't +device claims audio class, but is not .It UQ_BROKEN_BIDIR printer has broken bidir mode .It UQ_BUS_POWERED @@ -67,7 +67,7 @@ device should be ignored by kbd class .It UQ_KBD_BOOTPROTO device should set the boot protocol .It UQ_MS_BAD_CLASS -doesn't identify properly +does not identify properly .It UQ_MS_LEADING_BYTE mouse sends an unknown leading byte .It UQ_MS_REVZ @@ -150,27 +150,28 @@ ejects after Huawei USB command ejects after Sierra USB command .It UQ_MSC_EJECT_SCSIEJECT ejects after SCSI eject command -0x1b0000000200 +.Dv 0x1b0000000200 .It UQ_MSC_EJECT_REZERO ejects after SCSI rezero command -0x010000000000 +.Dv 0x010000000000 .It UQ_MSC_EJECT_ZTESTOR ejects after ZTE SCSI command -0x850101011801010101010000 +.Dv 0x850101011801010101010000 .It UQ_MSC_EJECT_CMOTECH ejects after C-motech SCSI command -0xff52444556434847 +.Dv 0xff52444556434847 .It UQ_MSC_EJECT_WAIT wait for the device to eject .It UQ_MSC_EJECT_SAEL_M460 ejects after Sael USB commands .It UQ_MSC_EJECT_HUAWEISCSI ejects after Huawei SCSI command -0x11060000000000000000000000000000 +.Dv 0x11060000000000000000000000000000 .It UQ_MSC_EJECT_TCT ejects after TCT SCSI command -0x06f504025270 +.Dv 0x06f504025270 .El +.Pp See .Pa /sys/dev/usb/quirk/usb_quirk.h for the complete list of supported quirks. From owner-svn-src-stable@FreeBSD.ORG Tue Apr 22 21:02:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8992E582; Tue, 22 Apr 2014 21:02:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 765591BE9; Tue, 22 Apr 2014 21:02:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3ML23n4032529; Tue, 22 Apr 2014 21:02:03 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3ML23MG032528; Tue, 22 Apr 2014 21:02:03 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404222102.s3ML23MG032528@svn.freebsd.org> From: Christian Brueffer Date: Tue, 22 Apr 2014 21:02:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264779 - stable/10/sys/dev/iwn X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Apr 2014 21:02:03 -0000 Author: brueffer Date: Tue Apr 22 21:02:02 2014 New Revision: 264779 URL: http://svnweb.freebsd.org/changeset/base/264779 Log: MFC: r264416 Add a missing comma between error message definitions. CID: 1199266 Found with: Coverity Prevent(tm) MFC after: 1 week Modified: stable/10/sys/dev/iwn/if_iwnreg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iwn/if_iwnreg.h ============================================================================== --- stable/10/sys/dev/iwn/if_iwnreg.h Tue Apr 22 20:57:23 2014 (r264778) +++ stable/10/sys/dev/iwn/if_iwnreg.h Tue Apr 22 21:02:02 2014 (r264779) @@ -2019,7 +2019,7 @@ static const char * const iwn_fw_errmsg[ "NMI_INTERRUPT_DATA_ACTION_PT", "NMI_TRM_HW_ER", "NMI_INTERRUPT_TRM", - "NMI_INTERRUPT_BREAKPOINT" + "NMI_INTERRUPT_BREAKPOINT", "DEBUG_0", "DEBUG_1", "DEBUG_2", From owner-svn-src-stable@FreeBSD.ORG Tue Apr 22 21:05:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2572E6F3; Tue, 22 Apr 2014 21:05:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C4121C0A; Tue, 22 Apr 2014 21:05:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3ML5BsJ032899; Tue, 22 Apr 2014 21:05:11 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3ML5Bts032898; Tue, 22 Apr 2014 21:05:11 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404222105.s3ML5Bts032898@svn.freebsd.org> From: Christian Brueffer Date: Tue, 22 Apr 2014 21:05:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264780 - stable/9/sys/dev/iwn X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Apr 2014 21:05:12 -0000 Author: brueffer Date: Tue Apr 22 21:05:11 2014 New Revision: 264780 URL: http://svnweb.freebsd.org/changeset/base/264780 Log: MFC: r264416 Add a missing comma between error message definitions. CID: 1199266 Found with: Coverity Prevent(tm) Modified: stable/9/sys/dev/iwn/if_iwnreg.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/iwn/if_iwnreg.h ============================================================================== --- stable/9/sys/dev/iwn/if_iwnreg.h Tue Apr 22 21:02:02 2014 (r264779) +++ stable/9/sys/dev/iwn/if_iwnreg.h Tue Apr 22 21:05:11 2014 (r264780) @@ -1772,7 +1772,7 @@ static const char * const iwn_fw_errmsg[ "NMI_INTERRUPT_DATA_ACTION_PT", "NMI_TRM_HW_ER", "NMI_INTERRUPT_TRM", - "NMI_INTERRUPT_BREAKPOINT" + "NMI_INTERRUPT_BREAKPOINT", "DEBUG_0", "DEBUG_1", "DEBUG_2", From owner-svn-src-stable@FreeBSD.ORG Tue Apr 22 21:13:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C8E75B69; Tue, 22 Apr 2014 21:13:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B57F11CFF; Tue, 22 Apr 2014 21:13:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3MLDPAw036835; Tue, 22 Apr 2014 21:13:25 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3MLDPCE036834; Tue, 22 Apr 2014 21:13:25 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404222113.s3MLDPCE036834@svn.freebsd.org> From: Christian Brueffer Date: Tue, 22 Apr 2014 21:13:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264782 - stable/10/usr.bin/find X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Apr 2014 21:13:25 -0000 Author: brueffer Date: Tue Apr 22 21:13:25 2014 New Revision: 264782 URL: http://svnweb.freebsd.org/changeset/base/264782 Log: MFC: r264418 Avoid double free in f_acl(). CID: 1018508 Found with: Coverity Prevent(tm) Modified: stable/10/usr.bin/find/function.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/find/function.c ============================================================================== --- stable/10/usr.bin/find/function.c Tue Apr 22 21:07:56 2014 (r264781) +++ stable/10/usr.bin/find/function.c Tue Apr 22 21:13:25 2014 (r264782) @@ -404,7 +404,6 @@ f_acl(PLAN *plan __unused, FTSENT *entry acl_free(facl); if (ret) { warn("%s", entry->fts_accpath); - acl_free(facl); return (0); } if (trivial) From owner-svn-src-stable@FreeBSD.ORG Tue Apr 22 21:14:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0AD17CB2; Tue, 22 Apr 2014 21:14:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EAA331D12; Tue, 22 Apr 2014 21:14:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3MLEoCw037028; Tue, 22 Apr 2014 21:14:50 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3MLEoIq037027; Tue, 22 Apr 2014 21:14:50 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404222114.s3MLEoIq037027@svn.freebsd.org> From: Christian Brueffer Date: Tue, 22 Apr 2014 21:14:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264783 - stable/9/usr.bin/find X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Apr 2014 21:14:51 -0000 Author: brueffer Date: Tue Apr 22 21:14:50 2014 New Revision: 264783 URL: http://svnweb.freebsd.org/changeset/base/264783 Log: MFC: r264418 Avoid double free in f_acl(). CID: 1018508 Found with: Coverity Prevent(tm) Modified: stable/9/usr.bin/find/function.c Directory Properties: stable/9/usr.bin/find/ (props changed) Modified: stable/9/usr.bin/find/function.c ============================================================================== --- stable/9/usr.bin/find/function.c Tue Apr 22 21:13:25 2014 (r264782) +++ stable/9/usr.bin/find/function.c Tue Apr 22 21:14:50 2014 (r264783) @@ -404,7 +404,6 @@ f_acl(PLAN *plan __unused, FTSENT *entry acl_free(facl); if (ret) { warn("%s", entry->fts_accpath); - acl_free(facl); return (0); } if (trivial) From owner-svn-src-stable@FreeBSD.ORG Tue Apr 22 21:17:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D8FB8E2B; Tue, 22 Apr 2014 21:17:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C51F21D3A; Tue, 22 Apr 2014 21:17:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3MLHCeX037370; Tue, 22 Apr 2014 21:17:12 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3MLHCPE037369; Tue, 22 Apr 2014 21:17:12 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404222117.s3MLHCPE037369@svn.freebsd.org> From: Christian Brueffer Date: Tue, 22 Apr 2014 21:17:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r264784 - stable/8/usr.bin/find X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Apr 2014 21:17:12 -0000 Author: brueffer Date: Tue Apr 22 21:17:12 2014 New Revision: 264784 URL: http://svnweb.freebsd.org/changeset/base/264784 Log: MFC: r264418 Avoid double free in f_acl(). CID: 1018508 Found with: Coverity Prevent(tm) Modified: stable/8/usr.bin/find/function.c Directory Properties: stable/8/usr.bin/find/ (props changed) Modified: stable/8/usr.bin/find/function.c ============================================================================== --- stable/8/usr.bin/find/function.c Tue Apr 22 21:14:50 2014 (r264783) +++ stable/8/usr.bin/find/function.c Tue Apr 22 21:17:12 2014 (r264784) @@ -407,7 +407,6 @@ f_acl(PLAN *plan __unused, FTSENT *entry acl_free(facl); if (ret) { warn("%s", entry->fts_accpath); - acl_free(facl); return (0); } if (trivial) From owner-svn-src-stable@FreeBSD.ORG Tue Apr 22 21:25:04 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1925D123; Tue, 22 Apr 2014 21:25:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 056FE1E53; Tue, 22 Apr 2014 21:25:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3MLP3wE041244; Tue, 22 Apr 2014 21:25:03 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3MLP30i041243; Tue, 22 Apr 2014 21:25:03 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404222125.s3MLP30i041243@svn.freebsd.org> From: Christian Brueffer Date: Tue, 22 Apr 2014 21:25:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264785 - stable/10/usr.bin/ldd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Apr 2014 21:25:04 -0000 Author: brueffer Date: Tue Apr 22 21:25:03 2014 New Revision: 264785 URL: http://svnweb.freebsd.org/changeset/base/264785 Log: MFC: r264419 Avoid double close() of a file descriptor. CID: 1006089 Found with: Coverity Prevent(tm) Modified: stable/10/usr.bin/ldd/sods.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/ldd/sods.c ============================================================================== --- stable/10/usr.bin/ldd/sods.c Tue Apr 22 21:17:12 2014 (r264784) +++ stable/10/usr.bin/ldd/sods.c Tue Apr 22 21:25:03 2014 (r264785) @@ -204,7 +204,6 @@ dump_file(const char *fname) warnx("%s: this is an ELF program; use objdump to examine", fname); ++error_count; munmap(objbase, sb.st_size); - close(fd); return; } From owner-svn-src-stable@FreeBSD.ORG Tue Apr 22 21:26:23 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A57EC354; Tue, 22 Apr 2014 21:26:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9168D1E69; Tue, 22 Apr 2014 21:26:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3MLQNTE041548; Tue, 22 Apr 2014 21:26:23 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3MLQN1F041547; Tue, 22 Apr 2014 21:26:23 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404222126.s3MLQN1F041547@svn.freebsd.org> From: Christian Brueffer Date: Tue, 22 Apr 2014 21:26:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264786 - stable/9/usr.bin/ldd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Apr 2014 21:26:23 -0000 Author: brueffer Date: Tue Apr 22 21:26:23 2014 New Revision: 264786 URL: http://svnweb.freebsd.org/changeset/base/264786 Log: MFC: r264419 Avoid double close() of a file descriptor. CID: 1006089 Found with: Coverity Prevent(tm) Modified: stable/9/usr.bin/ldd/sods.c Directory Properties: stable/9/usr.bin/ldd/ (props changed) Modified: stable/9/usr.bin/ldd/sods.c ============================================================================== --- stable/9/usr.bin/ldd/sods.c Tue Apr 22 21:25:03 2014 (r264785) +++ stable/9/usr.bin/ldd/sods.c Tue Apr 22 21:26:23 2014 (r264786) @@ -204,7 +204,6 @@ dump_file(const char *fname) warnx("%s: this is an ELF program; use objdump to examine", fname); ++error_count; munmap(objbase, sb.st_size); - close(fd); return; } From owner-svn-src-stable@FreeBSD.ORG Wed Apr 23 01:27:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CCC4024C; Wed, 23 Apr 2014 01:27:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A047815B8; Wed, 23 Apr 2014 01:27:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3N1RrqN041249; Wed, 23 Apr 2014 01:27:53 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3N1RrMh041248; Wed, 23 Apr 2014 01:27:53 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404230127.s3N1RrMh041248@svn.freebsd.org> From: Glen Barber Date: Wed, 23 Apr 2014 01:27:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264792 - stable/10/release/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2014 01:27:53 -0000 Author: gjb Date: Wed Apr 23 01:27:53 2014 New Revision: 264792 URL: http://svnweb.freebsd.org/changeset/base/264792 Log: MFC r264518, r264697, r264698, r264703: r264518: Fix armv6 build failure: "armv6-freebsd-gcc: not found" r264697: When building the 'xdev' target when WITH_GCC=1 and WITHOUT_CLANG_IS_CC=1, it appears WITHOUT_CLANG=1 must also be set. While here, reorder the lines to put the WITH_* and WITHOUT_* entries on the same line. r264698: Fix EOL escape. r264703: Apply a slightly different color hammer to arm/release.sh: - gcc(1) fails to build usr.bin/dtc - lack of WITH_GNUCXX=1 causes cc1plus(1) calls to fail - u-boot fails to build with clang (hard-coded gcc(1) calls) Implement the proper incantation of WITH_/WITHOUT_ knobs to get arm snapshot builds working again. Since the cc(1) binary no longer needs to be cc(1) instead of clang(1), remove the chroot(8) post-install cc(1) overwrite. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/arm/release.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/release/arm/release.sh ============================================================================== --- stable/10/release/arm/release.sh Tue Apr 22 22:12:24 2014 (r264791) +++ stable/10/release/arm/release.sh Wed Apr 23 01:27:53 2014 (r264792) @@ -92,14 +92,10 @@ install_uboot() { } main() { - # Build gcc for use in the chroot for arm builds. - # This is not '-j'-safe, so force '-j1' to allow using - # additional, non-'-j' options specified in WORLD_FLAGS. - eval chroot ${CHROOTDIR} make -C /usr/src/gnu/usr.bin/cc \ - WITH_GCC=1 ${WORLD_FLAGS} -j1 obj depend all install # Build the 'xdev' target for crochet. eval chroot ${CHROOTDIR} make -C /usr/src \ - XDEV=${XDEV} XDEV_ARCH=${XDEV_ARCH} WITH_GCC=1 \ + WITH_GCC=1 WITH_GNUCXX=1 WITHOUT_CLANG_IS_CC=1 \ + XDEV=${XDEV} XDEV_ARCH=${XDEV_ARCH} \ ${WORLD_FLAGS} xdev # Run the ldconfig(8) startup script so /var/run/ld-elf*.so.hints From owner-svn-src-stable@FreeBSD.ORG Wed Apr 23 03:26:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5813357B; Wed, 23 Apr 2014 03:26:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42EF31482; Wed, 23 Apr 2014 03:26:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3N3QUHL091300; Wed, 23 Apr 2014 03:26:30 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3N3QTeP091298; Wed, 23 Apr 2014 03:26:29 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201404230326.s3N3QTeP091298@svn.freebsd.org> From: Mark Johnston Date: Wed, 23 Apr 2014 03:26:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264796 - in stable/10: cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2014 03:26:30 -0000 Author: markj Date: Wed Apr 23 03:26:29 2014 New Revision: 264796 URL: http://svnweb.freebsd.org/changeset/base/264796 Log: MFC r262596: 4478 dtrace_dof_maxsize is far too small illumos/illumos-gate@d339a29bb4765c4b6883a935cf69b669cd05bca0 Added: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.dofmax.ksh - copied unchanged from r262596, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.dofmax.ksh Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Directory Properties: stable/10/ (props changed) Copied: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.dofmax.ksh (from r262596, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.dofmax.ksh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.dofmax.ksh Wed Apr 23 03:26:29 2014 (r264796, copy of r262596, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.dofmax.ksh) @@ -0,0 +1,97 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2012, Joyent, Inc. All rights reserved. +# + +let j=8 + +enable() +{ + prog=/var/tmp/dtest.$$.d + err=/var/tmp/dtest.$$.err + + nawk -v nprobes=$1 'BEGIN { \ + for (i = 0; i < nprobes - 1; i++) { \ + printf("dtrace:::BEGIN,\n"); \ + } \ + \ + printf("dtrace:::BEGIN { exit(0); }\n"); \ + }' /dev/null > $prog + + dtrace -qs $prog > /dev/null 2> $err + + if [[ "$?" -eq 0 ]]; then + return 0 + else + if ! grep "DIF program exceeds maximum program size" $err \ + 1> /dev/null 2>&1 ; then + echo "failed to enable $prog: `cat $err`" + exit 1 + fi + + return 1 + fi +} + +# +# First, establish an upper bound +# +let upper=1 + +while enable $upper ; do + let lower=upper + let upper=upper+upper + echo success at $lower, raised to $upper +done + +# +# Now search for the highest value that can be enabled +# +while [[ "$lower" -lt "$upper" ]]; do + let guess=$(((lower + upper) / 2)) + echo "lower is $lower; upper is $upper; guess is $guess\c" + + if enable $guess ; then + if [[ $((upper - lower)) -le 2 ]]; then + let upper=guess + fi + + echo " (success)" + let lower=guess + else + echo " (failure)" + let upper=guess + fi +done + +let expected=10000 + +if [[ "$lower" -lt "$expected" ]]; then + echo "expected support for enablings of at least $expected probes; \c" + echo "found $lower" + exit 1 +fi + +echo "maximum supported enabled probes found to be $lower" +exit 0 + Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Wed Apr 23 02:21:17 2014 (r264795) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Wed Apr 23 03:26:29 2014 (r264796) @@ -155,7 +155,7 @@ int dtrace_destructive_disallow = 0; dtrace_optval_t dtrace_nonroot_maxsize = (16 * 1024 * 1024); size_t dtrace_difo_maxsize = (256 * 1024); -dtrace_optval_t dtrace_dof_maxsize = (256 * 1024); +dtrace_optval_t dtrace_dof_maxsize = (8 * 1024 * 1024); size_t dtrace_global_maxsize = (16 * 1024); size_t dtrace_actions_max = (16 * 1024); size_t dtrace_retain_max = 1024; From owner-svn-src-stable@FreeBSD.ORG Wed Apr 23 03:30:00 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB381768; Wed, 23 Apr 2014 03:30:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6E7D14B2; Wed, 23 Apr 2014 03:30:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3N3U0pr091830; Wed, 23 Apr 2014 03:30:00 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3N3U0Y6091822; Wed, 23 Apr 2014 03:30:00 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201404230330.s3N3U0Y6091822@svn.freebsd.org> From: Mark Johnston Date: Wed, 23 Apr 2014 03:30:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264797 - in stable/9: cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2014 03:30:00 -0000 Author: markj Date: Wed Apr 23 03:30:00 2014 New Revision: 264797 URL: http://svnweb.freebsd.org/changeset/base/264797 Log: MFC r262596: 4478 dtrace_dof_maxsize is far too small illumos/illumos-gate@d339a29bb4765c4b6883a935cf69b669cd05bca0 Added: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.dofmax.ksh - copied unchanged from r262596, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.dofmax.ksh Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.dofmax.ksh (from r262596, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.dofmax.ksh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.dofmax.ksh Wed Apr 23 03:30:00 2014 (r264797, copy of r262596, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.dofmax.ksh) @@ -0,0 +1,97 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2012, Joyent, Inc. All rights reserved. +# + +let j=8 + +enable() +{ + prog=/var/tmp/dtest.$$.d + err=/var/tmp/dtest.$$.err + + nawk -v nprobes=$1 'BEGIN { \ + for (i = 0; i < nprobes - 1; i++) { \ + printf("dtrace:::BEGIN,\n"); \ + } \ + \ + printf("dtrace:::BEGIN { exit(0); }\n"); \ + }' /dev/null > $prog + + dtrace -qs $prog > /dev/null 2> $err + + if [[ "$?" -eq 0 ]]; then + return 0 + else + if ! grep "DIF program exceeds maximum program size" $err \ + 1> /dev/null 2>&1 ; then + echo "failed to enable $prog: `cat $err`" + exit 1 + fi + + return 1 + fi +} + +# +# First, establish an upper bound +# +let upper=1 + +while enable $upper ; do + let lower=upper + let upper=upper+upper + echo success at $lower, raised to $upper +done + +# +# Now search for the highest value that can be enabled +# +while [[ "$lower" -lt "$upper" ]]; do + let guess=$(((lower + upper) / 2)) + echo "lower is $lower; upper is $upper; guess is $guess\c" + + if enable $guess ; then + if [[ $((upper - lower)) -le 2 ]]; then + let upper=guess + fi + + echo " (success)" + let lower=guess + else + echo " (failure)" + let upper=guess + fi +done + +let expected=10000 + +if [[ "$lower" -lt "$expected" ]]; then + echo "expected support for enablings of at least $expected probes; \c" + echo "found $lower" + exit 1 +fi + +echo "maximum supported enabled probes found to be $lower" +exit 0 + Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Wed Apr 23 03:26:29 2014 (r264796) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Wed Apr 23 03:30:00 2014 (r264797) @@ -155,7 +155,7 @@ int dtrace_destructive_disallow = 0; dtrace_optval_t dtrace_nonroot_maxsize = (16 * 1024 * 1024); size_t dtrace_difo_maxsize = (256 * 1024); -dtrace_optval_t dtrace_dof_maxsize = (256 * 1024); +dtrace_optval_t dtrace_dof_maxsize = (8 * 1024 * 1024); size_t dtrace_global_maxsize = (16 * 1024); size_t dtrace_actions_max = (16 * 1024); size_t dtrace_retain_max = 1024; From owner-svn-src-stable@FreeBSD.ORG Wed Apr 23 07:22:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 34BBE697; Wed, 23 Apr 2014 07:22:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2054D1A64; Wed, 23 Apr 2014 07:22:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3N7MeNb088420; Wed, 23 Apr 2014 07:22:40 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3N7MesI088419; Wed, 23 Apr 2014 07:22:40 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404230722.s3N7MesI088419@svn.freebsd.org> From: Christian Brueffer Date: Wed, 23 Apr 2014 07:22:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264804 - stable/10/sys/netpfil/ipfw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2014 07:22:41 -0000 Author: brueffer Date: Wed Apr 23 07:22:40 2014 New Revision: 264804 URL: http://svnweb.freebsd.org/changeset/base/264804 Log: MFC: r264421 Free resources in error cases; re-indent a curly brace while here. CID: 1199366 Found with: Coverity Prevent(tm) Modified: stable/10/sys/netpfil/ipfw/ip_fw_sockopt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netpfil/ipfw/ip_fw_sockopt.c ============================================================================== --- stable/10/sys/netpfil/ipfw/ip_fw_sockopt.c Wed Apr 23 05:57:45 2014 (r264803) +++ stable/10/sys/netpfil/ipfw/ip_fw_sockopt.c Wed Apr 23 07:22:40 2014 (r264804) @@ -1039,8 +1039,10 @@ ipfw_ctl(struct sockopt *sopt) if (sopt->sopt_valsize == RULESIZE7(rule)) { is7 = 1; error = convert_rule_to_8(rule); - if (error) + if (error) { + free(rule, M_TEMP); return error; + } if (error == 0) error = check_ipfw_struct(rule, RULESIZE(rule)); } else { @@ -1056,11 +1058,13 @@ ipfw_ctl(struct sockopt *sopt) if (is7) { error = convert_rule_to_7(rule); size = RULESIZE7(rule); - if (error) + if (error) { + free(rule, M_TEMP); return error; + } } error = sooptcopyout(sopt, rule, size); - } + } } free(rule, M_TEMP); break; From owner-svn-src-stable@FreeBSD.ORG Wed Apr 23 07:24:01 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 960CC888; Wed, 23 Apr 2014 07:24:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 812081A80; Wed, 23 Apr 2014 07:24:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3N7O1iE088610; Wed, 23 Apr 2014 07:24:01 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3N7O1Q1088609; Wed, 23 Apr 2014 07:24:01 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404230724.s3N7O1Q1088609@svn.freebsd.org> From: Christian Brueffer Date: Wed, 23 Apr 2014 07:24:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264805 - stable/9/sys/netpfil/ipfw X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2014 07:24:01 -0000 Author: brueffer Date: Wed Apr 23 07:24:01 2014 New Revision: 264805 URL: http://svnweb.freebsd.org/changeset/base/264805 Log: MFC: r264421 Free resources in error cases; re-indent a curly brace while here. CID: 1199366 Found with: Coverity Prevent(tm) Modified: stable/9/sys/netpfil/ipfw/ip_fw_sockopt.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/netpfil/ (props changed) Modified: stable/9/sys/netpfil/ipfw/ip_fw_sockopt.c ============================================================================== --- stable/9/sys/netpfil/ipfw/ip_fw_sockopt.c Wed Apr 23 07:22:40 2014 (r264804) +++ stable/9/sys/netpfil/ipfw/ip_fw_sockopt.c Wed Apr 23 07:24:01 2014 (r264805) @@ -1043,8 +1043,10 @@ ipfw_ctl(struct sockopt *sopt) if (sopt->sopt_valsize == RULESIZE7(rule)) { is7 = 1; error = convert_rule_to_8(rule); - if (error) + if (error) { + free(rule, M_TEMP); return error; + } if (error == 0) error = check_ipfw_struct(rule, RULESIZE(rule)); } else { @@ -1060,11 +1062,13 @@ ipfw_ctl(struct sockopt *sopt) if (is7) { error = convert_rule_to_7(rule); size = RULESIZE7(rule); - if (error) + if (error) { + free(rule, M_TEMP); return error; + } } error = sooptcopyout(sopt, rule, size); - } + } } free(rule, M_TEMP); break; From owner-svn-src-stable@FreeBSD.ORG Wed Apr 23 07:33:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 920B1AC0; Wed, 23 Apr 2014 07:33:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7DF3F1B84; Wed, 23 Apr 2014 07:33:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3N7XpMH092695; Wed, 23 Apr 2014 07:33:51 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3N7XpMG092694; Wed, 23 Apr 2014 07:33:51 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404230733.s3N7XpMG092694@svn.freebsd.org> From: Christian Brueffer Date: Wed, 23 Apr 2014 07:33:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264806 - stable/10/sbin/savecore X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2014 07:33:51 -0000 Author: brueffer Date: Wed Apr 23 07:33:51 2014 New Revision: 264806 URL: http://svnweb.freebsd.org/changeset/base/264806 Log: MFC: r264479 Fix double fclose() in an error case. CID: 1006120 Found with: Coverity Prevent(tm) Modified: stable/10/sbin/savecore/savecore.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/savecore/savecore.c ============================================================================== --- stable/10/sbin/savecore/savecore.c Wed Apr 23 07:24:01 2014 (r264805) +++ stable/10/sbin/savecore/savecore.c Wed Apr 23 07:33:51 2014 (r264806) @@ -672,7 +672,7 @@ DoFile(const char *savedir, const char * if (fclose(fp) < 0) { syslog(LOG_ERR, "error on %s: %m", corename); nerr++; - goto closeall; + goto closefd; } symlinks_remove(); From owner-svn-src-stable@FreeBSD.ORG Wed Apr 23 07:35:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 03D32C0F; Wed, 23 Apr 2014 07:35:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E492F1BA6; Wed, 23 Apr 2014 07:35:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3N7Z8Dj092913; Wed, 23 Apr 2014 07:35:08 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3N7Z8ND092912; Wed, 23 Apr 2014 07:35:08 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404230735.s3N7Z8ND092912@svn.freebsd.org> From: Christian Brueffer Date: Wed, 23 Apr 2014 07:35:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264807 - stable/9/sbin/savecore X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2014 07:35:09 -0000 Author: brueffer Date: Wed Apr 23 07:35:08 2014 New Revision: 264807 URL: http://svnweb.freebsd.org/changeset/base/264807 Log: MFC: r264479 Fix double fclose() in an error case. CID: 1006120 Found with: Coverity Prevent(tm) Modified: stable/9/sbin/savecore/savecore.c Directory Properties: stable/9/sbin/savecore/ (props changed) Modified: stable/9/sbin/savecore/savecore.c ============================================================================== --- stable/9/sbin/savecore/savecore.c Wed Apr 23 07:33:51 2014 (r264806) +++ stable/9/sbin/savecore/savecore.c Wed Apr 23 07:35:08 2014 (r264807) @@ -603,7 +603,7 @@ DoFile(const char *savedir, const char * if (fclose(fp) < 0) { syslog(LOG_ERR, "error on %s: %m", filename); nerr++; - goto closeall; + goto closefd; } nsaved++; From owner-svn-src-stable@FreeBSD.ORG Wed Apr 23 09:22:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C518C7D1; Wed, 23 Apr 2014 09:22:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B130B179E; Wed, 23 Apr 2014 09:22:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3N9MOi4037716; Wed, 23 Apr 2014 09:22:24 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3N9MOZJ037715; Wed, 23 Apr 2014 09:22:24 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404230922.s3N9MOZJ037715@svn.freebsd.org> From: Christian Brueffer Date: Wed, 23 Apr 2014 09:22:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264808 - stable/10/sbin/gbde X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2014 09:22:24 -0000 Author: brueffer Date: Wed Apr 23 09:22:24 2014 New Revision: 264808 URL: http://svnweb.freebsd.org/changeset/base/264808 Log: MFC: r264489 Add a missing break in option parsing. CID: 1011452 Found with: Coverity Prevent(tm) Modified: stable/10/sbin/gbde/gbde.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/gbde/gbde.c ============================================================================== --- stable/10/sbin/gbde/gbde.c Wed Apr 23 07:35:08 2014 (r264807) +++ stable/10/sbin/gbde/gbde.c Wed Apr 23 09:22:24 2014 (r264808) @@ -805,6 +805,7 @@ main(int argc, char **argv) break; case 'i': i_opt = !i_opt; + break; case 'k': k_opt = optarg; break; From owner-svn-src-stable@FreeBSD.ORG Wed Apr 23 09:23:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ECEC2A04; Wed, 23 Apr 2014 09:23:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8EE617B3; Wed, 23 Apr 2014 09:23:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3N9NRRL038029; Wed, 23 Apr 2014 09:23:27 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3N9NRCA038028; Wed, 23 Apr 2014 09:23:27 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404230923.s3N9NRCA038028@svn.freebsd.org> From: Christian Brueffer Date: Wed, 23 Apr 2014 09:23:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264809 - stable/9/sbin/gbde X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2014 09:23:28 -0000 Author: brueffer Date: Wed Apr 23 09:23:27 2014 New Revision: 264809 URL: http://svnweb.freebsd.org/changeset/base/264809 Log: MFC: r264489 Add a missing break in option parsing. CID: 1011452 Found with: Coverity Prevent(tm) Modified: stable/9/sbin/gbde/gbde.c Directory Properties: stable/9/sbin/gbde/ (props changed) Modified: stable/9/sbin/gbde/gbde.c ============================================================================== --- stable/9/sbin/gbde/gbde.c Wed Apr 23 09:22:24 2014 (r264808) +++ stable/9/sbin/gbde/gbde.c Wed Apr 23 09:23:27 2014 (r264809) @@ -805,6 +805,7 @@ main(int argc, char **argv) break; case 'i': i_opt = !i_opt; + break; case 'k': k_opt = optarg; break; From owner-svn-src-stable@FreeBSD.ORG Wed Apr 23 09:24:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB50FB40; Wed, 23 Apr 2014 09:24:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A62CB17C3; Wed, 23 Apr 2014 09:24:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3N9OQMt038183; Wed, 23 Apr 2014 09:24:26 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3N9OQmD038182; Wed, 23 Apr 2014 09:24:26 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404230924.s3N9OQmD038182@svn.freebsd.org> From: Christian Brueffer Date: Wed, 23 Apr 2014 09:24:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r264810 - stable/8/sbin/gbde X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2014 09:24:26 -0000 Author: brueffer Date: Wed Apr 23 09:24:26 2014 New Revision: 264810 URL: http://svnweb.freebsd.org/changeset/base/264810 Log: MFC: r264489 Add a missing break in option parsing. CID: 1011452 Found with: Coverity Prevent(tm) Modified: stable/8/sbin/gbde/gbde.c Directory Properties: stable/8/sbin/gbde/ (props changed) Modified: stable/8/sbin/gbde/gbde.c ============================================================================== --- stable/8/sbin/gbde/gbde.c Wed Apr 23 09:23:27 2014 (r264809) +++ stable/8/sbin/gbde/gbde.c Wed Apr 23 09:24:26 2014 (r264810) @@ -805,6 +805,7 @@ main(int argc, char **argv) break; case 'i': i_opt = !i_opt; + break; case 'k': k_opt = optarg; break; From owner-svn-src-stable@FreeBSD.ORG Wed Apr 23 09:27:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 874BDD2B; Wed, 23 Apr 2014 09:27:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7336E180A; Wed, 23 Apr 2014 09:27:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3N9RCoB038525; Wed, 23 Apr 2014 09:27:12 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3N9RCKL038524; Wed, 23 Apr 2014 09:27:12 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404230927.s3N9RCKL038524@svn.freebsd.org> From: Christian Brueffer Date: Wed, 23 Apr 2014 09:27:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264811 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2014 09:27:12 -0000 Author: brueffer Date: Wed Apr 23 09:27:11 2014 New Revision: 264811 URL: http://svnweb.freebsd.org/changeset/base/264811 Log: MFC: r264460 Document the xdev* targets. PR: 188519 Submitted by: Idwer Vollering Reviewed by: bapt Modified: stable/10/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile ============================================================================== --- stable/10/Makefile Wed Apr 23 09:24:26 2014 (r264810) +++ stable/10/Makefile Wed Apr 23 09:27:11 2014 (r264811) @@ -32,6 +32,10 @@ # targets - Print a list of supported TARGET/TARGET_ARCH pairs # for world and kernel targets. # toolchains - Build a toolchain for all world and kernel targets. +# xdev - xdev-build + xdev-install for the architecture +# specified with XDEV and XDEV_ARCH. +# xdev-build - Build cross-development tools. +# xdev-install - Install cross-development tools. # # "quick" way to test all kernel builds: # _jflag=`sysctl -n hw.ncpu` From owner-svn-src-stable@FreeBSD.ORG Wed Apr 23 09:32:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5A1BEDC; Wed, 23 Apr 2014 09:32:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91A8D18BC; Wed, 23 Apr 2014 09:32:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3N9WXo6042089; Wed, 23 Apr 2014 09:32:33 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3N9WX49042088; Wed, 23 Apr 2014 09:32:33 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404230932.s3N9WX49042088@svn.freebsd.org> From: Christian Brueffer Date: Wed, 23 Apr 2014 09:32:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264812 - stable/9 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2014 09:32:33 -0000 Author: brueffer Date: Wed Apr 23 09:32:33 2014 New Revision: 264812 URL: http://svnweb.freebsd.org/changeset/base/264812 Log: MFC: r264460 Document the xdev* targets. PR: 188519 Submitted by: Idwer Vollering Reviewed by: bapt Modified: stable/9/Makefile (contents, props changed) Directory Properties: stable/9/ (props changed) Modified: stable/9/Makefile ============================================================================== --- stable/9/Makefile Wed Apr 23 09:27:11 2014 (r264811) +++ stable/9/Makefile Wed Apr 23 09:32:33 2014 (r264812) @@ -31,6 +31,10 @@ # targets - Print a list of supported TARGET/TARGET_ARCH pairs # for world and kernel targets. # toolchains - Build a toolchain for all world and kernel targets. +# xdev - xdev-build + xdev-install for the architecture +# specified with XDEV and XDEV_ARCH. +# xdev-build - Build cross-development tools. +# xdev-install - Install cross-development tools. # # This makefile is simple by design. The FreeBSD make automatically reads # the /usr/share/mk/sys.mk unless the -m argument is specified on the From owner-svn-src-stable@FreeBSD.ORG Wed Apr 23 09:56:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 871CA3C1; Wed, 23 Apr 2014 09:56:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72AE31ABC; Wed, 23 Apr 2014 09:56:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3N9uIcB051353; Wed, 23 Apr 2014 09:56:18 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3N9uISu051352; Wed, 23 Apr 2014 09:56:18 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201404230956.s3N9uISu051352@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 23 Apr 2014 09:56:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264813 - stable/10/sys/netpfil/ipfw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2014 09:56:18 -0000 Author: ae Date: Wed Apr 23 09:56:17 2014 New Revision: 264813 URL: http://svnweb.freebsd.org/changeset/base/264813 Log: MFC r264540: Set oif only for outgoing packets. PR: 188543 Modified: stable/10/sys/netpfil/ipfw/ip_fw_pfil.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netpfil/ipfw/ip_fw_pfil.c ============================================================================== --- stable/10/sys/netpfil/ipfw/ip_fw_pfil.c Wed Apr 23 09:32:33 2014 (r264812) +++ stable/10/sys/netpfil/ipfw/ip_fw_pfil.c Wed Apr 23 09:56:17 2014 (r264813) @@ -334,7 +334,7 @@ ipfw_check_frame(void *arg, struct mbuf m_adj(m, ETHER_HDR_LEN); /* strip ethernet header */ args.m = m; /* the packet we are looking at */ - args.oif = dst; /* destination, if any */ + args.oif = dir == PFIL_OUT ? dst: NULL; /* destination, if any */ args.next_hop = NULL; /* we do not support forward yet */ args.next_hop6 = NULL; /* we do not support forward yet */ args.eh = &save_eh; /* MAC header for bridged/MAC packets */ From owner-svn-src-stable@FreeBSD.ORG Wed Apr 23 11:22:55 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8911FE6E; Wed, 23 Apr 2014 11:22:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69C641830; Wed, 23 Apr 2014 11:22:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3NBMtx9088812; Wed, 23 Apr 2014 11:22:55 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3NBMsG8088809; Wed, 23 Apr 2014 11:22:54 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201404231122.s3NBMsG8088809@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 23 Apr 2014 11:22:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264814 - stable/10/sys/netipsec X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2014 11:22:55 -0000 Author: ae Date: Wed Apr 23 11:22:54 2014 New Revision: 264814 URL: http://svnweb.freebsd.org/changeset/base/264814 Log: MFC r264124: Remove dead code. MFC r264125: Remove unused variable. MFC r264126: The check for local address spoofing lacks ifaddr locking. Remove these loops and use in_localip() and in6_localip() functions instead. MFC r264520: Remove _IP_VHL* macros and related ifdefs. Modified: stable/10/sys/netipsec/ipsec.c stable/10/sys/netipsec/ipsec_output.c stable/10/sys/netipsec/xform_ipip.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netipsec/ipsec.c ============================================================================== --- stable/10/sys/netipsec/ipsec.c Wed Apr 23 09:56:17 2014 (r264813) +++ stable/10/sys/netipsec/ipsec.c Wed Apr 23 11:22:54 2014 (r264814) @@ -559,11 +559,7 @@ ipsec_setspidx(struct mbuf *m, struct se m_copydata(m, 0, sizeof(ipbuf), (caddr_t)&ipbuf); ip = &ipbuf; } -#ifdef _IP_VHL - v = _IP_VHL_V(ip->ip_vhl); -#else v = ip->ip_v; -#endif switch (v) { case 4: error = ipsec4_setspidx_ipaddr(m, spidx); @@ -607,11 +603,7 @@ ipsec4_get_ulp(struct mbuf *m, struct se struct ip *ip = mtod(m, struct ip *); if (ip->ip_off & htons(IP_MF | IP_OFFMASK)) goto done; -#ifdef _IP_VHL - off = _IP_VHL_HL(ip->ip_vhl) << 2; -#else off = ip->ip_hl << 2; -#endif nxt = ip->ip_p; } else { struct ip ih; @@ -619,11 +611,7 @@ ipsec4_get_ulp(struct mbuf *m, struct se m_copydata(m, 0, sizeof (struct ip), (caddr_t) &ih); if (ih.ip_off & htons(IP_MF | IP_OFFMASK)) goto done; -#ifdef _IP_VHL - off = _IP_VHL_HL(ih.ip_vhl) << 2; -#else off = ih.ip_hl << 2; -#endif nxt = ih.ip_p; } Modified: stable/10/sys/netipsec/ipsec_output.c ============================================================================== --- stable/10/sys/netipsec/ipsec_output.c Wed Apr 23 09:56:17 2014 (r264813) +++ stable/10/sys/netipsec/ipsec_output.c Wed Apr 23 11:22:54 2014 (r264814) @@ -205,11 +205,7 @@ ipsec_process_done(struct mbuf *m, struc */ if (sav->natt_type) { struct ip *ip = mtod(m, struct ip *); -#ifdef _IP_VHL - const int hlen = IP_VHL_HL(ip->ip_vhl); -#else const int hlen = (ip->ip_hl << 2); -#endif int size, off; struct mbuf *mi; struct udphdr *udp; @@ -504,15 +500,7 @@ ipsec4_process_packet( ip = mtod(m, struct ip *); ip->ip_len = htons(m->m_pkthdr.len); ip->ip_sum = 0; -#ifdef _IP_VHL - if (ip->ip_vhl == IP_VHL_BORING) - ip->ip_sum = in_cksum_hdr(ip); - else - ip->ip_sum = in_cksum(m, - _IP_VHL_HL(ip->ip_vhl) << 2); -#else ip->ip_sum = in_cksum(m, ip->ip_hl << 2); -#endif /* Encapsulate the packet */ error = ipip_output(m, isr, &mp, 0, 0); Modified: stable/10/sys/netipsec/xform_ipip.c ============================================================================== --- stable/10/sys/netipsec/xform_ipip.c Wed Apr 23 09:56:17 2014 (r264813) +++ stable/10/sys/netipsec/xform_ipip.c Wed Apr 23 11:22:54 2014 (r264814) @@ -64,9 +64,6 @@ #include #include #include -#ifdef MROUTING -#include -#endif #include #include @@ -161,18 +158,11 @@ ip4_input(struct mbuf *m, int off) static void _ipip_input(struct mbuf *m, int iphlen, struct ifnet *gifp) { -#ifdef INET - register struct sockaddr_in *sin; -#endif - register struct ifnet *ifp; - register struct ifaddr *ifa; struct ip *ipo; #ifdef INET6 - register struct sockaddr_in6 *sin6; struct ip6_hdr *ip6 = NULL; u_int8_t itos; #endif - u_int8_t nxt; int isr; u_int8_t otos; u_int8_t v; @@ -207,18 +197,8 @@ _ipip_input(struct mbuf *m, int iphlen, return; } } - ipo = mtod(m, struct ip *); -#ifdef MROUTING - if (ipo->ip_v == IPVERSION && ipo->ip_p == IPPROTO_IPV4) { - if (IN_MULTICAST(((struct ip *)((char *) ipo + iphlen))->ip_dst.s_addr)) { - ipip_mroute_input (m, iphlen); - return; - } - } -#endif /* MROUTING */ - /* Keep outer ecn field. */ switch (v >> 4) { #ifdef INET @@ -287,14 +267,12 @@ _ipip_input(struct mbuf *m, int iphlen, #ifdef INET case 4: ipo = mtod(m, struct ip *); - nxt = ipo->ip_p; ip_ecn_egress(V_ip4_ipsec_ecn, &otos, &ipo->ip_tos); break; #endif /* INET */ #ifdef INET6 case 6: ip6 = (struct ip6_hdr *) ipo; - nxt = ip6->ip6_nxt; itos = (ntohl(ip6->ip6_flow) >> 20) & 0xff; ip_ecn_egress(V_ip6_ipsec_ecn, &otos, &itos); ip6->ip6_flow &= ~htonl(0xff << 20); @@ -309,47 +287,22 @@ _ipip_input(struct mbuf *m, int iphlen, if ((m->m_pkthdr.rcvif == NULL || !(m->m_pkthdr.rcvif->if_flags & IFF_LOOPBACK)) && V_ipip_allow != 2) { - IFNET_RLOCK_NOSLEEP(); - TAILQ_FOREACH(ifp, &V_ifnet, if_link) { - TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { -#ifdef INET - if (ipo) { - if (ifa->ifa_addr->sa_family != - AF_INET) - continue; - - sin = (struct sockaddr_in *) ifa->ifa_addr; - - if (sin->sin_addr.s_addr == - ipo->ip_src.s_addr) { - IPIPSTAT_INC(ipips_spoof); - m_freem(m); - IFNET_RUNLOCK_NOSLEEP(); - return; - } - } -#endif /* INET */ - +#ifdef INET + if ((v >> 4) == IPVERSION && + in_localip(ipo->ip_src) != 0) { + IPIPSTAT_INC(ipips_spoof); + m_freem(m); + return; + } +#endif #ifdef INET6 - if (ip6) { - if (ifa->ifa_addr->sa_family != - AF_INET6) - continue; - - sin6 = (struct sockaddr_in6 *) ifa->ifa_addr; - - if (IN6_ARE_ADDR_EQUAL(&sin6->sin6_addr, &ip6->ip6_src)) { - IPIPSTAT_INC(ipips_spoof); - m_freem(m); - IFNET_RUNLOCK_NOSLEEP(); - return; - } - - } -#endif /* INET6 */ - } + if ((v & IPV6_VERSION_MASK) == IPV6_VERSION && + in6_localip(&ip6->ip6_src) != 0) { + IPIPSTAT_INC(ipips_spoof); + m_freem(m); + return; } - IFNET_RUNLOCK_NOSLEEP(); +#endif } /* Statistics */ From owner-svn-src-stable@FreeBSD.ORG Wed Apr 23 12:05:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3CEDCA0; Wed, 23 Apr 2014 12:05:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3D731C97; Wed, 23 Apr 2014 12:05:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3NC5sA0005762; Wed, 23 Apr 2014 12:05:54 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3NC5sFO005759; Wed, 23 Apr 2014 12:05:54 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201404231205.s3NC5sFO005759@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 23 Apr 2014 12:05:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264815 - stable/9/sys/netipsec X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2014 12:05:55 -0000 Author: ae Date: Wed Apr 23 12:05:53 2014 New Revision: 264815 URL: http://svnweb.freebsd.org/changeset/base/264815 Log: MFC r264124: Remove dead code. MFC r264125: Remove unused variable. MFC r264126: The check for local address spoofing lacks ifaddr locking. Remove these loops and use in_localip() and in6_localip() functions instead. MFC r264520: Remove _IP_VHL* macros and related ifdefs. Modified: stable/9/sys/netipsec/ipsec.c stable/9/sys/netipsec/ipsec_output.c stable/9/sys/netipsec/xform_ipip.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netipsec/ipsec.c ============================================================================== --- stable/9/sys/netipsec/ipsec.c Wed Apr 23 11:22:54 2014 (r264814) +++ stable/9/sys/netipsec/ipsec.c Wed Apr 23 12:05:53 2014 (r264815) @@ -553,11 +553,7 @@ ipsec_setspidx(struct mbuf *m, struct se m_copydata(m, 0, sizeof(ipbuf), (caddr_t)&ipbuf); ip = &ipbuf; } -#ifdef _IP_VHL - v = _IP_VHL_V(ip->ip_vhl); -#else v = ip->ip_v; -#endif switch (v) { case 4: error = ipsec4_setspidx_ipaddr(m, spidx); @@ -602,11 +598,7 @@ ipsec4_get_ulp(struct mbuf *m, struct se struct ip *ip = mtod(m, struct ip *); if (ip->ip_off & (IP_MF | IP_OFFMASK)) goto done; -#ifdef _IP_VHL - off = _IP_VHL_HL(ip->ip_vhl) << 2; -#else off = ip->ip_hl << 2; -#endif nxt = ip->ip_p; } else { struct ip ih; @@ -614,11 +606,7 @@ ipsec4_get_ulp(struct mbuf *m, struct se m_copydata(m, 0, sizeof (struct ip), (caddr_t) &ih); if (ih.ip_off & (IP_MF | IP_OFFMASK)) goto done; -#ifdef _IP_VHL - off = _IP_VHL_HL(ih.ip_vhl) << 2; -#else off = ih.ip_hl << 2; -#endif nxt = ih.ip_p; } Modified: stable/9/sys/netipsec/ipsec_output.c ============================================================================== --- stable/9/sys/netipsec/ipsec_output.c Wed Apr 23 11:22:54 2014 (r264814) +++ stable/9/sys/netipsec/ipsec_output.c Wed Apr 23 12:05:53 2014 (r264815) @@ -211,11 +211,7 @@ ipsec_process_done(struct mbuf *m, struc * insert UDP encapsulation header after IP header. */ if (sav->natt_type) { -#ifdef _IP_VHL - const int hlen = IP_VHL_HL(ip->ip_vhl); -#else const int hlen = (ip->ip_hl << 2); -#endif int size, off; struct mbuf *mi; struct udphdr *udp; @@ -510,15 +506,7 @@ ipsec4_process_packet( ip = mtod(m, struct ip *); ip->ip_len = htons(m->m_pkthdr.len); ip->ip_sum = 0; -#ifdef _IP_VHL - if (ip->ip_vhl == IP_VHL_BORING) - ip->ip_sum = in_cksum_hdr(ip); - else - ip->ip_sum = in_cksum(m, - _IP_VHL_HL(ip->ip_vhl) << 2); -#else ip->ip_sum = in_cksum(m, ip->ip_hl << 2); -#endif /* Encapsulate the packet */ error = ipip_output(m, isr, &mp, 0, 0); Modified: stable/9/sys/netipsec/xform_ipip.c ============================================================================== --- stable/9/sys/netipsec/xform_ipip.c Wed Apr 23 11:22:54 2014 (r264814) +++ stable/9/sys/netipsec/xform_ipip.c Wed Apr 23 12:05:53 2014 (r264815) @@ -64,9 +64,6 @@ #include #include #include -#ifdef MROUTING -#include -#endif #include #include @@ -155,18 +152,11 @@ ip4_input(struct mbuf *m, int off) static void _ipip_input(struct mbuf *m, int iphlen, struct ifnet *gifp) { -#ifdef INET - register struct sockaddr_in *sin; -#endif - register struct ifnet *ifp; - register struct ifaddr *ifa; struct ip *ipo; #ifdef INET6 - register struct sockaddr_in6 *sin6; struct ip6_hdr *ip6 = NULL; u_int8_t itos; #endif - u_int8_t nxt; int isr; u_int8_t otos; u_int8_t v; @@ -201,18 +191,8 @@ _ipip_input(struct mbuf *m, int iphlen, return; } } - ipo = mtod(m, struct ip *); -#ifdef MROUTING - if (ipo->ip_v == IPVERSION && ipo->ip_p == IPPROTO_IPV4) { - if (IN_MULTICAST(((struct ip *)((char *) ipo + iphlen))->ip_dst.s_addr)) { - ipip_mroute_input (m, iphlen); - return; - } - } -#endif /* MROUTING */ - /* Keep outer ecn field. */ switch (v >> 4) { #ifdef INET @@ -281,14 +261,12 @@ _ipip_input(struct mbuf *m, int iphlen, #ifdef INET case 4: ipo = mtod(m, struct ip *); - nxt = ipo->ip_p; ip_ecn_egress(V_ip4_ipsec_ecn, &otos, &ipo->ip_tos); break; #endif /* INET */ #ifdef INET6 case 6: ip6 = (struct ip6_hdr *) ipo; - nxt = ip6->ip6_nxt; itos = (ntohl(ip6->ip6_flow) >> 20) & 0xff; ip_ecn_egress(V_ip6_ipsec_ecn, &otos, &itos); ip6->ip6_flow &= ~htonl(0xff << 20); @@ -303,47 +281,22 @@ _ipip_input(struct mbuf *m, int iphlen, if ((m->m_pkthdr.rcvif == NULL || !(m->m_pkthdr.rcvif->if_flags & IFF_LOOPBACK)) && V_ipip_allow != 2) { - IFNET_RLOCK_NOSLEEP(); - TAILQ_FOREACH(ifp, &V_ifnet, if_link) { - TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { -#ifdef INET - if (ipo) { - if (ifa->ifa_addr->sa_family != - AF_INET) - continue; - - sin = (struct sockaddr_in *) ifa->ifa_addr; - - if (sin->sin_addr.s_addr == - ipo->ip_src.s_addr) { - IPIPSTAT_INC(ipips_spoof); - m_freem(m); - IFNET_RUNLOCK_NOSLEEP(); - return; - } - } -#endif /* INET */ - +#ifdef INET + if ((v >> 4) == IPVERSION && + in_localip(ipo->ip_src) != 0) { + IPIPSTAT_INC(ipips_spoof); + m_freem(m); + return; + } +#endif #ifdef INET6 - if (ip6) { - if (ifa->ifa_addr->sa_family != - AF_INET6) - continue; - - sin6 = (struct sockaddr_in6 *) ifa->ifa_addr; - - if (IN6_ARE_ADDR_EQUAL(&sin6->sin6_addr, &ip6->ip6_src)) { - IPIPSTAT_INC(ipips_spoof); - m_freem(m); - IFNET_RUNLOCK_NOSLEEP(); - return; - } - - } -#endif /* INET6 */ - } + if ((v & IPV6_VERSION_MASK) == IPV6_VERSION && + in6_localip(&ip6->ip6_src) != 0) { + IPIPSTAT_INC(ipips_spoof); + m_freem(m); + return; } - IFNET_RUNLOCK_NOSLEEP(); +#endif } /* Statistics */ From owner-svn-src-stable@FreeBSD.ORG Wed Apr 23 12:08:21 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 027C0EC3; Wed, 23 Apr 2014 12:08:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E2C161CCE; Wed, 23 Apr 2014 12:08:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3NC8Kkb006077; Wed, 23 Apr 2014 12:08:20 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3NC8K9c006076; Wed, 23 Apr 2014 12:08:20 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404231208.s3NC8K9c006076@svn.freebsd.org> From: Christian Brueffer Date: Wed, 23 Apr 2014 12:08:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264816 - stable/10/sys/boot/i386/libfirewire X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2014 12:08:21 -0000 Author: brueffer Date: Wed Apr 23 12:08:20 2014 New Revision: 264816 URL: http://svnweb.freebsd.org/changeset/base/264816 Log: MFC: r264482 Re-indent break statement. Modified: stable/10/sys/boot/i386/libfirewire/firewire.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/i386/libfirewire/firewire.c ============================================================================== --- stable/10/sys/boot/i386/libfirewire/firewire.c Wed Apr 23 12:05:53 2014 (r264815) +++ stable/10/sys/boot/i386/libfirewire/firewire.c Wed Apr 23 12:08:20 2014 (r264816) @@ -137,7 +137,7 @@ fw_init(void) if (sc->state == FWOHCI_STATE_DEAD) break; avail ++; - break; + break; } fw_initialized = 1; From owner-svn-src-stable@FreeBSD.ORG Wed Apr 23 12:09:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AAF5091; Wed, 23 Apr 2014 12:09:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9768E1CDB; Wed, 23 Apr 2014 12:09:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3NC9Fke006220; Wed, 23 Apr 2014 12:09:15 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3NC9F7A006219; Wed, 23 Apr 2014 12:09:15 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404231209.s3NC9F7A006219@svn.freebsd.org> From: Christian Brueffer Date: Wed, 23 Apr 2014 12:09:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264817 - stable/9/sys/boot/i386/libfirewire X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2014 12:09:15 -0000 Author: brueffer Date: Wed Apr 23 12:09:15 2014 New Revision: 264817 URL: http://svnweb.freebsd.org/changeset/base/264817 Log: MFC: r264482 Re-indent break statement. Modified: stable/9/sys/boot/i386/libfirewire/firewire.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) Modified: stable/9/sys/boot/i386/libfirewire/firewire.c ============================================================================== --- stable/9/sys/boot/i386/libfirewire/firewire.c Wed Apr 23 12:08:20 2014 (r264816) +++ stable/9/sys/boot/i386/libfirewire/firewire.c Wed Apr 23 12:09:15 2014 (r264817) @@ -137,7 +137,7 @@ fw_init(void) if (sc->state == FWOHCI_STATE_DEAD) break; avail ++; - break; + break; } fw_initialized = 1; From owner-svn-src-stable@FreeBSD.ORG Wed Apr 23 12:11:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DFC40268; Wed, 23 Apr 2014 12:11:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC85D1D69; Wed, 23 Apr 2014 12:11:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3NCBEQB007040; Wed, 23 Apr 2014 12:11:14 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3NCBEYk007039; Wed, 23 Apr 2014 12:11:14 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404231211.s3NCBEYk007039@svn.freebsd.org> From: Christian Brueffer Date: Wed, 23 Apr 2014 12:11:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264818 - stable/10/lib/libc/posix1e X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2014 12:11:15 -0000 Author: brueffer Date: Wed Apr 23 12:11:14 2014 New Revision: 264818 URL: http://svnweb.freebsd.org/changeset/base/264818 Log: MFC: r264507 Mention Capsicum. Modified: stable/10/lib/libc/posix1e/posix1e.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/posix1e/posix1e.3 ============================================================================== --- stable/10/lib/libc/posix1e/posix1e.3 Wed Apr 23 12:09:15 2014 (r264817) +++ stable/10/lib/libc/posix1e/posix1e.3 Wed Apr 23 12:11:14 2014 (r264818) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 7, 2009 +.Dd April 15, 2014 .Dt POSIX1E 3 .Os .Sh NAME @@ -65,6 +65,10 @@ However, does implement the .Xr libbsm audit API. +It also provides +.Xr capsicum 4 , +a lightweight OS capability and sandbox framework implementing a +hybrid capability system model. .Sh ENVIRONMENT POSIX.1e assigns security attributes to all objects, extending the security functionality described in POSIX.1. @@ -89,8 +93,10 @@ for mandatory access control labels. .Xr extattr 2 , .Xr acl 3 , .Xr extattr 3 , +.Xr libcapsicum 3 , .Xr libbsm 3 , .Xr mac 3 , +.Xr capsicum 4 , .Xr ffs 7 , .Xr getfmac 8 , .Xr setfmac 8 , From owner-svn-src-stable@FreeBSD.ORG Wed Apr 23 12:15:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD65B625; Wed, 23 Apr 2014 12:15:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BB911D8B; Wed, 23 Apr 2014 12:15:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3NCFEb5010484; Wed, 23 Apr 2014 12:15:14 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3NCFE7F010483; Wed, 23 Apr 2014 12:15:14 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404231215.s3NCFE7F010483@svn.freebsd.org> From: Christian Brueffer Date: Wed, 23 Apr 2014 12:15:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264819 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2014 12:15:15 -0000 Author: brueffer Date: Wed Apr 23 12:15:14 2014 New Revision: 264819 URL: http://svnweb.freebsd.org/changeset/base/264819 Log: MFC: r264422, r264471 Set buf to NULL only when we don't allocate memory, and free buf unconditionally. Found with: Coverity Prevent(tm) Requested by: kib (r264471) Modified: stable/10/sys/kern/imgact_elf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/imgact_elf.c ============================================================================== --- stable/10/sys/kern/imgact_elf.c Wed Apr 23 12:11:14 2014 (r264818) +++ stable/10/sys/kern/imgact_elf.c Wed Apr 23 12:15:14 2014 (r264819) @@ -1740,14 +1740,16 @@ __elfN(note_threadmd)(void *arg, struct td = (struct thread *)arg; size = *sizep; - buf = NULL; if (size != 0 && sb != NULL) buf = malloc(size, M_TEMP, M_ZERO | M_WAITOK); + else + buf = NULL; size = 0; __elfN(dump_thread)(td, buf, &size); KASSERT(*sizep == size, ("invalid size")); if (size != 0 && sb != NULL) sbuf_bcat(sb, buf, size); + free(buf, M_TEMP); *sizep = size; } From owner-svn-src-stable@FreeBSD.ORG Wed Apr 23 12:16:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 141888F2; Wed, 23 Apr 2014 12:16:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00E921DBE; Wed, 23 Apr 2014 12:16:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3NCGaDY010810; Wed, 23 Apr 2014 12:16:36 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3NCGaNn010809; Wed, 23 Apr 2014 12:16:36 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404231216.s3NCGaNn010809@svn.freebsd.org> From: Christian Brueffer Date: Wed, 23 Apr 2014 12:16:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264820 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2014 12:16:37 -0000 Author: brueffer Date: Wed Apr 23 12:16:36 2014 New Revision: 264820 URL: http://svnweb.freebsd.org/changeset/base/264820 Log: MFC: r264422, r264471 Set buf to NULL only when we don't allocate memory, and free buf unconditionally. Found with: Coverity Prevent(tm) Requested by: kib (r264471) Modified: stable/9/sys/kern/imgact_elf.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/imgact_elf.c ============================================================================== --- stable/9/sys/kern/imgact_elf.c Wed Apr 23 12:15:14 2014 (r264819) +++ stable/9/sys/kern/imgact_elf.c Wed Apr 23 12:16:36 2014 (r264820) @@ -1742,14 +1742,16 @@ __elfN(note_threadmd)(void *arg, struct td = (struct thread *)arg; size = *sizep; - buf = NULL; if (size != 0 && sb != NULL) buf = malloc(size, M_TEMP, M_ZERO | M_WAITOK); + else + buf = NULL; size = 0; __elfN(dump_thread)(td, buf, &size); KASSERT(*sizep == size, ("invalid size")); if (size != 0 && sb != NULL) sbuf_bcat(sb, buf, size); + free(buf, M_TEMP); *sizep = size; } From owner-svn-src-stable@FreeBSD.ORG Wed Apr 23 12:46:28 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7B0C414A; Wed, 23 Apr 2014 12:46:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6778311EA; Wed, 23 Apr 2014 12:46:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3NCkSnZ023328; Wed, 23 Apr 2014 12:46:28 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3NCkSZQ023327; Wed, 23 Apr 2014 12:46:28 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201404231246.s3NCkSZQ023327@svn.freebsd.org> From: Alexander Motin Date: Wed, 23 Apr 2014 12:46:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264821 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2014 12:46:28 -0000 Author: mav Date: Wed Apr 23 12:46:27 2014 New Revision: 264821 URL: http://svnweb.freebsd.org/changeset/base/264821 Log: MFC r264550: Fix VIRTUAL and PROF interval timers for short intervals, broken at r247903. Due to the way those timers are implemented, we can't handle very short intervals. In addition to that mentioned patch caused math overflows for short intervals. To avoid that round those intervals to 1 tick. PR: kern/187668 Modified: stable/10/sys/kern/kern_time.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_time.c ============================================================================== --- stable/10/sys/kern/kern_time.c Wed Apr 23 12:16:36 2014 (r264820) +++ stable/10/sys/kern/kern_time.c Wed Apr 23 12:46:27 2014 (r264821) @@ -774,6 +774,14 @@ kern_setitimer(struct thread *td, u_int timevalsub(&oitv->it_value, &ctv); } } else { + if (aitv->it_interval.tv_sec == 0 && + aitv->it_interval.tv_usec != 0 && + aitv->it_interval.tv_usec < tick) + aitv->it_interval.tv_usec = tick; + if (aitv->it_value.tv_sec == 0 && + aitv->it_value.tv_usec != 0 && + aitv->it_value.tv_usec < tick) + aitv->it_value.tv_usec = tick; PROC_SLOCK(p); *oitv = p->p_stats->p_timer[which]; p->p_stats->p_timer[which] = *aitv; From owner-svn-src-stable@FreeBSD.ORG Thu Apr 24 00:29:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 322079C1; Thu, 24 Apr 2014 00:29:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E77A1ABF; Thu, 24 Apr 2014 00:29:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3O0T2PO023308; Thu, 24 Apr 2014 00:29:02 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3O0T2oK023307; Thu, 24 Apr 2014 00:29:02 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404240029.s3O0T2oK023307@svn.freebsd.org> From: Glen Barber Date: Thu, 24 Apr 2014 00:29:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264847 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Apr 2014 00:29:03 -0000 Author: gjb Date: Thu Apr 24 00:29:02 2014 New Revision: 264847 URL: http://svnweb.freebsd.org/changeset/base/264847 Log: MFC r264731: urndis(4) will first appear in 9.3-RELEASE. Sponsored by: The FreeBSD Foundation Modified: stable/10/share/man/man4/urndis.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/urndis.4 ============================================================================== --- stable/10/share/man/man4/urndis.4 Thu Apr 24 00:27:34 2014 (r264846) +++ stable/10/share/man/man4/urndis.4 Thu Apr 24 00:29:02 2014 (r264847) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 6, 2014 +.Dd April 21, 2014 .Dt URNDIS 4 .Os .Sh NAME @@ -81,7 +81,7 @@ device driver first appeared in The first .Fx release to include it was -.Fx 10.1 . +.Fx 9.3 . .Sh AUTHORS .An -nosplit The From owner-svn-src-stable@FreeBSD.ORG Thu Apr 24 00:29:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B95EEAED; Thu, 24 Apr 2014 00:29:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A5C6A1AC4; Thu, 24 Apr 2014 00:29:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3O0TIiA023381; Thu, 24 Apr 2014 00:29:18 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3O0TIZe023380; Thu, 24 Apr 2014 00:29:18 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404240029.s3O0TIZe023380@svn.freebsd.org> From: Glen Barber Date: Thu, 24 Apr 2014 00:29:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264848 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Apr 2014 00:29:18 -0000 Author: gjb Date: Thu Apr 24 00:29:18 2014 New Revision: 264848 URL: http://svnweb.freebsd.org/changeset/base/264848 Log: MFC r264731: urndis(4) will first appear in 9.3-RELEASE. Sponsored by: The FreeBSD Foundation Modified: stable/9/share/man/man4/urndis.4 Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/urndis.4 ============================================================================== --- stable/9/share/man/man4/urndis.4 Thu Apr 24 00:29:02 2014 (r264847) +++ stable/9/share/man/man4/urndis.4 Thu Apr 24 00:29:18 2014 (r264848) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 6, 2014 +.Dd April 21, 2014 .Dt URNDIS 4 .Os .Sh NAME @@ -81,7 +81,7 @@ device driver first appeared in The first .Fx release to include it was -.Fx 10.1 . +.Fx 9.3 . .Sh AUTHORS .An -nosplit The From owner-svn-src-stable@FreeBSD.ORG Thu Apr 24 04:43:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DFBBD418; Thu, 24 Apr 2014 04:43:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA00C1393; Thu, 24 Apr 2014 04:43:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3O4hokf030796; Thu, 24 Apr 2014 04:43:50 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3O4hooS030793; Thu, 24 Apr 2014 04:43:50 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201404240443.s3O4hooS030793@svn.freebsd.org> From: Bryan Venteicher Date: Thu, 24 Apr 2014 04:43:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264866 - in stable/10: share/man/man4 sys/dev/vmware/vmxnet3 sys/modules/vmware/vmxnet3 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Apr 2014 04:43:51 -0000 Author: bryanv Date: Thu Apr 24 04:43:50 2014 New Revision: 264866 URL: http://svnweb.freebsd.org/changeset/base/264866 Log: MFC r263259 Add Tx/Rx multiqueue support to vmx(4) As a prerequisite for multiple queues, the guest must have MSIX enabled. Unfortunately, to work around device passthrough bugs, FreeBSD disables MSIX when running as a VMWare guest due to the hw.pci.honor_msi_blacklist tunable; this tunable must be disabled for multiple queues. Also included is various minor changes from the projects/vmxnet branch. MFC r264865 Update the date that was missed in r263259 Modified: stable/10/share/man/man4/vmx.4 stable/10/sys/dev/vmware/vmxnet3/if_vmx.c stable/10/sys/dev/vmware/vmxnet3/if_vmxreg.h stable/10/sys/dev/vmware/vmxnet3/if_vmxvar.h stable/10/sys/modules/vmware/vmxnet3/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/vmx.4 ============================================================================== --- stable/10/share/man/man4/vmx.4 Thu Apr 24 03:31:07 2014 (r264865) +++ stable/10/share/man/man4/vmx.4 Thu Apr 24 04:43:50 2014 (r264866) @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 4, 2013 +.Dd March 17, 2014 .Dt VMX 4 .Os .Sh NAME @@ -81,12 +81,35 @@ VMware Fusion 2.0 and newer .Pp For more information on configuring this device, see .Xr ifconfig 8 . +.Sh MULTIPLE QUEUES +The +.Nm +driver supports multiple transmit and receive queues. +Multiple queues are only supported by certain VMware products, such as ESXi. +The number of queues allocated depends on the presence of MSI-X, +the number of configured CPUs, +and the tunables listed below. +.Fx +does not enable MSI-X support on VMware by default. +The +.Va hw.pci.honor_msi_blacklist +tunable must be disabled to enable MSI-X support. .Sh LOADER TUNABLES Tunables can be set at the .Xr loader 8 prompt before booting the kernel or stored in .Xr loader.conf 5 . .Bl -tag -width indent +.It Va hw.vmx.txnqueue +.It Va hw.vmx. Ns Ar X Ns Va .txnqueue +Maximum number of transmit queues allocated by default by the driver. +The default value is 8. +The maximum supported by the VMXNET3 virtual NIC is 8. +.It Va hw.vmx.rxnqueue +.It Va hw.vmx. Ns Ar X Ns Va .rxnqueue +Maximum number of receive queues allocated by default by the driver. +The default value is 8. +The maximum supported by the VMXNET3 virtual NIC is 16. .It Va hw.vmx.txndesc .It Va hw.vmx. Ns Ar X Ns Va .txndesc .Pp Modified: stable/10/sys/dev/vmware/vmxnet3/if_vmx.c ============================================================================== --- stable/10/sys/dev/vmware/vmxnet3/if_vmx.c Thu Apr 24 03:31:07 2014 (r264865) +++ stable/10/sys/dev/vmware/vmxnet3/if_vmx.c Thu Apr 24 04:43:50 2014 (r264866) @@ -32,6 +32,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include @@ -67,9 +69,6 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" #include "opt_inet6.h" -/* Always enable for now - useful for queue hangs. */ -#define VMXNET3_DEBUG_SYSCTL - #ifdef VMXNET3_FAILPOINTS #include static SYSCTL_NODE(DEBUG_FP, OID_AUTO, vmxnet3, CTLFLAG_RW, 0, @@ -86,6 +85,7 @@ static int vmxnet3_alloc_resources(struc static void vmxnet3_free_resources(struct vmxnet3_softc *); static int vmxnet3_check_version(struct vmxnet3_softc *); static void vmxnet3_initial_config(struct vmxnet3_softc *); +static void vmxnet3_check_multiqueue(struct vmxnet3_softc *); static int vmxnet3_alloc_msix_interrupts(struct vmxnet3_softc *); static int vmxnet3_alloc_msi_interrupts(struct vmxnet3_softc *); @@ -102,6 +102,13 @@ static void vmxnet3_free_interrupt(struc struct vmxnet3_interrupt *); static void vmxnet3_free_interrupts(struct vmxnet3_softc *); +#ifndef VMXNET3_LEGACY_TX +static int vmxnet3_alloc_taskqueue(struct vmxnet3_softc *); +static void vmxnet3_start_taskqueue(struct vmxnet3_softc *); +static void vmxnet3_drain_taskqueue(struct vmxnet3_softc *); +static void vmxnet3_free_taskqueue(struct vmxnet3_softc *); +#endif + static int vmxnet3_init_rxq(struct vmxnet3_softc *, int); static int vmxnet3_init_txq(struct vmxnet3_softc *, int); static int vmxnet3_alloc_rxtx_queues(struct vmxnet3_softc *); @@ -120,6 +127,7 @@ static void vmxnet3_free_queue_data(stru static int vmxnet3_alloc_mcast_table(struct vmxnet3_softc *); static void vmxnet3_init_shared_data(struct vmxnet3_softc *); static void vmxnet3_reinit_interface(struct vmxnet3_softc *); +static void vmxnet3_reinit_rss_shared_data(struct vmxnet3_softc *); static void vmxnet3_reinit_shared_data(struct vmxnet3_softc *); static int vmxnet3_alloc_data(struct vmxnet3_softc *); static void vmxnet3_free_data(struct vmxnet3_softc *); @@ -150,13 +158,24 @@ static int vmxnet3_reinit(struct vmxnet3 static void vmxnet3_init_locked(struct vmxnet3_softc *); static void vmxnet3_init(void *); -static int vmxnet3_txq_offload_ctx(struct mbuf *, int *, int *, int *); +static int vmxnet3_txq_offload_ctx(struct vmxnet3_txqueue *,struct mbuf *, + int *, int *, int *); static int vmxnet3_txq_load_mbuf(struct vmxnet3_txqueue *, struct mbuf **, bus_dmamap_t, bus_dma_segment_t [], int *); static void vmxnet3_txq_unload_mbuf(struct vmxnet3_txqueue *, bus_dmamap_t); static int vmxnet3_txq_encap(struct vmxnet3_txqueue *, struct mbuf **); +static void vmxnet3_txq_update_pending(struct vmxnet3_txqueue *); +#ifdef VMXNET3_LEGACY_TX static void vmxnet3_start_locked(struct ifnet *); static void vmxnet3_start(struct ifnet *); +#else +static int vmxnet3_txq_mq_start_locked(struct vmxnet3_txqueue *, + struct mbuf *); +static int vmxnet3_txq_mq_start(struct ifnet *, struct mbuf *); +static void vmxnet3_txq_tq_deferred(void *, int); +#endif +static void vmxnet3_txq_start(struct vmxnet3_txqueue *); +static void vmxnet3_tx_start_all(struct vmxnet3_softc *); static void vmxnet3_update_vlan_filter(struct vmxnet3_softc *, int, uint16_t); @@ -166,7 +185,16 @@ static void vmxnet3_set_rxfilter(struct static int vmxnet3_change_mtu(struct vmxnet3_softc *, int); static int vmxnet3_ioctl(struct ifnet *, u_long, caddr_t); +#ifndef VMXNET3_LEGACY_TX +static void vmxnet3_qflush(struct ifnet *); +#endif + static int vmxnet3_watchdog(struct vmxnet3_txqueue *); +static void vmxnet3_refresh_host_stats(struct vmxnet3_softc *); +static void vmxnet3_txq_accum_stats(struct vmxnet3_txqueue *, + struct vmxnet3_txq_stats *); +static void vmxnet3_rxq_accum_stats(struct vmxnet3_rxqueue *, + struct vmxnet3_rxq_stats *); static void vmxnet3_tick(void *); static void vmxnet3_link_status(struct vmxnet3_softc *); static void vmxnet3_media_status(struct ifnet *, struct ifmediareq *); @@ -211,6 +239,12 @@ typedef enum { static void vmxnet3_barrier(struct vmxnet3_softc *, vmxnet3_barrier_t); /* Tunables. */ +static int vmxnet3_mq_disable = 0; +TUNABLE_INT("hw.vmx.mq_disable", &vmxnet3_mq_disable); +static int vmxnet3_default_txnqueue = VMXNET3_DEF_TX_QUEUES; +TUNABLE_INT("hw.vmx.txnqueue", &vmxnet3_default_txnqueue); +static int vmxnet3_default_rxnqueue = VMXNET3_DEF_RX_QUEUES; +TUNABLE_INT("hw.vmx.rxnqueue", &vmxnet3_default_rxnqueue); static int vmxnet3_default_txndesc = VMXNET3_DEF_TX_NDESC; TUNABLE_INT("hw.vmx.txndesc", &vmxnet3_default_txndesc); static int vmxnet3_default_rxndesc = VMXNET3_DEF_RX_NDESC; @@ -280,10 +314,18 @@ vmxnet3_attach(device_t dev) if (error) goto fail; +#ifndef VMXNET3_LEGACY_TX + error = vmxnet3_alloc_taskqueue(sc); + if (error) + goto fail; +#endif + error = vmxnet3_alloc_interrupts(sc); if (error) goto fail; + vmxnet3_check_multiqueue(sc); + error = vmxnet3_alloc_data(sc); if (error) goto fail; @@ -300,7 +342,9 @@ vmxnet3_attach(device_t dev) } vmxnet3_setup_sysctl(sc); - vmxnet3_link_status(sc); +#ifndef VMXNET3_LEGACY_TX + vmxnet3_start_taskqueue(sc); +#endif fail: if (error) @@ -319,11 +363,16 @@ vmxnet3_detach(device_t dev) ifp = sc->vmx_ifp; if (device_is_attached(dev)) { - ether_ifdetach(ifp); VMXNET3_CORE_LOCK(sc); vmxnet3_stop(sc); VMXNET3_CORE_UNLOCK(sc); + callout_drain(&sc->vmx_tick); +#ifndef VMXNET3_LEGACY_TX + vmxnet3_drain_taskqueue(sc); +#endif + + ether_ifdetach(ifp); } if (sc->vmx_vlan_attach != NULL) { @@ -335,6 +384,9 @@ vmxnet3_detach(device_t dev) sc->vmx_vlan_detach = NULL; } +#ifndef VMXNET3_LEGACY_TX + vmxnet3_free_taskqueue(sc); +#endif vmxnet3_free_interrupts(sc); if (ifp != NULL) { @@ -461,14 +513,26 @@ vmxnet3_check_version(struct vmxnet3_sof static void vmxnet3_initial_config(struct vmxnet3_softc *sc) { - int ndesc; + int nqueue, ndesc; - /* - * BMV Much of the work is already done, but this driver does - * not support multiqueue yet. - */ - sc->vmx_ntxqueues = VMXNET3_TX_QUEUES; - sc->vmx_nrxqueues = VMXNET3_RX_QUEUES; + nqueue = vmxnet3_tunable_int(sc, "txnqueue", vmxnet3_default_txnqueue); + if (nqueue > VMXNET3_MAX_TX_QUEUES || nqueue < 1) + nqueue = VMXNET3_DEF_TX_QUEUES; + if (nqueue > mp_ncpus) + nqueue = mp_ncpus; + sc->vmx_max_ntxqueues = nqueue; + + nqueue = vmxnet3_tunable_int(sc, "rxnqueue", vmxnet3_default_rxnqueue); + if (nqueue > VMXNET3_MAX_RX_QUEUES || nqueue < 1) + nqueue = VMXNET3_DEF_RX_QUEUES; + if (nqueue > mp_ncpus) + nqueue = mp_ncpus; + sc->vmx_max_nrxqueues = nqueue; + + if (vmxnet3_tunable_int(sc, "mq_disable", vmxnet3_mq_disable)) { + sc->vmx_max_nrxqueues = 1; + sc->vmx_max_ntxqueues = 1; + } ndesc = vmxnet3_tunable_int(sc, "txd", vmxnet3_default_txndesc); if (ndesc > VMXNET3_MAX_TX_NDESC || ndesc < VMXNET3_MIN_TX_NDESC) @@ -486,6 +550,27 @@ vmxnet3_initial_config(struct vmxnet3_so sc->vmx_max_rxsegs = VMXNET3_MAX_RX_SEGS; } +static void +vmxnet3_check_multiqueue(struct vmxnet3_softc *sc) +{ + + if (sc->vmx_intr_type != VMXNET3_IT_MSIX) + goto out; + + /* BMV: Just use the maximum configured for now. */ + sc->vmx_nrxqueues = sc->vmx_max_nrxqueues; + sc->vmx_ntxqueues = sc->vmx_max_ntxqueues; + + if (sc->vmx_nrxqueues > 1) + sc->vmx_flags |= VMXNET3_FLAG_RSS; + + return; + +out: + sc->vmx_ntxqueues = 1; + sc->vmx_nrxqueues = 1; +} + static int vmxnet3_alloc_msix_interrupts(struct vmxnet3_softc *sc) { @@ -498,7 +583,7 @@ vmxnet3_alloc_msix_interrupts(struct vmx return (1); /* Allocate an additional vector for the events interrupt. */ - required = sc->vmx_nrxqueues + sc->vmx_ntxqueues + 1; + required = sc->vmx_max_nrxqueues + sc->vmx_max_ntxqueues + 1; nmsix = pci_msix_count(dev); if (nmsix < required) @@ -511,6 +596,8 @@ vmxnet3_alloc_msix_interrupts(struct vmx } else pci_release_msi(dev); + /* BMV TODO Fallback to sharing MSIX vectors if possible. */ + return (1); } @@ -584,10 +671,6 @@ vmxnet3_alloc_intr_resources(struct vmxn return (0); } -/* - * NOTE: We only support the simple case of each Rx and Tx queue on its - * own MSIX vector. This is good enough until we support mulitqueue. - */ static int vmxnet3_setup_msix_interrupts(struct vmxnet3_softc *sc) { @@ -649,10 +732,6 @@ vmxnet3_setup_legacy_interrupt(struct vm return (error); } -/* - * XXX BMV Should probably reorganize the attach and just do - * this in vmxnet3_init_shared_data(). - */ static void vmxnet3_set_interrupt_idx(struct vmxnet3_softc *sc) { @@ -782,6 +861,71 @@ vmxnet3_free_interrupts(struct vmxnet3_s pci_release_msi(sc->vmx_dev); } +#ifndef VMXNET3_LEGACY_TX +static int +vmxnet3_alloc_taskqueue(struct vmxnet3_softc *sc) +{ + device_t dev; + + dev = sc->vmx_dev; + + sc->vmx_tq = taskqueue_create(device_get_nameunit(dev), M_NOWAIT, + taskqueue_thread_enqueue, &sc->vmx_tq); + if (sc->vmx_tq == NULL) + return (ENOMEM); + + return (0); +} + +static void +vmxnet3_start_taskqueue(struct vmxnet3_softc *sc) +{ + device_t dev; + int nthreads, error; + + dev = sc->vmx_dev; + + /* + * The taskqueue is typically not frequently used, so a dedicated + * thread for each queue is unnecessary. + */ + nthreads = MAX(1, sc->vmx_ntxqueues / 2); + + /* + * Most drivers just ignore the return value - it only fails + * with ENOMEM so an error is not likely. It is hard for us + * to recover from an error here. + */ + error = taskqueue_start_threads(&sc->vmx_tq, nthreads, PI_NET, + "%s taskq", device_get_nameunit(dev)); + if (error) + device_printf(dev, "failed to start taskqueue: %d", error); +} + +static void +vmxnet3_drain_taskqueue(struct vmxnet3_softc *sc) +{ + struct vmxnet3_txqueue *txq; + int i; + + if (sc->vmx_tq != NULL) { + for (i = 0; i < sc->vmx_max_ntxqueues; i++) { + txq = &sc->vmx_txq[i]; + taskqueue_drain(sc->vmx_tq, &txq->vxtxq_defrtask); + } + } +} + +static void +vmxnet3_free_taskqueue(struct vmxnet3_softc *sc) +{ + if (sc->vmx_tq != NULL) { + taskqueue_free(sc->vmx_tq); + sc->vmx_tq = NULL; + } +} +#endif + static int vmxnet3_init_rxq(struct vmxnet3_softc *sc, int q) { @@ -837,6 +981,15 @@ vmxnet3_init_txq(struct vmxnet3_softc *s txq->vxtxq_comp_ring.vxcr_ndesc = sc->vmx_ntxdescs; +#ifndef VMXNET3_LEGACY_TX + TASK_INIT(&txq->vxtxq_defrtask, 0, vmxnet3_txq_tq_deferred, txq); + + txq->vxtxq_br = buf_ring_alloc(VMXNET3_DEF_BUFRING_SIZE, M_DEVBUF, + M_NOWAIT, &txq->vxtxq_mtx); + if (txq->vxtxq_br == NULL) + return (ENOMEM); +#endif + return (0); } @@ -845,20 +998,32 @@ vmxnet3_alloc_rxtx_queues(struct vmxnet3 { int i, error; + /* + * Only attempt to create multiple queues if MSIX is available. MSIX is + * disabled by default because its apparently broken for devices passed + * through by at least ESXi 5.1. The hw.pci.honor_msi_blacklist tunable + * must be set to zero for MSIX. This check prevents us from allocating + * queue structures that we will not use. + */ + if (sc->vmx_flags & VMXNET3_FLAG_NO_MSIX) { + sc->vmx_max_nrxqueues = 1; + sc->vmx_max_ntxqueues = 1; + } + sc->vmx_rxq = malloc(sizeof(struct vmxnet3_rxqueue) * - sc->vmx_nrxqueues, M_DEVBUF, M_NOWAIT | M_ZERO); + sc->vmx_max_nrxqueues, M_DEVBUF, M_NOWAIT | M_ZERO); sc->vmx_txq = malloc(sizeof(struct vmxnet3_txqueue) * - sc->vmx_ntxqueues, M_DEVBUF, M_NOWAIT | M_ZERO); + sc->vmx_max_ntxqueues, M_DEVBUF, M_NOWAIT | M_ZERO); if (sc->vmx_rxq == NULL || sc->vmx_txq == NULL) return (ENOMEM); - for (i = 0; i < sc->vmx_nrxqueues; i++) { + for (i = 0; i < sc->vmx_max_nrxqueues; i++) { error = vmxnet3_init_rxq(sc, i); if (error) return (error); } - for (i = 0; i < sc->vmx_ntxqueues; i++) { + for (i = 0; i < sc->vmx_max_ntxqueues; i++) { error = vmxnet3_init_txq(sc, i); if (error) return (error); @@ -899,6 +1064,13 @@ vmxnet3_destroy_txq(struct vmxnet3_txque txq->vxtxq_sc = NULL; txq->vxtxq_id = -1; +#ifndef VMXNET3_LEGACY_TX + if (txq->vxtxq_br != NULL) { + buf_ring_free(txq->vxtxq_br, M_DEVBUF); + txq->vxtxq_br = NULL; + } +#endif + if (txr->vxtxr_txbuf != NULL) { free(txr->vxtxr_txbuf, M_DEVBUF); txr->vxtxr_txbuf = NULL; @@ -914,14 +1086,14 @@ vmxnet3_free_rxtx_queues(struct vmxnet3_ int i; if (sc->vmx_rxq != NULL) { - for (i = 0; i < sc->vmx_nrxqueues; i++) + for (i = 0; i < sc->vmx_max_nrxqueues; i++) vmxnet3_destroy_rxq(&sc->vmx_rxq[i]); free(sc->vmx_rxq, M_DEVBUF); sc->vmx_rxq = NULL; } if (sc->vmx_txq != NULL) { - for (i = 0; i < sc->vmx_ntxqueues; i++) + for (i = 0; i < sc->vmx_max_ntxqueues; i++) vmxnet3_destroy_txq(&sc->vmx_txq[i]); free(sc->vmx_txq, M_DEVBUF); sc->vmx_txq = NULL; @@ -965,6 +1137,17 @@ vmxnet3_alloc_shared_data(struct vmxnet3 kva += sizeof(struct vmxnet3_rxq_shared); } + if (sc->vmx_flags & VMXNET3_FLAG_RSS) { + size = sizeof(struct vmxnet3_rss_shared); + error = vmxnet3_dma_malloc(sc, size, 128, &sc->vmx_rss_dma); + if (error) { + device_printf(dev, "cannot alloc rss shared memory\n"); + return (error); + } + sc->vmx_rss = + (struct vmxnet3_rss_shared *) sc->vmx_rss_dma.dma_vaddr; + } + return (0); } @@ -972,6 +1155,11 @@ static void vmxnet3_free_shared_data(struct vmxnet3_softc *sc) { + if (sc->vmx_rss != NULL) { + vmxnet3_dma_free(sc, &sc->vmx_rss_dma); + sc->vmx_rss = NULL; + } + if (sc->vmx_qs != NULL) { vmxnet3_dma_free(sc, &sc->vmx_qs_dma); sc->vmx_qs = NULL; @@ -1008,7 +1196,7 @@ vmxnet3_alloc_txq_data(struct vmxnet3_so BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - VMXNET3_TSO_MAXSIZE, /* maxsize */ + VMXNET3_TX_MAXSIZE, /* maxsize */ VMXNET3_TX_MAXSEGS, /* nsegments */ VMXNET3_TX_MAXSEGSIZE, /* maxsegsize */ 0, /* flags */ @@ -1333,6 +1521,13 @@ vmxnet3_init_shared_data(struct vmxnet3_ ds->queue_shared_len = sc->vmx_qs_dma.dma_size; ds->nrxsg_max = sc->vmx_max_rxsegs; + /* RSS conf */ + if (sc->vmx_flags & VMXNET3_FLAG_RSS) { + ds->rss.version = 1; + ds->rss.paddr = sc->vmx_rss_dma.dma_paddr; + ds->rss.len = sc->vmx_rss_dma.dma_size; + } + /* Interrupt control. */ ds->automask = sc->vmx_intr_mask_mode == VMXNET3_IMM_AUTO; ds->nintr = sc->vmx_nintrs; @@ -1392,9 +1587,43 @@ vmxnet3_reinit_interface(struct vmxnet3_ if (ifp->if_capenable & IFCAP_TXCSUM_IPV6) ifp->if_hwassist |= VMXNET3_CSUM_OFFLOAD_IPV6; if (ifp->if_capenable & IFCAP_TSO4) - ifp->if_hwassist |= CSUM_TSO; + ifp->if_hwassist |= CSUM_IP_TSO; if (ifp->if_capenable & IFCAP_TSO6) - ifp->if_hwassist |= CSUM_TSO; /* No CSUM_TSO_IPV6. */ + ifp->if_hwassist |= CSUM_IP6_TSO; +} + +static void +vmxnet3_reinit_rss_shared_data(struct vmxnet3_softc *sc) +{ + /* + * Use the same key as the Linux driver until FreeBSD can do + * RSS (presumably Toeplitz) in software. + */ + static const uint8_t rss_key[UPT1_RSS_MAX_KEY_SIZE] = { + 0x3b, 0x56, 0xd1, 0x56, 0x13, 0x4a, 0xe7, 0xac, + 0xe8, 0x79, 0x09, 0x75, 0xe8, 0x65, 0x79, 0x28, + 0x35, 0x12, 0xb9, 0x56, 0x7c, 0x76, 0x4b, 0x70, + 0xd8, 0x56, 0xa3, 0x18, 0x9b, 0x0a, 0xee, 0xf3, + 0x96, 0xa6, 0x9f, 0x8f, 0x9e, 0x8c, 0x90, 0xc9, + }; + + struct vmxnet3_driver_shared *ds; + struct vmxnet3_rss_shared *rss; + int i; + + ds = sc->vmx_ds; + rss = sc->vmx_rss; + + rss->hash_type = + UPT1_RSS_HASH_TYPE_IPV4 | UPT1_RSS_HASH_TYPE_TCP_IPV4 | + UPT1_RSS_HASH_TYPE_IPV6 | UPT1_RSS_HASH_TYPE_TCP_IPV6; + rss->hash_func = UPT1_RSS_HASH_FUNC_TOEPLITZ; + rss->hash_key_size = UPT1_RSS_MAX_KEY_SIZE; + rss->ind_table_size = UPT1_RSS_MAX_IND_TABLE_SIZE; + memcpy(rss->hash_key, rss_key, UPT1_RSS_MAX_KEY_SIZE); + + for (i = 0; i < UPT1_RSS_MAX_IND_TABLE_SIZE; i++) + rss->ind_table[i] = i % sc->vmx_nrxqueues; } static void @@ -1406,6 +1635,10 @@ vmxnet3_reinit_shared_data(struct vmxnet ifp = sc->vmx_ifp; ds = sc->vmx_ds; + ds->mtu = ifp->if_mtu; + ds->ntxqueue = sc->vmx_ntxqueues; + ds->nrxqueue = sc->vmx_nrxqueues; + ds->upt_features = 0; if (ifp->if_capenable & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) ds->upt_features |= UPT1_F_CSUM; @@ -1414,9 +1647,10 @@ vmxnet3_reinit_shared_data(struct vmxnet if (ifp->if_capenable & IFCAP_LRO) ds->upt_features |= UPT1_F_LRO; - ds->mtu = ifp->if_mtu; - ds->ntxqueue = sc->vmx_ntxqueues; - ds->nrxqueue = sc->vmx_nrxqueues; + if (sc->vmx_flags & VMXNET3_FLAG_RSS) { + ds->upt_features |= UPT1_F_RSS; + vmxnet3_reinit_rss_shared_data(sc); + } vmxnet3_write_bar1(sc, VMXNET3_BAR1_DSL, sc->vmx_ds_dma.dma_paddr); vmxnet3_write_bar1(sc, VMXNET3_BAR1_DSH, @@ -1471,17 +1705,26 @@ vmxnet3_setup_interface(struct vmxnet3_s if_initname(ifp, device_get_name(dev), device_get_unit(dev)); #if __FreeBSD_version < 1000025 ifp->if_baudrate = 1000000000; -#else +#elif __FreeBSD_version < 1100011 if_initbaudrate(ifp, IF_Gbps(10)); +#else + ifp->if_baudrate = IF_Gbps(10); #endif ifp->if_softc = sc; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_init = vmxnet3_init; ifp->if_ioctl = vmxnet3_ioctl; + ifp->if_hw_tsomax = VMXNET3_TSO_MAXSIZE; + +#ifdef VMXNET3_LEGACY_TX ifp->if_start = vmxnet3_start; ifp->if_snd.ifq_drv_maxlen = sc->vmx_ntxdescs - 1; IFQ_SET_MAXLEN(&ifp->if_snd, sc->vmx_ntxdescs - 1); IFQ_SET_READY(&ifp->if_snd); +#else + ifp->if_transmit = vmxnet3_txq_mq_start; + ifp->if_qflush = vmxnet3_qflush; +#endif vmxnet3_get_lladdr(sc); ether_ifattach(ifp, sc->vmx_lladdr); @@ -1529,8 +1772,11 @@ vmxnet3_evintr(struct vmxnet3_softc *sc) event = sc->vmx_ds->event; vmxnet3_write_bar1(sc, VMXNET3_BAR1_EVENT, event); - if (event & VMXNET3_EVENT_LINK) + if (event & VMXNET3_EVENT_LINK) { vmxnet3_link_status(sc); + if (sc->vmx_link_active != 0) + vmxnet3_tx_start_all(sc); + } if (event & (VMXNET3_EVENT_TQERROR | VMXNET3_EVENT_RQERROR)) { reset = 1; @@ -1566,6 +1812,7 @@ vmxnet3_txq_eof(struct vmxnet3_txqueue * struct vmxnet3_comp_ring *txc; struct vmxnet3_txcompdesc *txcd; struct vmxnet3_txbuf *txb; + struct mbuf *m; u_int sop; sc = txq->vxtxq_sc; @@ -1589,15 +1836,18 @@ vmxnet3_txq_eof(struct vmxnet3_txqueue * sop = txr->vxtxr_next; txb = &txr->vxtxr_txbuf[sop]; - if (txb->vtxb_m != NULL) { + if ((m = txb->vtxb_m) != NULL) { bus_dmamap_sync(txr->vxtxr_txtag, txb->vtxb_dmamap, BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(txr->vxtxr_txtag, txb->vtxb_dmamap); - m_freem(txb->vtxb_m); - txb->vtxb_m = NULL; + txq->vxtxq_stats.vmtxs_opackets++; + txq->vxtxq_stats.vmtxs_obytes += m->m_pkthdr.len; + if (m->m_flags & M_MCAST) + txq->vxtxq_stats.vmtxs_omcasts++; - ifp->if_opackets++; + m_freem(m); + txb->vtxb_m = NULL; } txr->vxtxr_next = (txcd->eop_idx + 1) % txr->vxtxr_ndesc; @@ -1771,11 +2021,39 @@ vmxnet3_rxq_input(struct vmxnet3_rxqueue ifp = sc->vmx_ifp; if (rxcd->error) { - ifp->if_ierrors++; + rxq->vxrxq_stats.vmrxs_ierrors++; m_freem(m); return; } +#ifdef notyet + switch (rxcd->rss_type) { + case VMXNET3_RCD_RSS_TYPE_IPV4: + m->m_pkthdr.flowid = rxcd->rss_hash; + M_HASHTYPE_SET(m, M_HASHTYPE_RSS_IPV4); + break; + case VMXNET3_RCD_RSS_TYPE_TCPIPV4: + m->m_pkthdr.flowid = rxcd->rss_hash; + M_HASHTYPE_SET(m, M_HASHTYPE_RSS_TCP_IPV4); + break; + case VMXNET3_RCD_RSS_TYPE_IPV6: + m->m_pkthdr.flowid = rxcd->rss_hash; + M_HASHTYPE_SET(m, M_HASHTYPE_RSS_IPV6); + break; + case VMXNET3_RCD_RSS_TYPE_TCPIPV6: + m->m_pkthdr.flowid = rxcd->rss_hash; + M_HASHTYPE_SET(m, M_HASHTYPE_RSS_TCP_IPV6); + break; + default: /* VMXNET3_RCD_RSS_TYPE_NONE */ + m->m_pkthdr.flowid = rxq->vxrxq_id; + M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); + break; + } +#else + m->m_pkthdr.flowid = rxq->vxrxq_id; + m->m_flags |= M_FLOWID; +#endif + if (!rxcd->no_csum) vmxnet3_rx_csum(rxcd, m); if (rxcd->vlan) { @@ -1783,7 +2061,9 @@ vmxnet3_rxq_input(struct vmxnet3_rxqueue m->m_pkthdr.ether_vtag = rxcd->vtag; } - ifp->if_ipackets++; + rxq->vxrxq_stats.vmrxs_ipackets++; + rxq->vxrxq_stats.vmrxs_ibytes += m->m_pkthdr.len; + VMXNET3_RXQ_UNLOCK(rxq); (*ifp->if_input)(ifp, m); VMXNET3_RXQ_LOCK(rxq); @@ -1865,7 +2145,7 @@ vmxnet3_rxq_eof(struct vmxnet3_rxqueue * } if (vmxnet3_newbuf(sc, rxr) != 0) { - ifp->if_iqdrops++; + rxq->vxrxq_stats.vmrxs_iqdrops++; vmxnet3_rxq_eof_discard(rxq, rxr, idx); if (!rxcd->eop) vmxnet3_rxq_discard_chain(rxq); @@ -1884,7 +2164,7 @@ vmxnet3_rxq_eof(struct vmxnet3_rxqueue * ("%s: frame not started?", __func__)); if (vmxnet3_newbuf(sc, rxr) != 0) { - ifp->if_iqdrops++; + rxq->vxrxq_stats.vmrxs_iqdrops++; vmxnet3_rxq_eof_discard(rxq, rxr, idx); if (!rxcd->eop) vmxnet3_rxq_discard_chain(rxq); @@ -1953,8 +2233,7 @@ vmxnet3_legacy_intr(void *xsc) VMXNET3_TXQ_LOCK(txq); vmxnet3_txq_eof(txq); - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - vmxnet3_start_locked(ifp); + vmxnet3_txq_start(txq); VMXNET3_TXQ_UNLOCK(txq); vmxnet3_enable_all_intrs(sc); @@ -1976,8 +2255,7 @@ vmxnet3_txq_intr(void *xtxq) VMXNET3_TXQ_LOCK(txq); vmxnet3_txq_eof(txq); - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - vmxnet3_start_locked(ifp); + vmxnet3_txq_start(txq); VMXNET3_TXQ_UNLOCK(txq); vmxnet3_enable_intr(sc, txq->vxtxq_intr_idx); @@ -2056,6 +2334,7 @@ vmxnet3_rxstop(struct vmxnet3_softc *sc, if (rxb->vrxb_m == NULL) continue; + bus_dmamap_sync(rxr->vxrxr_rxtag, rxb->vrxb_dmamap, BUS_DMASYNC_POSTREAD); bus_dmamap_unload(rxr->vxrxr_rxtag, rxb->vrxb_dmamap); @@ -2318,7 +2597,8 @@ vmxnet3_init(void *xsc) * the mbuf packet header. Bug andre@. */ static int -vmxnet3_txq_offload_ctx(struct mbuf *m, int *etype, int *proto, int *start) +vmxnet3_txq_offload_ctx(struct vmxnet3_txqueue *txq, struct mbuf *m, + int *etype, int *proto, int *start) { struct ether_vlan_header *evh; int offset; @@ -2342,7 +2622,7 @@ vmxnet3_txq_offload_ctx(struct mbuf *m, (caddr_t) &iphdr); ip = &iphdr; } else - ip = (struct ip *)(m->m_data + offset); + ip = mtodo(m, offset); *proto = ip->ip_p; *start = offset + (ip->ip_hl << 2); break; @@ -2370,19 +2650,21 @@ vmxnet3_txq_offload_ctx(struct mbuf *m, return (EINVAL); } - if (m->m_len < *start + sizeof(struct tcphdr)) { - m_copydata(m, offset, sizeof(struct tcphdr), - (caddr_t) &tcphdr); - tcp = &tcphdr; - } else - tcp = (struct tcphdr *)(m->m_data + *start); + txq->vxtxq_stats.vmtxs_tso++; /* * For TSO, the size of the protocol header is also * included in the descriptor header size. */ + if (m->m_len < *start + sizeof(struct tcphdr)) { + m_copydata(m, offset, sizeof(struct tcphdr), + (caddr_t) &tcphdr); + tcp = &tcphdr; + } else + tcp = mtodo(m, *start); *start += (tcp->th_off << 2); - } + } else + txq->vxtxq_stats.vmtxs_csum++; return (0); } @@ -2394,18 +2676,17 @@ vmxnet3_txq_load_mbuf(struct vmxnet3_txq struct vmxnet3_txring *txr; struct mbuf *m; bus_dma_tag_t tag; - int maxsegs, error; + int error; txr = &txq->vxtxq_cmd_ring; m = *m0; tag = txr->vxtxr_txtag; - maxsegs = VMXNET3_TX_MAXSEGS; error = bus_dmamap_load_mbuf_sg(tag, dmap, m, segs, nsegs, 0); if (error == 0 || error != EFBIG) return (error); - m = m_collapse(m, M_NOWAIT, maxsegs); + m = m_defrag(m, M_NOWAIT); if (m != NULL) { *m0 = m; error = bus_dmamap_load_mbuf_sg(tag, dmap, m, segs, nsegs, 0); @@ -2415,8 +2696,9 @@ vmxnet3_txq_load_mbuf(struct vmxnet3_txq if (error) { m_freem(*m0); *m0 = NULL; + txq->vxtxq_sc->vmx_stats.vmst_defrag_failed++; } else - txq->vxtxq_sc->vmx_stats.vmst_collapsed++; + txq->vxtxq_sc->vmx_stats.vmst_defragged++; return (error); } @@ -2459,13 +2741,13 @@ vmxnet3_txq_encap(struct vmxnet3_txqueue ("%s: mbuf %p with too many segments %d", __func__, m, nsegs)); if (VMXNET3_TXRING_AVAIL(txr) < nsegs) { - txq->vxtxq_stats.vtxrs_full++; + txq->vxtxq_stats.vmtxs_full++; vmxnet3_txq_unload_mbuf(txq, dmap); return (ENOSPC); } else if (m->m_pkthdr.csum_flags & VMXNET3_CSUM_ALL_OFFLOAD) { - error = vmxnet3_txq_offload_ctx(m, &etype, &proto, &start); + error = vmxnet3_txq_offload_ctx(txq, m, &etype, &proto, &start); if (error) { - txq->vxtxq_stats.vtxrs_offload_failed++; + txq->vxtxq_stats.vmtxs_offload_failed++; vmxnet3_txq_unload_mbuf(txq, dmap); m_freem(m); *m0 = NULL; @@ -2531,6 +2813,22 @@ vmxnet3_txq_encap(struct vmxnet3_txqueue } static void +vmxnet3_txq_update_pending(struct vmxnet3_txqueue *txq) +{ + struct vmxnet3_txring *txr; + + txr = &txq->vxtxq_cmd_ring; + + if (txq->vxtxq_ts->npending > 0) { + txq->vxtxq_ts->npending = 0; + vmxnet3_write_bar0(txq->vxtxq_sc, + VMXNET3_BAR0_TXH(txq->vxtxq_id), txr->vxtxr_head); + } +} + +#ifdef VMXNET3_LEGACY_TX + +static void vmxnet3_start_locked(struct ifnet *ifp) { struct vmxnet3_softc *sc; @@ -2575,11 +2873,7 @@ vmxnet3_start_locked(struct ifnet *ifp) } if (tx > 0) { - if (txq->vxtxq_ts->npending > 0) { - txq->vxtxq_ts->npending = 0; - vmxnet3_write_bar0(sc, VMXNET3_BAR0_TXH(txq->vxtxq_id), - txr->vxtxr_head); - } + vmxnet3_txq_update_pending(txq); txq->vxtxq_watchdog = VMXNET3_WATCHDOG_TIMEOUT; } } @@ -2598,6 +2892,153 @@ vmxnet3_start(struct ifnet *ifp) VMXNET3_TXQ_UNLOCK(txq); } +#else /* !VMXNET3_LEGACY_TX */ + +static int +vmxnet3_txq_mq_start_locked(struct vmxnet3_txqueue *txq, struct mbuf *m) +{ + struct vmxnet3_softc *sc; + struct vmxnet3_txring *txr; + struct buf_ring *br; + struct ifnet *ifp; + int tx, avail, error; + + sc = txq->vxtxq_sc; + br = txq->vxtxq_br; + ifp = sc->vmx_ifp; + txr = &txq->vxtxq_cmd_ring; + tx = 0; + error = 0; + + VMXNET3_TXQ_LOCK_ASSERT(txq); + + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || + sc->vmx_link_active == 0) { + if (m != NULL) + error = drbr_enqueue(ifp, br, m); + return (error); + } + + if (m != NULL) { + error = drbr_enqueue(ifp, br, m); + if (error) + return (error); + } + + while ((avail = VMXNET3_TXRING_AVAIL(txr)) >= 2) { + m = drbr_peek(ifp, br); + if (m == NULL) + break; + + /* Assume worse case if this mbuf is the head of a chain. */ + if (m->m_next != NULL && avail < VMXNET3_TX_MAXSEGS) { + drbr_putback(ifp, br, m); + error = ENOBUFS; + break; + } + + error = vmxnet3_txq_encap(txq, &m); + if (error) { + if (m != NULL) + drbr_putback(ifp, br, m); + else + drbr_advance(ifp, br); + break; + } + drbr_advance(ifp, br); + + tx++; + ETHER_BPF_MTAP(ifp, m); + } + + if (tx > 0) { + vmxnet3_txq_update_pending(txq); + txq->vxtxq_watchdog = VMXNET3_WATCHDOG_TIMEOUT; + } + + return (error); +} + +static int +vmxnet3_txq_mq_start(struct ifnet *ifp, struct mbuf *m) +{ + struct vmxnet3_softc *sc; + struct vmxnet3_txqueue *txq; + int i, ntxq, error; + + sc = ifp->if_softc; + ntxq = sc->vmx_ntxqueues; + + if (m->m_flags & M_FLOWID) + i = m->m_pkthdr.flowid % ntxq; + else + i = curcpu % ntxq; + + txq = &sc->vmx_txq[i]; + + if (VMXNET3_TXQ_TRYLOCK(txq) != 0) { + error = vmxnet3_txq_mq_start_locked(txq, m); + VMXNET3_TXQ_UNLOCK(txq); + } else { + error = drbr_enqueue(ifp, txq->vxtxq_br, m); + taskqueue_enqueue(sc->vmx_tq, &txq->vxtxq_defrtask); + } + + return (error); +} + +static void +vmxnet3_txq_tq_deferred(void *xtxq, int pending) +{ + struct vmxnet3_softc *sc; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu Apr 24 10:22:01 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4907C59D; Thu, 24 Apr 2014 10:22:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 295D61503; Thu, 24 Apr 2014 10:22:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3OAM1OI068590; Thu, 24 Apr 2014 10:22:01 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3OAM1qQ068589; Thu, 24 Apr 2014 10:22:01 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201404241022.s3OAM1qQ068589@svn.freebsd.org> From: Alexander Motin Date: Thu, 24 Apr 2014 10:22:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264868 - stable/10/sys/geom/raid X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Apr 2014 10:22:01 -0000 Author: mav Date: Thu Apr 24 10:22:00 2014 New Revision: 264868 URL: http://svnweb.freebsd.org/changeset/base/264868 Log: MFC r264318: Fix wrong sizes used to access PD_Type and PD_State DDF metadata fields. This caused incorrect behavior of arrays with big-endian DDF metadata. Little-endian (like used by Adaptec controllers) should not be harmed. Add workaround should be enough to manage compatibility. Modified: stable/10/sys/geom/raid/md_ddf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/raid/md_ddf.c ============================================================================== --- stable/10/sys/geom/raid/md_ddf.c Thu Apr 24 05:04:54 2014 (r264867) +++ stable/10/sys/geom/raid/md_ddf.c Thu Apr 24 10:22:00 2014 (r264868) @@ -1182,6 +1182,28 @@ hdrerror: g_free(buf); if (GET32(meta, pdr->Signature) != DDF_PDR_SIGNATURE) goto hdrerror; + /* + * Workaround for reading metadata corrupted due to graid bug. + * XXX: Remove this before we have disks above 128PB. :) + */ + if (meta->bigendian) { + for (i = 0; i < GET16(meta, pdr->Populated_PDEs); i++) { + if (isff(meta->pdr->entry[i].PD_GUID, 24)) + continue; + if (GET32(meta, pdr->entry[i].PD_Reference) == + 0xffffffff) + continue; + if (GET64(meta, pdr->entry[i].Configured_Size) >= + (1ULL << 48)) { + SET16(meta, pdr->entry[i].PD_State, + GET16(meta, pdr->entry[i].PD_State) & + ~DDF_PDE_FAILED); + SET64(meta, pdr->entry[i].Configured_Size, + GET64(meta, pdr->entry[i].Configured_Size) & + ((1ULL << 48) - 1)); + } + } + } /* Read virtual disk records. */ buf = g_read_data(cp, (lba + GET32(meta, hdr->vdr_section)) * ss, @@ -1711,7 +1733,7 @@ nofit: /* Welcome the new disk. */ if (resurrection) g_raid_change_disk_state(disk, G_RAID_DISK_S_ACTIVE); - else if (GET8(gmeta, pdr->entry[md_pde_pos].PD_State) & DDF_PDE_PFA) + else if (GET16(gmeta, pdr->entry[md_pde_pos].PD_State) & DDF_PDE_PFA) g_raid_change_disk_state(disk, G_RAID_DISK_S_FAILED); else g_raid_change_disk_state(disk, G_RAID_DISK_S_ACTIVE); @@ -1730,11 +1752,11 @@ nofit: /* Stale disk, almost same as new. */ g_raid_change_subdisk_state(sd, G_RAID_SUBDISK_S_NEW); - } else if (GET8(gmeta, pdr->entry[md_pde_pos].PD_State) & DDF_PDE_PFA) { + } else if (GET16(gmeta, pdr->entry[md_pde_pos].PD_State) & DDF_PDE_PFA) { /* Failed disk. */ g_raid_change_subdisk_state(sd, G_RAID_SUBDISK_S_FAILED); - } else if ((GET8(gmeta, pdr->entry[md_pde_pos].PD_State) & + } else if ((GET16(gmeta, pdr->entry[md_pde_pos].PD_State) & (DDF_PDE_FAILED | DDF_PDE_REBUILD)) != 0) { /* Rebuilding disk. */ g_raid_change_subdisk_state(sd, @@ -2833,24 +2855,24 @@ g_raid_md_write_ddf(struct g_raid_md_obj GET32(vmeta, bvdc[bvd]->Physical_Disk_Sequence[pos])); if (j < 0) continue; - SET32(gmeta, pdr->entry[j].PD_Type, - GET32(gmeta, pdr->entry[j].PD_Type) | + SET16(gmeta, pdr->entry[j].PD_Type, + GET16(gmeta, pdr->entry[j].PD_Type) | DDF_PDE_PARTICIPATING); if (sd->sd_state == G_RAID_SUBDISK_S_NONE) - SET32(gmeta, pdr->entry[j].PD_State, - GET32(gmeta, pdr->entry[j].PD_State) | + SET16(gmeta, pdr->entry[j].PD_State, + GET16(gmeta, pdr->entry[j].PD_State) | (DDF_PDE_FAILED | DDF_PDE_MISSING)); else if (sd->sd_state == G_RAID_SUBDISK_S_FAILED) - SET32(gmeta, pdr->entry[j].PD_State, - GET32(gmeta, pdr->entry[j].PD_State) | + SET16(gmeta, pdr->entry[j].PD_State, + GET16(gmeta, pdr->entry[j].PD_State) | (DDF_PDE_FAILED | DDF_PDE_PFA)); else if (sd->sd_state <= G_RAID_SUBDISK_S_REBUILD) - SET32(gmeta, pdr->entry[j].PD_State, - GET32(gmeta, pdr->entry[j].PD_State) | + SET16(gmeta, pdr->entry[j].PD_State, + GET16(gmeta, pdr->entry[j].PD_State) | DDF_PDE_REBUILD); else - SET32(gmeta, pdr->entry[j].PD_State, - GET32(gmeta, pdr->entry[j].PD_State) | + SET16(gmeta, pdr->entry[j].PD_State, + GET16(gmeta, pdr->entry[j].PD_State) | DDF_PDE_ONLINE); } } @@ -2863,8 +2885,8 @@ g_raid_md_write_ddf(struct g_raid_md_obj if (i < 0) continue; if (disk->d_state == G_RAID_DISK_S_FAILED) { - SET32(gmeta, pdr->entry[i].PD_State, - GET32(gmeta, pdr->entry[i].PD_State) | + SET16(gmeta, pdr->entry[i].PD_State, + GET16(gmeta, pdr->entry[i].PD_State) | (DDF_PDE_FAILED | DDF_PDE_PFA)); } if (disk->d_state != G_RAID_DISK_S_SPARE) @@ -2881,8 +2903,8 @@ g_raid_md_write_ddf(struct g_raid_md_obj GET16(gmeta, pdr->entry[i].PD_Type) | DDF_PDE_CONFIG_SPARE); } - SET32(gmeta, pdr->entry[i].PD_State, - GET32(gmeta, pdr->entry[i].PD_State) | + SET16(gmeta, pdr->entry[i].PD_State, + GET16(gmeta, pdr->entry[i].PD_State) | DDF_PDE_ONLINE); } From owner-svn-src-stable@FreeBSD.ORG Thu Apr 24 10:23:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 51DA66E9; Thu, 24 Apr 2014 10:23:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3172C150E; Thu, 24 Apr 2014 10:23:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3OANCj4068771; Thu, 24 Apr 2014 10:23:12 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3OANCBA068770; Thu, 24 Apr 2014 10:23:12 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201404241023.s3OANCBA068770@svn.freebsd.org> From: Alexander Motin Date: Thu, 24 Apr 2014 10:23:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264869 - stable/9/sys/geom/raid X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Apr 2014 10:23:12 -0000 Author: mav Date: Thu Apr 24 10:23:11 2014 New Revision: 264869 URL: http://svnweb.freebsd.org/changeset/base/264869 Log: MFC r264318: Fix wrong sizes used to access PD_Type and PD_State DDF metadata fields. This caused incorrect behavior of arrays with big-endian DDF metadata. Little-endian (like used by Adaptec controllers) should not be harmed. Add workaround should be enough to manage compatibility. Modified: stable/9/sys/geom/raid/md_ddf.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/geom/raid/md_ddf.c ============================================================================== --- stable/9/sys/geom/raid/md_ddf.c Thu Apr 24 10:22:00 2014 (r264868) +++ stable/9/sys/geom/raid/md_ddf.c Thu Apr 24 10:23:11 2014 (r264869) @@ -1182,6 +1182,28 @@ hdrerror: g_free(buf); if (GET32(meta, pdr->Signature) != DDF_PDR_SIGNATURE) goto hdrerror; + /* + * Workaround for reading metadata corrupted due to graid bug. + * XXX: Remove this before we have disks above 128PB. :) + */ + if (meta->bigendian) { + for (i = 0; i < GET16(meta, pdr->Populated_PDEs); i++) { + if (isff(meta->pdr->entry[i].PD_GUID, 24)) + continue; + if (GET32(meta, pdr->entry[i].PD_Reference) == + 0xffffffff) + continue; + if (GET64(meta, pdr->entry[i].Configured_Size) >= + (1ULL << 48)) { + SET16(meta, pdr->entry[i].PD_State, + GET16(meta, pdr->entry[i].PD_State) & + ~DDF_PDE_FAILED); + SET64(meta, pdr->entry[i].Configured_Size, + GET64(meta, pdr->entry[i].Configured_Size) & + ((1ULL << 48) - 1)); + } + } + } /* Read virtual disk records. */ buf = g_read_data(cp, (lba + GET32(meta, hdr->vdr_section)) * ss, @@ -1711,7 +1733,7 @@ nofit: /* Welcome the new disk. */ if (resurrection) g_raid_change_disk_state(disk, G_RAID_DISK_S_ACTIVE); - else if (GET8(gmeta, pdr->entry[md_pde_pos].PD_State) & DDF_PDE_PFA) + else if (GET16(gmeta, pdr->entry[md_pde_pos].PD_State) & DDF_PDE_PFA) g_raid_change_disk_state(disk, G_RAID_DISK_S_FAILED); else g_raid_change_disk_state(disk, G_RAID_DISK_S_ACTIVE); @@ -1730,11 +1752,11 @@ nofit: /* Stale disk, almost same as new. */ g_raid_change_subdisk_state(sd, G_RAID_SUBDISK_S_NEW); - } else if (GET8(gmeta, pdr->entry[md_pde_pos].PD_State) & DDF_PDE_PFA) { + } else if (GET16(gmeta, pdr->entry[md_pde_pos].PD_State) & DDF_PDE_PFA) { /* Failed disk. */ g_raid_change_subdisk_state(sd, G_RAID_SUBDISK_S_FAILED); - } else if ((GET8(gmeta, pdr->entry[md_pde_pos].PD_State) & + } else if ((GET16(gmeta, pdr->entry[md_pde_pos].PD_State) & (DDF_PDE_FAILED | DDF_PDE_REBUILD)) != 0) { /* Rebuilding disk. */ g_raid_change_subdisk_state(sd, @@ -2832,24 +2854,24 @@ g_raid_md_write_ddf(struct g_raid_md_obj GET32(vmeta, bvdc[bvd]->Physical_Disk_Sequence[pos])); if (j < 0) continue; - SET32(gmeta, pdr->entry[j].PD_Type, - GET32(gmeta, pdr->entry[j].PD_Type) | + SET16(gmeta, pdr->entry[j].PD_Type, + GET16(gmeta, pdr->entry[j].PD_Type) | DDF_PDE_PARTICIPATING); if (sd->sd_state == G_RAID_SUBDISK_S_NONE) - SET32(gmeta, pdr->entry[j].PD_State, - GET32(gmeta, pdr->entry[j].PD_State) | + SET16(gmeta, pdr->entry[j].PD_State, + GET16(gmeta, pdr->entry[j].PD_State) | (DDF_PDE_FAILED | DDF_PDE_MISSING)); else if (sd->sd_state == G_RAID_SUBDISK_S_FAILED) - SET32(gmeta, pdr->entry[j].PD_State, - GET32(gmeta, pdr->entry[j].PD_State) | + SET16(gmeta, pdr->entry[j].PD_State, + GET16(gmeta, pdr->entry[j].PD_State) | (DDF_PDE_FAILED | DDF_PDE_PFA)); else if (sd->sd_state <= G_RAID_SUBDISK_S_REBUILD) - SET32(gmeta, pdr->entry[j].PD_State, - GET32(gmeta, pdr->entry[j].PD_State) | + SET16(gmeta, pdr->entry[j].PD_State, + GET16(gmeta, pdr->entry[j].PD_State) | DDF_PDE_REBUILD); else - SET32(gmeta, pdr->entry[j].PD_State, - GET32(gmeta, pdr->entry[j].PD_State) | + SET16(gmeta, pdr->entry[j].PD_State, + GET16(gmeta, pdr->entry[j].PD_State) | DDF_PDE_ONLINE); } } @@ -2862,8 +2884,8 @@ g_raid_md_write_ddf(struct g_raid_md_obj if (i < 0) continue; if (disk->d_state == G_RAID_DISK_S_FAILED) { - SET32(gmeta, pdr->entry[i].PD_State, - GET32(gmeta, pdr->entry[i].PD_State) | + SET16(gmeta, pdr->entry[i].PD_State, + GET16(gmeta, pdr->entry[i].PD_State) | (DDF_PDE_FAILED | DDF_PDE_PFA)); } if (disk->d_state != G_RAID_DISK_S_SPARE) @@ -2880,8 +2902,8 @@ g_raid_md_write_ddf(struct g_raid_md_obj GET16(gmeta, pdr->entry[i].PD_Type) | DDF_PDE_CONFIG_SPARE); } - SET32(gmeta, pdr->entry[i].PD_State, - GET32(gmeta, pdr->entry[i].PD_State) | + SET16(gmeta, pdr->entry[i].PD_State, + GET16(gmeta, pdr->entry[i].PD_State) | DDF_PDE_ONLINE); } From owner-svn-src-stable@FreeBSD.ORG Thu Apr 24 10:23:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9276F83B; Thu, 24 Apr 2014 10:23:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F32A1529; Thu, 24 Apr 2014 10:23:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3OANapq068849; Thu, 24 Apr 2014 10:23:36 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3OANa15068848; Thu, 24 Apr 2014 10:23:36 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404241023.s3OANa15068848@svn.freebsd.org> From: Christian Brueffer Date: Thu, 24 Apr 2014 10:23:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264870 - stable/10/lib/libipsec X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Apr 2014 10:23:36 -0000 Author: brueffer Date: Thu Apr 24 10:23:35 2014 New Revision: 264870 URL: http://svnweb.freebsd.org/changeset/base/264870 Log: MFC: r264585 Add a missing break in the TCP case. Reviewed by: bms Modified: stable/10/lib/libipsec/ipsec_dump_policy.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libipsec/ipsec_dump_policy.c ============================================================================== --- stable/10/lib/libipsec/ipsec_dump_policy.c Thu Apr 24 10:23:11 2014 (r264869) +++ stable/10/lib/libipsec/ipsec_dump_policy.c Thu Apr 24 10:23:35 2014 (r264870) @@ -199,6 +199,7 @@ ipsec_dump_ipsecrequest(buf, len, xisr, break; case IPPROTO_TCP: proto = "tcp"; + break; default: __ipsec_errcode = EIPSEC_INVAL_PROTO; return NULL; From owner-svn-src-stable@FreeBSD.ORG Thu Apr 24 10:25:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C4109BA; Thu, 24 Apr 2014 10:25:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 187291558; Thu, 24 Apr 2014 10:25:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3OAPWaD069203; Thu, 24 Apr 2014 10:25:32 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3OAPWG5069202; Thu, 24 Apr 2014 10:25:32 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404241025.s3OAPWG5069202@svn.freebsd.org> From: Christian Brueffer Date: Thu, 24 Apr 2014 10:25:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264871 - stable/9/lib/libipsec X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Apr 2014 10:25:33 -0000 Author: brueffer Date: Thu Apr 24 10:25:32 2014 New Revision: 264871 URL: http://svnweb.freebsd.org/changeset/base/264871 Log: MFC: r264585 Add a missing break in the TCP case. Reviewed by: bms Modified: stable/9/lib/libipsec/ipsec_dump_policy.c Directory Properties: stable/9/lib/libipsec/ (props changed) Modified: stable/9/lib/libipsec/ipsec_dump_policy.c ============================================================================== --- stable/9/lib/libipsec/ipsec_dump_policy.c Thu Apr 24 10:23:35 2014 (r264870) +++ stable/9/lib/libipsec/ipsec_dump_policy.c Thu Apr 24 10:25:32 2014 (r264871) @@ -199,6 +199,7 @@ ipsec_dump_ipsecrequest(buf, len, xisr, break; case IPPROTO_TCP: proto = "tcp"; + break; default: __ipsec_errcode = EIPSEC_INVAL_PROTO; return NULL; From owner-svn-src-stable@FreeBSD.ORG Thu Apr 24 10:27:21 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E70EEB89; Thu, 24 Apr 2014 10:27:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2D0815A5; Thu, 24 Apr 2014 10:27:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3OARLXB069492; Thu, 24 Apr 2014 10:27:21 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3OARLkN069491; Thu, 24 Apr 2014 10:27:21 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404241027.s3OARLkN069491@svn.freebsd.org> From: Christian Brueffer Date: Thu, 24 Apr 2014 10:27:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r264872 - stable/8/lib/libipsec X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Apr 2014 10:27:22 -0000 Author: brueffer Date: Thu Apr 24 10:27:21 2014 New Revision: 264872 URL: http://svnweb.freebsd.org/changeset/base/264872 Log: MFC: r264585 Add a missing break in the TCP case. Reviewed by: bms Modified: stable/8/lib/libipsec/ipsec_dump_policy.c Directory Properties: stable/8/lib/libipsec/ (props changed) Modified: stable/8/lib/libipsec/ipsec_dump_policy.c ============================================================================== --- stable/8/lib/libipsec/ipsec_dump_policy.c Thu Apr 24 10:25:32 2014 (r264871) +++ stable/8/lib/libipsec/ipsec_dump_policy.c Thu Apr 24 10:27:21 2014 (r264872) @@ -198,6 +198,7 @@ ipsec_dump_ipsecrequest(buf, len, xisr, break; case IPPROTO_TCP: proto = "tcp"; + break; default: __ipsec_errcode = EIPSEC_INVAL_PROTO; return NULL; From owner-svn-src-stable@FreeBSD.ORG Thu Apr 24 11:12:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D415A6C7; Thu, 24 Apr 2014 11:12:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C01DC1A5E; Thu, 24 Apr 2014 11:12:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3OBCrhu089365; Thu, 24 Apr 2014 11:12:53 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3OBCren089364; Thu, 24 Apr 2014 11:12:53 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201404241112.s3OBCren089364@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 24 Apr 2014 11:12:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264873 - stable/10/sys/netinet6 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Apr 2014 11:12:53 -0000 Author: ae Date: Thu Apr 24 11:12:53 2014 New Revision: 264873 URL: http://svnweb.freebsd.org/changeset/base/264873 Log: MFC r264582: Remove unused variable. PR: 173521 Modified: stable/10/sys/netinet6/ip6_input.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/ip6_input.c ============================================================================== --- stable/10/sys/netinet6/ip6_input.c Thu Apr 24 10:27:21 2014 (r264872) +++ stable/10/sys/netinet6/ip6_input.c Thu Apr 24 11:12:53 2014 (r264873) @@ -1074,7 +1074,6 @@ ip6_hopopts_input(u_int32_t *plenp, u_in struct mbuf *m = *mp; int off = *offp, hbhlen; struct ip6_hbh *hbh; - u_int8_t *opt; /* validation of the length of the header */ #ifndef PULLDOWN_TEST @@ -1101,8 +1100,6 @@ ip6_hopopts_input(u_int32_t *plenp, u_in #endif off += hbhlen; hbhlen -= sizeof(struct ip6_hbh); - opt = (u_int8_t *)hbh + sizeof(struct ip6_hbh); - if (ip6_process_hopopts(m, (u_int8_t *)hbh + sizeof(struct ip6_hbh), hbhlen, rtalertp, plenp) < 0) return (-1); From owner-svn-src-stable@FreeBSD.ORG Thu Apr 24 11:13:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84D148DB; Thu, 24 Apr 2014 11:13:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 718EC1A68; Thu, 24 Apr 2014 11:13:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3OBDdp1089563; Thu, 24 Apr 2014 11:13:39 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3OBDdEX089562; Thu, 24 Apr 2014 11:13:39 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201404241113.s3OBDdEX089562@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 24 Apr 2014 11:13:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264874 - stable/9/sys/netinet6 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Apr 2014 11:13:39 -0000 Author: ae Date: Thu Apr 24 11:13:38 2014 New Revision: 264874 URL: http://svnweb.freebsd.org/changeset/base/264874 Log: MFC r264582: Remove unused variable. PR: 173521 Modified: stable/9/sys/netinet6/ip6_input.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet6/ip6_input.c ============================================================================== --- stable/9/sys/netinet6/ip6_input.c Thu Apr 24 11:12:53 2014 (r264873) +++ stable/9/sys/netinet6/ip6_input.c Thu Apr 24 11:13:38 2014 (r264874) @@ -1085,7 +1085,6 @@ ip6_hopopts_input(u_int32_t *plenp, u_in struct mbuf *m = *mp; int off = *offp, hbhlen; struct ip6_hbh *hbh; - u_int8_t *opt; /* validation of the length of the header */ #ifndef PULLDOWN_TEST @@ -1112,8 +1111,6 @@ ip6_hopopts_input(u_int32_t *plenp, u_in #endif off += hbhlen; hbhlen -= sizeof(struct ip6_hbh); - opt = (u_int8_t *)hbh + sizeof(struct ip6_hbh); - if (ip6_process_hopopts(m, (u_int8_t *)hbh + sizeof(struct ip6_hbh), hbhlen, rtalertp, plenp) < 0) return (-1); From owner-svn-src-stable@FreeBSD.ORG Thu Apr 24 11:14:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78453A10; Thu, 24 Apr 2014 11:14:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 646531A6E; Thu, 24 Apr 2014 11:14:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3OBEIIx089693; Thu, 24 Apr 2014 11:14:18 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3OBEIul089692; Thu, 24 Apr 2014 11:14:18 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201404241114.s3OBEIul089692@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 24 Apr 2014 11:14:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r264875 - stable/8/sys/netinet6 X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Apr 2014 11:14:18 -0000 Author: ae Date: Thu Apr 24 11:14:17 2014 New Revision: 264875 URL: http://svnweb.freebsd.org/changeset/base/264875 Log: MFC r264582: Remove unused variable. PR: 173521 Modified: stable/8/sys/netinet6/ip6_input.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/netinet6/ (props changed) Modified: stable/8/sys/netinet6/ip6_input.c ============================================================================== --- stable/8/sys/netinet6/ip6_input.c Thu Apr 24 11:13:38 2014 (r264874) +++ stable/8/sys/netinet6/ip6_input.c Thu Apr 24 11:14:17 2014 (r264875) @@ -991,7 +991,6 @@ ip6_hopopts_input(u_int32_t *plenp, u_in struct mbuf *m = *mp; int off = *offp, hbhlen; struct ip6_hbh *hbh; - u_int8_t *opt; /* validation of the length of the header */ #ifndef PULLDOWN_TEST @@ -1018,8 +1017,6 @@ ip6_hopopts_input(u_int32_t *plenp, u_in #endif off += hbhlen; hbhlen -= sizeof(struct ip6_hbh); - opt = (u_int8_t *)hbh + sizeof(struct ip6_hbh); - if (ip6_process_hopopts(m, (u_int8_t *)hbh + sizeof(struct ip6_hbh), hbhlen, rtalertp, plenp) < 0) return (-1); From owner-svn-src-stable@FreeBSD.ORG Fri Apr 25 04:49:28 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0595C84; Fri, 25 Apr 2014 04:49:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 90F081B44; Fri, 25 Apr 2014 04:49:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3P4nSGG028721; Fri, 25 Apr 2014 04:49:28 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3P4nSfb028718; Fri, 25 Apr 2014 04:49:28 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201404250449.s3P4nSfb028718@svn.freebsd.org> From: Xin LI Date: Fri, 25 Apr 2014 04:49:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264911 - stable/10/contrib/netcat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2014 04:49:28 -0000 Author: delphij Date: Fri Apr 25 04:49:27 2014 New Revision: 264911 URL: http://svnweb.freebsd.org/changeset/base/264911 Log: MFC r258195+r264361: nc from OpenBSD 5.5. Modified: stable/10/contrib/netcat/nc.1 stable/10/contrib/netcat/netcat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netcat/nc.1 ============================================================================== --- stable/10/contrib/netcat/nc.1 Fri Apr 25 04:01:25 2014 (r264910) +++ stable/10/contrib/netcat/nc.1 Fri Apr 25 04:49:27 2014 (r264911) @@ -1,4 +1,4 @@ -.\" $OpenBSD: nc.1,v 1.62 2013/03/20 09:27:56 sthen Exp $ +.\" $OpenBSD: nc.1,v 1.67 2014/02/26 20:56:11 claudio Exp $ .\" .\" Copyright (c) 1996 David Sacerdote .\" All rights reserved. @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 7, 2012 +.Dd April 11, 2014 .Dt NC 1 .Os .Sh NAME @@ -36,7 +36,7 @@ .Sh SYNOPSIS .Nm nc .Bk -words -.Op Fl 46DdEhklNnrStUuvz +.Op Fl 46DdEFhklNnrStUuvz .Op Fl e Ar IPsec_policy .Op Fl I Ar length .Op Fl i Ar interval @@ -120,6 +120,21 @@ to be used using the syntax described in .Xr ipsec_set_policy 3 . This flag can be specified up to two times, as typically one policy for each direction is needed. +.It Fl F +Pass the first connected socket using +.Xr sendmsg 2 +to stdout and exit. +This is useful in conjunction with +.Fl X +to have +.Nm +perform connection setup with a proxy but then leave the rest of the +connection to another program (e.g.\& +.Xr ssh 1 +using the +.Xr ssh_config 5 +.Cm ProxyUseFdPass +option). .It Fl h Prints out .Nm @@ -236,7 +251,6 @@ flag is given. Set the routing table .Pq Dq FIB to be used. -The default is 0. .It Fl v Have .Nm @@ -365,7 +379,7 @@ Using a second machine, connect to the l .Nm process, feeding it the file which is to be transferred: .Pp -.Dl $ nc host.example.com 1234 \*(Lt filename.in +.Dl $ nc -N host.example.com 1234 \*(Lt filename.in .Pp After the file has been transferred, the connection will close automatically. .Sh TALKING TO SERVERS @@ -490,10 +504,10 @@ if the proxy requires it: .Xr tcp 4 .Sh AUTHORS Original implementation by *Hobbit* -.Aq hobbit@avian.org . +.Aq Mt hobbit@avian.org . .br Rewritten with IPv6 support by -.An Eric Jackson Aq ericj@monkey.org . +.An Eric Jackson Aq Mt ericj@monkey.org . .Sh CAVEATS UDP port scans using the .Fl uz Modified: stable/10/contrib/netcat/netcat.c ============================================================================== --- stable/10/contrib/netcat/netcat.c Fri Apr 25 04:01:25 2014 (r264910) +++ stable/10/contrib/netcat/netcat.c Fri Apr 25 04:49:27 2014 (r264911) @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.111 2013/03/20 09:27:56 sthen Exp $ */ +/* $OpenBSD: netcat.c,v 1.117 2013/10/26 21:33:29 sthen Exp $ */ /* * Copyright (c) 2001 Eric Jackson * @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -74,6 +75,7 @@ /* Command Line Options */ int dflag; /* detached, no stdin */ +int Fflag; /* fdpass sock to stdout */ unsigned int iflag; /* Interval Flag */ int kflag; /* More than one connect */ int lflag; /* Bind to local port */ @@ -94,7 +96,7 @@ int Iflag; /* TCP receive buffer siz int Oflag; /* TCP send buffer size */ int Sflag; /* TCP MD5 signature option */ int Tflag = -1; /* IP Type of Service */ -u_int rtableid; +int rtableid = -1; int timeout = -1; int family = AF_UNSPEC; @@ -106,6 +108,7 @@ void build_ports(char *); void help(void); int local_listen(char *, char *, struct addrinfo); void readwrite(int); +void fdpass(int nfd) __attribute__((noreturn)); int remote_connect(const char *, const char *, struct addrinfo); int timeout_connect(int, const struct sockaddr *, socklen_t); int socks_connect(const char *, const char *, struct addrinfo, @@ -152,9 +155,12 @@ main(int argc, char *argv[]) host = NULL; uport = NULL; sv = NULL; +#if 0 + rtableid = getrtable(); +#endif while ((ch = getopt_long(argc, argv, - "46DdEe:hI:i:klNnoO:P:p:rSs:tT:UuV:vw:X:x:z", + "46DdEe:FhI:i:klNnoO:P:p:rSs:tT:UuV:vw:X:x:z", longopts, NULL)) != -1) { switch (ch) { case '4': @@ -194,6 +200,9 @@ main(int argc, char *argv[]) errx(1, "IPsec support unavailable."); #endif break; + case 'F': + Fflag = 1; + break; case 'h': help(); break; @@ -238,7 +247,7 @@ main(int argc, char *argv[]) case 'V': if (sysctlbyname("net.fibs", &numfibs, &intsize, NULL, 0) == -1) errx(1, "Multiple FIBS not supported"); - rtableid = (unsigned int)strtonum(optarg, 0, + rtableid = (int)strtonum(optarg, 0, numfibs - 1, &errstr); if (errstr) errx(1, "rtable %s: %s", errstr, optarg); @@ -508,7 +517,9 @@ main(int argc, char *argv[]) uflag ? "udp" : "tcp", sv ? sv->s_name : "*"); } - if (!zflag) + if (Fflag) + fdpass(s); + else if (!zflag) readwrite(s); } } @@ -568,7 +579,7 @@ unix_connect(char *path) if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) return (-1); } - (void)fcntl(s, F_SETFD, 1); + (void)fcntl(s, F_SETFD, FD_CLOEXEC); memset(&sun, 0, sizeof(struct sockaddr_un)); sun.sun_family = AF_UNIX; @@ -631,12 +642,9 @@ remote_connect(const char *host, const c add_ipsec_policy(s, ipsec_policy[1]); #endif - if (rtableid) { - if (setsockopt(s, SOL_SOCKET, SO_SETFIB, &rtableid, - sizeof(rtableid)) == -1) - err(1, "setsockopt(.., SO_SETFIB, %u, ..)", - rtableid); - } + if (rtableid >= 0 && (setsockopt(s, SOL_SOCKET, SO_SETFIB, + &rtableid, sizeof(rtableid)) == -1)) + err(1, "setsockopt SO_SETFIB"); /* Bind to a local port or source address if specified. */ if (sflag || pflag) { @@ -743,13 +751,9 @@ local_listen(char *host, char *port, str res0->ai_protocol)) < 0) continue; - if (rtableid) { - ret = setsockopt(s, SOL_SOCKET, SO_SETFIB, &rtableid, - sizeof(rtableid)); - if (ret == -1) - err(1, "setsockopt(.., SO_SETFIB, %u, ..)", - rtableid); - } + if (rtableid >= 0 && (setsockopt(s, IPPROTO_IP, SO_SETFIB, + &rtableid, sizeof(rtableid)) == -1)) + err(1, "setsockopt SO_SETFIB"); ret = setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof(x)); if (ret == -1) @@ -850,6 +854,66 @@ readwrite(int nfd) } } +/* + * fdpass() + * Pass the connected file descriptor to stdout and exit. + */ +void +fdpass(int nfd) +{ + struct msghdr mh; + union { + struct cmsghdr hdr; + char buf[CMSG_SPACE(sizeof(int))]; + } cmsgbuf; + struct cmsghdr *cmsg; + struct iovec iov; + char c = '\0'; + ssize_t r; + struct pollfd pfd; + + /* Avoid obvious stupidity */ + if (isatty(STDOUT_FILENO)) + errx(1, "Cannot pass file descriptor to tty"); + + bzero(&mh, sizeof(mh)); + bzero(&cmsgbuf, sizeof(cmsgbuf)); + bzero(&iov, sizeof(iov)); + bzero(&pfd, sizeof(pfd)); + + mh.msg_control = (caddr_t)&cmsgbuf.buf; + mh.msg_controllen = sizeof(cmsgbuf.buf); + cmsg = CMSG_FIRSTHDR(&mh); + cmsg->cmsg_len = CMSG_LEN(sizeof(int)); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + *(int *)CMSG_DATA(cmsg) = nfd; + + iov.iov_base = &c; + iov.iov_len = 1; + mh.msg_iov = &iov; + mh.msg_iovlen = 1; + + bzero(&pfd, sizeof(pfd)); + pfd.fd = STDOUT_FILENO; + for (;;) { + r = sendmsg(STDOUT_FILENO, &mh, 0); + if (r == -1) { + if (errno == EAGAIN || errno == EINTR) { + pfd.events = POLLOUT; + if (poll(&pfd, 1, -1) == -1) + err(1, "poll"); + continue; + } + err(1, "sendmsg"); + } else if (r == -1) + errx(1, "sendmsg: unexpected return value %zd", r); + else + break; + } + exit(0); +} + /* Deal with RFC 854 WILL/WONT DO/DONT negotiation. */ void atelnet(int nfd, unsigned char *buf, unsigned int size) @@ -1088,6 +1152,7 @@ help(void) \t-e policy Use specified IPsec policy\n"); #endif fprintf(stderr, "\ + \t-F Pass socket fd\n\ \t-h This help text\n\ \t-I length TCP receive buffer length\n\ \t-i secs\t Delay interval for lines sent, ports scanned\n\ @@ -1146,9 +1211,9 @@ usage(int ret) { fprintf(stderr, #ifdef IPSEC - "usage: nc [-46DdEhklNnrStUuvz] [-e policy] [-I length] [-i interval] [-O length]\n" + "usage: nc [-46DdEFhklNnrStUuvz] [-e policy] [-I length] [-i interval] [-O length]\n" #else - "usage: nc [-46DdhklNnrStUuvz] [-I length] [-i interval] [-O length]\n" + "usage: nc [-46DdFhklNnrStUuvz] [-I length] [-i interval] [-O length]\n" #endif "\t [-P proxy_username] [-p source_port] [-s source] [-T ToS]\n" "\t [-V rtable] [-w timeout] [-X proxy_protocol]\n" From owner-svn-src-stable@FreeBSD.ORG Fri Apr 25 09:53:16 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3050280A; Fri, 25 Apr 2014 09:53:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C9AB1AD9; Fri, 25 Apr 2014 09:53:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3P9rFRn056469; Fri, 25 Apr 2014 09:53:15 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3P9rFUx056467; Fri, 25 Apr 2014 09:53:15 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201404250953.s3P9rFUx056467@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 25 Apr 2014 09:53:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264913 - in stable/10/sys/dev/usb: . quirk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2014 09:53:16 -0000 Author: hselasky Date: Fri Apr 25 09:53:15 2014 New Revision: 264913 URL: http://svnweb.freebsd.org/changeset/base/264913 Log: MFC r264653: Add new USB quirk. Modified: stable/10/sys/dev/usb/quirk/usb_quirk.c stable/10/sys/dev/usb/usbdevs Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/10/sys/dev/usb/quirk/usb_quirk.c Fri Apr 25 08:01:22 2014 (r264912) +++ stable/10/sys/dev/usb/quirk/usb_quirk.c Fri Apr 25 09:53:15 2014 (r264913) @@ -236,6 +236,7 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(JMICRON, JM20337, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(KINGSTON, HYPERX3_0, 0x0000, 0xffff, UQ_MSC_NO_INQUIRY), USB_QUIRK(KYOCERA, FINECAM_L3, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), USB_QUIRK(KYOCERA, FINECAM_S3X, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI, Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Fri Apr 25 08:01:22 2014 (r264912) +++ stable/10/sys/dev/usb/usbdevs Fri Apr 25 09:53:15 2014 (r264913) @@ -2501,6 +2501,7 @@ product KEYSPAN UIA11 0x0202 UIA-11 rem /* Kingston products */ product KINGSTON XX1 0x0008 Ethernet product KINGSTON KNU101TX 0x000a KNU101TX USB Ethernet +product KINGSTON HYPERX3_0 0x162b DT HyperX 3.0 /* Kawasaki products */ product KLSI DUH3E10BT 0x0008 USB Ethernet From owner-svn-src-stable@FreeBSD.ORG Fri Apr 25 09:54:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2FF2FA4D; Fri, 25 Apr 2014 09:54:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1BB701AEA; Fri, 25 Apr 2014 09:54:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3P9sgDf056760; Fri, 25 Apr 2014 09:54:42 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3P9sgfG056758; Fri, 25 Apr 2014 09:54:42 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201404250954.s3P9sgfG056758@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 25 Apr 2014 09:54:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264914 - in stable/9/sys/dev/usb: . quirk X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2014 09:54:43 -0000 Author: hselasky Date: Fri Apr 25 09:54:42 2014 New Revision: 264914 URL: http://svnweb.freebsd.org/changeset/base/264914 Log: MFC r264653: Add new USB quirk. Modified: stable/9/sys/dev/usb/quirk/usb_quirk.c stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/9/sys/dev/usb/quirk/usb_quirk.c Fri Apr 25 09:53:15 2014 (r264913) +++ stable/9/sys/dev/usb/quirk/usb_quirk.c Fri Apr 25 09:54:42 2014 (r264914) @@ -236,6 +236,7 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(JMICRON, JM20337, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(KINGSTON, HYPERX3_0, 0x0000, 0xffff, UQ_MSC_NO_INQUIRY), USB_QUIRK(KYOCERA, FINECAM_L3, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), USB_QUIRK(KYOCERA, FINECAM_S3X, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI, Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Fri Apr 25 09:53:15 2014 (r264913) +++ stable/9/sys/dev/usb/usbdevs Fri Apr 25 09:54:42 2014 (r264914) @@ -2505,6 +2505,7 @@ product KEYSPAN UIA11 0x0202 UIA-11 rem /* Kingston products */ product KINGSTON XX1 0x0008 Ethernet product KINGSTON KNU101TX 0x000a KNU101TX USB Ethernet +product KINGSTON HYPERX3_0 0x162b DT HyperX 3.0 /* Kawasaki products */ product KLSI DUH3E10BT 0x0008 USB Ethernet From owner-svn-src-stable@FreeBSD.ORG Fri Apr 25 21:20:23 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E0B582C; Fri, 25 Apr 2014 21:20:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61D291860; Fri, 25 Apr 2014 21:20:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3PLKNNP045468; Fri, 25 Apr 2014 21:20:23 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3PLKNIf045466; Fri, 25 Apr 2014 21:20:23 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201404252120.s3PLKNIf045466@svn.freebsd.org> From: Marius Strobl Date: Fri, 25 Apr 2014 21:20:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264936 - stable/10/usr.sbin/makefs/cd9660 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2014 21:20:23 -0000 Author: marius Date: Fri Apr 25 21:20:22 2014 New Revision: 264936 URL: http://svnweb.freebsd.org/changeset/base/264936 Log: MFC: r260041 Record the IEEE P1282 Rock Ridge version 1.12 POSIX File Serial Number, i. e. the POSIX:5.6.1 st_ino field, which can be used to detect hard links in the file system. This is also the default in mkisofs(8) and according to its man page, no system only being able to cope with Rock Ridge version 1.10 is known to exist. PR: 185138 Submitted by: Kurt Lidl Modified: stable/10/usr.sbin/makefs/cd9660/iso9660_rrip.c stable/10/usr.sbin/makefs/cd9660/iso9660_rrip.h Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/makefs/cd9660/iso9660_rrip.c ============================================================================== --- stable/10/usr.sbin/makefs/cd9660/iso9660_rrip.c Fri Apr 25 21:11:00 2014 (r264935) +++ stable/10/usr.sbin/makefs/cd9660/iso9660_rrip.c Fri Apr 25 21:20:22 2014 (r264936) @@ -634,7 +634,7 @@ cd9660_createSL(cd9660node *node) int cd9660node_rrip_px(struct ISO_SUSP_ATTRIBUTES *v, fsnode *pxinfo) { - v->attr.rr_entry.PX.h.length[0] = 36; + v->attr.rr_entry.PX.h.length[0] = 44; v->attr.rr_entry.PX.h.version[0] = 1; cd9660_bothendian_dword(pxinfo->inode->st.st_mode, v->attr.rr_entry.PX.mode); @@ -644,8 +644,9 @@ cd9660node_rrip_px(struct ISO_SUSP_ATTRI v->attr.rr_entry.PX.uid); cd9660_bothendian_dword(pxinfo->inode->st.st_gid, v->attr.rr_entry.PX.gid); + cd9660_bothendian_dword(pxinfo->inode->st.st_ino, + v->attr.rr_entry.PX.serial); - /* Ignoring the serial number for now */ return 1; } Modified: stable/10/usr.sbin/makefs/cd9660/iso9660_rrip.h ============================================================================== --- stable/10/usr.sbin/makefs/cd9660/iso9660_rrip.h Fri Apr 25 21:11:00 2014 (r264935) +++ stable/10/usr.sbin/makefs/cd9660/iso9660_rrip.h Fri Apr 25 21:20:22 2014 (r264936) @@ -103,7 +103,7 @@ typedef struct { u_char links [ISODCL(13,20)]; u_char uid [ISODCL(21,28)]; u_char gid [ISODCL(29,36)]; - u_char serial [ISODCL(37,44)];/* Not used */ + u_char serial [ISODCL(37,44)]; } ISO_RRIP_PX; typedef struct { From owner-svn-src-stable@FreeBSD.ORG Fri Apr 25 21:20:29 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2AC2290E; Fri, 25 Apr 2014 21:20:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F2F6A1861; Fri, 25 Apr 2014 21:20:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3PLKSku045800; Fri, 25 Apr 2014 21:20:28 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3PLKSaY045798; Fri, 25 Apr 2014 21:20:28 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201404252120.s3PLKSaY045798@svn.freebsd.org> From: Marius Strobl Date: Fri, 25 Apr 2014 21:20:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264937 - stable/9/usr.sbin/makefs/cd9660 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2014 21:20:29 -0000 Author: marius Date: Fri Apr 25 21:20:28 2014 New Revision: 264937 URL: http://svnweb.freebsd.org/changeset/base/264937 Log: MFC: r260041 Record the IEEE P1282 Rock Ridge version 1.12 POSIX File Serial Number, i. e. the POSIX:5.6.1 st_ino field, which can be used to detect hard links in the file system. This is also the default in mkisofs(8) and according to its man page, no system only being able to cope with Rock Ridge version 1.10 is known to exist. PR: 185138 Submitted by: Kurt Lidl Modified: stable/9/usr.sbin/makefs/cd9660/iso9660_rrip.c stable/9/usr.sbin/makefs/cd9660/iso9660_rrip.h Directory Properties: stable/9/usr.sbin/makefs/ (props changed) Modified: stable/9/usr.sbin/makefs/cd9660/iso9660_rrip.c ============================================================================== --- stable/9/usr.sbin/makefs/cd9660/iso9660_rrip.c Fri Apr 25 21:20:22 2014 (r264936) +++ stable/9/usr.sbin/makefs/cd9660/iso9660_rrip.c Fri Apr 25 21:20:28 2014 (r264937) @@ -634,7 +634,7 @@ cd9660_createSL(cd9660node *node) int cd9660node_rrip_px(struct ISO_SUSP_ATTRIBUTES *v, fsnode *pxinfo) { - v->attr.rr_entry.PX.h.length[0] = 36; + v->attr.rr_entry.PX.h.length[0] = 44; v->attr.rr_entry.PX.h.version[0] = 1; cd9660_bothendian_dword(pxinfo->inode->st.st_mode, v->attr.rr_entry.PX.mode); @@ -644,8 +644,9 @@ cd9660node_rrip_px(struct ISO_SUSP_ATTRI v->attr.rr_entry.PX.uid); cd9660_bothendian_dword(pxinfo->inode->st.st_gid, v->attr.rr_entry.PX.gid); + cd9660_bothendian_dword(pxinfo->inode->st.st_ino, + v->attr.rr_entry.PX.serial); - /* Ignoring the serial number for now */ return 1; } Modified: stable/9/usr.sbin/makefs/cd9660/iso9660_rrip.h ============================================================================== --- stable/9/usr.sbin/makefs/cd9660/iso9660_rrip.h Fri Apr 25 21:20:22 2014 (r264936) +++ stable/9/usr.sbin/makefs/cd9660/iso9660_rrip.h Fri Apr 25 21:20:28 2014 (r264937) @@ -103,7 +103,7 @@ typedef struct { u_char links [ISODCL(13,20)]; u_char uid [ISODCL(21,28)]; u_char gid [ISODCL(29,36)]; - u_char serial [ISODCL(37,44)];/* Not used */ + u_char serial [ISODCL(37,44)]; } ISO_RRIP_PX; typedef struct { From owner-svn-src-stable@FreeBSD.ORG Fri Apr 25 21:24:34 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6D1DCBF6; Fri, 25 Apr 2014 21:24:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 599B71921; Fri, 25 Apr 2014 21:24:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3PLOYNJ048793; Fri, 25 Apr 2014 21:24:34 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3PLOYK1048792; Fri, 25 Apr 2014 21:24:34 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201404252124.s3PLOYK1048792@svn.freebsd.org> From: Marius Strobl Date: Fri, 25 Apr 2014 21:24:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264938 - stable/10/sys/dev/aac X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2014 21:24:34 -0000 Author: marius Date: Fri Apr 25 21:24:33 2014 New Revision: 264938 URL: http://svnweb.freebsd.org/changeset/base/264938 Log: MFC: r260044 Free the MSI again on detach if allocated. Arguably, this code would be better off living in aac_pci.c, but it doesn't seem worth creating a aac_pci_detach() and it's also not the first PCI-specific bit in aac.c Modified: stable/10/sys/dev/aac/aac.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/aac/aac.c ============================================================================== --- stable/10/sys/dev/aac/aac.c Fri Apr 25 21:20:28 2014 (r264937) +++ stable/10/sys/dev/aac/aac.c Fri Apr 25 21:24:33 2014 (r264938) @@ -631,9 +631,11 @@ aac_free(struct aac_softc *sc) /* disconnect the interrupt handler */ if (sc->aac_intr) bus_teardown_intr(sc->aac_dev, sc->aac_irq, sc->aac_intr); - if (sc->aac_irq != NULL) + if (sc->aac_irq != NULL) { bus_release_resource(sc->aac_dev, SYS_RES_IRQ, rman_get_rid(sc->aac_irq), sc->aac_irq); + pci_release_msi(sc->aac_dev); + } /* destroy data-transfer DMA tag */ if (sc->aac_buffer_dmat) From owner-svn-src-stable@FreeBSD.ORG Fri Apr 25 21:24:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D203D23; Fri, 25 Apr 2014 21:24:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A1831926; Fri, 25 Apr 2014 21:24:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3PLOshu048861; Fri, 25 Apr 2014 21:24:54 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3PLOsnl048860; Fri, 25 Apr 2014 21:24:54 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201404252124.s3PLOsnl048860@svn.freebsd.org> From: Marius Strobl Date: Fri, 25 Apr 2014 21:24:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264939 - stable/9/sys/dev/aac X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2014 21:24:54 -0000 Author: marius Date: Fri Apr 25 21:24:53 2014 New Revision: 264939 URL: http://svnweb.freebsd.org/changeset/base/264939 Log: MFC: r260044 Free the MSI again on detach if allocated. Arguably, this code would be better off living in aac_pci.c, but it doesn't seem worth creating a aac_pci_detach() and it's also not the first PCI-specific bit in aac.c Modified: stable/9/sys/dev/aac/aac.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/aac/aac.c ============================================================================== --- stable/9/sys/dev/aac/aac.c Fri Apr 25 21:24:33 2014 (r264938) +++ stable/9/sys/dev/aac/aac.c Fri Apr 25 21:24:53 2014 (r264939) @@ -631,9 +631,11 @@ aac_free(struct aac_softc *sc) /* disconnect the interrupt handler */ if (sc->aac_intr) bus_teardown_intr(sc->aac_dev, sc->aac_irq, sc->aac_intr); - if (sc->aac_irq != NULL) + if (sc->aac_irq != NULL) { bus_release_resource(sc->aac_dev, SYS_RES_IRQ, rman_get_rid(sc->aac_irq), sc->aac_irq); + pci_release_msi(sc->aac_dev); + } /* destroy data-transfer DMA tag */ if (sc->aac_buffer_dmat) From owner-svn-src-stable@FreeBSD.ORG Fri Apr 25 21:28:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 160D8ED4; Fri, 25 Apr 2014 21:28:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EAC6C1950; Fri, 25 Apr 2014 21:28:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3PLSdx1049323; Fri, 25 Apr 2014 21:28:39 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3PLSdUU049322; Fri, 25 Apr 2014 21:28:39 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201404252128.s3PLSdUU049322@svn.freebsd.org> From: Marius Strobl Date: Fri, 25 Apr 2014 21:28:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264940 - stable/10/sys/dev/bge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2014 21:28:40 -0000 Author: marius Date: Fri Apr 25 21:28:39 2014 New Revision: 264940 URL: http://svnweb.freebsd.org/changeset/base/264940 Log: MFC: r260045 - Simplify MSI allocation and release. For a single one, we don't need to fiddle with the MSI count and pci_release_msi(9) is smart enough to just do nothing in case of INTx. - Don't allocate MSI as RF_SHAREABLE. Modified: stable/10/sys/dev/bge/if_bge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/bge/if_bge.c ============================================================================== --- stable/10/sys/dev/bge/if_bge.c Fri Apr 25 21:24:53 2014 (r264939) +++ stable/10/sys/dev/bge/if_bge.c Fri Apr 25 21:28:39 2014 (r264940) @@ -3301,7 +3301,7 @@ bge_attach(device_t dev) struct bge_softc *sc; uint32_t hwcfg = 0, misccfg, pcistate; u_char eaddr[ETHER_ADDR_LEN]; - int capmask, error, msicount, reg, rid, trys; + int capmask, error, reg, rid, trys; sc = device_get_softc(dev); sc->bge_dev = dev; @@ -3310,11 +3310,11 @@ bge_attach(device_t dev) TASK_INIT(&sc->bge_intr_task, 0, bge_intr_task, sc); callout_init_mtx(&sc->bge_stat_ch, &sc->bge_mtx, 0); - /* - * Map control/status registers. - */ pci_enable_busmaster(dev); + /* + * Allocate control/status registers. + */ rid = PCIR_BAR(0); sc->bge_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); @@ -3624,13 +3624,8 @@ bge_attach(device_t dev) rid = 0; if (pci_find_cap(sc->bge_dev, PCIY_MSI, ®) == 0) { sc->bge_msicap = reg; - if (bge_can_use_msi(sc)) { - msicount = pci_msi_count(dev); - if (msicount > 1) - msicount = 1; - } else - msicount = 0; - if (msicount == 1 && pci_alloc_msi(dev, &msicount) == 0) { + reg = 1; + if (bge_can_use_msi(sc) && pci_alloc_msi(dev, ®) == 0) { rid = 1; sc->bge_flags |= BGE_FLAG_MSI; } @@ -3647,7 +3642,7 @@ bge_attach(device_t dev) #endif sc->bge_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, - RF_SHAREABLE | RF_ACTIVE); + RF_ACTIVE | (rid != 0 ? 0 : RF_SHAREABLE)); if (sc->bge_irq == NULL) { device_printf(sc->bge_dev, "couldn't map interrupt\n"); @@ -3990,20 +3985,19 @@ bge_release_resources(struct bge_softc * if (sc->bge_intrhand != NULL) bus_teardown_intr(dev, sc->bge_irq, sc->bge_intrhand); - if (sc->bge_irq != NULL) + if (sc->bge_irq != NULL) { bus_release_resource(dev, SYS_RES_IRQ, - sc->bge_flags & BGE_FLAG_MSI ? 1 : 0, sc->bge_irq); - - if (sc->bge_flags & BGE_FLAG_MSI) + rman_get_rid(sc->bge_irq), sc->bge_irq); pci_release_msi(dev); + } if (sc->bge_res != NULL) bus_release_resource(dev, SYS_RES_MEMORY, - PCIR_BAR(0), sc->bge_res); + rman_get_rid(sc->bge_res), sc->bge_res); if (sc->bge_res2 != NULL) bus_release_resource(dev, SYS_RES_MEMORY, - PCIR_BAR(2), sc->bge_res2); + rman_get_rid(sc->bge_res2), sc->bge_res2); if (sc->bge_ifp != NULL) if_free(sc->bge_ifp); From owner-svn-src-stable@FreeBSD.ORG Fri Apr 25 21:28:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 64832FA6; Fri, 25 Apr 2014 21:28:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 378F81952; Fri, 25 Apr 2014 21:28:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3PLSgva049364; Fri, 25 Apr 2014 21:28:42 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3PLSgHA049363; Fri, 25 Apr 2014 21:28:42 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201404252128.s3PLSgHA049363@svn.freebsd.org> From: Marius Strobl Date: Fri, 25 Apr 2014 21:28:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264941 - stable/9/sys/dev/bge X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2014 21:28:42 -0000 Author: marius Date: Fri Apr 25 21:28:41 2014 New Revision: 264941 URL: http://svnweb.freebsd.org/changeset/base/264941 Log: MFC: r260045 - Simplify MSI allocation and release. For a single one, we don't need to fiddle with the MSI count and pci_release_msi(9) is smart enough to just do nothing in case of INTx. - Don't allocate MSI as RF_SHAREABLE. Modified: stable/9/sys/dev/bge/if_bge.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/bge/if_bge.c ============================================================================== --- stable/9/sys/dev/bge/if_bge.c Fri Apr 25 21:28:39 2014 (r264940) +++ stable/9/sys/dev/bge/if_bge.c Fri Apr 25 21:28:41 2014 (r264941) @@ -3326,7 +3326,7 @@ bge_attach(device_t dev) struct bge_softc *sc; uint32_t hwcfg = 0, misccfg, pcistate; u_char eaddr[ETHER_ADDR_LEN]; - int capmask, error, msicount, reg, rid, trys; + int capmask, error, reg, rid, trys; sc = device_get_softc(dev); sc->bge_dev = dev; @@ -3335,11 +3335,11 @@ bge_attach(device_t dev) TASK_INIT(&sc->bge_intr_task, 0, bge_intr_task, sc); callout_init_mtx(&sc->bge_stat_ch, &sc->bge_mtx, 0); - /* - * Map control/status registers. - */ pci_enable_busmaster(dev); + /* + * Allocate control/status registers. + */ rid = PCIR_BAR(0); sc->bge_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); @@ -3649,13 +3649,8 @@ bge_attach(device_t dev) rid = 0; if (pci_find_cap(sc->bge_dev, PCIY_MSI, ®) == 0) { sc->bge_msicap = reg; - if (bge_can_use_msi(sc)) { - msicount = pci_msi_count(dev); - if (msicount > 1) - msicount = 1; - } else - msicount = 0; - if (msicount == 1 && pci_alloc_msi(dev, &msicount) == 0) { + reg = 1; + if (bge_can_use_msi(sc) && pci_alloc_msi(dev, ®) == 0) { rid = 1; sc->bge_flags |= BGE_FLAG_MSI; } @@ -3672,7 +3667,7 @@ bge_attach(device_t dev) #endif sc->bge_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, - RF_SHAREABLE | RF_ACTIVE); + RF_ACTIVE | (rid != 0 ? 0 : RF_SHAREABLE)); if (sc->bge_irq == NULL) { device_printf(sc->bge_dev, "couldn't map interrupt\n"); @@ -4015,20 +4010,19 @@ bge_release_resources(struct bge_softc * if (sc->bge_intrhand != NULL) bus_teardown_intr(dev, sc->bge_irq, sc->bge_intrhand); - if (sc->bge_irq != NULL) + if (sc->bge_irq != NULL) { bus_release_resource(dev, SYS_RES_IRQ, - sc->bge_flags & BGE_FLAG_MSI ? 1 : 0, sc->bge_irq); - - if (sc->bge_flags & BGE_FLAG_MSI) + rman_get_rid(sc->bge_irq), sc->bge_irq); pci_release_msi(dev); + } if (sc->bge_res != NULL) bus_release_resource(dev, SYS_RES_MEMORY, - PCIR_BAR(0), sc->bge_res); + rman_get_rid(sc->bge_res), sc->bge_res); if (sc->bge_res2 != NULL) bus_release_resource(dev, SYS_RES_MEMORY, - PCIR_BAR(2), sc->bge_res2); + rman_get_rid(sc->bge_res2), sc->bge_res2); if (sc->bge_ifp != NULL) if_free(sc->bge_ifp); From owner-svn-src-stable@FreeBSD.ORG Fri Apr 25 21:32:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BD8361E9; Fri, 25 Apr 2014 21:32:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8AB719DC; Fri, 25 Apr 2014 21:32:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3PLWauD052862; Fri, 25 Apr 2014 21:32:36 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3PLWZjI052852; Fri, 25 Apr 2014 21:32:35 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201404252132.s3PLWZjI052852@svn.freebsd.org> From: Marius Strobl Date: Fri, 25 Apr 2014 21:32:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264942 - stable/10/sys/dev/ed X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2014 21:32:36 -0000 Author: marius Date: Fri Apr 25 21:32:34 2014 New Revision: 264942 URL: http://svnweb.freebsd.org/changeset/base/264942 Log: MFC: r260050, r261528 - Switch to using the common MII bitbang'ing code instead of duplicating it. - Based on lessons learnt with dc(4) (see r185750), add bus space barriers to the MII bitbang read and write functions as well as to instances of page switching. - Add missing locking to ed_ifmedia_{upd,sts}(). - Canonicalize some messages. - Based on actual functionality, ED_TC5299J_MII_DIROUT should be rather named ED_TC5299J_MII_DIRIN. - Remove unused headers. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. Modified: stable/10/sys/dev/ed/if_ed.c stable/10/sys/dev/ed/if_ed_3c503.c stable/10/sys/dev/ed/if_ed_hpp.c stable/10/sys/dev/ed/if_ed_pccard.c stable/10/sys/dev/ed/if_ed_rtl80x9.c stable/10/sys/dev/ed/if_edreg.h stable/10/sys/dev/ed/if_edvar.h stable/10/sys/dev/ed/tc5299jreg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ed/if_ed.c ============================================================================== --- stable/10/sys/dev/ed/if_ed.c Fri Apr 25 21:28:41 2014 (r264941) +++ stable/10/sys/dev/ed/if_ed.c Fri Apr 25 21:32:34 2014 (r264942) @@ -419,7 +419,11 @@ ed_stop_hw(struct ed_softc *sc) /* * Stop everything on the interface, and select page 0 registers. */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_STP); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); /* * Wait for interface to enter stopped state, but limit # of checks to @@ -527,7 +531,11 @@ ed_init_locked(struct ed_softc *sc) /* * Set interface for page 0, Remote DMA complete, Stopped */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_STP); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); if (sc->isa16bit) /* @@ -590,7 +598,11 @@ ed_init_locked(struct ed_softc *sc) /* * Program Command Register for page 1 */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_PAGE_1 | ED_CR_STP); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); /* * Copy out our station address @@ -644,7 +656,11 @@ ed_xmit(struct ed_softc *sc) /* * Set NIC for page 0 register access */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_STA); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); /* * Set TX buffer start page @@ -661,7 +677,11 @@ ed_xmit(struct ed_softc *sc) /* * Set page 0, Remote DMA complete, Transmit Packet, and *Start* */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_TXP | ED_CR_STA); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); sc->xmit_busy = 1; /* @@ -800,7 +820,11 @@ ed_rint(struct ed_softc *sc) /* * Set NIC to page 1 registers to get 'current' pointer */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_PAGE_1 | ED_CR_STA); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); /* * 'sc->next_packet' is the logical beginning of the ring-buffer - @@ -904,14 +928,22 @@ ed_rint(struct ed_softc *sc) /* * Set NIC to page 0 registers to update boundry register */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_STA); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_BNRY, boundry); /* * Set NIC to page 1 registers before looping to top (prepare * to get 'CURR' current pointer) */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_PAGE_1 | ED_CR_STA); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); } } @@ -934,7 +966,11 @@ edintr(void *arg) /* * Set NIC to page 0 registers */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_STA); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); /* * loop until there are no more new interrupts. When the card goes @@ -1152,7 +1188,11 @@ edintr(void *arg) * set in the transmit routine, is *okay* - it is 'edge' * triggered from low to high) */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_STA); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); /* * If the Network Talley Counters overflow, read them to reset @@ -1354,7 +1394,11 @@ ed_pio_readmem(struct ed_softc *sc, bus_ { /* Regular Novell cards */ /* select page 0 registers */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, ED_CR_RD2 | ED_CR_STA); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); /* round up to a word */ if (amount & 1) @@ -1387,7 +1431,11 @@ ed_pio_writemem(struct ed_softc *sc, uin int maxwait = 200; /* about 240us */ /* select page 0 registers */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, ED_CR_RD2 | ED_CR_STA); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); /* reset remote DMA complete flag */ ed_nic_outb(sc, ED_P0_ISR, ED_ISR_RDC); @@ -1444,7 +1492,11 @@ ed_pio_write_mbufs(struct ed_softc *sc, dma_len++; /* select page 0 registers */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, ED_CR_RD2 | ED_CR_STA); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); /* reset remote DMA complete flag */ ed_nic_outb(sc, ED_P0_ISR, ED_ISR_RDC); @@ -1555,7 +1607,11 @@ ed_setrcr(struct ed_softc *sc) reg1 = 0x00; /* set page 1 registers */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_PAGE_1 | ED_CR_STP); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); if (ifp->if_flags & IFF_PROMISC) { @@ -1570,7 +1626,11 @@ ed_setrcr(struct ed_softc *sc) * runts and packets with CRC & alignment errors. */ /* Set page 0 registers */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_STP); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_RCR, ED_RCR_PRO | ED_RCR_AM | ED_RCR_AB | ED_RCR_AR | ED_RCR_SEP | reg1); @@ -1592,7 +1652,11 @@ ed_setrcr(struct ed_softc *sc) ed_nic_outb(sc, ED_P1_MAR(i), ((u_char *) mcaf)[i]); /* Set page 0 registers */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_STP); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_RCR, ED_RCR_AM | ED_RCR_AB | reg1); } else { @@ -1605,6 +1669,8 @@ ed_setrcr(struct ed_softc *sc) ed_nic_outb(sc, ED_P1_MAR(i), 0x00); /* Set page 0 registers */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_STP); ed_nic_outb(sc, ED_P0_RCR, ED_RCR_AB | reg1); Modified: stable/10/sys/dev/ed/if_ed_3c503.c ============================================================================== --- stable/10/sys/dev/ed/if_ed_3c503.c Fri Apr 25 21:28:41 2014 (r264941) +++ stable/10/sys/dev/ed/if_ed_3c503.c Fri Apr 25 21:32:34 2014 (r264942) @@ -216,7 +216,11 @@ ed_probe_3Com(device_t dev, int port_rid /* * select page 0 registers */ - ed_nic_outb(sc, ED_P0_CR, ED_CR_RD2 | ED_CR_STP); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + ed_nic_outb(sc, ED_P0_CR, ED_CR_PAGE_0 | ED_CR_RD2 | ED_CR_STP); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); /* * Attempt to clear WTS bit. If it doesn't clear, then this is a 16bit @@ -227,7 +231,11 @@ ed_probe_3Com(device_t dev, int port_rid /* * select page 2 registers */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, ED_CR_PAGE_2 | ED_CR_RD2 | ED_CR_STP); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); /* * The 3c503 forces the WTS bit to a one if this is a 16bit board Modified: stable/10/sys/dev/ed/if_ed_hpp.c ============================================================================== --- stable/10/sys/dev/ed/if_ed_hpp.c Fri Apr 25 21:28:41 2014 (r264941) +++ stable/10/sys/dev/ed/if_ed_hpp.c Fri Apr 25 21:32:34 2014 (r264942) @@ -564,7 +564,11 @@ ed_hpp_write_mbufs(struct ed_softc *sc, int use_32bit_accesses = !(sc->hpp_id & ED_HPP_ID_16_BIT_ACCESS); /* select page 0 registers */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_STA); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); /* reset remote DMA complete flag */ ed_nic_outb(sc, ED_P0_ISR, ED_ISR_RDC); Modified: stable/10/sys/dev/ed/if_ed_pccard.c ============================================================================== --- stable/10/sys/dev/ed/if_ed_pccard.c Fri Apr 25 21:28:41 2014 (r264941) +++ stable/10/sys/dev/ed/if_ed_pccard.c Fri Apr 25 21:32:34 2014 (r264942) @@ -75,9 +75,6 @@ #include #include #include -#include -#include - #include #include #include @@ -246,6 +243,54 @@ static const struct ed_product { }; /* + * MII bit-bang glue + */ +static uint32_t ed_pccard_dl100xx_mii_bitbang_read(device_t dev); +static void ed_pccard_dl100xx_mii_bitbang_write(device_t dev, uint32_t val); + +static const struct mii_bitbang_ops ed_pccard_dl100xx_mii_bitbang_ops = { + ed_pccard_dl100xx_mii_bitbang_read, + ed_pccard_dl100xx_mii_bitbang_write, + { + ED_DL100XX_MII_DATAOUT, /* MII_BIT_MDO */ + ED_DL100XX_MII_DATAIN, /* MII_BIT_MDI */ + ED_DL100XX_MII_CLK, /* MII_BIT_MDC */ + ED_DL100XX_MII_DIROUT, /* MII_BIT_DIR_HOST_PHY */ + 0 /* MII_BIT_DIR_PHY_HOST */ + } +}; + +static uint32_t ed_pccard_ax88x90_mii_bitbang_read(device_t dev); +static void ed_pccard_ax88x90_mii_bitbang_write(device_t dev, uint32_t val); + +static const struct mii_bitbang_ops ed_pccard_ax88x90_mii_bitbang_ops = { + ed_pccard_ax88x90_mii_bitbang_read, + ed_pccard_ax88x90_mii_bitbang_write, + { + ED_AX88X90_MII_DATAOUT, /* MII_BIT_MDO */ + ED_AX88X90_MII_DATAIN, /* MII_BIT_MDI */ + ED_AX88X90_MII_CLK, /* MII_BIT_MDC */ + 0, /* MII_BIT_DIR_HOST_PHY */ + ED_AX88X90_MII_DIRIN /* MII_BIT_DIR_PHY_HOST */ + } +}; + +static uint32_t ed_pccard_tc5299j_mii_bitbang_read(device_t dev); +static void ed_pccard_tc5299j_mii_bitbang_write(device_t dev, uint32_t val); + +static const struct mii_bitbang_ops ed_pccard_tc5299j_mii_bitbang_ops = { + ed_pccard_tc5299j_mii_bitbang_read, + ed_pccard_tc5299j_mii_bitbang_write, + { + ED_TC5299J_MII_DATAOUT, /* MII_BIT_MDO */ + ED_TC5299J_MII_DATAIN, /* MII_BIT_MDI */ + ED_TC5299J_MII_CLK, /* MII_BIT_MDC */ + 0, /* MII_BIT_DIR_HOST_PHY */ + ED_AX88X90_MII_DIRIN /* MII_BIT_DIR_PHY_HOST */ + } +}; + +/* * PC Card (PCMCIA) specific code. */ static int ed_pccard_probe(device_t); @@ -254,23 +299,14 @@ static void ed_pccard_tick(struct ed_sof static int ed_pccard_dl100xx(device_t dev, const struct ed_product *); static void ed_pccard_dl100xx_mii_reset(struct ed_softc *sc); -static u_int ed_pccard_dl100xx_mii_readbits(struct ed_softc *sc, int nbits); -static void ed_pccard_dl100xx_mii_writebits(struct ed_softc *sc, u_int val, - int nbits); static int ed_pccard_ax88x90(device_t dev, const struct ed_product *); -static u_int ed_pccard_ax88x90_mii_readbits(struct ed_softc *sc, int nbits); -static void ed_pccard_ax88x90_mii_writebits(struct ed_softc *sc, u_int val, - int nbits); static int ed_miibus_readreg(device_t dev, int phy, int reg); static int ed_ifmedia_upd(struct ifnet *); static void ed_ifmedia_sts(struct ifnet *, struct ifmediareq *); static int ed_pccard_tc5299j(device_t dev, const struct ed_product *); -static u_int ed_pccard_tc5299j_mii_readbits(struct ed_softc *sc, int nbits); -static void ed_pccard_tc5299j_mii_writebits(struct ed_softc *sc, u_int val, - int nbits); static void ed_pccard_print_entry(const struct ed_product *pp) @@ -501,7 +537,7 @@ ed_pccard_attach(device_t dev) error = ed_pccard_tc5299j(dev, pp); if (error != 0) { error = ed_probe_Novell_generic(dev, flags); - printf("Novell probe generic %d\n", error); + printf("Novell generic probe failed: %d\n", error); } if (error != 0 && (pp->flags & NE2000DVF_TOSHIBA)) { flags |= ED_FLAGS_TOSH_ETHER; @@ -626,7 +662,7 @@ ed_pccard_dl100xx(device_t dev, const st if (!(pp->flags & NE2000DVF_DL100XX)) return (ENXIO); if (bootverbose) - device_printf(dev, "Trying DL100xx probing\n"); + device_printf(dev, "Trying DL100xx\n"); error = ed_probe_Novell_generic(dev, device_get_flags(dev)); if (bootverbose && error) device_printf(dev, "Novell generic probe failed: %d\n", error); @@ -677,16 +713,11 @@ ed_pccard_dl100xx(device_t dev, const st sc->chip_type = (id & 0x90) == 0x90 ? ED_CHIP_TYPE_DL10022 : ED_CHIP_TYPE_DL10019; sc->type_str = ((id & 0x90) == 0x90) ? "DL10022" : "DL10019"; - sc->mii_readbits = ed_pccard_dl100xx_mii_readbits; - sc->mii_writebits = ed_pccard_dl100xx_mii_writebits; + sc->mii_bitbang_ops = &ed_pccard_dl100xx_mii_bitbang_ops; return (0); } /* MII bit-twiddling routines for cards using Dlink chipset */ -#define DL100XX_MIISET(sc, x) ed_asic_outb(sc, ED_DL100XX_MIIBUS, \ - ed_asic_inb(sc, ED_DL100XX_MIIBUS) | (x)) -#define DL100XX_MIICLR(sc, x) ed_asic_outb(sc, ED_DL100XX_MIIBUS, \ - ed_asic_inb(sc, ED_DL100XX_MIIBUS) & ~(x)) static void ed_pccard_dl100xx_mii_reset(struct ed_softc *sc) @@ -708,36 +739,29 @@ ed_pccard_dl100xx_mii_reset(struct ed_so } static void -ed_pccard_dl100xx_mii_writebits(struct ed_softc *sc, u_int val, int nbits) +ed_pccard_dl100xx_mii_bitbang_write(device_t dev, uint32_t val) { - int i; + struct ed_softc *sc; - DL100XX_MIISET(sc, ED_DL100XX_MII_DIROUT); - for (i = nbits - 1; i >= 0; i--) { - if ((val >> i) & 1) - DL100XX_MIISET(sc, ED_DL100XX_MII_DATAOUT); - else - DL100XX_MIICLR(sc, ED_DL100XX_MII_DATAOUT); - DL100XX_MIISET(sc, ED_DL100XX_MII_CLK); - DL100XX_MIICLR(sc, ED_DL100XX_MII_CLK); - } + sc = device_get_softc(dev); + + ed_asic_outb(sc, ED_DL100XX_MIIBUS, val); + ed_asic_barrier(sc, ED_DL100XX_MIIBUS, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); } -static u_int -ed_pccard_dl100xx_mii_readbits(struct ed_softc *sc, int nbits) +static uint32_t +ed_pccard_dl100xx_mii_bitbang_read(device_t dev) { - int i; - u_int val = 0; + struct ed_softc *sc; + uint32_t val; - DL100XX_MIICLR(sc, ED_DL100XX_MII_DIROUT); - for (i = nbits - 1; i >= 0; i--) { - DL100XX_MIISET(sc, ED_DL100XX_MII_CLK); - val <<= 1; - if (ed_asic_inb(sc, ED_DL100XX_MIIBUS) & ED_DL100XX_MII_DATAIN) - val++; - DL100XX_MIICLR(sc, ED_DL100XX_MII_CLK); - } - return val; + sc = device_get_softc(dev); + + val = ed_asic_inb(sc, ED_DL100XX_MIIBUS); + ed_asic_barrier(sc, ED_DL100XX_MIIBUS, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + return (val); } static void @@ -746,7 +770,11 @@ ed_pccard_ax88x90_reset(struct ed_softc int i; /* Reset Card */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, ED_CR_RD2 | ED_CR_STP | ED_CR_PAGE_0); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_asic_outb(sc, ED_NOVELL_RESET, ed_asic_inb(sc, ED_NOVELL_RESET)); /* Wait for the RST bit to assert, but cap it at 10ms */ @@ -879,7 +907,6 @@ ed_pccard_ax88x90_check_mii(device_t dev if (i == 32) return (ENXIO); return (0); - } /* @@ -909,18 +936,17 @@ ed_pccard_ax88x90(device_t dev, const st pccard_ccr_write_1(dev, PCCARD_CCR_IOBASE0, iobase & 0xff); pccard_ccr_write_1(dev, PCCARD_CCR_IOBASE1, (iobase >> 8) & 0xff); - sc->mii_readbits = ed_pccard_ax88x90_mii_readbits; - sc->mii_writebits = ed_pccard_ax88x90_mii_writebits; error = ed_probe_ax88x90_generic(dev, device_get_flags(dev)); if (error) { if (bootverbose) device_printf(dev, "probe ax88x90 failed %d\n", error); - goto fail; + return (error); } + sc->mii_bitbang_ops = &ed_pccard_ax88x90_mii_bitbang_ops; error = ed_pccard_ax88x90_check_mii(dev, sc); if (error) - goto fail; + return (error); sc->vendor = ED_VENDOR_NOVELL; sc->type = ED_TYPE_NE2000; if (sc->chip_type == ED_CHIP_TYPE_AX88190) @@ -928,40 +954,32 @@ ed_pccard_ax88x90(device_t dev, const st else sc->type_str = "AX88790"; return (0); -fail:; - sc->mii_readbits = 0; - sc->mii_writebits = 0; - return (error); } static void -ed_pccard_ax88x90_mii_writebits(struct ed_softc *sc, u_int val, int nbits) +ed_pccard_ax88x90_mii_bitbang_write(device_t dev, uint32_t val) { - int i, data; + struct ed_softc *sc; - for (i = nbits - 1; i >= 0; i--) { - data = (val >> i) & 1 ? ED_AX88X90_MII_DATAOUT : 0; - ed_asic_outb(sc, ED_AX88X90_MIIBUS, data); - ed_asic_outb(sc, ED_AX88X90_MIIBUS, data | ED_AX88X90_MII_CLK); - } + sc = device_get_softc(dev); + + ed_asic_outb(sc, ED_AX88X90_MIIBUS, val); + ed_asic_barrier(sc, ED_AX88X90_MIIBUS, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); } -static u_int -ed_pccard_ax88x90_mii_readbits(struct ed_softc *sc, int nbits) +static uint32_t +ed_pccard_ax88x90_mii_bitbang_read(device_t dev) { - int i; - u_int val = 0; - uint8_t mdio; + struct ed_softc *sc; + uint32_t val; - mdio = ED_AX88X90_MII_DIRIN; - for (i = nbits - 1; i >= 0; i--) { - ed_asic_outb(sc, ED_AX88X90_MIIBUS, mdio); - val <<= 1; - if (ed_asic_inb(sc, ED_AX88X90_MIIBUS) & ED_AX88X90_MII_DATAIN) - val++; - ed_asic_outb(sc, ED_AX88X90_MIIBUS, mdio | ED_AX88X90_MII_CLK); - } - return val; + sc = device_get_softc(dev); + + val = ed_asic_inb(sc, ED_AX88X90_MIIBUS); + ed_asic_barrier(sc, ED_AX88X90_MIIBUS, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + return (val); } /* @@ -982,7 +1000,7 @@ ed_pccard_tc5299j(device_t dev, const st error = ed_probe_Novell_generic(dev, device_get_flags(dev)); if (bootverbose) - device_printf(dev, "probe novel returns %d\n", error); + device_printf(dev, "Novell generic probe failed: %d\n", error); if (error != 0) return (error); @@ -991,24 +1009,17 @@ ed_pccard_tc5299j(device_t dev, const st * devices have MII and a PHY, so we use this to weed out chips that * would otherwise make it through the tests we have after this point. */ - sc->mii_readbits = ed_pccard_tc5299j_mii_readbits; - sc->mii_writebits = ed_pccard_tc5299j_mii_writebits; + sc->mii_bitbang_ops = &ed_pccard_tc5299j_mii_bitbang_ops; for (i = 0; i < 32; i++) { id = ed_miibus_readreg(dev, i, MII_PHYIDR1); if (id != 0 && id != 0xffff) break; } - if (i == 32) { - sc->mii_readbits = 0; - sc->mii_writebits = 0; + if (i == 32) return (ENXIO); - } ts = "TC5299J"; - if (ed_pccard_rom_mac(dev, sc->enaddr) == 0) { - sc->mii_readbits = 0; - sc->mii_writebits = 0; + if (ed_pccard_rom_mac(dev, sc->enaddr) == 0) return (ENXIO); - } sc->vendor = ED_VENDOR_NOVELL; sc->type = ED_TYPE_NE2000; sc->chip_type = ED_CHIP_TYPE_TC5299J; @@ -1017,50 +1028,31 @@ ed_pccard_tc5299j(device_t dev, const st } static void -ed_pccard_tc5299j_mii_writebits(struct ed_softc *sc, u_int val, int nbits) +ed_pccard_tc5299j_mii_bitbang_write(device_t dev, uint32_t val) { - int i; - uint8_t cr, data; + struct ed_softc *sc; - /* Select page 3 */ - cr = ed_nic_inb(sc, ED_P0_CR); - ed_nic_outb(sc, ED_P0_CR, cr | ED_CR_PAGE_3); - - for (i = nbits - 1; i >= 0; i--) { - data = (val >> i) & 1 ? ED_TC5299J_MII_DATAOUT : 0; - ed_nic_outb(sc, ED_TC5299J_MIIBUS, data); - ed_nic_outb(sc, ED_TC5299J_MIIBUS, data | ED_TC5299J_MII_CLK); - } - ed_nic_outb(sc, ED_TC5299J_MIIBUS, 0); - - /* Restore prior page */ - ed_nic_outb(sc, ED_P0_CR, cr); + sc = device_get_softc(dev); + + /* We are already on page 3. */ + ed_nic_outb(sc, ED_TC5299J_MIIBUS, val); + ed_nic_barrier(sc, ED_TC5299J_MIIBUS, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); } -static u_int -ed_pccard_tc5299j_mii_readbits(struct ed_softc *sc, int nbits) +static uint32_t +ed_pccard_tc5299j_mii_bitbang_read(device_t dev) { - int i; - u_int val = 0; - uint8_t cr; + struct ed_softc *sc; + uint32_t val; + + sc = device_get_softc(dev); - /* Select page 3 */ - cr = ed_nic_inb(sc, ED_P0_CR); - ed_nic_outb(sc, ED_P0_CR, cr | ED_CR_PAGE_3); - - ed_asic_outb(sc, ED_TC5299J_MIIBUS, ED_TC5299J_MII_DIROUT); - for (i = nbits - 1; i >= 0; i--) { - ed_nic_outb(sc, ED_TC5299J_MIIBUS, - ED_TC5299J_MII_CLK | ED_TC5299J_MII_DIROUT); - val <<= 1; - if (ed_nic_inb(sc, ED_TC5299J_MIIBUS) & ED_TC5299J_MII_DATAIN) - val++; - ed_nic_outb(sc, ED_TC5299J_MIIBUS, ED_TC5299J_MII_DIROUT); - } - - /* Restore prior page */ - ed_nic_outb(sc, ED_P0_CR, cr); - return val; + /* We are already on page 3. */ + val = ed_asic_inb(sc, ED_TC5299J_MIIBUS); + ed_nic_barrier(sc, ED_TC5299J_MIIBUS, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + return (val); } /* @@ -1070,7 +1062,8 @@ static int ed_miibus_readreg(device_t dev, int phy, int reg) { struct ed_softc *sc; - int failed, val; + int val; + uint8_t cr = 0; sc = device_get_softc(dev); /* @@ -1084,10 +1077,6 @@ ed_miibus_readreg(device_t dev, int phy, * Also, PHYs above 16 appear to be phantoms on some cards, but not * others. Registers read for this are often the same as prior values * read. Filter all register requests to 17-31. - * - * I can't explain it, since I don't have the DL100xx data sheets, but - * the DL100xx chips do 13-bits before the 'ACK' but, but the AX88x90 - * chips have 14. The linux pcnet and axnet drivers confirm this. */ if (sc->chip_type == ED_CHIP_TYPE_AX88790) { if (phy > 0x10) @@ -1097,29 +1086,33 @@ ed_miibus_readreg(device_t dev, int phy, ED_AX88X90_GPIO_INT_PHY); else ed_asic_outb(sc, ED_AX88X90_GPIO, 0); + ed_asic_barrier(sc, ED_AX88X90_GPIO, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + } else if (sc->chip_type == ED_CHIP_TYPE_TC5299J) { + /* Select page 3. */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + cr = ed_nic_inb(sc, ED_P0_CR); + ed_nic_outb(sc, ED_P0_CR, cr | ED_CR_PAGE_3); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + } + val = mii_bitbang_readreg(dev, sc->mii_bitbang_ops, phy, reg); + if (sc->chip_type == ED_CHIP_TYPE_TC5299J) { + /* Restore prior page. */ + ed_nic_outb(sc, ED_P0_CR, cr); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); } - - (*sc->mii_writebits)(sc, 0xffffffff, 32); - (*sc->mii_writebits)(sc, ED_MII_STARTDELIM, ED_MII_STARTDELIM_BITS); - (*sc->mii_writebits)(sc, ED_MII_READOP, ED_MII_OP_BITS); - (*sc->mii_writebits)(sc, phy, ED_MII_PHY_BITS); - (*sc->mii_writebits)(sc, reg, ED_MII_REG_BITS); - if (sc->chip_type == ED_CHIP_TYPE_AX88790 || - sc->chip_type == ED_CHIP_TYPE_AX88190) - (*sc->mii_readbits)(sc, ED_MII_ACK_BITS); - failed = (*sc->mii_readbits)(sc, ED_MII_ACK_BITS); - val = (*sc->mii_readbits)(sc, ED_MII_DATA_BITS); - (*sc->mii_writebits)(sc, ED_MII_IDLE, ED_MII_IDLE_BITS); -/* printf("Reading phy %d reg %#x returning %#x (valid %d)\n", phy, reg, val, !failed); */ - return (failed ? 0 : val); + return (val); } static int ed_miibus_writereg(device_t dev, int phy, int reg, int data) { struct ed_softc *sc; + uint8_t cr = 0; -/* printf("Writing phy %d reg %#x data %#x\n", phy, reg, data); */ sc = device_get_softc(dev); /* See ed_miibus_readreg for details */ if (sc->chip_type == ED_CHIP_TYPE_AX88790) { @@ -1130,15 +1123,24 @@ ed_miibus_writereg(device_t dev, int phy ED_AX88X90_GPIO_INT_PHY); else ed_asic_outb(sc, ED_AX88X90_GPIO, 0); + ed_asic_barrier(sc, ED_AX88X90_GPIO, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + } else if (sc->chip_type == ED_CHIP_TYPE_TC5299J) { + /* Select page 3. */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + cr = ed_nic_inb(sc, ED_P0_CR); + ed_nic_outb(sc, ED_P0_CR, cr | ED_CR_PAGE_3); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + } + mii_bitbang_writereg(dev, sc->mii_bitbang_ops, phy, reg, data); + if (sc->chip_type == ED_CHIP_TYPE_TC5299J) { + /* Restore prior page. */ + ed_nic_outb(sc, ED_P0_CR, cr); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); } - (*sc->mii_writebits)(sc, 0xffffffff, 32); - (*sc->mii_writebits)(sc, ED_MII_STARTDELIM, ED_MII_STARTDELIM_BITS); - (*sc->mii_writebits)(sc, ED_MII_WRITEOP, ED_MII_OP_BITS); - (*sc->mii_writebits)(sc, phy, ED_MII_PHY_BITS); - (*sc->mii_writebits)(sc, reg, ED_MII_REG_BITS); - (*sc->mii_writebits)(sc, ED_MII_TURNAROUND, ED_MII_TURNAROUND_BITS); - (*sc->mii_writebits)(sc, data, ED_MII_DATA_BITS); - (*sc->mii_writebits)(sc, ED_MII_IDLE, ED_MII_IDLE_BITS); return (0); } @@ -1149,9 +1151,12 @@ ed_ifmedia_upd(struct ifnet *ifp) int error; sc = ifp->if_softc; - if (sc->miibus == NULL) - return (ENXIO); ED_LOCK(sc); + if (sc->miibus == NULL) { + ED_UNLOCK(sc); + return (ENXIO); + } + error = ed_pccard_kick_phy(sc); ED_UNLOCK(sc); return (error); @@ -1164,13 +1169,17 @@ ed_ifmedia_sts(struct ifnet *ifp, struct struct mii_data *mii; sc = ifp->if_softc; - if (sc->miibus == NULL) + ED_LOCK(sc); + if (sc->miibus == NULL) { return; + ED_UNLOCK(sc); + } mii = device_get_softc(sc->miibus); mii_pollstat(mii); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + ED_UNLOCK(sc); } static void @@ -1225,7 +1234,7 @@ static device_method_t ed_pccard_methods DEVMETHOD(miibus_readreg, ed_miibus_readreg), DEVMETHOD(miibus_writereg, ed_miibus_writereg), - { 0, 0 } + DEVMETHOD_END }; static driver_t ed_pccard_driver = { @@ -1234,7 +1243,7 @@ static driver_t ed_pccard_driver = { sizeof(struct ed_softc) }; -DRIVER_MODULE(ed, pccard, ed_pccard_driver, ed_devclass, 0, 0); -DRIVER_MODULE(miibus, ed, miibus_driver, miibus_devclass, 0, 0); +DRIVER_MODULE(ed, pccard, ed_pccard_driver, ed_devclass, 0, NULL); +DRIVER_MODULE(miibus, ed, miibus_driver, miibus_devclass, 0, NULL); MODULE_DEPEND(ed, miibus, 1, 1, 1); MODULE_DEPEND(ed, ether, 1, 1, 1); Modified: stable/10/sys/dev/ed/if_ed_rtl80x9.c ============================================================================== --- stable/10/sys/dev/ed/if_ed_rtl80x9.c Fri Apr 25 21:28:41 2014 (r264941) +++ stable/10/sys/dev/ed/if_ed_rtl80x9.c Fri Apr 25 21:32:34 2014 (r264942) @@ -116,7 +116,11 @@ ed_probe_RTL80x9(device_t dev, int port_ ifmedia_add(&sc->ifmedia, IFM_ETHER | IFM_10_5, 0, 0); ifmedia_add(&sc->ifmedia, IFM_ETHER | IFM_AUTO, 0, 0); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, ED_CR_RD2 | ED_CR_PAGE_3 | ED_CR_STP); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); switch (ed_nic_inb(sc, ED_RTL80X9_CONFIG2) & ED_RTL80X9_CF2_MEDIA) { case ED_RTL80X9_CF2_AUTO: @@ -144,8 +148,12 @@ ed_rtl_set_media(struct ifnet *ifp) sc = ifp->if_softc; ED_LOCK(sc); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_PAGE_3 | (ed_nic_inb(sc, ED_P0_CR) & (ED_CR_STA | ED_CR_STP))); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); switch(IFM_SUBTYPE(sc->ifmedia.ifm_cur->ifm_media)) { case IFM_10_T: @@ -189,8 +197,12 @@ ed_rtl_get_media(struct ifnet *ifp, stru if (IFM_SUBTYPE(imr->ifm_active) == IFM_AUTO) { ED_LOCK(sc); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_PAGE_3 | (ed_nic_inb(sc, ED_P0_CR) & (ED_CR_STA | ED_CR_STP))); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); switch (ed_nic_inb(sc, ED_RTL80X9_CONFIG0) & (sc->chip_type == ED_CHIP_TYPE_RTL8029 ? ED_RTL80X9_CF0_BNC Modified: stable/10/sys/dev/ed/if_edreg.h ============================================================================== --- stable/10/sys/dev/ed/if_edreg.h Fri Apr 25 21:28:41 2014 (r264941) +++ stable/10/sys/dev/ed/if_edreg.h Fri Apr 25 21:32:34 2014 (r264942) @@ -1079,22 +1079,3 @@ struct ed_ring { #define ED_CHIP_TYPE_TC5299J 10 #define ED_CHIP_TYPE_W89C926 11 #define ED_CHIP_TYPE_WD790 12 - -/* - * MII bus definitions. These are common to both DL100xx and AX88x90 - * MII definitions, because they are standards based. - */ -#define ED_MII_STARTDELIM 0x01 -#define ED_MII_WRITEOP 0x01 -#define ED_MII_READOP 0x02 -#define ED_MII_TURNAROUND 0x02 -#define ED_MII_IDLE 0x01 - -#define ED_MII_STARTDELIM_BITS 2 -#define ED_MII_OP_BITS 2 -#define ED_MII_PHY_BITS 5 -#define ED_MII_REG_BITS 5 -#define ED_MII_TURNAROUND_BITS 2 -#define ED_MII_ACK_BITS 1 -#define ED_MII_DATA_BITS 16 -#define ED_MII_IDLE_BITS 1 Modified: stable/10/sys/dev/ed/if_edvar.h ============================================================================== --- stable/10/sys/dev/ed/if_edvar.h Fri Apr 25 21:28:41 2014 (r264941) +++ stable/10/sys/dev/ed/if_edvar.h Fri Apr 25 21:32:34 2014 (r264942) @@ -28,7 +28,10 @@ */ #ifndef SYS_DEV_ED_IF_EDVAR_H -#define SYS_DEV_ED_IF_EDVAR_H +#define SYS_DEV_ED_IF_EDVAR_H + +#include + /* * ed_softc: per line info and status */ @@ -62,8 +65,7 @@ struct ed_softc { u_long command); void (*sc_mediachg)(struct ed_softc *); device_t miibus; /* MII bus for cards with MII. */ - void (*mii_writebits)(struct ed_softc *, u_int, int); - u_int (*mii_readbits)(struct ed_softc *, int); + mii_bitbang_ops_t mii_bitbang_ops; struct callout tick_ch; void (*sc_tick)(struct ed_softc *); void (*readmem)(struct ed_softc *sc, bus_size_t src, uint8_t *dst, @@ -109,6 +111,10 @@ struct ed_softc { struct ifmib_iso_8802_3 mibdata; /* stuff for network mgmt */ }; +#define ed_nic_barrier(sc, port, length, flags) \ + bus_space_barrier(sc->port_bst, sc->port_bsh, \ + (sc)->nic_offset + (port), (length), (flags)) + #define ed_nic_inb(sc, port) \ bus_space_read_1(sc->port_bst, sc->port_bsh, (sc)->nic_offset + (port)) @@ -147,6 +153,10 @@ struct ed_softc { bus_space_write_multi_4(sc->port_bst, sc->port_bsh, \ (sc)->nic_offset + (port), (uint32_t *)(addr), (count)) +#define ed_asic_barrier(sc, port, length, flags) \ + bus_space_barrier(sc->port_bst, sc->port_bsh, \ + (sc)->asic_offset + (port), (length), (flags)) + #define ed_asic_inb(sc, port) \ bus_space_read_1(sc->port_bst, sc->port_bsh, \ (sc)->asic_offset + (port)) Modified: stable/10/sys/dev/ed/tc5299jreg.h ============================================================================== --- stable/10/sys/dev/ed/tc5299jreg.h Fri Apr 25 21:28:41 2014 (r264941) +++ stable/10/sys/dev/ed/tc5299jreg.h Fri Apr 25 21:32:34 2014 (r264942) @@ -34,5 +34,5 @@ #define ED_TC5299J_MII_CLK 0x01 #define ED_TC5299J_MII_DATAOUT 0x02 -#define ED_TC5299J_MII_DIROUT 0x04 +#define ED_TC5299J_MII_DIRIN 0x04 #define ED_TC5299J_MII_DATAIN 0x08 From owner-svn-src-stable@FreeBSD.ORG Fri Apr 25 21:32:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9017D2C5; Fri, 25 Apr 2014 21:32:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C6C119DD; Fri, 25 Apr 2014 21:32:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3PLWeaP052914; Fri, 25 Apr 2014 21:32:40 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3PLWc50052900; Fri, 25 Apr 2014 21:32:38 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201404252132.s3PLWc50052900@svn.freebsd.org> From: Marius Strobl Date: Fri, 25 Apr 2014 21:32:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264943 - stable/9/sys/dev/ed X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2014 21:32:40 -0000 Author: marius Date: Fri Apr 25 21:32:38 2014 New Revision: 264943 URL: http://svnweb.freebsd.org/changeset/base/264943 Log: MFC: r260050, r261528 - Switch to using the common MII bitbang'ing code instead of duplicating it. - Based on lessons learnt with dc(4) (see r185750), add bus space barriers to the MII bitbang read and write functions as well as to instances of page switching. - Add missing locking to ed_ifmedia_{upd,sts}(). - Canonicalize some messages. - Based on actual functionality, ED_TC5299J_MII_DIROUT should be rather named ED_TC5299J_MII_DIRIN. - Remove unused headers. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. Modified: stable/9/sys/dev/ed/if_ed.c stable/9/sys/dev/ed/if_ed_3c503.c stable/9/sys/dev/ed/if_ed_hpp.c stable/9/sys/dev/ed/if_ed_pccard.c stable/9/sys/dev/ed/if_ed_rtl80x9.c stable/9/sys/dev/ed/if_edreg.h stable/9/sys/dev/ed/if_edvar.h stable/9/sys/dev/ed/tc5299jreg.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ed/if_ed.c ============================================================================== --- stable/9/sys/dev/ed/if_ed.c Fri Apr 25 21:32:34 2014 (r264942) +++ stable/9/sys/dev/ed/if_ed.c Fri Apr 25 21:32:38 2014 (r264943) @@ -419,7 +419,11 @@ ed_stop_hw(struct ed_softc *sc) /* * Stop everything on the interface, and select page 0 registers. */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_STP); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); /* * Wait for interface to enter stopped state, but limit # of checks to @@ -527,7 +531,11 @@ ed_init_locked(struct ed_softc *sc) /* * Set interface for page 0, Remote DMA complete, Stopped */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_STP); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); if (sc->isa16bit) /* @@ -590,7 +598,11 @@ ed_init_locked(struct ed_softc *sc) /* * Program Command Register for page 1 */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_PAGE_1 | ED_CR_STP); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); /* * Copy out our station address @@ -644,7 +656,11 @@ ed_xmit(struct ed_softc *sc) /* * Set NIC for page 0 register access */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_STA); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); /* * Set TX buffer start page @@ -661,7 +677,11 @@ ed_xmit(struct ed_softc *sc) /* * Set page 0, Remote DMA complete, Transmit Packet, and *Start* */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_TXP | ED_CR_STA); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); sc->xmit_busy = 1; /* @@ -800,7 +820,11 @@ ed_rint(struct ed_softc *sc) /* * Set NIC to page 1 registers to get 'current' pointer */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_PAGE_1 | ED_CR_STA); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); /* * 'sc->next_packet' is the logical beginning of the ring-buffer - @@ -904,14 +928,22 @@ ed_rint(struct ed_softc *sc) /* * Set NIC to page 0 registers to update boundry register */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_STA); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_BNRY, boundry); /* * Set NIC to page 1 registers before looping to top (prepare * to get 'CURR' current pointer) */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_PAGE_1 | ED_CR_STA); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); } } @@ -934,7 +966,11 @@ edintr(void *arg) /* * Set NIC to page 0 registers */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_STA); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); /* * loop until there are no more new interrupts. When the card goes @@ -1152,7 +1188,11 @@ edintr(void *arg) * set in the transmit routine, is *okay* - it is 'edge' * triggered from low to high) */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_STA); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); /* * If the Network Talley Counters overflow, read them to reset @@ -1354,7 +1394,11 @@ ed_pio_readmem(struct ed_softc *sc, bus_ { /* Regular Novell cards */ /* select page 0 registers */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, ED_CR_RD2 | ED_CR_STA); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); /* round up to a word */ if (amount & 1) @@ -1387,7 +1431,11 @@ ed_pio_writemem(struct ed_softc *sc, uin int maxwait = 200; /* about 240us */ /* select page 0 registers */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, ED_CR_RD2 | ED_CR_STA); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); /* reset remote DMA complete flag */ ed_nic_outb(sc, ED_P0_ISR, ED_ISR_RDC); @@ -1444,7 +1492,11 @@ ed_pio_write_mbufs(struct ed_softc *sc, dma_len++; /* select page 0 registers */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, ED_CR_RD2 | ED_CR_STA); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); /* reset remote DMA complete flag */ ed_nic_outb(sc, ED_P0_ISR, ED_ISR_RDC); @@ -1555,7 +1607,11 @@ ed_setrcr(struct ed_softc *sc) reg1 = 0x00; /* set page 1 registers */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_PAGE_1 | ED_CR_STP); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); if (ifp->if_flags & IFF_PROMISC) { @@ -1570,7 +1626,11 @@ ed_setrcr(struct ed_softc *sc) * runts and packets with CRC & alignment errors. */ /* Set page 0 registers */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_STP); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_RCR, ED_RCR_PRO | ED_RCR_AM | ED_RCR_AB | ED_RCR_AR | ED_RCR_SEP | reg1); @@ -1592,7 +1652,11 @@ ed_setrcr(struct ed_softc *sc) ed_nic_outb(sc, ED_P1_MAR(i), ((u_char *) mcaf)[i]); /* Set page 0 registers */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_STP); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_RCR, ED_RCR_AM | ED_RCR_AB | reg1); } else { @@ -1605,6 +1669,8 @@ ed_setrcr(struct ed_softc *sc) ed_nic_outb(sc, ED_P1_MAR(i), 0x00); /* Set page 0 registers */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_STP); ed_nic_outb(sc, ED_P0_RCR, ED_RCR_AB | reg1); Modified: stable/9/sys/dev/ed/if_ed_3c503.c ============================================================================== --- stable/9/sys/dev/ed/if_ed_3c503.c Fri Apr 25 21:32:34 2014 (r264942) +++ stable/9/sys/dev/ed/if_ed_3c503.c Fri Apr 25 21:32:38 2014 (r264943) @@ -216,7 +216,11 @@ ed_probe_3Com(device_t dev, int port_rid /* * select page 0 registers */ - ed_nic_outb(sc, ED_P0_CR, ED_CR_RD2 | ED_CR_STP); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + ed_nic_outb(sc, ED_P0_CR, ED_CR_PAGE_0 | ED_CR_RD2 | ED_CR_STP); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); /* * Attempt to clear WTS bit. If it doesn't clear, then this is a 16bit @@ -227,7 +231,11 @@ ed_probe_3Com(device_t dev, int port_rid /* * select page 2 registers */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, ED_CR_PAGE_2 | ED_CR_RD2 | ED_CR_STP); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); /* * The 3c503 forces the WTS bit to a one if this is a 16bit board Modified: stable/9/sys/dev/ed/if_ed_hpp.c ============================================================================== --- stable/9/sys/dev/ed/if_ed_hpp.c Fri Apr 25 21:32:34 2014 (r264942) +++ stable/9/sys/dev/ed/if_ed_hpp.c Fri Apr 25 21:32:38 2014 (r264943) @@ -564,7 +564,11 @@ ed_hpp_write_mbufs(struct ed_softc *sc, int use_32bit_accesses = !(sc->hpp_id & ED_HPP_ID_16_BIT_ACCESS); /* select page 0 registers */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_STA); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); /* reset remote DMA complete flag */ ed_nic_outb(sc, ED_P0_ISR, ED_ISR_RDC); Modified: stable/9/sys/dev/ed/if_ed_pccard.c ============================================================================== --- stable/9/sys/dev/ed/if_ed_pccard.c Fri Apr 25 21:32:34 2014 (r264942) +++ stable/9/sys/dev/ed/if_ed_pccard.c Fri Apr 25 21:32:38 2014 (r264943) @@ -75,9 +75,6 @@ #include #include #include -#include -#include - #include #include #include @@ -246,6 +243,54 @@ static const struct ed_product { }; /* + * MII bit-bang glue + */ +static uint32_t ed_pccard_dl100xx_mii_bitbang_read(device_t dev); +static void ed_pccard_dl100xx_mii_bitbang_write(device_t dev, uint32_t val); + +static const struct mii_bitbang_ops ed_pccard_dl100xx_mii_bitbang_ops = { + ed_pccard_dl100xx_mii_bitbang_read, + ed_pccard_dl100xx_mii_bitbang_write, + { + ED_DL100XX_MII_DATAOUT, /* MII_BIT_MDO */ + ED_DL100XX_MII_DATAIN, /* MII_BIT_MDI */ + ED_DL100XX_MII_CLK, /* MII_BIT_MDC */ + ED_DL100XX_MII_DIROUT, /* MII_BIT_DIR_HOST_PHY */ + 0 /* MII_BIT_DIR_PHY_HOST */ + } +}; + +static uint32_t ed_pccard_ax88x90_mii_bitbang_read(device_t dev); +static void ed_pccard_ax88x90_mii_bitbang_write(device_t dev, uint32_t val); + +static const struct mii_bitbang_ops ed_pccard_ax88x90_mii_bitbang_ops = { + ed_pccard_ax88x90_mii_bitbang_read, + ed_pccard_ax88x90_mii_bitbang_write, + { + ED_AX88X90_MII_DATAOUT, /* MII_BIT_MDO */ + ED_AX88X90_MII_DATAIN, /* MII_BIT_MDI */ + ED_AX88X90_MII_CLK, /* MII_BIT_MDC */ + 0, /* MII_BIT_DIR_HOST_PHY */ + ED_AX88X90_MII_DIRIN /* MII_BIT_DIR_PHY_HOST */ + } +}; + +static uint32_t ed_pccard_tc5299j_mii_bitbang_read(device_t dev); +static void ed_pccard_tc5299j_mii_bitbang_write(device_t dev, uint32_t val); + +static const struct mii_bitbang_ops ed_pccard_tc5299j_mii_bitbang_ops = { + ed_pccard_tc5299j_mii_bitbang_read, + ed_pccard_tc5299j_mii_bitbang_write, + { + ED_TC5299J_MII_DATAOUT, /* MII_BIT_MDO */ + ED_TC5299J_MII_DATAIN, /* MII_BIT_MDI */ + ED_TC5299J_MII_CLK, /* MII_BIT_MDC */ + 0, /* MII_BIT_DIR_HOST_PHY */ + ED_AX88X90_MII_DIRIN /* MII_BIT_DIR_PHY_HOST */ + } +}; + +/* * PC Card (PCMCIA) specific code. */ static int ed_pccard_probe(device_t); @@ -254,23 +299,14 @@ static void ed_pccard_tick(struct ed_sof static int ed_pccard_dl100xx(device_t dev, const struct ed_product *); static void ed_pccard_dl100xx_mii_reset(struct ed_softc *sc); -static u_int ed_pccard_dl100xx_mii_readbits(struct ed_softc *sc, int nbits); -static void ed_pccard_dl100xx_mii_writebits(struct ed_softc *sc, u_int val, - int nbits); static int ed_pccard_ax88x90(device_t dev, const struct ed_product *); -static u_int ed_pccard_ax88x90_mii_readbits(struct ed_softc *sc, int nbits); -static void ed_pccard_ax88x90_mii_writebits(struct ed_softc *sc, u_int val, - int nbits); static int ed_miibus_readreg(device_t dev, int phy, int reg); static int ed_ifmedia_upd(struct ifnet *); static void ed_ifmedia_sts(struct ifnet *, struct ifmediareq *); static int ed_pccard_tc5299j(device_t dev, const struct ed_product *); -static u_int ed_pccard_tc5299j_mii_readbits(struct ed_softc *sc, int nbits); -static void ed_pccard_tc5299j_mii_writebits(struct ed_softc *sc, u_int val, - int nbits); static void ed_pccard_print_entry(const struct ed_product *pp) @@ -501,7 +537,7 @@ ed_pccard_attach(device_t dev) error = ed_pccard_tc5299j(dev, pp); if (error != 0) { error = ed_probe_Novell_generic(dev, flags); - printf("Novell probe generic %d\n", error); + printf("Novell generic probe failed: %d\n", error); } if (error != 0 && (pp->flags & NE2000DVF_TOSHIBA)) { flags |= ED_FLAGS_TOSH_ETHER; @@ -626,7 +662,7 @@ ed_pccard_dl100xx(device_t dev, const st if (!(pp->flags & NE2000DVF_DL100XX)) return (ENXIO); if (bootverbose) - device_printf(dev, "Trying DL100xx probing\n"); + device_printf(dev, "Trying DL100xx\n"); error = ed_probe_Novell_generic(dev, device_get_flags(dev)); if (bootverbose && error) device_printf(dev, "Novell generic probe failed: %d\n", error); @@ -677,16 +713,11 @@ ed_pccard_dl100xx(device_t dev, const st sc->chip_type = (id & 0x90) == 0x90 ? ED_CHIP_TYPE_DL10022 : ED_CHIP_TYPE_DL10019; sc->type_str = ((id & 0x90) == 0x90) ? "DL10022" : "DL10019"; - sc->mii_readbits = ed_pccard_dl100xx_mii_readbits; - sc->mii_writebits = ed_pccard_dl100xx_mii_writebits; + sc->mii_bitbang_ops = &ed_pccard_dl100xx_mii_bitbang_ops; return (0); } /* MII bit-twiddling routines for cards using Dlink chipset */ -#define DL100XX_MIISET(sc, x) ed_asic_outb(sc, ED_DL100XX_MIIBUS, \ - ed_asic_inb(sc, ED_DL100XX_MIIBUS) | (x)) -#define DL100XX_MIICLR(sc, x) ed_asic_outb(sc, ED_DL100XX_MIIBUS, \ - ed_asic_inb(sc, ED_DL100XX_MIIBUS) & ~(x)) static void ed_pccard_dl100xx_mii_reset(struct ed_softc *sc) @@ -708,36 +739,29 @@ ed_pccard_dl100xx_mii_reset(struct ed_so } static void -ed_pccard_dl100xx_mii_writebits(struct ed_softc *sc, u_int val, int nbits) +ed_pccard_dl100xx_mii_bitbang_write(device_t dev, uint32_t val) { - int i; + struct ed_softc *sc; - DL100XX_MIISET(sc, ED_DL100XX_MII_DIROUT); - for (i = nbits - 1; i >= 0; i--) { - if ((val >> i) & 1) - DL100XX_MIISET(sc, ED_DL100XX_MII_DATAOUT); - else - DL100XX_MIICLR(sc, ED_DL100XX_MII_DATAOUT); - DL100XX_MIISET(sc, ED_DL100XX_MII_CLK); - DL100XX_MIICLR(sc, ED_DL100XX_MII_CLK); - } + sc = device_get_softc(dev); + + ed_asic_outb(sc, ED_DL100XX_MIIBUS, val); + ed_asic_barrier(sc, ED_DL100XX_MIIBUS, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); } -static u_int -ed_pccard_dl100xx_mii_readbits(struct ed_softc *sc, int nbits) +static uint32_t +ed_pccard_dl100xx_mii_bitbang_read(device_t dev) { - int i; - u_int val = 0; + struct ed_softc *sc; + uint32_t val; - DL100XX_MIICLR(sc, ED_DL100XX_MII_DIROUT); - for (i = nbits - 1; i >= 0; i--) { - DL100XX_MIISET(sc, ED_DL100XX_MII_CLK); - val <<= 1; - if (ed_asic_inb(sc, ED_DL100XX_MIIBUS) & ED_DL100XX_MII_DATAIN) - val++; - DL100XX_MIICLR(sc, ED_DL100XX_MII_CLK); - } - return val; + sc = device_get_softc(dev); + + val = ed_asic_inb(sc, ED_DL100XX_MIIBUS); + ed_asic_barrier(sc, ED_DL100XX_MIIBUS, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + return (val); } static void @@ -746,7 +770,11 @@ ed_pccard_ax88x90_reset(struct ed_softc int i; /* Reset Card */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, ED_CR_RD2 | ED_CR_STP | ED_CR_PAGE_0); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_asic_outb(sc, ED_NOVELL_RESET, ed_asic_inb(sc, ED_NOVELL_RESET)); /* Wait for the RST bit to assert, but cap it at 10ms */ @@ -879,7 +907,6 @@ ed_pccard_ax88x90_check_mii(device_t dev if (i == 32) return (ENXIO); return (0); - } /* @@ -909,18 +936,17 @@ ed_pccard_ax88x90(device_t dev, const st pccard_ccr_write_1(dev, PCCARD_CCR_IOBASE0, iobase & 0xff); pccard_ccr_write_1(dev, PCCARD_CCR_IOBASE1, (iobase >> 8) & 0xff); - sc->mii_readbits = ed_pccard_ax88x90_mii_readbits; - sc->mii_writebits = ed_pccard_ax88x90_mii_writebits; error = ed_probe_ax88x90_generic(dev, device_get_flags(dev)); if (error) { if (bootverbose) device_printf(dev, "probe ax88x90 failed %d\n", error); - goto fail; + return (error); } + sc->mii_bitbang_ops = &ed_pccard_ax88x90_mii_bitbang_ops; error = ed_pccard_ax88x90_check_mii(dev, sc); if (error) - goto fail; + return (error); sc->vendor = ED_VENDOR_NOVELL; sc->type = ED_TYPE_NE2000; if (sc->chip_type == ED_CHIP_TYPE_AX88190) @@ -928,40 +954,32 @@ ed_pccard_ax88x90(device_t dev, const st else sc->type_str = "AX88790"; return (0); -fail:; - sc->mii_readbits = 0; - sc->mii_writebits = 0; - return (error); } static void -ed_pccard_ax88x90_mii_writebits(struct ed_softc *sc, u_int val, int nbits) +ed_pccard_ax88x90_mii_bitbang_write(device_t dev, uint32_t val) { - int i, data; + struct ed_softc *sc; - for (i = nbits - 1; i >= 0; i--) { - data = (val >> i) & 1 ? ED_AX88X90_MII_DATAOUT : 0; - ed_asic_outb(sc, ED_AX88X90_MIIBUS, data); - ed_asic_outb(sc, ED_AX88X90_MIIBUS, data | ED_AX88X90_MII_CLK); - } + sc = device_get_softc(dev); + + ed_asic_outb(sc, ED_AX88X90_MIIBUS, val); + ed_asic_barrier(sc, ED_AX88X90_MIIBUS, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); } -static u_int -ed_pccard_ax88x90_mii_readbits(struct ed_softc *sc, int nbits) +static uint32_t +ed_pccard_ax88x90_mii_bitbang_read(device_t dev) { - int i; - u_int val = 0; - uint8_t mdio; + struct ed_softc *sc; + uint32_t val; - mdio = ED_AX88X90_MII_DIRIN; - for (i = nbits - 1; i >= 0; i--) { - ed_asic_outb(sc, ED_AX88X90_MIIBUS, mdio); - val <<= 1; - if (ed_asic_inb(sc, ED_AX88X90_MIIBUS) & ED_AX88X90_MII_DATAIN) - val++; - ed_asic_outb(sc, ED_AX88X90_MIIBUS, mdio | ED_AX88X90_MII_CLK); - } - return val; + sc = device_get_softc(dev); + + val = ed_asic_inb(sc, ED_AX88X90_MIIBUS); + ed_asic_barrier(sc, ED_AX88X90_MIIBUS, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + return (val); } /* @@ -982,7 +1000,7 @@ ed_pccard_tc5299j(device_t dev, const st error = ed_probe_Novell_generic(dev, device_get_flags(dev)); if (bootverbose) - device_printf(dev, "probe novel returns %d\n", error); + device_printf(dev, "Novell generic probe failed: %d\n", error); if (error != 0) return (error); @@ -991,24 +1009,17 @@ ed_pccard_tc5299j(device_t dev, const st * devices have MII and a PHY, so we use this to weed out chips that * would otherwise make it through the tests we have after this point. */ - sc->mii_readbits = ed_pccard_tc5299j_mii_readbits; - sc->mii_writebits = ed_pccard_tc5299j_mii_writebits; + sc->mii_bitbang_ops = &ed_pccard_tc5299j_mii_bitbang_ops; for (i = 0; i < 32; i++) { id = ed_miibus_readreg(dev, i, MII_PHYIDR1); if (id != 0 && id != 0xffff) break; } - if (i == 32) { - sc->mii_readbits = 0; - sc->mii_writebits = 0; + if (i == 32) return (ENXIO); - } ts = "TC5299J"; - if (ed_pccard_rom_mac(dev, sc->enaddr) == 0) { - sc->mii_readbits = 0; - sc->mii_writebits = 0; + if (ed_pccard_rom_mac(dev, sc->enaddr) == 0) return (ENXIO); - } sc->vendor = ED_VENDOR_NOVELL; sc->type = ED_TYPE_NE2000; sc->chip_type = ED_CHIP_TYPE_TC5299J; @@ -1017,50 +1028,31 @@ ed_pccard_tc5299j(device_t dev, const st } static void -ed_pccard_tc5299j_mii_writebits(struct ed_softc *sc, u_int val, int nbits) +ed_pccard_tc5299j_mii_bitbang_write(device_t dev, uint32_t val) { - int i; - uint8_t cr, data; + struct ed_softc *sc; - /* Select page 3 */ - cr = ed_nic_inb(sc, ED_P0_CR); - ed_nic_outb(sc, ED_P0_CR, cr | ED_CR_PAGE_3); - - for (i = nbits - 1; i >= 0; i--) { - data = (val >> i) & 1 ? ED_TC5299J_MII_DATAOUT : 0; - ed_nic_outb(sc, ED_TC5299J_MIIBUS, data); - ed_nic_outb(sc, ED_TC5299J_MIIBUS, data | ED_TC5299J_MII_CLK); - } - ed_nic_outb(sc, ED_TC5299J_MIIBUS, 0); - - /* Restore prior page */ - ed_nic_outb(sc, ED_P0_CR, cr); + sc = device_get_softc(dev); + + /* We are already on page 3. */ + ed_nic_outb(sc, ED_TC5299J_MIIBUS, val); + ed_nic_barrier(sc, ED_TC5299J_MIIBUS, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); } -static u_int -ed_pccard_tc5299j_mii_readbits(struct ed_softc *sc, int nbits) +static uint32_t +ed_pccard_tc5299j_mii_bitbang_read(device_t dev) { - int i; - u_int val = 0; - uint8_t cr; + struct ed_softc *sc; + uint32_t val; + + sc = device_get_softc(dev); - /* Select page 3 */ - cr = ed_nic_inb(sc, ED_P0_CR); - ed_nic_outb(sc, ED_P0_CR, cr | ED_CR_PAGE_3); - - ed_asic_outb(sc, ED_TC5299J_MIIBUS, ED_TC5299J_MII_DIROUT); - for (i = nbits - 1; i >= 0; i--) { - ed_nic_outb(sc, ED_TC5299J_MIIBUS, - ED_TC5299J_MII_CLK | ED_TC5299J_MII_DIROUT); - val <<= 1; - if (ed_nic_inb(sc, ED_TC5299J_MIIBUS) & ED_TC5299J_MII_DATAIN) - val++; - ed_nic_outb(sc, ED_TC5299J_MIIBUS, ED_TC5299J_MII_DIROUT); - } - - /* Restore prior page */ - ed_nic_outb(sc, ED_P0_CR, cr); - return val; + /* We are already on page 3. */ + val = ed_asic_inb(sc, ED_TC5299J_MIIBUS); + ed_nic_barrier(sc, ED_TC5299J_MIIBUS, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + return (val); } /* @@ -1070,7 +1062,8 @@ static int ed_miibus_readreg(device_t dev, int phy, int reg) { struct ed_softc *sc; - int failed, val; + int val; + uint8_t cr = 0; sc = device_get_softc(dev); /* @@ -1084,10 +1077,6 @@ ed_miibus_readreg(device_t dev, int phy, * Also, PHYs above 16 appear to be phantoms on some cards, but not * others. Registers read for this are often the same as prior values * read. Filter all register requests to 17-31. - * - * I can't explain it, since I don't have the DL100xx data sheets, but - * the DL100xx chips do 13-bits before the 'ACK' but, but the AX88x90 - * chips have 14. The linux pcnet and axnet drivers confirm this. */ if (sc->chip_type == ED_CHIP_TYPE_AX88790) { if (phy > 0x10) @@ -1097,29 +1086,33 @@ ed_miibus_readreg(device_t dev, int phy, ED_AX88X90_GPIO_INT_PHY); else ed_asic_outb(sc, ED_AX88X90_GPIO, 0); + ed_asic_barrier(sc, ED_AX88X90_GPIO, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + } else if (sc->chip_type == ED_CHIP_TYPE_TC5299J) { + /* Select page 3. */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + cr = ed_nic_inb(sc, ED_P0_CR); + ed_nic_outb(sc, ED_P0_CR, cr | ED_CR_PAGE_3); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + } + val = mii_bitbang_readreg(dev, sc->mii_bitbang_ops, phy, reg); + if (sc->chip_type == ED_CHIP_TYPE_TC5299J) { + /* Restore prior page. */ + ed_nic_outb(sc, ED_P0_CR, cr); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); } - - (*sc->mii_writebits)(sc, 0xffffffff, 32); - (*sc->mii_writebits)(sc, ED_MII_STARTDELIM, ED_MII_STARTDELIM_BITS); - (*sc->mii_writebits)(sc, ED_MII_READOP, ED_MII_OP_BITS); - (*sc->mii_writebits)(sc, phy, ED_MII_PHY_BITS); - (*sc->mii_writebits)(sc, reg, ED_MII_REG_BITS); - if (sc->chip_type == ED_CHIP_TYPE_AX88790 || - sc->chip_type == ED_CHIP_TYPE_AX88190) - (*sc->mii_readbits)(sc, ED_MII_ACK_BITS); - failed = (*sc->mii_readbits)(sc, ED_MII_ACK_BITS); - val = (*sc->mii_readbits)(sc, ED_MII_DATA_BITS); - (*sc->mii_writebits)(sc, ED_MII_IDLE, ED_MII_IDLE_BITS); -/* printf("Reading phy %d reg %#x returning %#x (valid %d)\n", phy, reg, val, !failed); */ - return (failed ? 0 : val); + return (val); } static int ed_miibus_writereg(device_t dev, int phy, int reg, int data) { struct ed_softc *sc; + uint8_t cr = 0; -/* printf("Writing phy %d reg %#x data %#x\n", phy, reg, data); */ sc = device_get_softc(dev); /* See ed_miibus_readreg for details */ if (sc->chip_type == ED_CHIP_TYPE_AX88790) { @@ -1130,15 +1123,24 @@ ed_miibus_writereg(device_t dev, int phy ED_AX88X90_GPIO_INT_PHY); else ed_asic_outb(sc, ED_AX88X90_GPIO, 0); + ed_asic_barrier(sc, ED_AX88X90_GPIO, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + } else if (sc->chip_type == ED_CHIP_TYPE_TC5299J) { + /* Select page 3. */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + cr = ed_nic_inb(sc, ED_P0_CR); + ed_nic_outb(sc, ED_P0_CR, cr | ED_CR_PAGE_3); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + } + mii_bitbang_writereg(dev, sc->mii_bitbang_ops, phy, reg, data); + if (sc->chip_type == ED_CHIP_TYPE_TC5299J) { + /* Restore prior page. */ + ed_nic_outb(sc, ED_P0_CR, cr); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); } - (*sc->mii_writebits)(sc, 0xffffffff, 32); - (*sc->mii_writebits)(sc, ED_MII_STARTDELIM, ED_MII_STARTDELIM_BITS); - (*sc->mii_writebits)(sc, ED_MII_WRITEOP, ED_MII_OP_BITS); - (*sc->mii_writebits)(sc, phy, ED_MII_PHY_BITS); - (*sc->mii_writebits)(sc, reg, ED_MII_REG_BITS); - (*sc->mii_writebits)(sc, ED_MII_TURNAROUND, ED_MII_TURNAROUND_BITS); - (*sc->mii_writebits)(sc, data, ED_MII_DATA_BITS); - (*sc->mii_writebits)(sc, ED_MII_IDLE, ED_MII_IDLE_BITS); return (0); } @@ -1149,9 +1151,12 @@ ed_ifmedia_upd(struct ifnet *ifp) int error; sc = ifp->if_softc; - if (sc->miibus == NULL) - return (ENXIO); ED_LOCK(sc); + if (sc->miibus == NULL) { + ED_UNLOCK(sc); + return (ENXIO); + } + error = ed_pccard_kick_phy(sc); ED_UNLOCK(sc); return (error); @@ -1164,13 +1169,17 @@ ed_ifmedia_sts(struct ifnet *ifp, struct struct mii_data *mii; sc = ifp->if_softc; - if (sc->miibus == NULL) + ED_LOCK(sc); + if (sc->miibus == NULL) { return; + ED_UNLOCK(sc); + } mii = device_get_softc(sc->miibus); mii_pollstat(mii); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + ED_UNLOCK(sc); } static void @@ -1225,7 +1234,7 @@ static device_method_t ed_pccard_methods DEVMETHOD(miibus_readreg, ed_miibus_readreg), DEVMETHOD(miibus_writereg, ed_miibus_writereg), - { 0, 0 } + DEVMETHOD_END }; static driver_t ed_pccard_driver = { @@ -1234,7 +1243,7 @@ static driver_t ed_pccard_driver = { sizeof(struct ed_softc) }; -DRIVER_MODULE(ed, pccard, ed_pccard_driver, ed_devclass, 0, 0); -DRIVER_MODULE(miibus, ed, miibus_driver, miibus_devclass, 0, 0); +DRIVER_MODULE(ed, pccard, ed_pccard_driver, ed_devclass, 0, NULL); +DRIVER_MODULE(miibus, ed, miibus_driver, miibus_devclass, 0, NULL); MODULE_DEPEND(ed, miibus, 1, 1, 1); MODULE_DEPEND(ed, ether, 1, 1, 1); Modified: stable/9/sys/dev/ed/if_ed_rtl80x9.c ============================================================================== --- stable/9/sys/dev/ed/if_ed_rtl80x9.c Fri Apr 25 21:32:34 2014 (r264942) +++ stable/9/sys/dev/ed/if_ed_rtl80x9.c Fri Apr 25 21:32:38 2014 (r264943) @@ -116,7 +116,11 @@ ed_probe_RTL80x9(device_t dev, int port_ ifmedia_add(&sc->ifmedia, IFM_ETHER | IFM_10_5, 0, 0); ifmedia_add(&sc->ifmedia, IFM_ETHER | IFM_AUTO, 0, 0); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, ED_CR_RD2 | ED_CR_PAGE_3 | ED_CR_STP); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); switch (ed_nic_inb(sc, ED_RTL80X9_CONFIG2) & ED_RTL80X9_CF2_MEDIA) { case ED_RTL80X9_CF2_AUTO: @@ -144,8 +148,12 @@ ed_rtl_set_media(struct ifnet *ifp) sc = ifp->if_softc; ED_LOCK(sc); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_PAGE_3 | (ed_nic_inb(sc, ED_P0_CR) & (ED_CR_STA | ED_CR_STP))); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); switch(IFM_SUBTYPE(sc->ifmedia.ifm_cur->ifm_media)) { case IFM_10_T: @@ -189,8 +197,12 @@ ed_rtl_get_media(struct ifnet *ifp, stru if (IFM_SUBTYPE(imr->ifm_active) == IFM_AUTO) { ED_LOCK(sc); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_PAGE_3 | (ed_nic_inb(sc, ED_P0_CR) & (ED_CR_STA | ED_CR_STP))); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); switch (ed_nic_inb(sc, ED_RTL80X9_CONFIG0) & (sc->chip_type == ED_CHIP_TYPE_RTL8029 ? ED_RTL80X9_CF0_BNC Modified: stable/9/sys/dev/ed/if_edreg.h ============================================================================== --- stable/9/sys/dev/ed/if_edreg.h Fri Apr 25 21:32:34 2014 (r264942) +++ stable/9/sys/dev/ed/if_edreg.h Fri Apr 25 21:32:38 2014 (r264943) @@ -1079,22 +1079,3 @@ struct ed_ring { #define ED_CHIP_TYPE_TC5299J 10 #define ED_CHIP_TYPE_W89C926 11 #define ED_CHIP_TYPE_WD790 12 - -/* - * MII bus definitions. These are common to both DL100xx and AX88x90 - * MII definitions, because they are standards based. - */ -#define ED_MII_STARTDELIM 0x01 -#define ED_MII_WRITEOP 0x01 -#define ED_MII_READOP 0x02 -#define ED_MII_TURNAROUND 0x02 -#define ED_MII_IDLE 0x01 - -#define ED_MII_STARTDELIM_BITS 2 -#define ED_MII_OP_BITS 2 -#define ED_MII_PHY_BITS 5 -#define ED_MII_REG_BITS 5 -#define ED_MII_TURNAROUND_BITS 2 -#define ED_MII_ACK_BITS 1 -#define ED_MII_DATA_BITS 16 -#define ED_MII_IDLE_BITS 1 Modified: stable/9/sys/dev/ed/if_edvar.h ============================================================================== --- stable/9/sys/dev/ed/if_edvar.h Fri Apr 25 21:32:34 2014 (r264942) +++ stable/9/sys/dev/ed/if_edvar.h Fri Apr 25 21:32:38 2014 (r264943) @@ -28,7 +28,10 @@ */ #ifndef SYS_DEV_ED_IF_EDVAR_H -#define SYS_DEV_ED_IF_EDVAR_H +#define SYS_DEV_ED_IF_EDVAR_H + +#include + /* * ed_softc: per line info and status */ @@ -62,8 +65,7 @@ struct ed_softc { u_long command); void (*sc_mediachg)(struct ed_softc *); device_t miibus; /* MII bus for cards with MII. */ - void (*mii_writebits)(struct ed_softc *, u_int, int); - u_int (*mii_readbits)(struct ed_softc *, int); + mii_bitbang_ops_t mii_bitbang_ops; struct callout tick_ch; void (*sc_tick)(struct ed_softc *); void (*readmem)(struct ed_softc *sc, bus_size_t src, uint8_t *dst, @@ -109,6 +111,10 @@ struct ed_softc { struct ifmib_iso_8802_3 mibdata; /* stuff for network mgmt */ }; +#define ed_nic_barrier(sc, port, length, flags) \ + bus_space_barrier(sc->port_bst, sc->port_bsh, \ + (sc)->nic_offset + (port), (length), (flags)) + #define ed_nic_inb(sc, port) \ bus_space_read_1(sc->port_bst, sc->port_bsh, (sc)->nic_offset + (port)) @@ -147,6 +153,10 @@ struct ed_softc { bus_space_write_multi_4(sc->port_bst, sc->port_bsh, \ (sc)->nic_offset + (port), (uint32_t *)(addr), (count)) +#define ed_asic_barrier(sc, port, length, flags) \ + bus_space_barrier(sc->port_bst, sc->port_bsh, \ + (sc)->asic_offset + (port), (length), (flags)) + #define ed_asic_inb(sc, port) \ bus_space_read_1(sc->port_bst, sc->port_bsh, \ (sc)->asic_offset + (port)) Modified: stable/9/sys/dev/ed/tc5299jreg.h ============================================================================== --- stable/9/sys/dev/ed/tc5299jreg.h Fri Apr 25 21:32:34 2014 (r264942) +++ stable/9/sys/dev/ed/tc5299jreg.h Fri Apr 25 21:32:38 2014 (r264943) @@ -34,5 +34,5 @@ #define ED_TC5299J_MII_CLK 0x01 #define ED_TC5299J_MII_DATAOUT 0x02 -#define ED_TC5299J_MII_DIROUT 0x04 +#define ED_TC5299J_MII_DIRIN 0x04 #define ED_TC5299J_MII_DATAIN 0x08 From owner-svn-src-stable@FreeBSD.ORG Fri Apr 25 21:42:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1311C8DC; Fri, 25 Apr 2014 21:42:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F2DD21AE9; Fri, 25 Apr 2014 21:42:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3PLgk87057056; Fri, 25 Apr 2014 21:42:46 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3PLgkfG057054; Fri, 25 Apr 2014 21:42:46 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201404252142.s3PLgkfG057054@svn.freebsd.org> From: Marius Strobl Date: Fri, 25 Apr 2014 21:42:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264944 - stable/9/sys/dev/iwn X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2014 21:42:47 -0000 Author: marius Date: Fri Apr 25 21:42:46 2014 New Revision: 264944 URL: http://svnweb.freebsd.org/changeset/base/264944 Log: MFC: r260053 - There's no need to keep track of resource IDs. - Simplify MSI allocation and release. For a single one, we don't need to fiddle with the MSI count and pci_release_msi(9) is smart enough to just do nothing in case of INTx. - Don't allocate MSI as RF_SHAREABLE. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. Modified: stable/9/sys/dev/iwn/if_iwn.c stable/9/sys/dev/iwn/if_iwnvar.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/9/sys/dev/iwn/if_iwn.c Fri Apr 25 21:32:38 2014 (r264943) +++ stable/9/sys/dev/iwn/if_iwn.c Fri Apr 25 21:42:46 2014 (r264944) @@ -396,7 +396,8 @@ static device_method_t iwn_methods[] = { DEVMETHOD(device_shutdown, iwn_shutdown), DEVMETHOD(device_suspend, iwn_suspend), DEVMETHOD(device_resume, iwn_resume), - { 0, 0 } + + DEVMETHOD_END }; static driver_t iwn_driver = { @@ -406,7 +407,7 @@ static driver_t iwn_driver = { }; static devclass_t iwn_devclass; -DRIVER_MODULE(iwn, pci, iwn_driver, iwn_devclass, 0, 0); +DRIVER_MODULE(iwn, pci, iwn_driver, iwn_devclass, NULL, NULL); MODULE_VERSION(iwn, 1); @@ -436,7 +437,7 @@ iwn_attach(device_t dev) struct ieee80211com *ic; struct ifnet *ifp; uint32_t reg; - int i, error, result; + int i, error, rid; uint8_t macaddr[IEEE80211_ADDR_LEN]; sc->sc_dev = dev; @@ -466,8 +467,8 @@ iwn_attach(device_t dev) /* Enable bus-mastering. */ pci_enable_busmaster(dev); - sc->mem_rid = PCIR_BAR(0); - sc->mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->mem_rid, + rid = PCIR_BAR(0); + sc->mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (sc->mem == NULL) { device_printf(dev, "can't map mem space\n"); @@ -477,13 +478,13 @@ iwn_attach(device_t dev) sc->sc_st = rman_get_bustag(sc->mem); sc->sc_sh = rman_get_bushandle(sc->mem); - sc->irq_rid = 0; - if ((result = pci_msi_count(dev)) == 1 && - pci_alloc_msi(dev, &result) == 0) - sc->irq_rid = 1; + i = 1; + rid = 0; + if (pci_alloc_msi(dev, &i) == 0) + rid = 1; /* Install interrupt handler. */ - sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irq_rid, - RF_ACTIVE | RF_SHAREABLE); + sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE | + (rid != 0 ? 0 : RF_SHAREABLE)); if (sc->irq == NULL) { device_printf(dev, "can't map interrupt\n"); error = ENOMEM; @@ -912,9 +913,9 @@ iwn_detach(device_t dev) /* Uninstall interrupt handler. */ if (sc->irq != NULL) { bus_teardown_intr(dev, sc->irq, sc->sc_ih); - bus_release_resource(dev, SYS_RES_IRQ, sc->irq_rid, sc->irq); - if (sc->irq_rid == 1) - pci_release_msi(dev); + bus_release_resource(dev, SYS_RES_IRQ, rman_get_rid(sc->irq), + sc->irq); + pci_release_msi(dev); } /* Free DMA resources. */ @@ -928,7 +929,8 @@ iwn_detach(device_t dev) iwn_free_fwmem(sc); if (sc->mem != NULL) - bus_release_resource(dev, SYS_RES_MEMORY, sc->mem_rid, sc->mem); + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(sc->mem), sc->mem); if (ifp != NULL) if_free(ifp); Modified: stable/9/sys/dev/iwn/if_iwnvar.h ============================================================================== --- stable/9/sys/dev/iwn/if_iwnvar.h Fri Apr 25 21:32:38 2014 (r264943) +++ stable/9/sys/dev/iwn/if_iwnvar.h Fri Apr 25 21:42:46 2014 (r264944) @@ -254,11 +254,9 @@ struct iwn_softc { struct iwn_tx_ring txq[IWN5000_NTXQUEUES]; struct iwn_rx_ring rxq; - int mem_rid; struct resource *mem; bus_space_tag_t sc_st; bus_space_handle_t sc_sh; - int irq_rid; struct resource *irq; void *sc_ih; bus_size_t sc_sz; From owner-svn-src-stable@FreeBSD.ORG Fri Apr 25 21:42:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0DCE0A0A; Fri, 25 Apr 2014 21:42:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE2F01AEB; Fri, 25 Apr 2014 21:42:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3PLgqUT057105; Fri, 25 Apr 2014 21:42:52 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3PLgqof057103; Fri, 25 Apr 2014 21:42:52 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201404252142.s3PLgqof057103@svn.freebsd.org> From: Marius Strobl Date: Fri, 25 Apr 2014 21:42:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264945 - stable/10/sys/dev/iwn X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2014 21:42:53 -0000 Author: marius Date: Fri Apr 25 21:42:52 2014 New Revision: 264945 URL: http://svnweb.freebsd.org/changeset/base/264945 Log: MFC: r260053 - There's no need to keep track of resource IDs. - Simplify MSI allocation and release. For a single one, we don't need to fiddle with the MSI count and pci_release_msi(9) is smart enough to just do nothing in case of INTx. - Don't allocate MSI as RF_SHAREABLE. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. Modified: stable/10/sys/dev/iwn/if_iwn.c stable/10/sys/dev/iwn/if_iwnvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/10/sys/dev/iwn/if_iwn.c Fri Apr 25 21:42:46 2014 (r264944) +++ stable/10/sys/dev/iwn/if_iwn.c Fri Apr 25 21:42:52 2014 (r264945) @@ -413,7 +413,8 @@ static device_method_t iwn_methods[] = { DEVMETHOD(device_shutdown, iwn_shutdown), DEVMETHOD(device_suspend, iwn_suspend), DEVMETHOD(device_resume, iwn_resume), - { 0, 0 } + + DEVMETHOD_END }; static driver_t iwn_driver = { @@ -423,7 +424,7 @@ static driver_t iwn_driver = { }; static devclass_t iwn_devclass; -DRIVER_MODULE(iwn, pci, iwn_driver, iwn_devclass, 0, 0); +DRIVER_MODULE(iwn, pci, iwn_driver, iwn_devclass, NULL, NULL); MODULE_VERSION(iwn, 1); @@ -453,7 +454,7 @@ iwn_attach(device_t dev) struct ieee80211com *ic; struct ifnet *ifp; uint32_t reg; - int i, error, result; + int i, error, rid; uint8_t macaddr[IEEE80211_ADDR_LEN]; sc->sc_dev = dev; @@ -494,8 +495,8 @@ iwn_attach(device_t dev) /* Enable bus-mastering. */ pci_enable_busmaster(dev); - sc->mem_rid = PCIR_BAR(0); - sc->mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->mem_rid, + rid = PCIR_BAR(0); + sc->mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (sc->mem == NULL) { device_printf(dev, "can't map mem space\n"); @@ -505,13 +506,13 @@ iwn_attach(device_t dev) sc->sc_st = rman_get_bustag(sc->mem); sc->sc_sh = rman_get_bushandle(sc->mem); - sc->irq_rid = 0; - if ((result = pci_msi_count(dev)) == 1 && - pci_alloc_msi(dev, &result) == 0) - sc->irq_rid = 1; + i = 1; + rid = 0; + if (pci_alloc_msi(dev, &i) == 0) + rid = 1; /* Install interrupt handler. */ - sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irq_rid, - RF_ACTIVE | RF_SHAREABLE); + sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE | + (rid != 0 ? 0 : RF_SHAREABLE)); if (sc->irq == NULL) { device_printf(dev, "can't map interrupt\n"); error = ENOMEM; @@ -976,9 +977,9 @@ iwn_detach(device_t dev) /* Uninstall interrupt handler. */ if (sc->irq != NULL) { bus_teardown_intr(dev, sc->irq, sc->sc_ih); - bus_release_resource(dev, SYS_RES_IRQ, sc->irq_rid, sc->irq); - if (sc->irq_rid == 1) - pci_release_msi(dev); + bus_release_resource(dev, SYS_RES_IRQ, rman_get_rid(sc->irq), + sc->irq); + pci_release_msi(dev); } /* Free DMA resources. */ @@ -992,7 +993,8 @@ iwn_detach(device_t dev) iwn_free_fwmem(sc); if (sc->mem != NULL) - bus_release_resource(dev, SYS_RES_MEMORY, sc->mem_rid, sc->mem); + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(sc->mem), sc->mem); if (ifp != NULL) if_free(ifp); Modified: stable/10/sys/dev/iwn/if_iwnvar.h ============================================================================== --- stable/10/sys/dev/iwn/if_iwnvar.h Fri Apr 25 21:42:46 2014 (r264944) +++ stable/10/sys/dev/iwn/if_iwnvar.h Fri Apr 25 21:42:52 2014 (r264945) @@ -294,11 +294,9 @@ struct iwn_softc { struct iwn_tx_ring txq[IWN5000_NTXQUEUES]; struct iwn_rx_ring rxq; - int mem_rid; struct resource *mem; bus_space_tag_t sc_st; bus_space_handle_t sc_sh; - int irq_rid; struct resource *irq; void *sc_ih; bus_size_t sc_sz; From owner-svn-src-stable@FreeBSD.ORG Fri Apr 25 21:58:16 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A16CB45A; Fri, 25 Apr 2014 21:58:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8DDDA1C36; Fri, 25 Apr 2014 21:58:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3PLwGMW062026; Fri, 25 Apr 2014 21:58:16 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3PLwGw8062025; Fri, 25 Apr 2014 21:58:16 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201404252158.s3PLwGw8062025@svn.freebsd.org> From: Marius Strobl Date: Fri, 25 Apr 2014 21:58:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264947 - stable/9/sys/dev/iwn X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2014 21:58:16 -0000 Author: marius Date: Fri Apr 25 21:58:16 2014 New Revision: 264947 URL: http://svnweb.freebsd.org/changeset/base/264947 Log: MFC: r260086 - Probe with BUS_PROBE_DEFAULT instead of 0. - Remove clearing PCIM_CMD_INTxDIS; pci(4) will do that as appropriate since r189367. Modified: stable/9/sys/dev/iwn/if_iwn.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/9/sys/dev/iwn/if_iwn.c Fri Apr 25 21:47:24 2014 (r264946) +++ stable/9/sys/dev/iwn/if_iwn.c Fri Apr 25 21:58:16 2014 (r264947) @@ -424,7 +424,7 @@ iwn_probe(device_t dev) if (pci_get_vendor(dev) == ident->vendor && pci_get_device(dev) == ident->device) { device_set_desc(dev, ident->name); - return 0; + return (BUS_PROBE_DEFAULT); } } return ENXIO; @@ -436,7 +436,6 @@ iwn_attach(device_t dev) struct iwn_softc *sc = (struct iwn_softc *)device_get_softc(dev); struct ieee80211com *ic; struct ifnet *ifp; - uint32_t reg; int i, error, rid; uint8_t macaddr[IEEE80211_ADDR_LEN]; @@ -455,15 +454,6 @@ iwn_attach(device_t dev) /* Clear device-specific "PCI retry timeout" register (41h). */ pci_write_config(dev, 0x41, 0, 1); - /* Hardware bug workaround. */ - reg = pci_read_config(dev, PCIR_COMMAND, 2); - if (reg & PCIM_CMD_INTxDIS) { - DPRINTF(sc, IWN_DEBUG_RESET, "%s: PCIe INTx Disable set\n", - __func__); - reg &= ~PCIM_CMD_INTxDIS; - pci_write_config(dev, PCIR_COMMAND, reg, 2); - } - /* Enable bus-mastering. */ pci_enable_busmaster(dev); From owner-svn-src-stable@FreeBSD.ORG Fri Apr 25 21:58:29 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55B0358A; Fri, 25 Apr 2014 21:58:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 427D41C3A; Fri, 25 Apr 2014 21:58:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3PLwT8u062086; Fri, 25 Apr 2014 21:58:29 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3PLwTZl062085; Fri, 25 Apr 2014 21:58:29 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201404252158.s3PLwTZl062085@svn.freebsd.org> From: Marius Strobl Date: Fri, 25 Apr 2014 21:58:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264948 - stable/10/sys/dev/iwn X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2014 21:58:29 -0000 Author: marius Date: Fri Apr 25 21:58:28 2014 New Revision: 264948 URL: http://svnweb.freebsd.org/changeset/base/264948 Log: MFC: r260086 - Probe with BUS_PROBE_DEFAULT instead of 0. - Remove clearing PCIM_CMD_INTxDIS; pci(4) will do that as appropriate since r189367. Modified: stable/10/sys/dev/iwn/if_iwn.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/10/sys/dev/iwn/if_iwn.c Fri Apr 25 21:58:16 2014 (r264947) +++ stable/10/sys/dev/iwn/if_iwn.c Fri Apr 25 21:58:28 2014 (r264948) @@ -441,7 +441,7 @@ iwn_probe(device_t dev) if (pci_get_vendor(dev) == ident->vendor && pci_get_device(dev) == ident->device) { device_set_desc(dev, ident->name); - return 0; + return (BUS_PROBE_DEFAULT); } } return ENXIO; @@ -453,7 +453,6 @@ iwn_attach(device_t dev) struct iwn_softc *sc = (struct iwn_softc *)device_get_softc(dev); struct ieee80211com *ic; struct ifnet *ifp; - uint32_t reg; int i, error, rid; uint8_t macaddr[IEEE80211_ADDR_LEN]; @@ -483,15 +482,6 @@ iwn_attach(device_t dev) /* Clear device-specific "PCI retry timeout" register (41h). */ pci_write_config(dev, 0x41, 0, 1); - /* Hardware bug workaround. */ - reg = pci_read_config(dev, PCIR_COMMAND, 2); - if (reg & PCIM_CMD_INTxDIS) { - DPRINTF(sc, IWN_DEBUG_RESET, "%s: PCIe INTx Disable set\n", - __func__); - reg &= ~PCIM_CMD_INTxDIS; - pci_write_config(dev, PCIR_COMMAND, reg, 2); - } - /* Enable bus-mastering. */ pci_enable_busmaster(dev); From owner-svn-src-stable@FreeBSD.ORG Fri Apr 25 22:01:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E5407945; Fri, 25 Apr 2014 22:01:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D14A61CBD; Fri, 25 Apr 2014 22:01:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3PM13Gt063406; Fri, 25 Apr 2014 22:01:03 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3PM137U063397; Fri, 25 Apr 2014 22:01:03 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201404252201.s3PM137U063397@svn.freebsd.org> From: Marius Strobl Date: Fri, 25 Apr 2014 22:01:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264949 - stable/10/sys/dev/mpt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2014 22:01:04 -0000 Author: marius Date: Fri Apr 25 22:01:02 2014 New Revision: 264949 URL: http://svnweb.freebsd.org/changeset/base/264949 Log: MFC: r260058 - Remove a redundant variable in mpt_pci_attach(). - #if 0 the currently unused paired port linking and unlinking of dual adapters. - Simplify MSI/MSI-X allocation and release. For a single one, we don't need to fiddle with the MSI/MSI-X count and pci_release_msi(9) is smart enough to just do nothing in case of INTx. - Canonicalize actions taken on attach failure and detach. - Remove the remainder of incomplete support for older FreeBSD versions. Modified: stable/10/sys/dev/mpt/mpt.h stable/10/sys/dev/mpt/mpt_cam.c stable/10/sys/dev/mpt/mpt_pci.c stable/10/sys/dev/mpt/mpt_raid.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mpt/mpt.h ============================================================================== --- stable/10/sys/dev/mpt/mpt.h Fri Apr 25 21:58:28 2014 (r264948) +++ stable/10/sys/dev/mpt/mpt.h Fri Apr 25 22:01:02 2014 (r264949) @@ -220,9 +220,6 @@ int mpt_modevent(module_t, int, void *); #define bus_dmamap_sync_range(dma_tag, dmamap, offset, len, op) \ bus_dmamap_sync(dma_tag, dmamap, op) -#if __FreeBSD_version < 600000 -#define bus_get_dma_tag(x) NULL -#endif #define mpt_dma_tag_create(mpt, parent_tag, alignment, boundary, \ lowaddr, highaddr, filter, filterarg, \ maxsize, nsegments, maxsegsz, flags, \ @@ -239,34 +236,6 @@ struct mpt_map_info { }; void mpt_map_rquest(void *, bus_dma_segment_t *, int, int); -/* **************************** NewBUS interrupt Crock ************************/ -#if __FreeBSD_version < 700031 -#define mpt_setup_intr(d, i, f, U, if, ifa, hp) \ - bus_setup_intr(d, i, f, if, ifa, hp) -#else -#define mpt_setup_intr bus_setup_intr -#endif - -/* **************************** NewBUS CAM Support ****************************/ -#if __FreeBSD_version < 700049 -#define mpt_xpt_bus_register(sim, parent, bus) \ - xpt_bus_register(sim, bus) -#else -#define mpt_xpt_bus_register xpt_bus_register -#endif - -/**************************** Kernel Thread Support ***************************/ -#if __FreeBSD_version > 800001 -#define mpt_kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) \ - kproc_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) -#define mpt_kthread_exit(status) \ - kproc_exit(status) -#else -#define mpt_kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) \ - kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) -#define mpt_kthread_exit(status) \ - kthread_exit(status) -#endif /********************************** Endianess *********************************/ #define MPT_2_HOST64(ptr, tag) ptr->tag = le64toh(ptr->tag) @@ -671,7 +640,6 @@ struct mpt_softc { /* * PCI Hardware info */ - int pci_msi_count; struct resource * pci_irq; /* Interrupt map for chip */ void * ih; /* Interrupt handle */ #if 0 @@ -754,9 +722,10 @@ struct mpt_softc { uint16_t sequence; /* Sequence Number */ uint16_t pad3; - +#if 0 /* Paired port in some dual adapters configurations */ struct mpt_softc * mpt2; +#endif /* FW Image management */ uint32_t fw_image_size; Modified: stable/10/sys/dev/mpt/mpt_cam.c ============================================================================== --- stable/10/sys/dev/mpt/mpt_cam.c Fri Apr 25 21:58:28 2014 (r264948) +++ stable/10/sys/dev/mpt/mpt_cam.c Fri Apr 25 22:01:02 2014 (r264949) @@ -110,12 +110,6 @@ __FBSDID("$FreeBSD$"); #include #include -#if __FreeBSD_version >= 700025 -#ifndef CAM_NEW_TRAN_CODE -#define CAM_NEW_TRAN_CODE 1 -#endif -#endif - static void mpt_poll(struct cam_sim *); static timeout_t mpt_timeout; static void mpt_action(struct cam_sim *, union ccb *); @@ -344,7 +338,7 @@ mpt_cam_attach(struct mpt_softc *mpt) * Register exactly this bus. */ MPT_LOCK(mpt); - if (mpt_xpt_bus_register(mpt->sim, mpt->dev, 0) != CAM_SUCCESS) { + if (xpt_bus_register(mpt->sim, mpt->dev, 0) != CAM_SUCCESS) { mpt_prt(mpt, "Bus registration Failed!\n"); error = ENOMEM; MPT_UNLOCK(mpt); @@ -383,7 +377,7 @@ mpt_cam_attach(struct mpt_softc *mpt) * Register this bus. */ MPT_LOCK(mpt); - if (mpt_xpt_bus_register(mpt->phydisk_sim, mpt->dev, 1) != + if (xpt_bus_register(mpt->phydisk_sim, mpt->dev, 1) != CAM_SUCCESS) { mpt_prt(mpt, "Physical Disk Bus registration Failed!\n"); error = ENOMEM; @@ -2338,7 +2332,6 @@ mpt_cam_event(struct mpt_softc *mpt, req break; case MPI_EVENT_RESCAN: -#if __FreeBSD_version >= 600000 { union ccb *ccb; uint32_t pathid; @@ -2373,10 +2366,7 @@ mpt_cam_event(struct mpt_softc *mpt, req xpt_rescan(ccb); break; } -#else - mpt_prt(mpt, "Rescan Port: %d\n", (data0 >> 8) & 0xff); - break; -#endif + case MPI_EVENT_LINK_STATUS_CHANGE: mpt_prt(mpt, "Port %d: LinkState: %s\n", (data1 >> 8) & 0xff, @@ -3324,11 +3314,8 @@ mpt_action(struct cam_sim *sim, union cc break; } -#ifdef CAM_NEW_TRAN_CODE #define IS_CURRENT_SETTINGS(c) ((c)->type == CTS_TYPE_CURRENT_SETTINGS) -#else -#define IS_CURRENT_SETTINGS(c) ((c)->flags & CCB_TRANS_CURRENT_SETTINGS) -#endif + #define DP_DISC_ENABLE 0x1 #define DP_DISC_DISABL 0x2 #define DP_DISC (DP_DISC_ENABLE|DP_DISC_DISABL) @@ -3345,10 +3332,8 @@ mpt_action(struct cam_sim *sim, union cc case XPT_SET_TRAN_SETTINGS: /* Nexus Settings */ { -#ifdef CAM_NEW_TRAN_CODE struct ccb_trans_settings_scsi *scsi; struct ccb_trans_settings_spi *spi; -#endif uint8_t dval; u_int period; u_int offset; @@ -3361,7 +3346,6 @@ mpt_action(struct cam_sim *sim, union cc break; } -#ifdef CAM_NEW_TRAN_CODE scsi = &cts->proto_specific.scsi; spi = &cts->xport_specific.spi; @@ -3372,7 +3356,6 @@ mpt_action(struct cam_sim *sim, union cc mpt_set_ccb_status(ccb, CAM_REQ_CMP); break; } -#endif /* * Skip attempting settings on RAID volume disks. @@ -3402,28 +3385,6 @@ mpt_action(struct cam_sim *sim, union cc period = 0; offset = 0; -#ifndef CAM_NEW_TRAN_CODE - if ((cts->valid & CCB_TRANS_DISC_VALID) != 0) { - dval |= (cts->flags & CCB_TRANS_DISC_ENB) ? - DP_DISC_ENABLE : DP_DISC_DISABL; - } - - if ((cts->valid & CCB_TRANS_TQ_VALID) != 0) { - dval |= (cts->flags & CCB_TRANS_TAG_ENB) ? - DP_TQING_ENABLE : DP_TQING_DISABL; - } - - if ((cts->valid & CCB_TRANS_BUS_WIDTH_VALID) != 0) { - dval |= cts->bus_width ? DP_WIDE : DP_NARROW; - } - - if ((cts->valid & CCB_TRANS_SYNC_RATE_VALID) && - (cts->valid & CCB_TRANS_SYNC_OFFSET_VALID)) { - dval |= DP_SYNC; - period = cts->sync_period; - offset = cts->sync_offset; - } -#else if ((spi->valid & CTS_SPI_VALID_DISC) != 0) { dval |= ((spi->flags & CTS_SPI_FLAGS_DISC_ENB) != 0) ? DP_DISC_ENABLE : DP_DISC_DISABL; @@ -3459,7 +3420,7 @@ mpt_action(struct cam_sim *sim, union cc period &= MPI_SCSIDEVPAGE1_RP_MIN_SYNC_PERIOD_MASK; period >>= MPI_SCSIDEVPAGE1_RP_SHIFT_MIN_SYNC_PERIOD; } -#endif + if (dval & DP_DISC_ENABLE) { mpt->mpt_disc_enable |= (1 << tgt); } else if (dval & DP_DISC_DISABL) { @@ -3492,7 +3453,6 @@ mpt_action(struct cam_sim *sim, union cc } case XPT_GET_TRAN_SETTINGS: { -#ifdef CAM_NEW_TRAN_CODE struct ccb_trans_settings_scsi *scsi; cts = &ccb->cts; cts->protocol = PROTO_SCSI; @@ -3524,21 +3484,6 @@ mpt_action(struct cam_sim *sim, union cc scsi = &cts->proto_specific.scsi; scsi->valid = CTS_SCSI_VALID_TQ; scsi->flags = CTS_SCSI_FLAGS_TAG_ENB; -#else - cts = &ccb->cts; - if (mpt->is_fc) { - cts->flags = CCB_TRANS_TAG_ENB | CCB_TRANS_DISC_ENB; - cts->valid = CCB_TRANS_DISC_VALID | CCB_TRANS_TQ_VALID; - cts->bus_width = MSG_EXT_WDTR_BUS_8_BIT; - } else if (mpt->is_sas) { - cts->flags = CCB_TRANS_TAG_ENB | CCB_TRANS_DISC_ENB; - cts->valid = CCB_TRANS_DISC_VALID | CCB_TRANS_TQ_VALID; - cts->bus_width = MSG_EXT_WDTR_BUS_8_BIT; - } else if (mpt_get_spi_settings(mpt, cts) != 0) { - mpt_set_ccb_status(ccb, CAM_REQ_CMP_ERR); - break; - } -#endif mpt_set_ccb_status(ccb, CAM_REQ_CMP); break; } @@ -3592,7 +3537,6 @@ mpt_action(struct cam_sim *sim, union cc /* * The base speed is the speed of the underlying connection. */ -#ifdef CAM_NEW_TRAN_CODE cpi->protocol = PROTO_SCSI; if (mpt->is_fc) { cpi->hba_misc = PIM_NOBUSRESET | PIM_UNMAPPED; @@ -3616,21 +3560,6 @@ mpt_action(struct cam_sim *sim, union cc cpi->transport_version = 2; cpi->protocol_version = SCSI_REV_2; } -#else - if (mpt->is_fc) { - cpi->hba_misc = PIM_NOBUSRESET; - cpi->base_transfer_speed = 100000; - cpi->hba_inquiry = PI_TAG_ABLE; - } else if (mpt->is_sas) { - cpi->hba_misc = PIM_NOBUSRESET; - cpi->base_transfer_speed = 300000; - cpi->hba_inquiry = PI_TAG_ABLE; - } else { - cpi->hba_misc = PIM_SEQSCAN; - cpi->base_transfer_speed = 3300; - cpi->hba_inquiry = PI_SDTR_ABLE|PI_TAG_ABLE|PI_WIDE_16; - } -#endif /* * We give our fake RAID passhtru bus a width that is MaxVolumes @@ -3726,10 +3655,8 @@ mpt_action(struct cam_sim *sim, union cc static int mpt_get_spi_settings(struct mpt_softc *mpt, struct ccb_trans_settings *cts) { -#ifdef CAM_NEW_TRAN_CODE struct ccb_trans_settings_scsi *scsi = &cts->proto_specific.scsi; struct ccb_trans_settings_spi *spi = &cts->xport_specific.spi; -#endif target_id_t tgt; uint32_t dval, pval, oval; int rv; @@ -3790,29 +3717,6 @@ mpt_get_spi_settings(struct mpt_softc *m pval = MPI_SCSIPORTPAGE0_CAP_GET_MIN_SYNC_PERIOD(pval); } -#ifndef CAM_NEW_TRAN_CODE - cts->flags &= ~(CCB_TRANS_DISC_ENB|CCB_TRANS_TAG_ENB); - cts->valid = 0; - cts->sync_period = pval; - cts->sync_offset = oval; - cts->valid |= CCB_TRANS_SYNC_RATE_VALID; - cts->valid |= CCB_TRANS_SYNC_OFFSET_VALID; - cts->valid |= CCB_TRANS_BUS_WIDTH_VALID; - if (dval & DP_WIDE) { - cts->bus_width = MSG_EXT_WDTR_BUS_16_BIT; - } else { - cts->bus_width = MSG_EXT_WDTR_BUS_8_BIT; - } - if (cts->ccb_h.target_lun != CAM_LUN_WILDCARD) { - cts->valid |= CCB_TRANS_DISC_VALID | CCB_TRANS_TQ_VALID; - if (dval & DP_DISC_ENABLE) { - cts->flags |= CCB_TRANS_DISC_ENB; - } - if (dval & DP_TQING_ENABLE) { - cts->flags |= CCB_TRANS_TAG_ENB; - } - } -#else spi->valid = 0; scsi->valid = 0; spi->flags = 0; @@ -3837,10 +3741,10 @@ mpt_get_spi_settings(struct mpt_softc *m spi->flags |= CTS_SPI_FLAGS_DISC_ENB; } } -#endif + mpt_lprt(mpt, MPT_PRT_NEGOTIATION, "mpt_get_spi_settings[%d]: %s flags 0x%x per 0x%x off=%d\n", tgt, - IS_CURRENT_SETTINGS(cts)? "ACTIVE" : "NVRAM ", dval, pval, oval); + IS_CURRENT_SETTINGS(cts) ? "ACTIVE" : "NVRAM ", dval, pval, oval); return (0); } @@ -3910,7 +3814,7 @@ mpt_spawn_recovery_thread(struct mpt_sof { int error; - error = mpt_kthread_create(mpt_recovery_thread, mpt, + error = kproc_create(mpt_recovery_thread, mpt, &mpt->recovery_thread, /*flags*/0, /*altstack*/0, "mpt_recovery%d", mpt->unit); return (error); @@ -3953,7 +3857,7 @@ mpt_recovery_thread(void *arg) mpt->recovery_thread = NULL; wakeup(&mpt->recovery_thread); MPT_UNLOCK(mpt); - mpt_kthread_exit(0); + kproc_exit(0); } static int Modified: stable/10/sys/dev/mpt/mpt_pci.c ============================================================================== --- stable/10/sys/dev/mpt/mpt_pci.c Fri Apr 25 21:58:28 2014 (r264948) +++ stable/10/sys/dev/mpt/mpt_pci.c Fri Apr 25 22:01:02 2014 (r264949) @@ -105,14 +105,6 @@ __FBSDID("$FreeBSD$"); #include #include -#if __FreeBSD_version < 700000 -#define pci_msix_count(x) 0 -#define pci_msi_count(x) 0 -#define pci_alloc_msi(x, y) 1 -#define pci_alloc_msix(x, y) 1 -#define pci_release_msi(x) do { ; } while (0) -#endif - /* * XXX it seems no other MPT driver knows about the following chips. */ @@ -149,10 +141,6 @@ __FBSDID("$FreeBSD$"); #define MPI_MANUFACTPAGE_DEVID_SAS1078DE_FB 0x007C #endif -#ifndef PCIM_CMD_SERRESPEN -#define PCIM_CMD_SERRESPEN 0x0100 -#endif - static int mpt_pci_probe(device_t); static int mpt_pci_attach(device_t); static void mpt_free_bus_resources(struct mpt_softc *mpt); @@ -178,6 +166,7 @@ static device_method_t mpt_methods[] = { static driver_t mpt_driver = { "mpt", mpt_methods, sizeof(struct mpt_softc) }; + static devclass_t mpt_devclass; DRIVER_MODULE(mpt, pci, mpt_driver, mpt_devclass, NULL, NULL); MODULE_DEPEND(mpt, pci, 1, 1, 1); @@ -288,6 +277,7 @@ mpt_set_options(struct mpt_softc *mpt) } } +#if 0 static void mpt_link_peer(struct mpt_softc *mpt) { @@ -326,13 +316,14 @@ mpt_unlink_peer(struct mpt_softc *mpt) mpt->mpt2->mpt2 = NULL; } } +#endif static int mpt_pci_attach(device_t dev) { struct mpt_softc *mpt; int iqd; - uint32_t data, cmd; + uint32_t val; int mpt_io_bar, mpt_mem_bar; mpt = (struct mpt_softc*)device_get_softc(dev); @@ -393,19 +384,19 @@ mpt_pci_attach(device_t dev) /* * Make sure that SERR, PERR, WRITE INVALIDATE and BUSMASTER are set. */ - cmd = pci_read_config(dev, PCIR_COMMAND, 2); - cmd |= - PCIM_CMD_SERRESPEN | PCIM_CMD_PERRESPEN | + val = pci_read_config(dev, PCIR_COMMAND, 2); + val |= PCIM_CMD_SERRESPEN | PCIM_CMD_PERRESPEN | PCIM_CMD_BUSMASTEREN | PCIM_CMD_MWRICEN; - pci_write_config(dev, PCIR_COMMAND, cmd, 2); + pci_write_config(dev, PCIR_COMMAND, val, 2); /* * Make sure we've disabled the ROM. */ - data = pci_read_config(dev, PCIR_BIOS, 4); - data &= ~PCIM_BIOS_ENABLE; - pci_write_config(dev, PCIR_BIOS, data, 4); + val = pci_read_config(dev, PCIR_BIOS, 4); + val &= ~PCIM_BIOS_ENABLE; + pci_write_config(dev, PCIR_BIOS, val, 4); +#if 0 /* * Is this part a dual? * If so, link with our partner (around yet) @@ -422,12 +413,13 @@ mpt_pci_attach(device_t dev) default: break; } +#endif /* * Figure out which are the I/O and MEM Bars */ - data = pci_read_config(dev, PCIR_BAR(0), 4); - if (PCI_BAR_IO(data)) { + val = pci_read_config(dev, PCIR_BAR(0), 4); + if (PCI_BAR_IO(val)) { /* BAR0 is IO, BAR1 is memory */ mpt_io_bar = 0; mpt_mem_bar = 1; @@ -484,25 +476,15 @@ mpt_pci_attach(device_t dev) * First try to alloc an MSI-X message. If that * fails, then try to alloc an MSI message instead. */ - if (pci_msix_count(dev) == 1) { - mpt->pci_msi_count = 1; - if (pci_alloc_msix(dev, &mpt->pci_msi_count) == 0) { - iqd = 1; - } else { - mpt->pci_msi_count = 0; - } - } - if (iqd == 0 && pci_msi_count(dev) == 1) { - mpt->pci_msi_count = 1; - if (pci_alloc_msi(dev, &mpt->pci_msi_count) == 0) { - iqd = 1; - } else { - mpt->pci_msi_count = 0; - } - } + val = 1; + if (pci_alloc_msix(dev, &val) == 0) + iqd = 1; + val = 1; + if (iqd == 0 && pci_alloc_msi(dev, &val) == 0) + iqd = 1; } mpt->pci_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &iqd, - RF_ACTIVE | (mpt->pci_msi_count ? 0 : RF_SHAREABLE)); + RF_ACTIVE | (iqd != 0 ? 0 : RF_SHAREABLE)); if (mpt->pci_irq == NULL) { device_printf(dev, "could not allocate interrupt\n"); goto bad; @@ -514,7 +496,7 @@ mpt_pci_attach(device_t dev) mpt_disable_ints(mpt); /* Register the interrupt handler */ - if (mpt_setup_intr(dev, mpt->pci_irq, MPT_IFLAGS, NULL, mpt_pci_intr, + if (bus_setup_intr(dev, mpt->pci_irq, MPT_IFLAGS, NULL, mpt_pci_intr, mpt, &mpt->ih)) { device_printf(dev, "could not setup interrupt\n"); goto bad; @@ -562,7 +544,10 @@ mpt_pci_attach(device_t dev) if (mpt->eh == NULL) { mpt_prt(mpt, "shutdown event registration failed\n"); + mpt_disable_ints(mpt); (void) mpt_detach(mpt); + mpt_reset(mpt, /*reinit*/FALSE); + mpt_raid_free_mem(mpt); goto bad; } return (0); @@ -570,7 +555,9 @@ mpt_pci_attach(device_t dev) bad: mpt_dma_mem_free(mpt); mpt_free_bus_resources(mpt); +#if 0 mpt_unlink_peer(mpt); +#endif MPT_LOCK_DESTROY(mpt); @@ -595,25 +582,21 @@ mpt_free_bus_resources(struct mpt_softc if (mpt->pci_irq) { bus_release_resource(mpt->dev, SYS_RES_IRQ, rman_get_rid(mpt->pci_irq), mpt->pci_irq); + pci_release_msi(mpt->dev); mpt->pci_irq = NULL; } - if (mpt->pci_msi_count) { - pci_release_msi(mpt->dev); - mpt->pci_msi_count = 0; - } - if (mpt->pci_pio_reg) { bus_release_resource(mpt->dev, SYS_RES_IOPORT, rman_get_rid(mpt->pci_pio_reg), mpt->pci_pio_reg); mpt->pci_pio_reg = NULL; } + if (mpt->pci_reg) { bus_release_resource(mpt->dev, SYS_RES_MEMORY, rman_get_rid(mpt->pci_reg), mpt->pci_reg); mpt->pci_reg = NULL; } - MPT_LOCK_DESTROY(mpt); } /* @@ -630,12 +613,16 @@ mpt_pci_detach(device_t dev) mpt_disable_ints(mpt); mpt_detach(mpt); mpt_reset(mpt, /*reinit*/FALSE); + mpt_raid_free_mem(mpt); mpt_dma_mem_free(mpt); mpt_free_bus_resources(mpt); - mpt_raid_free_mem(mpt); +#if 0 + mpt_unlink_peer(mpt); +#endif if (mpt->eh != NULL) { EVENTHANDLER_DEREGISTER(shutdown_post_sync, mpt->eh); } + MPT_LOCK_DESTROY(mpt); } return(0); } @@ -649,11 +636,8 @@ mpt_pci_shutdown(device_t dev) struct mpt_softc *mpt; mpt = (struct mpt_softc *)device_get_softc(dev); - if (mpt) { - int r; - r = mpt_shutdown(mpt); - return (r); - } + if (mpt) + return (mpt_shutdown(mpt)); return(0); } @@ -669,20 +653,11 @@ mpt_dma_mem_alloc(struct mpt_softc *mpt) } len = sizeof (request_t) * MPT_MAX_REQUESTS(mpt); -#ifdef RELENG_4 - mpt->request_pool = (request_t *)malloc(len, M_DEVBUF, M_WAITOK); - if (mpt->request_pool == NULL) { - mpt_prt(mpt, "cannot allocate request pool\n"); - return (1); - } - memset(mpt->request_pool, 0, len); -#else mpt->request_pool = (request_t *)malloc(len, M_DEVBUF, M_WAITOK|M_ZERO); if (mpt->request_pool == NULL) { mpt_prt(mpt, "cannot allocate request pool\n"); return (1); } -#endif /* * Create a parent dma tag for this device. Modified: stable/10/sys/dev/mpt/mpt_raid.c ============================================================================== --- stable/10/sys/dev/mpt/mpt_raid.c Fri Apr 25 21:58:28 2014 (r264948) +++ stable/10/sys/dev/mpt/mpt_raid.c Fri Apr 25 22:01:02 2014 (r264949) @@ -636,7 +636,7 @@ mpt_spawn_raid_thread(struct mpt_softc * MPT_LOCK(mpt); xpt_freeze_simq(mpt->phydisk_sim, 1); MPT_UNLOCK(mpt); - error = mpt_kthread_create(mpt_raid_thread, mpt, + error = kproc_create(mpt_raid_thread, mpt, &mpt->raid_thread, /*flags*/0, /*altstack*/0, "mpt_raid%d", mpt->unit); if (error != 0) { @@ -719,7 +719,7 @@ mpt_raid_thread(void *arg) mpt->raid_thread = NULL; wakeup(&mpt->raid_thread); MPT_UNLOCK(mpt); - mpt_kthread_exit(0); + kproc_exit(0); } #if 0 From owner-svn-src-stable@FreeBSD.ORG Fri Apr 25 22:01:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1116CA0F; Fri, 25 Apr 2014 22:01:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 798121CBE; Fri, 25 Apr 2014 22:01:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3PM16VS063452; Fri, 25 Apr 2014 22:01:06 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3PM15EA063444; Fri, 25 Apr 2014 22:01:05 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201404252201.s3PM15EA063444@svn.freebsd.org> From: Marius Strobl Date: Fri, 25 Apr 2014 22:01:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264950 - stable/9/sys/dev/mpt X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2014 22:01:07 -0000 Author: marius Date: Fri Apr 25 22:01:05 2014 New Revision: 264950 URL: http://svnweb.freebsd.org/changeset/base/264950 Log: MFC: r260058 - Remove a redundant variable in mpt_pci_attach(). - #if 0 the currently unused paired port linking and unlinking of dual adapters. - Simplify MSI/MSI-X allocation and release. For a single one, we don't need to fiddle with the MSI/MSI-X count and pci_release_msi(9) is smart enough to just do nothing in case of INTx. - Canonicalize actions taken on attach failure and detach. - Remove the remainder of incomplete support for older FreeBSD versions. Modified: stable/9/sys/dev/mpt/mpt.h stable/9/sys/dev/mpt/mpt_cam.c stable/9/sys/dev/mpt/mpt_pci.c stable/9/sys/dev/mpt/mpt_raid.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/mpt/mpt.h ============================================================================== --- stable/9/sys/dev/mpt/mpt.h Fri Apr 25 22:01:02 2014 (r264949) +++ stable/9/sys/dev/mpt/mpt.h Fri Apr 25 22:01:05 2014 (r264950) @@ -220,9 +220,6 @@ int mpt_modevent(module_t, int, void *); #define bus_dmamap_sync_range(dma_tag, dmamap, offset, len, op) \ bus_dmamap_sync(dma_tag, dmamap, op) -#if __FreeBSD_version < 600000 -#define bus_get_dma_tag(x) NULL -#endif #define mpt_dma_tag_create(mpt, parent_tag, alignment, boundary, \ lowaddr, highaddr, filter, filterarg, \ maxsize, nsegments, maxsegsz, flags, \ @@ -239,34 +236,6 @@ struct mpt_map_info { }; void mpt_map_rquest(void *, bus_dma_segment_t *, int, int); -/* **************************** NewBUS interrupt Crock ************************/ -#if __FreeBSD_version < 700031 -#define mpt_setup_intr(d, i, f, U, if, ifa, hp) \ - bus_setup_intr(d, i, f, if, ifa, hp) -#else -#define mpt_setup_intr bus_setup_intr -#endif - -/* **************************** NewBUS CAM Support ****************************/ -#if __FreeBSD_version < 700049 -#define mpt_xpt_bus_register(sim, parent, bus) \ - xpt_bus_register(sim, bus) -#else -#define mpt_xpt_bus_register xpt_bus_register -#endif - -/**************************** Kernel Thread Support ***************************/ -#if __FreeBSD_version > 800001 -#define mpt_kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) \ - kproc_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) -#define mpt_kthread_exit(status) \ - kproc_exit(status) -#else -#define mpt_kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) \ - kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) -#define mpt_kthread_exit(status) \ - kthread_exit(status) -#endif /********************************** Endianess *********************************/ #define MPT_2_HOST64(ptr, tag) ptr->tag = le64toh(ptr->tag) @@ -671,7 +640,6 @@ struct mpt_softc { /* * PCI Hardware info */ - int pci_msi_count; struct resource * pci_irq; /* Interrupt map for chip */ void * ih; /* Interrupt handle */ #if 0 @@ -754,9 +722,10 @@ struct mpt_softc { uint16_t sequence; /* Sequence Number */ uint16_t pad3; - +#if 0 /* Paired port in some dual adapters configurations */ struct mpt_softc * mpt2; +#endif /* FW Image management */ uint32_t fw_image_size; Modified: stable/9/sys/dev/mpt/mpt_cam.c ============================================================================== --- stable/9/sys/dev/mpt/mpt_cam.c Fri Apr 25 22:01:02 2014 (r264949) +++ stable/9/sys/dev/mpt/mpt_cam.c Fri Apr 25 22:01:05 2014 (r264950) @@ -110,12 +110,6 @@ __FBSDID("$FreeBSD$"); #include #include -#if __FreeBSD_version >= 700025 -#ifndef CAM_NEW_TRAN_CODE -#define CAM_NEW_TRAN_CODE 1 -#endif -#endif - static void mpt_poll(struct cam_sim *); static timeout_t mpt_timeout; static void mpt_action(struct cam_sim *, union ccb *); @@ -344,7 +338,7 @@ mpt_cam_attach(struct mpt_softc *mpt) * Register exactly this bus. */ MPT_LOCK(mpt); - if (mpt_xpt_bus_register(mpt->sim, mpt->dev, 0) != CAM_SUCCESS) { + if (xpt_bus_register(mpt->sim, mpt->dev, 0) != CAM_SUCCESS) { mpt_prt(mpt, "Bus registration Failed!\n"); error = ENOMEM; MPT_UNLOCK(mpt); @@ -383,7 +377,7 @@ mpt_cam_attach(struct mpt_softc *mpt) * Register this bus. */ MPT_LOCK(mpt); - if (mpt_xpt_bus_register(mpt->phydisk_sim, mpt->dev, 1) != + if (xpt_bus_register(mpt->phydisk_sim, mpt->dev, 1) != CAM_SUCCESS) { mpt_prt(mpt, "Physical Disk Bus registration Failed!\n"); error = ENOMEM; @@ -2338,7 +2332,6 @@ mpt_cam_event(struct mpt_softc *mpt, req break; case MPI_EVENT_RESCAN: -#if __FreeBSD_version >= 600000 { union ccb *ccb; uint32_t pathid; @@ -2373,10 +2366,7 @@ mpt_cam_event(struct mpt_softc *mpt, req xpt_rescan(ccb); break; } -#else - mpt_prt(mpt, "Rescan Port: %d\n", (data0 >> 8) & 0xff); - break; -#endif + case MPI_EVENT_LINK_STATUS_CHANGE: mpt_prt(mpt, "Port %d: LinkState: %s\n", (data1 >> 8) & 0xff, @@ -3324,11 +3314,8 @@ mpt_action(struct cam_sim *sim, union cc break; } -#ifdef CAM_NEW_TRAN_CODE #define IS_CURRENT_SETTINGS(c) ((c)->type == CTS_TYPE_CURRENT_SETTINGS) -#else -#define IS_CURRENT_SETTINGS(c) ((c)->flags & CCB_TRANS_CURRENT_SETTINGS) -#endif + #define DP_DISC_ENABLE 0x1 #define DP_DISC_DISABL 0x2 #define DP_DISC (DP_DISC_ENABLE|DP_DISC_DISABL) @@ -3345,10 +3332,8 @@ mpt_action(struct cam_sim *sim, union cc case XPT_SET_TRAN_SETTINGS: /* Nexus Settings */ { -#ifdef CAM_NEW_TRAN_CODE struct ccb_trans_settings_scsi *scsi; struct ccb_trans_settings_spi *spi; -#endif uint8_t dval; u_int period; u_int offset; @@ -3361,7 +3346,6 @@ mpt_action(struct cam_sim *sim, union cc break; } -#ifdef CAM_NEW_TRAN_CODE scsi = &cts->proto_specific.scsi; spi = &cts->xport_specific.spi; @@ -3372,7 +3356,6 @@ mpt_action(struct cam_sim *sim, union cc mpt_set_ccb_status(ccb, CAM_REQ_CMP); break; } -#endif /* * Skip attempting settings on RAID volume disks. @@ -3402,28 +3385,6 @@ mpt_action(struct cam_sim *sim, union cc period = 0; offset = 0; -#ifndef CAM_NEW_TRAN_CODE - if ((cts->valid & CCB_TRANS_DISC_VALID) != 0) { - dval |= (cts->flags & CCB_TRANS_DISC_ENB) ? - DP_DISC_ENABLE : DP_DISC_DISABL; - } - - if ((cts->valid & CCB_TRANS_TQ_VALID) != 0) { - dval |= (cts->flags & CCB_TRANS_TAG_ENB) ? - DP_TQING_ENABLE : DP_TQING_DISABL; - } - - if ((cts->valid & CCB_TRANS_BUS_WIDTH_VALID) != 0) { - dval |= cts->bus_width ? DP_WIDE : DP_NARROW; - } - - if ((cts->valid & CCB_TRANS_SYNC_RATE_VALID) && - (cts->valid & CCB_TRANS_SYNC_OFFSET_VALID)) { - dval |= DP_SYNC; - period = cts->sync_period; - offset = cts->sync_offset; - } -#else if ((spi->valid & CTS_SPI_VALID_DISC) != 0) { dval |= ((spi->flags & CTS_SPI_FLAGS_DISC_ENB) != 0) ? DP_DISC_ENABLE : DP_DISC_DISABL; @@ -3459,7 +3420,7 @@ mpt_action(struct cam_sim *sim, union cc period &= MPI_SCSIDEVPAGE1_RP_MIN_SYNC_PERIOD_MASK; period >>= MPI_SCSIDEVPAGE1_RP_SHIFT_MIN_SYNC_PERIOD; } -#endif + if (dval & DP_DISC_ENABLE) { mpt->mpt_disc_enable |= (1 << tgt); } else if (dval & DP_DISC_DISABL) { @@ -3492,7 +3453,6 @@ mpt_action(struct cam_sim *sim, union cc } case XPT_GET_TRAN_SETTINGS: { -#ifdef CAM_NEW_TRAN_CODE struct ccb_trans_settings_scsi *scsi; cts = &ccb->cts; cts->protocol = PROTO_SCSI; @@ -3524,21 +3484,6 @@ mpt_action(struct cam_sim *sim, union cc scsi = &cts->proto_specific.scsi; scsi->valid = CTS_SCSI_VALID_TQ; scsi->flags = CTS_SCSI_FLAGS_TAG_ENB; -#else - cts = &ccb->cts; - if (mpt->is_fc) { - cts->flags = CCB_TRANS_TAG_ENB | CCB_TRANS_DISC_ENB; - cts->valid = CCB_TRANS_DISC_VALID | CCB_TRANS_TQ_VALID; - cts->bus_width = MSG_EXT_WDTR_BUS_8_BIT; - } else if (mpt->is_sas) { - cts->flags = CCB_TRANS_TAG_ENB | CCB_TRANS_DISC_ENB; - cts->valid = CCB_TRANS_DISC_VALID | CCB_TRANS_TQ_VALID; - cts->bus_width = MSG_EXT_WDTR_BUS_8_BIT; - } else if (mpt_get_spi_settings(mpt, cts) != 0) { - mpt_set_ccb_status(ccb, CAM_REQ_CMP_ERR); - break; - } -#endif mpt_set_ccb_status(ccb, CAM_REQ_CMP); break; } @@ -3592,7 +3537,6 @@ mpt_action(struct cam_sim *sim, union cc /* * The base speed is the speed of the underlying connection. */ -#ifdef CAM_NEW_TRAN_CODE cpi->protocol = PROTO_SCSI; if (mpt->is_fc) { cpi->hba_misc = PIM_NOBUSRESET | PIM_UNMAPPED; @@ -3616,21 +3560,6 @@ mpt_action(struct cam_sim *sim, union cc cpi->transport_version = 2; cpi->protocol_version = SCSI_REV_2; } -#else - if (mpt->is_fc) { - cpi->hba_misc = PIM_NOBUSRESET; - cpi->base_transfer_speed = 100000; - cpi->hba_inquiry = PI_TAG_ABLE; - } else if (mpt->is_sas) { - cpi->hba_misc = PIM_NOBUSRESET; - cpi->base_transfer_speed = 300000; - cpi->hba_inquiry = PI_TAG_ABLE; - } else { - cpi->hba_misc = PIM_SEQSCAN; - cpi->base_transfer_speed = 3300; - cpi->hba_inquiry = PI_SDTR_ABLE|PI_TAG_ABLE|PI_WIDE_16; - } -#endif /* * We give our fake RAID passhtru bus a width that is MaxVolumes @@ -3727,10 +3656,8 @@ mpt_action(struct cam_sim *sim, union cc static int mpt_get_spi_settings(struct mpt_softc *mpt, struct ccb_trans_settings *cts) { -#ifdef CAM_NEW_TRAN_CODE struct ccb_trans_settings_scsi *scsi = &cts->proto_specific.scsi; struct ccb_trans_settings_spi *spi = &cts->xport_specific.spi; -#endif target_id_t tgt; uint32_t dval, pval, oval; int rv; @@ -3791,29 +3718,6 @@ mpt_get_spi_settings(struct mpt_softc *m pval = MPI_SCSIPORTPAGE0_CAP_GET_MIN_SYNC_PERIOD(pval); } -#ifndef CAM_NEW_TRAN_CODE - cts->flags &= ~(CCB_TRANS_DISC_ENB|CCB_TRANS_TAG_ENB); - cts->valid = 0; - cts->sync_period = pval; - cts->sync_offset = oval; - cts->valid |= CCB_TRANS_SYNC_RATE_VALID; - cts->valid |= CCB_TRANS_SYNC_OFFSET_VALID; - cts->valid |= CCB_TRANS_BUS_WIDTH_VALID; - if (dval & DP_WIDE) { - cts->bus_width = MSG_EXT_WDTR_BUS_16_BIT; - } else { - cts->bus_width = MSG_EXT_WDTR_BUS_8_BIT; - } - if (cts->ccb_h.target_lun != CAM_LUN_WILDCARD) { - cts->valid |= CCB_TRANS_DISC_VALID | CCB_TRANS_TQ_VALID; - if (dval & DP_DISC_ENABLE) { - cts->flags |= CCB_TRANS_DISC_ENB; - } - if (dval & DP_TQING_ENABLE) { - cts->flags |= CCB_TRANS_TAG_ENB; - } - } -#else spi->valid = 0; scsi->valid = 0; spi->flags = 0; @@ -3838,10 +3742,10 @@ mpt_get_spi_settings(struct mpt_softc *m spi->flags |= CTS_SPI_FLAGS_DISC_ENB; } } -#endif + mpt_lprt(mpt, MPT_PRT_NEGOTIATION, "mpt_get_spi_settings[%d]: %s flags 0x%x per 0x%x off=%d\n", tgt, - IS_CURRENT_SETTINGS(cts)? "ACTIVE" : "NVRAM ", dval, pval, oval); + IS_CURRENT_SETTINGS(cts) ? "ACTIVE" : "NVRAM ", dval, pval, oval); return (0); } @@ -3911,7 +3815,7 @@ mpt_spawn_recovery_thread(struct mpt_sof { int error; - error = mpt_kthread_create(mpt_recovery_thread, mpt, + error = kproc_create(mpt_recovery_thread, mpt, &mpt->recovery_thread, /*flags*/0, /*altstack*/0, "mpt_recovery%d", mpt->unit); return (error); @@ -3954,7 +3858,7 @@ mpt_recovery_thread(void *arg) mpt->recovery_thread = NULL; wakeup(&mpt->recovery_thread); MPT_UNLOCK(mpt); - mpt_kthread_exit(0); + kproc_exit(0); } static int Modified: stable/9/sys/dev/mpt/mpt_pci.c ============================================================================== --- stable/9/sys/dev/mpt/mpt_pci.c Fri Apr 25 22:01:02 2014 (r264949) +++ stable/9/sys/dev/mpt/mpt_pci.c Fri Apr 25 22:01:05 2014 (r264950) @@ -105,14 +105,6 @@ __FBSDID("$FreeBSD$"); #include #include -#if __FreeBSD_version < 700000 -#define pci_msix_count(x) 0 -#define pci_msi_count(x) 0 -#define pci_alloc_msi(x, y) 1 -#define pci_alloc_msix(x, y) 1 -#define pci_release_msi(x) do { ; } while (0) -#endif - /* * XXX it seems no other MPT driver knows about the following chips. */ @@ -149,10 +141,6 @@ __FBSDID("$FreeBSD$"); #define MPI_MANUFACTPAGE_DEVID_SAS1078DE_FB 0x007C #endif -#ifndef PCIM_CMD_SERRESPEN -#define PCIM_CMD_SERRESPEN 0x0100 -#endif - static int mpt_pci_probe(device_t); static int mpt_pci_attach(device_t); static void mpt_free_bus_resources(struct mpt_softc *mpt); @@ -178,6 +166,7 @@ static device_method_t mpt_methods[] = { static driver_t mpt_driver = { "mpt", mpt_methods, sizeof(struct mpt_softc) }; + static devclass_t mpt_devclass; DRIVER_MODULE(mpt, pci, mpt_driver, mpt_devclass, NULL, NULL); MODULE_DEPEND(mpt, pci, 1, 1, 1); @@ -293,6 +282,7 @@ mpt_set_options(struct mpt_softc *mpt) } } +#if 0 static void mpt_link_peer(struct mpt_softc *mpt) { @@ -331,13 +321,14 @@ mpt_unlink_peer(struct mpt_softc *mpt) mpt->mpt2->mpt2 = NULL; } } +#endif static int mpt_pci_attach(device_t dev) { struct mpt_softc *mpt; int iqd; - uint32_t data, cmd; + uint32_t val; int mpt_io_bar, mpt_mem_bar; mpt = (struct mpt_softc*)device_get_softc(dev); @@ -398,19 +389,19 @@ mpt_pci_attach(device_t dev) /* * Make sure that SERR, PERR, WRITE INVALIDATE and BUSMASTER are set. */ - cmd = pci_read_config(dev, PCIR_COMMAND, 2); - cmd |= - PCIM_CMD_SERRESPEN | PCIM_CMD_PERRESPEN | + val = pci_read_config(dev, PCIR_COMMAND, 2); + val |= PCIM_CMD_SERRESPEN | PCIM_CMD_PERRESPEN | PCIM_CMD_BUSMASTEREN | PCIM_CMD_MWRICEN; - pci_write_config(dev, PCIR_COMMAND, cmd, 2); + pci_write_config(dev, PCIR_COMMAND, val, 2); /* * Make sure we've disabled the ROM. */ - data = pci_read_config(dev, PCIR_BIOS, 4); - data &= ~PCIM_BIOS_ENABLE; - pci_write_config(dev, PCIR_BIOS, data, 4); + val = pci_read_config(dev, PCIR_BIOS, 4); + val &= ~PCIM_BIOS_ENABLE; + pci_write_config(dev, PCIR_BIOS, val, 4); +#if 0 /* * Is this part a dual? * If so, link with our partner (around yet) @@ -427,12 +418,13 @@ mpt_pci_attach(device_t dev) default: break; } +#endif /* * Figure out which are the I/O and MEM Bars */ - data = pci_read_config(dev, PCIR_BAR(0), 4); - if (PCI_BAR_IO(data)) { + val = pci_read_config(dev, PCIR_BAR(0), 4); + if (PCI_BAR_IO(val)) { /* BAR0 is IO, BAR1 is memory */ mpt_io_bar = 0; mpt_mem_bar = 1; @@ -489,25 +481,15 @@ mpt_pci_attach(device_t dev) * First try to alloc an MSI-X message. If that * fails, then try to alloc an MSI message instead. */ - if (pci_msix_count(dev) == 1) { - mpt->pci_msi_count = 1; - if (pci_alloc_msix(dev, &mpt->pci_msi_count) == 0) { - iqd = 1; - } else { - mpt->pci_msi_count = 0; - } - } - if (iqd == 0 && pci_msi_count(dev) == 1) { - mpt->pci_msi_count = 1; - if (pci_alloc_msi(dev, &mpt->pci_msi_count) == 0) { - iqd = 1; - } else { - mpt->pci_msi_count = 0; - } - } + val = 1; + if (pci_alloc_msix(dev, &val) == 0) + iqd = 1; + val = 1; + if (iqd == 0 && pci_alloc_msi(dev, &val) == 0) + iqd = 1; } mpt->pci_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &iqd, - RF_ACTIVE | (mpt->pci_msi_count ? 0 : RF_SHAREABLE)); + RF_ACTIVE | (iqd != 0 ? 0 : RF_SHAREABLE)); if (mpt->pci_irq == NULL) { device_printf(dev, "could not allocate interrupt\n"); goto bad; @@ -519,7 +501,7 @@ mpt_pci_attach(device_t dev) mpt_disable_ints(mpt); /* Register the interrupt handler */ - if (mpt_setup_intr(dev, mpt->pci_irq, MPT_IFLAGS, NULL, mpt_pci_intr, + if (bus_setup_intr(dev, mpt->pci_irq, MPT_IFLAGS, NULL, mpt_pci_intr, mpt, &mpt->ih)) { device_printf(dev, "could not setup interrupt\n"); goto bad; @@ -567,7 +549,10 @@ mpt_pci_attach(device_t dev) if (mpt->eh == NULL) { mpt_prt(mpt, "shutdown event registration failed\n"); + mpt_disable_ints(mpt); (void) mpt_detach(mpt); + mpt_reset(mpt, /*reinit*/FALSE); + mpt_raid_free_mem(mpt); goto bad; } return (0); @@ -575,7 +560,9 @@ mpt_pci_attach(device_t dev) bad: mpt_dma_mem_free(mpt); mpt_free_bus_resources(mpt); +#if 0 mpt_unlink_peer(mpt); +#endif MPT_LOCK_DESTROY(mpt); @@ -600,25 +587,21 @@ mpt_free_bus_resources(struct mpt_softc if (mpt->pci_irq) { bus_release_resource(mpt->dev, SYS_RES_IRQ, rman_get_rid(mpt->pci_irq), mpt->pci_irq); + pci_release_msi(mpt->dev); mpt->pci_irq = NULL; } - if (mpt->pci_msi_count) { - pci_release_msi(mpt->dev); - mpt->pci_msi_count = 0; - } - if (mpt->pci_pio_reg) { bus_release_resource(mpt->dev, SYS_RES_IOPORT, rman_get_rid(mpt->pci_pio_reg), mpt->pci_pio_reg); mpt->pci_pio_reg = NULL; } + if (mpt->pci_reg) { bus_release_resource(mpt->dev, SYS_RES_MEMORY, rman_get_rid(mpt->pci_reg), mpt->pci_reg); mpt->pci_reg = NULL; } - MPT_LOCK_DESTROY(mpt); } /* @@ -635,12 +618,16 @@ mpt_pci_detach(device_t dev) mpt_disable_ints(mpt); mpt_detach(mpt); mpt_reset(mpt, /*reinit*/FALSE); + mpt_raid_free_mem(mpt); mpt_dma_mem_free(mpt); mpt_free_bus_resources(mpt); - mpt_raid_free_mem(mpt); +#if 0 + mpt_unlink_peer(mpt); +#endif if (mpt->eh != NULL) { EVENTHANDLER_DEREGISTER(shutdown_post_sync, mpt->eh); } + MPT_LOCK_DESTROY(mpt); } return(0); } @@ -654,11 +641,8 @@ mpt_pci_shutdown(device_t dev) struct mpt_softc *mpt; mpt = (struct mpt_softc *)device_get_softc(dev); - if (mpt) { - int r; - r = mpt_shutdown(mpt); - return (r); - } + if (mpt) + return (mpt_shutdown(mpt)); return(0); } @@ -674,20 +658,11 @@ mpt_dma_mem_alloc(struct mpt_softc *mpt) } len = sizeof (request_t) * MPT_MAX_REQUESTS(mpt); -#ifdef RELENG_4 - mpt->request_pool = (request_t *)malloc(len, M_DEVBUF, M_WAITOK); - if (mpt->request_pool == NULL) { - mpt_prt(mpt, "cannot allocate request pool\n"); - return (1); - } - memset(mpt->request_pool, 0, len); -#else mpt->request_pool = (request_t *)malloc(len, M_DEVBUF, M_WAITOK|M_ZERO); if (mpt->request_pool == NULL) { mpt_prt(mpt, "cannot allocate request pool\n"); return (1); } -#endif /* * Create a parent dma tag for this device. Modified: stable/9/sys/dev/mpt/mpt_raid.c ============================================================================== --- stable/9/sys/dev/mpt/mpt_raid.c Fri Apr 25 22:01:02 2014 (r264949) +++ stable/9/sys/dev/mpt/mpt_raid.c Fri Apr 25 22:01:05 2014 (r264950) @@ -636,7 +636,7 @@ mpt_spawn_raid_thread(struct mpt_softc * MPT_LOCK(mpt); xpt_freeze_simq(mpt->phydisk_sim, 1); MPT_UNLOCK(mpt); - error = mpt_kthread_create(mpt_raid_thread, mpt, + error = kproc_create(mpt_raid_thread, mpt, &mpt->raid_thread, /*flags*/0, /*altstack*/0, "mpt_raid%d", mpt->unit); if (error != 0) { @@ -719,7 +719,7 @@ mpt_raid_thread(void *arg) mpt->raid_thread = NULL; wakeup(&mpt->raid_thread); MPT_UNLOCK(mpt); - mpt_kthread_exit(0); + kproc_exit(0); } #if 0 From owner-svn-src-stable@FreeBSD.ORG Fri Apr 25 22:04:34 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19E03C15; Fri, 25 Apr 2014 22:04:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05D4F1CEC; Fri, 25 Apr 2014 22:04:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3PM4X0s066062; Fri, 25 Apr 2014 22:04:33 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3PM4X91066061; Fri, 25 Apr 2014 22:04:33 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201404252204.s3PM4X91066061@svn.freebsd.org> From: Marius Strobl Date: Fri, 25 Apr 2014 22:04:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264951 - stable/9/sys/dev/ral X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2014 22:04:34 -0000 Author: marius Date: Fri Apr 25 22:04:33 2014 New Revision: 264951 URL: http://svnweb.freebsd.org/changeset/base/264951 Log: MFC: r260061 - Add support for using MSI instead of INTx, controllable via the tunable hw.ral.msi_disable (defaulting to using MSI). - Probe with BUS_PROBE_DEFAULT instead of 0. - Nuke code setting PCI_POWERSTATE_D0; pci(4) already does that for type 0 devices. - Use PCIR_BAR instead of a homegrown macro. - There's no need to keep track of resource IDs. - Release resources again in case attaching fails. - Quiesce the interrupt before detaching. - Sprinkle const. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. - Trim headers. - Nuke dupe $FreeBSD$. Modified: stable/9/sys/dev/ral/if_ral_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ral/if_ral_pci.c ============================================================================== --- stable/9/sys/dev/ral/if_ral_pci.c Fri Apr 25 22:01:05 2014 (r264950) +++ stable/9/sys/dev/ral/if_ral_pci.c Fri Apr 25 22:04:33 2014 (r264951) @@ -1,5 +1,3 @@ -/* $FreeBSD$ */ - /*- * Copyright (c) 2005, 2006 * Damien Bergamini @@ -25,32 +23,26 @@ __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 #include #include -#include #include #include @@ -64,6 +56,9 @@ MODULE_DEPEND(ral, firmware, 1, 1, 1); MODULE_DEPEND(ral, wlan, 1, 1, 1); MODULE_DEPEND(ral, wlan_amrr, 1, 1, 1); +static int ral_msi_disable; +TUNABLE_INT("hw.ral.msi_disable", &ral_msi_disable); + struct ral_pci_ident { uint16_t vendor; uint16_t device; @@ -105,7 +100,7 @@ static const struct ral_pci_ident ral_pc { 0, 0, NULL } }; -static struct ral_opns { +static const struct ral_opns { int (*attach)(device_t, int); int (*detach)(void *); void (*shutdown)(void *); @@ -144,9 +139,7 @@ struct ral_pci_softc { struct rt2860_softc sc_rt2860; } u; - struct ral_opns *sc_opns; - int irq_rid; - int mem_rid; + const struct ral_opns *sc_opns; struct resource *irq; struct resource *mem; void *sc_ih; @@ -168,7 +161,7 @@ static device_method_t ral_pci_methods[] DEVMETHOD(device_suspend, ral_pci_suspend), DEVMETHOD(device_resume, ral_pci_resume), - { 0, 0 } + DEVMETHOD_END }; static driver_t ral_pci_driver = { @@ -179,7 +172,7 @@ static driver_t ral_pci_driver = { static devclass_t ral_devclass; -DRIVER_MODULE(ral, pci, ral_pci_driver, ral_devclass, 0, 0); +DRIVER_MODULE(ral, pci, ral_pci_driver, ral_devclass, NULL, NULL); static int ral_pci_probe(device_t dev) @@ -190,29 +183,19 @@ ral_pci_probe(device_t dev) if (pci_get_vendor(dev) == ident->vendor && pci_get_device(dev) == ident->device) { device_set_desc(dev, ident->name); - return 0; + return (BUS_PROBE_DEFAULT); } } return ENXIO; } -/* Base Address Register */ -#define RAL_PCI_BAR0 0x10 - static int ral_pci_attach(device_t dev) { struct ral_pci_softc *psc = device_get_softc(dev); struct rt2560_softc *sc = &psc->u.sc_rt2560; - int error; - - if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) { - device_printf(dev, "chip is in D%d power mode " - "-- setting to D0\n", pci_get_powerstate(dev)); - pci_set_powerstate(dev, PCI_POWERSTATE_D0); - } + int count, error, rid; - /* enable bus-mastering */ pci_enable_busmaster(dev); switch (pci_get_device(dev)) { @@ -229,8 +212,8 @@ ral_pci_attach(device_t dev) break; } - psc->mem_rid = RAL_PCI_BAR0; - psc->mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &psc->mem_rid, + rid = PCIR_BAR(0); + psc->mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (psc->mem == NULL) { device_printf(dev, "could not allocate memory resource\n"); @@ -241,17 +224,27 @@ ral_pci_attach(device_t dev) sc->sc_sh = rman_get_bushandle(psc->mem); sc->sc_invalid = 1; - psc->irq_rid = 0; - psc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &psc->irq_rid, - RF_ACTIVE | RF_SHAREABLE); + rid = 0; + if (ral_msi_disable == 0) { + count = 1; + if (pci_alloc_msi(dev, &count) == 0) + rid = 1; + } + psc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE | + (rid != 0 ? 0 : RF_SHAREABLE)); if (psc->irq == NULL) { device_printf(dev, "could not allocate interrupt resource\n"); + pci_release_msi(dev); + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(psc->mem), psc->mem); return ENXIO; } error = (*psc->sc_opns->attach)(dev, pci_get_device(dev)); - if (error != 0) + if (error != 0) { + (void)ral_pci_detach(dev); return error; + } /* * Hook our interrupt after all initialization is complete. @@ -260,6 +253,7 @@ ral_pci_attach(device_t dev) NULL, psc->sc_opns->intr, psc, &psc->sc_ih); if (error != 0) { device_printf(dev, "could not set up interrupt\n"); + (void)ral_pci_detach(dev); return error; } sc->sc_invalid = 0; @@ -275,14 +269,18 @@ ral_pci_detach(device_t dev) /* check if device was removed */ sc->sc_invalid = !bus_child_present(dev); - + + if (psc->sc_ih != NULL) + bus_teardown_intr(dev, psc->irq, psc->sc_ih); (*psc->sc_opns->detach)(psc); bus_generic_detach(dev); - bus_teardown_intr(dev, psc->irq, psc->sc_ih); - bus_release_resource(dev, SYS_RES_IRQ, psc->irq_rid, psc->irq); + bus_release_resource(dev, SYS_RES_IRQ, rman_get_rid(psc->irq), + psc->irq); + pci_release_msi(dev); - bus_release_resource(dev, SYS_RES_MEMORY, psc->mem_rid, psc->mem); + bus_release_resource(dev, SYS_RES_MEMORY, rman_get_rid(psc->mem), + psc->mem); return 0; } From owner-svn-src-stable@FreeBSD.ORG Fri Apr 25 22:04:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7BBAD44; Fri, 25 Apr 2014 22:04:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D40041CEF; Fri, 25 Apr 2014 22:04:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3PM4eew066108; Fri, 25 Apr 2014 22:04:40 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3PM4ePA066107; Fri, 25 Apr 2014 22:04:40 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201404252204.s3PM4ePA066107@svn.freebsd.org> From: Marius Strobl Date: Fri, 25 Apr 2014 22:04:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264952 - stable/10/sys/dev/ral X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2014 22:04:41 -0000 Author: marius Date: Fri Apr 25 22:04:40 2014 New Revision: 264952 URL: http://svnweb.freebsd.org/changeset/base/264952 Log: MFC: r260061 - Add support for using MSI instead of INTx, controllable via the tunable hw.ral.msi_disable (defaulting to using MSI). - Probe with BUS_PROBE_DEFAULT instead of 0. - Nuke code setting PCI_POWERSTATE_D0; pci(4) already does that for type 0 devices. - Use PCIR_BAR instead of a homegrown macro. - There's no need to keep track of resource IDs. - Release resources again in case attaching fails. - Quiesce the interrupt before detaching. - Sprinkle const. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. - Trim headers. - Nuke dupe $FreeBSD$. Modified: stable/10/sys/dev/ral/if_ral_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ral/if_ral_pci.c ============================================================================== --- stable/10/sys/dev/ral/if_ral_pci.c Fri Apr 25 22:04:33 2014 (r264951) +++ stable/10/sys/dev/ral/if_ral_pci.c Fri Apr 25 22:04:40 2014 (r264952) @@ -1,5 +1,3 @@ -/* $FreeBSD$ */ - /*- * Copyright (c) 2005, 2006 * Damien Bergamini @@ -25,32 +23,26 @@ __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 #include #include -#include #include #include @@ -64,6 +56,9 @@ MODULE_DEPEND(ral, firmware, 1, 1, 1); MODULE_DEPEND(ral, wlan, 1, 1, 1); MODULE_DEPEND(ral, wlan_amrr, 1, 1, 1); +static int ral_msi_disable; +TUNABLE_INT("hw.ral.msi_disable", &ral_msi_disable); + struct ral_pci_ident { uint16_t vendor; uint16_t device; @@ -105,7 +100,7 @@ static const struct ral_pci_ident ral_pc { 0, 0, NULL } }; -static struct ral_opns { +static const struct ral_opns { int (*attach)(device_t, int); int (*detach)(void *); void (*shutdown)(void *); @@ -144,9 +139,7 @@ struct ral_pci_softc { struct rt2860_softc sc_rt2860; } u; - struct ral_opns *sc_opns; - int irq_rid; - int mem_rid; + const struct ral_opns *sc_opns; struct resource *irq; struct resource *mem; void *sc_ih; @@ -168,7 +161,7 @@ static device_method_t ral_pci_methods[] DEVMETHOD(device_suspend, ral_pci_suspend), DEVMETHOD(device_resume, ral_pci_resume), - { 0, 0 } + DEVMETHOD_END }; static driver_t ral_pci_driver = { @@ -179,7 +172,7 @@ static driver_t ral_pci_driver = { static devclass_t ral_devclass; -DRIVER_MODULE(ral, pci, ral_pci_driver, ral_devclass, 0, 0); +DRIVER_MODULE(ral, pci, ral_pci_driver, ral_devclass, NULL, NULL); static int ral_pci_probe(device_t dev) @@ -190,29 +183,19 @@ ral_pci_probe(device_t dev) if (pci_get_vendor(dev) == ident->vendor && pci_get_device(dev) == ident->device) { device_set_desc(dev, ident->name); - return 0; + return (BUS_PROBE_DEFAULT); } } return ENXIO; } -/* Base Address Register */ -#define RAL_PCI_BAR0 0x10 - static int ral_pci_attach(device_t dev) { struct ral_pci_softc *psc = device_get_softc(dev); struct rt2560_softc *sc = &psc->u.sc_rt2560; - int error; - - if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) { - device_printf(dev, "chip is in D%d power mode " - "-- setting to D0\n", pci_get_powerstate(dev)); - pci_set_powerstate(dev, PCI_POWERSTATE_D0); - } + int count, error, rid; - /* enable bus-mastering */ pci_enable_busmaster(dev); switch (pci_get_device(dev)) { @@ -229,8 +212,8 @@ ral_pci_attach(device_t dev) break; } - psc->mem_rid = RAL_PCI_BAR0; - psc->mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &psc->mem_rid, + rid = PCIR_BAR(0); + psc->mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (psc->mem == NULL) { device_printf(dev, "could not allocate memory resource\n"); @@ -241,17 +224,27 @@ ral_pci_attach(device_t dev) sc->sc_sh = rman_get_bushandle(psc->mem); sc->sc_invalid = 1; - psc->irq_rid = 0; - psc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &psc->irq_rid, - RF_ACTIVE | RF_SHAREABLE); + rid = 0; + if (ral_msi_disable == 0) { + count = 1; + if (pci_alloc_msi(dev, &count) == 0) + rid = 1; + } + psc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE | + (rid != 0 ? 0 : RF_SHAREABLE)); if (psc->irq == NULL) { device_printf(dev, "could not allocate interrupt resource\n"); + pci_release_msi(dev); + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(psc->mem), psc->mem); return ENXIO; } error = (*psc->sc_opns->attach)(dev, pci_get_device(dev)); - if (error != 0) + if (error != 0) { + (void)ral_pci_detach(dev); return error; + } /* * Hook our interrupt after all initialization is complete. @@ -260,6 +253,7 @@ ral_pci_attach(device_t dev) NULL, psc->sc_opns->intr, psc, &psc->sc_ih); if (error != 0) { device_printf(dev, "could not set up interrupt\n"); + (void)ral_pci_detach(dev); return error; } sc->sc_invalid = 0; @@ -275,14 +269,18 @@ ral_pci_detach(device_t dev) /* check if device was removed */ sc->sc_invalid = !bus_child_present(dev); - + + if (psc->sc_ih != NULL) + bus_teardown_intr(dev, psc->irq, psc->sc_ih); (*psc->sc_opns->detach)(psc); bus_generic_detach(dev); - bus_teardown_intr(dev, psc->irq, psc->sc_ih); - bus_release_resource(dev, SYS_RES_IRQ, psc->irq_rid, psc->irq); + bus_release_resource(dev, SYS_RES_IRQ, rman_get_rid(psc->irq), + psc->irq); + pci_release_msi(dev); - bus_release_resource(dev, SYS_RES_MEMORY, psc->mem_rid, psc->mem); + bus_release_resource(dev, SYS_RES_MEMORY, rman_get_rid(psc->mem), + psc->mem); return 0; } From owner-svn-src-stable@FreeBSD.ORG Fri Apr 25 22:19:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF693861; Fri, 25 Apr 2014 22:19:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC0221E77; Fri, 25 Apr 2014 22:19:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3PMJ7kQ070816; Fri, 25 Apr 2014 22:19:07 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3PMJ7qV070814; Fri, 25 Apr 2014 22:19:07 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201404252219.s3PMJ7qV070814@svn.freebsd.org> From: Marius Strobl Date: Fri, 25 Apr 2014 22:19:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264953 - stable/9/sys/dev/iwi X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2014 22:19:07 -0000 Author: marius Date: Fri Apr 25 22:19:06 2014 New Revision: 264953 URL: http://svnweb.freebsd.org/changeset/base/264953 Log: MFC: r260063 - Probe with BUS_PROBE_DEFAULT instead of 0. - Nuke code setting PCI_POWERSTATE_D0; pci(4) already does that for type 0 devices. - Use PCIR_BAR instead of a homegrown macro. - There's no need to keep track of resource IDs. - Quiesce the interrupt before actually detaching. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. Modified: stable/9/sys/dev/iwi/if_iwi.c stable/9/sys/dev/iwi/if_iwivar.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/iwi/if_iwi.c ============================================================================== --- stable/9/sys/dev/iwi/if_iwi.c Fri Apr 25 22:04:40 2014 (r264952) +++ stable/9/sys/dev/iwi/if_iwi.c Fri Apr 25 22:19:06 2014 (r264953) @@ -219,7 +219,7 @@ static device_method_t iwi_methods[] = { DEVMETHOD(device_suspend, iwi_suspend), DEVMETHOD(device_resume, iwi_resume), - { 0, 0 } + DEVMETHOD_END }; static driver_t iwi_driver = { @@ -230,7 +230,7 @@ static driver_t iwi_driver = { static devclass_t iwi_devclass; -DRIVER_MODULE(iwi, pci, iwi_driver, iwi_devclass, 0, 0); +DRIVER_MODULE(iwi, pci, iwi_driver, iwi_devclass, NULL, NULL); MODULE_VERSION(iwi, 1); @@ -257,15 +257,12 @@ iwi_probe(device_t dev) if (pci_get_vendor(dev) == ident->vendor && pci_get_device(dev) == ident->device) { device_set_desc(dev, ident->name); - return 0; + return (BUS_PROBE_DEFAULT); } } return ENXIO; } -/* Base Address Register */ -#define IWI_PCI_BAR0 0x10 - static int iwi_attach(device_t dev) { @@ -300,20 +297,13 @@ iwi_attach(device_t dev) callout_init_mtx(&sc->sc_wdtimer, &sc->sc_mtx, 0); callout_init_mtx(&sc->sc_rftimer, &sc->sc_mtx, 0); - if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) { - device_printf(dev, "chip is in D%d power mode " - "-- setting to D0\n", pci_get_powerstate(dev)); - pci_set_powerstate(dev, PCI_POWERSTATE_D0); - } - pci_write_config(dev, 0x41, 0, 1); /* enable bus-mastering */ pci_enable_busmaster(dev); - sc->mem_rid = IWI_PCI_BAR0; - sc->mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->mem_rid, - RF_ACTIVE); + i = PCIR_BAR(0); + sc->mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &i, RF_ACTIVE); if (sc->mem == NULL) { device_printf(dev, "could not allocate memory resource\n"); goto fail; @@ -322,8 +312,8 @@ iwi_attach(device_t dev) sc->sc_st = rman_get_bustag(sc->mem); sc->sc_sh = rman_get_bushandle(sc->mem); - sc->irq_rid = 0; - sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irq_rid, + i = 0; + sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &i, RF_ACTIVE | RF_SHAREABLE); if (sc->irq == NULL) { device_printf(dev, "could not allocate interrupt resource\n"); @@ -459,6 +449,8 @@ iwi_detach(device_t dev) struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic = ifp->if_l2com; + bus_teardown_intr(dev, sc->irq, sc->sc_ih); + /* NB: do early to drain any pending tasks */ ieee80211_draintask(ic, &sc->sc_radiontask); ieee80211_draintask(ic, &sc->sc_radiofftask); @@ -480,10 +472,10 @@ iwi_detach(device_t dev) iwi_free_tx_ring(sc, &sc->txq[3]); iwi_free_rx_ring(sc, &sc->rxq); - bus_teardown_intr(dev, sc->irq, sc->sc_ih); - bus_release_resource(dev, SYS_RES_IRQ, sc->irq_rid, sc->irq); + bus_release_resource(dev, SYS_RES_IRQ, rman_get_rid(sc->irq), sc->irq); - bus_release_resource(dev, SYS_RES_MEMORY, sc->mem_rid, sc->mem); + bus_release_resource(dev, SYS_RES_MEMORY, rman_get_rid(sc->mem), + sc->mem); delete_unrhdr(sc->sc_unr); Modified: stable/9/sys/dev/iwi/if_iwivar.h ============================================================================== --- stable/9/sys/dev/iwi/if_iwivar.h Fri Apr 25 22:04:40 2014 (r264952) +++ stable/9/sys/dev/iwi/if_iwivar.h Fri Apr 25 22:19:06 2014 (r264953) @@ -153,8 +153,6 @@ struct iwi_softc { bus_space_tag_t sc_st; bus_space_handle_t sc_sh; void *sc_ih; - int mem_rid; - int irq_rid; /* * The card needs external firmware images to work, which is made of a From owner-svn-src-stable@FreeBSD.ORG Fri Apr 25 22:19:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D39DD98D; Fri, 25 Apr 2014 22:19:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C02681E78; Fri, 25 Apr 2014 22:19:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3PMJIwf070880; Fri, 25 Apr 2014 22:19:18 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3PMJI84070877; Fri, 25 Apr 2014 22:19:18 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201404252219.s3PMJI84070877@svn.freebsd.org> From: Marius Strobl Date: Fri, 25 Apr 2014 22:19:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264954 - stable/10/sys/dev/iwi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2014 22:19:19 -0000 Author: marius Date: Fri Apr 25 22:19:18 2014 New Revision: 264954 URL: http://svnweb.freebsd.org/changeset/base/264954 Log: MFC: r260063 - Probe with BUS_PROBE_DEFAULT instead of 0. - Nuke code setting PCI_POWERSTATE_D0; pci(4) already does that for type 0 devices. - Use PCIR_BAR instead of a homegrown macro. - There's no need to keep track of resource IDs. - Quiesce the interrupt before actually detaching. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. Modified: stable/10/sys/dev/iwi/if_iwi.c stable/10/sys/dev/iwi/if_iwivar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iwi/if_iwi.c ============================================================================== --- stable/10/sys/dev/iwi/if_iwi.c Fri Apr 25 22:19:06 2014 (r264953) +++ stable/10/sys/dev/iwi/if_iwi.c Fri Apr 25 22:19:18 2014 (r264954) @@ -219,7 +219,7 @@ static device_method_t iwi_methods[] = { DEVMETHOD(device_suspend, iwi_suspend), DEVMETHOD(device_resume, iwi_resume), - { 0, 0 } + DEVMETHOD_END }; static driver_t iwi_driver = { @@ -230,7 +230,7 @@ static driver_t iwi_driver = { static devclass_t iwi_devclass; -DRIVER_MODULE(iwi, pci, iwi_driver, iwi_devclass, 0, 0); +DRIVER_MODULE(iwi, pci, iwi_driver, iwi_devclass, NULL, NULL); MODULE_VERSION(iwi, 1); @@ -257,15 +257,12 @@ iwi_probe(device_t dev) if (pci_get_vendor(dev) == ident->vendor && pci_get_device(dev) == ident->device) { device_set_desc(dev, ident->name); - return 0; + return (BUS_PROBE_DEFAULT); } } return ENXIO; } -/* Base Address Register */ -#define IWI_PCI_BAR0 0x10 - static int iwi_attach(device_t dev) { @@ -300,20 +297,13 @@ iwi_attach(device_t dev) callout_init_mtx(&sc->sc_wdtimer, &sc->sc_mtx, 0); callout_init_mtx(&sc->sc_rftimer, &sc->sc_mtx, 0); - if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) { - device_printf(dev, "chip is in D%d power mode " - "-- setting to D0\n", pci_get_powerstate(dev)); - pci_set_powerstate(dev, PCI_POWERSTATE_D0); - } - pci_write_config(dev, 0x41, 0, 1); /* enable bus-mastering */ pci_enable_busmaster(dev); - sc->mem_rid = IWI_PCI_BAR0; - sc->mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->mem_rid, - RF_ACTIVE); + i = PCIR_BAR(0); + sc->mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &i, RF_ACTIVE); if (sc->mem == NULL) { device_printf(dev, "could not allocate memory resource\n"); goto fail; @@ -322,8 +312,8 @@ iwi_attach(device_t dev) sc->sc_st = rman_get_bustag(sc->mem); sc->sc_sh = rman_get_bushandle(sc->mem); - sc->irq_rid = 0; - sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irq_rid, + i = 0; + sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &i, RF_ACTIVE | RF_SHAREABLE); if (sc->irq == NULL) { device_printf(dev, "could not allocate interrupt resource\n"); @@ -459,6 +449,8 @@ iwi_detach(device_t dev) struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic = ifp->if_l2com; + bus_teardown_intr(dev, sc->irq, sc->sc_ih); + /* NB: do early to drain any pending tasks */ ieee80211_draintask(ic, &sc->sc_radiontask); ieee80211_draintask(ic, &sc->sc_radiofftask); @@ -480,10 +472,10 @@ iwi_detach(device_t dev) iwi_free_tx_ring(sc, &sc->txq[3]); iwi_free_rx_ring(sc, &sc->rxq); - bus_teardown_intr(dev, sc->irq, sc->sc_ih); - bus_release_resource(dev, SYS_RES_IRQ, sc->irq_rid, sc->irq); + bus_release_resource(dev, SYS_RES_IRQ, rman_get_rid(sc->irq), sc->irq); - bus_release_resource(dev, SYS_RES_MEMORY, sc->mem_rid, sc->mem); + bus_release_resource(dev, SYS_RES_MEMORY, rman_get_rid(sc->mem), + sc->mem); delete_unrhdr(sc->sc_unr); Modified: stable/10/sys/dev/iwi/if_iwivar.h ============================================================================== --- stable/10/sys/dev/iwi/if_iwivar.h Fri Apr 25 22:19:06 2014 (r264953) +++ stable/10/sys/dev/iwi/if_iwivar.h Fri Apr 25 22:19:18 2014 (r264954) @@ -153,8 +153,6 @@ struct iwi_softc { bus_space_tag_t sc_st; bus_space_handle_t sc_sh; void *sc_ih; - int mem_rid; - int irq_rid; /* * The card needs external firmware images to work, which is made of a From owner-svn-src-stable@FreeBSD.ORG Fri Apr 25 22:23:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67140C0A; Fri, 25 Apr 2014 22:23:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46D291075; Fri, 25 Apr 2014 22:23:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3PMNR1j074553; Fri, 25 Apr 2014 22:23:27 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3PMNQfK074551; Fri, 25 Apr 2014 22:23:26 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201404252223.s3PMNQfK074551@svn.freebsd.org> From: Marius Strobl Date: Fri, 25 Apr 2014 22:23:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264955 - stable/9/sys/dev/wpi X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2014 22:23:27 -0000 Author: marius Date: Fri Apr 25 22:23:26 2014 New Revision: 264955 URL: http://svnweb.freebsd.org/changeset/base/264955 Log: MFC: r260064 - Probe with BUS_PROBE_DEFAULT instead of 0. - Nuke code setting PCI_POWERSTATE_D0; pci(4) already does that for type 0 devices. - There's no need to keep track of resource IDs. - Quiesce the interrupt before actually detaching. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. Modified: stable/9/sys/dev/wpi/if_wpi.c stable/9/sys/dev/wpi/if_wpivar.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/wpi/if_wpi.c ============================================================================== --- stable/9/sys/dev/wpi/if_wpi.c Fri Apr 25 22:19:18 2014 (r264954) +++ stable/9/sys/dev/wpi/if_wpi.c Fri Apr 25 22:23:26 2014 (r264955) @@ -250,7 +250,6 @@ static int wpi_shutdown(device_t); static int wpi_suspend(device_t); static int wpi_resume(device_t); - static device_method_t wpi_methods[] = { /* Device interface */ DEVMETHOD(device_probe, wpi_probe), @@ -260,7 +259,7 @@ static device_method_t wpi_methods[] = { DEVMETHOD(device_suspend, wpi_suspend), DEVMETHOD(device_resume, wpi_resume), - { 0, 0 } + DEVMETHOD_END }; static driver_t wpi_driver = { @@ -271,7 +270,7 @@ static driver_t wpi_driver = { static devclass_t wpi_devclass; -DRIVER_MODULE(wpi, pci, wpi_driver, wpi_devclass, 0, 0); +DRIVER_MODULE(wpi, pci, wpi_driver, wpi_devclass, NULL, NULL); MODULE_VERSION(wpi, 1); @@ -282,12 +281,12 @@ static const uint8_t wpi_ridx_to_plcp[] /* CCK: device-dependent */ 10, 20, 55, 110 }; + static const uint8_t wpi_ridx_to_rate[] = { 12, 18, 24, 36, 48, 72, 96, 108, /* OFDM */ 2, 4, 11, 22 /*CCK */ }; - static int wpi_probe(device_t dev) { @@ -297,7 +296,7 @@ wpi_probe(device_t dev) if (pci_get_vendor(dev) == ident->vendor && pci_get_device(dev) == ident->device) { device_set_desc(dev, ident->name); - return 0; + return (BUS_PROBE_DEFAULT); } } return ENXIO; @@ -490,7 +489,7 @@ wpi_attach(device_t dev) struct wpi_softc *sc = device_get_softc(dev); struct ifnet *ifp; struct ieee80211com *ic; - int ac, error, supportsa = 1; + int ac, error, rid, supportsa = 1; uint32_t tmp; const struct wpi_ident *ident; uint8_t macaddr[IEEE80211_ADDR_LEN]; @@ -522,20 +521,14 @@ wpi_attach(device_t dev) callout_init_mtx(&sc->calib_to, &sc->sc_mtx, 0); callout_init_mtx(&sc->watchdog_to, &sc->sc_mtx, 0); - if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) { - device_printf(dev, "chip is in D%d power mode " - "-- setting to D0\n", pci_get_powerstate(dev)); - pci_set_powerstate(dev, PCI_POWERSTATE_D0); - } - /* disable the retry timeout register */ pci_write_config(dev, 0x41, 0, 1); /* enable bus-mastering */ pci_enable_busmaster(dev); - sc->mem_rid = PCIR_BAR(0); - sc->mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->mem_rid, + rid = PCIR_BAR(0); + sc->mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (sc->mem == NULL) { device_printf(dev, "could not allocate memory resource\n"); @@ -546,8 +539,8 @@ wpi_attach(device_t dev) sc->sc_st = rman_get_bustag(sc->mem); sc->sc_sh = rman_get_bushandle(sc->mem); - sc->irq_rid = 0; - sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irq_rid, + rid = 0; + sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE | RF_SHAREABLE); if (sc->irq == NULL) { device_printf(dev, "could not allocate interrupt resource\n"); @@ -714,6 +707,9 @@ wpi_detach(device_t dev) struct ieee80211com *ic; int ac; + if (sc->irq != NULL) + bus_teardown_intr(dev, sc->irq, sc->sc_ih); + if (ifp != NULL) { ic = ifp->if_l2com; @@ -743,13 +739,12 @@ wpi_detach(device_t dev) wpi_free_fwmem(sc); WPI_UNLOCK(sc); - if (sc->irq != NULL) { - bus_teardown_intr(dev, sc->irq, sc->sc_ih); - bus_release_resource(dev, SYS_RES_IRQ, sc->irq_rid, sc->irq); - } - + if (sc->irq != NULL) + bus_release_resource(dev, SYS_RES_IRQ, rman_get_rid(sc->irq), + sc->irq); if (sc->mem != NULL) - bus_release_resource(dev, SYS_RES_MEMORY, sc->mem_rid, sc->mem); + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(sc->mem), sc->mem); if (ifp != NULL) if_free(ifp); @@ -3189,7 +3184,6 @@ wpi_stop_locked(struct wpi_softc *sc) callout_stop(&sc->watchdog_to); callout_stop(&sc->calib_to); - /* disable interrupts */ WPI_WRITE(sc, WPI_MASK, 0); WPI_WRITE(sc, WPI_INTR, WPI_INTR_MASK); Modified: stable/9/sys/dev/wpi/if_wpivar.h ============================================================================== --- stable/9/sys/dev/wpi/if_wpivar.h Fri Apr 25 22:19:18 2014 (r264954) +++ stable/9/sys/dev/wpi/if_wpivar.h Fri Apr 25 22:23:26 2014 (r264955) @@ -162,8 +162,6 @@ struct wpi_softc { bus_space_tag_t sc_st; bus_space_handle_t sc_sh; void *sc_ih; - int mem_rid; - int irq_rid; struct wpi_config config; int temp; From owner-svn-src-stable@FreeBSD.ORG Fri Apr 25 22:23:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3847ED36; Fri, 25 Apr 2014 22:23:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 18EEF1077; Fri, 25 Apr 2014 22:23:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3PMNcCM074612; Fri, 25 Apr 2014 22:23:38 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3PMNcbd074610; Fri, 25 Apr 2014 22:23:38 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201404252223.s3PMNcbd074610@svn.freebsd.org> From: Marius Strobl Date: Fri, 25 Apr 2014 22:23:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264956 - stable/10/sys/dev/wpi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2014 22:23:39 -0000 Author: marius Date: Fri Apr 25 22:23:38 2014 New Revision: 264956 URL: http://svnweb.freebsd.org/changeset/base/264956 Log: MFC: r260064 - Probe with BUS_PROBE_DEFAULT instead of 0. - Nuke code setting PCI_POWERSTATE_D0; pci(4) already does that for type 0 devices. - There's no need to keep track of resource IDs. - Quiesce the interrupt before actually detaching. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. Modified: stable/10/sys/dev/wpi/if_wpi.c stable/10/sys/dev/wpi/if_wpivar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/wpi/if_wpi.c ============================================================================== --- stable/10/sys/dev/wpi/if_wpi.c Fri Apr 25 22:23:26 2014 (r264955) +++ stable/10/sys/dev/wpi/if_wpi.c Fri Apr 25 22:23:38 2014 (r264956) @@ -252,7 +252,6 @@ static int wpi_shutdown(device_t); static int wpi_suspend(device_t); static int wpi_resume(device_t); - static device_method_t wpi_methods[] = { /* Device interface */ DEVMETHOD(device_probe, wpi_probe), @@ -262,7 +261,7 @@ static device_method_t wpi_methods[] = { DEVMETHOD(device_suspend, wpi_suspend), DEVMETHOD(device_resume, wpi_resume), - { 0, 0 } + DEVMETHOD_END }; static driver_t wpi_driver = { @@ -273,7 +272,7 @@ static driver_t wpi_driver = { static devclass_t wpi_devclass; -DRIVER_MODULE(wpi, pci, wpi_driver, wpi_devclass, 0, 0); +DRIVER_MODULE(wpi, pci, wpi_driver, wpi_devclass, NULL, NULL); MODULE_VERSION(wpi, 1); @@ -284,12 +283,12 @@ static const uint8_t wpi_ridx_to_plcp[] /* CCK: device-dependent */ 10, 20, 55, 110 }; + static const uint8_t wpi_ridx_to_rate[] = { 12, 18, 24, 36, 48, 72, 96, 108, /* OFDM */ 2, 4, 11, 22 /*CCK */ }; - static int wpi_probe(device_t dev) { @@ -299,7 +298,7 @@ wpi_probe(device_t dev) if (pci_get_vendor(dev) == ident->vendor && pci_get_device(dev) == ident->device) { device_set_desc(dev, ident->name); - return 0; + return (BUS_PROBE_DEFAULT); } } return ENXIO; @@ -492,7 +491,7 @@ wpi_attach(device_t dev) struct wpi_softc *sc = device_get_softc(dev); struct ifnet *ifp; struct ieee80211com *ic; - int ac, error, supportsa = 1; + int ac, error, rid, supportsa = 1; uint32_t tmp; const struct wpi_ident *ident; uint8_t macaddr[IEEE80211_ADDR_LEN]; @@ -524,20 +523,14 @@ wpi_attach(device_t dev) callout_init_mtx(&sc->calib_to, &sc->sc_mtx, 0); callout_init_mtx(&sc->watchdog_to, &sc->sc_mtx, 0); - if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) { - device_printf(dev, "chip is in D%d power mode " - "-- setting to D0\n", pci_get_powerstate(dev)); - pci_set_powerstate(dev, PCI_POWERSTATE_D0); - } - /* disable the retry timeout register */ pci_write_config(dev, 0x41, 0, 1); /* enable bus-mastering */ pci_enable_busmaster(dev); - sc->mem_rid = PCIR_BAR(0); - sc->mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->mem_rid, + rid = PCIR_BAR(0); + sc->mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (sc->mem == NULL) { device_printf(dev, "could not allocate memory resource\n"); @@ -548,8 +541,8 @@ wpi_attach(device_t dev) sc->sc_st = rman_get_bustag(sc->mem); sc->sc_sh = rman_get_bushandle(sc->mem); - sc->irq_rid = 0; - sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irq_rid, + rid = 0; + sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE | RF_SHAREABLE); if (sc->irq == NULL) { device_printf(dev, "could not allocate interrupt resource\n"); @@ -716,6 +709,9 @@ wpi_detach(device_t dev) struct ieee80211com *ic; int ac; + if (sc->irq != NULL) + bus_teardown_intr(dev, sc->irq, sc->sc_ih); + if (ifp != NULL) { ic = ifp->if_l2com; @@ -745,13 +741,12 @@ wpi_detach(device_t dev) wpi_free_fwmem(sc); WPI_UNLOCK(sc); - if (sc->irq != NULL) { - bus_teardown_intr(dev, sc->irq, sc->sc_ih); - bus_release_resource(dev, SYS_RES_IRQ, sc->irq_rid, sc->irq); - } - + if (sc->irq != NULL) + bus_release_resource(dev, SYS_RES_IRQ, rman_get_rid(sc->irq), + sc->irq); if (sc->mem != NULL) - bus_release_resource(dev, SYS_RES_MEMORY, sc->mem_rid, sc->mem); + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(sc->mem), sc->mem); if (ifp != NULL) if_free(ifp); @@ -3191,7 +3186,6 @@ wpi_stop_locked(struct wpi_softc *sc) callout_stop(&sc->watchdog_to); callout_stop(&sc->calib_to); - /* disable interrupts */ WPI_WRITE(sc, WPI_MASK, 0); WPI_WRITE(sc, WPI_INTR, WPI_INTR_MASK); Modified: stable/10/sys/dev/wpi/if_wpivar.h ============================================================================== --- stable/10/sys/dev/wpi/if_wpivar.h Fri Apr 25 22:23:26 2014 (r264955) +++ stable/10/sys/dev/wpi/if_wpivar.h Fri Apr 25 22:23:38 2014 (r264956) @@ -162,8 +162,6 @@ struct wpi_softc { bus_space_tag_t sc_st; bus_space_handle_t sc_sh; void *sc_ih; - int mem_rid; - int irq_rid; struct wpi_config config; int temp; From owner-svn-src-stable@FreeBSD.ORG Sat Apr 26 00:40:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8C8C3459; Sat, 26 Apr 2014 00:40:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 792BD1BE8; Sat, 26 Apr 2014 00:40:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3Q0e3HJ033082; Sat, 26 Apr 2014 00:40:03 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3Q0e3YK033079; Sat, 26 Apr 2014 00:40:03 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201404260040.s3Q0e3YK033079@svn.freebsd.org> From: Marius Strobl Date: Sat, 26 Apr 2014 00:40:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264957 - stable/9/sys/dev/sound/pci/hda X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Apr 2014 00:40:03 -0000 Author: marius Date: Sat Apr 26 00:40:02 2014 New Revision: 264957 URL: http://svnweb.freebsd.org/changeset/base/264957 Log: MFC: r264831 Add quirk to configure headphones redirection on Intel DH87RL boards. Modified: stable/9/sys/dev/sound/pci/hda/hdaa_patches.c stable/9/sys/dev/sound/pci/hda/hdac.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/pci/hda/hdaa_patches.c ============================================================================== --- stable/9/sys/dev/sound/pci/hda/hdaa_patches.c Fri Apr 25 22:23:38 2014 (r264956) +++ stable/9/sys/dev/sound/pci/hda/hdaa_patches.c Sat Apr 26 00:40:02 2014 (r264957) @@ -351,7 +351,7 @@ hdac_pin_patch(struct hdaa_widget *w) case 25: patch = "as=1 seq=15"; break; - /* + /* * Group onboard mic and headphone mic * together. Fixes onboard mic. */ @@ -379,6 +379,13 @@ hdac_pin_patch(struct hdaa_widget *w) patch = "as=1 seq=15"; break; } + } else if (id == HDA_CODEC_ALC892 && + subid == INTEL_DH87RL_SUBVENDOR) { + switch (nid) { + case 27: + patch = "as=1 seq=15"; + break; + } } if (patch != NULL) Modified: stable/9/sys/dev/sound/pci/hda/hdac.h ============================================================================== --- stable/9/sys/dev/sound/pci/hda/hdac.h Fri Apr 25 22:23:38 2014 (r264956) +++ stable/9/sys/dev/sound/pci/hda/hdac.h Sat Apr 26 00:40:02 2014 (r264957) @@ -146,6 +146,7 @@ /* OEM/subvendors */ /* Intel */ +#define INTEL_DH87RL_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0x204a) #define INTEL_D101GGC_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xd600) /* HP/Compaq */ From owner-svn-src-stable@FreeBSD.ORG Sat Apr 26 00:40:16 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C541958D; Sat, 26 Apr 2014 00:40:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B28291BEE; Sat, 26 Apr 2014 00:40:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3Q0eGIb033160; Sat, 26 Apr 2014 00:40:16 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3Q0eGWC033158; Sat, 26 Apr 2014 00:40:16 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201404260040.s3Q0eGWC033158@svn.freebsd.org> From: Marius Strobl Date: Sat, 26 Apr 2014 00:40:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264958 - stable/10/sys/dev/sound/pci/hda X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Apr 2014 00:40:16 -0000 Author: marius Date: Sat Apr 26 00:40:16 2014 New Revision: 264958 URL: http://svnweb.freebsd.org/changeset/base/264958 Log: MFC: r264831 Add quirk to configure headphones redirection on Intel DH87RL boards. Modified: stable/10/sys/dev/sound/pci/hda/hdaa_patches.c stable/10/sys/dev/sound/pci/hda/hdac.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/pci/hda/hdaa_patches.c ============================================================================== --- stable/10/sys/dev/sound/pci/hda/hdaa_patches.c Sat Apr 26 00:40:02 2014 (r264957) +++ stable/10/sys/dev/sound/pci/hda/hdaa_patches.c Sat Apr 26 00:40:16 2014 (r264958) @@ -356,7 +356,7 @@ hdac_pin_patch(struct hdaa_widget *w) case 25: patch = "as=1 seq=15"; break; - /* + /* * Group onboard mic and headphone mic * together. Fixes onboard mic. */ @@ -384,6 +384,13 @@ hdac_pin_patch(struct hdaa_widget *w) patch = "as=1 seq=15"; break; } + } else if (id == HDA_CODEC_ALC892 && + subid == INTEL_DH87RL_SUBVENDOR) { + switch (nid) { + case 27: + patch = "as=1 seq=15"; + break; + } } if (patch != NULL) Modified: stable/10/sys/dev/sound/pci/hda/hdac.h ============================================================================== --- stable/10/sys/dev/sound/pci/hda/hdac.h Sat Apr 26 00:40:02 2014 (r264957) +++ stable/10/sys/dev/sound/pci/hda/hdac.h Sat Apr 26 00:40:16 2014 (r264958) @@ -155,6 +155,7 @@ /* OEM/subvendors */ /* Intel */ +#define INTEL_DH87RL_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0x204a) #define INTEL_D101GGC_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xd600) /* HP/Compaq */ From owner-svn-src-stable@FreeBSD.ORG Sat Apr 26 00:51:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A64CD731; Sat, 26 Apr 2014 00:51:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92F561C92; Sat, 26 Apr 2014 00:51:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3Q0p8RL040229; Sat, 26 Apr 2014 00:51:08 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3Q0p7KK040223; Sat, 26 Apr 2014 00:51:07 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404260051.s3Q0p7KK040223@svn.freebsd.org> From: Glen Barber Date: Sat, 26 Apr 2014 00:51:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264959 - stable/10/release/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Apr 2014 00:51:08 -0000 Author: gjb Date: Sat Apr 26 00:51:07 2014 New Revision: 264959 URL: http://svnweb.freebsd.org/changeset/base/264959 Log: MFC r264794: Move xdev knobs from release/arm/release.sh and into an XDEV_FLAGS variable in ${KERNCONF}.conf file. Local changes: Fix XDEV_FLAGS for stable/10 branch, in particular, remove WITH_GCC_BOOTSTRAP=1 and add WITH_GNUCXX=1. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/arm/BEAGLEBONE.conf stable/10/release/arm/PANDABOARD.conf stable/10/release/arm/RPI-B.conf stable/10/release/arm/WANDBOARD-QUAD.conf stable/10/release/arm/ZEDBOARD.conf stable/10/release/arm/release.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/release/arm/BEAGLEBONE.conf ============================================================================== --- stable/10/release/arm/BEAGLEBONE.conf Sat Apr 26 00:40:16 2014 (r264958) +++ stable/10/release/arm/BEAGLEBONE.conf Sat Apr 26 00:51:07 2014 (r264959) @@ -22,6 +22,7 @@ EMBEDDEDBUILD=1 EMBEDDEDPORTS="lang/python textproc/gsed" XDEV="arm" XDEV_ARCH="armv6" +XDEV_FLAGS="WITH_GCC=1 WITH_GNUCXX=1 WITHOUT_CLANG_IS_CC=1" KERNEL="BEAGLEBONE" CROCHETSRC="https://github.com/kientzle/crochet-freebsd" CROCHETBRANCH="trunk" Modified: stable/10/release/arm/PANDABOARD.conf ============================================================================== --- stable/10/release/arm/PANDABOARD.conf Sat Apr 26 00:40:16 2014 (r264958) +++ stable/10/release/arm/PANDABOARD.conf Sat Apr 26 00:51:07 2014 (r264959) @@ -22,6 +22,7 @@ EMBEDDEDBUILD=1 EMBEDDEDPORTS="lang/python textproc/gsed" XDEV="arm" XDEV_ARCH="armv6" +XDEV_FLAGS="WITH_GCC=1 WITH_GNUCXX=1 WITHOUT_CLANG_IS_CC=1" KERNEL="PANDABOARD" CROCHETSRC="https://github.com/kientzle/crochet-freebsd" CROCHETBRANCH="trunk" Modified: stable/10/release/arm/RPI-B.conf ============================================================================== --- stable/10/release/arm/RPI-B.conf Sat Apr 26 00:40:16 2014 (r264958) +++ stable/10/release/arm/RPI-B.conf Sat Apr 26 00:51:07 2014 (r264959) @@ -22,6 +22,7 @@ EMBEDDEDBUILD=1 EMBEDDEDPORTS="lang/python textproc/gsed" XDEV="arm" XDEV_ARCH="armv6" +XDEV_FLAGS="WITH_GCC=1 WITH_GNUCXX=1 WITHOUT_CLANG_IS_CC=1" KERNEL="RPI-B" CROCHETSRC="https://github.com/kientzle/crochet-freebsd" CROCHETBRANCH="trunk" Modified: stable/10/release/arm/WANDBOARD-QUAD.conf ============================================================================== --- stable/10/release/arm/WANDBOARD-QUAD.conf Sat Apr 26 00:40:16 2014 (r264958) +++ stable/10/release/arm/WANDBOARD-QUAD.conf Sat Apr 26 00:51:07 2014 (r264959) @@ -22,6 +22,7 @@ EMBEDDEDBUILD=1 EMBEDDEDPORTS="lang/python textproc/gsed" XDEV="arm" XDEV_ARCH="armv6" +XDEV_FLAGS="WITH_GCC=1 WITH_GNUCXX=1 WITHOUT_CLANG_IS_CC=1" KERNEL="WANDBOARD-QUAD" CROCHETSRC="https://github.com/kientzle/crochet-freebsd" CROCHETBRANCH="trunk" Modified: stable/10/release/arm/ZEDBOARD.conf ============================================================================== --- stable/10/release/arm/ZEDBOARD.conf Sat Apr 26 00:40:16 2014 (r264958) +++ stable/10/release/arm/ZEDBOARD.conf Sat Apr 26 00:51:07 2014 (r264959) @@ -21,6 +21,7 @@ CHROOTDIR="/scratch" EMBEDDEDBUILD=1 XDEV="arm" XDEV_ARCH="armv6" +XDEV_FLAGS="WITH_GCC=1 WITH_GNUCXX=1 WITHOUT_CLANG_IS_CC=1" KERNEL="ZEDBOARD" CROCHETSRC="https://github.com/kientzle/crochet-freebsd" CROCHETBRANCH="trunk" Modified: stable/10/release/arm/release.sh ============================================================================== --- stable/10/release/arm/release.sh Sat Apr 26 00:40:16 2014 (r264958) +++ stable/10/release/arm/release.sh Sat Apr 26 00:51:07 2014 (r264959) @@ -94,8 +94,7 @@ install_uboot() { main() { # Build the 'xdev' target for crochet. eval chroot ${CHROOTDIR} make -C /usr/src \ - WITH_GCC=1 WITH_GNUCXX=1 WITHOUT_CLANG_IS_CC=1 \ - XDEV=${XDEV} XDEV_ARCH=${XDEV_ARCH} \ + ${XDEV_FLAGS} XDEV=${XDEV} XDEV_ARCH=${XDEV_ARCH} \ ${WORLD_FLAGS} xdev # Run the ldconfig(8) startup script so /var/run/ld-elf*.so.hints From owner-svn-src-stable@FreeBSD.ORG Sat Apr 26 00:55:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F26D18BA; Sat, 26 Apr 2014 00:55:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE1411D31; Sat, 26 Apr 2014 00:55:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3Q0tbUF040792; Sat, 26 Apr 2014 00:55:37 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3Q0taEP040786; Sat, 26 Apr 2014 00:55:36 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404260055.s3Q0taEP040786@svn.freebsd.org> From: Glen Barber Date: Sat, 26 Apr 2014 00:55:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264960 - stable/9/release/arm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Apr 2014 00:55:38 -0000 Author: gjb Date: Sat Apr 26 00:55:36 2014 New Revision: 264960 URL: http://svnweb.freebsd.org/changeset/base/264960 Log: MFC r264794: Move xdev knobs from release/arm/release.sh and into an XDEV_FLAGS variable in ${KERNCONF}.conf file. Local changes: Fix XDEV_FLAGS for stable/9 branch, in particular, remove all *_CLANG* knobs, and move WITH_GCC=1 to XDEV_FLAGS. This is effectively a no-op on stable/9, and merged for tracking purpose only. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/arm/BEAGLEBONE.conf stable/9/release/arm/PANDABOARD.conf stable/9/release/arm/RPI-B.conf stable/9/release/arm/WANDBOARD-QUAD.conf stable/9/release/arm/ZEDBOARD.conf stable/9/release/arm/release.sh Directory Properties: stable/9/release/ (props changed) Modified: stable/9/release/arm/BEAGLEBONE.conf ============================================================================== --- stable/9/release/arm/BEAGLEBONE.conf Sat Apr 26 00:51:07 2014 (r264959) +++ stable/9/release/arm/BEAGLEBONE.conf Sat Apr 26 00:55:36 2014 (r264960) @@ -22,6 +22,7 @@ EMBEDDEDBUILD=1 EMBEDDEDPORTS="lang/python textproc/gsed" XDEV="arm" XDEV_ARCH="armv6" +XDEV_FLAGS="WITH_GCC=1" KERNEL="BEAGLEBONE" CROCHETSRC="https://github.com/kientzle/crochet-freebsd" CROCHETBRANCH="trunk" Modified: stable/9/release/arm/PANDABOARD.conf ============================================================================== --- stable/9/release/arm/PANDABOARD.conf Sat Apr 26 00:51:07 2014 (r264959) +++ stable/9/release/arm/PANDABOARD.conf Sat Apr 26 00:55:36 2014 (r264960) @@ -22,6 +22,7 @@ EMBEDDEDBUILD=1 EMBEDDEDPORTS="lang/python textproc/gsed" XDEV="arm" XDEV_ARCH="armv6" +XDEV_FLAGS="WITH_GCC=1" KERNEL="PANDABOARD" CROCHETSRC="https://github.com/kientzle/crochet-freebsd" CROCHETBRANCH="trunk" Modified: stable/9/release/arm/RPI-B.conf ============================================================================== --- stable/9/release/arm/RPI-B.conf Sat Apr 26 00:51:07 2014 (r264959) +++ stable/9/release/arm/RPI-B.conf Sat Apr 26 00:55:36 2014 (r264960) @@ -22,6 +22,7 @@ EMBEDDEDBUILD=1 EMBEDDEDPORTS="lang/python textproc/gsed" XDEV="arm" XDEV_ARCH="armv6" +XDEV_FLAGS="WITH_GCC=1" KERNEL="RPI-B" CROCHETSRC="https://github.com/kientzle/crochet-freebsd" CROCHETBRANCH="trunk" Modified: stable/9/release/arm/WANDBOARD-QUAD.conf ============================================================================== --- stable/9/release/arm/WANDBOARD-QUAD.conf Sat Apr 26 00:51:07 2014 (r264959) +++ stable/9/release/arm/WANDBOARD-QUAD.conf Sat Apr 26 00:55:36 2014 (r264960) @@ -22,6 +22,7 @@ EMBEDDEDBUILD=1 EMBEDDEDPORTS="lang/python textproc/gsed" XDEV="arm" XDEV_ARCH="armv6" +XDEV_FLAGS="WITH_GCC=1" KERNEL="WANDBOARD-QUAD" CROCHETSRC="https://github.com/kientzle/crochet-freebsd" CROCHETBRANCH="trunk" Modified: stable/9/release/arm/ZEDBOARD.conf ============================================================================== --- stable/9/release/arm/ZEDBOARD.conf Sat Apr 26 00:51:07 2014 (r264959) +++ stable/9/release/arm/ZEDBOARD.conf Sat Apr 26 00:55:36 2014 (r264960) @@ -21,6 +21,7 @@ CHROOTDIR="/scratch" EMBEDDEDBUILD=1 XDEV="arm" XDEV_ARCH="armv6" +XDEV_FLAGS="WITH_GCC=1" KERNEL="ZEDBOARD" CROCHETSRC="https://github.com/kientzle/crochet-freebsd" CROCHETBRANCH="trunk" Modified: stable/9/release/arm/release.sh ============================================================================== --- stable/9/release/arm/release.sh Sat Apr 26 00:51:07 2014 (r264959) +++ stable/9/release/arm/release.sh Sat Apr 26 00:55:36 2014 (r264960) @@ -99,7 +99,7 @@ main() { WITH_GCC=1 ${WORLD_FLAGS} -j1 obj depend all install # Build the 'xdev' target for crochet. eval chroot ${CHROOTDIR} make -C /usr/src \ - XDEV=${XDEV} XDEV_ARCH=${XDEV_ARCH} WITH_GCC=1 \ + ${XDEV_FLAGS} XDEV=${XDEV} XDEV_ARCH=${XDEV_ARCH} \ ${WORLD_FLAGS} xdev # Run the ldconfig(8) startup script so /var/run/ld-elf*.so.hints From owner-svn-src-stable@FreeBSD.ORG Sat Apr 26 01:00:29 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B417A10; Sat, 26 Apr 2014 01:00:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C3F81D48; Sat, 26 Apr 2014 01:00:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3Q10TnP041863; Sat, 26 Apr 2014 01:00:29 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3Q10SQM041860; Sat, 26 Apr 2014 01:00:28 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201404260100.s3Q10SQM041860@svn.freebsd.org> From: Marius Strobl Date: Sat, 26 Apr 2014 01:00:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264961 - stable/10/sys/dev/sound/pci/hda X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Apr 2014 01:00:29 -0000 Author: marius Date: Sat Apr 26 01:00:28 2014 New Revision: 264961 URL: http://svnweb.freebsd.org/changeset/base/264961 Log: MFC: r264832 - Sprinkle const and static as appropriate. - Convert the remainder of snd_hda(4) to take advantage of nitems(). - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. Modified: stable/10/sys/dev/sound/pci/hda/hdaa.c stable/10/sys/dev/sound/pci/hda/hdac.c stable/10/sys/dev/sound/pci/hda/hdacc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/pci/hda/hdaa.c ============================================================================== --- stable/10/sys/dev/sound/pci/hda/hdaa.c Sat Apr 26 00:55:36 2014 (r264960) +++ stable/10/sys/dev/sound/pci/hda/hdaa.c Sat Apr 26 01:00:28 2014 (r264961) @@ -53,7 +53,7 @@ SND_DECLARE_FILE("$FreeBSD$"); #define hdaa_lockowned(devinfo) mtx_owned((devinfo)->lock) static const struct { - char *key; + const char *key; uint32_t value; } hdaa_quirks_tab[] = { { "softpcmvol", HDAA_QUIRK_SOFTPCMVOL }, @@ -71,28 +71,26 @@ static const struct { { "ovref", HDAA_QUIRK_OVREF }, { "vref", HDAA_QUIRK_VREF }, }; -#define HDAA_QUIRKS_TAB_LEN \ - (sizeof(hdaa_quirks_tab) / sizeof(hdaa_quirks_tab[0])) #define HDA_PARSE_MAXDEPTH 10 MALLOC_DEFINE(M_HDAA, "hdaa", "HDA Audio"); -const char *HDA_COLORS[16] = {"Unknown", "Black", "Grey", "Blue", "Green", "Red", - "Orange", "Yellow", "Purple", "Pink", "Res.A", "Res.B", "Res.C", "Res.D", - "White", "Other"}; +static const char *HDA_COLORS[16] = {"Unknown", "Black", "Grey", "Blue", + "Green", "Red", "Orange", "Yellow", "Purple", "Pink", "Res.A", "Res.B", + "Res.C", "Res.D", "White", "Other"}; -const char *HDA_DEVS[16] = {"Line-out", "Speaker", "Headphones", "CD", +static const char *HDA_DEVS[16] = {"Line-out", "Speaker", "Headphones", "CD", "SPDIF-out", "Digital-out", "Modem-line", "Modem-handset", "Line-in", "AUX", "Mic", "Telephony", "SPDIF-in", "Digital-in", "Res.E", "Other"}; -const char *HDA_CONNS[4] = {"Jack", "None", "Fixed", "Both"}; +static const char *HDA_CONNS[4] = {"Jack", "None", "Fixed", "Both"}; -const char *HDA_CONNECTORS[16] = { +static const char *HDA_CONNECTORS[16] = { "Unknown", "1/8", "1/4", "ATAPI", "RCA", "Optical", "Digital", "Analog", "DIN", "XLR", "RJ-11", "Combo", "0xc", "0xd", "0xe", "Other" }; -const char *HDA_LOCS[64] = { +static const char *HDA_LOCS[64] = { "0x00", "Rear", "Front", "Left", "Right", "Top", "Bottom", "Rear-panel", "Drive-bay", "0x09", "0x0a", "0x0b", "0x0c", "0x0d", "0x0e", "0x0f", "Internal", "0x11", "0x12", "0x13", "0x14", "0x15", "0x16", "Riser", @@ -102,10 +100,10 @@ const char *HDA_LOCS[64] = { "Other", "0x31", "0x32", "0x33", "0x34", "0x35", "Other-Bott", "Lid-In", "Lid-Out", "0x39", "0x3a", "0x3b", "0x3c", "0x3d", "0x3e", "0x3f" }; -const char *HDA_GPIO_ACTIONS[8] = { +static const char *HDA_GPIO_ACTIONS[8] = { "keep", "set", "clear", "disable", "input", "0x05", "0x06", "0x07"}; -const char *HDA_HDMI_CODING_TYPES[18] = { +static const char *HDA_HDMI_CODING_TYPES[18] = { "undefined", "LPCM", "AC-3", "MPEG1", "MP3", "MPEG2", "AAC-LC", "DTS", "ATRAC", "DSD", "E-AC-3", "DTS-HD", "MLP", "DST", "WMAPro", "HE-AAC", "HE-AACv2", "MPEG-Surround" @@ -1113,7 +1111,7 @@ hdaa_dump_pin_sb(struct sbuf *sb, struct } static void -hdaa_dump_amp_sb(struct sbuf *sb, uint32_t cap, char *banner) +hdaa_dump_amp_sb(struct sbuf *sb, uint32_t cap, const char *banner) { int offset, size, step; @@ -1274,7 +1272,7 @@ hdaa_config_fetch(const char *str, uint3 inv = 2; else inv = 0; - for (k = 0; len > inv && k < HDAA_QUIRKS_TAB_LEN; k++) { + for (k = 0; len > inv && k < nitems(hdaa_quirks_tab); k++) { if (strncmp(str + i + inv, hdaa_quirks_tab[k].key, len - inv) != 0) continue; @@ -1302,7 +1300,7 @@ hdaa_sysctl_quirks(SYSCTL_HANDLER_ARGS) quirks = *(uint32_t *)oidp->oid_arg1; buf[0] = 0; - for (i = 0; i < HDAA_QUIRKS_TAB_LEN; i++) { + for (i = 0; i < nitems(hdaa_quirks_tab); i++) { if ((quirks & hdaa_quirks_tab[i].value) != 0) n += snprintf(buf + n, sizeof(buf) - n, "%s%s", n != 0 ? "," : "", hdaa_quirks_tab[i].key); @@ -1576,7 +1574,7 @@ hdaa_widget_parse(struct hdaa_widget *w) static void hdaa_widget_postprocess(struct hdaa_widget *w) { - char *typestr; + const char *typestr; w->type = HDA_PARAM_AUDIO_WIDGET_CAP_TYPE(w->param.widget_cap); switch (w->type) { @@ -5778,7 +5776,7 @@ hdaa_dump_pin_configs(struct hdaa_devinf } static void -hdaa_dump_amp(device_t dev, uint32_t cap, char *banner) +hdaa_dump_amp(device_t dev, uint32_t cap, const char *banner) { int offset, size, step; @@ -6209,7 +6207,7 @@ hdaa_configure(device_t dev) HDA_BOOTVERBOSE( if (devinfo->quirks != 0) { device_printf(dev, "FG config/quirks:"); - for (i = 0; i < HDAA_QUIRKS_TAB_LEN; i++) { + for (i = 0; i < nitems(hdaa_quirks_tab); i++) { if ((devinfo->quirks & hdaa_quirks_tab[i].value) == hdaa_quirks_tab[i].value) @@ -6834,7 +6832,7 @@ static device_method_t hdaa_methods[] = DEVMETHOD(hdac_stream_intr, hdaa_stream_intr), DEVMETHOD(hdac_unsol_intr, hdaa_unsol_intr), DEVMETHOD(hdac_pindump, hdaa_pindump), - { 0, 0 } + DEVMETHOD_END }; static driver_t hdaa_driver = { @@ -6845,7 +6843,7 @@ static driver_t hdaa_driver = { static devclass_t hdaa_devclass; -DRIVER_MODULE(snd_hda, hdacc, hdaa_driver, hdaa_devclass, 0, 0); +DRIVER_MODULE(snd_hda, hdacc, hdaa_driver, hdaa_devclass, NULL, NULL); static void hdaa_chan_formula(struct hdaa_devinfo *devinfo, int asid, @@ -7143,7 +7141,7 @@ static device_method_t hdaa_pcm_methods[ DEVMETHOD(device_probe, hdaa_pcm_probe), DEVMETHOD(device_attach, hdaa_pcm_attach), DEVMETHOD(device_detach, hdaa_pcm_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t hdaa_pcm_driver = { @@ -7152,6 +7150,6 @@ static driver_t hdaa_pcm_driver = { PCM_SOFTC_SIZE, }; -DRIVER_MODULE(snd_hda_pcm, hdaa, hdaa_pcm_driver, pcm_devclass, 0, 0); +DRIVER_MODULE(snd_hda_pcm, hdaa, hdaa_pcm_driver, pcm_devclass, NULL, NULL); MODULE_DEPEND(snd_hda, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER); MODULE_VERSION(snd_hda, 1); Modified: stable/10/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- stable/10/sys/dev/sound/pci/hda/hdac.c Sat Apr 26 00:55:36 2014 (r264960) +++ stable/10/sys/dev/sound/pci/hda/hdac.c Sat Apr 26 01:00:28 2014 (r264961) @@ -60,21 +60,19 @@ SND_DECLARE_FILE("$FreeBSD$"); #define HDAC_QUIRK_MSI (1 << 2) static const struct { - char *key; + const char *key; uint32_t value; } hdac_quirks_tab[] = { { "64bit", HDAC_QUIRK_DMAPOS }, { "dmapos", HDAC_QUIRK_DMAPOS }, { "msi", HDAC_QUIRK_MSI }, }; -#define HDAC_QUIRKS_TAB_LEN \ - (sizeof(hdac_quirks_tab) / sizeof(hdac_quirks_tab[0])) MALLOC_DEFINE(M_HDAC, "hdac", "HDA Controller"); static const struct { uint32_t model; - char *desc; + const char *desc; char quirks_on; char quirks_off; } hdac_devices[] = { @@ -170,7 +168,6 @@ static const struct { { HDA_SIS_ALL, "SiS", 0, 0 }, { HDA_ULI_ALL, "ULI", 0, 0 }, }; -#define HDAC_DEVICES_LEN (sizeof(hdac_devices) / sizeof(hdac_devices[0])) static const struct { uint16_t vendor; @@ -182,8 +179,6 @@ static const struct { { ATI_VENDORID, 0x42, 0xf8, 0x02 }, { NVIDIA_VENDORID, 0x4e, 0xf0, 0x0f }, }; -#define HDAC_PCIESNOOP_LEN \ - (sizeof(hdac_pcie_snoop) / sizeof(hdac_pcie_snoop[0])) /**************************************************************************** * Function prototypes @@ -254,7 +249,7 @@ hdac_config_fetch(struct hdac_softc *sc, inv = 2; else inv = 0; - for (k = 0; len > inv && k < HDAC_QUIRKS_TAB_LEN; k++) { + for (k = 0; len > inv && k < nitems(hdac_quirks_tab); k++) { if (strncmp(res + i + inv, hdac_quirks_tab[k].key, len - inv) != 0) continue; @@ -1024,7 +1019,7 @@ hdac_probe(device_t dev) bzero(desc, sizeof(desc)); result = ENXIO; - for (i = 0; i < HDAC_DEVICES_LEN; i++) { + for (i = 0; i < nitems(hdac_devices); i++) { if (hdac_devices[i].model == model) { strlcpy(desc, hdac_devices[i].desc, sizeof(desc)); result = BUS_PROBE_DEFAULT; @@ -1096,7 +1091,7 @@ hdac_attach(device_t dev) class = pci_get_class(dev); subclass = pci_get_subclass(dev); - for (i = 0; i < HDAC_DEVICES_LEN; i++) { + for (i = 0; i < nitems(hdac_devices); i++) { if (hdac_devices[i].model == model) { devid = i; break; @@ -1175,7 +1170,7 @@ hdac_attach(device_t dev) * * http://msdn2.microsoft.com/en-us/library/ms790324.aspx */ - for (i = 0; i < HDAC_PCIESNOOP_LEN; i++) { + for (i = 0; i < nitems(hdac_pcie_snoop); i++) { if (hdac_pcie_snoop[i].vendor != vendor) continue; sc->flags &= ~HDAC_F_DMA_NOCACHE; @@ -2078,7 +2073,7 @@ static device_method_t hdac_methods[] = DEVMETHOD(hdac_stream_getptr, hdac_stream_getptr), DEVMETHOD(hdac_unsol_alloc, hdac_unsol_alloc), DEVMETHOD(hdac_unsol_free, hdac_unsol_free), - { 0, 0 } + DEVMETHOD_END }; static driver_t hdac_driver = { @@ -2089,4 +2084,4 @@ static driver_t hdac_driver = { static devclass_t hdac_devclass; -DRIVER_MODULE(snd_hda, pci, hdac_driver, hdac_devclass, 0, 0); +DRIVER_MODULE(snd_hda, pci, hdac_driver, hdac_devclass, NULL, NULL); Modified: stable/10/sys/dev/sound/pci/hda/hdacc.c ============================================================================== --- stable/10/sys/dev/sound/pci/hda/hdacc.c Sat Apr 26 00:55:36 2014 (r264960) +++ stable/10/sys/dev/sound/pci/hda/hdacc.c Sat Apr 26 01:00:28 2014 (r264961) @@ -71,7 +71,7 @@ MALLOC_DEFINE(M_HDACC, "hdacc", "HDA COD static const struct { uint32_t id; uint16_t revid; - char *name; + const char *name; } hdacc_codecs[] = { { HDA_CODEC_CS4206, 0, "Cirrus Logic CS4206" }, { HDA_CODEC_CS4207, 0, "Cirrus Logic CS4207" }, @@ -341,7 +341,6 @@ static const struct { { HDA_CODEC_STACXXXX, 0, "Sigmatel" }, { HDA_CODEC_VTXXXX, 0, "VIA" }, }; -#define HDACC_CODECS_LEN (sizeof(hdacc_codecs) / sizeof(hdacc_codecs[0])) static int hdacc_suspend(device_t dev) @@ -381,7 +380,7 @@ hdacc_probe(device_t dev) id = ((uint32_t)hda_get_vendor_id(dev) << 16) + hda_get_device_id(dev); revid = ((uint32_t)hda_get_revision_id(dev) << 8) + hda_get_stepping_id(dev); - for (i = 0; i < HDACC_CODECS_LEN; i++) { + for (i = 0; i < nitems(hdacc_codecs); i++) { if (!HDA_DEV_MATCH(hdacc_codecs[i].id, id)) continue; if (hdacc_codecs[i].revid != 0 && @@ -389,7 +388,7 @@ hdacc_probe(device_t dev) continue; break; } - if (i < HDACC_CODECS_LEN) { + if (i < nitems(hdacc_codecs)) { if ((hdacc_codecs[i].id & 0xffff) != 0xffff) strlcpy(buf, hdacc_codecs[i].name, sizeof(buf)); else @@ -713,7 +712,7 @@ static device_method_t hdacc_methods[] = DEVMETHOD(hdac_unsol_free, hdacc_unsol_free), DEVMETHOD(hdac_unsol_intr, hdacc_unsol_intr), DEVMETHOD(hdac_pindump, hdacc_pindump), - { 0, 0 } + DEVMETHOD_END }; static driver_t hdacc_driver = { @@ -724,4 +723,4 @@ static driver_t hdacc_driver = { static devclass_t hdacc_devclass; -DRIVER_MODULE(snd_hda, hdac, hdacc_driver, hdacc_devclass, 0, 0); +DRIVER_MODULE(snd_hda, hdac, hdacc_driver, hdacc_devclass, NULL, NULL); From owner-svn-src-stable@FreeBSD.ORG Sat Apr 26 01:00:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74916B3C; Sat, 26 Apr 2014 01:00:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 558181D49; Sat, 26 Apr 2014 01:00:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3Q10ciM042508; Sat, 26 Apr 2014 01:00:38 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3Q10bL8042394; Sat, 26 Apr 2014 01:00:37 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201404260100.s3Q10bL8042394@svn.freebsd.org> From: Marius Strobl Date: Sat, 26 Apr 2014 01:00:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264962 - stable/9/sys/dev/sound/pci/hda X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Apr 2014 01:00:38 -0000 Author: marius Date: Sat Apr 26 01:00:37 2014 New Revision: 264962 URL: http://svnweb.freebsd.org/changeset/base/264962 Log: MFC: r264832 (partial) - Sprinkle const and static as appropriate. - Convert the remainder of snd_hda(4) to take advantage of nitems(). - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. Modified: stable/9/sys/dev/sound/pci/hda/hdaa.c stable/9/sys/dev/sound/pci/hda/hdac.c stable/9/sys/dev/sound/pci/hda/hdacc.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/pci/hda/hdaa.c ============================================================================== --- stable/9/sys/dev/sound/pci/hda/hdaa.c Sat Apr 26 01:00:28 2014 (r264961) +++ stable/9/sys/dev/sound/pci/hda/hdaa.c Sat Apr 26 01:00:37 2014 (r264962) @@ -53,7 +53,7 @@ SND_DECLARE_FILE("$FreeBSD$"); #define hdaa_lockowned(devinfo) mtx_owned((devinfo)->lock) static const struct { - char *key; + const char *key; uint32_t value; } hdaa_quirks_tab[] = { { "softpcmvol", HDAA_QUIRK_SOFTPCMVOL }, @@ -71,28 +71,26 @@ static const struct { { "ovref", HDAA_QUIRK_OVREF }, { "vref", HDAA_QUIRK_VREF }, }; -#define HDAA_QUIRKS_TAB_LEN \ - (sizeof(hdaa_quirks_tab) / sizeof(hdaa_quirks_tab[0])) #define HDA_PARSE_MAXDEPTH 10 MALLOC_DEFINE(M_HDAA, "hdaa", "HDA Audio"); -const char *HDA_COLORS[16] = {"Unknown", "Black", "Grey", "Blue", "Green", "Red", - "Orange", "Yellow", "Purple", "Pink", "Res.A", "Res.B", "Res.C", "Res.D", - "White", "Other"}; +static const char *HDA_COLORS[16] = {"Unknown", "Black", "Grey", "Blue", + "Green", "Red", "Orange", "Yellow", "Purple", "Pink", "Res.A", "Res.B", + "Res.C", "Res.D", "White", "Other"}; -const char *HDA_DEVS[16] = {"Line-out", "Speaker", "Headphones", "CD", +static const char *HDA_DEVS[16] = {"Line-out", "Speaker", "Headphones", "CD", "SPDIF-out", "Digital-out", "Modem-line", "Modem-handset", "Line-in", "AUX", "Mic", "Telephony", "SPDIF-in", "Digital-in", "Res.E", "Other"}; -const char *HDA_CONNS[4] = {"Jack", "None", "Fixed", "Both"}; +static const char *HDA_CONNS[4] = {"Jack", "None", "Fixed", "Both"}; -const char *HDA_CONNECTORS[16] = { +static const char *HDA_CONNECTORS[16] = { "Unknown", "1/8", "1/4", "ATAPI", "RCA", "Optical", "Digital", "Analog", "DIN", "XLR", "RJ-11", "Combo", "0xc", "0xd", "0xe", "Other" }; -const char *HDA_LOCS[64] = { +static const char *HDA_LOCS[64] = { "0x00", "Rear", "Front", "Left", "Right", "Top", "Bottom", "Rear-panel", "Drive-bay", "0x09", "0x0a", "0x0b", "0x0c", "0x0d", "0x0e", "0x0f", "Internal", "0x11", "0x12", "0x13", "0x14", "0x15", "0x16", "Riser", @@ -102,10 +100,10 @@ const char *HDA_LOCS[64] = { "Other", "0x31", "0x32", "0x33", "0x34", "0x35", "Other-Bott", "Lid-In", "Lid-Out", "0x39", "0x3a", "0x3b", "0x3c", "0x3d", "0x3e", "0x3f" }; -const char *HDA_GPIO_ACTIONS[8] = { +static const char *HDA_GPIO_ACTIONS[8] = { "keep", "set", "clear", "disable", "input", "0x05", "0x06", "0x07"}; -const char *HDA_HDMI_CODING_TYPES[18] = { +static const char *HDA_HDMI_CODING_TYPES[18] = { "undefined", "LPCM", "AC-3", "MPEG1", "MP3", "MPEG2", "AAC-LC", "DTS", "ATRAC", "DSD", "E-AC-3", "DTS-HD", "MLP", "DST", "WMAPro", "HE-AAC", "HE-AACv2", "MPEG-Surround" @@ -889,7 +887,7 @@ hdaa_config_fetch(const char *str, uint3 inv = 2; else inv = 0; - for (k = 0; len > inv && k < HDAA_QUIRKS_TAB_LEN; k++) { + for (k = 0; len > inv && k < nitems(hdaa_quirks_tab); k++) { if (strncmp(str + i + inv, hdaa_quirks_tab[k].key, len - inv) != 0) continue; @@ -917,7 +915,7 @@ hdaa_sysctl_quirks(SYSCTL_HANDLER_ARGS) quirks = *(uint32_t *)oidp->oid_arg1; buf[0] = 0; - for (i = 0; i < HDAA_QUIRKS_TAB_LEN; i++) { + for (i = 0; i < nitems(hdaa_quirks_tab); i++) { if ((quirks & hdaa_quirks_tab[i].value) != 0) n += snprintf(buf + n, sizeof(buf) - n, "%s%s", n != 0 ? "," : "", hdaa_quirks_tab[i].key); @@ -1184,7 +1182,7 @@ hdaa_widget_parse(struct hdaa_widget *w) static void hdaa_widget_postprocess(struct hdaa_widget *w) { - char *typestr; + const char *typestr; w->type = HDA_PARAM_AUDIO_WIDGET_CAP_TYPE(w->param.widget_cap); switch (w->type) { @@ -5387,7 +5385,7 @@ hdaa_dump_pin_configs(struct hdaa_devinf } static void -hdaa_dump_amp(device_t dev, uint32_t cap, char *banner) +hdaa_dump_amp(device_t dev, uint32_t cap, const char *banner) { device_printf(dev, " %s amp: 0x%08x\n", banner, cap); device_printf(dev, " " @@ -5842,7 +5840,7 @@ hdaa_configure(device_t dev) HDA_BOOTVERBOSE( if (devinfo->quirks != 0) { device_printf(dev, "FG config/quirks:"); - for (i = 0; i < HDAA_QUIRKS_TAB_LEN; i++) { + for (i = 0; i < nitems(hdaa_quirks_tab); i++) { if ((devinfo->quirks & hdaa_quirks_tab[i].value) == hdaa_quirks_tab[i].value) @@ -6470,7 +6468,7 @@ static device_method_t hdaa_methods[] = DEVMETHOD(hdac_stream_intr, hdaa_stream_intr), DEVMETHOD(hdac_unsol_intr, hdaa_unsol_intr), DEVMETHOD(hdac_pindump, hdaa_pindump), - { 0, 0 } + DEVMETHOD_END }; static driver_t hdaa_driver = { @@ -6481,7 +6479,7 @@ static driver_t hdaa_driver = { static devclass_t hdaa_devclass; -DRIVER_MODULE(snd_hda, hdacc, hdaa_driver, hdaa_devclass, 0, 0); +DRIVER_MODULE(snd_hda, hdacc, hdaa_driver, hdaa_devclass, NULL, NULL); static void hdaa_chan_formula(struct hdaa_devinfo *devinfo, int asid, @@ -6787,7 +6785,7 @@ static device_method_t hdaa_pcm_methods[ DEVMETHOD(device_probe, hdaa_pcm_probe), DEVMETHOD(device_attach, hdaa_pcm_attach), DEVMETHOD(device_detach, hdaa_pcm_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t hdaa_pcm_driver = { @@ -6796,6 +6794,6 @@ static driver_t hdaa_pcm_driver = { PCM_SOFTC_SIZE, }; -DRIVER_MODULE(snd_hda_pcm, hdaa, hdaa_pcm_driver, pcm_devclass, 0, 0); +DRIVER_MODULE(snd_hda_pcm, hdaa, hdaa_pcm_driver, pcm_devclass, NULL, NULL); MODULE_DEPEND(snd_hda, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER); MODULE_VERSION(snd_hda, 1); Modified: stable/9/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- stable/9/sys/dev/sound/pci/hda/hdac.c Sat Apr 26 01:00:28 2014 (r264961) +++ stable/9/sys/dev/sound/pci/hda/hdac.c Sat Apr 26 01:00:37 2014 (r264962) @@ -60,21 +60,19 @@ SND_DECLARE_FILE("$FreeBSD$"); #define HDAC_QUIRK_MSI (1 << 2) static const struct { - char *key; + const char *key; uint32_t value; } hdac_quirks_tab[] = { { "64bit", HDAC_QUIRK_DMAPOS }, { "dmapos", HDAC_QUIRK_DMAPOS }, { "msi", HDAC_QUIRK_MSI }, }; -#define HDAC_QUIRKS_TAB_LEN \ - (sizeof(hdac_quirks_tab) / sizeof(hdac_quirks_tab[0])) MALLOC_DEFINE(M_HDAC, "hdac", "HDA Controller"); static const struct { uint32_t model; - char *desc; + const char *desc; char quirks_on; char quirks_off; } hdac_devices[] = { @@ -161,7 +159,6 @@ static const struct { { HDA_SIS_ALL, "SiS", 0, 0 }, { HDA_ULI_ALL, "ULI", 0, 0 }, }; -#define HDAC_DEVICES_LEN (sizeof(hdac_devices) / sizeof(hdac_devices[0])) static const struct { uint16_t vendor; @@ -173,8 +170,6 @@ static const struct { { ATI_VENDORID, 0x42, 0xf8, 0x02 }, { NVIDIA_VENDORID, 0x4e, 0xf0, 0x0f }, }; -#define HDAC_PCIESNOOP_LEN \ - (sizeof(hdac_pcie_snoop) / sizeof(hdac_pcie_snoop[0])) /**************************************************************************** * Function prototypes @@ -245,7 +240,7 @@ hdac_config_fetch(struct hdac_softc *sc, inv = 2; else inv = 0; - for (k = 0; len > inv && k < HDAC_QUIRKS_TAB_LEN; k++) { + for (k = 0; len > inv && k < nitems(hdac_quirks_tab); k++) { if (strncmp(res + i + inv, hdac_quirks_tab[k].key, len - inv) != 0) continue; @@ -1015,7 +1010,7 @@ hdac_probe(device_t dev) bzero(desc, sizeof(desc)); result = ENXIO; - for (i = 0; i < HDAC_DEVICES_LEN; i++) { + for (i = 0; i < nitems(hdac_devices); i++) { if (hdac_devices[i].model == model) { strlcpy(desc, hdac_devices[i].desc, sizeof(desc)); result = BUS_PROBE_DEFAULT; @@ -1087,7 +1082,7 @@ hdac_attach(device_t dev) class = pci_get_class(dev); subclass = pci_get_subclass(dev); - for (i = 0; i < HDAC_DEVICES_LEN; i++) { + for (i = 0; i < nitems(hdac_devices); i++) { if (hdac_devices[i].model == model) { devid = i; break; @@ -1166,7 +1161,7 @@ hdac_attach(device_t dev) * * http://msdn2.microsoft.com/en-us/library/ms790324.aspx */ - for (i = 0; i < HDAC_PCIESNOOP_LEN; i++) { + for (i = 0; i < nitems(hdac_pcie_snoop); i++) { if (hdac_pcie_snoop[i].vendor != vendor) continue; sc->flags &= ~HDAC_F_DMA_NOCACHE; @@ -2069,7 +2064,7 @@ static device_method_t hdac_methods[] = DEVMETHOD(hdac_stream_getptr, hdac_stream_getptr), DEVMETHOD(hdac_unsol_alloc, hdac_unsol_alloc), DEVMETHOD(hdac_unsol_free, hdac_unsol_free), - { 0, 0 } + DEVMETHOD_END }; static driver_t hdac_driver = { @@ -2080,4 +2075,4 @@ static driver_t hdac_driver = { static devclass_t hdac_devclass; -DRIVER_MODULE(snd_hda, pci, hdac_driver, hdac_devclass, 0, 0); +DRIVER_MODULE(snd_hda, pci, hdac_driver, hdac_devclass, NULL, NULL); Modified: stable/9/sys/dev/sound/pci/hda/hdacc.c ============================================================================== --- stable/9/sys/dev/sound/pci/hda/hdacc.c Sat Apr 26 01:00:28 2014 (r264961) +++ stable/9/sys/dev/sound/pci/hda/hdacc.c Sat Apr 26 01:00:37 2014 (r264962) @@ -71,7 +71,7 @@ MALLOC_DEFINE(M_HDACC, "hdacc", "HDA COD static const struct { uint32_t id; uint16_t revid; - char *name; + const char *name; } hdacc_codecs[] = { { HDA_CODEC_CS4206, 0, "Cirrus Logic CS4206" }, { HDA_CODEC_CS4207, 0, "Cirrus Logic CS4207" }, @@ -340,7 +340,6 @@ static const struct { { HDA_CODEC_STACXXXX, 0, "Sigmatel" }, { HDA_CODEC_VTXXXX, 0, "VIA" }, }; -#define HDACC_CODECS_LEN (sizeof(hdacc_codecs) / sizeof(hdacc_codecs[0])) static int hdacc_suspend(device_t dev) @@ -380,7 +379,7 @@ hdacc_probe(device_t dev) id = ((uint32_t)hda_get_vendor_id(dev) << 16) + hda_get_device_id(dev); revid = ((uint32_t)hda_get_revision_id(dev) << 8) + hda_get_stepping_id(dev); - for (i = 0; i < HDACC_CODECS_LEN; i++) { + for (i = 0; i < nitems(hdacc_codecs); i++) { if (!HDA_DEV_MATCH(hdacc_codecs[i].id, id)) continue; if (hdacc_codecs[i].revid != 0 && @@ -388,7 +387,7 @@ hdacc_probe(device_t dev) continue; break; } - if (i < HDACC_CODECS_LEN) { + if (i < nitems(hdacc_codecs)) { if ((hdacc_codecs[i].id & 0xffff) != 0xffff) strlcpy(buf, hdacc_codecs[i].name, sizeof(buf)); else @@ -712,7 +711,7 @@ static device_method_t hdacc_methods[] = DEVMETHOD(hdac_unsol_free, hdacc_unsol_free), DEVMETHOD(hdac_unsol_intr, hdacc_unsol_intr), DEVMETHOD(hdac_pindump, hdacc_pindump), - { 0, 0 } + DEVMETHOD_END }; static driver_t hdacc_driver = { @@ -723,4 +722,4 @@ static driver_t hdacc_driver = { static devclass_t hdacc_devclass; -DRIVER_MODULE(snd_hda, hdac, hdacc_driver, hdacc_devclass, 0, 0); +DRIVER_MODULE(snd_hda, hdac, hdacc_driver, hdacc_devclass, NULL, NULL); From owner-svn-src-stable@FreeBSD.ORG Sun Apr 27 01:15:16 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5198EE06; Sun, 27 Apr 2014 01:15:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3824B18F0; Sun, 27 Apr 2014 01:15:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3R1FG5P051672; Sun, 27 Apr 2014 01:15:16 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3R1FASk051640; Sun, 27 Apr 2014 01:15:10 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201404270115.s3R1FASk051640@svn.freebsd.org> From: Julio Merino Date: Sun, 27 Apr 2014 01:15:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264996 - in stable/10: . bin/pkill bin/pkill/tests etc/mtree sbin sbin/dhclient sbin/dhclient/tests sbin/growfs sbin/growfs/tests sbin/mdconfig sbin/mdconfig/tests sbin/tests tools/bui... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Apr 2014 01:15:16 -0000 Author: jmmv Date: Sun Apr 27 01:15:10 2014 New Revision: 264996 URL: http://svnweb.freebsd.org/changeset/base/264996 Log: MFC various moves of tools/regressions/ tests to the new infrastructure. - r263220 Migrate tools/regression/sbin/ to the new tests layout. - r263222 Add Makefile missed in r263220. - r263226 Migrate tools/regression/{usr.bin/lastcomm,usr.sbin}/ to the new tests layout. - r263227 Migrate most of tools/regression/usr.bin/ to the new tests layout. - r263345 Expand tabs that sneaked in into spaces. - r263346 Migrate tools/regression/usr.bin/make/ to the new tests layout. - r263348 Add Makefiles missed in r263346. - r263351 Migrate tools/regression/usr.bin/pkill/ to the new tests layout. - r263388 Mark multi_test as requiring /usr/share/dict/words. - r263814 Fix path to the run.pl script to let these tests run. - r264742 Prevent building tests when bootstrapping make. This is 'make tinderbox' clean. Added: stable/10/bin/pkill/tests/ - copied from r263351, head/bin/pkill/tests/ stable/10/sbin/dhclient/tests/ - copied from r263220, head/sbin/dhclient/tests/ stable/10/sbin/growfs/tests/ - copied from r263220, head/sbin/growfs/tests/ stable/10/sbin/mdconfig/tests/ - copied from r263220, head/sbin/mdconfig/tests/ stable/10/sbin/mdconfig/tests/Makefile - copied unchanged from r263222, head/sbin/mdconfig/tests/Makefile stable/10/sbin/tests/ - copied from r263220, head/sbin/tests/ stable/10/usr.bin/apply/tests/ - copied from r263227, head/usr.bin/apply/tests/ stable/10/usr.bin/calendar/tests/ - copied from r263227, head/usr.bin/calendar/tests/ stable/10/usr.bin/comm/tests/ - copied from r263227, head/usr.bin/comm/tests/ stable/10/usr.bin/file2c/tests/ - copied from r263227, head/usr.bin/file2c/tests/ stable/10/usr.bin/join/tests/ - copied from r263227, head/usr.bin/join/tests/ stable/10/usr.bin/jot/tests/ - copied from r263227, head/usr.bin/jot/tests/ stable/10/usr.bin/lastcomm/tests/ - copied from r263226, head/usr.bin/lastcomm/tests/ stable/10/usr.bin/m4/tests/ - copied from r263227, head/usr.bin/m4/tests/ stable/10/usr.bin/make/tests/ - copied from r263346, head/usr.bin/make/tests/ stable/10/usr.bin/make/tests/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/Makefile stable/10/usr.bin/make/tests/archives/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/archives/Makefile stable/10/usr.bin/make/tests/archives/fmt_44bsd/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/archives/fmt_44bsd/Makefile stable/10/usr.bin/make/tests/archives/fmt_44bsd_mod/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/archives/fmt_44bsd_mod/Makefile stable/10/usr.bin/make/tests/archives/fmt_oldbsd/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/archives/fmt_oldbsd/Makefile stable/10/usr.bin/make/tests/basic/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/basic/Makefile stable/10/usr.bin/make/tests/basic/t0/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/basic/t0/Makefile stable/10/usr.bin/make/tests/basic/t1/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/basic/t1/Makefile stable/10/usr.bin/make/tests/basic/t2/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/basic/t2/Makefile stable/10/usr.bin/make/tests/basic/t3/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/basic/t3/Makefile stable/10/usr.bin/make/tests/execution/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/execution/Makefile stable/10/usr.bin/make/tests/execution/ellipsis/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/execution/ellipsis/Makefile stable/10/usr.bin/make/tests/execution/empty/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/execution/empty/Makefile stable/10/usr.bin/make/tests/execution/joberr/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/execution/joberr/Makefile stable/10/usr.bin/make/tests/execution/plus/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/execution/plus/Makefile stable/10/usr.bin/make/tests/shell/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/shell/Makefile stable/10/usr.bin/make/tests/shell/builtin/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/shell/builtin/Makefile stable/10/usr.bin/make/tests/shell/meta/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/shell/meta/Makefile stable/10/usr.bin/make/tests/shell/path/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/shell/path/Makefile stable/10/usr.bin/make/tests/shell/path_select/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/shell/path_select/Makefile stable/10/usr.bin/make/tests/shell/replace/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/shell/replace/Makefile stable/10/usr.bin/make/tests/shell/select/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/shell/select/Makefile stable/10/usr.bin/make/tests/suffixes/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/suffixes/Makefile stable/10/usr.bin/make/tests/suffixes/basic/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/suffixes/basic/Makefile stable/10/usr.bin/make/tests/suffixes/src_wild1/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/suffixes/src_wild1/Makefile stable/10/usr.bin/make/tests/suffixes/src_wild2/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/suffixes/src_wild2/Makefile stable/10/usr.bin/make/tests/syntax/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/syntax/Makefile stable/10/usr.bin/make/tests/syntax/directive-t0/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/syntax/directive-t0/Makefile stable/10/usr.bin/make/tests/syntax/enl/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/syntax/enl/Makefile stable/10/usr.bin/make/tests/syntax/funny-targets/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/syntax/funny-targets/Makefile stable/10/usr.bin/make/tests/syntax/semi/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/syntax/semi/Makefile stable/10/usr.bin/make/tests/sysmk/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/sysmk/Makefile stable/10/usr.bin/make/tests/sysmk/t0/2/1/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/sysmk/t0/2/1/Makefile stable/10/usr.bin/make/tests/sysmk/t0/2/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/sysmk/t0/2/Makefile stable/10/usr.bin/make/tests/sysmk/t0/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/sysmk/t0/Makefile stable/10/usr.bin/make/tests/sysmk/t0/mk/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/sysmk/t0/mk/Makefile stable/10/usr.bin/make/tests/sysmk/t1/2/1/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/sysmk/t1/2/1/Makefile stable/10/usr.bin/make/tests/sysmk/t1/2/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/sysmk/t1/2/Makefile stable/10/usr.bin/make/tests/sysmk/t1/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/sysmk/t1/Makefile stable/10/usr.bin/make/tests/sysmk/t1/mk/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/sysmk/t1/mk/Makefile stable/10/usr.bin/make/tests/sysmk/t2/2/1/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/sysmk/t2/2/1/Makefile stable/10/usr.bin/make/tests/sysmk/t2/2/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/sysmk/t2/2/Makefile stable/10/usr.bin/make/tests/sysmk/t2/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/sysmk/t2/Makefile stable/10/usr.bin/make/tests/sysmk/t2/mk/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/sysmk/t2/mk/Makefile stable/10/usr.bin/make/tests/variables/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/variables/Makefile stable/10/usr.bin/make/tests/variables/modifier_M/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/variables/modifier_M/Makefile stable/10/usr.bin/make/tests/variables/modifier_t/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/variables/modifier_t/Makefile stable/10/usr.bin/make/tests/variables/opt_V/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/variables/opt_V/Makefile stable/10/usr.bin/make/tests/variables/t0/Makefile - copied unchanged from r263348, head/usr.bin/make/tests/variables/t0/Makefile stable/10/usr.bin/ncal/tests/ - copied from r263227, head/usr.bin/ncal/tests/ stable/10/usr.bin/printf/tests/ - copied from r263227, head/usr.bin/printf/tests/ stable/10/usr.bin/sed/tests/ - copied from r263227, head/usr.bin/sed/tests/ stable/10/usr.bin/tests/regress.m4 - copied unchanged from r263227, head/usr.bin/tests/regress.m4 stable/10/usr.bin/tr/tests/ - copied from r263227, head/usr.bin/tr/tests/ stable/10/usr.bin/uudecode/tests/ - copied from r263227, head/usr.bin/uudecode/tests/ stable/10/usr.bin/uuencode/tests/ - copied from r263227, head/usr.bin/uuencode/tests/ stable/10/usr.bin/xargs/tests/ - copied from r263227, head/usr.bin/xargs/tests/ stable/10/usr.bin/yacc/tests/ - copied from r263227, head/usr.bin/yacc/tests/ stable/10/usr.sbin/etcupdate/tests/ - copied from r263226, head/usr.sbin/etcupdate/tests/ stable/10/usr.sbin/newsyslog/tests/ - copied from r263226, head/usr.sbin/newsyslog/tests/ stable/10/usr.sbin/sa/tests/ - copied from r263226, head/usr.sbin/sa/tests/ stable/10/usr.sbin/tests/ - copied from r263226, head/usr.sbin/tests/ Deleted: stable/10/tools/regression/sbin/ stable/10/tools/regression/usr.bin/Makefile stable/10/tools/regression/usr.bin/apply/ stable/10/tools/regression/usr.bin/calendar/ stable/10/tools/regression/usr.bin/comm/ stable/10/tools/regression/usr.bin/file2c/ stable/10/tools/regression/usr.bin/join/ stable/10/tools/regression/usr.bin/jot/ stable/10/tools/regression/usr.bin/lastcomm/ stable/10/tools/regression/usr.bin/m4/ stable/10/tools/regression/usr.bin/make/ stable/10/tools/regression/usr.bin/ncal/ stable/10/tools/regression/usr.bin/pkill/ stable/10/tools/regression/usr.bin/printf/ stable/10/tools/regression/usr.bin/regress.m4 stable/10/tools/regression/usr.bin/sed/ stable/10/tools/regression/usr.bin/tr/ stable/10/tools/regression/usr.bin/uudecode/ stable/10/tools/regression/usr.bin/uuencode/ stable/10/tools/regression/usr.bin/xargs/ stable/10/tools/regression/usr.bin/yacc/ stable/10/tools/regression/usr.sbin/ Modified: stable/10/Makefile stable/10/bin/pkill/Makefile stable/10/etc/mtree/BSD.tests.dist stable/10/sbin/Makefile stable/10/sbin/dhclient/Makefile stable/10/sbin/growfs/Makefile stable/10/sbin/mdconfig/Makefile stable/10/sbin/mdconfig/tests/legacy_test.sh stable/10/tools/build/mk/OptionalObsoleteFiles.inc stable/10/usr.bin/apply/Makefile stable/10/usr.bin/calendar/Makefile stable/10/usr.bin/comm/Makefile stable/10/usr.bin/file2c/Makefile stable/10/usr.bin/join/Makefile stable/10/usr.bin/jot/Makefile stable/10/usr.bin/lastcomm/Makefile stable/10/usr.bin/m4/Makefile stable/10/usr.bin/make/Makefile stable/10/usr.bin/ncal/Makefile stable/10/usr.bin/printf/Makefile stable/10/usr.bin/sed/Makefile stable/10/usr.bin/sed/tests/Makefile stable/10/usr.bin/tests/Makefile stable/10/usr.bin/tr/Makefile stable/10/usr.bin/uudecode/Makefile stable/10/usr.bin/uuencode/Makefile stable/10/usr.bin/xargs/Makefile stable/10/usr.bin/yacc/Makefile stable/10/usr.sbin/Makefile stable/10/usr.sbin/etcupdate/Makefile stable/10/usr.sbin/newsyslog/Makefile stable/10/usr.sbin/sa/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile ============================================================================== --- stable/10/Makefile Sun Apr 27 01:06:02 2014 (r264995) +++ stable/10/Makefile Sun Apr 27 01:15:10 2014 (r264996) @@ -345,7 +345,8 @@ MMAKEENV= MAKEOBJDIRPREFIX=${MYMAKE:H} \ MMAKE= ${MMAKEENV} ${MAKE} \ -D_UPGRADING \ -DNOMAN -DNO_MAN -DNOSHARED -DNO_SHARED \ - -DNO_CPU_CFLAGS -DNO_WERROR DESTDIR= PROGNAME=${MYMAKE:T} + -DNO_CPU_CFLAGS -DNO_WERROR \ + DESTDIR= MK_TESTS=no PROGNAME=${MYMAKE:T} make bmake: .PHONY @echo Modified: stable/10/bin/pkill/Makefile ============================================================================== --- stable/10/bin/pkill/Makefile Sun Apr 27 01:06:02 2014 (r264995) +++ stable/10/bin/pkill/Makefile Sun Apr 27 01:15:10 2014 (r264996) @@ -1,6 +1,8 @@ # $NetBSD: Makefile,v 1.1 2002/03/01 11:21:58 ad Exp $ # $FreeBSD$ +.include + PROG= pkill DPADD= ${LIBKVM} @@ -17,4 +19,8 @@ MLINKS= pkill.1 pgrep.1 SYMLINKS= ${BINDIR}/pkill /usr/bin/pkill SYMLINKS+= ${BINDIR}/pgrep /usr/bin/pgrep +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Sun Apr 27 01:06:02 2014 (r264995) +++ stable/10/etc/mtree/BSD.tests.dist Sun Apr 27 01:15:10 2014 (r264996) @@ -29,6 +29,8 @@ .. pax .. + pkill + .. sh builtins .. @@ -70,6 +72,14 @@ .. .. .. + sbin + dhclient + .. + growfs + .. + mdconfig + .. + .. share examples tests @@ -85,10 +95,150 @@ .. .. usr.bin + apply + .. atf atf-sh .. .. + calendar + .. + comm + .. + file2c + .. + join + .. + jot + .. + lastcomm + .. + m4 + .. + make + archives + fmt_44bsd + .. + fmt_44bsd_mod + .. + fmt_oldbsd + .. + .. + basic + t0 + .. + t1 + .. + t2 + .. + t3 + .. + .. + execution + ellipsis + .. + empty + .. + joberr + .. + plus + .. + .. + shell + builtin + .. + meta + .. + path + .. + path_select + .. + replace + .. + select + .. + .. + suffixes + basic + .. + src_wild1 + .. + src_wild2 + .. + .. + syntax + directive-t0 + .. + enl + .. + funny-targets + .. + semi + .. + .. + sysmk + t0 + 2 + 1 + .. + .. + mk + .. + .. + t1 + 2 + 1 + .. + .. + mk + .. + .. + t2 + 2 + 1 + .. + .. + mk + .. + .. + .. + variables + modifier_M + .. + modifier_t + .. + opt_V + .. + t0 + .. + .. + .. + ncal + .. + printf + .. + sed + regress.multitest.out + .. + .. + tr + .. + uudecode + .. + uuencode + .. + xargs + .. + yacc + .. + .. + usr.sbin + etcupdate + .. + newsyslog + .. + sa + .. .. .. .. Modified: stable/10/sbin/Makefile ============================================================================== --- stable/10/sbin/Makefile Sun Apr 27 01:06:02 2014 (r264995) +++ stable/10/sbin/Makefile Sun Apr 27 01:15:10 2014 (r264996) @@ -114,6 +114,10 @@ SUBDIR+= quotacheck SUBDIR+= routed .endif +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include SUBDIR:= ${SUBDIR:O} Modified: stable/10/sbin/dhclient/Makefile ============================================================================== --- stable/10/sbin/dhclient/Makefile Sun Apr 27 01:06:02 2014 (r264995) +++ stable/10/sbin/dhclient/Makefile Sun Apr 27 01:15:10 2014 (r264996) @@ -31,6 +31,8 @@ # OF THE POSSIBILITY OF SUCH DAMAGE. # +.include + SRCS= dhclient.c clparse.c alloc.c dispatch.c hash.c bpf.c options.c \ tree.c conflex.c errwarn.c inet.c packet.c convert.c tables.c \ parse.c privsep.c @@ -44,4 +46,8 @@ LDADD= -lutil WARNS?= 2 +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: stable/10/sbin/growfs/Makefile ============================================================================== --- stable/10/sbin/growfs/Makefile Sun Apr 27 01:06:02 2014 (r264995) +++ stable/10/sbin/growfs/Makefile Sun Apr 27 01:15:10 2014 (r264996) @@ -6,6 +6,8 @@ #GFSDBG= +.include + .PATH: ${.CURDIR}/../mount PROG= growfs @@ -20,4 +22,8 @@ SRCS+= debug.c DPADD= ${LIBUTIL} LDADD= -lutil +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: stable/10/sbin/mdconfig/Makefile ============================================================================== --- stable/10/sbin/mdconfig/Makefile Sun Apr 27 01:06:02 2014 (r264995) +++ stable/10/sbin/mdconfig/Makefile Sun Apr 27 01:15:10 2014 (r264996) @@ -1,9 +1,15 @@ # $FreeBSD$ +.include + PROG= mdconfig MAN= mdconfig.8 DPADD= ${LIBUTIL} ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} LDADD= -lutil -lgeom -lbsdxml -lsbuf +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Copied: stable/10/sbin/mdconfig/tests/Makefile (from r263222, head/sbin/mdconfig/tests/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sbin/mdconfig/tests/Makefile Sun Apr 27 01:15:10 2014 (r264996, copy of r263222, head/sbin/mdconfig/tests/Makefile) @@ -0,0 +1,13 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/sbin/mdconfig + +TAP_TESTS_SH= legacy_test +TAP_TESTS_SH_SED_legacy_test= 's,__PERL__,${TAP_PERL_INTERPRETER},g' +TEST_METADATA.legacy_test+= required_programs="${TAP_PERL_INTERPRETER}" + +FILESDIR= ${TESTSDIR} +FILES= mdconfig.test +FILES+= run.pl + +.include Modified: stable/10/sbin/mdconfig/tests/legacy_test.sh ============================================================================== --- head/sbin/mdconfig/tests/legacy_test.sh Sun Mar 16 02:07:08 2014 (r263220) +++ stable/10/sbin/mdconfig/tests/legacy_test.sh Sun Apr 27 01:15:10 2014 (r264996) @@ -38,7 +38,7 @@ fi TESTDIR=$(dirname $(realpath $0)) -__PERL__ -w -U $TESTDIR/run $TESTDIR/mdconfig.test > /dev/null +__PERL__ -w -U $TESTDIR/run.pl $TESTDIR/mdconfig.test > /dev/null if [ $? -eq 0 ]; then echo "ok 1" Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Sun Apr 27 01:06:02 2014 (r264995) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Sun Apr 27 01:15:10 2014 (r264996) @@ -4092,6 +4092,376 @@ OLD_FILES+=usr/tests/lib/atf/libatf-c/pr OLD_FILES+=usr/tests/lib/atf/libatf-c/sanity_test OLD_FILES+=usr/tests/lib/atf/libatf-c/text_test OLD_FILES+=usr/tests/lib/atf/libatf-c/user_test +.if ${MK_MAKE} == yes && ${MK_BMAKE} == yes +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd/legacy_test +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd/Makefile.test +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd/expected.status.1 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd/expected.status.2 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd/expected.status.3 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd/expected.status.4 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd/expected.status.5 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd/expected.status.6 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd/expected.status.7 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd/expected.stderr.1 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd/expected.stderr.2 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd/expected.stderr.3 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd/expected.stderr.4 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd/expected.stderr.5 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd/expected.stderr.6 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd/expected.stderr.7 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd/expected.stdout.1 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd/expected.stdout.2 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd/expected.stdout.3 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd/expected.stdout.4 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd/expected.stdout.5 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd/expected.stdout.6 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd/expected.stdout.7 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd/libtest.a +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd_mod/legacy_test +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd_mod/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd_mod/Makefile.test +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd_mod/expected.status.1 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd_mod/expected.status.2 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd_mod/expected.status.3 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd_mod/expected.status.4 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd_mod/expected.status.5 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd_mod/expected.status.6 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd_mod/expected.status.7 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd_mod/expected.stderr.1 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd_mod/expected.stderr.2 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd_mod/expected.stderr.3 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd_mod/expected.stderr.4 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd_mod/expected.stderr.5 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd_mod/expected.stderr.6 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd_mod/expected.stderr.7 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.1 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.2 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.3 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.4 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.5 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.6 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.7 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd_mod/libtest.a +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_oldbsd/legacy_test +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_oldbsd/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_oldbsd/Makefile.test +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_oldbsd/expected.status.1 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_oldbsd/expected.status.2 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_oldbsd/expected.status.3 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_oldbsd/expected.status.4 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_oldbsd/expected.status.5 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_oldbsd/expected.status.6 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_oldbsd/expected.status.7 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_oldbsd/expected.stderr.1 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_oldbsd/expected.stderr.2 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_oldbsd/expected.stderr.3 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_oldbsd/expected.stderr.4 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_oldbsd/expected.stderr.5 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_oldbsd/expected.stderr.6 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_oldbsd/expected.stderr.7 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_oldbsd/expected.stdout.1 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_oldbsd/expected.stdout.2 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_oldbsd/expected.stdout.3 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_oldbsd/expected.stdout.4 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_oldbsd/expected.stdout.5 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_oldbsd/expected.stdout.6 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_oldbsd/expected.stdout.7 +OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_oldbsd/libtest.a +OLD_FILES+=usr/tests/usr.bin/make/archives/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/basic/t0/legacy_test +OLD_FILES+=usr/tests/usr.bin/make/basic/t0/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/basic/t0/expected.status.1 +OLD_FILES+=usr/tests/usr.bin/make/basic/t0/expected.stderr.1 +OLD_FILES+=usr/tests/usr.bin/make/basic/t0/expected.stdout.1 +OLD_FILES+=usr/tests/usr.bin/make/basic/t1/legacy_test +OLD_FILES+=usr/tests/usr.bin/make/basic/t1/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/basic/t1/Makefile.test +OLD_FILES+=usr/tests/usr.bin/make/basic/t1/expected.status.1 +OLD_FILES+=usr/tests/usr.bin/make/basic/t1/expected.stderr.1 +OLD_FILES+=usr/tests/usr.bin/make/basic/t1/expected.stdout.1 +OLD_FILES+=usr/tests/usr.bin/make/basic/t2/legacy_test +OLD_FILES+=usr/tests/usr.bin/make/basic/t2/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/basic/t2/Makefile.test +OLD_FILES+=usr/tests/usr.bin/make/basic/t2/expected.status.1 +OLD_FILES+=usr/tests/usr.bin/make/basic/t2/expected.stderr.1 +OLD_FILES+=usr/tests/usr.bin/make/basic/t2/expected.stdout.1 +OLD_FILES+=usr/tests/usr.bin/make/basic/t3/legacy_test +OLD_FILES+=usr/tests/usr.bin/make/basic/t3/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/basic/t3/expected.status.1 +OLD_FILES+=usr/tests/usr.bin/make/basic/t3/expected.stderr.1 +OLD_FILES+=usr/tests/usr.bin/make/basic/t3/expected.stdout.1 +OLD_FILES+=usr/tests/usr.bin/make/basic/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/execution/ellipsis/legacy_test +OLD_FILES+=usr/tests/usr.bin/make/execution/ellipsis/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/execution/ellipsis/Makefile.test +OLD_FILES+=usr/tests/usr.bin/make/execution/ellipsis/expected.status.1 +OLD_FILES+=usr/tests/usr.bin/make/execution/ellipsis/expected.stderr.1 +OLD_FILES+=usr/tests/usr.bin/make/execution/ellipsis/expected.stdout.1 +OLD_FILES+=usr/tests/usr.bin/make/execution/empty/legacy_test +OLD_FILES+=usr/tests/usr.bin/make/execution/empty/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/execution/empty/Makefile.test +OLD_FILES+=usr/tests/usr.bin/make/execution/empty/expected.status.1 +OLD_FILES+=usr/tests/usr.bin/make/execution/empty/expected.stderr.1 +OLD_FILES+=usr/tests/usr.bin/make/execution/empty/expected.stdout.1 +OLD_FILES+=usr/tests/usr.bin/make/execution/joberr/legacy_test +OLD_FILES+=usr/tests/usr.bin/make/execution/joberr/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/execution/joberr/Makefile.test +OLD_FILES+=usr/tests/usr.bin/make/execution/joberr/expected.status.1 +OLD_FILES+=usr/tests/usr.bin/make/execution/joberr/expected.stderr.1 +OLD_FILES+=usr/tests/usr.bin/make/execution/joberr/expected.stdout.1 +OLD_FILES+=usr/tests/usr.bin/make/execution/plus/legacy_test +OLD_FILES+=usr/tests/usr.bin/make/execution/plus/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/execution/plus/Makefile.test +OLD_FILES+=usr/tests/usr.bin/make/execution/plus/expected.status.1 +OLD_FILES+=usr/tests/usr.bin/make/execution/plus/expected.stderr.1 +OLD_FILES+=usr/tests/usr.bin/make/execution/plus/expected.stdout.1 +OLD_FILES+=usr/tests/usr.bin/make/execution/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/shell/builtin/legacy_test +OLD_FILES+=usr/tests/usr.bin/make/shell/builtin/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/shell/builtin/Makefile.test +OLD_FILES+=usr/tests/usr.bin/make/shell/builtin/expected.status.1 +OLD_FILES+=usr/tests/usr.bin/make/shell/builtin/expected.status.2 +OLD_FILES+=usr/tests/usr.bin/make/shell/builtin/expected.stderr.1 +OLD_FILES+=usr/tests/usr.bin/make/shell/builtin/expected.stderr.2 +OLD_FILES+=usr/tests/usr.bin/make/shell/builtin/expected.stdout.1 +OLD_FILES+=usr/tests/usr.bin/make/shell/builtin/expected.stdout.2 +OLD_FILES+=usr/tests/usr.bin/make/shell/builtin/sh +OLD_FILES+=usr/tests/usr.bin/make/shell/meta/legacy_test +OLD_FILES+=usr/tests/usr.bin/make/shell/meta/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/shell/meta/Makefile.test +OLD_FILES+=usr/tests/usr.bin/make/shell/meta/expected.status.1 +OLD_FILES+=usr/tests/usr.bin/make/shell/meta/expected.status.2 +OLD_FILES+=usr/tests/usr.bin/make/shell/meta/expected.stderr.1 +OLD_FILES+=usr/tests/usr.bin/make/shell/meta/expected.stderr.2 +OLD_FILES+=usr/tests/usr.bin/make/shell/meta/expected.stdout.1 +OLD_FILES+=usr/tests/usr.bin/make/shell/meta/expected.stdout.2 +OLD_FILES+=usr/tests/usr.bin/make/shell/meta/sh +OLD_FILES+=usr/tests/usr.bin/make/shell/path/legacy_test +OLD_FILES+=usr/tests/usr.bin/make/shell/path/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/shell/path/Makefile.test +OLD_FILES+=usr/tests/usr.bin/make/shell/path/expected.status.1 +OLD_FILES+=usr/tests/usr.bin/make/shell/path/expected.status.2 +OLD_FILES+=usr/tests/usr.bin/make/shell/path/expected.stderr.1 +OLD_FILES+=usr/tests/usr.bin/make/shell/path/expected.stderr.2 +OLD_FILES+=usr/tests/usr.bin/make/shell/path/expected.stdout.1 +OLD_FILES+=usr/tests/usr.bin/make/shell/path/expected.stdout.2 +OLD_FILES+=usr/tests/usr.bin/make/shell/path/sh +OLD_FILES+=usr/tests/usr.bin/make/shell/path_select/legacy_test +OLD_FILES+=usr/tests/usr.bin/make/shell/path_select/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/shell/path_select/Makefile.test +OLD_FILES+=usr/tests/usr.bin/make/shell/path_select/expected.status.1 +OLD_FILES+=usr/tests/usr.bin/make/shell/path_select/expected.status.2 +OLD_FILES+=usr/tests/usr.bin/make/shell/path_select/expected.stderr.1 +OLD_FILES+=usr/tests/usr.bin/make/shell/path_select/expected.stderr.2 +OLD_FILES+=usr/tests/usr.bin/make/shell/path_select/expected.stdout.1 +OLD_FILES+=usr/tests/usr.bin/make/shell/path_select/expected.stdout.2 +OLD_FILES+=usr/tests/usr.bin/make/shell/path_select/shell +OLD_FILES+=usr/tests/usr.bin/make/shell/replace/legacy_test +OLD_FILES+=usr/tests/usr.bin/make/shell/replace/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/shell/replace/Makefile.test +OLD_FILES+=usr/tests/usr.bin/make/shell/replace/expected.status.1 +OLD_FILES+=usr/tests/usr.bin/make/shell/replace/expected.status.2 +OLD_FILES+=usr/tests/usr.bin/make/shell/replace/expected.stderr.1 +OLD_FILES+=usr/tests/usr.bin/make/shell/replace/expected.stderr.2 +OLD_FILES+=usr/tests/usr.bin/make/shell/replace/expected.stdout.1 +OLD_FILES+=usr/tests/usr.bin/make/shell/replace/expected.stdout.2 +OLD_FILES+=usr/tests/usr.bin/make/shell/replace/shell +OLD_FILES+=usr/tests/usr.bin/make/shell/select/legacy_test +OLD_FILES+=usr/tests/usr.bin/make/shell/select/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/shell/select/Makefile.test +OLD_FILES+=usr/tests/usr.bin/make/shell/select/expected.status.1 +OLD_FILES+=usr/tests/usr.bin/make/shell/select/expected.status.2 +OLD_FILES+=usr/tests/usr.bin/make/shell/select/expected.stderr.1 +OLD_FILES+=usr/tests/usr.bin/make/shell/select/expected.stderr.2 +OLD_FILES+=usr/tests/usr.bin/make/shell/select/expected.stdout.1 +OLD_FILES+=usr/tests/usr.bin/make/shell/select/expected.stdout.2 +OLD_FILES+=usr/tests/usr.bin/make/shell/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/suffixes/basic/legacy_test +OLD_FILES+=usr/tests/usr.bin/make/suffixes/basic/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/suffixes/basic/Makefile.test +OLD_FILES+=usr/tests/usr.bin/make/suffixes/basic/TEST1.a +OLD_FILES+=usr/tests/usr.bin/make/suffixes/basic/expected.status.1 +OLD_FILES+=usr/tests/usr.bin/make/suffixes/basic/expected.stderr.1 +OLD_FILES+=usr/tests/usr.bin/make/suffixes/basic/expected.stdout.1 +OLD_FILES+=usr/tests/usr.bin/make/suffixes/src_wild1/legacy_test +OLD_FILES+=usr/tests/usr.bin/make/suffixes/src_wild1/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/suffixes/src_wild1/Makefile.test +OLD_FILES+=usr/tests/usr.bin/make/suffixes/src_wild1/TEST1.a +OLD_FILES+=usr/tests/usr.bin/make/suffixes/src_wild1/TEST2.a +OLD_FILES+=usr/tests/usr.bin/make/suffixes/src_wild1/expected.status.1 +OLD_FILES+=usr/tests/usr.bin/make/suffixes/src_wild1/expected.stderr.1 +OLD_FILES+=usr/tests/usr.bin/make/suffixes/src_wild1/expected.stdout.1 +OLD_FILES+=usr/tests/usr.bin/make/suffixes/src_wild2/legacy_test +OLD_FILES+=usr/tests/usr.bin/make/suffixes/src_wild2/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/suffixes/src_wild2/Makefile.test +OLD_FILES+=usr/tests/usr.bin/make/suffixes/src_wild2/TEST1.a +OLD_FILES+=usr/tests/usr.bin/make/suffixes/src_wild2/TEST2.a +OLD_FILES+=usr/tests/usr.bin/make/suffixes/src_wild2/expected.status.1 +OLD_FILES+=usr/tests/usr.bin/make/suffixes/src_wild2/expected.stderr.1 +OLD_FILES+=usr/tests/usr.bin/make/suffixes/src_wild2/expected.stdout.1 +OLD_FILES+=usr/tests/usr.bin/make/suffixes/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/syntax/directive-t0/legacy_test +OLD_FILES+=usr/tests/usr.bin/make/syntax/directive-t0/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/syntax/directive-t0/Makefile.test +OLD_FILES+=usr/tests/usr.bin/make/syntax/directive-t0/expected.status.1 +OLD_FILES+=usr/tests/usr.bin/make/syntax/directive-t0/expected.stderr.1 +OLD_FILES+=usr/tests/usr.bin/make/syntax/directive-t0/expected.stdout.1 +OLD_FILES+=usr/tests/usr.bin/make/syntax/enl/legacy_test +OLD_FILES+=usr/tests/usr.bin/make/syntax/enl/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/syntax/enl/Makefile.test +OLD_FILES+=usr/tests/usr.bin/make/syntax/enl/expected.status.1 +OLD_FILES+=usr/tests/usr.bin/make/syntax/enl/expected.status.2 +OLD_FILES+=usr/tests/usr.bin/make/syntax/enl/expected.status.3 +OLD_FILES+=usr/tests/usr.bin/make/syntax/enl/expected.status.4 +OLD_FILES+=usr/tests/usr.bin/make/syntax/enl/expected.status.5 +OLD_FILES+=usr/tests/usr.bin/make/syntax/enl/expected.stderr.1 +OLD_FILES+=usr/tests/usr.bin/make/syntax/enl/expected.stderr.2 +OLD_FILES+=usr/tests/usr.bin/make/syntax/enl/expected.stderr.3 +OLD_FILES+=usr/tests/usr.bin/make/syntax/enl/expected.stderr.4 +OLD_FILES+=usr/tests/usr.bin/make/syntax/enl/expected.stderr.5 +OLD_FILES+=usr/tests/usr.bin/make/syntax/enl/expected.stdout.1 +OLD_FILES+=usr/tests/usr.bin/make/syntax/enl/expected.stdout.2 +OLD_FILES+=usr/tests/usr.bin/make/syntax/enl/expected.stdout.3 +OLD_FILES+=usr/tests/usr.bin/make/syntax/enl/expected.stdout.4 +OLD_FILES+=usr/tests/usr.bin/make/syntax/enl/expected.stdout.5 +OLD_FILES+=usr/tests/usr.bin/make/syntax/funny-targets/legacy_test +OLD_FILES+=usr/tests/usr.bin/make/syntax/funny-targets/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/syntax/funny-targets/Makefile.test +OLD_FILES+=usr/tests/usr.bin/make/syntax/funny-targets/expected.status.1 +OLD_FILES+=usr/tests/usr.bin/make/syntax/funny-targets/expected.status.2 +OLD_FILES+=usr/tests/usr.bin/make/syntax/funny-targets/expected.stderr.1 +OLD_FILES+=usr/tests/usr.bin/make/syntax/funny-targets/expected.stderr.2 +OLD_FILES+=usr/tests/usr.bin/make/syntax/funny-targets/expected.stdout.1 +OLD_FILES+=usr/tests/usr.bin/make/syntax/funny-targets/expected.stdout.2 +OLD_FILES+=usr/tests/usr.bin/make/syntax/semi/legacy_test +OLD_FILES+=usr/tests/usr.bin/make/syntax/semi/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/syntax/semi/Makefile.test +OLD_FILES+=usr/tests/usr.bin/make/syntax/semi/expected.status.1 +OLD_FILES+=usr/tests/usr.bin/make/syntax/semi/expected.status.2 +OLD_FILES+=usr/tests/usr.bin/make/syntax/semi/expected.stderr.1 +OLD_FILES+=usr/tests/usr.bin/make/syntax/semi/expected.stderr.2 +OLD_FILES+=usr/tests/usr.bin/make/syntax/semi/expected.stdout.1 +OLD_FILES+=usr/tests/usr.bin/make/syntax/semi/expected.stdout.2 +OLD_FILES+=usr/tests/usr.bin/make/syntax/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/sysmk/t0/2/1/legacy_test +OLD_FILES+=usr/tests/usr.bin/make/sysmk/t0/2/1/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/sysmk/t0/2/1/Makefile.test +OLD_FILES+=usr/tests/usr.bin/make/sysmk/t0/2/1/expected.status.1 +OLD_FILES+=usr/tests/usr.bin/make/sysmk/t0/2/1/expected.stderr.1 +OLD_FILES+=usr/tests/usr.bin/make/sysmk/t0/2/1/expected.stdout.1 +OLD_FILES+=usr/tests/usr.bin/make/sysmk/t0/2/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/sysmk/t0/mk/sys.mk +OLD_FILES+=usr/tests/usr.bin/make/sysmk/t0/mk/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/sysmk/t0/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/sysmk/t1/2/1/legacy_test +OLD_FILES+=usr/tests/usr.bin/make/sysmk/t1/2/1/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/sysmk/t1/2/1/cleanup +OLD_FILES+=usr/tests/usr.bin/make/sysmk/t1/2/1/expected.status.1 +OLD_FILES+=usr/tests/usr.bin/make/sysmk/t1/2/1/expected.stderr.1 +OLD_FILES+=usr/tests/usr.bin/make/sysmk/t1/2/1/expected.stdout.1 +OLD_FILES+=usr/tests/usr.bin/make/sysmk/t1/2/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/sysmk/t1/mk/sys.mk +OLD_FILES+=usr/tests/usr.bin/make/sysmk/t1/mk/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/sysmk/t1/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/sysmk/t2/2/1/legacy_test +OLD_FILES+=usr/tests/usr.bin/make/sysmk/t2/2/1/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/sysmk/t2/2/1/cleanup +OLD_FILES+=usr/tests/usr.bin/make/sysmk/t2/2/1/expected.status.1 +OLD_FILES+=usr/tests/usr.bin/make/sysmk/t2/2/1/expected.stderr.1 +OLD_FILES+=usr/tests/usr.bin/make/sysmk/t2/2/1/expected.stdout.1 +OLD_FILES+=usr/tests/usr.bin/make/sysmk/t2/2/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/sysmk/t2/mk/sys.mk +OLD_FILES+=usr/tests/usr.bin/make/sysmk/t2/mk/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/sysmk/t2/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/sysmk/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/variables/modifier_M/legacy_test +OLD_FILES+=usr/tests/usr.bin/make/variables/modifier_M/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/variables/modifier_M/Makefile.test +OLD_FILES+=usr/tests/usr.bin/make/variables/modifier_M/expected.status.1 +OLD_FILES+=usr/tests/usr.bin/make/variables/modifier_M/expected.stderr.1 +OLD_FILES+=usr/tests/usr.bin/make/variables/modifier_M/expected.stdout.1 +OLD_FILES+=usr/tests/usr.bin/make/variables/modifier_t/legacy_test +OLD_FILES+=usr/tests/usr.bin/make/variables/modifier_t/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/variables/modifier_t/Makefile.test +OLD_FILES+=usr/tests/usr.bin/make/variables/modifier_t/expected.status.1 +OLD_FILES+=usr/tests/usr.bin/make/variables/modifier_t/expected.status.2 +OLD_FILES+=usr/tests/usr.bin/make/variables/modifier_t/expected.status.3 +OLD_FILES+=usr/tests/usr.bin/make/variables/modifier_t/expected.stderr.1 +OLD_FILES+=usr/tests/usr.bin/make/variables/modifier_t/expected.stderr.2 +OLD_FILES+=usr/tests/usr.bin/make/variables/modifier_t/expected.stderr.3 +OLD_FILES+=usr/tests/usr.bin/make/variables/modifier_t/expected.stdout.1 +OLD_FILES+=usr/tests/usr.bin/make/variables/modifier_t/expected.stdout.2 +OLD_FILES+=usr/tests/usr.bin/make/variables/modifier_t/expected.stdout.3 +OLD_FILES+=usr/tests/usr.bin/make/variables/opt_V/legacy_test +OLD_FILES+=usr/tests/usr.bin/make/variables/opt_V/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/variables/opt_V/Makefile.test +OLD_FILES+=usr/tests/usr.bin/make/variables/opt_V/expected.status.1 +OLD_FILES+=usr/tests/usr.bin/make/variables/opt_V/expected.status.2 +OLD_FILES+=usr/tests/usr.bin/make/variables/opt_V/expected.stderr.1 +OLD_FILES+=usr/tests/usr.bin/make/variables/opt_V/expected.stderr.2 +OLD_FILES+=usr/tests/usr.bin/make/variables/opt_V/expected.stdout.1 +OLD_FILES+=usr/tests/usr.bin/make/variables/opt_V/expected.stdout.2 +OLD_FILES+=usr/tests/usr.bin/make/variables/t0/legacy_test +OLD_FILES+=usr/tests/usr.bin/make/variables/t0/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/variables/t0/Makefile.test +OLD_FILES+=usr/tests/usr.bin/make/variables/t0/expected.status.1 +OLD_FILES+=usr/tests/usr.bin/make/variables/t0/expected.stderr.1 +OLD_FILES+=usr/tests/usr.bin/make/variables/t0/expected.stdout.1 +OLD_FILES+=usr/tests/usr.bin/make/variables/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/Kyuafile +OLD_FILES+=usr/tests/usr.bin/make/common.sh +OLD_FILES+=usr/tests/usr.bin/make/test-new.mk +OLD_DIRS+=usr/tests/usr.bin/make/variables/t0 +OLD_DIRS+=usr/tests/usr.bin/make/variables/opt_V +OLD_DIRS+=usr/tests/usr.bin/make/variables/modifier_t +OLD_DIRS+=usr/tests/usr.bin/make/variables/modifier_M +OLD_DIRS+=usr/tests/usr.bin/make/variables +OLD_DIRS+=usr/tests/usr.bin/make/sysmk/t2/mk +OLD_DIRS+=usr/tests/usr.bin/make/sysmk/t2/2/1 +OLD_DIRS+=usr/tests/usr.bin/make/sysmk/t2/2 +OLD_DIRS+=usr/tests/usr.bin/make/sysmk/t2 +OLD_DIRS+=usr/tests/usr.bin/make/sysmk/t1/mk +OLD_DIRS+=usr/tests/usr.bin/make/sysmk/t1/2/1 +OLD_DIRS+=usr/tests/usr.bin/make/sysmk/t1/2 +OLD_DIRS+=usr/tests/usr.bin/make/sysmk/t1 +OLD_DIRS+=usr/tests/usr.bin/make/sysmk/t0/mk +OLD_DIRS+=usr/tests/usr.bin/make/sysmk/t0/2/1 +OLD_DIRS+=usr/tests/usr.bin/make/sysmk/t0/2 +OLD_DIRS+=usr/tests/usr.bin/make/sysmk/t0 +OLD_DIRS+=usr/tests/usr.bin/make/sysmk +OLD_DIRS+=usr/tests/usr.bin/make/syntax/semi +OLD_DIRS+=usr/tests/usr.bin/make/syntax/funny-targets +OLD_DIRS+=usr/tests/usr.bin/make/syntax/enl +OLD_DIRS+=usr/tests/usr.bin/make/syntax/directive-t0 +OLD_DIRS+=usr/tests/usr.bin/make/syntax +OLD_DIRS+=usr/tests/usr.bin/make/suffixes/src_wild2 +OLD_DIRS+=usr/tests/usr.bin/make/suffixes/src_wild1 +OLD_DIRS+=usr/tests/usr.bin/make/suffixes/basic +OLD_DIRS+=usr/tests/usr.bin/make/suffixes +OLD_DIRS+=usr/tests/usr.bin/make/shell/select +OLD_DIRS+=usr/tests/usr.bin/make/shell/replace +OLD_DIRS+=usr/tests/usr.bin/make/shell/path_select +OLD_DIRS+=usr/tests/usr.bin/make/shell/path +OLD_DIRS+=usr/tests/usr.bin/make/shell/meta +OLD_DIRS+=usr/tests/usr.bin/make/shell/builtin +OLD_DIRS+=usr/tests/usr.bin/make/shell +OLD_DIRS+=usr/tests/usr.bin/make/execution/plus +OLD_DIRS+=usr/tests/usr.bin/make/execution/joberr +OLD_DIRS+=usr/tests/usr.bin/make/execution/empty +OLD_DIRS+=usr/tests/usr.bin/make/execution/ellipsis +OLD_DIRS+=usr/tests/usr.bin/make/execution +OLD_DIRS+=usr/tests/usr.bin/make/basic/t3 +OLD_DIRS+=usr/tests/usr.bin/make/basic/t2 +OLD_DIRS+=usr/tests/usr.bin/make/basic/t1 +OLD_DIRS+=usr/tests/usr.bin/make/basic/t0 +OLD_DIRS+=usr/tests/usr.bin/make/basic +OLD_DIRS+=usr/tests/usr.bin/make/archives/fmt_oldbsd +OLD_DIRS+=usr/tests/usr.bin/make/archives/fmt_44bsd_mod +OLD_DIRS+=usr/tests/usr.bin/make/archives/fmt_44bsd +OLD_DIRS+=usr/tests/usr.bin/make/archives +OLD_DIRS+=usr/tests/usr.bin/make +.endif .else # ATF libraries. OLD_FILES+=usr/bin/atf-sh Modified: stable/10/usr.bin/apply/Makefile ============================================================================== --- stable/10/usr.bin/apply/Makefile Sun Apr 27 01:06:02 2014 (r264995) +++ stable/10/usr.bin/apply/Makefile Sun Apr 27 01:15:10 2014 (r264996) @@ -1,8 +1,14 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ +.include + PROG= apply DPADD= ${LIBSBUF} LDADD= -lsbuf +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: stable/10/usr.bin/calendar/Makefile ============================================================================== --- stable/10/usr.bin/calendar/Makefile Sun Apr 27 01:06:02 2014 (r264995) +++ stable/10/usr.bin/calendar/Makefile Sun Apr 27 01:15:10 2014 (r264996) @@ -1,6 +1,8 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ +.include + PROG= calendar SRCS= calendar.c locale.c events.c dates.c parsedata.c io.c day.c \ ostern.c paskha.c pom.c sunpos.c calcpp.c @@ -31,4 +33,8 @@ beforeinstall: ln -s fr_FR.ISO8859-1 ${DESTDIR}${SHAREDIR}/calendar/${link} .endfor +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: stable/10/usr.bin/comm/Makefile ============================================================================== --- stable/10/usr.bin/comm/Makefile Sun Apr 27 01:06:02 2014 (r264995) +++ stable/10/usr.bin/comm/Makefile Sun Apr 27 01:15:10 2014 (r264996) @@ -1,6 +1,12 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ +.include + PROG= comm +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: stable/10/usr.bin/file2c/Makefile ============================================================================== --- stable/10/usr.bin/file2c/Makefile Sun Apr 27 01:06:02 2014 (r264995) +++ stable/10/usr.bin/file2c/Makefile Sun Apr 27 01:15:10 2014 (r264996) @@ -1,4 +1,11 @@ # $FreeBSD$ +.include + PROG= file2c + +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: stable/10/usr.bin/join/Makefile ============================================================================== --- stable/10/usr.bin/join/Makefile Sun Apr 27 01:06:02 2014 (r264995) +++ stable/10/usr.bin/join/Makefile Sun Apr 27 01:15:10 2014 (r264996) @@ -1,5 +1,12 @@ +# $FreeBSD$ # @(#)Makefile 8.1 (Berkeley) 6/6/93 +.include + PROG= join +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: stable/10/usr.bin/jot/Makefile ============================================================================== --- stable/10/usr.bin/jot/Makefile Sun Apr 27 01:06:02 2014 (r264995) +++ stable/10/usr.bin/jot/Makefile Sun Apr 27 01:15:10 2014 (r264996) @@ -1,6 +1,12 @@ # From: @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ +.include + PROG= jot +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: stable/10/usr.bin/lastcomm/Makefile ============================================================================== --- stable/10/usr.bin/lastcomm/Makefile Sun Apr 27 01:06:02 2014 (r264995) +++ stable/10/usr.bin/lastcomm/Makefile Sun Apr 27 01:15:10 2014 (r264996) @@ -1,7 +1,13 @@ # From: @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ +.include + PROG= lastcomm SRCS= lastcomm.c readrec.c +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: stable/10/usr.bin/m4/Makefile ============================================================================== --- stable/10/usr.bin/m4/Makefile Sun Apr 27 01:06:02 2014 (r264995) +++ stable/10/usr.bin/m4/Makefile Sun Apr 27 01:15:10 2014 (r264996) @@ -4,6 +4,8 @@ # -DEXTENDED # if you want the paste & spaste macros. +.include + PROG= m4 CFLAGS+=-DEXTENDED -I${.CURDIR} -I${.CURDIR}/lib DPADD= ${LIBY} ${LIBL} ${LIBM} @@ -22,4 +24,8 @@ tokenizer.o: parser.h CLEANFILES+= parser.c parser.h tokenizer.o +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: stable/10/usr.bin/make/Makefile ============================================================================== --- stable/10/usr.bin/make/Makefile Sun Apr 27 01:06:02 2014 (r264995) +++ stable/10/usr.bin/make/Makefile Sun Apr 27 01:15:10 2014 (r264996) @@ -118,4 +118,8 @@ fmake.1: make.1 cp ${.ALLSRC} ${.TARGET} .endif +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Copied: stable/10/usr.bin/make/tests/Makefile (from r263348, head/usr.bin/make/tests/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.bin/make/tests/Makefile Sun Apr 27 01:15:10 2014 (r264996, copy of r263348, head/usr.bin/make/tests/Makefile) @@ -0,0 +1,18 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/usr.bin/make + +FILESDIR= ${TESTSDIR} +FILES= common.sh +FILES+= test-new.mk + +TESTS_SUBDIRS= archives +TESTS_SUBDIRS+= basic +TESTS_SUBDIRS+= execution +TESTS_SUBDIRS+= shell +TESTS_SUBDIRS+= suffixes +TESTS_SUBDIRS+= syntax +TESTS_SUBDIRS+= sysmk +TESTS_SUBDIRS+= variables + +.include Copied: stable/10/usr.bin/make/tests/archives/Makefile (from r263348, head/usr.bin/make/tests/archives/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.bin/make/tests/archives/Makefile Sun Apr 27 01:15:10 2014 (r264996, copy of r263348, head/usr.bin/make/tests/archives/Makefile) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/usr.bin/make/archives + +TESTS_SUBDIRS= fmt_44bsd fmt_44bsd_mod fmt_oldbsd + +.include Copied: stable/10/usr.bin/make/tests/archives/fmt_44bsd/Makefile (from r263348, head/usr.bin/make/tests/archives/fmt_44bsd/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.bin/make/tests/archives/fmt_44bsd/Makefile Sun Apr 27 01:15:10 2014 (r264996, copy of r263348, head/usr.bin/make/tests/archives/fmt_44bsd/Makefile) @@ -0,0 +1,32 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/usr.bin/make/archives/fmt_44bsd + +TAP_TESTS_SH= legacy_test + +FILESDIR= ${TESTSDIR} +FILES= Makefile.test +FILES+= expected.status.1 +FILES+= expected.status.2 +FILES+= expected.status.3 +FILES+= expected.status.4 +FILES+= expected.status.5 +FILES+= expected.status.6 +FILES+= expected.status.7 +FILES+= expected.stderr.1 +FILES+= expected.stderr.2 +FILES+= expected.stderr.3 +FILES+= expected.stderr.4 +FILES+= expected.stderr.5 +FILES+= expected.stderr.6 +FILES+= expected.stderr.7 +FILES+= expected.stdout.1 +FILES+= expected.stdout.2 +FILES+= expected.stdout.3 +FILES+= expected.stdout.4 +FILES+= expected.stdout.5 +FILES+= expected.stdout.6 +FILES+= expected.stdout.7 +FILES+= libtest.a + +.include Copied: stable/10/usr.bin/make/tests/archives/fmt_44bsd_mod/Makefile (from r263348, head/usr.bin/make/tests/archives/fmt_44bsd_mod/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.bin/make/tests/archives/fmt_44bsd_mod/Makefile Sun Apr 27 01:15:10 2014 (r264996, copy of r263348, head/usr.bin/make/tests/archives/fmt_44bsd_mod/Makefile) @@ -0,0 +1,32 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/usr.bin/make/archives/fmt_44bsd_mod + +TAP_TESTS_SH= legacy_test + +FILESDIR= ${TESTSDIR} +FILES= Makefile.test +FILES+= expected.status.1 +FILES+= expected.status.2 +FILES+= expected.status.3 +FILES+= expected.status.4 +FILES+= expected.status.5 +FILES+= expected.status.6 +FILES+= expected.status.7 +FILES+= expected.stderr.1 +FILES+= expected.stderr.2 +FILES+= expected.stderr.3 +FILES+= expected.stderr.4 +FILES+= expected.stderr.5 +FILES+= expected.stderr.6 +FILES+= expected.stderr.7 +FILES+= expected.stdout.1 +FILES+= expected.stdout.2 +FILES+= expected.stdout.3 +FILES+= expected.stdout.4 +FILES+= expected.stdout.5 +FILES+= expected.stdout.6 +FILES+= expected.stdout.7 +FILES+= libtest.a + +.include Copied: stable/10/usr.bin/make/tests/archives/fmt_oldbsd/Makefile (from r263348, head/usr.bin/make/tests/archives/fmt_oldbsd/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.bin/make/tests/archives/fmt_oldbsd/Makefile Sun Apr 27 01:15:10 2014 (r264996, copy of r263348, head/usr.bin/make/tests/archives/fmt_oldbsd/Makefile) @@ -0,0 +1,32 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/usr.bin/make/archives/fmt_oldbsd + +TAP_TESTS_SH= legacy_test + +FILESDIR= ${TESTSDIR} +FILES= Makefile.test +FILES+= expected.status.1 +FILES+= expected.status.2 +FILES+= expected.status.3 +FILES+= expected.status.4 +FILES+= expected.status.5 +FILES+= expected.status.6 +FILES+= expected.status.7 +FILES+= expected.stderr.1 +FILES+= expected.stderr.2 +FILES+= expected.stderr.3 +FILES+= expected.stderr.4 +FILES+= expected.stderr.5 +FILES+= expected.stderr.6 +FILES+= expected.stderr.7 +FILES+= expected.stdout.1 +FILES+= expected.stdout.2 +FILES+= expected.stdout.3 +FILES+= expected.stdout.4 +FILES+= expected.stdout.5 +FILES+= expected.stdout.6 +FILES+= expected.stdout.7 +FILES+= libtest.a + +.include Copied: stable/10/usr.bin/make/tests/basic/Makefile (from r263348, head/usr.bin/make/tests/basic/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.bin/make/tests/basic/Makefile Sun Apr 27 01:15:10 2014 (r264996, copy of r263348, head/usr.bin/make/tests/basic/Makefile) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/usr.bin/make/basic + +TESTS_SUBDIRS= t0 t1 t2 t3 + +.include Copied: stable/10/usr.bin/make/tests/basic/t0/Makefile (from r263348, head/usr.bin/make/tests/basic/t0/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.bin/make/tests/basic/t0/Makefile Sun Apr 27 01:15:10 2014 (r264996, copy of r263348, head/usr.bin/make/tests/basic/t0/Makefile) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/usr.bin/make/basic/t0 + +TAP_TESTS_SH= legacy_test + +FILESDIR= ${TESTSDIR} +FILES= expected.status.1 +FILES+= expected.stderr.1 +FILES+= expected.stdout.1 + +.include Copied: stable/10/usr.bin/make/tests/basic/t1/Makefile (from r263348, head/usr.bin/make/tests/basic/t1/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.bin/make/tests/basic/t1/Makefile Sun Apr 27 01:15:10 2014 (r264996, copy of r263348, head/usr.bin/make/tests/basic/t1/Makefile) @@ -0,0 +1,13 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/usr.bin/make/basic/t1 + +TAP_TESTS_SH= legacy_test + +FILESDIR= ${TESTSDIR} *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sun Apr 27 09:05:35 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E81E06B6; Sun, 27 Apr 2014 09:05:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D402C1D03; Sun, 27 Apr 2014 09:05:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3R95Z23043738; Sun, 27 Apr 2014 09:05:35 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3R95ZeT043735; Sun, 27 Apr 2014 09:05:35 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201404270905.s3R95ZeT043735@svn.freebsd.org> From: Martin Matuska Date: Sun, 27 Apr 2014 09:05:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265008 - in stable/10/sys: net netpfil/pf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Apr 2014 09:05:36 -0000 Author: mm Date: Sun Apr 27 09:05:34 2014 New Revision: 265008 URL: http://svnweb.freebsd.org/changeset/base/265008 Log: MFC r264689: De-virtualize UMA zone pf_mtag_z and move to global initialization part. The m_tag struct does not know about vnet context and the pf_mtag_free() callback is called unaware of current vnet. This causes a panic. PR: kern/182964 Modified: stable/10/sys/net/pfvar.h stable/10/sys/netpfil/pf/pf.c stable/10/sys/netpfil/pf/pf_ioctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/pfvar.h ============================================================================== --- stable/10/sys/net/pfvar.h Sun Apr 27 08:22:44 2014 (r265007) +++ stable/10/sys/net/pfvar.h Sun Apr 27 09:05:34 2014 (r265008) @@ -1531,6 +1531,8 @@ VNET_DECLARE(struct pf_rulequeue, pf_unl #define V_pf_unlinked_rules VNET(pf_unlinked_rules) void pf_initialize(void); +void pf_mtag_initialize(void); +void pf_mtag_cleanup(void); void pf_cleanup(void); struct pf_mtag *pf_get_mtag(struct mbuf *); Modified: stable/10/sys/netpfil/pf/pf.c ============================================================================== --- stable/10/sys/netpfil/pf/pf.c Sun Apr 27 08:22:44 2014 (r265007) +++ stable/10/sys/netpfil/pf/pf.c Sun Apr 27 09:05:34 2014 (r265008) @@ -186,8 +186,7 @@ struct mtx pf_unlnkdrules_mtx; static VNET_DEFINE(uma_zone_t, pf_sources_z); #define V_pf_sources_z VNET(pf_sources_z) -static VNET_DEFINE(uma_zone_t, pf_mtag_z); -#define V_pf_mtag_z VNET(pf_mtag_z) +uma_zone_t pf_mtag_z; VNET_DEFINE(uma_zone_t, pf_state_z); VNET_DEFINE(uma_zone_t, pf_state_key_z); @@ -282,7 +281,7 @@ static int pf_insert_src_node(struct p struct pf_rule *, struct pf_addr *, sa_family_t); static u_int pf_purge_expired_states(u_int, int); static void pf_purge_unlinked_rules(void); -static int pf_mtag_init(void *, int, int); +static int pf_mtag_uminit(void *, int, int); static void pf_mtag_free(struct m_tag *); #ifdef INET static void pf_route(struct mbuf **, struct pf_rule *, int, @@ -727,7 +726,16 @@ pf_free_src_nodes(struct pf_src_node_lis return (count); } -/* Data storage structures initialization. */ +void +pf_mtag_initialize() +{ + + pf_mtag_z = uma_zcreate("pf mtags", sizeof(struct m_tag) + + sizeof(struct pf_mtag), NULL, NULL, pf_mtag_uminit, NULL, + UMA_ALIGN_PTR, 0); +} + +/* Per-vnet data storage structures initialization. */ void pf_initialize() { @@ -786,10 +794,6 @@ pf_initialize() V_pf_altqs_active = &V_pf_altqs[0]; V_pf_altqs_inactive = &V_pf_altqs[1]; - /* Mbuf tags */ - V_pf_mtag_z = uma_zcreate("pf mtags", sizeof(struct m_tag) + - sizeof(struct pf_mtag), NULL, NULL, pf_mtag_init, NULL, - UMA_ALIGN_PTR, 0); /* Send & overload+flush queues. */ STAILQ_INIT(&V_pf_sendqueue); @@ -805,6 +809,13 @@ pf_initialize() } void +pf_mtag_cleanup() +{ + + uma_zdestroy(pf_mtag_z); +} + +void pf_cleanup() { struct pf_keyhash *kh; @@ -841,14 +852,13 @@ pf_cleanup() mtx_destroy(&pf_overloadqueue_mtx); mtx_destroy(&pf_unlnkdrules_mtx); - uma_zdestroy(V_pf_mtag_z); uma_zdestroy(V_pf_sources_z); uma_zdestroy(V_pf_state_z); uma_zdestroy(V_pf_state_key_z); } static int -pf_mtag_init(void *mem, int size, int how) +pf_mtag_uminit(void *mem, int size, int how) { struct m_tag *t; @@ -865,7 +875,7 @@ static void pf_mtag_free(struct m_tag *t) { - uma_zfree(V_pf_mtag_z, t); + uma_zfree(pf_mtag_z, t); } struct pf_mtag * @@ -876,7 +886,7 @@ pf_get_mtag(struct mbuf *m) if ((mtag = m_tag_find(m, PACKET_TAG_PF, NULL)) != NULL) return ((struct pf_mtag *)(mtag + 1)); - mtag = uma_zalloc(V_pf_mtag_z, M_NOWAIT); + mtag = uma_zalloc(pf_mtag_z, M_NOWAIT); if (mtag == NULL) return (NULL); bzero(mtag + 1, sizeof(struct pf_mtag)); Modified: stable/10/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- stable/10/sys/netpfil/pf/pf_ioctl.c Sun Apr 27 08:22:44 2014 (r265007) +++ stable/10/sys/netpfil/pf/pf_ioctl.c Sun Apr 27 09:05:34 2014 (r265008) @@ -204,6 +204,8 @@ pfattach(void) u_int32_t *my_timeout = V_pf_default_rule.timeout; int error; + if (IS_DEFAULT_VNET(curvnet)) + pf_mtag_initialize(); pf_initialize(); pfr_initialize(); pfi_initialize(); @@ -3721,6 +3723,8 @@ pf_unload(void) pfr_cleanup(); pf_osfp_flush(); pf_cleanup(); + if (IS_DEFAULT_VNET(curvnet)) + pf_mtag_cleanup(); PF_RULES_WUNLOCK(); destroy_dev(pf_dev); rw_destroy(&pf_rules_lock); From owner-svn-src-stable@FreeBSD.ORG Mon Apr 28 04:20:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 77199725; Mon, 28 Apr 2014 04:20:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 608E91527; Mon, 28 Apr 2014 04:20:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3S4KIBd022478; Mon, 28 Apr 2014 04:20:18 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3S4KE7n022458; Mon, 28 Apr 2014 04:20:14 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201404280420.s3S4KE7n022458@svn.freebsd.org> From: Julio Merino Date: Mon, 28 Apr 2014 04:20:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265037 - in stable/10: cddl cddl/lib cddl/lib/tests cddl/sbin cddl/sbin/tests cddl/tests cddl/usr.bin cddl/usr.bin/tests cddl/usr.sbin cddl/usr.sbin/tests etc etc/mtree etc/tests games... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Apr 2014 04:20:18 -0000 Author: jmmv Date: Mon Apr 28 04:20:14 2014 New Revision: 265037 URL: http://svnweb.freebsd.org/changeset/base/265037 Log: MFC r264741: Add placeholder Kyuafiles for various top-level hierarchies. This is "make tinderbox" clean. Added: stable/10/cddl/lib/tests/ - copied from r264741, head/cddl/lib/tests/ stable/10/cddl/sbin/tests/ - copied from r264741, head/cddl/sbin/tests/ stable/10/cddl/tests/ - copied from r264741, head/cddl/tests/ stable/10/cddl/usr.bin/tests/ - copied from r264741, head/cddl/usr.bin/tests/ stable/10/cddl/usr.sbin/tests/ - copied from r264741, head/cddl/usr.sbin/tests/ stable/10/etc/tests/ - copied from r264741, head/etc/tests/ stable/10/games/tests/ - copied from r264741, head/games/tests/ stable/10/gnu/lib/tests/ - copied from r264741, head/gnu/lib/tests/ stable/10/gnu/tests/ - copied from r264741, head/gnu/tests/ stable/10/gnu/usr.bin/tests/ - copied from r264741, head/gnu/usr.bin/tests/ stable/10/secure/lib/tests/ - copied from r264741, head/secure/lib/tests/ stable/10/secure/libexec/tests/ - copied from r264741, head/secure/libexec/tests/ stable/10/secure/tests/ - copied from r264741, head/secure/tests/ stable/10/secure/usr.bin/tests/ - copied from r264741, head/secure/usr.bin/tests/ stable/10/secure/usr.sbin/tests/ - copied from r264741, head/secure/usr.sbin/tests/ Modified: stable/10/cddl/Makefile stable/10/cddl/lib/Makefile stable/10/cddl/sbin/Makefile stable/10/cddl/usr.bin/Makefile stable/10/cddl/usr.sbin/Makefile stable/10/etc/Makefile stable/10/etc/mtree/BSD.tests.dist stable/10/games/Makefile stable/10/gnu/Makefile stable/10/gnu/lib/Makefile stable/10/gnu/usr.bin/Makefile stable/10/secure/Makefile stable/10/secure/lib/Makefile stable/10/secure/libexec/Makefile stable/10/secure/usr.bin/Makefile stable/10/secure/usr.sbin/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/Makefile ============================================================================== --- stable/10/cddl/Makefile Mon Apr 28 02:35:28 2014 (r265036) +++ stable/10/cddl/Makefile Mon Apr 28 04:20:14 2014 (r265037) @@ -1,5 +1,11 @@ # $FreeBSD$ +.include + SUBDIR= lib sbin usr.bin usr.sbin +.if ${MK_TESTS} != "no" +SUBDIR+=tests +.endif + .include Modified: stable/10/cddl/lib/Makefile ============================================================================== --- stable/10/cddl/lib/Makefile Mon Apr 28 02:35:28 2014 (r265036) +++ stable/10/cddl/lib/Makefile Mon Apr 28 04:20:14 2014 (r265037) @@ -11,7 +11,12 @@ SUBDIR= ${_drti} \ libuutil \ ${_libzfs_core} \ ${_libzfs} \ - ${_libzpool} + ${_libzpool} \ + ${_tests} + +.if ${MK_TESTS} != "no" +_tests= tests +.endif .if ${MK_ZFS} != "no" _libzfs_core= libzfs_core Modified: stable/10/cddl/sbin/Makefile ============================================================================== --- stable/10/cddl/sbin/Makefile Mon Apr 28 02:35:28 2014 (r265036) +++ stable/10/cddl/sbin/Makefile Mon Apr 28 04:20:14 2014 (r265037) @@ -2,7 +2,11 @@ .include -SUBDIR= ${_zfs} ${_zpool} +SUBDIR= ${_tests} ${_zfs} ${_zpool} + +.if ${MK_TESTS} != "no" +_tests= tests +.endif .if ${MK_ZFS} != "no" _zfs= zfs Modified: stable/10/cddl/usr.bin/Makefile ============================================================================== --- stable/10/cddl/usr.bin/Makefile Mon Apr 28 02:35:28 2014 (r265036) +++ stable/10/cddl/usr.bin/Makefile Mon Apr 28 04:20:14 2014 (r265037) @@ -7,11 +7,16 @@ SUBDIR= \ ctfdump \ ctfmerge \ sgsmsg \ + ${_tests} \ ${_zinject} \ ${_zlook} \ ${_zstreamdump} \ ${_ztest} +.if ${MK_TESTS} != "no" +_tests= tests +.endif + .if ${MK_ZFS} != "no" _zinject= zinject #_zlook= zlook Modified: stable/10/cddl/usr.sbin/Makefile ============================================================================== --- stable/10/cddl/usr.sbin/Makefile Mon Apr 28 02:35:28 2014 (r265036) +++ stable/10/cddl/usr.sbin/Makefile Mon Apr 28 04:20:14 2014 (r265037) @@ -5,9 +5,14 @@ SUBDIR= ${_dtrace} \ ${_dtruss} \ ${_lockstat} \ + ${_tests} \ ${_zdb} \ ${_zhack} +.if ${MK_TESTS} != "no" +_tests= tests +.endif + .if ${MK_ZFS} != "no" .if ${MK_LIBTHR} != "no" _zdb= zdb Modified: stable/10/etc/Makefile ============================================================================== --- stable/10/etc/Makefile Mon Apr 28 02:35:28 2014 (r265036) +++ stable/10/etc/Makefile Mon Apr 28 04:20:14 2014 (r265037) @@ -7,6 +7,10 @@ SUBDIR= sendmail .endif +.if ${MK_TESTS} != "no" +SUBDIR+=tests +.endif + BIN1= crontab \ devd.conf \ devfs.conf \ Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Mon Apr 28 02:35:28 2014 (r265036) +++ stable/10/etc/mtree/BSD.tests.dist Mon Apr 28 04:20:14 2014 (r265037) @@ -50,6 +50,26 @@ test .. .. + cddl + lib + .. + sbin + .. + usr.bin + .. + usr.sbin + .. + .. + etc + .. + games + .. + gnu + lib + .. + usr.bin + .. + .. lib atf libatf-c @@ -80,6 +100,16 @@ mdconfig .. .. + secure + lib + .. + libexec + .. + usr.bin + .. + usr.sbin + .. + .. share examples tests Modified: stable/10/games/Makefile ============================================================================== --- stable/10/games/Makefile Mon Apr 28 02:35:28 2014 (r265036) +++ stable/10/games/Makefile Mon Apr 28 04:20:14 2014 (r265037) @@ -1,6 +1,7 @@ -# @(#)Makefile 8.2 (Berkeley) 3/31/94 # $FreeBSD$ +.include + SUBDIR= \ bcd \ caesar \ @@ -12,6 +13,11 @@ SUBDIR= \ pom \ ppt \ primes \ - random + random \ + ${_tests} + +.if ${MK_TESTS} != "no" +_tests= tests +.endif .include Modified: stable/10/gnu/Makefile ============================================================================== --- stable/10/gnu/Makefile Mon Apr 28 02:35:28 2014 (r265036) +++ stable/10/gnu/Makefile Mon Apr 28 04:20:14 2014 (r265037) @@ -1,6 +1,12 @@ # @(#)Makefile 5.33.1.1 (Berkeley) 5/6/91 # $FreeBSD$ -SUBDIR= lib usr.bin +.include + +SUBDIR= lib ${_tests} usr.bin + +.if ${MK_TESTS} != "no" +_tests= tests +.endif .include Modified: stable/10/gnu/lib/Makefile ============================================================================== --- stable/10/gnu/lib/Makefile Mon Apr 28 02:35:28 2014 (r265036) +++ stable/10/gnu/lib/Makefile Mon Apr 28 04:20:14 2014 (r265037) @@ -8,6 +8,10 @@ SUBDIR= csu libgcc libgcov libdialog lib SUBDIR+= libssp .endif +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + # libsupc++ uses libstdc++ headers, although 'make includes' should # have taken care of that already. .if ${MK_GNUCXX} != "no" Modified: stable/10/gnu/usr.bin/Makefile ============================================================================== --- stable/10/gnu/usr.bin/Makefile Mon Apr 28 02:35:28 2014 (r265036) +++ stable/10/gnu/usr.bin/Makefile Mon Apr 28 04:20:14 2014 (r265037) @@ -15,6 +15,7 @@ SUBDIR= ${_binutils} \ ${_rcs} \ sdiff \ send-pr \ + ${_tests} \ ${_texinfo} .if ${MK_CXX} != "no" @@ -36,6 +37,10 @@ _texinfo= texinfo _rcs= rcs .endif +.if ${MK_TESTS} != "no" +_tests= tests +.endif + .if ${MK_BINUTILS} != "no" _binutils= binutils .endif Modified: stable/10/secure/Makefile ============================================================================== --- stable/10/secure/Makefile Mon Apr 28 02:35:28 2014 (r265036) +++ stable/10/secure/Makefile Mon Apr 28 04:20:14 2014 (r265037) @@ -2,7 +2,11 @@ .include -SUBDIR= lib libexec usr.bin usr.sbin +SUBDIR= lib libexec ${_tests} usr.bin usr.sbin + +.if ${MK_TESTS} != "no" +_tests= tests +.endif # These are the programs which depend on crypto, but not Kerberos. SPROGS= lib/libfetch lib/libpam lib/libradius lib/libtelnet \ Modified: stable/10/secure/lib/Makefile ============================================================================== --- stable/10/secure/lib/Makefile Mon Apr 28 02:35:28 2014 (r265036) +++ stable/10/secure/lib/Makefile Mon Apr 28 04:20:14 2014 (r265037) @@ -10,4 +10,8 @@ SUBDIR+=libssh .endif .endif +.if ${MK_TESTS} != "no" +SUBDIR+=tests +.endif + .include Modified: stable/10/secure/libexec/Makefile ============================================================================== --- stable/10/secure/libexec/Makefile Mon Apr 28 02:35:28 2014 (r265036) +++ stable/10/secure/libexec/Makefile Mon Apr 28 04:20:14 2014 (r265037) @@ -7,4 +7,8 @@ SUBDIR= SUBDIR+=sftp-server ssh-keysign ssh-pkcs11-helper .endif +.if ${MK_TESTS} != "no" +SUBDIR+=tests +.endif + .include Modified: stable/10/secure/usr.bin/Makefile ============================================================================== --- stable/10/secure/usr.bin/Makefile Mon Apr 28 02:35:28 2014 (r265036) +++ stable/10/secure/usr.bin/Makefile Mon Apr 28 04:20:14 2014 (r265037) @@ -10,4 +10,8 @@ SUBDIR+=scp sftp ssh ssh-add ssh-agent s .endif .endif +.if ${MK_TESTS} != "no" +SUBDIR+=tests +.endif + .include Modified: stable/10/secure/usr.sbin/Makefile ============================================================================== --- stable/10/secure/usr.sbin/Makefile Mon Apr 28 02:35:28 2014 (r265036) +++ stable/10/secure/usr.sbin/Makefile Mon Apr 28 04:20:14 2014 (r265037) @@ -7,4 +7,8 @@ SUBDIR= SUBDIR+=sshd .endif +.if ${MK_TESTS} != "no" +SUBDIR+=tests +.endif + .include From owner-svn-src-stable@FreeBSD.ORG Mon Apr 28 06:11:04 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3CD8231F; Mon, 28 Apr 2014 06:11:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28F301D88; Mon, 28 Apr 2014 06:11:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3S6B4bD068924; Mon, 28 Apr 2014 06:11:04 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3S6B3O6068922; Mon, 28 Apr 2014 06:11:03 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201404280611.s3S6B3O6068922@svn.freebsd.org> From: Xin LI Date: Mon, 28 Apr 2014 06:11:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265039 - in stable/10/cddl/contrib/opensolaris: cmd/zdb lib/libzfs/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Apr 2014 06:11:04 -0000 Author: delphij Date: Mon Apr 28 06:11:03 2014 New Revision: 265039 URL: http://svnweb.freebsd.org/changeset/base/265039 Log: MFC r264467: Take into account when zpool history block grows exceeding 128KB in zpool(8) and zdb(8) by growing the buffer on demand with a cap of 1GB (specified in spa_history_create_obj()). PR: bin/186574 Submitted by: Andrew Childs (with changes) Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Apr 28 05:39:20 2014 (r265038) +++ stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Apr 28 06:11:03 2014 (r265039) @@ -929,11 +929,16 @@ dump_dtl(vdev_t *vd, int indent) dump_dtl(vd->vdev_child[c], indent + 4); } +/* from spa_history.c: spa_history_create_obj() */ +#define HIS_BUF_LEN_DEF (128 << 10) +#define HIS_BUF_LEN_MAX (1 << 30) + static void dump_history(spa_t *spa) { nvlist_t **events = NULL; - char buf[SPA_MAXBLOCKSIZE]; + char *buf = NULL; + uint64_t bufsize = HIS_BUF_LEN_DEF; uint64_t resid, len, off = 0; uint_t num = 0; int error; @@ -942,8 +947,11 @@ dump_history(spa_t *spa) char tbuf[30]; char internalstr[MAXPATHLEN]; + if ((buf = malloc(bufsize)) == NULL) + (void) fprintf(stderr, "Unable to read history: " + "out of memory\n"); do { - len = sizeof (buf); + len = bufsize; if ((error = spa_history_get(spa, &off, &len, buf)) != 0) { (void) fprintf(stderr, "Unable to read history: " @@ -953,9 +961,26 @@ dump_history(spa_t *spa) if (zpool_history_unpack(buf, len, &resid, &events, &num) != 0) break; - off -= resid; + + /* + * If the history block is too big, double the buffer + * size and try again. + */ + if (resid == len) { + free(buf); + buf = NULL; + + bufsize <<= 1; + if ((bufsize >= HIS_BUF_LEN_MAX) || + ((buf = malloc(bufsize)) == NULL)) { + (void) fprintf(stderr, "Unable to read history: " + "out of memory\n"); + return; + } + } } while (len != 0); + free(buf); (void) printf("\nHistory:\n"); for (int i = 0; i < num; i++) { Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Mon Apr 28 05:39:20 2014 (r265038) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Mon Apr 28 06:11:03 2014 (r265039) @@ -3744,7 +3744,9 @@ zpool_history_unpack(char *buf, uint64_t return (0); } -#define HIS_BUF_LEN (128*1024) +/* from spa_history.c: spa_history_create_obj() */ +#define HIS_BUF_LEN_DEF (128 << 10) +#define HIS_BUF_LEN_MAX (1 << 30) /* * Retrieve the command history of a pool. @@ -3752,21 +3754,24 @@ zpool_history_unpack(char *buf, uint64_t int zpool_get_history(zpool_handle_t *zhp, nvlist_t **nvhisp) { - char buf[HIS_BUF_LEN]; + char *buf = NULL; + uint64_t bufsize = HIS_BUF_LEN_DEF; uint64_t off = 0; nvlist_t **records = NULL; uint_t numrecords = 0; int err, i; + if ((buf = malloc(bufsize)) == NULL) + return (ENOMEM); do { - uint64_t bytes_read = sizeof (buf); + uint64_t bytes_read = bufsize; uint64_t leftover; if ((err = get_history(zhp, buf, &off, &bytes_read)) != 0) break; /* if nothing else was read in, we're at EOF, just return */ - if (!bytes_read) + if (bytes_read == 0) break; if ((err = zpool_history_unpack(buf, bytes_read, @@ -3774,8 +3779,25 @@ zpool_get_history(zpool_handle_t *zhp, n break; off -= leftover; + /* + * If the history block is too big, double the buffer + * size and try again. + */ + if (leftover == bytes_read) { + free(buf); + buf = NULL; + + bufsize <<= 1; + if ((bufsize >= HIS_BUF_LEN_MAX) || + ((buf = malloc(bufsize)) == NULL)) { + err = ENOMEM; + break; + } + } + /* CONSTCOND */ } while (1); + free(buf); if (!err) { verify(nvlist_alloc(nvhisp, NV_UNIQUE_NAME, 0) == 0); From owner-svn-src-stable@FreeBSD.ORG Mon Apr 28 06:11:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3C78044D; Mon, 28 Apr 2014 06:11:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27C9E1D92; Mon, 28 Apr 2014 06:11:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3S6Bj8s069027; Mon, 28 Apr 2014 06:11:45 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3S6Biwf069025; Mon, 28 Apr 2014 06:11:44 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201404280611.s3S6Biwf069025@svn.freebsd.org> From: Xin LI Date: Mon, 28 Apr 2014 06:11:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265040 - in stable/9/cddl/contrib/opensolaris: cmd/zdb lib/libzfs/common X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Apr 2014 06:11:45 -0000 Author: delphij Date: Mon Apr 28 06:11:44 2014 New Revision: 265040 URL: http://svnweb.freebsd.org/changeset/base/265040 Log: MFC r264467: Take into account when zpool history block grows exceeding 128KB in zpool(8) and zdb(8) by growing the buffer on demand with a cap of 1GB (specified in spa_history_create_obj()). PR: bin/186574 Submitted by: Andrew Childs (with changes) Modified: stable/9/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Apr 28 06:11:03 2014 (r265039) +++ stable/9/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Apr 28 06:11:44 2014 (r265040) @@ -929,11 +929,16 @@ dump_dtl(vdev_t *vd, int indent) dump_dtl(vd->vdev_child[c], indent + 4); } +/* from spa_history.c: spa_history_create_obj() */ +#define HIS_BUF_LEN_DEF (128 << 10) +#define HIS_BUF_LEN_MAX (1 << 30) + static void dump_history(spa_t *spa) { nvlist_t **events = NULL; - char buf[SPA_MAXBLOCKSIZE]; + char *buf = NULL; + uint64_t bufsize = HIS_BUF_LEN_DEF; uint64_t resid, len, off = 0; uint_t num = 0; int error; @@ -942,8 +947,11 @@ dump_history(spa_t *spa) char tbuf[30]; char internalstr[MAXPATHLEN]; + if ((buf = malloc(bufsize)) == NULL) + (void) fprintf(stderr, "Unable to read history: " + "out of memory\n"); do { - len = sizeof (buf); + len = bufsize; if ((error = spa_history_get(spa, &off, &len, buf)) != 0) { (void) fprintf(stderr, "Unable to read history: " @@ -953,9 +961,26 @@ dump_history(spa_t *spa) if (zpool_history_unpack(buf, len, &resid, &events, &num) != 0) break; - off -= resid; + + /* + * If the history block is too big, double the buffer + * size and try again. + */ + if (resid == len) { + free(buf); + buf = NULL; + + bufsize <<= 1; + if ((bufsize >= HIS_BUF_LEN_MAX) || + ((buf = malloc(bufsize)) == NULL)) { + (void) fprintf(stderr, "Unable to read history: " + "out of memory\n"); + return; + } + } } while (len != 0); + free(buf); (void) printf("\nHistory:\n"); for (int i = 0; i < num; i++) { Modified: stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Mon Apr 28 06:11:03 2014 (r265039) +++ stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Mon Apr 28 06:11:44 2014 (r265040) @@ -3736,7 +3736,9 @@ zpool_history_unpack(char *buf, uint64_t return (0); } -#define HIS_BUF_LEN (128*1024) +/* from spa_history.c: spa_history_create_obj() */ +#define HIS_BUF_LEN_DEF (128 << 10) +#define HIS_BUF_LEN_MAX (1 << 30) /* * Retrieve the command history of a pool. @@ -3744,21 +3746,24 @@ zpool_history_unpack(char *buf, uint64_t int zpool_get_history(zpool_handle_t *zhp, nvlist_t **nvhisp) { - char buf[HIS_BUF_LEN]; + char *buf = NULL; + uint64_t bufsize = HIS_BUF_LEN_DEF; uint64_t off = 0; nvlist_t **records = NULL; uint_t numrecords = 0; int err, i; + if ((buf = malloc(bufsize)) == NULL) + return (ENOMEM); do { - uint64_t bytes_read = sizeof (buf); + uint64_t bytes_read = bufsize; uint64_t leftover; if ((err = get_history(zhp, buf, &off, &bytes_read)) != 0) break; /* if nothing else was read in, we're at EOF, just return */ - if (!bytes_read) + if (bytes_read == 0) break; if ((err = zpool_history_unpack(buf, bytes_read, @@ -3766,8 +3771,25 @@ zpool_get_history(zpool_handle_t *zhp, n break; off -= leftover; + /* + * If the history block is too big, double the buffer + * size and try again. + */ + if (leftover == bytes_read) { + free(buf); + buf = NULL; + + bufsize <<= 1; + if ((bufsize >= HIS_BUF_LEN_MAX) || + ((buf = malloc(bufsize)) == NULL)) { + err = ENOMEM; + break; + } + } + /* CONSTCOND */ } while (1); + free(buf); if (!err) { verify(nvlist_alloc(nvhisp, NV_UNIQUE_NAME, 0) == 0); From owner-svn-src-stable@FreeBSD.ORG Mon Apr 28 06:12:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D70D5583; Mon, 28 Apr 2014 06:12:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2BDC1D97; Mon, 28 Apr 2014 06:12:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3S6CFtg070142; Mon, 28 Apr 2014 06:12:15 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3S6CF6V070140; Mon, 28 Apr 2014 06:12:15 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201404280612.s3S6CF6V070140@svn.freebsd.org> From: Xin LI Date: Mon, 28 Apr 2014 06:12:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r265041 - in stable/8/cddl/contrib/opensolaris: cmd/zdb lib/libzfs/common X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Apr 2014 06:12:15 -0000 Author: delphij Date: Mon Apr 28 06:12:15 2014 New Revision: 265041 URL: http://svnweb.freebsd.org/changeset/base/265041 Log: MFC r264467: Take into account when zpool history block grows exceeding 128KB in zpool(8) and zdb(8) by growing the buffer on demand with a cap of 1GB (specified in spa_history_create_obj()). PR: bin/186574 Submitted by: Andrew Childs (with changes) Modified: stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Apr 28 06:11:44 2014 (r265040) +++ stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Apr 28 06:12:15 2014 (r265041) @@ -929,11 +929,16 @@ dump_dtl(vdev_t *vd, int indent) dump_dtl(vd->vdev_child[c], indent + 4); } +/* from spa_history.c: spa_history_create_obj() */ +#define HIS_BUF_LEN_DEF (128 << 10) +#define HIS_BUF_LEN_MAX (1 << 30) + static void dump_history(spa_t *spa) { nvlist_t **events = NULL; - char buf[SPA_MAXBLOCKSIZE]; + char *buf = NULL; + uint64_t bufsize = HIS_BUF_LEN_DEF; uint64_t resid, len, off = 0; uint_t num = 0; int error; @@ -942,8 +947,11 @@ dump_history(spa_t *spa) char tbuf[30]; char internalstr[MAXPATHLEN]; + if ((buf = malloc(bufsize)) == NULL) + (void) fprintf(stderr, "Unable to read history: " + "out of memory\n"); do { - len = sizeof (buf); + len = bufsize; if ((error = spa_history_get(spa, &off, &len, buf)) != 0) { (void) fprintf(stderr, "Unable to read history: " @@ -953,9 +961,26 @@ dump_history(spa_t *spa) if (zpool_history_unpack(buf, len, &resid, &events, &num) != 0) break; - off -= resid; + + /* + * If the history block is too big, double the buffer + * size and try again. + */ + if (resid == len) { + free(buf); + buf = NULL; + + bufsize <<= 1; + if ((bufsize >= HIS_BUF_LEN_MAX) || + ((buf = malloc(bufsize)) == NULL)) { + (void) fprintf(stderr, "Unable to read history: " + "out of memory\n"); + return; + } + } } while (len != 0); + free(buf); (void) printf("\nHistory:\n"); for (int i = 0; i < num; i++) { Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Mon Apr 28 06:11:44 2014 (r265040) +++ stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Mon Apr 28 06:12:15 2014 (r265041) @@ -3736,7 +3736,9 @@ zpool_history_unpack(char *buf, uint64_t return (0); } -#define HIS_BUF_LEN (128*1024) +/* from spa_history.c: spa_history_create_obj() */ +#define HIS_BUF_LEN_DEF (128 << 10) +#define HIS_BUF_LEN_MAX (1 << 30) /* * Retrieve the command history of a pool. @@ -3744,21 +3746,24 @@ zpool_history_unpack(char *buf, uint64_t int zpool_get_history(zpool_handle_t *zhp, nvlist_t **nvhisp) { - char buf[HIS_BUF_LEN]; + char *buf = NULL; + uint64_t bufsize = HIS_BUF_LEN_DEF; uint64_t off = 0; nvlist_t **records = NULL; uint_t numrecords = 0; int err, i; + if ((buf = malloc(bufsize)) == NULL) + return (ENOMEM); do { - uint64_t bytes_read = sizeof (buf); + uint64_t bytes_read = bufsize; uint64_t leftover; if ((err = get_history(zhp, buf, &off, &bytes_read)) != 0) break; /* if nothing else was read in, we're at EOF, just return */ - if (!bytes_read) + if (bytes_read == 0) break; if ((err = zpool_history_unpack(buf, bytes_read, @@ -3766,8 +3771,25 @@ zpool_get_history(zpool_handle_t *zhp, n break; off -= leftover; + /* + * If the history block is too big, double the buffer + * size and try again. + */ + if (leftover == bytes_read) { + free(buf); + buf = NULL; + + bufsize <<= 1; + if ((bufsize >= HIS_BUF_LEN_MAX) || + ((buf = malloc(bufsize)) == NULL)) { + err = ENOMEM; + break; + } + } + /* CONSTCOND */ } while (1); + free(buf); if (!err) { verify(nvlist_alloc(nvhisp, NV_UNIQUE_NAME, 0) == 0); From owner-svn-src-stable@FreeBSD.ORG Mon Apr 28 12:46:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B26AA1F; Mon, 28 Apr 2014 12:46:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B97A17B8; Mon, 28 Apr 2014 12:46:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3SCkOEU030888; Mon, 28 Apr 2014 12:46:24 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3SCkORV030885; Mon, 28 Apr 2014 12:46:24 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201404281246.s3SCkORV030885@svn.freebsd.org> From: Ian Lepore Date: Mon, 28 Apr 2014 12:46:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265047 - in stable/10: share/man/man4 sys/dev/usb sys/dev/usb/serial X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Apr 2014 12:46:24 -0000 Author: ian Date: Mon Apr 28 12:46:23 2014 New Revision: 265047 URL: http://svnweb.freebsd.org/changeset/base/265047 Log: MFC uftdi(4) driver changes... r264010: Support speeds up to 12mbaud on newer chips. r264031: Use 2K IO buffers for improved throughput. r264149: Add ioctl(2) calls to access bitbang, MPSSE, CPU_FIFO, and other modes. Added: stable/10/sys/dev/usb/uftdiio.h - copied unchanged from r264149, head/sys/dev/usb/uftdiio.h Modified: stable/10/share/man/man4/uftdi.4 stable/10/sys/dev/usb/serial/uftdi.c stable/10/sys/dev/usb/serial/uftdi_reg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/uftdi.4 ============================================================================== --- stable/10/share/man/man4/uftdi.4 Mon Apr 28 09:00:00 2014 (r265046) +++ stable/10/share/man/man4/uftdi.4 Mon Apr 28 12:46:23 2014 (r265047) @@ -61,6 +61,87 @@ The device is accessed through the .Xr ucom 4 driver which makes it behave like a .Xr tty 4 . +.Pp +Many of the supported chips provide additional functionality +such as bitbang mode and the MPSSE engine for serial bus emulation. +The +.Nm +driver provides access to that functionality with the following +.Xr ioctl 2 +calls, defined in +.In dev/usb/uftdiio.h : +.Bl -tag -width indent +.It Dv UFTDIIOC_RESET_IO Pq Vt int +Reset the channel to its default configuration, flush RX and TX FIFOs. +.It Dv UFTDIIOC_RESET_RX Pq Vt int +Flush the RX FIFO. +.It Dv UFTDIIOC_RESET_TX Pq Vt int +Flush the TX FIFO. +.It Dv UFTDIIOC_SET_BITMODE Pq Vt "struct uftdi_bitmode" +Put the channel into the operating mode specified in +.Va mode , +and set the pins indicated by ones in +.Va iomask +to output mode. +The +.Va mode +must be one of the +.Va uftdi_bitmodes +values. +.Bd -literal +enum uftdi_bitmodes +{ + UFTDI_BITMODE_ASYNC = 0, + UFTDI_BITMODE_MPSSE = 1, + UFTDI_BITMODE_SYNC = 2, + UFTDI_BITMODE_CPU_EMUL = 3, + UFTDI_BITMODE_FAST_SERIAL = 4, + UFTDI_BITMODE_CBUS = 5, + UFTDI_BITMODE_NONE = 0xff, +}; + +struct uftdi_bitmode +{ + uint8_t mode; + uint8_t iomask; +}; +.Ed +.Pp +Manuals and application notes published by FTDI describe these +modes in detail. +To use most of these modes, you first put the channel into +the desired mode, then you +.Xr read 2 +and +.Xr write 2 +data which either reflects pin state or is interpreted +as MPSSE commands and parameters, depending on the mode. +.It Dv UFTDIIOC_GET_BITMODE Pq Vt "struct uftdi_bitmode" +Return the state of the bitbang pins at the time of the call in the +.Va iomask +member. +The +.Va mode +member is unused. +.It Dv UFTDIIOC_SET_ERROR_CHAR Pq Vt int +Set the character which is inserted into the buffer to mark +the point of an error such as FIFO overflow. +.It Dv UFTDIIOC_SET_EVENT_CHAR Pq Vt int +Set the character which causes a partial FIFO full of data +to be returned immediately even if the FIFO is not full. +.It Dv UFTDIIOC_SET_LATENCY Pq Vt int +Set the amount of time to wait for a full FIFO, +in milliseconds. +If more than this much time elapses without receiving a new +character, any characters in the FIFO are returned. +.It Dv UFTDIIOC_GET_LATENCY Pq Vt int +Get the current value of the latency timer. +.It Dv UFTDIIOC_GET_HWREV Pq Vt int +Get the hardware revision number. +This is the +.Va bcdDevice +value from the +.Va usb_device_descriptor . .Sh HARDWARE The .Nm Modified: stable/10/sys/dev/usb/serial/uftdi.c ============================================================================== --- stable/10/sys/dev/usb/serial/uftdi.c Mon Apr 28 09:00:00 2014 (r265046) +++ stable/10/sys/dev/usb/serial/uftdi.c Mon Apr 28 12:46:23 2014 (r265047) @@ -38,7 +38,14 @@ __FBSDID("$FreeBSD$"); */ /* - * FTDI FT2232x, FT8U100AX and FT8U232AM serial adapter driver + * FTDI FT232x, FT2232x, FT4232x, FT8U100AX and FT8U232xM serial adapters. + * + * Note that we specifically do not do a reset or otherwise alter the state of + * the chip during attach, detach, open, and close, because it could be + * pre-initialized (via an attached serial eeprom) to power-on into a mode such + * as bitbang in which the pins are being driven to a specific state which we + * must not perturb. The device gets reset at power-on, and doesn't need to be + * reset again after that to function, except as directed by ioctl() calls. */ #include @@ -63,6 +70,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include "usbdevs.h" #define USB_DEBUG_VAR uftdi_debug @@ -71,6 +80,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #ifdef USB_DEBUG static int uftdi_debug = 0; @@ -83,8 +93,34 @@ SYSCTL_INT(_hw_usb_uftdi, OID_AUTO, debu #define UFTDI_CONFIG_INDEX 0 #define UFTDI_IFACE_INDEX_JTAG 0 -#define UFTDI_OBUFSIZE 64 /* bytes, cannot be increased due to - * do size encoding */ +/* + * IO buffer sizes and FTDI device procotol sizes. + * + * Note that the output packet size in the following defines is not the usb + * protocol packet size based on bus speed, it is the size dictated by the FTDI + * device itself, and is used only on older chips. + * + * We allocate buffers bigger than the hardware's packet size, and process + * multiple packets within each buffer. This allows the controller to make + * optimal use of the usb bus by conducting multiple transfers with the device + * during a single bus timeslice to fill or drain the chip's fifos. + * + * The output data on newer chips has no packet header, and we are able to pack + * any number of output bytes into a buffer. On some older chips, each output + * packet contains a 1-byte header and up to 63 bytes of payload. The size is + * encoded in 6 bits of the header, hence the 64-byte limit on packet size. We + * loop to fill the buffer with many of these header+payload packets. + * + * The input data on all chips consists of packets which contain a 2-byte header + * followed by data payload. The total size of the packet is wMaxPacketSize + * which can change based on the bus speed (e.g., 64 for full speed, 512 for + * high speed). We loop to extract the headers and payloads from the packets + * packed into an input buffer. + */ +#define UFTDI_IBUFSIZE 2048 +#define UFTDI_IHDRSIZE 2 +#define UFTDI_OBUFSIZE 2048 +#define UFTDI_OPKTSIZE 64 enum { UFTDI_BULK_DT_WR, @@ -92,6 +128,21 @@ enum { UFTDI_N_TRANSFER, }; +enum { + DEVT_SIO, + DEVT_232A, + DEVT_232B, + DEVT_2232D, /* Includes 2232C */ + DEVT_232R, + DEVT_2232H, + DEVT_4232H, + DEVT_232H, + DEVT_230X, +}; + +#define DEVF_BAUDBITS_HINDEX 0x01 /* Baud bits in high byte of index. */ +#define DEVF_BAUDCLK_12M 0X02 /* Base baud clock is 12MHz. */ + struct uftdi_softc { struct ucom_super_softc sc_super_ucom; struct ucom_softc sc_ucom; @@ -104,16 +155,18 @@ struct uftdi_softc { uint32_t sc_unit; uint16_t sc_last_lcr; + uint16_t sc_bcdDevice; - uint8_t sc_type; - uint8_t sc_iface_index; + uint8_t sc_devtype; + uint8_t sc_devflags; uint8_t sc_hdrlen; uint8_t sc_msr; uint8_t sc_lsr; }; struct uftdi_param_config { - uint16_t rate; + uint16_t baud_lobits; + uint16_t baud_hibits; uint16_t lcr; uint8_t v_start; uint8_t v_stop; @@ -132,20 +185,29 @@ static usb_callback_t uftdi_read_callbac static void uftdi_free(struct ucom_softc *); static void uftdi_cfg_open(struct ucom_softc *); +static void uftdi_cfg_close(struct ucom_softc *); static void uftdi_cfg_set_dtr(struct ucom_softc *, uint8_t); static void uftdi_cfg_set_rts(struct ucom_softc *, uint8_t); static void uftdi_cfg_set_break(struct ucom_softc *, uint8_t); -static int uftdi_set_parm_soft(struct termios *, - struct uftdi_param_config *, uint8_t); +static int uftdi_set_parm_soft(struct ucom_softc *, struct termios *, + struct uftdi_param_config *); static int uftdi_pre_param(struct ucom_softc *, struct termios *); static void uftdi_cfg_param(struct ucom_softc *, struct termios *); static void uftdi_cfg_get_status(struct ucom_softc *, uint8_t *, uint8_t *); +static int uftdi_reset(struct ucom_softc *, int); +static int uftdi_set_bitmode(struct ucom_softc *, uint8_t, uint8_t); +static int uftdi_get_bitmode(struct ucom_softc *, uint8_t *); +static int uftdi_set_latency(struct ucom_softc *, int); +static int uftdi_get_latency(struct ucom_softc *, int *); +static int uftdi_set_event_char(struct ucom_softc *, int); +static int uftdi_set_error_char(struct ucom_softc *, int); +static int uftdi_ioctl(struct ucom_softc *, uint32_t, caddr_t, int, + struct thread *); static void uftdi_start_read(struct ucom_softc *); static void uftdi_stop_read(struct ucom_softc *); static void uftdi_start_write(struct ucom_softc *); static void uftdi_stop_write(struct ucom_softc *); -static uint8_t uftdi_8u232am_getrate(uint32_t, uint16_t *); static void uftdi_poll(struct ucom_softc *ucom); static const struct usb_config uftdi_config[UFTDI_N_TRANSFER] = { @@ -163,7 +225,7 @@ static const struct usb_config uftdi_con .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .bufsize = 0, /* use wMaxPacketSize */ + .bufsize = UFTDI_IBUFSIZE, .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, .callback = &uftdi_read_callback, }, @@ -176,7 +238,9 @@ static const struct ucom_callback uftdi_ .ucom_cfg_set_break = &uftdi_cfg_set_break, .ucom_cfg_param = &uftdi_cfg_param, .ucom_cfg_open = &uftdi_cfg_open, + .ucom_cfg_close = &uftdi_cfg_close, .ucom_pre_param = &uftdi_pre_param, + .ucom_ioctl = &uftdi_ioctl, .ucom_start_read = &uftdi_start_read, .ucom_stop_read = &uftdi_stop_read, .ucom_start_write = &uftdi_start_write, @@ -847,6 +911,82 @@ static const STRUCT_USB_HOST_ID uftdi_de #undef UFTDI_DEV }; +/* + * Set up softc fields whose value depends on the device type. + * + * Note that the 2232C and 2232D devices are the same for our purposes. In the + * silicon the difference is that the D series has CPU FIFO mode and C doesn't. + * I haven't found any way of determining the C/D difference from info provided + * by the chip other than trying to set CPU FIFO mode and having it work or not. + * + * Due to a hardware bug, a 232B chip without an eeprom reports itself as a + * 232A, but if the serial number is also zero we know it's really a 232B. + */ +static void +uftdi_devtype_setup(struct uftdi_softc *sc, struct usb_attach_arg *uaa) +{ + struct usb_device_descriptor *dd; + + sc->sc_bcdDevice = uaa->info.bcdDevice; + + switch (uaa->info.bcdDevice) { + case 0x200: + dd = usbd_get_device_descriptor(sc->sc_udev); + if (dd->iSerialNumber == 0) { + sc->sc_devtype = DEVT_232B; + } else { + sc->sc_devtype = DEVT_232A; + } + sc->sc_ucom.sc_portno = 0; + break; + case 0x400: + sc->sc_devtype = DEVT_232B; + sc->sc_ucom.sc_portno = 0; + break; + case 0x500: + sc->sc_devtype = DEVT_2232D; + sc->sc_devflags |= DEVF_BAUDBITS_HINDEX; + sc->sc_ucom.sc_portno = FTDI_PIT_SIOA + uaa->info.bIfaceNum; + break; + case 0x600: + sc->sc_devtype = DEVT_232R; + sc->sc_ucom.sc_portno = 0; + break; + case 0x700: + sc->sc_devtype = DEVT_2232H; + sc->sc_devflags |= DEVF_BAUDBITS_HINDEX | DEVF_BAUDCLK_12M; + sc->sc_ucom.sc_portno = FTDI_PIT_SIOA + uaa->info.bIfaceNum; + break; + case 0x800: + sc->sc_devtype = DEVT_4232H; + sc->sc_devflags |= DEVF_BAUDBITS_HINDEX | DEVF_BAUDCLK_12M; + sc->sc_ucom.sc_portno = FTDI_PIT_SIOA + uaa->info.bIfaceNum; + break; + case 0x900: + sc->sc_devtype = DEVT_232H; + sc->sc_devflags |= DEVF_BAUDBITS_HINDEX | DEVF_BAUDCLK_12M; + sc->sc_ucom.sc_portno = FTDI_PIT_SIOA + uaa->info.bIfaceNum; + break; + case 0x1000: + sc->sc_devtype = DEVT_230X; + sc->sc_devflags |= DEVF_BAUDBITS_HINDEX; + sc->sc_ucom.sc_portno = FTDI_PIT_SIOA + uaa->info.bIfaceNum; + break; + default: + if (uaa->info.bcdDevice < 0x200) { + sc->sc_devtype = DEVT_SIO; + sc->sc_hdrlen = 1; + } else { + sc->sc_devtype = DEVT_232R; + device_printf(sc->sc_dev, "Warning: unknown FTDI " + "device type, bcdDevice=0x%04x, assuming 232R", + uaa->info.bcdDevice); + } + sc->sc_ucom.sc_portno = 0; + break; + } +} + static int uftdi_probe(device_t dev) { @@ -886,6 +1026,8 @@ uftdi_attach(device_t dev) struct uftdi_softc *sc = device_get_softc(dev); int error; + DPRINTF("\n"); + sc->sc_udev = uaa->device; sc->sc_dev = dev; sc->sc_unit = device_get_unit(dev); @@ -894,34 +1036,11 @@ uftdi_attach(device_t dev) mtx_init(&sc->sc_mtx, "uftdi", NULL, MTX_DEF); ucom_ref(&sc->sc_super_ucom); - DPRINTF("\n"); - sc->sc_iface_index = uaa->info.bIfaceIndex; - sc->sc_type = USB_GET_DRIVER_INFO(uaa) & UFTDI_TYPE_MASK; - - switch (sc->sc_type) { - case UFTDI_TYPE_AUTO: - /* simplified type check */ - if (uaa->info.bcdDevice >= 0x0200 || - usbd_get_iface(uaa->device, 1) != NULL) { - sc->sc_type = UFTDI_TYPE_8U232AM; - sc->sc_hdrlen = 0; - } else { - sc->sc_type = UFTDI_TYPE_SIO; - sc->sc_hdrlen = 1; - } - break; - case UFTDI_TYPE_SIO: - sc->sc_hdrlen = 1; - break; - case UFTDI_TYPE_8U232AM: - default: - sc->sc_hdrlen = 0; - break; - } + uftdi_devtype_setup(sc, uaa); error = usbd_transfer_setup(uaa->device, - &sc->sc_iface_index, sc->sc_xfer, uftdi_config, + &uaa->info.bIfaceIndex, sc->sc_xfer, uftdi_config, UFTDI_N_TRANSFER, sc, &sc->sc_mtx); if (error) { @@ -929,8 +1048,6 @@ uftdi_attach(device_t dev) "transfers failed\n"); goto detach; } - sc->sc_ucom.sc_portno = FTDI_PIT_SIOA + uaa->info.bIfaceNum; - /* clear stall at first run */ mtx_lock(&sc->sc_mtx); usbd_xfer_set_stall(sc->sc_xfer[UFTDI_BULK_DT_WR]); @@ -993,37 +1110,25 @@ uftdi_free(struct ucom_softc *ucom) static void uftdi_cfg_open(struct ucom_softc *ucom) { - struct uftdi_softc *sc = ucom->sc_parent; - uint16_t wIndex = ucom->sc_portno; - struct usb_device_request req; + /* + * This do-nothing open routine exists for the sole purpose of this + * DPRINTF() so that you can see the point at which open gets called + * when debugging is enabled. + */ DPRINTF(""); +} - /* perform a full reset on the device */ - - req.bmRequestType = UT_WRITE_VENDOR_DEVICE; - req.bRequest = FTDI_SIO_RESET; - USETW(req.wValue, FTDI_SIO_RESET_SIO); - USETW(req.wIndex, wIndex); - USETW(req.wLength, 0); - ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, - &req, NULL, 0, 1000); - - /* turn on RTS/CTS flow control */ - - req.bmRequestType = UT_WRITE_VENDOR_DEVICE; - req.bRequest = FTDI_SIO_SET_FLOW_CTRL; - USETW(req.wValue, 0); - USETW2(req.wIndex, FTDI_SIO_RTS_CTS_HS, wIndex); - USETW(req.wLength, 0); - ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, - &req, NULL, 0, 1000); +static void +uftdi_cfg_close(struct ucom_softc *ucom) +{ /* - * NOTE: with the new UCOM layer there will always be a - * "uftdi_cfg_param()" call after "open()", so there is no need for - * "open()" to configure anything + * This do-nothing close routine exists for the sole purpose of this + * DPRINTF() so that you can see the point at which close gets called + * when debugging is enabled. */ + DPRINTF(""); } static void @@ -1031,35 +1136,47 @@ uftdi_write_callback(struct usb_xfer *xf { struct uftdi_softc *sc = usbd_xfer_softc(xfer); struct usb_page_cache *pc; - uint32_t actlen; + uint32_t pktlen; + uint32_t buflen; uint8_t buf[1]; switch (USB_GET_STATE(xfer)) { + default: /* Error */ + if (error != USB_ERR_CANCELLED) { + /* try to clear stall first */ + usbd_xfer_set_stall(xfer); + } + /* FALLTHROUGH */ case USB_ST_SETUP: case USB_ST_TRANSFERRED: -tr_setup: + /* + * If output packets don't require headers (the common case) we + * can just load the buffer up with payload bytes all at once. + * Otherwise, loop to format packets into the buffer while there + * is data available, and room for a packet header and at least + * one byte of payload. + */ pc = usbd_xfer_get_frame(xfer, 0); - if (ucom_get_data(&sc->sc_ucom, pc, - sc->sc_hdrlen, UFTDI_OBUFSIZE - sc->sc_hdrlen, - &actlen)) { - - if (sc->sc_hdrlen > 0) { - buf[0] = - FTDI_OUT_TAG(actlen, sc->sc_ucom.sc_portno); - usbd_copy_in(pc, 0, buf, 1); + if (sc->sc_hdrlen == 0) { + ucom_get_data(&sc->sc_ucom, pc, 0, UFTDI_OBUFSIZE, + &buflen); + } else { + buflen = 0; + while (buflen < UFTDI_OBUFSIZE - sc->sc_hdrlen - 1 && + ucom_get_data(&sc->sc_ucom, pc, buflen + + sc->sc_hdrlen, UFTDI_OPKTSIZE - sc->sc_hdrlen, + &pktlen) != 0) { + buf[0] = FTDI_OUT_TAG(pktlen, + sc->sc_ucom.sc_portno); + usbd_copy_in(pc, buflen, buf, 1); + buflen += pktlen + sc->sc_hdrlen; } - usbd_xfer_set_frame_len(xfer, 0, actlen + sc->sc_hdrlen); - usbd_transfer_submit(xfer); } - return; - - default: /* Error */ - if (error != USB_ERR_CANCELLED) { - /* try to clear stall first */ - usbd_xfer_set_stall(xfer); - goto tr_setup; + if (buflen != 0) { + usbd_xfer_set_frame_len(xfer, 0, buflen); + usbd_transfer_submit(xfer); } - return; + break; } } @@ -1072,23 +1189,47 @@ uftdi_read_callback(struct usb_xfer *xfe uint8_t ftdi_msr; uint8_t msr; uint8_t lsr; - int actlen; + int buflen; + int pktlen; + int pktmax; + int offset; - usbd_xfer_status(xfer, &actlen, NULL, NULL, NULL); + usbd_xfer_status(xfer, &buflen, NULL, NULL, NULL); switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: - - if (actlen < 2) { + if (buflen < UFTDI_IHDRSIZE) goto tr_setup; - } pc = usbd_xfer_get_frame(xfer, 0); - usbd_copy_out(pc, 0, buf, 2); - + pktmax = xfer->max_packet_size - UFTDI_IHDRSIZE; + lsr = 0; + msr = 0; + offset = 0; + /* + * Extract packet headers and payload bytes from the buffer. + * Feed payload bytes to ucom/tty layer; OR-accumulate header + * status bits which are transient and could toggle with each + * packet. After processing all packets in the buffer, process + * the accumulated transient MSR and LSR values along with the + * non-transient bits from the last packet header. + */ + while (buflen >= UFTDI_IHDRSIZE) { + usbd_copy_out(pc, offset, buf, UFTDI_IHDRSIZE); + offset += UFTDI_IHDRSIZE; + buflen -= UFTDI_IHDRSIZE; + lsr |= FTDI_GET_LSR(buf); + if (FTDI_GET_MSR(buf) & FTDI_SIO_RI_MASK) + msr |= SER_RI; + pktlen = min(buflen, pktmax); + if (pktlen != 0) { + ucom_put_data(&sc->sc_ucom, pc, offset, + pktlen); + offset += pktlen; + buflen -= pktlen; + } + } ftdi_msr = FTDI_GET_MSR(buf); - lsr = FTDI_GET_LSR(buf); - msr = 0; if (ftdi_msr & FTDI_SIO_CTS_MASK) msr |= SER_CTS; if (ftdi_msr & FTDI_SIO_DSR_MASK) @@ -1109,11 +1250,7 @@ uftdi_read_callback(struct usb_xfer *xfe ucom_status_change(&sc->sc_ucom); } - actlen -= 2; - - if (actlen > 0) { - ucom_put_data(&sc->sc_ucom, pc, 2, actlen); - } + /* FALLTHROUGH */ case USB_ST_SETUP: tr_setup: usbd_xfer_set_frame_len(xfer, 0, usbd_xfer_max_len(xfer)); @@ -1193,58 +1330,162 @@ uftdi_cfg_set_break(struct ucom_softc *u &req, NULL, 0, 1000); } -static int -uftdi_set_parm_soft(struct termios *t, - struct uftdi_param_config *cfg, uint8_t type) +/* + * Return true if the given speed is within operational tolerance of the target + * speed. FTDI recommends that the hardware speed be within 3% of nominal. + */ +static inline boolean_t +uftdi_baud_within_tolerance(uint64_t speed, uint64_t target) { + return ((speed >= (target * 100) / 103) && + (speed <= (target * 100) / 97)); +} - memset(cfg, 0, sizeof(*cfg)); +static int +uftdi_sio_encode_baudrate(struct uftdi_softc *sc, speed_t speed, + struct uftdi_param_config *cfg) +{ + u_int i; + const speed_t sio_speeds[] = { + 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200 + }; - switch (type) { - case UFTDI_TYPE_SIO: - switch (t->c_ospeed) { - case 300: - cfg->rate = ftdi_sio_b300; - break; - case 600: - cfg->rate = ftdi_sio_b600; - break; - case 1200: - cfg->rate = ftdi_sio_b1200; - break; - case 2400: - cfg->rate = ftdi_sio_b2400; - break; - case 4800: - cfg->rate = ftdi_sio_b4800; - break; - case 9600: - cfg->rate = ftdi_sio_b9600; - break; - case 19200: - cfg->rate = ftdi_sio_b19200; - break; - case 38400: - cfg->rate = ftdi_sio_b38400; - break; - case 57600: - cfg->rate = ftdi_sio_b57600; - break; - case 115200: - cfg->rate = ftdi_sio_b115200; - break; - default: - return (EINVAL); + /* + * The original SIO chips were limited to a small choice of speeds + * listed in an internal table of speeds chosen by an index value. + */ + for (i = 0; i < nitems(sio_speeds); ++i) { + if (speed == sio_speeds[i]) { + cfg->baud_lobits = i; + cfg->baud_hibits = 0; + return (0); } - break; + } + return (ERANGE); +} - case UFTDI_TYPE_8U232AM: - if (uftdi_8u232am_getrate(t->c_ospeed, &cfg->rate)) { - return (EINVAL); - } - break; +static int +uftdi_encode_baudrate(struct uftdi_softc *sc, speed_t speed, + struct uftdi_param_config *cfg) +{ + static const uint8_t encoded_fraction[8] = {0, 3, 2, 4, 1, 5, 6, 7}; + static const uint8_t roundoff_232a[16] = { + 0, 1, 0, 1, 0, -1, 2, 1, + 0, -1, -2, -3, 4, 3, 2, 1, + }; + uint32_t clk, divisor, fastclk_flag, frac, hwspeed; + + /* + * If this chip has the fast clock capability and the speed is within + * range, use the 12MHz clock, otherwise the standard clock is 3MHz. + */ + if ((sc->sc_devflags & DEVF_BAUDCLK_12M) && speed >= 1200) { + clk = 12000000; + fastclk_flag = (1 << 17); + } else { + clk = 3000000; + fastclk_flag = 0; } + /* + * Make sure the requested speed is reachable with the available clock + * and a 14-bit divisor. + */ + if (speed < (clk >> 14) || speed > clk) + return (ERANGE); + + /* + * Calculate the divisor, initially yielding a fixed point number with a + * 4-bit (1/16ths) fraction, then round it to the nearest fraction the + * hardware can handle. When the integral part of the divisor is + * greater than one, the fractional part is in 1/8ths of the base clock. + * The FT8U232AM chips can handle only 0.125, 0.250, and 0.5 fractions. + * Later chips can handle all 1/8th fractions. + * + * If the integral part of the divisor is 1, a special rule applies: the + * fractional part can only be .0 or .5 (this is a limitation of the + * hardware). We handle this by truncating the fraction rather than + * rounding, because this only applies to the two fastest speeds the + * chip can achieve and rounding doesn't matter, either you've asked for + * that exact speed or you've asked for something the chip can't do. + * + * For the FT8U232AM chips, use a roundoff table to adjust the result + * to the nearest 1/8th fraction that is supported by the hardware, + * leaving a fixed-point number with a 3-bit fraction which exactly + * represents the math the hardware divider will do. For later-series + * chips that support all 8 fractional divisors, just round 16ths to + * 8ths by adding 1 and dividing by 2. + */ + divisor = (clk << 4) / speed; + if ((divisor & 0xfffffff0) == 1) + divisor &= 0xfffffff8; + else if (sc->sc_devtype == DEVT_232A) + divisor += roundoff_232a[divisor & 0x0f]; + else + divisor += 1; /* Rounds odd 16ths up to next 8th. */ + divisor >>= 1; + + /* + * Ensure the resulting hardware speed will be within operational + * tolerance (within 3% of nominal). + */ + hwspeed = (clk << 3) / divisor; + if (!uftdi_baud_within_tolerance(hwspeed, speed)) + return (ERANGE); + + /* + * Re-pack the divisor into hardware format. The lower 14-bits hold the + * integral part, while the upper bits specify the fraction by indexing + * a table of fractions within the hardware which is laid out as: + * {0.0, 0.5, 0.25, 0.125, 0.325, 0.625, 0.725, 0.875} + * The A-series chips only have the first four table entries; the + * roundoff table logic above ensures that the fractional part for those + * chips will be one of the first four values. + * + * When the divisor is 1 a special encoding applies: 1.0 is encoded as + * 0.0, and 1.5 is encoded as 1.0. The rounding logic above has already + * ensured that the fraction is either .0 or .5 if the integral is 1. + */ + frac = divisor & 0x07; + divisor >>= 3; + if (divisor == 1) { + if (frac == 0) + divisor = 0; /* 1.0 becomes 0.0 */ + else + frac = 0; /* 1.5 becomes 1.0 */ + } + divisor |= (encoded_fraction[frac] << 14) | fastclk_flag; + + cfg->baud_lobits = (uint16_t)divisor; + cfg->baud_hibits = (uint16_t)(divisor >> 16); + + /* + * If this chip requires the baud bits to be in the high byte of the + * index word, move the bits up to that location. + */ + if (sc->sc_devflags & DEVF_BAUDBITS_HINDEX) { + cfg->baud_hibits <<= 8; + } + + return (0); +} + +static int +uftdi_set_parm_soft(struct ucom_softc *ucom, struct termios *t, + struct uftdi_param_config *cfg) +{ + struct uftdi_softc *sc = ucom->sc_parent; + int err; + + memset(cfg, 0, sizeof(*cfg)); + + if (sc->sc_devtype == DEVT_SIO) + err = uftdi_sio_encode_baudrate(sc, t->c_ospeed, cfg); + else + err = uftdi_encode_baudrate(sc, t->c_ospeed, cfg); + if (err != 0) + return (err); + if (t->c_cflag & CSTOPB) cfg->lcr = FTDI_SIO_SET_DATA_STOP_BITS_2; else @@ -1294,12 +1535,11 @@ uftdi_set_parm_soft(struct termios *t, static int uftdi_pre_param(struct ucom_softc *ucom, struct termios *t) { - struct uftdi_softc *sc = ucom->sc_parent; struct uftdi_param_config cfg; DPRINTF("\n"); - return (uftdi_set_parm_soft(t, &cfg, sc->sc_type)); + return (uftdi_set_parm_soft(ucom, t, &cfg)); } static void @@ -1310,7 +1550,7 @@ uftdi_cfg_param(struct ucom_softc *ucom, struct uftdi_param_config cfg; struct usb_device_request req; - if (uftdi_set_parm_soft(t, &cfg, sc->sc_type)) { + if (uftdi_set_parm_soft(ucom, t, &cfg)) { /* should not happen */ return; } @@ -1320,8 +1560,8 @@ uftdi_cfg_param(struct ucom_softc *ucom, req.bmRequestType = UT_WRITE_VENDOR_DEVICE; req.bRequest = FTDI_SIO_SET_BAUD_RATE; - USETW(req.wValue, cfg.rate); - USETW(req.wIndex, wIndex); + USETW(req.wValue, cfg.baud_lobits); + USETW(req.wIndex, cfg.baud_hibits | wIndex); USETW(req.wLength, 0); ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, &req, NULL, 0, 1000); @@ -1355,6 +1595,186 @@ uftdi_cfg_get_status(struct ucom_softc * *lsr = sc->sc_lsr; } +static int +uftdi_reset(struct ucom_softc *ucom, int reset_type) +{ + struct uftdi_softc *sc = ucom->sc_parent; + usb_device_request_t req; + + req.bmRequestType = UT_WRITE_VENDOR_DEVICE; + req.bRequest = FTDI_SIO_RESET; + + USETW(req.wIndex, sc->sc_ucom.sc_portno); + USETW(req.wLength, 0); + USETW(req.wValue, reset_type); + + return (usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, NULL)); +} + +static int +uftdi_set_bitmode(struct ucom_softc *ucom, uint8_t bitmode, uint8_t iomask) +{ + struct uftdi_softc *sc = ucom->sc_parent; + usb_device_request_t req; + + req.bmRequestType = UT_WRITE_VENDOR_DEVICE; + req.bRequest = FTDI_SIO_SET_BITMODE; + + USETW(req.wIndex, sc->sc_ucom.sc_portno); + USETW(req.wLength, 0); + + if (bitmode == UFTDI_BITMODE_NONE) + USETW2(req.wValue, 0, 0); + else + USETW2(req.wValue, (1 << bitmode), iomask); + + return (usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, NULL)); +} + +static int +uftdi_get_bitmode(struct ucom_softc *ucom, uint8_t *iomask) +{ + struct uftdi_softc *sc = ucom->sc_parent; + usb_device_request_t req; + + req.bmRequestType = UT_WRITE_VENDOR_DEVICE; + req.bRequest = FTDI_SIO_GET_BITMODE; + + USETW(req.wIndex, sc->sc_ucom.sc_portno); + USETW(req.wLength, 1); + USETW(req.wValue, 0); + + return (usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, iomask)); +} + +static int +uftdi_set_latency(struct ucom_softc *ucom, int latency) +{ + struct uftdi_softc *sc = ucom->sc_parent; + usb_device_request_t req; + + if (latency < 0 || latency > 255) + return (USB_ERR_INVAL); + + req.bmRequestType = UT_WRITE_VENDOR_DEVICE; + req.bRequest = FTDI_SIO_SET_LATENCY; + + USETW(req.wIndex, sc->sc_ucom.sc_portno); + USETW(req.wLength, 0); + USETW2(req.wValue, 0, latency); + + return (usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, NULL)); +} + +static int +uftdi_get_latency(struct ucom_softc *ucom, int *latency) +{ + struct uftdi_softc *sc = ucom->sc_parent; + usb_device_request_t req; + usb_error_t err; + uint8_t buf; + + req.bmRequestType = UT_WRITE_VENDOR_DEVICE; + req.bRequest = FTDI_SIO_GET_LATENCY; + + USETW(req.wIndex, sc->sc_ucom.sc_portno); + USETW(req.wLength, 1); + USETW(req.wValue, 0); + + err = usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, &buf); + *latency = buf; + + return (err); +} + +static int +uftdi_set_event_char(struct ucom_softc *ucom, int echar) +{ + struct uftdi_softc *sc = ucom->sc_parent; + usb_device_request_t req; + uint8_t enable; + + enable = (echar == -1) ? 0 : 1; + + req.bmRequestType = UT_WRITE_VENDOR_DEVICE; + req.bRequest = FTDI_SIO_SET_EVENT_CHAR; + + USETW(req.wIndex, sc->sc_ucom.sc_portno); + USETW(req.wLength, 0); + USETW2(req.wValue, enable, echar & 0xff); + + return (usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, NULL)); +} + +static int +uftdi_set_error_char(struct ucom_softc *ucom, int echar) +{ + struct uftdi_softc *sc = ucom->sc_parent; + usb_device_request_t req; + uint8_t enable; + + enable = (echar == -1) ? 0 : 1; + + req.bmRequestType = UT_WRITE_VENDOR_DEVICE; + req.bRequest = FTDI_SIO_SET_ERROR_CHAR; + + USETW(req.wIndex, sc->sc_ucom.sc_portno); + USETW(req.wLength, 0); + USETW2(req.wValue, enable, echar & 0xff); + + return (usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, NULL)); +} + +static int +uftdi_ioctl(struct ucom_softc *ucom, uint32_t cmd, caddr_t data, + int flag, struct thread *td) +{ + struct uftdi_softc *sc = ucom->sc_parent; + int err; + struct uftdi_bitmode * mode; + + DPRINTF("portno: %d cmd: %#x\n", ucom->sc_portno, cmd); + + switch (cmd) { + case UFTDIIOC_RESET_IO: + case UFTDIIOC_RESET_RX: + case UFTDIIOC_RESET_TX: + err = uftdi_reset(ucom, + cmd == UFTDIIOC_RESET_IO ? FTDI_SIO_RESET_SIO : + (cmd == UFTDIIOC_RESET_RX ? FTDI_SIO_RESET_PURGE_RX : + FTDI_SIO_RESET_PURGE_TX)); + break; + case UFTDIIOC_SET_BITMODE: + mode = (struct uftdi_bitmode *)data; + err = uftdi_set_bitmode(ucom, mode->mode, mode->iomask); + break; + case UFTDIIOC_GET_BITMODE: + mode = (struct uftdi_bitmode *)data; + err = uftdi_get_bitmode(ucom, &mode->iomask); + break; + case UFTDIIOC_SET_LATENCY: + err = uftdi_set_latency(ucom, *((int *)data)); + break; + case UFTDIIOC_GET_LATENCY: + err = uftdi_get_latency(ucom, (int *)data); + break; + case UFTDIIOC_SET_ERROR_CHAR: + err = uftdi_set_event_char(ucom, *(int *)data); + break; + case UFTDIIOC_SET_EVENT_CHAR: + err = uftdi_set_error_char(ucom, *(int *)data); + case UFTDIIOC_GET_HWREV: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Mon Apr 28 13:12:20 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42437616; Mon, 28 Apr 2014 13:12:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E3E101AB4; Mon, 28 Apr 2014 13:12:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3SDCJXj043269; Mon, 28 Apr 2014 13:12:19 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3SDCJtV043268; Mon, 28 Apr 2014 13:12:19 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201404281312.s3SDCJtV043268@svn.freebsd.org> From: Ian Lepore Date: Mon, 28 Apr 2014 13:12:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265048 - stable/10/sys/dev/usb/serial X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Apr 2014 13:12:20 -0000 Author: ian Date: Mon Apr 28 13:12:19 2014 New Revision: 265048 URL: http://svnweb.freebsd.org/changeset/base/265048 Log: MFC r264800: fixes for problems found by Coverity scan... - Get transmit loop more in line with the other serial drivers. - Add a comment about FTDI and ZLPs. - Correctly check odditiy of baud rate divisor. - Correct IOCTL handling for "error" and "event" char. Modified: stable/10/sys/dev/usb/serial/uftdi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/serial/uftdi.c ============================================================================== --- stable/10/sys/dev/usb/serial/uftdi.c Mon Apr 28 12:46:23 2014 (r265047) +++ stable/10/sys/dev/usb/serial/uftdi.c Mon Apr 28 13:12:19 2014 (r265048) @@ -1155,11 +1155,17 @@ uftdi_write_callback(struct usb_xfer *xf * Otherwise, loop to format packets into the buffer while there * is data available, and room for a packet header and at least * one byte of payload. + * + * NOTE: The FTDI chip doesn't accept zero length + * packets. This cannot happen because the "pktlen" + * will always be non-zero when "ucom_get_data()" + * returns non-zero which we check below. */ pc = usbd_xfer_get_frame(xfer, 0); if (sc->sc_hdrlen == 0) { - ucom_get_data(&sc->sc_ucom, pc, 0, UFTDI_OBUFSIZE, - &buflen); + if (ucom_get_data(&sc->sc_ucom, pc, 0, UFTDI_OBUFSIZE, + &buflen) == 0) + break; } else { buflen = 0; while (buflen < UFTDI_OBUFSIZE - sc->sc_hdrlen - 1 && @@ -1417,7 +1423,7 @@ uftdi_encode_baudrate(struct uftdi_softc * 8ths by adding 1 and dividing by 2. */ divisor = (clk << 4) / speed; - if ((divisor & 0xfffffff0) == 1) + if ((divisor & 0xf) == 1) divisor &= 0xfffffff8; else if (sc->sc_devtype == DEVT_232A) divisor += roundoff_232a[divisor & 0x0f]; @@ -1759,10 +1765,11 @@ uftdi_ioctl(struct ucom_softc *ucom, uin err = uftdi_get_latency(ucom, (int *)data); break; case UFTDIIOC_SET_ERROR_CHAR: - err = uftdi_set_event_char(ucom, *(int *)data); + err = uftdi_set_error_char(ucom, *(int *)data); break; case UFTDIIOC_SET_EVENT_CHAR: - err = uftdi_set_error_char(ucom, *(int *)data); + err = uftdi_set_event_char(ucom, *(int *)data); + break; case UFTDIIOC_GET_HWREV: *(int *)data = sc->sc_bcdDevice; err = 0; From owner-svn-src-stable@FreeBSD.ORG Mon Apr 28 13:18:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4AFDEA6A; Mon, 28 Apr 2014 13:18:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 379371B0E; Mon, 28 Apr 2014 13:18:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3SDIV2E044252; Mon, 28 Apr 2014 13:18:31 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3SDIVPn044251; Mon, 28 Apr 2014 13:18:31 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201404281318.s3SDIVPn044251@svn.freebsd.org> From: Ian Lepore Date: Mon, 28 Apr 2014 13:18:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265049 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Apr 2014 13:18:31 -0000 Author: ian Date: Mon Apr 28 13:18:30 2014 New Revision: 265049 URL: http://svnweb.freebsd.org/changeset/base/265049 Log: MFC r264018: update list of supported FTDI chips. Modified: stable/10/share/man/man4/uftdi.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/uftdi.4 ============================================================================== --- stable/10/share/man/man4/uftdi.4 Mon Apr 28 13:12:19 2014 (r265048) +++ stable/10/share/man/man4/uftdi.4 Mon Apr 28 13:18:30 2014 (r265049) @@ -29,12 +29,13 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2011 +.Dd March 31, 2014 .Dt UFTDI 4 .Os .Sh NAME .Nm uftdi -.Nd USB support for serial adapters based on the FT8U100AX and FT8U232AM chips +.Nd USB support for serial adapters based on the FTDI family of USB +serial adapter chips. .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -54,8 +55,29 @@ uftdi_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for various serial adapters based on the FTDI -FT2232C, FT8U100AX and FT8U232AM chips. +driver provides support for various serial adapters based on the +following FTDI chips: +.Pp +.Bl -bullet -compact +.It +FT8U100AX +.It +FT8U232AM +.It +FT8U232BM +.It +FT232R +.It +FT2232C +.It +FT2232D +.It +FT2232H +.It +FT4232H +.It +FT230X +.El .Pp The device is accessed through the .Xr ucom 4 From owner-svn-src-stable@FreeBSD.ORG Mon Apr 28 13:28:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06CB2CDD; Mon, 28 Apr 2014 13:28:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA2B71C2C; Mon, 28 Apr 2014 13:28:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3SDSAi8048258; Mon, 28 Apr 2014 13:28:10 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3SDSAFm048255; Mon, 28 Apr 2014 13:28:10 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201404281328.s3SDSAFm048255@svn.freebsd.org> From: Ian Lepore Date: Mon, 28 Apr 2014 13:28:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265050 - in stable/9: share/man/man4 sys/dev/usb sys/dev/usb/serial X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Apr 2014 13:28:11 -0000 Author: ian Date: Mon Apr 28 13:28:10 2014 New Revision: 265050 URL: http://svnweb.freebsd.org/changeset/base/265050 Log: MFC uftdi(4) driver changes... r264010: Support speeds up to 12mbaud on newer chips. r264018: Update list of supported FTDI chips. r264031: Use 2K IO buffers for improved throughput. r264149: Add ioctl(2) calls to access bitbang, MPSSE, CPU_FIFO, and other modes. r264800: Various fixes to r264149 pointed out by Coverity scan. Added: stable/9/sys/dev/usb/uftdiio.h - copied unchanged from r264149, head/sys/dev/usb/uftdiio.h Modified: stable/9/share/man/man4/uftdi.4 stable/9/sys/dev/usb/serial/uftdi.c stable/9/sys/dev/usb/serial/uftdi_reg.h Directory Properties: stable/9/share/man/man4/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/share/man/man4/uftdi.4 ============================================================================== --- stable/9/share/man/man4/uftdi.4 Mon Apr 28 13:18:30 2014 (r265049) +++ stable/9/share/man/man4/uftdi.4 Mon Apr 28 13:28:10 2014 (r265050) @@ -34,7 +34,8 @@ .Os .Sh NAME .Nm uftdi -.Nd USB support for serial adapters based on the FT8U100AX and FT8U232AM chips +.Nd USB support for serial adapters based on the FTDI family of USB +serial adapter chips. .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -52,13 +53,115 @@ uftdi_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for various serial adapters based on the FTDI -FT2232C, FT8U100AX and FT8U232AM chips. +driver provides support for various serial adapters based on the +following FTDI chips: +.Pp +.Bl -bullet -compact +.It +FT8U100AX +.It +FT8U232AM +.It +FT8U232BM +.It +FT232R +.It +FT2232C +.It +FT2232D +.It +FT2232H +.It +FT4232H +.It +FT230X +.El .Pp The device is accessed through the .Xr ucom 4 driver which makes it behave like a .Xr tty 4 . +.Pp +Many of the supported chips provide additional functionality +such as bitbang mode and the MPSSE engine for serial bus emulation. +The +.Nm +driver provides access to that functionality with the following +.Xr ioctl 2 +calls, defined in +.In dev/usb/uftdiio.h : +.Bl -tag -width indent +.It Dv UFTDIIOC_RESET_IO Pq Vt int +Reset the channel to its default configuration, flush RX and TX FIFOs. +.It Dv UFTDIIOC_RESET_RX Pq Vt int +Flush the RX FIFO. +.It Dv UFTDIIOC_RESET_TX Pq Vt int +Flush the TX FIFO. +.It Dv UFTDIIOC_SET_BITMODE Pq Vt "struct uftdi_bitmode" +Put the channel into the operating mode specified in +.Va mode , +and set the pins indicated by ones in +.Va iomask +to output mode. +The +.Va mode +must be one of the +.Va uftdi_bitmodes +values. +.Bd -literal +enum uftdi_bitmodes +{ + UFTDI_BITMODE_ASYNC = 0, + UFTDI_BITMODE_MPSSE = 1, + UFTDI_BITMODE_SYNC = 2, + UFTDI_BITMODE_CPU_EMUL = 3, + UFTDI_BITMODE_FAST_SERIAL = 4, + UFTDI_BITMODE_CBUS = 5, + UFTDI_BITMODE_NONE = 0xff, +}; + +struct uftdi_bitmode +{ + uint8_t mode; + uint8_t iomask; +}; +.Ed +.Pp +Manuals and application notes published by FTDI describe these +modes in detail. +To use most of these modes, you first put the channel into +the desired mode, then you +.Xr read 2 +and +.Xr write 2 +data which either reflects pin state or is interpreted +as MPSSE commands and parameters, depending on the mode. +.It Dv UFTDIIOC_GET_BITMODE Pq Vt "struct uftdi_bitmode" +Return the state of the bitbang pins at the time of the call in the +.Va iomask +member. +The +.Va mode +member is unused. +.It Dv UFTDIIOC_SET_ERROR_CHAR Pq Vt int +Set the character which is inserted into the buffer to mark +the point of an error such as FIFO overflow. +.It Dv UFTDIIOC_SET_EVENT_CHAR Pq Vt int +Set the character which causes a partial FIFO full of data +to be returned immediately even if the FIFO is not full. +.It Dv UFTDIIOC_SET_LATENCY Pq Vt int +Set the amount of time to wait for a full FIFO, +in milliseconds. +If more than this much time elapses without receiving a new +character, any characters in the FIFO are returned. +.It Dv UFTDIIOC_GET_LATENCY Pq Vt int +Get the current value of the latency timer. +.It Dv UFTDIIOC_GET_HWREV Pq Vt int +Get the hardware revision number. +This is the +.Va bcdDevice +value from the +.Va usb_device_descriptor . .Sh HARDWARE The .Nm Modified: stable/9/sys/dev/usb/serial/uftdi.c ============================================================================== --- stable/9/sys/dev/usb/serial/uftdi.c Mon Apr 28 13:18:30 2014 (r265049) +++ stable/9/sys/dev/usb/serial/uftdi.c Mon Apr 28 13:28:10 2014 (r265050) @@ -38,7 +38,14 @@ __FBSDID("$FreeBSD$"); */ /* - * FTDI FT2232x, FT8U100AX and FT8U232AM serial adapter driver + * FTDI FT232x, FT2232x, FT4232x, FT8U100AX and FT8U232xM serial adapters. + * + * Note that we specifically do not do a reset or otherwise alter the state of + * the chip during attach, detach, open, and close, because it could be + * pre-initialized (via an attached serial eeprom) to power-on into a mode such + * as bitbang in which the pins are being driven to a specific state which we + * must not perturb. The device gets reset at power-on, and doesn't need to be + * reset again after that to function, except as directed by ioctl() calls. */ #include @@ -63,6 +70,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include "usbdevs.h" #define USB_DEBUG_VAR uftdi_debug @@ -71,6 +80,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #ifdef USB_DEBUG static int uftdi_debug = 0; @@ -83,8 +93,34 @@ SYSCTL_INT(_hw_usb_uftdi, OID_AUTO, debu #define UFTDI_CONFIG_INDEX 0 #define UFTDI_IFACE_INDEX_JTAG 0 -#define UFTDI_OBUFSIZE 64 /* bytes, cannot be increased due to - * do size encoding */ +/* + * IO buffer sizes and FTDI device procotol sizes. + * + * Note that the output packet size in the following defines is not the usb + * protocol packet size based on bus speed, it is the size dictated by the FTDI + * device itself, and is used only on older chips. + * + * We allocate buffers bigger than the hardware's packet size, and process + * multiple packets within each buffer. This allows the controller to make + * optimal use of the usb bus by conducting multiple transfers with the device + * during a single bus timeslice to fill or drain the chip's fifos. + * + * The output data on newer chips has no packet header, and we are able to pack + * any number of output bytes into a buffer. On some older chips, each output + * packet contains a 1-byte header and up to 63 bytes of payload. The size is + * encoded in 6 bits of the header, hence the 64-byte limit on packet size. We + * loop to fill the buffer with many of these header+payload packets. + * + * The input data on all chips consists of packets which contain a 2-byte header + * followed by data payload. The total size of the packet is wMaxPacketSize + * which can change based on the bus speed (e.g., 64 for full speed, 512 for + * high speed). We loop to extract the headers and payloads from the packets + * packed into an input buffer. + */ +#define UFTDI_IBUFSIZE 2048 +#define UFTDI_IHDRSIZE 2 +#define UFTDI_OBUFSIZE 2048 +#define UFTDI_OPKTSIZE 64 enum { UFTDI_BULK_DT_WR, @@ -92,6 +128,21 @@ enum { UFTDI_N_TRANSFER, }; +enum { + DEVT_SIO, + DEVT_232A, + DEVT_232B, + DEVT_2232D, /* Includes 2232C */ + DEVT_232R, + DEVT_2232H, + DEVT_4232H, + DEVT_232H, + DEVT_230X, +}; + +#define DEVF_BAUDBITS_HINDEX 0x01 /* Baud bits in high byte of index. */ +#define DEVF_BAUDCLK_12M 0X02 /* Base baud clock is 12MHz. */ + struct uftdi_softc { struct ucom_super_softc sc_super_ucom; struct ucom_softc sc_ucom; @@ -104,16 +155,18 @@ struct uftdi_softc { uint32_t sc_unit; uint16_t sc_last_lcr; + uint16_t sc_bcdDevice; - uint8_t sc_type; - uint8_t sc_iface_index; + uint8_t sc_devtype; + uint8_t sc_devflags; uint8_t sc_hdrlen; uint8_t sc_msr; uint8_t sc_lsr; }; struct uftdi_param_config { - uint16_t rate; + uint16_t baud_lobits; + uint16_t baud_hibits; uint16_t lcr; uint8_t v_start; uint8_t v_stop; @@ -132,20 +185,29 @@ static usb_callback_t uftdi_read_callbac static void uftdi_free(struct ucom_softc *); static void uftdi_cfg_open(struct ucom_softc *); +static void uftdi_cfg_close(struct ucom_softc *); static void uftdi_cfg_set_dtr(struct ucom_softc *, uint8_t); static void uftdi_cfg_set_rts(struct ucom_softc *, uint8_t); static void uftdi_cfg_set_break(struct ucom_softc *, uint8_t); -static int uftdi_set_parm_soft(struct termios *, - struct uftdi_param_config *, uint8_t); +static int uftdi_set_parm_soft(struct ucom_softc *, struct termios *, + struct uftdi_param_config *); static int uftdi_pre_param(struct ucom_softc *, struct termios *); static void uftdi_cfg_param(struct ucom_softc *, struct termios *); static void uftdi_cfg_get_status(struct ucom_softc *, uint8_t *, uint8_t *); +static int uftdi_reset(struct ucom_softc *, int); +static int uftdi_set_bitmode(struct ucom_softc *, uint8_t, uint8_t); +static int uftdi_get_bitmode(struct ucom_softc *, uint8_t *); +static int uftdi_set_latency(struct ucom_softc *, int); +static int uftdi_get_latency(struct ucom_softc *, int *); +static int uftdi_set_event_char(struct ucom_softc *, int); +static int uftdi_set_error_char(struct ucom_softc *, int); +static int uftdi_ioctl(struct ucom_softc *, uint32_t, caddr_t, int, + struct thread *); static void uftdi_start_read(struct ucom_softc *); static void uftdi_stop_read(struct ucom_softc *); static void uftdi_start_write(struct ucom_softc *); static void uftdi_stop_write(struct ucom_softc *); -static uint8_t uftdi_8u232am_getrate(uint32_t, uint16_t *); static void uftdi_poll(struct ucom_softc *ucom); static const struct usb_config uftdi_config[UFTDI_N_TRANSFER] = { @@ -163,7 +225,7 @@ static const struct usb_config uftdi_con .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .bufsize = 0, /* use wMaxPacketSize */ + .bufsize = UFTDI_IBUFSIZE, .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, .callback = &uftdi_read_callback, }, @@ -176,7 +238,9 @@ static const struct ucom_callback uftdi_ .ucom_cfg_set_break = &uftdi_cfg_set_break, .ucom_cfg_param = &uftdi_cfg_param, .ucom_cfg_open = &uftdi_cfg_open, + .ucom_cfg_close = &uftdi_cfg_close, .ucom_pre_param = &uftdi_pre_param, + .ucom_ioctl = &uftdi_ioctl, .ucom_start_read = &uftdi_start_read, .ucom_stop_read = &uftdi_stop_read, .ucom_start_write = &uftdi_start_write, @@ -847,6 +911,82 @@ static const STRUCT_USB_HOST_ID uftdi_de #undef UFTDI_DEV }; +/* + * Set up softc fields whose value depends on the device type. + * + * Note that the 2232C and 2232D devices are the same for our purposes. In the + * silicon the difference is that the D series has CPU FIFO mode and C doesn't. + * I haven't found any way of determining the C/D difference from info provided + * by the chip other than trying to set CPU FIFO mode and having it work or not. + * + * Due to a hardware bug, a 232B chip without an eeprom reports itself as a + * 232A, but if the serial number is also zero we know it's really a 232B. + */ +static void +uftdi_devtype_setup(struct uftdi_softc *sc, struct usb_attach_arg *uaa) +{ + struct usb_device_descriptor *dd; + + sc->sc_bcdDevice = uaa->info.bcdDevice; + + switch (uaa->info.bcdDevice) { + case 0x200: + dd = usbd_get_device_descriptor(sc->sc_udev); + if (dd->iSerialNumber == 0) { + sc->sc_devtype = DEVT_232B; + } else { + sc->sc_devtype = DEVT_232A; + } + sc->sc_ucom.sc_portno = 0; + break; + case 0x400: + sc->sc_devtype = DEVT_232B; + sc->sc_ucom.sc_portno = 0; + break; + case 0x500: + sc->sc_devtype = DEVT_2232D; + sc->sc_devflags |= DEVF_BAUDBITS_HINDEX; + sc->sc_ucom.sc_portno = FTDI_PIT_SIOA + uaa->info.bIfaceNum; + break; + case 0x600: + sc->sc_devtype = DEVT_232R; + sc->sc_ucom.sc_portno = 0; + break; + case 0x700: + sc->sc_devtype = DEVT_2232H; + sc->sc_devflags |= DEVF_BAUDBITS_HINDEX | DEVF_BAUDCLK_12M; + sc->sc_ucom.sc_portno = FTDI_PIT_SIOA + uaa->info.bIfaceNum; + break; + case 0x800: + sc->sc_devtype = DEVT_4232H; + sc->sc_devflags |= DEVF_BAUDBITS_HINDEX | DEVF_BAUDCLK_12M; + sc->sc_ucom.sc_portno = FTDI_PIT_SIOA + uaa->info.bIfaceNum; + break; + case 0x900: + sc->sc_devtype = DEVT_232H; + sc->sc_devflags |= DEVF_BAUDBITS_HINDEX | DEVF_BAUDCLK_12M; + sc->sc_ucom.sc_portno = FTDI_PIT_SIOA + uaa->info.bIfaceNum; + break; + case 0x1000: + sc->sc_devtype = DEVT_230X; + sc->sc_devflags |= DEVF_BAUDBITS_HINDEX; + sc->sc_ucom.sc_portno = FTDI_PIT_SIOA + uaa->info.bIfaceNum; + break; + default: + if (uaa->info.bcdDevice < 0x200) { + sc->sc_devtype = DEVT_SIO; + sc->sc_hdrlen = 1; + } else { + sc->sc_devtype = DEVT_232R; + device_printf(sc->sc_dev, "Warning: unknown FTDI " + "device type, bcdDevice=0x%04x, assuming 232R", + uaa->info.bcdDevice); + } + sc->sc_ucom.sc_portno = 0; + break; + } +} + static int uftdi_probe(device_t dev) { @@ -886,6 +1026,8 @@ uftdi_attach(device_t dev) struct uftdi_softc *sc = device_get_softc(dev); int error; + DPRINTF("\n"); + sc->sc_udev = uaa->device; sc->sc_dev = dev; sc->sc_unit = device_get_unit(dev); @@ -894,34 +1036,11 @@ uftdi_attach(device_t dev) mtx_init(&sc->sc_mtx, "uftdi", NULL, MTX_DEF); ucom_ref(&sc->sc_super_ucom); - DPRINTF("\n"); - sc->sc_iface_index = uaa->info.bIfaceIndex; - sc->sc_type = USB_GET_DRIVER_INFO(uaa) & UFTDI_TYPE_MASK; - - switch (sc->sc_type) { - case UFTDI_TYPE_AUTO: - /* simplified type check */ - if (uaa->info.bcdDevice >= 0x0200 || - usbd_get_iface(uaa->device, 1) != NULL) { - sc->sc_type = UFTDI_TYPE_8U232AM; - sc->sc_hdrlen = 0; - } else { - sc->sc_type = UFTDI_TYPE_SIO; - sc->sc_hdrlen = 1; - } - break; - case UFTDI_TYPE_SIO: - sc->sc_hdrlen = 1; - break; - case UFTDI_TYPE_8U232AM: - default: - sc->sc_hdrlen = 0; - break; - } + uftdi_devtype_setup(sc, uaa); error = usbd_transfer_setup(uaa->device, - &sc->sc_iface_index, sc->sc_xfer, uftdi_config, + &uaa->info.bIfaceIndex, sc->sc_xfer, uftdi_config, UFTDI_N_TRANSFER, sc, &sc->sc_mtx); if (error) { @@ -929,8 +1048,6 @@ uftdi_attach(device_t dev) "transfers failed\n"); goto detach; } - sc->sc_ucom.sc_portno = FTDI_PIT_SIOA + uaa->info.bIfaceNum; - /* clear stall at first run */ mtx_lock(&sc->sc_mtx); usbd_xfer_set_stall(sc->sc_xfer[UFTDI_BULK_DT_WR]); @@ -993,37 +1110,25 @@ uftdi_free(struct ucom_softc *ucom) static void uftdi_cfg_open(struct ucom_softc *ucom) { - struct uftdi_softc *sc = ucom->sc_parent; - uint16_t wIndex = ucom->sc_portno; - struct usb_device_request req; + /* + * This do-nothing open routine exists for the sole purpose of this + * DPRINTF() so that you can see the point at which open gets called + * when debugging is enabled. + */ DPRINTF(""); +} - /* perform a full reset on the device */ - - req.bmRequestType = UT_WRITE_VENDOR_DEVICE; - req.bRequest = FTDI_SIO_RESET; - USETW(req.wValue, FTDI_SIO_RESET_SIO); - USETW(req.wIndex, wIndex); - USETW(req.wLength, 0); - ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, - &req, NULL, 0, 1000); - - /* turn on RTS/CTS flow control */ - - req.bmRequestType = UT_WRITE_VENDOR_DEVICE; - req.bRequest = FTDI_SIO_SET_FLOW_CTRL; - USETW(req.wValue, 0); - USETW2(req.wIndex, FTDI_SIO_RTS_CTS_HS, wIndex); - USETW(req.wLength, 0); - ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, - &req, NULL, 0, 1000); +static void +uftdi_cfg_close(struct ucom_softc *ucom) +{ /* - * NOTE: with the new UCOM layer there will always be a - * "uftdi_cfg_param()" call after "open()", so there is no need for - * "open()" to configure anything + * This do-nothing close routine exists for the sole purpose of this + * DPRINTF() so that you can see the point at which close gets called + * when debugging is enabled. */ + DPRINTF(""); } static void @@ -1031,35 +1136,53 @@ uftdi_write_callback(struct usb_xfer *xf { struct uftdi_softc *sc = usbd_xfer_softc(xfer); struct usb_page_cache *pc; - uint32_t actlen; + uint32_t pktlen; + uint32_t buflen; uint8_t buf[1]; switch (USB_GET_STATE(xfer)) { + default: /* Error */ + if (error != USB_ERR_CANCELLED) { + /* try to clear stall first */ + usbd_xfer_set_stall(xfer); + } + /* FALLTHROUGH */ case USB_ST_SETUP: case USB_ST_TRANSFERRED: -tr_setup: + /* + * If output packets don't require headers (the common case) we + * can just load the buffer up with payload bytes all at once. + * Otherwise, loop to format packets into the buffer while there + * is data available, and room for a packet header and at least + * one byte of payload. + * + * NOTE: The FTDI chip doesn't accept zero length + * packets. This cannot happen because the "pktlen" + * will always be non-zero when "ucom_get_data()" + * returns non-zero which we check below. + */ pc = usbd_xfer_get_frame(xfer, 0); - if (ucom_get_data(&sc->sc_ucom, pc, - sc->sc_hdrlen, UFTDI_OBUFSIZE - sc->sc_hdrlen, - &actlen)) { - - if (sc->sc_hdrlen > 0) { - buf[0] = - FTDI_OUT_TAG(actlen, sc->sc_ucom.sc_portno); - usbd_copy_in(pc, 0, buf, 1); + if (sc->sc_hdrlen == 0) { + if (ucom_get_data(&sc->sc_ucom, pc, 0, UFTDI_OBUFSIZE, + &buflen) == 0) + break; + } else { + buflen = 0; + while (buflen < UFTDI_OBUFSIZE - sc->sc_hdrlen - 1 && + ucom_get_data(&sc->sc_ucom, pc, buflen + + sc->sc_hdrlen, UFTDI_OPKTSIZE - sc->sc_hdrlen, + &pktlen) != 0) { + buf[0] = FTDI_OUT_TAG(pktlen, + sc->sc_ucom.sc_portno); + usbd_copy_in(pc, buflen, buf, 1); + buflen += pktlen + sc->sc_hdrlen; } - usbd_xfer_set_frame_len(xfer, 0, actlen + sc->sc_hdrlen); - usbd_transfer_submit(xfer); } - return; - - default: /* Error */ - if (error != USB_ERR_CANCELLED) { - /* try to clear stall first */ - usbd_xfer_set_stall(xfer); - goto tr_setup; + if (buflen != 0) { + usbd_xfer_set_frame_len(xfer, 0, buflen); + usbd_transfer_submit(xfer); } - return; + break; } } @@ -1072,23 +1195,47 @@ uftdi_read_callback(struct usb_xfer *xfe uint8_t ftdi_msr; uint8_t msr; uint8_t lsr; - int actlen; + int buflen; + int pktlen; + int pktmax; + int offset; - usbd_xfer_status(xfer, &actlen, NULL, NULL, NULL); + usbd_xfer_status(xfer, &buflen, NULL, NULL, NULL); switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: - - if (actlen < 2) { + if (buflen < UFTDI_IHDRSIZE) goto tr_setup; - } pc = usbd_xfer_get_frame(xfer, 0); - usbd_copy_out(pc, 0, buf, 2); - + pktmax = xfer->max_packet_size - UFTDI_IHDRSIZE; + lsr = 0; + msr = 0; + offset = 0; + /* + * Extract packet headers and payload bytes from the buffer. + * Feed payload bytes to ucom/tty layer; OR-accumulate header + * status bits which are transient and could toggle with each + * packet. After processing all packets in the buffer, process + * the accumulated transient MSR and LSR values along with the + * non-transient bits from the last packet header. + */ + while (buflen >= UFTDI_IHDRSIZE) { + usbd_copy_out(pc, offset, buf, UFTDI_IHDRSIZE); + offset += UFTDI_IHDRSIZE; + buflen -= UFTDI_IHDRSIZE; + lsr |= FTDI_GET_LSR(buf); + if (FTDI_GET_MSR(buf) & FTDI_SIO_RI_MASK) + msr |= SER_RI; + pktlen = min(buflen, pktmax); + if (pktlen != 0) { + ucom_put_data(&sc->sc_ucom, pc, offset, + pktlen); + offset += pktlen; + buflen -= pktlen; + } + } ftdi_msr = FTDI_GET_MSR(buf); - lsr = FTDI_GET_LSR(buf); - msr = 0; if (ftdi_msr & FTDI_SIO_CTS_MASK) msr |= SER_CTS; if (ftdi_msr & FTDI_SIO_DSR_MASK) @@ -1109,11 +1256,7 @@ uftdi_read_callback(struct usb_xfer *xfe ucom_status_change(&sc->sc_ucom); } - actlen -= 2; - - if (actlen > 0) { - ucom_put_data(&sc->sc_ucom, pc, 2, actlen); - } + /* FALLTHROUGH */ case USB_ST_SETUP: tr_setup: usbd_xfer_set_frame_len(xfer, 0, usbd_xfer_max_len(xfer)); @@ -1193,58 +1336,162 @@ uftdi_cfg_set_break(struct ucom_softc *u &req, NULL, 0, 1000); } -static int -uftdi_set_parm_soft(struct termios *t, - struct uftdi_param_config *cfg, uint8_t type) +/* + * Return true if the given speed is within operational tolerance of the target + * speed. FTDI recommends that the hardware speed be within 3% of nominal. + */ +static inline boolean_t +uftdi_baud_within_tolerance(uint64_t speed, uint64_t target) { + return ((speed >= (target * 100) / 103) && + (speed <= (target * 100) / 97)); +} - memset(cfg, 0, sizeof(*cfg)); +static int +uftdi_sio_encode_baudrate(struct uftdi_softc *sc, speed_t speed, + struct uftdi_param_config *cfg) +{ + u_int i; + const speed_t sio_speeds[] = { + 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200 + }; - switch (type) { - case UFTDI_TYPE_SIO: - switch (t->c_ospeed) { - case 300: - cfg->rate = ftdi_sio_b300; - break; - case 600: - cfg->rate = ftdi_sio_b600; - break; - case 1200: - cfg->rate = ftdi_sio_b1200; - break; - case 2400: - cfg->rate = ftdi_sio_b2400; - break; - case 4800: - cfg->rate = ftdi_sio_b4800; - break; - case 9600: - cfg->rate = ftdi_sio_b9600; - break; - case 19200: - cfg->rate = ftdi_sio_b19200; - break; - case 38400: - cfg->rate = ftdi_sio_b38400; - break; - case 57600: - cfg->rate = ftdi_sio_b57600; - break; - case 115200: - cfg->rate = ftdi_sio_b115200; - break; - default: - return (EINVAL); + /* + * The original SIO chips were limited to a small choice of speeds + * listed in an internal table of speeds chosen by an index value. + */ + for (i = 0; i < nitems(sio_speeds); ++i) { + if (speed == sio_speeds[i]) { + cfg->baud_lobits = i; + cfg->baud_hibits = 0; + return (0); } - break; + } + return (ERANGE); +} - case UFTDI_TYPE_8U232AM: - if (uftdi_8u232am_getrate(t->c_ospeed, &cfg->rate)) { - return (EINVAL); - } - break; +static int +uftdi_encode_baudrate(struct uftdi_softc *sc, speed_t speed, + struct uftdi_param_config *cfg) +{ + static const uint8_t encoded_fraction[8] = {0, 3, 2, 4, 1, 5, 6, 7}; + static const uint8_t roundoff_232a[16] = { + 0, 1, 0, 1, 0, -1, 2, 1, + 0, -1, -2, -3, 4, 3, 2, 1, + }; + uint32_t clk, divisor, fastclk_flag, frac, hwspeed; + + /* + * If this chip has the fast clock capability and the speed is within + * range, use the 12MHz clock, otherwise the standard clock is 3MHz. + */ + if ((sc->sc_devflags & DEVF_BAUDCLK_12M) && speed >= 1200) { + clk = 12000000; + fastclk_flag = (1 << 17); + } else { + clk = 3000000; + fastclk_flag = 0; + } + + /* + * Make sure the requested speed is reachable with the available clock + * and a 14-bit divisor. + */ + if (speed < (clk >> 14) || speed > clk) + return (ERANGE); + + /* + * Calculate the divisor, initially yielding a fixed point number with a + * 4-bit (1/16ths) fraction, then round it to the nearest fraction the + * hardware can handle. When the integral part of the divisor is + * greater than one, the fractional part is in 1/8ths of the base clock. + * The FT8U232AM chips can handle only 0.125, 0.250, and 0.5 fractions. + * Later chips can handle all 1/8th fractions. + * + * If the integral part of the divisor is 1, a special rule applies: the + * fractional part can only be .0 or .5 (this is a limitation of the + * hardware). We handle this by truncating the fraction rather than + * rounding, because this only applies to the two fastest speeds the + * chip can achieve and rounding doesn't matter, either you've asked for + * that exact speed or you've asked for something the chip can't do. + * + * For the FT8U232AM chips, use a roundoff table to adjust the result + * to the nearest 1/8th fraction that is supported by the hardware, + * leaving a fixed-point number with a 3-bit fraction which exactly + * represents the math the hardware divider will do. For later-series + * chips that support all 8 fractional divisors, just round 16ths to + * 8ths by adding 1 and dividing by 2. + */ + divisor = (clk << 4) / speed; + if ((divisor & 0xf) == 1) + divisor &= 0xfffffff8; + else if (sc->sc_devtype == DEVT_232A) + divisor += roundoff_232a[divisor & 0x0f]; + else + divisor += 1; /* Rounds odd 16ths up to next 8th. */ + divisor >>= 1; + + /* + * Ensure the resulting hardware speed will be within operational + * tolerance (within 3% of nominal). + */ + hwspeed = (clk << 3) / divisor; + if (!uftdi_baud_within_tolerance(hwspeed, speed)) + return (ERANGE); + + /* + * Re-pack the divisor into hardware format. The lower 14-bits hold the + * integral part, while the upper bits specify the fraction by indexing + * a table of fractions within the hardware which is laid out as: + * {0.0, 0.5, 0.25, 0.125, 0.325, 0.625, 0.725, 0.875} + * The A-series chips only have the first four table entries; the + * roundoff table logic above ensures that the fractional part for those + * chips will be one of the first four values. + * + * When the divisor is 1 a special encoding applies: 1.0 is encoded as + * 0.0, and 1.5 is encoded as 1.0. The rounding logic above has already + * ensured that the fraction is either .0 or .5 if the integral is 1. + */ + frac = divisor & 0x07; + divisor >>= 3; + if (divisor == 1) { + if (frac == 0) + divisor = 0; /* 1.0 becomes 0.0 */ + else + frac = 0; /* 1.5 becomes 1.0 */ + } + divisor |= (encoded_fraction[frac] << 14) | fastclk_flag; + + cfg->baud_lobits = (uint16_t)divisor; + cfg->baud_hibits = (uint16_t)(divisor >> 16); + + /* + * If this chip requires the baud bits to be in the high byte of the + * index word, move the bits up to that location. + */ + if (sc->sc_devflags & DEVF_BAUDBITS_HINDEX) { + cfg->baud_hibits <<= 8; } + return (0); +} + +static int +uftdi_set_parm_soft(struct ucom_softc *ucom, struct termios *t, + struct uftdi_param_config *cfg) +{ + struct uftdi_softc *sc = ucom->sc_parent; + int err; + + memset(cfg, 0, sizeof(*cfg)); + + if (sc->sc_devtype == DEVT_SIO) + err = uftdi_sio_encode_baudrate(sc, t->c_ospeed, cfg); + else + err = uftdi_encode_baudrate(sc, t->c_ospeed, cfg); + if (err != 0) + return (err); + if (t->c_cflag & CSTOPB) cfg->lcr = FTDI_SIO_SET_DATA_STOP_BITS_2; else @@ -1294,12 +1541,11 @@ uftdi_set_parm_soft(struct termios *t, static int uftdi_pre_param(struct ucom_softc *ucom, struct termios *t) { - struct uftdi_softc *sc = ucom->sc_parent; struct uftdi_param_config cfg; DPRINTF("\n"); - return (uftdi_set_parm_soft(t, &cfg, sc->sc_type)); + return (uftdi_set_parm_soft(ucom, t, &cfg)); } static void @@ -1310,7 +1556,7 @@ uftdi_cfg_param(struct ucom_softc *ucom, struct uftdi_param_config cfg; struct usb_device_request req; - if (uftdi_set_parm_soft(t, &cfg, sc->sc_type)) { + if (uftdi_set_parm_soft(ucom, t, &cfg)) { /* should not happen */ return; } @@ -1320,8 +1566,8 @@ uftdi_cfg_param(struct ucom_softc *ucom, req.bmRequestType = UT_WRITE_VENDOR_DEVICE; req.bRequest = FTDI_SIO_SET_BAUD_RATE; - USETW(req.wValue, cfg.rate); - USETW(req.wIndex, wIndex); + USETW(req.wValue, cfg.baud_lobits); + USETW(req.wIndex, cfg.baud_hibits | wIndex); USETW(req.wLength, 0); ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, &req, NULL, 0, 1000); @@ -1355,6 +1601,187 @@ uftdi_cfg_get_status(struct ucom_softc * *lsr = sc->sc_lsr; } +static int +uftdi_reset(struct ucom_softc *ucom, int reset_type) +{ + struct uftdi_softc *sc = ucom->sc_parent; + usb_device_request_t req; + + req.bmRequestType = UT_WRITE_VENDOR_DEVICE; + req.bRequest = FTDI_SIO_RESET; + + USETW(req.wIndex, sc->sc_ucom.sc_portno); + USETW(req.wLength, 0); + USETW(req.wValue, reset_type); + + return (usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, NULL)); +} + +static int +uftdi_set_bitmode(struct ucom_softc *ucom, uint8_t bitmode, uint8_t iomask) +{ + struct uftdi_softc *sc = ucom->sc_parent; + usb_device_request_t req; + + req.bmRequestType = UT_WRITE_VENDOR_DEVICE; + req.bRequest = FTDI_SIO_SET_BITMODE; + + USETW(req.wIndex, sc->sc_ucom.sc_portno); + USETW(req.wLength, 0); + + if (bitmode == UFTDI_BITMODE_NONE) + USETW2(req.wValue, 0, 0); + else + USETW2(req.wValue, (1 << bitmode), iomask); + + return (usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, NULL)); +} + +static int +uftdi_get_bitmode(struct ucom_softc *ucom, uint8_t *iomask) +{ + struct uftdi_softc *sc = ucom->sc_parent; + usb_device_request_t req; + + req.bmRequestType = UT_WRITE_VENDOR_DEVICE; + req.bRequest = FTDI_SIO_GET_BITMODE; + + USETW(req.wIndex, sc->sc_ucom.sc_portno); + USETW(req.wLength, 1); + USETW(req.wValue, 0); + + return (usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, iomask)); +} + +static int +uftdi_set_latency(struct ucom_softc *ucom, int latency) +{ + struct uftdi_softc *sc = ucom->sc_parent; + usb_device_request_t req; + + if (latency < 0 || latency > 255) + return (USB_ERR_INVAL); + + req.bmRequestType = UT_WRITE_VENDOR_DEVICE; + req.bRequest = FTDI_SIO_SET_LATENCY; + + USETW(req.wIndex, sc->sc_ucom.sc_portno); + USETW(req.wLength, 0); + USETW2(req.wValue, 0, latency); + + return (usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, NULL)); +} + +static int +uftdi_get_latency(struct ucom_softc *ucom, int *latency) +{ + struct uftdi_softc *sc = ucom->sc_parent; + usb_device_request_t req; + usb_error_t err; + uint8_t buf; + + req.bmRequestType = UT_WRITE_VENDOR_DEVICE; + req.bRequest = FTDI_SIO_GET_LATENCY; + + USETW(req.wIndex, sc->sc_ucom.sc_portno); + USETW(req.wLength, 1); + USETW(req.wValue, 0); + + err = usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, &buf); + *latency = buf; + + return (err); +} + +static int +uftdi_set_event_char(struct ucom_softc *ucom, int echar) +{ + struct uftdi_softc *sc = ucom->sc_parent; + usb_device_request_t req; + uint8_t enable; + + enable = (echar == -1) ? 0 : 1; + + req.bmRequestType = UT_WRITE_VENDOR_DEVICE; + req.bRequest = FTDI_SIO_SET_EVENT_CHAR; + + USETW(req.wIndex, sc->sc_ucom.sc_portno); + USETW(req.wLength, 0); + USETW2(req.wValue, enable, echar & 0xff); + + return (usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, NULL)); +} + +static int +uftdi_set_error_char(struct ucom_softc *ucom, int echar) +{ + struct uftdi_softc *sc = ucom->sc_parent; + usb_device_request_t req; + uint8_t enable; + + enable = (echar == -1) ? 0 : 1; + + req.bmRequestType = UT_WRITE_VENDOR_DEVICE; + req.bRequest = FTDI_SIO_SET_ERROR_CHAR; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Mon Apr 28 14:20:22 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74798F87; Mon, 28 Apr 2014 14:20:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5477312D7; Mon, 28 Apr 2014 14:20:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3SEKMiL069383; Mon, 28 Apr 2014 14:20:22 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3SEKMKd069380; Mon, 28 Apr 2014 14:20:22 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201404281420.s3SEKMKd069380@svn.freebsd.org> From: Ian Lepore Date: Mon, 28 Apr 2014 14:20:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r265052 - in stable/8: share/man/man4 sys/dev/usb sys/dev/usb/serial X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Apr 2014 14:20:22 -0000 Author: ian Date: Mon Apr 28 14:20:21 2014 New Revision: 265052 URL: http://svnweb.freebsd.org/changeset/base/265052 Log: MFC uftdi(4) driver changes... r264010: Support speeds up to 12mbaud on newer chips. r264018: Update list of supported FTDI chips. r264031: Use 2K IO buffers for improved throughput. r264149: Add ioctl(2) calls to access bitbang, MPSSE, CPU_FIFO, and other modes. r264800: Various fixes to r264149 pointed out by Coverity scan. Added: stable/8/sys/dev/usb/uftdiio.h - copied unchanged from r264149, head/sys/dev/usb/uftdiio.h Modified: stable/8/share/man/man4/uftdi.4 stable/8/sys/dev/usb/serial/uftdi.c stable/8/sys/dev/usb/serial/uftdi_reg.h Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/share/man/man4/uftdi.4 ============================================================================== --- stable/8/share/man/man4/uftdi.4 Mon Apr 28 13:42:41 2014 (r265051) +++ stable/8/share/man/man4/uftdi.4 Mon Apr 28 14:20:21 2014 (r265052) @@ -36,12 +36,13 @@ .\" .\" $FreeBSD$ .\" -.Dd November 22, 2006 +.Dd March 31, 2014 .Dt UFTDI 4 .Os .Sh NAME .Nm uftdi -.Nd USB support for serial adapters based on the FT8U100AX and FT8U232AM chips +.Nd USB support for serial adapters based on the FTDI family of USB +serial adapter chips. .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -60,13 +61,115 @@ uftdi_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for various serial adapters based on the FTDI -FT2232C, FT8U100AX and FT8U232AM chips. +driver provides support for various serial adapters based on the +following FTDI chips: +.Pp +.Bl -bullet -compact +.It +FT8U100AX +.It +FT8U232AM +.It +FT8U232BM +.It +FT232R +.It +FT2232C +.It +FT2232D +.It +FT2232H +.It +FT4232H +.It +FT230X +.El .Pp The device is accessed through the .Xr ucom 4 driver which makes it behave like a .Xr tty 4 . +.Pp +Many of the supported chips provide additional functionality +such as bitbang mode and the MPSSE engine for serial bus emulation. +The +.Nm +driver provides access to that functionality with the following +.Xr ioctl 2 +calls, defined in +.In dev/usb/uftdiio.h : +.Bl -tag -width indent +.It Dv UFTDIIOC_RESET_IO Pq Vt int +Reset the channel to its default configuration, flush RX and TX FIFOs. +.It Dv UFTDIIOC_RESET_RX Pq Vt int +Flush the RX FIFO. +.It Dv UFTDIIOC_RESET_TX Pq Vt int +Flush the TX FIFO. +.It Dv UFTDIIOC_SET_BITMODE Pq Vt "struct uftdi_bitmode" +Put the channel into the operating mode specified in +.Va mode , +and set the pins indicated by ones in +.Va iomask +to output mode. +The +.Va mode +must be one of the +.Va uftdi_bitmodes +values. +.Bd -literal +enum uftdi_bitmodes +{ + UFTDI_BITMODE_ASYNC = 0, + UFTDI_BITMODE_MPSSE = 1, + UFTDI_BITMODE_SYNC = 2, + UFTDI_BITMODE_CPU_EMUL = 3, + UFTDI_BITMODE_FAST_SERIAL = 4, + UFTDI_BITMODE_CBUS = 5, + UFTDI_BITMODE_NONE = 0xff, +}; + +struct uftdi_bitmode +{ + uint8_t mode; + uint8_t iomask; +}; +.Ed +.Pp +Manuals and application notes published by FTDI describe these +modes in detail. +To use most of these modes, you first put the channel into +the desired mode, then you +.Xr read 2 +and +.Xr write 2 +data which either reflects pin state or is interpreted +as MPSSE commands and parameters, depending on the mode. +.It Dv UFTDIIOC_GET_BITMODE Pq Vt "struct uftdi_bitmode" +Return the state of the bitbang pins at the time of the call in the +.Va iomask +member. +The +.Va mode +member is unused. +.It Dv UFTDIIOC_SET_ERROR_CHAR Pq Vt int +Set the character which is inserted into the buffer to mark +the point of an error such as FIFO overflow. +.It Dv UFTDIIOC_SET_EVENT_CHAR Pq Vt int +Set the character which causes a partial FIFO full of data +to be returned immediately even if the FIFO is not full. +.It Dv UFTDIIOC_SET_LATENCY Pq Vt int +Set the amount of time to wait for a full FIFO, +in milliseconds. +If more than this much time elapses without receiving a new +character, any characters in the FIFO are returned. +.It Dv UFTDIIOC_GET_LATENCY Pq Vt int +Get the current value of the latency timer. +.It Dv UFTDIIOC_GET_HWREV Pq Vt int +Get the hardware revision number. +This is the +.Va bcdDevice +value from the +.Va usb_device_descriptor . .Sh HARDWARE The .Nm Modified: stable/8/sys/dev/usb/serial/uftdi.c ============================================================================== --- stable/8/sys/dev/usb/serial/uftdi.c Mon Apr 28 13:42:41 2014 (r265051) +++ stable/8/sys/dev/usb/serial/uftdi.c Mon Apr 28 14:20:21 2014 (r265052) @@ -38,7 +38,14 @@ __FBSDID("$FreeBSD$"); */ /* - * FTDI FT2232x, FT8U100AX and FT8U232AM serial adapter driver + * FTDI FT232x, FT2232x, FT4232x, FT8U100AX and FT8U232xM serial adapters. + * + * Note that we specifically do not do a reset or otherwise alter the state of + * the chip during attach, detach, open, and close, because it could be + * pre-initialized (via an attached serial eeprom) to power-on into a mode such + * as bitbang in which the pins are being driven to a specific state which we + * must not perturb. The device gets reset at power-on, and doesn't need to be + * reset again after that to function, except as directed by ioctl() calls. */ #include @@ -63,6 +70,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include "usbdevs.h" #define USB_DEBUG_VAR uftdi_debug @@ -71,11 +80,12 @@ __FBSDID("$FreeBSD$"); #include #include +#include #ifdef USB_DEBUG static int uftdi_debug = 0; -SYSCTL_NODE(_hw_usb, OID_AUTO, uftdi, CTLFLAG_RW, 0, "USB uftdi"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, uftdi, CTLFLAG_RW, 0, "USB uftdi"); SYSCTL_INT(_hw_usb_uftdi, OID_AUTO, debug, CTLFLAG_RW, &uftdi_debug, 0, "Debug level"); #endif @@ -83,8 +93,34 @@ SYSCTL_INT(_hw_usb_uftdi, OID_AUTO, debu #define UFTDI_CONFIG_INDEX 0 #define UFTDI_IFACE_INDEX_JTAG 0 -#define UFTDI_OBUFSIZE 64 /* bytes, cannot be increased due to - * do size encoding */ +/* + * IO buffer sizes and FTDI device procotol sizes. + * + * Note that the output packet size in the following defines is not the usb + * protocol packet size based on bus speed, it is the size dictated by the FTDI + * device itself, and is used only on older chips. + * + * We allocate buffers bigger than the hardware's packet size, and process + * multiple packets within each buffer. This allows the controller to make + * optimal use of the usb bus by conducting multiple transfers with the device + * during a single bus timeslice to fill or drain the chip's fifos. + * + * The output data on newer chips has no packet header, and we are able to pack + * any number of output bytes into a buffer. On some older chips, each output + * packet contains a 1-byte header and up to 63 bytes of payload. The size is + * encoded in 6 bits of the header, hence the 64-byte limit on packet size. We + * loop to fill the buffer with many of these header+payload packets. + * + * The input data on all chips consists of packets which contain a 2-byte header + * followed by data payload. The total size of the packet is wMaxPacketSize + * which can change based on the bus speed (e.g., 64 for full speed, 512 for + * high speed). We loop to extract the headers and payloads from the packets + * packed into an input buffer. + */ +#define UFTDI_IBUFSIZE 2048 +#define UFTDI_IHDRSIZE 2 +#define UFTDI_OBUFSIZE 2048 +#define UFTDI_OPKTSIZE 64 enum { UFTDI_BULK_DT_WR, @@ -92,6 +128,21 @@ enum { UFTDI_N_TRANSFER, }; +enum { + DEVT_SIO, + DEVT_232A, + DEVT_232B, + DEVT_2232D, /* Includes 2232C */ + DEVT_232R, + DEVT_2232H, + DEVT_4232H, + DEVT_232H, + DEVT_230X, +}; + +#define DEVF_BAUDBITS_HINDEX 0x01 /* Baud bits in high byte of index. */ +#define DEVF_BAUDCLK_12M 0X02 /* Base baud clock is 12MHz. */ + struct uftdi_softc { struct ucom_super_softc sc_super_ucom; struct ucom_softc sc_ucom; @@ -104,18 +155,18 @@ struct uftdi_softc { uint32_t sc_unit; uint16_t sc_last_lcr; + uint16_t sc_bcdDevice; - uint8_t sc_type; - uint8_t sc_iface_index; + uint8_t sc_devtype; + uint8_t sc_devflags; uint8_t sc_hdrlen; uint8_t sc_msr; uint8_t sc_lsr; - - uint8_t sc_name[16]; }; struct uftdi_param_config { - uint16_t rate; + uint16_t baud_lobits; + uint16_t baud_hibits; uint16_t lcr; uint8_t v_start; uint8_t v_stop; @@ -132,20 +183,29 @@ static usb_callback_t uftdi_write_callba static usb_callback_t uftdi_read_callback; static void uftdi_cfg_open(struct ucom_softc *); +static void uftdi_cfg_close(struct ucom_softc *); static void uftdi_cfg_set_dtr(struct ucom_softc *, uint8_t); static void uftdi_cfg_set_rts(struct ucom_softc *, uint8_t); static void uftdi_cfg_set_break(struct ucom_softc *, uint8_t); -static int uftdi_set_parm_soft(struct termios *, - struct uftdi_param_config *, uint8_t); +static int uftdi_set_parm_soft(struct ucom_softc *, struct termios *, + struct uftdi_param_config *); static int uftdi_pre_param(struct ucom_softc *, struct termios *); static void uftdi_cfg_param(struct ucom_softc *, struct termios *); static void uftdi_cfg_get_status(struct ucom_softc *, uint8_t *, uint8_t *); +static int uftdi_reset(struct ucom_softc *, int); +static int uftdi_set_bitmode(struct ucom_softc *, uint8_t, uint8_t); +static int uftdi_get_bitmode(struct ucom_softc *, uint8_t *); +static int uftdi_set_latency(struct ucom_softc *, int); +static int uftdi_get_latency(struct ucom_softc *, int *); +static int uftdi_set_event_char(struct ucom_softc *, int); +static int uftdi_set_error_char(struct ucom_softc *, int); +static int uftdi_ioctl(struct ucom_softc *, uint32_t, caddr_t, int, + struct thread *); static void uftdi_start_read(struct ucom_softc *); static void uftdi_stop_read(struct ucom_softc *); static void uftdi_start_write(struct ucom_softc *); static void uftdi_stop_write(struct ucom_softc *); -static uint8_t uftdi_8u232am_getrate(uint32_t, uint16_t *); static void uftdi_poll(struct ucom_softc *ucom); static const struct usb_config uftdi_config[UFTDI_N_TRANSFER] = { @@ -163,7 +223,7 @@ static const struct usb_config uftdi_con .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .bufsize = 0, /* use wMaxPacketSize */ + .bufsize = UFTDI_IBUFSIZE, .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, .callback = &uftdi_read_callback, }, @@ -176,7 +236,9 @@ static const struct ucom_callback uftdi_ .ucom_cfg_set_break = &uftdi_cfg_set_break, .ucom_cfg_param = &uftdi_cfg_param, .ucom_cfg_open = &uftdi_cfg_open, + .ucom_cfg_close = &uftdi_cfg_close, .ucom_pre_param = &uftdi_pre_param, + .ucom_ioctl = &uftdi_ioctl, .ucom_start_read = &uftdi_start_read, .ucom_stop_read = &uftdi_stop_read, .ucom_start_write = &uftdi_start_write, @@ -189,7 +251,6 @@ static device_method_t uftdi_methods[] = DEVMETHOD(device_probe, uftdi_probe), DEVMETHOD(device_attach, uftdi_attach), DEVMETHOD(device_detach, uftdi_detach), - DEVMETHOD_END }; @@ -844,6 +905,82 @@ static const STRUCT_USB_HOST_ID uftdi_de #undef UFTDI_DEV }; +/* + * Set up softc fields whose value depends on the device type. + * + * Note that the 2232C and 2232D devices are the same for our purposes. In the + * silicon the difference is that the D series has CPU FIFO mode and C doesn't. + * I haven't found any way of determining the C/D difference from info provided + * by the chip other than trying to set CPU FIFO mode and having it work or not. + * + * Due to a hardware bug, a 232B chip without an eeprom reports itself as a + * 232A, but if the serial number is also zero we know it's really a 232B. + */ +static void +uftdi_devtype_setup(struct uftdi_softc *sc, struct usb_attach_arg *uaa) +{ + struct usb_device_descriptor *dd; + + sc->sc_bcdDevice = uaa->info.bcdDevice; + + switch (uaa->info.bcdDevice) { + case 0x200: + dd = usbd_get_device_descriptor(sc->sc_udev); + if (dd->iSerialNumber == 0) { + sc->sc_devtype = DEVT_232B; + } else { + sc->sc_devtype = DEVT_232A; + } + sc->sc_ucom.sc_portno = 0; + break; + case 0x400: + sc->sc_devtype = DEVT_232B; + sc->sc_ucom.sc_portno = 0; + break; + case 0x500: + sc->sc_devtype = DEVT_2232D; + sc->sc_devflags |= DEVF_BAUDBITS_HINDEX; + sc->sc_ucom.sc_portno = FTDI_PIT_SIOA + uaa->info.bIfaceNum; + break; + case 0x600: + sc->sc_devtype = DEVT_232R; + sc->sc_ucom.sc_portno = 0; + break; + case 0x700: + sc->sc_devtype = DEVT_2232H; + sc->sc_devflags |= DEVF_BAUDBITS_HINDEX | DEVF_BAUDCLK_12M; + sc->sc_ucom.sc_portno = FTDI_PIT_SIOA + uaa->info.bIfaceNum; + break; + case 0x800: + sc->sc_devtype = DEVT_4232H; + sc->sc_devflags |= DEVF_BAUDBITS_HINDEX | DEVF_BAUDCLK_12M; + sc->sc_ucom.sc_portno = FTDI_PIT_SIOA + uaa->info.bIfaceNum; + break; + case 0x900: + sc->sc_devtype = DEVT_232H; + sc->sc_devflags |= DEVF_BAUDBITS_HINDEX | DEVF_BAUDCLK_12M; + sc->sc_ucom.sc_portno = FTDI_PIT_SIOA + uaa->info.bIfaceNum; + break; + case 0x1000: + sc->sc_devtype = DEVT_230X; + sc->sc_devflags |= DEVF_BAUDBITS_HINDEX; + sc->sc_ucom.sc_portno = FTDI_PIT_SIOA + uaa->info.bIfaceNum; + break; + default: + if (uaa->info.bcdDevice < 0x200) { + sc->sc_devtype = DEVT_SIO; + sc->sc_hdrlen = 1; + } else { + sc->sc_devtype = DEVT_232R; + device_printf(sc->sc_dev, "Warning: unknown FTDI " + "device type, bcdDevice=0x%04x, assuming 232R", + uaa->info.bcdDevice); + } + sc->sc_ucom.sc_portno = 0; + break; + } +} + static int uftdi_probe(device_t dev) { @@ -883,6 +1020,8 @@ uftdi_attach(device_t dev) struct uftdi_softc *sc = device_get_softc(dev); int error; + DPRINTF("\n"); + sc->sc_udev = uaa->device; sc->sc_dev = dev; sc->sc_unit = device_get_unit(dev); @@ -890,37 +1029,10 @@ uftdi_attach(device_t dev) device_set_usb_desc(dev); mtx_init(&sc->sc_mtx, "uftdi", NULL, MTX_DEF); - snprintf(sc->sc_name, sizeof(sc->sc_name), - "%s", device_get_nameunit(dev)); - - DPRINTF("\n"); - - sc->sc_iface_index = uaa->info.bIfaceIndex; - sc->sc_type = USB_GET_DRIVER_INFO(uaa) & UFTDI_TYPE_MASK; - - switch (sc->sc_type) { - case UFTDI_TYPE_AUTO: - /* simplified type check */ - if (uaa->info.bcdDevice >= 0x0200 || - usbd_get_iface(uaa->device, 1) != NULL) { - sc->sc_type = UFTDI_TYPE_8U232AM; - sc->sc_hdrlen = 0; - } else { - sc->sc_type = UFTDI_TYPE_SIO; - sc->sc_hdrlen = 1; - } - break; - case UFTDI_TYPE_SIO: - sc->sc_hdrlen = 1; - break; - case UFTDI_TYPE_8U232AM: - default: - sc->sc_hdrlen = 0; - break; - } + uftdi_devtype_setup(sc, uaa); error = usbd_transfer_setup(uaa->device, - &sc->sc_iface_index, sc->sc_xfer, uftdi_config, + &uaa->info.bIfaceIndex, sc->sc_xfer, uftdi_config, UFTDI_N_TRANSFER, sc, &sc->sc_mtx); if (error) { @@ -928,8 +1040,6 @@ uftdi_attach(device_t dev) "transfers failed\n"); goto detach; } - sc->sc_ucom.sc_portno = FTDI_PIT_SIOA + uaa->info.bIfaceNum; - /* clear stall at first run */ mtx_lock(&sc->sc_mtx); usbd_xfer_set_stall(sc->sc_xfer[UFTDI_BULK_DT_WR]); @@ -972,37 +1082,25 @@ uftdi_detach(device_t dev) static void uftdi_cfg_open(struct ucom_softc *ucom) { - struct uftdi_softc *sc = ucom->sc_parent; - uint16_t wIndex = ucom->sc_portno; - struct usb_device_request req; + /* + * This do-nothing open routine exists for the sole purpose of this + * DPRINTF() so that you can see the point at which open gets called + * when debugging is enabled. + */ DPRINTF(""); +} - /* perform a full reset on the device */ - - req.bmRequestType = UT_WRITE_VENDOR_DEVICE; - req.bRequest = FTDI_SIO_RESET; - USETW(req.wValue, FTDI_SIO_RESET_SIO); - USETW(req.wIndex, wIndex); - USETW(req.wLength, 0); - ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, - &req, NULL, 0, 1000); - - /* turn on RTS/CTS flow control */ - - req.bmRequestType = UT_WRITE_VENDOR_DEVICE; - req.bRequest = FTDI_SIO_SET_FLOW_CTRL; - USETW(req.wValue, 0); - USETW2(req.wIndex, FTDI_SIO_RTS_CTS_HS, wIndex); - USETW(req.wLength, 0); - ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, - &req, NULL, 0, 1000); +static void +uftdi_cfg_close(struct ucom_softc *ucom) +{ /* - * NOTE: with the new UCOM layer there will always be a - * "uftdi_cfg_param()" call after "open()", so there is no need for - * "open()" to configure anything + * This do-nothing close routine exists for the sole purpose of this + * DPRINTF() so that you can see the point at which close gets called + * when debugging is enabled. */ + DPRINTF(""); } static void @@ -1010,35 +1108,53 @@ uftdi_write_callback(struct usb_xfer *xf { struct uftdi_softc *sc = usbd_xfer_softc(xfer); struct usb_page_cache *pc; - uint32_t actlen; + uint32_t pktlen; + uint32_t buflen; uint8_t buf[1]; switch (USB_GET_STATE(xfer)) { + default: /* Error */ + if (error != USB_ERR_CANCELLED) { + /* try to clear stall first */ + usbd_xfer_set_stall(xfer); + } + /* FALLTHROUGH */ case USB_ST_SETUP: case USB_ST_TRANSFERRED: -tr_setup: + /* + * If output packets don't require headers (the common case) we + * can just load the buffer up with payload bytes all at once. + * Otherwise, loop to format packets into the buffer while there + * is data available, and room for a packet header and at least + * one byte of payload. + * + * NOTE: The FTDI chip doesn't accept zero length + * packets. This cannot happen because the "pktlen" + * will always be non-zero when "ucom_get_data()" + * returns non-zero which we check below. + */ pc = usbd_xfer_get_frame(xfer, 0); - if (ucom_get_data(&sc->sc_ucom, pc, - sc->sc_hdrlen, UFTDI_OBUFSIZE - sc->sc_hdrlen, - &actlen)) { - - if (sc->sc_hdrlen > 0) { - buf[0] = - FTDI_OUT_TAG(actlen, sc->sc_ucom.sc_portno); - usbd_copy_in(pc, 0, buf, 1); + if (sc->sc_hdrlen == 0) { + if (ucom_get_data(&sc->sc_ucom, pc, 0, UFTDI_OBUFSIZE, + &buflen) == 0) + break; + } else { + buflen = 0; + while (buflen < UFTDI_OBUFSIZE - sc->sc_hdrlen - 1 && + ucom_get_data(&sc->sc_ucom, pc, buflen + + sc->sc_hdrlen, UFTDI_OPKTSIZE - sc->sc_hdrlen, + &pktlen) != 0) { + buf[0] = FTDI_OUT_TAG(pktlen, + sc->sc_ucom.sc_portno); + usbd_copy_in(pc, buflen, buf, 1); + buflen += pktlen + sc->sc_hdrlen; } - usbd_xfer_set_frame_len(xfer, 0, actlen + sc->sc_hdrlen); - usbd_transfer_submit(xfer); } - return; - - default: /* Error */ - if (error != USB_ERR_CANCELLED) { - /* try to clear stall first */ - usbd_xfer_set_stall(xfer); - goto tr_setup; + if (buflen != 0) { + usbd_xfer_set_frame_len(xfer, 0, buflen); + usbd_transfer_submit(xfer); } - return; + break; } } @@ -1051,23 +1167,47 @@ uftdi_read_callback(struct usb_xfer *xfe uint8_t ftdi_msr; uint8_t msr; uint8_t lsr; - int actlen; + int buflen; + int pktlen; + int pktmax; + int offset; - usbd_xfer_status(xfer, &actlen, NULL, NULL, NULL); + usbd_xfer_status(xfer, &buflen, NULL, NULL, NULL); switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: - - if (actlen < 2) { + if (buflen < UFTDI_IHDRSIZE) goto tr_setup; - } pc = usbd_xfer_get_frame(xfer, 0); - usbd_copy_out(pc, 0, buf, 2); - + pktmax = xfer->max_packet_size - UFTDI_IHDRSIZE; + lsr = 0; + msr = 0; + offset = 0; + /* + * Extract packet headers and payload bytes from the buffer. + * Feed payload bytes to ucom/tty layer; OR-accumulate header + * status bits which are transient and could toggle with each + * packet. After processing all packets in the buffer, process + * the accumulated transient MSR and LSR values along with the + * non-transient bits from the last packet header. + */ + while (buflen >= UFTDI_IHDRSIZE) { + usbd_copy_out(pc, offset, buf, UFTDI_IHDRSIZE); + offset += UFTDI_IHDRSIZE; + buflen -= UFTDI_IHDRSIZE; + lsr |= FTDI_GET_LSR(buf); + if (FTDI_GET_MSR(buf) & FTDI_SIO_RI_MASK) + msr |= SER_RI; + pktlen = min(buflen, pktmax); + if (pktlen != 0) { + ucom_put_data(&sc->sc_ucom, pc, offset, + pktlen); + offset += pktlen; + buflen -= pktlen; + } + } ftdi_msr = FTDI_GET_MSR(buf); - lsr = FTDI_GET_LSR(buf); - msr = 0; if (ftdi_msr & FTDI_SIO_CTS_MASK) msr |= SER_CTS; if (ftdi_msr & FTDI_SIO_DSR_MASK) @@ -1088,11 +1228,7 @@ uftdi_read_callback(struct usb_xfer *xfe ucom_status_change(&sc->sc_ucom); } - actlen -= 2; - - if (actlen > 0) { - ucom_put_data(&sc->sc_ucom, pc, 2, actlen); - } + /* FALLTHROUGH */ case USB_ST_SETUP: tr_setup: usbd_xfer_set_frame_len(xfer, 0, usbd_xfer_max_len(xfer)); @@ -1172,57 +1308,161 @@ uftdi_cfg_set_break(struct ucom_softc *u &req, NULL, 0, 1000); } -static int -uftdi_set_parm_soft(struct termios *t, - struct uftdi_param_config *cfg, uint8_t type) +/* + * Return true if the given speed is within operational tolerance of the target + * speed. FTDI recommends that the hardware speed be within 3% of nominal. + */ +static inline boolean_t +uftdi_baud_within_tolerance(uint64_t speed, uint64_t target) { + return ((speed >= (target * 100) / 103) && + (speed <= (target * 100) / 97)); +} - memset(cfg, 0, sizeof(*cfg)); +static int +uftdi_sio_encode_baudrate(struct uftdi_softc *sc, speed_t speed, + struct uftdi_param_config *cfg) +{ + u_int i; + const speed_t sio_speeds[] = { + 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200 + }; - switch (type) { - case UFTDI_TYPE_SIO: - switch (t->c_ospeed) { - case 300: - cfg->rate = ftdi_sio_b300; - break; - case 600: - cfg->rate = ftdi_sio_b600; - break; - case 1200: - cfg->rate = ftdi_sio_b1200; - break; - case 2400: - cfg->rate = ftdi_sio_b2400; - break; - case 4800: - cfg->rate = ftdi_sio_b4800; - break; - case 9600: - cfg->rate = ftdi_sio_b9600; - break; - case 19200: - cfg->rate = ftdi_sio_b19200; - break; - case 38400: - cfg->rate = ftdi_sio_b38400; - break; - case 57600: - cfg->rate = ftdi_sio_b57600; - break; - case 115200: - cfg->rate = ftdi_sio_b115200; - break; - default: - return (EINVAL); + /* + * The original SIO chips were limited to a small choice of speeds + * listed in an internal table of speeds chosen by an index value. + */ + for (i = 0; i < nitems(sio_speeds); ++i) { + if (speed == sio_speeds[i]) { + cfg->baud_lobits = i; + cfg->baud_hibits = 0; + return (0); } - break; + } + return (ERANGE); +} - case UFTDI_TYPE_8U232AM: - if (uftdi_8u232am_getrate(t->c_ospeed, &cfg->rate)) { - return (EINVAL); - } - break; +static int +uftdi_encode_baudrate(struct uftdi_softc *sc, speed_t speed, + struct uftdi_param_config *cfg) +{ + static const uint8_t encoded_fraction[8] = {0, 3, 2, 4, 1, 5, 6, 7}; + static const uint8_t roundoff_232a[16] = { + 0, 1, 0, 1, 0, -1, 2, 1, + 0, -1, -2, -3, 4, 3, 2, 1, + }; + uint32_t clk, divisor, fastclk_flag, frac, hwspeed; + + /* + * If this chip has the fast clock capability and the speed is within + * range, use the 12MHz clock, otherwise the standard clock is 3MHz. + */ + if ((sc->sc_devflags & DEVF_BAUDCLK_12M) && speed >= 1200) { + clk = 12000000; + fastclk_flag = (1 << 17); + } else { + clk = 3000000; + fastclk_flag = 0; + } + + /* + * Make sure the requested speed is reachable with the available clock + * and a 14-bit divisor. + */ + if (speed < (clk >> 14) || speed > clk) + return (ERANGE); + + /* + * Calculate the divisor, initially yielding a fixed point number with a + * 4-bit (1/16ths) fraction, then round it to the nearest fraction the + * hardware can handle. When the integral part of the divisor is + * greater than one, the fractional part is in 1/8ths of the base clock. + * The FT8U232AM chips can handle only 0.125, 0.250, and 0.5 fractions. + * Later chips can handle all 1/8th fractions. + * + * If the integral part of the divisor is 1, a special rule applies: the + * fractional part can only be .0 or .5 (this is a limitation of the + * hardware). We handle this by truncating the fraction rather than + * rounding, because this only applies to the two fastest speeds the + * chip can achieve and rounding doesn't matter, either you've asked for + * that exact speed or you've asked for something the chip can't do. + * + * For the FT8U232AM chips, use a roundoff table to adjust the result + * to the nearest 1/8th fraction that is supported by the hardware, + * leaving a fixed-point number with a 3-bit fraction which exactly + * represents the math the hardware divider will do. For later-series + * chips that support all 8 fractional divisors, just round 16ths to + * 8ths by adding 1 and dividing by 2. + */ + divisor = (clk << 4) / speed; + if ((divisor & 0xf) == 1) + divisor &= 0xfffffff8; + else if (sc->sc_devtype == DEVT_232A) + divisor += roundoff_232a[divisor & 0x0f]; + else + divisor += 1; /* Rounds odd 16ths up to next 8th. */ + divisor >>= 1; + + /* + * Ensure the resulting hardware speed will be within operational + * tolerance (within 3% of nominal). + */ + hwspeed = (clk << 3) / divisor; + if (!uftdi_baud_within_tolerance(hwspeed, speed)) + return (ERANGE); + + /* + * Re-pack the divisor into hardware format. The lower 14-bits hold the + * integral part, while the upper bits specify the fraction by indexing + * a table of fractions within the hardware which is laid out as: + * {0.0, 0.5, 0.25, 0.125, 0.325, 0.625, 0.725, 0.875} + * The A-series chips only have the first four table entries; the + * roundoff table logic above ensures that the fractional part for those + * chips will be one of the first four values. + * + * When the divisor is 1 a special encoding applies: 1.0 is encoded as + * 0.0, and 1.5 is encoded as 1.0. The rounding logic above has already + * ensured that the fraction is either .0 or .5 if the integral is 1. + */ + frac = divisor & 0x07; + divisor >>= 3; + if (divisor == 1) { + if (frac == 0) + divisor = 0; /* 1.0 becomes 0.0 */ + else + frac = 0; /* 1.5 becomes 1.0 */ } + divisor |= (encoded_fraction[frac] << 14) | fastclk_flag; + + cfg->baud_lobits = (uint16_t)divisor; + cfg->baud_hibits = (uint16_t)(divisor >> 16); + + /* + * If this chip requires the baud bits to be in the high byte of the + * index word, move the bits up to that location. + */ + if (sc->sc_devflags & DEVF_BAUDBITS_HINDEX) { + cfg->baud_hibits <<= 8; + } + + return (0); +} + +static int +uftdi_set_parm_soft(struct ucom_softc *ucom, struct termios *t, + struct uftdi_param_config *cfg) +{ + struct uftdi_softc *sc = ucom->sc_parent; + int err; + + memset(cfg, 0, sizeof(*cfg)); + + if (sc->sc_devtype == DEVT_SIO) + err = uftdi_sio_encode_baudrate(sc, t->c_ospeed, cfg); + else + err = uftdi_encode_baudrate(sc, t->c_ospeed, cfg); + if (err != 0) + return (err); if (t->c_cflag & CSTOPB) cfg->lcr = FTDI_SIO_SET_DATA_STOP_BITS_2; @@ -1273,12 +1513,11 @@ uftdi_set_parm_soft(struct termios *t, static int uftdi_pre_param(struct ucom_softc *ucom, struct termios *t) { - struct uftdi_softc *sc = ucom->sc_parent; struct uftdi_param_config cfg; DPRINTF("\n"); - return (uftdi_set_parm_soft(t, &cfg, sc->sc_type)); + return (uftdi_set_parm_soft(ucom, t, &cfg)); } static void @@ -1289,7 +1528,7 @@ uftdi_cfg_param(struct ucom_softc *ucom, struct uftdi_param_config cfg; struct usb_device_request req; - if (uftdi_set_parm_soft(t, &cfg, sc->sc_type)) { + if (uftdi_set_parm_soft(ucom, t, &cfg)) { /* should not happen */ return; } @@ -1299,8 +1538,8 @@ uftdi_cfg_param(struct ucom_softc *ucom, req.bmRequestType = UT_WRITE_VENDOR_DEVICE; req.bRequest = FTDI_SIO_SET_BAUD_RATE; - USETW(req.wValue, cfg.rate); - USETW(req.wIndex, wIndex); + USETW(req.wValue, cfg.baud_lobits); + USETW(req.wIndex, cfg.baud_hibits | wIndex); USETW(req.wLength, 0); ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, &req, NULL, 0, 1000); @@ -1334,6 +1573,187 @@ uftdi_cfg_get_status(struct ucom_softc * *lsr = sc->sc_lsr; } +static int +uftdi_reset(struct ucom_softc *ucom, int reset_type) +{ + struct uftdi_softc *sc = ucom->sc_parent; + usb_device_request_t req; + + req.bmRequestType = UT_WRITE_VENDOR_DEVICE; + req.bRequest = FTDI_SIO_RESET; + + USETW(req.wIndex, sc->sc_ucom.sc_portno); + USETW(req.wLength, 0); + USETW(req.wValue, reset_type); + + return (usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, NULL)); +} + +static int +uftdi_set_bitmode(struct ucom_softc *ucom, uint8_t bitmode, uint8_t iomask) +{ + struct uftdi_softc *sc = ucom->sc_parent; + usb_device_request_t req; + + req.bmRequestType = UT_WRITE_VENDOR_DEVICE; + req.bRequest = FTDI_SIO_SET_BITMODE; + + USETW(req.wIndex, sc->sc_ucom.sc_portno); + USETW(req.wLength, 0); + + if (bitmode == UFTDI_BITMODE_NONE) + USETW2(req.wValue, 0, 0); + else + USETW2(req.wValue, (1 << bitmode), iomask); + + return (usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, NULL)); +} + +static int +uftdi_get_bitmode(struct ucom_softc *ucom, uint8_t *iomask) +{ + struct uftdi_softc *sc = ucom->sc_parent; + usb_device_request_t req; + + req.bmRequestType = UT_WRITE_VENDOR_DEVICE; + req.bRequest = FTDI_SIO_GET_BITMODE; + + USETW(req.wIndex, sc->sc_ucom.sc_portno); + USETW(req.wLength, 1); + USETW(req.wValue, 0); + + return (usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, iomask)); +} + +static int +uftdi_set_latency(struct ucom_softc *ucom, int latency) +{ + struct uftdi_softc *sc = ucom->sc_parent; + usb_device_request_t req; + + if (latency < 0 || latency > 255) + return (USB_ERR_INVAL); + + req.bmRequestType = UT_WRITE_VENDOR_DEVICE; + req.bRequest = FTDI_SIO_SET_LATENCY; + + USETW(req.wIndex, sc->sc_ucom.sc_portno); + USETW(req.wLength, 0); + USETW2(req.wValue, 0, latency); + + return (usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, NULL)); +} + +static int +uftdi_get_latency(struct ucom_softc *ucom, int *latency) +{ + struct uftdi_softc *sc = ucom->sc_parent; + usb_device_request_t req; + usb_error_t err; + uint8_t buf; + + req.bmRequestType = UT_WRITE_VENDOR_DEVICE; + req.bRequest = FTDI_SIO_GET_LATENCY; + + USETW(req.wIndex, sc->sc_ucom.sc_portno); + USETW(req.wLength, 1); + USETW(req.wValue, 0); + + err = usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, &buf); + *latency = buf; + + return (err); +} + +static int +uftdi_set_event_char(struct ucom_softc *ucom, int echar) +{ + struct uftdi_softc *sc = ucom->sc_parent; + usb_device_request_t req; + uint8_t enable; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Mon Apr 28 23:46:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A52836D; Mon, 28 Apr 2014 23:46:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BD87113F; Mon, 28 Apr 2014 23:46:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3SNk5WY007508; Mon, 28 Apr 2014 23:46:05 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3SNk4t1007506; Mon, 28 Apr 2014 23:46:04 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201404282346.s3SNk4t1007506@svn.freebsd.org> From: Ian Lepore Date: Mon, 28 Apr 2014 23:46:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265064 - stable/10/sys/boot/arm/uboot X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Apr 2014 23:46:05 -0000 Author: ian Date: Mon Apr 28 23:46:04 2014 New Revision: 265064 URL: http://svnweb.freebsd.org/changeset/base/265064 Log: MFC r257210, r258527: No hardfloat in ubldr, save/restore r9 for api calls. Modified: stable/10/sys/boot/arm/uboot/Makefile stable/10/sys/boot/arm/uboot/start.S Modified: stable/10/sys/boot/arm/uboot/Makefile ============================================================================== --- stable/10/sys/boot/arm/uboot/Makefile Mon Apr 28 23:16:46 2014 (r265063) +++ stable/10/sys/boot/arm/uboot/Makefile Mon Apr 28 23:46:04 2014 (r265064) @@ -90,7 +90,7 @@ CFLAGS+= -I. CLEANFILES+= vers.c loader.help -CFLAGS+= -ffreestanding +CFLAGS+= -ffreestanding -msoft-float LDFLAGS= -nostdlib -static LDFLAGS+= -T ldscript.generated Modified: stable/10/sys/boot/arm/uboot/start.S ============================================================================== --- stable/10/sys/boot/arm/uboot/start.S Mon Apr 28 23:16:46 2014 (r265063) +++ stable/10/sys/boot/arm/uboot/start.S Mon Apr 28 23:46:04 2014 (r265064) @@ -39,9 +39,10 @@ _start: ldr ip, =uboot_address str sp, [ip] - /* Save U-Boot's r8 */ + /* Save U-Boot's r8 and r9 */ ldr ip, =saved_regs str r8, [ip, #0] + str r9, [ip, #4] #ifdef _ARM_ARCH_6 mrc p15, 0, r2, c1, c0, 0 @@ -57,21 +58,24 @@ _start: * syscall() */ ENTRY(syscall) - /* Save caller's lr and r8 */ + /* Save caller's lr, r8 and r9 */ ldr ip, =saved_regs - str lr, [ip, #4] str r8, [ip, #8] - /* Restore U-Boot's r8 */ + str r9, [ip, #12] + str lr, [ip, #16] + /* Restore U-Boot's r8 and r9 */ ldr r8, [ip, #0] + ldr r9, [ip, #4] /* Call into U-Boot */ ldr lr, =return_from_syscall ldr ip, =syscall_ptr ldr pc, [ip] return_from_syscall: - /* Restore loader's r8 and lr */ + /* Restore loader's r8, r9 and lr */ ldr ip, =saved_regs + ldr lr, [ip, #16] + ldr r9, [ip, #12] ldr r8, [ip, #8] - ldr lr, [ip, #4] /* Return to caller */ mov pc, lr @@ -90,5 +94,7 @@ uboot_address: saved_regs: .long 0 /* U-Boot's r8 */ + .long 0 /* U-Boot's r9 */ .long 0 /* Loader's r8 */ + .long 0 /* Loader's r9 */ .long 0 /* Loader's lr */ From owner-svn-src-stable@FreeBSD.ORG Tue Apr 29 00:09:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CC722909; Tue, 29 Apr 2014 00:09:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B860E130C; Tue, 29 Apr 2014 00:09:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3T09muB016882; Tue, 29 Apr 2014 00:09:48 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3T09m0J016881; Tue, 29 Apr 2014 00:09:48 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201404290009.s3T09m0J016881@svn.freebsd.org> From: Ian Lepore Date: Tue, 29 Apr 2014 00:09:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265065 - stable/10/sys/boot/fdt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2014 00:09:48 -0000 Author: ian Date: Tue Apr 29 00:09:48 2014 New Revision: 265065 URL: http://svnweb.freebsd.org/changeset/base/265065 Log: MFC r261819 & r262242: Actually validate the header of a loaded dtb file. Modified: stable/10/sys/boot/fdt/fdt_loader_cmd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/fdt/fdt_loader_cmd.c ============================================================================== --- stable/10/sys/boot/fdt/fdt_loader_cmd.c Mon Apr 28 23:46:04 2014 (r265064) +++ stable/10/sys/boot/fdt/fdt_loader_cmd.c Tue Apr 29 00:09:48 2014 (r265065) @@ -227,10 +227,15 @@ fdt_load_dtb(vm_offset_t va) static int fdt_load_dtb_addr(struct fdt_header *header) { + int err; - // TODO: Verify that there really is an FDT at - // the specified location. fdtp_size = fdt_totalsize(header); + err = fdt_check_header(header); + if (err < 0) { + sprintf(command_errbuf, "error validating blob: %s", + fdt_strerror(err)); + return (err); + } free(fdtp); if ((fdtp = malloc(fdtp_size)) == NULL) { command_errmsg = "can't allocate memory for device tree copy"; @@ -662,7 +667,7 @@ fdt_fixup(void) { const char *env; char *ethstr; - int chosen, err, eth_no, len; + int chosen, eth_no, len; struct sys_info *si; env = NULL; @@ -670,13 +675,8 @@ fdt_fixup(void) ethstr = NULL; len = 0; - if (fdtp == NULL) { - err = fdt_setup_fdtp(); - if (err) { - sprintf(command_errbuf, "No valid device tree blob found!"); - return (0); - } - } + if (fdtp == NULL && fdt_setup_fdtp() != 0) + return (0); /* Create /chosen node (if not exists) */ if ((chosen = fdt_subnode_offset(fdtp, 0, "chosen")) == @@ -742,7 +742,7 @@ fdt_copy(vm_offset_t va) if (fdtp == NULL) { err = fdt_setup_fdtp(); if (err) { - printf("No valid device tree blob found!"); + printf("No valid device tree blob found!\n"); return (0); } } From owner-svn-src-stable@FreeBSD.ORG Tue Apr 29 00:13:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 22470A66; Tue, 29 Apr 2014 00:13:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E85231397; Tue, 29 Apr 2014 00:13:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3T0DPMG020309; Tue, 29 Apr 2014 00:13:25 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3T0DP20020308; Tue, 29 Apr 2014 00:13:25 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201404290013.s3T0DP20020308@svn.freebsd.org> From: Ian Lepore Date: Tue, 29 Apr 2014 00:13:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265066 - stable/10/sys/boot/fdt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2014 00:13:26 -0000 Author: ian Date: Tue Apr 29 00:13:25 2014 New Revision: 265066 URL: http://svnweb.freebsd.org/changeset/base/265066 Log: MFC r262326 (white space) and r262327 (fdt_addr). This change was supposed to be whitespace only, but a functional change snuck in, as follows: Look for both fdtaddr and fdt_addr env var names. Grepping the u-boot source shows that board vendors seem to be about evenly split on this. The added lines were: /* Board vendors use both fdtaddr and fdt_addr names. Grrrr. */ if (s == NULL) s = ub_env_get("fdt_addr"); Modified: stable/10/sys/boot/fdt/fdt_loader_cmd.c Modified: stable/10/sys/boot/fdt/fdt_loader_cmd.c ============================================================================== --- stable/10/sys/boot/fdt/fdt_loader_cmd.c Tue Apr 29 00:09:48 2014 (r265065) +++ stable/10/sys/boot/fdt/fdt_loader_cmd.c Tue Apr 29 00:13:25 2014 (r265066) @@ -250,39 +250,42 @@ fdt_load_dtb_addr(struct fdt_header *hea static int fdt_setup_fdtp() { - struct preloaded_file *bfp; - struct fdt_header *hdr; - const char *s; - char *p; - vm_offset_t va; - - if ((bfp = file_findfile(NULL, "dtb")) != NULL) { - printf("Using DTB from loaded file.\n"); - return fdt_load_dtb(bfp->f_addr); - } - - if (fdt_to_load != NULL) { - printf("Using DTB from memory address 0x%08X.\n", - (unsigned int)fdt_to_load); - return fdt_load_dtb_addr(fdt_to_load); - } - - s = ub_env_get("fdtaddr"); - if (s != NULL && *s != '\0') { - hdr = (struct fdt_header *)strtoul(s, &p, 16); - if (*p == '\0') { - printf("Using DTB provided by U-Boot.\n"); - return fdt_load_dtb_addr(hdr); - } - } - - if ((va = fdt_find_static_dtb()) != 0) { - printf("Using DTB compiled into kernel.\n"); - return (fdt_load_dtb(va)); - } - - command_errmsg = "no device tree blob found!"; - return (1); + struct preloaded_file *bfp; + struct fdt_header *hdr; + const char *s; + char *p; + vm_offset_t va; + + if ((bfp = file_findfile(NULL, "dtb")) != NULL) { + printf("Using DTB from loaded file.\n"); + return fdt_load_dtb(bfp->f_addr); + } + + if (fdt_to_load != NULL) { + printf("Using DTB from memory address 0x%08X.\n", + (unsigned int)fdt_to_load); + return fdt_load_dtb_addr(fdt_to_load); + } + + /* Board vendors use both fdtaddr and fdt_addr names. Grrrr. */ + s = ub_env_get("fdtaddr"); + if (s == NULL) + s = ub_env_get("fdt_addr"); + if (s != NULL && *s != '\0') { + hdr = (struct fdt_header *)strtoul(s, &p, 16); + if (*p == '\0') { + printf("Using DTB provided by U-Boot.\n"); + return fdt_load_dtb_addr(hdr); + } + } + + if ((va = fdt_find_static_dtb()) != 0) { + printf("Using DTB compiled into kernel.\n"); + return (fdt_load_dtb(va)); + } + + command_errmsg = "no device tree blob found!"; + return (1); } #define fdt_strtovect(str, cellbuf, lim, cellsize) _fdt_strtovect((str), \ From owner-svn-src-stable@FreeBSD.ORG Tue Apr 29 00:17:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3745D02; Tue, 29 Apr 2014 00:17:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE47013CA; Tue, 29 Apr 2014 00:17:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3T0HUCS020901; Tue, 29 Apr 2014 00:17:30 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3T0HUOY020900; Tue, 29 Apr 2014 00:17:30 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201404290017.s3T0HUOY020900@svn.freebsd.org> From: Ian Lepore Date: Tue, 29 Apr 2014 00:17:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265067 - stable/10/sys/boot/uboot/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2014 00:17:30 -0000 Author: ian Date: Tue Apr 29 00:17:30 2014 New Revision: 265067 URL: http://svnweb.freebsd.org/changeset/base/265067 Log: MFC r262337: Allow the boot device to be choosen by a u-boot env variable. If a "loaderdev=" env variable is set and the named device exists, it is used. If the device doesn't exist, fall back to the historic "probe" loop that prefers disk devices over network devices. Modified: stable/10/sys/boot/uboot/common/main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/uboot/common/main.c ============================================================================== --- stable/10/sys/boot/uboot/common/main.c Tue Apr 29 00:13:25 2014 (r265066) +++ stable/10/sys/boot/uboot/common/main.c Tue Apr 29 00:17:30 2014 (r265067) @@ -120,8 +120,9 @@ int main(void) { struct api_signature *sig = NULL; - int i; + int diskdev, i, netdev, usedev; struct open_file f; + const char * loaderdev; if (!api_search_sig(&sig)) return (-1); @@ -167,8 +168,49 @@ main(void) meminfo(); /* - * March through the device switch probing for things. + * March through the device switch probing for things -- sort of. + * + * The devsw array will have one or two items in it. If + * LOADER_DISK_SUPPORT is defined the first item will be a disk (which + * may not actually work if u-boot didn't supply one). If + * LOADER_NET_SUPPORT is defined the next item will be a network + * interface. Again it may not actually work at the u-boot level. + * + * The original logic was to always use a disk if it could be + * successfully opened, otherwise use the network interface. Now that + * logic is amended to first check whether the u-boot environment + * contains a loaderdev variable which tells us which device to use. If + * it does, we use it and skip the original (second) loop which "probes" + * for a device. We still loop over the devsw just in case it ever gets + * expanded to hold more than 2 devices (but then unit numbers, which + * don't currently exist, may come into play). If the device named by + * loaderdev isn't found, fall back using to the old "probe" loop. + * + * The original probe loop still effectively behaves as it always has: + * the first usable disk device is choosen, and a network device is used + * only if no disk device is found. The logic has been reworked so that + * it examines (and thus lists) every potential device along the way + * instead of breaking out of the loop when the first device is found. */ + loaderdev = ub_env_get("loaderdev"); + usedev = -1; + if (loaderdev != NULL) { + for (i = 0; devsw[i] != NULL; i++) { + if (strcmp(loaderdev, devsw[i]->dv_name) == 0) { + if (devsw[i]->dv_init == NULL) + continue; + if ((devsw[i]->dv_init)() != 0) + continue; + usedev = i; + goto have_device; + } + } + printf("U-Boot env contains 'loaderdev=%s', " + "device not found.\n", loaderdev); + } + printf("Probing for bootable devices...\n"); + diskdev = -1; + netdev = -1; for (i = 0; devsw[i] != NULL; i++) { if (devsw[i]->dv_init == NULL) @@ -176,27 +218,43 @@ main(void) if ((devsw[i]->dv_init)() != 0) continue; - printf("\nDevice: %s\n", devsw[i]->dv_name); - - currdev.d_dev = devsw[i]; - currdev.d_type = currdev.d_dev->dv_type; - currdev.d_unit = 0; + printf("Bootable device: %s\n", devsw[i]->dv_name); if (strncmp(devsw[i]->dv_name, "disk", strlen(devsw[i]->dv_name)) == 0) { f.f_devdata = &currdev; + currdev.d_dev = devsw[i]; + currdev.d_type = currdev.d_dev->dv_type; + currdev.d_unit = 0; currdev.d_disk.slice = 0; - if (devsw[i]->dv_open(&f,&currdev) == 0) - break; + if (devsw[i]->dv_open(&f, &currdev) == 0) { + devsw[i]->dv_close(&f); + if (diskdev == -1) + diskdev = i; + } + } else if (strncmp(devsw[i]->dv_name, "net", + strlen(devsw[i]->dv_name)) == 0) { + if (netdev == -1) + netdev = i; } - - if (strncmp(devsw[i]->dv_name, "net", - strlen(devsw[i]->dv_name)) == 0) - break; } - if (devsw[i] == NULL) - panic("No boot device found!"); + if (diskdev != -1) + usedev = diskdev; + else if (netdev != -1) + usedev = netdev; + else + panic("No bootable devices found!\n"); + +have_device: + + currdev.d_dev = devsw[usedev]; + currdev.d_type = devsw[usedev]->dv_type; + currdev.d_unit = 0; + if (currdev.d_type == DEV_TYP_STOR) + currdev.d_disk.slice = 0; + + printf("Current device: %s\n", currdev.d_dev->dv_name); env_setenv("currdev", EV_VOLATILE, uboot_fmtdev(&currdev), uboot_setcurrdev, env_nounset); From owner-svn-src-stable@FreeBSD.ORG Tue Apr 29 00:31:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 237D4B5; Tue, 29 Apr 2014 00:31:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 035E415DC; Tue, 29 Apr 2014 00:31:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3T0VWbZ026664; Tue, 29 Apr 2014 00:31:32 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3T0VWt1026659; Tue, 29 Apr 2014 00:31:32 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201404290031.s3T0VWt1026659@svn.freebsd.org> From: Ian Lepore Date: Tue, 29 Apr 2014 00:31:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265068 - in stable/10/sys/boot: common fdt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2014 00:31:33 -0000 Author: ian Date: Tue Apr 29 00:31:32 2014 New Revision: 265068 URL: http://svnweb.freebsd.org/changeset/base/265068 Log: MFC r262340, r262345, r262347, find and load an appropriate dtb file. The search order for a usable dtb in fdt_setup_fdtp() is now - A dtb loaded with an explicit "load -t dtb" command. - A dtb already loaded into memory somehow[*] and pointed to by fdt_to_load. - A dtb in the memory pointed to by the u-boot env vars fdtaddr or fdt_addr. - A file named by the u-boot env vars fdtfile or fdt_file. - A static dtb compiled into the kernel. * Presumably by some arch-specific command or code. Modified: stable/10/sys/boot/common/bootstrap.h stable/10/sys/boot/common/module.c stable/10/sys/boot/fdt/fdt_loader_cmd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/common/bootstrap.h ============================================================================== --- stable/10/sys/boot/common/bootstrap.h Tue Apr 29 00:17:30 2014 (r265067) +++ stable/10/sys/boot/common/bootstrap.h Tue Apr 29 00:31:32 2014 (r265068) @@ -233,6 +233,7 @@ int mod_loadkld(const char *name, int struct preloaded_file *file_alloc(void); struct preloaded_file *file_findfile(char *name, char *type); struct file_metadata *file_findmetadata(struct preloaded_file *fp, int type); +struct preloaded_file *file_loadraw(char *name, char *type); void file_discard(struct preloaded_file *fp); void file_addmetadata(struct preloaded_file *fp, int type, size_t size, void *p); int file_addmodule(struct preloaded_file *fp, char *modname, int version, Modified: stable/10/sys/boot/common/module.c ============================================================================== --- stable/10/sys/boot/common/module.c Tue Apr 29 00:17:30 2014 (r265067) +++ stable/10/sys/boot/common/module.c Tue Apr 29 00:31:32 2014 (r265068) @@ -52,7 +52,6 @@ struct moduledir { }; static int file_load(char *filename, vm_offset_t dest, struct preloaded_file **result); -static int file_loadraw(char *type, char *name); static int file_load_dependencies(struct preloaded_file *base_mod); static char * file_search(const char *name, char **extlist); static struct kernel_module * file_findmodule(struct preloaded_file *fp, char *modname, struct mod_depend *verinfo); @@ -134,7 +133,7 @@ command_load(int argc, char *argv[]) command_errmsg = "invalid load type"; return(CMD_ERROR); } - return(file_loadraw(typestr, argv[1])); + return(file_loadraw(argv[1], typestr) ? CMD_OK : CMD_ERROR); } /* * Do we have explicit KLD load ? @@ -189,7 +188,7 @@ command_load_geli(int argc, char *argv[] argv += (optind - 1); argc -= (optind - 1); sprintf(typestr, "%s:geli_keyfile%d", argv[1], num); - return(file_loadraw(typestr, argv[2])); + return(file_loadraw(argv[2], typestr) ? CMD_OK : CMD_ERROR); } COMMAND_SET(unload, "unload", "unload all modules", command_unload); @@ -357,8 +356,8 @@ file_load_dependencies(struct preloaded_ * We've been asked to load (name) as (type), so just suck it in, * no arguments or anything. */ -int -file_loadraw(char *type, char *name) +struct preloaded_file * +file_loadraw(char *name, char *type) { struct preloaded_file *fp; char *cp; @@ -368,21 +367,21 @@ file_loadraw(char *type, char *name) /* We can't load first */ if ((file_findfile(NULL, NULL)) == NULL) { command_errmsg = "can't load file before kernel"; - return(CMD_ERROR); + return(NULL); } /* locate the file on the load path */ cp = file_search(name, NULL); if (cp == NULL) { sprintf(command_errbuf, "can't find '%s'", name); - return(CMD_ERROR); + return(NULL); } name = cp; if ((fd = open(name, O_RDONLY)) < 0) { sprintf(command_errbuf, "can't open '%s': %s", name, strerror(errno)); free(name); - return(CMD_ERROR); + return(NULL); } if (archsw.arch_loadaddr != NULL) @@ -398,7 +397,7 @@ file_loadraw(char *type, char *name) sprintf(command_errbuf, "error reading '%s': %s", name, strerror(errno)); free(name); close(fd); - return(CMD_ERROR); + return(NULL); } laddr += got; } @@ -419,7 +418,7 @@ file_loadraw(char *type, char *name) /* Add to the list of loaded files */ file_insert_tail(fp); close(fd); - return(CMD_OK); + return(fp); } /* Modified: stable/10/sys/boot/fdt/fdt_loader_cmd.c ============================================================================== --- stable/10/sys/boot/fdt/fdt_loader_cmd.c Tue Apr 29 00:17:30 2014 (r265067) +++ stable/10/sys/boot/fdt/fdt_loader_cmd.c Tue Apr 29 00:31:32 2014 (r265068) @@ -128,6 +128,8 @@ fdt_find_static_dtb() char *strp; int i, sym_count; + debugf("fdt_find_static_dtb()\n"); + sym_count = symtab = strtab = 0; strp = NULL; @@ -189,6 +191,8 @@ fdt_load_dtb(vm_offset_t va) struct fdt_header header; int err; + debugf("fdt_load_dtb(0x%08jx)\n", (uintmax_t)va); + COPYOUT(va, &header, sizeof(header)); err = fdt_check_header(&header); if (err < 0) { @@ -229,6 +233,8 @@ fdt_load_dtb_addr(struct fdt_header *hea { int err; + debugf("fdt_load_dtb_addr(0x%p)\n", header); + fdtp_size = fdt_totalsize(header); err = fdt_check_header(header); if (err < 0) { @@ -248,6 +254,32 @@ fdt_load_dtb_addr(struct fdt_header *hea } static int +fdt_load_dtb_file(const char * filename) +{ + struct preloaded_file *bfp, *oldbfp; + int err; + + debugf("fdt_load_dtb_file(%s)\n", filename); + + oldbfp = file_findfile(NULL, "dtb"); + + /* Attempt to load and validate a new dtb from a file. */ + if ((bfp = file_loadraw(filename, "dtb")) == NULL) { + sprintf(command_errbuf, "failed to load file '%s'", filename); + return (1); + } + if ((err = fdt_load_dtb(bfp->f_addr)) != 0) { + file_discard(bfp); + return (err); + } + + /* A new dtb was validated, discard any previous file. */ + if (oldbfp) + file_discard(oldbfp); + return (0); +} + +static int fdt_setup_fdtp() { struct preloaded_file *bfp; @@ -256,35 +288,68 @@ fdt_setup_fdtp() char *p; vm_offset_t va; + debugf("fdt_setup_fdtp()\n"); + + /* If we already loaded a file, use it. */ if ((bfp = file_findfile(NULL, "dtb")) != NULL) { - printf("Using DTB from loaded file.\n"); - return fdt_load_dtb(bfp->f_addr); + if (fdt_load_dtb(bfp->f_addr) == 0) { + printf("Using DTB from loaded file '%s'.\n", + bfp->f_name); + return (0); + } } - + + /* If we were given the address of a valid blob in memory, use it. */ if (fdt_to_load != NULL) { - printf("Using DTB from memory address 0x%08X.\n", - (unsigned int)fdt_to_load); - return fdt_load_dtb_addr(fdt_to_load); + if (fdt_load_dtb_addr(fdt_to_load) == 0) { + printf("Using DTB from memory address 0x%08X.\n", + (unsigned int)fdt_to_load); + return (0); + } } - /* Board vendors use both fdtaddr and fdt_addr names. Grrrr. */ + /* + * If the U-boot environment contains a variable giving the address of a + * valid blob in memory, use it. Board vendors use both fdtaddr and + * fdt_addr names. + */ s = ub_env_get("fdtaddr"); if (s == NULL) s = ub_env_get("fdt_addr"); if (s != NULL && *s != '\0') { hdr = (struct fdt_header *)strtoul(s, &p, 16); if (*p == '\0') { - printf("Using DTB provided by U-Boot.\n"); - return fdt_load_dtb_addr(hdr); + if (fdt_load_dtb_addr(hdr) == 0) { + printf("Using DTB provided by U-Boot at " + "address 0x%p.\n", hdr); + return (0); + } } } - + + /* + * If the U-boot environment contains a variable giving the name of a + * file, use it if we can load and validate it. + */ + s = ub_env_get("fdtfile"); + if (s == NULL) + s = ub_env_get("fdt_file"); + if (s != NULL && *s != '\0') { + if (fdt_load_dtb_file(s) == 0) { + printf("Loaded DTB from file '%s'.\n", s); + return (0); + } + } + + /* If there is a dtb compiled into the kernel, use it. */ if ((va = fdt_find_static_dtb()) != 0) { - printf("Using DTB compiled into kernel.\n"); - return (fdt_load_dtb(va)); + if (fdt_load_dtb(va) == 0) { + printf("Using DTB compiled into kernel.\n"); + return (0); + } } - command_errmsg = "no device tree blob found!"; + command_errmsg = "No device tree blob found!\n"; return (1); } @@ -678,6 +743,8 @@ fdt_fixup(void) ethstr = NULL; len = 0; + debugf("fdt_fixup()\n"); + if (fdtp == NULL && fdt_setup_fdtp() != 0) return (0); @@ -741,7 +808,7 @@ int fdt_copy(vm_offset_t va) { int err; - + debugf("fdt_copy va 0x%08x\n", va); if (fdtp == NULL) { err = fdt_setup_fdtp(); if (err) { From owner-svn-src-stable@FreeBSD.ORG Tue Apr 29 00:36:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48FC4465; Tue, 29 Apr 2014 00:36:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34EB4163C; Tue, 29 Apr 2014 00:36:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3T0arfY028996; Tue, 29 Apr 2014 00:36:53 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3T0aqKj028991; Tue, 29 Apr 2014 00:36:52 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201404290036.s3T0aqKj028991@svn.freebsd.org> From: Ian Lepore Date: Tue, 29 Apr 2014 00:36:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265069 - in stable/10/sys/boot: fdt uboot/common uboot/lib X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2014 00:36:53 -0000 Author: ian Date: Tue Apr 29 00:36:51 2014 New Revision: 265069 URL: http://svnweb.freebsd.org/changeset/base/265069 Log: MFC r262664, r262694: Prevent fdt data loaded from a file from overwriting the kernel environment, by having uboot_autoload() do the fdt setup (which may load a file) rather than waiting until we're actually in the process of launching the kernel. As part of making this happen... - Define LOADER_FDT_SUPPORT on the uboot/lib compile command line when MK_FDT is set. - Make fdt_setup_fdtb() public. - Declare public fdt_whatever() functions in a header instead of using scattered extern decls in .c files. Modified: stable/10/sys/boot/fdt/fdt_loader_cmd.c stable/10/sys/boot/uboot/common/metadata.c stable/10/sys/boot/uboot/lib/Makefile stable/10/sys/boot/uboot/lib/libuboot.h stable/10/sys/boot/uboot/lib/module.c Modified: stable/10/sys/boot/fdt/fdt_loader_cmd.c ============================================================================== --- stable/10/sys/boot/fdt/fdt_loader_cmd.c Tue Apr 29 00:31:32 2014 (r265068) +++ stable/10/sys/boot/fdt/fdt_loader_cmd.c Tue Apr 29 00:36:51 2014 (r265069) @@ -279,7 +279,7 @@ fdt_load_dtb_file(const char * filename) return (0); } -static int +int fdt_setup_fdtp() { struct preloaded_file *bfp; Modified: stable/10/sys/boot/uboot/common/metadata.c ============================================================================== --- stable/10/sys/boot/uboot/common/metadata.c Tue Apr 29 00:31:32 2014 (r265068) +++ stable/10/sys/boot/uboot/common/metadata.c Tue Apr 29 00:36:51 2014 (r265069) @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$"); #include "glue.h" #if defined(LOADER_FDT_SUPPORT) -extern int fdt_copy(vm_offset_t); +#include "libuboot.h" #endif /* Modified: stable/10/sys/boot/uboot/lib/Makefile ============================================================================== --- stable/10/sys/boot/uboot/lib/Makefile Tue Apr 29 00:31:32 2014 (r265068) +++ stable/10/sys/boot/uboot/lib/Makefile Tue Apr 29 00:36:51 2014 (r265069) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + .PATH: ${.CURDIR}/../../common LIB= uboot @@ -18,6 +20,16 @@ SRCS+= disk.c CFLAGS+= -DLOADER_DISK_SUPPORT .endif +.if ${MK_FDT} != "no" +LOADER_FDT_SUPPORT= yes +.else +LOADER_FDT_SUPPORT= no +.endif + +.if ${LOADER_FDT_SUPPORT} == "yes" +CFLAGS+= -DLOADER_FDT_SUPPORT +.endif + # Pick up FDT includes CFLAGS+= -I${.CURDIR}/../../../../sys/contrib/libfdt/ Modified: stable/10/sys/boot/uboot/lib/libuboot.h ============================================================================== --- stable/10/sys/boot/uboot/lib/libuboot.h Tue Apr 29 00:31:32 2014 (r265068) +++ stable/10/sys/boot/uboot/lib/libuboot.h Tue Apr 29 00:36:51 2014 (r265069) @@ -69,3 +69,9 @@ struct file_format; extern struct file_format uboot_elf; void reboot(void); + +#if defined(LOADER_FDT_SUPPORT) +extern int fdt_setup_fdtp(); +extern int fdt_copy(vm_offset_t); +#endif + Modified: stable/10/sys/boot/uboot/lib/module.c ============================================================================== --- stable/10/sys/boot/uboot/lib/module.c Tue Apr 29 00:31:32 2014 (r265068) +++ stable/10/sys/boot/uboot/lib/module.c Tue Apr 29 00:36:51 2014 (r265069) @@ -29,19 +29,23 @@ __FBSDID("$FreeBSD$"); /* * U-Boot-specific module functionality. - * - * XXX not much for now... - * */ #include #include #include "bootstrap.h" +#include "libuboot.h" int uboot_autoload(void) { +#if defined(LOADER_FDT_SUPPORT) + int err; + + if ((err = fdt_setup_fdtp()) != 0) + return (err); +#endif return(0); } From owner-svn-src-stable@FreeBSD.ORG Tue Apr 29 00:38:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 82B4F640; Tue, 29 Apr 2014 00:38:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E45A1663; Tue, 29 Apr 2014 00:38:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3T0clbx029229; Tue, 29 Apr 2014 00:38:47 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3T0clCP029228; Tue, 29 Apr 2014 00:38:47 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201404290038.s3T0clCP029228@svn.freebsd.org> From: Ian Lepore Date: Tue, 29 Apr 2014 00:38:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265070 - stable/10/sys/boot/uboot/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2014 00:38:47 -0000 Author: ian Date: Tue Apr 29 00:38:46 2014 New Revision: 265070 URL: http://svnweb.freebsd.org/changeset/base/265070 Log: MFC r262666: exit with code 0xbadab1 if the u-boot API support is missing. Modified: stable/10/sys/boot/uboot/common/main.c Modified: stable/10/sys/boot/uboot/common/main.c ============================================================================== --- stable/10/sys/boot/uboot/common/main.c Tue Apr 29 00:36:51 2014 (r265069) +++ stable/10/sys/boot/uboot/common/main.c Tue Apr 29 00:38:46 2014 (r265070) @@ -124,15 +124,21 @@ main(void) struct open_file f; const char * loaderdev; + /* + * If we can't find the magic signature and related info, exit with a + * unique error code that U-Boot reports as "## Application terminated, + * rc = 0xnnbadab1". Hopefully 'badab1' looks enough like "bad api" to + * provide a clue. It's better than 0xffffffff anyway. + */ if (!api_search_sig(&sig)) - return (-1); + return (0x01badab1); syscall_ptr = sig->syscall; if (syscall_ptr == NULL) - return (-2); + return (0x02badab1); if (sig->version > API_SIG_VERSION) - return (-3); + return (0x03badab1); /* Clear BSS sections */ bzero(__sbss_start, __sbss_end - __sbss_start); From owner-svn-src-stable@FreeBSD.ORG Tue Apr 29 00:45:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E204903; Tue, 29 Apr 2014 00:45:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC4071723; Tue, 29 Apr 2014 00:45:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3T0jhhj032980; Tue, 29 Apr 2014 00:45:43 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3T0jhxD032973; Tue, 29 Apr 2014 00:45:43 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201404290045.s3T0jhxD032973@svn.freebsd.org> From: Ian Lepore Date: Tue, 29 Apr 2014 00:45:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265071 - in stable/10/sys/boot/uboot: common lib X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2014 00:45:44 -0000 Author: ian Date: Tue Apr 29 00:45:42 2014 New Revision: 265071 URL: http://svnweb.freebsd.org/changeset/base/265071 Log: MFC r263052, r263124, r263265, r263267... Enhance loaderdev env var. Enhance the mechanism that lets you configure the ubldr boot device by setting the u-boot environment variable loaderdev=. It used to accept only 'disk' or 'net'. Now it allows specification of unit, slice, and partition as well. In addition to the generic 'disk' it also accepts specific storage device types such as 'mmc' or 'sata'. If there isn't a loaderdev env var, the historical behavior is maintained. It will use the first storage device it finds, or a network device if no working storage device exists. 99% of the work on this was done by Patrick Kelsey, but I made some changes, so if anything goes wrong, blame me. (Indeed, the 3 followup commits fixed things I got wrong on the first.) Modified: stable/10/sys/boot/uboot/common/main.c stable/10/sys/boot/uboot/lib/api_public.h stable/10/sys/boot/uboot/lib/disk.c stable/10/sys/boot/uboot/lib/glue.c stable/10/sys/boot/uboot/lib/libuboot.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/uboot/common/main.c ============================================================================== --- stable/10/sys/boot/uboot/common/main.c Tue Apr 29 00:38:46 2014 (r265070) +++ stable/10/sys/boot/uboot/common/main.c Tue Apr 29 00:45:42 2014 (r265071) @@ -36,10 +36,27 @@ __FBSDID("$FreeBSD$"); #include "glue.h" #include "libuboot.h" +#ifndef nitems +#define nitems(x) (sizeof((x)) / sizeof((x)[0])) +#endif + struct uboot_devdesc currdev; struct arch_switch archsw; /* MI/MD interface boundary */ int devs_no; +struct device_type { + const char *name; + int type; +} device_types[] = { + { "disk", DEV_TYP_STOR }, + { "ide", DEV_TYP_STOR | DT_STOR_IDE }, + { "mmc", DEV_TYP_STOR | DT_STOR_MMC }, + { "sata", DEV_TYP_STOR | DT_STOR_SATA }, + { "scsi", DEV_TYP_STOR | DT_STOR_SCSI }, + { "usb", DEV_TYP_STOR | DT_STOR_USB }, + { "net", DEV_TYP_NET } +}; + extern char end[]; extern char bootprog_name[]; extern char bootprog_rev[]; @@ -111,17 +128,265 @@ meminfo(void) for (i = 0; i < 3; i++) { size = memsize(si, t[i]); if (size > 0) - printf("%s:\t %lldMB\n", ub_mem_type(t[i]), + printf("%s: %lldMB\n", ub_mem_type(t[i]), size / 1024 / 1024); } } +static const char * +get_device_type(const char *devstr, int *devtype) +{ + int i; + int namelen; + struct device_type *dt; + + if (devstr) { + for (i = 0; i < nitems(device_types); i++) { + dt = &device_types[i]; + namelen = strlen(dt->name); + if (strncmp(dt->name, devstr, namelen) == 0) { + *devtype = dt->type; + return (devstr + namelen); + } + } + printf("Unknown device type '%s'\n", devstr); + } + + *devtype = -1; + return (NULL); +} + +static const char * +device_typename(int type) +{ + int i; + + for (i = 0; i < nitems(device_types); i++) + if (device_types[i].type == type) + return (device_types[i].name); + + return (""); +} + +/* + * Parse a device string into type, unit, slice and partition numbers. A + * returned value of -1 for type indicates a search should be done for the + * first loadable device, otherwise a returned value of -1 for unit + * indicates a search should be done for the first loadable device of the + * given type. + * + * The returned values for slice and partition are interpreted by + * disk_open(). + * + * Valid device strings: For device types: + * + * DEV_TYP_STOR, DEV_TYP_NET + * DEV_TYP_STOR, DEV_TYP_NET + * : DEV_TYP_STOR, DEV_TYP_NET + * : DEV_TYP_STOR + * :. DEV_TYP_STOR + * :. DEV_TYP_STOR + * + * For valid type names, see the device_types array, above. + * + * Slice numbers are 1-based. 0 is a wildcard. + */ +static void +get_load_device(int *type, int *unit, int *slice, int *partition) +{ + char *devstr; + const char *p; + char *endp; + + *type = -1; + *unit = -1; + *slice = 0; + *partition = -1; + + devstr = ub_env_get("loaderdev"); + if (devstr == NULL) { + printf("U-Boot env: loaderdev not set, will probe all devices.\n"); + return; + } + printf("U-Boot env: loaderdev='%s'\n", devstr); + + p = get_device_type(devstr, type); + + /* + * Empty device string, or unknown device name, or a bare, known + * device name. + */ + if ((*type == -1) || (*p == '\0')) { + return; + } + + /* Malformed unit number. */ + if (!isdigit(*p)) { + *type = -1; + return; + } + + /* Guaranteed to extract a number from the string, as *p is a digit. */ + *unit = strtol(p, &endp, 10); + p = endp; + + /* Known device name with unit number and nothing else. */ + if (*p == '\0') { + return; + } + + /* Device string is malformed beyond unit number. */ + if (*p != ':') { + *type = -1; + *unit = -1; + return; + } + + p++; + + /* No slice and partition specification. */ + if ('\0' == *p ) + return; + + /* Only DEV_TYP_STOR devices can have a slice specification. */ + if (!(*type & DEV_TYP_STOR)) { + *type = -1; + *unit = -1; + return; + } + + *slice = strtoul(p, &endp, 10); + + /* Malformed slice number. */ + if (p == endp) { + *type = -1; + *unit = -1; + *slice = 0; + return; + } + + p = endp; + + /* No partition specification. */ + if (*p == '\0') + return; + + /* Device string is malformed beyond slice number. */ + if (*p != '.') { + *type = -1; + *unit = -1; + *slice = 0; + return; + } + + p++; + + /* No partition specification. */ + if (*p == '\0') + return; + + *partition = strtol(p, &endp, 10); + p = endp; + + /* Full, valid device string. */ + if (*endp == '\0') + return; + + /* Junk beyond partition number. */ + *type = -1; + *unit = -1; + *slice = 0; + *partition = -1; +} + +static void +print_disk_probe_info() +{ + char slice[32]; + char partition[32]; + + if (currdev.d_disk.slice > 0) + sprintf(slice, "%d", currdev.d_disk.slice); + else + strcpy(slice, ""); + + if (currdev.d_disk.partition > 0) + sprintf(partition, "%d", currdev.d_disk.partition); + else + strcpy(partition, ""); + + printf(" Checking unit=%d slice=%s partition=%s...", + currdev.d_unit, slice, partition); + +} + +static int +probe_disks(int devidx, int load_type, int load_unit, int load_slice, + int load_partition) +{ + int open_result, unit; + struct open_file f; + + currdev.d_disk.slice = load_slice; + currdev.d_disk.partition = load_partition; + + f.f_devdata = &currdev; + open_result = -1; + + if (load_type == -1) { + printf(" Probing all disk devices...\n"); + /* Try each disk in succession until one works. */ + for (currdev.d_unit = 0; currdev.d_unit < UB_MAX_DEV; + currdev.d_unit++) { + print_disk_probe_info(); + open_result = devsw[devidx]->dv_open(&f, &currdev); + if (open_result == 0) { + printf(" good.\n"); + return (0); + } + printf("\n"); + } + return (-1); + } + + if (load_unit == -1) { + printf(" Probing all %s devices...\n", device_typename(load_type)); + /* Try each disk of given type in succession until one works. */ + for (unit = 0; unit < UB_MAX_DEV; unit++) { + currdev.d_unit = uboot_diskgetunit(load_type, unit); + if (currdev.d_unit == -1) + break; + print_disk_probe_info(); + open_result = devsw[devidx]->dv_open(&f, &currdev); + if (open_result == 0) { + printf(" good.\n"); + return (0); + } + printf("\n"); + } + return (-1); + } + + if ((currdev.d_unit = uboot_diskgetunit(load_type, load_unit)) != -1) { + print_disk_probe_info(); + open_result = devsw[devidx]->dv_open(&f,&currdev); + if (open_result == 0) { + printf(" good.\n"); + return (0); + } + printf("\n"); + } + + printf(" Requested disk type/unit not found\n"); + return (-1); +} + int main(void) { struct api_signature *sig = NULL; - int diskdev, i, netdev, usedev; - struct open_file f; + int load_type, load_unit, load_slice, load_partition; + int i; const char * loaderdev; /* @@ -145,21 +410,26 @@ main(void) bzero(__bss_start, _end - __bss_start); /* - * Set up console. - */ + * Initialise the heap as early as possible. Once this is done, + * alloc() is usable. The stack is buried inside us, so this is safe. + */ + setheap((void *)end, (void *)(end + 512 * 1024)); + + /* + * Set up console. + */ cons_probe(); + printf("Compatible U-Boot API signature found @%x\n", (uint32_t)sig); - printf("Compatible API signature found @%x\n", (uint32_t)sig); + printf("\n"); + printf("%s, Revision %s\n", bootprog_name, bootprog_rev); + printf("(%s, %s)\n", bootprog_maker, bootprog_date); + printf("\n"); dump_sig(sig); dump_addr_info(); - /* - * Initialise the heap as early as possible. Once this is done, - * alloc() is usable. The stack is buried inside us, so this is - * safe. - */ - setheap((void *)end, (void *)(end + 512 * 1024)); + meminfo(); /* * Enumerate U-Boot devices @@ -168,55 +438,11 @@ main(void) panic("no U-Boot devices found"); printf("Number of U-Boot devices: %d\n", devs_no); - printf("\n"); - printf("%s, Revision %s\n", bootprog_name, bootprog_rev); - printf("(%s, %s)\n", bootprog_maker, bootprog_date); - meminfo(); + get_load_device(&load_type, &load_unit, &load_slice, &load_partition); /* - * March through the device switch probing for things -- sort of. - * - * The devsw array will have one or two items in it. If - * LOADER_DISK_SUPPORT is defined the first item will be a disk (which - * may not actually work if u-boot didn't supply one). If - * LOADER_NET_SUPPORT is defined the next item will be a network - * interface. Again it may not actually work at the u-boot level. - * - * The original logic was to always use a disk if it could be - * successfully opened, otherwise use the network interface. Now that - * logic is amended to first check whether the u-boot environment - * contains a loaderdev variable which tells us which device to use. If - * it does, we use it and skip the original (second) loop which "probes" - * for a device. We still loop over the devsw just in case it ever gets - * expanded to hold more than 2 devices (but then unit numbers, which - * don't currently exist, may come into play). If the device named by - * loaderdev isn't found, fall back using to the old "probe" loop. - * - * The original probe loop still effectively behaves as it always has: - * the first usable disk device is choosen, and a network device is used - * only if no disk device is found. The logic has been reworked so that - * it examines (and thus lists) every potential device along the way - * instead of breaking out of the loop when the first device is found. + * March through the device switch probing for things. */ - loaderdev = ub_env_get("loaderdev"); - usedev = -1; - if (loaderdev != NULL) { - for (i = 0; devsw[i] != NULL; i++) { - if (strcmp(loaderdev, devsw[i]->dv_name) == 0) { - if (devsw[i]->dv_init == NULL) - continue; - if ((devsw[i]->dv_init)() != 0) - continue; - usedev = i; - goto have_device; - } - } - printf("U-Boot env contains 'loaderdev=%s', " - "device not found.\n", loaderdev); - } - printf("Probing for bootable devices...\n"); - diskdev = -1; - netdev = -1; for (i = 0; devsw[i] != NULL; i++) { if (devsw[i]->dv_init == NULL) @@ -224,43 +450,33 @@ main(void) if ((devsw[i]->dv_init)() != 0) continue; - printf("Bootable device: %s\n", devsw[i]->dv_name); + printf("Found U-Boot device: %s\n", devsw[i]->dv_name); - if (strncmp(devsw[i]->dv_name, "disk", - strlen(devsw[i]->dv_name)) == 0) { - f.f_devdata = &currdev; - currdev.d_dev = devsw[i]; - currdev.d_type = currdev.d_dev->dv_type; - currdev.d_unit = 0; - currdev.d_disk.slice = 0; - if (devsw[i]->dv_open(&f, &currdev) == 0) { - devsw[i]->dv_close(&f); - if (diskdev == -1) - diskdev = i; - } - } else if (strncmp(devsw[i]->dv_name, "net", - strlen(devsw[i]->dv_name)) == 0) { - if (netdev == -1) - netdev = i; + currdev.d_dev = devsw[i]; + currdev.d_type = currdev.d_dev->dv_type; + currdev.d_unit = 0; + + if ((load_type == -1 || (load_type & DEV_TYP_STOR)) && + strcmp(devsw[i]->dv_name, "disk") == 0) { + if (probe_disks(i, load_type, load_unit, load_slice, + load_partition) == 0) + break; } - } - if (diskdev != -1) - usedev = diskdev; - else if (netdev != -1) - usedev = netdev; - else - panic("No bootable devices found!\n"); - -have_device: - - currdev.d_dev = devsw[usedev]; - currdev.d_type = devsw[usedev]->dv_type; - currdev.d_unit = 0; - if (currdev.d_type == DEV_TYP_STOR) - currdev.d_disk.slice = 0; + if ((load_type == -1 || (load_type & DEV_TYP_NET)) && + strcmp(devsw[i]->dv_name, "net") == 0) + break; + } - printf("Current device: %s\n", currdev.d_dev->dv_name); + /* + * If we couldn't find a boot device, return an error to u-boot. + * U-boot may be running a boot script that can try something different + * so returning an error is better than forcing a reboot. + */ + if (devsw[i] == NULL) { + printf("No boot device found!\n"); + return (0xbadef1ce); + } env_setenv("currdev", EV_VOLATILE, uboot_fmtdev(&currdev), uboot_setcurrdev, env_nounset); Modified: stable/10/sys/boot/uboot/lib/api_public.h ============================================================================== --- stable/10/sys/boot/uboot/lib/api_public.h Tue Apr 29 00:38:46 2014 (r265070) +++ stable/10/sys/boot/uboot/lib/api_public.h Tue Apr 29 00:45:42 2014 (r265071) @@ -132,7 +132,7 @@ typedef unsigned long lbastart_t; #define DT_STOR_SCSI 0x0020 #define DT_STOR_USB 0x0040 #define DT_STOR_MMC 0x0080 -#define DT_STOR_NAND 0x0100 +#define DT_STOR_SATA 0x0100 #define DEV_STA_CLOSED 0x0000 /* invalid, closed */ #define DEV_STA_OPEN 0x0001 /* open i.e. active */ Modified: stable/10/sys/boot/uboot/lib/disk.c ============================================================================== --- stable/10/sys/boot/uboot/lib/disk.c Tue Apr 29 00:38:46 2014 (r265070) +++ stable/10/sys/boot/uboot/lib/disk.c Tue Apr 29 00:45:42 2014 (r265071) @@ -278,3 +278,26 @@ stor_ioctl(struct open_file *f, u_long c return (0); } + +/* + * Return the device unit number for the given type and type-relative unit + * number. + */ +int +uboot_diskgetunit(int type, int type_unit) +{ + int local_type_unit; + int i; + + local_type_unit = 0; + for (i = 0; i < stor_info_no; i++) { + if ((stor_info[i].type & type) == type) { + if (local_type_unit == type_unit) { + return (i); + } + local_type_unit++; + } + } + + return (-1); +} Modified: stable/10/sys/boot/uboot/lib/glue.c ============================================================================== --- stable/10/sys/boot/uboot/lib/glue.c Tue Apr 29 00:38:46 2014 (r265070) +++ stable/10/sys/boot/uboot/lib/glue.c Tue Apr 29 00:45:42 2014 (r265071) @@ -404,8 +404,8 @@ ub_stor_type(int type) if (type & DT_STOR_MMC) return ("MMC"); - if (type & DT_STOR_NAND) - return ("NAND"); + if (type & DT_STOR_SATA) + return ("SATA"); return ("Unknown"); } Modified: stable/10/sys/boot/uboot/lib/libuboot.h ============================================================================== --- stable/10/sys/boot/uboot/lib/libuboot.h Tue Apr 29 00:38:46 2014 (r265070) +++ stable/10/sys/boot/uboot/lib/libuboot.h Tue Apr 29 00:45:42 2014 (r265071) @@ -32,9 +32,9 @@ struct uboot_devdesc struct devsw *d_dev; int d_type; int d_unit; + void *d_opendata; union { struct { - void *data; int slice; int partition; off_t offset; @@ -70,6 +70,8 @@ extern struct file_format uboot_elf; void reboot(void); +int uboot_diskgetunit(int type, int type_unit); + #if defined(LOADER_FDT_SUPPORT) extern int fdt_setup_fdtp(); extern int fdt_copy(vm_offset_t); From owner-svn-src-stable@FreeBSD.ORG Tue Apr 29 03:36:04 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D639FA94; Tue, 29 Apr 2014 03:36:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C333995F; Tue, 29 Apr 2014 03:36:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3T3a4fs003365; Tue, 29 Apr 2014 03:36:04 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3T3a45A003364; Tue, 29 Apr 2014 03:36:04 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201404290336.s3T3a45A003364@svn.freebsd.org> From: Mark Johnston Date: Tue, 29 Apr 2014 03:36:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265073 - stable/10/lib/libproc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2014 03:36:04 -0000 Author: markj Date: Tue Apr 29 03:36:04 2014 New Revision: 265073 URL: http://svnweb.freebsd.org/changeset/base/265073 Log: MFC r264436: Fix some off-by-one errors. The kve_end and rdl_eaddr fields contain the first address after the end of the map entry and should therefore be excluded. Modified: stable/10/lib/libproc/proc_sym.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libproc/proc_sym.c ============================================================================== --- stable/10/lib/libproc/proc_sym.c Tue Apr 29 01:17:43 2014 (r265072) +++ stable/10/lib/libproc/proc_sym.c Tue Apr 29 03:36:04 2014 (r265073) @@ -96,7 +96,7 @@ proc_objname(struct proc_handle *p, uint for (i = 0; i < p->nobjs; i++) { rdl = &p->rdobjs[i]; - if (addr >= rdl->rdl_saddr && addr <= rdl->rdl_eaddr) { + if (addr >= rdl->rdl_saddr && addr < rdl->rdl_eaddr) { strlcpy(objname, rdl->rdl_path, objnamesz); return (objname); } @@ -176,7 +176,7 @@ proc_addr2map(struct proc_handle *p, uin kve = kves + i; if (kve->kve_type == KVME_TYPE_VNODE) lastvn = i; - if (addr >= kve->kve_start && addr <= kve->kve_end) { + if (addr >= kve->kve_start && addr < kve->kve_end) { if ((map = malloc(sizeof(*map))) == NULL) { free(kves); return (NULL); @@ -209,7 +209,7 @@ proc_addr2map(struct proc_handle *p, uin for (i = 0; i < p->nobjs; i++) { rdl = &p->rdobjs[i]; - if (addr >= rdl->rdl_saddr && addr <= rdl->rdl_eaddr) { + if (addr >= rdl->rdl_saddr && addr < rdl->rdl_eaddr) { if ((map = malloc(sizeof(*map))) == NULL) return (NULL); proc_rdl2prmap(rdl, map); From owner-svn-src-stable@FreeBSD.ORG Tue Apr 29 03:37:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C56FAC69; Tue, 29 Apr 2014 03:37:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B30A098A; Tue, 29 Apr 2014 03:37:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3T3bUSg003542; Tue, 29 Apr 2014 03:37:30 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3T3bUjT003541; Tue, 29 Apr 2014 03:37:30 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201404290337.s3T3bUjT003541@svn.freebsd.org> From: Mark Johnston Date: Tue, 29 Apr 2014 03:37:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265074 - stable/9/lib/libproc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2014 03:37:30 -0000 Author: markj Date: Tue Apr 29 03:37:30 2014 New Revision: 265074 URL: http://svnweb.freebsd.org/changeset/base/265074 Log: MFC r264436: Fix some off-by-one errors. The kve_end and rdl_eaddr fields contain the first address after the end of the map entry and should therefore be excluded. Modified: stable/9/lib/libproc/proc_sym.c Directory Properties: stable/9/lib/libproc/ (props changed) Modified: stable/9/lib/libproc/proc_sym.c ============================================================================== --- stable/9/lib/libproc/proc_sym.c Tue Apr 29 03:36:04 2014 (r265073) +++ stable/9/lib/libproc/proc_sym.c Tue Apr 29 03:37:30 2014 (r265074) @@ -74,7 +74,7 @@ proc_objname(struct proc_handle *p, uint for (i = 0; i < p->nobjs; i++) { rdl = &p->rdobjs[i]; - if (addr >= rdl->rdl_saddr && addr <= rdl->rdl_eaddr) { + if (addr >= rdl->rdl_saddr && addr < rdl->rdl_eaddr) { strlcpy(objname, rdl->rdl_path, objnamesz); return (objname); } @@ -154,7 +154,7 @@ proc_addr2map(struct proc_handle *p, uin kve = kves + i; if (kve->kve_type == KVME_TYPE_VNODE) lastvn = i; - if (addr >= kve->kve_start && addr <= kve->kve_end) { + if (addr >= kve->kve_start && addr < kve->kve_end) { if ((map = malloc(sizeof(*map))) == NULL) { free(kves); return (NULL); @@ -187,7 +187,7 @@ proc_addr2map(struct proc_handle *p, uin for (i = 0; i < p->nobjs; i++) { rdl = &p->rdobjs[i]; - if (addr >= rdl->rdl_saddr && addr <= rdl->rdl_eaddr) { + if (addr >= rdl->rdl_saddr && addr < rdl->rdl_eaddr) { if ((map = malloc(sizeof(*map))) == NULL) return (NULL); proc_rdl2prmap(rdl, map); From owner-svn-src-stable@FreeBSD.ORG Tue Apr 29 03:49:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5343FE9F; Tue, 29 Apr 2014 03:49:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41321A48; Tue, 29 Apr 2014 03:49:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3T3nfrA007936; Tue, 29 Apr 2014 03:49:41 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3T3nf73007935; Tue, 29 Apr 2014 03:49:41 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201404290349.s3T3nf73007935@svn.freebsd.org> From: Mark Johnston Date: Tue, 29 Apr 2014 03:49:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265075 - stable/10/sbin/savecore X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2014 03:49:41 -0000 Author: markj Date: Tue Apr 29 03:49:40 2014 New Revision: 265075 URL: http://svnweb.freebsd.org/changeset/base/265075 Log: MFC r262775: Log the name of the file that we failed to open rather than an uninitialized buffer. Modified: stable/10/sbin/savecore/savecore.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/savecore/savecore.c ============================================================================== --- stable/10/sbin/savecore/savecore.c Tue Apr 29 03:37:30 2014 (r265074) +++ stable/10/sbin/savecore/savecore.c Tue Apr 29 03:49:40 2014 (r265075) @@ -618,7 +618,7 @@ DoFile(const char *savedir, const char * */ fdinfo = open(infoname, O_WRONLY | O_CREAT | O_TRUNC, 0600); if (fdinfo < 0) { - syslog(LOG_ERR, "%s: %m", buf); + syslog(LOG_ERR, "%s: %m", infoname); nerr++; goto closefd; } From owner-svn-src-stable@FreeBSD.ORG Tue Apr 29 03:50:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 50C73FD0; Tue, 29 Apr 2014 03:50:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3EDB0A4F; Tue, 29 Apr 2014 03:50:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3T3oOCD008123; Tue, 29 Apr 2014 03:50:24 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3T3oOND008122; Tue, 29 Apr 2014 03:50:24 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201404290350.s3T3oOND008122@svn.freebsd.org> From: Mark Johnston Date: Tue, 29 Apr 2014 03:50:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265076 - stable/9/sbin/savecore X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2014 03:50:24 -0000 Author: markj Date: Tue Apr 29 03:50:23 2014 New Revision: 265076 URL: http://svnweb.freebsd.org/changeset/base/265076 Log: MFC r262775: Log the name of the file that we failed to open rather than an uninitialized buffer. Modified: stable/9/sbin/savecore/savecore.c Directory Properties: stable/9/sbin/savecore/ (props changed) Modified: stable/9/sbin/savecore/savecore.c ============================================================================== --- stable/9/sbin/savecore/savecore.c Tue Apr 29 03:49:40 2014 (r265075) +++ stable/9/sbin/savecore/savecore.c Tue Apr 29 03:50:23 2014 (r265076) @@ -549,7 +549,7 @@ DoFile(const char *savedir, const char * */ fdinfo = open(buf, O_WRONLY | O_CREAT | O_TRUNC, 0600); if (fdinfo < 0) { - syslog(LOG_ERR, "%s: %m", buf); + syslog(LOG_ERR, "%s: %m", infoname); nerr++; goto closefd; } From owner-svn-src-stable@FreeBSD.ORG Tue Apr 29 03:58:17 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4DAF295; Tue, 29 Apr 2014 03:58:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A1DABB0B; Tue, 29 Apr 2014 03:58:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3T3wH09011976; Tue, 29 Apr 2014 03:58:17 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3T3wHLn011974; Tue, 29 Apr 2014 03:58:17 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201404290358.s3T3wHLn011974@svn.freebsd.org> From: Mark Johnston Date: Tue, 29 Apr 2014 03:58:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265077 - stable/9/sbin/savecore X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2014 03:58:17 -0000 Author: markj Date: Tue Apr 29 03:58:17 2014 New Revision: 265077 URL: http://svnweb.freebsd.org/changeset/base/265077 Log: Revert r265076; r262775 should not be MFC'd to stable/9. Modified: stable/9/sbin/savecore/savecore.c Directory Properties: stable/9/sbin/savecore/ (props changed) Modified: stable/9/sbin/savecore/savecore.c ============================================================================== --- stable/9/sbin/savecore/savecore.c Tue Apr 29 03:50:23 2014 (r265076) +++ stable/9/sbin/savecore/savecore.c Tue Apr 29 03:58:17 2014 (r265077) @@ -549,7 +549,7 @@ DoFile(const char *savedir, const char * */ fdinfo = open(buf, O_WRONLY | O_CREAT | O_TRUNC, 0600); if (fdinfo < 0) { - syslog(LOG_ERR, "%s: %m", infoname); + syslog(LOG_ERR, "%s: %m", buf); nerr++; goto closefd; } From owner-svn-src-stable@FreeBSD.ORG Tue Apr 29 05:45:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C69DA6FD; Tue, 29 Apr 2014 05:45:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A74331431; Tue, 29 Apr 2014 05:45:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3T5jIix056880; Tue, 29 Apr 2014 05:45:18 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3T5jHWE056876; Tue, 29 Apr 2014 05:45:17 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201404290545.s3T5jHWE056876@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 29 Apr 2014 05:45:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265078 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2014 05:45:19 -0000 Author: hselasky Date: Tue Apr 29 05:45:17 2014 New Revision: 265078 URL: http://svnweb.freebsd.org/changeset/base/265078 Log: MFC r265015: Setting the IMOD value below 0x3F8 can cause IRQ lockups in the Intel LynxPoint USB 3.0 controllers found in MacBookPro 2013's. Modified: stable/10/sys/dev/usb/controller/xhci.c stable/10/sys/dev/usb/controller/xhci.h stable/10/sys/dev/usb/controller/xhci_pci.c stable/10/sys/dev/usb/controller/xhcireg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci.c Tue Apr 29 03:58:17 2014 (r265077) +++ stable/10/sys/dev/usb/controller/xhci.c Tue Apr 29 05:45:17 2014 (r265078) @@ -495,8 +495,12 @@ xhci_start_controller(struct xhci_softc XWRITE4(sc, runt, XHCI_ERSTSZ(0), XHCI_ERSTS_SET(temp)); + /* Check if we should use the default IMOD value */ + if (sc->sc_imod_default == 0) + sc->sc_imod_default = XHCI_IMOD_DEFAULT; + /* Setup interrupt rate */ - XWRITE4(sc, runt, XHCI_IMOD(0), XHCI_IMOD_DEFAULT); + XWRITE4(sc, runt, XHCI_IMOD(0), sc->sc_imod_default); usbd_get_page(&sc->sc_hw.root_pc, 0, &buf_res); Modified: stable/10/sys/dev/usb/controller/xhci.h ============================================================================== --- stable/10/sys/dev/usb/controller/xhci.h Tue Apr 29 03:58:17 2014 (r265077) +++ stable/10/sys/dev/usb/controller/xhci.h Tue Apr 29 05:45:17 2014 (r265078) @@ -481,6 +481,7 @@ struct xhci_softc { uint16_t sc_erst_max; uint16_t sc_event_idx; uint16_t sc_command_idx; + uint16_t sc_imod_default; uint8_t sc_event_ccs; uint8_t sc_command_ccs; Modified: stable/10/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci_pci.c Tue Apr 29 03:58:17 2014 (r265077) +++ stable/10/sys/dev/usb/controller/xhci_pci.c Tue Apr 29 05:45:17 2014 (r265078) @@ -242,6 +242,7 @@ xhci_pci_attach(device_t self) case 0x1e318086: /* Panther Point */ case 0x8c318086: /* Lynx Point */ sc->sc_port_route = &xhci_pci_port_route; + sc->sc_imod_default = XHCI_IMOD_DEFAULT_LP; break; default: break; Modified: stable/10/sys/dev/usb/controller/xhcireg.h ============================================================================== --- stable/10/sys/dev/usb/controller/xhcireg.h Tue Apr 29 03:58:17 2014 (r265077) +++ stable/10/sys/dev/usb/controller/xhcireg.h Tue Apr 29 05:45:17 2014 (r265078) @@ -166,7 +166,8 @@ #define XHCI_IMOD_IVAL_SET(x) (((x) & 0xFFFF) << 0) /* 250ns unit */ #define XHCI_IMOD_ICNT_GET(x) (((x) >> 16) & 0xFFFF) /* 250ns unit */ #define XHCI_IMOD_ICNT_SET(x) (((x) & 0xFFFF) << 16) /* 250ns unit */ -#define XHCI_IMOD_DEFAULT 0x000001F4U /* 8000 IRQ/second */ +#define XHCI_IMOD_DEFAULT 0x000001F4U /* 8000 IRQs/second */ +#define XHCI_IMOD_DEFAULT_LP 0x000003F8U /* 4000 IRQs/second - LynxPoint */ #define XHCI_ERSTSZ(n) (0x0028 + (0x20 * (n))) /* XHCI event ring segment table size */ #define XHCI_ERSTS_GET(x) ((x) & 0xFFFF) #define XHCI_ERSTS_SET(x) ((x) & 0xFFFF) From owner-svn-src-stable@FreeBSD.ORG Tue Apr 29 05:47:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1D4384E; Tue, 29 Apr 2014 05:47:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D21F71447; Tue, 29 Apr 2014 05:47:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3T5lEPk057128; Tue, 29 Apr 2014 05:47:14 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3T5lExW057120; Tue, 29 Apr 2014 05:47:14 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201404290547.s3T5lExW057120@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 29 Apr 2014 05:47:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265079 - stable/9/sys/dev/usb/controller X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2014 05:47:15 -0000 Author: hselasky Date: Tue Apr 29 05:47:13 2014 New Revision: 265079 URL: http://svnweb.freebsd.org/changeset/base/265079 Log: MFC r265015: Setting the IMOD value below 0x3F8 can cause IRQ lockups in the Intel LynxPoint USB 3.0 controllers found in MacBookPro 2013's. Modified: stable/9/sys/dev/usb/controller/xhci.c stable/9/sys/dev/usb/controller/xhci.h stable/9/sys/dev/usb/controller/xhci_pci.c stable/9/sys/dev/usb/controller/xhcireg.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/9/sys/dev/usb/controller/xhci.c Tue Apr 29 05:45:17 2014 (r265078) +++ stable/9/sys/dev/usb/controller/xhci.c Tue Apr 29 05:47:13 2014 (r265079) @@ -470,8 +470,12 @@ xhci_start_controller(struct xhci_softc XWRITE4(sc, runt, XHCI_ERSTSZ(0), XHCI_ERSTS_SET(temp)); + /* Check if we should use the default IMOD value */ + if (sc->sc_imod_default == 0) + sc->sc_imod_default = XHCI_IMOD_DEFAULT; + /* Setup interrupt rate */ - XWRITE4(sc, runt, XHCI_IMOD(0), XHCI_IMOD_DEFAULT); + XWRITE4(sc, runt, XHCI_IMOD(0), sc->sc_imod_default); usbd_get_page(&sc->sc_hw.root_pc, 0, &buf_res); Modified: stable/9/sys/dev/usb/controller/xhci.h ============================================================================== --- stable/9/sys/dev/usb/controller/xhci.h Tue Apr 29 05:45:17 2014 (r265078) +++ stable/9/sys/dev/usb/controller/xhci.h Tue Apr 29 05:47:13 2014 (r265079) @@ -470,6 +470,7 @@ struct xhci_softc { uint16_t sc_erst_max; uint16_t sc_event_idx; uint16_t sc_command_idx; + uint16_t sc_imod_default; uint8_t sc_event_ccs; uint8_t sc_command_ccs; Modified: stable/9/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/9/sys/dev/usb/controller/xhci_pci.c Tue Apr 29 05:45:17 2014 (r265078) +++ stable/9/sys/dev/usb/controller/xhci_pci.c Tue Apr 29 05:47:13 2014 (r265079) @@ -226,6 +226,7 @@ xhci_pci_attach(device_t self) case 0x1e318086: /* Panther Point */ case 0x8c318086: /* Lynx Point */ sc->sc_port_route = &xhci_pci_port_route; + sc->sc_imod_default = XHCI_IMOD_DEFAULT_LP; break; default: break; Modified: stable/9/sys/dev/usb/controller/xhcireg.h ============================================================================== --- stable/9/sys/dev/usb/controller/xhcireg.h Tue Apr 29 05:45:17 2014 (r265078) +++ stable/9/sys/dev/usb/controller/xhcireg.h Tue Apr 29 05:47:13 2014 (r265079) @@ -166,7 +166,8 @@ #define XHCI_IMOD_IVAL_SET(x) (((x) & 0xFFFF) << 0) /* 250ns unit */ #define XHCI_IMOD_ICNT_GET(x) (((x) >> 16) & 0xFFFF) /* 250ns unit */ #define XHCI_IMOD_ICNT_SET(x) (((x) & 0xFFFF) << 16) /* 250ns unit */ -#define XHCI_IMOD_DEFAULT 0x000001F4U /* 8000 IRQ/second */ +#define XHCI_IMOD_DEFAULT 0x000001F4U /* 8000 IRQs/second */ +#define XHCI_IMOD_DEFAULT_LP 0x000003F8U /* 4000 IRQs/second - LynxPoint */ #define XHCI_ERSTSZ(n) (0x0028 + (0x20 * (n))) /* XHCI event ring segment table size */ #define XHCI_ERSTS_GET(x) ((x) & 0xFFFF) #define XHCI_ERSTS_SET(x) ((x) & 0xFFFF) From owner-svn-src-stable@FreeBSD.ORG Tue Apr 29 05:48:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB550982; Tue, 29 Apr 2014 05:48:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB656144B; Tue, 29 Apr 2014 05:48:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3T5mp1r057338; Tue, 29 Apr 2014 05:48:51 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3T5moer057333; Tue, 29 Apr 2014 05:48:50 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201404290548.s3T5moer057333@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 29 Apr 2014 05:48:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r265080 - stable/8/sys/dev/usb/controller X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2014 05:48:52 -0000 Author: hselasky Date: Tue Apr 29 05:48:50 2014 New Revision: 265080 URL: http://svnweb.freebsd.org/changeset/base/265080 Log: MFC r265015: Setting the IMOD value below 0x3F8 can cause IRQ lockups in the Intel LynxPoint USB 3.0 controllers found in MacBookPro 2013's. Modified: stable/8/sys/dev/usb/controller/xhci.c stable/8/sys/dev/usb/controller/xhci.h stable/8/sys/dev/usb/controller/xhci_pci.c stable/8/sys/dev/usb/controller/xhcireg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/8/sys/dev/usb/controller/xhci.c Tue Apr 29 05:47:13 2014 (r265079) +++ stable/8/sys/dev/usb/controller/xhci.c Tue Apr 29 05:48:50 2014 (r265080) @@ -470,8 +470,12 @@ xhci_start_controller(struct xhci_softc XWRITE4(sc, runt, XHCI_ERSTSZ(0), XHCI_ERSTS_SET(temp)); + /* Check if we should use the default IMOD value */ + if (sc->sc_imod_default == 0) + sc->sc_imod_default = XHCI_IMOD_DEFAULT; + /* Setup interrupt rate */ - XWRITE4(sc, runt, XHCI_IMOD(0), XHCI_IMOD_DEFAULT); + XWRITE4(sc, runt, XHCI_IMOD(0), sc->sc_imod_default); usbd_get_page(&sc->sc_hw.root_pc, 0, &buf_res); Modified: stable/8/sys/dev/usb/controller/xhci.h ============================================================================== --- stable/8/sys/dev/usb/controller/xhci.h Tue Apr 29 05:47:13 2014 (r265079) +++ stable/8/sys/dev/usb/controller/xhci.h Tue Apr 29 05:48:50 2014 (r265080) @@ -470,6 +470,7 @@ struct xhci_softc { uint16_t sc_erst_max; uint16_t sc_event_idx; uint16_t sc_command_idx; + uint16_t sc_imod_default; uint8_t sc_event_ccs; uint8_t sc_command_ccs; Modified: stable/8/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/8/sys/dev/usb/controller/xhci_pci.c Tue Apr 29 05:47:13 2014 (r265079) +++ stable/8/sys/dev/usb/controller/xhci_pci.c Tue Apr 29 05:48:50 2014 (r265080) @@ -226,6 +226,7 @@ xhci_pci_attach(device_t self) case 0x1e318086: /* Panther Point */ case 0x8c318086: /* Lynx Point */ sc->sc_port_route = &xhci_pci_port_route; + sc->sc_imod_default = XHCI_IMOD_DEFAULT_LP; break; default: break; Modified: stable/8/sys/dev/usb/controller/xhcireg.h ============================================================================== --- stable/8/sys/dev/usb/controller/xhcireg.h Tue Apr 29 05:47:13 2014 (r265079) +++ stable/8/sys/dev/usb/controller/xhcireg.h Tue Apr 29 05:48:50 2014 (r265080) @@ -166,7 +166,8 @@ #define XHCI_IMOD_IVAL_SET(x) (((x) & 0xFFFF) << 0) /* 250ns unit */ #define XHCI_IMOD_ICNT_GET(x) (((x) >> 16) & 0xFFFF) /* 250ns unit */ #define XHCI_IMOD_ICNT_SET(x) (((x) & 0xFFFF) << 16) /* 250ns unit */ -#define XHCI_IMOD_DEFAULT 0x000001F4U /* 8000 IRQ/second */ +#define XHCI_IMOD_DEFAULT 0x000001F4U /* 8000 IRQs/second */ +#define XHCI_IMOD_DEFAULT_LP 0x000003F8U /* 4000 IRQs/second - LynxPoint */ #define XHCI_ERSTSZ(n) (0x0028 + (0x20 * (n))) /* XHCI event ring segment table size */ #define XHCI_ERSTS_GET(x) ((x) & 0xFFFF) #define XHCI_ERSTS_SET(x) ((x) & 0xFFFF) From owner-svn-src-stable@FreeBSD.ORG Wed Apr 30 04:03:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BFAC7A89; Wed, 30 Apr 2014 04:03:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB7DD119F; Wed, 30 Apr 2014 04:03:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3U436oR013993; Wed, 30 Apr 2014 04:03:06 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3U435jM013989; Wed, 30 Apr 2014 04:03:05 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201404300403.s3U435jM013989@svn.freebsd.org> From: Xin LI Date: Wed, 30 Apr 2014 04:03:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265122 - in stable/10: crypto/openssl/ssl etc/defaults sys/netinet sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2014 04:03:06 -0000 Author: delphij Date: Wed Apr 30 04:03:05 2014 New Revision: 265122 URL: http://svnweb.freebsd.org/changeset/base/265122 Log: Fix devfs rules not applied by default for jails. Fix OpenSSL use-after-free vulnerability. Fix TCP reassembly vulnerability. Security: FreeBSD-SA-14:07.devfs Security: CVE-2014-3001 Security: FreeBSD-SA-14:08.tcp Security: CVE-2014-3000 Security: FreeBSD-SA-14:09.openssl Security: CVE-2010-5298 Modified: stable/10/crypto/openssl/ssl/s3_pkt.c stable/10/etc/defaults/rc.conf stable/10/sys/netinet/tcp_reass.c stable/10/sys/sys/param.h Modified: stable/10/crypto/openssl/ssl/s3_pkt.c ============================================================================== --- stable/10/crypto/openssl/ssl/s3_pkt.c Wed Apr 30 04:02:57 2014 (r265121) +++ stable/10/crypto/openssl/ssl/s3_pkt.c Wed Apr 30 04:03:05 2014 (r265122) @@ -1055,7 +1055,7 @@ start: { s->rstate=SSL_ST_READ_HEADER; rr->off=0; - if (s->mode & SSL_MODE_RELEASE_BUFFERS) + if (s->mode & SSL_MODE_RELEASE_BUFFERS && s->s3->rbuf.left == 0) ssl3_release_read_buffer(s); } } Modified: stable/10/etc/defaults/rc.conf ============================================================================== --- stable/10/etc/defaults/rc.conf Wed Apr 30 04:02:57 2014 (r265121) +++ stable/10/etc/defaults/rc.conf Wed Apr 30 04:03:05 2014 (r265122) @@ -649,7 +649,7 @@ devfs_rulesets="/etc/defaults/devfs.rule devfs_system_ruleset="" # The name (NOT number) of a ruleset to apply to /dev devfs_set_rulesets="" # A list of /mount/dev=ruleset_name settings to # apply (must be mounted already, i.e. fstab(5)) -devfs_load_rulesets="NO" # Enable to always load the default rulesets +devfs_load_rulesets="YES" # Enable to always load the default rulesets performance_cx_lowest="HIGH" # Online CPU idle state performance_cpu_freq="NONE" # Online CPU frequency economy_cx_lowest="HIGH" # Offline CPU idle state Modified: stable/10/sys/netinet/tcp_reass.c ============================================================================== --- stable/10/sys/netinet/tcp_reass.c Wed Apr 30 04:02:57 2014 (r265121) +++ stable/10/sys/netinet/tcp_reass.c Wed Apr 30 04:03:05 2014 (r265122) @@ -205,7 +205,7 @@ tcp_reass(struct tcpcb *tp, struct tcphd * Investigate why and re-evaluate the below limit after the behaviour * is understood. */ - if (th->th_seq != tp->rcv_nxt && + if ((th->th_seq != tp->rcv_nxt || !TCPS_HAVEESTABLISHED(tp->t_state)) && tp->t_segqlen >= (so->so_rcv.sb_hiwat / tp->t_maxseg) + 1) { V_tcp_reass_overflows++; TCPSTAT_INC(tcps_rcvmemdrop); @@ -228,7 +228,7 @@ tcp_reass(struct tcpcb *tp, struct tcphd */ te = uma_zalloc(V_tcp_reass_zone, M_NOWAIT); if (te == NULL) { - if (th->th_seq != tp->rcv_nxt) { + if (th->th_seq != tp->rcv_nxt || !TCPS_HAVEESTABLISHED(tp->t_state)) { TCPSTAT_INC(tcps_rcvmemdrop); m_freem(m); *tlenp = 0; @@ -276,7 +276,8 @@ tcp_reass(struct tcpcb *tp, struct tcphd TCPSTAT_INC(tcps_rcvduppack); TCPSTAT_ADD(tcps_rcvdupbyte, *tlenp); m_freem(m); - uma_zfree(V_tcp_reass_zone, te); + if (te != &tqs) + uma_zfree(V_tcp_reass_zone, te); tp->t_segqlen--; /* * Try to present any queued data Modified: stable/10/sys/sys/param.h ============================================================================== --- stable/10/sys/sys/param.h Wed Apr 30 04:02:57 2014 (r265121) +++ stable/10/sys/sys/param.h Wed Apr 30 04:03:05 2014 (r265122) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1000707 /* Master, propagated to newvers */ +#define __FreeBSD_version 1000708 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-stable@FreeBSD.ORG Wed Apr 30 04:04:21 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66D1BBD7; Wed, 30 Apr 2014 04:04:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3908A11B1; Wed, 30 Apr 2014 04:04:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3U44Lbt014178; Wed, 30 Apr 2014 04:04:21 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3U44KtF014175; Wed, 30 Apr 2014 04:04:20 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201404300404.s3U44KtF014175@svn.freebsd.org> From: Xin LI Date: Wed, 30 Apr 2014 04:04:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265123 - in stable: 8/sys/netinet 8/sys/sys 9/sys/netinet 9/sys/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2014 04:04:21 -0000 Author: delphij Date: Wed Apr 30 04:04:20 2014 New Revision: 265123 URL: http://svnweb.freebsd.org/changeset/base/265123 Log: Fix TCP reassembly vulnerability. Patch done by: glebius Security: FreeBSD-SA-14:08.tcp Security: CVE-2014-3000 Modified: stable/9/sys/netinet/tcp_reass.c stable/9/sys/sys/param.h Changes in other areas also in this revision: Modified: stable/8/sys/netinet/tcp_reass.c stable/8/sys/sys/param.h Modified: stable/9/sys/netinet/tcp_reass.c ============================================================================== --- stable/9/sys/netinet/tcp_reass.c Wed Apr 30 04:03:05 2014 (r265122) +++ stable/9/sys/netinet/tcp_reass.c Wed Apr 30 04:04:20 2014 (r265123) @@ -205,7 +205,7 @@ tcp_reass(struct tcpcb *tp, struct tcphd * Investigate why and re-evaluate the below limit after the behaviour * is understood. */ - if (th->th_seq != tp->rcv_nxt && + if ((th->th_seq != tp->rcv_nxt || !TCPS_HAVEESTABLISHED(tp->t_state)) && tp->t_segqlen >= (so->so_rcv.sb_hiwat / tp->t_maxseg) + 1) { V_tcp_reass_overflows++; TCPSTAT_INC(tcps_rcvmemdrop); @@ -228,7 +228,7 @@ tcp_reass(struct tcpcb *tp, struct tcphd */ te = uma_zalloc(V_tcp_reass_zone, M_NOWAIT); if (te == NULL) { - if (th->th_seq != tp->rcv_nxt) { + if (th->th_seq != tp->rcv_nxt || !TCPS_HAVEESTABLISHED(tp->t_state)) { TCPSTAT_INC(tcps_rcvmemdrop); m_freem(m); *tlenp = 0; @@ -276,7 +276,8 @@ tcp_reass(struct tcpcb *tp, struct tcphd TCPSTAT_INC(tcps_rcvduppack); TCPSTAT_ADD(tcps_rcvdupbyte, *tlenp); m_freem(m); - uma_zfree(V_tcp_reass_zone, te); + if (te != &tqs) + uma_zfree(V_tcp_reass_zone, te); tp->t_segqlen--; /* * Try to present any queued data Modified: stable/9/sys/sys/param.h ============================================================================== --- stable/9/sys/sys/param.h Wed Apr 30 04:03:05 2014 (r265122) +++ stable/9/sys/sys/param.h Wed Apr 30 04:04:20 2014 (r265123) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 902511 /* Master, propagated to newvers */ +#define __FreeBSD_version 902512 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-stable@FreeBSD.ORG Wed Apr 30 04:04:21 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EBE97BD8; Wed, 30 Apr 2014 04:04:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF56B11B5; Wed, 30 Apr 2014 04:04:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3U44L32014188; Wed, 30 Apr 2014 04:04:21 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3U44LQU014186; Wed, 30 Apr 2014 04:04:21 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201404300404.s3U44LQU014186@svn.freebsd.org> From: Xin LI Date: Wed, 30 Apr 2014 04:04:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r265123 - in stable: 8/sys/netinet 8/sys/sys 9/sys/netinet 9/sys/sys X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2014 04:04:22 -0000 Author: delphij Date: Wed Apr 30 04:04:20 2014 New Revision: 265123 URL: http://svnweb.freebsd.org/changeset/base/265123 Log: Fix TCP reassembly vulnerability. Patch done by: glebius Security: FreeBSD-SA-14:08.tcp Security: CVE-2014-3000 Modified: stable/8/sys/netinet/tcp_reass.c stable/8/sys/sys/param.h Changes in other areas also in this revision: Modified: stable/9/sys/netinet/tcp_reass.c stable/9/sys/sys/param.h Modified: stable/8/sys/netinet/tcp_reass.c ============================================================================== --- stable/8/sys/netinet/tcp_reass.c Wed Apr 30 04:03:05 2014 (r265122) +++ stable/8/sys/netinet/tcp_reass.c Wed Apr 30 04:04:20 2014 (r265123) @@ -211,7 +211,7 @@ tcp_reass(struct tcpcb *tp, struct tcphd * Investigate why and re-evaluate the below limit after the behaviour * is understood. */ - if (th->th_seq != tp->rcv_nxt && + if ((th->th_seq != tp->rcv_nxt || !TCPS_HAVEESTABLISHED(tp->t_state)) && tp->t_segqlen >= (so->so_rcv.sb_hiwat / tp->t_maxseg) + 1) { V_tcp_reass_overflows++; TCPSTAT_INC(tcps_rcvmemdrop); @@ -234,7 +234,7 @@ tcp_reass(struct tcpcb *tp, struct tcphd */ te = uma_zalloc(V_tcp_reass_zone, M_NOWAIT); if (te == NULL) { - if (th->th_seq != tp->rcv_nxt) { + if (th->th_seq != tp->rcv_nxt || !TCPS_HAVEESTABLISHED(tp->t_state)) { TCPSTAT_INC(tcps_rcvmemdrop); m_freem(m); *tlenp = 0; @@ -282,7 +282,8 @@ tcp_reass(struct tcpcb *tp, struct tcphd TCPSTAT_INC(tcps_rcvduppack); TCPSTAT_ADD(tcps_rcvdupbyte, *tlenp); m_freem(m); - uma_zfree(V_tcp_reass_zone, te); + if (te != &tqs) + uma_zfree(V_tcp_reass_zone, te); tp->t_segqlen--; /* * Try to present any queued data Modified: stable/8/sys/sys/param.h ============================================================================== --- stable/8/sys/sys/param.h Wed Apr 30 04:03:05 2014 (r265122) +++ stable/8/sys/sys/param.h Wed Apr 30 04:04:20 2014 (r265123) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 804501 /* Master, propagated to newvers */ +#define __FreeBSD_version 804502 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-stable@FreeBSD.ORG Wed Apr 30 04:24:21 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CEDFC522; Wed, 30 Apr 2014 04:24:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB28A1351; Wed, 30 Apr 2014 04:24:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3U4OL0V026294; Wed, 30 Apr 2014 04:24:21 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3U4OL1o026292; Wed, 30 Apr 2014 04:24:21 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201404300424.s3U4OL1o026292@svn.freebsd.org> From: Devin Teske Date: Wed, 30 Apr 2014 04:24:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org Subject: svn commit: r265126 - stable/4/lib/libdisk X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2014 04:24:21 -0000 Author: dteske Date: Wed Apr 30 04:24:21 2014 New Revision: 265126 URL: http://svnweb.freebsd.org/changeset/base/265126 Log: Teach libdisk about mfid devices. This is a direct commit to stable/4 since stable/5 and newer have r105681 which made this code obsolete. Modified: stable/4/lib/libdisk/create_chunk.c stable/4/lib/libdisk/disk.c Modified: stable/4/lib/libdisk/create_chunk.c ============================================================================== --- stable/4/lib/libdisk/create_chunk.c Wed Apr 30 04:05:47 2014 (r265125) +++ stable/4/lib/libdisk/create_chunk.c Wed Apr 30 04:24:21 2014 (r265126) @@ -304,6 +304,8 @@ MakeDev(struct chunk *c1, const char *pa cmaj = 109, p += 4; else if (!strncmp(p, "ipsd", 4)) cmaj = 176, p += 4; + else if (!strncmp(p, "mfid", 4)) + cmaj = 201, p += 4; else if (!strncmp(p, "mlxd", 4)) cmaj = 131, p += 4; else if (!strncmp(p, "amrd", 4)) Modified: stable/4/lib/libdisk/disk.c ============================================================================== --- stable/4/lib/libdisk/disk.c Wed Apr 30 04:05:47 2014 (r265125) +++ stable/4/lib/libdisk/disk.c Wed Apr 30 04:24:21 2014 (r265126) @@ -486,9 +486,9 @@ Collapse_Disk(struct disk *d) #endif #ifdef PC98 -static char * device_list[] = {"wd", "aacd", "ad", "da", "afd", "fla", "idad", "mlxd", "amrd", "twed", "ar", "fd", 0}; +static char * device_list[] = {"wd", "aacd", "ad", "da", "afd", "fla", "idad", "mfid", "mlxd", "amrd", "twed", "ar", "fd", 0}; #else -static char * device_list[] = {"aacd", "ad", "da", "afd", "fla", "idad", "ipsd", "mlxd", "amrd", "twed", "ar", "fd", 0}; +static char * device_list[] = {"aacd", "ad", "da", "afd", "fla", "idad", "ipsd", "mfid", "mlxd", "amrd", "twed", "ar", "fd", 0}; #endif int qstrcmp(const void* a, const void* b) { From owner-svn-src-stable@FreeBSD.ORG Wed Apr 30 04:28:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2E714677; Wed, 30 Apr 2014 04:28:49 +0000 (UTC) Received: from mail0.glenbarber.us (mail0.glenbarber.us [IPv6:2607:fc50:1:2300:1001:1001:1001:face]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail0.glenbarber.us", Issuer "Gandi Standard SSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F029D1364; Wed, 30 Apr 2014 04:28:48 +0000 (UTC) Received: from glenbarber.us (c-71-224-221-174.hsd1.nj.comcast.net [71.224.221.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gjb) by mail0.glenbarber.us (Postfix) with ESMTPSA id EAF3D9C89; Wed, 30 Apr 2014 04:28:46 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.8.3 mail0.glenbarber.us EAF3D9C89 Authentication-Results: mail0.glenbarber.us; dkim=none reason="no signature"; dkim-adsp=none Date: Wed, 30 Apr 2014 00:28:45 -0400 From: Glen Barber To: Devin Teske Subject: Re: svn commit: r265126 - stable/4/lib/libdisk Message-ID: <20140430042845.GL44239@glenbarber.us> References: <201404300424.s3U4OL1o026292@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="L/Qt9NZ8t00Dhfad" Content-Disposition: inline In-Reply-To: <201404300424.s3U4OL1o026292@svn.freebsd.org> X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-other@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2014 04:28:49 -0000 --L/Qt9NZ8t00Dhfad Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 30, 2014 at 04:24:21AM +0000, Devin Teske wrote: > Author: dteske > Date: Wed Apr 30 04:24:21 2014 > New Revision: 265126 > URL: http://svnweb.freebsd.org/changeset/base/265126 >=20 > Log: > Teach libdisk about mfid devices. This is a direct commit to stable/4 > since stable/5 and newer have r105681 which made this code obsolete. >=20 > Modified: > stable/4/lib/libdisk/create_chunk.c > stable/4/lib/libdisk/disk.c stable/4? Full moon was two weeks ago. Glen --L/Qt9NZ8t00Dhfad Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBCAAGBQJTYHv9AAoJELls3eqvi17Q3IQP/Rh5aZ0FGwqgl8LeoOXJqvzb 5FttxewcQ9C0nhwFfDwnIMKU6QUMxNxv8KSGu7YdsfYPfQ8zMqN0w2HPvdaCtlZY fH35dKK9YzJ7rtjf1ISKHzRGIHVqQWyXQhlAbRfP6sF3smdUan4zctES3lzXwGSA xOjH17X0kOvokdQfQnDdLu+98yRQztzYX5RM4WRYjF0TT8PdDECZlYzDhyicH3ef pHWCWHjK98JnBIp0WoXbs5ny4WhGlXL5zNwg64XfkeS2HmcZ9AwUvIiA1Ec1P0s1 2OuqeT37/hUBmyWovuJ+OIn4U+EvHhItXIJAWk10mu/k7rvrKKgWrbVc0Q/NXkFO lNvkWRvnAfzLleJqEeN/HDUJ/WF666qKrftG/TzIOn8A6kG9lp9vielX1IuqL/lS U+x6GK9C3JTxlWcyIgFqiaDp5rl3XTP1k8FYn/SsRldPj8emzOGr/kDpj3sAGm9I /9Tw0xA6ZHPjEkKSeKm4JERlTQZ50JvKL4zYDJNEuP5zES9C6Zs/acb3XfwPTy2Q yw3uMWJhEIR74WuInvCtsgrrt7LEgAhTBcAI4F0OxcUaOYNDDGFrUbT+TUTaKirD Y5VDx/cAE1SnRTfTzzlz39l60j95ImUe8f77VsajAKukBIFqbcYKe5P2AZEDSz5m okuiYWrNLHt9J5m2OIBr =Rzjs -----END PGP SIGNATURE----- --L/Qt9NZ8t00Dhfad-- From owner-svn-src-stable@FreeBSD.ORG Wed Apr 30 04:31:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1FD567C0; Wed, 30 Apr 2014 04:31:36 +0000 (UTC) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx1.fisglobal.com", Issuer "VeriSign Class 3 Secure Server CA - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DBD3713DC; Wed, 30 Apr 2014 04:31:35 +0000 (UTC) Received: from smarthost.fisglobal.com ([10.132.206.192]) by ltcfislmsgpa02.fnfis.com (8.14.5/8.14.5) with ESMTP id s3U4VSYH028397 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Tue, 29 Apr 2014 23:31:28 -0500 Received: from THEMADHATTER (10.242.181.54) by smarthost.fisglobal.com (10.132.206.192) with Microsoft SMTP Server id 14.3.174.1; Tue, 29 Apr 2014 23:31:25 -0500 From: Sender: Devin Teske To: "'Glen Barber'" , "'Devin Teske'" References: <201404300424.s3U4OL1o026292@svn.freebsd.org> <20140430042845.GL44239@glenbarber.us> In-Reply-To: <20140430042845.GL44239@glenbarber.us> Subject: RE: svn commit: r265126 - stable/4/lib/libdisk Date: Tue, 29 Apr 2014 21:31:03 -0700 Message-ID: <00fd01cf642d$008b5170$01a1f450$@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQH4v7HD/CHB3aNjsiSAK8ErAyG4HgJl5jHCmsOq30A= Content-Language: en-us X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.11.96, 1.0.14, 0.0.0000 definitions=2014-04-29_07:2014-04-30,2014-04-29,1970-01-01 signatures=0 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-other@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2014 04:31:36 -0000 > -----Original Message----- > From: Glen Barber [mailto:gjb@FreeBSD.org] > Sent: Tuesday, April 29, 2014 9:29 PM > To: Devin Teske > Cc: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src- > stable@freebsd.org; svn-src-stable-other@freebsd.org > Subject: Re: svn commit: r265126 - stable/4/lib/libdisk > > On Wed, Apr 30, 2014 at 04:24:21AM +0000, Devin Teske wrote: > > Author: dteske > > Date: Wed Apr 30 04:24:21 2014 > > New Revision: 265126 > > URL: > https://urldefense.proofpoint.com/v1/url?u=http://svnweb.freebsd.org/ch > angeset/base/265126&k=%2FbkpAUdJWZuiTILCq%2FFnQg%3D%3D%0A&r= > Mrjs6vR4%2Faj2Ns9%2FssHJjg%3D%3D%0A&m=9FeCd7wGPL5rc1o5vza3bxf5 > BSuPYfb1878dIYgXi5s%3D%0A&s=0e923599ada59c925d4df0fe4a4303a6cc347 > e9f7bf3da9a780e5ff36bcc27d3 > > > > Log: > > Teach libdisk about mfid devices. This is a direct commit to stable/4 > > since stable/5 and newer have r105681 which made this code obsolete. > > > > Modified: > > stable/4/lib/libdisk/create_chunk.c > > stable/4/lib/libdisk/disk.c > > stable/4? > > Full moon was two weeks ago. > I've got more ;D part of decommissioning 4 @ $work. Memorializing some things that we ran with in production for years and years but never saw committed back. Just a nod to the venerable branch as we say farewell to it. These commits are beyond uber-tested and wanted to share them. -- Devin _____________ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. From owner-svn-src-stable@FreeBSD.ORG Wed Apr 30 04:44:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71FD2346; Wed, 30 Apr 2014 04:44:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5EBC219E4; Wed, 30 Apr 2014 04:44:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3U4iqUo034553; Wed, 30 Apr 2014 04:44:52 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3U4iqT6034552; Wed, 30 Apr 2014 04:44:52 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201404300444.s3U4iqT6034552@svn.freebsd.org> From: Devin Teske Date: Wed, 30 Apr 2014 04:44:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org Subject: svn commit: r265127 - stable/4/release/sysinstall X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2014 04:44:52 -0000 Author: dteske Date: Wed Apr 30 04:44:51 2014 New Revision: 265127 URL: http://svnweb.freebsd.org/changeset/base/265127 Log: MF6 r157468: Teach sysinstall about MFI (scottl) NB: Merged from stable/6/usr.sbin/sysinstall to stable/4/release/sysinstall (location changed in between releases 4 and 6). Modified: stable/4/release/sysinstall/devices.c Directory Properties: stable/4/release/sysinstall/ (props changed) Modified: stable/4/release/sysinstall/devices.c ============================================================================== --- stable/4/release/sysinstall/devices.c Wed Apr 30 04:24:21 2014 (r265126) +++ stable/4/release/sysinstall/devices.c Wed Apr 30 04:44:51 2014 (r265127) @@ -81,6 +81,7 @@ static struct _devname { { DEVICE_TYPE_DISK, "ipsd%d", "IBM ServeRAID array", 176, 65538, 8, 4 }, { DEVICE_TYPE_DISK, "twed%d", "3ware ATA RAID array", 147, 65538, 8, 4 }, { DEVICE_TYPE_DISK, "aacd%d", "Adaptec FSA RAID array", 151, 65538, 8, 4 }, + { DEVICE_TYPE_DISK, "mfid%d", "LSI MegaRAID SAS", 254, 65538, 8, 4 }, { DEVICE_TYPE_FLOPPY, "fd%d", "floppy drive unit A", 9, 0, 64, 4 }, { DEVICE_TYPE_NETWORK, "an", "Aironet 4500/4800 802.11 wireless adapter" }, { DEVICE_TYPE_NETWORK, "aue", "ADMtek USB ethernet adapter" }, From owner-svn-src-stable@FreeBSD.ORG Wed Apr 30 05:00:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4DD39701; Wed, 30 Apr 2014 05:00:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A5781B40; Wed, 30 Apr 2014 05:00:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3U50rRp041642; Wed, 30 Apr 2014 05:00:53 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3U50r0Y041641; Wed, 30 Apr 2014 05:00:53 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201404300500.s3U50r0Y041641@svn.freebsd.org> From: Devin Teske Date: Wed, 30 Apr 2014 05:00:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org Subject: svn commit: r265128 - stable/4/sys/i386/isa X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2014 05:00:53 -0000 Author: dteske Date: Wed Apr 30 05:00:52 2014 New Revision: 265128 URL: http://svnweb.freebsd.org/changeset/base/265128 Log: Fix lnc0 detection in VMware when PXE booting. This is a direct commit to stable/4 since lnc(4) was deprecated and does not exist beyond this branch. Submitted by: Paul Meng PR: kern/77982 Modified: stable/4/sys/i386/isa/if_lnc.c Modified: stable/4/sys/i386/isa/if_lnc.c ============================================================================== --- stable/4/sys/i386/isa/if_lnc.c Wed Apr 30 04:44:51 2014 (r265127) +++ stable/4/sys/i386/isa/if_lnc.c Wed Apr 30 05:00:52 2014 (r265128) @@ -114,6 +114,7 @@ struct lnc_softc { int rap; int rdp; int bdp; + int reset; #ifdef DEBUG int lnc_debug; #endif @@ -1120,6 +1121,7 @@ pcnet_probe(struct lnc_softc *sc) { u_long chip_id; int type; + int reset_val; /* * The PCnet family don't reset the RAP register on reset so we'll @@ -1127,6 +1129,8 @@ pcnet_probe(struct lnc_softc *sc) * though so the probe is just a matter of reading it. */ + reset_val = inw(sc->reset); + outw(reset_val, sc->reset); if ((type = lance_probe(sc))) { chip_id = read_csr(sc, CSR89); chip_id <<= 16; @@ -1293,6 +1297,7 @@ lnc_attach_ne2100_pci(int unit, unsigned sc->rap = iobase + PCNET_RAP; sc->rdp = iobase + PCNET_RDP; sc->bdp = iobase + PCNET_BDP; + sc->reset = iobase + PCNET_RESET; sc->nic.ic = pcnet_probe(sc); if (sc->nic.ic >= PCnet_32) { From owner-svn-src-stable@FreeBSD.ORG Wed Apr 30 05:26:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D27AB28; Wed, 30 Apr 2014 05:26:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29F081DA3; Wed, 30 Apr 2014 05:26:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3U5QWRc052796; Wed, 30 Apr 2014 05:26:32 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3U5QWQT052795; Wed, 30 Apr 2014 05:26:32 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201404300526.s3U5QWQT052795@svn.freebsd.org> From: Devin Teske Date: Wed, 30 Apr 2014 05:26:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org Subject: svn commit: r265129 - stable/4/lib/libdisk X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2014 05:26:32 -0000 Author: dteske Date: Wed Apr 30 05:26:31 2014 New Revision: 265129 URL: http://svnweb.freebsd.org/changeset/base/265129 Log: As-per r161293 (jhb), only recognize mfi(4) on i386. This is a direct commit to stable/4 as all future branches contain r105818 which made this code obsolete. Modified: stable/4/lib/libdisk/disk.c Modified: stable/4/lib/libdisk/disk.c ============================================================================== --- stable/4/lib/libdisk/disk.c Wed Apr 30 05:00:52 2014 (r265128) +++ stable/4/lib/libdisk/disk.c Wed Apr 30 05:26:31 2014 (r265129) @@ -486,7 +486,7 @@ Collapse_Disk(struct disk *d) #endif #ifdef PC98 -static char * device_list[] = {"wd", "aacd", "ad", "da", "afd", "fla", "idad", "mfid", "mlxd", "amrd", "twed", "ar", "fd", 0}; +static char * device_list[] = {"wd", "aacd", "ad", "da", "afd", "fla", "idad", "mlxd", "amrd", "twed", "ar", "fd", 0}; #else static char * device_list[] = {"aacd", "ad", "da", "afd", "fla", "idad", "ipsd", "mfid", "mlxd", "amrd", "twed", "ar", "fd", 0}; #endif From owner-svn-src-stable@FreeBSD.ORG Wed Apr 30 05:59:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4978338D; Wed, 30 Apr 2014 05:59:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 349B81166; Wed, 30 Apr 2014 05:59:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3U5xW2Y065243; Wed, 30 Apr 2014 05:59:32 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3U5xWxg065241; Wed, 30 Apr 2014 05:59:32 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201404300559.s3U5xWxg065241@svn.freebsd.org> From: Devin Teske Date: Wed, 30 Apr 2014 05:59:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org Subject: svn commit: r265130 - in stable/4/sys: dev/arcmsr modules/arcmsr X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2014 05:59:32 -0000 Author: dteske Date: Wed Apr 30 05:59:31 2014 New Revision: 265130 URL: http://svnweb.freebsd.org/changeset/base/265130 Log: Add tested known good version of Areca SATA RAID driver (arcmsr) working in stable/4. An MFC of slightly later code than that of r144411 (scottl). This is a direct commit to stable/4. Obtained from: Erich Chen Added: stable/4/sys/dev/arcmsr/ stable/4/sys/dev/arcmsr/arcmsr.c (contents, props changed) stable/4/sys/dev/arcmsr/arcmsr.h (contents, props changed) stable/4/sys/modules/arcmsr/ stable/4/sys/modules/arcmsr/Makefile (contents, props changed) Added: stable/4/sys/dev/arcmsr/arcmsr.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/4/sys/dev/arcmsr/arcmsr.c Wed Apr 30 05:59:31 2014 (r265130) @@ -0,0 +1,2587 @@ +/* +****************************************************************************************** +** O.S : FreeBSD +** FILE NAME : arcmsr.c +** BY : Erich Chen +** Description: SCSI RAID Device Driver for +** ARECA (ARC11XX/ARC12XX) SATA RAID HOST Adapter +** ARCMSR RAID Host adapter[RAID controller:INTEL 331(PCI-X) 341(PCI-EXPRESS) chip set] +****************************************************************************************** +************************************************************************ +** +** Copyright (c) 2004-2006 ARECA Co. Ltd. +** Erich Chen, Taipei Taiwan All rights reserved. +** +** 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. +** 3. The name of the author may not be used to endorse or promote products +** derived from this software without specific prior written permission. +** +** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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. +************************************************************************** +** History +** +** REV# DATE NAME DESCRIPTION +** 1.00.00.00 3/31/2004 Erich Chen First release +** 1.20.00.02 11/29/2004 Erich Chen bug fix with arcmsr_bus_reset when PHY error +** 1.20.00.03 4/19/2005 Erich Chen add SATA 24 Ports adapter type support +** clean unused function +** 1.20.00.12 9/12/2005 Erich Chen bug fix with abort command handling,firmware version check +** and firmware update notify for hardware bug fix +** handling if none zero high part physical address +** of srb resource +****************************************************************************************** +** $FreeBSD$ +*/ +#define ARCMSR_DEBUG 0 +/* +********************************** +*/ +#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 +#include +#include +#include +/* +************************************************************************** +** Define the OS version specific locks +************************************************************************** +*/ +#if __FreeBSD_version >= 500005 + #include + #include + #include + #include + #define ARCMSR_LOCK_INIT(l, s) mtx_init(l, s,NULL, MTX_DEF|MTX_RECURSE) + #define ARCMSR_LOCK_ACQUIRE(l) mtx_lock(l) + #define ARCMSR_LOCK_RELEASE(l) mtx_unlock(l) + typedef struct mtx arcmsr_lock_t; +#else + #include + #include + #include + #define ARCMSR_LOCK_INIT(l, s) simple_lock_init(l) + #define ARCMSR_LOCK_ACQUIRE(l) simple_lock(l) + #define ARCMSR_LOCK_RELEASE(l) simple_unlock(l) + typedef struct simplelock arcmsr_lock_t; +#endif +#include +/* +************************************************************************** +** __FreeBSD_version 502010 +************************************************************************** +*/ +static struct _SRB * arcmsr_get_freesrb(struct _ACB * pACB); +static u_int8_t arcmsr_seek_cmd2abort(union ccb * pabortccb); +static u_int8_t arcmsr_wait_msgint_ready(struct _ACB * pACB); +static u_int32_t arcmsr_probe(device_t dev); +static u_int32_t arcmsr_attach(device_t dev); +static u_int32_t arcmsr_detach(device_t dev); +static u_int32_t arcmsr_iop_ioctlcmd(struct _ACB * pACB,u_int32_t ioctl_cmd,caddr_t arg); +static void arcmsr_iop_parking(struct _ACB *pACB); +static void arcmsr_shutdown(device_t dev); +static void arcmsr_interrupt(void *arg); +static void arcmsr_polling_srbdone(struct _ACB *pACB,struct _SRB *poll_srb); +static void arcmsr_free_resource(struct _ACB * pACB); +static void arcmsr_bus_reset(struct _ACB * pACB); +static void arcmsr_stop_adapter_bgrb(struct _ACB * pACB); +static void arcmsr_start_adapter_bgrb(struct _ACB * pACB); +static void arcmsr_iop_init(struct _ACB * pACB); +static void arcmsr_flush_adapter_cache(struct _ACB * pACB); +static void arcmsr_queue_wait2go_srb(struct _ACB * pACB,struct _SRB * pSRB); +static void arcmsr_post_wait2go_srb(struct _ACB * pACB); +static void arcmsr_post_Qbuffer(struct _ACB * pACB); +static void arcmsr_abort_allcmd(struct _ACB * pACB); +static void arcmsr_srb_complete(struct _SRB * pSRB); +static void arcmsr_iop_reset(struct _ACB * pACB); +static void arcmsr_report_sense_info(struct _SRB * pSRB); +static void arcmsr_build_srb(struct _SRB * pSRB, bus_dma_segment_t * dm_segs, u_int32_t nseg); +static int arcmsr_resume(device_t dev); +static int arcmsr_suspend(device_t dev); +/* +***************************************************************************************** +** Character device switch table +**struct cdevsw { +** d_open_t *d_open; +** d_close_t *d_close; +** d_read_t *d_read; +** d_write_t *d_write; +** d_ioctl_t *d_ioctl; +** d_poll_t *d_poll; +** d_mmap_t *d_mmap; +** d_strategy_t *d_strategy; +** const char *d_name; "" base device name, e.g. 'vn' +** int d_maj; +** d_dump_t *d_dump; +** d_psize_t *d_psize; +** u_int d_flags; +** int d_bmaj; +** d_kqfilter_t *d_kqfilter; "" additions below are not binary compatible with 4.2 and below +**}; +****************************************************************************************** +*/ +/* +************************************************************************** +** Insert a delay in micro-seconds and milli-seconds. +** static void MDELAY(u_int32_t ms) { while (ms--) UDELAY(1000); } +************************************************************************** +*/ +static void UDELAY(u_int32_t us) { DELAY(us); } +/* +************************************************************************** +** +************************************************************************** +*/ +static bus_dmamap_callback_t arcmsr_map_freesrb; +static bus_dmamap_callback_t arcmsr_executesrb; +/* +************************************************************************** +** +************************************************************************** +*/ +static d_open_t arcmsr_open; +static d_close_t arcmsr_close; +static d_ioctl_t arcmsr_ioctl; + +static device_method_t arcmsr_methods[]={ + DEVMETHOD(device_probe, arcmsr_probe), + DEVMETHOD(device_attach, arcmsr_attach), + DEVMETHOD(device_detach, arcmsr_detach), + DEVMETHOD(device_shutdown, arcmsr_shutdown), + DEVMETHOD(device_suspend, arcmsr_suspend), + DEVMETHOD(device_resume, arcmsr_resume), + + DEVMETHOD(bus_print_child, bus_generic_print_child), + DEVMETHOD(bus_driver_added, bus_generic_driver_added), + { 0,0 } +}; + +static driver_t arcmsr_driver={ + "arcmsr",arcmsr_methods,sizeof(struct _ACB) +}; + +static devclass_t arcmsr_devclass; +DRIVER_MODULE(arcmsr,pci,arcmsr_driver,arcmsr_devclass,0,0); +#ifndef BUS_DMA_COHERENT + #define BUS_DMA_COHERENT 0x04 /* hint: map memory in a coherent way */ +#endif +#if __FreeBSD_version >= 501000 + #ifndef D_NEEDGIANT + #define D_NEEDGIANT 0x00400000 /* driver want Giant */ + #endif + #ifndef D_VERSION + #define D_VERSION 0x20011966 + #endif + static struct cdevsw arcmsr_cdevsw={ + #if __FreeBSD_version > 502010 + .d_version = D_VERSION, + #endif + .d_flags = D_NEEDGIANT, + .d_open = arcmsr_open, /* open */ + .d_close = arcmsr_close, /* close */ + .d_ioctl = arcmsr_ioctl, /* ioctl */ + .d_name = "arcmsr", /* name */ + }; +#else + #define ARCMSR_CDEV_MAJOR 180 + + static struct cdevsw arcmsr_cdevsw = { + arcmsr_open, /* open */ + arcmsr_close, /* close */ + noread, /* read */ + nowrite, /* write */ + arcmsr_ioctl, /* ioctl */ + nopoll, /* poll */ + nommap, /* mmap */ + nostrategy, /* strategy */ + "arcmsr", /* name */ + ARCMSR_CDEV_MAJOR, /* major */ + nodump, /* dump */ + nopsize, /* psize */ + 0 /* flags */ + }; +#endif + +#if __FreeBSD_version < 500005 + static int arcmsr_open(dev_t dev, int flags, int fmt, struct proc *proc) +#else + #if __FreeBSD_version < 503000 + static int arcmsr_open(dev_t dev, int flags, int fmt, struct thread *proc) + #else + static int arcmsr_open(struct cdev *dev, int flags, int fmt, d_thread_t *proc) + #endif +#endif +{ + #if __FreeBSD_version < 503000 + struct _ACB * pACB=dev->si_drv1; + #else + int unit = minor(dev); + struct _ACB * pACB = devclass_get_softc(arcmsr_devclass, unit); + #endif + + if(pACB==NULL) + { + return ENXIO; + } + return 0; +} +/* +************************************************************************** +************************************************************************** +*/ +#if __FreeBSD_version < 500005 + static int arcmsr_close(dev_t dev, int flags, int fmt, struct proc *proc) +#else + #if __FreeBSD_version < 503000 + static int arcmsr_close(dev_t dev, int flags, int fmt, struct thread *proc) + #else + static int arcmsr_close(struct cdev *dev, int flags, int fmt, d_thread_t *proc) + #endif +#endif +{ + #if __FreeBSD_version < 503000 + struct _ACB * pACB=dev->si_drv1; + #else + int unit = minor(dev); + struct _ACB * pACB = devclass_get_softc(arcmsr_devclass, unit); + #endif + + if(pACB==NULL) + { + return ENXIO; + } + return 0; +} +/* +************************************************************************** +**ENOENT +**ENOIOCTL +**ENOMEM +**EINVAL +************************************************************************** +*/ +#if __FreeBSD_version < 500005 + static int arcmsr_ioctl(dev_t dev, u_long ioctl_cmd, caddr_t arg, int flags, struct proc *proc) +#else + #if __FreeBSD_version < 503000 + static int arcmsr_ioctl(dev_t dev, u_long ioctl_cmd, caddr_t arg, int flags, struct thread *proc) + #else + static int arcmsr_ioctl(struct cdev *dev, u_long ioctl_cmd, caddr_t arg,int flags, d_thread_t *proc) + #endif +#endif +{ + #if __FreeBSD_version < 503000 + struct _ACB * pACB=dev->si_drv1; + #else + int unit = minor(dev); + struct _ACB * pACB = devclass_get_softc(arcmsr_devclass, unit); + #endif + + if(pACB==NULL) + { + return ENXIO; + } + return(arcmsr_iop_ioctlcmd(pACB,ioctl_cmd,arg)); +} +/* +******************************************************************************* +** Bring the controller to a quiescent state, ready for system suspend. +******************************************************************************* +*/ +static int arcmsr_suspend(device_t dev) +{ + struct _ACB *pACB = device_get_softc(dev); + u_int32_t intmask_org; + int s; + + s = splbio(); + /* disable all outbound interrupt */ + intmask_org=readl(&pACB->pmu->outbound_intmask); + writel(&pACB->pmu->outbound_intmask,(intmask_org|ARCMSR_MU_OUTBOUND_ALL_INTMASKENABLE)); + /* flush controller */ + printf("arcmsr%d: flushing cache...\n",pACB->pci_unit); + arcmsr_iop_parking(pACB); + splx(s); + return(0); +} +/* +******************************************************************************* +** Bring the controller back to a state ready for operation. +******************************************************************************* +*/ +static int arcmsr_resume(device_t dev) +{ + struct _ACB *pACB = device_get_softc(dev); + + arcmsr_iop_init(pACB); + return(0); +} +/* +********************************************************************************* +** Asynchronous notification handler. +********************************************************************************* +*/ +static void arcmsr_async(void *cb_arg, u_int32_t code, struct cam_path *path, void *arg) +{ + struct _ACB * pACB; + u_int8_t target_id,target_lun; + struct cam_sim * sim; + u_int32_t s; + + s=splcam(); + sim=(struct cam_sim *) cb_arg; + pACB =(struct _ACB *) cam_sim_softc(sim); + switch (code) + { + case AC_LOST_DEVICE: + target_id=xpt_path_target_id(path); + target_lun=xpt_path_lun_id(path); + if((target_id > ARCMSR_MAX_TARGETID) || (target_lun > ARCMSR_MAX_TARGETLUN)) + { + break; + } + printf("%s:scsi id%d lun%d device lost \n",device_get_name(pACB->pci_dev),target_id,target_lun); + break; + default: + break; + } + splx(s); +} +/* +************************************************************************ +** +** +************************************************************************ +*/ +static void arcmsr_flush_adapter_cache(struct _ACB * pACB) +{ + writel(&pACB->pmu->inbound_msgaddr0,ARCMSR_INBOUND_MESG0_FLUSH_CACHE); + return; +} +/* +********************************************************************** +** +** +** +********************************************************************** +*/ +static u_int8_t arcmsr_wait_msgint_ready(struct _ACB * pACB) +{ + u_int32_t Index; + u_int8_t Retries=0x00; + do + { + for(Index=0; Index < 100; Index++) + { + if(readl(&pACB->pmu->outbound_intstatus) & ARCMSR_MU_OUTBOUND_MESSAGE0_INT) + { + writel(&pACB->pmu->outbound_intstatus, ARCMSR_MU_OUTBOUND_MESSAGE0_INT);/*clear interrupt*/ + return 0x00; + } + /* one us delay */ + UDELAY(10000); + }/*max 1 seconds*/ + }while(Retries++ < 20);/*max 20 sec*/ + return 0xff; +} +/* +********************************************************************** +** +** Q back this SRB into ACB ArraySRB +** +********************************************************************** +*/ +static void arcmsr_srb_complete(struct _SRB * pSRB) +{ + u_int32_t s; + struct _ACB * pACB=pSRB->pACB; + union ccb * pccb=pSRB->pccb; + + if((pccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) + { + bus_dmasync_op_t op; + + if((pccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) + { + op = BUS_DMASYNC_POSTREAD; + } + else + { + op = BUS_DMASYNC_POSTWRITE; + } + bus_dmamap_sync(pACB->buffer_dmat, pSRB->dmamap, op); + bus_dmamap_unload(pACB->buffer_dmat, pSRB->dmamap); + } + s=splcam(); + atomic_subtract_int(&pACB->srboutstandingcount,1); + pSRB->startdone=ARCMSR_SRB_DONE; + pSRB->srb_flags=0; + pACB->psrbringQ[pACB->srb_doneindex]=pSRB; + pACB->srb_doneindex++; + pACB->srb_doneindex %= ARCMSR_MAX_FREESRB_NUM; + splx(s); + xpt_done(pccb); + return; +} +/* +********************************************************************** +** if scsi error do auto request sense +********************************************************************** +*/ +static void arcmsr_report_sense_info(struct _SRB * pSRB) +{ + union ccb * pccb=pSRB->pccb; + PSENSE_DATA psenseBuffer=(PSENSE_DATA)&pccb->csio.sense_data; + + pccb->ccb_h.status |= CAM_SCSI_STATUS_ERROR; + pccb->csio.scsi_status = SCSI_STATUS_CHECK_COND; + if(psenseBuffer) + { + memset(psenseBuffer, 0, sizeof(pccb->csio.sense_data)); + memcpy(psenseBuffer,pSRB->arcmsr_cdb.SenseData,get_min(sizeof(struct _SENSE_DATA),sizeof(pccb->csio.sense_data))); + psenseBuffer->ErrorCode=0x70; + psenseBuffer->Valid=1; + pccb->ccb_h.status |= CAM_AUTOSNS_VALID; + } + return; +} +/* +********************************************************************* +** to insert pSRB into tail of pACB wait exec srbQ +********************************************************************* +*/ +static void arcmsr_queue_wait2go_srb(struct _ACB * pACB,struct _SRB * pSRB) +{ + u_int32_t s; + u_int32_t i=0; + + s=splcam(); + while(1) + { + if(pACB->psrbwait2go[i]==NULL) + { + pACB->psrbwait2go[i]=pSRB; + atomic_add_int(&pACB->srbwait2gocount,1); + splx(s); + return; + } + i++; + i%=ARCMSR_MAX_OUTSTANDING_CMD; + } + return; +} +/* +********************************************************************* +** +********************************************************************* +*/ +static void arcmsr_abort_allcmd(struct _ACB * pACB) +{ + writel(&pACB->pmu->inbound_msgaddr0,ARCMSR_INBOUND_MESG0_ABORT_CMD); + return; +} + +/* +**************************************************************************** +** Routine Description: Reset 80331 iop. +** Arguments: +** Return Value: Nothing. +**************************************************************************** +*/ +static void arcmsr_iop_reset(struct _ACB * pACB) +{ + struct _SRB * pSRB; + u_int32_t intmask_org,mask; + u_int32_t i=0; + + if(pACB->srboutstandingcount!=0) + { + printf("arcmsr%d: iop reset srboutstandingcount=%d \n",pACB->pci_unit,pACB->srboutstandingcount); + /* disable all outbound interrupt */ + intmask_org=readl(&pACB->pmu->outbound_intmask); + writel(&pACB->pmu->outbound_intmask,intmask_org|ARCMSR_MU_OUTBOUND_ALL_INTMASKENABLE); + /* talk to iop 331 outstanding command aborted*/ + arcmsr_abort_allcmd(pACB); + if(arcmsr_wait_msgint_ready(pACB)) + { + printf("arcmsr%d: iop reset wait 'abort all outstanding command' timeout \n",pACB->pci_unit); + } + /*clear all outbound posted Q*/ + for(i=0;ipmu->outbound_queueport); + } + for(i=0;ipsrb_pool[i]; + if(pSRB->startdone==ARCMSR_SRB_START) + { + pSRB->startdone=ARCMSR_SRB_ABORTED; + pSRB->pccb->ccb_h.status=CAM_REQ_ABORTED; + arcmsr_srb_complete(pSRB); + } + } + /* enable all outbound interrupt */ + mask=~(ARCMSR_MU_OUTBOUND_POSTQUEUE_INTMASKENABLE|ARCMSR_MU_OUTBOUND_DOORBELL_INTMASKENABLE|ARCMSR_MU_OUTBOUND_MESSAGE0_INTMASKENABLE); + writel(&pACB->pmu->outbound_intmask,intmask_org & mask); + /* post abort all outstanding command message to RAID controller */ + } + i=0; + while(pACB->srbwait2gocount > 0) + { + pSRB=pACB->psrbwait2go[i]; + if(pSRB!=NULL) + { + printf("arcmsr%d:iop reset abort command srbwait2gocount=%d \n",pACB->pci_unit,pACB->srbwait2gocount); + pACB->psrbwait2go[i]=NULL; + pSRB->startdone=ARCMSR_SRB_ABORTED; + pSRB->pccb->ccb_h.status=CAM_REQ_ABORTED; + arcmsr_srb_complete(pSRB); + atomic_subtract_int(&pACB->srbwait2gocount,1); + } + i++; + i%=ARCMSR_MAX_OUTSTANDING_CMD; + } + atomic_set_int(&pACB->srboutstandingcount,0); + return; +} +/* +********************************************************************** +** +** PAGE_SIZE=4096 or 8192,PAGE_SHIFT=12 +********************************************************************** +*/ +static void arcmsr_build_srb(struct _SRB * pSRB, bus_dma_segment_t *dm_segs, u_int32_t nseg) +{ + struct _ARCMSR_CDB * pARCMSR_CDB=&pSRB->arcmsr_cdb; + u_int8_t * psge=(u_int8_t *)&pARCMSR_CDB->u; + u_int32_t address_lo,address_hi; + union ccb * pccb=pSRB->pccb; + struct ccb_scsiio * pcsio=&pccb->csio; + u_int32_t arccdbsize=0x30; + + memset(pARCMSR_CDB,0,sizeof(struct _ARCMSR_CDB)); + pARCMSR_CDB->Bus=0; + pARCMSR_CDB->TargetID=pccb->ccb_h.target_id; + pARCMSR_CDB->LUN=pccb->ccb_h.target_lun; + pARCMSR_CDB->Function=1; + pARCMSR_CDB->CdbLength=(u_int8_t)pcsio->cdb_len; + pARCMSR_CDB->Context=(unsigned long)pARCMSR_CDB; + bcopy(pcsio->cdb_io.cdb_bytes, pARCMSR_CDB->Cdb, pcsio->cdb_len); + if(nseg != 0) + { + struct _ACB * pACB=pSRB->pACB; + bus_dmasync_op_t op; + u_int32_t length,i,cdb_sgcount=0; + + /* map stor port SG list to our iop SG List.*/ + for(i=0;iaddress=address_lo; + pdma_sg->length=length; + psge += sizeof(struct _SG32ENTRY); + arccdbsize += sizeof(struct _SG32ENTRY); + } + else + { + u_int32_t sg64s_size=0,tmplength=length; + + #if ARCMSR_DEBUG + printf("arcmsr%d: !!!!!!!!!!! address_hi=%x \n",pACB->pci_unit,address_hi); + #endif + while(1) + { + u_int64_t span4G,length0; + struct _SG64ENTRY * pdma_sg=(struct _SG64ENTRY *)psge; + + span4G=(u_int64_t)address_lo + tmplength; + pdma_sg->addresshigh=address_hi; + pdma_sg->address=address_lo; + if(span4G > 0x100000000) + { + /*see if cross 4G boundary*/ + length0=0x100000000-address_lo; + pdma_sg->length=(u_int32_t)length0|IS_SG64_ADDR; + address_hi=address_hi+1; + address_lo=0; + tmplength=tmplength-(u_int32_t)length0; + sg64s_size += sizeof(struct _SG64ENTRY); + psge += sizeof(struct _SG64ENTRY); + cdb_sgcount++; + } + else + { + pdma_sg->length=tmplength|IS_SG64_ADDR; + sg64s_size += sizeof(struct _SG64ENTRY); + psge += sizeof(struct _SG64ENTRY); + break; + } + } + arccdbsize += sg64s_size; + } + cdb_sgcount++; + } + pARCMSR_CDB->sgcount=(u_int8_t)cdb_sgcount; + pARCMSR_CDB->DataLength=pcsio->dxfer_len; + if( arccdbsize > 256) + { + pARCMSR_CDB->Flags|=ARCMSR_CDB_FLAG_SGL_BSIZE; + } + if((pccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) + { + op=BUS_DMASYNC_PREREAD; + } + else + { + op=BUS_DMASYNC_PREWRITE; + pARCMSR_CDB->Flags|=ARCMSR_CDB_FLAG_WRITE; + pSRB->srb_flags|=SRB_FLAG_WRITE; + } + bus_dmamap_sync(pACB->buffer_dmat, pSRB->dmamap, op); + } + return; +} +/* +************************************************************************** +** +** arcmsr_post_srb - Send a protocol specific ARC send postcard to a AIOC . +** handle: Handle of registered ARC protocol driver +** adapter_id: AIOC unique identifier(integer) +** pPOSTCARD_SEND: Pointer to ARC send postcard +** +** This routine posts a ARC send postcard to the request post FIFO of a +** specific ARC adapter. +** +************************************************************************** +*/ +static void arcmsr_post_srb(struct _ACB * pACB,struct _SRB * pSRB) +{ + u_int32_t cdb_shifted_phyaddr=(u_int32_t) pSRB->cdb_shifted_phyaddr; + struct _ARCMSR_CDB * pARCMSR_CDB=(struct _ARCMSR_CDB *)&pSRB->arcmsr_cdb; + + atomic_add_int(&pACB->srboutstandingcount,1); + pSRB->startdone=ARCMSR_SRB_START; + if(pARCMSR_CDB->Flags & ARCMSR_CDB_FLAG_SGL_BSIZE) + { + writel(&pACB->pmu->inbound_queueport,cdb_shifted_phyaddr|ARCMSR_SRBPOST_FLAG_SGL_BSIZE); + } + else + { + writel(&pACB->pmu->inbound_queueport,cdb_shifted_phyaddr); + } + return; +} +/* +************************************************************************** +** +** +************************************************************************** +*/ +static void arcmsr_post_wait2go_srb(struct _ACB * pACB) +{ + u_int32_t s; + struct _SRB * pSRB; + u_int32_t i=0; + + s=splcam(); + while((pACB->srbwait2gocount > 0) && (pACB->srboutstandingcount < ARCMSR_MAX_OUTSTANDING_CMD)) + { + pSRB=pACB->psrbwait2go[i]; + if(pSRB!=NULL) + { + pACB->psrbwait2go[i]=NULL; + arcmsr_post_srb(pACB,pSRB); + atomic_subtract_int(&pACB->srbwait2gocount,1); + } + i++; + i%=ARCMSR_MAX_OUTSTANDING_CMD; + } + splx(s); + return; +} +/* +********************************************************************** +** Function: arcmsr_post_Qbuffer +** Output: +********************************************************************** +*/ +static void arcmsr_post_Qbuffer(struct _ACB * pACB) +{ + u_int32_t s; + u_int8_t * pQbuffer; + struct _QBUFFER * pwbuffer=(struct _QBUFFER *)&pACB->pmu->ioctl_wbuffer; + u_int8_t * iop_data=(u_int8_t *)pwbuffer->data; + u_int32_t allxfer_len=0; + + s=splcam(); + while((pACB->wqbuf_firstindex!=pACB->wqbuf_lastindex) && (allxfer_len<124)) + { + pQbuffer=&pACB->wqbuffer[pACB->wqbuf_firstindex]; + memcpy(iop_data,pQbuffer,1); + pACB->wqbuf_firstindex++; + pACB->wqbuf_firstindex %= ARCMSR_MAX_QBUFFER; /*if last index number set it to 0 */ + iop_data++; + allxfer_len++; + } + pwbuffer->data_len=allxfer_len; + /* + ** push inbound doorbell and wait reply at hwinterrupt routine for next Qbuffer post + */ + writel(&pACB->pmu->inbound_doorbell,ARCMSR_INBOUND_DRIVER_DATA_WRITE_OK); + splx(s); + return; +} +/* +************************************************************************ +************************************************************************ +*/ +static void arcmsr_stop_adapter_bgrb(struct _ACB * pACB) +{ + pACB->acb_flags |= ACB_F_MSG_STOP_BGRB; + pACB->acb_flags &= ~ACB_F_MSG_START_BGRB; + writel(&pACB->pmu->inbound_msgaddr0,ARCMSR_INBOUND_MESG0_STOP_BGRB); + return; +} +/* +************************************************************************ +************************************************************************ +*/ +static void arcmsr_poll(struct cam_sim * psim) +{ + arcmsr_interrupt(cam_sim_softc(psim)); + return; +} +/* +********************************************************************** +** Function: arcmsr_interrupt +** Output: void +** CAM Status field values +**typedef enum { +** CAM_REQ_INPROG, CCB request is in progress +** CAM_REQ_CMP, CCB request completed without error +** CAM_REQ_ABORTED, CCB request aborted by the host +** CAM_UA_ABORT, Unable to abort CCB request +** CAM_REQ_CMP_ERR, CCB request completed with an error +** CAM_BUSY, CAM subsytem is busy +** CAM_REQ_INVALID, CCB request was invalid +** CAM_PATH_INVALID, Supplied Path ID is invalid +** CAM_DEV_NOT_THERE, SCSI Device Not Installed/there +** CAM_UA_TERMIO, Unable to terminate I/O CCB request +** CAM_SEL_TIMEOUT, Target Selection Timeout +** CAM_CMD_TIMEOUT, Command timeout +** CAM_SCSI_STATUS_ERROR, SCSI error, look at error code in CCB +** CAM_MSG_REJECT_REC, Message Reject Received +** CAM_SCSI_BUS_RESET, SCSI Bus Reset Sent/Received +** CAM_UNCOR_PARITY, Uncorrectable parity error occurred +** CAM_AUTOSENSE_FAIL=0x10, Autosense: request sense cmd fail +** CAM_NO_HBA, No HBA Detected error +** CAM_DATA_RUN_ERR, Data Overrun error +** CAM_UNEXP_BUSFREE, Unexpected Bus Free +** CAM_SEQUENCE_FAIL, Target Bus Phase Sequence Failure +** CAM_CCB_LEN_ERR, CCB length supplied is inadequate +** CAM_PROVIDE_FAIL, Unable to provide requested capability +** CAM_BDR_SENT, A SCSI BDR msg was sent to target +** CAM_REQ_TERMIO, CCB request terminated by the host +** CAM_UNREC_HBA_ERROR, Unrecoverable Host Bus Adapter Error +** CAM_REQ_TOO_BIG, The request was too large for this host +** CAM_REQUEUE_REQ, +** * This request should be requeued to preserve +** * transaction ordering. This typically occurs +** * when the SIM recognizes an error that should +** * freeze the queue and must place additional +** * requests for the target at the sim level +** * back into the XPT queue. +** +** CAM_IDE=0x33, Initiator Detected Error +** CAM_RESRC_UNAVAIL, Resource Unavailable +** CAM_UNACKED_EVENT, Unacknowledged Event by Host +** CAM_MESSAGE_RECV, Message Received in Host Target Mode +** CAM_INVALID_CDB, Invalid CDB received in Host Target Mode +** CAM_LUN_INVALID, Lun supplied is invalid +** CAM_TID_INVALID, Target ID supplied is invalid +** CAM_FUNC_NOTAVAIL, The requested function is not available +** CAM_NO_NEXUS, Nexus is not established +** CAM_IID_INVALID, The initiator ID is invalid +** CAM_CDB_RECVD, The SCSI CDB has been received +** CAM_LUN_ALRDY_ENA, The LUN is already eanbeld for target mode +** CAM_SCSI_BUSY, SCSI Bus Busy +** +** CAM_DEV_QFRZN=0x40, The DEV queue is frozen w/this err +** +** Autosense data valid for target +** CAM_AUTOSNS_VALID=0x80, +** CAM_RELEASE_SIMQ=0x100, SIM ready to take more commands +** CAM_SIM_QUEUED =0x200, SIM has this command in it's queue +** +** CAM_STATUS_MASK=0x3F, Mask bits for just the status # +** +** Target Specific Adjunct Status +** CAM_SENT_SENSE=0x40000000 sent sense with status +**} cam_status; +********************************************************************** +*/ +static void arcmsr_interrupt(void *arg) +{ + struct _ACB * pACB=(struct _ACB *)arg; + struct _SRB * pSRB; + u_int32_t flag_srb,outbound_intstatus,outbound_doorbell; + + /* + ********************************************* + ** check outbound intstatus À˹µL¶l®t«öªù¹a + ********************************************* + */ + outbound_intstatus=readl(&pACB->pmu->outbound_intstatus) & pACB->outbound_int_enable; + writel(&pACB->pmu->outbound_intstatus, outbound_intstatus);/*clear interrupt*/ + if(outbound_intstatus & ARCMSR_MU_OUTBOUND_DOORBELL_INT) + { + /* + ********************************************* + ** DOORBELL ¥m¾´! ¬O§_¦³¶l¥ó­nñ¦¬ + ********************************************* + */ + outbound_doorbell=readl(&pACB->pmu->outbound_doorbell); + writel(&pACB->pmu->outbound_doorbell,outbound_doorbell);/*clear interrupt */ + if(outbound_doorbell & ARCMSR_OUTBOUND_IOP331_DATA_WRITE_OK) + { + struct _QBUFFER * prbuffer=(struct _QBUFFER *)&pACB->pmu->ioctl_rbuffer; + u_int8_t * iop_data=(u_int8_t *)prbuffer->data; + u_int8_t * pQbuffer; + u_int32_t my_empty_len,iop_len,rqbuf_firstindex,rqbuf_lastindex; + + /*check this iop data if overflow my rqbuffer*/ + rqbuf_lastindex=pACB->rqbuf_lastindex; + rqbuf_firstindex=pACB->rqbuf_firstindex; + iop_len=prbuffer->data_len; + my_empty_len=(rqbuf_firstindex-rqbuf_lastindex-1)&(ARCMSR_MAX_QBUFFER-1); + if(my_empty_len>=iop_len) + { + while(iop_len > 0) + { + pQbuffer=&pACB->rqbuffer[pACB->rqbuf_lastindex]; + memcpy(pQbuffer,iop_data,1); + pACB->rqbuf_lastindex++; + pACB->rqbuf_lastindex %= ARCMSR_MAX_QBUFFER;/*if last index number set it to 0 */ + iop_data++; + iop_len--; + } + writel(&pACB->pmu->inbound_doorbell, ARCMSR_INBOUND_DRIVER_DATA_READ_OK);/*signature, let IOP331 know data has been readed */ + } + else + { + pACB->acb_flags|=ACB_F_IOPDATA_OVERFLOW; + } + } + if(outbound_doorbell & ARCMSR_OUTBOUND_IOP331_DATA_READ_OK) + { + /* + ********************************************* + ** ¬Ý¬Ý¬O§_ÁÙ¦³¶l¥ó­n¶¶¹D±H¥X + ********************************************* + */ + if(pACB->wqbuf_firstindex!=pACB->wqbuf_lastindex) + { + u_int8_t * pQbuffer; + struct _QBUFFER * pwbuffer=(struct _QBUFFER *)&pACB->pmu->ioctl_wbuffer; + u_int8_t * iop_data=(u_int8_t *)pwbuffer->data; + u_int32_t allxfer_len=0; + + while((pACB->wqbuf_firstindex!=pACB->wqbuf_lastindex) && (allxfer_len<124)) + { + pQbuffer=&pACB->wqbuffer[pACB->wqbuf_firstindex]; + memcpy(iop_data,pQbuffer,1); + pACB->wqbuf_firstindex++; + pACB->wqbuf_firstindex %= ARCMSR_MAX_QBUFFER; /*if last index number set it to 0 */ + iop_data++; + allxfer_len++; + } + pwbuffer->data_len=allxfer_len; + /* + ** push inbound doorbell tell iop driver data write ok and wait reply on next hwinterrupt for next Qbuffer post + */ + writel(&pACB->pmu->inbound_doorbell,ARCMSR_INBOUND_DRIVER_DATA_WRITE_OK); + } + else + { + pACB->acb_flags |= ACB_F_IOCTL_WQBUFFER_CLEARED; + } + } + } + if(outbound_intstatus & ARCMSR_MU_OUTBOUND_POSTQUEUE_INT) + { + int target,lun; + /* + ***************************************************************************** + ** areca cdb command done + ***************************************************************************** + */ + while(1) + { + if((flag_srb=readl(&pACB->pmu->outbound_queueport)) == 0xFFFFFFFF) + { + break;/*chip FIFO no srb for completion already*/ + } + /* check if command done with no error*/ + pSRB=(struct _SRB *)(pACB->vir2phy_offset+(flag_srb << 5));/*frame must be 32 bytes aligned*/ + if((pSRB->pACB!=pACB) || (pSRB->startdone!=ARCMSR_SRB_START)) + { + if(pSRB->startdone==ARCMSR_SRB_ABORTED) + { + printf("arcmsr%d: scsi id=%d lun=%d srb='%p' isr command abort successfully \n",pACB->pci_unit,pSRB->pccb->ccb_h.target_id,pSRB->pccb->ccb_h.target_lun,pSRB); + pSRB->pccb->ccb_h.status=CAM_REQ_ABORTED; + arcmsr_srb_complete(pSRB); + continue; + } + printf("arcmsr%d: isr get an illegal srb command done acb='%p' srb='%p' srbacb='%p' startdone=0x%x srboutstandingcount=%d \n",pACB->pci_unit,pACB,pSRB,pSRB->pACB,pSRB->startdone,pACB->srboutstandingcount); + continue; + } + target=pSRB->pccb->ccb_h.target_id; + lun=pSRB->pccb->ccb_h.target_lun; + if((flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR)==0) + { + if(pACB->devstate[target][lun]==ARECA_RAID_GONE) + { + pACB->devstate[target][lun]=ARECA_RAID_GOOD; + } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Wed Apr 30 06:03:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8EC755C7; Wed, 30 Apr 2014 06:03:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6169111FC; Wed, 30 Apr 2014 06:03:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3U632w7068825; Wed, 30 Apr 2014 06:03:02 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3U631sC068820; Wed, 30 Apr 2014 06:03:01 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201404300603.s3U631sC068820@svn.freebsd.org> From: Devin Teske Date: Wed, 30 Apr 2014 06:03:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org Subject: svn commit: r265131 - in stable/4/sys: conf i386/conf modules X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2014 06:03:02 -0000 Author: dteske Date: Wed Apr 30 06:03:01 2014 New Revision: 265131 URL: http://svnweb.freebsd.org/changeset/base/265131 Log: Merge r144423 with r144497 in-mind. Glue the arcmsr driver into the stable/4 branch -- but don't build arcmsr on pc98. This is a direct commit to stable/4 as arcmsr is already hooked into stable/5 and up. Modified: stable/4/sys/conf/files.i386 stable/4/sys/i386/conf/GENERIC stable/4/sys/i386/conf/LINT stable/4/sys/modules/Makefile Modified: stable/4/sys/conf/files.i386 ============================================================================== --- stable/4/sys/conf/files.i386 Wed Apr 30 05:59:31 2014 (r265130) +++ stable/4/sys/conf/files.i386 Wed Apr 30 06:03:01 2014 (r265131) @@ -91,6 +91,7 @@ crypto/des/des_setkey.c optional crypt dev/advansys/adv_isa.c optional adv isa dev/aic/aic_isa.c optional aic isa dev/ar/if_ar_isa.c optional ar isa +dev/arcmsr/arcmsr.c optional arcmsr pci dev/arl/if_arl.c optional arl dev/arl/if_arl_isa.c optional arl isa dev/dgb/dgm.c optional dgm Modified: stable/4/sys/i386/conf/GENERIC ============================================================================== --- stable/4/sys/i386/conf/GENERIC Wed Apr 30 05:59:31 2014 (r265130) +++ stable/4/sys/i386/conf/GENERIC Wed Apr 30 06:03:01 2014 (r265131) @@ -131,6 +131,7 @@ device aac # Adaptec FSA RAID, Dell PE device ida # Compaq Smart RAID device ips # IBM/Adaptec ServeRAID device amr # AMI MegaRAID +device arcmsr # Areca SATA II RAID device mfi # LSI MegaRAID SAS device mlx # Mylex DAC960 family device pst # Promise Supertrak SX6000 Modified: stable/4/sys/i386/conf/LINT ============================================================================== --- stable/4/sys/i386/conf/LINT Wed Apr 30 05:59:31 2014 (r265130) +++ stable/4/sys/i386/conf/LINT Wed Apr 30 06:03:01 2014 (r265131) @@ -1276,6 +1276,12 @@ device pst # Promise Supertrak SX6000 device amr # AMI MegaRAID # +# Areca 11xx and 12xx series of SATA II RAID controllers. +# CAM is required. +# +device arcmsr # Areca SATA II RAID + +# # 3ware ATA RAID # device twe # 3ware ATA RAID Modified: stable/4/sys/modules/Makefile ============================================================================== --- stable/4/sys/modules/Makefile Wed Apr 30 05:59:31 2014 (r265130) +++ stable/4/sys/modules/Makefile Wed Apr 30 06:03:01 2014 (r265131) @@ -149,6 +149,7 @@ SUBDIR+=ar \ .if ${MACHINE} == "i386" SUBDIR+=aac \ + arcmsr \ arl \ asr \ ciss \ From owner-svn-src-stable@FreeBSD.ORG Wed Apr 30 06:08:22 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D651809; Wed, 30 Apr 2014 06:08:22 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 1A052127A; Wed, 30 Apr 2014 06:08:22 +0000 (UTC) Received: from delphij-macbook.local (c-24-5-244-32.hsd1.ca.comcast.net [24.5.244.32]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id 5B3D32332E; Tue, 29 Apr 2014 23:08:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1398838101; bh=kfXlOJiZ2vjm2ck2Q7LOpl17VxKluutDWG55PEFm2Mc=; h=Date:From:Reply-To:To:Subject:References:In-Reply-To; b=VExM8mDQMqBHamiATX3k7/G62uERFqq7mbXKXrBPlOgsEzOXwhWdghZzXm00jUjSG cuyYoOl5LtDhTILTonQRwcdP5brpIQhsuyAw+ML+hFi0Lnsjpm//fgTInqOLxeo8Wp CfDmn0j1TdThHE+qjV7fXuI1GDRSrg/2hLv2KUeo= Message-ID: <53609354.6080305@delphij.net> Date: Tue, 29 Apr 2014 23:08:20 -0700 From: Xin Li Organization: The FreeBSD Project MIME-Version: 1.0 To: Devin Teske , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org Subject: Re: svn commit: r265130 - in stable/4/sys: dev/arcmsr modules/arcmsr References: <201404300559.s3U5xWxg065241@svn.freebsd.org> In-Reply-To: <201404300559.s3U5xWxg065241@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: d@delphij.net List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2014 06:08:22 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 4/29/14, 10:59 PM, Devin Teske wrote: > changeset/base/265130 > > Log: Add tested known good version of Areca SATA RAID driver > (arcmsr) working in stable/4. An MFC of slightly later code than > that of r144411 (scottl). This is a direct commit to stable/4. > > Obtained from: Erich Chen Hrm I think stable/4 is mostly frozen :) Since you have been there, I think it would be a good idea to merge the manual page too, for completeness... Cheers, -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJTYJNUAAoJEJW2GBstM+nsmssQAJR/EpsoVg0VFEpRbyK5VJoP akqELXLnEGkfuPCqZ8Y2u18vsD+cVr//fg16FpHgT5nAjlLxHJmsPwRKkIqBJ/Tf ODssjaEb7sQs05wqvLgzMQ9Hm2l4opzwRLYiypv4RcREjnDVcRJmlTa9R2oWlhhu Ss3DP2CN3mBYjIujtBrOfyBYa1wAhx/DPZ0N+LxeqMiENfQ2TwrVpVAmlzs86UE7 FyAoCYTM+sv+mrDN8kwBx8cD4UFpmjQoSMeHGsFZCQMfYzOyqZ7WpJ9EMSrpQSof wUYz7seJc+3eP0KVmSH6rOEathGSVp47i7l+6ywFqWsW8hb/yHDkAwM8tMncYQKJ YMKItEgpXxEI1iOhHZTcj04T1eElFzgm7RiTSvVzMhNO3+0uO/vJecZosu+DUi79 FDxIKWPECC+Be4TNaYcjMbTCEurkEpvk0dzOuAh+xB8LisPvNJoCjzfiU7ma8W8v V46LMhR5N15v/R1hf3y8mDwKt+4a4FNUU7cUOM6KdLvZTCJUpX/OPW+0a6ZsvTf/ ieBFrncbgYRDiCbqystZxo6gz6niZq6vw8LfF7n6cJB0PqQlH29PJd6PYj7H83P1 eGWMRM8iOp7YLjKBsqFWDEdIeyZPE4Lgu0P4YNiVM23Je8jrEPnvRQo+OvSP2T1e 460VzuXNCAiIXxjn22jo =FF94 -----END PGP SIGNATURE----- From owner-svn-src-stable@FreeBSD.ORG Wed Apr 30 06:10:35 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6FCB494E; Wed, 30 Apr 2014 06:10:35 +0000 (UTC) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx1.fisglobal.com", Issuer "VeriSign Class 3 Secure Server CA - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 377EC128D; Wed, 30 Apr 2014 06:10:34 +0000 (UTC) Received: from smarthost.fisglobal.com ([10.132.206.192]) by ltcfislmsgpa01.FNFIS.COM (8.14.5/8.14.5) with ESMTP id s3U6ASYw022957 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Wed, 30 Apr 2014 01:10:28 -0500 Received: from THEMADHATTER (10.242.181.54) by smarthost.fisglobal.com (10.132.206.192) with Microsoft SMTP Server id 14.3.174.1; Wed, 30 Apr 2014 01:10:25 -0500 From: Sender: Devin Teske To: , "'Devin Teske'" , , , , References: <201404300559.s3U5xWxg065241@svn.freebsd.org> <53609354.6080305@delphij.net> In-Reply-To: <53609354.6080305@delphij.net> Subject: RE: svn commit: r265130 - in stable/4/sys: dev/arcmsr modules/arcmsr Date: Tue, 29 Apr 2014 23:10:03 -0700 Message-ID: <010501cf643a$d4c82140$7e5863c0$@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQGHfn9YgV4OGErMHKNvv9V6BWenbgFHm3asm687ZuA= Content-Language: en-us X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.11.96, 1.0.14, 0.0.0000 definitions=2014-04-30_01:2014-04-30,2014-04-30,1970-01-01 signatures=0 Cc: 'Devin Teske' X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2014 06:10:35 -0000 > -----Original Message----- > From: Xin Li [mailto:delphij@delphij.net] > Sent: Tuesday, April 29, 2014 11:08 PM > To: Devin Teske; src-committers@freebsd.org; svn-src-all@freebsd.org; svn- > src-stable@freebsd.org; svn-src-stable-other@freebsd.org > Subject: Re: svn commit: r265130 - in stable/4/sys: dev/arcmsr > modules/arcmsr > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > On 4/29/14, 10:59 PM, Devin Teske wrote: > > changeset/base/265130 > > > > Log: Add tested known good version of Areca SATA RAID driver > > (arcmsr) working in stable/4. An MFC of slightly later code than that > > of r144411 (scottl). This is a direct commit to stable/4. > > > > Obtained from: Erich Chen > > Hrm I think stable/4 is mostly frozen :) > > Since you have been there, I think it would be a good idea to merge the > manual page too, for completeness... > > Cheers, > A most excellent idea! Thanks for the suggestion. -- Devin _____________ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. From owner-svn-src-stable@FreeBSD.ORG Wed Apr 30 06:27:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23982DA4; Wed, 30 Apr 2014 06:27:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F26914A7; Wed, 30 Apr 2014 06:27:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3U6RNI1077508; Wed, 30 Apr 2014 06:27:23 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3U6RNJ9077506; Wed, 30 Apr 2014 06:27:23 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201404300627.s3U6RNJ9077506@svn.freebsd.org> From: Devin Teske Date: Wed, 30 Apr 2014 06:27:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org Subject: svn commit: r265133 - stable/4/share/man/man4 X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2014 06:27:24 -0000 Author: dteske Date: Wed Apr 30 06:27:23 2014 New Revision: 265133 URL: http://svnweb.freebsd.org/changeset/base/265133 Log: MFH r144419 (scottl): Add a manual page for the arcmsr driver. Added: stable/4/share/man/man4/arcmsr.4 - copied unchanged from r144419, head/share/man/man4/arcmsr.4 Modified: stable/4/share/man/man4/Makefile Directory Properties: stable/4/ (props changed) Modified: stable/4/share/man/man4/Makefile ============================================================================== --- stable/4/share/man/man4/Makefile Wed Apr 30 06:20:48 2014 (r265132) +++ stable/4/share/man/man4/Makefile Wed Apr 30 06:27:23 2014 (r265133) @@ -11,6 +11,7 @@ MAN= aac.4 \ ahd.4 \ amd.4 \ amr.4 \ + arcmsr.4 \ an.4 \ ata.4 \ atapicam.4 \ Copied: stable/4/share/man/man4/arcmsr.4 (from r144419, head/share/man/man4/arcmsr.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/4/share/man/man4/arcmsr.4 Wed Apr 30 06:27:23 2014 (r265133, copy of r144419, head/share/man/man4/arcmsr.4) @@ -0,0 +1,107 @@ +.\" Copyright (c) 2005 Scott Long +.\" All rights reserved. +.\" +.\" 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. +.\" +.\" $FreeBSD$ +.\" +.Dd March 31, 2005 +.Dt ARCMSR 4 +.Os +.Sh NAME +.Nm arcmsr +.Nd Areca SATA II RAID Controller driver +.Sh SYNOPSIS +.Cd "device arcmsr" +.Cd "device pci" +.Cd "device scbus" +.Cd "device da" +.Sh DESCRIPTION +The +.Nm +driver provides support for the Areca ARC-11xx and ARC-12xx series of SATA II +RAID controllers. +These controllers feature RAID-0, 1, 3, 5, 6, and 10 and +JBOD acceleration for up to 16 SATA drives. +Raid level and stripe level +migration, online capacity expansion, hot insertion/removal, automatic failover +and rebuild, and SMART are also supported. +Access to the arrays is provided +via the SCSI CAM +.Pa /dev/da? +device nodes. +A management interface is also present via the +.Pa /dev/arcmsr? +device node. Management tools for i386 and amd64 are available from Areca. +.Sh HARDWARE +The following card are supported at this time: +.Pp +.Bl -bullet -compact +.It +ARC-1110 +.It +ARC-1120 +.It +ARC-1130 +.It +ARC-1160 +.It +ARC-1130-ML +.It +ARC-1160-ML +.It +ARC-1210 +.It +ARC-1220 +.It +ARC-1230 +.It +ARC-1260 +.It +ARC-1230-ML +.It +ARC-1260-ML +.El +.Sh FILES +.Bl -tag -width ".Pa /boot/kernel/arcmsr.ko" -compact +.It Pa /dev/da? +Array block device +.It Pa /dev/arcmsr? +Management interface +.It Pa /boot/kernel/arcmsr.ko +Loadable module +.El +.Sh SEE ALSO +.Xr da 4 , +.Xr scbus 4 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 5.4 . +.Sh AUTHORS +The driver was written by +.An Erich Chen Aq erich@areca.com.tw . +.Sh BUGS +The driver has been tested on i386 and amd64. +It likely requires additional +work to function on big-endian architectures. From owner-svn-src-stable@FreeBSD.ORG Wed Apr 30 09:53:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60B2CD8D; Wed, 30 Apr 2014 09:53:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 410B0199A; Wed, 30 Apr 2014 09:53:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3U9rFtH061864; Wed, 30 Apr 2014 09:53:15 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3U9rEte061861; Wed, 30 Apr 2014 09:53:14 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201404300953.s3U9rEte061861@svn.freebsd.org> From: Steven Hartland Date: Wed, 30 Apr 2014 09:53:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r265141 - in stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2014 09:53:15 -0000 Author: smh Date: Wed Apr 30 09:53:14 2014 New Revision: 265141 URL: http://svnweb.freebsd.org/changeset/base/265141 Log: MFC r265046 Fix ZIO reordering issue which could cause data loss / corruption. Sponsored by: Multiplay Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Wed Apr 30 08:51:30 2014 (r265140) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Wed Apr 30 09:53:14 2014 (r265141) @@ -350,7 +350,7 @@ typedef struct zio_transform { struct zio_transform *zt_next; } zio_transform_t; -typedef int zio_pipe_stage_t(zio_t *zio); +typedef int zio_pipe_stage_t(zio_t **ziop); /* * The io_reexecute flags are distinct from io_flags because the child must Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Wed Apr 30 08:51:30 2014 (r265140) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Wed Apr 30 09:53:14 2014 (r265141) @@ -1009,8 +1009,9 @@ zio_shrink(zio_t *zio, uint64_t size) */ static int -zio_read_bp_init(zio_t *zio) +zio_read_bp_init(zio_t **ziop) { + zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; if (BP_GET_COMPRESS(bp) != ZIO_COMPRESS_OFF && @@ -1035,8 +1036,9 @@ zio_read_bp_init(zio_t *zio) } static int -zio_write_bp_init(zio_t *zio) +zio_write_bp_init(zio_t **ziop) { + zio_t *zio = *ziop; spa_t *spa = zio->io_spa; zio_prop_t *zp = &zio->io_prop; enum zio_compress compress = zp->zp_compress; @@ -1186,8 +1188,9 @@ zio_write_bp_init(zio_t *zio) } static int -zio_free_bp_init(zio_t *zio) +zio_free_bp_init(zio_t **ziop) { + zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; if (zio->io_child_type == ZIO_CHILD_LOGICAL) { @@ -1270,8 +1273,10 @@ zio_taskq_member(zio_t *zio, zio_taskq_t } static int -zio_issue_async(zio_t *zio) +zio_issue_async(zio_t **ziop) { + zio_t *zio = *ziop; + zio_taskq_dispatch(zio, ZIO_TASKQ_ISSUE, B_FALSE); return (ZIO_PIPELINE_STOP); @@ -1339,7 +1344,7 @@ zio_execute(zio_t *zio) } zio->io_stage = stage; - rv = zio_pipeline[highbit(stage) - 1](zio); + rv = zio_pipeline[highbit(stage) - 1](&zio); if (rv == ZIO_PIPELINE_STOP) return; @@ -1773,8 +1778,9 @@ zio_gang_tree_issue(zio_t *pio, zio_gang } static int -zio_gang_assemble(zio_t *zio) +zio_gang_assemble(zio_t **ziop) { + zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; ASSERT(BP_IS_GANG(bp) && zio->io_gang_leader == NULL); @@ -1788,8 +1794,9 @@ zio_gang_assemble(zio_t *zio) } static int -zio_gang_issue(zio_t *zio) +zio_gang_issue(zio_t **ziop) { + zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; if (zio_wait_for_children(zio, ZIO_CHILD_GANG, ZIO_WAIT_DONE)) @@ -1923,8 +1930,9 @@ zio_write_gang_block(zio_t *pio) * writes) and as a result is mutually exclusive with dedup. */ static int -zio_nop_write(zio_t *zio) +zio_nop_write(zio_t **ziop) { + zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; blkptr_t *bp_orig = &zio->io_bp_orig; zio_prop_t *zp = &zio->io_prop; @@ -1995,8 +2003,9 @@ zio_ddt_child_read_done(zio_t *zio) } static int -zio_ddt_read_start(zio_t *zio) +zio_ddt_read_start(zio_t **ziop) { + zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; ASSERT(BP_GET_DEDUP(bp)); @@ -2038,8 +2047,9 @@ zio_ddt_read_start(zio_t *zio) } static int -zio_ddt_read_done(zio_t *zio) +zio_ddt_read_done(zio_t **ziop) { + zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; if (zio_wait_for_children(zio, ZIO_CHILD_DDT, ZIO_WAIT_DONE)) @@ -2207,8 +2217,9 @@ zio_ddt_ditto_write_done(zio_t *zio) } static int -zio_ddt_write(zio_t *zio) +zio_ddt_write(zio_t **ziop) { + zio_t *zio = *ziop; spa_t *spa = zio->io_spa; blkptr_t *bp = zio->io_bp; uint64_t txg = zio->io_txg; @@ -2319,8 +2330,9 @@ zio_ddt_write(zio_t *zio) ddt_entry_t *freedde; /* for debugging */ static int -zio_ddt_free(zio_t *zio) +zio_ddt_free(zio_t **ziop) { + zio_t *zio = *ziop; spa_t *spa = zio->io_spa; blkptr_t *bp = zio->io_bp; ddt_t *ddt = ddt_select(spa, bp); @@ -2345,8 +2357,9 @@ zio_ddt_free(zio_t *zio) * ========================================================================== */ static int -zio_dva_allocate(zio_t *zio) +zio_dva_allocate(zio_t **ziop) { + zio_t *zio = *ziop; spa_t *spa = zio->io_spa; metaslab_class_t *mc = spa_normal_class(spa); blkptr_t *bp = zio->io_bp; @@ -2388,16 +2401,19 @@ zio_dva_allocate(zio_t *zio) } static int -zio_dva_free(zio_t *zio) +zio_dva_free(zio_t **ziop) { + zio_t *zio = *ziop; + metaslab_free(zio->io_spa, zio->io_bp, zio->io_txg, B_FALSE); return (ZIO_PIPELINE_CONTINUE); } static int -zio_dva_claim(zio_t *zio) +zio_dva_claim(zio_t **ziop) { + zio_t *zio = *ziop; int error; error = metaslab_claim(zio->io_spa, zio->io_bp, zio->io_txg); @@ -2491,8 +2507,9 @@ zio_free_zil(spa_t *spa, uint64_t txg, b * ========================================================================== */ static int -zio_vdev_io_start(zio_t *zio) +zio_vdev_io_start(zio_t **ziop) { + zio_t *zio = *ziop; vdev_t *vd = zio->io_vd; uint64_t align; spa_t *spa = zio->io_spa; @@ -2586,6 +2603,7 @@ zio_vdev_io_start(zio_t *zio) if ((zio = vdev_queue_io(zio)) == NULL) return (ZIO_PIPELINE_STOP); + *ziop = zio; if (!vdev_accessible(vd, zio)) { zio->io_error = SET_ERROR(ENXIO); @@ -2609,8 +2627,9 @@ zio_vdev_io_start(zio_t *zio) } static int -zio_vdev_io_done(zio_t *zio) +zio_vdev_io_done(zio_t **ziop) { + zio_t *zio = *ziop; vdev_t *vd = zio->io_vd; vdev_ops_t *ops = vd ? vd->vdev_ops : &vdev_mirror_ops; boolean_t unexpected_error = B_FALSE; @@ -2684,8 +2703,9 @@ zio_vsd_default_cksum_report(zio_t *zio, } static int -zio_vdev_io_assess(zio_t *zio) +zio_vdev_io_assess(zio_t **ziop) { + zio_t *zio = *ziop; vdev_t *vd = zio->io_vd; if (zio_wait_for_children(zio, ZIO_CHILD_VDEV, ZIO_WAIT_DONE)) @@ -2798,8 +2818,9 @@ zio_vdev_io_bypass(zio_t *zio) * ========================================================================== */ static int -zio_checksum_generate(zio_t *zio) +zio_checksum_generate(zio_t **ziop) { + zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; enum zio_checksum checksum; @@ -2829,8 +2850,9 @@ zio_checksum_generate(zio_t *zio) } static int -zio_checksum_verify(zio_t *zio) +zio_checksum_verify(zio_t **ziop) { + zio_t *zio = *ziop; zio_bad_cksum_t info; blkptr_t *bp = zio->io_bp; int error; @@ -2901,8 +2923,9 @@ zio_worst_error(int e1, int e2) * ========================================================================== */ static int -zio_ready(zio_t *zio) +zio_ready(zio_t **ziop) { + zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; zio_t *pio, *pio_next; @@ -2959,8 +2982,9 @@ zio_ready(zio_t *zio) } static int -zio_done(zio_t *zio) +zio_done(zio_t **ziop) { + zio_t *zio = *ziop; spa_t *spa = zio->io_spa; zio_t *lio = zio->io_logical; blkptr_t *bp = zio->io_bp; From owner-svn-src-stable@FreeBSD.ORG Wed Apr 30 09:55:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 32767EEE; Wed, 30 Apr 2014 09:55:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F86F19B3; Wed, 30 Apr 2014 09:55:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3U9tjQh062257; Wed, 30 Apr 2014 09:55:45 GMT (envelope-from erwin@svn.freebsd.org) Received: (from erwin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3U9tjRa062256; Wed, 30 Apr 2014 09:55:45 GMT (envelope-from erwin@svn.freebsd.org) Message-Id: <201404300955.s3U9tjRa062256@svn.freebsd.org> From: Erwin Lansing Date: Wed, 30 Apr 2014 09:55:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265142 - stable/9/etc/namedb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2014 09:55:46 -0000 Author: erwin Date: Wed Apr 30 09:55:45 2014 New Revision: 265142 URL: http://svnweb.freebsd.org/changeset/base/265142 Log: Pick up the 2014032601 update which adds an IPv6 address for C. Note that this is a direct commit to stable/9 as this file is no longer in HEAD. Sponsored by: DK Hostmaster A/S Modified: stable/9/etc/namedb/named.root Modified: stable/9/etc/namedb/named.root ============================================================================== --- stable/9/etc/namedb/named.root Wed Apr 30 09:53:14 2014 (r265141) +++ stable/9/etc/namedb/named.root Wed Apr 30 09:55:45 2014 (r265142) @@ -13,8 +13,8 @@ ; on server FTP.INTERNIC.NET ; -OR- RS.INTERNIC.NET ; -; last update: Jan 3, 2013 -; related version of root zone: 2013010300 +; last update: Mar 26, 2014 +; related version of root zone: 2014032601 ; ; formerly NS.INTERNIC.NET ; @@ -31,6 +31,7 @@ B.ROOT-SERVERS.NET. 3600000 A ; . 3600000 NS C.ROOT-SERVERS.NET. C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12 +C.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2::C ; ; FORMERLY TERP.UMD.EDU ; From owner-svn-src-stable@FreeBSD.ORG Wed Apr 30 09:55:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20990AF; Wed, 30 Apr 2014 09:55:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DACB19B6; Wed, 30 Apr 2014 09:55:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3U9toX2062308; Wed, 30 Apr 2014 09:55:50 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3U9toWL062304; Wed, 30 Apr 2014 09:55:50 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201404300955.s3U9toWL062304@svn.freebsd.org> From: Steven Hartland Date: Wed, 30 Apr 2014 09:55:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265143 - in stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2014 09:55:51 -0000 Author: smh Date: Wed Apr 30 09:55:50 2014 New Revision: 265143 URL: http://svnweb.freebsd.org/changeset/base/265143 Log: MFC r265046 Fix ZIO reordering issue which could cause data loss / corruption. Sponsored by: Multiplay Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Wed Apr 30 09:55:45 2014 (r265142) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Wed Apr 30 09:55:50 2014 (r265143) @@ -349,7 +349,7 @@ typedef struct zio_transform { struct zio_transform *zt_next; } zio_transform_t; -typedef int zio_pipe_stage_t(zio_t *zio); +typedef int zio_pipe_stage_t(zio_t **ziop); /* * The io_reexecute flags are distinct from io_flags because the child must Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Wed Apr 30 09:55:45 2014 (r265142) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Wed Apr 30 09:55:50 2014 (r265143) @@ -1022,8 +1022,9 @@ zio_shrink(zio_t *zio, uint64_t size) */ static int -zio_read_bp_init(zio_t *zio) +zio_read_bp_init(zio_t **ziop) { + zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; if (BP_GET_COMPRESS(bp) != ZIO_COMPRESS_OFF && @@ -1048,8 +1049,9 @@ zio_read_bp_init(zio_t *zio) } static int -zio_write_bp_init(zio_t *zio) +zio_write_bp_init(zio_t **ziop) { + zio_t *zio = *ziop; spa_t *spa = zio->io_spa; zio_prop_t *zp = &zio->io_prop; enum zio_compress compress = zp->zp_compress; @@ -1199,8 +1201,9 @@ zio_write_bp_init(zio_t *zio) } static int -zio_free_bp_init(zio_t *zio) +zio_free_bp_init(zio_t **ziop) { + zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; if (zio->io_child_type == ZIO_CHILD_LOGICAL) { @@ -1283,8 +1286,10 @@ zio_taskq_member(zio_t *zio, zio_taskq_t } static int -zio_issue_async(zio_t *zio) +zio_issue_async(zio_t **ziop) { + zio_t *zio = *ziop; + zio_taskq_dispatch(zio, ZIO_TASKQ_ISSUE, B_FALSE); return (ZIO_PIPELINE_STOP); @@ -1352,7 +1357,7 @@ zio_execute(zio_t *zio) } zio->io_stage = stage; - rv = zio_pipeline[highbit(stage) - 1](zio); + rv = zio_pipeline[highbit(stage) - 1](&zio); if (rv == ZIO_PIPELINE_STOP) return; @@ -1786,8 +1791,9 @@ zio_gang_tree_issue(zio_t *pio, zio_gang } static int -zio_gang_assemble(zio_t *zio) +zio_gang_assemble(zio_t **ziop) { + zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; ASSERT(BP_IS_GANG(bp) && zio->io_gang_leader == NULL); @@ -1801,8 +1807,9 @@ zio_gang_assemble(zio_t *zio) } static int -zio_gang_issue(zio_t *zio) +zio_gang_issue(zio_t **ziop) { + zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; if (zio_wait_for_children(zio, ZIO_CHILD_GANG, ZIO_WAIT_DONE)) @@ -1936,8 +1943,9 @@ zio_write_gang_block(zio_t *pio) * writes) and as a result is mutually exclusive with dedup. */ static int -zio_nop_write(zio_t *zio) +zio_nop_write(zio_t **ziop) { + zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; blkptr_t *bp_orig = &zio->io_bp_orig; zio_prop_t *zp = &zio->io_prop; @@ -2008,8 +2016,9 @@ zio_ddt_child_read_done(zio_t *zio) } static int -zio_ddt_read_start(zio_t *zio) +zio_ddt_read_start(zio_t **ziop) { + zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; ASSERT(BP_GET_DEDUP(bp)); @@ -2051,8 +2060,9 @@ zio_ddt_read_start(zio_t *zio) } static int -zio_ddt_read_done(zio_t *zio) +zio_ddt_read_done(zio_t **ziop) { + zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; if (zio_wait_for_children(zio, ZIO_CHILD_DDT, ZIO_WAIT_DONE)) @@ -2220,8 +2230,9 @@ zio_ddt_ditto_write_done(zio_t *zio) } static int -zio_ddt_write(zio_t *zio) +zio_ddt_write(zio_t **ziop) { + zio_t *zio = *ziop; spa_t *spa = zio->io_spa; blkptr_t *bp = zio->io_bp; uint64_t txg = zio->io_txg; @@ -2332,8 +2343,9 @@ zio_ddt_write(zio_t *zio) ddt_entry_t *freedde; /* for debugging */ static int -zio_ddt_free(zio_t *zio) +zio_ddt_free(zio_t **ziop) { + zio_t *zio = *ziop; spa_t *spa = zio->io_spa; blkptr_t *bp = zio->io_bp; ddt_t *ddt = ddt_select(spa, bp); @@ -2358,8 +2370,9 @@ zio_ddt_free(zio_t *zio) * ========================================================================== */ static int -zio_dva_allocate(zio_t *zio) +zio_dva_allocate(zio_t **ziop) { + zio_t *zio = *ziop; spa_t *spa = zio->io_spa; metaslab_class_t *mc = spa_normal_class(spa); blkptr_t *bp = zio->io_bp; @@ -2401,16 +2414,19 @@ zio_dva_allocate(zio_t *zio) } static int -zio_dva_free(zio_t *zio) +zio_dva_free(zio_t **ziop) { + zio_t *zio = *ziop; + metaslab_free(zio->io_spa, zio->io_bp, zio->io_txg, B_FALSE); return (ZIO_PIPELINE_CONTINUE); } static int -zio_dva_claim(zio_t *zio) +zio_dva_claim(zio_t **ziop) { + zio_t *zio = *ziop; int error; error = metaslab_claim(zio->io_spa, zio->io_bp, zio->io_txg); @@ -2504,8 +2520,9 @@ zio_free_zil(spa_t *spa, uint64_t txg, b * ========================================================================== */ static int -zio_vdev_io_start(zio_t *zio) +zio_vdev_io_start(zio_t **ziop) { + zio_t *zio = *ziop; vdev_t *vd = zio->io_vd; uint64_t align; spa_t *spa = zio->io_spa; @@ -2599,6 +2616,7 @@ zio_vdev_io_start(zio_t *zio) if ((zio = vdev_queue_io(zio)) == NULL) return (ZIO_PIPELINE_STOP); + *ziop = zio; if (!vdev_accessible(vd, zio)) { zio->io_error = SET_ERROR(ENXIO); @@ -2622,8 +2640,9 @@ zio_vdev_io_start(zio_t *zio) } static int -zio_vdev_io_done(zio_t *zio) +zio_vdev_io_done(zio_t **ziop) { + zio_t *zio = *ziop; vdev_t *vd = zio->io_vd; vdev_ops_t *ops = vd ? vd->vdev_ops : &vdev_mirror_ops; boolean_t unexpected_error = B_FALSE; @@ -2697,8 +2716,9 @@ zio_vsd_default_cksum_report(zio_t *zio, } static int -zio_vdev_io_assess(zio_t *zio) +zio_vdev_io_assess(zio_t **ziop) { + zio_t *zio = *ziop; vdev_t *vd = zio->io_vd; if (zio_wait_for_children(zio, ZIO_CHILD_VDEV, ZIO_WAIT_DONE)) @@ -2811,8 +2831,9 @@ zio_vdev_io_bypass(zio_t *zio) * ========================================================================== */ static int -zio_checksum_generate(zio_t *zio) +zio_checksum_generate(zio_t **ziop) { + zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; enum zio_checksum checksum; @@ -2842,8 +2863,9 @@ zio_checksum_generate(zio_t *zio) } static int -zio_checksum_verify(zio_t *zio) +zio_checksum_verify(zio_t **ziop) { + zio_t *zio = *ziop; zio_bad_cksum_t info; blkptr_t *bp = zio->io_bp; int error; @@ -2914,8 +2936,9 @@ zio_worst_error(int e1, int e2) * ========================================================================== */ static int -zio_ready(zio_t *zio) +zio_ready(zio_t **ziop) { + zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; zio_t *pio, *pio_next; @@ -2972,8 +2995,9 @@ zio_ready(zio_t *zio) } static int -zio_done(zio_t *zio) +zio_done(zio_t **ziop) { + zio_t *zio = *ziop; spa_t *spa = zio->io_spa; zio_t *lio = zio->io_logical; blkptr_t *bp = zio->io_bp; From owner-svn-src-stable@FreeBSD.ORG Wed Apr 30 09:57:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 59F4F210; Wed, 30 Apr 2014 09:57:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 446EF19D2; Wed, 30 Apr 2014 09:57:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3U9vd2x062614; Wed, 30 Apr 2014 09:57:39 GMT (envelope-from erwin@svn.freebsd.org) Received: (from erwin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3U9vd1i062613; Wed, 30 Apr 2014 09:57:39 GMT (envelope-from erwin@svn.freebsd.org) Message-Id: <201404300957.s3U9vd1i062613@svn.freebsd.org> From: Erwin Lansing Date: Wed, 30 Apr 2014 09:57:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r265144 - stable/8/etc/namedb X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2014 09:57:39 -0000 Author: erwin Date: Wed Apr 30 09:57:38 2014 New Revision: 265144 URL: http://svnweb.freebsd.org/changeset/base/265144 Log: Pick up the 2014032601 update which adds an IPv6 address for C. Note that this is a direct commit to stable/8 as this file is no longer in HEAD. Sponsored by: DK Hostmaster A/S Modified: stable/8/etc/namedb/named.root Modified: stable/8/etc/namedb/named.root ============================================================================== --- stable/8/etc/namedb/named.root Wed Apr 30 09:55:50 2014 (r265143) +++ stable/8/etc/namedb/named.root Wed Apr 30 09:57:38 2014 (r265144) @@ -13,8 +13,8 @@ ; on server FTP.INTERNIC.NET ; -OR- RS.INTERNIC.NET ; -; last update: Jan 3, 2013 -; related version of root zone: 2013010300 +; last update: Mar 26, 2014 +; related version of root zone: 2014032601 ; ; formerly NS.INTERNIC.NET ; @@ -31,6 +31,7 @@ B.ROOT-SERVERS.NET. 3600000 A ; . 3600000 NS C.ROOT-SERVERS.NET. C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12 +C.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2::C ; ; FORMERLY TERP.UMD.EDU ; From owner-svn-src-stable@FreeBSD.ORG Wed Apr 30 11:06:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F071E93; Wed, 30 Apr 2014 11:06:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F6C31166; Wed, 30 Apr 2014 11:06:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3UB63gR091475; Wed, 30 Apr 2014 11:06:03 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3UB62tJ091473; Wed, 30 Apr 2014 11:06:02 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201404301106.s3UB62tJ091473@svn.freebsd.org> From: Steven Hartland Date: Wed, 30 Apr 2014 11:06:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265146 - in stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2014 11:06:03 -0000 Author: smh Date: Wed Apr 30 11:06:02 2014 New Revision: 265146 URL: http://svnweb.freebsd.org/changeset/base/265146 Log: MFC r265046 Fix ZIO reordering issue which could cause data loss / corruption. Sponsored by: Multiplay Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Wed Apr 30 09:58:28 2014 (r265145) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Wed Apr 30 11:06:02 2014 (r265146) @@ -350,7 +350,7 @@ typedef struct zio_transform { struct zio_transform *zt_next; } zio_transform_t; -typedef int zio_pipe_stage_t(zio_t *zio); +typedef int zio_pipe_stage_t(zio_t **ziop); /* * The io_reexecute flags are distinct from io_flags because the child must Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Wed Apr 30 09:58:28 2014 (r265145) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Wed Apr 30 11:06:02 2014 (r265146) @@ -1013,8 +1013,9 @@ zio_shrink(zio_t *zio, uint64_t size) */ static int -zio_read_bp_init(zio_t *zio) +zio_read_bp_init(zio_t **ziop) { + zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; if (BP_GET_COMPRESS(bp) != ZIO_COMPRESS_OFF && @@ -1039,8 +1040,9 @@ zio_read_bp_init(zio_t *zio) } static int -zio_write_bp_init(zio_t *zio) +zio_write_bp_init(zio_t **ziop) { + zio_t *zio = *ziop; spa_t *spa = zio->io_spa; zio_prop_t *zp = &zio->io_prop; enum zio_compress compress = zp->zp_compress; @@ -1190,8 +1192,9 @@ zio_write_bp_init(zio_t *zio) } static int -zio_free_bp_init(zio_t *zio) +zio_free_bp_init(zio_t **ziop) { + zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; if (zio->io_child_type == ZIO_CHILD_LOGICAL) { @@ -1274,8 +1277,10 @@ zio_taskq_member(zio_t *zio, zio_taskq_t } static int -zio_issue_async(zio_t *zio) +zio_issue_async(zio_t **ziop) { + zio_t *zio = *ziop; + zio_taskq_dispatch(zio, ZIO_TASKQ_ISSUE, B_FALSE); return (ZIO_PIPELINE_STOP); @@ -1343,7 +1348,7 @@ zio_execute(zio_t *zio) } zio->io_stage = stage; - rv = zio_pipeline[highbit(stage) - 1](zio); + rv = zio_pipeline[highbit(stage) - 1](&zio); if (rv == ZIO_PIPELINE_STOP) return; @@ -1777,8 +1782,9 @@ zio_gang_tree_issue(zio_t *pio, zio_gang } static int -zio_gang_assemble(zio_t *zio) +zio_gang_assemble(zio_t **ziop) { + zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; ASSERT(BP_IS_GANG(bp) && zio->io_gang_leader == NULL); @@ -1792,8 +1798,9 @@ zio_gang_assemble(zio_t *zio) } static int -zio_gang_issue(zio_t *zio) +zio_gang_issue(zio_t **ziop) { + zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; if (zio_wait_for_children(zio, ZIO_CHILD_GANG, ZIO_WAIT_DONE)) @@ -1927,8 +1934,9 @@ zio_write_gang_block(zio_t *pio) * writes) and as a result is mutually exclusive with dedup. */ static int -zio_nop_write(zio_t *zio) +zio_nop_write(zio_t **ziop) { + zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; blkptr_t *bp_orig = &zio->io_bp_orig; zio_prop_t *zp = &zio->io_prop; @@ -1999,8 +2007,9 @@ zio_ddt_child_read_done(zio_t *zio) } static int -zio_ddt_read_start(zio_t *zio) +zio_ddt_read_start(zio_t **ziop) { + zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; ASSERT(BP_GET_DEDUP(bp)); @@ -2042,8 +2051,9 @@ zio_ddt_read_start(zio_t *zio) } static int -zio_ddt_read_done(zio_t *zio) +zio_ddt_read_done(zio_t **ziop) { + zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; if (zio_wait_for_children(zio, ZIO_CHILD_DDT, ZIO_WAIT_DONE)) @@ -2211,8 +2221,9 @@ zio_ddt_ditto_write_done(zio_t *zio) } static int -zio_ddt_write(zio_t *zio) +zio_ddt_write(zio_t **ziop) { + zio_t *zio = *ziop; spa_t *spa = zio->io_spa; blkptr_t *bp = zio->io_bp; uint64_t txg = zio->io_txg; @@ -2323,8 +2334,9 @@ zio_ddt_write(zio_t *zio) ddt_entry_t *freedde; /* for debugging */ static int -zio_ddt_free(zio_t *zio) +zio_ddt_free(zio_t **ziop) { + zio_t *zio = *ziop; spa_t *spa = zio->io_spa; blkptr_t *bp = zio->io_bp; ddt_t *ddt = ddt_select(spa, bp); @@ -2349,8 +2361,9 @@ zio_ddt_free(zio_t *zio) * ========================================================================== */ static int -zio_dva_allocate(zio_t *zio) +zio_dva_allocate(zio_t **ziop) { + zio_t *zio = *ziop; spa_t *spa = zio->io_spa; metaslab_class_t *mc = spa_normal_class(spa); blkptr_t *bp = zio->io_bp; @@ -2392,16 +2405,19 @@ zio_dva_allocate(zio_t *zio) } static int -zio_dva_free(zio_t *zio) +zio_dva_free(zio_t **ziop) { + zio_t *zio = *ziop; + metaslab_free(zio->io_spa, zio->io_bp, zio->io_txg, B_FALSE); return (ZIO_PIPELINE_CONTINUE); } static int -zio_dva_claim(zio_t *zio) +zio_dva_claim(zio_t **ziop) { + zio_t *zio = *ziop; int error; error = metaslab_claim(zio->io_spa, zio->io_bp, zio->io_txg); @@ -2495,8 +2511,9 @@ zio_free_zil(spa_t *spa, uint64_t txg, b * ========================================================================== */ static int -zio_vdev_io_start(zio_t *zio) +zio_vdev_io_start(zio_t **ziop) { + zio_t *zio = *ziop; vdev_t *vd = zio->io_vd; uint64_t align; spa_t *spa = zio->io_spa; @@ -2590,6 +2607,7 @@ zio_vdev_io_start(zio_t *zio) if ((zio = vdev_queue_io(zio)) == NULL) return (ZIO_PIPELINE_STOP); + *ziop = zio; if (!vdev_accessible(vd, zio)) { zio->io_error = SET_ERROR(ENXIO); @@ -2613,8 +2631,9 @@ zio_vdev_io_start(zio_t *zio) } static int -zio_vdev_io_done(zio_t *zio) +zio_vdev_io_done(zio_t **ziop) { + zio_t *zio = *ziop; vdev_t *vd = zio->io_vd; vdev_ops_t *ops = vd ? vd->vdev_ops : &vdev_mirror_ops; boolean_t unexpected_error = B_FALSE; @@ -2688,8 +2707,9 @@ zio_vsd_default_cksum_report(zio_t *zio, } static int -zio_vdev_io_assess(zio_t *zio) +zio_vdev_io_assess(zio_t **ziop) { + zio_t *zio = *ziop; vdev_t *vd = zio->io_vd; if (zio_wait_for_children(zio, ZIO_CHILD_VDEV, ZIO_WAIT_DONE)) @@ -2802,8 +2822,9 @@ zio_vdev_io_bypass(zio_t *zio) * ========================================================================== */ static int -zio_checksum_generate(zio_t *zio) +zio_checksum_generate(zio_t **ziop) { + zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; enum zio_checksum checksum; @@ -2833,8 +2854,9 @@ zio_checksum_generate(zio_t *zio) } static int -zio_checksum_verify(zio_t *zio) +zio_checksum_verify(zio_t **ziop) { + zio_t *zio = *ziop; zio_bad_cksum_t info; blkptr_t *bp = zio->io_bp; int error; @@ -2905,8 +2927,9 @@ zio_worst_error(int e1, int e2) * ========================================================================== */ static int -zio_ready(zio_t *zio) +zio_ready(zio_t **ziop) { + zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; zio_t *pio, *pio_next; @@ -2963,8 +2986,9 @@ zio_ready(zio_t *zio) } static int -zio_done(zio_t *zio) +zio_done(zio_t **ziop) { + zio_t *zio = *ziop; spa_t *spa = zio->io_spa; zio_t *lio = zio->io_logical; blkptr_t *bp = zio->io_bp; From owner-svn-src-stable@FreeBSD.ORG Wed Apr 30 14:09:29 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D8FCF22; Wed, 30 Apr 2014 14:09:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 384331664; Wed, 30 Apr 2014 14:09:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3UE9TcM064858; Wed, 30 Apr 2014 14:09:29 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3UE9RHd064846; Wed, 30 Apr 2014 14:09:27 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201404301409.s3UE9RHd064846@svn.freebsd.org> From: Marius Strobl Date: Wed, 30 Apr 2014 14:09:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r265147 - in stable/8/sys/cam: . ata scsi X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2014 14:09:29 -0000 Author: marius Date: Wed Apr 30 14:09:26 2014 New Revision: 265147 URL: http://svnweb.freebsd.org/changeset/base/265147 Log: MFC: r241028 Change queue overflow checks from DIAGNOSTIC+panic() to KASSERT() to make them enabled on HEAD by default. It is probably better to do single compare then hunt for unexpected memory corruption. MFC: r241444 Increase device CCB queue array size by CAM_RL_VALUES - 1 (4) elements. It is required to store extra recovery requests in case of bus resets. On ATA/SATA this fixes assertion panics on HEAD with INVARIANTS enabled or possible memory corruptions otherwise if timeout/reset happens when device CCB queue is already full. MFC: r249466 (partial), r249438, r249481, r250025 (partial) Remove multilevel freezing mechanism, implemented to handle specifics of the ATA/SATA error recovery, when post-reset recovery commands should be allocated when queues are already full of payload requests. Instead of removing frozen CCBs with specified range of priorities from the queue to provide free openings, use simple hack, allowing explicit CCBs over- allocation for requests with priority higher (numerically lower) then CAM_PRIORITY_OOB threshold. Simplify CCB allocation logic by removing SIM-level allocation queue. After that SIM-level queue manages only CCBs execution, while allocation logic is localized within each single device. MFC: r253958 Change CCB queue resize logic to be able safely handle overallocations: - (re)allocate queue space in power of 2 chunks with 64 elements minimum and never shrink it; with only 4/8 bytes per element size is insignificant. - automatically reallocate the queue to double size if it is overflowed. - if queue reallocation failed, store extra CCBs in unsorted TAILQ, fetching them back as soon as some queue element is freed. To free space in CCB for TAILQ linking, change highpowerq from keeping high-power CCBs to keeping devices frozen due to high-power CCBs. This encloses all pieces of queue resize logic inside of cam_queue.[ch], removing some not obvious duties from xpt_release_ccb(). Modified: stable/8/sys/cam/ata/ata_da.c stable/8/sys/cam/ata/ata_pmp.c stable/8/sys/cam/ata/ata_xpt.c stable/8/sys/cam/cam.h stable/8/sys/cam/cam_ccb.h stable/8/sys/cam/cam_periph.c stable/8/sys/cam/cam_periph.h stable/8/sys/cam/cam_queue.c stable/8/sys/cam/cam_queue.h stable/8/sys/cam/cam_xpt.c stable/8/sys/cam/cam_xpt_internal.h stable/8/sys/cam/cam_xpt_sim.h stable/8/sys/cam/scsi/scsi_cd.c stable/8/sys/cam/scsi/scsi_pass.c stable/8/sys/cam/scsi/scsi_xpt.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cam/ (props changed) Modified: stable/8/sys/cam/ata/ata_da.c ============================================================================== --- stable/8/sys/cam/ata/ata_da.c Wed Apr 30 11:06:02 2014 (r265146) +++ stable/8/sys/cam/ata/ata_da.c Wed Apr 30 14:09:26 2014 (r265147) @@ -978,8 +978,6 @@ adaasync(void *callback_arg, u_int32_t c else break; cam_periph_acquire(periph); - cam_freeze_devq_arg(periph->path, - RELSIM_RELEASE_RUNLEVEL, CAM_RL_DEV + 1); xpt_schedule(periph, CAM_PRIORITY_DEV); } default: @@ -1275,15 +1273,11 @@ adaregister(struct cam_periph *periph, v cgd->ident_data.support.command1 & ATA_SUPPORT_LOOKAHEAD) { softc->state = ADA_STATE_RAHEAD; cam_periph_acquire(periph); - cam_freeze_devq_arg(periph->path, - RELSIM_RELEASE_RUNLEVEL, CAM_RL_DEV + 1); xpt_schedule(periph, CAM_PRIORITY_DEV); } else if (ADA_WC >= 0 && cgd->ident_data.support.command1 & ATA_SUPPORT_WRITECACHE) { softc->state = ADA_STATE_WCACHE; cam_periph_acquire(periph); - cam_freeze_devq_arg(periph->path, - RELSIM_RELEASE_RUNLEVEL, CAM_RL_DEV + 1); xpt_schedule(periph, CAM_PRIORITY_DEV); } else softc->state = ADA_STATE_NORMAL; @@ -1567,8 +1561,6 @@ out: if (softc->flags & ADA_FLAG_PACK_INVALID) { softc->state = ADA_STATE_NORMAL; xpt_release_ccb(start_ccb); - cam_release_devq(periph->path, - RELSIM_RELEASE_RUNLEVEL, 0, CAM_RL_DEV + 1, FALSE); adaschedule(periph); cam_periph_release_locked(periph); return; @@ -1592,6 +1584,7 @@ out: ATA_SF_ENAB_WCACHE : ATA_SF_DIS_WCACHE, 0, 0); start_ccb->ccb_h.ccb_state = ADA_CCB_WCACHE; } + start_ccb->ccb_h.flags |= CAM_DEV_QFREEZE; xpt_action(start_ccb); break; } @@ -1604,11 +1597,13 @@ adadone(struct cam_periph *periph, union struct ada_softc *softc; struct ccb_ataio *ataio; struct ccb_getdev *cgd; + struct cam_path *path; softc = (struct ada_softc *)periph->softc; ataio = &done_ccb->ataio; + path = done_ccb->ccb_h.path; - CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("adadone\n")); + CAM_DEBUG(path, CAM_DEBUG_TRACE, ("adadone\n")); switch (ataio->ccb_h.ccb_state & ADA_CCB_TYPE_MASK) { case ADA_CCB_BUFFER_IO: @@ -1636,8 +1631,7 @@ adadone(struct cam_periph *periph, union * XXX See if this is really a media * XXX change first? */ - xpt_print(periph->path, - "Invalidating pack\n"); + xpt_print(path, "Invalidating pack\n"); softc->flags |= ADA_FLAG_PACK_INVALID; } bp->bio_error = error; @@ -1650,7 +1644,7 @@ adadone(struct cam_periph *periph, union bp->bio_flags |= BIO_ERROR; } if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(done_ccb->ccb_h.path, + cam_release_devq(path, /*relsim_flags*/0, /*reduction*/0, /*timeout*/0, @@ -1691,9 +1685,12 @@ adadone(struct cam_periph *periph, union { if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { if (adaerror(done_ccb, 0, 0) == ERESTART) { +out: + /* Drop freeze taken due to CAM_DEV_QFREEZE */ + cam_release_devq(path, 0, 0, 0, FALSE); return; } else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { - cam_release_devq(done_ccb->ccb_h.path, + cam_release_devq(path, /*relsim_flags*/0, /*reduction*/0, /*timeout*/0, @@ -1710,7 +1707,7 @@ adadone(struct cam_periph *periph, union * operation. */ cgd = (struct ccb_getdev *)done_ccb; - xpt_setup_ccb(&cgd->ccb_h, periph->path, CAM_PRIORITY_NORMAL); + xpt_setup_ccb(&cgd->ccb_h, path, CAM_PRIORITY_NORMAL); cgd->ccb_h.func_code = XPT_GDEV_TYPE; xpt_action((union ccb *)cgd); if (ADA_WC >= 0 && @@ -1718,12 +1715,12 @@ adadone(struct cam_periph *periph, union softc->state = ADA_STATE_WCACHE; xpt_release_ccb(done_ccb); xpt_schedule(periph, CAM_PRIORITY_DEV); - return; + goto out; } softc->state = ADA_STATE_NORMAL; xpt_release_ccb(done_ccb); - cam_release_devq(periph->path, - RELSIM_RELEASE_RUNLEVEL, 0, CAM_RL_DEV + 1, FALSE); + /* Drop freeze taken due to CAM_DEV_QFREEZE */ + cam_release_devq(path, 0, 0, 0, FALSE); adaschedule(periph); cam_periph_release_locked(periph); return; @@ -1732,9 +1729,9 @@ adadone(struct cam_periph *periph, union { if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { if (adaerror(done_ccb, 0, 0) == ERESTART) { - return; + goto out; } else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { - cam_release_devq(done_ccb->ccb_h.path, + cam_release_devq(path, /*relsim_flags*/0, /*reduction*/0, /*timeout*/0, @@ -1752,8 +1749,8 @@ adadone(struct cam_periph *periph, union * operation. */ xpt_release_ccb(done_ccb); - cam_release_devq(periph->path, - RELSIM_RELEASE_RUNLEVEL, 0, CAM_RL_DEV + 1, FALSE); + /* Drop freeze taken due to CAM_DEV_QFREEZE */ + cam_release_devq(path, 0, 0, 0, FALSE); adaschedule(periph); cam_periph_release_locked(periph); return; Modified: stable/8/sys/cam/ata/ata_pmp.c ============================================================================== --- stable/8/sys/cam/ata/ata_pmp.c Wed Apr 30 11:06:02 2014 (r265146) +++ stable/8/sys/cam/ata/ata_pmp.c Wed Apr 30 14:09:26 2014 (r265147) @@ -193,8 +193,7 @@ pmpfreeze(struct cam_periph *periph, int i, 0) == CAM_REQ_CMP) { softc->frozen |= (1 << i); xpt_acquire_device(dpath->device); - cam_freeze_devq_arg(dpath, - RELSIM_RELEASE_RUNLEVEL, CAM_RL_BUS + 1); + cam_freeze_devq(dpath); xpt_free_path(dpath); } } @@ -215,8 +214,7 @@ pmprelease(struct cam_periph *periph, in xpt_path_path_id(periph->path), i, 0) == CAM_REQ_CMP) { softc->frozen &= ~(1 << i); - cam_release_devq(dpath, - RELSIM_RELEASE_RUNLEVEL, 0, CAM_RL_BUS + 1, FALSE); + cam_release_devq(dpath, 0, 0, 0, FALSE); xpt_release_device(dpath->device); xpt_free_path(dpath); } Modified: stable/8/sys/cam/ata/ata_xpt.c ============================================================================== --- stable/8/sys/cam/ata/ata_xpt.c Wed Apr 30 11:06:02 2014 (r265146) +++ stable/8/sys/cam/ata/ata_xpt.c Wed Apr 30 14:09:26 2014 (r265147) @@ -250,12 +250,6 @@ proberegister(struct cam_periph *periph, return (status); } CAM_DEBUG(periph->path, CAM_DEBUG_PROBE, ("Probe started\n")); - - /* - * Ensure nobody slip in until probe finish. - */ - cam_freeze_devq_arg(periph->path, - RELSIM_RELEASE_RUNLEVEL, CAM_RL_XPT + 1); probeschedule(periph); return(CAM_REQ_CMP); } @@ -630,6 +624,7 @@ negotiate: default: panic("probestart: invalid action state 0x%x\n", softc->action); } + start_ccb->ccb_h.flags |= CAM_DEV_QFREEZE; xpt_action(start_ccb); } @@ -675,12 +670,15 @@ probedone(struct cam_periph *periph, uni cam_error_print(done_ccb, CAM_ESF_ALL, CAM_EPF_ALL); } - } else if (cam_periph_error(done_ccb, 0, 0, NULL) == ERESTART) + } else if (cam_periph_error(done_ccb, 0, 0, NULL) == ERESTART) { +out: + /* Drop freeze taken due to CAM_DEV_QFREEZE flag set. */ + cam_release_devq(path, 0, 0, 0, FALSE); return; + } if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { /* Don't wedge the queue */ - xpt_release_devq(done_ccb->ccb_h.path, /*count*/1, - /*run_queue*/TRUE); + xpt_release_devq(path, /*count*/1, /*run_queue*/TRUE); } status = done_ccb->ccb_h.status & CAM_STATUS_MASK; if (softc->restart) { @@ -773,7 +771,7 @@ noerror: } xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); - return; + goto out; } case PROBE_IDENTIFY: { @@ -808,7 +806,7 @@ noerror: PROBE_SET_ACTION(softc, PROBE_SPINUP); xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); - return; + goto out; } ident_buf = &path->device->ident_data; if ((periph->path->device->flags & CAM_DEV_UNCONFIGURED) == 0) { @@ -881,7 +879,7 @@ noerror: PROBE_SET_ACTION(softc, PROBE_SETMODE); xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); - return; + goto out; } case PROBE_SPINUP: if (bootverbose) @@ -890,7 +888,7 @@ noerror: PROBE_SET_ACTION(softc, PROBE_IDENTIFY); xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); - return; + goto out; case PROBE_SETMODE: if (path->device->transport != XPORT_SATA) goto notsata; @@ -935,7 +933,7 @@ noerror: PROBE_SET_ACTION(softc, PROBE_SETPM); xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); - return; + goto out; } /* FALLTHROUGH */ case PROBE_SETPM: @@ -946,7 +944,7 @@ noerror: PROBE_SET_ACTION(softc, PROBE_SETAPST); xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); - return; + goto out; } /* FALLTHROUGH */ case PROBE_SETAPST: @@ -956,7 +954,7 @@ noerror: PROBE_SET_ACTION(softc, PROBE_SETDMAAA); xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); - return; + goto out; } /* FALLTHROUGH */ case PROBE_SETDMAAA: @@ -966,7 +964,7 @@ noerror: PROBE_SET_ACTION(softc, PROBE_SETAN); xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); - return; + goto out; } /* FALLTHROUGH */ case PROBE_SETAN: @@ -978,15 +976,14 @@ notsata: } xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); - return; + goto out; case PROBE_SET_MULTI: if (periph->path->device->flags & CAM_DEV_UNCONFIGURED) { path->device->flags &= ~CAM_DEV_UNCONFIGURED; xpt_acquire_device(path->device); done_ccb->ccb_h.func_code = XPT_GDEV_TYPE; xpt_action(done_ccb); - xpt_async(AC_FOUND_DEVICE, done_ccb->ccb_h.path, - done_ccb); + xpt_async(AC_FOUND_DEVICE, path, done_ccb); } PROBE_SET_ACTION(softc, PROBE_DONE); break; @@ -1021,7 +1018,7 @@ notsata: PROBE_SET_ACTION(softc, PROBE_FULL_INQUIRY); xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); - return; + goto out; } ata_device_transport(path); @@ -1030,7 +1027,7 @@ notsata: xpt_acquire_device(path->device); done_ccb->ccb_h.func_code = XPT_GDEV_TYPE; xpt_action(done_ccb); - xpt_async(AC_FOUND_DEVICE, done_ccb->ccb_h.path, done_ccb); + xpt_async(AC_FOUND_DEVICE, path, done_ccb); } PROBE_SET_ACTION(softc, PROBE_DONE); break; @@ -1048,7 +1045,7 @@ notsata: PROBE_SET_ACTION(softc, PROBE_PM_PRV); xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); - return; + goto out; case PROBE_PM_PRV: softc->pm_prv = (done_ccb->ataio.res.lba_high << 24) + (done_ccb->ataio.res.lba_mid << 16) + @@ -1097,12 +1094,11 @@ notsata: xpt_acquire_device(path->device); done_ccb->ccb_h.func_code = XPT_GDEV_TYPE; xpt_action(done_ccb); - xpt_async(AC_FOUND_DEVICE, done_ccb->ccb_h.path, - done_ccb); + xpt_async(AC_FOUND_DEVICE, path, done_ccb); } else { done_ccb->ccb_h.func_code = XPT_GDEV_TYPE; xpt_action(done_ccb); - xpt_async(AC_SCSI_AEN, done_ccb->ccb_h.path, done_ccb); + xpt_async(AC_SCSI_AEN, path, done_ccb); } PROBE_SET_ACTION(softc, PROBE_DONE); break; @@ -1114,7 +1110,7 @@ done: softc->restart = 0; xpt_release_ccb(done_ccb); probeschedule(periph); - return; + goto out; } xpt_release_ccb(done_ccb); CAM_DEBUG(periph->path, CAM_DEBUG_PROBE, ("Probe completed\n")); @@ -1124,9 +1120,9 @@ done: done_ccb->ccb_h.status = found ? CAM_REQ_CMP : CAM_REQ_CMP_ERR; xpt_done(done_ccb); } + /* Drop freeze taken due to CAM_DEV_QFREEZE flag set. */ + cam_release_devq(path, 0, 0, 0, FALSE); cam_periph_invalidate(periph); - cam_release_devq(periph->path, - RELSIM_RELEASE_RUNLEVEL, 0, CAM_RL_XPT + 1, FALSE); cam_periph_release_locked(periph); } Modified: stable/8/sys/cam/cam.h ============================================================================== --- stable/8/sys/cam/cam.h Wed Apr 30 11:06:02 2014 (r265146) +++ stable/8/sys/cam/cam.h Wed Apr 30 14:09:26 2014 (r265147) @@ -80,15 +80,15 @@ typedef struct { #define CAM_PRIORITY_BUS ((CAM_RL_BUS << 8) + 0x80) #define CAM_PRIORITY_XPT ((CAM_RL_XPT << 8) + 0x80) #define CAM_PRIORITY_DEV ((CAM_RL_DEV << 8) + 0x80) +#define CAM_PRIORITY_OOB (CAM_RL_DEV << 8) #define CAM_PRIORITY_NORMAL ((CAM_RL_NORMAL << 8) + 0x80) #define CAM_PRIORITY_NONE (u_int32_t)-1 -#define CAM_PRIORITY_TO_RL(x) ((x) >> 8) -#define CAM_RL_TO_PRIORITY(x) ((x) << 8) u_int32_t generation; int index; #define CAM_UNQUEUED_INDEX -1 #define CAM_ACTIVE_INDEX -2 #define CAM_DONEQ_INDEX -3 +#define CAM_EXTRAQ_INDEX INT_MAX } cam_pinfo; /* Modified: stable/8/sys/cam/cam_ccb.h ============================================================================== --- stable/8/sys/cam/cam_ccb.h Wed Apr 30 11:06:02 2014 (r265146) +++ stable/8/sys/cam/cam_ccb.h Wed Apr 30 14:09:26 2014 (r265147) @@ -142,8 +142,6 @@ typedef enum { /* Path statistics (error counts, etc.) */ XPT_GDEV_STATS = 0x0c, /* Device statistics (error counts, etc.) */ - XPT_FREEZE_QUEUE = 0x0d, - /* Freeze device queue */ /* SCSI Control Functions: 0x10->0x1F */ XPT_ABORT = 0x10, /* Abort the specified CCB */ @@ -700,7 +698,6 @@ struct ccb_relsim { #define RELSIM_RELEASE_AFTER_TIMEOUT 0x02 #define RELSIM_RELEASE_AFTER_CMDCMPLT 0x04 #define RELSIM_RELEASE_AFTER_QEMPTY 0x08 -#define RELSIM_RELEASE_RUNLEVEL 0x10 u_int32_t openings; u_int32_t release_timeout; /* Abstract argument. */ u_int32_t qfrozen_cnt; Modified: stable/8/sys/cam/cam_periph.c ============================================================================== --- stable/8/sys/cam/cam_periph.c Wed Apr 30 11:06:02 2014 (r265146) +++ stable/8/sys/cam/cam_periph.c Wed Apr 30 14:09:26 2014 (r265147) @@ -998,21 +998,12 @@ cam_periph_runccb(union ccb *ccb, void cam_freeze_devq(struct cam_path *path) { + struct ccb_hdr ccb_h; - cam_freeze_devq_arg(path, 0, 0); -} - -void -cam_freeze_devq_arg(struct cam_path *path, uint32_t flags, uint32_t arg) -{ - struct ccb_relsim crs; - - xpt_setup_ccb(&crs.ccb_h, path, CAM_PRIORITY_NONE); - crs.ccb_h.func_code = XPT_FREEZE_QUEUE; - crs.release_flags = flags; - crs.openings = arg; - crs.release_timeout = arg; - xpt_action((union ccb *)&crs); + xpt_setup_ccb(&ccb_h, path, /*priority*/1); + ccb_h.func_code = XPT_NOOP; + ccb_h.flags = CAM_DEV_QFREEZE; + xpt_action((union ccb *)&ccb_h); } u_int32_t Modified: stable/8/sys/cam/cam_periph.h ============================================================================== --- stable/8/sys/cam/cam_periph.h Wed Apr 30 11:06:02 2014 (r265146) +++ stable/8/sys/cam/cam_periph.h Wed Apr 30 14:09:26 2014 (r265147) @@ -169,8 +169,6 @@ int cam_periph_ioctl(struct cam_periph cam_flags camflags, u_int32_t sense_flags)); void cam_freeze_devq(struct cam_path *path); -void cam_freeze_devq_arg(struct cam_path *path, u_int32_t flags, - uint32_t arg); u_int32_t cam_release_devq(struct cam_path *path, u_int32_t relsim_flags, u_int32_t opening_reduction, u_int32_t arg, int getcount_only); Modified: stable/8/sys/cam/cam_queue.c ============================================================================== --- stable/8/sys/cam/cam_queue.c Wed Apr 30 11:06:02 2014 (r265146) +++ stable/8/sys/cam/cam_queue.c Wed Apr 30 14:09:26 2014 (r265147) @@ -121,11 +121,9 @@ camq_resize(struct camq *queue, int new_ { cam_pinfo **new_array; -#ifdef DIAGNOSTIC - if (new_size < queue->entries) - panic("camq_resize: New queue size can't accomodate " - "queued entries."); -#endif + KASSERT(new_size >= queue->entries, ("camq_resize: " + "New queue size can't accomodate queued entries (%d < %d).", + new_size, queue->entries)); new_array = (cam_pinfo **)malloc(new_size * sizeof(cam_pinfo *), M_CAMQ, M_NOWAIT); if (new_array == NULL) { @@ -156,10 +154,10 @@ camq_resize(struct camq *queue, int new_ void camq_insert(struct camq *queue, cam_pinfo *new_entry) { -#ifdef DIAGNOSTIC - if (queue->entries >= queue->array_size) - panic("camq_insert: Attempt to insert into a full queue"); -#endif + + KASSERT(queue->entries < queue->array_size, + ("camq_insert: Attempt to insert into a full queue (%d >= %d)", + queue->entries, queue->array_size)); queue->entries++; queue->queue_array[queue->entries] = new_entry; new_entry->index = queue->entries; @@ -232,15 +230,8 @@ int cam_devq_init(struct cam_devq *devq, int devices, int openings) { bzero(devq, sizeof(*devq)); - if (camq_init(&devq->alloc_queue, devices) != 0) { - return (1); - } - if (camq_init(&devq->send_queue, devices) != 0) { - camq_fini(&devq->alloc_queue); + if (camq_init(&devq->send_queue, devices) != 0) return (1); - } - devq->alloc_openings = openings; - devq->alloc_active = 0; devq->send_openings = openings; devq->send_active = 0; return (0); @@ -249,7 +240,6 @@ cam_devq_init(struct cam_devq *devq, int void cam_devq_free(struct cam_devq *devq) { - camq_fini(&devq->alloc_queue); camq_fini(&devq->send_queue); free(devq, M_CAMDEVQ); } @@ -259,11 +249,7 @@ cam_devq_resize(struct cam_devq *camq, i { u_int32_t retval; - retval = camq_resize(&camq->alloc_queue, devices); - - if (retval == CAM_REQ_CMP) - retval = camq_resize(&camq->send_queue, devices); - + retval = camq_resize(&camq->send_queue, devices); return (retval); } @@ -298,42 +284,27 @@ u_int32_t cam_ccbq_resize(struct cam_ccbq *ccbq, int new_size) { int delta; - int space_left; delta = new_size - (ccbq->dev_active + ccbq->dev_openings); - space_left = new_size - - ccbq->queue.entries - - ccbq->held - - ccbq->dev_active; + ccbq->devq_openings += delta; + ccbq->dev_openings += delta; - /* - * Only attempt to change the underlying queue size if we are - * shrinking it and there is space for all outstanding entries - * in the new array or we have been requested to grow the array. - * We don't fail in the case where we can't reduce the array size, - * but clients that care that the queue be "garbage collected" - * should detect this condition and call us again with the - * same size once the outstanding entries have been processed. - */ - if (space_left < 0 - || camq_resize(&ccbq->queue, new_size) == CAM_REQ_CMP) { - ccbq->devq_openings += delta; - ccbq->dev_openings += delta; + new_size = imax(64, 1 << fls(new_size + new_size / 2)); + if (new_size > ccbq->queue.array_size) + return (camq_resize(&ccbq->queue, new_size)); + else return (CAM_REQ_CMP); - } else { - return (CAM_RESRC_UNAVAIL); - } } int cam_ccbq_init(struct cam_ccbq *ccbq, int openings) { bzero(ccbq, sizeof(*ccbq)); - if (camq_init(&ccbq->queue, openings) != 0) { + if (camq_init(&ccbq->queue, + imax(64, 1 << fls(openings + openings / 2))) != 0) return (1); - } ccbq->devq_openings = openings; - ccbq->dev_openings = openings; + ccbq->dev_openings = openings; return (0); } Modified: stable/8/sys/cam/cam_queue.h ============================================================================== --- stable/8/sys/cam/cam_queue.h Wed Apr 30 11:06:02 2014 (r265146) +++ stable/8/sys/cam/cam_queue.h Wed Apr 30 14:09:26 2014 (r265147) @@ -48,7 +48,7 @@ struct camq { int array_size; int entries; u_int32_t generation; - u_int32_t qfrozen_cnt[CAM_RL_VALUES]; + u_int32_t qfrozen_cnt; }; TAILQ_HEAD(ccb_hdr_tailq, ccb_hdr); @@ -57,8 +57,11 @@ SLIST_HEAD(ccb_hdr_slist, ccb_hdr); struct cam_ccbq { struct camq queue; + struct ccb_hdr_tailq queue_extra_head; + int queue_extra_entries; int devq_openings; - int dev_openings; + int devq_allocating; + int dev_openings; int dev_active; int held; }; @@ -66,11 +69,7 @@ struct cam_ccbq { struct cam_ed; struct cam_devq { - struct camq alloc_queue; struct camq send_queue; - struct cam_ed *active_dev; - int alloc_openings; - int alloc_active; int send_openings; int send_active; }; @@ -158,10 +157,10 @@ cam_ccbq_pending_ccb_count(struct cam_cc static __inline void cam_ccbq_take_opening(struct cam_ccbq *ccbq); -static __inline int +static __inline void cam_ccbq_insert_ccb(struct cam_ccbq *ccbq, union ccb *new_ccb); -static __inline int +static __inline void cam_ccbq_remove_ccb(struct cam_ccbq *ccbq, union ccb *ccb); static __inline union ccb * @@ -180,7 +179,7 @@ cam_ccbq_release_opening(struct cam_ccbq static __inline int cam_ccbq_pending_ccb_count(struct cam_ccbq *ccbq) { - return (ccbq->queue.entries); + return (ccbq->queue.entries + ccbq->queue_extra_entries); } static __inline void @@ -190,31 +189,64 @@ cam_ccbq_take_opening(struct cam_ccbq *c ccbq->held++; } -static __inline int +static __inline void cam_ccbq_insert_ccb(struct cam_ccbq *ccbq, union ccb *new_ccb) { + struct ccb_hdr *old_ccb; + struct camq *queue = &ccbq->queue; + ccbq->held--; - camq_insert(&ccbq->queue, &new_ccb->ccb_h.pinfo); - if (ccbq->queue.qfrozen_cnt[CAM_PRIORITY_TO_RL( - new_ccb->ccb_h.pinfo.priority)] > 0) { - ccbq->devq_openings++; - ccbq->held++; - return (1); - } else - return (0); + + /* + * If queue is already full, try to resize. + * If resize fail, push CCB with lowest priority out to the TAILQ. + */ + if (queue->entries == queue->array_size && + camq_resize(&ccbq->queue, queue->array_size * 2) != CAM_REQ_CMP) { + old_ccb = (struct ccb_hdr *)camq_remove(queue, queue->entries); + TAILQ_INSERT_HEAD(&ccbq->queue_extra_head, old_ccb, + xpt_links.tqe); + old_ccb->pinfo.index = CAM_EXTRAQ_INDEX; + ccbq->queue_extra_entries++; + } + + camq_insert(queue, &new_ccb->ccb_h.pinfo); } -static __inline int +static __inline void cam_ccbq_remove_ccb(struct cam_ccbq *ccbq, union ccb *ccb) { - camq_remove(&ccbq->queue, ccb->ccb_h.pinfo.index); - if (ccbq->queue.qfrozen_cnt[CAM_PRIORITY_TO_RL( - ccb->ccb_h.pinfo.priority)] > 0) { - ccbq->devq_openings--; - ccbq->held--; - return (1); - } else - return (0); + struct ccb_hdr *cccb, *bccb; + struct camq *queue = &ccbq->queue; + + /* If the CCB is on the TAILQ, remove it from there. */ + if (ccb->ccb_h.pinfo.index == CAM_EXTRAQ_INDEX) { + TAILQ_REMOVE(&ccbq->queue_extra_head, &ccb->ccb_h, + xpt_links.tqe); + ccb->ccb_h.pinfo.index = CAM_UNQUEUED_INDEX; + ccbq->queue_extra_entries--; + return; + } + + camq_remove(queue, ccb->ccb_h.pinfo.index); + + /* + * If there are some CCBs on TAILQ, find the best one and move it + * to the emptied space in the queue. + */ + bccb = TAILQ_FIRST(&ccbq->queue_extra_head); + if (bccb == NULL) + return; + TAILQ_FOREACH(cccb, &ccbq->queue_extra_head, xpt_links.tqe) { + if (bccb->pinfo.priority > cccb->pinfo.priority || + (bccb->pinfo.priority == cccb->pinfo.priority && + GENERATIONCMP(bccb->pinfo.generation, >, + cccb->pinfo.generation))) + bccb = cccb; + } + TAILQ_REMOVE(&ccbq->queue_extra_head, bccb, xpt_links.tqe); + ccbq->queue_extra_entries--; + camq_insert(queue, &bccb->pinfo); } static __inline union ccb * @@ -248,81 +280,5 @@ cam_ccbq_release_opening(struct cam_ccbq ccbq->devq_openings++; } -static __inline int -cam_ccbq_freeze(struct cam_ccbq *ccbq, cam_rl rl, u_int32_t cnt) -{ - int i, frozen = 0; - cam_rl p, n; - - /* Find pevious run level. */ - for (p = 0; p < CAM_RL_VALUES && ccbq->queue.qfrozen_cnt[p] == 0; p++); - /* Find new run level. */ - n = min(rl, p); - /* Apply new run level. */ - for (i = rl; i < CAM_RL_VALUES; i++) - ccbq->queue.qfrozen_cnt[i] += cnt; - /* Update ccbq statistics. */ - if (n == p) - return (0); - for (i = CAMQ_HEAD; i <= ccbq->queue.entries; i++) { - cam_rl rrl = - CAM_PRIORITY_TO_RL(ccbq->queue.queue_array[i]->priority); - if (rrl < n) - continue; - if (rrl >= p) - break; - ccbq->devq_openings++; - ccbq->held++; - frozen++; - } - return (frozen); -} - -static __inline int -cam_ccbq_release(struct cam_ccbq *ccbq, cam_rl rl, u_int32_t cnt) -{ - int i, released = 0; - cam_rl p, n; - - /* Apply new run level. */ - for (i = rl; i < CAM_RL_VALUES; i++) - ccbq->queue.qfrozen_cnt[i] -= cnt; - /* Find new run level. */ - for (n = 0; n < CAM_RL_VALUES && ccbq->queue.qfrozen_cnt[n] == 0; n++); - /* Find previous run level. */ - p = min(rl, n); - /* Update ccbq statistics. */ - if (n == p) - return (0); - for (i = CAMQ_HEAD; i <= ccbq->queue.entries; i++) { - cam_rl rrl = - CAM_PRIORITY_TO_RL(ccbq->queue.queue_array[i]->priority); - if (rrl < p) - continue; - if (rrl >= n) - break; - ccbq->devq_openings--; - ccbq->held--; - released++; - } - return (released); -} - -static __inline u_int32_t -cam_ccbq_frozen(struct cam_ccbq *ccbq, cam_rl rl) -{ - - return (ccbq->queue.qfrozen_cnt[rl]); -} - -static __inline u_int32_t -cam_ccbq_frozen_top(struct cam_ccbq *ccbq) -{ - cam_rl rl; - - rl = CAM_PRIORITY_TO_RL(CAMQ_GET_PRIO(&ccbq->queue)); - return (ccbq->queue.qfrozen_cnt[rl]); -} - #endif /* _KERNEL */ #endif /* _CAM_CAM_QUEUE_H */ Modified: stable/8/sys/cam/cam_xpt.c ============================================================================== --- stable/8/sys/cam/cam_xpt.c Wed Apr 30 11:06:02 2014 (r265146) +++ stable/8/sys/cam/cam_xpt.c Wed Apr 30 14:09:26 2014 (r265147) @@ -96,7 +96,7 @@ struct xpt_softc { u_int32_t xpt_generation; /* number of high powered commands that can go through right now */ - STAILQ_HEAD(highpowerlist, ccb_hdr) highpowerq; + STAILQ_HEAD(highpowerlist, cam_ed) highpowerq; int num_highpower; /* queue for handling async rescan requests. */ @@ -221,13 +221,13 @@ static void xpt_async_bcast(struct asyn static path_id_t xptnextfreepathid(void); static path_id_t xptpathid(const char *sim_name, int sim_unit, int sim_bus); static union ccb *xpt_get_ccb(struct cam_ed *device); -static void xpt_run_dev_allocq(struct cam_eb *bus); -static void xpt_run_dev_sendq(struct cam_eb *bus); +static void xpt_run_dev_allocq(struct cam_ed *device); +static void xpt_run_devq(struct cam_devq *devq); static timeout_t xpt_release_devq_timeout; static void xpt_release_simq_timeout(void *arg) __unused; static void xpt_release_bus(struct cam_eb *bus); -static void xpt_release_devq_device(struct cam_ed *dev, cam_rl rl, - u_int count, int run_queue); +static void xpt_release_devq_device(struct cam_ed *dev, u_int count, + int run_queue); static struct cam_et* xpt_alloc_target(struct cam_eb *bus, target_id_t target_id); static void xpt_release_target(struct cam_et *target); @@ -297,49 +297,24 @@ static xpt_busfunc_t xptsetasyncbusfunc; static cam_status xptregister(struct cam_periph *periph, void *arg); static __inline int periph_is_queued(struct cam_periph *periph); -static __inline int device_is_alloc_queued(struct cam_ed *device); -static __inline int device_is_send_queued(struct cam_ed *device); +static __inline int device_is_queued(struct cam_ed *device); static __inline int -xpt_schedule_dev_allocq(struct cam_eb *bus, struct cam_ed *dev) -{ - int retval; - - if ((dev->drvq.entries > 0) && - (dev->ccbq.devq_openings > 0) && - (cam_ccbq_frozen(&dev->ccbq, CAM_PRIORITY_TO_RL( - CAMQ_GET_PRIO(&dev->drvq))) == 0)) { - /* - * The priority of a device waiting for CCB resources - * is that of the highest priority peripheral driver - * enqueued. - */ - retval = xpt_schedule_dev(&bus->sim->devq->alloc_queue, - &dev->alloc_ccb_entry.pinfo, - CAMQ_GET_PRIO(&dev->drvq)); - } else { - retval = 0; - } - - return (retval); -} - -static __inline int -xpt_schedule_dev_sendq(struct cam_eb *bus, struct cam_ed *dev) +xpt_schedule_devq(struct cam_devq *devq, struct cam_ed *dev) { int retval; if ((dev->ccbq.queue.entries > 0) && (dev->ccbq.dev_openings > 0) && - (cam_ccbq_frozen_top(&dev->ccbq) == 0)) { + (dev->ccbq.queue.qfrozen_cnt == 0)) { /* * The priority of a device waiting for controller * resources is that of the highest priority CCB * enqueued. */ retval = - xpt_schedule_dev(&bus->sim->devq->send_queue, - &dev->send_ccb_entry.pinfo, + xpt_schedule_dev(&devq->send_queue, + &dev->devq_entry.pinfo, CAMQ_GET_PRIO(&dev->ccbq.queue)); } else { retval = 0; @@ -354,15 +329,9 @@ periph_is_queued(struct cam_periph *peri } static __inline int -device_is_alloc_queued(struct cam_ed *device) +device_is_queued(struct cam_ed *device) { - return (device->alloc_ccb_entry.pinfo.index != CAM_UNQUEUED_INDEX); -} - -static __inline int -device_is_send_queued(struct cam_ed *device) -{ - return (device->send_ccb_entry.pinfo.index != CAM_UNQUEUED_INDEX); + return (device->devq_entry.pinfo.index != CAM_UNQUEUED_INDEX); } static void @@ -2487,17 +2456,10 @@ xpt_action_default(union ccb *start_ccb) /* FALLTHROUGH */ case XPT_RESET_DEV: case XPT_ENG_EXEC: - { - int frozen; - - frozen = cam_ccbq_insert_ccb(&path->device->ccbq, start_ccb); - path->device->sim->devq->alloc_openings += frozen; - if (frozen > 0) - xpt_run_dev_allocq(path->bus); - if (xpt_schedule_dev_sendq(path->bus, path->device)) - xpt_run_dev_sendq(path->bus); + cam_ccbq_insert_ccb(&path->device->ccbq, start_ccb); + if (xpt_schedule_devq(path->bus->sim->devq, path->device)) + xpt_run_devq(path->bus->sim->devq); break; - } case XPT_CALC_GEOMETRY: { struct cam_sim *sim; @@ -2546,8 +2508,7 @@ xpt_action_default(union ccb *start_ccb) device = abort_ccb->ccb_h.path->device; ccbq = &device->ccbq; - device->sim->devq->alloc_openings -= - cam_ccbq_remove_ccb(ccbq, abort_ccb); + cam_ccbq_remove_ccb(ccbq, abort_ccb); abort_ccb->ccb_h.status = CAM_REQ_ABORTED|CAM_DEV_QFRZN; xpt_freeze_devq(abort_ccb->ccb_h.path, 1); @@ -2655,7 +2616,7 @@ xpt_action_default(union ccb *start_ccb) cgds->dev_openings = dev->ccbq.dev_openings; cgds->dev_active = dev->ccbq.dev_active; cgds->devq_openings = dev->ccbq.devq_openings; - cgds->devq_queued = dev->ccbq.queue.entries; + cgds->devq_queued = cam_ccbq_pending_ccb_count(&dev->ccbq); cgds->held = dev->ccbq.held; cgds->last_reset = tar->last_reset; cgds->maxtags = dev->maxtags; @@ -2922,13 +2883,9 @@ xpt_action_default(union ccb *start_ccb) } } - if ((start_ccb->ccb_h.flags & CAM_DEV_QFREEZE) == 0) { - xpt_release_devq_rl(path, /*runlevel*/ - (crs->release_flags & RELSIM_RELEASE_RUNLEVEL) ? - crs->release_timeout : 0, - /*count*/1, /*run_queue*/TRUE); - } - start_ccb->crs.qfrozen_cnt = dev->ccbq.queue.qfrozen_cnt[0]; + if ((start_ccb->ccb_h.flags & CAM_DEV_QFREEZE) == 0) + xpt_release_devq(path, /*count*/1, /*run_queue*/TRUE); + start_ccb->crs.qfrozen_cnt = dev->ccbq.queue.qfrozen_cnt; start_ccb->ccb_h.status = CAM_REQ_CMP; break; } @@ -2963,16 +2920,6 @@ xpt_action_default(union ccb *start_ccb) } break; } - case XPT_FREEZE_QUEUE: - { - struct ccb_relsim *crs = &start_ccb->crs; - - xpt_freeze_devq_rl(path, /*runlevel*/ - (crs->release_flags & RELSIM_RELEASE_RUNLEVEL) ? - crs->release_timeout : 0, /*count*/1); - start_ccb->ccb_h.status = CAM_REQ_CMP; - break; - } case XPT_NOOP: if ((start_ccb->ccb_h.flags & CAM_DEV_QFREEZE) != 0) xpt_freeze_devq(path, 1); @@ -3076,7 +3023,7 @@ xpt_schedule(struct cam_periph *perph, u camq_change_priority(&device->drvq, perph->pinfo.index, new_priority); - runq = xpt_schedule_dev_allocq(perph->path->bus, device); + runq = 1; } } else { /* New entry on the queue */ @@ -3085,12 +3032,12 @@ xpt_schedule(struct cam_periph *perph, u perph->pinfo.priority = new_priority; perph->pinfo.generation = ++device->drvq.generation; camq_insert(&device->drvq, &perph->pinfo); - runq = xpt_schedule_dev_allocq(perph->path->bus, device); + runq = 1; } if (runq != 0) { CAM_DEBUG(perph->path, CAM_DEBUG_SUBTRACE, - (" calling xpt_run_devq\n")); - xpt_run_dev_allocq(perph->path->bus); + (" calling xpt_run_dev_allocq\n")); + xpt_run_dev_allocq(device); } } @@ -3143,43 +3090,25 @@ xpt_schedule_dev(struct camq *queue, cam } static void -xpt_run_dev_allocq(struct cam_eb *bus) +xpt_run_dev_allocq(struct cam_ed *device) { - struct cam_devq *devq; - - CAM_DEBUG_PRINT(CAM_DEBUG_XPT, ("xpt_run_dev_allocq\n")); - devq = bus->sim->devq; + struct camq *drvq; - CAM_DEBUG_PRINT(CAM_DEBUG_XPT, - (" qfrozen_cnt == 0x%x, entries == %d, " - "openings == %d, active == %d\n", - devq->alloc_queue.qfrozen_cnt[0], - devq->alloc_queue.entries, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Wed Apr 30 20:39:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1685AFA4; Wed, 30 Apr 2014 20:39:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 024C31439; Wed, 30 Apr 2014 20:39:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3UKdB5W039382; Wed, 30 Apr 2014 20:39:11 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3UKd9JV039364; Wed, 30 Apr 2014 20:39:09 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201404302039.s3UKd9JV039364@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Wed, 30 Apr 2014 20:39:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265160 - in stable/10/usr.bin: grep grep/regex patch printf sort X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2014 20:39:12 -0000 Author: pfg Date: Wed Apr 30 20:39:08 2014 New Revision: 265160 URL: http://svnweb.freebsd.org/changeset/base/265160 Log: MFC r264581, r264744: Various style(9) fixes and typos in printf, grep, sort and patch. #define should be followed by a tab. Modified: stable/10/usr.bin/grep/grep.c stable/10/usr.bin/grep/grep.h stable/10/usr.bin/grep/regex/tre-fastmatch.c stable/10/usr.bin/patch/common.h stable/10/usr.bin/patch/pch.h stable/10/usr.bin/printf/printf.c stable/10/usr.bin/sort/bwstring.h stable/10/usr.bin/sort/coll.h stable/10/usr.bin/sort/file.h stable/10/usr.bin/sort/mem.h stable/10/usr.bin/sort/radixsort.h stable/10/usr.bin/sort/sort.1.in stable/10/usr.bin/sort/sort.h stable/10/usr.bin/sort/vsort.h Modified: stable/10/usr.bin/grep/grep.c ============================================================================== --- stable/10/usr.bin/grep/grep.c Wed Apr 30 19:44:31 2014 (r265159) +++ stable/10/usr.bin/grep/grep.c Wed Apr 30 20:39:08 2014 (r265160) @@ -311,7 +311,7 @@ read_patterns(const char *fn) fclose(f); return; } - while ((line = fgetln(f, &len)) != NULL) + while ((line = fgetln(f, &len)) != NULL) add_pattern(line, line[0] == '\n' ? 0 : len); if (ferror(f)) err(2, "%s", fn); Modified: stable/10/usr.bin/grep/grep.h ============================================================================== --- stable/10/usr.bin/grep/grep.h Wed Apr 30 19:44:31 2014 (r265159) +++ stable/10/usr.bin/grep/grep.h Wed Apr 30 20:39:08 2014 (r265160) @@ -39,48 +39,48 @@ #include "fastmatch.h" #ifdef WITHOUT_NLS -#define getstr(n) errstr[n] +#define getstr(n) errstr[n] #else #include extern nl_catd catalog; -#define getstr(n) catgets(catalog, 1, n, errstr[n]) +#define getstr(n) catgets(catalog, 1, n, errstr[n]) #endif extern const char *errstr[]; -#define VERSION "2.5.1-FreeBSD" +#define VERSION "2.5.1-FreeBSD" -#define GREP_FIXED 0 -#define GREP_BASIC 1 -#define GREP_EXTENDED 2 - -#define BINFILE_BIN 0 -#define BINFILE_SKIP 1 -#define BINFILE_TEXT 2 - -#define FILE_STDIO 0 -#define FILE_MMAP 1 -#define FILE_GZIP 2 -#define FILE_BZIP 3 -#define FILE_XZ 4 -#define FILE_LZMA 5 - -#define DIR_READ 0 -#define DIR_SKIP 1 -#define DIR_RECURSE 2 - -#define DEV_READ 0 -#define DEV_SKIP 1 - -#define LINK_READ 0 -#define LINK_EXPLICIT 1 -#define LINK_SKIP 2 +#define GREP_FIXED 0 +#define GREP_BASIC 1 +#define GREP_EXTENDED 2 + +#define BINFILE_BIN 0 +#define BINFILE_SKIP 1 +#define BINFILE_TEXT 2 + +#define FILE_STDIO 0 +#define FILE_MMAP 1 +#define FILE_GZIP 2 +#define FILE_BZIP 3 +#define FILE_XZ 4 +#define FILE_LZMA 5 + +#define DIR_READ 0 +#define DIR_SKIP 1 +#define DIR_RECURSE 2 + +#define DEV_READ 0 +#define DEV_SKIP 1 + +#define LINK_READ 0 +#define LINK_EXPLICIT 1 +#define LINK_SKIP 2 -#define EXCL_PAT 0 -#define INCL_PAT 1 +#define EXCL_PAT 0 +#define INCL_PAT 1 -#define MAX_LINE_MATCHES 32 +#define MAX_LINE_MATCHES 32 struct file { int fd; @@ -129,7 +129,7 @@ extern regex_t *er_pattern, *r_pattern; extern fastmatch_t *fg_pattern; /* For regex errors */ -#define RE_ERROR_BUF 512 +#define RE_ERROR_BUF 512 extern char re_error[RE_ERROR_BUF + 1]; /* Seems big enough */ /* util.c */ Modified: stable/10/usr.bin/grep/regex/tre-fastmatch.c ============================================================================== --- stable/10/usr.bin/grep/regex/tre-fastmatch.c Wed Apr 30 19:44:31 2014 (r265159) +++ stable/10/usr.bin/grep/regex/tre-fastmatch.c Wed Apr 30 20:39:08 2014 (r265160) @@ -444,7 +444,7 @@ static int fastcmp(const fastmatch_t *fg } /* - * Copies the pattern pat having lenght n to p and stores + * Copies the pattern pat having length n to p and stores * the size in l. */ #define SAVE_PATTERN(src, srclen, dst, dstlen) \ Modified: stable/10/usr.bin/patch/common.h ============================================================================== --- stable/10/usr.bin/patch/common.h Wed Apr 30 19:44:31 2014 (r265159) +++ stable/10/usr.bin/patch/common.h Wed Apr 30 20:39:08 2014 (r265160) @@ -32,32 +32,32 @@ #include #include -#define DEBUGGING +#define DEBUGGING /* constants */ -#define MAXHUNKSIZE 200000 /* is this enough lines? */ -#define INITHUNKMAX 125 /* initial dynamic allocation size */ -#define INITLINELEN 4096 -#define BUFFERSIZE 4096 - -#define SCCSPREFIX "s." -#define GET "get -e %s" -#define SCCSDIFF "get -p %s | diff - %s >/dev/null" - -#define RCSSUFFIX ",v" -#define CHECKOUT "co -l %s" -#define RCSDIFF "rcsdiff %s > /dev/null" +#define MAXHUNKSIZE 200000 /* is this enough lines? */ +#define INITHUNKMAX 125 /* initial dynamic allocation size */ +#define INITLINELEN 4096 +#define BUFFERSIZE 4096 + +#define SCCSPREFIX "s." +#define GET "get -e %s" +#define SCCSDIFF "get -p %s | diff - %s >/dev/null" + +#define RCSSUFFIX ",v" +#define CHECKOUT "co -l %s" +#define RCSDIFF "rcsdiff %s > /dev/null" -#define ORIGEXT ".orig" -#define REJEXT ".rej" +#define ORIGEXT ".orig" +#define REJEXT ".rej" /* handy definitions */ -#define strNE(s1,s2) (strcmp(s1, s2)) -#define strEQ(s1,s2) (!strcmp(s1, s2)) -#define strnNE(s1,s2,l) (strncmp(s1, s2, l)) -#define strnEQ(s1,s2,l) (!strncmp(s1, s2, l)) +#define strNE(s1,s2) (strcmp(s1, s2)) +#define strEQ(s1,s2) (!strcmp(s1, s2)) +#define strnNE(s1,s2,l) (strncmp(s1, s2, l)) +#define strnEQ(s1,s2,l) (!strncmp(s1, s2, l)) /* typedefs */ @@ -73,7 +73,7 @@ extern size_t buf_size; /* size of gener extern bool using_plan_a; /* try to keep everything in memory */ extern bool out_of_mem; /* ran out of memory in plan a */ -#define MAXFILEC 2 +#define MAXFILEC 2 extern char *filearg[MAXFILEC]; extern bool ok_to_create_file; @@ -105,11 +105,11 @@ extern bool warn_on_invalid_line; extern bool last_line_missing_eol; -#define CONTEXT_DIFF 1 -#define NORMAL_DIFF 2 -#define ED_DIFF 3 -#define NEW_CONTEXT_DIFF 4 -#define UNI_DIFF 5 +#define CONTEXT_DIFF 1 +#define NORMAL_DIFF 2 +#define ED_DIFF 3 +#define NEW_CONTEXT_DIFF 4 +#define UNI_DIFF 5 extern int diff_type; extern char *revision; /* prerequisite revision, if any */ Modified: stable/10/usr.bin/patch/pch.h ============================================================================== --- stable/10/usr.bin/patch/pch.h Wed Apr 30 19:44:31 2014 (r265159) +++ stable/10/usr.bin/patch/pch.h Wed Apr 30 20:39:08 2014 (r265160) @@ -27,10 +27,10 @@ * $FreeBSD$ */ -#define OLD_FILE 0 -#define NEW_FILE 1 -#define INDEX_FILE 2 -#define MAX_FILE 3 +#define OLD_FILE 0 +#define NEW_FILE 1 +#define INDEX_FILE 2 +#define MAX_FILE 3 struct file_name { char *path; Modified: stable/10/usr.bin/printf/printf.c ============================================================================== --- stable/10/usr.bin/printf/printf.c Wed Apr 30 19:44:31 2014 (r265159) +++ stable/10/usr.bin/printf/printf.c Wed Apr 30 20:39:08 2014 (r265160) @@ -61,13 +61,13 @@ static const char rcsid[] = #include #ifdef SHELL -#define main printfcmd +#define main printfcmd #include "bltin/bltin.h" #include "error.h" #include "options.h" #endif -#define PF(f, func) do { \ +#define PF(f, func) do { \ char *b = NULL; \ if (havewidth) \ if (haveprec) \ Modified: stable/10/usr.bin/sort/bwstring.h ============================================================================== --- stable/10/usr.bin/sort/bwstring.h Wed Apr 30 19:44:31 2014 (r265159) +++ stable/10/usr.bin/sort/bwstring.h Wed Apr 30 20:39:08 2014 (r265160) @@ -28,7 +28,7 @@ */ #if !defined(__BWSTRING_H__) -#define __BWSTRING_H__ +#define __BWSTRING_H__ #include #include @@ -41,7 +41,7 @@ extern bool byte_sort; /* wchar_t is of 4 bytes: */ -#define SIZEOF_WCHAR_STRING(LEN) ((LEN)*sizeof(wchar_t)) +#define SIZEOF_WCHAR_STRING(LEN) ((LEN)*sizeof(wchar_t)) /* * Binary "wide" string @@ -64,7 +64,7 @@ struct reader_buffer typedef void *bwstring_iterator; -#define BWSLEN(s) ((s)->len) +#define BWSLEN(s) ((s)->len) struct bwstring *bwsalloc(size_t sz); @@ -135,7 +135,7 @@ bws_get_iter_value(bwstring_iterator ite int bws_iterator_cmp(bwstring_iterator iter1, bwstring_iterator iter2, size_t len); -#define BWS_GET(bws, pos) ((MB_CUR_MAX == 1) ? ((bws)->data.cstr[(pos)]) : (bws)->data.wstr[(pos)]) +#define BWS_GET(bws, pos) ((MB_CUR_MAX == 1) ? ((bws)->data.cstr[(pos)]) : (bws)->data.wstr[(pos)]) void initialise_months(void); Modified: stable/10/usr.bin/sort/coll.h ============================================================================== --- stable/10/usr.bin/sort/coll.h Wed Apr 30 19:44:31 2014 (r265159) +++ stable/10/usr.bin/sort/coll.h Wed Apr 30 20:39:08 2014 (r265160) @@ -28,7 +28,7 @@ */ #if !defined(__COLL_H__) -#define __COLL_H__ +#define __COLL_H__ #include "bwstring.h" #include "sort.h" Modified: stable/10/usr.bin/sort/file.h ============================================================================== --- stable/10/usr.bin/sort/file.h Wed Apr 30 19:44:31 2014 (r265159) +++ stable/10/usr.bin/sort/file.h Wed Apr 30 20:39:08 2014 (r265160) @@ -28,7 +28,7 @@ */ #if !defined(__SORT_FILE_H__) -#define __SORT_FILE_H__ +#define __SORT_FILE_H__ #include "coll.h" #include "sort.h" @@ -39,8 +39,8 @@ #define SORT_HEAPSORT 3 #define SORT_RADIXSORT 4 -#define DEFAULT_SORT_ALGORITHM SORT_HEAPSORT -#define DEFAULT_SORT_FUNC heapsort +#define DEFAULT_SORT_ALGORITHM SORT_HEAPSORT +#define DEFAULT_SORT_FUNC heapsort /* * List of data to be sorted. Modified: stable/10/usr.bin/sort/mem.h ============================================================================== --- stable/10/usr.bin/sort/mem.h Wed Apr 30 19:44:31 2014 (r265159) +++ stable/10/usr.bin/sort/mem.h Wed Apr 30 20:39:08 2014 (r265160) @@ -28,7 +28,7 @@ */ #if !defined(__SORT_MEM_H__) -#define __SORT_MEM_H__ +#define __SORT_MEM_H__ #include #include Modified: stable/10/usr.bin/sort/radixsort.h ============================================================================== --- stable/10/usr.bin/sort/radixsort.h Wed Apr 30 19:44:31 2014 (r265159) +++ stable/10/usr.bin/sort/radixsort.h Wed Apr 30 20:39:08 2014 (r265160) @@ -28,7 +28,7 @@ */ #if !defined(__SORT_RADIX_H__) -#define __SORT_RADIX_H__ +#define __SORT_RADIX_H__ #include "coll.h" #include "sort.h" Modified: stable/10/usr.bin/sort/sort.1.in ============================================================================== --- stable/10/usr.bin/sort/sort.1.in Wed Apr 30 19:44:31 2014 (r265159) +++ stable/10/usr.bin/sort/sort.1.in Wed Apr 30 20:39:08 2014 (r265160) @@ -194,7 +194,7 @@ This is a random permutation of the inpu the equal keys sort together. It is implemented by hashing the input keys and sorting the hash values. -The hash function is choosen randomly. +The hash function is chosen randomly. The hash function is randomized by .Cm /dev/random content, or by file content if it is specified by @@ -212,7 +212,7 @@ The files are compared by their prefixes zeros are ignored in version numbers, see example below). If an input string does not match the pattern, then it is compared using the byte compare function. -All string comparisions are performed in C locale, the locale +All string comparisons are performed in C locale, the locale environment setting is ignored. .Bl -tag -width indent .It Example: Modified: stable/10/usr.bin/sort/sort.h ============================================================================== --- stable/10/usr.bin/sort/sort.h Wed Apr 30 19:44:31 2014 (r265159) +++ stable/10/usr.bin/sort/sort.h Wed Apr 30 20:39:08 2014 (r265160) @@ -28,7 +28,7 @@ */ #if !defined(__BSD_SORT_H__) -#define __BSD_SORT_H__ +#define __BSD_SORT_H__ #include #include @@ -53,7 +53,7 @@ extern nl_catd catalog; extern const char *nlsstr[]; #if defined(SORT_THREADS) -#define MT_SORT_THRESHOLD (10000) +#define MT_SORT_THRESHOLD (10000) extern unsigned int ncpu; extern size_t nthreads; #endif Modified: stable/10/usr.bin/sort/vsort.h ============================================================================== --- stable/10/usr.bin/sort/vsort.h Wed Apr 30 19:44:31 2014 (r265159) +++ stable/10/usr.bin/sort/vsort.h Wed Apr 30 20:39:08 2014 (r265160) @@ -28,7 +28,7 @@ */ #ifndef _VSORT_H_ -#define _VSORT_H_ +#define _VSORT_H_ #include "bwstring.h" From owner-svn-src-stable@FreeBSD.ORG Wed Apr 30 20:46:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6FF5B279; Wed, 30 Apr 2014 20:46:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C6101519; Wed, 30 Apr 2014 20:46:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3UKkror043311; Wed, 30 Apr 2014 20:46:53 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3UKkqGX043307; Wed, 30 Apr 2014 20:46:52 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201404302046.s3UKkqGX043307@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Wed, 30 Apr 2014 20:46:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265161 - in stable/9/usr.bin: grep grep/regex printf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2014 20:46:53 -0000 Author: pfg Date: Wed Apr 30 20:46:52 2014 New Revision: 265161 URL: http://svnweb.freebsd.org/changeset/base/265161 Log: MFC r264581, r264744 (partial): Various style(9) fixes and typos in printf and grep. #define should be followed by a tab. Modified: stable/9/usr.bin/grep/grep.c stable/9/usr.bin/grep/grep.h stable/9/usr.bin/grep/regex/tre-fastmatch.c stable/9/usr.bin/printf/printf.c Directory Properties: stable/9/ (props changed) stable/9/usr.bin/ (props changed) stable/9/usr.bin/grep/ (props changed) stable/9/usr.bin/printf/ (props changed) Modified: stable/9/usr.bin/grep/grep.c ============================================================================== --- stable/9/usr.bin/grep/grep.c Wed Apr 30 20:39:08 2014 (r265160) +++ stable/9/usr.bin/grep/grep.c Wed Apr 30 20:46:52 2014 (r265161) @@ -310,7 +310,7 @@ read_patterns(const char *fn) fclose(f); return; } - while ((line = fgetln(f, &len)) != NULL) + while ((line = fgetln(f, &len)) != NULL) add_pattern(line, line[0] == '\n' ? 0 : len); if (ferror(f)) err(2, "%s", fn); Modified: stable/9/usr.bin/grep/grep.h ============================================================================== --- stable/9/usr.bin/grep/grep.h Wed Apr 30 20:39:08 2014 (r265160) +++ stable/9/usr.bin/grep/grep.h Wed Apr 30 20:46:52 2014 (r265161) @@ -39,48 +39,48 @@ #include "fastmatch.h" #ifdef WITHOUT_NLS -#define getstr(n) errstr[n] +#define getstr(n) errstr[n] #else #include extern nl_catd catalog; -#define getstr(n) catgets(catalog, 1, n, errstr[n]) +#define getstr(n) catgets(catalog, 1, n, errstr[n]) #endif extern const char *errstr[]; -#define VERSION "2.5.1-FreeBSD" +#define VERSION "2.5.1-FreeBSD" -#define GREP_FIXED 0 -#define GREP_BASIC 1 -#define GREP_EXTENDED 2 - -#define BINFILE_BIN 0 -#define BINFILE_SKIP 1 -#define BINFILE_TEXT 2 - -#define FILE_STDIO 0 -#define FILE_MMAP 1 -#define FILE_GZIP 2 -#define FILE_BZIP 3 -#define FILE_XZ 4 -#define FILE_LZMA 5 - -#define DIR_READ 0 -#define DIR_SKIP 1 -#define DIR_RECURSE 2 - -#define DEV_READ 0 -#define DEV_SKIP 1 - -#define LINK_READ 0 -#define LINK_EXPLICIT 1 -#define LINK_SKIP 2 +#define GREP_FIXED 0 +#define GREP_BASIC 1 +#define GREP_EXTENDED 2 + +#define BINFILE_BIN 0 +#define BINFILE_SKIP 1 +#define BINFILE_TEXT 2 + +#define FILE_STDIO 0 +#define FILE_MMAP 1 +#define FILE_GZIP 2 +#define FILE_BZIP 3 +#define FILE_XZ 4 +#define FILE_LZMA 5 + +#define DIR_READ 0 +#define DIR_SKIP 1 +#define DIR_RECURSE 2 + +#define DEV_READ 0 +#define DEV_SKIP 1 + +#define LINK_READ 0 +#define LINK_EXPLICIT 1 +#define LINK_SKIP 2 -#define EXCL_PAT 0 -#define INCL_PAT 1 +#define EXCL_PAT 0 +#define INCL_PAT 1 -#define MAX_LINE_MATCHES 32 +#define MAX_LINE_MATCHES 32 struct file { int fd; @@ -129,7 +129,7 @@ extern regex_t *er_pattern, *r_pattern; extern fastmatch_t *fg_pattern; /* For regex errors */ -#define RE_ERROR_BUF 512 +#define RE_ERROR_BUF 512 extern char re_error[RE_ERROR_BUF + 1]; /* Seems big enough */ /* util.c */ Modified: stable/9/usr.bin/grep/regex/tre-fastmatch.c ============================================================================== --- stable/9/usr.bin/grep/regex/tre-fastmatch.c Wed Apr 30 20:39:08 2014 (r265160) +++ stable/9/usr.bin/grep/regex/tre-fastmatch.c Wed Apr 30 20:46:52 2014 (r265161) @@ -444,7 +444,7 @@ static int fastcmp(const fastmatch_t *fg } /* - * Copies the pattern pat having lenght n to p and stores + * Copies the pattern pat having length n to p and stores * the size in l. */ #define SAVE_PATTERN(src, srclen, dst, dstlen) \ Modified: stable/9/usr.bin/printf/printf.c ============================================================================== --- stable/9/usr.bin/printf/printf.c Wed Apr 30 20:39:08 2014 (r265160) +++ stable/9/usr.bin/printf/printf.c Wed Apr 30 20:46:52 2014 (r265161) @@ -61,12 +61,12 @@ static const char rcsid[] = #include #ifdef SHELL -#define main printfcmd +#define main printfcmd #include "bltin/bltin.h" #include "error.h" #endif -#define PF(f, func) do { \ +#define PF(f, func) do { \ char *b = NULL; \ if (havewidth) \ if (haveprec) \ From owner-svn-src-stable@FreeBSD.ORG Thu May 1 00:31:21 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5DA81F7B; Thu, 1 May 2014 00:31:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48F7919F1; Thu, 1 May 2014 00:31:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s410VLsZ039125; Thu, 1 May 2014 00:31:21 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s410VJQd039117; Thu, 1 May 2014 00:31:19 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201405010031.s410VJQd039117@svn.freebsd.org> From: Warner Losh Date: Thu, 1 May 2014 00:31:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265166 - in stable/10/tools/tools/nanobsd: . Files/root dhcpd gateworks pcengines X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 May 2014 00:31:21 -0000 Author: imp Date: Thu May 1 00:31:19 2014 New Revision: 265166 URL: http://svnweb.freebsd.org/changeset/base/265166 Log: MFC: r258705,r258709,r263140,r263184,r263185,r263186,r263187,r263188, r263189,r263190,r263192,r263193,r263287,r263288,r263890,r264281, r264655,r264656,r264856,r264857,r264858,r264859,r264860,r264861, r264891,r264892,r264909 Catch up on all the referenced changes in -current, in brief: r258705 | n_hibma | Use NANO_PMAKE for build, but not install r258709 | mr | pkgng goo + bootstrap r263140 | glebius | Axe IPX. r263184 | imp | Fix build with spaces in names. r263185 | imp | Make pcengines config files compile again. r263186 | imp | Use UFS2 by default, but allow fallback to UFS1 r263187 | imp | Print an error message when we exit out early. r263188 | imp | Sometimes only copy MBR when backing via swap r263189 | imp | Update save_cfg r263190 | imp | Be more explicit about setting SRCCONF to /dev/null r263192 | imp | Rely on default UFS type r263193 | imp | Remove TARGET_BIG_ENDIAN. It's no longer relevant. r263287 | bdrewery | pkg(8) has no limits r263288 | bdrewery | Remove comment meant for removal in r263287 r263890 | imp | Up default media size to 1GB. r264281 | imp | Ignore .hg and .git files r264655 | imp | rm -x for safety r264656 | imp | new example: dhcpd derived from FreeNAS/BSDRP r264856 | imp | Override the parallel make target to use all CPUs. r264857 | imp | No need for true here, remove it. r264858 | imp | NANO_PKG_META_BASE r264859 | imp | stylize umount hack r264860 | imp | switch dhcpd to pkg(8). r264861 | imp | CR and CR0 added from dhcpd r264891 | imp | Try to alwaays use () for functions r264892 | imp | bash whines about r264857, revert r264909 | imp | Move back to {} for functions that need global effects Added: stable/10/tools/tools/nanobsd/dhcpd/ - copied from r264688, head/tools/tools/nanobsd/dhcpd/ Modified: stable/10/tools/tools/nanobsd/Files/root/save_cfg stable/10/tools/tools/nanobsd/dhcpd/common stable/10/tools/tools/nanobsd/dhcpd/os-base stable/10/tools/tools/nanobsd/gateworks/common stable/10/tools/tools/nanobsd/nanobsd.sh stable/10/tools/tools/nanobsd/pcengines/ALIX_DSK stable/10/tools/tools/nanobsd/pcengines/common.conf Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/tools/nanobsd/Files/root/save_cfg ============================================================================== --- stable/10/tools/tools/nanobsd/Files/root/save_cfg Thu May 1 00:12:24 2014 (r265165) +++ stable/10/tools/tools/nanobsd/Files/root/save_cfg Thu May 1 00:31:19 2014 (r265166) @@ -1,6 +1,7 @@ #!/bin/sh # # Copyright (c) 2006 Mathieu Arnold +# Copyright (c) 2010 Alex Bakhtin # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -32,11 +33,86 @@ set -e trap "umount /cfg" 1 2 15 EXIT mount /cfg ( +cd /etc +for filename in "$@" `find * -type f` +do + if [ ! -f /cfg/$filename -a ! -f /cfg/.ignore/$filename ] + then + + # + # If file doesn't exist in /cfg and file is not in the 'ignore' list + # then check if this file is exactly the same as original file + # in nanobsd image + # + if ! cmp -s /etc/$filename /conf/base/etc/$filename + then + file_path=`echo "$filename" | sed 's/\/[^/]*$//'` + if [ $file_path != $filename ] + then + if [ ! -d /etc/$file_path ] + then + # should never go here unless we have some errors in + # sed script extracting file path + echo "Error: Path /etc/$file_path is not directory." + exit 1; + fi + fi + + # + # Ask user - how should we handle this file. + # Add to cfg (y/n/i)? + # y) -> save this file in /cfg + # n) -> do not save this file in /cfg for current script invocation ONLY + # i) -> add file to ignore list (/cfg/.ignore hiereachy) and never save + # try to add this file to /cfg. + # + # touch is ised to add files to /cfg to keep the script flow straight and easy + # + read -p "New file /etc/$filename found. Add to /cfg (y/n/i)? " key + case "$key" in + [yY]) + if [ $file_path != $filename ] + then + mkdir -vp /cfg/$file_path + fi + touch /cfg/$filename && echo "File /etc/$filename added to /cfg." + ;; + [iI]) + mkdir -vp /cfg/.ignore + if [ $file_path != $filename ] + then + mkdir -vp /cfg/.ignore/$file_path + fi + touch /cfg/.ignore/$filename && echo "File /etc/$filename added to ignore list." + ;; + esac + fi + fi +done + +# +# Actually check all files in /cfg and save if necessary +# cd /cfg -for i in "$@" `find * -type f` +for filename in "$@" `find * -type f` do - cmp -s /etc/$i /cfg/$i || cp -pfv /etc/$i /cfg/$i + if [ -f /etc/$filename ] + then + cmp -s /etc/$filename /cfg/$filename || cp -pfv /etc/$filename /cfg/$filename + else + + # + # Give user an option to remove file from /cfg if this file is removed from /etc + # + read -p "File /cfg/$filename not found in /etc. Remove from /cfg (y/n)? " key + case "$key" in + [yY]) + rm /cfg/$filename && echo "File /cfg/$filename removed" + ;; + esac + fi done + ) umount /cfg trap 1 2 15 EXIT Modified: stable/10/tools/tools/nanobsd/dhcpd/common ============================================================================== --- head/tools/tools/nanobsd/dhcpd/common Sun Apr 20 06:46:04 2014 (r264688) +++ stable/10/tools/tools/nanobsd/dhcpd/common Thu May 1 00:31:19 2014 (r265166) @@ -33,7 +33,9 @@ # simplified to meet the needs of the example. # -NANO_PMAKE="make" # NB: disable -j 3 +# NB: You want the other file + +NANO_PMAKE="make -j $(sysctl -n hw.ncpu)" NANO_CFG_BASE=$(pwd) NANO_CFG_BASE=${NANO_CFG_BASE%/dhcpd} @@ -42,7 +44,8 @@ NANO_SRC=${NANO_SRC%/tools/tools/nanobsd NANO_OBJ=${NANO_SRC}/../dhcpd/obj # Where cust_pkg() finds packages to install #XXX: Is this the right place? -NANO_PORTS=${NANO_SRC}/../ports +#NANO_PORTS=$(realpath ${NANO_SRC}/../ports) +NANO_PORTS=/usr/ports NANO_PACKAGE_DIR=${NANO_SRC}/${NANO_TOOLS}/Pkg NANO_DATADIR=${NANO_OBJ}/_.data NANO_DATASIZE=40960 @@ -153,11 +156,6 @@ WITHOUT_RCS=true NANO_PACKAGE_ONLY=1 -CR() -{ - chroot ${NANO_WORLDDIR} /bin/sh -exc "$*" -} - # install a package from a pre-built binary do_add_pkg () { @@ -171,7 +169,7 @@ do_add_pkg () ${NANO_WORLDDIR}/usr/ports/packages mount -t nullfs -o noatime ${NANO_OBJ}/ports/distfiles \ ${NANO_WORLDDIR}/usr/ports/distfiles - CR "cd /usr/ports/packages/All;pkg_add -F $1.tbz" + CR env ASSUME_ALWAYS_YES=YES SIGNATURE_TYPE=none /usr/sbin/pkg add /usr/ports/packages/All/$1.txz umount ${NANO_WORLDDIR}/usr/ports/distfiles umount ${NANO_WORLDDIR}/usr/ports/packages rmdir ${NANO_WORLDDIR}/usr/ports/packages @@ -204,12 +202,16 @@ do_add_port () mount -t devfs devfs ${NANO_WORLDDIR}/dev mkdir -p ${NANO_WORLDDIR}/usr/workdir cp /etc/resolv.conf ${NANO_WORLDDIR}/etc/resolv.conf + # OK, a little inefficient, but likely not enough to worry about. + CR ldconfig /lib /usr/lib /usr/local/lib + CR ldconfig -R + CR ldconfig -r # Improvement: Don't know why package-recursive don't works here CR "env UNAME_p=${NANO_ARCH} TARGET=${NANO_ARCH} \ - TARGET_ARCH=${NANO_ARCH} make \ + TARGET_ARCH=${NANO_ARCH} PORTSDIR=${NANO_PORTS} make \ __MAKE_CONF=${NANO_MAKE_CONF_BUILD} \ WRKDIRPREFIX=/usr/workdir -C /usr/ports/$port_path \ - package BATCH=yes $* clean FORCE_PKG_REGISTER=t" + package-recursive BATCH=yes $* clean FORCE_PKG_REGISTER=t" rm ${NANO_WORLDDIR}/etc/resolv.conf rm -rf ${NANO_WORLDDIR}/usr/obj rm -rf ${NANO_WORLDDIR}/usr/workdir @@ -226,15 +228,14 @@ do_add_port () add_port () { local port_path=$1 local port=`echo $1 | sed -e 's/\//_/'` - export PORTSDIR=${NANO_PORTS} shift # Check if package allready exist # Need to: # 1. check ARCH of this package! # 2. Add a trap cd ${NANO_PORTS}/${port_path} - PKG_NAME=`make ${PKGNAME_HACK} PORTSDIR=${NANO_PORTS} __MAKE_CONF=${NANO_MAKE_CONF_BUILD} package-name` - if [ -f ${NANO_OBJ}/ports/packages/All/${PKG_NAME}.tbz ]; then + PKG_NAME=`env PORTSDIR=${NANO_PORTS} make __MAKE_CONF=${NANO_MAKE_CONF_BUILD} package-name` + if [ -f ${NANO_OBJ}/ports/packages/All/${PKG_NAME}.txz ]; then # Pkg file found: Generate add_pkg_NAME function eval " add_pkg_${port} () { @@ -265,6 +266,10 @@ create_amd64_diskimage() create_i386_diskimage "$*" } +# Automatically include the packaging port here so it is always first so it +# builds the port and adds the package so we can add other packages. +add_port ports-mgmt/pkg + rp=$(realpath ${NANO_OBJ}/) __a=`mount | grep ${rp} | awk '{print length($3), $3;}' | sort -rn | awk '{$1=""; print;}'` if [ -n "$__a" ]; then Modified: stable/10/tools/tools/nanobsd/dhcpd/os-base ============================================================================== --- head/tools/tools/nanobsd/dhcpd/os-base Sun Apr 20 06:46:04 2014 (r264688) +++ stable/10/tools/tools/nanobsd/dhcpd/os-base Thu May 1 00:31:19 2014 (r265166) @@ -108,28 +108,6 @@ save_build ( ) } customize_cmd save_build -# Move the $world/data to the /data partion -move_data() -{ - db=${NANO_WORLDDIR}/data - rm -rf ${NANO_DATADIR} - mkdir -p ${NANO_DATADIR} - ( cd ${db} ; find . | cpio -R root:wheel -dumpv ${NANO_DATADIR} ) - rm -rf ${db} -} -customize_cmd move_data - -add_data_to_fstab ( ) -{ - ( - cd ${NANO_WORLDDIR} - echo "/dev/${NANO_DRIVE}s4 /data ufs rw,noatime 2 2" >> etc/fstab - mkdir -p data - ) - -} -customize_cmd add_data_to_fstab - remove_patch_divots ( ) { find ${NANO_WORLDDIR} -name \*.orig -or -name \*.rej -delete @@ -168,7 +146,7 @@ customize_cmd unmute_console_logging fi -freenas_custom() +product_custom() { gzip -v9 ${NANO_WORLDDIR}/boot/kernel/kernel @@ -199,29 +177,10 @@ freenas_custom() # magic.mgc is just a speed optimization. Kill it for 1.7MB rm -f ${NANO_WORLDDIR}/usr/share/misc/magic.mgc - # strip binaries (saves spaces on non-debug images). - if [ "${DEBUG}" != 1 ]; then - pprint 4 "Stripping binaries and libraries" - for dir in $(find ${NANO_WORLDDIR}/usr/local -name '*bin' -or -name 'libexec' -maxdepth 3); do - for f in $(find $dir -type f); do - if ! dontstrip "$f" - then - strip 2>/dev/null $f || : - fi - done - done - # .so's are the only thing that need to be stripped. The rest - # should remain untouched. - for f in $(find ${NANO_WORLDDIR}/usr/local/lib -name '*.so' -or -name '*.so.*' -maxdepth 3); do - strip 2>/dev/null $f || : - done - fi - # Last second tweaks chown -R root:wheel ${NANO_WORLDDIR}/root chmod 0755 ${NANO_WORLDDIR}/root/* chmod 0755 ${NANO_WORLDDIR}/* - chmod 0440 ${NANO_WORLDDIR}/usr/local/etc/sudoers chown -R root:wheel ${NANO_WORLDDIR}/etc chown -R root:wheel ${NANO_WORLDDIR}/boot chown root:wheel ${NANO_WORLDDIR}/ @@ -229,16 +188,7 @@ freenas_custom() find ${NANO_WORLDDIR} -type f -name "*~" -delete find ${NANO_WORLDDIR}/usr/local -type f -name "*.po" -delete find ${NANO_WORLDDIR} -type f -name "*.service" -delete - mkdir ${NANO_WORLDDIR}/data/zfs - ln -s -f /usr/local/bin/bash ${NANO_WORLDDIR}/bin/bash - ln -s -f /data/zfs/zpool.cache ${NANO_WORLDDIR}/boot/zfs/zpool.cache - - # This is wrong. Needs a way to tell kernel how to find the mount utility - # instead. - mv ${NANO_WORLDDIR}/sbin/mount_ntfs ${NANO_WORLDDIR}/sbin/mount_ntfs-kern - ln -s -f /usr/local/bin/ntfs-3g ${NANO_WORLDDIR}/sbin/mount_ntfs - } -late_customize_cmd freenas_custom +late_customize_cmd product_custom fi # [ $PACKAGE_PREP_BUILD = 1 ] Modified: stable/10/tools/tools/nanobsd/gateworks/common ============================================================================== --- stable/10/tools/tools/nanobsd/gateworks/common Thu May 1 00:12:24 2014 (r265165) +++ stable/10/tools/tools/nanobsd/gateworks/common Thu May 1 00:31:19 2014 (r265166) @@ -125,7 +125,6 @@ WITHOUT_HTML=true WITHOUT_INET6=true WITHOUT_INFO=true WITHOUT_IPFILTER=true -WITHOUT_IPX=true WITHOUT_KERBEROS=true WITHOUT_LOCALES=true WITHOUT_LPR=true Modified: stable/10/tools/tools/nanobsd/nanobsd.sh ============================================================================== --- stable/10/tools/tools/nanobsd/nanobsd.sh Thu May 1 00:12:24 2014 (r265165) +++ stable/10/tools/tools/nanobsd/nanobsd.sh Thu May 1 00:31:19 2014 (r265166) @@ -49,6 +49,9 @@ NANO_TOOLS=tools/tools/nanobsd NANO_PACKAGE_DIR=${NANO_SRC}/${NANO_TOOLS}/Pkg NANO_PACKAGE_LIST="*" +# where package metadata gets placed +NANO_PKG_META_BASE=/var/db + # Object tree directory # default is subdir of /usr/obj #NANO_OBJ="" @@ -57,7 +60,8 @@ NANO_PACKAGE_LIST="*" # default is ${NANO_OBJ} #NANO_DISKIMGDIR="" -# Parallel Make +# Make & parallel Make +NANO_MAKE="make" NANO_PMAKE="make -j 3" # The default name for any image we create. @@ -85,13 +89,13 @@ NANO_CUSTOMIZE="" NANO_LATE_CUSTOMIZE="" # Newfs paramters to use -NANO_NEWFS="-b 4096 -f 512 -i 8192 -O1 -U" +NANO_NEWFS="-b 4096 -f 512 -i 8192 -U" # The drive name of the media at runtime NANO_DRIVE=ad0 # Target media size in 512 bytes sectors -NANO_MEDIASIZE=1500000 +NANO_MEDIASIZE=2000000 # Number of code images on media (1 or 2) NANO_IMAGES=2 @@ -135,6 +139,9 @@ NANO_BOOT2CFG="-h" # Can be "file" or "swap" NANO_MD_BACKING="file" +# for swap type md(4) backing, write out the mbr only +NANO_IMAGE_MBRONLY=true + # Progress Print level PPLEVEL=3 @@ -159,6 +166,10 @@ NANO_CFGDIR="" # Directory to populate /data from NANO_DATADIR="" +# src.conf to use when building the image. Defaults to /dev/null for the sake +# of determinism. +SRCCONF=${SRCCONF:=/dev/null} + ####################################################################### # # The functions which do the real work. @@ -166,12 +177,31 @@ NANO_DATADIR="" # ####################################################################### +# run in the world chroot, errors fatal +CR() +{ + chroot ${NANO_WORLDDIR} /bin/sh -exc "$*" +} + +# run in the world chroot, errors not fatal +CR0() +{ + chroot ${NANO_WORLDDIR} /bin/sh -c "$*" || true +} + +nano_cleanup ( ) ( + if [ $? -ne 0 ]; then + echo "Error encountered. Check for errors in last log file." 1>&2 + fi + exit $? +) + clean_build ( ) ( pprint 2 "Clean and create object directory (${MAKEOBJDIRPREFIX})" - if ! rm -rf ${MAKEOBJDIRPREFIX} > /dev/null 2>&1 ; then - chflags -R noschg ${MAKEOBJDIRPREFIX} - rm -r ${MAKEOBJDIRPREFIX} + if ! rm -xrf ${MAKEOBJDIRPREFIX}/ > /dev/null 2>&1 ; then + chflags -R noschg ${MAKEOBJDIRPREFIX}/ + rm -xr ${MAKEOBJDIRPREFIX}/ fi mkdir -p ${MAKEOBJDIRPREFIX} printenv > ${MAKEOBJDIRPREFIX}/_.env @@ -182,7 +212,6 @@ make_conf_build ( ) ( echo "${CONF_WORLD}" > ${NANO_MAKE_CONF_BUILD} echo "${CONF_BUILD}" >> ${NANO_MAKE_CONF_BUILD} - echo "SRCCONF=/dev/null" >> ${NANO_MAKE_CONF_BUILD} ) build_world ( ) ( @@ -191,17 +220,20 @@ build_world ( ) ( cd ${NANO_SRC} env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} \ + SRCCONF=${SRCCONF} \ __MAKE_CONF=${NANO_MAKE_CONF_BUILD} buildworld \ > ${MAKEOBJDIRPREFIX}/_.bw 2>&1 ) build_kernel ( ) ( + local extra + pprint 2 "build kernel ($NANO_KERNEL)" pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.bk" ( if [ -f ${NANO_KERNEL} ] ; then - kernconfdir=$(realpath $(dirname ${NANO_KERNEL})) + extra="KERNCONFDIR=$(realpath $(dirname ${NANO_KERNEL}))" kernconf=$(basename ${NANO_KERNEL}) else kernconf=${NANO_KERNEL} @@ -211,12 +243,11 @@ build_kernel ( ) ( # unset these just in case to avoid compiler complaints # when cross-building unset TARGET_CPUTYPE - unset TARGET_BIG_ENDIAN # Note: We intentionally build all modules, not only the ones in # NANO_MODULES so the built world can be reused by multiple images. env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} buildkernel \ - __MAKE_CONF=${NANO_MAKE_CONF_BUILD} \ - ${kernconfdir:+"KERNCONFDIR="}${kernconfdir} \ + SRCCONF=${SRCCONF} \ + ${extra} __MAKE_CONF=${NANO_MAKE_CONF_BUILD} \ KERNCONF=${kernconf} ) > ${MAKEOBJDIRPREFIX}/_.bk 2>&1 ) @@ -224,17 +255,17 @@ build_kernel ( ) ( clean_world ( ) ( if [ "${NANO_OBJ}" != "${MAKEOBJDIRPREFIX}" ]; then pprint 2 "Clean and create object directory (${NANO_OBJ})" - if ! rm -rf ${NANO_OBJ} > /dev/null 2>&1 ; then + if ! rm -rxf ${NANO_OBJ}/ > /dev/null 2>&1 ; then chflags -R noschg ${NANO_OBJ} - rm -r ${NANO_OBJ} + rm -xr ${NANO_OBJ}/ fi mkdir -p ${NANO_OBJ} ${NANO_WORLDDIR} printenv > ${NANO_OBJ}/_.env else pprint 2 "Clean and create world directory (${NANO_WORLDDIR})" - if ! rm -rf ${NANO_WORLDDIR}/ > /dev/null 2>&1 ; then + if ! rm -rxf ${NANO_WORLDDIR}/ > /dev/null 2>&1 ; then chflags -R noschg ${NANO_WORLDDIR} - rm -rf ${NANO_WORLDDIR} + rm -rxf ${NANO_WORLDDIR}/ fi mkdir -p ${NANO_WORLDDIR} fi @@ -245,7 +276,6 @@ make_conf_install ( ) ( echo "${CONF_WORLD}" > ${NANO_MAKE_CONF_INSTALL} echo "${CONF_INSTALL}" >> ${NANO_MAKE_CONF_INSTALL} - echo "SRCCONF=/dev/null" >> ${NANO_MAKE_CONF_INSTALL} ) install_world ( ) ( @@ -254,7 +284,8 @@ install_world ( ) ( cd ${NANO_SRC} env TARGET_ARCH=${NANO_ARCH} \ - ${NANO_PMAKE} __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} installworld \ + ${NANO_MAKE} SRCCONF=${SRCCONF} \ + __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} installworld \ DESTDIR=${NANO_WORLDDIR} \ > ${NANO_OBJ}/_.iw 2>&1 chflags -R noschg ${NANO_WORLDDIR} @@ -267,7 +298,8 @@ install_etc ( ) ( cd ${NANO_SRC} env TARGET_ARCH=${NANO_ARCH} \ - ${NANO_PMAKE} __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} distribution \ + ${NANO_MAKE} SRCCONF=${SRCCONF} \ + __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} distribution \ DESTDIR=${NANO_WORLDDIR} \ > ${NANO_OBJ}/_.etc 2>&1 # make.conf doesn't get created by default, but some ports need it @@ -276,22 +308,24 @@ install_etc ( ) ( ) install_kernel ( ) ( + local extra + pprint 2 "install kernel ($NANO_KERNEL)" pprint 3 "log: ${NANO_OBJ}/_.ik" ( if [ -f ${NANO_KERNEL} ] ; then - kernconfdir=$(realpath $(dirname ${NANO_KERNEL})) + extra="KERNCONFDIR=$(realpath $(dirname ${NANO_KERNEL}))" kernconf=$(basename ${NANO_KERNEL}) else kernconf=${NANO_KERNEL} fi cd ${NANO_SRC} - env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} installkernel \ + env TARGET_ARCH=${NANO_ARCH} ${NANO_MAKE} installkernel \ DESTDIR=${NANO_WORLDDIR} \ - __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} \ - ${kernconfdir:+"KERNCONFDIR="}${kernconfdir} \ + SRCCONF=${SRCCONF} \ + ${extra} __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} \ KERNCONF=${kernconf} \ MODULES_OVERRIDE="${NANO_MODULES}" ) > ${NANO_OBJ}/_.ik 2>&1 @@ -406,6 +440,12 @@ newfs_part ( ) ( mount -o async ${dev} ${mnt} ) +# Convenient spot to work around any umount issues that your build environment +# hits by overriding this method. +nano_umount () ( + umount ${1} +) + populate_slice ( ) ( local dev dir mnt lbl dev=$1 @@ -417,10 +457,10 @@ populate_slice ( ) ( if [ -n "${dir}" -a -d "${dir}" ]; then echo "Populating ${lbl} from ${dir}" cd ${dir} - find . -print | grep -Ev '/(CVS|\.svn)' | cpio -dumpv ${mnt} + find . -print | grep -Ev '/(CVS|\.svn|\.hg|\.git)' | cpio -dumpv ${mnt} fi df -i ${mnt} - umount ${mnt} + nano_umount ${mnt} ) populate_cfg_slice ( ) ( @@ -519,7 +559,7 @@ create_i386_diskimage ( ) ( -y ${NANO_HEADS}` fi - trap "echo 'Running exit trap code' ; df -i ${MNT} ; umount ${MNT} || true ; mdconfig -d -u $MD" 1 2 15 EXIT + trap "echo 'Running exit trap code' ; df -i ${MNT} ; nano_umount ${MNT} || true ; mdconfig -d -u $MD" 1 2 15 EXIT fdisk -i -f ${NANO_OBJ}/_.fdisk ${MD} fdisk ${MD} @@ -535,7 +575,7 @@ create_i386_diskimage ( ) ( echo "Generating mtree..." ( cd ${MNT} && mtree -c ) > ${NANO_OBJ}/_.mtree ( cd ${MNT} && du -k ) > ${NANO_OBJ}/_.du - umount ${MNT} + nano_umount ${MNT} if [ $NANO_IMAGES -gt 1 -a $NANO_INIT_IMG2 -gt 0 ] ; then # Duplicate to second image (if present) @@ -546,7 +586,7 @@ create_i386_diskimage ( ) ( do sed -i "" "s=${NANO_DRIVE}s1=${NANO_DRIVE}s2=g" $f done - umount ${MNT} + nano_umount ${MNT} # Override the label from the first partition so we # don't confuse glabel with duplicates. if [ ! -z ${NANO_LABEL} ]; then @@ -563,6 +603,14 @@ create_i386_diskimage ( ) ( fi if [ "${NANO_MD_BACKING}" = "swap" ] ; then + if [ ${NANO_IMAGE_MBRONLY} ]; then + echo "Writing out _.disk.mbr..." + dd if=/dev/${MD} of=${NANO_DISKIMGDIR}/_.disk.mbr bs=512 count=1 + else + echo "Writing out ${NANO_IMGNAME}..." + dd if=/dev/${MD} of=${IMG} bs=64k + fi + echo "Writing out ${NANO_IMGNAME}..." dd conv=sparse if=/dev/${MD} of=${IMG} bs=64k fi @@ -573,7 +621,8 @@ create_i386_diskimage ( ) ( fi mdconfig -d -u $MD - trap - 1 2 15 EXIT + trap - 1 2 15 + trap nano_cleanup EXIT ) > ${NANO_OBJ}/_.di 2>&1 ) @@ -677,7 +726,7 @@ cust_allow_ssh_root () ( cust_install_files () ( cd ${NANO_TOOLS}/Files - find . -print | grep -Ev '/(CVS|\.svn)' | cpio -Ldumpv ${NANO_WORLDDIR} + find . -print | grep -Ev '/(CVS|\.svn|\.hg|\.git)' | cpio -Ldumpv ${NANO_WORLDDIR} ) ####################################################################### @@ -692,7 +741,7 @@ cust_pkg () ( fi # Copy packages into chroot - mkdir -p ${NANO_WORLDDIR}/Pkg + mkdir -p ${NANO_WORLDDIR}/Pkg ${NANO_WORLDDIR}/${NANO_PKG_META_BASE}/pkg ( cd ${NANO_PACKAGE_DIR} find ${NANO_PACKAGE_LIST} -print | @@ -707,18 +756,17 @@ cust_pkg () ( while true do # Record how many we have now - have=`ls ${NANO_WORLDDIR}/var/db/pkg | wc -l` + have=`ls ${NANO_WORLDDIR}/${NANO_PKG_META_BASE}/pkg | wc -l` # Attempt to install more packages # ...but no more than 200 at a time due to pkg_add's internal # limitations. - chroot ${NANO_WORLDDIR} sh -c \ - 'ls Pkg/*tbz | xargs -n 200 pkg_add -F' || true + CR0 'ls Pkg/*tbz | xargs -n 200 env PKG_DBDIR='${NANO_PKG_META_BASE}'/pkg pkg_add -v -F' # See what that got us - now=`ls ${NANO_WORLDDIR}/var/db/pkg | wc -l` + now=`ls ${NANO_WORLDDIR}/${NANO_PKG_META_BASE}/pkg | wc -l` echo "=== NOW $now" - ls ${NANO_WORLDDIR}/var/db/pkg + ls ${NANO_WORLDDIR}/${NANO_PKG_META_BASE}/pkg echo "===" @@ -730,7 +778,71 @@ cust_pkg () ( exit 2 fi done - rm -rf ${NANO_WORLDDIR}/Pkg + rm -rxf ${NANO_WORLDDIR}/Pkg +) + +cust_pkgng () ( + + # If the package directory doesn't exist, we're done. + if [ ! -d ${NANO_PACKAGE_DIR} ]; then + echo "DONE 0 packages" + return 0 + fi + + # Find a pkg-* package + for x in `find -s ${NANO_PACKAGE_DIR} -iname 'pkg-*'`; do + _NANO_PKG_PACKAGE=`basename "$x"` + done + if [ -z "${_NANO_PKG_PACKAGE}" -o ! -f "${NANO_PACKAGE_DIR}/${_NANO_PKG_PACKAGE}" ]; then + echo "FAILED: need a pkg/ package for bootstrapping" + exit 2 + fi + + # Copy packages into chroot + mkdir -p ${NANO_WORLDDIR}/Pkg + ( + cd ${NANO_PACKAGE_DIR} + find ${NANO_PACKAGE_LIST} -print | + cpio -Ldumpv ${NANO_WORLDDIR}/Pkg + ) + + #Bootstrap pkg + CR env ASSUME_ALWAYS_YES=YES SIGNATURE_TYPE=none /usr/sbin/pkg add /Pkg/${_NANO_PKG_PACKAGE} + CR pkg -N >/dev/null 2>&1 + if [ "$?" -ne "0" ]; then + echo "FAILED: pkg bootstrapping faied" + exit 2 + fi + rm -f ${NANO_WORLDDIR}/Pkg/pkg-* + + # Count & report how many we have to install + todo=`ls ${NANO_WORLDDIR}/Pkg | /usr/bin/wc -l` + todo=$(expr $todo + 1) # add one for pkg since it is installed already + echo "=== TODO: $todo" + ls ${NANO_WORLDDIR}/Pkg + echo "===" + while true + do + # Record how many we have now + have=$(CR env ASSUME_ALWAYS_YES=YES /usr/sbin/pkg info | /usr/bin/wc -l) + + # Attempt to install more packages + CR0 'ls 'Pkg/*txz' | xargs env ASSUME_ALWAYS_YES=YES /usr/sbin/pkg add' + + # See what that got us + now=$(CR env ASSUME_ALWAYS_YES=YES /usr/sbin/pkg info | /usr/bin/wc -l) + echo "=== NOW $now" + CR env ASSUME_ALWAYS_YES=YES /usr/sbin/pkg info + echo "===" + if [ $now -eq $todo ] ; then + echo "DONE $now packages" + break + elif [ $now -eq $have ] ; then + echo "FAILED: Nothing happened on this pass" + exit 2 + fi + done + rm -rxf ${NANO_WORLDDIR}/Pkg ) ####################################################################### @@ -758,12 +870,12 @@ late_customize_cmd () { # Progress Print # Print $2 at level $1. -pprint() { +pprint() ( if [ "$1" -le $PPLEVEL ]; then runtime=$(( `date +%s` - $NANO_STARTTIME )) printf "%s %.${1}s %s\n" "`date -u -r $runtime +%H:%M:%S`" "#####" "$2" 1>&3 fi -} +) usage () { ( @@ -855,6 +967,8 @@ if [ $# -gt 0 ] ; then usage fi +trap nano_cleanup EXIT + ####################################################################### # Setup and Export Internal variables # @@ -878,6 +992,7 @@ fi if $do_clean ; then true else + NANO_MAKE="${NANO_MAKE} -DNO_CLEAN" NANO_PMAKE="${NANO_PMAKE} -DNO_CLEAN" fi @@ -897,6 +1012,7 @@ export NANO_DRIVE export NANO_HEADS export NANO_IMAGES export NANO_IMGNAME +export NANO_MAKE export NANO_MAKE_CONF_BUILD export NANO_MAKE_CONF_INSTALL export NANO_MEDIASIZE Modified: stable/10/tools/tools/nanobsd/pcengines/ALIX_DSK ============================================================================== --- stable/10/tools/tools/nanobsd/pcengines/ALIX_DSK Thu May 1 00:12:24 2014 (r265165) +++ stable/10/tools/tools/nanobsd/pcengines/ALIX_DSK Thu May 1 00:31:19 2014 (r265166) @@ -23,6 +23,9 @@ options PSEUDOFS options GEOM_PART_GPT options GEOM_LABEL options COMPAT_43TTY +options COMPAT_FREEBSD4 # Compatible with FreeBSD4 +options COMPAT_FREEBSD5 # Compatible with FreeBSD5 +options COMPAT_FREEBSD6 # Compatible with FreeBSD6 options COMPAT_FREEBSD7 options SCSI_DELAY=5000 options SYSVSHM @@ -32,12 +35,11 @@ options P1003_1B_SEMAPHORES options _KPOSIX_PRIORITY_SCHEDULING options PRINTF_BUFR_SIZE=128 device apic +device cpufreq +device acpi device pci device fdc device ata -device atadisk -device atapicd -device atapist options ATA_STATIC_ID device scbus device da Modified: stable/10/tools/tools/nanobsd/pcengines/common.conf ============================================================================== --- stable/10/tools/tools/nanobsd/pcengines/common.conf Thu May 1 00:12:24 2014 (r265165) +++ stable/10/tools/tools/nanobsd/pcengines/common.conf Thu May 1 00:31:19 2014 (r265166) @@ -2,8 +2,11 @@ # $FreeBSD$ # -NANO_TOOLS=`pwd` -NANO_PACKAGE_DIR=`pwd`/Pkg +NANO_SRC=$(pwd) +NANO_SRC=${NANO_SRC%/tools/tools/nanobsd/pcengines} +NANO_OBJ=${NANO_SRC}/../${NANO_NAME}/obj +NANO_TOOLS=$(pwd) +NANO_PACKAGE_DIR=$(pwd)/Pkg #NANO_RAM_TMPVARSIZE=20480 #NANO_RAM_TMPVARSIZE=30720 NANO_RAM_TMPVARSIZE=40960 From owner-svn-src-stable@FreeBSD.ORG Thu May 1 03:16:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 418C127D; Thu, 1 May 2014 03:16:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E7A418A7; Thu, 1 May 2014 03:16:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s413GePG006818; Thu, 1 May 2014 03:16:40 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s413GeoI006817; Thu, 1 May 2014 03:16:40 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201405010316.s413GeoI006817@svn.freebsd.org> From: Mark Johnston Date: Thu, 1 May 2014 03:16:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265168 - stable/9/sys/conf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 May 2014 03:16:41 -0000 Author: markj Date: Thu May 1 03:16:40 2014 New Revision: 265168 URL: http://svnweb.freebsd.org/changeset/base/265168 Log: MFC r262733: Use a full path to the target for make rules which create symlinks @, machine and ${MACHINE_CPUARCH}. Otherwise the presence of a file named "x86" or "x86.c" in the make path can cause problems. Modified: stable/9/sys/conf/kmod.mk Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) Modified: stable/9/sys/conf/kmod.mk ============================================================================== --- stable/9/sys/conf/kmod.mk Thu May 1 01:42:48 2014 (r265167) +++ stable/9/sys/conf/kmod.mk Thu May 1 03:16:40 2014 (r265168) @@ -243,7 +243,7 @@ beforedepend: ${_ILINKS} # causes all the modules to be rebuilt when the directory pointed to changes. .for _link in ${_ILINKS} .if !exists(${.OBJDIR}/${_link}) -${OBJS}: ${_link} +${OBJS}: ${.OBJDIR}/${_link} .endif .endfor @@ -257,18 +257,23 @@ SYSDIR= ${_dir} .error "can't find kernel source tree" .endif -${_ILINKS}: - @case ${.TARGET} in \ +.for _link in ${_ILINKS} +.PHONY: ${_link} +${_link}: ${.OBJDIR}/${_link} + +${.OBJDIR}/${_link}: + @case ${.TARGET:T} in \ machine) \ path=${SYSDIR}/${MACHINE}/include ;; \ @) \ path=${SYSDIR} ;; \ *) \ - path=${SYSDIR}/${.TARGET}/include ;; \ + path=${SYSDIR}/${.TARGET:T}/include ;; \ esac ; \ path=`(cd $$path && /bin/pwd)` ; \ - ${ECHO} ${.TARGET} "->" $$path ; \ - ln -sf $$path ${.TARGET} + ${ECHO} ${.TARGET:T} "->" $$path ; \ + ln -sf $$path ${.TARGET:T} +.endfor CLEANFILES+= ${PROG} ${KMOD}.kld ${OBJS} From owner-svn-src-stable@FreeBSD.ORG Thu May 1 03:18:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E4F7845D; Thu, 1 May 2014 03:18:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D297518BD; Thu, 1 May 2014 03:18:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s413IBre007223; Thu, 1 May 2014 03:18:11 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s413IBlE007222; Thu, 1 May 2014 03:18:11 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201405010318.s413IBlE007222@svn.freebsd.org> From: Mark Johnston Date: Thu, 1 May 2014 03:18:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265169 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 May 2014 03:18:12 -0000 Author: markj Date: Thu May 1 03:18:11 2014 New Revision: 265169 URL: http://svnweb.freebsd.org/changeset/base/265169 Log: MFC r262733: Use a full path to the target for make rules which create symlinks @, machine and ${MACHINE_CPUARCH}. Otherwise the presence of a file named "x86" or "x86.c" in the make path can cause problems. Modified: stable/10/sys/conf/kmod.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/kmod.mk ============================================================================== --- stable/10/sys/conf/kmod.mk Thu May 1 03:16:40 2014 (r265168) +++ stable/10/sys/conf/kmod.mk Thu May 1 03:18:11 2014 (r265169) @@ -238,7 +238,7 @@ beforedepend: ${_ILINKS} # causes all the modules to be rebuilt when the directory pointed to changes. .for _link in ${_ILINKS} .if !exists(${.OBJDIR}/${_link}) -${OBJS}: ${_link} +${OBJS}: ${.OBJDIR}/${_link} .endif .endfor @@ -252,18 +252,23 @@ SYSDIR= ${_dir} .error "can't find kernel source tree" .endif -${_ILINKS}: - @case ${.TARGET} in \ +.for _link in ${_ILINKS} +.PHONY: ${_link} +${_link}: ${.OBJDIR}/${_link} + +${.OBJDIR}/${_link}: + @case ${.TARGET:T} in \ machine) \ path=${SYSDIR}/${MACHINE}/include ;; \ @) \ path=${SYSDIR} ;; \ *) \ - path=${SYSDIR}/${.TARGET}/include ;; \ + path=${SYSDIR}/${.TARGET:T}/include ;; \ esac ; \ path=`(cd $$path && /bin/pwd)` ; \ - ${ECHO} ${.TARGET} "->" $$path ; \ - ln -sf $$path ${.TARGET} + ${ECHO} ${.TARGET:T} "->" $$path ; \ + ln -sf $$path ${.TARGET:T} +.endfor CLEANFILES+= ${PROG} ${KMOD}.kld ${OBJS} From owner-svn-src-stable@FreeBSD.ORG Thu May 1 11:38:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E965F5A; Thu, 1 May 2014 11:38:05 +0000 (UTC) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F084103D; Thu, 1 May 2014 11:38:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.5/8.14.5) with ESMTP id s41Bbc2B068694; Thu, 1 May 2014 15:37:43 +0400 (MSK) (envelope-from marck@rinet.ru) Date: Thu, 1 May 2014 15:37:38 +0400 (MSK) From: Dmitry Morozovsky To: "'Devin Teske'" Subject: RE: svn commit: r265126 - stable/4/lib/libdisk In-Reply-To: <00fd01cf642d$008b5170$01a1f450$@FreeBSD.org> Message-ID: References: <201404300424.s3U4OL1o026292@svn.freebsd.org> <20140430042845.GL44239@glenbarber.us> <00fd01cf642d$008b5170$01a1f450$@FreeBSD.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (woozle.rinet.ru [0.0.0.0]); Thu, 01 May 2014 15:37:43 +0400 (MSK) Cc: 'Glen Barber' , svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-other@freebsd.org, svn-src-stable@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 May 2014 11:38:05 -0000 On Tue, 29 Apr 2014, dteske@freebsd.org wrote: > > > Log: > > > Teach libdisk about mfid devices. This is a direct commit to stable/4 > > > since stable/5 and newer have r105681 which made this code obsolete. > > > > > > Modified: > > > stable/4/lib/libdisk/create_chunk.c > > > stable/4/lib/libdisk/disk.c > > > > stable/4? > > > > Full moon was two weeks ago. > > > > I've got more ;D part of decommissioning 4 @ $work. > Memorializing some things that we ran with in production > for years and years but never saw committed back. Just a > nod to the venerable branch as we say farewell to it. > > These commits are beyond uber-tested and wanted to > share them. Actually, much thanks for doing this. -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-stable@FreeBSD.ORG Fri May 2 10:29:55 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1C4C2A54; Fri, 2 May 2014 10:29:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08A15160D; Fri, 2 May 2014 10:29:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s42ATs1i081783; Fri, 2 May 2014 10:29:54 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s42ATs1L081782; Fri, 2 May 2014 10:29:54 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201405021029.s42ATs1L081782@svn.freebsd.org> From: Marius Strobl Date: Fri, 2 May 2014 10:29:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265220 - stable/10/contrib/libstdc++/include/bits X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 May 2014 10:29:55 -0000 Author: marius Date: Fri May 2 10:29:54 2014 New Revision: 265220 URL: http://svnweb.freebsd.org/changeset/base/265220 Log: MFC: r265090 Merge r133175 from upstream: 2008-03-13 Dennis Czeremin PR libstdc++/35566 * include/bits/stl_multimap.h (multimap<>::multimap(_InputIterator, _InputIterator)): Forward to _M_insert_equal, not _M_insert_unique. This patch was GPL2 at the time and fixes a regression introduced with the merge of GCC r129013 in FreeBSD r236829. Sponsored by: Bally Wulff Games & Entertainment GmbH Modified: stable/10/contrib/libstdc++/include/bits/stl_multimap.h Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/libstdc++/include/bits/stl_multimap.h ============================================================================== --- stable/10/contrib/libstdc++/include/bits/stl_multimap.h Fri May 2 10:02:37 2014 (r265219) +++ stable/10/contrib/libstdc++/include/bits/stl_multimap.h Fri May 2 10:29:54 2014 (r265220) @@ -185,7 +185,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL template multimap(_InputIterator __first, _InputIterator __last) : _M_t() - { _M_t._M_insert_unique(__first, __last); } + { _M_t._M_insert_equal(__first, __last); } /** * @brief Builds a %multimap from a range. From owner-svn-src-stable@FreeBSD.ORG Fri May 2 10:31:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 95D05BD6; Fri, 2 May 2014 10:31:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 827781683; Fri, 2 May 2014 10:31:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s42AVCUP084243; Fri, 2 May 2014 10:31:12 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s42AVCK2084242; Fri, 2 May 2014 10:31:12 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201405021031.s42AVCK2084242@svn.freebsd.org> From: Marius Strobl Date: Fri, 2 May 2014 10:31:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265221 - stable/9/contrib/libstdc++/include/bits X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 May 2014 10:31:12 -0000 Author: marius Date: Fri May 2 10:31:12 2014 New Revision: 265221 URL: http://svnweb.freebsd.org/changeset/base/265221 Log: MFC: r265090 Merge r133175 from upstream: 2008-03-13 Dennis Czeremin PR libstdc++/35566 * include/bits/stl_multimap.h (multimap<>::multimap(_InputIterator, _InputIterator)): Forward to _M_insert_equal, not _M_insert_unique. This patch was GPL2 at the time and fixes a regression introduced with the merge of GCC r129013 in FreeBSD r236829 (merged to stable/9 in r237507). Sponsored by: Bally Wulff Games & Entertainment GmbH Modified: stable/9/contrib/libstdc++/include/bits/stl_multimap.h Directory Properties: stable/9/contrib/libstdc++/ (props changed) Modified: stable/9/contrib/libstdc++/include/bits/stl_multimap.h ============================================================================== --- stable/9/contrib/libstdc++/include/bits/stl_multimap.h Fri May 2 10:29:54 2014 (r265220) +++ stable/9/contrib/libstdc++/include/bits/stl_multimap.h Fri May 2 10:31:12 2014 (r265221) @@ -185,7 +185,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL template multimap(_InputIterator __first, _InputIterator __last) : _M_t() - { _M_t._M_insert_unique(__first, __last); } + { _M_t._M_insert_equal(__first, __last); } /** * @brief Builds a %multimap from a range. From owner-svn-src-stable@FreeBSD.ORG Fri May 2 10:31:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CC3C3D10; Fri, 2 May 2014 10:31:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B8B5B168F; Fri, 2 May 2014 10:31:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s42AVgIb084669; Fri, 2 May 2014 10:31:42 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s42AVgAr084668; Fri, 2 May 2014 10:31:42 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201405021031.s42AVgAr084668@svn.freebsd.org> From: Marius Strobl Date: Fri, 2 May 2014 10:31:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r265222 - stable/8/contrib/libstdc++/include/bits X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 May 2014 10:31:42 -0000 Author: marius Date: Fri May 2 10:31:42 2014 New Revision: 265222 URL: http://svnweb.freebsd.org/changeset/base/265222 Log: MFC: r265090 Merge r133175 from upstream: 2008-03-13 Dennis Czeremin PR libstdc++/35566 * include/bits/stl_multimap.h (multimap<>::multimap(_InputIterator, _InputIterator)): Forward to _M_insert_equal, not _M_insert_unique. This patch was GPL2 at the time and fixes a regression introduced with the merge of GCC r129013 in FreeBSD r236829 (merged to stable/8 in r237508). Sponsored by: Bally Wulff Games & Entertainment GmbH Modified: stable/8/contrib/libstdc++/include/bits/stl_multimap.h Directory Properties: stable/8/contrib/libstdc++/ (props changed) Modified: stable/8/contrib/libstdc++/include/bits/stl_multimap.h ============================================================================== --- stable/8/contrib/libstdc++/include/bits/stl_multimap.h Fri May 2 10:31:12 2014 (r265221) +++ stable/8/contrib/libstdc++/include/bits/stl_multimap.h Fri May 2 10:31:42 2014 (r265222) @@ -185,7 +185,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL template multimap(_InputIterator __first, _InputIterator __last) : _M_t() - { _M_t._M_insert_unique(__first, __last); } + { _M_t._M_insert_equal(__first, __last); } /** * @brief Builds a %multimap from a range. From owner-svn-src-stable@FreeBSD.ORG Fri May 2 14:44:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23F09D9D; Fri, 2 May 2014 14:44:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1104F1FD7; Fri, 2 May 2014 14:44:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s42EiHFP090754; Fri, 2 May 2014 14:44:17 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s42EiH1D090753; Fri, 2 May 2014 14:44:17 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201405021444.s42EiH1D090753@svn.freebsd.org> From: Mikolaj Golub Date: Fri, 2 May 2014 14:44:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265227 - stable/10/sys/netpfil/ipfw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 May 2014 14:44:18 -0000 Author: trociny Date: Fri May 2 14:44:17 2014 New Revision: 265227 URL: http://svnweb.freebsd.org/changeset/base/265227 Log: MFC r264963: Define startup order the same way as it is in dummynet. Modified: stable/10/sys/netpfil/ipfw/ip_fw_nat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netpfil/ipfw/ip_fw_nat.c ============================================================================== --- stable/10/sys/netpfil/ipfw/ip_fw_nat.c Fri May 2 13:32:07 2014 (r265226) +++ stable/10/sys/netpfil/ipfw/ip_fw_nat.c Fri May 2 14:44:17 2014 (r265227) @@ -674,8 +674,8 @@ static moduledata_t ipfw_nat_mod = { }; /* Define startup order. */ -#define IPFW_NAT_SI_SUB_FIREWALL (SI_SUB_PROTO_IFATTACHDOMAIN + 1) -#define IPFW_NAT_MODEVENT_ORDER (SI_ORDER_ANY - 255) +#define IPFW_NAT_SI_SUB_FIREWALL SI_SUB_PROTO_IFATTACHDOMAIN +#define IPFW_NAT_MODEVENT_ORDER (SI_ORDER_ANY - 128) /* after ipfw */ #define IPFW_NAT_MODULE_ORDER (IPFW_NAT_MODEVENT_ORDER + 1) #define IPFW_NAT_VNET_ORDER (IPFW_NAT_MODEVENT_ORDER + 2) From owner-svn-src-stable@FreeBSD.ORG Fri May 2 20:12:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E21CBCB3; Fri, 2 May 2014 20:12:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3B541692; Fri, 2 May 2014 20:12:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s42KCWQc032504; Fri, 2 May 2014 20:12:32 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s42KCWMU032500; Fri, 2 May 2014 20:12:32 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201405022012.s42KCWMU032500@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Fri, 2 May 2014 20:12:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265234 - in stable/10: cddl/contrib/opensolaris/lib/libdtrace/common sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 May 2014 20:12:33 -0000 Author: pfg Date: Fri May 2 20:12:31 2014 New Revision: 265234 URL: http://svnweb.freebsd.org/changeset/base/265234 Log: MFC r264040: 4248 dtrace(1M) should never create DOF with empty probes section 4249 Only probes from the first DTrace object file will be included Illumos Revision: 4a20ab41aadcb81c53e72fc65886e964e9add59 Reference: https://www.illumos.org/issues/4248 https://www.illumos.org/issues/4249 Obtained from: Illumos Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_error.c stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c Fri May 2 18:00:03 2014 (r265233) +++ stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c Fri May 2 20:12:31 2014 (r265234) @@ -22,6 +22,7 @@ /* * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #include @@ -486,7 +487,7 @@ dof_add_probe(dt_idhash_t *dhp, dt_ident return (0); } -static void +static int dof_add_provider(dt_dof_t *ddo, const dt_provider_t *pvp) { dtrace_hdl_t *dtp = ddo->ddo_hdl; @@ -497,8 +498,12 @@ dof_add_provider(dt_dof_t *ddo, const dt size_t sz; id_t i; - if (pvp->pv_flags & DT_PROVIDER_IMPL) - return; /* ignore providers that are exported by dtrace(7D) */ + if (pvp->pv_flags & DT_PROVIDER_IMPL) { + /* + * ignore providers that are exported by dtrace(7D) + */ + return (0); + } nxr = dt_popcb(pvp->pv_xrefs, pvp->pv_xrmax); dofs = alloca(sizeof (dof_secidx_t) * (nxr + 1)); @@ -525,6 +530,9 @@ dof_add_provider(dt_dof_t *ddo, const dt (void) dt_idhash_iter(pvp->pv_probes, dof_add_probe, ddo); + if (dt_buf_len(&ddo->ddo_probes) == 0) + return (dt_set_errno(dtp, EDT_NOPROBES)); + dofpv.dofpv_probes = dof_add_lsect(ddo, NULL, DOF_SECT_PROBES, sizeof (uint64_t), 0, sizeof (dof_probe_t), dt_buf_len(&ddo->ddo_probes)); @@ -579,6 +587,8 @@ dof_add_provider(dt_dof_t *ddo, const dt sizeof (dof_secidx_t), 0, sizeof (dof_secidx_t), sizeof (dof_secidx_t) * (nxr + 1)); } + + return (0); } static int @@ -822,8 +832,10 @@ dtrace_dof_create(dtrace_hdl_t *dtp, dtr */ if (flags & DTRACE_D_PROBES) { for (pvp = dt_list_next(&dtp->dt_provlist); - pvp != NULL; pvp = dt_list_next(pvp)) - dof_add_provider(ddo, pvp); + pvp != NULL; pvp = dt_list_next(pvp)) { + if (dof_add_provider(ddo, pvp) != 0) + return (NULL); + } } /* Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_error.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_error.c Fri May 2 18:00:03 2014 (r265233) +++ stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_error.c Fri May 2 20:12:31 2014 (r265234) @@ -26,6 +26,7 @@ /* * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #include @@ -109,7 +110,8 @@ static const struct { { EDT_BADSTACKPC, "Invalid stack program counter size" }, { EDT_BADAGGVAR, "Invalid aggregation variable identifier" }, { EDT_OVERSION, "Client requested deprecated version of library" }, - { EDT_ENABLING_ERR, "Failed to enable probe" } + { EDT_ENABLING_ERR, "Failed to enable probe" }, + { EDT_NOPROBES, "No probe sites found for declared provider" } }; static const int _dt_nerr = sizeof (_dt_errlist) / sizeof (_dt_errlist[0]); Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h Fri May 2 18:00:03 2014 (r265233) +++ stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h Fri May 2 20:12:31 2014 (r265234) @@ -25,7 +25,7 @@ */ /* - * Copyright (c) 2011, Joyent, Inc. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. * Copyright (c) 2012 by Delphix. All rights reserved. */ @@ -535,7 +535,8 @@ enum { EDT_BADSTACKPC, /* invalid stack program counter size */ EDT_BADAGGVAR, /* invalid aggregation variable identifier */ EDT_OVERSION, /* client is requesting deprecated version */ - EDT_ENABLING_ERR /* failed to enable probe */ + EDT_ENABLING_ERR, /* failed to enable probe */ + EDT_NOPROBES /* no probes sites for declared provider */ }; /* Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Fri May 2 18:00:03 2014 (r265233) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Fri May 2 20:12:31 2014 (r265234) @@ -22,9 +22,9 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved - * Use is subject to license terms. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. */ #pragma ident "%Z%%M% %I% %E% SMI" @@ -14571,8 +14571,8 @@ dtrace_helper_provider_add(dof_helper_t * Check to make sure this isn't a duplicate. */ for (i = 0; i < help->dthps_nprovs; i++) { - if (dofhp->dofhp_addr == - help->dthps_provs[i]->dthp_prov.dofhp_addr) + if (dofhp->dofhp_dof == + help->dthps_provs[i]->dthp_prov.dofhp_dof) return (EALREADY); } From owner-svn-src-stable@FreeBSD.ORG Fri May 2 20:13:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9332E07; Fri, 2 May 2014 20:13:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 94A72169B; Fri, 2 May 2014 20:13:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s42KDrxK032713; Fri, 2 May 2014 20:13:53 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s42KDq6K032709; Fri, 2 May 2014 20:13:52 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201405022013.s42KDq6K032709@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Fri, 2 May 2014 20:13:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265235 - in stable/9: cddl/contrib/opensolaris/lib/libdtrace/common sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 May 2014 20:13:53 -0000 Author: pfg Date: Fri May 2 20:13:52 2014 New Revision: 265235 URL: http://svnweb.freebsd.org/changeset/base/265235 Log: MFC r264040: 4248 dtrace(1M) should never create DOF with empty probes section 4249 Only probes from the first DTrace object file will be included Illumos Revision: 4a20ab41aadcb81c53e72fc65886e964e9add59 Reference: https://www.illumos.org/issues/4248 https://www.illumos.org/issues/4249 Obtained from: Illumos Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_error.c stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Directory Properties: stable/9/ (props changed) stable/9/cddl/ (props changed) stable/9/cddl/contrib/ (props changed) stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/ (props changed) stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c Fri May 2 20:12:31 2014 (r265234) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c Fri May 2 20:13:52 2014 (r265235) @@ -22,6 +22,7 @@ /* * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #include @@ -486,7 +487,7 @@ dof_add_probe(dt_idhash_t *dhp, dt_ident return (0); } -static void +static int dof_add_provider(dt_dof_t *ddo, const dt_provider_t *pvp) { dtrace_hdl_t *dtp = ddo->ddo_hdl; @@ -497,8 +498,12 @@ dof_add_provider(dt_dof_t *ddo, const dt size_t sz; id_t i; - if (pvp->pv_flags & DT_PROVIDER_IMPL) - return; /* ignore providers that are exported by dtrace(7D) */ + if (pvp->pv_flags & DT_PROVIDER_IMPL) { + /* + * ignore providers that are exported by dtrace(7D) + */ + return (0); + } nxr = dt_popcb(pvp->pv_xrefs, pvp->pv_xrmax); dofs = alloca(sizeof (dof_secidx_t) * (nxr + 1)); @@ -525,6 +530,9 @@ dof_add_provider(dt_dof_t *ddo, const dt (void) dt_idhash_iter(pvp->pv_probes, dof_add_probe, ddo); + if (dt_buf_len(&ddo->ddo_probes) == 0) + return (dt_set_errno(dtp, EDT_NOPROBES)); + dofpv.dofpv_probes = dof_add_lsect(ddo, NULL, DOF_SECT_PROBES, sizeof (uint64_t), 0, sizeof (dof_probe_t), dt_buf_len(&ddo->ddo_probes)); @@ -579,6 +587,8 @@ dof_add_provider(dt_dof_t *ddo, const dt sizeof (dof_secidx_t), 0, sizeof (dof_secidx_t), sizeof (dof_secidx_t) * (nxr + 1)); } + + return (0); } static int @@ -822,8 +832,10 @@ dtrace_dof_create(dtrace_hdl_t *dtp, dtr */ if (flags & DTRACE_D_PROBES) { for (pvp = dt_list_next(&dtp->dt_provlist); - pvp != NULL; pvp = dt_list_next(pvp)) - dof_add_provider(ddo, pvp); + pvp != NULL; pvp = dt_list_next(pvp)) { + if (dof_add_provider(ddo, pvp) != 0) + return (NULL); + } } /* Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_error.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_error.c Fri May 2 20:12:31 2014 (r265234) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_error.c Fri May 2 20:13:52 2014 (r265235) @@ -26,6 +26,7 @@ /* * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #include @@ -109,7 +110,8 @@ static const struct { { EDT_BADSTACKPC, "Invalid stack program counter size" }, { EDT_BADAGGVAR, "Invalid aggregation variable identifier" }, { EDT_OVERSION, "Client requested deprecated version of library" }, - { EDT_ENABLING_ERR, "Failed to enable probe" } + { EDT_ENABLING_ERR, "Failed to enable probe" }, + { EDT_NOPROBES, "No probe sites found for declared provider" } }; static const int _dt_nerr = sizeof (_dt_errlist) / sizeof (_dt_errlist[0]); Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h Fri May 2 20:12:31 2014 (r265234) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h Fri May 2 20:13:52 2014 (r265235) @@ -25,7 +25,7 @@ */ /* - * Copyright (c) 2011, Joyent, Inc. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. * Copyright (c) 2012 by Delphix. All rights reserved. */ @@ -535,7 +535,8 @@ enum { EDT_BADSTACKPC, /* invalid stack program counter size */ EDT_BADAGGVAR, /* invalid aggregation variable identifier */ EDT_OVERSION, /* client is requesting deprecated version */ - EDT_ENABLING_ERR /* failed to enable probe */ + EDT_ENABLING_ERR, /* failed to enable probe */ + EDT_NOPROBES /* no probes sites for declared provider */ }; /* Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Fri May 2 20:12:31 2014 (r265234) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Fri May 2 20:13:52 2014 (r265235) @@ -22,9 +22,9 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved - * Use is subject to license terms. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. */ #pragma ident "%Z%%M% %I% %E% SMI" @@ -14571,8 +14571,8 @@ dtrace_helper_provider_add(dof_helper_t * Check to make sure this isn't a duplicate. */ for (i = 0; i < help->dthps_nprovs; i++) { - if (dofhp->dofhp_addr == - help->dthps_provs[i]->dthp_prov.dofhp_addr) + if (dofhp->dofhp_dof == + help->dthps_provs[i]->dthp_prov.dofhp_dof) return (EALREADY); } From owner-svn-src-stable@FreeBSD.ORG Fri May 2 21:31:00 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9EB6651; Fri, 2 May 2014 21:31:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A9341D59; Fri, 2 May 2014 21:31:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s42LV0Nk063901; Fri, 2 May 2014 21:31:00 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s42LUxvL063889; Fri, 2 May 2014 21:30:59 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201405022130.s42LUxvL063889@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Fri, 2 May 2014 21:30:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265243 - in stable/10/sys: fs/smbfs netsmb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 May 2014 21:31:00 -0000 Author: ae Date: Fri May 2 21:30:59 2014 New Revision: 265243 URL: http://svnweb.freebsd.org/changeset/base/265243 Log: MFC r264494: Use SMB_QUERY_FS_SIZE_INFO request to populate statfs structure. When server doesn't support this request, try to use SMB_INFO_ALLOCATION. And use SMB_COM_QUERY_INFORMATION_DISK request as fallback. MFC r264600: Remove redundant unlock. This code was removed from the opensolaris and darwin's netsmb implementations, in DfBSD it also has been disabled. Modified: stable/10/sys/fs/smbfs/smbfs_smb.c stable/10/sys/fs/smbfs/smbfs_subr.h stable/10/sys/fs/smbfs/smbfs_vfsops.c stable/10/sys/netsmb/smb_iod.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/smbfs/smbfs_smb.c ============================================================================== --- stable/10/sys/fs/smbfs/smbfs_smb.c Fri May 2 21:19:13 2014 (r265242) +++ stable/10/sys/fs/smbfs/smbfs_smb.c Fri May 2 21:30:59 2014 (r265243) @@ -135,8 +135,49 @@ smbfs_smb_lock(struct smbnode *np, int o return smbfs_smb_lockandx(np, op, (uintptr_t)id, start, end, scred); } -int -smbfs_smb_statfs2(struct smb_share *ssp, struct statfs *sbp, +static int +smbfs_query_info_fs(struct smb_share *ssp, struct statfs *sbp, + struct smb_cred *scred) +{ + struct smb_t2rq *t2p; + struct mbchain *mbp; + struct mdchain *mdp; + uint32_t bsize, bpu; + int64_t units, funits; + int error; + + error = smb_t2_alloc(SSTOCP(ssp), SMB_TRANS2_QUERY_FS_INFORMATION, + scred, &t2p); + if (error) + return (error); + mbp = &t2p->t2_tparam; + mb_init(mbp); + mb_put_uint16le(mbp, SMB_QUERY_FS_SIZE_INFO); + t2p->t2_maxpcount = 2; + t2p->t2_maxdcount = sizeof(int64_t) * 2 + sizeof(uint32_t) * 2; + error = smb_t2_request(t2p); + if (error) { + smb_t2_done(t2p); + return (error); + } + mdp = &t2p->t2_rdata; + md_get_int64le(mdp, &units); + md_get_int64le(mdp, &funits); + md_get_uint32le(mdp, &bpu); + md_get_uint32le(mdp, &bsize); + sbp->f_bsize = bpu * bsize; /* fundamental filesystem block size */ + sbp->f_blocks= (uint64_t)units; /* total data blocks in filesystem */ + sbp->f_bfree = (uint64_t)funits;/* free blocks in fs */ + sbp->f_bavail= (uint64_t)funits;/* free blocks avail to non-superuser */ + sbp->f_files = 0xffff; /* total file nodes in filesystem */ + sbp->f_ffree = 0xffff; /* free file nodes in fs */ + smb_t2_done(t2p); + return (0); +} + + +static int +smbfs_query_info_alloc(struct smb_share *ssp, struct statfs *sbp, struct smb_cred *scred) { struct smb_t2rq *t2p; @@ -176,8 +217,8 @@ smbfs_smb_statfs2(struct smb_share *ssp, return 0; } -int -smbfs_smb_statfs(struct smb_share *ssp, struct statfs *sbp, +static int +smbfs_query_info_disk(struct smb_share *ssp, struct statfs *sbp, struct smb_cred *scred) { struct smb_rq *rqp; @@ -213,6 +254,20 @@ smbfs_smb_statfs(struct smb_share *ssp, return 0; } +int +smbfs_smb_statfs(struct smb_share *ssp, struct statfs *sbp, + struct smb_cred *scred) +{ + + if (SMB_DIALECT(SSTOVC(ssp)) >= SMB_DIALECT_LANMAN2_0) { + if (smbfs_query_info_fs(ssp, sbp, scred) == 0) + return (0); + if (smbfs_query_info_alloc(ssp, sbp, scred) == 0) + return (0); + } + return (smbfs_query_info_disk(ssp, sbp, scred)); +} + static int smbfs_smb_seteof(struct smbnode *np, int64_t newsize, struct smb_cred *scred) { Modified: stable/10/sys/fs/smbfs/smbfs_subr.h ============================================================================== --- stable/10/sys/fs/smbfs/smbfs_subr.h Fri May 2 21:19:13 2014 (r265242) +++ stable/10/sys/fs/smbfs/smbfs_subr.h Fri May 2 21:30:59 2014 (r265243) @@ -126,8 +126,6 @@ struct smbfs_fctx { */ int smbfs_smb_lock(struct smbnode *np, int op, caddr_t id, off_t start, off_t end, struct smb_cred *scred); -int smbfs_smb_statfs2(struct smb_share *ssp, struct statfs *sbp, - struct smb_cred *scred); int smbfs_smb_statfs(struct smb_share *ssp, struct statfs *sbp, struct smb_cred *scred); int smbfs_smb_setfsize(struct smbnode *np, int newsize, struct smb_cred *scred); Modified: stable/10/sys/fs/smbfs/smbfs_vfsops.c ============================================================================== --- stable/10/sys/fs/smbfs/smbfs_vfsops.c Fri May 2 21:19:13 2014 (r265242) +++ stable/10/sys/fs/smbfs/smbfs_vfsops.c Fri May 2 21:30:59 2014 (r265243) @@ -390,7 +390,7 @@ smbfs_statfs(struct mount *mp, struct st struct smbnode *np = smp->sm_root; struct smb_share *ssp = smp->sm_share; struct smb_cred *scred; - int error = 0; + int error; if (np == NULL) { vfs_mount_error(mp, "np == NULL"); @@ -400,16 +400,9 @@ smbfs_statfs(struct mount *mp, struct st sbp->f_iosize = SSTOVC(ssp)->vc_txmax; /* optimal transfer block size */ scred = smbfs_malloc_scred(); smb_makescred(scred, td, td->td_ucred); - - if (SMB_DIALECT(SSTOVC(ssp)) >= SMB_DIALECT_LANMAN2_0) - error = smbfs_smb_statfs2(ssp, sbp, scred); - else - error = smbfs_smb_statfs(ssp, sbp, scred); - if (error) { - smbfs_free_scred(scred); - return error; - } - sbp->f_flags = 0; /* copy of mount exported flags */ + error = smbfs_smb_statfs(ssp, sbp, scred); + if (error == 0) + sbp->f_flags = 0; /* copy of mount exported flags */ smbfs_free_scred(scred); - return 0; + return (error); } Modified: stable/10/sys/netsmb/smb_iod.c ============================================================================== --- stable/10/sys/netsmb/smb_iod.c Fri May 2 21:19:13 2014 (r265242) +++ stable/10/sys/netsmb/smb_iod.c Fri May 2 21:30:59 2014 (r265243) @@ -87,8 +87,6 @@ smb_iod_invrq(struct smbiod *iod) */ SMB_IOD_RQLOCK(iod); TAILQ_FOREACH(rqp, &iod->iod_rqlist, sr_link) { - if (rqp->sr_flags & SMBR_INTERNAL) - SMBRQ_SUNLOCK(rqp); rqp->sr_flags |= SMBR_RESTART; smb_iod_rqprocessed(rqp, ENOTCONN); } From owner-svn-src-stable@FreeBSD.ORG Fri May 2 21:54:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B10BA3B2; Fri, 2 May 2014 21:54:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91E3910C1; Fri, 2 May 2014 21:54:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s42LsbIm075073; Fri, 2 May 2014 21:54:37 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s42LsaoB075066; Fri, 2 May 2014 21:54:36 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201405022154.s42LsaoB075066@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Fri, 2 May 2014 21:54:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265246 - in stable/9/sys: fs/smbfs netsmb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 May 2014 21:54:37 -0000 Author: ae Date: Fri May 2 21:54:36 2014 New Revision: 265246 URL: http://svnweb.freebsd.org/changeset/base/265246 Log: MFC r264494: Use SMB_QUERY_FS_SIZE_INFO request to populate statfs structure. When server doesn't support this request, try to use SMB_INFO_ALLOCATION. And use SMB_COM_QUERY_INFORMATION_DISK request as fallback. MFC r264600: Remove redundant unlock. This code was removed from the opensolaris and darwin's netsmb implementations, in DfBSD it also has been disabled. Modified: stable/9/sys/fs/smbfs/smbfs_smb.c stable/9/sys/fs/smbfs/smbfs_subr.h stable/9/sys/fs/smbfs/smbfs_vfsops.c stable/9/sys/netsmb/smb_iod.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/smbfs/smbfs_smb.c ============================================================================== --- stable/9/sys/fs/smbfs/smbfs_smb.c Fri May 2 21:41:35 2014 (r265245) +++ stable/9/sys/fs/smbfs/smbfs_smb.c Fri May 2 21:54:36 2014 (r265246) @@ -134,8 +134,49 @@ smbfs_smb_lock(struct smbnode *np, int o return smbfs_smb_lockandx(np, op, (uintptr_t)id, start, end, scred); } -int -smbfs_smb_statfs2(struct smb_share *ssp, struct statfs *sbp, +static int +smbfs_query_info_fs(struct smb_share *ssp, struct statfs *sbp, + struct smb_cred *scred) +{ + struct smb_t2rq *t2p; + struct mbchain *mbp; + struct mdchain *mdp; + uint32_t bsize, bpu; + int64_t units, funits; + int error; + + error = smb_t2_alloc(SSTOCP(ssp), SMB_TRANS2_QUERY_FS_INFORMATION, + scred, &t2p); + if (error) + return (error); + mbp = &t2p->t2_tparam; + mb_init(mbp); + mb_put_uint16le(mbp, SMB_QUERY_FS_SIZE_INFO); + t2p->t2_maxpcount = 2; + t2p->t2_maxdcount = sizeof(int64_t) * 2 + sizeof(uint32_t) * 2; + error = smb_t2_request(t2p); + if (error) { + smb_t2_done(t2p); + return (error); + } + mdp = &t2p->t2_rdata; + md_get_int64le(mdp, &units); + md_get_int64le(mdp, &funits); + md_get_uint32le(mdp, &bpu); + md_get_uint32le(mdp, &bsize); + sbp->f_bsize = bpu * bsize; /* fundamental filesystem block size */ + sbp->f_blocks= (uint64_t)units; /* total data blocks in filesystem */ + sbp->f_bfree = (uint64_t)funits;/* free blocks in fs */ + sbp->f_bavail= (uint64_t)funits;/* free blocks avail to non-superuser */ + sbp->f_files = 0xffff; /* total file nodes in filesystem */ + sbp->f_ffree = 0xffff; /* free file nodes in fs */ + smb_t2_done(t2p); + return (0); +} + + +static int +smbfs_query_info_alloc(struct smb_share *ssp, struct statfs *sbp, struct smb_cred *scred) { struct smb_t2rq *t2p; @@ -175,8 +216,8 @@ smbfs_smb_statfs2(struct smb_share *ssp, return 0; } -int -smbfs_smb_statfs(struct smb_share *ssp, struct statfs *sbp, +static int +smbfs_query_info_disk(struct smb_share *ssp, struct statfs *sbp, struct smb_cred *scred) { struct smb_rq rq, *rqp = &rq; @@ -211,6 +252,20 @@ smbfs_smb_statfs(struct smb_share *ssp, return 0; } +int +smbfs_smb_statfs(struct smb_share *ssp, struct statfs *sbp, + struct smb_cred *scred) +{ + + if (SMB_DIALECT(SSTOVC(ssp)) >= SMB_DIALECT_LANMAN2_0) { + if (smbfs_query_info_fs(ssp, sbp, scred) == 0) + return (0); + if (smbfs_query_info_alloc(ssp, sbp, scred) == 0) + return (0); + } + return (smbfs_query_info_disk(ssp, sbp, scred)); +} + static int smbfs_smb_seteof(struct smbnode *np, int64_t newsize, struct smb_cred *scred) { Modified: stable/9/sys/fs/smbfs/smbfs_subr.h ============================================================================== --- stable/9/sys/fs/smbfs/smbfs_subr.h Fri May 2 21:41:35 2014 (r265245) +++ stable/9/sys/fs/smbfs/smbfs_subr.h Fri May 2 21:54:36 2014 (r265246) @@ -125,8 +125,6 @@ struct smbfs_fctx { */ int smbfs_smb_lock(struct smbnode *np, int op, caddr_t id, off_t start, off_t end, struct smb_cred *scred); -int smbfs_smb_statfs2(struct smb_share *ssp, struct statfs *sbp, - struct smb_cred *scred); int smbfs_smb_statfs(struct smb_share *ssp, struct statfs *sbp, struct smb_cred *scred); int smbfs_smb_setfsize(struct smbnode *np, int newsize, struct smb_cred *scred); Modified: stable/9/sys/fs/smbfs/smbfs_vfsops.c ============================================================================== --- stable/9/sys/fs/smbfs/smbfs_vfsops.c Fri May 2 21:41:35 2014 (r265245) +++ stable/9/sys/fs/smbfs/smbfs_vfsops.c Fri May 2 21:54:36 2014 (r265246) @@ -411,7 +411,7 @@ smbfs_statfs(struct mount *mp, struct st struct smbnode *np = smp->sm_root; struct smb_share *ssp = smp->sm_share; struct smb_cred scred; - int error = 0; + int error; if (np == NULL) { vfs_mount_error(mp, "np == NULL"); @@ -420,13 +420,8 @@ smbfs_statfs(struct mount *mp, struct st sbp->f_iosize = SSTOVC(ssp)->vc_txmax; /* optimal transfer block size */ smb_makescred(&scred, td, td->td_ucred); - - if (SMB_DIALECT(SSTOVC(ssp)) >= SMB_DIALECT_LANMAN2_0) - error = smbfs_smb_statfs2(ssp, sbp, &scred); - else - error = smbfs_smb_statfs(ssp, sbp, &scred); - if (error) - return error; - sbp->f_flags = 0; /* copy of mount exported flags */ - return 0; + error = smbfs_smb_statfs(ssp, sbp, &scred); + if (error == 0) + sbp->f_flags = 0; /* copy of mount exported flags */ + return (error); } Modified: stable/9/sys/netsmb/smb_iod.c ============================================================================== --- stable/9/sys/netsmb/smb_iod.c Fri May 2 21:41:35 2014 (r265245) +++ stable/9/sys/netsmb/smb_iod.c Fri May 2 21:54:36 2014 (r265246) @@ -87,8 +87,6 @@ smb_iod_invrq(struct smbiod *iod) */ SMB_IOD_RQLOCK(iod); TAILQ_FOREACH(rqp, &iod->iod_rqlist, sr_link) { - if (rqp->sr_flags & SMBR_INTERNAL) - SMBRQ_SUNLOCK(rqp); rqp->sr_flags |= SMBR_RESTART; smb_iod_rqprocessed(rqp, ENOTCONN); } From owner-svn-src-stable@FreeBSD.ORG Sat May 3 13:19:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E161D331; Sat, 3 May 2014 13:19:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD8A31BC9; Sat, 3 May 2014 13:19:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s43DJBBc064800; Sat, 3 May 2014 13:19:11 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s43DJBCt064798; Sat, 3 May 2014 13:19:11 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201405031319.s43DJBCt064798@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sat, 3 May 2014 13:19:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265265 - stable/10/bin/date X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 May 2014 13:19:12 -0000 Author: dumbbell Date: Sat May 3 13:19:11 2014 New Revision: 265265 URL: http://svnweb.freebsd.org/changeset/base/265265 Log: date(1): Add "-R" flag to use RFC 2822 date and time output format [MFC] As stated in the man page, this is equivalent to use "%a, %d %b %Y %T %z" as the output format while LC_TIME is set to the "C" locale. This is compatible with date(1) from the GNU core utilities. This is an MFC of r264968 and r264970. Modified: stable/10/bin/date/date.1 stable/10/bin/date/date.c Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/date/date.1 ============================================================================== --- stable/10/bin/date/date.1 Sat May 3 11:39:04 2014 (r265264) +++ stable/10/bin/date/date.1 Sat May 3 13:19:11 2014 (r265265) @@ -32,7 +32,7 @@ .\" @(#)date.1 8.3 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd June 3, 2010 +.Dd April 26, 2014 .Dt DATE 1 .Os .Sh NAME @@ -40,7 +40,7 @@ .Nd display or set date and time .Sh SYNOPSIS .Nm -.Op Fl ju +.Op Fl jRu .Op Fl r Ar seconds .Oo .Fl v @@ -58,7 +58,7 @@ .Ar MM Op Ar .ss .Sm on .Nm -.Op Fl jnu +.Op Fl jnRu .Fl f Ar input_fmt new_date .Op Cm + Ns Ar output_fmt .Nm @@ -130,6 +130,16 @@ The .Fl n option suppresses this behavior and causes the time to be set only on the current machine. +.It Fl R +Use RFC 2822 date and time output format. This is equivalent to use +.Dq Li %a, %d %b %Y \&%T %z +as +.Ar output_fmt +while +.Ev LC_TIME +is set to the +.Dq C +locale . .It Fl r Ar seconds Print the date and time represented by .Ar seconds , Modified: stable/10/bin/date/date.c ============================================================================== --- stable/10/bin/date/date.c Sat May 3 11:39:04 2014 (r265264) +++ stable/10/bin/date/date.c Sat May 3 13:19:11 2014 (r265265) @@ -69,12 +69,14 @@ static void setthetime(const char *, con static void badformat(void); static void usage(void); +static const char *rfc2822_format = "%a, %d %b %Y %T %z"; + int main(int argc, char *argv[]) { struct timezone tz; int ch, rflag; - int jflag, nflag; + int jflag, nflag, Rflag; const char *format; char buf[1024]; char *endptr, *fmt; @@ -89,9 +91,9 @@ main(int argc, char *argv[]) (void) setlocale(LC_TIME, ""); tz.tz_dsttime = tz.tz_minuteswest = 0; rflag = 0; - jflag = nflag = 0; + jflag = nflag = Rflag = 0; set_timezone = 0; - while ((ch = getopt(argc, argv, "d:f:jnr:t:uv:")) != -1) + while ((ch = getopt(argc, argv, "d:f:jnRr:t:uv:")) != -1) switch((char)ch) { case 'd': /* daylight savings time */ tz.tz_dsttime = strtol(optarg, &endptr, 10) ? 1 : 0; @@ -108,6 +110,9 @@ main(int argc, char *argv[]) case 'n': /* don't set network */ nflag = 1; break; + case 'R': /* RFC 2822 datetime format */ + Rflag = 1; + break; case 'r': /* user specified seconds */ rflag = 1; tval = strtoq(optarg, &tmp, 0); @@ -145,6 +150,9 @@ main(int argc, char *argv[]) format = "%+"; + if (Rflag) + format = rfc2822_format; + /* allow the operands in any order */ if (*argv && **argv == '+') { format = *argv + 1; @@ -169,6 +177,14 @@ main(int argc, char *argv[]) usage(); } vary_destroy(v); + + if (format == rfc2822_format) + /* + * When using RFC 2822 datetime format, don't honor the + * locale. + */ + setlocale(LC_TIME, "C"); + (void)strftime(buf, sizeof(buf), format, <); (void)printf("%s\n", buf); if (fflush(stdout)) @@ -301,7 +317,7 @@ static void usage(void) { (void)fprintf(stderr, "%s\n%s\n", - "usage: date [-jnu] [-d dst] [-r seconds] [-t west] " + "usage: date [-jnRu] [-d dst] [-r seconds] [-t west] " "[-v[+|-]val[ymwdHMS]] ... ", " " "[-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format]"); From owner-svn-src-stable@FreeBSD.ORG Sat May 3 14:04:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2006EDBA; Sat, 3 May 2014 14:04:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0BF1A1083; Sat, 3 May 2014 14:04:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s43E44NR084430; Sat, 3 May 2014 14:04:04 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s43E44uY084428; Sat, 3 May 2014 14:04:04 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201405031404.s43E44uY084428@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sat, 3 May 2014 14:04:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265266 - stable/9/bin/date X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 May 2014 14:04:05 -0000 Author: dumbbell Date: Sat May 3 14:04:04 2014 New Revision: 265266 URL: http://svnweb.freebsd.org/changeset/base/265266 Log: date(1): Add "-R" flag to use RFC 2822 date and time output format [MFC] As stated in the man page, this is equivalent to use "%a, %d %b %Y %T %z" as the output format while LC_TIME is set to the "C" locale. This is compatible with date(1) from the GNU core utilities. This is an MFC of r264968 and r264970. Modified: stable/9/bin/date/date.1 stable/9/bin/date/date.c Directory Properties: stable/9/bin/date/ (props changed) Modified: stable/9/bin/date/date.1 ============================================================================== --- stable/9/bin/date/date.1 Sat May 3 13:19:11 2014 (r265265) +++ stable/9/bin/date/date.1 Sat May 3 14:04:04 2014 (r265266) @@ -32,7 +32,7 @@ .\" @(#)date.1 8.3 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd June 3, 2010 +.Dd April 26, 2014 .Dt DATE 1 .Os .Sh NAME @@ -40,7 +40,7 @@ .Nd display or set date and time .Sh SYNOPSIS .Nm -.Op Fl ju +.Op Fl jRu .Op Fl r Ar seconds .Oo .Fl v @@ -58,7 +58,7 @@ .Ar MM Op Ar .ss .Sm on .Nm -.Op Fl jnu +.Op Fl jnRu .Fl f Ar input_fmt new_date .Op Cm + Ns Ar output_fmt .Nm @@ -130,6 +130,16 @@ The .Fl n option suppresses this behavior and causes the time to be set only on the current machine. +.It Fl R +Use RFC 2822 date and time output format. This is equivalent to use +.Dq Li %a, %d %b %Y \&%T %z +as +.Ar output_fmt +while +.Ev LC_TIME +is set to the +.Dq C +locale . .It Fl r Ar seconds Print the date and time represented by .Ar seconds , Modified: stable/9/bin/date/date.c ============================================================================== --- stable/9/bin/date/date.c Sat May 3 13:19:11 2014 (r265265) +++ stable/9/bin/date/date.c Sat May 3 14:04:04 2014 (r265266) @@ -69,12 +69,14 @@ static void setthetime(const char *, con static void badformat(void); static void usage(void); +static const char *rfc2822_format = "%a, %d %b %Y %T %z"; + int main(int argc, char *argv[]) { struct timezone tz; int ch, rflag; - int jflag, nflag; + int jflag, nflag, Rflag; const char *format; char buf[1024]; char *endptr, *fmt; @@ -89,9 +91,9 @@ main(int argc, char *argv[]) (void) setlocale(LC_TIME, ""); tz.tz_dsttime = tz.tz_minuteswest = 0; rflag = 0; - jflag = nflag = 0; + jflag = nflag = Rflag = 0; set_timezone = 0; - while ((ch = getopt(argc, argv, "d:f:jnr:t:uv:")) != -1) + while ((ch = getopt(argc, argv, "d:f:jnRr:t:uv:")) != -1) switch((char)ch) { case 'd': /* daylight savings time */ tz.tz_dsttime = strtol(optarg, &endptr, 10) ? 1 : 0; @@ -108,6 +110,9 @@ main(int argc, char *argv[]) case 'n': /* don't set network */ nflag = 1; break; + case 'R': /* RFC 2822 datetime format */ + Rflag = 1; + break; case 'r': /* user specified seconds */ rflag = 1; tval = strtoq(optarg, &tmp, 0); @@ -145,6 +150,9 @@ main(int argc, char *argv[]) format = "%+"; + if (Rflag) + format = rfc2822_format; + /* allow the operands in any order */ if (*argv && **argv == '+') { format = *argv + 1; @@ -169,6 +177,14 @@ main(int argc, char *argv[]) usage(); } vary_destroy(v); + + if (format == rfc2822_format) + /* + * When using RFC 2822 datetime format, don't honor the + * locale. + */ + setlocale(LC_TIME, "C"); + (void)strftime(buf, sizeof(buf), format, <); (void)printf("%s\n", buf); if (fflush(stdout)) @@ -301,7 +317,7 @@ static void usage(void) { (void)fprintf(stderr, "%s\n%s\n", - "usage: date [-jnu] [-d dst] [-r seconds] [-t west] " + "usage: date [-jnRu] [-d dst] [-r seconds] [-t west] " "[-v[+|-]val[ymwdHMS]] ... ", " " "[-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format]"); From owner-svn-src-stable@FreeBSD.ORG Sat May 3 16:08:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7BC3F5A7; Sat, 3 May 2014 16:08:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C30819EC; Sat, 3 May 2014 16:08:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s43G8rGV036284; Sat, 3 May 2014 16:08:53 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s43G8qIK036279; Sat, 3 May 2014 16:08:52 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201405031608.s43G8qIK036279@svn.freebsd.org> From: Mark Johnston Date: Sat, 3 May 2014 16:08:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265273 - in stable/10: cddl/lib/libdtrace sys/cddl/contrib/opensolaris/uts/intel/dtrace sys/cddl/dev/dtrace/amd64 sys/cddl/dev/dtrace/i386 sys/cddl/dev/dtrace/x86 sys/modules/dtrace/dt... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 May 2014 16:08:53 -0000 Author: markj Date: Sat May 3 16:08:52 2014 New Revision: 265273 URL: http://svnweb.freebsd.org/changeset/base/265273 Log: MFC r262542: Move some files that are identical on i386 and amd64 to an x86 subdirectory rather than keeping duplicate copies. Added: stable/10/sys/cddl/dev/dtrace/x86/ - copied from r262542, head/sys/cddl/dev/dtrace/x86/ Deleted: stable/10/sys/cddl/dev/dtrace/amd64/dis_tables.c stable/10/sys/cddl/dev/dtrace/amd64/dis_tables.h stable/10/sys/cddl/dev/dtrace/amd64/regset.h stable/10/sys/cddl/dev/dtrace/i386/dis_tables.c stable/10/sys/cddl/dev/dtrace/i386/dis_tables.h stable/10/sys/cddl/dev/dtrace/i386/regset.h Modified: stable/10/cddl/lib/libdtrace/Makefile stable/10/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c stable/10/sys/modules/dtrace/dtrace/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/lib/libdtrace/Makefile ============================================================================== --- stable/10/cddl/lib/libdtrace/Makefile Sat May 3 15:57:12 2014 (r265272) +++ stable/10/cddl/lib/libdtrace/Makefile Sat May 3 16:08:52 2014 (r265273) @@ -69,9 +69,11 @@ CFLAGS+= -I${.OBJDIR} -I${.CURDIR} \ #CFLAGS+= -DYYDEBUG .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" +CFLAGS+= -I${.CURDIR}/../../../sys/cddl/dev/dtrace/x86 CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/intel -DDIS_MEM .PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/i386 .PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/${MACHINE_ARCH} +.PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/x86 .elif ${MACHINE_CPUARCH} == "sparc64" CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/sparc .PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/sparc Modified: stable/10/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Sat May 3 15:57:12 2014 (r265272) +++ stable/10/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Sat May 3 16:08:52 2014 (r265273) @@ -47,7 +47,7 @@ #include #include #include -#include +#include #include #include #include Modified: stable/10/sys/modules/dtrace/dtrace/Makefile ============================================================================== --- stable/10/sys/modules/dtrace/dtrace/Makefile Sat May 3 15:57:12 2014 (r265272) +++ stable/10/sys/modules/dtrace/dtrace/Makefile Sat May 3 16:08:52 2014 (r265273) @@ -14,9 +14,11 @@ SRCS= dtrace.c \ dtrace_subr.c .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" +.PATH: ${.CURDIR}/../../../cddl/dev/dtrace/x86 SRCS+= dis_tables.c \ instr_size.c -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/intel +CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/intel \ + -I${.CURDIR}/../../../cddl/dev/dtrace/x86 .endif SRCS+= bus_if.h device_if.h vnode_if.h From owner-svn-src-stable@FreeBSD.ORG Sat May 3 16:09:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F64F6D3; Sat, 3 May 2014 16:09:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39D4419F2; Sat, 3 May 2014 16:09:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s43G99Mf036372; Sat, 3 May 2014 16:09:09 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s43G98Lu036368; Sat, 3 May 2014 16:09:08 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201405031609.s43G98Lu036368@svn.freebsd.org> From: Mark Johnston Date: Sat, 3 May 2014 16:09:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265274 - in stable/9: cddl/lib/libdtrace sys/cddl/contrib/opensolaris/uts/intel/dtrace sys/cddl/dev/dtrace/amd64 sys/cddl/dev/dtrace/i386 sys/cddl/dev/dtrace/x86 sys/modules/dtrace/dtrace X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 May 2014 16:09:09 -0000 Author: markj Date: Sat May 3 16:09:08 2014 New Revision: 265274 URL: http://svnweb.freebsd.org/changeset/base/265274 Log: MFC r262542: Move some files that are identical on i386 and amd64 to an x86 subdirectory rather than keeping duplicate copies. Added: stable/9/sys/cddl/dev/dtrace/x86/ - copied from r262542, head/sys/cddl/dev/dtrace/x86/ Deleted: stable/9/sys/cddl/dev/dtrace/amd64/dis_tables.c stable/9/sys/cddl/dev/dtrace/amd64/dis_tables.h stable/9/sys/cddl/dev/dtrace/amd64/regset.h stable/9/sys/cddl/dev/dtrace/i386/dis_tables.c stable/9/sys/cddl/dev/dtrace/i386/dis_tables.h stable/9/sys/cddl/dev/dtrace/i386/regset.h Modified: stable/9/cddl/lib/libdtrace/Makefile stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c stable/9/sys/modules/dtrace/dtrace/Makefile Directory Properties: stable/9/cddl/lib/libdtrace/ (props changed) stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/cddl/lib/libdtrace/Makefile ============================================================================== --- stable/9/cddl/lib/libdtrace/Makefile Sat May 3 16:08:52 2014 (r265273) +++ stable/9/cddl/lib/libdtrace/Makefile Sat May 3 16:09:08 2014 (r265274) @@ -67,9 +67,11 @@ CFLAGS+= -I${.OBJDIR} -I${.CURDIR} \ #CFLAGS+= -DYYDEBUG .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" +CFLAGS+= -I${.CURDIR}/../../../sys/cddl/dev/dtrace/x86 CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/intel -DDIS_MEM .PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/i386 .PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/${MACHINE_ARCH} +.PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/x86 .elif ${MACHINE_CPUARCH} == "sparc64" CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/sparc .PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/sparc Modified: stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Sat May 3 16:08:52 2014 (r265273) +++ stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Sat May 3 16:09:08 2014 (r265274) @@ -47,7 +47,7 @@ #include #include #include -#include +#include #include #include #include Modified: stable/9/sys/modules/dtrace/dtrace/Makefile ============================================================================== --- stable/9/sys/modules/dtrace/dtrace/Makefile Sat May 3 16:08:52 2014 (r265273) +++ stable/9/sys/modules/dtrace/dtrace/Makefile Sat May 3 16:09:08 2014 (r265274) @@ -14,9 +14,11 @@ SRCS= dtrace.c \ dtrace_subr.c .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" +.PATH: ${.CURDIR}/../../../cddl/dev/dtrace/x86 SRCS+= dis_tables.c \ instr_size.c -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/intel +CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/intel \ + -I${.CURDIR}/../../../cddl/dev/dtrace/x86 .endif SRCS+= bus_if.h device_if.h vnode_if.h From owner-svn-src-stable@FreeBSD.ORG Sat May 3 16:24:19 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1734570; Sat, 3 May 2014 16:24:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE8CA1B6A; Sat, 3 May 2014 16:24:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s43GOIQV044742; Sat, 3 May 2014 16:24:18 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s43GOIlF044741; Sat, 3 May 2014 16:24:18 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201405031624.s43GOIlF044741@svn.freebsd.org> From: Mark Johnston Date: Sat, 3 May 2014 16:24:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265277 - stable/10/sys/cddl/dev/dtrace/x86 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 May 2014 16:24:19 -0000 Author: markj Date: Sat May 3 16:24:18 2014 New Revision: 265277 URL: http://svnweb.freebsd.org/changeset/base/265277 Log: MFC r262543: Fix the struct reg mappings for i386 and amd64, which differ between illumos and FreeBSD. Modified: stable/10/sys/cddl/dev/dtrace/x86/regset.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/dev/dtrace/x86/regset.h ============================================================================== --- stable/10/sys/cddl/dev/dtrace/x86/regset.h Sat May 3 16:18:42 2014 (r265276) +++ stable/10/sys/cddl/dev/dtrace/x86/regset.h Sat May 3 16:24:18 2014 (r265277) @@ -61,6 +61,7 @@ extern "C" { #define REG_GSBASE 27 #define REG_FSBASE 26 +#if defined(sun) #define REG_DS 25 #define REG_ES 24 @@ -88,11 +89,40 @@ extern "C" { #define REG_R13 2 #define REG_R14 1 #define REG_R15 0 +#else +#define REG_SS 25 +#define REG_RSP 24 +#define REG_RFL 23 +#define REG_CS 22 +#define REG_RIP 21 +#define REG_DS 20 +#define REG_ES 19 +#define REG_ERR 18 +#define REG_GS 17 +#define REG_FS 16 +#define REG_TRAPNO 15 +#define REG_RAX 14 +#define REG_RCX 13 +#define REG_RDX 12 +#define REG_RBX 11 +#define REG_RBP 10 +#define REG_RSI 9 +#define REG_RDI 8 +#define REG_R8 7 +#define REG_R9 6 +#define REG_R10 5 +#define REG_R11 4 +#define REG_R12 3 +#define REG_R13 2 +#define REG_R14 1 +#define REG_R15 0 +#endif /* * The names and offsets defined here are specified by i386 ABI suppl. */ +#if defined(sun) #define SS 18 /* only stored on a privilege transition */ #define UESP 17 /* only stored on a privilege transition */ #define EFL 16 @@ -112,6 +142,27 @@ extern "C" { #define ES 2 #define FS 1 #define GS 0 +#else +#define GS 18 +#define SS 17 /* only stored on a privilege transition */ +#define UESP 16 /* only stored on a privilege transition */ +#define EFL 15 +#define CS 14 +#define EIP 13 +#define ERR 12 +#define TRAPNO 11 +#define EAX 10 +#define ECX 9 +#define EDX 8 +#define EBX 7 +#define ESP 6 +#define EBP 5 +#define ESI 4 +#define EDI 3 +#define DS 2 +#define ES 1 +#define FS 0 +#endif #define REG_PC EIP #define REG_FP EBP From owner-svn-src-stable@FreeBSD.ORG Sat May 3 16:24:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E43371C5; Sat, 3 May 2014 16:24:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B74191B78; Sat, 3 May 2014 16:24:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s43GOfrH044814; Sat, 3 May 2014 16:24:41 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s43GOf1Q044813; Sat, 3 May 2014 16:24:41 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201405031624.s43GOf1Q044813@svn.freebsd.org> From: Mark Johnston Date: Sat, 3 May 2014 16:24:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265278 - stable/9/sys/cddl/dev/dtrace/x86 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 May 2014 16:24:42 -0000 Author: markj Date: Sat May 3 16:24:41 2014 New Revision: 265278 URL: http://svnweb.freebsd.org/changeset/base/265278 Log: MFC r262543: Fix the struct reg mappings for i386 and amd64, which differ between illumos and FreeBSD. Modified: stable/9/sys/cddl/dev/dtrace/x86/regset.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cddl/dev/dtrace/x86/regset.h ============================================================================== --- stable/9/sys/cddl/dev/dtrace/x86/regset.h Sat May 3 16:24:18 2014 (r265277) +++ stable/9/sys/cddl/dev/dtrace/x86/regset.h Sat May 3 16:24:41 2014 (r265278) @@ -61,6 +61,7 @@ extern "C" { #define REG_GSBASE 27 #define REG_FSBASE 26 +#if defined(sun) #define REG_DS 25 #define REG_ES 24 @@ -88,11 +89,40 @@ extern "C" { #define REG_R13 2 #define REG_R14 1 #define REG_R15 0 +#else +#define REG_SS 25 +#define REG_RSP 24 +#define REG_RFL 23 +#define REG_CS 22 +#define REG_RIP 21 +#define REG_DS 20 +#define REG_ES 19 +#define REG_ERR 18 +#define REG_GS 17 +#define REG_FS 16 +#define REG_TRAPNO 15 +#define REG_RAX 14 +#define REG_RCX 13 +#define REG_RDX 12 +#define REG_RBX 11 +#define REG_RBP 10 +#define REG_RSI 9 +#define REG_RDI 8 +#define REG_R8 7 +#define REG_R9 6 +#define REG_R10 5 +#define REG_R11 4 +#define REG_R12 3 +#define REG_R13 2 +#define REG_R14 1 +#define REG_R15 0 +#endif /* * The names and offsets defined here are specified by i386 ABI suppl. */ +#if defined(sun) #define SS 18 /* only stored on a privilege transition */ #define UESP 17 /* only stored on a privilege transition */ #define EFL 16 @@ -112,6 +142,27 @@ extern "C" { #define ES 2 #define FS 1 #define GS 0 +#else +#define GS 18 +#define SS 17 /* only stored on a privilege transition */ +#define UESP 16 /* only stored on a privilege transition */ +#define EFL 15 +#define CS 14 +#define EIP 13 +#define ERR 12 +#define TRAPNO 11 +#define EAX 10 +#define ECX 9 +#define EDX 8 +#define EBX 7 +#define ESP 6 +#define EBP 5 +#define ESI 4 +#define EDI 3 +#define DS 2 +#define ES 1 +#define FS 0 +#endif #define REG_PC EIP #define REG_FP EBP From owner-svn-src-stable@FreeBSD.ORG Sat May 3 17:33:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD48AFEC; Sat, 3 May 2014 17:33:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9990811C2; Sat, 3 May 2014 17:33:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s43HXUae073655; Sat, 3 May 2014 17:33:30 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s43HXUWn073654; Sat, 3 May 2014 17:33:30 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201405031733.s43HXUWn073654@svn.freebsd.org> From: Bryan Venteicher Date: Sat, 3 May 2014 17:33:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265281 - stable/10/sys/dev/virtio/scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 May 2014 17:33:30 -0000 Author: bryanv Date: Sat May 3 17:33:30 2014 New Revision: 265281 URL: http://svnweb.freebsd.org/changeset/base/265281 Log: MFC r261147: Remove spaces before tabs in the function prototype list MFC r261149: Read each field of the configuration individually Modified: stable/10/sys/dev/virtio/scsi/virtio_scsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/virtio/scsi/virtio_scsi.c ============================================================================== --- stable/10/sys/dev/virtio/scsi/virtio_scsi.c Sat May 3 16:38:05 2014 (r265280) +++ stable/10/sys/dev/virtio/scsi/virtio_scsi.c Sat May 3 17:33:30 2014 (r265281) @@ -75,13 +75,15 @@ static int vtscsi_suspend(device_t); static int vtscsi_resume(device_t); static void vtscsi_negotiate_features(struct vtscsi_softc *); +static void vtscsi_read_config(struct vtscsi_softc *, + struct virtio_scsi_config *); static int vtscsi_maximum_segments(struct vtscsi_softc *, int); static int vtscsi_alloc_virtqueues(struct vtscsi_softc *); static void vtscsi_write_device_config(struct vtscsi_softc *); static int vtscsi_reinit(struct vtscsi_softc *); static int vtscsi_alloc_cam(struct vtscsi_softc *); -static int vtscsi_register_cam(struct vtscsi_softc *); +static int vtscsi_register_cam(struct vtscsi_softc *); static void vtscsi_free_cam(struct vtscsi_softc *); static void vtscsi_cam_async(void *, uint32_t, struct cam_path *, void *); static int vtscsi_register_async(struct vtscsi_softc *); @@ -91,7 +93,7 @@ static void vtscsi_cam_poll(struct cam_s static void vtscsi_cam_scsi_io(struct vtscsi_softc *, struct cam_sim *, union ccb *); -static void vtscsi_cam_get_tran_settings(struct vtscsi_softc *, +static void vtscsi_cam_get_tran_settings(struct vtscsi_softc *, union ccb *); static void vtscsi_cam_reset_bus(struct vtscsi_softc *, union ccb *); static void vtscsi_cam_reset_dev(struct vtscsi_softc *, union ccb *); @@ -99,69 +101,69 @@ static void vtscsi_cam_abort(struct vtsc static void vtscsi_cam_path_inquiry(struct vtscsi_softc *, struct cam_sim *, union ccb *); -static int vtscsi_sg_append_scsi_buf(struct vtscsi_softc *, +static int vtscsi_sg_append_scsi_buf(struct vtscsi_softc *, struct sglist *, struct ccb_scsiio *); -static int vtscsi_fill_scsi_cmd_sglist(struct vtscsi_softc *, +static int vtscsi_fill_scsi_cmd_sglist(struct vtscsi_softc *, struct vtscsi_request *, int *, int *); -static int vtscsi_execute_scsi_cmd(struct vtscsi_softc *, +static int vtscsi_execute_scsi_cmd(struct vtscsi_softc *, struct vtscsi_request *); -static int vtscsi_start_scsi_cmd(struct vtscsi_softc *, union ccb *); +static int vtscsi_start_scsi_cmd(struct vtscsi_softc *, union ccb *); static void vtscsi_complete_abort_timedout_scsi_cmd(struct vtscsi_softc *, struct vtscsi_request *); -static int vtscsi_abort_timedout_scsi_cmd(struct vtscsi_softc *, +static int vtscsi_abort_timedout_scsi_cmd(struct vtscsi_softc *, struct vtscsi_request *); static void vtscsi_timedout_scsi_cmd(void *); static cam_status vtscsi_scsi_cmd_cam_status(struct virtio_scsi_cmd_resp *); static cam_status vtscsi_complete_scsi_cmd_response(struct vtscsi_softc *, struct ccb_scsiio *, struct virtio_scsi_cmd_resp *); -static void vtscsi_complete_scsi_cmd(struct vtscsi_softc *, +static void vtscsi_complete_scsi_cmd(struct vtscsi_softc *, struct vtscsi_request *); static void vtscsi_poll_ctrl_req(struct vtscsi_softc *, struct vtscsi_request *); -static int vtscsi_execute_ctrl_req(struct vtscsi_softc *, +static int vtscsi_execute_ctrl_req(struct vtscsi_softc *, struct vtscsi_request *, struct sglist *, int, int, int); -static void vtscsi_complete_abort_task_cmd(struct vtscsi_softc *c, +static void vtscsi_complete_abort_task_cmd(struct vtscsi_softc *c, struct vtscsi_request *); -static int vtscsi_execute_abort_task_cmd(struct vtscsi_softc *, +static int vtscsi_execute_abort_task_cmd(struct vtscsi_softc *, struct vtscsi_request *); -static int vtscsi_execute_reset_dev_cmd(struct vtscsi_softc *, +static int vtscsi_execute_reset_dev_cmd(struct vtscsi_softc *, struct vtscsi_request *); -static void vtscsi_get_request_lun(uint8_t [], target_id_t *, lun_id_t *); +static void vtscsi_get_request_lun(uint8_t [], target_id_t *, lun_id_t *); static void vtscsi_set_request_lun(struct ccb_hdr *, uint8_t []); static void vtscsi_init_scsi_cmd_req(struct ccb_scsiio *, struct virtio_scsi_cmd_req *); static void vtscsi_init_ctrl_tmf_req(struct ccb_hdr *, uint32_t, uintptr_t, struct virtio_scsi_ctrl_tmf_req *); -static void vtscsi_freeze_simq(struct vtscsi_softc *, int); +static void vtscsi_freeze_simq(struct vtscsi_softc *, int); static int vtscsi_thaw_simq(struct vtscsi_softc *, int); -static void vtscsi_announce(struct vtscsi_softc *, uint32_t, target_id_t, +static void vtscsi_announce(struct vtscsi_softc *, uint32_t, target_id_t, lun_id_t); -static void vtscsi_execute_rescan(struct vtscsi_softc *, target_id_t, +static void vtscsi_execute_rescan(struct vtscsi_softc *, target_id_t, lun_id_t); -static void vtscsi_execute_rescan_bus(struct vtscsi_softc *); +static void vtscsi_execute_rescan_bus(struct vtscsi_softc *); -static void vtscsi_handle_event(struct vtscsi_softc *, +static void vtscsi_handle_event(struct vtscsi_softc *, struct virtio_scsi_event *); -static int vtscsi_enqueue_event_buf(struct vtscsi_softc *, +static int vtscsi_enqueue_event_buf(struct vtscsi_softc *, struct virtio_scsi_event *); static int vtscsi_init_event_vq(struct vtscsi_softc *); -static void vtscsi_reinit_event_vq(struct vtscsi_softc *); -static void vtscsi_drain_event_vq(struct vtscsi_softc *); +static void vtscsi_reinit_event_vq(struct vtscsi_softc *); +static void vtscsi_drain_event_vq(struct vtscsi_softc *); -static void vtscsi_complete_vqs_locked(struct vtscsi_softc *); -static void vtscsi_complete_vqs(struct vtscsi_softc *); -static void vtscsi_drain_vqs(struct vtscsi_softc *); -static void vtscsi_cancel_request(struct vtscsi_softc *, +static void vtscsi_complete_vqs_locked(struct vtscsi_softc *); +static void vtscsi_complete_vqs(struct vtscsi_softc *); +static void vtscsi_drain_vqs(struct vtscsi_softc *); +static void vtscsi_cancel_request(struct vtscsi_softc *, struct vtscsi_request *); static void vtscsi_drain_vq(struct vtscsi_softc *, struct virtqueue *); static void vtscsi_stop(struct vtscsi_softc *); static int vtscsi_reset_bus(struct vtscsi_softc *); -static void vtscsi_init_request(struct vtscsi_softc *, +static void vtscsi_init_request(struct vtscsi_softc *, struct vtscsi_request *); static int vtscsi_alloc_requests(struct vtscsi_softc *); static void vtscsi_free_requests(struct vtscsi_softc *); @@ -170,18 +172,18 @@ static void vtscsi_enqueue_request(struc static struct vtscsi_request * vtscsi_dequeue_request(struct vtscsi_softc *); static void vtscsi_complete_request(struct vtscsi_request *); -static void vtscsi_complete_vq(struct vtscsi_softc *, struct virtqueue *); +static void vtscsi_complete_vq(struct vtscsi_softc *, struct virtqueue *); static void vtscsi_control_vq_intr(void *); static void vtscsi_event_vq_intr(void *); static void vtscsi_request_vq_intr(void *); -static void vtscsi_disable_vqs_intr(struct vtscsi_softc *); -static void vtscsi_enable_vqs_intr(struct vtscsi_softc *); +static void vtscsi_disable_vqs_intr(struct vtscsi_softc *); +static void vtscsi_enable_vqs_intr(struct vtscsi_softc *); -static void vtscsi_get_tunables(struct vtscsi_softc *); -static void vtscsi_add_sysctl(struct vtscsi_softc *); +static void vtscsi_get_tunables(struct vtscsi_softc *); +static void vtscsi_add_sysctl(struct vtscsi_softc *); -static void vtscsi_printf_req(struct vtscsi_request *, const char *, +static void vtscsi_printf_req(struct vtscsi_request *, const char *, const char *, ...); /* Global tunables. */ @@ -287,8 +289,7 @@ vtscsi_attach(device_t dev) if (virtio_with_feature(dev, VIRTIO_SCSI_F_HOTPLUG)) sc->vtscsi_flags |= VTSCSI_FLAG_HOTPLUG; - virtio_read_device_config(dev, 0, &scsicfg, - sizeof(struct virtio_scsi_config)); + vtscsi_read_config(sc, &scsicfg); sc->vtscsi_max_channel = scsicfg.max_channel; sc->vtscsi_max_target = scsicfg.max_target; @@ -408,6 +409,35 @@ vtscsi_negotiate_features(struct vtscsi_ sc->vtscsi_features = features; } +#define VTSCSI_GET_CONFIG(_dev, _field, _cfg) \ + virtio_read_device_config(_dev, \ + offsetof(struct virtio_scsi_config, _field), \ + &(_cfg)->_field, sizeof((_cfg)->_field)) \ + +static void +vtscsi_read_config(struct vtscsi_softc *sc, + struct virtio_scsi_config *scsicfg) +{ + device_t dev; + + dev = sc->vtscsi_dev; + + bzero(scsicfg, sizeof(struct virtio_scsi_config)); + + VTSCSI_GET_CONFIG(dev, num_queues, scsicfg); + VTSCSI_GET_CONFIG(dev, seg_max, scsicfg); + VTSCSI_GET_CONFIG(dev, max_sectors, scsicfg); + VTSCSI_GET_CONFIG(dev, cmd_per_lun, scsicfg); + VTSCSI_GET_CONFIG(dev, event_info_size, scsicfg); + VTSCSI_GET_CONFIG(dev, sense_size, scsicfg); + VTSCSI_GET_CONFIG(dev, cdb_size, scsicfg); + VTSCSI_GET_CONFIG(dev, max_channel, scsicfg); + VTSCSI_GET_CONFIG(dev, max_target, scsicfg); + VTSCSI_GET_CONFIG(dev, max_lun, scsicfg); +} + +#undef VTSCSI_GET_CONFIG + static int vtscsi_maximum_segments(struct vtscsi_softc *sc, int seg_max) { From owner-svn-src-stable@FreeBSD.ORG Sat May 3 19:40:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 115576B; Sat, 3 May 2014 19:40:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F13101D44; Sat, 3 May 2014 19:40:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s43JefwJ028117; Sat, 3 May 2014 19:40:41 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s43JefMW028114; Sat, 3 May 2014 19:40:41 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201405031940.s43JefMW028114@svn.freebsd.org> From: Bryan Venteicher Date: Sat, 3 May 2014 19:40:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265286 - stable/10/sys/dev/virtio/network X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 May 2014 19:40:42 -0000 Author: bryanv Date: Sat May 3 19:40:41 2014 New Revision: 265286 URL: http://svnweb.freebsd.org/changeset/base/265286 Log: MFC r261150, r261151, r261164, r261166, r261167, r261168, r261394, r261395: - Read and write the MAC address in the config space byte by byte - Also include the mbuf's csum_flags in an assert message - Remove stray space - Move duplicated transmit start code into a single function - Avoid queue unlock followed by relock when the enable interrupt race is lost - Check for a full virtqueue in the multiqueue transmit path - Do not place the sglist used for Rx/Tx on the stack - Use m_defrag() instead of m_collapse() to compact a long mbuf chain Modified: stable/10/sys/dev/virtio/network/if_vtnet.c stable/10/sys/dev/virtio/network/if_vtnetvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- stable/10/sys/dev/virtio/network/if_vtnet.c Sat May 3 18:50:47 2014 (r265285) +++ stable/10/sys/dev/virtio/network/if_vtnet.c Sat May 3 19:40:41 2014 (r265286) @@ -145,6 +145,7 @@ static int vtnet_txq_mq_start_locked(str static int vtnet_txq_mq_start(struct ifnet *, struct mbuf *); static void vtnet_txq_tq_deferred(void *, int); #endif +static void vtnet_txq_start(struct vtnet_txq *); static void vtnet_txq_tq_intr(void *, int); static void vtnet_txq_eof(struct vtnet_txq *); static void vtnet_tx_vq_intr(void *); @@ -606,6 +607,20 @@ vtnet_setup_features(struct vtnet_softc } else sc->vtnet_hdr_size = sizeof(struct virtio_net_hdr); + if (sc->vtnet_flags & VTNET_FLAG_MRG_RXBUFS) + sc->vtnet_rx_nsegs = VTNET_MRG_RX_SEGS; + else if (sc->vtnet_flags & VTNET_FLAG_LRO_NOMRG) + sc->vtnet_rx_nsegs = VTNET_MAX_RX_SEGS; + else + sc->vtnet_rx_nsegs = VTNET_MIN_RX_SEGS; + + if (virtio_with_feature(dev, VIRTIO_NET_F_GSO) || + virtio_with_feature(dev, VIRTIO_NET_F_HOST_TSO4) || + virtio_with_feature(dev, VIRTIO_NET_F_HOST_TSO6)) + sc->vtnet_tx_nsegs = VTNET_MAX_TX_SEGS; + else + sc->vtnet_tx_nsegs = VTNET_MIN_TX_SEGS; + if (virtio_with_feature(dev, VIRTIO_NET_F_CTRL_VQ)) { sc->vtnet_flags |= VTNET_FLAG_CTRL_VQ; @@ -661,6 +676,10 @@ vtnet_init_rxq(struct vtnet_softc *sc, i rxq->vtnrx_sc = sc; rxq->vtnrx_id = id; + rxq->vtnrx_sg = sglist_alloc(sc->vtnet_rx_nsegs, M_NOWAIT); + if (rxq->vtnrx_sg == NULL) + return (ENOMEM); + TASK_INIT(&rxq->vtnrx_intrtask, 0, vtnet_rxq_tq_intr, rxq); rxq->vtnrx_tq = taskqueue_create(rxq->vtnrx_name, M_NOWAIT, taskqueue_thread_enqueue, &rxq->vtnrx_tq); @@ -682,6 +701,10 @@ vtnet_init_txq(struct vtnet_softc *sc, i txq->vtntx_sc = sc; txq->vtntx_id = id; + txq->vtntx_sg = sglist_alloc(sc->vtnet_tx_nsegs, M_NOWAIT); + if (txq->vtntx_sg == NULL) + return (ENOMEM); + #ifndef VTNET_LEGACY_TX txq->vtntx_br = buf_ring_alloc(VTNET_DEFAULT_BUFRING_SIZE, M_DEVBUF, M_NOWAIT, &txq->vtntx_mtx); @@ -734,6 +757,11 @@ vtnet_destroy_rxq(struct vtnet_rxq *rxq) rxq->vtnrx_sc = NULL; rxq->vtnrx_id = -1; + if (rxq->vtnrx_sg != NULL) { + sglist_free(rxq->vtnrx_sg); + rxq->vtnrx_sg = NULL; + } + if (mtx_initialized(&rxq->vtnrx_mtx) != 0) mtx_destroy(&rxq->vtnrx_mtx); } @@ -745,6 +773,11 @@ vtnet_destroy_txq(struct vtnet_txq *txq) txq->vtntx_sc = NULL; txq->vtntx_id = -1; + if (txq->vtntx_sg != NULL) { + sglist_free(txq->vtntx_sg); + txq->vtntx_sg = NULL; + } + #ifndef VTNET_LEGACY_TX if (txq->vtntx_br != NULL) { buf_ring_free(txq->vtntx_br, M_DEVBUF); @@ -819,40 +852,27 @@ vtnet_alloc_virtqueues(struct vtnet_soft struct vq_alloc_info *info; struct vtnet_rxq *rxq; struct vtnet_txq *txq; - int i, idx, flags, nvqs, rxsegs, error; + int i, idx, flags, nvqs, error; dev = sc->vtnet_dev; flags = 0; - /* - * Indirect descriptors are not needed for the Rx virtqueue when - * mergeable buffers are negotiated. The header is placed inline - * with the data, not in a separate descriptor, and mbuf clusters - * are always physically contiguous. - */ - if (sc->vtnet_flags & VTNET_FLAG_MRG_RXBUFS) - rxsegs = 0; - else if (sc->vtnet_flags & VTNET_FLAG_LRO_NOMRG) - rxsegs = VTNET_MAX_RX_SEGS; - else - rxsegs = VTNET_MIN_RX_SEGS; - nvqs = sc->vtnet_max_vq_pairs * 2; if (sc->vtnet_flags & VTNET_FLAG_CTRL_VQ) nvqs++; - info = malloc(sizeof(struct vq_alloc_info) * nvqs , M_TEMP, M_NOWAIT); + info = malloc(sizeof(struct vq_alloc_info) * nvqs, M_TEMP, M_NOWAIT); if (info == NULL) return (ENOMEM); for (i = 0, idx = 0; i < sc->vtnet_max_vq_pairs; i++, idx+=2) { rxq = &sc->vtnet_rxqs[i]; - VQ_ALLOC_INFO_INIT(&info[idx], rxsegs, + VQ_ALLOC_INFO_INIT(&info[idx], sc->vtnet_rx_nsegs, vtnet_rx_vq_intr, rxq, &rxq->vtnrx_vq, "%s-%d rx", device_get_nameunit(dev), rxq->vtnrx_id); txq = &sc->vtnet_txqs[i]; - VQ_ALLOC_INFO_INIT(&info[idx+1], VTNET_MAX_TX_SEGS, + VQ_ALLOC_INFO_INIT(&info[idx+1], sc->vtnet_tx_nsegs, vtnet_tx_vq_intr, txq, &txq->vtntx_vq, "%s-%d tx", device_get_nameunit(dev), txq->vtntx_id); } @@ -1359,14 +1379,14 @@ vtnet_rxq_replace_buf(struct vtnet_rxq * static int vtnet_rxq_enqueue_buf(struct vtnet_rxq *rxq, struct mbuf *m) { - struct sglist sg; - struct sglist_seg segs[VTNET_MAX_RX_SEGS]; struct vtnet_softc *sc; + struct sglist *sg; struct vtnet_rx_header *rxhdr; uint8_t *mdata; int offset, error; sc = rxq->vtnrx_sc; + sg = rxq->vtnrx_sg; mdata = mtod(m, uint8_t *); VTNET_RXQ_LOCK_ASSERT(rxq); @@ -1376,22 +1396,22 @@ vtnet_rxq_enqueue_buf(struct vtnet_rxq * ("%s: unexpected cluster size %d/%d", __func__, m->m_len, sc->vtnet_rx_clsize)); - sglist_init(&sg, VTNET_MAX_RX_SEGS, segs); + sglist_reset(sg); if ((sc->vtnet_flags & VTNET_FLAG_MRG_RXBUFS) == 0) { MPASS(sc->vtnet_hdr_size == sizeof(struct virtio_net_hdr)); rxhdr = (struct vtnet_rx_header *) mdata; - sglist_append(&sg, &rxhdr->vrh_hdr, sc->vtnet_hdr_size); + sglist_append(sg, &rxhdr->vrh_hdr, sc->vtnet_hdr_size); offset = sizeof(struct vtnet_rx_header); } else offset = 0; - sglist_append(&sg, mdata + offset, m->m_len - offset); + sglist_append(sg, mdata + offset, m->m_len - offset); if (m->m_next != NULL) { - error = sglist_append_mbuf(&sg, m->m_next); + error = sglist_append_mbuf(sg, m->m_next); MPASS(error == 0); } - error = virtqueue_enqueue(rxq->vtnrx_vq, m, &sg, 0, sg.sg_nseg); + error = virtqueue_enqueue(rxq->vtnrx_vq, m, sg, 0, sg->sg_nseg); return (error); } @@ -1818,9 +1838,9 @@ vtnet_rx_vq_intr(void *xrxq) return; } -again: VTNET_RXQ_LOCK(rxq); +again: if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { VTNET_RXQ_UNLOCK(rxq); return; @@ -1834,10 +1854,11 @@ again: * This is an occasional condition or race (when !more), * so retry a few times before scheduling the taskqueue. */ - rxq->vtnrx_stats.vrxs_rescheduled++; - VTNET_RXQ_UNLOCK(rxq); if (tries++ < VTNET_INTR_DISABLE_RETRIES) goto again; + + VTNET_RXQ_UNLOCK(rxq); + rxq->vtnrx_stats.vrxs_rescheduled++; taskqueue_enqueue(rxq->vtnrx_tq, &rxq->vtnrx_intrtask); } else VTNET_RXQ_UNLOCK(rxq); @@ -2025,7 +2046,8 @@ vtnet_txq_offload(struct vtnet_txq *txq, } KASSERT(hdr->flags & VIRTIO_NET_HDR_F_NEEDS_CSUM, - ("%s: mbuf %p TSO without checksum offload", __func__, m)); + ("%s: mbuf %p TSO without checksum offload %#x", + __func__, m, flags)); error = vtnet_txq_offload_tso(txq, m, etype, csum_start, hdr); if (error) @@ -2043,45 +2065,43 @@ static int vtnet_txq_enqueue_buf(struct vtnet_txq *txq, struct mbuf **m_head, struct vtnet_tx_header *txhdr) { - struct sglist sg; - struct sglist_seg segs[VTNET_MAX_TX_SEGS]; struct vtnet_softc *sc; struct virtqueue *vq; + struct sglist *sg; struct mbuf *m; - int collapsed, error; + int error; - vq = txq->vtntx_vq; sc = txq->vtntx_sc; + vq = txq->vtntx_vq; + sg = txq->vtntx_sg; m = *m_head; - collapsed = 0; - sglist_init(&sg, VTNET_MAX_TX_SEGS, segs); - error = sglist_append(&sg, &txhdr->vth_uhdr, sc->vtnet_hdr_size); - KASSERT(error == 0 && sg.sg_nseg == 1, + sglist_reset(sg); + error = sglist_append(sg, &txhdr->vth_uhdr, sc->vtnet_hdr_size); + KASSERT(error == 0 && sg->sg_nseg == 1, ("%s: error %d adding header to sglist", __func__, error)); -again: - error = sglist_append_mbuf(&sg, m); + error = sglist_append_mbuf(sg, m); if (error) { - if (collapsed) - goto fail; - - m = m_collapse(m, M_NOWAIT, VTNET_MAX_TX_SEGS - 1); + m = m_defrag(m, M_NOWAIT); if (m == NULL) goto fail; *m_head = m; - collapsed = 1; - txq->vtntx_stats.vtxs_collapsed++; - goto again; + sc->vtnet_stats.tx_defragged++; + + error = sglist_append_mbuf(sg, m); + if (error) + goto fail; } txhdr->vth_mbuf = m; - error = virtqueue_enqueue(vq, txhdr, &sg, sg.sg_nseg, 0); + error = virtqueue_enqueue(vq, txhdr, sg, sg->sg_nseg, 0); return (error); fail: + sc->vtnet_stats.tx_defrag_failed++; m_freem(*m_head); *m_head = NULL; @@ -2238,6 +2258,12 @@ vtnet_txq_mq_start_locked(struct vtnet_t vtnet_txq_eof(txq); while ((m = drbr_peek(ifp, br)) != NULL) { + if (virtqueue_full(vq)) { + drbr_putback(ifp, br, m); + error = ENOBUFS; + break; + } + error = vtnet_txq_encap(txq, &m); if (error) { if (m != NULL) @@ -2306,6 +2332,24 @@ vtnet_txq_tq_deferred(void *xtxq, int pe #endif /* VTNET_LEGACY_TX */ static void +vtnet_txq_start(struct vtnet_txq *txq) +{ + struct vtnet_softc *sc; + struct ifnet *ifp; + + sc = txq->vtntx_sc; + ifp = sc->vtnet_ifp; + +#ifdef VTNET_LEGACY_TX + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + vtnet_start_locked(txq, ifp); +#else + if (!drbr_empty(ifp, txq->vtntx_br)) + vtnet_txq_mq_start_locked(txq, NULL); +#endif +} + +static void vtnet_txq_tq_intr(void *xtxq, int pending) { struct vtnet_softc *sc; @@ -2325,13 +2369,7 @@ vtnet_txq_tq_intr(void *xtxq, int pendin vtnet_txq_eof(txq); -#ifdef VTNET_LEGACY_TX - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - vtnet_start_locked(txq, ifp); -#else - if (!drbr_empty(ifp, txq->vtntx_br)) - vtnet_txq_mq_start_locked(txq, NULL); -#endif + vtnet_txq_start(txq); if (vtnet_txq_enable_intr(txq) != 0) { vtnet_txq_disable_intr(txq); @@ -2392,9 +2430,9 @@ vtnet_tx_vq_intr(void *xtxq) return; } -again: VTNET_TXQ_LOCK(txq); +again: if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { VTNET_TXQ_UNLOCK(txq); return; @@ -2402,13 +2440,7 @@ again: vtnet_txq_eof(txq); -#ifdef VTNET_LEGACY_TX - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - vtnet_start_locked(txq, ifp); -#else - if (!drbr_empty(ifp, txq->vtntx_br)) - vtnet_txq_mq_start_locked(txq, NULL); -#endif + vtnet_txq_start(txq); if (vtnet_txq_enable_intr(txq) != 0) { vtnet_txq_disable_intr(txq); @@ -2416,9 +2448,10 @@ again: * This is an occasional race, so retry a few times * before scheduling the taskqueue. */ - VTNET_TXQ_UNLOCK(txq); if (tries++ < VTNET_INTR_DISABLE_RETRIES) goto again; + + VTNET_TXQ_UNLOCK(txq); txq->vtntx_stats.vtxs_rescheduled++; taskqueue_enqueue(txq->vtntx_tq, &txq->vtntx_intrtask); } else @@ -2428,24 +2461,16 @@ again: static void vtnet_tx_start_all(struct vtnet_softc *sc) { - struct ifnet *ifp; struct vtnet_txq *txq; int i; - ifp = sc->vtnet_ifp; VTNET_CORE_LOCK_ASSERT(sc); for (i = 0; i < sc->vtnet_act_vq_pairs; i++) { txq = &sc->vtnet_txqs[i]; VTNET_TXQ_LOCK(txq); -#ifdef VTNET_LEGACY_TX - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - vtnet_start_locked(txq, ifp); -#else - if (!drbr_empty(ifp, txq->vtntx_br)) - vtnet_txq_mq_start_locked(txq, NULL); -#endif + vtnet_txq_start(txq); VTNET_TXQ_UNLOCK(txq); } } @@ -2521,7 +2546,6 @@ vtnet_txq_accum_stats(struct vtnet_txq * accum->vtxs_obytes += st->vtxs_obytes; accum->vtxs_csum += st->vtxs_csum; accum->vtxs_tso += st->vtxs_tso; - accum->vtxs_collapsed += st->vtxs_collapsed; accum->vtxs_rescheduled += st->vtxs_rescheduled; } @@ -2839,9 +2863,10 @@ vtnet_init_rx_queues(struct vtnet_softc sc->vtnet_rx_clsize = clsize; sc->vtnet_rx_nmbufs = VTNET_NEEDED_RX_MBUFS(sc, clsize); - /* The first segment is reserved for the header. */ - KASSERT(sc->vtnet_rx_nmbufs < VTNET_MAX_RX_SEGS, - ("%s: too many rx mbufs %d", __func__, sc->vtnet_rx_nmbufs)); + KASSERT(sc->vtnet_flags & VTNET_FLAG_MRG_RXBUFS || + sc->vtnet_rx_nmbufs < sc->vtnet_rx_nsegs, + ("%s: too many rx mbufs %d for %d segments", __func__, + sc->vtnet_rx_nmbufs, sc->vtnet_rx_nsegs)); for (i = 0; i < sc->vtnet_act_vq_pairs; i++) { rxq = &sc->vtnet_rxqs[i]; @@ -3483,6 +3508,7 @@ static void vtnet_set_hwaddr(struct vtnet_softc *sc) { device_t dev; + int i; dev = sc->vtnet_dev; @@ -3490,9 +3516,11 @@ vtnet_set_hwaddr(struct vtnet_softc *sc) if (vtnet_ctrl_mac_cmd(sc, sc->vtnet_hwaddr) != 0) device_printf(dev, "unable to set MAC address\n"); } else if (sc->vtnet_flags & VTNET_FLAG_MAC) { - virtio_write_device_config(dev, - offsetof(struct virtio_net_config, mac), - sc->vtnet_hwaddr, ETHER_ADDR_LEN); + for (i = 0; i < ETHER_ADDR_LEN; i++) { + virtio_write_dev_config_1(dev, + offsetof(struct virtio_net_config, mac) + i, + sc->vtnet_hwaddr[i]); + } } } @@ -3500,6 +3528,7 @@ static void vtnet_get_hwaddr(struct vtnet_softc *sc) { device_t dev; + int i; dev = sc->vtnet_dev; @@ -3517,8 +3546,10 @@ vtnet_get_hwaddr(struct vtnet_softc *sc) return; } - virtio_read_device_config(dev, offsetof(struct virtio_net_config, mac), - sc->vtnet_hwaddr, ETHER_ADDR_LEN); + for (i = 0; i < ETHER_ADDR_LEN; i++) { + sc->vtnet_hwaddr[i] = virtio_read_dev_config_1(dev, + offsetof(struct virtio_net_config, mac) + i); + } } static void @@ -3595,8 +3626,6 @@ vtnet_setup_txq_sysctl(struct sysctl_ctx &stats->vtxs_csum, "Transmit checksum offloaded"); SYSCTL_ADD_UQUAD(ctx, list, OID_AUTO, "tso", CTLFLAG_RD, &stats->vtxs_tso, "Transmit segmentation offloaded"); - SYSCTL_ADD_UQUAD(ctx, list, OID_AUTO, "collapsed", CTLFLAG_RD, - &stats->vtxs_collapsed, "Transmit mbufs collapsed"); SYSCTL_ADD_UQUAD(ctx, list, OID_AUTO, "rescheduled", CTLFLAG_RD, &stats->vtxs_rescheduled, "Transmit interrupt handler rescheduled"); @@ -3676,6 +3705,12 @@ vtnet_setup_stat_sysctl(struct sysctl_ct SYSCTL_ADD_UQUAD(ctx, child, OID_AUTO, "tx_tso_not_tcp", CTLFLAG_RD, &stats->tx_tso_not_tcp, "Aborted transmit of TSO buffer with non TCP protocol"); + SYSCTL_ADD_UQUAD(ctx, child, OID_AUTO, "tx_defragged", + CTLFLAG_RD, &stats->tx_defragged, + "Transmit mbufs defragged"); + SYSCTL_ADD_UQUAD(ctx, child, OID_AUTO, "tx_defrag_failed", + CTLFLAG_RD, &stats->tx_defrag_failed, + "Aborted transmit of buffer because defrag failed"); SYSCTL_ADD_UQUAD(ctx, child, OID_AUTO, "tx_csum_offloaded", CTLFLAG_RD, &stats->tx_csum_offloaded, "Offloaded checksum of transmitted buffer"); Modified: stable/10/sys/dev/virtio/network/if_vtnetvar.h ============================================================================== --- stable/10/sys/dev/virtio/network/if_vtnetvar.h Sat May 3 18:50:47 2014 (r265285) +++ stable/10/sys/dev/virtio/network/if_vtnetvar.h Sat May 3 19:40:41 2014 (r265286) @@ -44,6 +44,8 @@ struct vtnet_statistics { uint64_t tx_csum_bad_ethtype; uint64_t tx_tso_bad_ethtype; uint64_t tx_tso_not_tcp; + uint64_t tx_defragged; + uint64_t tx_defrag_failed; /* * These are accumulated from each Rx/Tx queue. @@ -70,6 +72,7 @@ struct vtnet_rxq { struct mtx vtnrx_mtx; struct vtnet_softc *vtnrx_sc; struct virtqueue *vtnrx_vq; + struct sglist *vtnrx_sg; int vtnrx_id; int vtnrx_process_limit; struct vtnet_rxq_stats vtnrx_stats; @@ -91,7 +94,6 @@ struct vtnet_txq_stats { uint64_t vtxs_omcasts; /* if_omcasts */ uint64_t vtxs_csum; uint64_t vtxs_tso; - uint64_t vtxs_collapsed; uint64_t vtxs_rescheduled; }; @@ -99,6 +101,7 @@ struct vtnet_txq { struct mtx vtntx_mtx; struct vtnet_softc *vtntx_sc; struct virtqueue *vtntx_vq; + struct sglist *vtntx_sg; #ifndef VTNET_LEGACY_TX struct buf_ring *vtntx_br; #endif @@ -143,9 +146,11 @@ struct vtnet_softc { int vtnet_link_active; int vtnet_hdr_size; int vtnet_rx_process_limit; + int vtnet_rx_nsegs; int vtnet_rx_nmbufs; int vtnet_rx_clsize; int vtnet_rx_new_clsize; + int vtnet_tx_nsegs; int vtnet_if_flags; int vtnet_act_vq_pairs; int vtnet_max_vq_pairs; @@ -293,11 +298,14 @@ CTASSERT(sizeof(struct vtnet_mac_filter) /* * Used to preallocate the Vq indirect descriptors. The first segment - * is reserved for the header. + * is reserved for the header, except for mergeable buffers since the + * header is placed inline with the data. */ +#define VTNET_MRG_RX_SEGS 1 #define VTNET_MIN_RX_SEGS 2 #define VTNET_MAX_RX_SEGS 34 -#define VTNET_MAX_TX_SEGS 34 +#define VTNET_MIN_TX_SEGS 4 +#define VTNET_MAX_TX_SEGS 64 /* * Assert we can receive and transmit the maximum with regular @@ -314,7 +322,7 @@ CTASSERT(((VTNET_MAX_TX_SEGS - 1) * MCLB /* * Determine how many mbufs are in each receive buffer. For LRO without - * mergeable descriptors, we must allocate an mbuf chain large enough to + * mergeable buffers, we must allocate an mbuf chain large enough to * hold both the vtnet_rx_header and the maximum receivable data. */ #define VTNET_NEEDED_RX_MBUFS(_sc, _clsize) \ From owner-svn-src-stable@FreeBSD.ORG Sat May 3 22:27:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 59B61642; Sat, 3 May 2014 22:27:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D06D1DCD; Sat, 3 May 2014 22:27:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s43MROsa011383; Sat, 3 May 2014 22:27:24 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s43MRORX011381; Sat, 3 May 2014 22:27:24 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201405032227.s43MRORX011381@svn.freebsd.org> From: Rick Macklem Date: Sat, 3 May 2014 22:27:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265290 - stable/9/sys/net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 May 2014 22:27:25 -0000 Author: rmacklem Date: Sat May 3 22:27:24 2014 New Revision: 265290 URL: http://svnweb.freebsd.org/changeset/base/265290 Log: MFC: r264469, r264498 Lagg did not set the value of if_hw_tsomax, so when lagg was stacked on top of network interfaces that set if_hw_tsomax, tcp_output() would see the default value instead of the value set by the network interface(s). This patch modifies lagg so that it sets if_hw_tsomax to the minimum of the value(s) for the underlying network interfaces. Modified: stable/9/sys/net/if_lagg.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/net/ (props changed) Modified: stable/9/sys/net/if_lagg.c ============================================================================== --- stable/9/sys/net/if_lagg.c Sat May 3 20:33:00 2014 (r265289) +++ stable/9/sys/net/if_lagg.c Sat May 3 22:27:24 2014 (r265290) @@ -54,11 +54,11 @@ __FBSDID("$FreeBSD$"); #if defined(INET) || defined(INET6) #include +#include #endif #ifdef INET #include #include -#include #endif #ifdef INET6 @@ -406,6 +406,11 @@ lagg_capabilities(struct lagg_softc *sc) struct lagg_port *lp; int cap = ~0, ena = ~0; u_long hwa = ~0UL; +#if defined(INET) || defined(INET6) + u_int hw_tsomax = IP_MAXPACKET; /* Initialize to the maximum value. */ +#else + u_int hw_tsomax = ~0; /* if_hw_tsomax is only for INET/INET6, but.. */ +#endif LAGG_WLOCK_ASSERT(sc); @@ -414,6 +419,10 @@ lagg_capabilities(struct lagg_softc *sc) cap &= lp->lp_ifp->if_capabilities; ena &= lp->lp_ifp->if_capenable; hwa &= lp->lp_ifp->if_hwassist; + /* Set to the minimum value of the lagg ports. */ + if (lp->lp_ifp->if_hw_tsomax < hw_tsomax && + lp->lp_ifp->if_hw_tsomax > 0) + hw_tsomax = lp->lp_ifp->if_hw_tsomax; } cap = (cap == ~0 ? 0 : cap); ena = (ena == ~0 ? 0 : ena); @@ -421,10 +430,12 @@ lagg_capabilities(struct lagg_softc *sc) if (sc->sc_ifp->if_capabilities != cap || sc->sc_ifp->if_capenable != ena || - sc->sc_ifp->if_hwassist != hwa) { + sc->sc_ifp->if_hwassist != hwa || + sc->sc_ifp->if_hw_tsomax != hw_tsomax) { sc->sc_ifp->if_capabilities = cap; sc->sc_ifp->if_capenable = ena; sc->sc_ifp->if_hwassist = hwa; + sc->sc_ifp->if_hw_tsomax = hw_tsomax; getmicrotime(&sc->sc_ifp->if_lastchange); if (sc->sc_ifflags & IFF_DEBUG) From owner-svn-src-stable@FreeBSD.ORG Sat May 3 23:42:01 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5E413DED; Sat, 3 May 2014 23:42:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0FF1437; Sat, 3 May 2014 23:42:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s43Ng19n043657; Sat, 3 May 2014 23:42:01 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s43Ng19h043656; Sat, 3 May 2014 23:42:01 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201405032342.s43Ng19h043656@svn.freebsd.org> From: Rick Macklem Date: Sat, 3 May 2014 23:42:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265291 - stable/9/sys/net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 May 2014 23:42:01 -0000 Author: rmacklem Date: Sat May 3 23:42:00 2014 New Revision: 265291 URL: http://svnweb.freebsd.org/changeset/base/265291 Log: MFC: r264517 Vlan did not set the value of if_hw_tsomax, so when vlan was stacked on top of a network interface that set if_hw_tsomax, tcp_output() would see the default value instead of the value set by the network interface. This patch modifies vlan so that it sets if_hw_tsomax to the value of the parent interface. Modified: stable/9/sys/net/if_vlan.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/net/ (props changed) Modified: stable/9/sys/net/if_vlan.c ============================================================================== --- stable/9/sys/net/if_vlan.c Sat May 3 22:27:24 2014 (r265290) +++ stable/9/sys/net/if_vlan.c Sat May 3 23:42:00 2014 (r265291) @@ -1501,6 +1501,8 @@ vlan_capabilities(struct ifvlan *ifv) * propagate the hardware-assisted flag. TSO on VLANs * does not necessarily require hardware VLAN tagging. */ + if (p->if_hw_tsomax > 0) + ifp->if_hw_tsomax = p->if_hw_tsomax; if (p->if_capabilities & IFCAP_VLAN_HWTSO) ifp->if_capabilities |= p->if_capabilities & IFCAP_TSO; if (p->if_capenable & IFCAP_VLAN_HWTSO) { From owner-svn-src-stable@FreeBSD.ORG Sat May 3 23:48:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 56BF4FD6; Sat, 3 May 2014 23:48:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 299801464; Sat, 3 May 2014 23:48:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s43NmRpa044436; Sat, 3 May 2014 23:48:27 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s43NmRsY044435; Sat, 3 May 2014 23:48:27 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201405032348.s43NmRsY044435@svn.freebsd.org> From: Rick Macklem Date: Sat, 3 May 2014 23:48:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265292 - stable/9/sys/net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 May 2014 23:48:27 -0000 Author: rmacklem Date: Sat May 3 23:48:26 2014 New Revision: 265292 URL: http://svnweb.freebsd.org/changeset/base/265292 Log: MFC: r264630 For NFS mounts using rsize,wsize=65536 over TSO enabled network interfaces limited to 32 transmit segments, there are two known issues. The more serious one is that for an I/O of slightly less than 64K, the net device driver prepends an ethernet header, resulting in a TSO segment slightly larger than 64K. Since m_defrag() copies this into 33 mbuf clusters, the transmit fails with EFBIG. A tester indicated observing a similar failure using iSCSI. The second less critical problem is that the network device driver must copy the mbuf chain via m_defrag() (m_collapse() is not sufficient), resulting in measurable overhead. This patch reduces the default size of if_hw_tsomax slightly, so that the first issue is avoided. Fixing the second issue will require a way for the network device driver to inform tcp_output() that it is limited to 32 transmit segments. Modified: stable/9/sys/net/if.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/net/ (props changed) Modified: stable/9/sys/net/if.c ============================================================================== --- stable/9/sys/net/if.c Sat May 3 23:42:00 2014 (r265291) +++ stable/9/sys/net/if.c Sat May 3 23:48:26 2014 (r265292) @@ -74,6 +74,7 @@ #include #if defined(INET) || defined(INET6) +#include #include #include #include @@ -674,7 +675,8 @@ if_attach_internal(struct ifnet *ifp, in #if defined(INET) || defined(INET6) /* Initialize to max value. */ if (ifp->if_hw_tsomax == 0) - ifp->if_hw_tsomax = IP_MAXPACKET; + ifp->if_hw_tsomax = min(IP_MAXPACKET, 32 * MCLBYTES - + (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN)); KASSERT(ifp->if_hw_tsomax <= IP_MAXPACKET && ifp->if_hw_tsomax >= IP_MAXPACKET / 8, ("%s: tsomax outside of range", __func__)); From owner-svn-src-stable@FreeBSD.ORG Sun May 4 00:09:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1B7ED358; Sun, 4 May 2014 00:09:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E346F15D4; Sun, 4 May 2014 00:09:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s44097B7053997; Sun, 4 May 2014 00:09:07 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s44097PB053996; Sun, 4 May 2014 00:09:07 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201405040009.s44097PB053996@svn.freebsd.org> From: Glen Barber Date: Sun, 4 May 2014 00:09:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265293 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 May 2014 00:09:08 -0000 Author: gjb Date: Sun May 4 00:09:07 2014 New Revision: 265293 URL: http://svnweb.freebsd.org/changeset/base/265293 Log: MFC r264907, r264908, r264922: Record mergeinfo for r264907 and r264908, reverted in r264922. This commit is for merge tracking purposes only. Sponsored by: The FreeBSD Foundation Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Sun May 4 00:09:17 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CB1E448C; Sun, 4 May 2014 00:09:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9FE8C15D5; Sun, 4 May 2014 00:09:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4409HIN054062; Sun, 4 May 2014 00:09:17 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4409HEq054061; Sun, 4 May 2014 00:09:17 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201405040009.s4409HEq054061@svn.freebsd.org> From: Glen Barber Date: Sun, 4 May 2014 00:09:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265294 - stable/9/release X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 May 2014 00:09:17 -0000 Author: gjb Date: Sun May 4 00:09:17 2014 New Revision: 265294 URL: http://svnweb.freebsd.org/changeset/base/265294 Log: MFC r264907, r264908, r264922: Record mergeinfo for r264907 and r264908, reverted in r264922. This commit is for merge tracking purposes only. Sponsored by: The FreeBSD Foundation Modified: Directory Properties: stable/9/release/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Sun May 4 00:10:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7CFC05C2; Sun, 4 May 2014 00:10:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69C8C15DD; Sun, 4 May 2014 00:10:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s440AQTs054826; Sun, 4 May 2014 00:10:26 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s440AQ01054823; Sun, 4 May 2014 00:10:26 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201405040010.s440AQ01054823@svn.freebsd.org> From: Bryan Venteicher Date: Sun, 4 May 2014 00:10:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265295 - stable/9/sys/dev/virtio X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 May 2014 00:10:26 -0000 Author: bryanv Date: Sun May 4 00:10:25 2014 New Revision: 265295 URL: http://svnweb.freebsd.org/changeset/base/265295 Log: MFC r255166, r255109: - Fix unintended compiler constant folding - Add support for postponing VirtIO virtqueue interrupts Modified: stable/9/sys/dev/virtio/virtqueue.c stable/9/sys/dev/virtio/virtqueue.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/virtio/virtqueue.c ============================================================================== --- stable/9/sys/dev/virtio/virtqueue.c Sun May 4 00:09:17 2014 (r265294) +++ stable/9/sys/dev/virtio/virtqueue.c Sun May 4 00:10:25 2014 (r265295) @@ -127,7 +127,7 @@ static uint16_t vq_ring_enqueue_segments static int vq_ring_use_indirect(struct virtqueue *, int); static void vq_ring_enqueue_indirect(struct virtqueue *, void *, struct sglist *, int, int); -static int vq_ring_enable_interrupt(struct virtqueue *, uint16_t); +static int vq_ring_enable_interrupt(struct virtqueue *, uint16_t); static int vq_ring_must_notify_host(struct virtqueue *); static void vq_ring_notify_host(struct virtqueue *); static void vq_ring_free_chain(struct virtqueue *, uint16_t); @@ -440,28 +440,38 @@ virtqueue_enable_intr(struct virtqueue * } int -virtqueue_postpone_intr(struct virtqueue *vq) +virtqueue_postpone_intr(struct virtqueue *vq, vq_postpone_t hint) { uint16_t ndesc, avail_idx; - /* - * Request the next interrupt be postponed until at least half - * of the available descriptors have been consumed. - */ avail_idx = vq->vq_ring.avail->idx; - ndesc = (uint16_t)(avail_idx - vq->vq_used_cons_idx) / 2; + ndesc = (uint16_t)(avail_idx - vq->vq_used_cons_idx); + + switch (hint) { + case VQ_POSTPONE_SHORT: + ndesc = ndesc / 4; + break; + case VQ_POSTPONE_LONG: + ndesc = (ndesc * 3) / 4; + break; + case VQ_POSTPONE_EMPTIED: + break; + } return (vq_ring_enable_interrupt(vq, ndesc)); } +/* + * Note this is only considered a hint to the host. + */ void virtqueue_disable_intr(struct virtqueue *vq) { - /* - * Note this is only considered a hint to the host. - */ - if ((vq->vq_flags & VIRTQUEUE_FLAG_EVENT_IDX) == 0) + if (vq->vq_flags & VIRTQUEUE_FLAG_EVENT_IDX) { + vring_used_event(&vq->vq_ring) = vq->vq_used_cons_idx - + vq->vq_nentries - 1; + } else vq->vq_ring.avail->flags |= VRING_AVAIL_F_NO_INTERRUPT; } Modified: stable/9/sys/dev/virtio/virtqueue.h ============================================================================== --- stable/9/sys/dev/virtio/virtqueue.h Sun May 4 00:09:17 2014 (r265294) +++ stable/9/sys/dev/virtio/virtqueue.h Sun May 4 00:10:25 2014 (r265295) @@ -41,6 +41,16 @@ struct sglist; /* Device callback for a virtqueue interrupt. */ typedef void virtqueue_intr_t(void *); +/* + * Hint on how long the next interrupt should be postponed. This is + * only used when the EVENT_IDX feature is negotiated. + */ +typedef enum { + VQ_POSTPONE_SHORT, + VQ_POSTPONE_LONG, + VQ_POSTPONE_EMPTIED /* Until all available desc are used. */ +} vq_postpone_t; + #define VIRTQUEUE_MAX_NAME_SZ 32 /* One for each virtqueue the device wishes to allocate. */ @@ -73,7 +83,7 @@ int virtqueue_reinit(struct virtqueue * int virtqueue_intr_filter(struct virtqueue *vq); void virtqueue_intr(struct virtqueue *vq); int virtqueue_enable_intr(struct virtqueue *vq); -int virtqueue_postpone_intr(struct virtqueue *vq); +int virtqueue_postpone_intr(struct virtqueue *vq, vq_postpone_t hint); void virtqueue_disable_intr(struct virtqueue *vq); /* Get physical address of the virtqueue ring. */ From owner-svn-src-stable@FreeBSD.ORG Sun May 4 00:13:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B34470A; Sun, 4 May 2014 00:13:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E71F1655; Sun, 4 May 2014 00:13:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s440D7aw057684; Sun, 4 May 2014 00:13:07 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s440D7FI057682; Sun, 4 May 2014 00:13:07 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201405040013.s440D7FI057682@svn.freebsd.org> From: Glen Barber Date: Sun, 4 May 2014 00:13:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265296 - in stable/10/release: amd64 i386 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 May 2014 00:13:08 -0000 Author: gjb Date: Sun May 4 00:13:07 2014 New Revision: 265296 URL: http://svnweb.freebsd.org/changeset/base/265296 Log: MFC r264933: Fix indentation in make-memstick.sh. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/amd64/make-memstick.sh stable/10/release/i386/make-memstick.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/release/amd64/make-memstick.sh ============================================================================== --- stable/10/release/amd64/make-memstick.sh Sun May 4 00:10:25 2014 (r265295) +++ stable/10/release/amd64/make-memstick.sh Sun May 4 00:13:07 2014 (r265296) @@ -14,32 +14,32 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin export PATH if [ $# -ne 2 ]; then - echo "make-memstick.sh /path/to/directory /path/to/image/file" - exit 1 + echo "make-memstick.sh /path/to/directory /path/to/image/file" + exit 1 fi if [ ! -d ${1} ]; then - echo "${1} must be a directory" - exit 1 + echo "${1} must be a directory" + exit 1 fi if [ -e ${2} ]; then - echo "won't overwrite ${2}" - exit 1 + echo "won't overwrite ${2}" + exit 1 fi echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab makefs -B little -o label=FreeBSD_Install ${2} ${1} if [ $? -ne 0 ]; then - echo "makefs failed" - exit 1 + echo "makefs failed" + exit 1 fi rm ${1}/etc/fstab -unit=`mdconfig -a -t vnode -f ${2}` +unit=$(mdconfig -a -t vnode -f ${2}) if [ $? -ne 0 ]; then - echo "mdconfig failed" - exit 1 + echo "mdconfig failed" + exit 1 fi gpart create -s BSD ${unit} gpart bootcode -b ${1}/boot/boot ${unit} Modified: stable/10/release/i386/make-memstick.sh ============================================================================== --- stable/10/release/i386/make-memstick.sh Sun May 4 00:10:25 2014 (r265295) +++ stable/10/release/i386/make-memstick.sh Sun May 4 00:13:07 2014 (r265296) @@ -14,32 +14,32 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin export PATH if [ $# -ne 2 ]; then - echo "make-memstick.sh /path/to/directory /path/to/image/file" - exit 1 + echo "make-memstick.sh /path/to/directory /path/to/image/file" + exit 1 fi if [ ! -d ${1} ]; then - echo "${1} must be a directory" - exit 1 + echo "${1} must be a directory" + exit 1 fi if [ -e ${2} ]; then - echo "won't overwrite ${2}" - exit 1 + echo "won't overwrite ${2}" + exit 1 fi echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab makefs -B little -o label=FreeBSD_Install ${2} ${1} if [ $? -ne 0 ]; then - echo "makefs failed" - exit 1 + echo "makefs failed" + exit 1 fi rm ${1}/etc/fstab -unit=`mdconfig -a -t vnode -f ${2}` +unit=$(mdconfig -a -t vnode -f ${2}) if [ $? -ne 0 ]; then - echo "mdconfig failed" - exit 1 + echo "mdconfig failed" + exit 1 fi gpart create -s BSD ${unit} gpart bootcode -b ${1}/boot/boot ${unit} From owner-svn-src-stable@FreeBSD.ORG Sun May 4 00:13:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E127C834; Sun, 4 May 2014 00:13:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B44421657; Sun, 4 May 2014 00:13:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s440DQHC057753; Sun, 4 May 2014 00:13:26 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s440DQgU057751; Sun, 4 May 2014 00:13:26 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201405040013.s440DQgU057751@svn.freebsd.org> From: Glen Barber Date: Sun, 4 May 2014 00:13:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265297 - in stable/9/release: amd64 i386 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 May 2014 00:13:27 -0000 Author: gjb Date: Sun May 4 00:13:26 2014 New Revision: 265297 URL: http://svnweb.freebsd.org/changeset/base/265297 Log: MFC r264933: Fix indentation in make-memstick.sh. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/amd64/make-memstick.sh stable/9/release/i386/make-memstick.sh Directory Properties: stable/9/release/ (props changed) Modified: stable/9/release/amd64/make-memstick.sh ============================================================================== --- stable/9/release/amd64/make-memstick.sh Sun May 4 00:13:07 2014 (r265296) +++ stable/9/release/amd64/make-memstick.sh Sun May 4 00:13:26 2014 (r265297) @@ -14,32 +14,32 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin export PATH if [ $# -ne 2 ]; then - echo "make-memstick.sh /path/to/directory /path/to/image/file" - exit 1 + echo "make-memstick.sh /path/to/directory /path/to/image/file" + exit 1 fi if [ ! -d ${1} ]; then - echo "${1} must be a directory" - exit 1 + echo "${1} must be a directory" + exit 1 fi if [ -e ${2} ]; then - echo "won't overwrite ${2}" - exit 1 + echo "won't overwrite ${2}" + exit 1 fi echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab makefs -B little -o label=FreeBSD_Install ${2} ${1} if [ $? -ne 0 ]; then - echo "makefs failed" - exit 1 + echo "makefs failed" + exit 1 fi rm ${1}/etc/fstab -unit=`mdconfig -a -t vnode -f ${2}` +unit=$(mdconfig -a -t vnode -f ${2}) if [ $? -ne 0 ]; then - echo "mdconfig failed" - exit 1 + echo "mdconfig failed" + exit 1 fi gpart create -s BSD ${unit} gpart bootcode -b ${1}/boot/boot ${unit} Modified: stable/9/release/i386/make-memstick.sh ============================================================================== --- stable/9/release/i386/make-memstick.sh Sun May 4 00:13:07 2014 (r265296) +++ stable/9/release/i386/make-memstick.sh Sun May 4 00:13:26 2014 (r265297) @@ -14,32 +14,32 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin export PATH if [ $# -ne 2 ]; then - echo "make-memstick.sh /path/to/directory /path/to/image/file" - exit 1 + echo "make-memstick.sh /path/to/directory /path/to/image/file" + exit 1 fi if [ ! -d ${1} ]; then - echo "${1} must be a directory" - exit 1 + echo "${1} must be a directory" + exit 1 fi if [ -e ${2} ]; then - echo "won't overwrite ${2}" - exit 1 + echo "won't overwrite ${2}" + exit 1 fi echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab makefs -B little -o label=FreeBSD_Install ${2} ${1} if [ $? -ne 0 ]; then - echo "makefs failed" - exit 1 + echo "makefs failed" + exit 1 fi rm ${1}/etc/fstab -unit=`mdconfig -a -t vnode -f ${2}` +unit=$(mdconfig -a -t vnode -f ${2}) if [ $? -ne 0 ]; then - echo "mdconfig failed" - exit 1 + echo "mdconfig failed" + exit 1 fi gpart create -s BSD ${unit} gpart bootcode -b ${1}/boot/boot ${unit} From owner-svn-src-stable@FreeBSD.ORG Sun May 4 00:14:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD64A969; Sun, 4 May 2014 00:14:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9FBD165D; Sun, 4 May 2014 00:14:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s440En0H057951; Sun, 4 May 2014 00:14:49 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s440EnS8057949; Sun, 4 May 2014 00:14:49 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201405040014.s440EnS8057949@svn.freebsd.org> From: Bryan Venteicher Date: Sun, 4 May 2014 00:14:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265298 - in stable/9/sys/dev/virtio: . pci X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 May 2014 00:14:49 -0000 Author: bryanv Date: Sun May 4 00:14:49 2014 New Revision: 265298 URL: http://svnweb.freebsd.org/changeset/base/265298 Log: MFC r255110 - Add optional VirtIO device method for post-attach notifications Modified: stable/9/sys/dev/virtio/pci/virtio_pci.c stable/9/sys/dev/virtio/virtio_if.m Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/virtio/pci/virtio_pci.c ============================================================================== --- stable/9/sys/dev/virtio/pci/virtio_pci.c Sun May 4 00:13:26 2014 (r265297) +++ stable/9/sys/dev/virtio/pci/virtio_pci.c Sun May 4 00:14:49 2014 (r265298) @@ -757,8 +757,10 @@ vtpci_probe_and_attach_child(struct vtpc vtpci_release_child_resources(sc); /* Reset status for future attempt. */ vtpci_set_status(dev, VIRTIO_CONFIG_STATUS_ACK); - } else + } else { vtpci_set_status(dev, VIRTIO_CONFIG_STATUS_DRIVER_OK); + VIRTIO_ATTACH_COMPLETED(child); + } } static int Modified: stable/9/sys/dev/virtio/virtio_if.m ============================================================================== --- stable/9/sys/dev/virtio/virtio_if.m Sun May 4 00:13:26 2014 (r265297) +++ stable/9/sys/dev/virtio/virtio_if.m Sun May 4 00:14:49 2014 (r265298) @@ -31,6 +31,18 @@ INTERFACE virtio; CODE { static int + virtio_default_attach_completed(device_t dev) + { + return (0); + } +}; + +METHOD int attach_completed { + device_t dev; +} DEFAULT virtio_default_attach_completed; + +CODE { + static int virtio_default_config_change(device_t dev) { return (0); From owner-svn-src-stable@FreeBSD.ORG Sun May 4 00:43:01 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A46F5D48; Sun, 4 May 2014 00:43:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76F641849; Sun, 4 May 2014 00:43:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s440h1po069784; Sun, 4 May 2014 00:43:01 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s440h1rx069777; Sun, 4 May 2014 00:43:01 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201405040043.s440h1rx069777@svn.freebsd.org> From: Bryan Venteicher Date: Sun, 4 May 2014 00:43:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265299 - in stable/9/sys: kern sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 May 2014 00:43:01 -0000 Author: bryanv Date: Sun May 4 00:43:00 2014 New Revision: 265299 URL: http://svnweb.freebsd.org/changeset/base/265299 Log: MFC r260581: - Add sglist_append_bio(9) to append a struct bio's data to a sglist Modified: stable/9/sys/kern/subr_sglist.c stable/9/sys/sys/sglist.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/kern/subr_sglist.c ============================================================================== --- stable/9/sys/kern/subr_sglist.c Sun May 4 00:14:49 2014 (r265298) +++ stable/9/sys/kern/subr_sglist.c Sun May 4 00:43:00 2014 (r265299) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -40,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -239,6 +241,44 @@ sglist_append(struct sglist *sg, void *b } /* + * Append the segments to describe a bio's data to a scatter/gather list. + * If there are insufficient segments, then this fails with EFBIG. + * + * NOTE: This function expects bio_bcount to be initialized. + */ +int +sglist_append_bio(struct sglist *sg, struct bio *bp) +{ + struct sgsave save; + vm_paddr_t paddr; + size_t len, tlen; + int error, i, ma_offs; + + if ((bp->bio_flags & BIO_UNMAPPED) == 0) { + error = sglist_append(sg, bp->bio_data, bp->bio_bcount); + return (error); + } + + if (sg->sg_maxseg == 0) + return (EINVAL); + + SGLIST_SAVE(sg, save); + tlen = bp->bio_bcount; + ma_offs = bp->bio_ma_offset; + for (i = 0; tlen > 0; i++, tlen -= len) { + len = min(PAGE_SIZE - ma_offs, tlen); + paddr = VM_PAGE_TO_PHYS(bp->bio_ma[i]) + ma_offs; + error = sglist_append_phys(sg, paddr, len); + if (error) { + SGLIST_RESTORE(sg, save); + return (error); + } + ma_offs = 0; + } + return (0); +} + +/* * Append a single physical address range to a scatter/gather list. * If there are insufficient segments, then this fails with EFBIG. */ Modified: stable/9/sys/sys/sglist.h ============================================================================== --- stable/9/sys/sys/sglist.h Sun May 4 00:14:49 2014 (r265298) +++ stable/9/sys/sys/sglist.h Sun May 4 00:43:00 2014 (r265299) @@ -53,6 +53,7 @@ struct sglist { u_short sg_maxseg; }; +struct bio; struct mbuf; struct uio; @@ -83,6 +84,7 @@ sglist_hold(struct sglist *sg) struct sglist *sglist_alloc(int nsegs, int mflags); int sglist_append(struct sglist *sg, void *buf, size_t len); +int sglist_append_bio(struct sglist *sg, struct bio *bp); int sglist_append_mbuf(struct sglist *sg, struct mbuf *m0); int sglist_append_phys(struct sglist *sg, vm_paddr_t paddr, size_t len); From owner-svn-src-stable@FreeBSD.ORG Sun May 4 00:45:01 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1121CE8E; Sun, 4 May 2014 00:45:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8EE91854; Sun, 4 May 2014 00:45:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s440j0wA070045; Sun, 4 May 2014 00:45:00 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s440j0xN070040; Sun, 4 May 2014 00:45:00 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201405040045.s440j0xN070040@svn.freebsd.org> From: Bryan Venteicher Date: Sun, 4 May 2014 00:45:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265300 - stable/9/share/man/man9 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 May 2014 00:45:01 -0000 Author: bryanv Date: Sun May 4 00:45:00 2014 New Revision: 265300 URL: http://svnweb.freebsd.org/changeset/base/265300 Log: MFC r260581: - Add sglist_append_bio(9) to append a struct bio's data to a sglist Modified: stable/9/share/man/man9/Makefile stable/9/share/man/man9/sglist.9 Directory Properties: stable/9/share/man/man9/ (props changed) Modified: stable/9/share/man/man9/Makefile ============================================================================== --- stable/9/share/man/man9/Makefile Sun May 4 00:43:00 2014 (r265299) +++ stable/9/share/man/man9/Makefile Sun May 4 00:45:00 2014 (r265300) @@ -1150,6 +1150,7 @@ MLINKS+=sf_buf.9 sf_buf_alloc.9 \ sf_buf.9 sf_buf_page.9 MLINKS+=sglist.9 sglist_alloc.9 \ sglist.9 sglist_append.9 \ + sglist.9 sglist_append_bio.9 \ sglist.9 sglist_append_mbuf.9 \ sglist.9 sglist_append_phys.9 \ sglist.9 sglist_append_uio.9 \ Modified: stable/9/share/man/man9/sglist.9 ============================================================================== --- stable/9/share/man/man9/sglist.9 Sun May 4 00:43:00 2014 (r265299) +++ stable/9/share/man/man9/sglist.9 Sun May 4 00:45:00 2014 (r265300) @@ -26,13 +26,14 @@ .\" .\" $FreeBSD$ .\" -.Dd May 15, 2009 +.Dd January 12, 2014 .Dt SGLIST 9 .Os .Sh NAME .Nm sglist , .Nm sglist_alloc , .Nm sglist_append , +.Nm sglist_append_bio , .Nm sglist_append_mbuf , .Nm sglist_append_phys , .Nm sglist_append_uio , @@ -58,6 +59,8 @@ .Ft int .Fn sglist_append "struct sglist *sg" "void *buf" "size_t len" .Ft int +.Fn sglist_append_bio "struct sglist *sg" "struct bio *bp" +.Ft int .Fn sglist_append_mbuf "struct sglist *sg" "struct mbuf *m" .Ft int .Fn sglist_append_phys "struct sglist *sg" "vm_paddr_t paddr" "size_t len" @@ -206,6 +209,13 @@ and is bytes long. .Pp The +.Nm sglist_append_bio +function appends the physical address ranges described by a single bio +.Fa bp +to the scatter/gather list +.Fa sg . +.Pp +The .Nm sglist_append_mbuf function appends the physical address ranges described by an entire mbuf chain @@ -499,6 +509,7 @@ list in to describe the requested physical address ranges. .El .Sh SEE ALSO +.Xr g_bio 9 , .Xr malloc 9 , .Xr mbuf 9 , .Xr uio 9 From owner-svn-src-stable@FreeBSD.ORG Sun May 4 00:57:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 02274B9; Sun, 4 May 2014 00:57:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C895F1908; Sun, 4 May 2014 00:57:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s440vcQn074259; Sun, 4 May 2014 00:57:38 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s440vcu0074257; Sun, 4 May 2014 00:57:38 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201405040057.s440vcu0074257@svn.freebsd.org> From: Bryan Venteicher Date: Sun, 4 May 2014 00:57:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265301 - in stable/9/sys/dev/virtio: block scsi X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 May 2014 00:57:39 -0000 Author: bryanv Date: Sun May 4 00:57:38 2014 New Revision: 265301 URL: http://svnweb.freebsd.org/changeset/base/265301 Log: MFC r260582, r260583: - Add unmapped IO support to virtio_blk(4) - Add unmapped IO support to virtio_scsi(4) Modified: stable/9/sys/dev/virtio/block/virtio_blk.c stable/9/sys/dev/virtio/scsi/virtio_scsi.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/virtio/block/virtio_blk.c ============================================================================== --- stable/9/sys/dev/virtio/block/virtio_blk.c Sun May 4 00:45:00 2014 (r265300) +++ stable/9/sys/dev/virtio/block/virtio_blk.c Sun May 4 00:57:38 2014 (r265301) @@ -687,7 +687,7 @@ vtblk_alloc_disk(struct vtblk_softc *sc, dp->d_name = VTBLK_DISK_NAME; dp->d_unit = device_get_unit(dev); dp->d_drv1 = sc; - dp->d_flags = DISKFLAG_CANFLUSHCACHE; + dp->d_flags = DISKFLAG_CANFLUSHCACHE | DISKFLAG_UNMAPPED_BIO; dp->d_hba_vendor = virtio_get_vendor(dev); dp->d_hba_device = virtio_get_device(dev); dp->d_hba_subvendor = virtio_get_subvendor(dev); @@ -892,10 +892,11 @@ vtblk_execute_request(struct vtblk_softc sglist_append(sg, &req->vbr_hdr, sizeof(struct virtio_blk_outhdr)); if (bp->bio_cmd == BIO_READ || bp->bio_cmd == BIO_WRITE) { - error = sglist_append(sg, bp->bio_data, bp->bio_bcount); - if (error || sg->sg_nseg == sg->sg_maxseg) + error = sglist_append_bio(sg, bp); + if (error || sg->sg_nseg == sg->sg_maxseg) { panic("%s: data buffer too big bio:%p error:%d", __func__, bp, error); + } /* BIO_READ means the host writes into our buffer. */ if (bp->bio_cmd == BIO_READ) Modified: stable/9/sys/dev/virtio/scsi/virtio_scsi.c ============================================================================== --- stable/9/sys/dev/virtio/scsi/virtio_scsi.c Sun May 4 00:45:00 2014 (r265300) +++ stable/9/sys/dev/virtio/scsi/virtio_scsi.c Sun May 4 00:57:38 2014 (r265301) @@ -878,7 +878,7 @@ vtscsi_cam_path_inquiry(struct vtscsi_so cpi->version_num = 1; cpi->hba_inquiry = PI_TAG_ABLE; cpi->target_sprt = 0; - cpi->hba_misc = PIM_SEQSCAN; + cpi->hba_misc = PIM_SEQSCAN | PIM_UNMAPPED; if (vtscsi_bus_reset_disable != 0) cpi->hba_misc |= PIM_NOBUSRESET; cpi->hba_eng_cnt = 0; @@ -946,6 +946,9 @@ vtscsi_sg_append_scsi_buf(struct vtscsi_ (vm_paddr_t) dseg->ds_addr, dseg->ds_len); } break; + case CAM_DATA_BIO: + error = sglist_append_bio(sg, (struct bio *) csio->data_ptr); + break; default: error = EINVAL; break; From owner-svn-src-stable@FreeBSD.ORG Sun May 4 01:03:55 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2253B270; Sun, 4 May 2014 01:03:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DE1A1993; Sun, 4 May 2014 01:03:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4413sxq078242; Sun, 4 May 2014 01:03:54 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4413sfw078241; Sun, 4 May 2014 01:03:54 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201405040103.s4413sfw078241@svn.freebsd.org> From: Bryan Venteicher Date: Sun, 4 May 2014 01:03:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265302 - stable/9/sys/dev/virtio/scsi X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 May 2014 01:03:55 -0000 Author: bryanv Date: Sun May 4 01:03:54 2014 New Revision: 265302 URL: http://svnweb.freebsd.org/changeset/base/265302 Log: MFC r261147, r261149: - Remove spaces before tabs in the function prototype list - Read each field of the configuration individually Modified: stable/9/sys/dev/virtio/scsi/virtio_scsi.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/virtio/scsi/virtio_scsi.c ============================================================================== --- stable/9/sys/dev/virtio/scsi/virtio_scsi.c Sun May 4 00:57:38 2014 (r265301) +++ stable/9/sys/dev/virtio/scsi/virtio_scsi.c Sun May 4 01:03:54 2014 (r265302) @@ -75,13 +75,15 @@ static int vtscsi_suspend(device_t); static int vtscsi_resume(device_t); static void vtscsi_negotiate_features(struct vtscsi_softc *); +static void vtscsi_read_config(struct vtscsi_softc *, + struct virtio_scsi_config *); static int vtscsi_maximum_segments(struct vtscsi_softc *, int); static int vtscsi_alloc_virtqueues(struct vtscsi_softc *); static void vtscsi_write_device_config(struct vtscsi_softc *); static int vtscsi_reinit(struct vtscsi_softc *); static int vtscsi_alloc_cam(struct vtscsi_softc *); -static int vtscsi_register_cam(struct vtscsi_softc *); +static int vtscsi_register_cam(struct vtscsi_softc *); static void vtscsi_free_cam(struct vtscsi_softc *); static void vtscsi_cam_async(void *, uint32_t, struct cam_path *, void *); static int vtscsi_register_async(struct vtscsi_softc *); @@ -91,7 +93,7 @@ static void vtscsi_cam_poll(struct cam_s static void vtscsi_cam_scsi_io(struct vtscsi_softc *, struct cam_sim *, union ccb *); -static void vtscsi_cam_get_tran_settings(struct vtscsi_softc *, +static void vtscsi_cam_get_tran_settings(struct vtscsi_softc *, union ccb *); static void vtscsi_cam_reset_bus(struct vtscsi_softc *, union ccb *); static void vtscsi_cam_reset_dev(struct vtscsi_softc *, union ccb *); @@ -99,69 +101,69 @@ static void vtscsi_cam_abort(struct vtsc static void vtscsi_cam_path_inquiry(struct vtscsi_softc *, struct cam_sim *, union ccb *); -static int vtscsi_sg_append_scsi_buf(struct vtscsi_softc *, +static int vtscsi_sg_append_scsi_buf(struct vtscsi_softc *, struct sglist *, struct ccb_scsiio *); -static int vtscsi_fill_scsi_cmd_sglist(struct vtscsi_softc *, +static int vtscsi_fill_scsi_cmd_sglist(struct vtscsi_softc *, struct vtscsi_request *, int *, int *); -static int vtscsi_execute_scsi_cmd(struct vtscsi_softc *, +static int vtscsi_execute_scsi_cmd(struct vtscsi_softc *, struct vtscsi_request *); -static int vtscsi_start_scsi_cmd(struct vtscsi_softc *, union ccb *); +static int vtscsi_start_scsi_cmd(struct vtscsi_softc *, union ccb *); static void vtscsi_complete_abort_timedout_scsi_cmd(struct vtscsi_softc *, struct vtscsi_request *); -static int vtscsi_abort_timedout_scsi_cmd(struct vtscsi_softc *, +static int vtscsi_abort_timedout_scsi_cmd(struct vtscsi_softc *, struct vtscsi_request *); static void vtscsi_timedout_scsi_cmd(void *); static cam_status vtscsi_scsi_cmd_cam_status(struct virtio_scsi_cmd_resp *); static cam_status vtscsi_complete_scsi_cmd_response(struct vtscsi_softc *, struct ccb_scsiio *, struct virtio_scsi_cmd_resp *); -static void vtscsi_complete_scsi_cmd(struct vtscsi_softc *, +static void vtscsi_complete_scsi_cmd(struct vtscsi_softc *, struct vtscsi_request *); static void vtscsi_poll_ctrl_req(struct vtscsi_softc *, struct vtscsi_request *); -static int vtscsi_execute_ctrl_req(struct vtscsi_softc *, +static int vtscsi_execute_ctrl_req(struct vtscsi_softc *, struct vtscsi_request *, struct sglist *, int, int, int); -static void vtscsi_complete_abort_task_cmd(struct vtscsi_softc *c, +static void vtscsi_complete_abort_task_cmd(struct vtscsi_softc *c, struct vtscsi_request *); -static int vtscsi_execute_abort_task_cmd(struct vtscsi_softc *, +static int vtscsi_execute_abort_task_cmd(struct vtscsi_softc *, struct vtscsi_request *); -static int vtscsi_execute_reset_dev_cmd(struct vtscsi_softc *, +static int vtscsi_execute_reset_dev_cmd(struct vtscsi_softc *, struct vtscsi_request *); -static void vtscsi_get_request_lun(uint8_t [], target_id_t *, lun_id_t *); +static void vtscsi_get_request_lun(uint8_t [], target_id_t *, lun_id_t *); static void vtscsi_set_request_lun(struct ccb_hdr *, uint8_t []); static void vtscsi_init_scsi_cmd_req(struct ccb_scsiio *, struct virtio_scsi_cmd_req *); static void vtscsi_init_ctrl_tmf_req(struct ccb_hdr *, uint32_t, uintptr_t, struct virtio_scsi_ctrl_tmf_req *); -static void vtscsi_freeze_simq(struct vtscsi_softc *, int); +static void vtscsi_freeze_simq(struct vtscsi_softc *, int); static int vtscsi_thaw_simq(struct vtscsi_softc *, int); -static void vtscsi_announce(struct vtscsi_softc *, uint32_t, target_id_t, +static void vtscsi_announce(struct vtscsi_softc *, uint32_t, target_id_t, lun_id_t); -static void vtscsi_execute_rescan(struct vtscsi_softc *, target_id_t, +static void vtscsi_execute_rescan(struct vtscsi_softc *, target_id_t, lun_id_t); -static void vtscsi_execute_rescan_bus(struct vtscsi_softc *); +static void vtscsi_execute_rescan_bus(struct vtscsi_softc *); -static void vtscsi_handle_event(struct vtscsi_softc *, +static void vtscsi_handle_event(struct vtscsi_softc *, struct virtio_scsi_event *); -static int vtscsi_enqueue_event_buf(struct vtscsi_softc *, +static int vtscsi_enqueue_event_buf(struct vtscsi_softc *, struct virtio_scsi_event *); static int vtscsi_init_event_vq(struct vtscsi_softc *); -static void vtscsi_reinit_event_vq(struct vtscsi_softc *); -static void vtscsi_drain_event_vq(struct vtscsi_softc *); +static void vtscsi_reinit_event_vq(struct vtscsi_softc *); +static void vtscsi_drain_event_vq(struct vtscsi_softc *); -static void vtscsi_complete_vqs_locked(struct vtscsi_softc *); -static void vtscsi_complete_vqs(struct vtscsi_softc *); -static void vtscsi_drain_vqs(struct vtscsi_softc *); -static void vtscsi_cancel_request(struct vtscsi_softc *, +static void vtscsi_complete_vqs_locked(struct vtscsi_softc *); +static void vtscsi_complete_vqs(struct vtscsi_softc *); +static void vtscsi_drain_vqs(struct vtscsi_softc *); +static void vtscsi_cancel_request(struct vtscsi_softc *, struct vtscsi_request *); static void vtscsi_drain_vq(struct vtscsi_softc *, struct virtqueue *); static void vtscsi_stop(struct vtscsi_softc *); static int vtscsi_reset_bus(struct vtscsi_softc *); -static void vtscsi_init_request(struct vtscsi_softc *, +static void vtscsi_init_request(struct vtscsi_softc *, struct vtscsi_request *); static int vtscsi_alloc_requests(struct vtscsi_softc *); static void vtscsi_free_requests(struct vtscsi_softc *); @@ -170,18 +172,18 @@ static void vtscsi_enqueue_request(struc static struct vtscsi_request * vtscsi_dequeue_request(struct vtscsi_softc *); static void vtscsi_complete_request(struct vtscsi_request *); -static void vtscsi_complete_vq(struct vtscsi_softc *, struct virtqueue *); +static void vtscsi_complete_vq(struct vtscsi_softc *, struct virtqueue *); static void vtscsi_control_vq_intr(void *); static void vtscsi_event_vq_intr(void *); static void vtscsi_request_vq_intr(void *); -static void vtscsi_disable_vqs_intr(struct vtscsi_softc *); -static void vtscsi_enable_vqs_intr(struct vtscsi_softc *); +static void vtscsi_disable_vqs_intr(struct vtscsi_softc *); +static void vtscsi_enable_vqs_intr(struct vtscsi_softc *); -static void vtscsi_get_tunables(struct vtscsi_softc *); -static void vtscsi_add_sysctl(struct vtscsi_softc *); +static void vtscsi_get_tunables(struct vtscsi_softc *); +static void vtscsi_add_sysctl(struct vtscsi_softc *); -static void vtscsi_printf_req(struct vtscsi_request *, const char *, +static void vtscsi_printf_req(struct vtscsi_request *, const char *, const char *, ...); /* Global tunables. */ @@ -287,8 +289,7 @@ vtscsi_attach(device_t dev) if (virtio_with_feature(dev, VIRTIO_SCSI_F_HOTPLUG)) sc->vtscsi_flags |= VTSCSI_FLAG_HOTPLUG; - virtio_read_device_config(dev, 0, &scsicfg, - sizeof(struct virtio_scsi_config)); + vtscsi_read_config(sc, &scsicfg); sc->vtscsi_max_channel = scsicfg.max_channel; sc->vtscsi_max_target = scsicfg.max_target; @@ -408,6 +409,35 @@ vtscsi_negotiate_features(struct vtscsi_ sc->vtscsi_features = features; } +#define VTSCSI_GET_CONFIG(_dev, _field, _cfg) \ + virtio_read_device_config(_dev, \ + offsetof(struct virtio_scsi_config, _field), \ + &(_cfg)->_field, sizeof((_cfg)->_field)) \ + +static void +vtscsi_read_config(struct vtscsi_softc *sc, + struct virtio_scsi_config *scsicfg) +{ + device_t dev; + + dev = sc->vtscsi_dev; + + bzero(scsicfg, sizeof(struct virtio_scsi_config)); + + VTSCSI_GET_CONFIG(dev, num_queues, scsicfg); + VTSCSI_GET_CONFIG(dev, seg_max, scsicfg); + VTSCSI_GET_CONFIG(dev, max_sectors, scsicfg); + VTSCSI_GET_CONFIG(dev, cmd_per_lun, scsicfg); + VTSCSI_GET_CONFIG(dev, event_info_size, scsicfg); + VTSCSI_GET_CONFIG(dev, sense_size, scsicfg); + VTSCSI_GET_CONFIG(dev, cdb_size, scsicfg); + VTSCSI_GET_CONFIG(dev, max_channel, scsicfg); + VTSCSI_GET_CONFIG(dev, max_target, scsicfg); + VTSCSI_GET_CONFIG(dev, max_lun, scsicfg); +} + +#undef VTSCSI_GET_CONFIG + static int vtscsi_maximum_segments(struct vtscsi_softc *sc, int seg_max) { From owner-svn-src-stable@FreeBSD.ORG Sun May 4 07:19:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D38419E8; Sun, 4 May 2014 07:19:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A69CC172F; Sun, 4 May 2014 07:19:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s447JbVC034013; Sun, 4 May 2014 07:19:37 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s447JbOK034012; Sun, 4 May 2014 07:19:37 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201405040719.s447JbOK034012@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 4 May 2014 07:19:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265311 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 May 2014 07:19:37 -0000 Author: kib Date: Sun May 4 07:19:37 2014 New Revision: 265311 URL: http://svnweb.freebsd.org/changeset/base/265311 Log: MFC r265002: Fix vm_fault_copy_entry() operation on upgrade; allow it to find the pages in the shadowed objects. Modified: stable/10/sys/vm/vm_fault.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_fault.c ============================================================================== --- stable/10/sys/vm/vm_fault.c Sun May 4 04:01:26 2014 (r265310) +++ stable/10/sys/vm/vm_fault.c Sun May 4 07:19:37 2014 (r265311) @@ -1229,7 +1229,7 @@ vm_fault_copy_entry(vm_map_t dst_map, vm vm_offset_t vaddr; vm_page_t dst_m; vm_page_t src_m; - boolean_t src_readonly, upgrade; + boolean_t upgrade; #ifdef lint src_map++; @@ -1239,7 +1239,6 @@ vm_fault_copy_entry(vm_map_t dst_map, vm src_object = src_entry->object.vm_object; src_pindex = OFF_TO_IDX(src_entry->offset); - src_readonly = (src_entry->protection & VM_PROT_WRITE) == 0; /* * Create the top-level object for the destination entry. (Doesn't @@ -1310,25 +1309,33 @@ vm_fault_copy_entry(vm_map_t dst_map, vm /* * Find the page in the source object, and copy it in. - * (Because the source is wired down, the page will be in - * memory.) + * Because the source is wired down, the page will be + * in memory. */ VM_OBJECT_RLOCK(src_object); object = src_object; pindex = src_pindex + dst_pindex; while ((src_m = vm_page_lookup(object, pindex)) == NULL && - src_readonly && (backing_object = object->backing_object) != NULL) { /* - * Allow fallback to backing objects if we are reading. + * Unless the source mapping is read-only or + * it is presently being upgraded from + * read-only, the first object in the shadow + * chain should provide all of the pages. In + * other words, this loop body should never be + * executed when the source mapping is already + * read/write. */ + KASSERT((src_entry->protection & VM_PROT_WRITE) == 0 || + upgrade, + ("vm_fault_copy_entry: main object missing page")); + VM_OBJECT_RLOCK(backing_object); pindex += OFF_TO_IDX(object->backing_object_offset); VM_OBJECT_RUNLOCK(object); object = backing_object; } - if (src_m == NULL) - panic("vm_fault_copy_wired: page missing"); + KASSERT(src_m != NULL, ("vm_fault_copy_entry: page missing")); pmap_copy_page(src_m, dst_m); VM_OBJECT_RUNLOCK(object); dst_m->valid = VM_PAGE_BITS_ALL; From owner-svn-src-stable@FreeBSD.ORG Sun May 4 07:22:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D587AB4A; Sun, 4 May 2014 07:22:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C213017C2; Sun, 4 May 2014 07:22:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s447MpCh037376; Sun, 4 May 2014 07:22:51 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s447Mp6s037375; Sun, 4 May 2014 07:22:51 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201405040722.s447Mp6s037375@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 4 May 2014 07:22:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265312 - stable/10/sys/amd64/amd64 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 May 2014 07:22:51 -0000 Author: kib Date: Sun May 4 07:22:51 2014 New Revision: 265312 URL: http://svnweb.freebsd.org/changeset/base/265312 Log: MFC r265004: Same as it was done in r263878 for invlrng_handler(), fix order of checks for special pcid values in invlpg_pcid_handler(). Modified: stable/10/sys/amd64/amd64/mp_machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/mp_machdep.c ============================================================================== --- stable/10/sys/amd64/amd64/mp_machdep.c Sun May 4 07:19:37 2014 (r265311) +++ stable/10/sys/amd64/amd64/mp_machdep.c Sun May 4 07:22:51 2014 (r265312) @@ -1567,6 +1567,7 @@ invlpg_handler(void) void invlpg_pcid_handler(void) { + uint64_t cr3; #ifdef COUNT_XINVLTLB_HITS xhits_pg[PCPU_GET(cpuid)]++; #endif /* COUNT_XINVLTLB_HITS */ @@ -1574,15 +1575,13 @@ invlpg_pcid_handler(void) (*ipi_invlpg_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ - if (invpcid_works) { - invpcid(&smp_tlb_invpcid, INVPCID_ADDR); + if (smp_tlb_invpcid.pcid == (uint64_t)-1) { + invltlb_globpcid(); } else if (smp_tlb_invpcid.pcid == 0) { invlpg(smp_tlb_invpcid.addr); - } else if (smp_tlb_invpcid.pcid == (uint64_t)-1) { - invltlb_globpcid(); + } else if (invpcid_works) { + invpcid(&smp_tlb_invpcid, INVPCID_ADDR); } else { - uint64_t cr3; - /* * PCID supported, but INVPCID is not. * Temporarily switch to the target address From owner-svn-src-stable@FreeBSD.ORG Sun May 4 07:28:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A8FFDD9; Sun, 4 May 2014 07:28:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 06E07181B; Sun, 4 May 2014 07:28:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s447SQss037994; Sun, 4 May 2014 07:28:26 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s447SQ9Y037993; Sun, 4 May 2014 07:28:26 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201405040728.s447SQ9Y037993@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 4 May 2014 07:28:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265313 - stable/10/secure/usr.sbin/sshd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 May 2014 07:28:27 -0000 Author: kib Date: Sun May 4 07:28:26 2014 New Revision: 265313 URL: http://svnweb.freebsd.org/changeset/base/265313 Log: MFC r265003: Fix order of libthr and libc in the global dso list for sshd. Modified: stable/10/secure/usr.sbin/sshd/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/secure/usr.sbin/sshd/Makefile ============================================================================== --- stable/10/secure/usr.sbin/sshd/Makefile Sun May 4 07:22:51 2014 (r265312) +++ stable/10/secure/usr.sbin/sshd/Makefile Sun May 4 07:28:26 2014 (r265313) @@ -57,6 +57,16 @@ CFLAGS+= -DNONE_CIPHER_ENABLED DPADD+= ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ} LDADD+= -lcrypt -lcrypto -lz +# Fix the order of NEEDED entries for libthr and libc. The libthr +# needs to interpose libc symbols, leaving the libthr loading as +# dependency of krb causes reversed order and broken interposing. Put +# the threading library last on the linker command line, just before +# the -lc added by a compiler driver. +.if ${MK_KERBEROS_SUPPORT} != "no" +DPADD+= ${LIBPTHREAD} +LDADD+= -lpthread +.endif + .if defined(LOCALBASE) CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE}/bin/xauth\" .endif From owner-svn-src-stable@FreeBSD.ORG Sun May 4 07:57:20 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF6BE21A; Sun, 4 May 2014 07:57:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CBC4E1A04; Sun, 4 May 2014 07:57:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s447vKPn050003; Sun, 4 May 2014 07:57:20 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s447vK3j050002; Sun, 4 May 2014 07:57:20 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201405040757.s447vK3j050002@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 4 May 2014 07:57:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265314 - stable/9/secure/usr.sbin/sshd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 May 2014 07:57:21 -0000 Author: kib Date: Sun May 4 07:57:20 2014 New Revision: 265314 URL: http://svnweb.freebsd.org/changeset/base/265314 Log: MFC r265003: Fix order of libthr and libc in the global dso list for sshd. Modified: stable/9/secure/usr.sbin/sshd/Makefile Directory Properties: stable/9/secure/usr.sbin/sshd/ (props changed) Modified: stable/9/secure/usr.sbin/sshd/Makefile ============================================================================== --- stable/9/secure/usr.sbin/sshd/Makefile Sun May 4 07:28:26 2014 (r265313) +++ stable/9/secure/usr.sbin/sshd/Makefile Sun May 4 07:57:20 2014 (r265314) @@ -50,6 +50,16 @@ CFLAGS+= -DNONE_CIPHER_ENABLED DPADD+= ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ} LDADD+= -lcrypt -lcrypto -lz +# Fix the order of NEEDED entries for libthr and libc. The libthr +# needs to interpose libc symbols, leaving the libthr loading as +# dependency of krb causes reversed order and broken interposing. Put +# the threading library last on the linker command line, just before +# the -lc added by a compiler driver. +.if ${MK_KERBEROS_SUPPORT} != "no" +DPADD+= ${LIBPTHREAD} +LDADD+= -lpthread +.endif + .if defined(LOCALBASE) CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE}/bin/xauth\" .endif From owner-svn-src-stable@FreeBSD.ORG Sun May 4 08:00:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD8A537A; Sun, 4 May 2014 08:00:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A09741A17; Sun, 4 May 2014 08:00:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s448078P050561; Sun, 4 May 2014 08:00:07 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s448072i050560; Sun, 4 May 2014 08:00:07 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201405040800.s448072i050560@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 4 May 2014 08:00:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265315 - stable/9/sys/vm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 May 2014 08:00:07 -0000 Author: kib Date: Sun May 4 08:00:07 2014 New Revision: 265315 URL: http://svnweb.freebsd.org/changeset/base/265315 Log: MFC r265002: Fix vm_fault_copy_entry() operation on upgrade; allow it to find the pages in the shadowed objects. Modified: stable/9/sys/vm/vm_fault.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/vm_fault.c ============================================================================== --- stable/9/sys/vm/vm_fault.c Sun May 4 07:57:20 2014 (r265314) +++ stable/9/sys/vm/vm_fault.c Sun May 4 08:00:07 2014 (r265315) @@ -1271,7 +1271,7 @@ vm_fault_copy_entry(vm_map_t dst_map, vm vm_offset_t vaddr; vm_page_t dst_m; vm_page_t src_m; - boolean_t src_readonly, upgrade; + boolean_t upgrade; #ifdef lint src_map++; @@ -1281,7 +1281,6 @@ vm_fault_copy_entry(vm_map_t dst_map, vm src_object = src_entry->object.vm_object; src_pindex = OFF_TO_IDX(src_entry->offset); - src_readonly = (src_entry->protection & VM_PROT_WRITE) == 0; /* * Create the top-level object for the destination entry. (Doesn't @@ -1352,25 +1351,33 @@ vm_fault_copy_entry(vm_map_t dst_map, vm /* * Find the page in the source object, and copy it in. - * (Because the source is wired down, the page will be in - * memory.) + * Because the source is wired down, the page will be + * in memory. */ VM_OBJECT_LOCK(src_object); object = src_object; pindex = src_pindex + dst_pindex; while ((src_m = vm_page_lookup(object, pindex)) == NULL && - src_readonly && (backing_object = object->backing_object) != NULL) { /* - * Allow fallback to backing objects if we are reading. + * Unless the source mapping is read-only or + * it is presently being upgraded from + * read-only, the first object in the shadow + * chain should provide all of the pages. In + * other words, this loop body should never be + * executed when the source mapping is already + * read/write. */ + KASSERT((src_entry->protection & VM_PROT_WRITE) == 0 || + upgrade, + ("vm_fault_copy_entry: main object missing page")); + VM_OBJECT_LOCK(backing_object); pindex += OFF_TO_IDX(object->backing_object_offset); VM_OBJECT_UNLOCK(object); object = backing_object; } - if (src_m == NULL) - panic("vm_fault_copy_wired: page missing"); + KASSERT(src_m != NULL, ("vm_fault_copy_entry: page missing")); pmap_copy_page(src_m, dst_m); VM_OBJECT_UNLOCK(object); dst_m->valid = VM_PAGE_BITS_ALL; From owner-svn-src-stable@FreeBSD.ORG Mon May 5 01:01:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 75284DC1; Mon, 5 May 2014 01:01:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6146214E8; Mon, 5 May 2014 01:01:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4511VoI031245; Mon, 5 May 2014 01:01:31 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4511Uip031242; Mon, 5 May 2014 01:01:30 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201405050101.s4511Uip031242@svn.freebsd.org> From: Rick Macklem Date: Mon, 5 May 2014 01:01:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265339 - in stable/9/sys/fs: nfs nfsclient X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2014 01:01:31 -0000 Author: rmacklem Date: Mon May 5 01:01:30 2014 New Revision: 265339 URL: http://svnweb.freebsd.org/changeset/base/265339 Log: MFC: r264672 Modify the Lookup RPC for NFSv4 so that it acquires directory attributes. This allows the client to cache directory names when they are looked up, reducing the Lookup RPC count by about 40% for software builds. Modified: stable/9/sys/fs/nfs/nfs_commonsubs.c stable/9/sys/fs/nfsclient/nfs_clcomsubs.c stable/9/sys/fs/nfsclient/nfs_clrpcops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- stable/9/sys/fs/nfs/nfs_commonsubs.c Sun May 4 23:25:32 2014 (r265338) +++ stable/9/sys/fs/nfs/nfs_commonsubs.c Mon May 5 01:01:30 2014 (r265339) @@ -101,8 +101,8 @@ struct nfsv4_opflag nfsv4_opflag[NFSV4OP { 0, 1, 0, 0, LK_EXCLUSIVE }, /* Lock */ { 0, 1, 0, 0, LK_EXCLUSIVE }, /* LockT */ { 0, 1, 0, 0, LK_EXCLUSIVE }, /* LockU */ - { 1, 1, 0, 0, LK_EXCLUSIVE }, /* Lookup */ - { 1, 1, 0, 0, LK_EXCLUSIVE }, /* Lookupp */ + { 1, 2, 0, 0, LK_EXCLUSIVE }, /* Lookup */ + { 1, 2, 0, 0, LK_EXCLUSIVE }, /* Lookupp */ { 0, 1, 0, 0, LK_EXCLUSIVE }, /* NVerify */ { 1, 1, 0, 1, LK_EXCLUSIVE }, /* Open */ { 1, 1, 0, 0, LK_EXCLUSIVE }, /* OpenAttr */ Modified: stable/9/sys/fs/nfsclient/nfs_clcomsubs.c ============================================================================== --- stable/9/sys/fs/nfsclient/nfs_clcomsubs.c Sun May 4 23:25:32 2014 (r265338) +++ stable/9/sys/fs/nfsclient/nfs_clcomsubs.c Mon May 5 01:01:30 2014 (r265339) @@ -167,9 +167,18 @@ nfscl_reqstart(struct nfsrv_descript *nd if (nfsv4_opflag[nfsv4_opmap[procnum].op].needscfh==2){ NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(NFSV4OP_GETATTR); - NFSWCCATTR_ATTRBIT(&attrbits); + /* + * For Lookup Ops, we want all the directory + * attributes, so we can load the name cache. + */ + if (procnum == NFSPROC_LOOKUP || + procnum == NFSPROC_LOOKUPP) + NFSGETATTR_ATTRBIT(&attrbits); + else { + NFSWCCATTR_ATTRBIT(&attrbits); + nd->nd_flag |= ND_V4WCCATTR; + } (void) nfsrv_putattrbit(nd, &attrbits); - nd->nd_flag |= ND_V4WCCATTR; } NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); } Modified: stable/9/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/9/sys/fs/nfsclient/nfs_clrpcops.c Sun May 4 23:25:32 2014 (r265338) +++ stable/9/sys/fs/nfsclient/nfs_clrpcops.c Mon May 5 01:01:30 2014 (r265339) @@ -1135,14 +1135,23 @@ nfsrpc_lookup(vnode_t dvp, char *name, i } if (nd->nd_flag & ND_NFSV3) error = nfscl_postop_attr(nd, dnap, dattrflagp, stuff); + else if ((nd->nd_flag & (ND_NFSV4 | ND_NOMOREDATA)) == + ND_NFSV4) { + /* Load the directory attributes. */ + error = nfsm_loadattr(nd, dnap); + if (error == 0) + *dattrflagp = 1; + } goto nfsmout; } if ((nd->nd_flag & (ND_NFSV4 | ND_NOMOREDATA)) == ND_NFSV4) { - NFSM_DISSECT(tl, u_int32_t *, 2 * NFSX_UNSIGNED); - if (*(tl + 1)) { - nd->nd_flag |= ND_NOMOREDATA; + /* Load the directory attributes. */ + error = nfsm_loadattr(nd, dnap); + if (error != 0) goto nfsmout; - } + *dattrflagp = 1; + /* Skip over the Lookup and GetFH operation status values. */ + NFSM_DISSECT(tl, u_int32_t *, 4 * NFSX_UNSIGNED); } error = nfsm_getfh(nd, nfhpp); if (error) @@ -2566,14 +2575,6 @@ nfsrpc_readdir(vnode_t vp, struct uio *u * Joy, oh joy. For V4 we get to hand craft '.' and '..'. */ if (uiop->uio_offset == 0) { -#if defined(__FreeBSD_version) && __FreeBSD_version >= 800000 - error = VOP_GETATTR(vp, &nfsva.na_vattr, cred); -#else - error = VOP_GETATTR(vp, &nfsva.na_vattr, cred, p); -#endif - if (error) - return (error); - dotfileid = nfsva.na_fileid; NFSCL_REQSTART(nd, NFSPROC_LOOKUPP, vp); NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED); *tl++ = txdr_unsigned(NFSV4OP_GETFH); @@ -2582,9 +2583,16 @@ nfsrpc_readdir(vnode_t vp, struct uio *u error = nfscl_request(nd, vp, p, cred, stuff); if (error) return (error); + dotfileid = 0; /* Fake out the compiler. */ + if ((nd->nd_flag & ND_NOMOREDATA) == 0) { + error = nfsm_loadattr(nd, &nfsva); + if (error != 0) + goto nfsmout; + dotfileid = nfsva.na_fileid; + } if (nd->nd_repstat == 0) { - NFSM_DISSECT(tl, u_int32_t *, 3*NFSX_UNSIGNED); - len = fxdr_unsigned(int, *(tl + 2)); + NFSM_DISSECT(tl, u_int32_t *, 5 * NFSX_UNSIGNED); + len = fxdr_unsigned(int, *(tl + 4)); if (len > 0 && len <= NFSX_V4FHMAX) error = nfsm_advance(nd, NFSM_RNDUP(len), -1); else @@ -2993,15 +3001,6 @@ nfsrpc_readdirplus(vnode_t vp, struct ui * Joy, oh joy. For V4 we get to hand craft '.' and '..'. */ if (uiop->uio_offset == 0) { -#if defined(__FreeBSD_version) && __FreeBSD_version >= 800000 - error = VOP_GETATTR(vp, &nfsva.na_vattr, cred); -#else - error = VOP_GETATTR(vp, &nfsva.na_vattr, cred, p); -#endif - if (error) - return (error); - dctime = nfsva.na_ctime; - dotfileid = nfsva.na_fileid; NFSCL_REQSTART(nd, NFSPROC_LOOKUPP, vp); NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED); *tl++ = txdr_unsigned(NFSV4OP_GETFH); @@ -3010,9 +3009,17 @@ nfsrpc_readdirplus(vnode_t vp, struct ui error = nfscl_request(nd, vp, p, cred, stuff); if (error) return (error); + dotfileid = 0; /* Fake out the compiler. */ + if ((nd->nd_flag & ND_NOMOREDATA) == 0) { + error = nfsm_loadattr(nd, &nfsva); + if (error != 0) + goto nfsmout; + dctime = nfsva.na_ctime; + dotfileid = nfsva.na_fileid; + } if (nd->nd_repstat == 0) { - NFSM_DISSECT(tl, u_int32_t *, 3*NFSX_UNSIGNED); - len = fxdr_unsigned(int, *(tl + 2)); + NFSM_DISSECT(tl, u_int32_t *, 5 * NFSX_UNSIGNED); + len = fxdr_unsigned(int, *(tl + 4)); if (len > 0 && len <= NFSX_V4FHMAX) error = nfsm_advance(nd, NFSM_RNDUP(len), -1); else From owner-svn-src-stable@FreeBSD.ORG Mon May 5 01:07:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4AAB1A4; Mon, 5 May 2014 01:07:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 37A4B15A9; Mon, 5 May 2014 01:07:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4517vPK032570; Mon, 5 May 2014 01:07:57 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4517uge032568; Mon, 5 May 2014 01:07:56 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201405050107.s4517uge032568@svn.freebsd.org> From: Rick Macklem Date: Mon, 5 May 2014 01:07:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265340 - stable/9/sys/fs/nfsclient X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2014 01:07:57 -0000 Author: rmacklem Date: Mon May 5 01:07:56 2014 New Revision: 265340 URL: http://svnweb.freebsd.org/changeset/base/265340 Log: MFC: r264681 Modify the NFSv4 client open/create RPC so that it acquires post-open/create directory attributes. This allows the RPC to name cache the newly created file and reduces the lookup RPC count by about 10% for software builds. Modified: stable/9/sys/fs/nfsclient/nfs_clcomsubs.c stable/9/sys/fs/nfsclient/nfs_clrpcops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfsclient/nfs_clcomsubs.c ============================================================================== --- stable/9/sys/fs/nfsclient/nfs_clcomsubs.c Mon May 5 01:01:30 2014 (r265339) +++ stable/9/sys/fs/nfsclient/nfs_clcomsubs.c Mon May 5 01:07:56 2014 (r265340) @@ -65,7 +65,7 @@ static struct { { NFSV4OP_READLINK, 2, "Readlink", 8, }, { NFSV4OP_READ, 1, "Read", 4, }, { NFSV4OP_WRITE, 2, "Write", 5, }, - { NFSV4OP_OPEN, 3, "Open", 4, }, + { NFSV4OP_OPEN, 5, "Open", 4, }, { NFSV4OP_CREATE, 3, "Create", 6, }, { NFSV4OP_CREATE, 1, "Create", 6, }, { NFSV4OP_CREATE, 3, "Create", 6, }, Modified: stable/9/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/9/sys/fs/nfsclient/nfs_clrpcops.c Mon May 5 01:01:30 2014 (r265339) +++ stable/9/sys/fs/nfsclient/nfs_clrpcops.c Mon May 5 01:07:56 2014 (r265340) @@ -1846,6 +1846,7 @@ nfsrpc_createv4(vnode_t dvp, char *name, nfsv4stateid_t stateid; u_int32_t rflags; + np = VTONFS(dvp); *unlockedp = 0; *nfhpp = NULL; *dpp = NULL; @@ -1879,17 +1880,22 @@ nfsrpc_createv4(vnode_t dvp, char *name, NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(NFSV4OPEN_CLAIMNULL); (void) nfsm_strtom(nd, name, namelen); + /* Get the new file's handle and attributes. */ NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED); *tl++ = txdr_unsigned(NFSV4OP_GETFH); *tl = txdr_unsigned(NFSV4OP_GETATTR); NFSGETATTR_ATTRBIT(&attrbits); (void) nfsrv_putattrbit(nd, &attrbits); + /* Get the directory's post-op attributes. */ + NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); + *tl = txdr_unsigned(NFSV4OP_PUTFH); + (void) nfsm_fhtom(nd, np->n_fhp->nfh_fh, np->n_fhp->nfh_len, 0); + NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); + *tl = txdr_unsigned(NFSV4OP_GETATTR); + (void) nfsrv_putattrbit(nd, &attrbits); error = nfscl_request(nd, dvp, p, cred, dstuff); if (error) return (error); - error = nfscl_wcc_data(nd, dvp, dnap, dattrflagp, NULL, dstuff); - if (error) - goto nfsmout; NFSCL_INCRSEQID(owp->nfsow_seqid, nd); if (nd->nd_repstat == 0) { NFSM_DISSECT(tl, u_int32_t *, NFSX_STATEID + @@ -1961,6 +1967,13 @@ nfsrpc_createv4(vnode_t dvp, char *name, error = nfscl_mtofh(nd, nfhpp, nnap, attrflagp); if (error) goto nfsmout; + /* Get rid of the PutFH and Getattr status values. */ + NFSM_DISSECT(tl, u_int32_t *, 4 * NFSX_UNSIGNED); + /* Load the directory attributes. */ + error = nfsm_loadattr(nd, dnap); + if (error) + goto nfsmout; + *dattrflagp = 1; if (dp != NULL && *attrflagp) { dp->nfsdl_change = nnap->na_filerev; dp->nfsdl_modtime = nnap->na_mtime; @@ -2004,7 +2017,6 @@ nfsrpc_createv4(vnode_t dvp, char *name, if ((rflags & NFSV4OPEN_RESULTCONFIRM) && (owp->nfsow_clp->nfsc_flags & NFSCLFLAGS_GOTDELEG) && !error && dp == NULL) { - np = VTONFS(dvp); do { ret = nfsrpc_openrpc(VFSTONFS(vnode_mount(dvp)), dvp, np->n_fhp->nfh_fh, np->n_fhp->nfh_len, From owner-svn-src-stable@FreeBSD.ORG Mon May 5 01:26:29 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 670CC524; Mon, 5 May 2014 01:26:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39F6A170D; Mon, 5 May 2014 01:26:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s451QT6f040959; Mon, 5 May 2014 01:26:29 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s451QT20040958; Mon, 5 May 2014 01:26:29 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201405050126.s451QT20040958@svn.freebsd.org> From: Mark Johnston Date: Mon, 5 May 2014 01:26:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265341 - stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2014 01:26:29 -0000 Author: markj Date: Mon May 5 01:26:28 2014 New Revision: 265341 URL: http://svnweb.freebsd.org/changeset/base/265341 Log: MFC r262661: Fix emulation of call and jmp instructions on i386 and for 32-bit processes on amd64. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Directory Properties: stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Mon May 5 01:07:56 2014 (r265340) +++ stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Mon May 5 01:26:28 2014 (r265341) @@ -1429,10 +1429,7 @@ fasttrap_pid_probe(struct reg *rp) if (tp->ftt_code == 0) { new_pc = tp->ftt_dest; } else { -#ifdef __amd64 - uintptr_t value; -#endif - uintptr_t addr = tp->ftt_dest; + uintptr_t value, addr = tp->ftt_dest; if (tp->ftt_base != FASTTRAP_NOREG) addr += fasttrap_getreg(rp, tp->ftt_base); @@ -1456,6 +1453,7 @@ fasttrap_pid_probe(struct reg *rp) #ifdef __amd64 if (p->p_model == DATAMODEL_NATIVE) { +#endif if ((value = fasttrap_fulword((void *)addr)) == -1) { fasttrap_sigsegv(p, curthread, @@ -1464,9 +1462,8 @@ fasttrap_pid_probe(struct reg *rp) break; } new_pc = value; +#ifdef __amd64 } else { -#endif -#ifdef __i386__ uint32_t value32; addr = (uintptr_t)(uint32_t)addr; if ((value32 = fasttrap_fuword32((void *)addr)) @@ -1477,13 +1474,11 @@ fasttrap_pid_probe(struct reg *rp) break; } new_pc = value32; -#endif } -#ifdef __amd64 +#endif } else { new_pc = addr; } -#endif } /* @@ -1502,11 +1497,9 @@ fasttrap_pid_probe(struct reg *rp) ret = fasttrap_sulword((void *)addr, pcps); } else { #endif -#ifdef __i386__ addr = rp->r_rsp - sizeof (uint32_t); pcps = (uint32_t)(pc + tp->ftt_size); ret = fasttrap_suword32((void *)addr, pcps); -#endif #ifdef __amd64 } #endif From owner-svn-src-stable@FreeBSD.ORG Mon May 5 01:29:20 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB68E663; Mon, 5 May 2014 01:29:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8C3A1714; Mon, 5 May 2014 01:29:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s451TKxM041303; Mon, 5 May 2014 01:29:20 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s451TK1S041302; Mon, 5 May 2014 01:29:20 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201405050129.s451TK1S041302@svn.freebsd.org> From: Glen Barber Date: Mon, 5 May 2014 01:29:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265342 - stable/10/share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2014 01:29:21 -0000 Author: gjb Date: Mon May 5 01:29:20 2014 New Revision: 265342 URL: http://svnweb.freebsd.org/changeset/base/265342 Log: MRC r265230: Clarify that MAKEOBJDIRPREFIX and MAKEOBJDIR are not honored as make(1) arguments. Sponsored by: The FreeBSD Foundation Modified: stable/10/share/man/man5/make.conf.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man5/make.conf.5 ============================================================================== --- stable/10/share/man/man5/make.conf.5 Mon May 5 01:26:28 2014 (r265341) +++ stable/10/share/man/man5/make.conf.5 Mon May 5 01:29:20 2014 (r265342) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 28, 2013 +.Dd May 2, 2014 .Dt MAKE.CONF 5 .Os .Sh NAME @@ -689,6 +689,8 @@ and .Ev MAKEOBJDIR are environment variables and should not be set in .Nm +or as command line arguments to +.Xr make 1 , but in make's environment. .Sh BUGS This manual page may occasionally be out of date with respect to From owner-svn-src-stable@FreeBSD.ORG Mon May 5 01:29:34 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5AFD17A2; Mon, 5 May 2014 01:29:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4840F1717; Mon, 5 May 2014 01:29:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s451TYBT041363; Mon, 5 May 2014 01:29:34 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s451TYFk041362; Mon, 5 May 2014 01:29:34 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201405050129.s451TYFk041362@svn.freebsd.org> From: Glen Barber Date: Mon, 5 May 2014 01:29:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265343 - stable/9/share/man/man5 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2014 01:29:34 -0000 Author: gjb Date: Mon May 5 01:29:33 2014 New Revision: 265343 URL: http://svnweb.freebsd.org/changeset/base/265343 Log: MRC r265230: Clarify that MAKEOBJDIRPREFIX and MAKEOBJDIR are not honored as make(1) arguments. Sponsored by: The FreeBSD Foundation Modified: stable/9/share/man/man5/make.conf.5 Directory Properties: stable/9/share/man/man5/ (props changed) Modified: stable/9/share/man/man5/make.conf.5 ============================================================================== --- stable/9/share/man/man5/make.conf.5 Mon May 5 01:29:20 2014 (r265342) +++ stable/9/share/man/man5/make.conf.5 Mon May 5 01:29:33 2014 (r265343) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 28, 2013 +.Dd May 2, 2014 .Dt MAKE.CONF 5 .Os .Sh NAME @@ -689,6 +689,8 @@ and .Ev MAKEOBJDIR are environment variables and should not be set in .Nm +or as command line arguments to +.Xr make 1 , but in make's environment. .Sh BUGS This manual page may occasionally be out of date with respect to From owner-svn-src-stable@FreeBSD.ORG Mon May 5 01:50:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF434BF3; Mon, 5 May 2014 01:50:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0E041893; Mon, 5 May 2014 01:50:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s451o2Fo050109; Mon, 5 May 2014 01:50:02 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s451o22w050106; Mon, 5 May 2014 01:50:02 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201405050150.s451o22w050106@svn.freebsd.org> From: Kevin Lo Date: Mon, 5 May 2014 01:50:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265345 - in stable/10: share/man/man4 sys/dev/usb sys/dev/usb/wlan X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2014 01:50:03 -0000 Author: kevlo Date: Mon May 5 01:50:01 2014 New Revision: 265345 URL: http://svnweb.freebsd.org/changeset/base/265345 Log: MFC r264317, r264864: - Add the Asus USB-N10 NANO [1] - Fix panic by adding mtx_assert() to urtwn_init_locked() and urtwn_stop_locked() [2] Tested by: Kuan-Chung Chiu [1] Anthony Jenkins [2] Modified: stable/10/share/man/man4/urtwn.4 stable/10/sys/dev/usb/usbdevs stable/10/sys/dev/usb/wlan/if_urtwn.c Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/urtwn.4 ============================================================================== --- stable/10/share/man/man4/urtwn.4 Mon May 5 01:47:05 2014 (r265344) +++ stable/10/share/man/man4/urtwn.4 Mon May 5 01:50:01 2014 (r265345) @@ -61,6 +61,7 @@ It operates in the 2GHz spectrum only. The following adapters should work: .Pp .Bl -tag -width Ds -offset indent -compact +.It ASUS USB-N10 NANO .It Belkin F7D1102 Surf Wireless Micro .It D-Link DWA-131 .It Edimax EW-7811Un Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Mon May 5 01:47:05 2014 (r265344) +++ stable/10/sys/dev/usb/usbdevs Mon May 5 01:50:01 2014 (r265345) @@ -1186,6 +1186,7 @@ product ASUS RT3070_1 0x1790 RT3070 product ASUS USBN10 0x1786 USB-N10 product ASUS RTL8192CU 0x17ab RTL8192CU product ASUS USBN66 0x17ad USB-N66 +product ASUS USBN10NANO 0x17ba USB-N10 Nano product ASUS RTL8192SU 0x1791 RTL8192SU product ASUS A730W 0x4202 ASUS MyPal A730W product ASUS P535 0x420f ASUS P535 PDA Modified: stable/10/sys/dev/usb/wlan/if_urtwn.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_urtwn.c Mon May 5 01:47:05 2014 (r265344) +++ stable/10/sys/dev/usb/wlan/if_urtwn.c Mon May 5 01:50:01 2014 (r265345) @@ -91,6 +91,7 @@ static const STRUCT_USB_HOST_ID urtwn_de URTWN_DEV(ABOCOM, RTL8188CU_2), URTWN_DEV(ABOCOM, RTL8192CU), URTWN_DEV(ASUS, RTL8192CU), + URTWN_DEV(ASUS, USBN10NANO), URTWN_DEV(AZUREWAVE, RTL8188CE_1), URTWN_DEV(AZUREWAVE, RTL8188CE_2), URTWN_DEV(AZUREWAVE, RTL8188CU), @@ -2051,6 +2052,7 @@ urtwn_load_firmware(struct urtwn_softc * uint32_t reg; int mlen, ntries, page, error; + URTWN_UNLOCK(sc); /* Read firmware image from the filesystem. */ if ((sc->chip & (URTWN_CHIP_UMC_A_CUT | URTWN_CHIP_92C)) == URTWN_CHIP_UMC_A_CUT) @@ -2059,6 +2061,7 @@ urtwn_load_firmware(struct urtwn_softc * imagename = "urtwn-rtl8192cfwT"; fw = firmware_get(imagename); + URTWN_LOCK(sc); if (fw == NULL) { device_printf(sc->sc_dev, "failed loadfirmware of file %s\n", imagename); @@ -2813,6 +2816,8 @@ urtwn_init_locked(void *arg) uint32_t reg; int error; + URTWN_ASSERT_LOCKED(sc); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) urtwn_stop_locked(ifp); @@ -2976,6 +2981,8 @@ urtwn_stop_locked(struct ifnet *ifp) { struct urtwn_softc *sc = ifp->if_softc; + URTWN_ASSERT_LOCKED(sc); + ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); callout_stop(&sc->sc_watchdog_ch); From owner-svn-src-stable@FreeBSD.ORG Mon May 5 03:15:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9201A579; Mon, 5 May 2014 03:15:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 64A2B1580; Mon, 5 May 2014 03:15:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s453Fsk6027600; Mon, 5 May 2014 03:15:54 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s453FsXJ027599; Mon, 5 May 2014 03:15:54 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201405050315.s453FsXJ027599@svn.freebsd.org> From: Mark Johnston Date: Mon, 5 May 2014 03:15:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265346 - stable/10/sys/cddl/contrib/opensolaris/uts/intel/dtrace X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2014 03:15:54 -0000 Author: markj Date: Mon May 5 03:15:53 2014 New Revision: 265346 URL: http://svnweb.freebsd.org/changeset/base/265346 Log: MFC r262661: Fix emulation of call and jmp instructions on i386 and for 32-bit processes on amd64. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Mon May 5 01:50:01 2014 (r265345) +++ stable/10/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Mon May 5 03:15:53 2014 (r265346) @@ -1429,10 +1429,7 @@ fasttrap_pid_probe(struct reg *rp) if (tp->ftt_code == 0) { new_pc = tp->ftt_dest; } else { -#ifdef __amd64 - uintptr_t value; -#endif - uintptr_t addr = tp->ftt_dest; + uintptr_t value, addr = tp->ftt_dest; if (tp->ftt_base != FASTTRAP_NOREG) addr += fasttrap_getreg(rp, tp->ftt_base); @@ -1456,6 +1453,7 @@ fasttrap_pid_probe(struct reg *rp) #ifdef __amd64 if (p->p_model == DATAMODEL_NATIVE) { +#endif if ((value = fasttrap_fulword((void *)addr)) == -1) { fasttrap_sigsegv(p, curthread, @@ -1464,9 +1462,8 @@ fasttrap_pid_probe(struct reg *rp) break; } new_pc = value; +#ifdef __amd64 } else { -#endif -#ifdef __i386__ uint32_t value32; addr = (uintptr_t)(uint32_t)addr; if ((value32 = fasttrap_fuword32((void *)addr)) @@ -1477,13 +1474,11 @@ fasttrap_pid_probe(struct reg *rp) break; } new_pc = value32; -#endif } -#ifdef __amd64 +#endif } else { new_pc = addr; } -#endif } /* @@ -1502,11 +1497,9 @@ fasttrap_pid_probe(struct reg *rp) ret = fasttrap_sulword((void *)addr, pcps); } else { #endif -#ifdef __i386__ addr = rp->r_rsp - sizeof (uint32_t); pcps = (uint32_t)(pc + tp->ftt_size); ret = fasttrap_suword32((void *)addr, pcps); -#endif #ifdef __amd64 } #endif From owner-svn-src-stable@FreeBSD.ORG Mon May 5 11:30:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 01025ECB; Mon, 5 May 2014 11:30:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1D431211; Mon, 5 May 2014 11:30:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s45BUjJJ046524; Mon, 5 May 2014 11:30:45 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s45BUjSc046523; Mon, 5 May 2014 11:30:45 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201405051130.s45BUjSc046523@svn.freebsd.org> From: Rick Macklem Date: Mon, 5 May 2014 11:30:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265357 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2014 11:30:46 -0000 Author: rmacklem Date: Mon May 5 11:30:45 2014 New Revision: 265357 URL: http://svnweb.freebsd.org/changeset/base/265357 Log: MFC: r264739 Add {} braces so that the code conforms to the indentation. Fortunately, I don't think doing the assignment of cap->tsomax unconditionally causes any problem. Modified: stable/9/sys/netinet/tcp_subr.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/tcp_subr.c ============================================================================== --- stable/9/sys/netinet/tcp_subr.c Mon May 5 10:54:36 2014 (r265356) +++ stable/9/sys/netinet/tcp_subr.c Mon May 5 11:30:45 2014 (r265357) @@ -1741,9 +1741,10 @@ tcp_maxmtu(struct in_conninfo *inc, stru /* Report additional interface capabilities. */ if (cap != NULL) { if (ifp->if_capenable & IFCAP_TSO4 && - ifp->if_hwassist & CSUM_TSO) + ifp->if_hwassist & CSUM_TSO) { cap->ifcap |= CSUM_TSO; cap->tsomax = ifp->if_hw_tsomax; + } } RTFREE(sro.ro_rt); } @@ -1779,9 +1780,10 @@ tcp_maxmtu6(struct in_conninfo *inc, str /* Report additional interface capabilities. */ if (cap != NULL) { if (ifp->if_capenable & IFCAP_TSO6 && - ifp->if_hwassist & CSUM_TSO) + ifp->if_hwassist & CSUM_TSO) { cap->ifcap |= CSUM_TSO; cap->tsomax = ifp->if_hw_tsomax; + } } RTFREE(sro6.ro_rt); } From owner-svn-src-stable@FreeBSD.ORG Mon May 5 14:50:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B426453F; Mon, 5 May 2014 14:50:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A091415A4; Mon, 5 May 2014 14:50:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s45EorZH037443; Mon, 5 May 2014 14:50:53 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s45EorXF037442; Mon, 5 May 2014 14:50:53 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201405051450.s45EorXF037442@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Mon, 5 May 2014 14:50:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265361 - stable/10/lib/libc/locale X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2014 14:50:53 -0000 Author: pfg Date: Mon May 5 14:50:53 2014 New Revision: 265361 URL: http://svnweb.freebsd.org/changeset/base/265361 Log: MFC r265095, r265167; citrus: Avoid invalid code points. The UTF-8 decoder should not accept byte sequences which decode to unicode code positions U+D800 to U+DFFF (UTF-16 surrogates).[1] Contrary to the original OpenBSD patch, we do pass U+FFFE and U+FFFF, both values are valid "non-characters" [2] and must be mapped through UTFs. [1] http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 [2] http://www.unicode.org/faq/private_use.html Reported by: Stefan Sperling [1] Thanks to: jilles [2] Obtained from: OpenBSD Modified: stable/10/lib/libc/locale/utf8.c Modified: stable/10/lib/libc/locale/utf8.c ============================================================================== --- stable/10/lib/libc/locale/utf8.c Mon May 5 14:50:44 2014 (r265360) +++ stable/10/lib/libc/locale/utf8.c Mon May 5 14:50:53 2014 (r265361) @@ -203,6 +203,13 @@ _UTF8_mbrtowc(wchar_t * __restrict pwc, errno = EILSEQ; return ((size_t)-1); } + if (wch >= 0xd800 && wch <= 0xdfff) { + /* + * Malformed input; invalid code points. + */ + errno = EILSEQ; + return ((size_t)-1); + } if (pwc != NULL) *pwc = wch; us->want = 0; From owner-svn-src-stable@FreeBSD.ORG Mon May 5 16:52:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EAAA1514; Mon, 5 May 2014 16:52:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D75ED38E; Mon, 5 May 2014 16:52:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s45Gqc12091675; Mon, 5 May 2014 16:52:38 GMT (envelope-from ghelmer@svn.freebsd.org) Received: (from ghelmer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s45Gqcdl091674; Mon, 5 May 2014 16:52:38 GMT (envelope-from ghelmer@svn.freebsd.org) Message-Id: <201405051652.s45Gqcdl091674@svn.freebsd.org> From: Guy Helmer Date: Mon, 5 May 2014 16:52:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265368 - stable/10/libexec/atrun X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2014 16:52:39 -0000 Author: ghelmer Date: Mon May 5 16:52:38 2014 New Revision: 265368 URL: http://svnweb.freebsd.org/changeset/base/265368 Log: MFC r264617: Fix releasing the lock in the parent atrun process after the queue directory has been processed. Otherwise, a long-running child process caused other atrun invocations to stall unnecessarily. Submitted by: J.R. Oldroyd jr at opal.com Modified: stable/10/libexec/atrun/atrun.c Directory Properties: stable/10/ (props changed) Modified: stable/10/libexec/atrun/atrun.c ============================================================================== --- stable/10/libexec/atrun/atrun.c Mon May 5 16:41:15 2014 (r265367) +++ stable/10/libexec/atrun/atrun.c Mon May 5 16:52:38 2014 (r265368) @@ -567,6 +567,12 @@ main(int argc, char *argv[]) if (run_batch && (gloadavg() < load_avg)) run_file(batch_name, batch_uid, batch_gid); + if (flock(dirfd(spool), LOCK_UN) == -1) + perr("cannot unlock %s", ATJOB_DIR); + + if (closedir(spool) == -1) + perr("cannot closedir %s", ATJOB_DIR); + closelog(); exit(EXIT_SUCCESS); } From owner-svn-src-stable@FreeBSD.ORG Mon May 5 19:35:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5808414A; Mon, 5 May 2014 19:35:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 452705E80; Mon, 5 May 2014 19:35:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s45JZ32j038758; Mon, 5 May 2014 19:35:03 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s45JZ3NA038757; Mon, 5 May 2014 19:35:03 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201405051935.s45JZ3NA038757@svn.freebsd.org> From: Peter Wemm Date: Mon, 5 May 2014 19:35:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265383 - stable/9/usr.sbin/mergemaster X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2014 19:35:03 -0000 Author: peter Date: Mon May 5 19:35:02 2014 New Revision: 265383 URL: http://svnweb.freebsd.org/changeset/base/265383 Log: MFC r250916: coexist with /etc/localtime being a symlink Modified: stable/9/usr.sbin/mergemaster/mergemaster.sh Modified: stable/9/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/9/usr.sbin/mergemaster/mergemaster.sh Mon May 5 18:32:24 2014 (r265382) +++ stable/9/usr.sbin/mergemaster/mergemaster.sh Mon May 5 19:35:02 2014 (r265383) @@ -1327,7 +1327,7 @@ case "${NEED_PWD_MKDB}" in ;; esac -if [ -e "${DESTDIR}/etc/localtime" -a -z "${PRE_WORLD}" ]; then # Ignore if TZ == UTC +if [ -e "${DESTDIR}/etc/localtime" -a ! -L "${DESTDIR}/etc/localtime" -a -z "${PRE_WORLD}" ]; then # Ignore if TZ == UTC echo '' [ -n "${DESTDIR}" ] && tzs_args="-C ${DESTDIR}" if [ -f "${DESTDIR}/var/db/zoneinfo" ]; then From owner-svn-src-stable@FreeBSD.ORG Mon May 5 20:35:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1FE783DD; Mon, 5 May 2014 20:35:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0116A375; Mon, 5 May 2014 20:35:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s45KZbca062790; Mon, 5 May 2014 20:35:37 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s45KZZaZ062773; Mon, 5 May 2014 20:35:35 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201405052035.s45KZZaZ062773@svn.freebsd.org> From: "Kenneth D. Merry" Date: Mon, 5 May 2014 20:35:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265388 - in stable/10: share/man/man4 sys/amd64/conf sys/conf sys/dev/mpr sys/i386/conf sys/ia64/conf sys/mips/conf sys/modules sys/modules/mpr sys/sparc64/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2014 20:35:38 -0000 Author: ken Date: Mon May 5 20:35:35 2014 New Revision: 265388 URL: http://svnweb.freebsd.org/changeset/base/265388 Log: MFC the mpr(4) driver for LSI's 12Gb SAS cards. This includes r265236, r265237, r265241 and r265261: ------------------------------------------------------------------------ r265236 | ken | 2014-05-02 14:25:09 -0600 (Fri, 02 May 2014) | 51 lines Bring in the mpr(4) driver for LSI's MPT3 12Gb SAS controllers. This is derived from the mps(4) driver, but it supports only the 12Gb IT and IR hardware including the SAS 3004, SAS 3008 and SAS 3108. Some notes about this driver: o The 12Gb hardware can do "FastPath" I/O, and that capability is included in this driver. o WarpDrive functionality has been removed, since it isn't supported in the 12Gb driver interface. o The Scatter/Gather list handling code is significantly different between the 6Gb and 12Gb hardware. The 12Gb boards support IEEE Scatter/Gather lists. Thanks to LSI for developing and testing this driver for FreeBSD. share/man/man4/mpr.4: mpr(4) man page. sys/dev/mpr/*: mpr(4) driver files. sys/modules/Makefile, sys/modules/mpr/Makefile: Add a module Makefile for the mpr(4) driver. sys/conf/files: Add the mpr(4) driver. sys/amd64/conf/GENERIC, sys/i386/conf/GENERIC, sys/mips/conf/OCTEON1, sys/sparc64/conf/GENERIC: Add the mpr(4) driver to all config files that currently have the mps(4) driver. sys/ia64/conf/GENERIC: Add the mps(4) and mpr(4) drivers to the ia64 GENERIC config file. sys/i386/conf/XEN: Exclude the mpr module from building here. Submitted by: Steve McConnell Tested by: Chris Reeves Sponsored by: LSI, Spectra Logic Relnotes: LSI 12Gb SAS driver mpr(4) added ------------------------------------------------------------------------ ------------------------------------------------------------------------ r265237 | ken | 2014-05-02 14:36:20 -0600 (Fri, 02 May 2014) | 8 lines Add the mpr(4) man page to the man4 Makefile. This should have been included in r265236. Submitted by: Steve McConnell MFC after: 3 days Sponsored by: LSI, Spectra Logic ------------------------------------------------------------------------ ------------------------------------------------------------------------ r265241 | brueffer | 2014-05-02 15:14:28 -0600 (Fri, 02 May 2014) | 2 lines Use our standard SYNOPSIS wording; perform some cleanup while here. ------------------------------------------------------------------------ ------------------------------------------------------------------------ r265261 | brueffer | 2014-05-03 05:15:28 -0600 (Sat, 03 May 2014) | 2 lines Add a missing colon. ------------------------------------------------------------------------ Submitted by: Steve McConnell Tested by: Chris Reeves Sponsored by: LSI, Spectra Logic Relnotes: LSI 12Gb SAS driver mpr(4) added Added: stable/10/share/man/man4/mpr.4 - copied, changed from r265236, head/share/man/man4/mpr.4 stable/10/sys/dev/mpr/ - copied from r265236, head/sys/dev/mpr/ stable/10/sys/modules/mpr/ - copied from r265236, head/sys/modules/mpr/ Modified: stable/10/share/man/man4/Makefile stable/10/sys/amd64/conf/GENERIC stable/10/sys/conf/files stable/10/sys/i386/conf/GENERIC stable/10/sys/i386/conf/XEN stable/10/sys/ia64/conf/GENERIC stable/10/sys/mips/conf/OCTEON1 stable/10/sys/modules/Makefile stable/10/sys/sparc64/conf/GENERIC Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Mon May 5 20:13:25 2014 (r265387) +++ stable/10/share/man/man4/Makefile Mon May 5 20:35:35 2014 (r265388) @@ -259,6 +259,7 @@ MAN= aac.4 \ mod_cc.4 \ mos.4 \ mouse.4 \ + mpr.4 \ mps.4 \ mpt.4 \ msk.4 \ Copied and modified: stable/10/share/man/man4/mpr.4 (from r265236, head/share/man/man4/mpr.4) ============================================================================== --- head/share/man/man4/mpr.4 Fri May 2 20:25:09 2014 (r265236, copy source) +++ stable/10/share/man/man4/mpr.4 Mon May 5 20:35:35 2014 (r265388) @@ -36,7 +36,7 @@ .\" $Id$ .\" $FreeBSD$ .\" -.Dd Apr 28, 2014 +.Dd May 2, 2014 .Dt MPR 4 .Os .Sh NAME @@ -51,7 +51,8 @@ kernel configuration file: .Cd "device mpr" .Ed .Pp -Or, to load the driver as a module at boot, place the following line in +Alternatively, to load the driver as a +module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent mpr_load="YES" @@ -65,7 +66,7 @@ controllers. .Sh HARDWARE The following controllers are supported by the .Nm -driver +driver: .Pp .Bl -bullet -compact .It @@ -156,7 +157,8 @@ control for all adapters by setting the hw.mpr.exclude_ids=Y .Ed .Pp -where Y is the target ID of the device. If more than one device is to be +where Y is the target ID of the device. +If more than one device is to be excluded, target ID's are separated by commas. .Pp Devices can be excluded from @@ -167,7 +169,8 @@ control for a specific adapter by settin dev.mpr.X.exclude_ids=Y .Ed .Pp -where X is the adapter number and Y is the target ID of the device. If more +where X is the adapter number and Y is the target ID of the device. +If more than one device is to be excluded, target ID's are separated by commas. .Sh DEBUGGING To enable debugging prints from the @@ -200,8 +203,8 @@ The following bits have the described ef .Xr cd 4 , .Xr ch 4 , .Xr da 4 , -.Xr mpt 4 , .Xr mps 4 , +.Xr mpt 4 , .Xr pci 4 , .Xr sa 4 , .Xr scsi 4 , Modified: stable/10/sys/amd64/conf/GENERIC ============================================================================== --- stable/10/sys/amd64/conf/GENERIC Mon May 5 20:13:25 2014 (r265387) +++ stable/10/sys/amd64/conf/GENERIC Mon May 5 20:35:35 2014 (r265388) @@ -111,6 +111,7 @@ device isp # Qlogic family #device ispfw # Firmware for QLogic HBAs- normally a module device mpt # LSI-Logic MPT-Fusion device mps # LSI-Logic MPT-Fusion 2 +device mpr # LSI-Logic MPT-Fusion 3 #device ncr # NCR/Symbios Logic device sym # NCR/Symbios Logic (newer chipsets + those of `ncr') device trm # Tekram DC395U/UW/F DC315U adapters Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Mon May 5 20:13:25 2014 (r265387) +++ stable/10/sys/conf/files Mon May 5 20:35:35 2014 (r265388) @@ -1841,6 +1841,17 @@ dev/mmc/mmcbr_if.m standard dev/mmc/mmcbus_if.m standard dev/mmc/mmcsd.c optional mmcsd dev/mn/if_mn.c optional mn pci +dev/mpr/mpr.c optional mpr +dev/mpr/mpr_config.c optional mpr +# XXX Work around clang warning, until maintainer approves fix. +dev/mpr/mpr_mapping.c optional mpr \ + compile-with "${NORMAL_C} ${NO_WSOMETIMES_UNINITIALIZED}" +dev/mpr/mpr_pci.c optional mpr pci +dev/mpr/mpr_sas.c optional mpr \ + compile-with "${NORMAL_C} ${NO_WUNNEEDED_INTERNAL_DECL}" +dev/mpr/mpr_sas_lsi.c optional mpr +dev/mpr/mpr_table.c optional mpr +dev/mpr/mpr_user.c optional mpr dev/mps/mps.c optional mps dev/mps/mps_config.c optional mps # XXX Work around clang warning, until maintainer approves fix. Modified: stable/10/sys/i386/conf/GENERIC ============================================================================== --- stable/10/sys/i386/conf/GENERIC Mon May 5 20:13:25 2014 (r265387) +++ stable/10/sys/i386/conf/GENERIC Mon May 5 20:35:35 2014 (r265388) @@ -113,6 +113,7 @@ device isp # Qlogic family #device ispfw # Firmware for QLogic HBAs- normally a module device mpt # LSI-Logic MPT-Fusion device mps # LSI-Logic MPT-Fusion 2 +device mpr # LSI-Logic MPT-Fusion 3 #device ncr # NCR/Symbios Logic device sym # NCR/Symbios Logic (newer chipsets + those of `ncr') device trm # Tekram DC395U/UW/F DC315U adapters Modified: stable/10/sys/i386/conf/XEN ============================================================================== --- stable/10/sys/i386/conf/XEN Mon May 5 20:13:25 2014 (r265387) +++ stable/10/sys/i386/conf/XEN Mon May 5 20:35:35 2014 (r265388) @@ -7,7 +7,7 @@ cpu I686_CPU ident XEN makeoptions DEBUG=-gdwarf-2 # Build kernel with gdb(1) debug symbols -makeoptions WITHOUT_MODULES="aha ahb amd ctl cxgb dpt drm drm2 hptnr hptmv ida malo mps mwl nve rdma sound sym trm xfs" +makeoptions WITHOUT_MODULES="aha ahb amd ctl cxgb dpt drm drm2 hptnr hptmv ida malo mpr mps mwl nve rdma sound sym trm xfs" options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption Modified: stable/10/sys/ia64/conf/GENERIC ============================================================================== --- stable/10/sys/ia64/conf/GENERIC Mon May 5 20:13:25 2014 (r265387) +++ stable/10/sys/ia64/conf/GENERIC Mon May 5 20:35:35 2014 (r265388) @@ -86,6 +86,8 @@ device ahd # AHA39320/29320 and AIC79x device hptiop # Highpoint RocketRaid 3xxx series device isp # Qlogic family device mpt # LSI-Logic MPT-Fusion +device mps # LSI-Logic MPT-Fusion 2 +device mpr # LSI-Logic MPT-Fusion 3 device sym # NCR/Symbios Logic # RAID controllers interfaced to the SCSI subsystem Modified: stable/10/sys/mips/conf/OCTEON1 ============================================================================== --- stable/10/sys/mips/conf/OCTEON1 Mon May 5 20:13:25 2014 (r265387) +++ stable/10/sys/mips/conf/OCTEON1 Mon May 5 20:35:35 2014 (r265388) @@ -129,6 +129,7 @@ device isp # Qlogic family #device ispfw # Firmware for QLogic HBAs- normally a module device mpt # LSI-Logic MPT-Fusion device mps # LSI-Logic MPT-Fusion 2 +device mpr # LSI-Logic MPT-Fusion 3 #device ncr # NCR/Symbios Logic device trm # Tekram DC395U/UW/F DC315U adapters Modified: stable/10/sys/modules/Makefile ============================================================================== --- stable/10/sys/modules/Makefile Mon May 5 20:13:25 2014 (r265387) +++ stable/10/sys/modules/Makefile Mon May 5 20:35:35 2014 (r265388) @@ -216,6 +216,7 @@ SUBDIR= \ ${_mly} \ mmc \ mmcsd \ + mpr \ mps \ mpt \ mqueue \ Modified: stable/10/sys/sparc64/conf/GENERIC ============================================================================== --- stable/10/sys/sparc64/conf/GENERIC Mon May 5 20:13:25 2014 (r265387) +++ stable/10/sys/sparc64/conf/GENERIC Mon May 5 20:35:35 2014 (r265388) @@ -101,6 +101,7 @@ device isp # Qlogic family device ispfw # Firmware module for Qlogic host adapters device mpt # LSI-Logic MPT-Fusion device mps # LSI-Logic MPT-Fusion 2 +device mpr # LSI-Logic MPT-Fusion 3 device sym # NCR/Symbios/LSI Logic 53C8XX/53C1010/53C1510D # ATA/SCSI peripherals From owner-svn-src-stable@FreeBSD.ORG Mon May 5 20:48:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2542183A; Mon, 5 May 2014 20:48:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07CE8628; Mon, 5 May 2014 20:48:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s45KmaN9066763; Mon, 5 May 2014 20:48:36 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s45KmaYY066760; Mon, 5 May 2014 20:48:36 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201405052048.s45KmaYY066760@svn.freebsd.org> From: Rick Macklem Date: Mon, 5 May 2014 20:48:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265389 - stable/9/sys/fs/nfsclient X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2014 20:48:37 -0000 Author: rmacklem Date: Mon May 5 20:48:36 2014 New Revision: 265389 URL: http://svnweb.freebsd.org/changeset/base/265389 Log: MFC: r264705, r264749 Modify the NFSv4 client create/mkdir RPC so that it acquires post-create/mkdir directory attributes. This allows the RPC to name cache the newly created directory and reduces the lookup RPC count for applications creating a lot of directories. Modified: stable/9/sys/fs/nfsclient/nfs_clcomsubs.c stable/9/sys/fs/nfsclient/nfs_clrpcops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfsclient/nfs_clcomsubs.c ============================================================================== --- stable/9/sys/fs/nfsclient/nfs_clcomsubs.c Mon May 5 20:35:35 2014 (r265388) +++ stable/9/sys/fs/nfsclient/nfs_clcomsubs.c Mon May 5 20:48:36 2014 (r265389) @@ -66,7 +66,7 @@ static struct { { NFSV4OP_READ, 1, "Read", 4, }, { NFSV4OP_WRITE, 2, "Write", 5, }, { NFSV4OP_OPEN, 5, "Open", 4, }, - { NFSV4OP_CREATE, 3, "Create", 6, }, + { NFSV4OP_CREATE, 5, "Create", 6, }, { NFSV4OP_CREATE, 1, "Create", 6, }, { NFSV4OP_CREATE, 3, "Create", 6, }, { NFSV4OP_REMOVE, 1, "Remove", 6, }, Modified: stable/9/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/9/sys/fs/nfsclient/nfs_clrpcops.c Mon May 5 20:35:35 2014 (r265388) +++ stable/9/sys/fs/nfsclient/nfs_clrpcops.c Mon May 5 20:48:36 2014 (r265389) @@ -2409,10 +2409,12 @@ nfsrpc_mkdir(vnode_t dvp, char *name, in struct nfsrv_descript nfsd, *nd = &nfsd; nfsattrbit_t attrbits; int error = 0; + struct nfsfh *fhp; *nfhpp = NULL; *attrflagp = 0; *dattrflagp = 0; + fhp = VTONFS(dvp)->n_fhp; if (namelen > NFS_MAXNAMLEN) return (ENAMETOOLONG); NFSCL_REQSTART(nd, NFSPROC_MKDIR, dvp); @@ -2428,6 +2430,12 @@ nfsrpc_mkdir(vnode_t dvp, char *name, in *tl++ = txdr_unsigned(NFSV4OP_GETFH); *tl = txdr_unsigned(NFSV4OP_GETATTR); (void) nfsrv_putattrbit(nd, &attrbits); + NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); + *tl = txdr_unsigned(NFSV4OP_PUTFH); + (void) nfsm_fhtom(nd, fhp->nfh_fh, fhp->nfh_len, 0); + NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); + *tl = txdr_unsigned(NFSV4OP_GETATTR); + (void) nfsrv_putattrbit(nd, &attrbits); } error = nfscl_request(nd, dvp, p, cred, dstuff); if (error) @@ -2441,6 +2449,14 @@ nfsrpc_mkdir(vnode_t dvp, char *name, in } if (!error) error = nfscl_mtofh(nd, nfhpp, nnap, attrflagp); + if (error == 0 && (nd->nd_flag & ND_NFSV4) != 0) { + /* Get rid of the PutFH and Getattr status values. */ + NFSM_DISSECT(tl, u_int32_t *, 4 * NFSX_UNSIGNED); + /* Load the directory attributes. */ + error = nfsm_loadattr(nd, dnap); + if (error == 0) + *dattrflagp = 1; + } } if ((nd->nd_flag & ND_NFSV3) && !error) error = nfscl_wcc_data(nd, dvp, dnap, dattrflagp, NULL, dstuff); From owner-svn-src-stable@FreeBSD.ORG Mon May 5 20:55:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4523CBC4; Mon, 5 May 2014 20:55:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 327A06BB; Mon, 5 May 2014 20:55:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s45Ktcr3069427; Mon, 5 May 2014 20:55:38 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s45Ktcgw069426; Mon, 5 May 2014 20:55:38 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201405052055.s45Ktcgw069426@svn.freebsd.org> From: Rick Macklem Date: Mon, 5 May 2014 20:55:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265390 - stable/9/sys/fs/nfsclient X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2014 20:55:38 -0000 Author: rmacklem Date: Mon May 5 20:55:37 2014 New Revision: 265390 URL: http://svnweb.freebsd.org/changeset/base/265390 Log: MFC: r264738 For an NFSv4 mount with the "nocto" option, don't get the up to date file attributes upon close. This reduces the Getattr RPC count by about 65% for software builds. Modified: stable/9/sys/fs/nfsclient/nfs_clvnops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- stable/9/sys/fs/nfsclient/nfs_clvnops.c Mon May 5 20:48:36 2014 (r265389) +++ stable/9/sys/fs/nfsclient/nfs_clvnops.c Mon May 5 20:55:37 2014 (r265390) @@ -762,7 +762,9 @@ nfs_close(struct vop_close_args *ap) /* * Get attributes so "change" is up to date. */ - if (error == 0 && nfscl_mustflush(vp) != 0) { + if (error == 0 && nfscl_mustflush(vp) != 0 && + vp->v_type == VREG && + (VFSTONFS(vp->v_mount)->nm_flag & NFSMNT_NOCTO) == 0) { ret = nfsrpc_getattr(vp, cred, ap->a_td, &nfsva, NULL); if (!ret) { From owner-svn-src-stable@FreeBSD.ORG Mon May 5 21:34:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 166B6F3A; Mon, 5 May 2014 21:34:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0108A935; Mon, 5 May 2014 21:34:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s45LYA9v082177; Mon, 5 May 2014 21:34:10 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s45LYAVR082176; Mon, 5 May 2014 21:34:10 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201405052134.s45LYAVR082176@svn.freebsd.org> From: Christian Brueffer Date: Mon, 5 May 2014 21:34:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265394 - stable/10/release/doc/en_US.ISO8859-1/hardware X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2014 21:34:11 -0000 Author: brueffer Date: Mon May 5 21:34:10 2014 New Revision: 265394 URL: http://svnweb.freebsd.org/changeset/base/265394 Log: MFC: r265242 Generate hardware notes for mpr(4) and bump copyright for 2014. Modified: stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Directory Properties: stable/10/ (props changed) Modified: stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Mon May 5 21:33:20 2014 (r265393) +++ stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Mon May 5 21:34:10 2014 (r265394) @@ -29,6 +29,7 @@ 2011 2012 2013 + 2014 The &os; Documentation Project @@ -732,6 +733,8 @@ &hwlist.mly; + &hwlist.mpr; + &hwlist.mps; &hwlist.mpt; From owner-svn-src-stable@FreeBSD.ORG Tue May 6 02:22:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 07904BD7; Tue, 6 May 2014 02:22:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7FE2B8; Tue, 6 May 2014 02:22:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s462MrR2011566; Tue, 6 May 2014 02:22:53 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s462Mr4q011562; Tue, 6 May 2014 02:22:53 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201405060222.s462Mr4q011562@svn.freebsd.org> From: Navdeep Parhar Date: Tue, 6 May 2014 02:22:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265410 - in stable/10/sys/dev/cxgbe: . common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2014 02:22:54 -0000 Author: np Date: Tue May 6 02:22:52 2014 New Revision: 265410 URL: http://svnweb.freebsd.org/changeset/base/265410 Log: MFC r261533, r261536, r261537, and r263457. r261533: cxgbe(4): Use the port's tx channel to identify it to t4_clr_port_stats. r261536: cxgbe(4): The T5 allows for a different freelist starvation threshold for queues with buffer packing. Use the correct value to calculate a freelist's low water mark. r261537: cxgbe(4): Use the rx channel map (instead of the tx channel map) as the congestion channel map. r263457: cxgbe(4): Recognize the "spider" configuration where a T5 card's 40G QSFP port is presented as 4 distinct 10G SFP+ ports to the driver. Modified: stable/10/sys/dev/cxgbe/adapter.h stable/10/sys/dev/cxgbe/common/t4_hw.c stable/10/sys/dev/cxgbe/t4_main.c stable/10/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/10/sys/dev/cxgbe/adapter.h Tue May 6 01:15:42 2014 (r265409) +++ stable/10/sys/dev/cxgbe/adapter.h Tue May 6 02:22:52 2014 (r265410) @@ -204,6 +204,7 @@ struct port_info { uint8_t mod_type; uint8_t port_id; uint8_t tx_chan; + uint8_t rx_chan_map; /* rx MPS channel bitmap */ /* These need to be int as they are used in sysctl */ int ntxq; /* # of tx queues */ @@ -512,6 +513,7 @@ struct sge { int timer_val[SGE_NTIMERS]; int counter_val[SGE_NCOUNTERS]; int fl_starve_threshold; + int fl_starve_threshold2; int eq_s_qpp; int iq_s_qpp; Modified: stable/10/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/10/sys/dev/cxgbe/common/t4_hw.c Tue May 6 01:15:42 2014 (r265409) +++ stable/10/sys/dev/cxgbe/common/t4_hw.c Tue May 6 02:22:52 2014 (r265410) @@ -5647,6 +5647,7 @@ int __devinit t4_port_init(struct port_i p->viid = ret; p->tx_chan = j; + p->rx_chan_map = get_mps_bg_map(adap, j); p->lport = j; p->rss_size = rss_size; t4_os_set_hw_addr(adap, p->port_id, addr); Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Tue May 6 01:15:42 2014 (r265409) +++ stable/10/sys/dev/cxgbe/t4_main.c Tue May 6 02:22:52 2014 (r265410) @@ -2622,6 +2622,7 @@ build_medialist(struct port_info *pi) ifmedia_set(media, m | IFM_10G_CX4); break; + case FW_PORT_TYPE_QSFP_10G: case FW_PORT_TYPE_SFP: case FW_PORT_TYPE_FIBER_XFI: case FW_PORT_TYPE_FIBER_XAUI: @@ -7754,11 +7755,11 @@ t4_ioctl(struct cdev *dev, unsigned long if (port_id >= sc->params.nports) return (EINVAL); + pi = sc->port[port_id]; /* MAC stats */ - t4_clr_port_stats(sc, port_id); + t4_clr_port_stats(sc, pi->tx_chan); - pi = sc->port[port_id]; if (pi->flags & PORT_INIT_DONE) { struct sge_rxq *rxq; struct sge_txq *txq; Modified: stable/10/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_sge.c Tue May 6 01:15:42 2014 (r265409) +++ stable/10/sys/dev/cxgbe/t4_sge.c Tue May 6 02:22:52 2014 (r265410) @@ -568,6 +568,10 @@ t4_read_chip_settings(struct adapter *sc r = t4_read_reg(sc, A_SGE_CONM_CTRL); s->fl_starve_threshold = G_EGRTHRESHOLD(r) * 2 + 1; + if (is_t4(sc)) + s->fl_starve_threshold2 = s->fl_starve_threshold; + else + s->fl_starve_threshold2 = G_EGRTHRESHOLDPACKING(r) * 2 + 1; /* egress queues: log2 of # of doorbells per BAR2 page */ r = t4_read_reg(sc, A_SGE_EGRESS_QUEUES_PER_PAGE_PF); @@ -2232,7 +2236,9 @@ alloc_iq_fl(struct port_info *pi, struct return (rc); } fl->needed = fl->cap; - fl->lowat = roundup2(sc->sge.fl_starve_threshold, 8); + fl->lowat = fl->flags & FL_BUF_PACKING ? + roundup2(sc->sge.fl_starve_threshold2, 8) : + roundup2(sc->sge.fl_starve_threshold, 8); c.iqns_to_fl0congen |= htobe32(V_FW_IQ_CMD_FL0HOSTFCMODE(X_HOSTFCMODE_NONE) | @@ -2467,7 +2473,7 @@ tnl_cong(struct port_info *pi) else if (cong_drop == 1) return (0); else - return (1 << pi->tx_chan); + return (pi->rx_chan_map); } static int @@ -2574,7 +2580,7 @@ alloc_ofld_rxq(struct port_info *pi, str char name[16]; rc = alloc_iq_fl(pi, &ofld_rxq->iq, &ofld_rxq->fl, intr_idx, - 1 << pi->tx_chan); + pi->rx_chan_map); if (rc != 0) return (rc); From owner-svn-src-stable@FreeBSD.ORG Tue May 6 02:44:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6702B173; Tue, 6 May 2014 02:44:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39BDA27F; Tue, 6 May 2014 02:44:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s462i2EM020599; Tue, 6 May 2014 02:44:02 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s462i2fg020598; Tue, 6 May 2014 02:44:02 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201405060244.s462i2fg020598@svn.freebsd.org> From: Rick Macklem Date: Tue, 6 May 2014 02:44:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265412 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2014 02:44:02 -0000 Author: rmacklem Date: Tue May 6 02:44:01 2014 New Revision: 265412 URL: http://svnweb.freebsd.org/changeset/base/265412 Log: MFC: r264469, r264498 Lagg did not set the value of if_hw_tsomax, so when lagg was stacked on top of network interfaces that set if_hw_tsomax, tcp_output() would see the default value instead of the value set by the network interface(s). This patch modifies lagg so that it sets if_hw_tsomax to the minimum of the value(s) for the underlying network interfaces. Modified: stable/10/sys/net/if_lagg.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/if_lagg.c ============================================================================== --- stable/10/sys/net/if_lagg.c Tue May 6 02:32:27 2014 (r265411) +++ stable/10/sys/net/if_lagg.c Tue May 6 02:44:01 2014 (r265412) @@ -54,11 +54,11 @@ __FBSDID("$FreeBSD$"); #if defined(INET) || defined(INET6) #include +#include #endif #ifdef INET #include #include -#include #endif #ifdef INET6 @@ -448,6 +448,11 @@ lagg_capabilities(struct lagg_softc *sc) struct lagg_port *lp; int cap = ~0, ena = ~0; u_long hwa = ~0UL; +#if defined(INET) || defined(INET6) + u_int hw_tsomax = IP_MAXPACKET; /* Initialize to the maximum value. */ +#else + u_int hw_tsomax = ~0; /* if_hw_tsomax is only for INET/INET6, but.. */ +#endif LAGG_WLOCK_ASSERT(sc); @@ -456,6 +461,10 @@ lagg_capabilities(struct lagg_softc *sc) cap &= lp->lp_ifp->if_capabilities; ena &= lp->lp_ifp->if_capenable; hwa &= lp->lp_ifp->if_hwassist; + /* Set to the minimum value of the lagg ports. */ + if (lp->lp_ifp->if_hw_tsomax < hw_tsomax && + lp->lp_ifp->if_hw_tsomax > 0) + hw_tsomax = lp->lp_ifp->if_hw_tsomax; } cap = (cap == ~0 ? 0 : cap); ena = (ena == ~0 ? 0 : ena); @@ -463,10 +472,12 @@ lagg_capabilities(struct lagg_softc *sc) if (sc->sc_ifp->if_capabilities != cap || sc->sc_ifp->if_capenable != ena || - sc->sc_ifp->if_hwassist != hwa) { + sc->sc_ifp->if_hwassist != hwa || + sc->sc_ifp->if_hw_tsomax != hw_tsomax) { sc->sc_ifp->if_capabilities = cap; sc->sc_ifp->if_capenable = ena; sc->sc_ifp->if_hwassist = hwa; + sc->sc_ifp->if_hw_tsomax = hw_tsomax; getmicrotime(&sc->sc_ifp->if_lastchange); if (sc->sc_ifflags & IFF_DEBUG) From owner-svn-src-stable@FreeBSD.ORG Tue May 6 02:49:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D55FB2FC; Tue, 6 May 2014 02:49:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1EC32B2; Tue, 6 May 2014 02:49:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s462nVdQ021419; Tue, 6 May 2014 02:49:31 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s462nVXu021418; Tue, 6 May 2014 02:49:31 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201405060249.s462nVXu021418@svn.freebsd.org> From: Rick Macklem Date: Tue, 6 May 2014 02:49:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265413 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2014 02:49:31 -0000 Author: rmacklem Date: Tue May 6 02:49:31 2014 New Revision: 265413 URL: http://svnweb.freebsd.org/changeset/base/265413 Log: MFC: r264517 Vlan did not set the value of if_hw_tsomax, so when vlan was stacked on top of a network interface that set if_hw_tsomax, tcp_output() would see the default value instead of the value set by the network interface. This patch modifies vlan so that it sets if_hw_tsomax to the value of the parent interface. Modified: stable/10/sys/net/if_vlan.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/if_vlan.c ============================================================================== --- stable/10/sys/net/if_vlan.c Tue May 6 02:44:01 2014 (r265412) +++ stable/10/sys/net/if_vlan.c Tue May 6 02:49:31 2014 (r265413) @@ -1509,6 +1509,8 @@ vlan_capabilities(struct ifvlan *ifv) * propagate the hardware-assisted flag. TSO on VLANs * does not necessarily require hardware VLAN tagging. */ + if (p->if_hw_tsomax > 0) + ifp->if_hw_tsomax = p->if_hw_tsomax; if (p->if_capabilities & IFCAP_VLAN_HWTSO) ifp->if_capabilities |= p->if_capabilities & IFCAP_TSO; if (p->if_capenable & IFCAP_VLAN_HWTSO) { From owner-svn-src-stable@FreeBSD.ORG Tue May 6 02:55:00 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EFF594C7; Tue, 6 May 2014 02:54:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2447368; Tue, 6 May 2014 02:54:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s462sxgg025148; Tue, 6 May 2014 02:54:59 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s462sxND025147; Tue, 6 May 2014 02:54:59 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201405060254.s462sxND025147@svn.freebsd.org> From: Rick Macklem Date: Tue, 6 May 2014 02:54:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265414 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2014 02:55:00 -0000 Author: rmacklem Date: Tue May 6 02:54:59 2014 New Revision: 265414 URL: http://svnweb.freebsd.org/changeset/base/265414 Log: MFC: r264630 For NFS mounts using rsize,wsize=65536 over TSO enabled network interfaces limited to 32 transmit segments, there are two known issues. The more serious one is that for an I/O of slightly less than 64K, the net device driver prepends an ethernet header, resulting in a TSO segment slightly larger than 64K. Since m_defrag() copies this into 33 mbuf clusters, the transmit fails with EFBIG. A tester indicated observing a similar failure using iSCSI. The second less critical problem is that the network device driver must copy the mbuf chain via m_defrag() (m_collapse() is not sufficient), resulting in measurable overhead. This patch reduces the default size of if_hw_tsomax slightly, so that the first issue is avoided. Fixing the second issue will require a way for the network device driver to inform tcp_output() that it is limited to 32 transmit segments. Modified: stable/10/sys/net/if.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/if.c ============================================================================== --- stable/10/sys/net/if.c Tue May 6 02:49:31 2014 (r265413) +++ stable/10/sys/net/if.c Tue May 6 02:54:59 2014 (r265414) @@ -74,6 +74,7 @@ #include #if defined(INET) || defined(INET6) +#include #include #include #include @@ -658,7 +659,8 @@ if_attach_internal(struct ifnet *ifp, in #if defined(INET) || defined(INET6) /* Initialize to max value. */ if (ifp->if_hw_tsomax == 0) - ifp->if_hw_tsomax = IP_MAXPACKET; + ifp->if_hw_tsomax = min(IP_MAXPACKET, 32 * MCLBYTES - + (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN)); KASSERT(ifp->if_hw_tsomax <= IP_MAXPACKET && ifp->if_hw_tsomax >= IP_MAXPACKET / 8, ("%s: tsomax outside of range", __func__)); From owner-svn-src-stable@FreeBSD.ORG Tue May 6 03:02:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9DA2B7A7; Tue, 6 May 2014 03:02:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A5C36A1; Tue, 6 May 2014 03:02:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4632223029961; Tue, 6 May 2014 03:02:02 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s46322el029960; Tue, 6 May 2014 03:02:02 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201405060302.s46322el029960@svn.freebsd.org> From: Navdeep Parhar Date: Tue, 6 May 2014 03:02:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265415 - stable/10/tools/tools/cxgbetool X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2014 03:02:02 -0000 Author: np Date: Tue May 6 03:02:02 2014 New Revision: 265415 URL: http://svnweb.freebsd.org/changeset/base/265415 Log: MFC r261534: cxgbetool: Display the congestion channel map in hex. Modified: stable/10/tools/tools/cxgbetool/cxgbetool.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/tools/cxgbetool/cxgbetool.c ============================================================================== --- stable/10/tools/tools/cxgbetool/cxgbetool.c Tue May 6 02:54:59 2014 (r265414) +++ stable/10/tools/tools/cxgbetool/cxgbetool.c Tue May 6 03:02:02 2014 (r265415) @@ -1368,7 +1368,7 @@ show_sge_context(const struct t4_sge_con FIELD1("CngDBPHdr:", 6), FIELD1("CngDBPData:", 5), FIELD1("CngIMSG:", 4), - FIELD("CngChMap:", 0, 3), + { "CngChMap:", 0, 3, 0, 1, 0}, { NULL } }; static struct field_desc t5_conm[] = { @@ -1377,7 +1377,7 @@ show_sge_context(const struct t4_sge_con FIELD1("CngDBPHdr:", 18), FIELD1("CngDBPData:", 17), FIELD1("CngIMSG:", 16), - FIELD("CngChMap:", 0, 15), + { "CngChMap:", 0, 15, 0, 1, 0}, { NULL } }; From owner-svn-src-stable@FreeBSD.ORG Tue May 6 03:05:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B5AA935; Tue, 6 May 2014 03:05:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 180706D6; Tue, 6 May 2014 03:05:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4635Ep7030604; Tue, 6 May 2014 03:05:14 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4635EH4030603; Tue, 6 May 2014 03:05:14 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201405060305.s4635EH4030603@svn.freebsd.org> From: Navdeep Parhar Date: Tue, 6 May 2014 03:05:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265416 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2014 03:05:15 -0000 Author: np Date: Tue May 6 03:05:14 2014 New Revision: 265416 URL: http://svnweb.freebsd.org/changeset/base/265416 Log: MFC r261804: Provide additional information in some panic strings. Modified: stable/10/sys/sys/mbuf.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/mbuf.h ============================================================================== --- stable/10/sys/sys/mbuf.h Tue May 6 03:02:02 2014 (r265415) +++ stable/10/sys/sys/mbuf.h Tue May 6 03:05:14 2014 (r265416) @@ -539,7 +539,7 @@ m_gettype(int size) type = EXT_JUMBO16; break; default: - panic("%s: invalid cluster size", __func__); + panic("%s: invalid cluster size %d", __func__, size); } return (type); @@ -588,7 +588,7 @@ m_getzone(int size) zone = zone_jumbo16; break; default: - panic("%s: invalid cluster size", __func__); + panic("%s: invalid cluster size %d", __func__, size); } return (zone); @@ -733,7 +733,7 @@ m_cljset(struct mbuf *m, void *cl, int t zone = zone_jumbo16; break; default: - panic("%s: unknown cluster type", __func__); + panic("%s: unknown cluster type %d", __func__, type); break; } From owner-svn-src-stable@FreeBSD.ORG Tue May 6 03:38:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 75D89F29; Tue, 6 May 2014 03:38:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 626259C8; Tue, 6 May 2014 03:38:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s463c5eP043872; Tue, 6 May 2014 03:38:05 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s463c5bT043871; Tue, 6 May 2014 03:38:05 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201405060338.s463c5bT043871@svn.freebsd.org> From: Bryan Venteicher Date: Tue, 6 May 2014 03:38:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265417 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2014 03:38:05 -0000 Author: bryanv Date: Tue May 6 03:38:04 2014 New Revision: 265417 URL: http://svnweb.freebsd.org/changeset/base/265417 Log: MFC r265287: Fix SYNOPSIS ("device if_vtnet" -> "device vtnet"). Modified: stable/10/share/man/man4/vtnet.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/vtnet.4 ============================================================================== --- stable/10/share/man/man4/vtnet.4 Tue May 6 03:05:14 2014 (r265416) +++ stable/10/share/man/man4/vtnet.4 Tue May 6 03:38:04 2014 (r265417) @@ -35,7 +35,7 @@ To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent -.Cd "device if_vtnet" +.Cd "device vtnet" .Ed .Pp Alternatively, to load the driver as a From owner-svn-src-stable@FreeBSD.ORG Tue May 6 04:22:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C837C23; Tue, 6 May 2014 04:22:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FA8ED4F; Tue, 6 May 2014 04:22:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s464M6f6065889; Tue, 6 May 2014 04:22:06 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s464M6CG065883; Tue, 6 May 2014 04:22:06 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201405060422.s464M6CG065883@svn.freebsd.org> From: Navdeep Parhar Date: Tue, 6 May 2014 04:22:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265421 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2014 04:22:07 -0000 Author: np Date: Tue May 6 04:22:06 2014 New Revision: 265421 URL: http://svnweb.freebsd.org/changeset/base/265421 Log: MFC r260210 (by adrian@): Add an option to enable or disable the small RX packet copying that is done to improve performance of small frames. When doing RX packing, the RX copying isn't necessarily required. Modified: stable/10/sys/dev/cxgbe/adapter.h stable/10/sys/dev/cxgbe/t4_main.c stable/10/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/10/sys/dev/cxgbe/adapter.h Tue May 6 04:22:01 2014 (r265420) +++ stable/10/sys/dev/cxgbe/adapter.h Tue May 6 04:22:06 2014 (r265421) @@ -643,6 +643,8 @@ struct adapter { const char *last_op; const void *last_op_thr; #endif + + int sc_do_rxcopy; }; #define ADAPTER_LOCK(sc) mtx_lock(&(sc)->sc_lock) Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Tue May 6 04:22:01 2014 (r265420) +++ stable/10/sys/dev/cxgbe/t4_main.c Tue May 6 04:22:06 2014 (r265421) @@ -4207,6 +4207,10 @@ t4_sysctls(struct adapter *sc) oid = device_get_sysctl_tree(sc->dev); c0 = children = SYSCTL_CHILDREN(oid); + sc->sc_do_rxcopy = 1; + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "do_rx_copy", CTLFLAG_RW, + &sc->sc_do_rxcopy, 1, "Do RX copy of small frames"); + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "nports", CTLFLAG_RD, NULL, sc->params.nports, "# of ports"); Modified: stable/10/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_sge.c Tue May 6 04:22:01 2014 (r265420) +++ stable/10/sys/dev/cxgbe/t4_sge.c Tue May 6 04:22:06 2014 (r265421) @@ -1450,7 +1450,7 @@ get_fl_payload1(struct adapter *sc, stru bus_dmamap_sync(fl->tag[sd->tag_idx], sd->map, BUS_DMASYNC_POSTREAD); - if (len < RX_COPY_THRESHOLD) { + if (sc->sc_do_rxcopy && (len < RX_COPY_THRESHOLD)) { #ifdef T4_PKT_TIMESTAMP /* Leave room for a timestamp */ m0->m_data += 8; @@ -1601,7 +1601,7 @@ get_fl_payload2(struct adapter *sc, stru bus_dmamap_sync(fl->tag[sd->tag_idx], sd->map, BUS_DMASYNC_POSTREAD); - if (len < RX_COPY_THRESHOLD) { + if (sc->sc_do_rxcopy && (len < RX_COPY_THRESHOLD)) { #ifdef T4_PKT_TIMESTAMP /* Leave room for a timestamp */ m0->m_data += 8; From owner-svn-src-stable@FreeBSD.ORG Tue May 6 06:49:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76AB4E98; Tue, 6 May 2014 06:49:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6156AADD; Tue, 6 May 2014 06:49:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s466neYa029677; Tue, 6 May 2014 06:49:40 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s466nd0F029672; Tue, 6 May 2014 06:49:39 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201405060649.s466nd0F029672@svn.freebsd.org> From: Navdeep Parhar Date: Tue, 6 May 2014 06:49:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265425 - in stable/10: share/man/man4 sys/dev/cxgbe sys/dev/cxgbe/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2014 06:49:40 -0000 Author: np Date: Tue May 6 06:49:39 2014 New Revision: 265425 URL: http://svnweb.freebsd.org/changeset/base/265425 Log: MFC r263317, r263412, and r263451. r263317: cxgbe(4): significant rx rework. - More flexible cluster size selection, including the ability to fall back to a safe cluster size (PAGE_SIZE from zone_jumbop by default) in case an allocation of a larger size fails. - A single get_fl_payload() function that assembles the payload into an mbuf chain for any kind of freelist. This replaces two variants: one for freelists with buffer packing enabled and another for those without. - Buffer packing with any sized cluster. It was limited to 4K clusters only before this change. - Enable buffer packing for TOE rx queues as well. - Statistics and tunables to go with all these changes. The driver's man page will be updated separately. r263412: cxgbe(4): if_iqdrops statistic should include tunnel congestion drops. r263451: cxgbe(4): man page updates. Modified: stable/10/share/man/man4/cxgbe.4 stable/10/sys/dev/cxgbe/adapter.h stable/10/sys/dev/cxgbe/common/t4_hw.h stable/10/sys/dev/cxgbe/t4_main.c stable/10/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/cxgbe.4 ============================================================================== --- stable/10/share/man/man4/cxgbe.4 Tue May 6 06:18:43 2014 (r265424) +++ stable/10/share/man/man4/cxgbe.4 Tue May 6 06:49:39 2014 (r265425) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2011-2013, Chelsio Inc +.\" Copyright (c) 2011-2014, Chelsio Inc .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 18, 2013 +.Dd March 20, 2014 .Dt CXGBE 4 .Os .Sh NAME @@ -141,11 +141,11 @@ prompt before booting the kernel or stor .Xr loader.conf 5 . .Bl -tag -width indent .It Va hw.cxgbe.ntxq10g -The number of tx queues to use for a 10Gb port. +The number of tx queues to use for a 10Gb or 40Gb port. The default is 16 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.nrxq10g -The number of rx queues to use for a 10Gb port. +The number of rx queues to use for a 10Gb or 40Gb port. The default is 8 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.ntxq1g @@ -157,11 +157,11 @@ The number of rx queues to use for a 1Gb The default is 2 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.nofldtxq10g -The number of TOE tx queues to use for a 10Gb port. +The number of TOE tx queues to use for a 10Gb or 40Gb port. The default is 8 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.nofldrxq10g -The number of TOE rx queues to use for a 10Gb port. +The number of TOE rx queues to use for a 10Gb or 40Gb port. The default is 2 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.nofldtxq1g @@ -177,8 +177,7 @@ The timer index value to use to delay in The holdoff timer list has the values 1, 5, 10, 50, 100, and 200 by default (all values are in microseconds) and the index selects a value from this list. -The default value is 1 for both 10Gb and 1Gb ports, which means the -timer value is 5us. +The default value is 1 which means the timer value is 5us. Different interfaces can be assigned different values at any time via the dev.cxgbe.X.holdoff_tmr_idx or dev.cxl.X.holdoff_tmr_idx sysctl. .It Va hw.cxgbe.holdoff_pktc_idx_10G @@ -186,9 +185,8 @@ dev.cxgbe.X.holdoff_tmr_idx or dev.cxl.X The packet-count index value to use to delay interrupts. The packet-count list has the values 1, 8, 16, and 32 by default and the index selects a value from this list. -The default value is -1 for both 10Gb and 1Gb ports, which means packet -counting is disabled and interrupts are generated based solely on the -holdoff timer value. +The default value is -1 which means packet counting is disabled and interrupts +are generated based solely on the holdoff timer value. Different interfaces can be assigned different values via the dev.cxgbe.X.holdoff_pktc_idx or dev.cxl.X.holdoff_pktc_idx sysctl. This sysctl works only when the interface has never been marked up (as done by @@ -228,6 +226,43 @@ already on the card. long as it is compatible with the driver and is a different version than the one already on the card. The default is 1. +.It Va hw.cxgbe.fl_pktshift +The number of bytes of padding inserted before the begining of an Ethernet +frame in the receive buffer. +The default value of 2 ensures that the Ethernet payload (usually the IP header) +is at a 4 byte aligned address. +0-7 are all valid values. +.It Va hw.cxgbe.fl_pad +A non-zero value ensures that writes from the hardware to a receive buffer are +padded up to the specified boundary. +The default is -1 which lets the driver pick a pad boundary. +0 disables trailer padding completely. +.It Va hw.cxgbe.cong_drop +Controls the hardware response to congestion. +-1 disables congestion feedback and is not recommended. +0 instructs the hardware to backpressure its pipeline on congestion. +This usually results in the port emitting pause frames. +1 instructs the hardware to drop frames destined for congested queues. +.It Va hw.cxgbe.buffer_packing +Allow the hardware to deliver multiple frames in the same receive buffer +opportunistically. +The default is -1 which lets the driver decide. +0 or 1 explicitly disable or enable this feature. +.It Va hw.cxgbe.allow_mbufs_in_cluster +1 allows the driver to lay down one or more mbufs within the receive buffer +opportunistically. This is the default. +0 prohibits the driver from doing so. +.It Va hw.cxgbe.largest_rx_cluster +.It Va hw.cxgbe.safest_rx_cluster +Sizes of rx clusters. Each of these must be set to one of the sizes available +(usually 2048, 4096, 9216, and 16384) and largest_rx_cluster must be greater +than or equal to safest_rx_cluster. +The defaults are 16384 and 4096 respectively. +The driver will never attempt to allocate a receive buffer larger than +largest_rx_cluster and will fall back to allocating buffers of +safest_rx_cluster size if an allocation larger than safest_rx_cluster fails. +Note that largest_rx_cluster merely establishes a ceiling -- the driver is +allowed to allocate buffers of smaller sizes. .It Va hw.cxgbe.config_file Select a pre-packaged device configuration file. A configuration file contains a recipe for partitioning and configuring the @@ -235,7 +270,7 @@ hardware resources on the card. This tunable is for specialized applications only and should not be used in normal operation. The configuration profile currently in use is available in the dev.t4nex.X.cf -and dev.t4nex.X.cfcsum sysctls. +and dev.t4nex.X.cfcsum (dev.t5nex for T5 cards) sysctls. .It Va hw.cxgbe.linkcaps_allowed .It Va hw.cxgbe.niccaps_allowed .It Va hw.cxgbe.toecaps_allowed @@ -249,7 +284,7 @@ capability. This tunable is for specialized applications only and should not be used in normal operation. The capabilities for which hardware resources have been reserved are listed in -dev.t4nex.X.*caps sysctls. +dev.t4nex.X.*caps or dev.t5nex.X.*caps sysctls. .El .Sh SUPPORT For general information and support, Modified: stable/10/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/10/sys/dev/cxgbe/adapter.h Tue May 6 06:18:43 2014 (r265424) +++ stable/10/sys/dev/cxgbe/adapter.h Tue May 6 06:49:39 2014 (r265425) @@ -128,10 +128,11 @@ enum { RX_FL_ESIZE = EQ_ESIZE, /* 8 64bit addresses */ #if MJUMPAGESIZE != MCLBYTES - FL_BUF_SIZES_MAX = 5, /* cluster, jumbop, jumbo9k, jumbo16k, extra */ + SW_ZONE_SIZES = 4, /* cluster, jumbop, jumbo9k, jumbo16k */ #else - FL_BUF_SIZES_MAX = 4, /* cluster, jumbo9k, jumbo16k, extra */ + SW_ZONE_SIZES = 3, /* cluster, jumbo9k, jumbo16k */ #endif + CL_METADATA_SIZE = CACHE_LINE_SIZE, CTRL_EQ_QSIZE = 128, @@ -235,15 +236,28 @@ struct port_info { uint8_t hw_addr[ETHER_ADDR_LEN]; /* factory MAC address, won't change */ }; -struct fl_sdesc { - bus_dmamap_t map; - caddr_t cl; - uint8_t tag_idx; /* the fl->tag entry this map comes from */ +/* Where the cluster came from, how it has been carved up. */ +struct cluster_layout { + int8_t zidx; + int8_t hwidx; + uint16_t region1; /* mbufs laid out within this region */ + /* region2 is the DMA region */ + uint16_t region3; /* cluster_metadata within this region */ +}; + +struct cluster_metadata { + u_int refcount; #ifdef INVARIANTS - __be64 ba_hwtag; + struct fl_sdesc *sd; /* For debug only. Could easily be stale */ #endif }; +struct fl_sdesc { + caddr_t cl; + uint8_t nmbuf; + struct cluster_layout cll; +}; + struct tx_desc { __be64 flit[8]; }; @@ -362,17 +376,19 @@ struct sge_eq { uint32_t unstalled; /* recovered from stall */ }; -struct fl_buf_info { - u_int size; - int type; - int hwtag:4; /* tag in low 4 bits of the pa. */ - uma_zone_t zone; -}; -#define FL_BUF_SIZES(sc) (sc->sge.fl_buf_sizes) -#define FL_BUF_SIZE(sc, x) (sc->sge.fl_buf_info[x].size) -#define FL_BUF_TYPE(sc, x) (sc->sge.fl_buf_info[x].type) -#define FL_BUF_HWTAG(sc, x) (sc->sge.fl_buf_info[x].hwtag) -#define FL_BUF_ZONE(sc, x) (sc->sge.fl_buf_info[x].zone) +struct sw_zone_info { + uma_zone_t zone; /* zone that this cluster comes from */ + int size; /* size of cluster: 2K, 4K, 9K, 16K, etc. */ + int type; /* EXT_xxx type of the cluster */ + int8_t head_hwidx; + int8_t tail_hwidx; +}; + +struct hw_buf_info { + int8_t zidx; /* backpointer to zone; -ve means unused */ + int8_t next; /* next hwidx for this zone; -1 means no more */ + int size; +}; enum { FL_STARVING = (1 << 0), /* on the adapter's list of starving fl's */ @@ -386,9 +402,8 @@ enum { struct sge_fl { bus_dma_tag_t desc_tag; bus_dmamap_t desc_map; - bus_dma_tag_t tag[FL_BUF_SIZES_MAX]; /* only first FL_BUF_SIZES(sc) are - valid */ - uint8_t tag_idx; + struct cluster_layout cll_def; /* default refill zone, layout */ + struct cluster_layout cll_alt; /* alternate refill zone, layout */ struct mtx fl_lock; char lockname[16]; int flags; @@ -405,9 +420,17 @@ struct sge_fl { uint32_t needed; /* # of buffers needed to fill up fl. */ uint32_t lowat; /* # of buffers <= this means fl needs help */ uint32_t pending; /* # of bufs allocated since last doorbell */ - u_int dmamap_failed; - struct mbuf *mstash[8]; TAILQ_ENTRY(sge_fl) link; /* All starving freelists */ + + struct mbuf *m0; + struct mbuf **pnext; + u_int remaining; + + uint64_t mbuf_allocated;/* # of mbuf allocated from zone_mbuf */ + uint64_t mbuf_inlined; /* # of mbuf created within clusters */ + uint64_t cl_allocated; /* # of clusters allocated */ + uint64_t cl_recycled; /* # of clusters recycled */ + uint64_t cl_fast_recycled; /* # of clusters recycled (fast) */ }; /* txq: SGE egress queue + what's needed for Ethernet NIC */ @@ -541,8 +564,11 @@ struct sge { struct sge_iq **iqmap; /* iq->cntxt_id to iq mapping */ struct sge_eq **eqmap; /* eq->cntxt_id to eq mapping */ - u_int fl_buf_sizes __aligned(CACHE_LINE_SIZE); - struct fl_buf_info fl_buf_info[FL_BUF_SIZES_MAX]; + int pack_boundary; + int8_t safe_hwidx1; /* may not have room for metadata */ + int8_t safe_hwidx2; /* with room for metadata and maybe more */ + struct sw_zone_info sw_zone_info[SW_ZONE_SIZES]; + struct hw_buf_info hw_buf_info[SGE_FLBUF_SIZES]; }; struct rss_header; Modified: stable/10/sys/dev/cxgbe/common/t4_hw.h ============================================================================== --- stable/10/sys/dev/cxgbe/common/t4_hw.h Tue May 6 06:18:43 2014 (r265424) +++ stable/10/sys/dev/cxgbe/common/t4_hw.h Tue May 6 06:49:39 2014 (r265425) @@ -87,6 +87,7 @@ enum { SGE_NTIMERS = 6, /* # of interrupt holdoff timer values */ SGE_NCOUNTERS = 4, /* # of interrupt packet counter values */ SGE_MAX_IQ_SIZE = 65520, + SGE_FLBUF_SIZES = 16, }; struct sge_qstat { /* data written to SGE queue status entries */ Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Tue May 6 06:18:43 2014 (r265424) +++ stable/10/sys/dev/cxgbe/t4_main.c Tue May 6 06:49:39 2014 (r265425) @@ -494,6 +494,8 @@ CTASSERT(offsetof(struct sge_ofld_rxq, f CTASSERT(nitems(((struct adapter *)0)->cpl_handler) == NUM_CPL_CMDS); CTASSERT(nitems(((struct adapter *)0)->fw_msg_handler) == NUM_FW6_TYPES); +CTASSERT(sizeof(struct cluster_metadata) <= CL_METADATA_SIZE); + static int t4_probe(device_t dev) { @@ -4039,6 +4041,7 @@ static void cxgbe_tick(void *arg) { struct port_info *pi = arg; + struct adapter *sc = pi->adapter; struct ifnet *ifp = pi->ifp; struct sge_txq *txq; int i, drops; @@ -4050,7 +4053,7 @@ cxgbe_tick(void *arg) return; /* without scheduling another callout */ } - t4_get_port_stats(pi->adapter, pi->tx_chan, s); + t4_get_port_stats(sc, pi->tx_chan, s); ifp->if_opackets = s->tx_frames - s->tx_pause; ifp->if_ipackets = s->rx_frames - s->rx_pause; @@ -4061,6 +4064,19 @@ cxgbe_tick(void *arg) ifp->if_iqdrops = s->rx_ovflow0 + s->rx_ovflow1 + s->rx_ovflow2 + s->rx_ovflow3 + s->rx_trunc0 + s->rx_trunc1 + s->rx_trunc2 + s->rx_trunc3; + for (i = 0; i < 4; i++) { + if (pi->rx_chan_map & (1 << i)) { + uint32_t v; + + /* + * XXX: indirect reads from the same ADDR/DATA pair can + * race with each other. + */ + t4_read_indirect(sc, A_TP_MIB_INDEX, A_TP_MIB_DATA, &v, + 1, A_TP_MIB_TNL_CNG_DROP_0 + i); + ifp->if_iqdrops += v; + } + } drops = s->tx_drop; for_each_txq(pi, i, txq) Modified: stable/10/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_sge.c Tue May 6 06:18:43 2014 (r265424) +++ stable/10/sys/dev/cxgbe/t4_sge.c Tue May 6 06:49:39 2014 (r265425) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -51,6 +52,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include "common/common.h" #include "common/t4_regs.h" @@ -123,6 +126,27 @@ static int t4_fl_pack; static int t5_fl_pack; TUNABLE_INT("hw.cxgbe.fl_pack", &fl_pack); +/* + * Allow the driver to create mbuf(s) in a cluster allocated for rx. + * 0: never; always allocate mbufs from the zone_mbuf UMA zone. + * 1: ok to create mbuf(s) within a cluster if there is room. + */ +static int allow_mbufs_in_cluster = 1; +TUNABLE_INT("hw.cxgbe.allow_mbufs_in_cluster", &allow_mbufs_in_cluster); + +/* + * Largest rx cluster size that the driver is allowed to allocate. + */ +static int largest_rx_cluster = MJUM16BYTES; +TUNABLE_INT("hw.cxgbe.largest_rx_cluster", &largest_rx_cluster); + +/* + * Size of cluster allocation that's most likely to succeed. The driver will + * fall back to this size if it fails to allocate clusters larger than this. + */ +static int safest_rx_cluster = PAGE_SIZE; +TUNABLE_INT("hw.cxgbe.safest_rx_cluster", &safest_rx_cluster); + /* Used to track coalesced tx work request */ struct txpkts { uint64_t *flitp; /* ptr to flit where next pkt should start */ @@ -139,9 +163,7 @@ struct sgl { }; static int service_iq(struct sge_iq *, int); -static struct mbuf *get_fl_payload1(struct adapter *, struct sge_fl *, uint32_t, - int *); -static struct mbuf *get_fl_payload2(struct adapter *, struct sge_fl *, uint32_t, +static struct mbuf *get_fl_payload(struct adapter *, struct sge_fl *, uint32_t, int *); static int t4_eth_rx(struct sge_iq *, const struct rss_header *, struct mbuf *); static inline void init_iq(struct sge_iq *, struct adapter *, int, int, int, @@ -157,6 +179,8 @@ static int free_ring(struct adapter *, b static int alloc_iq_fl(struct port_info *, struct sge_iq *, struct sge_fl *, int, int); static int free_iq_fl(struct port_info *, struct sge_iq *, struct sge_fl *); +static void add_fl_sysctls(struct sysctl_ctx_list *, struct sysctl_oid *, + struct sge_fl *); static int alloc_fwq(struct adapter *); static int free_fwq(struct adapter *); static int alloc_mgmtq(struct adapter *); @@ -190,7 +214,8 @@ static int refill_fl(struct adapter *, s static void refill_sfl(void *); static int alloc_fl_sdesc(struct sge_fl *); static void free_fl_sdesc(struct adapter *, struct sge_fl *); -static void set_fl_tag_idx(struct adapter *, struct sge_fl *, int); +static void find_best_refill_source(struct adapter *, struct sge_fl *, int); +static void find_safe_refill_source(struct adapter *, struct sge_fl *); static void add_fl_to_sfl(struct adapter *, struct sge_fl *); static int get_pkt_sgl(struct sge_txq *, struct mbuf **, struct sgl *, int); @@ -215,6 +240,7 @@ static int handle_fw_msg(struct sge_iq * struct mbuf *); static int sysctl_uint16(SYSCTL_HANDLER_ARGS); +static int sysctl_bufsizes(SYSCTL_HANDLER_ARGS); /* * Called on MOD_LOAD. Validates and calculates the SGE tunables. @@ -263,7 +289,7 @@ t4_sge_modload(void) /* T5's pack boundary is independent of the pad boundary. */ if (fl_pack < 16 || fl_pack == 32 || fl_pack > 4096 || !powerof2(fl_pack)) - t5_fl_pack = max(pad, 64); + t5_fl_pack = max(pad, CACHE_LINE_SIZE); else t5_fl_pack = fl_pack; @@ -312,14 +338,18 @@ t4_tweak_chip_settings(struct adapter *s int timer_max = M_TIMERVALUE0 * 1000 / sc->params.vpd.cclk; int intr_pktcount[SGE_NCOUNTERS] = {1, 8, 16, 32}; /* 63 max */ uint16_t indsz = min(RX_COPY_THRESHOLD - 1, M_INDICATESIZE); - int sw_flbuf_sizes[] = { + static int sge_flbuf_sizes[] = { MCLBYTES, #if MJUMPAGESIZE != MCLBYTES MJUMPAGESIZE, + MJUMPAGESIZE - CL_METADATA_SIZE, + MJUMPAGESIZE - 2 * MSIZE - CL_METADATA_SIZE, #endif MJUM9BYTES, MJUM16BYTES, - MJUMPAGESIZE - MSIZE + MCLBYTES - MSIZE - CL_METADATA_SIZE, + MJUM9BYTES - CL_METADATA_SIZE, + MJUM16BYTES - CL_METADATA_SIZE, }; KASSERT(sc->flags & MASTER_PF, @@ -357,9 +387,11 @@ t4_tweak_chip_settings(struct adapter *s V_HOSTPAGESIZEPF7(PAGE_SHIFT - 10); t4_write_reg(sc, A_SGE_HOST_PAGE_SIZE, v); - for (i = 0; i < min(nitems(sw_flbuf_sizes), 16); i++) { + KASSERT(nitems(sge_flbuf_sizes) <= SGE_FLBUF_SIZES, + ("%s: hw buffer size table too big", __func__)); + for (i = 0; i < min(nitems(sge_flbuf_sizes), SGE_FLBUF_SIZES); i++) { t4_write_reg(sc, A_SGE_FL_BUFFER_SIZE0 + (4 * i), - sw_flbuf_sizes[i]); + sge_flbuf_sizes[i]); } v = V_THRESHOLD_0(intr_pktcount[0]) | V_THRESHOLD_1(intr_pktcount[1]) | @@ -414,6 +446,18 @@ t4_tweak_chip_settings(struct adapter *s } /* + * SGE wants the buffer to be at least 64B and then a multiple of the pad + * boundary or 16, whichever is greater. + */ +static inline int +hwsz_ok(int hwsz) +{ + int mask = max(fl_pad, 16) - 1; + + return (hwsz >= 64 && (hwsz & mask) == 0); +} + +/* * XXX: driver really should be able to deal with unexpected settings. */ int @@ -423,7 +467,7 @@ t4_read_chip_settings(struct adapter *sc int i, j, n, rc = 0; uint32_t m, v, r; uint16_t indsz = min(RX_COPY_THRESHOLD - 1, M_INDICATESIZE); - uint32_t sge_flbuf_sizes[16], sw_flbuf_sizes[] = { + static int sw_buf_sizes[] = { /* Sorted by size */ MCLBYTES, #if MJUMPAGESIZE != MCLBYTES MJUMPAGESIZE, @@ -431,6 +475,8 @@ t4_read_chip_settings(struct adapter *sc MJUM9BYTES, MJUM16BYTES }; + struct sw_zone_info *swz, *safe_swz; + struct hw_buf_info *hwb; m = V_PKTSHIFT(M_PKTSHIFT) | F_RXPKTCPLMODE | F_EGRSTATUSPAGESIZE; v = V_PKTSHIFT(fl_pktshift) | F_RXPKTCPLMODE | @@ -461,6 +507,7 @@ t4_read_chip_settings(struct adapter *sc rc = EINVAL; } } + s->pack_boundary = is_t4(sc) ? t4_fl_pack : t5_fl_pack; v = V_HOSTPAGESIZEPF0(PAGE_SHIFT - 10) | V_HOSTPAGESIZEPF1(PAGE_SHIFT - 10) | @@ -476,45 +523,93 @@ t4_read_chip_settings(struct adapter *sc rc = EINVAL; } - /* - * Make a list of SGE FL buffer sizes programmed in the chip and tally - * it with the FL buffer sizes that we'd like to use. - */ - n = 0; - for (i = 0; i < nitems(sge_flbuf_sizes); i++) { + /* Filter out unusable hw buffer sizes entirely (mark with -2). */ + hwb = &s->hw_buf_info[0]; + for (i = 0; i < nitems(s->hw_buf_info); i++, hwb++) { r = t4_read_reg(sc, A_SGE_FL_BUFFER_SIZE0 + (4 * i)); - sge_flbuf_sizes[i] = r; - if (r == MJUMPAGESIZE - MSIZE && - (sc->flags & BUF_PACKING_OK) == 0) { - sc->flags |= BUF_PACKING_OK; - FL_BUF_HWTAG(sc, n) = i; - FL_BUF_SIZE(sc, n) = MJUMPAGESIZE - MSIZE; - FL_BUF_TYPE(sc, n) = m_gettype(MJUMPAGESIZE); - FL_BUF_ZONE(sc, n) = m_getzone(MJUMPAGESIZE); - n++; - } + hwb->size = r; + hwb->zidx = hwsz_ok(r) ? -1 : -2; + hwb->next = -1; } - for (i = 0; i < nitems(sw_flbuf_sizes); i++) { - for (j = 0; j < nitems(sge_flbuf_sizes); j++) { - if (sw_flbuf_sizes[i] != sge_flbuf_sizes[j]) + + /* + * Create a sorted list in decreasing order of hw buffer sizes (and so + * increasing order of spare area) for each software zone. + */ + n = 0; /* no usable buffer size to begin with */ + swz = &s->sw_zone_info[0]; + safe_swz = NULL; + for (i = 0; i < SW_ZONE_SIZES; i++, swz++) { + int8_t head = -1, tail = -1; + + swz->size = sw_buf_sizes[i]; + swz->zone = m_getzone(swz->size); + swz->type = m_gettype(swz->size); + + if (swz->size == safest_rx_cluster) + safe_swz = swz; + + hwb = &s->hw_buf_info[0]; + for (j = 0; j < SGE_FLBUF_SIZES; j++, hwb++) { + if (hwb->zidx != -1 || hwb->size > swz->size) continue; - FL_BUF_HWTAG(sc, n) = j; - FL_BUF_SIZE(sc, n) = sw_flbuf_sizes[i]; - FL_BUF_TYPE(sc, n) = m_gettype(sw_flbuf_sizes[i]); - FL_BUF_ZONE(sc, n) = m_getzone(sw_flbuf_sizes[i]); + hwb->zidx = i; + if (head == -1) + head = tail = j; + else if (hwb->size < s->hw_buf_info[tail].size) { + s->hw_buf_info[tail].next = j; + tail = j; + } else { + int8_t *cur; + struct hw_buf_info *t; + + for (cur = &head; *cur != -1; cur = &t->next) { + t = &s->hw_buf_info[*cur]; + if (hwb->size == t->size) { + hwb->zidx = -2; + break; + } + if (hwb->size > t->size) { + hwb->next = *cur; + *cur = j; + break; + } + } + } + } + swz->head_hwidx = head; + swz->tail_hwidx = tail; + + if (tail != -1) { n++; - break; + if (swz->size - s->hw_buf_info[tail].size >= + CL_METADATA_SIZE) + sc->flags |= BUF_PACKING_OK; } } if (n == 0) { device_printf(sc->dev, "no usable SGE FL buffer size.\n"); rc = EINVAL; - } else if (n == 1 && (sc->flags & BUF_PACKING_OK)) { - device_printf(sc->dev, - "no usable SGE FL buffer size when not packing buffers.\n"); - rc = EINVAL; } - FL_BUF_SIZES(sc) = n; + + s->safe_hwidx1 = -1; + s->safe_hwidx2 = -1; + if (safe_swz != NULL) { + s->safe_hwidx1 = safe_swz->head_hwidx; + for (i = safe_swz->head_hwidx; i != -1; i = hwb->next) { + int spare; + + hwb = &s->hw_buf_info[i]; + spare = safe_swz->size - hwb->size; + if (spare < CL_METADATA_SIZE) + continue; + if (s->safe_hwidx2 == -1 || + spare == CL_METADATA_SIZE + MSIZE) + s->safe_hwidx2 = i; + if (spare >= CL_METADATA_SIZE + MSIZE) + break; + } + } r = t4_read_reg(sc, A_SGE_INGRESS_RX_THRESHOLD); s->counter_val[0] = G_THRESHOLD_0(r); @@ -626,6 +721,10 @@ t4_sge_sysctls(struct adapter *sc, struc struct sysctl_oid_list *children) { + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "buffer_sizes", + CTLTYPE_STRING | CTLFLAG_RD, &sc->sge, 0, sysctl_bufsizes, "A", + "freelist buffer sizes"); + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "fl_pktshift", CTLFLAG_RD, NULL, fl_pktshift, "payload DMA offset in rx buffer (bytes)"); @@ -643,8 +742,7 @@ t4_sge_sysctls(struct adapter *sc, struc "pack multiple frames in one fl buffer"); SYSCTL_ADD_INT(ctx, children, OID_AUTO, "fl_pack", CTLFLAG_RD, - NULL, is_t5(sc) ? t5_fl_pack : t4_fl_pack, - "payload pack boundary (bytes)"); + NULL, sc->sge.pack_boundary, "payload pack boundary (bytes)"); } int @@ -764,7 +862,7 @@ port_intr_iq(struct port_info *pi, int i #ifdef TCP_OFFLOAD if (sc->flags & INTR_DIRECT) { idx %= pi->nrxq + pi->nofldrxq; - + if (idx >= pi->nrxq) { idx -= pi->nrxq; iq = &s->ofld_rxq[pi->first_ofld_rxq + idx].iq; @@ -795,29 +893,28 @@ port_intr_iq(struct port_info *pi, int i return (iq); } +/* Maximum payload that can be delivered with a single iq descriptor */ static inline int -mtu_to_bufsize(int mtu) +mtu_to_max_payload(struct adapter *sc, int mtu, const int toe) { - int bufsize; - - /* large enough for a frame even when VLAN extraction is disabled */ - bufsize = ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN + mtu; - bufsize = roundup2(bufsize + fl_pktshift, fl_pad); - - return (bufsize); -} + int payload; #ifdef TCP_OFFLOAD -static inline int -mtu_to_bufsize_toe(struct adapter *sc, int mtu) -{ - - if (sc->tt.rx_coalesce) - return (G_RXCOALESCESIZE(t4_read_reg(sc, A_TP_PARA_REG2))); + if (toe) { + payload = sc->tt.rx_coalesce ? + G_RXCOALESCESIZE(t4_read_reg(sc, A_TP_PARA_REG2)) : mtu; + } else { +#endif + /* large enough even when hw VLAN extraction is disabled */ + payload = fl_pktshift + ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN + + mtu; +#ifdef TCP_OFFLOAD + } +#endif + payload = roundup2(payload, fl_pad); - return (mtu); + return (payload); } -#endif int t4_setup_port_queues(struct port_info *pi) @@ -836,7 +933,7 @@ t4_setup_port_queues(struct port_info *p struct ifnet *ifp = pi->ifp; struct sysctl_oid *oid = device_get_sysctl_tree(pi->dev); struct sysctl_oid_list *children = SYSCTL_CHILDREN(oid); - int bufsize, pack; + int maxp, pack, mtu = ifp->if_mtu; oid = SYSCTL_ADD_NODE(&pi->ctx, children, OID_AUTO, "rxq", CTLFLAG_RD, NULL, "rx queues"); @@ -857,7 +954,7 @@ t4_setup_port_queues(struct port_info *p * a) initialize iq and fl * b) allocate queue iff it will take direct interrupts. */ - bufsize = mtu_to_bufsize(ifp->if_mtu); + maxp = mtu_to_max_payload(sc, mtu, 0); pack = enable_buffer_packing(sc); for_each_rxq(pi, i, rxq) { @@ -866,7 +963,7 @@ t4_setup_port_queues(struct port_info *p snprintf(name, sizeof(name), "%s rxq%d-fl", device_get_nameunit(pi->dev), i); - init_fl(sc, &rxq->fl, pi->qsize_rxq / 8, bufsize, pack, name); + init_fl(sc, &rxq->fl, pi->qsize_rxq / 8, maxp, pack, name); if (sc->flags & INTR_DIRECT #ifdef TCP_OFFLOAD @@ -882,8 +979,7 @@ t4_setup_port_queues(struct port_info *p } #ifdef TCP_OFFLOAD - bufsize = mtu_to_bufsize_toe(sc, ifp->if_mtu); - pack = 0; /* XXX: think about this some more */ + maxp = mtu_to_max_payload(sc, mtu, 1); for_each_ofld_rxq(pi, i, ofld_rxq) { init_iq(&ofld_rxq->iq, sc, pi->tmr_idx, pi->pktc_idx, @@ -891,8 +987,7 @@ t4_setup_port_queues(struct port_info *p snprintf(name, sizeof(name), "%s ofld_rxq%d-fl", device_get_nameunit(pi->dev), i); - init_fl(sc, &ofld_rxq->fl, pi->qsize_rxq / 8, bufsize, pack, - name); + init_fl(sc, &ofld_rxq->fl, pi->qsize_rxq / 8, maxp, pack, name); if (sc->flags & INTR_DIRECT || (sc->intr_count > 1 && pi->nofldrxq > pi->nrxq)) { @@ -1169,10 +1264,7 @@ service_iq(struct sge_iq *iq, int budget ("%s: data for an iq (%p) with no freelist", __func__, iq)); - m0 = fl->flags & FL_BUF_PACKING ? - get_fl_payload1(sc, fl, lq, &fl_bufs_used) : - get_fl_payload2(sc, fl, lq, &fl_bufs_used); - + m0 = get_fl_payload(sc, fl, lq, &fl_bufs_used); if (__predict_false(m0 == NULL)) goto process_iql; #ifdef T4_PKT_TIMESTAMP @@ -1245,6 +1337,14 @@ service_iq(struct sge_iq *iq, int budget break; } + if (fl_bufs_used >= 16) { + FL_LOCK(fl); + fl->needed += fl_bufs_used; + refill_fl(sc, fl, 32); + FL_UNLOCK(fl); + fl_bufs_used = 0; + } + iq_next(iq); if (++ndescs == limit) { t4_write_reg(sc, MYPF_REG(A_SGE_PF_GTS), @@ -1261,14 +1361,6 @@ service_iq(struct sge_iq *iq, int budget } #endif - if (fl_bufs_used > 0) { - FL_LOCK(fl); - fl->needed += fl_bufs_used; - refill_fl(sc, fl, fl->cap / 8); - FL_UNLOCK(fl); - fl_bufs_used = 0; - } - if (budget) return (EINPROGRESS); } @@ -1311,7 +1403,7 @@ process_iql: FL_LOCK(fl); fl->needed += fl_bufs_used; - starved = refill_fl(sc, fl, fl->cap / 4); + starved = refill_fl(sc, fl, 64); FL_UNLOCK(fl); if (__predict_false(starved != 0)) add_fl_to_sfl(sc, fl); @@ -1320,74 +1412,28 @@ process_iql: return (0); } -static int -fill_mbuf_stash(struct sge_fl *fl) -{ - int i; - - for (i = 0; i < nitems(fl->mstash); i++) { - if (fl->mstash[i] == NULL) { - struct mbuf *m; - if ((m = m_get(M_NOWAIT, MT_NOINIT)) == NULL) - return (ENOBUFS); - fl->mstash[i] = m; - } - } - return (0); -} - -static struct mbuf * -get_mbuf_from_stash(struct sge_fl *fl) +static inline int +cl_has_metadata(struct sge_fl *fl, struct cluster_layout *cll) { - int i; + int rc = fl->flags & FL_BUF_PACKING || cll->region1 > 0; - for (i = 0; i < nitems(fl->mstash); i++) { - if (fl->mstash[i] != NULL) { - struct mbuf *m; - - m = fl->mstash[i]; - fl->mstash[i] = NULL; - return (m); - } else - fl->mstash[i] = m_get(M_NOWAIT, MT_NOINIT); - } + if (rc) + MPASS(cll->region3 >= CL_METADATA_SIZE); - return (m_get(M_NOWAIT, MT_NOINIT)); + return (rc); } -static void -return_mbuf_to_stash(struct sge_fl *fl, struct mbuf *m) +static inline struct cluster_metadata * +cl_metadata(struct adapter *sc, struct sge_fl *fl, struct cluster_layout *cll, + caddr_t cl) { - int i; - if (m == NULL) - return; + if (cl_has_metadata(fl, cll)) { + struct sw_zone_info *swz = &sc->sge.sw_zone_info[cll->zidx]; - for (i = 0; i < nitems(fl->mstash); i++) { - if (fl->mstash[i] == NULL) { - fl->mstash[i] = m; - return; - } + return ((struct cluster_metadata *)(cl + swz->size) - 1); } - m_init(m, NULL, 0, M_NOWAIT, MT_DATA, 0); - m_free(m); -} - -/* buf can be any address within the buffer */ -static inline u_int * -find_buf_refcnt(caddr_t buf) -{ - uintptr_t ptr = (uintptr_t)buf; - - return ((u_int *)((ptr & ~(MJUMPAGESIZE - 1)) + MSIZE - sizeof(u_int))); -} - -static inline struct mbuf * -find_buf_mbuf(caddr_t buf) -{ - uintptr_t ptr = (uintptr_t)buf; - - return ((struct mbuf *)(ptr & ~(MJUMPAGESIZE - 1))); + return (NULL); } static int @@ -1395,179 +1441,117 @@ rxb_free(struct mbuf *m, void *arg1, voi { uma_zone_t zone = arg1; caddr_t cl = arg2; -#ifdef notyet - u_int refcount; - refcount = *find_buf_refcnt(cl); - KASSERT(refcount == 0, ("%s: cl %p refcount is %u", __func__, - cl - MSIZE, refcount)); -#endif - cl -= MSIZE; uma_zfree(zone, cl); return (EXT_FREE_OK); } +/* + * The mbuf returned by this function could be allocated from zone_mbuf or + * constructed in spare room in the cluster. + * + * The mbuf carries the payload in one of these ways + * a) frame inside the mbuf (mbuf from zone_mbuf) + * b) m_cljset (for clusters without metadata) zone_mbuf + * c) m_extaddref (cluster with metadata) inline mbuf + * d) m_extaddref (cluster with metadata) zone_mbuf + */ static struct mbuf * -get_fl_payload1(struct adapter *sc, struct sge_fl *fl, uint32_t len_newbuf, - int *fl_bufs_used) +get_scatter_segment(struct adapter *sc, struct sge_fl *fl, int total, int flags) { - struct mbuf *m0, *m; + struct mbuf *m; struct fl_sdesc *sd = &fl->sdesc[fl->cidx]; - unsigned int nbuf, len; - int pack_boundary = is_t4(sc) ? t4_fl_pack : t5_fl_pack; + struct cluster_layout *cll = &sd->cll; + struct sw_zone_info *swz = &sc->sge.sw_zone_info[cll->zidx]; + struct hw_buf_info *hwb = &sc->sge.hw_buf_info[cll->hwidx]; + struct cluster_metadata *clm = cl_metadata(sc, fl, cll, sd->cl); + int len, padded_len; + caddr_t payload; + + len = min(total, hwb->size - fl->rx_offset); + padded_len = roundup2(len, fl_pad); + payload = sd->cl + cll->region1 + fl->rx_offset; - /* - * No assertion for the fl lock because we don't need it. This routine - * is called only from the rx interrupt handler and it only updates - * fl->cidx. (Contrast that with fl->pidx/fl->needed which could be - * updated in the rx interrupt handler or the starvation helper routine. - * That's why code that manipulates fl->pidx/fl->needed needs the fl - * lock but this routine does not). - */ + if (sc->sc_do_rxcopy && len < RX_COPY_THRESHOLD) { - KASSERT(fl->flags & FL_BUF_PACKING, - ("%s: buffer packing disabled for fl %p", __func__, fl)); - - len = G_RSPD_LEN(len_newbuf); + /* + * Copy payload into a freshly allocated mbuf. + */ - if ((len_newbuf & F_RSPD_NEWBUF) == 0) { - KASSERT(fl->rx_offset > 0, - ("%s: packed frame but driver at offset=0", __func__)); - - /* A packed frame is guaranteed to fit entirely in this buf. */ - KASSERT(FL_BUF_SIZE(sc, sd->tag_idx) - fl->rx_offset >= len, - ("%s: packing error. bufsz=%u, offset=%u, len=%u", - __func__, FL_BUF_SIZE(sc, sd->tag_idx), fl->rx_offset, - len)); - - m0 = get_mbuf_from_stash(fl); - if (m0 == NULL || - m_init(m0, NULL, 0, M_NOWAIT, MT_DATA, M_PKTHDR) != 0) { - return_mbuf_to_stash(fl, m0); + m = flags & M_PKTHDR ? + m_gethdr(M_NOWAIT, MT_DATA) : m_get(M_NOWAIT, MT_DATA); + if (m == NULL) return (NULL); - } - - bus_dmamap_sync(fl->tag[sd->tag_idx], sd->map, - BUS_DMASYNC_POSTREAD); - if (sc->sc_do_rxcopy && (len < RX_COPY_THRESHOLD)) { + fl->mbuf_allocated++; #ifdef T4_PKT_TIMESTAMP - /* Leave room for a timestamp */ - m0->m_data += 8; + /* Leave room for a timestamp */ + m->m_data += 8; #endif - bcopy(sd->cl + fl->rx_offset, mtod(m0, caddr_t), len); - m0->m_pkthdr.len = len; - m0->m_len = len; - } else { - m0->m_pkthdr.len = len; - m0->m_len = len; - m_extaddref(m0, sd->cl + fl->rx_offset, - roundup2(m0->m_len, fl_pad), - find_buf_refcnt(sd->cl), rxb_free, - FL_BUF_ZONE(sc, sd->tag_idx), sd->cl); - } - fl->rx_offset += len; - fl->rx_offset = roundup2(fl->rx_offset, fl_pad); - fl->rx_offset = roundup2(fl->rx_offset, pack_boundary); - if (fl->rx_offset >= FL_BUF_SIZE(sc, sd->tag_idx)) { - fl->rx_offset = 0; - (*fl_bufs_used) += 1; - if (__predict_false(++fl->cidx == fl->cap)) - fl->cidx = 0; - } + /* copy data to mbuf */ + bcopy(payload, mtod(m, caddr_t), len); - return (m0); - } + } else if (sd->nmbuf * MSIZE < cll->region1) { - KASSERT(len_newbuf & F_RSPD_NEWBUF, - ("%s: only new buffer handled here", __func__)); + /* + * There's spare room in the cluster for an mbuf. Create one *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Tue May 6 07:21:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A8749CCE; Tue, 6 May 2014 07:21:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9437ADF1; Tue, 6 May 2014 07:21:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s467Lp9f045843; Tue, 6 May 2014 07:21:51 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s467Loxa045725; Tue, 6 May 2014 07:21:50 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201405060721.s467Loxa045725@svn.freebsd.org> From: Navdeep Parhar Date: Tue, 6 May 2014 07:21:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265426 - in stable/10/sys/dev/cxgbe: . common tom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2014 07:21:51 -0000 Author: np Date: Tue May 6 07:21:50 2014 New Revision: 265426 URL: http://svnweb.freebsd.org/changeset/base/265426 Log: MFC r259382: Read card capabilities after firmware initialization, instead of setting them up as part of firmware initialization (which the driver gets to do only if it's the master driver). Read the range of tids available for the ETHOFLD functionality if it's enabled. New is_ftid() and is_etid() functions to test whether a tid falls within the range of filter tids or ETHOFLD tids respectively. Modified: stable/10/sys/dev/cxgbe/common/common.h stable/10/sys/dev/cxgbe/offload.h stable/10/sys/dev/cxgbe/t4_main.c stable/10/sys/dev/cxgbe/t4_sge.c stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/10/sys/dev/cxgbe/common/common.h Tue May 6 06:49:39 2014 (r265425) +++ stable/10/sys/dev/cxgbe/common/common.h Tue May 6 07:21:50 2014 (r265426) @@ -267,8 +267,10 @@ struct adapter_params { unsigned short a_wnd[NCCTRL_WIN]; unsigned short b_wnd[NCCTRL_WIN]; - unsigned int mc_size; /* MC memory size */ - unsigned int nfilters; /* size of filter region */ + u_int ftid_min; + u_int ftid_max; + u_int etid_min; + u_int netids; unsigned int cim_la_size; @@ -280,8 +282,10 @@ struct adapter_params { unsigned int offload:1; /* hw is TOE capable, fw has divvied up card resources for TOE operation. */ unsigned int bypass:1; /* this is a bypass card */ + unsigned int ethoffload:1; unsigned int ofldq_wr_cred; + unsigned int eo_wr_cred; }; #define CHELSIO_T4 0x4 @@ -318,11 +322,28 @@ struct link_config { #define for_each_port(adapter, iter) \ for (iter = 0; iter < (adapter)->params.nports; ++iter) +static inline int is_ftid(const struct adapter *sc, u_int tid) +{ + + return (tid >= sc->params.ftid_min && tid <= sc->params.ftid_max); +} + +static inline int is_etid(const struct adapter *sc, u_int tid) +{ + + return (tid >= sc->params.etid_min); +} + static inline int is_offload(const struct adapter *adap) { return adap->params.offload; } +static inline int is_ethoffload(const struct adapter *adap) +{ + return adap->params.ethoffload; +} + static inline int chip_id(struct adapter *adap) { return adap->params.chipid; Modified: stable/10/sys/dev/cxgbe/offload.h ============================================================================== --- stable/10/sys/dev/cxgbe/offload.h Tue May 6 06:49:39 2014 (r265425) +++ stable/10/sys/dev/cxgbe/offload.h Tue May 6 07:21:50 2014 (r265426) @@ -101,6 +101,11 @@ struct tid_info { u_int nftids; u_int ftid_base; u_int ftids_in_use; + + struct mtx etid_lock __aligned(CACHE_LINE_SIZE); + struct etid_entry *etid_tab; + u_int netids; + u_int etid_base; }; struct t4_range { Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Tue May 6 06:49:39 2014 (r265425) +++ stable/10/sys/dev/cxgbe/t4_main.c Tue May 6 07:21:50 2014 (r265426) @@ -2357,7 +2357,6 @@ use_config_on_flash: #define LIMIT_CAPS(x) do { \ caps.x &= htobe16(t4_##x##_allowed); \ - sc->x = htobe16(caps.x); \ } while (0) /* @@ -2459,6 +2458,8 @@ get_params__post_init(struct adapter *sc sc->sge.eq_start = val[1]; sc->tids.ftid_base = val[2]; sc->tids.nftids = val[3] - val[2] + 1; + sc->params.ftid_min = val[2]; + sc->params.ftid_max = val[3]; sc->vres.l2t.start = val[4]; sc->vres.l2t.size = val[5] - val[4] + 1; KASSERT(sc->vres.l2t.size <= L2T_SIZE, @@ -2477,7 +2478,35 @@ get_params__post_init(struct adapter *sc return (rc); } - if (caps.toecaps) { +#define READ_CAPS(x) do { \ + sc->x = htobe16(caps.x); \ +} while (0) + READ_CAPS(linkcaps); + READ_CAPS(niccaps); + READ_CAPS(toecaps); + READ_CAPS(rdmacaps); + READ_CAPS(iscsicaps); + READ_CAPS(fcoecaps); + + if (sc->niccaps & FW_CAPS_CONFIG_NIC_ETHOFLD) { + param[0] = FW_PARAM_PFVF(ETHOFLD_START); + param[1] = FW_PARAM_PFVF(ETHOFLD_END); + param[2] = FW_PARAM_DEV(FLOWC_BUFFIFO_SZ); + rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 3, param, val); + if (rc != 0) { + device_printf(sc->dev, + "failed to query NIC parameters: %d.\n", rc); + return (rc); + } + sc->tids.etid_base = val[0]; + sc->params.etid_min = val[0]; + sc->tids.netids = val[1] - val[0] + 1; + sc->params.netids = sc->tids.netids; + sc->params.eo_wr_cred = val[2]; + sc->params.ethoffload = 1; + } + + if (sc->toecaps) { /* query offload-related parameters */ param[0] = FW_PARAM_DEV(NTID); param[1] = FW_PARAM_PFVF(SERVER_START); @@ -2500,7 +2529,7 @@ get_params__post_init(struct adapter *sc sc->params.ofldq_wr_cred = val[5]; sc->params.offload = 1; } - if (caps.rdmacaps) { + if (sc->rdmacaps) { param[0] = FW_PARAM_PFVF(STAG_START); param[1] = FW_PARAM_PFVF(STAG_END); param[2] = FW_PARAM_PFVF(RQ_START); @@ -2539,7 +2568,7 @@ get_params__post_init(struct adapter *sc sc->vres.ocq.start = val[4]; sc->vres.ocq.size = val[5] - val[4] + 1; } - if (caps.iscsicaps) { + if (sc->iscsicaps) { param[0] = FW_PARAM_PFVF(ISCSI_START); param[1] = FW_PARAM_PFVF(ISCSI_END); rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 2, param, val); @@ -4504,6 +4533,7 @@ cxgbe_sysctls(struct port_info *pi) struct sysctl_ctx_list *ctx; struct sysctl_oid *oid; struct sysctl_oid_list *children; + struct adapter *sc = pi->adapter; ctx = device_get_sysctl_ctx(pi->dev); @@ -4536,7 +4566,7 @@ cxgbe_sysctls(struct port_info *pi) "Reserve queue 0 for non-flowid packets"); #ifdef TCP_OFFLOAD - if (is_offload(pi->adapter)) { + if (is_offload(sc)) { SYSCTL_ADD_INT(ctx, children, OID_AUTO, "nofldrxq", CTLFLAG_RD, &pi->nofldrxq, 0, "# of rx queues for offloaded TCP connections"); @@ -4575,7 +4605,7 @@ cxgbe_sysctls(struct port_info *pi) #define SYSCTL_ADD_T4_REG64(pi, name, desc, reg) \ SYSCTL_ADD_OID(ctx, children, OID_AUTO, name, \ - CTLTYPE_U64 | CTLFLAG_RD, pi->adapter, reg, \ + CTLTYPE_U64 | CTLFLAG_RD, sc, reg, \ sysctl_handle_t4_reg64, "QU", desc) SYSCTL_ADD_T4_REG64(pi, "tx_octets", "# of octets in good frames", @@ -6164,6 +6194,11 @@ sysctl_tids(SYSCTL_HANDLER_ARGS) t->ftid_base + t->nftids - 1); } + if (t->netids) { + sbuf_printf(sb, "ETID range: %u-%u\n", t->etid_base, + t->etid_base + t->netids - 1); + } + sbuf_printf(sb, "HW TID usage: %u IP users, %u IPv6 users", t4_read_reg(sc, A_LE_DB_ACT_CNT_IPV4), t4_read_reg(sc, A_LE_DB_ACT_CNT_IPV6)); @@ -7195,14 +7230,17 @@ t4_filter_rpl(struct sge_iq *iq, const s struct adapter *sc = iq->adapter; const struct cpl_set_tcb_rpl *rpl = (const void *)(rss + 1); unsigned int idx = GET_TID(rpl); + unsigned int rc; + struct filter_entry *f; KASSERT(m == NULL, ("%s: payload with opcode %02x", __func__, rss->opcode)); - if (idx >= sc->tids.ftid_base && - (idx -= sc->tids.ftid_base) < sc->tids.nftids) { - unsigned int rc = G_COOKIE(rpl->cookie); - struct filter_entry *f = &sc->tids.ftid_tab[idx]; + if (is_ftid(sc, idx)) { + + idx -= sc->tids.ftid_base; + f = &sc->tids.ftid_tab[idx]; + rc = G_COOKIE(rpl->cookie); mtx_lock(&sc->tids.ftid_lock); if (rc == FW_FILTER_WR_FLT_ADDED) { Modified: stable/10/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_sge.c Tue May 6 06:49:39 2014 (r265425) +++ stable/10/sys/dev/cxgbe/t4_sge.c Tue May 6 07:21:50 2014 (r265426) @@ -2833,7 +2833,6 @@ alloc_wrq(struct adapter *sc, struct por SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "unstalled", CTLFLAG_RD, &wrq->eq.unstalled, 0, "# of times queue recovered after stall"); - return (rc); } Modified: stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Tue May 6 06:49:39 2014 (r265425) +++ stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Tue May 6 07:21:50 2014 (r265426) @@ -1299,18 +1299,18 @@ do_rx_data(struct sge_iq *iq, const stru #define V_CPL_FW4_ACK_OPCODE(x) ((x) << S_CPL_FW4_ACK_OPCODE) #define G_CPL_FW4_ACK_OPCODE(x) \ (((x) >> S_CPL_FW4_ACK_OPCODE) & M_CPL_FW4_ACK_OPCODE) - + #define S_CPL_FW4_ACK_FLOWID 0 #define M_CPL_FW4_ACK_FLOWID 0xffffff #define V_CPL_FW4_ACK_FLOWID(x) ((x) << S_CPL_FW4_ACK_FLOWID) #define G_CPL_FW4_ACK_FLOWID(x) \ (((x) >> S_CPL_FW4_ACK_FLOWID) & M_CPL_FW4_ACK_FLOWID) - + #define S_CPL_FW4_ACK_CR 24 #define M_CPL_FW4_ACK_CR 0xff #define V_CPL_FW4_ACK_CR(x) ((x) << S_CPL_FW4_ACK_CR) #define G_CPL_FW4_ACK_CR(x) (((x) >> S_CPL_FW4_ACK_CR) & M_CPL_FW4_ACK_CR) - + #define S_CPL_FW4_ACK_SEQVAL 0 #define M_CPL_FW4_ACK_SEQVAL 0x1 #define V_CPL_FW4_ACK_SEQVAL(x) ((x) << S_CPL_FW4_ACK_SEQVAL) @@ -1437,8 +1437,7 @@ do_set_tcb_rpl(struct sge_iq *iq, const ("%s: unexpected opcode 0x%x", __func__, opcode)); KASSERT(m == NULL, ("%s: wasn't expecting payload", __func__)); - if (tid >= sc->tids.ftid_base && - tid < sc->tids.ftid_base + sc->tids.nftids) + if (is_ftid(sc, tid)) return (t4_filter_rpl(iq, rss, m)); /* TCB is a filter */ CXGBE_UNIMPLEMENTED(__func__); From owner-svn-src-stable@FreeBSD.ORG Tue May 6 09:51:16 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35CE2834; Tue, 6 May 2014 09:51:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 232E5C6B; Tue, 6 May 2014 09:51:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s469pGZs013490; Tue, 6 May 2014 09:51:16 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s469pFoP013489; Tue, 6 May 2014 09:51:15 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405060951.s469pFoP013489@svn.freebsd.org> From: Alexander Motin Date: Tue, 6 May 2014 09:51:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265428 - stable/10/sys/dev/ahci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2014 09:51:16 -0000 Author: mav Date: Tue May 6 09:51:15 2014 New Revision: 265428 URL: http://svnweb.freebsd.org/changeset/base/265428 Log: MFC r260830: Add ID for one more ASMedia AHCI-compatible controller. Modified: stable/10/sys/dev/ahci/ahci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ahci/ahci.c ============================================================================== --- stable/10/sys/dev/ahci/ahci.c Tue May 6 09:12:32 2014 (r265427) +++ stable/10/sys/dev/ahci/ahci.c Tue May 6 09:51:15 2014 (r265428) @@ -146,6 +146,7 @@ static struct { {0x78021022, 0x00, "AMD Hudson-2", 0}, {0x78031022, 0x00, "AMD Hudson-2", 0}, {0x78041022, 0x00, "AMD Hudson-2", 0}, + {0x06111b21, 0x00, "ASMedia ASM2106", 0}, {0x06121b21, 0x00, "ASMedia ASM1061", 0}, {0x26528086, 0x00, "Intel ICH6", AHCI_Q_NOFORCE}, {0x26538086, 0x00, "Intel ICH6M", AHCI_Q_NOFORCE}, From owner-svn-src-stable@FreeBSD.ORG Tue May 6 09:52:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4FD4D994; Tue, 6 May 2014 09:52:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3CE8FC8F; Tue, 6 May 2014 09:52:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s469qcwt015440; Tue, 6 May 2014 09:52:38 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s469qc5a015439; Tue, 6 May 2014 09:52:38 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405060952.s469qc5a015439@svn.freebsd.org> From: Alexander Motin Date: Tue, 6 May 2014 09:52:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265429 - stable/9/sys/dev/ahci X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2014 09:52:38 -0000 Author: mav Date: Tue May 6 09:52:37 2014 New Revision: 265429 URL: http://svnweb.freebsd.org/changeset/base/265429 Log: MFC r260830: Add ID for one more ASMedia AHCI-compatible controller. Modified: stable/9/sys/dev/ahci/ahci.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ahci/ahci.c ============================================================================== --- stable/9/sys/dev/ahci/ahci.c Tue May 6 09:51:15 2014 (r265428) +++ stable/9/sys/dev/ahci/ahci.c Tue May 6 09:52:37 2014 (r265429) @@ -150,6 +150,7 @@ static struct { {0x78021022, 0x00, "AMD Hudson-2", 0}, {0x78031022, 0x00, "AMD Hudson-2", 0}, {0x78041022, 0x00, "AMD Hudson-2", 0}, + {0x06111b21, 0x00, "ASMedia ASM2106", 0}, {0x06121b21, 0x00, "ASMedia ASM1061", 0}, {0x26528086, 0x00, "Intel ICH6", AHCI_Q_NOFORCE}, {0x26538086, 0x00, "Intel ICH6M", AHCI_Q_NOFORCE}, From owner-svn-src-stable@FreeBSD.ORG Tue May 6 09:54:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 870F7AF1; Tue, 6 May 2014 09:54:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 743BECA6; Tue, 6 May 2014 09:54:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s469sPKd015811; Tue, 6 May 2014 09:54:25 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s469sPQb015810; Tue, 6 May 2014 09:54:25 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405060954.s469sPQb015810@svn.freebsd.org> From: Alexander Motin Date: Tue, 6 May 2014 09:54:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265430 - stable/10/sys/dev/ahci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2014 09:54:25 -0000 Author: mav Date: Tue May 6 09:54:24 2014 New Revision: 265430 URL: http://svnweb.freebsd.org/changeset/base/265430 Log: MFC r264610: Correct AMD chipsets identification. Modified: stable/10/sys/dev/ahci/ahci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ahci/ahci.c ============================================================================== --- stable/10/sys/dev/ahci/ahci.c Tue May 6 09:52:37 2014 (r265429) +++ stable/10/sys/dev/ahci/ahci.c Tue May 6 09:54:24 2014 (r265430) @@ -134,13 +134,13 @@ static struct { "\014ALTSIG" \ "\015NOMSI" } ahci_ids[] = { - {0x43801002, 0x00, "ATI IXP600", AHCI_Q_NOMSI}, - {0x43901002, 0x00, "ATI IXP700", 0}, - {0x43911002, 0x00, "ATI IXP700", 0}, - {0x43921002, 0x00, "ATI IXP700", 0}, - {0x43931002, 0x00, "ATI IXP700", 0}, - {0x43941002, 0x00, "ATI IXP800", 0}, - {0x43951002, 0x00, "ATI IXP800", 0}, + {0x43801002, 0x00, "AMD SB600", AHCI_Q_NOMSI}, + {0x43901002, 0x00, "AMD SB7x0/SB8x0/SB9x0", 0}, + {0x43911002, 0x00, "AMD SB7x0/SB8x0/SB9x0", 0}, + {0x43921002, 0x00, "AMD SB7x0/SB8x0/SB9x0", 0}, + {0x43931002, 0x00, "AMD SB7x0/SB8x0/SB9x0", 0}, + {0x43941002, 0x00, "AMD SB7x0/SB8x0/SB9x0", 0}, + {0x43951002, 0x00, "AMD SB8x0/SB9x0", 0}, {0x78001022, 0x00, "AMD Hudson-2", 0}, {0x78011022, 0x00, "AMD Hudson-2", 0}, {0x78021022, 0x00, "AMD Hudson-2", 0}, From owner-svn-src-stable@FreeBSD.ORG Tue May 6 09:55:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EA956D16; Tue, 6 May 2014 09:55:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7BC8CB6; Tue, 6 May 2014 09:55:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s469tn0k016208; Tue, 6 May 2014 09:55:49 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s469tn1p016207; Tue, 6 May 2014 09:55:49 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405060955.s469tn1p016207@svn.freebsd.org> From: Alexander Motin Date: Tue, 6 May 2014 09:55:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265431 - stable/9/sys/dev/ahci X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2014 09:55:50 -0000 Author: mav Date: Tue May 6 09:55:49 2014 New Revision: 265431 URL: http://svnweb.freebsd.org/changeset/base/265431 Log: MFC r264610: Correct AMD chipsets identification. Modified: stable/9/sys/dev/ahci/ahci.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ahci/ahci.c ============================================================================== --- stable/9/sys/dev/ahci/ahci.c Tue May 6 09:54:24 2014 (r265430) +++ stable/9/sys/dev/ahci/ahci.c Tue May 6 09:55:49 2014 (r265431) @@ -138,13 +138,13 @@ static struct { "\014ALTSIG" \ "\015NOMSI" } ahci_ids[] = { - {0x43801002, 0x00, "ATI IXP600", AHCI_Q_NOMSI}, - {0x43901002, 0x00, "ATI IXP700", 0}, - {0x43911002, 0x00, "ATI IXP700", 0}, - {0x43921002, 0x00, "ATI IXP700", 0}, - {0x43931002, 0x00, "ATI IXP700", 0}, - {0x43941002, 0x00, "ATI IXP800", 0}, - {0x43951002, 0x00, "ATI IXP800", 0}, + {0x43801002, 0x00, "AMD SB600", AHCI_Q_NOMSI}, + {0x43901002, 0x00, "AMD SB7x0/SB8x0/SB9x0", 0}, + {0x43911002, 0x00, "AMD SB7x0/SB8x0/SB9x0", 0}, + {0x43921002, 0x00, "AMD SB7x0/SB8x0/SB9x0", 0}, + {0x43931002, 0x00, "AMD SB7x0/SB8x0/SB9x0", 0}, + {0x43941002, 0x00, "AMD SB7x0/SB8x0/SB9x0", 0}, + {0x43951002, 0x00, "AMD SB8x0/SB9x0", 0}, {0x78001022, 0x00, "AMD Hudson-2", 0}, {0x78011022, 0x00, "AMD Hudson-2", 0}, {0x78021022, 0x00, "AMD Hudson-2", 0}, From owner-svn-src-stable@FreeBSD.ORG Tue May 6 12:15:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A633549; Tue, 6 May 2014 12:15:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB005169; Tue, 6 May 2014 12:15:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s46CF5pb079924; Tue, 6 May 2014 12:15:05 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s46CF59Z079918; Tue, 6 May 2014 12:15:05 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201405061215.s46CF59Z079918@svn.freebsd.org> From: Rick Macklem Date: Tue, 6 May 2014 12:15:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265434 - in stable/10/sys/fs: nfs nfsclient X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2014 12:15:06 -0000 Author: rmacklem Date: Tue May 6 12:15:05 2014 New Revision: 265434 URL: http://svnweb.freebsd.org/changeset/base/265434 Log: MFC: r264672 Modify the Lookup RPC for NFSv4 so that it acquires directory attributes. This allows the client to cache directory names when they are looked up, reducing the Lookup RPC count by about 40% for software builds. Modified: stable/10/sys/fs/nfs/nfs_commonsubs.c stable/10/sys/fs/nfsclient/nfs_clcomsubs.c stable/10/sys/fs/nfsclient/nfs_clrpcops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- stable/10/sys/fs/nfs/nfs_commonsubs.c Tue May 6 11:12:56 2014 (r265433) +++ stable/10/sys/fs/nfs/nfs_commonsubs.c Tue May 6 12:15:05 2014 (r265434) @@ -101,8 +101,8 @@ struct nfsv4_opflag nfsv4_opflag[NFSV41_ { 0, 1, 0, 0, LK_EXCLUSIVE, 1 }, /* Lock */ { 0, 1, 0, 0, LK_EXCLUSIVE, 1 }, /* LockT */ { 0, 1, 0, 0, LK_EXCLUSIVE, 1 }, /* LockU */ - { 1, 1, 0, 0, LK_EXCLUSIVE, 1 }, /* Lookup */ - { 1, 1, 0, 0, LK_EXCLUSIVE, 1 }, /* Lookupp */ + { 1, 2, 0, 0, LK_EXCLUSIVE, 1 }, /* Lookup */ + { 1, 2, 0, 0, LK_EXCLUSIVE, 1 }, /* Lookupp */ { 0, 1, 0, 0, LK_EXCLUSIVE, 1 }, /* NVerify */ { 1, 1, 0, 1, LK_EXCLUSIVE, 1 }, /* Open */ { 1, 1, 0, 0, LK_EXCLUSIVE, 1 }, /* OpenAttr */ Modified: stable/10/sys/fs/nfsclient/nfs_clcomsubs.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clcomsubs.c Tue May 6 11:12:56 2014 (r265433) +++ stable/10/sys/fs/nfsclient/nfs_clcomsubs.c Tue May 6 12:15:05 2014 (r265434) @@ -219,9 +219,18 @@ nfscl_reqstart(struct nfsrv_descript *nd procnum != NFSPROC_COMMITDS) { NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(NFSV4OP_GETATTR); - NFSWCCATTR_ATTRBIT(&attrbits); + /* + * For Lookup Ops, we want all the directory + * attributes, so we can load the name cache. + */ + if (procnum == NFSPROC_LOOKUP || + procnum == NFSPROC_LOOKUPP) + NFSGETATTR_ATTRBIT(&attrbits); + else { + NFSWCCATTR_ATTRBIT(&attrbits); + nd->nd_flag |= ND_V4WCCATTR; + } (void) nfsrv_putattrbit(nd, &attrbits); - nd->nd_flag |= ND_V4WCCATTR; } } if (procnum != NFSPROC_RENEW || Modified: stable/10/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clrpcops.c Tue May 6 11:12:56 2014 (r265433) +++ stable/10/sys/fs/nfsclient/nfs_clrpcops.c Tue May 6 12:15:05 2014 (r265434) @@ -1238,14 +1238,23 @@ nfsrpc_lookup(vnode_t dvp, char *name, i } if (nd->nd_flag & ND_NFSV3) error = nfscl_postop_attr(nd, dnap, dattrflagp, stuff); + else if ((nd->nd_flag & (ND_NFSV4 | ND_NOMOREDATA)) == + ND_NFSV4) { + /* Load the directory attributes. */ + error = nfsm_loadattr(nd, dnap); + if (error == 0) + *dattrflagp = 1; + } goto nfsmout; } if ((nd->nd_flag & (ND_NFSV4 | ND_NOMOREDATA)) == ND_NFSV4) { - NFSM_DISSECT(tl, u_int32_t *, 2 * NFSX_UNSIGNED); - if (*(tl + 1)) { - nd->nd_flag |= ND_NOMOREDATA; + /* Load the directory attributes. */ + error = nfsm_loadattr(nd, dnap); + if (error != 0) goto nfsmout; - } + *dattrflagp = 1; + /* Skip over the Lookup and GetFH operation status values. */ + NFSM_DISSECT(tl, u_int32_t *, 4 * NFSX_UNSIGNED); } error = nfsm_getfh(nd, nfhpp); if (error) @@ -2702,14 +2711,6 @@ nfsrpc_readdir(vnode_t vp, struct uio *u * Joy, oh joy. For V4 we get to hand craft '.' and '..'. */ if (uiop->uio_offset == 0) { -#if defined(__FreeBSD_version) && __FreeBSD_version >= 800000 - error = VOP_GETATTR(vp, &nfsva.na_vattr, cred); -#else - error = VOP_GETATTR(vp, &nfsva.na_vattr, cred, p); -#endif - if (error) - return (error); - dotfileid = nfsva.na_fileid; NFSCL_REQSTART(nd, NFSPROC_LOOKUPP, vp); NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED); *tl++ = txdr_unsigned(NFSV4OP_GETFH); @@ -2718,9 +2719,16 @@ nfsrpc_readdir(vnode_t vp, struct uio *u error = nfscl_request(nd, vp, p, cred, stuff); if (error) return (error); + dotfileid = 0; /* Fake out the compiler. */ + if ((nd->nd_flag & ND_NOMOREDATA) == 0) { + error = nfsm_loadattr(nd, &nfsva); + if (error != 0) + goto nfsmout; + dotfileid = nfsva.na_fileid; + } if (nd->nd_repstat == 0) { - NFSM_DISSECT(tl, u_int32_t *, 3*NFSX_UNSIGNED); - len = fxdr_unsigned(int, *(tl + 2)); + NFSM_DISSECT(tl, u_int32_t *, 5 * NFSX_UNSIGNED); + len = fxdr_unsigned(int, *(tl + 4)); if (len > 0 && len <= NFSX_V4FHMAX) error = nfsm_advance(nd, NFSM_RNDUP(len), -1); else @@ -3129,15 +3137,6 @@ nfsrpc_readdirplus(vnode_t vp, struct ui * Joy, oh joy. For V4 we get to hand craft '.' and '..'. */ if (uiop->uio_offset == 0) { -#if defined(__FreeBSD_version) && __FreeBSD_version >= 800000 - error = VOP_GETATTR(vp, &nfsva.na_vattr, cred); -#else - error = VOP_GETATTR(vp, &nfsva.na_vattr, cred, p); -#endif - if (error) - return (error); - dctime = nfsva.na_ctime; - dotfileid = nfsva.na_fileid; NFSCL_REQSTART(nd, NFSPROC_LOOKUPP, vp); NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED); *tl++ = txdr_unsigned(NFSV4OP_GETFH); @@ -3146,9 +3145,17 @@ nfsrpc_readdirplus(vnode_t vp, struct ui error = nfscl_request(nd, vp, p, cred, stuff); if (error) return (error); + dotfileid = 0; /* Fake out the compiler. */ + if ((nd->nd_flag & ND_NOMOREDATA) == 0) { + error = nfsm_loadattr(nd, &nfsva); + if (error != 0) + goto nfsmout; + dctime = nfsva.na_ctime; + dotfileid = nfsva.na_fileid; + } if (nd->nd_repstat == 0) { - NFSM_DISSECT(tl, u_int32_t *, 3*NFSX_UNSIGNED); - len = fxdr_unsigned(int, *(tl + 2)); + NFSM_DISSECT(tl, u_int32_t *, 5 * NFSX_UNSIGNED); + len = fxdr_unsigned(int, *(tl + 4)); if (len > 0 && len <= NFSX_V4FHMAX) error = nfsm_advance(nd, NFSM_RNDUP(len), -1); else From owner-svn-src-stable@FreeBSD.ORG Tue May 6 12:20:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7EB0982C; Tue, 6 May 2014 12:20:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6BD971B5; Tue, 6 May 2014 12:20:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s46CK8v8080690; Tue, 6 May 2014 12:20:08 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s46CK8bO080689; Tue, 6 May 2014 12:20:08 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201405061220.s46CK8bO080689@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 6 May 2014 12:20:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265435 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2014 12:20:08 -0000 Author: kib Date: Tue May 6 12:20:07 2014 New Revision: 265435 URL: http://svnweb.freebsd.org/changeset/base/265435 Log: MFC r265100: Fix the comparision for the end of range in vm_phys_fictitious_reg_range(). Modified: stable/10/sys/vm/vm_phys.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_phys.c ============================================================================== --- stable/10/sys/vm/vm_phys.c Tue May 6 12:15:05 2014 (r265434) +++ stable/10/sys/vm/vm_phys.c Tue May 6 12:20:07 2014 (r265435) @@ -552,7 +552,9 @@ vm_phys_fictitious_reg_range(vm_paddr_t #ifdef VM_PHYSSEG_DENSE pi = atop(start); - if (pi >= first_page && atop(end) < vm_page_array_size) { + if (pi >= first_page && pi < vm_page_array_size + first_page) { + if (atop(end) >= vm_page_array_size + first_page) + return (EINVAL); fp = &vm_page_array[pi - first_page]; malloced = FALSE; } else From owner-svn-src-stable@FreeBSD.ORG Tue May 6 12:31:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CAC5FB4A; Tue, 6 May 2014 12:31:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B83F83CC; Tue, 6 May 2014 12:31:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s46CVPMJ088185; Tue, 6 May 2014 12:31:25 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s46CVPHZ088184; Tue, 6 May 2014 12:31:25 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201405061231.s46CVPHZ088184@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 6 May 2014 12:31:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265437 - stable/10/sys/dev/drm2/i915 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2014 12:31:25 -0000 Author: kib Date: Tue May 6 12:31:25 2014 New Revision: 265437 URL: http://svnweb.freebsd.org/changeset/base/265437 Log: MFC r265102: Fix two cases of recursive acquisitions of the vm object lock, only possible in rare failure situations. Modified: stable/10/sys/dev/drm2/i915/i915_gem.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/drm2/i915/i915_gem.c ============================================================================== --- stable/10/sys/dev/drm2/i915/i915_gem.c Tue May 6 12:31:17 2014 (r265436) +++ stable/10/sys/dev/drm2/i915/i915_gem.c Tue May 6 12:31:25 2014 (r265437) @@ -1431,6 +1431,7 @@ retry: m = vm_phys_fictitious_to_vm_page(dev->agp->base + obj->gtt_offset + offset); if (m == NULL) { + VM_OBJECT_WUNLOCK(vm_obj); cause = 60; ret = -EFAULT; goto unlock; @@ -1450,7 +1451,6 @@ retry: DRM_UNLOCK(dev); VM_OBJECT_WUNLOCK(vm_obj); VM_WAIT; - VM_OBJECT_WLOCK(vm_obj); goto retry; } m->valid = VM_PAGE_BITS_ALL; From owner-svn-src-stable@FreeBSD.ORG Tue May 6 12:35:20 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 138AAFF4; Tue, 6 May 2014 12:35:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0077C606; Tue, 6 May 2014 12:35:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s46CZJJX089187; Tue, 6 May 2014 12:35:19 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s46CZJ9a089186; Tue, 6 May 2014 12:35:19 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201405061235.s46CZJ9a089186@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 6 May 2014 12:35:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265438 - stable/9/sys/vm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2014 12:35:20 -0000 Author: kib Date: Tue May 6 12:35:19 2014 New Revision: 265438 URL: http://svnweb.freebsd.org/changeset/base/265438 Log: MFC r265100: Fix the comparision for the end of range in vm_phys_fictitious_reg_range(). Modified: stable/9/sys/vm/vm_phys.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/vm_phys.c ============================================================================== --- stable/9/sys/vm/vm_phys.c Tue May 6 12:31:25 2014 (r265437) +++ stable/9/sys/vm/vm_phys.c Tue May 6 12:35:19 2014 (r265438) @@ -600,7 +600,9 @@ vm_phys_fictitious_reg_range(vm_paddr_t #ifdef VM_PHYSSEG_DENSE pi = atop(start); - if (pi >= first_page && atop(end) < vm_page_array_size) { + if (pi >= first_page && pi < vm_page_array_size + first_page) { + if (atop(end) >= vm_page_array_size + first_page) + return (EINVAL); fp = &vm_page_array[pi - first_page]; malloced = FALSE; } else From owner-svn-src-stable@FreeBSD.ORG Tue May 6 12:39:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 375F334C; Tue, 6 May 2014 12:39:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 245F864B; Tue, 6 May 2014 12:39:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s46CdOA0089762; Tue, 6 May 2014 12:39:24 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s46CdOBu089761; Tue, 6 May 2014 12:39:24 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201405061239.s46CdOBu089761@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 6 May 2014 12:39:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265439 - stable/9/sys/dev/drm2/i915 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2014 12:39:24 -0000 Author: kib Date: Tue May 6 12:39:23 2014 New Revision: 265439 URL: http://svnweb.freebsd.org/changeset/base/265439 Log: MFC r265102: Fix one cases of recursive acquisitions of the vm object lock, only possible in rare failure situations. The second part of r265102 is not applicable to stable/9 since vm_page_insert() cannot fail there. Modified: stable/9/sys/dev/drm2/i915/i915_gem.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/drm2/i915/i915_gem.c ============================================================================== --- stable/9/sys/dev/drm2/i915/i915_gem.c Tue May 6 12:35:19 2014 (r265438) +++ stable/9/sys/dev/drm2/i915/i915_gem.c Tue May 6 12:39:23 2014 (r265439) @@ -1427,6 +1427,7 @@ unlocked_vmobj: m = vm_phys_fictitious_to_vm_page(dev->agp->base + obj->gtt_offset + offset); if (m == NULL) { + VM_OBJECT_UNLOCK(vm_obj); cause = 60; ret = -EFAULT; goto unlock; From owner-svn-src-stable@FreeBSD.ORG Tue May 6 14:38:04 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F0EA5C7; Tue, 6 May 2014 14:38:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6BD369EF; Tue, 6 May 2014 14:38:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s46Ec45N047434; Tue, 6 May 2014 14:38:04 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s46Ec4O5047433; Tue, 6 May 2014 14:38:04 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201405061438.s46Ec4O5047433@svn.freebsd.org> From: Brooks Davis Date: Tue, 6 May 2014 14:38:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265449 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2014 14:38:04 -0000 Author: brooks Date: Tue May 6 14:38:03 2014 New Revision: 265449 URL: http://svnweb.freebsd.org/changeset/base/265449 Log: MFC r265097: Merge from CheriBSD: commit 1d1b908107255ffdff4d17f015d8f057d73cc6cb Author: Brooks Davis Date: Fri Mar 28 16:24:45 2014 +0000 Add a long needed seatbelt. Exit with an error when make is called without a target at the top level rather than poluting the source tree and causing use confusion in future builds. commit a9d9aa341b2f4308a227ab460ba85f1f287ad028 Author: Brooks Davis Date: Tue Apr 29 16:06:12 2014 +0000 Simplify seatbelt added in 1d1b908 based in feedback. Discussed with: imp@FreeBSD.org Reviewed by: imp Sponsored by: DARPA, AFRL Modified: stable/10/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile ============================================================================== --- stable/10/Makefile Tue May 6 14:33:18 2014 (r265448) +++ stable/10/Makefile Tue May 6 14:38:03 2014 (r265449) @@ -252,8 +252,17 @@ tinderbox toolchains kernel-toolchains: ${TGTS}: ${_+_}@cd ${.CURDIR}; ${_MAKE} ${.TARGET} -# Set a reasonable default -.MAIN: all +# The historic default "all" target creates files which may cause stale +# or (in the cross build case) unlinkable results. Fail with an error +# when no target is given. The users can explicitly specify "all" +# if they want the historic behavior. +.MAIN: _guard + +_guard: + @echo + @echo "Explicit target required (use \"all\" for historic behavior)" + @echo + @false STARTTIME!= LC_ALL=C date CHECK_TIME!= find ${.CURDIR}/sys/sys/param.h -mtime -0s ; echo From owner-svn-src-stable@FreeBSD.ORG Tue May 6 15:38:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A88A26E; Tue, 6 May 2014 15:38:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 677ACF42; Tue, 6 May 2014 15:38:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s46Fcj6V076702; Tue, 6 May 2014 15:38:45 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s46Fcjbj076701; Tue, 6 May 2014 15:38:45 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201405061538.s46Fcjbj076701@svn.freebsd.org> From: Brooks Davis Date: Tue, 6 May 2014 15:38:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265450 - stable/9 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2014 15:38:45 -0000 Author: brooks Date: Tue May 6 15:38:44 2014 New Revision: 265450 URL: http://svnweb.freebsd.org/changeset/base/265450 Log: MFC: r265097 Merge from CheriBSD: commit 1d1b908107255ffdff4d17f015d8f057d73cc6cb Author: Brooks Davis Date: Fri Mar 28 16:24:45 2014 +0000 Add a long needed seatbelt. Exit with an error when make is called without a target at the top level rather than poluting the source tree and causing use confusion in future builds. commit a9d9aa341b2f4308a227ab460ba85f1f287ad028 Author: Brooks Davis Date: Tue Apr 29 16:06:12 2014 +0000 Simplify seatbelt added in 1d1b908 based in feedback. Discussed with: imp@FreeBSD.org Reviewed by: imp Sponsored by: DARPA, AFRL Modified: stable/9/Makefile (contents, props changed) Directory Properties: stable/9/ (props changed) Modified: stable/9/Makefile ============================================================================== --- stable/9/Makefile Tue May 6 14:38:03 2014 (r265449) +++ stable/9/Makefile Tue May 6 15:38:44 2014 (r265450) @@ -222,8 +222,17 @@ cleanworld: ${TGTS}: ${_+_}@cd ${.CURDIR}; ${_MAKE} ${.TARGET} -# Set a reasonable default -.MAIN: all +# The historic default "all" target creates files which may cause stale +# or (in the cross build case) unlinkable results. Fail with an error +# when no target is given. The users can explicitly specify "all" +# if they want the historic behavior. +.MAIN: _guard + +_guard: + @echo + @echo "Explicit target required (use \"all\" for historic behavior)" + @echo + @false STARTTIME!= LC_ALL=C date CHECK_TIME!= find ${.CURDIR}/sys/sys/param.h -mtime -0s ; echo From owner-svn-src-stable@FreeBSD.ORG Tue May 6 19:18:21 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 64EE789C; Tue, 6 May 2014 19:18:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50C40900; Tue, 6 May 2014 19:18:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s46JILY8081902; Tue, 6 May 2014 19:18:21 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s46JILaX081901; Tue, 6 May 2014 19:18:21 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201405061918.s46JILaX081901@svn.freebsd.org> From: Navdeep Parhar Date: Tue, 6 May 2014 19:18:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265459 - stable/9/sys/dev/cxgbe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2014 19:18:21 -0000 Author: np Date: Tue May 6 19:18:20 2014 New Revision: 265459 URL: http://svnweb.freebsd.org/changeset/base/265459 Log: r253688: Reserve room for ioctls that aren't in this copy of the driver yet. Modified: stable/9/sys/dev/cxgbe/t4_ioctl.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgbe/t4_ioctl.h ============================================================================== --- stable/9/sys/dev/cxgbe/t4_ioctl.h Tue May 6 19:03:04 2014 (r265458) +++ stable/9/sys/dev/cxgbe/t4_ioctl.h Tue May 6 19:18:20 2014 (r265459) @@ -51,6 +51,9 @@ enum { T4_GET_MEM, /* read memory */ T4_GET_I2C, /* read from i2c addressible device */ T4_CLEAR_STATS, /* clear a port's MAC statistics */ + T4_SET_OFLD_POLICY, /* Set offload policy */ + T4_SET_SCHED_CLASS, /* set sched class */ + T4_SET_SCHED_QUEUE, /* set queue class */ }; struct t4_reg { From owner-svn-src-stable@FreeBSD.ORG Tue May 6 21:47:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 68B3A2FF; Tue, 6 May 2014 21:47:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54F5F939; Tue, 6 May 2014 21:47:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s46Llijn050997; Tue, 6 May 2014 21:47:44 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s46LlhF0050994; Tue, 6 May 2014 21:47:43 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201405062147.s46LlhF0050994@svn.freebsd.org> From: Rick Macklem Date: Tue, 6 May 2014 21:47:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265466 - stable/10/sys/fs/nfsclient X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2014 21:47:44 -0000 Author: rmacklem Date: Tue May 6 21:47:43 2014 New Revision: 265466 URL: http://svnweb.freebsd.org/changeset/base/265466 Log: MFC: r264681 Modify the NFSv4 client open/create RPC so that it acquires post-open/create directory attributes. This allows the RPC to name cache the newly created file and reduces the lookup RPC count by about 10% for software builds. Modified: stable/10/sys/fs/nfsclient/nfs_clcomsubs.c stable/10/sys/fs/nfsclient/nfs_clrpcops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsclient/nfs_clcomsubs.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clcomsubs.c Tue May 6 21:34:01 2014 (r265465) +++ stable/10/sys/fs/nfsclient/nfs_clcomsubs.c Tue May 6 21:47:43 2014 (r265466) @@ -66,7 +66,7 @@ static struct { { NFSV4OP_READLINK, 2, "Readlink", 8, }, { NFSV4OP_READ, 1, "Read", 4, }, { NFSV4OP_WRITE, 2, "Write", 5, }, - { NFSV4OP_OPEN, 3, "Open", 4, }, + { NFSV4OP_OPEN, 5, "Open", 4, }, { NFSV4OP_CREATE, 3, "Create", 6, }, { NFSV4OP_CREATE, 1, "Create", 6, }, { NFSV4OP_CREATE, 3, "Create", 6, }, Modified: stable/10/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clrpcops.c Tue May 6 21:34:01 2014 (r265465) +++ stable/10/sys/fs/nfsclient/nfs_clrpcops.c Tue May 6 21:47:43 2014 (r265466) @@ -1956,6 +1956,7 @@ nfsrpc_createv4(vnode_t dvp, char *name, struct nfsmount *nmp; nmp = VFSTONFS(dvp->v_mount); + np = VTONFS(dvp); *unlockedp = 0; *nfhpp = NULL; *dpp = NULL; @@ -2005,17 +2006,22 @@ nfsrpc_createv4(vnode_t dvp, char *name, NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(NFSV4OPEN_CLAIMNULL); (void) nfsm_strtom(nd, name, namelen); + /* Get the new file's handle and attributes. */ NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED); *tl++ = txdr_unsigned(NFSV4OP_GETFH); *tl = txdr_unsigned(NFSV4OP_GETATTR); NFSGETATTR_ATTRBIT(&attrbits); (void) nfsrv_putattrbit(nd, &attrbits); + /* Get the directory's post-op attributes. */ + NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); + *tl = txdr_unsigned(NFSV4OP_PUTFH); + (void) nfsm_fhtom(nd, np->n_fhp->nfh_fh, np->n_fhp->nfh_len, 0); + NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); + *tl = txdr_unsigned(NFSV4OP_GETATTR); + (void) nfsrv_putattrbit(nd, &attrbits); error = nfscl_request(nd, dvp, p, cred, dstuff); if (error) return (error); - error = nfscl_wcc_data(nd, dvp, dnap, dattrflagp, NULL, dstuff); - if (error) - goto nfsmout; NFSCL_INCRSEQID(owp->nfsow_seqid, nd); if (nd->nd_repstat == 0) { NFSM_DISSECT(tl, u_int32_t *, NFSX_STATEID + @@ -2087,6 +2093,13 @@ nfsrpc_createv4(vnode_t dvp, char *name, error = nfscl_mtofh(nd, nfhpp, nnap, attrflagp); if (error) goto nfsmout; + /* Get rid of the PutFH and Getattr status values. */ + NFSM_DISSECT(tl, u_int32_t *, 4 * NFSX_UNSIGNED); + /* Load the directory attributes. */ + error = nfsm_loadattr(nd, dnap); + if (error) + goto nfsmout; + *dattrflagp = 1; if (dp != NULL && *attrflagp) { dp->nfsdl_change = nnap->na_filerev; dp->nfsdl_modtime = nnap->na_mtime; @@ -2130,7 +2143,6 @@ nfsrpc_createv4(vnode_t dvp, char *name, if ((rflags & NFSV4OPEN_RESULTCONFIRM) && (owp->nfsow_clp->nfsc_flags & NFSCLFLAGS_GOTDELEG) && !error && dp == NULL) { - np = VTONFS(dvp); do { ret = nfsrpc_openrpc(VFSTONFS(vnode_mount(dvp)), dvp, np->n_fhp->nfh_fh, np->n_fhp->nfh_len, From owner-svn-src-stable@FreeBSD.ORG Tue May 6 21:54:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20F2273B; Tue, 6 May 2014 21:54:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E89D19F9; Tue, 6 May 2014 21:54:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s46LsqMe054938; Tue, 6 May 2014 21:54:52 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s46LsqeF054935; Tue, 6 May 2014 21:54:52 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201405062154.s46LsqeF054935@svn.freebsd.org> From: Rick Macklem Date: Tue, 6 May 2014 21:54:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265469 - stable/10/sys/fs/nfsclient X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2014 21:54:53 -0000 Author: rmacklem Date: Tue May 6 21:54:52 2014 New Revision: 265469 URL: http://svnweb.freebsd.org/changeset/base/265469 Log: MFC: r264705, r264749 Modify the NFSv4 client create/mkdir RPC so that it acquires post-create/mkdir directory attributes. This allows the RPC to name cache the newly created directory and reduces the lookup RPC count for applications creating a lot of directories. Modified: stable/10/sys/fs/nfsclient/nfs_clcomsubs.c stable/10/sys/fs/nfsclient/nfs_clrpcops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsclient/nfs_clcomsubs.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clcomsubs.c Tue May 6 21:54:05 2014 (r265468) +++ stable/10/sys/fs/nfsclient/nfs_clcomsubs.c Tue May 6 21:54:52 2014 (r265469) @@ -67,7 +67,7 @@ static struct { { NFSV4OP_READ, 1, "Read", 4, }, { NFSV4OP_WRITE, 2, "Write", 5, }, { NFSV4OP_OPEN, 5, "Open", 4, }, - { NFSV4OP_CREATE, 3, "Create", 6, }, + { NFSV4OP_CREATE, 5, "Create", 6, }, { NFSV4OP_CREATE, 1, "Create", 6, }, { NFSV4OP_CREATE, 3, "Create", 6, }, { NFSV4OP_REMOVE, 1, "Remove", 6, }, Modified: stable/10/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clrpcops.c Tue May 6 21:54:05 2014 (r265468) +++ stable/10/sys/fs/nfsclient/nfs_clrpcops.c Tue May 6 21:54:52 2014 (r265469) @@ -2545,10 +2545,12 @@ nfsrpc_mkdir(vnode_t dvp, char *name, in struct nfsrv_descript nfsd, *nd = &nfsd; nfsattrbit_t attrbits; int error = 0; + struct nfsfh *fhp; *nfhpp = NULL; *attrflagp = 0; *dattrflagp = 0; + fhp = VTONFS(dvp)->n_fhp; if (namelen > NFS_MAXNAMLEN) return (ENAMETOOLONG); NFSCL_REQSTART(nd, NFSPROC_MKDIR, dvp); @@ -2564,6 +2566,12 @@ nfsrpc_mkdir(vnode_t dvp, char *name, in *tl++ = txdr_unsigned(NFSV4OP_GETFH); *tl = txdr_unsigned(NFSV4OP_GETATTR); (void) nfsrv_putattrbit(nd, &attrbits); + NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); + *tl = txdr_unsigned(NFSV4OP_PUTFH); + (void) nfsm_fhtom(nd, fhp->nfh_fh, fhp->nfh_len, 0); + NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); + *tl = txdr_unsigned(NFSV4OP_GETATTR); + (void) nfsrv_putattrbit(nd, &attrbits); } error = nfscl_request(nd, dvp, p, cred, dstuff); if (error) @@ -2577,6 +2585,14 @@ nfsrpc_mkdir(vnode_t dvp, char *name, in } if (!error) error = nfscl_mtofh(nd, nfhpp, nnap, attrflagp); + if (error == 0 && (nd->nd_flag & ND_NFSV4) != 0) { + /* Get rid of the PutFH and Getattr status values. */ + NFSM_DISSECT(tl, u_int32_t *, 4 * NFSX_UNSIGNED); + /* Load the directory attributes. */ + error = nfsm_loadattr(nd, dnap); + if (error == 0) + *dattrflagp = 1; + } } if ((nd->nd_flag & ND_NFSV3) && !error) error = nfscl_wcc_data(nd, dvp, dnap, dattrflagp, NULL, dstuff); From owner-svn-src-stable@FreeBSD.ORG Tue May 6 21:59:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 729438B0; Tue, 6 May 2014 21:59:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F468A20; Tue, 6 May 2014 21:59:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s46Lxnxl055689; Tue, 6 May 2014 21:59:49 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s46LxnMY055688; Tue, 6 May 2014 21:59:49 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201405062159.s46LxnMY055688@svn.freebsd.org> From: Rick Macklem Date: Tue, 6 May 2014 21:59:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265470 - stable/10/sys/fs/nfsclient X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2014 21:59:49 -0000 Author: rmacklem Date: Tue May 6 21:59:48 2014 New Revision: 265470 URL: http://svnweb.freebsd.org/changeset/base/265470 Log: MFC: r264738 For an NFSv4 mount with the "nocto" option, don't get the up to date file attributes upon close. This reduces the Getattr RPC count by about 65% for software builds. Modified: stable/10/sys/fs/nfsclient/nfs_clvnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clvnops.c Tue May 6 21:54:52 2014 (r265469) +++ stable/10/sys/fs/nfsclient/nfs_clvnops.c Tue May 6 21:59:48 2014 (r265470) @@ -768,7 +768,9 @@ nfs_close(struct vop_close_args *ap) /* * Get attributes so "change" is up to date. */ - if (error == 0 && nfscl_mustflush(vp) != 0) { + if (error == 0 && nfscl_mustflush(vp) != 0 && + vp->v_type == VREG && + (VFSTONFS(vp->v_mount)->nm_flag & NFSMNT_NOCTO) == 0) { ret = nfsrpc_getattr(vp, cred, ap->a_td, &nfsva, NULL); if (!ret) { From owner-svn-src-stable@FreeBSD.ORG Tue May 6 22:04:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E092FA5D; Tue, 6 May 2014 22:04:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD68BAB2; Tue, 6 May 2014 22:04:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s46M4oTk059767; Tue, 6 May 2014 22:04:50 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s46M4omF059766; Tue, 6 May 2014 22:04:50 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201405062204.s46M4omF059766@svn.freebsd.org> From: Rick Macklem Date: Tue, 6 May 2014 22:04:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265471 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2014 22:04:51 -0000 Author: rmacklem Date: Tue May 6 22:04:50 2014 New Revision: 265471 URL: http://svnweb.freebsd.org/changeset/base/265471 Log: MFC: r264739 Add {} braces so that the code conforms to the indentation. Fortunately, I don't think doing the assignment of cap->tsomax unconditionally causes any problem. Modified: stable/10/sys/netinet/tcp_subr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/tcp_subr.c ============================================================================== --- stable/10/sys/netinet/tcp_subr.c Tue May 6 21:59:48 2014 (r265470) +++ stable/10/sys/netinet/tcp_subr.c Tue May 6 22:04:50 2014 (r265471) @@ -1805,9 +1805,10 @@ tcp_maxmtu(struct in_conninfo *inc, stru /* Report additional interface capabilities. */ if (cap != NULL) { if (ifp->if_capenable & IFCAP_TSO4 && - ifp->if_hwassist & CSUM_TSO) + ifp->if_hwassist & CSUM_TSO) { cap->ifcap |= CSUM_TSO; cap->tsomax = ifp->if_hw_tsomax; + } } RTFREE(sro.ro_rt); } @@ -1843,9 +1844,10 @@ tcp_maxmtu6(struct in_conninfo *inc, str /* Report additional interface capabilities. */ if (cap != NULL) { if (ifp->if_capenable & IFCAP_TSO6 && - ifp->if_hwassist & CSUM_TSO) + ifp->if_hwassist & CSUM_TSO) { cap->ifcap |= CSUM_TSO; cap->tsomax = ifp->if_hw_tsomax; + } } RTFREE(sro6.ro_rt); } From owner-svn-src-stable@FreeBSD.ORG Tue May 6 23:28:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B6607E7F; Tue, 6 May 2014 23:28:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2FC912D; Tue, 6 May 2014 23:28:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s46NSmCA096454; Tue, 6 May 2014 23:28:48 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s46NSmEV096453; Tue, 6 May 2014 23:28:48 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201405062328.s46NSmEV096453@svn.freebsd.org> From: Ed Maste Date: Tue, 6 May 2014 23:28:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265475 - stable/10/share/man/man9 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2014 23:28:48 -0000 Author: emaste Date: Tue May 6 23:28:48 2014 New Revision: 265475 URL: http://svnweb.freebsd.org/changeset/base/265475 Log: MFC r261908 by ian: Fix a typo, C_ALSOLUTE -> C_ABSOLUTE. Modified: stable/10/share/man/man9/timeout.9 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man9/timeout.9 ============================================================================== --- stable/10/share/man/man9/timeout.9 Tue May 6 23:28:37 2014 (r265474) +++ stable/10/share/man/man9/timeout.9 Tue May 6 23:28:48 2014 (r265475) @@ -357,7 +357,7 @@ The following .Fa flags may be specified: .Bl -tag -width ".Dv C_DIRECT_EXEC" -.It Dv C_ALSOLUTE +.It Dv C_ABSOLUTE Handle the .Fa sbt argument as absolute time of the event since boot, or relative time otherwise. From owner-svn-src-stable@FreeBSD.ORG Wed May 7 00:32:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 12D0F9D0; Wed, 7 May 2014 00:32:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F37508A6; Wed, 7 May 2014 00:32:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s470Wn9E028286; Wed, 7 May 2014 00:32:49 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s470WnHg028284; Wed, 7 May 2014 00:32:49 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201405070032.s470WnHg028284@svn.freebsd.org> From: Alan Cox Date: Wed, 7 May 2014 00:32:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265476 - in stable/10/sys: amd64/amd64 i386/i386 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 00:32:50 -0000 Author: alc Date: Wed May 7 00:32:49 2014 New Revision: 265476 URL: http://svnweb.freebsd.org/changeset/base/265476 Log: MFC r262338 When the kernel is running in a virtual machine, it cannot rely upon the processor family to determine if the workaround for AMD Family 10h Erratum 383 should be enabled. To enable virtual machine migration among a heterogeneous collection of physical machines, the hypervisor may have been configured to report an older processor family with a reduced feature set. Effectively, the reported processor family and its features are like a "least common denominator" for the collection of machines. Therefore, when the kernel is running in a virtual machine, instead of relying upon the processor family, we now test for features that prove that the underlying processor is not affected by the erratum. (The features that we test for are unlikely to ever be emulated in software on an affected physical processor.) PR: 186061 Modified: stable/10/sys/amd64/amd64/pmap.c stable/10/sys/i386/i386/pmap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/pmap.c ============================================================================== --- stable/10/sys/amd64/amd64/pmap.c Tue May 6 23:28:48 2014 (r265475) +++ stable/10/sys/amd64/amd64/pmap.c Wed May 7 00:32:49 2014 (r265476) @@ -1008,12 +1008,18 @@ pmap_init(void) } /* - * If the kernel is running in a virtual machine on an AMD Family 10h - * processor, then it must assume that MCA is enabled by the virtual - * machine monitor. - */ - if (vm_guest == VM_GUEST_VM && cpu_vendor_id == CPU_VENDOR_AMD && - CPUID_TO_FAMILY(cpu_id) == 0x10) + * If the kernel is running on a virtual machine, then it must assume + * that MCA is enabled by the hypervisor. Moreover, the kernel must + * be prepared for the hypervisor changing the vendor and family that + * are reported by CPUID. Consequently, the workaround for AMD Family + * 10h Erratum 383 is enabled if the processor's feature set does not + * include at least one feature that is only supported by older Intel + * or newer AMD processors. + */ + if (vm_guest == VM_GUEST_VM && (cpu_feature & CPUID_SS) == 0 && + (cpu_feature2 & (CPUID2_SSSE3 | CPUID2_SSE41 | CPUID2_AESNI | + CPUID2_AVX | CPUID2_XSAVE)) == 0 && (amd_feature2 & (AMDID2_XOP | + AMDID2_FMA4)) == 0) workaround_erratum383 = 1; /* Modified: stable/10/sys/i386/i386/pmap.c ============================================================================== --- stable/10/sys/i386/i386/pmap.c Tue May 6 23:28:48 2014 (r265475) +++ stable/10/sys/i386/i386/pmap.c Wed May 7 00:32:49 2014 (r265476) @@ -752,12 +752,18 @@ pmap_init(void) pv_entry_high_water = 9 * (pv_entry_max / 10); /* - * If the kernel is running in a virtual machine on an AMD Family 10h - * processor, then it must assume that MCA is enabled by the virtual - * machine monitor. - */ - if (vm_guest == VM_GUEST_VM && cpu_vendor_id == CPU_VENDOR_AMD && - CPUID_TO_FAMILY(cpu_id) == 0x10) + * If the kernel is running on a virtual machine, then it must assume + * that MCA is enabled by the hypervisor. Moreover, the kernel must + * be prepared for the hypervisor changing the vendor and family that + * are reported by CPUID. Consequently, the workaround for AMD Family + * 10h Erratum 383 is enabled if the processor's feature set does not + * include at least one feature that is only supported by older Intel + * or newer AMD processors. + */ + if (vm_guest == VM_GUEST_VM && (cpu_feature & CPUID_SS) == 0 && + (cpu_feature2 & (CPUID2_SSSE3 | CPUID2_SSE41 | CPUID2_AESNI | + CPUID2_AVX | CPUID2_XSAVE)) == 0 && (amd_feature2 & (AMDID2_XOP | + AMDID2_FMA4)) == 0) workaround_erratum383 = 1; /* From owner-svn-src-stable@FreeBSD.ORG Wed May 7 02:13:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0EF1A56; Wed, 7 May 2014 02:13:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CEF5FD0; Wed, 7 May 2014 02:13:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s472DunL073505; Wed, 7 May 2014 02:13:56 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s472Dtip073500; Wed, 7 May 2014 02:13:55 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201405070213.s472Dtip073500@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 7 May 2014 02:13:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265478 - stable/9/sys/dev/cxgbe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 02:13:56 -0000 Author: np Date: Wed May 7 02:13:55 2014 New Revision: 265478 URL: http://svnweb.freebsd.org/changeset/base/265478 Log: MFC r253701, r253829, r253873, r253889, r253890, r254577, r254727, and r254933. r253701: Display a string instead of a numeric code in the linkdnrc sysctl. r253829: Display SGE tunables in the sysctl tree. dev.t5nex.0.fl_pktshift: payload DMA offset in rx buffer (bytes) dev.t5nex.0.fl_pad: payload pad boundary (bytes) dev.t5nex.0.spg_len: status page size (bytes) dev.t5nex.0.cong_drop: congestion drop setting r253873: Set up congestion manager context properly for T5 based cards. r253889: Fix previous commit (r253873). "cong" has one bit per channel but the congestion channel map has 1 nibble per channel. So bits wxyz need to be blown up into 000w000x000y000z. r253890: Display temperature sensor data. Shows -1 if sensor not available on the card. # sysctl dev.t4nex.0.temperature # sysctl dev.t5nex.0.temperature r254577: Display P/N information in the description. r254727: There is no need to hold the freelist lock around alloc/free of software descriptors. This also silences WITNESS warnings when the software descriptors are allocated with M_WAITOK. r254933: Use correct mailbox and PCIe PF number when querying RDMA parameters. Modified: stable/9/sys/dev/cxgbe/adapter.h stable/9/sys/dev/cxgbe/t4_main.c stable/9/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/9/sys/dev/cxgbe/adapter.h Wed May 7 00:51:24 2014 (r265477) +++ stable/9/sys/dev/cxgbe/adapter.h Wed May 7 02:13:55 2014 (r265478) @@ -792,6 +792,8 @@ void t4_init_sge_cpl_handlers(struct ada void t4_tweak_chip_settings(struct adapter *); int t4_read_chip_settings(struct adapter *); int t4_create_dma_tag(struct adapter *); +void t4_sge_sysctls(struct adapter *, struct sysctl_ctx_list *, + struct sysctl_oid_list *); int t4_destroy_dma_tag(struct adapter *); int t4_setup_adapter_queues(struct adapter *); int t4_teardown_adapter_queues(struct adapter *); Modified: stable/9/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_main.c Wed May 7 00:51:24 2014 (r265477) +++ stable/9/sys/dev/cxgbe/t4_main.c Wed May 7 02:13:55 2014 (r265478) @@ -379,6 +379,7 @@ static int sysctl_holdoff_pktc_idx(SYSCT static int sysctl_qsize_rxq(SYSCTL_HANDLER_ARGS); static int sysctl_qsize_txq(SYSCTL_HANDLER_ARGS); static int sysctl_handle_t4_reg64(SYSCTL_HANDLER_ARGS); +static int sysctl_temperature(SYSCTL_HANDLER_ARGS); #ifdef SBUF_DRAIN static int sysctl_cctrl(SYSCTL_HANDLER_ARGS); static int sysctl_cim_ibq_obq(SYSCTL_HANDLER_ARGS); @@ -392,6 +393,7 @@ static int sysctl_devlog(SYSCTL_HANDLER_ static int sysctl_fcoe_stats(SYSCTL_HANDLER_ARGS); static int sysctl_hw_sched(SYSCTL_HANDLER_ARGS); static int sysctl_lb_stats(SYSCTL_HANDLER_ARGS); +static int sysctl_linkdnrc(SYSCTL_HANDLER_ARGS); static int sysctl_meminfo(SYSCTL_HANDLER_ARGS); static int sysctl_mps_tcam(SYSCTL_HANDLER_ARGS); static int sysctl_path_mtus(SYSCTL_HANDLER_ARGS); @@ -2474,7 +2476,7 @@ get_params__post_init(struct adapter *sc param[3] = FW_PARAM_PFVF(CQ_END); param[4] = FW_PARAM_PFVF(OCQ_START); param[5] = FW_PARAM_PFVF(OCQ_END); - rc = -t4_query_params(sc, 0, 0, 0, 6, param, val); + rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 6, param, val); if (rc != 0) { device_printf(sc->dev, "failed to query RDMA parameters(2): %d.\n", rc); @@ -2531,9 +2533,9 @@ t4_set_desc(struct adapter *sc) char buf[128]; struct adapter_params *p = &sc->params; - snprintf(buf, sizeof(buf), "Chelsio %s %sNIC (rev %d), S/N:%s, E/C:%s", - p->vpd.id, is_offload(sc) ? "R" : "", chip_rev(sc), p->vpd.sn, - p->vpd.ec); + snprintf(buf, sizeof(buf), "Chelsio %s %sNIC (rev %d), S/N:%s, " + "P/N:%s, E/C:%s", p->vpd.id, is_offload(sc) ? "R" : "", + chip_rev(sc), p->vpd.sn, p->vpd.pn, p->vpd.ec); device_set_desc_copy(sc->dev, buf); } @@ -4195,6 +4197,12 @@ t4_sysctls(struct adapter *sc) SYSCTL_ADD_INT(ctx, children, OID_AUTO, "nfilters", CTLFLAG_RD, NULL, sc->tids.nftids, "number of filters"); + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "temperature", CTLTYPE_INT | + CTLFLAG_RD, sc, 0, sysctl_temperature, "A", + "chip temperature (in Celsius)"); + + t4_sge_sysctls(sc, ctx, children); + #ifdef SBUF_DRAIN /* * dev.t4nex.X.misc. Marked CTLFLAG_SKIP to avoid information overload. @@ -4412,8 +4420,8 @@ cxgbe_sysctls(struct port_info *pi) oid = device_get_sysctl_tree(pi->dev); children = SYSCTL_CHILDREN(oid); - SYSCTL_ADD_INT(ctx, children, OID_AUTO, "linkdnrc", CTLFLAG_RD, - &pi->linkdnrc, 0, "reason why link is down"); + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "linkdnrc", CTLTYPE_STRING | + CTLFLAG_RD, pi, 0, sysctl_linkdnrc, "A", "reason why link is down"); if (pi->port_type == FW_PORT_TYPE_BT_XAUI) { SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD, pi, 0, sysctl_btphy, "I", @@ -4835,6 +4843,31 @@ sysctl_handle_t4_reg64(SYSCTL_HANDLER_AR return (sysctl_handle_64(oidp, &val, 0, req)); } +static int +sysctl_temperature(SYSCTL_HANDLER_ARGS) +{ + struct adapter *sc = arg1; + int rc, t; + uint32_t param, val; + + rc = begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4temp"); + if (rc) + return (rc); + param = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DEV) | + V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_DIAG) | + V_FW_PARAMS_PARAM_Y(FW_PARAM_DEV_DIAG_TMP); + rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 1, ¶m, &val); + end_synchronized_op(sc, 0); + if (rc) + return (rc); + + /* unknown is returned as 0 but we display -1 in that case */ + t = val == 0 ? -1 : val; + + rc = sysctl_handle_int(oidp, &t, 0, req); + return (rc); +} + #ifdef SBUF_DRAIN static int sysctl_cctrl(SYSCTL_HANDLER_ARGS) @@ -5459,6 +5492,37 @@ sysctl_lb_stats(SYSCTL_HANDLER_ARGS) return (rc); } +static int +sysctl_linkdnrc(SYSCTL_HANDLER_ARGS) +{ + int rc = 0; + struct port_info *pi = arg1; + struct sbuf *sb; + static const char *linkdnreasons[] = { + "non-specific", "remote fault", "autoneg failed", "reserved3", + "PHY overheated", "unknown", "rx los", "reserved7" + }; + + rc = sysctl_wire_old_buffer(req, 0); + if (rc != 0) + return(rc); + sb = sbuf_new_for_sysctl(NULL, NULL, 64, req); + if (sb == NULL) + return (ENOMEM); + + if (pi->linkdnrc < 0) + sbuf_printf(sb, "n/a"); + else if (pi->linkdnrc < nitems(linkdnreasons)) + sbuf_printf(sb, "%s", linkdnreasons[pi->linkdnrc]); + else + sbuf_printf(sb, "%d", pi->linkdnrc); + + rc = sbuf_finish(sb); + sbuf_delete(sb); + + return (rc); +} + struct mem_desc { unsigned int base; unsigned int limit; Modified: stable/9/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_sge.c Wed May 7 00:51:24 2014 (r265477) +++ stable/9/sys/dev/cxgbe/t4_sge.c Wed May 7 02:13:55 2014 (r265478) @@ -496,6 +496,24 @@ t4_create_dma_tag(struct adapter *sc) return (rc); } +void +t4_sge_sysctls(struct adapter *sc, struct sysctl_ctx_list *ctx, + struct sysctl_oid_list *children) +{ + + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "fl_pktshift", CTLFLAG_RD, + NULL, fl_pktshift, "payload DMA offset in rx buffer (bytes)"); + + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "fl_pad", CTLFLAG_RD, + NULL, fl_pad, "payload pad boundary (bytes)"); + + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "spg_len", CTLFLAG_RD, + NULL, spg_len, "status page size (bytes)"); + + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "cong_drop", CTLFLAG_RD, + NULL, cong_drop, "congestion drop setting"); +} + int t4_destroy_dma_tag(struct adapter *sc) { @@ -1782,9 +1800,7 @@ alloc_iq_fl(struct port_info *pi, struct /* Allocate space for one software descriptor per buffer. */ fl->cap = (fl->qsize - spg_len / RX_FL_ESIZE) * 8; - FL_LOCK(fl); rc = alloc_fl_sdesc(fl); - FL_UNLOCK(fl); if (rc != 0) { device_printf(sc->dev, "failed to setup fl software descriptors: %d\n", @@ -1852,6 +1868,31 @@ alloc_iq_fl(struct port_info *pi, struct iq->flags |= IQ_HAS_FL; } + if (is_t5(sc) && cong >= 0) { + uint32_t param, val; + + param = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DMAQ) | + V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DMAQ_CONM_CTXT) | + V_FW_PARAMS_PARAM_YZ(iq->cntxt_id); + if (cong == 0) + val = 1 << 19; + else { + val = 2 << 19; + for (i = 0; i < 4; i++) { + if (cong & (1 << i)) + val |= 1 << (i << 2); + } + } + + rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, ¶m, &val); + if (rc != 0) { + /* report error but carry on */ + device_printf(sc->dev, + "failed to set congestion manager context for " + "ingress queue %d: %d\n", iq->cntxt_id, rc); + } + } + /* Enable IQ interrupts */ atomic_store_rel_int(&iq->state, IQS_IDLE); t4_write_reg(sc, MYPF_REG(A_SGE_PF_GTS), V_SEINTARM(iq->intr_params) | @@ -1892,11 +1933,8 @@ free_iq_fl(struct port_info *pi, struct free_ring(sc, fl->desc_tag, fl->desc_map, fl->ba, fl->desc); - if (fl->sdesc) { - FL_LOCK(fl); + if (fl->sdesc) free_fl_sdesc(fl); - FL_UNLOCK(fl); - } if (mtx_initialized(&fl->fl_lock)) mtx_destroy(&fl->fl_lock); @@ -2743,8 +2781,6 @@ alloc_fl_sdesc(struct sge_fl *fl) bus_dma_tag_t tag; int i, rc; - FL_LOCK_ASSERT_OWNED(fl); - fl->sdesc = malloc(fl->cap * sizeof(struct fl_sdesc), M_CXGBE, M_ZERO | M_WAITOK); @@ -2783,8 +2819,6 @@ free_fl_sdesc(struct sge_fl *fl) struct fl_sdesc *sd; int i; - FL_LOCK_ASSERT_OWNED(fl); - sd = fl->sdesc; for (i = 0; i < fl->cap; i++, sd++) { From owner-svn-src-stable@FreeBSD.ORG Wed May 7 02:38:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8EAA9D08; Wed, 7 May 2014 02:38:43 +0000 (UTC) Received: from mail-oa0-x22c.google.com (mail-oa0-x22c.google.com [IPv6:2607:f8b0:4003:c02::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2ABD41C0; Wed, 7 May 2014 02:38:43 +0000 (UTC) Received: by mail-oa0-f44.google.com with SMTP id i11so442532oag.17 for ; Tue, 06 May 2014 19:38:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=9+gdkZvbzJUmk+fznxpnqMLAo3fdmO31dIRL0cfK3Qc=; b=NN1/KuFXsdWRINWyCFb1/fYitna23iy761WWZzGxyaolvkKdmtUdA14vbhsXHCAgoF j/rVowhzZIGLI+qcfX7skZnCHIZx6kAP/eLzwhO5+k0+udFZCf8MObDi8dUP5Po44xHC J8e6bN9ZY5vLIr6C5mHf//AzF7eG8LjhbhGtpaLKLAyX06RSOm/M7ia2yPLp9or11jx/ N7PKUKSJJKXKUK6YzLWHAPs7Gs3xzc9b9s9nacc1QadMu55uyr+z6ZM5R7DijzU2Eujb RSLhZMA6B7E3PgmRImYmVYNECWBeMrOzRmyeQMbNK7RN0Zva8+QfZGDjdGm26/sevUkn iAGA== MIME-Version: 1.0 X-Received: by 10.60.157.202 with SMTP id wo10mr43352733oeb.9.1399430322474; Tue, 06 May 2014 19:38:42 -0700 (PDT) Received: by 10.76.23.130 with HTTP; Tue, 6 May 2014 19:38:42 -0700 (PDT) In-Reply-To: <201405070213.s472Dtip073500@svn.freebsd.org> References: <201405070213.s472Dtip073500@svn.freebsd.org> Date: Tue, 6 May 2014 22:38:42 -0400 Message-ID: Subject: Re: svn commit: r265478 - stable/9/sys/dev/cxgbe From: Ryan Stone To: Navdeep Parhar Content-Type: text/plain; charset=UTF-8 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 02:38:43 -0000 On Tue, May 6, 2014 at 10:13 PM, Navdeep Parhar wrote: > + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "temperature", CTLTYPE_INT | > + CTLFLAG_RD, sc, 0, sysctl_temperature, "A", > + "chip temperature (in Celsius)"); I believe that this is incorrect. "A" is used for strings (I guess it stands for ASCII?). I would suggest using "IK", which is an indication that the return value is an integer in tenths of degrees Kelvin. sysctl(8) will handle this value specially and print it in degrees C. You can take a look at dev/coretemp, which uses this sysctl format. From owner-svn-src-stable@FreeBSD.ORG Wed May 7 02:52:35 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 01BC6F33; Wed, 7 May 2014 02:52:35 +0000 (UTC) Received: from mail-pa0-x233.google.com (mail-pa0-x233.google.com [IPv6:2607:f8b0:400e:c03::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B81332DA; Wed, 7 May 2014 02:52:34 +0000 (UTC) Received: by mail-pa0-f51.google.com with SMTP id kq14so427864pab.24 for ; Tue, 06 May 2014 19:52:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=AIeJibXVIqnVLjJinvIeU0AXvWX8jxP97AihfDawPvc=; b=aj3FrUd6gkJyS5BNvUCt3gQPI/4hAFbHacP94Q3xy5dMPsSoDoGVaEfDCodtz8pewk VG9mcLpIFwhbdB4DznruZVM1fyKMCQjZWlVESSH+AB8Jun+4Y949oXV1wrJydyjn/05n wgC3GYlv07/Zn8RJZvdj1POibImQ7JBkbrTRuYqvJpucUliLVEXZuvvd3xlcPhxDNqlg hWBEOT81RRp5Chpi9jkxrWElOo7RaaaWRE7f4NzVW2f7M4d8u7xALJEFL9M4272Lu39O tbZ4EQ43Uv18A4L4j4VhgfdG9QVBXXr80d0z3OW5KE3dgqFo1grcMraqQ0gTAUXhQb6h ND9A== X-Received: by 10.66.164.5 with SMTP id ym5mr13477543pab.50.1399431154290; Tue, 06 May 2014 19:52:34 -0700 (PDT) Received: from ox (c-24-6-44-228.hsd1.ca.comcast.net. [24.6.44.228]) by mx.google.com with ESMTPSA id ck10sm105937225pac.0.2014.05.06.19.52.32 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 06 May 2014 19:52:32 -0700 (PDT) Sender: Navdeep Parhar Date: Tue, 6 May 2014 19:52:27 -0700 From: Navdeep Parhar To: Ryan Stone Subject: Re: svn commit: r265478 - stable/9/sys/dev/cxgbe Message-ID: <20140507025213.GA5199@ox> Mail-Followup-To: Ryan Stone , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org References: <201405070213.s472Dtip073500@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 02:52:35 -0000 On Tue, May 06, 2014 at 10:38:42PM -0400, Ryan Stone wrote: > On Tue, May 6, 2014 at 10:13 PM, Navdeep Parhar wrote: > > + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "temperature", CTLTYPE_INT | > > + CTLFLAG_RD, sc, 0, sysctl_temperature, "A", > > + "chip temperature (in Celsius)"); > > I believe that this is incorrect. "A" is used for strings (I guess it > stands for ASCII?). I would suggest using "IK", which is an > indication that the return value is an integer in tenths of degrees > Kelvin. sysctl(8) will handle this value specially and print it in > degrees C. This was fixed by emax@ in head and I do plan to MFC his fix to stable/9. > > You can take a look at dev/coretemp, which uses this sysctl format. Thanks, I'll take a look. 'K' seems to be useful. Regards, Navdeep From owner-svn-src-stable@FreeBSD.ORG Wed May 7 03:06:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0736466; Wed, 7 May 2014 03:06:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9819A67E; Wed, 7 May 2014 03:06:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4736owD096887; Wed, 7 May 2014 03:06:50 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4736oX8096886; Wed, 7 May 2014 03:06:50 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201405070306.s4736oX8096886@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 7 May 2014 03:06:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265479 - stable/9/sys/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 03:06:50 -0000 Author: np Date: Wed May 7 03:06:50 2014 New Revision: 265479 URL: http://svnweb.freebsd.org/changeset/base/265479 Log: MFC r255047 (with a manual tweak to match the ext_free in stable/9): Add a routine for attaching an mbuf to a buffer with an external refcount. This one is willing to work with buffers that may already be referenced. MEXTADD/m_extadd are suitable only for the first attachment to a cluster -- they initialize the refcount to 1. Modified: stable/9/sys/sys/mbuf.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/sys/mbuf.h ============================================================================== --- stable/9/sys/sys/mbuf.h Wed May 7 02:13:55 2014 (r265478) +++ stable/9/sys/sys/mbuf.h Wed May 7 03:06:50 2014 (r265479) @@ -450,6 +450,28 @@ m_gettype(int size) return (type); } +/* + * Associated an external reference counted buffer with an mbuf. + */ +static __inline void +m_extaddref(struct mbuf *m, caddr_t buf, u_int size, u_int *ref_cnt, + void (*freef)(void *, void *), void *arg1, void *arg2) +{ + + KASSERT(ref_cnt != NULL, ("%s: ref_cnt not provided", __func__)); + + atomic_add_int(ref_cnt, 1); + m->m_flags |= M_EXT; + m->m_ext.ext_buf = buf; + m->m_ext.ref_cnt = ref_cnt; + m->m_data = m->m_ext.ext_buf; + m->m_ext.ext_size = size; + m->m_ext.ext_free = freef; + m->m_ext.ext_arg1 = arg1; + m->m_ext.ext_arg2 = arg2; + m->m_ext.ext_type = EXT_EXTREF; +} + static __inline uma_zone_t m_getzone(int size) { From owner-svn-src-stable@FreeBSD.ORG Wed May 7 03:17:22 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E37A931; Wed, 7 May 2014 03:17:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A1317F0; Wed, 7 May 2014 03:17:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s473HMJc001951; Wed, 7 May 2014 03:17:22 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s473HMcB001949; Wed, 7 May 2014 03:17:22 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201405070317.s473HMcB001949@svn.freebsd.org> From: Bryan Venteicher Date: Wed, 7 May 2014 03:17:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265480 - in stable/9/sys: dev/virtio/network modules/virtio/network X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 03:17:22 -0000 Author: bryanv Date: Wed May 7 03:17:21 2014 New Revision: 265480 URL: http://svnweb.freebsd.org/changeset/base/265480 Log: MFC r255111, r255112, r255131, r255167, r256066, r261150, r261151, r261164, r261166, r261167, r261168, r261394, r261395: This updates the network driver to support multiple queues, and several bug fixes. Note that multiqueue support is not compiled in by default since that would change ALTQ behavior. - Sync VirtIO net device header file from recent Linux - Import multiqueue VirtIO net driver - Fix build with gcc - Do not hold the vtnet Rx queue lock when calling up into the stack - Read and write the MAC address in the config space byte by byte - Also include the mbuf's csum_flags in an assert message - Remove stray space - Move duplicated transmit start code into a single function - Avoid queue unlock followed by relock when the enable interrupt race is lost - Check for a full virtqueue in the multiqueue transmit path - Do not place the sglist used for Rx/Tx on the stack - Use m_defrag() instead of m_collapse() to compact a long mbuf chain Modified: stable/9/sys/dev/virtio/network/if_vtnet.c stable/9/sys/dev/virtio/network/if_vtnetvar.h stable/9/sys/dev/virtio/network/virtio_net.h stable/9/sys/modules/virtio/network/Makefile Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- stable/9/sys/dev/virtio/network/if_vtnet.c Wed May 7 03:06:50 2014 (r265479) +++ stable/9/sys/dev/virtio/network/if_vtnet.c Wed May 7 03:17:21 2014 (r265480) @@ -29,13 +29,12 @@ #include __FBSDID("$FreeBSD$"); -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_device_polling.h" -#endif +#define VTNET_LEGACY_TX #include #include #include +#include #include #include #include @@ -46,6 +45,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include #include @@ -63,6 +65,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -79,6 +82,9 @@ __FBSDID("$FreeBSD$"); #include "virtio_if.h" +#include "opt_inet.h" +#include "opt_inet6.h" + static int vtnet_modevent(module_t, int, void *); static int vtnet_probe(device_t); @@ -87,82 +93,140 @@ static int vtnet_detach(device_t); static int vtnet_suspend(device_t); static int vtnet_resume(device_t); static int vtnet_shutdown(device_t); +static int vtnet_attach_completed(device_t); static int vtnet_config_change(device_t); static void vtnet_negotiate_features(struct vtnet_softc *); +static void vtnet_setup_features(struct vtnet_softc *); +static int vtnet_init_rxq(struct vtnet_softc *, int); +static int vtnet_init_txq(struct vtnet_softc *, int); +static int vtnet_alloc_rxtx_queues(struct vtnet_softc *); +static void vtnet_free_rxtx_queues(struct vtnet_softc *); +static int vtnet_alloc_rx_filters(struct vtnet_softc *); +static void vtnet_free_rx_filters(struct vtnet_softc *); static int vtnet_alloc_virtqueues(struct vtnet_softc *); -static void vtnet_get_hwaddr(struct vtnet_softc *); -static void vtnet_set_hwaddr(struct vtnet_softc *); -static int vtnet_is_link_up(struct vtnet_softc *); -static void vtnet_update_link_status(struct vtnet_softc *); -static void vtnet_watchdog(struct vtnet_softc *); +static int vtnet_setup_interface(struct vtnet_softc *); static int vtnet_change_mtu(struct vtnet_softc *, int); static int vtnet_ioctl(struct ifnet *, u_long, caddr_t); -static int vtnet_init_rx_vq(struct vtnet_softc *); -static void vtnet_free_rx_mbufs(struct vtnet_softc *); -static void vtnet_free_tx_mbufs(struct vtnet_softc *); -static void vtnet_free_ctrl_vq(struct vtnet_softc *); - -#ifdef DEVICE_POLLING -static poll_handler_t vtnet_poll; -#endif - -static struct mbuf * vtnet_alloc_rxbuf(struct vtnet_softc *, int, - struct mbuf **); -static int vtnet_replace_rxbuf(struct vtnet_softc *, +static int vtnet_rxq_populate(struct vtnet_rxq *); +static void vtnet_rxq_free_mbufs(struct vtnet_rxq *); +static struct mbuf * + vtnet_rx_alloc_buf(struct vtnet_softc *, int , struct mbuf **); +static int vtnet_rxq_replace_lro_nomgr_buf(struct vtnet_rxq *, struct mbuf *, int); -static int vtnet_newbuf(struct vtnet_softc *); -static void vtnet_discard_merged_rxbuf(struct vtnet_softc *, int); -static void vtnet_discard_rxbuf(struct vtnet_softc *, struct mbuf *); -static int vtnet_enqueue_rxbuf(struct vtnet_softc *, struct mbuf *); -static void vtnet_vlan_tag_remove(struct mbuf *); -static int vtnet_rx_csum(struct vtnet_softc *, struct mbuf *, +static int vtnet_rxq_replace_buf(struct vtnet_rxq *, struct mbuf *, int); +static int vtnet_rxq_enqueue_buf(struct vtnet_rxq *, struct mbuf *); +static int vtnet_rxq_new_buf(struct vtnet_rxq *); +static int vtnet_rxq_csum(struct vtnet_rxq *, struct mbuf *, + struct virtio_net_hdr *); +static void vtnet_rxq_discard_merged_bufs(struct vtnet_rxq *, int); +static void vtnet_rxq_discard_buf(struct vtnet_rxq *, struct mbuf *); +static int vtnet_rxq_merged_eof(struct vtnet_rxq *, struct mbuf *, int); +static void vtnet_rxq_input(struct vtnet_rxq *, struct mbuf *, struct virtio_net_hdr *); -static int vtnet_rxeof_merged(struct vtnet_softc *, struct mbuf *, int); -static int vtnet_rxeof(struct vtnet_softc *, int, int *); +static int vtnet_rxq_eof(struct vtnet_rxq *); static void vtnet_rx_vq_intr(void *); +static void vtnet_rxq_tq_intr(void *, int); -static void vtnet_txeof(struct vtnet_softc *); -static struct mbuf * vtnet_tx_offload(struct vtnet_softc *, struct mbuf *, +static void vtnet_txq_free_mbufs(struct vtnet_txq *); +static int vtnet_txq_offload_ctx(struct vtnet_txq *, struct mbuf *, + int *, int *, int *); +static int vtnet_txq_offload_tso(struct vtnet_txq *, struct mbuf *, int, + int, struct virtio_net_hdr *); +static struct mbuf * + vtnet_txq_offload(struct vtnet_txq *, struct mbuf *, struct virtio_net_hdr *); -static int vtnet_enqueue_txbuf(struct vtnet_softc *, struct mbuf **, +static int vtnet_txq_enqueue_buf(struct vtnet_txq *, struct mbuf **, struct vtnet_tx_header *); -static int vtnet_encap(struct vtnet_softc *, struct mbuf **); -static void vtnet_start_locked(struct ifnet *); +static int vtnet_txq_encap(struct vtnet_txq *, struct mbuf **); +#ifdef VTNET_LEGACY_TX +static void vtnet_start_locked(struct vtnet_txq *, struct ifnet *); static void vtnet_start(struct ifnet *); -static void vtnet_tick(void *); +#else +static int vtnet_txq_mq_start_locked(struct vtnet_txq *, struct mbuf *); +static int vtnet_txq_mq_start(struct ifnet *, struct mbuf *); +static void vtnet_txq_tq_deferred(void *, int); +#endif +static void vtnet_txq_start(struct vtnet_txq *); +static void vtnet_txq_tq_intr(void *, int); +static void vtnet_txq_eof(struct vtnet_txq *); static void vtnet_tx_vq_intr(void *); +static void vtnet_tx_start_all(struct vtnet_softc *); +#ifndef VTNET_LEGACY_TX +static void vtnet_qflush(struct ifnet *); +#endif + +static int vtnet_watchdog(struct vtnet_txq *); +static void vtnet_rxq_accum_stats(struct vtnet_rxq *, + struct vtnet_rxq_stats *); +static void vtnet_txq_accum_stats(struct vtnet_txq *, + struct vtnet_txq_stats *); +static void vtnet_accumulate_stats(struct vtnet_softc *); +static void vtnet_tick(void *); + +static void vtnet_start_taskqueues(struct vtnet_softc *); +static void vtnet_free_taskqueues(struct vtnet_softc *); +static void vtnet_drain_taskqueues(struct vtnet_softc *); + +static void vtnet_drain_rxtx_queues(struct vtnet_softc *); +static void vtnet_stop_rendezvous(struct vtnet_softc *); static void vtnet_stop(struct vtnet_softc *); +static int vtnet_virtio_reinit(struct vtnet_softc *); +static void vtnet_init_rx_filters(struct vtnet_softc *); +static int vtnet_init_rx_queues(struct vtnet_softc *); +static int vtnet_init_tx_queues(struct vtnet_softc *); +static int vtnet_init_rxtx_queues(struct vtnet_softc *); +static void vtnet_set_active_vq_pairs(struct vtnet_softc *); static int vtnet_reinit(struct vtnet_softc *); static void vtnet_init_locked(struct vtnet_softc *); static void vtnet_init(void *); +static void vtnet_free_ctrl_vq(struct vtnet_softc *); static void vtnet_exec_ctrl_cmd(struct vtnet_softc *, void *, struct sglist *, int, int); - -static void vtnet_rx_filter(struct vtnet_softc *sc); +static int vtnet_ctrl_mac_cmd(struct vtnet_softc *, uint8_t *); +static int vtnet_ctrl_mq_cmd(struct vtnet_softc *, uint16_t); static int vtnet_ctrl_rx_cmd(struct vtnet_softc *, int, int); static int vtnet_set_promisc(struct vtnet_softc *, int); static int vtnet_set_allmulti(struct vtnet_softc *, int); +static void vtnet_attach_disable_promisc(struct vtnet_softc *); +static void vtnet_rx_filter(struct vtnet_softc *); static void vtnet_rx_filter_mac(struct vtnet_softc *); - static int vtnet_exec_vlan_filter(struct vtnet_softc *, int, uint16_t); static void vtnet_rx_filter_vlan(struct vtnet_softc *); -static void vtnet_set_vlan_filter(struct vtnet_softc *, int, uint16_t); +static void vtnet_update_vlan_filter(struct vtnet_softc *, int, uint16_t); static void vtnet_register_vlan(void *, struct ifnet *, uint16_t); static void vtnet_unregister_vlan(void *, struct ifnet *, uint16_t); +static int vtnet_is_link_up(struct vtnet_softc *); +static void vtnet_update_link_status(struct vtnet_softc *); static int vtnet_ifmedia_upd(struct ifnet *); static void vtnet_ifmedia_sts(struct ifnet *, struct ifmediareq *); +static void vtnet_get_hwaddr(struct vtnet_softc *); +static void vtnet_set_hwaddr(struct vtnet_softc *); +static void vtnet_vlan_tag_remove(struct mbuf *); -static void vtnet_add_statistics(struct vtnet_softc *); +static void vtnet_setup_rxq_sysctl(struct sysctl_ctx_list *, + struct sysctl_oid_list *, struct vtnet_rxq *); +static void vtnet_setup_txq_sysctl(struct sysctl_ctx_list *, + struct sysctl_oid_list *, struct vtnet_txq *); +static void vtnet_setup_queue_sysctl(struct vtnet_softc *); +static void vtnet_setup_sysctl(struct vtnet_softc *); + +static int vtnet_rxq_enable_intr(struct vtnet_rxq *); +static void vtnet_rxq_disable_intr(struct vtnet_rxq *); +static int vtnet_txq_enable_intr(struct vtnet_txq *); +static void vtnet_txq_disable_intr(struct vtnet_txq *); +static void vtnet_enable_rx_interrupts(struct vtnet_softc *); +static void vtnet_enable_tx_interrupts(struct vtnet_softc *); +static void vtnet_enable_interrupts(struct vtnet_softc *); +static void vtnet_disable_rx_interrupts(struct vtnet_softc *); +static void vtnet_disable_tx_interrupts(struct vtnet_softc *); +static void vtnet_disable_interrupts(struct vtnet_softc *); -static int vtnet_enable_rx_intr(struct vtnet_softc *); -static int vtnet_enable_tx_intr(struct vtnet_softc *); -static void vtnet_disable_rx_intr(struct vtnet_softc *); -static void vtnet_disable_tx_intr(struct vtnet_softc *); +static int vtnet_tunable_int(struct vtnet_softc *, const char *, int); /* Tunables. */ static int vtnet_csum_disable = 0; @@ -171,16 +235,25 @@ static int vtnet_tso_disable = 0; TUNABLE_INT("hw.vtnet.tso_disable", &vtnet_tso_disable); static int vtnet_lro_disable = 0; TUNABLE_INT("hw.vtnet.lro_disable", &vtnet_lro_disable); +static int vtnet_mq_disable = 0; +TUNABLE_INT("hw.vtnet.mq_disable", &vtnet_mq_disable); +static int vtnet_mq_max_pairs = 0; +TUNABLE_INT("hw.vtnet.mq_max_pairs", &vtnet_mq_max_pairs); +static int vtnet_rx_process_limit = 512; +TUNABLE_INT("hw.vtnet.rx_process_limit", &vtnet_rx_process_limit); /* - * Reducing the number of transmit completed interrupts can - * improve performance. To do so, the define below keeps the - * Tx vq interrupt disabled and adds calls to vtnet_txeof() - * in the start and watchdog paths. The price to pay for this - * is the m_free'ing of transmitted mbufs may be delayed until - * the watchdog fires. + * Reducing the number of transmit completed interrupts can improve + * performance. To do so, the define below keeps the Tx vq interrupt + * disabled and adds calls to vtnet_txeof() in the start and watchdog + * paths. The price to pay for this is the m_free'ing of transmitted + * mbufs may be delayed until the watchdog fires. + * + * BMV: Reintroduce this later as a run-time option, if it makes + * sense after the EVENT_IDX feature is supported. + * + * #define VTNET_TX_INTR_MODERATION */ -#define VTNET_TX_INTR_MODERATION static uma_zone_t vtnet_tx_header_zone; @@ -203,21 +276,25 @@ static struct virtio_feature_desc vtnet_ { VIRTIO_NET_F_CTRL_RX, "RxMode" }, { VIRTIO_NET_F_CTRL_VLAN, "VLanFilter" }, { VIRTIO_NET_F_CTRL_RX_EXTRA, "RxModeExtra" }, + { VIRTIO_NET_F_GUEST_ANNOUNCE, "GuestAnnounce" }, + { VIRTIO_NET_F_MQ, "Multiqueue" }, + { VIRTIO_NET_F_CTRL_MAC_ADDR, "SetMacAddress" }, { 0, NULL } }; static device_method_t vtnet_methods[] = { /* Device methods. */ - DEVMETHOD(device_probe, vtnet_probe), - DEVMETHOD(device_attach, vtnet_attach), - DEVMETHOD(device_detach, vtnet_detach), - DEVMETHOD(device_suspend, vtnet_suspend), - DEVMETHOD(device_resume, vtnet_resume), - DEVMETHOD(device_shutdown, vtnet_shutdown), + DEVMETHOD(device_probe, vtnet_probe), + DEVMETHOD(device_attach, vtnet_attach), + DEVMETHOD(device_detach, vtnet_detach), + DEVMETHOD(device_suspend, vtnet_suspend), + DEVMETHOD(device_resume, vtnet_resume), + DEVMETHOD(device_shutdown, vtnet_shutdown), /* VirtIO methods. */ - DEVMETHOD(virtio_config_change, vtnet_config_change), + DEVMETHOD(virtio_attach_completed, vtnet_attach_completed), + DEVMETHOD(virtio_config_change, vtnet_config_change), DEVMETHOD_END }; @@ -282,56 +359,31 @@ static int vtnet_attach(device_t dev) { struct vtnet_softc *sc; - struct ifnet *ifp; - int tx_size, error; + int error; sc = device_get_softc(dev); sc->vtnet_dev = dev; - VTNET_LOCK_INIT(sc); - callout_init_mtx(&sc->vtnet_tick_ch, VTNET_MTX(sc), 0); - - ifmedia_init(&sc->vtnet_media, IFM_IMASK, vtnet_ifmedia_upd, - vtnet_ifmedia_sts); - ifmedia_add(&sc->vtnet_media, VTNET_MEDIATYPE, 0, NULL); - ifmedia_set(&sc->vtnet_media, VTNET_MEDIATYPE); - - vtnet_add_statistics(sc); - + /* Register our feature descriptions. */ virtio_set_feature_desc(dev, vtnet_feature_desc); - vtnet_negotiate_features(sc); - - if (virtio_with_feature(dev, VIRTIO_NET_F_MRG_RXBUF)) { - sc->vtnet_flags |= VTNET_FLAG_MRG_RXBUFS; - sc->vtnet_hdr_size = sizeof(struct virtio_net_hdr_mrg_rxbuf); - } else - sc->vtnet_hdr_size = sizeof(struct virtio_net_hdr); - - sc->vtnet_rx_mbuf_size = MCLBYTES; - sc->vtnet_rx_mbuf_count = VTNET_NEEDED_RX_MBUFS(sc); - - if (virtio_with_feature(dev, VIRTIO_NET_F_CTRL_VQ)) { - sc->vtnet_flags |= VTNET_FLAG_CTRL_VQ; - if (virtio_with_feature(dev, VIRTIO_NET_F_CTRL_RX)) { - sc->vtnet_mac_filter = malloc( - sizeof(struct vtnet_mac_filter), M_DEVBUF, - M_NOWAIT | M_ZERO); - if (sc->vtnet_mac_filter == NULL) { - device_printf(dev, - "cannot allocate mac filter table\n"); - error = ENOMEM; - goto fail; - } + VTNET_CORE_LOCK_INIT(sc); + callout_init_mtx(&sc->vtnet_tick_ch, VTNET_CORE_MTX(sc), 0); - sc->vtnet_flags |= VTNET_FLAG_CTRL_RX; - } + vtnet_setup_sysctl(sc); + vtnet_setup_features(sc); - if (virtio_with_feature(dev, VIRTIO_NET_F_CTRL_VLAN)) - sc->vtnet_flags |= VTNET_FLAG_VLAN_FILTER; + error = vtnet_alloc_rx_filters(sc); + if (error) { + device_printf(dev, "cannot allocate Rx filters\n"); + goto fail; } - vtnet_get_hwaddr(sc); + error = vtnet_alloc_rxtx_queues(sc); + if (error) { + device_printf(dev, "cannot allocate queues\n"); + goto fail; + } error = vtnet_alloc_virtqueues(sc); if (error) { @@ -339,111 +391,21 @@ vtnet_attach(device_t dev) goto fail; } - ifp = sc->vtnet_ifp = if_alloc(IFT_ETHER); - if (ifp == NULL) { - device_printf(dev, "cannot allocate ifnet structure\n"); - error = ENOSPC; + error = vtnet_setup_interface(sc); + if (error) { + device_printf(dev, "cannot setup interface\n"); goto fail; } - ifp->if_softc = sc; - if_initname(ifp, device_get_name(dev), device_get_unit(dev)); - ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; - ifp->if_init = vtnet_init; - ifp->if_start = vtnet_start; - ifp->if_ioctl = vtnet_ioctl; - - sc->vtnet_rx_size = virtqueue_size(sc->vtnet_rx_vq); - sc->vtnet_rx_process_limit = sc->vtnet_rx_size; - - tx_size = virtqueue_size(sc->vtnet_tx_vq); - sc->vtnet_tx_size = tx_size; - IFQ_SET_MAXLEN(&ifp->if_snd, tx_size - 1); - ifp->if_snd.ifq_drv_maxlen = tx_size - 1; - IFQ_SET_READY(&ifp->if_snd); - - ether_ifattach(ifp, sc->vtnet_hwaddr); - - if (virtio_with_feature(dev, VIRTIO_NET_F_STATUS)) - ifp->if_capabilities |= IFCAP_LINKSTATE; - - /* Tell the upper layer(s) we support long frames. */ - ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header); - ifp->if_capabilities |= IFCAP_JUMBO_MTU | IFCAP_VLAN_MTU; - - if (virtio_with_feature(dev, VIRTIO_NET_F_CSUM)) { - ifp->if_capabilities |= IFCAP_TXCSUM; - - if (virtio_with_feature(dev, VIRTIO_NET_F_HOST_TSO4)) - ifp->if_capabilities |= IFCAP_TSO4; - if (virtio_with_feature(dev, VIRTIO_NET_F_HOST_TSO6)) - ifp->if_capabilities |= IFCAP_TSO6; - if (ifp->if_capabilities & IFCAP_TSO) - ifp->if_capabilities |= IFCAP_VLAN_HWTSO; - - if (virtio_with_feature(dev, VIRTIO_NET_F_HOST_ECN)) - sc->vtnet_flags |= VTNET_FLAG_TSO_ECN; - } - - if (virtio_with_feature(dev, VIRTIO_NET_F_GUEST_CSUM)) { - ifp->if_capabilities |= IFCAP_RXCSUM; - - if (virtio_with_feature(dev, VIRTIO_NET_F_GUEST_TSO4) || - virtio_with_feature(dev, VIRTIO_NET_F_GUEST_TSO6)) - ifp->if_capabilities |= IFCAP_LRO; - } - - if (ifp->if_capabilities & IFCAP_HWCSUM) { - /* - * VirtIO does not support VLAN tagging, but we can fake - * it by inserting and removing the 802.1Q header during - * transmit and receive. We are then able to do checksum - * offloading of VLAN frames. - */ - ifp->if_capabilities |= - IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWCSUM; - } - - ifp->if_capenable = ifp->if_capabilities; - - /* - * Capabilities after here are not enabled by default. - */ - - if (sc->vtnet_flags & VTNET_FLAG_VLAN_FILTER) { - ifp->if_capabilities |= IFCAP_VLAN_HWFILTER; - - sc->vtnet_vlan_attach = EVENTHANDLER_REGISTER(vlan_config, - vtnet_register_vlan, sc, EVENTHANDLER_PRI_FIRST); - sc->vtnet_vlan_detach = EVENTHANDLER_REGISTER(vlan_unconfig, - vtnet_unregister_vlan, sc, EVENTHANDLER_PRI_FIRST); - } - -#ifdef DEVICE_POLLING - ifp->if_capabilities |= IFCAP_POLLING; -#endif - error = virtio_setup_intr(dev, INTR_TYPE_NET); if (error) { device_printf(dev, "cannot setup virtqueue interrupts\n"); - ether_ifdetach(ifp); + /* BMV: This will crash if during boot! */ + ether_ifdetach(sc->vtnet_ifp); goto fail; } - /* - * Device defaults to promiscuous mode for backwards - * compatibility. Turn it off if possible. - */ - if (sc->vtnet_flags & VTNET_FLAG_CTRL_RX) { - VTNET_LOCK(sc); - if (vtnet_set_promisc(sc, 0) != 0) { - ifp->if_flags |= IFF_PROMISC; - device_printf(dev, - "cannot disable promiscuous mode\n"); - } - VTNET_UNLOCK(sc); - } else - ifp->if_flags |= IFF_PROMISC; + vtnet_start_taskqueues(sc); fail: if (error) @@ -461,24 +423,19 @@ vtnet_detach(device_t dev) sc = device_get_softc(dev); ifp = sc->vtnet_ifp; - KASSERT(mtx_initialized(VTNET_MTX(sc)), - ("vtnet mutex not initialized")); - -#ifdef DEVICE_POLLING - if (ifp != NULL && ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(ifp); -#endif - if (device_is_attached(dev)) { - VTNET_LOCK(sc); + VTNET_CORE_LOCK(sc); vtnet_stop(sc); - VTNET_UNLOCK(sc); + VTNET_CORE_UNLOCK(sc); callout_drain(&sc->vtnet_tick_ch); + vtnet_drain_taskqueues(sc); ether_ifdetach(ifp); } + vtnet_free_taskqueues(sc); + if (sc->vtnet_vlan_attach != NULL) { EVENTHANDLER_DEREGISTER(vlan_config, sc->vtnet_vlan_attach); sc->vtnet_vlan_attach = NULL; @@ -488,25 +445,20 @@ vtnet_detach(device_t dev) sc->vtnet_vlan_detach = NULL; } - if (sc->vtnet_mac_filter != NULL) { - free(sc->vtnet_mac_filter, M_DEVBUF); - sc->vtnet_mac_filter = NULL; - } + ifmedia_removeall(&sc->vtnet_media); if (ifp != NULL) { if_free(ifp); sc->vtnet_ifp = NULL; } - if (sc->vtnet_rx_vq != NULL) - vtnet_free_rx_mbufs(sc); - if (sc->vtnet_tx_vq != NULL) - vtnet_free_tx_mbufs(sc); + vtnet_free_rxtx_queues(sc); + vtnet_free_rx_filters(sc); + if (sc->vtnet_ctrl_vq != NULL) vtnet_free_ctrl_vq(sc); - ifmedia_removeall(&sc->vtnet_media); - VTNET_LOCK_DESTROY(sc); + VTNET_CORE_LOCK_DESTROY(sc); return (0); } @@ -518,10 +470,10 @@ vtnet_suspend(device_t dev) sc = device_get_softc(dev); - VTNET_LOCK(sc); + VTNET_CORE_LOCK(sc); vtnet_stop(sc); sc->vtnet_flags |= VTNET_FLAG_SUSPENDED; - VTNET_UNLOCK(sc); + VTNET_CORE_UNLOCK(sc); return (0); } @@ -535,11 +487,11 @@ vtnet_resume(device_t dev) sc = device_get_softc(dev); ifp = sc->vtnet_ifp; - VTNET_LOCK(sc); + VTNET_CORE_LOCK(sc); if (ifp->if_flags & IFF_UP) vtnet_init_locked(sc); sc->vtnet_flags &= ~VTNET_FLAG_SUSPENDED; - VTNET_UNLOCK(sc); + VTNET_CORE_UNLOCK(sc); return (0); } @@ -556,15 +508,26 @@ vtnet_shutdown(device_t dev) } static int +vtnet_attach_completed(device_t dev) +{ + + vtnet_attach_disable_promisc(device_get_softc(dev)); + + return (0); +} + +static int vtnet_config_change(device_t dev) { struct vtnet_softc *sc; sc = device_get_softc(dev); - VTNET_LOCK(sc); + VTNET_CORE_LOCK(sc); vtnet_update_link_status(sc); - VTNET_UNLOCK(sc); + if (sc->vtnet_link_active != 0) + vtnet_tx_start_all(sc); + VTNET_CORE_UNLOCK(sc); return (0); } @@ -578,188 +541,512 @@ vtnet_negotiate_features(struct vtnet_so dev = sc->vtnet_dev; mask = 0; - if (vtnet_csum_disable) - mask |= VIRTIO_NET_F_CSUM | VIRTIO_NET_F_GUEST_CSUM; - /* - * TSO and LRO are only available when their corresponding - * checksum offload feature is also negotiated. + * TSO and LRO are only available when their corresponding checksum + * offload feature is also negotiated. */ - - if (vtnet_csum_disable || vtnet_tso_disable) - mask |= VIRTIO_NET_F_HOST_TSO4 | VIRTIO_NET_F_HOST_TSO6 | - VIRTIO_NET_F_HOST_ECN; - - if (vtnet_csum_disable || vtnet_lro_disable) + if (vtnet_tunable_int(sc, "csum_disable", vtnet_csum_disable)) { + mask |= VIRTIO_NET_F_CSUM | VIRTIO_NET_F_GUEST_CSUM; + mask |= VTNET_TSO_FEATURES | VTNET_LRO_FEATURES; + } + if (vtnet_tunable_int(sc, "tso_disable", vtnet_tso_disable)) + mask |= VTNET_TSO_FEATURES; + if (vtnet_tunable_int(sc, "lro_disable", vtnet_lro_disable)) mask |= VTNET_LRO_FEATURES; + if (vtnet_tunable_int(sc, "mq_disable", vtnet_mq_disable)) + mask |= VIRTIO_NET_F_MQ; +#ifdef VTNET_LEGACY_TX + mask |= VIRTIO_NET_F_MQ; +#endif features = VTNET_FEATURES & ~mask; -#ifdef VTNET_TX_INTR_MODERATION - features |= VIRTIO_F_NOTIFY_ON_EMPTY; -#endif sc->vtnet_features = virtio_negotiate_features(dev, features); - if (virtio_with_feature(dev, VIRTIO_NET_F_MRG_RXBUF) == 0 && - virtio_with_feature(dev, VTNET_LRO_FEATURES)) { - /* - * LRO without mergeable buffers requires special care. This - * is not ideal because every receive buffer must be large - * enough to hold the maximum TCP packet, the Ethernet header, - * and the vtnet_rx_header. This requires up to 34 descriptors - * when using MCLBYTES clusters. If we do not have indirect - * descriptors, LRO is disabled since the virtqueue will not - * be able to contain very many receive buffers. - */ - if (virtio_with_feature(dev, - VIRTIO_RING_F_INDIRECT_DESC) == 0) { - device_printf(dev, - "LRO disabled due to lack of both mergeable " - "buffers and indirect descriptors\n"); + if (virtio_with_feature(dev, VTNET_LRO_FEATURES) == 0) + return; + if (virtio_with_feature(dev, VIRTIO_NET_F_MRG_RXBUF)) + return; - sc->vtnet_features = virtio_negotiate_features(dev, - features & ~VTNET_LRO_FEATURES); - } else - sc->vtnet_flags |= VTNET_FLAG_LRO_NOMRG; - } + /* + * LRO without mergeable buffers requires special care. This is not + * ideal because every receive buffer must be large enough to hold + * the maximum TCP packet, the Ethernet header, and the header. This + * requires up to 34 descriptors with MCLBYTES clusters. If we do + * not have indirect descriptors, LRO is disabled since the virtqueue + * will not contain very many receive buffers. + */ + if (virtio_with_feature(dev, VIRTIO_RING_F_INDIRECT_DESC) == 0) { + device_printf(dev, + "LRO disabled due to both mergeable buffers and indirect " + "descriptors not negotiated\n"); + + features &= ~VTNET_LRO_FEATURES; + sc->vtnet_features = virtio_negotiate_features(dev, features); + } else + sc->vtnet_flags |= VTNET_FLAG_LRO_NOMRG; } -static int -vtnet_alloc_virtqueues(struct vtnet_softc *sc) +static void +vtnet_setup_features(struct vtnet_softc *sc) { device_t dev; - struct vq_alloc_info vq_info[3]; - int nvqs, rxsegs; + int max_pairs, max; dev = sc->vtnet_dev; - nvqs = 2; - /* - * Indirect descriptors are not needed for the Rx - * virtqueue when mergeable buffers are negotiated. - * The header is placed inline with the data, not - * in a separate descriptor, and mbuf clusters are - * always physically contiguous. - */ - if ((sc->vtnet_flags & VTNET_FLAG_MRG_RXBUFS) == 0) { - rxsegs = sc->vtnet_flags & VTNET_FLAG_LRO_NOMRG ? - VTNET_MAX_RX_SEGS : VTNET_MIN_RX_SEGS; + vtnet_negotiate_features(sc); + + if (virtio_with_feature(dev, VIRTIO_RING_F_EVENT_IDX)) + sc->vtnet_flags |= VTNET_FLAG_EVENT_IDX; + + if (virtio_with_feature(dev, VIRTIO_NET_F_MAC)) { + /* This feature should always be negotiated. */ + sc->vtnet_flags |= VTNET_FLAG_MAC; + } + + if (virtio_with_feature(dev, VIRTIO_NET_F_MRG_RXBUF)) { + sc->vtnet_flags |= VTNET_FLAG_MRG_RXBUFS; + sc->vtnet_hdr_size = sizeof(struct virtio_net_hdr_mrg_rxbuf); } else - rxsegs = 0; + sc->vtnet_hdr_size = sizeof(struct virtio_net_hdr); - VQ_ALLOC_INFO_INIT(&vq_info[0], rxsegs, - vtnet_rx_vq_intr, sc, &sc->vtnet_rx_vq, - "%s receive", device_get_nameunit(dev)); - - VQ_ALLOC_INFO_INIT(&vq_info[1], VTNET_MAX_TX_SEGS, - vtnet_tx_vq_intr, sc, &sc->vtnet_tx_vq, - "%s transmit", device_get_nameunit(dev)); + if (sc->vtnet_flags & VTNET_FLAG_MRG_RXBUFS) + sc->vtnet_rx_nsegs = VTNET_MRG_RX_SEGS; + else if (sc->vtnet_flags & VTNET_FLAG_LRO_NOMRG) + sc->vtnet_rx_nsegs = VTNET_MAX_RX_SEGS; + else + sc->vtnet_rx_nsegs = VTNET_MIN_RX_SEGS; + + if (virtio_with_feature(dev, VIRTIO_NET_F_GSO) || + virtio_with_feature(dev, VIRTIO_NET_F_HOST_TSO4) || + virtio_with_feature(dev, VIRTIO_NET_F_HOST_TSO6)) + sc->vtnet_tx_nsegs = VTNET_MAX_TX_SEGS; + else + sc->vtnet_tx_nsegs = VTNET_MIN_TX_SEGS; - if (sc->vtnet_flags & VTNET_FLAG_CTRL_VQ) { - nvqs++; + if (virtio_with_feature(dev, VIRTIO_NET_F_CTRL_VQ)) { + sc->vtnet_flags |= VTNET_FLAG_CTRL_VQ; + + if (virtio_with_feature(dev, VIRTIO_NET_F_CTRL_RX)) + sc->vtnet_flags |= VTNET_FLAG_CTRL_RX; + if (virtio_with_feature(dev, VIRTIO_NET_F_CTRL_VLAN)) + sc->vtnet_flags |= VTNET_FLAG_VLAN_FILTER; + if (virtio_with_feature(dev, VIRTIO_NET_F_CTRL_MAC_ADDR)) + sc->vtnet_flags |= VTNET_FLAG_CTRL_MAC; + } - VQ_ALLOC_INFO_INIT(&vq_info[2], 0, NULL, NULL, - &sc->vtnet_ctrl_vq, "%s control", - device_get_nameunit(dev)); + if (virtio_with_feature(dev, VIRTIO_NET_F_MQ) && + sc->vtnet_flags & VTNET_FLAG_CTRL_VQ) { + max_pairs = virtio_read_dev_config_2(dev, + offsetof(struct virtio_net_config, max_virtqueue_pairs)); + if (max_pairs < VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MIN || + max_pairs > VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MAX) + max_pairs = 1; + } else + max_pairs = 1; + + if (max_pairs > 1) { + /* + * Limit the maximum number of queue pairs to the number of + * CPUs or the configured maximum. The actual number of + * queues that get used may be less. + */ + max = vtnet_tunable_int(sc, "mq_max_pairs", vtnet_mq_max_pairs); + if (max > 0 && max_pairs > max) + max_pairs = max; + if (max_pairs > mp_ncpus) + max_pairs = mp_ncpus; + if (max_pairs > VTNET_MAX_QUEUE_PAIRS) + max_pairs = VTNET_MAX_QUEUE_PAIRS; + if (max_pairs > 1) + sc->vtnet_flags |= VTNET_FLAG_MULTIQ; } - return (virtio_alloc_virtqueues(dev, 0, nvqs, vq_info)); + sc->vtnet_max_vq_pairs = max_pairs; } -static void -vtnet_get_hwaddr(struct vtnet_softc *sc) +static int +vtnet_init_rxq(struct vtnet_softc *sc, int id) { - device_t dev; + struct vtnet_rxq *rxq; - dev = sc->vtnet_dev; + rxq = &sc->vtnet_rxqs[id]; - if (virtio_with_feature(dev, VIRTIO_NET_F_MAC)) { - virtio_read_device_config(dev, - offsetof(struct virtio_net_config, mac), - sc->vtnet_hwaddr, ETHER_ADDR_LEN); - } else { - /* Generate random locally administered unicast address. */ - sc->vtnet_hwaddr[0] = 0xB2; - arc4rand(&sc->vtnet_hwaddr[1], ETHER_ADDR_LEN - 1, 0); + snprintf(rxq->vtnrx_name, sizeof(rxq->vtnrx_name), "%s-rx%d", + device_get_nameunit(sc->vtnet_dev), id); + mtx_init(&rxq->vtnrx_mtx, rxq->vtnrx_name, NULL, MTX_DEF); - vtnet_set_hwaddr(sc); - } -} + rxq->vtnrx_sc = sc; + rxq->vtnrx_id = id; -static void -vtnet_set_hwaddr(struct vtnet_softc *sc) -{ - device_t dev; + rxq->vtnrx_sg = sglist_alloc(sc->vtnet_rx_nsegs, M_NOWAIT); + if (rxq->vtnrx_sg == NULL) + return (ENOMEM); - dev = sc->vtnet_dev; + TASK_INIT(&rxq->vtnrx_intrtask, 0, vtnet_rxq_tq_intr, rxq); + rxq->vtnrx_tq = taskqueue_create(rxq->vtnrx_name, M_NOWAIT, + taskqueue_thread_enqueue, &rxq->vtnrx_tq); - virtio_write_device_config(dev, - offsetof(struct virtio_net_config, mac), - sc->vtnet_hwaddr, ETHER_ADDR_LEN); + return (rxq->vtnrx_tq == NULL ? ENOMEM : 0); } static int -vtnet_is_link_up(struct vtnet_softc *sc) +vtnet_init_txq(struct vtnet_softc *sc, int id) { - device_t dev; - struct ifnet *ifp; - uint16_t status; + struct vtnet_txq *txq; - dev = sc->vtnet_dev; - ifp = sc->vtnet_ifp; + txq = &sc->vtnet_txqs[id]; - VTNET_LOCK_ASSERT(sc); + snprintf(txq->vtntx_name, sizeof(txq->vtntx_name), "%s-tx%d", + device_get_nameunit(sc->vtnet_dev), id); + mtx_init(&txq->vtntx_mtx, txq->vtntx_name, NULL, MTX_DEF); - if ((ifp->if_capenable & IFCAP_LINKSTATE) == 0) - return (1); + txq->vtntx_sc = sc; + txq->vtntx_id = id; - status = virtio_read_dev_config_2(dev, - offsetof(struct virtio_net_config, status)); + txq->vtntx_sg = sglist_alloc(sc->vtnet_tx_nsegs, M_NOWAIT); + if (txq->vtntx_sg == NULL) + return (ENOMEM); - return ((status & VIRTIO_NET_S_LINK_UP) != 0); +#ifndef VTNET_LEGACY_TX + txq->vtntx_br = buf_ring_alloc(VTNET_DEFAULT_BUFRING_SIZE, M_DEVBUF, + M_NOWAIT, &txq->vtntx_mtx); + if (txq->vtntx_br == NULL) + return (ENOMEM); + + TASK_INIT(&txq->vtntx_defrtask, 0, vtnet_txq_tq_deferred, txq); +#endif + TASK_INIT(&txq->vtntx_intrtask, 0, vtnet_txq_tq_intr, txq); + txq->vtntx_tq = taskqueue_create(txq->vtntx_name, M_NOWAIT, + taskqueue_thread_enqueue, &txq->vtntx_tq); + if (txq->vtntx_tq == NULL) + return (ENOMEM); + + return (0); } -static void -vtnet_update_link_status(struct vtnet_softc *sc) +static int +vtnet_alloc_rxtx_queues(struct vtnet_softc *sc) { - struct ifnet *ifp; - int link; + int i, npairs, error; - ifp = sc->vtnet_ifp; + npairs = sc->vtnet_max_vq_pairs; - link = vtnet_is_link_up(sc); + sc->vtnet_rxqs = malloc(sizeof(struct vtnet_rxq) * npairs, M_DEVBUF, + M_NOWAIT | M_ZERO); + sc->vtnet_txqs = malloc(sizeof(struct vtnet_txq) * npairs, M_DEVBUF, + M_NOWAIT | M_ZERO); + if (sc->vtnet_rxqs == NULL || sc->vtnet_txqs == NULL) + return (ENOMEM); - if (link && ((sc->vtnet_flags & VTNET_FLAG_LINK) == 0)) { - sc->vtnet_flags |= VTNET_FLAG_LINK; - if_link_state_change(ifp, LINK_STATE_UP); - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - vtnet_start_locked(ifp); - } else if (!link && (sc->vtnet_flags & VTNET_FLAG_LINK)) { - sc->vtnet_flags &= ~VTNET_FLAG_LINK; - if_link_state_change(ifp, LINK_STATE_DOWN); + for (i = 0; i < npairs; i++) { + error = vtnet_init_rxq(sc, i); + if (error) + return (error); + error = vtnet_init_txq(sc, i); + if (error) + return (error); } + + vtnet_setup_queue_sysctl(sc); + + return (0); } static void -vtnet_watchdog(struct vtnet_softc *sc) +vtnet_destroy_rxq(struct vtnet_rxq *rxq) { - struct ifnet *ifp; - ifp = sc->vtnet_ifp; + rxq->vtnrx_sc = NULL; + rxq->vtnrx_id = -1; -#ifdef VTNET_TX_INTR_MODERATION - vtnet_txeof(sc); -#endif + if (rxq->vtnrx_sg != NULL) { + sglist_free(rxq->vtnrx_sg); + rxq->vtnrx_sg = NULL; + } - if (sc->vtnet_watchdog_timer == 0 || --sc->vtnet_watchdog_timer) - return; + if (mtx_initialized(&rxq->vtnrx_mtx) != 0) + mtx_destroy(&rxq->vtnrx_mtx); +} - if_printf(ifp, "watchdog timeout -- resetting\n"); -#ifdef VTNET_DEBUG - virtqueue_dump(sc->vtnet_tx_vq); +static void +vtnet_destroy_txq(struct vtnet_txq *txq) +{ + + txq->vtntx_sc = NULL; + txq->vtntx_id = -1; + + if (txq->vtntx_sg != NULL) { + sglist_free(txq->vtntx_sg); + txq->vtntx_sg = NULL; + } + +#ifndef VTNET_LEGACY_TX + if (txq->vtntx_br != NULL) { + buf_ring_free(txq->vtntx_br, M_DEVBUF); + txq->vtntx_br = NULL; + } #endif - ifp->if_oerrors++; - ifp->if_drv_flags &= ~IFF_DRV_RUNNING; - vtnet_init_locked(sc); + + if (mtx_initialized(&txq->vtntx_mtx) != 0) + mtx_destroy(&txq->vtntx_mtx); +} + +static void +vtnet_free_rxtx_queues(struct vtnet_softc *sc) +{ + int i; + + if (sc->vtnet_rxqs != NULL) { + for (i = 0; i < sc->vtnet_max_vq_pairs; i++) + vtnet_destroy_rxq(&sc->vtnet_rxqs[i]); + free(sc->vtnet_rxqs, M_DEVBUF); + sc->vtnet_rxqs = NULL; + } + + if (sc->vtnet_txqs != NULL) { + for (i = 0; i < sc->vtnet_max_vq_pairs; i++) + vtnet_destroy_txq(&sc->vtnet_txqs[i]); + free(sc->vtnet_txqs, M_DEVBUF); + sc->vtnet_txqs = NULL; + } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Wed May 7 04:00:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23507BDB; Wed, 7 May 2014 04:00:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10085BC9; Wed, 7 May 2014 04:00:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47406T9020124; Wed, 7 May 2014 04:00:06 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47405jC020122; Wed, 7 May 2014 04:00:05 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201405070400.s47405jC020122@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 7 May 2014 04:00:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265481 - stable/9/sys/dev/cxgbe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 04:00:06 -0000 Author: np Date: Wed May 7 04:00:05 2014 New Revision: 265481 URL: http://svnweb.freebsd.org/changeset/base/265481 Log: MFC r255050, r255052. r255050: Implement support for rx buffer packing. Enable it by default for T5 cards. This is a T4 and T5 chip feature which lets the chip deliver multiple Ethernet frames in a single buffer. This is more efficient within the chip, in the driver, and reduces wastage of space in rx buffers. - Always allocate rx buffers from the jumbop zone, no matter what the MTU is. Do not use the normal cluster refcounting mechanism. - Reserve space for an mbuf and a refcount in the cluster itself and let the chip DMA multiple frames in the rest. - Use the embedded mbuf for the first frame and allocate mbufs on the fly for any additional frames delivered in the cluster. Each of these mbufs has a reference on the underlying cluster. r255052: Fix the sysctl that displays whether buffer packing is enabled or not. Modified: stable/9/sys/dev/cxgbe/adapter.h stable/9/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/9/sys/dev/cxgbe/adapter.h Wed May 7 03:17:21 2014 (r265480) +++ stable/9/sys/dev/cxgbe/adapter.h Wed May 7 04:00:05 2014 (r265481) @@ -128,9 +128,9 @@ enum { RX_FL_ESIZE = EQ_ESIZE, /* 8 64bit addresses */ #if MJUMPAGESIZE != MCLBYTES - FL_BUF_SIZES = 4, /* cluster, jumbop, jumbo9k, jumbo16k */ + FL_BUF_SIZES_MAX = 5, /* cluster, jumbop, jumbo9k, jumbo16k, extra */ #else - FL_BUF_SIZES = 3, /* cluster, jumbo9k, jumbo16k */ + FL_BUF_SIZES_MAX = 4, /* cluster, jumbo9k, jumbo16k, extra */ #endif CTRL_EQ_QSIZE = 128, @@ -165,6 +165,7 @@ enum { MASTER_PF = (1 << 3), ADAP_SYSCTL_CTX = (1 << 4), TOM_INIT_DONE = (1 << 5), + BUF_PACKING_OK = (1 << 6), CXGBE_BUSY = (1 << 9), @@ -231,12 +232,11 @@ struct port_info { }; struct fl_sdesc { - struct mbuf *m; bus_dmamap_t map; caddr_t cl; - uint8_t tag_idx; /* the sc->fl_tag this map comes from */ + uint8_t tag_idx; /* the fl->tag entry this map comes from */ #ifdef INVARIANTS - __be64 ba_tag; + __be64 ba_hwtag; #endif }; @@ -358,9 +358,22 @@ struct sge_eq { uint32_t unstalled; /* recovered from stall */ }; +struct fl_buf_info { + u_int size; + int type; + int hwtag:4; /* tag in low 4 bits of the pa. */ + uma_zone_t zone; +}; +#define FL_BUF_SIZES(sc) (sc->sge.fl_buf_sizes) +#define FL_BUF_SIZE(sc, x) (sc->sge.fl_buf_info[x].size) +#define FL_BUF_TYPE(sc, x) (sc->sge.fl_buf_info[x].type) +#define FL_BUF_HWTAG(sc, x) (sc->sge.fl_buf_info[x].hwtag) +#define FL_BUF_ZONE(sc, x) (sc->sge.fl_buf_info[x].zone) + enum { FL_STARVING = (1 << 0), /* on the adapter's list of starving fl's */ FL_DOOMED = (1 << 1), /* about to be destroyed */ + FL_BUF_PACKING = (1 << 2), /* buffer packing enabled */ }; #define FL_RUNNING_LOW(fl) (fl->cap - fl->needed <= fl->lowat) @@ -369,7 +382,8 @@ enum { struct sge_fl { bus_dma_tag_t desc_tag; bus_dmamap_t desc_map; - bus_dma_tag_t tag[FL_BUF_SIZES]; + bus_dma_tag_t tag[FL_BUF_SIZES_MAX]; /* only first FL_BUF_SIZES(sc) are + valid */ uint8_t tag_idx; struct mtx fl_lock; char lockname[16]; @@ -382,11 +396,13 @@ struct sge_fl { uint16_t qsize; /* size (# of entries) of the queue */ uint16_t cntxt_id; /* SGE context id for the freelist */ uint32_t cidx; /* consumer idx (buffer idx, NOT hw desc idx) */ + uint32_t rx_offset; /* offset in fl buf (when buffer packing) */ uint32_t pidx; /* producer idx (buffer idx, NOT hw desc idx) */ uint32_t needed; /* # of buffers needed to fill up fl. */ uint32_t lowat; /* # of buffers <= this means fl needs help */ uint32_t pending; /* # of bufs allocated since last doorbell */ - unsigned int dmamap_failed; + u_int dmamap_failed; + struct mbuf *mstash[8]; TAILQ_ENTRY(sge_fl) link; /* All starving freelists */ }; @@ -518,6 +534,9 @@ struct sge { int eq_start; struct sge_iq **iqmap; /* iq->cntxt_id to iq mapping */ struct sge_eq **eqmap; /* eq->cntxt_id to eq mapping */ + + u_int fl_buf_sizes __aligned(CACHE_LINE_SIZE); + struct fl_buf_info fl_buf_info[FL_BUF_SIZES_MAX]; }; struct rss_header; Modified: stable/9/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_sge.c Wed May 7 03:17:21 2014 (r265480) +++ stable/9/sys/dev/cxgbe/t4_sge.c Wed May 7 04:00:05 2014 (r265481) @@ -56,19 +56,6 @@ __FBSDID("$FreeBSD$"); #include "common/t4_regs_values.h" #include "common/t4_msg.h" -struct fl_buf_info { - int size; - int type; - uma_zone_t zone; -}; - -/* Filled up by t4_sge_modload */ -static struct fl_buf_info fl_buf_info[FL_BUF_SIZES]; - -#define FL_BUF_SIZE(x) (fl_buf_info[x].size) -#define FL_BUF_TYPE(x) (fl_buf_info[x].type) -#define FL_BUF_ZONE(x) (fl_buf_info[x].zone) - #ifdef T4_PKT_TIMESTAMP #define RX_COPY_THRESHOLD (MINCLSIZE - 8) #else @@ -85,7 +72,8 @@ TUNABLE_INT("hw.cxgbe.fl_pktshift", &fl_ /* * Pad ethernet payload up to this boundary. * -1: driver should figure out a good value. - * Any power of 2, from 32 to 4096 (both inclusive) is a valid value. + * 0: disable padding. + * Any power of 2 from 32 to 4096 (both inclusive) is also a valid value. */ static int fl_pad = -1; TUNABLE_INT("hw.cxgbe.fl_pad", &fl_pad); @@ -107,6 +95,33 @@ TUNABLE_INT("hw.cxgbe.spg_len", &spg_len static int cong_drop = 0; TUNABLE_INT("hw.cxgbe.cong_drop", &cong_drop); +/* + * Deliver multiple frames in the same free list buffer if they fit. + * -1: let the driver decide whether to enable buffer packing or not. + * 0: disable buffer packing. + * 1: enable buffer packing. + */ +static int buffer_packing = -1; +TUNABLE_INT("hw.cxgbe.buffer_packing", &buffer_packing); + +/* + * Start next frame in a packed buffer at this boundary. + * -1: driver should figure out a good value. + * T4: + * --- + * if fl_pad != 0 + * value specified here will be overridden by fl_pad. + * else + * power of 2 from 32 to 4096 (both inclusive) is a valid value here. + * T5: + * --- + * 16, or a power of 2 from 64 to 4096 (both inclusive) is a valid value. + */ +static int fl_pack = -1; +static int t4_fl_pack; +static int t5_fl_pack; +TUNABLE_INT("hw.cxgbe.fl_pack", &fl_pack); + /* Used to track coalesced tx work request */ struct txpkts { uint64_t *flitp; /* ptr to flit where next pkt should start */ @@ -123,12 +138,15 @@ struct sgl { }; static int service_iq(struct sge_iq *, int); -static struct mbuf *get_fl_payload(struct adapter *, struct sge_fl *, uint32_t, +static struct mbuf *get_fl_payload1(struct adapter *, struct sge_fl *, uint32_t, + int *); +static struct mbuf *get_fl_payload2(struct adapter *, struct sge_fl *, uint32_t, int *); static int t4_eth_rx(struct sge_iq *, const struct rss_header *, struct mbuf *); static inline void init_iq(struct sge_iq *, struct adapter *, int, int, int, int); -static inline void init_fl(struct sge_fl *, int, int, char *); +static inline void init_fl(struct adapter *, struct sge_fl *, int, int, int, + char *); static inline void init_eq(struct sge_eq *, int, int, uint8_t, uint16_t, char *); static int alloc_ring(struct adapter *, size_t, bus_dma_tag_t *, bus_dmamap_t *, @@ -170,8 +188,8 @@ static inline void ring_fl_db(struct ada static int refill_fl(struct adapter *, struct sge_fl *, int); static void refill_sfl(void *); static int alloc_fl_sdesc(struct sge_fl *); -static void free_fl_sdesc(struct sge_fl *); -static void set_fl_tag_idx(struct sge_fl *, int); +static void free_fl_sdesc(struct adapter *, struct sge_fl *); +static void set_fl_tag_idx(struct adapter *, struct sge_fl *, int); static void add_fl_to_sfl(struct adapter *, struct sge_fl *); static int get_pkt_sgl(struct sge_txq *, struct mbuf **, struct sgl *, int); @@ -198,27 +216,20 @@ static int handle_fw_msg(struct sge_iq * static int sysctl_uint16(SYSCTL_HANDLER_ARGS); /* - * Called on MOD_LOAD. Fills up fl_buf_info[] and validates/calculates the SGE - * tunables. + * Called on MOD_LOAD. Validates and calculates the SGE tunables. */ void t4_sge_modload(void) { - int i; - int bufsize[FL_BUF_SIZES] = { - MCLBYTES, -#if MJUMPAGESIZE != MCLBYTES - MJUMPAGESIZE, -#endif - MJUM9BYTES, - MJUM16BYTES - }; + int pad; - for (i = 0; i < FL_BUF_SIZES; i++) { - FL_BUF_SIZE(i) = bufsize[i]; - FL_BUF_TYPE(i) = m_gettype(bufsize[i]); - FL_BUF_ZONE(i) = m_getzone(bufsize[i]); - } + /* set pad to a reasonable powerof2 between 16 and 4096 (inclusive) */ +#if defined(__i386__) || defined(__amd64__) + pad = max(cpu_clflush_line_size, 16); +#else + pad = max(CACHE_LINE_SIZE, 16); +#endif + pad = min(pad, 4096); if (fl_pktshift < 0 || fl_pktshift > 7) { printf("Invalid hw.cxgbe.fl_pktshift value (%d)," @@ -226,23 +237,35 @@ t4_sge_modload(void) fl_pktshift = 2; } - if (fl_pad < 32 || fl_pad > 4096 || !powerof2(fl_pad)) { - int pad; - -#if defined(__i386__) || defined(__amd64__) - pad = max(cpu_clflush_line_size, 32); -#else - pad = max(CACHE_LINE_SIZE, 32); -#endif - pad = min(pad, 4096); + if (fl_pad != 0 && + (fl_pad < 32 || fl_pad > 4096 || !powerof2(fl_pad))) { if (fl_pad != -1) { printf("Invalid hw.cxgbe.fl_pad value (%d)," - " using %d instead.\n", fl_pad, pad); + " using %d instead.\n", fl_pad, max(pad, 32)); } - fl_pad = pad; + fl_pad = max(pad, 32); } + /* + * T4 has the same pad and pack boundary. If a pad boundary is set, + * pack boundary must be set to the same value. Otherwise take the + * specified value or auto-calculate something reasonable. + */ + if (fl_pad) + t4_fl_pack = fl_pad; + else if (fl_pack < 32 || fl_pack > 4096 || !powerof2(fl_pack)) + t4_fl_pack = max(pad, 32); + else + t4_fl_pack = fl_pack; + + /* T5's pack boundary is independent of the pad boundary. */ + if (fl_pack < 16 || fl_pack == 32 || fl_pack > 4096 || + !powerof2(fl_pack)) + t5_fl_pack = max(pad, 64); + else + t5_fl_pack = fl_pack; + if (spg_len != 64 && spg_len != 128) { int len; @@ -289,17 +312,41 @@ t4_tweak_chip_settings(struct adapter *s int timer_max = M_TIMERVALUE0 * 1000 / sc->params.vpd.cclk; int intr_pktcount[SGE_NCOUNTERS] = {1, 8, 16, 32}; /* 63 max */ uint16_t indsz = min(RX_COPY_THRESHOLD - 1, M_INDICATESIZE); + int sw_flbuf_sizes[] = { + MCLBYTES, +#if MJUMPAGESIZE != MCLBYTES + MJUMPAGESIZE, +#endif + MJUM9BYTES, + MJUM16BYTES, + MJUMPAGESIZE - MSIZE + }; KASSERT(sc->flags & MASTER_PF, ("%s: trying to change chip settings when not master.", __func__)); - m = V_PKTSHIFT(M_PKTSHIFT) | F_RXPKTCPLMODE | - V_INGPADBOUNDARY(M_INGPADBOUNDARY) | F_EGRSTATUSPAGESIZE; + m = V_PKTSHIFT(M_PKTSHIFT) | F_RXPKTCPLMODE | F_EGRSTATUSPAGESIZE; v = V_PKTSHIFT(fl_pktshift) | F_RXPKTCPLMODE | - V_INGPADBOUNDARY(ilog2(fl_pad) - 5) | V_EGRSTATUSPAGESIZE(spg_len == 128); + if (is_t4(sc) && (fl_pad || buffer_packing)) { + /* t4_fl_pack has the correct value even when fl_pad = 0 */ + m |= V_INGPADBOUNDARY(M_INGPADBOUNDARY); + v |= V_INGPADBOUNDARY(ilog2(t4_fl_pack) - 5); + } else if (is_t5(sc) && fl_pad) { + m |= V_INGPADBOUNDARY(M_INGPADBOUNDARY); + v |= V_INGPADBOUNDARY(ilog2(fl_pad) - 5); + } t4_set_reg_field(sc, A_SGE_CONTROL, m, v); + if (is_t5(sc) && buffer_packing) { + m = V_INGPACKBOUNDARY(M_INGPACKBOUNDARY); + if (t5_fl_pack == 16) + v = V_INGPACKBOUNDARY(0); + else + v = V_INGPACKBOUNDARY(ilog2(t5_fl_pack) - 5); + t4_set_reg_field(sc, A_SGE_CONTROL2, m, v); + } + v = V_HOSTPAGESIZEPF0(PAGE_SHIFT - 10) | V_HOSTPAGESIZEPF1(PAGE_SHIFT - 10) | V_HOSTPAGESIZEPF2(PAGE_SHIFT - 10) | @@ -310,9 +357,9 @@ t4_tweak_chip_settings(struct adapter *s V_HOSTPAGESIZEPF7(PAGE_SHIFT - 10); t4_write_reg(sc, A_SGE_HOST_PAGE_SIZE, v); - for (i = 0; i < FL_BUF_SIZES; i++) { + for (i = 0; i < min(nitems(sw_flbuf_sizes), 16); i++) { t4_write_reg(sc, A_SGE_FL_BUFFER_SIZE0 + (4 * i), - FL_BUF_SIZE(i)); + sw_flbuf_sizes[i]); } v = V_THRESHOLD_0(intr_pktcount[0]) | V_THRESHOLD_1(intr_pktcount[1]) | @@ -373,21 +420,48 @@ int t4_read_chip_settings(struct adapter *sc) { struct sge *s = &sc->sge; - int i, rc = 0; + int i, j, n, rc = 0; uint32_t m, v, r; uint16_t indsz = min(RX_COPY_THRESHOLD - 1, M_INDICATESIZE); + uint32_t sge_flbuf_sizes[16], sw_flbuf_sizes[] = { + MCLBYTES, +#if MJUMPAGESIZE != MCLBYTES + MJUMPAGESIZE, +#endif + MJUM9BYTES, + MJUM16BYTES + }; - m = V_PKTSHIFT(M_PKTSHIFT) | F_RXPKTCPLMODE | - V_INGPADBOUNDARY(M_INGPADBOUNDARY) | F_EGRSTATUSPAGESIZE; + m = V_PKTSHIFT(M_PKTSHIFT) | F_RXPKTCPLMODE | F_EGRSTATUSPAGESIZE; v = V_PKTSHIFT(fl_pktshift) | F_RXPKTCPLMODE | - V_INGPADBOUNDARY(ilog2(fl_pad) - 5) | V_EGRSTATUSPAGESIZE(spg_len == 128); + if (is_t4(sc) && (fl_pad || buffer_packing)) { + m |= V_INGPADBOUNDARY(M_INGPADBOUNDARY); + v |= V_INGPADBOUNDARY(ilog2(t4_fl_pack) - 5); + } else if (is_t5(sc) && fl_pad) { + m |= V_INGPADBOUNDARY(M_INGPADBOUNDARY); + v |= V_INGPADBOUNDARY(ilog2(fl_pad) - 5); + } r = t4_read_reg(sc, A_SGE_CONTROL); if ((r & m) != v) { device_printf(sc->dev, "invalid SGE_CONTROL(0x%x)\n", r); rc = EINVAL; } + if (is_t5(sc) && buffer_packing) { + m = V_INGPACKBOUNDARY(M_INGPACKBOUNDARY); + if (t5_fl_pack == 16) + v = V_INGPACKBOUNDARY(0); + else + v = V_INGPACKBOUNDARY(ilog2(t5_fl_pack) - 5); + r = t4_read_reg(sc, A_SGE_CONTROL2); + if ((r & m) != v) { + device_printf(sc->dev, + "invalid SGE_CONTROL2(0x%x)\n", r); + rc = EINVAL; + } + } + v = V_HOSTPAGESIZEPF0(PAGE_SHIFT - 10) | V_HOSTPAGESIZEPF1(PAGE_SHIFT - 10) | V_HOSTPAGESIZEPF2(PAGE_SHIFT - 10) | @@ -402,14 +476,45 @@ t4_read_chip_settings(struct adapter *sc rc = EINVAL; } - for (i = 0; i < FL_BUF_SIZES; i++) { - v = t4_read_reg(sc, A_SGE_FL_BUFFER_SIZE0 + (4 * i)); - if (v != FL_BUF_SIZE(i)) { - device_printf(sc->dev, - "invalid SGE_FL_BUFFER_SIZE[%d](0x%x)\n", i, v); - rc = EINVAL; + /* + * Make a list of SGE FL buffer sizes programmed in the chip and tally + * it with the FL buffer sizes that we'd like to use. + */ + n = 0; + for (i = 0; i < nitems(sge_flbuf_sizes); i++) { + r = t4_read_reg(sc, A_SGE_FL_BUFFER_SIZE0 + (4 * i)); + sge_flbuf_sizes[i] = r; + if (r == MJUMPAGESIZE - MSIZE && + (sc->flags & BUF_PACKING_OK) == 0) { + sc->flags |= BUF_PACKING_OK; + FL_BUF_HWTAG(sc, n) = i; + FL_BUF_SIZE(sc, n) = MJUMPAGESIZE - MSIZE; + FL_BUF_TYPE(sc, n) = m_gettype(MJUMPAGESIZE); + FL_BUF_ZONE(sc, n) = m_getzone(MJUMPAGESIZE); + n++; + } + } + for (i = 0; i < nitems(sw_flbuf_sizes); i++) { + for (j = 0; j < nitems(sge_flbuf_sizes); j++) { + if (sw_flbuf_sizes[i] != sge_flbuf_sizes[j]) + continue; + FL_BUF_HWTAG(sc, n) = j; + FL_BUF_SIZE(sc, n) = sw_flbuf_sizes[i]; + FL_BUF_TYPE(sc, n) = m_gettype(sw_flbuf_sizes[i]); + FL_BUF_ZONE(sc, n) = m_getzone(sw_flbuf_sizes[i]); + n++; + break; } } + if (n == 0) { + device_printf(sc->dev, "no usable SGE FL buffer size.\n"); + rc = EINVAL; + } else if (n == 1 && (sc->flags & BUF_PACKING_OK)) { + device_printf(sc->dev, + "no usable SGE FL buffer size when not packing buffers.\n"); + rc = EINVAL; + } + FL_BUF_SIZES(sc) = n; r = t4_read_reg(sc, A_SGE_INGRESS_RX_THRESHOLD); s->counter_val[0] = G_THRESHOLD_0(r); @@ -496,6 +601,17 @@ t4_create_dma_tag(struct adapter *sc) return (rc); } +static inline int +enable_buffer_packing(struct adapter *sc) +{ + + if (sc->flags & BUF_PACKING_OK && + ((is_t5(sc) && buffer_packing) || /* 1 or -1 both ok for T5 */ + (is_t4(sc) && buffer_packing == 1))) + return (1); + return (0); +} + void t4_sge_sysctls(struct adapter *sc, struct sysctl_ctx_list *ctx, struct sysctl_oid_list *children) @@ -512,6 +628,14 @@ t4_sge_sysctls(struct adapter *sc, struc SYSCTL_ADD_INT(ctx, children, OID_AUTO, "cong_drop", CTLFLAG_RD, NULL, cong_drop, "congestion drop setting"); + + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "buffer_packing", CTLFLAG_RD, + NULL, enable_buffer_packing(sc), + "pack multiple frames in one fl buffer"); + + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "fl_pack", CTLFLAG_RD, + NULL, is_t5(sc) ? t5_fl_pack : t4_fl_pack, + "payload pack boundary (bytes)"); } int @@ -703,7 +827,7 @@ t4_setup_port_queues(struct port_info *p struct ifnet *ifp = pi->ifp; struct sysctl_oid *oid = device_get_sysctl_tree(pi->dev); struct sysctl_oid_list *children = SYSCTL_CHILDREN(oid); - int bufsize; + int bufsize, pack; oid = SYSCTL_ADD_NODE(&pi->ctx, children, OID_AUTO, "rxq", CTLFLAG_RD, NULL, "rx queues"); @@ -725,6 +849,7 @@ t4_setup_port_queues(struct port_info *p * b) allocate queue iff it will take direct interrupts. */ bufsize = mtu_to_bufsize(ifp->if_mtu); + pack = enable_buffer_packing(sc); for_each_rxq(pi, i, rxq) { init_iq(&rxq->iq, sc, pi->tmr_idx, pi->pktc_idx, pi->qsize_rxq, @@ -732,7 +857,7 @@ t4_setup_port_queues(struct port_info *p snprintf(name, sizeof(name), "%s rxq%d-fl", device_get_nameunit(pi->dev), i); - init_fl(&rxq->fl, pi->qsize_rxq / 8, bufsize, name); + init_fl(sc, &rxq->fl, pi->qsize_rxq / 8, bufsize, pack, name); if (sc->flags & INTR_DIRECT #ifdef TCP_OFFLOAD @@ -749,6 +874,7 @@ t4_setup_port_queues(struct port_info *p #ifdef TCP_OFFLOAD bufsize = mtu_to_bufsize_toe(sc, ifp->if_mtu); + pack = 0; /* XXX: think about this some more */ for_each_ofld_rxq(pi, i, ofld_rxq) { init_iq(&ofld_rxq->iq, sc, pi->tmr_idx, pi->pktc_idx, @@ -756,7 +882,8 @@ t4_setup_port_queues(struct port_info *p snprintf(name, sizeof(name), "%s ofld_rxq%d-fl", device_get_nameunit(pi->dev), i); - init_fl(&ofld_rxq->fl, pi->qsize_rxq / 8, bufsize, name); + init_fl(sc, &ofld_rxq->fl, pi->qsize_rxq / 8, bufsize, pack, + name); if (sc->flags & INTR_DIRECT || (sc->intr_count > 1 && pi->nofldrxq > pi->nrxq)) { @@ -1030,7 +1157,12 @@ service_iq(struct sge_iq *iq, int budget ("%s: data for an iq (%p) with no freelist", __func__, iq)); - m0 = get_fl_payload(sc, fl, lq, &fl_bufs_used); + m0 = fl->flags & FL_BUF_PACKING ? + get_fl_payload1(sc, fl, lq, &fl_bufs_used) : + get_fl_payload2(sc, fl, lq, &fl_bufs_used); + + if (__predict_false(m0 == NULL)) + goto process_iql; #ifdef T4_PKT_TIMESTAMP /* * 60 bit timestamp for the payload is @@ -1106,6 +1238,7 @@ service_iq(struct sge_iq *iq, int budget } } +process_iql: if (STAILQ_EMPTY(&iql)) break; @@ -1151,13 +1284,100 @@ service_iq(struct sge_iq *iq, int budget return (0); } +static int +fill_mbuf_stash(struct sge_fl *fl) +{ + int i; + + for (i = 0; i < nitems(fl->mstash); i++) { + if (fl->mstash[i] == NULL) { + struct mbuf *m; + if ((m = m_get(M_NOWAIT, MT_NOINIT)) == NULL) + return (ENOBUFS); + fl->mstash[i] = m; + } + } + return (0); +} + static struct mbuf * -get_fl_payload(struct adapter *sc, struct sge_fl *fl, uint32_t len_newbuf, +get_mbuf_from_stash(struct sge_fl *fl) +{ + int i; + + for (i = 0; i < nitems(fl->mstash); i++) { + if (fl->mstash[i] != NULL) { + struct mbuf *m; + + m = fl->mstash[i]; + fl->mstash[i] = NULL; + return (m); + } else + fl->mstash[i] = m_get(M_NOWAIT, MT_NOINIT); + } + + return (m_get(M_NOWAIT, MT_NOINIT)); +} + +static void +return_mbuf_to_stash(struct sge_fl *fl, struct mbuf *m) +{ + int i; + + if (m == NULL) + return; + + for (i = 0; i < nitems(fl->mstash); i++) { + if (fl->mstash[i] == NULL) { + fl->mstash[i] = m; + return; + } + } + m_init(m, NULL, 0, M_NOWAIT, MT_DATA, 0); + m_free(m); +} + +/* buf can be any address within the buffer */ +static inline u_int * +find_buf_refcnt(caddr_t buf) +{ + uintptr_t ptr = (uintptr_t)buf; + + return ((u_int *)((ptr & ~(MJUMPAGESIZE - 1)) + MSIZE - sizeof(u_int))); +} + +static inline struct mbuf * +find_buf_mbuf(caddr_t buf) +{ + uintptr_t ptr = (uintptr_t)buf; + + return ((struct mbuf *)(ptr & ~(MJUMPAGESIZE - 1))); +} + +static void +rxb_free(void *arg1, void *arg2) +{ + uma_zone_t zone = arg1; + caddr_t cl = arg2; +#ifdef INVARIANTS + u_int refcount; + + refcount = *find_buf_refcnt(cl); + KASSERT(refcount == 0, ("%s: cl %p refcount is %u", __func__, + cl - MSIZE, refcount)); +#endif + cl -= MSIZE; + uma_zfree(zone, cl); +} + +static struct mbuf * +get_fl_payload1(struct adapter *sc, struct sge_fl *fl, uint32_t len_newbuf, int *fl_bufs_used) { struct mbuf *m0, *m; struct fl_sdesc *sd = &fl->sdesc[fl->cidx]; unsigned int nbuf, len; + int pack_boundary = is_t4(sc) ? t4_fl_pack : t5_fl_pack; /* * No assertion for the fl lock because we don't need it. This routine @@ -1168,29 +1388,194 @@ get_fl_payload(struct adapter *sc, struc * lock but this routine does not). */ + KASSERT(fl->flags & FL_BUF_PACKING, + ("%s: buffer packing disabled for fl %p", __func__, fl)); + + len = G_RSPD_LEN(len_newbuf); + + if ((len_newbuf & F_RSPD_NEWBUF) == 0) { + KASSERT(fl->rx_offset > 0, + ("%s: packed frame but driver at offset=0", __func__)); + + /* A packed frame is guaranteed to fit entirely in this buf. */ + KASSERT(FL_BUF_SIZE(sc, sd->tag_idx) - fl->rx_offset >= len, + ("%s: packing error. bufsz=%u, offset=%u, len=%u", + __func__, FL_BUF_SIZE(sc, sd->tag_idx), fl->rx_offset, + len)); + + m0 = get_mbuf_from_stash(fl); + if (m0 == NULL || + m_init(m0, NULL, 0, M_NOWAIT, MT_DATA, M_PKTHDR) != 0) { + return_mbuf_to_stash(fl, m0); + return (NULL); + } + + bus_dmamap_sync(fl->tag[sd->tag_idx], sd->map, + BUS_DMASYNC_POSTREAD); + if (len < RX_COPY_THRESHOLD) { +#ifdef T4_PKT_TIMESTAMP + /* Leave room for a timestamp */ + m0->m_data += 8; +#endif + bcopy(sd->cl + fl->rx_offset, mtod(m0, caddr_t), len); + m0->m_pkthdr.len = len; + m0->m_len = len; + } else { + m0->m_pkthdr.len = len; + m0->m_len = len; + m_extaddref(m0, sd->cl + fl->rx_offset, + roundup2(m0->m_len, fl_pad), + find_buf_refcnt(sd->cl), rxb_free, + FL_BUF_ZONE(sc, sd->tag_idx), sd->cl); + } + fl->rx_offset += len; + fl->rx_offset = roundup2(fl->rx_offset, fl_pad); + fl->rx_offset = roundup2(fl->rx_offset, pack_boundary); + if (fl->rx_offset >= FL_BUF_SIZE(sc, sd->tag_idx)) { + fl->rx_offset = 0; + (*fl_bufs_used) += 1; + if (__predict_false(++fl->cidx == fl->cap)) + fl->cidx = 0; + } + + return (m0); + } + + KASSERT(len_newbuf & F_RSPD_NEWBUF, + ("%s: only new buffer handled here", __func__)); + + nbuf = 0; + + /* + * Move to the start of the next buffer if we are still in the middle of + * some buffer. This is the case where there was some room left in the + * previous buffer but not enough to fit this frame in its entirety. + */ + if (fl->rx_offset > 0) { + KASSERT(roundup2(len, fl_pad) > FL_BUF_SIZE(sc, sd->tag_idx) - + fl->rx_offset, ("%s: frame (%u bytes) should have fit at " + "cidx %u offset %u bufsize %u", __func__, len, fl->cidx, + fl->rx_offset, FL_BUF_SIZE(sc, sd->tag_idx))); + nbuf++; + fl->rx_offset = 0; + sd++; + if (__predict_false(++fl->cidx == fl->cap)) { + sd = fl->sdesc; + fl->cidx = 0; + } + } + + m0 = find_buf_mbuf(sd->cl); + if (m_init(m0, NULL, 0, M_NOWAIT, MT_DATA, M_PKTHDR | M_NOFREE)) + goto done; + bus_dmamap_sync(fl->tag[sd->tag_idx], sd->map, BUS_DMASYNC_POSTREAD); + m0->m_len = min(len, FL_BUF_SIZE(sc, sd->tag_idx)); + m_extaddref(m0, sd->cl, roundup2(m0->m_len, fl_pad), + find_buf_refcnt(sd->cl), rxb_free, FL_BUF_ZONE(sc, sd->tag_idx), + sd->cl); + m0->m_pkthdr.len = len; + + fl->rx_offset = roundup2(m0->m_len, fl_pad); + fl->rx_offset = roundup2(fl->rx_offset, pack_boundary); + if (fl->rx_offset >= FL_BUF_SIZE(sc, sd->tag_idx)) { + fl->rx_offset = 0; + nbuf++; + sd++; + if (__predict_false(++fl->cidx == fl->cap)) { + sd = fl->sdesc; + fl->cidx = 0; + } + } + + m = m0; + len -= m->m_len; + + while (len > 0) { + m->m_next = find_buf_mbuf(sd->cl); + m = m->m_next; + + bus_dmamap_sync(fl->tag[sd->tag_idx], sd->map, + BUS_DMASYNC_POSTREAD); + + /* m_init for !M_PKTHDR can't fail so don't bother */ + m_init(m, NULL, 0, M_NOWAIT, MT_DATA, M_NOFREE); + m->m_len = min(len, FL_BUF_SIZE(sc, sd->tag_idx)); + m_extaddref(m, sd->cl, roundup2(m->m_len, fl_pad), + find_buf_refcnt(sd->cl), rxb_free, + FL_BUF_ZONE(sc, sd->tag_idx), sd->cl); + + fl->rx_offset = roundup2(m->m_len, fl_pad); + fl->rx_offset = roundup2(fl->rx_offset, pack_boundary); + if (fl->rx_offset >= FL_BUF_SIZE(sc, sd->tag_idx)) { + fl->rx_offset = 0; + nbuf++; + sd++; + if (__predict_false(++fl->cidx == fl->cap)) { + sd = fl->sdesc; + fl->cidx = 0; + } + } + + len -= m->m_len; + } +done: + (*fl_bufs_used) += nbuf; + return (m0); +} + +static struct mbuf * +get_fl_payload2(struct adapter *sc, struct sge_fl *fl, uint32_t len_newbuf, + int *fl_bufs_used) +{ + struct mbuf *m0, *m; + struct fl_sdesc *sd = &fl->sdesc[fl->cidx]; + unsigned int nbuf, len; + + /* + * No assertion for the fl lock because we don't need it. This routine + * is called only from the rx interrupt handler and it only updates + * fl->cidx. (Contrast that with fl->pidx/fl->needed which could be + * updated in the rx interrupt handler or the starvation helper routine. + * That's why code that manipulates fl->pidx/fl->needed needs the fl + * lock but this routine does not). + */ + + KASSERT((fl->flags & FL_BUF_PACKING) == 0, + ("%s: buffer packing enabled for fl %p", __func__, fl)); if (__predict_false((len_newbuf & F_RSPD_NEWBUF) == 0)) panic("%s: cannot handle packed frames", __func__); len = G_RSPD_LEN(len_newbuf); - m0 = sd->m; - sd->m = NULL; /* consumed */ + /* + * We never want to run out of mbufs in between a frame when a frame + * spans multiple fl buffers. If the fl's mbuf stash isn't full and + * can't be filled up to the brim then fail early. + */ + if (len > FL_BUF_SIZE(sc, sd->tag_idx) && fill_mbuf_stash(fl) != 0) + return (NULL); + + m0 = get_mbuf_from_stash(fl); + if (m0 == NULL || + m_init(m0, NULL, 0, M_NOWAIT, MT_DATA, M_PKTHDR) != 0) { + return_mbuf_to_stash(fl, m0); + return (NULL); + } bus_dmamap_sync(fl->tag[sd->tag_idx], sd->map, BUS_DMASYNC_POSTREAD); - m_init(m0, NULL, 0, M_NOWAIT, MT_DATA, M_PKTHDR); -#ifdef T4_PKT_TIMESTAMP - /* Leave room for a timestamp */ - m0->m_data += 8; -#endif if (len < RX_COPY_THRESHOLD) { +#ifdef T4_PKT_TIMESTAMP + /* Leave room for a timestamp */ + m0->m_data += 8; +#endif /* copy data to mbuf, buffer will be recycled */ bcopy(sd->cl, mtod(m0, caddr_t), len); m0->m_len = len; } else { bus_dmamap_unload(fl->tag[sd->tag_idx], sd->map); - m_cljset(m0, sd->cl, FL_BUF_TYPE(sd->tag_idx)); + m_cljset(m0, sd->cl, FL_BUF_TYPE(sc, sd->tag_idx)); sd->cl = NULL; /* consumed */ - m0->m_len = min(len, FL_BUF_SIZE(sd->tag_idx)); + m0->m_len = min(len, FL_BUF_SIZE(sc, sd->tag_idx)); } m0->m_pkthdr.len = len; @@ -1205,23 +1590,23 @@ get_fl_payload(struct adapter *sc, struc nbuf = 1; /* # of fl buffers used */ while (len > 0) { - m->m_next = sd->m; - sd->m = NULL; /* consumed */ + /* Can't fail, we checked earlier that the stash was full. */ + m->m_next = get_mbuf_from_stash(fl); m = m->m_next; bus_dmamap_sync(fl->tag[sd->tag_idx], sd->map, BUS_DMASYNC_POSTREAD); + /* m_init for !M_PKTHDR can't fail so don't bother */ m_init(m, NULL, 0, M_NOWAIT, MT_DATA, 0); if (len <= MLEN) { bcopy(sd->cl, mtod(m, caddr_t), len); m->m_len = len; } else { - bus_dmamap_unload(fl->tag[sd->tag_idx], - sd->map); - m_cljset(m, sd->cl, FL_BUF_TYPE(sd->tag_idx)); + bus_dmamap_unload(fl->tag[sd->tag_idx], sd->map); + m_cljset(m, sd->cl, FL_BUF_TYPE(sc, sd->tag_idx)); sd->cl = NULL; /* consumed */ - m->m_len = min(len, FL_BUF_SIZE(sd->tag_idx)); + m->m_len = min(len, FL_BUF_SIZE(sc, sd->tag_idx)); } sd++; @@ -1586,6 +1971,7 @@ void t4_update_fl_bufsize(struct ifnet *ifp) { struct port_info *pi = ifp->if_softc; + struct adapter *sc = pi->adapter; struct sge_rxq *rxq; #ifdef TCP_OFFLOAD struct sge_ofld_rxq *ofld_rxq; @@ -1598,7 +1984,7 @@ t4_update_fl_bufsize(struct ifnet *ifp) fl = &rxq->fl; FL_LOCK(fl); - set_fl_tag_idx(fl, bufsize); + set_fl_tag_idx(sc, fl, bufsize); FL_UNLOCK(fl); } #ifdef TCP_OFFLOAD @@ -1607,7 +1993,7 @@ t4_update_fl_bufsize(struct ifnet *ifp) fl = &ofld_rxq->fl; FL_LOCK(fl); - set_fl_tag_idx(fl, bufsize); + set_fl_tag_idx(sc, fl, bufsize); FL_UNLOCK(fl); } #endif @@ -1641,11 +2027,15 @@ init_iq(struct sge_iq *iq, struct adapte } static inline void -init_fl(struct sge_fl *fl, int qsize, int bufsize, char *name) +init_fl(struct adapter *sc, struct sge_fl *fl, int qsize, int bufsize, int pack, + char *name) { + fl->qsize = qsize; strlcpy(fl->lockname, name, sizeof(fl->lockname)); - set_fl_tag_idx(fl, bufsize); + if (pack) + fl->flags |= FL_BUF_PACKING; + set_fl_tag_idx(sc, fl, bufsize); } static inline void @@ -1774,7 +2164,7 @@ alloc_iq_fl(struct port_info *pi, struct if (fl) { mtx_init(&fl->fl_lock, fl->lockname, NULL, MTX_DEF); - for (i = 0; i < FL_BUF_SIZES; i++) { + for (i = 0; i < FL_BUF_SIZES(sc); i++) { /* * A freelist buffer must be 16 byte aligned as the SGE @@ -1783,8 +2173,8 @@ alloc_iq_fl(struct port_info *pi, struct */ rc = bus_dma_tag_create(sc->dmat, 16, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, - FL_BUF_SIZE(i), 1, FL_BUF_SIZE(i), BUS_DMA_ALLOCNOW, - NULL, NULL, &fl->tag[i]); + FL_BUF_SIZE(sc, i), 1, FL_BUF_SIZE(sc, i), + BUS_DMA_ALLOCNOW, NULL, NULL, &fl->tag[i]); if (rc != 0) { device_printf(sc->dev, "failed to create fl DMA tag[%d]: %d\n", @@ -1813,7 +2203,9 @@ alloc_iq_fl(struct port_info *pi, struct c.iqns_to_fl0congen |= htobe32(V_FW_IQ_CMD_FL0HOSTFCMODE(X_HOSTFCMODE_NONE) | F_FW_IQ_CMD_FL0FETCHRO | F_FW_IQ_CMD_FL0DATARO | - F_FW_IQ_CMD_FL0PADEN); + (fl_pad ? F_FW_IQ_CMD_FL0PADEN : 0) | + (fl->flags & FL_BUF_PACKING ? F_FW_IQ_CMD_FL0PACKEN : + 0)); if (cong >= 0) { c.iqns_to_fl0congen |= htobe32(V_FW_IQ_CMD_FL0CNGCHMAP(cong) | @@ -1934,12 +2326,21 @@ free_iq_fl(struct port_info *pi, struct fl->desc); if (fl->sdesc) - free_fl_sdesc(fl); + free_fl_sdesc(sc, fl); + + for (i = 0; i < nitems(fl->mstash); i++) { + struct mbuf *m = fl->mstash[i]; + + if (m != NULL) { + m_init(m, NULL, 0, M_NOWAIT, MT_DATA, 0); + m_free(m); + } + } if (mtx_initialized(&fl->fl_lock)) mtx_destroy(&fl->fl_lock); - for (i = 0; i < FL_BUF_SIZES; i++) { + for (i = 0; i < FL_BUF_SIZES(sc); i++) { if (fl->tag[i]) bus_dma_tag_destroy(fl->tag[i]); } @@ -2100,6 +2501,10 @@ alloc_rxq(struct port_info *pi, struct s "SGE context id of the queue"); SYSCTL_ADD_UINT(&pi->ctx, children, OID_AUTO, "cidx", CTLFLAG_RD, &rxq->fl.cidx, 0, "consumer index"); + if (rxq->fl.flags & FL_BUF_PACKING) { + SYSCTL_ADD_UINT(&pi->ctx, children, OID_AUTO, "rx_offset", + CTLFLAG_RD, &rxq->fl.rx_offset, 0, "packing rx offset"); + } SYSCTL_ADD_UINT(&pi->ctx, children, OID_AUTO, "pidx", CTLFLAG_RD, &rxq->fl.pidx, 0, "producer index"); @@ -2661,6 +3066,12 @@ refill_fl(struct adapter *sc, struct sge int rc; FL_LOCK_ASSERT_OWNED(fl); +#ifdef INVARIANTS + if (fl->flags & FL_BUF_PACKING) + KASSERT(sd->tag_idx == 0, + ("%s: expected tag 0 but found tag %d at pidx %u instead", + __func__, sd->tag_idx, fl->pidx)); +#endif if (nbufs > fl->needed) nbufs = fl->needed; @@ -2669,24 +3080,34 @@ refill_fl(struct adapter *sc, struct sge if (sd->cl != NULL) { - /* - * This happens when a frame small enough to fit *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Wed May 7 04:21:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 73175D3; Wed, 7 May 2014 04:21:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55B71D51; Wed, 7 May 2014 04:21:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s474L8gr032692; Wed, 7 May 2014 04:21:08 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s474L7Q4032688; Wed, 7 May 2014 04:21:07 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201405070421.s474L7Q4032688@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 7 May 2014 04:21:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265482 - stable/9/sys/dev/cxgbe/tom X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 04:21:08 -0000 Author: np Date: Wed May 7 04:21:07 2014 New Revision: 265482 URL: http://svnweb.freebsd.org/changeset/base/265482 Log: MFC r255198, r255410, and r255411. r255198: For TOE connections, the window scale factor in CPL_PASS_ACCEPT_REQ is set to 15 to indicate that the peer did not send a window scale option with its SYN. Do not send a window scale option in the SYN|ACK reply in that case. r255410: Fix a miscalculation that caused cxgbe/tom to auto-increment a TOE socket's tx buffer size too aggressively. r255411: Rework the tx credit mechanism between the cxgbe/tom driver and the card. This helps smooth out some burstiness in the exchange. Modified: stable/9/sys/dev/cxgbe/tom/t4_cpl_io.c stable/9/sys/dev/cxgbe/tom/t4_listen.c stable/9/sys/dev/cxgbe/tom/t4_tom.c stable/9/sys/dev/cxgbe/tom/t4_tom.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- stable/9/sys/dev/cxgbe/tom/t4_cpl_io.c Wed May 7 04:00:05 2014 (r265481) +++ stable/9/sys/dev/cxgbe/tom/t4_cpl_io.c Wed May 7 04:21:07 2014 (r265482) @@ -444,22 +444,12 @@ max_dsgl_nsegs(int tx_credits) static inline void write_tx_wr(void *dst, struct toepcb *toep, unsigned int immdlen, - unsigned int plen, uint8_t credits, int more_to_come) + unsigned int plen, uint8_t credits, int shove) { struct fw_ofld_tx_data_wr *txwr = dst; - int shove = !more_to_come; - int compl = 1; - - /* - * We always request completion notifications from the firmware. The - * only exception is when we know we'll get more data to send shortly - * and that we'll have some tx credits remaining to transmit that data. - */ - if (more_to_come && toep->tx_credits - credits >= MIN_OFLD_TX_CREDITS) - compl = 0; txwr->op_to_immdlen = htobe32(V_WR_OP(FW_OFLD_TX_DATA_WR) | - V_FW_WR_COMPL(compl) | V_FW_WR_IMMDLEN(immdlen)); + V_FW_WR_IMMDLEN(immdlen)); txwr->flowid_len16 = htobe32(V_FW_WR_FLOWID(toep->tid) | V_FW_WR_LEN16(credits)); txwr->tunnel_to_proxy = @@ -529,19 +519,26 @@ write_tx_sgl(void *dst, struct mbuf *sta * The socket's so_snd buffer consists of a stream of data starting with sb_mb * and linked together with m_next. sb_sndptr, if set, is the last mbuf that * was transmitted. + * + * drop indicates the number of bytes that should be dropped from the head of + * the send buffer. It is an optimization that lets do_fw4_ack avoid creating + * contention on the send buffer lock (before this change it used to do + * sowwakeup and then t4_push_frames right after that when recovering from tx + * stalls). When drop is set this function MUST drop the bytes and wake up any + * writers. */ static void -t4_push_frames(struct adapter *sc, struct toepcb *toep) +t4_push_frames(struct adapter *sc, struct toepcb *toep, int drop) { struct mbuf *sndptr, *m, *sb_sndptr; struct fw_ofld_tx_data_wr *txwr; struct wrqe *wr; - unsigned int plen, nsegs, credits, max_imm, max_nsegs, max_nsegs_1mbuf; + u_int plen, nsegs, credits, max_imm, max_nsegs, max_nsegs_1mbuf; struct inpcb *inp = toep->inp; struct tcpcb *tp = intotcpcb(inp); struct socket *so = inp->inp_socket; struct sockbuf *sb = &so->so_snd; - int tx_credits; + int tx_credits, shove, compl, space, sowwakeup; struct ofld_tx_sdesc *txsd = &toep->txsd[toep->txsd_pidx]; INP_WLOCK_ASSERT(inp); @@ -556,8 +553,11 @@ t4_push_frames(struct adapter *sc, struc * This function doesn't resume by itself. Someone else must clear the * flag and call this function. */ - if (__predict_false(toep->flags & TPF_TX_SUSPENDED)) + if (__predict_false(toep->flags & TPF_TX_SUSPENDED)) { + KASSERT(drop == 0, + ("%s: drop (%d) != 0 but tx is suspended", __func__, drop)); return; + } do { tx_credits = min(toep->tx_credits, MAX_OFLD_TX_CREDITS); @@ -565,6 +565,11 @@ t4_push_frames(struct adapter *sc, struc max_nsegs = max_dsgl_nsegs(tx_credits); SOCKBUF_LOCK(sb); + sowwakeup = drop; + if (drop) { + sbdrop_locked(sb, drop); + drop = 0; + } sb_sndptr = sb->sb_sndptr; sndptr = sb_sndptr ? sb_sndptr->m_next : sb->sb_mb; plen = 0; @@ -583,7 +588,11 @@ t4_push_frames(struct adapter *sc, struc if (plen == 0) { /* Too few credits */ toep->flags |= TPF_TX_SUSPENDED; - SOCKBUF_UNLOCK(sb); + if (sowwakeup) + sowwakeup_locked(so); + else + SOCKBUF_UNLOCK(sb); + SOCKBUF_UNLOCK_ASSERT(sb); return; } break; @@ -600,23 +609,32 @@ t4_push_frames(struct adapter *sc, struc } } + shove = m == NULL && !(tp->t_flags & TF_MORETOCOME); + space = sbspace(sb); + + if (space <= sb->sb_hiwat * 3 / 8 && + toep->plen_nocompl + plen >= sb->sb_hiwat / 4) + compl = 1; + else + compl = 0; + if (sb->sb_flags & SB_AUTOSIZE && V_tcp_do_autosndbuf && sb->sb_hiwat < V_tcp_autosndbuf_max && - sbspace(sb) < sb->sb_hiwat / 8 * 7) { + space < sb->sb_hiwat / 8) { int newsize = min(sb->sb_hiwat + V_tcp_autosndbuf_inc, V_tcp_autosndbuf_max); if (!sbreserve_locked(sb, newsize, so, NULL)) sb->sb_flags &= ~SB_AUTOSIZE; - else { - sowwakeup_locked(so); /* room available */ - SOCKBUF_UNLOCK_ASSERT(sb); - goto unlocked; - } + else + sowwakeup = 1; /* room available */ } - SOCKBUF_UNLOCK(sb); -unlocked: + if (sowwakeup) + sowwakeup_locked(so); + else + SOCKBUF_UNLOCK(sb); + SOCKBUF_UNLOCK_ASSERT(sb); /* nothing to send */ if (plen == 0) { @@ -641,9 +659,9 @@ unlocked: } txwr = wrtod(wr); credits = howmany(wr->wr_len, 16); - write_tx_wr(txwr, toep, plen, plen, credits, - tp->t_flags & TF_MORETOCOME); + write_tx_wr(txwr, toep, plen, plen, credits, shove); m_copydata(sndptr, 0, plen, (void *)(txwr + 1)); + nsegs = 0; } else { int wr_len; @@ -659,8 +677,7 @@ unlocked: } txwr = wrtod(wr); credits = howmany(wr_len, 16); - write_tx_wr(txwr, toep, 0, plen, credits, - tp->t_flags & TF_MORETOCOME); + write_tx_wr(txwr, toep, 0, plen, credits, shove); write_tx_sgl(txwr + 1, sndptr, m, nsegs, max_nsegs_1mbuf); if (wr_len & 0xf) { @@ -674,6 +691,17 @@ unlocked: ("%s: not enough credits", __func__)); toep->tx_credits -= credits; + toep->tx_nocompl += credits; + toep->plen_nocompl += plen; + if (toep->tx_credits <= toep->tx_total * 3 / 8 && + toep->tx_nocompl >= toep->tx_total / 4) + compl = 1; + + if (compl) { + txwr->op_to_immdlen |= htobe32(F_FW_WR_COMPL); + toep->tx_nocompl = 0; + toep->plen_nocompl = 0; + } tp->snd_nxt += plen; tp->snd_max += plen; @@ -684,6 +712,8 @@ unlocked: SOCKBUF_UNLOCK(sb); toep->flags |= TPF_TX_DATA_SENT; + if (toep->tx_credits < MIN_OFLD_TX_CREDITS) + toep->flags |= TPF_TX_SUSPENDED; KASSERT(toep->txsd_avail > 0, ("%s: no txsd", __func__)); txsd->plen = plen; @@ -717,7 +747,7 @@ t4_tod_output(struct toedev *tod, struct ("%s: inp %p dropped.", __func__, inp)); KASSERT(toep != NULL, ("%s: toep is NULL", __func__)); - t4_push_frames(sc, toep); + t4_push_frames(sc, toep, 0); return (0); } @@ -737,7 +767,8 @@ t4_send_fin(struct toedev *tod, struct t KASSERT(toep != NULL, ("%s: toep is NULL", __func__)); toep->flags |= TPF_SEND_FIN; - t4_push_frames(sc, toep); + if (tp->t_state >= TCPS_ESTABLISHED) + t4_push_frames(sc, toep, 0); return (0); } @@ -1366,7 +1397,16 @@ do_fw4_ack(struct sge_iq *iq, const stru } } - if (plen > 0) { + if (toep->tx_credits == toep->tx_total) { + toep->tx_nocompl = 0; + toep->plen_nocompl = 0; + } + + if (toep->flags & TPF_TX_SUSPENDED && + toep->tx_credits >= toep->tx_total / 4) { + toep->flags &= ~TPF_TX_SUSPENDED; + t4_push_frames(sc, toep, plen); + } else if (plen > 0) { struct sockbuf *sb = &so->so_snd; SOCKBUF_LOCK(sb); @@ -1375,14 +1415,6 @@ do_fw4_ack(struct sge_iq *iq, const stru SOCKBUF_UNLOCK_ASSERT(sb); } - /* XXX */ - if ((toep->flags & TPF_TX_SUSPENDED && - toep->tx_credits >= MIN_OFLD_TX_CREDITS) || - toep->tx_credits == toep->txsd_total * - howmany((sizeof(struct fw_ofld_tx_data_wr) + 1), 16)) { - toep->flags &= ~TPF_TX_SUSPENDED; - t4_push_frames(sc, toep); - } INP_WUNLOCK(inp); return (0); Modified: stable/9/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- stable/9/sys/dev/cxgbe/tom/t4_listen.c Wed May 7 04:00:05 2014 (r265481) +++ stable/9/sys/dev/cxgbe/tom/t4_listen.c Wed May 7 04:21:07 2014 (r265482) @@ -1007,7 +1007,7 @@ calc_opt2p(struct adapter *sc, struct po opt2 |= F_TSTAMPS_EN; if (tcpopt->sack) opt2 |= F_SACK_EN; - if (tcpopt->wsf > 0) + if (tcpopt->wsf <= 14) opt2 |= F_WND_SCALE_EN; } Modified: stable/9/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- stable/9/sys/dev/cxgbe/tom/t4_tom.c Wed May 7 04:00:05 2014 (r265481) +++ stable/9/sys/dev/cxgbe/tom/t4_tom.c Wed May 7 04:21:07 2014 (r265482) @@ -148,6 +148,7 @@ alloc_toepcb(struct port_info *pi, int t toep->td = sc->tom_softc; toep->port = pi; + toep->tx_total = tx_credits; toep->tx_credits = tx_credits; toep->ofld_txq = &sc->sge.ofld_txq[txqid]; toep->ofld_rxq = &sc->sge.ofld_rxq[rxqid]; Modified: stable/9/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- stable/9/sys/dev/cxgbe/tom/t4_tom.h Wed May 7 04:00:05 2014 (r265481) +++ stable/9/sys/dev/cxgbe/tom/t4_tom.h Wed May 7 04:21:07 2014 (r265482) @@ -99,7 +99,7 @@ struct ddp_buffer { struct toepcb { TAILQ_ENTRY(toepcb) link; /* toep_list */ - unsigned int flags; /* miscellaneous flags */ + u_int flags; /* miscellaneous flags */ struct tom_data *td; struct inpcb *inp; /* backpointer to host stack's PCB */ struct port_info *port; /* physical port */ @@ -109,13 +109,20 @@ struct toepcb { struct l2t_entry *l2te; /* L2 table entry used by this connection */ struct clip_entry *ce; /* CLIP table entry used by this tid */ int tid; /* Connection identifier */ - unsigned int tx_credits;/* tx WR credits (in 16 byte units) remaining */ - unsigned int sb_cc; /* last noted value of so_rcv->sb_cc */ + + /* tx credit handling */ + u_int tx_total; /* total tx WR credits (in 16B units) */ + u_int tx_credits; /* tx WR credits (in 16B units) available */ + u_int tx_nocompl; /* tx WR credits since last compl request */ + u_int plen_nocompl; /* payload since last compl request */ + + /* rx credit handling */ + u_int sb_cc; /* last noted value of so_rcv->sb_cc */ int rx_credits; /* rx credits (in bytes) to be returned to hw */ - unsigned int ulp_mode; /* ULP mode */ + u_int ulp_mode; /* ULP mode */ - unsigned int ddp_flags; + u_int ddp_flags; struct ddp_buffer *db[2]; time_t ddp_disabled; uint8_t ddp_score; From owner-svn-src-stable@FreeBSD.ORG Wed May 7 05:06:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DAF977AE; Wed, 7 May 2014 05:06:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4D3A140; Wed, 7 May 2014 05:06:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4756uwZ051274; Wed, 7 May 2014 05:06:56 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4756uXq051270; Wed, 7 May 2014 05:06:56 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201405070506.s4756uXq051270@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 7 May 2014 05:06:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265483 - in stable/9/sys: conf dev/cxgbe dev/cxgbe/common dev/cxgbe/firmware dev/cxgbe/tom modules/cxgbe/t4_firmware modules/cxgbe/t5_firmware X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 05:06:57 -0000 Author: np Date: Wed May 7 05:06:55 2014 New Revision: 265483 URL: http://svnweb.freebsd.org/changeset/base/265483 Log: MFC r256459: cxgbe(4): Update T4 and T5 firmwares to 1.9.12.0 Added: stable/9/sys/dev/cxgbe/firmware/t4fw-1.9.12.0.bin.uu - copied unchanged from r256459, head/sys/dev/cxgbe/firmware/t4fw-1.9.12.0.bin.uu stable/9/sys/dev/cxgbe/firmware/t5fw-1.9.12.0.bin.uu - copied unchanged from r256459, head/sys/dev/cxgbe/firmware/t5fw-1.9.12.0.bin.uu Deleted: stable/9/sys/dev/cxgbe/firmware/t4fw-1.8.11.0.bin.uu stable/9/sys/dev/cxgbe/firmware/t5fw-1.8.22.0.bin.uu Modified: stable/9/sys/conf/files stable/9/sys/dev/cxgbe/common/common.h stable/9/sys/dev/cxgbe/firmware/t4fw_cfg.txt stable/9/sys/dev/cxgbe/firmware/t4fw_cfg_uwire.txt stable/9/sys/dev/cxgbe/firmware/t4fw_interface.h stable/9/sys/dev/cxgbe/firmware/t5fw_cfg.txt stable/9/sys/dev/cxgbe/firmware/t5fw_cfg_uwire.txt stable/9/sys/dev/cxgbe/t4_main.c stable/9/sys/dev/cxgbe/tom/t4_cpl_io.c stable/9/sys/modules/cxgbe/t4_firmware/Makefile stable/9/sys/modules/cxgbe/t5_firmware/Makefile Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/conf/files ============================================================================== --- stable/9/sys/conf/files Wed May 7 04:21:07 2014 (r265482) +++ stable/9/sys/conf/files Wed May 7 05:06:55 2014 (r265483) @@ -963,7 +963,7 @@ t4fw.fwo optional cxgbe \ no-implicit-rule \ clean "t4fw.fwo" t4fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t4fw-1.8.11.0.bin.uu" \ + dependency "$S/dev/cxgbe/firmware/t4fw-1.9.12.0.bin.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t4fw.fw" @@ -987,7 +987,7 @@ t5fw.fwo optional cxgbe \ no-implicit-rule \ clean "t5fw.fwo" t5fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t5fw-1.8.22.0.bin.uu" \ + dependency "$S/dev/cxgbe/firmware/t5fw-1.9.12.0.bin.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t5fw.fw" Modified: stable/9/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/9/sys/dev/cxgbe/common/common.h Wed May 7 04:21:07 2014 (r265482) +++ stable/9/sys/dev/cxgbe/common/common.h Wed May 7 05:06:55 2014 (r265483) @@ -246,7 +246,7 @@ struct pci_params { * Firmware device log. */ struct devlog_params { - u32 memtype; /* which memory (EDC0, EDC1, MC) */ + u32 memtype; /* which memory (FW_MEMTYPE_* ) */ u32 start; /* start of log in firmware memory */ u32 size; /* size of log */ }; Copied: stable/9/sys/dev/cxgbe/firmware/t4fw-1.9.12.0.bin.uu (from r256459, head/sys/dev/cxgbe/firmware/t4fw-1.9.12.0.bin.uu) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/sys/dev/cxgbe/firmware/t4fw-1.9.12.0.bin.uu Wed May 7 05:06:55 2014 (r265483, copy of r256459, head/sys/dev/cxgbe/firmware/t4fw-1.9.12.0.bin.uu) @@ -0,0 +1,8705 @@ +/*- + * Copyright (c) 2013 Chelsio Communications, Inc. + * All rights reserved. + * + * 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. + */ +begin-base64 644 t4fw +AAADxgEJDAAAAQkBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAA6sDugPBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAENoZWxzaW8gRlcgUlVOTUVNIERFQlVHPTAgKEJ1aWx0IEZyaSBPY3QgMTEgMjM6 +MDY6MDEgUERUIDIwMTMgb24gY2xlb3BhdHJhLmFzaWNkZXNpZ25lcnMuY29tOi9ob21lL2Zpcm13 +YXJlL2N2cy9mdy1yZWxlYXNlKSwgVmVyc2lvbiBUNHh4IDAxLjA5LjBjLjAwAAAAAAAAAJW7pA1g +AMgA4QB78AAQAADhADC4eP///x/84UCAAAAB4QB7cAAAEAAf//vg4QGUcCAAAADhAZwE4QB5AAAC +AEDhAHmAAAYAQAACAAoABgAK4QB5BAAKAACAAAEC4QB7POEAe0ThAHvk4gAAAAABAADhAHuQIAAA +AAAAgADhAHsAAABAAeEAe5wAAEAAREREQuAAAADjAARzREREQOMACAAgAAJcAAAAAB//kYAAAAAA +H/+RhAAAAAAf/5GIAAAAAB//kYwf/8AAAAAAAAAAAADAABL/zRP/zZMgEv/NE//NhCAEMwGTIBH/ +zBL/zJIQEf/MEv/MkhAR/8wB9DER/8siCv+SEADkMQAFMQECABL/yALnMQIWABH/x4EQAQFfwCEC +EQHJERH/xBL/xJIQEf/EEv/EkhBgAA8R/78S/8OSEBH/vxL/wpIQgRAR/8HAIJIREv/AkhLAIJIT +Ev+/khCCEALyUGUv9xH/vccvkhAR/7ySEBL/vBP/vJMgwDKTIRP/u5MigiIS/7oT/7qTICMiIRT/ +uQQzAck4E/+4gzADgxQIMxEU/7akM5MhE/+qkyJgAAjCMJMhE/+nkyIS/7GQIJAhkCKQI5AkkCWQ +JpAnkCiQKZAqkCuQLJAtkC6QLyAmECAmEYIiEv+kwDAtNzAtNzQtNzgtNzwjPQFyM+0AAgAS/6HA +MC83AC83EC83IC83MCM9AXIz7QACABL/l8AwKDcwKDc0KDc4KDc8Iz0BcjPtAwIAEv+UIwoAJzcA +JzcQJzcgJzcwIz0BcjPtAwIAEv+OFf+PFv+PwDDXIAVmAWAAEgQ2BQACANMP0w8FMwxuOxQHRxQH +BEN2MeYENgUFMwxvO+0AAgAS/4MV/4EjCgACJwIHBEMEPgUFMwwHRxRvO/ADAgAS/33JLoMghCGF +IrwidDsOhlC0VZYwtDN0M/Rj/+YAZT/iZV/fEv9xwDIDLgUDAgAS/2jAMCg3QCg3RCg3SCg3TCM9 +AXIz7QMCAAACABL/ay0nAMARAUkxAEgxAQIAwAAU/2cE0jEV/2aUUBT/ZgTTMRX/ZpRQFP9lBNQx +Ff9llFAU/2UE1TEV/2SUUBD/ZAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf/AAA +H/wAAOMACfgf/AAAH/wAAOMACfgf/AAAH/wAAOMACfgf/4AAH/+J4OMACfgf/4ngH/+J4OMAE9gf +/4ngH/+J4OMAE9gf/4ngH/+LYOMAE9gf/4tgH/+ReOMAFVgf/5GAH/+ufOMAG3gf/658H/+ufOMA +OHQf/8AAH//83eMAOHQgAAAAIAABauMAdVQgAAF4IAABfOMAdsAgAAF8IAABheMAdsQgAAGYIAAB +nOMAdtAgAAGcIAABpeMAdtQgAAG4IAABvOMAduAgAAG8IAABxeMAduQgAAHYIAAB2OMAdvAgAAHc +IAAB4uMAdvAgAAH4IAAB+OMAdvggAAH8IAAB/OMAdvggAAIYIAACGOMAdvggAAIcIAACHOMAdvgg +AAI4IAACOOMAdvggAAI8IAACPOMAdvggAAJYIAACWOMAdvggAAJcIAACYuMAdvggAAJ4IAACeOMA +dwAgAAJ8IAACguMAdwAgAAKYIAG3deMAdwggAoAAIAKTOOMCK+ggApM4IAKTOOMCPyAgApM4IAYV +IOMCPyAgBhUgIAYZ4OMFwQggBoAAIAaNEOMFxcggBo0QIAeBkuMF0tggB4GgIAeCbOMGx2ggCMAA +IAjAAOMGyDQgCMAAIAjAAOMGyDQgCMAAIAlLz+MGyDQAAAAAAAAAAAAAAAAgAA/WIAAPyCAAE+Eg +AA/IIAATTSAAD8ggABB9IAAS5SAAEmogAA/IIAASGSAAEcogABFdIAAPtSAAEQcgAA/IIAAPyCAA +D8ggABCdAAAAAP///////w/8///w////APwgAJSTIACV0yAAlgMgAJXJIACViSAAlX8gAJVEIACV +OiAAlTAgAJTgIACWASAAlNYgAJS8AAAAAAAAAAAAAAAAAAAACgAAAAoAAAAUAAAACgAAAAoAAAAK +AAAACgAAAAoAAAAKAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAIAAwAEAAUABgAHAAgA +CQAKAA4AEQAVABkAHgAjAC0APABQAGQAyAEsAZAB9AAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAgAC +AAMAAwADAAMABAAEAAQABAAEAAUABQAFAAUABQAFAAYABgAHAAcAAAACAAAABgAAAAoAAAAOAAAA +FAAAABwAAAAoAAAAOAAAAFAAAABwAAAAoAAAAOAAAAFAAAABwAAAAoAAAAOAAAAFAQAABwAAAAoA +AAAOAAAAFAAAABwAAAAoAAAAOAAAAFAAAABwAAAAoAAAAOAAAAFAAAABwAAAAoAAAAOAAP8AAQIC +AAAAAAAAAAAAAAAgBwpHIAcINCAHC2cgBws3IAcLByAHCtcgBwqnIAcKdxAgQAAAAAAAAAAAAAAA +AAAEAAIAAQAAgABAACAAEAAIIECAAAAAAAAAAAAAAAAAACAHFCMgBxQjIAcTsSAHE3ggBxKnIAcS +jSAHEo0gBxQjIAcUIyAHEo0gBxJzIAcScyAHFCMgBxQjIAcSOiAHFCMgBxQjIAcUIyAHFCMgBxQj +IAcUIyAHFCMgBxQjIAcUIyAHFCMgBxQjIAcUIyAHFCMgBxQjIAcUIyAHFCMgBxJPIAKK6AAAAAEg +AorsAAAAAiACjZgAAAD/IAKJGAAAAP8gAokYAAAAACACjZgAAAAAIAKKEAAAAAEgAooYAAAABCAC +iiAAAAAIIAKKLAAAACAgAoo8AAAAQCACikQAAACAIAKKTAAAAQAgAopUAAACACACimgAAAQAIAKK +fAAACAAgAoqUAAAQACACiqgAACAAIAKKuAAAQAAgAorEAACAACACitgAAQAAAAAAAAAAAAAgAon8 +AAAAECACigQAAAARIAKJfAAAAQAgAomIAAAAgCACiZgAAABAIAKJqAAAACAgAom4AAAAECACicgA +AAAIIAKJ1AAAAAQgAongAAAAAiACiewAAAABAAAAAAAAAAAAAAABAAAAAQAAAAEAAAABAAAAAQAA +AAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAABwAAAAcAAAAGAAAA +BgAMNQAAEEaqABRYVQAYagAAACtoAAAjgwAAGGoAAA0GAAALKgAAAAAAAAAAAAAAAAAAaCsAAGgr +AABsggAAb5wAAEpoAABKaAAATSkAAEpoAABO6gAATJgAAFI9AABPuAABhqAAAYagAAII1gACCNYA +AgjVAAII1QACiwsAAosLAAII1QACtnIAArZyAAMNQAAEBgcAAAAAAAAAAAAAAAAgB27IIAdupiAH +bsMgB27DIAdupiAHbqYgB27IIAduyCAHbqYgB27IIAdupiAHbsggB27DIAdupiAHbqYgB26mIAdu +piAHbqYgB27IIAdupiAHbqYgB26mIAdupiAHbqYAAgIFBQgICwsODhERFBQXFxoaHR0gICMjJiYp +KSwsLy8yMjU1ODg7OwAAAAAAAAABAxERCAgQCQMBAAAAAAAAIARCHCABd1AgADc4IAFMgCABctQg +AWxgIAEtSCADbmwf/+rAH//mkCAAlpQf/9rEIABe8CAAUUgAAAAAAAAAACABTgAgAH6oAAAAAAAA +AAAf/9TcH//GCB//w+gf/8GYIABMwCAARNQgAEIIIACNXB//32wgBeggAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACABfkAgAV14IACfgCAAnrAf/+/AH//QBB//y0AgAHwU +IASd4CABDqAgAO8YIADYoCAA0hAgAMNAIAC2BCAAojggBEXMIAONNCABAyQgA61YIAGmlCAAXrAA +AAAAIACf3CAFBKQgAJQIIAFWGCAAApggAIdEAAAAAAAAAAAf//LwIACfoCADj+QAAAAAAAAAACAD +EXAgACaQIAAb0CAAJWQAAAAAIAAxtCAALyggACtwAAAAACAANvggAQbgAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAIAA0ACAEQbwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAACAANbAgAxhcIAA0uAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAgLAAAAIAKQjAgAAAAg +ApCYCAAAACACkKQKAAAAIAKQsAwAAAAgApC8EgAAACACkMwNAAAAIAKQ4A4AAAAgApDwEwAAACAC +kQAKAAAAIAKRFA4AAAAgApEgGAAAACACkTANAAAAIAKRTA4AAAAgApFcEAAAACACkWwSAAAAIAKR +gA4AAAAgApGUEAAAACACkaQRAAAAIAKRuAoAAAAgApHMCwAAACACkdgNAAAAIAKR5BQAAAAgApH0 +CgAAACACkgwPAAAAIAKSGAYAAAAgApIoBgAAACACkjAGAAAAIAKSOAYAAAAgApJABgAAACACkkgJ +AAAAIAKSUAYAAAAgApJcBAAAACACkmQGAAAAIAKSbAsAAAAgApJ0CwAAACACkoAEAAAAIAKSZAQA +AAAgApKMCQAAACACkpQJAAAAIAKSoAAAAAAAAAAADQAAACACkqwKAAAAIAKSvAYAAAAgApLIAgAA +ACACktADAAAAIAKQiAEAAAAgApLUAAAAAAAAAADXaqR46Me3ViQgcNvBvc7u9XwPr0eHxiqoMEYT +/UaVAWmAmNiLRPev//9bsYlc175rkBEi/Zhxk6Z5Q45JtAgh9h4lYsBAs0AmXlpR6bbHqtYvEF0C +RBRT2KHmgefT+8gh4c3mwzcH1vTVDYdFWhTtqePpBfzvo/hnbwLZjSpMiv/6OUKHcfaBbZ1hIv3l +OAykvupES97Pqfa7S2C+v7xwKJt+xuqhJ/rU7zCFBIgdBdnU0Dnm25nlH6J8+MSsVmX0KSJEQyr/ +l6uUI6f8k6A5ZVtZw48MzJL/7/R9hYRd0W+ofk/+LObgowFDFE4IEaH3U36CvTryNSrX0rvrhtOR +BwwRFgcMERYHDBEWBwwRFgUJDhQFCQ4UBQkOFAUJDhQECxAXBAsQFwQLEBcECxAXBgoPFQYKDxUG +Cg8VBgoPFR//wAAABAAgIAYZ4CAGHUAEQQAIBAEACB//qwCBAAAAMAAAAB//nuClAAAAwAAAAMAE +AAAf/N4AIAYaEB//nvADgAAAAP/4AAEAAAAAEAAAgQQBAIEEAAABBAAAAQQBAIAAAAAABf//H/+F +EAYAAAAqAAAAH//PMCADx1wCAAAAgBAAAEFAAABBQAEAgwAAAf//v/8f/5bcBAAACCACi4CBgAAA +DAAAAB//nVgf/5HQ//8AAP//AP8f/5JwAAAPIB//m9Af/5xYH/+hfB/84gAf/6DwH/+hdB/84ODg +//4AH/+XSA////8A////H/+bOB//l8wf/54IH/+dFB//nYAAAA2QAAD/gCAGFSAgCRRQ4QAuAB// +nXQAAAw44QGSAB//nkQf/50E4AAAoOEAMLgAAIAA4QBgEAAAQADhAhAA4QIwAOECUADhAnAA4QAQ +CB/84UDhAHtwH/+uPB//rjQf/OAIH/+uOB//rlQf/65MH/+uUB//rmwf/65kH/+uaB//qwAgBhoQ +H/zeAAEAAAAf/5vQH/+bQAQAAAgFAAAAg/8AAIEAAAAAEAAAKgAAACAABkwgAorYH/+JIB//hRAf +/57wZ0UjAe/Nq4mYutz+EDJUdh//gAAgCMbAAAA/KCAIxhAgCMawIAjG4CAIxSAgApCIz////yAI +xVAgCMWgIAjF0BAAAAAgCMYwP////wIAAABAAAAAIAjGcP//f/8gCMkAH/+e4CAAIUAgCMmwCAAA +AAD///8gCMoQIAjJMPf///8gCNCwIAAdGP/+//8gCNdAACAAAAAAQAAMAAAAIAjXgAAA//8gCNfA +AACAAA0AAAAgACQY//v//w/2gAAAA///AAAn/yAI2zAgCNsAAAEAAAAEAAAfgAA/IAAxtCAAM7wg +AC8oIAjbsCAI3DAgACtwIAjcgCAI3PAgCN0gBAEACOAAAAAf/5xMIAjdkCAI3bAgCN1QUwAAAFIA +AABRAAAAIAGwFB//myAgCOBgIAjgwCAI4JAgCOFAH/+cYCADKjwf/5tQIAjisBQAAACAAAAAgAAA +AngAAACAAAAGgACwAAAACgAA4zCS///wAIAAsQDhAZoAAAIAACAI4nAf/5kMAAB+QAD/wAAf/5xQ +H/+SZCgAAAAmAAAAH/+R0B//koAGAAAABYAAAB//mogrAAAAIABH+DUAAAADgAAAAwAAAB//mowH +////AD///4BAAAAID///H////yAAAAAf/5w0PQAAAB//l4QHAAAAgQQBAIEEAAAAADqYwwAAABgA +AAAf/5LAAAAP/wBDAAAf/5wYAAAIAAQAAAAgCSSgH/+tsB//qyAf/5bcAAYAAOEAegAf/5dEIKAA +AB//mygf/5y0H/+cwB//mzggCSTQAAMHgCAJJUAf/5oIAEAAAAAACQAAADAC//z4f8AAAACj/7sA +o/+6AOADAACD/7YAD////w//+AD/AAAAIAklgCAI5hAgCOZAIAkmEAAPAAAACgAA//8ADwP/wACD +/8AAIAkmkCAJJwAf/5zwH/ziAB//oXwAAA04H/+rkP9g8AAf/6twH/+hgB//kZAEgAAIH/+AUABE +AAD/H///AMAAAAAADjwAAIEAH/ziDIGAAADuAAAADwAAAP//AAAf/5xUH/+heB/84ggf/5eAH/+A +YCAGF/AAADAAAAAnEB//2dgAAP/+H/+bEN6tvu80AAAAPwAAAAAAiQYAmQAAH/+q2BAABwIBwIAA +H/+pqJkAAAAf/6uUAIgACIKAAAEf/6soH/+qNAMVAAADEQAAAA8D/yAI6wAgCOwAIAjrQCAI64Ag +COwwIAjsYCAI7LAgCO1AIAjtECAAzIQpAAAAIADTrCAJLvAgCS8wIAkvYPDw8PD/AP8AqqqqqszM +zMwf/62gAAAb0B//q6ggAOPwIAkv8CAJMDAgCTBgAA9CQCADs2Af/5z4AAkAAACAAAAAAEgAggAA +ACABBuggCTDgIAkxICAJMVAACQAIH/+qnDAAAAAf/6roH/+cPAAACAYAAIjMAACJFH8AAADwAAAA +IAkz4CAJNHAAAOAAIAkyYCAJNEAf/5kEH/zgdAAEA/8KAAAAH/+pxB//qoQf/5rQg/+3AIP/tiAg +CPMwMwAAAOEAAAAf/6m0H/+beB//qvAD/+AAAD/2kAAAGxgD//AAAAAbIBoAAAAf/5rAIAjzcCAB +RCAf/6rsAA///wAA3q0f/6qgH/+cWCAGFSAf/5rYH/+czCAAYxAgAAXoH/+Y9B//lxAgCTWQH/+g +VCAJNeDABAAAIAKMECAAY/AAgQAA4AEAAADgAQAAAOABIAk3ICAI9hAAAA5EIACRrCAAjzQgCTag +IAk28B//mSggCPmw4P/+ACAJFuAf/6GMIAkA4B//nEgf/5PAIAkLECAJC6AgCQ5QIAkOgEgAAAAg +AYY4H/+cJCABiCwf/5dIH/+cDOEALgAf/5vs4QBeAOECDgD//7//4QAOAOEBjgD//77/H/+dFAAA +DDgf/55YH/+eVAAADnAAAP+AH/+eTB//nrgf/5sUIAGMnCABlmTgBQAAA/8AAP+///88AAAAAAX/ +/4MAAAAgAaoAH/+dtAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYAAAAAAAAAf//mwH//5sB//+XQf +//l0H//5dB//+XQf//RgH//3PB//9Zgf//WYH//1mCAF6hgAAAAAAAAAAAAAAAAAAAAAIAXwuCAF +8LgAAAAAAAAAAAAAAAAAAAAAIAGPUCAF6hgf//g0H//4NB//+DQf//g0H//4NB//+DQAAAAAH//0 +aAAAAAAAAAAAAAAAAAAAAAACAQAAAAAAAAAAAAAAAAAABAAAAAAAAACBgAAAAAAAEAUAAAAAAAAE +AAAAAAAAAAAAAAAAAAAAAIEAAAAAAAAYBQAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE +AAAAAAAAAoEAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAKABHydxPyd9MPA+YxAQIAFvJ1F/J2d2sG +kGC0Zndj+FQOkFWVFw8UAGP/+QAAAGwQBBjycx3ybisgBxzybiohCPoCAAdxuwEA7tw5DdwCgAAL +qgKcMOPyaBmwBIAACKoCHPJmIzCA+kAIFeANBQCdZexmAiG43QAA+sCGFaR3HQDpfP8t3gKAAOt7 +AgzPAoAA62YBJMvhAACZYwIEiZNnKGYGBiCLGPJXJSEJ9MFmFaQzHQDlZgorkASAAOgABQMowQAA +bTkCBQJh0Q8AAABsEAQc8kcmIAcb8kYf8kz+QQQVoNYRAA3LOZswhyD75IYFoAklAPpgRhWgGAUA +6DYDK74CgAD45gAMcWYBAPhgJhWgDAUA5SBXKzQCgAD3xgAOsCsFAP+mAA7wCjUA6PI2EoIBgACc +NZw3mzMZ8jUKdQKVMZk2JSEJnTQvIAecOZQ7+KYACTH/AQDiNgov/AKAAA/uAgjuAu42CC0QBIAA +0Q8nIQgqIQmcNZQ3BncCCKoCmjYIdwLnNgQskASAANEPAAAAAAAAAGwQCCggBScgBykxBfgghhXg +GUUA+QAMxWF3AQCKIhbyFxjyF/FVDA3gDZUADHsRprsssp79gAxD4AqlACuynesWBSWMOYAAjIj3 +gAxwkgCdAC1irmTROCtireSxNGZz/QAA7oYIJYm5gAAoIBSkiAgIRygkFPUAC73QDwUAGfIBLiIW +LCEpiBUa8gCuzJqA6iIeLmfCgAD9AGYVoA0lAP0ARhXgC2UA7fHvHVYCgAALqgKLFJqB6QAVBEBB +AACJFQgAiig8EP0gxhXgTAUA/SDmFaAMRQDsuzYEyIEAAG25BQgAhgkCYe7x4RWgh4AAiBXuAAUN +zwKAAKmI6IwgJaQ1AAALyQxtmQIIAmEoISnqISgkQAUAAAgITyglKflACEQiAJ0A/+OyBeAMFQD6 +IKgV4B7lAOoiHixtQoAA/CAmFeAJBQD4IAYV4A0FAOkWAiXZgQAAWHYoDH4R98AARzANlQD906YV +58UBAPmABilSAJ0AwCDRDwDqJAAJ2ASAAOxEAAroBIAAWHf50qDRDwDAsArPNO+GCC32jgAA2iD8 +QGgdoBvFAFh7BWP/ygAAAOokAArYBIAAWHlY0qDRDwD/+ewNoAsFAAAAK3wY6iQACWAEgABYevlj +/5zAoFmO2BjxqIyI+Z/zQJAKpQBj/6wqIQn8QrAVr/0FAA2NAQ2ODC4kFO20Ay5hAoAA77QALVYC +gAD9RgANMAkVAAmqApqx+NWmFe/5YgAvJSn/+9QNoAgFAIon60QACmgEgAD7RAAVoAwFAFhyPtKg +0Q8AAABsEAYoIAUrIhDkIAcqUASAAPgDAh3gHsUA+94ADPAZRQD5AAxdYUQBAIwiH/GA6hYALgse +AAAMSREPmQgtkp4PAgD3oAvjUgCdACeSnQwGPmRxbospKiIKC6oM90AJC6IAnQAqIE4sIEyxrfuA +CyQgCxUALSROKjABKSIY80ALRpIAnQArIAcsIST8YCQV4AhVAPlABAQwqxEA4IgRDVKCgAAKiAIa +8WYI3QIoIQcrIQkKzAL7pgAOuogBAOrxYhxDAoAACLsCKCEinXCNIJtznHT7BgAMMAplAOh2Ai7u +AoAACt0CnXEsIhCcdSsgOBjxVvwAIh3gTBUA/OEmFeC7GQALzTkc8VGeePsNAA5wCAUAmHcNzAKc +du3xRhTYBQAAKyYYG/E8mHuZeu0AFQPIwQAACQCK63YOIchBAADudg8j8QEAAAkghg4CYwkAhg4C +YQxMEa/M6sadIwCpgACOKS0gOKbuninzoAVXkgCdAAUPR/ngBFFSAJ0AwCDRDwDqJAALWASAAFh6 +OcHs7/EnFXaRgADqJAAJ2ASAAOwSACroBIAAWHde0qDRDwAAAADqJAAK2ASAAFh4xNKg0Q8AAAAr +TBjqJAAJYASAAFh6Z2P/wYgiwJQJiAL4QEYVr/7eAAAAAAAAAPxDqBWkiQEAAIEEAL0aDcwC/EOm +Fa/6HgCKJ40QwMDqrCAu2ASAAFhxuNKg0Q/aIFh3CGP/UQAAbBAMLSAFJiIQLyAHKyE15RYDKcAE +gAD7AIgVpzUBAPJ/wBXgDBUAA8M5+0EADXAVhQDrggIsYASAAPdeAAqx/wEA9wAwFaAVRQD1oB/V +Y7sBAIkiKBYA8z1cDeAOhQCYEPLAHgcSAJ0AnxKfGpsWFvDnkxXqFgQvrwKAAOZVCAIwDQAA5hYJ +InAFAACIGi4WCCsSCfUABmISAJ0AKlKe+0AJq+IAnQAvUp1k87sY8NiIiPcACViSAJ0AGfDUKZKu +DAM+6vDSFIn5gAAqoq0W8NDqFgska/0AAOsSCyUJaYAA7WYIJZuZgACIKYcqCHcM8uAJY+IAnQAp +GgDzIjIN4Pr1ACsgFpwR+2AJrSIAnQAY8MiGFI3DKiA4/eDmFeAJBQD54SYV4EcFAPfhBhWgqhkA +Cnk5F/C/KyIXm/orIhub+43ECng5/MAPEuIAnQCYF54dhhWcEZkc5xIMKwgeAABgAX4Y8KuIiGqB +JooZKVKeepNDK1KdmxuNG+nwpRQz/QAA79QABoHZgACWmGX/HGAC1Z4d/CAmFaAKBQBZjcwY8JyI +iIwR7hINJA8HAAD//2gNoA8FAADAkPghZhXv/u4AG/CTwKoKijT7YQYVr/7+AAAAAAAAAP/7OA2g +DwUAAJ4dnx78ICYVoAoFAFmNuBjwiIwRiIiPHo4d+R/12JIAnQBgAlHAkJkbihsd8IHAuguLNOvW +CC12jgAAYAI4AJ4dnx6cEeokAAnYBIAAWHmIjBGPHu4SDSV1+YAAYAHvAJ4dnx76QPAVoAwFAFh5 +X4wRjx7uEg0tdcYAAGACxgCIEY4X9iDIFa+MBQAsJDuMFAZ2AgbuAqy5DNoMmoTpJhssWASAAO0i +EClQBIAAWHgJjh2MEfqzphWhBwUAc3sIKyAWKAr/eLleiikpIDijquomCST5poAALyIQLSE1+4CI +FeAIFQD4IKYVoAY1AJYTDbs2+iCGFeAdhQD/fgAO//a2AIonnx6LEOqsICpgBIAAWHT9jx6aESsi +G/1AiBXv/YYAAAAAAADqIAcp4ASAAFh5GYwR/iGoFa/+QgDaIFh2P4wR/iGoFa/+QgAALSIQihYr +IDsW8EAKmQIJiQLmmAINifYAABrwPfhEhBXjaQEAh8DrIAcrMgKAAAaZAiYhB/rgBAOwuxEA6vAt +HdqCgAALdwIrISIKdwIqIQmX8IcgnfX54MYVqmYBAOn2BCszAoAABqoCFvAj6vYDK74CgADn5wIH +yMEAAOf2ASZAgQAA5rsCAlP5AADr9gIiFDUAAG2pBQgAhgkCYSggFKSICAhHKCQU9QAGrdIAnQCK +GPqzphWhCQUA8yHyDeD89QArIBb9YAkVIgCdAC0iF7Hd7SYXIYCpgACPKS4gOKP/nynzwAe/kgCd +AIYVZWDSwCDRDwAAAAAoIE5kjD0OmwKbIusSAClQBIAA7RIDKmAEgABYdi/SoNEPAOsSAylQBIAA +WHeW0qDRDwDaIPxAaB2gG8UAWHk6Y//HAIsS2iDrvBgpYASAAFh5NWP/tAAAAAAA6iQADlgEgAD8 +IIgVr44FAO4kOyxwBIAAWHeG+iEGFaAPBQAvJhv+R2Yd7/yCAIsbKiEJ/EKwFa/9BQANjQENjgwu +JBTkzBANVgKAAAyqAv1gZh3gDgUA/2AGHaAGFQAGqgKasRnvyvc1phWv+8oAAIon60QACmgEgAD7 +RAAVoAwFAFhwc9Kg0Q8AANogWHXDY/8EAAAAAADqIAcp4ASAAFh4lWP+04sS2iDrvBIpYASAAFh5 +BmP+92wQCCggBe3vtBnQBIAA899iBeAeRQD/AAq1IAylACsgTinSCNMP6hYDJdv9AAArJE73IAiY +kAcVAC8yrmTyMCoyreakAAURkYAAsJjo1gglCIGAACkgFLOZCQlHKSQU9SARLdIAnQApIHMrIh37 +IAQA3//1AOB6GgTABQAA/1cAD/SIAQAoJHP7QAQFcAgVAAqKOQ+7AesmHS0HPgAAiiJ8pwQrIE7K +tH2nCC0gTCwgTn3DGcxsLiAU7yICL1gcAABk8fzAINEPAAAAAAAAiCfHkwmpAekmAiRQwQAAWGeI +4++KFQE5gAAooADTD9MPA4gKKIIQ7KAHLVgEgAD6QGgdoA1FAAuAAGWv3Ikn0w9kn6EqmRTKp4qZ +ZK+XKKAAA4gKKIIQ7KAHLVgEgAD6QGgdoA01AAuAAGWv4GP/dQAA//9UDaAKBQDAoFmMkx3vYonY +LAoK+T/3AJAeRQAmCgApIBSzmfhChh3v+/oAAAAA6iQACtgEgABYdv7SoNEPAAAqIAUrIAcPAgD/ +QA8VIbsBAAUFR/igDylSAJ0AjhPu4gYveASAAJ4UC74C9WAKchIAnQAMuhEDqggoop73AA580gCd +ACqine4WASUK8YAA+kAIFeAMFQBYII8b70AvIQke7zYoISItIAcc70gpIST/BgAMMN0RAO4SBC7q +goAADZkCDJkCmaCMICimAv9AZhXgDSUA7qYFLmYCgAANzAL9QCYVoAkFAOsAFQVQYQAAsZnqgx4M +j+gAAI8RDP8R8+AAR/AOpQAu9p30v/KBEgCdACoiB+tEAApoBIAA+0QAFaAMBQBYb8xj/jIAAAAA +AP/3OA2gCgUADJs069YILW6uAABj/tkAAC8hCfhCsBWgCwUA+sAGHe/6BQAKmgEqZAPqmgwMQQKA +AOokFC/+AoAACP8CB/8Cn2H2daYV7/aqAIonwLD7RAAVoAwVAFh3OR3vEJ2gjCAb7w/rpgIuZgKA +AAfMAv1AJhWgG8UA7CQACVAEgABYeEfAINEPAACJ2PcgBKiSAJ0ADOoRo6ooop73AAV80gCdACqi +nWSgprCYmNjuFgEtdVYAAIki6xYAJIUZgACfEvi/6yFSAJ0AiifAsPtEABWgDBUAWHOZHu7wnqCN +IBvu8ewSAi7uAoAAB90CnaGMxpyj+0BGFe/0ygDrVAAJUASAAFh2fmP9H48Tj/P+IIYV7/iOAAAA +AAAAAP/40A2gCgUAAJ8SmxH6IAYV4AoFAFmL/B3uzIsQidiPEo4R+T/6iJAMpQD//YwNoAoFAMCg +DJg0+aEGFa/9WgAAAACLEO8WAilQBIAA67wYKWAEgABYeAv+IEgV7/0iAGwQBCggFO+LHmoYBIAA +iif6YGgd4AwFAOqsICnoBIAAWG9h0qDRDwCLInO+fhTurolIapF6G+6r0w8ssq5kwFgqsq1koFSw +ne1GCCUC4YAAKSAU6SQULNrcAAAvIQn4QrAVoA0FAP1ABh3v/AUADJwBLKQD7JwMDEECgADsJBQv +/gKAAPnmAA+wDhUADv8Cn6H/daYVr/3mAMCgwOoOnjTuRggtfWYAAI8iyfXAINEPwKBZi72JSPk/ ++9CSAJ0AY//lANog/EBoHaAbxQBYd9XAINEPbBAIiS/vITQpsASAAPZg6BXnhQEA7iAHKlgEgAD7 +H8AVoAQVAPqNAA0wHUUA/uEAC/HuAQDpfR8MFIAAACggTw8CAO8gTSRABQAACAhHKCRP+eASu6IA +nQAvIAWbEZoQ/eAQ3WIAnQCJIsej+UANgOIAnQAsIhmLMv1gEv0iAJ0AjTiPERjuYunuZBaRQYAA +6RYCLycCgADoRAgH+A0AAPXADKISAJ0AKUKe/yAZK+IAnQApQp3tlAAEkWGAAIspiioMBT4Lqgz1 +QAmr4gCdACwaAPWB8g3g+PUAKyAW+WAX1SIAnQAa7lwpISQrIQcKmQIqIQkLC0oMuxALqgIrIAcc +7kgLK0Do7lUd2oKAAAy7AiwhIpvQiyCZ1JrTCMwCnNL9YAAVsAxVAAy7ApvRG+5Mii+a1SkgOPvc +lAWgDAUA/aDmFaBIJQD3oQYV4JkZAPlNAA3wCiUACYo5iWSZ2YhlmNr8wMgVoAkFAOzWCyOH4YAA +6e49HMKCgAAJiAKY3Ixol9+c3owSiWkp1hCIaijWEewAFQbJIQAACQCKjGf84AqjogCdABnuJQq4 +AgmIApjWwPX+k6YV4Q4FAPXB8g3g+vUAKyAW+2ASBSIAnQAuIhmMKS0gTysgOOXMCAdwBQAA7iYZ +Juv9AAAtJE+cKfNgDgeSAJ0AjRBl0b7AINEPnxOeFJ4VnRbqJAAK2ASAAFh3EI0WjhTvEgMldaGA +AI4QZe/XiifbMOwSASVQwQAAWHJwwCDRDxrt94qo90AOyJIAnQArQp7/YA+z4gCdAClCnR3t8OSR +6mVj/QAAnNjtlAAM8tYAAGAAegAoIDnxH/gOEgCdAP/75A2gCRUAwaN6+RIpIDr+IKYVoAv1APsg +ECViAJ0A6iQACtgEgABYdYTSoNEPAAAAAAAA8AAYDaAa1QDAoYw3KyEJjTiOMuuvEQ3dAoAAD7sC +5LsCCVAEgABYdWbAINEPAAAA//9YDaAahQAAACvsGOokAAlgBIAAWHcXY/8oAAq5ApnWwIX4k6YV +oQwFAHXLDSsgFioK//tgDUUiAJ0AixBksTaLaoxnimmrewfMDJxn92DSDeANBQCxqoxlm2qLZppp +rNqre3e7AbGqm2aaZYgpLSA4pYiYKfOgCT+SAJ0AiScqmRTKpouZyrKfExnttyiwAJ4UnhUJiAoo +ghAssAf6QGgdoA01AAuAAI4UjxOLIsej+1/zYOIAnQAoITSHZ/xB6BXgCRUAmRD44QALsBxFAPz+ +AA5/88IA2iBYc5pj/juKJ+qsMCtYBIAAWGAf0qDRDwAAAAAAAAD/83gNoAkFAJ8TnhSeFZ0W+kDw +FaAMBQBYdniNFo4U7xIDLWd+AAAr7BLqJAAJYASAAFh20mP+E+ogByrgBIAAWHZZY/21nxOeFP4g +phWgCgUAWYqrGu16iqiOFI8T+V/weJIAnQD/+IgNoAkFAMCQHO10wLoLqzT7gQYV7/hCAJ8Tiiee +FO4WBSnYBIAA7BIBJVDBAABYceLuEgQtMASAAP4gaBXv+pIAnxOeFO4WBSlQBIAAWHNljhT+IGgV +7/siAADBU/pAaB2gCwUA/AACHaANNQBYbN8rIAWOFfV/3Z1iAJ0AY/1jnxOeFJ4V6iAHKuAEgABY +diyOFP4gaBXv+RYAAGwQDJUTJiAFLyAHhy/qMgQpwASAAPxGhBXnNQEA8n/AFeAOFQAD4zn9QQAN +cBtFAOerHwxgBIAA+sAehWH/AQCJIpgQ8zrMDeAOhQAmgAGYEPLAHKcSAJ0AnxKfGhntN5MXFu01 +6hYGIlgNAADrFgkvrwKAAOZVCAJwBQAAiBqeGI0Z9QAFWhIAnQArUp79YAgT4gCdAC9SnWTzkIiY +9wAH2JIAnQAW7SQmYq4MAz7q7SITCHmAACqireoWCyRr/QAA6xILJQgBgADtlgglmnGAAIcphioH +ZgzywAfb4gCdACgaAPMCMg3g+vUAKyAWnBH7YAgdIgCdABbtJCogOPvaRAXgDQUAnff3gIgV4KoZ +AAprOYYWxIAKjTn2wA9y4gCdAJ0UjRfrFgUuh14AAGABjoiYaoEgjRkrUp59szwvUp2fG4YbsIrv +ZAADAdGAAJqYZf9GYALUnhz8ICYVoAoFAFmKJhns9YiYjBHuEgwkDx8AAP//aA2gDwUAwLD6IWYV +7/8KAMDaDY00/SEGFe//DgAA//wEDaAPBQAAnhyfHfwgJhWgCgUAWYoUGezkjBGImI8djhz5H/dY +kgCdAGACWcBglhuKG8C6C4s065YILXgOAABgAkOeHJ8dnBHqJAAJ2ASAAFh15YwRjx3uEgwld4GA +AGAB+54cnx36QPAVoAwFAFh1vIwRjx3uEgwtd1YAAGAC05wR/iGGFa+IBQDoJDsmOEEAAOcDHgew +gQAABgJhhhaW+I3Hh8SIxq1tBncMl8R22wouFgzsFgEkQAUAAIwWixGGFI4VmLadtwbuAu0iDylQ +BIAAWHRdGey0jhyMEfqzphWhBwUAc3sIKyAWKAr/eLlciykqIDiju+smCSV5qoAAhi8vITT9gIgV +4AoVAPog5hWgCDUAmBMP3Tb8IMYV4B9FAPe+AA+/9wYAAJ4ciiefHYsQ6qwgKmAEgABYcVDvEg0t +YASAAP4hiBWv/NoA6iAHKeAEgABYdW2MEY4c+dkkBe/+QgAA2iBYcpKMEY4c+dkaBe/+NgAmIDsX +7JXtuwIHyIEAAPmCABWjqwEA57cCCwjGAACTH43AE+yOA90BIyAHAyNACjMQA90CE+yCJiEkA90C +IyEH6yEJLVICgAD6xgALOjMBAOohIimbAoAAA7sCgy+d8I0glvSX9pP1m/ODH+vsdh7uAoAADe0C +nfELqgLq9gIiDD0AALBKbakFCACGCQJhKCAUpIgICEcoJBT1AAZd0gCdACoSCPqzphWhCQUA8yHy +DeD89QArIBb9YAilIgCdAMg/jiktIDij7p4p86AHr5IAnQCPF2Xw0sAg0Q8AJiBOZGxpDpsCmyLr +EgApUASAAO0SAypgBIAAWHKJ0qDRDwDqJAAK2ASAAFhz8NKg0Q8A2iD8QGgdoBvFAFh1lGP/xwCL +Etog67wYKWAEgABYdY9j/7TbwPwgyBWvjgUALiQ7CCCGCQJj7PYIKVAEgADtIg8r8ASAAFhz3/oh +BhWgDwUA/kdmHe/8qgCLGyohCfxCsBWv/QUADY0BDY4MLiQU5MwQDVYCgAAMqgL9YGYd4A4FAP9g +Bh2gBhUABqoCmrEZ7CP3NaYVr/vyAACKJ+tEAApoBIAA+0QAFaAMBQBYbMzSoNEP2iBYch1j/wYA +AAAA6iAHKeAEgABYdO9j/uGLEtog67wSKWAEgABYdWBj/vdsEAYoIAUlIAckCgP3AAVkUVUBACgg +ImSAoQIqAlhrAPlABMDQBhUAKSAh4+wEGAQKgADzIAQv0gCdAOxZEQKlaQAAo5kqkp5uo3Qrkp1k +sGopICH6QAgVoPzlAAyZAfcmAAywDQUA+EQmHeAIBQD4IAYVoA6VAPggJhWgDwUA+CBGFaAMBQBY +cEwMXRGj3fWzphWgAgUA0Q8X6+mKeGqhJgxZEaOZLpKebuMtK5Kd5LApZWP9AACceGW/lMAg0Q// +/igNoAsFAMCgWYkNinhroc7//4wNoAsFAMCwwNoNrTT84QYV7/9SAAAAAGwQCiwgBfhA8BXgCxUA ++GBoHaelAQDoFgAlU/kAAOq6OQoYBIAA6hYELCAEgAD9gcAEUZkBAMGz+4AaXWIAnQCMImXC1xvr +wrQ+7hYDLMcCgACriOgWBizABIAA7BIGJCXxAACNEyzCno8W/YAG6+IAnQAv8p3vFgUnlWGAACUh +G4pChiqYGAWlNvVPAA3xBwUAe3MB1aCHKQdmDPTABaPiAJ0AKhoA9UIyDeD89QArIBaYGP1gBb0i +AJ0AikL6oAp6ogCdAIwUG+u5h0OYGJkZ63cBBggZgABgAK0a656KqOgWCCUMv4AAixaMEyuyno8W +fLNAL/KdG+uX5PA5ZTP9AACWuO8WBS/7rgAAYAIVAAAAAPghJhXgCgUAWYi9GuuNiqiJGegSCCUO +/wAA//9MDaAPBQDA8Bzrh8C6C6s0+4EGFe//BgAAAAAA//yYDaAPBQCZGeokAArYBIAAWHSNiRno +EggleemAAGABrgCZGfpA8BWgDAUAWHRliRnoEggtedYAAGAChAAFrQydQowp7nQAClgEgADvEgUp +UASAAOXMCAroBIAA7CYJKeAEgABYcE2IGIkZjxb786YVoQ4FAHXrCCsgFiYK/3a5LcCh+iCGFa/6 +IgCKJ4sQ6qwgKeAEgABYcBHAsiukAuqiAi0gBIAAY/+SAAAAAADqIAcq4ASAAFh0LYkZ+CEIFa// +BgCPKRjrZ4kVpf+fKYxDi0CNFOfEAATIgQAA/A4ABTfrAQDuFgEuiA4AACcgBwcHQQh3Cidyoe6t +EA1TwoAA7aoCAkBBAADqdwEB0/0AAOfHAgGMPQAAbakFCACGCQJhi0DAgJgSGetSGutRLyEahhUe +604kIQcY60v8ICgVodcxAP+gAEa6RAEA7dCAKicCgADszA8mcEEAAPiGAAo0zB0A5GYAJmAFAAAM +PAwU6x8NXQyIIJ9ml2eeY51lDKQ5CYkC6WYELEYCgADkZgIh0AUAAAioAphhJiAU42YIDSAEgADm +JBQlqdKAAIgW9ROmFaEHBQD04fIN4Pn1ACsgFvlgBI1iAJ0AiBLSgNEPihRkoJLAINEPK5wY6iQA +CWAEgABYdFdj/+WKJ/wg5hWn20EA6qwgKAQKgAD1oAQ50gCdAIwVwLHszCAp6ASAAFhrrZoS+oAI +Fe/8PgCLFexNEQlQBIAA/WAARfAMFQBYab/0gGAVr/3eAGWstfmf5ZDSAJ0ALyAg8f/lP5IAnQBj +/4EAAAAA6iAHKuAEgABYc8OIEtKA0Q+KJ9ww6xIAJVCBAABYb5rAsvtARh3gAgUA0Q8AAAAA6zQA +DjgEgAD8YGgd4AwFAFhri9tA7DQACugEgADqFgIr8ASAAO8SBSlQBIAAWG+5+oAIFe/7fgAAACuc +EuokAAlgBIAAWHQdY/79AGwQBBTq6CRAgAhEEfqAaB2gCxUAWYZhGOrRZKBC+EYADDAJJQCZoeim +ACEByYAAaCEcbyQZ7iIWZUghAAADQIgJCIoDIIgJBIoDAIgJAIraQPoAQh3gDBUAWYm1wCDRD8ck +0Q8P6DCfog7uMJ6jDcAwnaQMsTD9QKYVoAsFAJum+0DmFe//LgBsEBIjFhiIMCIWFPoiiBWnZQEA ++t/AFeAMFQALyzkpoAeKp/ohBhXniAEA+CImFaGZAQDpFgUlUIEAACoWGvTALGkSAJ0ALRIUjdJl +09US6peCKBPqlfZALNCQDKUAJjKuZGW9KTKtZJW5GuqQsCiYqOiUAASsyYAALRIamBEpEhj7oKQV +r84FAA7dAS0WGe2tCATIgQAA7dxALKgEgAD9ICyK4gCdACsSGCkSEZUc+2BoFe/yBQDrFg4kyD0A +AAKfAZ8apf/vFg0vqASAAP3gK1LiAJ0AlBAX6o0mEhju6nQSeEEAAJ8f/iBmFaSJHQAoFhMuEhSI +FSgWECZhDOYWFyKwEQAA5hYGLEcCgACjiCbhBygWFugSGSL4IQAA/iDmFepmAQDu4BYrNwKAAOdm +AgRBAQAAmBT2IWYVoP/1AP/ADVRiAJ0A9CAGFaALJgAAAAAA6iIMB/AFAADv5AAEyAUAAPMjwA3g +7gEAKhIaKxIZKMAAKqEFBYgLq6vrvEAsaASAAPsAEVrgaQEA+gAiHeAKBQAGujgNqwvtqgoF6CEA +ACcSGyYwAAdmCxfqXfoAIh3gCAUADrg4p4cncJDmiwsNcASAAOaICgXYYQAA5HQIBEBBAACK4A0A +iQKqNpqACwCLiODszAEhmAUAAPMf+xOiAJ0AAosMCowMnODzoAgVoAcVAPOgKBXgBgUAC3Y4qWmj +o5PRejsBsSLi1gAsngKAAPKAEKfSAJ0AJhIYEuo9LRISHuo8LBIaAtIB7t0BB/AFAAAC7gID3QIi +EhsjEhMswQX+QIYVoUQdAKQzkxkuEhQkEhedUIdnLRIZghsEdAytzJRnJBIVjR0W6iaSQI7g4hIR +IZgFAADmRgImYQEAAOJGAy92AoAA7j4CAhBBAADuRgEpoASAAP2ADaviAJ0AKhITAikC6BIMKaAE +gABtqQUIAIYJAmGGHmVh5ygSGIiHZIHuKhIWKRIUI6adKZAWKgr/+yAIdSIAnQArEhAsEhaNH/Vg +BhISAJ0ALMKeKRIW/YAT4+IAnQApkp3pFhUkiKmAACoSGCISF4lQiqf4IUgVoAQlAPgiRhXgDwUA ++kEACTeZQQDiFhckkXmAACoSGhPp5isSGSqhBaOTIzAAF+niq6sFMwvtNAAF2QEAAPpgELLgyQEA ++gAiHeAKBQAMujgNqwvtqgoF6CEAACsSFeecCA1wBIAA64gIC5gEgADoFhskWGEAAPkCgBWv+OIA +AIoW/CDoFe/35gAAAAAAAAD7DwAOv/dWABLpvIIo9kAOOJIAnQAmEhaHHyZinikSFvbADnPiAJ0A +KZKdG+mz5JHCYVP9AACauOkWFSz5PgAAYAAwACsSGCoSFCuxDVgqQywSFCzAFi0K//2f9uxiAJ0A +KhIUixhYKlNlrs1gAZQAwCDRD4sVLBIU67wYLlAEgABYcuzAINEPIhIbjBPygAIBMAcFAOwAFQEQ +QQAAsXfigx4Lj+gAAPSAIBWv9zYAAI0c7ckMCXAEgAD+ImgV5KkdAPFBIA3gDAUADQCG7gwABmAF +AAB6yfEuEhWNFAr6DP8gAEcwDAUA5K4qZ3BBAAANIIbuLAAGYAUAAHrJ8YYeZG4XiR4okQCxiPkg +BB2v+DYAKRIYKhIXDwIAKZEMCpkM6RYCLItuAAAqEhQqoAT1QAwBEgCdACcSGCISFehyASm3AoAA +piKHcuaBpWlYBIAA8wAOGFAFBQApEhSKECiQFIQZqoj0gABCd4gBAOiUFCIgBQAA9QANllIAnQAn +EhYmEhQkdp0mYBYnCv93YRArEhiMEiuxDSoSFAy7DFgp7yoSFI0QiqfAwOqsIC7YBIAAWGoB0qDR +DxfpXI0X+iDIFa/4LgAAAAD6bwAOv/eqAP/2HA2gCQUAwKBZhncS6UaCKPhf8XiSAJ0A//koDaAJ +BQDAkBjpQcBqBiY09wEGFa/44gCLFSwSFOu8Ei5QBIAAWHKIwCDRDwAAANsw6hIaJGg9AAD8gGgd +pN0dAFj6RPojBhWgDhUA/iEGFa/pWgDAoFmGXRLpLIIo+F/S4JAMpQD/6ZwNoAkFACwSFPuAaB2g +G8UAWHJzwCDRDwAAwJAY6SIMJjT3AQYVr+kOAAAA+y8ACr/pvgD77wAKv+paAAAALBIYjxwuwBUt +wBQrwBEswQmu3e4SFylQBIAAWPoZY/51KBIUiRAPAgAmgBQvEhgJZggmhBQv8gDx//V6kgCdACsS +FeoSFCnvAoAA/WAARfAMBQBYZ870YGAVr/pGAAAAKhIU6yQAC+AEgABb9qwoEhiIgQyrEesrCA0o +BIAA8R/yKFIAnQDqEhQr4ASAAFv2e/VAAEL/+MoAjBH4IogV7/8FAA+PAQ+GDCaUFC2RCf8isBWg +CwUAK8QAL8QD5O4QDu4CgAD/pgAOsAkVAAndAp3BGujk+VWmFe/4SgAAbBAIiCIvIAeVFPQgZhWg +/fUA8ResDeH/AQAoIBZ9gSeLFP4gxhXnuwEA+3/AFeAJFQDrmzkJUASAAFgpgi8SBvNOYA3g/fUA +LDAPFejHG+jOFujM5VCALgtuAACHE7B3JVw3/iCmFeRVHQDldQgPzwKAAOaZCAKoDQAA9eAG4hAM +pQAokp71ABSz4gCdACWSneRUAAKJ6YAAKrII90AKGJIAnQAuYq5k4P0pYq3kkPlle/0AAO+2CCSH +4YAAKCAW0w99gQ6ZEOsxBilQBIAAWClHiRCMEyogFCsgBKyq9WAI8RIAnQAKCkcqJBT1QAyGUgCd +AC0wD4kU8bDcDeeZAQD5IA3JUgCdAOlUAAHAQQAAbXkFCACGCQJhwKCaEgx0EaRUKCAE9QAJ2RIA +nQCJMeQWASpYBIAA5TICLI0CAADzIA3gUAQFAKR5ihXiEgItVwKAAKaqKaad0Q+KuPdADviSAJ0A +iRUMmRGmmS6SnvXAD6viAJ0ALpKdnhCIEOWEAAQPgYAAsKn5YQYV7/wWAOwSAylQBIAA7RIEKdgE +gABYbrXSoNEPAMCQDK407rYILPhmAADaIPxAaB2gG8UAWHHBY//KJzAO9uAAg//6UgAAACv8GOok +AAlgBIAAWHG5Y/+swKBZhZgb6GiKuC0K//lf9YCQDKUAY/+5AAAAAAD6QoYdr/vCAAAALCEHHeh2 ++9D2BerMAQDuMA4uZwKAAA3MAiy2KIogGOh4/UAAFTAMNQAMqgIqtinoBAUB+EEAAPkgCcFSAJ0A +bekOBAJjD0CGBAJlDwCGBAJhwND8IEYV7/sKAI4w88AK6pIAnQCPFeISAi//AoAApv8n9p3RDysh +CfxCsBWv/QUADa0BDa8M/kKGHeAOBQDtlAMuYQKAAO6UAC3eAoAA/WYADbAIFQAIuwKbkfjVphWv ++OoAiif8oGgdoAsVAO0SAyVQgQAAWGjd+iBGFa/5HgAA2iDrRAAK4ASAAFv11osRiTEMrBHsuwgN +IASAAPE/8mBSAJ0A6iQACuAEgABb9aWkpKR5ihXiEgItVwKAAKaqKaad0Q//9bQNoAUFAAAAK/wS +6iQACWAEgABYcWNj/lQAAAAAAP4gxhXgCgUAWYU/G+gPirj+IMgV4P31APlf8EiQDKUA//S0DaAF +BQDA4P4gBhWv+DoADKg0+WEGFa/0YgCKJyWhFftEABWvyQUACakBqVkpnEBt6RMEAmMPgIYEAmkP +YIYEAmd5+xjTD40T0w/7oGgd4AwFAFhopPogRhWv9Z4A9e8AD///jgDaIPqAaB3gDAUAWGa3s3uM +FeISAi5nAoAApswrxp3RD2wQBCMgACQK7XQxBiIhA7wi0Q+GIIUjhCH2cAAEOzYhAPhgAEGzZgEA +pjMOMxHyrwAJfUQBAOM8GiETyQAABCQsBDMooyLRD2wQCIoiJyAHiTCVFPhC0BWhdwEA8VsMDeiZ +AQD4ICYV4Pv1AHuBICsSBAsLR/t/wBXgCRUA65s5CVAEgABYKHXzT2AN4Pv1ABrnxIioFufB9wAM +YJIAnQAtYq5k0awlYq1kUaiwiJio6VQAAox5gAAV57IlUIAlXDf4IAYV5FUdAOVFCAvPAoAA5pkI +AqgNAAD04AhaEgCdACiSnvUAEsPiAJ0AJZKdZFFvKiAW+0MmDeDs1QArMBD9YBIkIgCdACsxC7y7 +2iBYKD0oIBQsIASkiPWACtESAJ0ACAhHKCQU9QAMblIAnQCKFB7ntY0RKCEHHOeSGeew/6HgFeqI +AQD/AAAUNP8dAOmIAgf4BQAAD08MmFCLIA/sOfygZhXnqgEA7FYCLd4CgADrSwICyEEAAOtWASHA +QQAA+UAH6VIAnQDoQQ1iU/0AAG2pBQgAhgkCYcCAmBPpIAQiW/0AAAy7Eatb9SAHgRIAnQCIMeUy +AiXYQQAA6xYCLAmyAADzAAqwUAMFAKNMiBMMfRGm3ezWnSwQBIAA0Q8AAAAAAAAA9wANOJIAnQAM +eRGmmS6SnvXADZPiAJ0AJZKdZFGpsIycqGVe5GAAUeokAAnYBIAA7RIEKmAEgABYbZvSoNEPAMCg +WYSNGudciKj5H/NQkPv1AP/5yA2gBQUAANog/EBoHaAbxQBYcKNj/7zAUMDaDYg0+UEGFa/5SgAr +fBjqJAAJYASAAFhwm2P/nAAAAAAA+EKGHa/60gAAAACKJ/0gaB2gCxUA6qwgKmgEgABYZ/L6IGYV +r/wOAIsw82AIupIAnQDiEgMr5wKAAKbMJMad0Q+PEC4hCfhCsBXv+gUACooBCowMLCQU5JkQD3YC +gAAJ7gL74GYdoAsFAPvgBh3gDRUADe4CnvH81aYV7/j2AADqJAAK4ASAAFv01YsSKDIB6hYFLWcC +gADsuwgNGASAAPEf9ZBSAJ0A6iQACuAEgABb9KOIE6Ojo0wMfRGm3ezWnSwQBIAA0Q//9qwNoAUF +AI40izeNNf5wAAe7ziEA/4AARnPuAQCuzA7MEf1vAA293QEA7MwaJdvJAAANvSwNzCj9YABFv/ZC +AAArfBLqJAAJYASAAFhwU2P+fMCgWYQyGucCiKj5H/J4kPv1AP/5hA2gBQUAAMBQwPoPjzT/QQYV +7/lGALBLDLsR61sICVAEgAD7YgAV4AwFAFhlvbNM4hIDK+8CgACm3SzWndEPAABsEAbaIFgoMRjn +DSQwFvnODgXipgUABqYohTepaQRECulECwlQBIAA6EQIAqghAABYKCaIQCswFh/nAvULXg2gBxUA +HucAL/KgLuKBqv8J/xGv7p4QHeb8GOb9Geb17W0IDX8CgACo/4zxLtJ9ALEE6cwBC8AKgAAI7gIo +0n8Z5tgu1n0MiAIImDgI7gKe8i3Sf8jTihBYAueIMupCASkBCoAAAHkaCYgClaCaUZRQlUGYMtEP +AAAAbBAI2iBYKAPUoBfm4xvm5PnNxgXipgUABkQoFebW6UkICVcCgACrqoqgKZJ/pUWnRAqZAfgg +BhXgYwUA4QAFATO5AADwAKANoAcVAAM8CgXMC+jCDClQBIAA60QAC2gEgADuPKAmYIEAAAuAAAEB +hwM3YOEBBwn3VAAA0Q8AAABsEAQW5sgV5qjTD6YiBTUCJSaAJCKAZ0ALbQgFKCKAZ4ACY//z0Q8A +bBAEKCAFJSAHijX1/6IdoAMlAP0BQBHRVQEAwCDRDwAAiCkZ5reaK/sAB+QiAJ0ACVkJKZ0CKpEI +KZEE+yAEw6IAnQCKIvNABHASAJ0A2iBYZWqLItMPDwIAA7oBZK+6iicEuwHrJgIlUMEAAFhehOPm +hhUBOYAAKKAA0w/TDwOICiiCEOygBy1YBIAA+kBoHaANRQALgABlr9yJJ9MPZJ94KpkUyqeKmWSv +biigAAOICiiCEOygBy1YBIAA+kBoHaANNQALgABlr+Bj/0wAAP//VA2gCgUA2iBYZVcrICLquwwJ +UASAAFhmqNpQ+gAiHeAMBQBYZz6LIgO6AfN/+uZiAJ0ALCAH5L0BCVAEgAD8QEYV4bwBAOu8Hylg +BIAAWG+cwCDRDwDrICIpUASAAFhmliogBcHjfqEMaKgpiyLzYAQFf/xmAC8gOsCPePnq+kBoHaAL +BQD8AAIdoA0lAFhlwmP/1wAA+kBoHaALBQD8AAIdoA0lAFhlP2P/vwAAbBAKiCsd5l8uICGLN/xg +yBWg/+UAD+4BLiQhDcwBDLsM64kIeMgEgADAINEPAwCGCQJhmxUoIAUlIAfHTfghBhXgAyUA/RwA +QdFVAQCKKSsmCw8CAPtAB/xiAJ0AG+ZIC1sJK70CLLEIK7EE/WAEw6IAnQAsIgLzgARoEgCdANog +WGT+iyLTD9MPA7oBZK+YiicEuwHrJgIlUMEAAFheGNug4+YZFQEZgAAosAADiAooghAssAf6QGgd +oA1FAAuAAOukAA1/LgAAiSdkn1oqmRQrkgnKqGS/TyiwANMPA4gKKIIQLLAH+kBoHaANNQALgADr +pAANfx4AAGP/KwAAAP//SA2gCwUA2iBYZOsrICLquwwJUASAAFhmPNpQ+gAiHeAMBQBYZtKLIgO6 +AfN/+uZiAJ0ALCAH5L0BCVAEgAD8QEYV4bwBAOu8HylgBIAAWG8wwCDRDwDrICIpUASAAFhmKiog +BcHjfqEMaKgpiyLzYAQFf/xmAC8gOsCPePnq+kBoHaALBQD8AAIdoA0lAFhlVmP/1wAA+kBoHaAL +BQD8AAIdoA0lAFhk02P/vwAAbBAEHOX1izQpMBb9YAQFtZkdAPUgB8iSAJ0A6uXwFIhJgADH3uTl +zBSksQAALKFsaZUcfLMJtM7/YAijogCdAC8gBrD/Dw9H7yQGJ4LRgADAINEPACyhbNMP7LMMdkAR +AAD5YAfTogCdACkgBrCZCQlH6SQGLP7WAACJJ4siKpkUDbsBmyKLmWSgtCiwAASICiiCENog/WDw +FaANNQALgADAINEPAIsiiicPAgANuwHrJgIlUMEAAFhdpcmtKKAABIgKKIIQ7KAHLVgEgAD6QGgd +oA1FAAuAAGWv4IknZJ9uKpkUZKBgiplkr2MooAAEiAooghDsoActWASAAPpAaB2gDTUAC4AAZa/g +Y/9BAADqJAAJ2ASAAOxEAAroBIAAWGXlwCDRDwDqJAAJ2ASAAOxEAAroBIAAW/9FwCDRDwD//RwN +oAsFAP/+dA2gCgUAiDcioskJiBH4QABBP/uSAIg3IqLJCYgR+EAAQT/7+gBsEATRDwAAAGwQCBXl +mRTldhflmZIS+CBIFaAKBQD6IGYVoAlFAJkUGuWTCIIJ4IEECReCgAD2QABD8AgVAOoiCAxACoAA ++CAmFa/59QD5FwAMcAYFAPggBhWgAIoAmxOMFLFm4iwMI7gxAADlXAImY/0AAOwWBCYFMYAALVHC ++sAEANALFQDguxoOo0wAAC5xfmTvygIqAlhmzo8R+sAEANAIFQDgiBoNGASAAOgWAyeAaYAAiaKK +EAqZAZkyijcqrDBYXUfKoSigANMP0w8EiAooghDsoActWASAAPpgaB2gDUUAC4AAZa/ciTfTD2Sf +bSqZFMuniplkr2MooAAEiAooghDsoActWASAAPpgaB2gDTUAC4AAZa/gY/9BixP6IEgVoAkVAAub +OVhnvdEP//8UDaAKBQBsEAYd5VALKxGtsyoyfxnlThflOIigwED44ABE8AYVAOm5CAQBqYAALDJ4 +LzJ7+YAFnGIAnQBl8SAsNnwrMnkrNnvdQA3kFgECAJSgDeQWwMn8QAX8IgCdAC8ye8HA7eU7F4Ox +gAAiMnwqIQSOIPPh/g2mugEAJDZ89G9mFaAAHgAuNnztrwEFw/0AAAj/Au8lBCWMYQAAIjJ8sMzv +MnshAQGAAMnIY/+/AADaIFhmOGWgzCohBP9BIAwWmgEAyJnRDwDaIFhngdEPANogWGe10Q8AAAAA +AAD6QGgdoAsFAFhngdEPLiz46tJgLwEKgAD8wAEF3/z1AAy7AwuqASrWYFmHnyQ2fCQ2e/pv6BWv +/NIAAAAV5NsvUGlk8HJZfc5YZekocrXIgVl9nilQaWSfJ1hl4WSvIRXlBg8CAA8CACxSdLDM7FZ0 +LniGAABZfVP6roYVr/wWAAAAHOT+/m+IFaAKVQD8b0gV4AtFAO0WACFr5QAAWYUL+m/oFa/7AgAu +MnviNnwvec4AACI2e9EPH+TyL/KucfaD9q0mHa/+AgAAAABsEAQU5O0Z5Ofo5NEZXsKAAKS0I0J/ +qYjouAgBgkGAAIoweKkCKkJ7HOTgKzEEKkZ/DLoB6jUEKdAEgABYZevOrikxBP8hAAwW2QEAyNfR +D9owWGc10Q/aMFhnadEPAAAAAAAA+kBoHaALBQBYZzXRDyNGf9EPAABsEATwYOAN7/n1AIgiCTkD +CYgBmCKKJyqsMFhcnOPknRUBGYAAKKAAA4gKKIIQ7KAHLVgEgAD6QGgdoA1FAAuAAGWv4Ikny5Iq +mRTKpYqZya0ooAADiAooghDsoActWASAAPpAaB2gDTUAC4AAZa/g0Q8AAP//XA2gCgUA0Q8AAGwQ +BPJdABXgGMUA+EAHnCczAQAU5HP0YAYSEgCdAAw5EQSZCCiSnvcAB07SAJ0AKZKdZJDYHOSIG+Sj +AioJDKoKq6pYZe/6QAQA0AkVAP0gAQTf+/UA4qQABIBxgACKogubAwuqAZoiiifTD9MPKqwwWFxm +4+RoFQE5gAAooADTD9MPA4gKKIIQ7KAHLVgEgAD6QGgdoA1FAAuAAGWv3IknZJBnKpkUyqmKmcmt +KKAAA4gKKIIQ7KAHLVgEgAD6QGgdoA01AAuAAGWv4NEPAAAAAAAA//9MDaAKBQAV5EKKWGqhNww5 +EaSZK5Kebr0+KZKd5JA6ZVv9AACbWGWfNWAAC9owWX02Za8q0Q/RD9EPAAAAAP/8aA2gCQUAwKBZ +gWGKWGuhvf//SA2gCQUAwJDAygysNPyhBhWv/w4AAAAAbBAEGOQnAgNHDDMRqDMrMoQZ5DAosAAq +sgEJiAoKIYwCCj4oghADAj78QGgdoA0lAAuAACI2hAwCANEPbBAEFOQYAgNHDDMRBDMIJDKEKkIB +JkAAKEAI+phoHaCpJQACBT4DAj55gSMY5BsIaAooghDqVAAKWASAAPxAaB2gDSUAC4AAIjaEDAIA +0Q/rJAAKUASAAFhlrvNAaB2v/zYAAAAAAABsEAQZ5BzTDymSRip60AqZKBTkMf8gABSwChUACpkC +KUa3+JboFaAFBQAF5DEBAgAjQrdmMAttCAUqQrdmoAJj//Mb5Cgitopj//wAbBAEWYCDEuPqE+QH +KSKC0w8JGo4DqAqIgAuAAGP/7ABsEAQqIgcqrBBYZqvRDwAAbBAEiCcijBDaIFhmimihAdEP2iBY +ZoQS5BULqBHoIggFAdmAAAzqMCsihSuyACKs/+y7CAlQBIAAWYZdHOQNKsJ/+kAEANALFQAAuxoL +qgIqxn9ZhozRDwAAAAD6AOIdoAsVAFhmYSwifywmg9EPAGwQBCYiBw8CAOZsECnQBIAAWGbE7DQA +CmgEgADuVAANWASAAO8iACtQBIAAWGYI0Q8AAABsEAQZ49CWIvRAZhWhhDEAF+PPqYgogIAHNwKX +IAhYDJgh0Q8S4+sD6DAE7jAFsTCTIJQhlSIS4+cT47OEIAQzApMgEuPlwDAoN0AoN0QoN0goN0wj +PQFyM+0DAgAS49/AMJMgxy8T494DIwMS496EIAQ0AZQgEuPchCAENAGUIBLj24QgBDQBlCAS49mE +IAQ0AZQgxy/AMQMjAxLj1oQgBDQBlCBj//wS49SDIAMTFA8zEZMgEuPRwDAjJgBX/9kQ49CRAJIB +kwKUAxHjzoIQAeowohEB8DHAQATkFgACABHjyoIQIxoAAyICkhAR48fAIZIQBOQxhAODAoIBgQAA +0jABIwAAAAAQ48KRAJIBkwKUAxHjwIIQAeowohEB8THAQATkFgACABHjuIIQIyoAAyICkhAR47jA +IZIQBOQxhAODAoIBgQAA0zABMwAAAAAQ47ORAJIBkwKUAxHjsYIQAeowohEB8jHAQATkFgACABHj +poIQI0oAAyICkhAR46nAIZIQBOQxhAODAoIBgQAA1DABQwAAAABsEAQkIBSjRCQkFNEPAAAAAFyU +AV2UAl6UA1+UAEMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAABckAFdkAJekANfkABTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAnJQAHZABnZQCnpQDn5QECJQFCZQGCpQHC5QAQwAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAJyQAZ2QAp6QBx2QA5+QBHiQBXmQBnqQB3uQAFMAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADclAAdkAHdlALelAPflAQElAUFlAYGlAcHlAgIlAkJ +lAoKlAsLlABDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3JAB3ZAC3pALHZAD35AEtJAFtZAGtpAH +t5AIuJAJuZAKupALu5AAUwAAAB//+/gA0jEQ//4KAAAAAAAf//xAANMxEP/+CgAAAAAAH//8iADU +MRD//goAAAAAAAD0MAoAAAAAAPQwCgAAAAAA9DAKAAAAAGwQCIgiJyAHKSIUmRPxEvwN4XcBABri +LGSRARbiLSqggAx4EeaICAVQ3QAA+RPIFeSqHQCqSuviJRVQCQAA+yAJ86AMpQAogp3oFgQkCdmA +AI2496AKOJIAnQAuYq7xz3AN4AkFACpireSg7mb7/QAA77YIJQeJgAArIBSkuwsLRyskFPVgCV5S +AJ0AizmJFPhiABWnxQEA+YAKgVa7HQD8geAA0AUFALBKbakFCACGCQJhiRMa4geJkOgSBCJj/QAA +6pkCDO4CgAANzQL9ACYV4AoFAG25B+mGBiRBAQAAiBTrMgEuTwKAAKmImBXpMgItjDIAAJoQ82AN +OFIAnQCLEOtLCAvnAoAA5swIBdv9AADrxp0qkASAANEPAAUMR2jCGIon+oBoHeAMBQDqrCAqaASA +AFhiQtKg0Q/AINEP6iQACdgEgADsRAAK6ASAAFhnx9Kg0Q8AAMCgDN407rYILXi+AACPImX/1Nog +/EBoHaAbxQBYatFj/8QAAAAAAP/7FA2gCAUAiCJlj7IrfBjqJAAJYASAAFhqyGP/ocCgWX6nG+HK +jbj5v/V4kAylAGP/si0hCf5CsBWv/wUAD78BD7gMKCQU76QDL3ECgADppAAu7gKAAP+mAA6wDBUA +DN0CnaH81aYVr/qSAI4nnhGF6fnCghWvyQUA7OEVJ2iBAAAJ2QGZEunJCApXAoAA6ogMAqhBAACV +6QiIMujlFCTJAQAA+KAIYuIAnQBoq0ClrCzM8P0gBNOiAJ0A7xIEIgyBAACwTm3pBQUAhg8CYSzS +AQ8CAAysCOjZBCZjwQAA+YAG7GIAnQDs1gEuKASAAGWOP2AAoQAA6xIFLOAEgADsFgYpUASAAFvu +64kWiBWLMeoWAC1vAoAArYjxf/MIUgCdANog7JQADFgEgABb7rqOEO6uCAqQBIAA7k4IC/8CgADm +/wgHc/0AAC72ndEPAAAABZkM/CCIFaT5HQBt+QUFIIYMAmOMEg9FDI8ULMxA6f8IAow9AACwWG2J +BQxAhg8CZYUSLNkECagMqFUlXDDl1gEubP4AAIkSwKDq1QQkyQEAAPmgJhXgBQUA+aAGFe/2DgCO +EQxVDPXBJhXv+74AhRIlXED1oCYV7/yaAAAAbBAEHeFhGuFhDwIALdKMLKLHKqFwo93qOgwO7kKA +AP2AAEZwCwUAK8QEK8QFWPGf+kBoHaALBQBb/GTRDwAAAGwQBPRCCBWkI0EA8loACT9TgQAEIgqE +JoIhBUQoCkQRpCLRD2wQBCkiEiYgB9NQ+D4ABHAFNQD1AAfokWYBAPXCgAWhieEA9QAH6JIAnQD0 +wAXqEgCdAAxpEaSZKpKe90AIKdIAnQAqkp3xToAN5zMBAC4hBx/hNv3CbgWq7gEA6OE2H3cCgAAP +7gKeoB7hM/pACBXgOQUAmaf5QKYVoB+FAJ+j/0BGFaAOBQCepuy7Ag3uAoAAm6QF3QKdoS0iEg2N +Qe6mCC7vAoAALaYJ6+EkG2cCgAAEzAglxp0qIhILqgIqJhLqIhApWASAAFi/TGgyGIon+gAiHeAM +BQD7RAAVoA0VAFhhatKg0Q/AINEPF+ELi3hqsVcMaRGkmSySnm7DXiqSneSgWmXj/QAA/OEGFa/8 +4gAAAC0aAA2ZAvhCRhXv+/YAAAAuKgAOngL+QkYVr/v2AI8iy/ZoMkXAINEPAAAAAAAAAP/7+A2g +CgUAwKBZfc+LeGuxnf/7sA2gCgUAwKDAigi4NPjhBhWv+3YAACtsGOokAAlgBIAAWGnjaTK5jCcr +yRSKyfmEABXvzQUA7ZkBBdhBAADrxRQlU8EAAOrGCSTJAQAAeasqLsEVGODlquqayZiggiD/wcYF +4AgVAO+mAikWAoAACCIC80AmFaACBQDRDxjg25iggiD/wbQF4AgVAO+mAikWAoAACCIC80AmFaAC +BQDRD2wQGJIQjiAV4NKJI4shiiIqFiIrFiT4JGYV4AQVAPQg5hWgCAUA+CCmFaAMRQD8IUYVoA01 +AJ0Z9CDGFeAPJQCfGPXBiAXgD6UA/iIGFeANtQD8IiYV4AzFAPwiRhWgCIUA+CHGFaAElQD0IeYV +oAl1APghphXgC1UA+iFmFeAKZQD6IYYVoAvVAPoiZhXgCuUAKhYU9cFgBaAJ9QD4IqYV4AhFAJgU +hhYrEiSJFSdhfiwSIiJhfweZKC9QgKkp+JyIFaOZAQADmQrukgAvUASAACZiPi0SI6juC2AAjhcs +EiQtEiIH7igvUIGuLvicqBWj7gEAA+4KjuAqFhbqEiMtWASAAKjuC2AAjhgsEhYtEiQH7igvUIKu +LvicyBWj7gEAA+4KjuAqFhfqEiItWASAAAjuCAtgAI4ZLBIXLRIWB+4oL1CDri74nOgVo+4BAAPu +Co7gKhYY6hIkLVgEgACo7gtgAI4aLBIYLRIXB+4oL1CEri74nQgVo+4BAAPuCo7gKhYZ6hIWLVgE +gACo7gtgAI4bLBIZLRIYB+4oL1CFri74nSgVo+4BAAPuCo7gKhYa6hIXLVgEgAAI7ggLYACOHCwS +Gi0SGQfuKC9Qhq4u+J1IFaPuAQAD7gqO4CoWG+oSGC1YBIAAqO4LYACOHSwSGy0SGgfuKC9Qh64u ++J1oFaPuAQAD7gqO4CoWHOoSGS1YBIAAqO4LYACOHiwSHC0SGwfuKC9QiA4uCPidiBWj7gEAA+4K +LuIAKhYd6hIaLVgEgAAI7ggLYACOHywSHS0SHAfuKC9Qia4u+J2oFaPuAQAD7gqO4CoWHuoSGy1Y +BIAACO4IC2AALhIQLBIeLRIdB+4oL1CKri74ncgVo+4BAAPuCi7iACoWH+oSHC1YBIAACO4IC2AA +LhIRLBIfLRIeB+4oL1CLri74negVo+4BAAPuCo7gKhYg6hIdLVgEgACo7gtgAC4SEiwSIC0SHwfu +KC9QjK4u+J4IFaPuAQAD7gqO4CoWIeoSHi1YBIAAqO4LYAAsEiEuEhMtEiAvUI0H7igoQvGuLvog +ZhWj7gEAA+4KjuDqEh8tWASAAJsRqO4LYACMES4SFC0SIS9QjgfuKChC8q4u+iBGFaPuAQAD7gqO +4OoSIC1YBIAAKxYjqO4LYAAuEhUsEiONEwfuKC9Qj64u+J5oFaPuAQAD7gqO4OoSIS04BIAAJxYi +6O4IC9gEgAALYACOESoWJCkSEi0SFY8VKxITLBIU6BIRJ/hBAADvFgUl2EEAAOsWEyZgQQAA7BYU +JEBBAADoFhEm6EEAAO0WFSTIQQAAKRYSjR+JHIgbjB6LHe8SECRAQQAA6BYLJmBBAADsFg4l2EEA +AOsWDSf4QQAA7xYQJMhBAADpFgwm6EEAAJ0fiRaNGY8a6xIHIqhBAADsEggm6EEAAO0WCSf4QQAA +7xYKIiEBAADvEgQmYEEAAOwWCCXYQQAA6xYHJMghAADpFgYn+/0AAO8WBC/iJgAAiRCPE4sSjpCI +k4ySjZGriKfMqt2v7p6QnZGckpiT0Q8AbBAEKSIV+KAABPA4dQDpjAwBIEEAAPMgAEU/iwUA66QQ +JVBFAAD5AAXTYgCdACsKAFl52SwiFSsiFO3NEQlABIAA/EJGFe6APQD9awANsAk1APpCZhXgCiUA +baoMjoQODo7uhgQkQBEAAA8CANMP0w9tmiHpggQkQEEAAIqBi4KMgwkJjgoKjgsLjgwMjpmAmoGb +gpyD60QACVAEgABb/raKIIgiiSGPIwgIjgkJjg8PjgoKjpognyMpJgHoJgIpQASAABnfhAIAhgMC +YfgAChXgCbUAbZoCCACK0Q8AAAAAAAAA/YEAFaALBQBZear4QGgdoAlFANMPbZoh6YIEJEBBAACK +gYuCjIMJCY4KCo4LC44MDI6ZgJqBm4Kcg+okAApYBIAAW/6U2kD/+/wNoDyFAABsEAYpIhX4QogV +oEYFANMP+IAARXWZAQAJZgx0qwGxiComFQYqDOgmFCVRQQAA9oAHs6IAnQDrNAALYASAAFl5ffhA +aB2gCUUA0w/TD22aIemCBCRAQQAAioGLgoyDCQmOCgqOCwuODAyOmYCagZuCnIMlLBDqJAAK2ASA +AFv+cQZHDPbgBY7SAJ0A5jQICtAEgAD24GgdoAMFAOQWACpABIAA+MhoHaAJRQAKAmcIQIYKAmUI +IIYKAmMIAIbqDAAJQASAAG2aIemCBCRAQQAAioGLgoyDCQmOCgqOCwuODAyOmYCagZuCnIPqJAAK +2ASAAFv+VOpUAAGYBQAA5mzAIiEBAADvbZpqQASAAIsQCjwRC8sI7HwMCtAEgABZeUXRDwAAAAAA +AOs0AApgBIAAWXlA0Q8AAAD2YABGMAMFAPwgBhWv/yYAbBAEGN8YGd8WGt8UE98XkyOYIpkh+kAG +FaALBQArJhUrJhTRDwAAAGwQBt4g5OIQKmAEgADnQgcr0ASAAPu+CgXgGDUA40IWKZAEgADncg4i +++kAAHj7JxjfBQj4CoiAmhOcEu4WASwAIoAAAJMQKrKV7FQACVgEgABZev9kpjfygsYV4AIFANEP +AAAAACviEgubUu4WASX/QYAAGt7u4xYAKVgEgADqorcq4ASAAFl68mSlyhre59sg6qK5KuAEgABZ +eu1kp0wa3uPbIOqiuyrgBIAAWXro90/ADeN2xQAa3t3bIOqivSrgBIAAWXriZKdXGt7Y2yDqor8q +4ASAAFl63SMqgONzCAgECoAA+0BJMBIAnQArMNnBWPVgL0hiAJ0AabchJTTZixD6gsYV4AIFANEP +kxAqso3sVAAJWASAAFl6zWSnn4sQ+oLGFeACBQDRDwCTECqym+xUAAlYBIAAWXrFZa8X+iBoHaAL +tQBYu1X6ACId4AMFAOqzOAUBiYAA6hICK1gEgABZeUjDsOzeuB0oBIAA/KBoHeAKVQBZfpTIWRze +s40RDFw2LNYXZTS1jRD8gsYV4AIFANEPLkByZO66kxAqsrHsVAAJWASAAFl6qWWup/ogaB2gG2UA +WLs5+gAiHeACBQDqsjgFAKmAAOoSAitYBIAAWXksLH0DKsUoZSRhjRD8gsYV4AIFANEPAACTECqy +o+xUAAlYBIAAWXqVZKLPGt6L2yDTD+qijyrgBIAAWXqQZa5C+iBoHaALVQBYuyD6ACId4AIFAOqy +OAUqqYAA6hICK1gEgABZeRIsQHPxgCn+0gCdAGSlN4oT+gCiHeAM1QBYuv3SoNEPkxAqsqnsVAAJ +WASAAFl6emWusvogaB2gGyUAWLsKZKPFK0By+2BA2BIAnQDqEgIrWASAAFl4/SxCF4sQK0YWCsw2 +/ILmFaACBQDRDwAAAJMQKrKn7FQACVgEgABZemZkokMa3lzbIOqioSrgBIAAWXphZa5Q+iBoHaAL +5QBYuvJko2PqEgIrWASAAFl45yt9Aiq1FIsQ+oLGFeACBQDRD5MQKrKZ7FQACVgEgABZelJkokoa +3kfbIOqipSrgBIAAWXpNZKPXGt5D2yDTD+qikyrgBIAAWXpIZa3q+iBoHaALdQBYuthkov0rQHJk +t4ca3jiLEuqi3ytgBIAAWXo+ZabpK0BzwMgMuwIrRHOLEPqCxhXgAgUA0Q8AAJMQKrKv7FQACVgE +gABZejNkog8a3inbINMP6qKRKuAEgABZei5lrYL6IGgdoAtlAFi6vmSilStAcmS3DhreHosS6qLf +K2AEgABZeiRkpx4rQHMsCv0MuwErRHOLEPqCxhXgAgUA0Q8AkxAqspfsVAAJWASAAFl6GWSh1xre +D9sg0w/qoosq4ASAAFl6FGSjKhreCdsg6qKrKuAEgABZeg9krD8a3gXbIOqisyrgBIAAWXoKZaws +wKX9vBAFoDsFAFl95Rrd/YsS6qLNK2AEgABZegJlpNiLESuyEguZUsiZaJIH+SARadIAnQCNEYwQ +K9YS/ILGFaACBQDRD5MQKrKH7FQACVgEgABZefRkoYsa3erbIOqiiSrgBIAAWXnvZayI+iBoHaAL +JQBYuoBkoZsa3eGLEuqi3ytgBIAAWXnnZaxnihP6AEId4AzVAFi6YdKg0Q8AAAAAAAAA+iBoHaAL +9QBYunFkoWLqEgIrWASAAFl4Z+sSACPgCwAAKsUV+oLGFeACBQDRDwAA+iBoHaAbFQBYumVkoTIt +QHJk1ZkpQHPxP+AvkgCdAPE/3+/SAJ0A6hICK1gEgABZeFUtQhgc3cf7oQAOsDsFAPyDBhXgClUA +WX2gixD6gsYV4AIFANEPAPogaB2gC6UAWLpPZKDaLkBy0w9k5PrqEgIrWASAAFl4Qy9BNvvgEIKi +AJ0AihP6AUId4AzVAFi6LtKg0Q8AAAD6IGgdoBtVAFi6P2SgmuoSASpYBIAA7BICK2gEgABYucaL +EPqCxhXgAgUA0Q8AAAD6IGgdoAuVAFi6M2SgaihAcmSEnhrdlIsS6qLfK2AEgABZeZllorgrQHON +EPyCxhXgDBUADLsC+o5mHeACBQDRDwAAAAAAAAD6IGgdoAsVAFi6IcqiGt2DixLqot8rYASAAFl5 +iWWq74oT+gAiHeAM1QBYugPSoNEPwKX9uwoFoDsFAFl9YMAg0Q8AAAAAAADqEgIrWASAAFl4CP1A +aB3gOwUA/br4BaAKVQBZfVbqEgIrWASAAFl4AfVAGDqSAJ0Axy/RDwAAAPogaB2gC4UAWLoB+gAi +HeACBQDqsjgFAUmAACxAcg8CAGTD1xrda+sSAitgBIAAWXlkZaK1LUBzwOgO3QItRHNlL22PEP6C +xhXgAgUA0Q8A6hIBKlgEgABYufdlr5orMNlj+gYAAAAA+iBoHaAbBQBYuedkrzooQHLTD2SDSeoS +AitYBIAAWXfbKUIZixArRhYKmTb4gyYV4AIFANEPAAD6IGgdoAs1AFi52WSvAhrdO4sS0w/qosUr +YASAAFl5QOPdRR0IhgAAixErshILyVHImWiSB/k/+QHSAJ0AjhGMEAO9AS3mEvyCxhWgAgUA0Q9l +LryPEP6CxhXgAgUA0Q/qEgIrWASAAFl3uipFNoIQ8oLGFaACBQDRDwAAAAAAAPbgAEGwCwUA+mBo +HaCMBQBZd0zqEgIp2ASAAFi6DyMqgKNzKzDZwMQMuwL6f2Ydp7sBAPp7Jh3v5CoAAAAjKoCjcygw +2fogSBWgCSUACYgC6DTZK1gEgABZd57DsPp7Bh2n2gEA/booBaAKVQBZfOtj+MqKEllrMP1AaB3g +OwUA/boeBaAKVQBZfOQqEgJZayrcoPogSBWj+9UAq3tZeQBkoaTAov26DAWgOwUAWXzbxy/RDxrc +8osS6qLHK2AEgABZePdlrhGLESuyEgvJUWiRCmiSB/k/8AHSAJ0AHtz5A70BDt0CjhGMEC3mEvyC +xhWgAgUA0Q8AihP6ASId4AzVAFi5ZdKg0Q8AAAAAAAAA+iBoHaALRQBYuXVkrXKNEf251AWgClUA +/aJIFeA7BQBZfLoa3NKLEuqixStgBIAAWXjX49ziHQVuAACLESuyEgvpUciZaJIH+T/r6dIAnQCO +EYwQA70BLeYS/ILGFaACBQDRDxrcwosS6qLPK2AEgABZeMdlrVGLESuyEguZUmiRCmiSB/k/6gHS +AJ0AEtzM+CAoFaKOBQCufgKyAiKGEi3g2fwgCBWgDxUAD90CLeTZ/ILGFaACBQDRD4oT+gECHeAM +1QBYuTDSoNEPIyqAo3MrMNnAwQy7AgsLR/p7Jh3v3UYAGtyiixLqoscrYASAAFl4p2Ws0YsRK7IS +C+lRaJEKaJIH+T/mAdIAnQAe3K2MEQO9AQ7dAv2CRhXgClUA/blUBaA7BQBZfHiLEPqCxhXgAgUA +0Q8AIyqAo3MrMNnAyAy7AgsLR/p7Jh3v25YA9uAAQrALBQD6oGgdoIwFAFl2tMFg6hICKtgEgABY +uXYrMNkGuwL6f2Ydp7sBAPp7Jh3v2r4AihP6AOId4AzVAFi4/dKg0Q8AihP6AgId4AzFAFi4+dKg +0Q+KE/oBQh3gDMUAWLj10qDRDwCKE/oBIh3gDMUAWLjw0qDRD4oT+gECHeAMxQBYuOzSoNEPihP6 +AkId4AzFAFi46NKg0Q+KE/oCIh3gDMUAWLjj0qDRDwCKE/oAwh3gDMUAWLjf0qDRD4oT+gDiHeAM +xQBYuNvSoNEPAIoT+gDCHeAM1QBYuNbSoNEPAAAAAGwQBCQiECsgB9MP8IQwDeG7AQAsMBAtMBHu +MBIuZgKAAA3MAu0wEy5mAoAADswCCMwRDcwCaMAfKSIS7dxWFMAogAANnQEtJhIuQAUvCpV/4U3A +INEPAAAoMBQpMBXqMBYsRgKAAAmIAukwFyxGAoAACogCCIgRCYgC/RdAAFCOBQApIhJ4lyfApf24 +hgWgOwUAWXwQwCDRDwAAAAAAAAD6gGgdoAtlAFjVgsAg0Q8AjScv2RSK2f2kABWvyAUA6MwBB/kB +AADv1RQlUwEAAOrWCSZhAQAAfKsGKdEVqpqa2R3cLtmg/AAIHeAMRQBtygIJAmEY3AyYoI8g/eAA +F7AIRQAI/wKfoS0wFC8wFRjcJOkwFi7uAoAAD90C7zAXLu4CgAAJ3QLopgIu7gKAAA/dAu2mBCHg +IQAA7AYABUhhAAAJAIooIhKPIg6IAugmEi/3xgAA2iDrvBgpYASAAFhk42P+4wAAAGwQBiQiEC9A +cvXgBriQm1UAHNwKLSIALjIGLzEL+GPwFaAKVQD4IAYVoDsFAFl7zxrcBCQiGCwxC4gsiUqFR/0A +AEQwCwUA+EGGFaANBQDlUg4kkEqAAC1GFAqeAv6BRhWgAB4AK0IU61oIAdiBAABZdfwuQhQtMQvT +D67dLUYUKlAELFAFGNvv61AGLVYCgAAMqgLpUActVgKAAAuqAuzb6h0uAoAACVUCCFUB9KBgFe/4 +xQD4oAQCsDsFAP6gaB2gClUAWXupKSITKDELK0IUqYjoJhMi+MEAAH+xPsAg0Q8AACpABXuh8xzb +2PxACBXgCiUA/oAIFaA7BQBZe5v6gGgdoAwlAPxMph2gCxUAWNUOwCDRDwAAAAAAAB7bzI1KDt0B +7UYKKVAEgABYzpn6QGgdoAsFAPwAAh2gDSUAWAHBwCDRDwBsEAYc28KNIC4yBfRA6BWnVQEA/r/A +FeAIFQAPjzn0goIVoApVAPQgBhWgOwUAWXt9iSLk264UhWmAAPigBQlSAJ0AiCeMiPsCpBWvzwUA +6YILJHCBAAAP7gGuquuJFCVRAQAA/SAIxCCtBQCtya27K4UU+UAIy+IAnQD7IAk0IgCdAJmI2cDk +AAUOQASAAPgAqB2gCqUACAJhCAJhCAJhCAJhCAJhCAJhCAJhCAJhCAJhGNtwbaoFAwCGCQJhmMCP +IP+3JgWgAqUA7sYCL/4CgAAC/wL/gCYV4AIFANEPAMAg0Q8mIAcX21oGBkHqMgUrRwKAAKeIKYKe +K6wfC0sU+yAFY+IAnQAogp3uhAAEBVmAACmsH/QACB2kSR0AbUkCCAJhiDQd206d4IkgHNtP6uYD +J1hBAADs5gIszgKAAOlJAgHggQAA6eYBKVAEgAALgAAMbhGn7uTmnSKUdQAAiif6AUId4AwFAPtE +ABWgDaUAWFuT0qDRD8Ag0Q8AAAD9IGgdoAsFAPsBZhXv++YADK0M/c8ADvDvBQCv3f0BBhXv+5IA +L+xA/wEGFe/7ZgD//VwNoAgFAAAAK2wY6iQACWAEgABYZB1j/m8AbBAEhycf20YqeRQpcRX44QgV +oK0FAP1AAEV/zgUA6pN0c9iBAACMew67AeuZCAwwBIAA6MFldMkBAAAqdRStinqTaHmhepp47wAF +CzgEgAAHAmEHAmEHAmEHAmEHAmEHAmEHAmEHAmEHAmEHAmEX2w6XYIUgk2WUZPO2ZAWgB6UA4mYC +Kq4CgAAHVQLlZgErEASAANEPwCDRDwAA94BoHaAIBQD44WYVr/6CAAiaDPtvAA0w7AUArKr64QYV +r/4uACy8QPzhBhWv/gIAbBAEx48IWAMIOAIISAOoaOgiCAuBCoAAAiIYojLRDwBsEAQEOAMIWAOo +aOgiCAuBCoAAAiIYojLRDwAAbBAEBDgDCFgBCEgDqGjoIggLgQqAAAIiGKIy0Q8AAABsEAQFSAMI +OAEIWAOoaOgiCAuBCoAAAiIYojLRDwAAAGwQBCMiECsgBygwBfwRYh3gmSUA+QWeDeG7AQAsIGT9 +hD4N4I4FACkiEnifFnCfG3+WSx7a8w6eAf5CRhWgAgUA0Q8AwCDRDwAAAAD9tdwFoApVAPxgCBXg +OwUAWXqsLzAFKAqVePHb+mBoHaAJJQD4TKYd4AsVAFjUHcAg0Q+NJy/ZFIrZ/aQAFa/IBQDozAEH ++QEAAO/VFCVTAQAA6tYJJmEBAAB8qwYp0RWqmprZHdrK2aD8AAgd4AxFAG3KAgkCYRjap5igjCAZ +2sT8AIId7//1AO+mBC5mAoAADcwCnKEoIhKPIpmiDogC6CYSL/qmAADaIOu8GClgBIAAWGOKwCDR +DwAAAGwQBBPavwMiAtEPAGwQBicgBygiAhnah/RCCBXhdwEA5YKVa9cCgAAJqggoop73ABRa0gCd +ACSinejaixIUAYAAJiISLCIJ+kFIFeBmQQAIZgomYoDsuwwDMMEAAPdgENuiAJ0AKyAWKAr/eLEN ++kDwFaAMBQBYYwpkolIe2qItIQca2qEf2m/7tOQF6t0BAOghGi7vAoAAD90CnUD8QAgV4EwFAJxD +m0L7pgANMAdVAOpGBC7OAoAAB5kCmUH+QkgV4DsFAJtFmEb+CAAGcv9RAOb/EQ5mgoAAD8wCDswC +nEcqIhWMKaaqpswsJgn6QqYVr+kFAPiADfxiAJ0ALzIE/bUEBaAIFQD54CAV4A4FAOmOOAvQBIAA +WXo7Ftpt+IQAFe+NBQD2AAgdoE4FAAkCYQkCYQkCYS1EIf6EBh2gCQUAKUQnKUQmKUQlKUQkL1IS +/odmHei/HQD6h0Yd6LsdAPqHJh3oux0AK0Q4KiIW+ofmHaiqHQD6h8YdqKodAPqHph2oqh0AKkQ8 +jTQY2lTq2mASYKEAAPWgB4gQ+/UALTwYDQCIDACKK0QwKkQx+IZGHa//9QAvRDMvUhKOX400/bSo +BaAFBQD4QsgVoApVAPggBhWgOwUAWXoL/GCIFajVHQAtRCIlRCP8huYdqMwdAPyGxh2ozB0A/Iam +HajMHQAsRDTmAAUCWQEAAAsCYSogBwoKQRvaBwyqEauqJ6adKyAWKQr/ebEK+kDwFaA8BQBYYoaO +NGjgKYon+gCCHeAMBQD7RAAVoA1FAFhaVSsiEiz6fwy7AfpCRhXgAgUA0Q8AAB7aLS0iEg7dAvxC +RhXv/yYAAAAAAAAAAOokAAtYBIAAWGKnZK3aYAArjl8a2hyx7p5fCuoC+oZmHaiKHQD4hkYdqIgd +APiGJh2oiB0A+IYGHa/8MgDAINEP2iDsJAAD2GEAAFhi1sAg0Q8A2iDrfBIpYASAAFhi0cAg0Q8A +AAAAbBAEKiIUKSIT/bOiBac1AQDqmQwBlB0AAGSQeCsgBwsLQQy6EayqLaKebtJuKqKdFNnnH9nL +7dnNFQMRgAAuIQcODkrklAIPdwKAAA/uAh/Z+p6g/kAIFaAYBQCYo52ilKUd2cn/xgAP8AQlAO+m +BC92AoAABO4CnqHtABUFUGEAAAoAigy4EayIJIadLyIUqf8vJhRpMg/AINEPiSLKkGgyL8Ag0Q8A +iif6ACId4AwFAPtEABWgDRUAWFoB0qDRDwArvBjqJAAJYASAAFhim2kyz4wnLckUisn7hAAV784F +AO67AQboQQAA7cUUJVPBAADqxgkl2QEAAHurKi/BFRnZnar6msmZoIgg87OYBaAJFQDipgIsRgKA +AAmIAvlAJhWgAgUA0Q8Z2ZOZoIgg87OGBaAJFQDipgIsRgKAAAmIAvlAJhWgAgUA0Q9sEAQsIGQo +Co75gAXkIgCdACkgBR3ZuOrZuBSFcYAAKyISDbsBKyYSjTkuIhMrMQv9QAYA4AMFACoiEfvAAEdw +n6UA7iYTJQbpgAAuoAX/wAQUYJi1APnPRg2gmWUA+c5GDeCLtQB7yWqMrH3PA9Iw0Q+Iq9sw/AAC +HaANJQALgAArIhQqIhMZ2Z0Lqgzs2ZwVWQMAAHuTE3rDEPJCJhXgAgUA0Q8AAAAAAAAA+kBoHaAL +BQD8AAIdoA0lAFv/ffJCJhXgAgUA0Q/AINEPAAAAAAAAAP1ACBXgOwUA/bMUBaAKVQBZeTzyQiYV +4AIFANEPAAAA/bMKBaAKJQD+QAgVoDsFAFl5NCoiEC2gBS4KlX7RtcDy/kymHeALFQBY0qbAINEP +2iBYzDZj/1RsEAgrIGQoCo54sQ0pIAUd2XTk2XQcgFYAAMAg0Q8AACwiEikiEQ3MAuwmEiY07oAA +jSyONiUwIP5hRBXv+MUA/cjmDeWlAQAqIhAvoAUoCpV48cXAkvhMph3gCxUAWNKLwCDRDwAAAOSS +hGHQgQAAiZeJnvkmABXgC2UAwCBtuQUKAIYJAmHRDwAADw9OL/zb+eAEB7COtQD/YBOcICclAK/Z +9YYADDA2FQD4QYYV4CxVAPhCRhWgLRUA/UJGDeAPBQB8oQp2oQf3QCAFYgCdAC8wMCgwMRTZROkw +Mi/+AoAACP8C6DAzL/4CgAAJ/wII/xEI/wL14Bu2KI+5AP0QABQ1TwEACEQCGNj1KYKTKIKjpJQJ +RBGkhCRMgC5ABfRCJhWgmaUA+cAZbGIAnQApCpv5wBkUYJhlAPnAGNQgibUA+WAYlWIAnQArCpn7 +wBk9YgCdAP1ABlRgBUUA/UAGFCIAnQApMEEuMEAvMDwrMD3oMD4vdgKAAOnuAg/+AoAAC/8CKTA/ +6zBCL/4CgAAI/wLoMEMvdgKAAOvuAg/+AoAA6f8CD3YCgAAI7gIP6AzrIhAkBKuAACiyE5gVf4EI +CPkMZpACL7YTL7IUDwIADwIAfvEID+gMZoACLrYUiUwFmQKZTHyhUPdACyQiAJ0A/UARRGIAnQD3 +QBTkYgCdACoQENMPZK4RikcpPCD7QcgVoAs1AG26BQkghgoCY8Ag0Q8AKzAjwOEL6zkrREErFBD9 +X/mFIgCdAC8wIX/3qC4wQSswQCwwPC8wPe0wPi3eAoAA7rsCDmYCgAAPzAIuMD/vMEIuZgKAAA3M +Au0wQy3eAoAA77sCDmYCgADuzAIN3gKAAA27Agy4DOoiECQEi4AALaITfNEIDc4MZuACLKYTLKIU +e8EIDL8MZvACK6YUKjA4KzA5iUzsMDotVgKAAAuqAuswOy1WAoAADKoC6NjHHVYCgAALqgLlmQIF +UAUAAComFplM+IFmFa/8WgAAACkiGImXKzELiZ6/uwtLS+W9eWTIwQAAY/0PAAAAAAAA+ABiHaOc +4QD5H+wuYgCdACgwJCkwJeYwJixGAoAACYgC6TAnLEYCgAAGiAIIiBHpiAIHsBEAAPjNAA+/9VoA +ACkwIfEgDA4SAJ0AKjAkKzAl7DAmLVYCgAALqgLrMCctVgKAAAyqAgiqEQuqAmWhVyswTCwwTe0w +Ti3eAoAADLsC7DBPLd4CgAANuwLqIhAt3gKAAAy7AmS8oCyiGfuf5NPiAJ0AK0YSLjBIKDBJ6TBK +L3YCgAAI7gLoMEsvdgKAAAnuAu/Yhx92AoAACO4CLkYUKDA2LTA0KjA1/mbwFaAJBQDpRhUu7gKA +AArdAulGEy7uAoAACN0C70YLLu4CgAAO3QL8gaYV7/eiACgwOCkwOeowOixGAoAACYgC6TA7LEYC +gAAKiAIIiBEJiALv2G0UQAUAACgmFv6BZhXv9s4AAAAAAAAAAPyACBXgClUA/bDMBaA7BQBZeBDA +INEPAP/yVA2v5KUA7NhhH2gEgAD+gAgVoAolAPQgBhXgOwUAWXgGY/uxAAAqMDgrMDnsMDotVgKA +AAuqAuswOy1WAoAADKoCCKoRC6oC6dhRFVAFAAAqJhb4gWYV7/T+ACQiGP5CJhXv9NIAKiIQY/ts +AABsEAYqIgcmIAcPAgAoqRQGBkEPAgDjogkkD/mAAPVByBXnhQEA+QAYOVIAnQD9sHoFoDsFAO2i +AilwBIAA/kAIFeAKVQBZd+H9sHAFoApVAPxgEBXgOwUAWXfcJDAhwKX0wAACMDsFAOzYMRpoBIAA +WXfW6dfhG1AEgAD0wA0SEgCdAAxrEQm7CCiyng8CAA8CAPcAFlJSAJ0AK7KdZLKd9IANYJIAnQD0 +gAshEgCdAPSACuKQDgUALSEHJiAHGNgd/EEEFardAQD2IAAHsGYRAOpmEA/8AoAA78wCDu8CgAAG +3QIf2BMIzAIW18oP3QKdsIcg92BGFaA/BQCfs5y0mLb84AATsAhFAOh3AgXogQAA92AmFeAHBQDn +tgUp4ASAAOe2By9GAoAADCCGDQJjDACG/ACoHeAMRQDA0g2IAui2CSXZAQAAKhYABYCGCwJpBWCG +CwJnBUCGCwJlLhIAH9emDO4RD+4I7OadIdChAABZdvmaEfWv4AXvywUA9IAGsp+WZQD0gAe4kgCd +AP5BiBXvk3UAIyQFI1KK5iQFJ/zAgAArIhIuMiQLikT7WgANMAwFAP9AAQUwDRUA+0AIFa+7gQBY +V6n2QkYV78sFAI8gjieXLChSdOflFCdogQAAC90B6PsMBukBAACd6f3BBhXgDAUA+mIoFaANFQBY +V5suMhKw7v5iRhWgAgUA0Q/+oFAVr/qSAP/4BA2gAwUAABfXdIx4lhD3gAngkgCdAAyrEam7L7Ke +9+AKQlIAnQArsp1ksT+wzZ14Zb5SYADt/hBCHa/5kgD9r3IFoApVAPwgKBXgOwUAWXdYiirsEgEp +WASAAFl2yPv4Ah3v/EoAAI03jDbqIgopcASAAFgnEY4R7NerHSAEgAD8gAgV4DsFAP6BSBXgClUA +WXdIjkwjUormRAUnfTqAAItAiEeXTPyuiBWvyQUA54UUJHiBAAAJ/wHsuwwH+QEAAJ+I/wEmFeAN +FQD6YigVoAwFAFhXXyoyEvtf4BWvywUA+mJGFa/6PgAAK0ISLjIkC4pE+1oADTAMBQD/QAEFMA0V +APtACBWvu4EAWFdR9oJGFe/+OgArIEAIuxD6YAYV7/POAIwiZMBP/GAIFeAKVQD9rvwFoDsFAFl3 +HsAg0Q8AAAAAAAD/9OQNoAsFAMCgWXP/jHgZ1yKKEPmf9cCSAJ0A//soDaALBQDAsMDaDc00/OEG +Fe/67gCPMNog/67YBaf/wQDvJEApYASAAO42ACNYYQAAWGANY/+NAAAAbBAGiScmIAcomRQGBkHn +kgkkC3GAAAUIR/kADOlSAJ0AKiBBE9cH+gCCHeAEBQDxWVwN4AwFAPTACmoSAJ0ADGoRo6otop77 +oBAr4gCdACmineqUAASNeYAALSBBnBDrFgEuji4AABTW/R3XQykhBy8gBxXXQvhBBBWqmQEA/iAA +B3D/EQDq/xAMzwKAAO+ZAg90AoAADogCBYgCDZkCmaCOIJiklab1QEYVoD8FAP9AZhXgBAUAlKX1 +QOYVoA9FAOXXLx92AoAAD+4C7qYBJUiBAAAHIIYJAmMHAIYJAmH9gAAUsA0lAA2ZApmpDGgRA4MI +Kzad/EGIFe+fdQAvJAXysUgV755lAO4kBSb8rIAAKyISLjIkC4pE+1oADTAMBQD/QAEFMA0VAPtA +CBWvu4EAWFbgJCYSiyCOJyQmDPyuiBWvzwUA5OUUJ2iBAAAP3QHsuwwG6QEAAC3mCf3BBhXgDAUA ++mIoFaANFQBYVtEiMhKwIvJiRhWgAgUA0Q8A//pIDaAHBQAV1q2NWPegBjiSAJ0ADGoRo6ooop77 +AAbT4gCdACqineSg0Wbz/QAAnlj5QGgd7/pyAC8gQAj/EP7gBhXv+XYAip4koAQsoAUY1sfroAYq +JgKAAAxEAuqgByomAoAAC0QCCEQRCkQCCEQBK0xn+o4ADfCMlQD7YIAV7/jaAIlw2iD5rcQFp5nB +AOkkQClgBIAA6HYAI1hhAABYX4LAINEP7UQAAmEhAADrTGcpcASAAP7gaB3kux0AWXZPixH8IAgV +r/h6AAAAAP/3+A2gCQUAnBD6ICYV4AoFAFlzU41YixGMEPm/+TCSAJ0A//zsDaAKBQDAoMDqDt40 +/qEGFa/8sgAAAGwQBIknJCAHKJkUBARB55IJJArRgAAT1mf2gGgdp4UBAPkAC7lSAJ0A9IAKOhIA +nQAMSRGjmSqSnvdADPpSAJ0AKZKdZJFiKiAHKCEHH9ZgG9an+UAABDDKEQDqzBAMRwKAAAyIAguI +ApiQjCD/IEYV4D4FAP8gZhWgDUUA7tacHmYCgAANzAKckSsgQfxBBBWgBAUA/yDGFaH6AQDklgUv +/AKAAO/MAgTQgQAA7swCDYkeAADAsJSX/SCGFaAFJQAHIIYKAmMHAIYKAmEIvxEF/wIV1oifmQxu +EaPuLead+EGIFa+cdQAsJAXysUgV75plAOokBSR8rIAAKyISLjIkC4pE+1oADTAMBQD/QAEFMA0V +APtACBWvu4EAWFZCJCYSiyCOJ5Qs/K6IFa/PBQDk5RQnaIEAAA/dAey7DAbpAQAAnen9wQYV4AwF +APpiKBWgDRUAWFY0IjISsCLyYkYVoAIFANEPAAAAAAD/+pgNoAcFABXWD4pYaqFnDGkRo5kokp5u +hG4pkp3kkGplW/0AAJtYZZ6vYAAPAAAsIEAIzBD84AYVr/oOAI5w2iD9rK4F5+7BAO4kQClgBIAA +7XYAIlhhAABYXvbAINEPAAAAAAAAAPoRIh3v+34A//mQDaAJBQDAoFlyz4pYa6GN//6IDaAJBQDA +kMD6D680/qEGFe/+TgAAAABsEASKKo6vGNZA6CYLIUiBAADp5gAleOEAAO8mCClYBIAA/kEmFaAM +BQD5QeYV75iFAPhAph2gDSUAWF8HwCDRDwAAAGwQBBvWMSoxDCuyfxzWDvhiEBXgFGUA+0PWDeAF +BQB8oRbqJAAK2ASAAOw0AApoBIAAWMr4wCDRD2iRSGiSKGiUCsBA//9oDaAFBQAAfKHRe6vO2jBY +yyXVoP//EA2gBAUAAAAAAAAA/UDmDaAUZQB7owJgAAHAQNowWMs5//6EDaAFBQDaMFjLSeWkAAUB +EYAA/awcBaAKVQD8YCgV4DsFAFl1pv/95A2gBAUAAAAA//24DaAExQBsEAQpMBPxJnAN4PWFAGiR +BMAg0Q8AhCeEThzV/+0wESJIDwAA/T+GHeAKVQDuMBIiQBMAAP8bph2gOwUAWXWR/GIwFaP61QDq +SggB2GEAAFjLSqU7/GJQFaTa5QCqSljLR+okAApYBIAAWMtPwCDRD4QnDwIADwIAJEIOHNXoLTAR +LUQC/mJQFaAKVQD+gGYdoDsFAFl1e/xiMBWhyoUA6koIAdhhAABYyzSlO/xiUBWiqoUAqkpYyzHA +INEPAABsEAT0WwId6LMdAPRAAELwSgUAI1R/K1R++q9GHaBENQD0r6YdoAh1APivhh2gCQUAKVR7 +0Q8AAGwQBI84/auQBaAKVQD8YhAV4DsFAP/gaB2h//EAWXVbKTAQ/SGAANACNQBokj3AINEPANow +WMvc/18gDeAIdQCLp4u+LLKODJlW+QLgHejcuQB9IA/7YEAl4AwFAFjLqMAg0Q8AWMsSwCDRDxLV +sIM2IiJ/CTMRoyKCKoIoLiIS//GCHeCDBQDvJGQnYJyAAIon+gCCHeAMBQD7RAAVoA1FAFhVoSsi +Eiz6f9MPDLsBKyYSjCcuyRSKyf2EABXvzwUA790BB3EBAADuxRQlUwEAAOrGCSbpAQAAfasGKMEV +qoqayRzVXNmg/AAIHaALRQBtugIJAmEf1Y4b1TiboPhACBWgCQUAKaUIKaQS/QAAFDAJRQAJiAKY +oS4iEo0in6ID7gLuJhIu+DYAACsgB/pAaB2huwEA67wYKWAEgABYXhnAINEPAABsEASILiMsOHOJ +BcAg0Q8AAIsuiLPsRAAK6ASAAOu84ClQBIAAC4AAjCLtIAUufu4AAGTf1Y4uc+nWY//NAAAAbBAW +KyAHIxYa5RYXKkgEgAD4ISYV4AoVAJofFdVkJhIa/CLoFeG7AQArFhaHZfjAiBWj/vUA+qyEFafd +AQD2weQVoHf5APgKAAGwyFkA/CNmFaxIHQD6jwANMLZ5APoiZhXvqgEA6hYUJFRKgAAGC0n6IcYV +4AAmAAAAAJ4eLhIaLRYVL+E9KOAdKBQALxYSLuIfLhYQ9aA7IRIAnQCJIvsgQKCSAJ0A8OVgDeAM +BQDsFhEjgEmAANpAWM1b9AACHeAGBQAuEhvacPwAYh3gDCUA7tw5CdgEgABYzUn3QABDMA/1AHbw +VfQhBhWkhh0A4xYHJEAFAAD4IwYVoAE+AAAAKRISZJdDKhIaiqV9pp/8IggVoAsVAOsWESpQBIAA +6xISKOgEgABYzXBmp3H8AGIdoAUFAArFOmRXW8NglBjyIOYV5NYdAC0WGC8SFh7UtxPUt+kSGC+g +BIAA9eAIchANpQAM9hGjZihinvkAQUPiAJ0AJmKd22DmtAAFvIGAAI/omxX34Dy4kgCdACgyrtMP +6hIJJDrRgAArMq3kt1Fny/0AAOnmCCW6oYAAKSAU0w+qmQkJRykkFPUgO75SAJ0AKxIbLhIU8WDA +DeANNQD/oD5gogCdAGRQyI8XDwIADwIAyPFkUGPrZAAJUASAAPwAYh2gHYUAWM1w7hIOLXgEgADm +Eggir1mAACgSE/upGgXgDAUAnPKc85z0nPXrawIPVAKAAOv2ACxAgoAACogC7NTfGs7CgAD5BgAM +cApVAPngJhWgG8UAWXRuLRIV+aA46VIAnQDAIO4SGCp/AoAAo/8u9p3RDwAAAAAAAI/o9+A5oJIA +nQDpEhgqNwKAAKNmKGKe+QA5++IAnQArYp3mtAAFueGAALD4mOj6wGgd7/tmACoSEWSgeusSBSlQ +BIAA/ABiHaAdhQBYzUAY1L0W1LsrEACOGBnUvPbZiBWh+x0A6O4CD/sCgAAJ/wLmtgsF/KSAACwS +EO0SEiNb/wAAKLI/K7F9nqCfoZ2inKObpPlAphWgAHYAAAAsEhAtEhIrYQWIY56gn6GbopijnaSc +pSasGC0SE4weAt0Q7RYKLmQCgADsFgsrpv4AABrUQfghCBWgDwUA/iDGFeAPJQCfHQqIAigWDOtk +AAlQBIAA/ABiHaAdhQBYzRSNHC8SGokWKxIaj/XxNWAN4/71ABzUj4u0/0BGFaCPmQD9QAYV4G+J +AP1AJhWg36EA8NAAEzDPkQDu1Ice6UKAAO6mAyxBAoAA/QYADHm7AQDrpgQuYMKAAAxmAghmApal +jB3pnAElMGEAAOkWBiZj/QAA7BYNLnu2AADrZAAJUASAAPwAYh2gHYUAWMzxFtRyiRqPG/ohiBXg +DQUAnRGdEp0TnRSdpP1AphXv/vUAnqKeo5ugLhIa6f8CCsbCgADo/wIA4DEAAOb/AgDYIQAA7RwQ +JTBhAADvpgEg0BEAAFjLwcDB6so5DSgEgADZoOoWHiKgOYAAJBYf/gAiHaANBQAJ7TjlFiAm6zmA +ABPUVIgbjBoa1FMrEhuEGBXUTPF4ABSwDhUA6+s5CieCgAD0hgAKdg8FAAuvOf0mAAywDTUA+SYA +DDAMJQAL3DksFh0J+QIpFhn55gAPsAUFAP4jhhXgAyIAD1ZQ/hgABfDPyQD8IYgV4I+xAP1ABhXg +73kA7O4RDEQCgADrzBAN2oKAAOy7AgszwoAA+MYACzDPgQD9iAAWMY9pAOzuAgxFAoAACO4CHNQm +nKEoEAAG7gL7xgAPcG+5APTIABM7vwEA98YADzAGJQDm7gIN3QKAAO6mBCxCAoAAC4gCmKUb1B6b +ohjUHvlAZhWv+aYAAAAAAAAAAJmhlKCeop6jnqSepZ2mnaedqJ2pLxId5VwBJTChAAD+oBGcYgCd +AOtkAAlQBIAA/ACCHaAthQBYzIXkUFFqzsKAAPSgCmCSAJ0AKxIcx+/7JgAM8A0FAOOZAgv9LgAA +jRMsEhqOEo8Ri8wswhCZoZup9UAGFaAIBQCYopimn6OepJ2nnKWMFP1BBhWv/iYALRIbLBIZG9P1 +DJkC65kCBoQZgADw4kAN7/71AJmhlKCeop6jnqT/QKYVoA0FAJ2mnaedqP1BJhXv/TYALxIaIhYh +K/IWJvE4IvE6LPIV6PE5KzQCgAAGIgIm8Tst8hvu8hosRAKAAAhmAijyFy/yGZ+inqOdpJymm6eY +qJalmaGUoJKp8iQoFa/79gAAAAAAAAAA8OJADe/79QCZoZSgm6Kbo5uk+0CmFeAIBQCYppinmKj5 +QSYVr/s6ACwSGo0SL8E7JsE5KME4LsE668IYKzQCgADm/wIMRAKAAAjuAibCFIjMLMIQm6SYp5ao +maGdopSgnKOfpZ6pjBT9QMYVr/oaACsSG+wSGSWDUYAAG9Ozx+/9JgAMsA0FAOuZAgOA8YAAmaGU +oJ6inqOepJ6lnaadp52o/UEmFe/5MgAuEhoiFiEt4hIs4hMr4hiI7YbuL+IUgu8u4hGeop2jnKSb +pZimlqefqZmhlKCSqPIkKBWv+FYAKxIcx9/7JgAM8AwFAOOZAgOA8YAAmaGUoJ2inaOdpJ2lnKac +p5yo/UEmFa/3mgCZoZSgjhP+ICgV4AgFAJiimKOYpJimmKeYqJ+l/0EmFa/3CgAqEhoZ04WKpRPT +GSUSIOQSHyVMMIAA49MVE4O5gAAc03+LGAy7Avs/RhXv57YAhR/A0vetAAr/6EYAwKX9pvIFoBvF +AO5OEQpoBIAAWXL8Y/iHAAD6IogVoA4FAJ4RnhKeE54UWMrEJBYf5RYgJWIxgAD6IogVoAsFAFjK +tyQWH/QkBhXv8MIALxIQZfi1Y/haGtM4iBgKiAL5P0YVr+XqAMCgWTE4yKcb018rsIBksFoqEhRY +yrDpEh4tXx4AAPoiiBWgCxUAWMqk+CPIFe/vQgAAAP/gpA2gNgUA6xISKlAEgADsEhAo6ASAAFjL +bWP4dwAAKxIajBntEhcpUASAAFhYwtKg0Q8AAAAA+6aOBaFLFQBZXZksGgAMrAL7poQFoUsVAFld +mWP/hQDAsA34NOjmCC3FpgAA2iD8QGgdoBvFAFhUoGP/qisSFtog67wYKWAEgABYVJtj/5fAoFlv +nx7SwY/o+f/C+JANpQBj/8eMHy0hCf5CsBWv/wUAD58BD5gM6CQUL3ECgAD/YGYd4AgFAOi0AC7u +AoAADt0CDN0CnbH8daYVr+FaAIonjRnAwOqsIC7YBIAAWFMI0qDrEhgqZwKAAKPMK8ad0Q8AAAAA +AAD/32wNoAYFAP/g3A2gBUUAwKBZb30e0p+P6Pn/xhCQDaUA/+N4DaAGBQAAAAAAAAD/4xANoAsF +AA34NPnBBhWv4xYAAGwQBBTS5IIgJEJ/E9MCBCIMAyIC0Q8AAGwQDBjTABnS/iiAfSqSeymSg/1I +ABUwhAUA6pkIBHw4gAD1IABCMAAuAAAAJCqApJQY0qnoAAUIyASAAAkCYQkCYQkCYQkCYRnStCpB +Kx/SfBvS7XmhahjSyI4gmxD+IEYV4AlFAOgWBi92AoAACekCmREvQAcPD0EA/xEPrwII/wKfFAjq +MBzS4QPuAvggphWgDwUAnxcrIDX+IWYVoA0lAJ0ZDLsC6xYIIZxtAADqRAAI2ASAAPwAgh2gDSUA +WE8V0Q8AACssNvonQBWgDGUAWWyNY//XAAAAAABsEAYoIAUtIAfBlA8CAPkADrVh3QEAKSICZZGT +LjABFtJQ/8FABtAMpQAvIE5l8lfu0kseyASAAPWgCdISAJ0ADNoRpqooop6dEPcAEZTSAJ0AKqKd +56QABQ0BgACL6JkR92ANMJIAnQAtYq5k0VgqYq3koVRl+/0AAO/mCCUKuYAAKyAUpLsLC0crJBT1 +YAy90A0FABjSNx/Sp44g/eXGFeALRQDo7gIPVgKAAAuqAhvSoi72NOr2LSvoBIAA6w8eDdAEgAAN +AmcLQIYNAmULIIYNAmMLAIbtDAAD2QEAAArghh3SlgsCbwrAhgsCbQqghgsCawqAhgsCaSohCS8g +By4wASgxASshJP4gAAcw/xEA6v8QD3QCgAAP7gIOuwIf0oguISINuwIrdiAP7gKNICp2I/jkhhWg +moUAqnoY0hYudiL9oAAWsA4lAA7dAi12IYszK3YlCACJCgCKDJoRpqr9U6YVp4UBAPkAB5lSAJ0A +wCDRD4vonRH3YAjQkgCdAAyaEaaqL6Ke9+AJhNIAnQAqop1koSewv5/o56QADXXuAAD8IAYV4AFG +AAAAAADqJAAJ2ASAAOxEAAroBIAAWFfP0qDRDwDAoAy4NOjmCC11jgAA2iD8QGgdoBvFAFha22P/ +ygAAAOokAArYBIAAWFku0qDRDwAAixDaIOu8GClgBIAAWFrRY/+kwKBZbrAe0dOL6IkR+X/ycJAM +pQBj/7IAAAAAAAD4QrAVr/4FAA6+AQ6/DC8kFC8hCe2kACxBAoAA7qQDL/4CgAD55gAPsA4VAA7/ +Ap+h/tWmFa/44gCKJ+tEAApoBIAA+0QAFaAMBQBYUhfSoNEPAAAAAAAA//dEDaAKBQDAuAubAvpA +RhXv/H4AAAAA/CAGFeAKBQBZbose0a6L6I0QiRH5f/aQkAylAP/7kA2gCgUAAADAoAy/NP/BBhXv ++1YAAGwQCCkgBSYgB+c0AAnABIAA+gKCHaADNQD7IA89IWYBAAUJR+XRnBSUUQAAjCLkZAAGBBGA +AMAg0Q8AAC0iHWXR2Ygni4j9AqQVr80FAOmCCyR4gQAADf0BrcztFgImYQEAAPsgDixiAJ0A7okU +Kk8CgACZE6uaqe4uhRT7gBDjogCdAMl0yULZsG1JBQcAhgkCYS0SAyryAA2qCP1AE6QiAJ0AmvD5 +YGgdr/4KAAAAAAAAAOxqEQMkoQAABaoILqKe98AKcdIAnQAqop3Pq9og7CQAA1hhAABYWmnAINEP +F9FsiXiYFPcgEAiSAJ0ADEoRpaorop73YBBR0gCdACqinWSiAbCbm3hkr8IZ0YSZoI4g/aOyBeAP +FQDvpgIvdgKAAAPuAp6hjoMt0n/9os4FqO4dAK7dHtFe7aYDJUhBAAD8AAoVoAgFALGI6YMeDA/o +AACephjRyflBBhWgHwUAn6eNIAjdEQPdAp2p6SIHKmcCgAClzCPGnSsgBo0iwOHu3QIF2AUAAOsk +BiTIgQAALJkE+SAoFa/LBQALmwHtJgImYMEAAOyVBCRDQQAA6JYBJdkBAAB7iyUqkQUd0T6oqJiR +nYCMIBvRruuGAi5mAoAAA8wC/QAmFaACBQDRDx3RNp2AjCAb0abrhgIuZgKAAAPMAv0AJhWgAgUA +0Q8AAAAAAOokAArYBIAAWFh00qDRDwD/+tQNoAoFAPiwyBXgGJUA+CAmFaABBgD7IGgd4AoFAPsB +ZhWv+boAKFKEK4AIKYAH+CAGFeCsJQB8sS4Y0YaIgMCgC4AAihCJEQqZDOkWASTu6YAAK1KCf7cJ +LFKCf8/GY/3JAFlpe2P/7y+BCy/8+A8PQ+/8/CTz/QAAD+k4+CAGFe/+5gAA68oMA4G5gAAKTBTt +zAgrwASAAO1NNg3IBIAA0w9t2QUIAIYJAmGJEqp47E4MBMkBAABt6QUIIIYJAmONE4wSCt0Mrcws +zED94AYVr/b+AADAoFltxYl4iBT5P++wkgCdAP/4IA2gCgUAwKDA6g6eNP7hBhWv9+YAiBIojED5 +4AYVr/YmAAAAAGwQCIgniSL8QPAVr8YFAOqBFSpfAoAA6zsIBECBAAAGiAH5QABEMA81AOiMQC3o +BIAA+WAg0qHMAQAu0Aft0MweqASAAAzLEersAyc7+QAA7bsIBIBBgADAINEPKLKemhHu0MIXSBkA +APkAH1viAJ0AKbKdLBYA5pQABJ85gAAp4gj3IB9wkgCdACzSrmTDnSrSreSjmWTD/QAA6OYIJRzx +gAAsIBQrUAesuwsLRyskFPVgHt3QDhUAGdD7HtEpixCKIIg07NCxHd8CgADtuwgNVgKAAPEABPpf +zQUALSAHI1EB/0YADHDdEQDtISQu0oKAAAmqAphhmmAa0MT8wEYVoBiFAPjAZhWgCCUA6gAFA1BB +AABtigIKAmEsIQn6QPAVoAgFAPjAphWgP6UA42YJLmUCgAD/hgAOcaoBAOxmBi1UAoAACtoCDqoC +mmQoIQn6QGgdoAwFAP6gJBWgCTUA6badLF0CgAD/ZgAN8A0FAFhXwcAg0Q+PJ7F+Dq4CKfEV6RYC +J/iBAAAN/QGdFa2Z7VwgJMkBAAB50wSIEgjdDInQ+PgABPCIFQB4mRmeYenQ7RPD/QAA+MAGFeGI +HQD4wEYVoABKAJ5hGdDnmWCI0QhYFJhiHtDmGNDkiTaN8SiCgP/gpBXimR0ADpkBqYiYY+gSBSJw +CQAA7xYDL3cCgACu3aj/50gIB/kBAADv0wl0QAkAAIkTCd0MDIgRDogM5IBIa/cCgADt6QgDQEEA +AJgU+eAPCuIAnQAN/wz5AGgd5K8dAG2pBQ0AhgkCYYkVCn0MpvjqjBAkyQEAAG3ZBQkghgoCYyoi +AAiqERjQva5p/6GEBaAPFQD/IMYV4A1FAA2qApiUGNC5mpWKUyiCfhbQuP+gigXoqh0Aqojolgck +6IEAAP4AChXgCgUAsartgx4ND+gAAP0hRhWgKgUAmpuPNIhTijUG/wH3oVYFp4gBAO6qAQxCQoAA +CP8CBv8Cn5woUAktUAsvUAomUAju0KQe6QKAAOb/EAxDAoAA+wYADDCmMQDt/wINUcKAAAr/Agj/ +Aoo2GNBBn53+YUgV5dYdAO6qAQ7oQoAADaoC+yHGFaRmAQDo/wELMgKAAAb/AohVmJ+GViaWEI5X +LpYRL5YSjVQtlhMqUAH/oKYF4BiFAO5RASgECoAA8UAED9IAnQAqIAcKKkDtISQtUoKAAA+qAiqW +FI8gKJYX/eAAF7AINQAI/wIY0B0slhbvlhUk0YEAAPgACB2gDyUAbfoCCgJhLyEJLCAH++AAF7AY +pQAI/wIvlhr/oMwF4cwBAADMEQzcAg/MAv4gKBXgCgUAKpYZLpYd7JYYJ/gNAACfEY4RLradLVAH +iif1oABGsAwFAOvUAAVQgQAAWFA10qDRDwAAAAAAAADphAAD8omAANMPbXkFDUCGCQJlY/44wKDA +igiYNOjmCC1jVgAA2iD8QGgdoBvFAFhYxcAg0Q8AAPtvAA6/75oAwJD8IAYVr/BmACvMGOokAAlg +BIAAWFi7wCDRD8CgWWyaHs+8iegdz7z5P+AokA81AGP/sAAAAAD4QrAVr/kFAAm5AQm8DCwkFCwh +CQSIEPlAZh3gCQUA6aQALmYCgAAIzAIOzAKcof+1phWv79oAAGwQBikgBSYgB9gw9gBiHeAaRQD7 +IA6NIWYBAAUJR/0jAAFfxQUAiyITz6DkZAAFg8mAAMAg0Q8AAACIJ4uILIEV6YILJHiBAAAF/QGt +zO0WACZhAQAA+yANNGIAnQDuiRQqTwKAAJkRq5qp7i6FFPuADOuiAJ0AyTXJQ9mwbUkFAwCGCQJh +jRGK8A8CAA2qCP1AD7wiAJ0AmvDTsPhgaB2v/hoAAAAAAOxqEQMkoQAAA6oILqKe98AJ8dIAnQAq +op3Pq9og7CQAA1hhAABYWHHAINEPG890ibiYEvcgDAiSAJ0ADEoRo6osop73gAxp0gCdACqinWSh +hLCcnLhkr8IZz4yZoI8g/5/CBaALFQDrpgIv/gKAAAf/Ap+hj4Mu4n/9nt4F6P8dAK/uH89m7qYD +JUhBAAD8AAoV4AgFALGI6YMeDA/oAACfphnP0flBBhXgGAUAmKeOIAjuEQfuAp6pDE0Ro90n1p0s +IAaJJ+0iAiZgBQAA7CQGJMiBAAAsmQQL3QKIke0mAiZgwQAALJUE5ZwBBENBAADolgEmYQEAAHyL +JCqRBR3PSaiomJGdgIsgwMDshgIt3gKAAAe7AvsAJhXgAgUA0Q8dz0CdgIsgwMDshgIt3gKAAAe7 +AvsAJhXgAgUA0Q8A6iQACtgEgABYVoDSoNEPAP/7FA2gCgUA8yBoHeAOBQD/AWYVr/pCAOvKDAGB +uYAACkwU7cwIKcAEgADtTTYNyASAANMPbdkFCACGCQJhiRCqOOxODATJAQAAbekFCCCGCQJjjRGM +EArdDK3MLMxA/eAGFa/4/gAAwKBZa+0bzw+JuIgS+T/zmJIAnQD/+hQNoAoFAMCgwOoOnjT/YQYV +r/naAIgQKIxA+eAGFa/4GgBsEAQVzwgWz3fwiAATsAlFAOTPdRnGAoAACYgCKGYtBTUC52YuKhgE +gADlZjQpMASAAANghgYCZwNAhgYCZQMghgYCYwMAhuYMAAEZAQAA9choHaCKBQCqIgMCbwTAhgMC +bQSghgMCawSAhgMCadEPbBAGIyAHFM7mAwNBDDkRpJkokp79CCBB0AU1ACuSncu2H89kGM9k+kAI +FaAJBQD4IAYV4AwFAPggRhXgDVUA+CAmFaAe5QBYUuAMOhGkqvVTphXgAgUA0Q/aIOs8GClgBIAA +WFfKxyTRDwAAbBAGKCBwwGTlzssUdbSAACQgBwQEQQxJEaWZKpKe4yIALSFsAAAqkp1koFDbMFje +NcDB/AACHeAOFQD5neQFoAkFAPggJhXgDwUA6RYCLVgEgADoFgAp0ASAAFhSwAxMEaXMJsadKiBw +Kwr7C6oB+k4GHaACBQDRD8Ag0Q/aIOtMGClgBIAAWFemxyTRDwAAbBAEJCAHE88tFc6mBARB4zJ/ +Kk8CgAAFmQgokp4PAgDkMwgMETgAACqSnWSgQwM7AvwAAh2gDSUA/gBCHaAfBQBZbSf9nj4FoA4V +AOymACnuAoAADt0CnaGLIJuiDEkR9SAARPAIJQD5M6YVoAIFANEP2iDrTBgpYASAAFhXhMck0Q8A +bBAWLzAQ950MBeAKdQDz4iAN4AYFAPXgQYCSAJ0AaPIDwCDRDysgB/oghhWnlQEA0w/4I4YV4bsB +AOsWHiyUaAAALCAF94BZ1FIAnQAtIHLzoFl/kgCdANogWFSxZafPjiJl58ovEh6JNSsiEPghRhXg +GoUA7xYQJMBdAAD7PgANdIgdAOgWCyRADQAAmB2YHPXgTDoSAJ0ALRIQDN0Rp90s0p63Tv+AXHOi +AJ0AK9Kd+2BaWBIAnQCMKY4qDA8+LxYaDO4Mf+t7KiAiKSAjCpkM+yBcGBIAnQAoIAcaztj9WAAV +4YgBAA2ICSiNAi6BBgnvNg/uDC6FBi0gIg/dCA0NRy0kIvugW0gSAJ0AKKJ/7iILJsv9AAD7AAQA +0AgVAOCZGgxACoAA6e4IBEP9AAAI7gIuJgooEhoM6Qz5IFnjogCdAIkdHs6/LCAHKCEHHc41/kEk +FeDMEQD1kAAWOogBAO3MAgxDAoAACP8CLSEknLCKIIgaHM4y7t0CDVYCgAAKmQKZsSohIp20n7MM +qgIczq2asikiEIoUmbUZzqv8RxAV4A8lAJ+5lrf5YQYVoA4VAJ66/AMABvBOdQAN6jkNyTkKmQKK +G+a2CyHAQQAA6bYGJcjBAABtqQUIAIYJAmEezhaevI0w86A/spIAnQAqEhDpEgwtVwKAAKeqKaad +KCAULxIapIjoJBQngMGAAC0SGowpKyA4rcycKfNgUF+SAJ0ALhIc+cBPOVIAnQDAINEPLCAHLyAF +KzAR/EBIFeHMAQAsFh754C6kULs5APugR+CQH6UA6hYELm8CgACn3S7SniwWECsWGf/ASMviAJ0A +KdKdKRYR6RYdKAQKgAD7IEhYEgCdAPpAaB2gC0UAWWrQHM3i+0BIQFIAnQCMyPeASHCSAJ0ALXKu +96BFzVIAnQApcq0fzdnvAgAGc/0AAPsgSNgSAJ0AmRXu9ggoBAqAAPsgRNgSAJ0ALjAULiQ4LTAV +LSQ5JiQ7jDiLNoo5iTqPPIg7KCUlKSUkKiUjKyUiLCUJLyRMjj0uJE0tMhAsMhEsJhUmJHEmJHL2 +TgYdoAsVACskcyYmHSsmGSsmGCsmFyYmGyYkTyYkTislKS0lKCowESgSBC4hGgoKQyokOv8ALZCi +AJ0ALSA4Kvr8+8AEBTAPJQAP3AHv0B11U7EAAP8AAAWwCBUA+w0ADfn+HQAPuwgOuxELqgwezgcf +zjD7m4wF4AkVAAycOQr4Lgr/LAiYOf8AAERwD0UAD90B7Z05C3gEgADsvzkLSASAAA3pOQn/Ai0g +FAipHOklNCVz8QAACOgcpN3oJTUvdAKAAA7+Ai4mEC4SGe0kFC1EAoAA+eYAD7AsBQDvJg8nKomA +ACohCB/N1CkgB44pniz4YcgVoLkRAPgiRhWhmQEA6BIRLdqCgADvuwIMzAKAAAmqApuAG84HjyCc +g/tGAA1wCTUA6/sCD/4CgAAJ/wKfgRnNepmCjyuWhZqEn4n/AQYVoAkVAPsAxhXgHkUA/iEmFaAL +BQDrFhMu+gKAAPnmAA/wGmUA6hYbJEjBAAApFh2fhyYkFCogBwoKQSqsFOrN7h0BCoAAwJHrMg8s +yAqAAAqZAhrN0CsWFCkWFSmmQBrN5ykSHZoYCiCGCQJjCgCGCQJhKyA4IxYg6mQACxgEgAD6AgAG +8OsBAP+NAAmwDCUA/Y0ADXDrGQDq7gILSASAAP1gBAWwGgUAC6k5KiA572QAC0AEgAD4ZgAJ8IsF +AP1ABAYwSQUA/WIADDCqAQAKnzgrEh0czcr6QAgVoA0FAJ0RCP8CA/8C/CAGFaANBQDyJAgV4AwV +AO/uAgXYgQAA/8AAFzAPRQD/xgAPcA8FAP4gRhWgDgUAWFEzwMHvzbkdWASAAPpACBWkCQUA+CAG +FeANBQD4IEYV4AgFAPggJhWgDhUAWFEoKBIU6RISLVgEgAD6QAgVr/71AJ4Q/ESkFe//9QD8RIQV +qJkBAPs4ABS4iAEA6YgCDuwCgAD9hgAOcB6lAPggRhWgDQUA/CAmFaAMFQBYURTboPpACBWv/fUA +/CAGFeAMBQCcESkhIighCcHs+SAAFL//9QD5BgAMcAwVAPggRhWgDQUAWFEGKhYWKiEoWUaW7c2L +HWAEgAD6QAgVr/71AJ4QLhITLdCMG82G7t0CBmP9AADi6RAO6EKAAO2ZAg5mQoAADJkCC5kCmREo +IhUZzX7//+Id4B7lAPoiyBXmiB0A+QYADHANBQD4IEYVoAwVAFhQ6xjNVYwYLxIV74ZALUgEgAAM +YIYJAmcMQIYJAmWJMPMgE0qSAJ0AG8zZLxIQLCEH7hIbJekhAADq0pEv/wKAAKf/LvadK7KOjyAu +IgAoIA0pIAyuu+4gFS3eQoAAq6oqFhcrIAcrpAcppAwspQcopA0sMgkupBUt0hwuMhH4YggVoAkV +ACmlKSilKC+mHv1BJB2gG0UA+0CmHe/MAQAspSP6IKgV5u4dAP+gAEaw//UA/CMGFaAOBQD9QsYV +4A0VAFjcMCwSFysSGCbEFP2CsBWgLQUAWSydLRIZZNJVLiA6wP//wBKsYgCdACkwVygKQAmIDJge +LQoB/h/iHeAOBQDsIQktWASAAOwWDylQBIAAWNwcJiQUix8sIBWNHlksi8C8iicczL6KrokZDACH +CgJhCgJhCgJhCgJhCgJhCgJhCgJhCgJhLRIZK3at+ECmHeAOFQDuJBcmgVmAAC8gOsCPePEeGcyU +KDBQCYgKKIIQ7DBXIdlBAAD6QGgdoA0lAAuAAAUKR/lAHQlSAJ0AwCDRDwDqJAAJ2ASAAOxEAAro +BIAAWFJf0qDRDwAAAAULR+sWHC2UaAAAKiAFwcT9QA/EIgCdAG6oei0gcn7fdNogWFKsZaB8jiJl +4HcoIBQEiAgoJBQvMgB69lgqIAcKCkEMqxEHuwgssp4KqQL3gCJaUgCdACuynekWHyWiUYAALyBx +5ZQACeAEgAD6QGgdoO6lAO/mOQpoBIAA/sBoHaAPFQBYUmsMWRH3IABE8AhFACiWnSoSHPlAGslS +AJ0AwCDRDwDqJAAJ2ASAAOxEAAroBIAAWFIv0qDRDwD9mbYFoApFAPxACBXgK6UAWWw2/kNEFa/o +7gAAAAAAAOw0AApoBIAA+0QAFeAOBQD6QGgdoA8VAFhSTisSG7S7+iNmFe/13gArEh4azMn/mZIF +4A4VAOqggC2BCoAA/cABB1ANNQD98AYd594BAOrYNH14BIAAGczA+CPIFa/79QAL2wMLqgEbzL0J +iAoZzLgK6gL7FCYV56oBAOqUgCeLyYAAZKF8wYP4ISYVoA8VAP4iZhXgDgUA/iJGFaAdNQD8I2YV +7+sqAP/3rA2gC2UAxJD4IcYV7/bSAACOHekgcSngBIAA6iQACmgEgAD4HUIdoA8VAOmGOQ93AoAA +7rsIC3AEgABYUhuPHbT//iGGFe/fZgAczACMyPeAFvCSAJ0ALRIQDN0Rp90u0p63T//AFyPiAJ0A +K9KdZLLbH8v2sM6e+Pt/s1CSAJ0AYAGpiScomRQunCDkgOZk+MEAAI2ZjPAp+sD5wAQE8AsFAO/I +DAZjIQAA6Ms5BoLhgAApFgaI4H2BTyzQAMGU+YAEFGIAnQDBhXjBeMGWecFzwYh4wW7BmXnBacGK +eMFkiBYs0Acp4QWZF+iZCA5nAoAA7N0IBMkBAADp2zt+4ASAAO3EAA59fgAAybjC3SywAH3BMI6+ +wLDu+AwHcyEAAAjrOWW/5yggTvzAaB2gH2UA+e0ADjAAQgCMF/2vAA4//w4AAAD8TiYdr/UaAGSu +ivAAGA2gCRUAwJAezFYt4tLH/g/dAQ2dAv3aRhXv+b4AAAAAAAD//HANoA0FAOokAAnYBIAA7EQA +CugEgABYUZfSoNEPAAAZy6zAigjINJiY2iD8QGgdoBvFAFhUo2P/zMAg0Q8A/9uoDaAJBQArEh7a *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Wed May 7 05:28:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 720A5E5D; Wed, 7 May 2014 05:28:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 450B02C9; Wed, 7 May 2014 05:28:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s475SOdJ060556; Wed, 7 May 2014 05:28:24 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s475SNsA060554; Wed, 7 May 2014 05:28:23 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201405070528.s475SNsA060554@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 7 May 2014 05:28:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265486 - stable/9/sys/dev/cxgbe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 05:28:24 -0000 Author: np Date: Wed May 7 05:28:23 2014 New Revision: 265486 URL: http://svnweb.freebsd.org/changeset/base/265486 Log: MFC r256477: cxgbe(4): Store the log2 of the # of doorbells per BAR2 page for both ingress and egress queues, and for both T4 and T5. These values are used by the T4/T5 iWARP driver. Modified: stable/9/sys/dev/cxgbe/adapter.h stable/9/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/9/sys/dev/cxgbe/adapter.h Wed May 7 05:14:48 2014 (r265485) +++ stable/9/sys/dev/cxgbe/adapter.h Wed May 7 05:28:23 2014 (r265486) @@ -509,7 +509,8 @@ struct sge { int timer_val[SGE_NTIMERS]; int counter_val[SGE_NCOUNTERS]; int fl_starve_threshold; - int s_qpp; + int eq_s_qpp; + int iq_s_qpp; int nrxq; /* total # of Ethernet rx queues */ int ntxq; /* total # of Ethernet tx tx queues */ Modified: stable/9/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_sge.c Wed May 7 05:14:48 2014 (r265485) +++ stable/9/sys/dev/cxgbe/t4_sge.c Wed May 7 05:28:23 2014 (r265486) @@ -569,12 +569,17 @@ t4_read_chip_settings(struct adapter *sc r = t4_read_reg(sc, A_SGE_CONM_CTRL); s->fl_starve_threshold = G_EGRTHRESHOLD(r) * 2 + 1; - if (is_t5(sc)) { - r = t4_read_reg(sc, A_SGE_EGRESS_QUEUES_PER_PAGE_PF); - r >>= S_QUEUESPERPAGEPF0 + - (S_QUEUESPERPAGEPF1 - S_QUEUESPERPAGEPF0) * sc->pf; - s->s_qpp = r & M_QUEUESPERPAGEPF0; - } + /* egress queues: log2 of # of doorbells per BAR2 page */ + r = t4_read_reg(sc, A_SGE_EGRESS_QUEUES_PER_PAGE_PF); + r >>= S_QUEUESPERPAGEPF0 + + (S_QUEUESPERPAGEPF1 - S_QUEUESPERPAGEPF0) * sc->pf; + s->eq_s_qpp = r & M_QUEUESPERPAGEPF0; + + /* ingress queues: log2 of # of doorbells per BAR2 page */ + r = t4_read_reg(sc, A_SGE_INGRESS_QUEUES_PER_PAGE_PF); + r >>= S_QUEUESPERPAGEPF0 + + (S_QUEUESPERPAGEPF1 - S_QUEUESPERPAGEPF0) * sc->pf; + s->iq_s_qpp = r & M_QUEUESPERPAGEPF0; t4_init_tp_params(sc); @@ -2770,7 +2775,7 @@ alloc_eq(struct adapter *sc, struct port if (isset(&eq->doorbells, DOORBELL_UDB) || isset(&eq->doorbells, DOORBELL_UDBWC) || isset(&eq->doorbells, DOORBELL_WCWR)) { - uint32_t s_qpp = sc->sge.s_qpp; + uint32_t s_qpp = sc->sge.eq_s_qpp; uint32_t mask = (1 << s_qpp) - 1; volatile uint8_t *udb; From owner-svn-src-stable@FreeBSD.ORG Wed May 7 06:10:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2281E6D9; Wed, 7 May 2014 06:10:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F13787C; Wed, 7 May 2014 06:10:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s476Atn3079039; Wed, 7 May 2014 06:10:55 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s476AtvH079038; Wed, 7 May 2014 06:10:55 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070610.s476AtvH079038@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 06:10:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265487 - stable/10/sys/dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 06:10:56 -0000 Author: trasz Date: Wed May 7 06:10:55 2014 New Revision: 265487 URL: http://svnweb.freebsd.org/changeset/base/265487 Log: MFC r263742: Fix harmless warning after reconnecting a session and not doing anything with it. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/iscsi/iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.c Wed May 7 05:28:23 2014 (r265486) +++ stable/10/sys/dev/iscsi/iscsi.c Wed May 7 06:10:55 2014 (r265487) @@ -1280,8 +1280,8 @@ iscsi_ioctl_daemon_handoff(struct iscsi_ is->is_conn->ic_data_crc32c = false; is->is_cmdsn = 0; - is->is_expcmdsn = 1; - is->is_maxcmdsn = 1; + is->is_expcmdsn = 0; + is->is_maxcmdsn = 0; is->is_waiting_for_iscsid = false; is->is_login_phase = false; is->is_timeout = 0; From owner-svn-src-stable@FreeBSD.ORG Wed May 7 06:13:00 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5A82820; Wed, 7 May 2014 06:13:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 785C289C; Wed, 7 May 2014 06:13:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s476D0Uu082437; Wed, 7 May 2014 06:13:00 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s476D0CJ082435; Wed, 7 May 2014 06:13:00 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070613.s476D0CJ082435@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 06:13:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265488 - stable/10/sys/dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 06:13:00 -0000 Author: trasz Date: Wed May 7 06:12:59 2014 New Revision: 265488 URL: http://svnweb.freebsd.org/changeset/base/265488 Log: MFC r263743: Move the ic_outstanding_count under #ifdef DIAGNOSTIC. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/iscsi/icl.c stable/10/sys/dev/iscsi/icl.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/icl.c ============================================================================== --- stable/10/sys/dev/iscsi/icl.c Wed May 7 06:10:55 2014 (r265487) +++ stable/10/sys/dev/iscsi/icl.c Wed May 7 06:12:59 2014 (r265488) @@ -135,11 +135,15 @@ icl_pdu_new(struct icl_conn *ic, int fla { struct icl_pdu *ip; +#ifdef DIAGNOSTIC refcount_acquire(&ic->ic_outstanding_pdus); +#endif ip = uma_zalloc(icl_pdu_zone, flags | M_ZERO); if (ip == NULL) { ICL_WARN("failed to allocate %zd bytes", sizeof(*ip)); +#ifdef DIAGNOSTIC refcount_release(&ic->ic_outstanding_pdus); +#endif return (NULL); } @@ -159,7 +163,9 @@ icl_pdu_free(struct icl_pdu *ip) m_freem(ip->ip_ahs_mbuf); m_freem(ip->ip_data_mbuf); uma_zfree(icl_pdu_zone, ip); +#ifdef DIAGNOSTIC refcount_release(&ic->ic_outstanding_pdus); +#endif } /* @@ -977,7 +983,9 @@ icl_conn_new(void) mtx_init(&ic->ic_lock, "icl_lock", NULL, MTX_DEF); cv_init(&ic->ic_send_cv, "icl_tx"); cv_init(&ic->ic_receive_cv, "icl_rx"); +#ifdef DIAGNOSTIC refcount_init(&ic->ic_outstanding_pdus, 0); +#endif ic->ic_max_data_segment_length = ICL_MAX_DATA_SEGMENT_LENGTH; return (ic); Modified: stable/10/sys/dev/iscsi/icl.h ============================================================================== --- stable/10/sys/dev/iscsi/icl.h Wed May 7 06:10:55 2014 (r265487) +++ stable/10/sys/dev/iscsi/icl.h Wed May 7 06:12:59 2014 (r265488) @@ -76,7 +76,9 @@ void icl_pdu_free(struct icl_pdu *ip); struct icl_conn { struct mtx ic_lock; struct socket *ic_socket; +#ifdef DIAGNOSTIC volatile u_int ic_outstanding_pdus; +#endif TAILQ_HEAD(, icl_pdu) ic_to_send; size_t ic_receive_len; int ic_receive_state; From owner-svn-src-stable@FreeBSD.ORG Wed May 7 06:14:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55DF7957; Wed, 7 May 2014 06:14:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 426DB8A5; Wed, 7 May 2014 06:14:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s476Eg36082718; Wed, 7 May 2014 06:14:42 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s476EgNu082717; Wed, 7 May 2014 06:14:42 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070614.s476EgNu082717@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 06:14:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265489 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 06:14:42 -0000 Author: trasz Date: Wed May 7 06:14:41 2014 New Revision: 265489 URL: http://svnweb.freebsd.org/changeset/base/265489 Log: MFC r263745: Target Transfer Tag is opaque; no need to htonl(3) it. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed May 7 06:12:59 2014 (r265488) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed May 7 06:14:41 2014 (r265489) @@ -2488,7 +2488,7 @@ cfiscsi_datamove_out(union ctl_io *io) return; } cdw->cdw_ctl_io = io; - cdw->cdw_target_transfer_tag = htonl(target_transfer_tag); + cdw->cdw_target_transfer_tag = target_transfer_tag; cdw->cdw_initiator_task_tag = bhssc->bhssc_initiator_task_tag; if (cs->cs_immediate_data && icl_pdu_data_segment_length(request) > 0) { @@ -2528,7 +2528,7 @@ cfiscsi_datamove_out(union ctl_io *io) bhsr2t->bhsr2t_flags = 0x80; bhsr2t->bhsr2t_lun = bhssc->bhssc_lun; bhsr2t->bhsr2t_initiator_task_tag = bhssc->bhssc_initiator_task_tag; - bhsr2t->bhsr2t_target_transfer_tag = htonl(target_transfer_tag); + bhsr2t->bhsr2t_target_transfer_tag = target_transfer_tag; /* * XXX: Here we assume that cfiscsi_datamove() won't ever * be running concurrently on several CPUs for a given From owner-svn-src-stable@FreeBSD.ORG Wed May 7 06:18:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C9505B92; Wed, 7 May 2014 06:18:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B61088C7; Wed, 7 May 2014 06:18:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s476I3x1083435; Wed, 7 May 2014 06:18:03 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s476I3VL083434; Wed, 7 May 2014 06:18:03 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070618.s476I3VL083434@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 06:18:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265490 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 06:18:04 -0000 Author: trasz Date: Wed May 7 06:18:03 2014 New Revision: 265490 URL: http://svnweb.freebsd.org/changeset/base/265490 Log: MFC r263810: Rework cfiscsi_datamove_in() to obey expected data transfer length received from the initiator. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed May 7 06:14:41 2014 (r265489) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed May 7 06:18:03 2014 (r265490) @@ -2303,8 +2303,8 @@ cfiscsi_datamove_in(union ctl_io *io) const struct iscsi_bhs_scsi_command *bhssc; struct iscsi_bhs_data_in *bhsdi; struct ctl_sg_entry ctl_sg_entry, *ctl_sglist; - size_t copy_len, len, off; - const char *addr; + size_t len, expected_len, sg_len, buffer_offset; + const char *sg_addr; int ctl_sg_count, error, i; request = io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr; @@ -2326,26 +2326,49 @@ cfiscsi_datamove_in(union ctl_io *io) } /* - * We need to record it so that we can properly report + * This is the total amount of data to be transferred within the current + * SCSI command. We need to record it so that we can properly report * underflow/underflow. */ PDU_TOTAL_TRANSFER_LEN(request) = io->scsiio.kern_total_len; /* - * This is the offset within the current SCSI command; - * i.e. for the first call of datamove(), it will be 0, - * and for subsequent ones it will be the sum of lengths - * of previous ones. + * This is the offset within the current SCSI command; for the first + * call to cfiscsi_datamove() it will be 0, and for subsequent ones + * it will be the sum of lengths of previous ones. It's being + * incremented as we append data to the data segment. */ - off = htonl(io->scsiio.kern_rel_offset); + buffer_offset = io->scsiio.kern_rel_offset; + + /* + * This is the transfer length expected by the initiator. In theory, + * it could be different from the correct amount of data from the SCSI + * point of view, even if that doesn't make any sense. + */ + expected_len = ntohl(bhssc->bhssc_expected_data_transfer_length); +#if 0 + if (expected_len != io->scsiio.kern_total_len) + CFISCSI_SESSION_DEBUG(cs, "expected transfer length = %zd, " + "actual length = %zd", expected_len, + io->scsiio.kern_total_len); +#endif + + if (buffer_offset >= expected_len) { +#if 0 + CFISCSI_SESSION_DEBUG(cs, "buffer_offset = %zd, " + "already sent the expected len", buffer_offset); +#endif + io->scsiio.ext_data_filled = io->scsiio.kern_total_len; + io->scsiio.be_move_done(io); + return; + } i = 0; - addr = NULL; - len = 0; + sg_addr = NULL; + sg_len = 0; response = NULL; bhsdi = NULL; for (;;) { - KASSERT(i < ctl_sg_count, ("i >= ctl_sg_count")); if (response == NULL) { response = cfiscsi_pdu_new_response(request, M_NOWAIT); if (response == NULL) { @@ -2362,22 +2385,43 @@ cfiscsi_datamove_in(union ctl_io *io) bhssc->bhssc_initiator_task_tag; bhsdi->bhsdi_datasn = htonl(PDU_EXPDATASN(request)); PDU_EXPDATASN(request)++; - bhsdi->bhsdi_buffer_offset = htonl(off); + bhsdi->bhsdi_buffer_offset = htonl(buffer_offset); } - if (len == 0) { - addr = ctl_sglist[i].addr; - len = ctl_sglist[i].len; - KASSERT(len > 0, ("len <= 0")); + KASSERT(i < ctl_sg_count, ("i >= ctl_sg_count")); + if (sg_len == 0) { + sg_addr = ctl_sglist[i].addr; + sg_len = ctl_sglist[i].len; + KASSERT(sg_len > 0, ("sg_len <= 0")); } - copy_len = len; - if (response->ip_data_len + copy_len > + len = sg_len; + + /* + * Truncate to maximum data segment length. + */ + KASSERT(response->ip_data_len < cs->cs_max_data_segment_length, + ("max_data_segment_length %zd >= ip_data_len %zd", + response->ip_data_len, cs->cs_max_data_segment_length)); + if (response->ip_data_len + len > cs->cs_max_data_segment_length) - copy_len = cs->cs_max_data_segment_length - + len = cs->cs_max_data_segment_length - response->ip_data_len; - KASSERT(copy_len <= len, ("copy_len > len")); - error = icl_pdu_append_data(response, addr, copy_len, M_NOWAIT); + + /* + * Truncate to expected data transfer length. + */ + KASSERT(buffer_offset + response->ip_data_len < expected_len, + ("%zd >= %zd", buffer_offset + response->ip_data_len, expected_len)); + if (buffer_offset + response->ip_data_len + len > expected_len) { + CFISCSI_SESSION_DEBUG(cs, "truncating from %zd " + "to expected data transfer length %zd", + buffer_offset + response->ip_data_len + len, expected_len); + len = expected_len - (buffer_offset + response->ip_data_len); + } + + KASSERT(len <= sg_len, ("len > sg_len")); + error = icl_pdu_append_data(response, sg_addr, len, M_NOWAIT); if (error != 0) { CFISCSI_SESSION_WARN(cs, "failed to " "allocate memory; dropping connection"); @@ -2387,12 +2431,19 @@ cfiscsi_datamove_in(union ctl_io *io) cfiscsi_session_terminate(cs); return; } - addr += copy_len; - len -= copy_len; - off += copy_len; - io->scsiio.ext_data_filled += copy_len; + sg_addr += len; + sg_len -= len; + buffer_offset += len; + io->scsiio.ext_data_filled += len; + + if (buffer_offset == expected_len) { + /* + * Already have the amount of data the initiator wanted. + */ + break; + } - if (len == 0) { + if (sg_len == 0) { /* * End of scatter-gather segment; * proceed to the next one... @@ -2415,27 +2466,18 @@ cfiscsi_datamove_in(union ctl_io *io) * call to cfiscsi_datamove(), and we want * to set the F flag only on the last of them. */ - if (off == io->scsiio.kern_total_len) + if (buffer_offset == io->scsiio.kern_total_len || + buffer_offset == expected_len) bhsdi->bhsdi_flags |= BHSDI_FLAGS_F; - KASSERT(response->ip_data_len > 0, - ("sending empty Data-In")); cfiscsi_pdu_queue(response); response = NULL; bhsdi = NULL; } } - KASSERT(i == ctl_sg_count - 1, ("missed SG segment")); - KASSERT(len == 0, ("missed data from SG segment")); if (response != NULL) { - if (off == io->scsiio.kern_total_len) { + if (buffer_offset == io->scsiio.kern_total_len || + buffer_offset == expected_len) bhsdi->bhsdi_flags |= BHSDI_FLAGS_F; -#if 0 - } else { - CFISCSI_SESSION_DEBUG(cs, "not setting the F flag; " - "have %zd, need %zd", off, - (size_t)io->scsiio.kern_total_len); -#endif - } KASSERT(response->ip_data_len > 0, ("sending empty Data-In")); cfiscsi_pdu_queue(response); } From owner-svn-src-stable@FreeBSD.ORG Wed May 7 06:20:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26EACE56; Wed, 7 May 2014 06:20:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 080DA8FA; Wed, 7 May 2014 06:20:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s476Ka41084385; Wed, 7 May 2014 06:20:36 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s476Ka1r084377; Wed, 7 May 2014 06:20:36 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070620.s476Ka1r084377@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 06:20:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265491 - in stable/10/sys: cam/ctl conf modules/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 06:20:37 -0000 Author: trasz Date: Wed May 7 06:20:35 2014 New Revision: 265491 URL: http://svnweb.freebsd.org/changeset/base/265491 Log: MFC r263811: Remove ctl_mem_pool.{c,h}. Sponsored by: The FreeBSD Foundation Deleted: stable/10/sys/cam/ctl/ctl_mem_pool.c stable/10/sys/cam/ctl/ctl_mem_pool.h Modified: stable/10/sys/cam/ctl/README.ctl.txt stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c stable/10/sys/cam/ctl/ctl_frontend_internal.c stable/10/sys/conf/files stable/10/sys/modules/ctl/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/README.ctl.txt ============================================================================== --- stable/10/sys/cam/ctl/README.ctl.txt Wed May 7 06:18:03 2014 (r265490) +++ stable/10/sys/cam/ctl/README.ctl.txt Wed May 7 06:20:35 2014 (r265491) @@ -394,14 +394,6 @@ ctl_ioctl.h: This defines all ioctls available through the CTL character device, and the data structures needed for those ioctls. -ctl_mem_pool.c -ctl_mem_pool.h: --------------- - -Generic memory pool implementation. This is currently only used by the -internal frontend. The internal frontend can probably be rewritten to use -UMA zones and this can be removed. - ctl_private.h: ------------- Modified: stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Wed May 7 06:18:03 2014 (r265490) +++ stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Wed May 7 06:20:35 2014 (r265491) @@ -65,7 +65,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #define io_ptr spriv_ptr1 Modified: stable/10/sys/cam/ctl/ctl_frontend_internal.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_internal.c Wed May 7 06:18:03 2014 (r265490) +++ stable/10/sys/cam/ctl/ctl_frontend_internal.c Wed May 7 06:20:35 2014 (r265491) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -73,7 +74,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -118,7 +118,6 @@ struct cfi_metatask { cfi_tasktype tasktype; cfi_mt_status status; union cfi_taskinfo taskinfo; - struct ctl_mem_element *element; void *cfi_context; STAILQ_ENTRY(cfi_metatask) links; }; @@ -153,7 +152,6 @@ struct cfi_lun { int blocksize_powerof2; uint32_t cur_tag_num; cfi_lun_state state; - struct ctl_mem_element *element; struct cfi_softc *softc; STAILQ_HEAD(, cfi_lun_io) io_list; STAILQ_ENTRY(cfi_lun) links; @@ -181,12 +179,13 @@ struct cfi_softc { cfi_flags flags; STAILQ_HEAD(, cfi_lun) lun_list; STAILQ_HEAD(, cfi_metatask) metatask_list; - struct ctl_mem_pool lun_pool; - struct ctl_mem_pool metatask_pool; }; MALLOC_DEFINE(M_CTL_CFI, "ctlcfi", "CTL CFI"); +static uma_zone_t cfi_lun_zone; +static uma_zone_t cfi_metatask_zone; + static struct cfi_softc fetd_internal_softc; int cfi_init(void); @@ -275,48 +274,15 @@ cfi_init(void) if (ctl_frontend_register(fe, (softc->flags & CTL_FLAG_MASTER_SHELF)) != 0) { printf("%s: internal frontend registration failed\n", __func__); - retval = 1; - goto bailout; + return (0); } - if (ctl_init_mem_pool(&softc->lun_pool, - sizeof(struct cfi_lun), - CTL_MEM_POOL_PERM_GROW, /*grow_inc*/ 3, - /* initial_pool_size */ CTL_MAX_LUNS) != 0) { - printf("%s: can't initialize LUN memory pool\n", __func__); - retval = 1; - goto bailout_error; - } - - if (ctl_init_mem_pool(&softc->metatask_pool, - sizeof(struct cfi_metatask), - CTL_MEM_POOL_PERM_GROW, /*grow_inc*/ 3, - /*initial_pool_size*/ 10) != 0) { - printf("%s: can't initialize metatask memory pool\n", __func__); - retval = 2; - goto bailout_error; - } -bailout: + cfi_lun_zone = uma_zcreate("cfi_lun", sizeof(struct cfi_lun), + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); + cfi_metatask_zone = uma_zcreate("cfi_metatask", sizeof(struct cfi_metatask), + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); return (0); - -bailout_error: - - switch (retval) { - case 3: - ctl_shrink_mem_pool(&softc->metatask_pool); - /* FALLTHROUGH */ - case 2: - ctl_shrink_mem_pool(&softc->lun_pool); - /* FALLTHROUGH */ - case 1: - ctl_frontend_deregister(fe); - break; - default: - break; - } - - return (ENOMEM); } void @@ -332,11 +298,8 @@ cfi_shutdown(void) if (ctl_frontend_deregister(&softc->fe) != 0) printf("%s: ctl_frontend_deregister() failed\n", __func__); - if (ctl_shrink_mem_pool(&softc->lun_pool) != 0) - printf("%s: error shrinking LUN pool\n", __func__); - - if (ctl_shrink_mem_pool(&softc->metatask_pool) != 0) - printf("%s: error shrinking LUN pool\n", __func__); + uma_zdestroy(cfi_lun_zone); + uma_zdestroy(cfi_metatask_zone); } static int @@ -398,7 +361,6 @@ cfi_targ_disable(void *arg, struct ctl_i static int cfi_lun_enable(void *arg, struct ctl_id target_id, int lun_id) { - struct ctl_mem_element *element; struct cfi_softc *softc; struct cfi_lun *lun; int found; @@ -423,16 +385,12 @@ cfi_lun_enable(void *arg, struct ctl_id if (found != 0) return (0); - element = ctl_alloc_mem_element(&softc->lun_pool, /*can_wait*/ 0); - - if (element == NULL) { + lun = uma_zalloc(cfi_lun_zone, M_NOWAIT | M_ZERO); + if (lun == NULL) { printf("%s: unable to allocate LUN structure\n", __func__); return (1); } - lun = (struct cfi_lun *)element->bytes; - - lun->element = element; lun->target_id = target_id; lun->lun_id = lun_id; lun->cur_tag_num = 0; @@ -485,7 +443,7 @@ cfi_lun_disable(void *arg, struct ctl_id return (1); } - ctl_free_mem_element(lun->element); + uma_zfree(cfi_lun_zone, lun); return (0); } @@ -1682,106 +1640,20 @@ cfi_action(struct cfi_metatask *metatask } } -#ifdef oldapi -void -cfi_shutdown_shelf(cfi_cb_t callback, void *callback_arg) -{ - struct ctl_mem_element *element; - struct cfi_softc *softc; - struct cfi_metatask *metatask; - - softc = &fetd_internal_softc; - - element = ctl_alloc_mem_element(&softc->metatask_pool, /*can_wait*/ 0); - if (element == NULL) { - callback(callback_arg, - /*status*/ CFI_MT_ERROR, - /*sluns_found*/ 0, - /*sluns_complete*/ 0, - /*sluns_failed*/ 0); - return; - } - - metatask = (struct cfi_metatask *)element->bytes; - - memset(metatask, 0, sizeof(*metatask)); - metatask->tasktype = CFI_TASK_SHUTDOWN; - metatask->status = CFI_MT_NONE; - metatask->taskinfo.startstop.callback = callback; - metatask->taskinfo.startstop.callback_arg = callback_arg; - metatask->element = element; - - cfi_action(softc, metatask); - - /* - * - send a report luns to lun 0, get LUN list. - * - send an inquiry to each lun - * - send a stop/offline to each direct access LUN - * - if we get a reservation conflict, reset the LUN and then - * retry sending the stop/offline - * - return status back to the caller - */ -} - -void -cfi_start_shelf(cfi_cb_t callback, void *callback_arg) -{ - struct ctl_mem_element *element; - struct cfi_softc *softc; - struct cfi_metatask *metatask; - - softc = &fetd_internal_softc; - - element = ctl_alloc_mem_element(&softc->metatask_pool, /*can_wait*/ 0); - if (element == NULL) { - callback(callback_arg, - /*status*/ CFI_MT_ERROR, - /*sluns_found*/ 0, - /*sluns_complete*/ 0, - /*sluns_failed*/ 0); - return; - } - - metatask = (struct cfi_metatask *)element->bytes; - - memset(metatask, 0, sizeof(*metatask)); - metatask->tasktype = CFI_TASK_STARTUP; - metatask->status = CFI_MT_NONE; - metatask->taskinfo.startstop.callback = callback; - metatask->taskinfo.startstop.callback_arg = callback_arg; - metatask->element = element; - - cfi_action(softc, metatask); - - /* - * - send a report luns to lun 0, get LUN list. - * - send an inquiry to each lun - * - send a stop/offline to each direct access LUN - * - if we get a reservation conflict, reset the LUN and then - * retry sending the stop/offline - * - return status back to the caller - */ -} - -#endif - struct cfi_metatask * cfi_alloc_metatask(int can_wait) { - struct ctl_mem_element *element; struct cfi_metatask *metatask; struct cfi_softc *softc; softc = &fetd_internal_softc; - element = ctl_alloc_mem_element(&softc->metatask_pool, can_wait); - if (element == NULL) + metatask = uma_zalloc(cfi_metatask_zone, + (can_wait ? M_WAITOK : M_NOWAIT) | M_ZERO); + if (metatask == NULL) return (NULL); - metatask = (struct cfi_metatask *)element->bytes; - memset(metatask, 0, sizeof(*metatask)); metatask->status = CFI_MT_NONE; - metatask->element = element; return (metatask); } @@ -1789,7 +1661,8 @@ cfi_alloc_metatask(int can_wait) void cfi_free_metatask(struct cfi_metatask *metatask) { - ctl_free_mem_element(metatask->element); + + uma_zfree(cfi_metatask_zone, metatask); } /* Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Wed May 7 06:18:03 2014 (r265490) +++ stable/10/sys/conf/files Wed May 7 06:20:35 2014 (r265491) @@ -125,7 +125,6 @@ cam/ctl/ctl_frontend.c optional ctl cam/ctl/ctl_frontend_cam_sim.c optional ctl cam/ctl/ctl_frontend_internal.c optional ctl cam/ctl/ctl_frontend_iscsi.c optional ctl -cam/ctl/ctl_mem_pool.c optional ctl cam/ctl/ctl_scsi_all.c optional ctl cam/ctl/ctl_error.c optional ctl cam/ctl/ctl_util.c optional ctl Modified: stable/10/sys/modules/ctl/Makefile ============================================================================== --- stable/10/sys/modules/ctl/Makefile Wed May 7 06:18:03 2014 (r265490) +++ stable/10/sys/modules/ctl/Makefile Wed May 7 06:20:35 2014 (r265491) @@ -13,7 +13,6 @@ SRCS+= ctl_frontend.c SRCS+= ctl_frontend_cam_sim.c SRCS+= ctl_frontend_internal.c SRCS+= ctl_frontend_iscsi.c -SRCS+= ctl_mem_pool.c SRCS+= ctl_scsi_all.c SRCS+= ctl_error.c SRCS+= ctl_util.c From owner-svn-src-stable@FreeBSD.ORG Wed May 7 06:22:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0F2F9D; Wed, 7 May 2014 06:22:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D7A198E; Wed, 7 May 2014 06:22:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s476MpTb087211; Wed, 7 May 2014 06:22:51 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s476MpJk087210; Wed, 7 May 2014 06:22:51 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070622.s476MpJk087210@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 06:22:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265492 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 06:22:51 -0000 Author: trasz Date: Wed May 7 06:22:51 2014 New Revision: 265492 URL: http://svnweb.freebsd.org/changeset/base/265492 Log: MFC r263978: Make it possible to have multiple CTL worker threads. Leave the default of 1 for now. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Wed May 7 06:20:35 2014 (r265491) +++ stable/10/sys/cam/ctl/ctl.c Wed May 7 06:22:51 2014 (r265492) @@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -320,6 +321,10 @@ static int ctl_is_single = 1; static int index_to_aps_page; SYSCTL_NODE(_kern_cam, OID_AUTO, ctl, CTLFLAG_RD, 0, "CAM Target Layer"); +static int worker_threads = 1; +TUNABLE_INT("kern.cam.ctl.worker_threads", &worker_threads); +SYSCTL_INT(_kern_cam_ctl, OID_AUTO, worker_threads, CTLFLAG_RDTUN, + &worker_threads, 1, "Number of worker threads"); /* * Serial number (0x80), device id (0x83), and supported pages (0x00) @@ -950,10 +955,7 @@ ctl_init(void) struct ctl_frontend *fe; struct ctl_lun *lun; uint8_t sc_id =0; -#if 0 - int i; -#endif - int error, retval; + int i, error, retval; //int isc_retval; retval = 0; @@ -1085,17 +1087,35 @@ ctl_init(void) mtx_unlock(&softc->ctl_lock); #endif - error = kproc_create(ctl_work_thread, softc, &softc->work_thread, 0, 0, - "ctl_thrd"); - if (error != 0) { - printf("error creating CTL work thread!\n"); - mtx_lock(&softc->ctl_lock); - ctl_free_lun(lun); - mtx_unlock(&softc->ctl_lock); - ctl_pool_free(internal_pool); - ctl_pool_free(emergency_pool); - ctl_pool_free(other_pool); - return (error); + if (worker_threads > MAXCPU || worker_threads == 0) { + printf("invalid kern.cam.ctl.worker_threads value; " + "setting to 1"); + worker_threads = 1; + } else if (worker_threads < 0) { + if (mp_ncpus > 2) { + /* + * Using more than two worker threads actually hurts + * performance due to lock contention. + */ + worker_threads = 2; + } else { + worker_threads = 1; + } + } + + for (i = 0; i < worker_threads; i++) { + error = kproc_create(ctl_work_thread, softc, &softc->work_thread, 0, 0, + "ctl_thrd%d", i); + if (error != 0) { + printf("error creating CTL work thread!\n"); + mtx_lock(&softc->ctl_lock); + ctl_free_lun(lun); + mtx_unlock(&softc->ctl_lock); + ctl_pool_free(internal_pool); + ctl_pool_free(emergency_pool); + ctl_pool_free(other_pool); + return (error); + } } if (bootverbose) printf("ctl: CAM Target Layer loaded\n"); @@ -12993,7 +13013,11 @@ ctl_work_thread(void *arg) if (io != NULL) { STAILQ_REMOVE_HEAD(&softc->rtr_queue, links); mtx_unlock(&softc->ctl_lock); - goto execute; + retval = ctl_scsiio(&io->scsiio); + if (retval != CTL_RETVAL_COMPLETE) + CTL_DEBUG_PRINT(("ctl_scsiio failed\n")); + mtx_lock(&softc->ctl_lock); + continue; } } io = (union ctl_io *)STAILQ_FIRST(&softc->incoming_queue); @@ -13024,19 +13048,6 @@ ctl_work_thread(void *arg) /* Back to the top of the loop to see what woke us up. */ continue; - -execute: - retval = ctl_scsiio(&io->scsiio); - switch (retval) { - case CTL_RETVAL_COMPLETE: - break; - default: - /* - * Probably need to make sure this doesn't happen. - */ - break; - } - mtx_lock(&softc->ctl_lock); } } From owner-svn-src-stable@FreeBSD.ORG Wed May 7 06:24:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 298F1243; Wed, 7 May 2014 06:24:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF7AF9A6; Wed, 7 May 2014 06:24:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s476OknH087514; Wed, 7 May 2014 06:24:46 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s476OkC3087513; Wed, 7 May 2014 06:24:46 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070624.s476OkC3087513@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 06:24:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265493 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 06:24:47 -0000 Author: trasz Date: Wed May 7 06:24:46 2014 New Revision: 265493 URL: http://svnweb.freebsd.org/changeset/base/265493 Log: MFC r263979: Hide CTL messages about SCSI error responses. Too many users take them for actual target errors. They can be enabled back by setting kern.cam.ctl.verbose=1, or booting with bootverbose. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Wed May 7 06:22:51 2014 (r265492) +++ stable/10/sys/cam/ctl/ctl.c Wed May 7 06:24:46 2014 (r265493) @@ -325,6 +325,10 @@ static int worker_threads = 1; TUNABLE_INT("kern.cam.ctl.worker_threads", &worker_threads); SYSCTL_INT(_kern_cam_ctl, OID_AUTO, worker_threads, CTLFLAG_RDTUN, &worker_threads, 1, "Number of worker threads"); +static int verbose = 0; +TUNABLE_INT("kern.cam.ctl.verbose", &verbose); +SYSCTL_INT(_kern_cam_ctl, OID_AUTO, verbose, CTLFLAG_RWTUN, + &verbose, 0, "Show SCSI errors returned to initiator"); /* * Serial number (0x80), device id (0x83), and supported pages (0x00) @@ -12351,7 +12355,8 @@ ctl_process_done(union ctl_io *io, int h case CTL_IO_SCSI: break; case CTL_IO_TASK: - ctl_io_error_print(io, NULL); + if (bootverbose || verbose > 0) + ctl_io_error_print(io, NULL); if (io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) ctl_free_io(io); else @@ -12607,7 +12612,8 @@ ctl_process_done(union ctl_io *io, int h "skipped", skipped_prints); #endif } - ctl_io_error_print(io, NULL); + if (bootverbose || verbose > 0) + ctl_io_error_print(io, NULL); } } else { if (have_lock == 0) @@ -12618,7 +12624,8 @@ ctl_process_done(union ctl_io *io, int h case CTL_IO_TASK: if (have_lock == 0) mtx_unlock(&ctl_softc->ctl_lock); - ctl_io_error_print(io, NULL); + if (bootverbose || verbose > 0) + ctl_io_error_print(io, NULL); break; default: if (have_lock == 0) From owner-svn-src-stable@FreeBSD.ORG Wed May 7 06:26:34 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C9991421; Wed, 7 May 2014 06:26:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A927C9CC; Wed, 7 May 2014 06:26:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s476QYQh087821; Wed, 7 May 2014 06:26:34 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s476QYoX087820; Wed, 7 May 2014 06:26:34 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070626.s476QYoX087820@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 06:26:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265494 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 06:26:35 -0000 Author: trasz Date: Wed May 7 06:26:34 2014 New Revision: 265494 URL: http://svnweb.freebsd.org/changeset/base/265494 Log: MFC r264020: Remove the homegrown ctl_be_block_io allocator, replacing it with UMA. There is no performance difference. Reviewed by: mav@ Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/cam/ctl/ctl_backend_block.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Wed May 7 06:24:46 2014 (r265493) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Wed May 7 06:26:34 2014 (r265494) @@ -177,9 +177,7 @@ struct ctl_be_block_lun { * Overall softc structure for the block backend module. */ struct ctl_be_block_softc { - STAILQ_HEAD(, ctl_be_block_io) beio_free_queue; struct mtx lock; - int prealloc_beio; int num_disks; STAILQ_HEAD(, ctl_block_disk) disk_list; int num_luns; @@ -209,7 +207,6 @@ struct ctl_be_block_io { uint64_t io_offset; struct ctl_be_block_softc *softc; struct ctl_be_block_lun *lun; - STAILQ_ENTRY(ctl_be_block_io) links; }; static int cbb_num_threads = 14; @@ -221,10 +218,6 @@ SYSCTL_INT(_kern_cam_ctl_block, OID_AUTO static struct ctl_be_block_io *ctl_alloc_beio(struct ctl_be_block_softc *softc); static void ctl_free_beio(struct ctl_be_block_io *beio); -static int ctl_grow_beio(struct ctl_be_block_softc *softc, int count); -#if 0 -static void ctl_shrink_beio(struct ctl_be_block_softc *softc); -#endif static void ctl_complete_beio(struct ctl_be_block_io *beio); static int ctl_be_block_move_done(union ctl_io *io); static void ctl_be_block_biodone(struct bio *bio); @@ -286,68 +279,24 @@ static struct ctl_backend_driver ctl_be_ MALLOC_DEFINE(M_CTLBLK, "ctlblk", "Memory used for CTL block backend"); CTL_BACKEND_DECLARE(cbb, ctl_be_block_driver); +static uma_zone_t beio_zone; + static struct ctl_be_block_io * ctl_alloc_beio(struct ctl_be_block_softc *softc) { struct ctl_be_block_io *beio; - int count; - - mtx_lock(&softc->lock); - - beio = STAILQ_FIRST(&softc->beio_free_queue); - if (beio != NULL) { - STAILQ_REMOVE(&softc->beio_free_queue, beio, - ctl_be_block_io, links); - } - mtx_unlock(&softc->lock); - - if (beio != NULL) { - bzero(beio, sizeof(*beio)); - beio->softc = softc; - return (beio); - } - - for (;;) { - - count = ctl_grow_beio(softc, /*count*/ 10); - - /* - * This shouldn't be possible, since ctl_grow_beio() uses a - * blocking malloc. - */ - if (count == 0) - return (NULL); - - /* - * Since we have to drop the lock when we're allocating beio - * structures, it's possible someone else can come along and - * allocate the beio's we've just allocated. - */ - mtx_lock(&softc->lock); - beio = STAILQ_FIRST(&softc->beio_free_queue); - if (beio != NULL) { - STAILQ_REMOVE(&softc->beio_free_queue, beio, - ctl_be_block_io, links); - } - mtx_unlock(&softc->lock); - if (beio != NULL) { - bzero(beio, sizeof(*beio)); - beio->softc = softc; - break; - } - } + beio = uma_zalloc(beio_zone, M_WAITOK | M_ZERO); + beio->softc = softc; return (beio); } static void ctl_free_beio(struct ctl_be_block_io *beio) { - struct ctl_be_block_softc *softc; int duplicate_free; int i; - softc = beio->softc; duplicate_free = 0; for (i = 0; i < beio->num_segs; i++) { @@ -362,47 +311,10 @@ ctl_free_beio(struct ctl_be_block_io *be printf("%s: %d duplicate frees out of %d segments\n", __func__, duplicate_free, beio->num_segs); } - mtx_lock(&softc->lock); - STAILQ_INSERT_TAIL(&softc->beio_free_queue, beio, links); - mtx_unlock(&softc->lock); -} -static int -ctl_grow_beio(struct ctl_be_block_softc *softc, int count) -{ - int i; - - for (i = 0; i < count; i++) { - struct ctl_be_block_io *beio; - - beio = (struct ctl_be_block_io *)malloc(sizeof(*beio), - M_CTLBLK, - M_WAITOK | M_ZERO); - beio->softc = softc; - mtx_lock(&softc->lock); - STAILQ_INSERT_TAIL(&softc->beio_free_queue, beio, links); - mtx_unlock(&softc->lock); - } - - return (i); + uma_zfree(beio_zone, beio); } -#if 0 -static void -ctl_shrink_beio(struct ctl_be_block_softc *softc) -{ - struct ctl_be_block_io *beio, *beio_tmp; - - mtx_lock(&softc->lock); - STAILQ_FOREACH_SAFE(beio, &softc->beio_free_queue, links, beio_tmp) { - STAILQ_REMOVE(&softc->beio_free_queue, beio, - ctl_be_block_io, links); - free(beio, M_CTLBLK); - } - mtx_unlock(&softc->lock); -} -#endif - static void ctl_complete_beio(struct ctl_be_block_io *beio) { @@ -937,16 +849,7 @@ ctl_be_block_cw_dispatch(struct ctl_be_b softc = be_lun->softc; beio = ctl_alloc_beio(softc); - if (beio == NULL) { - /* - * This should not happen. ctl_alloc_beio() will call - * ctl_grow_beio() with a blocking malloc as needed. - * A malloc with M_WAITOK should not fail. - */ - ctl_set_busy(&io->scsiio); - ctl_done(io); - return; - } + KASSERT(beio != NULL, ("ctl_alloc_beio() failed")); beio->io = io; beio->softc = softc; @@ -1017,16 +920,7 @@ ctl_be_block_dispatch(struct ctl_be_bloc } beio = ctl_alloc_beio(softc); - if (beio == NULL) { - /* - * This should not happen. ctl_alloc_beio() will call - * ctl_grow_beio() with a blocking malloc as needed. - * A malloc with M_WAITOK should not fail. - */ - ctl_set_busy(&io->scsiio); - ctl_done(io); - return; - } + KASSERT(beio != NULL, ("ctl_alloc_beio() failed")); beio->io = io; beio->softc = softc; @@ -2369,10 +2263,10 @@ ctl_be_block_init(void) retval = 0; mtx_init(&softc->lock, "ctlblk", NULL, MTX_DEF); - STAILQ_INIT(&softc->beio_free_queue); + beio_zone = uma_zcreate("beio", sizeof(struct ctl_be_block_io), + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); STAILQ_INIT(&softc->disk_list); STAILQ_INIT(&softc->lun_list); - ctl_grow_beio(softc, 200); return (retval); } From owner-svn-src-stable@FreeBSD.ORG Wed May 7 06:29:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9B38630; Wed, 7 May 2014 06:29:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8C359E7; Wed, 7 May 2014 06:29:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s476T2c9088191; Wed, 7 May 2014 06:29:02 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s476T2OB088186; Wed, 7 May 2014 06:29:02 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070629.s476T2OB088186@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 06:29:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265495 - in stable/10/sys: cam/ctl dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 06:29:03 -0000 Author: trasz Date: Wed May 7 06:29:01 2014 New Revision: 265495 URL: http://svnweb.freebsd.org/changeset/base/265495 Log: MFC r264022: Get rid of ICL lock; use upper-layer (initiator or target) lock instead. This avoids extra locking in icl_pdu_queue(); the upper layer needs to call it while holding its own lock anyway, to avoid sending PDUs out of order. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/sys/dev/iscsi/icl.c stable/10/sys/dev/iscsi/icl.h stable/10/sys/dev/iscsi/iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed May 7 06:26:34 2014 (r265494) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed May 7 06:29:01 2014 (r265495) @@ -1206,7 +1206,7 @@ cfiscsi_session_new(struct cfiscsi_softc cv_init(&cs->cs_login_cv, "cfiscsi_login"); #endif - cs->cs_conn = icl_conn_new(); + cs->cs_conn = icl_conn_new(&cs->cs_lock); cs->cs_conn->ic_receive = cfiscsi_receive_callback; cs->cs_conn->ic_error = cfiscsi_error_callback; cs->cs_conn->ic_prv0 = cs; Modified: stable/10/sys/dev/iscsi/icl.c ============================================================================== --- stable/10/sys/dev/iscsi/icl.c Wed May 7 06:26:34 2014 (r265494) +++ stable/10/sys/dev/iscsi/icl.c Wed May 7 06:29:01 2014 (r265495) @@ -85,9 +85,10 @@ static volatile u_int icl_ncons; __func__, ## __VA_ARGS__); \ } while (0) -#define ICL_CONN_LOCK(X) mtx_lock(&X->ic_lock) -#define ICL_CONN_UNLOCK(X) mtx_unlock(&X->ic_lock) -#define ICL_CONN_LOCK_ASSERT(X) mtx_assert(&X->ic_lock, MA_OWNED) +#define ICL_CONN_LOCK(X) mtx_lock(X->ic_lock) +#define ICL_CONN_UNLOCK(X) mtx_unlock(X->ic_lock) +#define ICL_CONN_LOCK_ASSERT(X) mtx_assert(X->ic_lock, MA_OWNED) +#define ICL_CONN_LOCK_ASSERT_NOT(X) mtx_assert(X->ic_lock, MA_NOTOWNED) static void icl_conn_fail(struct icl_conn *ic) @@ -893,7 +894,7 @@ icl_send_thread(void *arg) break; } icl_conn_send_pdus(ic); - cv_wait(&ic->ic_send_cv, &ic->ic_lock); + cv_wait(&ic->ic_send_cv, ic->ic_lock); } ic->ic_send_running = false; @@ -958,20 +959,19 @@ icl_pdu_queue(struct icl_pdu *ip) ic = ip->ip_conn; - ICL_CONN_LOCK(ic); + ICL_CONN_LOCK_ASSERT(ic); + if (ic->ic_disconnecting || ic->ic_socket == NULL) { ICL_DEBUG("icl_pdu_queue on closed connection"); - ICL_CONN_UNLOCK(ic); icl_pdu_free(ip); return; } TAILQ_INSERT_TAIL(&ic->ic_to_send, ip, ip_next); - ICL_CONN_UNLOCK(ic); cv_signal(&ic->ic_send_cv); } struct icl_conn * -icl_conn_new(void) +icl_conn_new(struct mtx *lock) { struct icl_conn *ic; @@ -980,7 +980,7 @@ icl_conn_new(void) ic = uma_zalloc(icl_conn_zone, M_WAITOK | M_ZERO); TAILQ_INIT(&ic->ic_to_send); - mtx_init(&ic->ic_lock, "icl_lock", NULL, MTX_DEF); + ic->ic_lock = lock; cv_init(&ic->ic_send_cv, "icl_tx"); cv_init(&ic->ic_receive_cv, "icl_rx"); #ifdef DIAGNOSTIC @@ -995,7 +995,6 @@ void icl_conn_free(struct icl_conn *ic) { - mtx_destroy(&ic->ic_lock); cv_destroy(&ic->ic_send_cv); cv_destroy(&ic->ic_receive_cv); uma_zfree(icl_conn_zone, ic); @@ -1099,6 +1098,8 @@ icl_conn_handoff(struct icl_conn *ic, in cap_rights_t rights; int error; + ICL_CONN_LOCK_ASSERT_NOT(ic); + /* * Steal the socket from userland. */ @@ -1138,6 +1139,7 @@ icl_conn_handoff(struct icl_conn *ic, in void icl_conn_shutdown(struct icl_conn *ic) { + ICL_CONN_LOCK_ASSERT_NOT(ic); ICL_CONN_LOCK(ic); if (ic->ic_socket == NULL) { @@ -1154,6 +1156,8 @@ icl_conn_close(struct icl_conn *ic) { struct icl_pdu *pdu; + ICL_CONN_LOCK_ASSERT_NOT(ic); + ICL_CONN_LOCK(ic); if (ic->ic_socket == NULL) { ICL_CONN_UNLOCK(ic); @@ -1211,6 +1215,7 @@ icl_conn_close(struct icl_conn *ic) bool icl_conn_connected(struct icl_conn *ic) { + ICL_CONN_LOCK_ASSERT_NOT(ic); ICL_CONN_LOCK(ic); if (ic->ic_socket == NULL) { @@ -1231,6 +1236,8 @@ icl_conn_handoff_sock(struct icl_conn *i { int error; + ICL_CONN_LOCK_ASSERT_NOT(ic); + if (so->so_type != SOCK_STREAM) return (EINVAL); Modified: stable/10/sys/dev/iscsi/icl.h ============================================================================== --- stable/10/sys/dev/iscsi/icl.h Wed May 7 06:26:34 2014 (r265494) +++ stable/10/sys/dev/iscsi/icl.h Wed May 7 06:29:01 2014 (r265495) @@ -74,7 +74,7 @@ void icl_pdu_free(struct icl_pdu *ip); #define ICL_MAX_DATA_SEGMENT_LENGTH (128 * 1024) struct icl_conn { - struct mtx ic_lock; + struct mtx *ic_lock; struct socket *ic_socket; #ifdef DIAGNOSTIC volatile u_int ic_outstanding_pdus; @@ -102,7 +102,7 @@ struct icl_conn { void *ic_prv0; }; -struct icl_conn *icl_conn_new(void); +struct icl_conn *icl_conn_new(struct mtx *lock); void icl_conn_free(struct icl_conn *ic); int icl_conn_handoff(struct icl_conn *ic, int fd); void icl_conn_shutdown(struct icl_conn *ic); Modified: stable/10/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.c Wed May 7 06:26:34 2014 (r265494) +++ stable/10/sys/dev/iscsi/iscsi.c Wed May 7 06:29:01 2014 (r265495) @@ -1633,7 +1633,7 @@ iscsi_ioctl_session_add(struct iscsi_sof return (EBUSY); } - is->is_conn = icl_conn_new(); + is->is_conn = icl_conn_new(&is->is_lock); is->is_conn->ic_receive = iscsi_receive_callback; is->is_conn->ic_error = iscsi_error_callback; is->is_conn->ic_prv0 = is; From owner-svn-src-stable@FreeBSD.ORG Wed May 7 06:31:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6EF999E4; Wed, 7 May 2014 06:31:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BAB3A83; Wed, 7 May 2014 06:31:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s476Vkn4091661; Wed, 7 May 2014 06:31:46 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s476Vj9q091657; Wed, 7 May 2014 06:31:45 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070631.s476Vj9q091657@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 06:31:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265496 - in stable/10/sys: cam/ctl dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 06:31:46 -0000 Author: trasz Date: Wed May 7 06:31:45 2014 New Revision: 265496 URL: http://svnweb.freebsd.org/changeset/base/265496 Log: MFC r264023: Instead of "icltx" and "iclrx", use thread names with prefix from upper layer, so that one can see which side of the stack the threads are for. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/sys/dev/iscsi/icl.c stable/10/sys/dev/iscsi/icl.h stable/10/sys/dev/iscsi/iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed May 7 06:29:01 2014 (r265495) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed May 7 06:31:45 2014 (r265496) @@ -1206,7 +1206,7 @@ cfiscsi_session_new(struct cfiscsi_softc cv_init(&cs->cs_login_cv, "cfiscsi_login"); #endif - cs->cs_conn = icl_conn_new(&cs->cs_lock); + cs->cs_conn = icl_conn_new("cfiscsi", &cs->cs_lock); cs->cs_conn->ic_receive = cfiscsi_receive_callback; cs->cs_conn->ic_error = cfiscsi_error_callback; cs->cs_conn->ic_prv0 = cs; Modified: stable/10/sys/dev/iscsi/icl.c ============================================================================== --- stable/10/sys/dev/iscsi/icl.c Wed May 7 06:29:01 2014 (r265495) +++ stable/10/sys/dev/iscsi/icl.c Wed May 7 06:31:45 2014 (r265496) @@ -971,7 +971,7 @@ icl_pdu_queue(struct icl_pdu *ip) } struct icl_conn * -icl_conn_new(struct mtx *lock) +icl_conn_new(const char *name, struct mtx *lock) { struct icl_conn *ic; @@ -987,6 +987,7 @@ icl_conn_new(struct mtx *lock) refcount_init(&ic->ic_outstanding_pdus, 0); #endif ic->ic_max_data_segment_length = ICL_MAX_DATA_SEGMENT_LENGTH; + ic->ic_name = name; return (ic); } @@ -1062,14 +1063,16 @@ icl_conn_start(struct icl_conn *ic) /* * Start threads. */ - error = kthread_add(icl_send_thread, ic, NULL, NULL, 0, 0, "icltx"); + error = kthread_add(icl_send_thread, ic, NULL, NULL, 0, 0, "%stx", + ic->ic_name); if (error != 0) { ICL_WARN("kthread_add(9) failed with error %d", error); icl_conn_close(ic); return (error); } - error = kthread_add(icl_receive_thread, ic, NULL, NULL, 0, 0, "iclrx"); + error = kthread_add(icl_receive_thread, ic, NULL, NULL, 0, 0, "%srx", + ic->ic_name); if (error != 0) { ICL_WARN("kthread_add(9) failed with error %d", error); icl_conn_close(ic); Modified: stable/10/sys/dev/iscsi/icl.h ============================================================================== --- stable/10/sys/dev/iscsi/icl.h Wed May 7 06:29:01 2014 (r265495) +++ stable/10/sys/dev/iscsi/icl.h Wed May 7 06:31:45 2014 (r265496) @@ -92,6 +92,7 @@ struct icl_conn { size_t ic_max_data_segment_length; bool ic_disconnecting; bool ic_iser; + const char *ic_name; void (*ic_receive)(struct icl_pdu *); void (*ic_error)(struct icl_conn *); @@ -102,7 +103,7 @@ struct icl_conn { void *ic_prv0; }; -struct icl_conn *icl_conn_new(struct mtx *lock); +struct icl_conn *icl_conn_new(const char *name, struct mtx *lock); void icl_conn_free(struct icl_conn *ic); int icl_conn_handoff(struct icl_conn *ic, int fd); void icl_conn_shutdown(struct icl_conn *ic); Modified: stable/10/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.c Wed May 7 06:29:01 2014 (r265495) +++ stable/10/sys/dev/iscsi/iscsi.c Wed May 7 06:31:45 2014 (r265496) @@ -1633,7 +1633,7 @@ iscsi_ioctl_session_add(struct iscsi_sof return (EBUSY); } - is->is_conn = icl_conn_new(&is->is_lock); + is->is_conn = icl_conn_new("iscsi", &is->is_lock); is->is_conn->ic_receive = iscsi_receive_callback; is->is_conn->ic_error = iscsi_error_callback; is->is_conn->ic_prv0 = is; From owner-svn-src-stable@FreeBSD.ORG Wed May 7 06:34:04 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 007D8C19; Wed, 7 May 2014 06:34:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1A6CAA5; Wed, 7 May 2014 06:34:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s476Y3uT092066; Wed, 7 May 2014 06:34:03 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s476Y3Fc092065; Wed, 7 May 2014 06:34:03 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070634.s476Y3Fc092065@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 06:34:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265497 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 06:34:04 -0000 Author: trasz Date: Wed May 7 06:34:03 2014 New Revision: 265497 URL: http://svnweb.freebsd.org/changeset/base/265497 Log: MFC r264024: Use atomic ops instead of mutexes where appropriate. Submitted by: mav@ Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed May 7 06:31:45 2014 (r265496) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed May 7 06:34:03 2014 (r265497) @@ -958,9 +958,7 @@ cfiscsi_callout(void *context) callout_schedule(&cs->cs_callout, 1 * hz); - CFISCSI_SESSION_LOCK(cs); - cs->cs_timeout++; - CFISCSI_SESSION_UNLOCK(cs); + atomic_add_int(&cs->cs_timeout, 1); #ifdef ICL_KERNEL_PROXY if (cs->cs_waiting_for_ctld || cs->cs_login_phase) { @@ -2510,10 +2508,8 @@ cfiscsi_datamove_out(union ctl_io *io) */ PDU_TOTAL_TRANSFER_LEN(request) = io->scsiio.kern_total_len; - CFISCSI_SESSION_LOCK(cs); - target_transfer_tag = cs->cs_target_transfer_tag; - cs->cs_target_transfer_tag++; - CFISCSI_SESSION_UNLOCK(cs); + target_transfer_tag = + atomic_fetchadd_32(&cs->cs_target_transfer_tag, 1); #if 0 CFISCSI_SESSION_DEBUG(cs, "expecting Data-Out with initiator " From owner-svn-src-stable@FreeBSD.ORG Wed May 7 06:38:20 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A3D7F1B; Wed, 7 May 2014 06:38:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B913AEF; Wed, 7 May 2014 06:38:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s476cKdA092700; Wed, 7 May 2014 06:38:20 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s476cK2J092699; Wed, 7 May 2014 06:38:20 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070638.s476cK2J092699@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 06:38:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265498 - stable/10/sys/dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 06:38:20 -0000 Author: trasz Date: Wed May 7 06:38:19 2014 New Revision: 265498 URL: http://svnweb.freebsd.org/changeset/base/265498 Log: MFC r264025: Get rid of the "autoscaling", instead just set socket buffer sizes in the usual way. The only thing the old code did was making things less predictable. MFC r264058: Fix build, broken by r264025. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/iscsi/icl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/icl.c ============================================================================== --- stable/10/sys/dev/iscsi/icl.c Wed May 7 06:34:03 2014 (r265497) +++ stable/10/sys/dev/iscsi/icl.c Wed May 7 06:38:19 2014 (r265498) @@ -68,6 +68,14 @@ TUNABLE_INT("kern.icl.partial_receive_le SYSCTL_INT(_kern_icl, OID_AUTO, partial_receive_len, CTLFLAG_RW, &partial_receive_len, 1 * 1024, "Minimum read size for partially received " "data segment"); +static int sendspace = 1048576; +TUNABLE_INT("kern.icl.sendspace", &sendspace); +SYSCTL_INT(_kern_icl, OID_AUTO, sendspace, CTLFLAG_RW, + &sendspace, 1048576, "Default send socket buffer size"); +static int recvspace = 1048576; +TUNABLE_INT("kern.icl.recvspace", &recvspace); +SYSCTL_INT(_kern_icl, OID_AUTO, recvspace, CTLFLAG_RW, + &recvspace, 1048576, "Default receive socket buffer size"); static uma_zone_t icl_conn_zone; static uma_zone_t icl_pdu_zone; @@ -1005,7 +1013,7 @@ icl_conn_free(struct icl_conn *ic) static int icl_conn_start(struct icl_conn *ic) { - size_t bufsize; + size_t minspace; struct sockopt opt; int error, one = 1; @@ -1026,18 +1034,28 @@ icl_conn_start(struct icl_conn *ic) ICL_CONN_UNLOCK(ic); /* - * Use max available sockbuf size for sending. Do it manually - * instead of sbreserve(9) to work around resource limits. + * For sendspace, this is required because the current code cannot + * send a PDU in pieces; thus, the minimum buffer size is equal + * to the maximum PDU size. "+4" is to account for possible padding. * - * XXX: This kind of sucks. On one hand, we don't currently support - * sending a part of data segment; we always do it in one piece, - * so we have to make sure it can fit in the socket buffer. - * Once I've implemented partial send, we'll get rid of this - * and use autoscaling. + * What we should actually do here is to use autoscaling, but set + * some minimal buffer size to "minspace". I don't know a way to do + * that, though. */ - bufsize = (sizeof(struct iscsi_bhs) + - ic->ic_max_data_segment_length) * 8; - error = soreserve(ic->ic_socket, bufsize, bufsize); + minspace = sizeof(struct iscsi_bhs) + ic->ic_max_data_segment_length + + ISCSI_HEADER_DIGEST_SIZE + ISCSI_DATA_DIGEST_SIZE + 4; + if (sendspace < minspace) { + ICL_WARN("kern.icl.sendspace too low; must be at least %zd", + minspace); + sendspace = minspace; + } + if (recvspace < minspace) { + ICL_WARN("kern.icl.recvspace too low; must be at least %zd", + minspace); + recvspace = minspace; + } + + error = soreserve(ic->ic_socket, sendspace, recvspace); if (error != 0) { ICL_WARN("soreserve failed with error %d", error); icl_conn_close(ic); From owner-svn-src-stable@FreeBSD.ORG Wed May 7 06:41:34 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6CAD3330; Wed, 7 May 2014 06:41:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A483BA2; Wed, 7 May 2014 06:41:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s476fY8p093944; Wed, 7 May 2014 06:41:34 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s476fYNC093943; Wed, 7 May 2014 06:41:34 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070641.s476fYNC093943@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 06:41:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265499 - stable/10/sys/dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 06:41:34 -0000 Author: trasz Date: Wed May 7 06:41:33 2014 New Revision: 265499 URL: http://svnweb.freebsd.org/changeset/base/265499 Log: MFC r264026: Enable a KASSERT. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/iscsi/icl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/icl.c ============================================================================== --- stable/10/sys/dev/iscsi/icl.c Wed May 7 06:38:19 2014 (r265498) +++ stable/10/sys/dev/iscsi/icl.c Wed May 7 06:41:33 2014 (r265499) @@ -1222,10 +1222,7 @@ icl_conn_close(struct icl_conn *ic) KASSERT(TAILQ_EMPTY(&ic->ic_to_send), ("destroying session with non-empty send queue")); - /* - * XXX - */ -#if 0 +#ifdef DIAGNOSTIC KASSERT(ic->ic_outstanding_pdus == 0, ("destroying session with %d outstanding PDUs", ic->ic_outstanding_pdus)); From owner-svn-src-stable@FreeBSD.ORG Wed May 7 06:44:20 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 541B0655; Wed, 7 May 2014 06:44:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40B9ABDB; Wed, 7 May 2014 06:44:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s476iKKd096542; Wed, 7 May 2014 06:44:20 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s476iJqs096537; Wed, 7 May 2014 06:44:19 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070644.s476iJqs096537@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 06:44:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265500 - stable/10/sys/dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 06:44:20 -0000 Author: trasz Date: Wed May 7 06:44:19 2014 New Revision: 265500 URL: http://svnweb.freebsd.org/changeset/base/265500 Log: MFC r264109: We don't need TAILQ for iSCSI PDUs; STAILQ is enough. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/iscsi/icl.c stable/10/sys/dev/iscsi/icl.h stable/10/sys/dev/iscsi/iscsi.c stable/10/sys/dev/iscsi/iscsi.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/icl.c ============================================================================== --- stable/10/sys/dev/iscsi/icl.c Wed May 7 06:41:33 2014 (r265499) +++ stable/10/sys/dev/iscsi/icl.c Wed May 7 06:44:19 2014 (r265500) @@ -851,11 +851,11 @@ icl_conn_send_pdus(struct icl_conn *ic) available = sbspace(&so->so_snd); SOCKBUF_UNLOCK(&so->so_snd); - while (!TAILQ_EMPTY(&ic->ic_to_send)) { + while (!STAILQ_EMPTY(&ic->ic_to_send)) { if (ic->ic_disconnecting) return; - request = TAILQ_FIRST(&ic->ic_to_send); + request = STAILQ_FIRST(&ic->ic_to_send); size = icl_pdu_size(request); if (available < size) { /* @@ -874,7 +874,7 @@ icl_conn_send_pdus(struct icl_conn *ic) return; } available -= size; - TAILQ_REMOVE(&ic->ic_to_send, request, ip_next); + STAILQ_REMOVE_HEAD(&ic->ic_to_send, ip_next); error = icl_pdu_send(request); if (error != 0) { ICL_DEBUG("failed to send PDU; " @@ -974,7 +974,7 @@ icl_pdu_queue(struct icl_pdu *ip) icl_pdu_free(ip); return; } - TAILQ_INSERT_TAIL(&ic->ic_to_send, ip, ip_next); + STAILQ_INSERT_TAIL(&ic->ic_to_send, ip, ip_next); cv_signal(&ic->ic_send_cv); } @@ -987,7 +987,7 @@ icl_conn_new(const char *name, struct mt ic = uma_zalloc(icl_conn_zone, M_WAITOK | M_ZERO); - TAILQ_INIT(&ic->ic_to_send); + STAILQ_INIT(&ic->ic_to_send); ic->ic_lock = lock; cv_init(&ic->ic_send_cv, "icl_tx"); cv_init(&ic->ic_receive_cv, "icl_rx"); @@ -1214,13 +1214,13 @@ icl_conn_close(struct icl_conn *ic) /* * Remove any outstanding PDUs from the send queue. */ - while (!TAILQ_EMPTY(&ic->ic_to_send)) { - pdu = TAILQ_FIRST(&ic->ic_to_send); - TAILQ_REMOVE(&ic->ic_to_send, pdu, ip_next); + while (!STAILQ_EMPTY(&ic->ic_to_send)) { + pdu = STAILQ_FIRST(&ic->ic_to_send); + STAILQ_REMOVE_HEAD(&ic->ic_to_send, ip_next); icl_pdu_free(pdu); } - KASSERT(TAILQ_EMPTY(&ic->ic_to_send), + KASSERT(STAILQ_EMPTY(&ic->ic_to_send), ("destroying session with non-empty send queue")); #ifdef DIAGNOSTIC KASSERT(ic->ic_outstanding_pdus == 0, Modified: stable/10/sys/dev/iscsi/icl.h ============================================================================== --- stable/10/sys/dev/iscsi/icl.h Wed May 7 06:41:33 2014 (r265499) +++ stable/10/sys/dev/iscsi/icl.h Wed May 7 06:44:19 2014 (r265500) @@ -40,7 +40,7 @@ struct icl_conn; struct icl_pdu { - TAILQ_ENTRY(icl_pdu) ip_next; + STAILQ_ENTRY(icl_pdu) ip_next; struct icl_conn *ip_conn; struct iscsi_bhs *ip_bhs; struct mbuf *ip_bhs_mbuf; @@ -79,7 +79,7 @@ struct icl_conn { #ifdef DIAGNOSTIC volatile u_int ic_outstanding_pdus; #endif - TAILQ_HEAD(, icl_pdu) ic_to_send; + STAILQ_HEAD(, icl_pdu) ic_to_send; size_t ic_receive_len; int ic_receive_state; struct icl_pdu *ic_receive_pdu; Modified: stable/10/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.c Wed May 7 06:41:33 2014 (r265499) +++ stable/10/sys/dev/iscsi/iscsi.c Wed May 7 06:44:19 2014 (r265500) @@ -209,12 +209,12 @@ iscsi_session_send_postponed(struct iscs ISCSI_SESSION_LOCK_ASSERT(is); - while (!TAILQ_EMPTY(&is->is_postponed)) { - request = TAILQ_FIRST(&is->is_postponed); + while (!STAILQ_EMPTY(&is->is_postponed)) { + request = STAILQ_FIRST(&is->is_postponed); postpone = iscsi_pdu_prepare(request); if (postpone) break; - TAILQ_REMOVE(&is->is_postponed, request, ip_next); + STAILQ_REMOVE_HEAD(&is->is_postponed, ip_next); icl_pdu_queue(request); } } @@ -230,7 +230,7 @@ iscsi_pdu_queue_locked(struct icl_pdu *r iscsi_session_send_postponed(is); postpone = iscsi_pdu_prepare(request); if (postpone) { - TAILQ_INSERT_TAIL(&is->is_postponed, request, ip_next); + STAILQ_INSERT_TAIL(&is->is_postponed, request, ip_next); return; } icl_pdu_queue(request); @@ -318,9 +318,9 @@ iscsi_maintenance_thread_reconnect(struc /* * Remove postponed PDUs. */ - while (!TAILQ_EMPTY(&is->is_postponed)) { - pdu = TAILQ_FIRST(&is->is_postponed); - TAILQ_REMOVE(&is->is_postponed, pdu, ip_next); + while (!STAILQ_EMPTY(&is->is_postponed)) { + pdu = STAILQ_FIRST(&is->is_postponed); + STAILQ_REMOVE_HEAD(&is->is_postponed, ip_next); icl_pdu_free(pdu); } @@ -332,7 +332,7 @@ iscsi_maintenance_thread_reconnect(struc KASSERT(TAILQ_EMPTY(&is->is_outstanding), ("destroying session with active tasks")); - KASSERT(TAILQ_EMPTY(&is->is_postponed), + KASSERT(STAILQ_EMPTY(&is->is_postponed), ("destroying session with postponed PDUs")); /* @@ -387,9 +387,9 @@ iscsi_maintenance_thread_terminate(struc /* * Remove postponed PDUs. */ - while (!TAILQ_EMPTY(&is->is_postponed)) { - pdu = TAILQ_FIRST(&is->is_postponed); - TAILQ_REMOVE(&is->is_postponed, pdu, ip_next); + while (!STAILQ_EMPTY(&is->is_postponed)) { + pdu = STAILQ_FIRST(&is->is_postponed); + STAILQ_REMOVE_HEAD(&is->is_postponed, ip_next); icl_pdu_free(pdu); } @@ -419,7 +419,7 @@ iscsi_maintenance_thread_terminate(struc KASSERT(TAILQ_EMPTY(&is->is_outstanding), ("destroying session with active tasks")); - KASSERT(TAILQ_EMPTY(&is->is_postponed), + KASSERT(STAILQ_EMPTY(&is->is_postponed), ("destroying session with postponed PDUs")); ISCSI_SESSION_UNLOCK(is); @@ -450,7 +450,7 @@ iscsi_maintenance_thread(void *arg) ISCSI_SESSION_LOCK(is); if (is->is_reconnecting == false && is->is_terminating == false && - TAILQ_EMPTY(&is->is_postponed)) + STAILQ_EMPTY(&is->is_postponed)) cv_wait(&is->is_maintenance_cv, &is->is_lock); if (is->is_reconnecting) { @@ -628,7 +628,7 @@ iscsi_pdu_update_statsn(const struct icl * Command window increased; kick the maintanance thread * to send out postponed commands. */ - if (!TAILQ_EMPTY(&is->is_postponed)) + if (!STAILQ_EMPTY(&is->is_postponed)) cv_signal(&is->is_maintenance_cv); } else if (maxcmdsn < is->is_maxcmdsn) { ISCSI_SESSION_DEBUG(is, "PDU MaxCmdSN %d < session MaxCmdSN %d; ignoring", @@ -1638,7 +1638,7 @@ iscsi_ioctl_session_add(struct iscsi_sof is->is_conn->ic_error = iscsi_error_callback; is->is_conn->ic_prv0 = is; TAILQ_INIT(&is->is_outstanding); - TAILQ_INIT(&is->is_postponed); + STAILQ_INIT(&is->is_postponed); mtx_init(&is->is_lock, "iscsi_lock", NULL, MTX_DEF); cv_init(&is->is_maintenance_cv, "iscsi_mt"); #ifdef ICL_KERNEL_PROXY Modified: stable/10/sys/dev/iscsi/iscsi.h ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.h Wed May 7 06:41:33 2014 (r265499) +++ stable/10/sys/dev/iscsi/iscsi.h Wed May 7 06:44:19 2014 (r265500) @@ -69,7 +69,7 @@ struct iscsi_session { char is_target_alias[ISCSI_ALIAS_LEN]; TAILQ_HEAD(, iscsi_outstanding) is_outstanding; - TAILQ_HEAD(, icl_pdu) is_postponed; + STAILQ_HEAD(, icl_pdu) is_postponed; struct callout is_callout; unsigned int is_timeout; From owner-svn-src-stable@FreeBSD.ORG Wed May 7 06:47:00 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98CF48FD; Wed, 7 May 2014 06:47:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 78833C0A; Wed, 7 May 2014 06:47:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s476l0bC096940; Wed, 7 May 2014 06:47:00 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s476kxbE096929; Wed, 7 May 2014 06:46:59 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070646.s476kxbE096929@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 06:46:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265501 - in stable/10/sys: cam/ctl dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 06:47:00 -0000 Author: trasz Date: Wed May 7 06:46:59 2014 New Revision: 265501 URL: http://svnweb.freebsd.org/changeset/base/265501 Log: MFC r264110: All the iSCSI sysctls are also tunables; advertise that. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/sys/dev/iscsi/icl.c stable/10/sys/dev/iscsi/iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed May 7 06:44:19 2014 (r265500) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed May 7 06:46:59 2014 (r265501) @@ -82,19 +82,19 @@ SYSCTL_NODE(_kern_cam_ctl, OID_AUTO, isc "CAM Target Layer iSCSI Frontend"); static int debug = 3; TUNABLE_INT("kern.cam.ctl.iscsi.debug", &debug); -SYSCTL_INT(_kern_cam_ctl_iscsi, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_kern_cam_ctl_iscsi, OID_AUTO, debug, CTLFLAG_RWTUN, &debug, 1, "Enable debug messages"); static int ping_timeout = 5; TUNABLE_INT("kern.cam.ctl.iscsi.ping_timeout", &ping_timeout); -SYSCTL_INT(_kern_cam_ctl_iscsi, OID_AUTO, ping_timeout, CTLFLAG_RW, +SYSCTL_INT(_kern_cam_ctl_iscsi, OID_AUTO, ping_timeout, CTLFLAG_RWTUN, &ping_timeout, 5, "Interval between ping (NOP-Out) requests, in seconds"); static int login_timeout = 60; TUNABLE_INT("kern.cam.ctl.iscsi.login_timeout", &login_timeout); -SYSCTL_INT(_kern_cam_ctl_iscsi, OID_AUTO, login_timeout, CTLFLAG_RW, +SYSCTL_INT(_kern_cam_ctl_iscsi, OID_AUTO, login_timeout, CTLFLAG_RWTUN, &login_timeout, 60, "Time to wait for ctld(8) to finish Login Phase, in seconds"); static int maxcmdsn_delta = 256; TUNABLE_INT("kern.cam.ctl.iscsi.maxcmdsn_delta", &maxcmdsn_delta); -SYSCTL_INT(_kern_cam_ctl_iscsi, OID_AUTO, maxcmdsn_delta, CTLFLAG_RW, +SYSCTL_INT(_kern_cam_ctl_iscsi, OID_AUTO, maxcmdsn_delta, CTLFLAG_RWTUN, &maxcmdsn_delta, 256, "Number of commands the initiator can send " "without confirmation"); Modified: stable/10/sys/dev/iscsi/icl.c ============================================================================== --- stable/10/sys/dev/iscsi/icl.c Wed May 7 06:44:19 2014 (r265500) +++ stable/10/sys/dev/iscsi/icl.c Wed May 7 06:46:59 2014 (r265501) @@ -61,20 +61,20 @@ SYSCTL_NODE(_kern, OID_AUTO, icl, CTLFLAG_RD, 0, "iSCSI Common Layer"); static int debug = 1; TUNABLE_INT("kern.icl.debug", &debug); -SYSCTL_INT(_kern_icl, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_kern_icl, OID_AUTO, debug, CTLFLAG_RWTUN, &debug, 1, "Enable debug messages"); static int partial_receive_len = 1 * 1024; /* XXX: More? */ TUNABLE_INT("kern.icl.partial_receive_len", &partial_receive_len); -SYSCTL_INT(_kern_icl, OID_AUTO, partial_receive_len, CTLFLAG_RW, +SYSCTL_INT(_kern_icl, OID_AUTO, partial_receive_len, CTLFLAG_RWTUN, &partial_receive_len, 1 * 1024, "Minimum read size for partially received " "data segment"); static int sendspace = 1048576; TUNABLE_INT("kern.icl.sendspace", &sendspace); -SYSCTL_INT(_kern_icl, OID_AUTO, sendspace, CTLFLAG_RW, +SYSCTL_INT(_kern_icl, OID_AUTO, sendspace, CTLFLAG_RWTUN, &sendspace, 1048576, "Default send socket buffer size"); static int recvspace = 1048576; TUNABLE_INT("kern.icl.recvspace", &recvspace); -SYSCTL_INT(_kern_icl, OID_AUTO, recvspace, CTLFLAG_RW, +SYSCTL_INT(_kern_icl, OID_AUTO, recvspace, CTLFLAG_RWTUN, &recvspace, 1048576, "Default receive socket buffer size"); static uma_zone_t icl_conn_zone; Modified: stable/10/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.c Wed May 7 06:44:19 2014 (r265500) +++ stable/10/sys/dev/iscsi/iscsi.c Wed May 7 06:46:59 2014 (r265501) @@ -74,23 +74,23 @@ static struct iscsi_softc *sc; SYSCTL_NODE(_kern, OID_AUTO, iscsi, CTLFLAG_RD, 0, "iSCSI initiator"); static int debug = 1; TUNABLE_INT("kern.iscsi.debug", &debug); -SYSCTL_INT(_kern_iscsi, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_kern_iscsi, OID_AUTO, debug, CTLFLAG_RWTUN, &debug, 2, "Enable debug messages"); static int ping_timeout = 5; TUNABLE_INT("kern.iscsi.ping_timeout", &ping_timeout); -SYSCTL_INT(_kern_iscsi, OID_AUTO, ping_timeout, CTLFLAG_RW, &ping_timeout, +SYSCTL_INT(_kern_iscsi, OID_AUTO, ping_timeout, CTLFLAG_RWTUN, &ping_timeout, 5, "Timeout for ping (NOP-Out) requests, in seconds"); static int iscsid_timeout = 60; TUNABLE_INT("kern.iscsi.iscsid_timeout", &iscsid_timeout); -SYSCTL_INT(_kern_iscsi, OID_AUTO, iscsid_timeout, CTLFLAG_RW, &iscsid_timeout, +SYSCTL_INT(_kern_iscsi, OID_AUTO, iscsid_timeout, CTLFLAG_RWTUN, &iscsid_timeout, 60, "Time to wait for iscsid(8) to handle reconnection, in seconds"); static int login_timeout = 60; TUNABLE_INT("kern.iscsi.login_timeout", &login_timeout); -SYSCTL_INT(_kern_iscsi, OID_AUTO, login_timeout, CTLFLAG_RW, &login_timeout, +SYSCTL_INT(_kern_iscsi, OID_AUTO, login_timeout, CTLFLAG_RWTUN, &login_timeout, 60, "Time to wait for iscsid(8) to finish Login Phase, in seconds"); static int maxtags = 255; TUNABLE_INT("kern.iscsi.maxtags", &maxtags); -SYSCTL_INT(_kern_iscsi, OID_AUTO, maxtags, CTLFLAG_RW, &maxtags, +SYSCTL_INT(_kern_iscsi, OID_AUTO, maxtags, CTLFLAG_RWTUN, &maxtags, 255, "Max number of IO requests queued"); static MALLOC_DEFINE(M_ISCSI, "iSCSI", "iSCSI initiator"); From owner-svn-src-stable@FreeBSD.ORG Wed May 7 07:17:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 469B9501; Wed, 7 May 2014 07:17:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3049DECA; Wed, 7 May 2014 07:17:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s477HBcw011053; Wed, 7 May 2014 07:17:11 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s477HBq9011049; Wed, 7 May 2014 07:17:11 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070717.s477HBq9011049@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 07:17:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265502 - stable/10/sys/dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 07:17:12 -0000 Author: trasz Date: Wed May 7 07:17:11 2014 New Revision: 265502 URL: http://svnweb.freebsd.org/changeset/base/265502 Log: MFC r264122: Rework the iSCSI PDU transmit code to avoid lock contention and coalesce PDUs before sending. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/iscsi/icl.c stable/10/sys/dev/iscsi/icl.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/icl.c ============================================================================== --- stable/10/sys/dev/iscsi/icl.c Wed May 7 06:46:59 2014 (r265501) +++ stable/10/sys/dev/iscsi/icl.c Wed May 7 07:17:11 2014 (r265502) @@ -63,6 +63,10 @@ static int debug = 1; TUNABLE_INT("kern.icl.debug", &debug); SYSCTL_INT(_kern_icl, OID_AUTO, debug, CTLFLAG_RWTUN, &debug, 1, "Enable debug messages"); +static int coalesce = 1; +TUNABLE_INT("kern.icl.coalesce", &coalesce); +SYSCTL_INT(_kern_icl, OID_AUTO, coalesce, CTLFLAG_RWTUN, + &coalesce, 1, "Try to coalesce PDUs before sending"); static int partial_receive_len = 1 * 1024; /* XXX: More? */ TUNABLE_INT("kern.icl.partial_receive_len", &partial_receive_len); SYSCTL_INT(_kern_icl, OID_AUTO, partial_receive_len, CTLFLAG_RWTUN, @@ -769,18 +773,14 @@ icl_soupcall_receive(struct socket *so, } static int -icl_pdu_send(struct icl_pdu *request) +icl_pdu_finalize(struct icl_pdu *request) { size_t padding, pdu_len; uint32_t digest, zero = 0; - int error, ok; - struct socket *so; + int ok; struct icl_conn *ic; ic = request->ip_conn; - so = request->ip_conn->ic_socket; - - ICL_CONN_LOCK_ASSERT(ic); icl_pdu_set_data_segment_length(request, request->ip_data_len); @@ -813,7 +813,7 @@ icl_pdu_send(struct icl_pdu *request) ok = m_append(request->ip_data_mbuf, sizeof(digest), (void *)&digest); if (ok != 1) { - ICL_WARN("failed to append header digest"); + ICL_WARN("failed to append data digest"); return (1); } } @@ -824,64 +824,114 @@ icl_pdu_send(struct icl_pdu *request) request->ip_bhs_mbuf->m_pkthdr.len = pdu_len; - error = sosend(so, NULL, NULL, request->ip_bhs_mbuf, - NULL, MSG_DONTWAIT, curthread); - request->ip_bhs_mbuf = NULL; /* Sosend consumes the mbuf. */ - if (error != 0) { - ICL_DEBUG("sosend error %d", error); - return (error); - } - return (0); } static void -icl_conn_send_pdus(struct icl_conn *ic) +icl_conn_send_pdus(struct icl_conn *ic, void *fts) { - struct icl_pdu *request; + STAILQ_HEAD(, icl_pdu) *queue = fts; /* XXX */ + struct icl_pdu *request, *request2; struct socket *so; - size_t available, size; - int error; + size_t available, size, size2; + int coalesced, error; - ICL_CONN_LOCK_ASSERT(ic); + ICL_CONN_LOCK_ASSERT_NOT(ic); so = ic->ic_socket; SOCKBUF_LOCK(&so->so_snd); + /* + * Check how much space do we have for transmit. We can't just + * call sosend() and retry when we get EWOULDBLOCK or EMSGSIZE, + * as it always frees the mbuf chain passed to it, even in case + * of error. + */ available = sbspace(&so->so_snd); + + /* + * Notify the socket layer that it doesn't need to call + * send socket upcall for the time being. + */ + so->so_snd.sb_lowat = so->so_snd.sb_hiwat; SOCKBUF_UNLOCK(&so->so_snd); - while (!STAILQ_EMPTY(&ic->ic_to_send)) { + while (!STAILQ_EMPTY(queue)) { if (ic->ic_disconnecting) return; - - request = STAILQ_FIRST(&ic->ic_to_send); + request = STAILQ_FIRST(queue); size = icl_pdu_size(request); if (available < size) { +#if 1 + ICL_DEBUG("no space to send; " + "have %zd, need %zd", + available, size); +#endif + /* * Set the low watermark on the socket, - * to avoid waking up until there is enough - * space. + * to avoid unneccessary wakeups until there + * is enough space for the PDU to fit. */ SOCKBUF_LOCK(&so->so_snd); so->so_snd.sb_lowat = size; SOCKBUF_UNLOCK(&so->so_snd); -#if 1 - ICL_DEBUG("no space to send; " - "have %zd, need %zd", - available, size); -#endif return; } - available -= size; - STAILQ_REMOVE_HEAD(&ic->ic_to_send, ip_next); - error = icl_pdu_send(request); + STAILQ_REMOVE_HEAD(queue, ip_next); + error = icl_pdu_finalize(request); if (error != 0) { - ICL_DEBUG("failed to send PDU; " + ICL_DEBUG("failed to finalize PDU; " "dropping connection"); icl_conn_fail(ic); + icl_pdu_free(request); return; - } + } + if (coalesce) { + coalesced = 1; + for (;;) { + request2 = STAILQ_FIRST(queue); + if (request2 == NULL) + break; + size2 = icl_pdu_size(request2); + if (available < size + size2) + break; + STAILQ_REMOVE_HEAD(queue, ip_next); + error = icl_pdu_finalize(request2); + if (error != 0) { + ICL_DEBUG("failed to finalize PDU; " + "dropping connection"); + icl_conn_fail(ic); + icl_pdu_free(request); + icl_pdu_free(request2); + return; + } + m_cat(request->ip_bhs_mbuf, request2->ip_bhs_mbuf); + request2->ip_bhs_mbuf = NULL; + request->ip_bhs_mbuf->m_pkthdr.len += size2; + size += size2; + STAILQ_REMOVE_AFTER(queue, request, ip_next); + icl_pdu_free(request2); + coalesced++; + } +#if 0 + if (coalesced > 1) { + ICL_DEBUG("coalesced %d PDUs into %zd bytes", + coalesced, size); + } +#endif + } + available -= size; + error = sosend(so, NULL, NULL, request->ip_bhs_mbuf, + NULL, MSG_DONTWAIT, curthread); + request->ip_bhs_mbuf = NULL; /* Sosend consumes the mbuf. */ + if (error != 0) { + ICL_DEBUG("failed to send PDU, error %d; " + "dropping connection", error); + icl_conn_fail(ic); + icl_pdu_free(request); + return; + } icl_pdu_free(request); } } @@ -890,9 +940,12 @@ static void icl_send_thread(void *arg) { struct icl_conn *ic; + STAILQ_HEAD(, icl_pdu) queue; ic = arg; + STAILQ_INIT(&queue); + ICL_CONN_LOCK(ic); ic->ic_send_running = true; @@ -901,10 +954,54 @@ icl_send_thread(void *arg) //ICL_DEBUG("terminating"); break; } - icl_conn_send_pdus(ic); + + for (;;) { + /* + * If the local queue is empty, populate it from + * the main one. This way the icl_conn_send_pdus() + * can go through all the queued PDUs without holding + * any locks. + */ + if (STAILQ_EMPTY(&queue)) + STAILQ_SWAP(&ic->ic_to_send, &queue, icl_pdu); + + ic->ic_check_send_space = false; + ICL_CONN_UNLOCK(ic); + icl_conn_send_pdus(ic, &queue); + ICL_CONN_LOCK(ic); + + /* + * The icl_soupcall_send() was called since the last + * call to sbspace(); go around; + */ + if (ic->ic_check_send_space) + continue; + + /* + * Local queue is empty, but we still have PDUs + * in the main one; go around. + */ + if (STAILQ_EMPTY(&queue) && + !STAILQ_EMPTY(&ic->ic_to_send)) + continue; + + /* + * There might be some stuff in the local queue, + * which didn't get sent due to not having enough send + * space. Wait for socket upcall. + */ + break; + } + cv_wait(&ic->ic_send_cv, ic->ic_lock); } + /* + * We're exiting; move PDUs back to the main queue, so they can + * get freed properly. At this point ordering doesn't matter. + */ + STAILQ_CONCAT(&ic->ic_to_send, &queue); + ic->ic_send_running = false; ICL_CONN_UNLOCK(ic); kthread_exit(); @@ -916,12 +1013,19 @@ icl_soupcall_send(struct socket *so, voi struct icl_conn *ic; ic = arg; + + ICL_CONN_LOCK(ic); + ic->ic_check_send_space = true; + ICL_CONN_UNLOCK(ic); + cv_signal(&ic->ic_send_cv); + return (SU_OK); } int -icl_pdu_append_data(struct icl_pdu *request, const void *addr, size_t len, int flags) +icl_pdu_append_data(struct icl_pdu *request, const void *addr, size_t len, + int flags) { struct mbuf *mb, *newmb; size_t copylen, off = 0; @@ -974,6 +1078,17 @@ icl_pdu_queue(struct icl_pdu *ip) icl_pdu_free(ip); return; } + + if (!STAILQ_EMPTY(&ic->ic_to_send)) { + STAILQ_INSERT_TAIL(&ic->ic_to_send, ip, ip_next); + /* + * If the queue is not empty, someone else had already + * signaled the send thread; no need to do that again, + * just return. + */ + return; + } + STAILQ_INSERT_TAIL(&ic->ic_to_send, ip, ip_next); cv_signal(&ic->ic_send_cv); } @@ -1185,6 +1300,20 @@ icl_conn_close(struct icl_conn *ic) return; } + /* + * Deregister socket upcalls. + */ + ICL_CONN_UNLOCK(ic); + SOCKBUF_LOCK(&ic->ic_socket->so_snd); + if (ic->ic_socket->so_snd.sb_upcall != NULL) + soupcall_clear(ic->ic_socket, SO_SND); + SOCKBUF_UNLOCK(&ic->ic_socket->so_snd); + SOCKBUF_LOCK(&ic->ic_socket->so_rcv); + if (ic->ic_socket->so_rcv.sb_upcall != NULL) + soupcall_clear(ic->ic_socket, SO_RCV); + SOCKBUF_UNLOCK(&ic->ic_socket->so_rcv); + ICL_CONN_LOCK(ic); + ic->ic_disconnecting = true; /* @@ -1202,7 +1331,9 @@ icl_conn_close(struct icl_conn *ic) } //ICL_DEBUG("send/receive threads terminated"); + ICL_CONN_UNLOCK(ic); soclose(ic->ic_socket); + ICL_CONN_LOCK(ic); ic->ic_socket = NULL; if (ic->ic_receive_pdu != NULL) { Modified: stable/10/sys/dev/iscsi/icl.h ============================================================================== --- stable/10/sys/dev/iscsi/icl.h Wed May 7 06:46:59 2014 (r265501) +++ stable/10/sys/dev/iscsi/icl.h Wed May 7 07:17:11 2014 (r265502) @@ -80,6 +80,7 @@ struct icl_conn { volatile u_int ic_outstanding_pdus; #endif STAILQ_HEAD(, icl_pdu) ic_to_send; + bool ic_check_send_space; size_t ic_receive_len; int ic_receive_state; struct icl_pdu *ic_receive_pdu; From owner-svn-src-stable@FreeBSD.ORG Wed May 7 07:18:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6200675C; Wed, 7 May 2014 07:18:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ED0EED4; Wed, 7 May 2014 07:18:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s477IdkQ011298; Wed, 7 May 2014 07:18:39 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s477Iddc011297; Wed, 7 May 2014 07:18:39 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070718.s477Iddc011297@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 07:18:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265503 - stable/10/sys/dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 07:18:39 -0000 Author: trasz Date: Wed May 7 07:18:38 2014 New Revision: 265503 URL: http://svnweb.freebsd.org/changeset/base/265503 Log: MFC r264163: Remove hack to pass STAILQ to a function and do it properly instead. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/iscsi/icl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/icl.c ============================================================================== --- stable/10/sys/dev/iscsi/icl.c Wed May 7 07:17:11 2014 (r265502) +++ stable/10/sys/dev/iscsi/icl.c Wed May 7 07:18:38 2014 (r265503) @@ -102,6 +102,8 @@ static volatile u_int icl_ncons; #define ICL_CONN_LOCK_ASSERT(X) mtx_assert(X->ic_lock, MA_OWNED) #define ICL_CONN_LOCK_ASSERT_NOT(X) mtx_assert(X->ic_lock, MA_NOTOWNED) +STAILQ_HEAD(icl_pdu_stailq, icl_pdu); + static void icl_conn_fail(struct icl_conn *ic) { @@ -828,9 +830,8 @@ icl_pdu_finalize(struct icl_pdu *request } static void -icl_conn_send_pdus(struct icl_conn *ic, void *fts) +icl_conn_send_pdus(struct icl_conn *ic, struct icl_pdu_stailq *queue) { - STAILQ_HEAD(, icl_pdu) *queue = fts; /* XXX */ struct icl_pdu *request, *request2; struct socket *so; size_t available, size, size2; @@ -940,7 +941,7 @@ static void icl_send_thread(void *arg) { struct icl_conn *ic; - STAILQ_HEAD(, icl_pdu) queue; + struct icl_pdu_stailq queue; ic = arg; From owner-svn-src-stable@FreeBSD.ORG Wed May 7 07:20:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EAA119C2; Wed, 7 May 2014 07:20:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D820CEE2; Wed, 7 May 2014 07:20:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s477K2tv011580; Wed, 7 May 2014 07:20:02 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s477K2qo011579; Wed, 7 May 2014 07:20:02 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070720.s477K2qo011579@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 07:20:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265504 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 07:20:03 -0000 Author: trasz Date: Wed May 7 07:20:02 2014 New Revision: 265504 URL: http://svnweb.freebsd.org/changeset/base/265504 Log: MFC r264264 by mav@: Wakeup only one thread of added in r263978i at a time. This slightly reduces lock congestion between threads. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Wed May 7 07:18:38 2014 (r265503) +++ stable/10/sys/cam/ctl/ctl.c Wed May 7 07:20:02 2014 (r265504) @@ -13065,7 +13065,7 @@ ctl_wakeup_thread() softc = control_softc; - wakeup(softc); + wakeup_one(softc); } /* Initialization and failover */ From owner-svn-src-stable@FreeBSD.ORG Wed May 7 07:25:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4B71C78; Wed, 7 May 2014 07:25:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95636F84; Wed, 7 May 2014 07:25:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s477Pmsn015427; Wed, 7 May 2014 07:25:48 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s477PmJa015424; Wed, 7 May 2014 07:25:48 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070725.s477PmJa015424@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 07:25:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265505 - in stable/10/sys: cam/ctl dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 07:25:48 -0000 Author: trasz Date: Wed May 7 07:25:47 2014 New Revision: 265505 URL: http://svnweb.freebsd.org/changeset/base/265505 Log: MFC r263740: Use a less unusual syntax in debug printfs. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/sys/dev/iscsi/icl.c stable/10/sys/dev/iscsi/iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed May 7 07:20:02 2014 (r265504) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed May 7 07:25:47 2014 (r265505) @@ -98,29 +98,38 @@ SYSCTL_INT(_kern_cam_ctl_iscsi, OID_AUTO &maxcmdsn_delta, 256, "Number of commands the initiator can send " "without confirmation"); -#define CFISCSI_DEBUG(X, ...) \ - if (debug > 1) { \ - printf("%s: " X "\n", __func__, ## __VA_ARGS__);\ +#define CFISCSI_DEBUG(X, ...) \ + do { \ + if (debug > 1) { \ + printf("%s: " X "\n", \ + __func__, ## __VA_ARGS__); \ + } \ } while (0) -#define CFISCSI_WARN(X, ...) \ - if (debug > 0) { \ - printf("WARNING: %s: " X "\n", \ - __func__, ## __VA_ARGS__); \ +#define CFISCSI_WARN(X, ...) \ + do { \ + if (debug > 0) { \ + printf("WARNING: %s: " X "\n", \ + __func__, ## __VA_ARGS__); \ + } \ } while (0) -#define CFISCSI_SESSION_DEBUG(S, X, ...) \ - if (debug > 1) { \ - printf("%s: %s (%s): " X "\n", \ - __func__, S->cs_initiator_addr, \ - S->cs_initiator_name, ## __VA_ARGS__); \ +#define CFISCSI_SESSION_DEBUG(S, X, ...) \ + do { \ + if (debug > 1) { \ + printf("%s: %s (%s): " X "\n", \ + __func__, S->cs_initiator_addr, \ + S->cs_initiator_name, ## __VA_ARGS__); \ + } \ } while (0) -#define CFISCSI_SESSION_WARN(S, X, ...) \ - if (debug > 0) { \ - printf("WARNING: %s (%s): " X "\n", \ - S->cs_initiator_addr, \ - S->cs_initiator_name, ## __VA_ARGS__); \ +#define CFISCSI_SESSION_WARN(S, X, ...) \ + do { \ + if (debug > 0) { \ + printf("WARNING: %s (%s): " X "\n", \ + S->cs_initiator_addr, \ + S->cs_initiator_name, ## __VA_ARGS__); \ + } \ } while (0) #define CFISCSI_SESSION_LOCK(X) mtx_lock(&X->cs_lock) Modified: stable/10/sys/dev/iscsi/icl.c ============================================================================== --- stable/10/sys/dev/iscsi/icl.c Wed May 7 07:20:02 2014 (r265504) +++ stable/10/sys/dev/iscsi/icl.c Wed May 7 07:25:47 2014 (r265505) @@ -86,15 +86,18 @@ static uma_zone_t icl_pdu_zone; static volatile u_int icl_ncons; -#define ICL_DEBUG(X, ...) \ - if (debug > 1) { \ - printf("%s: " X "\n", __func__, ## __VA_ARGS__);\ +#define ICL_DEBUG(X, ...) \ + do { \ + if (debug > 1) \ + printf("%s: " X "\n", __func__, ## __VA_ARGS__);\ } while (0) -#define ICL_WARN(X, ...) \ - if (debug > 0) { \ - printf("WARNING: %s: " X "\n", \ - __func__, ## __VA_ARGS__); \ +#define ICL_WARN(X, ...) \ + do { \ + if (debug > 0) { \ + printf("WARNING: %s: " X "\n", \ + __func__, ## __VA_ARGS__); \ + } \ } while (0) #define ICL_CONN_LOCK(X) mtx_lock(X->ic_lock) Modified: stable/10/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.c Wed May 7 07:20:02 2014 (r265504) +++ stable/10/sys/dev/iscsi/iscsi.c Wed May 7 07:25:47 2014 (r265505) @@ -99,29 +99,36 @@ static uma_zone_t iscsi_outstanding_zone #define CONN_SESSION(X) ((struct iscsi_session *)X->ic_prv0) #define PDU_SESSION(X) (CONN_SESSION(X->ip_conn)) -#define ISCSI_DEBUG(X, ...) \ - if (debug > 1) { \ - printf("%s: " X "\n", __func__, ## __VA_ARGS__);\ +#define ISCSI_DEBUG(X, ...) \ + do { \ + if (debug > 1) \ + printf("%s: " X "\n", __func__, ## __VA_ARGS__);\ } while (0) -#define ISCSI_WARN(X, ...) \ - if (debug > 0) { \ - printf("WARNING: %s: " X "\n", \ - __func__, ## __VA_ARGS__); \ +#define ISCSI_WARN(X, ...) \ + do { \ + if (debug > 0) { \ + printf("WARNING: %s: " X "\n", \ + __func__, ## __VA_ARGS__); \ + } \ } while (0) -#define ISCSI_SESSION_DEBUG(S, X, ...) \ - if (debug > 1) { \ - printf("%s: %s (%s): " X "\n", \ - __func__, S->is_conf.isc_target_addr, \ - S->is_conf.isc_target, ## __VA_ARGS__); \ +#define ISCSI_SESSION_DEBUG(S, X, ...) \ + do { \ + if (debug > 1) { \ + printf("%s: %s (%s): " X "\n", \ + __func__, S->is_conf.isc_target_addr, \ + S->is_conf.isc_target, ## __VA_ARGS__); \ + } \ } while (0) -#define ISCSI_SESSION_WARN(S, X, ...) \ - if (debug > 0) { \ - printf("WARNING: %s (%s): " X "\n", \ - S->is_conf.isc_target_addr, \ - S->is_conf.isc_target, ## __VA_ARGS__); \ +#define ISCSI_SESSION_WARN(S, X, ...) \ + do { \ + if (debug > 0) { \ + printf("WARNING: %s (%s): " X "\n", \ + S->is_conf.isc_target_addr, \ + S->is_conf.isc_target, ## __VA_ARGS__); \ + } \ } while (0) #define ISCSI_SESSION_LOCK(X) mtx_lock(&X->is_lock) From owner-svn-src-stable@FreeBSD.ORG Wed May 7 07:28:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89237FDA; Wed, 7 May 2014 07:28:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75E79F98; Wed, 7 May 2014 07:28:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s477SOLd015822; Wed, 7 May 2014 07:28:24 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s477SOOG015821; Wed, 7 May 2014 07:28:24 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070728.s477SOOG015821@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 07:28:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265506 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 07:28:24 -0000 Author: trasz Date: Wed May 7 07:28:23 2014 New Revision: 265506 URL: http://svnweb.freebsd.org/changeset/base/265506 Log: MFC r264500: Stop treating LUN 0 as mandatory. There is no reason to do that. Sponsored by: The FreeBSD Foundation 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 Wed May 7 07:25:47 2014 (r265505) +++ stable/10/usr.sbin/ctld/ctld.c Wed May 7 07:28:23 2014 (r265506) @@ -1099,7 +1099,7 @@ conf_verify(struct conf *conf) struct portal_group *pg; struct target *targ; struct lun *lun; - bool found_lun0; + bool found_lun; int error; if (conf->conf_pidfile_path == NULL) @@ -1116,17 +1116,16 @@ conf_verify(struct conf *conf) "default"); assert(targ->t_portal_group != NULL); } - found_lun0 = false; + found_lun = false; TAILQ_FOREACH(lun, &targ->t_luns, l_next) { error = conf_verify_lun(lun); if (error != 0) return (error); - if (lun->l_lun == 0) - found_lun0 = true; + found_lun = true; } - if (!found_lun0) { - log_warnx("mandatory LUN 0 not configured " - "for target \"%s\"", targ->t_name); + if (!found_lun) { + log_warnx("no LUNs defined for target \"%s\"", + targ->t_name); return (1); } } From owner-svn-src-stable@FreeBSD.ORG Wed May 7 07:29:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 666AB2BC; Wed, 7 May 2014 07:29:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 528FCF9F; Wed, 7 May 2014 07:29:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s477Tf6A016040; Wed, 7 May 2014 07:29:41 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s477TeBX016035; Wed, 7 May 2014 07:29:40 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070729.s477TeBX016035@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 07:29:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265507 - in stable/10: sys/cam/ctl usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 07:29:41 -0000 Author: trasz Date: Wed May 7 07:29:39 2014 New Revision: 265507 URL: http://svnweb.freebsd.org/changeset/base/265507 Log: MFC r264524: Make it possible for the iSCSI target side to operate in both normal and ICL_KERNEL_PROXY mode, and fix some bit rot so the latter actually works again. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/sys/cam/ctl/ctl_ioctl.h stable/10/usr.sbin/ctld/ctld.c stable/10/usr.sbin/ctld/kernel.c stable/10/usr.sbin/ctld/pdu.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed May 7 07:28:23 2014 (r265506) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed May 7 07:29:39 2014 (r265507) @@ -1419,9 +1419,7 @@ cfiscsi_ioctl_handoff(struct ctl_iscsi * struct cfiscsi_session *cs; struct cfiscsi_target *ct; struct ctl_iscsi_handoff_params *cihp; -#ifndef ICL_KERNEL_PROXY int error; -#endif cihp = (struct ctl_iscsi_handoff_params *)&(ci->data); softc = &cfiscsi_softc; @@ -1446,27 +1444,39 @@ cfiscsi_ioctl_handoff(struct ctl_iscsi * } #ifdef ICL_KERNEL_PROXY - mtx_lock(&cfiscsi_softc.lock); - TAILQ_FOREACH(cs, &cfiscsi_softc.sessions, cs_next) { - if (cs->cs_id == cihp->socket) - break; - } - if (cs == NULL) { - mtx_unlock(&cfiscsi_softc.lock); - snprintf(ci->error_str, sizeof(ci->error_str), "connection not found"); + if (cihp->socket > 0 && cihp->connection_id > 0) { + snprintf(ci->error_str, sizeof(ci->error_str), + "both socket and connection_id set"); ci->status = CTL_ISCSI_ERROR; cfiscsi_target_release(ct); return; } - mtx_unlock(&cfiscsi_softc.lock); -#else - cs = cfiscsi_session_new(softc); - if (cs == NULL) { - ci->status = CTL_ISCSI_ERROR; - snprintf(ci->error_str, sizeof(ci->error_str), - "%s: cfiscsi_session_new failed", __func__); - cfiscsi_target_release(ct); - return; + if (cihp->socket == 0) { + mtx_lock(&cfiscsi_softc.lock); + TAILQ_FOREACH(cs, &cfiscsi_softc.sessions, cs_next) { + if (cs->cs_id == cihp->socket) + break; + } + if (cs == NULL) { + mtx_unlock(&cfiscsi_softc.lock); + snprintf(ci->error_str, sizeof(ci->error_str), + "connection not found"); + ci->status = CTL_ISCSI_ERROR; + cfiscsi_target_release(ct); + return; + } + mtx_unlock(&cfiscsi_softc.lock); + } else { +#endif + cs = cfiscsi_session_new(softc); + if (cs == NULL) { + ci->status = CTL_ISCSI_ERROR; + snprintf(ci->error_str, sizeof(ci->error_str), + "%s: cfiscsi_session_new failed", __func__); + cfiscsi_target_release(ct); + return; + } +#ifdef ICL_KERNEL_PROXY } #endif cs->cs_target = ct; @@ -1495,16 +1505,18 @@ cfiscsi_ioctl_handoff(struct ctl_iscsi * cihp->initiator_alias, sizeof(cs->cs_initiator_alias)); #ifdef ICL_KERNEL_PROXY - cs->cs_login_phase = false; -#else - error = icl_conn_handoff(cs->cs_conn, cihp->socket); - if (error != 0) { - cfiscsi_session_delete(cs); - ci->status = CTL_ISCSI_ERROR; - snprintf(ci->error_str, sizeof(ci->error_str), - "%s: icl_conn_handoff failed with error %d", - __func__, error); - return; + if (cihp->socket > 0) { +#endif + error = icl_conn_handoff(cs->cs_conn, cihp->socket); + if (error != 0) { + cfiscsi_session_delete(cs); + ci->status = CTL_ISCSI_ERROR; + snprintf(ci->error_str, sizeof(ci->error_str), + "%s: icl_conn_handoff failed with error %d", + __func__, error); + return; + } +#ifdef ICL_KERNEL_PROXY } #endif @@ -1514,6 +1526,8 @@ cfiscsi_ioctl_handoff(struct ctl_iscsi * cfiscsi_session_register_initiator(cs); #ifdef ICL_KERNEL_PROXY + cs->cs_login_phase = false; + /* * First PDU of the Full Feature phase has likely already arrived. * We have to pick it up and execute properly. @@ -1831,7 +1845,9 @@ cfiscsi_ioctl_send(struct ctl_iscsi *ci) icl_pdu_append_data(ip, data, datalen, M_WAITOK); free(data, M_CFISCSI); } + CFISCSI_SESSION_LOCK(cs); icl_pdu_queue(ip); + CFISCSI_SESSION_UNLOCK(cs); ci->status = CTL_ISCSI_OK; } Modified: stable/10/sys/cam/ctl/ctl_ioctl.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_ioctl.h Wed May 7 07:28:23 2014 (r265506) +++ stable/10/sys/cam/ctl/ctl_ioctl.h Wed May 7 07:29:39 2014 (r265507) @@ -640,15 +640,7 @@ struct ctl_iscsi_handoff_params { char initiator_addr[CTL_ISCSI_ADDR_LEN]; char initiator_alias[CTL_ISCSI_ALIAS_LEN]; char target_name[CTL_ISCSI_NAME_LEN]; -#ifdef ICL_KERNEL_PROXY - int connection_id; - /* - * XXX - */ int socket; -#else - int socket; -#endif int portal_group_tag; /* @@ -662,7 +654,12 @@ struct ctl_iscsi_handoff_params { uint32_t max_burst_length; uint32_t first_burst_length; uint32_t immediate_data; +#ifdef ICL_KERNEL_PROXY + int connection_id; + int spare[3]; +#else int spare[4]; +#endif }; struct ctl_iscsi_list_params { @@ -715,7 +712,7 @@ struct ctl_iscsi_send_params { void *spare2; size_t data_segment_len; void *data_segment; - int spare[4]; + int spare3[4]; }; struct ctl_iscsi_receive_params { @@ -725,7 +722,7 @@ struct ctl_iscsi_receive_params { void *spare2; size_t data_segment_len; void *data_segment; - int spare[4]; + int spare3[4]; }; struct ctl_iscsi_close_params { Modified: stable/10/usr.sbin/ctld/ctld.c ============================================================================== --- stable/10/usr.sbin/ctld/ctld.c Wed May 7 07:28:23 2014 (r265506) +++ stable/10/usr.sbin/ctld/ctld.c Wed May 7 07:29:39 2014 (r265507) @@ -48,6 +48,8 @@ #include "ctld.h" +bool proxy_mode = false; + static volatile bool sighup_received = false; static volatile bool sigterm_received = false; static volatile bool sigalrm_received = false; @@ -553,14 +555,6 @@ portal_group_add_listen(struct portal_gr const char *port; int error, colons = 0; -#ifndef ICL_KERNEL_PROXY - if (iser) { - log_warnx("ctld(8) compiled without ICL_KERNEL_PROXY " - "does not support iSER protocol"); - return (-1); - } -#endif - portal = portal_new(pg); portal->p_listen = checked_strdup(value); portal->p_iser = iser; @@ -1180,9 +1174,7 @@ conf_apply(struct conf *oldconf, struct struct portal *oldp, *newp; pid_t otherpid; int changed, cumulated_error = 0, error; -#ifndef ICL_KERNEL_PROXY int one = 1; -#endif if (oldconf->conf_debug != newconf->conf_debug) { log_debugx("changing debug level to %d", newconf->conf_debug); @@ -1415,10 +1407,14 @@ conf_apply(struct conf *oldconf, struct } #ifdef ICL_KERNEL_PROXY - log_debugx("listening on %s, portal-group \"%s\" using ICL proxy", - newp->p_listen, newpg->pg_name); - kernel_listen(newp->p_ai, newp->p_iser); -#else + if (proxy_mode) { + log_debugx("listening on %s, portal-group \"%s\" using ICL proxy", + newp->p_listen, newpg->pg_name); + kernel_listen(newp->p_ai, newp->p_iser); + continue; + } +#endif + assert(proxy_mode == false); assert(newp->p_iser == false); log_debugx("listening on %s, portal-group \"%s\"", @@ -1461,7 +1457,6 @@ conf_apply(struct conf *oldconf, struct cumulated_error++; continue; } -#endif /* !ICL_KERNEL_PROXY */ } } @@ -1579,11 +1574,9 @@ static void handle_connection(struct portal *portal, int fd, bool dont_fork) { struct connection *conn; -#ifndef ICL_KERNEL_PROXY struct sockaddr_storage ss; socklen_t sslen = sizeof(ss); int error; -#endif pid_t pid; char host[NI_MAXHOST + 1]; struct conf *conf; @@ -1619,20 +1612,25 @@ handle_connection(struct portal *portal, /* * XXX */ - log_set_peer_addr("XXX"); -#else - error = getpeername(fd, (struct sockaddr *)&ss, &sslen); - if (error != 0) - log_err(1, "getpeername"); - error = getnameinfo((struct sockaddr *)&ss, sslen, - host, sizeof(host), NULL, 0, NI_NUMERICHOST); - if (error != 0) - log_errx(1, "getaddrinfo: %s", gai_strerror(error)); - - log_debugx("accepted connection from %s; portal group \"%s\"", - host, portal->p_portal_group->pg_name); - log_set_peer_addr(host); - setproctitle("%s", host); + if (proxy_mode) { + log_set_peer_addr("XXX"); + } else { +#endif + assert(proxy_mode == false); + error = getpeername(fd, (struct sockaddr *)&ss, &sslen); + if (error != 0) + log_err(1, "getpeername"); + error = getnameinfo((struct sockaddr *)&ss, sslen, + host, sizeof(host), NULL, 0, NI_NUMERICHOST); + if (error != 0) + log_errx(1, "getaddrinfo: %s", gai_strerror(error)); + + log_debugx("accepted connection from %s; portal group \"%s\"", + host, portal->p_portal_group->pg_name); + log_set_peer_addr(host); + setproctitle("%s", host); +#ifdef ICL_KERNEL_PROXY + } #endif conn = connection_new(portal, fd, host); @@ -1650,7 +1648,6 @@ handle_connection(struct portal *portal, exit(0); } -#ifndef ICL_KERNEL_PROXY static int fd_add(int fd, fd_set *fdset, int nfds) { @@ -1666,7 +1663,6 @@ fd_add(int fd, fd_set *fdset, int nfds) nfds = fd; return (nfds); } -#endif static void main_loop(struct conf *conf, bool dont_fork) @@ -1675,10 +1671,9 @@ main_loop(struct conf *conf, bool dont_f struct portal *portal; #ifdef ICL_KERNEL_PROXY int connection_id; -#else +#endif fd_set fdset; int error, nfds, client_fd; -#endif pidfile_write(conf->conf_pidfh); @@ -1687,42 +1682,48 @@ main_loop(struct conf *conf, bool dont_f return; #ifdef ICL_KERNEL_PROXY - connection_id = kernel_accept(); - if (connection_id == 0) - continue; + if (proxy_mode) { + connection_id = kernel_accept(); + if (connection_id == 0) + continue; - /* - * XXX: This is obviously temporary. - */ - pg = TAILQ_FIRST(&conf->conf_portal_groups); - portal = TAILQ_FIRST(&pg->pg_portals); + /* + * XXX: This is obviously temporary. + */ + pg = TAILQ_FIRST(&conf->conf_portal_groups); + portal = TAILQ_FIRST(&pg->pg_portals); - handle_connection(portal, connection_id, dont_fork); -#else - FD_ZERO(&fdset); - nfds = 0; - TAILQ_FOREACH(pg, &conf->conf_portal_groups, pg_next) { - TAILQ_FOREACH(portal, &pg->pg_portals, p_next) - nfds = fd_add(portal->p_socket, &fdset, nfds); - } - error = select(nfds + 1, &fdset, NULL, NULL, NULL); - if (error <= 0) { - if (errno == EINTR) - return; - log_err(1, "select"); - } - TAILQ_FOREACH(pg, &conf->conf_portal_groups, pg_next) { - TAILQ_FOREACH(portal, &pg->pg_portals, p_next) { - if (!FD_ISSET(portal->p_socket, &fdset)) - continue; - client_fd = accept(portal->p_socket, NULL, 0); - if (client_fd < 0) - log_err(1, "accept"); - handle_connection(portal, client_fd, dont_fork); - break; + handle_connection(portal, connection_id, dont_fork); + } else { +#endif + assert(proxy_mode == false); + + FD_ZERO(&fdset); + nfds = 0; + TAILQ_FOREACH(pg, &conf->conf_portal_groups, pg_next) { + TAILQ_FOREACH(portal, &pg->pg_portals, p_next) + nfds = fd_add(portal->p_socket, &fdset, nfds); + } + error = select(nfds + 1, &fdset, NULL, NULL, NULL); + if (error <= 0) { + if (errno == EINTR) + return; + log_err(1, "select"); + } + TAILQ_FOREACH(pg, &conf->conf_portal_groups, pg_next) { + TAILQ_FOREACH(portal, &pg->pg_portals, p_next) { + if (!FD_ISSET(portal->p_socket, &fdset)) + continue; + client_fd = accept(portal->p_socket, NULL, 0); + if (client_fd < 0) + log_err(1, "accept"); + handle_connection(portal, client_fd, dont_fork); + break; + } } +#ifdef ICL_KERNEL_PROXY } -#endif /* !ICL_KERNEL_PROXY */ +#endif } } @@ -1788,7 +1789,7 @@ main(int argc, char **argv) int debug = 0, ch, error; bool dont_daemonize = false; - while ((ch = getopt(argc, argv, "df:")) != -1) { + while ((ch = getopt(argc, argv, "df:R")) != -1) { switch (ch) { case 'd': dont_daemonize = true; @@ -1797,6 +1798,13 @@ main(int argc, char **argv) case 'f': config_path = optarg; break; + case 'R': +#ifndef ICL_KERNEL_PROXY + log_errx(1, "ctld(8) compiled without ICL_KERNEL_PROXY " + "does not support iSER protocol"); +#endif + proxy_mode = true; + break; case '?': default: usage(); @@ -1818,12 +1826,10 @@ main(int argc, char **argv) newconf->conf_debug = debug; } -#ifdef ICL_KERNEL_PROXY log_debugx("enabling CTL iSCSI port"); error = kernel_port_on(); if (error != 0) log_errx(1, "failed to enable CTL iSCSI port, exiting"); -#endif error = conf_apply(oldconf, newconf); if (error != 0) @@ -1833,13 +1839,6 @@ main(int argc, char **argv) register_signals(); -#ifndef ICL_KERNEL_PROXY - log_debugx("enabling CTL iSCSI port"); - error = kernel_port_on(); - if (error != 0) - log_errx(1, "failed to enable CTL iSCSI port, exiting"); -#endif - if (dont_daemonize == false) { log_debugx("daemonizing"); if (daemon(0, 0) == -1) { Modified: stable/10/usr.sbin/ctld/kernel.c ============================================================================== --- stable/10/usr.sbin/ctld/kernel.c Wed May 7 07:28:23 2014 (r265506) +++ stable/10/usr.sbin/ctld/kernel.c Wed May 7 07:29:39 2014 (r265507) @@ -65,11 +65,13 @@ #include #include +#include "ctld.h" + #ifdef ICL_KERNEL_PROXY #include #endif -#include "ctld.h" +extern bool proxy_mode; static int ctl_fd = 0; @@ -599,7 +601,14 @@ kernel_handoff(struct connection *conn) } strlcpy(req.data.handoff.target_name, conn->conn_target->t_name, sizeof(req.data.handoff.target_name)); +#ifdef ICL_KERNEL_PROXY + if (proxy_mode) + req.data.handoff.connection_id = conn->conn_socket; + else + req.data.handoff.socket = conn->conn_socket; +#else req.data.handoff.socket = conn->conn_socket; +#endif req.data.handoff.portal_group_tag = conn->conn_portal->p_portal_group->pg_tag; if (conn->conn_header_digest == CONN_DIGEST_CRC32C) Modified: stable/10/usr.sbin/ctld/pdu.c ============================================================================== --- stable/10/usr.sbin/ctld/pdu.c Wed May 7 07:28:23 2014 (r265506) +++ stable/10/usr.sbin/ctld/pdu.c Wed May 7 07:29:39 2014 (r265507) @@ -44,6 +44,8 @@ #include #endif +extern bool proxy_mode; + static int pdu_ahs_length(const struct pdu *pdu) { @@ -101,11 +103,13 @@ pdu_new_response(struct pdu *request) #ifdef ICL_KERNEL_PROXY -void -pdu_receive(struct pdu *pdu) +static void +pdu_receive_proxy(struct pdu *pdu) { size_t len; + assert(proxy_mode); + kernel_receive(pdu); len = pdu_ahs_length(pdu); @@ -117,15 +121,17 @@ pdu_receive(struct pdu *pdu) pdu->pdu_data_len = len; } -void -pdu_send(struct pdu *pdu) +static void +pdu_send_proxy(struct pdu *pdu) { + assert(proxy_mode); + pdu_set_data_segment_length(pdu, pdu->pdu_data_len); kernel_send(pdu); } -#else /* !ICL_KERNEL_PROXY */ +#endif /* ICL_KERNEL_PROXY */ static size_t pdu_padding(const struct pdu *pdu) @@ -161,6 +167,13 @@ pdu_receive(struct pdu *pdu) size_t len, padding; char dummy[4]; +#ifdef ICL_KERNEL_PROXY + if (proxy_mode) + return (pdu_receive_proxy(pdu)); +#endif + + assert(proxy_mode == false); + pdu_read(pdu->pdu_connection->conn_socket, (char *)pdu->pdu_bhs, sizeof(*pdu->pdu_bhs)); @@ -202,6 +215,13 @@ pdu_send(struct pdu *pdu) struct iovec iov[3]; int iovcnt; +#ifdef ICL_KERNEL_PROXY + if (proxy_mode) + return (pdu_send_proxy(pdu)); +#endif + + assert(proxy_mode == false); + pdu_set_data_segment_length(pdu, pdu->pdu_data_len); iov[0].iov_base = pdu->pdu_bhs; iov[0].iov_len = sizeof(*pdu->pdu_bhs); @@ -234,8 +254,6 @@ pdu_send(struct pdu *pdu) log_errx(1, "short write"); } -#endif /* !ICL_KERNEL_PROXY */ - void pdu_delete(struct pdu *pdu) { From owner-svn-src-stable@FreeBSD.ORG Wed May 7 07:31:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 33E8351B; Wed, 7 May 2014 07:31:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 06E15FAF; Wed, 7 May 2014 07:31:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s477VPcs018531; Wed, 7 May 2014 07:31:25 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s477VP4k018525; Wed, 7 May 2014 07:31:25 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070731.s477VP4k018525@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 07:31:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265508 - in stable/10/sys: cam/ctl dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 07:31:26 -0000 Author: trasz Date: Wed May 7 07:31:25 2014 New Revision: 265508 URL: http://svnweb.freebsd.org/changeset/base/265508 Log: MFC r264525: Add some stuff to make it easier to figure out for the system administrator whether the ICL_KERNEL_PROXY stuff got compiled in correctly. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/sys/cam/ctl/ctl_ioctl.h stable/10/sys/dev/iscsi/iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed May 7 07:29:39 2014 (r265507) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed May 7 07:31:25 2014 (r265508) @@ -75,6 +75,10 @@ __FBSDID("$FreeBSD$"); #include #endif +#ifdef ICL_KERNEL_PROXY +FEATURE(cfiscsi_kernel_proxy, "iSCSI target built with ICL_KERNEL_PROXY"); +#endif + static MALLOC_DEFINE(M_CFISCSI, "cfiscsi", "Memory used for CTL iSCSI frontend"); static uma_zone_t cfiscsi_data_wait_zone; @@ -1960,7 +1964,18 @@ cfiscsi_ioctl(struct cdev *dev, case CTL_ISCSI_CLOSE: cfiscsi_ioctl_close(ci); break; -#endif /* ICL_KERNEL_PROXY */ +#else + case CTL_ISCSI_LISTEN: + case CTL_ISCSI_ACCEPT: + case CTL_ISCSI_SEND: + case CTL_ISCSI_RECEIVE: + case CTL_ISCSI_CLOSE: + ci->status = CTL_ISCSI_ERROR; + snprintf(ci->error_str, sizeof(ci->error_str), + "%s: CTL compiled without ICL_KERNEL_PROXY", + __func__); + break; +#endif /* !ICL_KERNEL_PROXY */ default: ci->status = CTL_ISCSI_ERROR; snprintf(ci->error_str, sizeof(ci->error_str), Modified: stable/10/sys/cam/ctl/ctl_ioctl.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_ioctl.h Wed May 7 07:29:39 2014 (r265507) +++ stable/10/sys/cam/ctl/ctl_ioctl.h Wed May 7 07:31:25 2014 (r265508) @@ -617,7 +617,11 @@ typedef enum { CTL_ISCSI_LIST, CTL_ISCSI_LOGOUT, CTL_ISCSI_TERMINATE, -#ifdef ICL_KERNEL_PROXY +#if defined(ICL_KERNEL_PROXY) || 1 + /* + * We actually need those in all cases, but leave the ICL_KERNEL_PROXY, + * to remember to remove them along with rest of proxy code, eventually. + */ CTL_ISCSI_LISTEN, CTL_ISCSI_ACCEPT, CTL_ISCSI_SEND, Modified: stable/10/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.c Wed May 7 07:29:39 2014 (r265507) +++ stable/10/sys/dev/iscsi/iscsi.c Wed May 7 07:31:25 2014 (r265508) @@ -65,6 +65,10 @@ #include #endif +#ifdef ICL_KERNEL_PROXY +FEATURE(iscsi_kernel_proxy, "iSCSI initiator built with ICL_KERNEL_PROXY"); +#endif + /* * XXX: This is global so the iscsi_unload() can access it. * Think about how to do this properly. From owner-svn-src-stable@FreeBSD.ORG Wed May 7 07:32:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A17F0649; Wed, 7 May 2014 07:32:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8269C73; Wed, 7 May 2014 07:32:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s477WlfH019631; Wed, 7 May 2014 07:32:47 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s477WjH0019619; Wed, 7 May 2014 07:32:45 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070732.s477WjH0019619@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 07:32:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265509 - in stable/10: sys/cam/ctl sys/dev/iscsi usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 07:32:47 -0000 Author: trasz Date: Wed May 7 07:32:45 2014 New Revision: 265509 URL: http://svnweb.freebsd.org/changeset/base/265509 Log: MFC r264526: Properly identify target portal when running in proxy mode. While here, remove CTL_ISCSI_CLOSE, it wasn't used or implemented anyway. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/sys/cam/ctl/ctl_frontend_iscsi.h stable/10/sys/cam/ctl/ctl_ioctl.h stable/10/sys/dev/iscsi/icl.h stable/10/sys/dev/iscsi/icl_proxy.c stable/10/usr.sbin/ctld/ctld.c stable/10/usr.sbin/ctld/ctld.h stable/10/usr.sbin/ctld/kernel.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed May 7 07:31:25 2014 (r265508) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed May 7 07:32:45 2014 (r265509) @@ -1350,7 +1350,7 @@ cfiscsi_module_event_handler(module_t mo #ifdef ICL_KERNEL_PROXY static void -cfiscsi_accept(struct socket *so) +cfiscsi_accept(struct socket *so, int portal_id) { struct cfiscsi_session *cs; @@ -1361,6 +1361,7 @@ cfiscsi_accept(struct socket *so) } icl_conn_handoff_sock(cs->cs_conn, so); + cs->cs_portal_id = portal_id; cs->cs_waiting_for_ctld = true; cv_signal(&cfiscsi_softc.accept_cv); } @@ -1739,7 +1740,7 @@ cfiscsi_ioctl_listen(struct ctl_iscsi *c } error = icl_listen_add(cfiscsi_softc.listener, cilp->iser, cilp->domain, - cilp->socktype, cilp->protocol, sa); + cilp->socktype, cilp->protocol, sa, cilp->portal_id); if (error != 0) { free(sa, M_SONAME); CFISCSI_DEBUG("icl_listen_add, error %d", error); @@ -1783,6 +1784,7 @@ cfiscsi_ioctl_accept(struct ctl_iscsi *c cs->cs_login_phase = true; ciap->connection_id = cs->cs_id; + ciap->portal_id = cs->cs_portal_id; ci->status = CTL_ISCSI_OK; } @@ -1916,13 +1918,6 @@ cfiscsi_ioctl_receive(struct ctl_iscsi * ci->status = CTL_ISCSI_OK; } -static void -cfiscsi_ioctl_close(struct ctl_iscsi *ci) -{ - /* - * XXX - */ -} #endif /* !ICL_KERNEL_PROXY */ static int @@ -1961,15 +1956,11 @@ cfiscsi_ioctl(struct cdev *dev, case CTL_ISCSI_RECEIVE: cfiscsi_ioctl_receive(ci); break; - case CTL_ISCSI_CLOSE: - cfiscsi_ioctl_close(ci); - break; #else case CTL_ISCSI_LISTEN: case CTL_ISCSI_ACCEPT: case CTL_ISCSI_SEND: case CTL_ISCSI_RECEIVE: - case CTL_ISCSI_CLOSE: ci->status = CTL_ISCSI_ERROR; snprintf(ci->error_str, sizeof(ci->error_str), "%s: CTL compiled without ICL_KERNEL_PROXY", Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.h Wed May 7 07:31:25 2014 (r265508) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.h Wed May 7 07:32:45 2014 (r265509) @@ -82,6 +82,7 @@ struct cfiscsi_session { unsigned int cs_id; int cs_ctl_initid; #ifdef ICL_KERNEL_PROXY + int cs_portal_id; bool cs_login_phase; bool cs_waiting_for_ctld; struct cv cs_login_cv; Modified: stable/10/sys/cam/ctl/ctl_ioctl.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_ioctl.h Wed May 7 07:31:25 2014 (r265508) +++ stable/10/sys/cam/ctl/ctl_ioctl.h Wed May 7 07:32:45 2014 (r265509) @@ -626,7 +626,6 @@ typedef enum { CTL_ISCSI_ACCEPT, CTL_ISCSI_SEND, CTL_ISCSI_RECEIVE, - CTL_ISCSI_CLOSE, #endif } ctl_iscsi_type; @@ -701,11 +700,14 @@ struct ctl_iscsi_listen_params { int protocol; struct sockaddr *addr; socklen_t addrlen; + int portal_id; int spare[4]; }; struct ctl_iscsi_accept_params { int connection_id; + struct sockaddr *initiator_addr; + int portal_id; int spare[4]; }; @@ -729,10 +731,6 @@ struct ctl_iscsi_receive_params { int spare3[4]; }; -struct ctl_iscsi_close_params { - int connection_id; - int spare[4]; -}; #endif /* ICL_KERNEL_PROXY */ union ctl_iscsi_data { @@ -745,7 +743,6 @@ union ctl_iscsi_data { struct ctl_iscsi_accept_params accept; struct ctl_iscsi_send_params send; struct ctl_iscsi_receive_params receive; - struct ctl_iscsi_close_params close; #endif }; Modified: stable/10/sys/dev/iscsi/icl.h ============================================================================== --- stable/10/sys/dev/iscsi/icl.h Wed May 7 07:31:25 2014 (r265508) +++ stable/10/sys/dev/iscsi/icl.h Wed May 7 07:32:45 2014 (r265509) @@ -118,16 +118,17 @@ struct icl_listen; struct icl_listen_sock { TAILQ_ENTRY(icl_listen_sock) ils_next; - struct icl_listen *ils_listen; - struct socket *ils_socket; - bool ils_running; - bool ils_disconnecting; + struct icl_listen *ils_listen; + struct socket *ils_socket; + bool ils_running; + bool ils_disconnecting; + int ils_id; }; struct icl_listen { TAILQ_HEAD(, icl_listen_sock) il_sockets; struct sx il_lock; - void (*il_accept)(struct socket *); + void (*il_accept)(struct socket *, int); }; /* @@ -139,10 +140,11 @@ int icl_conn_connect(struct icl_conn * /* * Target part. */ -struct icl_listen *icl_listen_new(void (*accept_cb)(struct socket *)); +struct icl_listen *icl_listen_new(void (*accept_cb)(struct socket *, int)); void icl_listen_free(struct icl_listen *il); -int icl_listen_add(struct icl_listen *il, bool rdma, int domain, - int socktype, int protocol, struct sockaddr *sa); +int icl_listen_add(struct icl_listen *il, bool rdma, + int domain, int socktype, int protocol, + struct sockaddr *sa, int portal_id); int icl_listen_remove(struct icl_listen *il, struct sockaddr *sa); /* Modified: stable/10/sys/dev/iscsi/icl_proxy.c ============================================================================== --- stable/10/sys/dev/iscsi/icl_proxy.c Wed May 7 07:31:25 2014 (r265508) +++ stable/10/sys/dev/iscsi/icl_proxy.c Wed May 7 07:32:45 2014 (r265509) @@ -182,7 +182,7 @@ icl_conn_connect(struct icl_conn *ic, bo } struct icl_listen * -icl_listen_new(void (*accept_cb)(struct socket *)) +icl_listen_new(void (*accept_cb)(struct socket *, int)) { struct icl_listen *il; @@ -298,13 +298,13 @@ icl_accept_thread(void *arg) soclose(so); } - (ils->ils_listen->il_accept)(so); + (ils->ils_listen->il_accept)(so, ils->ils_id); } } static int -icl_listen_add_tcp(struct icl_listen *il, int domain, int socktype, int protocol, - struct sockaddr *sa) +icl_listen_add_tcp(struct icl_listen *il, int domain, int socktype, + int protocol, struct sockaddr *sa, int portal_id) { struct icl_listen_sock *ils; struct socket *so; @@ -348,6 +348,7 @@ icl_listen_add_tcp(struct icl_listen *il ils = malloc(sizeof(*ils), M_ICL_PROXY, M_ZERO | M_WAITOK); ils->ils_listen = il; ils->ils_socket = so; + ils->ils_id = portal_id; error = kthread_add(icl_accept_thread, ils, NULL, NULL, 0, 0, "iclacc"); if (error != 0) { @@ -366,8 +367,8 @@ icl_listen_add_tcp(struct icl_listen *il } int -icl_listen_add(struct icl_listen *il, bool rdma, int domain, int socktype, int protocol, - struct sockaddr *sa) +icl_listen_add(struct icl_listen *il, bool rdma, int domain, int socktype, + int protocol, struct sockaddr *sa, int portal_id) { if (rdma) { @@ -375,12 +376,14 @@ icl_listen_add(struct icl_listen *il, bo ICL_DEBUG("RDMA not supported"); return (EOPNOTSUPP); #else - return (icl_listen_add_rdma(il, domain, socktype, protocol, sa)); + return (icl_listen_add_rdma(il, domain, socktype, protocol, + sa, portal_id)); #endif } - return (icl_listen_add_tcp(il, domain, socktype, protocol, sa)); + return (icl_listen_add_tcp(il, domain, socktype, protocol, sa, + portal_id)); } int Modified: stable/10/usr.sbin/ctld/ctld.c ============================================================================== --- stable/10/usr.sbin/ctld/ctld.c Wed May 7 07:31:25 2014 (r265508) +++ stable/10/usr.sbin/ctld/ctld.c Wed May 7 07:32:45 2014 (r265509) @@ -1408,9 +1408,13 @@ conf_apply(struct conf *oldconf, struct #ifdef ICL_KERNEL_PROXY if (proxy_mode) { - log_debugx("listening on %s, portal-group \"%s\" using ICL proxy", - newp->p_listen, newpg->pg_name); - kernel_listen(newp->p_ai, newp->p_iser); + newpg->pg_conf->conf_portal_id++; + newp->p_id = newpg->pg_conf->conf_portal_id; + log_debugx("listening on %s, portal-group " + "\"%s\", portal id %d, using ICL proxy", + newp->p_listen, newpg->pg_name, newp->p_id); + kernel_listen(newp->p_ai, newp->p_iser, + newp->p_id); continue; } #endif @@ -1671,6 +1675,7 @@ main_loop(struct conf *conf, bool dont_f struct portal *portal; #ifdef ICL_KERNEL_PROXY int connection_id; + int portal_id; #endif fd_set fdset; int error, nfds, client_fd; @@ -1683,16 +1688,22 @@ main_loop(struct conf *conf, bool dont_f #ifdef ICL_KERNEL_PROXY if (proxy_mode) { - connection_id = kernel_accept(); - if (connection_id == 0) - continue; + kernel_accept(&connection_id, &portal_id); + + log_debugx("incoming connection, id %d, portal id %d", + connection_id, portal_id); + TAILQ_FOREACH(pg, &conf->conf_portal_groups, pg_next) { + TAILQ_FOREACH(portal, &pg->pg_portals, p_next) { + if (portal->p_id == portal_id) { + goto found; + } + } + } - /* - * XXX: This is obviously temporary. - */ - pg = TAILQ_FIRST(&conf->conf_portal_groups); - portal = TAILQ_FIRST(&pg->pg_portals); + log_errx(1, "kernel returned invalid portal_id %d", + portal_id); +found: handle_connection(portal, connection_id, dont_fork); } else { #endif Modified: stable/10/usr.sbin/ctld/ctld.h ============================================================================== --- stable/10/usr.sbin/ctld/ctld.h Wed May 7 07:31:25 2014 (r265508) +++ stable/10/usr.sbin/ctld/ctld.h Wed May 7 07:32:45 2014 (r265509) @@ -88,6 +88,9 @@ struct portal { bool p_iser; char *p_listen; struct addrinfo *p_ai; +#ifdef ICL_KERNEL_PROXY + int p_id; +#endif TAILQ_HEAD(, target) p_targets; int p_socket; @@ -146,6 +149,9 @@ struct conf { int conf_maxproc; uint16_t conf_last_portal_group_tag; +#ifdef ICL_KERNEL_PROXY + int conf_portal_id; +#endif struct pidfh *conf_pidfh; bool conf_default_pg_defined; @@ -265,8 +271,9 @@ void kernel_capsicate(void); /* * ICL_KERNEL_PROXY */ -void kernel_listen(struct addrinfo *ai, bool iser); -int kernel_accept(void); +void kernel_listen(struct addrinfo *ai, bool iser, + int portal_id); +void kernel_accept(int *connection_id, int *portal_id); void kernel_send(struct pdu *pdu); void kernel_receive(struct pdu *pdu); Modified: stable/10/usr.sbin/ctld/kernel.c ============================================================================== --- stable/10/usr.sbin/ctld/kernel.c Wed May 7 07:31:25 2014 (r265508) +++ stable/10/usr.sbin/ctld/kernel.c Wed May 7 07:32:45 2014 (r265509) @@ -622,13 +622,15 @@ kernel_handoff(struct connection *conn) req.data.handoff.max_burst_length = conn->conn_max_burst_length; req.data.handoff.immediate_data = conn->conn_immediate_data; - if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) + if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) { log_err(1, "error issuing CTL_ISCSI ioctl; " "dropping connection"); + } - if (req.status != CTL_ISCSI_OK) + if (req.status != CTL_ISCSI_OK) { log_errx(1, "error returned from CTL iSCSI handoff request: " "%s; dropping connection", req.error_str); + } } int @@ -673,7 +675,7 @@ kernel_port_off(void) #ifdef ICL_KERNEL_PROXY void -kernel_listen(struct addrinfo *ai, bool iser) +kernel_listen(struct addrinfo *ai, bool iser, int portal_id) { struct ctl_iscsi req; @@ -686,11 +688,10 @@ kernel_listen(struct addrinfo *ai, bool req.data.listen.protocol = ai->ai_protocol; req.data.listen.addr = ai->ai_addr; req.data.listen.addrlen = ai->ai_addrlen; + req.data.listen.portal_id = portal_id; - if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) { + if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) log_err(1, "error issuing CTL_ISCSI ioctl"); - return; - } if (req.status != CTL_ISCSI_OK) { log_errx(1, "error returned from CTL iSCSI listen: %s", @@ -698,8 +699,8 @@ kernel_listen(struct addrinfo *ai, bool } } -int -kernel_accept(void) +void +kernel_accept(int *connection_id, int *portal_id) { struct ctl_iscsi req; @@ -707,18 +708,16 @@ kernel_accept(void) req.type = CTL_ISCSI_ACCEPT; - if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) { - log_warn("error issuing CTL_ISCSI ioctl"); - return (0); - } + if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) + log_err(1, "error issuing CTL_ISCSI ioctl"); if (req.status != CTL_ISCSI_OK) { - log_warnx("error returned from CTL iSCSI accept: %s", + log_errx(1, "error returned from CTL iSCSI accept: %s", req.error_str); - return (0); } - return (req.data.accept.connection_id); + *connection_id = req.data.accept.connection_id; + *portal_id = req.data.accept.portal_id; } void From owner-svn-src-stable@FreeBSD.ORG Wed May 7 07:33:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60B6D792; Wed, 7 May 2014 07:33:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3411481; Wed, 7 May 2014 07:33:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s477XvLB019868; Wed, 7 May 2014 07:33:57 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s477Xv7l019867; Wed, 7 May 2014 07:33:57 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070733.s477Xv7l019867@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 07:33:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265510 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 07:33:57 -0000 Author: trasz Date: Wed May 7 07:33:56 2014 New Revision: 265510 URL: http://svnweb.freebsd.org/changeset/base/265510 Log: MFC r264527: Make it possible to interrupt login when running in proxy mode. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed May 7 07:32:45 2014 (r265509) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed May 7 07:33:56 2014 (r265510) @@ -1130,6 +1130,9 @@ cfiscsi_session_terminate(struct cfiscsi return; cs->cs_terminating = 1; cv_signal(&cs->cs_maintenance_cv); +#ifdef ICL_KERNEL_PROXY + cv_signal(&cs->cs_login_cv); +#endif } static int @@ -1864,6 +1867,7 @@ cfiscsi_ioctl_receive(struct ctl_iscsi * struct cfiscsi_session *cs; struct icl_pdu *ip; void *data; + int error; cirp = (struct ctl_iscsi_receive_params *)&(ci->data); @@ -1874,7 +1878,8 @@ cfiscsi_ioctl_receive(struct ctl_iscsi * } if (cs == NULL) { mtx_unlock(&cfiscsi_softc.lock); - snprintf(ci->error_str, sizeof(ci->error_str), "connection not found"); + snprintf(ci->error_str, sizeof(ci->error_str), + "connection not found"); ci->status = CTL_ISCSI_ERROR; return; } @@ -1886,12 +1891,21 @@ cfiscsi_ioctl_receive(struct ctl_iscsi * #endif CFISCSI_SESSION_LOCK(cs); - while (cs->cs_login_pdu == NULL && - cs->cs_terminating == false) - cv_wait(&cs->cs_login_cv, &cs->cs_lock); + while (cs->cs_login_pdu == NULL && cs->cs_terminating == false) { + error = cv_wait_sig(&cs->cs_login_cv, &cs->cs_lock); + if (error != 0) { + CFISCSI_SESSION_UNLOCK(cs); + snprintf(ci->error_str, sizeof(ci->error_str), + "interrupted by signal"); + ci->status = CTL_ISCSI_ERROR; + return; + } + } + if (cs->cs_terminating) { CFISCSI_SESSION_UNLOCK(cs); - snprintf(ci->error_str, sizeof(ci->error_str), "connection terminating"); + snprintf(ci->error_str, sizeof(ci->error_str), + "connection terminating"); ci->status = CTL_ISCSI_ERROR; return; } @@ -1901,7 +1915,8 @@ cfiscsi_ioctl_receive(struct ctl_iscsi * if (ip->ip_data_len > cirp->data_segment_len) { icl_pdu_free(ip); - snprintf(ci->error_str, sizeof(ci->error_str), "data segment too big"); + snprintf(ci->error_str, sizeof(ci->error_str), + "data segment too big"); ci->status = CTL_ISCSI_ERROR; return; } From owner-svn-src-stable@FreeBSD.ORG Wed May 7 07:35:22 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1F204919; Wed, 7 May 2014 07:35:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 000A79C; Wed, 7 May 2014 07:35:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s477ZL7d020161; Wed, 7 May 2014 07:35:21 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s477ZLus020157; Wed, 7 May 2014 07:35:21 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070735.s477ZLus020157@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 07:35:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265511 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 07:35:22 -0000 Author: trasz Date: Wed May 7 07:35:21 2014 New Revision: 265511 URL: http://svnweb.freebsd.org/changeset/base/265511 Log: MFC r264528: Rework the way we enable CTL iSCSI port. Previously conf_apply() needed it to be already enabled, because listening in proxy mode requires it; however, it's conf_apply() that opens pidfiles, so it resulted in port being enabled before pidfile was opened. This was not so bad, but it was also disabled when pidfile couldn't be opened due to ctld already running; this means that starting second ctld instance screwed up the first. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/ctld/ctld.c stable/10/usr.sbin/ctld/ctld.h stable/10/usr.sbin/ctld/parse.y Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/ctld.c ============================================================================== --- stable/10/usr.sbin/ctld/ctld.c Wed May 7 07:33:56 2014 (r265510) +++ stable/10/usr.sbin/ctld/ctld.c Wed May 7 07:35:21 2014 (r265511) @@ -1209,6 +1209,19 @@ conf_apply(struct conf *oldconf, struct } } + if (oldconf->conf_kernel_port_on != newconf->conf_kernel_port_on) { + if (newconf->conf_kernel_port_on == true) { + log_debugx("enabling CTL iSCSI port"); + error = kernel_port_on(); + if (error != 0) + log_errx(1, "failed to enable CTL iSCSI port, exiting"); + } else { + error = kernel_port_off(); + if (error != 0) + log_warnx("failed to disable CTL iSCSI port"); + } + } + TAILQ_FOREACH_SAFE(oldtarg, &oldconf->conf_targets, t_next, tmptarg) { /* * First, remove any targets present in the old configuration @@ -1837,11 +1850,6 @@ main(int argc, char **argv) newconf->conf_debug = debug; } - log_debugx("enabling CTL iSCSI port"); - error = kernel_port_on(); - if (error != 0) - log_errx(1, "failed to enable CTL iSCSI port, exiting"); - error = conf_apply(oldconf, newconf); if (error != 0) log_errx(1, "failed to apply configuration, exiting"); @@ -1886,9 +1894,6 @@ main(int argc, char **argv) log_debugx("disabling CTL iSCSI port " "and terminating all connections"); - error = kernel_port_off(); - if (error != 0) - log_warnx("failed to disable CTL iSCSI port"); oldconf = newconf; newconf = conf_new(); Modified: stable/10/usr.sbin/ctld/ctld.h ============================================================================== --- stable/10/usr.sbin/ctld/ctld.h Wed May 7 07:33:56 2014 (r265510) +++ stable/10/usr.sbin/ctld/ctld.h Wed May 7 07:35:21 2014 (r265511) @@ -156,6 +156,7 @@ struct conf { bool conf_default_pg_defined; bool conf_default_ag_defined; + bool conf_kernel_port_on; }; #define CONN_SESSION_TYPE_NONE 0 Modified: stable/10/usr.sbin/ctld/parse.y ============================================================================== --- stable/10/usr.sbin/ctld/parse.y Wed May 7 07:33:56 2014 (r265510) +++ stable/10/usr.sbin/ctld/parse.y Wed May 7 07:35:21 2014 (r265511) @@ -773,6 +773,8 @@ conf_new_from_file(const char *path) portal_group_add_listen(pg, "[::]:3260", false); } + conf->conf_kernel_port_on = true; + error = conf_verify(conf); if (error != 0) { conf_delete(conf); From owner-svn-src-stable@FreeBSD.ORG Wed May 7 07:36:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48B20A60; Wed, 7 May 2014 07:36:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1AD55BC; Wed, 7 May 2014 07:36:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s477akPi020391; Wed, 7 May 2014 07:36:46 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s477akLA020390; Wed, 7 May 2014 07:36:46 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070736.s477akLA020390@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 07:36:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265512 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 07:36:47 -0000 Author: trasz Date: Wed May 7 07:36:46 2014 New Revision: 265512 URL: http://svnweb.freebsd.org/changeset/base/265512 Log: MFC r264529: Use socket address from accept(2) instead of retrieving it via getpeername(2). Sponsored by: The FreeBSD Foundation 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 Wed May 7 07:35:21 2014 (r265511) +++ stable/10/usr.sbin/ctld/ctld.c Wed May 7 07:36:46 2014 (r265512) @@ -1588,11 +1588,10 @@ wait_for_children(bool block) } static void -handle_connection(struct portal *portal, int fd, bool dont_fork) +handle_connection(struct portal *portal, int fd, const struct sockaddr_storage *ss, + socklen_t sslen, bool dont_fork) { struct connection *conn; - struct sockaddr_storage ss; - socklen_t sslen = sizeof(ss); int error; pid_t pid; char host[NI_MAXHOST + 1]; @@ -1634,13 +1633,10 @@ handle_connection(struct portal *portal, } else { #endif assert(proxy_mode == false); - error = getpeername(fd, (struct sockaddr *)&ss, &sslen); - if (error != 0) - log_err(1, "getpeername"); - error = getnameinfo((struct sockaddr *)&ss, sslen, + error = getnameinfo((struct sockaddr *)ss, sslen, host, sizeof(host), NULL, 0, NI_NUMERICHOST); if (error != 0) - log_errx(1, "getaddrinfo: %s", gai_strerror(error)); + log_errx(1, "getnameinfo: %s", gai_strerror(error)); log_debugx("accepted connection from %s; portal group \"%s\"", host, portal->p_portal_group->pg_name); @@ -1686,6 +1682,8 @@ main_loop(struct conf *conf, bool dont_f { struct portal_group *pg; struct portal *portal; + struct sockaddr_storage client_sa; + socklen_t client_salen; #ifdef ICL_KERNEL_PROXY int connection_id; int portal_id; @@ -1717,7 +1715,7 @@ main_loop(struct conf *conf, bool dont_f portal_id); found: - handle_connection(portal, connection_id, dont_fork); + handle_connection(portal, connection_id, NULL, 0, dont_fork); } else { #endif assert(proxy_mode == false); @@ -1738,10 +1736,14 @@ found: TAILQ_FOREACH(portal, &pg->pg_portals, p_next) { if (!FD_ISSET(portal->p_socket, &fdset)) continue; - client_fd = accept(portal->p_socket, NULL, 0); + client_salen = sizeof(client_sa); + client_fd = accept(portal->p_socket, + (struct sockaddr *)&client_sa, + &client_salen); if (client_fd < 0) log_err(1, "accept"); - handle_connection(portal, client_fd, dont_fork); + handle_connection(portal, client_fd, + &client_sa, client_salen, dont_fork); break; } } From owner-svn-src-stable@FreeBSD.ORG Wed May 7 07:37:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 33551C00; Wed, 7 May 2014 07:37:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1EC82100; Wed, 7 May 2014 07:37:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s477buQC020581; Wed, 7 May 2014 07:37:56 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s477btWE020569; Wed, 7 May 2014 07:37:55 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070737.s477btWE020569@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 07:37:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265513 - in stable/10: sys/cam/ctl sys/dev/iscsi usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 07:37:57 -0000 Author: trasz Date: Wed May 7 07:37:55 2014 New Revision: 265513 URL: http://svnweb.freebsd.org/changeset/base/265513 Log: MFC r264530: Properly pass the initiator address when running in proxy mode. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/sys/cam/ctl/ctl_frontend_iscsi.h stable/10/sys/cam/ctl/ctl_ioctl.h stable/10/sys/dev/iscsi/icl.h stable/10/sys/dev/iscsi/icl_proxy.c stable/10/usr.sbin/ctld/ctld.c stable/10/usr.sbin/ctld/ctld.h stable/10/usr.sbin/ctld/kernel.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed May 7 07:36:46 2014 (r265512) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed May 7 07:37:55 2014 (r265513) @@ -1353,7 +1353,7 @@ cfiscsi_module_event_handler(module_t mo #ifdef ICL_KERNEL_PROXY static void -cfiscsi_accept(struct socket *so, int portal_id) +cfiscsi_accept(struct socket *so, struct sockaddr *sa, int portal_id) { struct cfiscsi_session *cs; @@ -1364,6 +1364,7 @@ cfiscsi_accept(struct socket *so, int po } icl_conn_handoff_sock(cs->cs_conn, so); + cs->cs_initiator_sa = sa; cs->cs_portal_id = portal_id; cs->cs_waiting_for_ctld = true; cv_signal(&cfiscsi_softc.accept_cv); @@ -1788,6 +1789,16 @@ cfiscsi_ioctl_accept(struct ctl_iscsi *c ciap->connection_id = cs->cs_id; ciap->portal_id = cs->cs_portal_id; + ciap->initiator_addrlen = cs->cs_initiator_sa->sa_len; + error = copyout(cs->cs_initiator_sa, ciap->initiator_addr, + cs->cs_initiator_sa->sa_len); + if (error != 0) { + snprintf(ci->error_str, sizeof(ci->error_str), + "copyout failed with error %d", error); + ci->status = CTL_ISCSI_ERROR; + return; + } + ci->status = CTL_ISCSI_OK; } Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.h Wed May 7 07:36:46 2014 (r265512) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.h Wed May 7 07:37:55 2014 (r265513) @@ -82,6 +82,7 @@ struct cfiscsi_session { unsigned int cs_id; int cs_ctl_initid; #ifdef ICL_KERNEL_PROXY + struct sockaddr *cs_initiator_sa; int cs_portal_id; bool cs_login_phase; bool cs_waiting_for_ctld; Modified: stable/10/sys/cam/ctl/ctl_ioctl.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_ioctl.h Wed May 7 07:36:46 2014 (r265512) +++ stable/10/sys/cam/ctl/ctl_ioctl.h Wed May 7 07:37:55 2014 (r265513) @@ -706,8 +706,9 @@ struct ctl_iscsi_listen_params { struct ctl_iscsi_accept_params { int connection_id; - struct sockaddr *initiator_addr; int portal_id; + struct sockaddr *initiator_addr; + socklen_t initiator_addrlen; int spare[4]; }; Modified: stable/10/sys/dev/iscsi/icl.h ============================================================================== --- stable/10/sys/dev/iscsi/icl.h Wed May 7 07:36:46 2014 (r265512) +++ stable/10/sys/dev/iscsi/icl.h Wed May 7 07:37:55 2014 (r265513) @@ -128,7 +128,8 @@ struct icl_listen_sock { struct icl_listen { TAILQ_HEAD(, icl_listen_sock) il_sockets; struct sx il_lock; - void (*il_accept)(struct socket *, int); + void (*il_accept)(struct socket *, + struct sockaddr *, int); }; /* @@ -140,7 +141,8 @@ int icl_conn_connect(struct icl_conn * /* * Target part. */ -struct icl_listen *icl_listen_new(void (*accept_cb)(struct socket *, int)); +struct icl_listen *icl_listen_new(void (*accept_cb)(struct socket *, + struct sockaddr *, int)); void icl_listen_free(struct icl_listen *il); int icl_listen_add(struct icl_listen *il, bool rdma, int domain, int socktype, int protocol, Modified: stable/10/sys/dev/iscsi/icl_proxy.c ============================================================================== --- stable/10/sys/dev/iscsi/icl_proxy.c Wed May 7 07:36:46 2014 (r265512) +++ stable/10/sys/dev/iscsi/icl_proxy.c Wed May 7 07:37:55 2014 (r265513) @@ -182,7 +182,7 @@ icl_conn_connect(struct icl_conn *ic, bo } struct icl_listen * -icl_listen_new(void (*accept_cb)(struct socket *, int)) +icl_listen_new(void (*accept_cb)(struct socket *, struct sockaddr *, int)) { struct icl_listen *il; @@ -296,9 +296,10 @@ icl_accept_thread(void *arg) if (sa != NULL) free(sa, M_SONAME); soclose(so); + continue; } - (ils->ils_listen->il_accept)(so, ils->ils_id); + (ils->ils_listen->il_accept)(so, sa, ils->ils_id); } } Modified: stable/10/usr.sbin/ctld/ctld.c ============================================================================== --- stable/10/usr.sbin/ctld/ctld.c Wed May 7 07:36:46 2014 (r265512) +++ stable/10/usr.sbin/ctld/ctld.c Wed May 7 07:37:55 2014 (r265513) @@ -1588,8 +1588,8 @@ wait_for_children(bool block) } static void -handle_connection(struct portal *portal, int fd, const struct sockaddr_storage *ss, - socklen_t sslen, bool dont_fork) +handle_connection(struct portal *portal, int fd, + const struct sockaddr *client_sa, socklen_t client_salen, bool dont_fork) { struct connection *conn; int error; @@ -1624,27 +1624,15 @@ handle_connection(struct portal *portal, } pidfile_close(conf->conf_pidfh); -#ifdef ICL_KERNEL_PROXY - /* - * XXX - */ - if (proxy_mode) { - log_set_peer_addr("XXX"); - } else { -#endif - assert(proxy_mode == false); - error = getnameinfo((struct sockaddr *)ss, sslen, - host, sizeof(host), NULL, 0, NI_NUMERICHOST); - if (error != 0) - log_errx(1, "getnameinfo: %s", gai_strerror(error)); - - log_debugx("accepted connection from %s; portal group \"%s\"", - host, portal->p_portal_group->pg_name); - log_set_peer_addr(host); - setproctitle("%s", host); -#ifdef ICL_KERNEL_PROXY - } -#endif + error = getnameinfo(client_sa, client_salen, + host, sizeof(host), NULL, 0, NI_NUMERICHOST); + if (error != 0) + log_errx(1, "getnameinfo: %s", gai_strerror(error)); + + log_debugx("accepted connection from %s; portal group \"%s\"", + host, portal->p_portal_group->pg_name); + log_set_peer_addr(host); + setproctitle("%s", host); conn = connection_new(portal, fd, host); set_timeout(conf); @@ -1699,7 +1687,9 @@ main_loop(struct conf *conf, bool dont_f #ifdef ICL_KERNEL_PROXY if (proxy_mode) { - kernel_accept(&connection_id, &portal_id); + client_salen = sizeof(client_sa); + kernel_accept(&connection_id, &portal_id, + (struct sockaddr *)&client_sa, &client_salen); log_debugx("incoming connection, id %d, portal id %d", connection_id, portal_id); @@ -1715,7 +1705,9 @@ main_loop(struct conf *conf, bool dont_f portal_id); found: - handle_connection(portal, connection_id, NULL, 0, dont_fork); + handle_connection(portal, connection_id, + (struct sockaddr *)&client_sa, client_salen, + dont_fork); } else { #endif assert(proxy_mode == false); @@ -1743,7 +1735,8 @@ found: if (client_fd < 0) log_err(1, "accept"); handle_connection(portal, client_fd, - &client_sa, client_salen, dont_fork); + (struct sockaddr *)&client_sa, + client_salen, dont_fork); break; } } Modified: stable/10/usr.sbin/ctld/ctld.h ============================================================================== --- stable/10/usr.sbin/ctld/ctld.h Wed May 7 07:36:46 2014 (r265512) +++ stable/10/usr.sbin/ctld/ctld.h Wed May 7 07:37:55 2014 (r265513) @@ -33,6 +33,10 @@ #define CTLD_H #include +#ifdef ICL_KERNEL_PROXY +#include +#include +#endif #include #include @@ -269,14 +273,15 @@ int kernel_port_on(void); int kernel_port_off(void); void kernel_capsicate(void); -/* - * ICL_KERNEL_PROXY - */ +#ifdef ICL_KERNEL_PROXY void kernel_listen(struct addrinfo *ai, bool iser, int portal_id); -void kernel_accept(int *connection_id, int *portal_id); +void kernel_accept(int *connection_id, int *portal_id, + struct sockaddr *client_sa, + socklen_t *client_salen); void kernel_send(struct pdu *pdu); void kernel_receive(struct pdu *pdu); +#endif struct keys *keys_new(void); void keys_delete(struct keys *keys); Modified: stable/10/usr.sbin/ctld/kernel.c ============================================================================== --- stable/10/usr.sbin/ctld/kernel.c Wed May 7 07:36:46 2014 (r265512) +++ stable/10/usr.sbin/ctld/kernel.c Wed May 7 07:37:55 2014 (r265513) @@ -700,13 +700,16 @@ kernel_listen(struct addrinfo *ai, bool } void -kernel_accept(int *connection_id, int *portal_id) +kernel_accept(int *connection_id, int *portal_id, + struct sockaddr *client_sa, socklen_t *client_salen) { struct ctl_iscsi req; + struct sockaddr_storage ss; bzero(&req, sizeof(req)); req.type = CTL_ISCSI_ACCEPT; + req.data.accept.initiator_addr = (struct sockaddr *)&ss; if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) log_err(1, "error issuing CTL_ISCSI ioctl"); @@ -718,6 +721,8 @@ kernel_accept(int *connection_id, int *p *connection_id = req.data.accept.connection_id; *portal_id = req.data.accept.portal_id; + *client_salen = req.data.accept.initiator_addrlen; + memcpy(client_sa, &ss, *client_salen); } void From owner-svn-src-stable@FreeBSD.ORG Wed May 7 07:39:17 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0A76D50; Wed, 7 May 2014 07:39:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D3EF115; Wed, 7 May 2014 07:39:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s477dH53020924; Wed, 7 May 2014 07:39:17 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s477dHYW020920; Wed, 7 May 2014 07:39:17 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070739.s477dHYW020920@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 07:39:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265514 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 07:39:17 -0000 Author: trasz Date: Wed May 7 07:39:16 2014 New Revision: 265514 URL: http://svnweb.freebsd.org/changeset/base/265514 Log: MFC r264531: Constify. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/ctld/ctld.c stable/10/usr.sbin/ctld/ctld.h Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/ctld.c ============================================================================== --- stable/10/usr.sbin/ctld/ctld.c Wed May 7 07:37:55 2014 (r265513) +++ stable/10/usr.sbin/ctld/ctld.c Wed May 7 07:39:16 2014 (r265514) @@ -139,7 +139,7 @@ auth_delete(struct auth *auth) } const struct auth * -auth_find(struct auth_group *ag, const char *user) +auth_find(const struct auth_group *ag, const char *user) { const struct auth *auth; @@ -407,7 +407,7 @@ auth_group_delete(struct auth_group *ag) } struct auth_group * -auth_group_find(struct conf *conf, const char *name) +auth_group_find(const struct conf *conf, const char *name) { struct auth_group *ag; @@ -534,7 +534,7 @@ portal_group_delete(struct portal_group } struct portal_group * -portal_group_find(struct conf *conf, const char *name) +portal_group_find(const struct conf *conf, const char *name) { struct portal_group *pg; @@ -833,7 +833,7 @@ lun_delete(struct lun *lun) } struct lun * -lun_find(struct target *targ, int lun_id) +lun_find(const struct target *targ, int lun_id) { struct lun *lun; @@ -929,7 +929,7 @@ lun_option_delete(struct lun_option *lo) } struct lun_option * -lun_option_find(struct lun *lun, const char *name) +lun_option_find(const struct lun *lun, const char *name) { struct lun_option *lo; Modified: stable/10/usr.sbin/ctld/ctld.h ============================================================================== --- stable/10/usr.sbin/ctld/ctld.h Wed May 7 07:37:55 2014 (r265513) +++ stable/10/usr.sbin/ctld/ctld.h Wed May 7 07:39:16 2014 (r265514) @@ -211,7 +211,8 @@ int conf_verify(struct conf *conf); struct auth_group *auth_group_new(struct conf *conf, const char *name); void auth_group_delete(struct auth_group *ag); -struct auth_group *auth_group_find(struct conf *conf, const char *name); +struct auth_group *auth_group_find(const struct conf *conf, + const char *name); int auth_group_set_type_str(struct auth_group *ag, const char *type); @@ -220,7 +221,7 @@ const struct auth *auth_new_chap(struct const struct auth *auth_new_chap_mutual(struct auth_group *ag, const char *user, const char *secret, const char *user2, const char *secret2); -const struct auth *auth_find(struct auth_group *ag, +const struct auth *auth_find(const struct auth_group *ag, const char *user); const struct auth_name *auth_name_new(struct auth_group *ag, @@ -237,7 +238,8 @@ const struct auth_portal *auth_portal_fi struct portal_group *portal_group_new(struct conf *conf, const char *name); void portal_group_delete(struct portal_group *pg); -struct portal_group *portal_group_find(struct conf *conf, const char *name); +struct portal_group *portal_group_find(const struct conf *conf, + const char *name); int portal_group_add_listen(struct portal_group *pg, const char *listen, bool iser); @@ -248,7 +250,7 @@ struct target *target_find(struct conf struct lun *lun_new(struct target *target, int lun_id); void lun_delete(struct lun *lun); -struct lun *lun_find(struct target *target, int lun_id); +struct lun *lun_find(const struct target *target, int lun_id); void lun_set_backend(struct lun *lun, const char *value); void lun_set_blocksize(struct lun *lun, size_t value); void lun_set_device_id(struct lun *lun, const char *value); @@ -260,7 +262,8 @@ void lun_set_ctl_lun(struct lun *lun, struct lun_option *lun_option_new(struct lun *lun, const char *name, const char *value); void lun_option_delete(struct lun_option *clo); -struct lun_option *lun_option_find(struct lun *lun, const char *name); +struct lun_option *lun_option_find(const struct lun *lun, + const char *name); void lun_option_set(struct lun_option *clo, const char *value); From owner-svn-src-stable@FreeBSD.ORG Wed May 7 07:40:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6D785F6D; Wed, 7 May 2014 07:40:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 59DA9192; Wed, 7 May 2014 07:40:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s477ek17022947; Wed, 7 May 2014 07:40:46 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s477ekbq022946; Wed, 7 May 2014 07:40:46 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070740.s477ekbq022946@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 07:40:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265515 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 07:40:46 -0000 Author: trasz Date: Wed May 7 07:40:45 2014 New Revision: 265515 URL: http://svnweb.freebsd.org/changeset/base/265515 Log: MFC r264532: Use proper terminology in debug messages. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/ctld/login.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/login.c ============================================================================== --- stable/10/usr.sbin/ctld/login.c Wed May 7 07:39:16 2014 (r265514) +++ stable/10/usr.sbin/ctld/login.c Wed May 7 07:40:45 2014 (r265515) @@ -787,7 +787,7 @@ login_negotiate(struct connection *conn, bool skipped_security; if (request == NULL) { - log_debugx("beginning parameter negotiation; " + log_debugx("beginning operational parameter negotiation; " "waiting for Login PDU"); request = login_receive(conn, false); skipped_security = false; @@ -813,7 +813,7 @@ login_negotiate(struct connection *conn, response_keys); } - log_debugx("parameter negotiation done; " + log_debugx("operational parameter negotiation done; " "transitioning to Full Feature Phase"); keys_save(response_keys, response); @@ -987,7 +987,7 @@ login(struct connection *conn) * but we don't need it. */ log_debugx("authentication not required; " - "transitioning to parameter negotiation"); + "transitioning to operational parameter negotiation"); if ((bhslr->bhslr_flags & BHSLR_FLAGS_TRANSIT) == 0) log_warnx("initiator did not set the \"T\" flag; " From owner-svn-src-stable@FreeBSD.ORG Wed May 7 07:41:58 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B775E14E; Wed, 7 May 2014 07:41:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A45381AF; Wed, 7 May 2014 07:41:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s477fwCC024377; Wed, 7 May 2014 07:41:58 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s477fwAk024376; Wed, 7 May 2014 07:41:58 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070741.s477fwAk024376@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 07:41:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265516 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 07:41:58 -0000 Author: trasz Date: Wed May 7 07:41:58 2014 New Revision: 265516 URL: http://svnweb.freebsd.org/changeset/base/265516 Log: MFC r264533: Use consistent punctuation. Sponsored by: The FreeBSD Foundation 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 Wed May 7 07:40:45 2014 (r265515) +++ stable/10/usr.sbin/ctld/ctld.c Wed May 7 07:41:58 2014 (r265516) @@ -1214,7 +1214,7 @@ conf_apply(struct conf *oldconf, struct log_debugx("enabling CTL iSCSI port"); error = kernel_port_on(); if (error != 0) - log_errx(1, "failed to enable CTL iSCSI port, exiting"); + log_errx(1, "failed to enable CTL iSCSI port; exiting"); } else { error = kernel_port_off(); if (error != 0) @@ -1839,7 +1839,7 @@ main(int argc, char **argv) oldconf = conf_new_from_kernel(); newconf = conf_new_from_file(config_path); if (newconf == NULL) - log_errx(1, "configuration error, exiting"); + log_errx(1, "configuration error; exiting"); if (debug > 0) { oldconf->conf_debug = debug; newconf->conf_debug = debug; @@ -1847,7 +1847,8 @@ main(int argc, char **argv) error = conf_apply(oldconf, newconf); if (error != 0) - log_errx(1, "failed to apply configuration, exiting"); + log_errx(1, "failed to apply configuration; exiting"); + conf_delete(oldconf); oldconf = NULL; From owner-svn-src-stable@FreeBSD.ORG Wed May 7 07:43:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8DF7B35E; Wed, 7 May 2014 07:43:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A90A1B7; Wed, 7 May 2014 07:43:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s477hDx3024662; Wed, 7 May 2014 07:43:13 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s477hDuR024661; Wed, 7 May 2014 07:43:13 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070743.s477hDuR024661@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 07:43:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265518 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 07:43:13 -0000 Author: trasz Date: Wed May 7 07:43:13 2014 New Revision: 265518 URL: http://svnweb.freebsd.org/changeset/base/265518 Log: MFC r264534: If we fail to create LUN, try again on next configuration reload. Sponsored by: The FreeBSD Foundation 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 Wed May 7 07:42:47 2014 (r265517) +++ stable/10/usr.sbin/ctld/ctld.c Wed May 7 07:43:13 2014 (r265518) @@ -1222,6 +1222,13 @@ conf_apply(struct conf *oldconf, struct } } + /* + * XXX: If target or lun removal fails, we should somehow "move" + * the old lun or target into newconf, so that subsequent + * conf_apply() will try to remove them again. That would + * be somewhat hairy, and lun deletion doesn't really happen, + * so leave it as it is for now. + */ TAILQ_FOREACH_SAFE(oldtarg, &oldconf->conf_targets, t_next, tmptarg) { /* * First, remove any targets present in the old configuration @@ -1344,7 +1351,7 @@ conf_apply(struct conf *oldconf, struct TAILQ_FOREACH(newtarg, &newconf->conf_targets, t_next) { oldtarg = target_find(oldconf, newtarg->t_name); - TAILQ_FOREACH(newlun, &newtarg->t_luns, l_next) { + TAILQ_FOREACH_SAFE(newlun, &newtarg->t_luns, l_next, tmplun) { if (oldtarg != NULL) { oldlun = lun_find(oldtarg, newlun->l_lun); if (oldlun != NULL) { @@ -1376,6 +1383,7 @@ conf_apply(struct conf *oldconf, struct if (error != 0) { log_warnx("failed to add lun %d, target %s", newlun->l_lun, newtarg->t_name); + lun_delete(newlun); cumulated_error++; } } From owner-svn-src-stable@FreeBSD.ORG Wed May 7 07:44:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5108A493; Wed, 7 May 2014 07:44:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D0691C0; Wed, 7 May 2014 07:44:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s477iIv5024897; Wed, 7 May 2014 07:44:18 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s477iIYd024896; Wed, 7 May 2014 07:44:18 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070744.s477iIYd024896@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 07:44:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265519 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 07:44:18 -0000 Author: trasz Date: Wed May 7 07:44:17 2014 New Revision: 265519 URL: http://svnweb.freebsd.org/changeset/base/265519 Log: MFC r264535: English. Sponsored by: The FreeBSD Foundation 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 Wed May 7 07:43:13 2014 (r265518) +++ stable/10/usr.sbin/ctld/ctld.c Wed May 7 07:44:17 2014 (r265519) @@ -1225,9 +1225,9 @@ conf_apply(struct conf *oldconf, struct /* * XXX: If target or lun removal fails, we should somehow "move" * the old lun or target into newconf, so that subsequent - * conf_apply() will try to remove them again. That would - * be somewhat hairy, and lun deletion doesn't really happen, - * so leave it as it is for now. + * conf_apply() would try to remove them again. That would + * be somewhat hairy, though, and lun deletion failures don't + * really happen, so leave it as it is for now. */ TAILQ_FOREACH_SAFE(oldtarg, &oldconf->conf_targets, t_next, tmptarg) { /* From owner-svn-src-stable@FreeBSD.ORG Wed May 7 07:45:22 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EAF875CC; Wed, 7 May 2014 07:45:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE0C21C8; Wed, 7 May 2014 07:45:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s477jMht025113; Wed, 7 May 2014 07:45:22 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s477jMp7025111; Wed, 7 May 2014 07:45:22 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070745.s477jMp7025111@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 07:45:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265520 - stable/10/sys/dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 07:45:23 -0000 Author: trasz Date: Wed May 7 07:45:22 2014 New Revision: 265520 URL: http://svnweb.freebsd.org/changeset/base/265520 Log: MFC r264536: Get rid of ISCSIDCLOSE; it wasn't used and is redundant anyway, because of ISCSIDFAIL. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/iscsi/iscsi.c stable/10/sys/dev/iscsi/iscsi_ioctl.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.c Wed May 7 07:44:17 2014 (r265519) +++ stable/10/sys/dev/iscsi/iscsi.c Wed May 7 07:45:22 2014 (r265520) @@ -1551,28 +1551,6 @@ iscsi_ioctl_daemon_receive(struct iscsi_ return (0); } - -static int -iscsi_ioctl_daemon_close(struct iscsi_softc *sc, - struct iscsi_daemon_close *idc) -{ - struct iscsi_session *is; - - sx_slock(&sc->sc_lock); - TAILQ_FOREACH(is, &sc->sc_sessions, is_next) { - if (is->is_id == idc->idc_session_id) - break; - } - if (is == NULL) { - sx_sunlock(&sc->sc_lock); - return (ESRCH); - } - sx_sunlock(&sc->sc_lock); - - iscsi_session_reconnect(is); - - return (0); -} #endif /* ICL_KERNEL_PROXY */ static void @@ -1803,9 +1781,6 @@ iscsi_ioctl(struct cdev *dev, u_long cmd case ISCSIDRECEIVE: return (iscsi_ioctl_daemon_receive(sc, (struct iscsi_daemon_receive *)arg)); - case ISCSIDCLOSE: - return (iscsi_ioctl_daemon_close(sc, - (struct iscsi_daemon_close *)arg)); #endif /* ICL_KERNEL_PROXY */ case ISCSISADD: return (iscsi_ioctl_session_add(sc, Modified: stable/10/sys/dev/iscsi/iscsi_ioctl.h ============================================================================== --- stable/10/sys/dev/iscsi/iscsi_ioctl.h Wed May 7 07:44:17 2014 (r265519) +++ stable/10/sys/dev/iscsi/iscsi_ioctl.h Wed May 7 07:45:22 2014 (r265520) @@ -175,15 +175,9 @@ struct iscsi_daemon_receive { int idr_spare[4]; }; -struct iscsi_daemon_close { - int idc_session_id; - int idc_spare[4]; -}; - #define ISCSIDCONNECT _IOWR('I', 0x04, struct iscsi_daemon_connect) #define ISCSIDSEND _IOWR('I', 0x05, struct iscsi_daemon_send) #define ISCSIDRECEIVE _IOWR('I', 0x06, struct iscsi_daemon_receive) -#define ISCSIDCLOSE _IOWR('I', 0x07, struct iscsi_daemon_close) #endif /* ICL_KERNEL_PROXY */ From owner-svn-src-stable@FreeBSD.ORG Wed May 7 07:46:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 303FB6FE; Wed, 7 May 2014 07:46:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C4501D5; Wed, 7 May 2014 07:46:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s477kNEW025308; Wed, 7 May 2014 07:46:23 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s477kN8T025307; Wed, 7 May 2014 07:46:23 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070746.s477kN8T025307@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 07:46:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265521 - stable/10/sys/dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 07:46:24 -0000 Author: trasz Date: Wed May 7 07:46:23 2014 New Revision: 265521 URL: http://svnweb.freebsd.org/changeset/base/265521 Log: MFC r264537: Be more strict with locking for is_waiting_for_iscsid variable. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/iscsi/iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.c Wed May 7 07:45:22 2014 (r265520) +++ stable/10/sys/dev/iscsi/iscsi.c Wed May 7 07:46:23 2014 (r265521) @@ -1201,8 +1201,10 @@ iscsi_ioctl_daemon_wait(struct iscsi_sof sx_slock(&sc->sc_lock); for (;;) { TAILQ_FOREACH(is, &sc->sc_sessions, is_next) { + ISCSI_SESSION_LOCK(is); if (is->is_waiting_for_iscsid) break; + ISCSI_SESSION_UNLOCK(is); } if (is == NULL) { @@ -1217,7 +1219,6 @@ iscsi_ioctl_daemon_wait(struct iscsi_sof continue; } - ISCSI_SESSION_LOCK(is); is->is_waiting_for_iscsid = false; is->is_login_phase = true; is->is_reason[0] = '\0'; @@ -1650,8 +1651,10 @@ iscsi_ioctl_session_add(struct iscsi_sof /* * Trigger immediate reconnection. */ + ISCSI_SESSION_LOCK(is); is->is_waiting_for_iscsid = true; strlcpy(is->is_reason, "Waiting for iscsid(8)", sizeof(is->is_reason)); + ISCSI_SESSION_UNLOCK(is); cv_signal(&sc->sc_cv); sx_xunlock(&sc->sc_lock); From owner-svn-src-stable@FreeBSD.ORG Wed May 7 07:47:29 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CFAFC858; Wed, 7 May 2014 07:47:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BCC0A1EE; Wed, 7 May 2014 07:47:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s477lTkM025495; Wed, 7 May 2014 07:47:29 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s477lT4x025494; Wed, 7 May 2014 07:47:29 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070747.s477lT4x025494@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 07:47:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265522 - stable/10/sys/dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 07:47:29 -0000 Author: trasz Date: Wed May 7 07:47:29 2014 New Revision: 265522 URL: http://svnweb.freebsd.org/changeset/base/265522 Log: MFC r264538: Remove useless debug. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/iscsi/iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.c Wed May 7 07:46:23 2014 (r265521) +++ stable/10/sys/dev/iscsi/iscsi.c Wed May 7 07:47:29 2014 (r265522) @@ -2005,7 +2005,6 @@ iscsi_action(struct cam_sim *sim, union ISCSI_SESSION_LOCK_ASSERT(is); if (is->is_terminating) { - ISCSI_SESSION_DEBUG(is, "called during termination"); ccb->ccb_h.status = CAM_DEV_NOT_THERE; xpt_done(ccb); return; From owner-svn-src-stable@FreeBSD.ORG Wed May 7 07:48:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8189698E; Wed, 7 May 2014 07:48:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F7901F7; Wed, 7 May 2014 07:48:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s477mXAd025703; Wed, 7 May 2014 07:48:33 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s477mXoX025702; Wed, 7 May 2014 07:48:33 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070748.s477mXoX025702@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 07:48:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265523 - stable/10/sys/dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 07:48:33 -0000 Author: trasz Date: Wed May 7 07:48:32 2014 New Revision: 265523 URL: http://svnweb.freebsd.org/changeset/base/265523 Log: MFC r264544: Add kern.iscsi.fail_on_disconnection; this is required for gmultipath to work. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/iscsi/iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.c Wed May 7 07:47:29 2014 (r265522) +++ stable/10/sys/dev/iscsi/iscsi.c Wed May 7 07:48:32 2014 (r265523) @@ -96,6 +96,10 @@ static int maxtags = 255; TUNABLE_INT("kern.iscsi.maxtags", &maxtags); SYSCTL_INT(_kern_iscsi, OID_AUTO, maxtags, CTLFLAG_RWTUN, &maxtags, 255, "Max number of IO requests queued"); +static int fail_on_disconnection = 0; +TUNABLE_INT("kern.iscsi.fail_on_disconnection", &fail_on_disconnection); +SYSCTL_INT(_kern_iscsi, OID_AUTO, fail_on_disconnection, CTLFLAG_RWTUN, + &fail_on_disconnection, 0, "Destroy CAM SIM on connection failure"); static MALLOC_DEFINE(M_ISCSI, "iSCSI", "iSCSI initiator"); static uma_zone_t iscsi_outstanding_zone; @@ -300,22 +304,11 @@ iscsi_session_terminate_tasks(struct isc } static void -iscsi_maintenance_thread_reconnect(struct iscsi_session *is) +iscsi_session_cleanup(struct iscsi_session *is, bool destroy_sim) { struct icl_pdu *pdu; - icl_conn_shutdown(is->is_conn); - icl_conn_close(is->is_conn); - - ISCSI_SESSION_LOCK(is); - -#ifdef ICL_KERNEL_PROXY - if (is->is_login_pdu != NULL) { - icl_pdu_free(is->is_login_pdu); - is->is_login_pdu = NULL; - } - cv_signal(&is->is_login_cv); -#endif + ISCSI_SESSION_LOCK_ASSERT(is); /* * Don't queue any new PDUs. @@ -335,12 +328,63 @@ iscsi_maintenance_thread_reconnect(struc icl_pdu_free(pdu); } - /* - * Terminate SCSI tasks, asking CAM to requeue them. - */ - //ISCSI_SESSION_DEBUG(is, "terminating tasks"); - iscsi_session_terminate_tasks(is, true); + if (destroy_sim == false) { + /* + * Terminate SCSI tasks, asking CAM to requeue them. + */ + iscsi_session_terminate_tasks(is, true); + return; + } + + iscsi_session_terminate_tasks(is, false); + if (is->is_sim == NULL) + return; + + ISCSI_SESSION_DEBUG(is, "deregistering SIM"); + xpt_async(AC_LOST_DEVICE, is->is_path, NULL); + + if (is->is_simq_frozen) { + xpt_release_simq(is->is_sim, 1); + is->is_simq_frozen = false; + } + + xpt_free_path(is->is_path); + is->is_path = NULL; + xpt_bus_deregister(cam_sim_path(is->is_sim)); + cam_sim_free(is->is_sim, TRUE /*free_devq*/); + is->is_sim = NULL; + is->is_devq = NULL; +} + +static void +iscsi_maintenance_thread_reconnect(struct iscsi_session *is) +{ + + icl_conn_shutdown(is->is_conn); + icl_conn_close(is->is_conn); + + ISCSI_SESSION_LOCK(is); + + is->is_connected = false; + is->is_reconnecting = false; + is->is_login_phase = false; + +#ifdef ICL_KERNEL_PROXY + if (is->is_login_pdu != NULL) { + icl_pdu_free(is->is_login_pdu); + is->is_login_pdu = NULL; + } + cv_signal(&is->is_login_cv); +#endif + + if (fail_on_disconnection) { + ISCSI_SESSION_DEBUG(is, "connection failed, destroying devices"); + iscsi_session_cleanup(is, true); + } else { + iscsi_session_cleanup(is, false); + } + KASSERT(TAILQ_EMPTY(&is->is_outstanding), ("destroying session with active tasks")); KASSERT(STAILQ_EMPTY(&is->is_postponed), @@ -350,9 +394,6 @@ iscsi_maintenance_thread_reconnect(struc * Request immediate reconnection from iscsid(8). */ //ISCSI_SESSION_DEBUG(is, "waking up iscsid(8)"); - is->is_connected = false; - is->is_reconnecting = false; - is->is_login_phase = false; is->is_waiting_for_iscsid = true; strlcpy(is->is_reason, "Waiting for iscsid(8)", sizeof(is->is_reason)); is->is_timeout = 0; @@ -364,7 +405,6 @@ static void iscsi_maintenance_thread_terminate(struct iscsi_session *is) { struct iscsi_softc *sc; - struct icl_pdu *pdu; sc = is->is_softc; sx_xlock(&sc->sc_lock); @@ -385,48 +425,9 @@ iscsi_maintenance_thread_terminate(struc cv_signal(&is->is_login_cv); #endif - /* - * Don't queue any new PDUs. - */ callout_drain(&is->is_callout); - if (is->is_sim != NULL && is->is_simq_frozen == false) { - ISCSI_SESSION_DEBUG(is, "freezing"); - xpt_freeze_simq(is->is_sim, 1); - is->is_simq_frozen = true; - } - /* - * Remove postponed PDUs. - */ - while (!STAILQ_EMPTY(&is->is_postponed)) { - pdu = STAILQ_FIRST(&is->is_postponed); - STAILQ_REMOVE_HEAD(&is->is_postponed, ip_next); - icl_pdu_free(pdu); - } - - /* - * Forcibly terminate SCSI tasks. - */ - ISCSI_SESSION_DEBUG(is, "terminating tasks"); - iscsi_session_terminate_tasks(is, false); - - /* - * Deregister CAM. - */ - if (is->is_sim != NULL) { - ISCSI_SESSION_DEBUG(is, "deregistering SIM"); - xpt_async(AC_LOST_DEVICE, is->is_path, NULL); - - if (is->is_simq_frozen) { - xpt_release_simq(is->is_sim, 1); - is->is_simq_frozen = false; - } - - xpt_free_path(is->is_path); - xpt_bus_deregister(cam_sim_path(is->is_sim)); - cam_sim_free(is->is_sim, TRUE /*free_devq*/); - is->is_sim = NULL; - } + iscsi_session_cleanup(is, true); KASSERT(TAILQ_EMPTY(&is->is_outstanding), ("destroying session with active tasks")); @@ -2004,7 +2005,8 @@ iscsi_action(struct cam_sim *sim, union ISCSI_SESSION_LOCK_ASSERT(is); - if (is->is_terminating) { + if (is->is_terminating || + (is->is_connected == false && fail_on_disconnection)) { ccb->ccb_h.status = CAM_DEV_NOT_THERE; xpt_done(ccb); return; From owner-svn-src-stable@FreeBSD.ORG Wed May 7 07:53:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43FE4BAD; Wed, 7 May 2014 07:53:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2FCBB2A3; Wed, 7 May 2014 07:53:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s477rPqf029444; Wed, 7 May 2014 07:53:25 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s477rPTP029443; Wed, 7 May 2014 07:53:25 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070753.s477rPTP029443@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 07:53:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265524 - stable/10/sys/dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 07:53:25 -0000 Author: trasz Date: Wed May 7 07:53:24 2014 New Revision: 265524 URL: http://svnweb.freebsd.org/changeset/base/265524 Log: MFC r264348 by mav@: Improve use of socket buffer upcalls. Use soreadable()/sowriteable() in socket upcalls to avoid extra wakeups until we have enough data to read or space to write. Increase partial receive len from 1K to 128K to not wake up on every received packet. This significantly reduces locks congestion and CPU usage and improves throughput for large I/Os on NICs without TSO and LRO. MFC r264552 by mav@: Close the race in older code, that caused connection stuck after r264348. Sponsored by: iXsystems, Inc. Modified: stable/10/sys/dev/iscsi/icl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/icl.c ============================================================================== --- stable/10/sys/dev/iscsi/icl.c Wed May 7 07:48:32 2014 (r265523) +++ stable/10/sys/dev/iscsi/icl.c Wed May 7 07:53:24 2014 (r265524) @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -67,7 +68,7 @@ static int coalesce = 1; TUNABLE_INT("kern.icl.coalesce", &coalesce); SYSCTL_INT(_kern_icl, OID_AUTO, coalesce, CTLFLAG_RWTUN, &coalesce, 1, "Try to coalesce PDUs before sending"); -static int partial_receive_len = 1 * 1024; /* XXX: More? */ +static int partial_receive_len = 128 * 1024; TUNABLE_INT("kern.icl.partial_receive_len", &partial_receive_len); SYSCTL_INT(_kern_icl, OID_AUTO, partial_receive_len, CTLFLAG_RWTUN, &partial_receive_len, 1 * 1024, "Minimum read size for partially received " @@ -750,12 +751,19 @@ icl_receive_thread(void *arg) break; } + /* + * Set the low watermark, to be checked by + * soreadable() in icl_soupcall_receive() + * to avoid unneccessary wakeups until there + * is enough data received to read the PDU. + */ SOCKBUF_LOCK(&so->so_rcv); available = so->so_rcv.sb_cc; if (available < ic->ic_receive_len) { so->so_rcv.sb_lowat = ic->ic_receive_len; cv_wait(&ic->ic_receive_cv, &so->so_rcv.sb_mtx); - } + } else + so->so_rcv.sb_lowat = so->so_rcv.sb_hiwat + 1; SOCKBUF_UNLOCK(&so->so_rcv); icl_conn_receive_pdus(ic, available); @@ -772,6 +780,9 @@ icl_soupcall_receive(struct socket *so, { struct icl_conn *ic; + if (!soreadable(so)) + return (SU_OK); + ic = arg; cv_signal(&ic->ic_receive_cv); return (SU_OK); @@ -854,10 +865,10 @@ icl_conn_send_pdus(struct icl_conn *ic, available = sbspace(&so->so_snd); /* - * Notify the socket layer that it doesn't need to call - * send socket upcall for the time being. + * Notify the socket upcall that we don't need wakeups + * for the time being. */ - so->so_snd.sb_lowat = so->so_snd.sb_hiwat; + so->so_snd.sb_lowat = so->so_snd.sb_hiwat + 1; SOCKBUF_UNLOCK(&so->so_snd); while (!STAILQ_EMPTY(queue)) { @@ -866,21 +877,26 @@ icl_conn_send_pdus(struct icl_conn *ic, request = STAILQ_FIRST(queue); size = icl_pdu_size(request); if (available < size) { -#if 1 - ICL_DEBUG("no space to send; " - "have %zd, need %zd", - available, size); -#endif /* - * Set the low watermark on the socket, + * Set the low watermark, to be checked by + * sowritable() in icl_soupcall_send() * to avoid unneccessary wakeups until there * is enough space for the PDU to fit. */ SOCKBUF_LOCK(&so->so_snd); - so->so_snd.sb_lowat = size; + available = sbspace(&so->so_snd); + if (available < size) { +#if 1 + ICL_DEBUG("no space to send; " + "have %zd, need %zd", + available, size); +#endif + so->so_snd.sb_lowat = size; + SOCKBUF_UNLOCK(&so->so_snd); + return; + } SOCKBUF_UNLOCK(&so->so_snd); - return; } STAILQ_REMOVE_HEAD(queue, ip_next); error = icl_pdu_finalize(request); @@ -1016,6 +1032,9 @@ icl_soupcall_send(struct socket *so, voi { struct icl_conn *ic; + if (!sowriteable(so)) + return (SU_OK); + ic = arg; ICL_CONN_LOCK(ic); From owner-svn-src-stable@FreeBSD.ORG Wed May 7 07:54:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 64E83CF4; Wed, 7 May 2014 07:54:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51A122B4; Wed, 7 May 2014 07:54:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s477smLI029674; Wed, 7 May 2014 07:54:48 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s477smuT029673; Wed, 7 May 2014 07:54:48 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070754.s477smuT029673@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 07:54:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265525 - stable/10/sys/dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 07:54:48 -0000 Author: trasz Date: Wed May 7 07:54:47 2014 New Revision: 265525 URL: http://svnweb.freebsd.org/changeset/base/265525 Log: MFC r264545: Fix typo. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/iscsi/icl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/icl.c ============================================================================== --- stable/10/sys/dev/iscsi/icl.c Wed May 7 07:53:24 2014 (r265524) +++ stable/10/sys/dev/iscsi/icl.c Wed May 7 07:54:47 2014 (r265525) @@ -880,7 +880,7 @@ icl_conn_send_pdus(struct icl_conn *ic, /* * Set the low watermark, to be checked by - * sowritable() in icl_soupcall_send() + * sowriteable() in icl_soupcall_send() * to avoid unneccessary wakeups until there * is enough space for the PDU to fit. */ From owner-svn-src-stable@FreeBSD.ORG Wed May 7 07:56:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B6571ED6; Wed, 7 May 2014 07:56:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 971C32D7; Wed, 7 May 2014 07:56:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s477ubr0030062; Wed, 7 May 2014 07:56:37 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s477uaoe030054; Wed, 7 May 2014 07:56:36 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070756.s477uaoe030054@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 07:56:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265526 - in stable/10: sys/dev/iscsi usr.sbin/iscsid X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 07:56:37 -0000 Author: trasz Date: Wed May 7 07:56:36 2014 New Revision: 265526 URL: http://svnweb.freebsd.org/changeset/base/265526 Log: MFC r264549: Make it possible for the initiator side to operate in both proxy and normal mode; this makes it possible to compile with the former by default, but use it only when neccessary. That's especially important for the userland part. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/iscsi/iscsi.c stable/10/sys/dev/iscsi/iscsi_ioctl.h stable/10/usr.sbin/iscsid/iscsid.c stable/10/usr.sbin/iscsid/iscsid.h stable/10/usr.sbin/iscsid/pdu.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.c Wed May 7 07:54:47 2014 (r265525) +++ stable/10/sys/dev/iscsi/iscsi.c Wed May 7 07:56:36 2014 (r265526) @@ -1303,12 +1303,19 @@ iscsi_ioctl_daemon_handoff(struct iscsi_ ISCSI_SESSION_UNLOCK(is); -#ifndef ICL_KERNEL_PROXY - error = icl_conn_handoff(is->is_conn, handoff->idh_socket); - if (error != 0) { - sx_sunlock(&sc->sc_lock); - iscsi_session_terminate(is); - return (error); +#ifdef ICL_KERNEL_PROXY + if (handoff->idh_socket != 0) { +#endif + /* + * Handoff without using ICL proxy. + */ + error = icl_conn_handoff(is->is_conn, handoff->idh_socket); + if (error != 0) { + sx_sunlock(&sc->sc_lock); + iscsi_session_terminate(is); + return (error); + } +#ifdef ICL_KERNEL_PROXY } #endif @@ -1419,13 +1426,18 @@ iscsi_ioctl_daemon_connect(struct iscsi_ if (idc->idc_from_addrlen > 0) { error = getsockaddr(&from_sa, (void *)idc->idc_from_addr, idc->idc_from_addrlen); - if (error != 0) + if (error != 0) { + ISCSI_SESSION_WARN(is, + "getsockaddr failed with error %d", error); return (error); + } } else { from_sa = NULL; } error = getsockaddr(&to_sa, (void *)idc->idc_to_addr, idc->idc_to_addrlen); if (error != 0) { + ISCSI_SESSION_WARN(is, "getsockaddr failed with error %d", + error); free(from_sa, M_SONAME); return (error); } Modified: stable/10/sys/dev/iscsi/iscsi_ioctl.h ============================================================================== --- stable/10/sys/dev/iscsi/iscsi_ioctl.h Wed May 7 07:54:47 2014 (r265525) +++ stable/10/sys/dev/iscsi/iscsi_ioctl.h Wed May 7 07:56:36 2014 (r265526) @@ -129,9 +129,9 @@ struct iscsi_daemon_fail { /* * When ICL_KERNEL_PROXY is not defined, the iscsid(8) is responsible - * for creating the socket, connecting, performing Login Phase using - * socked in the usual userspace way, and then passing the socket file - * descriptor to the kernel part using ISCSIDHANDOFF. + * for creating the socket, connecting, and performing Login Phase using + * the socket in the usual userspace way, and then passing the socket + * file descriptor to the kernel part using ISCSIDHANDOFF. * * When ICL_KERNEL_PROXY is defined, the iscsid(8) creates the session * using ISCSICONNECT, performs Login Phase using ISCSISEND/ISCSIRECEIVE @@ -162,7 +162,7 @@ struct iscsi_daemon_send { void *ids_spare2; size_t ids_data_segment_len; void *ids_data_segment; - int ids_spare[4]; + int ids_spare3[4]; }; struct iscsi_daemon_receive { @@ -172,7 +172,7 @@ struct iscsi_daemon_receive { void *idr_spare2; size_t idr_data_segment_len; void *idr_data_segment; - int idr_spare[4]; + int idr_spare3[4]; }; #define ISCSIDCONNECT _IOWR('I', 0x04, struct iscsi_daemon_connect) Modified: stable/10/usr.sbin/iscsid/iscsid.c ============================================================================== --- stable/10/usr.sbin/iscsid/iscsid.c Wed May 7 07:54:47 2014 (r265525) +++ stable/10/usr.sbin/iscsid/iscsid.c Wed May 7 07:56:36 2014 (r265526) @@ -194,30 +194,32 @@ connection_new(unsigned int session_id, resolve_addr(conn, to_addr, &to_ai, false); #ifdef ICL_KERNEL_PROXY + if (conn->conn_conf.isc_iser) { + memset(&idc, 0, sizeof(idc)); + idc.idc_session_id = conn->conn_session_id; + if (conn->conn_conf.isc_iser) + idc.idc_iser = 1; + idc.idc_domain = to_ai->ai_family; + idc.idc_socktype = to_ai->ai_socktype; + idc.idc_protocol = to_ai->ai_protocol; + if (from_ai != NULL) { + idc.idc_from_addr = from_ai->ai_addr; + idc.idc_from_addrlen = from_ai->ai_addrlen; + } + idc.idc_to_addr = to_ai->ai_addr; + idc.idc_to_addrlen = to_ai->ai_addrlen; - memset(&idc, 0, sizeof(idc)); - idc.idc_session_id = conn->conn_session_id; - if (conn->conn_conf.isc_iser) - idc.idc_iser = 1; - idc.idc_domain = to_ai->ai_family; - idc.idc_socktype = to_ai->ai_socktype; - idc.idc_protocol = to_ai->ai_protocol; - if (from_ai != NULL) { - idc.idc_from_addr = from_ai->ai_addr; - idc.idc_from_addrlen = from_ai->ai_addrlen; - } - idc.idc_to_addr = to_ai->ai_addr; - idc.idc_to_addrlen = to_ai->ai_addrlen; + log_debugx("connecting to %s using ICL kernel proxy", to_addr); + error = ioctl(iscsi_fd, ISCSIDCONNECT, &idc); + if (error != 0) { + fail(conn, strerror(errno)); + log_err(1, "failed to connect to %s " + "using ICL kernel proxy: ISCSIDCONNECT", to_addr); + } - log_debugx("connecting to %s using ICL kernel proxy", to_addr); - error = ioctl(iscsi_fd, ISCSIDCONNECT, &idc); - if (error != 0) { - fail(conn, strerror(errno)); - log_err(1, "failed to connect to %s using ICL kernel proxy", - to_addr); + return (conn); } - -#else /* !ICL_KERNEL_PROXY */ +#endif /* ICL_KERNEL_PROXY */ if (conn->conn_conf.isc_iser) { fail(conn, "iSER not supported"); @@ -246,8 +248,6 @@ connection_new(unsigned int session_id, log_err(1, "failed to connect to %s", to_addr); } -#endif /* !ICL_KERNEL_PROXY */ - return (conn); } @@ -261,9 +261,7 @@ handoff(struct connection *conn) memset(&idh, 0, sizeof(idh)); idh.idh_session_id = conn->conn_session_id; -#ifndef ICL_KERNEL_PROXY idh.idh_socket = conn->conn_socket; -#endif strlcpy(idh.idh_target_alias, conn->conn_target_alias, sizeof(idh.idh_target_alias)); memcpy(idh.idh_isid, conn->conn_isid, sizeof(idh.idh_isid)); Modified: stable/10/usr.sbin/iscsid/iscsid.h ============================================================================== --- stable/10/usr.sbin/iscsid/iscsid.h Wed May 7 07:54:47 2014 (r265525) +++ stable/10/usr.sbin/iscsid/iscsid.h Wed May 7 07:56:36 2014 (r265526) @@ -46,9 +46,7 @@ struct connection { int conn_iscsi_fd; -#ifndef ICL_KERNEL_PROXY int conn_socket; -#endif unsigned int conn_session_id; struct iscsi_session_conf conn_conf; char conn_target_alias[ISCSI_ADDR_LEN]; Modified: stable/10/usr.sbin/iscsid/pdu.c ============================================================================== --- stable/10/usr.sbin/iscsid/pdu.c Wed May 7 07:54:47 2014 (r265525) +++ stable/10/usr.sbin/iscsid/pdu.c Wed May 7 07:56:36 2014 (r265526) @@ -101,13 +101,15 @@ pdu_new_response(struct pdu *request) #ifdef ICL_KERNEL_PROXY -void -pdu_receive(struct pdu *pdu) +static void +pdu_receive_proxy(struct pdu *pdu) { struct iscsi_daemon_receive *idr; size_t len; int error; + assert(pdu->pdu_connection->conn_conf.isc_iser != 0); + pdu->pdu_data = malloc(ISCSI_MAX_DATA_SEGMENT_LENGTH); if (pdu->pdu_data == NULL) log_err(1, "malloc"); @@ -136,12 +138,14 @@ pdu_receive(struct pdu *pdu) free(idr); } -void -pdu_send(struct pdu *pdu) +static void +pdu_send_proxy(struct pdu *pdu) { struct iscsi_daemon_send *ids; int error; + assert(pdu->pdu_connection->conn_conf.isc_iser != 0); + pdu_set_data_segment_length(pdu, pdu->pdu_data_len); ids = calloc(1, sizeof(*ids)); @@ -160,7 +164,7 @@ pdu_send(struct pdu *pdu) free(ids); } -#else /* !ICL_KERNEL_PROXY */ +#endif /* ICL_KERNEL_PROXY */ static size_t pdu_padding(const struct pdu *pdu) @@ -196,6 +200,13 @@ pdu_receive(struct pdu *pdu) size_t len, padding; char dummy[4]; +#ifdef ICL_KERNEL_PROXY + if (pdu->pdu_connection->conn_conf.isc_iser != 0) + return (pdu_receive_proxy(pdu)); +#endif + + assert(pdu->pdu_connection->conn_conf.isc_iser == 0); + pdu_read(pdu->pdu_connection->conn_socket, (char *)pdu->pdu_bhs, sizeof(*pdu->pdu_bhs)); @@ -237,6 +248,13 @@ pdu_send(struct pdu *pdu) struct iovec iov[3]; int iovcnt; +#ifdef ICL_KERNEL_PROXY + if (pdu->pdu_connection->conn_conf.isc_iser != 0) + return (pdu_send_proxy(pdu)); +#endif + + assert(pdu->pdu_connection->conn_conf.isc_iser == 0); + pdu_set_data_segment_length(pdu, pdu->pdu_data_len); iov[0].iov_base = pdu->pdu_bhs; iov[0].iov_len = sizeof(*pdu->pdu_bhs); @@ -269,8 +287,6 @@ pdu_send(struct pdu *pdu) log_errx(1, "short write"); } -#endif /* !ICL_KERNEL_PROXY */ - void pdu_delete(struct pdu *pdu) { From owner-svn-src-stable@FreeBSD.ORG Wed May 7 07:57:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 45CF6417; Wed, 7 May 2014 07:57:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E75902F0; Wed, 7 May 2014 07:57:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s477vrG1030334; Wed, 7 May 2014 07:57:53 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s477vrnk030333; Wed, 7 May 2014 07:57:53 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070757.s477vrnk030333@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 07:57:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265528 - stable/10/usr.sbin/iscsid X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 07:57:54 -0000 Author: trasz Date: Wed May 7 07:57:53 2014 New Revision: 265528 URL: http://svnweb.freebsd.org/changeset/base/265528 Log: MFC r264604: Remove redundant code. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/iscsid/login.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/iscsid/login.c ============================================================================== --- stable/10/usr.sbin/iscsid/login.c Wed May 7 07:57:50 2014 (r265527) +++ stable/10/usr.sbin/iscsid/login.c Wed May 7 07:57:53 2014 (r265528) @@ -783,7 +783,6 @@ login(struct connection *conn) request = login_new_request(conn); bhslr = (struct iscsi_bhs_login_request *)request->pdu_bhs; - bhslr->bhslr_flags |= BHSLR_FLAGS_TRANSIT; request_keys = keys_new(); if (conn->conn_conf.isc_mutual_user[0] != '\0') { From owner-svn-src-stable@FreeBSD.ORG Wed May 7 07:59:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B02A9594; Wed, 7 May 2014 07:59:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9AE53304; Wed, 7 May 2014 07:59:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s477xiDe030742; Wed, 7 May 2014 07:59:44 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s477xiVi030741; Wed, 7 May 2014 07:59:44 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070759.s477xiVi030741@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 07:59:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265529 - stable/10/usr.bin/iscsictl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 07:59:44 -0000 Author: trasz Date: Wed May 7 07:59:44 2014 New Revision: 265529 URL: http://svnweb.freebsd.org/changeset/base/265529 Log: MFC r264876: Grammar fix. Modified: stable/10/usr.bin/iscsictl/iscsictl.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/iscsictl/iscsictl.8 ============================================================================== --- stable/10/usr.bin/iscsictl/iscsictl.8 Wed May 7 07:57:53 2014 (r265528) +++ stable/10/usr.bin/iscsictl/iscsictl.8 Wed May 7 07:59:44 2014 (r265529) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 20, 2014 +.Dd April 24, 2014 .Dt ISCSICTL 8 .Os .Sh NAME @@ -119,7 +119,7 @@ Use .Nm Fl L to check the connection status. .Pp -Note that in order to the iSCSI initiator to be able to connect to a target, +Note that in order for the iSCSI initiator to be able to connect to a target, the .Xr iscsid 8 daemon must be running. From owner-svn-src-stable@FreeBSD.ORG Wed May 7 08:01:00 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A6E16F3; Wed, 7 May 2014 08:01:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9CAA312; Wed, 7 May 2014 08:00:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4780xsu031221; Wed, 7 May 2014 08:00:59 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4780xZN031220; Wed, 7 May 2014 08:00:59 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070800.s4780xZN031220@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 08:00:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265530 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 08:01:00 -0000 Author: trasz Date: Wed May 7 08:00:59 2014 New Revision: 265530 URL: http://svnweb.freebsd.org/changeset/base/265530 Log: MFC r264877: Style fixes. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/ctld/ctl.conf.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/ctl.conf.5 ============================================================================== --- stable/10/usr.sbin/ctld/ctl.conf.5 Wed May 7 07:59:44 2014 (r265529) +++ stable/10/usr.sbin/ctld/ctl.conf.5 Wed May 7 08:00:59 2014 (r265530) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 11, 2014 +.Dd April 24, 2014 .Dt CTL.CONF 5 .Os .Sh NAME @@ -41,7 +41,7 @@ configuration file is used by the daemon. Lines starting with .Ql # -and empty lines are interpreted as comments. +are interpreted as comments. The general syntax of the .Nm file is: @@ -129,7 +129,7 @@ ones will be allowed to connect. The following statements are available at the portal-group level: .Bl -tag -width indent .It Ic discovery-auth-group Aq Ar name -Assigns previously defined authentication group to that portal group, +Assigns previously defined authentication group to the portal group, to be used for target discovery. By default, portal groups that do not specify their own auth settings, using clauses such as "chap" or "initiator-name", are assigned @@ -146,10 +146,10 @@ using iSER (iSCSI over RDMA) protocol. The following statements are available at the target level: .Bl -tag -width indent .It Ic alias Aq Ar text -Assigns human-readable description to that target. +Assigns human-readable description to the target. There is no default. .It Ic auth-group Aq Ar name -Assigns previously defined authentication group to that target. +Assigns previously defined authentication group to the target. By default, targets that do not specify their own auth settings, using clauses such as "chap" or "initiator-name", are assigned predefined auth-group "default", which denies all access. @@ -187,7 +187,7 @@ ones will be allowed to connect. This clause is mutually exclusive with auth-group; one cannot use both in a single target. .It Ic portal-group Aq Ar name -Assigns previously defined portal group to that target. +Assigns previously defined portal group to the target. Default portal group is "default", which makes the target available on TCP port 3260 on all configured IPv4 and IPv6 addresses. .It Ic lun Aq Ar number @@ -203,7 +203,7 @@ Valid choices are and .Dq ramdisk ; block is used for LUNs backed -by files in the filesystem; ramdisk is a bitsink device, used mostly for +by files or disk device nodes; ramdisk is a bitsink device, used mostly for testing. The default backend is block. .It Ic blocksize Aq Ar size @@ -214,7 +214,7 @@ Specifies SCSI Device Identification str .It Ic option Ao Ar name Ac Aq Ar value Specifies CTL-specific options passed to the kernel. .It Ic path Aq Ar path -Specifies path to file used to back the LUN. +Specifies path to file or device node used to back the LUN. .It Ic serial Aq Ar string Specifies SCSI serial number presented to the initiator. .It Ic size Aq Ar size @@ -245,7 +245,7 @@ portal-group example2 { } target iqn.2012-06.com.example:target0 { - alias "Testing target" + alias "Example target" auth-group no-authentication lun 0 { path /dev/zvol/example_0 From owner-svn-src-stable@FreeBSD.ORG Wed May 7 08:03:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D2E3853; Wed, 7 May 2014 08:03:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 693CD399; Wed, 7 May 2014 08:03:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4783VAm034696; Wed, 7 May 2014 08:03:31 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4783VsM034693; Wed, 7 May 2014 08:03:31 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070803.s4783VsM034693@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 08:03:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265531 - stable/10/sys/dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 08:03:31 -0000 Author: trasz Date: Wed May 7 08:03:30 2014 New Revision: 265531 URL: http://svnweb.freebsd.org/changeset/base/265531 Log: MFC r264355 by mav@: Remove unused val argument value from SYSCTL_INT() calls. Modified: stable/10/sys/dev/iscsi/icl.c stable/10/sys/dev/iscsi/iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/icl.c ============================================================================== --- stable/10/sys/dev/iscsi/icl.c Wed May 7 08:00:59 2014 (r265530) +++ stable/10/sys/dev/iscsi/icl.c Wed May 7 08:03:30 2014 (r265531) @@ -63,24 +63,24 @@ SYSCTL_NODE(_kern, OID_AUTO, icl, CTLFLA static int debug = 1; TUNABLE_INT("kern.icl.debug", &debug); SYSCTL_INT(_kern_icl, OID_AUTO, debug, CTLFLAG_RWTUN, - &debug, 1, "Enable debug messages"); + &debug, 0, "Enable debug messages"); static int coalesce = 1; TUNABLE_INT("kern.icl.coalesce", &coalesce); SYSCTL_INT(_kern_icl, OID_AUTO, coalesce, CTLFLAG_RWTUN, - &coalesce, 1, "Try to coalesce PDUs before sending"); + &coalesce, 0, "Try to coalesce PDUs before sending"); static int partial_receive_len = 128 * 1024; TUNABLE_INT("kern.icl.partial_receive_len", &partial_receive_len); SYSCTL_INT(_kern_icl, OID_AUTO, partial_receive_len, CTLFLAG_RWTUN, - &partial_receive_len, 1 * 1024, "Minimum read size for partially received " + &partial_receive_len, 0, "Minimum read size for partially received " "data segment"); static int sendspace = 1048576; TUNABLE_INT("kern.icl.sendspace", &sendspace); SYSCTL_INT(_kern_icl, OID_AUTO, sendspace, CTLFLAG_RWTUN, - &sendspace, 1048576, "Default send socket buffer size"); + &sendspace, 0, "Default send socket buffer size"); static int recvspace = 1048576; TUNABLE_INT("kern.icl.recvspace", &recvspace); SYSCTL_INT(_kern_icl, OID_AUTO, recvspace, CTLFLAG_RWTUN, - &recvspace, 1048576, "Default receive socket buffer size"); + &recvspace, 0, "Default receive socket buffer size"); static uma_zone_t icl_conn_zone; static uma_zone_t icl_pdu_zone; Modified: stable/10/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.c Wed May 7 08:00:59 2014 (r265530) +++ stable/10/sys/dev/iscsi/iscsi.c Wed May 7 08:03:30 2014 (r265531) @@ -79,23 +79,23 @@ SYSCTL_NODE(_kern, OID_AUTO, iscsi, CTLF static int debug = 1; TUNABLE_INT("kern.iscsi.debug", &debug); SYSCTL_INT(_kern_iscsi, OID_AUTO, debug, CTLFLAG_RWTUN, - &debug, 2, "Enable debug messages"); + &debug, 0, "Enable debug messages"); static int ping_timeout = 5; TUNABLE_INT("kern.iscsi.ping_timeout", &ping_timeout); SYSCTL_INT(_kern_iscsi, OID_AUTO, ping_timeout, CTLFLAG_RWTUN, &ping_timeout, - 5, "Timeout for ping (NOP-Out) requests, in seconds"); + 0, "Timeout for ping (NOP-Out) requests, in seconds"); static int iscsid_timeout = 60; TUNABLE_INT("kern.iscsi.iscsid_timeout", &iscsid_timeout); SYSCTL_INT(_kern_iscsi, OID_AUTO, iscsid_timeout, CTLFLAG_RWTUN, &iscsid_timeout, - 60, "Time to wait for iscsid(8) to handle reconnection, in seconds"); + 0, "Time to wait for iscsid(8) to handle reconnection, in seconds"); static int login_timeout = 60; TUNABLE_INT("kern.iscsi.login_timeout", &login_timeout); SYSCTL_INT(_kern_iscsi, OID_AUTO, login_timeout, CTLFLAG_RWTUN, &login_timeout, - 60, "Time to wait for iscsid(8) to finish Login Phase, in seconds"); + 0, "Time to wait for iscsid(8) to finish Login Phase, in seconds"); static int maxtags = 255; TUNABLE_INT("kern.iscsi.maxtags", &maxtags); SYSCTL_INT(_kern_iscsi, OID_AUTO, maxtags, CTLFLAG_RWTUN, &maxtags, - 255, "Max number of IO requests queued"); + 0, "Max number of IO requests queued"); static int fail_on_disconnection = 0; TUNABLE_INT("kern.iscsi.fail_on_disconnection", &fail_on_disconnection); SYSCTL_INT(_kern_iscsi, OID_AUTO, fail_on_disconnection, CTLFLAG_RWTUN, From owner-svn-src-stable@FreeBSD.ORG Wed May 7 08:04:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF07B993; Wed, 7 May 2014 08:04:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C98B23B0; Wed, 7 May 2014 08:04:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4784fcU034953; Wed, 7 May 2014 08:04:41 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4784frg034952; Wed, 7 May 2014 08:04:41 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070804.s4784frg034952@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 08:04:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265532 - stable/10/usr.bin/iscsictl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 08:04:42 -0000 Author: trasz Date: Wed May 7 08:04:41 2014 New Revision: 265532 URL: http://svnweb.freebsd.org/changeset/base/265532 Log: MFC r264405: Fix periph listing when IOCTL buffer border hits result for wanted bus. Modified: stable/10/usr.bin/iscsictl/periphs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/iscsictl/periphs.c ============================================================================== --- stable/10/usr.bin/iscsictl/periphs.c Wed May 7 08:03:30 2014 (r265531) +++ stable/10/usr.bin/iscsictl/periphs.c Wed May 7 08:04:41 2014 (r265532) @@ -102,6 +102,9 @@ print_periphs(int session_id) ccb.cdm.num_patterns = 0; ccb.cdm.pattern_buf_len = 0; + skip_bus = 1; + skip_device = 1; + /* * We do the ioctl multiple times if necessary, in case there are * more than 100 nodes in the EDT. @@ -120,9 +123,6 @@ print_periphs(int session_id) break; } - skip_bus = 1; - skip_device = 1; - for (i = 0; i < ccb.cdm.num_matches; i++) { switch (ccb.cdm.matches[i].type) { case DEV_MATCH_BUS: { From owner-svn-src-stable@FreeBSD.ORG Wed May 7 08:06:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 68124AF0; Wed, 7 May 2014 08:06:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52DD63D9; Wed, 7 May 2014 08:06:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4786vfM035482; Wed, 7 May 2014 08:06:57 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4786t5Z035466; Wed, 7 May 2014 08:06:55 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201405070806.s4786t5Z035466@svn.freebsd.org> From: Xin LI Date: Wed, 7 May 2014 08:06:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265533 - in stable/10/usr.bin: bc dc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 08:06:57 -0000 Author: delphij Date: Wed May 7 08:06:54 2014 New Revision: 265533 URL: http://svnweb.freebsd.org/changeset/base/265533 Log: MFC r264573+264608+264609: Sync with OpenBSD. Added: stable/10/usr.bin/bc/tty.c - copied unchanged from r264573, head/usr.bin/bc/tty.c Modified: stable/10/usr.bin/bc/Makefile stable/10/usr.bin/bc/bc.1 stable/10/usr.bin/bc/bc.library stable/10/usr.bin/bc/bc.y stable/10/usr.bin/bc/extern.h stable/10/usr.bin/bc/scan.l stable/10/usr.bin/dc/bcode.c stable/10/usr.bin/dc/bcode.h stable/10/usr.bin/dc/dc.1 stable/10/usr.bin/dc/inout.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/bc/Makefile ============================================================================== --- stable/10/usr.bin/bc/Makefile Wed May 7 08:04:41 2014 (r265532) +++ stable/10/usr.bin/bc/Makefile Wed May 7 08:06:54 2014 (r265533) @@ -1,12 +1,12 @@ # $FreeBSD$ -# $OpenBSD: Makefile,v 1.4 2006/06/30 19:02:28 otto Exp $ +# $OpenBSD: Makefile,v 1.7 2013/09/19 16:12:00 otto Exp $ -PROG= bc -SRCS= bc.y scan.l -CFLAGS+= -I. -I${.CURDIR} +PROG= bc +SRCS= bc.y scan.l tty.c +CFLAGS+= -I. -I${.CURDIR} -DPADD= ${LIBEDIT} ${LIBTERMCAP} -LDADD= -ledit -ltermcap +LDADD+= -ledit -lcurses +DPADD+= ${LIBEDIT} ${LIBCURSES} NO_WMISSING_VARIABLE_DECLARATIONS= Modified: stable/10/usr.bin/bc/bc.1 ============================================================================== --- stable/10/usr.bin/bc/bc.1 Wed May 7 08:04:41 2014 (r265532) +++ stable/10/usr.bin/bc/bc.1 Wed May 7 08:06:54 2014 (r265533) @@ -1,5 +1,5 @@ .\" $FreeBSD$ -.\" $OpenBSD: bc.1,v 1.25 2010/01/02 19:48:56 schwarze Exp $ +.\" $OpenBSD: bc.1,v 1.30 2014/01/14 07:42:42 jmc Exp $ .\" .\" Copyright (C) Caldera International Inc. 2001-2002. .\" All rights reserved. @@ -35,7 +35,7 @@ .\" .\" @(#)bc.1 6.8 (Berkeley) 8/8/91 .\" -.Dd December 6, 2013 +.Dd April 16, 2014 .Dt BC 1 .Os .Sh NAME @@ -140,8 +140,7 @@ The following arithmetic and logical ope The semantics of the operators is the same as in the C language. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. -.Bl -column -offset indent "= += \-= *= /= %= ^=" "Associativity" \ -"multiply, divide, modulus" +.Bl -column "= += \-= *= /= %= ^=" "Associativity" "multiply, divide, modulus" -offset indent .It Sy "Operator" Ta Sy "Associativity" Ta Sy "Description" .It "++ \-\-" Ta "none" Ta "increment, decrement" .It "\-" Ta "none" Ta "unary minus" @@ -160,7 +159,7 @@ Note the following: .It The relational operators may appear in any expression. The -.St -p1003.2 +.St -p1003.1-2008 standard only allows them in the conditional expression of an .Sq if , .Sq while @@ -342,6 +341,22 @@ $ bc -l -e 'scale = 500; 2 * a(2^10000)' .Ed .Pp prints an approximation of pi. +.Sh COMMAND LINE EDITING +.Nm +supports interactive command line editing, via the +.Xr editline 3 +library. +It is enabled by default if input is from a tty. +Previous lines can be recalled and edited with the arrow keys, +and other GNU Emacs-style editing keys may be used as well. +.Pp +The +.Xr editline 3 +library is configured with a +.Pa .editrc +file \- refer to +.Xr editrc 5 +for more information. .Sh FILES .Bl -tag -width /usr/share/misc/bc.library -compact .It Pa /usr/share/misc/bc.library @@ -359,9 +374,6 @@ options are no-ops for compatibility wit and their use is discouraged. .Sh SEE ALSO .Xr dc 1 -.Pp -"BC \- An Arbitrary Precision Desk-Calculator Language", -.Pa /usr/share/doc/usd/06.bc/ . .Sh STANDARDS The .Nm @@ -370,7 +382,8 @@ utility is compliant with the specification. .Pp The flags -.Op Fl ce +.Op Fl ce , +as well as the parts noted above, are extensions to that specification. .Sh HISTORY The Modified: stable/10/usr.bin/bc/bc.library ============================================================================== --- stable/10/usr.bin/bc/bc.library Wed May 7 08:04:41 2014 (r265532) +++ stable/10/usr.bin/bc/bc.library Wed May 7 08:06:54 2014 (r265533) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $OpenBSD: bc.library,v 1.3 2007/02/03 21:15:06 otto Exp $ */ +/* $OpenBSD: bc.library,v 1.4 2012/03/14 07:35:53 otto Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. @@ -100,13 +100,13 @@ define l(x) { if (x < 1) { s = scale(x) } else { - s = length(x) - scale(x) + s = length(x)-scale(x) } scale = 0 a = (2.31*s)/1 /* estimated integer part of the answer */ s = t + length(a) + 2 /* estimated length of the answer */ while (x > 2) { - scale=0 + scale = 0 scale = (length(x) + scale(x))/2 + 1 if (scale < s) scale = s x = sqrt(x) Modified: stable/10/usr.bin/bc/bc.y ============================================================================== --- stable/10/usr.bin/bc/bc.y Wed May 7 08:04:41 2014 (r265532) +++ stable/10/usr.bin/bc/bc.y Wed May 7 08:06:54 2014 (r265533) @@ -1,5 +1,5 @@ %{ -/* $OpenBSD: bc.y,v 1.33 2009/10/27 23:59:36 deraadt Exp $ */ +/* $OpenBSD: bc.y,v 1.44 2013/11/20 21:33:54 deraadt Exp $ */ /* * Copyright (c) 2003, Otto Moerbeek @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -53,7 +52,7 @@ __FBSDID("$FreeBSD$"); #include "extern.h" #include "pathnames.h" -#define BC_VER "1.0-FreeBSD" +#define BC_VER "1.1-FreeBSD" #define END_NODE ((ssize_t) -1) #define CONST_STRING ((ssize_t) -2) #define ALLOC_STRING ((ssize_t) -3) @@ -971,7 +970,12 @@ yyerror(const char *s) if (yyin != NULL && feof(yyin)) n = asprintf(&str, "%s: %s:%d: %s: unexpected EOF", __progname, filename, lineno, s); - else if (isspace(yytext[0]) || !isprint(yytext[0])) + else if (yytext[0] == '\n') + n = asprintf(&str, + "%s: %s:%d: %s: newline unexpected", + __progname, filename, lineno, s); + else if (isspace((unsigned char)yytext[0]) || + !isprint((unsigned char)yytext[0])) n = asprintf(&str, "%s: %s:%d: %s: ascii char 0x%02x unexpected", __progname, filename, lineno, s, yytext[0]); @@ -1085,26 +1089,25 @@ escape(const char *str) /* ARGSUSED */ static void -sigchld(int signo) +sigchld(int signo __unused) { pid_t pid; - int status; + int status, save_errno = errno; - switch (signo) { - default: - for (;;) { - pid = waitpid(dc, &status, WUNTRACED); - if (pid == -1) { - if (errno == EINTR) - continue; - _exit(0); - } - if (WIFEXITED(status) || WIFSIGNALED(status)) - _exit(0); - else - break; - } + for (;;) { + pid = waitpid(dc, &status, WCONTINUED | WNOHANG); + if (pid == -1) { + if (errno == EINTR) + continue; + _exit(0); + } else if (pid == 0) + break; + if (WIFEXITED(status) || WIFSIGNALED(status)) + _exit(0); + else + break; } + errno = save_errno; } static const char * @@ -1191,6 +1194,7 @@ main(int argc, char *argv[]) } } if (interactive) { + gettty(&ttysaved); el = el_init("bc", stdin, stderr, stderr); hist = history_init(); history(hist, &he, H_SETSIZE, 100); @@ -1198,6 +1202,8 @@ main(int argc, char *argv[]) el_set(el, EL_EDITOR, "emacs"); el_set(el, EL_SIGNAL, 1); el_set(el, EL_PROMPT, dummy_prompt); + el_set(el, EL_ADDFN, "bc_eof", "", bc_eof); + el_set(el, EL_BIND, "^D", "bc_eof", NULL); el_source(el, NULL); } yywrap(); Modified: stable/10/usr.bin/bc/extern.h ============================================================================== --- stable/10/usr.bin/bc/extern.h Wed May 7 08:04:41 2014 (r265532) +++ stable/10/usr.bin/bc/extern.h Wed May 7 08:06:54 2014 (r265533) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $OpenBSD: extern.h,v 1.6 2006/03/18 20:44:43 otto Exp $ */ +/* $OpenBSD: extern.h,v 1.10 2013/09/19 16:12:01 otto Exp $ */ /* * Copyright (c) 2003, Otto Moerbeek @@ -17,26 +17,31 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include #include struct lvalue { - ssize_t load; - ssize_t store; + ssize_t load; + ssize_t store; }; -int yylex(void); -void yyerror(const char *); -void fatal(const char *); -void abort_line(int); - -extern int lineno; -extern int fileindex; -extern int sargc; +int yylex(void); +void yyerror(const char *); +void fatal(const char *); +void abort_line(int); +struct termios; +int gettty(struct termios *); +void tstpcont(int); +unsigned char bc_eof(EditLine *, int); + +extern int lineno; +extern int fileindex; +extern int sargc; extern const char **sargv; extern const char *filename; -extern char *cmdexpr; extern bool interactive; extern EditLine *el; extern History *hist; extern HistEvent he; - +extern char *cmdexpr; +extern struct termios ttysaved; Modified: stable/10/usr.bin/bc/scan.l ============================================================================== --- stable/10/usr.bin/bc/scan.l Wed May 7 08:04:41 2014 (r265532) +++ stable/10/usr.bin/bc/scan.l Wed May 7 08:06:54 2014 (r265533) @@ -1,5 +1,5 @@ %{ -/* $OpenBSD: scan.l,v 1.23 2009/10/27 23:59:36 deraadt Exp $ */ +/* $OpenBSD: scan.l,v 1.28 2013/09/19 16:12:01 otto Exp $ */ /* * Copyright (c) 2003, Otto Moerbeek @@ -24,6 +24,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -31,19 +32,22 @@ __FBSDID("$FreeBSD$"); #include "bc.h" #include "pathnames.h" -int lineno; +int lineno; +bool interactive; -bool interactive; HistEvent he; EditLine *el; History *hist; static char *strbuf = NULL; -static size_t strbuf_sz = 1; -static bool dot_seen; +static size_t strbuf_sz = 1; +static bool dot_seen; +static int use_el; +static volatile sig_atomic_t skipchars; + +static void init_strbuf(void); +static void add_str(const char *); -static void init_strbuf(void); -static void add_str(const char *); static int bc_yyinput(char *, int); #define YY_DECL int yylex(void) @@ -51,6 +55,7 @@ static int bc_yyinput(char *, int); #undef YY_INPUT #define YY_INPUT(buf,retval,max) \ (retval = bc_yyinput(buf, max)) + %} %option always-interactive @@ -102,7 +107,7 @@ ALPHANUM [a-z_0-9] BEGIN(INITIAL); yylval.str = strbuf; unput('.'); - return (NUMBER); + return NUMBER; } else { dot_seen = true; add_str("."); @@ -113,73 +118,73 @@ ALPHANUM [a-z_0-9] BEGIN(INITIAL); unput(yytext[0]); if (strcmp(strbuf, ".") == 0) - return (DOT); + return DOT; else { yylval.str = strbuf; - return (NUMBER); + return NUMBER; } } } -"auto" return (AUTO); -"break" return (BREAK); -"continue" return (CONTINUE); -"define" return (DEFINE); -"else" return (ELSE); -"ibase" return (IBASE); -"if" return (IF); -"last" return (DOT); -"for" return (FOR); -"length" return (LENGTH); -"obase" return (OBASE); -"print" return (PRINT); -"quit" return (QUIT); -"return" return (RETURN); -"scale" return (SCALE); -"sqrt" return (SQRT); -"while" return (WHILE); - -"^" return (EXPONENT); -"*" return (MULTIPLY); -"/" return (DIVIDE); -"%" return (REMAINDER); - -"!" return (BOOL_NOT); -"&&" return (BOOL_AND); -"||" return (BOOL_OR); - -"+" return (PLUS); -"-" return (MINUS); - -"++" return (INCR); -"--" return (DECR); - -"=" yylval.str = ""; return (ASSIGN_OP); -"+=" yylval.str = "+"; return (ASSIGN_OP); -"-=" yylval.str = "-"; return (ASSIGN_OP); -"*=" yylval.str = "*"; return (ASSIGN_OP); -"/=" yylval.str = "/"; return (ASSIGN_OP); -"%=" yylval.str = "%"; return (ASSIGN_OP); -"^=" yylval.str = "^"; return (ASSIGN_OP); - -"==" return (EQUALS); -"<=" return (LESS_EQ); -">=" return (GREATER_EQ); -"!=" return (UNEQUALS); -"<" return (LESS); -">" return (GREATER); - -"," return (COMMA); -";" return (SEMICOLON); +"auto" return AUTO; +"break" return BREAK; +"continue" return CONTINUE; +"define" return DEFINE; +"else" return ELSE; +"ibase" return IBASE; +"if" return IF; +"last" return DOT; +"for" return FOR; +"length" return LENGTH; +"obase" return OBASE; +"print" return PRINT; +"quit" return QUIT; +"return" return RETURN; +"scale" return SCALE; +"sqrt" return SQRT; +"while" return WHILE; + +"^" return EXPONENT; +"*" return MULTIPLY; +"/" return DIVIDE; +"%" return REMAINDER; + +"!" return BOOL_NOT; +"&&" return BOOL_AND; +"||" return BOOL_OR; + +"+" return PLUS; +"-" return MINUS; + +"++" return INCR; +"--" return DECR; + +"=" yylval.str = ""; return ASSIGN_OP; +"+=" yylval.str = "+"; return ASSIGN_OP; +"-=" yylval.str = "-"; return ASSIGN_OP; +"*=" yylval.str = "*"; return ASSIGN_OP; +"/=" yylval.str = "/"; return ASSIGN_OP; +"%=" yylval.str = "%"; return ASSIGN_OP; +"^=" yylval.str = "^"; return ASSIGN_OP; + +"==" return EQUALS; +"<=" return LESS_EQ; +">=" return GREATER_EQ; +"!=" return UNEQUALS; +"<" return LESS; +">" return GREATER; + +"," return COMMA; +";" return SEMICOLON; -"(" return (LPAR); -")" return (RPAR); +"(" return LPAR; +")" return RPAR; -"[" return (LBRACKET); -"]" return (RBRACKET); +"[" return LBRACKET; +"]" return RBRACKET; -"{" return (LBRACE); -"}" return (RBRACE); +"{" return LBRACE; +"}" return RBRACE; {ALPHA}{ALPHANUM}* { /* alloc an extra byte for the type marker */ @@ -188,15 +193,15 @@ ALPHANUM [a-z_0-9] err(1, NULL); strlcpy(p, yytext, yyleng + 1); yylval.astr = p; - return (LETTER); + return LETTER; } \\\n lineno++; -\n lineno++; return (NEWLINE); +\n lineno++; return NEWLINE; #[^\n]* ; [ \t] ; -<> return (QUIT); +<> return QUIT; . yyerror("illegal character"); %% @@ -204,7 +209,6 @@ ALPHANUM [a-z_0-9] static void init_strbuf(void) { - if (strbuf == NULL) { strbuf = malloc(strbuf_sz); if (strbuf == NULL) @@ -221,8 +225,8 @@ add_str(const char *str) arglen = strlen(str); if (strlen(strbuf) + arglen + 1 > strbuf_sz) { - size_t newsize; - char *p; + size_t newsize; + char *p; newsize = strbuf_sz + arglen + 1; p = realloc(strbuf, newsize); @@ -236,11 +240,47 @@ add_str(const char *str) strlcat(strbuf, str, strbuf_sz); } +/* ARGSUSED */ +void +abort_line(int sig __unused) +{ + static const char str1[] = "[\n]P\n"; + static const char str2[] = "[^C\n]P\n"; + int save_errno; + const LineInfo *info; + + save_errno = errno; + if (use_el) { + write(STDOUT_FILENO, str2, sizeof(str2) - 1); + info = el_line(el); + skipchars = info->lastchar - info->buffer; + } else + write(STDOUT_FILENO, str1, sizeof(str1) - 1); + errno = save_errno; +} + +/* + * Avoid the echo of ^D by the default code of editline and take + * into account skipchars to make ^D work when the cursor is at start of + * line after a ^C. + */ +unsigned char +bc_eof(EditLine *e, int ch __unused) +{ + const struct lineinfo *info = el_line(e); + + if (info->buffer + skipchars == info->cursor && + info->cursor == info->lastchar) + return (CC_EOF); + else + return (CC_ERROR); +} + int yywrap(void) { - static YY_BUFFER_STATE buf; static int state; + static YY_BUFFER_STATE buf; if (fileindex == 0 && sargc > 0 && strcmp(sargv[0], _PATH_LIBB) == 0) { filename = sargv[fileindex++]; @@ -273,6 +313,10 @@ yywrap(void) } else if (fileindex == sargc) { fileindex++; yyin = stdin; + if (interactive) { + signal(SIGINT, abort_line); + signal(SIGTSTP, tstpcont); + } lineno = 1; filename = "stdin"; return (0); @@ -284,17 +328,32 @@ static int bc_yyinput(char *buf, int maxlen) { int num; - if (yyin == stdin && interactive) { + + if (el != NULL) + el_get(el, EL_EDITMODE, &use_el); + + if (yyin == stdin && interactive && use_el) { const char *bp; + sigset_t oset, nset; if ((bp = el_gets(el, &num)) == NULL || num == 0) return (0); + sigemptyset(&nset); + sigaddset(&nset, SIGINT); + sigprocmask(SIG_BLOCK, &nset, &oset); + if (skipchars < num) { + bp += skipchars; + num -= skipchars; + } + skipchars = 0; + sigprocmask(SIG_SETMASK, &oset, NULL); if (num > maxlen) { - el_push(el, (char *)(uintptr_t)(bp) + maxlen); + el_push(el, bp + maxlen); num = maxlen; } memcpy(buf, bp, num); history(hist, &he, H_ENTER, bp); + el_get(el, EL_EDITMODE, &use_el); } else { int c = '*'; for (num = 0; num < maxlen && @@ -308,3 +367,4 @@ bc_yyinput(char *buf, int maxlen) return (num); } + Copied: stable/10/usr.bin/bc/tty.c (from r264573, head/usr.bin/bc/tty.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.bin/bc/tty.c Wed May 7 08:06:54 2014 (r265533, copy of r264573, head/usr.bin/bc/tty.c) @@ -0,0 +1,65 @@ +/* $FreeBSD$ */ +/* $OpenBSD: tty.c,v 1.2 2013/11/12 13:54:51 deraadt Exp $ */ + +/* + * Copyright (c) 2013, Otto Moerbeek + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include +#include +#include +#include "extern.h" + +struct termios ttysaved, ttyedit; + +static int +settty(struct termios *t) +{ + int ret; + + while ((ret = tcsetattr(0, TCSADRAIN, t) == -1) && errno == EINTR) + continue; + return ret; +} + +int +gettty(struct termios *t) +{ + int ret; + + while ((ret = tcgetattr(0, t) == -1) && errno == EINTR) + continue; + return ret; +} + +/* ARGSUSED */ +void +tstpcont(int sig) +{ + int save_errno = errno; + + if (sig == SIGTSTP) { + signal(SIGCONT, tstpcont); + gettty(&ttyedit); + settty(&ttysaved); + } else { + signal(SIGTSTP, tstpcont); + settty(&ttyedit); + } + signal(sig, SIG_DFL); + kill(0, sig); + errno = save_errno; +} Modified: stable/10/usr.bin/dc/bcode.c ============================================================================== --- stable/10/usr.bin/dc/bcode.c Wed May 7 08:04:41 2014 (r265532) +++ stable/10/usr.bin/dc/bcode.c Wed May 7 08:06:54 2014 (r265533) @@ -1,4 +1,4 @@ -/* $OpenBSD: bcode.c,v 1.40 2009/10/27 23:59:37 deraadt Exp $ */ +/* $OpenBSD: bcode.c,v 1.45 2012/11/07 11:06:14 otto Exp $ */ /* * Copyright (c) 2003, Otto Moerbeek @@ -29,7 +29,7 @@ __FBSDID("$FreeBSD$"); #include "extern.h" -#define __inline +/* #define DEBUGGING */ #define MAX_ARRAY_INDEX 2048 #define READSTACK_SIZE 8 @@ -253,7 +253,7 @@ init_bmachine(bool extended_registers) u_int bmachine_scale(void) { - return (bmachine.scale); + return bmachine.scale; } /* Reset the things needed before processing a (new) file */ @@ -428,7 +428,6 @@ get_ulong(struct number *n) void negate(struct number *n) { - BN_set_negative(n->number, !BN_is_negative(n->number)); } @@ -695,7 +694,7 @@ count_digits(const struct number *n) u_int i; if (BN_is_zero(n->number)) - return (n->scale ? n->scale : 1); + return n->scale ? n->scale : 1; int_part = new_number(); fract_part = new_number(); @@ -1171,9 +1170,10 @@ bdivmod(void) static void bexp(void) { - struct number *a, *p, *r; - u_int rscale; - bool neg; + struct number *a, *p; + struct number *r; + bool neg; + u_int rscale; p = pop_number(); if (p == NULL) { @@ -1193,8 +1193,7 @@ bexp(void) bn_checkp(f); split_number(p, i, f); if (!BN_is_zero(f)) - warnx("Runtime warning: non-zero fractional part " - "in exponent"); + warnx("Runtime warning: non-zero fractional part in exponent"); BN_free(i); BN_free(f); } Modified: stable/10/usr.bin/dc/bcode.h ============================================================================== --- stable/10/usr.bin/dc/bcode.h Wed May 7 08:04:41 2014 (r265532) +++ stable/10/usr.bin/dc/bcode.h Wed May 7 08:06:54 2014 (r265533) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $OpenBSD: bcode.h,v 1.5 2006/01/16 08:09:25 otto Exp $ */ +/* $OpenBSD: bcode.h,v 1.7 2012/11/07 11:06:14 otto Exp $ */ /* * Copyright (c) 2003, Otto Moerbeek @@ -83,15 +83,15 @@ struct source { int lastchar; }; -void init_bmachine(bool); -void reset_bmachine(struct source *); -u_int bmachine_scale(void); -void scale_number(BIGNUM *, int); -void normalize(struct number *, u_int); -void eval(void); -void pn(const char *, const struct number *); -void pbn(const char *, const BIGNUM *); -void negate(struct number *); -void split_number(const struct number *, BIGNUM *, BIGNUM *); -void bmul_number(struct number *, struct number *, - struct number *, u_int); +void init_bmachine(bool); +void reset_bmachine(struct source *); +u_int bmachine_scale(void); +void scale_number(BIGNUM *, int); +void normalize(struct number *, u_int); +void eval(void); +void pn(const char *, const struct number *); +void pbn(const char *, const BIGNUM *); +void negate(struct number *); +void split_number(const struct number *, BIGNUM *, BIGNUM *); +void bmul_number(struct number *, struct number *, + struct number *, u_int scale); Modified: stable/10/usr.bin/dc/dc.1 ============================================================================== --- stable/10/usr.bin/dc/dc.1 Wed May 7 08:04:41 2014 (r265532) +++ stable/10/usr.bin/dc/dc.1 Wed May 7 08:06:54 2014 (r265533) @@ -1,5 +1,5 @@ .\" $FreeBSD$ -.\" $OpenBSD: dc.1,v 1.24 2010/01/02 19:48:56 schwarze Exp $ +.\" $OpenBSD: dc.1,v 1.27 2012/08/19 12:07:21 jmc Exp $ .\" .\" Copyright (C) Caldera International Inc. 2001-2002. .\" All rights reserved. @@ -35,7 +35,7 @@ .\" .\" @(#)dc.1 8.1 (Berkeley) 6/6/93 .\" -.Dd January 22, 2010 +.Dd April 16, 2014 .Dt DC 1 .Os .Sh NAME @@ -73,12 +73,6 @@ Evaluate If multiple .Fl e options are specified, they will be processed in the order given. -If no -.Ar filename -argument is given, execution will stop after processing the expressions -given on the command line, -otherwise processing will continue with the contents of -.Ar filename . .It Fl f Ar filename , Fl Fl file Ar filename Process the content of the given file before further calculations are done. If multiple @@ -98,14 +92,26 @@ See for a more detailed description. .El .Pp +If neither +.Ar expression +nor +.Ar file +are specified on the command line, +.Nm +reads from the standard input. +Otherwise +.Ar expression +and +.Ar file +are processed and +.Nm +exits. +.Pp Ordinarily, .Nm operates on decimal integers, but one may specify an input base, output base, and a number of fractional digits (scale) to be maintained. -If an argument is given, -input is taken from that file until its end, -then from the standard input. Whitespace is ignored, except where it signals the end of a number, end of a line or when a register name is expected. The following constructions are recognized: Modified: stable/10/usr.bin/dc/inout.c ============================================================================== --- stable/10/usr.bin/dc/inout.c Wed May 7 08:04:41 2014 (r265532) +++ stable/10/usr.bin/dc/inout.c Wed May 7 08:06:54 2014 (r265533) @@ -1,4 +1,4 @@ -/* $OpenBSD: inout.c,v 1.15 2009/10/27 23:59:37 deraadt Exp $ */ +/* $OpenBSD: inout.c,v 1.17 2012/11/07 11:06:14 otto Exp $ */ /* * Copyright (c) 2003, Otto Moerbeek From owner-svn-src-stable@FreeBSD.ORG Wed May 7 09:55:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2D8FCED; Wed, 7 May 2014 09:55:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D13BC11A; Wed, 7 May 2014 09:55:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s479tmw5085312; Wed, 7 May 2014 09:55:48 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s479tlrA085306; Wed, 7 May 2014 09:55:47 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201405070955.s479tlrA085306@svn.freebsd.org> From: Marius Strobl Date: Wed, 7 May 2014 09:55:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265536 - in stable/10: sbin/gvinum sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 09:55:49 -0000 Author: marius Date: Wed May 7 09:55:47 2014 New Revision: 265536 URL: http://svnweb.freebsd.org/changeset/base/265536 Log: MFC: r265248 Allow GEOM_VINUM to be statically compiled into the kernel. Submitted by: gleb Modified: stable/10/sbin/gvinum/gvinum.c stable/10/sbin/gvinum/gvinum.h stable/10/sys/conf/NOTES stable/10/sys/conf/files stable/10/sys/conf/options Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/gvinum/gvinum.c ============================================================================== --- stable/10/sbin/gvinum/gvinum.c Wed May 7 09:15:46 2014 (r265535) +++ stable/10/sbin/gvinum/gvinum.c Wed May 7 09:55:47 2014 (r265536) @@ -95,8 +95,10 @@ main(int argc, char **argv) char buffer[BUFSIZ], *inputline, *token[GV_MAXARGS]; /* Load the module if necessary. */ - if (kldfind(GVINUMMOD) < 0 && kldload(GVINUMMOD) < 0) - err(1, GVINUMMOD ": Kernel module not available"); + if (modfind(GVINUMMOD) < 0) { + if (kldload(GVINUMKLD) < 0 && modfind(GVINUMMOD) < 0) + err(1, GVINUMKLD ": Kernel module not available"); + } /* Arguments given on the command line. */ if (argc > 1) { @@ -1204,9 +1206,10 @@ gvinum_stop(int argc, char **argv) { int err, fileid; - fileid = kldfind(GVINUMMOD); + fileid = kldfind(GVINUMKLD); if (fileid == -1) { - warn("cannot find " GVINUMMOD); + if (modfind(GVINUMMOD) < 0) + warn("cannot find " GVINUMKLD); return; } @@ -1216,7 +1219,7 @@ gvinum_stop(int argc, char **argv) * event thread will be free for the g_wither_geom() call from * gv_unload(). It's silly, but it works. */ - printf("unloading " GVINUMMOD " kernel module... "); + printf("unloading " GVINUMKLD " kernel module... "); fflush(stdout); if ((err = kldunload(fileid)) != 0 && (errno == EAGAIN)) { sleep(1); @@ -1224,7 +1227,7 @@ gvinum_stop(int argc, char **argv) } if (err != 0) { printf(" failed!\n"); - warn("cannot unload " GVINUMMOD); + warn("cannot unload " GVINUMKLD); return; } Modified: stable/10/sbin/gvinum/gvinum.h ============================================================================== --- stable/10/sbin/gvinum/gvinum.h Wed May 7 09:15:46 2014 (r265535) +++ stable/10/sbin/gvinum/gvinum.h Wed May 7 09:55:47 2014 (r265536) @@ -36,4 +36,5 @@ /* $FreeBSD$ */ -#define GVINUMMOD "geom_vinum" +#define GVINUMMOD "g_vinum" +#define GVINUMKLD "geom_vinum" Modified: stable/10/sys/conf/NOTES ============================================================================== --- stable/10/sys/conf/NOTES Wed May 7 09:15:46 2014 (r265535) +++ stable/10/sys/conf/NOTES Wed May 7 09:55:47 2014 (r265536) @@ -176,6 +176,7 @@ options GEOM_SHSEC # Shared secret. options GEOM_STRIPE # Disk striping. options GEOM_SUNLABEL # Sun/Solaris partitioning options GEOM_UZIP # Read-only compressed disks +options GEOM_VINUM # Vinum logical volume manager options GEOM_VIRSTOR # Virtual storage. options GEOM_VOL # Volume names from UFS superblock options GEOM_ZERO # Performance testing helper. Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Wed May 7 09:15:46 2014 (r265535) +++ stable/10/sys/conf/files Wed May 7 09:55:47 2014 (r265536) @@ -2788,6 +2788,21 @@ contrib/xz-embedded/linux/lib/xz/xz_dec_ optional xz_embedded | geom_uncompress \ compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" geom/uzip/g_uzip.c optional geom_uzip +geom/vinum/geom_vinum.c optional geom_vinum +geom/vinum/geom_vinum_create.c optional geom_vinum +geom/vinum/geom_vinum_drive.c optional geom_vinum +geom/vinum/geom_vinum_plex.c optional geom_vinum +geom/vinum/geom_vinum_volume.c optional geom_vinum +geom/vinum/geom_vinum_subr.c optional geom_vinum +geom/vinum/geom_vinum_raid5.c optional geom_vinum +geom/vinum/geom_vinum_share.c optional geom_vinum +geom/vinum/geom_vinum_list.c optional geom_vinum +geom/vinum/geom_vinum_rm.c optional geom_vinum +geom/vinum/geom_vinum_init.c optional geom_vinum +geom/vinum/geom_vinum_state.c optional geom_vinum +geom/vinum/geom_vinum_rename.c optional geom_vinum +geom/vinum/geom_vinum_move.c optional geom_vinum +geom/vinum/geom_vinum_events.c optional geom_vinum geom/virstor/binstream.c optional geom_virstor geom/virstor/g_virstor.c optional geom_virstor geom/virstor/g_virstor_md.c optional geom_virstor Modified: stable/10/sys/conf/options ============================================================================== --- stable/10/sys/conf/options Wed May 7 09:15:46 2014 (r265535) +++ stable/10/sys/conf/options Wed May 7 09:55:47 2014 (r265536) @@ -123,6 +123,7 @@ GEOM_STRIPE opt_geom.h GEOM_SUNLABEL opt_geom.h GEOM_UNCOMPRESS opt_geom.h GEOM_UZIP opt_geom.h +GEOM_VINUM opt_geom.h GEOM_VIRSTOR opt_geom.h GEOM_VOL opt_geom.h GEOM_ZERO opt_geom.h From owner-svn-src-stable@FreeBSD.ORG Wed May 7 09:56:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C99BE26; Wed, 7 May 2014 09:56:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0993112A; Wed, 7 May 2014 09:56:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s479uEUB085439; Wed, 7 May 2014 09:56:14 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s479uE43085436; Wed, 7 May 2014 09:56:14 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201405070956.s479uE43085436@svn.freebsd.org> From: Marius Strobl Date: Wed, 7 May 2014 09:56:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265537 - stable/9/sys/conf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 09:56:15 -0000 Author: marius Date: Wed May 7 09:56:14 2014 New Revision: 265537 URL: http://svnweb.freebsd.org/changeset/base/265537 Log: MFC: r265248 Allow GEOM_VINUM to be statically compiled into the kernel. Submitted by: gleb Modified: stable/9/sys/conf/NOTES stable/9/sys/conf/files stable/9/sys/conf/options Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) Modified: stable/9/sys/conf/NOTES ============================================================================== --- stable/9/sys/conf/NOTES Wed May 7 09:55:47 2014 (r265536) +++ stable/9/sys/conf/NOTES Wed May 7 09:56:14 2014 (r265537) @@ -170,6 +170,7 @@ options GEOM_SHSEC # Shared secret. options GEOM_STRIPE # Disk striping. options GEOM_SUNLABEL # Sun/Solaris partitioning options GEOM_UZIP # Read-only compressed disks +options GEOM_VINUM # Vinum logical volume manager options GEOM_VIRSTOR # Virtual storage. options GEOM_VOL # Volume names from UFS superblock options GEOM_ZERO # Performance testing helper. Modified: stable/9/sys/conf/files ============================================================================== --- stable/9/sys/conf/files Wed May 7 09:55:47 2014 (r265536) +++ stable/9/sys/conf/files Wed May 7 09:56:14 2014 (r265537) @@ -2389,6 +2389,21 @@ contrib/xz-embedded/linux/lib/xz/xz_dec_ optional xz_embedded | geom_uncompress \ compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" geom/uzip/g_uzip.c optional geom_uzip +geom/vinum/geom_vinum.c optional geom_vinum +geom/vinum/geom_vinum_create.c optional geom_vinum +geom/vinum/geom_vinum_drive.c optional geom_vinum +geom/vinum/geom_vinum_plex.c optional geom_vinum +geom/vinum/geom_vinum_volume.c optional geom_vinum +geom/vinum/geom_vinum_subr.c optional geom_vinum +geom/vinum/geom_vinum_raid5.c optional geom_vinum +geom/vinum/geom_vinum_share.c optional geom_vinum +geom/vinum/geom_vinum_list.c optional geom_vinum +geom/vinum/geom_vinum_rm.c optional geom_vinum +geom/vinum/geom_vinum_init.c optional geom_vinum +geom/vinum/geom_vinum_state.c optional geom_vinum +geom/vinum/geom_vinum_rename.c optional geom_vinum +geom/vinum/geom_vinum_move.c optional geom_vinum +geom/vinum/geom_vinum_events.c optional geom_vinum geom/virstor/binstream.c optional geom_virstor geom/virstor/g_virstor.c optional geom_virstor geom/virstor/g_virstor_md.c optional geom_virstor Modified: stable/9/sys/conf/options ============================================================================== --- stable/9/sys/conf/options Wed May 7 09:55:47 2014 (r265536) +++ stable/9/sys/conf/options Wed May 7 09:56:14 2014 (r265537) @@ -114,6 +114,7 @@ GEOM_STRIPE opt_geom.h GEOM_SUNLABEL opt_geom.h GEOM_UNCOMPRESS opt_geom.h GEOM_UZIP opt_geom.h +GEOM_VINUM opt_geom.h GEOM_VIRSTOR opt_geom.h GEOM_VOL opt_geom.h GEOM_ZERO opt_geom.h From owner-svn-src-stable@FreeBSD.ORG Wed May 7 09:56:29 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E0ECAF66; Wed, 7 May 2014 09:56:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B32A7130; Wed, 7 May 2014 09:56:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s479uTK0085521; Wed, 7 May 2014 09:56:29 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s479uTtv085517; Wed, 7 May 2014 09:56:29 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201405070956.s479uTtv085517@svn.freebsd.org> From: Marius Strobl Date: Wed, 7 May 2014 09:56:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r265538 - stable/8/sys/conf X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 09:56:30 -0000 Author: marius Date: Wed May 7 09:56:28 2014 New Revision: 265538 URL: http://svnweb.freebsd.org/changeset/base/265538 Log: MFC: r265248 Allow GEOM_VINUM to be statically compiled into the kernel. Submitted by: gleb Modified: stable/8/sys/conf/NOTES stable/8/sys/conf/files stable/8/sys/conf/options Directory Properties: stable/8/sys/ (props changed) stable/8/sys/conf/ (props changed) Modified: stable/8/sys/conf/NOTES ============================================================================== --- stable/8/sys/conf/NOTES Wed May 7 09:56:14 2014 (r265537) +++ stable/8/sys/conf/NOTES Wed May 7 09:56:28 2014 (r265538) @@ -161,6 +161,7 @@ options GEOM_SHSEC # Shared secret. options GEOM_STRIPE # Disk striping. options GEOM_SUNLABEL # Sun/Solaris partitioning options GEOM_UZIP # Read-only compressed disks +options GEOM_VINUM # Vinum logical volume manager options GEOM_VIRSTOR # Virtual storage. options GEOM_VOL # Volume names from UFS superblock options GEOM_ZERO # Performance testing helper. Modified: stable/8/sys/conf/files ============================================================================== --- stable/8/sys/conf/files Wed May 7 09:56:14 2014 (r265537) +++ stable/8/sys/conf/files Wed May 7 09:56:28 2014 (r265538) @@ -2127,6 +2127,21 @@ geom/raid3/g_raid3_ctl.c optional geom_r geom/shsec/g_shsec.c optional geom_shsec geom/stripe/g_stripe.c optional geom_stripe geom/uzip/g_uzip.c optional geom_uzip +geom/vinum/geom_vinum.c optional geom_vinum +geom/vinum/geom_vinum_create.c optional geom_vinum +geom/vinum/geom_vinum_drive.c optional geom_vinum +geom/vinum/geom_vinum_plex.c optional geom_vinum +geom/vinum/geom_vinum_volume.c optional geom_vinum +geom/vinum/geom_vinum_subr.c optional geom_vinum +geom/vinum/geom_vinum_raid5.c optional geom_vinum +geom/vinum/geom_vinum_share.c optional geom_vinum +geom/vinum/geom_vinum_list.c optional geom_vinum +geom/vinum/geom_vinum_rm.c optional geom_vinum +geom/vinum/geom_vinum_init.c optional geom_vinum +geom/vinum/geom_vinum_state.c optional geom_vinum +geom/vinum/geom_vinum_rename.c optional geom_vinum +geom/vinum/geom_vinum_move.c optional geom_vinum +geom/vinum/geom_vinum_events.c optional geom_vinum geom/virstor/binstream.c optional geom_virstor geom/virstor/g_virstor.c optional geom_virstor geom/virstor/g_virstor_md.c optional geom_virstor Modified: stable/8/sys/conf/options ============================================================================== --- stable/8/sys/conf/options Wed May 7 09:56:14 2014 (r265537) +++ stable/8/sys/conf/options Wed May 7 09:56:28 2014 (r265538) @@ -110,6 +110,7 @@ GEOM_SHSEC opt_geom.h GEOM_STRIPE opt_geom.h GEOM_SUNLABEL opt_geom.h GEOM_UZIP opt_geom.h +GEOM_VINUM opt_geom.h GEOM_VIRSTOR opt_geom.h GEOM_VOL opt_geom.h GEOM_ZERO opt_geom.h From owner-svn-src-stable@FreeBSD.ORG Wed May 7 11:49:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC2B04FF; Wed, 7 May 2014 11:49:06 +0000 (UTC) Received: from cyrus.watson.org (cyrus.watson.org [198.74.231.69]) by mx1.freebsd.org (Postfix) with ESMTP id 97082D51; Wed, 7 May 2014 11:49:06 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [198.74.231.63]) by cyrus.watson.org (Postfix) with ESMTPS id 8638146B60; Wed, 7 May 2014 07:49:05 -0400 (EDT) Date: Wed, 7 May 2014 12:49:05 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Edward Tomasz Napierala Subject: Re: svn commit: r265498 - stable/10/sys/dev/iscsi In-Reply-To: <201405070638.s476cK2J092699@svn.freebsd.org> Message-ID: References: <201405070638.s476cK2J092699@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 11:49:06 -0000 On Wed, 7 May 2014, Edward Tomasz Napierala wrote: > Author: trasz > Date: Wed May 7 06:38:19 2014 > New Revision: 265498 > URL: http://svnweb.freebsd.org/changeset/base/265498 > > Log: > MFC r264025: > > Get rid of the "autoscaling", instead just set socket buffer sizes > in the usual way. The only thing the old code did was making things > less predictable. Does this mean that the autoscaling algorithm needs refining? The problem with disabling autoscaling is that the code may, in the future, fail to benefit from further global refinements, as old code that hard-coded sizes now fails to do -- and that if we don't refine the autoscaling model, other applications may fail to benefit. Robert From owner-svn-src-stable@FreeBSD.ORG Wed May 7 12:48:19 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 16FF1D20; Wed, 7 May 2014 12:48:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0409B2D0; Wed, 7 May 2014 12:48:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47CmIBB064492; Wed, 7 May 2014 12:48:18 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47CmIVi064491; Wed, 7 May 2014 12:48:18 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201405071248.s47CmIVi064491@svn.freebsd.org> From: Glen Barber Date: Wed, 7 May 2014 12:48:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265545 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 12:48:19 -0000 Author: gjb Date: Wed May 7 12:48:18 2014 New Revision: 265545 URL: http://svnweb.freebsd.org/changeset/base/265545 Log: Document r265388, addition of mpr(4). Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 7 12:45:33 2014 (r265544) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 7 12:48:18 2014 (r265545) @@ -134,6 +134,10 @@ which allows controlling how long the system will wait after &man.panic.9; before rebooting. + The &man.mpr.4; device has been added, + providing support for LSI Fusion-MPT 3 12Gb SCSI/SATA + controllers. + Virtualization support From owner-svn-src-stable@FreeBSD.ORG Wed May 7 15:01:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0DCD5EF4; Wed, 7 May 2014 15:01:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE5D2261; Wed, 7 May 2014 15:01:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47F1EAA024876; Wed, 7 May 2014 15:01:14 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47F1EZS024875; Wed, 7 May 2014 15:01:14 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201405071501.s47F1EZS024875@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 7 May 2014 15:01:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265549 - stable/9/sys/dev/cxgbe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 15:01:15 -0000 Author: np Date: Wed May 7 15:01:14 2014 New Revision: 265549 URL: http://svnweb.freebsd.org/changeset/base/265549 Log: MFC r257654 cxgbe(4): Exclude MPS_RPLC_MAP_CTL (0x11114) from the register dump. Turns out it's a write-only register with strange side effects on read. Modified: stable/9/sys/dev/cxgbe/t4_main.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_main.c Wed May 7 14:57:56 2014 (r265548) +++ stable/9/sys/dev/cxgbe/t4_main.c Wed May 7 15:01:14 2014 (r265549) @@ -3375,7 +3375,8 @@ t4_get_regs(struct adapter *sc, struct t 0xd004, 0xd03c, 0xdfc0, 0xdfe0, 0xe000, 0xea7c, - 0xf000, 0x11190, + 0xf000, 0x11110, + 0x11118, 0x11190, 0x19040, 0x1906c, 0x19078, 0x19080, 0x1908c, 0x19124, @@ -3581,7 +3582,8 @@ t4_get_regs(struct adapter *sc, struct t 0xd004, 0xd03c, 0xdfc0, 0xdfe0, 0xe000, 0x11088, - 0x1109c, 0x1117c, + 0x1109c, 0x11110, + 0x11118, 0x1117c, 0x11190, 0x11204, 0x19040, 0x1906c, 0x19078, 0x19080, From owner-svn-src-stable@FreeBSD.ORG Wed May 7 15:13:58 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A01255C; Wed, 7 May 2014 15:13:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB19C3B7; Wed, 7 May 2014 15:13:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47FDvpw029935; Wed, 7 May 2014 15:13:57 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47FDv2Y029933; Wed, 7 May 2014 15:13:57 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201405071513.s47FDv2Y029933@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 7 May 2014 15:13:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265551 - stable/9/sys/dev/cxgbe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 15:13:58 -0000 Author: np Date: Wed May 7 15:13:57 2014 New Revision: 265551 URL: http://svnweb.freebsd.org/changeset/base/265551 Log: MFC r257772, r258441, and r258689. r257772: cxgbe(4): Tidy up the display for payload memory statistics (pm_stats). # sysctl -n dev.t4nex.0.misc.pm_stats # sysctl -n dev.t5nex.0.misc.pm_stats r258441: cxgbe(4): update the internal list of device features. r258689: Disable an assertion that relies on some code[1] that isn't in HEAD yet. [1] http://lists.freebsd.org/pipermail/freebsd-net/2013-August/036573.html Modified: stable/9/sys/dev/cxgbe/t4_main.c stable/9/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_main.c Wed May 7 15:08:00 2014 (r265550) +++ stable/9/sys/dev/cxgbe/t4_main.c Wed May 7 15:13:57 2014 (r265551) @@ -4141,13 +4141,15 @@ t4_sysctls(struct adapter *sc) struct sysctl_oid_list *children, *c0; static char *caps[] = { "\20\1PPP\2QFC\3DCBX", /* caps[0] linkcaps */ - "\20\1NIC\2VM\3IDS\4UM\5UM_ISGL", /* caps[1] niccaps */ + "\20\1NIC\2VM\3IDS\4UM\5UM_ISGL" /* caps[1] niccaps */ + "\6HASHFILTER\7ETHOFLD", "\20\1TOE", /* caps[2] toecaps */ "\20\1RDDP\2RDMAC", /* caps[3] rdmacaps */ "\20\1INITIATOR_PDU\2TARGET_PDU" /* caps[4] iscsicaps */ "\3INITIATOR_CNXOFLD\4TARGET_CNXOFLD" "\5INITIATOR_SSNOFLD\6TARGET_SSNOFLD", "\20\1INITIATOR\2TARGET\3CTRL_OFLD" /* caps[5] fcoecaps */ + "\4PO_INITIAOR\5PO_TARGET" }; static char *doorbells = {"\20\1UDB\2WCWR\3UDBWC\4KDB"}; @@ -5925,10 +5927,13 @@ sysctl_pm_stats(SYSCTL_HANDLER_ARGS) struct adapter *sc = arg1; struct sbuf *sb; int rc, i; - uint32_t tx_cnt[PM_NSTATS], rx_cnt[PM_NSTATS]; - uint64_t tx_cyc[PM_NSTATS], rx_cyc[PM_NSTATS]; - static const char *pm_stats[] = { - "Read:", "Write bypass:", "Write mem:", "Flush:", "FIFO wait:" + uint32_t cnt[PM_NSTATS]; + uint64_t cyc[PM_NSTATS]; + static const char *rx_stats[] = { + "Read:", "Write bypass:", "Write mem:", "Flush:" + }; + static const char *tx_stats[] = { + "Read:", "Write bypass:", "Write mem:", "Bypass + mem:" }; rc = sysctl_wire_old_buffer(req, 0); @@ -5939,14 +5944,17 @@ sysctl_pm_stats(SYSCTL_HANDLER_ARGS) if (sb == NULL) return (ENOMEM); - t4_pmtx_get_stats(sc, tx_cnt, tx_cyc); - t4_pmrx_get_stats(sc, rx_cnt, rx_cyc); - - sbuf_printf(sb, " Tx count Tx cycles " - "Rx count Rx cycles"); - for (i = 0; i < PM_NSTATS; i++) - sbuf_printf(sb, "\n%-13s %10u %20ju %10u %20ju", - pm_stats[i], tx_cnt[i], tx_cyc[i], rx_cnt[i], rx_cyc[i]); + t4_pmtx_get_stats(sc, cnt, cyc); + sbuf_printf(sb, " Tx pcmds Tx bytes"); + for (i = 0; i < ARRAY_SIZE(tx_stats); i++) + sbuf_printf(sb, "\n%-13s %10u %20ju", tx_stats[i], cnt[i], + cyc[i]); + + t4_pmrx_get_stats(sc, cnt, cyc); + sbuf_printf(sb, "\n Rx pcmds Rx bytes"); + for (i = 0; i < ARRAY_SIZE(rx_stats); i++) + sbuf_printf(sb, "\n%-13s %10u %20ju", rx_stats[i], cnt[i], + cyc[i]); rc = sbuf_finish(sb); sbuf_delete(sb); Modified: stable/9/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_sge.c Wed May 7 15:08:00 2014 (r265550) +++ stable/9/sys/dev/cxgbe/t4_sge.c Wed May 7 15:13:57 2014 (r265551) @@ -1364,7 +1364,7 @@ rxb_free(void *arg1, void *arg2) { uma_zone_t zone = arg1; caddr_t cl = arg2; -#ifdef INVARIANTS +#ifdef notyet u_int refcount; refcount = *find_buf_refcnt(cl); From owner-svn-src-stable@FreeBSD.ORG Wed May 7 15:24:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 28D63D9F; Wed, 7 May 2014 15:24:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 09E576ED; Wed, 7 May 2014 15:24:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47FOPpR034703; Wed, 7 May 2014 15:24:25 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47FOPaR034696; Wed, 7 May 2014 15:24:25 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201405071524.s47FOPaR034696@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 7 May 2014 15:24:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265552 - in stable/9/sys/dev/cxgbe: . common X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 15:24:26 -0000 Author: np Date: Wed May 7 15:24:24 2014 New Revision: 265552 URL: http://svnweb.freebsd.org/changeset/base/265552 Log: MFC r258879: cxgbe(4): T4_SET_SCHED_CLASS and T4_SET_SCHED_QUEUE ioctls to program scheduling classes in the chip and to bind tx queue(s) to a scheduling class respectively. These can be used for various kinds of tx traffic throttling (to force selected tx queues to drain at a fixed Kbps rate, or a % of the port's total bandwidth, or at a fixed pps rate, etc.). Modified: stable/9/sys/dev/cxgbe/common/common.h stable/9/sys/dev/cxgbe/common/t4_hw.c stable/9/sys/dev/cxgbe/t4_ioctl.h stable/9/sys/dev/cxgbe/t4_main.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/9/sys/dev/cxgbe/common/common.h Wed May 7 15:13:57 2014 (r265551) +++ stable/9/sys/dev/cxgbe/common/common.h Wed May 7 15:24:24 2014 (r265552) @@ -587,4 +587,8 @@ int t4_sge_ctxt_rd_bd(struct adapter *ad int t4_sge_ctxt_flush(struct adapter *adap, unsigned int mbox); int t4_handle_fw_rpl(struct adapter *adap, const __be64 *rpl); int t4_fwaddrspace_write(struct adapter *adap, unsigned int mbox, u32 addr, u32 val); +int t4_sched_config(struct adapter *adapter, int type, int minmaxen); +int t4_sched_params(struct adapter *adapter, int type, int level, int mode, + int rateunit, int ratemode, int channel, int cl, + int minrate, int maxrate, int weight, int pktsize); #endif /* __CHELSIO_COMMON_H */ Modified: stable/9/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/9/sys/dev/cxgbe/common/t4_hw.c Wed May 7 15:13:57 2014 (r265551) +++ stable/9/sys/dev/cxgbe/common/t4_hw.c Wed May 7 15:24:24 2014 (r265552) @@ -5659,3 +5659,50 @@ int __devinit t4_port_init(struct port_i return 0; } + +int t4_sched_config(struct adapter *adapter, int type, int minmaxen) +{ + struct fw_sched_cmd cmd; + + memset(&cmd, 0, sizeof(cmd)); + cmd.op_to_write = cpu_to_be32(V_FW_CMD_OP(FW_SCHED_CMD) | + F_FW_CMD_REQUEST | + F_FW_CMD_WRITE); + cmd.retval_len16 = cpu_to_be32(FW_LEN16(cmd)); + + cmd.u.config.sc = FW_SCHED_SC_CONFIG; + cmd.u.config.type = type; + cmd.u.config.minmaxen = minmaxen; + + return t4_wr_mbox_meat(adapter,adapter->mbox, &cmd, sizeof(cmd), + NULL, 1); +} + +int t4_sched_params(struct adapter *adapter, int type, int level, int mode, + int rateunit, int ratemode, int channel, int cl, + int minrate, int maxrate, int weight, int pktsize) +{ + struct fw_sched_cmd cmd; + + memset(&cmd, 0, sizeof(cmd)); + cmd.op_to_write = cpu_to_be32(V_FW_CMD_OP(FW_SCHED_CMD) | + F_FW_CMD_REQUEST | + F_FW_CMD_WRITE); + cmd.retval_len16 = cpu_to_be32(FW_LEN16(cmd)); + + cmd.u.params.sc = FW_SCHED_SC_PARAMS; + cmd.u.params.type = type; + cmd.u.params.level = level; + cmd.u.params.mode = mode; + cmd.u.params.ch = channel; + cmd.u.params.cl = cl; + cmd.u.params.unit = rateunit; + cmd.u.params.rate = ratemode; + cmd.u.params.min = cpu_to_be32(minrate); + cmd.u.params.max = cpu_to_be32(maxrate); + cmd.u.params.weight = cpu_to_be16(weight); + cmd.u.params.pktsize = cpu_to_be16(pktsize); + + return t4_wr_mbox_meat(adapter,adapter->mbox, &cmd, sizeof(cmd), + NULL, 1); +} Modified: stable/9/sys/dev/cxgbe/t4_ioctl.h ============================================================================== --- stable/9/sys/dev/cxgbe/t4_ioctl.h Wed May 7 15:13:57 2014 (r265551) +++ stable/9/sys/dev/cxgbe/t4_ioctl.h Wed May 7 15:24:24 2014 (r265552) @@ -206,6 +206,74 @@ struct t4_filter { struct t4_filter_specification fs; }; +/* + * Support for "sched-class" command to allow a TX Scheduling Class to be + * programmed with various parameters. + */ +struct t4_sched_params { + int8_t subcmd; /* sub-command */ + int8_t type; /* packet or flow */ + union { + struct { /* sub-command SCHED_CLASS_CONFIG */ + int8_t minmax; /* minmax enable */ + } config; + struct { /* sub-command SCHED_CLASS_PARAMS */ + int8_t level; /* scheduler hierarchy level */ + int8_t mode; /* per-class or per-flow */ + int8_t rateunit; /* bit or packet rate */ + int8_t ratemode; /* %port relative or kbps + absolute */ + int8_t channel; /* scheduler channel [0..N] */ + int8_t cl; /* scheduler class [0..N] */ + int32_t minrate; /* minimum rate */ + int32_t maxrate; /* maximum rate */ + int16_t weight; /* percent weight */ + int16_t pktsize; /* average packet size */ + } params; + uint8_t reserved[6 + 8 * 8]; + } u; +}; + +enum { + SCHED_CLASS_SUBCMD_CONFIG, /* config sub-command */ + SCHED_CLASS_SUBCMD_PARAMS, /* params sub-command */ +}; + +enum { + SCHED_CLASS_TYPE_PACKET, +}; + +enum { + SCHED_CLASS_LEVEL_CL_RL, /* class rate limiter */ + SCHED_CLASS_LEVEL_CL_WRR, /* class weighted round robin */ + SCHED_CLASS_LEVEL_CH_RL, /* channel rate limiter */ +}; + +enum { + SCHED_CLASS_MODE_CLASS, /* per-class scheduling */ + SCHED_CLASS_MODE_FLOW, /* per-flow scheduling */ +}; + +enum { + SCHED_CLASS_RATEUNIT_BITS, /* bit rate scheduling */ + SCHED_CLASS_RATEUNIT_PKTS, /* packet rate scheduling */ +}; + +enum { + SCHED_CLASS_RATEMODE_REL, /* percent of port bandwidth */ + SCHED_CLASS_RATEMODE_ABS, /* Kb/s */ +}; + +/* + * Support for "sched_queue" command to allow one or more NIC TX Queues to be + * bound to a TX Scheduling Class. + */ +struct t4_sched_queue { + uint8_t port; + int8_t queue; /* queue index; -1 => all queues */ + int8_t cl; /* class index; -1 => unbind */ +}; + #define T4_SGE_CONTEXT_SIZE 24 enum { SGE_CONTEXT_EGRESS, @@ -240,4 +308,8 @@ struct t4_mem_range { #define CHELSIO_T4_GET_MEM _IOW('f', T4_GET_MEM, struct t4_mem_range) #define CHELSIO_T4_GET_I2C _IOWR('f', T4_GET_I2C, struct t4_i2c_data) #define CHELSIO_T4_CLEAR_STATS _IOW('f', T4_CLEAR_STATS, uint32_t) +#define CHELSIO_T4_SCHED_CLASS _IOW('f', T4_SET_SCHED_CLASS, \ + struct t4_sched_params) +#define CHELSIO_T4_SCHED_QUEUE _IOW('f', T4_SET_SCHED_QUEUE, \ + struct t4_sched_queue) #endif Modified: stable/9/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_main.c Wed May 7 15:13:57 2014 (r265551) +++ stable/9/sys/dev/cxgbe/t4_main.c Wed May 7 15:24:24 2014 (r265552) @@ -425,6 +425,8 @@ static int get_sge_context(struct adapte static int load_fw(struct adapter *, struct t4_data *); static int read_card_mem(struct adapter *, int, struct t4_mem_range *); static int read_i2c(struct adapter *, struct t4_i2c_data *); +static int set_sched_class(struct adapter *, struct t4_sched_params *); +static int set_sched_queue(struct adapter *, struct t4_sched_queue *); #ifdef TCP_OFFLOAD static int toe_capability(struct port_info *, int); #endif @@ -7265,6 +7267,228 @@ read_i2c(struct adapter *sc, struct t4_i return (rc); } +static int +in_range(int val, int lo, int hi) +{ + + return (val < 0 || (val <= hi && val >= lo)); +} + +static int +set_sched_class(struct adapter *sc, struct t4_sched_params *p) +{ + int fw_subcmd, fw_type, rc; + + rc = begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4setsc"); + if (rc) + return (rc); + + if (!(sc->flags & FULL_INIT_DONE)) { + rc = EAGAIN; + goto done; + } + + /* + * Translate the cxgbetool parameters into T4 firmware parameters. (The + * sub-command and type are in common locations.) + */ + if (p->subcmd == SCHED_CLASS_SUBCMD_CONFIG) + fw_subcmd = FW_SCHED_SC_CONFIG; + else if (p->subcmd == SCHED_CLASS_SUBCMD_PARAMS) + fw_subcmd = FW_SCHED_SC_PARAMS; + else { + rc = EINVAL; + goto done; + } + if (p->type == SCHED_CLASS_TYPE_PACKET) + fw_type = FW_SCHED_TYPE_PKTSCHED; + else { + rc = EINVAL; + goto done; + } + + if (fw_subcmd == FW_SCHED_SC_CONFIG) { + /* Vet our parameters ..*/ + if (p->u.config.minmax < 0) { + rc = EINVAL; + goto done; + } + + /* And pass the request to the firmware ...*/ + rc = -t4_sched_config(sc, fw_type, p->u.config.minmax); + goto done; + } + + if (fw_subcmd == FW_SCHED_SC_PARAMS) { + int fw_level; + int fw_mode; + int fw_rateunit; + int fw_ratemode; + + if (p->u.params.level == SCHED_CLASS_LEVEL_CL_RL) + fw_level = FW_SCHED_PARAMS_LEVEL_CL_RL; + else if (p->u.params.level == SCHED_CLASS_LEVEL_CL_WRR) + fw_level = FW_SCHED_PARAMS_LEVEL_CL_WRR; + else if (p->u.params.level == SCHED_CLASS_LEVEL_CH_RL) + fw_level = FW_SCHED_PARAMS_LEVEL_CH_RL; + else { + rc = EINVAL; + goto done; + } + + if (p->u.params.mode == SCHED_CLASS_MODE_CLASS) + fw_mode = FW_SCHED_PARAMS_MODE_CLASS; + else if (p->u.params.mode == SCHED_CLASS_MODE_FLOW) + fw_mode = FW_SCHED_PARAMS_MODE_FLOW; + else { + rc = EINVAL; + goto done; + } + + if (p->u.params.rateunit == SCHED_CLASS_RATEUNIT_BITS) + fw_rateunit = FW_SCHED_PARAMS_UNIT_BITRATE; + else if (p->u.params.rateunit == SCHED_CLASS_RATEUNIT_PKTS) + fw_rateunit = FW_SCHED_PARAMS_UNIT_PKTRATE; + else { + rc = EINVAL; + goto done; + } + + if (p->u.params.ratemode == SCHED_CLASS_RATEMODE_REL) + fw_ratemode = FW_SCHED_PARAMS_RATE_REL; + else if (p->u.params.ratemode == SCHED_CLASS_RATEMODE_ABS) + fw_ratemode = FW_SCHED_PARAMS_RATE_ABS; + else { + rc = EINVAL; + goto done; + } + + /* Vet our parameters ... */ + if (!in_range(p->u.params.channel, 0, 3) || + !in_range(p->u.params.cl, 0, is_t4(sc) ? 15 : 16) || + !in_range(p->u.params.minrate, 0, 10000000) || + !in_range(p->u.params.maxrate, 0, 10000000) || + !in_range(p->u.params.weight, 0, 100)) { + rc = ERANGE; + goto done; + } + + /* + * Translate any unset parameters into the firmware's + * nomenclature and/or fail the call if the parameters + * are required ... + */ + if (p->u.params.rateunit < 0 || p->u.params.ratemode < 0 || + p->u.params.channel < 0 || p->u.params.cl < 0) { + rc = EINVAL; + goto done; + } + if (p->u.params.minrate < 0) + p->u.params.minrate = 0; + if (p->u.params.maxrate < 0) { + if (p->u.params.level == SCHED_CLASS_LEVEL_CL_RL || + p->u.params.level == SCHED_CLASS_LEVEL_CH_RL) { + rc = EINVAL; + goto done; + } else + p->u.params.maxrate = 0; + } + if (p->u.params.weight < 0) { + if (p->u.params.level == SCHED_CLASS_LEVEL_CL_WRR) { + rc = EINVAL; + goto done; + } else + p->u.params.weight = 0; + } + if (p->u.params.pktsize < 0) { + if (p->u.params.level == SCHED_CLASS_LEVEL_CL_RL || + p->u.params.level == SCHED_CLASS_LEVEL_CH_RL) { + rc = EINVAL; + goto done; + } else + p->u.params.pktsize = 0; + } + + /* See what the firmware thinks of the request ... */ + rc = -t4_sched_params(sc, fw_type, fw_level, fw_mode, + fw_rateunit, fw_ratemode, p->u.params.channel, + p->u.params.cl, p->u.params.minrate, p->u.params.maxrate, + p->u.params.weight, p->u.params.pktsize); + goto done; + } + + rc = EINVAL; +done: + end_synchronized_op(sc, 0); + return (rc); +} + +static int +set_sched_queue(struct adapter *sc, struct t4_sched_queue *p) +{ + struct port_info *pi = NULL; + struct sge_txq *txq; + uint32_t fw_mnem, fw_queue, fw_class; + int i, rc; + + rc = begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4setsq"); + if (rc) + return (rc); + + if (!(sc->flags & FULL_INIT_DONE)) { + rc = EAGAIN; + goto done; + } + + if (p->port >= sc->params.nports) { + rc = EINVAL; + goto done; + } + + pi = sc->port[p->port]; + if (!in_range(p->queue, 0, pi->ntxq - 1) || !in_range(p->cl, 0, 7)) { + rc = EINVAL; + goto done; + } + + /* + * Create a template for the FW_PARAMS_CMD mnemonic and value (TX + * Scheduling Class in this case). + */ + fw_mnem = (V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DMAQ) | + V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DMAQ_EQ_SCHEDCLASS_ETH)); + fw_class = p->cl < 0 ? 0xffffffff : p->cl; + + /* + * If op.queue is non-negative, then we're only changing the scheduling + * on a single specified TX queue. + */ + if (p->queue >= 0) { + txq = &sc->sge.txq[pi->first_txq + p->queue]; + fw_queue = (fw_mnem | V_FW_PARAMS_PARAM_YZ(txq->eq.cntxt_id)); + rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, &fw_queue, + &fw_class); + goto done; + } + + /* + * Change the scheduling on all the TX queues for the + * interface. + */ + for_each_txq(pi, i, txq) { + fw_queue = (fw_mnem | V_FW_PARAMS_PARAM_YZ(txq->eq.cntxt_id)); + rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, &fw_queue, + &fw_class); + if (rc) + goto done; + } + + rc = 0; +done: + end_synchronized_op(sc, 0); + return (rc); +} + int t4_os_find_pci_capability(struct adapter *sc, int cap) { @@ -7508,6 +7732,12 @@ t4_ioctl(struct cdev *dev, unsigned long } break; } + case CHELSIO_T4_SCHED_CLASS: + rc = set_sched_class(sc, (struct t4_sched_params *)data); + break; + case CHELSIO_T4_SCHED_QUEUE: + rc = set_sched_queue(sc, (struct t4_sched_queue *)data); + break; default: rc = EINVAL; } From owner-svn-src-stable@FreeBSD.ORG Wed May 7 15:34:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E4ADB302; Wed, 7 May 2014 15:34:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D07BA830; Wed, 7 May 2014 15:34:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47FY5ok039048; Wed, 7 May 2014 15:34:05 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47FY43H039036; Wed, 7 May 2014 15:34:04 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201405071534.s47FY43H039036@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 7 May 2014 15:34:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265553 - in stable/9/sys/dev/cxgbe: . common tom X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 15:34:06 -0000 Author: np Date: Wed May 7 15:34:04 2014 New Revision: 265553 URL: http://svnweb.freebsd.org/changeset/base/265553 Log: MFC r259103 and r259382. r259103: cxgbe(4): save a copy of the RSS map for each port for the driver's use. r259382: Read card capabilities after firmware initialization, instead of setting them up as part of firmware initialization (which the driver gets to do only if it's the master driver). Read the range of tids available for the ETHOFLD functionality if it's enabled. New is_ftid() and is_etid() functions to test whether a tid falls within the range of filter tids or ETHOFLD tids respectively. Modified: stable/9/sys/dev/cxgbe/adapter.h stable/9/sys/dev/cxgbe/common/common.h stable/9/sys/dev/cxgbe/offload.h stable/9/sys/dev/cxgbe/t4_main.c stable/9/sys/dev/cxgbe/t4_sge.c stable/9/sys/dev/cxgbe/tom/t4_cpl_io.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/9/sys/dev/cxgbe/adapter.h Wed May 7 15:24:24 2014 (r265552) +++ stable/9/sys/dev/cxgbe/adapter.h Wed May 7 15:34:04 2014 (r265553) @@ -193,6 +193,7 @@ struct port_info { unsigned long flags; int if_flags; + uint16_t *rss; uint16_t viid; int16_t xact_addr_filt;/* index of exact MAC address filter */ uint16_t rss_size; /* size of VI's RSS table slice */ Modified: stable/9/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/9/sys/dev/cxgbe/common/common.h Wed May 7 15:24:24 2014 (r265552) +++ stable/9/sys/dev/cxgbe/common/common.h Wed May 7 15:34:04 2014 (r265553) @@ -267,8 +267,10 @@ struct adapter_params { unsigned short a_wnd[NCCTRL_WIN]; unsigned short b_wnd[NCCTRL_WIN]; - unsigned int mc_size; /* MC memory size */ - unsigned int nfilters; /* size of filter region */ + u_int ftid_min; + u_int ftid_max; + u_int etid_min; + u_int netids; unsigned int cim_la_size; @@ -280,8 +282,10 @@ struct adapter_params { unsigned int offload:1; /* hw is TOE capable, fw has divvied up card resources for TOE operation. */ unsigned int bypass:1; /* this is a bypass card */ + unsigned int ethoffload:1; unsigned int ofldq_wr_cred; + unsigned int eo_wr_cred; }; #define CHELSIO_T4 0x4 @@ -318,11 +322,28 @@ struct link_config { #define for_each_port(adapter, iter) \ for (iter = 0; iter < (adapter)->params.nports; ++iter) +static inline int is_ftid(const struct adapter *sc, u_int tid) +{ + + return (tid >= sc->params.ftid_min && tid <= sc->params.ftid_max); +} + +static inline int is_etid(const struct adapter *sc, u_int tid) +{ + + return (tid >= sc->params.etid_min); +} + static inline int is_offload(const struct adapter *adap) { return adap->params.offload; } +static inline int is_ethoffload(const struct adapter *adap) +{ + return adap->params.ethoffload; +} + static inline int chip_id(struct adapter *adap) { return adap->params.chipid; Modified: stable/9/sys/dev/cxgbe/offload.h ============================================================================== --- stable/9/sys/dev/cxgbe/offload.h Wed May 7 15:24:24 2014 (r265552) +++ stable/9/sys/dev/cxgbe/offload.h Wed May 7 15:34:04 2014 (r265553) @@ -101,6 +101,11 @@ struct tid_info { u_int nftids; u_int ftid_base; u_int ftids_in_use; + + struct mtx etid_lock __aligned(CACHE_LINE_SIZE); + struct etid_entry *etid_tab; + u_int netids; + u_int etid_base; }; struct t4_range { Modified: stable/9/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_main.c Wed May 7 15:24:24 2014 (r265552) +++ stable/9/sys/dev/cxgbe/t4_main.c Wed May 7 15:34:04 2014 (r265553) @@ -2328,7 +2328,6 @@ use_config_on_flash: #define LIMIT_CAPS(x) do { \ caps.x &= htobe16(t4_##x##_allowed); \ - sc->x = htobe16(caps.x); \ } while (0) /* @@ -2430,6 +2429,8 @@ get_params__post_init(struct adapter *sc sc->sge.eq_start = val[1]; sc->tids.ftid_base = val[2]; sc->tids.nftids = val[3] - val[2] + 1; + sc->params.ftid_min = val[2]; + sc->params.ftid_max = val[3]; sc->vres.l2t.start = val[4]; sc->vres.l2t.size = val[5] - val[4] + 1; KASSERT(sc->vres.l2t.size <= L2T_SIZE, @@ -2448,7 +2449,35 @@ get_params__post_init(struct adapter *sc return (rc); } - if (caps.toecaps) { +#define READ_CAPS(x) do { \ + sc->x = htobe16(caps.x); \ +} while (0) + READ_CAPS(linkcaps); + READ_CAPS(niccaps); + READ_CAPS(toecaps); + READ_CAPS(rdmacaps); + READ_CAPS(iscsicaps); + READ_CAPS(fcoecaps); + + if (sc->niccaps & FW_CAPS_CONFIG_NIC_ETHOFLD) { + param[0] = FW_PARAM_PFVF(ETHOFLD_START); + param[1] = FW_PARAM_PFVF(ETHOFLD_END); + param[2] = FW_PARAM_DEV(FLOWC_BUFFIFO_SZ); + rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 3, param, val); + if (rc != 0) { + device_printf(sc->dev, + "failed to query NIC parameters: %d.\n", rc); + return (rc); + } + sc->tids.etid_base = val[0]; + sc->params.etid_min = val[0]; + sc->tids.netids = val[1] - val[0] + 1; + sc->params.netids = sc->tids.netids; + sc->params.eo_wr_cred = val[2]; + sc->params.ethoffload = 1; + } + + if (sc->toecaps) { /* query offload-related parameters */ param[0] = FW_PARAM_DEV(NTID); param[1] = FW_PARAM_PFVF(SERVER_START); @@ -2471,7 +2500,7 @@ get_params__post_init(struct adapter *sc sc->params.ofldq_wr_cred = val[5]; sc->params.offload = 1; } - if (caps.rdmacaps) { + if (sc->rdmacaps) { param[0] = FW_PARAM_PFVF(STAG_START); param[1] = FW_PARAM_PFVF(STAG_END); param[2] = FW_PARAM_PFVF(RQ_START); @@ -2510,7 +2539,7 @@ get_params__post_init(struct adapter *sc sc->vres.ocq.start = val[4]; sc->vres.ocq.size = val[5] - val[4] + 1; } - if (caps.iscsicaps) { + if (sc->iscsicaps) { param[0] = FW_PARAM_PFVF(ISCSI_START); param[1] = FW_PARAM_PFVF(ISCSI_END); rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 2, param, val); @@ -3131,7 +3160,7 @@ port_full_init(struct port_info *pi) struct ifnet *ifp = pi->ifp; uint16_t *rss; struct sge_rxq *rxq; - int rc, i; + int rc, i, j; ASSERT_SYNCHRONIZED_OP(sc); KASSERT((pi->flags & PORT_INIT_DONE) == 0, @@ -3148,21 +3177,25 @@ port_full_init(struct port_info *pi) goto done; /* error message displayed already */ /* - * Setup RSS for this port. + * Setup RSS for this port. Save a copy of the RSS table for later use. */ - rss = malloc(pi->nrxq * sizeof (*rss), M_CXGBE, - M_ZERO | M_WAITOK); - for_each_rxq(pi, i, rxq) { - rss[i] = rxq->iq.abs_id; + rss = malloc(pi->rss_size * sizeof (*rss), M_CXGBE, M_ZERO | M_WAITOK); + for (i = 0; i < pi->rss_size;) { + for_each_rxq(pi, j, rxq) { + rss[i++] = rxq->iq.abs_id; + if (i == pi->rss_size) + break; + } } - rc = -t4_config_rss_range(sc, sc->mbox, pi->viid, 0, - pi->rss_size, rss, pi->nrxq); - free(rss, M_CXGBE); + + rc = -t4_config_rss_range(sc, sc->mbox, pi->viid, 0, pi->rss_size, rss, + pi->rss_size); if (rc != 0) { if_printf(ifp, "rss_config failed: %d\n", rc); goto done; } + pi->rss = rss; pi->flags |= PORT_INIT_DONE; done: if (rc != 0) @@ -3211,6 +3244,7 @@ port_full_uninit(struct port_info *pi) quiesce_fl(sc, &ofld_rxq->fl); } #endif + free(pi->rss, M_CXGBE); } t4_teardown_port_queues(pi); @@ -4436,6 +4470,7 @@ cxgbe_sysctls(struct port_info *pi) struct sysctl_ctx_list *ctx; struct sysctl_oid *oid; struct sysctl_oid_list *children; + struct adapter *sc = pi->adapter; ctx = device_get_sysctl_ctx(pi->dev); @@ -4465,7 +4500,7 @@ cxgbe_sysctls(struct port_info *pi) &pi->first_txq, 0, "index of first tx queue"); #ifdef TCP_OFFLOAD - if (is_offload(pi->adapter)) { + if (is_offload(sc)) { SYSCTL_ADD_INT(ctx, children, OID_AUTO, "nofldrxq", CTLFLAG_RD, &pi->nofldrxq, 0, "# of rx queues for offloaded TCP connections"); @@ -4504,7 +4539,7 @@ cxgbe_sysctls(struct port_info *pi) #define SYSCTL_ADD_T4_REG64(pi, name, desc, reg) \ SYSCTL_ADD_OID(ctx, children, OID_AUTO, name, \ - CTLTYPE_U64 | CTLFLAG_RD, pi->adapter, reg, \ + CTLTYPE_U64 | CTLFLAG_RD, sc, reg, \ sysctl_handle_t4_reg64, "QU", desc) SYSCTL_ADD_T4_REG64(pi, "tx_octets", "# of octets in good frames", @@ -6074,6 +6109,11 @@ sysctl_tids(SYSCTL_HANDLER_ARGS) t->ftid_base + t->nftids - 1); } + if (t->netids) { + sbuf_printf(sb, "ETID range: %u-%u\n", t->etid_base, + t->etid_base + t->netids - 1); + } + sbuf_printf(sb, "HW TID usage: %u IP users, %u IPv6 users", t4_read_reg(sc, A_LE_DB_ACT_CNT_IPV4), t4_read_reg(sc, A_LE_DB_ACT_CNT_IPV6)); @@ -7105,14 +7145,17 @@ t4_filter_rpl(struct sge_iq *iq, const s struct adapter *sc = iq->adapter; const struct cpl_set_tcb_rpl *rpl = (const void *)(rss + 1); unsigned int idx = GET_TID(rpl); + unsigned int rc; + struct filter_entry *f; KASSERT(m == NULL, ("%s: payload with opcode %02x", __func__, rss->opcode)); - if (idx >= sc->tids.ftid_base && - (idx -= sc->tids.ftid_base) < sc->tids.nftids) { - unsigned int rc = G_COOKIE(rpl->cookie); - struct filter_entry *f = &sc->tids.ftid_tab[idx]; + if (is_ftid(sc, idx)) { + + idx -= sc->tids.ftid_base; + f = &sc->tids.ftid_tab[idx]; + rc = G_COOKIE(rpl->cookie); mtx_lock(&sc->tids.ftid_lock); if (rc == FW_FILTER_WR_FLT_ADDED) { Modified: stable/9/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_sge.c Wed May 7 15:24:24 2014 (r265552) +++ stable/9/sys/dev/cxgbe/t4_sge.c Wed May 7 15:34:04 2014 (r265553) @@ -1648,7 +1648,7 @@ t4_eth_rx(struct sge_iq *iq, const struc m0->m_pkthdr.rcvif = ifp; m0->m_flags |= M_FLOWID; - m0->m_pkthdr.flowid = rss->hash_val; + m0->m_pkthdr.flowid = be32toh(rss->hash_val); if (cpl->csum_calc && !cpl->err_vec) { if (ifp->if_capenable & IFCAP_RXCSUM && @@ -2871,7 +2871,6 @@ alloc_wrq(struct adapter *sc, struct por SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "unstalled", CTLFLAG_RD, &wrq->eq.unstalled, 0, "# of times queue recovered after stall"); - return (rc); } Modified: stable/9/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- stable/9/sys/dev/cxgbe/tom/t4_cpl_io.c Wed May 7 15:24:24 2014 (r265552) +++ stable/9/sys/dev/cxgbe/tom/t4_cpl_io.c Wed May 7 15:34:04 2014 (r265553) @@ -1296,18 +1296,18 @@ do_rx_data(struct sge_iq *iq, const stru #define V_CPL_FW4_ACK_OPCODE(x) ((x) << S_CPL_FW4_ACK_OPCODE) #define G_CPL_FW4_ACK_OPCODE(x) \ (((x) >> S_CPL_FW4_ACK_OPCODE) & M_CPL_FW4_ACK_OPCODE) - + #define S_CPL_FW4_ACK_FLOWID 0 #define M_CPL_FW4_ACK_FLOWID 0xffffff #define V_CPL_FW4_ACK_FLOWID(x) ((x) << S_CPL_FW4_ACK_FLOWID) #define G_CPL_FW4_ACK_FLOWID(x) \ (((x) >> S_CPL_FW4_ACK_FLOWID) & M_CPL_FW4_ACK_FLOWID) - + #define S_CPL_FW4_ACK_CR 24 #define M_CPL_FW4_ACK_CR 0xff #define V_CPL_FW4_ACK_CR(x) ((x) << S_CPL_FW4_ACK_CR) #define G_CPL_FW4_ACK_CR(x) (((x) >> S_CPL_FW4_ACK_CR) & M_CPL_FW4_ACK_CR) - + #define S_CPL_FW4_ACK_SEQVAL 0 #define M_CPL_FW4_ACK_SEQVAL 0x1 #define V_CPL_FW4_ACK_SEQVAL(x) ((x) << S_CPL_FW4_ACK_SEQVAL) @@ -1434,8 +1434,7 @@ do_set_tcb_rpl(struct sge_iq *iq, const ("%s: unexpected opcode 0x%x", __func__, opcode)); KASSERT(m == NULL, ("%s: wasn't expecting payload", __func__)); - if (tid >= sc->tids.ftid_base && - tid < sc->tids.ftid_base + sc->tids.nftids) + if (is_ftid(sc, tid)) return (t4_filter_rpl(iq, rss, m)); /* TCB is a filter */ CXGBE_UNIMPLEMENTED(__func__); From owner-svn-src-stable@FreeBSD.ORG Wed May 7 15:52:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE2ABA72; Wed, 7 May 2014 15:52:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA90AA2E; Wed, 7 May 2014 15:52:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47Fqf9K047323; Wed, 7 May 2014 15:52:41 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47FqfCG047321; Wed, 7 May 2014 15:52:41 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201405071552.s47FqfCG047321@svn.freebsd.org> From: Alan Cox Date: Wed, 7 May 2014 15:52:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265554 - in stable/9/sys: amd64/amd64 i386/i386 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 15:52:42 -0000 Author: alc Date: Wed May 7 15:52:41 2014 New Revision: 265554 URL: http://svnweb.freebsd.org/changeset/base/265554 Log: MFC r262338 When the kernel is running in a virtual machine, it cannot rely upon the processor family to determine if the workaround for AMD Family 10h Erratum 383 should be enabled. To enable virtual machine migration among a heterogeneous collection of physical machines, the hypervisor may have been configured to report an older processor family with a reduced feature set. Effectively, the reported processor family and its features are like a "least common denominator" for the collection of machines. Therefore, when the kernel is running in a virtual machine, instead of relying upon the processor family, we now test for features that prove that the underlying processor is not affected by the erratum. (The features that we test for are unlikely to ever be emulated in software on an affected physical processor.) PR: 186061 Modified: stable/9/sys/amd64/amd64/pmap.c stable/9/sys/i386/i386/pmap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/pmap.c ============================================================================== --- stable/9/sys/amd64/amd64/pmap.c Wed May 7 15:34:04 2014 (r265553) +++ stable/9/sys/amd64/amd64/pmap.c Wed May 7 15:52:41 2014 (r265554) @@ -797,12 +797,18 @@ pmap_init(void) } /* - * If the kernel is running in a virtual machine on an AMD Family 10h - * processor, then it must assume that MCA is enabled by the virtual - * machine monitor. - */ - if (vm_guest == VM_GUEST_VM && cpu_vendor_id == CPU_VENDOR_AMD && - CPUID_TO_FAMILY(cpu_id) == 0x10) + * If the kernel is running on a virtual machine, then it must assume + * that MCA is enabled by the hypervisor. Moreover, the kernel must + * be prepared for the hypervisor changing the vendor and family that + * are reported by CPUID. Consequently, the workaround for AMD Family + * 10h Erratum 383 is enabled if the processor's feature set does not + * include at least one feature that is only supported by older Intel + * or newer AMD processors. + */ + if (vm_guest == VM_GUEST_VM && (cpu_feature & CPUID_SS) == 0 && + (cpu_feature2 & (CPUID2_SSSE3 | CPUID2_SSE41 | CPUID2_AESNI | + CPUID2_AVX | CPUID2_XSAVE)) == 0 && (amd_feature2 & (AMDID2_XOP | + AMDID2_FMA4)) == 0) workaround_erratum383 = 1; /* Modified: stable/9/sys/i386/i386/pmap.c ============================================================================== --- stable/9/sys/i386/i386/pmap.c Wed May 7 15:34:04 2014 (r265553) +++ stable/9/sys/i386/i386/pmap.c Wed May 7 15:52:41 2014 (r265554) @@ -768,12 +768,18 @@ pmap_init(void) pv_entry_high_water = 9 * (pv_entry_max / 10); /* - * If the kernel is running in a virtual machine on an AMD Family 10h - * processor, then it must assume that MCA is enabled by the virtual - * machine monitor. - */ - if (vm_guest == VM_GUEST_VM && cpu_vendor_id == CPU_VENDOR_AMD && - CPUID_TO_FAMILY(cpu_id) == 0x10) + * If the kernel is running on a virtual machine, then it must assume + * that MCA is enabled by the hypervisor. Moreover, the kernel must + * be prepared for the hypervisor changing the vendor and family that + * are reported by CPUID. Consequently, the workaround for AMD Family + * 10h Erratum 383 is enabled if the processor's feature set does not + * include at least one feature that is only supported by older Intel + * or newer AMD processors. + */ + if (vm_guest == VM_GUEST_VM && (cpu_feature & CPUID_SS) == 0 && + (cpu_feature2 & (CPUID2_SSSE3 | CPUID2_SSE41 | CPUID2_AESNI | + CPUID2_AVX | CPUID2_XSAVE)) == 0 && (amd_feature2 & (AMDID2_XOP | + AMDID2_FMA4)) == 0) workaround_erratum383 = 1; /* From owner-svn-src-stable@FreeBSD.ORG Wed May 7 16:07:00 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E0643FCE; Wed, 7 May 2014 16:06:59 +0000 (UTC) Received: from mail-ee0-x231.google.com (mail-ee0-x231.google.com [IPv6:2a00:1450:4013:c00::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D74A4B6E; Wed, 7 May 2014 16:06:58 +0000 (UTC) Received: by mail-ee0-f49.google.com with SMTP id e53so898256eek.36 for ; Wed, 07 May 2014 09:06:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=pPEYMBo0fmwSyo6ZjM6Ffys4wiN8wHn2WGBl4QEL90w=; b=UDlxBkoMjpEMn5cHRGtUqVH73zlknheKS05MbPlNbreF7dO/HzBV0eYajZRTMa7cPI IoqUVIz68sjRv0lvSjHpig5w2sbG6jNVQQvlEDtHXxrDOYpodB6RUXv2+VZOEapt2afa 3XGQemMrDzRyFIRJcRzMpZBaMueMN5LLuzqkSLSofuKR+RFq7k6KQxXVV4e64tI5DBRh sUYTqA8+0b3sWDpQO9+P4hwLf2cwt3Sq3nBAesExKtGSldoAfzUSBroQaJv9TdoxZVuL dJSBjb30U4IiRPbiWl481rfbP7q1cTqm5o8kJmRW0dBMDLeMpjsQfKP5sIUpj47OUMBh R92A== X-Received: by 10.14.213.6 with SMTP id z6mr16636557eeo.98.1399478816896; Wed, 07 May 2014 09:06:56 -0700 (PDT) Received: from strashydlo.home (aeaw217.neoplus.adsl.tpnet.pl. [79.186.22.217]) by mx.google.com with ESMTPSA id z48sm47263826eel.27.2014.05.07.09.06.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 07 May 2014 09:06:56 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Subject: Re: svn commit: r265498 - stable/10/sys/dev/iscsi Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=iso-8859-2 From: =?iso-8859-2?Q?Edward_Tomasz_Napiera=B3a?= In-Reply-To: Date: Wed, 7 May 2014 18:06:53 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201405070638.s476cK2J092699@svn.freebsd.org> To: Robert Watson X-Mailer: Apple Mail (2.1283) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 16:07:00 -0000 Wiadomo=B6=E6 napisana przez Robert Watson w dniu 7 maj 2014, o godz. = 13:49: > On Wed, 7 May 2014, Edward Tomasz Napierala wrote: >=20 >> Author: trasz >> Date: Wed May 7 06:38:19 2014 >> New Revision: 265498 >> URL: http://svnweb.freebsd.org/changeset/base/265498 >>=20 >> Log: >> MFC r264025: >>=20 >> Get rid of the "autoscaling", instead just set socket buffer sizes >> in the usual way. The only thing the old code did was making things >> less predictable. >=20 > Does this mean that the autoscaling algorithm needs refining? The = problem with disabling autoscaling is that the code may, in the future, = fail to benefit from further global refinements, as old code that = hard-coded sizes now fails to do -- and that if we don't refine the = autoscaling model, other applications may fail to benefit. The commit message here was misleading - what got replaced was setting the socket buffer size "by hand" to a value computed from negotiated maximum PDU size. Now it's set to constant size. The reason we do not use autoscaling here is not performance. It's because iSCSI code can't transmit a part of PDU; it always waits until there is room for the whole thing (PDUs can be up to about 128kB in size). If the socket buffer size somehow got autoscaled below that amount, the transmit would stop indefinitely. There is a somewhat similar situation on the receive side. So, the right solution would be to either use autoscaling, but with a guarantee that the socket buffer won't shrink below some specified value, or have a way to determine that the socket buffer won't get any bigger anytime soon and so the iSCSI should transmit or receive a part of PDU. Current setting "by hand" is just a workaround, albeit pretty well working one. From owner-svn-src-stable@FreeBSD.ORG Wed May 7 16:28:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7530A7F7; Wed, 7 May 2014 16:28:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61BE1DB7; Wed, 7 May 2014 16:28:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47GSbVV061642; Wed, 7 May 2014 16:28:37 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47GSbQn061640; Wed, 7 May 2014 16:28:37 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201405071628.s47GSbQn061640@svn.freebsd.org> From: Alan Cox Date: Wed, 7 May 2014 16:28:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r265556 - in stable/8/sys: amd64/amd64 i386/i386 X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 16:28:37 -0000 Author: alc Date: Wed May 7 16:28:36 2014 New Revision: 265556 URL: http://svnweb.freebsd.org/changeset/base/265556 Log: MFC r262338 When the kernel is running in a virtual machine, it cannot rely upon the processor family to determine if the workaround for AMD Family 10h Erratum 383 should be enabled. To enable virtual machine migration among a heterogeneous collection of physical machines, the hypervisor may have been configured to report an older processor family with a reduced feature set. Effectively, the reported processor family and its features are like a "least common denominator" for the collection of machines. Therefore, when the kernel is running in a virtual machine, instead of relying upon the processor family, we now test for features that prove that the underlying processor is not affected by the erratum. (The features that we test for are unlikely to ever be emulated in software on an affected physical processor.) PR: 186061 Modified: stable/8/sys/amd64/amd64/pmap.c stable/8/sys/i386/i386/pmap.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/ (props changed) stable/8/sys/i386/ (props changed) Modified: stable/8/sys/amd64/amd64/pmap.c ============================================================================== --- stable/8/sys/amd64/amd64/pmap.c Wed May 7 16:16:49 2014 (r265555) +++ stable/8/sys/amd64/amd64/pmap.c Wed May 7 16:28:36 2014 (r265556) @@ -706,12 +706,18 @@ pmap_init(void) } /* - * If the kernel is running in a virtual machine on an AMD Family 10h - * processor, then it must assume that MCA is enabled by the virtual - * machine monitor. - */ - if (vm_guest == VM_GUEST_VM && cpu_vendor_id == CPU_VENDOR_AMD && - CPUID_TO_FAMILY(cpu_id) == 0x10) + * If the kernel is running on a virtual machine, then it must assume + * that MCA is enabled by the hypervisor. Moreover, the kernel must + * be prepared for the hypervisor changing the vendor and family that + * are reported by CPUID. Consequently, the workaround for AMD Family + * 10h Erratum 383 is enabled if the processor's feature set does not + * include at least one feature that is only supported by older Intel + * or newer AMD processors. + */ + if (vm_guest == VM_GUEST_VM && (cpu_feature & CPUID_SS) == 0 && + (cpu_feature2 & (CPUID2_SSSE3 | CPUID2_SSE41 | CPUID2_AESNI | + CPUID2_AVX | CPUID2_XSAVE)) == 0 && (amd_feature2 & (AMDID2_XOP | + AMDID2_FMA4)) == 0) workaround_erratum383 = 1; /* Modified: stable/8/sys/i386/i386/pmap.c ============================================================================== --- stable/8/sys/i386/i386/pmap.c Wed May 7 16:16:49 2014 (r265555) +++ stable/8/sys/i386/i386/pmap.c Wed May 7 16:28:36 2014 (r265556) @@ -757,12 +757,18 @@ pmap_init(void) pv_entry_high_water = 9 * (pv_entry_max / 10); /* - * If the kernel is running in a virtual machine on an AMD Family 10h - * processor, then it must assume that MCA is enabled by the virtual - * machine monitor. - */ - if (vm_guest == VM_GUEST_VM && cpu_vendor_id == CPU_VENDOR_AMD && - CPUID_TO_FAMILY(cpu_id) == 0x10) + * If the kernel is running on a virtual machine, then it must assume + * that MCA is enabled by the hypervisor. Moreover, the kernel must + * be prepared for the hypervisor changing the vendor and family that + * are reported by CPUID. Consequently, the workaround for AMD Family + * 10h Erratum 383 is enabled if the processor's feature set does not + * include at least one feature that is only supported by older Intel + * or newer AMD processors. + */ + if (vm_guest == VM_GUEST_VM && (cpu_feature & CPUID_SS) == 0 && + (cpu_feature2 & (CPUID2_SSSE3 | CPUID2_SSE41 | CPUID2_AESNI | + CPUID2_AVX | CPUID2_XSAVE)) == 0 && (amd_feature2 & (AMDID2_XOP | + AMDID2_FMA4)) == 0) workaround_erratum383 = 1; /* From owner-svn-src-stable@FreeBSD.ORG Wed May 7 16:37:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D368B11; Wed, 7 May 2014 16:37:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70737E9C; Wed, 7 May 2014 16:37:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47Gb5ch065657; Wed, 7 May 2014 16:37:05 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47Gb51e065656; Wed, 7 May 2014 16:37:05 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201405071637.s47Gb51e065656@svn.freebsd.org> From: Jim Harris Date: Wed, 7 May 2014 16:37:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265557 - stable/9/sbin/nvmecontrol X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 16:37:05 -0000 Author: jimharris Date: Wed May 7 16:37:04 2014 New Revision: 265557 URL: http://svnweb.freebsd.org/changeset/base/265557 Log: MFC r258071: Check for special status code from FIRMWARE_ACTIVATE command signifying that a reboot is required to complete activation of the requested firmware image. Modified: stable/9/sbin/nvmecontrol/firmware.c Directory Properties: stable/9/sbin/nvmecontrol/ (props changed) Modified: stable/9/sbin/nvmecontrol/firmware.c ============================================================================== --- stable/9/sbin/nvmecontrol/firmware.c Wed May 7 16:28:36 2014 (r265556) +++ stable/9/sbin/nvmecontrol/firmware.c Wed May 7 16:37:04 2014 (r265557) @@ -141,7 +141,7 @@ update_firmware(int fd, uint8_t *payload } } -static void +static int activate_firmware(int fd, int slot, int activate_action) { struct nvme_pt_command pt; @@ -154,8 +154,14 @@ activate_firmware(int fd, int slot, int if (ioctl(fd, NVME_PASSTHROUGH_CMD, &pt) < 0) err(1, "firmware activate request failed"); + if (pt.cpl.status.sct == NVME_SCT_COMMAND_SPECIFIC && + pt.cpl.status.sc == NVME_SC_FIRMWARE_REQUIRES_RESET) + return 1; + if (nvme_completion_is_error(&pt.cpl)) errx(1, "firmware activate request returned error"); + + return 0; } static void @@ -171,6 +177,7 @@ firmware(int argc, char *argv[]) { int fd = -1, slot = 0; int a_flag, s_flag, f_flag; + int activate_action, reboot_required; char ch, *p, *image = NULL; char *controller = NULL, prompt[64]; void *buf = NULL; @@ -287,21 +294,27 @@ firmware(int argc, char *argv[]) if (f_flag) { update_firmware(fd, buf, size); if (a_flag) - activate_firmware(fd, slot, - NVME_AA_REPLACE_ACTIVATE); + activate_action = NVME_AA_REPLACE_ACTIVATE; else - activate_firmware(fd, slot, - NVME_AA_REPLACE_NO_ACTIVATE); + activate_action = NVME_AA_REPLACE_NO_ACTIVATE; } else { - activate_firmware(fd, slot, NVME_AA_ACTIVATE); + activate_action = NVME_AA_ACTIVATE; } + reboot_required = activate_firmware(fd, slot, activate_action); + if (a_flag) { - printf("New firmware image activated and will take " - "effect after next controller reset.\n" - "Controller reset can be initiated via " - "'nvmecontrol reset %s'\n", - controller); + if (reboot_required) { + printf("New firmware image activated but requires " + "conventional reset (i.e. reboot) to " + "complete activation.\n"); + } else { + printf("New firmware image activated and will take " + "effect after next controller reset.\n" + "Controller reset can be initiated via " + "'nvmecontrol reset %s'\n", + controller); + } } close(fd); From owner-svn-src-stable@FreeBSD.ORG Wed May 7 16:40:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E755ACDE; Wed, 7 May 2014 16:40:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D3FC1F39; Wed, 7 May 2014 16:40:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47GeilW067916; Wed, 7 May 2014 16:40:44 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47GeiBi067915; Wed, 7 May 2014 16:40:44 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201405071640.s47GeiBi067915@svn.freebsd.org> From: Jim Harris Date: Wed, 7 May 2014 16:40:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265558 - stable/9/sbin/nvmecontrol X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 16:40:45 -0000 Author: jimharris Date: Wed May 7 16:40:44 2014 New Revision: 265558 URL: http://svnweb.freebsd.org/changeset/base/265558 Log: MFC r260381: For "nvmecontrol devlist", show namespace sizes in terms of MB instead of GB to improve granularity of the reporting - especially for namespaces that are on the order of 1 or 2 GB. Modified: stable/9/sbin/nvmecontrol/devlist.c Directory Properties: stable/9/sbin/nvmecontrol/ (props changed) Modified: stable/9/sbin/nvmecontrol/devlist.c ============================================================================== --- stable/9/sbin/nvmecontrol/devlist.c Wed May 7 16:37:04 2014 (r265557) +++ stable/9/sbin/nvmecontrol/devlist.c Wed May 7 16:40:44 2014 (r265558) @@ -99,11 +99,11 @@ devlist(int argc, char *argv[]) sprintf(name, "%s%d%s%d", NVME_CTRLR_PREFIX, ctrlr, NVME_NS_PREFIX, i+1); read_namespace_data(fd, i+1, &nsdata); - printf(" %10s (%lldGB)\n", + printf(" %10s (%lldMB)\n", name, nsdata.nsze * (long long)ns_get_sector_size(&nsdata) / - 1024 / 1024 / 1024); + 1024 / 1024); } close(fd); From owner-svn-src-stable@FreeBSD.ORG Wed May 7 16:42:19 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD1B6E2A; Wed, 7 May 2014 16:42:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AFE09F4D; Wed, 7 May 2014 16:42:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47GgJ8S069371; Wed, 7 May 2014 16:42:19 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47GgJjP069370; Wed, 7 May 2014 16:42:19 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201405071642.s47GgJjP069370@svn.freebsd.org> From: Jim Harris Date: Wed, 7 May 2014 16:42:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265559 - stable/9/sys/dev/nvme X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 16:42:20 -0000 Author: jimharris Date: Wed May 7 16:42:19 2014 New Revision: 265559 URL: http://svnweb.freebsd.org/changeset/base/265559 Log: MFC r260382: For IDENTIFY passthrough commands to Chatham prototype controllers, copy the spoofed identify data into the user buffer rather than issuing the command to the controller, since Chatham IDENTIFY data is always spoofed. While here, fix a bug in the spoofed data for Chatham submission and completion queue entry sizes. Modified: stable/9/sys/dev/nvme/nvme_ctrlr.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- stable/9/sys/dev/nvme/nvme_ctrlr.c Wed May 7 16:40:44 2014 (r265558) +++ stable/9/sys/dev/nvme/nvme_ctrlr.c Wed May 7 16:42:19 2014 (r265559) @@ -181,8 +181,8 @@ nvme_chatham_populate_cdata(struct nvme_ cdata->lpa.ns_smart = 1; cdata->sqes.min = 6; cdata->sqes.max = 6; - cdata->sqes.min = 4; - cdata->sqes.max = 4; + cdata->cqes.min = 4; + cdata->cqes.max = 4; cdata->nn = 1; /* Chatham2 doesn't support DSM command */ @@ -1041,6 +1041,27 @@ nvme_ctrlr_ioctl(struct cdev *cdev, u_lo break; case NVME_PASSTHROUGH_CMD: pt = (struct nvme_pt_command *)arg; +#ifdef CHATHAM2 + /* + * Chatham IDENTIFY data is spoofed, so copy the spoofed data + * rather than issuing the command to the Chatham controller. + */ + if (pci_get_devid(ctrlr->dev) == CHATHAM_PCI_ID && + pt->cmd.opc == NVME_OPC_IDENTIFY) { + if (pt->cmd.cdw10 == 1) { + if (pt->len != sizeof(ctrlr->cdata)) + return (EINVAL); + return (copyout(&ctrlr->cdata, pt->buf, + pt->len)); + } else { + if (pt->len != sizeof(ctrlr->ns[0].data) || + pt->cmd.nsid != 1) + return (EINVAL); + return (copyout(&ctrlr->ns[0].data, pt->buf, + pt->len)); + } + } +#endif return (nvme_ctrlr_passthrough_cmd(ctrlr, pt, pt->cmd.nsid, 1 /* is_user_buffer */, 1 /* is_admin_cmd */)); default: From owner-svn-src-stable@FreeBSD.ORG Wed May 7 16:43:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 28D69F66; Wed, 7 May 2014 16:43:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0324F55; Wed, 7 May 2014 16:43:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47GhAJl069508; Wed, 7 May 2014 16:43:10 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47GhAKm069507; Wed, 7 May 2014 16:43:10 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201405071643.s47GhAKm069507@svn.freebsd.org> From: Jim Harris Date: Wed, 7 May 2014 16:43:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265560 - stable/9/sys/dev/isci/scil X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 16:43:11 -0000 Author: jimharris Date: Wed May 7 16:43:10 2014 New Revision: 265560 URL: http://svnweb.freebsd.org/changeset/base/265560 Log: MFC r263275: isci: Ensure ATA passthrough commands with RETURN_RESPONSE bit set translate their response. Modified: stable/9/sys/dev/isci/scil/sati_passthrough.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/isci/scil/sati_passthrough.c ============================================================================== --- stable/9/sys/dev/isci/scil/sati_passthrough.c Wed May 7 16:42:19 2014 (r265559) +++ stable/9/sys/dev/isci/scil/sati_passthrough.c Wed May 7 16:43:10 2014 (r265560) @@ -441,6 +441,13 @@ SATI_STATUS sati_passthrough_16_translat sati_set_ata_lba_mid_exp(register_fis, sati_get_cdb_byte(cdb, 9)); sati_set_ata_lba_high_exp(register_fis, sati_get_cdb_byte(cdb, 11)); } + + if (PASSTHROUGH_CDB_CK_COND(cdb) || + PASSTHROUGH_CDB_PROTOCOL(cdb) == PASSTHROUGH_RETURN_RESPONSE) + { + sequence->is_translate_response_required = TRUE; + } + sati_set_ata_features(register_fis, sati_get_cdb_byte(cdb, 4)); sati_set_ata_sector_count(register_fis, sati_get_cdb_byte(cdb, 6)); sati_set_ata_lba_low(register_fis, sati_get_cdb_byte(cdb, 8)); @@ -483,6 +490,8 @@ SATI_STATUS sati_passthrough_translate_r return SATI_FAILURE_CHECK_RESPONSE_DATA; } + sequence->state = SATI_SEQUENCE_STATE_FINAL; + // If the user set the check condition bit, fill out the sense data if (PASSTHROUGH_CDB_CK_COND(cdb) || PASSTHROUGH_CDB_PROTOCOL(cdb) == PASSTHROUGH_RETURN_RESPONSE) @@ -496,10 +505,9 @@ SATI_STATUS sati_passthrough_translate_r SCSI_ASC_NO_ADDITIONAL_SENSE, SCSI_ASCQ_ATA_PASS_THROUGH_INFORMATION_AVAILABLE ); + return SATI_FAILURE_CHECK_RESPONSE_DATA; } - sequence->state = SATI_SEQUENCE_STATE_FINAL; - return SATI_COMPLETE; } From owner-svn-src-stable@FreeBSD.ORG Wed May 7 16:44:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 90102136; Wed, 7 May 2014 16:44:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7CAF6F63; Wed, 7 May 2014 16:44:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47Gi3Gh069711; Wed, 7 May 2014 16:44:03 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47Gi2CI069704; Wed, 7 May 2014 16:44:02 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201405071644.s47Gi2CI069704@svn.freebsd.org> From: Jim Harris Date: Wed, 7 May 2014 16:44:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265561 - stable/9/sys/dev/isci/scil X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 16:44:03 -0000 Author: jimharris Date: Wed May 7 16:44:02 2014 New Revision: 265561 URL: http://svnweb.freebsd.org/changeset/base/265561 Log: MFC r263276: Base the max number of SG elements on MAXPHYS. Modified: stable/9/sys/dev/isci/scil/sati_util.h stable/9/sys/dev/isci/scil/sci_controller_constants.h stable/9/sys/dev/isci/scil/sci_util.h stable/9/sys/dev/isci/scil/scic_sds_request.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/isci/scil/sati_util.h ============================================================================== --- stable/9/sys/dev/isci/scil/sati_util.h Wed May 7 16:43:10 2014 (r265560) +++ stable/9/sys/dev/isci/scil/sati_util.h Wed May 7 16:44:02 2014 (r265561) @@ -62,6 +62,8 @@ * structure data, fill in sense data, etc. */ +#include + #include #include @@ -144,15 +146,6 @@ #define ATA_MICROCODE_OFFSET_DOWNLOAD 0x03 #define ATA_MICROCODE_DOWNLOAD_SAVE 0x07 -#ifndef MIN -#define MIN(x,y) ((x) < (y) ? (x) : (y)) -#endif - -#ifndef MAX -#define MAX(x,y) ((x) > (y) ? (x) : (y)) -#endif - - void sati_ata_non_data_command( void * ata_io, SATI_TRANSLATOR_SEQUENCE_T * sequence Modified: stable/9/sys/dev/isci/scil/sci_controller_constants.h ============================================================================== --- stable/9/sys/dev/isci/scil/sci_controller_constants.h Wed May 7 16:43:10 2014 (r265560) +++ stable/9/sys/dev/isci/scil/sci_controller_constants.h Wed May 7 16:44:02 2014 (r265561) @@ -54,6 +54,8 @@ #ifndef _SCI_CONTROLLER_CONSTANTS_H_ #define _SCI_CONTROLLER_CONSTANTS_H_ +#include + /** * @file * @@ -148,8 +150,13 @@ extern "C" { /** * This constant defines the maximum number of Scatter-Gather Elements * to be used by any SCI component. + * + * Note: number of elements must be an even number, since descriptors + * posted to hardware always contain pairs of elements (with second + * element set to zeroes if not needed). */ -#define SCI_MAX_SCATTER_GATHER_ELEMENTS 130 +#define __MAXPHYS_ELEMENTS ((MAXPHYS / PAGE_SIZE) + 1) +#define SCI_MAX_SCATTER_GATHER_ELEMENTS ((__MAXPHYS_ELEMENTS + 1) & ~0x1) #endif #ifndef SCI_MIN_SCATTER_GATHER_ELEMENTS Modified: stable/9/sys/dev/isci/scil/sci_util.h ============================================================================== --- stable/9/sys/dev/isci/scil/sci_util.h Wed May 7 16:43:10 2014 (r265560) +++ stable/9/sys/dev/isci/scil/sci_util.h Wed May 7 16:44:02 2014 (r265561) @@ -54,20 +54,14 @@ #ifndef _SCI_UTIL_H_ #define _SCI_UTIL_H_ +#include + #include #ifndef ARRAY_SIZE #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) #endif -#ifndef MIN -#define MIN(x,y) ((x) < (y) ? (x) : (y)) -#endif - -#ifndef MAX -#define MAX(x,y) ((x) > (y) ? (x) : (y)) -#endif - /** * Normal byte swap macro */ Modified: stable/9/sys/dev/isci/scil/scic_sds_request.h ============================================================================== --- stable/9/sys/dev/isci/scil/scic_sds_request.h Wed May 7 16:43:10 2014 (r265560) +++ stable/9/sys/dev/isci/scil/scic_sds_request.h Wed May 7 16:44:02 2014 (r265561) @@ -65,6 +65,8 @@ extern "C" { #endif // __cplusplus +#include + #include #include @@ -331,7 +333,6 @@ extern SCIC_SDS_IO_REQUEST_STATE_HANDLER #define scic_sds_request_get_task_context(request) \ ((request)->task_context_buffer) -#define CACHE_LINE_SIZE (64) #define scic_sds_request_align_task_context_buffer(address) \ ((SCU_TASK_CONTEXT_T *)( \ (((POINTER_UINT)(address)) + (CACHE_LINE_SIZE - 1)) \ From owner-svn-src-stable@FreeBSD.ORG Wed May 7 16:45:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4CAFD286; Wed, 7 May 2014 16:45:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39B47F74; Wed, 7 May 2014 16:45:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47Gj6mR069913; Wed, 7 May 2014 16:45:06 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47Gj606069912; Wed, 7 May 2014 16:45:06 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201405071645.s47Gj606069912@svn.freebsd.org> From: Jim Harris Date: Wed, 7 May 2014 16:45:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265562 - stable/9/sys/dev/nvme X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 16:45:06 -0000 Author: jimharris Date: Wed May 7 16:45:05 2014 New Revision: 265562 URL: http://svnweb.freebsd.org/changeset/base/265562 Log: MFC r263277: nvme: Remove the software progress marker SET_FEATURE command during controller initialization. The spec says OS drivers should send this command after controller initialization completes successfully, but other NVMe OS drivers are not sending this command. This change will therefore reduce differences between the FreeBSD and other OS drivers. Modified: stable/9/sys/dev/nvme/nvme_ctrlr.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- stable/9/sys/dev/nvme/nvme_ctrlr.c Wed May 7 16:44:02 2014 (r265561) +++ stable/9/sys/dev/nvme/nvme_ctrlr.c Wed May 7 16:45:05 2014 (r265562) @@ -842,16 +842,6 @@ nvme_ctrlr_start(void *ctrlr_arg) for (i = 0; i < ctrlr->num_io_queues; i++) nvme_io_qpair_enable(&ctrlr->ioq[i]); - - /* - * Clear software progress marker to 0, to indicate to pre-boot - * software that OS driver load was successful. - * - * Chatham does not support this feature. - */ - if (pci_get_devid(ctrlr->dev) != CHATHAM_PCI_ID) - nvme_ctrlr_cmd_set_feature(ctrlr, - NVME_FEAT_SOFTWARE_PROGRESS_MARKER, 0, NULL, 0, NULL, NULL); } void From owner-svn-src-stable@FreeBSD.ORG Wed May 7 16:45:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B7373BF; Wed, 7 May 2014 16:45:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7863FF7C; Wed, 7 May 2014 16:45:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47Gjpxe070044; Wed, 7 May 2014 16:45:51 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47GjpEU070043; Wed, 7 May 2014 16:45:51 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201405071645.s47GjpEU070043@svn.freebsd.org> From: Jim Harris Date: Wed, 7 May 2014 16:45:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265563 - stable/9/sys/dev/nvme X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 16:45:51 -0000 Author: jimharris Date: Wed May 7 16:45:50 2014 New Revision: 265563 URL: http://svnweb.freebsd.org/changeset/base/265563 Log: MFC r263278: nvme: NVMe specification dictates 4-byte alignment for PRPs (not 8). Modified: stable/9/sys/dev/nvme/nvme_qpair.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/nvme/nvme_qpair.c ============================================================================== --- stable/9/sys/dev/nvme/nvme_qpair.c Wed May 7 16:45:05 2014 (r265562) +++ stable/9/sys/dev/nvme/nvme_qpair.c Wed May 7 16:45:50 2014 (r265563) @@ -498,8 +498,9 @@ nvme_qpair_construct(struct nvme_qpair * mtx_init(&qpair->lock, "nvme qpair lock", NULL, MTX_DEF); + /* Note: NVMe PRP format is restricted to 4-byte alignment. */ bus_dma_tag_create(bus_get_dma_tag(ctrlr->dev), - sizeof(uint64_t), PAGE_SIZE, BUS_SPACE_MAXADDR, + 4, PAGE_SIZE, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, NVME_MAX_XFER_SIZE, (NVME_MAX_XFER_SIZE/PAGE_SIZE)+1, PAGE_SIZE, 0, NULL, NULL, &qpair->dma_tag); From owner-svn-src-stable@FreeBSD.ORG Wed May 7 16:46:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04EAF50A; Wed, 7 May 2014 16:46:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CBE04F92; Wed, 7 May 2014 16:46:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47Gkuhx070220; Wed, 7 May 2014 16:46:56 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47Gkupt070218; Wed, 7 May 2014 16:46:56 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201405071646.s47Gkupt070218@svn.freebsd.org> From: Jim Harris Date: Wed, 7 May 2014 16:46:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265564 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 16:46:57 -0000 Author: jimharris Date: Wed May 7 16:46:56 2014 New Revision: 265564 URL: http://svnweb.freebsd.org/changeset/base/265564 Log: MFC r263303: Update nvme(4) and nvd(4) man pages to clarify the differences between their respective device nodes. Modified: stable/9/share/man/man4/nvd.4 stable/9/share/man/man4/nvme.4 Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/nvd.4 ============================================================================== --- stable/9/share/man/man4/nvd.4 Wed May 7 16:45:50 2014 (r265563) +++ stable/9/share/man/man4/nvd.4 Wed May 7 16:46:56 2014 (r265564) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2012-2013 Intel Corporation +.\" Copyright (c) 2012-2014 Intel Corporation .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 9, 2013 +.Dd March 18, 2014 .Dt NVD 4 .Os .Sh NAME @@ -62,8 +62,22 @@ It depends on the .Xr nvme 4 driver for notification of existing NVMe namespaces and submission of NVM I/O commands. +.Pp +Device nodes from the +.Nm +driver will have the format /dev/nvdX and are +.Xr GEOM 4 +disks which can be partitioned by +.Xr geom 8 . +Note that device nodes from the +.Xr nvme 4 +driver are not +.Xr GEOM 4 +disks and cannot be partitioned. .Sh SEE ALSO +.Xr GEOM 4 , .Xr nvme 4 , +.Xr geom 8 , .Xr nvmecontrol 8 , .Xr disk 9 .Sh HISTORY Modified: stable/9/share/man/man4/nvme.4 ============================================================================== --- stable/9/share/man/man4/nvme.4 Wed May 7 16:45:50 2014 (r265563) +++ stable/9/share/man/man4/nvme.4 Wed May 7 16:46:56 2014 (r265564) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2012-2013 Intel Corporation +.\" Copyright (c) 2012-2014 Intel Corporation .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 9, 2013 +.Dd March 18, 2014 .Dt NVME 4 .Os .Sh NAME @@ -54,7 +54,8 @@ nvme_load="YES" .Pp Most users will also want to enable .Xr nvd 4 -to surface NVM Express namespaces as disk devices. +to surface NVM Express namespaces as disk devices which can be +partitioned. Note that in NVM Express terms, a namespace is roughly equivalent to a SCSI LUN. .Sh DESCRIPTION @@ -73,11 +74,13 @@ API for registering NVMe namespace consu API for submitting NVM commands to namespaces .It Ioctls for controller and namespace configuration and management +.El .Pp +The .Nm -creates controller devices in the format +driver creates controller device nodes in the format .Pa /dev/nvmeX -and namespace devices in +and namespace device nodes in the format .Pa /dev/nvmeXnsY . Note that the NVM Express specification starts numbering namespaces at 1, From owner-svn-src-stable@FreeBSD.ORG Wed May 7 16:47:59 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A3C56C2; Wed, 7 May 2014 16:47:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C21FFA4; Wed, 7 May 2014 16:47:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47GlxiU070390; Wed, 7 May 2014 16:47:59 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47GlwuW070387; Wed, 7 May 2014 16:47:58 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201405071647.s47GlwuW070387@svn.freebsd.org> From: Jim Harris Date: Wed, 7 May 2014 16:47:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265565 - stable/9/sys/dev/nvme X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 16:47:59 -0000 Author: jimharris Date: Wed May 7 16:47:58 2014 New Revision: 265565 URL: http://svnweb.freebsd.org/changeset/base/265565 Log: MFC r263310: nvme: Close hole where nvd(4) would not be notified of all nvme(4) instances if modules loaded during boot. Modified: stable/9/sys/dev/nvme/nvme.c stable/9/sys/dev/nvme/nvme_ctrlr.c stable/9/sys/dev/nvme/nvme_private.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/nvme/nvme.c ============================================================================== --- stable/9/sys/dev/nvme/nvme.c Wed May 7 16:46:56 2014 (r265564) +++ stable/9/sys/dev/nvme/nvme.c Wed May 7 16:47:58 2014 (r265565) @@ -1,5 +1,5 @@ /*- - * Copyright (C) 2012-2013 Intel Corporation + * Copyright (C) 2012-2014 Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -266,39 +266,75 @@ nvme_detach (device_t dev) } static void -nvme_notify_consumer(struct nvme_consumer *cons) +nvme_notify(struct nvme_consumer *cons, + struct nvme_controller *ctrlr) { - device_t *devlist; - struct nvme_controller *ctrlr; struct nvme_namespace *ns; void *ctrlr_cookie; - int dev_idx, ns_idx, devcount; + int cmpset, ns_idx; + + /* + * The consumer may register itself after the nvme devices + * have registered with the kernel, but before the + * driver has completed initialization. In that case, + * return here, and when initialization completes, the + * controller will make sure the consumer gets notified. + */ + if (!ctrlr->is_initialized) + return; + + cmpset = atomic_cmpset_32(&ctrlr->notification_sent, 0, 1); + + if (cmpset == 0) + return; + + if (cons->ctrlr_fn != NULL) + ctrlr_cookie = (*cons->ctrlr_fn)(ctrlr); + else + ctrlr_cookie = NULL; + ctrlr->cons_cookie[cons->id] = ctrlr_cookie; + if (ctrlr->is_failed) { + if (cons->fail_fn != NULL) + (*cons->fail_fn)(ctrlr_cookie); + /* + * Do not notify consumers about the namespaces of a + * failed controller. + */ + return; + } + for (ns_idx = 0; ns_idx < ctrlr->cdata.nn; ns_idx++) { + ns = &ctrlr->ns[ns_idx]; + if (cons->ns_fn != NULL) + ns->cons_cookie[cons->id] = + (*cons->ns_fn)(ns, ctrlr_cookie); + } +} + +void +nvme_notify_new_controller(struct nvme_controller *ctrlr) +{ + int i; + + for (i = 0; i < NVME_MAX_CONSUMERS; i++) { + if (nvme_consumer[i].id != INVALID_CONSUMER_ID) { + nvme_notify(&nvme_consumer[i], ctrlr); + } + } +} + +static void +nvme_notify_new_consumer(struct nvme_consumer *cons) +{ + device_t *devlist; + struct nvme_controller *ctrlr; + int dev_idx, devcount; if (devclass_get_devices(nvme_devclass, &devlist, &devcount)) return; for (dev_idx = 0; dev_idx < devcount; dev_idx++) { ctrlr = DEVICE2SOFTC(devlist[dev_idx]); - if (cons->ctrlr_fn != NULL) - ctrlr_cookie = (*cons->ctrlr_fn)(ctrlr); - else - ctrlr_cookie = NULL; - ctrlr->cons_cookie[cons->id] = ctrlr_cookie; - if (ctrlr->is_failed) { - if (cons->fail_fn != NULL) - (*cons->fail_fn)(ctrlr_cookie); - /* - * Do not notify consumers about the namespaces of a - * failed controller. - */ - continue; - } - for (ns_idx = 0; ns_idx < ctrlr->cdata.nn; ns_idx++) { - ns = &ctrlr->ns[ns_idx]; - if (cons->ns_fn != NULL) - ns->cons_cookie[cons->id] = - (*cons->ns_fn)(ns, ctrlr_cookie); - } + nvme_notify(cons, ctrlr); } free(devlist, M_TEMP); @@ -353,7 +389,7 @@ nvme_register_consumer(nvme_cons_ns_fn_t nvme_consumer[i].async_fn = async_fn; nvme_consumer[i].fail_fn = fail_fn; - nvme_notify_consumer(&nvme_consumer[i]); + nvme_notify_new_consumer(&nvme_consumer[i]); return (&nvme_consumer[i]); } Modified: stable/9/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- stable/9/sys/dev/nvme/nvme_ctrlr.c Wed May 7 16:46:56 2014 (r265564) +++ stable/9/sys/dev/nvme/nvme_ctrlr.c Wed May 7 16:47:58 2014 (r265565) @@ -1,5 +1,5 @@ /*- - * Copyright (C) 2012-2013 Intel Corporation + * Copyright (C) 2012-2014 Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -851,6 +851,9 @@ nvme_ctrlr_start_config_hook(void *arg) nvme_ctrlr_start(ctrlr); config_intrhook_disestablish(&ctrlr->config_hook); + + ctrlr->is_initialized = 1; + nvme_notify_new_controller(ctrlr); } static void @@ -1174,6 +1177,8 @@ intx: taskqueue_start_threads(&ctrlr->taskqueue, 1, PI_DISK, "nvme taskq"); ctrlr->is_resetting = 0; + ctrlr->is_initialized = 0; + ctrlr->notification_sent = 0; TASK_INIT(&ctrlr->reset_task, 0, nvme_ctrlr_reset_task, ctrlr); TASK_INIT(&ctrlr->fail_req_task, 0, nvme_ctrlr_fail_req_task, ctrlr); Modified: stable/9/sys/dev/nvme/nvme_private.h ============================================================================== --- stable/9/sys/dev/nvme/nvme_private.h Wed May 7 16:46:56 2014 (r265564) +++ stable/9/sys/dev/nvme/nvme_private.h Wed May 7 16:47:58 2014 (r265565) @@ -1,5 +1,5 @@ /*- - * Copyright (C) 2012-2013 Intel Corporation + * Copyright (C) 2012-2014 Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -330,7 +330,9 @@ struct nvme_controller { void *cons_cookie[NVME_MAX_CONSUMERS]; - uint32_t is_resetting; + uint32_t is_resetting; + uint32_t is_initialized; + uint32_t notification_sent; boolean_t is_failed; STAILQ_HEAD(, nvme_request) fail_req; @@ -556,5 +558,6 @@ void nvme_notify_async_consumers(struct uint32_t log_page_id, void *log_page_buffer, uint32_t log_page_size); void nvme_notify_fail_consumers(struct nvme_controller *ctrlr); +void nvme_notify_new_controller(struct nvme_controller *ctrlr); #endif /* __NVME_PRIVATE_H__ */ From owner-svn-src-stable@FreeBSD.ORG Wed May 7 16:48:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C245C7FC; Wed, 7 May 2014 16:48:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEE03FAA; Wed, 7 May 2014 16:48:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47GmijO070545; Wed, 7 May 2014 16:48:44 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47GmifO070542; Wed, 7 May 2014 16:48:44 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201405071648.s47GmifO070542@svn.freebsd.org> From: Jim Harris Date: Wed, 7 May 2014 16:48:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265566 - stable/9/sys/dev/nvme X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 16:48:45 -0000 Author: jimharris Date: Wed May 7 16:48:43 2014 New Revision: 265566 URL: http://svnweb.freebsd.org/changeset/base/265566 Log: MFC r263311: nvme: Allocate all MSI resources up front so that we can fall back to INTx if necessary. Modified: stable/9/sys/dev/nvme/nvme_ctrlr.c stable/9/sys/dev/nvme/nvme_private.h stable/9/sys/dev/nvme/nvme_qpair.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- stable/9/sys/dev/nvme/nvme_ctrlr.c Wed May 7 16:47:58 2014 (r265565) +++ stable/9/sys/dev/nvme/nvme_ctrlr.c Wed May 7 16:48:43 2014 (r265566) @@ -1075,8 +1075,8 @@ nvme_ctrlr_construct(struct nvme_control { union cap_lo_register cap_lo; union cap_hi_register cap_hi; - int num_vectors, per_cpu_io_queues, status = 0; - int timeout_period; + int i, num_vectors, per_cpu_io_queues, rid; + int status, timeout_period; ctrlr->dev = dev; @@ -1149,8 +1149,45 @@ nvme_ctrlr_construct(struct nvme_control goto intx; } - if (pci_alloc_msix(dev, &num_vectors) != 0) + if (pci_alloc_msix(dev, &num_vectors) != 0) { ctrlr->msix_enabled = 0; + goto intx; + } + + /* + * On earlier FreeBSD releases, there are reports that + * pci_alloc_msix() can return successfully with all vectors + * requested, but a subsequent bus_alloc_resource_any() + * for one of those vectors fails. This issue occurs more + * readily with multiple devices using per-CPU vectors. + * To workaround this issue, try to allocate the resources now, + * and fall back to INTx if we cannot allocate all of them. + * This issue cannot be reproduced on more recent versions of + * FreeBSD which have increased the maximum number of MSI-X + * vectors, but adding the workaround makes it easier for + * vendors wishing to import this driver into kernels based on + * older versions of FreeBSD. + */ + for (i = 0; i < num_vectors; i++) { + rid = i + 1; + ctrlr->msi_res[i] = bus_alloc_resource_any(ctrlr->dev, + SYS_RES_IRQ, &rid, RF_ACTIVE); + + if (ctrlr->msi_res[i] == NULL) { + ctrlr->msix_enabled = 0; + while (i > 0) { + i--; + bus_release_resource(ctrlr->dev, + SYS_RES_IRQ, + rman_get_rid(ctrlr->msi_res[i]), + ctrlr->msi_res[i]); + } + pci_release_msi(dev); + nvme_printf(ctrlr, "could not obtain all MSI-X " + "resources, reverting to intx\n"); + break; + } + } intx: Modified: stable/9/sys/dev/nvme/nvme_private.h ============================================================================== --- stable/9/sys/dev/nvme/nvme_private.h Wed May 7 16:47:58 2014 (r265565) +++ stable/9/sys/dev/nvme/nvme_private.h Wed May 7 16:48:43 2014 (r265566) @@ -289,6 +289,8 @@ struct nvme_controller { struct task fail_req_task; struct taskqueue *taskqueue; + struct resource *msi_res[MAXCPU + 1]; + /* For shared legacy interrupt. */ int rid; struct resource *res; Modified: stable/9/sys/dev/nvme/nvme_qpair.c ============================================================================== --- stable/9/sys/dev/nvme/nvme_qpair.c Wed May 7 16:47:58 2014 (r265565) +++ stable/9/sys/dev/nvme/nvme_qpair.c Wed May 7 16:48:43 2014 (r265566) @@ -1,5 +1,5 @@ /*- - * Copyright (C) 2012-2013 Intel Corporation + * Copyright (C) 2012-2014 Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -487,9 +487,7 @@ nvme_qpair_construct(struct nvme_qpair * * the queue's vector to get the corresponding rid to use. */ qpair->rid = vector + 1; - - qpair->res = bus_alloc_resource_any(ctrlr->dev, SYS_RES_IRQ, - &qpair->rid, RF_ACTIVE); + qpair->res = ctrlr->msi_res[vector]; bus_setup_intr(ctrlr->dev, qpair->res, INTR_TYPE_MISC | INTR_MPSAFE, NULL, From owner-svn-src-stable@FreeBSD.ORG Wed May 7 16:52:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 392909FC; Wed, 7 May 2014 16:52:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0986EBD; Wed, 7 May 2014 16:52:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47GqT2q073994; Wed, 7 May 2014 16:52:29 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47GqT27073993; Wed, 7 May 2014 16:52:29 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201405071652.s47GqT27073993@svn.freebsd.org> From: Jim Harris Date: Wed, 7 May 2014 16:52:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265567 - stable/10/sbin/nvmecontrol X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 16:52:30 -0000 Author: jimharris Date: Wed May 7 16:52:29 2014 New Revision: 265567 URL: http://svnweb.freebsd.org/changeset/base/265567 Log: MFC r258071: Check for special status code from FIRMWARE_ACTIVATE command signifying that a reboot is required to complete activation of the requested firmware image. Modified: stable/10/sbin/nvmecontrol/firmware.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/nvmecontrol/firmware.c ============================================================================== --- stable/10/sbin/nvmecontrol/firmware.c Wed May 7 16:48:43 2014 (r265566) +++ stable/10/sbin/nvmecontrol/firmware.c Wed May 7 16:52:29 2014 (r265567) @@ -141,7 +141,7 @@ update_firmware(int fd, uint8_t *payload } } -static void +static int activate_firmware(int fd, int slot, int activate_action) { struct nvme_pt_command pt; @@ -154,8 +154,14 @@ activate_firmware(int fd, int slot, int if (ioctl(fd, NVME_PASSTHROUGH_CMD, &pt) < 0) err(1, "firmware activate request failed"); + if (pt.cpl.status.sct == NVME_SCT_COMMAND_SPECIFIC && + pt.cpl.status.sc == NVME_SC_FIRMWARE_REQUIRES_RESET) + return 1; + if (nvme_completion_is_error(&pt.cpl)) errx(1, "firmware activate request returned error"); + + return 0; } static void @@ -171,6 +177,7 @@ firmware(int argc, char *argv[]) { int fd = -1, slot = 0; int a_flag, s_flag, f_flag; + int activate_action, reboot_required; char ch, *p, *image = NULL; char *controller = NULL, prompt[64]; void *buf = NULL; @@ -287,21 +294,27 @@ firmware(int argc, char *argv[]) if (f_flag) { update_firmware(fd, buf, size); if (a_flag) - activate_firmware(fd, slot, - NVME_AA_REPLACE_ACTIVATE); + activate_action = NVME_AA_REPLACE_ACTIVATE; else - activate_firmware(fd, slot, - NVME_AA_REPLACE_NO_ACTIVATE); + activate_action = NVME_AA_REPLACE_NO_ACTIVATE; } else { - activate_firmware(fd, slot, NVME_AA_ACTIVATE); + activate_action = NVME_AA_ACTIVATE; } + reboot_required = activate_firmware(fd, slot, activate_action); + if (a_flag) { - printf("New firmware image activated and will take " - "effect after next controller reset.\n" - "Controller reset can be initiated via " - "'nvmecontrol reset %s'\n", - controller); + if (reboot_required) { + printf("New firmware image activated but requires " + "conventional reset (i.e. reboot) to " + "complete activation.\n"); + } else { + printf("New firmware image activated and will take " + "effect after next controller reset.\n" + "Controller reset can be initiated via " + "'nvmecontrol reset %s'\n", + controller); + } } close(fd); From owner-svn-src-stable@FreeBSD.ORG Wed May 7 16:53:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D952AB3B; Wed, 7 May 2014 16:53:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6277CA; Wed, 7 May 2014 16:53:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47GrgMK074158; Wed, 7 May 2014 16:53:42 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47GrgY1074157; Wed, 7 May 2014 16:53:42 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201405071653.s47GrgY1074157@svn.freebsd.org> From: Jim Harris Date: Wed, 7 May 2014 16:53:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265568 - stable/10/sbin/nvmecontrol X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 16:53:42 -0000 Author: jimharris Date: Wed May 7 16:53:42 2014 New Revision: 265568 URL: http://svnweb.freebsd.org/changeset/base/265568 Log: MFC r260381: For "nvmecontrol devlist", show namespace sizes in terms of MB instead of GB to improve granularity of the reporting - especially for namespaces that are on the order of 1 or 2 GB. Modified: stable/10/sbin/nvmecontrol/devlist.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/nvmecontrol/devlist.c ============================================================================== --- stable/10/sbin/nvmecontrol/devlist.c Wed May 7 16:52:29 2014 (r265567) +++ stable/10/sbin/nvmecontrol/devlist.c Wed May 7 16:53:42 2014 (r265568) @@ -99,11 +99,11 @@ devlist(int argc, char *argv[]) sprintf(name, "%s%d%s%d", NVME_CTRLR_PREFIX, ctrlr, NVME_NS_PREFIX, i+1); read_namespace_data(fd, i+1, &nsdata); - printf(" %10s (%lldGB)\n", + printf(" %10s (%lldMB)\n", name, nsdata.nsze * (long long)ns_get_sector_size(&nsdata) / - 1024 / 1024 / 1024); + 1024 / 1024); } close(fd); From owner-svn-src-stable@FreeBSD.ORG Wed May 7 16:55:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B7FE2C7A; Wed, 7 May 2014 16:55:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B0E2D2; Wed, 7 May 2014 16:55:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47Gt83D074433; Wed, 7 May 2014 16:55:08 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47Gt8MH074432; Wed, 7 May 2014 16:55:08 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201405071655.s47Gt8MH074432@svn.freebsd.org> From: Jim Harris Date: Wed, 7 May 2014 16:55:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265569 - stable/10/sys/dev/nvme X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 16:55:08 -0000 Author: jimharris Date: Wed May 7 16:55:08 2014 New Revision: 265569 URL: http://svnweb.freebsd.org/changeset/base/265569 Log: MFC r260382: For IDENTIFY passthrough commands to Chatham prototype controllers, copy the spoofed identify data into the user buffer rather than issuing the command to the controller, since Chatham IDENTIFY data is always spoofed. While here, fix a bug in the spoofed data for Chatham submission and completion queue entry sizes. Modified: stable/10/sys/dev/nvme/nvme_ctrlr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- stable/10/sys/dev/nvme/nvme_ctrlr.c Wed May 7 16:53:42 2014 (r265568) +++ stable/10/sys/dev/nvme/nvme_ctrlr.c Wed May 7 16:55:08 2014 (r265569) @@ -181,8 +181,8 @@ nvme_chatham_populate_cdata(struct nvme_ cdata->lpa.ns_smart = 1; cdata->sqes.min = 6; cdata->sqes.max = 6; - cdata->sqes.min = 4; - cdata->sqes.max = 4; + cdata->cqes.min = 4; + cdata->cqes.max = 4; cdata->nn = 1; /* Chatham2 doesn't support DSM command */ @@ -1041,6 +1041,27 @@ nvme_ctrlr_ioctl(struct cdev *cdev, u_lo break; case NVME_PASSTHROUGH_CMD: pt = (struct nvme_pt_command *)arg; +#ifdef CHATHAM2 + /* + * Chatham IDENTIFY data is spoofed, so copy the spoofed data + * rather than issuing the command to the Chatham controller. + */ + if (pci_get_devid(ctrlr->dev) == CHATHAM_PCI_ID && + pt->cmd.opc == NVME_OPC_IDENTIFY) { + if (pt->cmd.cdw10 == 1) { + if (pt->len != sizeof(ctrlr->cdata)) + return (EINVAL); + return (copyout(&ctrlr->cdata, pt->buf, + pt->len)); + } else { + if (pt->len != sizeof(ctrlr->ns[0].data) || + pt->cmd.nsid != 1) + return (EINVAL); + return (copyout(&ctrlr->ns[0].data, pt->buf, + pt->len)); + } + } +#endif return (nvme_ctrlr_passthrough_cmd(ctrlr, pt, pt->cmd.nsid, 1 /* is_user_buffer */, 1 /* is_admin_cmd */)); default: From owner-svn-src-stable@FreeBSD.ORG Wed May 7 16:56:21 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2DF04DB5; Wed, 7 May 2014 16:56:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1AADEDF; Wed, 7 May 2014 16:56:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47GuKsc074607; Wed, 7 May 2014 16:56:20 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47GuKLo074605; Wed, 7 May 2014 16:56:20 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201405071656.s47GuKLo074605@svn.freebsd.org> From: Jim Harris Date: Wed, 7 May 2014 16:56:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265570 - stable/10/sys/dev/isci/scil X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 16:56:21 -0000 Author: jimharris Date: Wed May 7 16:56:20 2014 New Revision: 265570 URL: http://svnweb.freebsd.org/changeset/base/265570 Log: MFC r263275: isci: Ensure ATA passthrough commands with RETURN_RESPONSE bit set translate their response. Modified: stable/10/sys/dev/isci/scil/sati_passthrough.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isci/scil/sati_passthrough.c ============================================================================== --- stable/10/sys/dev/isci/scil/sati_passthrough.c Wed May 7 16:55:08 2014 (r265569) +++ stable/10/sys/dev/isci/scil/sati_passthrough.c Wed May 7 16:56:20 2014 (r265570) @@ -441,6 +441,13 @@ SATI_STATUS sati_passthrough_16_translat sati_set_ata_lba_mid_exp(register_fis, sati_get_cdb_byte(cdb, 9)); sati_set_ata_lba_high_exp(register_fis, sati_get_cdb_byte(cdb, 11)); } + + if (PASSTHROUGH_CDB_CK_COND(cdb) || + PASSTHROUGH_CDB_PROTOCOL(cdb) == PASSTHROUGH_RETURN_RESPONSE) + { + sequence->is_translate_response_required = TRUE; + } + sati_set_ata_features(register_fis, sati_get_cdb_byte(cdb, 4)); sati_set_ata_sector_count(register_fis, sati_get_cdb_byte(cdb, 6)); sati_set_ata_lba_low(register_fis, sati_get_cdb_byte(cdb, 8)); @@ -483,6 +490,8 @@ SATI_STATUS sati_passthrough_translate_r return SATI_FAILURE_CHECK_RESPONSE_DATA; } + sequence->state = SATI_SEQUENCE_STATE_FINAL; + // If the user set the check condition bit, fill out the sense data if (PASSTHROUGH_CDB_CK_COND(cdb) || PASSTHROUGH_CDB_PROTOCOL(cdb) == PASSTHROUGH_RETURN_RESPONSE) @@ -496,10 +505,9 @@ SATI_STATUS sati_passthrough_translate_r SCSI_ASC_NO_ADDITIONAL_SENSE, SCSI_ASCQ_ATA_PASS_THROUGH_INFORMATION_AVAILABLE ); + return SATI_FAILURE_CHECK_RESPONSE_DATA; } - sequence->state = SATI_SEQUENCE_STATE_FINAL; - return SATI_COMPLETE; } From owner-svn-src-stable@FreeBSD.ORG Wed May 7 16:57:34 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A102FCE; Wed, 7 May 2014 16:57:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 568F9EC; Wed, 7 May 2014 16:57:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47GvYsC074868; Wed, 7 May 2014 16:57:34 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47GvX7l074863; Wed, 7 May 2014 16:57:33 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201405071657.s47GvX7l074863@svn.freebsd.org> From: Jim Harris Date: Wed, 7 May 2014 16:57:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265571 - stable/10/sys/dev/isci/scil X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 16:57:34 -0000 Author: jimharris Date: Wed May 7 16:57:33 2014 New Revision: 265571 URL: http://svnweb.freebsd.org/changeset/base/265571 Log: MFC r263276: Base the max number of SG elements on MAXPHYS. Modified: stable/10/sys/dev/isci/scil/sati_util.h stable/10/sys/dev/isci/scil/sci_controller_constants.h stable/10/sys/dev/isci/scil/sci_util.h stable/10/sys/dev/isci/scil/scic_sds_request.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isci/scil/sati_util.h ============================================================================== --- stable/10/sys/dev/isci/scil/sati_util.h Wed May 7 16:56:20 2014 (r265570) +++ stable/10/sys/dev/isci/scil/sati_util.h Wed May 7 16:57:33 2014 (r265571) @@ -62,6 +62,8 @@ * structure data, fill in sense data, etc. */ +#include + #include #include @@ -144,15 +146,6 @@ #define ATA_MICROCODE_OFFSET_DOWNLOAD 0x03 #define ATA_MICROCODE_DOWNLOAD_SAVE 0x07 -#ifndef MIN -#define MIN(x,y) ((x) < (y) ? (x) : (y)) -#endif - -#ifndef MAX -#define MAX(x,y) ((x) > (y) ? (x) : (y)) -#endif - - void sati_ata_non_data_command( void * ata_io, SATI_TRANSLATOR_SEQUENCE_T * sequence Modified: stable/10/sys/dev/isci/scil/sci_controller_constants.h ============================================================================== --- stable/10/sys/dev/isci/scil/sci_controller_constants.h Wed May 7 16:56:20 2014 (r265570) +++ stable/10/sys/dev/isci/scil/sci_controller_constants.h Wed May 7 16:57:33 2014 (r265571) @@ -54,6 +54,8 @@ #ifndef _SCI_CONTROLLER_CONSTANTS_H_ #define _SCI_CONTROLLER_CONSTANTS_H_ +#include + /** * @file * @@ -148,8 +150,13 @@ extern "C" { /** * This constant defines the maximum number of Scatter-Gather Elements * to be used by any SCI component. + * + * Note: number of elements must be an even number, since descriptors + * posted to hardware always contain pairs of elements (with second + * element set to zeroes if not needed). */ -#define SCI_MAX_SCATTER_GATHER_ELEMENTS 130 +#define __MAXPHYS_ELEMENTS ((MAXPHYS / PAGE_SIZE) + 1) +#define SCI_MAX_SCATTER_GATHER_ELEMENTS ((__MAXPHYS_ELEMENTS + 1) & ~0x1) #endif #ifndef SCI_MIN_SCATTER_GATHER_ELEMENTS Modified: stable/10/sys/dev/isci/scil/sci_util.h ============================================================================== --- stable/10/sys/dev/isci/scil/sci_util.h Wed May 7 16:56:20 2014 (r265570) +++ stable/10/sys/dev/isci/scil/sci_util.h Wed May 7 16:57:33 2014 (r265571) @@ -54,20 +54,14 @@ #ifndef _SCI_UTIL_H_ #define _SCI_UTIL_H_ +#include + #include #ifndef ARRAY_SIZE #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) #endif -#ifndef MIN -#define MIN(x,y) ((x) < (y) ? (x) : (y)) -#endif - -#ifndef MAX -#define MAX(x,y) ((x) > (y) ? (x) : (y)) -#endif - /** * Normal byte swap macro */ Modified: stable/10/sys/dev/isci/scil/scic_sds_request.h ============================================================================== --- stable/10/sys/dev/isci/scil/scic_sds_request.h Wed May 7 16:56:20 2014 (r265570) +++ stable/10/sys/dev/isci/scil/scic_sds_request.h Wed May 7 16:57:33 2014 (r265571) @@ -65,6 +65,8 @@ extern "C" { #endif // __cplusplus +#include + #include #include @@ -331,7 +333,6 @@ extern SCIC_SDS_IO_REQUEST_STATE_HANDLER #define scic_sds_request_get_task_context(request) \ ((request)->task_context_buffer) -#define CACHE_LINE_SIZE (64) #define scic_sds_request_align_task_context_buffer(address) \ ((SCU_TASK_CONTEXT_T *)( \ (((POINTER_UINT)(address)) + (CACHE_LINE_SIZE - 1)) \ From owner-svn-src-stable@FreeBSD.ORG Wed May 7 17:00:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BD7CB3BF; Wed, 7 May 2014 17:00:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA35F126; Wed, 7 May 2014 17:00:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47H0dcU076034; Wed, 7 May 2014 17:00:39 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47H0dRG076033; Wed, 7 May 2014 17:00:39 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201405071700.s47H0dRG076033@svn.freebsd.org> From: Jim Harris Date: Wed, 7 May 2014 17:00:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265572 - stable/10/sys/dev/nvme X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 17:00:39 -0000 Author: jimharris Date: Wed May 7 17:00:39 2014 New Revision: 265572 URL: http://svnweb.freebsd.org/changeset/base/265572 Log: MFC r263277: nvme: Remove the software progress marker SET_FEATURE command during controller initialization. The spec says OS drivers should send this command after controller initialization completes successfully, but other NVMe OS drivers are not sending this command. This change will therefore reduce differences between the FreeBSD and other OS drivers. Modified: stable/10/sys/dev/nvme/nvme_ctrlr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- stable/10/sys/dev/nvme/nvme_ctrlr.c Wed May 7 16:57:33 2014 (r265571) +++ stable/10/sys/dev/nvme/nvme_ctrlr.c Wed May 7 17:00:39 2014 (r265572) @@ -842,16 +842,6 @@ nvme_ctrlr_start(void *ctrlr_arg) for (i = 0; i < ctrlr->num_io_queues; i++) nvme_io_qpair_enable(&ctrlr->ioq[i]); - - /* - * Clear software progress marker to 0, to indicate to pre-boot - * software that OS driver load was successful. - * - * Chatham does not support this feature. - */ - if (pci_get_devid(ctrlr->dev) != CHATHAM_PCI_ID) - nvme_ctrlr_cmd_set_feature(ctrlr, - NVME_FEAT_SOFTWARE_PROGRESS_MARKER, 0, NULL, 0, NULL, NULL); } void From owner-svn-src-stable@FreeBSD.ORG Wed May 7 17:02:16 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A30F593; Wed, 7 May 2014 17:02:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2702B1A8; Wed, 7 May 2014 17:02:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47H2GnA078792; Wed, 7 May 2014 17:02:16 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47H2G4n078791; Wed, 7 May 2014 17:02:16 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201405071702.s47H2G4n078791@svn.freebsd.org> From: Jim Harris Date: Wed, 7 May 2014 17:02:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265573 - stable/10/sys/dev/nvme X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 17:02:16 -0000 Author: jimharris Date: Wed May 7 17:02:15 2014 New Revision: 265573 URL: http://svnweb.freebsd.org/changeset/base/265573 Log: MFC r263278: nvme: NVMe specification dictates 4-byte alignment for PRPs (not 8). Modified: stable/10/sys/dev/nvme/nvme_qpair.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/nvme/nvme_qpair.c ============================================================================== --- stable/10/sys/dev/nvme/nvme_qpair.c Wed May 7 17:00:39 2014 (r265572) +++ stable/10/sys/dev/nvme/nvme_qpair.c Wed May 7 17:02:15 2014 (r265573) @@ -498,8 +498,9 @@ nvme_qpair_construct(struct nvme_qpair * mtx_init(&qpair->lock, "nvme qpair lock", NULL, MTX_DEF); + /* Note: NVMe PRP format is restricted to 4-byte alignment. */ bus_dma_tag_create(bus_get_dma_tag(ctrlr->dev), - sizeof(uint64_t), PAGE_SIZE, BUS_SPACE_MAXADDR, + 4, PAGE_SIZE, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, NVME_MAX_XFER_SIZE, (NVME_MAX_XFER_SIZE/PAGE_SIZE)+1, PAGE_SIZE, 0, NULL, NULL, &qpair->dma_tag); From owner-svn-src-stable@FreeBSD.ORG Wed May 7 17:17:17 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 57D6B294; Wed, 7 May 2014 17:17:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2BA892F2; Wed, 7 May 2014 17:17:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47HHHZp084297; Wed, 7 May 2014 17:17:17 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47HHGts084292; Wed, 7 May 2014 17:17:16 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201405071717.s47HHGts084292@svn.freebsd.org> From: Jim Harris Date: Wed, 7 May 2014 17:17:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265575 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 17:17:17 -0000 Author: jimharris Date: Wed May 7 17:17:16 2014 New Revision: 265575 URL: http://svnweb.freebsd.org/changeset/base/265575 Log: MFC r263303: Update nvme(4) and nvd(4) man pages to clarify the differences between their respective device nodes. Modified: stable/10/share/man/man4/nvd.4 stable/10/share/man/man4/nvme.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/nvd.4 ============================================================================== --- stable/10/share/man/man4/nvd.4 Wed May 7 17:12:15 2014 (r265574) +++ stable/10/share/man/man4/nvd.4 Wed May 7 17:17:16 2014 (r265575) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2012-2013 Intel Corporation +.\" Copyright (c) 2012-2014 Intel Corporation .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 9, 2013 +.Dd March 18, 2014 .Dt NVD 4 .Os .Sh NAME @@ -62,8 +62,22 @@ It depends on the .Xr nvme 4 driver for notification of existing NVMe namespaces and submission of NVM I/O commands. +.Pp +Device nodes from the +.Nm +driver will have the format /dev/nvdX and are +.Xr GEOM 4 +disks which can be partitioned by +.Xr geom 8 . +Note that device nodes from the +.Xr nvme 4 +driver are not +.Xr GEOM 4 +disks and cannot be partitioned. .Sh SEE ALSO +.Xr GEOM 4 , .Xr nvme 4 , +.Xr geom 8 , .Xr nvmecontrol 8 , .Xr disk 9 .Sh HISTORY Modified: stable/10/share/man/man4/nvme.4 ============================================================================== --- stable/10/share/man/man4/nvme.4 Wed May 7 17:12:15 2014 (r265574) +++ stable/10/share/man/man4/nvme.4 Wed May 7 17:17:16 2014 (r265575) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2012-2013 Intel Corporation +.\" Copyright (c) 2012-2014 Intel Corporation .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 9, 2013 +.Dd March 18, 2014 .Dt NVME 4 .Os .Sh NAME @@ -54,7 +54,8 @@ nvme_load="YES" .Pp Most users will also want to enable .Xr nvd 4 -to surface NVM Express namespaces as disk devices. +to surface NVM Express namespaces as disk devices which can be +partitioned. Note that in NVM Express terms, a namespace is roughly equivalent to a SCSI LUN. .Sh DESCRIPTION @@ -73,11 +74,13 @@ API for registering NVMe namespace consu API for submitting NVM commands to namespaces .It Ioctls for controller and namespace configuration and management +.El .Pp +The .Nm -creates controller devices in the format +driver creates controller device nodes in the format .Pa /dev/nvmeX -and namespace devices in +and namespace device nodes in the format .Pa /dev/nvmeXnsY . Note that the NVM Express specification starts numbering namespaces at 1, From owner-svn-src-stable@FreeBSD.ORG Wed May 7 17:18:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CAF20652; Wed, 7 May 2014 17:18:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACB7D30D; Wed, 7 May 2014 17:18:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47HIqha084617; Wed, 7 May 2014 17:18:52 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47HIqtP084614; Wed, 7 May 2014 17:18:52 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201405071718.s47HIqtP084614@svn.freebsd.org> From: Jim Harris Date: Wed, 7 May 2014 17:18:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265576 - stable/10/sys/dev/nvme X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 17:18:53 -0000 Author: jimharris Date: Wed May 7 17:18:51 2014 New Revision: 265576 URL: http://svnweb.freebsd.org/changeset/base/265576 Log: MFC r263310: nvme: Close hole where nvd(4) would not be notified of all nvme(4) instances if modules loaded during boot. Modified: stable/10/sys/dev/nvme/nvme.c stable/10/sys/dev/nvme/nvme_ctrlr.c stable/10/sys/dev/nvme/nvme_private.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/nvme/nvme.c ============================================================================== --- stable/10/sys/dev/nvme/nvme.c Wed May 7 17:17:16 2014 (r265575) +++ stable/10/sys/dev/nvme/nvme.c Wed May 7 17:18:51 2014 (r265576) @@ -1,5 +1,5 @@ /*- - * Copyright (C) 2012-2013 Intel Corporation + * Copyright (C) 2012-2014 Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -266,39 +266,75 @@ nvme_detach (device_t dev) } static void -nvme_notify_consumer(struct nvme_consumer *cons) +nvme_notify(struct nvme_consumer *cons, + struct nvme_controller *ctrlr) { - device_t *devlist; - struct nvme_controller *ctrlr; struct nvme_namespace *ns; void *ctrlr_cookie; - int dev_idx, ns_idx, devcount; + int cmpset, ns_idx; + + /* + * The consumer may register itself after the nvme devices + * have registered with the kernel, but before the + * driver has completed initialization. In that case, + * return here, and when initialization completes, the + * controller will make sure the consumer gets notified. + */ + if (!ctrlr->is_initialized) + return; + + cmpset = atomic_cmpset_32(&ctrlr->notification_sent, 0, 1); + + if (cmpset == 0) + return; + + if (cons->ctrlr_fn != NULL) + ctrlr_cookie = (*cons->ctrlr_fn)(ctrlr); + else + ctrlr_cookie = NULL; + ctrlr->cons_cookie[cons->id] = ctrlr_cookie; + if (ctrlr->is_failed) { + if (cons->fail_fn != NULL) + (*cons->fail_fn)(ctrlr_cookie); + /* + * Do not notify consumers about the namespaces of a + * failed controller. + */ + return; + } + for (ns_idx = 0; ns_idx < ctrlr->cdata.nn; ns_idx++) { + ns = &ctrlr->ns[ns_idx]; + if (cons->ns_fn != NULL) + ns->cons_cookie[cons->id] = + (*cons->ns_fn)(ns, ctrlr_cookie); + } +} + +void +nvme_notify_new_controller(struct nvme_controller *ctrlr) +{ + int i; + + for (i = 0; i < NVME_MAX_CONSUMERS; i++) { + if (nvme_consumer[i].id != INVALID_CONSUMER_ID) { + nvme_notify(&nvme_consumer[i], ctrlr); + } + } +} + +static void +nvme_notify_new_consumer(struct nvme_consumer *cons) +{ + device_t *devlist; + struct nvme_controller *ctrlr; + int dev_idx, devcount; if (devclass_get_devices(nvme_devclass, &devlist, &devcount)) return; for (dev_idx = 0; dev_idx < devcount; dev_idx++) { ctrlr = DEVICE2SOFTC(devlist[dev_idx]); - if (cons->ctrlr_fn != NULL) - ctrlr_cookie = (*cons->ctrlr_fn)(ctrlr); - else - ctrlr_cookie = NULL; - ctrlr->cons_cookie[cons->id] = ctrlr_cookie; - if (ctrlr->is_failed) { - if (cons->fail_fn != NULL) - (*cons->fail_fn)(ctrlr_cookie); - /* - * Do not notify consumers about the namespaces of a - * failed controller. - */ - continue; - } - for (ns_idx = 0; ns_idx < ctrlr->cdata.nn; ns_idx++) { - ns = &ctrlr->ns[ns_idx]; - if (cons->ns_fn != NULL) - ns->cons_cookie[cons->id] = - (*cons->ns_fn)(ns, ctrlr_cookie); - } + nvme_notify(cons, ctrlr); } free(devlist, M_TEMP); @@ -353,7 +389,7 @@ nvme_register_consumer(nvme_cons_ns_fn_t nvme_consumer[i].async_fn = async_fn; nvme_consumer[i].fail_fn = fail_fn; - nvme_notify_consumer(&nvme_consumer[i]); + nvme_notify_new_consumer(&nvme_consumer[i]); return (&nvme_consumer[i]); } Modified: stable/10/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- stable/10/sys/dev/nvme/nvme_ctrlr.c Wed May 7 17:17:16 2014 (r265575) +++ stable/10/sys/dev/nvme/nvme_ctrlr.c Wed May 7 17:18:51 2014 (r265576) @@ -1,5 +1,5 @@ /*- - * Copyright (C) 2012-2013 Intel Corporation + * Copyright (C) 2012-2014 Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -851,6 +851,9 @@ nvme_ctrlr_start_config_hook(void *arg) nvme_ctrlr_start(ctrlr); config_intrhook_disestablish(&ctrlr->config_hook); + + ctrlr->is_initialized = 1; + nvme_notify_new_controller(ctrlr); } static void @@ -1174,6 +1177,8 @@ intx: taskqueue_start_threads(&ctrlr->taskqueue, 1, PI_DISK, "nvme taskq"); ctrlr->is_resetting = 0; + ctrlr->is_initialized = 0; + ctrlr->notification_sent = 0; TASK_INIT(&ctrlr->reset_task, 0, nvme_ctrlr_reset_task, ctrlr); TASK_INIT(&ctrlr->fail_req_task, 0, nvme_ctrlr_fail_req_task, ctrlr); Modified: stable/10/sys/dev/nvme/nvme_private.h ============================================================================== --- stable/10/sys/dev/nvme/nvme_private.h Wed May 7 17:17:16 2014 (r265575) +++ stable/10/sys/dev/nvme/nvme_private.h Wed May 7 17:18:51 2014 (r265576) @@ -1,5 +1,5 @@ /*- - * Copyright (C) 2012-2013 Intel Corporation + * Copyright (C) 2012-2014 Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -330,7 +330,9 @@ struct nvme_controller { void *cons_cookie[NVME_MAX_CONSUMERS]; - uint32_t is_resetting; + uint32_t is_resetting; + uint32_t is_initialized; + uint32_t notification_sent; boolean_t is_failed; STAILQ_HEAD(, nvme_request) fail_req; @@ -556,5 +558,6 @@ void nvme_notify_async_consumers(struct uint32_t log_page_id, void *log_page_buffer, uint32_t log_page_size); void nvme_notify_fail_consumers(struct nvme_controller *ctrlr); +void nvme_notify_new_controller(struct nvme_controller *ctrlr); #endif /* __NVME_PRIVATE_H__ */ From owner-svn-src-stable@FreeBSD.ORG Wed May 7 17:20:16 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 725AE7BA; Wed, 7 May 2014 17:20:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F097324; Wed, 7 May 2014 17:20:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47HKGjO085397; Wed, 7 May 2014 17:20:16 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47HKFrn085394; Wed, 7 May 2014 17:20:15 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201405071720.s47HKFrn085394@svn.freebsd.org> From: Jim Harris Date: Wed, 7 May 2014 17:20:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265577 - stable/10/sys/dev/nvme X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 17:20:16 -0000 Author: jimharris Date: Wed May 7 17:20:15 2014 New Revision: 265577 URL: http://svnweb.freebsd.org/changeset/base/265577 Log: MFC r263311: nvme: Allocate all MSI resources up front so that we can fall back to INTx if necessary. Modified: stable/10/sys/dev/nvme/nvme_ctrlr.c stable/10/sys/dev/nvme/nvme_private.h stable/10/sys/dev/nvme/nvme_qpair.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- stable/10/sys/dev/nvme/nvme_ctrlr.c Wed May 7 17:18:51 2014 (r265576) +++ stable/10/sys/dev/nvme/nvme_ctrlr.c Wed May 7 17:20:15 2014 (r265577) @@ -1075,8 +1075,8 @@ nvme_ctrlr_construct(struct nvme_control { union cap_lo_register cap_lo; union cap_hi_register cap_hi; - int num_vectors, per_cpu_io_queues, status = 0; - int timeout_period; + int i, num_vectors, per_cpu_io_queues, rid; + int status, timeout_period; ctrlr->dev = dev; @@ -1149,8 +1149,45 @@ nvme_ctrlr_construct(struct nvme_control goto intx; } - if (pci_alloc_msix(dev, &num_vectors) != 0) + if (pci_alloc_msix(dev, &num_vectors) != 0) { ctrlr->msix_enabled = 0; + goto intx; + } + + /* + * On earlier FreeBSD releases, there are reports that + * pci_alloc_msix() can return successfully with all vectors + * requested, but a subsequent bus_alloc_resource_any() + * for one of those vectors fails. This issue occurs more + * readily with multiple devices using per-CPU vectors. + * To workaround this issue, try to allocate the resources now, + * and fall back to INTx if we cannot allocate all of them. + * This issue cannot be reproduced on more recent versions of + * FreeBSD which have increased the maximum number of MSI-X + * vectors, but adding the workaround makes it easier for + * vendors wishing to import this driver into kernels based on + * older versions of FreeBSD. + */ + for (i = 0; i < num_vectors; i++) { + rid = i + 1; + ctrlr->msi_res[i] = bus_alloc_resource_any(ctrlr->dev, + SYS_RES_IRQ, &rid, RF_ACTIVE); + + if (ctrlr->msi_res[i] == NULL) { + ctrlr->msix_enabled = 0; + while (i > 0) { + i--; + bus_release_resource(ctrlr->dev, + SYS_RES_IRQ, + rman_get_rid(ctrlr->msi_res[i]), + ctrlr->msi_res[i]); + } + pci_release_msi(dev); + nvme_printf(ctrlr, "could not obtain all MSI-X " + "resources, reverting to intx\n"); + break; + } + } intx: Modified: stable/10/sys/dev/nvme/nvme_private.h ============================================================================== --- stable/10/sys/dev/nvme/nvme_private.h Wed May 7 17:18:51 2014 (r265576) +++ stable/10/sys/dev/nvme/nvme_private.h Wed May 7 17:20:15 2014 (r265577) @@ -289,6 +289,8 @@ struct nvme_controller { struct task fail_req_task; struct taskqueue *taskqueue; + struct resource *msi_res[MAXCPU + 1]; + /* For shared legacy interrupt. */ int rid; struct resource *res; Modified: stable/10/sys/dev/nvme/nvme_qpair.c ============================================================================== --- stable/10/sys/dev/nvme/nvme_qpair.c Wed May 7 17:18:51 2014 (r265576) +++ stable/10/sys/dev/nvme/nvme_qpair.c Wed May 7 17:20:15 2014 (r265577) @@ -1,5 +1,5 @@ /*- - * Copyright (C) 2012-2013 Intel Corporation + * Copyright (C) 2012-2014 Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -487,9 +487,7 @@ nvme_qpair_construct(struct nvme_qpair * * the queue's vector to get the corresponding rid to use. */ qpair->rid = vector + 1; - - qpair->res = bus_alloc_resource_any(ctrlr->dev, SYS_RES_IRQ, - &qpair->rid, RF_ACTIVE); + qpair->res = ctrlr->msi_res[vector]; bus_setup_intr(ctrlr->dev, qpair->res, INTR_TYPE_MISC | INTR_MPSAFE, NULL, From owner-svn-src-stable@FreeBSD.ORG Wed May 7 18:15:21 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB1DBAA6; Wed, 7 May 2014 18:15:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A6EE8ABB; Wed, 7 May 2014 18:15:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47IFLls011051; Wed, 7 May 2014 18:15:21 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47IFKro011040; Wed, 7 May 2014 18:15:20 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201405071815.s47IFKro011040@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 7 May 2014 18:15:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265582 - in stable/9/sys/dev/cxgbe: . common tom X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 18:15:21 -0000 Author: np Date: Wed May 7 18:15:20 2014 New Revision: 265582 URL: http://svnweb.freebsd.org/changeset/base/265582 Log: MFC r259527, r260210 (by adrian@), r261533, r261536, r261537, r261558 (by scottl@), r263317, r263412, r263457, and r264621 (by emax@). r259527: Do not create a hardware IPv6 server if the listen address is not in6addr_any and is not in the CLIP table either. This fixes a reported TOE+IPv6 NULL-dereference panic in do_pass_open_rpl(). While here, stop creating hardware servers for any loopback address. It's just a waste of server tids. r260210: Add an option to enable or disable the small RX packet copying that is done to improve performance of small frames. When doing RX packing, the RX copying isn't necessarily required. r261533: cxgbe(4): Use the port's tx channel to identify it to t4_clr_port_stats. r261536: cxgbe(4): The T5 allows for a different freelist starvation threshold for queues with buffer packing. Use the correct value to calculate a freelist's low water mark. r261537: cxgbe(4): Use the rx channel map (instead of the tx channel map) as the congestion channel map. r261558: Add a new sysctl, dev.cxgbe.N.rsrv_noflow, and a companion tunable, hw.cxgbe.rsrv_noflow. When set, queue 0 of the port is reserved for TX packets without a flowid. The hash value of packets with a flowid is bumped up by 1. The intent is to provide a private queue for link-level packets like LACP that is unlikely to overflow or suffer deep queue latency. r263317: cxgbe(4): significant rx rework. - More flexible cluster size selection, including the ability to fall back to a safe cluster size (PAGE_SIZE from zone_jumbop by default) in case an allocation of a larger size fails. - A single get_fl_payload() function that assembles the payload into an mbuf chain for any kind of freelist. This replaces two variants: one for freelists with buffer packing enabled and another for those without. - Buffer packing with any sized cluster. It was limited to 4K clusters only before this change. - Enable buffer packing for TOE rx queues as well. - Statistics and tunables to go with all these changes. The driver's man page will be updated separately. r263412: cxgbe(4): if_iqdrops statistic should include tunnel congestion drops. r263457: cxgbe(4): Recognize the "spider" configuration where a T5 card's 40G QSFP port is presented as 4 distinct 10G SFP+ ports to the driver. r264621: use correct (integer) type for the temperature sysctl Modified: stable/9/sys/dev/cxgbe/adapter.h stable/9/sys/dev/cxgbe/common/t4_hw.c stable/9/sys/dev/cxgbe/common/t4_hw.h stable/9/sys/dev/cxgbe/t4_main.c stable/9/sys/dev/cxgbe/t4_sge.c stable/9/sys/dev/cxgbe/tom/t4_listen.c stable/9/sys/dev/cxgbe/tom/t4_tom.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/9/sys/dev/cxgbe/adapter.h Wed May 7 18:15:02 2014 (r265581) +++ stable/9/sys/dev/cxgbe/adapter.h Wed May 7 18:15:20 2014 (r265582) @@ -128,10 +128,11 @@ enum { RX_FL_ESIZE = EQ_ESIZE, /* 8 64bit addresses */ #if MJUMPAGESIZE != MCLBYTES - FL_BUF_SIZES_MAX = 5, /* cluster, jumbop, jumbo9k, jumbo16k, extra */ + SW_ZONE_SIZES = 4, /* cluster, jumbop, jumbo9k, jumbo16k */ #else - FL_BUF_SIZES_MAX = 4, /* cluster, jumbo9k, jumbo16k, extra */ + SW_ZONE_SIZES = 3, /* cluster, jumbo9k, jumbo16k */ #endif + CL_METADATA_SIZE = CACHE_LINE_SIZE, CTRL_EQ_QSIZE = 128, @@ -203,10 +204,12 @@ struct port_info { uint8_t mod_type; uint8_t port_id; uint8_t tx_chan; + uint8_t rx_chan_map; /* rx MPS channel bitmap */ /* These need to be int as they are used in sysctl */ int ntxq; /* # of tx queues */ int first_txq; /* index of first tx queue */ + int rsrv_noflowq; /* Reserve queue 0 for non-flowid packets */ int nrxq; /* # of rx queues */ int first_rxq; /* index of first rx queue */ #ifdef TCP_OFFLOAD @@ -232,15 +235,28 @@ struct port_info { uint8_t hw_addr[ETHER_ADDR_LEN]; /* factory MAC address, won't change */ }; -struct fl_sdesc { - bus_dmamap_t map; - caddr_t cl; - uint8_t tag_idx; /* the fl->tag entry this map comes from */ +/* Where the cluster came from, how it has been carved up. */ +struct cluster_layout { + int8_t zidx; + int8_t hwidx; + uint16_t region1; /* mbufs laid out within this region */ + /* region2 is the DMA region */ + uint16_t region3; /* cluster_metadata within this region */ +}; + +struct cluster_metadata { + u_int refcount; #ifdef INVARIANTS - __be64 ba_hwtag; + struct fl_sdesc *sd; /* For debug only. Could easily be stale */ #endif }; +struct fl_sdesc { + caddr_t cl; + uint8_t nmbuf; + struct cluster_layout cll; +}; + struct tx_desc { __be64 flit[8]; }; @@ -359,17 +375,19 @@ struct sge_eq { uint32_t unstalled; /* recovered from stall */ }; -struct fl_buf_info { - u_int size; - int type; - int hwtag:4; /* tag in low 4 bits of the pa. */ - uma_zone_t zone; -}; -#define FL_BUF_SIZES(sc) (sc->sge.fl_buf_sizes) -#define FL_BUF_SIZE(sc, x) (sc->sge.fl_buf_info[x].size) -#define FL_BUF_TYPE(sc, x) (sc->sge.fl_buf_info[x].type) -#define FL_BUF_HWTAG(sc, x) (sc->sge.fl_buf_info[x].hwtag) -#define FL_BUF_ZONE(sc, x) (sc->sge.fl_buf_info[x].zone) +struct sw_zone_info { + uma_zone_t zone; /* zone that this cluster comes from */ + int size; /* size of cluster: 2K, 4K, 9K, 16K, etc. */ + int type; /* EXT_xxx type of the cluster */ + int8_t head_hwidx; + int8_t tail_hwidx; +}; + +struct hw_buf_info { + int8_t zidx; /* backpointer to zone; -ve means unused */ + int8_t next; /* next hwidx for this zone; -1 means no more */ + int size; +}; enum { FL_STARVING = (1 << 0), /* on the adapter's list of starving fl's */ @@ -383,9 +401,8 @@ enum { struct sge_fl { bus_dma_tag_t desc_tag; bus_dmamap_t desc_map; - bus_dma_tag_t tag[FL_BUF_SIZES_MAX]; /* only first FL_BUF_SIZES(sc) are - valid */ - uint8_t tag_idx; + struct cluster_layout cll_def; /* default refill zone, layout */ + struct cluster_layout cll_alt; /* alternate refill zone, layout */ struct mtx fl_lock; char lockname[16]; int flags; @@ -402,9 +419,17 @@ struct sge_fl { uint32_t needed; /* # of buffers needed to fill up fl. */ uint32_t lowat; /* # of buffers <= this means fl needs help */ uint32_t pending; /* # of bufs allocated since last doorbell */ - u_int dmamap_failed; - struct mbuf *mstash[8]; TAILQ_ENTRY(sge_fl) link; /* All starving freelists */ + + struct mbuf *m0; + struct mbuf **pnext; + u_int remaining; + + uint64_t mbuf_allocated;/* # of mbuf allocated from zone_mbuf */ + uint64_t mbuf_inlined; /* # of mbuf created within clusters */ + uint64_t cl_allocated; /* # of clusters allocated */ + uint64_t cl_recycled; /* # of clusters recycled */ + uint64_t cl_fast_recycled; /* # of clusters recycled (fast) */ }; /* txq: SGE egress queue + what's needed for Ethernet NIC */ @@ -510,6 +535,7 @@ struct sge { int timer_val[SGE_NTIMERS]; int counter_val[SGE_NCOUNTERS]; int fl_starve_threshold; + int fl_starve_threshold2; int eq_s_qpp; int iq_s_qpp; @@ -537,8 +563,11 @@ struct sge { struct sge_iq **iqmap; /* iq->cntxt_id to iq mapping */ struct sge_eq **eqmap; /* eq->cntxt_id to eq mapping */ - u_int fl_buf_sizes __aligned(CACHE_LINE_SIZE); - struct fl_buf_info fl_buf_info[FL_BUF_SIZES_MAX]; + int pack_boundary; + int8_t safe_hwidx1; /* may not have room for metadata */ + int8_t safe_hwidx2; /* with room for metadata and maybe more */ + struct sw_zone_info sw_zone_info[SW_ZONE_SIZES]; + struct hw_buf_info hw_buf_info[SGE_FLBUF_SIZES]; }; struct rss_header; @@ -629,6 +658,8 @@ struct adapter { const char *last_op; const void *last_op_thr; #endif + + int sc_do_rxcopy; }; #define ADAPTER_LOCK(sc) mtx_lock(&(sc)->sc_lock) Modified: stable/9/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/9/sys/dev/cxgbe/common/t4_hw.c Wed May 7 18:15:02 2014 (r265581) +++ stable/9/sys/dev/cxgbe/common/t4_hw.c Wed May 7 18:15:20 2014 (r265582) @@ -5645,6 +5645,7 @@ int __devinit t4_port_init(struct port_i p->viid = ret; p->tx_chan = j; + p->rx_chan_map = get_mps_bg_map(adap, j); p->lport = j; p->rss_size = rss_size; t4_os_set_hw_addr(adap, p->port_id, addr); Modified: stable/9/sys/dev/cxgbe/common/t4_hw.h ============================================================================== --- stable/9/sys/dev/cxgbe/common/t4_hw.h Wed May 7 18:15:02 2014 (r265581) +++ stable/9/sys/dev/cxgbe/common/t4_hw.h Wed May 7 18:15:20 2014 (r265582) @@ -86,6 +86,7 @@ enum { SGE_NTIMERS = 6, /* # of interrupt holdoff timer values */ SGE_NCOUNTERS = 4, /* # of interrupt packet counter values */ SGE_MAX_IQ_SIZE = 65520, + SGE_FLBUF_SIZES = 16, }; struct sge_qstat { /* data written to SGE queue status entries */ Modified: stable/9/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_main.c Wed May 7 18:15:02 2014 (r265581) +++ stable/9/sys/dev/cxgbe/t4_main.c Wed May 7 18:15:20 2014 (r265582) @@ -197,6 +197,9 @@ TUNABLE_INT("hw.cxgbe.ntxq1g", &t4_ntxq1 static int t4_nrxq1g = -1; TUNABLE_INT("hw.cxgbe.nrxq1g", &t4_nrxq1g); +static int t4_rsrv_noflowq = 0; +TUNABLE_INT("hw.cxgbe.rsrv_noflowq", &t4_rsrv_noflowq); + #ifdef TCP_OFFLOAD #define NOFLDTXQ_10G 8 static int t4_nofldtxq10g = -1; @@ -299,6 +302,7 @@ struct intrs_and_queues { int nrxq10g; /* # of NIC rxq's for each 10G port */ int ntxq1g; /* # of NIC txq's for each 1G port */ int nrxq1g; /* # of NIC rxq's for each 1G port */ + int rsrv_noflowq; /* Flag whether to reserve queue 0 */ #ifdef TCP_OFFLOAD int nofldtxq10g; /* # of TOE txq's for each 10G port */ int nofldrxq10g; /* # of TOE rxq's for each 10G port */ @@ -375,6 +379,7 @@ static int cxgbe_sysctls(struct port_inf static int sysctl_int_array(SYSCTL_HANDLER_ARGS); static int sysctl_bitfield(SYSCTL_HANDLER_ARGS); static int sysctl_btphy(SYSCTL_HANDLER_ARGS); +static int sysctl_noflowq(SYSCTL_HANDLER_ARGS); static int sysctl_holdoff_tmr_idx(SYSCTL_HANDLER_ARGS); static int sysctl_holdoff_pktc_idx(SYSCTL_HANDLER_ARGS); static int sysctl_qsize_rxq(SYSCTL_HANDLER_ARGS); @@ -489,6 +494,8 @@ CTASSERT(offsetof(struct sge_ofld_rxq, f CTASSERT(nitems(((struct adapter *)0)->cpl_handler) == NUM_CPL_CMDS); CTASSERT(nitems(((struct adapter *)0)->fw_msg_handler) == NUM_FW6_TYPES); +CTASSERT(sizeof(struct cluster_metadata) <= CL_METADATA_SIZE); + static int t4_probe(device_t dev) { @@ -774,6 +781,11 @@ t4_attach(device_t dev) pi->ntxq = iaq.ntxq1g; } + if (pi->ntxq > 1) + pi->rsrv_noflowq = iaq.rsrv_noflowq ? 1 : 0; + else + pi->rsrv_noflowq = 0; + rqidx += pi->nrxq; tqidx += pi->ntxq; @@ -1252,7 +1264,8 @@ cxgbe_transmit(struct ifnet *ifp, struct } if (m->m_flags & M_FLOWID) - txq += (m->m_pkthdr.flowid % pi->ntxq); + txq += ((m->m_pkthdr.flowid % (pi->ntxq - pi->rsrv_noflowq)) + + pi->rsrv_noflowq); br = txq->br; if (TXQ_TRYLOCK(txq) == 0) { @@ -1704,6 +1717,7 @@ cfg_itype_and_nqueues(struct adapter *sc iaq->ntxq1g = t4_ntxq1g; iaq->nrxq10g = nrxq10g = t4_nrxq10g; iaq->nrxq1g = nrxq1g = t4_nrxq1g; + iaq->rsrv_noflowq = t4_rsrv_noflowq; #ifdef TCP_OFFLOAD if (is_offload(sc)) { iaq->nofldtxq10g = t4_nofldtxq10g; @@ -2624,6 +2638,7 @@ build_medialist(struct port_info *pi) ifmedia_set(media, m | IFM_10G_CX4); break; + case FW_PORT_TYPE_QSFP_10G: case FW_PORT_TYPE_SFP: case FW_PORT_TYPE_FIBER_XFI: case FW_PORT_TYPE_FIBER_XAUI: @@ -4029,6 +4044,7 @@ static void cxgbe_tick(void *arg) { struct port_info *pi = arg; + struct adapter *sc = pi->adapter; struct ifnet *ifp = pi->ifp; struct sge_txq *txq; int i, drops; @@ -4040,7 +4056,7 @@ cxgbe_tick(void *arg) return; /* without scheduling another callout */ } - t4_get_port_stats(pi->adapter, pi->tx_chan, s); + t4_get_port_stats(sc, pi->tx_chan, s); ifp->if_opackets = s->tx_frames - s->tx_pause; ifp->if_ipackets = s->rx_frames - s->rx_pause; @@ -4051,6 +4067,19 @@ cxgbe_tick(void *arg) ifp->if_iqdrops = s->rx_ovflow0 + s->rx_ovflow1 + s->rx_ovflow2 + s->rx_ovflow3 + s->rx_trunc0 + s->rx_trunc1 + s->rx_trunc2 + s->rx_trunc3; + for (i = 0; i < 4; i++) { + if (pi->rx_chan_map & (1 << i)) { + uint32_t v; + + /* + * XXX: indirect reads from the same ADDR/DATA pair can + * race with each other. + */ + t4_read_indirect(sc, A_TP_MIB_INDEX, A_TP_MIB_DATA, &v, + 1, A_TP_MIB_TNL_CNG_DROP_0 + i); + ifp->if_iqdrops += v; + } + } drops = s->tx_drop; for_each_txq(pi, i, txq) @@ -4197,6 +4226,10 @@ t4_sysctls(struct adapter *sc) oid = device_get_sysctl_tree(sc->dev); c0 = children = SYSCTL_CHILDREN(oid); + sc->sc_do_rxcopy = 1; + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "do_rx_copy", CTLFLAG_RW, + &sc->sc_do_rxcopy, 1, "Do RX copy of small frames"); + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "nports", CTLFLAG_RD, NULL, sc->params.nports, "# of ports"); @@ -4257,7 +4290,7 @@ t4_sysctls(struct adapter *sc) NULL, sc->tids.nftids, "number of filters"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "temperature", CTLTYPE_INT | - CTLFLAG_RD, sc, 0, sysctl_temperature, "A", + CTLFLAG_RD, sc, 0, sysctl_temperature, "I", "chip temperature (in Celsius)"); t4_sge_sysctls(sc, ctx, children); @@ -4498,6 +4531,9 @@ cxgbe_sysctls(struct port_info *pi) &pi->first_rxq, 0, "index of first rx queue"); SYSCTL_ADD_INT(ctx, children, OID_AUTO, "first_txq", CTLFLAG_RD, &pi->first_txq, 0, "index of first tx queue"); + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "rsrv_noflowq", CTLTYPE_INT | + CTLFLAG_RW, pi, 0, sysctl_noflowq, "IU", + "Reserve queue 0 for non-flowid packets"); #ifdef TCP_OFFLOAD if (is_offload(sc)) { @@ -4752,6 +4788,25 @@ sysctl_btphy(SYSCTL_HANDLER_ARGS) } static int +sysctl_noflowq(SYSCTL_HANDLER_ARGS) +{ + struct port_info *pi = arg1; + int rc, val; + + val = pi->rsrv_noflowq; + rc = sysctl_handle_int(oidp, &val, 0, req); + if (rc != 0 || req->newptr == NULL) + return (rc); + + if ((val >= 1) && (pi->ntxq > 1)) + pi->rsrv_noflowq = 1; + else + pi->rsrv_noflowq = 0; + + return (rc); +} + +static int sysctl_holdoff_tmr_idx(SYSCTL_HANDLER_ARGS) { struct port_info *pi = arg1; @@ -7728,11 +7783,11 @@ t4_ioctl(struct cdev *dev, unsigned long if (port_id >= sc->params.nports) return (EINVAL); + pi = sc->port[port_id]; /* MAC stats */ - t4_clr_port_stats(sc, port_id); + t4_clr_port_stats(sc, pi->tx_chan); - pi = sc->port[port_id]; if (pi->flags & PORT_INIT_DONE) { struct sge_rxq *rxq; struct sge_txq *txq; Modified: stable/9/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_sge.c Wed May 7 18:15:02 2014 (r265581) +++ stable/9/sys/dev/cxgbe/t4_sge.c Wed May 7 18:15:20 2014 (r265582) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -50,6 +51,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include "common/common.h" #include "common/t4_regs.h" @@ -122,6 +125,27 @@ static int t4_fl_pack; static int t5_fl_pack; TUNABLE_INT("hw.cxgbe.fl_pack", &fl_pack); +/* + * Allow the driver to create mbuf(s) in a cluster allocated for rx. + * 0: never; always allocate mbufs from the zone_mbuf UMA zone. + * 1: ok to create mbuf(s) within a cluster if there is room. + */ +static int allow_mbufs_in_cluster = 1; +TUNABLE_INT("hw.cxgbe.allow_mbufs_in_cluster", &allow_mbufs_in_cluster); + +/* + * Largest rx cluster size that the driver is allowed to allocate. + */ +static int largest_rx_cluster = MJUM16BYTES; +TUNABLE_INT("hw.cxgbe.largest_rx_cluster", &largest_rx_cluster); + +/* + * Size of cluster allocation that's most likely to succeed. The driver will + * fall back to this size if it fails to allocate clusters larger than this. + */ +static int safest_rx_cluster = PAGE_SIZE; +TUNABLE_INT("hw.cxgbe.safest_rx_cluster", &safest_rx_cluster); + /* Used to track coalesced tx work request */ struct txpkts { uint64_t *flitp; /* ptr to flit where next pkt should start */ @@ -138,9 +162,7 @@ struct sgl { }; static int service_iq(struct sge_iq *, int); -static struct mbuf *get_fl_payload1(struct adapter *, struct sge_fl *, uint32_t, - int *); -static struct mbuf *get_fl_payload2(struct adapter *, struct sge_fl *, uint32_t, +static struct mbuf *get_fl_payload(struct adapter *, struct sge_fl *, uint32_t, int *); static int t4_eth_rx(struct sge_iq *, const struct rss_header *, struct mbuf *); static inline void init_iq(struct sge_iq *, struct adapter *, int, int, int, @@ -156,6 +178,8 @@ static int free_ring(struct adapter *, b static int alloc_iq_fl(struct port_info *, struct sge_iq *, struct sge_fl *, int, int); static int free_iq_fl(struct port_info *, struct sge_iq *, struct sge_fl *); +static void add_fl_sysctls(struct sysctl_ctx_list *, struct sysctl_oid *, + struct sge_fl *); static int alloc_fwq(struct adapter *); static int free_fwq(struct adapter *); static int alloc_mgmtq(struct adapter *); @@ -189,7 +213,8 @@ static int refill_fl(struct adapter *, s static void refill_sfl(void *); static int alloc_fl_sdesc(struct sge_fl *); static void free_fl_sdesc(struct adapter *, struct sge_fl *); -static void set_fl_tag_idx(struct adapter *, struct sge_fl *, int); +static void find_best_refill_source(struct adapter *, struct sge_fl *, int); +static void find_safe_refill_source(struct adapter *, struct sge_fl *); static void add_fl_to_sfl(struct adapter *, struct sge_fl *); static int get_pkt_sgl(struct sge_txq *, struct mbuf **, struct sgl *, int); @@ -214,6 +239,7 @@ static int handle_fw_msg(struct sge_iq * struct mbuf *); static int sysctl_uint16(SYSCTL_HANDLER_ARGS); +static int sysctl_bufsizes(SYSCTL_HANDLER_ARGS); /* * Called on MOD_LOAD. Validates and calculates the SGE tunables. @@ -262,7 +288,7 @@ t4_sge_modload(void) /* T5's pack boundary is independent of the pad boundary. */ if (fl_pack < 16 || fl_pack == 32 || fl_pack > 4096 || !powerof2(fl_pack)) - t5_fl_pack = max(pad, 64); + t5_fl_pack = max(pad, CACHE_LINE_SIZE); else t5_fl_pack = fl_pack; @@ -312,14 +338,18 @@ t4_tweak_chip_settings(struct adapter *s int timer_max = M_TIMERVALUE0 * 1000 / sc->params.vpd.cclk; int intr_pktcount[SGE_NCOUNTERS] = {1, 8, 16, 32}; /* 63 max */ uint16_t indsz = min(RX_COPY_THRESHOLD - 1, M_INDICATESIZE); - int sw_flbuf_sizes[] = { + static int sge_flbuf_sizes[] = { MCLBYTES, #if MJUMPAGESIZE != MCLBYTES MJUMPAGESIZE, + MJUMPAGESIZE - CL_METADATA_SIZE, + MJUMPAGESIZE - 2 * MSIZE - CL_METADATA_SIZE, #endif MJUM9BYTES, MJUM16BYTES, - MJUMPAGESIZE - MSIZE + MCLBYTES - MSIZE - CL_METADATA_SIZE, + MJUM9BYTES - CL_METADATA_SIZE, + MJUM16BYTES - CL_METADATA_SIZE, }; KASSERT(sc->flags & MASTER_PF, @@ -357,9 +387,11 @@ t4_tweak_chip_settings(struct adapter *s V_HOSTPAGESIZEPF7(PAGE_SHIFT - 10); t4_write_reg(sc, A_SGE_HOST_PAGE_SIZE, v); - for (i = 0; i < min(nitems(sw_flbuf_sizes), 16); i++) { + KASSERT(nitems(sge_flbuf_sizes) <= SGE_FLBUF_SIZES, + ("%s: hw buffer size table too big", __func__)); + for (i = 0; i < min(nitems(sge_flbuf_sizes), SGE_FLBUF_SIZES); i++) { t4_write_reg(sc, A_SGE_FL_BUFFER_SIZE0 + (4 * i), - sw_flbuf_sizes[i]); + sge_flbuf_sizes[i]); } v = V_THRESHOLD_0(intr_pktcount[0]) | V_THRESHOLD_1(intr_pktcount[1]) | @@ -414,6 +446,18 @@ t4_tweak_chip_settings(struct adapter *s } /* + * SGE wants the buffer to be at least 64B and then a multiple of the pad + * boundary or 16, whichever is greater. + */ +static inline int +hwsz_ok(int hwsz) +{ + int mask = max(fl_pad, 16) - 1; + + return (hwsz >= 64 && (hwsz & mask) == 0); +} + +/* * XXX: driver really should be able to deal with unexpected settings. */ int @@ -423,7 +467,7 @@ t4_read_chip_settings(struct adapter *sc int i, j, n, rc = 0; uint32_t m, v, r; uint16_t indsz = min(RX_COPY_THRESHOLD - 1, M_INDICATESIZE); - uint32_t sge_flbuf_sizes[16], sw_flbuf_sizes[] = { + static int sw_buf_sizes[] = { /* Sorted by size */ MCLBYTES, #if MJUMPAGESIZE != MCLBYTES MJUMPAGESIZE, @@ -431,6 +475,8 @@ t4_read_chip_settings(struct adapter *sc MJUM9BYTES, MJUM16BYTES }; + struct sw_zone_info *swz, *safe_swz; + struct hw_buf_info *hwb; m = V_PKTSHIFT(M_PKTSHIFT) | F_RXPKTCPLMODE | F_EGRSTATUSPAGESIZE; v = V_PKTSHIFT(fl_pktshift) | F_RXPKTCPLMODE | @@ -461,6 +507,7 @@ t4_read_chip_settings(struct adapter *sc rc = EINVAL; } } + s->pack_boundary = is_t4(sc) ? t4_fl_pack : t5_fl_pack; v = V_HOSTPAGESIZEPF0(PAGE_SHIFT - 10) | V_HOSTPAGESIZEPF1(PAGE_SHIFT - 10) | @@ -476,45 +523,93 @@ t4_read_chip_settings(struct adapter *sc rc = EINVAL; } - /* - * Make a list of SGE FL buffer sizes programmed in the chip and tally - * it with the FL buffer sizes that we'd like to use. - */ - n = 0; - for (i = 0; i < nitems(sge_flbuf_sizes); i++) { + /* Filter out unusable hw buffer sizes entirely (mark with -2). */ + hwb = &s->hw_buf_info[0]; + for (i = 0; i < nitems(s->hw_buf_info); i++, hwb++) { r = t4_read_reg(sc, A_SGE_FL_BUFFER_SIZE0 + (4 * i)); - sge_flbuf_sizes[i] = r; - if (r == MJUMPAGESIZE - MSIZE && - (sc->flags & BUF_PACKING_OK) == 0) { - sc->flags |= BUF_PACKING_OK; - FL_BUF_HWTAG(sc, n) = i; - FL_BUF_SIZE(sc, n) = MJUMPAGESIZE - MSIZE; - FL_BUF_TYPE(sc, n) = m_gettype(MJUMPAGESIZE); - FL_BUF_ZONE(sc, n) = m_getzone(MJUMPAGESIZE); - n++; - } + hwb->size = r; + hwb->zidx = hwsz_ok(r) ? -1 : -2; + hwb->next = -1; } - for (i = 0; i < nitems(sw_flbuf_sizes); i++) { - for (j = 0; j < nitems(sge_flbuf_sizes); j++) { - if (sw_flbuf_sizes[i] != sge_flbuf_sizes[j]) + + /* + * Create a sorted list in decreasing order of hw buffer sizes (and so + * increasing order of spare area) for each software zone. + */ + n = 0; /* no usable buffer size to begin with */ + swz = &s->sw_zone_info[0]; + safe_swz = NULL; + for (i = 0; i < SW_ZONE_SIZES; i++, swz++) { + int8_t head = -1, tail = -1; + + swz->size = sw_buf_sizes[i]; + swz->zone = m_getzone(swz->size); + swz->type = m_gettype(swz->size); + + if (swz->size == safest_rx_cluster) + safe_swz = swz; + + hwb = &s->hw_buf_info[0]; + for (j = 0; j < SGE_FLBUF_SIZES; j++, hwb++) { + if (hwb->zidx != -1 || hwb->size > swz->size) continue; - FL_BUF_HWTAG(sc, n) = j; - FL_BUF_SIZE(sc, n) = sw_flbuf_sizes[i]; - FL_BUF_TYPE(sc, n) = m_gettype(sw_flbuf_sizes[i]); - FL_BUF_ZONE(sc, n) = m_getzone(sw_flbuf_sizes[i]); + hwb->zidx = i; + if (head == -1) + head = tail = j; + else if (hwb->size < s->hw_buf_info[tail].size) { + s->hw_buf_info[tail].next = j; + tail = j; + } else { + int8_t *cur; + struct hw_buf_info *t; + + for (cur = &head; *cur != -1; cur = &t->next) { + t = &s->hw_buf_info[*cur]; + if (hwb->size == t->size) { + hwb->zidx = -2; + break; + } + if (hwb->size > t->size) { + hwb->next = *cur; + *cur = j; + break; + } + } + } + } + swz->head_hwidx = head; + swz->tail_hwidx = tail; + + if (tail != -1) { n++; - break; + if (swz->size - s->hw_buf_info[tail].size >= + CL_METADATA_SIZE) + sc->flags |= BUF_PACKING_OK; } } if (n == 0) { device_printf(sc->dev, "no usable SGE FL buffer size.\n"); rc = EINVAL; - } else if (n == 1 && (sc->flags & BUF_PACKING_OK)) { - device_printf(sc->dev, - "no usable SGE FL buffer size when not packing buffers.\n"); - rc = EINVAL; } - FL_BUF_SIZES(sc) = n; + + s->safe_hwidx1 = -1; + s->safe_hwidx2 = -1; + if (safe_swz != NULL) { + s->safe_hwidx1 = safe_swz->head_hwidx; + for (i = safe_swz->head_hwidx; i != -1; i = hwb->next) { + int spare; + + hwb = &s->hw_buf_info[i]; + spare = safe_swz->size - hwb->size; + if (spare < CL_METADATA_SIZE) + continue; + if (s->safe_hwidx2 == -1 || + spare == CL_METADATA_SIZE + MSIZE) + s->safe_hwidx2 = i; + if (spare >= CL_METADATA_SIZE + MSIZE) + break; + } + } r = t4_read_reg(sc, A_SGE_INGRESS_RX_THRESHOLD); s->counter_val[0] = G_THRESHOLD_0(r); @@ -568,6 +663,10 @@ t4_read_chip_settings(struct adapter *sc r = t4_read_reg(sc, A_SGE_CONM_CTRL); s->fl_starve_threshold = G_EGRTHRESHOLD(r) * 2 + 1; + if (is_t4(sc)) + s->fl_starve_threshold2 = s->fl_starve_threshold; + else + s->fl_starve_threshold2 = G_EGRTHRESHOLDPACKING(r) * 2 + 1; /* egress queues: log2 of # of doorbells per BAR2 page */ r = t4_read_reg(sc, A_SGE_EGRESS_QUEUES_PER_PAGE_PF); @@ -622,6 +721,10 @@ t4_sge_sysctls(struct adapter *sc, struc struct sysctl_oid_list *children) { + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "buffer_sizes", + CTLTYPE_STRING | CTLFLAG_RD, &sc->sge, 0, sysctl_bufsizes, "A", + "freelist buffer sizes"); + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "fl_pktshift", CTLFLAG_RD, NULL, fl_pktshift, "payload DMA offset in rx buffer (bytes)"); @@ -639,8 +742,7 @@ t4_sge_sysctls(struct adapter *sc, struc "pack multiple frames in one fl buffer"); SYSCTL_ADD_INT(ctx, children, OID_AUTO, "fl_pack", CTLFLAG_RD, - NULL, is_t5(sc) ? t5_fl_pack : t4_fl_pack, - "payload pack boundary (bytes)"); + NULL, sc->sge.pack_boundary, "payload pack boundary (bytes)"); } int @@ -760,7 +862,7 @@ port_intr_iq(struct port_info *pi, int i #ifdef TCP_OFFLOAD if (sc->flags & INTR_DIRECT) { idx %= pi->nrxq + pi->nofldrxq; - + if (idx >= pi->nrxq) { idx -= pi->nrxq; iq = &s->ofld_rxq[pi->first_ofld_rxq + idx].iq; @@ -791,29 +893,28 @@ port_intr_iq(struct port_info *pi, int i return (iq); } +/* Maximum payload that can be delivered with a single iq descriptor */ static inline int -mtu_to_bufsize(int mtu) +mtu_to_max_payload(struct adapter *sc, int mtu, const int toe) { - int bufsize; - - /* large enough for a frame even when VLAN extraction is disabled */ - bufsize = ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN + mtu; - bufsize = roundup2(bufsize + fl_pktshift, fl_pad); - - return (bufsize); -} + int payload; #ifdef TCP_OFFLOAD -static inline int -mtu_to_bufsize_toe(struct adapter *sc, int mtu) -{ - - if (sc->tt.rx_coalesce) - return (G_RXCOALESCESIZE(t4_read_reg(sc, A_TP_PARA_REG2))); + if (toe) { + payload = sc->tt.rx_coalesce ? + G_RXCOALESCESIZE(t4_read_reg(sc, A_TP_PARA_REG2)) : mtu; + } else { +#endif + /* large enough even when hw VLAN extraction is disabled */ + payload = fl_pktshift + ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN + + mtu; +#ifdef TCP_OFFLOAD + } +#endif + payload = roundup2(payload, fl_pad); - return (mtu); + return (payload); } -#endif int t4_setup_port_queues(struct port_info *pi) @@ -832,7 +933,7 @@ t4_setup_port_queues(struct port_info *p struct ifnet *ifp = pi->ifp; struct sysctl_oid *oid = device_get_sysctl_tree(pi->dev); struct sysctl_oid_list *children = SYSCTL_CHILDREN(oid); - int bufsize, pack; + int maxp, pack, mtu = ifp->if_mtu; oid = SYSCTL_ADD_NODE(&pi->ctx, children, OID_AUTO, "rxq", CTLFLAG_RD, NULL, "rx queues"); @@ -853,7 +954,7 @@ t4_setup_port_queues(struct port_info *p * a) initialize iq and fl * b) allocate queue iff it will take direct interrupts. */ - bufsize = mtu_to_bufsize(ifp->if_mtu); + maxp = mtu_to_max_payload(sc, mtu, 0); pack = enable_buffer_packing(sc); for_each_rxq(pi, i, rxq) { @@ -862,7 +963,7 @@ t4_setup_port_queues(struct port_info *p snprintf(name, sizeof(name), "%s rxq%d-fl", device_get_nameunit(pi->dev), i); - init_fl(sc, &rxq->fl, pi->qsize_rxq / 8, bufsize, pack, name); + init_fl(sc, &rxq->fl, pi->qsize_rxq / 8, maxp, pack, name); if (sc->flags & INTR_DIRECT #ifdef TCP_OFFLOAD @@ -878,8 +979,7 @@ t4_setup_port_queues(struct port_info *p } #ifdef TCP_OFFLOAD - bufsize = mtu_to_bufsize_toe(sc, ifp->if_mtu); - pack = 0; /* XXX: think about this some more */ + maxp = mtu_to_max_payload(sc, mtu, 1); for_each_ofld_rxq(pi, i, ofld_rxq) { init_iq(&ofld_rxq->iq, sc, pi->tmr_idx, pi->pktc_idx, @@ -887,8 +987,7 @@ t4_setup_port_queues(struct port_info *p snprintf(name, sizeof(name), "%s ofld_rxq%d-fl", device_get_nameunit(pi->dev), i); - init_fl(sc, &ofld_rxq->fl, pi->qsize_rxq / 8, bufsize, pack, - name); + init_fl(sc, &ofld_rxq->fl, pi->qsize_rxq / 8, maxp, pack, name); if (sc->flags & INTR_DIRECT || (sc->intr_count > 1 && pi->nofldrxq > pi->nrxq)) { @@ -1162,10 +1261,7 @@ service_iq(struct sge_iq *iq, int budget ("%s: data for an iq (%p) with no freelist", __func__, iq)); - m0 = fl->flags & FL_BUF_PACKING ? - get_fl_payload1(sc, fl, lq, &fl_bufs_used) : - get_fl_payload2(sc, fl, lq, &fl_bufs_used); - + m0 = get_fl_payload(sc, fl, lq, &fl_bufs_used); if (__predict_false(m0 == NULL)) goto process_iql; #ifdef T4_PKT_TIMESTAMP @@ -1222,6 +1318,14 @@ service_iq(struct sge_iq *iq, int budget break; } + if (fl_bufs_used >= 16) { + FL_LOCK(fl); + fl->needed += fl_bufs_used; + refill_fl(sc, fl, 32); + FL_UNLOCK(fl); + fl_bufs_used = 0; + } + iq_next(iq); if (++ndescs == limit) { t4_write_reg(sc, MYPF_REG(A_SGE_PF_GTS), @@ -1230,14 +1334,6 @@ service_iq(struct sge_iq *iq, int budget V_SEINTARM(V_QINTR_TIMER_IDX(X_TIMERREG_UPDATE_CIDX))); ndescs = 0; - if (fl_bufs_used > 0) { - FL_LOCK(fl); - fl->needed += fl_bufs_used; - refill_fl(sc, fl, fl->cap / 8); - FL_UNLOCK(fl); - fl_bufs_used = 0; - } - if (budget) return (EINPROGRESS); } @@ -1280,7 +1376,7 @@ process_iql: FL_LOCK(fl); fl->needed += fl_bufs_used; - starved = refill_fl(sc, fl, fl->cap / 4); + starved = refill_fl(sc, fl, 64); FL_UNLOCK(fl); if (__predict_false(starved != 0)) add_fl_to_sfl(sc, fl); @@ -1289,74 +1385,28 @@ process_iql: return (0); } -static int -fill_mbuf_stash(struct sge_fl *fl) -{ - int i; - - for (i = 0; i < nitems(fl->mstash); i++) { - if (fl->mstash[i] == NULL) { - struct mbuf *m; - if ((m = m_get(M_NOWAIT, MT_NOINIT)) == NULL) - return (ENOBUFS); - fl->mstash[i] = m; - } - } - return (0); -} - -static struct mbuf * -get_mbuf_from_stash(struct sge_fl *fl) +static inline int +cl_has_metadata(struct sge_fl *fl, struct cluster_layout *cll) { - int i; + int rc = fl->flags & FL_BUF_PACKING || cll->region1 > 0; - for (i = 0; i < nitems(fl->mstash); i++) { - if (fl->mstash[i] != NULL) { - struct mbuf *m; - - m = fl->mstash[i]; - fl->mstash[i] = NULL; - return (m); - } else - fl->mstash[i] = m_get(M_NOWAIT, MT_NOINIT); - } + if (rc) + MPASS(cll->region3 >= CL_METADATA_SIZE); - return (m_get(M_NOWAIT, MT_NOINIT)); + return (rc); } -static void -return_mbuf_to_stash(struct sge_fl *fl, struct mbuf *m) +static inline struct cluster_metadata * +cl_metadata(struct adapter *sc, struct sge_fl *fl, struct cluster_layout *cll, + caddr_t cl) { - int i; - if (m == NULL) - return; + if (cl_has_metadata(fl, cll)) { + struct sw_zone_info *swz = &sc->sge.sw_zone_info[cll->zidx]; - for (i = 0; i < nitems(fl->mstash); i++) { - if (fl->mstash[i] == NULL) { - fl->mstash[i] = m; - return; - } + return ((struct cluster_metadata *)(cl + swz->size) - 1); } - m_init(m, NULL, 0, M_NOWAIT, MT_DATA, 0); - m_free(m); -} - -/* buf can be any address within the buffer */ -static inline u_int * -find_buf_refcnt(caddr_t buf) -{ - uintptr_t ptr = (uintptr_t)buf; - - return ((u_int *)((ptr & ~(MJUMPAGESIZE - 1)) + MSIZE - sizeof(u_int))); -} - -static inline struct mbuf * -find_buf_mbuf(caddr_t buf) -{ - uintptr_t ptr = (uintptr_t)buf; - - return ((struct mbuf *)(ptr & ~(MJUMPAGESIZE - 1))); + return (NULL); } static void @@ -1364,177 +1414,115 @@ rxb_free(void *arg1, void *arg2) { uma_zone_t zone = arg1; caddr_t cl = arg2; -#ifdef notyet - u_int refcount; - refcount = *find_buf_refcnt(cl); - KASSERT(refcount == 0, ("%s: cl %p refcount is %u", __func__, - cl - MSIZE, refcount)); -#endif - cl -= MSIZE; uma_zfree(zone, cl); } +/* + * The mbuf returned by this function could be allocated from zone_mbuf or + * constructed in spare room in the cluster. + * + * The mbuf carries the payload in one of these ways + * a) frame inside the mbuf (mbuf from zone_mbuf) + * b) m_cljset (for clusters without metadata) zone_mbuf + * c) m_extaddref (cluster with metadata) inline mbuf + * d) m_extaddref (cluster with metadata) zone_mbuf + */ static struct mbuf * -get_fl_payload1(struct adapter *sc, struct sge_fl *fl, uint32_t len_newbuf, - int *fl_bufs_used) +get_scatter_segment(struct adapter *sc, struct sge_fl *fl, int total, int flags) { - struct mbuf *m0, *m; + struct mbuf *m; struct fl_sdesc *sd = &fl->sdesc[fl->cidx]; - unsigned int nbuf, len; - int pack_boundary = is_t4(sc) ? t4_fl_pack : t5_fl_pack; + struct cluster_layout *cll = &sd->cll; + struct sw_zone_info *swz = &sc->sge.sw_zone_info[cll->zidx]; + struct hw_buf_info *hwb = &sc->sge.hw_buf_info[cll->hwidx]; + struct cluster_metadata *clm = cl_metadata(sc, fl, cll, sd->cl); + int len, padded_len; + caddr_t payload; + + len = min(total, hwb->size - fl->rx_offset); + padded_len = roundup2(len, fl_pad); + payload = sd->cl + cll->region1 + fl->rx_offset; - /* - * No assertion for the fl lock because we don't need it. This routine - * is called only from the rx interrupt handler and it only updates - * fl->cidx. (Contrast that with fl->pidx/fl->needed which could be - * updated in the rx interrupt handler or the starvation helper routine. - * That's why code that manipulates fl->pidx/fl->needed needs the fl - * lock but this routine does not). - */ + if (sc->sc_do_rxcopy && len < RX_COPY_THRESHOLD) { - KASSERT(fl->flags & FL_BUF_PACKING, - ("%s: buffer packing disabled for fl %p", __func__, fl)); - - len = G_RSPD_LEN(len_newbuf); + /* + * Copy payload into a freshly allocated mbuf. + */ - if ((len_newbuf & F_RSPD_NEWBUF) == 0) { - KASSERT(fl->rx_offset > 0, - ("%s: packed frame but driver at offset=0", __func__)); - - /* A packed frame is guaranteed to fit entirely in this buf. */ - KASSERT(FL_BUF_SIZE(sc, sd->tag_idx) - fl->rx_offset >= len, - ("%s: packing error. bufsz=%u, offset=%u, len=%u", *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Wed May 7 18:49:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD6CF704; Wed, 7 May 2014 18:49:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B8EA4E0C; Wed, 7 May 2014 18:49:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47InQ1F024801; Wed, 7 May 2014 18:49:26 GMT (envelope-from asomers@svn.freebsd.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47InPvd024795; Wed, 7 May 2014 18:49:25 GMT (envelope-from asomers@svn.freebsd.org) Message-Id: <201405071849.s47InPvd024795@svn.freebsd.org> From: Alan Somers Date: Wed, 7 May 2014 18:49:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265586 - in stable/10: etc/mtree tests/sys tests/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 18:49:27 -0000 Author: asomers Date: Wed May 7 18:49:25 2014 New Revision: 265586 URL: http://svnweb.freebsd.org/changeset/base/265586 Log: MFC r263445 and r265385. Note that the change to ObsoleteFiles.inc in r265385 does not need to be MFCed, because the obsolete files in question were never MFCed to any stable branch. r265385 Remove the ifconfig test added in rev 263445. After discussion with melifaro, we agreed that ifconfig's behavior was not a bug. The main motivation for bin/187551 was to partially resolve kern/187549, but we resolved kern/187549 in a different way instead. ObsoleteFiles.inc etc/mtree/BSD.tests.dist sbin/ifconfig/tests/fibs_test.sh sbin/ifconfig/tests/Makefile sbin/ifconfig/Makefile Remove /usr/tests/sbin/ifconfig r263445 Add several ATF tests that deal with multiple fibs. They're described in several different PRs, but the tests share some common code, so I'm committing them together. sbin/ifconfig/tests sbin/ifconfig/tests/fibs_test.sh sbin/ifconfig/tests/Makefile sbin/ifconfig/Makefile Add fibs_test.sh, which regresses bin/187551 tests/sys/netinet tests/sys/netinet/fibs_test.sh tests/sys/netinet/udp_dontroute.c tests/sys/netinet/Makefile tests/sys/Makefile Add fibs_test.sh, which regresses kern/167947, kern/187552 kern/187549, kern/187550, and kern/187553 etc/mtree/BSD.tests.dist Add newly created directories Added: stable/10/tests/sys/netinet/ - copied from r263445, head/tests/sys/netinet/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/tests/sys/Makefile stable/10/tests/sys/netinet/fibs_test.sh stable/10/tests/sys/netinet/udp_dontroute.c Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Wed May 7 18:27:12 2014 (r265585) +++ stable/10/etc/mtree/BSD.tests.dist Wed May 7 18:49:25 2014 (r265586) @@ -123,6 +123,8 @@ sys kern .. + netinet + .. .. usr.bin apply Modified: stable/10/tests/sys/Makefile ============================================================================== --- stable/10/tests/sys/Makefile Wed May 7 18:27:12 2014 (r265585) +++ stable/10/tests/sys/Makefile Wed May 7 18:49:25 2014 (r265586) @@ -5,6 +5,7 @@ .PATH: ${.CURDIR}/.. TESTS_SUBDIRS+= kern +TESTS_SUBDIRS+= netinet TESTSDIR= ${TESTSBASE}/sys KYUAFILE= yes Modified: stable/10/tests/sys/netinet/fibs_test.sh ============================================================================== --- head/tests/sys/netinet/fibs_test.sh Thu Mar 20 20:39:41 2014 (r263445) +++ stable/10/tests/sys/netinet/fibs_test.sh Wed May 7 18:49:25 2014 (r265586) @@ -1,7 +1,7 @@ # # Copyright (c) 2014 Spectra Logic Corporation # All rights reserved. -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: @@ -13,7 +13,7 @@ # ("Disclaimer") and any redistribution must be conditioned upon # including a substantially similar Disclaimer requirement for further # binary redistribution. -# +# # NO WARRANTY # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT @@ -26,7 +26,7 @@ # 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 DAMAGES. -# +# # Authors: Alan Somers (Spectra Logic Corporation) # # $FreeBSD$ @@ -43,7 +43,7 @@ # Simulate a crossover cable between them by using net/socat # Use nping (from security/nmap) to send an ICMP echo request from one # interface to the other, spoofing the source IP. The source IP must be -# spoofed, or else it will already have an entry in the arp table. +# spoofed, or else it will already have an entry in the arp table. # Check whether an arp entry exists for the spoofed IP atf_test_case arpresolve_checks_interface_fib cleanup arpresolve_checks_interface_fib_head() @@ -85,7 +85,7 @@ arpresolve_checks_interface_fib_body() socat /dev/${TAP0} /dev/${TAP1} & SOCAT_PID=$! echo ${SOCAT_PID} >> "processes_to_kill" - + # Send an ICMP echo request with a spoofed source IP setfib 2 nping -c 1 -e ${TAP0} -S ${SPOOF_ADDR} \ --source-mac ${SPOOF_MAC} --icmp --icmp-type "echo-request" \ @@ -302,9 +302,9 @@ udp_dontroute_cleanup() atf_init_test_cases() { atf_add_test_case arpresolve_checks_interface_fib - atf_add_test_case loopback_and_network_routes_on_nondefault_fib - atf_add_test_case default_route_with_multiple_fibs_on_same_subnet - atf_add_test_case subnet_route_with_multiple_fibs_on_same_subnet + atf_add_test_case loopback_and_network_routes_on_nondefault_fib + atf_add_test_case default_route_with_multiple_fibs_on_same_subnet + atf_add_test_case subnet_route_with_multiple_fibs_on_same_subnet atf_add_test_case udp_dontroute } Modified: stable/10/tests/sys/netinet/udp_dontroute.c ============================================================================== --- head/tests/sys/netinet/udp_dontroute.c Thu Mar 20 20:39:41 2014 (r263445) +++ stable/10/tests/sys/netinet/udp_dontroute.c Wed May 7 18:49:25 2014 (r265586) @@ -1,7 +1,7 @@ /* * Copyright (c) 2014 Spectra Logic Corporation * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -13,7 +13,7 @@ * ("Disclaimer") and any redistribution must be conditioned upon * including a substantially similar Disclaimer requirement for further * binary redistribution. - * + * * NO WARRANTY * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT @@ -26,7 +26,7 @@ * 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 DAMAGES. - * + * * Authors: Alan Somers (Spectra Logic Corporation) * * $FreeBSD$ @@ -43,11 +43,12 @@ #include #include -/* +/* * Sends a single UDP packet to the provided address, with SO_DONTROUTE set * I couldn't find a way to do this with builtin utilities like nc(1) */ -int main(int argc, char **argv) +int +main(int argc, char **argv) { struct sockaddr_in dst; int s; @@ -80,6 +81,6 @@ int main(int argc, char **argv) dst.sin_len); if (ret == -1) err(errno, "sendto"); - + return (0); } From owner-svn-src-stable@FreeBSD.ORG Wed May 7 19:05:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E228C2B; Wed, 7 May 2014 19:05:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 59DF0F9A; Wed, 7 May 2014 19:05:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47J5FtF033104; Wed, 7 May 2014 19:05:15 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47J5F3X033103; Wed, 7 May 2014 19:05:15 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201405071905.s47J5F3X033103@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 7 May 2014 19:05:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265587 - stable/9/sys/net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 19:05:15 -0000 Author: np Date: Wed May 7 19:05:14 2014 New Revision: 265587 URL: http://svnweb.freebsd.org/changeset/base/265587 Log: MFC r258692 and r260207 (both by gnn@) r258692: Add constants for use in interrogating various fiber and copper connectors most often used with network interfaces. The SFF-8472 standard defines the information that can be retrieved from an optic or a copper cable plugged into a NIC, most often referred to as SFP+. Examples of values that can be read include the cable vendor's name, part number, date of manufacture as well as running data such as temperature, voltage and tx and rx power. Copious comments on how to use these values with an I2C interface are given in the header file itself. r260207: Convert #defines to enums so that the values are visible in the debugger. Added: stable/9/sys/net/sff8472.h - copied, changed from r258692, head/sys/net/sff8472.h Modified: Directory Properties: stable/9/sys/ (props changed) stable/9/sys/net/ (props changed) Copied and modified: stable/9/sys/net/sff8472.h (from r258692, head/sys/net/sff8472.h) ============================================================================== --- head/sys/net/sff8472.h Wed Nov 27 20:20:02 2013 (r258692, copy source) +++ stable/9/sys/net/sff8472.h Wed May 7 19:05:14 2014 (r265587) @@ -62,104 +62,107 @@ /* Table 3.1 Two-wire interface ID: Data Fields */ -#define SFF_8472_BASE 0xa0 /* Base address for all our queries. */ -#define SFF_8472_ID 0 /* Transceiver Type (Table 3.2) */ -#define SFF_8472_EXT_ID 1 /* Extended transceiver type (Table 3.3) */ -#define SFF_8472_CONNECTOR 2 /* Connector type (Table 3.4) */ -#define SFF_8472_TRANS_START 3 /* Elec or Optical Compatibility +enum { + SFF_8472_BASE = 0xa0, /* Base address for all our queries. */ + SFF_8472_ID = 0, /* Transceiver Type (Table 3.2) */ + SFF_8472_EXT_ID = 1, /* Extended transceiver type (Table 3.3) */ + SFF_8472_CONNECTOR = 2, /* Connector type (Table 3.4) */ + SFF_8472_TRANS_START = 3, /* Elec or Optical Compatibility * (Table 3.5) */ -#define SFF_8472_TRANS_END 10 -#define SFF_8472_ENCODING 11 /* Encoding Code for high speed - * serial encoding algorithm (see - * Table 3.6) */ -#define SFF_8472_BITRATE 12 /* Nominal signaling rate, units - * of 100MBd. (see details for - * rates > 25.0Gb/s) */ -#define SFF_8472_RATEID 13 /* Type of rate select - * functionality (see Table - * 3.6a) */ -#define SFF_8472_LEN_SMF_KM 14 /* Link length supported for single + SFF_8472_TRANS_END = 10, + SFF_8472_ENCODING = 11, /* Encoding Code for high speed + * serial encoding algorithm (see + * Table 3.6) */ + SFF_8472_BITRATE = 12, /* Nominal signaling rate, units + * of 100MBd. (see details for + * rates > 25.0Gb/s) */ + SFF_8472_RATEID = 13, /* Type of rate select + * functionality (see Table + * 3.6a) */ + SFF_8472_LEN_SMF_KM = 14, /* Link length supported for single * mode fiber, units of km */ -#define SFF_8472_LEN_SMF 15 /* Link length supported for single + SFF_8472_LEN_SMF = 15, /* Link length supported for single * mode fiber, units of 100 m */ -#define SFF_8472_LEN_50UM 16 /* Link length supported for 50 um + SFF_8472_LEN_50UM = 16, /* Link length supported for 50 um * OM2 fiber, units of 10 m */ -#define SFF_8472_LEN_625UM 17 /* Link length supported for 62.5 + SFF_8472_LEN_625UM = 17, /* Link length supported for 62.5 * um OM1 fiber, units of 10 m */ -#define SFF_8472_LEN_OM4 18 /* Link length supported for 50um + SFF_8472_LEN_OM4 = 18, /* Link length supported for 50um * OM4 fiber, units of 10m. * Alternatively copper or direct * attach cable, units of m */ -#define SFF_8472_LEN_OM3 19 /* Link length supported for 50 um OM3 fiber, units of 10 m */ -#define SFF_8472_VENDOR_START 20 /* Vendor name [Address A0h, Bytes + SFF_8472_LEN_OM3 = 19, /* Link length supported for 50 um OM3 fiber, units of 10 m */ + SFF_8472_VENDOR_START = 20, /* Vendor name [Address A0h, Bytes * 20-35] */ -#define SFF_8472_VENDOR_END 35 -#define SFF_8472_TRANS 36 /* Transceiver Code for electronic + SFF_8472_VENDOR_END = 35, + SFF_8472_TRANS = 36, /* Transceiver Code for electronic * or optical compatibility (see * Table 3.5) */ -#define SFF_8472_VENDOR_OUI_START 37 /* Vendor OUI SFP vendor IEEE + SFF_8472_VENDOR_OUI_START = 37, /* Vendor OUI SFP vendor IEEE * company ID */ -#define SFF_8472_VENDOR_OUI_END 39 -#define SFF_8472_PN_START 40 /* Vendor PN */ -#define SFF_8472_PN_END 55 -#define SFF_8472_REV_START 56 /* Vendor Revision */ -#define SFF_8472_REV_END 59 -#define SFF_8472_WAVELEN_START 60 /* Wavelength Laser wavelength + SFF_8472_VENDOR_OUI_END = 39, + SFF_8472_PN_START = 40, /* Vendor PN */ + SFF_8472_PN_END = 55, + SFF_8472_REV_START = 56, /* Vendor Revision */ + SFF_8472_REV_END = 59, + SFF_8472_WAVELEN_START = 60, /* Wavelength Laser wavelength * (Passive/Active Cable * Specification Compliance) */ -#define SFF_8472_WAVELEN_END 61 -#define SFF_8472_CC_BASE 63 /* CC_BASE Check code for Base ID + SFF_8472_WAVELEN_END = 61, + SFF_8472_CC_BASE = 63, /* CC_BASE Check code for Base ID * Fields (addresses 0 to 62) */ /* * Extension Fields (optional) check the options before reading other * addresses. */ -#define SFF_8472_OPTIONS_MSB 64 /* Options Indicates which optional + SFF_8472_OPTIONS_MSB = 64, /* Options Indicates which optional * transceiver signals are * implemented */ -#define SFF_8472_OPTIONS_LSB 65 /* (see Table 3.7) */ -#define SFF_8472_BR_MAX 66 /* BR max Upper bit rate margin, + SFF_8472_OPTIONS_LSB = 65, /* (see Table 3.7) */ + SFF_8472_BR_MAX = 66, /* BR max Upper bit rate margin, * units of % (see details for * rates > 25.0Gb/s) */ -#define SFF_8472_BR_MIN 67 /* Lower bit rate margin, units of + SFF_8472_BR_MIN = 67, /* Lower bit rate margin, units of * % (see details for rates > * 25.0Gb/s) */ -#define SFF_8472_SN_START 68 /* Vendor SN [Address A0h, Bytes 68-83] */ -#define SFF_8472_SN_END 83 -#define SFF_8472_DATE_START 84 /* Date code Vendor’s manufacturing + SFF_8472_SN_START = 68, /* Vendor SN [Address A0h, Bytes 68-83] */ + SFF_8472_SN_END = 83, + SFF_8472_DATE_START = 84, /* Date code Vendor’s manufacturing * date code (see Table 3.8) */ -#define SFF_8472_DATE_END 91 -#define SFF_8472_DIAG_TYPE 92 /* Diagnostic Monitoring Type + SFF_8472_DATE_END = 91, + SFF_8472_DIAG_TYPE = 92, /* Diagnostic Monitoring Type * Indicates which type of * diagnostic monitoring is * implemented (if any) in the * transceiver (see Table 3.9) */ -#define SFF_8472_DIAG_IMPL (1 << 6) /* Required to be 1 */ -#define SFF_8472_DIAG_INTERNAL (1 << 5) /* Internal measurements. */ -#define SFF_8472_DIAG_EXTERNAL (1 << 4) /* External measurements. */ -#define SFF_8472_DIAG_POWER (1 << 3) /* Power measurement type */ -#define SFF_8472_DIAG_ADDR_CHG (1 << 2) /* Address change required. - * See SFF-8472 doc. */ -#define SFF_8472_ENHANCED 93 /* Enhanced Options Indicates which + SFF_8472_ENHANCED = 93, /* Enhanced Options Indicates which * optional enhanced features are * implemented (if any) in the * transceiver (see Table 3.10) */ -#define SFF_8472_COMPLIANCE 94 /* SFF-8472 Compliance Indicates + SFF_8472_COMPLIANCE = 94, /* SFF-8472 Compliance Indicates * which revision of SFF-8472 the * transceiver complies with. (see * Table 3.12)*/ -#define SFF_8472_CC_EXT 95 /* Check code for the Extended ID + SFF_8472_CC_EXT = 95, /* Check code for the Extended ID * Fields (addresses 64 to 94) */ -#define SFF_8472_VENDOR_RSRVD_START 96 -#define SFF_8472_VENDOR_RSRVD_END 127 + SFF_8472_VENDOR_RSRVD_START = 96, + SFF_8472_VENDOR_RSRVD_END = 127, -#define SFF_8472_RESERVED_START 128 -#define SFF_8472_RESERVED_END 255 + SFF_8472_RESERVED_START = 128, + SFF_8472_RESERVED_END = 255 +}; + +#define SFF_8472_DIAG_IMPL (1 << 6) /* Required to be 1 */ +#define SFF_8472_DIAG_INTERNAL (1 << 5) /* Internal measurements. */ +#define SFF_8472_DIAG_EXTERNAL (1 << 4) /* External measurements. */ +#define SFF_8472_DIAG_POWER (1 << 3) /* Power measurement type */ +#define SFF_8472_DIAG_ADDR_CHG (1 << 2) /* Address change required. + * See SFF-8472 doc. */ /* * Diagnostics are available at the two wire address 0xa2. All @@ -167,77 +170,78 @@ * see which, if any are supported. */ -#define SFF_8472_DIAG 0xa2 /* Base address for diagnostics. */ +enum {SFF_8472_DIAG = 0xa2}; /* Base address for diagnostics. */ /* * Table 3.15 Alarm and Warning Thresholds All values are 2 bytes * and MUST be read in a single read operation starting at the MSB */ -#define SFF_8472_TEMP_HIGH_ALM 0 /* Temp High Alarm */ -#define SFF_8472_TEMP_LOW_ALM 2 /* Temp Low Alarm */ -#define SFF_8472_TEMP_HIGH_WARN 4 /* Temp High Warning */ -#define SFF_8472_TEMP_LOW_WARN 6 /* Temp Low Warning */ -#define SFF_8472_VOLTAGE_HIGH_ALM 8 /* Voltage High Alarm */ -#define SFF_8472_VOLTAGE_LOW_ALM 10 /* Voltage Low Alarm */ -#define SFF_8472_VOLTAGE_HIGH_WARN 12 /* Voltage High Warning */ -#define SFF_8472_VOLTAGE_LOW_WARN 14 /* Voltage Low Warning */ -#define SFF_8472_BIAS_HIGH_ALM 16 /* Bias High Alarm */ -#define SFF_8472_BIAS_LOW_ALM 18 /* Bias Low Alarm */ -#define SFF_8472_BIAS_HIGH_WARN 20 /* Bias High Warning */ -#define SFF_8472_BIAS_LOW_WARN 22 /* Bias Low Warning */ -#define SFF_8472_TX_POWER_HIGH_ALM 24 /* TX Power High Alarm */ -#define SFF_8472_TX_POWER_LOW_ALM 26 /* TX Power Low Alarm */ -#define SFF_8472_TX_POWER_HIGH_WARN 28 /* TX Power High Warning */ -#define SFF_8472_TX_POWER_LOW_WARN 30 /* TX Power Low Warning */ -#define SFF_8472_RX_POWER_HIGH_ALM 32 /* RX Power High Alarm */ -#define SFF_8472_RX_POWER_LOW_ALM 34 /* RX Power Low Alarm */ -#define SFF_8472_RX_POWER_HIGH_WARN 36 /* RX Power High Warning */ -#define SFF_8472_RX_POWER_LOW_WARN 38 /* RX Power Low Warning */ +enum { + SFF_8472_TEMP_HIGH_ALM = 0, /* Temp High Alarm */ + SFF_8472_TEMP_LOW_ALM = 2, /* Temp Low Alarm */ + SFF_8472_TEMP_HIGH_WARN = 4, /* Temp High Warning */ + SFF_8472_TEMP_LOW_WARN = 6, /* Temp Low Warning */ + SFF_8472_VOLTAGE_HIGH_ALM = 8, /* Voltage High Alarm */ + SFF_8472_VOLTAGE_LOW_ALM = 10, /* Voltage Low Alarm */ + SFF_8472_VOLTAGE_HIGH_WARN = 12, /* Voltage High Warning */ + SFF_8472_VOLTAGE_LOW_WARN = 14, /* Voltage Low Warning */ + SFF_8472_BIAS_HIGH_ALM = 16, /* Bias High Alarm */ + SFF_8472_BIAS_LOW_ALM = 18, /* Bias Low Alarm */ + SFF_8472_BIAS_HIGH_WARN = 20, /* Bias High Warning */ + SFF_8472_BIAS_LOW_WARN = 22, /* Bias Low Warning */ + SFF_8472_TX_POWER_HIGH_ALM = 24, /* TX Power High Alarm */ + SFF_8472_TX_POWER_LOW_ALM = 26, /* TX Power Low Alarm */ + SFF_8472_TX_POWER_HIGH_WARN = 28, /* TX Power High Warning */ + SFF_8472_TX_POWER_LOW_WARN = 30, /* TX Power Low Warning */ + SFF_8472_RX_POWER_HIGH_ALM = 32, /* RX Power High Alarm */ + SFF_8472_RX_POWER_LOW_ALM = 34, /* RX Power Low Alarm */ + SFF_8472_RX_POWER_HIGH_WARN = 36, /* RX Power High Warning */ + SFF_8472_RX_POWER_LOW_WARN = 38, /* RX Power Low Warning */ -#define SFF_8472_RX_POWER4 56 /* Rx_PWR(4) Single precision + SFF_8472_RX_POWER4 = 56, /* Rx_PWR(4) Single precision * floating point calibration data * - Rx optical power. Bit 7 of * byte 56 is MSB. Bit 0 of byte * 59 is LSB. Rx_PWR(4) should be * set to zero for “internally * calibrated†devices. */ -#define SFF_8472_RX_POWER3 60 /* Rx_PWR(3) Single precision + SFF_8472_RX_POWER3 = 60, /* Rx_PWR(3) Single precision * floating point calibration data * - Rx optical power. Bit 7 of * byte 60 is MSB. Bit 0 of byte 63 * is LSB. Rx_PWR(3) should be set * to zero for “internally * calibrated†devices.*/ -#define SFF_8472_RX_POWER2 64 /* Rx_PWR(2) Single precision + SFF_8472_RX_POWER2 = 64, /* Rx_PWR(2) Single precision * floating point calibration data, * Rx optical power. Bit 7 of byte * 64 is MSB, bit 0 of byte 67 is * LSB. Rx_PWR(2) should be set to * zero for “internally calibrated†* devices. */ -#define SFF_8472_RX_POWER1 68 /* Rx_PWR(1) Single precision + SFF_8472_RX_POWER1 = 68, /* Rx_PWR(1) Single precision * floating point calibration data, * Rx optical power. Bit 7 of byte * 68 is MSB, bit 0 of byte 71 is * LSB. Rx_PWR(1) should be set to * 1 for “internally calibrated†* devices. */ -#define SFF_8472_RX_POWER0 72 /* Rx_PWR(0) Single precision + SFF_8472_RX_POWER0 = 72, /* Rx_PWR(0) Single precision * floating point calibration data, * Rx optical power. Bit 7 of byte * 72 is MSB, bit 0 of byte 75 is * LSB. Rx_PWR(0) should be set to * zero for “internally calibrated†* devices. */ -#define SFF_8472_TX_I_SLOPE 76 /* Tx_I(Slope) Fixed decimal + SFF_8472_TX_I_SLOPE = 76, /* Tx_I(Slope) Fixed decimal * (unsigned) calibration data, * laser bias current. Bit 7 of * byte 76 is MSB, bit 0 of byte 77 * is LSB. Tx_I(Slope) should be * set to 1 for “internally * calibrated†devices. */ -#define SFF_8472_TX_I_OFFSET 78 /* Tx_I(Offset) Fixed decimal + SFF_8472_TX_I_OFFSET = 78, /* Tx_I(Offset) Fixed decimal * (signed two’s complement) * calibration data, laser bias * current. Bit 7 of byte 78 is @@ -245,7 +249,7 @@ * LSB. Tx_I(Offset) should be set * to zero for “internally * calibrated†devices. */ -#define SFF_8472_TX_POWER_SLOPE 80 /* Tx_PWR(Slope) Fixed decimal + SFF_8472_TX_POWER_SLOPE = 80, /* Tx_PWR(Slope) Fixed decimal * (unsigned) calibration data, * transmitter coupled output * power. Bit 7 of byte 80 is MSB, @@ -253,22 +257,22 @@ * Tx_PWR(Slope) should be set to 1 * for “internally calibrated†* devices. */ -#define SFF_8472_TX_POWER_OFFSET 82 /* Tx_PWR(Offset) Fixed decimal - * (signed two’s complement) - * calibration data, transmitter - * coupled output power. Bit 7 of - * byte 82 is MSB, bit 0 of byte 83 - * is LSB. Tx_PWR(Offset) should be - * set to zero for “internally - * calibrated†devices. */ -#define SFF_8472_T_SLOPE 84 /* T (Slope) Fixed decimal + SFF_8472_TX_POWER_OFFSET = 82, /* Tx_PWR(Offset) Fixed decimal + * (signed two’s complement) + * calibration data, transmitter + * coupled output power. Bit 7 of + * byte 82 is MSB, bit 0 of byte 83 + * is LSB. Tx_PWR(Offset) should be + * set to zero for “internally + * calibrated†devices. */ + SFF_8472_T_SLOPE = 84, /* T (Slope) Fixed decimal * (unsigned) calibration data, * internal module temperature. Bit * 7 of byte 84 is MSB, bit 0 of * byte 85 is LSB. T(Slope) should * be set to 1 for “internally * calibrated†devices. */ -#define SFF_8472_T_OFFSET 86 /* T (Offset) Fixed decimal (signed + SFF_8472_T_OFFSET = 86, /* T (Offset) Fixed decimal (signed * two’s complement) calibration * data, internal module * temperature. Bit 7 of byte 86 is @@ -276,7 +280,7 @@ * T(Offset) should be set to zero * for “internally calibrated†* devices. */ -#define SFF_8472_V_SLOPE 88 /* V (Slope) Fixed decimal + SFF_8472_V_SLOPE = 88, /* V (Slope) Fixed decimal * (unsigned) calibration data, * internal module supply * voltage. Bit 7 of byte 88 is @@ -284,7 +288,7 @@ * LSB. V(Slope) should be set to 1 * for “internally calibrated†* devices. */ -#define SFF_8472_V_OFFSET 90 /* V (Offset) Fixed decimal (signed + SFF_8472_V_OFFSET = 90, /* V (Offset) Fixed decimal (signed * two’s complement) calibration * data, internal module supply * voltage. Bit 7 of byte 90 is @@ -292,21 +296,21 @@ * LSB. V(Offset) should be set to * zero for “internally calibrated†* devices. */ -#define SFF_8472_CHECKSUM 95 /* Checksum Byte 95 contains the + SFF_8472_CHECKSUM = 95, /* Checksum Byte 95 contains the * low order 8 bits of the sum of * bytes 0 – 94. */ - /* Internal measurements. */ + /* Internal measurements. */ -#define SFF_8472_TEMP 96 /* Internally measured module temperature. */ -#define SFF_8472_VCC 98 /* Internally measured supply + SFF_8472_TEMP = 96, /* Internally measured module temperature. */ + SFF_8472_VCC = 98, /* Internally measured supply * voltage in transceiver. */ -#define SFF_8472_TX_BIAS 100 /* Internally measured TX Bias Current. */ -#define SFF_8472_TX_POWER 102 /* Measured TX output power. */ -#define SFF_8472_RX_POWER 104 /* Measured RX input power. */ - -#define SFF_8472_STATUS 110 /* See below */ + SFF_8472_TX_BIAS = 100, /* Internally measured TX Bias Current. */ + SFF_8472_TX_POWER = 102, /* Measured TX output power. */ + SFF_8472_RX_POWER = 104, /* Measured RX input power. */ + SFF_8472_STATUS = 110 /* See below */ +}; /* Status Bits Described */ /* @@ -372,20 +376,22 @@ #define SFF_8472_STATUS_DATA_READY (1 << 0) /* Table 3.2 Identifier values */ -#define SFF_8472_ID_UNKNOWN 0x0 /* Unknown or unspecified */ -#define SFF_8472_ID_GBIC 0x1 /* GBIC */ -#define SFF_8472_ID_SFF 0x2 /* Module soldered to motherboard (ex: SFF)*/ -#define SFF_8472_ID_SFP 0x3 /* SFP or SFP “Plus†*/ -#define SFF_8472_ID_XBI 0x4 /* Reserved for “300 pin XBI†devices */ -#define SFF_8472_ID_XENPAK 0x5 /* Reserved for “Xenpak†devices */ -#define SFF_8472_ID_XFP 0x6 /* Reserved for “XFP†devices */ -#define SFF_8472_ID_XFF 0x7 /* Reserved for “XFF†devices */ -#define SFF_8472_ID_XFPE 0x8 /* Reserved for “XFP-E†devices */ -#define SFF_8472_ID_XPAK 0x9 /* Reserved for “XPak†devices */ -#define SFF_8472_ID_X2 0xA /* Reserved for “X2†devices */ -#define SFF_8472_ID_DWDM_SFP 0xB /* Reserved for “DWDM-SFP†devices */ -#define SFF_8472_ID_QSFP 0xC /* Reserved for “QSFP†devices */ -#define SFF_8472_ID_LAST SFF_8472_ID_QSFP +enum { + SFF_8472_ID_UNKNOWN = 0x0, /* Unknown or unspecified */ + SFF_8472_ID_GBIC = 0x1, /* GBIC */ + SFF_8472_ID_SFF = 0x2, /* Module soldered to motherboard (ex: SFF)*/ + SFF_8472_ID_SFP = 0x3, /* SFP or SFP “Plus†*/ + SFF_8472_ID_XBI = 0x4, /* Reserved for “300 pin XBI†devices */ + SFF_8472_ID_XENPAK = 0x5, /* Reserved for “Xenpak†devices */ + SFF_8472_ID_XFP = 0x6, /* Reserved for “XFP†devices */ + SFF_8472_ID_XFF = 0x7, /* Reserved for “XFF†devices */ + SFF_8472_ID_XFPE = 0x8, /* Reserved for “XFP-E†devices */ + SFF_8472_ID_XPAK = 0x9, /* Reserved for “XPak†devices */ + SFF_8472_ID_X2 = 0xA, /* Reserved for “X2†devices */ + SFF_8472_ID_DWDM_SFP = 0xB, /* Reserved for “DWDM-SFP†devices */ + SFF_8472_ID_QSFP = 0xC, /* Reserved for “QSFP†devices */ + SFF_8472_ID_LAST = SFF_8472_ID_QSFP + }; static char *sff_8472_id[SFF_8472_ID_LAST + 1] = {"Unknown", "GBIC", From owner-svn-src-stable@FreeBSD.ORG Wed May 7 19:13:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AAE06337; Wed, 7 May 2014 19:13:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 964A8D5; Wed, 7 May 2014 19:13:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47JD9Jo037611; Wed, 7 May 2014 19:13:09 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47JD9hP037609; Wed, 7 May 2014 19:13:09 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201405071913.s47JD9hP037609@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 7 May 2014 19:13:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265589 - stable/9/tools/tools/cxgbetool X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 19:13:09 -0000 Author: np Date: Wed May 7 19:13:09 2014 New Revision: 265589 URL: http://svnweb.freebsd.org/changeset/base/265589 Log: MFC r253870, r258698 (by gnn@), r259048, and r261534. r253870: Teach cxgbetool to display T5 congestion manager context. r258698: cxgbetool: "modinfo" command to display SFP+ module information. trantor:~# cxgbetool t5nex0 modinfo 1 ID: SFP Vendor FINISAR CORP. SN AJ10JQR PN FTLX8571D3BCL Rev A Temp: +35C Vcc 3.225600V TX Bias 2.176000uA TX Power 0.588800mW RX Power 0.486400mW r259048: Two new cxgbetool subcommands to set up scheduler classes and to bind them to NIC queues. r261534: cxgbetool: Display the congestion channel map in hex. Modified: stable/9/tools/tools/cxgbetool/Makefile stable/9/tools/tools/cxgbetool/cxgbetool.c Directory Properties: stable/9/tools/tools/cxgbetool/ (props changed) Modified: stable/9/tools/tools/cxgbetool/Makefile ============================================================================== --- stable/9/tools/tools/cxgbetool/Makefile Wed May 7 19:07:45 2014 (r265588) +++ stable/9/tools/tools/cxgbetool/Makefile Wed May 7 19:13:09 2014 (r265589) @@ -3,7 +3,7 @@ PROG= cxgbetool SRCS= cxgbetool.c NO_MAN= -CFLAGS+= -I${.CURDIR}/../../../sys/dev/cxgbe -I. +CFLAGS+= -I${.CURDIR}/../../../sys/dev/cxgbe -I${.CURDIR}/../../../sys -I. BINDIR?= /usr/sbin .include Modified: stable/9/tools/tools/cxgbetool/cxgbetool.c ============================================================================== --- stable/9/tools/tools/cxgbetool/cxgbetool.c Wed May 7 19:07:45 2014 (r265588) +++ stable/9/tools/tools/cxgbetool/cxgbetool.c Wed May 7 19:13:09 2014 (r265589) @@ -46,14 +46,16 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "t4_ioctl.h" #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) - +#define in_range(val, lo, hi) ( val < 0 || (val <= hi && val >= lo)) #define max(x, y) ((x) > (y) ? (x) : (y)) static const char *progname, *nexus; +static int chip_id; /* 4 for T4, 5 for T5 */ struct reg_info { const char *name; @@ -93,9 +95,12 @@ usage(FILE *fp) "\ti2c [] read from i2c device\n" "\tloadfw install firmware\n" "\tmemdump dump a memory range\n" + "\tmodinfo optics/cable information\n" "\treg
[=] read/write register\n" "\treg64
[=] read/write 64 bit register\n" "\tregdump [] ... dump registers\n" + "\tsched-class params .. configure TX scheduler class\n" + "\tsched-queue bind NIC queues to TX Scheduling class\n" "\tstdio interactive mode\n" "\ttcb read TCB\n" ); @@ -122,6 +127,7 @@ real_doit(unsigned long cmd, void *data, rc = errno; return (rc); } + chip_id = nexus[1] - '0'; } rc = ioctl(fd, cmd, data); @@ -316,7 +322,7 @@ dump_regs_t4(int argc, const char *argv[ T4_MODREGS(ma), { "edc0", t4_edc_0_regs }, { "edc1", t4_edc_1_regs }, - T4_MODREGS(cim), + T4_MODREGS(cim), T4_MODREGS(tp), T4_MODREGS(ulp_rx), T4_MODREGS(ulp_tx), @@ -328,7 +334,7 @@ dump_regs_t4(int argc, const char *argv[ { "i2c", t4_i2cm_regs }, T4_MODREGS(mi), T4_MODREGS(uart), - T4_MODREGS(pmu), + T4_MODREGS(pmu), T4_MODREGS(sf), T4_MODREGS(pl), T4_MODREGS(le), @@ -1359,7 +1365,16 @@ show_sge_context(const struct t4_sge_con FIELD1("CngDBPHdr:", 6), FIELD1("CngDBPData:", 5), FIELD1("CngIMSG:", 4), - FIELD("CngChMap:", 0, 3), + { "CngChMap:", 0, 3, 0, 1, 0}, + { NULL } + }; + static struct field_desc t5_conm[] = { + FIELD1("CngMPSEnable:", 21), + FIELD("CngTPMode:", 19, 20), + FIELD1("CngDBPHdr:", 18), + FIELD1("CngDBPData:", 17), + FIELD1("CngIMSG:", 16), + { "CngChMap:", 0, 15, 0, 1, 0}, { NULL } }; @@ -1370,7 +1385,7 @@ show_sge_context(const struct t4_sge_con else if (p->mem_id == SGE_CONTEXT_INGRESS) show_struct(p->data, 5, ingress); else if (p->mem_id == SGE_CONTEXT_CNM) - show_struct(p->data, 1, conm); + show_struct(p->data, 1, chip_id == 5 ? t5_conm : conm); } #undef FIELD @@ -1658,6 +1673,420 @@ clearstats(int argc, const char *argv[]) } static int +modinfo(int argc, const char *argv[]) +{ + long port; + char string[16], *p; + struct t4_i2c_data i2cd; + int rc, i; + uint16_t temp, vcc, tx_bias, tx_power, rx_power; + + if (argc != 1) { + warnx("must supply a port"); + return (EINVAL); + } + + p = str_to_number(argv[0], &port, NULL); + if (*p || port > UCHAR_MAX) { + warnx("invalid port id \"%s\"", argv[0]); + return (EINVAL); + } + + bzero(&i2cd, sizeof(i2cd)); + i2cd.len = 1; + i2cd.port_id = port; + i2cd.dev_addr = SFF_8472_BASE; + + i2cd.offset = SFF_8472_ID; + if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) + goto fail; + + if (i2cd.data[0] > SFF_8472_ID_LAST) + printf("Unknown ID\n"); + else + printf("ID: %s\n", sff_8472_id[i2cd.data[0]]); + + bzero(&string, sizeof(string)); + for (i = SFF_8472_VENDOR_START; i < SFF_8472_VENDOR_END; i++) { + i2cd.offset = i; + if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) + goto fail; + string[i - SFF_8472_VENDOR_START] = i2cd.data[0]; + } + printf("Vendor %s\n", string); + + bzero(&string, sizeof(string)); + for (i = SFF_8472_SN_START; i < SFF_8472_SN_END; i++) { + i2cd.offset = i; + if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) + goto fail; + string[i - SFF_8472_SN_START] = i2cd.data[0]; + } + printf("SN %s\n", string); + + bzero(&string, sizeof(string)); + for (i = SFF_8472_PN_START; i < SFF_8472_PN_END; i++) { + i2cd.offset = i; + if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) + goto fail; + string[i - SFF_8472_PN_START] = i2cd.data[0]; + } + printf("PN %s\n", string); + + bzero(&string, sizeof(string)); + for (i = SFF_8472_REV_START; i < SFF_8472_REV_END; i++) { + i2cd.offset = i; + if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) + goto fail; + string[i - SFF_8472_REV_START] = i2cd.data[0]; + } + printf("Rev %s\n", string); + + i2cd.offset = SFF_8472_DIAG_TYPE; + if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) + goto fail; + + if ((char )i2cd.data[0] & (SFF_8472_DIAG_IMPL | + SFF_8472_DIAG_INTERNAL)) { + + /* Switch to reading from the Diagnostic address. */ + i2cd.dev_addr = SFF_8472_DIAG; + i2cd.len = 1; + + i2cd.offset = SFF_8472_TEMP; + if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) + goto fail; + temp = i2cd.data[0] << 8; + printf("Temp: "); + if ((temp & SFF_8472_TEMP_SIGN) == SFF_8472_TEMP_SIGN) + printf("-"); + else + printf("+"); + printf("%dC\n", (temp & SFF_8472_TEMP_MSK) >> + SFF_8472_TEMP_SHIFT); + + i2cd.offset = SFF_8472_VCC; + if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) + goto fail; + vcc = i2cd.data[0] << 8; + printf("Vcc %fV\n", vcc / SFF_8472_VCC_FACTOR); + + i2cd.offset = SFF_8472_TX_BIAS; + if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) + goto fail; + tx_bias = i2cd.data[0] << 8; + printf("TX Bias %fuA\n", tx_bias / SFF_8472_BIAS_FACTOR); + + i2cd.offset = SFF_8472_TX_POWER; + if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) + goto fail; + tx_power = i2cd.data[0] << 8; + printf("TX Power %fmW\n", tx_power / SFF_8472_POWER_FACTOR); + + i2cd.offset = SFF_8472_RX_POWER; + if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) + goto fail; + rx_power = i2cd.data[0] << 8; + printf("RX Power %fmW\n", rx_power / SFF_8472_POWER_FACTOR); + + } else + printf("Diagnostics not supported.\n"); + + return(0); + +fail: + if (rc == EPERM) + warnx("No module/cable in port %ld", port); + return (rc); + +} + +/* XXX: pass in a low/high and do range checks as well */ +static int +get_sched_param(const char *param, const char *args[], long *val) +{ + char *p; + + if (strcmp(param, args[0]) != 0) + return (EINVAL); + + p = str_to_number(args[1], val, NULL); + if (*p) { + warnx("parameter \"%s\" has bad value \"%s\"", args[0], + args[1]); + return (EINVAL); + } + + return (0); +} + +static int +sched_class(int argc, const char *argv[]) +{ + struct t4_sched_params op; + int errs, i; + + memset(&op, 0xff, sizeof(op)); + op.subcmd = -1; + op.type = -1; + if (argc == 0) { + warnx("missing scheduling sub-command"); + return (EINVAL); + } + if (!strcmp(argv[0], "config")) { + op.subcmd = SCHED_CLASS_SUBCMD_CONFIG; + op.u.config.minmax = -1; + } else if (!strcmp(argv[0], "params")) { + op.subcmd = SCHED_CLASS_SUBCMD_PARAMS; + op.u.params.level = op.u.params.mode = op.u.params.rateunit = + op.u.params.ratemode = op.u.params.channel = + op.u.params.cl = op.u.params.minrate = op.u.params.maxrate = + op.u.params.weight = op.u.params.pktsize = -1; + } else { + warnx("invalid scheduling sub-command \"%s\"", argv[0]); + return (EINVAL); + } + + /* Decode remaining arguments ... */ + errs = 0; + for (i = 1; i < argc; i += 2) { + const char **args = &argv[i]; + long l; + + if (i + 1 == argc) { + warnx("missing argument for \"%s\"", args[0]); + errs++; + break; + } + + if (!strcmp(args[0], "type")) { + if (!strcmp(args[1], "packet")) + op.type = SCHED_CLASS_TYPE_PACKET; + else { + warnx("invalid type parameter \"%s\"", args[1]); + errs++; + } + + continue; + } + + if (op.subcmd == SCHED_CLASS_SUBCMD_CONFIG) { + if(!get_sched_param("minmax", args, &l)) + op.u.config.minmax = (int8_t)l; + else { + warnx("unknown scheduler config parameter " + "\"%s\"", args[0]); + errs++; + } + + continue; + } + + /* Rest applies only to SUBCMD_PARAMS */ + if (op.subcmd != SCHED_CLASS_SUBCMD_PARAMS) + continue; + + if (!strcmp(args[0], "level")) { + if (!strcmp(args[1], "cl-rl")) + op.u.params.level = SCHED_CLASS_LEVEL_CL_RL; + else if (!strcmp(args[1], "cl-wrr")) + op.u.params.level = SCHED_CLASS_LEVEL_CL_WRR; + else if (!strcmp(args[1], "ch-rl")) + op.u.params.level = SCHED_CLASS_LEVEL_CH_RL; + else { + warnx("invalid level parameter \"%s\"", + args[1]); + errs++; + } + } else if (!strcmp(args[0], "mode")) { + if (!strcmp(args[1], "class")) + op.u.params.mode = SCHED_CLASS_MODE_CLASS; + else if (!strcmp(args[1], "flow")) + op.u.params.mode = SCHED_CLASS_MODE_FLOW; + else { + warnx("invalid mode parameter \"%s\"", args[1]); + errs++; + } + } else if (!strcmp(args[0], "rate-unit")) { + if (!strcmp(args[1], "bits")) + op.u.params.rateunit = SCHED_CLASS_RATEUNIT_BITS; + else if (!strcmp(args[1], "pkts")) + op.u.params.rateunit = SCHED_CLASS_RATEUNIT_PKTS; + else { + warnx("invalid rate-unit parameter \"%s\"", + args[1]); + errs++; + } + } else if (!strcmp(args[0], "rate-mode")) { + if (!strcmp(args[1], "relative")) + op.u.params.ratemode = SCHED_CLASS_RATEMODE_REL; + else if (!strcmp(args[1], "absolute")) + op.u.params.ratemode = SCHED_CLASS_RATEMODE_ABS; + else { + warnx("invalid rate-mode parameter \"%s\"", + args[1]); + errs++; + } + } else if (!get_sched_param("channel", args, &l)) + op.u.params.channel = (int8_t)l; + else if (!get_sched_param("class", args, &l)) + op.u.params.cl = (int8_t)l; + else if (!get_sched_param("min-rate", args, &l)) + op.u.params.minrate = (int32_t)l; + else if (!get_sched_param("max-rate", args, &l)) + op.u.params.maxrate = (int32_t)l; + else if (!get_sched_param("weight", args, &l)) + op.u.params.weight = (int16_t)l; + else if (!get_sched_param("pkt-size", args, &l)) + op.u.params.pktsize = (int16_t)l; + else { + warnx("unknown scheduler parameter \"%s\"", args[0]); + errs++; + } + } + + /* + * Catch some logical fallacies in terms of argument combinations here + * so we can offer more than just the EINVAL return from the driver. + * The driver will be able to catch a lot more issues since it knows + * the specifics of the device hardware capabilities like how many + * channels, classes, etc. the device supports. + */ + if (op.type < 0) { + warnx("sched \"type\" parameter missing"); + errs++; + } + if (op.subcmd == SCHED_CLASS_SUBCMD_CONFIG) { + if (op.u.config.minmax < 0) { + warnx("sched config \"minmax\" parameter missing"); + errs++; + } + } + if (op.subcmd == SCHED_CLASS_SUBCMD_PARAMS) { + if (op.u.params.level < 0) { + warnx("sched params \"level\" parameter missing"); + errs++; + } + if (op.u.params.mode < 0) { + warnx("sched params \"mode\" parameter missing"); + errs++; + } + if (op.u.params.rateunit < 0) { + warnx("sched params \"rate-unit\" parameter missing"); + errs++; + } + if (op.u.params.ratemode < 0) { + warnx("sched params \"rate-mode\" parameter missing"); + errs++; + } + if (op.u.params.channel < 0) { + warnx("sched params \"channel\" missing"); + errs++; + } + if (op.u.params.cl < 0) { + warnx("sched params \"class\" missing"); + errs++; + } + if (op.u.params.maxrate < 0 && + (op.u.params.level == SCHED_CLASS_LEVEL_CL_RL || + op.u.params.level == SCHED_CLASS_LEVEL_CH_RL)) { + warnx("sched params \"max-rate\" missing for " + "rate-limit level"); + errs++; + } + if (op.u.params.weight < 0 && + op.u.params.level == SCHED_CLASS_LEVEL_CL_WRR) { + warnx("sched params \"weight\" missing for " + "weighted-round-robin level"); + errs++; + } + if (op.u.params.pktsize < 0 && + (op.u.params.level == SCHED_CLASS_LEVEL_CL_RL || + op.u.params.level == SCHED_CLASS_LEVEL_CH_RL)) { + warnx("sched params \"pkt-size\" missing for " + "rate-limit level"); + errs++; + } + if (op.u.params.mode == SCHED_CLASS_MODE_FLOW && + op.u.params.ratemode != SCHED_CLASS_RATEMODE_ABS) { + warnx("sched params mode flow needs rate-mode absolute"); + errs++; + } + if (op.u.params.ratemode == SCHED_CLASS_RATEMODE_REL && + !in_range(op.u.params.maxrate, 1, 100)) { + warnx("sched params \"max-rate\" takes " + "percentage value(1-100) for rate-mode relative"); + errs++; + } + if (op.u.params.ratemode == SCHED_CLASS_RATEMODE_ABS && + !in_range(op.u.params.maxrate, 1, 10000000)) { + warnx("sched params \"max-rate\" takes " + "value(1-10000000) for rate-mode absolute"); + errs++; + } + if (op.u.params.maxrate > 0 && + op.u.params.maxrate < op.u.params.minrate) { + warnx("sched params \"max-rate\" is less than " + "\"min-rate\""); + errs++; + } + } + + if (errs > 0) { + warnx("%d error%s in sched-class command", errs, + errs == 1 ? "" : "s"); + return (EINVAL); + } + + return doit(CHELSIO_T4_SCHED_CLASS, &op); +} + +static int +sched_queue(int argc, const char *argv[]) +{ + struct t4_sched_queue op = {0}; + char *p; + long val; + + if (argc != 3) { + /* need " */ + warnx("incorrect number of arguments."); + return (EINVAL); + } + + p = str_to_number(argv[0], &val, NULL); + if (*p || val > UCHAR_MAX) { + warnx("invalid port id \"%s\"", argv[0]); + return (EINVAL); + } + op.port = (uint8_t)val; + + if (!strcmp(argv[1], "all") || !strcmp(argv[1], "*")) + op.queue = -1; + else { + p = str_to_number(argv[1], &val, NULL); + if (*p || val < -1) { + warnx("invalid queue \"%s\"", argv[1]); + return (EINVAL); + } + op.queue = (int8_t)val; + } + + if (!strcmp(argv[2], "unbind") || !strcmp(argv[2], "clear")) + op.cl = -1; + else { + p = str_to_number(argv[2], &val, NULL); + if (*p || val < -1) { + warnx("invalid class \"%s\"", argv[2]); + return (EINVAL); + } + op.cl = (int8_t)val; + } + + return doit(CHELSIO_T4_SCHED_QUEUE, &op); +} + +static int run_cmd(int argc, const char *argv[]) { int rc = -1; @@ -1687,6 +2116,12 @@ run_cmd(int argc, const char *argv[]) rc = read_i2c(argc, argv); else if (!strcmp(cmd, "clearstats")) rc = clearstats(argc, argv); + else if (!strcmp(cmd, "modinfo")) + rc = modinfo(argc, argv); + else if (!strcmp(cmd, "sched-class")) + rc = sched_class(argc, argv); + else if (!strcmp(cmd, "sched-queue")) + rc = sched_queue(argc, argv); else { rc = EINVAL; warnx("invalid command \"%s\"", cmd); From owner-svn-src-stable@FreeBSD.ORG Wed May 7 20:09:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 143C784C; Wed, 7 May 2014 20:09:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00E66862; Wed, 7 May 2014 20:09:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47K9HPC060532; Wed, 7 May 2014 20:09:17 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47K9HQb060531; Wed, 7 May 2014 20:09:17 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201405072009.s47K9HQb060531@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 7 May 2014 20:09:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265597 - stable/9/usr.sbin/crashinfo X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 20:09:18 -0000 Author: gavin Date: Wed May 7 20:09:17 2014 New Revision: 265597 URL: http://svnweb.freebsd.org/changeset/base/265597 Log: MFC 254959: Allow more space for interface names. Modified: stable/9/usr.sbin/crashinfo/crashinfo.sh Directory Properties: stable/9/usr.sbin/crashinfo/ (props changed) Modified: stable/9/usr.sbin/crashinfo/crashinfo.sh ============================================================================== --- stable/9/usr.sbin/crashinfo/crashinfo.sh Wed May 7 19:53:51 2014 (r265596) +++ stable/9/usr.sbin/crashinfo/crashinfo.sh Wed May 7 20:09:17 2014 (r265597) @@ -268,9 +268,9 @@ netstat -M $VMCORE -N $KERNEL -m echo echo "------------------------------------------------------------------------" -echo "netstat -id" +echo "netstat -idW" echo -netstat -M $VMCORE -N $KERNEL -id +netstat -M $VMCORE -N $KERNEL -idW echo echo "------------------------------------------------------------------------" From owner-svn-src-stable@FreeBSD.ORG Wed May 7 20:13:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C6FDDDAC; Wed, 7 May 2014 20:13:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3C6C943; Wed, 7 May 2014 20:13:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47KDk6n064277; Wed, 7 May 2014 20:13:46 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47KDkep064276; Wed, 7 May 2014 20:13:46 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201405072013.s47KDkep064276@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 7 May 2014 20:13:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r265598 - stable/8/usr.sbin/crashinfo X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 20:13:46 -0000 Author: gavin Date: Wed May 7 20:13:46 2014 New Revision: 265598 URL: http://svnweb.freebsd.org/changeset/base/265598 Log: Merge r254959 from head: Allow more space for interface names. Modified: stable/8/usr.sbin/crashinfo/crashinfo.sh Directory Properties: stable/8/usr.sbin/crashinfo/ (props changed) Modified: stable/8/usr.sbin/crashinfo/crashinfo.sh ============================================================================== --- stable/8/usr.sbin/crashinfo/crashinfo.sh Wed May 7 20:09:17 2014 (r265597) +++ stable/8/usr.sbin/crashinfo/crashinfo.sh Wed May 7 20:13:46 2014 (r265598) @@ -267,9 +267,9 @@ netstat -M $VMCORE -N $KERNEL -m echo echo "------------------------------------------------------------------------" -echo "netstat -id" +echo "netstat -idW" echo -netstat -M $VMCORE -N $KERNEL -id +netstat -M $VMCORE -N $KERNEL -idW echo echo "------------------------------------------------------------------------" From owner-svn-src-stable@FreeBSD.ORG Wed May 7 20:20:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76F9B972; Wed, 7 May 2014 20:20:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62A9FA8B; Wed, 7 May 2014 20:20:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47KKs8R066257; Wed, 7 May 2014 20:20:54 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47KKqOb066250; Wed, 7 May 2014 20:20:52 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201405072020.s47KKqOb066250@svn.freebsd.org> From: Scott Long Date: Wed, 7 May 2014 20:20:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265604 - stable/10/usr.sbin/pmcstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 20:20:54 -0000 Author: scottl Date: Wed May 7 20:20:52 2014 New Revision: 265604 URL: http://svnweb.freebsd.org/changeset/base/265604 Log: Merged r262424-262425,265085 Add the -a option to pmcstat. This produces a full stack track on the sampled points. See the man page for details on how this works. Obtained from: Netflix, Inc. Added: stable/10/usr.sbin/pmcstat/pmcpl_annotate_cg.c - copied, changed from r262424, head/usr.sbin/pmcstat/pmcpl_annotate_cg.c stable/10/usr.sbin/pmcstat/pmcpl_annotate_cg.h - copied, changed from r262424, head/usr.sbin/pmcstat/pmcpl_annotate_cg.h Modified: stable/10/usr.sbin/pmcstat/Makefile stable/10/usr.sbin/pmcstat/pmcstat.8 stable/10/usr.sbin/pmcstat/pmcstat.c stable/10/usr.sbin/pmcstat/pmcstat.h stable/10/usr.sbin/pmcstat/pmcstat_log.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pmcstat/Makefile ============================================================================== --- stable/10/usr.sbin/pmcstat/Makefile Wed May 7 20:18:50 2014 (r265603) +++ stable/10/usr.sbin/pmcstat/Makefile Wed May 7 20:20:52 2014 (r265604) @@ -9,6 +9,7 @@ DPADD= ${LIBELF} ${LIBKVM} ${LIBPMC} ${L LDADD= -lelf -lkvm -lpmc -lm -lncurses SRCS= pmcstat.c pmcstat.h pmcstat_log.c \ -pmcpl_callgraph.c pmcpl_gprof.c pmcpl_annotate.c pmcpl_calltree.c +pmcpl_callgraph.c pmcpl_gprof.c pmcpl_annotate.c \ +pmcpl_annotate_cg.c pmcpl_calltree.c .include Copied and modified: stable/10/usr.sbin/pmcstat/pmcpl_annotate_cg.c (from r262424, head/usr.sbin/pmcstat/pmcpl_annotate_cg.c) ============================================================================== --- head/usr.sbin/pmcstat/pmcpl_annotate_cg.c Mon Feb 24 02:43:58 2014 (r262424, copy source) +++ stable/10/usr.sbin/pmcstat/pmcpl_annotate_cg.c Wed May 7 20:20:52 2014 (r265604) @@ -1,6 +1,7 @@ /*- * Copyright (c) 2005-2007, Joseph Koshy * Copyright (c) 2007 The FreeBSD Foundation + * Copyright (c) 2014, Adrian Chadd, Netflix Inc. * All rights reserved. * * Portions of this software were developed by A. Joseph Koshy under Copied and modified: stable/10/usr.sbin/pmcstat/pmcpl_annotate_cg.h (from r262424, head/usr.sbin/pmcstat/pmcpl_annotate_cg.h) ============================================================================== --- head/usr.sbin/pmcstat/pmcpl_annotate_cg.h Mon Feb 24 02:43:58 2014 (r262424, copy source) +++ stable/10/usr.sbin/pmcstat/pmcpl_annotate_cg.h Wed May 7 20:20:52 2014 (r265604) @@ -1,6 +1,7 @@ /*- * Copyright (c) 2005-2007, Joseph Koshy * Copyright (c) 2007 The FreeBSD Foundation + * Copyright (c) 2014, Adrian Chadd, Netflix Inc. * All rights reserved. * * Portions of this software were developed by A. Joseph Koshy under Modified: stable/10/usr.sbin/pmcstat/pmcstat.8 ============================================================================== --- stable/10/usr.sbin/pmcstat/pmcstat.8 Wed May 7 20:18:50 2014 (r265603) +++ stable/10/usr.sbin/pmcstat/pmcstat.8 Wed May 7 20:20:52 2014 (r265604) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 19, 2008 +.Dd April 29, 2014 .Dt PMCSTAT 8 .Os .Sh NAME @@ -46,6 +46,7 @@ .Op Fl S Ar event-spec .Op Fl T .Op Fl W +.Op Fl a Ar pathname .Op Fl c Ar cpu-spec .Op Fl d .Op Fl f Ar pluginopt @@ -221,6 +222,21 @@ This is an experimental feature intended dynamic behaviour of processes in the system. It may incur substantial overhead if enabled. The default is for this feature to be disabled. +.It Fl a Ar pathname +Perform a symbol and file:line lookup for each address in each +callgraph and save the output to +.Ar pathname . +Unlike +.Fl m +that only resolves the first symbol in the graph, this resolves +every node in the callgraph, or prints out addresses if no +lookup information is available. +This option requires the +.Fl R +option to read in samples that were previously collected and +saved with the +.Fl o +option. .It Fl c Ar cpu-spec Set the cpus for subsequent system mode PMCs specified on the command line to Modified: stable/10/usr.sbin/pmcstat/pmcstat.c ============================================================================== --- stable/10/usr.sbin/pmcstat/pmcstat.c Wed May 7 20:18:50 2014 (r265603) +++ stable/10/usr.sbin/pmcstat/pmcstat.c Wed May 7 20:20:52 2014 (r265604) @@ -503,6 +503,7 @@ pmcstat_show_usage(void) "\t -S spec\t allocate a system-wide sampling PMC\n" "\t -T\t\t start in top mode\n" "\t -W\t\t (toggle) show counts per context switch\n" + "\t -a \t print sampled PCs and callgraph to \"file\"\n" "\t -c cpu-list\t set cpus for subsequent system-wide PMCs\n" "\t -d\t\t (toggle) track descendants\n" "\t -f spec\t pass \"spec\" to as plugin option\n" @@ -617,8 +618,14 @@ main(int argc, char **argv) CPU_SET(hcpu, &cpumask); while ((option = getopt(argc, argv, - "CD:EF:G:M:NO:P:R:S:TWc:df:gk:m:n:o:p:qr:s:t:vw:z:")) != -1) + "CD:EF:G:M:NO:P:R:S:TWa:c:df:gk:m:n:o:p:qr:s:t:vw:z:")) != -1) switch (option) { + case 'a': /* Annotate + callgraph */ + args.pa_flags |= FLAG_DO_ANNOTATE; + args.pa_plugin = PMCSTAT_PL_ANNOTATE_CG; + graphfilename = optarg; + break; + case 'C': /* cumulative values */ use_cumulative_counts = !use_cumulative_counts; args.pa_required |= FLAG_HAS_COUNTING_PMCS; @@ -917,7 +924,8 @@ main(int argc, char **argv) /* -m option is allowed with -R only. */ if (args.pa_flags & FLAG_DO_ANNOTATE && args.pa_inputpath == NULL) - errx(EX_USAGE, "ERROR: option -m requires an input file"); + errx(EX_USAGE, "ERROR: option %s requires an input file", + args.pa_plugin == PMCSTAT_PL_ANNOTATE ? "-m" : "-a"); /* -m option is not allowed combined with -g or -G. */ if (args.pa_flags & FLAG_DO_ANNOTATE && Modified: stable/10/usr.sbin/pmcstat/pmcstat.h ============================================================================== --- stable/10/usr.sbin/pmcstat/pmcstat.h Wed May 7 20:18:50 2014 (r265603) +++ stable/10/usr.sbin/pmcstat/pmcstat.h Wed May 7 20:20:52 2014 (r265604) @@ -91,6 +91,7 @@ #define PMCSTAT_PL_GPROF 2 #define PMCSTAT_PL_ANNOTATE 3 #define PMCSTAT_PL_CALLTREE 4 +#define PMCSTAT_PL_ANNOTATE_CG 5 #define PMCSTAT_TOP_DELTA 0 #define PMCSTAT_TOP_ACCUM 1 Modified: stable/10/usr.sbin/pmcstat/pmcstat_log.c ============================================================================== --- stable/10/usr.sbin/pmcstat/pmcstat_log.c Wed May 7 20:18:50 2014 (r265603) +++ stable/10/usr.sbin/pmcstat/pmcstat_log.c Wed May 7 20:20:52 2014 (r265604) @@ -149,6 +149,7 @@ struct pmcstat_process *pmcstat_kernproc #include "pmcpl_gprof.h" #include "pmcpl_callgraph.h" #include "pmcpl_annotate.h" +#include "pmcpl_annotate_cg.h" #include "pmcpl_calltree.h" static struct pmc_plugins { @@ -214,6 +215,11 @@ static struct pmc_plugins { .pl_topdisplay = pmcpl_ct_topdisplay }, { + .pl_name = "annotate_cg", + .pl_process = pmcpl_annotate_cg_process + }, + + { .pl_name = NULL } }; From owner-svn-src-stable@FreeBSD.ORG Wed May 7 20:28:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D95E3E71; Wed, 7 May 2014 20:28:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3B11ADB; Wed, 7 May 2014 20:28:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47KSUgT069598; Wed, 7 May 2014 20:28:30 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47KSS7b069582; Wed, 7 May 2014 20:28:28 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201405072028.s47KSS7b069582@svn.freebsd.org> From: Scott Long Date: Wed, 7 May 2014 20:28:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265606 - in stable/10/sys: amd64/amd64 arm/arm i386/i386 i386/xen ia64/ia64 kern mips/mips powerpc/powerpc sparc64/sparc64 sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 20:28:30 -0000 Author: scottl Date: Wed May 7 20:28:27 2014 New Revision: 265606 URL: http://svnweb.freebsd.org/changeset/base/265606 Log: Merge r264984 Retire smp_active. It was racey and caused demonstrated problems with the cpufreq code. Replace its use with smp_started. There's at least one userland tool that still looks at the kern.smp.active sysctl, so preserve it but point it to smp_started as well. Obtained from: Netflix, Inc. Modified: stable/10/sys/amd64/amd64/mp_machdep.c stable/10/sys/amd64/amd64/vm_machdep.c stable/10/sys/arm/arm/mp_machdep.c stable/10/sys/i386/i386/mp_machdep.c stable/10/sys/i386/i386/vm_machdep.c stable/10/sys/i386/xen/mp_machdep.c stable/10/sys/ia64/ia64/mp_machdep.c stable/10/sys/kern/kern_cpu.c stable/10/sys/kern/subr_smp.c stable/10/sys/mips/mips/mp_machdep.c stable/10/sys/powerpc/powerpc/mp_machdep.c stable/10/sys/sparc64/sparc64/mp_machdep.c stable/10/sys/sys/smp.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/mp_machdep.c ============================================================================== --- stable/10/sys/amd64/amd64/mp_machdep.c Wed May 7 20:27:57 2014 (r265605) +++ stable/10/sys/amd64/amd64/mp_machdep.c Wed May 7 20:28:27 2014 (r265606) @@ -771,7 +771,6 @@ init_secondary(void) if (smp_cpus == mp_ncpus) { /* enable IPI's, tlb shootdown, freezes etc */ atomic_store_rel_int(&smp_started, 1); - smp_active = 1; /* historic */ } /* Modified: stable/10/sys/amd64/amd64/vm_machdep.c ============================================================================== --- stable/10/sys/amd64/amd64/vm_machdep.c Wed May 7 20:27:57 2014 (r265605) +++ stable/10/sys/amd64/amd64/vm_machdep.c Wed May 7 20:28:27 2014 (r265606) @@ -597,7 +597,7 @@ cpu_reset() cpuset_t map; u_int cnt; - if (smp_active) { + if (smp_started) { map = all_cpus; CPU_CLR(PCPU_GET(cpuid), &map); CPU_NAND(&map, &stopped_cpus); Modified: stable/10/sys/arm/arm/mp_machdep.c ============================================================================== --- stable/10/sys/arm/arm/mp_machdep.c Wed May 7 20:27:57 2014 (r265605) +++ stable/10/sys/arm/arm/mp_machdep.c Wed May 7 20:28:27 2014 (r265606) @@ -212,7 +212,6 @@ init_secondary(int cpu) if (smp_cpus == mp_ncpus) { /* enable IPI's, tlb shootdown, freezes etc */ atomic_store_rel_int(&smp_started, 1); - smp_active = 1; } mtx_unlock_spin(&ap_boot_mtx); Modified: stable/10/sys/i386/i386/mp_machdep.c ============================================================================== --- stable/10/sys/i386/i386/mp_machdep.c Wed May 7 20:27:57 2014 (r265605) +++ stable/10/sys/i386/i386/mp_machdep.c Wed May 7 20:28:27 2014 (r265606) @@ -805,7 +805,6 @@ init_secondary(void) if (smp_cpus == mp_ncpus) { /* enable IPI's, tlb shootdown, freezes etc */ atomic_store_rel_int(&smp_started, 1); - smp_active = 1; /* historic */ } mtx_unlock_spin(&ap_boot_mtx); Modified: stable/10/sys/i386/i386/vm_machdep.c ============================================================================== --- stable/10/sys/i386/i386/vm_machdep.c Wed May 7 20:27:57 2014 (r265605) +++ stable/10/sys/i386/i386/vm_machdep.c Wed May 7 20:28:27 2014 (r265606) @@ -619,7 +619,7 @@ cpu_reset() cpuset_t map; u_int cnt; - if (smp_active) { + if (smp_started) { map = all_cpus; CPU_CLR(PCPU_GET(cpuid), &map); CPU_NAND(&map, &stopped_cpus); Modified: stable/10/sys/i386/xen/mp_machdep.c ============================================================================== --- stable/10/sys/i386/xen/mp_machdep.c Wed May 7 20:27:57 2014 (r265605) +++ stable/10/sys/i386/xen/mp_machdep.c Wed May 7 20:28:27 2014 (r265606) @@ -655,7 +655,6 @@ init_secondary(void) if (smp_cpus == mp_ncpus) { /* enable IPI's, tlb shootdown, freezes etc */ atomic_store_rel_int(&smp_started, 1); - smp_active = 1; /* historic */ } mtx_unlock_spin(&ap_boot_mtx); Modified: stable/10/sys/ia64/ia64/mp_machdep.c ============================================================================== --- stable/10/sys/ia64/ia64/mp_machdep.c Wed May 7 20:27:57 2014 (r265605) +++ stable/10/sys/ia64/ia64/mp_machdep.c Wed May 7 20:28:27 2014 (r265606) @@ -455,7 +455,7 @@ cpu_mp_unleash(void *dummy) mp_ncpus, cpus, smp_cpus); } - smp_active = 1; + /* XXX Atomic set operation? */ smp_started = 1; /* Modified: stable/10/sys/kern/kern_cpu.c ============================================================================== --- stable/10/sys/kern/kern_cpu.c Wed May 7 20:27:57 2014 (r265605) +++ stable/10/sys/kern/kern_cpu.c Wed May 7 20:28:27 2014 (r265606) @@ -268,7 +268,7 @@ cf_set_method(device_t dev, const struct * switching the main CPU. XXXTODO: Need to think more about how to * handle having different CPUs at different frequencies. */ - if (mp_ncpus > 1 && !smp_active) { + if (mp_ncpus > 1 && !smp_started) { device_printf(dev, "rejecting change, SMP not started yet\n"); error = ENXIO; goto out; Modified: stable/10/sys/kern/subr_smp.c ============================================================================== --- stable/10/sys/kern/subr_smp.c Wed May 7 20:27:57 2014 (r265605) +++ stable/10/sys/kern/subr_smp.c Wed May 7 20:28:27 2014 (r265606) @@ -59,6 +59,9 @@ cpuset_t logical_cpus_mask; void (*cpustop_restartfunc)(void); #endif + +static int sysctl_kern_smp_active(SYSCTL_HANDLER_ARGS); + /* This is used in modules that need to work in both SMP and UP. */ cpuset_t all_cpus; @@ -78,9 +81,8 @@ SYSCTL_INT(_kern_smp, OID_AUTO, maxid, C SYSCTL_INT(_kern_smp, OID_AUTO, maxcpus, CTLFLAG_RD|CTLFLAG_CAPRD, &mp_maxcpus, 0, "Max number of CPUs that the system was compiled for."); -int smp_active = 0; /* are the APs allowed to run? */ -SYSCTL_INT(_kern_smp, OID_AUTO, active, CTLFLAG_RW, &smp_active, 0, - "Number of Auxillary Processors (APs) that were successfully started"); +SYSCTL_PROC(_kern_smp, OID_AUTO, active, CTLFLAG_RD | CTLTYPE_INT, NULL, 0, + sysctl_kern_smp_active, "I", "Indicates system is running in SMP mode"); int smp_disabled = 0; /* has smp been disabled? */ SYSCTL_INT(_kern_smp, OID_AUTO, disabled, CTLFLAG_RDTUN|CTLFLAG_CAPRD, @@ -831,3 +833,15 @@ quiesce_all_cpus(const char *wmesg, int return quiesce_cpus(all_cpus, wmesg, prio); } + +/* Extra care is taken with this sysctl because the data type is volatile */ +static int +sysctl_kern_smp_active(SYSCTL_HANDLER_ARGS) +{ + int error, active; + + active = smp_started; + error = SYSCTL_OUT(req, &active, sizeof(active)); + return (error); +} + Modified: stable/10/sys/mips/mips/mp_machdep.c ============================================================================== --- stable/10/sys/mips/mips/mp_machdep.c Wed May 7 20:27:57 2014 (r265605) +++ stable/10/sys/mips/mips/mp_machdep.c Wed May 7 20:28:27 2014 (r265606) @@ -317,7 +317,6 @@ smp_init_secondary(u_int32_t cpuid) if (smp_cpus == mp_ncpus) { atomic_store_rel_int(&smp_started, 1); - smp_active = 1; } mtx_unlock_spin(&ap_boot_mtx); Modified: stable/10/sys/powerpc/powerpc/mp_machdep.c ============================================================================== --- stable/10/sys/powerpc/powerpc/mp_machdep.c Wed May 7 20:27:57 2014 (r265605) +++ stable/10/sys/powerpc/powerpc/mp_machdep.c Wed May 7 20:28:27 2014 (r265606) @@ -267,7 +267,7 @@ cpu_mp_unleash(void *dummy) /* Let the APs get into the scheduler */ DELAY(10000); - smp_active = 1; + /* XXX Atomic set operation? */ smp_started = 1; } Modified: stable/10/sys/sparc64/sparc64/mp_machdep.c ============================================================================== --- stable/10/sys/sparc64/sparc64/mp_machdep.c Wed May 7 20:27:57 2014 (r265605) +++ stable/10/sys/sparc64/sparc64/mp_machdep.c Wed May 7 20:28:27 2014 (r265606) @@ -291,7 +291,6 @@ cpu_mp_start(void) KASSERT(!isjbus || mp_ncpus <= IDR_JALAPENO_MAX_BN_PAIRS, ("%s: can only IPI a maximum of %d JBus-CPUs", __func__, IDR_JALAPENO_MAX_BN_PAIRS)); - smp_active = 1; } static void Modified: stable/10/sys/sys/smp.h ============================================================================== --- stable/10/sys/sys/smp.h Wed May 7 20:27:57 2014 (r265605) +++ stable/10/sys/sys/smp.h Wed May 7 20:28:27 2014 (r265606) @@ -71,7 +71,6 @@ struct cpu_group *smp_topo_2level(int l2 struct cpu_group *smp_topo_find(struct cpu_group *top, int cpu); extern void (*cpustop_restartfunc)(void); -extern int smp_active; extern int smp_cpus; extern volatile cpuset_t started_cpus; extern volatile cpuset_t stopped_cpus; @@ -141,7 +140,7 @@ cpu_next(int i) * cpu_mp_start() will be called so that MP can be enabled. This function * should do things such as startup secondary processors. It should also * setup mp_ncpus, all_cpus, and smp_cpus. It should also ensure that - * smp_active and smp_started are initialized at the appropriate time. + * smp_started is initialized at the appropriate time. * Once cpu_mp_start() returns, machine independent MP startup code will be * executed and a simple message will be output to the console. Finally, * cpu_mp_announce() will be called so that machine dependent messages about From owner-svn-src-stable@FreeBSD.ORG Wed May 7 20:40:23 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D43A04E2; Wed, 7 May 2014 20:40:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF96ABC7; Wed, 7 May 2014 20:40:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47KeNqM074538; Wed, 7 May 2014 20:40:23 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47KeNkv074536; Wed, 7 May 2014 20:40:23 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201405072040.s47KeNkv074536@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 7 May 2014 20:40:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265608 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 20:40:24 -0000 Author: np Date: Wed May 7 20:40:23 2014 New Revision: 265608 URL: http://svnweb.freebsd.org/changeset/base/265608 Log: MFC r259569, r259770 (by joel@), and r263451. r259569: cxgbe.4: Belated update to the man page to reflect T5 support. r259770: mdoc: nuke whitespace. r263451: cxgbe(4): man page updates. Modified: stable/9/share/man/man4/cxgbe.4 Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/cxgbe.4 ============================================================================== --- stable/9/share/man/man4/cxgbe.4 Wed May 7 20:31:44 2014 (r265607) +++ stable/9/share/man/man4/cxgbe.4 Wed May 7 20:40:23 2014 (r265608) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2011-2012, Chelsio Inc +.\" Copyright (c) 2011-2014, Chelsio Inc .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -31,12 +31,12 @@ .\" .\" $FreeBSD$ .\" -.Dd February 25, 2012 +.Dd March 20, 2014 .Dt CXGBE 4 .Os .Sh NAME .Nm cxgbe -.Nd "Chelsio T4 10Gb and 1Gb Ethernet adapter driver" +.Nd "Chelsio T4 and T5 based 40Gb, 10Gb, and 1Gb Ethernet adapter driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -50,13 +50,14 @@ module at boot time, place the following .Xr loader.conf 5 : .Bd -literal -offset indent t4fw_cfg_load="YES" +t5fw_cfg_load="YES" if_cxgbe_load="YES" .Ed .Sh DESCRIPTION The .Nm driver provides support for PCI Express Ethernet adapters based on -the Chelsio Terminator 4 (T4) ASIC. +the Chelsio Terminator 4 and Terminator 5 ASICs (T4 and T5). The driver supports Jumbo Frames, Transmit/Receive checksum offload, TCP segmentation offload (TSO), Large Receive Offload (LRO), VLAN tag insertion/extraction, VLAN checksum offload, VLAN TSO, and @@ -65,11 +66,49 @@ For further hardware information and que requirements, see .Pa http://www.chelsio.com/ . .Pp +Note that ports of T5 cards are named cxl and attach to a t5nex parent device +(in contrast to ports named cxgbe that attach to a t4nex parent for a T4 card). +Loader tunables with the hw.cxgbe prefix apply to both T4 and T5 cards. +The sysctl MIBs are at dev.t5nex and dev.cxl for T5 cards and at dev.t4nex and +dev.cxgbe for T4 cards. +.Pp For more information on configuring this device, see .Xr ifconfig 8 . .Sh HARDWARE The .Nm +driver supports 40Gb, 10Gb and 1Gb Ethernet adapters based on the T5 ASIC +(ports will be named cxl): +.Pp +.Bl -bullet -compact +.It +Chelsio T580-CR +.It +Chelsio T580-LP-CR +.It +Chelsio T580-LP-SO-CR +.It +Chelsio T560-CR +.It +Chelsio T540-CR +.It +Chelsio T540-LP-CR +.It +Chelsio T522-CR +.It +Chelsio T520-LL-CR +.It +Chelsio T520-CR +.It +Chelsio T520-SO +.It +Chelsio T520-BT +.It +Chelsio T504-BT +.El +.Pp +The +.Nm driver supports 10Gb and 1Gb Ethernet adapters based on the T4 ASIC: .Pp .Bl -bullet -compact @@ -101,11 +140,11 @@ prompt before booting the kernel or stor .Xr loader.conf 5 . .Bl -tag -width indent .It Va hw.cxgbe.ntxq10g -The number of tx queues to use for a 10Gb port. +The number of tx queues to use for a 10Gb or 40Gb port. The default is 16 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.nrxq10g -The number of rx queues to use for a 10Gb port. +The number of rx queues to use for a 10Gb or 40Gb port. The default is 8 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.ntxq1g @@ -117,11 +156,11 @@ The number of rx queues to use for a 1Gb The default is 2 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.nofldtxq10g -The number of TOE tx queues to use for a 10Gb port. +The number of TOE tx queues to use for a 10Gb or 40Gb port. The default is 8 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.nofldrxq10g -The number of TOE rx queues to use for a 10Gb port. +The number of TOE rx queues to use for a 10Gb or 40Gb port. The default is 2 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.nofldtxq1g @@ -137,20 +176,18 @@ The timer index value to use to delay in The holdoff timer list has the values 1, 5, 10, 50, 100, and 200 by default (all values are in microseconds) and the index selects a value from this list. -The default value is 1 for both 10Gb and 1Gb ports, which means the -timer value is 5us. -Different cxgbe interfaces can be assigned different values at any time via the -dev.cxgbe.X.holdoff_tmr_idx sysctl. +The default value is 1 which means the timer value is 5us. +Different interfaces can be assigned different values at any time via the +dev.cxgbe.X.holdoff_tmr_idx or dev.cxl.X.holdoff_tmr_idx sysctl. .It Va hw.cxgbe.holdoff_pktc_idx_10G .It Va hw.cxgbe.holdoff_pktc_idx_1G The packet-count index value to use to delay interrupts. The packet-count list has the values 1, 8, 16, and 32 by default and the index selects a value from this list. -The default value is -1 for both 10Gb and 1Gb ports, which means packet -counting is disabled and interrupts are generated based solely on the -holdoff timer value. -Different cxgbe interfaces can be assigned different values via the -dev.cxgbe.X.holdoff_pktc_idx sysctl. +The default value is -1 which means packet counting is disabled and interrupts +are generated based solely on the holdoff timer value. +Different interfaces can be assigned different values via the +dev.cxgbe.X.holdoff_pktc_idx or dev.cxl.X.holdoff_pktc_idx sysctl. This sysctl works only when the interface has never been marked up (as done by ifconfig up). .It Va hw.cxgbe.qsize_txq @@ -161,16 +198,16 @@ software queuing. See .Xr ifnet 9 . The default value is 1024. -Different cxgbe interfaces can be assigned different values via the -dev.cxgbe.X.qsize_txq sysctl. +Different interfaces can be assigned different values via the +dev.cxgbe.X.qsize_txq sysctl or dev.cxl.X.qsize_txq sysctl. This sysctl works only when the interface has never been marked up (as done by ifconfig up). .It Va hw.cxgbe.qsize_rxq The size, in number of entries, of the descriptor ring used for an rx queue. The default value is 1024. -Different cxgbe interfaces can be assigned different values via the -dev.cxgbe.X.qsize_rxq sysctl. +Different interfaces can be assigned different values via the +dev.cxgbe.X.qsize_rxq or dev.cxl.X.qsize_rxq sysctl. This sysctl works only when the interface has never been marked up (as done by ifconfig up). .It Va hw.cxgbe.interrupt_types @@ -188,6 +225,43 @@ already on the card. long as it is compatible with the driver and is a different version than the one already on the card. The default is 1. +.It Va hw.cxgbe.fl_pktshift +The number of bytes of padding inserted before the begining of an Ethernet +frame in the receive buffer. +The default value of 2 ensures that the Ethernet payload (usually the IP header) +is at a 4 byte aligned address. +0-7 are all valid values. +.It Va hw.cxgbe.fl_pad +A non-zero value ensures that writes from the hardware to a receive buffer are +padded up to the specified boundary. +The default is -1 which lets the driver pick a pad boundary. +0 disables trailer padding completely. +.It Va hw.cxgbe.cong_drop +Controls the hardware response to congestion. +-1 disables congestion feedback and is not recommended. +0 instructs the hardware to backpressure its pipeline on congestion. +This usually results in the port emitting pause frames. +1 instructs the hardware to drop frames destined for congested queues. +.It Va hw.cxgbe.buffer_packing +Allow the hardware to deliver multiple frames in the same receive buffer +opportunistically. +The default is -1 which lets the driver decide. +0 or 1 explicitly disable or enable this feature. +.It Va hw.cxgbe.allow_mbufs_in_cluster +1 allows the driver to lay down one or more mbufs within the receive buffer +opportunistically. This is the default. +0 prohibits the driver from doing so. +.It Va hw.cxgbe.largest_rx_cluster +.It Va hw.cxgbe.safest_rx_cluster +Sizes of rx clusters. Each of these must be set to one of the sizes available +(usually 2048, 4096, 9216, and 16384) and largest_rx_cluster must be greater +than or equal to safest_rx_cluster. +The defaults are 16384 and 4096 respectively. +The driver will never attempt to allocate a receive buffer larger than +largest_rx_cluster and will fall back to allocating buffers of +safest_rx_cluster size if an allocation larger than safest_rx_cluster fails. +Note that largest_rx_cluster merely establishes a ceiling -- the driver is +allowed to allocate buffers of smaller sizes. .It Va hw.cxgbe.config_file Select a pre-packaged device configuration file. A configuration file contains a recipe for partitioning and configuring the @@ -195,7 +269,7 @@ hardware resources on the card. This tunable is for specialized applications only and should not be used in normal operation. The configuration profile currently in use is available in the dev.t4nex.X.cf -and dev.t4nex.X.cfcsum sysctls. +and dev.t4nex.X.cfcsum (dev.t5nex for T5 cards) sysctls. .It Va hw.cxgbe.linkcaps_allowed .It Va hw.cxgbe.niccaps_allowed .It Va hw.cxgbe.toecaps_allowed @@ -209,7 +283,7 @@ capability. This tunable is for specialized applications only and should not be used in normal operation. The capabilities for which hardware resources have been reserved are listed in -dev.t4nex.X.*caps sysctls. +dev.t4nex.X.*caps or dev.t5nex.X.*caps sysctls. .El .Sh SUPPORT For general information and support, @@ -231,6 +305,10 @@ The .Nm device driver first appeared in .Fx 9.0 . +Support for T5 cards first appeared in +.Fx 9.2 +and +.Fx 10.0 . .Sh AUTHORS .An -nosplit The From owner-svn-src-stable@FreeBSD.ORG Wed May 7 20:57:17 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 02C93ED8; Wed, 7 May 2014 20:57:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7F75D80; Wed, 7 May 2014 20:57:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47KvGNU082647; Wed, 7 May 2014 20:57:16 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47KvGn3082644; Wed, 7 May 2014 20:57:16 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201405072057.s47KvGn3082644@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 7 May 2014 20:57:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265610 - in stable/10/sys/dev/usb: . serial X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 20:57:17 -0000 Author: gavin Date: Wed May 7 20:57:16 2014 New Revision: 265610 URL: http://svnweb.freebsd.org/changeset/base/265610 Log: Merge r256782 from head: Add 26 new device IDs to uslcom(4). This brings us in sync with Linux v3.12 rc5 Modified: stable/10/sys/dev/usb/serial/uslcom.c stable/10/sys/dev/usb/usbdevs Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/serial/uslcom.c ============================================================================== --- stable/10/sys/dev/usb/serial/uslcom.c Wed May 7 20:50:16 2014 (r265609) +++ stable/10/sys/dev/usb/serial/uslcom.c Wed May 7 20:57:16 2014 (r265610) @@ -252,15 +252,37 @@ static const STRUCT_USB_HOST_ID uslcom_d USLCOM_DEV(JABLOTRON, PC60B), USLCOM_DEV(KAMSTRUP, OPTICALEYE), USLCOM_DEV(KAMSTRUP, MBUS_250D), + USLCOM_DEV(LAKESHORE, 121), + USLCOM_DEV(LAKESHORE, 218A), + USLCOM_DEV(LAKESHORE, 219), + USLCOM_DEV(LAKESHORE, 233), + USLCOM_DEV(LAKESHORE, 235), + USLCOM_DEV(LAKESHORE, 335), + USLCOM_DEV(LAKESHORE, 336), + USLCOM_DEV(LAKESHORE, 350), + USLCOM_DEV(LAKESHORE, 371), + USLCOM_DEV(LAKESHORE, 411), + USLCOM_DEV(LAKESHORE, 425), + USLCOM_DEV(LAKESHORE, 455A), + USLCOM_DEV(LAKESHORE, 465), + USLCOM_DEV(LAKESHORE, 475A), + USLCOM_DEV(LAKESHORE, 625A), + USLCOM_DEV(LAKESHORE, 642A), + USLCOM_DEV(LAKESHORE, 648), + USLCOM_DEV(LAKESHORE, 737), + USLCOM_DEV(LAKESHORE, 776), USLCOM_DEV(LINKINSTRUMENTS, MSO19), USLCOM_DEV(LINKINSTRUMENTS, MSO28), USLCOM_DEV(LINKINSTRUMENTS, MSO28_2), USLCOM_DEV(MEI, CASHFLOW_SC), USLCOM_DEV(MEI, S2000), + USLCOM_DEV(NETGEAR, M4100), USLCOM_DEV(OWEN, AC4), + USLCOM_DEV(OWL, CM_160), USLCOM_DEV(PHILIPS, ACE1001), USLCOM_DEV(PLX, CA42), USLCOM_DEV(RENESAS, RX610), + USLCOM_DEV(SEL, C662), USLCOM_DEV(SILABS, AC_SERV_CAN), USLCOM_DEV(SILABS, AC_SERV_CIS), USLCOM_DEV(SILABS, AC_SERV_IBUS), @@ -293,6 +315,7 @@ static const STRUCT_USB_HOST_ID uslcom_d USLCOM_DEV(SILABS, HELICOM), USLCOM_DEV(SILABS, IMS_USB_RS422), USLCOM_DEV(SILABS, INFINITY_MIC), + USLCOM_DEV(SILABS, INGENI_ZIGBEE), USLCOM_DEV(SILABS, INSYS_MODEM), USLCOM_DEV(SILABS, IRZ_SG10), USLCOM_DEV(SILABS, KYOCERA_GPS), @@ -300,6 +323,7 @@ static const STRUCT_USB_HOST_ID uslcom_d USLCOM_DEV(SILABS, LIPOWSKY_JTAG), USLCOM_DEV(SILABS, LIPOWSKY_LIN), USLCOM_DEV(SILABS, MC35PU), + USLCOM_DEV(SILABS, MMB_ZIGBEE), USLCOM_DEV(SILABS, MJS_TOSLINK), USLCOM_DEV(SILABS, MSD_DASHHAWK), USLCOM_DEV(SILABS, MULTIPLEX_RC), @@ -316,6 +340,7 @@ static const STRUCT_USB_HOST_ID uslcom_d USLCOM_DEV(SILABS, USBPULSE100), USLCOM_DEV(SILABS, USBSCOPE50), USLCOM_DEV(SILABS, USBWAVE12), + USLCOM_DEV(SILABS, V_PREON32), USLCOM_DEV(SILABS, VSTABI), USLCOM_DEV(SILABS, WAVIT), USLCOM_DEV(SILABS, WMRBATT), @@ -330,6 +355,7 @@ static const STRUCT_USB_HOST_ID uslcom_d USLCOM_DEV(VAISALA, CABLE), USLCOM_DEV(WAGO, SERVICECABLE), USLCOM_DEV(WAVESENSE, JAZZ), + USLCOM_DEV(WESTMOUNTAIN, RIGBLASTER_ADVANTAGE), USLCOM_DEV(WIENERPLEINBAUS, PL512), USLCOM_DEV(WIENERPLEINBAUS, RCM), USLCOM_DEV(WIENERPLEINBAUS, MPOD), Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Wed May 7 20:50:16 2014 (r265609) +++ stable/10/sys/dev/usb/usbdevs Wed May 7 20:57:16 2014 (r265610) @@ -569,6 +569,7 @@ vendor FALCOM 0x0f94 Falcom Wireless Co vendor RIM 0x0fca Research In Motion vendor DYNASTREAM 0x0fcf Dynastream Innovations vendor LARSENBRUSGAARD 0x0fd8 Larsen and Brusgaard +vendor OWL 0x0fde OWL vendor KONTRON 0x0fe6 Kontron AG vendor QUALCOMM 0x1004 Qualcomm vendor APACER 0x1005 Apacer @@ -697,6 +698,7 @@ vendor QUALCOMMINC 0x19d2 Qualcomm, Inco vendor BAYER 0x1a79 Bayer vendor WCH2 0x1a86 QinHeng Electronics vendor STELERA 0x1a8d Stelera Wireless +vendor SEL 0x1adb Schweitzer Engineering Laboratories vendor CORSAIR 0x1b1c Corsair vendor MATRIXORBITAL 0x1b3d Matrix Orbital vendor OVISLINK 0x1b75 OvisLink @@ -717,6 +719,7 @@ vendor METAGEEK2 0x1dd5 MetaGeek vendor ALINK 0x1e0e Alink vendor AIRTIES 0x1eda AirTies vendor FESTO 0x1e29 Festo +vendor LAKESHORE 0x1fb9 Lake Shore Cryotronics, Inc. vendor VERTEX 0x1fe7 Vertex Wireless Co., Ltd. vendor DLINK 0x2001 D-Link vendor PLANEX2 0x2019 Planex Communications @@ -732,6 +735,7 @@ vendor VIALABS 0x2109 VIA Labs vendor ERICSSON 0x2282 Ericsson vendor MOTOROLA2 0x22b8 Motorola vendor WETELECOM 0x22de WeTelecom +vendor WESTMOUNTAIN 0x2405 West Mountain Radio vendor TRIPPLITE 0x2478 Tripp-Lite vendor HIROSE 0x2631 Hirose Electric vendor NHJ 0x2770 NHJ @@ -2546,6 +2550,27 @@ product KYOCERA2 KPC680 0x180a Qualcomm product LACIE HD 0xa601 Hard Disk product LACIE CDRW 0xa602 CD R/W +/* Lake Shore Cryotronics products */ +product LAKESHORE 121 0x0100 121 Current Source +product LAKESHORE 218A 0x0200 218A Temperature Monitor +product LAKESHORE 219 0x0201 219 Temperature Monitor +product LAKESHORE 233 0x0202 233 Temperature Transmitter +product LAKESHORE 235 0x0203 235 Temperature Transmitter +product LAKESHORE 335 0x0300 335 Temperature Controller +product LAKESHORE 336 0x0301 336 Temperature Controller +product LAKESHORE 350 0x0302 350 Temperature Controller +product LAKESHORE 371 0x0303 371 AC Bridge +product LAKESHORE 411 0x0400 411 Handheld Gaussmeter +product LAKESHORE 425 0x0401 425 Gaussmeter +product LAKESHORE 455A 0x0402 455A DSP Gaussmeter +product LAKESHORE 475A 0x0403 475A DSP Gaussmeter +product LAKESHORE 465 0x0404 465 Gaussmeter +product LAKESHORE 625A 0x0600 625A Magnet PSU +product LAKESHORE 642A 0x0601 642A Magnet PSU +product LAKESHORE 648 0x0602 648 Magnet PSU +product LAKESHORE 737 0x0700 737 VSM Controller +product LAKESHORE 776 0x0701 776 Matrix Switch + /* Larsen and Brusgaard products */ product LARSENBRUSGAARD ALTITRACK 0x0001 FTDI compatible adapter @@ -3146,6 +3171,7 @@ product NETGEAR EA101 0x1001 Ethernet product NETGEAR EA101X 0x1002 Ethernet product NETGEAR FA101 0x1020 Ethernet 10/100, USB1.1 product NETGEAR FA120 0x1040 USB 2.0 Ethernet +product NETGEAR M4100 0x1100 M4100/M5300/M7100 series switch product NETGEAR WG111V2_2 0x4240 PrismGT USB 2.0 WLAN product NETGEAR WG111V3 0x4260 WG111v3 product NETGEAR WG111U 0x4300 WG111U @@ -3312,6 +3338,9 @@ product OTI DKU5 0x6858 DKU-5 Serial /* Owen.ru products */ product OWEN AC4 0x0004 AC4 USB-RS485 converter +/* OWL producs */ +product OWL CM_160 0xca05 OWL CM-160 power monitor + /* Palm Computing, Inc. product */ product PALM SERIAL 0x0080 USB Serial product PALM M500 0x0001 Palm m500 @@ -3763,6 +3792,9 @@ product SANYO SCP4900 0x0701 Sanyo SCP product SCANLOGIC SL11R 0x0002 SL11R IDE Adapter product SCANLOGIC 336CX 0x0300 Phantom 336CX - C3 scanner +/* Schweitzer Engineering Laboratories products */ +product SEL C662 0x0001 C662 Cable + /* Sealevel products */ product SEALEVEL 2101 0x2101 FTDI compatible adapter product SEALEVEL 2102 0x2102 FTDI compatible adapter @@ -4003,8 +4035,11 @@ product SILABS BEI_VCP 0x846e BEI USB S product SILABS BALLUFF_RFID 0x8477 Balluff RFID reader product SILABS AC_SERV_IBUS 0x85ea AC-Services IBUS Interface product SILABS AC_SERV_CIS 0x85eb AC-Services CIS-IBUS +product SILABS V_PREON32 0x85f8 Virtenio Preon32 product SILABS AC_SERV_CAN 0x8664 AC-Services CAN Interface product SILABS AC_SERV_OBD 0x8665 AC-Services OBD Interface +product SILABS MMB_ZIGBEE 0x88a4 MMB Networks ZigBee +product SILABS INGENI_ZIGBEE 0x88a5 Planet Innovation Ingeni ZigBee product SILABS CP2102 0xea60 SILABS USB UART product SILABS CP210X_2 0xea61 CP210x Serial product SILABS CP210X_3 0xea70 CP210x Serial @@ -4394,6 +4429,9 @@ product WCH2 CH341SER_2 0x5523 CH341/CH product WCH2 CH341SER 0x7523 CH341/CH340 USB-Serial Bridge product WCH2 U2M 0X752d CH345 USB2.0-MIDI +/* West Mountain Radio products */ +product WESTMOUNTAIN RIGBLASTER_ADVANTAGE 0x0003 RIGblaster Advantage + /* Western Digital products */ product WESTERN COMBO 0x0200 Firewire USB Combo product WESTERN EXTHDD 0x0400 External HDD From owner-svn-src-stable@FreeBSD.ORG Wed May 7 21:01:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C5E3B22D; Wed, 7 May 2014 21:01:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A984E11; Wed, 7 May 2014 21:01:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47L1a6e085990; Wed, 7 May 2014 21:01:36 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47L1aPn085985; Wed, 7 May 2014 21:01:36 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201405072101.s47L1aPn085985@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 7 May 2014 21:01:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265612 - stable/9/sys/dev/an X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 21:01:36 -0000 Author: gavin Date: Wed May 7 21:01:35 2014 New Revision: 265612 URL: http://svnweb.freebsd.org/changeset/base/265612 Log: Merge r259393 from head: Fix several panics when initialization of an ISA or PC-CARD device fails: o Assign sc->an_dev in an_probe() (which isn't really a probe function in the standard newbus sense) as we may need it for printing errors. o Use device_printf() rather than if_printf() in an_reset() - this is called from an_probe() long before the ifp structure is initialised in an_attach(). o Initialize the ifp structure early in an_attach() as we use if_printf() in cases where allocation of descriptors etc fails. Modified: stable/9/sys/dev/an/if_an.c stable/9/sys/dev/an/if_an_pccard.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/an/if_an.c ============================================================================== --- stable/9/sys/dev/an/if_an.c Wed May 7 21:00:09 2014 (r265611) +++ stable/9/sys/dev/an/if_an.c Wed May 7 21:01:35 2014 (r265612) @@ -357,6 +357,7 @@ an_probe(device_t dev) CSR_WRITE_2(sc, AN_INT_EN(sc->mpi350), 0); CSR_WRITE_2(sc, AN_EVENT_ACK(sc->mpi350), 0xFFFF); + sc->an_dev = dev; mtx_init(&sc->an_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, MTX_DEF); AN_LOCK(sc); @@ -685,6 +686,9 @@ an_attach(struct an_softc *sc, int flags device_printf(sc->an_dev, "can not if_alloc()\n"); goto fail; } + ifp->if_softc = sc; + if_initname(ifp, device_get_name(sc->an_dev), + device_get_unit(sc->an_dev)); sc->an_gone = 0; sc->an_associated = 0; @@ -758,9 +762,6 @@ an_attach(struct an_softc *sc, int flags #endif AN_UNLOCK(sc); - ifp->if_softc = sc; - if_initname(ifp, device_get_name(sc->an_dev), - device_get_unit(sc->an_dev)); ifp->if_mtu = ETHERMTU; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = an_ioctl; @@ -1388,7 +1389,7 @@ an_reset(struct an_softc *sc) an_cmd(sc, AN_CMD_NOOP2, 0); if (an_cmd(sc, AN_CMD_FORCE_SYNCLOSS, 0) == ETIMEDOUT) - if_printf(sc->an_ifp, "reset failed\n"); + device_printf(sc->an_dev, "reset failed\n"); an_cmd(sc, AN_CMD_DISABLE, 0); Modified: stable/9/sys/dev/an/if_an_pccard.c ============================================================================== --- stable/9/sys/dev/an/if_an_pccard.c Wed May 7 21:00:09 2014 (r265611) +++ stable/9/sys/dev/an/if_an_pccard.c Wed May 7 21:01:35 2014 (r265612) @@ -141,8 +141,6 @@ an_pccard_attach(device_t dev) an_alloc_irq(dev, sc->irq_rid, 0); - sc->an_dev = dev; - error = an_attach(sc, flags); if (error) goto fail; From owner-svn-src-stable@FreeBSD.ORG Wed May 7 21:38:34 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A21EED7; Wed, 7 May 2014 21:38:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1CD1715F; Wed, 7 May 2014 21:38:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47LcXbD000606; Wed, 7 May 2014 21:38:33 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47LcXCG000604; Wed, 7 May 2014 21:38:33 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201405072138.s47LcXCG000604@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 7 May 2014 21:38:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265614 - stable/10/sys/dev/an X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 21:38:34 -0000 Author: gavin Date: Wed May 7 21:38:33 2014 New Revision: 265614 URL: http://svnweb.freebsd.org/changeset/base/265614 Log: Merge r259393 from head: Fix several panics when initialization of an ISA or PC-CARD device fails: o Assign sc->an_dev in an_probe() (which isn't really a probe function in the standard newbus sense) as we may need it for printing errors. o Use device_printf() rather than if_printf() in an_reset() - this is called from an_probe() long before the ifp structure is initialised in an_attach(). o Initialize the ifp structure early in an_attach() as we use if_printf() in cases where allocation of descriptors etc fails. Modified: stable/10/sys/dev/an/if_an.c stable/10/sys/dev/an/if_an_pccard.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/an/if_an.c ============================================================================== --- stable/10/sys/dev/an/if_an.c Wed May 7 21:16:47 2014 (r265613) +++ stable/10/sys/dev/an/if_an.c Wed May 7 21:38:33 2014 (r265614) @@ -357,6 +357,7 @@ an_probe(device_t dev) CSR_WRITE_2(sc, AN_INT_EN(sc->mpi350), 0); CSR_WRITE_2(sc, AN_EVENT_ACK(sc->mpi350), 0xFFFF); + sc->an_dev = dev; mtx_init(&sc->an_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, MTX_DEF); AN_LOCK(sc); @@ -685,6 +686,9 @@ an_attach(struct an_softc *sc, int flags device_printf(sc->an_dev, "can not if_alloc()\n"); goto fail; } + ifp->if_softc = sc; + if_initname(ifp, device_get_name(sc->an_dev), + device_get_unit(sc->an_dev)); sc->an_gone = 0; sc->an_associated = 0; @@ -758,9 +762,6 @@ an_attach(struct an_softc *sc, int flags #endif AN_UNLOCK(sc); - ifp->if_softc = sc; - if_initname(ifp, device_get_name(sc->an_dev), - device_get_unit(sc->an_dev)); ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = an_ioctl; ifp->if_start = an_start; @@ -1387,7 +1388,7 @@ an_reset(struct an_softc *sc) an_cmd(sc, AN_CMD_NOOP2, 0); if (an_cmd(sc, AN_CMD_FORCE_SYNCLOSS, 0) == ETIMEDOUT) - if_printf(sc->an_ifp, "reset failed\n"); + device_printf(sc->an_dev, "reset failed\n"); an_cmd(sc, AN_CMD_DISABLE, 0); Modified: stable/10/sys/dev/an/if_an_pccard.c ============================================================================== --- stable/10/sys/dev/an/if_an_pccard.c Wed May 7 21:16:47 2014 (r265613) +++ stable/10/sys/dev/an/if_an_pccard.c Wed May 7 21:38:33 2014 (r265614) @@ -141,8 +141,6 @@ an_pccard_attach(device_t dev) an_alloc_irq(dev, sc->irq_rid, 0); - sc->an_dev = dev; - error = an_attach(sc, flags); if (error) goto fail; From owner-svn-src-stable@FreeBSD.ORG Wed May 7 21:39:01 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE4E38F; Wed, 7 May 2014 21:39:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DAF83163; Wed, 7 May 2014 21:39:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47Ld1LC000696; Wed, 7 May 2014 21:39:01 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47Ld15o000695; Wed, 7 May 2014 21:39:01 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201405072139.s47Ld15o000695@svn.freebsd.org> From: Glen Barber Date: Wed, 7 May 2014 21:39:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265615 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 21:39:02 -0000 Author: gjb Date: Wed May 7 21:39:01 2014 New Revision: 265615 URL: http://svnweb.freebsd.org/changeset/base/265615 Log: Document r264423, sh(1) changes in variable assignments with 'local', 'export', and 'readonly'. Helped by: jilles (thanks!) Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 7 21:38:33 2014 (r265614) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 7 21:39:01 2014 (r265615) @@ -568,6 +568,17 @@ &man.openpam.ttyconv.3; library has been completely rewritten. + The &man.sh.1; command interpreter has + been updated to expand assignments after + export, local, and + readonly differently. As result of this + change, variable assignment such as local + v=$1 will assign the first positional + parameter to v, even if + $1 contains spaces, and + local w=~/myfile + will expand the tilde (~). + &man.periodic.8; Scripts From owner-svn-src-stable@FreeBSD.ORG Wed May 7 21:46:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 470473E8; Wed, 7 May 2014 21:46:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33DFD20F; Wed, 7 May 2014 21:46:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47Lk7i3004613; Wed, 7 May 2014 21:46:07 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47Lk7C6004612; Wed, 7 May 2014 21:46:07 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201405072146.s47Lk7C6004612@svn.freebsd.org> From: Glen Barber Date: Wed, 7 May 2014 21:46:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265617 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 21:46:07 -0000 Author: gjb Date: Wed May 7 21:46:06 2014 New Revision: 265617 URL: http://svnweb.freebsd.org/changeset/base/265617 Log: Document r264699, find(1) -ignore_readdir_race Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 7 21:45:25 2014 (r265616) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 7 21:46:06 2014 (r265617) @@ -579,6 +579,14 @@ local w=~/myfile will expand the tilde (~). + The &man.find.1; utility has been + updated to implement -ignore_readdir_race. + Prior to this change, -ignore_readdir_race + existed as an option for GNU &man.find.1; compatibility, and + was ignored if specified. A counter primary, + -noignore_readdir_race now also exists, and + is the default behavior. + &man.periodic.8; Scripts From owner-svn-src-stable@FreeBSD.ORG Wed May 7 22:17:17 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 117F9410; Wed, 7 May 2014 22:17:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F067E6D2; Wed, 7 May 2014 22:17:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47MHG2a018374; Wed, 7 May 2014 22:17:16 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47MHGTm018373; Wed, 7 May 2014 22:17:16 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201405072217.s47MHGTm018373@svn.freebsd.org> From: Glen Barber Date: Wed, 7 May 2014 22:17:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265619 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 22:17:17 -0000 Author: gjb Date: Wed May 7 22:17:16 2014 New Revision: 265619 URL: http://svnweb.freebsd.org/changeset/base/265619 Log: Add a missing comma, and add a missing space. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 7 22:06:54 2014 (r265618) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 7 22:17:16 2014 (r265619) @@ -531,8 +531,8 @@ libmap32.conf has been added, for 32-bit applications. - The libucl library - a JSON-compatible configuration file parsing library,has been + The libucl library, + a JSON-compatible configuration file parsing library, has been imported. The &man.pkg.7; package management From owner-svn-src-stable@FreeBSD.ORG Wed May 7 22:27:04 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6025EC47; Wed, 7 May 2014 22:27:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CDBB829; Wed, 7 May 2014 22:27:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47MR4DI022575; Wed, 7 May 2014 22:27:04 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47MR4sQ022574; Wed, 7 May 2014 22:27:04 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201405072227.s47MR4sQ022574@svn.freebsd.org> From: Rick Macklem Date: Wed, 7 May 2014 22:27:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265620 - stable/10/sys/fs/nfsclient X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 22:27:04 -0000 Author: rmacklem Date: Wed May 7 22:27:03 2014 New Revision: 265620 URL: http://svnweb.freebsd.org/changeset/base/265620 Log: MFC: r264842 Modify the NFSv4 client's Pathconf RPC (actually a Getattr Op.) so that it only does the RPC for names that are answered by the RPC. Doing the RPC for other names is harmless, but unnecessary. Modified: stable/10/sys/fs/nfsclient/nfs_clvnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clvnops.c Wed May 7 22:17:16 2014 (r265619) +++ stable/10/sys/fs/nfsclient/nfs_clvnops.c Wed May 7 22:27:03 2014 (r265620) @@ -3430,12 +3430,15 @@ nfs_pathconf(struct vop_pathconf_args *a struct thread *td = curthread; int attrflag, error; - if (NFS_ISV4(vp) || (NFS_ISV3(vp) && (ap->a_name == _PC_LINK_MAX || + if ((NFS_ISV34(vp) && (ap->a_name == _PC_LINK_MAX || ap->a_name == _PC_NAME_MAX || ap->a_name == _PC_CHOWN_RESTRICTED || - ap->a_name == _PC_NO_TRUNC))) { + ap->a_name == _PC_NO_TRUNC)) || + (NFS_ISV4(vp) && ap->a_name == _PC_ACL_NFS4)) { /* * Since only the above 4 a_names are returned by the NFSv3 * Pathconf RPC, there is no point in doing it for others. + * For NFSv4, the Pathconf RPC (actually a Getattr Op.) can + * be used for _PC_NFS4_ACL as well. */ error = nfsrpc_pathconf(vp, &pc, td->td_ucred, td, &nfsva, &attrflag, NULL); From owner-svn-src-stable@FreeBSD.ORG Wed May 7 22:33:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96CEFF6D; Wed, 7 May 2014 22:33:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 697788D5; Wed, 7 May 2014 22:33:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47MXbeo026357; Wed, 7 May 2014 22:33:37 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47MXb41026356; Wed, 7 May 2014 22:33:37 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201405072233.s47MXb41026356@svn.freebsd.org> From: Rick Macklem Date: Wed, 7 May 2014 22:33:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265621 - stable/10/sys/fs/nfsserver X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 22:33:37 -0000 Author: rmacklem Date: Wed May 7 22:33:36 2014 New Revision: 265621 URL: http://svnweb.freebsd.org/changeset/base/265621 Log: MFC: r264845 Remove an unnecessary level of indirection for an argument. This simplifies the code and should avoid the clang sparc port from generating an abort() call. Modified: stable/10/sys/fs/nfsserver/nfs_nfsdstate.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- stable/10/sys/fs/nfsserver/nfs_nfsdstate.c Wed May 7 22:27:03 2014 (r265620) +++ stable/10/sys/fs/nfsserver/nfs_nfsdstate.c Wed May 7 22:33:36 2014 (r265621) @@ -79,7 +79,7 @@ static int nfsrv_getstate(struct nfsclie static void nfsrv_getowner(struct nfsstatehead *hp, struct nfsstate *new_stp, struct nfsstate **stpp); static int nfsrv_getlockfh(vnode_t vp, u_short flags, - struct nfslockfile **new_lfpp, fhandle_t *nfhp, NFSPROC_T *p); + struct nfslockfile *new_lfp, fhandle_t *nfhp, NFSPROC_T *p); static int nfsrv_getlockfile(u_short flags, struct nfslockfile **new_lfpp, struct nfslockfile **lfpp, fhandle_t *nfhp, int lockit); static void nfsrv_insertlock(struct nfslock *new_lop, @@ -1985,7 +1985,7 @@ tryagain: MALLOC(new_lfp, struct nfslockfile *, sizeof (struct nfslockfile), M_NFSDLOCKFILE, M_WAITOK); if (vp) - getfhret = nfsrv_getlockfh(vp, new_stp->ls_flags, &new_lfp, + getfhret = nfsrv_getlockfh(vp, new_stp->ls_flags, new_lfp, NULL, p); NFSLOCKSTATE(); /* @@ -2235,7 +2235,7 @@ tryagain: M_NFSDSTATE, M_WAITOK); MALLOC(new_deleg, struct nfsstate *, sizeof (struct nfsstate), M_NFSDSTATE, M_WAITOK); - getfhret = nfsrv_getlockfh(vp, new_stp->ls_flags, &new_lfp, + getfhret = nfsrv_getlockfh(vp, new_stp->ls_flags, new_lfp, NULL, p); NFSLOCKSTATE(); /* @@ -3142,11 +3142,10 @@ out: * Get the file handle for a lock structure. */ static int -nfsrv_getlockfh(vnode_t vp, u_short flags, - struct nfslockfile **new_lfpp, fhandle_t *nfhp, NFSPROC_T *p) +nfsrv_getlockfh(vnode_t vp, u_short flags, struct nfslockfile *new_lfp, + fhandle_t *nfhp, NFSPROC_T *p) { fhandle_t *fhp = NULL; - struct nfslockfile *new_lfp; int error; /* @@ -3154,7 +3153,7 @@ nfsrv_getlockfh(vnode_t vp, u_short flag * a fhandle_t on the stack. */ if (flags & NFSLCK_OPEN) { - new_lfp = *new_lfpp; + KASSERT(new_lfp != NULL, ("nfsrv_getlockfh: new_lfp NULL")); fhp = &new_lfp->lf_fh; } else if (nfhp) { fhp = nfhp; From owner-svn-src-stable@FreeBSD.ORG Thu May 8 06:55:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A002A8F; Thu, 8 May 2014 06:55:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80C1764B; Thu, 8 May 2014 06:55:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s486tne8045366; Thu, 8 May 2014 06:55:49 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s486tmAK045362; Thu, 8 May 2014 06:55:48 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405080655.s486tmAK045362@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 06:55:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265632 - in stable/10: sbin/camcontrol sys/cam sys/cam/scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 06:55:49 -0000 Author: mav Date: Thu May 8 06:55:48 2014 New Revision: 265632 URL: http://svnweb.freebsd.org/changeset/base/265632 Log: MFC r260509: Replace several instances of -1 with appropriate CAM_*_WILDCARD and types. It was equal before r259397, but for good or bad, not any more for LUNs. This change fixes at least CAM debugging. Modified: stable/10/sbin/camcontrol/camcontrol.c stable/10/sys/cam/cam_debug.h stable/10/sys/cam/cam_xpt.c stable/10/sys/cam/scsi/scsi_low.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/10/sbin/camcontrol/camcontrol.c Thu May 8 03:43:18 2014 (r265631) +++ stable/10/sbin/camcontrol/camcontrol.c Thu May 8 06:55:48 2014 (r265632) @@ -264,11 +264,12 @@ static int scsiinquiry(struct cam_device static int scsiserial(struct cam_device *device, int retry_count, int timeout); static int camxferrate(struct cam_device *device); #endif /* MINIMALISTIC */ -static int parse_btl(char *tstr, int *bus, int *target, int *lun, - cam_argmask *arglst); +static int parse_btl(char *tstr, path_id_t *bus, target_id_t *target, + lun_id_t *lun, cam_argmask *arglst); static int dorescan_or_reset(int argc, char **argv, int rescan); -static int rescan_or_reset_bus(int bus, int rescan); -static int scanlun_or_reset_dev(int bus, int target, int lun, int scan); +static int rescan_or_reset_bus(path_id_t bus, int rescan); +static int scanlun_or_reset_dev(path_id_t bus, target_id_t target, + lun_id_t lun, int scan); #ifndef MINIMALISTIC static int readdefects(struct cam_device *device, int argc, char **argv, char *combinedopt, int retry_count, int timeout); @@ -3019,7 +3020,8 @@ atasecurity(struct cam_device *device, i * Returns the number of parsed components, or 0. */ static int -parse_btl(char *tstr, int *bus, int *target, int *lun, cam_argmask *arglst) +parse_btl(char *tstr, path_id_t *bus, target_id_t *target, lun_id_t *lun, + cam_argmask *arglst) { char *tmpstr; int convs = 0; @@ -3055,7 +3057,9 @@ dorescan_or_reset(int argc, char **argv, static const char must[] = "you must specify \"all\", a bus, or a bus:target:lun to %s"; int rv, error = 0; - int bus = -1, target = -1, lun = -1; + path_id_t bus = CAM_BUS_WILDCARD; + target_id_t target = CAM_TARGET_WILDCARD; + lun_id_t lun = CAM_LUN_WILDCARD; char *tstr; if (argc < 3) { @@ -3087,7 +3091,7 @@ dorescan_or_reset(int argc, char **argv, } static int -rescan_or_reset_bus(int bus, int rescan) +rescan_or_reset_bus(path_id_t bus, int rescan) { union ccb ccb, matchccb; int fd, retval; @@ -3101,7 +3105,7 @@ rescan_or_reset_bus(int bus, int rescan) return(1); } - if (bus != -1) { + if (bus != CAM_BUS_WILDCARD) { ccb.ccb_h.func_code = rescan ? XPT_SCAN_BUS : XPT_RESET_BUS; ccb.ccb_h.path_id = bus; ccb.ccb_h.target_id = CAM_TARGET_WILDCARD; @@ -3201,7 +3205,7 @@ rescan_or_reset_bus(int bus, int rescan) * We don't want to rescan or reset the xpt bus. * See above. */ - if ((int)bus_result->path_id == -1) + if (bus_result->path_id == CAM_XPT_PATH_ID) continue; ccb.ccb_h.func_code = rescan ? XPT_SCAN_BUS : @@ -3254,7 +3258,7 @@ bailout: } static int -scanlun_or_reset_dev(int bus, int target, int lun, int scan) +scanlun_or_reset_dev(path_id_t bus, target_id_t target, lun_id_t lun, int scan) { union ccb ccb; struct cam_device *device; @@ -3262,18 +3266,18 @@ scanlun_or_reset_dev(int bus, int target device = NULL; - if (bus < 0) { + if (bus == CAM_BUS_WILDCARD) { warnx("invalid bus number %d", bus); return(1); } - if (target < 0) { + if (target == CAM_TARGET_WILDCARD) { warnx("invalid target number %d", target); return(1); } - if (lun < 0) { - warnx("invalid lun number %d", lun); + if (lun == CAM_LUN_WILDCARD) { + warnx("invalid lun number %jx", (uintmax_t)lun); return(1); } @@ -3331,12 +3335,12 @@ scanlun_or_reset_dev(int bus, int target if (((ccb.ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) || ((!scan) && ((ccb.ccb_h.status & CAM_STATUS_MASK) == CAM_BDR_SENT))) { - fprintf(stdout, "%s of %d:%d:%d was successful\n", - scan? "Re-scan" : "Reset", bus, target, lun); + fprintf(stdout, "%s of %d:%d:%jx was successful\n", + scan? "Re-scan" : "Reset", bus, target, (uintmax_t)lun); return(0); } else { - fprintf(stdout, "%s of %d:%d:%d returned error %#x\n", - scan? "Re-scan" : "Reset", bus, target, lun, + fprintf(stdout, "%s of %d:%d:%jx returned error %#x\n", + scan? "Re-scan" : "Reset", bus, target, (uintmax_t)lun, ccb.ccb_h.status & CAM_STATUS_MASK); return(1); } @@ -4218,7 +4222,9 @@ static int camdebug(int argc, char **argv, char *combinedopt) { int c, fd; - int bus = -1, target = -1, lun = -1; + path_id_t bus = CAM_BUS_WILDCARD; + target_id_t target = CAM_TARGET_WILDCARD; + lun_id_t lun = CAM_LUN_WILDCARD; char *tstr, *tmpstr = NULL; union ccb ccb; int error = 0; @@ -4338,8 +4344,8 @@ camdebug(int argc, char **argv, char *co } else { fprintf(stderr, "Debugging enabled for " - "%d:%d:%d\n", - bus, target, lun); + "%d:%d:%jx\n", + bus, target, (uintmax_t)lun); } } } @@ -7986,7 +7992,9 @@ main(int argc, char **argv) int error = 0, optstart = 2; int devopen = 1; #ifndef MINIMALISTIC - int bus, target, lun; + path_id_t bus; + target_id_t target; + lun_id_t lun; #endif /* MINIMALISTIC */ cmdlist = CAM_CMD_NONE; Modified: stable/10/sys/cam/cam_debug.h ============================================================================== --- stable/10/sys/cam/cam_debug.h Thu May 8 03:43:18 2014 (r265631) +++ stable/10/sys/cam/cam_debug.h Thu May 8 06:55:48 2014 (r265632) @@ -61,13 +61,13 @@ typedef enum { #endif #ifndef CAM_DEBUG_BUS -#define CAM_DEBUG_BUS (-1) +#define CAM_DEBUG_BUS CAM_BUS_WILDCARD #endif #ifndef CAM_DEBUG_TARGET -#define CAM_DEBUG_TARGET (-1) +#define CAM_DEBUG_TARGET CAM_TARGET_WILDCARD #endif #ifndef CAM_DEBUG_LUN -#define CAM_DEBUG_LUN (-1) +#define CAM_DEBUG_LUN CAM_LUN_WILDCARD #endif #ifndef CAM_DEBUG_DELAY Modified: stable/10/sys/cam/cam_xpt.c ============================================================================== --- stable/10/sys/cam/cam_xpt.c Thu May 8 03:43:18 2014 (r265631) +++ stable/10/sys/cam/cam_xpt.c Thu May 8 06:55:48 2014 (r265632) @@ -1992,13 +1992,15 @@ xptplistperiphfunc(struct cam_periph *pe cdm->matches[j].result.periph_result.target_id = periph->path->target->target_id; else - cdm->matches[j].result.periph_result.target_id = -1; + cdm->matches[j].result.periph_result.target_id = + CAM_TARGET_WILDCARD; if (periph->path->device) cdm->matches[j].result.periph_result.target_lun = periph->path->device->lun_id; else - cdm->matches[j].result.periph_result.target_lun = -1; + cdm->matches[j].result.periph_result.target_lun = + CAM_LUN_WILDCARD; cdm->matches[j].result.periph_result.unit_number = periph->unit_number; Modified: stable/10/sys/cam/scsi/scsi_low.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_low.c Thu May 8 03:43:18 2014 (r265631) +++ stable/10/sys/cam/scsi/scsi_low.c Thu May 8 06:55:48 2014 (r265632) @@ -4232,7 +4232,7 @@ scsi_low_print(slp, ti) if (ti != NULL) { u_int flags = 0, maxnqio = 0, nqio = 0; - int lun = -1; + int lun = CAM_LUN_WILDCARD; if (li != NULL) { From owner-svn-src-stable@FreeBSD.ORG Thu May 8 06:57:00 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84F001D1; Thu, 8 May 2014 06:57:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66A7365C; Thu, 8 May 2014 06:57:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s486v0vq045543; Thu, 8 May 2014 06:57:00 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s486uxmi045532; Thu, 8 May 2014 06:56:59 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405080656.s486uxmi045532@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 06:56:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265633 - in stable/9: sbin/camcontrol sys/cam sys/cam/scsi X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 06:57:00 -0000 Author: mav Date: Thu May 8 06:56:59 2014 New Revision: 265633 URL: http://svnweb.freebsd.org/changeset/base/265633 Log: MFC r260509: Replace several instances of -1 with appropriate CAM_*_WILDCARD and types. It was equal before r259397, but for good or bad, not any more for LUNs. This change fixes at least CAM debugging. Modified: stable/9/sbin/camcontrol/camcontrol.c stable/9/sys/cam/cam_debug.h stable/9/sys/cam/cam_xpt.c stable/9/sys/cam/scsi/scsi_low.c Directory Properties: stable/9/ (props changed) stable/9/sbin/ (props changed) stable/9/sbin/camcontrol/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/9/sbin/camcontrol/camcontrol.c Thu May 8 06:55:48 2014 (r265632) +++ stable/9/sbin/camcontrol/camcontrol.c Thu May 8 06:56:59 2014 (r265633) @@ -264,11 +264,12 @@ static int scsiinquiry(struct cam_device static int scsiserial(struct cam_device *device, int retry_count, int timeout); static int camxferrate(struct cam_device *device); #endif /* MINIMALISTIC */ -static int parse_btl(char *tstr, int *bus, int *target, int *lun, - cam_argmask *arglst); +static int parse_btl(char *tstr, path_id_t *bus, target_id_t *target, + lun_id_t *lun, cam_argmask *arglst); static int dorescan_or_reset(int argc, char **argv, int rescan); -static int rescan_or_reset_bus(int bus, int rescan); -static int scanlun_or_reset_dev(int bus, int target, int lun, int scan); +static int rescan_or_reset_bus(path_id_t bus, int rescan); +static int scanlun_or_reset_dev(path_id_t bus, target_id_t target, + lun_id_t lun, int scan); #ifndef MINIMALISTIC static int readdefects(struct cam_device *device, int argc, char **argv, char *combinedopt, int retry_count, int timeout); @@ -3001,7 +3002,8 @@ atasecurity(struct cam_device *device, i * Returns the number of parsed components, or 0. */ static int -parse_btl(char *tstr, int *bus, int *target, int *lun, cam_argmask *arglst) +parse_btl(char *tstr, path_id_t *bus, target_id_t *target, lun_id_t *lun, + cam_argmask *arglst) { char *tmpstr; int convs = 0; @@ -3037,7 +3039,9 @@ dorescan_or_reset(int argc, char **argv, static const char must[] = "you must specify \"all\", a bus, or a bus:target:lun to %s"; int rv, error = 0; - int bus = -1, target = -1, lun = -1; + path_id_t bus = CAM_BUS_WILDCARD; + target_id_t target = CAM_TARGET_WILDCARD; + lun_id_t lun = CAM_LUN_WILDCARD; char *tstr; if (argc < 3) { @@ -3069,7 +3073,7 @@ dorescan_or_reset(int argc, char **argv, } static int -rescan_or_reset_bus(int bus, int rescan) +rescan_or_reset_bus(path_id_t bus, int rescan) { union ccb ccb, matchccb; int fd, retval; @@ -3083,7 +3087,7 @@ rescan_or_reset_bus(int bus, int rescan) return(1); } - if (bus != -1) { + if (bus != CAM_BUS_WILDCARD) { ccb.ccb_h.func_code = rescan ? XPT_SCAN_BUS : XPT_RESET_BUS; ccb.ccb_h.path_id = bus; ccb.ccb_h.target_id = CAM_TARGET_WILDCARD; @@ -3183,7 +3187,7 @@ rescan_or_reset_bus(int bus, int rescan) * We don't want to rescan or reset the xpt bus. * See above. */ - if ((int)bus_result->path_id == -1) + if (bus_result->path_id == CAM_XPT_PATH_ID) continue; ccb.ccb_h.func_code = rescan ? XPT_SCAN_BUS : @@ -3236,7 +3240,7 @@ bailout: } static int -scanlun_or_reset_dev(int bus, int target, int lun, int scan) +scanlun_or_reset_dev(path_id_t bus, target_id_t target, lun_id_t lun, int scan) { union ccb ccb; struct cam_device *device; @@ -3244,18 +3248,18 @@ scanlun_or_reset_dev(int bus, int target device = NULL; - if (bus < 0) { + if (bus == CAM_BUS_WILDCARD) { warnx("invalid bus number %d", bus); return(1); } - if (target < 0) { + if (target == CAM_TARGET_WILDCARD) { warnx("invalid target number %d", target); return(1); } - if (lun < 0) { - warnx("invalid lun number %d", lun); + if (lun == CAM_LUN_WILDCARD) { + warnx("invalid lun number %jx", (uintmax_t)lun); return(1); } @@ -3313,12 +3317,12 @@ scanlun_or_reset_dev(int bus, int target if (((ccb.ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) || ((!scan) && ((ccb.ccb_h.status & CAM_STATUS_MASK) == CAM_BDR_SENT))) { - fprintf(stdout, "%s of %d:%d:%d was successful\n", - scan? "Re-scan" : "Reset", bus, target, lun); + fprintf(stdout, "%s of %d:%d:%jx was successful\n", + scan? "Re-scan" : "Reset", bus, target, (uintmax_t)lun); return(0); } else { - fprintf(stdout, "%s of %d:%d:%d returned error %#x\n", - scan? "Re-scan" : "Reset", bus, target, lun, + fprintf(stdout, "%s of %d:%d:%jx returned error %#x\n", + scan? "Re-scan" : "Reset", bus, target, (uintmax_t)lun, ccb.ccb_h.status & CAM_STATUS_MASK); return(1); } @@ -4200,7 +4204,9 @@ static int camdebug(int argc, char **argv, char *combinedopt) { int c, fd; - int bus = -1, target = -1, lun = -1; + path_id_t bus = CAM_BUS_WILDCARD; + target_id_t target = CAM_TARGET_WILDCARD; + lun_id_t lun = CAM_LUN_WILDCARD; char *tstr, *tmpstr = NULL; union ccb ccb; int error = 0; @@ -4320,8 +4326,8 @@ camdebug(int argc, char **argv, char *co } else { fprintf(stderr, "Debugging enabled for " - "%d:%d:%d\n", - bus, target, lun); + "%d:%d:%jx\n", + bus, target, (uintmax_t)lun); } } } @@ -7967,7 +7973,9 @@ main(int argc, char **argv) int error = 0, optstart = 2; int devopen = 1; #ifndef MINIMALISTIC - int bus, target, lun; + path_id_t bus; + target_id_t target; + lun_id_t lun; #endif /* MINIMALISTIC */ cmdlist = CAM_CMD_NONE; Modified: stable/9/sys/cam/cam_debug.h ============================================================================== --- stable/9/sys/cam/cam_debug.h Thu May 8 06:55:48 2014 (r265632) +++ stable/9/sys/cam/cam_debug.h Thu May 8 06:56:59 2014 (r265633) @@ -61,13 +61,13 @@ typedef enum { #endif #ifndef CAM_DEBUG_BUS -#define CAM_DEBUG_BUS (-1) +#define CAM_DEBUG_BUS CAM_BUS_WILDCARD #endif #ifndef CAM_DEBUG_TARGET -#define CAM_DEBUG_TARGET (-1) +#define CAM_DEBUG_TARGET CAM_TARGET_WILDCARD #endif #ifndef CAM_DEBUG_LUN -#define CAM_DEBUG_LUN (-1) +#define CAM_DEBUG_LUN CAM_LUN_WILDCARD #endif #ifndef CAM_DEBUG_DELAY Modified: stable/9/sys/cam/cam_xpt.c ============================================================================== --- stable/9/sys/cam/cam_xpt.c Thu May 8 06:55:48 2014 (r265632) +++ stable/9/sys/cam/cam_xpt.c Thu May 8 06:56:59 2014 (r265633) @@ -2006,13 +2006,15 @@ xptplistperiphfunc(struct cam_periph *pe cdm->matches[j].result.periph_result.target_id = periph->path->target->target_id; else - cdm->matches[j].result.periph_result.target_id = -1; + cdm->matches[j].result.periph_result.target_id = + CAM_TARGET_WILDCARD; if (periph->path->device) cdm->matches[j].result.periph_result.target_lun = periph->path->device->lun_id; else - cdm->matches[j].result.periph_result.target_lun = -1; + cdm->matches[j].result.periph_result.target_lun = + CAM_LUN_WILDCARD; cdm->matches[j].result.periph_result.unit_number = periph->unit_number; Modified: stable/9/sys/cam/scsi/scsi_low.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_low.c Thu May 8 06:55:48 2014 (r265632) +++ stable/9/sys/cam/scsi/scsi_low.c Thu May 8 06:56:59 2014 (r265633) @@ -4762,7 +4762,7 @@ scsi_low_print(slp, ti) if (ti != NULL) { u_int flags = 0, maxnqio = 0, nqio = 0; - int lun = -1; + int lun = CAM_LUN_WILDCARD; if (li != NULL) { From owner-svn-src-stable@FreeBSD.ORG Thu May 8 07:00:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BA37634E; Thu, 8 May 2014 07:00:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A5C68690; Thu, 8 May 2014 07:00:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4870lQW046210; Thu, 8 May 2014 07:00:47 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4870kOs046200; Thu, 8 May 2014 07:00:46 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405080700.s4870kOs046200@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 07:00:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265634 - in stable/10/sys/cam: ctl scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 07:00:47 -0000 Author: mav Date: Thu May 8 07:00:45 2014 New Revision: 265634 URL: http://svnweb.freebsd.org/changeset/base/265634 Log: MFC r264274, r264279, r264283, r264296, r264297: Add support for SCSI UNMAP commands to CTL. This patch adds support for three new SCSI commands: UNMAP, WRITE SAME(10) and WRITE SAME(16). WRITE SAME commands support both normal write mode and UNMAP flag. To properly report UNMAP capabilities this patch also adds support for reporting two new VPD pages: Block limits and Logical Block Provisioning. UNMAP support can be enabled per-LUN by adding "-o unmap=on" to `ctladm create` command line or "option unmap on" to lun sections of /etc/ctl.conf. At this moment UNMAP supported for ramdisks and device-backed block LUNs. It was tested to work great with ZFS ZVOLs. For file-backed LUNs UNMAP support is unfortunately missing due to absence of respective VFS KPI. Sponsored by: iXsystems, Inc Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_backend.h stable/10/sys/cam/ctl/ctl_backend_block.c stable/10/sys/cam/ctl/ctl_backend_ramdisk.c stable/10/sys/cam/ctl/ctl_cmd_table.c stable/10/sys/cam/ctl/ctl_io.h stable/10/sys/cam/ctl/ctl_private.h stable/10/sys/cam/ctl/ctl_ser_table.c stable/10/sys/cam/scsi/scsi_all.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Thu May 8 06:56:59 2014 (r265633) +++ stable/10/sys/cam/ctl/ctl.c Thu May 8 07:00:45 2014 (r265634) @@ -331,9 +331,10 @@ SYSCTL_INT(_kern_cam_ctl, OID_AUTO, verb &verbose, 0, "Show SCSI errors returned to initiator"); /* - * Serial number (0x80), device id (0x83), and supported pages (0x00) + * Serial number (0x80), device id (0x83), supported pages (0x00), + * Block limits (0xB0) and Logical Block Provisioning (0xB2) */ -#define SCSI_EVPD_NUM_SUPPORTED_PAGES 3 +#define SCSI_EVPD_NUM_SUPPORTED_PAGES 5 static void ctl_isc_event_handler(ctl_ha_channel chanel, ctl_ha_event event, int param); @@ -391,6 +392,9 @@ static void ctl_hndl_per_res_out_on_othe static int ctl_inquiry_evpd_supported(struct ctl_scsiio *ctsio, int alloc_len); static int ctl_inquiry_evpd_serial(struct ctl_scsiio *ctsio, int alloc_len); static int ctl_inquiry_evpd_devid(struct ctl_scsiio *ctsio, int alloc_len); +static int ctl_inquiry_evpd_block_limits(struct ctl_scsiio *ctsio, + int alloc_len); +static int ctl_inquiry_evpd_lbp(struct ctl_scsiio *ctsio, int alloc_len); static int ctl_inquiry_evpd(struct ctl_scsiio *ctsio); static int ctl_inquiry_std(struct ctl_scsiio *ctsio); static int ctl_get_lba_len(union ctl_io *io, uint64_t *lba, uint32_t *len); @@ -5787,6 +5791,195 @@ ctl_write_buffer(struct ctl_scsiio *ctsi return (CTL_RETVAL_COMPLETE); } +int +ctl_write_same(struct ctl_scsiio *ctsio) +{ + struct ctl_lun *lun; + struct ctl_lba_len_flags lbalen; + uint64_t lba; + uint32_t num_blocks; + int len, retval; + uint8_t byte2; + + retval = CTL_RETVAL_COMPLETE; + + CTL_DEBUG_PRINT(("ctl_write_same\n")); + + lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + + switch (ctsio->cdb[0]) { + case WRITE_SAME_10: { + struct scsi_write_same_10 *cdb; + + cdb = (struct scsi_write_same_10 *)ctsio->cdb; + + lba = scsi_4btoul(cdb->addr); + num_blocks = scsi_2btoul(cdb->length); + byte2 = cdb->byte2; + break; + } + case WRITE_SAME_16: { + struct scsi_write_same_16 *cdb; + + cdb = (struct scsi_write_same_16 *)ctsio->cdb; + + lba = scsi_8btou64(cdb->addr); + num_blocks = scsi_4btoul(cdb->length); + byte2 = cdb->byte2; + break; + } + default: + /* + * We got a command we don't support. This shouldn't + * happen, commands should be filtered out above us. + */ + ctl_set_invalid_opcode(ctsio); + ctl_done((union ctl_io *)ctsio); + + return (CTL_RETVAL_COMPLETE); + break; /* NOTREACHED */ + } + + /* + * The first check is to make sure we're in bounds, the second + * check is to catch wrap-around problems. If the lba + num blocks + * is less than the lba, then we've wrapped around and the block + * range is invalid anyway. + */ + if (((lba + num_blocks) > (lun->be_lun->maxlba + 1)) + || ((lba + num_blocks) < lba)) { + ctl_set_lba_out_of_range(ctsio); + ctl_done((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); + } + + /* Zero number of blocks means "to the last logical block" */ + if (num_blocks == 0) { + if ((lun->be_lun->maxlba + 1) - lba > UINT32_MAX) { + ctl_set_invalid_field(ctsio, + /*sks_valid*/ 0, + /*command*/ 1, + /*field*/ 0, + /*bit_valid*/ 0, + /*bit*/ 0); + ctl_done((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); + } + num_blocks = (lun->be_lun->maxlba + 1) - lba; + } + + len = lun->be_lun->blocksize; + + /* + * If we've got a kernel request that hasn't been malloced yet, + * malloc it and tell the caller the data buffer is here. + */ + if ((ctsio->io_hdr.flags & CTL_FLAG_ALLOCATED) == 0) { + ctsio->kern_data_ptr = malloc(len, M_CTL, M_WAITOK);; + ctsio->kern_data_len = len; + ctsio->kern_total_len = len; + ctsio->kern_data_resid = 0; + ctsio->kern_rel_offset = 0; + ctsio->kern_sg_entries = 0; + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; + ctsio->be_move_done = ctl_config_move_done; + ctl_datamove((union ctl_io *)ctsio); + + return (CTL_RETVAL_COMPLETE); + } + + lbalen.lba = lba; + lbalen.len = num_blocks; + lbalen.flags = byte2; + memcpy(ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes, &lbalen, + sizeof(lbalen)); + retval = lun->backend->config_write((union ctl_io *)ctsio); + + return (retval); +} + +int +ctl_unmap(struct ctl_scsiio *ctsio) +{ + struct ctl_lun *lun; + struct scsi_unmap *cdb; + struct ctl_ptr_len_flags ptrlen; + struct scsi_unmap_header *hdr; + struct scsi_unmap_desc *buf, *end; + uint64_t lba; + uint32_t num_blocks; + int len, retval; + uint8_t byte2; + + retval = CTL_RETVAL_COMPLETE; + + CTL_DEBUG_PRINT(("ctl_unmap\n")); + + lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + cdb = (struct scsi_unmap *)ctsio->cdb; + + len = scsi_2btoul(cdb->length); + byte2 = cdb->byte2; + + /* + * If we've got a kernel request that hasn't been malloced yet, + * malloc it and tell the caller the data buffer is here. + */ + if ((ctsio->io_hdr.flags & CTL_FLAG_ALLOCATED) == 0) { + ctsio->kern_data_ptr = malloc(len, M_CTL, M_WAITOK);; + ctsio->kern_data_len = len; + ctsio->kern_total_len = len; + ctsio->kern_data_resid = 0; + ctsio->kern_rel_offset = 0; + ctsio->kern_sg_entries = 0; + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; + ctsio->be_move_done = ctl_config_move_done; + ctl_datamove((union ctl_io *)ctsio); + + return (CTL_RETVAL_COMPLETE); + } + + len = ctsio->kern_total_len - ctsio->kern_data_resid; + hdr = (struct scsi_unmap_header *)ctsio->kern_data_ptr; + if (len < sizeof (*hdr) || + len < (scsi_2btoul(hdr->length) + sizeof(hdr->length)) || + len < (scsi_2btoul(hdr->desc_length) + sizeof (*hdr)) || + scsi_2btoul(hdr->desc_length) % sizeof(*buf) != 0) { + ctl_set_invalid_field(ctsio, + /*sks_valid*/ 0, + /*command*/ 0, + /*field*/ 0, + /*bit_valid*/ 0, + /*bit*/ 0); + ctl_done((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); + } + len = scsi_2btoul(hdr->desc_length); + buf = (struct scsi_unmap_desc *)(hdr + 1); + end = buf + len / sizeof(*buf); + + ptrlen.ptr = (void *)buf; + ptrlen.len = len; + ptrlen.flags = byte2; + memcpy(ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes, &ptrlen, + sizeof(ptrlen)); + + for (; buf < end; buf++) { + lba = scsi_8btou64(buf->lba); + num_blocks = scsi_4btoul(buf->length); + if (((lba + num_blocks) > (lun->be_lun->maxlba + 1)) + || ((lba + num_blocks) < lba)) { + ctl_set_lba_out_of_range(ctsio); + ctl_done((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); + } + } + + retval = lun->backend->config_write((union ctl_io *)ctsio); + + return (retval); +} + /* * Note that this function currently doesn't actually do anything inside * CTL to enforce things if the DQue bit is turned on. @@ -6909,6 +7102,8 @@ ctl_read_capacity_16(struct ctl_scsiio * scsi_ulto4b(lun->be_lun->blocksize, data->length); data->prot_lbppbe = lun->be_lun->pblockexp & SRC16_LBPPBE; scsi_ulto2b(lun->be_lun->pblockoff & SRC16_LALBA_A, data->lalba_lbp); + if (lun->be_lun->flags & CTL_LUN_FLAG_UNMAP) + data->lalba_lbp[0] |= SRC16_LBPME; ctsio->scsi_status = SCSI_STATUS_OK; @@ -8995,8 +9190,8 @@ ctl_inquiry_evpd_supported(struct ctl_sc lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; - sup_page_size = sizeof(struct scsi_vpd_supported_pages) + - SCSI_EVPD_NUM_SUPPORTED_PAGES; + sup_page_size = sizeof(struct scsi_vpd_supported_pages) * + SCSI_EVPD_NUM_SUPPORTED_PAGES; ctsio->kern_data_ptr = malloc(sup_page_size, M_CTL, M_WAITOK | M_ZERO); pages = (struct scsi_vpd_supported_pages *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; @@ -9032,6 +9227,10 @@ ctl_inquiry_evpd_supported(struct ctl_sc pages->page_list[1] = SVPD_UNIT_SERIAL_NUMBER; /* Device Identification */ pages->page_list[2] = SVPD_DEVICE_ID; + /* Block limits */ + pages->page_list[3] = SVPD_BLOCK_LIMITS; + /* Logical Block Provisioning */ + pages->page_list[4] = SVPD_LBP; ctsio->scsi_status = SCSI_STATUS_OK; @@ -9296,11 +9495,117 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio } static int +ctl_inquiry_evpd_block_limits(struct ctl_scsiio *ctsio, int alloc_len) +{ + struct scsi_vpd_block_limits *bl_ptr; + struct ctl_lun *lun; + int bs; + + lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + bs = lun->be_lun->blocksize; + + ctsio->kern_data_ptr = malloc(sizeof(*bl_ptr), M_CTL, M_WAITOK | M_ZERO); + bl_ptr = (struct scsi_vpd_block_limits *)ctsio->kern_data_ptr; + ctsio->kern_sg_entries = 0; + + if (sizeof(*bl_ptr) < alloc_len) { + ctsio->residual = alloc_len - sizeof(*bl_ptr); + ctsio->kern_data_len = sizeof(*bl_ptr); + ctsio->kern_total_len = sizeof(*bl_ptr); + } else { + ctsio->residual = 0; + ctsio->kern_data_len = alloc_len; + ctsio->kern_total_len = alloc_len; + } + ctsio->kern_data_resid = 0; + ctsio->kern_rel_offset = 0; + ctsio->kern_sg_entries = 0; + + /* + * The control device is always connected. The disk device, on the + * other hand, may not be online all the time. Need to change this + * to figure out whether the disk device is actually online or not. + */ + if (lun != NULL) + bl_ptr->device = (SID_QUAL_LU_CONNECTED << 5) | + lun->be_lun->lun_type; + else + bl_ptr->device = (SID_QUAL_LU_OFFLINE << 5) | T_DIRECT; + + bl_ptr->page_code = SVPD_BLOCK_LIMITS; + scsi_ulto2b(sizeof(*bl_ptr), bl_ptr->page_length); + scsi_ulto4b((16 * 1024 * 1024) / bs, bl_ptr->max_txfer_len); + scsi_ulto4b(MAXPHYS / bs, bl_ptr->opt_txfer_len); + if (lun->be_lun->flags & CTL_LUN_FLAG_UNMAP) { + scsi_ulto4b(0xffffffff, bl_ptr->max_unmap_lba_cnt); + scsi_ulto4b(0xffffffff, bl_ptr->max_unmap_blk_cnt); + } + scsi_u64to8b(UINT64_MAX, bl_ptr->max_write_same_length); + + ctsio->scsi_status = SCSI_STATUS_OK; + ctsio->be_move_done = ctl_config_move_done; + ctl_datamove((union ctl_io *)ctsio); + + return (CTL_RETVAL_COMPLETE); +} + +static int +ctl_inquiry_evpd_lbp(struct ctl_scsiio *ctsio, int alloc_len) +{ + struct scsi_vpd_logical_block_prov *lbp_ptr; + struct ctl_lun *lun; + int bs; + + lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + bs = lun->be_lun->blocksize; + + ctsio->kern_data_ptr = malloc(sizeof(*lbp_ptr), M_CTL, M_WAITOK | M_ZERO); + lbp_ptr = (struct scsi_vpd_logical_block_prov *)ctsio->kern_data_ptr; + ctsio->kern_sg_entries = 0; + + if (sizeof(*lbp_ptr) < alloc_len) { + ctsio->residual = alloc_len - sizeof(*lbp_ptr); + ctsio->kern_data_len = sizeof(*lbp_ptr); + ctsio->kern_total_len = sizeof(*lbp_ptr); + } else { + ctsio->residual = 0; + ctsio->kern_data_len = alloc_len; + ctsio->kern_total_len = alloc_len; + } + ctsio->kern_data_resid = 0; + ctsio->kern_rel_offset = 0; + ctsio->kern_sg_entries = 0; + + /* + * The control device is always connected. The disk device, on the + * other hand, may not be online all the time. Need to change this + * to figure out whether the disk device is actually online or not. + */ + if (lun != NULL) + lbp_ptr->device = (SID_QUAL_LU_CONNECTED << 5) | + lun->be_lun->lun_type; + else + lbp_ptr->device = (SID_QUAL_LU_OFFLINE << 5) | T_DIRECT; + + lbp_ptr->page_code = SVPD_LBP; + if (lun->be_lun->flags & CTL_LUN_FLAG_UNMAP) + lbp_ptr->flags = SVPD_LBP_UNMAP | SVPD_LBP_WS16 | SVPD_LBP_WS10; + + ctsio->scsi_status = SCSI_STATUS_OK; + ctsio->be_move_done = ctl_config_move_done; + ctl_datamove((union ctl_io *)ctsio); + + return (CTL_RETVAL_COMPLETE); +} + +static int ctl_inquiry_evpd(struct ctl_scsiio *ctsio) { struct scsi_inquiry *cdb; + struct ctl_lun *lun; int alloc_len, retval; + lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; cdb = (struct scsi_inquiry *)ctsio->cdb; retval = CTL_RETVAL_COMPLETE; @@ -9317,6 +9622,12 @@ ctl_inquiry_evpd(struct ctl_scsiio *ctsi case SVPD_DEVICE_ID: retval = ctl_inquiry_evpd_devid(ctsio, alloc_len); break; + case SVPD_BLOCK_LIMITS: + retval = ctl_inquiry_evpd_block_limits(ctsio, alloc_len); + break; + case SVPD_LBP: + retval = ctl_inquiry_evpd_lbp(ctsio, alloc_len); + break; default: ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, @@ -9687,6 +9998,24 @@ ctl_get_lba_len(union ctl_io *io, uint64 *len = scsi_4btoul(cdb->length); break; } + case WRITE_SAME_10: { + struct scsi_write_same_10 *cdb; + + cdb = (struct scsi_write_same_10 *)io->scsiio.cdb; + + *lba = scsi_4btoul(cdb->addr); + *len = scsi_2btoul(cdb->length); + break; + } + case WRITE_SAME_16: { + struct scsi_write_same_16 *cdb; + + cdb = (struct scsi_write_same_16 *)io->scsiio.cdb; + + *lba = scsi_8btou64(cdb->addr); + *len = scsi_4btoul(cdb->length); + break; + } default: return (1); break; /* NOTREACHED */ Modified: stable/10/sys/cam/ctl/ctl_backend.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend.h Thu May 8 06:56:59 2014 (r265633) +++ stable/10/sys/cam/ctl/ctl_backend.h Thu May 8 07:00:45 2014 (r265634) @@ -71,6 +71,8 @@ * valid for use in SCSI INQUIRY VPD page 0x83. * * The DEV_TYPE flag tells us that the device_type field is filled in. + * + * The UNMAP flag tells us that this LUN supports UNMAP. */ typedef enum { CTL_LUN_FLAG_ID_REQ = 0x01, @@ -79,7 +81,8 @@ typedef enum { CTL_LUN_FLAG_PRIMARY = 0x08, CTL_LUN_FLAG_SERIAL_NUM = 0x10, CTL_LUN_FLAG_DEVID = 0x20, - CTL_LUN_FLAG_DEV_TYPE = 0x40 + CTL_LUN_FLAG_DEV_TYPE = 0x40, + CTL_LUN_FLAG_UNMAP = 0x80 } ctl_backend_lun_flags; #ifdef _KERNEL Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Thu May 8 06:56:59 2014 (r265633) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Thu May 8 07:00:45 2014 (r265634) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -152,6 +153,7 @@ struct ctl_be_block_lun { union ctl_be_block_bedata backend; cbb_dispatch_t dispatch; cbb_dispatch_t lun_flush; + cbb_dispatch_t unmap; struct mtx lock; uma_zone_t lun_zone; uint64_t size_blocks; @@ -207,6 +209,7 @@ struct ctl_be_block_io { uint64_t io_offset; struct ctl_be_block_softc *softc; struct ctl_be_block_lun *lun; + void (*beio_cont)(struct ctl_be_block_io *beio); /* to continue processing */ }; static int cbb_num_threads = 14; @@ -227,6 +230,8 @@ static void ctl_be_block_dispatch_file(s struct ctl_be_block_io *beio); static void ctl_be_block_flush_dev(struct ctl_be_block_lun *be_lun, struct ctl_be_block_io *beio); +static void ctl_be_block_unmap_dev(struct ctl_be_block_lun *be_lun, + struct ctl_be_block_io *beio); static void ctl_be_block_dispatch_dev(struct ctl_be_block_lun *be_lun, struct ctl_be_block_io *beio); static void ctl_be_block_cw_dispatch(struct ctl_be_block_lun *be_lun, @@ -335,8 +340,12 @@ ctl_complete_beio(struct ctl_be_block_io /*now*/ NULL, /*then*/&beio->ds_t0); - ctl_free_beio(beio); - ctl_done(io); + if (beio->beio_cont != NULL) { + beio->beio_cont(beio); + } else { + ctl_free_beio(beio); + ctl_done(io); + } } static int @@ -482,11 +491,12 @@ ctl_be_block_biodone(struct bio *bio) } /* - * If this is a write or a flush, we're all done. + * If this is a write, a flush or a delete, we're all done. * If this is a read, we can now send the data to the user. */ if ((beio->bio_cmd == BIO_WRITE) - || (beio->bio_cmd == BIO_FLUSH)) { + || (beio->bio_cmd == BIO_FLUSH) + || (beio->bio_cmd == BIO_DELETE)) { ctl_set_success(&io->scsiio); ctl_complete_beio(beio); } else { @@ -752,6 +762,79 @@ ctl_be_block_flush_dev(struct ctl_be_blo } static void +ctl_be_block_unmap_dev_range(struct ctl_be_block_lun *be_lun, + struct ctl_be_block_io *beio, + uint64_t off, uint64_t len, int last) +{ + struct bio *bio; + struct ctl_be_block_devdata *dev_data; + uint64_t maxlen; + + dev_data = &be_lun->backend.dev; + maxlen = LONG_MAX - (LONG_MAX % be_lun->blocksize); + while (len > 0) { + bio = g_alloc_bio(); + bio->bio_cmd = BIO_DELETE; + bio->bio_flags |= beio->bio_flags; + bio->bio_dev = dev_data->cdev; + bio->bio_offset = off; + bio->bio_length = MIN(len, maxlen); + bio->bio_data = 0; + bio->bio_done = ctl_be_block_biodone; + bio->bio_caller1 = beio; + bio->bio_pblkno = off / be_lun->blocksize; + + off += bio->bio_length; + len -= bio->bio_length; + + mtx_lock(&be_lun->lock); + beio->num_bios_sent++; + if (last && len == 0) + beio->send_complete = 1; + mtx_unlock(&be_lun->lock); + + (*dev_data->csw->d_strategy)(bio); + } +} + +static void +ctl_be_block_unmap_dev(struct ctl_be_block_lun *be_lun, + struct ctl_be_block_io *beio) +{ + union ctl_io *io; + struct ctl_be_block_devdata *dev_data; + struct ctl_ptr_len_flags ptrlen; + struct scsi_unmap_desc *buf, *end; + uint64_t len; + + dev_data = &be_lun->backend.dev; + io = beio->io; + + DPRINTF("entered\n"); + + binuptime(&beio->ds_t0); + devstat_start_transaction(be_lun->disk_stats, &beio->ds_t0); + + if (beio->io_offset == -1) { + beio->io_len = 0; + memcpy(&ptrlen, io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes, + sizeof(ptrlen)); + buf = (struct scsi_unmap_desc *)ptrlen.ptr; + end = buf + ptrlen.len / sizeof(*buf); + for (; buf < end; buf++) { + len = (uint64_t)scsi_4btoul(buf->length) * + be_lun->blocksize; + beio->io_len += len; + ctl_be_block_unmap_dev_range(be_lun, beio, + scsi_8btou64(buf->lba) * be_lun->blocksize, len, + (end - buf < 2) ? TRUE : FALSE); + } + } else + ctl_be_block_unmap_dev_range(be_lun, beio, + beio->io_offset, beio->io_len, TRUE); +} + +static void ctl_be_block_dispatch_dev(struct ctl_be_block_lun *be_lun, struct ctl_be_block_io *beio) { @@ -839,6 +922,208 @@ ctl_be_block_dispatch_dev(struct ctl_be_ } static void +ctl_be_block_cw_done_ws(struct ctl_be_block_io *beio) +{ + union ctl_io *io; + + io = beio->io; + ctl_free_beio(beio); + if (((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE) + && ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS)) { + ctl_config_write_done(io); + return; + } + + ctl_be_block_config_write(io); +} + +static void +ctl_be_block_cw_dispatch_ws(struct ctl_be_block_lun *be_lun, + union ctl_io *io) +{ + struct ctl_be_block_io *beio; + struct ctl_be_block_softc *softc; + struct ctl_lba_len_flags lbalen; + uint64_t len_left, lba; + int i, seglen; + uint8_t *buf, *end; + + DPRINTF("entered\n"); + + beio = io->io_hdr.ctl_private[CTL_PRIV_BACKEND].ptr; + softc = be_lun->softc; + memcpy(&lbalen, io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes, + sizeof(lbalen)); + + if (lbalen.flags & ~(SWS_LBDATA | SWS_UNMAP) || + (lbalen.flags & SWS_UNMAP && be_lun->unmap == NULL)) { + ctl_free_beio(beio); + ctl_set_invalid_field(&io->scsiio, + /*sks_valid*/ 1, + /*command*/ 1, + /*field*/ 1, + /*bit_valid*/ 0, + /*bit*/ 0); + ctl_config_write_done(io); + return; + } + + /* + * If the I/O came down with an ordered or head of queue tag, set + * the BIO_ORDERED attribute. For head of queue tags, that's + * pretty much the best we can do. + */ + if ((io->scsiio.tag_type == CTL_TAG_ORDERED) + || (io->scsiio.tag_type == CTL_TAG_HEAD_OF_QUEUE)) + beio->bio_flags = BIO_ORDERED; + + switch (io->scsiio.tag_type) { + case CTL_TAG_ORDERED: + beio->ds_tag_type = DEVSTAT_TAG_ORDERED; + break; + case CTL_TAG_HEAD_OF_QUEUE: + beio->ds_tag_type = DEVSTAT_TAG_HEAD; + break; + case CTL_TAG_UNTAGGED: + case CTL_TAG_SIMPLE: + case CTL_TAG_ACA: + default: + beio->ds_tag_type = DEVSTAT_TAG_SIMPLE; + break; + } + + if (lbalen.flags & SWS_UNMAP) { + beio->io_offset = lbalen.lba * be_lun->blocksize; + beio->io_len = (uint64_t)lbalen.len * be_lun->blocksize; + beio->bio_cmd = BIO_DELETE; + beio->ds_trans_type = DEVSTAT_FREE; + + be_lun->unmap(be_lun, beio); + return; + } + + beio->bio_cmd = BIO_WRITE; + beio->ds_trans_type = DEVSTAT_WRITE; + + DPRINTF("WRITE SAME at LBA %jx len %u\n", + (uintmax_t)lbalen.lba, lbalen.len); + + len_left = (uint64_t)lbalen.len * be_lun->blocksize; + for (i = 0, lba = 0; i < CTLBLK_MAX_SEGS && len_left > 0; i++) { + + /* + * Setup the S/G entry for this chunk. + */ + seglen = MIN(MAXPHYS, len_left); + seglen -= seglen % be_lun->blocksize; + beio->sg_segs[i].len = seglen; + beio->sg_segs[i].addr = uma_zalloc(be_lun->lun_zone, M_WAITOK); + + DPRINTF("segment %d addr %p len %zd\n", i, + beio->sg_segs[i].addr, beio->sg_segs[i].len); + + beio->num_segs++; + len_left -= seglen; + + buf = beio->sg_segs[i].addr; + end = buf + seglen; + for (; buf < end; buf += be_lun->blocksize) { + memcpy(buf, io->scsiio.kern_data_ptr, be_lun->blocksize); + if (lbalen.flags & SWS_LBDATA) + scsi_ulto4b(lbalen.lba + lba, buf); + lba++; + } + } + + beio->io_offset = lbalen.lba * be_lun->blocksize; + beio->io_len = lba * be_lun->blocksize; + + /* We can not do all in one run. Correct and schedule rerun. */ + if (len_left > 0) { + lbalen.lba += lba; + lbalen.len -= lba; + memcpy(io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes, &lbalen, + sizeof(lbalen)); + beio->beio_cont = ctl_be_block_cw_done_ws; + } + + be_lun->dispatch(be_lun, beio); +} + +static void +ctl_be_block_cw_dispatch_unmap(struct ctl_be_block_lun *be_lun, + union ctl_io *io) +{ + struct ctl_be_block_io *beio; + struct ctl_be_block_softc *softc; + struct ctl_ptr_len_flags ptrlen; + + DPRINTF("entered\n"); + + beio = io->io_hdr.ctl_private[CTL_PRIV_BACKEND].ptr; + softc = be_lun->softc; + memcpy(&ptrlen, io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes, + sizeof(ptrlen)); + + if (ptrlen.flags != 0 || be_lun->unmap == NULL) { + ctl_free_beio(beio); + ctl_set_invalid_field(&io->scsiio, + /*sks_valid*/ 0, + /*command*/ 1, + /*field*/ 0, + /*bit_valid*/ 0, + /*bit*/ 0); + ctl_config_write_done(io); + return; + } + + /* + * If the I/O came down with an ordered or head of queue tag, set + * the BIO_ORDERED attribute. For head of queue tags, that's + * pretty much the best we can do. + */ + if ((io->scsiio.tag_type == CTL_TAG_ORDERED) + || (io->scsiio.tag_type == CTL_TAG_HEAD_OF_QUEUE)) + beio->bio_flags = BIO_ORDERED; + + switch (io->scsiio.tag_type) { + case CTL_TAG_ORDERED: + beio->ds_tag_type = DEVSTAT_TAG_ORDERED; + break; + case CTL_TAG_HEAD_OF_QUEUE: + beio->ds_tag_type = DEVSTAT_TAG_HEAD; + break; + case CTL_TAG_UNTAGGED: + case CTL_TAG_SIMPLE: + case CTL_TAG_ACA: + default: + beio->ds_tag_type = DEVSTAT_TAG_SIMPLE; + break; + } + + beio->io_len = 0; + beio->io_offset = -1; + + beio->bio_cmd = BIO_DELETE; + beio->ds_trans_type = DEVSTAT_FREE; + + DPRINTF("WRITE SAME at LBA %jx len %u\n", + (uintmax_t)lbalen.lba, lbalen.len); + + be_lun->unmap(be_lun, beio); +} + +static void +ctl_be_block_cw_done(struct ctl_be_block_io *beio) +{ + union ctl_io *io; + + io = beio->io; + ctl_free_beio(beio); + ctl_config_write_done(io); +} + +static void ctl_be_block_cw_dispatch(struct ctl_be_block_lun *be_lun, union ctl_io *io) { @@ -849,11 +1134,9 @@ ctl_be_block_cw_dispatch(struct ctl_be_b softc = be_lun->softc; beio = ctl_alloc_beio(softc); - KASSERT(beio != NULL, ("ctl_alloc_beio() failed")); - beio->io = io; - beio->softc = softc; beio->lun = be_lun; + beio->beio_cont = ctl_be_block_cw_done; io->io_hdr.ctl_private[CTL_PRIV_BACKEND].ptr = beio; switch (io->scsiio.cdb[0]) { @@ -865,6 +1148,13 @@ ctl_be_block_cw_dispatch(struct ctl_be_b beio->io_len = 0; be_lun->lun_flush(be_lun, beio); break; + case WRITE_SAME_10: + case WRITE_SAME_16: + ctl_be_block_cw_dispatch_ws(be_lun, io); + break; + case UNMAP: + ctl_be_block_cw_dispatch_unmap(be_lun, io); + break; default: panic("Unhandled CDB type %#x", io->scsiio.cdb[0]); break; @@ -920,10 +1210,7 @@ ctl_be_block_dispatch(struct ctl_be_bloc } beio = ctl_alloc_beio(softc); - KASSERT(beio != NULL, ("ctl_alloc_beio() failed")); - beio->io = io; - beio->softc = softc; beio->lun = be_lun; io->io_hdr.ctl_private[CTL_PRIV_BACKEND].ptr = beio; @@ -1273,6 +1560,7 @@ ctl_be_block_open_dev(struct ctl_be_bloc be_lun->dev_type = CTL_BE_BLOCK_DEV; be_lun->dispatch = ctl_be_block_dispatch_dev; be_lun->lun_flush = ctl_be_block_flush_dev; + be_lun->unmap = ctl_be_block_unmap_dev; be_lun->backend.dev.cdev = be_lun->vn->v_rdev; be_lun->backend.dev.csw = dev_refthread(be_lun->backend.dev.cdev, &be_lun->backend.dev.dev_ref); @@ -1532,7 +1820,7 @@ ctl_be_block_create(struct ctl_be_block_ struct ctl_lun_create_params *params; struct ctl_be_arg *file_arg; char tmpstr[32]; - int retval, num_threads; + int retval, num_threads, unmap; int i; params = &req->reqdata.create; @@ -1623,6 +1911,7 @@ ctl_be_block_create(struct ctl_be_block_ * XXX This searching loop might be refactored to be combined with * the loop above, */ + unmap = 0; for (i = 0; i < req->num_be_args; i++) { if (strcmp(req->kern_be_args[i].kname, "num_threads") == 0) { struct ctl_be_arg *thread_arg; @@ -1651,6 +1940,9 @@ ctl_be_block_create(struct ctl_be_block_ } num_threads = tmp_num_threads; + } else if (strcmp(req->kern_be_args[i].kname, "unmap") == 0 && + strcmp(req->kern_be_args[i].kvalue, "on") == 0) { + unmap = 1; } else if (strcmp(req->kern_be_args[i].kname, "file") != 0 && strcmp(req->kern_be_args[i].kname, "dev") != 0) { struct ctl_be_lun_option *opt; @@ -1666,6 +1958,8 @@ ctl_be_block_create(struct ctl_be_block_ be_lun->flags = CTL_BE_BLOCK_LUN_UNCONFIGURED; be_lun->ctl_be_lun.flags = CTL_LUN_FLAG_PRIMARY; + if (unmap) + be_lun->ctl_be_lun.flags |= CTL_LUN_FLAG_UNMAP; be_lun->ctl_be_lun.be_lun = be_lun; be_lun->ctl_be_lun.blocksize = be_lun->blocksize; be_lun->ctl_be_lun.pblockexp = be_lun->pblockexp; @@ -2141,6 +2435,9 @@ ctl_be_block_config_write(union ctl_io * switch (io->scsiio.cdb[0]) { case SYNCHRONIZE_CACHE: case SYNCHRONIZE_CACHE_16: + case WRITE_SAME_10: + case WRITE_SAME_16: + case UNMAP: /* * The upper level CTL code will filter out any CDBs with * the immediate bit set and return the proper error. Modified: stable/10/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Thu May 8 06:56:59 2014 (r265633) +++ stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Thu May 8 07:00:45 2014 (r265634) @@ -491,7 +491,7 @@ ctl_backend_ramdisk_create(struct ctl_be struct ctl_lun_create_params *params; uint32_t blocksize; char tmpstr[32]; - int i, retval; + int i, retval, unmap; retval = 0; params = &req->reqdata.create; @@ -546,19 +546,27 @@ ctl_backend_ramdisk_create(struct ctl_be be_lun->softc = softc; + unmap = 0; for (i = 0; i < req->num_be_args; i++) { - struct ctl_be_lun_option *opt; + if (strcmp(req->kern_be_args[i].kname, "unmap") == 0 && + strcmp(req->kern_be_args[i].kvalue, "on") == 0) { + unmap = 1; + } else { + struct ctl_be_lun_option *opt; - opt = malloc(sizeof(*opt), M_RAMDISK, M_WAITOK); - opt->name = malloc(strlen(req->kern_be_args[i].kname) + 1, M_RAMDISK, M_WAITOK); - strcpy(opt->name, req->kern_be_args[i].kname); - opt->value = malloc(strlen(req->kern_be_args[i].kvalue) + 1, M_RAMDISK, M_WAITOK); - strcpy(opt->value, req->kern_be_args[i].kvalue); - STAILQ_INSERT_TAIL(&be_lun->ctl_be_lun.options, opt, links); + opt = malloc(sizeof(*opt), M_RAMDISK, M_WAITOK); + opt->name = malloc(strlen(req->kern_be_args[i].kname) + 1, M_RAMDISK, M_WAITOK); + strcpy(opt->name, req->kern_be_args[i].kname); + opt->value = malloc(strlen(req->kern_be_args[i].kvalue) + 1, M_RAMDISK, M_WAITOK); + strcpy(opt->value, req->kern_be_args[i].kvalue); + STAILQ_INSERT_TAIL(&be_lun->ctl_be_lun.options, opt, links); + } } be_lun->flags = CTL_BE_RAMDISK_LUN_UNCONFIGURED; be_lun->ctl_be_lun.flags = CTL_LUN_FLAG_PRIMARY; + if (unmap) + be_lun->ctl_be_lun.flags |= CTL_LUN_FLAG_UNMAP; be_lun->ctl_be_lun.be_lun = be_lun; if (params->flags & CTL_LUN_FLAG_ID_REQ) { @@ -882,6 +890,12 @@ ctl_backend_ramdisk_config_write(union c ctl_config_write_done(io); break; } + case WRITE_SAME_10: + case WRITE_SAME_16: + case UNMAP: + ctl_set_success(&io->scsiio); + ctl_config_write_done(io); + break; default: ctl_set_invalid_opcode(&io->scsiio); ctl_config_write_done(io); Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_cmd_table.c Thu May 8 06:56:59 2014 (r265633) +++ stable/10/sys/cam/ctl/ctl_cmd_table.c Thu May 8 07:00:45 2014 (r265634) @@ -331,10 +331,13 @@ struct ctl_cmd_entry ctl_cmd_table[] = {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, /* 41 WRITE SAME(10) */ -{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, +{ctl_write_same, CTL_SERIDX_WRITE, CTL_CMD_FLAG_OK_ON_SLUN | + CTL_FLAG_DATA_OUT, + CTL_LUN_PAT_WRITE | CTL_LUN_PAT_RANGE}, -/* 42 READ SUB-CHANNEL */ -{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, +/* 42 READ SUB-CHANNEL / UNMAP */ +{ctl_unmap, CTL_SERIDX_UNMAP, CTL_CMD_FLAG_OK_ON_SLUN | CTL_FLAG_DATA_OUT, + CTL_LUN_PAT_WRITE}, /* 43 READ TOC/PMA/ATIP */ {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, @@ -623,7 +626,9 @@ struct ctl_cmd_entry ctl_cmd_table[] = {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, /* 93 WRITE SAME(16) */ -{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, +{ctl_write_same, CTL_SERIDX_WRITE, CTL_CMD_FLAG_OK_ON_SLUN | + CTL_FLAG_DATA_OUT, + CTL_LUN_PAT_WRITE | CTL_LUN_PAT_RANGE}, /* 94 */ {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, Modified: stable/10/sys/cam/ctl/ctl_io.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_io.h Thu May 8 06:56:59 2014 (r265633) +++ stable/10/sys/cam/ctl/ctl_io.h Thu May 8 07:00:45 2014 (r265634) @@ -134,6 +134,18 @@ struct ctl_lba_len { uint32_t len; }; +struct ctl_lba_len_flags { + uint64_t lba; + uint32_t len; + uint32_t flags; +}; + +struct ctl_ptr_len_flags { + uint8_t *ptr; + uint32_t len; + uint32_t flags; +}; + union ctl_priv { uint8_t bytes[sizeof(uint64_t) * 2]; uint64_t integer; Modified: stable/10/sys/cam/ctl/ctl_private.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_private.h Thu May 8 06:56:59 2014 (r265633) +++ stable/10/sys/cam/ctl/ctl_private.h Thu May 8 07:00:45 2014 (r265634) @@ -156,6 +156,7 @@ typedef enum { CTL_SERIDX_TUR = 0, CTL_SERIDX_READ, CTL_SERIDX_WRITE, + CTL_SERIDX_UNMAP, CTL_SERIDX_MD_SNS, CTL_SERIDX_MD_SEL, CTL_SERIDX_RQ_SNS, @@ -470,6 +471,8 @@ int ctl_start_stop(struct ctl_scsiio *ct int ctl_sync_cache(struct ctl_scsiio *ctsio); int ctl_format(struct ctl_scsiio *ctsio); int ctl_write_buffer(struct ctl_scsiio *ctsio); +int ctl_write_same(struct ctl_scsiio *ctsio); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu May 8 07:01:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8E6449D; Thu, 8 May 2014 07:01:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A5AF975F; Thu, 8 May 2014 07:01:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4871sNI049408; Thu, 8 May 2014 07:01:54 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4871sLv049407; Thu, 8 May 2014 07:01:54 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405080701.s4871sLv049407@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 07:01:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265635 - stable/10/sys/cam X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 07:01:54 -0000 Author: mav Date: Thu May 8 07:01:54 2014 New Revision: 265635 URL: http://svnweb.freebsd.org/changeset/base/265635 Log: MFC r264406: Report more readable state "-" for idle CAM scan thread. Modified: stable/10/sys/cam/cam_xpt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/cam_xpt.c ============================================================================== --- stable/10/sys/cam/cam_xpt.c Thu May 8 07:00:45 2014 (r265634) +++ stable/10/sys/cam/cam_xpt.c Thu May 8 07:01:54 2014 (r265635) @@ -768,7 +768,7 @@ xpt_scanner_thread(void *dummy) for (;;) { if (TAILQ_EMPTY(&xsoftc.ccb_scanq)) msleep(&xsoftc.ccb_scanq, &xsoftc.xpt_topo_lock, PRIBIO, - "ccb_scanq", 0); + "-", 0); if ((ccb = (union ccb *)TAILQ_FIRST(&xsoftc.ccb_scanq)) != NULL) { TAILQ_REMOVE(&xsoftc.ccb_scanq, &ccb->ccb_h, sim_links.tqe); xpt_unlock_buses(); From owner-svn-src-stable@FreeBSD.ORG Thu May 8 07:02:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3F8075D2; Thu, 8 May 2014 07:02:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29B6E769; Thu, 8 May 2014 07:02:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4872lBW049586; Thu, 8 May 2014 07:02:47 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4872lt1049585; Thu, 8 May 2014 07:02:47 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405080702.s4872lt1049585@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 07:02:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265636 - stable/9/sys/cam X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 07:02:47 -0000 Author: mav Date: Thu May 8 07:02:46 2014 New Revision: 265636 URL: http://svnweb.freebsd.org/changeset/base/265636 Log: MFC r264406: Report more readable state "-" for idle CAM scan thread. Modified: stable/9/sys/cam/cam_xpt.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/cam_xpt.c ============================================================================== --- stable/9/sys/cam/cam_xpt.c Thu May 8 07:01:54 2014 (r265635) +++ stable/9/sys/cam/cam_xpt.c Thu May 8 07:02:46 2014 (r265636) @@ -792,7 +792,7 @@ xpt_scanner_thread(void *dummy) for (;;) { if (TAILQ_EMPTY(&xsoftc.ccb_scanq)) msleep(&xsoftc.ccb_scanq, &xsoftc.xpt_topo_lock, PRIBIO, - "ccb_scanq", 0); + "-", 0); if ((ccb = (union ccb *)TAILQ_FIRST(&xsoftc.ccb_scanq)) != NULL) { TAILQ_REMOVE(&xsoftc.ccb_scanq, &ccb->ccb_h, sim_links.tqe); xpt_unlock_buses(); From owner-svn-src-stable@FreeBSD.ORG Thu May 8 07:04:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1A7C716; Thu, 8 May 2014 07:04:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CDF05775; Thu, 8 May 2014 07:04:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4874DGF049846; Thu, 8 May 2014 07:04:13 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4874DN2049845; Thu, 8 May 2014 07:04:13 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405080704.s4874DN2049845@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 07:04:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265637 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 07:04:14 -0000 Author: mav Date: Thu May 8 07:04:13 2014 New Revision: 265637 URL: http://svnweb.freebsd.org/changeset/base/265637 Log: MFC r264407: Join CTL worker threads into one process for convenience. Report their idle state as "-". Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Thu May 8 07:02:46 2014 (r265636) +++ stable/10/sys/cam/ctl/ctl.c Thu May 8 07:04:13 2014 (r265637) @@ -1112,8 +1112,8 @@ ctl_init(void) } for (i = 0; i < worker_threads; i++) { - error = kproc_create(ctl_work_thread, softc, &softc->work_thread, 0, 0, - "ctl_thrd%d", i); + error = kproc_kthread_add(ctl_work_thread, softc, + &softc->work_thread, NULL, 0, 0, "ctl", "work%d", i); if (error != 0) { printf("error creating CTL work thread!\n"); mtx_lock(&softc->ctl_lock); @@ -13380,7 +13380,7 @@ ctl_work_thread(void *arg) /* XXX KDM use the PDROP flag?? */ /* Sleep until we have something to do. */ - mtx_sleep(softc, &softc->ctl_lock, PRIBIO, "ctl_work", 0); + mtx_sleep(softc, &softc->ctl_lock, PRIBIO, "-", 0); /* Back to the top of the loop to see what woke us up. */ continue; From owner-svn-src-stable@FreeBSD.ORG Thu May 8 07:05:19 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D9FD8844; Thu, 8 May 2014 07:05:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD46077D; Thu, 8 May 2014 07:05:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4875Jri050082; Thu, 8 May 2014 07:05:19 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4875J7J050081; Thu, 8 May 2014 07:05:19 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405080705.s4875J7J050081@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 07:05:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265638 - stable/10/sys/cam/scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 07:05:20 -0000 Author: mav Date: Thu May 8 07:05:19 2014 New Revision: 265638 URL: http://svnweb.freebsd.org/changeset/base/265638 Log: MFC r264834: Disable UNMAP support for STEC 842 SSDs. In some unknown cases UNMAP commands make device firmware stuck. Modified: stable/10/sys/cam/scsi/scsi_da.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_da.c Thu May 8 07:04:13 2014 (r265637) +++ stable/10/sys/cam/scsi/scsi_da.c Thu May 8 07:05:19 2014 (r265638) @@ -99,7 +99,8 @@ typedef enum { DA_Q_NO_6_BYTE = 0x02, DA_Q_NO_PREVENT = 0x04, DA_Q_4K = 0x08, - DA_Q_NO_RC16 = 0x10 + DA_Q_NO_RC16 = 0x10, + DA_Q_NO_UNMAP = 0x20 } da_quirks; #define DA_Q_BIT_STRING \ @@ -349,6 +350,13 @@ static struct da_quirk_entry da_quirk_ta {T_DIRECT, SIP_MEDIA_FIXED, "COMPAQ", "RAID*", "*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE }, + { + /* + * The STEC 842 sometimes hang on UNMAP. + */ + {T_DIRECT, SIP_MEDIA_FIXED, "STEC", "S842E800M2", "*"}, + /*quirks*/ DA_Q_NO_UNMAP + }, /* USB mass storage devices supported by umass(4) */ { /* @@ -3205,7 +3213,7 @@ dadone(struct cam_periph *periph, union /* Ensure re-probe doesn't see old delete. */ softc->delete_available = 0; - if (lbp) { + if (lbp && (softc->quirks & DA_Q_NO_UNMAP) == 0) { /* * Based on older SBC-3 spec revisions * any of the UNMAP methods "may" be @@ -3404,7 +3412,8 @@ dadone(struct cam_periph *periph, union if ((csio->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) { for (i = 0; i < sizeof(*ata_params) / 2; i++) ptr[i] = le16toh(ptr[i]); - if (ata_params->support_dsm & ATA_SUPPORT_DSM_TRIM) { + if (ata_params->support_dsm & ATA_SUPPORT_DSM_TRIM && + (softc->quirks & DA_Q_NO_UNMAP) == 0) { dadeleteflag(softc, DA_DELETE_ATA_TRIM, 1); if (ata_params->max_dsm_blocks != 0) softc->trim_max_ranges = min( From owner-svn-src-stable@FreeBSD.ORG Thu May 8 07:06:16 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7841E97E; Thu, 8 May 2014 07:06:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2EB78B; Thu, 8 May 2014 07:06:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4876GRP050259; Thu, 8 May 2014 07:06:16 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4876GcK050258; Thu, 8 May 2014 07:06:16 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405080706.s4876GcK050258@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 07:06:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265639 - stable/9/sys/cam/scsi X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 07:06:16 -0000 Author: mav Date: Thu May 8 07:06:15 2014 New Revision: 265639 URL: http://svnweb.freebsd.org/changeset/base/265639 Log: MFC r264834: Disable UNMAP support for STEC 842 SSDs. In some unknown cases UNMAP commands make device firmware stuck. Modified: stable/9/sys/cam/scsi/scsi_da.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Thu May 8 07:05:19 2014 (r265638) +++ stable/9/sys/cam/scsi/scsi_da.c Thu May 8 07:06:15 2014 (r265639) @@ -99,7 +99,8 @@ typedef enum { DA_Q_NO_6_BYTE = 0x02, DA_Q_NO_PREVENT = 0x04, DA_Q_4K = 0x08, - DA_Q_NO_RC16 = 0x10 + DA_Q_NO_RC16 = 0x10, + DA_Q_NO_UNMAP = 0x20 } da_quirks; #define DA_Q_BIT_STRING \ @@ -350,6 +351,13 @@ static struct da_quirk_entry da_quirk_ta {T_DIRECT, SIP_MEDIA_FIXED, "COMPAQ", "RAID*", "*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE }, + { + /* + * The STEC 842 sometimes hang on UNMAP. + */ + {T_DIRECT, SIP_MEDIA_FIXED, "STEC", "S842E800M2", "*"}, + /*quirks*/ DA_Q_NO_UNMAP + }, /* USB mass storage devices supported by umass(4) */ { /* @@ -3210,7 +3218,7 @@ dadone(struct cam_periph *periph, union /* Ensure re-probe doesn't see old delete. */ softc->delete_available = 0; - if (lbp) { + if (lbp && (softc->quirks & DA_Q_NO_UNMAP) == 0) { /* * Based on older SBC-3 spec revisions * any of the UNMAP methods "may" be @@ -3409,7 +3417,8 @@ dadone(struct cam_periph *periph, union if ((csio->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) { for (i = 0; i < sizeof(*ata_params) / 2; i++) ptr[i] = le16toh(ptr[i]); - if (ata_params->support_dsm & ATA_SUPPORT_DSM_TRIM) { + if (ata_params->support_dsm & ATA_SUPPORT_DSM_TRIM && + (softc->quirks & DA_Q_NO_UNMAP) == 0) { dadeleteflag(softc, DA_DELETE_ATA_TRIM, 1); if (ata_params->max_dsm_blocks != 0) softc->trim_max_ranges = min( From owner-svn-src-stable@FreeBSD.ORG Thu May 8 07:07:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 24546AD7; Thu, 8 May 2014 07:07:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 102CC7A9; Thu, 8 May 2014 07:07:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4877pfq050527; Thu, 8 May 2014 07:07:51 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4877pQM050526; Thu, 8 May 2014 07:07:51 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405080707.s4877pQM050526@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 07:07:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265640 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 07:07:52 -0000 Author: mav Date: Thu May 8 07:07:51 2014 New Revision: 265640 URL: http://svnweb.freebsd.org/changeset/base/265640 Log: MFC r264880 (by trasz): Modify CTL iSCSI frontend to properly handle situations where datamove routine is called multiple times per SCSI task. Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Thu May 8 07:06:15 2014 (r265639) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Thu May 8 07:07:51 2014 (r265640) @@ -709,7 +709,7 @@ cfiscsi_handle_data_segment(struct icl_p ("bad opcode 0x%x", request->ip_bhs->bhs_opcode)); /* - * We're only using fields common for Data Out and SCSI Command PDUs. + * We're only using fields common for Data-Out and SCSI Command PDUs. */ bhsdo = (struct iscsi_bhs_data_out *)request->ip_bhs; @@ -742,10 +742,13 @@ cfiscsi_handle_data_segment(struct icl_p * Make sure the offset, as sent by the initiator, matches the offset * we're supposed to be at in the scatter-gather list. */ - if (buffer_offset != io->scsiio.ext_data_filled) { + if (buffer_offset != + io->scsiio.kern_rel_offset + io->scsiio.ext_data_filled) { CFISCSI_SESSION_WARN(cs, "received bad buffer offset %zd, " - "expected %zd", buffer_offset, + "expected %zd; dropping connection", buffer_offset, + (size_t)io->scsiio.kern_rel_offset + (size_t)io->scsiio.ext_data_filled); + ctl_set_data_phase_error(&io->scsiio); cfiscsi_session_terminate(cs); return (true); } @@ -804,40 +807,62 @@ cfiscsi_handle_data_segment(struct icl_p } if (len > off) { + /* + * In case of unsolicited data, it's possible that the buffer + * provided by CTL is smaller than negotiated FirstBurstLength. + * Just ignore the superfluous data; will ask for them with R2T + * on next call to cfiscsi_datamove(). + * + * This obviously can only happen with SCSI Command PDU. + */ + if ((request->ip_bhs->bhs_opcode & ~ISCSI_BHS_OPCODE_IMMEDIATE) == + ISCSI_BHS_OPCODE_SCSI_COMMAND) { + CFISCSI_SESSION_DEBUG(cs, "received too much immediate " + "data: got %zd bytes, expected %zd", + icl_pdu_data_segment_length(request), off); + return (true); + } + CFISCSI_SESSION_WARN(cs, "received too much data: got %zd bytes, " - "expected %zd", icl_pdu_data_segment_length(request), off); + "expected %zd; dropping connection", + icl_pdu_data_segment_length(request), off); + ctl_set_data_phase_error(&io->scsiio); cfiscsi_session_terminate(cs); return (true); } - if (bhsdo->bhsdo_flags & BHSDO_FLAGS_F || - io->scsiio.ext_data_filled == io->scsiio.kern_total_len) { - if ((bhsdo->bhsdo_flags & BHSDO_FLAGS_F) == 0) { - CFISCSI_SESSION_WARN(cs, "got the final packet without " - "the F flag; flags = 0x%x; dropping connection", - bhsdo->bhsdo_flags); + if (io->scsiio.ext_data_filled == io->scsiio.kern_data_len && + (bhsdo->bhsdo_flags & BHSDO_FLAGS_F) == 0) { + CFISCSI_SESSION_WARN(cs, "got the final packet without " + "the F flag; flags = 0x%x; dropping connection", + bhsdo->bhsdo_flags); + ctl_set_data_phase_error(&io->scsiio); + cfiscsi_session_terminate(cs); + return (true); + } + + if (io->scsiio.ext_data_filled != io->scsiio.kern_data_len && + (bhsdo->bhsdo_flags & BHSDO_FLAGS_F) != 0) { + if ((request->ip_bhs->bhs_opcode & ~ISCSI_BHS_OPCODE_IMMEDIATE) == + ISCSI_BHS_OPCODE_SCSI_DATA_OUT) { + CFISCSI_SESSION_WARN(cs, "got the final packet, but the " + "transmitted size was %zd bytes instead of %d; " + "dropping connection", + (size_t)io->scsiio.ext_data_filled, + io->scsiio.kern_data_len); + ctl_set_data_phase_error(&io->scsiio); cfiscsi_session_terminate(cs); return (true); + } else { + /* + * For SCSI Command PDU, this just means we need to + * solicit more data by sending R2T. + */ + return (false); } + } - if (io->scsiio.ext_data_filled != io->scsiio.kern_total_len) { - if ((request->ip_bhs->bhs_opcode & ~ISCSI_BHS_OPCODE_IMMEDIATE) == - ISCSI_BHS_OPCODE_SCSI_DATA_OUT) { - CFISCSI_SESSION_WARN(cs, "got the final packet, but the " - "transmitted size was %zd bytes instead of %d; " - "dropping connection", - (size_t)io->scsiio.ext_data_filled, - io->scsiio.kern_total_len); - cfiscsi_session_terminate(cs); - return (true); - } else { - /* - * For SCSI Command PDU, this just means we need to - * solicit more data by sending R2T. - */ - return (false); - } - } + if (io->scsiio.ext_data_filled == io->scsiio.kern_data_len) { #if 0 CFISCSI_SESSION_DEBUG(cs, "no longer expecting Data-Out with target " "transfer tag 0x%x", cdw->cdw_target_transfer_tag); @@ -2390,8 +2415,7 @@ cfiscsi_datamove_in(union ctl_io *io) /* * This is the offset within the current SCSI command; for the first * call to cfiscsi_datamove() it will be 0, and for subsequent ones - * it will be the sum of lengths of previous ones. It's being - * incremented as we append data to the data segment. + * it will be the sum of lengths of previous ones. */ buffer_offset = io->scsiio.kern_rel_offset; @@ -2402,10 +2426,11 @@ cfiscsi_datamove_in(union ctl_io *io) */ expected_len = ntohl(bhssc->bhssc_expected_data_transfer_length); #if 0 - if (expected_len != io->scsiio.kern_total_len) - CFISCSI_SESSION_DEBUG(cs, "expected transfer length = %zd, " - "actual length = %zd", expected_len, - io->scsiio.kern_total_len); + if (expected_len != io->scsiio.kern_total_len) { + CFISCSI_SESSION_DEBUG(cs, "expected transfer length %zd, " + "actual length %zd", expected_len, + (size_t)io->scsiio.kern_total_len); + } #endif if (buffer_offset >= expected_len) { @@ -2413,7 +2438,6 @@ cfiscsi_datamove_in(union ctl_io *io) CFISCSI_SESSION_DEBUG(cs, "buffer_offset = %zd, " "already sent the expected len", buffer_offset); #endif - io->scsiio.ext_data_filled = io->scsiio.kern_total_len; io->scsiio.be_move_done(io); return; } @@ -2456,26 +2480,31 @@ cfiscsi_datamove_in(union ctl_io *io) * Truncate to maximum data segment length. */ KASSERT(response->ip_data_len < cs->cs_max_data_segment_length, - ("max_data_segment_length %zd >= ip_data_len %zd", + ("ip_data_len %zd >= max_data_segment_length %zd", response->ip_data_len, cs->cs_max_data_segment_length)); if (response->ip_data_len + len > - cs->cs_max_data_segment_length) + cs->cs_max_data_segment_length) { len = cs->cs_max_data_segment_length - response->ip_data_len; + KASSERT(len <= sg_len, ("len %zd > sg_len %zd", + len, sg_len)); + } /* * Truncate to expected data transfer length. */ KASSERT(buffer_offset + response->ip_data_len < expected_len, - ("%zd >= %zd", buffer_offset + response->ip_data_len, expected_len)); + ("buffer_offset %zd + ip_data_len %zd >= expected_len %zd", + buffer_offset, response->ip_data_len, expected_len)); if (buffer_offset + response->ip_data_len + len > expected_len) { CFISCSI_SESSION_DEBUG(cs, "truncating from %zd " "to expected data transfer length %zd", buffer_offset + response->ip_data_len + len, expected_len); len = expected_len - (buffer_offset + response->ip_data_len); + KASSERT(len <= sg_len, ("len %zd > sg_len %zd", + len, sg_len)); } - KASSERT(len <= sg_len, ("len > sg_len")); error = icl_pdu_append_data(response, sg_addr, len, M_NOWAIT); if (error != 0) { CFISCSI_SESSION_WARN(cs, "failed to " @@ -2488,10 +2517,11 @@ cfiscsi_datamove_in(union ctl_io *io) } sg_addr += len; sg_len -= len; - buffer_offset += len; - io->scsiio.ext_data_filled += len; - if (buffer_offset == expected_len) { + KASSERT(buffer_offset + request->ip_data_len <= expected_len, + ("buffer_offset %zd + ip_data_len %zd > expected_len %zd", + buffer_offset, request->ip_data_len, expected_len)); + if (buffer_offset + request->ip_data_len == expected_len) { /* * Already have the amount of data the initiator wanted. */ @@ -2521,6 +2551,7 @@ cfiscsi_datamove_in(union ctl_io *io) * call to cfiscsi_datamove(), and we want * to set the F flag only on the last of them. */ + buffer_offset += response->ip_data_len; if (buffer_offset == io->scsiio.kern_total_len || buffer_offset == expected_len) bhsdi->bhsdi_flags |= BHSDI_FLAGS_F; @@ -2530,6 +2561,7 @@ cfiscsi_datamove_in(union ctl_io *io) } } if (response != NULL) { + buffer_offset += response->ip_data_len; if (buffer_offset == io->scsiio.kern_total_len || buffer_offset == expected_len) bhsdi->bhsdi_flags |= BHSDI_FLAGS_F; @@ -2565,6 +2597,11 @@ cfiscsi_datamove_out(union ctl_io *io) */ PDU_TOTAL_TRANSFER_LEN(request) = io->scsiio.kern_total_len; + /* + * We hadn't received anything during this datamove yet. + */ + io->scsiio.ext_data_filled = 0; + target_transfer_tag = atomic_fetchadd_32(&cs->cs_target_transfer_tag, 1); @@ -2586,19 +2623,14 @@ cfiscsi_datamove_out(union ctl_io *io) cdw->cdw_target_transfer_tag = target_transfer_tag; cdw->cdw_initiator_task_tag = bhssc->bhssc_initiator_task_tag; - if (cs->cs_immediate_data && icl_pdu_data_segment_length(request) > 0) { + if (cs->cs_immediate_data && io->scsiio.kern_rel_offset == 0 && + icl_pdu_data_segment_length(request) > 0) { done = cfiscsi_handle_data_segment(request, cdw); if (done) { uma_zfree(cfiscsi_data_wait_zone, cdw); io->scsiio.be_move_done(io); return; } - -#if 0 - if (io->scsiio.ext_data_filled != 0) - CFISCSI_SESSION_DEBUG(cs, "got %zd bytes of immediate data, need %zd", - io->scsiio.ext_data_filled, io->scsiio.kern_data_len); -#endif } CFISCSI_SESSION_LOCK(cs); From owner-svn-src-stable@FreeBSD.ORG Thu May 8 07:08:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 45391C24; Thu, 8 May 2014 07:08:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 261FB7B3; Thu, 8 May 2014 07:08:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4878mNC050708; Thu, 8 May 2014 07:08:48 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4878mCj050707; Thu, 8 May 2014 07:08:48 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405080708.s4878mCj050707@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 07:08:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265641 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 07:08:48 -0000 Author: mav Date: Thu May 8 07:08:47 2014 New Revision: 265641 URL: http://svnweb.freebsd.org/changeset/base/265641 Log: MFC r264884: Make CAM target CTL frontend respect SIM I/O size limitations. If datamove size is bigger then SIM can handle, or it has more segments then this code can handle -- split it into several CTIO requests. Modified: stable/10/sys/cam/ctl/scsi_ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/scsi_ctl.c ============================================================================== --- stable/10/sys/cam/ctl/scsi_ctl.c Thu May 8 07:07:51 2014 (r265640) +++ stable/10/sys/cam/ctl/scsi_ctl.c Thu May 8 07:08:47 2014 (r265641) @@ -79,6 +79,7 @@ typedef enum { struct ctlfe_softc { struct ctl_frontend fe; path_id_t path_id; + u_int maxio; struct cam_sim *sim; char port_name[DEV_IDLEN]; struct mtx lun_softc_mtx; @@ -129,13 +130,15 @@ typedef enum { */ struct ctlfe_lun_cmd_info { int cur_transfer_index; + size_t cur_transfer_off; ctlfe_cmd_flags flags; /* * XXX KDM struct bus_dma_segment is 8 bytes on i386, and 16 * bytes on amd64. So with 32 elements, this is 256 bytes on * i386 and 512 bytes on amd64. */ - bus_dma_segment_t cam_sglist[32]; +#define CTLFE_MAX_SEGS 32 + bus_dma_segment_t cam_sglist[CTLFE_MAX_SEGS]; }; /* @@ -375,6 +378,10 @@ ctlfeasync(void *callback_arg, uint32_t bus_softc->path_id = cpi->ccb_h.path_id; bus_softc->sim = xpt_path_sim(path); + if (cpi->maxio != 0) + bus_softc->maxio = cpi->maxio; + else + bus_softc->maxio = DFLTPHYS; mtx_init(&bus_softc->lun_softc_mtx, "LUN softc mtx", NULL, MTX_DEF); STAILQ_INIT(&bus_softc->lun_softc_list); @@ -693,6 +700,90 @@ ctlfecleanup(struct cam_periph *periph) } static void +ctlfedata(struct ctlfe_lun_softc *softc, union ctl_io *io, + ccb_flags *flags, uint8_t **data_ptr, uint32_t *dxfer_len, + u_int16_t *sglist_cnt) +{ + struct ctlfe_softc *bus_softc; + struct ctlfe_lun_cmd_info *cmd_info; + struct ctl_sg_entry *ctl_sglist; + bus_dma_segment_t *cam_sglist; + size_t off; + int i, idx; + + cmd_info = (struct ctlfe_lun_cmd_info *)io->io_hdr.port_priv; + bus_softc = softc->parent_softc; + + /* + * Set the direction, relative to the initiator. + */ + *flags &= ~CAM_DIR_MASK; + if ((io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_IN) + *flags |= CAM_DIR_IN; + else + *flags |= CAM_DIR_OUT; + + *flags &= ~CAM_DATA_MASK; + idx = cmd_info->cur_transfer_index; + off = cmd_info->cur_transfer_off; + cmd_info->flags &= ~CTLFE_CMD_PIECEWISE; + if (io->scsiio.kern_sg_entries == 0) { + /* No S/G list. */ + *data_ptr = io->scsiio.kern_data_ptr + off; + if (io->scsiio.kern_data_len - off <= bus_softc->maxio) { + *dxfer_len = io->scsiio.kern_data_len - off; + } else { + *dxfer_len = bus_softc->maxio; + cmd_info->cur_transfer_index = -1; + cmd_info->cur_transfer_off = bus_softc->maxio; + cmd_info->flags |= CTLFE_CMD_PIECEWISE; + } + *sglist_cnt = 0; + + if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR) + *flags |= CAM_DATA_PADDR; + else + *flags |= CAM_DATA_VADDR; + } else { + /* S/G list with physical or virtual pointers. */ + ctl_sglist = (struct ctl_sg_entry *)io->scsiio.kern_data_ptr; + cam_sglist = cmd_info->cam_sglist; + *dxfer_len = 0; + for (i = 0; i < io->scsiio.kern_sg_entries - idx; i++) { + cam_sglist[i].ds_addr = (bus_addr_t)ctl_sglist[i + idx].addr + off; + if (ctl_sglist[i + idx].len - off <= bus_softc->maxio - *dxfer_len) { + cam_sglist[i].ds_len = ctl_sglist[idx + i].len - off; + *dxfer_len += cam_sglist[i].ds_len; + } else { + cam_sglist[i].ds_len = bus_softc->maxio - *dxfer_len; + cmd_info->cur_transfer_index = idx + i; + cmd_info->cur_transfer_off = cam_sglist[i].ds_len + off; + cmd_info->flags |= CTLFE_CMD_PIECEWISE; + *dxfer_len += cam_sglist[i].ds_len; + if (ctl_sglist[i].len != 0) + i++; + break; + } + if (i == (CTLFE_MAX_SEGS - 1) && + idx + i < (io->scsiio.kern_sg_entries - 1)) { + cmd_info->cur_transfer_index = idx + i + 1; + cmd_info->cur_transfer_off = 0; + cmd_info->flags |= CTLFE_CMD_PIECEWISE; + i++; + break; + } + off = 0; + } + *sglist_cnt = i; + if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR) + *flags |= CAM_DATA_SG_PADDR; + else + *flags |= CAM_DATA_SG; + *data_ptr = (uint8_t *)cam_sglist; + } +} + +static void ctlfestart(struct cam_periph *periph, union ccb *start_ccb) { struct ctlfe_lun_softc *softc; @@ -854,84 +945,10 @@ ctlfestart(struct cam_periph *periph, un bzero(cmd_info, sizeof(*cmd_info)); scsi_status = 0; - /* - * Set the direction, relative to the initiator. - */ - flags &= ~CAM_DIR_MASK; - if ((io->io_hdr.flags & CTL_FLAG_DATA_MASK) == - CTL_FLAG_DATA_IN) - flags |= CAM_DIR_IN; - else - flags |= CAM_DIR_OUT; - csio->cdb_len = atio->cdb_len; - flags &= ~CAM_DATA_MASK; - if (io->scsiio.kern_sg_entries == 0) { - /* No S/G list */ - data_ptr = io->scsiio.kern_data_ptr; - dxfer_len = io->scsiio.kern_data_len; - csio->sglist_cnt = 0; - - if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR) - flags |= CAM_DATA_PADDR; - else - flags |= CAM_DATA_VADDR; - } else if (io->scsiio.kern_sg_entries <= - (sizeof(cmd_info->cam_sglist)/ - sizeof(cmd_info->cam_sglist[0]))) { - /* - * S/G list with physical or virtual pointers. - * Just populate the CAM S/G list with the - * pointers. - */ - int i; - struct ctl_sg_entry *ctl_sglist; - bus_dma_segment_t *cam_sglist; - - ctl_sglist = (struct ctl_sg_entry *) - io->scsiio.kern_data_ptr; - cam_sglist = cmd_info->cam_sglist; - - for (i = 0; i < io->scsiio.kern_sg_entries;i++){ - cam_sglist[i].ds_addr = - (bus_addr_t)ctl_sglist[i].addr; - cam_sglist[i].ds_len = - ctl_sglist[i].len; - } - csio->sglist_cnt = io->scsiio.kern_sg_entries; - if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR) - flags |= CAM_DATA_SG_PADDR; - else - flags |= CAM_DATA_SG; - data_ptr = (uint8_t *)cam_sglist; - dxfer_len = io->scsiio.kern_data_len; - } else { - /* S/G list with virtual pointers */ - struct ctl_sg_entry *sglist; - int *ti; - - /* - * If we have more S/G list pointers than - * will fit in the available storage in the - * cmd_info structure inside the ctl_io header, - * then we need to send down the pointers - * one element at a time. - */ - - sglist = (struct ctl_sg_entry *) - io->scsiio.kern_data_ptr; - ti = &cmd_info->cur_transfer_index; - data_ptr = sglist[*ti].addr; - dxfer_len = sglist[*ti].len; - csio->sglist_cnt = 0; - if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR) - flags |= CAM_DATA_PADDR; - else - flags |= CAM_DATA_VADDR; - cmd_info->flags |= CTLFE_CMD_PIECEWISE; - (*ti)++; - } + ctlfedata(softc, io, &flags, &data_ptr, &dxfer_len, + &csio->sglist_cnt); io->scsiio.ext_data_filled += dxfer_len; @@ -1416,37 +1433,18 @@ ctlfedone(struct cam_periph *periph, uni * continue sending pieces if necessary. */ if ((cmd_info->flags & CTLFE_CMD_PIECEWISE) - && (io->io_hdr.port_status == 0) - && (cmd_info->cur_transfer_index < - io->scsiio.kern_sg_entries)) { - struct ctl_sg_entry *sglist; + && (io->io_hdr.port_status == 0)) { ccb_flags flags; uint8_t scsi_status; uint8_t *data_ptr; uint32_t dxfer_len; - int *ti; - sglist = (struct ctl_sg_entry *) - io->scsiio.kern_data_ptr; - ti = &cmd_info->cur_transfer_index; flags = atio->ccb_h.flags & (CAM_DIS_DISCONNECT| - CAM_TAG_ACTION_VALID| - CAM_DIR_MASK); - - /* - * Set the direction, relative to the initiator. - */ - flags &= ~CAM_DIR_MASK; - if ((io->io_hdr.flags & CTL_FLAG_DATA_MASK) == - CTL_FLAG_DATA_IN) - flags |= CAM_DIR_IN; - else - flags |= CAM_DIR_OUT; + CAM_TAG_ACTION_VALID); - data_ptr = sglist[*ti].addr; - dxfer_len = sglist[*ti].len; - (*ti)++; + ctlfedata(softc, io, &flags, &data_ptr, + &dxfer_len, &csio->sglist_cnt); scsi_status = 0; From owner-svn-src-stable@FreeBSD.ORG Thu May 8 07:10:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3F77AD6B; Thu, 8 May 2014 07:10:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2183F828; Thu, 8 May 2014 07:10:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s487AdFO053545; Thu, 8 May 2014 07:10:39 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s487Acrw053540; Thu, 8 May 2014 07:10:38 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405080710.s487Acrw053540@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 07:10:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265642 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 07:10:39 -0000 Author: mav Date: Thu May 8 07:10:38 2014 New Revision: 265642 URL: http://svnweb.freebsd.org/changeset/base/265642 Log: MFC r264886: Remove limits on size of READ/WRITE operations. Instead of allocating up to 16MB or RAM at once to handle whole I/O, allocate up to 1MB at a time, but do multiple ctl_datamove() and storage I/Os if needed. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_backend_block.c stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Thu May 8 07:08:47 2014 (r265641) +++ stable/10/sys/cam/ctl/ctl.c Thu May 8 07:10:38 2014 (r265642) @@ -9534,7 +9534,7 @@ ctl_inquiry_evpd_block_limits(struct ctl bl_ptr->page_code = SVPD_BLOCK_LIMITS; scsi_ulto2b(sizeof(*bl_ptr), bl_ptr->page_length); - scsi_ulto4b((16 * 1024 * 1024) / bs, bl_ptr->max_txfer_len); + scsi_ulto4b(0xffffffff, bl_ptr->max_txfer_len); scsi_ulto4b(MAXPHYS / bs, bl_ptr->opt_txfer_len); if (lun->be_lun->flags & CTL_LUN_FLAG_UNMAP) { scsi_ulto4b(0xffffffff, bl_ptr->max_unmap_lba_cnt); Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Thu May 8 07:08:47 2014 (r265641) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Thu May 8 07:10:38 2014 (r265642) @@ -91,11 +91,12 @@ __FBSDID("$FreeBSD$"); #include /* - * The idea here is that we'll allocate enough S/G space to hold a 16MB - * I/O. If we get an I/O larger than that, we'll reject it. + * The idea here is that we'll allocate enough S/G space to hold a 1MB + * I/O. If we get an I/O larger than that, we'll split it. */ -#define CTLBLK_MAX_IO_SIZE (16 * 1024 * 1024) -#define CTLBLK_MAX_SEGS (CTLBLK_MAX_IO_SIZE / MAXPHYS) + 1 +#define CTLBLK_MAX_IO_SIZE (1024 * 1024) +#define CTLBLK_MAX_SEG MAXPHYS +#define CTLBLK_MAX_SEGS MAX(CTLBLK_MAX_IO_SIZE / CTLBLK_MAX_SEG, 1) #ifdef CTLBLK_DEBUG #define DPRINTF(fmt, args...) \ @@ -500,14 +501,6 @@ ctl_be_block_biodone(struct bio *bio) ctl_set_success(&io->scsiio); ctl_complete_beio(beio); } else { - io->scsiio.be_move_done = ctl_be_block_move_done; - io->scsiio.kern_data_ptr = (uint8_t *)beio->sg_segs; - io->scsiio.kern_data_len = beio->io_len; - io->scsiio.kern_total_len = beio->io_len; - io->scsiio.kern_rel_offset = 0; - io->scsiio.kern_data_resid = 0; - io->scsiio.kern_sg_entries = beio->num_segs; - io->io_hdr.flags |= CTL_FLAG_ALLOCATED | CTL_FLAG_KDPTR_SGLIST; #ifdef CTL_TIME_IO getbintime(&io->io_hdr.dma_start_bt); #endif @@ -707,14 +700,6 @@ ctl_be_block_dispatch_file(struct ctl_be ctl_complete_beio(beio); } else { SDT_PROBE(cbb, kernel, read, file_done, 0, 0, 0, 0, 0); - io->scsiio.be_move_done = ctl_be_block_move_done; - io->scsiio.kern_data_ptr = (uint8_t *)beio->sg_segs; - io->scsiio.kern_data_len = beio->io_len; - io->scsiio.kern_total_len = beio->io_len; - io->scsiio.kern_rel_offset = 0; - io->scsiio.kern_data_resid = 0; - io->scsiio.kern_sg_entries = beio->num_segs; - io->io_hdr.flags |= CTL_FLAG_ALLOCATED | CTL_FLAG_KDPTR_SGLIST; #ifdef CTL_TIME_IO getbintime(&io->io_hdr.dma_start_bt); #endif @@ -1014,7 +999,7 @@ ctl_be_block_cw_dispatch_ws(struct ctl_b /* * Setup the S/G entry for this chunk. */ - seglen = MIN(MAXPHYS, len_left); + seglen = MIN(CTLBLK_MAX_SEG, len_left); seglen -= seglen % be_lun->blocksize; beio->sg_segs[i].len = seglen; beio->sg_segs[i].addr = uma_zalloc(be_lun->lun_zone, M_WAITOK); @@ -1167,13 +1152,44 @@ SDT_PROBE_DEFINE1(cbb, kernel, read, all SDT_PROBE_DEFINE1(cbb, kernel, write, alloc_done, "uint64_t"); static void +ctl_be_block_next(struct ctl_be_block_io *beio) +{ + struct ctl_be_block_lun *be_lun; + union ctl_io *io; + + io = beio->io; + be_lun = beio->lun; + ctl_free_beio(beio); + if (((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE) + && ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS)) { + ctl_done(io); + return; + } + + io->scsiio.kern_rel_offset += io->scsiio.kern_data_len; + io->io_hdr.status &= ~CTL_STATUS_MASK; + io->io_hdr.status |= CTL_STATUS_NONE; + + mtx_lock(&be_lun->lock); + /* + * XXX KDM make sure that links is okay to use at this point. + * Otherwise, we either need to add another field to ctl_io_hdr, + * or deal with resource allocation here. + */ + STAILQ_INSERT_TAIL(&be_lun->input_queue, &io->io_hdr, links); + mtx_unlock(&be_lun->lock); + + taskqueue_enqueue(be_lun->io_taskqueue, &be_lun->io_task); +} + +static void ctl_be_block_dispatch(struct ctl_be_block_lun *be_lun, union ctl_io *io) { struct ctl_be_block_io *beio; struct ctl_be_block_softc *softc; struct ctl_lba_len lbalen; - uint64_t len_left, io_size_bytes; + uint64_t len_left, lbaoff; int i; softc = be_lun->softc; @@ -1186,29 +1202,6 @@ ctl_be_block_dispatch(struct ctl_be_bloc SDT_PROBE(cbb, kernel, write, start, 0, 0, 0, 0, 0); } - memcpy(&lbalen, io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes, - sizeof(lbalen)); - - io_size_bytes = lbalen.len * be_lun->blocksize; - - /* - * XXX KDM this is temporary, until we implement chaining of beio - * structures and multiple datamove calls to move all the data in - * or out. - */ - if (io_size_bytes > CTLBLK_MAX_IO_SIZE) { - printf("%s: IO length %ju > max io size %u\n", __func__, - io_size_bytes, CTLBLK_MAX_IO_SIZE); - ctl_set_invalid_field(&io->scsiio, - /*sks_valid*/ 0, - /*command*/ 1, - /*field*/ 0, - /*bit_valid*/ 0, - /*bit*/ 0); - ctl_done(io); - return; - } - beio = ctl_alloc_beio(softc); beio->io = io; beio->lun = be_lun; @@ -1255,20 +1248,25 @@ ctl_be_block_dispatch(struct ctl_be_bloc beio->ds_trans_type = DEVSTAT_WRITE; } - beio->io_len = lbalen.len * be_lun->blocksize; - beio->io_offset = lbalen.lba * be_lun->blocksize; - - DPRINTF("%s at LBA %jx len %u\n", + memcpy(&lbalen, io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes, + sizeof(lbalen)); + DPRINTF("%s at LBA %jx len %u @%ju\n", (beio->bio_cmd == BIO_READ) ? "READ" : "WRITE", - (uintmax_t)lbalen.lba, lbalen.len); - - for (i = 0, len_left = io_size_bytes; i < CTLBLK_MAX_SEGS && - len_left > 0; i++) { + (uintmax_t)lbalen.lba, lbalen.len, lbaoff); + lbaoff = io->scsiio.kern_rel_offset / be_lun->blocksize; + beio->io_offset = (lbalen.lba + lbaoff) * be_lun->blocksize; + beio->io_len = MIN((lbalen.len - lbaoff) * be_lun->blocksize, + CTLBLK_MAX_IO_SIZE); + beio->io_len -= beio->io_len % be_lun->blocksize; + + for (i = 0, len_left = beio->io_len; len_left > 0; i++) { + KASSERT(i < CTLBLK_MAX_SEGS, ("Too many segs (%d >= %d)", + i, CTLBLK_MAX_SEGS)); /* * Setup the S/G entry for this chunk. */ - beio->sg_segs[i].len = min(MAXPHYS, len_left); + beio->sg_segs[i].len = min(CTLBLK_MAX_SEG, len_left); beio->sg_segs[i].addr = uma_zalloc(be_lun->lun_zone, M_WAITOK); DPRINTF("segment %d addr %p len %zd\n", i, @@ -1277,6 +1275,15 @@ ctl_be_block_dispatch(struct ctl_be_bloc beio->num_segs++; len_left -= beio->sg_segs[i].len; } + if (io->scsiio.kern_rel_offset + beio->io_len < + io->scsiio.kern_total_len) + beio->beio_cont = ctl_be_block_next; + io->scsiio.be_move_done = ctl_be_block_move_done; + io->scsiio.kern_data_ptr = (uint8_t *)beio->sg_segs; + io->scsiio.kern_data_len = beio->io_len; + io->scsiio.kern_data_resid = 0; + io->scsiio.kern_sg_entries = beio->num_segs; + io->io_hdr.flags |= CTL_FLAG_ALLOCATED | CTL_FLAG_KDPTR_SGLIST; /* * For the read case, we need to read the data into our buffers and @@ -1288,14 +1295,6 @@ ctl_be_block_dispatch(struct ctl_be_bloc be_lun->dispatch(be_lun, beio); } else { SDT_PROBE(cbb, kernel, write, alloc_done, 0, 0, 0, 0, 0); - io->scsiio.be_move_done = ctl_be_block_move_done; - io->scsiio.kern_data_ptr = (uint8_t *)beio->sg_segs; - io->scsiio.kern_data_len = beio->io_len; - io->scsiio.kern_total_len = beio->io_len; - io->scsiio.kern_rel_offset = 0; - io->scsiio.kern_data_resid = 0; - io->scsiio.kern_sg_entries = beio->num_segs; - io->io_hdr.flags |= CTL_FLAG_ALLOCATED | CTL_FLAG_KDPTR_SGLIST; #ifdef CTL_TIME_IO getbintime(&io->io_hdr.dma_start_bt); #endif @@ -1386,6 +1385,7 @@ ctl_be_block_worker(void *context, int p static int ctl_be_block_submit(union ctl_io *io) { + struct ctl_lba_len lbalen; struct ctl_be_block_lun *be_lun; struct ctl_be_lun *ctl_be_lun; int retval; @@ -1404,6 +1404,11 @@ ctl_be_block_submit(union ctl_io *io) KASSERT(io->io_hdr.io_type == CTL_IO_SCSI, ("Non-SCSI I/O (type " "%#x) encountered", io->io_hdr.io_type)); + memcpy(&lbalen, io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes, + sizeof(lbalen)); + io->scsiio.kern_total_len = lbalen.len * be_lun->blocksize; + io->scsiio.kern_rel_offset = 0; + mtx_lock(&be_lun->lock); /* * XXX KDM make sure that links is okay to use at this point. @@ -1840,7 +1845,7 @@ ctl_be_block_create(struct ctl_be_block_ sprintf(be_lun->lunname, "cblk%d", softc->num_luns); mtx_init(&be_lun->lock, be_lun->lunname, NULL, MTX_DEF); - be_lun->lun_zone = uma_zcreate(be_lun->lunname, MAXPHYS, + be_lun->lun_zone = uma_zcreate(be_lun->lunname, CTLBLK_MAX_SEG, NULL, NULL, NULL, NULL, /*align*/ 0, /*flags*/0); if (be_lun->lun_zone == NULL) { Modified: stable/10/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Thu May 8 07:08:47 2014 (r265641) +++ stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Thu May 8 07:10:38 2014 (r265642) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -73,12 +74,17 @@ typedef enum { } ctl_be_ramdisk_lun_flags; struct ctl_be_ramdisk_lun { + char lunname[32]; uint64_t size_bytes; uint64_t size_blocks; struct ctl_be_ramdisk_softc *softc; ctl_be_ramdisk_lun_flags flags; STAILQ_ENTRY(ctl_be_ramdisk_lun) links; struct ctl_be_lun ctl_be_lun; + struct taskqueue *io_taskqueue; + struct task io_task; + STAILQ_HEAD(, ctl_io_hdr) cont_queue; + struct mtx lock; }; struct ctl_be_ramdisk_softc { @@ -100,6 +106,7 @@ int ctl_backend_ramdisk_init(void); void ctl_backend_ramdisk_shutdown(void); static int ctl_backend_ramdisk_move_done(union ctl_io *io); static int ctl_backend_ramdisk_submit(union ctl_io *io); +static void ctl_backend_ramdisk_continue(union ctl_io *io); static int ctl_backend_ramdisk_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td); static int ctl_backend_ramdisk_rm(struct ctl_be_ramdisk_softc *softc, @@ -108,6 +115,7 @@ static int ctl_backend_ramdisk_create(st struct ctl_lun_req *req, int do_wait); static int ctl_backend_ramdisk_modify(struct ctl_be_ramdisk_softc *softc, struct ctl_lun_req *req); +static void ctl_backend_ramdisk_worker(void *context, int pending); static void ctl_backend_ramdisk_lun_shutdown(void *be_lun); static void ctl_backend_ramdisk_lun_config_status(void *be_lun, ctl_lun_config_status status); @@ -145,7 +153,7 @@ ctl_backend_ramdisk_init(void) mtx_init(&softc->lock, "ramdisk", NULL, MTX_DEF); STAILQ_INIT(&softc->lun_list); - softc->rd_size = 4 * 1024 * 1024; + softc->rd_size = 1024 * 1024; #ifdef CTL_RAMDISK_PAGES softc->num_pages = softc->rd_size / PAGE_SIZE; softc->ramdisk_pages = (uint8_t **)malloc(sizeof(uint8_t *) * @@ -211,16 +219,39 @@ ctl_backend_ramdisk_shutdown(void) static int ctl_backend_ramdisk_move_done(union ctl_io *io) { + struct ctl_be_lun *ctl_be_lun; + struct ctl_be_ramdisk_lun *be_lun; #ifdef CTL_TIME_IO struct bintime cur_bt; #endif CTL_DEBUG_PRINT(("ctl_backend_ramdisk_move_done\n")); + ctl_be_lun = (struct ctl_be_lun *)io->io_hdr.ctl_private[ + CTL_PRIV_BACKEND_LUN].ptr; + be_lun = (struct ctl_be_ramdisk_lun *)ctl_be_lun->be_lun; +#ifdef CTL_TIME_IO + getbintime(&cur_bt); + bintime_sub(&cur_bt, &io->io_hdr.dma_start_bt); + bintime_add(&io->io_hdr.dma_bt, &cur_bt); + io->io_hdr.num_dmas++; +#endif + if (io->scsiio.kern_sg_entries > 0) + free(io->scsiio.kern_data_ptr, M_RAMDISK); + io->scsiio.kern_rel_offset += io->scsiio.kern_data_len; if ((io->io_hdr.port_status == 0) && ((io->io_hdr.flags & CTL_FLAG_ABORT) == 0) - && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)) + && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)) { + if (io->scsiio.kern_rel_offset < io->scsiio.kern_total_len) { + mtx_lock(&be_lun->lock); + STAILQ_INSERT_TAIL(&be_lun->cont_queue, + &io->io_hdr, links); + mtx_unlock(&be_lun->lock); + taskqueue_enqueue(be_lun->io_taskqueue, + &be_lun->io_task); + return (0); + } io->io_hdr.status = CTL_SUCCESS; - else if ((io->io_hdr.port_status != 0) + } else if ((io->io_hdr.port_status != 0) && ((io->io_hdr.flags & CTL_FLAG_ABORT) == 0) && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)){ /* @@ -236,15 +267,6 @@ ctl_backend_ramdisk_move_done(union ctl_ /*retry_count*/ io->io_hdr.port_status); } -#ifdef CTL_TIME_IO - getbintime(&cur_bt); - bintime_sub(&cur_bt, &io->io_hdr.dma_start_bt); - bintime_add(&io->io_hdr.dma_bt, &cur_bt); - io->io_hdr.num_dmas++; -#endif - - if (io->scsiio.kern_sg_entries > 0) - free(io->scsiio.kern_data_ptr, M_RAMDISK); ctl_done(io); return(0); } @@ -253,93 +275,100 @@ static int ctl_backend_ramdisk_submit(union ctl_io *io) { struct ctl_lba_len lbalen; -#ifdef CTL_RAMDISK_PAGES - struct ctl_sg_entry *sg_entries; - int len_filled; - int i; -#endif - int num_sg_entries, len; - struct ctl_be_ramdisk_softc *softc; struct ctl_be_lun *ctl_be_lun; - struct ctl_be_ramdisk_lun *be_lun; - softc = &rd_softc; - ctl_be_lun = (struct ctl_be_lun *)io->io_hdr.ctl_private[ CTL_PRIV_BACKEND_LUN].ptr; - be_lun = (struct ctl_be_ramdisk_lun *)ctl_be_lun->be_lun; memcpy(&lbalen, io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes, sizeof(lbalen)); + io->scsiio.be_move_done = ctl_backend_ramdisk_move_done; + io->scsiio.kern_total_len = lbalen.len * ctl_be_lun->blocksize; + io->scsiio.kern_rel_offset = 0; + io->scsiio.kern_data_resid = 0; + ctl_backend_ramdisk_continue(io); - len = lbalen.len * ctl_be_lun->blocksize; - - /* - * Kick out the request if it's bigger than we can handle. - */ - if (len > softc->rd_size) { - ctl_set_internal_failure(&io->scsiio, - /*sks_valid*/ 0, - /*retry_count*/ 0); - ctl_done(io); - return (CTL_RETVAL_COMPLETE); - } - - /* - * Kick out the request if it's larger than the device size that - * the user requested. - */ - if (((lbalen.lba * ctl_be_lun->blocksize) + len) > be_lun->size_bytes) { - ctl_set_lba_out_of_range(&io->scsiio); - ctl_done(io); - return (CTL_RETVAL_COMPLETE); - } + return (CTL_RETVAL_COMPLETE); +} +static void +ctl_backend_ramdisk_continue(union ctl_io *io) +{ + struct ctl_be_ramdisk_softc *softc; + int len, len_filled, sg_filled; #ifdef CTL_RAMDISK_PAGES - num_sg_entries = len >> PAGE_SHIFT; - if ((len & (PAGE_SIZE - 1)) != 0) - num_sg_entries++; + struct ctl_sg_entry *sg_entries; + int i; +#endif - if (num_sg_entries > 1) { + softc = &rd_softc; + len = io->scsiio.kern_total_len - io->scsiio.kern_rel_offset; +#ifdef CTL_RAMDISK_PAGES + sg_filled = min(btoc(len), softc->num_pages); + if (sg_filled > 1) { io->scsiio.kern_data_ptr = malloc(sizeof(struct ctl_sg_entry) * - num_sg_entries, M_RAMDISK, + sg_filled, M_RAMDISK, M_WAITOK); sg_entries = (struct ctl_sg_entry *)io->scsiio.kern_data_ptr; - for (i = 0, len_filled = 0; i < num_sg_entries; - i++, len_filled += PAGE_SIZE) { + for (i = 0, len_filled = 0; i < sg_filled; i++) { sg_entries[i].addr = softc->ramdisk_pages[i]; sg_entries[i].len = ctl_min(PAGE_SIZE, len - len_filled); + len_filled += sg_entries[i].len; } + io->io_hdr.flags |= CTL_FLAG_KDPTR_SGLIST; } else { -#endif /* CTL_RAMDISK_PAGES */ - /* - * If this is less than 1 page, don't bother allocating a - * scatter/gather list for it. This saves time/overhead. - */ - num_sg_entries = 0; -#ifdef CTL_RAMDISK_PAGES + sg_filled = 0; + len_filled = len; io->scsiio.kern_data_ptr = softc->ramdisk_pages[0]; -#else - io->scsiio.kern_data_ptr = softc->ramdisk_buffer; -#endif -#ifdef CTL_RAMDISK_PAGES } -#endif +#else + sg_filled = 0; + len_filled = min(len, softc->rd_size); + io->scsiio.kern_data_ptr = softc->ramdisk_buffer; +#endif /* CTL_RAMDISK_PAGES */ - io->scsiio.be_move_done = ctl_backend_ramdisk_move_done; - io->scsiio.kern_data_len = len; - io->scsiio.kern_total_len = len; - io->scsiio.kern_rel_offset = 0; - io->scsiio.kern_data_resid = 0; - io->scsiio.kern_sg_entries = num_sg_entries; - io->io_hdr.flags |= CTL_FLAG_ALLOCATED | CTL_FLAG_KDPTR_SGLIST; + io->scsiio.kern_data_len = len_filled; + io->scsiio.kern_sg_entries = sg_filled; + io->io_hdr.flags |= CTL_FLAG_ALLOCATED; #ifdef CTL_TIME_IO getbintime(&io->io_hdr.dma_start_bt); #endif ctl_datamove(io); +} - return (CTL_RETVAL_COMPLETE); +static void +ctl_backend_ramdisk_worker(void *context, int pending) +{ + struct ctl_be_ramdisk_softc *softc; + struct ctl_be_ramdisk_lun *be_lun; + union ctl_io *io; + + be_lun = (struct ctl_be_ramdisk_lun *)context; + softc = be_lun->softc; + + mtx_lock(&be_lun->lock); + for (;;) { + io = (union ctl_io *)STAILQ_FIRST(&be_lun->cont_queue); + if (io != NULL) { + STAILQ_REMOVE(&be_lun->cont_queue, &io->io_hdr, + ctl_io_hdr, links); + + mtx_unlock(&be_lun->lock); + + ctl_backend_ramdisk_continue(io); + + mtx_lock(&be_lun->lock); + continue; + } + + /* + * If we get here, there is no work left in the queues, so + * just break out and let the task queue go to sleep. + */ + break; + } + mtx_unlock(&be_lun->lock); } static int @@ -470,8 +499,12 @@ ctl_backend_ramdisk_rm(struct ctl_be_ram mtx_unlock(&softc->lock); - if (retval == 0) + if (retval == 0) { + taskqueue_drain(be_lun->io_taskqueue, &be_lun->io_task); + taskqueue_free(be_lun->io_taskqueue); + mtx_destroy(&be_lun->lock); free(be_lun, M_RAMDISK); + } req->status = CTL_LUN_OK; @@ -509,6 +542,7 @@ ctl_backend_ramdisk_create(struct ctl_be sizeof(*be_lun)); goto bailout_error; } + sprintf(be_lun->lunname, "cram%d", softc->num_luns); STAILQ_INIT(&be_lun->ctl_be_lun.options); if (params->flags & CTL_LUN_FLAG_DEV_TYPE) @@ -611,6 +645,27 @@ ctl_backend_ramdisk_create(struct ctl_be sizeof(params->device_id))); } + STAILQ_INIT(&be_lun->cont_queue); + mtx_init(&be_lun->lock, "CTL ramdisk", NULL, MTX_DEF); + TASK_INIT(&be_lun->io_task, /*priority*/0, ctl_backend_ramdisk_worker, + be_lun); + + be_lun->io_taskqueue = taskqueue_create(be_lun->lunname, M_WAITOK, + taskqueue_thread_enqueue, /*context*/&be_lun->io_taskqueue); + if (be_lun->io_taskqueue == NULL) { + snprintf(req->error_str, sizeof(req->error_str), + "%s: Unable to create taskqueue", __func__); + goto bailout_error; + } + + retval = taskqueue_start_threads(&be_lun->io_taskqueue, + /*num threads*/1, + /*priority*/PWAIT, + /*thread name*/ + "%s taskq", be_lun->lunname); + if (retval != 0) + goto bailout_error; + mtx_lock(&softc->lock); softc->num_luns++; STAILQ_INSERT_TAIL(&softc->lun_list, be_lun, links); @@ -669,7 +724,13 @@ ctl_backend_ramdisk_create(struct ctl_be bailout_error: req->status = CTL_LUN_ERROR; - free(be_lun, M_RAMDISK); + if (be_lun != NULL) { + if (be_lun->io_taskqueue != NULL) { + taskqueue_free(be_lun->io_taskqueue); + } + mtx_destroy(&be_lun->lock); + free(be_lun, M_RAMDISK); + } return (retval); } From owner-svn-src-stable@FreeBSD.ORG Thu May 8 07:12:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1B23EEC0; Thu, 8 May 2014 07:12:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07DF783C; Thu, 8 May 2014 07:12:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s487C6MN054361; Thu, 8 May 2014 07:12:06 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s487C6dv054360; Thu, 8 May 2014 07:12:06 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405080712.s487C6dv054360@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 07:12:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265643 - stable/10/sys/cam/scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 07:12:07 -0000 Author: mav Date: Thu May 8 07:12:06 2014 New Revision: 265643 URL: http://svnweb.freebsd.org/changeset/base/265643 Log: MFC r265150: Do not reread SCSI disk VPD pages on every device open. Instead of rereading VPD pages on every device open, do it only on initial device probe, and in cases when device reported via UNIT ATTENTIONs that something has changed. Capacity is still rereaded on every open because it is more critical for operation and more probable to change in run time. On my tests with Intel 530 SSDs on mps(4) HBA this change reduces time GEOM needs to retaste the device (that includes few open/close cycles) from ~150ms to ~30ms. Modified: stable/10/sys/cam/scsi/scsi_da.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_da.c Thu May 8 07:10:38 2014 (r265642) +++ stable/10/sys/cam/scsi/scsi_da.c Thu May 8 07:12:06 2014 (r265643) @@ -90,7 +90,8 @@ typedef enum { DA_FLAG_SCTX_INIT = 0x200, DA_FLAG_CAN_RC16 = 0x400, DA_FLAG_PROBED = 0x800, - DA_FLAG_DIRTY = 0x1000 + DA_FLAG_DIRTY = 0x1000, + DA_FLAG_ANNOUNCED = 0x2000 } da_flags; typedef enum { @@ -1658,10 +1659,18 @@ daasync(void *callback_arg, u_int32_t co &error_code, &sense_key, &asc, &ascq)) { if (asc == 0x2A && ascq == 0x09) { xpt_print(ccb->ccb_h.path, - "capacity data has changed\n"); + "Capacity data has changed\n"); + softc->flags &= ~DA_FLAG_PROBED; dareprobe(periph); - } else if (asc == 0x28 && ascq == 0x00) + } else if (asc == 0x28 && ascq == 0x00) { + softc->flags &= ~DA_FLAG_PROBED; disk_media_changed(softc->disk, M_NOWAIT); + } else if (asc == 0x3F && ascq == 0x03) { + xpt_print(ccb->ccb_h.path, + "INQUIRY data has changed\n"); + softc->flags &= ~DA_FLAG_PROBED; + dareprobe(periph); + } } cam_periph_async(periph, code, path, arg); break; @@ -1891,7 +1900,7 @@ daprobedone(struct cam_periph *periph, u dadeletemethodchoose(softc, DA_DELETE_NONE); - if (bootverbose && (softc->flags & DA_FLAG_PROBED) == 0) { + if (bootverbose && (softc->flags & DA_FLAG_ANNOUNCED) == 0) { char buf[80]; int i, sep; @@ -1932,10 +1941,11 @@ daprobedone(struct cam_periph *periph, u */ xpt_release_ccb(ccb); softc->state = DA_STATE_NORMAL; + softc->flags |= DA_FLAG_PROBED; daschedule(periph); wakeup(&softc->disk->d_mediasize); - if ((softc->flags & DA_FLAG_PROBED) == 0) { - softc->flags |= DA_FLAG_PROBED; + if ((softc->flags & DA_FLAG_ANNOUNCED) == 0) { + softc->flags |= DA_FLAG_ANNOUNCED; cam_periph_unhold(periph); } else cam_periph_release_locked(periph); @@ -3193,7 +3203,8 @@ dadone(struct cam_periph *periph, union } } free(csio->data_ptr, M_SCSIDA); - if (announce_buf[0] != '\0' && ((softc->flags & DA_FLAG_PROBED) == 0)) { + if (announce_buf[0] != '\0' && + ((softc->flags & DA_FLAG_ANNOUNCED) == 0)) { /* * Create our sysctl variables, now that we know * we have successfully attached. @@ -3211,6 +3222,12 @@ dadone(struct cam_periph *periph, union } } + /* We already probed the device. */ + if (softc->flags & DA_FLAG_PROBED) { + daprobedone(periph, done_ccb); + return; + } + /* Ensure re-probe doesn't see old delete. */ softc->delete_available = 0; if (lbp && (softc->quirks & DA_Q_NO_UNMAP) == 0) { @@ -3528,13 +3545,21 @@ daerror(union ccb *ccb, u_int32_t cam_fl */ else if (sense_key == SSD_KEY_UNIT_ATTENTION && asc == 0x2A && ascq == 0x09) { - xpt_print(periph->path, "capacity data has changed\n"); + xpt_print(periph->path, "Capacity data has changed\n"); + softc->flags &= ~DA_FLAG_PROBED; dareprobe(periph); sense_flags |= SF_NO_PRINT; } else if (sense_key == SSD_KEY_UNIT_ATTENTION && - asc == 0x28 && ascq == 0x00) + asc == 0x28 && ascq == 0x00) { + softc->flags &= ~DA_FLAG_PROBED; disk_media_changed(softc->disk, M_NOWAIT); - else if (sense_key == SSD_KEY_NOT_READY && + } else if (sense_key == SSD_KEY_UNIT_ATTENTION && + asc == 0x3F && ascq == 0x03) { + xpt_print(periph->path, "INQUIRY data has changed\n"); + softc->flags &= ~DA_FLAG_PROBED; + dareprobe(periph); + sense_flags |= SF_NO_PRINT; + } else if (sense_key == SSD_KEY_NOT_READY && asc == 0x3a && (softc->flags & DA_FLAG_PACK_INVALID) == 0) { softc->flags |= DA_FLAG_PACK_INVALID; disk_media_gone(softc->disk, M_NOWAIT); From owner-svn-src-stable@FreeBSD.ORG Thu May 8 07:13:23 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4CAE48F; Thu, 8 May 2014 07:13:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E5F2848; Thu, 8 May 2014 07:13:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s487DNZD054573; Thu, 8 May 2014 07:13:23 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s487DN3A054572; Thu, 8 May 2014 07:13:23 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405080713.s487DN3A054572@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 07:13:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265644 - stable/10/sys/cam/scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 07:13:23 -0000 Author: mav Date: Thu May 8 07:13:22 2014 New Revision: 265644 URL: http://svnweb.freebsd.org/changeset/base/265644 Log: MFC r265159: Respect MAXIMUM TRANSFER LENGTH field of Block Limits VPD page. Nobody yet reported disk supporting I/Os less then our MAXPHYS value, but since we any way have code to read Block Limits VPD page, that is easy. Modified: stable/10/sys/cam/scsi/scsi_da.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_da.c Thu May 8 07:12:06 2014 (r265643) +++ stable/10/sys/cam/scsi/scsi_da.c Thu May 8 07:13:22 2014 (r265644) @@ -212,6 +212,7 @@ struct da_softc { int trim_max_ranges; int delete_running; int delete_available; /* Delete methods possibly available */ + u_int maxio; uint32_t unmap_max_ranges; uint32_t unmap_max_lba; /* Max LBAs in UNMAP req */ uint64_t ws_max_blks; @@ -2135,11 +2136,12 @@ daregister(struct cam_periph *periph, vo softc->disk->d_name = "da"; softc->disk->d_drv1 = periph; if (cpi.maxio == 0) - softc->disk->d_maxsize = DFLTPHYS; /* traditional default */ + softc->maxio = DFLTPHYS; /* traditional default */ else if (cpi.maxio > MAXPHYS) - softc->disk->d_maxsize = MAXPHYS; /* for safety */ + softc->maxio = MAXPHYS; /* for safety */ else - softc->disk->d_maxsize = cpi.maxio; + softc->maxio = cpi.maxio; + softc->disk->d_maxsize = softc->maxio; softc->disk->d_unit = periph->unit_number; softc->disk->d_flags = DISKFLAG_DIRECT_COMPLETION; if ((softc->quirks & DA_Q_NO_SYNC_CACHE) == 0) @@ -3279,14 +3281,6 @@ dadone(struct cam_periph *periph, union (lbp->flags & SVPD_LBP_WS10)); dadeleteflag(softc, DA_DELETE_UNMAP, (lbp->flags & SVPD_LBP_UNMAP)); - - if (lbp->flags & SVPD_LBP_UNMAP) { - free(lbp, M_SCSIDA); - xpt_release_ccb(done_ccb); - softc->state = DA_STATE_PROBE_BLK_LIMITS; - xpt_schedule(periph, priority); - return; - } } else { int error; error = daerror(done_ccb, CAM_RETRY_SELTO, @@ -3312,7 +3306,7 @@ dadone(struct cam_periph *periph, union free(lbp, M_SCSIDA); xpt_release_ccb(done_ccb); - softc->state = DA_STATE_PROBE_BDC; + softc->state = DA_STATE_PROBE_BLK_LIMITS; xpt_schedule(periph, priority); return; } @@ -3323,12 +3317,20 @@ dadone(struct cam_periph *periph, union block_limits = (struct scsi_vpd_block_limits *)csio->data_ptr; if ((csio->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) { + uint32_t max_txfer_len = scsi_4btoul( + block_limits->max_txfer_len); uint32_t max_unmap_lba_cnt = scsi_4btoul( block_limits->max_unmap_lba_cnt); uint32_t max_unmap_blk_cnt = scsi_4btoul( block_limits->max_unmap_blk_cnt); uint64_t ws_max_blks = scsi_8btou64( block_limits->max_write_same_length); + + if (max_txfer_len != 0) { + softc->disk->d_maxsize = MIN(softc->maxio, + (off_t)max_txfer_len * softc->params.secsize); + } + /* * We should already support UNMAP but we check lba * and block count to be sure From owner-svn-src-stable@FreeBSD.ORG Thu May 8 07:56:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 47CADBEB; Thu, 8 May 2014 07:56:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 348C7B98; Thu, 8 May 2014 07:56:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s487u6FJ071803; Thu, 8 May 2014 07:56:06 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s487u61h071802; Thu, 8 May 2014 07:56:06 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405080756.s487u61h071802@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 07:56:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265645 - in stable/9: . sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 07:56:06 -0000 Author: mav Date: Thu May 8 07:56:05 2014 New Revision: 265645 URL: http://svnweb.freebsd.org/changeset/base/265645 Log: MFC r244015 (by ken): Fix the CTL OOA queue dumping code so that it does not hold a mutex while doing a copyout. That can cause a panic, because copyout can trigger VM faults, and we can't handle VM faults while holding a mutex. The solution here is to malloc a separate buffer to hold the OOA queue entries, so that we don't risk a VM fault while filling up the buffer and we don't have to drop the lock. The other solution would be to wire the user's memory while filling their buffer with copyout, but that would have been a little more complex. Also fix a debugging parenthesis issue in ctl_abort_task() pointed out by Chuck Tuffli. Modified: Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Thu May 8 08:08:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 272BFF9; Thu, 8 May 2014 08:08:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 13E55C87; Thu, 8 May 2014 08:08:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4888O91076910; Thu, 8 May 2014 08:08:24 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4888O0Q076909; Thu, 8 May 2014 08:08:24 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405080808.s4888O0Q076909@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 08:08:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265646 - stable/9/sys/cam/scsi X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 08:08:25 -0000 Author: mav Date: Thu May 8 08:08:24 2014 New Revision: 265646 URL: http://svnweb.freebsd.org/changeset/base/265646 Log: MFC r255043 (by ken): Bump up the default timeouts for move commands in the ch(4) driver to 15 minutes, and 5 minutes for things like READ ELEMENT STATUS. This is needed to account for the worst case scenarios on at least some Spectra Logic tape libraries. Modified: stable/9/sys/cam/scsi/scsi_ch.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_ch.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_ch.c Thu May 8 07:56:05 2014 (r265645) +++ stable/9/sys/cam/scsi/scsi_ch.c Thu May 8 08:08:24 2014 (r265646) @@ -99,10 +99,10 @@ __FBSDID("$FreeBSD$"); */ static const u_int32_t CH_TIMEOUT_MODE_SENSE = 6000; -static const u_int32_t CH_TIMEOUT_MOVE_MEDIUM = 100000; -static const u_int32_t CH_TIMEOUT_EXCHANGE_MEDIUM = 100000; -static const u_int32_t CH_TIMEOUT_POSITION_TO_ELEMENT = 100000; -static const u_int32_t CH_TIMEOUT_READ_ELEMENT_STATUS = 60000; +static const u_int32_t CH_TIMEOUT_MOVE_MEDIUM = 15 * 60 * 1000; +static const u_int32_t CH_TIMEOUT_EXCHANGE_MEDIUM = 15 * 60 * 1000; +static const u_int32_t CH_TIMEOUT_POSITION_TO_ELEMENT = 15 * 60 * 1000; +static const u_int32_t CH_TIMEOUT_READ_ELEMENT_STATUS = 5 * 60 * 1000; static const u_int32_t CH_TIMEOUT_SEND_VOLTAG = 10000; static const u_int32_t CH_TIMEOUT_INITIALIZE_ELEMENT_STATUS = 500000; From owner-svn-src-stable@FreeBSD.ORG Thu May 8 08:11:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E80131F; Thu, 8 May 2014 08:11:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6AD91D19; Thu, 8 May 2014 08:11:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s488BjBo078868; Thu, 8 May 2014 08:11:45 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s488Bjoj078862; Thu, 8 May 2014 08:11:45 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405080811.s488Bjoj078862@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 08:11:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265647 - in stable/9/sys/cam: ata scsi X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 08:11:45 -0000 Author: mav Date: Thu May 8 08:11:44 2014 New Revision: 265647 URL: http://svnweb.freebsd.org/changeset/base/265647 Log: MFC r256547 (by smh): Added 4K quirks for Corsair Neutron GTX SSD's Modified: stable/9/sys/cam/ata/ata_da.c stable/9/sys/cam/scsi/scsi_da.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ata/ata_da.c ============================================================================== --- stable/9/sys/cam/ata/ata_da.c Thu May 8 08:08:24 2014 (r265646) +++ stable/9/sys/cam/ata/ata_da.c Thu May 8 08:11:44 2014 (r265647) @@ -293,6 +293,14 @@ static struct ada_quirk_entry ada_quirk_ }, { /* + * Corsair Neutron GTX SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "Corsair Neutron GTX*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* * Corsair Force GT SSDs * 4k optimised & trim only works in 4k requests + 4k aligned */ Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Thu May 8 08:08:24 2014 (r265646) +++ stable/9/sys/cam/scsi/scsi_da.c Thu May 8 08:11:44 2014 (r265647) @@ -956,6 +956,14 @@ static struct da_quirk_entry da_quirk_ta { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "Corsair Force 3*", "*" }, /*quirks*/DA_Q_4K }, + { + /* + * Corsair Neutron GTX SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "Corsair Neutron GTX*", "*" }, + /*quirks*/DA_Q_4K + }, { /* * Corsair Force GT SSDs From owner-svn-src-stable@FreeBSD.ORG Thu May 8 08:15:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CDFDC4E2; Thu, 8 May 2014 08:15:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE85ED4F; Thu, 8 May 2014 08:15:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s488FhUC081356; Thu, 8 May 2014 08:15:43 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s488FhLD081352; Thu, 8 May 2014 08:15:43 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405080815.s488FhLD081352@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 08:15:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265648 - stable/9/sys/cam/ctl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 08:15:43 -0000 Author: mav Date: Thu May 8 08:15:42 2014 New Revision: 265648 URL: http://svnweb.freebsd.org/changeset/base/265648 Log: MFC r257946: Introduce seperate mutex lock to protect protect CTL I/O pools, slightly reducing global CTL lock scope and congestion. While there, simplify CTL I/O pools KPI, hiding implementation details. Modified: stable/9/sys/cam/ctl/ctl.c stable/9/sys/cam/ctl/ctl_frontend.c stable/9/sys/cam/ctl/ctl_private.h Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ctl/ctl.c ============================================================================== --- stable/9/sys/cam/ctl/ctl.c Thu May 8 08:11:44 2014 (r265647) +++ stable/9/sys/cam/ctl/ctl.c Thu May 8 08:15:42 2014 (r265648) @@ -364,7 +364,6 @@ static union ctl_io *ctl_malloc_io(ctl_i int can_wait); static void ctl_kfree_io(union ctl_io *io); #endif /* unused */ -static void ctl_free_io_internal(union ctl_io *io, int have_lock); static int ctl_alloc_lun(struct ctl_softc *ctl_softc, struct ctl_lun *lun, struct ctl_be_lun *be_lun, struct ctl_id target_id); static int ctl_free_lun(struct ctl_lun *lun); @@ -1001,6 +1000,7 @@ ctl_init(void) "Report no lun possible for invalid LUNs"); mtx_init(&softc->ctl_lock, "CTL mutex", NULL, MTX_DEF); + mtx_init(&softc->pool_lock, "CTL pool mutex", NULL, MTX_DEF); softc->open_count = 0; /* @@ -1060,7 +1060,7 @@ ctl_init(void) CTL_POOL_ENTRIES_EMERGENCY, &emergency_pool) != 0) { printf("ctl: can't allocate %d entry emergency pool, " "exiting\n", CTL_POOL_ENTRIES_EMERGENCY); - ctl_pool_free(softc, internal_pool); + ctl_pool_free(internal_pool); return (ENOMEM); } @@ -1069,8 +1069,8 @@ ctl_init(void) { printf("ctl: can't allocate %d entry other SC pool, " "exiting\n", CTL_POOL_ENTRIES_OTHER_SC); - ctl_pool_free(softc, internal_pool); - ctl_pool_free(softc, emergency_pool); + ctl_pool_free(internal_pool); + ctl_pool_free(emergency_pool); return (ENOMEM); } @@ -1078,12 +1078,6 @@ ctl_init(void) softc->emergency_pool = emergency_pool; softc->othersc_pool = other_pool; - mtx_lock(&softc->ctl_lock); - ctl_pool_acquire(internal_pool); - ctl_pool_acquire(emergency_pool); - ctl_pool_acquire(other_pool); - mtx_unlock(&softc->ctl_lock); - /* * We used to allocate a processor LUN here. The new scheme is to * just let the user allocate LUNs as he sees fit. @@ -1100,10 +1094,10 @@ ctl_init(void) printf("error creating CTL work thread!\n"); mtx_lock(&softc->ctl_lock); ctl_free_lun(lun); - ctl_pool_free(softc, internal_pool); - ctl_pool_free(softc, emergency_pool); - ctl_pool_free(softc, other_pool); mtx_unlock(&softc->ctl_lock); + ctl_pool_free(internal_pool); + ctl_pool_free(emergency_pool); + ctl_pool_free(other_pool); return (error); } printf("ctl: CAM Target Layer loaded\n"); @@ -1156,7 +1150,7 @@ ctl_shutdown(void) { struct ctl_softc *softc; struct ctl_lun *lun, *next_lun; - struct ctl_io_pool *pool, *next_pool; + struct ctl_io_pool *pool; softc = (struct ctl_softc *)control_softc; @@ -1173,6 +1167,8 @@ ctl_shutdown(void) ctl_free_lun(lun); } + mtx_unlock(&softc->ctl_lock); + /* * This will rip the rug out from under any FETDs or anyone else * that has a pool allocated. Since we increment our module @@ -1181,18 +1177,14 @@ ctl_shutdown(void) * able to unload the CTL module until client modules have * successfully unloaded. */ - for (pool = STAILQ_FIRST(&softc->io_pools); pool != NULL; - pool = next_pool) { - next_pool = STAILQ_NEXT(pool, links); - ctl_pool_free(softc, pool); - } - - mtx_unlock(&softc->ctl_lock); + while ((pool = STAILQ_FIRST(&softc->io_pools)) != NULL) + ctl_pool_free(pool); #if 0 ctl_shutdown_thread(softc->work_thread); #endif + mtx_destroy(&softc->pool_lock); mtx_destroy(&softc->ctl_lock); destroy_dev(softc->dev); @@ -3342,11 +3334,12 @@ ctl_pool_create(struct ctl_softc *ctl_so pool->type = pool_type; pool->ctl_softc = ctl_softc; - mtx_lock(&ctl_softc->ctl_lock); + mtx_lock(&ctl_softc->pool_lock); pool->id = ctl_softc->cur_pool_id++; - mtx_unlock(&ctl_softc->ctl_lock); + mtx_unlock(&ctl_softc->pool_lock); pool->flags = CTL_POOL_FLAG_NONE; + pool->refcount = 1; /* Reference for validity. */ STAILQ_INIT(&pool->free_queue); /* @@ -3382,7 +3375,7 @@ ctl_pool_create(struct ctl_softc *ctl_so free(pool, M_CTL); goto bailout; } - mtx_lock(&ctl_softc->ctl_lock); + mtx_lock(&ctl_softc->pool_lock); ctl_softc->num_pools++; STAILQ_INSERT_TAIL(&ctl_softc->io_pools, pool, links); /* @@ -3401,7 +3394,7 @@ ctl_pool_create(struct ctl_softc *ctl_so MOD_INC_USE_COUNT; #endif - mtx_unlock(&ctl_softc->ctl_lock); + mtx_unlock(&ctl_softc->pool_lock); *npool = pool; @@ -3410,14 +3403,11 @@ bailout: return (retval); } -int +static int ctl_pool_acquire(struct ctl_io_pool *pool) { - mtx_assert(&control_softc->ctl_lock, MA_OWNED); - - if (pool == NULL) - return (-EINVAL); + mtx_assert(&pool->ctl_softc->pool_lock, MA_OWNED); if (pool->flags & CTL_POOL_FLAG_INVALID) return (-EINVAL); @@ -3427,51 +3417,21 @@ ctl_pool_acquire(struct ctl_io_pool *poo return (0); } -int -ctl_pool_invalidate(struct ctl_io_pool *pool) -{ - - mtx_assert(&control_softc->ctl_lock, MA_OWNED); - - if (pool == NULL) - return (-EINVAL); - - pool->flags |= CTL_POOL_FLAG_INVALID; - - return (0); -} - -int +static void ctl_pool_release(struct ctl_io_pool *pool) { + struct ctl_softc *ctl_softc = pool->ctl_softc; + union ctl_io *io; - mtx_assert(&control_softc->ctl_lock, MA_OWNED); - - if (pool == NULL) - return (-EINVAL); - - if ((--pool->refcount == 0) - && (pool->flags & CTL_POOL_FLAG_INVALID)) { - ctl_pool_free(pool->ctl_softc, pool); - } - - return (0); -} - -void -ctl_pool_free(struct ctl_softc *ctl_softc, struct ctl_io_pool *pool) -{ - union ctl_io *cur_io, *next_io; + mtx_assert(&ctl_softc->pool_lock, MA_OWNED); - mtx_assert(&ctl_softc->ctl_lock, MA_OWNED); + if (--pool->refcount != 0) + return; - for (cur_io = (union ctl_io *)STAILQ_FIRST(&pool->free_queue); - cur_io != NULL; cur_io = next_io) { - next_io = (union ctl_io *)STAILQ_NEXT(&cur_io->io_hdr, - links); - STAILQ_REMOVE(&pool->free_queue, &cur_io->io_hdr, ctl_io_hdr, + while ((io = (union ctl_io *)STAILQ_FIRST(&pool->free_queue)) != NULL) { + STAILQ_REMOVE(&pool->free_queue, &io->io_hdr, ctl_io_hdr, links); - free(cur_io, M_CTL); + free(io, M_CTL); } STAILQ_REMOVE(&ctl_softc->io_pools, pool, ctl_io_pool, links); @@ -3490,6 +3450,21 @@ ctl_pool_free(struct ctl_softc *ctl_soft free(pool, M_CTL); } +void +ctl_pool_free(struct ctl_io_pool *pool) +{ + struct ctl_softc *ctl_softc; + + if (pool == NULL) + return; + + ctl_softc = pool->ctl_softc; + mtx_lock(&ctl_softc->pool_lock); + pool->flags |= CTL_POOL_FLAG_INVALID; + ctl_pool_release(pool); + mtx_unlock(&ctl_softc->pool_lock); +} + /* * This routine does not block (except for spinlocks of course). * It tries to allocate a ctl_io union from the caller's pool as quickly as @@ -3514,7 +3489,7 @@ ctl_alloc_io(void *pool_ref) ctl_softc = pool->ctl_softc; - mtx_lock(&ctl_softc->ctl_lock); + mtx_lock(&ctl_softc->pool_lock); /* * First, try to get the io structure from the user's pool. */ @@ -3524,7 +3499,7 @@ ctl_alloc_io(void *pool_ref) STAILQ_REMOVE_HEAD(&pool->free_queue, links); pool->total_allocated++; pool->free_ctl_io--; - mtx_unlock(&ctl_softc->ctl_lock); + mtx_unlock(&ctl_softc->pool_lock); return (io); } else ctl_pool_release(pool); @@ -3547,14 +3522,14 @@ ctl_alloc_io(void *pool_ref) STAILQ_REMOVE_HEAD(&npool->free_queue, links); npool->total_allocated++; npool->free_ctl_io--; - mtx_unlock(&ctl_softc->ctl_lock); + mtx_unlock(&ctl_softc->pool_lock); return (io); } else ctl_pool_release(npool); } /* Drop the spinlock before we malloc */ - mtx_unlock(&ctl_softc->ctl_lock); + mtx_unlock(&ctl_softc->pool_lock); /* * The emergency pool (if it exists) didn't have one, so try an @@ -3567,7 +3542,7 @@ ctl_alloc_io(void *pool_ref) * ctl_io to its list when it gets freed. */ if (emergency_pool != NULL) { - mtx_lock(&ctl_softc->ctl_lock); + mtx_lock(&ctl_softc->pool_lock); if (ctl_pool_acquire(emergency_pool) == 0) { io->io_hdr.pool = emergency_pool; emergency_pool->total_ctl_io++; @@ -3579,7 +3554,7 @@ ctl_alloc_io(void *pool_ref) */ emergency_pool->total_allocated++; } - mtx_unlock(&ctl_softc->ctl_lock); + mtx_unlock(&ctl_softc->pool_lock); } else io->io_hdr.pool = NULL; } @@ -3587,8 +3562,8 @@ ctl_alloc_io(void *pool_ref) return (io); } -static void -ctl_free_io_internal(union ctl_io *io, int have_lock) +void +ctl_free_io(union ctl_io *io) { if (io == NULL) return; @@ -3609,8 +3584,7 @@ ctl_free_io_internal(union ctl_io *io, i pool = (struct ctl_io_pool *)io->io_hdr.pool; - if (have_lock == 0) - mtx_lock(&pool->ctl_softc->ctl_lock); + mtx_lock(&pool->ctl_softc->pool_lock); #if 0 save_flags(xflags); @@ -3647,8 +3621,7 @@ ctl_free_io_internal(union ctl_io *io, i pool->total_freed++; pool->free_ctl_io++; ctl_pool_release(pool); - if (have_lock == 0) - mtx_unlock(&pool->ctl_softc->ctl_lock); + mtx_unlock(&pool->ctl_softc->pool_lock); } else { /* * Otherwise, just free it. We probably malloced it and @@ -3660,12 +3633,6 @@ ctl_free_io_internal(union ctl_io *io, i } void -ctl_free_io(union ctl_io *io) -{ - ctl_free_io_internal(io, /*have_lock*/ 0); -} - -void ctl_zero_io(union ctl_io *io) { void *pool_ref; @@ -4466,7 +4433,7 @@ ctl_free_lun(struct ctl_lun *lun) io = next_io) { next_io = (union ctl_io *)TAILQ_NEXT(&io->io_hdr, ooa_links); TAILQ_REMOVE(&lun->ooa_queue, &io->io_hdr, ooa_links); - ctl_free_io_internal(io, /*have_lock*/ 1); + ctl_free_io(io); } softc->num_luns--; @@ -10160,7 +10127,7 @@ ctl_failover(void) TAILQ_REMOVE(&lun->ooa_queue, &io->io_hdr, ooa_links); - ctl_free_io_internal(io, 1); + ctl_free_io(io); } } @@ -10176,7 +10143,7 @@ ctl_failover(void) &io->io_hdr, ooa_links); - ctl_free_io_internal(io, 1); + ctl_free_io(io); } } ctl_check_blocked(lun); @@ -11057,7 +11024,7 @@ ctl_run_task_queue(struct ctl_softc *ctl io->taskio.tag_num : io->scsiio.tag_num); STAILQ_REMOVE(&ctl_softc->task_queue, &io->io_hdr, ctl_io_hdr, links); - ctl_free_io_internal(io, 1); + ctl_free_io(io); break; } } @@ -11150,7 +11117,7 @@ ctl_handle_isc(union ctl_io *io) break; } if (free_io) - ctl_free_io_internal(io, 0); + ctl_free_io(io); } @@ -12298,7 +12265,7 @@ ctl_process_done(union ctl_io *io, int h case CTL_IO_TASK: ctl_io_error_print(io, NULL); if (io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) - ctl_free_io_internal(io, /*have_lock*/ 0); + ctl_free_io(io); else fe_done(io); return (CTL_RETVAL_COMPLETE); @@ -12617,7 +12584,7 @@ ctl_process_done(union ctl_io *io, int h /* XXX do something here */ } - ctl_free_io_internal(io, /*have_lock*/ 0); + ctl_free_io(io); } else fe_done(io); Modified: stable/9/sys/cam/ctl/ctl_frontend.c ============================================================================== --- stable/9/sys/cam/ctl/ctl_frontend.c Thu May 8 08:11:44 2014 (r265647) +++ stable/9/sys/cam/ctl/ctl_frontend.c Thu May 8 08:15:42 2014 (r265648) @@ -114,7 +114,6 @@ ctl_frontend_register(struct ctl_fronten fe->targ_port = port_num + (master_shelf!=0 ? 0 : CTL_MAX_PORTS); fe->max_initiators = CTL_MAX_INIT_PER_PORT; STAILQ_INSERT_TAIL(&control_softc->fe_list, fe, links); - ctl_pool_acquire(pool); control_softc->ctl_ports[port_num] = fe; mtx_unlock(&control_softc->ctl_lock); @@ -141,10 +140,6 @@ ctl_frontend_deregister(struct ctl_front } mtx_lock(&control_softc->ctl_lock); - - ctl_pool_invalidate(pool); - ctl_pool_release(pool); - STAILQ_REMOVE(&control_softc->fe_list, fe, ctl_frontend, links); control_softc->num_frontends--; port_num = (fe->targ_port < CTL_MAX_PORTS) ? fe->targ_port : @@ -152,6 +147,9 @@ ctl_frontend_deregister(struct ctl_front ctl_clear_mask(&control_softc->ctl_port_mask, port_num); control_softc->ctl_ports[port_num] = NULL; mtx_unlock(&control_softc->ctl_lock); + + ctl_pool_free(pool); + bailout: return (retval); } Modified: stable/9/sys/cam/ctl/ctl_private.h ============================================================================== --- stable/9/sys/cam/ctl/ctl_private.h Thu May 8 08:11:44 2014 (r265647) +++ stable/9/sys/cam/ctl/ctl_private.h Thu May 8 08:15:42 2014 (r265648) @@ -448,6 +448,7 @@ struct ctl_softc { struct ctl_frontend *ctl_ports[CTL_MAX_PORTS]; uint32_t num_backends; STAILQ_HEAD(, ctl_backend_driver) be_list; + struct mtx pool_lock; uint32_t num_pools; uint32_t cur_pool_id; STAILQ_HEAD(, ctl_io_pool) io_pools; @@ -462,10 +463,7 @@ extern struct ctl_cmd_entry ctl_cmd_tabl uint32_t ctl_get_initindex(struct ctl_nexus *nexus); int ctl_pool_create(struct ctl_softc *ctl_softc, ctl_pool_type pool_type, uint32_t total_ctl_io, struct ctl_io_pool **npool); -int ctl_pool_acquire(struct ctl_io_pool *pool); -int ctl_pool_invalidate(struct ctl_io_pool *pool); -int ctl_pool_release(struct ctl_io_pool *pool); -void ctl_pool_free(struct ctl_softc *ctl_softc, struct ctl_io_pool *pool); +void ctl_pool_free(struct ctl_io_pool *pool); int ctl_scsi_release(struct ctl_scsiio *ctsio); int ctl_scsi_reserve(struct ctl_scsiio *ctsio); int ctl_start_stop(struct ctl_scsiio *ctsio); From owner-svn-src-stable@FreeBSD.ORG Thu May 8 08:17:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6AC7F720; Thu, 8 May 2014 08:17:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5753CD65; Thu, 8 May 2014 08:17:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s488H5bp081579; Thu, 8 May 2014 08:17:05 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s488H5fd081578; Thu, 8 May 2014 08:17:05 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405080817.s488H5fd081578@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 08:17:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265649 - stable/9/sys/cam/ctl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 08:17:05 -0000 Author: mav Date: Thu May 8 08:17:04 2014 New Revision: 265649 URL: http://svnweb.freebsd.org/changeset/base/265649 Log: MFC r258871: Properly report an error instead of panicing when user tries to create LUN backed by non-disk device, e.g. /dev/null. Modified: stable/9/sys/cam/ctl/ctl_backend_block.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/9/sys/cam/ctl/ctl_backend_block.c Thu May 8 08:15:42 2014 (r265648) +++ stable/9/sys/cam/ctl/ctl_backend_block.c Thu May 8 08:17:04 2014 (r265649) @@ -1518,6 +1518,7 @@ ctl_be_block_close(struct ctl_be_block_l vfs_is_locked = VFS_LOCK_GIANT(be_lun->vn->v_mount); break; case CTL_BE_BLOCK_NONE: + break; default: panic("Unexpected backend type."); break; @@ -1537,6 +1538,7 @@ ctl_be_block_close(struct ctl_be_block_l } break; case CTL_BE_BLOCK_NONE: + break; default: panic("Unexpected backend type."); break; @@ -1626,7 +1628,7 @@ ctl_be_block_open(struct ctl_be_block_so } else { error = EINVAL; snprintf(req->error_str, sizeof(req->error_str), - "%s is not a disk or file", be_lun->dev_path); + "%s is not a disk or plain file", be_lun->dev_path); } VOP_UNLOCK(be_lun->vn, 0); VFS_UNLOCK_GIANT(vfs_is_locked); From owner-svn-src-stable@FreeBSD.ORG Thu May 8 08:17:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5640851; Thu, 8 May 2014 08:17:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91D29D67; Thu, 8 May 2014 08:17:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s488HCT9081632; Thu, 8 May 2014 08:17:12 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s488HCTU081631; Thu, 8 May 2014 08:17:12 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201405080817.s488HCTU081631@svn.freebsd.org> From: Steven Hartland Date: Thu, 8 May 2014 08:17:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265650 - stable/10/cddl/contrib/opensolaris/cmd/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 08:17:12 -0000 Author: smh Date: Thu May 8 08:17:12 2014 New Revision: 265650 URL: http://svnweb.freebsd.org/changeset/base/265650 Log: MFC r264851 Eliminated optarg global being used outside of the function which called getopt Sponsored by: Multiplay Modified: stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Thu May 8 08:17:04 2014 (r265649) +++ stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Thu May 8 08:17:12 2014 (r265650) @@ -495,9 +495,8 @@ usage(boolean_t requested) } static int -parseprop(nvlist_t *props) +parseprop(nvlist_t *props, char *propname) { - char *propname = optarg; char *propval, *strval; if ((propval = strchr(propname, '=')) == NULL) { @@ -526,7 +525,7 @@ parse_depth(char *opt, int *flags) depth = (int)strtol(opt, &tmp, 0); if (*tmp) { (void) fprintf(stderr, - gettext("%s is not an integer\n"), optarg); + gettext("%s is not an integer\n"), opt); usage(B_FALSE); } if (depth < 0) { @@ -617,7 +616,7 @@ zfs_do_clone(int argc, char **argv) while ((c = getopt(argc, argv, "o:p")) != -1) { switch (c) { case 'o': - if (parseprop(props)) + if (parseprop(props, optarg)) return (1); break; case 'p': @@ -767,7 +766,7 @@ zfs_do_create(int argc, char **argv) nomem(); break; case 'o': - if (parseprop(props)) + if (parseprop(props, optarg)) goto error; break; case 's': @@ -3636,7 +3635,7 @@ zfs_do_snapshot(int argc, char **argv) while ((c = getopt(argc, argv, "ro:")) != -1) { switch (c) { case 'o': - if (parseprop(props)) + if (parseprop(props, optarg)) return (1); break; case 'r': From owner-svn-src-stable@FreeBSD.ORG Thu May 8 08:18:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8BFDF991; Thu, 8 May 2014 08:18:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 789F8D74; Thu, 8 May 2014 08:18:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s488Ilae081929; Thu, 8 May 2014 08:18:47 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s488Ilm0081928; Thu, 8 May 2014 08:18:47 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405080818.s488Ilm0081928@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 08:18:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265651 - stable/9/sys/cam/ctl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 08:18:47 -0000 Author: mav Date: Thu May 8 08:18:46 2014 New Revision: 265651 URL: http://svnweb.freebsd.org/changeset/base/265651 Log: MFC r262782 (by trasz): Fix missing unlock in persistent reservations code, which resulted in panics with Hyper-V Failover Cluster. Modified: stable/9/sys/cam/ctl/ctl.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ctl/ctl.c ============================================================================== --- stable/9/sys/cam/ctl/ctl.c Thu May 8 08:17:12 2014 (r265650) +++ stable/9/sys/cam/ctl/ctl.c Thu May 8 08:18:46 2014 (r265651) @@ -8043,6 +8043,7 @@ ctl_persistent_reserve_out(struct ctl_sc ctl_done((union ctl_io *)ctsio); return (CTL_RETVAL_COMPLETE); } + mtx_unlock(&softc->ctl_lock); } else /* create a reservation */ { /* * If it's not an "all registrants" type record From owner-svn-src-stable@FreeBSD.ORG Thu May 8 08:18:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08BF4992; Thu, 8 May 2014 08:18:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF722D75; Thu, 8 May 2014 08:18:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s488ImMc081966; Thu, 8 May 2014 08:18:48 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s488Im9Y081965; Thu, 8 May 2014 08:18:48 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201405080818.s488Im9Y081965@svn.freebsd.org> From: Steven Hartland Date: Thu, 8 May 2014 08:18:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265652 - stable/10/sbin/camcontrol X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 08:18:49 -0000 Author: smh Date: Thu May 8 08:18:48 2014 New Revision: 265652 URL: http://svnweb.freebsd.org/changeset/base/265652 Log: MFC r264863 Add information about supported NCQ functionality to camcontrol identify. Sponsored by: Multiplay Modified: stable/10/sbin/camcontrol/camcontrol.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/10/sbin/camcontrol/camcontrol.c Thu May 8 08:18:46 2014 (r265651) +++ stable/10/sbin/camcontrol/camcontrol.c Thu May 8 08:18:48 2014 (r265652) @@ -1214,6 +1214,18 @@ atahpa_print(struct ata_params *parm, u_ } } +static int +atasata(struct ata_params *parm) +{ + + + if (parm->satacapabilities != 0xffff && + parm->satacapabilities != 0x0000) + return 1; + + return 0; +} + static void atacapprint(struct ata_params *parm) { @@ -1370,6 +1382,17 @@ atacapprint(struct ata_params *parm) ATA_QUEUE_LEN(parm->queue) + 1); } else printf("no\n"); + + printf("NCQ Queue Management %s\n", atasata(parm) && + parm->satacapabilities2 & ATA_SUPPORT_NCQ_QMANAGEMENT ? + "yes" : "no"); + printf("NCQ Streaming %s\n", atasata(parm) && + parm->satacapabilities2 & ATA_SUPPORT_NCQ_STREAM ? + "yes" : "no"); + printf("Receive & Send FPDMA Queued %s\n", atasata(parm) && + parm->satacapabilities2 & ATA_SUPPORT_RCVSND_FPDMA_QUEUED ? + "yes" : "no"); + printf("SMART %s %s\n", parm->support.command1 & ATA_SUPPORT_SMART ? "yes" : "no", parm->enabled.command1 & ATA_SUPPORT_SMART ? "yes" : "no"); @@ -1418,6 +1441,9 @@ atacapprint(struct ata_params *parm) printf("unload %s %s\n", parm->support.extension & ATA_SUPPORT_UNLOAD ? "yes" : "no", parm->enabled.extension & ATA_SUPPORT_UNLOAD ? "yes" : "no"); + printf("general purpose logging %s %s\n", + parm->support.extension & ATA_SUPPORT_GENLOG ? "yes" : "no", + parm->enabled.extension & ATA_SUPPORT_GENLOG ? "yes" : "no"); printf("free-fall %s %s\n", parm->support2 & ATA_SUPPORT_FREEFALL ? "yes" : "no", parm->enabled2 & ATA_SUPPORT_FREEFALL ? "yes" : "no"); From owner-svn-src-stable@FreeBSD.ORG Thu May 8 08:20:23 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3EAEC07; Thu, 8 May 2014 08:20:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B07F0D88; Thu, 8 May 2014 08:20:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s488KNJb082275; Thu, 8 May 2014 08:20:23 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s488KNgC082274; Thu, 8 May 2014 08:20:23 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201405080820.s488KNgC082274@svn.freebsd.org> From: Steven Hartland Date: Thu, 8 May 2014 08:20:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265653 - stable/10/sys/dev/acpica X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 08:20:23 -0000 Author: smh Date: Thu May 8 08:20:23 2014 New Revision: 265653 URL: http://svnweb.freebsd.org/changeset/base/265653 Log: MFC r264878 Increase ACPI_MAX_TASKS to be 4 x the number of CPU's as 2 x was still insufficient on some machines Sponsored by: Multiplay Modified: stable/10/sys/dev/acpica/acpivar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/acpica/acpivar.h ============================================================================== --- stable/10/sys/dev/acpica/acpivar.h Thu May 8 08:18:48 2014 (r265652) +++ stable/10/sys/dev/acpica/acpivar.h Thu May 8 08:20:23 2014 (r265653) @@ -476,7 +476,7 @@ ACPI_HANDLE acpi_GetReference(ACPI_HANDL /* Default maximum number of tasks to enqueue. */ #ifndef ACPI_MAX_TASKS -#define ACPI_MAX_TASKS MAX(32, MAXCPU * 2) +#define ACPI_MAX_TASKS MAX(32, MAXCPU * 4) #endif /* Default number of task queue threads to start. */ From owner-svn-src-stable@FreeBSD.ORG Thu May 8 08:21:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 217E7D47; Thu, 8 May 2014 08:21:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 01CBDDFD; Thu, 8 May 2014 08:21:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s488Lr9v085062; Thu, 8 May 2014 08:21:53 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s488LrbG085056; Thu, 8 May 2014 08:21:53 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405080821.s488LrbG085056@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 08:21:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265654 - in stable/9/sys: cam/ctl conf modules/ctl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 08:21:54 -0000 Author: mav Date: Thu May 8 08:21:52 2014 New Revision: 265654 URL: http://svnweb.freebsd.org/changeset/base/265654 Log: MFC r263811 (by trasz): Remove ctl_mem_pool.{c,h}. Deleted: stable/9/sys/cam/ctl/ctl_mem_pool.c stable/9/sys/cam/ctl/ctl_mem_pool.h Modified: stable/9/sys/cam/ctl/README.ctl.txt stable/9/sys/cam/ctl/ctl_frontend_cam_sim.c stable/9/sys/cam/ctl/ctl_frontend_internal.c stable/9/sys/conf/files stable/9/sys/modules/ctl/Makefile Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/cam/ctl/README.ctl.txt ============================================================================== --- stable/9/sys/cam/ctl/README.ctl.txt Thu May 8 08:20:23 2014 (r265653) +++ stable/9/sys/cam/ctl/README.ctl.txt Thu May 8 08:21:52 2014 (r265654) @@ -394,14 +394,6 @@ ctl_ioctl.h: This defines all ioctls available through the CTL character device, and the data structures needed for those ioctls. -ctl_mem_pool.c -ctl_mem_pool.h: --------------- - -Generic memory pool implementation. This is currently only used by the -internal frontend. The internal frontend can probably be rewritten to use -UMA zones and this can be removed. - ctl_private.h: ------------- Modified: stable/9/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- stable/9/sys/cam/ctl/ctl_frontend_cam_sim.c Thu May 8 08:20:23 2014 (r265653) +++ stable/9/sys/cam/ctl/ctl_frontend_cam_sim.c Thu May 8 08:21:52 2014 (r265654) @@ -65,7 +65,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #define io_ptr spriv_ptr1 Modified: stable/9/sys/cam/ctl/ctl_frontend_internal.c ============================================================================== --- stable/9/sys/cam/ctl/ctl_frontend_internal.c Thu May 8 08:20:23 2014 (r265653) +++ stable/9/sys/cam/ctl/ctl_frontend_internal.c Thu May 8 08:21:52 2014 (r265654) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -73,7 +74,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -118,7 +118,6 @@ struct cfi_metatask { cfi_tasktype tasktype; cfi_mt_status status; union cfi_taskinfo taskinfo; - struct ctl_mem_element *element; void *cfi_context; STAILQ_ENTRY(cfi_metatask) links; }; @@ -153,7 +152,6 @@ struct cfi_lun { int blocksize_powerof2; uint32_t cur_tag_num; cfi_lun_state state; - struct ctl_mem_element *element; struct cfi_softc *softc; STAILQ_HEAD(, cfi_lun_io) io_list; STAILQ_ENTRY(cfi_lun) links; @@ -181,12 +179,13 @@ struct cfi_softc { cfi_flags flags; STAILQ_HEAD(, cfi_lun) lun_list; STAILQ_HEAD(, cfi_metatask) metatask_list; - struct ctl_mem_pool lun_pool; - struct ctl_mem_pool metatask_pool; }; MALLOC_DEFINE(M_CTL_CFI, "ctlcfi", "CTL CFI"); +static uma_zone_t cfi_lun_zone; +static uma_zone_t cfi_metatask_zone; + static struct cfi_softc fetd_internal_softc; extern int ctl_disable; @@ -280,48 +279,15 @@ cfi_init(void) if (ctl_frontend_register(fe, (softc->flags & CTL_FLAG_MASTER_SHELF)) != 0) { printf("%s: internal frontend registration failed\n", __func__); - retval = 1; - goto bailout; + return (0); } - if (ctl_init_mem_pool(&softc->lun_pool, - sizeof(struct cfi_lun), - CTL_MEM_POOL_PERM_GROW, /*grow_inc*/ 3, - /* initial_pool_size */ CTL_MAX_LUNS) != 0) { - printf("%s: can't initialize LUN memory pool\n", __func__); - retval = 1; - goto bailout_error; - } - - if (ctl_init_mem_pool(&softc->metatask_pool, - sizeof(struct cfi_metatask), - CTL_MEM_POOL_PERM_GROW, /*grow_inc*/ 3, - /*initial_pool_size*/ 10) != 0) { - printf("%s: can't initialize metatask memory pool\n", __func__); - retval = 2; - goto bailout_error; - } -bailout: + cfi_lun_zone = uma_zcreate("cfi_lun", sizeof(struct cfi_lun), + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); + cfi_metatask_zone = uma_zcreate("cfi_metatask", sizeof(struct cfi_metatask), + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); return (0); - -bailout_error: - - switch (retval) { - case 3: - ctl_shrink_mem_pool(&softc->metatask_pool); - /* FALLTHROUGH */ - case 2: - ctl_shrink_mem_pool(&softc->lun_pool); - /* FALLTHROUGH */ - case 1: - ctl_frontend_deregister(fe); - break; - default: - break; - } - - return (ENOMEM); } void @@ -337,11 +303,8 @@ cfi_shutdown(void) if (ctl_frontend_deregister(&softc->fe) != 0) printf("%s: ctl_frontend_deregister() failed\n", __func__); - if (ctl_shrink_mem_pool(&softc->lun_pool) != 0) - printf("%s: error shrinking LUN pool\n", __func__); - - if (ctl_shrink_mem_pool(&softc->metatask_pool) != 0) - printf("%s: error shrinking LUN pool\n", __func__); + uma_zdestroy(cfi_lun_zone); + uma_zdestroy(cfi_metatask_zone); } static int @@ -403,7 +366,6 @@ cfi_targ_disable(void *arg, struct ctl_i static int cfi_lun_enable(void *arg, struct ctl_id target_id, int lun_id) { - struct ctl_mem_element *element; struct cfi_softc *softc; struct cfi_lun *lun; int found; @@ -428,16 +390,12 @@ cfi_lun_enable(void *arg, struct ctl_id if (found != 0) return (0); - element = ctl_alloc_mem_element(&softc->lun_pool, /*can_wait*/ 0); - - if (element == NULL) { + lun = uma_zalloc(cfi_lun_zone, M_NOWAIT | M_ZERO); + if (lun == NULL) { printf("%s: unable to allocate LUN structure\n", __func__); return (1); } - lun = (struct cfi_lun *)element->bytes; - - lun->element = element; lun->target_id = target_id; lun->lun_id = lun_id; lun->cur_tag_num = 0; @@ -490,7 +448,7 @@ cfi_lun_disable(void *arg, struct ctl_id return (1); } - ctl_free_mem_element(lun->element); + uma_zfree(cfi_lun_zone, lun); return (0); } @@ -1687,106 +1645,20 @@ cfi_action(struct cfi_metatask *metatask } } -#ifdef oldapi -void -cfi_shutdown_shelf(cfi_cb_t callback, void *callback_arg) -{ - struct ctl_mem_element *element; - struct cfi_softc *softc; - struct cfi_metatask *metatask; - - softc = &fetd_internal_softc; - - element = ctl_alloc_mem_element(&softc->metatask_pool, /*can_wait*/ 0); - if (element == NULL) { - callback(callback_arg, - /*status*/ CFI_MT_ERROR, - /*sluns_found*/ 0, - /*sluns_complete*/ 0, - /*sluns_failed*/ 0); - return; - } - - metatask = (struct cfi_metatask *)element->bytes; - - memset(metatask, 0, sizeof(*metatask)); - metatask->tasktype = CFI_TASK_SHUTDOWN; - metatask->status = CFI_MT_NONE; - metatask->taskinfo.startstop.callback = callback; - metatask->taskinfo.startstop.callback_arg = callback_arg; - metatask->element = element; - - cfi_action(softc, metatask); - - /* - * - send a report luns to lun 0, get LUN list. - * - send an inquiry to each lun - * - send a stop/offline to each direct access LUN - * - if we get a reservation conflict, reset the LUN and then - * retry sending the stop/offline - * - return status back to the caller - */ -} - -void -cfi_start_shelf(cfi_cb_t callback, void *callback_arg) -{ - struct ctl_mem_element *element; - struct cfi_softc *softc; - struct cfi_metatask *metatask; - - softc = &fetd_internal_softc; - - element = ctl_alloc_mem_element(&softc->metatask_pool, /*can_wait*/ 0); - if (element == NULL) { - callback(callback_arg, - /*status*/ CFI_MT_ERROR, - /*sluns_found*/ 0, - /*sluns_complete*/ 0, - /*sluns_failed*/ 0); - return; - } - - metatask = (struct cfi_metatask *)element->bytes; - - memset(metatask, 0, sizeof(*metatask)); - metatask->tasktype = CFI_TASK_STARTUP; - metatask->status = CFI_MT_NONE; - metatask->taskinfo.startstop.callback = callback; - metatask->taskinfo.startstop.callback_arg = callback_arg; - metatask->element = element; - - cfi_action(softc, metatask); - - /* - * - send a report luns to lun 0, get LUN list. - * - send an inquiry to each lun - * - send a stop/offline to each direct access LUN - * - if we get a reservation conflict, reset the LUN and then - * retry sending the stop/offline - * - return status back to the caller - */ -} - -#endif - struct cfi_metatask * cfi_alloc_metatask(int can_wait) { - struct ctl_mem_element *element; struct cfi_metatask *metatask; struct cfi_softc *softc; softc = &fetd_internal_softc; - element = ctl_alloc_mem_element(&softc->metatask_pool, can_wait); - if (element == NULL) + metatask = uma_zalloc(cfi_metatask_zone, + (can_wait ? M_WAITOK : M_NOWAIT) | M_ZERO); + if (metatask == NULL) return (NULL); - metatask = (struct cfi_metatask *)element->bytes; - memset(metatask, 0, sizeof(*metatask)); metatask->status = CFI_MT_NONE; - metatask->element = element; return (metatask); } @@ -1794,7 +1666,8 @@ cfi_alloc_metatask(int can_wait) void cfi_free_metatask(struct cfi_metatask *metatask) { - ctl_free_mem_element(metatask->element); + + uma_zfree(cfi_metatask_zone, metatask); } /* Modified: stable/9/sys/conf/files ============================================================================== --- stable/9/sys/conf/files Thu May 8 08:20:23 2014 (r265653) +++ stable/9/sys/conf/files Thu May 8 08:21:52 2014 (r265654) @@ -124,7 +124,6 @@ cam/ctl/ctl_cmd_table.c optional ctl cam/ctl/ctl_frontend.c optional ctl cam/ctl/ctl_frontend_cam_sim.c optional ctl cam/ctl/ctl_frontend_internal.c optional ctl -cam/ctl/ctl_mem_pool.c optional ctl cam/ctl/ctl_scsi_all.c optional ctl cam/ctl/ctl_error.c optional ctl cam/ctl/ctl_util.c optional ctl Modified: stable/9/sys/modules/ctl/Makefile ============================================================================== --- stable/9/sys/modules/ctl/Makefile Thu May 8 08:20:23 2014 (r265653) +++ stable/9/sys/modules/ctl/Makefile Thu May 8 08:21:52 2014 (r265654) @@ -12,7 +12,6 @@ SRCS+= ctl_cmd_table.c SRCS+= ctl_frontend.c SRCS+= ctl_frontend_cam_sim.c SRCS+= ctl_frontend_internal.c -SRCS+= ctl_mem_pool.c SRCS+= ctl_scsi_all.c SRCS+= ctl_error.c SRCS+= ctl_util.c From owner-svn-src-stable@FreeBSD.ORG Thu May 8 08:23:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26FC5EB5; Thu, 8 May 2014 08:23:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1384BE20; Thu, 8 May 2014 08:23:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s488NONa085710; Thu, 8 May 2014 08:23:24 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s488NOfu085709; Thu, 8 May 2014 08:23:24 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201405080823.s488NOfu085709@svn.freebsd.org> From: Steven Hartland Date: Thu, 8 May 2014 08:23:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265655 - stable/10/sys/dev/acpica/Osd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 08:23:25 -0000 Author: smh Date: Thu May 8 08:23:24 2014 New Revision: 265655 URL: http://svnweb.freebsd.org/changeset/base/265655 Log: MFC r264849 & r264883 Exposed debug.acpi.max_tasks and debug.acpi.max_threads via sysctls so their values can be viewed. Sponsored by: Multiplay Modified: stable/10/sys/dev/acpica/Osd/OsdSchedule.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/acpica/Osd/OsdSchedule.c ============================================================================== --- stable/10/sys/dev/acpica/Osd/OsdSchedule.c Thu May 8 08:21:52 2014 (r265654) +++ stable/10/sys/dev/acpica/Osd/OsdSchedule.c Thu May 8 08:23:24 2014 (r265655) @@ -57,6 +57,8 @@ ACPI_MODULE_NAME("SCHEDULE") */ static int acpi_max_tasks = ACPI_MAX_TASKS; TUNABLE_INT("debug.acpi.max_tasks", &acpi_max_tasks); +SYSCTL_INT(_debug_acpi, OID_AUTO, max_tasks, CTLFLAG_RDTUN, &acpi_max_tasks, + 0, "Maximum acpi tasks"); /* * Allow the user to tune the number of task threads we start. It seems @@ -64,6 +66,8 @@ TUNABLE_INT("debug.acpi.max_tasks", &acp */ static int acpi_max_threads = ACPI_MAX_THREADS; TUNABLE_INT("debug.acpi.max_threads", &acpi_max_threads); +SYSCTL_INT(_debug_acpi, OID_AUTO, max_threads, CTLFLAG_RDTUN, &acpi_max_threads, + 0, "Maximum acpi threads"); static MALLOC_DEFINE(M_ACPITASK, "acpitask", "ACPI deferred task"); From owner-svn-src-stable@FreeBSD.ORG Thu May 8 08:24:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3FFCEFF4; Thu, 8 May 2014 08:24:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 13349E28; Thu, 8 May 2014 08:24:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s488O8N0085831; Thu, 8 May 2014 08:24:08 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s488O85F085830; Thu, 8 May 2014 08:24:08 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405080824.s488O85F085830@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 08:24:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265656 - stable/9/sys/cam/ctl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 08:24:09 -0000 Author: mav Date: Thu May 8 08:24:08 2014 New Revision: 265656 URL: http://svnweb.freebsd.org/changeset/base/265656 Log: MFC r263979 (by trasz): Hide CTL messages about SCSI error responses. Too many users take them for actual target errors. They can be enabled back by setting kern.cam.ctl.verbose=1, or booting with bootverbose. Modified: stable/9/sys/cam/ctl/ctl.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ctl/ctl.c ============================================================================== --- stable/9/sys/cam/ctl/ctl.c Thu May 8 08:23:24 2014 (r265655) +++ stable/9/sys/cam/ctl/ctl.c Thu May 8 08:24:08 2014 (r265656) @@ -324,6 +324,10 @@ SYSCTL_NODE(_kern_cam, OID_AUTO, ctl, CT SYSCTL_INT(_kern_cam_ctl, OID_AUTO, disable, CTLFLAG_RDTUN, &ctl_disable, 0, "Disable CTL"); TUNABLE_INT("kern.cam.ctl.disable", &ctl_disable); +static int verbose = 0; +TUNABLE_INT("kern.cam.ctl.verbose", &verbose); +SYSCTL_INT(_kern_cam_ctl, OID_AUTO, verbose, CTLFLAG_RWTUN, + &verbose, 0, "Show SCSI errors returned to initiator"); /* * Serial number (0x80), device id (0x83), and supported pages (0x00) @@ -12264,7 +12268,8 @@ ctl_process_done(union ctl_io *io, int h case CTL_IO_SCSI: break; case CTL_IO_TASK: - ctl_io_error_print(io, NULL); + if (bootverbose || verbose > 0) + ctl_io_error_print(io, NULL); if (io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) ctl_free_io(io); else @@ -12520,7 +12525,8 @@ ctl_process_done(union ctl_io *io, int h "skipped", skipped_prints); #endif } - ctl_io_error_print(io, NULL); + if (bootverbose || verbose > 0) + ctl_io_error_print(io, NULL); } } else { if (have_lock == 0) @@ -12531,7 +12537,8 @@ ctl_process_done(union ctl_io *io, int h case CTL_IO_TASK: if (have_lock == 0) mtx_unlock(&ctl_softc->ctl_lock); - ctl_io_error_print(io, NULL); + if (bootverbose || verbose > 0) + ctl_io_error_print(io, NULL); break; default: if (have_lock == 0) From owner-svn-src-stable@FreeBSD.ORG Thu May 8 08:25:28 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C3C824C; Thu, 8 May 2014 08:25:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C827E36; Thu, 8 May 2014 08:25:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s488PSuu086052; Thu, 8 May 2014 08:25:28 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s488PSPd086051; Thu, 8 May 2014 08:25:28 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405080825.s488PSPd086051@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 08:25:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265657 - stable/9/sys/cam/ctl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 08:25:28 -0000 Author: mav Date: Thu May 8 08:25:27 2014 New Revision: 265657 URL: http://svnweb.freebsd.org/changeset/base/265657 Log: MFC r264020 (by trasz): Remove the homegrown ctl_be_block_io allocator, replacing it with UMA. There is no performance difference. Modified: stable/9/sys/cam/ctl/ctl_backend_block.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/9/sys/cam/ctl/ctl_backend_block.c Thu May 8 08:24:08 2014 (r265656) +++ stable/9/sys/cam/ctl/ctl_backend_block.c Thu May 8 08:25:27 2014 (r265657) @@ -177,9 +177,7 @@ struct ctl_be_block_lun { * Overall softc structure for the block backend module. */ struct ctl_be_block_softc { - STAILQ_HEAD(, ctl_be_block_io) beio_free_queue; struct mtx lock; - int prealloc_beio; int num_disks; STAILQ_HEAD(, ctl_block_disk) disk_list; int num_luns; @@ -209,7 +207,6 @@ struct ctl_be_block_io { uint64_t io_offset; struct ctl_be_block_softc *softc; struct ctl_be_block_lun *lun; - STAILQ_ENTRY(ctl_be_block_io) links; }; static int cbb_num_threads = 14; @@ -221,10 +218,6 @@ SYSCTL_INT(_kern_cam_ctl_block, OID_AUTO static struct ctl_be_block_io *ctl_alloc_beio(struct ctl_be_block_softc *softc); static void ctl_free_beio(struct ctl_be_block_io *beio); -static int ctl_grow_beio(struct ctl_be_block_softc *softc, int count); -#if 0 -static void ctl_shrink_beio(struct ctl_be_block_softc *softc); -#endif static void ctl_complete_beio(struct ctl_be_block_io *beio); static int ctl_be_block_move_done(union ctl_io *io); static void ctl_be_block_biodone(struct bio *bio); @@ -286,68 +279,24 @@ static struct ctl_backend_driver ctl_be_ MALLOC_DEFINE(M_CTLBLK, "ctlblk", "Memory used for CTL block backend"); CTL_BACKEND_DECLARE(cbb, ctl_be_block_driver); +static uma_zone_t beio_zone; + static struct ctl_be_block_io * ctl_alloc_beio(struct ctl_be_block_softc *softc) { struct ctl_be_block_io *beio; - int count; - - mtx_lock(&softc->lock); - - beio = STAILQ_FIRST(&softc->beio_free_queue); - if (beio != NULL) { - STAILQ_REMOVE(&softc->beio_free_queue, beio, - ctl_be_block_io, links); - } - mtx_unlock(&softc->lock); - - if (beio != NULL) { - bzero(beio, sizeof(*beio)); - beio->softc = softc; - return (beio); - } - - for (;;) { - - count = ctl_grow_beio(softc, /*count*/ 10); - - /* - * This shouldn't be possible, since ctl_grow_beio() uses a - * blocking malloc. - */ - if (count == 0) - return (NULL); - - /* - * Since we have to drop the lock when we're allocating beio - * structures, it's possible someone else can come along and - * allocate the beio's we've just allocated. - */ - mtx_lock(&softc->lock); - beio = STAILQ_FIRST(&softc->beio_free_queue); - if (beio != NULL) { - STAILQ_REMOVE(&softc->beio_free_queue, beio, - ctl_be_block_io, links); - } - mtx_unlock(&softc->lock); - if (beio != NULL) { - bzero(beio, sizeof(*beio)); - beio->softc = softc; - break; - } - } + beio = uma_zalloc(beio_zone, M_WAITOK | M_ZERO); + beio->softc = softc; return (beio); } static void ctl_free_beio(struct ctl_be_block_io *beio) { - struct ctl_be_block_softc *softc; int duplicate_free; int i; - softc = beio->softc; duplicate_free = 0; for (i = 0; i < beio->num_segs; i++) { @@ -362,47 +311,10 @@ ctl_free_beio(struct ctl_be_block_io *be printf("%s: %d duplicate frees out of %d segments\n", __func__, duplicate_free, beio->num_segs); } - mtx_lock(&softc->lock); - STAILQ_INSERT_TAIL(&softc->beio_free_queue, beio, links); - mtx_unlock(&softc->lock); -} -static int -ctl_grow_beio(struct ctl_be_block_softc *softc, int count) -{ - int i; - - for (i = 0; i < count; i++) { - struct ctl_be_block_io *beio; - - beio = (struct ctl_be_block_io *)malloc(sizeof(*beio), - M_CTLBLK, - M_WAITOK | M_ZERO); - beio->softc = softc; - mtx_lock(&softc->lock); - STAILQ_INSERT_TAIL(&softc->beio_free_queue, beio, links); - mtx_unlock(&softc->lock); - } - - return (i); + uma_zfree(beio_zone, beio); } -#if 0 -static void -ctl_shrink_beio(struct ctl_be_block_softc *softc) -{ - struct ctl_be_block_io *beio, *beio_tmp; - - mtx_lock(&softc->lock); - STAILQ_FOREACH_SAFE(beio, &softc->beio_free_queue, links, beio_tmp) { - STAILQ_REMOVE(&softc->beio_free_queue, beio, - ctl_be_block_io, links); - free(beio, M_CTLBLK); - } - mtx_unlock(&softc->lock); -} -#endif - static void ctl_complete_beio(struct ctl_be_block_io *beio) { @@ -943,16 +855,7 @@ ctl_be_block_cw_dispatch(struct ctl_be_b softc = be_lun->softc; beio = ctl_alloc_beio(softc); - if (beio == NULL) { - /* - * This should not happen. ctl_alloc_beio() will call - * ctl_grow_beio() with a blocking malloc as needed. - * A malloc with M_WAITOK should not fail. - */ - ctl_set_busy(&io->scsiio); - ctl_done(io); - return; - } + KASSERT(beio != NULL, ("ctl_alloc_beio() failed")); beio->io = io; beio->softc = softc; @@ -1023,16 +926,7 @@ ctl_be_block_dispatch(struct ctl_be_bloc } beio = ctl_alloc_beio(softc); - if (beio == NULL) { - /* - * This should not happen. ctl_alloc_beio() will call - * ctl_grow_beio() with a blocking malloc as needed. - * A malloc with M_WAITOK should not fail. - */ - ctl_set_busy(&io->scsiio); - ctl_done(io); - return; - } + KASSERT(beio != NULL, ("ctl_alloc_beio() failed")); beio->io = io; beio->softc = softc; @@ -2373,10 +2267,10 @@ ctl_be_block_init(void) retval = 0; mtx_init(&softc->lock, "ctlblk", NULL, MTX_DEF); - STAILQ_INIT(&softc->beio_free_queue); + beio_zone = uma_zcreate("beio", sizeof(struct ctl_be_block_io), + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); STAILQ_INIT(&softc->disk_list); STAILQ_INIT(&softc->lun_list); - ctl_grow_beio(softc, 200); return (retval); } From owner-svn-src-stable@FreeBSD.ORG Thu May 8 08:26:21 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F0A4F396; Thu, 8 May 2014 08:26:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3293E43; Thu, 8 May 2014 08:26:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s488QKIc086192; Thu, 8 May 2014 08:26:20 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s488QKEB086191; Thu, 8 May 2014 08:26:20 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201405080826.s488QKEB086191@svn.freebsd.org> From: Steven Hartland Date: Thu, 8 May 2014 08:26:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265658 - stable/9/cddl/contrib/opensolaris/cmd/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 08:26:21 -0000 Author: smh Date: Thu May 8 08:26:20 2014 New Revision: 265658 URL: http://svnweb.freebsd.org/changeset/base/265658 Log: MFC r264851 Eliminated optarg global being used outside of the function which called getopt Sponsored by: Multiplay Modified: stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/cddl/contrib/opensolaris/cmd/zfs/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Thu May 8 08:25:27 2014 (r265657) +++ stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Thu May 8 08:26:20 2014 (r265658) @@ -493,9 +493,8 @@ usage(boolean_t requested) } static int -parseprop(nvlist_t *props) +parseprop(nvlist_t *props, char *propname) { - char *propname = optarg; char *propval, *strval; if ((propval = strchr(propname, '=')) == NULL) { @@ -524,7 +523,7 @@ parse_depth(char *opt, int *flags) depth = (int)strtol(opt, &tmp, 0); if (*tmp) { (void) fprintf(stderr, - gettext("%s is not an integer\n"), optarg); + gettext("%s is not an integer\n"), opt); usage(B_FALSE); } if (depth < 0) { @@ -615,7 +614,7 @@ zfs_do_clone(int argc, char **argv) while ((c = getopt(argc, argv, "o:p")) != -1) { switch (c) { case 'o': - if (parseprop(props)) + if (parseprop(props, optarg)) return (1); break; case 'p': @@ -762,7 +761,7 @@ zfs_do_create(int argc, char **argv) nomem(); break; case 'o': - if (parseprop(props)) + if (parseprop(props, optarg)) goto error; break; case 's': @@ -3623,7 +3622,7 @@ zfs_do_snapshot(int argc, char **argv) while ((c = getopt(argc, argv, "ro:")) != -1) { switch (c) { case 'o': - if (parseprop(props)) + if (parseprop(props, optarg)) return (1); break; case 'r': From owner-svn-src-stable@FreeBSD.ORG Thu May 8 08:30:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE6ED603; Thu, 8 May 2014 08:30:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1486E85; Thu, 8 May 2014 08:30:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s488UI0N086844; Thu, 8 May 2014 08:30:18 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s488UIwO086843; Thu, 8 May 2014 08:30:18 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201405080830.s488UIwO086843@svn.freebsd.org> From: Steven Hartland Date: Thu, 8 May 2014 08:30:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265659 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 08:30:19 -0000 Author: smh Date: Thu May 8 08:30:18 2014 New Revision: 265659 URL: http://svnweb.freebsd.org/changeset/base/265659 Log: MFC r264853 Add some new ATA defines for SATA 3.1 spec Sponsored by: Multiplay Modified: stable/10/sys/sys/ata.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/ata.h ============================================================================== --- stable/10/sys/sys/ata.h Thu May 8 08:26:20 2014 (r265658) +++ stable/10/sys/sys/ata.h Thu May 8 08:30:18 2014 (r265659) @@ -130,6 +130,7 @@ struct ata_params { #define ATA_SATA_CURR_GEN_MASK 0x0006 #define ATA_SUPPORT_NCQ_STREAM 0x0010 #define ATA_SUPPORT_NCQ_QMANAGEMENT 0x0020 +#define ATA_SUPPORT_RCVSND_FPDMA_QUEUED 0x0040 /*78*/ u_int16_t satasupport; #define ATA_SUPPORT_NONZERO 0x0002 #define ATA_SUPPORT_AUTOACTIVATE 0x0004 @@ -349,6 +350,7 @@ struct ata_params { #define ATA_READ_NATIVE_MAX_ADDRESS48 0x27 /* read native max addr 48bit */ #define ATA_READ_MUL48 0x29 /* read multi 48bit LBA */ #define ATA_READ_STREAM_DMA48 0x2a /* read DMA stream 48bit LBA */ +#define ATA_READ_LOG_EXT 0x2f /* read log ext - PIO Data-In */ #define ATA_READ_STREAM48 0x2b /* read stream 48bit LBA */ #define ATA_WRITE 0x30 /* write */ #define ATA_WRITE48 0x34 /* write 48bit LBA */ @@ -363,8 +365,11 @@ struct ata_params { #define ATA_WRITE_LOG_EXT 0x3f #define ATA_READ_VERIFY 0x40 #define ATA_READ_VERIFY48 0x42 +#define ATA_READ_LOG_DMA_EXT 0x47 /* read log DMA ext - PIO Data-In */ #define ATA_READ_FPDMA_QUEUED 0x60 /* read DMA NCQ */ #define ATA_WRITE_FPDMA_QUEUED 0x61 /* write DMA NCQ */ +#define ATA_SEND_FPDMA_QUEUED 0x64 /* send DMA NCQ */ +#define ATA_RECV_FPDMA_QUEUED 0x65 /* recieve DMA NCQ */ #define ATA_SEP_ATTN 0x67 /* SEP request */ #define ATA_SEEK 0x70 /* seek */ #define ATA_PACKET_CMD 0xa0 /* packet command */ From owner-svn-src-stable@FreeBSD.ORG Thu May 8 08:31:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED20674A; Thu, 8 May 2014 08:31:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9638F07; Thu, 8 May 2014 08:31:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s488VrMu090000; Thu, 8 May 2014 08:31:53 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s488VrEj089999; Thu, 8 May 2014 08:31:53 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405080831.s488VrEj089999@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 08:31:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265660 - stable/9/sys/cam/scsi X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 08:31:54 -0000 Author: mav Date: Thu May 8 08:31:53 2014 New Revision: 265660 URL: http://svnweb.freebsd.org/changeset/base/265660 Log: MFC r265150: Do not reread SCSI disk VPD pages on every device open. Instead of rereading VPD pages on every device open, do it only on initial device probe, and in cases when device reported via UNIT ATTENTIONs that something has changed. Capacity is still rereaded on every open because it is more critical for operation and more probable to change in run time. On my tests with Intel 530 SSDs on mps(4) HBA this change reduces time GEOM needs to retaste the device (that includes few open/close cycles) from ~150ms to ~30ms. Modified: stable/9/sys/cam/scsi/scsi_da.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Thu May 8 08:30:18 2014 (r265659) +++ stable/9/sys/cam/scsi/scsi_da.c Thu May 8 08:31:53 2014 (r265660) @@ -90,7 +90,8 @@ typedef enum { DA_FLAG_SCTX_INIT = 0x200, DA_FLAG_CAN_RC16 = 0x400, DA_FLAG_PROBED = 0x800, - DA_FLAG_DIRTY = 0x1000 + DA_FLAG_DIRTY = 0x1000, + DA_FLAG_ANNOUNCED = 0x2000 } da_flags; typedef enum { @@ -1675,10 +1676,18 @@ daasync(void *callback_arg, u_int32_t co &error_code, &sense_key, &asc, &ascq)) { if (asc == 0x2A && ascq == 0x09) { xpt_print(ccb->ccb_h.path, - "capacity data has changed\n"); + "Capacity data has changed\n"); + softc->flags &= ~DA_FLAG_PROBED; dareprobe(periph); - } else if (asc == 0x28 && ascq == 0x00) + } else if (asc == 0x28 && ascq == 0x00) { + softc->flags &= ~DA_FLAG_PROBED; disk_media_changed(softc->disk, M_NOWAIT); + } else if (asc == 0x3F && ascq == 0x03) { + xpt_print(ccb->ccb_h.path, + "INQUIRY data has changed\n"); + softc->flags &= ~DA_FLAG_PROBED; + dareprobe(periph); + } } cam_periph_async(periph, code, path, arg); break; @@ -1908,7 +1917,7 @@ daprobedone(struct cam_periph *periph, u dadeletemethodchoose(softc, DA_DELETE_NONE); - if (bootverbose && (softc->flags & DA_FLAG_PROBED) == 0) { + if (bootverbose && (softc->flags & DA_FLAG_ANNOUNCED) == 0) { char buf[80]; int i, sep; @@ -1949,10 +1958,11 @@ daprobedone(struct cam_periph *periph, u */ xpt_release_ccb(ccb); softc->state = DA_STATE_NORMAL; + softc->flags |= DA_FLAG_PROBED; daschedule(periph); wakeup(&softc->disk->d_mediasize); - if ((softc->flags & DA_FLAG_PROBED) == 0) { - softc->flags |= DA_FLAG_PROBED; + if ((softc->flags & DA_FLAG_ANNOUNCED) == 0) { + softc->flags |= DA_FLAG_ANNOUNCED; cam_periph_unhold(periph); } else cam_periph_release_locked(periph); @@ -3206,7 +3216,8 @@ dadone(struct cam_periph *periph, union } } free(csio->data_ptr, M_SCSIDA); - if (announce_buf[0] != '\0' && ((softc->flags & DA_FLAG_PROBED) == 0)) { + if (announce_buf[0] != '\0' && + ((softc->flags & DA_FLAG_ANNOUNCED) == 0)) { /* * Create our sysctl variables, now that we know * we have successfully attached. @@ -3224,6 +3235,12 @@ dadone(struct cam_periph *periph, union } } + /* We already probed the device. */ + if (softc->flags & DA_FLAG_PROBED) { + daprobedone(periph, done_ccb); + return; + } + /* Ensure re-probe doesn't see old delete. */ softc->delete_available = 0; if (lbp && (softc->quirks & DA_Q_NO_UNMAP) == 0) { @@ -3547,13 +3564,21 @@ daerror(union ccb *ccb, u_int32_t cam_fl */ else if (sense_key == SSD_KEY_UNIT_ATTENTION && asc == 0x2A && ascq == 0x09) { - xpt_print(periph->path, "capacity data has changed\n"); + xpt_print(periph->path, "Capacity data has changed\n"); + softc->flags &= ~DA_FLAG_PROBED; dareprobe(periph); sense_flags |= SF_NO_PRINT; } else if (sense_key == SSD_KEY_UNIT_ATTENTION && - asc == 0x28 && ascq == 0x00) + asc == 0x28 && ascq == 0x00) { + softc->flags &= ~DA_FLAG_PROBED; disk_media_changed(softc->disk, M_NOWAIT); - else if (sense_key == SSD_KEY_NOT_READY && + } else if (sense_key == SSD_KEY_UNIT_ATTENTION && + asc == 0x3F && ascq == 0x03) { + xpt_print(periph->path, "INQUIRY data has changed\n"); + softc->flags &= ~DA_FLAG_PROBED; + dareprobe(periph); + sense_flags |= SF_NO_PRINT; + } else if (sense_key == SSD_KEY_NOT_READY && asc == 0x3a && (softc->flags & DA_FLAG_PACK_INVALID) == 0) { softc->flags |= DA_FLAG_PACK_INVALID; disk_media_gone(softc->disk, M_NOWAIT); From owner-svn-src-stable@FreeBSD.ORG Thu May 8 08:32:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 839978A3; Thu, 8 May 2014 08:32:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 572E1F17; Thu, 8 May 2014 08:32:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s488Wn2M090174; Thu, 8 May 2014 08:32:49 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s488Wn7o090173; Thu, 8 May 2014 08:32:49 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201405080832.s488Wn7o090173@svn.freebsd.org> From: Steven Hartland Date: Thu, 8 May 2014 08:32:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265661 - stable/9/sys/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 08:32:49 -0000 Author: smh Date: Thu May 8 08:32:48 2014 New Revision: 265661 URL: http://svnweb.freebsd.org/changeset/base/265661 Log: MFC r264853 Add some new ATA defines for SATA 3.1 spec Sponsored by: Multiplay Modified: stable/9/sys/sys/ata.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/sys/ata.h ============================================================================== --- stable/9/sys/sys/ata.h Thu May 8 08:31:53 2014 (r265660) +++ stable/9/sys/sys/ata.h Thu May 8 08:32:48 2014 (r265661) @@ -130,6 +130,7 @@ struct ata_params { #define ATA_SATA_CURR_GEN_MASK 0x0006 #define ATA_SUPPORT_NCQ_STREAM 0x0010 #define ATA_SUPPORT_NCQ_QMANAGEMENT 0x0020 +#define ATA_SUPPORT_RCVSND_FPDMA_QUEUED 0x0040 /*78*/ u_int16_t satasupport; #define ATA_SUPPORT_NONZERO 0x0002 #define ATA_SUPPORT_AUTOACTIVATE 0x0004 @@ -349,6 +350,7 @@ struct ata_params { #define ATA_READ_NATIVE_MAX_ADDRESS48 0x27 /* read native max addr 48bit */ #define ATA_READ_MUL48 0x29 /* read multi 48bit LBA */ #define ATA_READ_STREAM_DMA48 0x2a /* read DMA stream 48bit LBA */ +#define ATA_READ_LOG_EXT 0x2f /* read log ext - PIO Data-In */ #define ATA_READ_STREAM48 0x2b /* read stream 48bit LBA */ #define ATA_WRITE 0x30 /* write */ #define ATA_WRITE48 0x34 /* write 48bit LBA */ @@ -363,8 +365,11 @@ struct ata_params { #define ATA_WRITE_LOG_EXT 0x3f #define ATA_READ_VERIFY 0x40 #define ATA_READ_VERIFY48 0x42 +#define ATA_READ_LOG_DMA_EXT 0x47 /* read log DMA ext - PIO Data-In */ #define ATA_READ_FPDMA_QUEUED 0x60 /* read DMA NCQ */ #define ATA_WRITE_FPDMA_QUEUED 0x61 /* write DMA NCQ */ +#define ATA_SEND_FPDMA_QUEUED 0x64 /* send DMA NCQ */ +#define ATA_RECV_FPDMA_QUEUED 0x65 /* recieve DMA NCQ */ #define ATA_SEP_ATTN 0x67 /* SEP request */ #define ATA_SEEK 0x70 /* seek */ #define ATA_PACKET_CMD 0xa0 /* packet command */ From owner-svn-src-stable@FreeBSD.ORG Thu May 8 08:33:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D144AEB; Thu, 8 May 2014 08:33:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0FF0EF2F; Thu, 8 May 2014 08:33:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s488XWCl090362; Thu, 8 May 2014 08:33:32 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s488XW4L090361; Thu, 8 May 2014 08:33:32 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201405080833.s488XW4L090361@svn.freebsd.org> From: Steven Hartland Date: Thu, 8 May 2014 08:33:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265662 - stable/9/sbin/camcontrol X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 08:33:33 -0000 Author: smh Date: Thu May 8 08:33:32 2014 New Revision: 265662 URL: http://svnweb.freebsd.org/changeset/base/265662 Log: MFC r264863 Add information about supported NCQ functionality to camcontrol identify. Sponsored by: Multiplay Modified: stable/9/sbin/camcontrol/camcontrol.c Directory Properties: stable/9/sbin/camcontrol/ (props changed) Modified: stable/9/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/9/sbin/camcontrol/camcontrol.c Thu May 8 08:32:48 2014 (r265661) +++ stable/9/sbin/camcontrol/camcontrol.c Thu May 8 08:33:32 2014 (r265662) @@ -1196,6 +1196,18 @@ atahpa_print(struct ata_params *parm, u_ } } +static int +atasata(struct ata_params *parm) +{ + + + if (parm->satacapabilities != 0xffff && + parm->satacapabilities != 0x0000) + return 1; + + return 0; +} + static void atacapprint(struct ata_params *parm) { @@ -1352,6 +1364,17 @@ atacapprint(struct ata_params *parm) ATA_QUEUE_LEN(parm->queue) + 1); } else printf("no\n"); + + printf("NCQ Queue Management %s\n", atasata(parm) && + parm->satacapabilities2 & ATA_SUPPORT_NCQ_QMANAGEMENT ? + "yes" : "no"); + printf("NCQ Streaming %s\n", atasata(parm) && + parm->satacapabilities2 & ATA_SUPPORT_NCQ_STREAM ? + "yes" : "no"); + printf("Receive & Send FPDMA Queued %s\n", atasata(parm) && + parm->satacapabilities2 & ATA_SUPPORT_RCVSND_FPDMA_QUEUED ? + "yes" : "no"); + printf("SMART %s %s\n", parm->support.command1 & ATA_SUPPORT_SMART ? "yes" : "no", parm->enabled.command1 & ATA_SUPPORT_SMART ? "yes" : "no"); @@ -1400,6 +1423,9 @@ atacapprint(struct ata_params *parm) printf("unload %s %s\n", parm->support.extension & ATA_SUPPORT_UNLOAD ? "yes" : "no", parm->enabled.extension & ATA_SUPPORT_UNLOAD ? "yes" : "no"); + printf("general purpose logging %s %s\n", + parm->support.extension & ATA_SUPPORT_GENLOG ? "yes" : "no", + parm->enabled.extension & ATA_SUPPORT_GENLOG ? "yes" : "no"); printf("free-fall %s %s\n", parm->support2 & ATA_SUPPORT_FREEFALL ? "yes" : "no", parm->enabled2 & ATA_SUPPORT_FREEFALL ? "yes" : "no"); From owner-svn-src-stable@FreeBSD.ORG Thu May 8 08:34:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7BC14C3A; Thu, 8 May 2014 08:34:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68489F41; Thu, 8 May 2014 08:34:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s488YokE090566; Thu, 8 May 2014 08:34:50 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s488York090565; Thu, 8 May 2014 08:34:50 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201405080834.s488York090565@svn.freebsd.org> From: Steven Hartland Date: Thu, 8 May 2014 08:34:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265663 - stable/9/sys/dev/acpica X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 08:34:50 -0000 Author: smh Date: Thu May 8 08:34:49 2014 New Revision: 265663 URL: http://svnweb.freebsd.org/changeset/base/265663 Log: MFC r264878 Increase ACPI_MAX_TASKS to be 4 x the number of CPU's as 2 x was still insufficient on some machines. Sponsored by: Multiplay Modified: stable/9/sys/dev/acpica/acpivar.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/acpica/acpivar.h ============================================================================== --- stable/9/sys/dev/acpica/acpivar.h Thu May 8 08:33:32 2014 (r265662) +++ stable/9/sys/dev/acpica/acpivar.h Thu May 8 08:34:49 2014 (r265663) @@ -478,7 +478,7 @@ ACPI_HANDLE acpi_GetReference(ACPI_HANDL /* Default maximum number of tasks to enqueue. */ #ifndef ACPI_MAX_TASKS -#define ACPI_MAX_TASKS MAX(32, MAXCPU * 2) +#define ACPI_MAX_TASKS MAX(32, MAXCPU * 4) #endif /* Default number of task queue threads to start. */ From owner-svn-src-stable@FreeBSD.ORG Thu May 8 08:35:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 90EA1E6B; Thu, 8 May 2014 08:35:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 719E1F4C; Thu, 8 May 2014 08:35:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s488ZPDt090725; Thu, 8 May 2014 08:35:25 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s488ZPU8090724; Thu, 8 May 2014 08:35:25 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405080835.s488ZPU8090724@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 08:35:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265664 - stable/9/sys/cam/scsi X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 08:35:25 -0000 Author: mav Date: Thu May 8 08:35:24 2014 New Revision: 265664 URL: http://svnweb.freebsd.org/changeset/base/265664 Log: MFC r265159: Respect MAXIMUM TRANSFER LENGTH field of Block Limits VPD page. Nobody yet reported disk supporting I/Os less then our MAXPHYS value, but since we any way have code to read Block Limits VPD page, that is easy. Modified: stable/9/sys/cam/scsi/scsi_da.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Thu May 8 08:34:49 2014 (r265663) +++ stable/9/sys/cam/scsi/scsi_da.c Thu May 8 08:35:24 2014 (r265664) @@ -213,6 +213,7 @@ struct da_softc { int trim_max_ranges; int delete_running; int delete_available; /* Delete methods possibly available */ + u_int maxio; uint32_t unmap_max_ranges; uint32_t unmap_max_lba; /* Max LBAs in UNMAP req */ uint64_t ws_max_blks; @@ -2152,11 +2153,12 @@ daregister(struct cam_periph *periph, vo softc->disk->d_name = "da"; softc->disk->d_drv1 = periph; if (cpi.maxio == 0) - softc->disk->d_maxsize = DFLTPHYS; /* traditional default */ + softc->maxio = DFLTPHYS; /* traditional default */ else if (cpi.maxio > MAXPHYS) - softc->disk->d_maxsize = MAXPHYS; /* for safety */ + softc->maxio = MAXPHYS; /* for safety */ else - softc->disk->d_maxsize = cpi.maxio; + softc->maxio = cpi.maxio; + softc->disk->d_maxsize = softc->maxio; softc->disk->d_unit = periph->unit_number; softc->disk->d_flags = 0; if ((softc->quirks & DA_Q_NO_SYNC_CACHE) == 0) @@ -3292,14 +3294,6 @@ dadone(struct cam_periph *periph, union (lbp->flags & SVPD_LBP_WS10)); dadeleteflag(softc, DA_DELETE_UNMAP, (lbp->flags & SVPD_LBP_UNMAP)); - - if (lbp->flags & SVPD_LBP_UNMAP) { - free(lbp, M_SCSIDA); - xpt_release_ccb(done_ccb); - softc->state = DA_STATE_PROBE_BLK_LIMITS; - xpt_schedule(periph, priority); - return; - } } else { int error; error = daerror(done_ccb, CAM_RETRY_SELTO, @@ -3325,7 +3319,7 @@ dadone(struct cam_periph *periph, union free(lbp, M_SCSIDA); xpt_release_ccb(done_ccb); - softc->state = DA_STATE_PROBE_BDC; + softc->state = DA_STATE_PROBE_BLK_LIMITS; xpt_schedule(periph, priority); return; } @@ -3336,12 +3330,20 @@ dadone(struct cam_periph *periph, union block_limits = (struct scsi_vpd_block_limits *)csio->data_ptr; if ((csio->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) { + uint32_t max_txfer_len = scsi_4btoul( + block_limits->max_txfer_len); uint32_t max_unmap_lba_cnt = scsi_4btoul( block_limits->max_unmap_lba_cnt); uint32_t max_unmap_blk_cnt = scsi_4btoul( block_limits->max_unmap_blk_cnt); uint64_t ws_max_blks = scsi_8btou64( block_limits->max_write_same_length); + + if (max_txfer_len != 0) { + softc->disk->d_maxsize = MIN(softc->maxio, + (off_t)max_txfer_len * softc->params.secsize); + } + /* * We should already support UNMAP but we check lba * and block count to be sure From owner-svn-src-stable@FreeBSD.ORG Thu May 8 08:37:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 547E3FD6; Thu, 8 May 2014 08:37:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40D81F6F; Thu, 8 May 2014 08:37:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s488bXT2091044; Thu, 8 May 2014 08:37:33 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s488bXwF091043; Thu, 8 May 2014 08:37:33 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201405080837.s488bXwF091043@svn.freebsd.org> From: Steven Hartland Date: Thu, 8 May 2014 08:37:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265665 - stable/9/sys/dev/acpica/Osd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 08:37:33 -0000 Author: smh Date: Thu May 8 08:37:32 2014 New Revision: 265665 URL: http://svnweb.freebsd.org/changeset/base/265665 Log: MFC r264849 & r264883 Exposed debug.acpi.max_tasks and debug.acpi.max_threads via sysctls so their values can be viewed. Sponsored by: Multiplay Modified: stable/9/sys/dev/acpica/Osd/OsdSchedule.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/acpica/Osd/OsdSchedule.c ============================================================================== --- stable/9/sys/dev/acpica/Osd/OsdSchedule.c Thu May 8 08:35:24 2014 (r265664) +++ stable/9/sys/dev/acpica/Osd/OsdSchedule.c Thu May 8 08:37:32 2014 (r265665) @@ -57,6 +57,8 @@ ACPI_MODULE_NAME("SCHEDULE") */ static int acpi_max_tasks = ACPI_MAX_TASKS; TUNABLE_INT("debug.acpi.max_tasks", &acpi_max_tasks); +SYSCTL_INT(_debug_acpi, OID_AUTO, max_tasks, CTLFLAG_RDTUN, &acpi_max_tasks, + 0, "Maximum acpi tasks"); /* * Allow the user to tune the number of task threads we start. It seems @@ -64,6 +66,8 @@ TUNABLE_INT("debug.acpi.max_tasks", &acp */ static int acpi_max_threads = ACPI_MAX_THREADS; TUNABLE_INT("debug.acpi.max_threads", &acpi_max_threads); +SYSCTL_INT(_debug_acpi, OID_AUTO, max_threads, CTLFLAG_RDTUN, &acpi_max_threads, + 0, "Maximum acpi threads"); static MALLOC_DEFINE(M_ACPITASK, "acpitask", "ACPI deferred task"); From owner-svn-src-stable@FreeBSD.ORG Thu May 8 11:59:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 180217C2; Thu, 8 May 2014 11:59:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 04DB15ED; Thu, 8 May 2014 11:59:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s48BxNYe076935; Thu, 8 May 2014 11:59:23 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s48BxNnu076933; Thu, 8 May 2014 11:59:23 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201405081159.s48BxNnu076933@svn.freebsd.org> From: Rick Macklem Date: Thu, 8 May 2014 11:59:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265667 - in stable/10/sys: fs/nfsserver nfsserver X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 11:59:24 -0000 Author: rmacklem Date: Thu May 8 11:59:23 2014 New Revision: 265667 URL: http://svnweb.freebsd.org/changeset/base/265667 Log: MFC: r264888 The PR reported that the old NFS server did not set uio_td == NULL for the VOP_READ() call. This patch fixes both the old and new server for this case. Modified: stable/10/sys/fs/nfsserver/nfs_nfsdport.c stable/10/sys/nfsserver/nfs_serv.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/10/sys/fs/nfsserver/nfs_nfsdport.c Thu May 8 11:56:06 2014 (r265666) +++ stable/10/sys/fs/nfsserver/nfs_nfsdport.c Thu May 8 11:59:23 2014 (r265667) @@ -673,6 +673,7 @@ nfsvno_read(struct vnode *vp, off_t off, uiop->uio_resid = len; uiop->uio_rw = UIO_READ; uiop->uio_segflg = UIO_SYSSPACE; + uiop->uio_td = NULL; nh = nfsrv_sequential_heuristic(uiop, vp); ioflag |= nh->nh_seqcount << IO_SEQSHIFT; error = VOP_READ(vp, uiop, IO_NODELOCKED | ioflag, cred); Modified: stable/10/sys/nfsserver/nfs_serv.c ============================================================================== --- stable/10/sys/nfsserver/nfs_serv.c Thu May 8 11:56:06 2014 (r265666) +++ stable/10/sys/nfsserver/nfs_serv.c Thu May 8 11:59:23 2014 (r265667) @@ -911,6 +911,7 @@ nfsrv_read(struct nfsrv_descript *nfsd, uiop->uio_resid = len; uiop->uio_rw = UIO_READ; uiop->uio_segflg = UIO_SYSSPACE; + uiop->uio_td = NULL; nh = nfsrv_sequential_heuristic(uiop, vp); ioflag |= nh->nh_seqcount << IO_SEQSHIFT; error = VOP_READ(vp, uiop, IO_NODELOCKED | ioflag, cred); From owner-svn-src-stable@FreeBSD.ORG Thu May 8 12:04:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E565E07; Thu, 8 May 2014 12:04:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF7DE755; Thu, 8 May 2014 12:04:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s48C4eFE080909; Thu, 8 May 2014 12:04:40 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s48C4eo7080908; Thu, 8 May 2014 12:04:40 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405081204.s48C4eo7080908@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 12:04:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265668 - stable/10/sys/geom/stripe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 12:04:41 -0000 Author: mav Date: Thu May 8 12:04:40 2014 New Revision: 265668 URL: http://svnweb.freebsd.org/changeset/base/265668 Log: MFC r264313: Do not increment bio_data in case of BIO_DELETE. This fixes KASSERT() panic in g_io_request(). Modified: stable/10/sys/geom/stripe/g_stripe.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/stripe/g_stripe.c ============================================================================== --- stable/10/sys/geom/stripe/g_stripe.c Thu May 8 11:59:23 2014 (r265667) +++ stable/10/sys/geom/stripe/g_stripe.c Thu May 8 12:04:40 2014 (r265668) @@ -472,9 +472,10 @@ g_stripe_start_economic(struct bio *bp, /* offset -= offset % stripesize; */ offset -= offset & (stripesize - 1); - addr += length; + if (bp->bio_cmd != BIO_DELETE) + addr += length; length = bp->bio_length - length; - for (no++; length > 0; no++, length -= stripesize, addr += stripesize) { + for (no++; length > 0; no++, length -= stripesize) { if (no > sc->sc_ndisks - 1) { no = 0; offset += stripesize; @@ -506,6 +507,9 @@ g_stripe_start_economic(struct bio *bp, cbp->bio_data = addr; cbp->bio_caller2 = sc->sc_disks[no]; + + if (bp->bio_cmd != BIO_DELETE) + addr += stripesize; } /* * Fire off all allocated requests! @@ -632,10 +636,13 @@ g_stripe_start(struct bio *bp) * a provider, so there is nothing to optmize. * and * 4. Request is not unmapped. + * and + * 5. It is not a BIO_DELETE. */ if (g_stripe_fast && bp->bio_length <= MAXPHYS && bp->bio_length >= stripesize * sc->sc_ndisks && - (bp->bio_flags & BIO_UNMAPPED) == 0) { + (bp->bio_flags & BIO_UNMAPPED) == 0 && + bp->bio_cmd != BIO_DELETE) { fast = 1; } error = 0; From owner-svn-src-stable@FreeBSD.ORG Thu May 8 12:07:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C2B95FC0; Thu, 8 May 2014 12:07:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A3D587A0; Thu, 8 May 2014 12:07:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s48C7gkU081440; Thu, 8 May 2014 12:07:42 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s48C7f0x081430; Thu, 8 May 2014 12:07:41 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405081207.s48C7f0x081430@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 12:07:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265669 - stable/10/sys/geom/raid X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 12:07:42 -0000 Author: mav Date: Thu May 8 12:07:40 2014 New Revision: 265669 URL: http://svnweb.freebsd.org/changeset/base/265669 Log: MFC r265054: Reduce number of opens by REOM RAID during provider taste. Instead opening/closing provider by each of metadata classes, do it only once in core code. Since for SCSI disks open/close means sending some SCSI commands to the device, this change reduces taste time. Sponsored by: iXsystems, Inc. Modified: stable/10/sys/geom/raid/g_raid.c stable/10/sys/geom/raid/md_ddf.c stable/10/sys/geom/raid/md_intel.c stable/10/sys/geom/raid/md_jmicron.c stable/10/sys/geom/raid/md_nvidia.c stable/10/sys/geom/raid/md_promise.c stable/10/sys/geom/raid/md_sii.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/raid/g_raid.c ============================================================================== --- stable/10/sys/geom/raid/g_raid.c Thu May 8 12:04:40 2014 (r265668) +++ stable/10/sys/geom/raid/g_raid.c Thu May 8 12:07:40 2014 (r265669) @@ -2251,6 +2251,8 @@ g_raid_taste(struct g_class *mp, struct return (NULL); G_RAID_DEBUG(2, "Tasting provider %s.", pp->name); + geom = NULL; + status = G_RAID_MD_TASTE_FAIL; gp = g_new_geomf(mp, "raid:taste"); /* * This orphan function should be never called. @@ -2259,8 +2261,9 @@ g_raid_taste(struct g_class *mp, struct cp = g_new_consumer(gp); cp->flags |= G_CF_DIRECT_RECEIVE; g_attach(cp, pp); + if (g_access(cp, 1, 0, 0) != 0) + goto ofail; - geom = NULL; LIST_FOREACH(class, &g_raid_md_classes, mdc_list) { if (!class->mdc_enable) continue; @@ -2276,6 +2279,9 @@ g_raid_taste(struct g_class *mp, struct break; } + if (status == G_RAID_MD_TASTE_FAIL) + (void)g_access(cp, -1, 0, 0); +ofail: g_detach(cp); g_destroy_consumer(cp); g_destroy_geom(gp); Modified: stable/10/sys/geom/raid/md_ddf.c ============================================================================== --- stable/10/sys/geom/raid/md_ddf.c Thu May 8 12:04:40 2014 (r265668) +++ stable/10/sys/geom/raid/md_ddf.c Thu May 8 12:07:40 2014 (r265669) @@ -2120,13 +2120,10 @@ g_raid_md_taste_ddf(struct g_raid_md_obj pp = cp->provider; /* Read metadata from device. */ - if (g_access(cp, 1, 0, 0) != 0) - return (G_RAID_MD_TASTE_FAIL); g_topology_unlock(); bzero(&meta, sizeof(meta)); error = ddf_meta_read(cp, &meta); g_topology_lock(); - g_access(cp, -1, 0, 0); if (error != 0) return (G_RAID_MD_TASTE_FAIL); be = meta.bigendian; @@ -2164,6 +2161,9 @@ g_raid_md_taste_ddf(struct g_raid_md_obj geom = sc->sc_geom; } + /* There is no return after this point, so we close passed consumer. */ + g_access(cp, -1, 0, 0); + rcp = g_new_consumer(geom); rcp->flags |= G_CF_DIRECT_RECEIVE; g_attach(rcp, pp); Modified: stable/10/sys/geom/raid/md_intel.c ============================================================================== --- stable/10/sys/geom/raid/md_intel.c Thu May 8 12:04:40 2014 (r265668) +++ stable/10/sys/geom/raid/md_intel.c Thu May 8 12:07:40 2014 (r265669) @@ -1382,8 +1382,6 @@ g_raid_md_taste_intel(struct g_raid_md_o meta = NULL; vendor = 0xffff; disk_pos = 0; - if (g_access(cp, 1, 0, 0) != 0) - return (G_RAID_MD_TASTE_FAIL); g_topology_unlock(); error = g_raid_md_get_label(cp, serial, sizeof(serial)); if (error != 0) { @@ -1396,7 +1394,6 @@ g_raid_md_taste_intel(struct g_raid_md_o g_io_getattr("GEOM::hba_vendor", cp, &len, &vendor); meta = intel_meta_read(cp); g_topology_lock(); - g_access(cp, -1, 0, 0); if (meta == NULL) { if (g_raid_aggressive_spare) { if (vendor != 0x8086) { @@ -1476,6 +1473,9 @@ search: G_RAID_DEBUG1(1, sc, "root_mount_hold %p", mdi->mdio_rootmount); } + /* There is no return after this point, so we close passed consumer. */ + g_access(cp, -1, 0, 0); + rcp = g_new_consumer(geom); rcp->flags |= G_CF_DIRECT_RECEIVE; g_attach(rcp, pp); @@ -1512,7 +1512,6 @@ search: return (result); fail2: g_topology_lock(); - g_access(cp, -1, 0, 0); fail1: free(meta, M_MD_INTEL); return (G_RAID_MD_TASTE_FAIL); Modified: stable/10/sys/geom/raid/md_jmicron.c ============================================================================== --- stable/10/sys/geom/raid/md_jmicron.c Thu May 8 12:04:40 2014 (r265668) +++ stable/10/sys/geom/raid/md_jmicron.c Thu May 8 12:07:40 2014 (r265669) @@ -837,15 +837,12 @@ g_raid_md_taste_jmicron(struct g_raid_md /* Read metadata from device. */ meta = NULL; vendor = 0xffff; - if (g_access(cp, 1, 0, 0) != 0) - return (G_RAID_MD_TASTE_FAIL); g_topology_unlock(); len = 2; if (pp->geom->rank == 1) g_io_getattr("GEOM::hba_vendor", cp, &len, &vendor); meta = jmicron_meta_read(cp); g_topology_lock(); - g_access(cp, -1, 0, 0); if (meta == NULL) { if (g_raid_aggressive_spare) { if (vendor == 0x197b) { @@ -922,6 +919,9 @@ search: G_RAID_DEBUG1(1, sc, "root_mount_hold %p", mdi->mdio_rootmount); } + /* There is no return after this point, so we close passed consumer. */ + g_access(cp, -1, 0, 0); + rcp = g_new_consumer(geom); rcp->flags |= G_CF_DIRECT_RECEIVE; g_attach(rcp, pp); Modified: stable/10/sys/geom/raid/md_nvidia.c ============================================================================== --- stable/10/sys/geom/raid/md_nvidia.c Thu May 8 12:04:40 2014 (r265668) +++ stable/10/sys/geom/raid/md_nvidia.c Thu May 8 12:07:40 2014 (r265669) @@ -841,15 +841,12 @@ g_raid_md_taste_nvidia(struct g_raid_md_ /* Read metadata from device. */ meta = NULL; vendor = 0xffff; - if (g_access(cp, 1, 0, 0) != 0) - return (G_RAID_MD_TASTE_FAIL); g_topology_unlock(); len = 2; if (pp->geom->rank == 1) g_io_getattr("GEOM::hba_vendor", cp, &len, &vendor); meta = nvidia_meta_read(cp); g_topology_lock(); - g_access(cp, -1, 0, 0); if (meta == NULL) { if (g_raid_aggressive_spare) { if (vendor == 0x10de) { @@ -918,6 +915,9 @@ search: G_RAID_DEBUG1(1, sc, "root_mount_hold %p", mdi->mdio_rootmount); } + /* There is no return after this point, so we close passed consumer. */ + g_access(cp, -1, 0, 0); + rcp = g_new_consumer(geom); rcp->flags |= G_CF_DIRECT_RECEIVE; g_attach(rcp, pp); Modified: stable/10/sys/geom/raid/md_promise.c ============================================================================== --- stable/10/sys/geom/raid/md_promise.c Thu May 8 12:04:40 2014 (r265668) +++ stable/10/sys/geom/raid/md_promise.c Thu May 8 12:07:40 2014 (r265669) @@ -1106,15 +1106,12 @@ g_raid_md_taste_promise(struct g_raid_md /* Read metadata from device. */ meta = NULL; vendor = 0xffff; - if (g_access(cp, 1, 0, 0) != 0) - return (G_RAID_MD_TASTE_FAIL); g_topology_unlock(); len = 2; if (pp->geom->rank == 1) g_io_getattr("GEOM::hba_vendor", cp, &len, &vendor); subdisks = promise_meta_read(cp, metaarr); g_topology_lock(); - g_access(cp, -1, 0, 0); if (subdisks == 0) { if (g_raid_aggressive_spare) { if (vendor == 0x105a || vendor == 0x1002) { @@ -1175,6 +1172,9 @@ search: geom = sc->sc_geom; } + /* There is no return after this point, so we close passed consumer. */ + g_access(cp, -1, 0, 0); + rcp = g_new_consumer(geom); rcp->flags |= G_CF_DIRECT_RECEIVE; g_attach(rcp, pp); Modified: stable/10/sys/geom/raid/md_sii.c ============================================================================== --- stable/10/sys/geom/raid/md_sii.c Thu May 8 12:04:40 2014 (r265668) +++ stable/10/sys/geom/raid/md_sii.c Thu May 8 12:07:40 2014 (r265669) @@ -923,15 +923,12 @@ g_raid_md_taste_sii(struct g_raid_md_obj /* Read metadata from device. */ meta = NULL; vendor = 0xffff; - if (g_access(cp, 1, 0, 0) != 0) - return (G_RAID_MD_TASTE_FAIL); g_topology_unlock(); len = 2; if (pp->geom->rank == 1) g_io_getattr("GEOM::hba_vendor", cp, &len, &vendor); meta = sii_meta_read(cp); g_topology_lock(); - g_access(cp, -1, 0, 0); if (meta == NULL) { if (g_raid_aggressive_spare) { if (vendor == 0x1095) { @@ -1011,6 +1008,9 @@ search: G_RAID_DEBUG1(1, sc, "root_mount_hold %p", mdi->mdio_rootmount); } + /* There is no return after this point, so we close passed consumer. */ + g_access(cp, -1, 0, 0); + rcp = g_new_consumer(geom); rcp->flags |= G_CF_DIRECT_RECEIVE; g_attach(rcp, pp); From owner-svn-src-stable@FreeBSD.ORG Thu May 8 12:23:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB224663; Thu, 8 May 2014 12:23:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C821796E; Thu, 8 May 2014 12:23:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s48CNUcv089867; Thu, 8 May 2014 12:23:30 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s48CNU3Y089866; Thu, 8 May 2014 12:23:30 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405081223.s48CNU3Y089866@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 12:23:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265670 - stable/9/sys/geom/mirror X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 12:23:31 -0000 Author: mav Date: Thu May 8 12:23:30 2014 New Revision: 265670 URL: http://svnweb.freebsd.org/changeset/base/265670 Log: MFC r254252: Fix the formatting of the error message. The G_MIRROR_DEBUG() macro already appends a newline. Also, most of the log messages emitted by gmirror start with an uppercase letter. Modified: stable/9/sys/geom/mirror/g_mirror.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/geom/mirror/g_mirror.c ============================================================================== --- stable/9/sys/geom/mirror/g_mirror.c Thu May 8 12:07:40 2014 (r265669) +++ stable/9/sys/geom/mirror/g_mirror.c Thu May 8 12:23:30 2014 (r265670) @@ -2054,8 +2054,8 @@ g_mirror_launch_provider(struct g_mirror } /* A provider underneath us doesn't support unmapped */ if ((dp->flags & G_PF_ACCEPT_UNMAPPED) == 0) { - G_MIRROR_DEBUG(0, "cancelling unmapped " - "because of %s\n", dp->name); + G_MIRROR_DEBUG(0, "Cancelling unmapped " + "because of %s.", dp->name); pp->flags &= ~G_PF_ACCEPT_UNMAPPED; } } From owner-svn-src-stable@FreeBSD.ORG Thu May 8 12:26:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 430527ED; Thu, 8 May 2014 12:26:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2FAC0988; Thu, 8 May 2014 12:26:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s48CQ91V090245; Thu, 8 May 2014 12:26:09 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s48CQ8vI090241; Thu, 8 May 2014 12:26:08 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405081226.s48CQ8vI090241@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 12:26:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265671 - in stable/9/sys: geom kern sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 12:26:09 -0000 Author: mav Date: Thu May 8 12:26:08 2014 New Revision: 265671 URL: http://svnweb.freebsd.org/changeset/base/265671 Log: MFC r256603: Introduce new function devstat_end_transaction_bio_bt(), adding new argument to specify present time. Use this function to move binuptime() out of lock, substantially reducing lock congestion when slow timecounter is used. Modified: stable/9/sys/geom/geom_disk.c stable/9/sys/geom/geom_io.c stable/9/sys/kern/subr_devstat.c stable/9/sys/sys/devicestat.h Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/geom/geom_disk.c ============================================================================== --- stable/9/sys/geom/geom_disk.c Thu May 8 12:23:30 2014 (r265670) +++ stable/9/sys/geom/geom_disk.c Thu May 8 12:26:08 2014 (r265671) @@ -233,6 +233,7 @@ g_disk_setstate(struct bio *bp, struct g static void g_disk_done(struct bio *bp) { + struct bintime now; struct bio *bp2; struct g_disk_softc *sc; @@ -241,12 +242,13 @@ g_disk_done(struct bio *bp) bp2 = bp->bio_parent; sc = bp2->bio_to->private; bp->bio_completed = bp->bio_length - bp->bio_resid; + binuptime(&now); mtx_lock(&sc->done_mtx); if (bp2->bio_error == 0) bp2->bio_error = bp->bio_error; bp2->bio_completed += bp->bio_completed; if ((bp->bio_cmd & (BIO_READ|BIO_WRITE|BIO_DELETE)) != 0) - devstat_end_transaction_bio(sc->dp->d_devstat, bp); + devstat_end_transaction_bio_bt(sc->dp->d_devstat, bp, &now); g_destroy_bio(bp); bp2->bio_inbed++; if (bp2->bio_children == bp2->bio_inbed) { Modified: stable/9/sys/geom/geom_io.c ============================================================================== --- stable/9/sys/geom/geom_io.c Thu May 8 12:23:30 2014 (r265670) +++ stable/9/sys/geom/geom_io.c Thu May 8 12:26:08 2014 (r265671) @@ -510,6 +510,7 @@ g_io_request(struct bio *bp, struct g_co void g_io_deliver(struct bio *bp, int error) { + struct bintime now; struct g_consumer *cp; struct g_provider *pp; int first; @@ -563,11 +564,13 @@ g_io_deliver(struct bio *bp, int error) * can not update one instance of the statistics from more * than one thread at a time, so grab the lock first. */ + if (g_collectstats) + binuptime(&now); g_bioq_lock(&g_bio_run_up); if (g_collectstats & 1) - devstat_end_transaction_bio(pp->stat, bp); + devstat_end_transaction_bio_bt(pp->stat, bp, &now); if (g_collectstats & 2) - devstat_end_transaction_bio(cp->stat, bp); + devstat_end_transaction_bio_bt(cp->stat, bp, &now); cp->nend++; pp->nend++; Modified: stable/9/sys/kern/subr_devstat.c ============================================================================== --- stable/9/sys/kern/subr_devstat.c Thu May 8 12:23:30 2014 (r265670) +++ stable/9/sys/kern/subr_devstat.c Thu May 8 12:26:08 2014 (r265671) @@ -339,6 +339,14 @@ devstat_end_transaction(struct devstat * void devstat_end_transaction_bio(struct devstat *ds, struct bio *bp) { + + devstat_end_transaction_bio_bt(ds, bp, NULL); +} + +void +devstat_end_transaction_bio_bt(struct devstat *ds, struct bio *bp, + struct bintime *now) +{ devstat_trans_flags flg; /* sanity check */ @@ -355,7 +363,7 @@ devstat_end_transaction_bio(struct devst flg = DEVSTAT_NO_DATA; devstat_end_transaction(ds, bp->bio_bcount - bp->bio_resid, - DEVSTAT_TAG_SIMPLE, flg, NULL, &bp->bio_t0); + DEVSTAT_TAG_SIMPLE, flg, now, &bp->bio_t0); DTRACE_DEVSTAT_BIO_DONE(); } Modified: stable/9/sys/sys/devicestat.h ============================================================================== --- stable/9/sys/sys/devicestat.h Thu May 8 12:23:30 2014 (r265670) +++ stable/9/sys/sys/devicestat.h Thu May 8 12:26:08 2014 (r265671) @@ -199,6 +199,8 @@ void devstat_end_transaction(struct devs devstat_trans_flags flags, struct bintime *now, struct bintime *then); void devstat_end_transaction_bio(struct devstat *ds, struct bio *bp); +void devstat_end_transaction_bio_bt(struct devstat *ds, struct bio *bp, + struct bintime *now); #endif #endif /* _DEVICESTAT_H */ From owner-svn-src-stable@FreeBSD.ORG Thu May 8 12:27:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DFB0692C; Thu, 8 May 2014 12:27:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD635992; Thu, 8 May 2014 12:27:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s48CROg4090419; Thu, 8 May 2014 12:27:24 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s48CRO9Z090418; Thu, 8 May 2014 12:27:24 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405081227.s48CRO9Z090418@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 12:27:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265672 - stable/9/sys/geom X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 12:27:25 -0000 Author: mav Date: Thu May 8 12:27:24 2014 New Revision: 265672 URL: http://svnweb.freebsd.org/changeset/base/265672 Log: MFC r256606: Move g_io_deliver() out of the lock, as required for direct dispatch. Move g_destroy_bio() out too to reduce lock scope even more. Modified: stable/9/sys/geom/geom_disk.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/geom/geom_disk.c ============================================================================== --- stable/9/sys/geom/geom_disk.c Thu May 8 12:26:08 2014 (r265671) +++ stable/9/sys/geom/geom_disk.c Thu May 8 12:27:24 2014 (r265672) @@ -249,13 +249,14 @@ g_disk_done(struct bio *bp) bp2->bio_completed += bp->bio_completed; if ((bp->bio_cmd & (BIO_READ|BIO_WRITE|BIO_DELETE)) != 0) devstat_end_transaction_bio_bt(sc->dp->d_devstat, bp, &now); - g_destroy_bio(bp); bp2->bio_inbed++; if (bp2->bio_children == bp2->bio_inbed) { + mtx_unlock(&sc->done_mtx); bp2->bio_resid = bp2->bio_bcount - bp2->bio_completed; g_io_deliver(bp2, bp2->bio_error); - } - mtx_unlock(&sc->done_mtx); + } else + mtx_unlock(&sc->done_mtx); + g_destroy_bio(bp); } static int From owner-svn-src-stable@FreeBSD.ORG Thu May 8 12:28:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 59429AC0; Thu, 8 May 2014 12:28:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A5BA9A8; Thu, 8 May 2014 12:28:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s48CSQlR090583; Thu, 8 May 2014 12:28:26 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s48CSOOK090575; Thu, 8 May 2014 12:28:24 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405081228.s48CSOOK090575@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 12:28:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265673 - stable/9/sys/geom/raid X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 12:28:26 -0000 Author: mav Date: Thu May 8 12:28:24 2014 New Revision: 265673 URL: http://svnweb.freebsd.org/changeset/base/265673 Log: MFC r256610: Add unmapped I/O support to GEOM RAID. Modified: stable/9/sys/geom/raid/g_raid.c stable/9/sys/geom/raid/g_raid.h stable/9/sys/geom/raid/tr_concat.c stable/9/sys/geom/raid/tr_raid0.c stable/9/sys/geom/raid/tr_raid1.c stable/9/sys/geom/raid/tr_raid1e.c stable/9/sys/geom/raid/tr_raid5.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/geom/raid/g_raid.c ============================================================================== --- stable/9/sys/geom/raid/g_raid.c Thu May 8 12:27:24 2014 (r265672) +++ stable/9/sys/geom/raid/g_raid.c Thu May 8 12:28:24 2014 (r265673) @@ -993,20 +993,15 @@ g_raid_tr_flush_common(struct g_raid_tr_ cbp->bio_caller1 = sd; bioq_insert_tail(&queue, cbp); } - for (cbp = bioq_first(&queue); cbp != NULL; - cbp = bioq_first(&queue)) { - bioq_remove(&queue, cbp); + while ((cbp = bioq_takefirst(&queue)) != NULL) { sd = cbp->bio_caller1; cbp->bio_caller1 = NULL; g_raid_subdisk_iostart(sd, cbp); } return; failure: - for (cbp = bioq_first(&queue); cbp != NULL; - cbp = bioq_first(&queue)) { - bioq_remove(&queue, cbp); + while ((cbp = bioq_takefirst(&queue)) != NULL) g_destroy_bio(cbp); - } if (bp->bio_error == 0) bp->bio_error = ENOMEM; g_raid_iodone(bp, bp->bio_error); @@ -1639,11 +1634,13 @@ static void g_raid_launch_provider(struct g_raid_volume *vol) { struct g_raid_disk *disk; + struct g_raid_subdisk *sd; struct g_raid_softc *sc; struct g_provider *pp; char name[G_RAID_MAX_VOLUMENAME]; char announce_buf[80], buf1[32]; off_t off; + int i; sc = vol->v_softc; sx_assert(&sc->sc_lock, SX_LOCKED); @@ -1673,6 +1670,17 @@ g_raid_launch_provider(struct g_raid_vol } pp = g_new_providerf(sc->sc_geom, "%s", name); + if (vol->v_tr->tro_class->trc_accept_unmapped) { + pp->flags |= G_PF_ACCEPT_UNMAPPED; + for (i = 0; i < vol->v_disks_count; i++) { + sd = &vol->v_subdisks[i]; + if (sd->sd_state == G_RAID_SUBDISK_S_NONE) + continue; + if ((sd->sd_disk->d_consumer->provider->flags & + G_PF_ACCEPT_UNMAPPED) == 0) + pp->flags &= ~G_PF_ACCEPT_UNMAPPED; + } + } pp->private = vol; pp->mediasize = vol->v_mediasize; pp->sectorsize = vol->v_sectorsize; Modified: stable/9/sys/geom/raid/g_raid.h ============================================================================== --- stable/9/sys/geom/raid/g_raid.h Thu May 8 12:27:24 2014 (r265672) +++ stable/9/sys/geom/raid/g_raid.h Thu May 8 12:28:24 2014 (r265673) @@ -376,6 +376,7 @@ struct g_raid_tr_class { KOBJ_CLASS_FIELDS; int trc_enable; int trc_priority; + int trc_accept_unmapped; LIST_ENTRY(g_raid_tr_class) trc_list; }; Modified: stable/9/sys/geom/raid/tr_concat.c ============================================================================== --- stable/9/sys/geom/raid/tr_concat.c Thu May 8 12:27:24 2014 (r265672) +++ stable/9/sys/geom/raid/tr_concat.c Thu May 8 12:28:24 2014 (r265673) @@ -74,7 +74,8 @@ static struct g_raid_tr_class g_raid_tr_ g_raid_tr_concat_methods, sizeof(struct g_raid_tr_concat_object), .trc_enable = 1, - .trc_priority = 50 + .trc_priority = 50, + .trc_accept_unmapped = 1 }; static int @@ -227,7 +228,10 @@ g_raid_tr_iostart_concat(struct g_raid_t offset = bp->bio_offset; remain = bp->bio_length; - addr = bp->bio_data; + if ((bp->bio_flags & BIO_UNMAPPED) != 0) + addr = NULL; + else + addr = bp->bio_data; no = 0; while (no < vol->v_disks_count && offset >= vol->v_subdisks[no].sd_size) { @@ -244,8 +248,16 @@ g_raid_tr_iostart_concat(struct g_raid_t if (cbp == NULL) goto failure; cbp->bio_offset = offset; - cbp->bio_data = addr; cbp->bio_length = length; + if ((bp->bio_flags & BIO_UNMAPPED) != 0 && + bp->bio_cmd != BIO_DELETE) { + cbp->bio_ma_offset += (uintptr_t)addr; + cbp->bio_ma += cbp->bio_ma_offset / PAGE_SIZE; + cbp->bio_ma_offset %= PAGE_SIZE; + cbp->bio_ma_n = round_page(cbp->bio_ma_offset + + cbp->bio_length) / PAGE_SIZE; + } else + cbp->bio_data = addr; cbp->bio_caller1 = sd; bioq_insert_tail(&queue, cbp); remain -= length; @@ -257,20 +269,15 @@ g_raid_tr_iostart_concat(struct g_raid_t ("Request ends after volume end (%ju, %ju)", bp->bio_offset, bp->bio_length)); } while (remain > 0); - for (cbp = bioq_first(&queue); cbp != NULL; - cbp = bioq_first(&queue)) { - bioq_remove(&queue, cbp); + while ((cbp = bioq_takefirst(&queue)) != NULL) { sd = cbp->bio_caller1; cbp->bio_caller1 = NULL; g_raid_subdisk_iostart(sd, cbp); } return; failure: - for (cbp = bioq_first(&queue); cbp != NULL; - cbp = bioq_first(&queue)) { - bioq_remove(&queue, cbp); + while ((cbp = bioq_takefirst(&queue)) != NULL) g_destroy_bio(cbp); - } if (bp->bio_error == 0) bp->bio_error = ENOMEM; g_raid_iodone(bp, bp->bio_error); Modified: stable/9/sys/geom/raid/tr_raid0.c ============================================================================== --- stable/9/sys/geom/raid/tr_raid0.c Thu May 8 12:27:24 2014 (r265672) +++ stable/9/sys/geom/raid/tr_raid0.c Thu May 8 12:28:24 2014 (r265673) @@ -74,7 +74,8 @@ static struct g_raid_tr_class g_raid_tr_ g_raid_tr_raid0_methods, sizeof(struct g_raid_tr_raid0_object), .trc_enable = 1, - .trc_priority = 100 + .trc_priority = 100, + .trc_accept_unmapped = 1 }; static int @@ -204,7 +205,10 @@ g_raid_tr_iostart_raid0(struct g_raid_tr g_raid_tr_flush_common(tr, bp); return; } - addr = bp->bio_data; + if ((bp->bio_flags & BIO_UNMAPPED) != 0) + addr = NULL; + else + addr = bp->bio_data; strip_size = vol->v_strip_size; /* Stripe number. */ @@ -225,8 +229,16 @@ g_raid_tr_iostart_raid0(struct g_raid_tr if (cbp == NULL) goto failure; cbp->bio_offset = offset + start; - cbp->bio_data = addr; cbp->bio_length = length; + if ((bp->bio_flags & BIO_UNMAPPED) != 0 && + bp->bio_cmd != BIO_DELETE) { + cbp->bio_ma_offset += (uintptr_t)addr; + cbp->bio_ma += cbp->bio_ma_offset / PAGE_SIZE; + cbp->bio_ma_offset %= PAGE_SIZE; + cbp->bio_ma_n = round_page(cbp->bio_ma_offset + + cbp->bio_length) / PAGE_SIZE; + } else + cbp->bio_data = addr; cbp->bio_caller1 = &vol->v_subdisks[no]; bioq_insert_tail(&queue, cbp); if (++no >= vol->v_disks_count) { @@ -238,20 +250,15 @@ g_raid_tr_iostart_raid0(struct g_raid_tr addr += length; start = 0; } while (remain > 0); - for (cbp = bioq_first(&queue); cbp != NULL; - cbp = bioq_first(&queue)) { - bioq_remove(&queue, cbp); + while ((cbp = bioq_takefirst(&queue)) != NULL) { sd = cbp->bio_caller1; cbp->bio_caller1 = NULL; g_raid_subdisk_iostart(sd, cbp); } return; failure: - for (cbp = bioq_first(&queue); cbp != NULL; - cbp = bioq_first(&queue)) { - bioq_remove(&queue, cbp); + while ((cbp = bioq_takefirst(&queue)) != NULL) g_destroy_bio(cbp); - } if (bp->bio_error == 0) bp->bio_error = ENOMEM; g_raid_iodone(bp, bp->bio_error); Modified: stable/9/sys/geom/raid/tr_raid1.c ============================================================================== --- stable/9/sys/geom/raid/tr_raid1.c Thu May 8 12:27:24 2014 (r265672) +++ stable/9/sys/geom/raid/tr_raid1.c Thu May 8 12:28:24 2014 (r265673) @@ -130,7 +130,8 @@ static struct g_raid_tr_class g_raid_tr_ g_raid_tr_raid1_methods, sizeof(struct g_raid_tr_raid1_object), .trc_enable = 1, - .trc_priority = 100 + .trc_priority = 100, + .trc_accept_unmapped = 1 }; static void g_raid_tr_raid1_rebuild_abort(struct g_raid_tr_object *tr); @@ -594,20 +595,15 @@ g_raid_tr_iostart_raid1_write(struct g_r cbp->bio_caller1 = sd; bioq_insert_tail(&queue, cbp); } - for (cbp = bioq_first(&queue); cbp != NULL; - cbp = bioq_first(&queue)) { - bioq_remove(&queue, cbp); + while ((cbp = bioq_takefirst(&queue)) != NULL) { sd = cbp->bio_caller1; cbp->bio_caller1 = NULL; g_raid_subdisk_iostart(sd, cbp); } return; failure: - for (cbp = bioq_first(&queue); cbp != NULL; - cbp = bioq_first(&queue)) { - bioq_remove(&queue, cbp); + while ((cbp = bioq_takefirst(&queue)) != NULL) g_destroy_bio(cbp); - } if (bp->bio_error == 0) bp->bio_error = ENOMEM; g_raid_iodone(bp, bp->bio_error); Modified: stable/9/sys/geom/raid/tr_raid1e.c ============================================================================== --- stable/9/sys/geom/raid/tr_raid1e.c Thu May 8 12:27:24 2014 (r265672) +++ stable/9/sys/geom/raid/tr_raid1e.c Thu May 8 12:28:24 2014 (r265673) @@ -134,7 +134,8 @@ static struct g_raid_tr_class g_raid_tr_ g_raid_tr_raid1e_methods, sizeof(struct g_raid_tr_raid1e_object), .trc_enable = 1, - .trc_priority = 200 + .trc_priority = 200, + .trc_accept_unmapped = 1 }; static void g_raid_tr_raid1e_rebuild_abort(struct g_raid_tr_object *tr); @@ -701,7 +702,10 @@ g_raid_tr_iostart_raid1e_read(struct g_r int best; vol = tr->tro_volume; - addr = bp->bio_data; + if ((bp->bio_flags & BIO_UNMAPPED) != 0) + addr = NULL; + else + addr = bp->bio_data; strip_size = vol->v_strip_size; V2P(vol, bp->bio_offset, &no, &offset, &start); remain = bp->bio_length; @@ -721,8 +725,15 @@ g_raid_tr_iostart_raid1e_read(struct g_r if (cbp == NULL) goto failure; cbp->bio_offset = offset + start; - cbp->bio_data = addr; cbp->bio_length = length; + if ((bp->bio_flags & BIO_UNMAPPED) != 0) { + cbp->bio_ma_offset += (uintptr_t)addr; + cbp->bio_ma += cbp->bio_ma_offset / PAGE_SIZE; + cbp->bio_ma_offset %= PAGE_SIZE; + cbp->bio_ma_n = round_page(cbp->bio_ma_offset + + cbp->bio_length) / PAGE_SIZE; + } else + cbp->bio_data = addr; cbp->bio_caller1 = &vol->v_subdisks[no]; bioq_insert_tail(&queue, cbp); no += N - best; @@ -734,20 +745,15 @@ g_raid_tr_iostart_raid1e_read(struct g_r addr += length; start = 0; } - for (cbp = bioq_first(&queue); cbp != NULL; - cbp = bioq_first(&queue)) { - bioq_remove(&queue, cbp); + while ((cbp = bioq_takefirst(&queue)) != NULL) { sd = cbp->bio_caller1; cbp->bio_caller1 = NULL; g_raid_subdisk_iostart(sd, cbp); } return; failure: - for (cbp = bioq_first(&queue); cbp != NULL; - cbp = bioq_first(&queue)) { - bioq_remove(&queue, cbp); + while ((cbp = bioq_takefirst(&queue)) != NULL) g_destroy_bio(cbp); - } if (bp->bio_error == 0) bp->bio_error = ENOMEM; g_raid_iodone(bp, bp->bio_error); @@ -766,7 +772,10 @@ g_raid_tr_iostart_raid1e_write(struct g_ int i; vol = tr->tro_volume; - addr = bp->bio_data; + if ((bp->bio_flags & BIO_UNMAPPED) != 0) + addr = NULL; + else + addr = bp->bio_data; strip_size = vol->v_strip_size; V2P(vol, bp->bio_offset, &no, &offset, &start); remain = bp->bio_length; @@ -791,8 +800,16 @@ g_raid_tr_iostart_raid1e_write(struct g_ if (cbp == NULL) goto failure; cbp->bio_offset = offset + start; - cbp->bio_data = addr; cbp->bio_length = length; + if ((bp->bio_flags & BIO_UNMAPPED) != 0 && + bp->bio_cmd != BIO_DELETE) { + cbp->bio_ma_offset += (uintptr_t)addr; + cbp->bio_ma += cbp->bio_ma_offset / PAGE_SIZE; + cbp->bio_ma_offset %= PAGE_SIZE; + cbp->bio_ma_n = round_page(cbp->bio_ma_offset + + cbp->bio_length) / PAGE_SIZE; + } else + cbp->bio_data = addr; cbp->bio_caller1 = sd; bioq_insert_tail(&queue, cbp); nextdisk: @@ -806,20 +823,15 @@ nextdisk: addr += length; start = 0; } - for (cbp = bioq_first(&queue); cbp != NULL; - cbp = bioq_first(&queue)) { - bioq_remove(&queue, cbp); + while ((cbp = bioq_takefirst(&queue)) != NULL) { sd = cbp->bio_caller1; cbp->bio_caller1 = NULL; g_raid_subdisk_iostart(sd, cbp); } return; failure: - for (cbp = bioq_first(&queue); cbp != NULL; - cbp = bioq_first(&queue)) { - bioq_remove(&queue, cbp); + while ((cbp = bioq_takefirst(&queue)) != NULL) g_destroy_bio(cbp); - } if (bp->bio_error == 0) bp->bio_error = ENOMEM; g_raid_iodone(bp, bp->bio_error); @@ -1030,6 +1042,9 @@ rebuild_round_done: cbp->bio_offset = offset + start; cbp->bio_length = bp->bio_length; cbp->bio_data = bp->bio_data; + cbp->bio_ma = bp->bio_ma; + cbp->bio_ma_offset = bp->bio_ma_offset; + cbp->bio_ma_n = bp->bio_ma_n; g_destroy_bio(bp); nsd = &vol->v_subdisks[disk]; G_RAID_LOGREQ(2, cbp, "Retrying read from %d", Modified: stable/9/sys/geom/raid/tr_raid5.c ============================================================================== --- stable/9/sys/geom/raid/tr_raid5.c Thu May 8 12:27:24 2014 (r265672) +++ stable/9/sys/geom/raid/tr_raid5.c Thu May 8 12:28:24 2014 (r265673) @@ -324,20 +324,15 @@ g_raid_tr_iostart_raid5_read(struct g_ra addr += length; start = 0; } while (remain > 0); - for (cbp = bioq_first(&queue); cbp != NULL; - cbp = bioq_first(&queue)) { - bioq_remove(&queue, cbp); + while ((cbp = bioq_takefirst(&queue)) != NULL) { sd = cbp->bio_caller1; cbp->bio_caller1 = NULL; g_raid_subdisk_iostart(sd, cbp); } return; failure: - for (cbp = bioq_first(&queue); cbp != NULL; - cbp = bioq_first(&queue)) { - bioq_remove(&queue, cbp); + while ((cbp = bioq_takefirst(&queue)) != NULL) g_destroy_bio(cbp); - } if (bp->bio_error == 0) bp->bio_error = ENOMEM; g_raid_iodone(bp, bp->bio_error); From owner-svn-src-stable@FreeBSD.ORG Thu May 8 12:35:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79E98D5D; Thu, 8 May 2014 12:35:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 671E0A54; Thu, 8 May 2014 12:35:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s48CZcL8094610; Thu, 8 May 2014 12:35:38 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s48CZcV8094609; Thu, 8 May 2014 12:35:38 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405081235.s48CZcV8094609@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 12:35:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265674 - stable/9/sys/geom X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 12:35:38 -0000 Author: mav Date: Thu May 8 12:35:37 2014 New Revision: 265674 URL: http://svnweb.freebsd.org/changeset/base/265674 Log: MFC r256607, r259247: Fix passing uninitialized bio_resid argument to g_trace(). Modified: stable/9/sys/geom/geom_dev.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/geom/geom_dev.c ============================================================================== --- stable/9/sys/geom/geom_dev.c Thu May 8 12:28:24 2014 (r265673) +++ stable/9/sys/geom/geom_dev.c Thu May 8 12:35:37 2014 (r265674) @@ -489,16 +489,16 @@ g_dev_done(struct bio *bp2) sc = cp->private; bp = bp2->bio_parent; bp->bio_error = bp2->bio_error; - if (bp->bio_error != 0) { + bp->bio_completed = bp2->bio_completed; + bp->bio_resid = bp->bio_length - bp2->bio_completed; + if (bp2->bio_error != 0) { g_trace(G_T_BIO, "g_dev_done(%p) had error %d", - bp2, bp->bio_error); + bp2, bp2->bio_error); bp->bio_flags |= BIO_ERROR; } else { g_trace(G_T_BIO, "g_dev_done(%p/%p) resid %ld completed %jd", - bp2, bp, bp->bio_resid, (intmax_t)bp2->bio_completed); + bp2, bp, bp2->bio_resid, (intmax_t)bp2->bio_completed); } - bp->bio_resid = bp->bio_length - bp2->bio_completed; - bp->bio_completed = bp2->bio_completed; g_destroy_bio(bp2); destroy = 0; mtx_lock(&sc->sc_mtx); From owner-svn-src-stable@FreeBSD.ORG Thu May 8 12:39:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 24672F33; Thu, 8 May 2014 12:39:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 056C2A7F; Thu, 8 May 2014 12:39:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s48Cd8q1095022; Thu, 8 May 2014 12:39:08 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s48Cd7Lk095010; Thu, 8 May 2014 12:39:07 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405081239.s48Cd7Lk095010@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 12:39:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265675 - stable/9/sys/geom/raid X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 12:39:09 -0000 Author: mav Date: Thu May 8 12:39:07 2014 New Revision: 265675 URL: http://svnweb.freebsd.org/changeset/base/265675 Log: MFC r265054: Reduce number of opens by REOM RAID during provider taste. Instead opening/closing provider by each of metadata classes, do it only once in core code. Since for SCSI disks open/close means sending some SCSI commands to the device, this change reduces taste time. Modified: stable/9/sys/geom/raid/g_raid.c stable/9/sys/geom/raid/md_ddf.c stable/9/sys/geom/raid/md_intel.c stable/9/sys/geom/raid/md_jmicron.c stable/9/sys/geom/raid/md_nvidia.c stable/9/sys/geom/raid/md_promise.c stable/9/sys/geom/raid/md_sii.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/geom/raid/g_raid.c ============================================================================== --- stable/9/sys/geom/raid/g_raid.c Thu May 8 12:35:37 2014 (r265674) +++ stable/9/sys/geom/raid/g_raid.c Thu May 8 12:39:07 2014 (r265675) @@ -2249,6 +2249,8 @@ g_raid_taste(struct g_class *mp, struct return (NULL); G_RAID_DEBUG(2, "Tasting provider %s.", pp->name); + geom = NULL; + status = G_RAID_MD_TASTE_FAIL; gp = g_new_geomf(mp, "raid:taste"); /* * This orphan function should be never called. @@ -2256,8 +2258,9 @@ g_raid_taste(struct g_class *mp, struct gp->orphan = g_raid_taste_orphan; cp = g_new_consumer(gp); g_attach(cp, pp); + if (g_access(cp, 1, 0, 0) != 0) + goto ofail; - geom = NULL; LIST_FOREACH(class, &g_raid_md_classes, mdc_list) { if (!class->mdc_enable) continue; @@ -2273,6 +2276,9 @@ g_raid_taste(struct g_class *mp, struct break; } + if (status == G_RAID_MD_TASTE_FAIL) + (void)g_access(cp, -1, 0, 0); +ofail: g_detach(cp); g_destroy_consumer(cp); g_destroy_geom(gp); Modified: stable/9/sys/geom/raid/md_ddf.c ============================================================================== --- stable/9/sys/geom/raid/md_ddf.c Thu May 8 12:35:37 2014 (r265674) +++ stable/9/sys/geom/raid/md_ddf.c Thu May 8 12:39:07 2014 (r265675) @@ -2120,13 +2120,10 @@ g_raid_md_taste_ddf(struct g_raid_md_obj pp = cp->provider; /* Read metadata from device. */ - if (g_access(cp, 1, 0, 0) != 0) - return (G_RAID_MD_TASTE_FAIL); g_topology_unlock(); bzero(&meta, sizeof(meta)); error = ddf_meta_read(cp, &meta); g_topology_lock(); - g_access(cp, -1, 0, 0); if (error != 0) return (G_RAID_MD_TASTE_FAIL); be = meta.bigendian; @@ -2164,6 +2161,9 @@ g_raid_md_taste_ddf(struct g_raid_md_obj geom = sc->sc_geom; } + /* There is no return after this point, so we close passed consumer. */ + g_access(cp, -1, 0, 0); + rcp = g_new_consumer(geom); g_attach(rcp, pp); if (g_access(rcp, 1, 1, 1) != 0) Modified: stable/9/sys/geom/raid/md_intel.c ============================================================================== --- stable/9/sys/geom/raid/md_intel.c Thu May 8 12:35:37 2014 (r265674) +++ stable/9/sys/geom/raid/md_intel.c Thu May 8 12:39:07 2014 (r265675) @@ -1382,8 +1382,6 @@ g_raid_md_taste_intel(struct g_raid_md_o meta = NULL; vendor = 0xffff; disk_pos = 0; - if (g_access(cp, 1, 0, 0) != 0) - return (G_RAID_MD_TASTE_FAIL); g_topology_unlock(); error = g_raid_md_get_label(cp, serial, sizeof(serial)); if (error != 0) { @@ -1396,7 +1394,6 @@ g_raid_md_taste_intel(struct g_raid_md_o g_io_getattr("GEOM::hba_vendor", cp, &len, &vendor); meta = intel_meta_read(cp); g_topology_lock(); - g_access(cp, -1, 0, 0); if (meta == NULL) { if (g_raid_aggressive_spare) { if (vendor != 0x8086) { @@ -1476,6 +1473,9 @@ search: G_RAID_DEBUG1(1, sc, "root_mount_hold %p", mdi->mdio_rootmount); } + /* There is no return after this point, so we close passed consumer. */ + g_access(cp, -1, 0, 0); + rcp = g_new_consumer(geom); g_attach(rcp, pp); if (g_access(rcp, 1, 1, 1) != 0) @@ -1511,7 +1511,6 @@ search: return (result); fail2: g_topology_lock(); - g_access(cp, -1, 0, 0); fail1: free(meta, M_MD_INTEL); return (G_RAID_MD_TASTE_FAIL); Modified: stable/9/sys/geom/raid/md_jmicron.c ============================================================================== --- stable/9/sys/geom/raid/md_jmicron.c Thu May 8 12:35:37 2014 (r265674) +++ stable/9/sys/geom/raid/md_jmicron.c Thu May 8 12:39:07 2014 (r265675) @@ -837,15 +837,12 @@ g_raid_md_taste_jmicron(struct g_raid_md /* Read metadata from device. */ meta = NULL; vendor = 0xffff; - if (g_access(cp, 1, 0, 0) != 0) - return (G_RAID_MD_TASTE_FAIL); g_topology_unlock(); len = 2; if (pp->geom->rank == 1) g_io_getattr("GEOM::hba_vendor", cp, &len, &vendor); meta = jmicron_meta_read(cp); g_topology_lock(); - g_access(cp, -1, 0, 0); if (meta == NULL) { if (g_raid_aggressive_spare) { if (vendor == 0x197b) { @@ -922,6 +919,9 @@ search: G_RAID_DEBUG1(1, sc, "root_mount_hold %p", mdi->mdio_rootmount); } + /* There is no return after this point, so we close passed consumer. */ + g_access(cp, -1, 0, 0); + rcp = g_new_consumer(geom); g_attach(rcp, pp); if (g_access(rcp, 1, 1, 1) != 0) Modified: stable/9/sys/geom/raid/md_nvidia.c ============================================================================== --- stable/9/sys/geom/raid/md_nvidia.c Thu May 8 12:35:37 2014 (r265674) +++ stable/9/sys/geom/raid/md_nvidia.c Thu May 8 12:39:07 2014 (r265675) @@ -841,15 +841,12 @@ g_raid_md_taste_nvidia(struct g_raid_md_ /* Read metadata from device. */ meta = NULL; vendor = 0xffff; - if (g_access(cp, 1, 0, 0) != 0) - return (G_RAID_MD_TASTE_FAIL); g_topology_unlock(); len = 2; if (pp->geom->rank == 1) g_io_getattr("GEOM::hba_vendor", cp, &len, &vendor); meta = nvidia_meta_read(cp); g_topology_lock(); - g_access(cp, -1, 0, 0); if (meta == NULL) { if (g_raid_aggressive_spare) { if (vendor == 0x10de) { @@ -918,6 +915,9 @@ search: G_RAID_DEBUG1(1, sc, "root_mount_hold %p", mdi->mdio_rootmount); } + /* There is no return after this point, so we close passed consumer. */ + g_access(cp, -1, 0, 0); + rcp = g_new_consumer(geom); g_attach(rcp, pp); if (g_access(rcp, 1, 1, 1) != 0) Modified: stable/9/sys/geom/raid/md_promise.c ============================================================================== --- stable/9/sys/geom/raid/md_promise.c Thu May 8 12:35:37 2014 (r265674) +++ stable/9/sys/geom/raid/md_promise.c Thu May 8 12:39:07 2014 (r265675) @@ -1106,15 +1106,12 @@ g_raid_md_taste_promise(struct g_raid_md /* Read metadata from device. */ meta = NULL; vendor = 0xffff; - if (g_access(cp, 1, 0, 0) != 0) - return (G_RAID_MD_TASTE_FAIL); g_topology_unlock(); len = 2; if (pp->geom->rank == 1) g_io_getattr("GEOM::hba_vendor", cp, &len, &vendor); subdisks = promise_meta_read(cp, metaarr); g_topology_lock(); - g_access(cp, -1, 0, 0); if (subdisks == 0) { if (g_raid_aggressive_spare) { if (vendor == 0x105a || vendor == 0x1002) { @@ -1175,6 +1172,9 @@ search: geom = sc->sc_geom; } + /* There is no return after this point, so we close passed consumer. */ + g_access(cp, -1, 0, 0); + rcp = g_new_consumer(geom); g_attach(rcp, pp); if (g_access(rcp, 1, 1, 1) != 0) Modified: stable/9/sys/geom/raid/md_sii.c ============================================================================== --- stable/9/sys/geom/raid/md_sii.c Thu May 8 12:35:37 2014 (r265674) +++ stable/9/sys/geom/raid/md_sii.c Thu May 8 12:39:07 2014 (r265675) @@ -923,15 +923,12 @@ g_raid_md_taste_sii(struct g_raid_md_obj /* Read metadata from device. */ meta = NULL; vendor = 0xffff; - if (g_access(cp, 1, 0, 0) != 0) - return (G_RAID_MD_TASTE_FAIL); g_topology_unlock(); len = 2; if (pp->geom->rank == 1) g_io_getattr("GEOM::hba_vendor", cp, &len, &vendor); meta = sii_meta_read(cp); g_topology_lock(); - g_access(cp, -1, 0, 0); if (meta == NULL) { if (g_raid_aggressive_spare) { if (vendor == 0x1095) { @@ -1011,6 +1008,9 @@ search: G_RAID_DEBUG1(1, sc, "root_mount_hold %p", mdi->mdio_rootmount); } + /* There is no return after this point, so we close passed consumer. */ + g_access(cp, -1, 0, 0); + rcp = g_new_consumer(geom); g_attach(rcp, pp); if (g_access(rcp, 1, 1, 1) != 0) From owner-svn-src-stable@FreeBSD.ORG Thu May 8 12:50:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB1DF498; Thu, 8 May 2014 12:50:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8DA6B94; Thu, 8 May 2014 12:50:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s48CoVB4099842; Thu, 8 May 2014 12:50:31 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s48CoVQ1099841; Thu, 8 May 2014 12:50:31 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405081250.s48CoVQ1099841@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 12:50:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265676 - stable/9/sys/geom/stripe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 12:50:32 -0000 Author: mav Date: Thu May 8 12:50:31 2014 New Revision: 265676 URL: http://svnweb.freebsd.org/changeset/base/265676 Log: MFC r264313: Do not increment bio_data in case of BIO_DELETE. This fixes KASSERT() panic in g_io_request(). Modified: stable/9/sys/geom/stripe/g_stripe.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/geom/stripe/g_stripe.c ============================================================================== --- stable/9/sys/geom/stripe/g_stripe.c Thu May 8 12:39:07 2014 (r265675) +++ stable/9/sys/geom/stripe/g_stripe.c Thu May 8 12:50:31 2014 (r265676) @@ -462,9 +462,10 @@ g_stripe_start_economic(struct bio *bp, /* offset -= offset % stripesize; */ offset -= offset & (stripesize - 1); - addr += length; + if (bp->bio_cmd != BIO_DELETE) + addr += length; length = bp->bio_length - length; - for (no++; length > 0; no++, length -= stripesize, addr += stripesize) { + for (no++; length > 0; no++, length -= stripesize) { if (no > sc->sc_ndisks - 1) { no = 0; offset += stripesize; @@ -489,6 +490,9 @@ g_stripe_start_economic(struct bio *bp, cbp->bio_length = MIN(stripesize, length); cbp->bio_caller2 = sc->sc_disks[no]; + + if (bp->bio_cmd != BIO_DELETE) + addr += stripesize; } /* * Fire off all allocated requests! @@ -613,9 +617,12 @@ g_stripe_start(struct bio *bp) * 3. Request size is bigger than stripesize * ndisks. If it isn't, * there will be no need to send more than one I/O request to * a provider, so there is nothing to optmize. + * and + * 5. It is not a BIO_DELETE. */ if (g_stripe_fast && bp->bio_length <= MAXPHYS && - bp->bio_length >= stripesize * sc->sc_ndisks) { + bp->bio_length >= stripesize * sc->sc_ndisks && + bp->bio_cmd != BIO_DELETE) { fast = 1; } error = 0; From owner-svn-src-stable@FreeBSD.ORG Thu May 8 13:10:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F7EECF8; Thu, 8 May 2014 13:10:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C1CAD80; Thu, 8 May 2014 13:10:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s48DAevj009764; Thu, 8 May 2014 13:10:40 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s48DAe4d009763; Thu, 8 May 2014 13:10:40 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405081310.s48DAe4d009763@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 13:10:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265677 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 13:10:40 -0000 Author: mav Date: Thu May 8 13:10:39 2014 New Revision: 265677 URL: http://svnweb.freebsd.org/changeset/base/265677 Log: MFC r264086: 3580 Want zvols to return volblocksize when queried for physical block size illumos/illumos-gate@a0b60564dfc644f4bfaef1ce26d343b44cf68bc5 It is irrelevant for FreeBSD, just reducing diff. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Thu May 8 12:50:31 2014 (r265676) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Thu May 8 13:10:39 2014 (r265677) @@ -1723,8 +1723,6 @@ int zvol_ioctl(dev_t dev, int cmd, intptr_t arg, int flag, cred_t *cr, int *rvalp) { zvol_state_t *zv; - struct dk_cinfo dki; - struct dk_minfo dkm; struct dk_callback *dkc; int error = 0; rl_t *rl; @@ -1742,6 +1740,9 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t switch (cmd) { case DKIOCINFO: + { + struct dk_cinfo dki; + bzero(&dki, sizeof (dki)); (void) strcpy(dki.dki_cname, "zvol"); (void) strcpy(dki.dki_dname, "zvol"); @@ -1752,8 +1753,12 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t if (ddi_copyout(&dki, (void *)arg, sizeof (dki), flag)) error = SET_ERROR(EFAULT); return (error); + } case DKIOCGMEDIAINFO: + { + struct dk_minfo dkm; + bzero(&dkm, sizeof (dkm)); dkm.dki_lbsize = 1U << zv->zv_min_bs; dkm.dki_capacity = zv->zv_volsize >> zv->zv_min_bs; @@ -1762,16 +1767,32 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t if (ddi_copyout(&dkm, (void *)arg, sizeof (dkm), flag)) error = SET_ERROR(EFAULT); return (error); + } + + case DKIOCGMEDIAINFOEXT: + { + struct dk_minfo_ext dkmext; + + bzero(&dkmext, sizeof (dkmext)); + dkmext.dki_lbsize = 1U << zv->zv_min_bs; + dkmext.dki_pbsize = zv->zv_volblocksize; + dkmext.dki_capacity = zv->zv_volsize >> zv->zv_min_bs; + dkmext.dki_media_type = DK_UNKNOWN; + mutex_exit(&spa_namespace_lock); + if (ddi_copyout(&dkmext, (void *)arg, sizeof (dkmext), flag)) + error = SET_ERROR(EFAULT); + return (error); + } case DKIOCGETEFI: - { - uint64_t vs = zv->zv_volsize; - uint8_t bs = zv->zv_min_bs; + { + uint64_t vs = zv->zv_volsize; + uint8_t bs = zv->zv_min_bs; - mutex_exit(&spa_namespace_lock); - error = zvol_getefi((void *)arg, flag, vs, bs); - return (error); - } + mutex_exit(&spa_namespace_lock); + error = zvol_getefi((void *)arg, flag, vs, bs); + return (error); + } case DKIOCFLUSHWRITECACHE: dkc = (struct dk_callback *)arg; @@ -1784,31 +1805,31 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t return (error); case DKIOCGETWCE: - { - int wce = (zv->zv_flags & ZVOL_WCE) ? 1 : 0; - if (ddi_copyout(&wce, (void *)arg, sizeof (int), - flag)) - error = SET_ERROR(EFAULT); + { + int wce = (zv->zv_flags & ZVOL_WCE) ? 1 : 0; + if (ddi_copyout(&wce, (void *)arg, sizeof (int), + flag)) + error = SET_ERROR(EFAULT); + break; + } + case DKIOCSETWCE: + { + int wce; + if (ddi_copyin((void *)arg, &wce, sizeof (int), + flag)) { + error = SET_ERROR(EFAULT); break; } - case DKIOCSETWCE: - { - int wce; - if (ddi_copyin((void *)arg, &wce, sizeof (int), - flag)) { - error = SET_ERROR(EFAULT); - break; - } - if (wce) { - zv->zv_flags |= ZVOL_WCE; - mutex_exit(&spa_namespace_lock); - } else { - zv->zv_flags &= ~ZVOL_WCE; - mutex_exit(&spa_namespace_lock); - zil_commit(zv->zv_zilog, ZVOL_OBJ); - } - return (0); + if (wce) { + zv->zv_flags |= ZVOL_WCE; + mutex_exit(&spa_namespace_lock); + } else { + zv->zv_flags &= ~ZVOL_WCE; + mutex_exit(&spa_namespace_lock); + zil_commit(zv->zv_zilog, ZVOL_OBJ); } + return (0); + } case DKIOCGGEOM: case DKIOCGVTOC: From owner-svn-src-stable@FreeBSD.ORG Thu May 8 13:12:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74EEFE6B; Thu, 8 May 2014 13:12:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5EDECDFE; Thu, 8 May 2014 13:12:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s48DCPHv012350; Thu, 8 May 2014 13:12:25 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s48DCOKr012345; Thu, 8 May 2014 13:12:24 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405081312.s48DCOKr012345@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 13:12:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265678 - in stable/10: cddl/contrib/opensolaris/cmd/zfs sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/s... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 13:12:25 -0000 Author: mav Date: Thu May 8 13:12:24 2014 New Revision: 265678 URL: http://svnweb.freebsd.org/changeset/base/265678 Log: MFC r264145: Add property and sysctl to control how ZVOLs are exposed to OS. New ZFS property volmode and sysctl vfs.zfs.vol.mode allow switching ZVOL between three modes: geom -- existing fully functional behavior (default); dev -- exposing volumes only as raw disk device file in devfs; none -- not exposing volumes outside ZFS. The "dev" mode is less functional (can't be partitioned, mounted, etc), but it is faster, and in some scenarios with untrusted consumers safer. It can be useful for NAS, VM block storages, etc. The "none" mode may be convenient for backup servers, etc. that don't need direct data access. Due to the way ZVOL is integrated with main ZFS code, those property and sysctl are checked only during pool import and volume creation. Modified: stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Thu May 8 13:10:39 2014 (r265677) +++ stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Thu May 8 13:12:24 2014 (r265678) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 20, 2014 +.Dd April 5, 2014 .Dt ZFS 8 .Os .Sh NAME @@ -1306,6 +1306,38 @@ Consequently, writes to a sparse volume when the pool is low on space. For a sparse volume, changes to .Sy volsize are not reflected in the reservation. +.It Sy volmode Ns = Ns Cm default | geom | dev | none +This property specifies how volumes should be exposed to the OS. +Setting it to +.Sy geom +exposes volumes as +.Xr geom 4 +providers, providing maximal functionality. +Setting it to +.Sy dev +exposes volumes only as cdev device in devfs. +Such volumes can be accessed only as raw disk device files, i.e. they +can not be partitioned, mounted, participate in RAIDs, etc, but they +are faster, and in some use scenarios with untrusted consumer, such as +NAS or VM storage, can be more safe. +Volumes with property set to +.Sy none +are not exposed outside ZFS, but can be snapshoted, cloned, replicated, etc, +that can be suitable for backup purposes. +Value +.Sy default +means that volumes exposition is controlled by system-wide sysctl/tunable +.Va vfs.zfs.vol.mode , +where +.Sy geom , +.Sy dev +and +.Sy none +are encoded as 1, 2 and 3 respectively. +The default values is +.Sy geom . +This property can be changed any time, but so far it is processed only +during volume creation and pool import. .It Sy vscan Ns = Ns Cm off | on The .Sy vscan Modified: stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Thu May 8 13:10:39 2014 (r265677) +++ stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Thu May 8 13:12:24 2014 (r265678) @@ -198,6 +198,14 @@ zfs_prop_init(void) { NULL } }; + static zprop_index_t volmode_table[] = { + { "default", ZFS_VOLMODE_DEFAULT }, + { "geom", ZFS_VOLMODE_GEOM }, + { "dev", ZFS_VOLMODE_DEV }, + { "none", ZFS_VOLMODE_NONE }, + { NULL } + }; + /* inherit index properties */ zprop_register_index(ZFS_PROP_SYNC, "sync", ZFS_SYNC_STANDARD, PROP_INHERIT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, @@ -242,6 +250,10 @@ zfs_prop_init(void) zprop_register_index(ZFS_PROP_LOGBIAS, "logbias", ZFS_LOGBIAS_LATENCY, PROP_INHERIT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, "latency | throughput", "LOGBIAS", logbias_table); + zprop_register_index(ZFS_PROP_VOLMODE, "volmode", + ZFS_VOLMODE_DEFAULT, PROP_INHERIT, + ZFS_TYPE_FILESYSTEM | ZFS_TYPE_SNAPSHOT | ZFS_TYPE_VOLUME, + "default | geom | dev | none", "VOLMODE", volmode_table); /* inherit index (boolean) properties */ zprop_register_index(ZFS_PROP_ATIME, "atime", 1, PROP_INHERIT, Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Thu May 8 13:10:39 2014 (r265677) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Thu May 8 13:12:24 2014 (r265678) @@ -66,6 +66,7 @@ #include #include #include +#include #include #include #include @@ -75,6 +76,7 @@ #include #include #include +#include #include #include #include @@ -114,6 +116,13 @@ static char *zvol_tag = "zvol_tag"; */ static uint32_t zvol_minors; +SYSCTL_DECL(_vfs_zfs); +SYSCTL_NODE(_vfs_zfs, OID_AUTO, vol, CTLFLAG_RW, 0, "ZFS VOLUME"); +static int volmode = ZFS_VOLMODE_GEOM; +TUNABLE_INT("vfs.zfs.vol.mode", &volmode); +SYSCTL_INT(_vfs_zfs_vol, OID_AUTO, mode, CTLFLAG_RWTUN, &volmode, 0, + "Expose as GEOM providers (1), device files (2) or neither"); + typedef struct zvol_extent { list_node_t ze_node; dva_t ze_dva; /* dva associated with this extent */ @@ -124,9 +133,11 @@ typedef struct zvol_extent { * The in-core state of each volume. */ typedef struct zvol_state { + LIST_ENTRY(zvol_state) zv_links; char zv_name[MAXPATHLEN]; /* pool/dd name */ uint64_t zv_volsize; /* amount of space we advertise */ uint64_t zv_volblocksize; /* volume block size */ + struct cdev *zv_dev; /* non-GEOM device */ struct g_provider *zv_provider; /* GEOM provider */ uint8_t zv_min_bs; /* minimum addressable block shift */ uint8_t zv_flags; /* readonly, dumpified, etc. */ @@ -137,10 +148,13 @@ typedef struct zvol_state { znode_t zv_znode; /* for range locking */ dmu_buf_t *zv_dbuf; /* bonus handle */ int zv_state; + int zv_volmode; /* Provide GEOM or cdev */ struct bio_queue_head zv_queue; struct mtx zv_queue_mtx; /* zv_queue mutex */ } zvol_state_t; +static LIST_HEAD(, zvol_state) all_zvols; + /* * zvol specific flags */ @@ -154,6 +168,25 @@ typedef struct zvol_state { */ int zvol_maxphys = DMU_MAX_ACCESS/2; +static d_open_t zvol_d_open; +static d_close_t zvol_d_close; +static d_read_t zvol_read; +static d_write_t zvol_write; +static d_ioctl_t zvol_d_ioctl; +static d_strategy_t zvol_strategy; + +static struct cdevsw zvol_cdevsw = { + .d_version = D_VERSION, + .d_open = zvol_d_open, + .d_close = zvol_d_close, + .d_read = zvol_read, + .d_write = zvol_write, + .d_ioctl = zvol_d_ioctl, + .d_strategy = zvol_strategy, + .d_name = "zvol", + .d_flags = D_DISK | D_TRACKCLOSE, +}; + extern int zfs_set_prop_nvlist(const char *, zprop_source_t, nvlist_t *, nvlist_t *); static void zvol_log_truncate(zvol_state_t *zv, dmu_tx_t *tx, uint64_t off, @@ -164,7 +197,6 @@ static int zvol_dumpify(zvol_state_t *zv static int zvol_dump_fini(zvol_state_t *zv); static int zvol_dump_init(zvol_state_t *zv, boolean_t resize); -static zvol_state_t *zvol_geom_create(const char *name); static void zvol_geom_run(zvol_state_t *zv); static void zvol_geom_destroy(zvol_state_t *zv); static int zvol_geom_access(struct g_provider *pp, int acr, int acw, int ace); @@ -186,14 +218,16 @@ zvol_size_changed(zvol_state_t *zv) spec_size_invalidate(dev, VBLK); spec_size_invalidate(dev, VCHR); #else /* !sun */ - struct g_provider *pp; + if (zv->zv_volmode == ZFS_VOLMODE_GEOM) { + struct g_provider *pp; - pp = zv->zv_provider; - if (pp == NULL) - return; - g_topology_lock(); - g_resize_provider(pp, zv->zv_volsize); - g_topology_unlock(); + pp = zv->zv_provider; + if (pp == NULL) + return; + g_topology_lock(); + g_resize_provider(pp, zv->zv_volsize); + g_topology_unlock(); + } #endif /* !sun */ } @@ -250,26 +284,16 @@ zvol_get_stats(objset_t *os, nvlist_t *n static zvol_state_t * zvol_minor_lookup(const char *name) { - struct g_provider *pp; - struct g_geom *gp; - zvol_state_t *zv = NULL; + zvol_state_t *zv; ASSERT(MUTEX_HELD(&spa_namespace_lock)); - g_topology_lock(); - LIST_FOREACH(gp, &zfs_zvol_class.geom, geom) { - pp = LIST_FIRST(&gp->provider); - if (pp == NULL) - continue; - zv = pp->private; - if (zv == NULL) - continue; + LIST_FOREACH(zv, &all_zvols, zv_links) { if (strcmp(zv->zv_name, name) == 0) break; } - g_topology_unlock(); - return (gp != NULL ? zv : NULL); + return (zv); } /* extent mapping arg */ @@ -507,8 +531,11 @@ zvol_create_minor(const char *name) zfs_soft_state_t *zs; zvol_state_t *zv; objset_t *os; + struct cdev *dev; + struct g_provider *pp; + struct g_geom *gp; dmu_object_info_t doi; - uint64_t volsize; + uint64_t volsize, mode; int error; ZFS_LOG(1, "Creating ZVOL %s...", name); @@ -569,20 +596,51 @@ zvol_create_minor(const char *name) zv = zs->zss_data = kmem_zalloc(sizeof (zvol_state_t), KM_SLEEP); #else /* !sun */ + zv = kmem_zalloc(sizeof(*zv), KM_SLEEP); + zv->zv_state = 0; error = zap_lookup(os, ZVOL_ZAP_OBJ, "size", 8, 1, &volsize); if (error) { - ASSERT(error == 0); + kmem_free(zv, sizeof(*zv)); dmu_objset_disown(os, zvol_tag); mutex_exit(&spa_namespace_lock); return (error); } + error = dsl_prop_get_integer(name, + zfs_prop_to_name(ZFS_PROP_VOLMODE), &mode, NULL); + if (error != 0 || mode == ZFS_VOLMODE_DEFAULT) + mode = volmode; DROP_GIANT(); - g_topology_lock(); - zv = zvol_geom_create(name); zv->zv_volsize = volsize; - zv->zv_provider->mediasize = zv->zv_volsize; + zv->zv_volmode = mode; + if (zv->zv_volmode == ZFS_VOLMODE_GEOM) { + g_topology_lock(); + gp = g_new_geomf(&zfs_zvol_class, "zfs::zvol::%s", name); + gp->start = zvol_geom_start; + gp->access = zvol_geom_access; + pp = g_new_providerf(gp, "%s/%s", ZVOL_DRIVER, name); + pp->flags |= G_PF_DIRECT_RECEIVE | G_PF_DIRECT_SEND; + pp->sectorsize = DEV_BSIZE; + pp->mediasize = zv->zv_volsize; + pp->private = zv; + zv->zv_provider = pp; + bioq_init(&zv->zv_queue); + mtx_init(&zv->zv_queue_mtx, "zvol", NULL, MTX_DEF); + } else if (zv->zv_volmode == ZFS_VOLMODE_DEV) { + if (make_dev_p(MAKEDEV_CHECKNAME | MAKEDEV_WAITOK, + &dev, &zvol_cdevsw, NULL, UID_ROOT, GID_OPERATOR, + 0640, "%s/%s", ZVOL_DRIVER, name) != 0) { + kmem_free(zv, sizeof(*zv)); + dmu_objset_disown(os, FTAG); + mutex_exit(&spa_namespace_lock); + return (SET_ERROR(ENXIO)); + } + zv->zv_dev = dev; + dev->si_iosize_max = MAXPHYS; + dev->si_drv2 = zv; + } + LIST_INSERT_HEAD(&all_zvols, zv, zv_links); #endif /* !sun */ (void) strlcpy(zv->zv_name, name, MAXPATHLEN); @@ -613,10 +671,13 @@ zvol_create_minor(const char *name) mutex_exit(&spa_namespace_lock); - zvol_geom_run(zv); - - g_topology_unlock(); +#ifndef sun + if (zv->zv_volmode == ZFS_VOLMODE_GEOM) { + zvol_geom_run(zv); + g_topology_unlock(); + } PICKUP_GIANT(); +#endif ZFS_LOG(1, "ZVOL %s created.", name); @@ -642,12 +703,20 @@ zvol_remove_zv(zvol_state_t *zv) #ifdef sun (void) snprintf(nmbuf, sizeof (nmbuf), "%u,raw", minor); ddi_remove_minor_node(zfs_dip, nmbuf); +#else + LIST_REMOVE(zv, zv_links); + if (zv->zv_volmode == ZFS_VOLMODE_GEOM) { + g_topology_lock(); + zvol_geom_destroy(zv); + g_topology_unlock(); + } else if (zv->zv_volmode == ZFS_VOLMODE_DEV) + destroy_dev(zv->zv_dev); #endif /* sun */ avl_destroy(&zv->zv_znode.z_range_avl); mutex_destroy(&zv->zv_znode.z_range_lock); - zvol_geom_destroy(zv); + kmem_free(zv, sizeof(*zv)); zvol_minors--; return (0); @@ -664,9 +733,7 @@ zvol_remove_minor(const char *name) mutex_exit(&spa_namespace_lock); return (SET_ERROR(ENXIO)); } - g_topology_lock(); rc = zvol_remove_zv(zv); - g_topology_unlock(); mutex_exit(&spa_namespace_lock); return (rc); } @@ -802,24 +869,15 @@ zvol_update_volsize(objset_t *os, uint64 void zvol_remove_minors(const char *name) { - struct g_geom *gp, *gptmp; - struct g_provider *pp; - zvol_state_t *zv; + zvol_state_t *zv, *tzv; size_t namelen; namelen = strlen(name); DROP_GIANT(); mutex_enter(&spa_namespace_lock); - g_topology_lock(); - LIST_FOREACH_SAFE(gp, &zfs_zvol_class.geom, geom, gptmp) { - pp = LIST_FIRST(&gp->provider); - if (pp == NULL) - continue; - zv = pp->private; - if (zv == NULL) - continue; + LIST_FOREACH_SAFE(zv, &all_zvols, zv_links, tzv) { if (strcmp(zv->zv_name, name) == 0 || (strncmp(zv->zv_name, name, namelen) == 0 && zv->zv_name[namelen] == '/')) { @@ -827,7 +885,6 @@ zvol_remove_minors(const char *name) } } - g_topology_unlock(); mutex_exit(&spa_namespace_lock); PICKUP_GIANT(); } @@ -1286,28 +1343,46 @@ zvol_dumpio(zvol_state_t *zv, void *addr } #endif /* sun */ -int +void zvol_strategy(struct bio *bp) { - zvol_state_t *zv = bp->bio_to->private; + zvol_state_t *zv; uint64_t off, volsize; size_t resid; char *addr; objset_t *os; rl_t *rl; int error = 0; - boolean_t doread = (bp->bio_cmd == BIO_READ); + boolean_t doread = 0; boolean_t is_dumpified; boolean_t sync; + if (bp->bio_to) + zv = bp->bio_to->private; + else + zv = bp->bio_dev->si_drv2; + if (zv == NULL) { - g_io_deliver(bp, ENXIO); - return (0); + error = ENXIO; + goto out; } if (bp->bio_cmd != BIO_READ && (zv->zv_flags & ZVOL_RDONLY)) { - g_io_deliver(bp, EROFS); - return (0); + error = EROFS; + goto out; + } + + switch (bp->bio_cmd) { + case BIO_FLUSH: + goto sync; + case BIO_READ: + doread = 1; + case BIO_WRITE: + case BIO_DELETE: + break; + default: + error = EOPNOTSUPP; + goto out; } off = bp->bio_offset; @@ -1320,8 +1395,8 @@ zvol_strategy(struct bio *bp) resid = bp->bio_length; if (resid > 0 && (off < 0 || off >= volsize)) { - g_io_deliver(bp, EIO); - return (0); + error = EIO; + goto out; } #ifdef illumos @@ -1393,14 +1468,18 @@ unlock: zfs_range_unlock(rl); bp->bio_completed = bp->bio_length - resid; - if (bp->bio_completed < bp->bio_length) - bp->bio_error = (off > volsize ? EINVAL : error); + if (bp->bio_completed < bp->bio_length && off > volsize) + error = EINVAL; - if (sync) + if (sync) { +sync: zil_commit(zv->zv_zilog, ZVOL_OBJ); - g_io_deliver(bp, 0); - - return (0); + } +out: + if (bp->bio_to) + g_io_deliver(bp, error); + else + biofinish(bp, NULL, error); } #ifdef sun @@ -1459,25 +1538,36 @@ int zvol_read(dev_t dev, uio_t *uio, cred_t *cr) { minor_t minor = getminor(dev); +#else +int +zvol_read(struct cdev *dev, struct uio *uio, int ioflag) +{ +#endif zvol_state_t *zv; uint64_t volsize; rl_t *rl; int error = 0; +#ifdef sun zv = zfsdev_get_soft_state(minor, ZSST_ZVOL); if (zv == NULL) return (SET_ERROR(ENXIO)); +#else + zv = dev->si_drv2; +#endif volsize = zv->zv_volsize; if (uio->uio_resid > 0 && - (uio->uio_loffset < 0 || uio->uio_loffset >= volsize)) + (uio->uio_loffset < 0 || uio->uio_loffset > volsize)) return (SET_ERROR(EIO)); +#ifdef illumos if (zv->zv_flags & ZVOL_DUMPIFIED) { error = physio(zvol_strategy, NULL, dev, B_READ, zvol_minphys, uio); return (error); } +#endif rl = zfs_range_lock(&zv->zv_znode, uio->uio_loffset, uio->uio_resid, RL_READER); @@ -1500,31 +1590,43 @@ zvol_read(dev_t dev, uio_t *uio, cred_t return (error); } +#ifdef sun /*ARGSUSED*/ int zvol_write(dev_t dev, uio_t *uio, cred_t *cr) { minor_t minor = getminor(dev); +#else +int +zvol_write(struct cdev *dev, struct uio *uio, int ioflag) +{ +#endif zvol_state_t *zv; uint64_t volsize; rl_t *rl; int error = 0; boolean_t sync; +#ifdef sun zv = zfsdev_get_soft_state(minor, ZSST_ZVOL); if (zv == NULL) return (SET_ERROR(ENXIO)); +#else + zv = dev->si_drv2; +#endif volsize = zv->zv_volsize; if (uio->uio_resid > 0 && - (uio->uio_loffset < 0 || uio->uio_loffset >= volsize)) + (uio->uio_loffset < 0 || uio->uio_loffset > volsize)) return (SET_ERROR(EIO)); +#ifdef illumos if (zv->zv_flags & ZVOL_DUMPIFIED) { error = physio(zvol_strategy, NULL, dev, B_WRITE, zvol_minphys, uio); return (error); } +#endif sync = !(zv->zv_flags & ZVOL_WCE) || (zv->zv_objset->os_sync == ZFS_SYNC_ALWAYS); @@ -1559,6 +1661,7 @@ zvol_write(dev_t dev, uio_t *uio, cred_t return (error); } +#ifdef sun int zvol_getefi(void *arg, int flag, uint64_t vs, uint8_t bs) { @@ -2232,31 +2335,6 @@ zvol_dump_fini(zvol_state_t *zv) } #endif /* sun */ -static zvol_state_t * -zvol_geom_create(const char *name) -{ - struct g_provider *pp; - struct g_geom *gp; - zvol_state_t *zv; - - gp = g_new_geomf(&zfs_zvol_class, "zfs::zvol::%s", name); - gp->start = zvol_geom_start; - gp->access = zvol_geom_access; - pp = g_new_providerf(gp, "%s/%s", ZVOL_DRIVER, name); - pp->flags |= G_PF_DIRECT_RECEIVE | G_PF_DIRECT_SEND; - pp->sectorsize = DEV_BSIZE; - - zv = kmem_zalloc(sizeof(*zv), KM_SLEEP); - zv->zv_provider = pp; - zv->zv_state = 0; - bioq_init(&zv->zv_queue); - mtx_init(&zv->zv_queue_mtx, "zvol", NULL, MTX_DEF); - - pp->private = zv; - - return (zv); -} - static void zvol_geom_run(zvol_state_t *zv) { @@ -2287,8 +2365,6 @@ zvol_geom_destroy(zvol_state_t *zv) zv->zv_provider = NULL; pp->private = NULL; g_wither_geom(pp->geom, ENXIO); - - kmem_free(zv, sizeof(*zv)); } static int @@ -2537,30 +2613,47 @@ zvol_create_minors(const char *name) } static void -zvol_rename_minor(struct g_geom *gp, const char *newname) +zvol_rename_minor(zvol_state_t *zv, const char *newname) { + struct g_geom *gp; struct g_provider *pp; - zvol_state_t *zv; + struct cdev *dev; ASSERT(MUTEX_HELD(&spa_namespace_lock)); - g_topology_assert(); - - pp = LIST_FIRST(&gp->provider); - ASSERT(pp != NULL); - zv = pp->private; - ASSERT(zv != NULL); - - zv->zv_provider = NULL; - g_wither_provider(pp, ENXIO); - pp = g_new_providerf(gp, "%s/%s", ZVOL_DRIVER, newname); - pp->flags |= G_PF_DIRECT_RECEIVE | G_PF_DIRECT_SEND; - pp->sectorsize = DEV_BSIZE; - pp->mediasize = zv->zv_volsize; - pp->private = zv; - zv->zv_provider = pp; + if (zv->zv_volmode == ZFS_VOLMODE_GEOM) { + g_topology_lock(); + pp = zv->zv_provider; + ASSERT(pp != NULL); + gp = pp->geom; + ASSERT(gp != NULL); + + zv->zv_provider = NULL; + g_wither_provider(pp, ENXIO); + + pp = g_new_providerf(gp, "%s/%s", ZVOL_DRIVER, newname); + pp->flags |= G_PF_DIRECT_RECEIVE | G_PF_DIRECT_SEND; + pp->sectorsize = DEV_BSIZE; + pp->mediasize = zv->zv_volsize; + pp->private = zv; + zv->zv_provider = pp; + g_error_provider(pp, 0); + g_topology_unlock(); + } else if (zv->zv_volmode == ZFS_VOLMODE_DEV) { + dev = zv->zv_dev; + ASSERT(dev != NULL); + zv->zv_dev = NULL; + destroy_dev(dev); + + if (make_dev_p(MAKEDEV_CHECKNAME | MAKEDEV_WAITOK, + &dev, &zvol_cdevsw, NULL, UID_ROOT, GID_OPERATOR, + 0640, "%s/%s", ZVOL_DRIVER, newname) == 0) { + zv->zv_dev = dev; + dev->si_iosize_max = MAXPHYS; + dev->si_drv2 = zv; + } + } strlcpy(zv->zv_name, newname, sizeof(zv->zv_name)); - g_error_provider(pp, 0); } void @@ -2578,28 +2671,169 @@ zvol_rename_minors(const char *oldname, DROP_GIANT(); mutex_enter(&spa_namespace_lock); - g_topology_lock(); - LIST_FOREACH(gp, &zfs_zvol_class.geom, geom) { - pp = LIST_FIRST(&gp->provider); - if (pp == NULL) - continue; - zv = pp->private; - if (zv == NULL) - continue; + LIST_FOREACH(zv, &all_zvols, zv_links) { if (strcmp(zv->zv_name, oldname) == 0) { - zvol_rename_minor(gp, newname); + zvol_rename_minor(zv, newname); } else if (strncmp(zv->zv_name, oldname, oldnamelen) == 0 && (zv->zv_name[oldnamelen] == '/' || zv->zv_name[oldnamelen] == '@')) { snprintf(name, sizeof(name), "%s%c%s", newname, zv->zv_name[oldnamelen], zv->zv_name + oldnamelen + 1); - zvol_rename_minor(gp, name); + zvol_rename_minor(zv, name); } } - g_topology_unlock(); mutex_exit(&spa_namespace_lock); PICKUP_GIANT(); } + +static int +zvol_d_open(struct cdev *dev, int flags, int fmt, struct thread *td) +{ + zvol_state_t *zv; + int err = 0; + + mutex_enter(&spa_namespace_lock); + zv = dev->si_drv2; + if (zv == NULL) { + mutex_exit(&spa_namespace_lock); + return(ENXIO); /* zvol_create_minor() not done yet */ + } + + if (zv->zv_total_opens == 0) + err = zvol_first_open(zv); + if (err) { + mutex_exit(&spa_namespace_lock); + return (err); + } + if ((flags & FWRITE) && (zv->zv_flags & ZVOL_RDONLY)) { + err = SET_ERROR(EROFS); + goto out; + } + if (zv->zv_flags & ZVOL_EXCL) { + err = SET_ERROR(EBUSY); + goto out; + } +#ifdef FEXCL + if (flags & FEXCL) { + if (zv->zv_total_opens != 0) { + err = SET_ERROR(EBUSY); + goto out; + } + zv->zv_flags |= ZVOL_EXCL; + } +#endif + + zv->zv_total_opens++; + mutex_exit(&spa_namespace_lock); + return (err); +out: + if (zv->zv_total_opens == 0) + zvol_last_close(zv); + mutex_exit(&spa_namespace_lock); + return (err); +} + +static int +zvol_d_close(struct cdev *dev, int flags, int fmt, struct thread *td) +{ + zvol_state_t *zv; + int err = 0; + + mutex_enter(&spa_namespace_lock); + zv = dev->si_drv2; + if (zv == NULL) { + mutex_exit(&spa_namespace_lock); + return(ENXIO); + } + + if (zv->zv_flags & ZVOL_EXCL) { + ASSERT(zv->zv_total_opens == 1); + zv->zv_flags &= ~ZVOL_EXCL; + } + + /* + * If the open count is zero, this is a spurious close. + * That indicates a bug in the kernel / DDI framework. + */ + ASSERT(zv->zv_total_opens != 0); + + /* + * You may get multiple opens, but only one close. + */ + zv->zv_total_opens--; + + if (zv->zv_total_opens == 0) + zvol_last_close(zv); + + mutex_exit(&spa_namespace_lock); + return (0); +} + +static int +zvol_d_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread *td) +{ + zvol_state_t *zv; + rl_t *rl; + off_t offset, length, chunk; + int i, error; + u_int u; + + zv = dev->si_drv2; + + error = 0; + KASSERT(zv->zv_total_opens > 0, + ("Device with zero access count in zvol_d_ioctl")); + + i = IOCPARM_LEN(cmd); + switch (cmd) { + case DIOCGSECTORSIZE: + *(u_int *)data = DEV_BSIZE; + break; + case DIOCGMEDIASIZE: + *(off_t *)data = zv->zv_volsize; + break; + case DIOCGFLUSH: + zil_commit(zv->zv_zilog, ZVOL_OBJ); + break; + case DIOCGDELETE: + offset = ((off_t *)data)[0]; + length = ((off_t *)data)[1]; + if ((offset % DEV_BSIZE) != 0 || (length % DEV_BSIZE) != 0 || + offset < 0 || offset >= zv->zv_volsize || + length <= 0) { + printf("%s: offset=%jd length=%jd\n", __func__, offset, + length); + error = EINVAL; + break; + } + + rl = zfs_range_lock(&zv->zv_znode, offset, length, RL_WRITER); + dmu_tx_t *tx = dmu_tx_create(zv->zv_objset); + error = dmu_tx_assign(tx, TXG_WAIT); + if (error != 0) { + dmu_tx_abort(tx); + } else { + zvol_log_truncate(zv, tx, offset, length, B_TRUE); + dmu_tx_commit(tx); + error = dmu_free_long_range(zv->zv_objset, ZVOL_OBJ, + offset, length); + } + zfs_range_unlock(rl); + if (zv->zv_objset->os_sync == ZFS_SYNC_ALWAYS) + zil_commit(zv->zv_zilog, ZVOL_OBJ); + break; + case DIOCGSTRIPESIZE: + *(off_t *)data = zv->zv_volblocksize; + break; + case DIOCGSTRIPEOFFSET: + *(off_t *)data = 0; + break; + default: + error = ENOIOCTL; + } + + return (error); +} Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Thu May 8 13:10:39 2014 (r265677) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Thu May 8 13:12:24 2014 (r265678) @@ -145,6 +145,7 @@ typedef enum { ZFS_PROP_LOGICALUSED, ZFS_PROP_LOGICALREFERENCED, ZFS_PROP_INCONSISTENT, /* not exposed to the user */ + ZFS_PROP_VOLMODE, ZFS_NUM_PROPS } zfs_prop_t; @@ -337,6 +338,12 @@ typedef enum { ZFS_SYNC_DISABLED = 2 } zfs_sync_type_t; +typedef enum { + ZFS_VOLMODE_DEFAULT = 0, + ZFS_VOLMODE_GEOM = 1, + ZFS_VOLMODE_DEV = 2, + ZFS_VOLMODE_NONE = 3 +} zfs_volmode_t; /* * On-disk version number. From owner-svn-src-stable@FreeBSD.ORG Thu May 8 13:31:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 64D1158C; Thu, 8 May 2014 13:31:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51FBDFB1; Thu, 8 May 2014 13:31:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s48DV2i0019822; Thu, 8 May 2014 13:31:02 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s48DV2FI019821; Thu, 8 May 2014 13:31:02 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405081331.s48DV2FI019821@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 13:31:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265679 - stable/10/sys/cddl/compat/opensolaris/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 13:31:02 -0000 Author: mav Date: Thu May 8 13:31:01 2014 New Revision: 265679 URL: http://svnweb.freebsd.org/changeset/base/265679 Log: MFC r260234, r260328: Remove extra conversion to nanoseconds from ddi_get_lbolt64(). As result this uses one multiplication and shifts instead of one division and two multiplications. Modified: stable/10/sys/cddl/compat/opensolaris/sys/time.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/compat/opensolaris/sys/time.h ============================================================================== --- stable/10/sys/cddl/compat/opensolaris/sys/time.h Thu May 8 13:12:24 2014 (r265678) +++ stable/10/sys/cddl/compat/opensolaris/sys/time.h Thu May 8 13:31:01 2014 (r265679) @@ -71,19 +71,9 @@ gethrtime(void) { extern int nsec_per_tick; /* nanoseconds per clock tick */ -static __inline int64_t -ddi_get_lbolt64(void) -{ - - return (gethrtime() / nsec_per_tick); -} - -static __inline clock_t -ddi_get_lbolt(void) -{ - - return (ddi_get_lbolt64()); -} +#define ddi_get_lbolt64() \ + (int64_t)(((getsbinuptime() >> 16) * hz) >> 16) +#define ddi_get_lbolt() (clock_t)ddi_get_lbolt64() #else From owner-svn-src-stable@FreeBSD.ORG Thu May 8 14:28:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4ABBD6D2; Thu, 8 May 2014 14:28:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 37DE57A6; Thu, 8 May 2014 14:28:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s48ESqG4043755; Thu, 8 May 2014 14:28:52 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s48ESqFD043754; Thu, 8 May 2014 14:28:52 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201405081428.s48ESqFD043754@svn.freebsd.org> From: Marius Strobl Date: Thu, 8 May 2014 14:28:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r265683 - stable/8/sys/dev/sym X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 14:28:52 -0000 Author: marius Date: Thu May 8 14:28:51 2014 New Revision: 265683 URL: http://svnweb.freebsd.org/changeset/base/265683 Log: MFC: r251394 CAM_DEV_QFREEZE handling should only be done on request submission but neither on completion nor by SIM drivers in the first place. This issue has been revealed by r249466 (MFC'ed to stable/8 in r265147). Modified: stable/8/sys/dev/sym/sym_hipd.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/sym/ (props changed) Modified: stable/8/sys/dev/sym/sym_hipd.c ============================================================================== --- stable/8/sys/dev/sym/sym_hipd.c Thu May 8 13:54:57 2014 (r265682) +++ stable/8/sys/dev/sym/sym_hipd.c Thu May 8 14:28:51 2014 (r265683) @@ -2349,17 +2349,6 @@ static void sym_enqueue_cam_ccb(ccb_p cp /* * Complete a pending CAM CCB. */ -static void _sym_xpt_done(hcb_p np, union ccb *ccb) -{ - SYM_LOCK_ASSERT(MA_OWNED); - - KASSERT((ccb->ccb_h.status & CAM_SIM_QUEUED) == 0, - ("%s: status=CAM_SIM_QUEUED", __func__)); - - if (ccb->ccb_h.flags & CAM_DEV_QFREEZE) - sym_freeze_cam_ccb(ccb); - xpt_done(ccb); -} static void sym_xpt_done(hcb_p np, union ccb *ccb, ccb_p cp) { @@ -2371,7 +2360,7 @@ static void sym_xpt_done(hcb_p np, union ccb->ccb_h.status &= ~CAM_SIM_QUEUED; ccb->ccb_h.sym_hcb_ptr = NULL; } - _sym_xpt_done(np, ccb); + xpt_done(ccb); } static void sym_xpt_done2(hcb_p np, union ccb *ccb, int cam_status) @@ -2379,7 +2368,7 @@ static void sym_xpt_done2(hcb_p np, unio SYM_LOCK_ASSERT(MA_OWNED); sym_set_cam_status(ccb, cam_status); - _sym_xpt_done(np, ccb); + xpt_done(ccb); } /* @@ -8962,7 +8951,7 @@ static int sym_cam_attach(hcb_p np) goto fail; np->sim = sim; - if (xpt_create_path(&path, 0, + if (xpt_create_path(&path, NULL, cam_sim_path(np->sim), CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { goto fail; From owner-svn-src-stable@FreeBSD.ORG Thu May 8 16:12:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8284C2E7; Thu, 8 May 2014 16:12:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F78C29D; Thu, 8 May 2014 16:12:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s48GCdwC015746; Thu, 8 May 2014 16:12:39 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s48GCd5r015745; Thu, 8 May 2014 16:12:39 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201405081612.s48GCd5r015745@svn.freebsd.org> From: Brooks Davis Date: Thu, 8 May 2014 16:12:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265687 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 16:12:39 -0000 Author: brooks Date: Thu May 8 16:12:38 2014 New Revision: 265687 URL: http://svnweb.freebsd.org/changeset/base/265687 Log: MFC r265201 Fix a 2038 bug. If time_t is 64-bit (i.e. isn't 32-bit) allow any value of year, not just years less than 2038. Don't bother fixing the underflow in the case of years before 1903. MFC after: 1 week Sponsored by: DARPA, AFRL Modified: stable/10/sys/kern/subr_clock.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/subr_clock.c ============================================================================== --- stable/10/sys/kern/subr_clock.c Thu May 8 15:58:34 2014 (r265686) +++ stable/10/sys/kern/subr_clock.c Thu May 8 16:12:38 2014 (r265687) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -147,7 +148,7 @@ clock_ct_to_ts(struct clocktime *ct, str if (ct->mon < 1 || ct->mon > 12 || ct->day < 1 || ct->day > days_in_month(year, ct->mon) || ct->hour > 23 || ct->min > 59 || ct->sec > 59 || - ct->year > 2037) { /* time_t overflow */ + (sizeof(time_t) == 4 && year > 2037)) { /* time_t overflow */ if (ct_debug) printf(" = EINVAL\n"); return (EINVAL); From owner-svn-src-stable@FreeBSD.ORG Thu May 8 16:26:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 30138C00; Thu, 8 May 2014 16:26:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C935623; Thu, 8 May 2014 16:26:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s48GQadg042919; Thu, 8 May 2014 16:26:36 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s48GQaUN042918; Thu, 8 May 2014 16:26:36 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201405081626.s48GQaUN042918@svn.freebsd.org> From: Brooks Davis Date: Thu, 8 May 2014 16:26:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265688 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 16:26:37 -0000 Author: brooks Date: Thu May 8 16:26:36 2014 New Revision: 265688 URL: http://svnweb.freebsd.org/changeset/base/265688 Log: MFC r265201 Fix a 2038 bug. If time_t is 64-bit (i.e. isn't 32-bit) allow any value of year, not just years less than 2038. Don't bother fixing the underflow in the case of years before 1903. Sponsored by: DARPA, AFRL Modified: stable/9/sys/kern/subr_clock.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/kern/subr_clock.c ============================================================================== --- stable/9/sys/kern/subr_clock.c Thu May 8 16:12:38 2014 (r265687) +++ stable/9/sys/kern/subr_clock.c Thu May 8 16:26:36 2014 (r265688) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -147,7 +148,7 @@ clock_ct_to_ts(struct clocktime *ct, str if (ct->mon < 1 || ct->mon > 12 || ct->day < 1 || ct->day > days_in_month(year, ct->mon) || ct->hour > 23 || ct->min > 59 || ct->sec > 59 || - ct->year > 2037) { /* time_t overflow */ + (sizeof(time_t) == 4 && year > 2037)) { /* time_t overflow */ if (ct_debug) printf(" = EINVAL\n"); return (EINVAL); From owner-svn-src-stable@FreeBSD.ORG Thu May 8 18:06:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A2F4DD15; Thu, 8 May 2014 18:06:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F637F49; Thu, 8 May 2014 18:06:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s48I6jTm075142; Thu, 8 May 2014 18:06:45 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s48I6jsH075141; Thu, 8 May 2014 18:06:45 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201405081806.s48I6jsH075141@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Thu, 8 May 2014 18:06:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265692 - stable/9/sbin/ipfw X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 18:06:45 -0000 Author: melifaro Date: Thu May 8 18:06:44 2014 New Revision: 265692 URL: http://svnweb.freebsd.org/changeset/base/265692 Log: Merge r258677. Fix key lookup in ipfw(8) broken since r232865. Print warning for IPv4 address strings which are valid in inet_aton() but not valid in inet_pton(). (1) Found by: Özkan KIRIK Submitted by: Ian Smith (1) Modified: stable/9/sbin/ipfw/ipfw2.c Directory Properties: stable/9/sbin/ (props changed) stable/9/sbin/ipfw/ (props changed) Modified: stable/9/sbin/ipfw/ipfw2.c ============================================================================== --- stable/9/sbin/ipfw/ipfw2.c Thu May 8 17:27:46 2014 (r265691) +++ stable/9/sbin/ipfw/ipfw2.c Thu May 8 18:06:44 2014 (r265692) @@ -4263,13 +4263,24 @@ table_fill_xentry(char *arg, ipfw_table_ addrlen = sizeof(struct in6_addr); } else { /* Port or any other key */ - key = strtol(arg, &p, 10); /* Skip non-base 10 entries like 'fa1' */ - if (p != arg) { + key = strtol(arg, &p, 10); + if (*p == '\0') { pkey = (uint32_t *)paddr; *pkey = htonl(key); type = IPFW_TABLE_CIDR; + masklen = 32; addrlen = sizeof(uint32_t); + } else if ((p != arg) && (*p == '.')) { + /* + * Warn on IPv4 address strings + * which are "valid" for inet_aton() but not + * in inet_pton(). + * + * Typical examples: '10.5' or '10.0.0.05' + */ + errx(EX_DATAERR, + "Invalid IPv4 address: %s", arg); } } } From owner-svn-src-stable@FreeBSD.ORG Thu May 8 18:09:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DEA97EA2; Thu, 8 May 2014 18:09:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CAFE9F73; Thu, 8 May 2014 18:09:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s48I9Whn083035; Thu, 8 May 2014 18:09:32 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s48I9WPs083034; Thu, 8 May 2014 18:09:32 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201405081809.s48I9WPs083034@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Thu, 8 May 2014 18:09:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265693 - stable/10/sbin/ipfw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 18:09:33 -0000 Author: melifaro Date: Thu May 8 18:09:32 2014 New Revision: 265693 URL: http://svnweb.freebsd.org/changeset/base/265693 Log: Merge r258677. Fix key lookup in ipfw(8) broken since r232865. Print warning for IPv4 address strings which are valid in inet_aton() but not valid in inet_pton(). (1) Found by: Özkan KIRIK Submitted by: Ian Smith (1) Modified: stable/10/sbin/ipfw/ipfw2.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ipfw/ipfw2.c ============================================================================== --- stable/10/sbin/ipfw/ipfw2.c Thu May 8 18:06:44 2014 (r265692) +++ stable/10/sbin/ipfw/ipfw2.c Thu May 8 18:09:32 2014 (r265693) @@ -4274,13 +4274,24 @@ table_fill_xentry(char *arg, ipfw_table_ addrlen = sizeof(struct in6_addr); } else { /* Port or any other key */ - key = strtol(arg, &p, 10); /* Skip non-base 10 entries like 'fa1' */ - if (p != arg) { + key = strtol(arg, &p, 10); + if (*p == '\0') { pkey = (uint32_t *)paddr; *pkey = htonl(key); type = IPFW_TABLE_CIDR; + masklen = 32; addrlen = sizeof(uint32_t); + } else if ((p != arg) && (*p == '.')) { + /* + * Warn on IPv4 address strings + * which are "valid" for inet_aton() but not + * in inet_pton(). + * + * Typical examples: '10.5' or '10.0.0.05' + */ + errx(EX_DATAERR, + "Invalid IPv4 address: %s", arg); } } } From owner-svn-src-stable@FreeBSD.ORG Thu May 8 19:03:04 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C712A8BF; Thu, 8 May 2014 19:03:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B37367B8; Thu, 8 May 2014 19:03:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s48J346O037365; Thu, 8 May 2014 19:03:04 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s48J34Nx037363; Thu, 8 May 2014 19:03:04 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201405081903.s48J34Nx037363@svn.freebsd.org> From: Christian Brueffer Date: Thu, 8 May 2014 19:03:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265695 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 19:03:04 -0000 Author: brueffer Date: Thu May 8 19:03:04 2014 New Revision: 265695 URL: http://svnweb.freebsd.org/changeset/base/265695 Log: MFC: r265360 Remove stray comma. Modified: stable/10/share/man/man4/tnt4882.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/tnt4882.4 ============================================================================== --- stable/10/share/man/man4/tnt4882.4 Thu May 8 18:36:42 2014 (r265694) +++ stable/10/share/man/man4/tnt4882.4 Thu May 8 19:03:04 2014 (r265695) @@ -44,7 +44,7 @@ This chip emulates a NEC \(mcPD7210 cont interface between the host computer and the instrument bus. .Sh SEE ALSO .Xr gpib 3 , -.Xr gpib 4 , +.Xr gpib 4 .Sh HISTORY The .Nm From owner-svn-src-stable@FreeBSD.ORG Thu May 8 19:04:55 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 32386A14; Thu, 8 May 2014 19:04:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1EE557D1; Thu, 8 May 2014 19:04:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s48J4sPR042219; Thu, 8 May 2014 19:04:54 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s48J4sS5042218; Thu, 8 May 2014 19:04:54 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201405081904.s48J4sS5042218@svn.freebsd.org> From: Christian Brueffer Date: Thu, 8 May 2014 19:04:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265696 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 19:04:55 -0000 Author: brueffer Date: Thu May 8 19:04:54 2014 New Revision: 265696 URL: http://svnweb.freebsd.org/changeset/base/265696 Log: MFC: r265360 Remove stray comma. Modified: stable/9/share/man/man4/tnt4882.4 Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/tnt4882.4 ============================================================================== --- stable/9/share/man/man4/tnt4882.4 Thu May 8 19:03:04 2014 (r265695) +++ stable/9/share/man/man4/tnt4882.4 Thu May 8 19:04:54 2014 (r265696) @@ -44,7 +44,7 @@ This chip emulates a NEC \(mcPD7210 cont interface between the host computer and the instrument bus. .Sh SEE ALSO .Xr gpib 3 , -.Xr gpib 4 , +.Xr gpib 4 .Sh HISTORY The .Nm From owner-svn-src-stable@FreeBSD.ORG Thu May 8 19:08:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EAFFFBB3; Thu, 8 May 2014 19:08:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D752D810; Thu, 8 May 2014 19:08:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s48J879V050102; Thu, 8 May 2014 19:08:07 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s48J87fN050101; Thu, 8 May 2014 19:08:07 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201405081908.s48J87fN050101@svn.freebsd.org> From: Christian Brueffer Date: Thu, 8 May 2014 19:08:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r265697 - stable/8/share/man/man4 X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 19:08:08 -0000 Author: brueffer Date: Thu May 8 19:08:07 2014 New Revision: 265697 URL: http://svnweb.freebsd.org/changeset/base/265697 Log: MFC: r265360 Remove stray comma. Modified: stable/8/share/man/man4/tnt4882.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/tnt4882.4 ============================================================================== --- stable/8/share/man/man4/tnt4882.4 Thu May 8 19:04:54 2014 (r265696) +++ stable/8/share/man/man4/tnt4882.4 Thu May 8 19:08:07 2014 (r265697) @@ -44,7 +44,7 @@ This chip emulates a NEC \(mcPD7210 cont interface between the host computer and the instrument bus. .Sh SEE ALSO .Xr gpib 3 , -.Xr gpib 4 , +.Xr gpib 4 .Sh HISTORY The .Nm From owner-svn-src-stable@FreeBSD.ORG Thu May 8 19:11:16 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 45E66E4C; Thu, 8 May 2014 19:11:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 312C38A0; Thu, 8 May 2014 19:11:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s48JBGNd060658; Thu, 8 May 2014 19:11:16 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s48JBEre060044; Thu, 8 May 2014 19:11:14 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201405081911.s48JBEre060044@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Thu, 8 May 2014 19:11:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265699 - in stable/9: sbin/ipfw sys/netpfil/ipfw X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 19:11:16 -0000 Author: melifaro Date: Thu May 8 19:11:14 2014 New Revision: 265699 URL: http://svnweb.freebsd.org/changeset/base/265699 Log: Merge r258708, r258711, r260247, r261117. r258708: Check ipfw table numbers in both user and kernel space before rule addition. Found by: Saychik Pavel r258711: Simplify O_NAT opcode handling. r260247: Use rnh_matchaddr instead of rnh_lookup for longest-prefix match. rnh_lookup is effectively the same as rnh_matchaddr if called with empy network mask. r261117: Reorder struct ip_fw_chain: * move rarely-used fields down * move uh_lock to different cacheline * remove some usused fields Modified: stable/9/sbin/ipfw/ipfw2.c stable/9/sbin/ipfw/ipfw2.h stable/9/sys/netpfil/ipfw/ip_fw2.c stable/9/sys/netpfil/ipfw/ip_fw_private.h stable/9/sys/netpfil/ipfw/ip_fw_sockopt.c stable/9/sys/netpfil/ipfw/ip_fw_table.c Directory Properties: stable/9/sbin/ (props changed) stable/9/sbin/ipfw/ (props changed) stable/9/sys/ (props changed) stable/9/sys/netpfil/ (props changed) Modified: stable/9/sbin/ipfw/ipfw2.c ============================================================================== --- stable/9/sbin/ipfw/ipfw2.c Thu May 8 19:10:04 2014 (r265698) +++ stable/9/sbin/ipfw/ipfw2.c Thu May 8 19:11:14 2014 (r265699) @@ -60,6 +60,8 @@ int resvd_set_number = RESVD_SET; int ipfw_socket = -1; +uint32_t ipfw_tables_max = 0; /* Number of tables supported by kernel */ + #ifndef s6_addr32 #define s6_addr32 __u6_addr.__u6_addr32 #endif @@ -2202,6 +2204,7 @@ fill_ip(ipfw_insn_ip *cmd, char *av, int { int len = 0; uint32_t *d = ((ipfw_insn_u32 *)cmd)->d; + uint32_t tables_max; cmd->o.len &= ~F_LEN_MASK; /* zero len */ @@ -2220,6 +2223,10 @@ fill_ip(ipfw_insn_ip *cmd, char *av, int *p++ = '\0'; cmd->o.opcode = O_IP_DST_LOOKUP; cmd->o.arg1 = strtoul(av + 6, NULL, 0); + tables_max = ipfw_get_tables_max(); + if (cmd->o.arg1 > tables_max) + errx(EX_USAGE, "The table number exceeds the maximum " + "allowed value (%u)", tables_max - 1); if (p) { cmd->o.len |= F_INSN_SIZE(ipfw_insn_u32); d[0] = strtoul(p, NULL, 0); @@ -4108,6 +4115,33 @@ static void table_list(uint16_t num, int static void table_fill_xentry(char *arg, ipfw_table_xentry *xent); /* + * Retrieve maximum number of tables supported by ipfw(4) module. + */ +uint32_t +ipfw_get_tables_max() +{ + size_t len; + uint32_t tables_max; + + if (ipfw_tables_max != 0) + return (ipfw_tables_max); + + len = sizeof(tables_max); + if (sysctlbyname("net.inet.ip.fw.tables_max", &tables_max, &len, + NULL, 0) == -1) { + if (co.test_only) + tables_max = 128; /* Old conservative default */ + else + errx(1, "Can't determine maximum number of ipfw tables." + " Perhaps you forgot to load ipfw module?"); + } + + ipfw_tables_max = tables_max; + + return (ipfw_tables_max); +} + +/* * This one handles all table-related commands * ipfw table N add addr[/masklen] [value] * ipfw table N delete addr[/masklen] @@ -4120,19 +4154,10 @@ ipfw_table_handler(int ac, char *av[]) ipfw_table_xentry xent; int do_add; int is_all; - size_t len; uint32_t a; uint32_t tables_max; - len = sizeof(tables_max); - if (sysctlbyname("net.inet.ip.fw.tables_max", &tables_max, &len, - NULL, 0) == -1) { - if (co.test_only) - tables_max = 128; /* Old conservative default */ - else - errx(1, "Can't determine maximum number of ipfw tables." - " Perhaps you forgot to load ipfw module?"); - } + tables_max = ipfw_get_tables_max(); memset(&xent, 0, sizeof(xent)); Modified: stable/9/sbin/ipfw/ipfw2.h ============================================================================== --- stable/9/sbin/ipfw/ipfw2.h Thu May 8 19:10:04 2014 (r265698) +++ stable/9/sbin/ipfw/ipfw2.h Thu May 8 19:11:14 2014 (r265699) @@ -228,6 +228,8 @@ char const *match_value(struct _s_x *p, int do_cmd(int optname, void *optval, uintptr_t optlen); +uint32_t ipfw_get_tables_max(void); + struct in6_addr; void n2mask(struct in6_addr *mask, int n); int contigmask(uint8_t *p, int len); Modified: stable/9/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- stable/9/sys/netpfil/ipfw/ip_fw2.c Thu May 8 19:10:04 2014 (r265698) +++ stable/9/sys/netpfil/ipfw/ip_fw2.c Thu May 8 19:11:14 2014 (r265699) @@ -2395,38 +2395,35 @@ do { \ } case O_NAT: + l = 0; /* exit inner loop */ + done = 1; /* exit outer loop */ if (!IPFW_NAT_LOADED) { retval = IP_FW_DENY; - } else { - struct cfg_nat *t; - int nat_id; + break; + } - set_match(args, f_pos, chain); - /* Check if this is 'global' nat rule */ - if (cmd->arg1 == 0) { - retval = ipfw_nat_ptr(args, NULL, m); - l = 0; - done = 1; - break; - } - t = ((ipfw_insn_nat *)cmd)->nat; - if (t == NULL) { + struct cfg_nat *t; + int nat_id; + + set_match(args, f_pos, chain); + /* Check if this is 'global' nat rule */ + if (cmd->arg1 == 0) { + retval = ipfw_nat_ptr(args, NULL, m); + break; + } + t = ((ipfw_insn_nat *)cmd)->nat; + if (t == NULL) { nat_id = IP_FW_ARG_TABLEARG(cmd->arg1); t = (*lookup_nat_ptr)(&chain->nat, nat_id); if (t == NULL) { retval = IP_FW_DENY; - l = 0; /* exit inner loop */ - done = 1; /* exit outer loop */ break; } if (cmd->arg1 != IP_FW_TABLEARG) ((ipfw_insn_nat *)cmd)->nat = t; - } - retval = ipfw_nat_ptr(args, t, m); } - l = 0; /* exit inner loop */ - done = 1; /* exit outer loop */ + retval = ipfw_nat_ptr(args, t, m); break; case O_REASS: { @@ -2657,7 +2654,7 @@ vnet_ipfw_init(const void *unused) rule->set = RESVD_SET; rule->cmd[0].len = 1; rule->cmd[0].opcode = default_to_accept ? O_ACCEPT : O_DENY; - chain->rules = chain->default_rule = chain->map[0] = rule; + chain->default_rule = chain->map[0] = rule; chain->id = rule->id = 1; IPFW_LOCK_INIT(chain); Modified: stable/9/sys/netpfil/ipfw/ip_fw_private.h ============================================================================== --- stable/9/sys/netpfil/ipfw/ip_fw_private.h Thu May 8 19:10:04 2014 (r265698) +++ stable/9/sys/netpfil/ipfw/ip_fw_private.h Thu May 8 19:11:14 2014 (r265699) @@ -213,25 +213,27 @@ VNET_DECLARE(unsigned int, fw_tables_max #define V_fw_tables_max VNET(fw_tables_max) struct ip_fw_chain { - struct ip_fw *rules; /* list of rules */ - struct ip_fw *reap; /* list of rules to reap */ - struct ip_fw *default_rule; - int n_rules; /* number of static rules */ - int static_len; /* total len of static rules */ struct ip_fw **map; /* array of rule ptrs to ease lookup */ + uint32_t id; /* ruleset id */ + int n_rules; /* number of static rules */ LIST_HEAD(nat_list, cfg_nat) nat; /* list of nat entries */ struct radix_node_head **tables; /* IPv4 tables */ struct radix_node_head **xtables; /* extended tables */ uint8_t *tabletype; /* Array of table types */ #if defined( __linux__ ) || defined( _WIN32 ) spinlock_t rwmtx; - spinlock_t uh_lock; #else struct rwlock rwmtx; +#endif + int static_len; /* total len of static rules */ + uint32_t gencnt; /* NAT generation count */ + struct ip_fw *reap; /* list of rules to reap */ + struct ip_fw *default_rule; +#if defined( __linux__ ) || defined( _WIN32 ) + spinlock_t uh_lock; +#else struct rwlock uh_lock; /* lock for upper half */ #endif - uint32_t id; /* ruleset id */ - uint32_t gencnt; /* generation count */ }; struct sockopt; /* used by tcp_var.h */ Modified: stable/9/sys/netpfil/ipfw/ip_fw_sockopt.c ============================================================================== --- stable/9/sys/netpfil/ipfw/ip_fw_sockopt.c Thu May 8 19:10:04 2014 (r265698) +++ stable/9/sys/netpfil/ipfw/ip_fw_sockopt.c Thu May 8 19:11:14 2014 (r265699) @@ -159,7 +159,7 @@ ipfw_add_rule(struct ip_fw_chain *chain, int i, l, insert_before; struct ip_fw **map; /* the new array of pointers */ - if (chain->rules == NULL || input_rule->rulenum > IPFW_DEFAULT_RULE-1) + if (chain->map == NULL || input_rule->rulenum > IPFW_DEFAULT_RULE - 1) return (EINVAL); l = RULESIZE(input_rule); @@ -655,7 +655,7 @@ check_ipfw_struct(struct ip_fw *rule, in case O_IP_SRC_LOOKUP: case O_IP_DST_LOOKUP: - if (cmd->arg1 >= IPFW_TABLES_MAX) { + if (cmd->arg1 >= V_fw_tables_max) { printf("ipfw: invalid table number %d\n", cmd->arg1); return (EINVAL); Modified: stable/9/sys/netpfil/ipfw/ip_fw_table.c ============================================================================== --- stable/9/sys/netpfil/ipfw/ip_fw_table.c Thu May 8 19:10:04 2014 (r265698) +++ stable/9/sys/netpfil/ipfw/ip_fw_table.c Thu May 8 19:11:14 2014 (r265699) @@ -544,7 +544,7 @@ ipfw_lookup_table(struct ip_fw_chain *ch return (0); KEY_LEN(sa) = KEY_LEN_INET; sa.sin_addr.s_addr = addr; - ent = (struct table_entry *)(rnh->rnh_lookup(&sa, NULL, rnh)); + ent = (struct table_entry *)(rnh->rnh_matchaddr(&sa, rnh)); if (ent != NULL) { *val = ent->value; return (1); @@ -570,7 +570,7 @@ ipfw_lookup_table_extended(struct ip_fw_ case IPFW_TABLE_CIDR: KEY_LEN(sa6) = KEY_LEN_INET6; memcpy(&sa6.sin6_addr, paddr, sizeof(struct in6_addr)); - xent = (struct table_xentry *)(rnh->rnh_lookup(&sa6, NULL, rnh)); + xent = (struct table_xentry *)(rnh->rnh_matchaddr(&sa6, rnh)); break; case IPFW_TABLE_INTERFACE: @@ -578,7 +578,7 @@ ipfw_lookup_table_extended(struct ip_fw_ strlcpy(iface.ifname, (char *)paddr, IF_NAMESIZE) + 1; /* Assume direct match */ /* FIXME: Add interface pattern matching */ - xent = (struct table_xentry *)(rnh->rnh_lookup(&iface, NULL, rnh)); + xent = (struct table_xentry *)(rnh->rnh_matchaddr(&iface, rnh)); break; default: From owner-svn-src-stable@FreeBSD.ORG Thu May 8 19:11:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94A1CFAB; Thu, 8 May 2014 19:11:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7FB2F8AC; Thu, 8 May 2014 19:11:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s48JBhtG062098; Thu, 8 May 2014 19:11:43 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s48JBgg8062034; Thu, 8 May 2014 19:11:42 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201405081911.s48JBgg8062034@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Thu, 8 May 2014 19:11:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265700 - in stable/10: sbin/ipfw sys/netpfil/ipfw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 19:11:43 -0000 Author: melifaro Date: Thu May 8 19:11:41 2014 New Revision: 265700 URL: http://svnweb.freebsd.org/changeset/base/265700 Log: Merge r258708, r258711, r260247, r261117. r258708: Check ipfw table numbers in both user and kernel space before rule addition. Found by: Saychik Pavel r258711: Simplify O_NAT opcode handling. r260247: Use rnh_matchaddr instead of rnh_lookup for longest-prefix match. rnh_lookup is effectively the same as rnh_matchaddr if called with empy network mask. r261117: Reorder struct ip_fw_chain: * move rarely-used fields down * move uh_lock to different cacheline * remove some usused fields Modified: stable/10/sbin/ipfw/ipfw2.c stable/10/sbin/ipfw/ipfw2.h stable/10/sys/netpfil/ipfw/ip_fw2.c stable/10/sys/netpfil/ipfw/ip_fw_private.h stable/10/sys/netpfil/ipfw/ip_fw_sockopt.c stable/10/sys/netpfil/ipfw/ip_fw_table.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ipfw/ipfw2.c ============================================================================== --- stable/10/sbin/ipfw/ipfw2.c Thu May 8 19:11:14 2014 (r265699) +++ stable/10/sbin/ipfw/ipfw2.c Thu May 8 19:11:41 2014 (r265700) @@ -60,6 +60,8 @@ int resvd_set_number = RESVD_SET; int ipfw_socket = -1; +uint32_t ipfw_tables_max = 0; /* Number of tables supported by kernel */ + #ifndef s6_addr32 #define s6_addr32 __u6_addr.__u6_addr32 #endif @@ -2203,6 +2205,7 @@ fill_ip(ipfw_insn_ip *cmd, char *av, int { int len = 0; uint32_t *d = ((ipfw_insn_u32 *)cmd)->d; + uint32_t tables_max; cmd->o.len &= ~F_LEN_MASK; /* zero len */ @@ -2221,6 +2224,10 @@ fill_ip(ipfw_insn_ip *cmd, char *av, int *p++ = '\0'; cmd->o.opcode = O_IP_DST_LOOKUP; cmd->o.arg1 = strtoul(av + 6, NULL, 0); + tables_max = ipfw_get_tables_max(); + if (cmd->o.arg1 > tables_max) + errx(EX_USAGE, "The table number exceeds the maximum " + "allowed value (%u)", tables_max - 1); if (p) { cmd->o.len |= F_INSN_SIZE(ipfw_insn_u32); d[0] = strtoul(p, NULL, 0); @@ -4119,6 +4126,33 @@ static void table_list(uint16_t num, int static void table_fill_xentry(char *arg, ipfw_table_xentry *xent); /* + * Retrieve maximum number of tables supported by ipfw(4) module. + */ +uint32_t +ipfw_get_tables_max() +{ + size_t len; + uint32_t tables_max; + + if (ipfw_tables_max != 0) + return (ipfw_tables_max); + + len = sizeof(tables_max); + if (sysctlbyname("net.inet.ip.fw.tables_max", &tables_max, &len, + NULL, 0) == -1) { + if (co.test_only) + tables_max = 128; /* Old conservative default */ + else + errx(1, "Can't determine maximum number of ipfw tables." + " Perhaps you forgot to load ipfw module?"); + } + + ipfw_tables_max = tables_max; + + return (ipfw_tables_max); +} + +/* * This one handles all table-related commands * ipfw table N add addr[/masklen] [value] * ipfw table N delete addr[/masklen] @@ -4131,19 +4165,10 @@ ipfw_table_handler(int ac, char *av[]) ipfw_table_xentry xent; int do_add; int is_all; - size_t len; uint32_t a; uint32_t tables_max; - len = sizeof(tables_max); - if (sysctlbyname("net.inet.ip.fw.tables_max", &tables_max, &len, - NULL, 0) == -1) { - if (co.test_only) - tables_max = 128; /* Old conservative default */ - else - errx(1, "Can't determine maximum number of ipfw tables." - " Perhaps you forgot to load ipfw module?"); - } + tables_max = ipfw_get_tables_max(); memset(&xent, 0, sizeof(xent)); Modified: stable/10/sbin/ipfw/ipfw2.h ============================================================================== --- stable/10/sbin/ipfw/ipfw2.h Thu May 8 19:11:14 2014 (r265699) +++ stable/10/sbin/ipfw/ipfw2.h Thu May 8 19:11:41 2014 (r265700) @@ -228,6 +228,8 @@ char const *match_value(struct _s_x *p, int do_cmd(int optname, void *optval, uintptr_t optlen); +uint32_t ipfw_get_tables_max(void); + struct in6_addr; void n2mask(struct in6_addr *mask, int n); int contigmask(uint8_t *p, int len); Modified: stable/10/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- stable/10/sys/netpfil/ipfw/ip_fw2.c Thu May 8 19:11:14 2014 (r265699) +++ stable/10/sys/netpfil/ipfw/ip_fw2.c Thu May 8 19:11:41 2014 (r265700) @@ -2404,38 +2404,35 @@ do { \ } case O_NAT: + l = 0; /* exit inner loop */ + done = 1; /* exit outer loop */ if (!IPFW_NAT_LOADED) { retval = IP_FW_DENY; - } else { - struct cfg_nat *t; - int nat_id; + break; + } - set_match(args, f_pos, chain); - /* Check if this is 'global' nat rule */ - if (cmd->arg1 == 0) { - retval = ipfw_nat_ptr(args, NULL, m); - l = 0; - done = 1; - break; - } - t = ((ipfw_insn_nat *)cmd)->nat; - if (t == NULL) { + struct cfg_nat *t; + int nat_id; + + set_match(args, f_pos, chain); + /* Check if this is 'global' nat rule */ + if (cmd->arg1 == 0) { + retval = ipfw_nat_ptr(args, NULL, m); + break; + } + t = ((ipfw_insn_nat *)cmd)->nat; + if (t == NULL) { nat_id = IP_FW_ARG_TABLEARG(cmd->arg1); t = (*lookup_nat_ptr)(&chain->nat, nat_id); if (t == NULL) { retval = IP_FW_DENY; - l = 0; /* exit inner loop */ - done = 1; /* exit outer loop */ break; } if (cmd->arg1 != IP_FW_TABLEARG) ((ipfw_insn_nat *)cmd)->nat = t; - } - retval = ipfw_nat_ptr(args, t, m); } - l = 0; /* exit inner loop */ - done = 1; /* exit outer loop */ + retval = ipfw_nat_ptr(args, t, m); break; case O_REASS: { @@ -2660,7 +2657,7 @@ vnet_ipfw_init(const void *unused) rule->set = RESVD_SET; rule->cmd[0].len = 1; rule->cmd[0].opcode = default_to_accept ? O_ACCEPT : O_DENY; - chain->rules = chain->default_rule = chain->map[0] = rule; + chain->default_rule = chain->map[0] = rule; chain->id = rule->id = 1; IPFW_LOCK_INIT(chain); Modified: stable/10/sys/netpfil/ipfw/ip_fw_private.h ============================================================================== --- stable/10/sys/netpfil/ipfw/ip_fw_private.h Thu May 8 19:11:14 2014 (r265699) +++ stable/10/sys/netpfil/ipfw/ip_fw_private.h Thu May 8 19:11:41 2014 (r265700) @@ -213,25 +213,27 @@ VNET_DECLARE(unsigned int, fw_tables_max #define V_fw_tables_max VNET(fw_tables_max) struct ip_fw_chain { - struct ip_fw *rules; /* list of rules */ - struct ip_fw *reap; /* list of rules to reap */ - struct ip_fw *default_rule; - int n_rules; /* number of static rules */ - int static_len; /* total len of static rules */ struct ip_fw **map; /* array of rule ptrs to ease lookup */ + uint32_t id; /* ruleset id */ + int n_rules; /* number of static rules */ LIST_HEAD(nat_list, cfg_nat) nat; /* list of nat entries */ struct radix_node_head **tables; /* IPv4 tables */ struct radix_node_head **xtables; /* extended tables */ uint8_t *tabletype; /* Array of table types */ #if defined( __linux__ ) || defined( _WIN32 ) spinlock_t rwmtx; - spinlock_t uh_lock; #else struct rwlock rwmtx; +#endif + int static_len; /* total len of static rules */ + uint32_t gencnt; /* NAT generation count */ + struct ip_fw *reap; /* list of rules to reap */ + struct ip_fw *default_rule; +#if defined( __linux__ ) || defined( _WIN32 ) + spinlock_t uh_lock; +#else struct rwlock uh_lock; /* lock for upper half */ #endif - uint32_t id; /* ruleset id */ - uint32_t gencnt; /* generation count */ }; struct sockopt; /* used by tcp_var.h */ Modified: stable/10/sys/netpfil/ipfw/ip_fw_sockopt.c ============================================================================== --- stable/10/sys/netpfil/ipfw/ip_fw_sockopt.c Thu May 8 19:11:14 2014 (r265699) +++ stable/10/sys/netpfil/ipfw/ip_fw_sockopt.c Thu May 8 19:11:41 2014 (r265700) @@ -159,7 +159,7 @@ ipfw_add_rule(struct ip_fw_chain *chain, int i, l, insert_before; struct ip_fw **map; /* the new array of pointers */ - if (chain->rules == NULL || input_rule->rulenum > IPFW_DEFAULT_RULE-1) + if (chain->map == NULL || input_rule->rulenum > IPFW_DEFAULT_RULE - 1) return (EINVAL); l = RULESIZE(input_rule); @@ -653,7 +653,7 @@ check_ipfw_struct(struct ip_fw *rule, in case O_IP_SRC_LOOKUP: case O_IP_DST_LOOKUP: - if (cmd->arg1 >= IPFW_TABLES_MAX) { + if (cmd->arg1 >= V_fw_tables_max) { printf("ipfw: invalid table number %d\n", cmd->arg1); return (EINVAL); Modified: stable/10/sys/netpfil/ipfw/ip_fw_table.c ============================================================================== --- stable/10/sys/netpfil/ipfw/ip_fw_table.c Thu May 8 19:11:14 2014 (r265699) +++ stable/10/sys/netpfil/ipfw/ip_fw_table.c Thu May 8 19:11:41 2014 (r265700) @@ -544,7 +544,7 @@ ipfw_lookup_table(struct ip_fw_chain *ch return (0); KEY_LEN(sa) = KEY_LEN_INET; sa.sin_addr.s_addr = addr; - ent = (struct table_entry *)(rnh->rnh_lookup(&sa, NULL, rnh)); + ent = (struct table_entry *)(rnh->rnh_matchaddr(&sa, rnh)); if (ent != NULL) { *val = ent->value; return (1); @@ -570,7 +570,7 @@ ipfw_lookup_table_extended(struct ip_fw_ case IPFW_TABLE_CIDR: KEY_LEN(sa6) = KEY_LEN_INET6; memcpy(&sa6.sin6_addr, paddr, sizeof(struct in6_addr)); - xent = (struct table_xentry *)(rnh->rnh_lookup(&sa6, NULL, rnh)); + xent = (struct table_xentry *)(rnh->rnh_matchaddr(&sa6, rnh)); break; case IPFW_TABLE_INTERFACE: @@ -578,7 +578,7 @@ ipfw_lookup_table_extended(struct ip_fw_ strlcpy(iface.ifname, (char *)paddr, IF_NAMESIZE) + 1; /* Assume direct match */ /* FIXME: Add interface pattern matching */ - xent = (struct table_xentry *)(rnh->rnh_lookup(&iface, NULL, rnh)); + xent = (struct table_xentry *)(rnh->rnh_matchaddr(&iface, rnh)); break; default: From owner-svn-src-stable@FreeBSD.ORG Thu May 8 19:35:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A87EE721; Thu, 8 May 2014 19:35:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89AE6AB0; Thu, 8 May 2014 19:35:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s48JZDnD029201; Thu, 8 May 2014 19:35:13 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s48JZCL9029165; Thu, 8 May 2014 19:35:12 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201405081935.s48JZCL9029165@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Thu, 8 May 2014 19:35:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265701 - in stable/10: sbin/route usr.bin/netstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 19:35:13 -0000 Author: melifaro Date: Thu May 8 19:35:12 2014 New Revision: 265701 URL: http://svnweb.freebsd.org/changeset/base/265701 Log: Merge r260524,r260540 r260524: Add -4/-6 shorthand for -finet/-finet6 in route(8) and netstat(8). r260540: Bump dates in nestat(1) and route(8) man pages. Fix several small errors introduced by r260524. Suggested by: glebius Modified: stable/10/sbin/route/keywords stable/10/sbin/route/route.8 stable/10/sbin/route/route.c stable/10/usr.bin/netstat/main.c stable/10/usr.bin/netstat/netstat.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/route/keywords ============================================================================== --- stable/10/sbin/route/keywords Thu May 8 19:11:41 2014 (r265700) +++ stable/10/sbin/route/keywords Thu May 8 19:35:12 2014 (r265701) @@ -1,6 +1,8 @@ # @(#)keywords 8.2 (Berkeley) 3/19/94 # $FreeBSD$ +4 +6 add atalk blackhole Modified: stable/10/sbin/route/route.8 ============================================================================== --- stable/10/sbin/route/route.8 Thu May 8 19:11:41 2014 (r265700) +++ stable/10/sbin/route/route.8 Thu May 8 19:35:12 2014 (r265701) @@ -28,7 +28,7 @@ .\" @(#)route.8 8.3 (Berkeley) 3/19/94 .\" $FreeBSD$ .\" -.Dd November 17, 2012 +.Dd May 8, 2014 .Dt ROUTE 8 .Os .Sh NAME @@ -62,6 +62,14 @@ programmatic interface discussed in .Pp The following options are available: .Bl -tag -width indent +.It Fl 4 +Specify +.Cm inet +address family as family hint for subcommands. +.It Fl 6 +Specify +.Cm inet +address family as family hint for subcommands. .It Fl d Run in debug-only mode, i.e., do not actually modify the routing table. .It Fl n @@ -142,6 +150,15 @@ or .Fl inet modifiers, only routes having destinations with addresses in the delineated family will be deleted. +Additionally, +.Fl 4 +or +.Fl 6 +can be used as aliases for +.Fl inet +and +.Fl inet6 +modifiers. When a .Fl fib option is specified, the operation will be applied to Modified: stable/10/sbin/route/route.c ============================================================================== --- stable/10/sbin/route/route.c Thu May 8 19:11:41 2014 (r265700) +++ stable/10/sbin/route/route.c Thu May 8 19:35:12 2014 (r265701) @@ -140,7 +140,7 @@ usage(const char *cp) { if (cp != NULL) warnx("bad keyword: %s", cp); - errx(EX_USAGE, "usage: route [-dnqtv] command [[modifiers] args]"); + errx(EX_USAGE, "usage: route [-46dnqtv] command [[modifiers] args]"); /* NOTREACHED */ } @@ -153,8 +153,24 @@ main(int argc, char **argv) if (argc < 2) usage(NULL); - while ((ch = getopt(argc, argv, "nqdtv")) != -1) + while ((ch = getopt(argc, argv, "46nqdtv")) != -1) switch(ch) { + case '4': +#ifdef INET + af = AF_INET; + aflen = sizeof(struct sockaddr_in); +#else + errx(1, "IPv4 support is not compiled in"); +#endif + break; + case '6': +#ifdef INET6 + af = AF_INET6; + aflen = sizeof(struct sockaddr_in6); +#else + errx(1, "IPv6 support is not compiled in"); +#endif + break; case 'n': nflag = 1; break; @@ -368,11 +384,13 @@ flushroutes(int argc, char *argv[]) usage(*argv); switch (keyword(*argv + 1)) { #ifdef INET + case K_4: case K_INET: af = AF_INET; break; #endif #ifdef INET6 + case K_6: case K_INET6: af = AF_INET6; break; @@ -780,12 +798,14 @@ newroute(int argc, char **argv) aflen = sizeof(struct sockaddr_dl); break; #ifdef INET + case K_4: case K_INET: af = AF_INET; aflen = sizeof(struct sockaddr_in); break; #endif #ifdef INET6 + case K_6: case K_INET6: af = AF_INET6; aflen = sizeof(struct sockaddr_in6); Modified: stable/10/usr.bin/netstat/main.c ============================================================================== --- stable/10/usr.bin/netstat/main.c Thu May 8 19:11:41 2014 (r265700) +++ stable/10/usr.bin/netstat/main.c Thu May 8 19:35:12 2014 (r265701) @@ -350,9 +350,23 @@ main(int argc, char *argv[]) af = AF_UNSPEC; - while ((ch = getopt(argc, argv, "AaBbdF:f:ghI:iLlM:mN:np:Qq:rSTsuWw:xz")) + while ((ch = getopt(argc, argv, "46AaBbdF:f:ghI:iLlM:mN:np:Qq:rSTsuWw:xz")) != -1) switch(ch) { + case '4': +#ifdef INET + af = AF_INET; +#else + errx(1, "IPv4 support is not compiled in"); +#endif + break; + case '6': +#ifdef INET6 + af = AF_INET6; +#else + errx(1, "IPv6 support is not compiled in"); +#endif + break; case 'A': Aflag = 1; break; @@ -850,21 +864,21 @@ static void usage(void) { (void)fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n", -"usage: netstat [-AaLnSTWx] [-f protocol_family | -p protocol]\n" +"usage: netstat [-46AaLnSTWx] [-f protocol_family | -p protocol]\n" " [-M core] [-N system]", -" netstat -i | -I interface [-abdhnW] [-f address_family]\n" +" netstat -i | -I interface [-46abdhnW] [-f address_family]\n" " [-M core] [-N system]", -" netstat -w wait [-I interface] [-d] [-M core] [-N system] [-q howmany]", -" netstat -s [-s] [-z] [-f protocol_family | -p protocol]\n" +" netstat -w wait [-I interface] [-46d] [-M core] [-N system] [-q howmany]", +" netstat -s [-s] [-46z] [-f protocol_family | -p protocol]\n" " [-M core] [-N system]", -" netstat -i | -I interface -s [-f protocol_family | -p protocol]\n" +" netstat -i | -I interface [-46s] [-f protocol_family | -p protocol]\n" " [-M core] [-N system]", " netstat -m [-M core] [-N system]", " netstat -B [-I interface]", -" netstat -r [-AanW] [-f address_family] [-M core] [-N system]", +" netstat -r [-46AanW] [-f address_family] [-M core] [-N system]", " netstat -rs [-s] [-M core] [-N system]", -" netstat -g [-W] [-f address_family] [-M core] [-N system]", -" netstat -gs [-s] [-f address_family] [-M core] [-N system]", +" netstat -g [-46W] [-f address_family] [-M core] [-N system]", +" netstat -gs [-46s] [-f address_family] [-M core] [-N system]", " netstat -Q"); exit(1); } Modified: stable/10/usr.bin/netstat/netstat.1 ============================================================================== --- stable/10/usr.bin/netstat/netstat.1 Thu May 8 19:11:41 2014 (r265700) +++ stable/10/usr.bin/netstat/netstat.1 Thu May 8 19:35:12 2014 (r265701) @@ -28,7 +28,7 @@ .\" @(#)netstat.1 8.8 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd October 15, 2013 +.Dd January 11, 2014 .Dt NETSTAT 1 .Os .Sh NAME @@ -45,7 +45,7 @@ depending on the options for the informa .It Xo .Bk -words .Nm -.Op Fl AaLnSTWx +.Op Fl 46AaLnSTWx .Op Fl f Ar protocol_family | Fl p Ar protocol .Op Fl M Ar core .Op Fl N Ar system @@ -92,7 +92,7 @@ retransmits, out-of-order packets receiv .Bk -words .Nm .Fl i | I Ar interface -.Op Fl abdhnW +.Op Fl 46abdhnW .Op Fl f Ar address_family .Ek .Xc @@ -153,7 +153,7 @@ is also present, show the number of drop .Bk -words .Nm .Fl s Op Fl s -.Op Fl z +.Op Fl 46z .Op Fl f Ar protocol_family | Fl p Ar protocol .Op Fl M Ar core .Op Fl N Ar system @@ -174,6 +174,7 @@ is also present, reset statistic counter .Bk -words .Nm .Fl i | I Ar interface Fl s +.Op Fl 46 .Op Fl f Ar protocol_family | Fl p Ar protocol .Op Fl M Ar core .Op Fl N Ar system @@ -214,7 +215,7 @@ states. .Bk -words .Nm .Fl r -.Op Fl AanW +.Op Fl 46AanW .Op Fl F Ar fibnum .Op Fl f Ar address_family .Op Fl M Ar core @@ -268,7 +269,7 @@ is repeated, counters with a value of ze .Bk -words .Nm .Fl g -.Op Fl W +.Op Fl 46W .Op Fl f Ar address_family .Op Fl M Ar core .Op Fl N Ar system @@ -287,7 +288,7 @@ address families. .Bk -words .Nm .Fl gs -.Op Fl s +.Op Fl 46s .Op Fl f Ar address_family .Op Fl M Ar core .Op Fl N Ar system @@ -316,6 +317,14 @@ The flags field shows available ISR hand .Pp Some options have the general meaning: .Bl -tag -width flag +.It Fl 4 +Is shorthand for +.Fl f +.Ar inet +.It Fl 6 +Is shorthand for +.Fl f +.Ar inet6 .It Fl f Ar address_family , Fl p Ar protocol Limit display to those records of the specified From owner-svn-src-stable@FreeBSD.ORG Thu May 8 19:35:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55E5C84B; Thu, 8 May 2014 19:35:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 35E86AB3; Thu, 8 May 2014 19:35:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s48JZV5o029802; Thu, 8 May 2014 19:35:31 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s48JZUn6029773; Thu, 8 May 2014 19:35:30 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201405081935.s48JZUn6029773@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Thu, 8 May 2014 19:35:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265702 - in stable/9: sbin/route usr.bin/netstat X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 19:35:31 -0000 Author: melifaro Date: Thu May 8 19:35:29 2014 New Revision: 265702 URL: http://svnweb.freebsd.org/changeset/base/265702 Log: Merge r260524,r260540 r260524: Add -4/-6 shorthand for -finet/-finet6 in route(8) and netstat(8). r260540: Bump dates in nestat(1) and route(8) man pages. Fix several small errors introduced by r260524. Suggested by: glebius Modified: stable/9/sbin/route/keywords stable/9/sbin/route/route.8 stable/9/sbin/route/route.c stable/9/usr.bin/netstat/main.c stable/9/usr.bin/netstat/netstat.1 Directory Properties: stable/9/sbin/ (props changed) stable/9/sbin/route/ (props changed) stable/9/usr.bin/ (props changed) stable/9/usr.bin/netstat/ (props changed) Modified: stable/9/sbin/route/keywords ============================================================================== --- stable/9/sbin/route/keywords Thu May 8 19:35:12 2014 (r265701) +++ stable/9/sbin/route/keywords Thu May 8 19:35:29 2014 (r265702) @@ -1,6 +1,8 @@ # @(#)keywords 8.2 (Berkeley) 3/19/94 # $FreeBSD$ +4 +6 add atalk blackhole Modified: stable/9/sbin/route/route.8 ============================================================================== --- stable/9/sbin/route/route.8 Thu May 8 19:35:12 2014 (r265701) +++ stable/9/sbin/route/route.8 Thu May 8 19:35:29 2014 (r265702) @@ -62,6 +62,14 @@ programmatic interface discussed in .Pp The following options are available: .Bl -tag -width indent +.It Fl 4 +Specify +.Cm inet +address family as family hint for subcommands. +.It Fl 6 +Specify +.Cm inet +address family as family hint for subcommands. .It Fl d Run in debug-only mode, i.e., do not actually modify the routing table. .It Fl n @@ -134,10 +142,20 @@ When the address family may is specified .Fl xns , .Fl atalk , .Fl inet6 , +.Fl 6, +.Fl inet, or -.Fl inet +.Fl 4 modifiers, only routes having destinations with addresses in the -delineated family will be deleted. +delineated family will be deleted. Additionally, +.Fl 4 +or +.Fl 6 +can be used as aliases for +.Fl inet +and +.Fl inet6 +modifiers. When a .Fl fib option is specified, the operation will be applied to Modified: stable/9/sbin/route/route.c ============================================================================== --- stable/9/sbin/route/route.c Thu May 8 19:35:12 2014 (r265701) +++ stable/9/sbin/route/route.c Thu May 8 19:35:29 2014 (r265702) @@ -153,7 +153,7 @@ usage(const char *cp) if (cp != NULL) warnx("bad keyword: %s", cp); (void) fprintf(stderr, - "usage: route [-dnqtv] command [[modifiers] args]\n"); + "usage: route [-46dnqtv] command [[modifiers] args]\n"); exit(EX_USAGE); /* NOTREACHED */ } @@ -167,8 +167,24 @@ main(int argc, char **argv) if (argc < 2) usage(NULL); - while ((ch = getopt(argc, argv, "nqdtv")) != -1) + while ((ch = getopt(argc, argv, "46nqdtv")) != -1) switch(ch) { + case '4': +#ifdef INET + af = AF_INET; + aflen = sizeof(struct sockaddr_in); +#else + errx(1, "IPv4 support is not compiled in"); +#endif + break; + case '6': +#ifdef INET6 + af = AF_INET6; + aflen = sizeof(struct sockaddr_in6); +#else + errx(1, "IPv6 support is not compiled in"); +#endif + break; case 'n': nflag = 1; break; @@ -389,10 +405,12 @@ flushroutes(int argc, char *argv[]) if (**argv != '-') usage(*argv); switch (keyword(*argv + 1)) { + case K_4: case K_INET: af = AF_INET; break; #ifdef INET6 + case K_6: case K_INET6: af = AF_INET6; break; @@ -807,11 +825,13 @@ newroute(int argc, char **argv) af = AF_LINK; aflen = sizeof(struct sockaddr_dl); break; + case K_4: case K_INET: af = AF_INET; aflen = sizeof(struct sockaddr_in); break; #ifdef INET6 + case K_6: case K_INET6: af = AF_INET6; aflen = sizeof(struct sockaddr_in6); Modified: stable/9/usr.bin/netstat/main.c ============================================================================== --- stable/9/usr.bin/netstat/main.c Thu May 8 19:35:12 2014 (r265701) +++ stable/9/usr.bin/netstat/main.c Thu May 8 19:35:29 2014 (r265702) @@ -366,9 +366,23 @@ main(int argc, char *argv[]) af = AF_UNSPEC; - while ((ch = getopt(argc, argv, "AaBbdf:ghI:iLlM:mN:np:Qq:rSTsuWw:xz")) + while ((ch = getopt(argc, argv, "46AaBbdf:ghI:iLlM:mN:np:Qq:rSTsuWw:xz")) != -1) switch(ch) { + case '4': +#ifdef INET + af = AF_INET; +#else + errx(1, "IPv4 support is not compiled in"); +#endif + break; + case '6': +#ifdef INET6 + af = AF_INET6; +#else + errx(1, "IPv6 support is not compiled in"); +#endif + break; case 'A': Aflag = 1; break; @@ -805,21 +819,21 @@ static void usage(void) { (void)fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n", -"usage: netstat [-AaLnSTWx] [-f protocol_family | -p protocol]\n" +"usage: netstat [-46AaLnSTWx] [-f protocol_family | -p protocol]\n" " [-M core] [-N system]", -" netstat -i | -I interface [-abdhnW] [-f address_family]\n" +" netstat -i | -I interface [-46abdhnW] [-f address_family]\n" " [-M core] [-N system]", -" netstat -w wait [-I interface] [-d] [-M core] [-N system] [-q howmany]", -" netstat -s [-s] [-z] [-f protocol_family | -p protocol]\n" +" netstat -w wait [-I interface] [-46d] [-M core] [-N system] [-q howmany]", +" netstat -s [-s] [-46z] [-f protocol_family | -p protocol]\n" " [-M core] [-N system]", -" netstat -i | -I interface -s [-f protocol_family | -p protocol]\n" +" netstat -i | -I interface [-46s] [-f protocol_family | -p protocol]\n" " [-M core] [-N system]", " netstat -m [-M core] [-N system]", " netstat -B [-I interface]", -" netstat -r [-AanW] [-f address_family] [-M core] [-N system]", +" netstat -r [-46AanW] [-f address_family] [-M core] [-N system]", " netstat -rs [-s] [-M core] [-N system]", -" netstat -g [-W] [-f address_family] [-M core] [-N system]", -" netstat -gs [-s] [-f address_family] [-M core] [-N system]", +" netstat -g [-46W] [-f address_family] [-M core] [-N system]", +" netstat -gs [-46s] [-f address_family] [-M core] [-N system]", " netstat -Q"); exit(1); } Modified: stable/9/usr.bin/netstat/netstat.1 ============================================================================== --- stable/9/usr.bin/netstat/netstat.1 Thu May 8 19:35:12 2014 (r265701) +++ stable/9/usr.bin/netstat/netstat.1 Thu May 8 19:35:29 2014 (r265702) @@ -28,7 +28,7 @@ .\" @(#)netstat.1 8.8 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd March 10, 2013 +.Dd May 8, 2014 .Dt NETSTAT 1 .Os .Sh NAME @@ -45,7 +45,7 @@ depending on the options for the informa .It Xo .Bk -words .Nm -.Op Fl AaLnSTWx +.Op Fl 46AaLnSTWx .Op Fl f Ar protocol_family | Fl p Ar protocol .Op Fl M Ar core .Op Fl N Ar system @@ -92,7 +92,7 @@ retransmits, out-of-order packets receiv .Bk -words .Nm .Fl i | I Ar interface -.Op Fl abdhnW +.Op Fl 46abdhnW .Op Fl f Ar address_family .Op Fl M Ar core .Op Fl N Ar system @@ -155,7 +155,7 @@ is also present, show the number of drop .Bk -words .Nm .Fl s Op Fl s -.Op Fl z +.Op Fl 46z .Op Fl f Ar protocol_family | Fl p Ar protocol .Op Fl M Ar core .Op Fl N Ar system @@ -176,6 +176,7 @@ is also present, reset statistic counter .Bk -words .Nm .Fl i | I Ar interface Fl s +.Op Fl 46 .Op Fl f Ar protocol_family | Fl p Ar protocol .Op Fl M Ar core .Op Fl N Ar system @@ -216,7 +217,7 @@ states. .Bk -words .Nm .Fl r -.Op Fl AanW +.Op Fl 46AanW .Op Fl f Ar address_family .Op Fl M Ar core .Op Fl N Ar system @@ -263,7 +264,7 @@ is repeated, counters with a value of ze .Bk -words .Nm .Fl g -.Op Fl W +.Op Fl 46W .Op Fl f Ar address_family .Op Fl M Ar core .Op Fl N Ar system @@ -282,7 +283,7 @@ address families. .Bk -words .Nm .Fl gs -.Op Fl s +.Op Fl 46s .Op Fl f Ar address_family .Op Fl M Ar core .Op Fl N Ar system @@ -311,6 +312,14 @@ The flags field shows available ISR hand .Pp Some options have the general meaning: .Bl -tag -width flag +.It Fl 4 +Is shorthand for +.Fl f +.Ar inet +.It Fl 6 +Is shorthand for +.Fl f +.Ar inet6 .It Fl f Ar address_family , Fl p Ar protocol Limit display to those records of the specified From owner-svn-src-stable@FreeBSD.ORG Thu May 8 20:24:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 626042A1; Thu, 8 May 2014 20:24:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DBEDF5C; Thu, 8 May 2014 20:24:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s48KOE8M065115; Thu, 8 May 2014 20:24:14 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s48KODpU065065; Thu, 8 May 2014 20:24:13 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201405082024.s48KODpU065065@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Thu, 8 May 2014 20:24:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265707 - stable/9/sys/net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 20:24:14 -0000 Author: melifaro Date: Thu May 8 20:24:13 2014 New Revision: 265707 URL: http://svnweb.freebsd.org/changeset/base/265707 Log: Merge r259528, r259528, r260295. r259528: Simplify contiguous mask checking. Suggested by: glebius r260228: Remove useless register variable modifiers. Do some more style(9). r260295: Change semantics for rnh_lookup() function: now it performs exact match search, regardless of netmask existance. This simplifies most of rnh_lookup() consumers. Fix panic triggered by deleting non-existent host route. PR: kern/185092 Submitted by: Nikolay Denev Modified: stable/9/sys/net/radix.c stable/9/sys/net/radix.h stable/9/sys/net/radix_mpath.c stable/9/sys/net/route.c stable/9/sys/net/rtsock.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/net/ (props changed) Modified: stable/9/sys/net/radix.c ============================================================================== --- stable/9/sys/net/radix.c Thu May 8 20:20:59 2014 (r265706) +++ stable/9/sys/net/radix.c Thu May 8 20:24:13 2014 (r265707) @@ -156,12 +156,10 @@ static int rn_satisfies_leaf(char *trial * Search a node in the tree matching the key. */ static struct radix_node * -rn_search(v_arg, head) - void *v_arg; - struct radix_node *head; +rn_search(void *v_arg, struct radix_node *head) { - register struct radix_node *x; - register caddr_t v; + struct radix_node *x; + caddr_t v; for (x = head, v = v_arg; x->rn_bit >= 0;) { if (x->rn_bmask & v[x->rn_offset]) @@ -177,12 +175,10 @@ rn_search(v_arg, head) * XXX note this function is used only once. */ static struct radix_node * -rn_search_m(v_arg, head, m_arg) - struct radix_node *head; - void *v_arg, *m_arg; +rn_search_m(void *v_arg, struct radix_node *head, void *m_arg) { - register struct radix_node *x; - register caddr_t v = v_arg, m = m_arg; + struct radix_node *x; + caddr_t v = v_arg, m = m_arg; for (x = head; x->rn_bit >= 0;) { if ((x->rn_bmask & m[x->rn_offset]) && @@ -191,15 +187,14 @@ rn_search_m(v_arg, head, m_arg) else x = x->rn_left; } - return x; + return (x); } int -rn_refines(m_arg, n_arg) - void *m_arg, *n_arg; +rn_refines(void *m_arg, void *n_arg) { - register caddr_t m = m_arg, n = n_arg; - register caddr_t lim, lim2 = lim = n + LEN(n); + caddr_t m = m_arg, n = n_arg; + caddr_t lim, lim2 = lim = n + LEN(n); int longer = LEN(n++) - LEN(m++); int masks_are_equal = 1; @@ -207,50 +202,71 @@ rn_refines(m_arg, n_arg) lim -= longer; while (n < lim) { if (*n & ~(*m)) - return 0; + return (0); if (*n++ != *m++) masks_are_equal = 0; } while (n < lim2) if (*n++) - return 0; + return (0); if (masks_are_equal && (longer < 0)) for (lim2 = m - longer; m < lim2; ) if (*m++) - return 1; + return (1); return (!masks_are_equal); } +/* + * Search for exact match in given @head. + * Assume host bits are cleared in @v_arg if @m_arg is not NULL + * Note that prefixes with /32 or /128 masks are treated differently + * from host routes. + */ struct radix_node * -rn_lookup(v_arg, m_arg, head) - void *v_arg, *m_arg; - struct radix_node_head *head; +rn_lookup(void *v_arg, void *m_arg, struct radix_node_head *head) { - register struct radix_node *x; - caddr_t netmask = 0; + struct radix_node *x; + caddr_t netmask; - if (m_arg) { + if (m_arg != NULL) { + /* + * Most common case: search exact prefix/mask + */ x = rn_addmask_r(m_arg, head->rnh_masks, 1, head->rnh_treetop->rn_offset); - if (x == 0) - return (0); + if (x == NULL) + return (NULL); netmask = x->rn_key; - } - x = rn_match(v_arg, head); - if (x && netmask) { - while (x && x->rn_mask != netmask) + + x = rn_match(v_arg, head); + + while (x != NULL && x->rn_mask != netmask) x = x->rn_dupedkey; + + return (x); } - return x; + + /* + * Search for host address. + */ + if ((x = rn_match(v_arg, head)) == NULL) + return (NULL); + + /* Check if found key is the same */ + if (LEN(x->rn_key) != LEN(v_arg) || bcmp(x->rn_key, v_arg, LEN(v_arg))) + return (NULL); + + /* Check if this is not host route */ + if (x->rn_mask != NULL) + return (NULL); + + return (x); } static int -rn_satisfies_leaf(trial, leaf, skip) - char *trial; - register struct radix_node *leaf; - int skip; +rn_satisfies_leaf(char *trial, struct radix_node *leaf, int skip) { - register char *cp = trial, *cp2 = leaf->rn_key, *cp3 = leaf->rn_mask; + char *cp = trial, *cp2 = leaf->rn_key, *cp3 = leaf->rn_mask; char *cplim; int length = min(LEN(cp), LEN(cp2)); @@ -261,22 +277,23 @@ rn_satisfies_leaf(trial, leaf, skip) cplim = cp + length; cp3 += skip; cp2 += skip; for (cp += skip; cp < cplim; cp++, cp2++, cp3++) if ((*cp ^ *cp2) & *cp3) - return 0; - return 1; + return (0); + return (1); } +/* + * Search for longest-prefix match in given @head + */ struct radix_node * -rn_match(v_arg, head) - void *v_arg; - struct radix_node_head *head; +rn_match(void *v_arg, struct radix_node_head *head) { caddr_t v = v_arg; - register struct radix_node *t = head->rnh_treetop, *x; - register caddr_t cp = v, cp2; + struct radix_node *t = head->rnh_treetop, *x; + caddr_t cp = v, cp2; caddr_t cplim; struct radix_node *saved_t, *top = t; int off = t->rn_offset, vlen = LEN(cp), matched_off; - register int test, b, rn_bit; + int test, b, rn_bit; /* * Open code rn_search(v, top) to avoid overhead of extra @@ -314,7 +331,7 @@ rn_match(v_arg, head) */ if (t->rn_flags & RNF_ROOT) t = t->rn_dupedkey; - return t; + return (t); on1: test = (*cp ^ *cp2) & 0xff; /* find first bit that differs */ for (b = 7; (test >>= 1) > 0;) @@ -335,13 +352,13 @@ on1: */ if (t->rn_flags & RNF_NORMAL) { if (rn_bit <= t->rn_bit) - return t; + return (t); } else if (rn_satisfies_leaf(v, t, matched_off)) - return t; + return (t); t = saved_t; /* start searching up the tree */ do { - register struct radix_mask *m; + struct radix_mask *m; t = t->rn_parent; m = t->rn_mklist; /* @@ -360,12 +377,12 @@ on1: while (x && x->rn_mask != m->rm_mask) x = x->rn_dupedkey; if (x && rn_satisfies_leaf(v, x, off)) - return x; + return (x); } m = m->rm_mklist; } } while (t != top); - return 0; + return (0); } #ifdef RN_DEBUG @@ -387,12 +404,9 @@ int rn_debug = 1; */ static struct radix_node * -rn_newpair(v, b, nodes) - void *v; - int b; - struct radix_node nodes[2]; +rn_newpair(void *v, int b, struct radix_node nodes[2]) { - register struct radix_node *tt = nodes, *t = tt + 1; + struct radix_node *tt = nodes, *t = tt + 1; t->rn_bit = b; t->rn_bmask = 0x80 >> (b & 7); t->rn_left = tt; @@ -416,44 +430,39 @@ rn_newpair(v, b, nodes) tt->rn_ybro = rn_clist; rn_clist = tt; #endif - return t; + return (t); } static struct radix_node * -rn_insert(v_arg, head, dupentry, nodes) - void *v_arg; - struct radix_node_head *head; - int *dupentry; - struct radix_node nodes[2]; +rn_insert(void *v_arg, struct radix_node_head *head, int *dupentry, + struct radix_node nodes[2]) { caddr_t v = v_arg; struct radix_node *top = head->rnh_treetop; int head_off = top->rn_offset, vlen = LEN(v); - register struct radix_node *t = rn_search(v_arg, top); - register caddr_t cp = v + head_off; - register int b; - struct radix_node *tt; + struct radix_node *t = rn_search(v_arg, top); + caddr_t cp = v + head_off; + int b; + struct radix_node *p, *tt, *x; /* * Find first bit at which v and t->rn_key differ */ - { - register caddr_t cp2 = t->rn_key + head_off; - register int cmp_res; + caddr_t cp2 = t->rn_key + head_off; + int cmp_res; caddr_t cplim = v + vlen; while (cp < cplim) if (*cp2++ != *cp++) goto on1; *dupentry = 1; - return t; + return (t); on1: *dupentry = 0; cmp_res = (cp[-1] ^ cp2[-1]) & 0xff; for (b = (cp - v) << 3; cmp_res; b--) cmp_res >>= 1; - } - { - register struct radix_node *p, *x = top; + + x = top; cp = v; do { p = x; @@ -485,20 +494,19 @@ on1: if (rn_debug) log(LOG_DEBUG, "rn_insert: Coming Out:\n"), traverse(p); #endif - } return (tt); } struct radix_node * rn_addmask_r(void *arg, struct radix_node_head *maskhead, int search, int skip) { - caddr_t netmask = (caddr_t)arg; - register struct radix_node *x; - register caddr_t cp, cplim; - register int b = 0, mlen, j; + unsigned char *netmask = arg; + unsigned char *cp, *cplim; + struct radix_node *x; + int b = 0, mlen, j; int maskduplicated, isnormal; struct radix_node *saved_x; - char addmask_key[RADIX_MAX_KEY_LEN]; + unsigned char addmask_key[RADIX_MAX_KEY_LEN]; if ((mlen = LEN(netmask)) > RADIX_MAX_KEY_LEN) mlen = RADIX_MAX_KEY_LEN; @@ -540,20 +548,18 @@ rn_addmask_r(void *arg, struct radix_nod * Calculate index of mask, and check for normalcy. * First find the first byte with a 0 bit, then if there are * more bits left (remember we already trimmed the trailing 0's), - * the pattern must be one of those in normal_chars[], or we have + * the bits should be contiguous, otherwise we have got * a non-contiguous mask. */ +#define CONTIG(_c) (((~(_c) + 1) & (_c)) == (unsigned char)(~(_c) + 1)) cplim = netmask + mlen; isnormal = 1; for (cp = netmask + skip; (cp < cplim) && *(u_char *)cp == 0xff;) cp++; if (cp != cplim) { - static char normal_chars[] = { - 0, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff}; - for (j = 0x80; (j & *cp) != 0; j >>= 1) b++; - if (*cp != normal_chars[b] || cp != (cplim - 1)) + if (!CONTIG(*cp) || cp != (cplim - 1)) isnormal = 0; } b += (cp - netmask) << 3; @@ -581,29 +587,26 @@ rn_addmask(void *n_arg, int search, int } static int /* XXX: arbitrary ordering for non-contiguous masks */ -rn_lexobetter(m_arg, n_arg) - void *m_arg, *n_arg; +rn_lexobetter(void *m_arg, void *n_arg) { - register u_char *mp = m_arg, *np = n_arg, *lim; + u_char *mp = m_arg, *np = n_arg, *lim; if (LEN(mp) > LEN(np)) - return 1; /* not really, but need to check longer one first */ + return (1); /* not really, but need to check longer one first */ if (LEN(mp) == LEN(np)) for (lim = mp + LEN(mp); mp < lim;) if (*mp++ > *np++) - return 1; - return 0; + return (1); + return (0); } static struct radix_mask * -rn_new_radix_mask(tt, next) - register struct radix_node *tt; - register struct radix_mask *next; +rn_new_radix_mask(struct radix_node *tt, struct radix_mask *next) { - register struct radix_mask *m; + struct radix_mask *m; R_Malloc(m, struct radix_mask *, sizeof (struct radix_mask)); - if (m == 0) { + if (m == NULL) { log(LOG_ERR, "Failed to allocate route mask\n"); return (0); } @@ -616,17 +619,15 @@ rn_new_radix_mask(tt, next) m->rm_mask = tt->rn_mask; m->rm_mklist = next; tt->rn_mklist = m; - return m; + return (m); } struct radix_node * -rn_addroute(v_arg, n_arg, head, treenodes) - void *v_arg, *n_arg; - struct radix_node_head *head; - struct radix_node treenodes[2]; +rn_addroute(void *v_arg, void *n_arg, struct radix_node_head *head, + struct radix_node treenodes[2]) { caddr_t v = (caddr_t)v_arg, netmask = (caddr_t)n_arg; - register struct radix_node *t, *x = 0, *tt; + struct radix_node *t, *x = 0, *tt; struct radix_node *saved_tt, *top = head->rnh_treetop; short b = 0, b_leaf = 0; int keyduplicated; @@ -754,7 +755,7 @@ rn_addroute(v_arg, n_arg, head, treenode on2: /* Add new route to highest possible ancestor's list */ if ((netmask == 0) || (b > t->rn_bit )) - return tt; /* can't lift at all */ + return (tt); /* can't lift at all */ b_leaf = tt->rn_bit; do { x = t; @@ -778,29 +779,27 @@ on2: log(LOG_ERR, "Non-unique normal route, mask not entered\n"); #endif - return tt; + return (tt); } } else mmask = m->rm_mask; if (mmask == netmask) { m->rm_refs++; tt->rn_mklist = m; - return tt; + return (tt); } if (rn_refines(netmask, mmask) || rn_lexobetter(netmask, mmask)) break; } *mp = rn_new_radix_mask(tt, *mp); - return tt; + return (tt); } struct radix_node * -rn_delete(v_arg, netmask_arg, head) - void *v_arg, *netmask_arg; - struct radix_node_head *head; +rn_delete(void *v_arg, void *netmask_arg, struct radix_node_head *head) { - register struct radix_node *t, *p, *x, *tt; + struct radix_node *t, *p, *x, *tt; struct radix_mask *m, *saved_m, **mp; struct radix_node *dupedkey, *saved_tt, *top; caddr_t v, netmask; @@ -834,7 +833,7 @@ rn_delete(v_arg, netmask_arg, head) if (tt->rn_flags & RNF_NORMAL) { if (m->rm_leaf != tt || m->rm_refs > 0) { log(LOG_ERR, "rn_delete: inconsistent annotation\n"); - return 0; /* dangling ref could cause disaster */ + return (0); /* dangling ref could cause disaster */ } } else { if (m->rm_mask != tt->rn_mask) { @@ -986,17 +985,14 @@ out: * exit. */ static int -rn_walktree_from(h, a, m, f, w) - struct radix_node_head *h; - void *a, *m; - walktree_f_t *f; - void *w; +rn_walktree_from(struct radix_node_head *h, void *a, void *m, + walktree_f_t *f, void *w) { int error; struct radix_node *base, *next; u_char *xa = (u_char *)a; u_char *xm = (u_char *)m; - register struct radix_node *rn, *last = 0 /* shut up gcc */; + struct radix_node *rn, *last = NULL; /* shut up gcc */ int stopping = 0; int lastb; @@ -1089,18 +1085,15 @@ rn_walktree_from(h, a, m, f, w) } } - return 0; + return (0); } static int -rn_walktree(h, f, w) - struct radix_node_head *h; - walktree_f_t *f; - void *w; +rn_walktree(struct radix_node_head *h, walktree_f_t *f, void *w) { int error; struct radix_node *base, *next; - register struct radix_node *rn = h->rnh_treetop; + struct radix_node *rn = h->rnh_treetop; /* * This gets complicated because we may delete the node * while applying the function f to it, so we need to calculate @@ -1145,8 +1138,8 @@ rn_walktree(h, f, w) static int rn_inithead_internal(void **head, int off) { - register struct radix_node_head *rnh; - register struct radix_node *t, *tt, *ttt; + struct radix_node_head *rnh; + struct radix_node *t, *tt, *ttt; if (*head) return (1); R_Zalloc(rnh, struct radix_node_head *, sizeof (*rnh)); Modified: stable/9/sys/net/radix.h ============================================================================== --- stable/9/sys/net/radix.h Thu May 8 20:20:59 2014 (r265706) +++ stable/9/sys/net/radix.h Thu May 8 20:24:13 2014 (r265707) @@ -119,9 +119,9 @@ struct radix_node_head { (void *v, void *mask, struct radix_node_head *head); struct radix_node *(*rnh_delpkt) /* remove based on packet hdr */ (void *v, void *mask, struct radix_node_head *head); - struct radix_node *(*rnh_matchaddr) /* locate based on sockaddr */ + struct radix_node *(*rnh_matchaddr) /* longest match for sockaddr */ (void *v, struct radix_node_head *head); - struct radix_node *(*rnh_lookup) /* locate based on sockaddr */ + struct radix_node *(*rnh_lookup) /*exact match for sockaddr*/ (void *v, void *mask, struct radix_node_head *head); struct radix_node *(*rnh_matchpkt) /* locate based on packet hdr */ (void *v, struct radix_node_head *head); Modified: stable/9/sys/net/radix_mpath.c ============================================================================== --- stable/9/sys/net/radix_mpath.c Thu May 8 20:20:59 2014 (r265706) +++ stable/9/sys/net/radix_mpath.c Thu May 8 20:24:13 2014 (r265707) @@ -151,6 +151,7 @@ rt_mpath_deldup(struct rtentry *headrt, /* * check if we have the same key/mask/gateway on the table already. + * Assume @rt rt_key host bits are cleared according to @netmask */ int rt_mpath_conflict(struct radix_node_head *rnh, struct rtentry *rt, @@ -158,76 +159,13 @@ rt_mpath_conflict(struct radix_node_head { struct radix_node *rn, *rn1; struct rtentry *rt1; - char *p, *q, *eq; - int same, l, skip; rn = (struct radix_node *)rt; rn1 = rnh->rnh_lookup(rt_key(rt), netmask, rnh); if (!rn1 || rn1->rn_flags & RNF_ROOT) - return 0; - - /* - * unlike other functions we have in this file, we have to check - * all key/mask/gateway as rnh_lookup can match less specific entry. - */ - rt1 = (struct rtentry *)rn1; - - /* compare key. */ - if (rt_key(rt1)->sa_len != rt_key(rt)->sa_len || - bcmp(rt_key(rt1), rt_key(rt), rt_key(rt1)->sa_len)) - goto different; - - /* key was the same. compare netmask. hairy... */ - if (rt_mask(rt1) && netmask) { - skip = rnh->rnh_treetop->rn_offset; - if (rt_mask(rt1)->sa_len > netmask->sa_len) { - /* - * as rt_mask(rt1) is made optimal by radix.c, - * there must be some 1-bits on rt_mask(rt1) - * after netmask->sa_len. therefore, in - * this case, the entries are different. - */ - if (rt_mask(rt1)->sa_len > skip) - goto different; - else { - /* no bits to compare, i.e. same*/ - goto maskmatched; - } - } - - l = rt_mask(rt1)->sa_len; - if (skip > l) { - /* no bits to compare, i.e. same */ - goto maskmatched; - } - p = (char *)rt_mask(rt1); - q = (char *)netmask; - if (bcmp(p + skip, q + skip, l - skip)) - goto different; - /* - * need to go through all the bit, as netmask is not - * optimal and can contain trailing 0s - */ - eq = (char *)netmask + netmask->sa_len; - q += l; - same = 1; - while (eq > q) - if (*q++) { - same = 0; - break; - } - if (!same) - goto different; - } else if (!rt_mask(rt1) && !netmask) - ; /* no mask to compare, i.e. same */ - else { - /* one has mask and the other does not, different */ - goto different; - } - -maskmatched: + return (0); - /* key/mask were the same. compare gateway for all multipaths */ + /* key/mask are the same. compare gateway for all multipaths */ do { rt1 = (struct rtentry *)rn1; @@ -248,11 +186,10 @@ maskmatched: } /* all key/mask/gateway are the same. conflicting entry. */ - return EEXIST; + return (EEXIST); } while ((rn1 = rn_mpath_next(rn1)) != NULL); -different: - return 0; + return (0); } void Modified: stable/9/sys/net/route.c ============================================================================== --- stable/9/sys/net/route.c Thu May 8 20:20:59 2014 (r265706) +++ stable/9/sys/net/route.c Thu May 8 20:24:13 2014 (r265707) @@ -942,6 +942,57 @@ bad: return (error); } +#if 0 +int p_sockaddr(char *buf, int buflen, struct sockaddr *s); +int rt_print(char *buf, int buflen, struct rtentry *rt); + +int +p_sockaddr(char *buf, int buflen, struct sockaddr *s) +{ + void *paddr = NULL; + + switch (s->sa_family) { + case AF_INET: + paddr = &((struct sockaddr_in *)s)->sin_addr; + break; + case AF_INET6: + paddr = &((struct sockaddr_in6 *)s)->sin6_addr; + break; + } + + if (paddr == NULL) + return (0); + + if (inet_ntop(s->sa_family, paddr, buf, buflen) == NULL) + return (0); + + return (strlen(buf)); +} + +int +rt_print(char *buf, int buflen, struct rtentry *rt) +{ + struct sockaddr *addr, *mask; + int i = 0; + + addr = rt_key(rt); + mask = rt_mask(rt); + + i = p_sockaddr(buf, buflen, addr); + if (!(rt->rt_flags & RTF_HOST)) { + buf[i++] = '/'; + i += p_sockaddr(buf + i, buflen - i, mask); + } + + if (rt->rt_flags & RTF_GATEWAY) { + buf[i++] = '>'; + i += p_sockaddr(buf + i, buflen - i, rt->rt_gateway); + } + + return (i); +} +#endif + #ifdef RADIX_MPATH static int rn_mpath_update(int req, struct rt_addrinfo *info, @@ -955,10 +1006,11 @@ rn_mpath_update(int req, struct rt_addri register struct radix_node *rn; int error = 0; - rn = rnh->rnh_matchaddr(dst, rnh); + rn = rnh->rnh_lookup(dst, netmask, rnh); if (rn == NULL) return (ESRCH); rto = rt = RNTORT(rn); + rt = rt_mpath_matchgate(rt, gateway); if (rt == NULL) return (ESRCH); @@ -1538,8 +1590,7 @@ rtinit1(struct ifaddr *ifa, int cmd, int rn = rnh->rnh_lookup(dst, netmask, rnh); error = (rn == NULL || (rn->rn_flags & RNF_ROOT) || - RNTORT(rn)->rt_ifa != ifa || - !sa_equal((struct sockaddr *)rn->rn_key, dst)); + RNTORT(rn)->rt_ifa != ifa); RADIX_NODE_HEAD_RUNLOCK(rnh); if (error) { /* this is only an error if bad on ALL tables */ Modified: stable/9/sys/net/rtsock.c ============================================================================== --- stable/9/sys/net/rtsock.c Thu May 8 20:20:59 2014 (r265706) +++ stable/9/sys/net/rtsock.c Thu May 8 20:24:13 2014 (r265707) @@ -704,10 +704,24 @@ route_output(struct mbuf *m, struct sock info.rti_info[RTAX_DST]->sa_family); if (rnh == NULL) senderr(EAFNOSUPPORT); + RADIX_NODE_HEAD_RLOCK(rnh); - rt = (struct rtentry *) rnh->rnh_lookup(info.rti_info[RTAX_DST], - info.rti_info[RTAX_NETMASK], rnh); - if (rt == NULL) { /* XXX looks bogus */ + + if (info.rti_info[RTAX_NETMASK] == NULL && + rtm->rtm_type == RTM_GET) { + /* + * Provide logest prefix match for + * address lookup (no mask). + * 'route -n get addr' + */ + rt = (struct rtentry *) rnh->rnh_matchaddr( + info.rti_info[RTAX_DST], rnh); + } else + rt = (struct rtentry *) rnh->rnh_lookup( + info.rti_info[RTAX_DST], + info.rti_info[RTAX_NETMASK], rnh); + + if (rt == NULL) { RADIX_NODE_HEAD_RUNLOCK(rnh); senderr(ESRCH); } @@ -764,25 +778,6 @@ route_output(struct mbuf *m, struct sock RT_ADDREF(rt); RADIX_NODE_HEAD_RUNLOCK(rnh); - /* - * Fix for PR: 82974 - * - * RTM_CHANGE/LOCK need a perfect match, rn_lookup() - * returns a perfect match in case a netmask is - * specified. For host routes only a longest prefix - * match is returned so it is necessary to compare the - * existence of the netmask. If both have a netmask - * rnh_lookup() did a perfect match and if none of them - * have a netmask both are host routes which is also a - * perfect match. - */ - - if (rtm->rtm_type != RTM_GET && - (!rt_mask(rt) != !info.rti_info[RTAX_NETMASK])) { - RT_UNLOCK(rt); - senderr(ESRCH); - } - switch(rtm->rtm_type) { case RTM_GET: From owner-svn-src-stable@FreeBSD.ORG Thu May 8 20:27:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF713421; Thu, 8 May 2014 20:27:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DAEE2F81; Thu, 8 May 2014 20:27:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s48KR7qM072533; Thu, 8 May 2014 20:27:07 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s48KR7es072488; Thu, 8 May 2014 20:27:07 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201405082027.s48KR7es072488@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Thu, 8 May 2014 20:27:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265708 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 20:27:08 -0000 Author: melifaro Date: Thu May 8 20:27:06 2014 New Revision: 265708 URL: http://svnweb.freebsd.org/changeset/base/265708 Log: Merge r259528, r259528, r260295. r259528: Simplify contiguous mask checking. Suggested by: glebius r260228: Remove useless register variable modifiers. Do some more style(9). r260295: Change semantics for rnh_lookup() function: now it performs exact match search, regardless of netmask existance. This simplifies most of rnh_lookup() consumers. Fix panic triggered by deleting non-existent host route. PR: kern/185092 Submitted by: Nikolay Denev Modified: stable/10/sys/net/radix.c stable/10/sys/net/radix.h stable/10/sys/net/radix_mpath.c stable/10/sys/net/route.c stable/10/sys/net/rtsock.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/radix.c ============================================================================== --- stable/10/sys/net/radix.c Thu May 8 20:24:13 2014 (r265707) +++ stable/10/sys/net/radix.c Thu May 8 20:27:06 2014 (r265708) @@ -156,12 +156,10 @@ static int rn_satisfies_leaf(char *trial * Search a node in the tree matching the key. */ static struct radix_node * -rn_search(v_arg, head) - void *v_arg; - struct radix_node *head; +rn_search(void *v_arg, struct radix_node *head) { - register struct radix_node *x; - register caddr_t v; + struct radix_node *x; + caddr_t v; for (x = head, v = v_arg; x->rn_bit >= 0;) { if (x->rn_bmask & v[x->rn_offset]) @@ -177,12 +175,10 @@ rn_search(v_arg, head) * XXX note this function is used only once. */ static struct radix_node * -rn_search_m(v_arg, head, m_arg) - struct radix_node *head; - void *v_arg, *m_arg; +rn_search_m(void *v_arg, struct radix_node *head, void *m_arg) { - register struct radix_node *x; - register caddr_t v = v_arg, m = m_arg; + struct radix_node *x; + caddr_t v = v_arg, m = m_arg; for (x = head; x->rn_bit >= 0;) { if ((x->rn_bmask & m[x->rn_offset]) && @@ -191,15 +187,14 @@ rn_search_m(v_arg, head, m_arg) else x = x->rn_left; } - return x; + return (x); } int -rn_refines(m_arg, n_arg) - void *m_arg, *n_arg; +rn_refines(void *m_arg, void *n_arg) { - register caddr_t m = m_arg, n = n_arg; - register caddr_t lim, lim2 = lim = n + LEN(n); + caddr_t m = m_arg, n = n_arg; + caddr_t lim, lim2 = lim = n + LEN(n); int longer = LEN(n++) - LEN(m++); int masks_are_equal = 1; @@ -207,50 +202,71 @@ rn_refines(m_arg, n_arg) lim -= longer; while (n < lim) { if (*n & ~(*m)) - return 0; + return (0); if (*n++ != *m++) masks_are_equal = 0; } while (n < lim2) if (*n++) - return 0; + return (0); if (masks_are_equal && (longer < 0)) for (lim2 = m - longer; m < lim2; ) if (*m++) - return 1; + return (1); return (!masks_are_equal); } +/* + * Search for exact match in given @head. + * Assume host bits are cleared in @v_arg if @m_arg is not NULL + * Note that prefixes with /32 or /128 masks are treated differently + * from host routes. + */ struct radix_node * -rn_lookup(v_arg, m_arg, head) - void *v_arg, *m_arg; - struct radix_node_head *head; +rn_lookup(void *v_arg, void *m_arg, struct radix_node_head *head) { - register struct radix_node *x; - caddr_t netmask = 0; + struct radix_node *x; + caddr_t netmask; - if (m_arg) { + if (m_arg != NULL) { + /* + * Most common case: search exact prefix/mask + */ x = rn_addmask_r(m_arg, head->rnh_masks, 1, head->rnh_treetop->rn_offset); - if (x == 0) - return (0); + if (x == NULL) + return (NULL); netmask = x->rn_key; - } - x = rn_match(v_arg, head); - if (x && netmask) { - while (x && x->rn_mask != netmask) + + x = rn_match(v_arg, head); + + while (x != NULL && x->rn_mask != netmask) x = x->rn_dupedkey; + + return (x); } - return x; + + /* + * Search for host address. + */ + if ((x = rn_match(v_arg, head)) == NULL) + return (NULL); + + /* Check if found key is the same */ + if (LEN(x->rn_key) != LEN(v_arg) || bcmp(x->rn_key, v_arg, LEN(v_arg))) + return (NULL); + + /* Check if this is not host route */ + if (x->rn_mask != NULL) + return (NULL); + + return (x); } static int -rn_satisfies_leaf(trial, leaf, skip) - char *trial; - register struct radix_node *leaf; - int skip; +rn_satisfies_leaf(char *trial, struct radix_node *leaf, int skip) { - register char *cp = trial, *cp2 = leaf->rn_key, *cp3 = leaf->rn_mask; + char *cp = trial, *cp2 = leaf->rn_key, *cp3 = leaf->rn_mask; char *cplim; int length = min(LEN(cp), LEN(cp2)); @@ -261,22 +277,23 @@ rn_satisfies_leaf(trial, leaf, skip) cplim = cp + length; cp3 += skip; cp2 += skip; for (cp += skip; cp < cplim; cp++, cp2++, cp3++) if ((*cp ^ *cp2) & *cp3) - return 0; - return 1; + return (0); + return (1); } +/* + * Search for longest-prefix match in given @head + */ struct radix_node * -rn_match(v_arg, head) - void *v_arg; - struct radix_node_head *head; +rn_match(void *v_arg, struct radix_node_head *head) { caddr_t v = v_arg; - register struct radix_node *t = head->rnh_treetop, *x; - register caddr_t cp = v, cp2; + struct radix_node *t = head->rnh_treetop, *x; + caddr_t cp = v, cp2; caddr_t cplim; struct radix_node *saved_t, *top = t; int off = t->rn_offset, vlen = LEN(cp), matched_off; - register int test, b, rn_bit; + int test, b, rn_bit; /* * Open code rn_search(v, top) to avoid overhead of extra @@ -314,7 +331,7 @@ rn_match(v_arg, head) */ if (t->rn_flags & RNF_ROOT) t = t->rn_dupedkey; - return t; + return (t); on1: test = (*cp ^ *cp2) & 0xff; /* find first bit that differs */ for (b = 7; (test >>= 1) > 0;) @@ -335,13 +352,13 @@ on1: */ if (t->rn_flags & RNF_NORMAL) { if (rn_bit <= t->rn_bit) - return t; + return (t); } else if (rn_satisfies_leaf(v, t, matched_off)) - return t; + return (t); t = saved_t; /* start searching up the tree */ do { - register struct radix_mask *m; + struct radix_mask *m; t = t->rn_parent; m = t->rn_mklist; /* @@ -360,12 +377,12 @@ on1: while (x && x->rn_mask != m->rm_mask) x = x->rn_dupedkey; if (x && rn_satisfies_leaf(v, x, off)) - return x; + return (x); } m = m->rm_mklist; } } while (t != top); - return 0; + return (0); } #ifdef RN_DEBUG @@ -387,12 +404,9 @@ int rn_debug = 1; */ static struct radix_node * -rn_newpair(v, b, nodes) - void *v; - int b; - struct radix_node nodes[2]; +rn_newpair(void *v, int b, struct radix_node nodes[2]) { - register struct radix_node *tt = nodes, *t = tt + 1; + struct radix_node *tt = nodes, *t = tt + 1; t->rn_bit = b; t->rn_bmask = 0x80 >> (b & 7); t->rn_left = tt; @@ -416,44 +430,39 @@ rn_newpair(v, b, nodes) tt->rn_ybro = rn_clist; rn_clist = tt; #endif - return t; + return (t); } static struct radix_node * -rn_insert(v_arg, head, dupentry, nodes) - void *v_arg; - struct radix_node_head *head; - int *dupentry; - struct radix_node nodes[2]; +rn_insert(void *v_arg, struct radix_node_head *head, int *dupentry, + struct radix_node nodes[2]) { caddr_t v = v_arg; struct radix_node *top = head->rnh_treetop; int head_off = top->rn_offset, vlen = LEN(v); - register struct radix_node *t = rn_search(v_arg, top); - register caddr_t cp = v + head_off; - register int b; - struct radix_node *tt; + struct radix_node *t = rn_search(v_arg, top); + caddr_t cp = v + head_off; + int b; + struct radix_node *p, *tt, *x; /* * Find first bit at which v and t->rn_key differ */ - { - register caddr_t cp2 = t->rn_key + head_off; - register int cmp_res; + caddr_t cp2 = t->rn_key + head_off; + int cmp_res; caddr_t cplim = v + vlen; while (cp < cplim) if (*cp2++ != *cp++) goto on1; *dupentry = 1; - return t; + return (t); on1: *dupentry = 0; cmp_res = (cp[-1] ^ cp2[-1]) & 0xff; for (b = (cp - v) << 3; cmp_res; b--) cmp_res >>= 1; - } - { - register struct radix_node *p, *x = top; + + x = top; cp = v; do { p = x; @@ -485,20 +494,19 @@ on1: if (rn_debug) log(LOG_DEBUG, "rn_insert: Coming Out:\n"), traverse(p); #endif - } return (tt); } struct radix_node * rn_addmask_r(void *arg, struct radix_node_head *maskhead, int search, int skip) { - caddr_t netmask = (caddr_t)arg; - register struct radix_node *x; - register caddr_t cp, cplim; - register int b = 0, mlen, j; + unsigned char *netmask = arg; + unsigned char *cp, *cplim; + struct radix_node *x; + int b = 0, mlen, j; int maskduplicated, isnormal; struct radix_node *saved_x; - char addmask_key[RADIX_MAX_KEY_LEN]; + unsigned char addmask_key[RADIX_MAX_KEY_LEN]; if ((mlen = LEN(netmask)) > RADIX_MAX_KEY_LEN) mlen = RADIX_MAX_KEY_LEN; @@ -540,20 +548,18 @@ rn_addmask_r(void *arg, struct radix_nod * Calculate index of mask, and check for normalcy. * First find the first byte with a 0 bit, then if there are * more bits left (remember we already trimmed the trailing 0's), - * the pattern must be one of those in normal_chars[], or we have + * the bits should be contiguous, otherwise we have got * a non-contiguous mask. */ +#define CONTIG(_c) (((~(_c) + 1) & (_c)) == (unsigned char)(~(_c) + 1)) cplim = netmask + mlen; isnormal = 1; for (cp = netmask + skip; (cp < cplim) && *(u_char *)cp == 0xff;) cp++; if (cp != cplim) { - static char normal_chars[] = { - 0, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff}; - for (j = 0x80; (j & *cp) != 0; j >>= 1) b++; - if (*cp != normal_chars[b] || cp != (cplim - 1)) + if (!CONTIG(*cp) || cp != (cplim - 1)) isnormal = 0; } b += (cp - netmask) << 3; @@ -581,29 +587,26 @@ rn_addmask(void *n_arg, int search, int } static int /* XXX: arbitrary ordering for non-contiguous masks */ -rn_lexobetter(m_arg, n_arg) - void *m_arg, *n_arg; +rn_lexobetter(void *m_arg, void *n_arg) { - register u_char *mp = m_arg, *np = n_arg, *lim; + u_char *mp = m_arg, *np = n_arg, *lim; if (LEN(mp) > LEN(np)) - return 1; /* not really, but need to check longer one first */ + return (1); /* not really, but need to check longer one first */ if (LEN(mp) == LEN(np)) for (lim = mp + LEN(mp); mp < lim;) if (*mp++ > *np++) - return 1; - return 0; + return (1); + return (0); } static struct radix_mask * -rn_new_radix_mask(tt, next) - register struct radix_node *tt; - register struct radix_mask *next; +rn_new_radix_mask(struct radix_node *tt, struct radix_mask *next) { - register struct radix_mask *m; + struct radix_mask *m; R_Malloc(m, struct radix_mask *, sizeof (struct radix_mask)); - if (m == 0) { + if (m == NULL) { log(LOG_ERR, "Failed to allocate route mask\n"); return (0); } @@ -616,17 +619,15 @@ rn_new_radix_mask(tt, next) m->rm_mask = tt->rn_mask; m->rm_mklist = next; tt->rn_mklist = m; - return m; + return (m); } struct radix_node * -rn_addroute(v_arg, n_arg, head, treenodes) - void *v_arg, *n_arg; - struct radix_node_head *head; - struct radix_node treenodes[2]; +rn_addroute(void *v_arg, void *n_arg, struct radix_node_head *head, + struct radix_node treenodes[2]) { caddr_t v = (caddr_t)v_arg, netmask = (caddr_t)n_arg; - register struct radix_node *t, *x = 0, *tt; + struct radix_node *t, *x = 0, *tt; struct radix_node *saved_tt, *top = head->rnh_treetop; short b = 0, b_leaf = 0; int keyduplicated; @@ -754,7 +755,7 @@ rn_addroute(v_arg, n_arg, head, treenode on2: /* Add new route to highest possible ancestor's list */ if ((netmask == 0) || (b > t->rn_bit )) - return tt; /* can't lift at all */ + return (tt); /* can't lift at all */ b_leaf = tt->rn_bit; do { x = t; @@ -778,29 +779,27 @@ on2: log(LOG_ERR, "Non-unique normal route, mask not entered\n"); #endif - return tt; + return (tt); } } else mmask = m->rm_mask; if (mmask == netmask) { m->rm_refs++; tt->rn_mklist = m; - return tt; + return (tt); } if (rn_refines(netmask, mmask) || rn_lexobetter(netmask, mmask)) break; } *mp = rn_new_radix_mask(tt, *mp); - return tt; + return (tt); } struct radix_node * -rn_delete(v_arg, netmask_arg, head) - void *v_arg, *netmask_arg; - struct radix_node_head *head; +rn_delete(void *v_arg, void *netmask_arg, struct radix_node_head *head) { - register struct radix_node *t, *p, *x, *tt; + struct radix_node *t, *p, *x, *tt; struct radix_mask *m, *saved_m, **mp; struct radix_node *dupedkey, *saved_tt, *top; caddr_t v, netmask; @@ -834,7 +833,7 @@ rn_delete(v_arg, netmask_arg, head) if (tt->rn_flags & RNF_NORMAL) { if (m->rm_leaf != tt || m->rm_refs > 0) { log(LOG_ERR, "rn_delete: inconsistent annotation\n"); - return 0; /* dangling ref could cause disaster */ + return (0); /* dangling ref could cause disaster */ } } else { if (m->rm_mask != tt->rn_mask) { @@ -986,17 +985,14 @@ out: * exit. */ static int -rn_walktree_from(h, a, m, f, w) - struct radix_node_head *h; - void *a, *m; - walktree_f_t *f; - void *w; +rn_walktree_from(struct radix_node_head *h, void *a, void *m, + walktree_f_t *f, void *w) { int error; struct radix_node *base, *next; u_char *xa = (u_char *)a; u_char *xm = (u_char *)m; - register struct radix_node *rn, *last = 0 /* shut up gcc */; + struct radix_node *rn, *last = NULL; /* shut up gcc */ int stopping = 0; int lastb; @@ -1089,18 +1085,15 @@ rn_walktree_from(h, a, m, f, w) } } - return 0; + return (0); } static int -rn_walktree(h, f, w) - struct radix_node_head *h; - walktree_f_t *f; - void *w; +rn_walktree(struct radix_node_head *h, walktree_f_t *f, void *w) { int error; struct radix_node *base, *next; - register struct radix_node *rn = h->rnh_treetop; + struct radix_node *rn = h->rnh_treetop; /* * This gets complicated because we may delete the node * while applying the function f to it, so we need to calculate @@ -1145,8 +1138,8 @@ rn_walktree(h, f, w) static int rn_inithead_internal(void **head, int off) { - register struct radix_node_head *rnh; - register struct radix_node *t, *tt, *ttt; + struct radix_node_head *rnh; + struct radix_node *t, *tt, *ttt; if (*head) return (1); R_Zalloc(rnh, struct radix_node_head *, sizeof (*rnh)); Modified: stable/10/sys/net/radix.h ============================================================================== --- stable/10/sys/net/radix.h Thu May 8 20:24:13 2014 (r265707) +++ stable/10/sys/net/radix.h Thu May 8 20:27:06 2014 (r265708) @@ -119,9 +119,9 @@ struct radix_node_head { (void *v, void *mask, struct radix_node_head *head); struct radix_node *(*rnh_delpkt) /* remove based on packet hdr */ (void *v, void *mask, struct radix_node_head *head); - struct radix_node *(*rnh_matchaddr) /* locate based on sockaddr */ + struct radix_node *(*rnh_matchaddr) /* longest match for sockaddr */ (void *v, struct radix_node_head *head); - struct radix_node *(*rnh_lookup) /* locate based on sockaddr */ + struct radix_node *(*rnh_lookup) /*exact match for sockaddr*/ (void *v, void *mask, struct radix_node_head *head); struct radix_node *(*rnh_matchpkt) /* locate based on packet hdr */ (void *v, struct radix_node_head *head); Modified: stable/10/sys/net/radix_mpath.c ============================================================================== --- stable/10/sys/net/radix_mpath.c Thu May 8 20:24:13 2014 (r265707) +++ stable/10/sys/net/radix_mpath.c Thu May 8 20:27:06 2014 (r265708) @@ -151,6 +151,7 @@ rt_mpath_deldup(struct rtentry *headrt, /* * check if we have the same key/mask/gateway on the table already. + * Assume @rt rt_key host bits are cleared according to @netmask */ int rt_mpath_conflict(struct radix_node_head *rnh, struct rtentry *rt, @@ -158,76 +159,13 @@ rt_mpath_conflict(struct radix_node_head { struct radix_node *rn, *rn1; struct rtentry *rt1; - char *p, *q, *eq; - int same, l, skip; rn = (struct radix_node *)rt; rn1 = rnh->rnh_lookup(rt_key(rt), netmask, rnh); if (!rn1 || rn1->rn_flags & RNF_ROOT) - return 0; - - /* - * unlike other functions we have in this file, we have to check - * all key/mask/gateway as rnh_lookup can match less specific entry. - */ - rt1 = (struct rtentry *)rn1; - - /* compare key. */ - if (rt_key(rt1)->sa_len != rt_key(rt)->sa_len || - bcmp(rt_key(rt1), rt_key(rt), rt_key(rt1)->sa_len)) - goto different; - - /* key was the same. compare netmask. hairy... */ - if (rt_mask(rt1) && netmask) { - skip = rnh->rnh_treetop->rn_offset; - if (rt_mask(rt1)->sa_len > netmask->sa_len) { - /* - * as rt_mask(rt1) is made optimal by radix.c, - * there must be some 1-bits on rt_mask(rt1) - * after netmask->sa_len. therefore, in - * this case, the entries are different. - */ - if (rt_mask(rt1)->sa_len > skip) - goto different; - else { - /* no bits to compare, i.e. same*/ - goto maskmatched; - } - } - - l = rt_mask(rt1)->sa_len; - if (skip > l) { - /* no bits to compare, i.e. same */ - goto maskmatched; - } - p = (char *)rt_mask(rt1); - q = (char *)netmask; - if (bcmp(p + skip, q + skip, l - skip)) - goto different; - /* - * need to go through all the bit, as netmask is not - * optimal and can contain trailing 0s - */ - eq = (char *)netmask + netmask->sa_len; - q += l; - same = 1; - while (eq > q) - if (*q++) { - same = 0; - break; - } - if (!same) - goto different; - } else if (!rt_mask(rt1) && !netmask) - ; /* no mask to compare, i.e. same */ - else { - /* one has mask and the other does not, different */ - goto different; - } - -maskmatched: + return (0); - /* key/mask were the same. compare gateway for all multipaths */ + /* key/mask are the same. compare gateway for all multipaths */ do { rt1 = (struct rtentry *)rn1; @@ -248,11 +186,10 @@ maskmatched: } /* all key/mask/gateway are the same. conflicting entry. */ - return EEXIST; + return (EEXIST); } while ((rn1 = rn_mpath_next(rn1)) != NULL); -different: - return 0; + return (0); } void Modified: stable/10/sys/net/route.c ============================================================================== --- stable/10/sys/net/route.c Thu May 8 20:24:13 2014 (r265707) +++ stable/10/sys/net/route.c Thu May 8 20:27:06 2014 (r265708) @@ -979,6 +979,57 @@ bad: return (error); } +#if 0 +int p_sockaddr(char *buf, int buflen, struct sockaddr *s); +int rt_print(char *buf, int buflen, struct rtentry *rt); + +int +p_sockaddr(char *buf, int buflen, struct sockaddr *s) +{ + void *paddr = NULL; + + switch (s->sa_family) { + case AF_INET: + paddr = &((struct sockaddr_in *)s)->sin_addr; + break; + case AF_INET6: + paddr = &((struct sockaddr_in6 *)s)->sin6_addr; + break; + } + + if (paddr == NULL) + return (0); + + if (inet_ntop(s->sa_family, paddr, buf, buflen) == NULL) + return (0); + + return (strlen(buf)); +} + +int +rt_print(char *buf, int buflen, struct rtentry *rt) +{ + struct sockaddr *addr, *mask; + int i = 0; + + addr = rt_key(rt); + mask = rt_mask(rt); + + i = p_sockaddr(buf, buflen, addr); + if (!(rt->rt_flags & RTF_HOST)) { + buf[i++] = '/'; + i += p_sockaddr(buf + i, buflen - i, mask); + } + + if (rt->rt_flags & RTF_GATEWAY) { + buf[i++] = '>'; + i += p_sockaddr(buf + i, buflen - i, rt->rt_gateway); + } + + return (i); +} +#endif + #ifdef RADIX_MPATH static int rn_mpath_update(int req, struct rt_addrinfo *info, @@ -992,10 +1043,11 @@ rn_mpath_update(int req, struct rt_addri register struct radix_node *rn; int error = 0; - rn = rnh->rnh_matchaddr(dst, rnh); + rn = rnh->rnh_lookup(dst, netmask, rnh); if (rn == NULL) return (ESRCH); rto = rt = RNTORT(rn); + rt = rt_mpath_matchgate(rt, gateway); if (rt == NULL) return (ESRCH); @@ -1555,8 +1607,7 @@ rtinit1(struct ifaddr *ifa, int cmd, int rn = rnh->rnh_lookup(dst, netmask, rnh); error = (rn == NULL || (rn->rn_flags & RNF_ROOT) || - RNTORT(rn)->rt_ifa != ifa || - !sa_equal((struct sockaddr *)rn->rn_key, dst)); + RNTORT(rn)->rt_ifa != ifa); RADIX_NODE_HEAD_RUNLOCK(rnh); if (error) { /* this is only an error if bad on ALL tables */ Modified: stable/10/sys/net/rtsock.c ============================================================================== --- stable/10/sys/net/rtsock.c Thu May 8 20:24:13 2014 (r265707) +++ stable/10/sys/net/rtsock.c Thu May 8 20:27:06 2014 (r265708) @@ -725,10 +725,24 @@ route_output(struct mbuf *m, struct sock info.rti_info[RTAX_DST]->sa_family); if (rnh == NULL) senderr(EAFNOSUPPORT); + RADIX_NODE_HEAD_RLOCK(rnh); - rt = (struct rtentry *) rnh->rnh_lookup(info.rti_info[RTAX_DST], - info.rti_info[RTAX_NETMASK], rnh); - if (rt == NULL) { /* XXX looks bogus */ + + if (info.rti_info[RTAX_NETMASK] == NULL && + rtm->rtm_type == RTM_GET) { + /* + * Provide logest prefix match for + * address lookup (no mask). + * 'route -n get addr' + */ + rt = (struct rtentry *) rnh->rnh_matchaddr( + info.rti_info[RTAX_DST], rnh); + } else + rt = (struct rtentry *) rnh->rnh_lookup( + info.rti_info[RTAX_DST], + info.rti_info[RTAX_NETMASK], rnh); + + if (rt == NULL) { RADIX_NODE_HEAD_RUNLOCK(rnh); senderr(ESRCH); } @@ -785,25 +799,6 @@ route_output(struct mbuf *m, struct sock RT_ADDREF(rt); RADIX_NODE_HEAD_RUNLOCK(rnh); - /* - * Fix for PR: 82974 - * - * RTM_CHANGE/LOCK need a perfect match, rn_lookup() - * returns a perfect match in case a netmask is - * specified. For host routes only a longest prefix - * match is returned so it is necessary to compare the - * existence of the netmask. If both have a netmask - * rnh_lookup() did a perfect match and if none of them - * have a netmask both are host routes which is also a - * perfect match. - */ - - if (rtm->rtm_type != RTM_GET && - (!rt_mask(rt) != !info.rti_info[RTAX_NETMASK])) { - RT_UNLOCK(rt); - senderr(ESRCH); - } - switch(rtm->rtm_type) { case RTM_GET: From owner-svn-src-stable@FreeBSD.ORG Thu May 8 20:33:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B95287D9; Thu, 8 May 2014 20:33:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99A4C95; Thu, 8 May 2014 20:33:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s48KXmMA092820; Thu, 8 May 2014 20:33:48 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s48KXleJ092791; Thu, 8 May 2014 20:33:47 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201405082033.s48KXleJ092791@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Thu, 8 May 2014 20:33:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265710 - stable/9/sys/net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 20:33:48 -0000 Author: melifaro Date: Thu May 8 20:33:47 2014 New Revision: 265710 URL: http://svnweb.freebsd.org/changeset/base/265710 Log: Merge r260379, r260460. r260379: Partially fix IPv4 interface routes deletion in RADIX_MPATH. Noticed by: Nikolay Denev r260460: Constanly use RT_ALL_FIBS everywhere instead of -1. Modified: stable/9/sys/net/radix_mpath.c stable/9/sys/net/route.c stable/9/sys/net/route.h stable/9/sys/net/rtsock.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/net/ (props changed) Modified: stable/9/sys/net/radix_mpath.c ============================================================================== --- stable/9/sys/net/radix_mpath.c Thu May 8 20:28:22 2014 (r265709) +++ stable/9/sys/net/radix_mpath.c Thu May 8 20:33:47 2014 (r265710) @@ -112,11 +112,16 @@ rt_mpath_matchgate(struct rtentry *rt, s if (rt->rt_gateway->sa_family == AF_LINK) { if (!memcmp(rt->rt_ifa->ifa_addr, gate, gate->sa_len)) break; - } else { - if (rt->rt_gateway->sa_len == gate->sa_len && - !memcmp(rt->rt_gateway, gate, gate->sa_len)) - break; } + + /* + * Check for other options: + * 1) Routes with 'real' IPv4/IPv6 gateway + * 2) Loopback host routes (another AF_LINK/sockadd_dl check) + * */ + if (rt->rt_gateway->sa_len == gate->sa_len && + !memcmp(rt->rt_gateway, gate, gate->sa_len)) + break; } while ((rn = rn_mpath_next(rn)) != NULL); return (struct rtentry *)rn; Modified: stable/9/sys/net/route.c ============================================================================== --- stable/9/sys/net/route.c Thu May 8 20:28:22 2014 (r265709) +++ stable/9/sys/net/route.c Thu May 8 20:33:47 2014 (r265710) @@ -1515,7 +1515,7 @@ rtinit1(struct ifaddr *ifa, int cmd, int fibnum = RT_DEFAULT_FIB; break; } - if (fibnum == -1) { + if (fibnum == RT_ALL_FIBS) { if (rt_add_addr_allfibs == 0 && cmd == (int)RTM_ADD) { startfib = endfib = curthread->td_proc->p_fibnum; } else { @@ -1564,10 +1564,10 @@ rtinit1(struct ifaddr *ifa, int cmd, int /* this table doesn't exist but others might */ continue; RADIX_NODE_HEAD_RLOCK(rnh); + rn = rnh->rnh_lookup(dst, netmask, rnh); #ifdef RADIX_MPATH if (rn_mpath_capable(rnh)) { - rn = rnh->rnh_matchaddr(dst, rnh); if (rn == NULL) error = ESRCH; else { @@ -1581,13 +1581,11 @@ rtinit1(struct ifaddr *ifa, int cmd, int */ rt = rt_mpath_matchgate(rt, ifa->ifa_addr); - if (!rt) + if (rt == NULL) error = ESRCH; } } - else #endif - rn = rnh->rnh_lookup(dst, netmask, rnh); error = (rn == NULL || (rn->rn_flags & RNF_ROOT) || RNTORT(rn)->rt_ifa != ifa); @@ -1721,7 +1719,7 @@ rtinit1(struct ifaddr *ifa, int cmd, int int rtinit_fib(struct ifaddr *ifa, int cmd, int flags) { - return (rtinit1(ifa, cmd, flags, -1)); + return (rtinit1(ifa, cmd, flags, RT_ALL_FIBS)); } #endif @@ -1745,7 +1743,7 @@ rtinit(struct ifaddr *ifa, int cmd, int case AF_INET6: case AF_INET: /* We do support multiple FIBs. */ - fib = -1; + fib = RT_ALL_FIBS; break; } return (rtinit1(ifa, cmd, flags, fib)); Modified: stable/9/sys/net/route.h ============================================================================== --- stable/9/sys/net/route.h Thu May 8 20:28:22 2014 (r265709) +++ stable/9/sys/net/route.h Thu May 8 20:33:47 2014 (r265710) @@ -92,7 +92,8 @@ struct rt_metrics { #define RTTTOPRHZ(r) ((r) / (RTM_RTTUNIT / PR_SLOWHZ)) #define RT_DEFAULT_FIB 0 /* Explicitly mark fib=0 restricted cases */ -extern u_int rt_numfibs; /* number fo usable routing tables */ +#define RT_ALL_FIBS -1 /* Announce event for every fib */ +extern u_int rt_numfibs; /* number of usable routing tables */ /* * XXX kernel function pointer `rt_output' is visible to applications. */ Modified: stable/9/sys/net/rtsock.c ============================================================================== --- stable/9/sys/net/rtsock.c Thu May 8 20:28:22 2014 (r265709) +++ stable/9/sys/net/rtsock.c Thu May 8 20:33:47 2014 (r265710) @@ -154,7 +154,6 @@ static struct sockaddr sa_zero = { siz * notification to a socket bound to a particular FIB. */ #define RTS_FILTER_FIB M_PROTO8 -#define RTS_ALLFIBS -1 static struct { int ip_count; /* attached w/ AF_INET */ @@ -1218,7 +1217,7 @@ rt_missmsg_fib(int type, struct rt_addri if (m == NULL) return; - if (fibnum != RTS_ALLFIBS) { + if (fibnum != RT_ALL_FIBS) { KASSERT(fibnum >= 0 && fibnum < rt_numfibs, ("%s: fibnum out " "of range 0 <= %d < %d", __func__, fibnum, rt_numfibs)); M_SETFIB(m, fibnum); @@ -1236,7 +1235,7 @@ void rt_missmsg(int type, struct rt_addrinfo *rtinfo, int flags, int error) { - rt_missmsg_fib(type, rtinfo, flags, error, RTS_ALLFIBS); + rt_missmsg_fib(type, rtinfo, flags, error, RT_ALL_FIBS); } /* @@ -1332,7 +1331,7 @@ rt_newaddrmsg_fib(int cmd, struct ifaddr rtm->rtm_errno = error; rtm->rtm_addrs = info.rti_addrs; } - if (fibnum != RTS_ALLFIBS) { + if (fibnum != RT_ALL_FIBS) { KASSERT(fibnum >= 0 && fibnum < rt_numfibs, ("%s: " "fibnum out of range 0 <= %d < %d", __func__, fibnum, rt_numfibs)); @@ -1347,7 +1346,7 @@ void rt_newaddrmsg(int cmd, struct ifaddr *ifa, int error, struct rtentry *rt) { - rt_newaddrmsg_fib(cmd, ifa, error, rt, RTS_ALLFIBS); + rt_newaddrmsg_fib(cmd, ifa, error, rt, RT_ALL_FIBS); } /* @@ -1818,7 +1817,7 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS) if (namelen == 3) fib = req->td->td_proc->p_fibnum; else if (namelen == 4) - fib = (name[3] == -1) ? + fib = (name[3] == RT_ALL_FIBS) ? req->td->td_proc->p_fibnum : name[3]; else return ((namelen < 3) ? EISDIR : ENOTDIR); From owner-svn-src-stable@FreeBSD.ORG Thu May 8 20:41:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC2E6D51; Thu, 8 May 2014 20:41:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC9C8108; Thu, 8 May 2014 20:41:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s48KfeKQ016205; Thu, 8 May 2014 20:41:40 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s48Kfenn016182; Thu, 8 May 2014 20:41:40 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201405082041.s48Kfenn016182@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Thu, 8 May 2014 20:41:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265711 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 20:41:41 -0000 Author: melifaro Date: Thu May 8 20:41:39 2014 New Revision: 265711 URL: http://svnweb.freebsd.org/changeset/base/265711 Log: Merge r260379, r260460. r260379: Partially fix IPv4 interface routes deletion in RADIX_MPATH. Noticed by: Nikolay Denev r260460: Constanly use RT_ALL_FIBS everywhere instead of -1. Modified: stable/10/sys/net/radix_mpath.c stable/10/sys/net/route.c stable/10/sys/net/route.h stable/10/sys/net/rtsock.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/radix_mpath.c ============================================================================== --- stable/10/sys/net/radix_mpath.c Thu May 8 20:33:47 2014 (r265710) +++ stable/10/sys/net/radix_mpath.c Thu May 8 20:41:39 2014 (r265711) @@ -112,11 +112,16 @@ rt_mpath_matchgate(struct rtentry *rt, s if (rt->rt_gateway->sa_family == AF_LINK) { if (!memcmp(rt->rt_ifa->ifa_addr, gate, gate->sa_len)) break; - } else { - if (rt->rt_gateway->sa_len == gate->sa_len && - !memcmp(rt->rt_gateway, gate, gate->sa_len)) - break; } + + /* + * Check for other options: + * 1) Routes with 'real' IPv4/IPv6 gateway + * 2) Loopback host routes (another AF_LINK/sockadd_dl check) + * */ + if (rt->rt_gateway->sa_len == gate->sa_len && + !memcmp(rt->rt_gateway, gate, gate->sa_len)) + break; } while ((rn = rn_mpath_next(rn)) != NULL); return (struct rtentry *)rn; Modified: stable/10/sys/net/route.c ============================================================================== --- stable/10/sys/net/route.c Thu May 8 20:33:47 2014 (r265710) +++ stable/10/sys/net/route.c Thu May 8 20:41:39 2014 (r265711) @@ -1532,7 +1532,7 @@ rtinit1(struct ifaddr *ifa, int cmd, int fibnum = RT_DEFAULT_FIB; break; } - if (fibnum == -1) { + if (fibnum == RT_ALL_FIBS) { if (rt_add_addr_allfibs == 0 && cmd == (int)RTM_ADD) { startfib = endfib = curthread->td_proc->p_fibnum; } else { @@ -1581,10 +1581,10 @@ rtinit1(struct ifaddr *ifa, int cmd, int /* this table doesn't exist but others might */ continue; RADIX_NODE_HEAD_RLOCK(rnh); + rn = rnh->rnh_lookup(dst, netmask, rnh); #ifdef RADIX_MPATH if (rn_mpath_capable(rnh)) { - rn = rnh->rnh_matchaddr(dst, rnh); if (rn == NULL) error = ESRCH; else { @@ -1598,13 +1598,11 @@ rtinit1(struct ifaddr *ifa, int cmd, int */ rt = rt_mpath_matchgate(rt, ifa->ifa_addr); - if (!rt) + if (rt == NULL) error = ESRCH; } } - else #endif - rn = rnh->rnh_lookup(dst, netmask, rnh); error = (rn == NULL || (rn->rn_flags & RNF_ROOT) || RNTORT(rn)->rt_ifa != ifa); @@ -1753,7 +1751,7 @@ rtinit(struct ifaddr *ifa, int cmd, int case AF_INET6: case AF_INET: /* We do support multiple FIBs. */ - fib = -1; + fib = RT_ALL_FIBS; break; } return (rtinit1(ifa, cmd, flags, fib)); Modified: stable/10/sys/net/route.h ============================================================================== --- stable/10/sys/net/route.h Thu May 8 20:33:47 2014 (r265710) +++ stable/10/sys/net/route.h Thu May 8 20:41:39 2014 (r265711) @@ -83,7 +83,8 @@ struct rt_metrics { #define RTTTOPRHZ(r) ((r) / (RTM_RTTUNIT / PR_SLOWHZ)) #define RT_DEFAULT_FIB 0 /* Explicitly mark fib=0 restricted cases */ -extern u_int rt_numfibs; /* number fo usable routing tables */ +#define RT_ALL_FIBS -1 /* Announce event for every fib */ +extern u_int rt_numfibs; /* number of usable routing tables */ /* * We distinguish between routes to hosts and routes to networks, Modified: stable/10/sys/net/rtsock.c ============================================================================== --- stable/10/sys/net/rtsock.c Thu May 8 20:33:47 2014 (r265710) +++ stable/10/sys/net/rtsock.c Thu May 8 20:41:39 2014 (r265711) @@ -161,7 +161,6 @@ int (*carp_get_vhid_p)(struct ifaddr *); * notification to a socket bound to a particular FIB. */ #define RTS_FILTER_FIB M_PROTO8 -#define RTS_ALLFIBS -1 static struct { int ip_count; /* attached w/ AF_INET */ @@ -1281,7 +1280,7 @@ rt_missmsg_fib(int type, struct rt_addri if (m == NULL) return; - if (fibnum != RTS_ALLFIBS) { + if (fibnum != RT_ALL_FIBS) { KASSERT(fibnum >= 0 && fibnum < rt_numfibs, ("%s: fibnum out " "of range 0 <= %d < %d", __func__, fibnum, rt_numfibs)); M_SETFIB(m, fibnum); @@ -1299,7 +1298,7 @@ void rt_missmsg(int type, struct rt_addrinfo *rtinfo, int flags, int error) { - rt_missmsg_fib(type, rtinfo, flags, error, RTS_ALLFIBS); + rt_missmsg_fib(type, rtinfo, flags, error, RT_ALL_FIBS); } /* @@ -1395,7 +1394,7 @@ rt_newaddrmsg_fib(int cmd, struct ifaddr rtm->rtm_errno = error; rtm->rtm_addrs = info.rti_addrs; } - if (fibnum != RTS_ALLFIBS) { + if (fibnum != RT_ALL_FIBS) { KASSERT(fibnum >= 0 && fibnum < rt_numfibs, ("%s: " "fibnum out of range 0 <= %d < %d", __func__, fibnum, rt_numfibs)); @@ -1410,7 +1409,7 @@ void rt_newaddrmsg(int cmd, struct ifaddr *ifa, int error, struct rtentry *rt) { - rt_newaddrmsg_fib(cmd, ifa, error, rt, RTS_ALLFIBS); + rt_newaddrmsg_fib(cmd, ifa, error, rt, RT_ALL_FIBS); } /* @@ -1907,7 +1906,7 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS) if (namelen == 3) fib = req->td->td_proc->p_fibnum; else if (namelen == 4) - fib = (name[3] == -1) ? + fib = (name[3] == RT_ALL_FIBS) ? req->td->td_proc->p_fibnum : name[3]; else return ((namelen < 3) ? EISDIR : ENOTDIR); From owner-svn-src-stable@FreeBSD.ORG Thu May 8 20:52:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DFA1A566; Thu, 8 May 2014 20:52:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CBEF4257; Thu, 8 May 2014 20:52:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s48KqPon046045; Thu, 8 May 2014 20:52:25 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s48KqPe2046033; Thu, 8 May 2014 20:52:25 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201405082052.s48KqPe2046033@svn.freebsd.org> From: Rick Macklem Date: Thu, 8 May 2014 20:52:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265714 - in stable/10/sys/fs: nfs nfsserver X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 20:52:26 -0000 Author: rmacklem Date: Thu May 8 20:52:25 2014 New Revision: 265714 URL: http://svnweb.freebsd.org/changeset/base/265714 Log: MFC: r265252 The new draft specification for NFSv4.0 specifies that a server should either accept owner and owner_group strings that are just the digits of the uid/gid or return NFS4ERR_BADOWNER. This patch adds a sysctl vfs.nfsd.enable_stringtouid, which can be set to enable the server w.r.t. accepting numeric string. It also ensures that NFS4ERR_BADOWNER is returned if numeric uid/gid strings are not enabled. This fixes the server for recent Linux nfs4 clients that use numeric uid/gid strings by default. Modified: stable/10/sys/fs/nfs/nfs_commonsubs.c stable/10/sys/fs/nfsserver/nfs_nfsdport.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- stable/10/sys/fs/nfs/nfs_commonsubs.c Thu May 8 20:47:54 2014 (r265713) +++ stable/10/sys/fs/nfs/nfs_commonsubs.c Thu May 8 20:52:25 2014 (r265714) @@ -65,6 +65,7 @@ uid_t nfsrv_defaultuid; gid_t nfsrv_defaultgid; int nfsrv_lease = NFSRV_LEASE; int ncl_mbuf_mlen = MLEN; +int nfsd_enable_stringtouid = 0; NFSNAMEIDMUTEX; NFSSOCKMUTEX; @@ -2640,9 +2641,14 @@ nfsv4_strtouid(struct nfsrv_descript *nd /* If a string of digits and an AUTH_SYS mount, just convert it. */ str0 = str; tuid = (uid_t)strtoul(str0, &endstr, 10); - if ((endstr - str0) == len && - (nd->nd_flag & (ND_KERBV | ND_NFSCL)) == ND_NFSCL) { - *uidp = tuid; + if ((endstr - str0) == len) { + /* A numeric string. */ + if ((nd->nd_flag & ND_KERBV) == 0 && + ((nd->nd_flag & ND_NFSCL) != 0 || + nfsd_enable_stringtouid != 0)) + *uidp = tuid; + else + error = NFSERR_BADOWNER; goto out; } /* @@ -2845,9 +2851,14 @@ nfsv4_strtogid(struct nfsrv_descript *nd /* If a string of digits and an AUTH_SYS mount, just convert it. */ str0 = str; tgid = (gid_t)strtoul(str0, &endstr, 10); - if ((endstr - str0) == len && - (nd->nd_flag & (ND_KERBV | ND_NFSCL)) == ND_NFSCL) { - *gidp = tgid; + if ((endstr - str0) == len) { + /* A numeric string. */ + if ((nd->nd_flag & ND_KERBV) == 0 && + ((nd->nd_flag & ND_NFSCL) != 0 || + nfsd_enable_stringtouid != 0)) + *gidp = tgid; + else + error = NFSERR_BADOWNER; goto out; } /* Modified: stable/10/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/10/sys/fs/nfsserver/nfs_nfsdport.c Thu May 8 20:47:54 2014 (r265713) +++ stable/10/sys/fs/nfsserver/nfs_nfsdport.c Thu May 8 20:52:25 2014 (r265714) @@ -80,6 +80,7 @@ static int nfs_commit_blks; static int nfs_commit_miss; extern int nfsrv_issuedelegs; extern int nfsrv_dolocallocks; +extern int nfsd_enable_stringtouid; SYSCTL_NODE(_vfs, OID_AUTO, nfsd, CTLFLAG_RW, 0, "New NFS server"); SYSCTL_INT(_vfs_nfsd, OID_AUTO, mirrormnt, CTLFLAG_RW, @@ -92,6 +93,8 @@ SYSCTL_INT(_vfs_nfsd, OID_AUTO, issue_de &nfsrv_issuedelegs, 0, "Enable nfsd to issue delegations"); SYSCTL_INT(_vfs_nfsd, OID_AUTO, enable_locallocks, CTLFLAG_RW, &nfsrv_dolocallocks, 0, "Enable nfsd to acquire local locks on files"); +SYSCTL_INT(_vfs_nfsd, OID_AUTO, enable_stringtouid, CTLFLAG_RW, + &nfsd_enable_stringtouid, 0, "Enable nfsd to accept numeric owner_names"); #define MAX_REORDERED_RPC 16 #define NUM_HEURISTIC 1031 From owner-svn-src-stable@FreeBSD.ORG Thu May 8 20:57:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D0799C3; Thu, 8 May 2014 20:57:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 183A92AD; Thu, 8 May 2014 20:57:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s48KvEtp058013; Thu, 8 May 2014 20:57:14 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s48KvDVE057980; Thu, 8 May 2014 20:57:13 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201405082057.s48KvDVE057980@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Thu, 8 May 2014 20:57:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265715 - in stable/9/sys: net netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 20:57:14 -0000 Author: melifaro Date: Thu May 8 20:57:13 2014 New Revision: 265715 URL: http://svnweb.freebsd.org/changeset/base/265715 Log: Merge 260488, r260508. r260488: Split rt_newaddrmsg_fib() into two different functions. Adding/deleting interface addresses involves access to 3 different subsystems, int different parts of code. Each call can fail, so reporting successful operation by rtsock in the middle of the process error-prone. Further split routing notification API and actual rtsock calls via creating public-available rt_addrmsg() / rt_routemsg() functions with "private" rtsock_* backend. r260508: Simplify inet alias handling code: if we're adding/removing alias which has the same prefix as some other alias on the same interface, use newly-added rt_addrmsg() instead of hand-rolled in_addralias_rtmsg(). This eliminates the following rtsock messages: Pinned RTM_ADD for prefix (for alias addition). Pinned RTM_DELETE for prefix (for alias withdrawal). Example (got 10.0.0.1/24 on vlan4, playing with 10.0.0.2/24): before commit, addition: got message of size 116 on Fri Jan 10 14:13:15 2014 RTM_NEWADDR: address being added to iface: len 116, metric 0, flags: sockaddrs: 255.255.255.0 vlan4:8.0.27.c5.29.d4 10.0.0.2 10.0.0.255 got message of size 192 on Fri Jan 10 14:13:15 2014 RTM_ADD: Add Route: len 192, pid: 0, seq 0, errno 0, flags: locks: inits: sockaddrs: 10.0.0.0 10.0.0.2 (255) ffff ffff ff after commit, addition: got message of size 116 on Fri Jan 10 13:56:26 2014 RTM_NEWADDR: address being added to iface: len 116, metric 0, flags: sockaddrs: 255.255.255.0 vlan4:8.0.27.c5.29.d4 14.0.0.2 14.0.0.255 before commit, wihdrawal: got message of size 192 on Fri Jan 10 13:58:59 2014 RTM_DELETE: Delete Route: len 192, pid: 0, seq 0, errno 0, flags: locks: inits: sockaddrs: 10.0.0.0 10.0.0.2 (255) ffff ffff ff got message of size 116 on Fri Jan 10 13:58:59 2014 RTM_DELADDR: address being removed from iface: len 116, metric 0, flags: sockaddrs: 255.255.255.0 vlan4:8.0.27.c5.29.d4 10.0.0.2 10.0.0.255 adter commit, withdrawal: got message of size 116 on Fri Jan 10 14:14:11 2014 RTM_DELADDR: address being removed from iface: len 116, metric 0, flags: sockaddrs: 255.255.255.0 vlan4:8.0.27.c5.29.d4 10.0.0.2 10.0.0.255 Sending both RTM_ADD/RTM_DELETE messages to rtsock is completely wrong (and requires some hacks to keep prefix in route table on RTM_DELETE). I've tested this change with quagga (no change) and bird (*). bird alias handling is already broken in *BSD sysdep code, so nothing changes here, too. I'm going to MFC this change if there will be no complains about behavior change. While here, fix some style(9) bugs introduced by r260488 (pointed by glebius and bde). Modified: stable/9/sys/net/route.c stable/9/sys/net/route.h stable/9/sys/net/rtsock.c stable/9/sys/netinet/in.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/net/ (props changed) Modified: stable/9/sys/net/route.c ============================================================================== --- stable/9/sys/net/route.c Thu May 8 20:52:25 2014 (r265714) +++ stable/9/sys/net/route.c Thu May 8 20:57:13 2014 (r265715) @@ -37,6 +37,7 @@ #include "opt_inet.h" #include "opt_inet6.h" #include "opt_route.h" +#include "opt_sctp.h" #include "opt_mrouting.h" #include "opt_mpath.h" @@ -86,6 +87,14 @@ #define RT_NUMFIBS 1 #endif +#if defined(INET) || defined(INET6) +#ifdef SCTP +extern void sctp_addr_change(struct ifaddr *ifa, int cmd); +#endif /* SCTP */ +#endif + + +/* This is read-only.. */ u_int rt_numfibs = RT_NUMFIBS; SYSCTL_UINT(_net, OID_AUTO, fibs, CTLFLAG_RD, &rt_numfibs, 0, ""); /* @@ -125,7 +134,8 @@ VNET_DEFINE(int, rttrash); /* routes no /* compare two sockaddr structures */ -#define sa_equal(a1, a2) (bcmp((a1), (a2), (a1)->sa_len) == 0) +#define sa_equal(a1, a2) (((a1)->sa_len == (a2)->sa_len) && \ + (bcmp((a1), (a2), (a1)->sa_len) == 0)) /* * Convert a 'struct radix_node *' to a 'struct rtentry *'. @@ -1748,3 +1758,89 @@ rtinit(struct ifaddr *ifa, int cmd, int } return (rtinit1(ifa, cmd, flags, fib)); } + +/* + * Announce interface address arrival/withdraw + * Returns 0 on success. + */ +int +rt_addrmsg(int cmd, struct ifaddr *ifa, int fibnum) +{ + + KASSERT(cmd == RTM_ADD || cmd == RTM_DELETE, + ("unexpected cmd %d", cmd)); + + KASSERT(fibnum == RT_ALL_FIBS || (fibnum >= 0 && fibnum < rt_numfibs), + ("%s: fib out of range 0 <=%d<%d", __func__, fibnum, rt_numfibs)); + + return (rtsock_addrmsg(cmd, ifa, fibnum)); +} + +/* + * Announce route addition/removal. + * Users of this function MUST validate input data BEFORE calling. + * However we have to be able to handle invalid data: + * if some userland app sends us "invalid" route message (invalid mask, + * no dst, wrong address families, etc...) we need to pass it back + * to app (and any other rtsock consumers) with rtm_errno field set to + * non-zero value. + * Returns 0 on success. + */ +int +rt_routemsg(int cmd, struct ifnet *ifp, int error, struct rtentry *rt, + int fibnum) +{ + + KASSERT(cmd == RTM_ADD || cmd == RTM_DELETE, + ("unexpected cmd %d", cmd)); + + KASSERT(fibnum == RT_ALL_FIBS || (fibnum >= 0 && fibnum < rt_numfibs), + ("%s: fib out of range 0 <=%d<%d", __func__, fibnum, rt_numfibs)); + + KASSERT(rt_key(rt) != NULL, (":%s: rt_key must be supplied", __func__)); + + return (rtsock_routemsg(cmd, ifp, error, rt, fibnum)); +} + +void +rt_newaddrmsg(int cmd, struct ifaddr *ifa, int error, struct rtentry *rt) +{ + + rt_newaddrmsg_fib(cmd, ifa, error, rt, RT_ALL_FIBS); +} + +/* + * This is called to generate messages from the routing socket + * indicating a network interface has had addresses associated with it. + */ +void +rt_newaddrmsg_fib(int cmd, struct ifaddr *ifa, int error, struct rtentry *rt, + int fibnum) +{ + + KASSERT(cmd == RTM_ADD || cmd == RTM_DELETE, + ("unexpected cmd %u", cmd)); + KASSERT(fibnum == RT_ALL_FIBS || (fibnum >= 0 && fibnum < rt_numfibs), + ("%s: fib out of range 0 <=%d<%d", __func__, fibnum, rt_numfibs)); + +#if defined(INET) || defined(INET6) +#ifdef SCTP + /* + * notify the SCTP stack + * this will only get called when an address is added/deleted + * XXX pass the ifaddr struct instead if ifa->ifa_addr... + */ + sctp_addr_change(ifa, cmd); +#endif /* SCTP */ +#endif + if (cmd == RTM_ADD) { + rt_addrmsg(cmd, ifa, fibnum); + if (rt != NULL) + rt_routemsg(cmd, ifa->ifa_ifp, error, rt, fibnum); + } else { + if (rt != NULL) + rt_routemsg(cmd, ifa->ifa_ifp, error, rt, fibnum); + rt_addrmsg(cmd, ifa, fibnum); + } +} + Modified: stable/9/sys/net/route.h ============================================================================== --- stable/9/sys/net/route.h Thu May 8 20:52:25 2014 (r265714) +++ stable/9/sys/net/route.h Thu May 8 20:57:13 2014 (r265715) @@ -94,6 +94,7 @@ struct rt_metrics { #define RT_DEFAULT_FIB 0 /* Explicitly mark fib=0 restricted cases */ #define RT_ALL_FIBS -1 /* Announce event for every fib */ extern u_int rt_numfibs; /* number of usable routing tables */ +extern u_int rt_add_addr_allfibs; /* Announce interfaces to all fibs */ /* * XXX kernel function pointer `rt_output' is visible to applications. */ @@ -366,10 +367,15 @@ void rt_missmsg(int, struct rt_addrinfo void rt_missmsg_fib(int, struct rt_addrinfo *, int, int, int); void rt_newaddrmsg(int, struct ifaddr *, int, struct rtentry *); void rt_newaddrmsg_fib(int, struct ifaddr *, int, struct rtentry *, int); +int rt_addrmsg(int, struct ifaddr *, int); +int rt_routemsg(int, struct ifnet *ifp, int, struct rtentry *, int); void rt_newmaddrmsg(int, struct ifmultiaddr *); int rt_setgate(struct rtentry *, struct sockaddr *, struct sockaddr *); void rt_maskedcopy(struct sockaddr *, struct sockaddr *, struct sockaddr *); +int rtsock_addrmsg(int, struct ifaddr *, int); +int rtsock_routemsg(int, struct ifnet *ifp, int, struct rtentry *, int); + /* * Note the following locking behavior: * Modified: stable/9/sys/net/rtsock.c ============================================================================== --- stable/9/sys/net/rtsock.c Thu May 8 20:52:25 2014 (r265714) +++ stable/9/sys/net/rtsock.c Thu May 8 20:57:13 2014 (r265715) @@ -30,7 +30,6 @@ * $FreeBSD$ */ #include "opt_compat.h" -#include "opt_sctp.h" #include "opt_mpath.h" #include "opt_inet.h" #include "opt_inet6.h" @@ -67,12 +66,6 @@ #include #endif -#if defined(INET) || defined(INET6) -#ifdef SCTP -extern void sctp_addr_change(struct ifaddr *ifa, int cmd); -#endif /* SCTP */ -#endif - #ifdef COMPAT_FREEBSD32 #include #include @@ -1264,89 +1257,92 @@ rt_ifmsg(struct ifnet *ifp) } /* - * This is called to generate messages from the routing socket - * indicating a network interface has had addresses associated with it. - * if we ever reverse the logic and replace messages TO the routing - * socket indicate a request to configure interfaces, then it will - * be unnecessary as the routing socket will automatically generate - * copies of it. + * Announce interface address arrival/withdraw. + * Please do not call directly, use rt_addrmsg(). + * Assume input data to be valid. + * Returns 0 on success. */ -void -rt_newaddrmsg_fib(int cmd, struct ifaddr *ifa, int error, struct rtentry *rt, - int fibnum) +int +rtsock_addrmsg(int cmd, struct ifaddr *ifa, int fibnum) { struct rt_addrinfo info; - struct sockaddr *sa = NULL; - int pass; - struct mbuf *m = NULL; + struct sockaddr *sa; + int ncmd; + struct mbuf *m; + struct ifa_msghdr *ifam; struct ifnet *ifp = ifa->ifa_ifp; - KASSERT(cmd == RTM_ADD || cmd == RTM_DELETE, - ("unexpected cmd %u", cmd)); -#if defined(INET) || defined(INET6) -#ifdef SCTP - /* - * notify the SCTP stack - * this will only get called when an address is added/deleted - * XXX pass the ifaddr struct instead if ifa->ifa_addr... - */ - sctp_addr_change(ifa, cmd); -#endif /* SCTP */ -#endif if (route_cb.any_count == 0) - return; - for (pass = 1; pass < 3; pass++) { - bzero((caddr_t)&info, sizeof(info)); - if ((cmd == RTM_ADD && pass == 1) || - (cmd == RTM_DELETE && pass == 2)) { - struct ifa_msghdr *ifam; - int ncmd = cmd == RTM_ADD ? RTM_NEWADDR : RTM_DELADDR; + return (0); - info.rti_info[RTAX_IFA] = sa = ifa->ifa_addr; - info.rti_info[RTAX_IFP] = ifp->if_addr->ifa_addr; - info.rti_info[RTAX_NETMASK] = ifa->ifa_netmask; - info.rti_info[RTAX_BRD] = ifa->ifa_dstaddr; - if ((m = rt_msg1(ncmd, &info)) == NULL) - continue; - ifam = mtod(m, struct ifa_msghdr *); - ifam->ifam_index = ifp->if_index; - ifam->ifam_metric = ifa->ifa_metric; - ifam->ifam_flags = ifa->ifa_flags; - ifam->ifam_addrs = info.rti_addrs; - } - if ((cmd == RTM_ADD && pass == 2) || - (cmd == RTM_DELETE && pass == 1)) { - struct rt_msghdr *rtm; + ncmd = cmd == RTM_ADD ? RTM_NEWADDR : RTM_DELADDR; - if (rt == NULL) - continue; - info.rti_info[RTAX_NETMASK] = rt_mask(rt); - info.rti_info[RTAX_DST] = sa = rt_key(rt); - info.rti_info[RTAX_GATEWAY] = rt->rt_gateway; - if ((m = rt_msg1(cmd, &info)) == NULL) - continue; - rtm = mtod(m, struct rt_msghdr *); - rtm->rtm_index = ifp->if_index; - rtm->rtm_flags |= rt->rt_flags; - rtm->rtm_errno = error; - rtm->rtm_addrs = info.rti_addrs; - } - if (fibnum != RT_ALL_FIBS) { - KASSERT(fibnum >= 0 && fibnum < rt_numfibs, ("%s: " - "fibnum out of range 0 <= %d < %d", __func__, - fibnum, rt_numfibs)); - M_SETFIB(m, fibnum); - m->m_flags |= RTS_FILTER_FIB; - } - rt_dispatch(m, sa ? sa->sa_family : AF_UNSPEC); + bzero((caddr_t)&info, sizeof(info)); + info.rti_info[RTAX_IFA] = sa = ifa->ifa_addr; + info.rti_info[RTAX_IFP] = ifp->if_addr->ifa_addr; + info.rti_info[RTAX_NETMASK] = ifa->ifa_netmask; + info.rti_info[RTAX_BRD] = ifa->ifa_dstaddr; + if ((m = rt_msg1(ncmd, &info)) == NULL) + return (ENOBUFS); + ifam = mtod(m, struct ifa_msghdr *); + ifam->ifam_index = ifp->if_index; + ifam->ifam_metric = ifa->ifa_metric; + ifam->ifam_flags = ifa->ifa_flags; + ifam->ifam_addrs = info.rti_addrs; + + if (fibnum != RT_ALL_FIBS) { + M_SETFIB(m, fibnum); + m->m_flags |= RTS_FILTER_FIB; } + + rt_dispatch(m, sa ? sa->sa_family : AF_UNSPEC); + + return (0); } -void -rt_newaddrmsg(int cmd, struct ifaddr *ifa, int error, struct rtentry *rt) +/* + * Announce route addition/removal. + * Please do not call directly, use rt_routemsg(). + * Note that @rt data MAY be inconsistent/invalid: + * if some userland app sends us "invalid" route message (invalid mask, + * no dst, wrong address families, etc...) we need to pass it back + * to app (and any other rtsock consumers) with rtm_errno field set to + * non-zero value. + * + * Returns 0 on success. + */ +int +rtsock_routemsg(int cmd, struct ifnet *ifp, int error, struct rtentry *rt, + int fibnum) { + struct rt_addrinfo info; + struct sockaddr *sa; + struct mbuf *m; + struct rt_msghdr *rtm; + + if (route_cb.any_count == 0) + return (0); - rt_newaddrmsg_fib(cmd, ifa, error, rt, RT_ALL_FIBS); + bzero((caddr_t)&info, sizeof(info)); + info.rti_info[RTAX_NETMASK] = rt_mask(rt); + info.rti_info[RTAX_DST] = sa = rt_key(rt); + info.rti_info[RTAX_GATEWAY] = rt->rt_gateway; + if ((m = rt_msg1(cmd, &info)) == NULL) + return (ENOBUFS); + rtm = mtod(m, struct rt_msghdr *); + rtm->rtm_index = ifp->if_index; + rtm->rtm_flags |= rt->rt_flags; + rtm->rtm_errno = error; + rtm->rtm_addrs = info.rti_addrs; + + if (fibnum != RT_ALL_FIBS) { + M_SETFIB(m, fibnum); + m->m_flags |= RTS_FILTER_FIB; + } + + rt_dispatch(m, sa ? sa->sa_family : AF_UNSPEC); + + return (0); } /* Modified: stable/9/sys/netinet/in.c ============================================================================== --- stable/9/sys/netinet/in.c Thu May 8 20:52:25 2014 (r265714) +++ stable/9/sys/netinet/in.c Thu May 8 20:57:13 2014 (r265715) @@ -961,45 +961,6 @@ in_ifinit(struct ifnet *ifp, struct in_i ? RTF_HOST : 0) /* - * Generate a routing message when inserting or deleting - * an interface address alias. - */ -static void in_addralias_rtmsg(int cmd, struct in_addr *prefix, - struct in_ifaddr *target) -{ - struct route pfx_ro; - struct sockaddr_in *pfx_addr; - struct rtentry msg_rt; - - /* QL: XXX - * This is a bit questionable because there is no - * additional route entry added/deleted for an address - * alias. Therefore this route report is inaccurate. - */ - bzero(&pfx_ro, sizeof(pfx_ro)); - pfx_addr = (struct sockaddr_in *)(&pfx_ro.ro_dst); - pfx_addr->sin_len = sizeof(*pfx_addr); - pfx_addr->sin_family = AF_INET; - pfx_addr->sin_addr = *prefix; - rtalloc_ign_fib(&pfx_ro, 0, 0); - if (pfx_ro.ro_rt != NULL) { - msg_rt = *pfx_ro.ro_rt; - - /* QL: XXX - * Point the gateway to the new interface - * address as if a new prefix route entry has - * been added through the new address alias. - * All other parts of the rtentry is accurate, - * e.g., rt_key, rt_mask, rt_ifp etc. - */ - msg_rt.rt_gateway = (struct sockaddr *)&target->ia_addr; - rt_newaddrmsg(cmd, (struct ifaddr *)target, 0, &msg_rt); - RTFREE(pfx_ro.ro_rt); - } - return; -} - -/* * Check if we have a route for the given prefix already or add one accordingly. */ static int @@ -1007,7 +968,7 @@ in_addprefix(struct in_ifaddr *target, i { struct in_ifaddr *ia; struct in_addr prefix, mask, p, m; - int error; + int error, fibnum; if ((flags & RTF_HOST) != 0) { prefix = target->ia_dstaddr.sin_addr; @@ -1018,6 +979,8 @@ in_addprefix(struct in_ifaddr *target, i prefix.s_addr &= mask.s_addr; } + fibnum = rt_add_addr_allfibs ? RT_ALL_FIBS : target->ia_ifp->if_fib; + IN_IFADDR_RLOCK(); TAILQ_FOREACH(ia, &V_in_ifaddrhead, ia_link) { if (rtinitflags(ia)) { @@ -1054,7 +1017,7 @@ in_addprefix(struct in_ifaddr *target, i IN_IFADDR_RUNLOCK(); return (EEXIST); } else { - in_addralias_rtmsg(RTM_ADD, &prefix, target); + rt_addrmsg(RTM_ADD, &target->ia_ifa, fibnum); IN_IFADDR_RUNLOCK(); return (0); } @@ -1083,9 +1046,11 @@ in_scrubprefix(struct in_ifaddr *target, { struct in_ifaddr *ia; struct in_addr prefix, mask, p; - int error = 0; + int error = 0, fibnum; struct sockaddr_in prefix0, mask0; + fibnum = rt_add_addr_allfibs ? RT_ALL_FIBS : target->ia_ifp->if_fib; + /* * Remove the loopback route to the interface address. * The "useloopback" setting is not consulted because if the @@ -1137,7 +1102,7 @@ in_scrubprefix(struct in_ifaddr *target, } if ((target->ia_flags & IFA_ROUTE) == 0) { - in_addralias_rtmsg(RTM_DELETE, &prefix, target); + rt_addrmsg(RTM_DELETE, &target->ia_ifa, fibnum); return (0); } From owner-svn-src-stable@FreeBSD.ORG Thu May 8 21:03:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62162DCA; Thu, 8 May 2014 21:03:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D219369; Thu, 8 May 2014 21:03:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s48L3WAv076703; Thu, 8 May 2014 21:03:32 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s48L3Vcw076667; Thu, 8 May 2014 21:03:31 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201405082103.s48L3Vcw076667@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Thu, 8 May 2014 21:03:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265717 - in stable/10/sys: net netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 21:03:32 -0000 Author: melifaro Date: Thu May 8 21:03:31 2014 New Revision: 265717 URL: http://svnweb.freebsd.org/changeset/base/265717 Log: Merge 260488, r260508. r260488: Split rt_newaddrmsg_fib() into two different functions. Adding/deleting interface addresses involves access to 3 different subsystems, int different parts of code. Each call can fail, so reporting successful operation by rtsock in the middle of the process error-prone. Further split routing notification API and actual rtsock calls via creating public-available rt_addrmsg() / rt_routemsg() functions with "private" rtsock_* backend. r260508: Simplify inet alias handling code: if we're adding/removing alias which has the same prefix as some other alias on the same interface, use newly-added rt_addrmsg() instead of hand-rolled in_addralias_rtmsg(). This eliminates the following rtsock messages: Pinned RTM_ADD for prefix (for alias addition). Pinned RTM_DELETE for prefix (for alias withdrawal). Example (got 10.0.0.1/24 on vlan4, playing with 10.0.0.2/24): before commit, addition: got message of size 116 on Fri Jan 10 14:13:15 2014 RTM_NEWADDR: address being added to iface: len 116, metric 0, flags: sockaddrs: 255.255.255.0 vlan4:8.0.27.c5.29.d4 10.0.0.2 10.0.0.255 got message of size 192 on Fri Jan 10 14:13:15 2014 RTM_ADD: Add Route: len 192, pid: 0, seq 0, errno 0, flags: locks: inits: sockaddrs: 10.0.0.0 10.0.0.2 (255) ffff ffff ff after commit, addition: got message of size 116 on Fri Jan 10 13:56:26 2014 RTM_NEWADDR: address being added to iface: len 116, metric 0, flags: sockaddrs: 255.255.255.0 vlan4:8.0.27.c5.29.d4 14.0.0.2 14.0.0.255 before commit, wihdrawal: got message of size 192 on Fri Jan 10 13:58:59 2014 RTM_DELETE: Delete Route: len 192, pid: 0, seq 0, errno 0, flags: locks: inits: sockaddrs: 10.0.0.0 10.0.0.2 (255) ffff ffff ff got message of size 116 on Fri Jan 10 13:58:59 2014 RTM_DELADDR: address being removed from iface: len 116, metric 0, flags: sockaddrs: 255.255.255.0 vlan4:8.0.27.c5.29.d4 10.0.0.2 10.0.0.255 adter commit, withdrawal: got message of size 116 on Fri Jan 10 14:14:11 2014 RTM_DELADDR: address being removed from iface: len 116, metric 0, flags: sockaddrs: 255.255.255.0 vlan4:8.0.27.c5.29.d4 10.0.0.2 10.0.0.255 Sending both RTM_ADD/RTM_DELETE messages to rtsock is completely wrong (and requires some hacks to keep prefix in route table on RTM_DELETE). I've tested this change with quagga (no change) and bird (*). bird alias handling is already broken in *BSD sysdep code, so nothing changes here, too. I'm going to MFC this change if there will be no complains about behavior change. While here, fix some style(9) bugs introduced by r260488 (pointed by glebius and bde). Modified: stable/10/sys/net/route.c stable/10/sys/net/route.h stable/10/sys/net/rtsock.c stable/10/sys/netinet/in.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/route.c ============================================================================== --- stable/10/sys/net/route.c Thu May 8 21:02:23 2014 (r265716) +++ stable/10/sys/net/route.c Thu May 8 21:03:31 2014 (r265717) @@ -37,6 +37,7 @@ #include "opt_inet.h" #include "opt_inet6.h" #include "opt_route.h" +#include "opt_sctp.h" #include "opt_mrouting.h" #include "opt_mpath.h" @@ -85,6 +86,13 @@ #define RT_NUMFIBS 1 #endif +#if defined(INET) || defined(INET6) +#ifdef SCTP +extern void sctp_addr_change(struct ifaddr *ifa, int cmd); +#endif /* SCTP */ +#endif + + /* This is read-only.. */ u_int rt_numfibs = RT_NUMFIBS; SYSCTL_UINT(_net, OID_AUTO, fibs, CTLFLAG_RD, &rt_numfibs, 0, ""); @@ -117,7 +125,8 @@ VNET_DEFINE(int, rttrash); /* routes no /* compare two sockaddr structures */ -#define sa_equal(a1, a2) (bcmp((a1), (a2), (a1)->sa_len) == 0) +#define sa_equal(a1, a2) (((a1)->sa_len == (a2)->sa_len) && \ + (bcmp((a1), (a2), (a1)->sa_len) == 0)) /* * Convert a 'struct radix_node *' to a 'struct rtentry *'. @@ -1756,3 +1765,89 @@ rtinit(struct ifaddr *ifa, int cmd, int } return (rtinit1(ifa, cmd, flags, fib)); } + +/* + * Announce interface address arrival/withdraw + * Returns 0 on success. + */ +int +rt_addrmsg(int cmd, struct ifaddr *ifa, int fibnum) +{ + + KASSERT(cmd == RTM_ADD || cmd == RTM_DELETE, + ("unexpected cmd %d", cmd)); + + KASSERT(fibnum == RT_ALL_FIBS || (fibnum >= 0 && fibnum < rt_numfibs), + ("%s: fib out of range 0 <=%d<%d", __func__, fibnum, rt_numfibs)); + + return (rtsock_addrmsg(cmd, ifa, fibnum)); +} + +/* + * Announce route addition/removal. + * Users of this function MUST validate input data BEFORE calling. + * However we have to be able to handle invalid data: + * if some userland app sends us "invalid" route message (invalid mask, + * no dst, wrong address families, etc...) we need to pass it back + * to app (and any other rtsock consumers) with rtm_errno field set to + * non-zero value. + * Returns 0 on success. + */ +int +rt_routemsg(int cmd, struct ifnet *ifp, int error, struct rtentry *rt, + int fibnum) +{ + + KASSERT(cmd == RTM_ADD || cmd == RTM_DELETE, + ("unexpected cmd %d", cmd)); + + KASSERT(fibnum == RT_ALL_FIBS || (fibnum >= 0 && fibnum < rt_numfibs), + ("%s: fib out of range 0 <=%d<%d", __func__, fibnum, rt_numfibs)); + + KASSERT(rt_key(rt) != NULL, (":%s: rt_key must be supplied", __func__)); + + return (rtsock_routemsg(cmd, ifp, error, rt, fibnum)); +} + +void +rt_newaddrmsg(int cmd, struct ifaddr *ifa, int error, struct rtentry *rt) +{ + + rt_newaddrmsg_fib(cmd, ifa, error, rt, RT_ALL_FIBS); +} + +/* + * This is called to generate messages from the routing socket + * indicating a network interface has had addresses associated with it. + */ +void +rt_newaddrmsg_fib(int cmd, struct ifaddr *ifa, int error, struct rtentry *rt, + int fibnum) +{ + + KASSERT(cmd == RTM_ADD || cmd == RTM_DELETE, + ("unexpected cmd %u", cmd)); + KASSERT(fibnum == RT_ALL_FIBS || (fibnum >= 0 && fibnum < rt_numfibs), + ("%s: fib out of range 0 <=%d<%d", __func__, fibnum, rt_numfibs)); + +#if defined(INET) || defined(INET6) +#ifdef SCTP + /* + * notify the SCTP stack + * this will only get called when an address is added/deleted + * XXX pass the ifaddr struct instead if ifa->ifa_addr... + */ + sctp_addr_change(ifa, cmd); +#endif /* SCTP */ +#endif + if (cmd == RTM_ADD) { + rt_addrmsg(cmd, ifa, fibnum); + if (rt != NULL) + rt_routemsg(cmd, ifa->ifa_ifp, error, rt, fibnum); + } else { + if (rt != NULL) + rt_routemsg(cmd, ifa->ifa_ifp, error, rt, fibnum); + rt_addrmsg(cmd, ifa, fibnum); + } +} + Modified: stable/10/sys/net/route.h ============================================================================== --- stable/10/sys/net/route.h Thu May 8 21:02:23 2014 (r265716) +++ stable/10/sys/net/route.h Thu May 8 21:03:31 2014 (r265717) @@ -85,6 +85,7 @@ struct rt_metrics { #define RT_DEFAULT_FIB 0 /* Explicitly mark fib=0 restricted cases */ #define RT_ALL_FIBS -1 /* Announce event for every fib */ extern u_int rt_numfibs; /* number of usable routing tables */ +extern u_int rt_add_addr_allfibs; /* Announce interfaces to all fibs */ /* * We distinguish between routes to hosts and routes to networks, @@ -343,10 +344,15 @@ void rt_missmsg(int, struct rt_addrinfo void rt_missmsg_fib(int, struct rt_addrinfo *, int, int, int); void rt_newaddrmsg(int, struct ifaddr *, int, struct rtentry *); void rt_newaddrmsg_fib(int, struct ifaddr *, int, struct rtentry *, int); +int rt_addrmsg(int, struct ifaddr *, int); +int rt_routemsg(int, struct ifnet *ifp, int, struct rtentry *, int); void rt_newmaddrmsg(int, struct ifmultiaddr *); int rt_setgate(struct rtentry *, struct sockaddr *, struct sockaddr *); void rt_maskedcopy(struct sockaddr *, struct sockaddr *, struct sockaddr *); +int rtsock_addrmsg(int, struct ifaddr *, int); +int rtsock_routemsg(int, struct ifnet *ifp, int, struct rtentry *, int); + /* * Note the following locking behavior: * Modified: stable/10/sys/net/rtsock.c ============================================================================== --- stable/10/sys/net/rtsock.c Thu May 8 21:02:23 2014 (r265716) +++ stable/10/sys/net/rtsock.c Thu May 8 21:03:31 2014 (r265717) @@ -30,7 +30,6 @@ * $FreeBSD$ */ #include "opt_compat.h" -#include "opt_sctp.h" #include "opt_mpath.h" #include "opt_inet.h" #include "opt_inet6.h" @@ -70,12 +69,6 @@ #include #endif -#if defined(INET) || defined(INET6) -#ifdef SCTP -extern void sctp_addr_change(struct ifaddr *ifa, int cmd); -#endif /* SCTP */ -#endif - #ifdef COMPAT_FREEBSD32 #include #include @@ -1327,89 +1320,92 @@ rt_ifmsg(struct ifnet *ifp) } /* - * This is called to generate messages from the routing socket - * indicating a network interface has had addresses associated with it. - * if we ever reverse the logic and replace messages TO the routing - * socket indicate a request to configure interfaces, then it will - * be unnecessary as the routing socket will automatically generate - * copies of it. + * Announce interface address arrival/withdraw. + * Please do not call directly, use rt_addrmsg(). + * Assume input data to be valid. + * Returns 0 on success. */ -void -rt_newaddrmsg_fib(int cmd, struct ifaddr *ifa, int error, struct rtentry *rt, - int fibnum) +int +rtsock_addrmsg(int cmd, struct ifaddr *ifa, int fibnum) { struct rt_addrinfo info; - struct sockaddr *sa = NULL; - int pass; - struct mbuf *m = NULL; + struct sockaddr *sa; + int ncmd; + struct mbuf *m; + struct ifa_msghdr *ifam; struct ifnet *ifp = ifa->ifa_ifp; - KASSERT(cmd == RTM_ADD || cmd == RTM_DELETE, - ("unexpected cmd %u", cmd)); -#if defined(INET) || defined(INET6) -#ifdef SCTP - /* - * notify the SCTP stack - * this will only get called when an address is added/deleted - * XXX pass the ifaddr struct instead if ifa->ifa_addr... - */ - sctp_addr_change(ifa, cmd); -#endif /* SCTP */ -#endif if (route_cb.any_count == 0) - return; - for (pass = 1; pass < 3; pass++) { - bzero((caddr_t)&info, sizeof(info)); - if ((cmd == RTM_ADD && pass == 1) || - (cmd == RTM_DELETE && pass == 2)) { - struct ifa_msghdr *ifam; - int ncmd = cmd == RTM_ADD ? RTM_NEWADDR : RTM_DELADDR; + return (0); - info.rti_info[RTAX_IFA] = sa = ifa->ifa_addr; - info.rti_info[RTAX_IFP] = ifp->if_addr->ifa_addr; - info.rti_info[RTAX_NETMASK] = ifa->ifa_netmask; - info.rti_info[RTAX_BRD] = ifa->ifa_dstaddr; - if ((m = rt_msg1(ncmd, &info)) == NULL) - continue; - ifam = mtod(m, struct ifa_msghdr *); - ifam->ifam_index = ifp->if_index; - ifam->ifam_metric = ifa->ifa_metric; - ifam->ifam_flags = ifa->ifa_flags; - ifam->ifam_addrs = info.rti_addrs; - } - if ((cmd == RTM_ADD && pass == 2) || - (cmd == RTM_DELETE && pass == 1)) { - struct rt_msghdr *rtm; + ncmd = cmd == RTM_ADD ? RTM_NEWADDR : RTM_DELADDR; - if (rt == NULL) - continue; - info.rti_info[RTAX_NETMASK] = rt_mask(rt); - info.rti_info[RTAX_DST] = sa = rt_key(rt); - info.rti_info[RTAX_GATEWAY] = rt->rt_gateway; - if ((m = rt_msg1(cmd, &info)) == NULL) - continue; - rtm = mtod(m, struct rt_msghdr *); - rtm->rtm_index = ifp->if_index; - rtm->rtm_flags |= rt->rt_flags; - rtm->rtm_errno = error; - rtm->rtm_addrs = info.rti_addrs; - } - if (fibnum != RT_ALL_FIBS) { - KASSERT(fibnum >= 0 && fibnum < rt_numfibs, ("%s: " - "fibnum out of range 0 <= %d < %d", __func__, - fibnum, rt_numfibs)); - M_SETFIB(m, fibnum); - m->m_flags |= RTS_FILTER_FIB; - } - rt_dispatch(m, sa ? sa->sa_family : AF_UNSPEC); + bzero((caddr_t)&info, sizeof(info)); + info.rti_info[RTAX_IFA] = sa = ifa->ifa_addr; + info.rti_info[RTAX_IFP] = ifp->if_addr->ifa_addr; + info.rti_info[RTAX_NETMASK] = ifa->ifa_netmask; + info.rti_info[RTAX_BRD] = ifa->ifa_dstaddr; + if ((m = rt_msg1(ncmd, &info)) == NULL) + return (ENOBUFS); + ifam = mtod(m, struct ifa_msghdr *); + ifam->ifam_index = ifp->if_index; + ifam->ifam_metric = ifa->ifa_metric; + ifam->ifam_flags = ifa->ifa_flags; + ifam->ifam_addrs = info.rti_addrs; + + if (fibnum != RT_ALL_FIBS) { + M_SETFIB(m, fibnum); + m->m_flags |= RTS_FILTER_FIB; } + + rt_dispatch(m, sa ? sa->sa_family : AF_UNSPEC); + + return (0); } -void -rt_newaddrmsg(int cmd, struct ifaddr *ifa, int error, struct rtentry *rt) +/* + * Announce route addition/removal. + * Please do not call directly, use rt_routemsg(). + * Note that @rt data MAY be inconsistent/invalid: + * if some userland app sends us "invalid" route message (invalid mask, + * no dst, wrong address families, etc...) we need to pass it back + * to app (and any other rtsock consumers) with rtm_errno field set to + * non-zero value. + * + * Returns 0 on success. + */ +int +rtsock_routemsg(int cmd, struct ifnet *ifp, int error, struct rtentry *rt, + int fibnum) { + struct rt_addrinfo info; + struct sockaddr *sa; + struct mbuf *m; + struct rt_msghdr *rtm; + + if (route_cb.any_count == 0) + return (0); - rt_newaddrmsg_fib(cmd, ifa, error, rt, RT_ALL_FIBS); + bzero((caddr_t)&info, sizeof(info)); + info.rti_info[RTAX_NETMASK] = rt_mask(rt); + info.rti_info[RTAX_DST] = sa = rt_key(rt); + info.rti_info[RTAX_GATEWAY] = rt->rt_gateway; + if ((m = rt_msg1(cmd, &info)) == NULL) + return (ENOBUFS); + rtm = mtod(m, struct rt_msghdr *); + rtm->rtm_index = ifp->if_index; + rtm->rtm_flags |= rt->rt_flags; + rtm->rtm_errno = error; + rtm->rtm_addrs = info.rti_addrs; + + if (fibnum != RT_ALL_FIBS) { + M_SETFIB(m, fibnum); + m->m_flags |= RTS_FILTER_FIB; + } + + rt_dispatch(m, sa ? sa->sa_family : AF_UNSPEC); + + return (0); } /* Modified: stable/10/sys/netinet/in.c ============================================================================== --- stable/10/sys/netinet/in.c Thu May 8 21:02:23 2014 (r265716) +++ stable/10/sys/netinet/in.c Thu May 8 21:03:31 2014 (r265717) @@ -901,45 +901,6 @@ in_ifinit(struct ifnet *ifp, struct in_i ? RTF_HOST : 0) /* - * Generate a routing message when inserting or deleting - * an interface address alias. - */ -static void in_addralias_rtmsg(int cmd, struct in_addr *prefix, - struct in_ifaddr *target) -{ - struct route pfx_ro; - struct sockaddr_in *pfx_addr; - struct rtentry msg_rt; - - /* QL: XXX - * This is a bit questionable because there is no - * additional route entry added/deleted for an address - * alias. Therefore this route report is inaccurate. - */ - bzero(&pfx_ro, sizeof(pfx_ro)); - pfx_addr = (struct sockaddr_in *)(&pfx_ro.ro_dst); - pfx_addr->sin_len = sizeof(*pfx_addr); - pfx_addr->sin_family = AF_INET; - pfx_addr->sin_addr = *prefix; - rtalloc_ign_fib(&pfx_ro, 0, 0); - if (pfx_ro.ro_rt != NULL) { - msg_rt = *pfx_ro.ro_rt; - - /* QL: XXX - * Point the gateway to the new interface - * address as if a new prefix route entry has - * been added through the new address alias. - * All other parts of the rtentry is accurate, - * e.g., rt_key, rt_mask, rt_ifp etc. - */ - msg_rt.rt_gateway = (struct sockaddr *)&target->ia_addr; - rt_newaddrmsg(cmd, (struct ifaddr *)target, 0, &msg_rt); - RTFREE(pfx_ro.ro_rt); - } - return; -} - -/* * Check if we have a route for the given prefix already or add one accordingly. */ int @@ -947,7 +908,7 @@ in_addprefix(struct in_ifaddr *target, i { struct in_ifaddr *ia; struct in_addr prefix, mask, p, m; - int error; + int error, fibnum; if ((flags & RTF_HOST) != 0) { prefix = target->ia_dstaddr.sin_addr; @@ -958,6 +919,8 @@ in_addprefix(struct in_ifaddr *target, i prefix.s_addr &= mask.s_addr; } + fibnum = rt_add_addr_allfibs ? RT_ALL_FIBS : target->ia_ifp->if_fib; + IN_IFADDR_RLOCK(); TAILQ_FOREACH(ia, &V_in_ifaddrhead, ia_link) { if (rtinitflags(ia)) { @@ -992,7 +955,7 @@ in_addprefix(struct in_ifaddr *target, i IN_IFADDR_RUNLOCK(); return (EEXIST); } else { - in_addralias_rtmsg(RTM_ADD, &prefix, target); + rt_addrmsg(RTM_ADD, &target->ia_ifa, fibnum); IN_IFADDR_RUNLOCK(); return (0); } @@ -1019,9 +982,11 @@ in_scrubprefix(struct in_ifaddr *target, { struct in_ifaddr *ia; struct in_addr prefix, mask, p, m; - int error = 0; + int error = 0, fibnum; struct sockaddr_in prefix0, mask0; + fibnum = rt_add_addr_allfibs ? RT_ALL_FIBS : target->ia_ifp->if_fib; + /* * Remove the loopback route to the interface address. * The "useloopback" setting is not consulted because if the @@ -1074,7 +1039,7 @@ in_scrubprefix(struct in_ifaddr *target, } if ((target->ia_flags & IFA_ROUTE) == 0) { - in_addralias_rtmsg(RTM_DELETE, &prefix, target); + rt_addrmsg(RTM_DELETE, &target->ia_ifa, fibnum); return (0); } From owner-svn-src-stable@FreeBSD.ORG Fri May 9 00:19:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 05DD9706; Fri, 9 May 2014 00:19:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6728771; Fri, 9 May 2014 00:19:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s490J8U5019355; Fri, 9 May 2014 00:19:08 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s490J80c019354; Fri, 9 May 2014 00:19:08 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201405090019.s490J80c019354@svn.freebsd.org> From: Rick Macklem Date: Fri, 9 May 2014 00:19:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265721 - stable/9/sys/fs/nfsclient X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 00:19:09 -0000 Author: rmacklem Date: Fri May 9 00:19:08 2014 New Revision: 265721 URL: http://svnweb.freebsd.org/changeset/base/265721 Log: MFC: r264842 Modify the NFSv4 client's Pathconf RPC (actually a Getattr Op.) so that it only does the RPC for names that are answered by the RPC. Doing the RPC for other names is harmless, but unnecessary. Modified: stable/9/sys/fs/nfsclient/nfs_clvnops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- stable/9/sys/fs/nfsclient/nfs_clvnops.c Thu May 8 23:54:15 2014 (r265720) +++ stable/9/sys/fs/nfsclient/nfs_clvnops.c Fri May 9 00:19:08 2014 (r265721) @@ -3405,12 +3405,15 @@ nfs_pathconf(struct vop_pathconf_args *a struct thread *td = curthread; int attrflag, error; - if (NFS_ISV4(vp) || (NFS_ISV3(vp) && (ap->a_name == _PC_LINK_MAX || + if ((NFS_ISV34(vp) && (ap->a_name == _PC_LINK_MAX || ap->a_name == _PC_NAME_MAX || ap->a_name == _PC_CHOWN_RESTRICTED || - ap->a_name == _PC_NO_TRUNC))) { + ap->a_name == _PC_NO_TRUNC)) || + (NFS_ISV4(vp) && ap->a_name == _PC_ACL_NFS4)) { /* * Since only the above 4 a_names are returned by the NFSv3 * Pathconf RPC, there is no point in doing it for others. + * For NFSv4, the Pathconf RPC (actually a Getattr Op.) can + * be used for _PC_NFS4_ACL as well. */ error = nfsrpc_pathconf(vp, &pc, td->td_ucred, td, &nfsva, &attrflag, NULL); From owner-svn-src-stable@FreeBSD.ORG Fri May 9 00:24:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC476DDF; Fri, 9 May 2014 00:24:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FEA182C; Fri, 9 May 2014 00:24:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s490OBQt036030; Fri, 9 May 2014 00:24:11 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s490OBTK036029; Fri, 9 May 2014 00:24:11 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201405090024.s490OBTK036029@svn.freebsd.org> From: Rick Macklem Date: Fri, 9 May 2014 00:24:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265722 - stable/9/sys/fs/nfsserver X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 00:24:11 -0000 Author: rmacklem Date: Fri May 9 00:24:11 2014 New Revision: 265722 URL: http://svnweb.freebsd.org/changeset/base/265722 Log: MFC: r264845 Remove an unnecessary level of indirection for an argument. This simplifies the code and should avoid the clang sparc port from generating an abort() call. Modified: stable/9/sys/fs/nfsserver/nfs_nfsdstate.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- stable/9/sys/fs/nfsserver/nfs_nfsdstate.c Fri May 9 00:19:08 2014 (r265721) +++ stable/9/sys/fs/nfsserver/nfs_nfsdstate.c Fri May 9 00:24:11 2014 (r265722) @@ -79,7 +79,7 @@ static int nfsrv_getstate(struct nfsclie static void nfsrv_getowner(struct nfsstatehead *hp, struct nfsstate *new_stp, struct nfsstate **stpp); static int nfsrv_getlockfh(vnode_t vp, u_short flags, - struct nfslockfile **new_lfpp, fhandle_t *nfhp, NFSPROC_T *p); + struct nfslockfile *new_lfp, fhandle_t *nfhp, NFSPROC_T *p); static int nfsrv_getlockfile(u_short flags, struct nfslockfile **new_lfpp, struct nfslockfile **lfpp, fhandle_t *nfhp, int lockit); static void nfsrv_insertlock(struct nfslock *new_lop, @@ -1985,7 +1985,7 @@ tryagain: MALLOC(new_lfp, struct nfslockfile *, sizeof (struct nfslockfile), M_NFSDLOCKFILE, M_WAITOK); if (vp) - getfhret = nfsrv_getlockfh(vp, new_stp->ls_flags, &new_lfp, + getfhret = nfsrv_getlockfh(vp, new_stp->ls_flags, new_lfp, NULL, p); NFSLOCKSTATE(); /* @@ -2235,7 +2235,7 @@ tryagain: M_NFSDSTATE, M_WAITOK); MALLOC(new_deleg, struct nfsstate *, sizeof (struct nfsstate), M_NFSDSTATE, M_WAITOK); - getfhret = nfsrv_getlockfh(vp, new_stp->ls_flags, &new_lfp, + getfhret = nfsrv_getlockfh(vp, new_stp->ls_flags, new_lfp, NULL, p); NFSLOCKSTATE(); /* @@ -3142,11 +3142,10 @@ out: * Get the file handle for a lock structure. */ static int -nfsrv_getlockfh(vnode_t vp, u_short flags, - struct nfslockfile **new_lfpp, fhandle_t *nfhp, NFSPROC_T *p) +nfsrv_getlockfh(vnode_t vp, u_short flags, struct nfslockfile *new_lfp, + fhandle_t *nfhp, NFSPROC_T *p) { fhandle_t *fhp = NULL; - struct nfslockfile *new_lfp; int error; /* @@ -3154,7 +3153,7 @@ nfsrv_getlockfh(vnode_t vp, u_short flag * a fhandle_t on the stack. */ if (flags & NFSLCK_OPEN) { - new_lfp = *new_lfpp; + KASSERT(new_lfp != NULL, ("nfsrv_getlockfh: new_lfp NULL")); fhp = &new_lfp->lf_fh; } else if (nfhp) { fhp = nfhp; From owner-svn-src-stable@FreeBSD.ORG Fri May 9 00:28:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7EA5AF85; Fri, 9 May 2014 00:28:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B2AC84D; Fri, 9 May 2014 00:28:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s490S81G045241; Fri, 9 May 2014 00:28:08 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s490S8pa045224; Fri, 9 May 2014 00:28:08 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201405090028.s490S8pa045224@svn.freebsd.org> From: Rick Macklem Date: Fri, 9 May 2014 00:28:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265723 - in stable/9/sys: fs/nfsserver nfsserver X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 00:28:08 -0000 Author: rmacklem Date: Fri May 9 00:28:07 2014 New Revision: 265723 URL: http://svnweb.freebsd.org/changeset/base/265723 Log: MFC: r264888 The PR reported that the old NFS server did not set uio_td == NULL for the VOP_READ() call. This patch fixes both the old and new server for this case. Modified: stable/9/sys/fs/nfsserver/nfs_nfsdport.c stable/9/sys/nfsserver/nfs_serv.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/9/sys/fs/nfsserver/nfs_nfsdport.c Fri May 9 00:24:11 2014 (r265722) +++ stable/9/sys/fs/nfsserver/nfs_nfsdport.c Fri May 9 00:28:07 2014 (r265723) @@ -674,6 +674,7 @@ nfsvno_read(struct vnode *vp, off_t off, uiop->uio_resid = len; uiop->uio_rw = UIO_READ; uiop->uio_segflg = UIO_SYSSPACE; + uiop->uio_td = NULL; nh = nfsrv_sequential_heuristic(uiop, vp); ioflag |= nh->nh_seqcount << IO_SEQSHIFT; error = VOP_READ(vp, uiop, IO_NODELOCKED | ioflag, cred); Modified: stable/9/sys/nfsserver/nfs_serv.c ============================================================================== --- stable/9/sys/nfsserver/nfs_serv.c Fri May 9 00:24:11 2014 (r265722) +++ stable/9/sys/nfsserver/nfs_serv.c Fri May 9 00:28:07 2014 (r265723) @@ -965,6 +965,7 @@ nfsrv_read(struct nfsrv_descript *nfsd, uiop->uio_resid = len; uiop->uio_rw = UIO_READ; uiop->uio_segflg = UIO_SYSSPACE; + uiop->uio_td = NULL; nh = nfsrv_sequential_heuristic(uiop, vp); ioflag |= nh->nh_seqcount << IO_SEQSHIFT; error = VOP_READ(vp, uiop, IO_NODELOCKED | ioflag, cred); From owner-svn-src-stable@FreeBSD.ORG Fri May 9 00:34:29 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5A34217; Fri, 9 May 2014 00:34:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1F068EC; Fri, 9 May 2014 00:34:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s490YTnM067668; Fri, 9 May 2014 00:34:29 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s490YTSm067655; Fri, 9 May 2014 00:34:29 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201405090034.s490YTSm067655@svn.freebsd.org> From: Rick Macklem Date: Fri, 9 May 2014 00:34:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265724 - in stable/9/sys/fs: nfs nfsserver X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 00:34:30 -0000 Author: rmacklem Date: Fri May 9 00:34:29 2014 New Revision: 265724 URL: http://svnweb.freebsd.org/changeset/base/265724 Log: MFC: r265252 The new draft specification for NFSv4.0 specifies that a server should either accept owner and owner_group strings that are just the digits of the uid/gid or return NFS4ERR_BADOWNER. This patch adds a sysctl vfs.nfsd.enable_stringtouid, which can be set to enable the server w.r.t. accepting numeric string. It also ensures that NFS4ERR_BADOWNER is returned if numeric uid/gid strings are not enabled. This fixes the server for recent Linux nfs4 clients that use numeric uid/gid strings by default. Modified: stable/9/sys/fs/nfs/nfs_commonsubs.c stable/9/sys/fs/nfsserver/nfs_nfsdport.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- stable/9/sys/fs/nfs/nfs_commonsubs.c Fri May 9 00:28:07 2014 (r265723) +++ stable/9/sys/fs/nfs/nfs_commonsubs.c Fri May 9 00:34:29 2014 (r265724) @@ -65,6 +65,7 @@ uid_t nfsrv_defaultuid; gid_t nfsrv_defaultgid; int nfsrv_lease = NFSRV_LEASE; int ncl_mbuf_mlen = MLEN; +int nfsd_enable_stringtouid = 0; NFSNAMEIDMUTEX; NFSSOCKMUTEX; @@ -2621,9 +2622,14 @@ nfsv4_strtouid(struct nfsrv_descript *nd /* If a string of digits and an AUTH_SYS mount, just convert it. */ str0 = str; tuid = (uid_t)strtoul(str0, &endstr, 10); - if ((endstr - str0) == len && - (nd->nd_flag & (ND_KERBV | ND_NFSCL)) == ND_NFSCL) { - *uidp = tuid; + if ((endstr - str0) == len) { + /* A numeric string. */ + if ((nd->nd_flag & ND_KERBV) == 0 && + ((nd->nd_flag & ND_NFSCL) != 0 || + nfsd_enable_stringtouid != 0)) + *uidp = tuid; + else + error = NFSERR_BADOWNER; goto out; } /* @@ -2826,9 +2832,14 @@ nfsv4_strtogid(struct nfsrv_descript *nd /* If a string of digits and an AUTH_SYS mount, just convert it. */ str0 = str; tgid = (gid_t)strtoul(str0, &endstr, 10); - if ((endstr - str0) == len && - (nd->nd_flag & (ND_KERBV | ND_NFSCL)) == ND_NFSCL) { - *gidp = tgid; + if ((endstr - str0) == len) { + /* A numeric string. */ + if ((nd->nd_flag & ND_KERBV) == 0 && + ((nd->nd_flag & ND_NFSCL) != 0 || + nfsd_enable_stringtouid != 0)) + *gidp = tgid; + else + error = NFSERR_BADOWNER; goto out; } /* Modified: stable/9/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/9/sys/fs/nfsserver/nfs_nfsdport.c Fri May 9 00:28:07 2014 (r265723) +++ stable/9/sys/fs/nfsserver/nfs_nfsdport.c Fri May 9 00:34:29 2014 (r265724) @@ -80,6 +80,7 @@ static int nfs_commit_blks; static int nfs_commit_miss; extern int nfsrv_issuedelegs; extern int nfsrv_dolocallocks; +extern int nfsd_enable_stringtouid; SYSCTL_NODE(_vfs, OID_AUTO, nfsd, CTLFLAG_RW, 0, "New NFS server"); SYSCTL_INT(_vfs_nfsd, OID_AUTO, mirrormnt, CTLFLAG_RW, @@ -92,6 +93,8 @@ SYSCTL_INT(_vfs_nfsd, OID_AUTO, issue_de &nfsrv_issuedelegs, 0, "Enable nfsd to issue delegations"); SYSCTL_INT(_vfs_nfsd, OID_AUTO, enable_locallocks, CTLFLAG_RW, &nfsrv_dolocallocks, 0, "Enable nfsd to acquire local locks on files"); +SYSCTL_INT(_vfs_nfsd, OID_AUTO, enable_stringtouid, CTLFLAG_RW, + &nfsd_enable_stringtouid, 0, "Enable nfsd to accept numeric owner_names"); #define MAX_REORDERED_RPC 16 #define NUM_HEURISTIC 1031 From owner-svn-src-stable@FreeBSD.ORG Fri May 9 01:20:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 86457AAB; Fri, 9 May 2014 01:20:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 59517C8C; Fri, 9 May 2014 01:20:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s491KeJv009243; Fri, 9 May 2014 01:20:40 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s491KeML009238; Fri, 9 May 2014 01:20:40 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201405090120.s491KeML009238@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Fri, 9 May 2014 01:20:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265726 - stable/10/lib/libc/regex X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 01:20:40 -0000 Author: pfg Date: Fri May 9 01:20:39 2014 New Revision: 265726 URL: http://svnweb.freebsd.org/changeset/base/265726 Log: MFC r265202: Remove some unreachable breaks in regex. This is based on a much bigger cleanup done in Illumos. Reference: https://www.illumos.org/issues/2077 Modified: stable/10/lib/libc/regex/engine.c stable/10/lib/libc/regex/regcomp.c Modified: stable/10/lib/libc/regex/engine.c ============================================================================== --- stable/10/lib/libc/regex/engine.c Fri May 9 01:13:14 2014 (r265725) +++ stable/10/lib/libc/regex/engine.c Fri May 9 01:20:39 2014 (r265726) @@ -686,19 +686,16 @@ backref(struct match *m, while (m->g->strip[ss] != SOP(O_BACK, i)) ss++; return(backref(m, sp+len, stop, ss+1, stopst, lev, rec)); - break; case OQUEST_: /* to null or not */ dp = backref(m, sp, stop, ss+1, stopst, lev, rec); if (dp != NULL) return(dp); /* not */ return(backref(m, sp, stop, ss+OPND(s)+1, stopst, lev, rec)); - break; case OPLUS_: assert(m->lastpos != NULL); assert(lev+1 <= m->g->nplus); m->lastpos[lev+1] = sp; return(backref(m, sp, stop, ss+1, stopst, lev+1, rec)); - break; case O_PLUS: if (sp == m->lastpos[lev]) /* last pass matched null */ return(backref(m, sp, stop, ss+1, stopst, lev-1, rec)); @@ -709,7 +706,6 @@ backref(struct match *m, return(backref(m, sp, stop, ss+1, stopst, lev-1, rec)); else return(dp); - break; case OCH_: /* find the right one, if any */ ssub = ss + 1; esub = ss + OPND(s) - 1; @@ -730,6 +726,7 @@ backref(struct match *m, else assert(OP(m->g->strip[esub]) == O_CH); } + /* NOTREACHED */ break; case OLPAREN: /* must undo assignment if rest fails */ i = OPND(s); @@ -741,7 +738,6 @@ backref(struct match *m, return(dp); m->pmatch[i].rm_so = offsave; return(NULL); - break; case ORPAREN: /* must undo assignment if rest fails */ i = OPND(s); assert(0 < i && i <= m->g->nsub); @@ -752,7 +748,6 @@ backref(struct match *m, return(dp); m->pmatch[i].rm_eo = offsave; return(NULL); - break; default: /* uh oh */ assert(nope); break; Modified: stable/10/lib/libc/regex/regcomp.c ============================================================================== --- stable/10/lib/libc/regex/regcomp.c Fri May 9 01:13:14 2014 (r265725) +++ stable/10/lib/libc/regex/regcomp.c Fri May 9 01:20:39 2014 (r265726) @@ -746,7 +746,6 @@ p_b_term(struct parse *p, cset *cs) case '-': SETERROR(REG_ERANGE); return; /* NOTE RETURN */ - break; default: c = '\0'; break; From owner-svn-src-stable@FreeBSD.ORG Fri May 9 01:25:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 57CD9C45; Fri, 9 May 2014 01:25:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A962CB2; Fri, 9 May 2014 01:25:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s491PQ12017976; Fri, 9 May 2014 01:25:26 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s491PPKw017965; Fri, 9 May 2014 01:25:25 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201405090125.s491PPKw017965@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Fri, 9 May 2014 01:25:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265727 - stable/9/lib/libc/regex X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 01:25:26 -0000 Author: pfg Date: Fri May 9 01:25:25 2014 New Revision: 265727 URL: http://svnweb.freebsd.org/changeset/base/265727 Log: MFC r265202: Remove some unreachable breaks in regex. This is based on a much bigger cleanup done in Illumos. Reference: https://www.illumos.org/issues/2077 Modified: stable/9/lib/libc/regex/engine.c stable/9/lib/libc/regex/regcomp.c Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/regex/engine.c ============================================================================== --- stable/9/lib/libc/regex/engine.c Fri May 9 01:20:39 2014 (r265726) +++ stable/9/lib/libc/regex/engine.c Fri May 9 01:25:25 2014 (r265727) @@ -686,19 +686,16 @@ backref(struct match *m, while (m->g->strip[ss] != SOP(O_BACK, i)) ss++; return(backref(m, sp+len, stop, ss+1, stopst, lev, rec)); - break; case OQUEST_: /* to null or not */ dp = backref(m, sp, stop, ss+1, stopst, lev, rec); if (dp != NULL) return(dp); /* not */ return(backref(m, sp, stop, ss+OPND(s)+1, stopst, lev, rec)); - break; case OPLUS_: assert(m->lastpos != NULL); assert(lev+1 <= m->g->nplus); m->lastpos[lev+1] = sp; return(backref(m, sp, stop, ss+1, stopst, lev+1, rec)); - break; case O_PLUS: if (sp == m->lastpos[lev]) /* last pass matched null */ return(backref(m, sp, stop, ss+1, stopst, lev-1, rec)); @@ -709,7 +706,6 @@ backref(struct match *m, return(backref(m, sp, stop, ss+1, stopst, lev-1, rec)); else return(dp); - break; case OCH_: /* find the right one, if any */ ssub = ss + 1; esub = ss + OPND(s) - 1; @@ -730,6 +726,7 @@ backref(struct match *m, else assert(OP(m->g->strip[esub]) == O_CH); } + /* NOTREACHED */ break; case OLPAREN: /* must undo assignment if rest fails */ i = OPND(s); @@ -741,7 +738,6 @@ backref(struct match *m, return(dp); m->pmatch[i].rm_so = offsave; return(NULL); - break; case ORPAREN: /* must undo assignment if rest fails */ i = OPND(s); assert(0 < i && i <= m->g->nsub); @@ -752,7 +748,6 @@ backref(struct match *m, return(dp); m->pmatch[i].rm_eo = offsave; return(NULL); - break; default: /* uh oh */ assert(nope); break; Modified: stable/9/lib/libc/regex/regcomp.c ============================================================================== --- stable/9/lib/libc/regex/regcomp.c Fri May 9 01:20:39 2014 (r265726) +++ stable/9/lib/libc/regex/regcomp.c Fri May 9 01:25:25 2014 (r265727) @@ -746,7 +746,6 @@ p_b_term(struct parse *p, cset *cs) case '-': SETERROR(REG_ERANGE); return; /* NOTE RETURN */ - break; default: c = '\0'; break; From owner-svn-src-stable@FreeBSD.ORG Fri May 9 01:30:16 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19B88E0C; Fri, 9 May 2014 01:30:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 06AD5CDC; Fri, 9 May 2014 01:30:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s491UFFo032108; Fri, 9 May 2014 01:30:15 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s491UFl7032105; Fri, 9 May 2014 01:30:15 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201405090130.s491UFl7032105@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Fri, 9 May 2014 01:30:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265728 - stable/10/contrib/gcc/config/i386 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 01:30:16 -0000 Author: pfg Date: Fri May 9 01:30:15 2014 New Revision: 265728 URL: http://svnweb.freebsd.org/changeset/base/265728 Log: MFC r265231: gcc: fix strict alignment. From the OpenBSD log: x86-64 ABI requires arrays greater than 16 bytes to be aligned to 16byte boundary. However, GCC 16-byte aligns arrays of >=16 BITS, not BYTES. This diff improves bug detectability for code which has local arrays of [16 .. 127] bits: in those cases SSP will now detect even 1-byte overflows. Obtained from: OpenBSD (CVS rev 1.4) Modified: stable/10/contrib/gcc/config/i386/i386.c Modified: stable/10/contrib/gcc/config/i386/i386.c ============================================================================== --- stable/10/contrib/gcc/config/i386/i386.c Fri May 9 01:25:25 2014 (r265727) +++ stable/10/contrib/gcc/config/i386/i386.c Fri May 9 01:30:15 2014 (r265728) @@ -14408,7 +14408,7 @@ ix86_local_alignment (tree type, int ali if (AGGREGATE_TYPE_P (type) && TYPE_SIZE (type) && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST - && (TREE_INT_CST_LOW (TYPE_SIZE (type)) >= 16 + && (TREE_INT_CST_LOW (TYPE_SIZE (type)) >= 128 || TREE_INT_CST_HIGH (TYPE_SIZE (type))) && align < 128) return 128; } From owner-svn-src-stable@FreeBSD.ORG Fri May 9 03:52:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C599C383; Fri, 9 May 2014 03:52:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFCD0CB0; Fri, 9 May 2014 03:52:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s493qC2S059117; Fri, 9 May 2014 03:52:12 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s493qAFm058978; Fri, 9 May 2014 03:52:10 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201405090352.s493qAFm058978@svn.freebsd.org> From: "Kenneth D. Merry" Date: Fri, 9 May 2014 03:52:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265729 - in stable/9: share/man/man4 sys/amd64/conf sys/conf sys/dev/mpr sys/i386/conf sys/ia64/conf sys/mips/conf sys/modules sys/modules/mpr sys/sparc64/conf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 03:52:14 -0000 Author: ken Date: Fri May 9 03:52:10 2014 New Revision: 265729 URL: http://svnweb.freebsd.org/changeset/base/265729 Log: MFC the mpr(4) driver for LSI's 12Gb SAS cards. This includes r265236, r265237, r265241, r265261, r265386, r265424, and r265473. ------------------------------------------------------------------------ r265236 | ken | 2014-05-02 14:25:09 -0600 (Fri, 02 May 2014) | 51 lines Bring in the mpr(4) driver for LSI's MPT3 12Gb SAS controllers. This is derived from the mps(4) driver, but it supports only the 12Gb IT and IR hardware including the SAS 3004, SAS 3008 and SAS 3108. Some notes about this driver: o The 12Gb hardware can do "FastPath" I/O, and that capability is included in this driver. o WarpDrive functionality has been removed, since it isn't supported in the 12Gb driver interface. o The Scatter/Gather list handling code is significantly different between the 6Gb and 12Gb hardware. The 12Gb boards support IEEE Scatter/Gather lists. Thanks to LSI for developing and testing this driver for FreeBSD. share/man/man4/mpr.4: mpr(4) man page. sys/dev/mpr/*: mpr(4) driver files. sys/modules/Makefile, sys/modules/mpr/Makefile: Add a module Makefile for the mpr(4) driver. sys/conf/files: Add the mpr(4) driver. sys/amd64/conf/GENERIC, sys/i386/conf/GENERIC, sys/mips/conf/OCTEON1, sys/sparc64/conf/GENERIC: Add the mpr(4) driver to all config files that currently have the mps(4) driver. sys/ia64/conf/GENERIC: Add the mps(4) and mpr(4) drivers to the ia64 GENERIC config file. sys/i386/conf/XEN: Exclude the mpr module from building here. Submitted by: Steve McConnell Tested by: Chris Reeves Sponsored by: LSI, Spectra Logic Relnotes: LSI 12Gb SAS driver mpr(4) added ------------------------------------------------------------------------ ------------------------------------------------------------------------ r265237 | ken | 2014-05-02 14:36:20 -0600 (Fri, 02 May 2014) | 8 lines Add the mpr(4) man page to the man4 Makefile. This should have been included in r265236. Submitted by: Steve McConnell Sponsored by: LSI, Spectra Logic ------------------------------------------------------------------------ ------------------------------------------------------------------------ r265241 | brueffer | 2014-05-02 15:14:28 -0600 (Fri, 02 May 2014) | 2 lines Use our standard SYNOPSIS wording; perform some cleanup while here. ------------------------------------------------------------------------ ------------------------------------------------------------------------ r265261 | brueffer | 2014-05-03 05:15:28 -0600 (Sat, 03 May 2014) | 2 lines Add a missing colon. ------------------------------------------------------------------------ ------------------------------------------------------------------------ r265386 | ken | 2014-05-05 13:53:03 -0600 (Mon, 05 May 2014) | 15 lines Adjust #if statements inside mprsas_send_smpcmd() to more accurately reflect when unmapped I/O support was added. For FreeBSD 10, it arrived just prior to __FreeBSD_version 1000028. For FreeBSD 9, it arrived just prior to __FreeBSD_version 902001. Also, fix compiler warnings in mprsas_send_smpcmd() that happen in the i386 PAE build for non-unmapped I/O builds. These were fixed in mps(4) in revision 241145, but didn't make it into the mpr(4) driver. This change should only affect FreeBSD versions outside the above revisions, and thus doesn't affect head. Sponsored by: Spectra Logic Corporation ------------------------------------------------------------------------ ------------------------------------------------------------------------ r265424 | ken | 2014-05-06 00:18:43 -0600 (Tue, 06 May 2014) | 33 lines Fix a problem with async notifications in the mpr(4) driver. This problem only occurs on versions of FreeBSD prior to the recent CAM locking changes. (i.e. stable/9 and older versions of stable/10) This change should be a no-op for head and stable/10. If a path isn't specified, xpt_register_async() will create a fully wildcarded path and acquire a lock (the XPT lock in older versions, and via xpt_path_lock() in newer versions) to call xpt_action() for the XPT_SASYNC_CB CCB. It will then drop the lock and if the requested event includes AC_FOUND_DEVICE or AC_PATH_REGISTERED, it will get the caller up to date with any device arrivals or path registrations. The issue is that before the locking changes, each SIM lock would get acquired in turn during the EDT tree traversal process. If a path is specified for xpt_register_async(), it won't acquire and drop its own lock, but instead expects the caller to hold its own SIM lock. That works for the first part of xpt_register_async(), but causes a recursive lock acquisition once the EDT traversal happens and it comes to the SIM in question. And it isn't possible to call xpt_action() without holding a SIM lock. The locking changes fix this by using the XPT topology lock for EDT traversal, so it is no longer an issue to hold the SIM lock while calling xpt_register_async(). The solution for FreeBSD versions before the locking changes is to request notification of all device arrivals (so we pass a NULL path into xpt_register_async()) and then filter out the arrivals that are not ours. Sponsored by: Spectra Logic Corporation ------------------------------------------------------------------------ ------------------------------------------------------------------------ r265473 | ken | 2014-05-06 16:13:38 -0600 (Tue, 06 May 2014) | 7 lines Change the device name for mpr(4) from /dev/mpr_N to /dev/mprN. This is more consistent with the existing mps(4) behavior. Reviewed by: Steve McConnell ------------------------------------------------------------------------ Submitted by: Steve McConnell Tested by: Chris Reeves Sponsored by: LSI, Spectra Logic Relnotes: LSI 12Gb SAS driver mpr(4) added Added: stable/9/share/man/man4/mpr.4 - copied, changed from r265236, head/share/man/man4/mpr.4 stable/9/sys/dev/mpr/ - copied from r265236, head/sys/dev/mpr/ stable/9/sys/modules/mpr/ - copied from r265236, head/sys/modules/mpr/ Modified: stable/9/share/man/man4/Makefile stable/9/sys/amd64/conf/GENERIC stable/9/sys/conf/files stable/9/sys/dev/mpr/mpr_sas.c stable/9/sys/dev/mpr/mpr_user.c stable/9/sys/i386/conf/GENERIC stable/9/sys/i386/conf/XEN stable/9/sys/ia64/conf/GENERIC stable/9/sys/mips/conf/OCTEON1 stable/9/sys/modules/Makefile stable/9/sys/sparc64/conf/GENERIC Directory Properties: stable/9/ (props changed) stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man4/ (props changed) stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/share/man/man4/Makefile ============================================================================== --- stable/9/share/man/man4/Makefile Fri May 9 01:30:15 2014 (r265728) +++ stable/9/share/man/man4/Makefile Fri May 9 03:52:10 2014 (r265729) @@ -246,6 +246,7 @@ MAN= aac.4 \ mod_cc.4 \ mos.4 \ mouse.4 \ + mpr.4 \ mps.4 \ mpt.4 \ msk.4 \ Copied and modified: stable/9/share/man/man4/mpr.4 (from r265236, head/share/man/man4/mpr.4) ============================================================================== --- head/share/man/man4/mpr.4 Fri May 2 20:25:09 2014 (r265236, copy source) +++ stable/9/share/man/man4/mpr.4 Fri May 9 03:52:10 2014 (r265729) @@ -36,7 +36,7 @@ .\" $Id$ .\" $FreeBSD$ .\" -.Dd Apr 28, 2014 +.Dd May 2, 2014 .Dt MPR 4 .Os .Sh NAME @@ -51,7 +51,8 @@ kernel configuration file: .Cd "device mpr" .Ed .Pp -Or, to load the driver as a module at boot, place the following line in +Alternatively, to load the driver as a +module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent mpr_load="YES" @@ -65,7 +66,7 @@ controllers. .Sh HARDWARE The following controllers are supported by the .Nm -driver +driver: .Pp .Bl -bullet -compact .It @@ -156,7 +157,8 @@ control for all adapters by setting the hw.mpr.exclude_ids=Y .Ed .Pp -where Y is the target ID of the device. If more than one device is to be +where Y is the target ID of the device. +If more than one device is to be excluded, target ID's are separated by commas. .Pp Devices can be excluded from @@ -167,7 +169,8 @@ control for a specific adapter by settin dev.mpr.X.exclude_ids=Y .Ed .Pp -where X is the adapter number and Y is the target ID of the device. If more +where X is the adapter number and Y is the target ID of the device. +If more than one device is to be excluded, target ID's are separated by commas. .Sh DEBUGGING To enable debugging prints from the @@ -200,8 +203,8 @@ The following bits have the described ef .Xr cd 4 , .Xr ch 4 , .Xr da 4 , -.Xr mpt 4 , .Xr mps 4 , +.Xr mpt 4 , .Xr pci 4 , .Xr sa 4 , .Xr scsi 4 , Modified: stable/9/sys/amd64/conf/GENERIC ============================================================================== --- stable/9/sys/amd64/conf/GENERIC Fri May 9 01:30:15 2014 (r265728) +++ stable/9/sys/amd64/conf/GENERIC Fri May 9 03:52:10 2014 (r265729) @@ -106,6 +106,7 @@ device isp # Qlogic family #device ispfw # Firmware for QLogic HBAs- normally a module device mpt # LSI-Logic MPT-Fusion device mps # LSI-Logic MPT-Fusion 2 +device mpr # LSI-Logic MPT-Fusion 3 #device ncr # NCR/Symbios Logic device sym # NCR/Symbios Logic (newer chipsets + those of `ncr') device trm # Tekram DC395U/UW/F DC315U adapters Modified: stable/9/sys/conf/files ============================================================================== --- stable/9/sys/conf/files Fri May 9 01:30:15 2014 (r265728) +++ stable/9/sys/conf/files Fri May 9 03:52:10 2014 (r265729) @@ -1543,6 +1543,17 @@ dev/mmc/mmcbr_if.m standard dev/mmc/mmcbus_if.m standard dev/mmc/mmcsd.c optional mmcsd dev/mn/if_mn.c optional mn pci +dev/mpr/mpr.c optional mpr +dev/mpr/mpr_config.c optional mpr +# XXX Work around clang warning, until maintainer approves fix. +dev/mpr/mpr_mapping.c optional mpr \ + compile-with "${NORMAL_C} ${NO_WSOMETIMES_UNINITIALIZED}" +dev/mpr/mpr_pci.c optional mpr pci +dev/mpr/mpr_sas.c optional mpr \ + compile-with "${NORMAL_C} ${NO_WUNNEEDED_INTERNAL_DECL}" +dev/mpr/mpr_sas_lsi.c optional mpr +dev/mpr/mpr_table.c optional mpr +dev/mpr/mpr_user.c optional mpr dev/mps/mps.c optional mps dev/mps/mps_config.c optional mps # XXX Work around clang warning, until maintainer approves fix. Modified: stable/9/sys/dev/mpr/mpr_sas.c ============================================================================== --- head/sys/dev/mpr/mpr_sas.c Fri May 2 20:25:09 2014 (r265236) +++ stable/9/sys/dev/mpr/mpr_sas.c Fri May 9 03:52:10 2014 (r265729) @@ -813,8 +813,49 @@ mpr_attach_sas(struct mpr_softc *sc) #else event = AC_FOUND_DEVICE; #endif + + /* + * Prior to the CAM locking improvements, we can't call + * xpt_register_async() with a particular path specified. + * + * If a path isn't specified, xpt_register_async() will + * generate a wildcard path and acquire the XPT lock while + * it calls xpt_action() to execute the XPT_SASYNC_CB CCB. + * It will then drop the XPT lock once that is done. + * + * If a path is specified for xpt_register_async(), it will + * not acquire and drop the XPT lock around the call to + * xpt_action(). xpt_action() asserts that the caller + * holds the SIM lock, so the SIM lock has to be held when + * calling xpt_register_async() when the path is specified. + * + * But xpt_register_async calls xpt_for_all_devices(), + * which calls xptbustraverse(), which will acquire each + * SIM lock. When it traverses our particular bus, it will + * necessarily acquire the SIM lock, which will lead to a + * recursive lock acquisition. + * + * The CAM locking changes fix this problem by acquiring + * the XPT topology lock around bus traversal in + * xptbustraverse(), so the caller can hold the SIM lock + * and it does not cause a recursive lock acquisition. + * + * These __FreeBSD_version values are approximate, especially + * for stable/10, which is two months later than the actual + * change. + */ + +#if (__FreeBSD_version < 1000703) || \ + ((__FreeBSD_version >= 1100000) && (__FreeBSD_version < 1100002)) + mpr_unlock(sc); + status = xpt_register_async(event, mprsas_async, sc, + NULL); + mpr_lock(sc); +#else status = xpt_register_async(event, mprsas_async, sc, sassc->path); +#endif + if (status != CAM_REQ_CMP) { mpr_dprint(sc, MPR_ERROR, "Error %#x registering async handler for " @@ -2501,7 +2542,8 @@ mprsas_send_smpcmd(struct mprsas_softc * sg = NULL; error = 0; -#if __FreeBSD_version >= 1000029 +#if (__FreeBSD_version >= 1000028) || \ + ((__FreeBSD_version >= 902001) && (__FreeBSD_version < 1000000)) switch (ccb->ccb_h.flags & CAM_DATA_MASK) { case CAM_DATA_PADDR: case CAM_DATA_SG_PADDR: @@ -2561,7 +2603,7 @@ mprsas_send_smpcmd(struct mprsas_softc * xpt_done(ccb); return; } -#else //__FreeBSD_version < 1000029 +#else /* __FreeBSD_version < 1000028 */ /* * XXX We don't yet support physical addresses here. */ @@ -2604,7 +2646,7 @@ mprsas_send_smpcmd(struct mprsas_softc * bus_dma_segment_t *req_sg; req_sg = (bus_dma_segment_t *)ccb->smpio.smp_request; - request = (uint8_t *)req_sg[0].ds_addr; + request = (uint8_t *)(uintptr_t)req_sg[0].ds_addr; } else request = ccb->smpio.smp_request; @@ -2612,14 +2654,14 @@ mprsas_send_smpcmd(struct mprsas_softc * bus_dma_segment_t *rsp_sg; rsp_sg = (bus_dma_segment_t *)ccb->smpio.smp_response; - response = (uint8_t *)rsp_sg[0].ds_addr; + response = (uint8_t *)(uintptr_t)rsp_sg[0].ds_addr; } else response = ccb->smpio.smp_response; } else { request = ccb->smpio.smp_request; response = ccb->smpio.smp_response; } -#endif //__FreeBSD_version >= 1000029 +#endif /* __FreeBSD_version < 1000028 */ cm = mpr_alloc_command(sc); if (cm == NULL) { @@ -2987,6 +3029,18 @@ mprsas_async(void *callback_arg, uint32_ break; /* + * See the comment in mpr_attach_sas() for a detailed + * explanation. In these versions of FreeBSD we register + * for all events and filter out the events that don't + * apply to us. + */ +#if (__FreeBSD_version < 1000703) || \ + ((__FreeBSD_version >= 1100000) && (__FreeBSD_version < 1100002)) + if (xpt_path_path_id(path) != sassc->sim->path_id) + break; +#endif + + /* * We should have a handle for this, but check to make sure. */ KASSERT(xpt_path_target_id(path) < sassc->maxtargets, @@ -3043,8 +3097,21 @@ mprsas_async(void *callback_arg, uint32_ case AC_FOUND_DEVICE: { struct ccb_getdev *cgd; + /* + * See the comment in mpr_attach_sas() for a detailed + * explanation. In these versions of FreeBSD we register + * for all events and filter out the events that don't + * apply to us. + */ +#if (__FreeBSD_version < 1000703) || \ + ((__FreeBSD_version >= 1100000) && (__FreeBSD_version < 1100002)) + if (xpt_path_path_id(path) != sc->sassc->sim->path_id) + break; +#endif + cgd = arg; mprsas_prepare_ssu(sc, path, cgd); + #if (__FreeBSD_version < 901503) || \ ((__FreeBSD_version >= 1000000) && (__FreeBSD_version < 1000006)) mprsas_check_eedp(sc, path, cgd); Modified: stable/9/sys/dev/mpr/mpr_user.c ============================================================================== --- head/sys/dev/mpr/mpr_user.c Fri May 2 20:25:09 2014 (r265236) +++ stable/9/sys/dev/mpr/mpr_user.c Fri May 9 03:52:10 2014 (r265729) @@ -212,7 +212,7 @@ mpr_attach_user(struct mpr_softc *sc) unit = device_get_unit(sc->mpr_dev); sc->mpr_cdev = make_dev(&mpr_cdevsw, unit, UID_ROOT, GID_OPERATOR, - 0640, "mpr_%d", unit); + 0640, "mpr%d", unit); if (sc->mpr_cdev == NULL) { return (ENOMEM); } Modified: stable/9/sys/i386/conf/GENERIC ============================================================================== --- stable/9/sys/i386/conf/GENERIC Fri May 9 01:30:15 2014 (r265728) +++ stable/9/sys/i386/conf/GENERIC Fri May 9 03:52:10 2014 (r265729) @@ -108,6 +108,8 @@ device hptiop # Highpoint RocketRaid 3 device isp # Qlogic family #device ispfw # Firmware for QLogic HBAs- normally a module device mpt # LSI-Logic MPT-Fusion +device mps # LSI-Logic MPT-Fusion 2 +device mpr # LSI-Logic MPT-Fusion 3 #device ncr # NCR/Symbios Logic device sym # NCR/Symbios Logic (newer chipsets + those of `ncr') device trm # Tekram DC395U/UW/F DC315U adapters Modified: stable/9/sys/i386/conf/XEN ============================================================================== --- stable/9/sys/i386/conf/XEN Fri May 9 01:30:15 2014 (r265728) +++ stable/9/sys/i386/conf/XEN Fri May 9 03:52:10 2014 (r265729) @@ -7,7 +7,7 @@ cpu I686_CPU ident XEN makeoptions DEBUG=-gdwarf-2 # Build kernel with gdb(1) debug symbols -makeoptions WITHOUT_MODULES="aha ahb amd ctl cxgb dpt drm drm2 hptnr hptmv ida malo mps mwl nve rdma sound sym trm xfs" +makeoptions WITHOUT_MODULES="aha ahb amd ctl cxgb dpt drm drm2 hptnr hptmv ida malo mpr mps mwl nve rdma sound sym trm xfs" options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption Modified: stable/9/sys/ia64/conf/GENERIC ============================================================================== --- stable/9/sys/ia64/conf/GENERIC Fri May 9 01:30:15 2014 (r265728) +++ stable/9/sys/ia64/conf/GENERIC Fri May 9 03:52:10 2014 (r265729) @@ -82,6 +82,8 @@ device ahd # AHA39320/29320 and AIC79x device hptiop # Highpoint RocketRaid 3xxx series device isp # Qlogic family device mpt # LSI-Logic MPT-Fusion +device mps # LSI-Logic MPT-Fusion 2 +device mpr # LSI-Logic MPT-Fusion 3 device sym # NCR/Symbios Logic # RAID controllers interfaced to the SCSI subsystem Modified: stable/9/sys/mips/conf/OCTEON1 ============================================================================== --- stable/9/sys/mips/conf/OCTEON1 Fri May 9 01:30:15 2014 (r265728) +++ stable/9/sys/mips/conf/OCTEON1 Fri May 9 03:52:10 2014 (r265729) @@ -120,6 +120,7 @@ device isp # Qlogic family #device ispfw # Firmware for QLogic HBAs- normally a module device mpt # LSI-Logic MPT-Fusion device mps # LSI-Logic MPT-Fusion 2 +device mpr # LSI-Logic MPT-Fusion 3 #device ncr # NCR/Symbios Logic device trm # Tekram DC395U/UW/F DC315U adapters Modified: stable/9/sys/modules/Makefile ============================================================================== --- stable/9/sys/modules/Makefile Fri May 9 01:30:15 2014 (r265728) +++ stable/9/sys/modules/Makefile Fri May 9 03:52:10 2014 (r265729) @@ -209,6 +209,7 @@ SUBDIR= \ ${_mly} \ mmc \ mmcsd \ + mpr \ mps \ mpt \ mqueue \ Modified: stable/9/sys/sparc64/conf/GENERIC ============================================================================== --- stable/9/sys/sparc64/conf/GENERIC Fri May 9 01:30:15 2014 (r265728) +++ stable/9/sys/sparc64/conf/GENERIC Fri May 9 03:52:10 2014 (r265729) @@ -97,6 +97,7 @@ device isp # Qlogic family device ispfw # Firmware module for Qlogic host adapters device mpt # LSI-Logic MPT-Fusion device mps # LSI-Logic MPT-Fusion 2 +device mpr # LSI-Logic MPT-Fusion 3 device sym # NCR/Symbios/LSI Logic 53C8XX/53C1010/53C1510D # ATA/SCSI peripherals From owner-svn-src-stable@FreeBSD.ORG Fri May 9 03:59:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 73EFCB9A; Fri, 9 May 2014 03:59:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5FC9FD3B; Fri, 9 May 2014 03:59:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s493xDq2069318; Fri, 9 May 2014 03:59:13 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s493xDS9069313; Fri, 9 May 2014 03:59:13 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201405090359.s493xDS9069313@svn.freebsd.org> From: "Kenneth D. Merry" Date: Fri, 9 May 2014 03:59:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265730 - stable/10/sys/dev/mpr X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 03:59:13 -0000 Author: ken Date: Fri May 9 03:59:12 2014 New Revision: 265730 URL: http://svnweb.freebsd.org/changeset/base/265730 Log: MFC mpr(4) driver changes. This includes r265386, r265424, and r265473. ------------------------------------------------------------------------ r265386 | ken | 2014-05-05 13:53:03 -0600 (Mon, 05 May 2014) | 15 lines Adjust #if statements inside mprsas_send_smpcmd() to more accurately reflect when unmapped I/O support was added. For FreeBSD 10, it arrived just prior to __FreeBSD_version 1000028. For FreeBSD 9, it arrived just prior to __FreeBSD_version 902001. Also, fix compiler warnings in mprsas_send_smpcmd() that happen in the i386 PAE build for non-unmapped I/O builds. These were fixed in mps(4) in revision 241145, but didn't make it into the mpr(4) driver. This change should only affect FreeBSD versions outside the above revisions, and thus doesn't affect head. Sponsored by: Spectra Logic Corporation ------------------------------------------------------------------------ ------------------------------------------------------------------------ r265424 | ken | 2014-05-06 00:18:43 -0600 (Tue, 06 May 2014) | 33 lines Fix a problem with async notifications in the mpr(4) driver. This problem only occurs on versions of FreeBSD prior to the recent CAM locking changes. (i.e. stable/9 and older versions of stable/10) This change should be a no-op for head and stable/10. If a path isn't specified, xpt_register_async() will create a fully wildcarded path and acquire a lock (the XPT lock in older versions, and via xpt_path_lock() in newer versions) to call xpt_action() for the XPT_SASYNC_CB CCB. It will then drop the lock and if the requested event includes AC_FOUND_DEVICE or AC_PATH_REGISTERED, it will get the caller up to date with any device arrivals or path registrations. The issue is that before the locking changes, each SIM lock would get acquired in turn during the EDT tree traversal process. If a path is specified for xpt_register_async(), it won't acquire and drop its own lock, but instead expects the caller to hold its own SIM lock. That works for the first part of xpt_register_async(), but causes a recursive lock acquisition once the EDT traversal happens and it comes to the SIM in question. And it isn't possible to call xpt_action() without holding a SIM lock. The locking changes fix this by using the XPT topology lock for EDT traversal, so it is no longer an issue to hold the SIM lock while calling xpt_register_async(). The solution for FreeBSD versions before the locking changes is to request notification of all device arrivals (so we pass a NULL path into xpt_register_async()) and then filter out the arrivals that are not ours. Sponsored by: Spectra Logic Corporation ------------------------------------------------------------------------ ------------------------------------------------------------------------ r265473 | ken | 2014-05-06 16:13:38 -0600 (Tue, 06 May 2014) | 7 lines Change the device name for mpr(4) from /dev/mpr_N to /dev/mprN. This is more consistent with the existing mps(4) behavior. Reviewed by: Steve McConnell ------------------------------------------------------------------------ Sponsored by: LSI, Spectra Logic Modified: stable/10/sys/dev/mpr/mpr_sas.c stable/10/sys/dev/mpr/mpr_user.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mpr/mpr_sas.c ============================================================================== --- stable/10/sys/dev/mpr/mpr_sas.c Fri May 9 03:52:10 2014 (r265729) +++ stable/10/sys/dev/mpr/mpr_sas.c Fri May 9 03:59:12 2014 (r265730) @@ -813,8 +813,49 @@ mpr_attach_sas(struct mpr_softc *sc) #else event = AC_FOUND_DEVICE; #endif + + /* + * Prior to the CAM locking improvements, we can't call + * xpt_register_async() with a particular path specified. + * + * If a path isn't specified, xpt_register_async() will + * generate a wildcard path and acquire the XPT lock while + * it calls xpt_action() to execute the XPT_SASYNC_CB CCB. + * It will then drop the XPT lock once that is done. + * + * If a path is specified for xpt_register_async(), it will + * not acquire and drop the XPT lock around the call to + * xpt_action(). xpt_action() asserts that the caller + * holds the SIM lock, so the SIM lock has to be held when + * calling xpt_register_async() when the path is specified. + * + * But xpt_register_async calls xpt_for_all_devices(), + * which calls xptbustraverse(), which will acquire each + * SIM lock. When it traverses our particular bus, it will + * necessarily acquire the SIM lock, which will lead to a + * recursive lock acquisition. + * + * The CAM locking changes fix this problem by acquiring + * the XPT topology lock around bus traversal in + * xptbustraverse(), so the caller can hold the SIM lock + * and it does not cause a recursive lock acquisition. + * + * These __FreeBSD_version values are approximate, especially + * for stable/10, which is two months later than the actual + * change. + */ + +#if (__FreeBSD_version < 1000703) || \ + ((__FreeBSD_version >= 1100000) && (__FreeBSD_version < 1100002)) + mpr_unlock(sc); + status = xpt_register_async(event, mprsas_async, sc, + NULL); + mpr_lock(sc); +#else status = xpt_register_async(event, mprsas_async, sc, sassc->path); +#endif + if (status != CAM_REQ_CMP) { mpr_dprint(sc, MPR_ERROR, "Error %#x registering async handler for " @@ -2501,7 +2542,8 @@ mprsas_send_smpcmd(struct mprsas_softc * sg = NULL; error = 0; -#if __FreeBSD_version >= 1000029 +#if (__FreeBSD_version >= 1000028) || \ + ((__FreeBSD_version >= 902001) && (__FreeBSD_version < 1000000)) switch (ccb->ccb_h.flags & CAM_DATA_MASK) { case CAM_DATA_PADDR: case CAM_DATA_SG_PADDR: @@ -2561,7 +2603,7 @@ mprsas_send_smpcmd(struct mprsas_softc * xpt_done(ccb); return; } -#else //__FreeBSD_version < 1000029 +#else /* __FreeBSD_version < 1000028 */ /* * XXX We don't yet support physical addresses here. */ @@ -2604,7 +2646,7 @@ mprsas_send_smpcmd(struct mprsas_softc * bus_dma_segment_t *req_sg; req_sg = (bus_dma_segment_t *)ccb->smpio.smp_request; - request = (uint8_t *)req_sg[0].ds_addr; + request = (uint8_t *)(uintptr_t)req_sg[0].ds_addr; } else request = ccb->smpio.smp_request; @@ -2612,14 +2654,14 @@ mprsas_send_smpcmd(struct mprsas_softc * bus_dma_segment_t *rsp_sg; rsp_sg = (bus_dma_segment_t *)ccb->smpio.smp_response; - response = (uint8_t *)rsp_sg[0].ds_addr; + response = (uint8_t *)(uintptr_t)rsp_sg[0].ds_addr; } else response = ccb->smpio.smp_response; } else { request = ccb->smpio.smp_request; response = ccb->smpio.smp_response; } -#endif //__FreeBSD_version >= 1000029 +#endif /* __FreeBSD_version < 1000028 */ cm = mpr_alloc_command(sc); if (cm == NULL) { @@ -2987,6 +3029,18 @@ mprsas_async(void *callback_arg, uint32_ break; /* + * See the comment in mpr_attach_sas() for a detailed + * explanation. In these versions of FreeBSD we register + * for all events and filter out the events that don't + * apply to us. + */ +#if (__FreeBSD_version < 1000703) || \ + ((__FreeBSD_version >= 1100000) && (__FreeBSD_version < 1100002)) + if (xpt_path_path_id(path) != sassc->sim->path_id) + break; +#endif + + /* * We should have a handle for this, but check to make sure. */ KASSERT(xpt_path_target_id(path) < sassc->maxtargets, @@ -3043,8 +3097,21 @@ mprsas_async(void *callback_arg, uint32_ case AC_FOUND_DEVICE: { struct ccb_getdev *cgd; + /* + * See the comment in mpr_attach_sas() for a detailed + * explanation. In these versions of FreeBSD we register + * for all events and filter out the events that don't + * apply to us. + */ +#if (__FreeBSD_version < 1000703) || \ + ((__FreeBSD_version >= 1100000) && (__FreeBSD_version < 1100002)) + if (xpt_path_path_id(path) != sc->sassc->sim->path_id) + break; +#endif + cgd = arg; mprsas_prepare_ssu(sc, path, cgd); + #if (__FreeBSD_version < 901503) || \ ((__FreeBSD_version >= 1000000) && (__FreeBSD_version < 1000006)) mprsas_check_eedp(sc, path, cgd); Modified: stable/10/sys/dev/mpr/mpr_user.c ============================================================================== --- stable/10/sys/dev/mpr/mpr_user.c Fri May 9 03:52:10 2014 (r265729) +++ stable/10/sys/dev/mpr/mpr_user.c Fri May 9 03:59:12 2014 (r265730) @@ -212,7 +212,7 @@ mpr_attach_user(struct mpr_softc *sc) unit = device_get_unit(sc->mpr_dev); sc->mpr_cdev = make_dev(&mpr_cdevsw, unit, UID_ROOT, GID_OPERATOR, - 0640, "mpr_%d", unit); + 0640, "mpr%d", unit); if (sc->mpr_cdev == NULL) { return (ENOMEM); } From owner-svn-src-stable@FreeBSD.ORG Fri May 9 04:08:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CBC72F9C; Fri, 9 May 2014 04:08:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B8807E37; Fri, 9 May 2014 04:08:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4948eeN089998; Fri, 9 May 2014 04:08:40 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4948eUj089997; Fri, 9 May 2014 04:08:40 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201405090408.s4948eUj089997@svn.freebsd.org> From: Glen Barber Date: Fri, 9 May 2014 04:08:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265731 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 04:08:40 -0000 Author: gjb Date: Fri May 9 04:08:40 2014 New Revision: 265731 URL: http://svnweb.freebsd.org/changeset/base/265731 Log: Document r265729, addition of mpr(4). Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 9 03:59:12 2014 (r265730) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 9 04:08:40 2014 (r265731) @@ -282,6 +282,10 @@ The vt driver has been merged from head/. + The &man.mpr.4; device has been added, + providing support for LSI Fusion-MPT 3 12Gb SCSI/SATA + controllers. + Boot Loader Changes From owner-svn-src-stable@FreeBSD.ORG Fri May 9 04:11:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2182C1CD; Fri, 9 May 2014 04:11:05 +0000 (UTC) Received: from nargothrond.kdm.org (nargothrond.kdm.org [70.56.43.81]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDF55EB8; Fri, 9 May 2014 04:11:04 +0000 (UTC) Received: from nargothrond.kdm.org (localhost [127.0.0.1]) by nargothrond.kdm.org (8.14.2/8.14.2) with ESMTP id s494AvtW045686; Thu, 8 May 2014 22:10:57 -0600 (MDT) (envelope-from ken@nargothrond.kdm.org) Received: (from ken@localhost) by nargothrond.kdm.org (8.14.2/8.14.2/Submit) id s494AvJM045685; Thu, 8 May 2014 22:10:57 -0600 (MDT) (envelope-from ken) Date: Thu, 8 May 2014 22:10:56 -0600 From: "Kenneth D. Merry" To: Glen Barber Subject: Re: svn commit: r265731 - stable/9/release/doc/en_US.ISO8859-1/relnotes Message-ID: <20140509041056.GA45391@nargothrond.kdm.org> References: <201405090408.s4948eUj089997@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201405090408.s4948eUj089997@svn.freebsd.org> User-Agent: Mutt/1.4.2i Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 04:11:05 -0000 On Fri, May 09, 2014 at 04:08:40 +0000, Glen Barber wrote: > Author: gjb > Date: Fri May 9 04:08:40 2014 > New Revision: 265731 > URL: http://svnweb.freebsd.org/changeset/base/265731 > > Log: > Document r265729, addition of mpr(4). > > Sponsored by: The FreeBSD Foundation Elapsed time: 16 minutes. That was fast! Ken -- Kenneth Merry ken@FreeBSD.ORG From owner-svn-src-stable@FreeBSD.ORG Fri May 9 04:16:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 57F3B5E2; Fri, 9 May 2014 04:16:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44F08EF2; Fri, 9 May 2014 04:16:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s494GBOo015725; Fri, 9 May 2014 04:16:11 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s494GBlJ015724; Fri, 9 May 2014 04:16:11 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201405090416.s494GBlJ015724@svn.freebsd.org> From: Glen Barber Date: Fri, 9 May 2014 04:16:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265733 - stable/10/gnu/usr.bin/groff/tmac X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 04:16:11 -0000 Author: gjb Date: Fri May 9 04:16:10 2014 New Revision: 265733 URL: http://svnweb.freebsd.org/changeset/base/265733 Log: MFC r265732: Add 9.3 to mdoc.local Sponsored by: The FreeBSD Foundation Modified: stable/10/gnu/usr.bin/groff/tmac/mdoc.local Directory Properties: stable/10/ (props changed) Modified: stable/10/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- stable/10/gnu/usr.bin/groff/tmac/mdoc.local Fri May 9 04:14:37 2014 (r265732) +++ stable/10/gnu/usr.bin/groff/tmac/mdoc.local Fri May 9 04:16:10 2014 (r265733) @@ -57,6 +57,7 @@ .ds doc-operating-system-FreeBSD-8.4 8.4 .ds doc-operating-system-FreeBSD-9.1 9.1 .ds doc-operating-system-FreeBSD-9.2 9.2 +.ds doc-operating-system-FreeBSD-9.3 9.3 .ds doc-operating-system-FreeBSD-10.0 10.0 .ds doc-operating-system-FreeBSD-10.1 10.1 .ds doc-operating-system-NetBSD-7.0 7.0 From owner-svn-src-stable@FreeBSD.ORG Fri May 9 04:18:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from hub.FreeBSD.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BD22871F; Fri, 9 May 2014 04:18:14 +0000 (UTC) Date: Fri, 9 May 2014 00:18:10 -0400 From: Glen Barber To: "Kenneth D. Merry" Subject: Re: svn commit: r265731 - stable/9/release/doc/en_US.ISO8859-1/relnotes Message-ID: <20140509041810.GF25459@hub.FreeBSD.org> References: <201405090408.s4948eUj089997@svn.freebsd.org> <20140509041056.GA45391@nargothrond.kdm.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="xkXJwpr35CY/Lc3I" Content-Disposition: inline In-Reply-To: <20140509041056.GA45391@nargothrond.kdm.org> X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 04:18:15 -0000 --xkXJwpr35CY/Lc3I Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 08, 2014 at 10:10:56PM -0600, Kenneth D. Merry wrote: > On Fri, May 09, 2014 at 04:08:40 +0000, Glen Barber wrote: > > Author: gjb > > Date: Fri May 9 04:08:40 2014 > > New Revision: 265731 > > URL: http://svnweb.freebsd.org/changeset/base/265731 > >=20 > > Log: > > Document r265729, addition of mpr(4). > > =20 > > Sponsored by: The FreeBSD Foundation >=20 > Elapsed time: 16 minutes. >=20 > That was fast! >=20 This is what happens when the RE has no life. :-) Glen --xkXJwpr35CY/Lc3I Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBCAAGBQJTbFcCAAoJELls3eqvi17QKW8P/0AoKRsKOIMxtv5A3S2Y0dWp 6TXqnETjpI9STpxVgWsqyScM0caP4WQricL/WAY1WmD3LiUbUxdfBE6P3TMtG9ii 6A26w3buXOLsuhj8+80RbT84xNFY38MMQXZmbj2tRDoSqqucLecV5vFEzomZWyy1 MVkjps27PL9RPgOhQY1wRCia87UmPOTaXQYb0kO7DcNhfGHxWeHSOSRZ00BDuGAM AmhCbdTzSFCQGIj+Y8wJq5a1R1nOz12c2OYz5DBFKCg4I8QBzB/zFq7OPRWexKA4 5CR16Cf8vhMswyV2SPaTS+Xk6I9/oPHmBB5gQ4HHXo/tdHJS0Yt8G+U5cjlZGOtN P6f8OVA6CJcX83ZXM89Jhetj7LyJQtjXg2/QmmbJdT1jwC0aPkXEpP8k6zQa57GO fMrPl8bB6P0Dsdj6hpFSJVdxCJRNTMOUxvKn1inBM2YASwxjHaf1JgDewnL4BZ2C iQAn1eSuoV4zvM1QVgi6wwXmdGS4O9iFXZFnWVPMNqJGDqTOYF3vXF7f1QMj2JHS ZgOwb3wAprr0ulZylq9gFkedQ4XFvSt9OT0i8wZQayFtIgntD5CiWGPtt2iAnjsI toxkXSUnr2OTZVthKDa2oqVf1laun6Etx3bOUTQ2ezzACNAaZljFpp4+5a09zs2R 4mpdTYMo2on0i3xwfCk0 =hzqD -----END PGP SIGNATURE----- --xkXJwpr35CY/Lc3I-- From owner-svn-src-stable@FreeBSD.ORG Fri May 9 04:18:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8C033859; Fri, 9 May 2014 04:18:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7940BF0A; Fri, 9 May 2014 04:18:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s494IWMr022099; Fri, 9 May 2014 04:18:32 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s494IWec022098; Fri, 9 May 2014 04:18:32 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201405090418.s494IWec022098@svn.freebsd.org> From: Glen Barber Date: Fri, 9 May 2014 04:18:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265734 - stable/9/gnu/usr.bin/groff/tmac X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 04:18:32 -0000 Author: gjb Date: Fri May 9 04:18:32 2014 New Revision: 265734 URL: http://svnweb.freebsd.org/changeset/base/265734 Log: MFC r265732: Add 9.3 to mdoc.local. Sponsored by: The FreeBSD Foundation Modified: stable/9/gnu/usr.bin/groff/tmac/mdoc.local Directory Properties: stable/9/gnu/usr.bin/groff/ (props changed) Modified: stable/9/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- stable/9/gnu/usr.bin/groff/tmac/mdoc.local Fri May 9 04:16:10 2014 (r265733) +++ stable/9/gnu/usr.bin/groff/tmac/mdoc.local Fri May 9 04:18:32 2014 (r265734) @@ -52,6 +52,7 @@ .ds doc-operating-system-FreeBSD-8.4 8.4 .ds doc-operating-system-FreeBSD-9.1 9.1 .ds doc-operating-system-FreeBSD-9.2 9.2 +.ds doc-operating-system-FreeBSD-9.3 9.3 .ds doc-operating-system-FreeBSD-10.0 10.0 . .\" Definitions not (yet) in doc-syms From owner-svn-src-stable@FreeBSD.ORG Fri May 9 04:21:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ECCAD9D8; Fri, 9 May 2014 04:21:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9F37F83; Fri, 9 May 2014 04:21:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s494LkGu034538; Fri, 9 May 2014 04:21:46 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s494Lk6d034536; Fri, 9 May 2014 04:21:46 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201405090421.s494Lk6d034536@svn.freebsd.org> From: Glen Barber Date: Fri, 9 May 2014 04:21:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265735 - stable/9/sys/conf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 04:21:47 -0000 Author: gjb Date: Fri May 9 04:21:46 2014 New Revision: 265735 URL: http://svnweb.freebsd.org/changeset/base/265735 Log: Mark stable/9 as 9.3-PRERELEASE to indicate the code slush is now in effect for the 9.3-RELEASE cycle. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/sys/conf/newvers.sh Modified: stable/9/sys/conf/newvers.sh ============================================================================== --- stable/9/sys/conf/newvers.sh Fri May 9 04:18:32 2014 (r265734) +++ stable/9/sys/conf/newvers.sh Fri May 9 04:21:46 2014 (r265735) @@ -31,8 +31,8 @@ # $FreeBSD$ TYPE="FreeBSD" -REVISION="9.2" -BRANCH="STABLE" +REVISION="9.3" +BRANCH="PRERELEASE" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-stable@FreeBSD.ORG Fri May 9 04:25:17 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF27FC7B; Fri, 9 May 2014 04:25:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC48AFBE; Fri, 9 May 2014 04:25:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s494PHgp053099; Fri, 9 May 2014 04:25:17 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s494PH62053096; Fri, 9 May 2014 04:25:17 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201405090425.s494PH62053096@svn.freebsd.org> From: Glen Barber Date: Fri, 9 May 2014 04:25:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265736 - stable/9/gnu/usr.bin/groff/tmac X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 04:25:17 -0000 Author: gjb Date: Fri May 9 04:25:17 2014 New Revision: 265736 URL: http://svnweb.freebsd.org/changeset/base/265736 Log: Now that stable/9 is in 9.3 mode, switch default manual page version to 9.3. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/gnu/usr.bin/groff/tmac/mdoc.local Modified: stable/9/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- stable/9/gnu/usr.bin/groff/tmac/mdoc.local Fri May 9 04:21:46 2014 (r265735) +++ stable/9/gnu/usr.bin/groff/tmac/mdoc.local Fri May 9 04:25:17 2014 (r265736) @@ -44,7 +44,7 @@ .ds doc-str-Lb-librtld_db Run-time Linker Debugging Library (librtld_db, \-lrtld_db) . .\" Default .Os value -.ds doc-default-operating-system FreeBSD\~9.2 +.ds doc-default-operating-system FreeBSD\~9.3 . .\" FreeBSD releases not found in doc-common .ds doc-operating-system-FreeBSD-7.4 7.4 From owner-svn-src-stable@FreeBSD.ORG Fri May 9 06:56:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9AFCC5CD; Fri, 9 May 2014 06:56:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84328E44; Fri, 9 May 2014 06:56:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s496uU0f087725; Fri, 9 May 2014 06:56:30 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s496uQN3087702; Fri, 9 May 2014 06:56:26 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201405090656.s496uQN3087702@svn.freebsd.org> From: Xin LI Date: Fri, 9 May 2014 06:56:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265740 - in stable/10: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/lib/libzpool/common cddl/contrib/opensolaris/lib/libzpool/common/sys sys/cddl/contrib/opensolaris/uts/c... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 06:56:30 -0000 Author: delphij Date: Fri May 9 06:56:26 2014 New Revision: 265740 URL: http://svnweb.freebsd.org/changeset/base/265740 Log: MFC r264669: MFV r264666: 4374 dn_free_ranges should use range_tree_t illumos/illumos-gate@bf16b11e8deb633dd6c4296d46e92399d1582df4 Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c stable/10/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/range_tree.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_leaf.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/bitmap.h stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c Fri May 9 05:39:57 2014 (r265739) +++ stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c Fri May 9 06:56:26 2014 (r265740) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. */ #include @@ -2741,7 +2741,8 @@ dump_simulated_ddt(spa_t *spa) dds.dds_ref_psize = zdde->zdde_ref_psize; dds.dds_ref_dsize = zdde->zdde_ref_dsize; - ddt_stat_add(&ddh_total.ddh_stat[highbit(refcnt) - 1], &dds, 0); + ddt_stat_add(&ddh_total.ddh_stat[highbit64(refcnt) - 1], + &dds, 0); umem_free(zdde, sizeof (*zdde)); } Modified: stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Fri May 9 05:39:57 2014 (r265739) +++ stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Fri May 9 06:56:26 2014 (r265740) @@ -20,6 +20,8 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #include @@ -800,20 +802,17 @@ delay(clock_t ticks) /* * Find highest one bit set. * Returns bit number + 1 of highest bit that is set, otherwise returns 0. - * High order bit is 31 (or 63 in _LP64 kernel). */ int -highbit(ulong_t i) +highbit64(uint64_t i) { - register int h = 1; + int h = 1; if (i == 0) return (0); -#ifdef _LP64 - if (i & 0xffffffff00000000ul) { + if (i & 0xffffffff00000000ULL) { h += 32; i >>= 32; } -#endif if (i & 0xffff0000) { h += 16; i >>= 16; } Modified: stable/10/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Fri May 9 05:39:57 2014 (r265739) +++ stable/10/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Fri May 9 06:56:26 2014 (r265740) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. */ /* @@ -558,7 +558,7 @@ extern void delay(clock_t ticks); extern uint64_t physmem; -extern int highbit(ulong_t i); +extern int highbit64(uint64_t i); extern int random_get_bytes(uint8_t *ptr, size_t len); extern int random_get_pseudo_bytes(uint8_t *ptr, size_t len); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Fri May 9 05:39:57 2014 (r265739) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Fri May 9 06:56:26 2014 (r265740) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ @@ -40,6 +40,7 @@ #include #include #include +#include /* * Number of times that zfs_free_range() took the slow path while doing @@ -1177,7 +1178,10 @@ dbuf_dirty(dmu_buf_impl_t *db, dmu_tx_t if (db->db_level == 0 && db->db_blkid != DMU_BONUS_BLKID && db->db_blkid != DMU_SPILL_BLKID) { mutex_enter(&dn->dn_mtx); - dnode_clear_range(dn, db->db_blkid, 1, tx); + if (dn->dn_free_ranges[txgoff] != NULL) { + range_tree_clear(dn->dn_free_ranges[txgoff], + db->db_blkid, 1); + } mutex_exit(&dn->dn_mtx); db->db_freed_in_flight = FALSE; } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c Fri May 9 05:39:57 2014 (r265739) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c Fri May 9 06:56:26 2014 (r265740) @@ -21,7 +21,7 @@ /* * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. */ #include @@ -416,7 +416,7 @@ ddt_stat_update(ddt_t *ddt, ddt_entry_t ddt_stat_generate(ddt, dde, &dds); - bucket = highbit(dds.dds_ref_blocks) - 1; + bucket = highbit64(dds.dds_ref_blocks) - 1; ASSERT(bucket >= 0); ddh = &ddt->ddt_histogram[dde->dde_type][dde->dde_class]; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Fri May 9 05:39:57 2014 (r265739) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Fri May 9 06:56:26 2014 (r265740) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. */ #include @@ -35,8 +35,7 @@ #include #include #include - -static int free_range_compar(const void *node1, const void *node2); +#include static kmem_cache_t *dnode_cache; /* @@ -92,9 +91,7 @@ dnode_cons(void *arg, void *unused, int for (i = 0; i < TXG_SIZE; i++) { list_link_init(&dn->dn_dirty_link[i]); - avl_create(&dn->dn_ranges[i], free_range_compar, - sizeof (free_range_t), - offsetof(struct free_range, fr_node)); + dn->dn_free_ranges[i] = NULL; list_create(&dn->dn_dirty_records[i], sizeof (dbuf_dirty_record_t), offsetof(dbuf_dirty_record_t, dr_dirty_node)); @@ -143,7 +140,7 @@ dnode_dest(void *arg, void *unused) for (i = 0; i < TXG_SIZE; i++) { ASSERT(!list_link_active(&dn->dn_dirty_link[i])); - avl_destroy(&dn->dn_ranges[i]); + ASSERT3P(dn->dn_free_ranges[i], ==, NULL); list_destroy(&dn->dn_dirty_records[i]); ASSERT0(dn->dn_next_nblkptr[i]); ASSERT0(dn->dn_next_nlevels[i]); @@ -316,19 +313,6 @@ dnode_buf_byteswap(void *vbuf, size_t si } } -static int -free_range_compar(const void *node1, const void *node2) -{ - const free_range_t *rp1 = node1; - const free_range_t *rp2 = node2; - - if (rp1->fr_blkid < rp2->fr_blkid) - return (-1); - else if (rp1->fr_blkid > rp2->fr_blkid) - return (1); - else return (0); -} - void dnode_setbonuslen(dnode_t *dn, int newsize, dmu_tx_t *tx) { @@ -377,7 +361,7 @@ dnode_setdblksz(dnode_t *dn, int size) 1<<(sizeof (dn->dn_phys->dn_datablkszsec) * 8)); dn->dn_datablksz = size; dn->dn_datablkszsec = size >> SPA_MINBLOCKSHIFT; - dn->dn_datablkshift = ISP2(size) ? highbit(size - 1) : 0; + dn->dn_datablkshift = ISP2(size) ? highbit64(size - 1) : 0; } static dnode_t * @@ -533,7 +517,7 @@ dnode_allocate(dnode_t *dn, dmu_object_t ASSERT0(dn->dn_next_blksz[i]); ASSERT(!list_link_active(&dn->dn_dirty_link[i])); ASSERT3P(list_head(&dn->dn_dirty_records[i]), ==, NULL); - ASSERT0(avl_numnodes(&dn->dn_ranges[i])); + ASSERT3P(dn->dn_free_ranges[i], ==, NULL); } dn->dn_type = ot; @@ -697,7 +681,8 @@ dnode_move_impl(dnode_t *odn, dnode_t *n list_move_tail(&ndn->dn_dirty_records[i], &odn->dn_dirty_records[i]); } - bcopy(&odn->dn_ranges[0], &ndn->dn_ranges[0], sizeof (odn->dn_ranges)); + bcopy(&odn->dn_free_ranges[0], &ndn->dn_free_ranges[0], + sizeof (odn->dn_free_ranges)); ndn->dn_allocated_txg = odn->dn_allocated_txg; ndn->dn_free_txg = odn->dn_free_txg; ndn->dn_assigned_txg = odn->dn_assigned_txg; @@ -760,8 +745,7 @@ dnode_move_impl(dnode_t *odn, dnode_t *n list_create(&odn->dn_dirty_records[i], sizeof (dbuf_dirty_record_t), offsetof(dbuf_dirty_record_t, dr_dirty_node)); - odn->dn_ranges[i].avl_root = NULL; - odn->dn_ranges[i].avl_numnodes = 0; + odn->dn_free_ranges[i] = NULL; odn->dn_next_nlevels[i] = 0; odn->dn_next_indblkshift[i] = 0; odn->dn_next_bonustype[i] = 0; @@ -1467,59 +1451,6 @@ out: } void -dnode_clear_range(dnode_t *dn, uint64_t blkid, uint64_t nblks, dmu_tx_t *tx) -{ - avl_tree_t *tree = &dn->dn_ranges[tx->tx_txg&TXG_MASK]; - avl_index_t where; - free_range_t *rp; - free_range_t rp_tofind; - uint64_t endblk = blkid + nblks; - - ASSERT(MUTEX_HELD(&dn->dn_mtx)); - ASSERT(nblks <= UINT64_MAX - blkid); /* no overflow */ - - dprintf_dnode(dn, "blkid=%llu nblks=%llu txg=%llu\n", - blkid, nblks, tx->tx_txg); - rp_tofind.fr_blkid = blkid; - rp = avl_find(tree, &rp_tofind, &where); - if (rp == NULL) - rp = avl_nearest(tree, where, AVL_BEFORE); - if (rp == NULL) - rp = avl_nearest(tree, where, AVL_AFTER); - - while (rp && (rp->fr_blkid <= blkid + nblks)) { - uint64_t fr_endblk = rp->fr_blkid + rp->fr_nblks; - free_range_t *nrp = AVL_NEXT(tree, rp); - - if (blkid <= rp->fr_blkid && endblk >= fr_endblk) { - /* clear this entire range */ - avl_remove(tree, rp); - kmem_free(rp, sizeof (free_range_t)); - } else if (blkid <= rp->fr_blkid && - endblk > rp->fr_blkid && endblk < fr_endblk) { - /* clear the beginning of this range */ - rp->fr_blkid = endblk; - rp->fr_nblks = fr_endblk - endblk; - } else if (blkid > rp->fr_blkid && blkid < fr_endblk && - endblk >= fr_endblk) { - /* clear the end of this range */ - rp->fr_nblks = blkid - rp->fr_blkid; - } else if (blkid > rp->fr_blkid && endblk < fr_endblk) { - /* clear a chunk out of this range */ - free_range_t *new_rp = - kmem_alloc(sizeof (free_range_t), KM_SLEEP); - - new_rp->fr_blkid = endblk; - new_rp->fr_nblks = fr_endblk - endblk; - avl_insert_here(tree, new_rp, rp, AVL_AFTER); - rp->fr_nblks = blkid - rp->fr_blkid; - } - /* there may be no overlap */ - rp = nrp; - } -} - -void dnode_free_range(dnode_t *dn, uint64_t off, uint64_t len, dmu_tx_t *tx) { dmu_buf_impl_t *db; @@ -1669,22 +1600,15 @@ done: * We will finish up this free operation in the syncing phase. */ mutex_enter(&dn->dn_mtx); - dnode_clear_range(dn, blkid, nblks, tx); - { - free_range_t *rp, *found; - avl_index_t where; - avl_tree_t *tree = &dn->dn_ranges[tx->tx_txg&TXG_MASK]; - - /* Add new range to dn_ranges */ - rp = kmem_alloc(sizeof (free_range_t), KM_SLEEP); - rp->fr_blkid = blkid; - rp->fr_nblks = nblks; - found = avl_find(tree, rp, &where); - ASSERT(found == NULL); - avl_insert(tree, rp, where); - dprintf_dnode(dn, "blkid=%llu nblks=%llu txg=%llu\n", - blkid, nblks, tx->tx_txg); + int txgoff = tx->tx_txg & TXG_MASK; + if (dn->dn_free_ranges[txgoff] == NULL) { + dn->dn_free_ranges[txgoff] = + range_tree_create(NULL, NULL, &dn->dn_mtx); } + range_tree_clear(dn->dn_free_ranges[txgoff], blkid, nblks); + range_tree_add(dn->dn_free_ranges[txgoff], blkid, nblks); + dprintf_dnode(dn, "blkid=%llu nblks=%llu txg=%llu\n", + blkid, nblks, tx->tx_txg); mutex_exit(&dn->dn_mtx); dbuf_free_range(dn, blkid, blkid + nblks - 1, tx); @@ -1712,7 +1636,6 @@ dnode_spill_freed(dnode_t *dn) uint64_t dnode_block_freed(dnode_t *dn, uint64_t blkid) { - free_range_t range_tofind; void *dp = spa_get_dsl(dn->dn_objset->os_spa); int i; @@ -1732,20 +1655,10 @@ dnode_block_freed(dnode_t *dn, uint64_t if (blkid == DMU_SPILL_BLKID) return (dnode_spill_freed(dn)); - range_tofind.fr_blkid = blkid; mutex_enter(&dn->dn_mtx); for (i = 0; i < TXG_SIZE; i++) { - free_range_t *range_found; - avl_index_t idx; - - range_found = avl_find(&dn->dn_ranges[i], &range_tofind, &idx); - if (range_found) { - ASSERT(range_found->fr_nblks > 0); - break; - } - range_found = avl_nearest(&dn->dn_ranges[i], idx, AVL_BEFORE); - if (range_found && - range_found->fr_blkid + range_found->fr_nblks > blkid) + if (dn->dn_free_ranges[i] != NULL && + range_tree_contains(dn->dn_free_ranges[i], blkid, 1)) break; } mutex_exit(&dn->dn_mtx); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Fri May 9 05:39:57 2014 (r265739) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Fri May 9 06:56:26 2014 (r265740) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. */ #include @@ -32,6 +32,7 @@ #include #include #include +#include #include static void @@ -318,7 +319,7 @@ free_children(dmu_buf_impl_t *db, uint64 * and "free" all the blocks contained there. */ static void -dnode_sync_free_range(dnode_t *dn, uint64_t blkid, uint64_t nblks, +dnode_sync_free_range_impl(dnode_t *dn, uint64_t blkid, uint64_t nblks, dmu_tx_t *tx) { blkptr_t *bp = dn->dn_phys->dn_blkptr; @@ -376,6 +377,22 @@ dnode_sync_free_range(dnode_t *dn, uint6 } } +typedef struct dnode_sync_free_range_arg { + dnode_t *dsfra_dnode; + dmu_tx_t *dsfra_tx; +} dnode_sync_free_range_arg_t; + +static void +dnode_sync_free_range(void *arg, uint64_t blkid, uint64_t nblks) +{ + dnode_sync_free_range_arg_t *dsfra = arg; + dnode_t *dn = dsfra->dsfra_dnode; + + mutex_exit(&dn->dn_mtx); + dnode_sync_free_range_impl(dn, blkid, nblks, dsfra->dsfra_tx); + mutex_enter(&dn->dn_mtx); +} + /* * Try to kick all the dnode's dbufs out of the cache... */ @@ -536,7 +553,6 @@ dnode_sync_free(dnode_t *dn, dmu_tx_t *t void dnode_sync(dnode_t *dn, dmu_tx_t *tx) { - free_range_t *rp; dnode_phys_t *dnp = dn->dn_phys; int txgoff = tx->tx_txg & TXG_MASK; list_t *list = &dn->dn_dirty_records[txgoff]; @@ -594,9 +610,9 @@ dnode_sync(dnode_t *dn, dmu_tx_t *tx) SPA_MINBLOCKSIZE) == 0); ASSERT(BP_IS_HOLE(&dnp->dn_blkptr[0]) || dn->dn_maxblkid == 0 || list_head(list) != NULL || - avl_last(&dn->dn_ranges[txgoff]) || dn->dn_next_blksz[txgoff] >> SPA_MINBLOCKSHIFT == - dnp->dn_datablkszsec); + dnp->dn_datablkszsec || + range_tree_space(dn->dn_free_ranges[txgoff]) != 0); dnp->dn_datablkszsec = dn->dn_next_blksz[txgoff] >> SPA_MINBLOCKSHIFT; dn->dn_next_blksz[txgoff] = 0; @@ -655,13 +671,16 @@ dnode_sync(dnode_t *dn, dmu_tx_t *tx) } /* process all the "freed" ranges in the file */ - while (rp = avl_last(&dn->dn_ranges[txgoff])) { - dnode_sync_free_range(dn, rp->fr_blkid, rp->fr_nblks, tx); - /* grab the mutex so we don't race with dnode_block_freed() */ + if (dn->dn_free_ranges[txgoff] != NULL) { + dnode_sync_free_range_arg_t dsfra; + dsfra.dsfra_dnode = dn; + dsfra.dsfra_tx = tx; mutex_enter(&dn->dn_mtx); - avl_remove(&dn->dn_ranges[txgoff], rp); + range_tree_vacate(dn->dn_free_ranges[txgoff], + dnode_sync_free_range, &dsfra); + range_tree_destroy(dn->dn_free_ranges[txgoff]); + dn->dn_free_ranges[txgoff] = NULL; mutex_exit(&dn->dn_mtx); - kmem_free(rp, sizeof (free_range_t)); } if (freeing_dnode) { Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Fri May 9 05:39:57 2014 (r265739) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Fri May 9 06:56:26 2014 (r265740) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ @@ -789,7 +789,7 @@ metaslab_ff_alloc(metaslab_t *msp, uint6 * may exist in the same region. */ uint64_t align = size & -size; - uint64_t *cursor = &msp->ms_lbas[highbit(align) - 1]; + uint64_t *cursor = &msp->ms_lbas[highbit64(align) - 1]; avl_tree_t *t = &msp->ms_tree->rt_root; return (metaslab_block_picker(t, cursor, size, align)); @@ -826,7 +826,7 @@ metaslab_df_alloc(metaslab_t *msp, uint6 * may exist in the same region. */ uint64_t align = size & -size; - uint64_t *cursor = &msp->ms_lbas[highbit(align) - 1]; + uint64_t *cursor = &msp->ms_lbas[highbit64(align) - 1]; range_tree_t *rt = msp->ms_tree; avl_tree_t *t = &rt->rt_root; uint64_t max_size = metaslab_block_maxsize(msp); @@ -942,7 +942,7 @@ metaslab_ndf_alloc(metaslab_t *msp, uint avl_tree_t *t = &msp->ms_tree->rt_root; avl_index_t where; range_seg_t *rs, rsearch; - uint64_t hbit = highbit(size); + uint64_t hbit = highbit64(size); uint64_t *cursor = &msp->ms_lbas[hbit - 1]; uint64_t max_size = metaslab_block_maxsize(msp); @@ -1185,7 +1185,7 @@ metaslab_weight_factor(metaslab_t *msp) if (msp->ms_sm == NULL) { vdev_t *vd = msp->ms_group->mg_vd; - i = highbit(msp->ms_size) - 1; + i = highbit64(msp->ms_size) - 1; sectors = msp->ms_size >> vd->vdev_ashift; return (sectors * i * vd->vdev_ashift); } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c Fri May 9 05:39:57 2014 (r265739) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c Fri May 9 06:56:26 2014 (r265740) @@ -23,7 +23,7 @@ * Use is subject to license terms. */ /* - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013, 2014 by Delphix. All rights reserved. */ #include @@ -60,7 +60,7 @@ range_tree_stat_verify(range_tree_t *rt) for (rs = avl_first(&rt->rt_root); rs != NULL; rs = AVL_NEXT(&rt->rt_root, rs)) { uint64_t size = rs->rs_end - rs->rs_start; - int idx = highbit(size) - 1; + int idx = highbit64(size) - 1; hist[idx]++; ASSERT3U(hist[idx], !=, 0); @@ -79,7 +79,7 @@ static void range_tree_stat_incr(range_tree_t *rt, range_seg_t *rs) { uint64_t size = rs->rs_end - rs->rs_start; - int idx = highbit(size) - 1; + int idx = highbit64(size) - 1; ASSERT3U(idx, <, sizeof (rt->rt_histogram) / sizeof (*rt->rt_histogram)); @@ -93,7 +93,7 @@ static void range_tree_stat_decr(range_tree_t *rt, range_seg_t *rs) { uint64_t size = rs->rs_end - rs->rs_start; - int idx = highbit(size) - 1; + int idx = highbit64(size) - 1; ASSERT3U(idx, <, sizeof (rt->rt_histogram) / sizeof (*rt->rt_histogram)); @@ -299,10 +299,10 @@ range_tree_remove(void *arg, uint64_t st } static range_seg_t * -range_tree_find(range_tree_t *rt, uint64_t start, uint64_t size, - avl_index_t *wherep) +range_tree_find_impl(range_tree_t *rt, uint64_t start, uint64_t size) { - range_seg_t rsearch, *rs; + avl_index_t where; + range_seg_t rsearch; uint64_t end = start + size; ASSERT(MUTEX_HELD(rt->rt_lock)); @@ -310,9 +310,14 @@ range_tree_find(range_tree_t *rt, uint64 rsearch.rs_start = start; rsearch.rs_end = end; - rs = avl_find(&rt->rt_root, &rsearch, wherep); + return (avl_find(&rt->rt_root, &rsearch, &where)); +} - if (rs != NULL && rs->rs_start <= start && rs->rs_end >= end) +static range_seg_t * +range_tree_find(range_tree_t *rt, uint64_t start, uint64_t size) +{ + range_seg_t *rs = range_tree_find_impl(rt, start, size); + if (rs != NULL && rs->rs_start <= start && rs->rs_end >= start + size) return (rs); return (NULL); } @@ -321,10 +326,9 @@ void range_tree_verify(range_tree_t *rt, uint64_t off, uint64_t size) { range_seg_t *rs; - avl_index_t where; mutex_enter(rt->rt_lock); - rs = range_tree_find(rt, off, size, &where); + rs = range_tree_find(rt, off, size); if (rs != NULL) panic("freeing free block; rs=%p", (void *)rs); mutex_exit(rt->rt_lock); @@ -333,9 +337,23 @@ range_tree_verify(range_tree_t *rt, uint boolean_t range_tree_contains(range_tree_t *rt, uint64_t start, uint64_t size) { - avl_index_t where; + return (range_tree_find(rt, start, size) != NULL); +} - return (range_tree_find(rt, start, size, &where) != NULL); +/* + * Ensure that this range is not in the tree, regardless of whether + * it is currently in the tree. + */ +void +range_tree_clear(range_tree_t *rt, uint64_t start, uint64_t size) +{ + range_seg_t *rs; + + while ((rs = range_tree_find_impl(rt, start, size)) != NULL) { + uint64_t free_start = MAX(rs->rs_start, start); + uint64_t free_end = MIN(rs->rs_end, start + size); + range_tree_remove(rt, free_start, free_end - free_start); + } } void Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c Fri May 9 05:39:57 2014 (r265739) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c Fri May 9 06:56:26 2014 (r265740) @@ -23,7 +23,7 @@ * Use is subject to license terms. */ /* - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. */ #include @@ -267,7 +267,7 @@ space_map_set_blocksize(space_map_t *sm, * adding more blocks. The block size can grow until it * reaches space_map_max_blksz. */ - newsz = ISP2(size) ? size : 1ULL << highbit(size); + newsz = ISP2(size) ? size : 1ULL << highbit64(size); if (newsz > space_map_max_blksz) newsz = space_map_max_blksz; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Fri May 9 05:39:57 2014 (r265739) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Fri May 9 06:56:26 2014 (r265740) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. */ #ifndef _SYS_DNODE_H @@ -198,7 +198,7 @@ typedef struct dnode { /* protected by dn_mtx: */ kmutex_t dn_mtx; list_t dn_dirty_records[TXG_SIZE]; - avl_tree_t dn_ranges[TXG_SIZE]; + struct range_tree *dn_free_ranges[TXG_SIZE]; uint64_t dn_allocated_txg; uint64_t dn_free_txg; uint64_t dn_assigned_txg; @@ -280,8 +280,6 @@ void dnode_buf_byteswap(void *buf, size_ void dnode_verify(dnode_t *dn); int dnode_set_blksz(dnode_t *dn, uint64_t size, int ibs, dmu_tx_t *tx); void dnode_free_range(dnode_t *dn, uint64_t off, uint64_t len, dmu_tx_t *tx); -void dnode_clear_range(dnode_t *dn, uint64_t blkid, - uint64_t nblks, dmu_tx_t *tx); void dnode_diduse_space(dnode_t *dn, int64_t space); void dnode_willuse_space(dnode_t *dn, int64_t space, dmu_tx_t *tx); void dnode_new_blkid(dnode_t *dn, uint64_t blkid, dmu_tx_t *tx, boolean_t); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/range_tree.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/range_tree.h Fri May 9 05:39:57 2014 (r265739) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/range_tree.h Fri May 9 06:56:26 2014 (r265740) @@ -24,7 +24,7 @@ */ /* - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013, 2014 by Delphix. All rights reserved. */ #ifndef _SYS_RANGE_TREE_H @@ -85,6 +85,7 @@ void range_tree_stat_verify(range_tree_t void range_tree_add(void *arg, uint64_t start, uint64_t size); void range_tree_remove(void *arg, uint64_t start, uint64_t size); +void range_tree_clear(range_tree_t *rt, uint64_t start, uint64_t size); void range_tree_vacate(range_tree_t *rt, range_tree_func_t *func, void *arg); void range_tree_walk(range_tree_t *rt, range_tree_func_t *func, void *arg); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Fri May 9 05:39:57 2014 (r265739) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Fri May 9 06:56:26 2014 (r265740) @@ -22,7 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright 2013 Martin Matuska . All rights reserved. */ @@ -1626,7 +1626,7 @@ vdev_metaslab_set_size(vdev_t *vd) /* * Aim for roughly 200 metaslabs per vdev. */ - vd->vdev_ms_shift = highbit(vd->vdev_asize / 200); + vd->vdev_ms_shift = highbit64(vd->vdev_asize / 200); vd->vdev_ms_shift = MAX(vd->vdev_ms_shift, SPA_MAXBLOCKSHIFT); } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c Fri May 9 05:39:57 2014 (r265739) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c Fri May 9 06:56:26 2014 (r265740) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. * Copyright 2013 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2013 Joyent, Inc. All rights reserved. */ @@ -547,7 +547,7 @@ skip_open: pbsize = DEV_BSIZE; } - *ashift = highbit(MAX(pbsize, SPA_MINBLOCKSIZE)) - 1; + *ashift = highbit64(MAX(pbsize, SPA_MINBLOCKSIZE)) - 1; if (vd->vdev_wholedisk == 1) { int wce = 1; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c Fri May 9 05:39:57 2014 (r265739) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c Fri May 9 06:56:26 2014 (r265740) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. */ /* @@ -84,7 +84,7 @@ fzap_upgrade(zap_t *zap, dmu_tx_t *tx, z &zap->zap_f.zap_phys, zap_evict); mutex_init(&zap->zap_f.zap_num_entries_mtx, 0, 0, 0); - zap->zap_f.zap_block_shift = highbit(zap->zap_dbuf->db_size) - 1; + zap->zap_f.zap_block_shift = highbit64(zap->zap_dbuf->db_size) - 1; zp = zap->zap_f.zap_phys; /* @@ -458,7 +458,7 @@ zap_open_leaf(uint64_t blkid, dmu_buf_t rw_init(&l->l_rwlock, 0, 0, 0); rw_enter(&l->l_rwlock, RW_WRITER); l->l_blkid = blkid; - l->l_bs = highbit(db->db_size)-1; + l->l_bs = highbit64(db->db_size) - 1; l->l_dbuf = db; l->l_phys = NULL; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_leaf.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_leaf.c Fri May 9 05:39:57 2014 (r265739) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_leaf.c Fri May 9 06:56:26 2014 (r265740) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013, 2014 by Delphix. All rights reserved. */ /* @@ -105,16 +105,16 @@ zap_leaf_byteswap(zap_leaf_phys_t *buf, { int i; zap_leaf_t l; - l.l_bs = highbit(size)-1; + l.l_bs = highbit64(size) - 1; l.l_phys = buf; - buf->l_hdr.lh_block_type = BSWAP_64(buf->l_hdr.lh_block_type); - buf->l_hdr.lh_prefix = BSWAP_64(buf->l_hdr.lh_prefix); - buf->l_hdr.lh_magic = BSWAP_32(buf->l_hdr.lh_magic); - buf->l_hdr.lh_nfree = BSWAP_16(buf->l_hdr.lh_nfree); - buf->l_hdr.lh_nentries = BSWAP_16(buf->l_hdr.lh_nentries); - buf->l_hdr.lh_prefix_len = BSWAP_16(buf->l_hdr.lh_prefix_len); - buf->l_hdr.lh_freelist = BSWAP_16(buf->l_hdr.lh_freelist); + buf->l_hdr.lh_block_type = BSWAP_64(buf->l_hdr.lh_block_type); + buf->l_hdr.lh_prefix = BSWAP_64(buf->l_hdr.lh_prefix); + buf->l_hdr.lh_magic = BSWAP_32(buf->l_hdr.lh_magic); + buf->l_hdr.lh_nfree = BSWAP_16(buf->l_hdr.lh_nfree); + buf->l_hdr.lh_nentries = BSWAP_16(buf->l_hdr.lh_nentries); + buf->l_hdr.lh_prefix_len = BSWAP_16(buf->l_hdr.lh_prefix_len); + buf->l_hdr.lh_freelist = BSWAP_16(buf->l_hdr.lh_freelist); for (i = 0; i < ZAP_LEAF_HASH_NUMENTRIES(&l); i++) buf->l_hash[i] = BSWAP_16(buf->l_hash[i]); @@ -157,7 +157,7 @@ zap_leaf_init(zap_leaf_t *l, boolean_t s { int i; - l->l_bs = highbit(l->l_dbuf->db_size)-1; + l->l_bs = highbit64(l->l_dbuf->db_size) - 1; zap_memset(&l->l_phys->l_hdr, 0, sizeof (struct zap_leaf_header)); zap_memset(l->l_phys->l_hash, CHAIN_END, 2*ZAP_LEAF_HASH_NUMENTRIES(l)); for (i = 0; i < ZAP_LEAF_NUMCHUNKS(l); i++) { Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c Fri May 9 05:39:57 2014 (r265739) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c Fri May 9 06:56:26 2014 (r265740) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. */ #include @@ -380,7 +380,7 @@ mzap_open(objset_t *os, uint64_t obj, dm if (*(uint64_t *)db->db_data != ZBT_MICRO) { mutex_init(&zap->zap_f.zap_num_entries_mtx, 0, 0, 0); - zap->zap_f.zap_block_shift = highbit(db->db_size) - 1; + zap->zap_f.zap_block_shift = highbit64(db->db_size) - 1; } else { zap->zap_ismicro = TRUE; } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Fri May 9 05:39:57 2014 (r265739) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Fri May 9 06:56:26 2014 (r265740) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright (c) 2011 Nexenta Systems, Inc. All rights reserved. */ @@ -1357,7 +1357,7 @@ zio_execute(zio_t *zio) } zio->io_stage = stage; - rv = zio_pipeline[highbit(stage) - 1](&zio); + rv = zio_pipeline[highbit64(stage) - 1](&zio); if (rv == ZIO_PIPELINE_STOP) return; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/bitmap.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/bitmap.h Fri May 9 05:39:57 2014 (r265739) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/bitmap.h Fri May 9 06:56:26 2014 (r265740) @@ -24,6 +24,10 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2014 by Delphix. All rights reserved. + */ + /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ @@ -31,8 +35,6 @@ #ifndef _SYS_BITMAP_H #define _SYS_BITMAP_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -152,6 +154,7 @@ extern int bt_range(ulong_t *bitmap, siz * Low order bit is 0, high order bit is 31. */ extern int highbit(ulong_t); +extern int highbit64(uint64_t); extern int lowbit(ulong_t); extern int bt_getlowbit(ulong_t *bitmap, size_t start, size_t stop); extern void bt_copy(ulong_t *, ulong_t *, ulong_t); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h Fri May 9 05:39:57 2014 (r265739) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h Fri May 9 06:56:26 2014 (r265740) @@ -409,6 +409,38 @@ highbit(ulong_t i) return (h); } +/* + * Find highest one bit set. + * Returns bit number + 1 of highest bit that is set, otherwise returns 0. + */ +static __inline int +highbit64(uint64_t i) +{ + int h = 1; + + if (i == 0) + return (0); + if (i & 0xffffffff00000000ULL) { + h += 32; i >>= 32; + } + if (i & 0xffff0000) { + h += 16; i >>= 16; + } + if (i & 0xff00) { + h += 8; i >>= 8; + } + if (i & 0xf0) { + h += 4; i >>= 4; + } + if (i & 0xc) { + h += 2; i >>= 2; + } + if (i & 0x2) { + h += 1; + } + return (h); +} + #ifdef __cplusplus } #endif From owner-svn-src-stable@FreeBSD.ORG Fri May 9 07:04:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C66758B6; Fri, 9 May 2014 07:04:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B267AEED; Fri, 9 May 2014 07:04:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4974Djp091982; Fri, 9 May 2014 07:04:13 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4974DFt091979; Fri, 9 May 2014 07:04:13 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201405090704.s4974DFt091979@svn.freebsd.org> From: Xin LI Date: Fri, 9 May 2014 07:04:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265741 - in stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 07:04:13 -0000 Author: delphij Date: Fri May 9 07:04:12 2014 New Revision: 265741 URL: http://svnweb.freebsd.org/changeset/base/265741 Log: MFC r264671 (MFV r264668): 4754 io issued to near-full luns even after setting noalloc threshold 4755 mg_alloc_failures is no longer needed illumos/illumos@b6240e830b871f59c22a3918aebb3b36c872edba Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Fri May 9 06:56:26 2014 (r265740) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Fri May 9 07:04:12 2014 (r265741) @@ -41,7 +41,7 @@ SYSCTL_NODE(_vfs_zfs, OID_AUTO, metaslab * avoid having to load lots of space_maps in a given txg. There are, * however, some cases where we want to avoid "fast" ganging and instead * we want to do an exhaustive search of all metaslabs on this device. - * Currently we don't allow any gang, zil, or dump device related allocations + * Currently we don't allow any gang, slog, or dump device related allocations * to "fast" gang. */ #define CAN_FASTGANG(flags) \ @@ -74,18 +74,6 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, condense_ " of in-memory counterpart"); /* - * This value defines the number of allowed allocation failures per vdev. - * If a device reaches this threshold in a given txg then we consider skipping - * allocations on that device. The value of zfs_mg_alloc_failures is computed - * in zio_init() unless it has been overridden in /etc/system. - */ -int zfs_mg_alloc_failures = 0; -TUNABLE_INT("vfs.zfs.mg_alloc_failures", &zfs_mg_alloc_failures); -SYSCTL_INT(_vfs_zfs, OID_AUTO, mg_alloc_failures, CTLFLAG_RWTUN, - &zfs_mg_alloc_failures, 0, - "Number of allowed allocation failures per vdev"); - -/* * The zfs_mg_noalloc_threshold defines which metaslab groups should * be eligible for allocation. The value is defined as a percentage of * a free space. Metaslab groups that have more free space than @@ -1707,10 +1695,7 @@ metaslab_sync_done(metaslab_t *msp, uint void metaslab_sync_reassess(metaslab_group_t *mg) { - int64_t failures = mg->mg_alloc_failures; - metaslab_group_alloc_update(mg); - atomic_add_64(&mg->mg_alloc_failures, -failures); /* * Preload the next potential metaslabs @@ -1737,7 +1722,7 @@ metaslab_distance(metaslab_t *msp, dva_t static uint64_t metaslab_group_alloc(metaslab_group_t *mg, uint64_t psize, uint64_t asize, - uint64_t txg, uint64_t min_distance, dva_t *dva, int d, int flags) + uint64_t txg, uint64_t min_distance, dva_t *dva, int d) { spa_t *spa = mg->mg_vd->vdev_spa; metaslab_t *msp = NULL; @@ -1764,10 +1749,9 @@ metaslab_group_alloc(metaslab_group_t *m spa_dbgmsg(spa, "%s: failed to meet weight " "requirement: vdev %llu, txg %llu, mg %p, " "msp %p, psize %llu, asize %llu, " - "failures %llu, weight %llu", - spa_name(spa), mg->mg_vd->vdev_id, txg, - mg, msp, psize, asize, - mg->mg_alloc_failures, msp->ms_weight); + "weight %llu", spa_name(spa), + mg->mg_vd->vdev_id, txg, + mg, msp, psize, asize, msp->ms_weight); mutex_exit(&mg->mg_lock); return (-1ULL); } @@ -1800,27 +1784,6 @@ metaslab_group_alloc(metaslab_group_t *m mutex_enter(&msp->ms_lock); /* - * If we've already reached the allowable number of failed - * allocation attempts on this metaslab group then we - * consider skipping it. We skip it only if we're allowed - * to "fast" gang, the physical size is larger than - * a gang block, and we're attempting to allocate from - * the primary metaslab. - */ - if (mg->mg_alloc_failures > zfs_mg_alloc_failures && - CAN_FASTGANG(flags) && psize > SPA_GANGBLOCKSIZE && - activation_weight == METASLAB_WEIGHT_PRIMARY) { - spa_dbgmsg(spa, "%s: skipping metaslab group: " - "vdev %llu, txg %llu, mg %p, msp[%llu] %p, " - "psize %llu, asize %llu, failures %llu", - spa_name(spa), mg->mg_vd->vdev_id, txg, mg, - msp->ms_id, msp, psize, asize, - mg->mg_alloc_failures); - mutex_exit(&msp->ms_lock); - return (-1ULL); - } - - /* * Ensure that the metaslab we have selected is still * capable of handling our request. It's possible that * another thread may have changed the weight while we @@ -1859,8 +1822,6 @@ metaslab_group_alloc(metaslab_group_t *m if ((offset = metaslab_block_alloc(msp, asize)) != -1ULL) break; - atomic_inc_64(&mg->mg_alloc_failures); - metaslab_passivate(msp, metaslab_block_maxsize(msp)); mutex_exit(&msp->ms_lock); } @@ -2015,7 +1976,7 @@ top: ASSERT(P2PHASE(asize, 1ULL << vd->vdev_ashift) == 0); offset = metaslab_group_alloc(mg, psize, asize, txg, distance, - dva, d, flags); + dva, d); if (offset != -1ULL) { /* * If we've just selected this metaslab group, Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h Fri May 9 06:56:26 2014 (r265740) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h Fri May 9 07:04:12 2014 (r265741) @@ -24,7 +24,7 @@ */ /* - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. */ #ifndef _SYS_METASLAB_IMPL_H @@ -58,7 +58,6 @@ struct metaslab_group { kmutex_t mg_lock; avl_tree_t mg_metaslab_tree; uint64_t mg_aliquot; - uint64_t mg_alloc_failures; boolean_t mg_allocatable; /* can we allocate? */ uint64_t mg_free_capacity; /* percentage free */ int64_t mg_bias; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Fri May 9 06:56:26 2014 (r265740) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Fri May 9 07:04:12 2014 (r265741) @@ -90,7 +90,6 @@ kmem_cache_t *zio_data_buf_cache[SPA_MAX #ifdef _KERNEL extern vmem_t *zio_alloc_arena; #endif -extern int zfs_mg_alloc_failures; /* * The following actions directly effect the spa's sync-to-convergence logic. @@ -206,15 +205,6 @@ zio_init(void) } out: - /* - * The zio write taskqs have 1 thread per cpu, allow 1/2 of the taskqs - * to fail 3 times per txg or 8 failures, whichever is greater. - */ - if (zfs_mg_alloc_failures == 0) - zfs_mg_alloc_failures = MAX((3 * max_ncpus / 2), 8); - else if (zfs_mg_alloc_failures < 8) - zfs_mg_alloc_failures = 8; - zio_inject_init(); zio_trim_ksp = kstat_create("zfs", 0, "zio_trim", "misc", From owner-svn-src-stable@FreeBSD.ORG Fri May 9 07:07:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A47FA44; Fri, 9 May 2014 07:07:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 479DCF1D; Fri, 9 May 2014 07:07:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4977QGH092582; Fri, 9 May 2014 07:07:26 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4977QWn092581; Fri, 9 May 2014 07:07:26 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201405090707.s4977QWn092581@svn.freebsd.org> From: Xin LI Date: Fri, 9 May 2014 07:07:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265742 - stable/10/usr.sbin/portsnap/portsnap X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 07:07:26 -0000 Author: delphij Date: Fri May 9 07:07:25 2014 New Revision: 265742 URL: http://svnweb.freebsd.org/changeset/base/265742 Log: MFC r264740: Use case insensitive match in portsnap. PR: bin/186510 Submitted by: olli Modified: stable/10/usr.sbin/portsnap/portsnap/portsnap.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/portsnap/portsnap/portsnap.sh ============================================================================== --- stable/10/usr.sbin/portsnap/portsnap/portsnap.sh Fri May 9 07:04:12 2014 (r265741) +++ stable/10/usr.sbin/portsnap/portsnap/portsnap.sh Fri May 9 07:07:25 2014 (r265742) @@ -362,7 +362,7 @@ fetch_pick_server_init() { # "$name server selection ..."; we allow either format. MLIST="_http._tcp.${SERVERNAME}" host -t srv "${MLIST}" | - sed -nE "s/${MLIST} (has SRV record|server selection) //p" | + sed -nE "s/${MLIST} (has SRV record|server selection) //Ip" | cut -f 1,2,4 -d ' ' | sed -e 's/\.$//' | sort > serverlist_full From owner-svn-src-stable@FreeBSD.ORG Fri May 9 07:12:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3043CDE; Fri, 9 May 2014 07:12:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC5C7FAF; Fri, 9 May 2014 07:12:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s497CXBc096569; Fri, 9 May 2014 07:12:33 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s497CVPm096548; Fri, 9 May 2014 07:12:31 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201405090712.s497CVPm096548@svn.freebsd.org> From: Xin LI Date: Fri, 9 May 2014 07:12:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265744 - in stable/10: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/common/zfs sys/cddl/c... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 07:12:34 -0000 Author: delphij Date: Fri May 9 07:12:31 2014 New Revision: 265744 URL: http://svnweb.freebsd.org/changeset/base/265744 Log: MFC r264835 (MFV r264829): 3897 zfs filesystem and snapshot limits Modified: stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_send.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Fri May 9 07:07:38 2014 (r265743) +++ stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Fri May 9 07:12:31 2014 (r265744) @@ -24,13 +24,13 @@ .\" Copyright (c) 2012, Bryan Drewery .\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. .\" Copyright (c) 2013 Nexenta Systems, Inc. All Rights Reserved. -.\" Copyright (c) 2013, Joyent, Inc. All rights reserved. +.\" Copyright (c) 2014, Joyent, Inc. All rights reserved. .\" Copyright (c) 2013, Steven Hartland .\" Copyright (c) 2014, Xin LI .\" .\" $FreeBSD$ .\" -.Dd April 5, 2014 +.Dd April 23, 2014 .Dt ZFS 8 .Os .Sh NAME @@ -542,6 +542,13 @@ if the snapshot has been marked for defe .Qq Nm Cm destroy -d command. Otherwise, the property is .Cm off . +.It Sy filesystem_count +The total number of filesystems and volumes that exist under this location in the +dataset tree. +This value is only available when a +.Sy filesystem_limit +has +been set somewhere in the tree under which the dataset resides. .It Sy logicalreferenced The amount of space that is .Qq logically @@ -600,6 +607,12 @@ The compression ratio achieved for the space of this dataset, expressed as a multiplier. See also the .Sy compressratio property. +.It Sy snapshot_count +The total number of snapshots that exist under this location in the dataset tree. +This value is only available when a +.Sy snapshot_limit +has been set somewhere +in the tree under which the dataset resides. .It Sy type The type of dataset: .Sy filesystem , volume , No or Sy snapshot . @@ -1020,6 +1033,23 @@ The .Sy mlslabel property is currently not supported on .Fx . +.It Sy filesystem_limit Ns = Ns Ar count | Cm none +Limits the number of filesystems and volumes that can exist under this point in +the dataset tree. +The limit is not enforced if the user is allowed to change +the limit. +Setting a +.Sy filesystem_limit +on a descendent of a filesystem that +already has a +.Sy filesystem_limit +does not override the ancestor's +.Sy filesystem_limit , +but rather imposes an additional limit. +This feature must be enabled to be used +.Po see +.Xr zpool-features 7 +.Pc . .It Sy mountpoint Ns = Ns Ar path | Cm none | legacy Controls the mount point used for this file system. See the .Qq Sx Mount Points @@ -1061,6 +1091,27 @@ the ancestor's quota, but rather imposes Quotas cannot be set on volumes, as the .Sy volsize property acts as an implicit quota. +.It Sy snapshot_limit Ns = Ns Ar count | Cm none +Limits the number of snapshots that can be created on a dataset and its +descendents. +Setting a +.Sy snapshot_limit +on a descendent of a dataset that already +has a +.Sy snapshot_limit +does not override the ancestor's +.Sy snapshot_limit , +but +rather imposes an additional limit. +The limit is not enforced if the user is +allowed to change the limit. +For example, this means that recursive snapshots +taken from the global zone are counted against each delegated dataset within +a jail. +This feature must be enabled to be used +.Po see +.Xr zpool-features 7 +.Pc . .It Sy userquota@ Ns Ar user Ns = Ns Ar size | Cm none Limits the amount of space consumed by the specified user. Similar to the @@ -2738,6 +2789,7 @@ protocol .It dedup Ta property .It devices Ta property .It exec Ta property +.It filesystem_limit Ta property .It logbias Ta property .It jailed Ta property .It mlslabel Ta property @@ -2756,6 +2808,7 @@ protocol .It sharenfs Ta property .It sharesmb Ta property .It snapdir Ta property +.It snapshot_limit Ta property .It sync Ta property .It utf8only Ta property .It version Ta property @@ -3102,10 +3155,12 @@ pool/home/bob compression on pool/home/bob atime on default pool/home/bob devices on default pool/home/bob exec on default +pool/home/bob filesystem_limit none default pool/home/bob setuid on default pool/home/bob readonly off default pool/home/bob jailed off default pool/home/bob snapdir hidden default +pool/home/bob snapshot_limit none default pool/home/bob aclmode discard default pool/home/bob aclinherit restricted default pool/home/bob canmount on default Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Fri May 9 07:07:38 2014 (r265743) +++ stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Fri May 9 07:12:31 2014 (r265744) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 2, 2014 +.Dd April 23, 2014 .Dt ZPOOL-FEATURES 7 .Os .Sh NAME @@ -187,6 +187,23 @@ This feature is .Sy active while there are any filesystems, volumes, or snapshots which were created after enabling this feature. +.It Sy filesystem_limits +.Bl -column "READ\-ONLY COMPATIBLE" "com.joyent:filesystem_limits" +.It GUID Ta com.joyent:filesystem_limits +.It READ\-ONLY COMPATIBLE Ta yes +.It DEPENDENCIES Ta extensible_dataset +.El +.Pp +This feature enables filesystem and snapshot limits. +These limits can be used +to control how many filesystems and/or snapshots can be created at the point in +the tree on which the limits are set. +.Pp +This feature is +.Sy active +once either of the limit properties has been +set on a dataset. +Once activated the feature is never deactivated. .It Sy lz4_compress .Bl -column "READ\-ONLY COMPATIBLE" "org.illumos:lz4_compress" .It GUID Ta org.illumos:lz4_compress Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Fri May 9 07:07:38 2014 (r265743) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Fri May 9 07:12:31 2014 (r265744) @@ -21,6 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2012 DEY Storage Systems, Inc. All rights reserved. * Copyright (c) 2011-2012 Pawel Jakub Dawidek . @@ -1910,6 +1911,10 @@ get_numeric_property(zfs_handle_t *zhp, case ZFS_PROP_REFQUOTA: case ZFS_PROP_RESERVATION: case ZFS_PROP_REFRESERVATION: + case ZFS_PROP_FILESYSTEM_LIMIT: + case ZFS_PROP_SNAPSHOT_LIMIT: + case ZFS_PROP_FILESYSTEM_COUNT: + case ZFS_PROP_SNAPSHOT_COUNT: *val = getprop_uint64(zhp, prop, source); if (*source == NULL) { @@ -2315,6 +2320,30 @@ zfs_prop_get(zfs_handle_t *zhp, zfs_prop } break; + case ZFS_PROP_FILESYSTEM_LIMIT: + case ZFS_PROP_SNAPSHOT_LIMIT: + case ZFS_PROP_FILESYSTEM_COUNT: + case ZFS_PROP_SNAPSHOT_COUNT: + + if (get_numeric_property(zhp, prop, src, &source, &val) != 0) + return (-1); + + /* + * If limit is UINT64_MAX, we translate this into 'none' (unless + * literal is set), and indicate that it's the default value. + * Otherwise, we print the number nicely and indicate that it's + * set locally. + */ + if (literal) { + (void) snprintf(propbuf, proplen, "%llu", + (u_longlong_t)val); + } else if (val == UINT64_MAX) { + (void) strlcpy(propbuf, "none", proplen); + } else { + zfs_nicenum(val, propbuf, proplen); + } + break; + case ZFS_PROP_REFRATIO: case ZFS_PROP_COMPRESSRATIO: if (get_numeric_property(zhp, prop, src, &source, &val) != 0) Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c Fri May 9 07:07:38 2014 (r265743) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c Fri May 9 07:12:31 2014 (r265744) @@ -21,6 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. * Copyright (c) 2012 by Delphix. All rights reserved. */ @@ -1268,6 +1269,16 @@ zprop_parse_value(libzfs_handle_t *hdl, "use 'none' to disable quota/refquota")); goto error; } + + /* + * Special handling for "*_limit=none". In this case it's not + * 0 but UINT64_MAX. + */ + if ((type & ZFS_TYPE_DATASET) && isnone && + (prop == ZFS_PROP_FILESYSTEM_LIMIT || + prop == ZFS_PROP_SNAPSHOT_LIMIT)) { + *ivalp = UINT64_MAX; + } break; case PROP_TYPE_INDEX: Modified: stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c Fri May 9 07:07:38 2014 (r265743) +++ stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c Fri May 9 07:12:31 2014 (r265744) @@ -205,4 +205,13 @@ zpool_feature_init(void) "com.delphix:bookmarks", "bookmarks", "\"zfs bookmark\" command", B_TRUE, B_FALSE, B_FALSE, bookmarks_deps); + + static const spa_feature_t filesystem_limits_deps[] = { + SPA_FEATURE_EXTENSIBLE_DATASET, + SPA_FEATURE_NONE + }; + zfeature_register(SPA_FEATURE_FS_SS_LIMIT, + "com.joyent:filesystem_limits", "filesystem_limits", + "Filesystem and snapshot limits.", B_TRUE, B_FALSE, B_FALSE, + filesystem_limits_deps); } Modified: stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h Fri May 9 07:07:38 2014 (r265743) +++ stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h Fri May 9 07:12:31 2014 (r265744) @@ -48,6 +48,7 @@ typedef enum spa_feature { SPA_FEATURE_HOLE_BIRTH, SPA_FEATURE_EXTENSIBLE_DATASET, SPA_FEATURE_BOOKMARKS, + SPA_FEATURE_FS_SS_LIMIT, SPA_FEATURES } spa_feature_t; Modified: stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Fri May 9 07:07:38 2014 (r265743) +++ stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Fri May 9 07:12:31 2014 (r265744) @@ -383,6 +383,18 @@ zfs_prop_init(void) zprop_register_number(ZFS_PROP_REFRESERVATION, "refreservation", 0, PROP_DEFAULT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, " | none", "REFRESERV"); + zprop_register_number(ZFS_PROP_FILESYSTEM_LIMIT, "filesystem_limit", + UINT64_MAX, PROP_DEFAULT, ZFS_TYPE_FILESYSTEM, + " | none", "FSLIMIT"); + zprop_register_number(ZFS_PROP_SNAPSHOT_LIMIT, "snapshot_limit", + UINT64_MAX, PROP_DEFAULT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, + " | none", "SSLIMIT"); + zprop_register_number(ZFS_PROP_FILESYSTEM_COUNT, "filesystem_count", + UINT64_MAX, PROP_DEFAULT, ZFS_TYPE_FILESYSTEM, + "", "FSCOUNT"); + zprop_register_number(ZFS_PROP_SNAPSHOT_COUNT, "snapshot_count", + UINT64_MAX, PROP_DEFAULT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, + "", "SSCOUNT"); /* inherit number properties */ zprop_register_number(ZFS_PROP_RECORDSIZE, "recordsize", Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Fri May 9 07:07:38 2014 (r265743) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Fri May 9 07:12:31 2014 (r265744) @@ -22,6 +22,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -758,9 +759,11 @@ dmu_objset_create_check(void *arg, dmu_t dsl_dir_rele(pdd, FTAG); return (SET_ERROR(EEXIST)); } + error = dsl_fs_ss_limit_check(pdd, 1, ZFS_PROP_FILESYSTEM_LIMIT, NULL, + doca->doca_cred); dsl_dir_rele(pdd, FTAG); - return (0); + return (error); } static void @@ -844,6 +847,12 @@ dmu_objset_clone_check(void *arg, dmu_tx dsl_dir_rele(pdd, FTAG); return (SET_ERROR(EXDEV)); } + error = dsl_fs_ss_limit_check(pdd, 1, ZFS_PROP_FILESYSTEM_LIMIT, NULL, + doca->doca_cred); + if (error != 0) { + dsl_dir_rele(pdd, FTAG); + return (SET_ERROR(EDQUOT)); + } dsl_dir_rele(pdd, FTAG); error = dsl_dataset_hold(dp, doca->doca_origin, FTAG, &origin); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Fri May 9 07:07:38 2014 (r265743) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Fri May 9 07:12:31 2014 (r265744) @@ -22,7 +22,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. - * Copyright (c) 2012, Joyent, Inc. All rights reserved. + * Copyright (c) 2014, Joyent, Inc. All rights reserved. * Copyright (c) 2012, Martin Matuska . All rights reserved. */ @@ -806,6 +806,20 @@ recv_begin_check_existing_impl(dmu_recv_ if (error != ENOENT) return (error == 0 ? EEXIST : error); + /* + * Check snapshot limit before receiving. We'll recheck again at the + * end, but might as well abort before receiving if we're already over + * the limit. + * + * Note that we do not check the file system limit with + * dsl_dir_fscount_check because the temporary %clones don't count + * against that limit. + */ + error = dsl_fs_ss_limit_check(ds->ds_dir, 1, ZFS_PROP_SNAPSHOT_LIMIT, + NULL, drba->drba_cred); + if (error != 0) + return (error); + if (fromguid != 0) { dsl_dataset_t *snap; uint64_t obj = ds->ds_phys->ds_prev_snap_obj; @@ -912,6 +926,25 @@ dmu_recv_begin_check(void *arg, dmu_tx_t if (error != 0) return (error); + /* + * Check filesystem and snapshot limits before receiving. We'll + * recheck snapshot limits again at the end (we create the + * filesystems and increment those counts during begin_sync). + */ + error = dsl_fs_ss_limit_check(ds->ds_dir, 1, + ZFS_PROP_FILESYSTEM_LIMIT, NULL, drba->drba_cred); + if (error != 0) { + dsl_dataset_rele(ds, FTAG); + return (error); + } + + error = dsl_fs_ss_limit_check(ds->ds_dir, 1, + ZFS_PROP_SNAPSHOT_LIMIT, NULL, drba->drba_cred); + if (error != 0) { + dsl_dataset_rele(ds, FTAG); + return (error); + } + if (drba->drba_origin != NULL) { dsl_dataset_t *origin; error = dsl_dataset_hold(dp, drba->drba_origin, @@ -1021,6 +1054,7 @@ dmu_recv_begin(char *tofs, char *tosnap, drc->drc_tosnap = tosnap; drc->drc_tofs = tofs; drc->drc_force = force; + drc->drc_cred = CRED(); if (drrb->drr_magic == BSWAP_64(DMU_BACKUP_MAGIC)) drc->drc_byteswap = B_TRUE; @@ -1740,7 +1774,7 @@ dmu_recv_end_check(void *arg, dmu_tx_t * return (error); } error = dsl_dataset_snapshot_check_impl(origin_head, - drc->drc_tosnap, tx, B_TRUE); + drc->drc_tosnap, tx, B_TRUE, 1, drc->drc_cred); dsl_dataset_rele(origin_head, FTAG); if (error != 0) return (error); @@ -1748,7 +1782,7 @@ dmu_recv_end_check(void *arg, dmu_tx_t * error = dsl_destroy_head_check_impl(drc->drc_ds, 1); } else { error = dsl_dataset_snapshot_check_impl(drc->drc_ds, - drc->drc_tosnap, tx, B_TRUE); + drc->drc_tosnap, tx, B_TRUE, 1, drc->drc_cred); } return (error); } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Fri May 9 07:07:38 2014 (r265743) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Fri May 9 07:12:31 2014 (r265744) @@ -22,7 +22,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Portions Copyright (c) 2011 Martin Matuska * Copyright (c) 2013 by Delphix. All rights reserved. - * Copyright (c) 2012, Joyent, Inc. All rights reserved. + * Copyright (c) 2014, Joyent, Inc. All rights reserved. * Copyright (c) 2014 RackTop Systems. */ @@ -321,7 +321,8 @@ dsl_dataset_snap_lookup(dsl_dataset_t *d } int -dsl_dataset_snap_remove(dsl_dataset_t *ds, const char *name, dmu_tx_t *tx) +dsl_dataset_snap_remove(dsl_dataset_t *ds, const char *name, dmu_tx_t *tx, + boolean_t adj_cnt) { objset_t *mos = ds->ds_dir->dd_pool->dp_meta_objset; uint64_t snapobj = ds->ds_phys->ds_snapnames_zapobj; @@ -338,6 +339,11 @@ dsl_dataset_snap_remove(dsl_dataset_t *d err = zap_remove_norm(mos, snapobj, name, mt, tx); if (err == ENOTSUP && mt == MT_FIRST) err = zap_remove(mos, snapobj, name, tx); + + if (err == 0 && adj_cnt) + dsl_fs_ss_count_adjust(ds->ds_dir, -1, + DD_FIELD_SNAPSHOT_COUNT, tx); + return (err); } @@ -765,6 +771,21 @@ dsl_dataset_create_sync(dsl_dir_t *pdd, dsl_deleg_set_create_perms(dd, tx, cr); + /* + * Since we're creating a new node we know it's a leaf, so we can + * initialize the counts if the limit feature is active. + */ + if (spa_feature_is_active(dp->dp_spa, SPA_FEATURE_FS_SS_LIMIT)) { + uint64_t cnt = 0; + objset_t *os = dd->dd_pool->dp_meta_objset; + + dsl_dir_zapify(dd, tx); + VERIFY0(zap_add(os, dd->dd_object, DD_FIELD_FILESYSTEM_COUNT, + sizeof (cnt), 1, &cnt, tx)); + VERIFY0(zap_add(os, dd->dd_object, DD_FIELD_SNAPSHOT_COUNT, + sizeof (cnt), 1, &cnt, tx)); + } + dsl_dir_rele(dd, FTAG); /* @@ -971,11 +992,12 @@ typedef struct dsl_dataset_snapshot_arg nvlist_t *ddsa_snaps; nvlist_t *ddsa_props; nvlist_t *ddsa_errors; + cred_t *ddsa_cr; } dsl_dataset_snapshot_arg_t; int dsl_dataset_snapshot_check_impl(dsl_dataset_t *ds, const char *snapname, - dmu_tx_t *tx, boolean_t recv) + dmu_tx_t *tx, boolean_t recv, uint64_t cnt, cred_t *cr) { int error; uint64_t value; @@ -1013,6 +1035,18 @@ dsl_dataset_snapshot_check_impl(dsl_data if (!recv && DS_IS_INCONSISTENT(ds)) return (SET_ERROR(EBUSY)); + /* + * Skip the check for temporary snapshots or if we have already checked + * the counts in dsl_dataset_snapshot_check. This means we really only + * check the count here when we're receiving a stream. + */ + if (cnt != 0 && cr != NULL) { + error = dsl_fs_ss_limit_check(ds->ds_dir, cnt, + ZFS_PROP_SNAPSHOT_LIMIT, NULL, cr); + if (error != 0) + return (error); + } + error = dsl_dataset_snapshot_reserve_space(ds, tx); if (error != 0) return (error); @@ -1028,6 +1062,99 @@ dsl_dataset_snapshot_check(void *arg, dm nvpair_t *pair; int rv = 0; + /* + * Pre-compute how many total new snapshots will be created for each + * level in the tree and below. This is needed for validating the + * snapshot limit when either taking a recursive snapshot or when + * taking multiple snapshots. + * + * The problem is that the counts are not actually adjusted when + * we are checking, only when we finally sync. For a single snapshot, + * this is easy, the count will increase by 1 at each node up the tree, + * but its more complicated for the recursive/multiple snapshot case. + * + * The dsl_fs_ss_limit_check function does recursively check the count + * at each level up the tree but since it is validating each snapshot + * independently we need to be sure that we are validating the complete + * count for the entire set of snapshots. We do this by rolling up the + * counts for each component of the name into an nvlist and then + * checking each of those cases with the aggregated count. + * + * This approach properly handles not only the recursive snapshot + * case (where we get all of those on the ddsa_snaps list) but also + * the sibling case (e.g. snapshot a/b and a/c so that we will also + * validate the limit on 'a' using a count of 2). + * + * We validate the snapshot names in the third loop and only report + * name errors once. + */ + if (dmu_tx_is_syncing(tx)) { + nvlist_t *cnt_track = NULL; + cnt_track = fnvlist_alloc(); + + /* Rollup aggregated counts into the cnt_track list */ + for (pair = nvlist_next_nvpair(ddsa->ddsa_snaps, NULL); + pair != NULL; + pair = nvlist_next_nvpair(ddsa->ddsa_snaps, pair)) { + char *pdelim; + uint64_t val; + char nm[MAXPATHLEN]; + + (void) strlcpy(nm, nvpair_name(pair), sizeof (nm)); + pdelim = strchr(nm, '@'); + if (pdelim == NULL) + continue; + *pdelim = '\0'; + + do { + if (nvlist_lookup_uint64(cnt_track, nm, + &val) == 0) { + /* update existing entry */ + fnvlist_add_uint64(cnt_track, nm, + val + 1); + } else { + /* add to list */ + fnvlist_add_uint64(cnt_track, nm, 1); + } + + pdelim = strrchr(nm, '/'); + if (pdelim != NULL) + *pdelim = '\0'; + } while (pdelim != NULL); + } + + /* Check aggregated counts at each level */ + for (pair = nvlist_next_nvpair(cnt_track, NULL); + pair != NULL; pair = nvlist_next_nvpair(cnt_track, pair)) { + int error = 0; + char *name; + uint64_t cnt = 0; + dsl_dataset_t *ds; + + name = nvpair_name(pair); + cnt = fnvpair_value_uint64(pair); + ASSERT(cnt > 0); + + error = dsl_dataset_hold(dp, name, FTAG, &ds); + if (error == 0) { + error = dsl_fs_ss_limit_check(ds->ds_dir, cnt, + ZFS_PROP_SNAPSHOT_LIMIT, NULL, + ddsa->ddsa_cr); + dsl_dataset_rele(ds, FTAG); + } + + if (error != 0) { + if (ddsa->ddsa_errors != NULL) + fnvlist_add_int32(ddsa->ddsa_errors, + name, error); + rv = error; + /* only report one error for this check */ + break; + } + } + nvlist_free(cnt_track); + } + for (pair = nvlist_next_nvpair(ddsa->ddsa_snaps, NULL); pair != NULL; pair = nvlist_next_nvpair(ddsa->ddsa_snaps, pair)) { int error = 0; @@ -1048,8 +1175,9 @@ dsl_dataset_snapshot_check(void *arg, dm if (error == 0) error = dsl_dataset_hold(dp, dsname, FTAG, &ds); if (error == 0) { + /* passing 0/NULL skips dsl_fs_ss_limit_check */ error = dsl_dataset_snapshot_check_impl(ds, - atp + 1, tx, B_FALSE); + atp + 1, tx, B_FALSE, 0, NULL); dsl_dataset_rele(ds, FTAG); } @@ -1061,6 +1189,7 @@ dsl_dataset_snapshot_check(void *arg, dm rv = error; } } + return (rv); } @@ -1088,6 +1217,7 @@ dsl_dataset_snapshot_sync_impl(dsl_datas bcmp(&os->os_phys->os_zil_header, &zero_zil, sizeof (zero_zil)) == 0); + dsl_fs_ss_count_adjust(ds->ds_dir, 1, DD_FIELD_SNAPSHOT_COUNT, tx); /* * The origin's ds_creation_txg has to be < TXG_INITIAL @@ -1266,6 +1396,7 @@ dsl_dataset_snapshot(nvlist_t *snaps, nv ddsa.ddsa_snaps = snaps; ddsa.ddsa_props = props; ddsa.ddsa_errors = errors; + ddsa.ddsa_cr = CRED(); if (error == 0) { error = dsl_sync_task(firstname, dsl_dataset_snapshot_check, @@ -1315,8 +1446,9 @@ dsl_dataset_snapshot_tmp_check(void *arg if (error != 0) return (error); + /* NULL cred means no limit check for tmp snapshot */ error = dsl_dataset_snapshot_check_impl(ds, ddsta->ddsta_snapname, - tx, B_FALSE); + tx, B_FALSE, 0, NULL); if (error != 0) { dsl_dataset_rele(ds, FTAG); return (error); @@ -1689,7 +1821,8 @@ dsl_dataset_rename_snapshot_sync_impl(ds spa_history_log_internal_ds(ds, "rename", tx, "-> @%s", ddrsa->ddrsa_newsnapname); - VERIFY0(dsl_dataset_snap_remove(hds, ddrsa->ddrsa_oldsnapname, tx)); + VERIFY0(dsl_dataset_snap_remove(hds, ddrsa->ddrsa_oldsnapname, tx, + B_FALSE)); mutex_enter(&ds->ds_lock); (void) strcpy(ds->ds_snapname, ddrsa->ddrsa_newsnapname); mutex_exit(&ds->ds_lock); @@ -1936,6 +2069,7 @@ typedef struct dsl_dataset_promote_arg { dsl_dataset_t *origin_origin; /* origin of the origin */ uint64_t used, comp, uncomp, unique, cloneusedsnap, originusedsnap; char *err_ds; + cred_t *cr; } dsl_dataset_promote_arg_t; static int snaplist_space(list_t *l, uint64_t mintxg, uint64_t *spacep); @@ -1953,6 +2087,7 @@ dsl_dataset_promote_check(void *arg, dmu dsl_dataset_t *origin_ds; int err; uint64_t unused; + uint64_t ss_mv_cnt; err = promote_hold(ddpa, dp, FTAG); if (err != 0) @@ -1999,6 +2134,7 @@ dsl_dataset_promote_check(void *arg, dmu * Note however, if we stop before we reach the ORIGIN we get: * uN + kN + kN-1 + ... + kM - uM-1 */ + ss_mv_cnt = 0; ddpa->used = origin_ds->ds_phys->ds_referenced_bytes; ddpa->comp = origin_ds->ds_phys->ds_compressed_bytes; ddpa->uncomp = origin_ds->ds_phys->ds_uncompressed_bytes; @@ -2007,6 +2143,8 @@ dsl_dataset_promote_check(void *arg, dmu uint64_t val, dlused, dlcomp, dluncomp; dsl_dataset_t *ds = snap->ds; + ss_mv_cnt++; + /* * If there are long holds, we won't be able to evict * the objset. @@ -2049,9 +2187,9 @@ dsl_dataset_promote_check(void *arg, dmu ddpa->origin_origin->ds_phys->ds_uncompressed_bytes; } - /* Check that there is enough space here */ + /* Check that there is enough space and limit headroom here */ err = dsl_dir_transfer_possible(origin_ds->ds_dir, hds->ds_dir, - ddpa->used); + 0, ss_mv_cnt, ddpa->used, ddpa->cr); if (err != 0) goto out; @@ -2191,10 +2329,12 @@ dsl_dataset_promote_sync(void *arg, dmu_ /* move snap name entry */ VERIFY0(dsl_dataset_get_snapname(ds)); VERIFY0(dsl_dataset_snap_remove(origin_head, - ds->ds_snapname, tx)); + ds->ds_snapname, tx, B_TRUE)); VERIFY0(zap_add(dp->dp_meta_objset, hds->ds_phys->ds_snapnames_zapobj, ds->ds_snapname, 8, 1, &ds->ds_object, tx)); + dsl_fs_ss_count_adjust(hds->ds_dir, 1, + DD_FIELD_SNAPSHOT_COUNT, tx); /* change containing dsl_dir */ dmu_buf_will_dirty(ds->ds_dbuf, tx); @@ -2432,6 +2572,7 @@ dsl_dataset_promote(const char *name, ch ddpa.ddpa_clonename = name; ddpa.err_ds = conflsnap; + ddpa.cr = CRED(); return (dsl_sync_task(name, dsl_dataset_promote_check, dsl_dataset_promote_sync, &ddpa, 2 + numsnaps)); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c Fri May 9 07:07:38 2014 (r265743) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c Fri May 9 07:12:31 2014 (r265744) @@ -22,6 +22,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. + * Copyright (c) 2013 by Joyent, Inc. All rights reserved. */ #include @@ -430,7 +431,7 @@ dsl_destroy_snapshot_sync_impl(dsl_datas ASSERT3U(val, ==, obj); } #endif - VERIFY0(dsl_dataset_snap_remove(ds_head, ds->ds_snapname, tx)); + VERIFY0(dsl_dataset_snap_remove(ds_head, ds->ds_snapname, tx, B_TRUE)); dsl_dataset_rele(ds_head, FTAG); if (ds_prev != NULL) @@ -657,6 +658,17 @@ dsl_dir_destroy_sync(uint64_t ddobj, dmu ASSERT0(dd->dd_phys->dd_head_dataset_obj); /* + * Decrement the filesystem count for all parent filesystems. + * + * When we receive an incremental stream into a filesystem that already + * exists, a temporary clone is created. We never count this temporary + * clone, whose name begins with a '%'. + */ + if (dd->dd_myname[0] != '%' && dd->dd_parent != NULL) + dsl_fs_ss_count_adjust(dd->dd_parent, -1, + DD_FIELD_FILESYSTEM_COUNT, tx); + + /* * Remove our reservation. The impl() routine avoids setting the * actual property, which would require the (already destroyed) ds. */ Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Fri May 9 07:07:38 2014 (r265743) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Fri May 9 07:12:31 2014 (r265744) @@ -23,6 +23,7 @@ * Copyright (c) 2011 Pawel Jakub Dawidek . * All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2014 Joyent, Inc. All rights reserved. */ #include @@ -44,7 +45,86 @@ #ifdef _KERNEL #include #endif +#include +#include +#include #include "zfs_namecheck.h" +#include "zfs_prop.h" + +/* + * Filesystem and Snapshot Limits + * ------------------------------ + * + * These limits are used to restrict the number of filesystems and/or snapshots + * that can be created at a given level in the tree or below. A typical + * use-case is with a delegated dataset where the administrator wants to ensure + * that a user within the zone is not creating too many additional filesystems + * or snapshots, even though they're not exceeding their space quota. + * + * The filesystem and snapshot counts are stored as extensible properties. This + * capability is controlled by a feature flag and must be enabled to be used. + * Once enabled, the feature is not active until the first limit is set. At + * that point, future operations to create/destroy filesystems or snapshots + * will validate and update the counts. + * + * Because the count properties will not exist before the feature is active, + * the counts are updated when a limit is first set on an uninitialized + * dsl_dir node in the tree (The filesystem/snapshot count on a node includes + * all of the nested filesystems/snapshots. Thus, a new leaf node has a + * filesystem count of 0 and a snapshot count of 0. Non-existent filesystem and + * snapshot count properties on a node indicate uninitialized counts on that + * node.) When first setting a limit on an uninitialized node, the code starts + * at the filesystem with the new limit and descends into all sub-filesystems + * to add the count properties. + * + * In practice this is lightweight since a limit is typically set when the + * filesystem is created and thus has no children. Once valid, changing the + * limit value won't require a re-traversal since the counts are already valid. + * When recursively fixing the counts, if a node with a limit is encountered + * during the descent, the counts are known to be valid and there is no need to + * descend into that filesystem's children. The counts on filesystems above the + * one with the new limit will still be uninitialized, unless a limit is + * eventually set on one of those filesystems. The counts are always recursively + * updated when a limit is set on a dataset, unless there is already a limit. + * When a new limit value is set on a filesystem with an existing limit, it is + * possible for the new limit to be less than the current count at that level + * since a user who can change the limit is also allowed to exceed the limit. + * + * Once the feature is active, then whenever a filesystem or snapshot is + * created, the code recurses up the tree, validating the new count against the + * limit at each initialized level. In practice, most levels will not have a + * limit set. If there is a limit at any initialized level up the tree, the + * check must pass or the creation will fail. Likewise, when a filesystem or + * snapshot is destroyed, the counts are recursively adjusted all the way up + * the initizized nodes in the tree. Renaming a filesystem into different point + * in the tree will first validate, then update the counts on each branch up to + * the common ancestor. A receive will also validate the counts and then update + * them. + * + * An exception to the above behavior is that the limit is not enforced if the + * user has permission to modify the limit. This is primarily so that + * recursive snapshots in the global zone always work. We want to prevent a + * denial-of-service in which a lower level delegated dataset could max out its + * limit and thus block recursive snapshots from being taken in the global zone. + * Because of this, it is possible for the snapshot count to be over the limit + * and snapshots taken in the global zone could cause a lower level dataset to + * hit or exceed its limit. The administrator taking the global zone recursive + * snapshot should be aware of this side-effect and behave accordingly. + * For consistency, the filesystem limit is also not enforced if the user can + * modify the limit. + * + * The filesystem and snapshot limits are validated by dsl_fs_ss_limit_check() + * and updated by dsl_fs_ss_count_adjust(). A new limit value is setup in + * dsl_dir_activate_fs_ss_limit() and the counts are adjusted, if necessary, by + * dsl_dir_init_fs_ss_count(). + * + * There is a special case when we receive a filesystem that already exists. In + * this case a temporary clone name of %X is created (see dmu_recv_begin). We + * never update the filesystem counts for temporary clones. + * + * Likewise, we do not update the snapshot counts for temporary snapshots, + * such as those created by zfs diff. + */ static uint64_t dsl_dir_space_towrite(dsl_dir_t *dd); @@ -383,6 +463,402 @@ dsl_dir_hold(dsl_pool_t *dp, const char return (err); } +/* + * If the counts are already initialized for this filesystem and its + * descendants then do nothing, otherwise initialize the counts. + * + * The counts on this filesystem, and those below, may be uninitialized due to + * either the use of a pre-existing pool which did not support the + * filesystem/snapshot limit feature, or one in which the feature had not yet + * been enabled. + * + * Recursively descend the filesystem tree and update the filesystem/snapshot + * counts on each filesystem below, then update the cumulative count on the + * current filesystem. If the filesystem already has a count set on it, + * then we know that its counts, and the counts on the filesystems below it, + * are already correct, so we don't have to update this filesystem. + */ +static void +dsl_dir_init_fs_ss_count(dsl_dir_t *dd, dmu_tx_t *tx) +{ + uint64_t my_fs_cnt = 0; + uint64_t my_ss_cnt = 0; + dsl_pool_t *dp = dd->dd_pool; + objset_t *os = dp->dp_meta_objset; + zap_cursor_t *zc; + zap_attribute_t *za; + dsl_dataset_t *ds; + + ASSERT(spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_FS_SS_LIMIT)); + ASSERT(dsl_pool_config_held(dp)); + ASSERT(dmu_tx_is_syncing(tx)); + + dsl_dir_zapify(dd, tx); + + /* + * If the filesystem count has already been initialized then we + * don't need to recurse down any further. + */ + if (zap_contains(os, dd->dd_object, DD_FIELD_FILESYSTEM_COUNT) == 0) + return; + + zc = kmem_alloc(sizeof (zap_cursor_t), KM_SLEEP); + za = kmem_alloc(sizeof (zap_attribute_t), KM_SLEEP); + + /* Iterate my child dirs */ + for (zap_cursor_init(zc, os, dd->dd_phys->dd_child_dir_zapobj); + zap_cursor_retrieve(zc, za) == 0; zap_cursor_advance(zc)) { + dsl_dir_t *chld_dd; + uint64_t count; + + VERIFY0(dsl_dir_hold_obj(dp, za->za_first_integer, NULL, FTAG, + &chld_dd)); + + /* + * Ignore hidden ($FREE, $MOS & $ORIGIN) objsets and + * temporary datasets. + */ + if (chld_dd->dd_myname[0] == '$' || + chld_dd->dd_myname[0] == '%') { + dsl_dir_rele(chld_dd, FTAG); + continue; + } + + my_fs_cnt++; /* count this child */ + + dsl_dir_init_fs_ss_count(chld_dd, tx); + + VERIFY0(zap_lookup(os, chld_dd->dd_object, + DD_FIELD_FILESYSTEM_COUNT, sizeof (count), 1, &count)); + my_fs_cnt += count; + VERIFY0(zap_lookup(os, chld_dd->dd_object, + DD_FIELD_SNAPSHOT_COUNT, sizeof (count), 1, &count)); + my_ss_cnt += count; + + dsl_dir_rele(chld_dd, FTAG); + } + zap_cursor_fini(zc); + /* Count my snapshots (we counted children's snapshots above) */ + VERIFY0(dsl_dataset_hold_obj(dd->dd_pool, + dd->dd_phys->dd_head_dataset_obj, FTAG, &ds)); + + for (zap_cursor_init(zc, os, ds->ds_phys->ds_snapnames_zapobj); + zap_cursor_retrieve(zc, za) == 0; + zap_cursor_advance(zc)) { + /* Don't count temporary snapshots */ + if (za->za_name[0] != '%') + my_ss_cnt++; + } + + dsl_dataset_rele(ds, FTAG); + + kmem_free(zc, sizeof (zap_cursor_t)); + kmem_free(za, sizeof (zap_attribute_t)); + + /* we're in a sync task, update counts */ + dmu_buf_will_dirty(dd->dd_dbuf, tx); + VERIFY0(zap_add(os, dd->dd_object, DD_FIELD_FILESYSTEM_COUNT, + sizeof (my_fs_cnt), 1, &my_fs_cnt, tx)); + VERIFY0(zap_add(os, dd->dd_object, DD_FIELD_SNAPSHOT_COUNT, + sizeof (my_ss_cnt), 1, &my_ss_cnt, tx)); +} + +static int +dsl_dir_actv_fs_ss_limit_check(void *arg, dmu_tx_t *tx) +{ + char *ddname = (char *)arg; + dsl_pool_t *dp = dmu_tx_pool(tx); + dsl_dataset_t *ds; + dsl_dir_t *dd; + int error; + + error = dsl_dataset_hold(dp, ddname, FTAG, &ds); + if (error != 0) + return (error); + + if (!spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_FS_SS_LIMIT)) { + dsl_dataset_rele(ds, FTAG); + return (SET_ERROR(ENOTSUP)); + } + + dd = ds->ds_dir; + if (spa_feature_is_active(dp->dp_spa, SPA_FEATURE_FS_SS_LIMIT) && + dsl_dir_is_zapified(dd) && + zap_contains(dp->dp_meta_objset, dd->dd_object, + DD_FIELD_FILESYSTEM_COUNT) == 0) { + dsl_dataset_rele(ds, FTAG); + return (SET_ERROR(EALREADY)); + } + + dsl_dataset_rele(ds, FTAG); + return (0); +} + +static void +dsl_dir_actv_fs_ss_limit_sync(void *arg, dmu_tx_t *tx) +{ + char *ddname = (char *)arg; + dsl_pool_t *dp = dmu_tx_pool(tx); + dsl_dataset_t *ds; + spa_t *spa; + + VERIFY0(dsl_dataset_hold(dp, ddname, FTAG, &ds)); + + spa = dsl_dataset_get_spa(ds); + + if (!spa_feature_is_active(spa, SPA_FEATURE_FS_SS_LIMIT)) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Fri May 9 07:17:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1AEB3E91; Fri, 9 May 2014 07:17:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 074A7FE0; Fri, 9 May 2014 07:17:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s497HT7K097363; Fri, 9 May 2014 07:17:29 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s497HTOB097361; Fri, 9 May 2014 07:17:29 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201405090717.s497HTOB097361@svn.freebsd.org> From: Xin LI Date: Fri, 9 May 2014 07:17:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265745 - in stable/10/sys/cddl/contrib/opensolaris: common/avl uts/common/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 07:17:30 -0000 Author: delphij Date: Fri May 9 07:17:29 2014 New Revision: 265745 URL: http://svnweb.freebsd.org/changeset/base/265745 Log: MFC r264836 (MFV r264830): 4745 fix AVL code misspellings Modified: stable/10/sys/cddl/contrib/opensolaris/common/avl/avl.c stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/avl.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/common/avl/avl.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/common/avl/avl.c Fri May 9 07:12:31 2014 (r265744) +++ stable/10/sys/cddl/contrib/opensolaris/common/avl/avl.c Fri May 9 07:17:29 2014 (r265745) @@ -37,7 +37,7 @@ * insertion and deletion relatively efficiently. Searching the tree is * still a fast operation, roughly O(log(N)). * - * The key to insertion and deletion is a set of tree maniuplations called + * The key to insertion and deletion is a set of tree manipulations called * rotations, which bring unbalanced subtrees back into the semi-balanced state. * * This implementation of AVL trees has the following peculiarities: @@ -45,7 +45,7 @@ * - The AVL specific data structures are physically embedded as fields * in the "using" data structures. To maintain generality the code * must constantly translate between "avl_node_t *" and containing - * data structure "void *"s by adding/subracting the avl_offset. + * data structure "void *"s by adding/subtracting the avl_offset. * * - Since the AVL data is always embedded in other structures, there is * no locking or memory allocation in the AVL routines. This must be @@ -94,7 +94,7 @@ #include /* - * Small arrays to translate between balance (or diff) values and child indeces. + * Small arrays to translate between balance (or diff) values and child indices. * * Code that deals with binary tree data structures will randomly use * left and right children when examining a tree. C "if()" statements @@ -114,7 +114,8 @@ static const int avl_balance2child[] = * * - If there is a left child, go to it, then to it's rightmost descendant. * - * - otherwise we return thru parent nodes until we've come from a right child. + * - otherwise we return through parent nodes until we've come from a right + * child. * * Return Value: * NULL - if at the end of the nodes @@ -919,7 +920,7 @@ avl_is_empty(avl_tree_t *tree) /* * Post-order tree walk used to visit all tree nodes and destroy the tree - * in post order. This is used for destroying a tree w/o paying any cost + * in post order. This is used for destroying a tree without paying any cost * for rebalancing it. * * example: Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/avl.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/avl.h Fri May 9 07:12:31 2014 (r265744) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/avl.h Fri May 9 07:17:29 2014 (r265745) @@ -39,7 +39,7 @@ extern "C" { #include /* - * This is a generic implemenatation of AVL trees for use in the Solaris kernel. + * This is a generic implementation of AVL trees for use in the Solaris kernel. * The interfaces provide an efficient way of implementing an ordered set of * data structures. * @@ -175,7 +175,7 @@ extern void avl_insert(avl_tree_t *tree, * Insert "new_data" in "tree" in the given "direction" either after * or before the data "here". * - * This might be usefull for avl clients caching recently accessed + * This might be useful for avl clients caching recently accessed * data to avoid doing avl_find() again for insertion. * * new_data - new data to insert From owner-svn-src-stable@FreeBSD.ORG Fri May 9 07:21:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7055CFD; Fri, 9 May 2014 07:21:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D5D1D5; Fri, 9 May 2014 07:21:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s497LXPn098811; Fri, 9 May 2014 07:21:33 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s497LXFE098810; Fri, 9 May 2014 07:21:33 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201405090721.s497LXFE098810@svn.freebsd.org> From: Xin LI Date: Fri, 9 May 2014 07:21:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265746 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 07:21:33 -0000 Author: delphij Date: Fri May 9 07:21:32 2014 New Revision: 265746 URL: http://svnweb.freebsd.org/changeset/base/265746 Log: MFC r265458: Import George Wilson's change for Illumos #4730: 4730 metaslab group taskq should be destroyed in metaslab_group_destroy() Reviewed by: Alex Reece Reviewed by: Matthew Ahrens Reviewed by: Sebastien Roy Original author: George Wilson Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Fri May 9 07:17:29 2014 (r265745) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Fri May 9 07:21:32 2014 (r265746) @@ -411,7 +411,7 @@ metaslab_group_create(metaslab_class_t * mg->mg_class = mc; mg->mg_activation_count = 0; - mg->mg_taskq = taskq_create("metaslab_group_tasksq", metaslab_load_pct, + mg->mg_taskq = taskq_create("metaslab_group_taskq", metaslab_load_pct, minclsyspri, 10, INT_MAX, TASKQ_THREADS_CPU_PCT); return (mg); @@ -429,6 +429,7 @@ metaslab_group_destroy(metaslab_group_t */ ASSERT(mg->mg_activation_count <= 0); + taskq_destroy(mg->mg_taskq); avl_destroy(&mg->mg_metaslab_tree); mutex_destroy(&mg->mg_lock); kmem_free(mg, sizeof (metaslab_group_t)); From owner-svn-src-stable@FreeBSD.ORG Fri May 9 07:24:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B85126B; Fri, 9 May 2014 07:24:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7944FEE; Fri, 9 May 2014 07:24:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s497OdFF001488; Fri, 9 May 2014 07:24:39 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s497OdDp001487; Fri, 9 May 2014 07:24:39 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201405090724.s497OdDp001487@svn.freebsd.org> From: Xin LI Date: Fri, 9 May 2014 07:24:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265747 - stable/10/lib/libmagic X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 07:24:39 -0000 Author: delphij Date: Fri May 9 07:24:39 2014 New Revision: 265747 URL: http://svnweb.freebsd.org/changeset/base/265747 Log: MFC r265464: Sort .ALLSRC before concatenating files together. This makes sure that the file are always built the same. (Note that Header and Localstuff must appear first and in that order, the sorting does not affect as a coincident effect). Submitted by: sjg Modified: stable/10/lib/libmagic/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libmagic/Makefile ============================================================================== --- stable/10/lib/libmagic/Makefile Fri May 9 07:21:32 2014 (r265746) +++ stable/10/lib/libmagic/Makefile Fri May 9 07:24:39 2014 (r265747) @@ -32,7 +32,7 @@ MAGFILES= ${CONTRDIR}/Header\ ${CONTRDIR}/Magdir/[a-z]* magic: ${MAGFILES} - cat ${.ALLSRC} > ${.TARGET} + cat ${.ALLSRC:O} > ${.TARGET} magic.mgc: mkmagic magic ./mkmagic magic From owner-svn-src-stable@FreeBSD.ORG Fri May 9 07:34:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4ADA75A5; Fri, 9 May 2014 07:34:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 36C3F1B6; Fri, 9 May 2014 07:34:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s497Yd9n005811; Fri, 9 May 2014 07:34:39 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s497YcMk005808; Fri, 9 May 2014 07:34:38 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201405090734.s497YcMk005808@svn.freebsd.org> From: Xin LI Date: Fri, 9 May 2014 07:34:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265748 - in stable/9/cddl/contrib/opensolaris/cmd: zdb zfs zpool X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 07:34:39 -0000 Author: delphij Date: Fri May 9 07:34:38 2014 New Revision: 265748 URL: http://svnweb.freebsd.org/changeset/base/265748 Log: MFC r263459 (MFV 263436-263438): 3947 zpool(1M) references nonexistent zfs-features(5) 4540 zpool(1M) man page doesn't describe "readonly" property 3948 zfs sync=default is not accepted 4611 zfs(1M) still mentions 'send -r' in synopsis 4415 zpool(1M) man page missing "import -m" description 4570 Document dedupditto pool property 4572 Dedup-related documentation additions for zpool and zdb. 1371 Add -D option description to zpool(1M) manpage 4571 Add documentation for -T and interval to "zpool list" Modified: stable/9/cddl/contrib/opensolaris/cmd/zdb/zdb.8 stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8 stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/ (props changed) stable/9/cddl/contrib/opensolaris/cmd/zfs/ (props changed) stable/9/cddl/contrib/opensolaris/cmd/zpool/ (props changed) stable/9/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/cmd/zdb/zdb.8 ============================================================================== --- stable/9/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Fri May 9 07:24:39 2014 (r265747) +++ stable/9/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Fri May 9 07:34:38 2014 (r265748) @@ -19,7 +19,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 31, 2013 +.Dd March 20, 2014 .Dt ZDB 8 .Os .Sh NAME @@ -127,6 +127,12 @@ compression ratio (compress), inflation If specified twice, display a histogram of deduplication statistics, showing the allocated (physically present on disk) and referenced (logically referenced in the pool) block counts and sizes by reference count. +.Pp +If specified a third time, display the statistics independently for each deduplication table. +.Pp +If specified a fourth time, dump the contents of the deduplication tables describing duplicate blocks. +.Pp +If specified a fifth time, also dump the contents of the deduplication tables describing unique blocks. .It Fl h Display pool history similar to .Cm zpool history , Modified: stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Fri May 9 07:24:39 2014 (r265747) +++ stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Fri May 9 07:34:38 2014 (r265748) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 2, 2014 +.Dd March 20, 2014 .Dt ZFS 8 .Os .Sh NAME @@ -1329,10 +1329,21 @@ features being supported, the new file s these properties. .Bl -tag -width 4n .It Sy casesensitivity Ns = Ns Cm sensitive | insensitive | mixed +Indicates whether the file name matching algorithm used by the file system +should be case-sensitive, case-insensitive, or allow a combination of both +styles of matching. The default value for the +.Sy casesensitivity +property is +.Cm sensitive . +Traditionally, UNIX and POSIX file systems have case-sensitive file names. +.Pp The +.Cm mixed +value for the .Sy casesensitivity -property is currently not supported on -.Fx . +property indicates that the +file system can support requests for both case-sensitive and case-insensitive +matching behavior. .It Sy normalization Ns = Ns Cm none | formC | formD | formKC | formKD Indicates whether the file system should perform a .Sy unicode Modified: stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Fri May 9 07:24:39 2014 (r265747) +++ stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Fri May 9 07:34:38 2014 (r265748) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 31, 2013 +.Dd March 20, 2014 .Dt ZPOOL 8 .Os .Sh NAME @@ -624,6 +624,9 @@ Datasets of this pool can only be mounte .It To write to a read-only pool, a export and import of the pool is required. .El +.Pp +This property can also be referred to by its shortened column name, +.Sy rdonly . .El .Pp The following properties can be set at creation time and import time, and later @@ -682,7 +685,9 @@ property. Threshold for the number of block ditto copies. If the reference count for a deduplicated block increases above this number, a new ditto copy of this block is automatically stored. Default setting is -.Cm 0 . +.Cm 0 +which causes no ditto copies to be created for deduplicated blocks. +The miniumum legal nonzero setting is 100. .It Sy delegation Ns = Ns Cm on No | Cm off Controls whether a non-privileged user is granted access based on the dataset permissions defined on the dataset. See @@ -1152,9 +1157,10 @@ option is also required. .It Fl f Forces import, even if the pool appears to be potentially active. .It Fl m -Enables import with missing log devices. +Allows a pool to import when there is a missing log device. Recent transactions +can be lost because the log device will be discarded. .It Fl N -Do not mount any filesystems from the imported pool. +Import the pool without mounting any file systems. .It Fl R Ar root Sets the .Qq Sy cachefile @@ -1245,9 +1251,10 @@ option is also required. .It Fl f Forces import, even if the pool appears to be potentially active. .It Fl m -Enables import with missing log devices. +Allows a pool to import when there is a missing log device. Recent transactions +can be lost because the log device will be discarded. .It Fl N -Do not mount any filesystems from the imported pool. +Import the pool without mounting any file systems. .It Fl R Ar root Equivalent to .Qq Fl o Cm cachefile=none,altroot= Ns Pa root @@ -1336,8 +1343,9 @@ Treat exported or foreign devices as ina .Op Ar inverval Op Ar count .Xc .Pp -Lists the given pools along with a health status and space usage. When given no -arguments, all pools in the system are listed. +Lists the given pools along with a health status and space usage. If no +.Ar pools +are specified, all pools in the system are listed. .Pp When given an interval, the output is printed every .Ar interval @@ -1349,6 +1357,17 @@ is specified, the command exits after .Ar count reports are printed. .Bl -tag -width indent +.It Fl T Cm d Ns | Ns Cm u +Print a timestamp. +.Pp +Use modifier +.Cm d +for standard date format. See +.Xr date 1 . +Use modifier +.Cm u +for unixtime +.Pq equals Qq Ic date +%s . .It Fl H Scripted mode. Do not display headers, and separate fields by a single tab instead of arbitrary space. @@ -1677,7 +1696,7 @@ Once this is done, the pool will no long not support feature flags. See .Xr zpool-features 7 -for details on compatability with system sthat support feature flags, but do +for details on compatibility with systems that support feature flags, but do not support all features enabled on the pool. .Bl -tag -width indent .It Fl a From owner-svn-src-stable@FreeBSD.ORG Fri May 9 07:35:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 116B26F2; Fri, 9 May 2014 07:35:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6A6E1BF; Fri, 9 May 2014 07:35:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s497ZeDM006038; Fri, 9 May 2014 07:35:40 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s497ZdT1006031; Fri, 9 May 2014 07:35:39 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201405090735.s497ZdT1006031@svn.freebsd.org> From: Xin LI Date: Fri, 9 May 2014 07:35:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265749 - in stable/9/cddl/contrib/opensolaris: cmd/zpool lib/libzfs/common X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 07:35:41 -0000 Author: delphij Date: Fri May 9 07:35:39 2014 New Revision: 265749 URL: http://svnweb.freebsd.org/changeset/base/265749 Log: MFC r263889: MFV r263887: 3993 zpool(1M) and zfs(1M) should support -p for "list" and "get" 4700 "zpool get" doesn't support -H or -o options Modified: stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool.8 stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/cddl/contrib/opensolaris/cmd/zpool/ (props changed) stable/9/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Fri May 9 07:34:38 2014 (r265748) +++ stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Fri May 9 07:35:39 2014 (r265749) @@ -1,5 +1,6 @@ '\" te .\" Copyright (c) 2012, Martin Matuska . +.\" Copyright (c) 2013-2014, Xin Li . .\" All Rights Reserved. .\" .\" The contents of this file are subject to the terms of the @@ -25,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 20, 2014 +.Dd March 28, 2014 .Dt ZPOOL 8 .Os .Sh NAME @@ -70,6 +71,8 @@ .Ar pool ... .Nm .Cm get +.Op Fl Hp +.Op Fl o Ar field Ns Op , Ns Ar ... .Ar all | property Ns Op , Ns Ar ... .Ar pool ... .Nm @@ -120,7 +123,7 @@ .Ar device .Nm .Cm list -.Op Fl H +.Op Fl Hpv .Op Fl o Ar property Ns Op , Ns Ar ... .Op Fl T Cm d Ns | Ns Cm u .Op Ar pool @@ -1018,6 +1021,8 @@ is currently being used. This may lead t .It Xo .Nm .Cm get +.Op Fl Hp +.Op Fl o Ar field Ns Op , Ns Ar ... .Ar all | property Ns Op , Ns Ar ... .Ar pool ... .Xc @@ -1036,6 +1041,19 @@ the following fields: See the .Qq Sx Properties section for more information on the available pool properties. +.Pp +.It Fl H +Scripted mode. Do not display headers, and separate fields by a single tab +instead of arbitrary space. +.It Fl p +Display numbers in parsable (exact) values. +.It Fl o Ar field +A comma-separated list of columns to display. +.Sy name Ns , Ns +.Sy property Ns , Ns +.Sy value Ns , Ns +.Sy source +is the default value. .It Xo .Nm .Cm history @@ -1335,7 +1353,7 @@ Treat exported or foreign devices as ina .It Xo .Nm .Cm list -.Op Fl Hv +.Op Fl Hpv .Op Fl o Ar property Ns Op , Ns Ar ... .Op Fl T Cm d Ns | Ns Cm u .Op Ar pool @@ -1371,6 +1389,8 @@ for unixtime .It Fl H Scripted mode. Do not display headers, and separate fields by a single tab instead of arbitrary space. +.It Fl p +Display numbers in parsable (exact) values. .It Fl v Show more detailed information. .It Fl o Ar property Ns Op , Ns Ar ... Modified: stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Fri May 9 07:34:38 2014 (r265748) +++ stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Fri May 9 07:35:39 2014 (r265749) @@ -235,7 +235,7 @@ get_usage(zpool_help_t idx) { case HELP_LABELCLEAR: return (gettext("\tlabelclear [-f] \n")); case HELP_LIST: - return (gettext("\tlist [-Hv] [-o property[,...]] " + return (gettext("\tlist [-Hpv] [-o property[,...]] " "[-T d|u] [pool] ... [interval [count]]\n")); case HELP_OFFLINE: return (gettext("\toffline [-t] ...\n")); @@ -257,8 +257,8 @@ get_usage(zpool_help_t idx) { return (gettext("\tupgrade [-v]\n" "\tupgrade [-V version] <-a | pool ...>\n")); case HELP_GET: - return (gettext("\tget <\"all\" | property[,...]> " - " ...\n")); + return (gettext("\tget [-Hp] [-o \"all\" | field[,...]] " + "<\"all\" | property[,...]> ...\n")); case HELP_SET: return (gettext("\tset \n")); case HELP_SPLIT: @@ -2755,6 +2755,7 @@ typedef struct list_cbdata { int cb_namewidth; boolean_t cb_scripted; zprop_list_t *cb_proplist; + boolean_t cb_literal; } list_cbdata_t; /* @@ -2850,7 +2851,7 @@ print_pool(zpool_handle_t *zhp, list_cbd zpool_get_prop_int(zhp, pl->pl_prop, NULL) == 0) propstr = "-"; else if (zpool_get_prop(zhp, pl->pl_prop, property, - sizeof (property), NULL) != 0) + sizeof (property), NULL, cb->cb_literal) != 0) propstr = "-"; else propstr = property; @@ -3001,12 +3002,13 @@ list_callback(zpool_handle_t *zhp, void } /* - * zpool list [-H] [-o prop[,prop]*] [-T d|u] [pool] ... [interval [count]] + * zpool list [-Hp] [-o prop[,prop]*] [-T d|u] [pool] ... [interval [count]] * * -H Scripted mode. Don't display headers, and separate properties * by a single tab. * -o List of properties to display. Defaults to * "name,size,allocated,free,capacity,health,altroot" + * -p Diplay values in parsable (exact) format. * -T Display a timestamp in date(1) or Unix format * * List all pools in the system, whether or not they're healthy. Output space @@ -3027,7 +3029,7 @@ zpool_do_list(int argc, char **argv) boolean_t first = B_TRUE; /* check options */ - while ((c = getopt(argc, argv, ":Ho:T:v")) != -1) { + while ((c = getopt(argc, argv, ":Ho:pT:v")) != -1) { switch (c) { case 'H': cb.cb_scripted = B_TRUE; @@ -3035,6 +3037,9 @@ zpool_do_list(int argc, char **argv) case 'o': props = optarg; break; + case 'p': + cb.cb_literal = B_TRUE; + break; case 'T': get_timestamp_arg(*optarg); break; @@ -5189,7 +5194,7 @@ get_callback(zpool_handle_t *zhp, void * } } else { if (zpool_get_prop(zhp, pl->pl_prop, value, - sizeof (value), &srctype) != 0) + sizeof (value), &srctype, cbp->cb_literal) != 0) continue; zprop_print_one_property(zpool_get_name(zhp), cbp, @@ -5200,20 +5205,32 @@ get_callback(zpool_handle_t *zhp, void * return (0); } +/* + * zpool get [-Hp] [-o "all" | field[,...]] <"all" | property[,...]> ... + * + * -H Scripted mode. Don't display headers, and separate properties + * by a single tab. + * -o List of columns to display. Defaults to + * "name,property,value,source". + * -p Diplay values in parsable (exact) format. + * + * Get properties of pools in the system. Output space statistics + * for each one as well as other attributes. + */ int zpool_do_get(int argc, char **argv) { zprop_get_cbdata_t cb = { 0 }; zprop_list_t fake_name = { 0 }; int ret; - - if (argc < 2) { - (void) fprintf(stderr, gettext("missing property " - "argument\n")); - usage(B_FALSE); - } + int c, i; + char *value; cb.cb_first = B_TRUE; + + /* + * Set up default columns and sources. + */ cb.cb_sources = ZPROP_SRC_ALL; cb.cb_columns[0] = GET_COL_NAME; cb.cb_columns[1] = GET_COL_PROPERTY; @@ -5221,10 +5238,89 @@ zpool_do_get(int argc, char **argv) cb.cb_columns[3] = GET_COL_SOURCE; cb.cb_type = ZFS_TYPE_POOL; - if (zprop_get_list(g_zfs, argv[1], &cb.cb_proplist, + /* check options */ + while ((c = getopt(argc, argv, ":Hpo:")) != -1) { + switch (c) { + case 'p': + cb.cb_literal = B_TRUE; + break; + case 'H': + cb.cb_scripted = B_TRUE; + break; + case 'o': + bzero(&cb.cb_columns, sizeof (cb.cb_columns)); + i = 0; + while (*optarg != '\0') { + static char *col_subopts[] = + { "name", "property", "value", "source", + "all", NULL }; + + if (i == ZFS_GET_NCOLS) { + (void) fprintf(stderr, gettext("too " + "many fields given to -o " + "option\n")); + usage(B_FALSE); + } + + switch (getsubopt(&optarg, col_subopts, + &value)) { + case 0: + cb.cb_columns[i++] = GET_COL_NAME; + break; + case 1: + cb.cb_columns[i++] = GET_COL_PROPERTY; + break; + case 2: + cb.cb_columns[i++] = GET_COL_VALUE; + break; + case 3: + cb.cb_columns[i++] = GET_COL_SOURCE; + break; + case 4: + if (i > 0) { + (void) fprintf(stderr, + gettext("\"all\" conflicts " + "with specific fields " + "given to -o option\n")); + usage(B_FALSE); + } + cb.cb_columns[0] = GET_COL_NAME; + cb.cb_columns[1] = GET_COL_PROPERTY; + cb.cb_columns[2] = GET_COL_VALUE; + cb.cb_columns[3] = GET_COL_SOURCE; + i = ZFS_GET_NCOLS; + break; + default: + (void) fprintf(stderr, + gettext("invalid column name " + "'%s'\n"), value); + usage(B_FALSE); + } + } + break; + case '?': + (void) fprintf(stderr, gettext("invalid option '%c'\n"), + optopt); + usage(B_FALSE); + } + } + + argc -= optind; + argv += optind; + + if (argc < 1) { + (void) fprintf(stderr, gettext("missing property " + "argument\n")); + usage(B_FALSE); + } + + if (zprop_get_list(g_zfs, argv[0], &cb.cb_proplist, ZFS_TYPE_POOL) != 0) usage(B_FALSE); + argc--; + argv++; + if (cb.cb_proplist != NULL) { fake_name.pl_prop = ZPOOL_PROP_NAME; fake_name.pl_width = strlen(gettext("NAME")); @@ -5232,7 +5328,7 @@ zpool_do_get(int argc, char **argv) cb.cb_proplist = &fake_name; } - ret = for_each_pool(argc - 2, argv + 2, B_TRUE, &cb.cb_proplist, + ret = for_each_pool(argc, argv, B_TRUE, &cb.cb_proplist, get_callback, &cb); if (cb.cb_proplist == &fake_name) Modified: stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Fri May 9 07:34:38 2014 (r265748) +++ stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Fri May 9 07:35:39 2014 (r265749) @@ -270,7 +270,7 @@ extern int zpool_label_disk(libzfs_handl */ extern int zpool_set_prop(zpool_handle_t *, const char *, const char *); extern int zpool_get_prop(zpool_handle_t *, zpool_prop_t, char *, - size_t proplen, zprop_source_t *); + size_t proplen, zprop_source_t *, boolean_t); extern uint64_t zpool_get_prop_int(zpool_handle_t *, zpool_prop_t, zprop_source_t *); Modified: stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Fri May 9 07:34:38 2014 (r265748) +++ stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Fri May 9 07:35:39 2014 (r265749) @@ -2237,8 +2237,8 @@ zfs_prop_get(zfs_handle_t *zhp, zfs_prop } if ((zpool_get_prop(zhp->zpool_hdl, - ZPOOL_PROP_ALTROOT, buf, MAXPATHLEN, NULL)) || - (strcmp(root, "-") == 0)) + ZPOOL_PROP_ALTROOT, buf, MAXPATHLEN, NULL, + B_FALSE)) || (strcmp(root, "-") == 0)) root[0] = '\0'; /* * Special case an alternate root of '/'. This will Modified: stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Fri May 9 07:34:38 2014 (r265748) +++ stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Fri May 9 07:35:39 2014 (r265749) @@ -240,7 +240,7 @@ zpool_pool_state_to_name(pool_state_t st */ int zpool_get_prop(zpool_handle_t *zhp, zpool_prop_t prop, char *buf, size_t len, - zprop_source_t *srctype) + zprop_source_t *srctype, boolean_t literal) { uint64_t intval; const char *strval; @@ -272,9 +272,7 @@ zpool_get_prop(zpool_handle_t *zhp, zpoo (void) strlcpy(buf, zpool_get_prop_string(zhp, prop, &src), len); - if (srctype != NULL) - *srctype = src; - return (0); + break; } /* FALLTHROUGH */ default: @@ -306,12 +304,22 @@ zpool_get_prop(zpool_handle_t *zhp, zpoo case ZPOOL_PROP_FREE: case ZPOOL_PROP_FREEING: case ZPOOL_PROP_EXPANDSZ: - (void) zfs_nicenum(intval, buf, len); + if (literal) { + (void) snprintf(buf, len, "%llu", + (u_longlong_t)intval); + } else { + (void) zfs_nicenum(intval, buf, len); + } break; case ZPOOL_PROP_CAPACITY: - (void) snprintf(buf, len, "%llu%%", - (u_longlong_t)intval); + if (literal) { + (void) snprintf(buf, len, "%llu", + (u_longlong_t)intval); + } else { + (void) snprintf(buf, len, "%llu%%", + (u_longlong_t)intval); + } break; case ZPOOL_PROP_DEDUPRATIO: @@ -407,7 +415,7 @@ zpool_is_bootable(zpool_handle_t *zhp) char bootfs[ZPOOL_MAXNAMELEN]; return (zpool_get_prop(zhp, ZPOOL_PROP_BOOTFS, bootfs, - sizeof (bootfs), NULL) == 0 && strncmp(bootfs, "-", + sizeof (bootfs), NULL, B_FALSE) == 0 && strncmp(bootfs, "-", sizeof (bootfs)) != 0); } @@ -806,7 +814,7 @@ zpool_expand_proplist(zpool_handle_t *zh if (entry->pl_prop != ZPROP_INVAL && zpool_get_prop(zhp, entry->pl_prop, buf, sizeof (buf), - NULL) == 0) { + NULL, B_FALSE) == 0) { if (strlen(buf) > entry->pl_width) entry->pl_width = strlen(buf); } From owner-svn-src-stable@FreeBSD.ORG Fri May 9 07:38:23 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C326886; Fri, 9 May 2014 07:38:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DBEC1E8; Fri, 9 May 2014 07:38:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s497cNvj006435; Fri, 9 May 2014 07:38:23 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s497cMOT006431; Fri, 9 May 2014 07:38:22 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201405090738.s497cMOT006431@svn.freebsd.org> From: Xin LI Date: Fri, 9 May 2014 07:38:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265750 - stable/9/contrib/netcat X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 07:38:23 -0000 Author: delphij Date: Fri May 9 07:38:22 2014 New Revision: 265750 URL: http://svnweb.freebsd.org/changeset/base/265750 Log: MFC: nc(1) from OpenBSD 5.5. Modified: stable/9/contrib/netcat/FREEBSD-vendor stable/9/contrib/netcat/atomicio.c stable/9/contrib/netcat/nc.1 stable/9/contrib/netcat/netcat.c Directory Properties: stable/9/contrib/netcat/ (props changed) Modified: stable/9/contrib/netcat/FREEBSD-vendor ============================================================================== --- stable/9/contrib/netcat/FREEBSD-vendor Fri May 9 07:35:39 2014 (r265749) +++ stable/9/contrib/netcat/FREEBSD-vendor Fri May 9 07:38:22 2014 (r265750) @@ -1,5 +1,5 @@ # $FreeBSD$ Project: netcat (aka src/usr.bin/nc in OpenBSD) ProjectURL: http://www.openbsd.org/ -Version: 5.2 +Version: 5.3 License: BSD Modified: stable/9/contrib/netcat/atomicio.c ============================================================================== --- stable/9/contrib/netcat/atomicio.c Fri May 9 07:35:39 2014 (r265749) +++ stable/9/contrib/netcat/atomicio.c Fri May 9 07:38:22 2014 (r265750) @@ -1,4 +1,4 @@ -/* $OpenBSD: atomicio.c,v 1.10 2011/01/08 00:47:19 jeremy Exp $ */ +/* $OpenBSD: atomicio.c,v 1.11 2012/12/04 02:24:47 deraadt Exp $ */ /* * Copyright (c) 2006 Damien Miller. All rights reserved. * Copyright (c) 2005 Anil Madhavapeddy. All rights reserved. @@ -26,8 +26,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include - #include #include #include Modified: stable/9/contrib/netcat/nc.1 ============================================================================== --- stable/9/contrib/netcat/nc.1 Fri May 9 07:35:39 2014 (r265749) +++ stable/9/contrib/netcat/nc.1 Fri May 9 07:38:22 2014 (r265750) @@ -1,4 +1,4 @@ -.\" $OpenBSD: nc.1,v 1.61 2012/07/07 15:33:02 haesbaert Exp $ +.\" $OpenBSD: nc.1,v 1.67 2014/02/26 20:56:11 claudio Exp $ .\" .\" Copyright (c) 1996 David Sacerdote .\" All rights reserved. @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 7, 2012 +.Dd April 11, 2014 .Dt NC 1 .Os .Sh NAME @@ -36,7 +36,7 @@ .Sh SYNOPSIS .Nm nc .Bk -words -.Op Fl 46DdEhklnrStUuvz +.Op Fl 46DdEFhklNnrStUuvz .Op Fl e Ar IPsec_policy .Op Fl I Ar length .Op Fl i Ar interval @@ -120,6 +120,21 @@ to be used using the syntax described in .Xr ipsec_set_policy 3 . This flag can be specified up to two times, as typically one policy for each direction is needed. +.It Fl F +Pass the first connected socket using +.Xr sendmsg 2 +to stdout and exit. +This is useful in conjunction with +.Fl X +to have +.Nm +perform connection setup with a proxy but then leave the rest of the +connection to another program (e.g.\& +.Xr ssh 1 +using the +.Xr ssh_config 5 +.Cm ProxyUseFdPass +option). .It Fl h Prints out .Nm @@ -155,6 +170,10 @@ options. Additionally, any timeouts specified with the .Fl w option are ignored. +.It Fl N +.Xr shutdown 2 +the network socket after EOF on the input. +Some servers require this to finish their work. .It Fl n Do not do any DNS or service lookups on any specified addresses, hostnames or ports. @@ -232,7 +251,6 @@ flag is given. Set the routing table .Pq Dq FIB to be used. -The default is 0. .It Fl v Have .Nm @@ -361,7 +379,7 @@ Using a second machine, connect to the l .Nm process, feeding it the file which is to be transferred: .Pp -.Dl $ nc host.example.com 1234 \*(Lt filename.in +.Dl $ nc -N host.example.com 1234 \*(Lt filename.in .Pp After the file has been transferred, the connection will close automatically. .Sh TALKING TO SERVERS @@ -486,10 +504,10 @@ if the proxy requires it: .Xr tcp 4 .Sh AUTHORS Original implementation by *Hobbit* -.Aq hobbit@avian.org . +.Aq Mt hobbit@avian.org . .br Rewritten with IPv6 support by -.An Eric Jackson Aq ericj@monkey.org . +.An Eric Jackson Aq Mt ericj@monkey.org . .Sh CAVEATS UDP port scans using the .Fl uz Modified: stable/9/contrib/netcat/netcat.c ============================================================================== --- stable/9/contrib/netcat/netcat.c Fri May 9 07:35:39 2014 (r265749) +++ stable/9/contrib/netcat/netcat.c Fri May 9 07:38:22 2014 (r265750) @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.109 2012/07/07 15:33:02 haesbaert Exp $ */ +/* $OpenBSD: netcat.c,v 1.117 2013/10/26 21:33:29 sthen Exp $ */ /* * Copyright (c) 2001 Eric Jackson * @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -74,9 +75,11 @@ /* Command Line Options */ int dflag; /* detached, no stdin */ +int Fflag; /* fdpass sock to stdout */ unsigned int iflag; /* Interval Flag */ int kflag; /* More than one connect */ int lflag; /* Bind to local port */ +int Nflag; /* shutdown() network socket */ int nflag; /* Don't do name look up */ int FreeBSD_Oflag; /* Do not use TCP options */ char *Pflag; /* Proxy username */ @@ -93,7 +96,7 @@ int Iflag; /* TCP receive buffer siz int Oflag; /* TCP send buffer size */ int Sflag; /* TCP MD5 signature option */ int Tflag = -1; /* IP Type of Service */ -u_int rtableid; +int rtableid = -1; int timeout = -1; int family = AF_UNSPEC; @@ -105,6 +108,7 @@ void build_ports(char *); void help(void); int local_listen(char *, char *, struct addrinfo); void readwrite(int); +void fdpass(int nfd) __attribute__((noreturn)); int remote_connect(const char *, const char *, struct addrinfo); int timeout_connect(int, const struct sockaddr *, socklen_t); int socks_connect(const char *, const char *, struct addrinfo, @@ -151,9 +155,12 @@ main(int argc, char *argv[]) host = NULL; uport = NULL; sv = NULL; +#if 0 + rtableid = getrtable(); +#endif while ((ch = getopt_long(argc, argv, - "46DdEe:hI:i:klnoO:P:p:rSs:tT:UuV:vw:X:x:z", + "46DdEe:FhI:i:klNnoO:P:p:rSs:tT:UuV:vw:X:x:z", longopts, NULL)) != -1) { switch (ch) { case '4': @@ -193,6 +200,9 @@ main(int argc, char *argv[]) errx(1, "IPsec support unavailable."); #endif break; + case 'F': + Fflag = 1; + break; case 'h': help(); break; @@ -207,6 +217,9 @@ main(int argc, char *argv[]) case 'l': lflag = 1; break; + case 'N': + Nflag = 1; + break; case 'n': nflag = 1; break; @@ -234,7 +247,7 @@ main(int argc, char *argv[]) case 'V': if (sysctlbyname("net.fibs", &numfibs, &intsize, NULL, 0) == -1) errx(1, "Multiple FIBS not supported"); - rtableid = (unsigned int)strtonum(optarg, 0, + rtableid = (int)strtonum(optarg, 0, numfibs - 1, &errstr); if (errstr) errx(1, "rtable %s: %s", errstr, optarg); @@ -424,9 +437,10 @@ main(int argc, char *argv[]) len = sizeof(cliaddr); connfd = accept(s, (struct sockaddr *)&cliaddr, &len); - if (connfd == -1) - err(1, "accept"); - + if (connfd == -1) { + /* For now, all errnos are fatal */ + err(1, "accept"); + } if (vflag) report_connect((struct sockaddr *)&cliaddr, len); @@ -503,7 +517,9 @@ main(int argc, char *argv[]) uflag ? "udp" : "tcp", sv ? sv->s_name : "*"); } - if (!zflag) + if (Fflag) + fdpass(s); + else if (!zflag) readwrite(s); } } @@ -563,7 +579,7 @@ unix_connect(char *path) if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) return (-1); } - (void)fcntl(s, F_SETFD, 1); + (void)fcntl(s, F_SETFD, FD_CLOEXEC); memset(&sun, 0, sizeof(struct sockaddr_un)); sun.sun_family = AF_UNIX; @@ -626,12 +642,9 @@ remote_connect(const char *host, const c add_ipsec_policy(s, ipsec_policy[1]); #endif - if (rtableid) { - if (setsockopt(s, SOL_SOCKET, SO_SETFIB, &rtableid, - sizeof(rtableid)) == -1) - err(1, "setsockopt(.., SO_SETFIB, %u, ..)", - rtableid); - } + if (rtableid >= 0 && (setsockopt(s, SOL_SOCKET, SO_SETFIB, + &rtableid, sizeof(rtableid)) == -1)) + err(1, "setsockopt SO_SETFIB"); /* Bind to a local port or source address if specified. */ if (sflag || pflag) { @@ -738,13 +751,9 @@ local_listen(char *host, char *port, str res0->ai_protocol)) < 0) continue; - if (rtableid) { - ret = setsockopt(s, SOL_SOCKET, SO_SETFIB, &rtableid, - sizeof(rtableid)); - if (ret == -1) - err(1, "setsockopt(.., SO_SETFIB, %u, ..)", - rtableid); - } + if (rtableid >= 0 && (setsockopt(s, IPPROTO_IP, SO_SETFIB, + &rtableid, sizeof(rtableid)) == -1)) + err(1, "setsockopt SO_SETFIB"); ret = setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof(x)); if (ret == -1) @@ -833,7 +842,8 @@ readwrite(int nfd) if ((n = read(wfd, buf, plen)) < 0) return; else if (n == 0) { - shutdown(nfd, SHUT_WR); + if (Nflag) + shutdown(nfd, SHUT_WR); pfd[1].fd = -1; pfd[1].events = 0; } else { @@ -844,6 +854,66 @@ readwrite(int nfd) } } +/* + * fdpass() + * Pass the connected file descriptor to stdout and exit. + */ +void +fdpass(int nfd) +{ + struct msghdr mh; + union { + struct cmsghdr hdr; + char buf[CMSG_SPACE(sizeof(int))]; + } cmsgbuf; + struct cmsghdr *cmsg; + struct iovec iov; + char c = '\0'; + ssize_t r; + struct pollfd pfd; + + /* Avoid obvious stupidity */ + if (isatty(STDOUT_FILENO)) + errx(1, "Cannot pass file descriptor to tty"); + + bzero(&mh, sizeof(mh)); + bzero(&cmsgbuf, sizeof(cmsgbuf)); + bzero(&iov, sizeof(iov)); + bzero(&pfd, sizeof(pfd)); + + mh.msg_control = (caddr_t)&cmsgbuf.buf; + mh.msg_controllen = sizeof(cmsgbuf.buf); + cmsg = CMSG_FIRSTHDR(&mh); + cmsg->cmsg_len = CMSG_LEN(sizeof(int)); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + *(int *)CMSG_DATA(cmsg) = nfd; + + iov.iov_base = &c; + iov.iov_len = 1; + mh.msg_iov = &iov; + mh.msg_iovlen = 1; + + bzero(&pfd, sizeof(pfd)); + pfd.fd = STDOUT_FILENO; + for (;;) { + r = sendmsg(STDOUT_FILENO, &mh, 0); + if (r == -1) { + if (errno == EAGAIN || errno == EINTR) { + pfd.events = POLLOUT; + if (poll(&pfd, 1, -1) == -1) + err(1, "poll"); + continue; + } + err(1, "sendmsg"); + } else if (r == -1) + errx(1, "sendmsg: unexpected return value %zd", r); + else + break; + } + exit(0); +} + /* Deal with RFC 854 WILL/WONT DO/DONT negotiation. */ void atelnet(int nfd, unsigned char *buf, unsigned int size) @@ -1082,11 +1152,13 @@ help(void) \t-e policy Use specified IPsec policy\n"); #endif fprintf(stderr, "\ + \t-F Pass socket fd\n\ \t-h This help text\n\ \t-I length TCP receive buffer length\n\ \t-i secs\t Delay interval for lines sent, ports scanned\n\ \t-k Keep inbound sockets open for multiple connects\n\ \t-l Listen mode, for inbound connects\n\ + \t-N Shutdown the network socket after EOF on stdin\n\ \t-n Suppress name/port resolutions\n\ \t--no-tcpopt Disable TCP options\n\ \t-O length TCP send buffer length\n\ @@ -1139,9 +1211,9 @@ usage(int ret) { fprintf(stderr, #ifdef IPSEC - "usage: nc [-46DdEhklnrStUuvz] [-e policy] [-I length] [-i interval] [-O length]\n" + "usage: nc [-46DdEFhklNnrStUuvz] [-e policy] [-I length] [-i interval] [-O length]\n" #else - "usage: nc [-46DdhklnrStUuvz] [-I length] [-i interval] [-O length]\n" + "usage: nc [-46DdFhklNnrStUuvz] [-I length] [-i interval] [-O length]\n" #endif "\t [-P proxy_username] [-p source_port] [-s source] [-T ToS]\n" "\t [-V rtable] [-w timeout] [-X proxy_protocol]\n" From owner-svn-src-stable@FreeBSD.ORG Fri May 9 07:55:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8D1FC44; Fri, 9 May 2014 07:55:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2A2536F; Fri, 9 May 2014 07:55:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s497t3BH015131; Fri, 9 May 2014 07:55:03 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s497sxx4015023; Fri, 9 May 2014 07:54:59 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201405090754.s497sxx4015023@svn.freebsd.org> From: Xin LI Date: Fri, 9 May 2014 07:54:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265751 - in stable/9: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/lib/libzpool/common cddl/contrib/opensolaris/lib/libzpool/common/sys sys/cddl/contrib/opensolaris/uts/co... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 07:55:03 -0000 Author: delphij Date: Fri May 9 07:54:59 2014 New Revision: 265751 URL: http://svnweb.freebsd.org/changeset/base/265751 Log: MFC r264669: MFV r264666: 4374 dn_free_ranges should use range_tree_t Modified: stable/9/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/9/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c stable/9/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/range_tree.h stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_leaf.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/bitmap.h stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/cmd/zdb/zdb.c Fri May 9 07:38:22 2014 (r265750) +++ stable/9/cddl/contrib/opensolaris/cmd/zdb/zdb.c Fri May 9 07:54:59 2014 (r265751) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. */ #include @@ -2741,7 +2741,8 @@ dump_simulated_ddt(spa_t *spa) dds.dds_ref_psize = zdde->zdde_ref_psize; dds.dds_ref_dsize = zdde->zdde_ref_dsize; - ddt_stat_add(&ddh_total.ddh_stat[highbit(refcnt) - 1], &dds, 0); + ddt_stat_add(&ddh_total.ddh_stat[highbit64(refcnt) - 1], + &dds, 0); umem_free(zdde, sizeof (*zdde)); } Modified: stable/9/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Fri May 9 07:38:22 2014 (r265750) +++ stable/9/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Fri May 9 07:54:59 2014 (r265751) @@ -20,6 +20,8 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #include @@ -800,20 +802,17 @@ delay(clock_t ticks) /* * Find highest one bit set. * Returns bit number + 1 of highest bit that is set, otherwise returns 0. - * High order bit is 31 (or 63 in _LP64 kernel). */ int -highbit(ulong_t i) +highbit64(uint64_t i) { - register int h = 1; + int h = 1; if (i == 0) return (0); -#ifdef _LP64 - if (i & 0xffffffff00000000ul) { + if (i & 0xffffffff00000000ULL) { h += 32; i >>= 32; } -#endif if (i & 0xffff0000) { h += 16; i >>= 16; } Modified: stable/9/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Fri May 9 07:38:22 2014 (r265750) +++ stable/9/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Fri May 9 07:54:59 2014 (r265751) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. */ /* @@ -566,7 +566,7 @@ extern void delay(clock_t ticks); extern uint64_t physmem; -extern int highbit(ulong_t i); +extern int highbit64(uint64_t i); extern int random_get_bytes(uint8_t *ptr, size_t len); extern int random_get_pseudo_bytes(uint8_t *ptr, size_t len); Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Fri May 9 07:38:22 2014 (r265750) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Fri May 9 07:54:59 2014 (r265751) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ @@ -40,6 +40,7 @@ #include #include #include +#include /* * Number of times that zfs_free_range() took the slow path while doing @@ -1177,7 +1178,10 @@ dbuf_dirty(dmu_buf_impl_t *db, dmu_tx_t if (db->db_level == 0 && db->db_blkid != DMU_BONUS_BLKID && db->db_blkid != DMU_SPILL_BLKID) { mutex_enter(&dn->dn_mtx); - dnode_clear_range(dn, db->db_blkid, 1, tx); + if (dn->dn_free_ranges[txgoff] != NULL) { + range_tree_clear(dn->dn_free_ranges[txgoff], + db->db_blkid, 1); + } mutex_exit(&dn->dn_mtx); db->db_freed_in_flight = FALSE; } Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c Fri May 9 07:38:22 2014 (r265750) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c Fri May 9 07:54:59 2014 (r265751) @@ -21,7 +21,7 @@ /* * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. */ #include @@ -416,7 +416,7 @@ ddt_stat_update(ddt_t *ddt, ddt_entry_t ddt_stat_generate(ddt, dde, &dds); - bucket = highbit(dds.dds_ref_blocks) - 1; + bucket = highbit64(dds.dds_ref_blocks) - 1; ASSERT(bucket >= 0); ddh = &ddt->ddt_histogram[dde->dde_type][dde->dde_class]; Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Fri May 9 07:38:22 2014 (r265750) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Fri May 9 07:54:59 2014 (r265751) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. */ #include @@ -35,8 +35,7 @@ #include #include #include - -static int free_range_compar(const void *node1, const void *node2); +#include static kmem_cache_t *dnode_cache; /* @@ -92,9 +91,7 @@ dnode_cons(void *arg, void *unused, int for (i = 0; i < TXG_SIZE; i++) { list_link_init(&dn->dn_dirty_link[i]); - avl_create(&dn->dn_ranges[i], free_range_compar, - sizeof (free_range_t), - offsetof(struct free_range, fr_node)); + dn->dn_free_ranges[i] = NULL; list_create(&dn->dn_dirty_records[i], sizeof (dbuf_dirty_record_t), offsetof(dbuf_dirty_record_t, dr_dirty_node)); @@ -143,7 +140,7 @@ dnode_dest(void *arg, void *unused) for (i = 0; i < TXG_SIZE; i++) { ASSERT(!list_link_active(&dn->dn_dirty_link[i])); - avl_destroy(&dn->dn_ranges[i]); + ASSERT3P(dn->dn_free_ranges[i], ==, NULL); list_destroy(&dn->dn_dirty_records[i]); ASSERT0(dn->dn_next_nblkptr[i]); ASSERT0(dn->dn_next_nlevels[i]); @@ -316,19 +313,6 @@ dnode_buf_byteswap(void *vbuf, size_t si } } -static int -free_range_compar(const void *node1, const void *node2) -{ - const free_range_t *rp1 = node1; - const free_range_t *rp2 = node2; - - if (rp1->fr_blkid < rp2->fr_blkid) - return (-1); - else if (rp1->fr_blkid > rp2->fr_blkid) - return (1); - else return (0); -} - void dnode_setbonuslen(dnode_t *dn, int newsize, dmu_tx_t *tx) { @@ -377,7 +361,7 @@ dnode_setdblksz(dnode_t *dn, int size) 1<<(sizeof (dn->dn_phys->dn_datablkszsec) * 8)); dn->dn_datablksz = size; dn->dn_datablkszsec = size >> SPA_MINBLOCKSHIFT; - dn->dn_datablkshift = ISP2(size) ? highbit(size - 1) : 0; + dn->dn_datablkshift = ISP2(size) ? highbit64(size - 1) : 0; } static dnode_t * @@ -533,7 +517,7 @@ dnode_allocate(dnode_t *dn, dmu_object_t ASSERT0(dn->dn_next_blksz[i]); ASSERT(!list_link_active(&dn->dn_dirty_link[i])); ASSERT3P(list_head(&dn->dn_dirty_records[i]), ==, NULL); - ASSERT0(avl_numnodes(&dn->dn_ranges[i])); + ASSERT3P(dn->dn_free_ranges[i], ==, NULL); } dn->dn_type = ot; @@ -697,7 +681,8 @@ dnode_move_impl(dnode_t *odn, dnode_t *n list_move_tail(&ndn->dn_dirty_records[i], &odn->dn_dirty_records[i]); } - bcopy(&odn->dn_ranges[0], &ndn->dn_ranges[0], sizeof (odn->dn_ranges)); + bcopy(&odn->dn_free_ranges[0], &ndn->dn_free_ranges[0], + sizeof (odn->dn_free_ranges)); ndn->dn_allocated_txg = odn->dn_allocated_txg; ndn->dn_free_txg = odn->dn_free_txg; ndn->dn_assigned_txg = odn->dn_assigned_txg; @@ -760,8 +745,7 @@ dnode_move_impl(dnode_t *odn, dnode_t *n list_create(&odn->dn_dirty_records[i], sizeof (dbuf_dirty_record_t), offsetof(dbuf_dirty_record_t, dr_dirty_node)); - odn->dn_ranges[i].avl_root = NULL; - odn->dn_ranges[i].avl_numnodes = 0; + odn->dn_free_ranges[i] = NULL; odn->dn_next_nlevels[i] = 0; odn->dn_next_indblkshift[i] = 0; odn->dn_next_bonustype[i] = 0; @@ -1467,59 +1451,6 @@ out: } void -dnode_clear_range(dnode_t *dn, uint64_t blkid, uint64_t nblks, dmu_tx_t *tx) -{ - avl_tree_t *tree = &dn->dn_ranges[tx->tx_txg&TXG_MASK]; - avl_index_t where; - free_range_t *rp; - free_range_t rp_tofind; - uint64_t endblk = blkid + nblks; - - ASSERT(MUTEX_HELD(&dn->dn_mtx)); - ASSERT(nblks <= UINT64_MAX - blkid); /* no overflow */ - - dprintf_dnode(dn, "blkid=%llu nblks=%llu txg=%llu\n", - blkid, nblks, tx->tx_txg); - rp_tofind.fr_blkid = blkid; - rp = avl_find(tree, &rp_tofind, &where); - if (rp == NULL) - rp = avl_nearest(tree, where, AVL_BEFORE); - if (rp == NULL) - rp = avl_nearest(tree, where, AVL_AFTER); - - while (rp && (rp->fr_blkid <= blkid + nblks)) { - uint64_t fr_endblk = rp->fr_blkid + rp->fr_nblks; - free_range_t *nrp = AVL_NEXT(tree, rp); - - if (blkid <= rp->fr_blkid && endblk >= fr_endblk) { - /* clear this entire range */ - avl_remove(tree, rp); - kmem_free(rp, sizeof (free_range_t)); - } else if (blkid <= rp->fr_blkid && - endblk > rp->fr_blkid && endblk < fr_endblk) { - /* clear the beginning of this range */ - rp->fr_blkid = endblk; - rp->fr_nblks = fr_endblk - endblk; - } else if (blkid > rp->fr_blkid && blkid < fr_endblk && - endblk >= fr_endblk) { - /* clear the end of this range */ - rp->fr_nblks = blkid - rp->fr_blkid; - } else if (blkid > rp->fr_blkid && endblk < fr_endblk) { - /* clear a chunk out of this range */ - free_range_t *new_rp = - kmem_alloc(sizeof (free_range_t), KM_SLEEP); - - new_rp->fr_blkid = endblk; - new_rp->fr_nblks = fr_endblk - endblk; - avl_insert_here(tree, new_rp, rp, AVL_AFTER); - rp->fr_nblks = blkid - rp->fr_blkid; - } - /* there may be no overlap */ - rp = nrp; - } -} - -void dnode_free_range(dnode_t *dn, uint64_t off, uint64_t len, dmu_tx_t *tx) { dmu_buf_impl_t *db; @@ -1669,22 +1600,15 @@ done: * We will finish up this free operation in the syncing phase. */ mutex_enter(&dn->dn_mtx); - dnode_clear_range(dn, blkid, nblks, tx); - { - free_range_t *rp, *found; - avl_index_t where; - avl_tree_t *tree = &dn->dn_ranges[tx->tx_txg&TXG_MASK]; - - /* Add new range to dn_ranges */ - rp = kmem_alloc(sizeof (free_range_t), KM_SLEEP); - rp->fr_blkid = blkid; - rp->fr_nblks = nblks; - found = avl_find(tree, rp, &where); - ASSERT(found == NULL); - avl_insert(tree, rp, where); - dprintf_dnode(dn, "blkid=%llu nblks=%llu txg=%llu\n", - blkid, nblks, tx->tx_txg); + int txgoff = tx->tx_txg & TXG_MASK; + if (dn->dn_free_ranges[txgoff] == NULL) { + dn->dn_free_ranges[txgoff] = + range_tree_create(NULL, NULL, &dn->dn_mtx); } + range_tree_clear(dn->dn_free_ranges[txgoff], blkid, nblks); + range_tree_add(dn->dn_free_ranges[txgoff], blkid, nblks); + dprintf_dnode(dn, "blkid=%llu nblks=%llu txg=%llu\n", + blkid, nblks, tx->tx_txg); mutex_exit(&dn->dn_mtx); dbuf_free_range(dn, blkid, blkid + nblks - 1, tx); @@ -1712,7 +1636,6 @@ dnode_spill_freed(dnode_t *dn) uint64_t dnode_block_freed(dnode_t *dn, uint64_t blkid) { - free_range_t range_tofind; void *dp = spa_get_dsl(dn->dn_objset->os_spa); int i; @@ -1732,20 +1655,10 @@ dnode_block_freed(dnode_t *dn, uint64_t if (blkid == DMU_SPILL_BLKID) return (dnode_spill_freed(dn)); - range_tofind.fr_blkid = blkid; mutex_enter(&dn->dn_mtx); for (i = 0; i < TXG_SIZE; i++) { - free_range_t *range_found; - avl_index_t idx; - - range_found = avl_find(&dn->dn_ranges[i], &range_tofind, &idx); - if (range_found) { - ASSERT(range_found->fr_nblks > 0); - break; - } - range_found = avl_nearest(&dn->dn_ranges[i], idx, AVL_BEFORE); - if (range_found && - range_found->fr_blkid + range_found->fr_nblks > blkid) + if (dn->dn_free_ranges[i] != NULL && + range_tree_contains(dn->dn_free_ranges[i], blkid, 1)) break; } mutex_exit(&dn->dn_mtx); Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Fri May 9 07:38:22 2014 (r265750) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Fri May 9 07:54:59 2014 (r265751) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. */ #include @@ -32,6 +32,7 @@ #include #include #include +#include #include static void @@ -318,7 +319,7 @@ free_children(dmu_buf_impl_t *db, uint64 * and "free" all the blocks contained there. */ static void -dnode_sync_free_range(dnode_t *dn, uint64_t blkid, uint64_t nblks, +dnode_sync_free_range_impl(dnode_t *dn, uint64_t blkid, uint64_t nblks, dmu_tx_t *tx) { blkptr_t *bp = dn->dn_phys->dn_blkptr; @@ -376,6 +377,22 @@ dnode_sync_free_range(dnode_t *dn, uint6 } } +typedef struct dnode_sync_free_range_arg { + dnode_t *dsfra_dnode; + dmu_tx_t *dsfra_tx; +} dnode_sync_free_range_arg_t; + +static void +dnode_sync_free_range(void *arg, uint64_t blkid, uint64_t nblks) +{ + dnode_sync_free_range_arg_t *dsfra = arg; + dnode_t *dn = dsfra->dsfra_dnode; + + mutex_exit(&dn->dn_mtx); + dnode_sync_free_range_impl(dn, blkid, nblks, dsfra->dsfra_tx); + mutex_enter(&dn->dn_mtx); +} + /* * Try to kick all the dnode's dbufs out of the cache... */ @@ -536,7 +553,6 @@ dnode_sync_free(dnode_t *dn, dmu_tx_t *t void dnode_sync(dnode_t *dn, dmu_tx_t *tx) { - free_range_t *rp; dnode_phys_t *dnp = dn->dn_phys; int txgoff = tx->tx_txg & TXG_MASK; list_t *list = &dn->dn_dirty_records[txgoff]; @@ -594,9 +610,9 @@ dnode_sync(dnode_t *dn, dmu_tx_t *tx) SPA_MINBLOCKSIZE) == 0); ASSERT(BP_IS_HOLE(&dnp->dn_blkptr[0]) || dn->dn_maxblkid == 0 || list_head(list) != NULL || - avl_last(&dn->dn_ranges[txgoff]) || dn->dn_next_blksz[txgoff] >> SPA_MINBLOCKSHIFT == - dnp->dn_datablkszsec); + dnp->dn_datablkszsec || + range_tree_space(dn->dn_free_ranges[txgoff]) != 0); dnp->dn_datablkszsec = dn->dn_next_blksz[txgoff] >> SPA_MINBLOCKSHIFT; dn->dn_next_blksz[txgoff] = 0; @@ -655,13 +671,16 @@ dnode_sync(dnode_t *dn, dmu_tx_t *tx) } /* process all the "freed" ranges in the file */ - while (rp = avl_last(&dn->dn_ranges[txgoff])) { - dnode_sync_free_range(dn, rp->fr_blkid, rp->fr_nblks, tx); - /* grab the mutex so we don't race with dnode_block_freed() */ + if (dn->dn_free_ranges[txgoff] != NULL) { + dnode_sync_free_range_arg_t dsfra; + dsfra.dsfra_dnode = dn; + dsfra.dsfra_tx = tx; mutex_enter(&dn->dn_mtx); - avl_remove(&dn->dn_ranges[txgoff], rp); + range_tree_vacate(dn->dn_free_ranges[txgoff], + dnode_sync_free_range, &dsfra); + range_tree_destroy(dn->dn_free_ranges[txgoff]); + dn->dn_free_ranges[txgoff] = NULL; mutex_exit(&dn->dn_mtx); - kmem_free(rp, sizeof (free_range_t)); } if (freeing_dnode) { Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Fri May 9 07:38:22 2014 (r265750) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Fri May 9 07:54:59 2014 (r265751) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ @@ -790,7 +790,7 @@ metaslab_ff_alloc(metaslab_t *msp, uint6 * may exist in the same region. */ uint64_t align = size & -size; - uint64_t *cursor = &msp->ms_lbas[highbit(align) - 1]; + uint64_t *cursor = &msp->ms_lbas[highbit64(align) - 1]; avl_tree_t *t = &msp->ms_tree->rt_root; return (metaslab_block_picker(t, cursor, size, align)); @@ -827,7 +827,7 @@ metaslab_df_alloc(metaslab_t *msp, uint6 * may exist in the same region. */ uint64_t align = size & -size; - uint64_t *cursor = &msp->ms_lbas[highbit(align) - 1]; + uint64_t *cursor = &msp->ms_lbas[highbit64(align) - 1]; range_tree_t *rt = msp->ms_tree; avl_tree_t *t = &rt->rt_root; uint64_t max_size = metaslab_block_maxsize(msp); @@ -943,7 +943,7 @@ metaslab_ndf_alloc(metaslab_t *msp, uint avl_tree_t *t = &msp->ms_tree->rt_root; avl_index_t where; range_seg_t *rs, rsearch; - uint64_t hbit = highbit(size); + uint64_t hbit = highbit64(size); uint64_t *cursor = &msp->ms_lbas[hbit - 1]; uint64_t max_size = metaslab_block_maxsize(msp); @@ -1186,7 +1186,7 @@ metaslab_weight_factor(metaslab_t *msp) if (msp->ms_sm == NULL) { vdev_t *vd = msp->ms_group->mg_vd; - i = highbit(msp->ms_size) - 1; + i = highbit64(msp->ms_size) - 1; sectors = msp->ms_size >> vd->vdev_ashift; return (sectors * i * vd->vdev_ashift); } Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c Fri May 9 07:38:22 2014 (r265750) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c Fri May 9 07:54:59 2014 (r265751) @@ -23,7 +23,7 @@ * Use is subject to license terms. */ /* - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013, 2014 by Delphix. All rights reserved. */ #include @@ -60,7 +60,7 @@ range_tree_stat_verify(range_tree_t *rt) for (rs = avl_first(&rt->rt_root); rs != NULL; rs = AVL_NEXT(&rt->rt_root, rs)) { uint64_t size = rs->rs_end - rs->rs_start; - int idx = highbit(size) - 1; + int idx = highbit64(size) - 1; hist[idx]++; ASSERT3U(hist[idx], !=, 0); @@ -79,7 +79,7 @@ static void range_tree_stat_incr(range_tree_t *rt, range_seg_t *rs) { uint64_t size = rs->rs_end - rs->rs_start; - int idx = highbit(size) - 1; + int idx = highbit64(size) - 1; ASSERT3U(idx, <, sizeof (rt->rt_histogram) / sizeof (*rt->rt_histogram)); @@ -93,7 +93,7 @@ static void range_tree_stat_decr(range_tree_t *rt, range_seg_t *rs) { uint64_t size = rs->rs_end - rs->rs_start; - int idx = highbit(size) - 1; + int idx = highbit64(size) - 1; ASSERT3U(idx, <, sizeof (rt->rt_histogram) / sizeof (*rt->rt_histogram)); @@ -299,10 +299,10 @@ range_tree_remove(void *arg, uint64_t st } static range_seg_t * -range_tree_find(range_tree_t *rt, uint64_t start, uint64_t size, - avl_index_t *wherep) +range_tree_find_impl(range_tree_t *rt, uint64_t start, uint64_t size) { - range_seg_t rsearch, *rs; + avl_index_t where; + range_seg_t rsearch; uint64_t end = start + size; ASSERT(MUTEX_HELD(rt->rt_lock)); @@ -310,9 +310,14 @@ range_tree_find(range_tree_t *rt, uint64 rsearch.rs_start = start; rsearch.rs_end = end; - rs = avl_find(&rt->rt_root, &rsearch, wherep); + return (avl_find(&rt->rt_root, &rsearch, &where)); +} - if (rs != NULL && rs->rs_start <= start && rs->rs_end >= end) +static range_seg_t * +range_tree_find(range_tree_t *rt, uint64_t start, uint64_t size) +{ + range_seg_t *rs = range_tree_find_impl(rt, start, size); + if (rs != NULL && rs->rs_start <= start && rs->rs_end >= start + size) return (rs); return (NULL); } @@ -321,10 +326,9 @@ void range_tree_verify(range_tree_t *rt, uint64_t off, uint64_t size) { range_seg_t *rs; - avl_index_t where; mutex_enter(rt->rt_lock); - rs = range_tree_find(rt, off, size, &where); + rs = range_tree_find(rt, off, size); if (rs != NULL) panic("freeing free block; rs=%p", (void *)rs); mutex_exit(rt->rt_lock); @@ -333,9 +337,23 @@ range_tree_verify(range_tree_t *rt, uint boolean_t range_tree_contains(range_tree_t *rt, uint64_t start, uint64_t size) { - avl_index_t where; + return (range_tree_find(rt, start, size) != NULL); +} - return (range_tree_find(rt, start, size, &where) != NULL); +/* + * Ensure that this range is not in the tree, regardless of whether + * it is currently in the tree. + */ +void +range_tree_clear(range_tree_t *rt, uint64_t start, uint64_t size) +{ + range_seg_t *rs; + + while ((rs = range_tree_find_impl(rt, start, size)) != NULL) { + uint64_t free_start = MAX(rs->rs_start, start); + uint64_t free_end = MIN(rs->rs_end, start + size); + range_tree_remove(rt, free_start, free_end - free_start); + } } void Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c Fri May 9 07:38:22 2014 (r265750) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c Fri May 9 07:54:59 2014 (r265751) @@ -23,7 +23,7 @@ * Use is subject to license terms. */ /* - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. */ #include @@ -267,7 +267,7 @@ space_map_set_blocksize(space_map_t *sm, * adding more blocks. The block size can grow until it * reaches space_map_max_blksz. */ - newsz = ISP2(size) ? size : 1ULL << highbit(size); + newsz = ISP2(size) ? size : 1ULL << highbit64(size); if (newsz > space_map_max_blksz) newsz = space_map_max_blksz; Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Fri May 9 07:38:22 2014 (r265750) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Fri May 9 07:54:59 2014 (r265751) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. */ #ifndef _SYS_DNODE_H @@ -198,7 +198,7 @@ typedef struct dnode { /* protected by dn_mtx: */ kmutex_t dn_mtx; list_t dn_dirty_records[TXG_SIZE]; - avl_tree_t dn_ranges[TXG_SIZE]; + struct range_tree *dn_free_ranges[TXG_SIZE]; uint64_t dn_allocated_txg; uint64_t dn_free_txg; uint64_t dn_assigned_txg; @@ -280,8 +280,6 @@ void dnode_buf_byteswap(void *buf, size_ void dnode_verify(dnode_t *dn); int dnode_set_blksz(dnode_t *dn, uint64_t size, int ibs, dmu_tx_t *tx); void dnode_free_range(dnode_t *dn, uint64_t off, uint64_t len, dmu_tx_t *tx); -void dnode_clear_range(dnode_t *dn, uint64_t blkid, - uint64_t nblks, dmu_tx_t *tx); void dnode_diduse_space(dnode_t *dn, int64_t space); void dnode_willuse_space(dnode_t *dn, int64_t space, dmu_tx_t *tx); void dnode_new_blkid(dnode_t *dn, uint64_t blkid, dmu_tx_t *tx, boolean_t); Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/range_tree.h ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/range_tree.h Fri May 9 07:38:22 2014 (r265750) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/range_tree.h Fri May 9 07:54:59 2014 (r265751) @@ -24,7 +24,7 @@ */ /* - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013, 2014 by Delphix. All rights reserved. */ #ifndef _SYS_RANGE_TREE_H @@ -85,6 +85,7 @@ void range_tree_stat_verify(range_tree_t void range_tree_add(void *arg, uint64_t start, uint64_t size); void range_tree_remove(void *arg, uint64_t start, uint64_t size); +void range_tree_clear(range_tree_t *rt, uint64_t start, uint64_t size); void range_tree_vacate(range_tree_t *rt, range_tree_func_t *func, void *arg); void range_tree_walk(range_tree_t *rt, range_tree_func_t *func, void *arg); Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Fri May 9 07:38:22 2014 (r265750) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Fri May 9 07:54:59 2014 (r265751) @@ -22,7 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright 2013 Martin Matuska . All rights reserved. */ @@ -1626,7 +1626,7 @@ vdev_metaslab_set_size(vdev_t *vd) /* * Aim for roughly 200 metaslabs per vdev. */ - vd->vdev_ms_shift = highbit(vd->vdev_asize / 200); + vd->vdev_ms_shift = highbit64(vd->vdev_asize / 200); vd->vdev_ms_shift = MAX(vd->vdev_ms_shift, SPA_MAXBLOCKSHIFT); } Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c Fri May 9 07:38:22 2014 (r265750) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c Fri May 9 07:54:59 2014 (r265751) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. * Copyright (c) 2013 Joyent, Inc. All rights reserved. */ @@ -512,7 +512,7 @@ skip_open: FKIOCTL, kcred, NULL) != 0) dkmext.dki_pbsize = DEV_BSIZE; - *ashift = highbit(MAX(dkmext.dki_pbsize, SPA_MINBLOCKSIZE)) - 1; + *ashift = highbit64(MAX(dkmext.dki_pbsize, SPA_MINBLOCKSIZE)) - 1; if (vd->vdev_wholedisk == 1) { uint64_t capacity = dkmext.dki_capacity - 1; Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c Fri May 9 07:38:22 2014 (r265750) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c Fri May 9 07:54:59 2014 (r265751) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. */ /* @@ -84,7 +84,7 @@ fzap_upgrade(zap_t *zap, dmu_tx_t *tx, z &zap->zap_f.zap_phys, zap_evict); mutex_init(&zap->zap_f.zap_num_entries_mtx, 0, 0, 0); - zap->zap_f.zap_block_shift = highbit(zap->zap_dbuf->db_size) - 1; + zap->zap_f.zap_block_shift = highbit64(zap->zap_dbuf->db_size) - 1; zp = zap->zap_f.zap_phys; /* @@ -458,7 +458,7 @@ zap_open_leaf(uint64_t blkid, dmu_buf_t rw_init(&l->l_rwlock, 0, 0, 0); rw_enter(&l->l_rwlock, RW_WRITER); l->l_blkid = blkid; - l->l_bs = highbit(db->db_size)-1; + l->l_bs = highbit64(db->db_size) - 1; l->l_dbuf = db; l->l_phys = NULL; Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_leaf.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_leaf.c Fri May 9 07:38:22 2014 (r265750) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_leaf.c Fri May 9 07:54:59 2014 (r265751) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013, 2014 by Delphix. All rights reserved. */ /* @@ -105,16 +105,16 @@ zap_leaf_byteswap(zap_leaf_phys_t *buf, { int i; zap_leaf_t l; - l.l_bs = highbit(size)-1; + l.l_bs = highbit64(size) - 1; l.l_phys = buf; - buf->l_hdr.lh_block_type = BSWAP_64(buf->l_hdr.lh_block_type); - buf->l_hdr.lh_prefix = BSWAP_64(buf->l_hdr.lh_prefix); - buf->l_hdr.lh_magic = BSWAP_32(buf->l_hdr.lh_magic); - buf->l_hdr.lh_nfree = BSWAP_16(buf->l_hdr.lh_nfree); - buf->l_hdr.lh_nentries = BSWAP_16(buf->l_hdr.lh_nentries); - buf->l_hdr.lh_prefix_len = BSWAP_16(buf->l_hdr.lh_prefix_len); - buf->l_hdr.lh_freelist = BSWAP_16(buf->l_hdr.lh_freelist); + buf->l_hdr.lh_block_type = BSWAP_64(buf->l_hdr.lh_block_type); + buf->l_hdr.lh_prefix = BSWAP_64(buf->l_hdr.lh_prefix); + buf->l_hdr.lh_magic = BSWAP_32(buf->l_hdr.lh_magic); + buf->l_hdr.lh_nfree = BSWAP_16(buf->l_hdr.lh_nfree); + buf->l_hdr.lh_nentries = BSWAP_16(buf->l_hdr.lh_nentries); + buf->l_hdr.lh_prefix_len = BSWAP_16(buf->l_hdr.lh_prefix_len); + buf->l_hdr.lh_freelist = BSWAP_16(buf->l_hdr.lh_freelist); for (i = 0; i < ZAP_LEAF_HASH_NUMENTRIES(&l); i++) buf->l_hash[i] = BSWAP_16(buf->l_hash[i]); @@ -157,7 +157,7 @@ zap_leaf_init(zap_leaf_t *l, boolean_t s { int i; - l->l_bs = highbit(l->l_dbuf->db_size)-1; + l->l_bs = highbit64(l->l_dbuf->db_size) - 1; zap_memset(&l->l_phys->l_hdr, 0, sizeof (struct zap_leaf_header)); zap_memset(l->l_phys->l_hash, CHAIN_END, 2*ZAP_LEAF_HASH_NUMENTRIES(l)); for (i = 0; i < ZAP_LEAF_NUMCHUNKS(l); i++) { Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c Fri May 9 07:38:22 2014 (r265750) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c Fri May 9 07:54:59 2014 (r265751) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. */ #include @@ -380,7 +380,7 @@ mzap_open(objset_t *os, uint64_t obj, dm if (*(uint64_t *)db->db_data != ZBT_MICRO) { mutex_init(&zap->zap_f.zap_num_entries_mtx, 0, 0, 0); - zap->zap_f.zap_block_shift = highbit(db->db_size) - 1; + zap->zap_f.zap_block_shift = highbit64(db->db_size) - 1; } else { zap->zap_ismicro = TRUE; } Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Fri May 9 07:38:22 2014 (r265750) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Fri May 9 07:54:59 2014 (r265751) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright (c) 2011 Nexenta Systems, Inc. All rights reserved. */ @@ -1348,7 +1348,7 @@ zio_execute(zio_t *zio) } zio->io_stage = stage; - rv = zio_pipeline[highbit(stage) - 1](&zio); + rv = zio_pipeline[highbit64(stage) - 1](&zio); if (rv == ZIO_PIPELINE_STOP) return; Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/bitmap.h ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/bitmap.h Fri May 9 07:38:22 2014 (r265750) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/bitmap.h Fri May 9 07:54:59 2014 (r265751) @@ -24,6 +24,10 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2014 by Delphix. All rights reserved. + */ + /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ @@ -31,8 +35,6 @@ #ifndef _SYS_BITMAP_H #define _SYS_BITMAP_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -152,6 +154,7 @@ extern int bt_range(ulong_t *bitmap, siz * Low order bit is 0, high order bit is 31. */ extern int highbit(ulong_t); +extern int highbit64(uint64_t); extern int lowbit(ulong_t); extern int bt_getlowbit(ulong_t *bitmap, size_t start, size_t stop); extern void bt_copy(ulong_t *, ulong_t *, ulong_t); Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h Fri May 9 07:38:22 2014 (r265750) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h Fri May 9 07:54:59 2014 (r265751) @@ -409,6 +409,38 @@ highbit(ulong_t i) return (h); } +/* + * Find highest one bit set. + * Returns bit number + 1 of highest bit that is set, otherwise returns 0. + */ +static __inline int +highbit64(uint64_t i) +{ + int h = 1; + + if (i == 0) + return (0); + if (i & 0xffffffff00000000ULL) { + h += 32; i >>= 32; + } + if (i & 0xffff0000) { + h += 16; i >>= 16; + } + if (i & 0xff00) { + h += 8; i >>= 8; + } + if (i & 0xf0) { + h += 4; i >>= 4; + } + if (i & 0xc) { + h += 2; i >>= 2; + } + if (i & 0x2) { + h += 1; + } + return (h); +} + #ifdef __cplusplus } #endif From owner-svn-src-stable@FreeBSD.ORG Fri May 9 08:02:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A582DF2C; Fri, 9 May 2014 08:02:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91865638; Fri, 9 May 2014 08:02:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4982rre019711; Fri, 9 May 2014 08:02:53 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4982rlR019708; Fri, 9 May 2014 08:02:53 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201405090802.s4982rlR019708@svn.freebsd.org> From: Xin LI Date: Fri, 9 May 2014 08:02:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265752 - in stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 08:02:53 -0000 Author: delphij Date: Fri May 9 08:02:52 2014 New Revision: 265752 URL: http://svnweb.freebsd.org/changeset/base/265752 Log: MFC r264671: MFV r264668: 4754 io issued to near-full luns even after setting noalloc threshold 4755 mg_alloc_failures is no longer needed Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Fri May 9 07:54:59 2014 (r265751) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Fri May 9 08:02:52 2014 (r265752) @@ -41,7 +41,7 @@ SYSCTL_NODE(_vfs_zfs, OID_AUTO, metaslab * avoid having to load lots of space_maps in a given txg. There are, * however, some cases where we want to avoid "fast" ganging and instead * we want to do an exhaustive search of all metaslabs on this device. - * Currently we don't allow any gang, zil, or dump device related allocations + * Currently we don't allow any gang, slog, or dump device related allocations * to "fast" gang. */ #define CAN_FASTGANG(flags) \ @@ -74,18 +74,6 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, condense_ " of in-memory counterpart"); /* - * This value defines the number of allowed allocation failures per vdev. - * If a device reaches this threshold in a given txg then we consider skipping - * allocations on that device. The value of zfs_mg_alloc_failures is computed - * in zio_init() unless it has been overridden in /etc/system. - */ -int zfs_mg_alloc_failures = 0; -TUNABLE_INT("vfs.zfs.mg_alloc_failures", &zfs_mg_alloc_failures); -SYSCTL_INT(_vfs_zfs, OID_AUTO, mg_alloc_failures, CTLFLAG_RWTUN, - &zfs_mg_alloc_failures, 0, - "Number of allowed allocation failures per vdev"); - -/* * The zfs_mg_noalloc_threshold defines which metaslab groups should * be eligible for allocation. The value is defined as a percentage of * a free space. Metaslab groups that have more free space than @@ -1708,10 +1696,7 @@ metaslab_sync_done(metaslab_t *msp, uint void metaslab_sync_reassess(metaslab_group_t *mg) { - int64_t failures = mg->mg_alloc_failures; - metaslab_group_alloc_update(mg); - atomic_add_64(&mg->mg_alloc_failures, -failures); /* * Preload the next potential metaslabs @@ -1738,7 +1723,7 @@ metaslab_distance(metaslab_t *msp, dva_t static uint64_t metaslab_group_alloc(metaslab_group_t *mg, uint64_t psize, uint64_t asize, - uint64_t txg, uint64_t min_distance, dva_t *dva, int d, int flags) + uint64_t txg, uint64_t min_distance, dva_t *dva, int d) { spa_t *spa = mg->mg_vd->vdev_spa; metaslab_t *msp = NULL; @@ -1765,10 +1750,9 @@ metaslab_group_alloc(metaslab_group_t *m spa_dbgmsg(spa, "%s: failed to meet weight " "requirement: vdev %llu, txg %llu, mg %p, " "msp %p, psize %llu, asize %llu, " - "failures %llu, weight %llu", - spa_name(spa), mg->mg_vd->vdev_id, txg, - mg, msp, psize, asize, - mg->mg_alloc_failures, msp->ms_weight); + "weight %llu", spa_name(spa), + mg->mg_vd->vdev_id, txg, + mg, msp, psize, asize, msp->ms_weight); mutex_exit(&mg->mg_lock); return (-1ULL); } @@ -1801,27 +1785,6 @@ metaslab_group_alloc(metaslab_group_t *m mutex_enter(&msp->ms_lock); /* - * If we've already reached the allowable number of failed - * allocation attempts on this metaslab group then we - * consider skipping it. We skip it only if we're allowed - * to "fast" gang, the physical size is larger than - * a gang block, and we're attempting to allocate from - * the primary metaslab. - */ - if (mg->mg_alloc_failures > zfs_mg_alloc_failures && - CAN_FASTGANG(flags) && psize > SPA_GANGBLOCKSIZE && - activation_weight == METASLAB_WEIGHT_PRIMARY) { - spa_dbgmsg(spa, "%s: skipping metaslab group: " - "vdev %llu, txg %llu, mg %p, msp[%llu] %p, " - "psize %llu, asize %llu, failures %llu", - spa_name(spa), mg->mg_vd->vdev_id, txg, mg, - msp->ms_id, msp, psize, asize, - mg->mg_alloc_failures); - mutex_exit(&msp->ms_lock); - return (-1ULL); - } - - /* * Ensure that the metaslab we have selected is still * capable of handling our request. It's possible that * another thread may have changed the weight while we @@ -1860,8 +1823,6 @@ metaslab_group_alloc(metaslab_group_t *m if ((offset = metaslab_block_alloc(msp, asize)) != -1ULL) break; - atomic_inc_64(&mg->mg_alloc_failures); - metaslab_passivate(msp, metaslab_block_maxsize(msp)); mutex_exit(&msp->ms_lock); } @@ -2016,7 +1977,7 @@ top: ASSERT(P2PHASE(asize, 1ULL << vd->vdev_ashift) == 0); offset = metaslab_group_alloc(mg, psize, asize, txg, distance, - dva, d, flags); + dva, d); if (offset != -1ULL) { /* * If we've just selected this metaslab group, Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h Fri May 9 07:54:59 2014 (r265751) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h Fri May 9 08:02:52 2014 (r265752) @@ -24,7 +24,7 @@ */ /* - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. */ #ifndef _SYS_METASLAB_IMPL_H @@ -58,7 +58,6 @@ struct metaslab_group { kmutex_t mg_lock; avl_tree_t mg_metaslab_tree; uint64_t mg_aliquot; - uint64_t mg_alloc_failures; boolean_t mg_allocatable; /* can we allocate? */ uint64_t mg_free_capacity; /* percentage free */ int64_t mg_bias; Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Fri May 9 07:54:59 2014 (r265751) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Fri May 9 08:02:52 2014 (r265752) @@ -82,7 +82,6 @@ kmem_cache_t *zio_data_buf_cache[SPA_MAX #ifdef _KERNEL extern vmem_t *zio_alloc_arena; #endif -extern int zfs_mg_alloc_failures; /* * The following actions directly effect the spa's sync-to-convergence logic. @@ -198,15 +197,6 @@ zio_init(void) } out: - /* - * The zio write taskqs have 1 thread per cpu, allow 1/2 of the taskqs - * to fail 3 times per txg or 8 failures, whichever is greater. - */ - if (zfs_mg_alloc_failures == 0) - zfs_mg_alloc_failures = MAX((3 * max_ncpus / 2), 8); - else if (zfs_mg_alloc_failures < 8) - zfs_mg_alloc_failures = 8; - zio_inject_init(); zio_trim_ksp = kstat_create("zfs", 0, "zio_trim", "misc", From owner-svn-src-stable@FreeBSD.ORG Fri May 9 08:07:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 120C515C; Fri, 9 May 2014 08:07:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F3E7766B; Fri, 9 May 2014 08:07:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s49875L4020515; Fri, 9 May 2014 08:07:05 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s49875iG020514; Fri, 9 May 2014 08:07:05 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201405090807.s49875iG020514@svn.freebsd.org> From: Xin LI Date: Fri, 9 May 2014 08:07:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265753 - stable/9/usr.sbin/portsnap/portsnap X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 08:07:06 -0000 Author: delphij Date: Fri May 9 08:07:05 2014 New Revision: 265753 URL: http://svnweb.freebsd.org/changeset/base/265753 Log: MFC r264740: Use case insensitive match in portsnap. PR: bin/186510 Submitted by: olli Modified: stable/9/usr.sbin/portsnap/portsnap/portsnap.sh Directory Properties: stable/9/usr.sbin/portsnap/ (props changed) stable/9/usr.sbin/portsnap/portsnap/ (props changed) Modified: stable/9/usr.sbin/portsnap/portsnap/portsnap.sh ============================================================================== --- stable/9/usr.sbin/portsnap/portsnap/portsnap.sh Fri May 9 08:02:52 2014 (r265752) +++ stable/9/usr.sbin/portsnap/portsnap/portsnap.sh Fri May 9 08:07:05 2014 (r265753) @@ -348,7 +348,7 @@ fetch_pick_server_init() { # "$name server selection ..."; we allow either format. MLIST="_http._tcp.${SERVERNAME}" host -t srv "${MLIST}" | - sed -nE "s/${MLIST} (has SRV record|server selection) //p" | + sed -nE "s/${MLIST} (has SRV record|server selection) //Ip" | cut -f 1,2,4 -d ' ' | sed -e 's/\.$//' | sort > serverlist_full From owner-svn-src-stable@FreeBSD.ORG Fri May 9 08:10:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A80E2E7; Fri, 9 May 2014 08:10:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 245CC695; Fri, 9 May 2014 08:10:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s498AaPV021572; Fri, 9 May 2014 08:10:36 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s498AXgt021555; Fri, 9 May 2014 08:10:33 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201405090810.s498AXgt021555@svn.freebsd.org> From: Xin LI Date: Fri, 9 May 2014 08:10:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265754 - in stable/9: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/common/zfs sys/cddl/co... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 08:10:36 -0000 Author: delphij Date: Fri May 9 08:10:33 2014 New Revision: 265754 URL: http://svnweb.freebsd.org/changeset/base/265754 Log: MFC r264835: MFV r264829: 3897 zfs filesystem and snapshot limits Modified: stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8 stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c stable/9/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c stable/9/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h stable/9/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_send.h stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/cddl/contrib/opensolaris/cmd/zfs/ (props changed) stable/9/cddl/contrib/opensolaris/cmd/zpool/ (props changed) stable/9/cddl/contrib/opensolaris/lib/libzfs/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Fri May 9 08:07:05 2014 (r265753) +++ stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Fri May 9 08:10:33 2014 (r265754) @@ -24,13 +24,13 @@ .\" Copyright (c) 2012, Glen Barber .\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. .\" Copyright (c) 2013 Nexenta Systems, Inc. All Rights Reserved. -.\" Copyright (c) 2013, Joyent, Inc. All rights reserved. +.\" Copyright (c) 2014, Joyent, Inc. All rights reserved. .\" Copyright (c) 2013, Steven Hartland .\" Copyright (c) 2014, Xin LI .\" .\" $FreeBSD$ .\" -.Dd March 20, 2014 +.Dd April 23, 2014 .Dt ZFS 8 .Os .Sh NAME @@ -536,6 +536,13 @@ if the snapshot has been marked for defe .Qq Nm Cm destroy -d command. Otherwise, the property is .Cm off . +.It Sy filesystem_count +The total number of filesystems and volumes that exist under this location in the +dataset tree. +This value is only available when a +.Sy filesystem_limit +has +been set somewhere in the tree under which the dataset resides. .It Sy logicalreferenced The amount of space that is .Qq logically @@ -594,6 +601,12 @@ The compression ratio achieved for the space of this dataset, expressed as a multiplier. See also the .Sy compressratio property. +.It Sy snapshot_count +The total number of snapshots that exist under this location in the dataset tree. +This value is only available when a +.Sy snapshot_limit +has been set somewhere +in the tree under which the dataset resides. .It Sy type The type of dataset: .Sy filesystem , volume , No or Sy snapshot . @@ -1014,6 +1027,23 @@ The .Sy mlslabel property is currently not supported on .Fx . +.It Sy filesystem_limit Ns = Ns Ar count | Cm none +Limits the number of filesystems and volumes that can exist under this point in +the dataset tree. +The limit is not enforced if the user is allowed to change +the limit. +Setting a +.Sy filesystem_limit +on a descendent of a filesystem that +already has a +.Sy filesystem_limit +does not override the ancestor's +.Sy filesystem_limit , +but rather imposes an additional limit. +This feature must be enabled to be used +.Po see +.Xr zpool-features 7 +.Pc . .It Sy mountpoint Ns = Ns Ar path | Cm none | legacy Controls the mount point used for this file system. See the .Qq Sx Mount Points @@ -1055,6 +1085,27 @@ the ancestor's quota, but rather imposes Quotas cannot be set on volumes, as the .Sy volsize property acts as an implicit quota. +.It Sy snapshot_limit Ns = Ns Ar count | Cm none +Limits the number of snapshots that can be created on a dataset and its +descendents. +Setting a +.Sy snapshot_limit +on a descendent of a dataset that already +has a +.Sy snapshot_limit +does not override the ancestor's +.Sy snapshot_limit , +but +rather imposes an additional limit. +The limit is not enforced if the user is +allowed to change the limit. +For example, this means that recursive snapshots +taken from the global zone are counted against each delegated dataset within +a jail. +This feature must be enabled to be used +.Po see +.Xr zpool-features 7 +.Pc . .It Sy userquota@ Ns Ar user Ns = Ns Ar size | Cm none Limits the amount of space consumed by the specified user. Similar to the @@ -2698,6 +2749,7 @@ protocol .It dedup Ta property .It devices Ta property .It exec Ta property +.It filesystem_limit Ta property .It logbias Ta property .It jailed Ta property .It mlslabel Ta property @@ -2716,6 +2768,7 @@ protocol .It sharenfs Ta property .It sharesmb Ta property .It snapdir Ta property +.It snapshot_limit Ta property .It sync Ta property .It utf8only Ta property .It version Ta property @@ -3063,10 +3116,12 @@ pool/home/bob compression on pool/home/bob atime on default pool/home/bob devices on default pool/home/bob exec on default +pool/home/bob filesystem_limit none default pool/home/bob setuid on default pool/home/bob readonly off default pool/home/bob jailed off default pool/home/bob snapdir hidden default +pool/home/bob snapshot_limit none default pool/home/bob aclmode discard default pool/home/bob aclinherit restricted default pool/home/bob canmount on default Modified: stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 ============================================================================== --- stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Fri May 9 08:07:05 2014 (r265753) +++ stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Fri May 9 08:10:33 2014 (r265754) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 2, 2014 +.Dd April 23, 2014 .Dt ZPOOL-FEATURES 7 .Os .Sh NAME @@ -187,6 +187,23 @@ This feature is .Sy active while there are any filesystems, volumes, or snapshots which were created after enabling this feature. +.It Sy filesystem_limits +.Bl -column "READ\-ONLY COMPATIBLE" "com.joyent:filesystem_limits" +.It GUID Ta com.joyent:filesystem_limits +.It READ\-ONLY COMPATIBLE Ta yes +.It DEPENDENCIES Ta extensible_dataset +.El +.Pp +This feature enables filesystem and snapshot limits. +These limits can be used +to control how many filesystems and/or snapshots can be created at the point in +the tree on which the limits are set. +.Pp +This feature is +.Sy active +once either of the limit properties has been +set on a dataset. +Once activated the feature is never deactivated. .It Sy lz4_compress .Bl -column "READ\-ONLY COMPATIBLE" "org.illumos:lz4_compress" .It GUID Ta org.illumos:lz4_compress Modified: stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Fri May 9 08:07:05 2014 (r265753) +++ stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Fri May 9 08:10:33 2014 (r265754) @@ -21,6 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2012 DEY Storage Systems, Inc. All rights reserved. * Copyright (c) 2011-2012 Pawel Jakub Dawidek . @@ -1910,6 +1911,10 @@ get_numeric_property(zfs_handle_t *zhp, case ZFS_PROP_REFQUOTA: case ZFS_PROP_RESERVATION: case ZFS_PROP_REFRESERVATION: + case ZFS_PROP_FILESYSTEM_LIMIT: + case ZFS_PROP_SNAPSHOT_LIMIT: + case ZFS_PROP_FILESYSTEM_COUNT: + case ZFS_PROP_SNAPSHOT_COUNT: *val = getprop_uint64(zhp, prop, source); if (*source == NULL) { @@ -2315,6 +2320,30 @@ zfs_prop_get(zfs_handle_t *zhp, zfs_prop } break; + case ZFS_PROP_FILESYSTEM_LIMIT: + case ZFS_PROP_SNAPSHOT_LIMIT: + case ZFS_PROP_FILESYSTEM_COUNT: + case ZFS_PROP_SNAPSHOT_COUNT: + + if (get_numeric_property(zhp, prop, src, &source, &val) != 0) + return (-1); + + /* + * If limit is UINT64_MAX, we translate this into 'none' (unless + * literal is set), and indicate that it's the default value. + * Otherwise, we print the number nicely and indicate that it's + * set locally. + */ + if (literal) { + (void) snprintf(propbuf, proplen, "%llu", + (u_longlong_t)val); + } else if (val == UINT64_MAX) { + (void) strlcpy(propbuf, "none", proplen); + } else { + zfs_nicenum(val, propbuf, proplen); + } + break; + case ZFS_PROP_REFRATIO: case ZFS_PROP_COMPRESSRATIO: if (get_numeric_property(zhp, prop, src, &source, &val) != 0) Modified: stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c Fri May 9 08:07:05 2014 (r265753) +++ stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c Fri May 9 08:10:33 2014 (r265754) @@ -21,6 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. * Copyright (c) 2012 by Delphix. All rights reserved. */ @@ -1266,6 +1267,16 @@ zprop_parse_value(libzfs_handle_t *hdl, "use 'none' to disable quota/refquota")); goto error; } + + /* + * Special handling for "*_limit=none". In this case it's not + * 0 but UINT64_MAX. + */ + if ((type & ZFS_TYPE_DATASET) && isnone && + (prop == ZFS_PROP_FILESYSTEM_LIMIT || + prop == ZFS_PROP_SNAPSHOT_LIMIT)) { + *ivalp = UINT64_MAX; + } break; case PROP_TYPE_INDEX: Modified: stable/9/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c Fri May 9 08:07:05 2014 (r265753) +++ stable/9/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c Fri May 9 08:10:33 2014 (r265754) @@ -205,4 +205,13 @@ zpool_feature_init(void) "com.delphix:bookmarks", "bookmarks", "\"zfs bookmark\" command", B_TRUE, B_FALSE, B_FALSE, bookmarks_deps); + + static const spa_feature_t filesystem_limits_deps[] = { + SPA_FEATURE_EXTENSIBLE_DATASET, + SPA_FEATURE_NONE + }; + zfeature_register(SPA_FEATURE_FS_SS_LIMIT, + "com.joyent:filesystem_limits", "filesystem_limits", + "Filesystem and snapshot limits.", B_TRUE, B_FALSE, B_FALSE, + filesystem_limits_deps); } Modified: stable/9/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h Fri May 9 08:07:05 2014 (r265753) +++ stable/9/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h Fri May 9 08:10:33 2014 (r265754) @@ -48,6 +48,7 @@ typedef enum spa_feature { SPA_FEATURE_HOLE_BIRTH, SPA_FEATURE_EXTENSIBLE_DATASET, SPA_FEATURE_BOOKMARKS, + SPA_FEATURE_FS_SS_LIMIT, SPA_FEATURES } spa_feature_t; Modified: stable/9/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Fri May 9 08:07:05 2014 (r265753) +++ stable/9/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Fri May 9 08:10:33 2014 (r265754) @@ -371,6 +371,18 @@ zfs_prop_init(void) zprop_register_number(ZFS_PROP_REFRESERVATION, "refreservation", 0, PROP_DEFAULT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, " | none", "REFRESERV"); + zprop_register_number(ZFS_PROP_FILESYSTEM_LIMIT, "filesystem_limit", + UINT64_MAX, PROP_DEFAULT, ZFS_TYPE_FILESYSTEM, + " | none", "FSLIMIT"); + zprop_register_number(ZFS_PROP_SNAPSHOT_LIMIT, "snapshot_limit", + UINT64_MAX, PROP_DEFAULT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, + " | none", "SSLIMIT"); + zprop_register_number(ZFS_PROP_FILESYSTEM_COUNT, "filesystem_count", + UINT64_MAX, PROP_DEFAULT, ZFS_TYPE_FILESYSTEM, + "", "FSCOUNT"); + zprop_register_number(ZFS_PROP_SNAPSHOT_COUNT, "snapshot_count", + UINT64_MAX, PROP_DEFAULT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, + "", "SSCOUNT"); /* inherit number properties */ zprop_register_number(ZFS_PROP_RECORDSIZE, "recordsize", Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Fri May 9 08:07:05 2014 (r265753) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Fri May 9 08:10:33 2014 (r265754) @@ -22,6 +22,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -758,9 +759,11 @@ dmu_objset_create_check(void *arg, dmu_t dsl_dir_rele(pdd, FTAG); return (SET_ERROR(EEXIST)); } + error = dsl_fs_ss_limit_check(pdd, 1, ZFS_PROP_FILESYSTEM_LIMIT, NULL, + doca->doca_cred); dsl_dir_rele(pdd, FTAG); - return (0); + return (error); } static void @@ -844,6 +847,12 @@ dmu_objset_clone_check(void *arg, dmu_tx dsl_dir_rele(pdd, FTAG); return (SET_ERROR(EXDEV)); } + error = dsl_fs_ss_limit_check(pdd, 1, ZFS_PROP_FILESYSTEM_LIMIT, NULL, + doca->doca_cred); + if (error != 0) { + dsl_dir_rele(pdd, FTAG); + return (SET_ERROR(EDQUOT)); + } dsl_dir_rele(pdd, FTAG); error = dsl_dataset_hold(dp, doca->doca_origin, FTAG, &origin); Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Fri May 9 08:07:05 2014 (r265753) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Fri May 9 08:10:33 2014 (r265754) @@ -22,7 +22,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. - * Copyright (c) 2012, Joyent, Inc. All rights reserved. + * Copyright (c) 2014, Joyent, Inc. All rights reserved. * Copyright (c) 2012, Martin Matuska . All rights reserved. */ @@ -806,6 +806,20 @@ recv_begin_check_existing_impl(dmu_recv_ if (error != ENOENT) return (error == 0 ? EEXIST : error); + /* + * Check snapshot limit before receiving. We'll recheck again at the + * end, but might as well abort before receiving if we're already over + * the limit. + * + * Note that we do not check the file system limit with + * dsl_dir_fscount_check because the temporary %clones don't count + * against that limit. + */ + error = dsl_fs_ss_limit_check(ds->ds_dir, 1, ZFS_PROP_SNAPSHOT_LIMIT, + NULL, drba->drba_cred); + if (error != 0) + return (error); + if (fromguid != 0) { dsl_dataset_t *snap; uint64_t obj = ds->ds_phys->ds_prev_snap_obj; @@ -912,6 +926,25 @@ dmu_recv_begin_check(void *arg, dmu_tx_t if (error != 0) return (error); + /* + * Check filesystem and snapshot limits before receiving. We'll + * recheck snapshot limits again at the end (we create the + * filesystems and increment those counts during begin_sync). + */ + error = dsl_fs_ss_limit_check(ds->ds_dir, 1, + ZFS_PROP_FILESYSTEM_LIMIT, NULL, drba->drba_cred); + if (error != 0) { + dsl_dataset_rele(ds, FTAG); + return (error); + } + + error = dsl_fs_ss_limit_check(ds->ds_dir, 1, + ZFS_PROP_SNAPSHOT_LIMIT, NULL, drba->drba_cred); + if (error != 0) { + dsl_dataset_rele(ds, FTAG); + return (error); + } + if (drba->drba_origin != NULL) { dsl_dataset_t *origin; error = dsl_dataset_hold(dp, drba->drba_origin, @@ -1021,6 +1054,7 @@ dmu_recv_begin(char *tofs, char *tosnap, drc->drc_tosnap = tosnap; drc->drc_tofs = tofs; drc->drc_force = force; + drc->drc_cred = CRED(); if (drrb->drr_magic == BSWAP_64(DMU_BACKUP_MAGIC)) drc->drc_byteswap = B_TRUE; @@ -1740,7 +1774,7 @@ dmu_recv_end_check(void *arg, dmu_tx_t * return (error); } error = dsl_dataset_snapshot_check_impl(origin_head, - drc->drc_tosnap, tx, B_TRUE); + drc->drc_tosnap, tx, B_TRUE, 1, drc->drc_cred); dsl_dataset_rele(origin_head, FTAG); if (error != 0) return (error); @@ -1748,7 +1782,7 @@ dmu_recv_end_check(void *arg, dmu_tx_t * error = dsl_destroy_head_check_impl(drc->drc_ds, 1); } else { error = dsl_dataset_snapshot_check_impl(drc->drc_ds, - drc->drc_tosnap, tx, B_TRUE); + drc->drc_tosnap, tx, B_TRUE, 1, drc->drc_cred); } return (error); } Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Fri May 9 08:07:05 2014 (r265753) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Fri May 9 08:10:33 2014 (r265754) @@ -22,7 +22,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Portions Copyright (c) 2011 Martin Matuska * Copyright (c) 2013 by Delphix. All rights reserved. - * Copyright (c) 2012, Joyent, Inc. All rights reserved. + * Copyright (c) 2014, Joyent, Inc. All rights reserved. * Copyright (c) 2014 RackTop Systems. */ @@ -321,7 +321,8 @@ dsl_dataset_snap_lookup(dsl_dataset_t *d } int -dsl_dataset_snap_remove(dsl_dataset_t *ds, const char *name, dmu_tx_t *tx) +dsl_dataset_snap_remove(dsl_dataset_t *ds, const char *name, dmu_tx_t *tx, + boolean_t adj_cnt) { objset_t *mos = ds->ds_dir->dd_pool->dp_meta_objset; uint64_t snapobj = ds->ds_phys->ds_snapnames_zapobj; @@ -338,6 +339,11 @@ dsl_dataset_snap_remove(dsl_dataset_t *d err = zap_remove_norm(mos, snapobj, name, mt, tx); if (err == ENOTSUP && mt == MT_FIRST) err = zap_remove(mos, snapobj, name, tx); + + if (err == 0 && adj_cnt) + dsl_fs_ss_count_adjust(ds->ds_dir, -1, + DD_FIELD_SNAPSHOT_COUNT, tx); + return (err); } @@ -765,6 +771,21 @@ dsl_dataset_create_sync(dsl_dir_t *pdd, dsl_deleg_set_create_perms(dd, tx, cr); + /* + * Since we're creating a new node we know it's a leaf, so we can + * initialize the counts if the limit feature is active. + */ + if (spa_feature_is_active(dp->dp_spa, SPA_FEATURE_FS_SS_LIMIT)) { + uint64_t cnt = 0; + objset_t *os = dd->dd_pool->dp_meta_objset; + + dsl_dir_zapify(dd, tx); + VERIFY0(zap_add(os, dd->dd_object, DD_FIELD_FILESYSTEM_COUNT, + sizeof (cnt), 1, &cnt, tx)); + VERIFY0(zap_add(os, dd->dd_object, DD_FIELD_SNAPSHOT_COUNT, + sizeof (cnt), 1, &cnt, tx)); + } + dsl_dir_rele(dd, FTAG); /* @@ -971,11 +992,12 @@ typedef struct dsl_dataset_snapshot_arg nvlist_t *ddsa_snaps; nvlist_t *ddsa_props; nvlist_t *ddsa_errors; + cred_t *ddsa_cr; } dsl_dataset_snapshot_arg_t; int dsl_dataset_snapshot_check_impl(dsl_dataset_t *ds, const char *snapname, - dmu_tx_t *tx, boolean_t recv) + dmu_tx_t *tx, boolean_t recv, uint64_t cnt, cred_t *cr) { int error; uint64_t value; @@ -1013,6 +1035,18 @@ dsl_dataset_snapshot_check_impl(dsl_data if (!recv && DS_IS_INCONSISTENT(ds)) return (SET_ERROR(EBUSY)); + /* + * Skip the check for temporary snapshots or if we have already checked + * the counts in dsl_dataset_snapshot_check. This means we really only + * check the count here when we're receiving a stream. + */ + if (cnt != 0 && cr != NULL) { + error = dsl_fs_ss_limit_check(ds->ds_dir, cnt, + ZFS_PROP_SNAPSHOT_LIMIT, NULL, cr); + if (error != 0) + return (error); + } + error = dsl_dataset_snapshot_reserve_space(ds, tx); if (error != 0) return (error); @@ -1028,6 +1062,99 @@ dsl_dataset_snapshot_check(void *arg, dm nvpair_t *pair; int rv = 0; + /* + * Pre-compute how many total new snapshots will be created for each + * level in the tree and below. This is needed for validating the + * snapshot limit when either taking a recursive snapshot or when + * taking multiple snapshots. + * + * The problem is that the counts are not actually adjusted when + * we are checking, only when we finally sync. For a single snapshot, + * this is easy, the count will increase by 1 at each node up the tree, + * but its more complicated for the recursive/multiple snapshot case. + * + * The dsl_fs_ss_limit_check function does recursively check the count + * at each level up the tree but since it is validating each snapshot + * independently we need to be sure that we are validating the complete + * count for the entire set of snapshots. We do this by rolling up the + * counts for each component of the name into an nvlist and then + * checking each of those cases with the aggregated count. + * + * This approach properly handles not only the recursive snapshot + * case (where we get all of those on the ddsa_snaps list) but also + * the sibling case (e.g. snapshot a/b and a/c so that we will also + * validate the limit on 'a' using a count of 2). + * + * We validate the snapshot names in the third loop and only report + * name errors once. + */ + if (dmu_tx_is_syncing(tx)) { + nvlist_t *cnt_track = NULL; + cnt_track = fnvlist_alloc(); + + /* Rollup aggregated counts into the cnt_track list */ + for (pair = nvlist_next_nvpair(ddsa->ddsa_snaps, NULL); + pair != NULL; + pair = nvlist_next_nvpair(ddsa->ddsa_snaps, pair)) { + char *pdelim; + uint64_t val; + char nm[MAXPATHLEN]; + + (void) strlcpy(nm, nvpair_name(pair), sizeof (nm)); + pdelim = strchr(nm, '@'); + if (pdelim == NULL) + continue; + *pdelim = '\0'; + + do { + if (nvlist_lookup_uint64(cnt_track, nm, + &val) == 0) { + /* update existing entry */ + fnvlist_add_uint64(cnt_track, nm, + val + 1); + } else { + /* add to list */ + fnvlist_add_uint64(cnt_track, nm, 1); + } + + pdelim = strrchr(nm, '/'); + if (pdelim != NULL) + *pdelim = '\0'; + } while (pdelim != NULL); + } + + /* Check aggregated counts at each level */ + for (pair = nvlist_next_nvpair(cnt_track, NULL); + pair != NULL; pair = nvlist_next_nvpair(cnt_track, pair)) { + int error = 0; + char *name; + uint64_t cnt = 0; + dsl_dataset_t *ds; + + name = nvpair_name(pair); + cnt = fnvpair_value_uint64(pair); + ASSERT(cnt > 0); + + error = dsl_dataset_hold(dp, name, FTAG, &ds); + if (error == 0) { + error = dsl_fs_ss_limit_check(ds->ds_dir, cnt, + ZFS_PROP_SNAPSHOT_LIMIT, NULL, + ddsa->ddsa_cr); + dsl_dataset_rele(ds, FTAG); + } + + if (error != 0) { + if (ddsa->ddsa_errors != NULL) + fnvlist_add_int32(ddsa->ddsa_errors, + name, error); + rv = error; + /* only report one error for this check */ + break; + } + } + nvlist_free(cnt_track); + } + for (pair = nvlist_next_nvpair(ddsa->ddsa_snaps, NULL); pair != NULL; pair = nvlist_next_nvpair(ddsa->ddsa_snaps, pair)) { int error = 0; @@ -1048,8 +1175,9 @@ dsl_dataset_snapshot_check(void *arg, dm if (error == 0) error = dsl_dataset_hold(dp, dsname, FTAG, &ds); if (error == 0) { + /* passing 0/NULL skips dsl_fs_ss_limit_check */ error = dsl_dataset_snapshot_check_impl(ds, - atp + 1, tx, B_FALSE); + atp + 1, tx, B_FALSE, 0, NULL); dsl_dataset_rele(ds, FTAG); } @@ -1061,6 +1189,7 @@ dsl_dataset_snapshot_check(void *arg, dm rv = error; } } + return (rv); } @@ -1088,6 +1217,7 @@ dsl_dataset_snapshot_sync_impl(dsl_datas bcmp(&os->os_phys->os_zil_header, &zero_zil, sizeof (zero_zil)) == 0); + dsl_fs_ss_count_adjust(ds->ds_dir, 1, DD_FIELD_SNAPSHOT_COUNT, tx); /* * The origin's ds_creation_txg has to be < TXG_INITIAL @@ -1266,6 +1396,7 @@ dsl_dataset_snapshot(nvlist_t *snaps, nv ddsa.ddsa_snaps = snaps; ddsa.ddsa_props = props; ddsa.ddsa_errors = errors; + ddsa.ddsa_cr = CRED(); if (error == 0) { error = dsl_sync_task(firstname, dsl_dataset_snapshot_check, @@ -1315,8 +1446,9 @@ dsl_dataset_snapshot_tmp_check(void *arg if (error != 0) return (error); + /* NULL cred means no limit check for tmp snapshot */ error = dsl_dataset_snapshot_check_impl(ds, ddsta->ddsta_snapname, - tx, B_FALSE); + tx, B_FALSE, 0, NULL); if (error != 0) { dsl_dataset_rele(ds, FTAG); return (error); @@ -1689,7 +1821,8 @@ dsl_dataset_rename_snapshot_sync_impl(ds spa_history_log_internal_ds(ds, "rename", tx, "-> @%s", ddrsa->ddrsa_newsnapname); - VERIFY0(dsl_dataset_snap_remove(hds, ddrsa->ddrsa_oldsnapname, tx)); + VERIFY0(dsl_dataset_snap_remove(hds, ddrsa->ddrsa_oldsnapname, tx, + B_FALSE)); mutex_enter(&ds->ds_lock); (void) strcpy(ds->ds_snapname, ddrsa->ddrsa_newsnapname); mutex_exit(&ds->ds_lock); @@ -1936,6 +2069,7 @@ typedef struct dsl_dataset_promote_arg { dsl_dataset_t *origin_origin; /* origin of the origin */ uint64_t used, comp, uncomp, unique, cloneusedsnap, originusedsnap; char *err_ds; + cred_t *cr; } dsl_dataset_promote_arg_t; static int snaplist_space(list_t *l, uint64_t mintxg, uint64_t *spacep); @@ -1953,6 +2087,7 @@ dsl_dataset_promote_check(void *arg, dmu dsl_dataset_t *origin_ds; int err; uint64_t unused; + uint64_t ss_mv_cnt; err = promote_hold(ddpa, dp, FTAG); if (err != 0) @@ -1999,6 +2134,7 @@ dsl_dataset_promote_check(void *arg, dmu * Note however, if we stop before we reach the ORIGIN we get: * uN + kN + kN-1 + ... + kM - uM-1 */ + ss_mv_cnt = 0; ddpa->used = origin_ds->ds_phys->ds_referenced_bytes; ddpa->comp = origin_ds->ds_phys->ds_compressed_bytes; ddpa->uncomp = origin_ds->ds_phys->ds_uncompressed_bytes; @@ -2007,6 +2143,8 @@ dsl_dataset_promote_check(void *arg, dmu uint64_t val, dlused, dlcomp, dluncomp; dsl_dataset_t *ds = snap->ds; + ss_mv_cnt++; + /* * If there are long holds, we won't be able to evict * the objset. @@ -2049,9 +2187,9 @@ dsl_dataset_promote_check(void *arg, dmu ddpa->origin_origin->ds_phys->ds_uncompressed_bytes; } - /* Check that there is enough space here */ + /* Check that there is enough space and limit headroom here */ err = dsl_dir_transfer_possible(origin_ds->ds_dir, hds->ds_dir, - ddpa->used); + 0, ss_mv_cnt, ddpa->used, ddpa->cr); if (err != 0) goto out; @@ -2191,10 +2329,12 @@ dsl_dataset_promote_sync(void *arg, dmu_ /* move snap name entry */ VERIFY0(dsl_dataset_get_snapname(ds)); VERIFY0(dsl_dataset_snap_remove(origin_head, - ds->ds_snapname, tx)); + ds->ds_snapname, tx, B_TRUE)); VERIFY0(zap_add(dp->dp_meta_objset, hds->ds_phys->ds_snapnames_zapobj, ds->ds_snapname, 8, 1, &ds->ds_object, tx)); + dsl_fs_ss_count_adjust(hds->ds_dir, 1, + DD_FIELD_SNAPSHOT_COUNT, tx); /* change containing dsl_dir */ dmu_buf_will_dirty(ds->ds_dbuf, tx); @@ -2432,6 +2572,7 @@ dsl_dataset_promote(const char *name, ch ddpa.ddpa_clonename = name; ddpa.err_ds = conflsnap; + ddpa.cr = CRED(); return (dsl_sync_task(name, dsl_dataset_promote_check, dsl_dataset_promote_sync, &ddpa, 2 + numsnaps)); Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c Fri May 9 08:07:05 2014 (r265753) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c Fri May 9 08:10:33 2014 (r265754) @@ -22,6 +22,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. + * Copyright (c) 2013 by Joyent, Inc. All rights reserved. */ #include @@ -430,7 +431,7 @@ dsl_destroy_snapshot_sync_impl(dsl_datas ASSERT3U(val, ==, obj); } #endif - VERIFY0(dsl_dataset_snap_remove(ds_head, ds->ds_snapname, tx)); + VERIFY0(dsl_dataset_snap_remove(ds_head, ds->ds_snapname, tx, B_TRUE)); dsl_dataset_rele(ds_head, FTAG); if (ds_prev != NULL) @@ -657,6 +658,17 @@ dsl_dir_destroy_sync(uint64_t ddobj, dmu ASSERT0(dd->dd_phys->dd_head_dataset_obj); /* + * Decrement the filesystem count for all parent filesystems. + * + * When we receive an incremental stream into a filesystem that already + * exists, a temporary clone is created. We never count this temporary + * clone, whose name begins with a '%'. + */ + if (dd->dd_myname[0] != '%' && dd->dd_parent != NULL) + dsl_fs_ss_count_adjust(dd->dd_parent, -1, + DD_FIELD_FILESYSTEM_COUNT, tx); + + /* * Remove our reservation. The impl() routine avoids setting the * actual property, which would require the (already destroyed) ds. */ Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Fri May 9 08:07:05 2014 (r265753) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Fri May 9 08:10:33 2014 (r265754) @@ -23,6 +23,7 @@ * Copyright (c) 2011 Pawel Jakub Dawidek . * All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2014 Joyent, Inc. All rights reserved. */ #include @@ -44,7 +45,86 @@ #ifdef _KERNEL #include #endif +#include +#include +#include #include "zfs_namecheck.h" +#include "zfs_prop.h" + +/* + * Filesystem and Snapshot Limits + * ------------------------------ + * + * These limits are used to restrict the number of filesystems and/or snapshots + * that can be created at a given level in the tree or below. A typical + * use-case is with a delegated dataset where the administrator wants to ensure + * that a user within the zone is not creating too many additional filesystems + * or snapshots, even though they're not exceeding their space quota. + * + * The filesystem and snapshot counts are stored as extensible properties. This + * capability is controlled by a feature flag and must be enabled to be used. + * Once enabled, the feature is not active until the first limit is set. At + * that point, future operations to create/destroy filesystems or snapshots + * will validate and update the counts. + * + * Because the count properties will not exist before the feature is active, + * the counts are updated when a limit is first set on an uninitialized + * dsl_dir node in the tree (The filesystem/snapshot count on a node includes + * all of the nested filesystems/snapshots. Thus, a new leaf node has a + * filesystem count of 0 and a snapshot count of 0. Non-existent filesystem and + * snapshot count properties on a node indicate uninitialized counts on that + * node.) When first setting a limit on an uninitialized node, the code starts + * at the filesystem with the new limit and descends into all sub-filesystems + * to add the count properties. + * + * In practice this is lightweight since a limit is typically set when the + * filesystem is created and thus has no children. Once valid, changing the + * limit value won't require a re-traversal since the counts are already valid. + * When recursively fixing the counts, if a node with a limit is encountered + * during the descent, the counts are known to be valid and there is no need to + * descend into that filesystem's children. The counts on filesystems above the + * one with the new limit will still be uninitialized, unless a limit is + * eventually set on one of those filesystems. The counts are always recursively + * updated when a limit is set on a dataset, unless there is already a limit. + * When a new limit value is set on a filesystem with an existing limit, it is + * possible for the new limit to be less than the current count at that level + * since a user who can change the limit is also allowed to exceed the limit. + * + * Once the feature is active, then whenever a filesystem or snapshot is + * created, the code recurses up the tree, validating the new count against the + * limit at each initialized level. In practice, most levels will not have a + * limit set. If there is a limit at any initialized level up the tree, the + * check must pass or the creation will fail. Likewise, when a filesystem or + * snapshot is destroyed, the counts are recursively adjusted all the way up + * the initizized nodes in the tree. Renaming a filesystem into different point + * in the tree will first validate, then update the counts on each branch up to + * the common ancestor. A receive will also validate the counts and then update + * them. + * + * An exception to the above behavior is that the limit is not enforced if the + * user has permission to modify the limit. This is primarily so that + * recursive snapshots in the global zone always work. We want to prevent a + * denial-of-service in which a lower level delegated dataset could max out its + * limit and thus block recursive snapshots from being taken in the global zone. + * Because of this, it is possible for the snapshot count to be over the limit + * and snapshots taken in the global zone could cause a lower level dataset to + * hit or exceed its limit. The administrator taking the global zone recursive + * snapshot should be aware of this side-effect and behave accordingly. + * For consistency, the filesystem limit is also not enforced if the user can + * modify the limit. + * + * The filesystem and snapshot limits are validated by dsl_fs_ss_limit_check() + * and updated by dsl_fs_ss_count_adjust(). A new limit value is setup in + * dsl_dir_activate_fs_ss_limit() and the counts are adjusted, if necessary, by + * dsl_dir_init_fs_ss_count(). + * + * There is a special case when we receive a filesystem that already exists. In + * this case a temporary clone name of %X is created (see dmu_recv_begin). We + * never update the filesystem counts for temporary clones. + * + * Likewise, we do not update the snapshot counts for temporary snapshots, + * such as those created by zfs diff. + */ static uint64_t dsl_dir_space_towrite(dsl_dir_t *dd); @@ -383,6 +463,402 @@ dsl_dir_hold(dsl_pool_t *dp, const char return (err); } +/* + * If the counts are already initialized for this filesystem and its + * descendants then do nothing, otherwise initialize the counts. + * + * The counts on this filesystem, and those below, may be uninitialized due to + * either the use of a pre-existing pool which did not support the + * filesystem/snapshot limit feature, or one in which the feature had not yet + * been enabled. + * + * Recursively descend the filesystem tree and update the filesystem/snapshot + * counts on each filesystem below, then update the cumulative count on the + * current filesystem. If the filesystem already has a count set on it, + * then we know that its counts, and the counts on the filesystems below it, + * are already correct, so we don't have to update this filesystem. + */ +static void +dsl_dir_init_fs_ss_count(dsl_dir_t *dd, dmu_tx_t *tx) +{ + uint64_t my_fs_cnt = 0; + uint64_t my_ss_cnt = 0; + dsl_pool_t *dp = dd->dd_pool; + objset_t *os = dp->dp_meta_objset; + zap_cursor_t *zc; + zap_attribute_t *za; + dsl_dataset_t *ds; + + ASSERT(spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_FS_SS_LIMIT)); + ASSERT(dsl_pool_config_held(dp)); + ASSERT(dmu_tx_is_syncing(tx)); + + dsl_dir_zapify(dd, tx); + + /* + * If the filesystem count has already been initialized then we + * don't need to recurse down any further. + */ + if (zap_contains(os, dd->dd_object, DD_FIELD_FILESYSTEM_COUNT) == 0) + return; + + zc = kmem_alloc(sizeof (zap_cursor_t), KM_SLEEP); + za = kmem_alloc(sizeof (zap_attribute_t), KM_SLEEP); + + /* Iterate my child dirs */ + for (zap_cursor_init(zc, os, dd->dd_phys->dd_child_dir_zapobj); + zap_cursor_retrieve(zc, za) == 0; zap_cursor_advance(zc)) { + dsl_dir_t *chld_dd; + uint64_t count; + + VERIFY0(dsl_dir_hold_obj(dp, za->za_first_integer, NULL, FTAG, + &chld_dd)); + + /* + * Ignore hidden ($FREE, $MOS & $ORIGIN) objsets and + * temporary datasets. + */ + if (chld_dd->dd_myname[0] == '$' || + chld_dd->dd_myname[0] == '%') { + dsl_dir_rele(chld_dd, FTAG); + continue; + } + + my_fs_cnt++; /* count this child */ + + dsl_dir_init_fs_ss_count(chld_dd, tx); + + VERIFY0(zap_lookup(os, chld_dd->dd_object, + DD_FIELD_FILESYSTEM_COUNT, sizeof (count), 1, &count)); + my_fs_cnt += count; + VERIFY0(zap_lookup(os, chld_dd->dd_object, + DD_FIELD_SNAPSHOT_COUNT, sizeof (count), 1, &count)); + my_ss_cnt += count; + + dsl_dir_rele(chld_dd, FTAG); + } + zap_cursor_fini(zc); + /* Count my snapshots (we counted children's snapshots above) */ + VERIFY0(dsl_dataset_hold_obj(dd->dd_pool, + dd->dd_phys->dd_head_dataset_obj, FTAG, &ds)); + + for (zap_cursor_init(zc, os, ds->ds_phys->ds_snapnames_zapobj); + zap_cursor_retrieve(zc, za) == 0; + zap_cursor_advance(zc)) { + /* Don't count temporary snapshots */ + if (za->za_name[0] != '%') + my_ss_cnt++; + } + + dsl_dataset_rele(ds, FTAG); + + kmem_free(zc, sizeof (zap_cursor_t)); + kmem_free(za, sizeof (zap_attribute_t)); + + /* we're in a sync task, update counts */ + dmu_buf_will_dirty(dd->dd_dbuf, tx); + VERIFY0(zap_add(os, dd->dd_object, DD_FIELD_FILESYSTEM_COUNT, + sizeof (my_fs_cnt), 1, &my_fs_cnt, tx)); + VERIFY0(zap_add(os, dd->dd_object, DD_FIELD_SNAPSHOT_COUNT, + sizeof (my_ss_cnt), 1, &my_ss_cnt, tx)); +} + +static int +dsl_dir_actv_fs_ss_limit_check(void *arg, dmu_tx_t *tx) +{ + char *ddname = (char *)arg; + dsl_pool_t *dp = dmu_tx_pool(tx); + dsl_dataset_t *ds; + dsl_dir_t *dd; + int error; + + error = dsl_dataset_hold(dp, ddname, FTAG, &ds); + if (error != 0) + return (error); + + if (!spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_FS_SS_LIMIT)) { + dsl_dataset_rele(ds, FTAG); + return (SET_ERROR(ENOTSUP)); + } + + dd = ds->ds_dir; + if (spa_feature_is_active(dp->dp_spa, SPA_FEATURE_FS_SS_LIMIT) && + dsl_dir_is_zapified(dd) && + zap_contains(dp->dp_meta_objset, dd->dd_object, + DD_FIELD_FILESYSTEM_COUNT) == 0) { + dsl_dataset_rele(ds, FTAG); + return (SET_ERROR(EALREADY)); + } + + dsl_dataset_rele(ds, FTAG); + return (0); +} + +static void +dsl_dir_actv_fs_ss_limit_sync(void *arg, dmu_tx_t *tx) +{ + char *ddname = (char *)arg; + dsl_pool_t *dp = dmu_tx_pool(tx); + dsl_dataset_t *ds; + spa_t *spa; + + VERIFY0(dsl_dataset_hold(dp, ddname, FTAG, &ds)); + + spa = dsl_dataset_get_spa(ds); + + if (!spa_feature_is_active(spa, SPA_FEATURE_FS_SS_LIMIT)) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Fri May 9 08:13:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D9EA548D; Fri, 9 May 2014 08:13:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6677773; Fri, 9 May 2014 08:13:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s498DBjg024626; Fri, 9 May 2014 08:13:11 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s498DB9q024624; Fri, 9 May 2014 08:13:11 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201405090813.s498DB9q024624@svn.freebsd.org> From: Xin LI Date: Fri, 9 May 2014 08:13:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265755 - in stable/9/sys/cddl/contrib/opensolaris: common/avl uts/common/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 08:13:12 -0000 Author: delphij Date: Fri May 9 08:13:11 2014 New Revision: 265755 URL: http://svnweb.freebsd.org/changeset/base/265755 Log: MFC r264836: MFV r264830: 4745 fix AVL code misspellings Modified: stable/9/sys/cddl/contrib/opensolaris/common/avl/avl.c stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/avl.h Directory Properties: stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/common/avl/avl.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/common/avl/avl.c Fri May 9 08:10:33 2014 (r265754) +++ stable/9/sys/cddl/contrib/opensolaris/common/avl/avl.c Fri May 9 08:13:11 2014 (r265755) @@ -37,7 +37,7 @@ * insertion and deletion relatively efficiently. Searching the tree is * still a fast operation, roughly O(log(N)). * - * The key to insertion and deletion is a set of tree maniuplations called + * The key to insertion and deletion is a set of tree manipulations called * rotations, which bring unbalanced subtrees back into the semi-balanced state. * * This implementation of AVL trees has the following peculiarities: @@ -45,7 +45,7 @@ * - The AVL specific data structures are physically embedded as fields * in the "using" data structures. To maintain generality the code * must constantly translate between "avl_node_t *" and containing - * data structure "void *"s by adding/subracting the avl_offset. + * data structure "void *"s by adding/subtracting the avl_offset. * * - Since the AVL data is always embedded in other structures, there is * no locking or memory allocation in the AVL routines. This must be @@ -94,7 +94,7 @@ #include /* - * Small arrays to translate between balance (or diff) values and child indeces. + * Small arrays to translate between balance (or diff) values and child indices. * * Code that deals with binary tree data structures will randomly use * left and right children when examining a tree. C "if()" statements @@ -114,7 +114,8 @@ static const int avl_balance2child[] = * * - If there is a left child, go to it, then to it's rightmost descendant. * - * - otherwise we return thru parent nodes until we've come from a right child. + * - otherwise we return through parent nodes until we've come from a right + * child. * * Return Value: * NULL - if at the end of the nodes @@ -919,7 +920,7 @@ avl_is_empty(avl_tree_t *tree) /* * Post-order tree walk used to visit all tree nodes and destroy the tree - * in post order. This is used for destroying a tree w/o paying any cost + * in post order. This is used for destroying a tree without paying any cost * for rebalancing it. * * example: Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/avl.h ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/avl.h Fri May 9 08:10:33 2014 (r265754) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/avl.h Fri May 9 08:13:11 2014 (r265755) @@ -39,7 +39,7 @@ extern "C" { #include /* - * This is a generic implemenatation of AVL trees for use in the Solaris kernel. + * This is a generic implementation of AVL trees for use in the Solaris kernel. * The interfaces provide an efficient way of implementing an ordered set of * data structures. * @@ -175,7 +175,7 @@ extern void avl_insert(avl_tree_t *tree, * Insert "new_data" in "tree" in the given "direction" either after * or before the data "here". * - * This might be usefull for avl clients caching recently accessed + * This might be useful for avl clients caching recently accessed * data to avoid doing avl_find() again for insertion. * * new_data - new data to insert From owner-svn-src-stable@FreeBSD.ORG Fri May 9 08:15:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5EDD1614; Fri, 9 May 2014 08:15:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BE3C78E; Fri, 9 May 2014 08:15:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s498Fa1R025024; Fri, 9 May 2014 08:15:36 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s498Fais025023; Fri, 9 May 2014 08:15:36 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201405090815.s498Fais025023@svn.freebsd.org> From: Xin LI Date: Fri, 9 May 2014 08:15:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265756 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 08:15:36 -0000 Author: delphij Date: Fri May 9 08:15:35 2014 New Revision: 265756 URL: http://svnweb.freebsd.org/changeset/base/265756 Log: MFC r265458: Import George Wilson's change for Illumos #4730: 4730 metaslab group taskq should be destroyed in metaslab_group_destroy() Reviewed by: Alex Reece Reviewed by: Matthew Ahrens Reviewed by: Sebastien Roy Original author: George Wilson Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Directory Properties: stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Fri May 9 08:13:11 2014 (r265755) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Fri May 9 08:15:35 2014 (r265756) @@ -412,7 +412,7 @@ metaslab_group_create(metaslab_class_t * mg->mg_class = mc; mg->mg_activation_count = 0; - mg->mg_taskq = taskq_create("metaslab_group_tasksq", metaslab_load_pct, + mg->mg_taskq = taskq_create("metaslab_group_taskq", metaslab_load_pct, minclsyspri, 10, INT_MAX, TASKQ_THREADS_CPU_PCT); return (mg); @@ -430,6 +430,7 @@ metaslab_group_destroy(metaslab_group_t */ ASSERT(mg->mg_activation_count <= 0); + taskq_destroy(mg->mg_taskq); avl_destroy(&mg->mg_metaslab_tree); mutex_destroy(&mg->mg_lock); kmem_free(mg, sizeof (metaslab_group_t)); From owner-svn-src-stable@FreeBSD.ORG Fri May 9 08:18:58 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 454B57A2; Fri, 9 May 2014 08:18:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32D497B9; Fri, 9 May 2014 08:18:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s498IwRs025540; Fri, 9 May 2014 08:18:58 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s498IwRI025539; Fri, 9 May 2014 08:18:58 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201405090818.s498IwRI025539@svn.freebsd.org> From: Xin LI Date: Fri, 9 May 2014 08:18:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265757 - stable/9/lib/libmagic X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 08:18:58 -0000 Author: delphij Date: Fri May 9 08:18:57 2014 New Revision: 265757 URL: http://svnweb.freebsd.org/changeset/base/265757 Log: MFC r265464: Sort .ALLSRC before concatenating files together. This makes sure that the file are always built the same. (Note that Header and Localstuff must appear first and in that order, the sorting does not affect as a coincident effect). Submitted by: sjg Modified: stable/9/lib/libmagic/Makefile Directory Properties: stable/9/lib/libmagic/ (props changed) Modified: stable/9/lib/libmagic/Makefile ============================================================================== --- stable/9/lib/libmagic/Makefile Fri May 9 08:15:35 2014 (r265756) +++ stable/9/lib/libmagic/Makefile Fri May 9 08:18:57 2014 (r265757) @@ -33,7 +33,7 @@ MAGFILES= ${CONTRDIR}/Header\ ${CONTRDIR}/Magdir/[a-z]* magic: ${MAGFILES} - cat ${.ALLSRC} > ${.TARGET} + cat ${.ALLSRC:O} > ${.TARGET} magic.mgc: mkmagic magic ./mkmagic magic From owner-svn-src-stable@FreeBSD.ORG Fri May 9 08:22:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 622D2A09; Fri, 9 May 2014 08:22:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50026844; Fri, 9 May 2014 08:22:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s498M3AC029151; Fri, 9 May 2014 08:22:03 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s498M3V1029150; Fri, 9 May 2014 08:22:03 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201405090822.s498M3V1029150@svn.freebsd.org> From: Xin LI Date: Fri, 9 May 2014 08:22:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r265759 - stable/8/lib/libmagic X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 08:22:03 -0000 Author: delphij Date: Fri May 9 08:22:02 2014 New Revision: 265759 URL: http://svnweb.freebsd.org/changeset/base/265759 Log: MFC r265464: Sort .ALLSRC before concatenating files together. This makes sure that the file are always built the same. (Note that Header and Localstuff must appear first and in that order, the sorting does not affect as a coincident effect). Submitted by: sjg Modified: stable/8/lib/libmagic/Makefile Directory Properties: stable/8/lib/libmagic/ (props changed) Modified: stable/8/lib/libmagic/Makefile ============================================================================== --- stable/8/lib/libmagic/Makefile Fri May 9 08:20:47 2014 (r265758) +++ stable/8/lib/libmagic/Makefile Fri May 9 08:22:02 2014 (r265759) @@ -30,7 +30,7 @@ MAGFILES= ${CONTRDIR}/Header\ ${CONTRDIR}/Magdir/[a-z]* magic: ${MAGFILES} - cat ${.ALLSRC} > ${.TARGET} + cat ${.ALLSRC:O} > ${.TARGET} magic.mgc: mkmagic magic ./mkmagic magic From owner-svn-src-stable@FreeBSD.ORG Fri May 9 13:18:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F6A3D0D; Fri, 9 May 2014 13:18:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C3FD32C; Fri, 9 May 2014 13:18:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s49DIP2N056251; Fri, 9 May 2014 13:18:25 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s49DIPbl056250; Fri, 9 May 2014 13:18:25 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201405091318.s49DIPbl056250@svn.freebsd.org> From: Christian Brueffer Date: Fri, 9 May 2014 13:18:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265768 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 13:18:25 -0000 Author: brueffer Date: Fri May 9 13:18:24 2014 New Revision: 265768 URL: http://svnweb.freebsd.org/changeset/base/265768 Log: MFC: r265244 Free resources in an error case. CID: 1018947 Found with: Coverity Prevent(tm) Modified: stable/10/sys/kern/kern_cpu.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_cpu.c ============================================================================== --- stable/10/sys/kern/kern_cpu.c Fri May 9 13:07:39 2014 (r265767) +++ stable/10/sys/kern/kern_cpu.c Fri May 9 13:18:24 2014 (r265768) @@ -1037,6 +1037,7 @@ cpufreq_unregister(device_t dev) if (cf_dev == NULL) { device_printf(dev, "warning: cpufreq_unregister called with no cpufreq device active\n"); + free(devs, M_TEMP); return (0); } cfcount = 0; From owner-svn-src-stable@FreeBSD.ORG Fri May 9 13:21:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5648F3E; Fri, 9 May 2014 13:21:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C236C3C7; Fri, 9 May 2014 13:21:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s49DLEt8058886; Fri, 9 May 2014 13:21:14 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s49DLENX058885; Fri, 9 May 2014 13:21:14 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201405091321.s49DLENX058885@svn.freebsd.org> From: Christian Brueffer Date: Fri, 9 May 2014 13:21:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265769 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 13:21:14 -0000 Author: brueffer Date: Fri May 9 13:21:14 2014 New Revision: 265769 URL: http://svnweb.freebsd.org/changeset/base/265769 Log: MFC: r265244 Free resources in an error case. CID: 1018947 Found with: Coverity Prevent(tm) Modified: stable/9/sys/kern/kern_cpu.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_cpu.c ============================================================================== --- stable/9/sys/kern/kern_cpu.c Fri May 9 13:18:24 2014 (r265768) +++ stable/9/sys/kern/kern_cpu.c Fri May 9 13:21:14 2014 (r265769) @@ -1037,6 +1037,7 @@ cpufreq_unregister(device_t dev) if (cf_dev == NULL) { device_printf(dev, "warning: cpufreq_unregister called with no cpufreq device active\n"); + free(devs, M_TEMP); return (0); } cfcount = 0; From owner-svn-src-stable@FreeBSD.ORG Fri May 9 15:55:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D7C02E7; Fri, 9 May 2014 15:55:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A1CE358; Fri, 9 May 2014 15:55:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s49FtjxC027560; Fri, 9 May 2014 15:55:45 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s49FtjPI027558; Fri, 9 May 2014 15:55:45 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201405091555.s49FtjPI027558@svn.freebsd.org> From: Jaakko Heinonen Date: Fri, 9 May 2014 15:55:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265781 - stable/10/usr.sbin/daemon X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 15:55:45 -0000 Author: jh Date: Fri May 9 15:55:45 2014 New Revision: 265781 URL: http://svnweb.freebsd.org/changeset/base/265781 Log: MFC r264194: Fork a child process and wait until the process terminates when the -P option is specified. This behavior is documented on the manual page. PR: bin/187265 Modified: stable/10/usr.sbin/daemon/daemon.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/daemon/daemon.c ============================================================================== --- stable/10/usr.sbin/daemon/daemon.c Fri May 9 14:35:07 2014 (r265780) +++ stable/10/usr.sbin/daemon/daemon.c Fri May 9 15:55:45 2014 (r265781) @@ -139,7 +139,7 @@ main(int argc, char *argv[]) * get SIGCHLD eventually. */ pid = -1; - if (pidfile != NULL || restart) { + if (pidfile != NULL || ppidfile != NULL || restart) { /* * Restore default action for SIGTERM in case the * parent process decided to ignore it. From owner-svn-src-stable@FreeBSD.ORG Sat May 10 02:06:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3CCB6FB; Sat, 10 May 2014 02:06:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A467B308; Sat, 10 May 2014 02:06:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4A26p02012581; Sat, 10 May 2014 02:06:51 GMT (envelope-from davidcs@svn.freebsd.org) Received: (from davidcs@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4A26k9x012548; Sat, 10 May 2014 02:06:46 GMT (envelope-from davidcs@svn.freebsd.org) Message-Id: <201405100206.s4A26k9x012548@svn.freebsd.org> From: David C Somayajulu Date: Sat, 10 May 2014 02:06:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r265794 - in stable/7/sys: dev/bxe modules/bxe X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 May 2014 02:06:51 -0000 Author: davidcs Date: Sat May 10 02:06:46 2014 New Revision: 265794 URL: http://svnweb.freebsd.org/changeset/base/265794 Log: MFC r265411 Modify Copyright information to reflect Qlogic Corporation's purchase of Broadcom's NetXtreme business Submitted by:David C Somayajulu (davidcs@freebsd.org) QLogic Corporation Modified: stable/7/sys/dev/bxe/57710_init_values.c stable/7/sys/dev/bxe/57710_int_offsets.h stable/7/sys/dev/bxe/57711_init_values.c stable/7/sys/dev/bxe/57711_int_offsets.h stable/7/sys/dev/bxe/57712_init_values.c stable/7/sys/dev/bxe/57712_int_offsets.h stable/7/sys/dev/bxe/bxe.c stable/7/sys/dev/bxe/bxe.h stable/7/sys/dev/bxe/bxe_dcb.h stable/7/sys/dev/bxe/bxe_debug.c stable/7/sys/dev/bxe/bxe_elink.c stable/7/sys/dev/bxe/bxe_elink.h stable/7/sys/dev/bxe/bxe_stats.c stable/7/sys/dev/bxe/bxe_stats.h stable/7/sys/dev/bxe/ecore_fw_defs.h stable/7/sys/dev/bxe/ecore_hsi.h stable/7/sys/dev/bxe/ecore_init.h stable/7/sys/dev/bxe/ecore_init_ops.h stable/7/sys/dev/bxe/ecore_mfw_req.h stable/7/sys/dev/bxe/ecore_reg.h stable/7/sys/dev/bxe/ecore_sp.c stable/7/sys/dev/bxe/ecore_sp.h stable/7/sys/modules/bxe/Makefile Directory Properties: stable/7/ (props changed) stable/7/sys/ (props changed) Modified: stable/7/sys/dev/bxe/57710_init_values.c ============================================================================== --- stable/7/sys/dev/bxe/57710_init_values.c Sat May 10 01:45:39 2014 (r265793) +++ stable/7/sys/dev/bxe/57710_init_values.c Sat May 10 02:06:46 2014 (r265794) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/7/sys/dev/bxe/57710_int_offsets.h ============================================================================== --- stable/7/sys/dev/bxe/57710_int_offsets.h Sat May 10 01:45:39 2014 (r265793) +++ stable/7/sys/dev/bxe/57710_int_offsets.h Sat May 10 02:06:46 2014 (r265794) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/7/sys/dev/bxe/57711_init_values.c ============================================================================== --- stable/7/sys/dev/bxe/57711_init_values.c Sat May 10 01:45:39 2014 (r265793) +++ stable/7/sys/dev/bxe/57711_init_values.c Sat May 10 02:06:46 2014 (r265794) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/7/sys/dev/bxe/57711_int_offsets.h ============================================================================== --- stable/7/sys/dev/bxe/57711_int_offsets.h Sat May 10 01:45:39 2014 (r265793) +++ stable/7/sys/dev/bxe/57711_int_offsets.h Sat May 10 02:06:46 2014 (r265794) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/7/sys/dev/bxe/57712_init_values.c ============================================================================== --- stable/7/sys/dev/bxe/57712_init_values.c Sat May 10 01:45:39 2014 (r265793) +++ stable/7/sys/dev/bxe/57712_init_values.c Sat May 10 02:06:46 2014 (r265794) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/7/sys/dev/bxe/57712_int_offsets.h ============================================================================== --- stable/7/sys/dev/bxe/57712_int_offsets.h Sat May 10 01:45:39 2014 (r265793) +++ stable/7/sys/dev/bxe/57712_int_offsets.h Sat May 10 02:06:46 2014 (r265794) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/7/sys/dev/bxe/bxe.c ============================================================================== --- stable/7/sys/dev/bxe/bxe.c Sat May 10 01:45:39 2014 (r265793) +++ stable/7/sys/dev/bxe/bxe.c Sat May 10 02:06:46 2014 (r265794) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/7/sys/dev/bxe/bxe.h ============================================================================== --- stable/7/sys/dev/bxe/bxe.h Sat May 10 01:45:39 2014 (r265793) +++ stable/7/sys/dev/bxe/bxe.h Sat May 10 02:06:46 2014 (r265794) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/7/sys/dev/bxe/bxe_dcb.h ============================================================================== --- stable/7/sys/dev/bxe/bxe_dcb.h Sat May 10 01:45:39 2014 (r265793) +++ stable/7/sys/dev/bxe/bxe_dcb.h Sat May 10 02:06:46 2014 (r265794) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/7/sys/dev/bxe/bxe_debug.c ============================================================================== --- stable/7/sys/dev/bxe/bxe_debug.c Sat May 10 01:45:39 2014 (r265793) +++ stable/7/sys/dev/bxe/bxe_debug.c Sat May 10 02:06:46 2014 (r265794) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/7/sys/dev/bxe/bxe_elink.c ============================================================================== --- stable/7/sys/dev/bxe/bxe_elink.c Sat May 10 01:45:39 2014 (r265793) +++ stable/7/sys/dev/bxe/bxe_elink.c Sat May 10 02:06:46 2014 (r265794) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/7/sys/dev/bxe/bxe_elink.h ============================================================================== --- stable/7/sys/dev/bxe/bxe_elink.h Sat May 10 01:45:39 2014 (r265793) +++ stable/7/sys/dev/bxe/bxe_elink.h Sat May 10 02:06:46 2014 (r265794) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/7/sys/dev/bxe/bxe_stats.c ============================================================================== --- stable/7/sys/dev/bxe/bxe_stats.c Sat May 10 01:45:39 2014 (r265793) +++ stable/7/sys/dev/bxe/bxe_stats.c Sat May 10 02:06:46 2014 (r265794) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/7/sys/dev/bxe/bxe_stats.h ============================================================================== --- stable/7/sys/dev/bxe/bxe_stats.h Sat May 10 01:45:39 2014 (r265793) +++ stable/7/sys/dev/bxe/bxe_stats.h Sat May 10 02:06:46 2014 (r265794) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/7/sys/dev/bxe/ecore_fw_defs.h ============================================================================== --- stable/7/sys/dev/bxe/ecore_fw_defs.h Sat May 10 01:45:39 2014 (r265793) +++ stable/7/sys/dev/bxe/ecore_fw_defs.h Sat May 10 02:06:46 2014 (r265794) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/7/sys/dev/bxe/ecore_hsi.h ============================================================================== --- stable/7/sys/dev/bxe/ecore_hsi.h Sat May 10 01:45:39 2014 (r265793) +++ stable/7/sys/dev/bxe/ecore_hsi.h Sat May 10 02:06:46 2014 (r265794) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/7/sys/dev/bxe/ecore_init.h ============================================================================== --- stable/7/sys/dev/bxe/ecore_init.h Sat May 10 01:45:39 2014 (r265793) +++ stable/7/sys/dev/bxe/ecore_init.h Sat May 10 02:06:46 2014 (r265794) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/7/sys/dev/bxe/ecore_init_ops.h ============================================================================== --- stable/7/sys/dev/bxe/ecore_init_ops.h Sat May 10 01:45:39 2014 (r265793) +++ stable/7/sys/dev/bxe/ecore_init_ops.h Sat May 10 02:06:46 2014 (r265794) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/7/sys/dev/bxe/ecore_mfw_req.h ============================================================================== --- stable/7/sys/dev/bxe/ecore_mfw_req.h Sat May 10 01:45:39 2014 (r265793) +++ stable/7/sys/dev/bxe/ecore_mfw_req.h Sat May 10 02:06:46 2014 (r265794) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/7/sys/dev/bxe/ecore_reg.h ============================================================================== --- stable/7/sys/dev/bxe/ecore_reg.h Sat May 10 01:45:39 2014 (r265793) +++ stable/7/sys/dev/bxe/ecore_reg.h Sat May 10 02:06:46 2014 (r265794) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/7/sys/dev/bxe/ecore_sp.c ============================================================================== --- stable/7/sys/dev/bxe/ecore_sp.c Sat May 10 01:45:39 2014 (r265793) +++ stable/7/sys/dev/bxe/ecore_sp.c Sat May 10 02:06:46 2014 (r265794) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/7/sys/dev/bxe/ecore_sp.h ============================================================================== --- stable/7/sys/dev/bxe/ecore_sp.h Sat May 10 01:45:39 2014 (r265793) +++ stable/7/sys/dev/bxe/ecore_sp.h Sat May 10 02:06:46 2014 (r265794) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/7/sys/modules/bxe/Makefile ============================================================================== --- stable/7/sys/modules/bxe/Makefile Sat May 10 01:45:39 2014 (r265793) +++ stable/7/sys/modules/bxe/Makefile Sat May 10 02:06:46 2014 (r265794) @@ -15,4 +15,9 @@ SRCS += bxe.c \ CFLAGS += -I${BXE} +clean: + rm -f opt_bdg.h device_if.h bus_if.h pci_if.h export_syms + rm -f *.o *.kld *.ko + rm -f @ machine x86 + .include From owner-svn-src-stable@FreeBSD.ORG Sat May 10 02:08:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8056B839; Sat, 10 May 2014 02:08:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6298531E; Sat, 10 May 2014 02:08:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4A289UK012860; Sat, 10 May 2014 02:08:09 GMT (envelope-from davidcs@svn.freebsd.org) Received: (from davidcs@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4A284sr012824; Sat, 10 May 2014 02:08:04 GMT (envelope-from davidcs@svn.freebsd.org) Message-Id: <201405100208.s4A284sr012824@svn.freebsd.org> From: David C Somayajulu Date: Sat, 10 May 2014 02:08:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r265795 - in stable/8/sys: dev/bxe modules/bxe X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 May 2014 02:08:09 -0000 Author: davidcs Date: Sat May 10 02:08:04 2014 New Revision: 265795 URL: http://svnweb.freebsd.org/changeset/base/265795 Log: MFC r265411 Modify Copyright information to reflect Qlogic Corporation's purchase of Broadcom's NetXtreme business Submitted by:David C Somayajulu (davidcs@freebsd.org) QLogic Corporation Modified: stable/8/sys/dev/bxe/57710_init_values.c stable/8/sys/dev/bxe/57710_int_offsets.h stable/8/sys/dev/bxe/57711_init_values.c stable/8/sys/dev/bxe/57711_int_offsets.h stable/8/sys/dev/bxe/57712_init_values.c stable/8/sys/dev/bxe/57712_int_offsets.h stable/8/sys/dev/bxe/bxe.c stable/8/sys/dev/bxe/bxe.h stable/8/sys/dev/bxe/bxe_dcb.h stable/8/sys/dev/bxe/bxe_debug.c stable/8/sys/dev/bxe/bxe_elink.c stable/8/sys/dev/bxe/bxe_elink.h stable/8/sys/dev/bxe/bxe_stats.c stable/8/sys/dev/bxe/bxe_stats.h stable/8/sys/dev/bxe/ecore_fw_defs.h stable/8/sys/dev/bxe/ecore_hsi.h stable/8/sys/dev/bxe/ecore_init.h stable/8/sys/dev/bxe/ecore_init_ops.h stable/8/sys/dev/bxe/ecore_mfw_req.h stable/8/sys/dev/bxe/ecore_reg.h stable/8/sys/dev/bxe/ecore_sp.c stable/8/sys/dev/bxe/ecore_sp.h stable/8/sys/modules/bxe/Makefile Directory Properties: stable/8/ (props changed) stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/modules/ (props changed) Modified: stable/8/sys/dev/bxe/57710_init_values.c ============================================================================== --- stable/8/sys/dev/bxe/57710_init_values.c Sat May 10 02:06:46 2014 (r265794) +++ stable/8/sys/dev/bxe/57710_init_values.c Sat May 10 02:08:04 2014 (r265795) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/8/sys/dev/bxe/57710_int_offsets.h ============================================================================== --- stable/8/sys/dev/bxe/57710_int_offsets.h Sat May 10 02:06:46 2014 (r265794) +++ stable/8/sys/dev/bxe/57710_int_offsets.h Sat May 10 02:08:04 2014 (r265795) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/8/sys/dev/bxe/57711_init_values.c ============================================================================== --- stable/8/sys/dev/bxe/57711_init_values.c Sat May 10 02:06:46 2014 (r265794) +++ stable/8/sys/dev/bxe/57711_init_values.c Sat May 10 02:08:04 2014 (r265795) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/8/sys/dev/bxe/57711_int_offsets.h ============================================================================== --- stable/8/sys/dev/bxe/57711_int_offsets.h Sat May 10 02:06:46 2014 (r265794) +++ stable/8/sys/dev/bxe/57711_int_offsets.h Sat May 10 02:08:04 2014 (r265795) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/8/sys/dev/bxe/57712_init_values.c ============================================================================== --- stable/8/sys/dev/bxe/57712_init_values.c Sat May 10 02:06:46 2014 (r265794) +++ stable/8/sys/dev/bxe/57712_init_values.c Sat May 10 02:08:04 2014 (r265795) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/8/sys/dev/bxe/57712_int_offsets.h ============================================================================== --- stable/8/sys/dev/bxe/57712_int_offsets.h Sat May 10 02:06:46 2014 (r265794) +++ stable/8/sys/dev/bxe/57712_int_offsets.h Sat May 10 02:08:04 2014 (r265795) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/8/sys/dev/bxe/bxe.c ============================================================================== --- stable/8/sys/dev/bxe/bxe.c Sat May 10 02:06:46 2014 (r265794) +++ stable/8/sys/dev/bxe/bxe.c Sat May 10 02:08:04 2014 (r265795) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/8/sys/dev/bxe/bxe.h ============================================================================== --- stable/8/sys/dev/bxe/bxe.h Sat May 10 02:06:46 2014 (r265794) +++ stable/8/sys/dev/bxe/bxe.h Sat May 10 02:08:04 2014 (r265795) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/8/sys/dev/bxe/bxe_dcb.h ============================================================================== --- stable/8/sys/dev/bxe/bxe_dcb.h Sat May 10 02:06:46 2014 (r265794) +++ stable/8/sys/dev/bxe/bxe_dcb.h Sat May 10 02:08:04 2014 (r265795) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/8/sys/dev/bxe/bxe_debug.c ============================================================================== --- stable/8/sys/dev/bxe/bxe_debug.c Sat May 10 02:06:46 2014 (r265794) +++ stable/8/sys/dev/bxe/bxe_debug.c Sat May 10 02:08:04 2014 (r265795) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/8/sys/dev/bxe/bxe_elink.c ============================================================================== --- stable/8/sys/dev/bxe/bxe_elink.c Sat May 10 02:06:46 2014 (r265794) +++ stable/8/sys/dev/bxe/bxe_elink.c Sat May 10 02:08:04 2014 (r265795) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/8/sys/dev/bxe/bxe_elink.h ============================================================================== --- stable/8/sys/dev/bxe/bxe_elink.h Sat May 10 02:06:46 2014 (r265794) +++ stable/8/sys/dev/bxe/bxe_elink.h Sat May 10 02:08:04 2014 (r265795) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/8/sys/dev/bxe/bxe_stats.c ============================================================================== --- stable/8/sys/dev/bxe/bxe_stats.c Sat May 10 02:06:46 2014 (r265794) +++ stable/8/sys/dev/bxe/bxe_stats.c Sat May 10 02:08:04 2014 (r265795) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/8/sys/dev/bxe/bxe_stats.h ============================================================================== --- stable/8/sys/dev/bxe/bxe_stats.h Sat May 10 02:06:46 2014 (r265794) +++ stable/8/sys/dev/bxe/bxe_stats.h Sat May 10 02:08:04 2014 (r265795) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/8/sys/dev/bxe/ecore_fw_defs.h ============================================================================== --- stable/8/sys/dev/bxe/ecore_fw_defs.h Sat May 10 02:06:46 2014 (r265794) +++ stable/8/sys/dev/bxe/ecore_fw_defs.h Sat May 10 02:08:04 2014 (r265795) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/8/sys/dev/bxe/ecore_hsi.h ============================================================================== --- stable/8/sys/dev/bxe/ecore_hsi.h Sat May 10 02:06:46 2014 (r265794) +++ stable/8/sys/dev/bxe/ecore_hsi.h Sat May 10 02:08:04 2014 (r265795) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/8/sys/dev/bxe/ecore_init.h ============================================================================== --- stable/8/sys/dev/bxe/ecore_init.h Sat May 10 02:06:46 2014 (r265794) +++ stable/8/sys/dev/bxe/ecore_init.h Sat May 10 02:08:04 2014 (r265795) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/8/sys/dev/bxe/ecore_init_ops.h ============================================================================== --- stable/8/sys/dev/bxe/ecore_init_ops.h Sat May 10 02:06:46 2014 (r265794) +++ stable/8/sys/dev/bxe/ecore_init_ops.h Sat May 10 02:08:04 2014 (r265795) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/8/sys/dev/bxe/ecore_mfw_req.h ============================================================================== --- stable/8/sys/dev/bxe/ecore_mfw_req.h Sat May 10 02:06:46 2014 (r265794) +++ stable/8/sys/dev/bxe/ecore_mfw_req.h Sat May 10 02:08:04 2014 (r265795) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/8/sys/dev/bxe/ecore_reg.h ============================================================================== --- stable/8/sys/dev/bxe/ecore_reg.h Sat May 10 02:06:46 2014 (r265794) +++ stable/8/sys/dev/bxe/ecore_reg.h Sat May 10 02:08:04 2014 (r265795) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/8/sys/dev/bxe/ecore_sp.c ============================================================================== --- stable/8/sys/dev/bxe/ecore_sp.c Sat May 10 02:06:46 2014 (r265794) +++ stable/8/sys/dev/bxe/ecore_sp.c Sat May 10 02:08:04 2014 (r265795) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/8/sys/dev/bxe/ecore_sp.h ============================================================================== --- stable/8/sys/dev/bxe/ecore_sp.h Sat May 10 02:06:46 2014 (r265794) +++ stable/8/sys/dev/bxe/ecore_sp.h Sat May 10 02:08:04 2014 (r265795) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/8/sys/modules/bxe/Makefile ============================================================================== --- stable/8/sys/modules/bxe/Makefile Sat May 10 02:06:46 2014 (r265794) +++ stable/8/sys/modules/bxe/Makefile Sat May 10 02:08:04 2014 (r265795) @@ -15,4 +15,9 @@ SRCS += bxe.c \ CFLAGS += -I${BXE} +clean: + rm -f opt_bdg.h device_if.h bus_if.h pci_if.h export_syms + rm -f *.o *.kld *.ko + rm -f @ machine x86 + .include From owner-svn-src-stable@FreeBSD.ORG Sat May 10 02:09:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 14D30986; Sat, 10 May 2014 02:09:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9F7A32A; Sat, 10 May 2014 02:09:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4A29E05013097; Sat, 10 May 2014 02:09:14 GMT (envelope-from davidcs@svn.freebsd.org) Received: (from davidcs@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4A29AsS013059; Sat, 10 May 2014 02:09:10 GMT (envelope-from davidcs@svn.freebsd.org) Message-Id: <201405100209.s4A29AsS013059@svn.freebsd.org> From: David C Somayajulu Date: Sat, 10 May 2014 02:09:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265796 - in stable/9/sys: dev/bxe modules/bxe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 May 2014 02:09:15 -0000 Author: davidcs Date: Sat May 10 02:09:09 2014 New Revision: 265796 URL: http://svnweb.freebsd.org/changeset/base/265796 Log: MFC r265411 Modify Copyright information to reflect Qlogic Corporation's purchase of Broadcom's NetXtreme business Submitted by:David C Somayajulu (davidcs@freebsd.org) QLogic Corporation Modified: stable/9/sys/dev/bxe/57710_init_values.c stable/9/sys/dev/bxe/57710_int_offsets.h stable/9/sys/dev/bxe/57711_init_values.c stable/9/sys/dev/bxe/57711_int_offsets.h stable/9/sys/dev/bxe/57712_init_values.c stable/9/sys/dev/bxe/57712_int_offsets.h stable/9/sys/dev/bxe/bxe.c stable/9/sys/dev/bxe/bxe.h stable/9/sys/dev/bxe/bxe_dcb.h stable/9/sys/dev/bxe/bxe_debug.c stable/9/sys/dev/bxe/bxe_elink.c stable/9/sys/dev/bxe/bxe_elink.h stable/9/sys/dev/bxe/bxe_stats.c stable/9/sys/dev/bxe/bxe_stats.h stable/9/sys/dev/bxe/ecore_fw_defs.h stable/9/sys/dev/bxe/ecore_hsi.h stable/9/sys/dev/bxe/ecore_init.h stable/9/sys/dev/bxe/ecore_init_ops.h stable/9/sys/dev/bxe/ecore_mfw_req.h stable/9/sys/dev/bxe/ecore_reg.h stable/9/sys/dev/bxe/ecore_sp.c stable/9/sys/dev/bxe/ecore_sp.h stable/9/sys/modules/bxe/Makefile Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/dev/bxe/57710_init_values.c ============================================================================== --- stable/9/sys/dev/bxe/57710_init_values.c Sat May 10 02:08:04 2014 (r265795) +++ stable/9/sys/dev/bxe/57710_init_values.c Sat May 10 02:09:09 2014 (r265796) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/9/sys/dev/bxe/57710_int_offsets.h ============================================================================== --- stable/9/sys/dev/bxe/57710_int_offsets.h Sat May 10 02:08:04 2014 (r265795) +++ stable/9/sys/dev/bxe/57710_int_offsets.h Sat May 10 02:09:09 2014 (r265796) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/9/sys/dev/bxe/57711_init_values.c ============================================================================== --- stable/9/sys/dev/bxe/57711_init_values.c Sat May 10 02:08:04 2014 (r265795) +++ stable/9/sys/dev/bxe/57711_init_values.c Sat May 10 02:09:09 2014 (r265796) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/9/sys/dev/bxe/57711_int_offsets.h ============================================================================== --- stable/9/sys/dev/bxe/57711_int_offsets.h Sat May 10 02:08:04 2014 (r265795) +++ stable/9/sys/dev/bxe/57711_int_offsets.h Sat May 10 02:09:09 2014 (r265796) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/9/sys/dev/bxe/57712_init_values.c ============================================================================== --- stable/9/sys/dev/bxe/57712_init_values.c Sat May 10 02:08:04 2014 (r265795) +++ stable/9/sys/dev/bxe/57712_init_values.c Sat May 10 02:09:09 2014 (r265796) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/9/sys/dev/bxe/57712_int_offsets.h ============================================================================== --- stable/9/sys/dev/bxe/57712_int_offsets.h Sat May 10 02:08:04 2014 (r265795) +++ stable/9/sys/dev/bxe/57712_int_offsets.h Sat May 10 02:09:09 2014 (r265796) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/9/sys/dev/bxe/bxe.c ============================================================================== --- stable/9/sys/dev/bxe/bxe.c Sat May 10 02:08:04 2014 (r265795) +++ stable/9/sys/dev/bxe/bxe.c Sat May 10 02:09:09 2014 (r265796) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/9/sys/dev/bxe/bxe.h ============================================================================== --- stable/9/sys/dev/bxe/bxe.h Sat May 10 02:08:04 2014 (r265795) +++ stable/9/sys/dev/bxe/bxe.h Sat May 10 02:09:09 2014 (r265796) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/9/sys/dev/bxe/bxe_dcb.h ============================================================================== --- stable/9/sys/dev/bxe/bxe_dcb.h Sat May 10 02:08:04 2014 (r265795) +++ stable/9/sys/dev/bxe/bxe_dcb.h Sat May 10 02:09:09 2014 (r265796) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/9/sys/dev/bxe/bxe_debug.c ============================================================================== --- stable/9/sys/dev/bxe/bxe_debug.c Sat May 10 02:08:04 2014 (r265795) +++ stable/9/sys/dev/bxe/bxe_debug.c Sat May 10 02:09:09 2014 (r265796) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/9/sys/dev/bxe/bxe_elink.c ============================================================================== --- stable/9/sys/dev/bxe/bxe_elink.c Sat May 10 02:08:04 2014 (r265795) +++ stable/9/sys/dev/bxe/bxe_elink.c Sat May 10 02:09:09 2014 (r265796) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/9/sys/dev/bxe/bxe_elink.h ============================================================================== --- stable/9/sys/dev/bxe/bxe_elink.h Sat May 10 02:08:04 2014 (r265795) +++ stable/9/sys/dev/bxe/bxe_elink.h Sat May 10 02:09:09 2014 (r265796) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/9/sys/dev/bxe/bxe_stats.c ============================================================================== --- stable/9/sys/dev/bxe/bxe_stats.c Sat May 10 02:08:04 2014 (r265795) +++ stable/9/sys/dev/bxe/bxe_stats.c Sat May 10 02:09:09 2014 (r265796) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/9/sys/dev/bxe/bxe_stats.h ============================================================================== --- stable/9/sys/dev/bxe/bxe_stats.h Sat May 10 02:08:04 2014 (r265795) +++ stable/9/sys/dev/bxe/bxe_stats.h Sat May 10 02:09:09 2014 (r265796) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/9/sys/dev/bxe/ecore_fw_defs.h ============================================================================== --- stable/9/sys/dev/bxe/ecore_fw_defs.h Sat May 10 02:08:04 2014 (r265795) +++ stable/9/sys/dev/bxe/ecore_fw_defs.h Sat May 10 02:09:09 2014 (r265796) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/9/sys/dev/bxe/ecore_hsi.h ============================================================================== --- stable/9/sys/dev/bxe/ecore_hsi.h Sat May 10 02:08:04 2014 (r265795) +++ stable/9/sys/dev/bxe/ecore_hsi.h Sat May 10 02:09:09 2014 (r265796) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/9/sys/dev/bxe/ecore_init.h ============================================================================== --- stable/9/sys/dev/bxe/ecore_init.h Sat May 10 02:08:04 2014 (r265795) +++ stable/9/sys/dev/bxe/ecore_init.h Sat May 10 02:09:09 2014 (r265796) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/9/sys/dev/bxe/ecore_init_ops.h ============================================================================== --- stable/9/sys/dev/bxe/ecore_init_ops.h Sat May 10 02:08:04 2014 (r265795) +++ stable/9/sys/dev/bxe/ecore_init_ops.h Sat May 10 02:09:09 2014 (r265796) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/9/sys/dev/bxe/ecore_mfw_req.h ============================================================================== --- stable/9/sys/dev/bxe/ecore_mfw_req.h Sat May 10 02:08:04 2014 (r265795) +++ stable/9/sys/dev/bxe/ecore_mfw_req.h Sat May 10 02:09:09 2014 (r265796) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/9/sys/dev/bxe/ecore_reg.h ============================================================================== --- stable/9/sys/dev/bxe/ecore_reg.h Sat May 10 02:08:04 2014 (r265795) +++ stable/9/sys/dev/bxe/ecore_reg.h Sat May 10 02:09:09 2014 (r265796) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/9/sys/dev/bxe/ecore_sp.c ============================================================================== --- stable/9/sys/dev/bxe/ecore_sp.c Sat May 10 02:08:04 2014 (r265795) +++ stable/9/sys/dev/bxe/ecore_sp.c Sat May 10 02:09:09 2014 (r265796) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/9/sys/dev/bxe/ecore_sp.h ============================================================================== --- stable/9/sys/dev/bxe/ecore_sp.h Sat May 10 02:08:04 2014 (r265795) +++ stable/9/sys/dev/bxe/ecore_sp.h Sat May 10 02:09:09 2014 (r265796) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/9/sys/modules/bxe/Makefile ============================================================================== --- stable/9/sys/modules/bxe/Makefile Sat May 10 02:08:04 2014 (r265795) +++ stable/9/sys/modules/bxe/Makefile Sat May 10 02:09:09 2014 (r265796) @@ -15,4 +15,9 @@ SRCS += bxe.c \ CFLAGS += -I${BXE} +clean: + rm -f opt_bdg.h device_if.h bus_if.h pci_if.h export_syms + rm -f *.o *.kld *.ko + rm -f @ machine x86 + .include From owner-svn-src-stable@FreeBSD.ORG Sat May 10 02:10:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 85544AB6; Sat, 10 May 2014 02:10:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6688032E; Sat, 10 May 2014 02:10:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4A2Abkg013993; Sat, 10 May 2014 02:10:37 GMT (envelope-from davidcs@svn.freebsd.org) Received: (from davidcs@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4A2AWb1013963; Sat, 10 May 2014 02:10:32 GMT (envelope-from davidcs@svn.freebsd.org) Message-Id: <201405100210.s4A2AWb1013963@svn.freebsd.org> From: David C Somayajulu Date: Sat, 10 May 2014 02:10:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265797 - in stable/10/sys: dev/bxe modules/bxe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 May 2014 02:10:37 -0000 Author: davidcs Date: Sat May 10 02:10:32 2014 New Revision: 265797 URL: http://svnweb.freebsd.org/changeset/base/265797 Log: MFC r265411 Modify Copyright information to reflect Qlogic Corporation's purchase of Broadcom's NetXtreme business Submitted by:David C Somayajulu (davidcs@freebsd.org) QLogic Corporation Modified: stable/10/sys/dev/bxe/57710_init_values.c stable/10/sys/dev/bxe/57710_int_offsets.h stable/10/sys/dev/bxe/57711_init_values.c stable/10/sys/dev/bxe/57711_int_offsets.h stable/10/sys/dev/bxe/57712_init_values.c stable/10/sys/dev/bxe/57712_int_offsets.h stable/10/sys/dev/bxe/bxe.c stable/10/sys/dev/bxe/bxe.h stable/10/sys/dev/bxe/bxe_dcb.h stable/10/sys/dev/bxe/bxe_debug.c stable/10/sys/dev/bxe/bxe_elink.c stable/10/sys/dev/bxe/bxe_elink.h stable/10/sys/dev/bxe/bxe_stats.c stable/10/sys/dev/bxe/bxe_stats.h stable/10/sys/dev/bxe/ecore_fw_defs.h stable/10/sys/dev/bxe/ecore_hsi.h stable/10/sys/dev/bxe/ecore_init.h stable/10/sys/dev/bxe/ecore_init_ops.h stable/10/sys/dev/bxe/ecore_mfw_req.h stable/10/sys/dev/bxe/ecore_reg.h stable/10/sys/dev/bxe/ecore_sp.c stable/10/sys/dev/bxe/ecore_sp.h stable/10/sys/modules/bxe/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/bxe/57710_init_values.c ============================================================================== --- stable/10/sys/dev/bxe/57710_init_values.c Sat May 10 02:09:09 2014 (r265796) +++ stable/10/sys/dev/bxe/57710_init_values.c Sat May 10 02:10:32 2014 (r265797) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/10/sys/dev/bxe/57710_int_offsets.h ============================================================================== --- stable/10/sys/dev/bxe/57710_int_offsets.h Sat May 10 02:09:09 2014 (r265796) +++ stable/10/sys/dev/bxe/57710_int_offsets.h Sat May 10 02:10:32 2014 (r265797) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/10/sys/dev/bxe/57711_init_values.c ============================================================================== --- stable/10/sys/dev/bxe/57711_init_values.c Sat May 10 02:09:09 2014 (r265796) +++ stable/10/sys/dev/bxe/57711_init_values.c Sat May 10 02:10:32 2014 (r265797) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/10/sys/dev/bxe/57711_int_offsets.h ============================================================================== --- stable/10/sys/dev/bxe/57711_int_offsets.h Sat May 10 02:09:09 2014 (r265796) +++ stable/10/sys/dev/bxe/57711_int_offsets.h Sat May 10 02:10:32 2014 (r265797) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/10/sys/dev/bxe/57712_init_values.c ============================================================================== --- stable/10/sys/dev/bxe/57712_init_values.c Sat May 10 02:09:09 2014 (r265796) +++ stable/10/sys/dev/bxe/57712_init_values.c Sat May 10 02:10:32 2014 (r265797) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/10/sys/dev/bxe/57712_int_offsets.h ============================================================================== --- stable/10/sys/dev/bxe/57712_int_offsets.h Sat May 10 02:09:09 2014 (r265796) +++ stable/10/sys/dev/bxe/57712_int_offsets.h Sat May 10 02:10:32 2014 (r265797) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/10/sys/dev/bxe/bxe.c ============================================================================== --- stable/10/sys/dev/bxe/bxe.c Sat May 10 02:09:09 2014 (r265796) +++ stable/10/sys/dev/bxe/bxe.c Sat May 10 02:10:32 2014 (r265797) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/10/sys/dev/bxe/bxe.h ============================================================================== --- stable/10/sys/dev/bxe/bxe.h Sat May 10 02:09:09 2014 (r265796) +++ stable/10/sys/dev/bxe/bxe.h Sat May 10 02:10:32 2014 (r265797) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/10/sys/dev/bxe/bxe_dcb.h ============================================================================== --- stable/10/sys/dev/bxe/bxe_dcb.h Sat May 10 02:09:09 2014 (r265796) +++ stable/10/sys/dev/bxe/bxe_dcb.h Sat May 10 02:10:32 2014 (r265797) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/10/sys/dev/bxe/bxe_debug.c ============================================================================== --- stable/10/sys/dev/bxe/bxe_debug.c Sat May 10 02:09:09 2014 (r265796) +++ stable/10/sys/dev/bxe/bxe_debug.c Sat May 10 02:10:32 2014 (r265797) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/10/sys/dev/bxe/bxe_elink.c ============================================================================== --- stable/10/sys/dev/bxe/bxe_elink.c Sat May 10 02:09:09 2014 (r265796) +++ stable/10/sys/dev/bxe/bxe_elink.c Sat May 10 02:10:32 2014 (r265797) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/10/sys/dev/bxe/bxe_elink.h ============================================================================== --- stable/10/sys/dev/bxe/bxe_elink.h Sat May 10 02:09:09 2014 (r265796) +++ stable/10/sys/dev/bxe/bxe_elink.h Sat May 10 02:10:32 2014 (r265797) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/10/sys/dev/bxe/bxe_stats.c ============================================================================== --- stable/10/sys/dev/bxe/bxe_stats.c Sat May 10 02:09:09 2014 (r265796) +++ stable/10/sys/dev/bxe/bxe_stats.c Sat May 10 02:10:32 2014 (r265797) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/10/sys/dev/bxe/bxe_stats.h ============================================================================== --- stable/10/sys/dev/bxe/bxe_stats.h Sat May 10 02:09:09 2014 (r265796) +++ stable/10/sys/dev/bxe/bxe_stats.h Sat May 10 02:10:32 2014 (r265797) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/10/sys/dev/bxe/ecore_fw_defs.h ============================================================================== --- stable/10/sys/dev/bxe/ecore_fw_defs.h Sat May 10 02:09:09 2014 (r265796) +++ stable/10/sys/dev/bxe/ecore_fw_defs.h Sat May 10 02:10:32 2014 (r265797) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/10/sys/dev/bxe/ecore_hsi.h ============================================================================== --- stable/10/sys/dev/bxe/ecore_hsi.h Sat May 10 02:09:09 2014 (r265796) +++ stable/10/sys/dev/bxe/ecore_hsi.h Sat May 10 02:10:32 2014 (r265797) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/10/sys/dev/bxe/ecore_init.h ============================================================================== --- stable/10/sys/dev/bxe/ecore_init.h Sat May 10 02:09:09 2014 (r265796) +++ stable/10/sys/dev/bxe/ecore_init.h Sat May 10 02:10:32 2014 (r265797) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/10/sys/dev/bxe/ecore_init_ops.h ============================================================================== --- stable/10/sys/dev/bxe/ecore_init_ops.h Sat May 10 02:09:09 2014 (r265796) +++ stable/10/sys/dev/bxe/ecore_init_ops.h Sat May 10 02:10:32 2014 (r265797) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/10/sys/dev/bxe/ecore_mfw_req.h ============================================================================== --- stable/10/sys/dev/bxe/ecore_mfw_req.h Sat May 10 02:09:09 2014 (r265796) +++ stable/10/sys/dev/bxe/ecore_mfw_req.h Sat May 10 02:10:32 2014 (r265797) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/10/sys/dev/bxe/ecore_reg.h ============================================================================== --- stable/10/sys/dev/bxe/ecore_reg.h Sat May 10 02:09:09 2014 (r265796) +++ stable/10/sys/dev/bxe/ecore_reg.h Sat May 10 02:10:32 2014 (r265797) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/10/sys/dev/bxe/ecore_sp.c ============================================================================== --- stable/10/sys/dev/bxe/ecore_sp.c Sat May 10 02:09:09 2014 (r265796) +++ stable/10/sys/dev/bxe/ecore_sp.c Sat May 10 02:10:32 2014 (r265797) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/10/sys/dev/bxe/ecore_sp.h ============================================================================== --- stable/10/sys/dev/bxe/ecore_sp.h Sat May 10 02:09:09 2014 (r265796) +++ stable/10/sys/dev/bxe/ecore_sp.h Sat May 10 02:10:32 2014 (r265797) @@ -1,9 +1,5 @@ /*- - * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. - * - * Eric Davis - * David Christensen - * Gary Zambrano + * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/10/sys/modules/bxe/Makefile ============================================================================== --- stable/10/sys/modules/bxe/Makefile Sat May 10 02:09:09 2014 (r265796) +++ stable/10/sys/modules/bxe/Makefile Sat May 10 02:10:32 2014 (r265797) @@ -15,4 +15,9 @@ SRCS += bxe.c \ CFLAGS += -I${BXE} +clean: + rm -f opt_bdg.h device_if.h bus_if.h pci_if.h export_syms + rm -f *.o *.kld *.ko + rm -f @ machine x86 + .include From owner-svn-src-stable@FreeBSD.ORG Sat May 10 07:25:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6EE27330; Sat, 10 May 2014 07:25:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 591F2E46; Sat, 10 May 2014 07:25:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4A7PRXa064419; Sat, 10 May 2014 07:25:27 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4A7PRRK064417; Sat, 10 May 2014 07:25:27 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201405100725.s4A7PRRK064417@svn.freebsd.org> From: Rui Paulo Date: Sat, 10 May 2014 07:25:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265804 - in stable/10: contrib/unbound/util sys/boot/fdt/dts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 May 2014 07:25:27 -0000 Author: rpaulo Date: Sat May 10 07:25:26 2014 New Revision: 265804 URL: http://svnweb.freebsd.org/changeset/base/265804 Log: MFC r252440: Enable the second and the third I2C controllers on Beaglebone-black. Modified: stable/10/contrib/unbound/util/configparser.c stable/10/sys/boot/fdt/dts/am335x.dtsi stable/10/sys/boot/fdt/dts/beaglebone-black.dts Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/unbound/util/configparser.c ============================================================================== --- stable/10/contrib/unbound/util/configparser.c Sat May 10 05:56:10 2014 (r265803) +++ stable/10/contrib/unbound/util/configparser.c Sat May 10 07:25:26 2014 (r265804) @@ -1,6 +1,6 @@ -#ifndef lint -static const char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93"; -#endif +/* original parser id follows */ +/* yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93" */ +/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */ #define YYBYACC 1 #define YYMAJOR 1 @@ -15,7 +15,7 @@ static const char yysccsid[] = "@(#)yacc #define YYPURE 0 -#line 39 "util/configparser.y" +#line 39 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" #include "config.h" #include @@ -40,7 +40,7 @@ extern struct config_parser_state* cfg_p #define OUTYY(s) #endif -#line 64 "util/configparser.y" +#line 64 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" #ifdef YYSTYPE #undef YYSTYPE_IS_DECLARED #define YYSTYPE_IS_DECLARED 1 @@ -51,7 +51,7 @@ typedef union { char* str; } YYSTYPE; #endif /* !YYSTYPE_IS_DECLARED */ -#line 54 "util/configparser.c" +#line 54 "y.tab.c" /* compatibility with bison */ #ifdef YYPARSE_PARAM @@ -839,10 +839,10 @@ typedef struct { } YYSTACKDATA; /* variables for the parser stack */ static YYSTACKDATA yystack; -#line 1277 "util/configparser.y" +#line 1277 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" /* parse helper routines could be here */ -#line 845 "util/configparser.c" +#line 845 "y.tab.c" #if YYDEBUG #include /* needed for printf */ @@ -1049,13 +1049,13 @@ yyreduce: switch (yyn) { case 8: -#line 118 "util/configparser.y" +#line 118 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("\nP(server:)\n")); } break; case 109: -#line 167 "util/configparser.y" +#line 167 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { struct config_stub* s; OUTYY(("\nP(stub_zone:)\n")); @@ -1068,7 +1068,7 @@ case 109: } break; case 117: -#line 183 "util/configparser.y" +#line 183 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { struct config_stub* s; OUTYY(("\nP(forward_zone:)\n")); @@ -1081,7 +1081,7 @@ case 117: } break; case 124: -#line 199 "util/configparser.y" +#line 199 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_num_threads:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0 && strcmp(yystack.l_mark[0].str, "0") != 0) @@ -1091,7 +1091,7 @@ case 124: } break; case 125: -#line 208 "util/configparser.y" +#line 208 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_verbosity:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0 && strcmp(yystack.l_mark[0].str, "0") != 0) @@ -1101,7 +1101,7 @@ case 125: } break; case 126: -#line 217 "util/configparser.y" +#line 217 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_statistics_interval:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "") == 0 || strcmp(yystack.l_mark[0].str, "0") == 0) @@ -1113,7 +1113,7 @@ case 126: } break; case 127: -#line 228 "util/configparser.y" +#line 228 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_statistics_cumulative:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1123,7 +1123,7 @@ case 127: } break; case 128: -#line 237 "util/configparser.y" +#line 237 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_extended_statistics:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1133,7 +1133,7 @@ case 128: } break; case 129: -#line 246 "util/configparser.y" +#line 246 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_port:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0) @@ -1143,7 +1143,7 @@ case 129: } break; case 130: -#line 255 "util/configparser.y" +#line 255 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_interface:%s)\n", yystack.l_mark[0].str)); if(cfg_parser->cfg->num_ifs == 0) @@ -1157,7 +1157,7 @@ case 130: } break; case 131: -#line 268 "util/configparser.y" +#line 268 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_outgoing_interface:%s)\n", yystack.l_mark[0].str)); if(cfg_parser->cfg->num_out_ifs == 0) @@ -1173,7 +1173,7 @@ case 131: } break; case 132: -#line 283 "util/configparser.y" +#line 283 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_outgoing_range:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0) @@ -1183,7 +1183,7 @@ case 132: } break; case 133: -#line 292 "util/configparser.y" +#line 292 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_outgoing_port_permit:%s)\n", yystack.l_mark[0].str)); if(!cfg_mark_ports(yystack.l_mark[0].str, 1, @@ -1193,7 +1193,7 @@ case 133: } break; case 134: -#line 301 "util/configparser.y" +#line 301 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_outgoing_port_avoid:%s)\n", yystack.l_mark[0].str)); if(!cfg_mark_ports(yystack.l_mark[0].str, 0, @@ -1203,7 +1203,7 @@ case 134: } break; case 135: -#line 310 "util/configparser.y" +#line 310 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_outgoing_num_tcp:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0 && strcmp(yystack.l_mark[0].str, "0") != 0) @@ -1213,7 +1213,7 @@ case 135: } break; case 136: -#line 319 "util/configparser.y" +#line 319 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_incoming_num_tcp:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0 && strcmp(yystack.l_mark[0].str, "0") != 0) @@ -1223,7 +1223,7 @@ case 136: } break; case 137: -#line 328 "util/configparser.y" +#line 328 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_interface_automatic:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1233,7 +1233,7 @@ case 137: } break; case 138: -#line 337 "util/configparser.y" +#line 337 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_do_ip4:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1243,7 +1243,7 @@ case 138: } break; case 139: -#line 346 "util/configparser.y" +#line 346 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_do_ip6:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1253,7 +1253,7 @@ case 139: } break; case 140: -#line 355 "util/configparser.y" +#line 355 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_do_udp:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1263,7 +1263,7 @@ case 140: } break; case 141: -#line 364 "util/configparser.y" +#line 364 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_do_tcp:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1273,7 +1273,7 @@ case 141: } break; case 142: -#line 373 "util/configparser.y" +#line 373 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_tcp_upstream:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1283,7 +1283,7 @@ case 142: } break; case 143: -#line 382 "util/configparser.y" +#line 382 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_ssl_upstream:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1293,7 +1293,7 @@ case 143: } break; case 144: -#line 391 "util/configparser.y" +#line 391 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_ssl_service_key:%s)\n", yystack.l_mark[0].str)); free(cfg_parser->cfg->ssl_service_key); @@ -1301,7 +1301,7 @@ case 144: } break; case 145: -#line 398 "util/configparser.y" +#line 398 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_ssl_service_pem:%s)\n", yystack.l_mark[0].str)); free(cfg_parser->cfg->ssl_service_pem); @@ -1309,7 +1309,7 @@ case 145: } break; case 146: -#line 405 "util/configparser.y" +#line 405 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_ssl_port:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0) @@ -1319,7 +1319,7 @@ case 146: } break; case 147: -#line 414 "util/configparser.y" +#line 414 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_do_daemonize:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1329,7 +1329,7 @@ case 147: } break; case 148: -#line 423 "util/configparser.y" +#line 423 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_use_syslog:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1344,7 +1344,7 @@ case 148: } break; case 149: -#line 437 "util/configparser.y" +#line 437 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_log_time_ascii:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1354,7 +1354,7 @@ case 149: } break; case 150: -#line 446 "util/configparser.y" +#line 446 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_log_queries:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1364,7 +1364,7 @@ case 150: } break; case 151: -#line 455 "util/configparser.y" +#line 455 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_chroot:%s)\n", yystack.l_mark[0].str)); free(cfg_parser->cfg->chrootdir); @@ -1372,7 +1372,7 @@ case 151: } break; case 152: -#line 462 "util/configparser.y" +#line 462 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_username:%s)\n", yystack.l_mark[0].str)); free(cfg_parser->cfg->username); @@ -1380,7 +1380,7 @@ case 152: } break; case 153: -#line 469 "util/configparser.y" +#line 469 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_directory:%s)\n", yystack.l_mark[0].str)); free(cfg_parser->cfg->directory); @@ -1388,7 +1388,7 @@ case 153: } break; case 154: -#line 476 "util/configparser.y" +#line 476 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_logfile:%s)\n", yystack.l_mark[0].str)); free(cfg_parser->cfg->logfile); @@ -1397,7 +1397,7 @@ case 154: } break; case 155: -#line 484 "util/configparser.y" +#line 484 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_pidfile:%s)\n", yystack.l_mark[0].str)); free(cfg_parser->cfg->pidfile); @@ -1405,7 +1405,7 @@ case 155: } break; case 156: -#line 491 "util/configparser.y" +#line 491 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_root_hints:%s)\n", yystack.l_mark[0].str)); if(!cfg_strlist_insert(&cfg_parser->cfg->root_hints, yystack.l_mark[0].str)) @@ -1413,7 +1413,7 @@ case 156: } break; case 157: -#line 498 "util/configparser.y" +#line 498 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_dlv_anchor_file:%s)\n", yystack.l_mark[0].str)); free(cfg_parser->cfg->dlv_anchor_file); @@ -1421,7 +1421,7 @@ case 157: } break; case 158: -#line 505 "util/configparser.y" +#line 505 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_dlv_anchor:%s)\n", yystack.l_mark[0].str)); if(!cfg_strlist_insert(&cfg_parser->cfg->dlv_anchor_list, yystack.l_mark[0].str)) @@ -1429,7 +1429,7 @@ case 158: } break; case 159: -#line 512 "util/configparser.y" +#line 512 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_auto_trust_anchor_file:%s)\n", yystack.l_mark[0].str)); if(!cfg_strlist_insert(&cfg_parser->cfg-> @@ -1438,7 +1438,7 @@ case 159: } break; case 160: -#line 520 "util/configparser.y" +#line 520 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_trust_anchor_file:%s)\n", yystack.l_mark[0].str)); if(!cfg_strlist_insert(&cfg_parser->cfg-> @@ -1447,7 +1447,7 @@ case 160: } break; case 161: -#line 528 "util/configparser.y" +#line 528 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_trusted_keys_file:%s)\n", yystack.l_mark[0].str)); if(!cfg_strlist_insert(&cfg_parser->cfg-> @@ -1456,7 +1456,7 @@ case 161: } break; case 162: -#line 536 "util/configparser.y" +#line 536 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_trust_anchor:%s)\n", yystack.l_mark[0].str)); if(!cfg_strlist_insert(&cfg_parser->cfg->trust_anchor_list, yystack.l_mark[0].str)) @@ -1464,7 +1464,7 @@ case 162: } break; case 163: -#line 543 "util/configparser.y" +#line 543 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_domain_insecure:%s)\n", yystack.l_mark[0].str)); if(!cfg_strlist_insert(&cfg_parser->cfg->domain_insecure, yystack.l_mark[0].str)) @@ -1472,7 +1472,7 @@ case 163: } break; case 164: -#line 550 "util/configparser.y" +#line 550 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_hide_identity:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1482,7 +1482,7 @@ case 164: } break; case 165: -#line 559 "util/configparser.y" +#line 559 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_hide_version:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1492,7 +1492,7 @@ case 165: } break; case 166: -#line 568 "util/configparser.y" +#line 568 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_identity:%s)\n", yystack.l_mark[0].str)); free(cfg_parser->cfg->identity); @@ -1500,7 +1500,7 @@ case 166: } break; case 167: -#line 575 "util/configparser.y" +#line 575 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_version:%s)\n", yystack.l_mark[0].str)); free(cfg_parser->cfg->version); @@ -1508,7 +1508,7 @@ case 167: } break; case 168: -#line 582 "util/configparser.y" +#line 582 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_so_rcvbuf:%s)\n", yystack.l_mark[0].str)); if(!cfg_parse_memsize(yystack.l_mark[0].str, &cfg_parser->cfg->so_rcvbuf)) @@ -1517,7 +1517,7 @@ case 168: } break; case 169: -#line 590 "util/configparser.y" +#line 590 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_so_sndbuf:%s)\n", yystack.l_mark[0].str)); if(!cfg_parse_memsize(yystack.l_mark[0].str, &cfg_parser->cfg->so_sndbuf)) @@ -1526,7 +1526,7 @@ case 169: } break; case 170: -#line 598 "util/configparser.y" +#line 598 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_edns_buffer_size:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0) @@ -1540,7 +1540,7 @@ case 170: } break; case 171: -#line 611 "util/configparser.y" +#line 611 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_msg_buffer_size:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0) @@ -1552,7 +1552,7 @@ case 171: } break; case 172: -#line 622 "util/configparser.y" +#line 622 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_msg_cache_size:%s)\n", yystack.l_mark[0].str)); if(!cfg_parse_memsize(yystack.l_mark[0].str, &cfg_parser->cfg->msg_cache_size)) @@ -1561,7 +1561,7 @@ case 172: } break; case 173: -#line 630 "util/configparser.y" +#line 630 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_msg_cache_slabs:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0) @@ -1575,7 +1575,7 @@ case 173: } break; case 174: -#line 643 "util/configparser.y" +#line 643 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_num_queries_per_thread:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0) @@ -1585,7 +1585,7 @@ case 174: } break; case 175: -#line 652 "util/configparser.y" +#line 652 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_jostle_timeout:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0 && strcmp(yystack.l_mark[0].str, "0") != 0) @@ -1595,7 +1595,7 @@ case 175: } break; case 176: -#line 661 "util/configparser.y" +#line 661 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_rrset_cache_size:%s)\n", yystack.l_mark[0].str)); if(!cfg_parse_memsize(yystack.l_mark[0].str, &cfg_parser->cfg->rrset_cache_size)) @@ -1604,7 +1604,7 @@ case 176: } break; case 177: -#line 669 "util/configparser.y" +#line 669 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_rrset_cache_slabs:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0) @@ -1618,7 +1618,7 @@ case 177: } break; case 178: -#line 682 "util/configparser.y" +#line 682 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_infra_host_ttl:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0 && strcmp(yystack.l_mark[0].str, "0") != 0) @@ -1628,7 +1628,7 @@ case 178: } break; case 179: -#line 691 "util/configparser.y" +#line 691 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_infra_lame_ttl:%s)\n", yystack.l_mark[0].str)); verbose(VERB_DETAIL, "ignored infra-lame-ttl: %s (option " @@ -1637,7 +1637,7 @@ case 179: } break; case 180: -#line 699 "util/configparser.y" +#line 699 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_infra_cache_numhosts:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0) @@ -1647,7 +1647,7 @@ case 180: } break; case 181: -#line 708 "util/configparser.y" +#line 708 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_infra_cache_lame_size:%s)\n", yystack.l_mark[0].str)); verbose(VERB_DETAIL, "ignored infra-cache-lame-size: %s " @@ -1656,7 +1656,7 @@ case 181: } break; case 182: -#line 716 "util/configparser.y" +#line 716 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_infra_cache_slabs:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0) @@ -1670,7 +1670,7 @@ case 182: } break; case 183: -#line 729 "util/configparser.y" +#line 729 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_target_fetch_policy:%s)\n", yystack.l_mark[0].str)); free(cfg_parser->cfg->target_fetch_policy); @@ -1678,7 +1678,7 @@ case 183: } break; case 184: -#line 736 "util/configparser.y" +#line 736 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_harden_short_bufsize:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1689,7 +1689,7 @@ case 184: } break; case 185: -#line 746 "util/configparser.y" +#line 746 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_harden_large_queries:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1700,7 +1700,7 @@ case 185: } break; case 186: -#line 756 "util/configparser.y" +#line 756 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_harden_glue:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1711,7 +1711,7 @@ case 186: } break; case 187: -#line 766 "util/configparser.y" +#line 766 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_harden_dnssec_stripped:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1722,7 +1722,7 @@ case 187: } break; case 188: -#line 776 "util/configparser.y" +#line 776 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_harden_below_nxdomain:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1733,7 +1733,7 @@ case 188: } break; case 189: -#line 786 "util/configparser.y" +#line 786 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_harden_referral_path:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1744,7 +1744,7 @@ case 189: } break; case 190: -#line 796 "util/configparser.y" +#line 796 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_use_caps_for_id:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1755,7 +1755,7 @@ case 190: } break; case 191: -#line 806 "util/configparser.y" +#line 806 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_private_address:%s)\n", yystack.l_mark[0].str)); if(!cfg_strlist_insert(&cfg_parser->cfg->private_address, yystack.l_mark[0].str)) @@ -1763,7 +1763,7 @@ case 191: } break; case 192: -#line 813 "util/configparser.y" +#line 813 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_private_domain:%s)\n", yystack.l_mark[0].str)); if(!cfg_strlist_insert(&cfg_parser->cfg->private_domain, yystack.l_mark[0].str)) @@ -1771,7 +1771,7 @@ case 192: } break; case 193: -#line 820 "util/configparser.y" +#line 820 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_prefetch:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1781,7 +1781,7 @@ case 193: } break; case 194: -#line 829 "util/configparser.y" +#line 829 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_prefetch_key:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1791,7 +1791,7 @@ case 194: } break; case 195: -#line 838 "util/configparser.y" +#line 838 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_unwanted_reply_threshold:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0 && strcmp(yystack.l_mark[0].str, "0") != 0) @@ -1801,7 +1801,7 @@ case 195: } break; case 196: -#line 847 "util/configparser.y" +#line 847 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_do_not_query_address:%s)\n", yystack.l_mark[0].str)); if(!cfg_strlist_insert(&cfg_parser->cfg->donotqueryaddrs, yystack.l_mark[0].str)) @@ -1809,7 +1809,7 @@ case 196: } break; case 197: -#line 854 "util/configparser.y" +#line 854 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_do_not_query_localhost:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1820,7 +1820,7 @@ case 197: } break; case 198: -#line 864 "util/configparser.y" +#line 864 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_access_control:%s %s)\n", yystack.l_mark[-1].str, yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "deny")!=0 && strcmp(yystack.l_mark[0].str, "refuse")!=0 && @@ -1835,7 +1835,7 @@ case 198: } break; case 199: -#line 878 "util/configparser.y" +#line 878 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_module_conf:%s)\n", yystack.l_mark[0].str)); free(cfg_parser->cfg->module_conf); @@ -1843,7 +1843,7 @@ case 199: } break; case 200: -#line 885 "util/configparser.y" +#line 885 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_val_override_date:%s)\n", yystack.l_mark[0].str)); if(strlen(yystack.l_mark[0].str) == 0 || strcmp(yystack.l_mark[0].str, "0") == 0) { @@ -1862,7 +1862,7 @@ case 200: } break; case 201: -#line 903 "util/configparser.y" +#line 903 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_val_sig_skew_min:%s)\n", yystack.l_mark[0].str)); if(strlen(yystack.l_mark[0].str) == 0 || strcmp(yystack.l_mark[0].str, "0") == 0) { @@ -1876,7 +1876,7 @@ case 201: } break; case 202: -#line 916 "util/configparser.y" +#line 916 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_val_sig_skew_max:%s)\n", yystack.l_mark[0].str)); if(strlen(yystack.l_mark[0].str) == 0 || strcmp(yystack.l_mark[0].str, "0") == 0) { @@ -1890,7 +1890,7 @@ case 202: } break; case 203: -#line 929 "util/configparser.y" +#line 929 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_cache_max_ttl:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0 && strcmp(yystack.l_mark[0].str, "0") != 0) @@ -1900,7 +1900,7 @@ case 203: } break; case 204: -#line 938 "util/configparser.y" +#line 938 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_cache_min_ttl:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0 && strcmp(yystack.l_mark[0].str, "0") != 0) @@ -1910,7 +1910,7 @@ case 204: } break; case 205: -#line 947 "util/configparser.y" +#line 947 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_bogus_ttl:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0 && strcmp(yystack.l_mark[0].str, "0") != 0) @@ -1920,7 +1920,7 @@ case 205: } break; case 206: -#line 956 "util/configparser.y" +#line 956 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_val_clean_additional:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1931,7 +1931,7 @@ case 206: } break; case 207: -#line 966 "util/configparser.y" +#line 966 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_val_permissive_mode:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1942,7 +1942,7 @@ case 207: } break; case 208: -#line 976 "util/configparser.y" +#line 976 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_ignore_cd_flag:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1952,7 +1952,7 @@ case 208: } break; case 209: -#line 985 "util/configparser.y" +#line 985 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_val_log_level:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0 && strcmp(yystack.l_mark[0].str, "0") != 0) @@ -1962,7 +1962,7 @@ case 209: } break; case 210: -#line 994 "util/configparser.y" +#line 994 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_val_nsec3_keysize_iterations:%s)\n", yystack.l_mark[0].str)); free(cfg_parser->cfg->val_nsec3_key_iterations); @@ -1970,7 +1970,7 @@ case 210: } break; case 211: -#line 1001 "util/configparser.y" +#line 1001 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_add_holddown:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0 && strcmp(yystack.l_mark[0].str, "0") != 0) @@ -1980,7 +1980,7 @@ case 211: } break; case 212: -#line 1010 "util/configparser.y" +#line 1010 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_del_holddown:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0 && strcmp(yystack.l_mark[0].str, "0") != 0) @@ -1990,7 +1990,7 @@ case 212: } break; case 213: -#line 1019 "util/configparser.y" +#line 1019 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_keep_missing:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0 && strcmp(yystack.l_mark[0].str, "0") != 0) @@ -2000,7 +2000,7 @@ case 213: } break; case 214: -#line 1028 "util/configparser.y" +#line 1028 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_key_cache_size:%s)\n", yystack.l_mark[0].str)); if(!cfg_parse_memsize(yystack.l_mark[0].str, &cfg_parser->cfg->key_cache_size)) @@ -2009,7 +2009,7 @@ case 214: } break; case 215: -#line 1036 "util/configparser.y" +#line 1036 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_key_cache_slabs:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0) @@ -2023,7 +2023,7 @@ case 215: } break; case 216: -#line 1049 "util/configparser.y" +#line 1049 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_neg_cache_size:%s)\n", yystack.l_mark[0].str)); if(!cfg_parse_memsize(yystack.l_mark[0].str, &cfg_parser->cfg->neg_cache_size)) @@ -2032,7 +2032,7 @@ case 216: } break; case 217: -#line 1057 "util/configparser.y" +#line 1057 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_local_zone:%s %s)\n", yystack.l_mark[-1].str, yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "static")!=0 && strcmp(yystack.l_mark[0].str, "deny")!=0 && @@ -2055,7 +2055,7 @@ case 217: } break; case 218: -#line 1079 "util/configparser.y" +#line 1079 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_local_data:%s)\n", yystack.l_mark[0].str)); if(!cfg_strlist_insert(&cfg_parser->cfg->local_data, yystack.l_mark[0].str)) @@ -2063,7 +2063,7 @@ case 218: } break; case 219: -#line 1086 "util/configparser.y" +#line 1086 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { char* ptr; OUTYY(("P(server_local_data_ptr:%s)\n", yystack.l_mark[0].str)); @@ -2079,7 +2079,7 @@ case 219: } break; case 220: -#line 1101 "util/configparser.y" +#line 1101 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_minimal_responses:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -2090,7 +2090,7 @@ case 220: } break; case 221: -#line 1111 "util/configparser.y" +#line 1111 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(server_rrset_roundrobin:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -2101,7 +2101,7 @@ case 221: } break; case 222: -#line 1121 "util/configparser.y" +#line 1121 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(name:%s)\n", yystack.l_mark[0].str)); if(cfg_parser->cfg->stubs->name) @@ -2112,7 +2112,7 @@ case 222: } break; case 223: -#line 1131 "util/configparser.y" +#line 1131 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(stub-host:%s)\n", yystack.l_mark[0].str)); if(!cfg_strlist_insert(&cfg_parser->cfg->stubs->hosts, yystack.l_mark[0].str)) @@ -2120,7 +2120,7 @@ case 223: } break; case 224: -#line 1138 "util/configparser.y" +#line 1138 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(stub-addr:%s)\n", yystack.l_mark[0].str)); if(!cfg_strlist_insert(&cfg_parser->cfg->stubs->addrs, yystack.l_mark[0].str)) @@ -2128,7 +2128,7 @@ case 224: } break; case 225: -#line 1145 "util/configparser.y" +#line 1145 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" { OUTYY(("P(stub-first:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -2138,7 +2138,7 @@ case 225: } break; case 226: -#line 1154 "util/configparser.y" *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat May 10 07:26:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3FF1F464; Sat, 10 May 2014 07:26:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2AA45E50; Sat, 10 May 2014 07:26:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4A7Qoe0064612; Sat, 10 May 2014 07:26:50 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4A7QoDT064611; Sat, 10 May 2014 07:26:50 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201405100726.s4A7QoDT064611@svn.freebsd.org> From: Rui Paulo Date: Sat, 10 May 2014 07:26:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265805 - stable/10/contrib/unbound/util X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 May 2014 07:26:50 -0000 Author: rpaulo Date: Sat May 10 07:26:49 2014 New Revision: 265805 URL: http://svnweb.freebsd.org/changeset/base/265805 Log: Revert bogus change in 265804 to configparser.c Modified: stable/10/contrib/unbound/util/configparser.c Modified: stable/10/contrib/unbound/util/configparser.c ============================================================================== --- stable/10/contrib/unbound/util/configparser.c Sat May 10 07:25:26 2014 (r265804) +++ stable/10/contrib/unbound/util/configparser.c Sat May 10 07:26:49 2014 (r265805) @@ -1,6 +1,6 @@ -/* original parser id follows */ -/* yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93" */ -/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */ +#ifndef lint +static const char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93"; +#endif #define YYBYACC 1 #define YYMAJOR 1 @@ -15,7 +15,7 @@ #define YYPURE 0 -#line 39 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 39 "util/configparser.y" #include "config.h" #include @@ -40,7 +40,7 @@ extern struct config_parser_state* cfg_p #define OUTYY(s) #endif -#line 64 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 64 "util/configparser.y" #ifdef YYSTYPE #undef YYSTYPE_IS_DECLARED #define YYSTYPE_IS_DECLARED 1 @@ -51,7 +51,7 @@ typedef union { char* str; } YYSTYPE; #endif /* !YYSTYPE_IS_DECLARED */ -#line 54 "y.tab.c" +#line 54 "util/configparser.c" /* compatibility with bison */ #ifdef YYPARSE_PARAM @@ -839,10 +839,10 @@ typedef struct { } YYSTACKDATA; /* variables for the parser stack */ static YYSTACKDATA yystack; -#line 1277 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 1277 "util/configparser.y" /* parse helper routines could be here */ -#line 845 "y.tab.c" +#line 845 "util/configparser.c" #if YYDEBUG #include /* needed for printf */ @@ -1049,13 +1049,13 @@ yyreduce: switch (yyn) { case 8: -#line 118 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 118 "util/configparser.y" { OUTYY(("\nP(server:)\n")); } break; case 109: -#line 167 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 167 "util/configparser.y" { struct config_stub* s; OUTYY(("\nP(stub_zone:)\n")); @@ -1068,7 +1068,7 @@ case 109: } break; case 117: -#line 183 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 183 "util/configparser.y" { struct config_stub* s; OUTYY(("\nP(forward_zone:)\n")); @@ -1081,7 +1081,7 @@ case 117: } break; case 124: -#line 199 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 199 "util/configparser.y" { OUTYY(("P(server_num_threads:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0 && strcmp(yystack.l_mark[0].str, "0") != 0) @@ -1091,7 +1091,7 @@ case 124: } break; case 125: -#line 208 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 208 "util/configparser.y" { OUTYY(("P(server_verbosity:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0 && strcmp(yystack.l_mark[0].str, "0") != 0) @@ -1101,7 +1101,7 @@ case 125: } break; case 126: -#line 217 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 217 "util/configparser.y" { OUTYY(("P(server_statistics_interval:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "") == 0 || strcmp(yystack.l_mark[0].str, "0") == 0) @@ -1113,7 +1113,7 @@ case 126: } break; case 127: -#line 228 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 228 "util/configparser.y" { OUTYY(("P(server_statistics_cumulative:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1123,7 +1123,7 @@ case 127: } break; case 128: -#line 237 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 237 "util/configparser.y" { OUTYY(("P(server_extended_statistics:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1133,7 +1133,7 @@ case 128: } break; case 129: -#line 246 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 246 "util/configparser.y" { OUTYY(("P(server_port:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0) @@ -1143,7 +1143,7 @@ case 129: } break; case 130: -#line 255 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 255 "util/configparser.y" { OUTYY(("P(server_interface:%s)\n", yystack.l_mark[0].str)); if(cfg_parser->cfg->num_ifs == 0) @@ -1157,7 +1157,7 @@ case 130: } break; case 131: -#line 268 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 268 "util/configparser.y" { OUTYY(("P(server_outgoing_interface:%s)\n", yystack.l_mark[0].str)); if(cfg_parser->cfg->num_out_ifs == 0) @@ -1173,7 +1173,7 @@ case 131: } break; case 132: -#line 283 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 283 "util/configparser.y" { OUTYY(("P(server_outgoing_range:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0) @@ -1183,7 +1183,7 @@ case 132: } break; case 133: -#line 292 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 292 "util/configparser.y" { OUTYY(("P(server_outgoing_port_permit:%s)\n", yystack.l_mark[0].str)); if(!cfg_mark_ports(yystack.l_mark[0].str, 1, @@ -1193,7 +1193,7 @@ case 133: } break; case 134: -#line 301 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 301 "util/configparser.y" { OUTYY(("P(server_outgoing_port_avoid:%s)\n", yystack.l_mark[0].str)); if(!cfg_mark_ports(yystack.l_mark[0].str, 0, @@ -1203,7 +1203,7 @@ case 134: } break; case 135: -#line 310 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 310 "util/configparser.y" { OUTYY(("P(server_outgoing_num_tcp:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0 && strcmp(yystack.l_mark[0].str, "0") != 0) @@ -1213,7 +1213,7 @@ case 135: } break; case 136: -#line 319 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 319 "util/configparser.y" { OUTYY(("P(server_incoming_num_tcp:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0 && strcmp(yystack.l_mark[0].str, "0") != 0) @@ -1223,7 +1223,7 @@ case 136: } break; case 137: -#line 328 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 328 "util/configparser.y" { OUTYY(("P(server_interface_automatic:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1233,7 +1233,7 @@ case 137: } break; case 138: -#line 337 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 337 "util/configparser.y" { OUTYY(("P(server_do_ip4:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1243,7 +1243,7 @@ case 138: } break; case 139: -#line 346 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 346 "util/configparser.y" { OUTYY(("P(server_do_ip6:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1253,7 +1253,7 @@ case 139: } break; case 140: -#line 355 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 355 "util/configparser.y" { OUTYY(("P(server_do_udp:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1263,7 +1263,7 @@ case 140: } break; case 141: -#line 364 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 364 "util/configparser.y" { OUTYY(("P(server_do_tcp:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1273,7 +1273,7 @@ case 141: } break; case 142: -#line 373 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 373 "util/configparser.y" { OUTYY(("P(server_tcp_upstream:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1283,7 +1283,7 @@ case 142: } break; case 143: -#line 382 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 382 "util/configparser.y" { OUTYY(("P(server_ssl_upstream:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1293,7 +1293,7 @@ case 143: } break; case 144: -#line 391 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 391 "util/configparser.y" { OUTYY(("P(server_ssl_service_key:%s)\n", yystack.l_mark[0].str)); free(cfg_parser->cfg->ssl_service_key); @@ -1301,7 +1301,7 @@ case 144: } break; case 145: -#line 398 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 398 "util/configparser.y" { OUTYY(("P(server_ssl_service_pem:%s)\n", yystack.l_mark[0].str)); free(cfg_parser->cfg->ssl_service_pem); @@ -1309,7 +1309,7 @@ case 145: } break; case 146: -#line 405 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 405 "util/configparser.y" { OUTYY(("P(server_ssl_port:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0) @@ -1319,7 +1319,7 @@ case 146: } break; case 147: -#line 414 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 414 "util/configparser.y" { OUTYY(("P(server_do_daemonize:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1329,7 +1329,7 @@ case 147: } break; case 148: -#line 423 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 423 "util/configparser.y" { OUTYY(("P(server_use_syslog:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1344,7 +1344,7 @@ case 148: } break; case 149: -#line 437 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 437 "util/configparser.y" { OUTYY(("P(server_log_time_ascii:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1354,7 +1354,7 @@ case 149: } break; case 150: -#line 446 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 446 "util/configparser.y" { OUTYY(("P(server_log_queries:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1364,7 +1364,7 @@ case 150: } break; case 151: -#line 455 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 455 "util/configparser.y" { OUTYY(("P(server_chroot:%s)\n", yystack.l_mark[0].str)); free(cfg_parser->cfg->chrootdir); @@ -1372,7 +1372,7 @@ case 151: } break; case 152: -#line 462 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 462 "util/configparser.y" { OUTYY(("P(server_username:%s)\n", yystack.l_mark[0].str)); free(cfg_parser->cfg->username); @@ -1380,7 +1380,7 @@ case 152: } break; case 153: -#line 469 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 469 "util/configparser.y" { OUTYY(("P(server_directory:%s)\n", yystack.l_mark[0].str)); free(cfg_parser->cfg->directory); @@ -1388,7 +1388,7 @@ case 153: } break; case 154: -#line 476 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 476 "util/configparser.y" { OUTYY(("P(server_logfile:%s)\n", yystack.l_mark[0].str)); free(cfg_parser->cfg->logfile); @@ -1397,7 +1397,7 @@ case 154: } break; case 155: -#line 484 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 484 "util/configparser.y" { OUTYY(("P(server_pidfile:%s)\n", yystack.l_mark[0].str)); free(cfg_parser->cfg->pidfile); @@ -1405,7 +1405,7 @@ case 155: } break; case 156: -#line 491 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 491 "util/configparser.y" { OUTYY(("P(server_root_hints:%s)\n", yystack.l_mark[0].str)); if(!cfg_strlist_insert(&cfg_parser->cfg->root_hints, yystack.l_mark[0].str)) @@ -1413,7 +1413,7 @@ case 156: } break; case 157: -#line 498 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 498 "util/configparser.y" { OUTYY(("P(server_dlv_anchor_file:%s)\n", yystack.l_mark[0].str)); free(cfg_parser->cfg->dlv_anchor_file); @@ -1421,7 +1421,7 @@ case 157: } break; case 158: -#line 505 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 505 "util/configparser.y" { OUTYY(("P(server_dlv_anchor:%s)\n", yystack.l_mark[0].str)); if(!cfg_strlist_insert(&cfg_parser->cfg->dlv_anchor_list, yystack.l_mark[0].str)) @@ -1429,7 +1429,7 @@ case 158: } break; case 159: -#line 512 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 512 "util/configparser.y" { OUTYY(("P(server_auto_trust_anchor_file:%s)\n", yystack.l_mark[0].str)); if(!cfg_strlist_insert(&cfg_parser->cfg-> @@ -1438,7 +1438,7 @@ case 159: } break; case 160: -#line 520 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 520 "util/configparser.y" { OUTYY(("P(server_trust_anchor_file:%s)\n", yystack.l_mark[0].str)); if(!cfg_strlist_insert(&cfg_parser->cfg-> @@ -1447,7 +1447,7 @@ case 160: } break; case 161: -#line 528 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 528 "util/configparser.y" { OUTYY(("P(server_trusted_keys_file:%s)\n", yystack.l_mark[0].str)); if(!cfg_strlist_insert(&cfg_parser->cfg-> @@ -1456,7 +1456,7 @@ case 161: } break; case 162: -#line 536 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 536 "util/configparser.y" { OUTYY(("P(server_trust_anchor:%s)\n", yystack.l_mark[0].str)); if(!cfg_strlist_insert(&cfg_parser->cfg->trust_anchor_list, yystack.l_mark[0].str)) @@ -1464,7 +1464,7 @@ case 162: } break; case 163: -#line 543 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 543 "util/configparser.y" { OUTYY(("P(server_domain_insecure:%s)\n", yystack.l_mark[0].str)); if(!cfg_strlist_insert(&cfg_parser->cfg->domain_insecure, yystack.l_mark[0].str)) @@ -1472,7 +1472,7 @@ case 163: } break; case 164: -#line 550 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 550 "util/configparser.y" { OUTYY(("P(server_hide_identity:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1482,7 +1482,7 @@ case 164: } break; case 165: -#line 559 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 559 "util/configparser.y" { OUTYY(("P(server_hide_version:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1492,7 +1492,7 @@ case 165: } break; case 166: -#line 568 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 568 "util/configparser.y" { OUTYY(("P(server_identity:%s)\n", yystack.l_mark[0].str)); free(cfg_parser->cfg->identity); @@ -1500,7 +1500,7 @@ case 166: } break; case 167: -#line 575 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 575 "util/configparser.y" { OUTYY(("P(server_version:%s)\n", yystack.l_mark[0].str)); free(cfg_parser->cfg->version); @@ -1508,7 +1508,7 @@ case 167: } break; case 168: -#line 582 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 582 "util/configparser.y" { OUTYY(("P(server_so_rcvbuf:%s)\n", yystack.l_mark[0].str)); if(!cfg_parse_memsize(yystack.l_mark[0].str, &cfg_parser->cfg->so_rcvbuf)) @@ -1517,7 +1517,7 @@ case 168: } break; case 169: -#line 590 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 590 "util/configparser.y" { OUTYY(("P(server_so_sndbuf:%s)\n", yystack.l_mark[0].str)); if(!cfg_parse_memsize(yystack.l_mark[0].str, &cfg_parser->cfg->so_sndbuf)) @@ -1526,7 +1526,7 @@ case 169: } break; case 170: -#line 598 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 598 "util/configparser.y" { OUTYY(("P(server_edns_buffer_size:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0) @@ -1540,7 +1540,7 @@ case 170: } break; case 171: -#line 611 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 611 "util/configparser.y" { OUTYY(("P(server_msg_buffer_size:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0) @@ -1552,7 +1552,7 @@ case 171: } break; case 172: -#line 622 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 622 "util/configparser.y" { OUTYY(("P(server_msg_cache_size:%s)\n", yystack.l_mark[0].str)); if(!cfg_parse_memsize(yystack.l_mark[0].str, &cfg_parser->cfg->msg_cache_size)) @@ -1561,7 +1561,7 @@ case 172: } break; case 173: -#line 630 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 630 "util/configparser.y" { OUTYY(("P(server_msg_cache_slabs:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0) @@ -1575,7 +1575,7 @@ case 173: } break; case 174: -#line 643 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 643 "util/configparser.y" { OUTYY(("P(server_num_queries_per_thread:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0) @@ -1585,7 +1585,7 @@ case 174: } break; case 175: -#line 652 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 652 "util/configparser.y" { OUTYY(("P(server_jostle_timeout:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0 && strcmp(yystack.l_mark[0].str, "0") != 0) @@ -1595,7 +1595,7 @@ case 175: } break; case 176: -#line 661 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 661 "util/configparser.y" { OUTYY(("P(server_rrset_cache_size:%s)\n", yystack.l_mark[0].str)); if(!cfg_parse_memsize(yystack.l_mark[0].str, &cfg_parser->cfg->rrset_cache_size)) @@ -1604,7 +1604,7 @@ case 176: } break; case 177: -#line 669 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 669 "util/configparser.y" { OUTYY(("P(server_rrset_cache_slabs:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0) @@ -1618,7 +1618,7 @@ case 177: } break; case 178: -#line 682 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 682 "util/configparser.y" { OUTYY(("P(server_infra_host_ttl:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0 && strcmp(yystack.l_mark[0].str, "0") != 0) @@ -1628,7 +1628,7 @@ case 178: } break; case 179: -#line 691 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 691 "util/configparser.y" { OUTYY(("P(server_infra_lame_ttl:%s)\n", yystack.l_mark[0].str)); verbose(VERB_DETAIL, "ignored infra-lame-ttl: %s (option " @@ -1637,7 +1637,7 @@ case 179: } break; case 180: -#line 699 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 699 "util/configparser.y" { OUTYY(("P(server_infra_cache_numhosts:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0) @@ -1647,7 +1647,7 @@ case 180: } break; case 181: -#line 708 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 708 "util/configparser.y" { OUTYY(("P(server_infra_cache_lame_size:%s)\n", yystack.l_mark[0].str)); verbose(VERB_DETAIL, "ignored infra-cache-lame-size: %s " @@ -1656,7 +1656,7 @@ case 181: } break; case 182: -#line 716 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 716 "util/configparser.y" { OUTYY(("P(server_infra_cache_slabs:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0) @@ -1670,7 +1670,7 @@ case 182: } break; case 183: -#line 729 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 729 "util/configparser.y" { OUTYY(("P(server_target_fetch_policy:%s)\n", yystack.l_mark[0].str)); free(cfg_parser->cfg->target_fetch_policy); @@ -1678,7 +1678,7 @@ case 183: } break; case 184: -#line 736 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 736 "util/configparser.y" { OUTYY(("P(server_harden_short_bufsize:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1689,7 +1689,7 @@ case 184: } break; case 185: -#line 746 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 746 "util/configparser.y" { OUTYY(("P(server_harden_large_queries:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1700,7 +1700,7 @@ case 185: } break; case 186: -#line 756 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 756 "util/configparser.y" { OUTYY(("P(server_harden_glue:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1711,7 +1711,7 @@ case 186: } break; case 187: -#line 766 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 766 "util/configparser.y" { OUTYY(("P(server_harden_dnssec_stripped:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1722,7 +1722,7 @@ case 187: } break; case 188: -#line 776 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 776 "util/configparser.y" { OUTYY(("P(server_harden_below_nxdomain:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1733,7 +1733,7 @@ case 188: } break; case 189: -#line 786 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 786 "util/configparser.y" { OUTYY(("P(server_harden_referral_path:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1744,7 +1744,7 @@ case 189: } break; case 190: -#line 796 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 796 "util/configparser.y" { OUTYY(("P(server_use_caps_for_id:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1755,7 +1755,7 @@ case 190: } break; case 191: -#line 806 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 806 "util/configparser.y" { OUTYY(("P(server_private_address:%s)\n", yystack.l_mark[0].str)); if(!cfg_strlist_insert(&cfg_parser->cfg->private_address, yystack.l_mark[0].str)) @@ -1763,7 +1763,7 @@ case 191: } break; case 192: -#line 813 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 813 "util/configparser.y" { OUTYY(("P(server_private_domain:%s)\n", yystack.l_mark[0].str)); if(!cfg_strlist_insert(&cfg_parser->cfg->private_domain, yystack.l_mark[0].str)) @@ -1771,7 +1771,7 @@ case 192: } break; case 193: -#line 820 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 820 "util/configparser.y" { OUTYY(("P(server_prefetch:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1781,7 +1781,7 @@ case 193: } break; case 194: -#line 829 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 829 "util/configparser.y" { OUTYY(("P(server_prefetch_key:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1791,7 +1791,7 @@ case 194: } break; case 195: -#line 838 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 838 "util/configparser.y" { OUTYY(("P(server_unwanted_reply_threshold:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0 && strcmp(yystack.l_mark[0].str, "0") != 0) @@ -1801,7 +1801,7 @@ case 195: } break; case 196: -#line 847 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 847 "util/configparser.y" { OUTYY(("P(server_do_not_query_address:%s)\n", yystack.l_mark[0].str)); if(!cfg_strlist_insert(&cfg_parser->cfg->donotqueryaddrs, yystack.l_mark[0].str)) @@ -1809,7 +1809,7 @@ case 196: } break; case 197: -#line 854 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 854 "util/configparser.y" { OUTYY(("P(server_do_not_query_localhost:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1820,7 +1820,7 @@ case 197: } break; case 198: -#line 864 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 864 "util/configparser.y" { OUTYY(("P(server_access_control:%s %s)\n", yystack.l_mark[-1].str, yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "deny")!=0 && strcmp(yystack.l_mark[0].str, "refuse")!=0 && @@ -1835,7 +1835,7 @@ case 198: } break; case 199: -#line 878 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 878 "util/configparser.y" { OUTYY(("P(server_module_conf:%s)\n", yystack.l_mark[0].str)); free(cfg_parser->cfg->module_conf); @@ -1843,7 +1843,7 @@ case 199: } break; case 200: -#line 885 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 885 "util/configparser.y" { OUTYY(("P(server_val_override_date:%s)\n", yystack.l_mark[0].str)); if(strlen(yystack.l_mark[0].str) == 0 || strcmp(yystack.l_mark[0].str, "0") == 0) { @@ -1862,7 +1862,7 @@ case 200: } break; case 201: -#line 903 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 903 "util/configparser.y" { OUTYY(("P(server_val_sig_skew_min:%s)\n", yystack.l_mark[0].str)); if(strlen(yystack.l_mark[0].str) == 0 || strcmp(yystack.l_mark[0].str, "0") == 0) { @@ -1876,7 +1876,7 @@ case 201: } break; case 202: -#line 916 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 916 "util/configparser.y" { OUTYY(("P(server_val_sig_skew_max:%s)\n", yystack.l_mark[0].str)); if(strlen(yystack.l_mark[0].str) == 0 || strcmp(yystack.l_mark[0].str, "0") == 0) { @@ -1890,7 +1890,7 @@ case 202: } break; case 203: -#line 929 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 929 "util/configparser.y" { OUTYY(("P(server_cache_max_ttl:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0 && strcmp(yystack.l_mark[0].str, "0") != 0) @@ -1900,7 +1900,7 @@ case 203: } break; case 204: -#line 938 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 938 "util/configparser.y" { OUTYY(("P(server_cache_min_ttl:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0 && strcmp(yystack.l_mark[0].str, "0") != 0) @@ -1910,7 +1910,7 @@ case 204: } break; case 205: -#line 947 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 947 "util/configparser.y" { OUTYY(("P(server_bogus_ttl:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0 && strcmp(yystack.l_mark[0].str, "0") != 0) @@ -1920,7 +1920,7 @@ case 205: } break; case 206: -#line 956 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 956 "util/configparser.y" { OUTYY(("P(server_val_clean_additional:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1931,7 +1931,7 @@ case 206: } break; case 207: -#line 966 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 966 "util/configparser.y" { OUTYY(("P(server_val_permissive_mode:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1942,7 +1942,7 @@ case 207: } break; case 208: -#line 976 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 976 "util/configparser.y" { OUTYY(("P(server_ignore_cd_flag:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -1952,7 +1952,7 @@ case 208: } break; case 209: -#line 985 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 985 "util/configparser.y" { OUTYY(("P(server_val_log_level:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0 && strcmp(yystack.l_mark[0].str, "0") != 0) @@ -1962,7 +1962,7 @@ case 209: } break; case 210: -#line 994 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 994 "util/configparser.y" { OUTYY(("P(server_val_nsec3_keysize_iterations:%s)\n", yystack.l_mark[0].str)); free(cfg_parser->cfg->val_nsec3_key_iterations); @@ -1970,7 +1970,7 @@ case 210: } break; case 211: -#line 1001 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 1001 "util/configparser.y" { OUTYY(("P(server_add_holddown:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0 && strcmp(yystack.l_mark[0].str, "0") != 0) @@ -1980,7 +1980,7 @@ case 211: } break; case 212: -#line 1010 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 1010 "util/configparser.y" { OUTYY(("P(server_del_holddown:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0 && strcmp(yystack.l_mark[0].str, "0") != 0) @@ -1990,7 +1990,7 @@ case 212: } break; case 213: -#line 1019 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 1019 "util/configparser.y" { OUTYY(("P(server_keep_missing:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0 && strcmp(yystack.l_mark[0].str, "0") != 0) @@ -2000,7 +2000,7 @@ case 213: } break; case 214: -#line 1028 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 1028 "util/configparser.y" { OUTYY(("P(server_key_cache_size:%s)\n", yystack.l_mark[0].str)); if(!cfg_parse_memsize(yystack.l_mark[0].str, &cfg_parser->cfg->key_cache_size)) @@ -2009,7 +2009,7 @@ case 214: } break; case 215: -#line 1036 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 1036 "util/configparser.y" { OUTYY(("P(server_key_cache_slabs:%s)\n", yystack.l_mark[0].str)); if(atoi(yystack.l_mark[0].str) == 0) @@ -2023,7 +2023,7 @@ case 215: } break; case 216: -#line 1049 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 1049 "util/configparser.y" { OUTYY(("P(server_neg_cache_size:%s)\n", yystack.l_mark[0].str)); if(!cfg_parse_memsize(yystack.l_mark[0].str, &cfg_parser->cfg->neg_cache_size)) @@ -2032,7 +2032,7 @@ case 216: } break; case 217: -#line 1057 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 1057 "util/configparser.y" { OUTYY(("P(server_local_zone:%s %s)\n", yystack.l_mark[-1].str, yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "static")!=0 && strcmp(yystack.l_mark[0].str, "deny")!=0 && @@ -2055,7 +2055,7 @@ case 217: } break; case 218: -#line 1079 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 1079 "util/configparser.y" { OUTYY(("P(server_local_data:%s)\n", yystack.l_mark[0].str)); if(!cfg_strlist_insert(&cfg_parser->cfg->local_data, yystack.l_mark[0].str)) @@ -2063,7 +2063,7 @@ case 218: } break; case 219: -#line 1086 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 1086 "util/configparser.y" { char* ptr; OUTYY(("P(server_local_data_ptr:%s)\n", yystack.l_mark[0].str)); @@ -2079,7 +2079,7 @@ case 219: } break; case 220: -#line 1101 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 1101 "util/configparser.y" { OUTYY(("P(server_minimal_responses:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -2090,7 +2090,7 @@ case 220: } break; case 221: -#line 1111 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 1111 "util/configparser.y" { OUTYY(("P(server_rrset_roundrobin:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -2101,7 +2101,7 @@ case 221: } break; case 222: -#line 1121 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 1121 "util/configparser.y" { OUTYY(("P(name:%s)\n", yystack.l_mark[0].str)); if(cfg_parser->cfg->stubs->name) @@ -2112,7 +2112,7 @@ case 222: } break; case 223: -#line 1131 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 1131 "util/configparser.y" { OUTYY(("P(stub-host:%s)\n", yystack.l_mark[0].str)); if(!cfg_strlist_insert(&cfg_parser->cfg->stubs->hosts, yystack.l_mark[0].str)) @@ -2120,7 +2120,7 @@ case 223: } break; case 224: -#line 1138 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 1138 "util/configparser.y" { OUTYY(("P(stub-addr:%s)\n", yystack.l_mark[0].str)); if(!cfg_strlist_insert(&cfg_parser->cfg->stubs->addrs, yystack.l_mark[0].str)) @@ -2128,7 +2128,7 @@ case 224: } break; case 225: -#line 1145 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" +#line 1145 "util/configparser.y" { OUTYY(("P(stub-first:%s)\n", yystack.l_mark[0].str)); if(strcmp(yystack.l_mark[0].str, "yes") != 0 && strcmp(yystack.l_mark[0].str, "no") != 0) @@ -2138,7 +2138,7 @@ case 225: } break; case 226: -#line 1154 "/home/rpaulo/freebsd-svn/stable/10/lib/libunbound/../../contrib/unbound/util/configparser.y" *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat May 10 07:53:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55DA4987; Sat, 10 May 2014 07:53:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42AC095; Sat, 10 May 2014 07:53:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4A7rbGC077019; Sat, 10 May 2014 07:53:37 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4A7rbc6077018; Sat, 10 May 2014 07:53:37 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201405100753.s4A7rbc6077018@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 10 May 2014 07:53:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265807 - stable/10/sys/fs/msdosfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 May 2014 07:53:37 -0000 Author: kib Date: Sat May 10 07:53:36 2014 New Revision: 265807 URL: http://svnweb.freebsd.org/changeset/base/265807 Log: MFC r265275: Overwrite the de_Name for the directories on rename to correct the dot name. Modified: stable/10/sys/fs/msdosfs/msdosfs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/msdosfs/msdosfs_vnops.c ============================================================================== --- stable/10/sys/fs/msdosfs/msdosfs_vnops.c Sat May 10 07:37:32 2014 (r265806) +++ stable/10/sys/fs/msdosfs/msdosfs_vnops.c Sat May 10 07:53:36 2014 (r265807) @@ -1240,6 +1240,17 @@ abortit: VOP_UNLOCK(fvp, 0); goto bad; } + /* + * If ip is for a directory, then its name should always + * be "." since it is for the directory entry in the + * directory itself (msdosfs_lookup() always translates + * to the "." entry so as to get a unique denode, except + * for the root directory there are different + * complications). However, we just corrupted its name + * to pass the correct name to createde(). Undo this. + */ + if ((ip->de_Attributes & ATTR_DIRECTORY) != 0) + bcopy(oldname, ip->de_Name, 11); ip->de_refcnt++; zp->de_fndoffset = from_diroffset; error = removede(zp, ip); From owner-svn-src-stable@FreeBSD.ORG Sat May 10 07:56:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5329EAF5; Sat, 10 May 2014 07:56:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3FFC5A2; Sat, 10 May 2014 07:56:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4A7u2c7077433; Sat, 10 May 2014 07:56:02 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4A7u26S077432; Sat, 10 May 2014 07:56:02 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201405100756.s4A7u26S077432@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 10 May 2014 07:56:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265808 - stable/9/sys/fs/msdosfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 May 2014 07:56:02 -0000 Author: kib Date: Sat May 10 07:56:01 2014 New Revision: 265808 URL: http://svnweb.freebsd.org/changeset/base/265808 Log: MFC r265275: Overwrite the de_Name for the directories on rename to correct the dot name. Modified: stable/9/sys/fs/msdosfs/msdosfs_vnops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/msdosfs/msdosfs_vnops.c ============================================================================== --- stable/9/sys/fs/msdosfs/msdosfs_vnops.c Sat May 10 07:53:36 2014 (r265807) +++ stable/9/sys/fs/msdosfs/msdosfs_vnops.c Sat May 10 07:56:01 2014 (r265808) @@ -1219,6 +1219,17 @@ abortit: VOP_UNLOCK(fvp, 0); goto bad; } + /* + * If ip is for a directory, then its name should always + * be "." since it is for the directory entry in the + * directory itself (msdosfs_lookup() always translates + * to the "." entry so as to get a unique denode, except + * for the root directory there are different + * complications). However, we just corrupted its name + * to pass the correct name to createde(). Undo this. + */ + if ((ip->de_Attributes & ATTR_DIRECTORY) != 0) + bcopy(oldname, ip->de_Name, 11); ip->de_refcnt++; zp->de_fndoffset = from_diroffset; error = removede(zp, ip); From owner-svn-src-stable@FreeBSD.ORG Sat May 10 08:07:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C4C7ADE8; Sat, 10 May 2014 08:07:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B177B16A; Sat, 10 May 2014 08:07:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4A87fSF082387; Sat, 10 May 2014 08:07:41 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4A87fHV082386; Sat, 10 May 2014 08:07:41 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201405100807.s4A87fHV082386@svn.freebsd.org> From: Rui Paulo Date: Sat, 10 May 2014 08:07:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265809 - stable/10/sys/boot/fdt/dts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 May 2014 08:07:41 -0000 Author: rpaulo Date: Sat May 10 08:07:41 2014 New Revision: 265809 URL: http://svnweb.freebsd.org/changeset/base/265809 Log: Manually MFC 262714: Add a missing semicolong, noticed by the gnu dt compiler. In head, the directory layout changed and we can't svn merge correctly. Modified: stable/10/sys/boot/fdt/dts/beaglebone.dts Modified: stable/10/sys/boot/fdt/dts/beaglebone.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/beaglebone.dts Sat May 10 07:56:01 2014 (r265808) +++ stable/10/sys/boot/fdt/dts/beaglebone.dts Sat May 10 08:07:41 2014 (r265809) @@ -135,7 +135,7 @@ compatible = "ti,am335x-pmic"; reg = <0x24>; }; - } + }; }; chosen { From owner-svn-src-stable@FreeBSD.ORG Sat May 10 08:10:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3DE7FF65; Sat, 10 May 2014 08:10:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B440176; Sat, 10 May 2014 08:10:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4A8A2vX082925; Sat, 10 May 2014 08:10:02 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4A8A29Q082924; Sat, 10 May 2014 08:10:02 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201405100810.s4A8A29Q082924@svn.freebsd.org> From: Rui Paulo Date: Sat, 10 May 2014 08:10:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265810 - stable/10/sys/arm/ti X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 May 2014 08:10:02 -0000 Author: rpaulo Date: Sat May 10 08:10:01 2014 New Revision: 265810 URL: http://svnweb.freebsd.org/changeset/base/265810 Log: MFC r259126: Activate the device before attempt to access any of its registers. Without this change we may end up with a panic (Fatal kernel mode data abort: 'External Non-Linefetch Abort (S)') as described in http://e2e.ti.com/support/arm/sitara_arm/f/791/t/276862.aspx. It is now possible to bring up I2C1 and I2C2 on BBB. Modified: stable/10/sys/arm/ti/ti_i2c.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/ti/ti_i2c.c ============================================================================== --- stable/10/sys/arm/ti/ti_i2c.c Sat May 10 08:07:41 2014 (r265809) +++ stable/10/sys/arm/ti/ti_i2c.c Sat May 10 08:10:01 2014 (r265810) @@ -1076,20 +1076,20 @@ ti_i2c_attach(device_t dev) goto out; } - /* XXXOMAP3: FIXME get proper revision here */ - /* First read the version number of the I2C module */ - sc->sc_rev = ti_i2c_read_2(sc, I2C_REG_REVNB_HI) & 0xff; - - device_printf(dev, "I2C revision %d.%d\n", sc->sc_rev >> 4, - sc->sc_rev & 0xf); - - /* Activate the H/W */ + /* First we _must_ activate the H/W */ err = ti_i2c_activate(dev); if (err) { device_printf(dev, "ti_i2c_activate failed\n"); goto out; } + /* XXXOMAP3: FIXME get proper revision here */ + /* Read the version number of the I2C module */ + sc->sc_rev = ti_i2c_read_2(sc, I2C_REG_REVNB_HI) & 0xff; + + device_printf(dev, "I2C revision %d.%d\n", sc->sc_rev >> 4, + sc->sc_rev & 0xf); + /* activate the interrupt */ err = bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_MISC | INTR_MPSAFE, NULL, ti_i2c_intr, sc, &sc->sc_irq_h); From owner-svn-src-stable@FreeBSD.ORG Sat May 10 19:10:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53C9157D; Sat, 10 May 2014 19:10:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 262CBEF3; Sat, 10 May 2014 19:10:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4AJAWpn084815; Sat, 10 May 2014 19:10:32 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4AJAWi9084814; Sat, 10 May 2014 19:10:32 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201405101910.s4AJAWi9084814@svn.freebsd.org> From: Christian Brueffer Date: Sat, 10 May 2014 19:10:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265848 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 May 2014 19:10:32 -0000 Author: brueffer Date: Sat May 10 19:10:31 2014 New Revision: 265848 URL: http://svnweb.freebsd.org/changeset/base/265848 Log: MFC: r265263 Make this manpage ready for hardware notes generation, add more Xrefs and perform general cleanup. In particular, don't claim rsu(4) devices can be configured with hostname(1)... Modified: stable/10/share/man/man4/rsu.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/rsu.4 ============================================================================== --- stable/10/share/man/man4/rsu.4 Sat May 10 19:08:07 2014 (r265847) +++ stable/10/share/man/man4/rsu.4 Sat May 10 19:10:31 2014 (r265848) @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd July 29 2013 +.Dd May 3, 2014 .Dt RSU 4 .Os .Sh NAME @@ -40,7 +40,8 @@ place the following line in if_rsu_load="YES" .Ed .Pp -After you have read the license in /usr/share/doc/legal/realtek +After you have read the license in +.Pa /usr/share/doc/legal/realtek you will want to add the following lines to .Xr loader.conf 5 : .Bd -literal -offset indent @@ -93,18 +94,19 @@ due to serious weaknesses in it. The .Nm driver can be configured at runtime with -.Xr ifconfig 8 -or on boot with -.Xr hostname 1 . +.Xr ifconfig 8 . .Sh FILES The driver needs at least version 1.2 of the following firmware file, which is loaded when an interface is attached: .Pp .Bl -tag -width Ds -offset indent -compact -.It /boot/kernel/rsu-rtl8712fw.ko +.It Pa /boot/kernel/rsu-rtl8712fw.ko .El .Sh HARDWARE -The following adapters should work: +The +.Nm +driver provices support for Realtek RTL8188SU/RTL8192SU USB IEEE 802.11b/g/n +wireless network adapters, including: .Pp .Bl -tag -width Ds -offset indent -compact .It ASUS USB-N10 @@ -149,14 +151,15 @@ The driver will reset the hardware. This should not happen. .El .Sh SEE ALSO -.Xr hostname 1 , .Xr intro 1 , -.Xr usb 3 , +.Xr usb 4 , .Xr netintro 4 , .Xr rsufw 4 , .Xr wlan 4 , .Xr arp 8 , -.Xr ifconfig 8 +.Xr hostapd 8 , +.Xr ifconfig 8 , +.Xr wpa_supplicant 8 .Sh HISTORY The .Nm From owner-svn-src-stable@FreeBSD.ORG Sat May 10 19:47:55 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A8CDF98; Sat, 10 May 2014 19:47:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BE48230; Sat, 10 May 2014 19:47:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4AJlt7q004806; Sat, 10 May 2014 19:47:55 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4AJlsII004798; Sat, 10 May 2014 19:47:54 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201405101947.s4AJlsII004798@svn.freebsd.org> From: Christian Brueffer Date: Sat, 10 May 2014 19:47:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265851 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 May 2014 19:47:55 -0000 Author: brueffer Date: Sat May 10 19:47:54 2014 New Revision: 265851 URL: http://svnweb.freebsd.org/changeset/base/265851 Log: MFC: r257408 by kevlo Add manpage for urtwnfw, the Realtek RTL8188CU/RTL8192CU firmware module. Also fix a few nits in urtwn.4. Added: stable/10/share/man/man4/urtwnfw.4 - copied unchanged from r257408, head/share/man/man4/urtwnfw.4 Modified: stable/10/share/man/man4/Makefile stable/10/share/man/man4/urtwn.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Sat May 10 19:47:00 2014 (r265850) +++ stable/10/share/man/man4/Makefile Sat May 10 19:47:54 2014 (r265851) @@ -534,6 +534,7 @@ MAN= aac.4 \ urndis.4 \ ${_urtw.4} \ urtwn.4 \ + urtwnfw.4 \ usb.4 \ usb_template.4 \ usb_quirk.4 \ Modified: stable/10/share/man/man4/urtwn.4 ============================================================================== --- stable/10/share/man/man4/urtwn.4 Sat May 10 19:47:00 2014 (r265850) +++ stable/10/share/man/man4/urtwn.4 Sat May 10 19:47:54 2014 (r265851) @@ -1,6 +1,3 @@ -.\" $OpenBSD: urtwn.4,v 1.20 2013/05/16 10:02:59 sthen Exp $ -.\" $FreeBSD$ -.\" .\" Copyright (c) 2010 Damien Bergamini .\" .\" Permission to use, copy, modify, and distribute this software for any @@ -15,7 +12,9 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd October 6, 2013 +.\" $FreeBSD$ +.\" +.Dd October 31, 2013 .Dt URTWN 4 .Os .Sh NAME @@ -40,6 +39,13 @@ module at boot time, place the following .Bd -literal -offset indent if_urtwn_load="YES" .Ed +.Pp +In both cases, place the following line in +.Xr loader.conf 5 +to acknowledge the firmware license (see below): +.Bd -literal -offset indent +legal.realtek.license_ack=1 +.Ed .Sh DESCRIPTION The .Nm @@ -57,6 +63,22 @@ The RTL8192CU is a highly integrated mul 802.11n adapter that combines a MAC, a 2T2R capable baseband and an RF in a single chip. It operates in the 2GHz spectrum only. +.Pp +This driver requires the firmware built with the +.Nm urtwnfw +module to work. +For the loaded firmware to be enabled for use the license at +.Pa /usr/share/doc/legal/realtek +must be agreed by adding the following line to +.Xr loader.conf 5 : +.Pp +.Dl "legal.realtek.license_ack=1" +.Sh FILES +.Bl -tag -width ".Pa /usr/share/doc/legal/realtek" -compact +.It Pa /usr/share/doc/legal/realtek +.Nm +firmware license +.El .Sh HARDWARE The following adapters should work: .Pp @@ -98,6 +120,7 @@ The driver will reset the hardware. This should not happen. .El .Sh SEE ALSO +.Xr urtwnfw 4 , .Xr intro 4 , .Xr netintro 4 , .Xr usb 4 , Copied: stable/10/share/man/man4/urtwnfw.4 (from r257408, head/share/man/man4/urtwnfw.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man4/urtwnfw.4 Sat May 10 19:47:54 2014 (r265851, copy of r257408, head/share/man/man4/urtwnfw.4) @@ -0,0 +1,75 @@ +.\" Copyright (c) 2013 Kevin Lo +.\" All rights reserved. +.\" +.\" 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. The name of the author may not be used to endorse or promote products +.\" derived from this software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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. +.\" +.\" $FreeBSD$ +.\" +.Dd October 31, 2013 +.Dt URTWNFW 4 +.Os +.Sh NAME +.Nm urtwnfw +.Nd "Firmware Module for Realtek Wireless driver" +.Sh SYNOPSIS +To compile this module into the kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device urtwnfw" +.Ed +.Pp +This will include three firmware images inside the kernel. +If you want to pick only the firmware image for your network adapter choose one +of the following: +.Bd -ragged -offset indent +.Cd "device urtwn-rtl8192cfwT" +.Cd "device urtwn-rtl8192cfwU" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +urtwn-rtl8192cfwT_load="YES" +urtwn-rtl8192cfwU_load="YES" +.Ed +.Sh DESCRIPTION +This module provides access to firmware sets for the +Realtek RTL8188CUS, RTL8188CE-VAU, RTL8188RU and RTL8192CU +chip based USB WiFi adapters. +It may be +statically linked into the kernel, or loaded as a module. +.Pp +For the loaded firmware to be enabled for use the license at +.Pa /usr/share/doc/legal/realtek +must be agreed to by adding the following line to +.Xr loader.conf 5 : +.Pp +.Dl "legal.realtek.license_ack=1" +.Sh FILES +.Bl -tag -width ".Pa /usr/share/doc/legal/realtek" -compact +.It Pa /usr/share/doc/legal/realtek +.Nm +firmware license +.El +.Sh SEE ALSO +.Xr urtwn 4 , +.Xr firmware 9 From owner-svn-src-stable@FreeBSD.ORG Sat May 10 20:45:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C6D6710; Sat, 10 May 2014 20:45:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 684BD8F1; Sat, 10 May 2014 20:45:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4AKjO6q032210; Sat, 10 May 2014 20:45:24 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4AKjOqX032208; Sat, 10 May 2014 20:45:24 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201405102045.s4AKjOqX032208@svn.freebsd.org> From: Christian Brueffer Date: Sat, 10 May 2014 20:45:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265856 - in stable/10/release/doc: en_US.ISO8859-1/hardware share/misc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 May 2014 20:45:24 -0000 Author: brueffer Date: Sat May 10 20:45:23 2014 New Revision: 265856 URL: http://svnweb.freebsd.org/changeset/base/265856 Log: MFC: r265264, r265270 Add rsu(4) and urtwn(4) to the hardware notes. Modified: stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml stable/10/release/doc/share/misc/dev.archlist.txt Directory Properties: stable/10/ (props changed) Modified: stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Sat May 10 20:39:57 2014 (r265855) +++ stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Sat May 10 20:45:23 2014 (r265856) @@ -1014,6 +1014,8 @@ &hwlist.ral; + &hwlist.rsu; + &hwlist.rum; &hwlist.run; @@ -1026,6 +1028,8 @@ &hwlist.urtw; + &hwlist.urtwn; + [&arch.amd64;, &arch.i386;, &arch.pc98;] Lucent Technologies WaveLAN/IEEE 802.11b wireless network adapters and workalikes using the Lucent Hermes, Intersil PRISM-II, Modified: stable/10/release/doc/share/misc/dev.archlist.txt ============================================================================== --- stable/10/release/doc/share/misc/dev.archlist.txt Sat May 10 20:39:57 2014 (r265855) +++ stable/10/release/doc/share/misc/dev.archlist.txt Sat May 10 20:45:23 2014 (r265856) @@ -109,6 +109,7 @@ qlxgbe amd64 qlxge amd64 rc i386 ral i386,amd64 +rsu i386,amd64 rue i386,pc98,amd64 rum i386,amd64 run i386,amd64 From owner-svn-src-stable@FreeBSD.ORG Sun May 11 09:54:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4DEFD3A3; Sun, 11 May 2014 09:54:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A417247F; Sun, 11 May 2014 09:54:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4B9sdFh084142; Sun, 11 May 2014 09:54:39 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4B9sd25084141; Sun, 11 May 2014 09:54:39 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201405110954.s4B9sd25084141@svn.freebsd.org> From: Christian Brueffer Date: Sun, 11 May 2014 09:54:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265874 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 May 2014 09:54:39 -0000 Author: brueffer Date: Sun May 11 09:54:38 2014 New Revision: 265874 URL: http://svnweb.freebsd.org/changeset/base/265874 Log: MFC: r265269 Make the HARDWARE section ready for release notes generation; sort SEE ALSO. Compared to the original revision, the list of supported chipsets was changed to reflect those supported in this branch. Modified: stable/10/share/man/man4/urtwn.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/urtwn.4 ============================================================================== --- stable/10/share/man/man4/urtwn.4 Sun May 11 09:14:29 2014 (r265873) +++ stable/10/share/man/man4/urtwn.4 Sun May 11 09:54:38 2014 (r265874) @@ -14,7 +14,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 31, 2013 +.Dd May 3, 2014 .Dt URTWN 4 .Os .Sh NAME @@ -80,7 +80,10 @@ must be agreed by adding the following l firmware license .El .Sh HARDWARE -The following adapters should work: +The +.Nm +driver supports Realtek RTL8188CUS, RTL8188CE-VAU, RTL8188RU and RTL8192CU based USB +IEEE 802.11b/g/n wireless network adapters, including: .Pp .Bl -tag -width Ds -offset indent -compact .It ASUS USB-N10 NANO @@ -120,9 +123,9 @@ The driver will reset the hardware. This should not happen. .El .Sh SEE ALSO -.Xr urtwnfw 4 , .Xr intro 4 , .Xr netintro 4 , +.Xr urtwnfw 4 , .Xr usb 4 , .Xr wlan 4 , .Xr wlan_ccmp 4 , From owner-svn-src-stable@FreeBSD.ORG Sun May 11 14:54:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F3E9369; Sun, 11 May 2014 14:54:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B1602956; Sun, 11 May 2014 14:54:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4BEsIHd019332; Sun, 11 May 2014 14:54:18 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4BEsImq019330; Sun, 11 May 2014 14:54:18 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201405111454.s4BEsImq019330@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 11 May 2014 14:54:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265879 - stable/10/lib/libcrypt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 May 2014 14:54:18 -0000 Author: des Date: Sun May 11 14:54:17 2014 New Revision: 265879 URL: http://svnweb.freebsd.org/changeset/base/265879 Log: MFH (r261913): switch default to sha512 MFH (r264964): rewrite so DES still works when not the default MFH (r262945): clean up man page Modified: stable/10/lib/libcrypt/crypt.3 stable/10/lib/libcrypt/crypt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libcrypt/crypt.3 ============================================================================== --- stable/10/lib/libcrypt/crypt.3 Sun May 11 13:48:21 2014 (r265878) +++ stable/10/lib/libcrypt/crypt.3 Sun May 11 14:54:17 2014 (r265879) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 9, 2011 +.Dd March 9, 2014 .Dt CRYPT 3 .Os .Sh NAME @@ -63,11 +63,16 @@ Currently these include the .Tn MD5 hash, .Tn NT-Hash -(compatible with Microsoft's NT scheme) +.Pq compatible with Microsoft's NT scheme and .Tn Blowfish . -The algorithm used will depend upon the format of the Salt (following -the Modular Crypt Format (MCF)), if +The algorithm used will depend upon the format of the Salt +.Po +following +the Modular Crypt Format +.Pq MCF +.Pc , +if .Tn DES and/or .Tn Blowfish @@ -77,8 +82,10 @@ has been called to change the default. .Pp The first argument to .Nm -is the data to hash (usually a password), in a -.Dv null Ns -terminated +is the data to hash +.Pq usually a password , +in a +.Dv NUL Ns -terminated string. The second is the salt, in one of three forms: .Pp @@ -96,22 +103,19 @@ If it begins with the string then the Modular Crypt Format is used, as outlined below. .It Traditional If neither of the above is true, it assumes the Traditional Format, -using the entire string as the salt (or the first portion). +using the entire string as the salt +.Pq or the first portion . .El .Pp All routines are designed to be time-consuming. -A brief test on a -.Tn Pentium -166/MMX shows the -.Tn DES -crypt to do approximately 2640 crypts -a CPU second and MD5 to do about 62 crypts a CPU second. .Ss DES Extended Format: The .Ar key -is divided into groups of 8 characters (the last group is null-padded) -and the low-order 7 bits of each character (56 bits per group) are -used to form the +is divided into groups of 8 characters +.Pq the last group is NUL-padded +and the low-order 7 bits of each character +.Pq 56 bits per group +are used to form the .Tn DES key as follows: the first group of 56 bits becomes the initial @@ -127,7 +131,8 @@ The salt is a 9-character array consisti by 4 bytes of iteration count and 4 bytes of salt. These are encoded as printable characters, 6 bits per character, least significant character first. -The values 0 to 63 are encoded as ``./0-9A-Za-z''. +The values 0 to 63 are encoded as +.Dq ./0-9A-Za-z . This allows 24 bits for both .Fa count and @@ -138,7 +143,8 @@ The introduces disorder in the .Tn DES algorithm in one of 16777216 or 4096 possible ways -(i.e., with 24 or 12 bits: if bit +.Po +i.e., with 24 or 12 bits: if bit .Em i of the .Ar salt @@ -148,7 +154,8 @@ and .Em i+24 are swapped in the .Tn DES -E-box output). +E-box output +.Pc . .Pp The .Tn DES @@ -157,11 +164,13 @@ key is used to encrypt a 64-bit constant iterations of .Tn DES . The value returned is a -.Dv null Ns -terminated -string, 20 or 13 bytes (plus null) in length, consisting of the +.Dv NUL Ns -terminated +string, 20 or 13 bytes +.Pq plus NUL +in length, consisting of the .Ar salt followed by the encoded 64-bit encryption. -.Ss "Modular" crypt: +.Ss Modular crypt: If the salt begins with the string .Fa $digit$ then the Modular Crypt Format is used. @@ -170,11 +179,10 @@ The represents which algorithm is used in encryption. Following the token is the actual salt to use in the encryption. -The length of the salt is limited -to 8 characters--because the length of the returned output is also limited -(_PASSWORD_LEN). -The salt must be terminated with the end of the string -(NULL) or a dollar sign. +The maximum length of the salt used depends upon the module. +The salt must be terminated with the end of the string character +.Pq NUL +or a dollar sign. Any characters after the dollar sign are ignored. .Pp Currently supported algorithms are: @@ -199,7 +207,7 @@ An example salt would be: .Bl -tag -width 6n -offset indent .It Cm "$4$thesalt$rest" .El -.Ss "Traditional" crypt: +.Ss Traditional crypt: The algorithm used will depend upon whether .Fn crypt_set_format has been called and whether a global default format has been specified. @@ -216,7 +224,7 @@ if it is available, or MD5 if not. .Pp How the salt is used will depend upon the algorithm for the hash. For -best results, specify at least two characters of salt. +best results, specify at least eight characters of salt. .Pp The .Fn crypt_get_format Modified: stable/10/lib/libcrypt/crypt.c ============================================================================== --- stable/10/lib/libcrypt/crypt.c Sun May 11 13:48:21 2014 (r265878) +++ stable/10/lib/libcrypt/crypt.c Sun May 11 14:54:17 2014 (r265879) @@ -1,6 +1,7 @@ -/* - * Copyright (c) 1999 - * Mark Murray. All rights reserved. +/*- + * Copyright (c) 1999 Mark Murray + * Copyright (c) 2014 Dag-Erling Smørgrav + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -28,114 +29,88 @@ __FBSDID("$FreeBSD$"); #include -#include + #include +#include #include + #include "crypt.h" -static const struct { +/* + * List of supported crypt(3) formats. The first element in the list will + * be the default. + */ +static const struct crypt_format { const char *const name; char *(*const func)(const char *, const char *); const char *const magic; -} crypt_types[] = { -#ifdef HAS_DES - { - "des", - crypt_des, - NULL - }, -#endif - { - "md5", - crypt_md5, - "$1$" - }, +} crypt_formats[] = { + /* default format */ + { "sha512", crypt_sha512, "$6$" }, + + /* other supported formats */ + { "md5", crypt_md5, "$1$" }, #ifdef HAS_BLOWFISH - { - "blf", - crypt_blowfish, - "$2" - }, + { "blf", crypt_blowfish, "$2" }, #endif - { - "nth", - crypt_nthash, - "$3$" - }, - { - "sha256", - crypt_sha256, - "$5$" - }, - { - "sha512", - crypt_sha512, - "$6$" - }, - { - NULL, - NULL, - NULL - } -}; - + { "nth", crypt_nthash, "$3$" }, + { "sha256", crypt_sha256, "$5$" }, #ifdef HAS_DES -#define CRYPT_DEFAULT "des" -#else -#define CRYPT_DEFAULT "md5" + { "des", crypt_des, "_" }, #endif -static int crypt_type = -1; + /* sentinel */ + { NULL, NULL, NULL } +}; -static void -crypt_setdefault(void) -{ - size_t i; +static const struct crypt_format *crypt_format = &crypt_formats[0]; - if (crypt_type != -1) - return; - for (i = 0; i < sizeof(crypt_types) / sizeof(crypt_types[0]) - 1; i++) { - if (strcmp(CRYPT_DEFAULT, crypt_types[i].name) == 0) { - crypt_type = (int)i; - return; - } - } - crypt_type = 0; -} +#define DES_SALT_ALPHABET \ + "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" +/* + * Returns the name of the currently selected format. + */ const char * crypt_get_format(void) { - crypt_setdefault(); - return (crypt_types[crypt_type].name); + return (crypt_format->name); } +/* + * Selects the format to use for subsequent crypt(3) invocations. + */ int -crypt_set_format(const char *type) +crypt_set_format(const char *format) { - size_t i; + const struct crypt_format *cf; - crypt_setdefault(); - for (i = 0; i < sizeof(crypt_types) / sizeof(crypt_types[0]) - 1; i++) { - if (strcmp(type, crypt_types[i].name) == 0) { - crypt_type = (int)i; + for (cf = crypt_formats; cf->name != NULL; ++cf) { + if (strcasecmp(cf->name, format) == 0) { + crypt_format = cf; return (1); } } return (0); } +/* + * Hash the given password with the given salt. If the salt begins with a + * magic string (e.g. "$6$" for sha512), the corresponding format is used; + * otherwise, the currently selected format is used. + */ char * crypt(const char *passwd, const char *salt) { - size_t i; + const struct crypt_format *cf; - crypt_setdefault(); - for (i = 0; i < sizeof(crypt_types) / sizeof(crypt_types[0]) - 1; i++) { - if (crypt_types[i].magic != NULL && strncmp(salt, - crypt_types[i].magic, strlen(crypt_types[i].magic)) == 0) - return (crypt_types[i].func(passwd, salt)); - } - return (crypt_types[crypt_type].func(passwd, salt)); + for (cf = crypt_formats; cf->name != NULL; ++cf) + if (cf->magic != NULL && strstr(salt, cf->magic) == salt) + return (cf->func(passwd, salt)); +#ifdef HAS_DES + if (strlen(salt) == 13 && strspn(salt, DES_SALT_ALPHABET) == 13) + return (crypt_des(passwd, salt)); +#endif + return (crypt_format->func(passwd, salt)); } From owner-svn-src-stable@FreeBSD.ORG Sun May 11 15:03:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3242A684; Sun, 11 May 2014 15:03:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E76929F8; Sun, 11 May 2014 15:03:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4BF3OSp023872; Sun, 11 May 2014 15:03:24 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4BF3OJD023867; Sun, 11 May 2014 15:03:24 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201405111503.s4BF3OJD023867@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 11 May 2014 15:03:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265880 - stable/9/lib/libcrypt X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 May 2014 15:03:25 -0000 Author: des Date: Sun May 11 15:03:24 2014 New Revision: 265880 URL: http://svnweb.freebsd.org/changeset/base/265880 Log: MFH (r233462, r236438): mdoc fixes MFH (r261913): switch default to sha512 MFH (r264964): rewrite so DES still works when not the default MFH (r262945): clean up man page Modified: stable/9/lib/libcrypt/crypt.3 stable/9/lib/libcrypt/crypt.c Directory Properties: stable/9/lib/libcrypt/ (props changed) Modified: stable/9/lib/libcrypt/crypt.3 ============================================================================== --- stable/9/lib/libcrypt/crypt.3 Sun May 11 14:54:17 2014 (r265879) +++ stable/9/lib/libcrypt/crypt.3 Sun May 11 15:03:24 2014 (r265880) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 9, 2011 +.Dd March 9, 2014 .Dt CRYPT 3 .Os .Sh NAME @@ -63,11 +63,16 @@ Currently these include the .Tn MD5 hash, .Tn NT-Hash -(compatible with Microsoft's NT scheme) +.Pq compatible with Microsoft's NT scheme and .Tn Blowfish . -The algorithm used will depend upon the format of the Salt (following -the Modular Crypt Format (MCF)), if +The algorithm used will depend upon the format of the Salt +.Po +following +the Modular Crypt Format +.Pq MCF +.Pc , +if .Tn DES and/or .Tn Blowfish @@ -77,8 +82,10 @@ has been called to change the default. .Pp The first argument to .Nm -is the data to hash (usually a password), in a -.Dv null Ns -terminated +is the data to hash +.Pq usually a password , +in a +.Dv NUL Ns -terminated string. The second is the salt, in one of three forms: .Pp @@ -96,23 +103,19 @@ If it begins with the string then the Modular Crypt Format is used, as outlined below. .It Traditional If neither of the above is true, it assumes the Traditional Format, -using the entire string as the salt (or the first portion). +using the entire string as the salt +.Pq or the first portion . .El .Pp All routines are designed to be time-consuming. -A brief test on a -.Tn Pentium -166/MMX shows the -.Tn DES -crypt to do approximately 2640 crypts -a CPU second and MD5 to do about 62 crypts a CPU second. .Ss DES Extended Format: -.Pp The .Ar key -is divided into groups of 8 characters (the last group is null-padded) -and the low-order 7 bits of each character (56 bits per group) are -used to form the +is divided into groups of 8 characters +.Pq the last group is NUL-padded +and the low-order 7 bits of each character +.Pq 56 bits per group +are used to form the .Tn DES key as follows: the first group of 56 bits becomes the initial @@ -128,7 +131,8 @@ The salt is a 9-character array consisti by 4 bytes of iteration count and 4 bytes of salt. These are encoded as printable characters, 6 bits per character, least significant character first. -The values 0 to 63 are encoded as ``./0-9A-Za-z''. +The values 0 to 63 are encoded as +.Dq ./0-9A-Za-z . This allows 24 bits for both .Fa count and @@ -139,7 +143,8 @@ The introduces disorder in the .Tn DES algorithm in one of 16777216 or 4096 possible ways -(i.e., with 24 or 12 bits: if bit +.Po +i.e., with 24 or 12 bits: if bit .Em i of the .Ar salt @@ -149,7 +154,8 @@ and .Em i+24 are swapped in the .Tn DES -E-box output). +E-box output +.Pc . .Pp The .Tn DES @@ -158,12 +164,13 @@ key is used to encrypt a 64-bit constant iterations of .Tn DES . The value returned is a -.Dv null Ns -terminated -string, 20 or 13 bytes (plus null) in length, consisting of the +.Dv NUL Ns -terminated +string, 20 or 13 bytes +.Pq plus NUL +in length, consisting of the .Ar salt followed by the encoded 64-bit encryption. -.Ss "Modular" crypt: -.Pp +.Ss Modular crypt: If the salt begins with the string .Fa $digit$ then the Modular Crypt Format is used. @@ -172,11 +179,10 @@ The represents which algorithm is used in encryption. Following the token is the actual salt to use in the encryption. -The length of the salt is limited -to 8 characters--because the length of the returned output is also limited -(_PASSWORD_LEN). -The salt must be terminated with the end of the string -(NULL) or a dollar sign. +The maximum length of the salt used depends upon the module. +The salt must be terminated with the end of the string character +.Pq NUL +or a dollar sign. Any characters after the dollar sign are ignored. .Pp Currently supported algorithms are: @@ -198,12 +204,10 @@ SHA-512 .Pp Other crypt formats may be easily added. An example salt would be: -.Bl -tag -offset indent +.Bl -tag -width 6n -offset indent .It Cm "$4$thesalt$rest" .El -.Pp -.Ss "Traditional" crypt: -.Pp +.Ss Traditional crypt: The algorithm used will depend upon whether .Fn crypt_set_format has been called and whether a global default format has been specified. @@ -220,7 +224,7 @@ if it is available, or MD5 if not. .Pp How the salt is used will depend upon the algorithm for the hash. For -best results, specify at least two characters of salt. +best results, specify at least eight characters of salt. .Pp The .Fn crypt_get_format Modified: stable/9/lib/libcrypt/crypt.c ============================================================================== --- stable/9/lib/libcrypt/crypt.c Sun May 11 14:54:17 2014 (r265879) +++ stable/9/lib/libcrypt/crypt.c Sun May 11 15:03:24 2014 (r265880) @@ -1,6 +1,7 @@ -/* - * Copyright (c) 1999 - * Mark Murray. All rights reserved. +/*- + * Copyright (c) 1999 Mark Murray + * Copyright (c) 2014 Dag-Erling Smørgrav + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -28,114 +29,88 @@ __FBSDID("$FreeBSD$"); #include -#include + #include +#include #include + #include "crypt.h" -static const struct { +/* + * List of supported crypt(3) formats. The first element in the list will + * be the default. + */ +static const struct crypt_format { const char *const name; char *(*const func)(const char *, const char *); const char *const magic; -} crypt_types[] = { -#ifdef HAS_DES - { - "des", - crypt_des, - NULL - }, -#endif - { - "md5", - crypt_md5, - "$1$" - }, +} crypt_formats[] = { + /* default format */ + { "sha512", crypt_sha512, "$6$" }, + + /* other supported formats */ + { "md5", crypt_md5, "$1$" }, #ifdef HAS_BLOWFISH - { - "blf", - crypt_blowfish, - "$2" - }, + { "blf", crypt_blowfish, "$2" }, #endif - { - "nth", - crypt_nthash, - "$3$" - }, - { - "sha256", - crypt_sha256, - "$5$" - }, - { - "sha512", - crypt_sha512, - "$6$" - }, - { - NULL, - NULL, - NULL - } -}; - + { "nth", crypt_nthash, "$3$" }, + { "sha256", crypt_sha256, "$5$" }, #ifdef HAS_DES -#define CRYPT_DEFAULT "des" -#else -#define CRYPT_DEFAULT "md5" + { "des", crypt_des, "_" }, #endif -static int crypt_type = -1; + /* sentinel */ + { NULL, NULL, NULL } +}; -static void -crypt_setdefault(void) -{ - size_t i; +static const struct crypt_format *crypt_format = &crypt_formats[0]; - if (crypt_type != -1) - return; - for (i = 0; i < sizeof(crypt_types) / sizeof(crypt_types[0]) - 1; i++) { - if (strcmp(CRYPT_DEFAULT, crypt_types[i].name) == 0) { - crypt_type = (int)i; - return; - } - } - crypt_type = 0; -} +#define DES_SALT_ALPHABET \ + "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" +/* + * Returns the name of the currently selected format. + */ const char * crypt_get_format(void) { - crypt_setdefault(); - return (crypt_types[crypt_type].name); + return (crypt_format->name); } +/* + * Selects the format to use for subsequent crypt(3) invocations. + */ int -crypt_set_format(const char *type) +crypt_set_format(const char *format) { - size_t i; + const struct crypt_format *cf; - crypt_setdefault(); - for (i = 0; i < sizeof(crypt_types) / sizeof(crypt_types[0]) - 1; i++) { - if (strcmp(type, crypt_types[i].name) == 0) { - crypt_type = (int)i; + for (cf = crypt_formats; cf->name != NULL; ++cf) { + if (strcasecmp(cf->name, format) == 0) { + crypt_format = cf; return (1); } } return (0); } +/* + * Hash the given password with the given salt. If the salt begins with a + * magic string (e.g. "$6$" for sha512), the corresponding format is used; + * otherwise, the currently selected format is used. + */ char * crypt(const char *passwd, const char *salt) { - size_t i; + const struct crypt_format *cf; - crypt_setdefault(); - for (i = 0; i < sizeof(crypt_types) / sizeof(crypt_types[0]) - 1; i++) { - if (crypt_types[i].magic != NULL && strncmp(salt, - crypt_types[i].magic, strlen(crypt_types[i].magic)) == 0) - return (crypt_types[i].func(passwd, salt)); - } - return (crypt_types[crypt_type].func(passwd, salt)); + for (cf = crypt_formats; cf->name != NULL; ++cf) + if (cf->magic != NULL && strstr(salt, cf->magic) == salt) + return (cf->func(passwd, salt)); +#ifdef HAS_DES + if (strlen(salt) == 13 && strspn(salt, DES_SALT_ALPHABET) == 13) + return (crypt_des(passwd, salt)); +#endif + return (crypt_format->func(passwd, salt)); } From owner-svn-src-stable@FreeBSD.ORG Sun May 11 16:48:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 57116C5; Sun, 11 May 2014 16:48:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4371A21B0; Sun, 11 May 2014 16:48:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4BGmbUG071014; Sun, 11 May 2014 16:48:37 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4BGmaPx071012; Sun, 11 May 2014 16:48:36 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201405111648.s4BGmaPx071012@svn.freebsd.org> From: Mark Johnston Date: Sun, 11 May 2014 16:48:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265882 - in stable/9/sys/cddl/dev/dtrace: amd64 i386 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 May 2014 16:48:37 -0000 Author: markj Date: Sun May 11 16:48:36 2014 New Revision: 265882 URL: http://svnweb.freebsd.org/changeset/base/265882 Log: MFC r236566 (by zml): Fix DTrace TSC skew calculation: The skew calculation here is exactly backwards. We were able to repro it on a multi-package ESX server running a FreeBSD VM, where the TSCs can be pretty evil. Modified: stable/9/sys/cddl/dev/dtrace/amd64/dtrace_subr.c stable/9/sys/cddl/dev/dtrace/i386/dtrace_subr.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cddl/dev/dtrace/amd64/dtrace_subr.c ============================================================================== --- stable/9/sys/cddl/dev/dtrace/amd64/dtrace_subr.c Sun May 11 16:34:17 2014 (r265881) +++ stable/9/sys/cddl/dev/dtrace/amd64/dtrace_subr.c Sun May 11 16:48:36 2014 (r265882) @@ -445,7 +445,7 @@ dtrace_gethrtime() * (see nsec_scale calculations) taking into account 32-bit shift of * the higher half and finally add. */ - tsc = rdtsc() + tsc_skew[curcpu]; + tsc = rdtsc() - tsc_skew[curcpu]; lo = tsc; hi = tsc >> 32; return (((lo * nsec_scale) >> SCALE_SHIFT) + Modified: stable/9/sys/cddl/dev/dtrace/i386/dtrace_subr.c ============================================================================== --- stable/9/sys/cddl/dev/dtrace/i386/dtrace_subr.c Sun May 11 16:34:17 2014 (r265881) +++ stable/9/sys/cddl/dev/dtrace/i386/dtrace_subr.c Sun May 11 16:48:36 2014 (r265882) @@ -454,7 +454,7 @@ dtrace_gethrtime() * (see nsec_scale calculations) taking into account 32-bit shift of * the higher half and finally add. */ - tsc = rdtsc() + tsc_skew[curcpu]; + tsc = rdtsc() - tsc_skew[curcpu]; lo = tsc; hi = tsc >> 32; return (((lo * nsec_scale) >> SCALE_SHIFT) + From owner-svn-src-stable@FreeBSD.ORG Sun May 11 17:18:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD96E23B; Sun, 11 May 2014 17:18:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C915E2447; Sun, 11 May 2014 17:18:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4BHIAps084925; Sun, 11 May 2014 17:18:10 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4BHI9eT084919; Sun, 11 May 2014 17:18:09 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201405111718.s4BHI9eT084919@svn.freebsd.org> From: "George V. Neville-Neil" Date: Sun, 11 May 2014 17:18:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265884 - in stable/10/sys/dev/sfxge: . common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 May 2014 17:18:11 -0000 Author: gnn Date: Sun May 11 17:18:09 2014 New Revision: 265884 URL: http://svnweb.freebsd.org/changeset/base/265884 Log: MFC: 263302, 264461, 264772 263302: fix mbuf leak if it does not fit in software queue 264461: Commit various fixes for the SolarFlare drivers, in particular this set of patches fixes support for systems with > 32 cores. Details include sfxge: RXQ index (not label) comes from FW in flush done/failed events Change the second argument name of the efx_rxq_flush_done_ev_t and efx_rxq_flush_failed_ev_t prototypes to highlight that RXQ index (not label) comes from FW in flush done and failed events. sfxge: TXQ index (not label) comes from FW in flush done event Change the second argument name of the efx_txq_flush_done_ev_t prototype to highlight that TXQ index (not label) comes from FW in flush done event. sfxge: use TXQ type as label to support more than 32 TXQs There are 3 TXQs in event queue 0 and 1 TXQ (with TCP/UDP checksum offload) in all other event queues. 264772: Check that port is started when MAC filter is set The MAC filter set may be called without softc_lock held in the case of SIOCADDMULTI and SIOCDELMULTI ioctls. The ioctl handler checks IFF_DRV_RUNNING flag which implies port started, but it is not guaranteed to remain. softc_lock shared lock can't be held in the case of these ioctls processing, since it results in failure where kernel complains that non-sleepable lock is held in sleeping thread. Both problems are repeatable on LAG with LACP proto bring up. Submitted by: Andrew Rybchenko Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/common/efx.h stable/10/sys/dev/sfxge/common/efx_ev.c stable/10/sys/dev/sfxge/common/efx_tx.c stable/10/sys/dev/sfxge/sfxge_ev.c stable/10/sys/dev/sfxge/sfxge_port.c stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx.h ============================================================================== --- stable/10/sys/dev/sfxge/common/efx.h Sun May 11 16:49:31 2014 (r265883) +++ stable/10/sys/dev/sfxge/common/efx.h Sun May 11 17:18:09 2014 (r265884) @@ -1360,17 +1360,17 @@ typedef __checkReturn boolean_t typedef __checkReturn boolean_t (*efx_rxq_flush_done_ev_t)( __in_opt void *arg, - __in uint32_t label); + __in uint32_t rxq_index); typedef __checkReturn boolean_t (*efx_rxq_flush_failed_ev_t)( __in_opt void *arg, - __in uint32_t label); + __in uint32_t rxq_index); typedef __checkReturn boolean_t (*efx_txq_flush_done_ev_t)( __in_opt void *arg, - __in uint32_t label); + __in uint32_t txq_index); typedef __checkReturn boolean_t (*efx_software_ev_t)( Modified: stable/10/sys/dev/sfxge/common/efx_ev.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_ev.c Sun May 11 16:49:31 2014 (r265883) +++ stable/10/sys/dev/sfxge/common/efx_ev.c Sun May 11 17:18:09 2014 (r265884) @@ -407,24 +407,24 @@ efx_ev_driver( switch (EFX_QWORD_FIELD(*eqp, FSF_AZ_DRIVER_EV_SUBCODE)) { case FSE_AZ_TX_DESCQ_FLS_DONE_EV: { - uint32_t label; + uint32_t txq_index; EFX_EV_QSTAT_INCR(eep, EV_DRIVER_TX_DESCQ_FLS_DONE); - label = EFX_QWORD_FIELD(*eqp, FSF_AZ_DRIVER_EV_SUBDATA); + txq_index = EFX_QWORD_FIELD(*eqp, FSF_AZ_DRIVER_EV_SUBDATA); - EFSYS_PROBE1(tx_descq_fls_done, uint32_t, label); + EFSYS_PROBE1(tx_descq_fls_done, uint32_t, txq_index); EFSYS_ASSERT(eecp->eec_txq_flush_done != NULL); - should_abort = eecp->eec_txq_flush_done(arg, label); + should_abort = eecp->eec_txq_flush_done(arg, txq_index); break; } case FSE_AZ_RX_DESCQ_FLS_DONE_EV: { - uint32_t label; + uint32_t rxq_index; uint32_t failed; - label = EFX_QWORD_FIELD(*eqp, FSF_AZ_DRIVER_EV_RX_DESCQ_ID); + rxq_index = EFX_QWORD_FIELD(*eqp, FSF_AZ_DRIVER_EV_RX_DESCQ_ID); failed = EFX_QWORD_FIELD(*eqp, FSF_AZ_DRIVER_EV_RX_FLUSH_FAIL); EFSYS_ASSERT(eecp->eec_rxq_flush_done != NULL); @@ -433,15 +433,15 @@ efx_ev_driver( if (failed) { EFX_EV_QSTAT_INCR(eep, EV_DRIVER_RX_DESCQ_FLS_FAILED); - EFSYS_PROBE1(rx_descq_fls_failed, uint32_t, label); + EFSYS_PROBE1(rx_descq_fls_failed, uint32_t, rxq_index); - should_abort = eecp->eec_rxq_flush_failed(arg, label); + should_abort = eecp->eec_rxq_flush_failed(arg, rxq_index); } else { EFX_EV_QSTAT_INCR(eep, EV_DRIVER_RX_DESCQ_FLS_DONE); - EFSYS_PROBE1(rx_descq_fls_done, uint32_t, label); + EFSYS_PROBE1(rx_descq_fls_done, uint32_t, rxq_index); - should_abort = eecp->eec_rxq_flush_done(arg, label); + should_abort = eecp->eec_rxq_flush_done(arg, rxq_index); } break; Modified: stable/10/sys/dev/sfxge/common/efx_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_tx.c Sun May 11 16:49:31 2014 (r265883) +++ stable/10/sys/dev/sfxge/common/efx_tx.c Sun May 11 17:18:09 2014 (r265884) @@ -290,7 +290,7 @@ efx_tx_qcreate( EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_TX); EFX_STATIC_ASSERT(EFX_EV_TX_NLABELS == (1 << FRF_AZ_TX_DESCQ_LABEL_WIDTH)); - EFSYS_ASSERT3U(label, <, EFX_EV_TX_NLABELS); + /* EFSYS_ASSERT3U(label, <, EFX_EV_TX_NLABELS);*/ EFSYS_ASSERT3U(enp->en_tx_qcount + 1, <, encp->enc_txq_limit); if (!ISP2(n) || !(n & EFX_TXQ_NDESCS_MASK)) { Modified: stable/10/sys/dev/sfxge/sfxge_ev.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_ev.c Sun May 11 16:49:31 2014 (r265883) +++ stable/10/sys/dev/sfxge/sfxge_ev.c Sun May 11 17:18:09 2014 (r265884) @@ -150,17 +150,18 @@ sfxge_ev_exception(void *arg, uint32_t c } static boolean_t -sfxge_ev_rxq_flush_done(void *arg, uint32_t label) +sfxge_ev_rxq_flush_done(void *arg, uint32_t rxq_index) { struct sfxge_evq *evq; struct sfxge_softc *sc; struct sfxge_rxq *rxq; unsigned int index; + unsigned int label; uint16_t magic; evq = (struct sfxge_evq *)arg; sc = evq->sc; - rxq = sc->rxq[label]; + rxq = sc->rxq[rxq_index]; KASSERT(rxq != NULL, ("rxq == NULL")); @@ -168,6 +169,7 @@ sfxge_ev_rxq_flush_done(void *arg, uint3 index = rxq->index; evq = sc->evq[index]; + label = rxq_index; KASSERT((label & SFXGE_MAGIC_DMAQ_LABEL_MASK) == label, ("(label & SFXGE_MAGIC_DMAQ_LABEL_MASK) != level")); magic = SFXGE_MAGIC_RX_QFLUSH_DONE | label; @@ -180,17 +182,18 @@ sfxge_ev_rxq_flush_done(void *arg, uint3 } static boolean_t -sfxge_ev_rxq_flush_failed(void *arg, uint32_t label) +sfxge_ev_rxq_flush_failed(void *arg, uint32_t rxq_index) { struct sfxge_evq *evq; struct sfxge_softc *sc; struct sfxge_rxq *rxq; unsigned int index; + unsigned int label; uint16_t magic; evq = (struct sfxge_evq *)arg; sc = evq->sc; - rxq = sc->rxq[label]; + rxq = sc->rxq[rxq_index]; KASSERT(rxq != NULL, ("rxq == NULL")); @@ -198,6 +201,7 @@ sfxge_ev_rxq_flush_failed(void *arg, uin index = rxq->index; evq = sc->evq[index]; + label = rxq_index; KASSERT((label & SFXGE_MAGIC_DMAQ_LABEL_MASK) == label, ("(label & SFXGE_MAGIC_DMAQ_LABEL_MASK) != label")); magic = SFXGE_MAGIC_RX_QFLUSH_FAILED | label; @@ -209,18 +213,27 @@ sfxge_ev_rxq_flush_failed(void *arg, uin return (B_FALSE); } +static struct sfxge_txq * +sfxge_get_txq_by_label(struct sfxge_evq *evq, enum sfxge_txq_type label) +{ + unsigned int index; + + KASSERT((evq->index == 0 && label < SFXGE_TXQ_NTYPES) || + (label == SFXGE_TXQ_IP_TCP_UDP_CKSUM), ("unexpected txq label")); + index = (evq->index == 0) ? label : (evq->index - 1 + SFXGE_TXQ_NTYPES); + return evq->sc->txq[index]; +} + static boolean_t sfxge_ev_tx(void *arg, uint32_t label, uint32_t id) { struct sfxge_evq *evq; - struct sfxge_softc *sc; struct sfxge_txq *txq; unsigned int stop; unsigned int delta; evq = (struct sfxge_evq *)arg; - sc = evq->sc; - txq = sc->txq[label]; + txq = sfxge_get_txq_by_label(evq, label); KASSERT(txq != NULL, ("txq == NULL")); KASSERT(evq->index == txq->evq_index, @@ -251,16 +264,17 @@ done: } static boolean_t -sfxge_ev_txq_flush_done(void *arg, uint32_t label) +sfxge_ev_txq_flush_done(void *arg, uint32_t txq_index) { struct sfxge_evq *evq; struct sfxge_softc *sc; struct sfxge_txq *txq; + unsigned int label; uint16_t magic; evq = (struct sfxge_evq *)arg; sc = evq->sc; - txq = sc->txq[label]; + txq = sc->txq[txq_index]; KASSERT(txq != NULL, ("txq == NULL")); KASSERT(txq->init_state == SFXGE_TXQ_INITIALIZED, @@ -269,6 +283,7 @@ sfxge_ev_txq_flush_done(void *arg, uint3 /* Resend a software event on the correct queue */ evq = sc->evq[txq->evq_index]; + label = txq->type; KASSERT((label & SFXGE_MAGIC_DMAQ_LABEL_MASK) == label, ("(label & SFXGE_MAGIC_DMAQ_LABEL_MASK) != label")); magic = SFXGE_MAGIC_TX_QFLUSH_DONE | label; @@ -325,7 +340,7 @@ sfxge_ev_software(void *arg, uint16_t ma break; } case SFXGE_MAGIC_TX_QFLUSH_DONE: { - struct sfxge_txq *txq = sc->txq[label]; + struct sfxge_txq *txq = sfxge_get_txq_by_label(evq, label); KASSERT(txq != NULL, ("txq == NULL")); KASSERT(evq->index == txq->evq_index, Modified: stable/10/sys/dev/sfxge/sfxge_port.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_port.c Sun May 11 16:49:31 2014 (r265883) +++ stable/10/sys/dev/sfxge/sfxge_port.c Sun May 11 17:18:09 2014 (r265884) @@ -320,10 +320,21 @@ sfxge_mac_filter_set(struct sfxge_softc struct sfxge_port *port = &sc->port; int rc; - KASSERT(port->init_state == SFXGE_PORT_STARTED, ("port not started")); - mtx_lock(&port->lock); - rc = sfxge_mac_filter_set_locked(sc); + /* + * The function may be called without softc_lock held in the + * case of SIOCADDMULTI and SIOCDELMULTI ioctls. ioctl handler + * checks IFF_DRV_RUNNING flag which implies port started, but + * it is not guaranteed to remain. softc_lock shared lock can't + * be held in the case of these ioctls processing, since it + * results in failure where kernel complains that non-sleepable + * lock is held in sleeping thread. Both problems are repeatable + * on LAG with LACP proto bring up. + */ + if (port->init_state == SFXGE_PORT_STARTED) + rc = sfxge_mac_filter_set_locked(sc); + else + rc = 0; mtx_unlock(&port->lock); return rc; } Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Sun May 11 16:49:31 2014 (r265883) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Sun May 11 17:18:09 2014 (r265884) @@ -27,6 +27,21 @@ * SUCH DAMAGE. */ +/* Theory of operation: + * + * Tx queues allocation and mapping + * + * One Tx queue with enabled checksum offload is allocated per Rx channel + * (event queue). Also 2 Tx queues (one without checksum offload and one + * with IP checksum offload only) are allocated and bound to event queue 0. + * sfxge_txq_type is used as Tx queue label. + * + * So, event queue plus label mapping to Tx queue index is: + * if event queue index is 0, TxQ-index = TxQ-label * [0..SFXGE_TXQ_NTYPES) + * else TxQ-index = SFXGE_TXQ_NTYPES + EvQ-index - 1 + * See sfxge_get_txq_by_label() sfxge_ev.c + */ + #include __FBSDID("$FreeBSD$"); @@ -536,6 +551,7 @@ sfxge_tx_packet_add(struct sfxge_txq *tx return (0); fail: + m_freem(m); return (rc); } @@ -1177,7 +1193,7 @@ sfxge_tx_qstart(struct sfxge_softc *sc, } /* Create the common code transmit queue. */ - if ((rc = efx_tx_qcreate(sc->enp, index, index, esmp, + if ((rc = efx_tx_qcreate(sc->enp, index, txq->type, esmp, SFXGE_NDESCS, txq->buf_base_id, flags, evq->common, &txq->common)) != 0) goto fail; From owner-svn-src-stable@FreeBSD.ORG Sun May 11 20:44:59 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 37250F4D; Sun, 11 May 2014 20:44:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22F6D24BF; Sun, 11 May 2014 20:44:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4BKixHh077886; Sun, 11 May 2014 20:44:59 GMT (envelope-from thomas@svn.freebsd.org) Received: (from thomas@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4BKiwL4077884; Sun, 11 May 2014 20:44:58 GMT (envelope-from thomas@svn.freebsd.org) Message-Id: <201405112044.s4BKiwL4077884@svn.freebsd.org> From: Thomas Quinot Date: Sun, 11 May 2014 20:44:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265894 - in stable: 10 10/tools/tools/nanobsd 9 9/tools/tools/nanobsd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 May 2014 20:44:59 -0000 Author: thomas Date: Sun May 11 20:44:58 2014 New Revision: 265894 URL: http://svnweb.freebsd.org/changeset/base/265894 Log: MFC rev. 265260: Add appropriate quoting to allow building with a KERNCONFDIR containing spaces. PR: kern/162736 Modified: stable/10/Makefile.inc1 stable/10/tools/tools/nanobsd/nanobsd.sh Changes in other areas also in this revision: Modified: stable/9/Makefile.inc1 (contents, props changed) stable/9/tools/tools/nanobsd/nanobsd.sh Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Sun May 11 18:49:18 2014 (r265893) +++ stable/10/Makefile.inc1 Sun May 11 20:44:58 2014 (r265894) @@ -1002,7 +1002,7 @@ buildkernel: cd ${KRNLCONFDIR}; \ PATH=${TMPPATH} \ config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \ - -I ${KERNCONFDIR} ${KERNCONFDIR}/${_kernel} + -I '${KERNCONFDIR}' '${KERNCONFDIR}/${_kernel}' .endif .if !defined(NO_CLEAN) && !defined(NO_KERNELCLEAN) @echo @@ -1831,7 +1831,7 @@ DTBOUTPUTPATH= ${KRNLOBJDIR}/${KERNCONF} .if !defined(FDT_DTS_FILE) || empty(FDT_DTS_FILE) .if exists(${KERNCONFDIR}/${KERNCONF}) FDT_DTS_FILE!= awk 'BEGIN {FS="="} /^makeoptions[[:space:]]+FDT_DTS_FILE/ {print $$2}' \ - ${KERNCONFDIR}/${KERNCONF} ; echo + '${KERNCONFDIR}/${KERNCONF}' ; echo .endif .endif Modified: stable/10/tools/tools/nanobsd/nanobsd.sh ============================================================================== --- stable/10/tools/tools/nanobsd/nanobsd.sh Sun May 11 18:49:18 2014 (r265893) +++ stable/10/tools/tools/nanobsd/nanobsd.sh Sun May 11 20:44:58 2014 (r265894) @@ -233,7 +233,7 @@ build_kernel ( ) ( ( if [ -f ${NANO_KERNEL} ] ; then - extra="KERNCONFDIR=$(realpath $(dirname ${NANO_KERNEL}))" + kernconfdir_arg="KERNCONFDIR='$(realpath $(dirname ${NANO_KERNEL}))'" kernconf=$(basename ${NANO_KERNEL}) else kernconf=${NANO_KERNEL} @@ -245,10 +245,10 @@ build_kernel ( ) ( unset TARGET_CPUTYPE # Note: We intentionally build all modules, not only the ones in # NANO_MODULES so the built world can be reused by multiple images. - env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} buildkernel \ - SRCCONF=${SRCCONF} \ - ${extra} __MAKE_CONF=${NANO_MAKE_CONF_BUILD} \ - KERNCONF=${kernconf} + eval "TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} buildkernel \ + SRCCONF='${SRCCONF}' \ + __MAKE_CONF='${NANO_MAKE_CONF_BUILD}' \ + ${kernconfdir_arg} KERNCONF=${kernconf}" ) > ${MAKEOBJDIRPREFIX}/_.bk 2>&1 ) @@ -315,19 +315,19 @@ install_kernel ( ) ( ( if [ -f ${NANO_KERNEL} ] ; then - extra="KERNCONFDIR=$(realpath $(dirname ${NANO_KERNEL}))" + kernconfdir_arg="KERNCONFDIR='$(realpath $(dirname ${NANO_KERNEL}))'" kernconf=$(basename ${NANO_KERNEL}) else kernconf=${NANO_KERNEL} fi cd ${NANO_SRC} - env TARGET_ARCH=${NANO_ARCH} ${NANO_MAKE} installkernel \ - DESTDIR=${NANO_WORLDDIR} \ - SRCCONF=${SRCCONF} \ - ${extra} __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} \ - KERNCONF=${kernconf} \ - MODULES_OVERRIDE="${NANO_MODULES}" + eval "TARGET_ARCH=${NANO_ARCH} ${NANO_MAKE} installkernel \ + DESTDIR='${NANO_WORLDDIR}' \ + SRCCONF='${SRCCONF}' \ + __MAKE_CONF='${NANO_MAKE_CONF_INSTALL}' \ + ${kernconfdir_arg} KERNCONF=${kernconf} \ + MODULES_OVERRIDE='${NANO_MODULES}'" ) > ${NANO_OBJ}/_.ik 2>&1 ) From owner-svn-src-stable@FreeBSD.ORG Sun May 11 20:44:59 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C7BAFF4E; Sun, 11 May 2014 20:44:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A866D24C0; Sun, 11 May 2014 20:44:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4BKixQn077895; Sun, 11 May 2014 20:44:59 GMT (envelope-from thomas@svn.freebsd.org) Received: (from thomas@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4BKixQW077892; Sun, 11 May 2014 20:44:59 GMT (envelope-from thomas@svn.freebsd.org) Message-Id: <201405112044.s4BKixQW077892@svn.freebsd.org> From: Thomas Quinot Date: Sun, 11 May 2014 20:44:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265894 - in stable: 10 10/tools/tools/nanobsd 9 9/tools/tools/nanobsd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 May 2014 20:45:00 -0000 Author: thomas Date: Sun May 11 20:44:58 2014 New Revision: 265894 URL: http://svnweb.freebsd.org/changeset/base/265894 Log: MFC rev. 265260: Add appropriate quoting to allow building with a KERNCONFDIR containing spaces. PR: kern/162736 Modified: stable/9/Makefile.inc1 (contents, props changed) stable/9/tools/tools/nanobsd/nanobsd.sh Changes in other areas also in this revision: Modified: stable/10/Makefile.inc1 stable/10/tools/tools/nanobsd/nanobsd.sh Modified: stable/9/Makefile.inc1 ============================================================================== --- stable/9/Makefile.inc1 Sun May 11 18:49:18 2014 (r265893) +++ stable/9/Makefile.inc1 Sun May 11 20:44:58 2014 (r265894) @@ -926,7 +926,7 @@ buildkernel: cd ${KRNLCONFDIR}; \ PATH=${TMPPATH} \ config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \ - -I ${KERNCONFDIR} ${KERNCONFDIR}/${_kernel} + -I '${KERNCONFDIR}' '${KERNCONFDIR}/${_kernel}' .endif .if !defined(NO_CLEAN) && !defined(NO_KERNELCLEAN) @echo @@ -1657,7 +1657,7 @@ DTBOUTPUTPATH= ${KRNLOBJDIR}/${KERNCONF} .if !defined(FDT_DTS_FILE) || empty(FDT_DTS_FILE) .if exists(${KERNCONFDIR}/${KERNCONF}) FDT_DTS_FILE!= awk 'BEGIN {FS="="} /^makeoptions[[:space:]]+FDT_DTS_FILE/ {print $$2}' \ - ${KERNCONFDIR}/${KERNCONF} ; echo + '${KERNCONFDIR}/${KERNCONF}' ; echo .endif .endif Modified: stable/9/tools/tools/nanobsd/nanobsd.sh ============================================================================== --- stable/9/tools/tools/nanobsd/nanobsd.sh Sun May 11 18:49:18 2014 (r265893) +++ stable/9/tools/tools/nanobsd/nanobsd.sh Sun May 11 20:44:58 2014 (r265894) @@ -201,7 +201,7 @@ build_kernel ( ) ( ( if [ -f ${NANO_KERNEL} ] ; then - kernconfdir=$(realpath $(dirname ${NANO_KERNEL})) + kernconfdir_arg="KERNCONFDIR='$(realpath $(dirname ${NANO_KERNEL}))'" kernconf=$(basename ${NANO_KERNEL}) else kernconf=${NANO_KERNEL} @@ -214,10 +214,9 @@ build_kernel ( ) ( unset TARGET_BIG_ENDIAN # Note: We intentionally build all modules, not only the ones in # NANO_MODULES so the built world can be reused by multiple images. - env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} buildkernel \ - __MAKE_CONF=${NANO_MAKE_CONF_BUILD} \ - ${kernconfdir:+"KERNCONFDIR="}${kernconfdir} \ - KERNCONF=${kernconf} + eval "TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} buildkernel \ + __MAKE_CONF='${NANO_MAKE_CONF_BUILD}' \ + ${kernconfdir_arg} KERNCONF=${kernconf}" ) > ${MAKEOBJDIRPREFIX}/_.bk 2>&1 ) @@ -281,19 +280,18 @@ install_kernel ( ) ( ( if [ -f ${NANO_KERNEL} ] ; then - kernconfdir=$(realpath $(dirname ${NANO_KERNEL})) + kernconfdir_arg="KERNCONFDIR='$(realpath $(dirname ${NANO_KERNEL}))'" kernconf=$(basename ${NANO_KERNEL}) else kernconf=${NANO_KERNEL} fi cd ${NANO_SRC} - env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} installkernel \ - DESTDIR=${NANO_WORLDDIR} \ - __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} \ - ${kernconfdir:+"KERNCONFDIR="}${kernconfdir} \ - KERNCONF=${kernconf} \ - MODULES_OVERRIDE="${NANO_MODULES}" + eval "TARGET_ARCH=${NANO_ARCH} ${NANO_MAKE} installkernel \ + DESTDIR='${NANO_WORLDDIR}' \ + __MAKE_CONF='${NANO_MAKE_CONF_INSTALL}' \ + ${kernconfdir_arg} KERNCONF=${kernconf} \ + MODULES_OVERRIDE='${NANO_MODULES}'" ) > ${NANO_OBJ}/_.ik 2>&1 ) From owner-svn-src-stable@FreeBSD.ORG Mon May 12 04:27:10 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5280B74; Mon, 12 May 2014 04:27:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A805D25A3; Mon, 12 May 2014 04:27:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4C4RAMI093034; Mon, 12 May 2014 04:27:10 GMT (envelope-from truckman@svn.freebsd.org) Received: (from truckman@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4C4RAZf093033; Mon, 12 May 2014 04:27:10 GMT (envelope-from truckman@svn.freebsd.org) Message-Id: <201405120427.s4C4RAZf093033@svn.freebsd.org> From: Don Lewis Date: Mon, 12 May 2014 04:27:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265901 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2014 04:27:10 -0000 Author: truckman Date: Mon May 12 04:27:10 2014 New Revision: 265901 URL: http://svnweb.freebsd.org/changeset/base/265901 Log: MFC r265363 Avoid unsigned integer overflow which can cause rman_reserve_resource_bound() to return incorrect results. Continue the initial search until the first viable region is found. Add a comment to explain the search termination test. PR: kern/188534 Reviewed by: jhb (previous version) Modified: stable/10/sys/kern/subr_rman.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/subr_rman.c ============================================================================== --- stable/10/sys/kern/subr_rman.c Mon May 12 02:56:27 2014 (r265900) +++ stable/10/sys/kern/subr_rman.c Mon May 12 04:27:10 2014 (r265901) @@ -456,7 +456,7 @@ rman_reserve_resource_bound(struct rman mtx_lock(rm->rm_mtx); for (r = TAILQ_FIRST(&rm->rm_list); - r && r->r_end < start; + r && r->r_end < start + count - 1; r = TAILQ_NEXT(r, r_link)) ; @@ -466,6 +466,11 @@ rman_reserve_resource_bound(struct rman } amask = (1ul << RF_ALIGNMENT(flags)) - 1; + if (start + amask < start) { + DPRINTF(("start+amask wrapped around\n")); + goto out; + } + /* If bound is 0, bmask will also be 0 */ bmask = ~(bound - 1); /* @@ -473,11 +478,20 @@ rman_reserve_resource_bound(struct rman */ for (s = r; s; s = TAILQ_NEXT(s, r_link)) { DPRINTF(("considering [%#lx, %#lx]\n", s->r_start, s->r_end)); - if (s->r_start + count - 1 > end) { + /* + * The resource list is sorted, so there is no point in + * searching further once r_start is too large. + */ + if (s->r_start > end - (count - 1)) { DPRINTF(("s->r_start (%#lx) + count - 1> end (%#lx)\n", s->r_start, end)); break; } + if (s->r_start + amask < s->r_start) { + DPRINTF(("s->r_start (%#lx) + amask (%#lx) wrapped\n", + s->r_start, amask)); + break; + } if (s->r_flags & RF_ALLOCATED) { DPRINTF(("region is allocated\n")); continue; From owner-svn-src-stable@FreeBSD.ORG Mon May 12 04:30:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98E11D01; Mon, 12 May 2014 04:30:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DAE72624; Mon, 12 May 2014 04:30:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4C4Usab093734; Mon, 12 May 2014 04:30:54 GMT (envelope-from truckman@svn.freebsd.org) Received: (from truckman@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4C4UseA093733; Mon, 12 May 2014 04:30:54 GMT (envelope-from truckman@svn.freebsd.org) Message-Id: <201405120430.s4C4UseA093733@svn.freebsd.org> From: Don Lewis Date: Mon, 12 May 2014 04:30:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265902 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2014 04:30:54 -0000 Author: truckman Date: Mon May 12 04:30:53 2014 New Revision: 265902 URL: http://svnweb.freebsd.org/changeset/base/265902 Log: MFC r265363 Avoid unsigned integer overflow which can cause rman_reserve_resource_bound() to return incorrect results. Continue the initial search until the first viable region is found. Add a comment to explain the search termination test. PR: kern/188534 Reviewed by: jhb (previous version) Modified: stable/9/sys/kern/subr_rman.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/subr_rman.c ============================================================================== --- stable/9/sys/kern/subr_rman.c Mon May 12 04:27:10 2014 (r265901) +++ stable/9/sys/kern/subr_rman.c Mon May 12 04:30:53 2014 (r265902) @@ -451,7 +451,7 @@ rman_reserve_resource_bound(struct rman mtx_lock(rm->rm_mtx); for (r = TAILQ_FIRST(&rm->rm_list); - r && r->r_end < start; + r && r->r_end < start + count - 1; r = TAILQ_NEXT(r, r_link)) ; @@ -461,6 +461,11 @@ rman_reserve_resource_bound(struct rman } amask = (1ul << RF_ALIGNMENT(flags)) - 1; + if (start + amask < start) { + DPRINTF(("start+amask wrapped around\n")); + goto out; + } + /* If bound is 0, bmask will also be 0 */ bmask = ~(bound - 1); /* @@ -468,11 +473,20 @@ rman_reserve_resource_bound(struct rman */ for (s = r; s; s = TAILQ_NEXT(s, r_link)) { DPRINTF(("considering [%#lx, %#lx]\n", s->r_start, s->r_end)); - if (s->r_start + count - 1 > end) { + /* + * The resource list is sorted, so there is no point in + * searching further once r_start is too large. + */ + if (s->r_start > end - (count - 1)) { DPRINTF(("s->r_start (%#lx) + count - 1> end (%#lx)\n", s->r_start, end)); break; } + if (s->r_start + amask < s->r_start) { + DPRINTF(("s->r_start (%#lx) + amask (%#lx) wrapped\n", + s->r_start, amask)); + break; + } if (s->r_flags & RF_ALLOCATED) { DPRINTF(("region is allocated\n")); continue; From owner-svn-src-stable@FreeBSD.ORG Mon May 12 07:05:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6137EFCE; Mon, 12 May 2014 07:05:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 346752182; Mon, 12 May 2014 07:05:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4C75lOm063433; Mon, 12 May 2014 07:05:47 GMT (envelope-from truckman@svn.freebsd.org) Received: (from truckman@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4C75lXw063432; Mon, 12 May 2014 07:05:47 GMT (envelope-from truckman@svn.freebsd.org) Message-Id: <201405120705.s4C75lXw063432@svn.freebsd.org> From: Don Lewis Date: Mon, 12 May 2014 07:05:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r265905 - stable/8/sys/kern X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2014 07:05:47 -0000 Author: truckman Date: Mon May 12 07:05:46 2014 New Revision: 265905 URL: http://svnweb.freebsd.org/changeset/base/265905 Log: MFC r265363 Avoid unsigned integer overflow which can cause rman_reserve_resource_bound() to return incorrect results. Continue the initial search until the first viable region is found. Add a comment to explain the search termination test. PR: kern/188534 Reviewed by: jhb (previous version) Modified: stable/8/sys/kern/subr_rman.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) Modified: stable/8/sys/kern/subr_rman.c ============================================================================== --- stable/8/sys/kern/subr_rman.c Mon May 12 06:14:14 2014 (r265904) +++ stable/8/sys/kern/subr_rman.c Mon May 12 07:05:46 2014 (r265905) @@ -451,7 +451,7 @@ rman_reserve_resource_bound(struct rman mtx_lock(rm->rm_mtx); for (r = TAILQ_FIRST(&rm->rm_list); - r && r->r_end < start; + r && r->r_end < start + count - 1; r = TAILQ_NEXT(r, r_link)) ; @@ -461,6 +461,11 @@ rman_reserve_resource_bound(struct rman } amask = (1ul << RF_ALIGNMENT(flags)) - 1; + if (start + amask < start) { + DPRINTF(("start+amask wrapped around\n")); + goto out; + } + /* If bound is 0, bmask will also be 0 */ bmask = ~(bound - 1); /* @@ -468,11 +473,20 @@ rman_reserve_resource_bound(struct rman */ for (s = r; s; s = TAILQ_NEXT(s, r_link)) { DPRINTF(("considering [%#lx, %#lx]\n", s->r_start, s->r_end)); - if (s->r_start + count - 1 > end) { + /* + * The resource list is sorted, so there is no point in + * searching further once r_start is too large. + */ + if (s->r_start > end - (count - 1)) { DPRINTF(("s->r_start (%#lx) + count - 1> end (%#lx)\n", s->r_start, end)); break; } + if (s->r_start + amask < s->r_start) { + DPRINTF(("s->r_start (%#lx) + amask (%#lx) wrapped\n", + s->r_start, amask)); + break; + } if (s->r_flags & RF_ALLOCATED) { DPRINTF(("region is allocated\n")); continue; From owner-svn-src-stable@FreeBSD.ORG Mon May 12 10:19:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF85DBA4; Mon, 12 May 2014 10:19:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBBA92277; Mon, 12 May 2014 10:19:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4CAJW7k049825; Mon, 12 May 2014 10:19:32 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4CAJVrQ049820; Mon, 12 May 2014 10:19:31 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201405121019.s4CAJVrQ049820@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 12 May 2014 10:19:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265910 - stable/10/sys/geom/part X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2014 10:19:33 -0000 Author: ae Date: Mon May 12 10:19:31 2014 New Revision: 265910 URL: http://svnweb.freebsd.org/changeset/base/265910 Log: MFC r265318: For schemes that do an automatic partition aligning move this code to separate function. MFC r265331: Prevent an unexpected shrinking on resizing due to alignment for MBR, PC98 and VTOC8 schemes. MFC r265333: Add better error description for case when we are doing resize and scheme-specific method returns EBUSY. MFC r265539: It is safe to allow shrinking, when aligned size is bigger than current. Modified: stable/10/sys/geom/part/g_part.c stable/10/sys/geom/part/g_part_ebr.c stable/10/sys/geom/part/g_part_mbr.c stable/10/sys/geom/part/g_part_pc98.c stable/10/sys/geom/part/g_part_vtoc8.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/part/g_part.c ============================================================================== --- stable/10/sys/geom/part/g_part.c Mon May 12 09:46:48 2014 (r265909) +++ stable/10/sys/geom/part/g_part.c Mon May 12 10:19:31 2014 (r265910) @@ -1314,7 +1314,9 @@ g_part_ctl_resize(struct gctl_req *req, error = G_PART_RESIZE(table, entry, gpp); if (error) { - gctl_error(req, "%d", error); + gctl_error(req, "%d%s", error, error != EBUSY ? "": + " resizing will lead to unexpected shrinking" + " due to alignment"); return (error); } Modified: stable/10/sys/geom/part/g_part_ebr.c ============================================================================== --- stable/10/sys/geom/part/g_part_ebr.c Mon May 12 09:46:48 2014 (r265909) +++ stable/10/sys/geom/part/g_part_ebr.c Mon May 12 10:19:31 2014 (r265910) @@ -217,47 +217,54 @@ ebr_set_chs(struct g_part_table *table, } static int +ebr_align(struct g_part_table *basetable, uint32_t *start, uint32_t *size) +{ + uint32_t sectors; + + sectors = basetable->gpt_sectors; + if (*size < 2 * sectors) + return (EINVAL); + if (*start % sectors) { + *size += (*start % sectors) - sectors; + *start -= (*start % sectors) - sectors; + } + if (*size % sectors) + *size -= (*size % sectors); + if (*size < 2 * sectors) + return (EINVAL); + return (0); +} + + +static int g_part_ebr_add(struct g_part_table *basetable, struct g_part_entry *baseentry, struct g_part_parms *gpp) { - struct g_geom *gp; struct g_provider *pp; struct g_part_ebr_entry *entry; - uint32_t start, size, sectors; + uint32_t start, size; if (gpp->gpp_parms & G_PART_PARM_LABEL) return (EINVAL); - gp = basetable->gpt_gp; - pp = LIST_FIRST(&gp->consumer)->provider; - sectors = basetable->gpt_sectors; - + pp = LIST_FIRST(&basetable->gpt_gp->consumer)->provider; entry = (struct g_part_ebr_entry *)baseentry; - start = gpp->gpp_start; size = gpp->gpp_size; - if (size < 2 * sectors) - return (EINVAL); - if (start % sectors) { - size = size - sectors + (start % sectors); - start = start - (start % sectors) + sectors; - } - if (size % sectors) - size = size - (size % sectors); - if (size < 2 * sectors) + if (ebr_align(basetable, &start, &size) != 0) return (EINVAL); - if (baseentry->gpe_deleted) bzero(&entry->ent, sizeof(entry->ent)); KASSERT(baseentry->gpe_start <= start, ("%s", __func__)); KASSERT(baseentry->gpe_end >= start + size - 1, ("%s", __func__)); - baseentry->gpe_index = (start / sectors) + 1; - baseentry->gpe_offset = (off_t)(start + sectors) * pp->sectorsize; + baseentry->gpe_index = (start / basetable->gpt_sectors) + 1; + baseentry->gpe_offset = + (off_t)(start + basetable->gpt_sectors) * pp->sectorsize; baseentry->gpe_start = start; baseentry->gpe_end = start + size - 1; - entry->ent.dp_start = sectors; - entry->ent.dp_size = size - sectors; + entry->ent.dp_start = basetable->gpt_sectors; + entry->ent.dp_size = size - basetable->gpt_sectors; ebr_set_chs(basetable, entry->ent.dp_start, &entry->ent.dp_scyl, &entry->ent.dp_shd, &entry->ent.dp_ssect); ebr_set_chs(basetable, baseentry->gpe_end, &entry->ent.dp_ecyl, Modified: stable/10/sys/geom/part/g_part_mbr.c ============================================================================== --- stable/10/sys/geom/part/g_part_mbr.c Mon May 12 09:46:48 2014 (r265909) +++ stable/10/sys/geom/part/g_part_mbr.c Mon May 12 10:19:31 2014 (r265910) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "g_part_if.h" @@ -195,34 +196,39 @@ mbr_set_chs(struct g_part_table *table, } static int +mbr_align(struct g_part_table *basetable, uint32_t *start, uint32_t *size) +{ + uint32_t sectors; + + sectors = basetable->gpt_sectors; + if (*size < sectors) + return (EINVAL); + if (start != NULL && (*start % sectors)) { + *size += (*start % sectors) - sectors; + *start -= (*start % sectors) - sectors; + } + if (*size % sectors) + *size -= (*size % sectors); + if (*size < sectors) + return (EINVAL); + return (0); +} + +static int g_part_mbr_add(struct g_part_table *basetable, struct g_part_entry *baseentry, struct g_part_parms *gpp) { struct g_part_mbr_entry *entry; - struct g_part_mbr_table *table; - uint32_t start, size, sectors; + uint32_t start, size; if (gpp->gpp_parms & G_PART_PARM_LABEL) return (EINVAL); - sectors = basetable->gpt_sectors; - entry = (struct g_part_mbr_entry *)baseentry; - table = (struct g_part_mbr_table *)basetable; - start = gpp->gpp_start; size = gpp->gpp_size; - if (size < sectors) + if (mbr_align(basetable, &start, &size) != 0) return (EINVAL); - if (start % sectors) { - size = size - sectors + (start % sectors); - start = start - (start % sectors) + sectors; - } - if (size % sectors) - size = size - (size % sectors); - if (size < sectors) - return (EINVAL); - if (baseentry->gpe_deleted) bzero(&entry->ent, sizeof(entry->ent)); @@ -336,18 +342,17 @@ g_part_mbr_resize(struct g_part_table *b struct g_part_entry *baseentry, struct g_part_parms *gpp) { struct g_part_mbr_entry *entry; - uint32_t size, sectors; + struct g_provider *pp; + uint32_t size; - sectors = basetable->gpt_sectors; size = gpp->gpp_size; - - if (size < sectors) + if (mbr_align(basetable, NULL, &size) != 0) return (EINVAL); - if (size % sectors) - size = size - (size % sectors); - if (size < sectors) - return (EINVAL); - + /* XXX: prevent unexpected shrinking. */ + pp = baseentry->gpe_pp; + if ((g_debugflags & 0x10) == 0 && size < gpp->gpp_size && + pp->mediasize / pp->sectorsize > size) + return (EBUSY); entry = (struct g_part_mbr_entry *)baseentry; baseentry->gpe_end = baseentry->gpe_start + size - 1; entry->ent.dp_size = size; Modified: stable/10/sys/geom/part/g_part_pc98.c ============================================================================== --- stable/10/sys/geom/part/g_part_pc98.c Mon May 12 09:46:48 2014 (r265909) +++ stable/10/sys/geom/part/g_part_pc98.c Mon May 12 10:19:31 2014 (r265910) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "g_part_if.h" @@ -175,32 +176,37 @@ pc98_set_chs(struct g_part_table *table, } static int +pc98_align(struct g_part_table *basetable, uint32_t *start, uint32_t *size) +{ + uint32_t cyl; + + cyl = basetable->gpt_heads * basetable->gpt_sectors; + if (*size < cyl) + return (EINVAL); + if (start != NULL && (*start % cyl)) { + *size += (*start % cyl) - cyl; + *start -= (*start % cyl) - cyl; + } + if (*size % cyl) + *size -= (*size % cyl); + if (*size < cyl) + return (EINVAL); + return (0); +} + +static int g_part_pc98_add(struct g_part_table *basetable, struct g_part_entry *baseentry, struct g_part_parms *gpp) { struct g_part_pc98_entry *entry; - struct g_part_pc98_table *table; - uint32_t cyl, start, size; + uint32_t start, size; int error; - cyl = basetable->gpt_heads * basetable->gpt_sectors; - entry = (struct g_part_pc98_entry *)baseentry; - table = (struct g_part_pc98_table *)basetable; - start = gpp->gpp_start; size = gpp->gpp_size; - if (size < cyl) + if (pc98_align(basetable, &start, &size) != 0) return (EINVAL); - if (start % cyl) { - size = size - cyl + (start % cyl); - start = start - (start % cyl) + cyl; - } - if (size % cyl) - size = size - (size % cyl); - if (size < cyl) - return (EINVAL); - if (baseentry->gpe_deleted) bzero(&entry->ent, sizeof(entry->ent)); else @@ -343,18 +349,17 @@ g_part_pc98_resize(struct g_part_table * struct g_part_entry *baseentry, struct g_part_parms *gpp) { struct g_part_pc98_entry *entry; - uint32_t size, cyl; + struct g_provider *pp; + uint32_t size; - cyl = basetable->gpt_heads * basetable->gpt_sectors; size = gpp->gpp_size; - - if (size < cyl) + if (pc98_align(basetable, NULL, &size) != 0) return (EINVAL); - if (size % cyl) - size = size - (size % cyl); - if (size < cyl) - return (EINVAL); - + /* XXX: prevent unexpected shrinking. */ + pp = baseentry->gpe_pp; + if ((g_debugflags & 0x10) == 0 && size < gpp->gpp_size && + pp->mediasize / pp->sectorsize > size) + return (EBUSY); entry = (struct g_part_pc98_entry *)baseentry; baseentry->gpe_end = baseentry->gpe_start + size - 1; pc98_set_chs(basetable, baseentry->gpe_end, &entry->ent.dp_ecyl, Modified: stable/10/sys/geom/part/g_part_vtoc8.c ============================================================================== --- stable/10/sys/geom/part/g_part_vtoc8.c Mon May 12 09:46:48 2014 (r265909) +++ stable/10/sys/geom/part/g_part_vtoc8.c Mon May 12 10:19:31 2014 (r265910) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "g_part_if.h" @@ -143,6 +144,23 @@ vtoc8_parse_type(const char *type, uint1 } static int +vtoc8_align(struct g_part_vtoc8_table *table, uint64_t *start, uint64_t *size) +{ + + if (*size < table->secpercyl) + return (EINVAL); + if (start != NULL && (*start % table->secpercyl)) { + *size += (*start % table->secpercyl) - table->secpercyl; + *start -= (*start % table->secpercyl) - table->secpercyl; + } + if (*size % table->secpercyl) + *size -= (*size % table->secpercyl); + if (*size < table->secpercyl) + return (EINVAL); + return (0); +} + +static int g_part_vtoc8_add(struct g_part_table *basetable, struct g_part_entry *entry, struct g_part_parms *gpp) { @@ -160,16 +178,9 @@ g_part_vtoc8_add(struct g_part_table *ba table = (struct g_part_vtoc8_table *)basetable; index = entry->gpe_index - 1; - start = gpp->gpp_start; size = gpp->gpp_size; - if (start % table->secpercyl) { - size = size - table->secpercyl + (start % table->secpercyl); - start = start - (start % table->secpercyl) + table->secpercyl; - } - if (size % table->secpercyl) - size = size - (size % table->secpercyl); - if (size < table->secpercyl) + if (vtoc8_align(table, &start, &size) != 0) return (EINVAL); KASSERT(entry->gpe_start <= start, (__func__)); @@ -310,15 +321,18 @@ g_part_vtoc8_resize(struct g_part_table struct g_part_entry *entry, struct g_part_parms *gpp) { struct g_part_vtoc8_table *table; + struct g_provider *pp; uint64_t size; table = (struct g_part_vtoc8_table *)basetable; size = gpp->gpp_size; - if (size % table->secpercyl) - size = size - (size % table->secpercyl); - if (size < table->secpercyl) + if (vtoc8_align(table, NULL, &size) != 0) return (EINVAL); - + /* XXX: prevent unexpected shrinking. */ + pp = entry->gpe_pp; + if ((g_debugflags & 0x10) == 0 && size < gpp->gpp_size && + pp->mediasize / pp->sectorsize > size) + return (EBUSY); entry->gpe_end = entry->gpe_start + size - 1; be32enc(&table->vtoc.map[entry->gpe_index - 1].nblks, size); From owner-svn-src-stable@FreeBSD.ORG Mon May 12 11:14:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC19F589; Mon, 12 May 2014 11:14:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8D232957; Mon, 12 May 2014 11:14:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4CBE83N076878; Mon, 12 May 2014 11:14:08 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4CBE7D6076871; Mon, 12 May 2014 11:14:07 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201405121114.s4CBE7D6076871@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 12 May 2014 11:14:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265911 - stable/9/sys/geom/part X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2014 11:14:09 -0000 Author: ae Date: Mon May 12 11:14:07 2014 New Revision: 265911 URL: http://svnweb.freebsd.org/changeset/base/265911 Log: MFC r265318: For schemes that do an automatic partition aligning move this code to separate function. MFC r265331: Prevent an unexpected shrinking on resizing due to alignment for MBR, PC98 and VTOC8 schemes. MFC r265333: Add better error description for case when we are doing resize and scheme-specific method returns EBUSY. MFC r265539: It is safe to allow shrinking, when aligned size is bigger than current. Modified: stable/9/sys/geom/part/g_part.c stable/9/sys/geom/part/g_part_ebr.c stable/9/sys/geom/part/g_part_mbr.c stable/9/sys/geom/part/g_part_pc98.c stable/9/sys/geom/part/g_part_vtoc8.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/part/g_part.c ============================================================================== --- stable/9/sys/geom/part/g_part.c Mon May 12 10:19:31 2014 (r265910) +++ stable/9/sys/geom/part/g_part.c Mon May 12 11:14:07 2014 (r265911) @@ -1310,7 +1310,9 @@ g_part_ctl_resize(struct gctl_req *req, error = G_PART_RESIZE(table, entry, gpp); if (error) { - gctl_error(req, "%d", error); + gctl_error(req, "%d%s", error, error != EBUSY ? "": + " resizing will lead to unexpected shrinking" + " due to alignment"); return (error); } Modified: stable/9/sys/geom/part/g_part_ebr.c ============================================================================== --- stable/9/sys/geom/part/g_part_ebr.c Mon May 12 10:19:31 2014 (r265910) +++ stable/9/sys/geom/part/g_part_ebr.c Mon May 12 11:14:07 2014 (r265911) @@ -217,47 +217,54 @@ ebr_set_chs(struct g_part_table *table, } static int +ebr_align(struct g_part_table *basetable, uint32_t *start, uint32_t *size) +{ + uint32_t sectors; + + sectors = basetable->gpt_sectors; + if (*size < 2 * sectors) + return (EINVAL); + if (*start % sectors) { + *size += (*start % sectors) - sectors; + *start -= (*start % sectors) - sectors; + } + if (*size % sectors) + *size -= (*size % sectors); + if (*size < 2 * sectors) + return (EINVAL); + return (0); +} + + +static int g_part_ebr_add(struct g_part_table *basetable, struct g_part_entry *baseentry, struct g_part_parms *gpp) { - struct g_geom *gp; struct g_provider *pp; struct g_part_ebr_entry *entry; - uint32_t start, size, sectors; + uint32_t start, size; if (gpp->gpp_parms & G_PART_PARM_LABEL) return (EINVAL); - gp = basetable->gpt_gp; - pp = LIST_FIRST(&gp->consumer)->provider; - sectors = basetable->gpt_sectors; - + pp = LIST_FIRST(&basetable->gpt_gp->consumer)->provider; entry = (struct g_part_ebr_entry *)baseentry; - start = gpp->gpp_start; size = gpp->gpp_size; - if (size < 2 * sectors) - return (EINVAL); - if (start % sectors) { - size = size - sectors + (start % sectors); - start = start - (start % sectors) + sectors; - } - if (size % sectors) - size = size - (size % sectors); - if (size < 2 * sectors) + if (ebr_align(basetable, &start, &size) != 0) return (EINVAL); - if (baseentry->gpe_deleted) bzero(&entry->ent, sizeof(entry->ent)); KASSERT(baseentry->gpe_start <= start, ("%s", __func__)); KASSERT(baseentry->gpe_end >= start + size - 1, ("%s", __func__)); - baseentry->gpe_index = (start / sectors) + 1; - baseentry->gpe_offset = (off_t)(start + sectors) * pp->sectorsize; + baseentry->gpe_index = (start / basetable->gpt_sectors) + 1; + baseentry->gpe_offset = + (off_t)(start + basetable->gpt_sectors) * pp->sectorsize; baseentry->gpe_start = start; baseentry->gpe_end = start + size - 1; - entry->ent.dp_start = sectors; - entry->ent.dp_size = size - sectors; + entry->ent.dp_start = basetable->gpt_sectors; + entry->ent.dp_size = size - basetable->gpt_sectors; ebr_set_chs(basetable, entry->ent.dp_start, &entry->ent.dp_scyl, &entry->ent.dp_shd, &entry->ent.dp_ssect); ebr_set_chs(basetable, baseentry->gpe_end, &entry->ent.dp_ecyl, Modified: stable/9/sys/geom/part/g_part_mbr.c ============================================================================== --- stable/9/sys/geom/part/g_part_mbr.c Mon May 12 10:19:31 2014 (r265910) +++ stable/9/sys/geom/part/g_part_mbr.c Mon May 12 11:14:07 2014 (r265911) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "g_part_if.h" @@ -194,34 +195,39 @@ mbr_set_chs(struct g_part_table *table, } static int +mbr_align(struct g_part_table *basetable, uint32_t *start, uint32_t *size) +{ + uint32_t sectors; + + sectors = basetable->gpt_sectors; + if (*size < sectors) + return (EINVAL); + if (start != NULL && (*start % sectors)) { + *size += (*start % sectors) - sectors; + *start -= (*start % sectors) - sectors; + } + if (*size % sectors) + *size -= (*size % sectors); + if (*size < sectors) + return (EINVAL); + return (0); +} + +static int g_part_mbr_add(struct g_part_table *basetable, struct g_part_entry *baseentry, struct g_part_parms *gpp) { struct g_part_mbr_entry *entry; - struct g_part_mbr_table *table; - uint32_t start, size, sectors; + uint32_t start, size; if (gpp->gpp_parms & G_PART_PARM_LABEL) return (EINVAL); - sectors = basetable->gpt_sectors; - entry = (struct g_part_mbr_entry *)baseentry; - table = (struct g_part_mbr_table *)basetable; - start = gpp->gpp_start; size = gpp->gpp_size; - if (size < sectors) + if (mbr_align(basetable, &start, &size) != 0) return (EINVAL); - if (start % sectors) { - size = size - sectors + (start % sectors); - start = start - (start % sectors) + sectors; - } - if (size % sectors) - size = size - (size % sectors); - if (size < sectors) - return (EINVAL); - if (baseentry->gpe_deleted) bzero(&entry->ent, sizeof(entry->ent)); @@ -335,18 +341,17 @@ g_part_mbr_resize(struct g_part_table *b struct g_part_entry *baseentry, struct g_part_parms *gpp) { struct g_part_mbr_entry *entry; - uint32_t size, sectors; + struct g_provider *pp; + uint32_t size; - sectors = basetable->gpt_sectors; size = gpp->gpp_size; - - if (size < sectors) + if (mbr_align(basetable, NULL, &size) != 0) return (EINVAL); - if (size % sectors) - size = size - (size % sectors); - if (size < sectors) - return (EINVAL); - + /* XXX: prevent unexpected shrinking. */ + pp = baseentry->gpe_pp; + if ((g_debugflags & 0x10) == 0 && size < gpp->gpp_size && + pp->mediasize / pp->sectorsize > size) + return (EBUSY); entry = (struct g_part_mbr_entry *)baseentry; baseentry->gpe_end = baseentry->gpe_start + size - 1; entry->ent.dp_size = size; Modified: stable/9/sys/geom/part/g_part_pc98.c ============================================================================== --- stable/9/sys/geom/part/g_part_pc98.c Mon May 12 10:19:31 2014 (r265910) +++ stable/9/sys/geom/part/g_part_pc98.c Mon May 12 11:14:07 2014 (r265911) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "g_part_if.h" @@ -175,32 +176,37 @@ pc98_set_chs(struct g_part_table *table, } static int +pc98_align(struct g_part_table *basetable, uint32_t *start, uint32_t *size) +{ + uint32_t cyl; + + cyl = basetable->gpt_heads * basetable->gpt_sectors; + if (*size < cyl) + return (EINVAL); + if (start != NULL && (*start % cyl)) { + *size += (*start % cyl) - cyl; + *start -= (*start % cyl) - cyl; + } + if (*size % cyl) + *size -= (*size % cyl); + if (*size < cyl) + return (EINVAL); + return (0); +} + +static int g_part_pc98_add(struct g_part_table *basetable, struct g_part_entry *baseentry, struct g_part_parms *gpp) { struct g_part_pc98_entry *entry; - struct g_part_pc98_table *table; - uint32_t cyl, start, size; + uint32_t start, size; int error; - cyl = basetable->gpt_heads * basetable->gpt_sectors; - entry = (struct g_part_pc98_entry *)baseentry; - table = (struct g_part_pc98_table *)basetable; - start = gpp->gpp_start; size = gpp->gpp_size; - if (size < cyl) + if (pc98_align(basetable, &start, &size) != 0) return (EINVAL); - if (start % cyl) { - size = size - cyl + (start % cyl); - start = start - (start % cyl) + cyl; - } - if (size % cyl) - size = size - (size % cyl); - if (size < cyl) - return (EINVAL); - if (baseentry->gpe_deleted) bzero(&entry->ent, sizeof(entry->ent)); else @@ -343,18 +349,17 @@ g_part_pc98_resize(struct g_part_table * struct g_part_entry *baseentry, struct g_part_parms *gpp) { struct g_part_pc98_entry *entry; - uint32_t size, cyl; + struct g_provider *pp; + uint32_t size; - cyl = basetable->gpt_heads * basetable->gpt_sectors; size = gpp->gpp_size; - - if (size < cyl) + if (pc98_align(basetable, NULL, &size) != 0) return (EINVAL); - if (size % cyl) - size = size - (size % cyl); - if (size < cyl) - return (EINVAL); - + /* XXX: prevent unexpected shrinking. */ + pp = baseentry->gpe_pp; + if ((g_debugflags & 0x10) == 0 && size < gpp->gpp_size && + pp->mediasize / pp->sectorsize > size) + return (EBUSY); entry = (struct g_part_pc98_entry *)baseentry; baseentry->gpe_end = baseentry->gpe_start + size - 1; pc98_set_chs(basetable, baseentry->gpe_end, &entry->ent.dp_ecyl, Modified: stable/9/sys/geom/part/g_part_vtoc8.c ============================================================================== --- stable/9/sys/geom/part/g_part_vtoc8.c Mon May 12 10:19:31 2014 (r265910) +++ stable/9/sys/geom/part/g_part_vtoc8.c Mon May 12 11:14:07 2014 (r265911) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "g_part_if.h" @@ -143,6 +144,23 @@ vtoc8_parse_type(const char *type, uint1 } static int +vtoc8_align(struct g_part_vtoc8_table *table, uint64_t *start, uint64_t *size) +{ + + if (*size < table->secpercyl) + return (EINVAL); + if (start != NULL && (*start % table->secpercyl)) { + *size += (*start % table->secpercyl) - table->secpercyl; + *start -= (*start % table->secpercyl) - table->secpercyl; + } + if (*size % table->secpercyl) + *size -= (*size % table->secpercyl); + if (*size < table->secpercyl) + return (EINVAL); + return (0); +} + +static int g_part_vtoc8_add(struct g_part_table *basetable, struct g_part_entry *entry, struct g_part_parms *gpp) { @@ -160,16 +178,9 @@ g_part_vtoc8_add(struct g_part_table *ba table = (struct g_part_vtoc8_table *)basetable; index = entry->gpe_index - 1; - start = gpp->gpp_start; size = gpp->gpp_size; - if (start % table->secpercyl) { - size = size - table->secpercyl + (start % table->secpercyl); - start = start - (start % table->secpercyl) + table->secpercyl; - } - if (size % table->secpercyl) - size = size - (size % table->secpercyl); - if (size < table->secpercyl) + if (vtoc8_align(table, &start, &size) != 0) return (EINVAL); KASSERT(entry->gpe_start <= start, (__func__)); @@ -310,15 +321,18 @@ g_part_vtoc8_resize(struct g_part_table struct g_part_entry *entry, struct g_part_parms *gpp) { struct g_part_vtoc8_table *table; + struct g_provider *pp; uint64_t size; table = (struct g_part_vtoc8_table *)basetable; size = gpp->gpp_size; - if (size % table->secpercyl) - size = size - (size % table->secpercyl); - if (size < table->secpercyl) + if (vtoc8_align(table, NULL, &size) != 0) return (EINVAL); - + /* XXX: prevent unexpected shrinking. */ + pp = entry->gpe_pp; + if ((g_debugflags & 0x10) == 0 && size < gpp->gpp_size && + pp->mediasize / pp->sectorsize > size) + return (EBUSY); entry->gpe_end = entry->gpe_start + size - 1; be32enc(&table->vtoc.map[entry->gpe_index - 1].nblks, size); From owner-svn-src-stable@FreeBSD.ORG Mon May 12 12:04:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE192A48; Mon, 12 May 2014 12:04:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BEC472E29; Mon, 12 May 2014 12:04:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4CC4kRs099332; Mon, 12 May 2014 12:04:46 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4CC4j39099322; Mon, 12 May 2014 12:04:45 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201405121204.s4CC4j39099322@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 12 May 2014 12:04:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265912 - stable/10/sys/geom/part X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2014 12:04:47 -0000 Author: ae Date: Mon May 12 12:04:44 2014 New Revision: 265912 URL: http://svnweb.freebsd.org/changeset/base/265912 Log: MFC r256690: Add an automatic resize support to the GEOM_PART class. When parent provider has been resized, the scheme specific G_PART_RESIZE method does an update of scheme's metadata. But all changes are not saved to disk, until `gpart commit` will be called. MFC r265336: Add an advice what to do when partition was automatically resized. Modified: stable/10/sys/geom/part/g_part.c stable/10/sys/geom/part/g_part_apm.c stable/10/sys/geom/part/g_part_bsd.c stable/10/sys/geom/part/g_part_ebr.c stable/10/sys/geom/part/g_part_gpt.c stable/10/sys/geom/part/g_part_mbr.c stable/10/sys/geom/part/g_part_pc98.c stable/10/sys/geom/part/g_part_vtoc8.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/part/g_part.c ============================================================================== --- stable/10/sys/geom/part/g_part.c Mon May 12 11:14:07 2014 (r265911) +++ stable/10/sys/geom/part/g_part.c Mon May 12 12:04:44 2014 (r265912) @@ -133,6 +133,7 @@ static g_dumpconf_t g_part_dumpconf; static g_orphan_t g_part_orphan; static g_spoiled_t g_part_spoiled; static g_start_t g_part_start; +static g_resize_t g_part_resize; static struct g_class g_part_class = { .name = "PART", @@ -149,6 +150,7 @@ static struct g_class g_part_class = { .orphan = g_part_orphan, .spoiled = g_part_spoiled, .start = g_part_start, + .resize = g_part_resize }; DECLARE_GEOM_CLASS(g_part_class, g_part); @@ -2049,6 +2051,32 @@ g_part_dumpconf(struct sbuf *sb, const c } static void +g_part_resize(struct g_consumer *cp) +{ + struct g_part_table *table; + + G_PART_TRACE((G_T_TOPOLOGY, "%s(%s)", __func__, cp->provider->name)); + g_topology_assert(); + + table = cp->geom->softc; + if (table->gpt_opened == 0) { + if (g_access(cp, 1, 1, 1) != 0) + return; + table->gpt_opened = 1; + } + if (G_PART_RESIZE(table, NULL, NULL) == 0) + printf("GEOM_PART: %s was automatically resized.\n" + " Use `gpart commit %s` to save changes or " + "`gpart undo %s` to revert them.\n", cp->geom->name, + cp->geom->name, cp->geom->name); + if (g_part_check_integrity(table, cp) != 0) { + g_access(cp, -1, -1, -1); + table->gpt_opened = 0; + g_part_wither(table->gpt_gp, ENXIO); + } +} + +static void g_part_orphan(struct g_consumer *cp) { struct g_provider *pp; Modified: stable/10/sys/geom/part/g_part_apm.c ============================================================================== --- stable/10/sys/geom/part/g_part_apm.c Mon May 12 11:14:07 2014 (r265911) +++ stable/10/sys/geom/part/g_part_apm.c Mon May 12 12:04:44 2014 (r265912) @@ -359,6 +359,14 @@ g_part_apm_resize(struct g_part_table *b struct g_part_entry *baseentry, struct g_part_parms *gpp) { struct g_part_apm_entry *entry; + struct g_provider *pp; + + if (baseentry == NULL) { + pp = LIST_FIRST(&basetable->gpt_gp->consumer)->provider; + basetable->gpt_last = MIN(pp->mediasize / pp->sectorsize, + UINT32_MAX) - 1; + return (0); + } entry = (struct g_part_apm_entry *)baseentry; baseentry->gpe_end = baseentry->gpe_start + gpp->gpp_size - 1; Modified: stable/10/sys/geom/part/g_part_bsd.c ============================================================================== --- stable/10/sys/geom/part/g_part_bsd.c Mon May 12 11:14:07 2014 (r265911) +++ stable/10/sys/geom/part/g_part_bsd.c Mon May 12 12:04:44 2014 (r265912) @@ -304,12 +304,40 @@ g_part_bsd_modify(struct g_part_table *b return (0); } +static void +bsd_set_rawsize(struct g_part_table *basetable, struct g_provider *pp) +{ + struct g_part_bsd_table *table; + struct g_part_bsd_entry *entry; + struct g_part_entry *baseentry; + uint32_t msize; + + table = (struct g_part_bsd_table *)basetable; + msize = MIN(pp->mediasize / pp->sectorsize, UINT32_MAX); + le32enc(table->bbarea + pp->sectorsize + 60, msize); /* d_secperunit */ + basetable->gpt_last = msize - 1; + LIST_FOREACH(baseentry, &basetable->gpt_entry, gpe_entry) { + if (baseentry->gpe_index != RAW_PART + 1) + continue; + baseentry->gpe_end = basetable->gpt_last; + entry = (struct g_part_bsd_entry *)baseentry; + entry->part.p_size = msize; + return; + } +} + static int g_part_bsd_resize(struct g_part_table *basetable, struct g_part_entry *baseentry, struct g_part_parms *gpp) { struct g_part_bsd_entry *entry; + struct g_provider *pp; + if (baseentry == NULL) { + pp = LIST_FIRST(&basetable->gpt_gp->consumer)->provider; + bsd_set_rawsize(basetable, pp); + return (0); + } entry = (struct g_part_bsd_entry *)baseentry; baseentry->gpe_end = baseentry->gpe_start + gpp->gpp_size - 1; entry->part.p_size = gpp->gpp_size; Modified: stable/10/sys/geom/part/g_part_ebr.c ============================================================================== --- stable/10/sys/geom/part/g_part_ebr.c Mon May 12 11:14:07 2014 (r265911) +++ stable/10/sys/geom/part/g_part_ebr.c Mon May 12 12:04:44 2014 (r265912) @@ -93,6 +93,8 @@ static int g_part_ebr_setunset(struct g_ static const char *g_part_ebr_type(struct g_part_table *, struct g_part_entry *, char *, size_t); static int g_part_ebr_write(struct g_part_table *, struct g_consumer *); +static int g_part_ebr_resize(struct g_part_table *, struct g_part_entry *, + struct g_part_parms *); static kobj_method_t g_part_ebr_methods[] = { KOBJMETHOD(g_part_add, g_part_ebr_add), @@ -108,6 +110,7 @@ static kobj_method_t g_part_ebr_methods[ KOBJMETHOD(g_part_precheck, g_part_ebr_precheck), KOBJMETHOD(g_part_probe, g_part_ebr_probe), KOBJMETHOD(g_part_read, g_part_ebr_read), + KOBJMETHOD(g_part_resize, g_part_ebr_resize), KOBJMETHOD(g_part_setunset, g_part_ebr_setunset), KOBJMETHOD(g_part_type, g_part_ebr_type), KOBJMETHOD(g_part_write, g_part_ebr_write), @@ -384,6 +387,20 @@ g_part_ebr_modify(struct g_part_table *b return (0); } +static int +g_part_ebr_resize(struct g_part_table *basetable, + struct g_part_entry *baseentry, struct g_part_parms *gpp) +{ + struct g_provider *pp; + + if (baseentry != NULL) + return (EOPNOTSUPP); + pp = LIST_FIRST(&basetable->gpt_gp->consumer)->provider; + basetable->gpt_last = MIN(pp->mediasize / pp->sectorsize, + UINT32_MAX) - 1; + return (0); +} + static const char * g_part_ebr_name(struct g_part_table *table, struct g_part_entry *entry, char *buf, size_t bufsz) Modified: stable/10/sys/geom/part/g_part_gpt.c ============================================================================== --- stable/10/sys/geom/part/g_part_gpt.c Mon May 12 11:14:07 2014 (r265911) +++ stable/10/sys/geom/part/g_part_gpt.c Mon May 12 12:04:44 2014 (r265912) @@ -733,8 +733,11 @@ g_part_gpt_resize(struct g_part_table *b struct g_part_entry *baseentry, struct g_part_parms *gpp) { struct g_part_gpt_entry *entry; - entry = (struct g_part_gpt_entry *)baseentry; + if (baseentry == NULL) + return (EOPNOTSUPP); + + entry = (struct g_part_gpt_entry *)baseentry; baseentry->gpe_end = baseentry->gpe_start + gpp->gpp_size - 1; entry->ent.ent_lba_end = baseentry->gpe_end; Modified: stable/10/sys/geom/part/g_part_mbr.c ============================================================================== --- stable/10/sys/geom/part/g_part_mbr.c Mon May 12 11:14:07 2014 (r265911) +++ stable/10/sys/geom/part/g_part_mbr.c Mon May 12 12:04:44 2014 (r265912) @@ -345,6 +345,12 @@ g_part_mbr_resize(struct g_part_table *b struct g_provider *pp; uint32_t size; + if (baseentry == NULL) { + pp = LIST_FIRST(&basetable->gpt_gp->consumer)->provider; + basetable->gpt_last = MIN(pp->mediasize / pp->sectorsize, + UINT32_MAX) - 1; + return (0); + } size = gpp->gpp_size; if (mbr_align(basetable, NULL, &size) != 0) return (EINVAL); Modified: stable/10/sys/geom/part/g_part_pc98.c ============================================================================== --- stable/10/sys/geom/part/g_part_pc98.c Mon May 12 11:14:07 2014 (r265911) +++ stable/10/sys/geom/part/g_part_pc98.c Mon May 12 12:04:44 2014 (r265912) @@ -352,6 +352,12 @@ g_part_pc98_resize(struct g_part_table * struct g_provider *pp; uint32_t size; + if (baseentry == NULL) { + pp = LIST_FIRST(&basetable->gpt_gp->consumer)->provider; + basetable->gpt_last = MIN(pp->mediasize / SECSIZE, + UINT32_MAX) - 1; + return (0); + } size = gpp->gpp_size; if (pc98_align(basetable, NULL, &size) != 0) return (EINVAL); Modified: stable/10/sys/geom/part/g_part_vtoc8.c ============================================================================== --- stable/10/sys/geom/part/g_part_vtoc8.c Mon May 12 11:14:07 2014 (r265911) +++ stable/10/sys/geom/part/g_part_vtoc8.c Mon May 12 12:04:44 2014 (r265912) @@ -317,6 +317,42 @@ g_part_vtoc8_modify(struct g_part_table } static int +vtoc8_set_rawsize(struct g_part_table *basetable, struct g_provider *pp) +{ + struct g_part_vtoc8_table *table; + struct g_part_entry *baseentry; + off_t msize; + uint32_t acyls, ncyls, pcyls; + + table = (struct g_part_vtoc8_table *)basetable; + msize = MIN(pp->mediasize / pp->sectorsize, UINT32_MAX); + pcyls = msize / table->secpercyl; + if (pcyls > UINT16_MAX) + return (ERANGE); + acyls = be16dec(&table->vtoc.altcyls); + ncyls = pcyls - acyls; + msize = ncyls * table->secpercyl; + basetable->gpt_last = msize - 1; + + bzero(table->vtoc.ascii, sizeof(table->vtoc.ascii)); + sprintf(table->vtoc.ascii, "FreeBSD%lldM cyl %u alt %u hd %u sec %u", + (long long)(msize / 2048), ncyls, acyls, basetable->gpt_heads, + basetable->gpt_sectors); + be16enc(&table->vtoc.physcyls, pcyls); + be16enc(&table->vtoc.ncyls, ncyls); + be32enc(&table->vtoc.map[VTOC_RAW_PART].nblks, msize); + if (be32dec(&table->vtoc.sanity) == VTOC_SANITY) + be16enc(&table->vtoc.part[VTOC_RAW_PART].tag, VTOC_TAG_BACKUP); + LIST_FOREACH(baseentry, &basetable->gpt_entry, gpe_entry) { + if (baseentry->gpe_index == VTOC_RAW_PART + 1) { + baseentry->gpe_end = basetable->gpt_last; + return (0); + } + } + return (ENXIO); +} + +static int g_part_vtoc8_resize(struct g_part_table *basetable, struct g_part_entry *entry, struct g_part_parms *gpp) { @@ -324,6 +360,10 @@ g_part_vtoc8_resize(struct g_part_table struct g_provider *pp; uint64_t size; + if (entry == NULL) { + pp = LIST_FIRST(&basetable->gpt_gp->consumer)->provider; + return (vtoc8_set_rawsize(basetable, pp)); + } table = (struct g_part_vtoc8_table *)basetable; size = gpp->gpp_size; if (vtoc8_align(table, NULL, &size) != 0) From owner-svn-src-stable@FreeBSD.ORG Mon May 12 15:52:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F324CE64; Mon, 12 May 2014 15:52:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD72623E6; Mon, 12 May 2014 15:52:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4CFqoCd009189; Mon, 12 May 2014 15:52:50 GMT (envelope-from davidcs@svn.freebsd.org) Received: (from davidcs@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4CFqnbX009177; Mon, 12 May 2014 15:52:49 GMT (envelope-from davidcs@svn.freebsd.org) Message-Id: <201405121552.s4CFqnbX009177@svn.freebsd.org> From: David C Somayajulu Date: Mon, 12 May 2014 15:52:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265917 - in stable/10: share/man/man4 sys/dev/bce sys/dev/bxe sys/modules/bce X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2014 15:52:51 -0000 Author: davidcs Date: Mon May 12 15:52:49 2014 New Revision: 265917 URL: http://svnweb.freebsd.org/changeset/base/265917 Log: MFC r265703 Modify Copyright information and other strings to reflect Qlogic Corporation's purchase of Broadcom's NetXtreme business. Added clean option to Makefile Submitted by:David C Somayajulu (davidcs@freebsd.org) QLogic Corporation Modified: stable/10/share/man/man4/bce.4 stable/10/share/man/man4/bxe.4 stable/10/sys/dev/bce/if_bce.c stable/10/sys/dev/bce/if_bcefw.h stable/10/sys/dev/bce/if_bcereg.h stable/10/sys/dev/bxe/bxe.c stable/10/sys/modules/bce/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/bce.4 ============================================================================== --- stable/10/share/man/man4/bce.4 Mon May 12 14:46:32 2014 (r265916) +++ stable/10/share/man/man4/bce.4 Mon May 12 15:52:49 2014 (r265917) @@ -1,5 +1,4 @@ -.\" Copyright (c) 2006 Broadcom Corporation -.\" David Christensen . All rights reserved. +.\" Copyright (c) 2006-2014 QLogic Corporation .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -10,9 +9,6 @@ .\" 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. -.\" 3. Neither the name of Broadcom Corporation nor the name of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written consent. .\" .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' .\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -33,7 +29,7 @@ .Os .Sh NAME .Nm bce -.Nd "Broadcom NetXtreme II (BCM5706/5708/5709/5716) PCI/PCIe Gigabit Ethernet adapter driver" +.Nd "QLogic NetXtreme II (BCM5706/5708/5709/5716) PCI/PCIe Gigabit Ethernet adapter driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -52,7 +48,7 @@ if_bce_load="YES" .Sh DESCRIPTION The .Nm -driver supports Broadcom's NetXtreme II product family, including the +driver supports QLogic's NetXtreme II product family, including the BCM5706, BCM5708, BCM5709 and BCM5716 Ethernet controllers. .Pp The NetXtreme II product family is composed of various Converged NIC (or CNIC) @@ -141,25 +137,25 @@ For more information on configuring this .Sh HARDWARE The .Nm -driver provides support for various NICs based on the Broadcom NetXtreme II +driver provides support for various NICs based on the QLogic NetXtreme II family of Gigabit Ethernet controllers, including the following: .Pp .Bl -bullet -compact .It -Broadcom NetXtreme II BCM5706 1000Base-SX +QLogic NetXtreme II BCM5706 1000Base-SX .It -Broadcom NetXtreme II BCM5706 1000Base-T +QLogic NetXtreme II BCM5706 1000Base-T .It -Broadcom NetXtreme II BCM5708 1000Base-SX +QLogic NetXtreme II BCM5708 1000Base-SX .It -Broadcom NetXtreme II BCM5708 1000Base-T +QLogic NetXtreme II BCM5708 1000Base-T .It -Broadcom NetXtreme II BCM5709 1000Base-SX +QLogic NetXtreme II BCM5709 1000Base-SX .It -Broadcom NetXtreme II BCM5709 1000Base-T +QLogic NetXtreme II BCM5709 1000Base-T .It -Broadcom NetXtreme II BCM5716 1000Base-T +QLogic NetXtreme II BCM5716 1000Base-T .It Dell PowerEdge 1950 integrated BCM5708 NIC .It @@ -411,9 +407,11 @@ A controller hardware failure has occurr If the problem continues replace the controller. .El .Sh SUPPORT -For general information and support, -go to the Broadcom NIC Open Source Developer Resource Site: -.Pa http://www.broadcom.com/support/ethernet_nic/open_source.php . +For support questions please contact your QLogic approved reseller or +QLogic Technical Support at +.Pa http://support.qlogic.com , +or by E-mail at +.Aq support@qlogic.com . .Sh SEE ALSO .Xr altq 4 , .Xr arp 4 , Modified: stable/10/share/man/man4/bxe.4 ============================================================================== --- stable/10/share/man/man4/bxe.4 Mon May 12 14:46:32 2014 (r265916) +++ stable/10/share/man/man4/bxe.4 Mon May 12 15:52:49 2014 (r265917) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013 Broadcom Corporation. All rights reserved. +.\" Copyright (c) 2014 Qlogic Corporation. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -9,9 +9,6 @@ .\" 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. -.\" 3. Neither the name of Broadcom Corporation nor the name of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written consent. .\" .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' .\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -32,7 +29,7 @@ .Os .Sh NAME .Nm bxe -.Nd Broadcom NetXtreme II Ethernet 10Gb PCIe adapter driver +.Nd QLogic NetXtreme II Ethernet 10Gb PCIe adapter driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -50,7 +47,7 @@ if_bxe_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for PCIe 10Gb Ethernet adapters based on the Broadcom +driver provides support for PCIe 10Gb Ethernet adapters based on the QLogic NetXtreme II family of 10Gb chips. The driver supports Jumbo Frames, VLAN tagging, checksum offload (IPv4, TCP, UDP, IPv6-TCP, IPv6-UDP), MSI-X @@ -59,32 +56,32 @@ Receive Side Scaling (RSS). .Sh HARDWARE The .Nm -driver provides support for various NICs based on the Broadcom NetXtreme II +driver provides support for various NICs based on the QLogic NetXtreme II family of 10Gb Ethernet controller chips, including the following: .Pp .Bl -bullet -compact .It -Broadcom NetXtreme II BCM57710 10Gb +QLogic NetXtreme II BCM57710 10Gb .It -Broadcom NetXtreme II BCM57711 10Gb +QLogic NetXtreme II BCM57711 10Gb .It -Broadcom NetXtreme II BCM57711E 10Gb +QLogic NetXtreme II BCM57711E 10Gb .It -Broadcom NetXtreme II BCM57712 10Gb +QLogic NetXtreme II BCM57712 10Gb .It -Broadcom NetXtreme II BCM57712-MF 10Gb +QLogic NetXtreme II BCM57712-MF 10Gb .It -Broadcom NetXtreme II BCM57800 10Gb +QLogic NetXtreme II BCM57800 10Gb .It -Broadcom NetXtreme II BCM57800-MF 10Gb +QLogic NetXtreme II BCM57800-MF 10Gb .It -Broadcom NetXtreme II BCM57810 10Gb +QLogic NetXtreme II BCM57810 10Gb .It -Broadcom NetXtreme II BCM57810-MF 10Gb +QLogic NetXtreme II BCM57810-MF 10Gb .It -Broadcom NetXtreme II BCM57840 10Gb / 20Gb +QLogic NetXtreme II BCM57840 10Gb / 20Gb .It -Broadcom NetXtreme II BCM57840-MF 10Gb +QLogic NetXtreme II BCM57840-MF 10Gb .El .Sh CONFIGURATION There a number of configuration parameters that can be set to tweak the @@ -318,6 +315,12 @@ When finished turn the logging back off: .Bd -literal -offset indent # sysctl dev.bxe.0.debug=0 .Ed +.Sh SUPPORT +For support questions please contact your QLogic approved reseller or +QLogic Technical Support at +.Pa http://support.qlogic.com , +or by E-mail at +.Aq support@qlogic.com . .Sh SEE ALSO .Xr netstat 1 , .Xr altq 4 , Modified: stable/10/sys/dev/bce/if_bce.c ============================================================================== --- stable/10/sys/dev/bce/if_bce.c Mon May 12 14:46:32 2014 (r265916) +++ stable/10/sys/dev/bce/if_bce.c Mon May 12 15:52:49 2014 (r265917) @@ -1,6 +1,5 @@ /*- - * Copyright (c) 2006-2010 Broadcom Corporation - * David Christensen . All rights reserved. + * Copyright (c) 2006-2014 QLogic Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -11,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -106,13 +102,13 @@ static const struct bce_type bce_devs[] { BRCM_VENDORID, BRCM_DEVICEID_BCM5706, HP_VENDORID, 0x1709, "HP NC371i Multifunction Gigabit Server Adapter" }, { BRCM_VENDORID, BRCM_DEVICEID_BCM5706, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM5706 1000Base-T" }, + "QLogic NetXtreme II BCM5706 1000Base-T" }, /* BCM5706S controllers and OEM boards. */ { BRCM_VENDORID, BRCM_DEVICEID_BCM5706S, HP_VENDORID, 0x3102, "HP NC370F Multifunction Gigabit Server Adapter" }, { BRCM_VENDORID, BRCM_DEVICEID_BCM5706S, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM5706 1000Base-SX" }, + "QLogic NetXtreme II BCM5706 1000Base-SX" }, /* BCM5708C controllers and OEM boards. */ { BRCM_VENDORID, BRCM_DEVICEID_BCM5708, HP_VENDORID, 0x7037, @@ -122,7 +118,7 @@ static const struct bce_type bce_devs[] { BRCM_VENDORID, BRCM_DEVICEID_BCM5708, HP_VENDORID, 0x7045, "HP NC374m PCIe Multifunction Adapter" }, { BRCM_VENDORID, BRCM_DEVICEID_BCM5708, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM5708 1000Base-T" }, + "QLogic NetXtreme II BCM5708 1000Base-T" }, /* BCM5708S controllers and OEM boards. */ { BRCM_VENDORID, BRCM_DEVICEID_BCM5708S, HP_VENDORID, 0x1706, @@ -132,7 +128,7 @@ static const struct bce_type bce_devs[] { BRCM_VENDORID, BRCM_DEVICEID_BCM5708S, HP_VENDORID, 0x703d, "HP NC373F PCIe Multifunc Giga Server Adapter" }, { BRCM_VENDORID, BRCM_DEVICEID_BCM5708S, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM5708 1000Base-SX" }, + "QLogic NetXtreme II BCM5708 1000Base-SX" }, /* BCM5709C controllers and OEM boards. */ { BRCM_VENDORID, BRCM_DEVICEID_BCM5709, HP_VENDORID, 0x7055, @@ -140,7 +136,7 @@ static const struct bce_type bce_devs[] { BRCM_VENDORID, BRCM_DEVICEID_BCM5709, HP_VENDORID, 0x7059, "HP NC382T PCIe DP Multifunction Gigabit Server Adapter" }, { BRCM_VENDORID, BRCM_DEVICEID_BCM5709, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM5709 1000Base-T" }, + "QLogic NetXtreme II BCM5709 1000Base-T" }, /* BCM5709S controllers and OEM boards. */ { BRCM_VENDORID, BRCM_DEVICEID_BCM5709S, HP_VENDORID, 0x171d, @@ -148,11 +144,11 @@ static const struct bce_type bce_devs[] { BRCM_VENDORID, BRCM_DEVICEID_BCM5709S, HP_VENDORID, 0x7056, "HP NC382i DP Multifunction Gigabit Server Adapter" }, { BRCM_VENDORID, BRCM_DEVICEID_BCM5709S, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM5709 1000Base-SX" }, + "QLogic NetXtreme II BCM5709 1000Base-SX" }, /* BCM5716 controllers and OEM boards. */ { BRCM_VENDORID, BRCM_DEVICEID_BCM5716, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM5716 1000Base-T" }, + "QLogic NetXtreme II BCM5716 1000Base-T" }, { 0, 0, 0, 0, NULL } }; Modified: stable/10/sys/dev/bce/if_bcefw.h ============================================================================== --- stable/10/sys/dev/bce/if_bcefw.h Mon May 12 14:46:32 2014 (r265916) +++ stable/10/sys/dev/bce/if_bcefw.h Mon May 12 15:52:49 2014 (r265917) @@ -1,6 +1,5 @@ /*- - * Copyright (c) 2006-2011 Broadcom Corporation - * David Christensen . All rights reserved. + * Copyright (c) 2006-2014 QLogic Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -10,9 +9,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -31,7 +27,7 @@ /* * This file contains firmware data derived from proprietary unpublished - * source code, Copyright (c) 2004-2011 Broadcom Corporation. + * source code, Copyright (c) 2004-2014 QLogic Corporation. * * Permission is hereby granted for the distribution of this firmware data * in hexadecimal or equivalent format, provided this copyright notice also Modified: stable/10/sys/dev/bce/if_bcereg.h ============================================================================== --- stable/10/sys/dev/bce/if_bcereg.h Mon May 12 14:46:32 2014 (r265916) +++ stable/10/sys/dev/bce/if_bcereg.h Mon May 12 15:52:49 2014 (r265917) @@ -1,6 +1,5 @@ /*- - * Copyright (c) 2006-2010 Broadcom Corporation - * David Christensen . All rights reserved. + * Copyright (c) 2006-2014 QLogic Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -10,9 +9,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/10/sys/dev/bxe/bxe.c ============================================================================== --- stable/10/sys/dev/bxe/bxe.c Mon May 12 14:46:32 2014 (r265916) +++ stable/10/sys/dev/bxe/bxe.c Mon May 12 15:52:49 2014 (r265917) @@ -98,126 +98,126 @@ static struct bxe_device_type bxe_devs[] BRCM_VENDORID, CHIP_NUM_57710, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57710 10GbE" + "QLogic NetXtreme II BCM57710 10GbE" }, { BRCM_VENDORID, CHIP_NUM_57711, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57711 10GbE" + "QLogic NetXtreme II BCM57711 10GbE" }, { BRCM_VENDORID, CHIP_NUM_57711E, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57711E 10GbE" + "QLogic NetXtreme II BCM57711E 10GbE" }, { BRCM_VENDORID, CHIP_NUM_57712, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57712 10GbE" + "QLogic NetXtreme II BCM57712 10GbE" }, { BRCM_VENDORID, CHIP_NUM_57712_MF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57712 MF 10GbE" + "QLogic NetXtreme II BCM57712 MF 10GbE" }, #if 0 { BRCM_VENDORID, CHIP_NUM_57712_VF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57712 VF 10GbE" + "QLogic NetXtreme II BCM57712 VF 10GbE" }, #endif { BRCM_VENDORID, CHIP_NUM_57800, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57800 10GbE" + "QLogic NetXtreme II BCM57800 10GbE" }, { BRCM_VENDORID, CHIP_NUM_57800_MF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57800 MF 10GbE" + "QLogic NetXtreme II BCM57800 MF 10GbE" }, #if 0 { BRCM_VENDORID, CHIP_NUM_57800_VF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57800 VF 10GbE" + "QLogic NetXtreme II BCM57800 VF 10GbE" }, #endif { BRCM_VENDORID, CHIP_NUM_57810, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57810 10GbE" + "QLogic NetXtreme II BCM57810 10GbE" }, { BRCM_VENDORID, CHIP_NUM_57810_MF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57810 MF 10GbE" + "QLogic NetXtreme II BCM57810 MF 10GbE" }, #if 0 { BRCM_VENDORID, CHIP_NUM_57810_VF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57810 VF 10GbE" + "QLogic NetXtreme II BCM57810 VF 10GbE" }, #endif { BRCM_VENDORID, CHIP_NUM_57811, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57811 10GbE" + "QLogic NetXtreme II BCM57811 10GbE" }, { BRCM_VENDORID, CHIP_NUM_57811_MF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57811 MF 10GbE" + "QLogic NetXtreme II BCM57811 MF 10GbE" }, #if 0 { BRCM_VENDORID, CHIP_NUM_57811_VF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57811 VF 10GbE" + "QLogic NetXtreme II BCM57811 VF 10GbE" }, #endif { BRCM_VENDORID, CHIP_NUM_57840_4_10, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57840 4x10GbE" + "QLogic NetXtreme II BCM57840 4x10GbE" }, #if 0 { BRCM_VENDORID, CHIP_NUM_57840_2_20, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57840 2x20GbE" + "QLogic NetXtreme II BCM57840 2x20GbE" }, #endif { BRCM_VENDORID, CHIP_NUM_57840_MF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57840 MF 10GbE" + "QLogic NetXtreme II BCM57840 MF 10GbE" }, #if 0 { BRCM_VENDORID, CHIP_NUM_57840_VF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57840 VF 10GbE" + "QLogic NetXtreme II BCM57840 VF 10GbE" }, #endif { Modified: stable/10/sys/modules/bce/Makefile ============================================================================== --- stable/10/sys/modules/bce/Makefile Mon May 12 14:46:32 2014 (r265916) +++ stable/10/sys/modules/bce/Makefile Mon May 12 15:52:49 2014 (r265917) @@ -5,4 +5,9 @@ SRCS= opt_bce.h if_bce.c miibus_if.h mii #CFLAGS += -DBCE_DEBUG=0 +clean: + rm -f opt_bdg.h device_if.h bus_if.h pci_if.h export_syms + rm -f *.o *.kld *.ko + rm -f @ machine x86 miibus_if.h miidevs.h opt_bce.h + .include From owner-svn-src-stable@FreeBSD.ORG Mon May 12 15:56:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DBFF8FD6; Mon, 12 May 2014 15:56:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C66EA240D; Mon, 12 May 2014 15:56:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4CFuCsI010325; Mon, 12 May 2014 15:56:12 GMT (envelope-from davidcs@svn.freebsd.org) Received: (from davidcs@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4CFuBNA010314; Mon, 12 May 2014 15:56:11 GMT (envelope-from davidcs@svn.freebsd.org) Message-Id: <201405121556.s4CFuBNA010314@svn.freebsd.org> From: David C Somayajulu Date: Mon, 12 May 2014 15:56:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265918 - in stable/9: share/man/man4 sys/dev/bce sys/dev/bxe sys/modules/bce X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2014 15:56:13 -0000 Author: davidcs Date: Mon May 12 15:56:11 2014 New Revision: 265918 URL: http://svnweb.freebsd.org/changeset/base/265918 Log: MFC r265703 Modify Copyright information and other strings to reflect Qlogic Corporation's purchase of Broadcom's NetXtreme business. Added clean option to Makefile Submitted by:David C Somayajulu (davidcs@freebsd.org) QLogic Corporation Modified: stable/9/share/man/man4/bce.4 stable/9/share/man/man4/bxe.4 stable/9/sys/dev/bce/if_bce.c stable/9/sys/dev/bce/if_bcefw.h stable/9/sys/dev/bce/if_bcereg.h stable/9/sys/dev/bxe/bxe.c stable/9/sys/modules/bce/Makefile Directory Properties: stable/9/ (props changed) stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man4/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/share/man/man4/bce.4 ============================================================================== --- stable/9/share/man/man4/bce.4 Mon May 12 15:52:49 2014 (r265917) +++ stable/9/share/man/man4/bce.4 Mon May 12 15:56:11 2014 (r265918) @@ -1,5 +1,4 @@ -.\" Copyright (c) 2006 Broadcom Corporation -.\" David Christensen . All rights reserved. +.\" Copyright (c) 2006-2014 QLogic Corporation .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -10,9 +9,6 @@ .\" 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. -.\" 3. Neither the name of Broadcom Corporation nor the name of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written consent. .\" .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' .\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -33,7 +29,7 @@ .Os .Sh NAME .Nm bce -.Nd "Broadcom NetXtreme II (BCM5706/5708/5709/5716) PCI/PCIe Gigabit Ethernet adapter driver" +.Nd "QLogic NetXtreme II (BCM5706/5708/5709/5716) PCI/PCIe Gigabit Ethernet adapter driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -52,7 +48,7 @@ if_bce_load="YES" .Sh DESCRIPTION The .Nm -driver supports Broadcom's NetXtreme II product family, including the +driver supports QLogic's NetXtreme II product family, including the BCM5706, BCM5708, BCM5709 and BCM5716 Ethernet controllers. .Pp The NetXtreme II product family is composed of various Converged NIC (or CNIC) @@ -141,25 +137,25 @@ For more information on configuring this .Sh HARDWARE The .Nm -driver provides support for various NICs based on the Broadcom NetXtreme II +driver provides support for various NICs based on the QLogic NetXtreme II family of Gigabit Ethernet controllers, including the following: .Pp .Bl -bullet -compact .It -Broadcom NetXtreme II BCM5706 1000Base-SX +QLogic NetXtreme II BCM5706 1000Base-SX .It -Broadcom NetXtreme II BCM5706 1000Base-T +QLogic NetXtreme II BCM5706 1000Base-T .It -Broadcom NetXtreme II BCM5708 1000Base-SX +QLogic NetXtreme II BCM5708 1000Base-SX .It -Broadcom NetXtreme II BCM5708 1000Base-T +QLogic NetXtreme II BCM5708 1000Base-T .It -Broadcom NetXtreme II BCM5709 1000Base-SX +QLogic NetXtreme II BCM5709 1000Base-SX .It -Broadcom NetXtreme II BCM5709 1000Base-T +QLogic NetXtreme II BCM5709 1000Base-T .It -Broadcom NetXtreme II BCM5716 1000Base-T +QLogic NetXtreme II BCM5716 1000Base-T .It Dell PowerEdge 1950 integrated BCM5708 NIC .It @@ -411,9 +407,11 @@ A controller hardware failure has occurr If the problem continues replace the controller. .El .Sh SUPPORT -For general information and support, -go to the Broadcom NIC Open Source Developer Resource Site: -.Pa http://www.broadcom.com/support/ethernet_nic/open_source.php . +For support questions please contact your QLogic approved reseller or +QLogic Technical Support at +.Pa http://support.qlogic.com , +or by E-mail at +.Aq support@qlogic.com . .Sh SEE ALSO .Xr altq 4 , .Xr arp 4 , Modified: stable/9/share/man/man4/bxe.4 ============================================================================== --- stable/9/share/man/man4/bxe.4 Mon May 12 15:52:49 2014 (r265917) +++ stable/9/share/man/man4/bxe.4 Mon May 12 15:56:11 2014 (r265918) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013 Broadcom Corporation. All rights reserved. +.\" Copyright (c) 2014 Qlogic Corporation. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -9,9 +9,6 @@ .\" 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. -.\" 3. Neither the name of Broadcom Corporation nor the name of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written consent. .\" .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' .\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -32,7 +29,7 @@ .Os .Sh NAME .Nm bxe -.Nd Broadcom NetXtreme II Ethernet 10Gb PCIe adapter driver +.Nd QLogic NetXtreme II Ethernet 10Gb PCIe adapter driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -50,7 +47,7 @@ if_bxe_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for PCIe 10Gb Ethernet adapters based on the Broadcom +driver provides support for PCIe 10Gb Ethernet adapters based on the QLogic NetXtreme II family of 10Gb chips. The driver supports Jumbo Frames, VLAN tagging, checksum offload (IPv4, TCP, UDP, IPv6-TCP, IPv6-UDP), MSI-X @@ -59,32 +56,32 @@ Receive Side Scaling (RSS). .Sh HARDWARE The .Nm -driver provides support for various NICs based on the Broadcom NetXtreme II +driver provides support for various NICs based on the QLogic NetXtreme II family of 10Gb Ethernet controller chips, including the following: .Pp .Bl -bullet -compact .It -Broadcom NetXtreme II BCM57710 10Gb +QLogic NetXtreme II BCM57710 10Gb .It -Broadcom NetXtreme II BCM57711 10Gb +QLogic NetXtreme II BCM57711 10Gb .It -Broadcom NetXtreme II BCM57711E 10Gb +QLogic NetXtreme II BCM57711E 10Gb .It -Broadcom NetXtreme II BCM57712 10Gb +QLogic NetXtreme II BCM57712 10Gb .It -Broadcom NetXtreme II BCM57712-MF 10Gb +QLogic NetXtreme II BCM57712-MF 10Gb .It -Broadcom NetXtreme II BCM57800 10Gb +QLogic NetXtreme II BCM57800 10Gb .It -Broadcom NetXtreme II BCM57800-MF 10Gb +QLogic NetXtreme II BCM57800-MF 10Gb .It -Broadcom NetXtreme II BCM57810 10Gb +QLogic NetXtreme II BCM57810 10Gb .It -Broadcom NetXtreme II BCM57810-MF 10Gb +QLogic NetXtreme II BCM57810-MF 10Gb .It -Broadcom NetXtreme II BCM57840 10Gb / 20Gb +QLogic NetXtreme II BCM57840 10Gb / 20Gb .It -Broadcom NetXtreme II BCM57840-MF 10Gb +QLogic NetXtreme II BCM57840-MF 10Gb .El .Sh CONFIGURATION There a number of configuration parameters that can be set to tweak the @@ -318,6 +315,12 @@ When finished turn the logging back off: .Bd -literal -offset indent # sysctl dev.bxe.0.debug=0 .Ed +.Sh SUPPORT +For support questions please contact your QLogic approved reseller or +QLogic Technical Support at +.Pa http://support.qlogic.com , +or by E-mail at +.Aq support@qlogic.com . .Sh SEE ALSO .Xr netstat 1 , .Xr altq 4 , Modified: stable/9/sys/dev/bce/if_bce.c ============================================================================== --- stable/9/sys/dev/bce/if_bce.c Mon May 12 15:52:49 2014 (r265917) +++ stable/9/sys/dev/bce/if_bce.c Mon May 12 15:56:11 2014 (r265918) @@ -1,6 +1,5 @@ /*- - * Copyright (c) 2006-2010 Broadcom Corporation - * David Christensen . All rights reserved. + * Copyright (c) 2006-2014 QLogic Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -11,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -106,13 +102,13 @@ static const struct bce_type bce_devs[] { BRCM_VENDORID, BRCM_DEVICEID_BCM5706, HP_VENDORID, 0x1709, "HP NC371i Multifunction Gigabit Server Adapter" }, { BRCM_VENDORID, BRCM_DEVICEID_BCM5706, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM5706 1000Base-T" }, + "QLogic NetXtreme II BCM5706 1000Base-T" }, /* BCM5706S controllers and OEM boards. */ { BRCM_VENDORID, BRCM_DEVICEID_BCM5706S, HP_VENDORID, 0x3102, "HP NC370F Multifunction Gigabit Server Adapter" }, { BRCM_VENDORID, BRCM_DEVICEID_BCM5706S, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM5706 1000Base-SX" }, + "QLogic NetXtreme II BCM5706 1000Base-SX" }, /* BCM5708C controllers and OEM boards. */ { BRCM_VENDORID, BRCM_DEVICEID_BCM5708, HP_VENDORID, 0x7037, @@ -122,7 +118,7 @@ static const struct bce_type bce_devs[] { BRCM_VENDORID, BRCM_DEVICEID_BCM5708, HP_VENDORID, 0x7045, "HP NC374m PCIe Multifunction Adapter" }, { BRCM_VENDORID, BRCM_DEVICEID_BCM5708, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM5708 1000Base-T" }, + "QLogic NetXtreme II BCM5708 1000Base-T" }, /* BCM5708S controllers and OEM boards. */ { BRCM_VENDORID, BRCM_DEVICEID_BCM5708S, HP_VENDORID, 0x1706, @@ -132,7 +128,7 @@ static const struct bce_type bce_devs[] { BRCM_VENDORID, BRCM_DEVICEID_BCM5708S, HP_VENDORID, 0x703d, "HP NC373F PCIe Multifunc Giga Server Adapter" }, { BRCM_VENDORID, BRCM_DEVICEID_BCM5708S, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM5708 1000Base-SX" }, + "QLogic NetXtreme II BCM5708 1000Base-SX" }, /* BCM5709C controllers and OEM boards. */ { BRCM_VENDORID, BRCM_DEVICEID_BCM5709, HP_VENDORID, 0x7055, @@ -140,7 +136,7 @@ static const struct bce_type bce_devs[] { BRCM_VENDORID, BRCM_DEVICEID_BCM5709, HP_VENDORID, 0x7059, "HP NC382T PCIe DP Multifunction Gigabit Server Adapter" }, { BRCM_VENDORID, BRCM_DEVICEID_BCM5709, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM5709 1000Base-T" }, + "QLogic NetXtreme II BCM5709 1000Base-T" }, /* BCM5709S controllers and OEM boards. */ { BRCM_VENDORID, BRCM_DEVICEID_BCM5709S, HP_VENDORID, 0x171d, @@ -148,11 +144,11 @@ static const struct bce_type bce_devs[] { BRCM_VENDORID, BRCM_DEVICEID_BCM5709S, HP_VENDORID, 0x7056, "HP NC382i DP Multifunction Gigabit Server Adapter" }, { BRCM_VENDORID, BRCM_DEVICEID_BCM5709S, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM5709 1000Base-SX" }, + "QLogic NetXtreme II BCM5709 1000Base-SX" }, /* BCM5716 controllers and OEM boards. */ { BRCM_VENDORID, BRCM_DEVICEID_BCM5716, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM5716 1000Base-T" }, + "QLogic NetXtreme II BCM5716 1000Base-T" }, { 0, 0, 0, 0, NULL } }; Modified: stable/9/sys/dev/bce/if_bcefw.h ============================================================================== --- stable/9/sys/dev/bce/if_bcefw.h Mon May 12 15:52:49 2014 (r265917) +++ stable/9/sys/dev/bce/if_bcefw.h Mon May 12 15:56:11 2014 (r265918) @@ -1,6 +1,5 @@ /*- - * Copyright (c) 2006-2011 Broadcom Corporation - * David Christensen . All rights reserved. + * Copyright (c) 2006-2014 QLogic Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -10,9 +9,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -31,7 +27,7 @@ /* * This file contains firmware data derived from proprietary unpublished - * source code, Copyright (c) 2004-2011 Broadcom Corporation. + * source code, Copyright (c) 2004-2014 QLogic Corporation. * * Permission is hereby granted for the distribution of this firmware data * in hexadecimal or equivalent format, provided this copyright notice also Modified: stable/9/sys/dev/bce/if_bcereg.h ============================================================================== --- stable/9/sys/dev/bce/if_bcereg.h Mon May 12 15:52:49 2014 (r265917) +++ stable/9/sys/dev/bce/if_bcereg.h Mon May 12 15:56:11 2014 (r265918) @@ -1,6 +1,5 @@ /*- - * Copyright (c) 2006-2010 Broadcom Corporation - * David Christensen . All rights reserved. + * Copyright (c) 2006-2014 QLogic Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -10,9 +9,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/9/sys/dev/bxe/bxe.c ============================================================================== --- stable/9/sys/dev/bxe/bxe.c Mon May 12 15:52:49 2014 (r265917) +++ stable/9/sys/dev/bxe/bxe.c Mon May 12 15:56:11 2014 (r265918) @@ -98,126 +98,126 @@ static struct bxe_device_type bxe_devs[] BRCM_VENDORID, CHIP_NUM_57710, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57710 10GbE" + "QLogic NetXtreme II BCM57710 10GbE" }, { BRCM_VENDORID, CHIP_NUM_57711, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57711 10GbE" + "QLogic NetXtreme II BCM57711 10GbE" }, { BRCM_VENDORID, CHIP_NUM_57711E, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57711E 10GbE" + "QLogic NetXtreme II BCM57711E 10GbE" }, { BRCM_VENDORID, CHIP_NUM_57712, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57712 10GbE" + "QLogic NetXtreme II BCM57712 10GbE" }, { BRCM_VENDORID, CHIP_NUM_57712_MF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57712 MF 10GbE" + "QLogic NetXtreme II BCM57712 MF 10GbE" }, #if 0 { BRCM_VENDORID, CHIP_NUM_57712_VF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57712 VF 10GbE" + "QLogic NetXtreme II BCM57712 VF 10GbE" }, #endif { BRCM_VENDORID, CHIP_NUM_57800, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57800 10GbE" + "QLogic NetXtreme II BCM57800 10GbE" }, { BRCM_VENDORID, CHIP_NUM_57800_MF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57800 MF 10GbE" + "QLogic NetXtreme II BCM57800 MF 10GbE" }, #if 0 { BRCM_VENDORID, CHIP_NUM_57800_VF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57800 VF 10GbE" + "QLogic NetXtreme II BCM57800 VF 10GbE" }, #endif { BRCM_VENDORID, CHIP_NUM_57810, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57810 10GbE" + "QLogic NetXtreme II BCM57810 10GbE" }, { BRCM_VENDORID, CHIP_NUM_57810_MF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57810 MF 10GbE" + "QLogic NetXtreme II BCM57810 MF 10GbE" }, #if 0 { BRCM_VENDORID, CHIP_NUM_57810_VF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57810 VF 10GbE" + "QLogic NetXtreme II BCM57810 VF 10GbE" }, #endif { BRCM_VENDORID, CHIP_NUM_57811, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57811 10GbE" + "QLogic NetXtreme II BCM57811 10GbE" }, { BRCM_VENDORID, CHIP_NUM_57811_MF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57811 MF 10GbE" + "QLogic NetXtreme II BCM57811 MF 10GbE" }, #if 0 { BRCM_VENDORID, CHIP_NUM_57811_VF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57811 VF 10GbE" + "QLogic NetXtreme II BCM57811 VF 10GbE" }, #endif { BRCM_VENDORID, CHIP_NUM_57840_4_10, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57840 4x10GbE" + "QLogic NetXtreme II BCM57840 4x10GbE" }, #if 0 { BRCM_VENDORID, CHIP_NUM_57840_2_20, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57840 2x20GbE" + "QLogic NetXtreme II BCM57840 2x20GbE" }, #endif { BRCM_VENDORID, CHIP_NUM_57840_MF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57840 MF 10GbE" + "QLogic NetXtreme II BCM57840 MF 10GbE" }, #if 0 { BRCM_VENDORID, CHIP_NUM_57840_VF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57840 VF 10GbE" + "QLogic NetXtreme II BCM57840 VF 10GbE" }, #endif { Modified: stable/9/sys/modules/bce/Makefile ============================================================================== --- stable/9/sys/modules/bce/Makefile Mon May 12 15:52:49 2014 (r265917) +++ stable/9/sys/modules/bce/Makefile Mon May 12 15:56:11 2014 (r265918) @@ -5,4 +5,9 @@ SRCS= opt_bce.h if_bce.c miibus_if.h mii #CFLAGS += -DBCE_DEBUG=0 +clean: + rm -f opt_bdg.h device_if.h bus_if.h pci_if.h export_syms + rm -f *.o *.kld *.ko + rm -f @ machine x86 miibus_if.h miidevs.h opt_bce.h + .include From owner-svn-src-stable@FreeBSD.ORG Mon May 12 15:59:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 88419463; Mon, 12 May 2014 15:59:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72EDF243A; Mon, 12 May 2014 15:59:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4CFxBQl011543; Mon, 12 May 2014 15:59:11 GMT (envelope-from davidcs@svn.freebsd.org) Received: (from davidcs@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4CFxANI011531; Mon, 12 May 2014 15:59:10 GMT (envelope-from davidcs@svn.freebsd.org) Message-Id: <201405121559.s4CFxANI011531@svn.freebsd.org> From: David C Somayajulu Date: Mon, 12 May 2014 15:59:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r265919 - in stable/8: share/man/man4 sys/dev/bce sys/dev/bxe sys/modules/bce X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2014 15:59:11 -0000 Author: davidcs Date: Mon May 12 15:59:09 2014 New Revision: 265919 URL: http://svnweb.freebsd.org/changeset/base/265919 Log: MFC r265703 Modify Copyright information and other strings to reflect Qlogic Corporation's purchase of Broadcom's NetXtreme business. Added clean option to Makefile Submitted by:David C Somayajulu (davidcs@freebsd.org) QLogic Corporation Modified: stable/8/share/man/man4/bce.4 stable/8/share/man/man4/bxe.4 stable/8/sys/dev/bce/if_bce.c stable/8/sys/dev/bce/if_bcefw.h stable/8/sys/dev/bce/if_bcereg.h stable/8/sys/dev/bxe/bxe.c stable/8/sys/modules/bce/Makefile Directory Properties: stable/8/ (props changed) stable/8/share/ (props changed) stable/8/share/man/ (props changed) stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/bce/ (props changed) stable/8/sys/modules/ (props changed) Modified: stable/8/share/man/man4/bce.4 ============================================================================== --- stable/8/share/man/man4/bce.4 Mon May 12 15:56:11 2014 (r265918) +++ stable/8/share/man/man4/bce.4 Mon May 12 15:59:09 2014 (r265919) @@ -1,5 +1,4 @@ -.\" Copyright (c) 2006 Broadcom Corporation -.\" David Christensen . All rights reserved. +.\" Copyright (c) 2006-2014 QLogic Corporation .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -10,9 +9,6 @@ .\" 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. -.\" 3. Neither the name of Broadcom Corporation nor the name of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written consent. .\" .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' .\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -33,7 +29,7 @@ .Os .Sh NAME .Nm bce -.Nd "Broadcom NetXtreme II (BCM5706/5708/5709/5716) PCI/PCIe Gigabit Ethernet adapter driver" +.Nd "QLogic NetXtreme II (BCM5706/5708/5709/5716) PCI/PCIe Gigabit Ethernet adapter driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -52,7 +48,7 @@ if_bce_load="YES" .Sh DESCRIPTION The .Nm -driver supports Broadcom's NetXtreme II product family, including the +driver supports QLogic's NetXtreme II product family, including the BCM5706, BCM5708, BCM5709 and BCM5716 Ethernet controllers. .Pp The NetXtreme II product family is composed of various Converged NIC (or CNIC) @@ -141,25 +137,25 @@ For more information on configuring this .Sh HARDWARE The .Nm -driver provides support for various NICs based on the Broadcom NetXtreme II +driver provides support for various NICs based on the QLogic NetXtreme II family of Gigabit Ethernet controllers, including the following: .Pp .Bl -bullet -compact .It -Broadcom NetXtreme II BCM5706 1000Base-SX +QLogic NetXtreme II BCM5706 1000Base-SX .It -Broadcom NetXtreme II BCM5706 1000Base-T +QLogic NetXtreme II BCM5706 1000Base-T .It -Broadcom NetXtreme II BCM5708 1000Base-SX +QLogic NetXtreme II BCM5708 1000Base-SX .It -Broadcom NetXtreme II BCM5708 1000Base-T +QLogic NetXtreme II BCM5708 1000Base-T .It -Broadcom NetXtreme II BCM5709 1000Base-SX +QLogic NetXtreme II BCM5709 1000Base-SX .It -Broadcom NetXtreme II BCM5709 1000Base-T +QLogic NetXtreme II BCM5709 1000Base-T .It -Broadcom NetXtreme II BCM5716 1000Base-T +QLogic NetXtreme II BCM5716 1000Base-T .It Dell PowerEdge 1950 integrated BCM5708 NIC .It @@ -411,9 +407,11 @@ A controller hardware failure has occurr If the problem continues replace the controller. .El .Sh SUPPORT -For general information and support, -go to the Broadcom NIC Open Source Developer Resource Site: -.Pa http://www.broadcom.com/support/ethernet_nic/open_source.php . +For support questions please contact your QLogic approved reseller or +QLogic Technical Support at +.Pa http://support.qlogic.com , +or by E-mail at +.Aq support@qlogic.com . .Sh SEE ALSO .Xr altq 4 , .Xr arp 4 , Modified: stable/8/share/man/man4/bxe.4 ============================================================================== --- stable/8/share/man/man4/bxe.4 Mon May 12 15:56:11 2014 (r265918) +++ stable/8/share/man/man4/bxe.4 Mon May 12 15:59:09 2014 (r265919) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013 Broadcom Corporation. All rights reserved. +.\" Copyright (c) 2014 Qlogic Corporation. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -9,9 +9,6 @@ .\" 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. -.\" 3. Neither the name of Broadcom Corporation nor the name of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written consent. .\" .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' .\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -32,7 +29,7 @@ .Os .Sh NAME .Nm bxe -.Nd Broadcom NetXtreme II Ethernet 10Gb PCIe adapter driver +.Nd QLogic NetXtreme II Ethernet 10Gb PCIe adapter driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -50,7 +47,7 @@ if_bxe_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for PCIe 10Gb Ethernet adapters based on the Broadcom +driver provides support for PCIe 10Gb Ethernet adapters based on the QLogic NetXtreme II family of 10Gb chips. The driver supports Jumbo Frames, VLAN tagging, checksum offload (IPv4, TCP, UDP, IPv6-TCP, IPv6-UDP), MSI-X @@ -59,32 +56,32 @@ Receive Side Scaling (RSS). .Sh HARDWARE The .Nm -driver provides support for various NICs based on the Broadcom NetXtreme II +driver provides support for various NICs based on the QLogic NetXtreme II family of 10Gb Ethernet controller chips, including the following: .Pp .Bl -bullet -compact .It -Broadcom NetXtreme II BCM57710 10Gb +QLogic NetXtreme II BCM57710 10Gb .It -Broadcom NetXtreme II BCM57711 10Gb +QLogic NetXtreme II BCM57711 10Gb .It -Broadcom NetXtreme II BCM57711E 10Gb +QLogic NetXtreme II BCM57711E 10Gb .It -Broadcom NetXtreme II BCM57712 10Gb +QLogic NetXtreme II BCM57712 10Gb .It -Broadcom NetXtreme II BCM57712-MF 10Gb +QLogic NetXtreme II BCM57712-MF 10Gb .It -Broadcom NetXtreme II BCM57800 10Gb +QLogic NetXtreme II BCM57800 10Gb .It -Broadcom NetXtreme II BCM57800-MF 10Gb +QLogic NetXtreme II BCM57800-MF 10Gb .It -Broadcom NetXtreme II BCM57810 10Gb +QLogic NetXtreme II BCM57810 10Gb .It -Broadcom NetXtreme II BCM57810-MF 10Gb +QLogic NetXtreme II BCM57810-MF 10Gb .It -Broadcom NetXtreme II BCM57840 10Gb / 20Gb +QLogic NetXtreme II BCM57840 10Gb / 20Gb .It -Broadcom NetXtreme II BCM57840-MF 10Gb +QLogic NetXtreme II BCM57840-MF 10Gb .El .Sh CONFIGURATION There a number of configuration parameters that can be set to tweak the @@ -318,6 +315,12 @@ When finished turn the logging back off: .Bd -literal -offset indent # sysctl dev.bxe.0.debug=0 .Ed +.Sh SUPPORT +For support questions please contact your QLogic approved reseller or +QLogic Technical Support at +.Pa http://support.qlogic.com , +or by E-mail at +.Aq support@qlogic.com . .Sh SEE ALSO .Xr netstat 1 , .Xr altq 4 , Modified: stable/8/sys/dev/bce/if_bce.c ============================================================================== --- stable/8/sys/dev/bce/if_bce.c Mon May 12 15:56:11 2014 (r265918) +++ stable/8/sys/dev/bce/if_bce.c Mon May 12 15:59:09 2014 (r265919) @@ -1,6 +1,5 @@ /*- - * Copyright (c) 2006-2010 Broadcom Corporation - * David Christensen . All rights reserved. + * Copyright (c) 2006-2014 QLogic Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -11,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -106,13 +102,13 @@ static const struct bce_type bce_devs[] { BRCM_VENDORID, BRCM_DEVICEID_BCM5706, HP_VENDORID, 0x1709, "HP NC371i Multifunction Gigabit Server Adapter" }, { BRCM_VENDORID, BRCM_DEVICEID_BCM5706, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM5706 1000Base-T" }, + "QLogic NetXtreme II BCM5706 1000Base-T" }, /* BCM5706S controllers and OEM boards. */ { BRCM_VENDORID, BRCM_DEVICEID_BCM5706S, HP_VENDORID, 0x3102, "HP NC370F Multifunction Gigabit Server Adapter" }, { BRCM_VENDORID, BRCM_DEVICEID_BCM5706S, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM5706 1000Base-SX" }, + "QLogic NetXtreme II BCM5706 1000Base-SX" }, /* BCM5708C controllers and OEM boards. */ { BRCM_VENDORID, BRCM_DEVICEID_BCM5708, HP_VENDORID, 0x7037, @@ -122,7 +118,7 @@ static const struct bce_type bce_devs[] { BRCM_VENDORID, BRCM_DEVICEID_BCM5708, HP_VENDORID, 0x7045, "HP NC374m PCIe Multifunction Adapter" }, { BRCM_VENDORID, BRCM_DEVICEID_BCM5708, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM5708 1000Base-T" }, + "QLogic NetXtreme II BCM5708 1000Base-T" }, /* BCM5708S controllers and OEM boards. */ { BRCM_VENDORID, BRCM_DEVICEID_BCM5708S, HP_VENDORID, 0x1706, @@ -132,7 +128,7 @@ static const struct bce_type bce_devs[] { BRCM_VENDORID, BRCM_DEVICEID_BCM5708S, HP_VENDORID, 0x703d, "HP NC373F PCIe Multifunc Giga Server Adapter" }, { BRCM_VENDORID, BRCM_DEVICEID_BCM5708S, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM5708 1000Base-SX" }, + "QLogic NetXtreme II BCM5708 1000Base-SX" }, /* BCM5709C controllers and OEM boards. */ { BRCM_VENDORID, BRCM_DEVICEID_BCM5709, HP_VENDORID, 0x7055, @@ -140,7 +136,7 @@ static const struct bce_type bce_devs[] { BRCM_VENDORID, BRCM_DEVICEID_BCM5709, HP_VENDORID, 0x7059, "HP NC382T PCIe DP Multifunction Gigabit Server Adapter" }, { BRCM_VENDORID, BRCM_DEVICEID_BCM5709, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM5709 1000Base-T" }, + "QLogic NetXtreme II BCM5709 1000Base-T" }, /* BCM5709S controllers and OEM boards. */ { BRCM_VENDORID, BRCM_DEVICEID_BCM5709S, HP_VENDORID, 0x171d, @@ -148,11 +144,11 @@ static const struct bce_type bce_devs[] { BRCM_VENDORID, BRCM_DEVICEID_BCM5709S, HP_VENDORID, 0x7056, "HP NC382i DP Multifunction Gigabit Server Adapter" }, { BRCM_VENDORID, BRCM_DEVICEID_BCM5709S, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM5709 1000Base-SX" }, + "QLogic NetXtreme II BCM5709 1000Base-SX" }, /* BCM5716 controllers and OEM boards. */ { BRCM_VENDORID, BRCM_DEVICEID_BCM5716, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM5716 1000Base-T" }, + "QLogic NetXtreme II BCM5716 1000Base-T" }, { 0, 0, 0, 0, NULL } }; Modified: stable/8/sys/dev/bce/if_bcefw.h ============================================================================== --- stable/8/sys/dev/bce/if_bcefw.h Mon May 12 15:56:11 2014 (r265918) +++ stable/8/sys/dev/bce/if_bcefw.h Mon May 12 15:59:09 2014 (r265919) @@ -1,6 +1,5 @@ /*- - * Copyright (c) 2006-2011 Broadcom Corporation - * David Christensen . All rights reserved. + * Copyright (c) 2006-2014 QLogic Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -10,9 +9,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -31,7 +27,7 @@ /* * This file contains firmware data derived from proprietary unpublished - * source code, Copyright (c) 2004-2011 Broadcom Corporation. + * source code, Copyright (c) 2004-2014 QLogic Corporation. * * Permission is hereby granted for the distribution of this firmware data * in hexadecimal or equivalent format, provided this copyright notice also Modified: stable/8/sys/dev/bce/if_bcereg.h ============================================================================== --- stable/8/sys/dev/bce/if_bcereg.h Mon May 12 15:56:11 2014 (r265918) +++ stable/8/sys/dev/bce/if_bcereg.h Mon May 12 15:59:09 2014 (r265919) @@ -1,6 +1,5 @@ /*- - * Copyright (c) 2006-2010 Broadcom Corporation - * David Christensen . All rights reserved. + * Copyright (c) 2006-2014 QLogic Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -10,9 +9,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/8/sys/dev/bxe/bxe.c ============================================================================== --- stable/8/sys/dev/bxe/bxe.c Mon May 12 15:56:11 2014 (r265918) +++ stable/8/sys/dev/bxe/bxe.c Mon May 12 15:59:09 2014 (r265919) @@ -98,126 +98,126 @@ static struct bxe_device_type bxe_devs[] BRCM_VENDORID, CHIP_NUM_57710, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57710 10GbE" + "QLogic NetXtreme II BCM57710 10GbE" }, { BRCM_VENDORID, CHIP_NUM_57711, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57711 10GbE" + "QLogic NetXtreme II BCM57711 10GbE" }, { BRCM_VENDORID, CHIP_NUM_57711E, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57711E 10GbE" + "QLogic NetXtreme II BCM57711E 10GbE" }, { BRCM_VENDORID, CHIP_NUM_57712, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57712 10GbE" + "QLogic NetXtreme II BCM57712 10GbE" }, { BRCM_VENDORID, CHIP_NUM_57712_MF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57712 MF 10GbE" + "QLogic NetXtreme II BCM57712 MF 10GbE" }, #if 0 { BRCM_VENDORID, CHIP_NUM_57712_VF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57712 VF 10GbE" + "QLogic NetXtreme II BCM57712 VF 10GbE" }, #endif { BRCM_VENDORID, CHIP_NUM_57800, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57800 10GbE" + "QLogic NetXtreme II BCM57800 10GbE" }, { BRCM_VENDORID, CHIP_NUM_57800_MF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57800 MF 10GbE" + "QLogic NetXtreme II BCM57800 MF 10GbE" }, #if 0 { BRCM_VENDORID, CHIP_NUM_57800_VF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57800 VF 10GbE" + "QLogic NetXtreme II BCM57800 VF 10GbE" }, #endif { BRCM_VENDORID, CHIP_NUM_57810, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57810 10GbE" + "QLogic NetXtreme II BCM57810 10GbE" }, { BRCM_VENDORID, CHIP_NUM_57810_MF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57810 MF 10GbE" + "QLogic NetXtreme II BCM57810 MF 10GbE" }, #if 0 { BRCM_VENDORID, CHIP_NUM_57810_VF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57810 VF 10GbE" + "QLogic NetXtreme II BCM57810 VF 10GbE" }, #endif { BRCM_VENDORID, CHIP_NUM_57811, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57811 10GbE" + "QLogic NetXtreme II BCM57811 10GbE" }, { BRCM_VENDORID, CHIP_NUM_57811_MF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57811 MF 10GbE" + "QLogic NetXtreme II BCM57811 MF 10GbE" }, #if 0 { BRCM_VENDORID, CHIP_NUM_57811_VF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57811 VF 10GbE" + "QLogic NetXtreme II BCM57811 VF 10GbE" }, #endif { BRCM_VENDORID, CHIP_NUM_57840_4_10, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57840 4x10GbE" + "QLogic NetXtreme II BCM57840 4x10GbE" }, #if 0 { BRCM_VENDORID, CHIP_NUM_57840_2_20, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57840 2x20GbE" + "QLogic NetXtreme II BCM57840 2x20GbE" }, #endif { BRCM_VENDORID, CHIP_NUM_57840_MF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57840 MF 10GbE" + "QLogic NetXtreme II BCM57840 MF 10GbE" }, #if 0 { BRCM_VENDORID, CHIP_NUM_57840_VF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57840 VF 10GbE" + "QLogic NetXtreme II BCM57840 VF 10GbE" }, #endif { Modified: stable/8/sys/modules/bce/Makefile ============================================================================== --- stable/8/sys/modules/bce/Makefile Mon May 12 15:56:11 2014 (r265918) +++ stable/8/sys/modules/bce/Makefile Mon May 12 15:59:09 2014 (r265919) @@ -5,4 +5,9 @@ SRCS= opt_bce.h if_bce.c miibus_if.h mii #CFLAGS += -DBCE_DEBUG=0 +clean: + rm -f opt_bdg.h device_if.h bus_if.h pci_if.h export_syms + rm -f *.o *.kld *.ko + rm -f @ machine x86 miibus_if.h miidevs.h opt_bce.h + .include From owner-svn-src-stable@FreeBSD.ORG Mon May 12 16:04:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE4FBA5B for ; Mon, 12 May 2014 16:04:43 +0000 (UTC) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com [209.85.215.45]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BC6BC24F9 for ; Mon, 12 May 2014 16:04:42 +0000 (UTC) Received: by mail-la0-f45.google.com with SMTP id gl10so2099986lab.18 for ; Mon, 12 May 2014 09:04:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=ePyOGXwqk2Sg6GOVBv6nvLadOso/nzhd7O4Wvl0deP4=; b=MY4FpyJX6svwY+adzXXKmNx/xcXxfF03ks7OomZtzDxyH3YKtB6VG8rVU2FIk+Spdj I6DVHSvmqtbttgagnbbJap2ZqUe8qIhIo/OLfRwhX3LVAbcouwjhx98RyLGT2uKOMBcI 0QRRqUu6sncFRRsk62MKHRs3zPIv1Qr353i3tvk0XBB3YdinRLW7ShcTLE5quNNC4r/W 7ShrK9v4/2kPkPzGuSP+5MGuC3iSe9vJL3+McPrzdLyjJav8iYl8nmAAmXtLC6lZI/Yy dndoC9oEYi5M1epaiLvAhB9MH32m6v6OSPi8qBwMNxupSkdhWxmht6241MeJM60J2ENv dj4A== X-Gm-Message-State: ALoCoQmfRx2yft/Cy5qPrd/75zWIGeuvnCFXy0z3xeJQ1+q8rM1RfKgim4hd6jvUIJfraidMCiwx X-Received: by 10.152.242.164 with SMTP id wr4mr2648861lac.38.1399910674390; Mon, 12 May 2014 09:04:34 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by mx.google.com with ESMTPSA id dl4sm14239640lbc.4.2014.05.12.09.04.33 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 12 May 2014 09:04:33 -0700 (PDT) Message-ID: <5370F110.5050502@freebsd.org> Date: Mon, 12 May 2014 20:04:32 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Don Lewis , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r265901 - stable/10/sys/kern References: <201405120427.s4C4RAZf093033@svn.freebsd.org> In-Reply-To: <201405120427.s4C4RAZf093033@svn.freebsd.org> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2014 16:04:44 -0000 On 12.05.2014 8:27, Don Lewis wrote: > + if (start + amask < start) { > + DPRINTF(("start+amask wrapped around\n")); > + goto out; > + } Checking for overflow _after_ it happens is unportable and dangerous, since wrapping around is not only one possible result. They should be rewritten like that: if (start > ULONG_MAX - amask) -- http://ache.vniz.net/ From owner-svn-src-stable@FreeBSD.ORG Mon May 12 16:10:16 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29754D06; Mon, 12 May 2014 16:10:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 13EFC2554; Mon, 12 May 2014 16:10:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4CGAGl2019216; Mon, 12 May 2014 16:10:16 GMT (envelope-from davidcs@svn.freebsd.org) Received: (from davidcs@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4CGAExO019198; Mon, 12 May 2014 16:10:14 GMT (envelope-from davidcs@svn.freebsd.org) Message-Id: <201405121610.s4CGAExO019198@svn.freebsd.org> From: David C Somayajulu Date: Mon, 12 May 2014 16:10:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r265920 - in stable/7: share/man/man4 sys/dev/bce sys/dev/bxe sys/modules/bce X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2014 16:10:16 -0000 Author: davidcs Date: Mon May 12 16:10:14 2014 New Revision: 265920 URL: http://svnweb.freebsd.org/changeset/base/265920 Log: MFC r265703 Modify Copyright information and other strings to reflect Qlogic Corporation's purchase of Broadcom's NetXtreme business. Added clean option to Makefile Submitted by: David C Somayajulu (davidcs@freebsd.org) QLogic Corporation Modified: stable/7/share/man/man4/bce.4 stable/7/share/man/man4/bxe.4 stable/7/sys/dev/bce/if_bce.c stable/7/sys/dev/bce/if_bcefw.h stable/7/sys/dev/bce/if_bcereg.h stable/7/sys/dev/bxe/bxe.c stable/7/sys/modules/bce/Makefile Directory Properties: stable/7/ (props changed) stable/7/share/ (props changed) stable/7/share/man/ (props changed) stable/7/share/man/man4/ (props changed) stable/7/sys/ (props changed) Modified: stable/7/share/man/man4/bce.4 ============================================================================== --- stable/7/share/man/man4/bce.4 Mon May 12 15:59:09 2014 (r265919) +++ stable/7/share/man/man4/bce.4 Mon May 12 16:10:14 2014 (r265920) @@ -1,5 +1,4 @@ -.\" Copyright (c) 2006 Broadcom Corporation -.\" David Christensen . All rights reserved. +.\" Copyright (c) 2006-2014 QLogic Corporation .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -10,9 +9,6 @@ .\" 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. -.\" 3. Neither the name of Broadcom Corporation nor the name of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written consent. .\" .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' .\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -33,7 +29,7 @@ .Os .Sh NAME .Nm bce -.Nd "Broadcom NetXtreme II (BCM5706/5708/5709/5716) PCI/PCIe Gigabit Ethernet adapter driver" +.Nd "QLogic NetXtreme II (BCM5706/5708/5709/5716) PCI/PCIe Gigabit Ethernet adapter driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -52,7 +48,7 @@ if_bce_load="YES" .Sh DESCRIPTION The .Nm -driver supports Broadcom's NetXtreme II product family, including the +driver supports QLogic's NetXtreme II product family, including the BCM5706, BCM5708, BCM5709 and BCM5716 Ethernet controllers. .Pp The NetXtreme II product family is composed of various Converged NIC (or CNIC) @@ -141,25 +137,25 @@ For more information on configuring this .Sh HARDWARE The .Nm -driver provides support for various NICs based on the Broadcom NetXtreme II +driver provides support for various NICs based on the QLogic NetXtreme II family of Gigabit Ethernet controllers, including the following: .Pp .Bl -bullet -compact .It -Broadcom NetXtreme II BCM5706 1000Base-SX +QLogic NetXtreme II BCM5706 1000Base-SX .It -Broadcom NetXtreme II BCM5706 1000Base-T +QLogic NetXtreme II BCM5706 1000Base-T .It -Broadcom NetXtreme II BCM5708 1000Base-SX +QLogic NetXtreme II BCM5708 1000Base-SX .It -Broadcom NetXtreme II BCM5708 1000Base-T +QLogic NetXtreme II BCM5708 1000Base-T .It -Broadcom NetXtreme II BCM5709 1000Base-SX +QLogic NetXtreme II BCM5709 1000Base-SX .It -Broadcom NetXtreme II BCM5709 1000Base-T +QLogic NetXtreme II BCM5709 1000Base-T .It -Broadcom NetXtreme II BCM5716 1000Base-T +QLogic NetXtreme II BCM5716 1000Base-T .It Dell PowerEdge 1950 integrated BCM5708 NIC .It @@ -346,6 +342,12 @@ with the cable connection, or a driver l A controller hardware failure has occurred. If the problem continues replace the controller. .El +.Sh SUPPORT +For support questions please contact your QLogic approved reseller or +QLogic Technical Support at +.Pa http://support.qlogic.com , +or by E-mail at +.Aq support@qlogic.com . .Sh SEE ALSO .Xr altq 4 , .Xr arp 4 , Modified: stable/7/share/man/man4/bxe.4 ============================================================================== --- stable/7/share/man/man4/bxe.4 Mon May 12 15:59:09 2014 (r265919) +++ stable/7/share/man/man4/bxe.4 Mon May 12 16:10:14 2014 (r265920) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013 Broadcom Corporation. All rights reserved. +.\" Copyright (c) 2014 Qlogic Corporation. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -9,9 +9,6 @@ .\" 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. -.\" 3. Neither the name of Broadcom Corporation nor the name of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written consent. .\" .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' .\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -32,7 +29,7 @@ .Os .Sh NAME .Nm bxe -.Nd Broadcom NetXtreme II Ethernet 10Gb PCIe adapter driver +.Nd QLogic NetXtreme II Ethernet 10Gb PCIe adapter driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -50,7 +47,7 @@ if_bxe_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for PCIe 10Gb Ethernet adapters based on the Broadcom +driver provides support for PCIe 10Gb Ethernet adapters based on the QLogic NetXtreme II family of 10Gb chips. The driver supports Jumbo Frames, VLAN tagging, checksum offload (IPv4, TCP, UDP, IPv6-TCP, IPv6-UDP), MSI-X @@ -59,32 +56,32 @@ Receive Side Scaling (RSS). .Sh HARDWARE The .Nm -driver provides support for various NICs based on the Broadcom NetXtreme II +driver provides support for various NICs based on the QLogic NetXtreme II family of 10Gb Ethernet controller chips, including the following: .Pp .Bl -bullet -compact .It -Broadcom NetXtreme II BCM57710 10Gb +QLogic NetXtreme II BCM57710 10Gb .It -Broadcom NetXtreme II BCM57711 10Gb +QLogic NetXtreme II BCM57711 10Gb .It -Broadcom NetXtreme II BCM57711E 10Gb +QLogic NetXtreme II BCM57711E 10Gb .It -Broadcom NetXtreme II BCM57712 10Gb +QLogic NetXtreme II BCM57712 10Gb .It -Broadcom NetXtreme II BCM57712-MF 10Gb +QLogic NetXtreme II BCM57712-MF 10Gb .It -Broadcom NetXtreme II BCM57800 10Gb +QLogic NetXtreme II BCM57800 10Gb .It -Broadcom NetXtreme II BCM57800-MF 10Gb +QLogic NetXtreme II BCM57800-MF 10Gb .It -Broadcom NetXtreme II BCM57810 10Gb +QLogic NetXtreme II BCM57810 10Gb .It -Broadcom NetXtreme II BCM57810-MF 10Gb +QLogic NetXtreme II BCM57810-MF 10Gb .It -Broadcom NetXtreme II BCM57840 10Gb / 20Gb +QLogic NetXtreme II BCM57840 10Gb / 20Gb .It -Broadcom NetXtreme II BCM57840-MF 10Gb +QLogic NetXtreme II BCM57840-MF 10Gb .El .Sh CONFIGURATION There a number of configuration parameters that can be set to tweak the @@ -318,6 +315,12 @@ When finished turn the logging back off: .Bd -literal -offset indent # sysctl dev.bxe.0.debug=0 .Ed +.Sh SUPPORT +For support questions please contact your QLogic approved reseller or +QLogic Technical Support at +.Pa http://support.qlogic.com , +or by E-mail at +.Aq support@qlogic.com . .Sh SEE ALSO .Xr netstat 1 , .Xr altq 4 , Modified: stable/7/sys/dev/bce/if_bce.c ============================================================================== --- stable/7/sys/dev/bce/if_bce.c Mon May 12 15:59:09 2014 (r265919) +++ stable/7/sys/dev/bce/if_bce.c Mon May 12 16:10:14 2014 (r265920) @@ -1,6 +1,5 @@ /*- - * Copyright (c) 2006-2010 Broadcom Corporation - * David Christensen . All rights reserved. + * Copyright (c) 2006-2014 QLogic Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -11,9 +10,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -106,13 +102,13 @@ static struct bce_type bce_devs[] = { { BRCM_VENDORID, BRCM_DEVICEID_BCM5706, HP_VENDORID, 0x1709, "HP NC371i Multifunction Gigabit Server Adapter" }, { BRCM_VENDORID, BRCM_DEVICEID_BCM5706, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM5706 1000Base-T" }, + "QLogic NetXtreme II BCM5706 1000Base-T" }, /* BCM5706S controllers and OEM boards. */ { BRCM_VENDORID, BRCM_DEVICEID_BCM5706S, HP_VENDORID, 0x3102, "HP NC370F Multifunction Gigabit Server Adapter" }, { BRCM_VENDORID, BRCM_DEVICEID_BCM5706S, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM5706 1000Base-SX" }, + "QLogic NetXtreme II BCM5706 1000Base-SX" }, /* BCM5708C controllers and OEM boards. */ { BRCM_VENDORID, BRCM_DEVICEID_BCM5708, HP_VENDORID, 0x7037, @@ -122,7 +118,7 @@ static struct bce_type bce_devs[] = { { BRCM_VENDORID, BRCM_DEVICEID_BCM5708, HP_VENDORID, 0x7045, "HP NC374m PCIe Multifunction Adapter" }, { BRCM_VENDORID, BRCM_DEVICEID_BCM5708, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM5708 1000Base-T" }, + "QLogic NetXtreme II BCM5708 1000Base-T" }, /* BCM5708S controllers and OEM boards. */ { BRCM_VENDORID, BRCM_DEVICEID_BCM5708S, HP_VENDORID, 0x1706, @@ -132,7 +128,7 @@ static struct bce_type bce_devs[] = { { BRCM_VENDORID, BRCM_DEVICEID_BCM5708S, HP_VENDORID, 0x703d, "HP NC373F PCIe Multifunc Giga Server Adapter" }, { BRCM_VENDORID, BRCM_DEVICEID_BCM5708S, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM5708 1000Base-SX" }, + "QLogic NetXtreme II BCM5708 1000Base-SX" }, /* BCM5709C controllers and OEM boards. */ { BRCM_VENDORID, BRCM_DEVICEID_BCM5709, HP_VENDORID, 0x7055, @@ -140,7 +136,7 @@ static struct bce_type bce_devs[] = { { BRCM_VENDORID, BRCM_DEVICEID_BCM5709, HP_VENDORID, 0x7059, "HP NC382T PCIe DP Multifunction Gigabit Server Adapter" }, { BRCM_VENDORID, BRCM_DEVICEID_BCM5709, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM5709 1000Base-T" }, + "QLogic NetXtreme II BCM5709 1000Base-T" }, /* BCM5709S controllers and OEM boards. */ { BRCM_VENDORID, BRCM_DEVICEID_BCM5709S, HP_VENDORID, 0x171d, @@ -148,11 +144,11 @@ static struct bce_type bce_devs[] = { { BRCM_VENDORID, BRCM_DEVICEID_BCM5709S, HP_VENDORID, 0x7056, "HP NC382i DP Multifunction Gigabit Server Adapter" }, { BRCM_VENDORID, BRCM_DEVICEID_BCM5709S, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM5709 1000Base-SX" }, + "QLogic NetXtreme II BCM5709 1000Base-SX" }, /* BCM5716 controllers and OEM boards. */ { BRCM_VENDORID, BRCM_DEVICEID_BCM5716, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM5716 1000Base-T" }, + "QLogic NetXtreme II BCM5716 1000Base-T" }, { 0, 0, 0, 0, NULL } }; Modified: stable/7/sys/dev/bce/if_bcefw.h ============================================================================== --- stable/7/sys/dev/bce/if_bcefw.h Mon May 12 15:59:09 2014 (r265919) +++ stable/7/sys/dev/bce/if_bcefw.h Mon May 12 16:10:14 2014 (r265920) @@ -1,6 +1,5 @@ /*- - * Copyright (c) 2006-2011 Broadcom Corporation - * David Christensen . All rights reserved. + * Copyright (c) 2006-2014 QLogic Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -10,9 +9,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -31,7 +27,7 @@ /* * This file contains firmware data derived from proprietary unpublished - * source code, Copyright (c) 2004-2011 Broadcom Corporation. + * source code, Copyright (c) 2004-2014 QLogic Corporation. * * Permission is hereby granted for the distribution of this firmware data * in hexadecimal or equivalent format, provided this copyright notice also Modified: stable/7/sys/dev/bce/if_bcereg.h ============================================================================== --- stable/7/sys/dev/bce/if_bcereg.h Mon May 12 15:59:09 2014 (r265919) +++ stable/7/sys/dev/bce/if_bcereg.h Mon May 12 16:10:14 2014 (r265920) @@ -1,6 +1,5 @@ /*- - * Copyright (c) 2006-2010 Broadcom Corporation - * David Christensen . All rights reserved. + * Copyright (c) 2006-2014 QLogic Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -10,9 +9,6 @@ * 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. - * 3. Neither the name of Broadcom Corporation nor the name of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written consent. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/7/sys/dev/bxe/bxe.c ============================================================================== --- stable/7/sys/dev/bxe/bxe.c Mon May 12 15:59:09 2014 (r265919) +++ stable/7/sys/dev/bxe/bxe.c Mon May 12 16:10:14 2014 (r265920) @@ -98,126 +98,126 @@ static struct bxe_device_type bxe_devs[] BRCM_VENDORID, CHIP_NUM_57710, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57710 10GbE" + "QLogic NetXtreme II BCM57710 10GbE" }, { BRCM_VENDORID, CHIP_NUM_57711, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57711 10GbE" + "QLogic NetXtreme II BCM57711 10GbE" }, { BRCM_VENDORID, CHIP_NUM_57711E, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57711E 10GbE" + "QLogic NetXtreme II BCM57711E 10GbE" }, { BRCM_VENDORID, CHIP_NUM_57712, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57712 10GbE" + "QLogic NetXtreme II BCM57712 10GbE" }, { BRCM_VENDORID, CHIP_NUM_57712_MF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57712 MF 10GbE" + "QLogic NetXtreme II BCM57712 MF 10GbE" }, #if 0 { BRCM_VENDORID, CHIP_NUM_57712_VF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57712 VF 10GbE" + "QLogic NetXtreme II BCM57712 VF 10GbE" }, #endif { BRCM_VENDORID, CHIP_NUM_57800, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57800 10GbE" + "QLogic NetXtreme II BCM57800 10GbE" }, { BRCM_VENDORID, CHIP_NUM_57800_MF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57800 MF 10GbE" + "QLogic NetXtreme II BCM57800 MF 10GbE" }, #if 0 { BRCM_VENDORID, CHIP_NUM_57800_VF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57800 VF 10GbE" + "QLogic NetXtreme II BCM57800 VF 10GbE" }, #endif { BRCM_VENDORID, CHIP_NUM_57810, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57810 10GbE" + "QLogic NetXtreme II BCM57810 10GbE" }, { BRCM_VENDORID, CHIP_NUM_57810_MF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57810 MF 10GbE" + "QLogic NetXtreme II BCM57810 MF 10GbE" }, #if 0 { BRCM_VENDORID, CHIP_NUM_57810_VF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57810 VF 10GbE" + "QLogic NetXtreme II BCM57810 VF 10GbE" }, #endif { BRCM_VENDORID, CHIP_NUM_57811, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57811 10GbE" + "QLogic NetXtreme II BCM57811 10GbE" }, { BRCM_VENDORID, CHIP_NUM_57811_MF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57811 MF 10GbE" + "QLogic NetXtreme II BCM57811 MF 10GbE" }, #if 0 { BRCM_VENDORID, CHIP_NUM_57811_VF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57811 VF 10GbE" + "QLogic NetXtreme II BCM57811 VF 10GbE" }, #endif { BRCM_VENDORID, CHIP_NUM_57840_4_10, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57840 4x10GbE" + "QLogic NetXtreme II BCM57840 4x10GbE" }, #if 0 { BRCM_VENDORID, CHIP_NUM_57840_2_20, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57840 2x20GbE" + "QLogic NetXtreme II BCM57840 2x20GbE" }, #endif { BRCM_VENDORID, CHIP_NUM_57840_MF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57840 MF 10GbE" + "QLogic NetXtreme II BCM57840 MF 10GbE" }, #if 0 { BRCM_VENDORID, CHIP_NUM_57840_VF, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM57840 VF 10GbE" + "QLogic NetXtreme II BCM57840 VF 10GbE" }, #endif { Modified: stable/7/sys/modules/bce/Makefile ============================================================================== --- stable/7/sys/modules/bce/Makefile Mon May 12 15:59:09 2014 (r265919) +++ stable/7/sys/modules/bce/Makefile Mon May 12 16:10:14 2014 (r265920) @@ -5,4 +5,9 @@ SRCS= opt_bce.h if_bce.c miibus_if.h mii #CFLAGS += -DBCE_DEBUG=0 +clean: + rm -f opt_bdg.h device_if.h bus_if.h pci_if.h export_syms + rm -f *.o *.kld *.ko + rm -f @ machine x86 miibus_if.h miidevs.h opt_bce.h + .include From owner-svn-src-stable@FreeBSD.ORG Mon May 12 16:18:59 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from hub.FreeBSD.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC6593E3; Mon, 12 May 2014 16:18:48 +0000 (UTC) Date: Mon, 12 May 2014 12:18:17 -0400 From: Glen Barber To: David C Somayajulu Subject: Re: svn commit: r265917 - in stable/10: share/man/man4 sys/dev/bce sys/dev/bxe sys/modules/bce Message-ID: <20140512161817.GK1258@hub.FreeBSD.org> References: <201405121552.s4CFqnbX009177@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="8tUgZ4IE8L4vmMyh" Content-Disposition: inline In-Reply-To: <201405121552.s4CFqnbX009177@svn.freebsd.org> X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2014 16:18:59 -0000 --8tUgZ4IE8L4vmMyh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 12, 2014 at 03:52:49PM +0000, David C Somayajulu wrote: > Author: davidcs > Date: Mon May 12 15:52:49 2014 > New Revision: 265917 > URL: http://svnweb.freebsd.org/changeset/base/265917 >=20 > Log: > MFC r265703 > Modify Copyright information and other strings to reflect > Qlogic Corporation's purchase of Broadcom's NetXtreme business. > Added clean option to Makefile > =20 > Modified: stable/10/sys/modules/bce/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/10/sys/modules/bce/Makefile Mon May 12 14:46:32 2014 (r265916) > +++ stable/10/sys/modules/bce/Makefile Mon May 12 15:52:49 2014 (r265917) > @@ -5,4 +5,9 @@ SRCS=3D opt_bce.h if_bce.c miibus_if.h mii > =20 > #CFLAGS +=3D -DBCE_DEBUG=3D0 > =20 > +clean: > + rm -f opt_bdg.h device_if.h bus_if.h pci_if.h export_syms > + rm -f *.o *.kld *.ko > + rm -f @ machine x86 miibus_if.h miidevs.h opt_bce.h > + > .include Shouldn't these be listed in CLEANFILES ? Glen --8tUgZ4IE8L4vmMyh Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBCAAGBQJTcPRJAAoJELls3eqvi17Q6dkP/Rj30T8A5Lo2rrxNyutmYmcw Gfs2WWMonnl/vcbsXwqLQzf3dlKSshPqCkZJvFNjI+qOWKDJhzGAefr1lihP7OYQ lg1qBjpah1zNKBBk6SjII/2Gx3hnHVl5apZs3Nstj0otk8idpXR1egUw5JIoLg9X kP9l5F6MtQoLXvtq0Hc210BL7vz1VRMafdZ3BJhByvZjHZH3DOY+5QO00eEMgE81 0BoqtScSMc3r21hNHw0qdeIyh1mflSrfC/6qkUjWhIYYPiFdHZkXnG1oZDIVPxsf P/LcYnP4BgieAxVqHMpDK4XSVXGpvfiucTBurF7zgaqPNdyKimTaic4Q6WpVvaLK k7RfdZdOigJyKWIrTEg+RuyhQ/1Mjpx1zmJfKy7+o9Yk1+2rozJIlo+/cy1XXXc8 VeBSoecjLQxO9/KCmenuMHynKh1oXLI5iAtdtEk3lD0gh478+ho+RZ24eD7aP1M2 8QtsKzrrRjlJJBA1ZxwqO9FEOGjgN5i5XqZuv/j3fI38eMVblxea/iJYyHE5iTfV g2rEaA9wqoyLAN7wx9BPT1YzfTDsm67Fztvs16fIR1jEeHKndymMeGc/sxSAbijx 3KbU1CyYayAu8XQmM5WTTPHvhQKC7ozQBrEiek9YY80jqEkESb/ClQRMNTLD3nih WRjYQiwlMsqFbwfhWIQx =/OEE -----END PGP SIGNATURE----- --8tUgZ4IE8L4vmMyh-- From owner-svn-src-stable@FreeBSD.ORG Mon May 12 17:03:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19071EC3; Mon, 12 May 2014 17:03:27 +0000 (UTC) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mailhost.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D04882ABE; Mon, 12 May 2014 17:03:26 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 1726C3592DF; Mon, 12 May 2014 19:03:23 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id 048B428497; Mon, 12 May 2014 19:03:23 +0200 (CEST) Date: Mon, 12 May 2014 19:03:22 +0200 From: Jilles Tjoelker To: Andrey Chernov Subject: Re: svn commit: r265901 - stable/10/sys/kern Message-ID: <20140512170322.GA2479@stack.nl> References: <201405120427.s4C4RAZf093033@svn.freebsd.org> <5370F110.5050502@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5370F110.5050502@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@freebsd.org, Don Lewis , src-committers@freebsd.org, svn-src-stable-10@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2014 17:03:27 -0000 On Mon, May 12, 2014 at 08:04:32PM +0400, Andrey Chernov wrote: > On 12.05.2014 8:27, Don Lewis wrote: > > + if (start + amask < start) { > > + DPRINTF(("start+amask wrapped around\n")); > > + goto out; > > + } > Checking for overflow _after_ it happens is unportable and dangerous, > since wrapping around is not only one possible result. They should be > rewritten like that: > if (start > ULONG_MAX - amask) Unsigned types wrap around per the C standard. Overflow checking after it happens is fine. You are right for signed types. -- Jilles Tjoelker From owner-svn-src-stable@FreeBSD.ORG Mon May 12 17:42:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08EFB7CC for ; Mon, 12 May 2014 17:42:56 +0000 (UTC) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com [209.85.215.47]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 801232DF6 for ; Mon, 12 May 2014 17:42:55 +0000 (UTC) Received: by mail-la0-f47.google.com with SMTP id pn19so2167395lab.20 for ; Mon, 12 May 2014 10:42:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=AxH1wgr5tF2mVXLpDtIpVLIdFyS/TR62B5ZCWse1kFw=; b=eXsO5HhjcaEPVAuN7T7Z5KGdCT1YMnzTq6OPCLZc30J4yFE5ADgbrYPeZ0qFOEDUCE yW/r9rpfHupU+biJeC95hWkQe9zAgo132C4k4L9BUwy/LmVGIBxu5aduXcrbRanGZKCn wssJJmE4CNvzQvf/0/aRU6fRzfYH0plaXVhCONoV3/qjZqvJzACrCQfvxSTT0w0FKe0+ upjErAo7XWLaFVF3fqvqpqVkOan97qtr0z0lHw8l+cVQc1jQ3kudGewZkYtKCsautg5J VSITup4xiVE0qM7h9XuCq3AK10lAI+fl3qWezXnTuSPMHOOkY0glJ93FyyFjNVlC72Gb 7R/A== X-Gm-Message-State: ALoCoQlMJTjfYsP2FFFmsZ2rCeBqD6yyIRoaJWYW8NeCdGQ+i2eF6aJL+wJWeoRe6pFz/29Aa7fG X-Received: by 10.112.189.138 with SMTP id gi10mr14465714lbc.15.1399916572813; Mon, 12 May 2014 10:42:52 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by mx.google.com with ESMTPSA id ob4sm14424792lbc.30.2014.05.12.10.42.51 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 12 May 2014 10:42:51 -0700 (PDT) Message-ID: <5371081A.2070703@freebsd.org> Date: Mon, 12 May 2014 21:42:50 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Jilles Tjoelker Subject: Re: svn commit: r265901 - stable/10/sys/kern References: <201405120427.s4C4RAZf093033@svn.freebsd.org> <5370F110.5050502@freebsd.org> <20140512170322.GA2479@stack.nl> In-Reply-To: <20140512170322.GA2479@stack.nl> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, Don Lewis , src-committers@freebsd.org, svn-src-stable-10@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2014 17:42:56 -0000 On 12.05.2014 21:03, Jilles Tjoelker wrote: > On Mon, May 12, 2014 at 08:04:32PM +0400, Andrey Chernov wrote: >> On 12.05.2014 8:27, Don Lewis wrote: >>> + if (start + amask < start) { >>> + DPRINTF(("start+amask wrapped around\n")); >>> + goto out; >>> + } > >> Checking for overflow _after_ it happens is unportable and dangerous, >> since wrapping around is not only one possible result. They should be >> rewritten like that: > >> if (start > ULONG_MAX - amask) > > Unsigned types wrap around per the C standard. Overflow checking after > it happens is fine. > > You are right for signed types. > You are right. The C Standard, 6.2.5, paragraph 9 [ISO/IEC 9899:2011], states: "A computation involving unsigned operands can never overflow, because a result that cannot be represented by the resulting unsigned integer type is reduced modulo the number that is one greater than the largest value that can be represented by the resulting type." I was initially confused by "integer overflow" phrase in the commit's comment, mechanically producing example above which supposed to be for signed types. -- http://ache.vniz.net/ From owner-svn-src-stable@FreeBSD.ORG Mon May 12 17:55:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 127A9FDA; Mon, 12 May 2014 17:55:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6ECF2EF2; Mon, 12 May 2014 17:55:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4CHtPEe070008; Mon, 12 May 2014 17:55:25 GMT (envelope-from ambrisko@svn.freebsd.org) Received: (from ambrisko@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4CHtPmL070003; Mon, 12 May 2014 17:55:25 GMT (envelope-from ambrisko@svn.freebsd.org) Message-Id: <201405121755.s4CHtPmL070003@svn.freebsd.org> From: Doug Ambrisko Date: Mon, 12 May 2014 17:55:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265922 - in stable/10: share/man/man4 sys/conf sys/dev/mrsas sys/modules sys/modules/mrsas X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2014 17:55:26 -0000 Author: ambrisko Date: Mon May 12 17:55:24 2014 New Revision: 265922 URL: http://svnweb.freebsd.org/changeset/base/265922 Log: MFC 265555 dd mrsas(4) driver from LSI official support of newer MegaRAID SAS cards. LSI has been maintaining this driver outside of the FreeBSD tree. It overlaps support of ThunderBolt and Invader cards that mfi(4) supports. By default mfi(4) will attach to cards. If the tunable: hw.mfi.mrsas_enable=1 is set then mfi(4) will not probe and attach to these newer cards and allow mrsas(4) to attach. So by default this driver will not effect a FreeBSD system unless mfi(4) is removed from the kernel or the tunable is enabled. mrsas(4) attaches disks to the CAM layer so it depends on CAM and devices show up as /dev/daX. mfiutil(8) does not work with mrsas. The FreeBSD version of MegaCli and StorCli from LSI do work with mrsas. It appears that StorCli only works with mrsas. MegaCli appears to work with mfi(4) and mrsas(4). It would be good to add mfiutil(4) support to mrsas, emulations modes, kernel logging, device aliases to ease the transition between mfi(4) and mrsas(4). Style issues should be resolved by LSI when they get committers approved. The plan is get this driver in FreeBSD 9.3 to improve HW support. Thanks to LSI for developing, testing and working with FreeBSD to make this driver co-exist in FreeBSD. This improves the overall support of MegaRAID SAS. Submitted by: Kashyap Desai Sponsored by: LSI Added: stable/10/share/man/man4/mrsas.4 - copied unchanged from r265555, head/share/man/man4/mrsas.4 stable/10/sys/dev/mrsas/ - copied from r265555, head/sys/dev/mrsas/ stable/10/sys/modules/mrsas/ - copied from r265555, head/sys/modules/mrsas/ Modified: stable/10/share/man/man4/Makefile stable/10/sys/conf/files stable/10/sys/modules/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Mon May 12 17:44:23 2014 (r265921) +++ stable/10/share/man/man4/Makefile Mon May 12 17:55:24 2014 (r265922) @@ -262,6 +262,7 @@ MAN= aac.4 \ mpr.4 \ mps.4 \ mpt.4 \ + mrsas.4 \ msk.4 \ mtio.4 \ multicast.4 \ Copied: stable/10/share/man/man4/mrsas.4 (from r265555, head/share/man/man4/mrsas.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man4/mrsas.4 Mon May 12 17:55:24 2014 (r265922, copy of r265555, head/share/man/man4/mrsas.4) @@ -0,0 +1,374 @@ +.\" Copyright (c) 2014 LSI Corp +.\" All rights reserved. +.\" Author: Kashyap Desai +.\" Support: freebsdraid@lsi.com +.\" +.\" 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. +.\" 3. Neither the name of the nor the names of its +.\" contributors may be used to endorse or promote products derived +.\" from this software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 +.\" COPYRIGHT HOLDER 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. + +.\" The views and conclusions contained in the software and documentation +.\" are those of the authors and should not be interpreted as representing +.\" official policies,either expressed or implied, of the FreeBSD Project +.\" +.\" $FreeBSD$ +.\" + + +.Dd Apr 12, 2013 +.Dt MRSAS 4 +.Os +.Sh NAME +.Nm mrsas +.Nd "LSI MegaRAID 6Gb/s and 12Gb/s SAS+SATA Raid controller driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device pci" +.Cd "device mrsas" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +mrsas_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver will detect LSI's next generation (6Gb/s and 12Gb/s) PCI Express +SAS/SATA RAID controllers. +See the +.Nm HARDWARE +section for the supported devices list. +A disk (virtual disk/physical disk) attached to the +.Nm +driver will be visible to the user through +.Xr camcontrol 8 as +.Pa /dev/da? +device nodes. +A simple management interface is also provided on a per-controller basis via the +.Pa /dev/mrsas? +device node. +.Pp +The +.Nm +name is derived from the phrase "MegaRAID SAS HBA", which is +substantially different than the old "MegaRAID" Driver +.Xr mfi 4 +which does not connect targets +to the +.Xr cam 4 +layer and thus requires a new driver which attaches targets to the +.Xr cam 4 +layer. Older MegaRAID controllers are supported by +.Xr mfi 4 +and will not work with +.Nm , +but both the +.Xr mfi 4 +and +.Nm +drivers can detect and manage the LSI MegaRAID SAS 2208/2308/3008/3108 series of +controllers. +.Pp +The +.Nm device.hints +option is provided to tune the +.Nm +driver's behavior for LSI MegaRAID SAS 2208/2308/3008/3108 controllers. +By default, the +.Xr mfi 4 +driver will detect these controllers. See the +.Nm PRIORITY +section to know more about driver priority for MR-Fusion devices. +.Pp +.Nm +will provide a priority of (-30) (between BUS_PROBE_DEFAULT and +BUS_PROBE_LOW_PRIORITY) at probe call for device id's 0x005B, 0x005D, and +0x005F so that +.Nm +does not take control of these devices without user intervention. +.Sh HARDWARE +The +.Nm +driver supports the following hardware: +.Pp +.Bl -bullet -compact +[ Thunderbolt 6Gbp/s MR controller ] +.It +LSI MegaRAID SAS 9265 +.It +LSI MegaRAID SAS 9266 +.It +LSI MegaRAID SAS 9267 +.It +LSI MegaRAID SAS 9270 +.It +LSI MegaRAID SAS 9271 +.It +LSI MegaRAID SAS 9272 +.It +LSI MegaRAID SAS 9285 +.It +LSI MegaRAID SAS 9286 +.It +DELL PERC H810 +.It +DELL PERC H710/P +.El +.Pp +.Bl -bullet -compact +[ Invader/Fury 12Gpb/s MR controller ] +.It +LSI MegaRAID SAS 9380 +.It +LSI MegaRAID SAS 9361 +.It +LSI MegaRAID SAS 9341 +.It +DELL PERC H830 +.It +DELL PERC H730/P +.It +DELL PERC H330 +.El +.Sh CONFIGURATION +To disable Online Controller Reset(OCR) for a specific +.Nm +driver instance, set the +following tunable value in +.Xr loader.conf 5 : +.Bd -literal -offset indent +dev.mrsas.X.disable_ocr=1 +.Ed +.Pp +where X is the adapter number. +.Pp +To change the IO timeout value for a specific +.Nm +driver instance, set the following tunable value in +.Xr loader.conf 5 : +.Bd -literal -offset indent +dev.mrsas.X.mrsas_io_timeout=NNNNNN +.Ed +.Pp +where NNNNNN is the timeout value in milli-seconds. +.Pp +To change the firmware fault check timer value for a specific +.Nm +driver instance, set the following tunable value in +.Xr loader.conf 5 : +.Bd -literal -offset indent +dev.mrsas.X.mrsas_fw_fault_check_delay=NN +.Ed +.Pp +where NN is the fault check delay value in seconds. +.Pp +The current number of active I/O commands is shown in the +dev.mrsas.X.fw_outstanding +.Xr sysctl 8 +variable. +.Sh DEBUGGING +To enable debugging prints from the +.Nm +driver, set the +.Bd -literal -offset indent +hw.mrsas.X.debug_level +.Ed +.Pp +variable, where X is the adapter number, either in +.Xr loader.conf 5 +or via +.Xr sysctl 8 . +The following bits have the described effects: +.Bl -tag -offset indent +.It 0x01 +Enable informational prints. +.It 0x02 +Enable tracing prints. +.It 0x04 +Enable prints for driver faults. +.It 0x08 +Enable prints for OCR and IO timeout. +.It 0x10 +Enable prints for AEN events. +.El +.Sh PRIORITY +The +.Nm +driver will always set a default (-30) priority in the pci subsystem for +selection of MR-Fusion cards. (It is between BUS_PROBE_DEFAULT and +BUS_PROBE_LOW_PRIORITY). MR-Fusion Controllers include all cards with the +Device IDs - +0x005B, +0x005D, +0x005F. +.Pp +The +.Xr mfi 4 +driver will set a priority of either BUS_PROBE_DEFAULT or +BUS_PROBE_LOW_PRIORITY (depending on the device.hint setting) in the pci +subsystem for selection of MR-Fusion cards. With the above design in place, the +.Xr mfi 4 +driver will attach to a MR-Fusion card given that it has a higher priority than +.Nm . +.Pp +Using /boot/device.hints (as mentioned below), the user can provide a preference +for the +.Nm +driver to detect a MR-Fusion card instead of the +.Xr mfi 4 +driver. +.Bd -ragged -offset indent +.Cd hw.mfi.mrsas_enable="1" +.Ed +.Pp +At boot time, the +.Xr mfi 4 +driver will get priority to detect MR-Fusion controllers by default. Before +changing this default driver selection policy, LSI advises users to understand +how the driver selection policy works. LSI's policy is to provide priority to +the +.Xr mfi 4 +driver to detect MR-Fusion cards, but allow for the ability to choose the +.Nm +driver to detect MR-Fusion cards. +.Pp +LSI recommends setting hw.mfi.mrsas_enable="0" for customers who are using the +older +.Xr mfi 4 +driver and do not want to switch to +.Nm . +For those customers who are using a MR-Fusion controller for the first time, LSI +recommends using the +.Nm +driver and setting hw.mfi.mrsas_enable="1". +.Pp +Changing the default behavior is well tested under most conditions, but +unexpected behavior may pop up if more complex and unrealistic operations are +executed by switching between the +.Xr mfi 4 and +.Nm +drivers for MR-Fusion. +Switching drivers is designed to happen only one time. Although multiple +switching is possible, it is not recommended. The user should decide from +.Nm Start of Day +which driver they want to use for the MR-Fusion card. +.Pp +The user may see different device names when switching from +.Xr mfi 4 +to +.Nm . +This behavior is +.Nm Functions As Designed +and the user needs to change the fstab +entry manually if they are doing any experiments with +.Xr mfi 4 +and +.Nm +interoperability. +.Sh FILES +.Bl -tag -width ".Pa /dev/mrsas?" -compact +.It /dev/da? +array/logical disk interface +.It /dev/mrsas? +management interface +.El +.Sh SEE ALSO +.Xr pci 4 , +.Xr mfi 4 , +.Xr cam 4 , +.Xr device.hints 5 , +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 10.0 . +.Bd -ragged +.Cd "mfi Driver:" +.Xr mfi 4 +is the old FreeBSD driver which started with support for Gen-1 Controllers and +was extended to support up to MR-Fusion (Device ID = 0x005B, 0x005D, 0x005F). +.Ed +.Bd -ragged +.Cd "mrsas Driver:" +.Nm +is the new driver reworked by LSI which supports Thunderbolt and onward +products. The SAS+SATA RAID controller with device id 0x005b is referred to as +the Thunderbolt controller throughout in this man page. +.Ed +.Bd -ragged +.Nm cam aware HBA drivers: +FreeBSD has a +.Xr cam 4 +layer which attaches storage devices and provides a common access mechanism to +storage controllers and attached devices. The +.Nm +driver is +.Xr cam 4 aware and devices associated with +.Nm +can be seen using +.Xr camcontrol 8 . +The +.Xr mfi 4 +driver does not understand the +.Xr cam 4 +layer and it directly associates storage disks to the block layer. +.Pp +.Nm Thunderbolt Controller: +This is the 6Gb/s MegaRAID HBA card which has device id 0x005B. +.Pp +.Nm Invader Controller: +This is 12Gb/s MegaRAID HBA card which has device id 0x005D. +.Pp +.Nm Fury Controller: +This is the 12Gb/s MegaRAID HBA card which has device id 0x005F. +.Ed +.Sh AUTHORS +The +.Nm +driver and this manual page were written by +.An Kashyap Desai Aq Kashyap.Desai@lsi.com . +.Sh TODO +The driver does not support big-endian architectures at this time. +.Pp +The driver does not support alias for device name (it is required when the user +switches between two drivers and does not want to edit /etc/fstab manually). +.Pp +The +.Nm +driver exposes devices as /dev/da?, whereas +.Xr mfi 4 +exposes deivces as /dev/mfid? +.Pp +.Nm +does not support the Linux Emulator interface. +.Pp +.Nm +will not work with +.Xr mfiutil 8 Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Mon May 12 17:44:23 2014 (r265921) +++ stable/10/sys/conf/files Mon May 12 17:55:24 2014 (r265922) @@ -1868,6 +1868,10 @@ dev/mpt/mpt_debug.c optional mpt dev/mpt/mpt_pci.c optional mpt pci dev/mpt/mpt_raid.c optional mpt dev/mpt/mpt_user.c optional mpt +dev/mrsas/mrsas.c optional mrsas +dev/mrsas/mrsas_cam.c optional mrsas +dev/mrsas/mrsas_ioctl.c optional mrsas +dev/mrsas/mrsas_fp.c optional mrsas dev/msk/if_msk.c optional msk dev/mvs/mvs.c optional mvs dev/mvs/mvs_if.m optional mvs Modified: stable/10/sys/modules/Makefile ============================================================================== --- stable/10/sys/modules/Makefile Mon May 12 17:44:23 2014 (r265921) +++ stable/10/sys/modules/Makefile Mon May 12 17:55:24 2014 (r265922) @@ -220,6 +220,7 @@ SUBDIR= \ mps \ mpt \ mqueue \ + mrsas \ msdosfs \ msdosfs_iconv \ ${_mse} \ From owner-svn-src-stable@FreeBSD.ORG Mon May 12 19:42:17 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66702C49; Mon, 12 May 2014 19:42:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38D0D27EC; Mon, 12 May 2014 19:42:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4CJgH9W018638; Mon, 12 May 2014 19:42:17 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4CJgGQE018636; Mon, 12 May 2014 19:42:16 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201405121942.s4CJgGQE018636@svn.freebsd.org> From: Sergey Kandaurov Date: Mon, 12 May 2014 19:42:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265928 - stable/10/share/man/man9 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2014 19:42:17 -0000 Author: pluknet Date: Mon May 12 19:42:16 2014 New Revision: 265928 URL: http://svnweb.freebsd.org/changeset/base/265928 Log: MFC r265285,265320: Documented the pget(9) system kernel interface. Added: stable/10/share/man/man9/pget.9 - copied, changed from r265285, head/share/man/man9/pget.9 Modified: stable/10/share/man/man9/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man9/Makefile ============================================================================== --- stable/10/share/man/man9/Makefile Mon May 12 19:29:38 2014 (r265927) +++ stable/10/share/man/man9/Makefile Mon May 12 19:42:16 2014 (r265928) @@ -191,6 +191,7 @@ MAN= accept_filter.9 \ pci.9 \ pfil.9 \ pfind.9 \ + pget.9 \ pgfind.9 \ physio.9 \ pmap.9 \ Copied and modified: stable/10/share/man/man9/pget.9 (from r265285, head/share/man/man9/pget.9) ============================================================================== --- head/share/man/man9/pget.9 Sat May 3 18:50:47 2014 (r265285, copy source) +++ stable/10/share/man/man9/pget.9 Mon May 12 19:42:16 2014 (r265928) @@ -46,13 +46,13 @@ and fills a pointer to the structure in .Fa *pp . In the latter case, a process owning the specified thread is looked for. -The actual operation is performed by invoking the +The operation is performed by invoking the .Xr pfind 9 function. The found process is returned locked. -Only for +For the .Dv PGET_HOLD -case it is returned unlocked (but held). +case, it is returned unlocked (but held). The .Fn pget function can @@ -65,7 +65,7 @@ The argument is the logical OR of some subset of: .Bl -tag -width ".Dv PGET_NOTINEXEC" .It Dv PGET_HOLD -If set, the found process will be referenced and unlocked. +If set, the found process will be held and unlocked. .It Dv PGET_CANSEE If set, the found process will be checked for its visibility. See @@ -93,6 +93,8 @@ If set, is not assumed as a thread id for values larger than .Dv PID_MAX . .It Dv PGET_WANTREAD +If set, the found process will be checked that the caller may get +a read access to its structure. A shorthand for .Pq Dv PGET_HOLD | PGET_CANDEBUG | PGET_NOTWEXIT . .El From owner-svn-src-stable@FreeBSD.ORG Mon May 12 20:16:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6AC3CAFE; Mon, 12 May 2014 20:16:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5741E2B08; Mon, 12 May 2014 20:16:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4CKGnjs033236; Mon, 12 May 2014 20:16:49 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4CKGnNw033235; Mon, 12 May 2014 20:16:49 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201405122016.s4CKGnNw033235@svn.freebsd.org> From: Sergey Kandaurov Date: Mon, 12 May 2014 20:16:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265929 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2014 20:16:49 -0000 Author: pluknet Date: Mon May 12 20:16:48 2014 New Revision: 265929 URL: http://svnweb.freebsd.org/changeset/base/265929 Log: MFC r227784,r227786: Use the acquired reference to the vmspace, remove XXXRW comments. Modified: stable/9/sys/kern/kern_proc.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_proc.c ============================================================================== --- stable/9/sys/kern/kern_proc.c Mon May 12 19:42:16 2014 (r265928) +++ stable/9/sys/kern/kern_proc.c Mon May 12 20:16:48 2014 (r265929) @@ -1992,7 +1992,7 @@ sysctl_kern_proc_ovmmap(SYSCTL_HANDLER_A } kve = malloc(sizeof(*kve), M_TEMP, M_WAITOK); - map = &p->p_vmspace->vm_map; /* XXXRW: More locking required? */ + map = &vm->vm_map; vm_map_lock_read(map); for (entry = map->header.next; entry != &map->header; entry = entry->next) { @@ -2164,7 +2164,7 @@ kern_proc_vmmap_out(struct proc *p, stru kve = malloc(sizeof(*kve), M_TEMP, M_WAITOK); error = 0; - map = &vm->vm_map; /* XXXRW: More locking required? */ + map = &vm->vm_map; vm_map_lock_read(map); for (entry = map->header.next; entry != &map->header; entry = entry->next) { From owner-svn-src-stable@FreeBSD.ORG Mon May 12 20:19:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 65FC2C4F; Mon, 12 May 2014 20:19:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 382682B1A; Mon, 12 May 2014 20:19:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4CKJfhQ033668; Mon, 12 May 2014 20:19:41 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4CKJeC8033666; Mon, 12 May 2014 20:19:40 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201405122019.s4CKJeC8033666@svn.freebsd.org> From: Sergey Kandaurov Date: Mon, 12 May 2014 20:19:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265930 - stable/9/share/man/man9 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2014 20:19:41 -0000 Author: pluknet Date: Mon May 12 20:19:40 2014 New Revision: 265930 URL: http://svnweb.freebsd.org/changeset/base/265930 Log: MFC r265285,r265320: Documented the pget(9) system kernel interface. Added: stable/9/share/man/man9/pget.9 - copied, changed from r265285, head/share/man/man9/pget.9 Modified: stable/9/share/man/man9/Makefile Directory Properties: stable/9/share/man/man9/ (props changed) Modified: stable/9/share/man/man9/Makefile ============================================================================== --- stable/9/share/man/man9/Makefile Mon May 12 20:16:48 2014 (r265929) +++ stable/9/share/man/man9/Makefile Mon May 12 20:19:40 2014 (r265930) @@ -188,6 +188,7 @@ MAN= accept_filter.9 \ pci.9 \ pfil.9 \ pfind.9 \ + pget.9 \ pgfind.9 \ physio.9 \ pmap.9 \ Copied and modified: stable/9/share/man/man9/pget.9 (from r265285, head/share/man/man9/pget.9) ============================================================================== --- head/share/man/man9/pget.9 Sat May 3 18:50:47 2014 (r265285, copy source) +++ stable/9/share/man/man9/pget.9 Mon May 12 20:19:40 2014 (r265930) @@ -46,13 +46,13 @@ and fills a pointer to the structure in .Fa *pp . In the latter case, a process owning the specified thread is looked for. -The actual operation is performed by invoking the +The operation is performed by invoking the .Xr pfind 9 function. The found process is returned locked. -Only for +For the .Dv PGET_HOLD -case it is returned unlocked (but held). +case, it is returned unlocked (but held). The .Fn pget function can @@ -65,7 +65,7 @@ The argument is the logical OR of some subset of: .Bl -tag -width ".Dv PGET_NOTINEXEC" .It Dv PGET_HOLD -If set, the found process will be referenced and unlocked. +If set, the found process will be held and unlocked. .It Dv PGET_CANSEE If set, the found process will be checked for its visibility. See @@ -93,6 +93,8 @@ If set, is not assumed as a thread id for values larger than .Dv PID_MAX . .It Dv PGET_WANTREAD +If set, the found process will be checked that the caller may get +a read access to its structure. A shorthand for .Pq Dv PGET_HOLD | PGET_CANDEBUG | PGET_NOTWEXIT . .El From owner-svn-src-stable@FreeBSD.ORG Mon May 12 20:48:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A39AEA35; Mon, 12 May 2014 20:48:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75C5B2E63; Mon, 12 May 2014 20:48:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4CKm5vJ046619; Mon, 12 May 2014 20:48:05 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4CKm592046618; Mon, 12 May 2014 20:48:05 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201405122048.s4CKm592046618@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Mon, 12 May 2014 20:48:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265932 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2014 20:48:05 -0000 Author: des Date: Mon May 12 20:48:04 2014 New Revision: 265932 URL: http://svnweb.freebsd.org/changeset/base/265932 Log: MFH (r264966): add sysctl OIDs for actual swap zone size and capacity Modified: stable/10/sys/vm/swap_pager.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/swap_pager.c ============================================================================== --- stable/10/sys/vm/swap_pager.c Mon May 12 20:22:42 2014 (r265931) +++ stable/10/sys/vm/swap_pager.c Mon May 12 20:48:04 2014 (r265932) @@ -164,6 +164,12 @@ static int overcommit = 0; SYSCTL_INT(_vm, OID_AUTO, overcommit, CTLFLAG_RW, &overcommit, 0, "Configure virtual memory overcommit behavior. See tuning(7) " "for details."); +static unsigned long swzone; +SYSCTL_ULONG(_vm, OID_AUTO, swzone, CTLFLAG_RD, &swzone, 0, + "Actual size of swap metadata zone"); +static unsigned long swap_maxpages; +SYSCTL_ULONG(_vm, OID_AUTO, swap_maxpages, CTLFLAG_RD, &swap_maxpages, 0, + "Maximum amount of swap supported"); /* bits from overcommit */ #define SWAP_RESERVE_FORCE_ON (1 << 0) @@ -506,7 +512,7 @@ swap_pager_init(void) void swap_pager_swap_init(void) { - int n, n2; + unsigned long n, n2; /* * Number of in-transit swap bp operations. Don't @@ -542,7 +548,7 @@ swap_pager_swap_init(void) /* * Initialize our zone. Right now I'm just guessing on the number * we need based on the number of pages in the system. Each swblock - * can hold 16 pages, so this is probably overkill. This reservation + * can hold 32 pages, so this is probably overkill. This reservation * is typically limited to around 32MB by default. */ n = cnt.v_page_count / 2; @@ -563,7 +569,9 @@ swap_pager_swap_init(void) n -= ((n + 2) / 3); } while (n > 0); if (n2 != n) - printf("Swap zone entries reduced from %d to %d.\n", n2, n); + printf("Swap zone entries reduced from %lu to %lu.\n", n2, n); + swap_maxpages = n * SWAP_META_PAGES; + swzone = n * sizeof(struct swblock); n2 = n; /* From owner-svn-src-stable@FreeBSD.ORG Mon May 12 21:22:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1608A762; Mon, 12 May 2014 21:22:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE861229D; Mon, 12 May 2014 21:22:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4CLMr6Z064084; Mon, 12 May 2014 21:22:53 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4CLMrQB064083; Mon, 12 May 2014 21:22:53 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405122122.s4CLMrQB064083@svn.freebsd.org> From: Ian Lepore Date: Mon, 12 May 2014 21:22:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265934 - stable/10/share/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2014 21:22:54 -0000 Author: ian Date: Mon May 12 21:22:53 2014 New Revision: 265934 URL: http://svnweb.freebsd.org/changeset/base/265934 Log: MFC r264822: Allow .WAIT to appear in SUBDIR= lists Modified: stable/10/share/mk/bsd.subdir.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.subdir.mk ============================================================================== --- stable/10/share/mk/bsd.subdir.mk Mon May 12 21:21:32 2014 (r265933) +++ stable/10/share/mk/bsd.subdir.mk Mon May 12 21:22:53 2014 (r265934) @@ -45,7 +45,7 @@ distribute: .MAKE _SUBDIR: .USE .MAKE .if defined(SUBDIR) && !empty(SUBDIR) && !defined(NO_SUBDIR) - @${_+_}set -e; for entry in ${SUBDIR}; do \ + @${_+_}set -e; for entry in ${SUBDIR:N.WAIT}; do \ if test -d ${.CURDIR}/$${entry}.${MACHINE_ARCH}; then \ ${ECHODIR} "===> ${DIRPRFX}$${entry}.${MACHINE_ARCH} (${.TARGET:realinstall=install})"; \ edir=$${entry}.${MACHINE_ARCH}; \ @@ -60,7 +60,7 @@ _SUBDIR: .USE .MAKE done .endif -${SUBDIR}: .PHONY .MAKE +${SUBDIR:N.WAIT}: .PHONY .MAKE ${_+_}@if test -d ${.TARGET}.${MACHINE_ARCH}; then \ cd ${.CURDIR}/${.TARGET}.${MACHINE_ARCH}; \ else \ @@ -68,12 +68,18 @@ ${SUBDIR}: .PHONY .MAKE fi; \ ${MAKE} all +# Work around parsing of .if nested in .for by putting .WAIT string into a var. +__wait= .WAIT .for __target in all all-man checkdpadd clean cleandepend cleandir \ cleanilinks depend distribute lint maninstall manlint obj objlink \ realinstall regress tags ${SUBDIR_TARGETS} .ifdef SUBDIR_PARALLEL +__subdir_targets= .for __dir in ${SUBDIR} -${__target}: ${__target}_subdir_${__dir} +.if ${__wait} == ${__dir} +__subdir_targets+= .WAIT +.else +__subdir_targets+= ${__target}_subdir_${__dir} ${__target}_subdir_${__dir}: .MAKE @${_+_}set -e; \ if test -d ${.CURDIR}/${__dir}.${MACHINE_ARCH}; then \ @@ -87,7 +93,9 @@ ${__target}_subdir_${__dir}: .MAKE fi; \ ${MAKE} ${__target:realinstall=install} \ DIRPRFX=${DIRPRFX}$$edir/ +.endif .endfor +${__target}: ${__subdir_targets} .else ${__target}: _SUBDIR .endif From owner-svn-src-stable@FreeBSD.ORG Mon May 12 21:40:04 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 239C8D56; Mon, 12 May 2014 21:40:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 105C723F0; Mon, 12 May 2014 21:40:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4CLe3iP069389; Mon, 12 May 2014 21:40:03 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4CLe3EE069388; Mon, 12 May 2014 21:40:03 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405122140.s4CLe3EE069388@svn.freebsd.org> From: Ian Lepore Date: Mon, 12 May 2014 21:40:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265935 - stable/10/sys/boot/fdt/dts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2014 21:40:04 -0000 Author: ian Date: Mon May 12 21:40:03 2014 New Revision: 265935 URL: http://svnweb.freebsd.org/changeset/base/265935 Log: MFC r260235: fixes to dockstar DTS source. Modified: stable/10/sys/boot/fdt/dts/dockstar.dts Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/fdt/dts/dockstar.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/dockstar.dts Mon May 12 21:22:53 2014 (r265934) +++ stable/10/sys/boot/fdt/dts/dockstar.dts Mon May 12 21:40:03 2014 (r265935) @@ -76,44 +76,17 @@ #size-cells = <1>; compatible = "mrvl,lbc"; - /* This reflects CPU decode windows setup. */ - ranges = <0x0 0x0f 0xf9300000 0x00100000 - 0x1 0x1e 0xfa000000 0x00100000 - 0x2 0x1d 0xfa100000 0x02000000 - 0x3 0x1b 0xfc100000 0x00000400>; + /* This reflects CPU decode windows setup for NAND access. */ + ranges = <0x0 0x2f 0xf9300000 0x00100000>; - nor@0,0 { + nand@0,0 { #address-cells = <1>; #size-cells = <1>; - compatible = "cfi-flash"; + compatible = "mrvl,nfc"; reg = <0x0 0x0 0x00100000>; bank-width = <2>; device-width = <1>; }; - - led@1,0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "led"; - reg = <0x1 0x0 0x00100000>; - }; - - nor@2,0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "cfi-flash"; - reg = <0x2 0x0 0x02000000>; - bank-width = <2>; - device-width = <1>; - }; - - nand@3,0 { - #address-cells = <1>; - #size-cells = <1>; - reg = <0x3 0x0 0x00100000>; - bank-width = <2>; - device-width = <1>; - }; }; SOC: soc88f6281@f1000000 { From owner-svn-src-stable@FreeBSD.ORG Mon May 12 21:42:08 2014 Return-Path: Delivered-To: svn-src-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A02CFEA4; Mon, 12 May 2014 21:42:08 +0000 (UTC) Received: from gw.catspoiler.org (gw.catspoiler.org [75.1.14.242]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C1E32467; Mon, 12 May 2014 21:42:01 +0000 (UTC) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id s4CLfn43076462; Mon, 12 May 2014 14:41:53 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <201405122141.s4CLfn43076462@gw.catspoiler.org> Date: Mon, 12 May 2014 14:41:49 -0700 (PDT) From: Don Lewis Subject: Re: svn commit: r265901 - stable/10/sys/kern To: ache@FreeBSD.org In-Reply-To: <5371081A.2070703@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-10@FreeBSD.org, jilles@stack.nl X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2014 21:42:08 -0000 On 12 May, Andrey Chernov wrote: > On 12.05.2014 21:03, Jilles Tjoelker wrote: >> On Mon, May 12, 2014 at 08:04:32PM +0400, Andrey Chernov wrote: >>> On 12.05.2014 8:27, Don Lewis wrote: >>>> + if (start + amask < start) { >>>> + DPRINTF(("start+amask wrapped around\n")); >>>> + goto out; >>>> + } >> >>> Checking for overflow _after_ it happens is unportable and dangerous, >>> since wrapping around is not only one possible result. They should be >>> rewritten like that: >> >>> if (start > ULONG_MAX - amask) >> >> Unsigned types wrap around per the C standard. Overflow checking after >> it happens is fine. >> >> You are right for signed types. >> > > You are right. The C Standard, 6.2.5, paragraph 9 [ISO/IEC 9899:2011], > states: > > "A computation involving unsigned operands can never overflow, because a > result that cannot be represented by the resulting unsigned integer type > is reduced modulo the number that is one greater than the largest value > that can be represented by the resulting type." > > I was initially confused by "integer overflow" phrase in the commit's > comment, mechanically producing example above which supposed to be for > signed types. I went ahead and changed the code. I think the new version makes the intent of the code clearer. The compiler is also likely to recognize that "ULONG_MAX - amask" is loop invariant. From owner-svn-src-stable@FreeBSD.ORG Mon May 12 22:15:58 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5CC1CBA7; Mon, 12 May 2014 22:15:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4945C296E; Mon, 12 May 2014 22:15:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4CMFw66087045; Mon, 12 May 2014 22:15:58 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4CMFvU5087043; Mon, 12 May 2014 22:15:57 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405122215.s4CMFvU5087043@svn.freebsd.org> From: Ian Lepore Date: Mon, 12 May 2014 22:15:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265936 - in stable/10/sys: arm/ti/am335x modules X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2014 22:15:58 -0000 Author: ian Date: Mon May 12 22:15:57 2014 New Revision: 265936 URL: http://svnweb.freebsd.org/changeset/base/265936 Log: MFC r259099: Fix a small error in calculating length of DELAY(). Modified: stable/10/sys/arm/ti/am335x/am335x_dmtimer.c stable/10/sys/modules/Makefile Modified: stable/10/sys/arm/ti/am335x/am335x_dmtimer.c ============================================================================== --- stable/10/sys/arm/ti/am335x/am335x_dmtimer.c Mon May 12 21:40:03 2014 (r265935) +++ stable/10/sys/arm/ti/am335x/am335x_dmtimer.c Mon May 12 22:15:57 2014 (r265936) @@ -359,7 +359,7 @@ DELAY(int usec) } /* Get the number of times to count */ - counts = usec * ((am335x_dmtimer_tc.tc_frequency / 1000000) + 1); + counts = usec * (am335x_dmtimer_tc.tc_frequency / 1000000) + 1; first = am335x_dmtimer_tc_read_4(DMTIMER_TCRR); Modified: stable/10/sys/modules/Makefile ============================================================================== --- stable/10/sys/modules/Makefile Mon May 12 21:40:03 2014 (r265935) +++ stable/10/sys/modules/Makefile Mon May 12 22:15:57 2014 (r265936) @@ -2,6 +2,8 @@ .include +SUBDIR_PARALLEL= + # Modules that include binary-only blobs of microcode should be selectable by # MK_SOURCELESS_UCODE option (see below). From owner-svn-src-stable@FreeBSD.ORG Mon May 12 22:19:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE46BD9C; Mon, 12 May 2014 22:19:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB3422B07; Mon, 12 May 2014 22:19:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4CMJb22087517; Mon, 12 May 2014 22:19:37 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4CMJbwa087516; Mon, 12 May 2014 22:19:37 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405122219.s4CMJbwa087516@svn.freebsd.org> From: Ian Lepore Date: Mon, 12 May 2014 22:19:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265937 - stable/10/sys/modules X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2014 22:19:37 -0000 Author: ian Date: Mon May 12 22:19:37 2014 New Revision: 265937 URL: http://svnweb.freebsd.org/changeset/base/265937 Log: Revert accidental commit that tagged along with an MFC commit. Modified: stable/10/sys/modules/Makefile Modified: stable/10/sys/modules/Makefile ============================================================================== --- stable/10/sys/modules/Makefile Mon May 12 22:15:57 2014 (r265936) +++ stable/10/sys/modules/Makefile Mon May 12 22:19:37 2014 (r265937) @@ -2,8 +2,6 @@ .include -SUBDIR_PARALLEL= - # Modules that include binary-only blobs of microcode should be selectable by # MK_SOURCELESS_UCODE option (see below). From owner-svn-src-stable@FreeBSD.ORG Mon May 12 22:25:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E6A66FC2; Mon, 12 May 2014 22:25:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2FEE2C2F; Mon, 12 May 2014 22:25:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4CMPf0N091341; Mon, 12 May 2014 22:25:41 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4CMPfnD091340; Mon, 12 May 2014 22:25:41 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405122225.s4CMPfnD091340@svn.freebsd.org> From: Ian Lepore Date: Mon, 12 May 2014 22:25:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265938 - stable/10/sys/arm/ti/am335x X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2014 22:25:42 -0000 Author: ian Date: Mon May 12 22:25:41 2014 New Revision: 265938 URL: http://svnweb.freebsd.org/changeset/base/265938 Log: MFC r259739, r259743: Shorten DMTIMER_->DMT_, #define all register constants. Modified: stable/10/sys/arm/ti/am335x/am335x_dmtimer.c Modified: stable/10/sys/arm/ti/am335x/am335x_dmtimer.c ============================================================================== --- stable/10/sys/arm/ti/am335x/am335x_dmtimer.c Mon May 12 22:19:37 2014 (r265937) +++ stable/10/sys/arm/ti/am335x/am335x_dmtimer.c Mon May 12 22:25:41 2014 (r265938) @@ -51,26 +51,49 @@ __FBSDID("$FreeBSD$"); #include -#define AM335X_NUM_TIMERS 8 +#define AM335X_NUM_TIMERS 8 -#define DMTIMER_TIDR 0x00 /* Identification Register */ -#define DMTIMER_TIOCP_CFG 0x10 /* Timer OCP Configuration Reg */ -#define DMTIMER_IQR_EOI 0x20 /* Timer IRQ End-Of-Interrupt Reg */ -#define DMTIMER_IRQSTATUS_RAW 0x24 /* Timer IRQSTATUS Raw Reg */ -#define DMTIMER_IRQSTATUS 0x28 /* Timer IRQSTATUS Reg */ -#define DMTIMER_IRQENABLE_SET 0x2c /* Timer IRQSTATUS Set Reg */ -#define DMTIMER_IRQENABLE_CLR 0x30 /* Timer IRQSTATUS Clear Reg */ -#define DMTIMER_IRQWAKEEN 0x34 /* Timer IRQ Wakeup Enable Reg */ -#define DMTIMER_TCLR 0x38 /* Timer Control Register */ -#define DMTIMER_TCRR 0x3C /* Timer Counter Register */ -#define DMTIMER_TLDR 0x40 /* Timer Load Reg */ -#define DMTIMER_TTGR 0x44 /* Timer Trigger Reg */ -#define DMTIMER_TWPS 0x48 /* Timer Write Posted Status Reg */ -#define DMTIMER_TMAR 0x4C /* Timer Match Reg */ -#define DMTIMER_TCAR1 0x50 /* Timer Capture Reg */ -#define DMTIMER_TSICR 0x54 /* Timer Synchr. Interface Control Reg */ -#define DMTIMER_TCAR2 0x48 /* Timer Capture Reg */ - +#define DMT_TIDR 0x00 /* Identification Register */ +#define DMT_TIOCP_CFG 0x10 /* OCP Configuration Reg */ +#define DMT_TIOCP_RESET (1 << 0) /* TIOCP perform soft reset */ +#define DMT_IQR_EOI 0x20 /* IRQ End-Of-Interrupt Reg */ +#define DMT_IRQSTATUS_RAW 0x24 /* IRQSTATUS Raw Reg */ +#define DMT_IRQSTATUS 0x28 /* IRQSTATUS Reg */ +#define DMT_IRQENABLE_SET 0x2c /* IRQSTATUS Set Reg */ +#define DMT_IRQENABLE_CLR 0x30 /* IRQSTATUS Clear Reg */ +#define DMT_IRQWAKEEN 0x34 /* IRQ Wakeup Enable Reg */ +#define DMT_IRQ_TCAR (1 << 0) /* IRQ: Capture */ +#define DMT_IRQ_OVF (1 << 1) /* IRQ: Overflow */ +#define DMT_IRQ_MAT (1 << 2) /* IRQ: Match */ +#define DMT_IRQ_MASK (DMT_IRQ_TCAR | DMT_IRQ_OVF | DMT_IRQ_MAT) +#define DMT_TCLR 0x38 /* Control Register */ +#define DMT_TCLR_START (1 << 0) /* Start timer */ +#define DMT_TCLR_AUTOLOAD (1 << 1) /* Auto-reload on overflow */ +#define DMT_TCLR_PRES_MASK (7 << 2) /* Prescaler mask */ +#define DMT_TCLR_PRES_ENABLE (1 << 5) /* Prescaler enable */ +#define DMT_TCLR_COMP_ENABLE (1 << 6) /* Compare enable */ +#define DMT_TCLR_PWM_HIGH (1 << 7) /* PWM default output high */ +#define DMT_TCLR_CAPTRAN_MASK (3 << 8) /* Capture transition mask */ +#define DMT_TCLR_CAPTRAN_NONE (0 << 8) /* Capture: none */ +#define DMT_TCLR_CAPTRAN_LOHI (1 << 8) /* Capture lo->hi transition */ +#define DMT_TCLR_CAPTRAN_HILO (2 << 8) /* Capture hi->lo transition */ +#define DMT_TCLR_CAPTRAN_BOTH (3 << 8) /* Capture both transitions */ +#define DMT_TCLR_TRGMODE_MASK (3 << 10) /* Trigger output mode mask */ +#define DMT_TCLR_TRGMODE_NONE (0 << 10) /* Trigger off */ +#define DMT_TCLR_TRGMODE_OVFL (1 << 10) /* Trigger on overflow */ +#define DMT_TCLR_TRGMODE_BOTH (2 << 10) /* Trigger on match + ovflow */ +#define DMT_TCLR_PWM_PTOGGLE (1 << 12) /* PWM toggles */ +#define DMT_TCLR_CAP_MODE_2ND (1 << 13) /* Capture second event mode */ +#define DMT_TCLR_GPO_CFG (1 << 14) /* (no descr in datasheet) */ +#define DMT_TCRR 0x3C /* Counter Register */ +#define DMT_TLDR 0x40 /* Load Reg */ +#define DMT_TTGR 0x44 /* Trigger Reg */ +#define DMT_TWPS 0x48 /* Write Posted Status Reg */ +#define DMT_TMAR 0x4C /* Match Reg */ +#define DMT_TCAR1 0x50 /* Capture Reg */ +#define DMT_TSICR 0x54 /* Synchr. Interface Ctrl Reg */ +#define DMT_TSICR_RESET 0x02 /* TSICR perform soft reset */ +#define DMT_TCAR2 0x48 /* Capture Reg */ struct am335x_dmtimer_softc { struct resource * tmr_mem_res[AM335X_NUM_TIMERS]; @@ -138,7 +161,7 @@ static struct timecounter am335x_dmtimer static unsigned am335x_dmtimer_tc_get_timecount(struct timecounter *tc) { - return am335x_dmtimer_tc_read_4(DMTIMER_TCRR); + return am335x_dmtimer_tc_read_4(DMT_TCRR); } static int @@ -162,23 +185,23 @@ am335x_dmtimer_start(struct eventtimer * count = load; /* Reset Timer */ - am335x_dmtimer_et_write_4(DMTIMER_TSICR, 2); + am335x_dmtimer_et_write_4(DMT_TSICR, 2); /* Wait for reset to complete */ - while (am335x_dmtimer_et_read_4(DMTIMER_TIOCP_CFG) & 1); + while (am335x_dmtimer_et_read_4(DMT_TIOCP_CFG) & 1); /* set load value */ - am335x_dmtimer_et_write_4(DMTIMER_TLDR, 0xFFFFFFFE - load); + am335x_dmtimer_et_write_4(DMT_TLDR, 0xFFFFFFFE - load); /* set counter value */ - am335x_dmtimer_et_write_4(DMTIMER_TCRR, 0xFFFFFFFE - count); + am335x_dmtimer_et_write_4(DMT_TCRR, 0xFFFFFFFE - count); /* enable overflow interrupt */ - am335x_dmtimer_et_write_4(DMTIMER_IRQENABLE_SET, 2); + am335x_dmtimer_et_write_4(DMT_IRQENABLE_SET, 2); /* start timer(ST) */ tclr |= 1; - am335x_dmtimer_et_write_4(DMTIMER_TCLR, tclr); + am335x_dmtimer_et_write_4(DMT_TCLR, tclr); return (0); } @@ -189,10 +212,10 @@ am335x_dmtimer_stop(struct eventtimer *e struct am335x_dmtimer *tmr = (struct am335x_dmtimer *)et->et_priv; /* Disable all interrupts */ - am335x_dmtimer_et_write_4(DMTIMER_IRQENABLE_CLR, 7); + am335x_dmtimer_et_write_4(DMT_IRQENABLE_CLR, 7); /* Stop Timer */ - am335x_dmtimer_et_write_4(DMTIMER_TCLR, 0); + am335x_dmtimer_et_write_4(DMT_TCLR, 0); return (0); } @@ -203,7 +226,7 @@ am335x_dmtimer_intr(void *arg) struct am335x_dmtimer *tmr = (struct am335x_dmtimer *)arg; /* Ack interrupt */ - am335x_dmtimer_et_write_4(DMTIMER_IRQSTATUS, 7); + am335x_dmtimer_et_write_4(DMT_IRQSTATUS, 7); if (tmr->et.et_active) tmr->et.et_event_cb(&tmr->et, tmr->et.et_arg); @@ -277,19 +300,19 @@ am335x_dmtimer_attach(device_t dev) am335x_dmtimer_tc_tmr = &sc->t[2]; /* Reset Timer */ - am335x_dmtimer_tc_write_4(DMTIMER_TSICR, 2); + am335x_dmtimer_tc_write_4(DMT_TSICR, 2); /* Wait for reset to complete */ - while (am335x_dmtimer_tc_read_4(DMTIMER_TIOCP_CFG) & 1); + while (am335x_dmtimer_tc_read_4(DMT_TIOCP_CFG) & 1); /* set load value */ - am335x_dmtimer_tc_write_4(DMTIMER_TLDR, 0); + am335x_dmtimer_tc_write_4(DMT_TLDR, 0); /* set counter value */ - am335x_dmtimer_tc_write_4(DMTIMER_TCRR, 0); + am335x_dmtimer_tc_write_4(DMT_TCRR, 0); /* Set Timer autoreload(AR) and start timer(ST) */ - am335x_dmtimer_tc_write_4(DMTIMER_TCLR, 3); + am335x_dmtimer_tc_write_4(DMT_TCLR, 3); am335x_dmtimer_tc.tc_frequency = sc->sysclk_freq; tc_init(&am335x_dmtimer_tc); @@ -361,10 +384,10 @@ DELAY(int usec) /* Get the number of times to count */ counts = usec * (am335x_dmtimer_tc.tc_frequency / 1000000) + 1; - first = am335x_dmtimer_tc_read_4(DMTIMER_TCRR); + first = am335x_dmtimer_tc_read_4(DMT_TCRR); while (counts > 0) { - last = am335x_dmtimer_tc_read_4(DMTIMER_TCRR); + last = am335x_dmtimer_tc_read_4(DMT_TCRR); if (last>first) { counts -= (int32_t)(last - first); } else { From owner-svn-src-stable@FreeBSD.ORG Mon May 12 22:30:10 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A09671C6; Mon, 12 May 2014 22:30:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C4E82CA2; Mon, 12 May 2014 22:30:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4CMUAwk092343; Mon, 12 May 2014 22:30:10 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4CMUA5Z092342; Mon, 12 May 2014 22:30:10 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405122230.s4CMUA5Z092342@svn.freebsd.org> From: Ian Lepore Date: Mon, 12 May 2014 22:30:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265939 - stable/10/sys/arm/ti/am335x X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2014 22:30:10 -0000 Author: ian Date: Mon May 12 22:30:10 2014 New Revision: 265939 URL: http://svnweb.freebsd.org/changeset/base/265939 Log: MFC r259744, cleanups to move global vars into softc, use named values, etc. Modified: stable/10/sys/arm/ti/am335x/am335x_dmtimer.c Modified: stable/10/sys/arm/ti/am335x/am335x_dmtimer.c ============================================================================== --- stable/10/sys/arm/ti/am335x/am335x_dmtimer.c Mon May 12 22:25:41 2014 (r265938) +++ stable/10/sys/arm/ti/am335x/am335x_dmtimer.c Mon May 12 22:30:10 2014 (r265939) @@ -99,13 +99,16 @@ struct am335x_dmtimer_softc { struct resource * tmr_mem_res[AM335X_NUM_TIMERS]; struct resource * tmr_irq_res[AM335X_NUM_TIMERS]; uint32_t sysclk_freq; - struct am335x_dmtimer { - bus_space_tag_t bst; - bus_space_handle_t bsh; - struct eventtimer et; - } t[AM335X_NUM_TIMERS]; + uint32_t tc_num; /* Which timer number is tc. */ + uint32_t et_num; /* Which timer number is et. */ + struct resource * tc_memres; /* Resources for tc timer. */ + struct resource * et_memres; /* Resources for et timer. */ + struct timecounter tc; + struct eventtimer et; }; +static struct am335x_dmtimer_softc *am335x_dmtimer_sc; + static struct resource_spec am335x_dmtimer_mem_spec[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, { SYS_RES_MEMORY, 1, RF_ACTIVE }, @@ -129,51 +132,58 @@ static struct resource_spec am335x_dmtim { -1, 0, 0 } }; -static struct am335x_dmtimer *am335x_dmtimer_tc_tmr = NULL; +static inline uint32_t +am335x_dmtimer_tc_read_4(struct am335x_dmtimer_softc *sc, uint32_t reg) +{ -/* Read/Write macros for Timer used as timecounter */ -#define am335x_dmtimer_tc_read_4(reg) \ - bus_space_read_4(am335x_dmtimer_tc_tmr->bst, \ - am335x_dmtimer_tc_tmr->bsh, reg) - -#define am335x_dmtimer_tc_write_4(reg, val) \ - bus_space_write_4(am335x_dmtimer_tc_tmr->bst, \ - am335x_dmtimer_tc_tmr->bsh, reg, val) - -/* Read/Write macros for Timer used as eventtimer */ -#define am335x_dmtimer_et_read_4(reg) \ - bus_space_read_4(tmr->bst, tmr->bsh, reg) - -#define am335x_dmtimer_et_write_4(reg, val) \ - bus_space_write_4(tmr->bst, tmr->bsh, reg, val) - -static unsigned am335x_dmtimer_tc_get_timecount(struct timecounter *); - -static struct timecounter am335x_dmtimer_tc = { - .tc_name = "AM335x Timecounter", - .tc_get_timecount = am335x_dmtimer_tc_get_timecount, - .tc_poll_pps = NULL, - .tc_counter_mask = ~0u, - .tc_frequency = 0, - .tc_quality = 1000, -}; + return (bus_read_4(sc->tc_memres, reg)); +} + +static inline void +am335x_dmtimer_tc_write_4(struct am335x_dmtimer_softc *sc, uint32_t reg, + uint32_t val) +{ + + bus_write_4(sc->tc_memres, reg, val); +} + +static inline uint32_t +am335x_dmtimer_et_read_4(struct am335x_dmtimer_softc *sc, uint32_t reg) +{ + + return (bus_read_4(sc->et_memres, reg)); +} + +static inline void +am335x_dmtimer_et_write_4(struct am335x_dmtimer_softc *sc, uint32_t reg, + uint32_t val) +{ + + bus_write_4(sc->et_memres, reg, val); +} static unsigned am335x_dmtimer_tc_get_timecount(struct timecounter *tc) { - return am335x_dmtimer_tc_read_4(DMT_TCRR); + struct am335x_dmtimer_softc *sc; + + sc = tc->tc_priv; + + return (am335x_dmtimer_tc_read_4(sc, DMT_TCRR)); } static int am335x_dmtimer_start(struct eventtimer *et, sbintime_t first, sbintime_t period) { - struct am335x_dmtimer *tmr = (struct am335x_dmtimer *)et->et_priv; - uint32_t load, count; - uint32_t tclr = 0; + struct am335x_dmtimer_softc *sc; + uint32_t count, load, tclr; + + sc = et->et_priv; + tclr = 0; if (period != 0) { load = ((uint32_t)et->et_frequency * period) >> 32; - tclr |= 2; /* autoreload bit */ + tclr |= DMT_TCLR_AUTOLOAD; panic("periodic timer not implemented\n"); } else { load = 0; @@ -185,23 +195,24 @@ am335x_dmtimer_start(struct eventtimer * count = load; /* Reset Timer */ - am335x_dmtimer_et_write_4(DMT_TSICR, 2); + am335x_dmtimer_et_write_4(sc, DMT_TSICR, DMT_TSICR_RESET); /* Wait for reset to complete */ - while (am335x_dmtimer_et_read_4(DMT_TIOCP_CFG) & 1); + while (am335x_dmtimer_et_read_4(sc, DMT_TIOCP_CFG) & DMT_TIOCP_RESET) + continue; /* set load value */ - am335x_dmtimer_et_write_4(DMT_TLDR, 0xFFFFFFFE - load); + am335x_dmtimer_et_write_4(sc, DMT_TLDR, 0xFFFFFFFE - load); /* set counter value */ - am335x_dmtimer_et_write_4(DMT_TCRR, 0xFFFFFFFE - count); + am335x_dmtimer_et_write_4(sc, DMT_TCRR, 0xFFFFFFFE - count); /* enable overflow interrupt */ - am335x_dmtimer_et_write_4(DMT_IRQENABLE_SET, 2); + am335x_dmtimer_et_write_4(sc, DMT_IRQENABLE_SET, DMT_IRQ_OVF); /* start timer(ST) */ - tclr |= 1; - am335x_dmtimer_et_write_4(DMT_TCLR, tclr); + tclr |= DMT_TCLR_START; + am335x_dmtimer_et_write_4(sc, DMT_TCLR, tclr); return (0); } @@ -209,13 +220,15 @@ am335x_dmtimer_start(struct eventtimer * static int am335x_dmtimer_stop(struct eventtimer *et) { - struct am335x_dmtimer *tmr = (struct am335x_dmtimer *)et->et_priv; + struct am335x_dmtimer_softc *sc; + + sc = et->et_priv; /* Disable all interrupts */ - am335x_dmtimer_et_write_4(DMT_IRQENABLE_CLR, 7); + am335x_dmtimer_et_write_4(sc, DMT_IRQENABLE_CLR, DMT_IRQ_MASK); /* Stop Timer */ - am335x_dmtimer_et_write_4(DMT_TCLR, 0); + am335x_dmtimer_et_write_4(sc, DMT_TCLR, 0); return (0); } @@ -223,12 +236,13 @@ am335x_dmtimer_stop(struct eventtimer *e static int am335x_dmtimer_intr(void *arg) { - struct am335x_dmtimer *tmr = (struct am335x_dmtimer *)arg; + struct am335x_dmtimer_softc *sc; + sc = arg; /* Ack interrupt */ - am335x_dmtimer_et_write_4(DMT_IRQSTATUS, 7); - if (tmr->et.et_active) - tmr->et.et_event_cb(&tmr->et, tmr->et.et_arg); + am335x_dmtimer_et_write_4(sc, DMT_IRQSTATUS, DMT_IRQ_OVF); + if (sc->et.et_active) + sc->et.et_event_cb(&sc->et, sc->et.et_arg); return (FILTER_HANDLED); } @@ -236,8 +250,6 @@ am335x_dmtimer_intr(void *arg) static int am335x_dmtimer_probe(device_t dev) { - struct am335x_dmtimer_softc *sc; - sc = (struct am335x_dmtimer_softc *)device_get_softc(dev); if (ofw_bus_is_compatible(dev, "ti,am335x-dmtimer")) { device_set_desc(dev, "AM335x DMTimer"); @@ -250,22 +262,29 @@ am335x_dmtimer_probe(device_t dev) static int am335x_dmtimer_attach(device_t dev) { - struct am335x_dmtimer_softc *sc = device_get_softc(dev); + struct am335x_dmtimer_softc *sc; void *ihl; int err; - int i; - if (am335x_dmtimer_tc_tmr != NULL) + /* + * Note that if this routine returns an error status rather than running + * to completion it makes no attempt to clean up allocated resources; + * the system is essentially dead anyway without functional timers. + */ + + sc = device_get_softc(dev); + + if (am335x_dmtimer_sc != NULL) return (EINVAL); - /* Get the base clock frequency */ + /* Get the base clock frequency. */ err = ti_prcm_clk_get_source_freq(SYS_CLK, &sc->sysclk_freq); if (err) { device_printf(dev, "Error: could not get sysclk frequency\n"); return (ENXIO); } - /* Request the memory resources */ + /* Request the memory resources. */ err = bus_alloc_resources(dev, am335x_dmtimer_mem_spec, sc->tmr_mem_res); if (err) { @@ -273,7 +292,7 @@ am335x_dmtimer_attach(device_t dev) return (ENXIO); } - /* Request the IRQ resources */ + /* Request the IRQ resources. */ err = bus_alloc_resources(dev, am335x_dmtimer_irq_spec, sc->tmr_irq_res); if (err) { @@ -281,65 +300,64 @@ am335x_dmtimer_attach(device_t dev) return (ENXIO); } - for(i=0;it[i].bst = rman_get_bustag(sc->tmr_mem_res[i]); - sc->t[i].bsh = rman_get_bushandle(sc->tmr_mem_res[i]); - } - - /* Configure DMTimer2 and DMTimer3 source and enable them */ - err = ti_prcm_clk_set_source(DMTIMER2_CLK, SYSCLK_CLK); - err |= ti_prcm_clk_enable(DMTIMER2_CLK); - err |= ti_prcm_clk_set_source(DMTIMER3_CLK, SYSCLK_CLK); - err |= ti_prcm_clk_enable(DMTIMER3_CLK); + /* Configure DMTimer3 as eventtimer and DMTimer4 as timecounter. */ + sc->et_num = 3; + sc->tc_num = 2; + sc->et_memres = sc->tmr_mem_res[sc->et_num]; + sc->tc_memres = sc->tmr_mem_res[sc->tc_num]; + + err = ti_prcm_clk_set_source(DMTIMER0_CLK + sc->et_num, SYSCLK_CLK); + err |= ti_prcm_clk_enable(DMTIMER0_CLK + sc->et_num); + err |= ti_prcm_clk_set_source(DMTIMER0_CLK + sc->tc_num, SYSCLK_CLK); + err |= ti_prcm_clk_enable(DMTIMER0_CLK + sc->tc_num); if (err) { device_printf(dev, "Error: could not setup timer clock\n"); return (ENXIO); } - /* Take DMTimer2 for TC */ - am335x_dmtimer_tc_tmr = &sc->t[2]; - - /* Reset Timer */ - am335x_dmtimer_tc_write_4(DMT_TSICR, 2); - - /* Wait for reset to complete */ - while (am335x_dmtimer_tc_read_4(DMT_TIOCP_CFG) & 1); - - /* set load value */ - am335x_dmtimer_tc_write_4(DMT_TLDR, 0); - - /* set counter value */ - am335x_dmtimer_tc_write_4(DMT_TCRR, 0); - - /* Set Timer autoreload(AR) and start timer(ST) */ - am335x_dmtimer_tc_write_4(DMT_TCLR, 3); - - am335x_dmtimer_tc.tc_frequency = sc->sysclk_freq; - tc_init(&am335x_dmtimer_tc); - - /* Register DMTimer3 as ET */ - - /* Setup and enable the timer */ - if (bus_setup_intr(dev, sc->tmr_irq_res[3], INTR_TYPE_CLK, - am335x_dmtimer_intr, NULL, &sc->t[3], &ihl) != 0) { + /* Set up timecounter; register tc. */ + am335x_dmtimer_tc_write_4(sc, DMT_TSICR, DMT_TSICR_RESET); + while (am335x_dmtimer_tc_read_4(sc, DMT_TIOCP_CFG) & DMT_TIOCP_RESET) + continue; + + am335x_dmtimer_tc_write_4(sc, DMT_TLDR, 0); + am335x_dmtimer_tc_write_4(sc, DMT_TCRR, 0); + am335x_dmtimer_tc_write_4(sc, DMT_TCLR, + DMT_TCLR_START | DMT_TCLR_AUTOLOAD); + + sc->tc.tc_name = "AM335x Timecounter"; + sc->tc.tc_get_timecount = am335x_dmtimer_tc_get_timecount; + sc->tc.tc_poll_pps = NULL; + sc->tc.tc_counter_mask = ~0u; + sc->tc.tc_frequency = sc->sysclk_freq; + sc->tc.tc_quality = 1000; + sc->tc.tc_priv = sc; + tc_init(&sc->tc); + + /* Setup eventtimer; register et. */ + if (bus_setup_intr(dev, sc->tmr_irq_res[sc->et_num], INTR_TYPE_CLK, + am335x_dmtimer_intr, NULL, sc, &ihl) != 0) { bus_release_resources(dev, am335x_dmtimer_irq_spec, sc->tmr_irq_res); device_printf(dev, "Unable to setup the clock irq handler.\n"); return (ENXIO); } - sc->t[3].et.et_name = "AM335x Eventtimer0"; - sc->t[3].et.et_flags = ET_FLAGS_PERIODIC | ET_FLAGS_ONESHOT; - sc->t[3].et.et_quality = 1000; - sc->t[3].et.et_frequency = sc->sysclk_freq; - sc->t[3].et.et_min_period = - (0x00000002LLU << 32) / sc->t[3].et.et_frequency; - sc->t[3].et.et_max_period = - (0xfffffffeLLU << 32) / sc->t[3].et.et_frequency; - sc->t[3].et.et_start = am335x_dmtimer_start; - sc->t[3].et.et_stop = am335x_dmtimer_stop; - sc->t[3].et.et_priv = &sc->t[3]; - et_register(&sc->t[3].et); + sc->et.et_name = "AM335x Eventtimer"; + sc->et.et_flags = ET_FLAGS_ONESHOT; + sc->et.et_quality = 1000; + sc->et.et_frequency = sc->sysclk_freq; + sc->et.et_min_period = + ((0x00000005LLU << 32) / sc->et.et_frequency); + sc->et.et_max_period = + (0xfffffffeLLU << 32) / sc->et.et_frequency; + sc->et.et_start = am335x_dmtimer_start; + sc->et.et_stop = am335x_dmtimer_stop; + sc->et.et_priv = sc; + et_register(&sc->et); + + /* Store a pointer to the softc for use in DELAY(). */ + am335x_dmtimer_sc = sc; return (0); } @@ -370,10 +388,13 @@ cpu_initclocks(void) void DELAY(int usec) { - int32_t counts; + struct am335x_dmtimer_softc *sc; + int32_t counts; uint32_t first, last; - if (am335x_dmtimer_tc_tmr == NULL) { + sc = am335x_dmtimer_sc; + + if (sc == NULL) { for (; usec > 0; usec--) for (counts = 200; counts > 0; counts--) /* Prevent gcc from optimizing out the loop */ @@ -382,13 +403,13 @@ DELAY(int usec) } /* Get the number of times to count */ - counts = usec * (am335x_dmtimer_tc.tc_frequency / 1000000) + 1; + counts = (usec + 1) * (sc->sysclk_freq / 1000000); - first = am335x_dmtimer_tc_read_4(DMT_TCRR); + first = am335x_dmtimer_tc_read_4(sc, DMT_TCRR); while (counts > 0) { - last = am335x_dmtimer_tc_read_4(DMT_TCRR); - if (last>first) { + last = am335x_dmtimer_tc_read_4(sc, DMT_TCRR); + if (last > first) { counts -= (int32_t)(last - first); } else { counts -= (int32_t)((0xFFFFFFFF - first) + last); From owner-svn-src-stable@FreeBSD.ORG Mon May 12 22:33:22 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD7354C5; Mon, 12 May 2014 22:33:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8E152D50; Mon, 12 May 2014 22:33:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4CMXMlH095411; Mon, 12 May 2014 22:33:22 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4CMXMsR095410; Mon, 12 May 2014 22:33:22 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405122233.s4CMXMsR095410@svn.freebsd.org> From: Ian Lepore Date: Mon, 12 May 2014 22:33:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265940 - stable/10/sys/arm/ti/am335x X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2014 22:33:23 -0000 Author: ian Date: Mon May 12 22:33:22 2014 New Revision: 265940 URL: http://svnweb.freebsd.org/changeset/base/265940 Log: MFC r259750, r260245: Add PPS support to the am335x timer driver. Modified: stable/10/sys/arm/ti/am335x/am335x_dmtimer.c Modified: stable/10/sys/arm/ti/am335x/am335x_dmtimer.c ============================================================================== --- stable/10/sys/arm/ti/am335x/am335x_dmtimer.c Mon May 12 22:30:10 2014 (r265939) +++ stable/10/sys/arm/ti/am335x/am335x_dmtimer.c Mon May 12 22:33:22 2014 (r265940) @@ -30,17 +30,22 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include #include +#include #include +#include #include #include #include #include #include +#include "opt_ntp.h" + #include #include #include @@ -50,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #define AM335X_NUM_TIMERS 8 @@ -62,9 +68,9 @@ __FBSDID("$FreeBSD$"); #define DMT_IRQENABLE_SET 0x2c /* IRQSTATUS Set Reg */ #define DMT_IRQENABLE_CLR 0x30 /* IRQSTATUS Clear Reg */ #define DMT_IRQWAKEEN 0x34 /* IRQ Wakeup Enable Reg */ -#define DMT_IRQ_TCAR (1 << 0) /* IRQ: Capture */ +#define DMT_IRQ_MAT (1 << 0) /* IRQ: Match */ #define DMT_IRQ_OVF (1 << 1) /* IRQ: Overflow */ -#define DMT_IRQ_MAT (1 << 2) /* IRQ: Match */ +#define DMT_IRQ_TCAR (1 << 2) /* IRQ: Capture */ #define DMT_IRQ_MASK (DMT_IRQ_TCAR | DMT_IRQ_OVF | DMT_IRQ_MAT) #define DMT_TCLR 0x38 /* Control Register */ #define DMT_TCLR_START (1 << 0) /* Start timer */ @@ -92,17 +98,32 @@ __FBSDID("$FreeBSD$"); #define DMT_TMAR 0x4C /* Match Reg */ #define DMT_TCAR1 0x50 /* Capture Reg */ #define DMT_TSICR 0x54 /* Synchr. Interface Ctrl Reg */ -#define DMT_TSICR_RESET 0x02 /* TSICR perform soft reset */ +#define DMT_TSICR_RESET (1 << 1) /* TSICR perform soft reset */ #define DMT_TCAR2 0x48 /* Capture Reg */ +/* + * Use timer 2 for the eventtimer. When PPS support is not compiled in, there's + * no need to use a timer that has an associated capture-input pin, so use timer + * 3 for timecounter. When PPS is compiled in we ignore the default and use + * whichever of timers 4-7 have the capture pin configured. + */ +#define DEFAULT_ET_TIMER 2 +#define DEFAULT_TC_TIMER 3 + struct am335x_dmtimer_softc { struct resource * tmr_mem_res[AM335X_NUM_TIMERS]; struct resource * tmr_irq_res[AM335X_NUM_TIMERS]; uint32_t sysclk_freq; uint32_t tc_num; /* Which timer number is tc. */ - uint32_t et_num; /* Which timer number is et. */ + uint32_t tc_tclr; /* Cached tc TCLR register. */ struct resource * tc_memres; /* Resources for tc timer. */ + uint32_t et_num; /* Which timer number is et. */ + uint32_t et_tclr; /* Cached et TCLR register. */ struct resource * et_memres; /* Resources for et timer. */ + int pps_curmode; /* Edge mode now set in hw. */ + struct task pps_task; /* For pps_event handling. */ + struct cdev * pps_cdev; + struct pps_state pps; struct timecounter tc; struct eventtimer et; }; @@ -162,6 +183,255 @@ am335x_dmtimer_et_write_4(struct am335x_ bus_write_4(sc->et_memres, reg, val); } +/* + * PPS driver routines, included when the kernel is built with option PPS_SYNC. + * + * Note that this PPS driver does not use an interrupt. Instead it uses the + * hardware's ability to latch the timer's count register in response to a + * signal on an IO pin. Each of timers 4-7 have an associated pin, and this + * code allows any one of those to be used. + * + * The timecounter routines in kern_tc.c call the pps poll routine periodically + * to see if a new counter value has been latched. When a new value has been + * latched, the only processing done in the poll routine is to capture the + * current set of timecounter timehands (done with pps_capture()) and the + * latched value from the timer. The remaining work (done by pps_event()) is + * scheduled to be done later in a non-interrupt context. + */ +#ifdef PPS_SYNC + +#define PPS_CDEV_NAME "pps" + +static void +am335x_dmtimer_set_capture_mode(struct am335x_dmtimer_softc *sc, bool force_off) +{ + int newmode; + + if (force_off) + newmode = 0; + else + newmode = sc->pps.ppsparam.mode & PPS_CAPTUREBOTH; + + if (newmode == sc->pps_curmode) + return; + + sc->pps_curmode = newmode; + sc->tc_tclr &= ~DMT_TCLR_CAPTRAN_MASK; + switch (newmode) { + case PPS_CAPTUREASSERT: + sc->tc_tclr |= DMT_TCLR_CAPTRAN_LOHI; + break; + case PPS_CAPTURECLEAR: + sc->tc_tclr |= DMT_TCLR_CAPTRAN_HILO; + break; + default: + /* It can't be BOTH, so it's disabled. */ + break; + } + am335x_dmtimer_tc_write_4(sc, DMT_TCLR, sc->tc_tclr); +} + +static void +am335x_dmtimer_tc_poll_pps(struct timecounter *tc) +{ + struct am335x_dmtimer_softc *sc; + + sc = tc->tc_priv; + + /* + * Note that we don't have the TCAR interrupt enabled, but the hardware + * still provides the status bits in the "RAW" status register even when + * they're masked from generating an irq. However, when clearing the + * TCAR status to re-arm the capture for the next second, we have to + * write to the IRQ status register, not the RAW register. Quirky. + */ + if (am335x_dmtimer_tc_read_4(sc, DMT_IRQSTATUS_RAW) & DMT_IRQ_TCAR) { + pps_capture(&sc->pps); + sc->pps.capcount = am335x_dmtimer_tc_read_4(sc, DMT_TCAR1); + am335x_dmtimer_tc_write_4(sc, DMT_IRQSTATUS, DMT_IRQ_TCAR); + taskqueue_enqueue_fast(taskqueue_fast, &sc->pps_task); + } +} + +static void +am335x_dmtimer_process_pps_event(void *arg, int pending) +{ + struct am335x_dmtimer_softc *sc; + + sc = arg; + + /* This is the task function that gets enqueued by poll_pps. Once the + * time has been captured in the hw interrupt context, the remaining + * (more expensive) work to process the event is done later in a + * non-fast-interrupt context. + * + * We only support capture of the rising or falling edge, not both at + * once; tell the kernel to process whichever mode is currently active. + */ + pps_event(&sc->pps, sc->pps.ppsparam.mode & PPS_CAPTUREBOTH); +} + +static int +am335x_dmtimer_pps_open(struct cdev *dev, int flags, int fmt, + struct thread *td) +{ + struct am335x_dmtimer_softc *sc; + + sc = dev->si_drv1; + + /* Enable capture on open. Harmless if already open. */ + am335x_dmtimer_set_capture_mode(sc, 0); + + return 0; +} + +static int +am335x_dmtimer_pps_close(struct cdev *dev, int flags, int fmt, + struct thread *td) +{ + struct am335x_dmtimer_softc *sc; + + sc = dev->si_drv1; + + /* + * Disable capture on last close. Use the force-off flag to override + * the configured mode and turn off the hardware capture. + */ + am335x_dmtimer_set_capture_mode(sc, 1); + + return 0; +} + +static int +am335x_dmtimer_pps_ioctl(struct cdev *dev, u_long cmd, caddr_t data, + int flags, struct thread *td) +{ + struct am335x_dmtimer_softc *sc; + int err; + + sc = dev->si_drv1; + + /* + * The hardware has a "capture both edges" mode, but we can't do + * anything useful with it in terms of PPS capture, so don't even try. + */ + if ((sc->pps.ppsparam.mode & PPS_CAPTUREBOTH) == PPS_CAPTUREBOTH) + return (EINVAL); + + /* Let the kernel do the heavy lifting for ioctl. */ + err = pps_ioctl(cmd, data, &sc->pps); + if (err != 0) + return (err); + + /* + * The capture mode could have changed, set the hardware to whatever + * mode is now current. Effectively a no-op if nothing changed. + */ + am335x_dmtimer_set_capture_mode(sc, 0); + + return (err); +} + +static struct cdevsw am335x_dmtimer_pps_cdevsw = { + .d_version = D_VERSION, + .d_open = am335x_dmtimer_pps_open, + .d_close = am335x_dmtimer_pps_close, + .d_ioctl = am335x_dmtimer_pps_ioctl, + .d_name = PPS_CDEV_NAME, +}; + +/* + * Set up the PPS cdev and the the kernel timepps stuff. + * + * Note that this routine cannot touch the hardware, because bus space resources + * are not fully set up yet when this is called. + */ +static int +am335x_dmtimer_pps_init(device_t dev, struct am335x_dmtimer_softc *sc) +{ + int i, timer_num, unit; + unsigned int padstate; + const char * padmux; + struct padinfo { + char * ballname; + char * muxname; + int timer_num; + } padinfo[] = { + {"GPMC_ADVn_ALE", "timer4", 4}, + {"GPMC_BEn0_CLE", "timer5", 5}, + {"GPMC_WEn", "timer6", 6}, + {"GPMC_OEn_REn", "timer7", 7}, + }; + + /* + * Figure out which pin the user has set up for pps. We'll use the + * first timer that has an external caputure pin configured as input. + * + * XXX The hieroglyphic "(padstate & (0x01 << 5)))" checks that the pin + * is configured for input. The right symbolic values aren't exported + * yet from ti_scm.h. + */ + timer_num = 0; + for (i = 0; i < nitems(padinfo) && timer_num == 0; ++i) { + if (ti_scm_padconf_get(padinfo[i].ballname, &padmux, + &padstate) == 0) { + if (strcasecmp(padinfo[i].muxname, padmux) == 0 && + (padstate & (0x01 << 5))) + timer_num = padinfo[i].timer_num; + } + } + + if (timer_num == 0) { + device_printf(dev, "No DMTimer found with capture pin " + "configured as input; PPS driver disabled.\n"); + return (DEFAULT_TC_TIMER); + } + + /* + * Indicate our capabilities (pretty much just capture of either edge). + * Have the kernel init its part of the pps_state struct and add its + * capabilities. + */ + sc->pps.ppscap = PPS_CAPTUREBOTH; + pps_init(&sc->pps); + + /* + * Set up to capture the PPS via timecounter polling, and init the task + * that does deferred pps_event() processing after capture. + */ + sc->tc.tc_poll_pps = am335x_dmtimer_tc_poll_pps; + TASK_INIT(&sc->pps_task, 0, am335x_dmtimer_process_pps_event, sc); + + /* Create the PPS cdev. */ + unit = device_get_unit(dev); + sc->pps_cdev = make_dev(&am335x_dmtimer_pps_cdevsw, unit, + UID_ROOT, GID_WHEEL, 0600, PPS_CDEV_NAME "%d", unit); + sc->pps_cdev->si_drv1 = sc; + + device_printf(dev, "Using DMTimer%d for PPS device /dev/%s%d\n", + timer_num, PPS_CDEV_NAME, unit); + + return (timer_num); +} + +#else /* PPS_SYNC */ + +static int +am335x_dmtimer_pps_init(device_t dev, struct am335x_dmtimer_softc *sc) +{ + + /* + * When PPS support is not compiled in, there's no need to use a timer + * that has an associated capture-input pin, so use the default. + */ + return (DEFAULT_TC_TIMER); +} + +#endif /* PPS_SYNC */ +/* + * End of PPS driver code. + */ + static unsigned am335x_dmtimer_tc_get_timecount(struct timecounter *tc) { @@ -176,43 +446,50 @@ static int am335x_dmtimer_start(struct eventtimer *et, sbintime_t first, sbintime_t period) { struct am335x_dmtimer_softc *sc; - uint32_t count, load, tclr; + uint32_t initial_count, reload_count; sc = et->et_priv; - tclr = 0; + /* + * Stop the timer before changing it. This routine will often be called + * while the timer is still running, to either lengthen or shorten the + * current event time. We need to ensure the timer doesn't expire while + * we're working with it. + * + * Also clear any pending interrupt status, because it's at least + * theoretically possible that we're running in a primary interrupt + * context now, and a timer interrupt could be pending even before we + * stopped the timer. The more likely case is that we're being called + * from the et_event_cb() routine dispatched from our own handler, but + * it's not clear to me that that's the only case possible. + */ + sc->et_tclr &= ~(DMT_TCLR_START | DMT_TCLR_AUTOLOAD); + am335x_dmtimer_et_write_4(sc, DMT_TCLR, sc->et_tclr); + am335x_dmtimer_et_write_4(sc, DMT_IRQSTATUS, DMT_IRQ_OVF); + if (period != 0) { - load = ((uint32_t)et->et_frequency * period) >> 32; - tclr |= DMT_TCLR_AUTOLOAD; - panic("periodic timer not implemented\n"); + reload_count = ((uint32_t)et->et_frequency * period) >> 32; + sc->et_tclr |= DMT_TCLR_AUTOLOAD; } else { - load = 0; + reload_count = 0; } if (first != 0) - count = ((uint32_t)et->et_frequency * first) >> 32; + initial_count = ((uint32_t)et->et_frequency * first) >> 32; else - count = load; - - /* Reset Timer */ - am335x_dmtimer_et_write_4(sc, DMT_TSICR, DMT_TSICR_RESET); - - /* Wait for reset to complete */ - while (am335x_dmtimer_et_read_4(sc, DMT_TIOCP_CFG) & DMT_TIOCP_RESET) - continue; + initial_count = reload_count; - /* set load value */ - am335x_dmtimer_et_write_4(sc, DMT_TLDR, 0xFFFFFFFE - load); - - /* set counter value */ - am335x_dmtimer_et_write_4(sc, DMT_TCRR, 0xFFFFFFFE - count); + /* + * Set auto-reload and current-count values. This timer hardware counts + * up from the initial/reload value and interrupts on the zero rollover. + */ + am335x_dmtimer_et_write_4(sc, DMT_TLDR, 0xFFFFFFFF - reload_count); + am335x_dmtimer_et_write_4(sc, DMT_TCRR, 0xFFFFFFFF - initial_count); - /* enable overflow interrupt */ + /* Enable overflow interrupt, and start the timer. */ am335x_dmtimer_et_write_4(sc, DMT_IRQENABLE_SET, DMT_IRQ_OVF); - - /* start timer(ST) */ - tclr |= DMT_TCLR_START; - am335x_dmtimer_et_write_4(sc, DMT_TCLR, tclr); + sc->et_tclr |= DMT_TCLR_START; + am335x_dmtimer_et_write_4(sc, DMT_TCLR, sc->et_tclr); return (0); } @@ -224,12 +501,11 @@ am335x_dmtimer_stop(struct eventtimer *e sc = et->et_priv; - /* Disable all interrupts */ - am335x_dmtimer_et_write_4(sc, DMT_IRQENABLE_CLR, DMT_IRQ_MASK); - - /* Stop Timer */ - am335x_dmtimer_et_write_4(sc, DMT_TCLR, 0); - + /* Stop timer, disable and clear interrupt. */ + sc->et_tclr &= ~(DMT_TCLR_START | DMT_TCLR_AUTOLOAD); + am335x_dmtimer_et_write_4(sc, DMT_TCLR, sc->et_tclr); + am335x_dmtimer_et_write_4(sc, DMT_IRQENABLE_CLR, DMT_IRQ_OVF); + am335x_dmtimer_et_write_4(sc, DMT_IRQSTATUS, DMT_IRQ_OVF); return (0); } @@ -239,7 +515,8 @@ am335x_dmtimer_intr(void *arg) struct am335x_dmtimer_softc *sc; sc = arg; - /* Ack interrupt */ + + /* Ack the interrupt, and invoke the callback if it's still enabled. */ am335x_dmtimer_et_write_4(sc, DMT_IRQSTATUS, DMT_IRQ_OVF); if (sc->et.et_active) sc->et.et_event_cb(&sc->et, sc->et.et_arg); @@ -300,51 +577,53 @@ am335x_dmtimer_attach(device_t dev) return (ENXIO); } - /* Configure DMTimer3 as eventtimer and DMTimer4 as timecounter. */ - sc->et_num = 3; - sc->tc_num = 2; + /* + * Use the default eventtimer. Let the PPS init routine decide which + * timer to use for the timecounter. + */ + sc->et_num = DEFAULT_ET_TIMER; + sc->tc_num = am335x_dmtimer_pps_init(dev, sc); + sc->et_memres = sc->tmr_mem_res[sc->et_num]; sc->tc_memres = sc->tmr_mem_res[sc->tc_num]; + /* Enable clocks and power on the chosen devices. */ err = ti_prcm_clk_set_source(DMTIMER0_CLK + sc->et_num, SYSCLK_CLK); err |= ti_prcm_clk_enable(DMTIMER0_CLK + sc->et_num); err |= ti_prcm_clk_set_source(DMTIMER0_CLK + sc->tc_num, SYSCLK_CLK); err |= ti_prcm_clk_enable(DMTIMER0_CLK + sc->tc_num); if (err) { - device_printf(dev, "Error: could not setup timer clock\n"); + device_printf(dev, "Error: could not enable timer clock\n"); return (ENXIO); } - /* Set up timecounter; register tc. */ + /* Setup eventtimer interrupt handler. */ + if (bus_setup_intr(dev, sc->tmr_irq_res[sc->et_num], INTR_TYPE_CLK, + am335x_dmtimer_intr, NULL, sc, &ihl) != 0) { + device_printf(dev, "Unable to setup the clock irq handler.\n"); + return (ENXIO); + } + + /* Set up timecounter, start it, register it. */ am335x_dmtimer_tc_write_4(sc, DMT_TSICR, DMT_TSICR_RESET); while (am335x_dmtimer_tc_read_4(sc, DMT_TIOCP_CFG) & DMT_TIOCP_RESET) continue; + sc->tc_tclr |= DMT_TCLR_START | DMT_TCLR_AUTOLOAD; am335x_dmtimer_tc_write_4(sc, DMT_TLDR, 0); am335x_dmtimer_tc_write_4(sc, DMT_TCRR, 0); - am335x_dmtimer_tc_write_4(sc, DMT_TCLR, - DMT_TCLR_START | DMT_TCLR_AUTOLOAD); + am335x_dmtimer_tc_write_4(sc, DMT_TCLR, sc->tc_tclr); sc->tc.tc_name = "AM335x Timecounter"; sc->tc.tc_get_timecount = am335x_dmtimer_tc_get_timecount; - sc->tc.tc_poll_pps = NULL; sc->tc.tc_counter_mask = ~0u; sc->tc.tc_frequency = sc->sysclk_freq; sc->tc.tc_quality = 1000; sc->tc.tc_priv = sc; tc_init(&sc->tc); - /* Setup eventtimer; register et. */ - if (bus_setup_intr(dev, sc->tmr_irq_res[sc->et_num], INTR_TYPE_CLK, - am335x_dmtimer_intr, NULL, sc, &ihl) != 0) { - bus_release_resources(dev, am335x_dmtimer_irq_spec, - sc->tmr_irq_res); - device_printf(dev, "Unable to setup the clock irq handler.\n"); - return (ENXIO); - } - sc->et.et_name = "AM335x Eventtimer"; - sc->et.et_flags = ET_FLAGS_ONESHOT; + sc->et.et_flags = ET_FLAGS_PERIODIC | ET_FLAGS_ONESHOT; sc->et.et_quality = 1000; sc->et.et_frequency = sc->sysclk_freq; sc->et.et_min_period = From owner-svn-src-stable@FreeBSD.ORG Tue May 13 05:21:55 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 123D4B29; Tue, 13 May 2014 05:21:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F3B362CA9; Tue, 13 May 2014 05:21:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4D5LsLa075164; Tue, 13 May 2014 05:21:54 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4D5LsG8075163; Tue, 13 May 2014 05:21:54 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201405130521.s4D5LsG8075163@svn.freebsd.org> From: Alan Cox Date: Tue, 13 May 2014 05:21:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265944 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 05:21:55 -0000 Author: alc Date: Tue May 13 05:21:54 2014 New Revision: 265944 URL: http://svnweb.freebsd.org/changeset/base/265944 Log: MFC r260567 Correctly update the count of stuck pages, "addl_page_shortage", in vm_pageout_scan(). There were missing increments in two less common cases. Don't conflate the count of stuck pages and the pageout deficit provided by vm_page_alloc{,_contig}(). Handle held pages consistently in the inactive queue scan. In the more common case, we did not move the page to the tail of the queue. Whereas, in the less common case, we did. There's no particular reason to move the page in the less common case, so remove it. Perform the calculation of the page shortage for the active queue scan a little earlier, before the active queue lock is acquired. The correctness of this calculation doesn't depend on the active queue lock being held. Eliminate a redundant variable, "pcount". Use the more descriptive variable, "maxscan", in its place. Apply a few nearby style fixes, e.g., eliminate stray whitespace and excess parentheses. Modified: stable/10/sys/vm/vm_pageout.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_pageout.c ============================================================================== --- stable/10/sys/vm/vm_pageout.c Tue May 13 05:19:29 2014 (r265943) +++ stable/10/sys/vm/vm_pageout.c Tue May 13 05:21:54 2014 (r265944) @@ -909,10 +909,8 @@ vm_pageout_scan(struct vm_domain *vmd, i { vm_page_t m, next; struct vm_pagequeue *pq; - int page_shortage, maxscan, pcount; - int addl_page_shortage; vm_object_t object; - int act_delta; + int act_delta, addl_page_shortage, deficit, maxscan, page_shortage; int vnodes_skipped = 0; int maxlaunder; int lockmode; @@ -942,13 +940,15 @@ vm_pageout_scan(struct vm_domain *vmd, i * number of pages from the inactive count that should be * discounted in setting the target for the active queue scan. */ - addl_page_shortage = atomic_readandclear_int(&vm_pageout_deficit); + addl_page_shortage = 0; + + deficit = atomic_readandclear_int(&vm_pageout_deficit); /* * Calculate the number of pages we want to either free or move * to the cache. */ - page_shortage = vm_paging_target() + addl_page_shortage; + page_shortage = vm_paging_target() + deficit; /* * maxlaunder limits the number of dirty pages we flush per scan. @@ -1245,6 +1245,7 @@ vm_pageout_scan(struct vm_domain *vmd, i */ if (vm_page_busied(m)) { vm_page_unlock(m); + addl_page_shortage++; goto unlock_and_continue; } @@ -1252,9 +1253,9 @@ vm_pageout_scan(struct vm_domain *vmd, i * If the page has become held it might * be undergoing I/O, so skip it */ - if (m->hold_count) { + if (m->hold_count != 0) { vm_page_unlock(m); - vm_page_requeue_locked(m); + addl_page_shortage++; if (object->flags & OBJ_MIGHTBEDIRTY) vnodes_skipped++; goto unlock_and_continue; @@ -1309,19 +1310,20 @@ relock_queues: * Compute the number of pages we want to try to move from the * active queue to the inactive queue. */ + page_shortage = cnt.v_inactive_target - cnt.v_inactive_count + + vm_paging_target() + deficit + addl_page_shortage; + pq = &vmd->vmd_pagequeues[PQ_ACTIVE]; vm_pagequeue_lock(pq); - pcount = pq->pq_cnt; - page_shortage = vm_paging_target() + - cnt.v_inactive_target - cnt.v_inactive_count; - page_shortage += addl_page_shortage; + maxscan = pq->pq_cnt; + /* * If we're just idle polling attempt to visit every * active page within 'update_period' seconds. */ - if (pass == 0 && vm_pageout_update_period != 0) { - pcount /= vm_pageout_update_period; - page_shortage = pcount; + if (pass == 0 && vm_pageout_update_period != 0) { + maxscan /= vm_pageout_update_period; + page_shortage = maxscan; } /* @@ -1330,7 +1332,7 @@ relock_queues: * deactivation candidates. */ m = TAILQ_FIRST(&pq->pq_pl); - while ((m != NULL) && (pcount-- > 0) && (page_shortage > 0)) { + while (m != NULL && maxscan-- > 0 && page_shortage > 0) { KASSERT(m->queue == PQ_ACTIVE, ("vm_pageout_scan: page %p isn't active", m)); From owner-svn-src-stable@FreeBSD.ORG Tue May 13 05:26:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AAF80D51; Tue, 13 May 2014 05:26:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7EF382CEF; Tue, 13 May 2014 05:26:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4D5Qhd3075846; Tue, 13 May 2014 05:26:43 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4D5Qh5f075845; Tue, 13 May 2014 05:26:43 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201405130526.s4D5Qh5f075845@svn.freebsd.org> From: Alan Cox Date: Tue, 13 May 2014 05:26:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265945 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 05:26:43 -0000 Author: alc Date: Tue May 13 05:26:43 2014 New Revision: 265945 URL: http://svnweb.freebsd.org/changeset/base/265945 Log: MFC r265418 Prior to r254304, a separate function, vm_pageout_page_stats(), was used to periodically update the reference status of the active pages. This function was called, instead of vm_pageout_scan(), when memory was not scarce. The objective was to provide up to date reference status for active pages in case memory did become scarce and active pages needed to be deactivated. The active page queue scan performed by vm_pageout_page_stats() was virtually identical to that performed by vm_pageout_scan(), and so r254304 eliminated vm_pageout_page_stats(). Instead, vm_pageout_scan() is called with the parameter "pass" set to zero. The intention was that when pass is zero, vm_pageout_scan() would only scan the active queue. However, the variable page_shortage can still be greater than zero when memory is not scarce and vm_pageout_scan() is called with pass equal to zero. Consequently, the inactive queue may be scanned and dirty pages laundered even though that was not intended by r254304. This revision fixes that. Modified: stable/10/sys/vm/vm_pageout.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_pageout.c ============================================================================== --- stable/10/sys/vm/vm_pageout.c Tue May 13 05:21:54 2014 (r265944) +++ stable/10/sys/vm/vm_pageout.c Tue May 13 05:26:43 2014 (r265945) @@ -942,13 +942,15 @@ vm_pageout_scan(struct vm_domain *vmd, i */ addl_page_shortage = 0; - deficit = atomic_readandclear_int(&vm_pageout_deficit); - /* * Calculate the number of pages we want to either free or move * to the cache. */ - page_shortage = vm_paging_target() + deficit; + if (pass > 0) { + deficit = atomic_readandclear_int(&vm_pageout_deficit); + page_shortage = vm_paging_target() + deficit; + } else + page_shortage = deficit = 0; /* * maxlaunder limits the number of dirty pages we flush per scan. From owner-svn-src-stable@FreeBSD.ORG Tue May 13 05:32:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C8F28EBC; Tue, 13 May 2014 05:32:40 +0000 (UTC) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 89B912D78; Tue, 13 May 2014 05:32:40 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 0CAC4783F63; Tue, 13 May 2014 15:32:32 +1000 (EST) Date: Tue, 13 May 2014 15:32:31 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Andrey Chernov Subject: Re: svn commit: r265901 - stable/10/sys/kern In-Reply-To: <5371081A.2070703@freebsd.org> Message-ID: <20140513150452.R2958@besplex.bde.org> References: <201405120427.s4C4RAZf093033@svn.freebsd.org> <5370F110.5050502@freebsd.org> <20140512170322.GA2479@stack.nl> <5371081A.2070703@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=QIpRGG7L c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=syaZHqrdBKwA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=i1eFTGOA1oohQBZ4AMsA:9 a=g5t_JHQO4ZTDTcVu:21 a=hJ3xz1m3iuSP41rW:21 a=CjuIK1q_8ugA:10 Cc: src-committers@freebsd.org, svn-src-stable-10@freebsd.org, Jilles Tjoelker , svn-src-stable@freebsd.org, Don Lewis , svn-src-all@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 05:32:40 -0000 On Mon, 12 May 2014, Andrey Chernov wrote: > On 12.05.2014 21:03, Jilles Tjoelker wrote: >> On Mon, May 12, 2014 at 08:04:32PM +0400, Andrey Chernov wrote: >>> On 12.05.2014 8:27, Don Lewis wrote: >>>> + if (start + amask < start) { >>>> + DPRINTF(("start+amask wrapped around\n")); >>>> + goto out; >>>> + } >> >>> Checking for overflow _after_ it happens is unportable and dangerous, >>> since wrapping around is not only one possible result. They should be >>> rewritten like that: >> >>> if (start > ULONG_MAX - amask) >> >> Unsigned types wrap around per the C standard. Overflow checking after >> it happens is fine. >> >> You are right for signed types. > > You are right. The C Standard, 6.2.5, paragraph 9 [ISO/IEC 9899:2011], > states: Actually, there is a problem with promotions. The rman code is correct, since all the types are hard-coded as u_long (even correctly spelled as that), so we know that the promotions don't expand them. (Expansion would allow start + amask to hold a larger value, and would also change the type to signed.) Similar code in vm is technically broken, since the types are are usually vm_offset_t and that can be anything in theory. It might be u_char or u_short. Both normally promote to int. POSIX requires u_char to be 8 bits, so it is always too small for vm_offset_t, but u_short can be large enough (e.g., u_short 64 bits, u_int 65 bits, u_long 130 bits, u_long_long 260 bits, uintmax_t 520 bits for a machine with a 64-bit address space but 65-bit registers :-). > "A computation involving unsigned operands can never overflow, because a > result that cannot be represented by the resulting unsigned integer type > is reduced modulo the number that is one greater than the largest value > that can be represented by the resulting type." This is bad wording, since the "resulting type" isn't always unsigned unless "unsigned operands" is interpreted as "operands, which are unsigned after promotion". Similar code in vm: % int % sys_mmap(td, uap) % ... % vm_offset_t addr; % ... % vm_size_t size, pageoff; % ... % if (addr + size < addr) % return (EINVAL); Here addr and size have logically different types, so they might have quite different promotitions (largest wins). Typedefs are too hard for me. Rewriting this using (__maxof(__typeof(foo)) - foo) (where foo is one of the operands in the addition) works well here too. Bruce From owner-svn-src-stable@FreeBSD.ORG Tue May 13 06:05:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3C44F36B; Tue, 13 May 2014 06:05:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 273AE2FA4; Tue, 13 May 2014 06:05:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4D65t70092989; Tue, 13 May 2014 06:05:55 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4D65rsn092973; Tue, 13 May 2014 06:05:53 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201405130605.s4D65rsn092973@svn.freebsd.org> From: Kevin Lo Date: Tue, 13 May 2014 06:05:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265946 - in stable/10: lib/libc/net sys/netinet sys/netinet6 sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 06:05:56 -0000 Author: kevlo Date: Tue May 13 06:05:53 2014 New Revision: 265946 URL: http://svnweb.freebsd.org/changeset/base/265946 Log: MFC r264212,r264213,r264248,r265776,r265811,r265909: - Add support for UDP-Lite protocol (RFC 3828) to IPv4 and IPv6 stacks. Tested with vlc and a test suite [1]. [1] http://www.erg.abdn.ac.uk/~gerrit/udp-lite/files/udplite_linux.tar.gz Reviewed by: jhb, glebius, adrian - Fix a logic bug which prevented the sending of UDP packet with 0 checksum. - Disable TX checksum offload for UDP-Lite completely. It wasn't used for partial checksum coverage, but even for full checksum coverage it doesn't work. Added: stable/10/sys/netinet/udplite.h - copied unchanged from r264212, head/sys/netinet/udplite.h Modified: stable/10/lib/libc/net/getaddrinfo.c stable/10/sys/netinet/in.c stable/10/sys/netinet/in.h stable/10/sys/netinet/in_pcb.c stable/10/sys/netinet/in_proto.c stable/10/sys/netinet/udp_usrreq.c stable/10/sys/netinet/udp_var.h stable/10/sys/netinet6/in6_ifattach.c stable/10/sys/netinet6/in6_proto.c stable/10/sys/netinet6/udp6_usrreq.c stable/10/sys/netinet6/udp6_var.h stable/10/sys/sys/param.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/net/getaddrinfo.c ============================================================================== --- stable/10/lib/libc/net/getaddrinfo.c Tue May 13 05:26:43 2014 (r265945) +++ stable/10/lib/libc/net/getaddrinfo.c Tue May 13 06:05:53 2014 (r265946) @@ -170,12 +170,14 @@ static const struct explore explore[] = { PF_INET6, SOCK_STREAM, IPPROTO_TCP, 0x07 }, { PF_INET6, SOCK_STREAM, IPPROTO_SCTP, 0x03 }, { PF_INET6, SOCK_SEQPACKET, IPPROTO_SCTP, 0x07 }, + { PF_INET6, SOCK_DGRAM, IPPROTO_UDPLITE, 0x03 }, { PF_INET6, SOCK_RAW, ANY, 0x05 }, #endif { PF_INET, SOCK_DGRAM, IPPROTO_UDP, 0x07 }, { PF_INET, SOCK_STREAM, IPPROTO_TCP, 0x07 }, { PF_INET, SOCK_STREAM, IPPROTO_SCTP, 0x03 }, { PF_INET, SOCK_SEQPACKET, IPPROTO_SCTP, 0x07 }, + { PF_INET, SOCK_DGRAM, IPPROTO_UDPLITE, 0x03 }, { PF_INET, SOCK_RAW, ANY, 0x05 }, { -1, 0, 0, 0 }, }; @@ -1477,6 +1479,9 @@ get_port(struct addrinfo *ai, const char case IPPROTO_SCTP: proto = "sctp"; break; + case IPPROTO_UDPLITE: + proto = "udplite"; + break; default: proto = NULL; break; Modified: stable/10/sys/netinet/in.c ============================================================================== --- stable/10/sys/netinet/in.c Tue May 13 05:26:43 2014 (r265945) +++ stable/10/sys/netinet/in.c Tue May 13 06:05:53 2014 (r265946) @@ -1167,6 +1167,7 @@ in_ifdetach(struct ifnet *ifp) in_pcbpurgeif0(&V_ripcbinfo, ifp); in_pcbpurgeif0(&V_udbinfo, ifp); + in_pcbpurgeif0(&V_ulitecbinfo, ifp); in_purgemaddrs(ifp); } Modified: stable/10/sys/netinet/in.h ============================================================================== --- stable/10/sys/netinet/in.h Tue May 13 05:26:43 2014 (r265945) +++ stable/10/sys/netinet/in.h Tue May 13 06:05:53 2014 (r265946) @@ -237,12 +237,17 @@ __END_DECLS #define IPPROTO_IPCOMP 108 /* payload compression (IPComp) */ #define IPPROTO_SCTP 132 /* SCTP */ #define IPPROTO_MH 135 /* IPv6 Mobility Header */ +#define IPPROTO_UDPLITE 136 /* UDP-Lite */ +#define IPPROTO_HIP 139 /* IP6 Host Identity Protocol */ +#define IPPROTO_SHIM6 140 /* IP6 Shim6 Protocol */ /* 101-254: Partly Unassigned */ #define IPPROTO_PIM 103 /* Protocol Independent Mcast */ #define IPPROTO_CARP 112 /* CARP */ #define IPPROTO_PGM 113 /* PGM */ #define IPPROTO_MPLS 137 /* MPLS-in-IP */ #define IPPROTO_PFSYNC 240 /* PFSYNC */ +#define IPPROTO_RESERVED_253 253 /* Reserved */ +#define IPPROTO_RESERVED_254 254 /* Reserved */ /* 255: Reserved */ /* BSD Private, local use, namespace incursion, no longer used */ #define IPPROTO_OLD_DIVERT 254 /* OLD divert pseudo-proto */ Modified: stable/10/sys/netinet/in_pcb.c ============================================================================== --- stable/10/sys/netinet/in_pcb.c Tue May 13 05:26:43 2014 (r265945) +++ stable/10/sys/netinet/in_pcb.c Tue May 13 06:05:53 2014 (r265946) @@ -386,13 +386,14 @@ in_pcb_lport(struct inpcb *inp, struct i lastport = &pcbinfo->ipi_lastport; } /* - * For UDP, use random port allocation as long as the user + * For UDP(-Lite), use random port allocation as long as the user * allows it. For TCP (and as of yet unknown) connections, * use random port allocation only if the user allows it AND * ipport_tick() allows it. */ if (V_ipport_randomized && - (!V_ipport_stoprandom || pcbinfo == &V_udbinfo)) + (!V_ipport_stoprandom || pcbinfo == &V_udbinfo || + pcbinfo == &V_ulitecbinfo)) dorandom = 1; else dorandom = 0; @@ -402,8 +403,8 @@ in_pcb_lport(struct inpcb *inp, struct i */ if (first == last) dorandom = 0; - /* Make sure to not include UDP packets in the count. */ - if (pcbinfo != &V_udbinfo) + /* Make sure to not include UDP(-Lite) packets in the count. */ + if (pcbinfo != &V_udbinfo || pcbinfo != &V_ulitecbinfo) V_ipport_tcpallocs++; /* * Instead of having two loops further down counting up or down Modified: stable/10/sys/netinet/in_proto.c ============================================================================== --- stable/10/sys/netinet/in_proto.c Tue May 13 05:26:43 2014 (r265945) +++ stable/10/sys/netinet/in_proto.c Tue May 13 06:05:53 2014 (r265946) @@ -184,6 +184,20 @@ struct protosw inetsw[] = { }, #endif /* SCTP */ { + .pr_type = SOCK_DGRAM, + .pr_domain = &inetdomain, + .pr_protocol = IPPROTO_UDPLITE, + .pr_flags = PR_ATOMIC|PR_ADDR, + .pr_input = udp_input, + .pr_ctlinput = udplite_ctlinput, + .pr_ctloutput = udp_ctloutput, + .pr_init = udplite_init, +#ifdef VIMAGE + .pr_destroy = udplite_destroy, +#endif + .pr_usrreqs = &udp_usrreqs +}, +{ .pr_type = SOCK_RAW, .pr_domain = &inetdomain, .pr_protocol = IPPROTO_RAW, Modified: stable/10/sys/netinet/udp_usrreq.c ============================================================================== --- stable/10/sys/netinet/udp_usrreq.c Tue May 13 05:26:43 2014 (r265945) +++ stable/10/sys/netinet/udp_usrreq.c Tue May 13 06:05:53 2014 (r265946) @@ -3,6 +3,7 @@ * The Regents of the University of California. * Copyright (c) 2008 Robert N. M. Watson * Copyright (c) 2010-2011 Juniper Networks, Inc. + * Copyright (c) 2014 Kevin Lo * All rights reserved. * * Portions of this software were developed by Robert N. M. Watson under @@ -87,6 +88,7 @@ __FBSDID("$FreeBSD$"); #endif #include #include +#include #ifdef IPSEC #include @@ -98,8 +100,9 @@ __FBSDID("$FreeBSD$"); #include /* - * UDP protocol implementation. + * UDP and UDP-Lite protocols implementation. * Per RFC 768, August, 1980. + * Per RFC 3828, July, 2004. */ /* @@ -139,6 +142,8 @@ SYSCTL_ULONG(_net_inet_udp, UDPCTL_RECVS VNET_DEFINE(struct inpcbhead, udb); /* from udp_var.h */ VNET_DEFINE(struct inpcbinfo, udbinfo); +VNET_DEFINE(struct inpcbhead, ulitecb); +VNET_DEFINE(struct inpcbinfo, ulitecbinfo); static VNET_DEFINE(uma_zone_t, udpcb_zone); #define V_udpcb_zone VNET(udpcb_zone) @@ -187,6 +192,16 @@ udp_inpcb_init(void *mem, int size, int return (0); } +static int +udplite_inpcb_init(void *mem, int size, int flags) +{ + struct inpcb *inp; + + inp = mem; + INP_LOCK_INIT(inp, "inp", "udpliteinp"); + return (0); +} + void udp_init(void) { @@ -202,6 +217,15 @@ udp_init(void) EVENTHANDLER_PRI_ANY); } +void +udplite_init(void) +{ + + in_pcbinfo_init(&V_ulitecbinfo, "udplite", &V_ulitecb, UDBHASHSIZE, + UDBHASHSIZE, "udplite_inpcb", udplite_inpcb_init, NULL, + UMA_ZONE_NOFREE, IPI_HASHFIELDS_2TUPLE); +} + /* * Kernel module interface for updating udpstat. The argument is an index * into udpstat treated as an array of u_long. While this encodes the @@ -243,6 +267,13 @@ udp_destroy(void) in_pcbinfo_destroy(&V_udbinfo); uma_zdestroy(V_udpcb_zone); } + +void +udplite_destroy(void) +{ + + in_pcbinfo_destroy(&V_ulitecbinfo); +} #endif #ifdef INET @@ -346,9 +377,12 @@ udp_input(struct mbuf *m, int off) struct ifnet *ifp; struct inpcb *inp; uint16_t len, ip_len; + struct inpcbinfo *pcbinfo; struct ip save_ip; struct sockaddr_in udp_in; struct m_tag *fwd_tag; + int cscov_partial; + uint8_t pr; ifp = m->m_pkthdr.rcvif; UDPSTAT_INC(udps_ipackets); @@ -368,13 +402,15 @@ udp_input(struct mbuf *m, int off) */ ip = mtod(m, struct ip *); if (m->m_len < iphlen + sizeof(struct udphdr)) { - if ((m = m_pullup(m, iphlen + sizeof(struct udphdr))) == 0) { + if ((m = m_pullup(m, iphlen + sizeof(struct udphdr))) == NULL) { UDPSTAT_INC(udps_hdrops); return; } ip = mtod(m, struct ip *); } uh = (struct udphdr *)((caddr_t)ip + iphlen); + pr = ip->ip_p; + cscov_partial = (pr == IPPROTO_UDPLITE) ? 1 : 0; /* * Destination port of 0 is illegal, based on RFC768. @@ -398,12 +434,18 @@ udp_input(struct mbuf *m, int off) */ len = ntohs((u_short)uh->uh_ulen); ip_len = ntohs(ip->ip_len) - iphlen; + if (pr == IPPROTO_UDPLITE && len == 0) { + /* Zero means checksum over the complete packet. */ + len = ip_len; + cscov_partial = 0; + } if (ip_len != len) { if (len > ip_len || len < sizeof(struct udphdr)) { UDPSTAT_INC(udps_badlen); goto badunlocked; } - m_adj(m, len - ip_len); + if (pr == IPPROTO_UDP) + m_adj(m, len - ip_len); } /* @@ -421,20 +463,22 @@ udp_input(struct mbuf *m, int off) if (uh->uh_sum) { u_short uh_sum; - if (m->m_pkthdr.csum_flags & CSUM_DATA_VALID) { + if ((m->m_pkthdr.csum_flags & CSUM_DATA_VALID) && + !cscov_partial) { if (m->m_pkthdr.csum_flags & CSUM_PSEUDO_HDR) uh_sum = m->m_pkthdr.csum_data; else uh_sum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr, htonl((u_short)len + - m->m_pkthdr.csum_data + IPPROTO_UDP)); + m->m_pkthdr.csum_data + pr)); uh_sum ^= 0xffff; } else { char b[9]; bcopy(((struct ipovly *)ip)->ih_x1, b, 9); bzero(((struct ipovly *)ip)->ih_x1, 9); - ((struct ipovly *)ip)->ih_len = uh->uh_ulen; + ((struct ipovly *)ip)->ih_len = (pr == IPPROTO_UDP) ? + uh->uh_ulen : htons(ip_len); uh_sum = in_cksum(m, len + sizeof (struct ip)); bcopy(b, ((struct ipovly *)ip)->ih_x1, 9); } @@ -446,14 +490,17 @@ udp_input(struct mbuf *m, int off) } else UDPSTAT_INC(udps_nosum); + pcbinfo = get_inpcbinfo(pr); if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr)) || in_broadcast(ip->ip_dst, ifp)) { struct inpcb *last; + struct inpcbhead *pcblist; struct ip_moptions *imo; - INP_INFO_RLOCK(&V_udbinfo); + INP_INFO_RLOCK(pcbinfo); + pcblist = get_pcblist(pr); last = NULL; - LIST_FOREACH(inp, &V_udb, inp_list) { + LIST_FOREACH(inp, pcblist, inp_list) { if (inp->inp_lport != uh->uh_dport) continue; #ifdef INET6 @@ -539,12 +586,12 @@ udp_input(struct mbuf *m, int off) UDPSTAT_INC(udps_noportbcast); if (inp) INP_RUNLOCK(inp); - INP_INFO_RUNLOCK(&V_udbinfo); + INP_INFO_RUNLOCK(pcbinfo); goto badunlocked; } udp_append(last, ip, m, iphlen, &udp_in); INP_RUNLOCK(last); - INP_INFO_RUNLOCK(&V_udbinfo); + INP_INFO_RUNLOCK(pcbinfo); return; } @@ -565,7 +612,7 @@ udp_input(struct mbuf *m, int off) * Transparently forwarded. Pretend to be the destination. * Already got one like this? */ - inp = in_pcblookup_mbuf(&V_udbinfo, ip->ip_src, uh->uh_sport, + inp = in_pcblookup_mbuf(pcbinfo, ip->ip_src, uh->uh_sport, ip->ip_dst, uh->uh_dport, INPLOOKUP_RLOCKPCB, ifp, m); if (!inp) { /* @@ -573,7 +620,7 @@ udp_input(struct mbuf *m, int off) * Because we've rewritten the destination address, * any hardware-generated hash is ignored. */ - inp = in_pcblookup(&V_udbinfo, ip->ip_src, + inp = in_pcblookup(pcbinfo, ip->ip_src, uh->uh_sport, next_hop->sin_addr, next_hop->sin_port ? htons(next_hop->sin_port) : uh->uh_dport, INPLOOKUP_WILDCARD | @@ -583,7 +630,7 @@ udp_input(struct mbuf *m, int off) m_tag_delete(m, fwd_tag); m->m_flags &= ~M_IP_NEXTHOP; } else - inp = in_pcblookup_mbuf(&V_udbinfo, ip->ip_src, uh->uh_sport, + inp = in_pcblookup_mbuf(pcbinfo, ip->ip_src, uh->uh_sport, ip->ip_dst, uh->uh_dport, INPLOOKUP_WILDCARD | INPLOOKUP_RLOCKPCB, ifp, m); if (inp == NULL) { @@ -619,6 +666,16 @@ udp_input(struct mbuf *m, int off) m_freem(m); return; } + if (cscov_partial) { + struct udpcb *up; + + up = intoudpcb(inp); + if (up->u_rxcslen > len) { + INP_RUNLOCK(inp); + m_freem(m); + return; + } + } UDP_PROBE(receive, NULL, inp, ip, inp, uh); udp_append(inp, ip, m, iphlen, &udp_in); @@ -653,8 +710,9 @@ udp_notify(struct inpcb *inp, int errno) } #ifdef INET -void -udp_ctlinput(int cmd, struct sockaddr *sa, void *vip) +static void +udp_common_ctlinput(int cmd, struct sockaddr *sa, void *vip, + struct inpcbinfo *pcbinfo) { struct ip *ip = vip; struct udphdr *uh; @@ -683,7 +741,7 @@ udp_ctlinput(int cmd, struct sockaddr *s return; if (ip != NULL) { uh = (struct udphdr *)((caddr_t)ip + (ip->ip_hl << 2)); - inp = in_pcblookup(&V_udbinfo, faddr, uh->uh_dport, + inp = in_pcblookup(pcbinfo, faddr, uh->uh_dport, ip->ip_src, uh->uh_sport, INPLOOKUP_RLOCKPCB, NULL); if (inp != NULL) { INP_RLOCK_ASSERT(inp); @@ -693,9 +751,22 @@ udp_ctlinput(int cmd, struct sockaddr *s INP_RUNLOCK(inp); } } else - in_pcbnotifyall(&V_udbinfo, faddr, inetctlerrmap[cmd], + in_pcbnotifyall(pcbinfo, faddr, inetctlerrmap[cmd], udp_notify); } +void +udp_ctlinput(int cmd, struct sockaddr *sa, void *vip) +{ + + return (udp_common_ctlinput(cmd, sa, vip, &V_udbinfo)); +} + +void +udplite_ctlinput(int cmd, struct sockaddr *sa, void *vip) +{ + + return (udp_common_ctlinput(cmd, sa, vip, &V_ulitecbinfo)); +} #endif /* INET */ static int @@ -851,16 +922,16 @@ SYSCTL_PROC(_net_inet_udp, OID_AUTO, get int udp_ctloutput(struct socket *so, struct sockopt *sopt) { - int error = 0, optval; struct inpcb *inp; -#ifdef IPSEC_NAT_T struct udpcb *up; -#endif + int isudplite, error, optval; + error = 0; + isudplite = (so->so_proto->pr_protocol == IPPROTO_UDPLITE) ? 1 : 0; inp = sotoinpcb(so); KASSERT(inp != NULL, ("%s: inp == NULL", __func__)); INP_WLOCK(inp); - if (sopt->sopt_level != IPPROTO_UDP) { + if (sopt->sopt_level != so->so_proto->pr_protocol) { #ifdef INET6 if (INP_CHECK_SOCKAF(so, AF_INET6)) { INP_WUNLOCK(inp); @@ -918,6 +989,34 @@ udp_ctloutput(struct socket *so, struct } INP_WUNLOCK(inp); break; + case UDPLITE_SEND_CSCOV: + case UDPLITE_RECV_CSCOV: + if (!isudplite) { + INP_WUNLOCK(inp); + error = ENOPROTOOPT; + break; + } + INP_WUNLOCK(inp); + error = sooptcopyin(sopt, &optval, sizeof(optval), + sizeof(optval)); + if (error != 0) + break; + inp = sotoinpcb(so); + KASSERT(inp != NULL, ("%s: inp == NULL", __func__)); + INP_WLOCK(inp); + up = intoudpcb(inp); + KASSERT(up != NULL, ("%s: up == NULL", __func__)); + if (optval != 0 && optval < 8) { + INP_WUNLOCK(inp); + error = EINVAL; + break; + } + if (sopt->sopt_name == UDPLITE_SEND_CSCOV) + up->u_txcslen = optval; + else + up->u_rxcslen = optval; + INP_WUNLOCK(inp); + break; default: INP_WUNLOCK(inp); error = ENOPROTOOPT; @@ -935,6 +1034,22 @@ udp_ctloutput(struct socket *so, struct error = sooptcopyout(sopt, &optval, sizeof optval); break; #endif + case UDPLITE_SEND_CSCOV: + case UDPLITE_RECV_CSCOV: + if (!isudplite) { + INP_WUNLOCK(inp); + error = ENOPROTOOPT; + break; + } + up = intoudpcb(inp); + KASSERT(up != NULL, ("%s: up == NULL", __func__)); + if (sopt->sopt_name == UDPLITE_SEND_CSCOV) + optval = up->u_txcslen; + else + optval = up->u_rxcslen; + INP_WUNLOCK(inp); + error = sooptcopyout(sopt, &optval, sizeof(optval)); + break; default: INP_WUNLOCK(inp); error = ENOPROTOOPT; @@ -957,12 +1072,16 @@ udp_output(struct inpcb *inp, struct mbu int len = m->m_pkthdr.len; struct in_addr faddr, laddr; struct cmsghdr *cm; + struct inpcbinfo *pcbinfo; struct sockaddr_in *sin, src; + int cscov_partial = 0; int error = 0; int ipflags; u_short fport, lport; int unlock_udbinfo; u_char tos; + uint8_t pr; + uint16_t cscov = 0; /* * udp_output() may need to temporarily bind or connect the current @@ -1057,12 +1176,14 @@ udp_output(struct inpcb *inp, struct mbu * * XXXRW: Check that hash locking update here is correct. */ + pr = inp->inp_socket->so_proto->pr_protocol; + pcbinfo = get_inpcbinfo(pr); sin = (struct sockaddr_in *)addr; if (sin != NULL && (inp->inp_laddr.s_addr == INADDR_ANY && inp->inp_lport == 0)) { INP_RUNLOCK(inp); INP_WLOCK(inp); - INP_HASH_WLOCK(&V_udbinfo); + INP_HASH_WLOCK(pcbinfo); unlock_udbinfo = UH_WLOCKED; } else if ((sin != NULL && ( (sin->sin_addr.s_addr == INADDR_ANY) || @@ -1070,7 +1191,7 @@ udp_output(struct inpcb *inp, struct mbu (inp->inp_laddr.s_addr == INADDR_ANY) || (inp->inp_lport == 0))) || (src.sin_family == AF_INET)) { - INP_HASH_RLOCK(&V_udbinfo); + INP_HASH_RLOCK(pcbinfo); unlock_udbinfo = UH_RLOCKED; } else unlock_udbinfo = UH_UNLOCKED; @@ -1083,7 +1204,7 @@ udp_output(struct inpcb *inp, struct mbu laddr = inp->inp_laddr; lport = inp->inp_lport; if (src.sin_family == AF_INET) { - INP_HASH_LOCK_ASSERT(&V_udbinfo); + INP_HASH_LOCK_ASSERT(pcbinfo); if ((lport == 0) || (laddr.s_addr == INADDR_ANY && src.sin_addr.s_addr == INADDR_ANY)) { @@ -1134,7 +1255,7 @@ udp_output(struct inpcb *inp, struct mbu inp->inp_lport == 0 || sin->sin_addr.s_addr == INADDR_ANY || sin->sin_addr.s_addr == INADDR_BROADCAST) { - INP_HASH_LOCK_ASSERT(&V_udbinfo); + INP_HASH_LOCK_ASSERT(pcbinfo); error = in_pcbconnect_setup(inp, addr, &laddr.s_addr, &lport, &faddr.s_addr, &fport, NULL, td->td_ucred); @@ -1149,7 +1270,7 @@ udp_output(struct inpcb *inp, struct mbu if (inp->inp_laddr.s_addr == INADDR_ANY && inp->inp_lport == 0) { INP_WLOCK_ASSERT(inp); - INP_HASH_WLOCK_ASSERT(&V_udbinfo); + INP_HASH_WLOCK_ASSERT(pcbinfo); /* * Remember addr if jailed, to prevent * rebinding. @@ -1198,13 +1319,30 @@ udp_output(struct inpcb *inp, struct mbu */ ui = mtod(m, struct udpiphdr *); bzero(ui->ui_x1, sizeof(ui->ui_x1)); /* XXX still needed? */ - ui->ui_v = IPVERSION << 4; - ui->ui_pr = IPPROTO_UDP; + ui->ui_pr = pr; ui->ui_src = laddr; ui->ui_dst = faddr; ui->ui_sport = lport; ui->ui_dport = fport; ui->ui_ulen = htons((u_short)len + sizeof(struct udphdr)); + if (pr == IPPROTO_UDPLITE) { + struct udpcb *up; + uint16_t plen; + + up = intoudpcb(inp); + cscov = up->u_txcslen; + plen = (u_short)len + sizeof(struct udphdr); + if (cscov >= plen) + cscov = 0; + ui->ui_len = htons(plen); + ui->ui_ulen = htons(cscov); + /* + * For UDP-Lite, checksum coverage length of zero means + * the entire UDPLite packet is covered by the checksum. + */ + cscov_partial = (cscov == 0) ? 0 : 1; + } else + ui->ui_v = IPVERSION << 4; /* * Set the Don't Fragment bit in the IP header. @@ -1231,24 +1369,34 @@ udp_output(struct inpcb *inp, struct mbu /* * Set up checksum and output datagram. */ - if (V_udp_cksum) { + ui->ui_sum = 0; + if (pr == IPPROTO_UDPLITE) { + if (inp->inp_flags & INP_ONESBCAST) + faddr.s_addr = INADDR_BROADCAST; + if (cscov_partial) { + if ((ui->ui_sum = in_cksum(m, sizeof(struct ip) + cscov)) == 0) + ui->ui_sum = 0xffff; + } else { + if ((ui->ui_sum = in_cksum(m, sizeof(struct udpiphdr) + len)) == 0) + ui->ui_sum = 0xffff; + } + } else if (V_udp_cksum) { if (inp->inp_flags & INP_ONESBCAST) faddr.s_addr = INADDR_BROADCAST; ui->ui_sum = in_pseudo(ui->ui_src.s_addr, faddr.s_addr, - htons((u_short)len + sizeof(struct udphdr) + IPPROTO_UDP)); + htons((u_short)len + sizeof(struct udphdr) + pr)); m->m_pkthdr.csum_flags = CSUM_UDP; m->m_pkthdr.csum_data = offsetof(struct udphdr, uh_sum); - } else - ui->ui_sum = 0; + } ((struct ip *)ui)->ip_len = htons(sizeof(struct udpiphdr) + len); ((struct ip *)ui)->ip_ttl = inp->inp_ip_ttl; /* XXX */ ((struct ip *)ui)->ip_tos = tos; /* XXX */ UDPSTAT_INC(udps_opackets); if (unlock_udbinfo == UH_WLOCKED) - INP_HASH_WUNLOCK(&V_udbinfo); + INP_HASH_WUNLOCK(pcbinfo); else if (unlock_udbinfo == UH_RLOCKED) - INP_HASH_RUNLOCK(&V_udbinfo); + INP_HASH_RUNLOCK(pcbinfo); UDP_PROBE(send, NULL, inp, &ui->ui_i, inp, &ui->ui_u); error = ip_output(m, inp->inp_options, NULL, ipflags, inp->inp_moptions, inp); @@ -1260,10 +1408,10 @@ udp_output(struct inpcb *inp, struct mbu release: if (unlock_udbinfo == UH_WLOCKED) { - INP_HASH_WUNLOCK(&V_udbinfo); + INP_HASH_WUNLOCK(pcbinfo); INP_WUNLOCK(inp); } else if (unlock_udbinfo == UH_RLOCKED) { - INP_HASH_RUNLOCK(&V_udbinfo); + INP_HASH_RUNLOCK(pcbinfo); INP_RUNLOCK(inp); } else INP_RUNLOCK(inp); @@ -1410,15 +1558,17 @@ static void udp_abort(struct socket *so) { struct inpcb *inp; + struct inpcbinfo *pcbinfo; + pcbinfo = get_inpcbinfo(so->so_proto->pr_protocol); inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp_abort: inp == NULL")); INP_WLOCK(inp); if (inp->inp_faddr.s_addr != INADDR_ANY) { - INP_HASH_WLOCK(&V_udbinfo); + INP_HASH_WLOCK(pcbinfo); in_pcbdisconnect(inp); inp->inp_laddr.s_addr = INADDR_ANY; - INP_HASH_WUNLOCK(&V_udbinfo); + INP_HASH_WUNLOCK(pcbinfo); soisdisconnected(so); } INP_WUNLOCK(inp); @@ -1428,17 +1578,19 @@ static int udp_attach(struct socket *so, int proto, struct thread *td) { struct inpcb *inp; + struct inpcbinfo *pcbinfo; int error; + pcbinfo = get_inpcbinfo(so->so_proto->pr_protocol); inp = sotoinpcb(so); KASSERT(inp == NULL, ("udp_attach: inp != NULL")); error = soreserve(so, udp_sendspace, udp_recvspace); if (error) return (error); - INP_INFO_WLOCK(&V_udbinfo); - error = in_pcballoc(so, &V_udbinfo); + INP_INFO_WLOCK(pcbinfo); + error = in_pcballoc(so, pcbinfo); if (error) { - INP_INFO_WUNLOCK(&V_udbinfo); + INP_INFO_WUNLOCK(pcbinfo); return (error); } @@ -1450,12 +1602,12 @@ udp_attach(struct socket *so, int proto, if (error) { in_pcbdetach(inp); in_pcbfree(inp); - INP_INFO_WUNLOCK(&V_udbinfo); + INP_INFO_WUNLOCK(pcbinfo); return (error); } INP_WUNLOCK(inp); - INP_INFO_WUNLOCK(&V_udbinfo); + INP_INFO_WUNLOCK(pcbinfo); return (0); } #endif /* INET */ @@ -1486,14 +1638,16 @@ static int udp_bind(struct socket *so, struct sockaddr *nam, struct thread *td) { struct inpcb *inp; + struct inpcbinfo *pcbinfo; int error; + pcbinfo = get_inpcbinfo(so->so_proto->pr_protocol); inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp_bind: inp == NULL")); INP_WLOCK(inp); - INP_HASH_WLOCK(&V_udbinfo); + INP_HASH_WLOCK(pcbinfo); error = in_pcbbind(inp, nam, td->td_ucred); - INP_HASH_WUNLOCK(&V_udbinfo); + INP_HASH_WUNLOCK(pcbinfo); INP_WUNLOCK(inp); return (error); } @@ -1502,15 +1656,17 @@ static void udp_close(struct socket *so) { struct inpcb *inp; + struct inpcbinfo *pcbinfo; + pcbinfo = get_inpcbinfo(so->so_proto->pr_protocol); inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp_close: inp == NULL")); INP_WLOCK(inp); if (inp->inp_faddr.s_addr != INADDR_ANY) { - INP_HASH_WLOCK(&V_udbinfo); + INP_HASH_WLOCK(pcbinfo); in_pcbdisconnect(inp); inp->inp_laddr.s_addr = INADDR_ANY; - INP_HASH_WUNLOCK(&V_udbinfo); + INP_HASH_WUNLOCK(pcbinfo); soisdisconnected(so); } INP_WUNLOCK(inp); @@ -1520,9 +1676,11 @@ static int udp_connect(struct socket *so, struct sockaddr *nam, struct thread *td) { struct inpcb *inp; - int error; + struct inpcbinfo *pcbinfo; struct sockaddr_in *sin; + int error; + pcbinfo = get_inpcbinfo(so->so_proto->pr_protocol); inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp_connect: inp == NULL")); INP_WLOCK(inp); @@ -1536,9 +1694,9 @@ udp_connect(struct socket *so, struct so INP_WUNLOCK(inp); return (error); } - INP_HASH_WLOCK(&V_udbinfo); + INP_HASH_WLOCK(pcbinfo); error = in_pcbconnect(inp, nam, td->td_ucred); - INP_HASH_WUNLOCK(&V_udbinfo); + INP_HASH_WUNLOCK(pcbinfo); if (error == 0) soisconnected(so); INP_WUNLOCK(inp); @@ -1549,20 +1707,22 @@ static void udp_detach(struct socket *so) { struct inpcb *inp; + struct inpcbinfo *pcbinfo; struct udpcb *up; + pcbinfo = get_inpcbinfo(so->so_proto->pr_protocol); inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp_detach: inp == NULL")); KASSERT(inp->inp_faddr.s_addr == INADDR_ANY, ("udp_detach: not disconnected")); - INP_INFO_WLOCK(&V_udbinfo); + INP_INFO_WLOCK(pcbinfo); INP_WLOCK(inp); up = intoudpcb(inp); KASSERT(up != NULL, ("%s: up == NULL", __func__)); inp->inp_ppcb = NULL; in_pcbdetach(inp); in_pcbfree(inp); - INP_INFO_WUNLOCK(&V_udbinfo); + INP_INFO_WUNLOCK(pcbinfo); udp_discardcb(up); } @@ -1570,7 +1730,9 @@ static int udp_disconnect(struct socket *so) { struct inpcb *inp; + struct inpcbinfo *pcbinfo; + pcbinfo = get_inpcbinfo(so->so_proto->pr_protocol); inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp_disconnect: inp == NULL")); INP_WLOCK(inp); @@ -1578,10 +1740,10 @@ udp_disconnect(struct socket *so) INP_WUNLOCK(inp); return (ENOTCONN); } - INP_HASH_WLOCK(&V_udbinfo); + INP_HASH_WLOCK(pcbinfo); in_pcbdisconnect(inp); inp->inp_laddr.s_addr = INADDR_ANY; - INP_HASH_WUNLOCK(&V_udbinfo); + INP_HASH_WUNLOCK(pcbinfo); SOCK_LOCK(so); so->so_state &= ~SS_ISCONNECTED; /* XXX */ SOCK_UNLOCK(so); Modified: stable/10/sys/netinet/udp_var.h ============================================================================== --- stable/10/sys/netinet/udp_var.h Tue May 13 05:26:43 2014 (r265945) +++ stable/10/sys/netinet/udp_var.h Tue May 13 06:05:53 2014 (r265946) @@ -63,6 +63,8 @@ typedef void(*udp_tun_func_t)(struct mbu struct udpcb { udp_tun_func_t u_tun_func; /* UDP kernel tunneling callback. */ u_int u_flags; /* Generic UDP flags. */ + uint16_t u_rxcslen; /* Coverage for incoming datagrams. */ + uint16_t u_txcslen; /* Coverage for outgoing datagrams. */ }; #define intoudpcb(ip) ((struct udpcb *)(ip)->inp_ppcb) @@ -130,8 +132,12 @@ SYSCTL_DECL(_net_inet_udp); extern struct pr_usrreqs udp_usrreqs; VNET_DECLARE(struct inpcbhead, udb); VNET_DECLARE(struct inpcbinfo, udbinfo); +VNET_DECLARE(struct inpcbhead, ulitecb); +VNET_DECLARE(struct inpcbinfo, ulitecbinfo); #define V_udb VNET(udb) #define V_udbinfo VNET(udbinfo) +#define V_ulitecb VNET(ulitecb) +#define V_ulitecbinfo VNET(ulitecbinfo) extern u_long udp_sendspace; extern u_long udp_recvspace; @@ -141,20 +147,37 @@ VNET_DECLARE(int, udp_blackhole); #define V_udp_blackhole VNET(udp_blackhole) extern int udp_log_in_vain; -int udp_newudpcb(struct inpcb *); -void udp_discardcb(struct udpcb *); - -void udp_ctlinput(int, struct sockaddr *, void *); -int udp_ctloutput(struct socket *, struct sockopt *); -void udp_init(void); +static __inline struct inpcbinfo * +get_inpcbinfo(uint8_t protocol) +{ + return (protocol == IPPROTO_UDP) ? &V_udbinfo : &V_ulitecbinfo; +} + +static __inline struct inpcbhead * +get_pcblist(uint8_t protocol) +{ + return (protocol == IPPROTO_UDP) ? &V_udb : &V_ulitecb; +} + +int udp_newudpcb(struct inpcb *); +void udp_discardcb(struct udpcb *); + +void udp_ctlinput(int, struct sockaddr *, void *); +void udplite_ctlinput(int, struct sockaddr *, void *); +int udp_ctloutput(struct socket *, struct sockopt *); +void udp_init(void); +void udplite_init(void); #ifdef VIMAGE -void udp_destroy(void); +void udp_destroy(void); +void udplite_destroy(void); #endif -void udp_input(struct mbuf *, int); +void udp_input(struct mbuf *, int); +void udplite_input(struct mbuf *, int); struct inpcb *udp_notify(struct inpcb *inp, int errno); -int udp_shutdown(struct socket *so); +int udp_shutdown(struct socket *so); -int udp_set_kernel_tunneling(struct socket *so, udp_tun_func_t f); -#endif +int udp_set_kernel_tunneling(struct socket *so, udp_tun_func_t f); -#endif +#endif /* _KERNEL */ + +#endif /* _NETINET_UDP_VAR_H_ */ Copied: stable/10/sys/netinet/udplite.h (from r264212, head/sys/netinet/udplite.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/netinet/udplite.h Tue May 13 06:05:53 2014 (r265946, copy of r264212, head/sys/netinet/udplite.h) @@ -0,0 +1,38 @@ +/*- + * Copyright (c) 2014, Kevin Lo + * All rights reserved. + * + * 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 REGENTS 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 REGENTS 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. + * + * $FreeBSD$ + */ + +#ifndef _NETINET_UDPLITE_H_ +#define _NETINET_UDPLITE_H_ + +/* + * User-settable options (used with setsockopt). + */ +#define UDPLITE_SEND_CSCOV 2 /* Sender checksum coverage. */ +#define UDPLITE_RECV_CSCOV 4 /* Receiver checksum coverage. */ + +#endif /* !_NETINET_UDPLITE_H_ */ Modified: stable/10/sys/netinet6/in6_ifattach.c ============================================================================== --- stable/10/sys/netinet6/in6_ifattach.c Tue May 13 05:26:43 2014 (r265945) +++ stable/10/sys/netinet6/in6_ifattach.c Tue May 13 06:05:53 2014 (r265946) @@ -856,6 +856,7 @@ in6_ifdetach(struct ifnet *ifp) } in6_pcbpurgeif0(&V_udbinfo, ifp); + in6_pcbpurgeif0(&V_ulitecbinfo, ifp); in6_pcbpurgeif0(&V_ripcbinfo, ifp); /* leave from all multicast groups joined */ in6_purgemaddrs(ifp); Modified: stable/10/sys/netinet6/in6_proto.c ============================================================================== --- stable/10/sys/netinet6/in6_proto.c Tue May 13 05:26:43 2014 (r265945) +++ stable/10/sys/netinet6/in6_proto.c Tue May 13 06:05:53 2014 (r265946) @@ -207,13 +207,26 @@ struct ip6protosw inet6sw[] = { .pr_protocol = IPPROTO_SCTP, .pr_flags = PR_WANTRCVD, .pr_input = sctp6_input, - .pr_ctlinput = sctp6_ctlinput, + .pr_ctlinput = sctp6_ctlinput, .pr_ctloutput = sctp_ctloutput, .pr_drain = sctp_drain, .pr_usrreqs = &sctp6_usrreqs }, #endif /* SCTP */ { + .pr_type = SOCK_DGRAM, + .pr_domain = &inet6domain, + .pr_protocol = IPPROTO_UDPLITE, + .pr_flags = PR_ATOMIC|PR_ADDR, + .pr_input = udp6_input, + .pr_ctlinput = udplite6_ctlinput, + .pr_ctloutput = udp_ctloutput, +#ifndef INET /* Do not call initialization twice. */ + .pr_init = udplite_init, +#endif + .pr_usrreqs = &udp6_usrreqs, +}, +{ .pr_type = SOCK_RAW, .pr_domain = &inet6domain, .pr_protocol = IPPROTO_RAW, Modified: stable/10/sys/netinet6/udp6_usrreq.c ============================================================================== --- stable/10/sys/netinet6/udp6_usrreq.c Tue May 13 05:26:43 2014 (r265945) +++ stable/10/sys/netinet6/udp6_usrreq.c Tue May 13 06:05:53 2014 (r265946) @@ -1,6 +1,7 @@ /*- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. * Copyright (c) 2010-2011 Juniper Networks, Inc. + * Copyright (c) 2014 Kevin Lo * All rights reserved. * * Portions of this software were developed by Robert N. M. Watson under @@ -109,6 +110,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -181,12 +183,15 @@ udp6_input(struct mbuf **mp, int *offp, struct ip6_hdr *ip6; struct udphdr *uh; struct inpcb *inp; + struct inpcbinfo *pcbinfo; struct udpcb *up; int off = *offp; + int cscov_partial; int plen, ulen; struct sockaddr_in6 fromsa; struct m_tag *fwd_tag; uint16_t uh_sum; + uint8_t nxt; ifp = m->m_pkthdr.rcvif; ip6 = mtod(m, struct ip6_hdr *); @@ -218,6 +223,13 @@ udp6_input(struct mbuf **mp, int *offp, plen = ntohs(ip6->ip6_plen) - off + sizeof(*ip6); ulen = ntohs((u_short)uh->uh_ulen); + nxt = ip6->ip6_nxt; + cscov_partial = (nxt == IPPROTO_UDPLITE) ? 1 : 0; + if (nxt == IPPROTO_UDPLITE && ulen == 0) { + /* Zero means checksum over the complete packet. */ + ulen = plen; + cscov_partial = 0; + } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Tue May 13 06:09:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 112EA60A; Tue, 13 May 2014 06:09:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F2F102FD9; Tue, 13 May 2014 06:09:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4D691YZ093527; Tue, 13 May 2014 06:09:01 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4D691ni093524; Tue, 13 May 2014 06:09:01 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201405130609.s4D691ni093524@svn.freebsd.org> From: Kevin Lo Date: Tue, 13 May 2014 06:09:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265947 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 06:09:02 -0000 Author: kevlo Date: Tue May 13 06:09:01 2014 New Revision: 265947 URL: http://svnweb.freebsd.org/changeset/base/265947 Log: MFC r264216, r265817, r265822: Add man page for udplite(4). Added: stable/10/share/man/man4/udplite.4 - copied, changed from r264215, head/share/man/man4/udplite.4 Modified: stable/10/share/man/man4/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Tue May 13 06:05:53 2014 (r265946) +++ stable/10/share/man/man4/Makefile Tue May 13 06:09:01 2014 (r265947) @@ -511,6 +511,7 @@ MAN= aac.4 \ udav.4 \ udbp.4 \ udp.4 \ + udplite.4 \ uep.4 \ ufm.4 \ ufoma.4 \ Copied and modified: stable/10/share/man/man4/udplite.4 (from r264215, head/share/man/man4/udplite.4) ============================================================================== --- head/share/man/man4/udplite.4 Mon Apr 7 01:57:51 2014 (r264215, copy source) +++ stable/10/share/man/man4/udplite.4 Tue May 13 06:09:01 2014 (r265947) @@ -35,7 +35,7 @@ .In sys/socket.h .In netinet/udplite.h .Ft int -.Fn socket AF_INET SOCK_STREAM IPPROTO_UDPLITE +.Fn socket AF_INET SOCK_DGRAM IPPROTO_UDPLITE .Sh DESCRIPTION The .Tn UDP-Lite @@ -52,7 +52,7 @@ supports a number of socket options whic .Xr setsockopt 2 and tested with .Xr getsockopt 2 : -.Bl -tag -width ".Dv SCTP_SET_PEER_PRIMARY_ADDR" +.Bl -tag -width ".Dv UDPLITE_SEND_CSCOV" .It Dv UDPLITE_SEND_CSCOV This option sets the sender checksum coverage. A value of zero indicates that the entire packet From owner-svn-src-stable@FreeBSD.ORG Tue May 13 06:09:29 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 90353733; Tue, 13 May 2014 06:09:29 +0000 (UTC) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id 4E65C2FDC; Tue, 13 May 2014 06:09:28 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id C00C51A330E; Tue, 13 May 2014 16:09:21 +1000 (EST) Date: Tue, 13 May 2014 16:09:20 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Glen Barber Subject: Re: svn commit: r265917 - in stable/10: share/man/man4 sys/dev/bce sys/dev/bxe sys/modules/bce In-Reply-To: <20140512161817.GK1258@hub.FreeBSD.org> Message-ID: <20140513153541.S3047@besplex.bde.org> References: <201405121552.s4CFqnbX009177@svn.freebsd.org> <20140512161817.GK1258@hub.FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=eojmkOZX c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=s01DRGYkj-EA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=84xCnt9HLjLxYQgaN1YA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org, David C Somayajulu X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 06:09:29 -0000 On Mon, 12 May 2014, Glen Barber wrote: > On Mon, May 12, 2014 at 03:52:49PM +0000, David C Somayajulu wrote: >> Log: >> MFC r265703 >> Modify Copyright information and other strings to reflect >> Qlogic Corporation's purchase of Broadcom's NetXtreme business. >> Added clean option to Makefile >> > >> Modified: stable/10/sys/modules/bce/Makefile >> ============================================================================== >> --- stable/10/sys/modules/bce/Makefile Mon May 12 14:46:32 2014 (r265916) >> +++ stable/10/sys/modules/bce/Makefile Mon May 12 15:52:49 2014 (r265917) >> @@ -5,4 +5,9 @@ SRCS= opt_bce.h if_bce.c miibus_if.h mii >> >> #CFLAGS += -DBCE_DEBUG=0 >> >> +clean: >> + rm -f opt_bdg.h device_if.h bus_if.h pci_if.h export_syms >> + rm -f *.o *.kld *.ko >> + rm -f @ machine x86 miibus_if.h miidevs.h opt_bce.h >> + >> .include > > Shouldn't these be listed in CLEANFILES ? Most of them already do. Most of them are automatically generated, and a small part of this is to put automatically generated files in CLEANFILES. The existence of the clean target is a larger bug. It defeats the default clean target which handles CLEANFILES and other things, but not all of the above. Some of them belong in the cleandir target. That is not defeated. Before this commit, the clean target did: % rm -f export_syms if_bce.ko if_bce.kld if_bce.o opt_bce.h miibus_if.h pci_if.h bus_if.h device_if.h miidevs.h and the cleandir target did this plus: % rm -f @ machine x86 % rm -f .depend GPATH GRTAGS GSYMS GTAGS % if [ -L /usr/src/sys/modules/bce/obj ]; then rm -f /usr/src/sys/modules/bce/obj; fi The new clean target does exactly the same as the old one plus a strict subset of the cleandir target, except: - it adds opt_budgerigar.h (sic), which apparently still is neither generated nor used by bce. - it removes *.o, *.kld and *.ko instead of if_bce.ko if_bce.kld if_bce.o. The default rule is careful to avoid using wildcards so as to not remove anything not generated by the makefile. Removing @, machine and x86 in clean instead of in cleandir is minor breakage. .depend and obj are still not removed in clean. Handling obj in a home made rule would be very difficult, since the obj dir can be almost anywhere (and not named obj) and it might be a directory instead of a symlink. Bruce From owner-svn-src-stable@FreeBSD.ORG Tue May 13 16:50:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 509F1E1E; Tue, 13 May 2014 16:50:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3AB58291F; Tue, 13 May 2014 16:50:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4DGoCgc077248; Tue, 13 May 2014 16:50:12 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4DGoBJK077239; Tue, 13 May 2014 16:50:11 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405131650.s4DGoBJK077239@svn.freebsd.org> From: Ian Lepore Date: Tue, 13 May 2014 16:50:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265952 - in stable/10/sys: conf powerpc/aim powerpc/booke powerpc/mpc85xx powerpc/powerpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 16:50:12 -0000 Author: ian Date: Tue May 13 16:50:10 2014 New Revision: 265952 URL: http://svnweb.freebsd.org/changeset/base/265952 Log: MFC r256792, r256793, r256799 (by nwhitehorn): Unify AIM and booke code. Added: stable/10/sys/powerpc/powerpc/clock.c - copied unchanged from r256793, head/sys/powerpc/powerpc/clock.c stable/10/sys/powerpc/powerpc/nexus.c - copied unchanged from r256799, head/sys/powerpc/powerpc/nexus.c stable/10/sys/powerpc/powerpc/vm_machdep.c - copied unchanged from r256792, head/sys/powerpc/powerpc/vm_machdep.c Deleted: stable/10/sys/powerpc/aim/clock.c stable/10/sys/powerpc/aim/nexus.c stable/10/sys/powerpc/aim/vm_machdep.c stable/10/sys/powerpc/booke/clock.c stable/10/sys/powerpc/booke/vm_machdep.c stable/10/sys/powerpc/mpc85xx/nexus.c Modified: stable/10/sys/conf/files.powerpc stable/10/sys/powerpc/aim/machdep.c Modified: stable/10/sys/conf/files.powerpc ============================================================================== --- stable/10/sys/conf/files.powerpc Tue May 13 16:40:27 2014 (r265951) +++ stable/10/sys/conf/files.powerpc Tue May 13 16:50:10 2014 (r265952) @@ -88,7 +88,6 @@ libkern/qdivrem.c optional powerpc libkern/ucmpdi2.c optional powerpc libkern/udivdi3.c optional powerpc libkern/umoddi3.c optional powerpc -powerpc/aim/clock.c optional aim powerpc/aim/copyinout.c optional aim powerpc/aim/interrupt.c optional aim powerpc/aim/locore.S optional aim no-obj @@ -98,14 +97,11 @@ powerpc/aim/mmu_oea64.c optional aim powerpc/aim/moea64_if.m optional aim powerpc/aim/moea64_native.c optional aim powerpc/aim/mp_cpudep.c optional aim -powerpc/aim/nexus.c optional aim powerpc/aim/slb.c optional aim powerpc64 powerpc/aim/swtch32.S optional aim powerpc powerpc/aim/swtch64.S optional aim powerpc64 powerpc/aim/trap.c optional aim powerpc/aim/uma_machdep.c optional aim -powerpc/aim/vm_machdep.c optional aim -powerpc/booke/clock.c optional booke powerpc/booke/copyinout.c optional booke powerpc/booke/interrupt.c optional booke powerpc/booke/locore.S optional booke no-obj @@ -116,7 +112,6 @@ powerpc/booke/platform_bare.c optional m powerpc/booke/pmap.c optional booke powerpc/booke/swtch.S optional booke powerpc/booke/trap.c optional booke -powerpc/booke/vm_machdep.c optional booke powerpc/cpufreq/dfs.c optional cpufreq powerpc/cpufreq/pcr.c optional cpufreq aim powerpc/cpufreq/pmufreq.c optional cpufreq aim pmu @@ -141,7 +136,6 @@ powerpc/mpc85xx/i2c.c optional iicbus f powerpc/mpc85xx/isa.c optional mpc85xx isa powerpc/mpc85xx/lbc.c optional mpc85xx powerpc/mpc85xx/mpc85xx.c optional mpc85xx -powerpc/mpc85xx/nexus.c optional mpc85xx powerpc/mpc85xx/pci_fdt.c optional pci mpc85xx powerpc/ofw/ofw_cpu.c optional aim powerpc/ofw/ofw_machdep.c standard @@ -184,6 +178,7 @@ powerpc/powerpc/autoconf.c standard powerpc/powerpc/bcopy.c standard powerpc/powerpc/bus_machdep.c standard powerpc/powerpc/busdma_machdep.c standard +powerpc/powerpc/clock.c standard powerpc/powerpc/copystr.c standard powerpc/powerpc/cpu.c standard powerpc/powerpc/db_disasm.c optional ddb @@ -203,6 +198,7 @@ powerpc/powerpc/iommu_if.m standard powerpc/powerpc/mem.c optional mem powerpc/powerpc/mmu_if.m standard powerpc/powerpc/mp_machdep.c optional smp +powerpc/powerpc/nexus.c standard powerpc/powerpc/openpic.c standard powerpc/powerpc/openpic_fdt.c optional fdt powerpc/powerpc/pic_if.m standard @@ -218,6 +214,7 @@ powerpc/powerpc/suswintr.c standard powerpc/powerpc/syncicache.c standard powerpc/powerpc/sys_machdep.c standard powerpc/powerpc/uio_machdep.c standard +powerpc/powerpc/vm_machdep.c standard powerpc/ps3/ehci_ps3.c optional ps3 ehci powerpc/ps3/ohci_ps3.c optional ps3 ohci powerpc/ps3/if_glc.c optional ps3 glc Modified: stable/10/sys/powerpc/aim/machdep.c ============================================================================== --- stable/10/sys/powerpc/aim/machdep.c Tue May 13 16:40:27 2014 (r265951) +++ stable/10/sys/powerpc/aim/machdep.c Tue May 13 16:50:10 2014 (r265952) @@ -647,14 +647,6 @@ cpu_flush_dcache(void *ptr, size_t len) /* TBD */ } -void -cpu_initclocks(void) -{ - - decr_tc_init(); - cpu_initclocks_bsp(); -} - /* * Shutdown the CPU as much as possible. */ Copied: stable/10/sys/powerpc/powerpc/clock.c (from r256793, head/sys/powerpc/powerpc/clock.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/powerpc/powerpc/clock.c Tue May 13 16:50:10 2014 (r265952, copy of r256793, head/sys/powerpc/powerpc/clock.c) @@ -0,0 +1,308 @@ +/*- + * Copyright (C) 1995, 1996 Wolfgang Solfrank. + * Copyright (C) 1995, 1996 TooLs GmbH. + * All rights reserved. + * + * 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. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by TooLs GmbH. + * 4. The name of TooLs GmbH may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``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 TOOLS GMBH 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. + * + * $NetBSD: clock.c,v 1.9 2000/01/19 02:52:19 msaitoh Exp $ + */ +/* + * Copyright (C) 2001 Benno Rice. + * All rights reserved. + * + * 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 Benno Rice ``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 TOOLS GMBH 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include + +/* + * Initially we assume a processor with a bus frequency of 12.5 MHz. + */ +static int initialized = 0; +static u_long ns_per_tick = 80; +static u_long ticks_per_sec = 12500000; +static u_long *decr_counts[MAXCPU]; + +static int decr_et_start(struct eventtimer *et, + sbintime_t first, sbintime_t period); +static int decr_et_stop(struct eventtimer *et); +static timecounter_get_t decr_get_timecount; + +struct decr_state { + int mode; /* 0 - off, 1 - periodic, 2 - one-shot. */ + int32_t div; /* Periodic divisor. */ +}; +static DPCPU_DEFINE(struct decr_state, decr_state); + +static struct eventtimer decr_et; +static struct timecounter decr_tc = { + decr_get_timecount, /* get_timecount */ + 0, /* no poll_pps */ + ~0u, /* counter_mask */ + 0, /* frequency */ + "timebase" /* name */ +}; + +/* + * Decrementer interrupt handler. + */ +void +decr_intr(struct trapframe *frame) +{ + struct decr_state *s = DPCPU_PTR(decr_state); + int nticks = 0; + int32_t val; + + if (!initialized) + return; + + (*decr_counts[curcpu])++; + +#ifdef BOOKE + /* + * Interrupt handler must reset DIS to avoid getting another + * interrupt once EE is enabled. + */ + mtspr(SPR_TSR, TSR_DIS); +#endif + + if (s->mode == 1) { + /* + * Based on the actual time delay since the last decrementer + * reload, we arrange for earlier interrupt next time. + */ + __asm ("mfdec %0" : "=r"(val)); + while (val < 0) { + val += s->div; + nticks++; + } + mtdec(val); + } else if (s->mode == 2) { + nticks = 1; + decr_et_stop(NULL); + } + + while (nticks-- > 0) { + if (decr_et.et_active) + decr_et.et_event_cb(&decr_et, decr_et.et_arg); + } +} + +void +cpu_initclocks(void) +{ + + decr_tc_init(); + cpu_initclocks_bsp(); +} + +/* + * BSP early initialization. + */ +void +decr_init(void) +{ + struct cpuref cpu; + char buf[32]; + + /* + * Check the BSP's timebase frequency. Sometimes we can't find the BSP, so fall + * back to the first CPU in this case. + */ + if (platform_smp_get_bsp(&cpu) != 0) + platform_smp_first_cpu(&cpu); + ticks_per_sec = platform_timebase_freq(&cpu); + ns_per_tick = 1000000000 / ticks_per_sec; + + set_cputicker(mftb, ticks_per_sec, 0); + snprintf(buf, sizeof(buf), "cpu%d:decrementer", curcpu); + intrcnt_add(buf, &decr_counts[curcpu]); + decr_et_stop(NULL); + initialized = 1; +} + +#ifdef SMP +/* + * AP early initialization. + */ +void +decr_ap_init(void) +{ + char buf[32]; + + snprintf(buf, sizeof(buf), "cpu%d:decrementer", curcpu); + intrcnt_add(buf, &decr_counts[curcpu]); + decr_et_stop(NULL); +} +#endif + +/* + * Final initialization. + */ +void +decr_tc_init(void) +{ + + decr_tc.tc_frequency = ticks_per_sec; + tc_init(&decr_tc); + decr_et.et_name = "decrementer"; + decr_et.et_flags = ET_FLAGS_PERIODIC | ET_FLAGS_ONESHOT | + ET_FLAGS_PERCPU; + decr_et.et_quality = 1000; + decr_et.et_frequency = ticks_per_sec; + decr_et.et_min_period = (0x00000002LLU << 32) / ticks_per_sec; + decr_et.et_max_period = (0x7fffffffLLU << 32) / ticks_per_sec; + decr_et.et_start = decr_et_start; + decr_et.et_stop = decr_et_stop; + decr_et.et_priv = NULL; + et_register(&decr_et); +} + +/* + * Event timer start method. + */ +static int +decr_et_start(struct eventtimer *et, sbintime_t first, sbintime_t period) +{ + struct decr_state *s = DPCPU_PTR(decr_state); + uint32_t fdiv; +#ifdef BOOKE + uint32_t tcr; +#endif + + if (period != 0) { + s->mode = 1; + s->div = (decr_et.et_frequency * period) >> 32; + } else { + s->mode = 2; + s->div = 0; + } + if (first != 0) + fdiv = (decr_et.et_frequency * first) >> 32; + else + fdiv = s->div; + +#ifdef BOOKE + tcr = mfspr(SPR_TCR); + tcr |= TCR_DIE; + if (s->mode == 1) { + mtspr(SPR_DECAR, s->div); + tcr |= TCR_ARE; + } else + tcr &= ~TCR_ARE; + mtdec(fdiv); + mtspr(SPR_TCR, tcr); +#else + mtdec(fdiv); +#endif + + return (0); +} + +/* + * Event timer stop method. + */ +static int +decr_et_stop(struct eventtimer *et) +{ + struct decr_state *s = DPCPU_PTR(decr_state); +#ifdef BOOKE + uint32_t tcr; +#endif + + s->mode = 0; + s->div = 0x7fffffff; +#ifdef BOOKE + tcr = mfspr(SPR_TCR); + tcr &= ~(TCR_DIE | TCR_ARE); + mtspr(SPR_TCR, tcr); +#else + mtdec(s->div); +#endif + return (0); +} + +/* + * Timecounter get method. + */ +static unsigned +decr_get_timecount(struct timecounter *tc) +{ + return (mftb()); +} + +/* + * Wait for about n microseconds (at least!). + */ +void +DELAY(int n) +{ + u_quad_t tb, ttb; + + tb = mftb(); + ttb = tb + (n * 1000 + ns_per_tick - 1) / ns_per_tick; + while (tb < ttb) + tb = mftb(); +} + Copied: stable/10/sys/powerpc/powerpc/nexus.c (from r256799, head/sys/powerpc/powerpc/nexus.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/powerpc/powerpc/nexus.c Tue May 13 16:50:10 2014 (r265952, copy of r256799, head/sys/powerpc/powerpc/nexus.c) @@ -0,0 +1,527 @@ +/*- + * Copyright 1998 Massachusetts Institute of Technology + * + * Permission to use, copy, modify, and distribute this software and + * its documentation for any purpose and without fee is hereby + * granted, provided that both the above copyright notice and this + * permission notice appear in all copies, that both the above + * copyright notice and this permission notice appear in all + * supporting documentation, and that the name of M.I.T. not be used + * in advertising or publicity pertaining to distribution of the + * software without specific, written prior permission. M.I.T. makes + * no representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied + * warranty. + * + * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS + * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT + * SHALL M.I.T. 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. + */ +/*- + * Copyright 2001 by Thomas Moestl . All rights reserved. + * + * 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. + * + * from: FreeBSD: src/sys/i386/i386/nexus.c,v 1.43 2001/02/09 + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include + +#include "ofw_bus_if.h" +#include "pic_if.h" + +/* + * The nexus (which is a pseudo-bus actually) iterates over the nodes that + * exist in Open Firmware and adds them as devices to this bus so that drivers + * can be attached to them. + * + * Maybe this code should get into dev/ofw to some extent, as some of it should + * work for all Open Firmware based machines... + */ + +static MALLOC_DEFINE(M_NEXUS, "nexus", "nexus device information"); + +enum nexus_ivars { + NEXUS_IVAR_NODE, + NEXUS_IVAR_NAME, + NEXUS_IVAR_DEVICE_TYPE, + NEXUS_IVAR_COMPATIBLE, +}; + +struct nexus_devinfo { + phandle_t ndi_node; + /* Some common properties. */ + const char *ndi_name; + const char *ndi_device_type; + const char *ndi_compatible; +}; + +struct nexus_softc { + struct rman sc_rman; +}; + +/* + * Device interface + */ +static int nexus_probe(device_t); +static int nexus_attach(device_t); + +/* + * Bus interface + */ +static device_t nexus_add_child(device_t, u_int, const char *, int); +static void nexus_probe_nomatch(device_t, device_t); +static int nexus_read_ivar(device_t, device_t, int, uintptr_t *); +static int nexus_write_ivar(device_t, device_t, int, uintptr_t); +#ifdef SMP +static int nexus_bind_intr(device_t dev, device_t child, + struct resource *irq, int cpu); +#endif +static int nexus_config_intr(device_t dev, int irq, enum intr_trigger trig, + enum intr_polarity pol); +static int nexus_setup_intr(device_t, device_t, struct resource *, int, + driver_filter_t *, driver_intr_t *, void *, void **); +static int nexus_teardown_intr(device_t, device_t, struct resource *, + void *); +static struct resource *nexus_alloc_resource(device_t, device_t, int, int *, + u_long, u_long, u_long, u_int); +static int nexus_activate_resource(device_t, device_t, int, int, + struct resource *); +static int nexus_deactivate_resource(device_t, device_t, int, int, + struct resource *); +static int nexus_release_resource(device_t, device_t, int, int, + struct resource *); + +/* + * OFW bus interface. + */ +static phandle_t nexus_ofw_get_node(device_t, device_t); +static const char *nexus_ofw_get_name(device_t, device_t); +static const char *nexus_ofw_get_type(device_t, device_t); +static const char *nexus_ofw_get_compat(device_t, device_t); + +/* + * Local routines + */ +static device_t nexus_device_from_node(device_t, phandle_t); + +static device_method_t nexus_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, nexus_probe), + DEVMETHOD(device_attach, nexus_attach), + DEVMETHOD(device_detach, bus_generic_detach), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + + /* Bus interface. Resource management is business of the children... */ + DEVMETHOD(bus_add_child, nexus_add_child), + DEVMETHOD(bus_child_pnpinfo_str, ofw_bus_gen_child_pnpinfo_str), + DEVMETHOD(bus_probe_nomatch, nexus_probe_nomatch), + DEVMETHOD(bus_read_ivar, nexus_read_ivar), + DEVMETHOD(bus_write_ivar, nexus_write_ivar), + DEVMETHOD(bus_setup_intr, nexus_setup_intr), + DEVMETHOD(bus_teardown_intr, nexus_teardown_intr), +#ifdef SMP + DEVMETHOD(bus_bind_intr, nexus_bind_intr), +#endif + DEVMETHOD(bus_config_intr, nexus_config_intr), + DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), + DEVMETHOD(bus_activate_resource, nexus_activate_resource), + DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), + DEVMETHOD(bus_release_resource, nexus_release_resource), + + /* OFW bus interface */ + DEVMETHOD(ofw_bus_get_node, nexus_ofw_get_node), + DEVMETHOD(ofw_bus_get_name, nexus_ofw_get_name), + DEVMETHOD(ofw_bus_get_type, nexus_ofw_get_type), + DEVMETHOD(ofw_bus_get_compat, nexus_ofw_get_compat), + + DEVMETHOD_END +}; + +static driver_t nexus_driver = { + "nexus", + nexus_methods, + sizeof(struct nexus_softc), +}; + +static devclass_t nexus_devclass; + +EARLY_DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0, + BUS_PASS_BUS); + +static int +nexus_probe(device_t dev) +{ + bus_generic_probe(dev); + device_set_desc(dev, "Open Firmware Nexus device"); + return (0); +} + +static int +nexus_attach(device_t dev) +{ + phandle_t root; + phandle_t child; + struct nexus_softc *sc; + u_long start, end; + + sc = device_get_softc(dev); + + start = 0; + end = ~0; + + sc->sc_rman.rm_start = start; + sc->sc_rman.rm_end = end; + sc->sc_rman.rm_type = RMAN_ARRAY; + sc->sc_rman.rm_descr = "Interrupt request lines"; + if (rman_init(&sc->sc_rman) || + rman_manage_region(&sc->sc_rman, start, end)) + panic("nexus_probe IRQ rman"); + + if ((root = OF_peer(0)) == 0) + return (bus_generic_attach(dev)); + + /* + * Now walk the OFW tree to locate top-level devices + */ + for (child = OF_child(root); child != 0; child = OF_peer(child)) { + if (child == -1) + panic("nexus_probe(): OF_child failed."); + (void)nexus_device_from_node(dev, child); + + } + + return (bus_generic_attach(dev)); +} + +static void +nexus_probe_nomatch(device_t dev, device_t child) +{ + char *name, *type; + + if (BUS_READ_IVAR(dev, child, NEXUS_IVAR_NAME, + (uintptr_t *)&name) != 0 || + BUS_READ_IVAR(dev, child, NEXUS_IVAR_DEVICE_TYPE, + (uintptr_t *)&type) != 0) + return; + + if (type == NULL) + type = "(unknown)"; + + if (bootverbose) + device_printf(dev, "<%s>, type %s (no driver attached)\n", + name, type); +} + +static device_t +nexus_add_child(device_t dev, u_int order, const char *name, int unit) +{ + device_t child; + struct nexus_devinfo *dinfo; + + child = device_add_child_ordered(dev, order, name, unit); + if (child == NULL) + return (NULL); + + dinfo = malloc(sizeof(struct nexus_devinfo), M_NEXUS, M_NOWAIT|M_ZERO); + if (dinfo == NULL) + return (NULL); + + dinfo->ndi_node = -1; + dinfo->ndi_name = name; + device_set_ivars(child, dinfo); + + return (child); +} + + +static int +nexus_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) +{ + struct nexus_devinfo *dinfo; + + if ((dinfo = device_get_ivars(child)) == 0) + return (ENOENT); + switch (which) { + case NEXUS_IVAR_NODE: + *result = dinfo->ndi_node; + break; + case NEXUS_IVAR_NAME: + *result = (uintptr_t)dinfo->ndi_name; + break; + case NEXUS_IVAR_DEVICE_TYPE: + *result = (uintptr_t)dinfo->ndi_device_type; + break; + case NEXUS_IVAR_COMPATIBLE: + *result = (uintptr_t)dinfo->ndi_compatible; + break; + default: + return (ENOENT); + } + return 0; +} + +static int +nexus_write_ivar(device_t dev, device_t child, int which, uintptr_t value) +{ + struct nexus_devinfo *dinfo; + + if ((dinfo = device_get_ivars(child)) == 0) + return (ENOENT); + + switch (which) { + case NEXUS_IVAR_NAME: + return (EINVAL); + + /* Identified devices may want to set these */ + case NEXUS_IVAR_NODE: + dinfo->ndi_node = (phandle_t)value; + break; + + case NEXUS_IVAR_DEVICE_TYPE: + dinfo->ndi_device_type = (char *)value; + break; + + default: + return (ENOENT); + } + return 0; +} + +static int +nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags, + driver_filter_t *filter, driver_intr_t *ihand, void *arg, void **cookiep) +{ + int error; + + /* somebody tried to setup an irq that failed to allocate! */ + if (res == NULL) + panic("nexus_setup_intr: NULL irq resource!"); + + *cookiep = 0; + if ((rman_get_flags(res) & RF_SHAREABLE) == 0) + flags |= INTR_EXCL; + + /* + * We depend here on rman_activate_resource() being idempotent. + */ + error = rman_activate_resource(res); + if (error) + return (error); + + error = powerpc_setup_intr(device_get_nameunit(child), + rman_get_start(res), filter, ihand, arg, flags, cookiep); + + return (error); +} + +static int +nexus_teardown_intr(device_t dev, device_t child, struct resource *res, + void *cookie) +{ + + return (powerpc_teardown_intr(cookie)); +} + +#ifdef SMP +static int +nexus_bind_intr(device_t dev, device_t child, struct resource *irq, int cpu) +{ + + return (powerpc_bind_intr(rman_get_start(irq), cpu)); +} +#endif + +static int +nexus_config_intr(device_t dev, int irq, enum intr_trigger trig, + enum intr_polarity pol) +{ + + return (powerpc_config_intr(irq, trig, pol)); +} + +/* + * Allocate resources at the behest of a child. This only handles interrupts, + * since I/O resources are handled by child busses. + */ +static struct resource * +nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, + u_long start, u_long end, u_long count, u_int flags) +{ + struct nexus_softc *sc; + struct resource *rv; + + if (type != SYS_RES_IRQ) { + device_printf(bus, "unknown resource request from %s\n", + device_get_nameunit(child)); + return (NULL); + } + + if (count == 0 || start + count - 1 != end) { + device_printf(bus, "invalid IRQ allocation from %s\n", + device_get_nameunit(child)); + return (NULL); + } + + sc = device_get_softc(bus); + + rv = rman_reserve_resource(&sc->sc_rman, start, end, count, + flags, child); + if (rv == NULL) { + device_printf(bus, "IRQ allocation failed for %s\n", + device_get_nameunit(child)); + } else + rman_set_rid(rv, *rid); + + return (rv); +} + +static int +nexus_activate_resource(device_t bus, device_t child, int type, int rid, + struct resource *res) +{ + + /* Not much to be done yet... */ + return (rman_activate_resource(res)); +} + +static int +nexus_deactivate_resource(device_t bus, device_t child, int type, int rid, + struct resource *res) +{ + + /* Not much to be done yet... */ + return (rman_deactivate_resource(res)); +} + +static int +nexus_release_resource(device_t bus, device_t child, int type, int rid, + struct resource *res) +{ + + if (type != SYS_RES_IRQ) { + device_printf(bus, "unknown resource request from %s\n", + device_get_nameunit(child)); + return (EINVAL); + } + + return (rman_release_resource(res)); +} + +static device_t +nexus_device_from_node(device_t parent, phandle_t node) +{ + device_t cdev; + struct nexus_devinfo *dinfo; + char *name, *type, *compatible; + + OF_getprop_alloc(node, "name", 1, (void **)&name); + OF_getprop_alloc(node, "device_type", 1, (void **)&type); + OF_getprop_alloc(node, "compatible", 1, (void **)&compatible); + cdev = device_add_child(parent, NULL, -1); + if (cdev != NULL) { + dinfo = malloc(sizeof(*dinfo), M_NEXUS, M_WAITOK); + dinfo->ndi_node = node; + dinfo->ndi_name = name; + dinfo->ndi_device_type = type; + dinfo->ndi_compatible = compatible; + device_set_ivars(cdev, dinfo); + } else + free(name, M_OFWPROP); + + return (cdev); +} + +static const char * +nexus_ofw_get_name(device_t bus, device_t dev) +{ + struct nexus_devinfo *dinfo; + + if ((dinfo = device_get_ivars(dev)) == NULL) + return (NULL); + + return (dinfo->ndi_name); +} + +static phandle_t +nexus_ofw_get_node(device_t bus, device_t dev) +{ + struct nexus_devinfo *dinfo; + + if ((dinfo = device_get_ivars(dev)) == NULL) + return (0); + + return (dinfo->ndi_node); +} + +static const char * +nexus_ofw_get_type(device_t bus, device_t dev) +{ + struct nexus_devinfo *dinfo; + + if ((dinfo = device_get_ivars(dev)) == NULL) + return (NULL); + + return (dinfo->ndi_device_type); +} + +static const char * +nexus_ofw_get_compat(device_t bus, device_t dev) +{ + struct nexus_devinfo *dinfo; + + if ((dinfo = device_get_ivars(dev)) == NULL) + return (NULL); + + return (dinfo->ndi_compatible); +} + Copied: stable/10/sys/powerpc/powerpc/vm_machdep.c (from r256792, head/sys/powerpc/powerpc/vm_machdep.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/powerpc/powerpc/vm_machdep.c Tue May 13 16:50:10 2014 (r265952, copy of r256792, head/sys/powerpc/powerpc/vm_machdep.c) @@ -0,0 +1,410 @@ +/*- + * Copyright (c) 1982, 1986 The Regents of the University of California. + * Copyright (c) 1989, 1990 William Jolitz + * Copyright (c) 1994 John Dyson + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * the Systems Programming Group of the University of Utah Computer + * Science Department, and William Jolitz. + * + * 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. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. + * + * from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91 + * Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$ + * $FreeBSD$ + */ +/*- + * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University. + * All rights reserved. + * + * Author: Chris G. Demetriou + * + * Permission to use, copy, modify and distribute this software and + * its documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND + * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie the + * rights to redistribute these changes. + */ + +#include +#include +#include +#include +#include *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Tue May 13 16:52:22 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 817E5CB; Tue, 13 May 2014 16:52:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E72A29C8; Tue, 13 May 2014 16:52:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4DGqMja080500; Tue, 13 May 2014 16:52:22 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4DGqMEE080499; Tue, 13 May 2014 16:52:22 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405131652.s4DGqMEE080499@svn.freebsd.org> From: Ian Lepore Date: Tue, 13 May 2014 16:52:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265953 - stable/10/sys/dev/fdt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 16:52:22 -0000 Author: ian Date: Tue May 13 16:52:21 2014 New Revision: 265953 URL: http://svnweb.freebsd.org/changeset/base/265953 Log: MFC r256798: Return BUS_PROBE_NOWILDCARD from fdtbus_probe. Modified: stable/10/sys/dev/fdt/fdtbus.c Modified: stable/10/sys/dev/fdt/fdtbus.c ============================================================================== --- stable/10/sys/dev/fdt/fdtbus.c Tue May 13 16:50:10 2014 (r265952) +++ stable/10/sys/dev/fdt/fdtbus.c Tue May 13 16:52:21 2014 (r265953) @@ -161,7 +161,7 @@ fdtbus_probe(device_t dev) device_set_desc(dev, "FDT main bus"); if (!bootverbose) device_quiet(dev); - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_NOWILDCARD); } static int From owner-svn-src-stable@FreeBSD.ORG Tue May 13 16:59:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D56FA30A; Tue, 13 May 2014 16:59:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C01EC2A17; Tue, 13 May 2014 16:59:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4DGxq58081548; Tue, 13 May 2014 16:59:52 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4DGxp4O081466; Tue, 13 May 2014 16:59:51 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405131659.s4DGxp4O081466@svn.freebsd.org> From: Ian Lepore Date: Tue, 13 May 2014 16:59:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265954 - in stable/10/sys: dev/ofw powerpc/booke powerpc/ofw powerpc/powerpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 16:59:52 -0000 Author: ian Date: Tue May 13 16:59:50 2014 New Revision: 265954 URL: http://svnweb.freebsd.org/changeset/base/265954 Log: MFC r256814, r256816, r256818, r256846, r256855, r256864 (by nwhitehorn): - Handle 2GB of ram - Allow the OFW interrupt mapping code to work with PCI devices not enumerated by Open Firmware, as in the case of FDT. - Provide an interface for PCI bus drivers that need some of ofw_pci's metadata during attach. - Use standard ofw_bus helpers instead of reinventing the wheel. - Make hard-wired TLB allocations be at minimum one page. Modified: stable/10/sys/dev/ofw/ofw_bus_subr.c stable/10/sys/powerpc/booke/machdep.c stable/10/sys/powerpc/booke/pmap.c stable/10/sys/powerpc/ofw/ofw_pci.c stable/10/sys/powerpc/ofw/ofw_pci.h stable/10/sys/powerpc/ofw/ofw_pcib_pci.c stable/10/sys/powerpc/ofw/ofw_pcibus.c stable/10/sys/powerpc/powerpc/clock.c stable/10/sys/powerpc/powerpc/nexus.c Modified: stable/10/sys/dev/ofw/ofw_bus_subr.c ============================================================================== --- stable/10/sys/dev/ofw/ofw_bus_subr.c Tue May 13 16:52:21 2014 (r265953) +++ stable/10/sys/dev/ofw/ofw_bus_subr.c Tue May 13 16:59:50 2014 (r265954) @@ -223,7 +223,6 @@ ofw_bus_has_prop(device_t dev, const cha return (OF_hasprop(node, propname)); } -#ifndef FDT void ofw_bus_setup_iinfo(phandle_t node, struct ofw_bus_iinfo *ii, int intrsz) { @@ -261,9 +260,11 @@ ofw_bus_lookup_imap(phandle_t node, stru KASSERT(regsz >= ii->opi_addrc, ("ofw_bus_lookup_imap: register size too small: %d < %d", regsz, ii->opi_addrc)); - rv = OF_getprop(node, "reg", reg, regsz); - if (rv < regsz) - panic("ofw_bus_lookup_imap: could not get reg property"); + if (node != -1) { + rv = OF_getprop(node, "reg", reg, regsz); + if (rv < regsz) + panic("ofw_bus_lookup_imap: cannot get reg property"); + } return (ofw_bus_search_intrmap(pintr, pintrsz, reg, ii->opi_addrc, ii->opi_imap, ii->opi_imapsz, ii->opi_imapmsk, maskbuf, mintr, mintrsz, iparent)); @@ -343,4 +344,4 @@ ofw_bus_search_intrmap(void *intr, int i } return (0); } -#endif /* !FDT */ + Modified: stable/10/sys/powerpc/booke/machdep.c ============================================================================== --- stable/10/sys/powerpc/booke/machdep.c Tue May 13 16:52:21 2014 (r265953) +++ stable/10/sys/powerpc/booke/machdep.c Tue May 13 16:59:50 2014 (r265954) @@ -192,7 +192,8 @@ extern int elf32_nxstack; static void cpu_booke_startup(void *dummy) { - int indx, size; + int indx; + unsigned long size; /* Initialise the decrementer-based clock. */ decr_init(); @@ -200,7 +201,7 @@ cpu_booke_startup(void *dummy) /* Good {morning,afternoon,evening,night}. */ cpu_setup(PCPU_GET(cpuid)); - printf("real memory = %ld (%ld MB)\n", ptoa(physmem), + printf("real memory = %lu (%ld MB)\n", ptoa(physmem), ptoa(physmem) / 1048576); realmem = physmem; @@ -210,7 +211,7 @@ cpu_booke_startup(void *dummy) for (indx = 0; phys_avail[indx + 1] != 0; indx += 2) { size = phys_avail[indx + 1] - phys_avail[indx]; - printf("0x%08x - 0x%08x, %d bytes (%ld pages)\n", + printf("0x%08x - 0x%08x, %lu bytes (%lu pages)\n", phys_avail[indx], phys_avail[indx + 1] - 1, size, size / PAGE_SIZE); } @@ -218,7 +219,7 @@ cpu_booke_startup(void *dummy) vm_ksubmap_init(&kmi); - printf("avail memory = %ld (%ld MB)\n", ptoa(cnt.v_free_count), + printf("avail memory = %lu (%ld MB)\n", ptoa(cnt.v_free_count), ptoa(cnt.v_free_count) / 1048576); /* Set up buffers, so they can be used to read disk labels. */ Modified: stable/10/sys/powerpc/booke/pmap.c ============================================================================== --- stable/10/sys/powerpc/booke/pmap.c Tue May 13 16:52:21 2014 (r265953) +++ stable/10/sys/powerpc/booke/pmap.c Tue May 13 16:59:50 2014 (r265954) @@ -2613,6 +2613,8 @@ mmu_booke_mapdev(mmu_t mmu, vm_paddr_t p va = (pa >= 0x80000000) ? pa : (0xe2000000 + pa); res = (void *)va; + if (size < PAGE_SIZE) + size = PAGE_SIZE; do { sz = 1 << (ilog2(size) & ~1); Modified: stable/10/sys/powerpc/ofw/ofw_pci.c ============================================================================== --- stable/10/sys/powerpc/ofw/ofw_pci.c Tue May 13 16:52:21 2014 (r265953) +++ stable/10/sys/powerpc/ofw/ofw_pci.c Tue May 13 16:59:50 2014 (r265954) @@ -124,7 +124,7 @@ static device_method_t ofw_pci_methods[] DEFINE_CLASS_0(ofw_pci, ofw_pci_driver, ofw_pci_methods, 0); int -ofw_pci_attach(device_t dev) +ofw_pci_init(device_t dev) { struct ofw_pci_softc *sc; phandle_t node; @@ -134,6 +134,7 @@ ofw_pci_attach(device_t dev) node = ofw_bus_get_node(dev); sc = device_get_softc(dev); + sc->sc_initialized = 1; if (OF_getprop(node, "reg", &sc->sc_pcir, sizeof(sc->sc_pcir)) == -1) return (ENXIO); @@ -217,13 +218,28 @@ ofw_pci_attach(device_t dev) "error = %d\n", rp->pci_hi & OFW_PCI_PHYS_HI_SPACEMASK, rp->pci, rp->pci + rp->size - 1, error); - panic("AHOY"); return (error); } } ofw_bus_setup_iinfo(node, &sc->sc_pci_iinfo, sizeof(cell_t)); + return (error); +} + +int +ofw_pci_attach(device_t dev) +{ + struct ofw_pci_softc *sc; + int error; + + sc = device_get_softc(dev); + if (!sc->sc_initialized) { + error = ofw_pci_init(dev); + if (error) + return (error); + } + device_add_child(dev, "pci", device_get_unit(dev)); return (bus_generic_attach(dev)); } @@ -246,6 +262,13 @@ ofw_pci_route_interrupt(device_t bus, de sc = device_get_softc(bus); pintr = pin; + + /* Fabricate imap information in case this isn't an OFW device */ + bzero(®, sizeof(reg)); + reg.phys_hi = (pci_get_bus(dev) << OFW_PCI_PHYS_HI_BUSSHIFT) | + (pci_get_slot(dev) << OFW_PCI_PHYS_HI_DEVICESHIFT) | + (pci_get_function(dev) << OFW_PCI_PHYS_HI_FUNCTIONSHIFT); + if (ofw_bus_lookup_imap(ofw_bus_get_node(dev), &sc->sc_pci_iinfo, ®, sizeof(reg), &pintr, sizeof(pintr), &mintr, sizeof(mintr), &iparent, maskbuf)) Modified: stable/10/sys/powerpc/ofw/ofw_pci.h ============================================================================== --- stable/10/sys/powerpc/ofw/ofw_pci.h Tue May 13 16:52:21 2014 (r265953) +++ stable/10/sys/powerpc/ofw/ofw_pci.h Tue May 13 16:59:50 2014 (r265954) @@ -52,6 +52,7 @@ struct ofw_pci_softc { device_t sc_dev; phandle_t sc_node; int sc_bus; + int sc_initialized; int sc_quirks; @@ -68,6 +69,7 @@ struct ofw_pci_softc { struct ofw_bus_iinfo sc_pci_iinfo; }; +int ofw_pci_init(device_t dev); int ofw_pci_attach(device_t dev); #endif // POWERPC_OFW_OFW_PCI_H Modified: stable/10/sys/powerpc/ofw/ofw_pcib_pci.c ============================================================================== --- stable/10/sys/powerpc/ofw/ofw_pcib_pci.c Tue May 13 16:52:21 2014 (r265953) +++ stable/10/sys/powerpc/ofw/ofw_pcib_pci.c Tue May 13 16:59:50 2014 (r265954) @@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -141,6 +142,13 @@ ofw_pcib_pci_route_interrupt(device_t br ii = &sc->ops_iinfo; if (ii->opi_imapsz > 0) { pintr = intpin; + + /* Fabricate imap information if this isn't an OFW device */ + bzero(®, sizeof(reg)); + reg.phys_hi = (pci_get_bus(dev) << OFW_PCI_PHYS_HI_BUSSHIFT) | + (pci_get_slot(dev) << OFW_PCI_PHYS_HI_DEVICESHIFT) | + (pci_get_function(dev) << OFW_PCI_PHYS_HI_FUNCTIONSHIFT); + if (ofw_bus_lookup_imap(ofw_bus_get_node(dev), ii, ®, sizeof(reg), &pintr, sizeof(pintr), &mintr, sizeof(mintr), &iparent, maskbuf)) { Modified: stable/10/sys/powerpc/ofw/ofw_pcibus.c ============================================================================== --- stable/10/sys/powerpc/ofw/ofw_pcibus.c Tue May 13 16:52:21 2014 (r265953) +++ stable/10/sys/powerpc/ofw/ofw_pcibus.c Tue May 13 16:59:50 2014 (r265954) @@ -320,20 +320,9 @@ ofw_pcibus_assign_interrupt(device_t dev if (node == -1) { /* Non-firmware enumerated child, use standard routing */ - /* - * XXX: Right now we don't have anything sensible to do here, - * since the ofw_imap stuff relies on nodes having a reg - * property. There exist ways around this, so the ePAPR - * spec will need to be studied. - */ - - return (PCI_INVALID_IRQ); - -#ifdef NOTYET intr = pci_get_intpin(child); return (PCIB_ROUTE_INTERRUPT(device_get_parent(dev), child, intr)); -#endif } /* Modified: stable/10/sys/powerpc/powerpc/clock.c ============================================================================== --- stable/10/sys/powerpc/powerpc/clock.c Tue May 13 16:52:21 2014 (r265953) +++ stable/10/sys/powerpc/powerpc/clock.c Tue May 13 16:59:50 2014 (r265954) @@ -167,8 +167,8 @@ decr_init(void) char buf[32]; /* - * Check the BSP's timebase frequency. Sometimes we can't find the BSP, so fall - * back to the first CPU in this case. + * Check the BSP's timebase frequency. Sometimes we can't find the BSP, + * so fall back to the first CPU in this case. */ if (platform_smp_get_bsp(&cpu) != 0) platform_smp_first_cpu(&cpu); Modified: stable/10/sys/powerpc/powerpc/nexus.c ============================================================================== --- stable/10/sys/powerpc/powerpc/nexus.c Tue May 13 16:52:21 2014 (r265953) +++ stable/10/sys/powerpc/powerpc/nexus.c Tue May 13 16:59:50 2014 (r265954) @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -88,19 +89,8 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_NEXUS, "nexus", "nexus device information"); -enum nexus_ivars { - NEXUS_IVAR_NODE, - NEXUS_IVAR_NAME, - NEXUS_IVAR_DEVICE_TYPE, - NEXUS_IVAR_COMPATIBLE, -}; - struct nexus_devinfo { - phandle_t ndi_node; - /* Some common properties. */ - const char *ndi_name; - const char *ndi_device_type; - const char *ndi_compatible; + struct ofw_bus_devinfo ndi_ofwinfo; }; struct nexus_softc { @@ -118,8 +108,6 @@ static int nexus_attach(device_t); */ static device_t nexus_add_child(device_t, u_int, const char *, int); static void nexus_probe_nomatch(device_t, device_t); -static int nexus_read_ivar(device_t, device_t, int, uintptr_t *); -static int nexus_write_ivar(device_t, device_t, int, uintptr_t); #ifdef SMP static int nexus_bind_intr(device_t dev, device_t child, struct resource *irq, int cpu); @@ -138,14 +126,8 @@ static int nexus_deactivate_resource(dev struct resource *); static int nexus_release_resource(device_t, device_t, int, int, struct resource *); - -/* - * OFW bus interface. - */ -static phandle_t nexus_ofw_get_node(device_t, device_t); -static const char *nexus_ofw_get_name(device_t, device_t); -static const char *nexus_ofw_get_type(device_t, device_t); -static const char *nexus_ofw_get_compat(device_t, device_t); +static const struct ofw_bus_devinfo *nexus_get_devinfo(device_t dev, + device_t child); /* * Local routines @@ -165,8 +147,6 @@ static device_method_t nexus_methods[] = DEVMETHOD(bus_add_child, nexus_add_child), DEVMETHOD(bus_child_pnpinfo_str, ofw_bus_gen_child_pnpinfo_str), DEVMETHOD(bus_probe_nomatch, nexus_probe_nomatch), - DEVMETHOD(bus_read_ivar, nexus_read_ivar), - DEVMETHOD(bus_write_ivar, nexus_write_ivar), DEVMETHOD(bus_setup_intr, nexus_setup_intr), DEVMETHOD(bus_teardown_intr, nexus_teardown_intr), #ifdef SMP @@ -179,10 +159,12 @@ static device_method_t nexus_methods[] = DEVMETHOD(bus_release_resource, nexus_release_resource), /* OFW bus interface */ - DEVMETHOD(ofw_bus_get_node, nexus_ofw_get_node), - DEVMETHOD(ofw_bus_get_name, nexus_ofw_get_name), - DEVMETHOD(ofw_bus_get_type, nexus_ofw_get_type), - DEVMETHOD(ofw_bus_get_compat, nexus_ofw_get_compat), + DEVMETHOD(ofw_bus_get_devinfo, nexus_get_devinfo), + DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), + DEVMETHOD(ofw_bus_get_model, ofw_bus_gen_get_model), + DEVMETHOD(ofw_bus_get_name, ofw_bus_gen_get_name), + DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), + DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), DEVMETHOD_END }; @@ -246,14 +228,13 @@ nexus_attach(device_t dev) static void nexus_probe_nomatch(device_t dev, device_t child) { - char *name, *type; + const char *name, *type; - if (BUS_READ_IVAR(dev, child, NEXUS_IVAR_NAME, - (uintptr_t *)&name) != 0 || - BUS_READ_IVAR(dev, child, NEXUS_IVAR_DEVICE_TYPE, - (uintptr_t *)&type) != 0) - return; + name = ofw_bus_get_name(child); + type = ofw_bus_get_type(child); + if (name == NULL) + name = "unknown"; if (type == NULL) type = "(unknown)"; @@ -276,67 +257,17 @@ nexus_add_child(device_t dev, u_int orde if (dinfo == NULL) return (NULL); - dinfo->ndi_node = -1; - dinfo->ndi_name = name; + dinfo->ndi_ofwinfo.obd_node = -1; + dinfo->ndi_ofwinfo.obd_name = NULL; + dinfo->ndi_ofwinfo.obd_compat = NULL; + dinfo->ndi_ofwinfo.obd_type = NULL; + dinfo->ndi_ofwinfo.obd_model = NULL; + device_set_ivars(child, dinfo); return (child); } - -static int -nexus_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) -{ - struct nexus_devinfo *dinfo; - - if ((dinfo = device_get_ivars(child)) == 0) - return (ENOENT); - switch (which) { - case NEXUS_IVAR_NODE: - *result = dinfo->ndi_node; - break; - case NEXUS_IVAR_NAME: - *result = (uintptr_t)dinfo->ndi_name; - break; - case NEXUS_IVAR_DEVICE_TYPE: - *result = (uintptr_t)dinfo->ndi_device_type; - break; - case NEXUS_IVAR_COMPATIBLE: - *result = (uintptr_t)dinfo->ndi_compatible; - break; - default: - return (ENOENT); - } - return 0; -} - -static int -nexus_write_ivar(device_t dev, device_t child, int which, uintptr_t value) -{ - struct nexus_devinfo *dinfo; - - if ((dinfo = device_get_ivars(child)) == 0) - return (ENOENT); - - switch (which) { - case NEXUS_IVAR_NAME: - return (EINVAL); - - /* Identified devices may want to set these */ - case NEXUS_IVAR_NODE: - dinfo->ndi_node = (phandle_t)value; - break; - - case NEXUS_IVAR_DEVICE_TYPE: - dinfo->ndi_device_type = (char *)value; - break; - - default: - return (ENOENT); - } - return 0; -} - static int nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags, driver_filter_t *filter, driver_intr_t *ihand, void *arg, void **cookiep) @@ -462,66 +393,23 @@ nexus_device_from_node(device_t parent, { device_t cdev; struct nexus_devinfo *dinfo; - char *name, *type, *compatible; - OF_getprop_alloc(node, "name", 1, (void **)&name); - OF_getprop_alloc(node, "device_type", 1, (void **)&type); - OF_getprop_alloc(node, "compatible", 1, (void **)&compatible); cdev = device_add_child(parent, NULL, -1); if (cdev != NULL) { dinfo = malloc(sizeof(*dinfo), M_NEXUS, M_WAITOK); - dinfo->ndi_node = node; - dinfo->ndi_name = name; - dinfo->ndi_device_type = type; - dinfo->ndi_compatible = compatible; + ofw_bus_gen_setup_devinfo(&dinfo->ndi_ofwinfo, node); device_set_ivars(cdev, dinfo); - } else - free(name, M_OFWPROP); + } return (cdev); } -static const char * -nexus_ofw_get_name(device_t bus, device_t dev) -{ - struct nexus_devinfo *dinfo; - - if ((dinfo = device_get_ivars(dev)) == NULL) - return (NULL); - - return (dinfo->ndi_name); -} - -static phandle_t -nexus_ofw_get_node(device_t bus, device_t dev) -{ - struct nexus_devinfo *dinfo; - - if ((dinfo = device_get_ivars(dev)) == NULL) - return (0); - - return (dinfo->ndi_node); -} - -static const char * -nexus_ofw_get_type(device_t bus, device_t dev) +static const struct ofw_bus_devinfo * +nexus_get_devinfo(device_t dev, device_t child) { struct nexus_devinfo *dinfo; - if ((dinfo = device_get_ivars(dev)) == NULL) - return (NULL); - - return (dinfo->ndi_device_type); -} - -static const char * -nexus_ofw_get_compat(device_t bus, device_t dev) -{ - struct nexus_devinfo *dinfo; - - if ((dinfo = device_get_ivars(dev)) == NULL) - return (NULL); - - return (dinfo->ndi_compatible); + dinfo = device_get_ivars(child); + return (&dinfo->ndi_ofwinfo); } From owner-svn-src-stable@FreeBSD.ORG Tue May 13 17:01:23 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 22E855F8; Tue, 13 May 2014 17:01:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0FCF42A3B; Tue, 13 May 2014 17:01:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4DH1MNe084489; Tue, 13 May 2014 17:01:22 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4DH1MBV084487; Tue, 13 May 2014 17:01:22 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405131701.s4DH1MBV084487@svn.freebsd.org> From: Michael Tuexen Date: Tue, 13 May 2014 17:01:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265955 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 17:01:23 -0000 Author: tuexen Date: Tue May 13 17:01:22 2014 New Revision: 265955 URL: http://svnweb.freebsd.org/changeset/base/265955 Log: MFC r253472: Get the code compiling without INET and INET6 being defined. This is not possible in FreeBSD, but in the upstream code. Modified: stable/9/sys/netinet/sctp_output.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_output.c ============================================================================== --- stable/9/sys/netinet/sctp_output.c Tue May 13 16:59:50 2014 (r265954) +++ stable/9/sys/netinet/sctp_output.c Tue May 13 17:01:22 2014 (r265955) @@ -4543,11 +4543,7 @@ sctp_send_initiate(struct sctp_inpcb *in struct mbuf *m; struct sctp_nets *net; struct sctp_init_chunk *init; - -#if defined(INET) || defined(INET6) struct sctp_supported_addr_param *sup_addr; - -#endif struct sctp_adaptation_layer_indication *ali; struct sctp_supported_chunk_types_param *pr_supported; struct sctp_paramhdr *ph; From owner-svn-src-stable@FreeBSD.ORG Tue May 13 17:03:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7568574E; Tue, 13 May 2014 17:03:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 486E72AB8; Tue, 13 May 2014 17:03:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4DH3iTL085444; Tue, 13 May 2014 17:03:44 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4DH3ixG085443; Tue, 13 May 2014 17:03:44 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405131703.s4DH3ixG085443@svn.freebsd.org> From: Michael Tuexen Date: Tue, 13 May 2014 17:03:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265956 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 17:03:44 -0000 Author: tuexen Date: Tue May 13 17:03:43 2014 New Revision: 265956 URL: http://svnweb.freebsd.org/changeset/base/265956 Log: MFC r253493: Allow the code to be compiled without warnings for any combination of INET, INET6 and SCTP_DEBUG defines. The issue was reported by Lally Singh. Modified: stable/9/sys/netinet/sctp_asconf.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_asconf.c ============================================================================== --- stable/9/sys/netinet/sctp_asconf.c Tue May 13 17:01:22 2014 (r265955) +++ stable/9/sys/netinet/sctp_asconf.c Tue May 13 17:03:43 2014 (r265956) @@ -1191,7 +1191,6 @@ sctp_asconf_queue_mgmt(struct sctp_tcb * uint16_t type) { struct sctp_asconf_addr *aa, *aa_next; - struct sockaddr *sa; /* make sure the request isn't already in the queue */ TAILQ_FOREACH_SAFE(aa, &stcb->asoc.asconf_queue, next, aa_next) { @@ -1255,7 +1254,6 @@ sctp_asconf_queue_mgmt(struct sctp_tcb * struct sockaddr_in6 *sin6; sin6 = (struct sockaddr_in6 *)&ifa->address.sa; - sa = (struct sockaddr *)sin6; aa->ap.addrp.ph.param_type = SCTP_IPV6_ADDRESS; aa->ap.addrp.ph.param_length = (sizeof(struct sctp_ipv6addr_param)); aa->ap.aph.ph.param_length = sizeof(struct sctp_asconf_paramhdr) + @@ -1271,7 +1269,6 @@ sctp_asconf_queue_mgmt(struct sctp_tcb * struct sockaddr_in *sin; sin = (struct sockaddr_in *)&ifa->address.sa; - sa = (struct sockaddr *)sin; aa->ap.addrp.ph.param_type = SCTP_IPV4_ADDRESS; aa->ap.addrp.ph.param_length = (sizeof(struct sctp_ipv4addr_param)); aa->ap.aph.ph.param_length = sizeof(struct sctp_asconf_paramhdr) + @@ -1294,13 +1291,13 @@ sctp_asconf_queue_mgmt(struct sctp_tcb * if (SCTP_BASE_SYSCTL(sctp_debug_on) & SCTP_DEBUG_ASCONF2) { if (type == SCTP_ADD_IP_ADDRESS) { SCTP_PRINTF("asconf_queue_mgmt: inserted asconf ADD_IP_ADDRESS: "); - SCTPDBG_ADDR(SCTP_DEBUG_ASCONF2, sa); + SCTPDBG_ADDR(SCTP_DEBUG_ASCONF2, &ifa->address.sa); } else if (type == SCTP_DEL_IP_ADDRESS) { SCTP_PRINTF("asconf_queue_mgmt: appended asconf DEL_IP_ADDRESS: "); - SCTPDBG_ADDR(SCTP_DEBUG_ASCONF2, sa); + SCTPDBG_ADDR(SCTP_DEBUG_ASCONF2, &ifa->address.sa); } else { SCTP_PRINTF("asconf_queue_mgmt: appended asconf SET_PRIM_ADDR: "); - SCTPDBG_ADDR(SCTP_DEBUG_ASCONF2, sa); + SCTPDBG_ADDR(SCTP_DEBUG_ASCONF2, &ifa->address.sa); } } #endif From owner-svn-src-stable@FreeBSD.ORG Tue May 13 17:05:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C45D58AC; Tue, 13 May 2014 17:05:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B116E2AD4; Tue, 13 May 2014 17:05:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4DH5cel085830; Tue, 13 May 2014 17:05:38 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4DH5csp085829; Tue, 13 May 2014 17:05:38 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405131705.s4DH5csp085829@svn.freebsd.org> From: Michael Tuexen Date: Tue, 13 May 2014 17:05:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265957 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 17:05:38 -0000 Author: tuexen Date: Tue May 13 17:05:38 2014 New Revision: 265957 URL: http://svnweb.freebsd.org/changeset/base/265957 Log: MFC r253858: Micro-optimization suggested in https://bugzilla.mozilla.org/show_bug.cgi?id=898234 by pchang9. While there simplify the code. Modified: stable/9/sys/netinet/sctp_usrreq.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/9/sys/netinet/sctp_usrreq.c Tue May 13 17:03:43 2014 (r265956) +++ stable/9/sys/netinet/sctp_usrreq.c Tue May 13 17:05:38 2014 (r265957) @@ -3942,7 +3942,6 @@ sctp_setopt(struct socket *so, int optna sctp_hmaclist_t *hmaclist; uint16_t hmacid; uint32_t i; - size_t found; SCTP_CHECK_AND_CAST(shmac, optval, struct sctp_hmacalgo, optsize); if (optsize < sizeof(struct sctp_hmacalgo) + shmac->shmac_number_of_idents * sizeof(uint16_t)) { @@ -3966,14 +3965,14 @@ sctp_setopt(struct socket *so, int optna goto sctp_set_hmac_done; } } - found = 0; for (i = 0; i < hmaclist->num_algo; i++) { if (hmaclist->hmac[i] == SCTP_AUTH_HMAC_ID_SHA1) { /* already in list */ - found = 1; + break; } } - if (!found) { + if (i == hmaclist->num_algo) { + /* not found in list */ sctp_free_hmaclist(hmaclist); SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); error = EINVAL; From owner-svn-src-stable@FreeBSD.ORG Tue May 13 17:09:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94FB3B23; Tue, 13 May 2014 17:09:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 758A52B14; Tue, 13 May 2014 17:09:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4DH9qrP086553; Tue, 13 May 2014 17:09:52 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4DH9pW8086544; Tue, 13 May 2014 17:09:51 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405131709.s4DH9pW8086544@svn.freebsd.org> From: Michael Tuexen Date: Tue, 13 May 2014 17:09:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265958 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 17:09:52 -0000 Author: tuexen Date: Tue May 13 17:09:50 2014 New Revision: 265958 URL: http://svnweb.freebsd.org/changeset/base/265958 Log: MFC r254248, r254670: Make the features a 64-bit value instead of 32-bit. This will allow an easier integration of the support for NDATA. While there, do also some minor cleanups. Obtained from: rrs@ Make also the features of the association 64-bit. When exporting to xinpcb, just export the lower 32-bit. Using there also 64-bits will break the ABI and will be committed separetly. Modified: stable/9/sys/netinet/sctp.h stable/9/sys/netinet/sctp_indata.c stable/9/sys/netinet/sctp_output.c stable/9/sys/netinet/sctp_pcb.h stable/9/sys/netinet/sctp_structs.h stable/9/sys/netinet/sctp_sysctl.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp.h ============================================================================== --- stable/9/sys/netinet/sctp.h Tue May 13 17:05:38 2014 (r265957) +++ stable/9/sys/netinet/sctp.h Tue May 13 17:09:50 2014 (r265958) @@ -425,7 +425,7 @@ struct sctp_error_unrecognized_chunk { /* RFC4895 */ #define SCTP_AUTHENTICATION 0x0f /* EY nr_sack chunk id*/ -#define SCTP_NR_SELECTIVE_ACK 0x10 +#define SCTP_NR_SELECTIVE_ACK 0x10 /************0x40 series ***********/ /************0x80 series ***********/ /* RFC5061 */ @@ -509,38 +509,38 @@ struct sctp_error_unrecognized_chunk { /* * PCB Features (in sctp_features bitmask) */ -#define SCTP_PCB_FLAGS_DO_NOT_PMTUD 0x00000001 -#define SCTP_PCB_FLAGS_EXT_RCVINFO 0x00000002 /* deprecated */ -#define SCTP_PCB_FLAGS_DONOT_HEARTBEAT 0x00000004 -#define SCTP_PCB_FLAGS_FRAG_INTERLEAVE 0x00000008 -#define SCTP_PCB_FLAGS_INTERLEAVE_STRMS 0x00000010 -#define SCTP_PCB_FLAGS_DO_ASCONF 0x00000020 -#define SCTP_PCB_FLAGS_AUTO_ASCONF 0x00000040 -#define SCTP_PCB_FLAGS_ZERO_COPY_ACTIVE 0x00000080 +#define SCTP_PCB_FLAGS_DO_NOT_PMTUD 0x0000000000000001 +#define SCTP_PCB_FLAGS_EXT_RCVINFO 0x0000000000000002 /* deprecated */ +#define SCTP_PCB_FLAGS_DONOT_HEARTBEAT 0x0000000000000004 +#define SCTP_PCB_FLAGS_FRAG_INTERLEAVE 0x0000000000000008 +#define SCTP_PCB_FLAGS_INTERLEAVE_STRMS 0x0000000000000010 +#define SCTP_PCB_FLAGS_DO_ASCONF 0x0000000000000020 +#define SCTP_PCB_FLAGS_AUTO_ASCONF 0x0000000000000040 +#define SCTP_PCB_FLAGS_ZERO_COPY_ACTIVE 0x0000000000000080 /* socket options */ -#define SCTP_PCB_FLAGS_NODELAY 0x00000100 -#define SCTP_PCB_FLAGS_AUTOCLOSE 0x00000200 -#define SCTP_PCB_FLAGS_RECVDATAIOEVNT 0x00000400 /* deprecated */ -#define SCTP_PCB_FLAGS_RECVASSOCEVNT 0x00000800 -#define SCTP_PCB_FLAGS_RECVPADDREVNT 0x00001000 -#define SCTP_PCB_FLAGS_RECVPEERERR 0x00002000 -#define SCTP_PCB_FLAGS_RECVSENDFAILEVNT 0x00004000 /* deprecated */ -#define SCTP_PCB_FLAGS_RECVSHUTDOWNEVNT 0x00008000 -#define SCTP_PCB_FLAGS_ADAPTATIONEVNT 0x00010000 -#define SCTP_PCB_FLAGS_PDAPIEVNT 0x00020000 -#define SCTP_PCB_FLAGS_AUTHEVNT 0x00040000 -#define SCTP_PCB_FLAGS_STREAM_RESETEVNT 0x00080000 -#define SCTP_PCB_FLAGS_NO_FRAGMENT 0x00100000 -#define SCTP_PCB_FLAGS_EXPLICIT_EOR 0x00400000 -#define SCTP_PCB_FLAGS_NEEDS_MAPPED_V4 0x00800000 -#define SCTP_PCB_FLAGS_MULTIPLE_ASCONFS 0x01000000 -#define SCTP_PCB_FLAGS_PORTREUSE 0x02000000 -#define SCTP_PCB_FLAGS_DRYEVNT 0x04000000 -#define SCTP_PCB_FLAGS_RECVRCVINFO 0x08000000 -#define SCTP_PCB_FLAGS_RECVNXTINFO 0x10000000 -#define SCTP_PCB_FLAGS_ASSOC_RESETEVNT 0x20000000 -#define SCTP_PCB_FLAGS_STREAM_CHANGEEVNT 0x40000000 -#define SCTP_PCB_FLAGS_RECVNSENDFAILEVNT 0x80000000 +#define SCTP_PCB_FLAGS_NODELAY 0x0000000000000100 +#define SCTP_PCB_FLAGS_AUTOCLOSE 0x0000000000000200 +#define SCTP_PCB_FLAGS_RECVDATAIOEVNT 0x0000000000000400 /* deprecated */ +#define SCTP_PCB_FLAGS_RECVASSOCEVNT 0x0000000000000800 +#define SCTP_PCB_FLAGS_RECVPADDREVNT 0x0000000000001000 +#define SCTP_PCB_FLAGS_RECVPEERERR 0x0000000000002000 +#define SCTP_PCB_FLAGS_RECVSENDFAILEVNT 0x0000000000004000 /* deprecated */ +#define SCTP_PCB_FLAGS_RECVSHUTDOWNEVNT 0x0000000000008000 +#define SCTP_PCB_FLAGS_ADAPTATIONEVNT 0x0000000000010000 +#define SCTP_PCB_FLAGS_PDAPIEVNT 0x0000000000020000 +#define SCTP_PCB_FLAGS_AUTHEVNT 0x0000000000040000 +#define SCTP_PCB_FLAGS_STREAM_RESETEVNT 0x0000000000080000 +#define SCTP_PCB_FLAGS_NO_FRAGMENT 0x0000000000100000 +#define SCTP_PCB_FLAGS_EXPLICIT_EOR 0x0000000000400000 +#define SCTP_PCB_FLAGS_NEEDS_MAPPED_V4 0x0000000000800000 +#define SCTP_PCB_FLAGS_MULTIPLE_ASCONFS 0x0000000001000000 +#define SCTP_PCB_FLAGS_PORTREUSE 0x0000000002000000 +#define SCTP_PCB_FLAGS_DRYEVNT 0x0000000004000000 +#define SCTP_PCB_FLAGS_RECVRCVINFO 0x0000000008000000 +#define SCTP_PCB_FLAGS_RECVNXTINFO 0x0000000010000000 +#define SCTP_PCB_FLAGS_ASSOC_RESETEVNT 0x0000000020000000 +#define SCTP_PCB_FLAGS_STREAM_CHANGEEVNT 0x0000000040000000 +#define SCTP_PCB_FLAGS_RECVNSENDFAILEVNT 0x0000000080000000 /*- * mobility_features parameters (by micchie).Note Modified: stable/9/sys/netinet/sctp_indata.c ============================================================================== --- stable/9/sys/netinet/sctp_indata.c Tue May 13 17:05:38 2014 (r265957) +++ stable/9/sys/netinet/sctp_indata.c Tue May 13 17:09:50 2014 (r265958) @@ -1417,7 +1417,6 @@ sctp_does_tsn_belong_to_reasm(struct sct return (0); } - static int sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc, struct mbuf **m, int offset, struct sctp_data_chunk *ch, int chk_length, Modified: stable/9/sys/netinet/sctp_output.c ============================================================================== --- stable/9/sys/netinet/sctp_output.c Tue May 13 17:05:38 2014 (r265957) +++ stable/9/sys/netinet/sctp_output.c Tue May 13 17:09:50 2014 (r265958) @@ -7621,7 +7621,7 @@ sctp_med_chunk_output(struct sctp_inpcb #endif ) { - /* + /** * Ok this is the generic chunk service queue. we must do the * following: - Service the stream queue that is next, moving any * message (note I must get a complete message i.e. FIRST/MIDDLE and Modified: stable/9/sys/netinet/sctp_pcb.h ============================================================================== --- stable/9/sys/netinet/sctp_pcb.h Tue May 13 17:05:38 2014 (r265957) +++ stable/9/sys/netinet/sctp_pcb.h Tue May 13 17:09:50 2014 (r265958) @@ -388,8 +388,8 @@ struct sctp_inpcb { /* back pointer to our socket */ struct socket *sctp_socket; + uint64_t sctp_features; /* Feature flags */ uint32_t sctp_flags; /* INP state flag set */ - uint32_t sctp_features; /* Feature flags */ uint32_t sctp_mobility_features; /* Mobility Feature flags */ struct sctp_pcb sctp_ep;/* SCTP ep data */ /* head of the hash of all associations */ Modified: stable/9/sys/netinet/sctp_structs.h ============================================================================== --- stable/9/sys/netinet/sctp_structs.h Tue May 13 17:05:38 2014 (r265957) +++ stable/9/sys/netinet/sctp_structs.h Tue May 13 17:09:50 2014 (r265958) @@ -1205,7 +1205,7 @@ struct sctp_association { /* JRS 5/21/07 - CMT PF variable */ uint8_t sctp_cmt_pf; uint8_t use_precise_time; - uint32_t sctp_features; + uint64_t sctp_features; uint16_t port; /* remote UDP encapsulation port */ /* * The mapping array is used to track out of order sequences above Modified: stable/9/sys/netinet/sctp_sysctl.c ============================================================================== --- stable/9/sys/netinet/sctp_sysctl.c Tue May 13 17:05:38 2014 (r265957) +++ stable/9/sys/netinet/sctp_sysctl.c Tue May 13 17:09:50 2014 (r265958) @@ -402,7 +402,7 @@ sctp_assoclist(SYSCTL_HANDLER_ARGS) xinpcb.last = 0; xinpcb.local_port = ntohs(inp->sctp_lport); xinpcb.flags = inp->sctp_flags; - xinpcb.features = inp->sctp_features; + xinpcb.features = (uint32_t) inp->sctp_features; xinpcb.total_sends = inp->total_sends; xinpcb.total_recvs = inp->total_recvs; xinpcb.total_nospaces = inp->total_nospaces; From owner-svn-src-stable@FreeBSD.ORG Tue May 13 17:12:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48FE4E88; Tue, 13 May 2014 17:12:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2AB332BA1; Tue, 13 May 2014 17:12:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4DHC9VH090166; Tue, 13 May 2014 17:12:09 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4DHC7Qn090157; Tue, 13 May 2014 17:12:07 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405131712.s4DHC7Qn090157@svn.freebsd.org> From: Ian Lepore Date: Tue, 13 May 2014 17:12:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265959 - in stable/10/sys: conf dev/cfi dev/fdt dev/ofw powerpc/mambo powerpc/ofw powerpc/powermac powerpc/powerpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 17:12:09 -0000 Author: ian Date: Tue May 13 17:12:07 2014 New Revision: 265959 URL: http://svnweb.freebsd.org/changeset/base/265959 Log: MFC r256870, r256898, r256899, r256900 (by nwhitehorn): Standards-conformance and code deduplication: - Use bus reference phandles in place of FDT offsets as IRQ domain keys - Unify the identical macio/fdt/mambo OpenPIC drivers into one - Be more forgiving (following ePAPR) about what we need from the device tree to identify an OpenPIC - Correctly map all IRQs into an interrupt domain - Set IRQ_*_CONFORM for interrupts on an unknown PIC type instead of failing attachment for that device. Allow lots of interrupts (useful on multi-domain platforms) and do not set device_quiet() on all devices attached under nexus(4). Added: stable/10/sys/powerpc/ofw/openpic_ofw.c - copied unchanged from r256898, head/sys/powerpc/ofw/openpic_ofw.c Deleted: stable/10/sys/powerpc/mambo/mambo_openpic.c stable/10/sys/powerpc/powermac/openpic_macio.c stable/10/sys/powerpc/powerpc/openpic_fdt.c Modified: stable/10/sys/conf/files.powerpc stable/10/sys/dev/cfi/cfi_bus_nexus.c stable/10/sys/dev/fdt/fdt_common.c stable/10/sys/dev/fdt/fdt_pci.c stable/10/sys/dev/fdt/fdt_powerpc.c stable/10/sys/dev/fdt/fdtbus.c stable/10/sys/dev/ofw/ofw_fdt.c Modified: stable/10/sys/conf/files.powerpc ============================================================================== --- stable/10/sys/conf/files.powerpc Tue May 13 17:09:50 2014 (r265958) +++ stable/10/sys/conf/files.powerpc Tue May 13 17:12:07 2014 (r265959) @@ -128,7 +128,6 @@ powerpc/mambo/mambocall.S optional mambo powerpc/mambo/mambo.c optional mambo powerpc/mambo/mambo_console.c optional mambo powerpc/mambo/mambo_disk.c optional mambo -powerpc/mambo/mambo_openpic.c optional mambo powerpc/mpc85xx/atpic.c optional mpc85xx isa powerpc/mpc85xx/ds1553_bus_fdt.c optional ds1553 fdt powerpc/mpc85xx/ds1553_core.c optional ds1553 @@ -147,6 +146,7 @@ powerpc/ofw/ofw_syscons.c optional sc ai powerpc/ofw/ofwcall32.S optional aim powerpc powerpc/ofw/ofwcall64.S optional aim powerpc64 powerpc/ofw/ofwmagic.S optional aim +powerpc/ofw/openpic_ofw.c optional aim | fdt powerpc/ofw/rtas.c optional aim powerpc/powermac/ata_kauai.c optional powermac ata | powermac atamacio powerpc/powermac/ata_macio.c optional powermac ata | powermac atamacio @@ -162,7 +162,6 @@ powerpc/powermac/kiic.c optional powerm powerpc/powermac/macgpio.c optional powermac pci powerpc/powermac/macio.c optional powermac pci powerpc/powermac/nvbl.c optional powermac nvbl -powerpc/powermac/openpic_macio.c optional powermac pci powerpc/powermac/platform_powermac.c optional powermac powerpc/powermac/powermac_thermal.c optional powermac powerpc/powermac/pswitch.c optional powermac pswitch @@ -200,7 +199,6 @@ powerpc/powerpc/mmu_if.m standard powerpc/powerpc/mp_machdep.c optional smp powerpc/powerpc/nexus.c standard powerpc/powerpc/openpic.c standard -powerpc/powerpc/openpic_fdt.c optional fdt powerpc/powerpc/pic_if.m standard powerpc/powerpc/pmap_dispatch.c standard powerpc/powerpc/platform.c standard Modified: stable/10/sys/dev/cfi/cfi_bus_nexus.c ============================================================================== --- stable/10/sys/dev/cfi/cfi_bus_nexus.c Tue May 13 17:09:50 2014 (r265958) +++ stable/10/sys/dev/cfi/cfi_bus_nexus.c Tue May 13 17:12:07 2014 (r265959) @@ -50,14 +50,25 @@ __FBSDID("$FreeBSD$"); static int cfi_nexus_probe(device_t dev) { + return (BUS_PROBE_NOWILDCARD); +} + +static int +cfi_nexus_attach(device_t dev) +{ + int error; + + error = cfi_probe(dev); + if (error != 0) + return (error); - return cfi_probe(dev); + return cfi_attach(dev); } static device_method_t cfi_nexus_methods[] = { /* device interface */ DEVMETHOD(device_probe, cfi_nexus_probe), - DEVMETHOD(device_attach, cfi_attach), + DEVMETHOD(device_attach, cfi_nexus_attach), DEVMETHOD(device_detach, cfi_detach), {0, 0} Modified: stable/10/sys/dev/fdt/fdt_common.c ============================================================================== --- stable/10/sys/dev/fdt/fdt_common.c Tue May 13 17:09:50 2014 (r265958) +++ stable/10/sys/dev/fdt/fdt_common.c Tue May 13 17:12:07 2014 (r265959) @@ -478,21 +478,31 @@ fdt_intr_decode(phandle_t intr_parent, p int *trig, int *pol) { fdt_pic_decode_t intr_decode; + phandle_t intr_offset; int i, rv; + intr_offset = OF_xref_phandle(intr_parent); + for (i = 0; fdt_pic_table[i] != NULL; i++) { /* XXX check if pic_handle has interrupt-controller prop? */ intr_decode = fdt_pic_table[i]; - rv = intr_decode(intr_parent, intr, interrupt, trig, pol); + rv = intr_decode(intr_offset, intr, interrupt, trig, pol); - if (rv == 0) + if (rv == 0) { /* This was recognized as our PIC and decoded. */ + *interrupt = FDT_MAP_IRQ(intr_parent, *interrupt); return (0); + } } - return (ENXIO); + /* Not in table, so guess */ + *interrupt = FDT_MAP_IRQ(intr_parent, fdt32_to_cpu(*intr)); + *trig = INTR_TRIGGER_CONFORM; + *pol = INTR_POLARITY_CONFORM; + + return (0); } int @@ -500,7 +510,7 @@ fdt_intr_to_rl(phandle_t node, struct re struct fdt_sense_level *intr_sl) { phandle_t intr_par; - ihandle_t iph; + phandle_t iph; pcell_t *intr; pcell_t intr_cells; int interrupt, trig, pol; @@ -517,8 +527,7 @@ fdt_intr_to_rl(phandle_t node, struct re debugf("no intr-parent phandle\n"); intr_par = OF_parent(node); } else { - iph = fdt32_to_cpu(iph); - intr_par = OF_instance_to_package(iph); + intr_par = OF_xref_phandle(iph); } if (OF_getprop(intr_par, "#interrupt-cells", &intr_cells, @@ -540,7 +549,7 @@ fdt_intr_to_rl(phandle_t node, struct re interrupt = -1; trig = pol = 0; - if (fdt_intr_decode(intr_par, &intr[i * intr_cells], + if (fdt_intr_decode(iph, &intr[i * intr_cells], &interrupt, &trig, &pol) != 0) { rv = ENXIO; goto out; @@ -557,7 +566,7 @@ fdt_intr_to_rl(phandle_t node, struct re intr_sl[i].trig = trig; intr_sl[i].pol = pol; - irq = FDT_MAP_IRQ(intr_par, interrupt); + irq = FDT_MAP_IRQ(iph, interrupt); resource_list_add(rl, SYS_RES_IRQ, i, irq, irq, 1); } @@ -570,7 +579,6 @@ int fdt_get_phyaddr(phandle_t node, device_t dev, int *phy_addr, void **phy_sc) { phandle_t phy_node; - ihandle_t phy_ihandle; pcell_t phy_handle, phy_reg; uint32_t i; device_t parent, child; @@ -579,9 +587,7 @@ fdt_get_phyaddr(phandle_t node, device_t sizeof(phy_handle)) <= 0) return (ENXIO); - phy_ihandle = (ihandle_t)phy_handle; - phy_ihandle = fdt32_to_cpu(phy_ihandle); - phy_node = OF_instance_to_package(phy_ihandle); + phy_node = OF_xref_phandle(phy_handle); if (OF_getprop(phy_node, "reg", (void *)&phy_reg, sizeof(phy_reg)) <= 0) Modified: stable/10/sys/dev/fdt/fdt_pci.c ============================================================================== --- stable/10/sys/dev/fdt/fdt_pci.c Tue May 13 17:09:50 2014 (r265958) +++ stable/10/sys/dev/fdt/fdt_pci.c Tue May 13 17:12:07 2014 (r265959) @@ -320,7 +320,7 @@ fdt_pci_route_intr(int bus, int slot, in trig, pol); #if defined(__powerpc__) - powerpc_config_intr(FDT_MAP_IRQ(intr_par, *interrupt), trig, + powerpc_config_intr(FDT_MAP_IRQ(iph, *interrupt), trig, pol); #endif return (0); Modified: stable/10/sys/dev/fdt/fdt_powerpc.c ============================================================================== --- stable/10/sys/dev/fdt/fdt_powerpc.c Tue May 13 17:09:50 2014 (r265958) +++ stable/10/sys/dev/fdt/fdt_powerpc.c Tue May 13 17:12:07 2014 (r265959) @@ -123,7 +123,8 @@ fdt_pic_decode_openpic(phandle_t node, p int *trig, int *pol) { - if (!fdt_is_compatible(node, "chrp,open-pic")) + if (!fdt_is_compatible(node, "chrp,open-pic") && + !fdt_is_type(node, "open-pic")) return (ENXIO); /* Modified: stable/10/sys/dev/fdt/fdtbus.c ============================================================================== --- stable/10/sys/dev/fdt/fdtbus.c Tue May 13 17:09:50 2014 (r265958) +++ stable/10/sys/dev/fdt/fdtbus.c Tue May 13 17:12:07 2014 (r265959) @@ -158,9 +158,7 @@ fdtbus_probe(device_t dev) debugf("%s(dev=%p); pass=%u\n", __func__, dev, bus_current_pass); - device_set_desc(dev, "FDT main bus"); - if (!bootverbose) - device_quiet(dev); + device_set_desc(dev, "Flattened Device Tree"); return (BUS_PROBE_NOWILDCARD); } @@ -182,7 +180,7 @@ fdtbus_attach(device_t dev) * IRQ rman. */ start = 0; - end = FDT_INTR_MAX - 1; + end = ~0; sc->sc_irq.rm_start = start; sc->sc_irq.rm_end = end; sc->sc_irq.rm_type = RMAN_ARRAY; Modified: stable/10/sys/dev/ofw/ofw_fdt.c ============================================================================== --- stable/10/sys/dev/ofw/ofw_fdt.c Tue May 13 17:09:50 2014 (r265958) +++ stable/10/sys/dev/ofw/ofw_fdt.c Tue May 13 17:12:07 2014 (r265959) @@ -329,7 +329,7 @@ fdt_nextprop(int offset, char *buf, size depth = -1; } while (depth >= 0); - return (-1); + return (0); } /* Copied: stable/10/sys/powerpc/ofw/openpic_ofw.c (from r256898, head/sys/powerpc/ofw/openpic_ofw.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/powerpc/ofw/openpic_ofw.c Tue May 13 17:12:07 2014 (r265959, copy of r256898, head/sys/powerpc/ofw/openpic_ofw.c) @@ -0,0 +1,129 @@ +/*- + * Copyright 2003 by Peter Grehan. All rights reserved. + * + * 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include + +#include "pic_if.h" + +/* + * OFW interface + */ +static int openpic_ofw_probe(device_t); +static int openpic_ofw_attach(device_t); + +static device_method_t openpic_ofw_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, openpic_ofw_probe), + DEVMETHOD(device_attach, openpic_ofw_attach), + + /* PIC interface */ + DEVMETHOD(pic_bind, openpic_bind), + DEVMETHOD(pic_config, openpic_config), + DEVMETHOD(pic_dispatch, openpic_dispatch), + DEVMETHOD(pic_enable, openpic_enable), + DEVMETHOD(pic_eoi, openpic_eoi), + DEVMETHOD(pic_ipi, openpic_ipi), + DEVMETHOD(pic_mask, openpic_mask), + DEVMETHOD(pic_unmask, openpic_unmask), + + DEVMETHOD_END +}; + +static driver_t openpic_ofw_driver = { + "openpic", + openpic_ofw_methods, + sizeof(struct openpic_softc), +}; + +DRIVER_MODULE(openpic, nexus, openpic_ofw_driver, openpic_devclass, 0, 0); +DRIVER_MODULE(openpic, simplebus, openpic_ofw_driver, openpic_devclass, 0, 0); +DRIVER_MODULE(openpic, macio, openpic_ofw_driver, openpic_devclass, 0, 0); + +static int +openpic_ofw_probe(device_t dev) +{ + const char *type = ofw_bus_get_type(dev); + + if (type == NULL) + return (ENXIO); + + if (!ofw_bus_is_compatible(dev, "chrp,open-pic") && + strcmp(type, "open-pic") != 0) + return (ENXIO); + + /* + * On some U4 systems, there is a phantom MPIC in the mac-io cell. + * The uninorth driver will pick up the real PIC, so ignore it here. + */ + if (OF_finddevice("/u4") != (phandle_t)-1) + return (ENXIO); + + device_set_desc(dev, OPENPIC_DEVSTR); + return (0); +} + +static int +openpic_ofw_attach(device_t dev) +{ + phandle_t xref, node; + + node = ofw_bus_get_node(dev); + + if (OF_getprop(node, "phandle", &xref, sizeof(xref)) == -1 && + OF_getprop(node, "ibm,phandle", &xref, sizeof(xref)) == -1 && + OF_getprop(node, "linux,phandle", &xref, sizeof(xref)) == -1) + xref = node; + + return (openpic_common_attach(dev, xref)); +} + From owner-svn-src-stable@FreeBSD.ORG Tue May 13 17:18:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35BCFF1; Tue, 13 May 2014 17:18:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 217D72BF5; Tue, 13 May 2014 17:18:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4DHIn5n091172; Tue, 13 May 2014 17:18:49 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4DHInwj091171; Tue, 13 May 2014 17:18:49 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405131718.s4DHInwj091171@svn.freebsd.org> From: Ian Lepore Date: Tue, 13 May 2014 17:18:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265960 - stable/10/sys/powerpc/powerpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 17:18:49 -0000 Author: ian Date: Tue May 13 17:18:48 2014 New Revision: 265960 URL: http://svnweb.freebsd.org/changeset/base/265960 Log: MFC r256901, r256914 (by nwhitehorn): Catch up on 6 years of improvements in Open Firmware nexus devices by importing the sparc64 one. At least 90% of this code is MI and will be moved into /sys/dev/ofw at some point in the future. Ignore registers on devices where the reg property is malformed. Issue a warning if this happens under bootverbose. This prevents some strange-looking entries in dmesg for SMU devices on Apple G5 systems. Modified: stable/10/sys/powerpc/powerpc/nexus.c Modified: stable/10/sys/powerpc/powerpc/nexus.c ============================================================================== --- stable/10/sys/powerpc/powerpc/nexus.c Tue May 13 17:12:07 2014 (r265959) +++ stable/10/sys/powerpc/powerpc/nexus.c Tue May 13 17:18:48 2014 (r265960) @@ -1,5 +1,8 @@ /*- * Copyright 1998 Massachusetts Institute of Technology + * Copyright 2001 by Thomas Moestl . + * Copyright 2006 by Marius Strobl . + * All rights reserved. * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby @@ -25,30 +28,6 @@ * 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. - */ -/*- - * Copyright 2001 by Thomas Moestl . All rights reserved. - * - * 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. * * from: FreeBSD: src/sys/i386/i386/nexus.c,v 1.43 2001/02/09 */ @@ -58,81 +37,71 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include -#include #include #include +#include +#include +#include + +#include +#include #include #include #include #include -#include #include #include -#include - -#include "ofw_bus_if.h" -#include "pic_if.h" - /* * The nexus (which is a pseudo-bus actually) iterates over the nodes that - * exist in Open Firmware and adds them as devices to this bus so that drivers - * can be attached to them. + * hang from the Open Firmware root node and adds them as devices to this bus + * (except some special nodes which are excluded) so that drivers can be + * attached to them. + * + * Additionally, interrupt setup/teardown and some resource management are + * done at this level. * * Maybe this code should get into dev/ofw to some extent, as some of it should * work for all Open Firmware based machines... */ -static MALLOC_DEFINE(M_NEXUS, "nexus", "nexus device information"); - struct nexus_devinfo { - struct ofw_bus_devinfo ndi_ofwinfo; + struct ofw_bus_devinfo ndi_obdinfo; + struct resource_list ndi_rl; }; struct nexus_softc { - struct rman sc_rman; + uint32_t acells, scells; + struct rman sc_intr_rman; + struct rman sc_mem_rman; }; -/* - * Device interface - */ -static int nexus_probe(device_t); -static int nexus_attach(device_t); - -/* - * Bus interface - */ -static device_t nexus_add_child(device_t, u_int, const char *, int); -static void nexus_probe_nomatch(device_t, device_t); +static device_probe_t nexus_probe; +static device_attach_t nexus_attach; +static bus_print_child_t nexus_print_child; +static bus_add_child_t nexus_add_child; +static bus_probe_nomatch_t nexus_probe_nomatch; +static bus_setup_intr_t nexus_setup_intr; +static bus_teardown_intr_t nexus_teardown_intr; +static bus_alloc_resource_t nexus_alloc_resource; +static bus_activate_resource_t nexus_activate_resource; +static bus_deactivate_resource_t nexus_deactivate_resource; +static bus_adjust_resource_t nexus_adjust_resource; +static bus_release_resource_t nexus_release_resource; +static bus_get_resource_list_t nexus_get_resource_list; #ifdef SMP -static int nexus_bind_intr(device_t dev, device_t child, - struct resource *irq, int cpu); +static bus_bind_intr_t nexus_bind_intr; #endif -static int nexus_config_intr(device_t dev, int irq, enum intr_trigger trig, - enum intr_polarity pol); -static int nexus_setup_intr(device_t, device_t, struct resource *, int, - driver_filter_t *, driver_intr_t *, void *, void **); -static int nexus_teardown_intr(device_t, device_t, struct resource *, - void *); -static struct resource *nexus_alloc_resource(device_t, device_t, int, int *, - u_long, u_long, u_long, u_int); -static int nexus_activate_resource(device_t, device_t, int, int, - struct resource *); -static int nexus_deactivate_resource(device_t, device_t, int, int, - struct resource *); -static int nexus_release_resource(device_t, device_t, int, int, - struct resource *); -static const struct ofw_bus_devinfo *nexus_get_devinfo(device_t dev, - device_t child); +static bus_config_intr_t nexus_config_intr; +static ofw_bus_get_devinfo_t nexus_get_devinfo; -/* - * Local routines - */ -static device_t nexus_device_from_node(device_t, phandle_t); +static int nexus_inlist(const char *, const char *const *); +static struct nexus_devinfo * nexus_setup_dinfo(device_t, phandle_t); +static void nexus_destroy_dinfo(struct nexus_devinfo *); +static int nexus_print_res(struct nexus_devinfo *); static device_method_t nexus_methods[] = { /* Device interface */ @@ -143,22 +112,29 @@ static device_method_t nexus_methods[] = DEVMETHOD(device_suspend, bus_generic_suspend), DEVMETHOD(device_resume, bus_generic_resume), - /* Bus interface. Resource management is business of the children... */ + /* Bus interface */ + DEVMETHOD(bus_print_child, nexus_print_child), + DEVMETHOD(bus_probe_nomatch, nexus_probe_nomatch), + DEVMETHOD(bus_read_ivar, bus_generic_read_ivar), + DEVMETHOD(bus_write_ivar, bus_generic_write_ivar), DEVMETHOD(bus_add_child, nexus_add_child), DEVMETHOD(bus_child_pnpinfo_str, ofw_bus_gen_child_pnpinfo_str), - DEVMETHOD(bus_probe_nomatch, nexus_probe_nomatch), + DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), + DEVMETHOD(bus_activate_resource, nexus_activate_resource), + DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), + DEVMETHOD(bus_adjust_resource, nexus_adjust_resource), + DEVMETHOD(bus_release_resource, nexus_release_resource), DEVMETHOD(bus_setup_intr, nexus_setup_intr), DEVMETHOD(bus_teardown_intr, nexus_teardown_intr), + DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), + DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), + DEVMETHOD(bus_get_resource_list, nexus_get_resource_list), #ifdef SMP DEVMETHOD(bus_bind_intr, nexus_bind_intr), #endif DEVMETHOD(bus_config_intr, nexus_config_intr), - DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), - DEVMETHOD(bus_activate_resource, nexus_activate_resource), - DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), - DEVMETHOD(bus_release_resource, nexus_release_resource), - /* OFW bus interface */ + /* ofw_bus interface */ DEVMETHOD(ofw_bus_get_devinfo, nexus_get_devinfo), DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), DEVMETHOD(ofw_bus_get_model, ofw_bus_gen_get_model), @@ -169,21 +145,64 @@ static device_method_t nexus_methods[] = DEVMETHOD_END }; -static driver_t nexus_driver = { - "nexus", - nexus_methods, - sizeof(struct nexus_softc), -}; - static devclass_t nexus_devclass; +DEFINE_CLASS_0(nexus, nexus_driver, nexus_methods, sizeof(struct nexus_softc)); EARLY_DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0, BUS_PASS_BUS); +MODULE_VERSION(nexus, 1); + +static const char *const nexus_excl_name[] = { + "FJSV,system", + "aliases", + "associations", + "chosen", + "cmp", + "counter-timer", /* No separate device; handled by psycho/sbus */ + "failsafe", + "memory", + "openprom", + "options", + "packages", + "physical-memory", + "rsc", + "sgcn", + "todsg", + "virtual-memory", + NULL +}; + +static const char *const nexus_excl_type[] = { + "core", + "cpu", + NULL +}; + +extern struct bus_space_tag nexus_bustag; +extern struct bus_dma_tag nexus_dmatag; + +static int +nexus_inlist(const char *name, const char *const *list) +{ + int i; + + if (name == NULL) + return (0); + for (i = 0; list[i] != NULL; i++) + if (strcmp(name, list[i]) == 0) + return (1); + return (0); +} + +#define NEXUS_EXCLUDED(name, type) \ + (nexus_inlist((name), nexus_excl_name) || \ + ((type) != NULL && nexus_inlist((type), nexus_excl_type))) static int nexus_probe(device_t dev) { - bus_generic_probe(dev); + + /* Nexus does always match. */ device_set_desc(dev, "Open Firmware Nexus device"); return (0); } @@ -191,225 +210,430 @@ nexus_probe(device_t dev) static int nexus_attach(device_t dev) { - phandle_t root; - phandle_t child; - struct nexus_softc *sc; - u_long start, end; + struct nexus_devinfo *ndi; + struct nexus_softc *sc; + device_t cdev; + phandle_t node; sc = device_get_softc(dev); - start = 0; - end = ~0; + if (strcmp(device_get_name(device_get_parent(dev)), "root") == 0) { + node = OF_peer(0); - sc->sc_rman.rm_start = start; - sc->sc_rman.rm_end = end; - sc->sc_rman.rm_type = RMAN_ARRAY; - sc->sc_rman.rm_descr = "Interrupt request lines"; - if (rman_init(&sc->sc_rman) || - rman_manage_region(&sc->sc_rman, start, end)) - panic("nexus_probe IRQ rman"); + sc->sc_intr_rman.rm_type = RMAN_ARRAY; + sc->sc_intr_rman.rm_descr = "Interrupts"; + sc->sc_mem_rman.rm_type = RMAN_ARRAY; + sc->sc_mem_rman.rm_descr = "Device Memory"; + if (rman_init(&sc->sc_intr_rman) != 0 || + rman_init(&sc->sc_mem_rman) != 0 || + rman_manage_region(&sc->sc_intr_rman, 0, ~0) != 0 || + rman_manage_region(&sc->sc_mem_rman, 0, BUS_SPACE_MAXADDR) + != 0) + panic("%s: failed to set up rmans.", __func__); + } else + node = ofw_bus_get_node(dev); + + /* + * Allow devices to identify. + */ + bus_generic_probe(dev); - if ((root = OF_peer(0)) == 0) + /* + * If no Open Firmware, bail early + */ + if (node == -1) return (bus_generic_attach(dev)); - + /* - * Now walk the OFW tree to locate top-level devices + * Some important numbers */ - for (child = OF_child(root); child != 0; child = OF_peer(child)) { - if (child == -1) - panic("nexus_probe(): OF_child failed."); - (void)nexus_device_from_node(dev, child); + sc->acells = 2; + OF_getprop(node, "#address-cells", &sc->acells, sizeof(sc->acells)); + sc->scells = 1; + OF_getprop(node, "#size-cells", &sc->scells, sizeof(sc->scells)); + /* + * Now walk the OFW tree and attach top-level devices. + */ + for (node = OF_child(node); node > 0; node = OF_peer(node)) { + if ((ndi = nexus_setup_dinfo(dev, node)) == NULL) + continue; + cdev = device_add_child(dev, NULL, -1); + if (cdev == NULL) { + device_printf(dev, "<%s>: device_add_child failed\n", + ndi->ndi_obdinfo.obd_name); + nexus_destroy_dinfo(ndi); + continue; + } + device_set_ivars(cdev, ndi); } - return (bus_generic_attach(dev)); } -static void -nexus_probe_nomatch(device_t dev, device_t child) +static device_t +nexus_add_child(device_t dev, u_int order, const char *name, int unit) { - const char *name, *type; + device_t cdev; + struct nexus_devinfo *ndi; - name = ofw_bus_get_name(child); - type = ofw_bus_get_type(child); + cdev = device_add_child_ordered(dev, order, name, unit); + if (cdev == NULL) + return (NULL); - if (name == NULL) - name = "unknown"; - if (type == NULL) - type = "(unknown)"; - - if (bootverbose) - device_printf(dev, "<%s>, type %s (no driver attached)\n", - name, type); + ndi = malloc(sizeof(*ndi), M_DEVBUF, M_WAITOK | M_ZERO); + ndi->ndi_obdinfo.obd_node = -1; + resource_list_init(&ndi->ndi_rl); + device_set_ivars(cdev, ndi); + + return (cdev); } -static device_t -nexus_add_child(device_t dev, u_int order, const char *name, int unit) +static int +nexus_print_child(device_t bus, device_t child) { - device_t child; - struct nexus_devinfo *dinfo; + int rv; - child = device_add_child_ordered(dev, order, name, unit); - if (child == NULL) - return (NULL); + rv = bus_print_child_header(bus, child); + rv += nexus_print_res(device_get_ivars(child)); + rv += bus_print_child_footer(bus, child); + return (rv); +} - dinfo = malloc(sizeof(struct nexus_devinfo), M_NEXUS, M_NOWAIT|M_ZERO); - if (dinfo == NULL) - return (NULL); +static void +nexus_probe_nomatch(device_t bus, device_t child) +{ + const char *name, *type; - dinfo->ndi_ofwinfo.obd_node = -1; - dinfo->ndi_ofwinfo.obd_name = NULL; - dinfo->ndi_ofwinfo.obd_compat = NULL; - dinfo->ndi_ofwinfo.obd_type = NULL; - dinfo->ndi_ofwinfo.obd_model = NULL; + if (!bootverbose) + return; - device_set_ivars(child, dinfo); + name = ofw_bus_get_name(child); + type = ofw_bus_get_type(child); - return (child); + device_printf(bus, "<%s>", + name != NULL ? name : "unknown"); + nexus_print_res(device_get_ivars(child)); + printf(" type %s (no driver attached)\n", + type != NULL ? type : "unknown"); } static int -nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags, - driver_filter_t *filter, driver_intr_t *ihand, void *arg, void **cookiep) +nexus_setup_intr(device_t bus __unused, device_t child, struct resource *r, + int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, + void **cookiep) { - int error; + int error; - /* somebody tried to setup an irq that failed to allocate! */ - if (res == NULL) - panic("nexus_setup_intr: NULL irq resource!"); + if (r == NULL) + panic("%s: NULL interrupt resource!", __func__); - *cookiep = 0; - if ((rman_get_flags(res) & RF_SHAREABLE) == 0) + if ((rman_get_flags(r) & RF_SHAREABLE) == 0) flags |= INTR_EXCL; - /* - * We depend here on rman_activate_resource() being idempotent. - */ - error = rman_activate_resource(res); + /* We depend here on rman_activate_resource() being idempotent. */ + error = rman_activate_resource(r); if (error) return (error); error = powerpc_setup_intr(device_get_nameunit(child), - rman_get_start(res), filter, ihand, arg, flags, cookiep); + rman_get_start(r), filt, intr, arg, flags, cookiep); return (error); } static int -nexus_teardown_intr(device_t dev, device_t child, struct resource *res, - void *cookie) +nexus_teardown_intr(device_t bus __unused, device_t child __unused, + struct resource *r, void *ih) { + + if (r == NULL) + return (EINVAL); - return (powerpc_teardown_intr(cookie)); + return (powerpc_teardown_intr(ih)); } #ifdef SMP static int -nexus_bind_intr(device_t dev, device_t child, struct resource *irq, int cpu) +nexus_bind_intr(device_t bus __unused, device_t child __unused, + struct resource *r, int cpu) { - return (powerpc_bind_intr(rman_get_start(irq), cpu)); + return (powerpc_bind_intr(rman_get_start(r), cpu)); } #endif - + static int nexus_config_intr(device_t dev, int irq, enum intr_trigger trig, enum intr_polarity pol) { + + return (powerpc_config_intr(irq, trig, pol)); +} - return (powerpc_config_intr(irq, trig, pol)); -} - -/* - * Allocate resources at the behest of a child. This only handles interrupts, - * since I/O resources are handled by child busses. - */ static struct resource * nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) { struct nexus_softc *sc; + struct rman *rm; struct resource *rv; + struct resource_list_entry *rle; + device_t nexus; + int isdefault, passthrough; + + isdefault = (start == 0UL && end == ~0UL); + passthrough = (device_get_parent(child) != bus); + nexus = bus; + while (strcmp(device_get_name(device_get_parent(nexus)), "root") != 0) + nexus = device_get_parent(nexus); + sc = device_get_softc(nexus); + rle = NULL; + + if (!passthrough && isdefault) { + rle = resource_list_find(BUS_GET_RESOURCE_LIST(bus, child), + type, *rid); + if (rle == NULL) + return (NULL); + if (rle->res != NULL) + panic("%s: resource entry is busy", __func__); + start = rle->start; + count = ulmax(count, rle->count); + end = ulmax(rle->end, start + count - 1); + } - if (type != SYS_RES_IRQ) { - device_printf(bus, "unknown resource request from %s\n", - device_get_nameunit(child)); + switch (type) { + case SYS_RES_IRQ: + rm = &sc->sc_intr_rman; + break; + case SYS_RES_MEMORY: + rm = &sc->sc_mem_rman; + break; + default: return (NULL); } - if (count == 0 || start + count - 1 != end) { - device_printf(bus, "invalid IRQ allocation from %s\n", - device_get_nameunit(child)); + rv = rman_reserve_resource(rm, start, end, count, flags & ~RF_ACTIVE, + child); + if (rv == NULL) return (NULL); - } + rman_set_rid(rv, *rid); - sc = device_get_softc(bus); + if ((flags & RF_ACTIVE) != 0 && bus_activate_resource(child, type, + *rid, rv) != 0) { + rman_release_resource(rv); + return (NULL); + } - rv = rman_reserve_resource(&sc->sc_rman, start, end, count, - flags, child); - if (rv == NULL) { - device_printf(bus, "IRQ allocation failed for %s\n", - device_get_nameunit(child)); - } else - rman_set_rid(rv, *rid); + if (!passthrough && rle != NULL) { + rle->res = rv; + rle->start = rman_get_start(rv); + rle->end = rman_get_end(rv); + rle->count = rle->end - rle->start + 1; + } return (rv); } static int -nexus_activate_resource(device_t bus, device_t child, int type, int rid, - struct resource *res) +nexus_activate_resource(device_t bus __unused, device_t child __unused, + int type, int rid __unused, struct resource *r) { - /* Not much to be done yet... */ - return (rman_activate_resource(res)); + if (type == SYS_RES_MEMORY) { + vm_offset_t start; + void *p; + + start = (vm_offset_t) rman_get_start(r); + if (bootverbose) + printf("nexus mapdev: start %zx, len %ld\n", start, + rman_get_size(r)); + + p = pmap_mapdev(start, (vm_size_t) rman_get_size(r)); + if (p == NULL) + return (ENOMEM); + rman_set_virtual(r, p); + rman_set_bustag(r, &bs_be_tag); + rman_set_bushandle(r, (u_long)p); + } + return (rman_activate_resource(r)); } static int -nexus_deactivate_resource(device_t bus, device_t child, int type, int rid, - struct resource *res) +nexus_deactivate_resource(device_t bus __unused, device_t child __unused, + int type __unused, int rid __unused, struct resource *r) { - /* Not much to be done yet... */ - return (rman_deactivate_resource(res)); + /* + * If this is a memory resource, unmap it. + */ + if ((type == SYS_RES_MEMORY) || (type == SYS_RES_IOPORT)) { + bus_size_t psize; + + psize = rman_get_size(r); + pmap_unmapdev((vm_offset_t)rman_get_virtual(r), psize); + } + + return (rman_deactivate_resource(r)); } static int -nexus_release_resource(device_t bus, device_t child, int type, int rid, - struct resource *res) +nexus_adjust_resource(device_t bus, device_t child __unused, int type, + struct resource *r, u_long start, u_long end) { + struct nexus_softc *sc; + struct rman *rm; + device_t nexus; - if (type != SYS_RES_IRQ) { - device_printf(bus, "unknown resource request from %s\n", - device_get_nameunit(child)); + nexus = bus; + while (strcmp(device_get_name(device_get_parent(nexus)), "root") != 0) + nexus = device_get_parent(nexus); + sc = device_get_softc(nexus); + switch (type) { + case SYS_RES_IRQ: + rm = &sc->sc_intr_rman; + break; + case SYS_RES_MEMORY: + rm = &sc->sc_mem_rman; + break; + default: return (EINVAL); } - - return (rman_release_resource(res)); + if (rm == NULL) + return (ENXIO); + if (rman_is_region_manager(r, rm) == 0) + return (EINVAL); + return (rman_adjust_resource(r, start, end)); } -static device_t -nexus_device_from_node(device_t parent, phandle_t node) +static int +nexus_release_resource(device_t bus __unused, device_t child, int type, + int rid, struct resource *r) { - device_t cdev; - struct nexus_devinfo *dinfo; + int error; - cdev = device_add_child(parent, NULL, -1); - if (cdev != NULL) { - dinfo = malloc(sizeof(*dinfo), M_NEXUS, M_WAITOK); - ofw_bus_gen_setup_devinfo(&dinfo->ndi_ofwinfo, node); - device_set_ivars(cdev, dinfo); + if ((rman_get_flags(r) & RF_ACTIVE) != 0) { + error = bus_deactivate_resource(child, type, rid, r); + if (error) + return (error); } + return (rman_release_resource(r)); +} - return (cdev); +static struct resource_list * +nexus_get_resource_list(device_t bus __unused, device_t child) +{ + struct nexus_devinfo *ndi; + + ndi = device_get_ivars(child); + return (&ndi->ndi_rl); } static const struct ofw_bus_devinfo * -nexus_get_devinfo(device_t dev, device_t child) +nexus_get_devinfo(device_t bus __unused, device_t child) +{ + struct nexus_devinfo *ndi; + + ndi = device_get_ivars(child); + return (&ndi->ndi_obdinfo); +} + +static struct nexus_devinfo * +nexus_setup_dinfo(device_t dev, phandle_t node) { - struct nexus_devinfo *dinfo; + struct nexus_softc *sc; + struct nexus_devinfo *ndi; + uint32_t *reg, *intr, icells; + uint64_t phys, size; + phandle_t iparent; + int i, j; + int nintr; + int nreg; + + sc = device_get_softc(dev); + + ndi = malloc(sizeof(*ndi), M_DEVBUF, M_WAITOK | M_ZERO); + if (ofw_bus_gen_setup_devinfo(&ndi->ndi_obdinfo, node) != 0) { + free(ndi, M_DEVBUF); + return (NULL); + } + if (NEXUS_EXCLUDED(ndi->ndi_obdinfo.obd_name, + ndi->ndi_obdinfo.obd_type)) { + ofw_bus_gen_destroy_devinfo(&ndi->ndi_obdinfo); + free(ndi, M_DEVBUF); + return (NULL); + } - dinfo = device_get_ivars(child); - return (&dinfo->ndi_ofwinfo); + resource_list_init(&ndi->ndi_rl); + nreg = OF_getprop_alloc(node, "reg", sizeof(*reg), (void **)®); + if (nreg == -1) + nreg = 0; + if (nreg % (sc->acells + sc->scells) != 0) { + if (bootverbose) + device_printf(dev, "Malformed reg property on <%s>\n", + ndi->ndi_obdinfo.obd_name); + nreg = 0; + } + + for (i = 0; i < nreg; i += sc->acells + sc->scells) { + phys = size = 0; + for (j = 0; j < sc->acells; j++) { + phys <<= 32; + phys |= reg[i + j]; + } + for (j = 0; j < sc->scells; j++) { + size <<= 32; + size |= reg[i + sc->acells + j]; + } + /* Skip the dummy reg property of glue devices like ssm(4). */ + if (size != 0) + resource_list_add(&ndi->ndi_rl, SYS_RES_MEMORY, i, + phys, phys + size - 1, size); + } + free(reg, M_OFWPROP); + + nintr = OF_getprop_alloc(node, "interrupts", sizeof(*intr), + (void **)&intr); + if (nintr > 0) { + iparent = 0; + OF_searchprop(node, "interrupt-parent", &iparent, + sizeof(iparent)); + OF_searchprop(iparent, "#interrupt-cells", &icells, + sizeof(icells)); + for (i = 0; i < nintr; i+= icells) { + intr[i] = MAP_IRQ(iparent, intr[i]); + resource_list_add(&ndi->ndi_rl, SYS_RES_IRQ, i, intr[i], + intr[i], 1); + if (icells > 1) { + powerpc_config_intr(intr[i], (intr[i+1] & 1) ? + INTR_TRIGGER_LEVEL : INTR_TRIGGER_EDGE, + INTR_POLARITY_LOW); + } + } + free(intr, M_OFWPROP); + } + + return (ndi); +} + +static void +nexus_destroy_dinfo(struct nexus_devinfo *ndi) +{ + + resource_list_free(&ndi->ndi_rl); + ofw_bus_gen_destroy_devinfo(&ndi->ndi_obdinfo); + free(ndi, M_DEVBUF); +} + +static int +nexus_print_res(struct nexus_devinfo *ndi) +{ + int rv; + + rv = 0; + rv += resource_list_print_type(&ndi->ndi_rl, "mem", SYS_RES_MEMORY, + "%#lx"); + rv += resource_list_print_type(&ndi->ndi_rl, "irq", SYS_RES_IRQ, + "%ld"); + return (rv); } From owner-svn-src-stable@FreeBSD.ORG Tue May 13 17:19:00 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 80C0422E; Tue, 13 May 2014 17:19:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60AEE2BFA; Tue, 13 May 2014 17:19:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4DHJ03p091243; Tue, 13 May 2014 17:19:00 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4DHIxnr091233; Tue, 13 May 2014 17:18:59 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405131718.s4DHIxnr091233@svn.freebsd.org> From: Michael Tuexen Date: Tue, 13 May 2014 17:18:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265961 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 17:19:00 -0000 Author: tuexen Date: Tue May 13 17:18:59 2014 New Revision: 265961 URL: http://svnweb.freebsd.org/changeset/base/265961 Log: MFC r255160: All changes affect only SCTP-AUTH: * Remove non working code related to SHA224. * Remove support for non-standardised HMAC-IDs using SHA384 and SHA512. * Prefer SHA256 over SHA1. * Minor cleanup. Modified: stable/9/sys/netinet/sctp_auth.c stable/9/sys/netinet/sctp_auth.h stable/9/sys/netinet/sctp_os_bsd.h stable/9/sys/netinet/sctp_uio.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_auth.c ============================================================================== --- stable/9/sys/netinet/sctp_auth.c Tue May 13 17:18:48 2014 (r265960) +++ stable/9/sys/netinet/sctp_auth.c Tue May 13 17:18:59 2014 (r265961) @@ -703,15 +703,7 @@ sctp_auth_add_hmacid(sctp_hmaclist_t * l return (-1); } if ((hmac_id != SCTP_AUTH_HMAC_ID_SHA1) && -#ifdef HAVE_SHA224 - (hmac_id != SCTP_AUTH_HMAC_ID_SHA224) && -#endif -#ifdef HAVE_SHA2 - (hmac_id != SCTP_AUTH_HMAC_ID_SHA256) && - (hmac_id != SCTP_AUTH_HMAC_ID_SHA384) && - (hmac_id != SCTP_AUTH_HMAC_ID_SHA512) && -#endif - 1) { + (hmac_id != SCTP_AUTH_HMAC_ID_SHA256)) { return (-1); } /* Now is it already in the list */ @@ -754,8 +746,9 @@ sctp_default_supported_hmaclist(void) new_list = sctp_alloc_hmaclist(2); if (new_list == NULL) return (NULL); - (void)sctp_auth_add_hmacid(new_list, SCTP_AUTH_HMAC_ID_SHA1); + /* We prefer SHA256, so list it first */ (void)sctp_auth_add_hmacid(new_list, SCTP_AUTH_HMAC_ID_SHA256); + (void)sctp_auth_add_hmacid(new_list, SCTP_AUTH_HMAC_ID_SHA1); return (new_list); } @@ -811,19 +804,13 @@ int sctp_verify_hmac_param(struct sctp_auth_hmac_algo *hmacs, uint32_t num_hmacs) { uint32_t i; - uint16_t hmac_id; - uint32_t sha1_supported = 0; for (i = 0; i < num_hmacs; i++) { - hmac_id = ntohs(hmacs->hmac_ids[i]); - if (hmac_id == SCTP_AUTH_HMAC_ID_SHA1) - sha1_supported = 1; + if (ntohs(hmacs->hmac_ids[i]) == SCTP_AUTH_HMAC_ID_SHA1) { + return (0); + } } - /* all HMAC id's are supported */ - if (sha1_supported == 0) - return (-1); - else - return (0); + return (-1); } sctp_authinfo_t * @@ -877,18 +864,8 @@ sctp_get_hmac_digest_len(uint16_t hmac_a switch (hmac_algo) { case SCTP_AUTH_HMAC_ID_SHA1: return (SCTP_AUTH_DIGEST_LEN_SHA1); -#ifdef HAVE_SHA224 - case SCTP_AUTH_HMAC_ID_SHA224: - return (SCTP_AUTH_DIGEST_LEN_SHA224); -#endif -#ifdef HAVE_SHA2 case SCTP_AUTH_HMAC_ID_SHA256: return (SCTP_AUTH_DIGEST_LEN_SHA256); - case SCTP_AUTH_HMAC_ID_SHA384: - return (SCTP_AUTH_DIGEST_LEN_SHA384); - case SCTP_AUTH_HMAC_ID_SHA512: - return (SCTP_AUTH_DIGEST_LEN_SHA512); -#endif default: /* unknown HMAC algorithm: can't do anything */ return (0); @@ -900,17 +877,9 @@ sctp_get_hmac_block_len(uint16_t hmac_al { switch (hmac_algo) { case SCTP_AUTH_HMAC_ID_SHA1: -#ifdef HAVE_SHA224 - case SCTP_AUTH_HMAC_ID_SHA224: -#endif return (64); -#ifdef HAVE_SHA2 case SCTP_AUTH_HMAC_ID_SHA256: return (64); - case SCTP_AUTH_HMAC_ID_SHA384: - case SCTP_AUTH_HMAC_ID_SHA512: - return (128); -#endif case SCTP_AUTH_HMAC_ID_RSVD: default: /* unknown HMAC algorithm: can't do anything */ @@ -923,23 +892,11 @@ sctp_hmac_init(uint16_t hmac_algo, sctp_ { switch (hmac_algo) { case SCTP_AUTH_HMAC_ID_SHA1: - SHA1_Init(&ctx->sha1); - break; -#ifdef HAVE_SHA224 - case SCTP_AUTH_HMAC_ID_SHA224: + SCTP_SHA1_INIT(&ctx->sha1); break; -#endif -#ifdef HAVE_SHA2 case SCTP_AUTH_HMAC_ID_SHA256: - SHA256_Init(&ctx->sha256); - break; - case SCTP_AUTH_HMAC_ID_SHA384: - SHA384_Init(&ctx->sha384); + SCTP_SHA256_INIT(&ctx->sha256); break; - case SCTP_AUTH_HMAC_ID_SHA512: - SHA512_Init(&ctx->sha512); - break; -#endif case SCTP_AUTH_HMAC_ID_RSVD: default: /* unknown HMAC algorithm: can't do anything */ @@ -953,23 +910,11 @@ sctp_hmac_update(uint16_t hmac_algo, sct { switch (hmac_algo) { case SCTP_AUTH_HMAC_ID_SHA1: - SHA1_Update(&ctx->sha1, text, textlen); + SCTP_SHA1_UPDATE(&ctx->sha1, text, textlen); break; -#ifdef HAVE_SHA224 - case SCTP_AUTH_HMAC_ID_SHA224: - break; -#endif -#ifdef HAVE_SHA2 case SCTP_AUTH_HMAC_ID_SHA256: - SHA256_Update(&ctx->sha256, text, textlen); - break; - case SCTP_AUTH_HMAC_ID_SHA384: - SHA384_Update(&ctx->sha384, text, textlen); + SCTP_SHA256_UPDATE(&ctx->sha256, text, textlen); break; - case SCTP_AUTH_HMAC_ID_SHA512: - SHA512_Update(&ctx->sha512, text, textlen); - break; -#endif case SCTP_AUTH_HMAC_ID_RSVD: default: /* unknown HMAC algorithm: can't do anything */ @@ -983,24 +928,11 @@ sctp_hmac_final(uint16_t hmac_algo, sctp { switch (hmac_algo) { case SCTP_AUTH_HMAC_ID_SHA1: - SHA1_Final(digest, &ctx->sha1); + SCTP_SHA1_FINAL(digest, &ctx->sha1); break; -#ifdef HAVE_SHA224 - case SCTP_AUTH_HMAC_ID_SHA224: - break; -#endif -#ifdef HAVE_SHA2 case SCTP_AUTH_HMAC_ID_SHA256: - SHA256_Final(digest, &ctx->sha256); + SCTP_SHA256_FINAL(digest, &ctx->sha256); break; - case SCTP_AUTH_HMAC_ID_SHA384: - /* SHA384 is truncated SHA512 */ - SHA384_Final(digest, &ctx->sha384); - break; - case SCTP_AUTH_HMAC_ID_SHA512: - SHA512_Final(digest, &ctx->sha512); - break; -#endif case SCTP_AUTH_HMAC_ID_RSVD: default: /* unknown HMAC algorithm: can't do anything */ Modified: stable/9/sys/netinet/sctp_auth.h ============================================================================== --- stable/9/sys/netinet/sctp_auth.h Tue May 13 17:18:48 2014 (r265960) +++ stable/9/sys/netinet/sctp_auth.h Tue May 13 17:18:59 2014 (r265961) @@ -36,14 +36,12 @@ __FBSDID("$FreeBSD$"); #ifndef _NETINET_SCTP_AUTH_H_ #define _NETINET_SCTP_AUTH_H_ +#include /* digest lengths */ #define SCTP_AUTH_DIGEST_LEN_SHA1 20 -#define SCTP_AUTH_DIGEST_LEN_SHA224 28 #define SCTP_AUTH_DIGEST_LEN_SHA256 32 -#define SCTP_AUTH_DIGEST_LEN_SHA384 48 -#define SCTP_AUTH_DIGEST_LEN_SHA512 64 -#define SCTP_AUTH_DIGEST_LEN_MAX 64 +#define SCTP_AUTH_DIGEST_LEN_MAX SCTP_AUTH_DIGEST_LEN_SHA256 /* random sizes */ #define SCTP_AUTH_RANDOM_SIZE_DEFAULT 32 @@ -52,12 +50,8 @@ __FBSDID("$FreeBSD$"); /* union of all supported HMAC algorithm contexts */ typedef union sctp_hash_context { - SHA1_CTX sha1; -#ifdef HAVE_SHA2 - SHA256_CTX sha256; - SHA384_CTX sha384; - SHA512_CTX sha512; -#endif + SCTP_SHA1_CTX sha1; + SCTP_SHA256_CTX sha256; } sctp_hash_context_t; typedef struct sctp_key { Modified: stable/9/sys/netinet/sctp_os_bsd.h ============================================================================== --- stable/9/sys/netinet/sctp_os_bsd.h Tue May 13 17:18:48 2014 (r265960) +++ stable/9/sys/netinet/sctp_os_bsd.h Tue May 13 17:18:59 2014 (r265961) @@ -104,6 +104,9 @@ __FBSDID("$FreeBSD$"); #include +#include +#include + #ifndef in6pcb #define in6pcb inpcb #endif @@ -461,23 +464,18 @@ sctp_get_mbuf_for_msg(unsigned int space /* * SCTP AUTH */ -#define HAVE_SHA2 - #define SCTP_READ_RANDOM(buf, len) read_random(buf, len) -#ifdef USE_SCTP_SHA1 -#include -#else -#include /* map standard crypto API names */ -#define SHA1_Init SHA1Init -#define SHA1_Update SHA1Update -#define SHA1_Final(x,y) SHA1Final((caddr_t)x, y) -#endif - -#if defined(HAVE_SHA2) -#include -#endif +#define SCTP_SHA1_CTX SHA1_CTX +#define SCTP_SHA1_INIT SHA1Init +#define SCTP_SHA1_UPDATE SHA1Update +#define SCTP_SHA1_FINAL(x,y) SHA1Final((caddr_t)x, y) + +#define SCTP_SHA256_CTX SHA256_CTX +#define SCTP_SHA256_INIT SHA256_Init +#define SCTP_SHA256_UPDATE SHA256_Update +#define SCTP_SHA256_FINAL(x,y) SHA256_Final((caddr_t)x, y) #endif Modified: stable/9/sys/netinet/sctp_uio.h ============================================================================== --- stable/9/sys/netinet/sctp_uio.h Tue May 13 17:18:48 2014 (r265960) +++ stable/9/sys/netinet/sctp_uio.h Tue May 13 17:18:59 2014 (r265961) @@ -662,10 +662,6 @@ struct sctp_hmacalgo { #define SCTP_AUTH_HMAC_ID_RSVD 0x0000 #define SCTP_AUTH_HMAC_ID_SHA1 0x0001 /* default, mandatory */ #define SCTP_AUTH_HMAC_ID_SHA256 0x0003 -#define SCTP_AUTH_HMAC_ID_SHA224 0x0004 -#define SCTP_AUTH_HMAC_ID_SHA384 0x0005 -#define SCTP_AUTH_HMAC_ID_SHA512 0x0006 - /* SCTP_AUTH_ACTIVE_KEY / SCTP_AUTH_DELETE_KEY */ struct sctp_authkeyid { From owner-svn-src-stable@FreeBSD.ORG Tue May 13 17:21:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB83049C; Tue, 13 May 2014 17:21:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D89952C9C; Tue, 13 May 2014 17:21:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4DHLjNT094658; Tue, 13 May 2014 17:21:45 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4DHLjdh094657; Tue, 13 May 2014 17:21:45 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405131721.s4DHLjdh094657@svn.freebsd.org> From: Michael Tuexen Date: Tue, 13 May 2014 17:21:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265962 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 17:21:46 -0000 Author: tuexen Date: Tue May 13 17:21:45 2014 New Revision: 265962 URL: http://svnweb.freebsd.org/changeset/base/265962 Log: MFC r255162: Use uint16_t instead of in_port_t for consistency with the SCTP code. Modified: stable/9/sys/netinet/sctp_output.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_output.c ============================================================================== --- stable/9/sys/netinet/sctp_output.c Tue May 13 17:18:59 2014 (r265961) +++ stable/9/sys/netinet/sctp_output.c Tue May 13 17:21:45 2014 (r265962) @@ -3561,7 +3561,7 @@ sctp_process_cmsgs_for_init(struct sctp_ static struct sctp_tcb * sctp_findassociation_cmsgs(struct sctp_inpcb **inp_p, - in_port_t port, + uint16_t port, struct mbuf *control, struct sctp_nets **net_p, int *error) From owner-svn-src-stable@FreeBSD.ORG Tue May 13 17:23:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DCF7D5FE; Tue, 13 May 2014 17:23:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9A412CC5; Tue, 13 May 2014 17:23:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4DHNedt094989; Tue, 13 May 2014 17:23:40 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4DHNdUY094984; Tue, 13 May 2014 17:23:39 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405131723.s4DHNdUY094984@svn.freebsd.org> From: Michael Tuexen Date: Tue, 13 May 2014 17:23:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265963 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 17:23:41 -0000 Author: tuexen Date: Tue May 13 17:23:39 2014 New Revision: 265963 URL: http://svnweb.freebsd.org/changeset/base/265963 Log: MFC r255190: Remove redundant field pr_sctp_on. Modified: stable/9/sys/netinet/sctp_indata.c stable/9/sys/netinet/sctp_output.c stable/9/sys/netinet/sctp_structs.h stable/9/sys/netinet/sctp_timer.c stable/9/sys/netinet/sctputil.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_indata.c ============================================================================== --- stable/9/sys/netinet/sctp_indata.c Tue May 13 17:21:45 2014 (r265962) +++ stable/9/sys/netinet/sctp_indata.c Tue May 13 17:23:39 2014 (r265963) @@ -4718,7 +4718,7 @@ sctp_handle_sack(struct mbuf *m, int off } } TAILQ_REMOVE(&asoc->sent_queue, tp1, sctp_next); - if (tp1->pr_sctp_on) { + if (PR_SCTP_ENABLED(tp1->flags)) { if (asoc->pr_sctp_cnt != 0) asoc->pr_sctp_cnt--; } Modified: stable/9/sys/netinet/sctp_output.c ============================================================================== --- stable/9/sys/netinet/sctp_output.c Tue May 13 17:21:45 2014 (r265962) +++ stable/9/sys/netinet/sctp_output.c Tue May 13 17:23:39 2014 (r265963) @@ -6067,7 +6067,6 @@ sctp_get_frag_point(struct sctp_tcb *stc static void sctp_set_prsctp_policy(struct sctp_stream_queue_pending *sp) { - sp->pr_sctp_on = 0; /* * We assume that the user wants PR_SCTP_TTL if the user provides a * positive lifetime but does not specify any PR_SCTP policy. This @@ -6077,7 +6076,6 @@ sctp_set_prsctp_policy(struct sctp_strea */ if (PR_SCTP_ENABLED(sp->sinfo_flags)) { sp->act_flags |= PR_SCTP_POLICY(sp->sinfo_flags); - sp->pr_sctp_on = 1; } else { return; } @@ -7425,13 +7423,8 @@ dont_do_it: } chk->send_size += pads; } - /* We only re-set the policy if it is on */ - if (sp->pr_sctp_on) { - sctp_set_prsctp_policy(sp); + if (PR_SCTP_ENABLED(chk->flags)) { asoc->pr_sctp_cnt++; - chk->pr_sctp_on = 1; - } else { - chk->pr_sctp_on = 0; } if (sp->msg_is_complete && (sp->length == 0) && (sp->sender_all_done)) { /* All done pull and kill the message */ Modified: stable/9/sys/netinet/sctp_structs.h ============================================================================== --- stable/9/sys/netinet/sctp_structs.h Tue May 13 17:21:45 2014 (r265962) +++ stable/9/sys/netinet/sctp_structs.h Tue May 13 17:23:39 2014 (r265963) @@ -446,7 +446,6 @@ struct sctp_tmit_chunk { uint8_t do_rtt; uint8_t book_size_scale; uint8_t no_fr_allowed; - uint8_t pr_sctp_on; uint8_t copy_by_ref; uint8_t window_probe; }; @@ -522,7 +521,6 @@ struct sctp_stream_queue_pending { uint8_t holds_key_ref; uint8_t msg_is_complete; uint8_t some_taken; - uint8_t pr_sctp_on; uint8_t sender_all_done; uint8_t put_last_out; uint8_t discard_rest; Modified: stable/9/sys/netinet/sctp_timer.c ============================================================================== --- stable/9/sys/netinet/sctp_timer.c Tue May 13 17:21:45 2014 (r265962) +++ stable/9/sys/netinet/sctp_timer.c Tue May 13 17:23:39 2014 (r265963) @@ -446,7 +446,7 @@ sctp_recover_sent_list(struct sctp_tcb * } } TAILQ_REMOVE(&asoc->sent_queue, chk, sctp_next); - if (chk->pr_sctp_on) { + if (PR_SCTP_ENABLED(chk->flags)) { if (asoc->pr_sctp_cnt != 0) asoc->pr_sctp_cnt--; } Modified: stable/9/sys/netinet/sctputil.c ============================================================================== --- stable/9/sys/netinet/sctputil.c Tue May 13 17:21:45 2014 (r265962) +++ stable/9/sys/netinet/sctputil.c Tue May 13 17:23:39 2014 (r265963) @@ -4833,7 +4833,6 @@ sctp_release_pr_sctp_chunk(struct sctp_t atomic_add_int(&chk->whoTo->ref_count, 1); chk->rec.data.TSN_seq = atomic_fetchadd_int(&stcb->asoc.sending_seq, 1); stcb->asoc.pr_sctp_cnt++; - chk->pr_sctp_on = 1; TAILQ_INSERT_TAIL(&stcb->asoc.sent_queue, chk, sctp_next); stcb->asoc.sent_queue_cnt++; stcb->asoc.pr_sctp_cnt++; From owner-svn-src-stable@FreeBSD.ORG Tue May 13 17:25:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AAADF75B; Tue, 13 May 2014 17:25:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97A062CDF; Tue, 13 May 2014 17:25:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4DHPdva095298; Tue, 13 May 2014 17:25:39 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4DHPdeb095297; Tue, 13 May 2014 17:25:39 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405131725.s4DHPdeb095297@svn.freebsd.org> From: Michael Tuexen Date: Tue, 13 May 2014 17:25:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265964 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 17:25:39 -0000 Author: tuexen Date: Tue May 13 17:25:39 2014 New Revision: 265964 URL: http://svnweb.freebsd.org/changeset/base/265964 Log: MFC r255337: When computing the partial delivery point, take the receiver socket buffer size correctly into account. Modified: stable/9/sys/netinet/sctp_indata.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_indata.c ============================================================================== --- stable/9/sys/netinet/sctp_indata.c Tue May 13 17:23:39 2014 (r265963) +++ stable/9/sys/netinet/sctp_indata.c Tue May 13 17:25:39 2014 (r265964) @@ -789,13 +789,12 @@ doit_again: * but should we? */ if (stcb->sctp_socket) { - pd_point = min(SCTP_SB_LIMIT_RCV(stcb->sctp_socket), + pd_point = min(SCTP_SB_LIMIT_RCV(stcb->sctp_socket) >> SCTP_PARTIAL_DELIVERY_SHIFT, stcb->sctp_ep->partial_delivery_point); } else { pd_point = stcb->sctp_ep->partial_delivery_point; } if (sctp_is_all_msg_on_reasm(asoc, &tsize) || (tsize >= pd_point)) { - /* * Yes, we setup to start reception, by * backing down the TSN just in case we @@ -2491,7 +2490,7 @@ doit_again: * delivery queue and something can be delivered. */ if (stcb->sctp_socket) { - pd_point = min(SCTP_SB_LIMIT_RCV(stcb->sctp_socket), + pd_point = min(SCTP_SB_LIMIT_RCV(stcb->sctp_socket) >> SCTP_PARTIAL_DELIVERY_SHIFT, stcb->sctp_ep->partial_delivery_point); } else { pd_point = stcb->sctp_ep->partial_delivery_point; From owner-svn-src-stable@FreeBSD.ORG Tue May 13 17:41:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DAD1CC71; Tue, 13 May 2014 17:41:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7BD82E84; Tue, 13 May 2014 17:41:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4DHfdo8003396; Tue, 13 May 2014 17:41:39 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4DHfdkt003395; Tue, 13 May 2014 17:41:39 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405131741.s4DHfdkt003395@svn.freebsd.org> From: Michael Tuexen Date: Tue, 13 May 2014 17:41:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265965 - stable/9/lib/libc/net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 17:41:39 -0000 Author: tuexen Date: Tue May 13 17:41:39 2014 New Revision: 265965 URL: http://svnweb.freebsd.org/changeset/base/265965 Log: MFC r255695: Remove an unused variable and fix a memory leak in sctp_connectx(). Modified: stable/9/lib/libc/net/sctp_sys_calls.c Directory Properties: stable/9/lib/ (props changed) stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/net/sctp_sys_calls.c ============================================================================== --- stable/9/lib/libc/net/sctp_sys_calls.c Tue May 13 17:25:39 2014 (r265964) +++ stable/9/lib/libc/net/sctp_sys_calls.c Tue May 13 17:41:39 2014 (r265965) @@ -101,10 +101,10 @@ sctp_connectx(int sd, const struct socka sctp_assoc_t * id) { char *buf; - int i, ret, cnt, *aa; + int i, ret, *aa; char *cpto; const struct sockaddr *at; - size_t len = sizeof(int); + size_t len; /* validate the address count and list */ if ((addrs == NULL) || (addrcnt <= 0)) { @@ -115,8 +115,8 @@ sctp_connectx(int sd, const struct socka errno = E2BIG; return (-1); } + len = sizeof(int); at = addrs; - cnt = 0; cpto = buf + sizeof(int); /* validate all the addresses and get the size */ for (i = 0; i < addrcnt; i++) { @@ -161,6 +161,7 @@ sctp_connectx(int sd, const struct socka if ((ret == 0) && (id != NULL)) { *id = *(sctp_assoc_t *) buf; } + free(buf); return (ret); } From owner-svn-src-stable@FreeBSD.ORG Tue May 13 17:51:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6367EE5; Tue, 13 May 2014 17:51:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 930852EDC; Tue, 13 May 2014 17:51:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4DHpFi5006813; Tue, 13 May 2014 17:51:15 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4DHpFMv006812; Tue, 13 May 2014 17:51:15 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405131751.s4DHpFMv006812@svn.freebsd.org> From: Michael Tuexen Date: Tue, 13 May 2014 17:51:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265966 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 17:51:15 -0000 Author: tuexen Date: Tue May 13 17:51:15 2014 New Revision: 265966 URL: http://svnweb.freebsd.org/changeset/base/265966 Log: MFC r255434: Fix the aborting of association with the iterator using an empty user initiated error cause (using SCTP_ABORT|SCTP_SENDALL). Modified: stable/9/sys/netinet/sctp_output.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_output.c ============================================================================== --- stable/9/sys/netinet/sctp_output.c Tue May 13 17:41:39 2014 (r265965) +++ stable/9/sys/netinet/sctp_output.c Tue May 13 17:51:15 2014 (r265966) @@ -6412,7 +6412,7 @@ sctp_sendall_iterator(struct sctp_inpcb /* TSNH */ return; } - if ((ca->m) && ca->sndlen) { + if (ca->sndlen > 0) { m = SCTP_M_COPYM(ca->m, 0, M_COPYALL, M_DONTWAIT); if (m == NULL) { /* can't copy so we are done */ @@ -6441,38 +6441,40 @@ sctp_sendall_iterator(struct sctp_inpcb } if (ca->sndrcv.sinfo_flags & SCTP_ABORT) { /* Abort this assoc with m as the user defined reason */ - if (m) { + if (m != NULL) { + SCTP_BUF_PREPEND(m, sizeof(struct sctp_paramhdr), M_NOWAIT); + } else { + m = sctp_get_mbuf_for_msg(sizeof(struct sctp_paramhdr), + 0, M_NOWAIT, 1, MT_DATA); + SCTP_BUF_LEN(m) = sizeof(struct sctp_paramhdr); + } + if (m != NULL) { struct sctp_paramhdr *ph; - SCTP_BUF_PREPEND(m, sizeof(struct sctp_paramhdr), M_DONTWAIT); - if (m) { - ph = mtod(m, struct sctp_paramhdr *); - ph->param_type = htons(SCTP_CAUSE_USER_INITIATED_ABT); - ph->param_length = htons(sizeof(struct sctp_paramhdr) + ca->sndlen); - } - /* - * We add one here to keep the assoc from - * dis-appearing on us. - */ - atomic_add_int(&stcb->asoc.refcnt, 1); - sctp_abort_an_association(inp, stcb, m, SCTP_SO_NOT_LOCKED); - /* - * sctp_abort_an_association calls sctp_free_asoc() - * free association will NOT free it since we - * incremented the refcnt .. we do this to prevent - * it being freed and things getting tricky since we - * could end up (from free_asoc) calling inpcb_free - * which would get a recursive lock call to the - * iterator lock.. But as a consequence of that the - * stcb will return to us un-locked.. since - * free_asoc returns with either no TCB or the TCB - * unlocked, we must relock.. to unlock in the - * iterator timer :-0 - */ - SCTP_TCB_LOCK(stcb); - atomic_add_int(&stcb->asoc.refcnt, -1); - goto no_chunk_output; + ph = mtod(m, struct sctp_paramhdr *); + ph->param_type = htons(SCTP_CAUSE_USER_INITIATED_ABT); + ph->param_length = htons(sizeof(struct sctp_paramhdr) + ca->sndlen); } + /* + * We add one here to keep the assoc from dis-appearing on + * us. + */ + atomic_add_int(&stcb->asoc.refcnt, 1); + sctp_abort_an_association(inp, stcb, m, SCTP_SO_NOT_LOCKED); + /* + * sctp_abort_an_association calls sctp_free_asoc() free + * association will NOT free it since we incremented the + * refcnt .. we do this to prevent it being freed and things + * getting tricky since we could end up (from free_asoc) + * calling inpcb_free which would get a recursive lock call + * to the iterator lock.. But as a consequence of that the + * stcb will return to us un-locked.. since free_asoc + * returns with either no TCB or the TCB unlocked, we must + * relock.. to unlock in the iterator timer :-0 + */ + SCTP_TCB_LOCK(stcb); + atomic_add_int(&stcb->asoc.refcnt, -1); + goto no_chunk_output; } else { if (m) { ret = sctp_msg_append(stcb, net, m, @@ -6566,8 +6568,7 @@ sctp_sendall_iterator(struct sctp_inpcb if ((sctp_is_feature_off(inp, SCTP_PCB_FLAGS_NODELAY)) && (stcb->asoc.total_flight > 0) && - (un_sent < (int)(stcb->asoc.smallest_mtu - SCTP_MIN_OVERHEAD)) - ) { + (un_sent < (int)(stcb->asoc.smallest_mtu - SCTP_MIN_OVERHEAD))) { do_chunk_output = 0; } if (do_chunk_output) @@ -6696,13 +6697,10 @@ sctp_sendall(struct sctp_inpcb *inp, str /* Gather the length of the send */ struct mbuf *mat; - mat = m; ca->sndlen = 0; - while (m) { - ca->sndlen += SCTP_BUF_LEN(m); - m = SCTP_BUF_NEXT(m); + for (mat = m; mat; mat = SCTP_BUF_NEXT(mat)) { + ca->sndlen += SCTP_BUF_LEN(mat); } - ca->m = mat; } ret = sctp_initiate_iterator(NULL, sctp_sendall_iterator, NULL, SCTP_PCB_ANY_FLAGS, SCTP_PCB_ANY_FEATURES, From owner-svn-src-stable@FreeBSD.ORG Tue May 13 17:59:20 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6EE441B6; Tue, 13 May 2014 17:59:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A6632F8F; Tue, 13 May 2014 17:59:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4DHxKNd008727; Tue, 13 May 2014 17:59:20 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4DHxIqw008713; Tue, 13 May 2014 17:59:18 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405131759.s4DHxIqw008713@svn.freebsd.org> From: Ian Lepore Date: Tue, 13 May 2014 17:59:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265967 - in stable/10/sys: arm/mv dev/fdt dev/ofw powerpc/powerpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 17:59:20 -0000 Author: ian Date: Tue May 13 17:59:17 2014 New Revision: 265967 URL: http://svnweb.freebsd.org/changeset/base/265967 Log: MFC r256932, r256938, r256966, r256953, r256967, r256969, r257015: Add a new function (OF_getencprop()) that undoes the transformation applied by encode-int. Specifically, it takes a set of 32-bit cell values and changes them to host byte order. Most non-string instances of OF_getprop() should be using this function, which is a no-op on big-endian platforms. Use the new function all over the place. Modified: stable/10/sys/arm/mv/gpio.c stable/10/sys/dev/fdt/fdt_common.c stable/10/sys/dev/fdt/fdt_pci.c stable/10/sys/dev/fdt/simplebus.c stable/10/sys/dev/ofw/ofw_bus_subr.c stable/10/sys/dev/ofw/ofw_console.c stable/10/sys/dev/ofw/ofw_fdt.c stable/10/sys/dev/ofw/ofw_iicbus.c stable/10/sys/dev/ofw/openfirm.c stable/10/sys/powerpc/powerpc/nexus.c Modified: stable/10/sys/arm/mv/gpio.c ============================================================================== --- stable/10/sys/arm/mv/gpio.c Tue May 13 17:51:15 2014 (r265966) +++ stable/10/sys/arm/mv/gpio.c Tue May 13 17:59:17 2014 (r265967) @@ -605,7 +605,6 @@ int platform_gpio_init(void) { phandle_t child, parent, root, ctrl; - ihandle_t ctrl_ihandle; pcell_t gpios[MAX_PINS_PER_NODE * GPIOS_PROP_CELLS]; struct gpio_ctrl_entry *e; int len, rv; @@ -639,9 +638,7 @@ platform_gpio_init(void) * contain a ref. to a node defining GPIO * controller. */ - ctrl_ihandle = (ihandle_t)gpios[0]; - ctrl_ihandle = fdt32_to_cpu(ctrl_ihandle); - ctrl = OF_instance_to_package(ctrl_ihandle); + ctrl = OF_xref_phandle(fdt32_to_cpu(gpios[0])); if (fdt_is_compatible(ctrl, e->compat)) /* Call a handler. */ Modified: stable/10/sys/dev/fdt/fdt_common.c ============================================================================== --- stable/10/sys/dev/fdt/fdt_common.c Tue May 13 17:51:15 2014 (r265966) +++ stable/10/sys/dev/fdt/fdt_common.c Tue May 13 17:59:17 2014 (r265967) @@ -523,7 +523,7 @@ fdt_intr_to_rl(phandle_t node, struct re /* * Find #interrupt-cells of the interrupt domain. */ - if (OF_getprop(node, "interrupt-parent", &iph, sizeof(iph)) <= 0) { + if (OF_getencprop(node, "interrupt-parent", &iph, sizeof(iph)) <= 0) { debugf("no intr-parent phandle\n"); intr_par = OF_parent(node); } else { @@ -583,7 +583,7 @@ fdt_get_phyaddr(phandle_t node, device_t uint32_t i; device_t parent, child; - if (OF_getprop(node, "phy-handle", (void *)&phy_handle, + if (OF_getencprop(node, "phy-handle", (void *)&phy_handle, sizeof(phy_handle)) <= 0) return (ENXIO); Modified: stable/10/sys/dev/fdt/fdt_pci.c ============================================================================== --- stable/10/sys/dev/fdt/fdt_pci.c Tue May 13 17:51:15 2014 (r265966) +++ stable/10/sys/dev/fdt/fdt_pci.c Tue May 13 17:59:17 2014 (r265967) @@ -258,7 +258,7 @@ fdt_pci_route_intr(int bus, int slot, in struct fdt_pci_intr *intr_info, int *interrupt) { pcell_t child_spec[4], masked[4]; - ihandle_t iph; + phandle_t iph; pcell_t intr_par; pcell_t *map_ptr; uint32_t addr; @@ -283,7 +283,7 @@ fdt_pci_route_intr(int bus, int slot, in i = 0; while (i < map_len) { iph = fdt32_to_cpu(map_ptr[par_idx]); - intr_par = OF_instance_to_package(iph); + intr_par = OF_xref_phandle(iph); err = fdt_addr_cells(intr_par, &par_addr_cells); if (err != 0) { Modified: stable/10/sys/dev/fdt/simplebus.c ============================================================================== --- stable/10/sys/dev/fdt/simplebus.c Tue May 13 17:51:15 2014 (r265966) +++ stable/10/sys/dev/fdt/simplebus.c Tue May 13 17:59:17 2014 (r265967) @@ -339,8 +339,7 @@ simplebus_get_interrupt_parent(device_t struct simplebus_devinfo *di; struct fdt_ic *ic; device_t ip; - ihandle_t iph; - phandle_t ph; + phandle_t ph, iph; ip = NULL; @@ -348,10 +347,9 @@ simplebus_get_interrupt_parent(device_t if (di == NULL) return (NULL); - if (OF_getprop(di->di_ofw.obd_node, "interrupt-parent", &iph, + if (OF_getencprop(di->di_ofw.obd_node, "interrupt-parent", &iph, sizeof(iph)) > 0) { - iph = fdt32_to_cpu(iph); - ph = OF_instance_to_package(iph); + ph = OF_xref_phandle(iph); SLIST_FOREACH(ic, &fdt_ic_list_head, fdt_ics) { if (ic->iph == ph) { ip = ic->dev; Modified: stable/10/sys/dev/ofw/ofw_bus_subr.c ============================================================================== --- stable/10/sys/dev/ofw/ofw_bus_subr.c Tue May 13 17:51:15 2014 (r265966) +++ stable/10/sys/dev/ofw/ofw_bus_subr.c Tue May 13 17:59:17 2014 (r265967) @@ -229,14 +229,14 @@ ofw_bus_setup_iinfo(phandle_t node, stru pcell_t addrc; int msksz; - if (OF_getprop(node, "#address-cells", &addrc, sizeof(addrc)) == -1) + if (OF_getencprop(node, "#address-cells", &addrc, sizeof(addrc)) == -1) addrc = 2; ii->opi_addrc = addrc * sizeof(pcell_t); - ii->opi_imapsz = OF_getprop_alloc(node, "interrupt-map", 1, + ii->opi_imapsz = OF_getencprop_alloc(node, "interrupt-map", 1, (void **)&ii->opi_imap); if (ii->opi_imapsz > 0) { - msksz = OF_getprop_alloc(node, "interrupt-map-mask", 1, + msksz = OF_getencprop_alloc(node, "interrupt-map-mask", 1, (void **)&ii->opi_imapmsk); /* * Failure to get the mask is ignored; a full mask is used @@ -261,7 +261,7 @@ ofw_bus_lookup_imap(phandle_t node, stru ("ofw_bus_lookup_imap: register size too small: %d < %d", regsz, ii->opi_addrc)); if (node != -1) { - rv = OF_getprop(node, "reg", reg, regsz); + rv = OF_getencprop(node, "reg", reg, regsz); if (rv < regsz) panic("ofw_bus_lookup_imap: cannot get reg property"); } @@ -316,8 +316,8 @@ ofw_bus_search_intrmap(void *intr, int i i = imapsz; while (i > 0) { bcopy(mptr + physsz + intrsz, &parent, sizeof(parent)); - if (OF_searchprop(OF_xref_phandle(parent), "#interrupt-cells", - &pintrsz, sizeof(pintrsz)) == -1) + if (OF_searchencprop(OF_xref_phandle(parent), + "#interrupt-cells", &pintrsz, sizeof(pintrsz)) == -1) pintrsz = 1; /* default */ pintrsz *= sizeof(pcell_t); Modified: stable/10/sys/dev/ofw/ofw_console.c ============================================================================== --- stable/10/sys/dev/ofw/ofw_console.c Tue May 13 17:51:15 2014 (r265966) +++ stable/10/sys/dev/ofw/ofw_console.c Tue May 13 17:59:17 2014 (r265967) @@ -106,8 +106,8 @@ cn_drvinit(void *unused) SYSINIT(cndev, SI_SUB_CONFIGURE, SI_ORDER_MIDDLE, cn_drvinit, NULL); -static int stdin; -static int stdout; +static pcell_t stdin; +static pcell_t stdout; static int ofwtty_open(struct tty *tp) @@ -170,12 +170,12 @@ ofw_cnprobe(struct consdev *cp) return; } - if (OF_getprop(chosen, "stdin", &stdin, sizeof(stdin)) == -1) { + if (OF_getencprop(chosen, "stdin", &stdin, sizeof(stdin)) == -1) { cp->cn_pri = CN_DEAD; return; } - if (OF_getprop(chosen, "stdout", &stdout, sizeof(stdout)) == -1) { + if (OF_getencprop(chosen, "stdout", &stdout, sizeof(stdout)) == -1) { cp->cn_pri = CN_DEAD; return; } Modified: stable/10/sys/dev/ofw/ofw_fdt.c ============================================================================== --- stable/10/sys/dev/ofw/ofw_fdt.c Tue May 13 17:51:15 2014 (r265966) +++ stable/10/sys/dev/ofw/ofw_fdt.c Tue May 13 17:59:17 2014 (r265967) @@ -226,20 +226,8 @@ ofw_fdt_parent(ofw_t ofw, phandle_t node static phandle_t ofw_fdt_instance_to_package(ofw_t ofw, ihandle_t instance) { - int offset; - - /* - * Note: FDT does not have the notion of instances, but we somewhat - * abuse the semantics and let treat as 'instance' the internal - * 'phandle' prop, so that ofw I/F consumers have a uniform way of - * translation between internal representation (which appear in some - * contexts as property values) and effective phandles. - */ - offset = fdt_node_offset_by_phandle(fdtp, instance); - if (offset < 0) - return (-1); - return (fdt_offset_phandle(offset)); + return (-1); } /* Get the length of a property of a package. */ Modified: stable/10/sys/dev/ofw/ofw_iicbus.c ============================================================================== --- stable/10/sys/dev/ofw/ofw_iicbus.c Tue May 13 17:51:15 2014 (r265966) +++ stable/10/sys/dev/ofw/ofw_iicbus.c Tue May 13 17:59:17 2014 (r265967) @@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -104,7 +103,6 @@ ofw_iicbus_attach(device_t dev) phandle_t child; pcell_t paddr; device_t childdev; - uint32_t addr; sc->dev = dev; mtx_init(&sc->lock, "iicbus", NULL, MTX_DEF); @@ -123,11 +121,12 @@ ofw_iicbus_attach(device_t dev) * property, then try the reg property. It moves around * on different systems. */ - if (OF_getprop(child, "i2c-address", &paddr, sizeof(paddr)) == -1) - if (OF_getprop(child, "reg", &paddr, sizeof(paddr)) == -1) + if (OF_getencprop(child, "i2c-address", &paddr, + sizeof(paddr)) == -1) + if (OF_getencprop(child, "reg", &paddr, + sizeof(paddr)) == -1) continue; - addr = fdt32_to_cpu(paddr); /* * Now set up the I2C and OFW bus layer devinfo and add it * to the bus. @@ -136,7 +135,7 @@ ofw_iicbus_attach(device_t dev) M_NOWAIT | M_ZERO); if (dinfo == NULL) continue; - dinfo->opd_dinfo.addr = addr; + dinfo->opd_dinfo.addr = paddr; if (ofw_bus_gen_setup_devinfo(&dinfo->opd_obdinfo, child) != 0) { free(dinfo, M_DEVBUF); Modified: stable/10/sys/dev/ofw/openfirm.c ============================================================================== --- stable/10/sys/dev/ofw/openfirm.c Tue May 13 17:51:15 2014 (r265966) +++ stable/10/sys/dev/ofw/openfirm.c Tue May 13 17:59:17 2014 (r265967) @@ -135,7 +135,8 @@ OF_init(void *cookie) rv = OFW_INIT(ofw_obj, cookie); if ((chosen = OF_finddevice("/chosen")) != -1) - if (OF_getprop(chosen, "stdout", &stdout, sizeof(stdout)) == -1) + if (OF_getencprop(chosen, "stdout", &stdout, + sizeof(stdout)) == -1) stdout = -1; return (rv); @@ -354,11 +355,9 @@ OF_getencprop_alloc(phandle_t package, c pcell_t *cell; int i; - KASSERT(elsz % 4 == 0, ("Need a multiple of 4 bytes")); - retval = OF_getprop_alloc(package, name, elsz, buf); - if (retval == -1) - return (retval); + if (retval == -1 || retval*elsz % 4 != 0) + return (-1); cell = *buf; for (i = 0; i < retval*elsz/4; i++) @@ -450,9 +449,9 @@ OF_child_xref_phandle(phandle_t parent, if (rxref != -1) return (rxref); - if (OF_getprop(child, "phandle", &rxref, sizeof(rxref)) == -1 && - OF_getprop(child, "ibm,phandle", &rxref, - sizeof(rxref)) == -1 && OF_getprop(child, + if (OF_getencprop(child, "phandle", &rxref, sizeof(rxref)) == + -1 && OF_getencprop(child, "ibm,phandle", &rxref, + sizeof(rxref)) == -1 && OF_getencprop(child, "linux,phandle", &rxref, sizeof(rxref)) == -1) continue; Modified: stable/10/sys/powerpc/powerpc/nexus.c ============================================================================== --- stable/10/sys/powerpc/powerpc/nexus.c Tue May 13 17:51:15 2014 (r265966) +++ stable/10/sys/powerpc/powerpc/nexus.c Tue May 13 17:59:17 2014 (r265967) @@ -248,9 +248,9 @@ nexus_attach(device_t dev) * Some important numbers */ sc->acells = 2; - OF_getprop(node, "#address-cells", &sc->acells, sizeof(sc->acells)); + OF_getencprop(node, "#address-cells", &sc->acells, sizeof(sc->acells)); sc->scells = 1; - OF_getprop(node, "#size-cells", &sc->scells, sizeof(sc->scells)); + OF_getencprop(node, "#size-cells", &sc->scells, sizeof(sc->scells)); /* * Now walk the OFW tree and attach top-level devices. @@ -564,7 +564,7 @@ nexus_setup_dinfo(device_t dev, phandle_ } resource_list_init(&ndi->ndi_rl); - nreg = OF_getprop_alloc(node, "reg", sizeof(*reg), (void **)®); + nreg = OF_getencprop_alloc(node, "reg", sizeof(*reg), (void **)®); if (nreg == -1) nreg = 0; if (nreg % (sc->acells + sc->scells) != 0) { @@ -591,7 +591,7 @@ nexus_setup_dinfo(device_t dev, phandle_ } free(reg, M_OFWPROP); - nintr = OF_getprop_alloc(node, "interrupts", sizeof(*intr), + nintr = OF_getencprop_alloc(node, "interrupts", sizeof(*intr), (void **)&intr); if (nintr > 0) { iparent = 0; From owner-svn-src-stable@FreeBSD.ORG Tue May 13 18:00:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC724342; Tue, 13 May 2014 18:00:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D96932FAE; Tue, 13 May 2014 18:00:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4DI0fCv011751; Tue, 13 May 2014 18:00:41 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4DI0fGk011750; Tue, 13 May 2014 18:00:41 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405131800.s4DI0fGk011750@svn.freebsd.org> From: Ian Lepore Date: Tue, 13 May 2014 18:00:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265968 - stable/10/sys/powerpc/booke X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 18:00:42 -0000 Author: ian Date: Tue May 13 18:00:41 2014 New Revision: 265968 URL: http://svnweb.freebsd.org/changeset/base/265968 Log: MFC r256973, r256974 If the device tree directly contains the timebase frequency, use it. This property is required by ePAPR, but maintain the fallback to bus-frequency for compatibility. Allow 32 or 64 bits. Modified: stable/10/sys/powerpc/booke/platform_bare.c Modified: stable/10/sys/powerpc/booke/platform_bare.c ============================================================================== --- stable/10/sys/powerpc/booke/platform_bare.c Tue May 13 17:59:17 2014 (r265967) +++ stable/10/sys/powerpc/booke/platform_bare.c Tue May 13 18:00:41 2014 (r265968) @@ -188,6 +188,25 @@ bare_timebase_freq(platform_t plat, stru if ((child = OF_child(cpus)) == 0) goto out; + switch (OF_getproplen(child, "timebase-frequency")) { + case 4: + { + uint32_t tbase; + OF_getprop(child, "timebase-frequency", &tbase, sizeof(tbase)); + ticks = tbase; + return (ticks); + } + case 8: + { + uint64_t tbase; + OF_getprop(child, "timebase-frequency", &tbase, sizeof(tbase)); + ticks = tbase; + return (ticks); + } + default: + break; + } + freq = 0; if (OF_getprop(child, "bus-frequency", (void *)&freq, sizeof(freq)) <= 0) From owner-svn-src-stable@FreeBSD.ORG Tue May 13 18:06:29 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CB71F57D; Tue, 13 May 2014 18:06:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5A86205A; Tue, 13 May 2014 18:06:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4DI6Tnl013303; Tue, 13 May 2014 18:06:29 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4DI6QS4013286; Tue, 13 May 2014 18:06:26 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405131806.s4DI6QS4013286@svn.freebsd.org> From: Ian Lepore Date: Tue, 13 May 2014 18:06:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265969 - in stable/10/sys: conf dev/fdt dev/ofw powerpc/include powerpc/mpc85xx powerpc/ofw powerpc/powerpc powerpc/pseries X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 18:06:29 -0000 Author: ian Date: Tue May 13 18:06:26 2014 New Revision: 265969 URL: http://svnweb.freebsd.org/changeset/base/265969 Log: MFC r256994, r257016, r257055, r257059, r257060, r257075 Add two new interfaces to ofw_bus: - ofw_bus_map_intr() Maps an (iparent, IRQ) tuple to a system-global interrupt number in some platform dependent way. This is meant to be implemented as a replacement for [FDT_]MAP_IRQ() that is an MI interface that knows about the bus hierarchy. - ofw_bus_config_intr() Configures an interrupt (previously mapped) based on firmware sense flags. This replaces manual interpretation of the sense field in bus drivers and will, in a follow-up, allow that interpretation to be redirected to the PIC drivers where it belongs. This will eventually replace the tables in /sys/dev/fdt/fdt_ARCH.c The PowerPC/AIM code has been converted to use these globally, with an implementation in terms of MAP_IRQ() and powerpc_config_intr(), assuming OpenPIC, at the bus root in nexus(4). The ofw_bus_config_intr() will shortly be integrated into pic_if.m and bounced through nexus into the PIC tree. Factor out MI portions of the PowerPC nexus device into /sys/dev/ofw. The sparc64 driver will be modified to use this shortly. Allow PIC drivers to translate firmware sense codes for themselves. This is designed to replace the tables in dev/fdt/fdt_ARCH.c, but will not happen quite yet. Do not map IRQs twice. This fixes PowerPC/FDT systems with multiple PICs, which would try to treat the previously-mapped interrupts from fdt_decode_intr() as interrupt line numbers on the same parent PIC. Remove some of the code required for supporting ssm(4) on SPARC in favor of a more PowerPC/FDT-focused design. Whenever SPARC64 is integrated into this rework, this should be (trivially) revisited. Added: stable/10/sys/dev/ofw/ofw_nexus.c - copied, changed from r257016, head/sys/dev/ofw/ofw_nexus.c stable/10/sys/dev/ofw/ofw_nexus.h - copied unchanged from r257016, head/sys/dev/ofw/ofw_nexus.h Modified: stable/10/sys/conf/files.powerpc stable/10/sys/dev/fdt/fdt_common.c stable/10/sys/dev/ofw/ofw_bus.h stable/10/sys/dev/ofw/ofw_bus_if.m stable/10/sys/powerpc/include/intr_machdep.h stable/10/sys/powerpc/mpc85xx/atpic.c stable/10/sys/powerpc/ofw/ofw_pci.c stable/10/sys/powerpc/ofw/ofw_pcib_pci.c stable/10/sys/powerpc/ofw/ofw_pcibus.c stable/10/sys/powerpc/ofw/openpic_ofw.c stable/10/sys/powerpc/powerpc/intr_machdep.c stable/10/sys/powerpc/powerpc/nexus.c stable/10/sys/powerpc/powerpc/pic_if.m stable/10/sys/powerpc/pseries/vdevice.c Modified: stable/10/sys/conf/files.powerpc ============================================================================== --- stable/10/sys/conf/files.powerpc Tue May 13 18:00:41 2014 (r265968) +++ stable/10/sys/conf/files.powerpc Tue May 13 18:06:26 2014 (r265969) @@ -48,6 +48,7 @@ dev/ofw/ofw_bus_subr.c optional aim dev/ofw/ofw_console.c optional aim dev/ofw/ofw_disk.c optional ofwd aim dev/ofw/ofw_iicbus.c optional iicbus aim +dev/ofw/ofw_nexus.c optional aim | fdt dev/ofw/ofw_standard.c optional aim powerpc dev/powermac_nvram/powermac_nvram.c optional powermac_nvram powermac dev/quicc/quicc_bfe_fdt.c optional quicc mpc85xx Modified: stable/10/sys/dev/fdt/fdt_common.c ============================================================================== --- stable/10/sys/dev/fdt/fdt_common.c Tue May 13 18:00:41 2014 (r265968) +++ stable/10/sys/dev/fdt/fdt_common.c Tue May 13 18:06:26 2014 (r265969) @@ -514,7 +514,7 @@ fdt_intr_to_rl(phandle_t node, struct re pcell_t *intr; pcell_t intr_cells; int interrupt, trig, pol; - int i, intr_num, irq, rv; + int i, intr_num, rv; if (OF_getproplen(node, "interrupts") <= 0) /* Node does not have 'interrupts' property. */ @@ -566,8 +566,7 @@ fdt_intr_to_rl(phandle_t node, struct re intr_sl[i].trig = trig; intr_sl[i].pol = pol; - irq = FDT_MAP_IRQ(iph, interrupt); - resource_list_add(rl, SYS_RES_IRQ, i, irq, irq, 1); + resource_list_add(rl, SYS_RES_IRQ, i, interrupt, interrupt, 1); } out: Modified: stable/10/sys/dev/ofw/ofw_bus.h ============================================================================== --- stable/10/sys/dev/ofw/ofw_bus.h Tue May 13 18:00:41 2014 (r265968) +++ stable/10/sys/dev/ofw/ofw_bus.h Tue May 13 18:06:26 2014 (r265969) @@ -70,4 +70,16 @@ ofw_bus_get_type(device_t dev) return (OFW_BUS_GET_TYPE(device_get_parent(dev), dev)); } +static __inline int +ofw_bus_map_intr(device_t dev, phandle_t iparent, int irq) +{ + return (OFW_BUS_MAP_INTR(dev, dev, iparent, irq)); +} + +static __inline int +ofw_bus_config_intr(device_t dev, int irq, int sense) +{ + return (OFW_BUS_CONFIG_INTR(dev, dev, irq, sense)); +} + #endif /* !_DEV_OFW_OFW_BUS_H_ */ Modified: stable/10/sys/dev/ofw/ofw_bus_if.m ============================================================================== --- stable/10/sys/dev/ofw/ofw_bus_if.m Tue May 13 18:00:41 2014 (r265968) +++ stable/10/sys/dev/ofw/ofw_bus_if.m Tue May 13 18:06:26 2014 (r265969) @@ -56,6 +56,8 @@ CODE { static ofw_bus_get_name_t ofw_bus_default_get_name; static ofw_bus_get_node_t ofw_bus_default_get_node; static ofw_bus_get_type_t ofw_bus_default_get_type; + static ofw_bus_map_intr_t ofw_bus_default_map_intr; + static ofw_bus_config_intr_t ofw_bus_default_config_intr; static const struct ofw_bus_devinfo * ofw_bus_default_get_devinfo(device_t bus, device_t dev) @@ -98,6 +100,31 @@ CODE { return (NULL); } + + int + ofw_bus_default_map_intr(device_t bus, device_t dev, phandle_t iparent, + int irq) + { + /* Propagate up the bus hierarchy until someone handles it. */ + if (device_get_parent(bus) != NULL) + return OFW_BUS_MAP_INTR(device_get_parent(bus), dev, + iparent, irq); + + /* If that fails, then assume a one-domain system */ + return (irq); + } + + int + ofw_bus_default_config_intr(device_t bus, device_t dev, int irq, + int sense) + { + /* Propagate up the bus hierarchy until someone handles it. */ + if (device_get_parent(bus) != NULL) + return OFW_BUS_CONFIG_INTR(device_get_parent(bus), dev, + irq, sense); + + return (ENXIO); + } }; # Get the ofw_bus_devinfo struct for the device dev on the bus. Used for bus @@ -143,3 +170,22 @@ METHOD const char * get_type { device_t bus; device_t dev; } DEFAULT ofw_bus_default_get_type; + +# Map an (interrupt parent, IRQ) pair to a unique system-wide interrupt number. +METHOD int map_intr { + device_t bus; + device_t dev; + phandle_t iparent; + int irq; +} DEFAULT ofw_bus_default_map_intr; + +# Configure an interrupt using the device-tree encoded sense key (the second +# value in the interrupts property if interrupt-cells is 2). IRQ should be +# encoded as from ofw_bus_map_intr(). +METHOD int config_intr { + device_t bus; + device_t dev; + int irq; + int sense; +} DEFAULT ofw_bus_default_config_intr; + Copied and modified: stable/10/sys/dev/ofw/ofw_nexus.c (from r257016, head/sys/dev/ofw/ofw_nexus.c) ============================================================================== --- head/sys/dev/ofw/ofw_nexus.c Wed Oct 23 20:00:14 2013 (r257016, copy source) +++ stable/10/sys/dev/ofw/ofw_nexus.c Tue May 13 18:06:26 2014 (r265969) @@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include /* @@ -188,21 +187,17 @@ nexus_attach(device_t dev) sc = device_get_softc(dev); - if (strcmp(device_get_name(device_get_parent(dev)), "root") == 0) { - node = OF_peer(0); + node = OF_peer(0); - sc->sc_intr_rman.rm_type = RMAN_ARRAY; - sc->sc_intr_rman.rm_descr = "Interrupts"; - sc->sc_mem_rman.rm_type = RMAN_ARRAY; - sc->sc_mem_rman.rm_descr = "Device Memory"; - if (rman_init(&sc->sc_intr_rman) != 0 || - rman_init(&sc->sc_mem_rman) != 0 || - rman_manage_region(&sc->sc_intr_rman, 0, ~0) != 0 || - rman_manage_region(&sc->sc_mem_rman, 0, BUS_SPACE_MAXADDR) - != 0) - panic("%s: failed to set up rmans.", __func__); - } else - node = ofw_bus_get_node(dev); + sc->sc_intr_rman.rm_type = RMAN_ARRAY; + sc->sc_intr_rman.rm_descr = "Interrupts"; + sc->sc_mem_rman.rm_type = RMAN_ARRAY; + sc->sc_mem_rman.rm_descr = "Device Memory"; + if (rman_init(&sc->sc_intr_rman) != 0 || + rman_init(&sc->sc_mem_rman) != 0 || + rman_manage_region(&sc->sc_intr_rman, 0, ~0) != 0 || + rman_manage_region(&sc->sc_mem_rman, 0, BUS_SPACE_MAXADDR) != 0) + panic("%s: failed to set up rmans.", __func__); /* * Allow devices to identify. @@ -296,15 +291,11 @@ nexus_alloc_resource(device_t bus, devic struct rman *rm; struct resource *rv; struct resource_list_entry *rle; - device_t nexus; int isdefault, passthrough; isdefault = (start == 0UL && end == ~0UL); passthrough = (device_get_parent(child) != bus); - nexus = bus; - while (strcmp(device_get_name(device_get_parent(nexus)), "root") != 0) - nexus = device_get_parent(nexus); - sc = device_get_softc(nexus); + sc = device_get_softc(bus); rle = NULL; if (!passthrough && isdefault) { @@ -471,9 +462,9 @@ nexus_setup_dinfo(device_t dev, phandle_ (void **)&intr); if (nintr > 0) { iparent = 0; - OF_searchprop(node, "interrupt-parent", &iparent, + OF_searchencprop(node, "interrupt-parent", &iparent, sizeof(iparent)); - OF_searchprop(iparent, "#interrupt-cells", &icells, + OF_searchencprop(iparent, "#interrupt-cells", &icells, sizeof(icells)); for (i = 0; i < nintr; i+= icells) { intr[i] = ofw_bus_map_intr(dev, iparent, intr[i]); Copied: stable/10/sys/dev/ofw/ofw_nexus.h (from r257016, head/sys/dev/ofw/ofw_nexus.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/ofw/ofw_nexus.h Tue May 13 18:06:26 2014 (r265969, copy of r257016, head/sys/dev/ofw/ofw_nexus.h) @@ -0,0 +1,40 @@ +/*- + * Copyright (c) 2010 Marius Strobl + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +#ifndef _OFW_NEXUS_H_ +#define _OFW_NEXUS_H_ + +struct ofw_nexus_softc { + uint32_t acells, scells; + struct rman sc_intr_rman; + struct rman sc_mem_rman; +}; + +DECLARE_CLASS(ofw_nexus_driver); + +#endif /* _OFW_NEXUS_H_ */ Modified: stable/10/sys/powerpc/include/intr_machdep.h ============================================================================== --- stable/10/sys/powerpc/include/intr_machdep.h Tue May 13 18:00:41 2014 (r265968) +++ stable/10/sys/powerpc/include/intr_machdep.h Tue May 13 18:06:26 2014 (r265969) @@ -56,5 +56,6 @@ int powerpc_setup_intr(const char *, u_i int powerpc_teardown_intr(void *); int powerpc_bind_intr(u_int irq, u_char cpu); int powerpc_config_intr(int, enum intr_trigger, enum intr_polarity); +int powerpc_fw_config_intr(int irq, int sense_code); #endif /* _MACHINE_INTR_MACHDEP_H_ */ Modified: stable/10/sys/powerpc/mpc85xx/atpic.c ============================================================================== --- stable/10/sys/powerpc/mpc85xx/atpic.c Tue May 13 18:00:41 2014 (r265968) +++ stable/10/sys/powerpc/mpc85xx/atpic.c Tue May 13 18:06:26 2014 (r265969) @@ -79,6 +79,9 @@ static void atpic_ipi(device_t, u_int); static void atpic_mask(device_t, u_int); static void atpic_unmask(device_t, u_int); +static void atpic_ofw_translate_code(device_t, u_int irq, int code, + enum intr_trigger *trig, enum intr_polarity *pol); + static device_method_t atpic_isa_methods[] = { /* Device interface */ DEVMETHOD(device_identify, atpic_isa_identify), @@ -94,6 +97,8 @@ static device_method_t atpic_isa_methods DEVMETHOD(pic_mask, atpic_mask), DEVMETHOD(pic_unmask, atpic_unmask), + DEVMETHOD(pic_translate_code, atpic_ofw_translate_code), + { 0, 0 }, }; @@ -325,3 +330,35 @@ atpic_unmask(device_t dev, u_int irq) atpic_write(sc, ATPIC_MASTER, 1, sc->sc_mask[ATPIC_MASTER]); } } + +static void +atpic_ofw_translate_code(device_t dev, u_int irq, int code, + enum intr_trigger *trig, enum intr_polarity *pol) +{ + switch (code) { + case 0: + /* Active L level */ + *trig = INTR_TRIGGER_LEVEL; + *pol = INTR_POLARITY_LOW; + break; + case 1: + /* Active H level */ + *trig = INTR_TRIGGER_LEVEL; + *pol = INTR_POLARITY_HIGH; + break; + case 2: + /* H to L edge */ + *trig = INTR_TRIGGER_EDGE; + *pol = INTR_POLARITY_LOW; + break; + case 3: + /* L to H edge */ + *trig = INTR_TRIGGER_EDGE; + *pol = INTR_POLARITY_HIGH; + break; + default: + *trig = INTR_TRIGGER_CONFORM; + *pol = INTR_POLARITY_CONFORM; + } +} + Modified: stable/10/sys/powerpc/ofw/ofw_pci.c ============================================================================== --- stable/10/sys/powerpc/ofw/ofw_pci.c Tue May 13 18:00:41 2014 (r265968) +++ stable/10/sys/powerpc/ofw/ofw_pci.c Tue May 13 18:06:26 2014 (r265969) @@ -272,7 +272,7 @@ ofw_pci_route_interrupt(device_t bus, de if (ofw_bus_lookup_imap(ofw_bus_get_node(dev), &sc->sc_pci_iinfo, ®, sizeof(reg), &pintr, sizeof(pintr), &mintr, sizeof(mintr), &iparent, maskbuf)) - return (MAP_IRQ(iparent, mintr)); + return (ofw_bus_map_intr(dev, iparent, mintr)); /* Maybe it's a real interrupt, not an intpin */ if (pin > 4) Modified: stable/10/sys/powerpc/ofw/ofw_pcib_pci.c ============================================================================== --- stable/10/sys/powerpc/ofw/ofw_pcib_pci.c Tue May 13 18:00:41 2014 (r265968) +++ stable/10/sys/powerpc/ofw/ofw_pcib_pci.c Tue May 13 18:06:26 2014 (r265969) @@ -157,7 +157,7 @@ ofw_pcib_pci_route_interrupt(device_t br * it again on higher levels - that causes problems * in some cases, and never seems to be required. */ - return (MAP_IRQ(iparent, mintr)); + return (ofw_bus_map_intr(dev, iparent, mintr)); } } else if (intpin >= 1 && intpin <= 4) { /* Modified: stable/10/sys/powerpc/ofw/ofw_pcibus.c ============================================================================== --- stable/10/sys/powerpc/ofw/ofw_pcibus.c Tue May 13 18:00:41 2014 (r265968) +++ stable/10/sys/powerpc/ofw/ofw_pcibus.c Tue May 13 18:06:26 2014 (r265969) @@ -215,15 +215,13 @@ ofw_pcibus_enum_devtree(device_t dev, u_ OF_getprop(OF_xref_phandle(iparent), "#interrupt-cells", &icells, sizeof(icells)); - intr[0] = MAP_IRQ(iparent, intr[0]); + intr[0] = ofw_bus_map_intr(dev, iparent, + intr[0]); } - if (iparent != 0 && icells > 1) { - powerpc_config_intr(intr[0], - (intr[1] & 1) ? INTR_TRIGGER_LEVEL : - INTR_TRIGGER_EDGE, - INTR_POLARITY_LOW); - } + if (iparent != 0 && icells > 1) + ofw_bus_config_intr(dev, intr[0], + intr[1]); resource_list_add(&dinfo->opd_dinfo.resources, SYS_RES_IRQ, 0, intr[0], intr[0], 1); @@ -341,12 +339,13 @@ ofw_pcibus_assign_interrupt(device_t dev isz = OF_getprop(node, "AAPL,interrupts", &intr, sizeof(intr)); if (isz == sizeof(intr)) - return ((iparent == -1) ? intr : MAP_IRQ(iparent, intr)); + return ((iparent == -1) ? intr : ofw_bus_map_intr(dev, iparent, + intr)); isz = OF_getprop(node, "interrupts", &intr, sizeof(intr)); if (isz == sizeof(intr)) { if (iparent != -1) - intr = MAP_IRQ(iparent, intr); + intr = ofw_bus_map_intr(dev, iparent, intr); } else { /* No property: our best guess is the intpin. */ intr = pci_get_intpin(child); Modified: stable/10/sys/powerpc/ofw/openpic_ofw.c ============================================================================== --- stable/10/sys/powerpc/ofw/openpic_ofw.c Tue May 13 18:00:41 2014 (r265968) +++ stable/10/sys/powerpc/ofw/openpic_ofw.c Tue May 13 18:06:26 2014 (r265969) @@ -61,6 +61,9 @@ __FBSDID("$FreeBSD$"); static int openpic_ofw_probe(device_t); static int openpic_ofw_attach(device_t); +static void openpic_ofw_translate_code(device_t, u_int irq, int code, + enum intr_trigger *trig, enum intr_polarity *pol); + static device_method_t openpic_ofw_methods[] = { /* Device interface */ DEVMETHOD(device_probe, openpic_ofw_probe), @@ -76,6 +79,8 @@ static device_method_t openpic_ofw_meth DEVMETHOD(pic_mask, openpic_mask), DEVMETHOD(pic_unmask, openpic_unmask), + DEVMETHOD(pic_translate_code, openpic_ofw_translate_code), + DEVMETHOD_END }; @@ -127,3 +132,34 @@ openpic_ofw_attach(device_t dev) return (openpic_common_attach(dev, xref)); } +static void +openpic_ofw_translate_code(device_t dev, u_int irq, int code, + enum intr_trigger *trig, enum intr_polarity *pol) +{ + switch (code) { + case 0: + /* L to H edge */ + *trig = INTR_TRIGGER_EDGE; + *pol = INTR_POLARITY_HIGH; + break; + case 1: + /* Active L level */ + *trig = INTR_TRIGGER_LEVEL; + *pol = INTR_POLARITY_LOW; + break; + case 2: + /* Active H level */ + *trig = INTR_TRIGGER_LEVEL; + *pol = INTR_POLARITY_HIGH; + break; + case 3: + /* H to L edge */ + *trig = INTR_TRIGGER_EDGE; + *pol = INTR_POLARITY_LOW; + break; + default: + *trig = INTR_TRIGGER_CONFORM; + *pol = INTR_POLARITY_CONFORM; + } +} + Modified: stable/10/sys/powerpc/powerpc/intr_machdep.c ============================================================================== --- stable/10/sys/powerpc/powerpc/intr_machdep.c Tue May 13 18:00:41 2014 (r265968) +++ stable/10/sys/powerpc/powerpc/intr_machdep.c Tue May 13 18:06:26 2014 (r265969) @@ -102,6 +102,7 @@ struct powerpc_intr { cpuset_t cpu; enum intr_trigger trig; enum intr_polarity pol; + int fwcode; }; struct pic { @@ -427,6 +428,9 @@ powerpc_enable_intr(void) if (error) continue; + if (i->trig == -1) + PIC_TRANSLATE_CODE(i->pic, i->intline, i->fwcode, + &i->trig, &i->pol); if (i->trig != INTR_TRIGGER_CONFORM || i->pol != INTR_POLARITY_CONFORM) PIC_CONFIG(i->pic, i->intline, i->trig, i->pol); @@ -469,15 +473,21 @@ powerpc_setup_intr(const char *name, u_i if (!cold) { error = powerpc_map_irq(i); - if (!error && (i->trig != INTR_TRIGGER_CONFORM || - i->pol != INTR_POLARITY_CONFORM)) - PIC_CONFIG(i->pic, i->intline, i->trig, i->pol); + if (!error) { + if (i->trig == -1) + PIC_TRANSLATE_CODE(i->pic, i->intline, + i->fwcode, &i->trig, &i->pol); + + if (i->trig != INTR_TRIGGER_CONFORM || + i->pol != INTR_POLARITY_CONFORM) + PIC_CONFIG(i->pic, i->intline, i->trig, i->pol); - if (!error && i->pic == root_pic) - PIC_BIND(i->pic, i->intline, i->cpu); + if (i->pic == root_pic) + PIC_BIND(i->pic, i->intline, i->cpu); - if (!error && enable) - PIC_ENABLE(i->pic, i->intline, i->vector); + if (enable) + PIC_ENABLE(i->pic, i->intline, i->vector); + } } return (error); } @@ -504,6 +514,28 @@ powerpc_bind_intr(u_int irq, u_char cpu) #endif int +powerpc_fw_config_intr(int irq, int sense_code) +{ + struct powerpc_intr *i; + + i = intr_lookup(irq); + if (i == NULL) + return (ENOMEM); + + i->trig = -1; + i->pol = INTR_POLARITY_CONFORM; + i->fwcode = sense_code; + + if (!cold && i->pic != NULL) { + PIC_TRANSLATE_CODE(i->pic, i->intline, i->fwcode, &i->trig, + &i->pol); + PIC_CONFIG(i->pic, i->intline, i->trig, i->pol); + } + + return (0); +} + +int powerpc_config_intr(int irq, enum intr_trigger trig, enum intr_polarity pol) { struct powerpc_intr *i; Modified: stable/10/sys/powerpc/powerpc/nexus.c ============================================================================== --- stable/10/sys/powerpc/powerpc/nexus.c Tue May 13 18:00:41 2014 (r265968) +++ stable/10/sys/powerpc/powerpc/nexus.c Tue May 13 18:06:26 2014 (r265969) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -63,260 +64,45 @@ __FBSDID("$FreeBSD$"); * * Additionally, interrupt setup/teardown and some resource management are * done at this level. - * - * Maybe this code should get into dev/ofw to some extent, as some of it should - * work for all Open Firmware based machines... */ -struct nexus_devinfo { - struct ofw_bus_devinfo ndi_obdinfo; - struct resource_list ndi_rl; -}; - -struct nexus_softc { - uint32_t acells, scells; - struct rman sc_intr_rman; - struct rman sc_mem_rman; -}; - -static device_probe_t nexus_probe; -static device_attach_t nexus_attach; -static bus_print_child_t nexus_print_child; -static bus_add_child_t nexus_add_child; -static bus_probe_nomatch_t nexus_probe_nomatch; static bus_setup_intr_t nexus_setup_intr; static bus_teardown_intr_t nexus_teardown_intr; -static bus_alloc_resource_t nexus_alloc_resource; static bus_activate_resource_t nexus_activate_resource; static bus_deactivate_resource_t nexus_deactivate_resource; -static bus_adjust_resource_t nexus_adjust_resource; -static bus_release_resource_t nexus_release_resource; -static bus_get_resource_list_t nexus_get_resource_list; #ifdef SMP static bus_bind_intr_t nexus_bind_intr; #endif static bus_config_intr_t nexus_config_intr; -static ofw_bus_get_devinfo_t nexus_get_devinfo; - -static int nexus_inlist(const char *, const char *const *); -static struct nexus_devinfo * nexus_setup_dinfo(device_t, phandle_t); -static void nexus_destroy_dinfo(struct nexus_devinfo *); -static int nexus_print_res(struct nexus_devinfo *); +static ofw_bus_map_intr_t nexus_ofw_map_intr; +static ofw_bus_config_intr_t nexus_ofw_config_intr; static device_method_t nexus_methods[] = { - /* Device interface */ - DEVMETHOD(device_probe, nexus_probe), - DEVMETHOD(device_attach, nexus_attach), - DEVMETHOD(device_detach, bus_generic_detach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, bus_generic_resume), - /* Bus interface */ - DEVMETHOD(bus_print_child, nexus_print_child), - DEVMETHOD(bus_probe_nomatch, nexus_probe_nomatch), - DEVMETHOD(bus_read_ivar, bus_generic_read_ivar), - DEVMETHOD(bus_write_ivar, bus_generic_write_ivar), - DEVMETHOD(bus_add_child, nexus_add_child), - DEVMETHOD(bus_child_pnpinfo_str, ofw_bus_gen_child_pnpinfo_str), - DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), DEVMETHOD(bus_activate_resource, nexus_activate_resource), DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), - DEVMETHOD(bus_adjust_resource, nexus_adjust_resource), - DEVMETHOD(bus_release_resource, nexus_release_resource), DEVMETHOD(bus_setup_intr, nexus_setup_intr), DEVMETHOD(bus_teardown_intr, nexus_teardown_intr), - DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), - DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), - DEVMETHOD(bus_get_resource_list, nexus_get_resource_list), #ifdef SMP DEVMETHOD(bus_bind_intr, nexus_bind_intr), #endif DEVMETHOD(bus_config_intr, nexus_config_intr), /* ofw_bus interface */ - DEVMETHOD(ofw_bus_get_devinfo, nexus_get_devinfo), - DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), - DEVMETHOD(ofw_bus_get_model, ofw_bus_gen_get_model), - DEVMETHOD(ofw_bus_get_name, ofw_bus_gen_get_name), - DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), - DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), + DEVMETHOD(ofw_bus_map_intr, nexus_ofw_map_intr), + DEVMETHOD(ofw_bus_config_intr, nexus_ofw_config_intr), DEVMETHOD_END }; static devclass_t nexus_devclass; -DEFINE_CLASS_0(nexus, nexus_driver, nexus_methods, sizeof(struct nexus_softc)); +DEFINE_CLASS_1(nexus, nexus_driver, nexus_methods, + sizeof(struct ofw_nexus_softc), ofw_nexus_driver); EARLY_DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0, BUS_PASS_BUS); MODULE_VERSION(nexus, 1); -static const char *const nexus_excl_name[] = { - "FJSV,system", - "aliases", - "associations", - "chosen", - "cmp", - "counter-timer", /* No separate device; handled by psycho/sbus */ - "failsafe", - "memory", - "openprom", - "options", - "packages", - "physical-memory", - "rsc", - "sgcn", - "todsg", - "virtual-memory", - NULL -}; - -static const char *const nexus_excl_type[] = { - "core", - "cpu", - NULL -}; - -extern struct bus_space_tag nexus_bustag; -extern struct bus_dma_tag nexus_dmatag; - -static int -nexus_inlist(const char *name, const char *const *list) -{ - int i; - - if (name == NULL) - return (0); - for (i = 0; list[i] != NULL; i++) - if (strcmp(name, list[i]) == 0) - return (1); - return (0); -} - -#define NEXUS_EXCLUDED(name, type) \ - (nexus_inlist((name), nexus_excl_name) || \ - ((type) != NULL && nexus_inlist((type), nexus_excl_type))) - -static int -nexus_probe(device_t dev) -{ - - /* Nexus does always match. */ - device_set_desc(dev, "Open Firmware Nexus device"); - return (0); -} - -static int -nexus_attach(device_t dev) -{ - struct nexus_devinfo *ndi; - struct nexus_softc *sc; - device_t cdev; - phandle_t node; - - sc = device_get_softc(dev); - - if (strcmp(device_get_name(device_get_parent(dev)), "root") == 0) { - node = OF_peer(0); - - sc->sc_intr_rman.rm_type = RMAN_ARRAY; - sc->sc_intr_rman.rm_descr = "Interrupts"; - sc->sc_mem_rman.rm_type = RMAN_ARRAY; - sc->sc_mem_rman.rm_descr = "Device Memory"; - if (rman_init(&sc->sc_intr_rman) != 0 || - rman_init(&sc->sc_mem_rman) != 0 || - rman_manage_region(&sc->sc_intr_rman, 0, ~0) != 0 || - rman_manage_region(&sc->sc_mem_rman, 0, BUS_SPACE_MAXADDR) - != 0) - panic("%s: failed to set up rmans.", __func__); - } else - node = ofw_bus_get_node(dev); - - /* - * Allow devices to identify. - */ - bus_generic_probe(dev); - - /* - * If no Open Firmware, bail early - */ - if (node == -1) - return (bus_generic_attach(dev)); - - /* - * Some important numbers - */ - sc->acells = 2; - OF_getencprop(node, "#address-cells", &sc->acells, sizeof(sc->acells)); - sc->scells = 1; - OF_getencprop(node, "#size-cells", &sc->scells, sizeof(sc->scells)); - - /* - * Now walk the OFW tree and attach top-level devices. - */ - for (node = OF_child(node); node > 0; node = OF_peer(node)) { - if ((ndi = nexus_setup_dinfo(dev, node)) == NULL) - continue; - cdev = device_add_child(dev, NULL, -1); - if (cdev == NULL) { - device_printf(dev, "<%s>: device_add_child failed\n", - ndi->ndi_obdinfo.obd_name); - nexus_destroy_dinfo(ndi); - continue; - } - device_set_ivars(cdev, ndi); - } - return (bus_generic_attach(dev)); -} - -static device_t -nexus_add_child(device_t dev, u_int order, const char *name, int unit) -{ - device_t cdev; - struct nexus_devinfo *ndi; - - cdev = device_add_child_ordered(dev, order, name, unit); - if (cdev == NULL) - return (NULL); - - ndi = malloc(sizeof(*ndi), M_DEVBUF, M_WAITOK | M_ZERO); - ndi->ndi_obdinfo.obd_node = -1; - resource_list_init(&ndi->ndi_rl); - device_set_ivars(cdev, ndi); - - return (cdev); -} - -static int -nexus_print_child(device_t bus, device_t child) -{ - int rv; - - rv = bus_print_child_header(bus, child); - rv += nexus_print_res(device_get_ivars(child)); - rv += bus_print_child_footer(bus, child); - return (rv); -} - -static void -nexus_probe_nomatch(device_t bus, device_t child) -{ - const char *name, *type; - - if (!bootverbose) - return; - - name = ofw_bus_get_name(child); - type = ofw_bus_get_type(child); - - device_printf(bus, "<%s>", - name != NULL ? name : "unknown"); - nexus_print_res(device_get_ivars(child)); - printf(" type %s (no driver attached)\n", - type != NULL ? type : "unknown"); -} - static int nexus_setup_intr(device_t bus __unused, device_t child, struct resource *r, int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, @@ -370,71 +156,20 @@ nexus_config_intr(device_t dev, int irq, return (powerpc_config_intr(irq, trig, pol)); } -static struct resource * -nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) +static int +nexus_ofw_map_intr(device_t dev, device_t child, phandle_t iparent, int irq) { - struct nexus_softc *sc; - struct rman *rm; - struct resource *rv; - struct resource_list_entry *rle; - device_t nexus; - int isdefault, passthrough; - - isdefault = (start == 0UL && end == ~0UL); - passthrough = (device_get_parent(child) != bus); - nexus = bus; - while (strcmp(device_get_name(device_get_parent(nexus)), "root") != 0) - nexus = device_get_parent(nexus); - sc = device_get_softc(nexus); - rle = NULL; - - if (!passthrough && isdefault) { - rle = resource_list_find(BUS_GET_RESOURCE_LIST(bus, child), - type, *rid); - if (rle == NULL) - return (NULL); - if (rle->res != NULL) - panic("%s: resource entry is busy", __func__); - start = rle->start; - count = ulmax(count, rle->count); - end = ulmax(rle->end, start + count - 1); - } - - switch (type) { - case SYS_RES_IRQ: - rm = &sc->sc_intr_rman; - break; - case SYS_RES_MEMORY: - rm = &sc->sc_mem_rman; - break; - default: - return (NULL); - } - - rv = rman_reserve_resource(rm, start, end, count, flags & ~RF_ACTIVE, - child); - if (rv == NULL) - return (NULL); - rman_set_rid(rv, *rid); - - if ((flags & RF_ACTIVE) != 0 && bus_activate_resource(child, type, - *rid, rv) != 0) { - rman_release_resource(rv); - return (NULL); - } - - if (!passthrough && rle != NULL) { - rle->res = rv; - rle->start = rman_get_start(rv); - rle->end = rman_get_end(rv); - rle->count = rle->end - rle->start + 1; - } - - return (rv); + return (MAP_IRQ(iparent, irq)); } static int +nexus_ofw_config_intr(device_t dev, device_t child, int irq, int sense) +{ + + return (powerpc_fw_config_intr(irq, sense)); +} + +static int nexus_activate_resource(device_t bus __unused, device_t child __unused, int type, int rid __unused, struct resource *r) { @@ -476,164 +211,3 @@ nexus_deactivate_resource(device_t bus _ return (rman_deactivate_resource(r)); } -static int -nexus_adjust_resource(device_t bus, device_t child __unused, int type, - struct resource *r, u_long start, u_long end) -{ - struct nexus_softc *sc; - struct rman *rm; - device_t nexus; - - nexus = bus; - while (strcmp(device_get_name(device_get_parent(nexus)), "root") != 0) - nexus = device_get_parent(nexus); - sc = device_get_softc(nexus); - switch (type) { - case SYS_RES_IRQ: - rm = &sc->sc_intr_rman; - break; - case SYS_RES_MEMORY: - rm = &sc->sc_mem_rman; - break; - default: - return (EINVAL); - } - if (rm == NULL) - return (ENXIO); - if (rman_is_region_manager(r, rm) == 0) - return (EINVAL); - return (rman_adjust_resource(r, start, end)); -} - -static int -nexus_release_resource(device_t bus __unused, device_t child, int type, - int rid, struct resource *r) -{ - int error; - - if ((rman_get_flags(r) & RF_ACTIVE) != 0) { - error = bus_deactivate_resource(child, type, rid, r); - if (error) - return (error); - } - return (rman_release_resource(r)); -} - -static struct resource_list * -nexus_get_resource_list(device_t bus __unused, device_t child) -{ - struct nexus_devinfo *ndi; - - ndi = device_get_ivars(child); - return (&ndi->ndi_rl); -} - -static const struct ofw_bus_devinfo * -nexus_get_devinfo(device_t bus __unused, device_t child) -{ - struct nexus_devinfo *ndi; - - ndi = device_get_ivars(child); - return (&ndi->ndi_obdinfo); -} - -static struct nexus_devinfo * -nexus_setup_dinfo(device_t dev, phandle_t node) -{ - struct nexus_softc *sc; - struct nexus_devinfo *ndi; - uint32_t *reg, *intr, icells; - uint64_t phys, size; - phandle_t iparent; - int i, j; - int nintr; - int nreg; - - sc = device_get_softc(dev); - - ndi = malloc(sizeof(*ndi), M_DEVBUF, M_WAITOK | M_ZERO); - if (ofw_bus_gen_setup_devinfo(&ndi->ndi_obdinfo, node) != 0) { - free(ndi, M_DEVBUF); - return (NULL); - } - if (NEXUS_EXCLUDED(ndi->ndi_obdinfo.obd_name, - ndi->ndi_obdinfo.obd_type)) { - ofw_bus_gen_destroy_devinfo(&ndi->ndi_obdinfo); - free(ndi, M_DEVBUF); - return (NULL); - } - - resource_list_init(&ndi->ndi_rl); - nreg = OF_getencprop_alloc(node, "reg", sizeof(*reg), (void **)®); - if (nreg == -1) - nreg = 0; - if (nreg % (sc->acells + sc->scells) != 0) { - if (bootverbose) - device_printf(dev, "Malformed reg property on <%s>\n", - ndi->ndi_obdinfo.obd_name); - nreg = 0; - } - - for (i = 0; i < nreg; i += sc->acells + sc->scells) { - phys = size = 0; - for (j = 0; j < sc->acells; j++) { - phys <<= 32; - phys |= reg[i + j]; - } - for (j = 0; j < sc->scells; j++) { - size <<= 32; - size |= reg[i + sc->acells + j]; - } - /* Skip the dummy reg property of glue devices like ssm(4). */ - if (size != 0) - resource_list_add(&ndi->ndi_rl, SYS_RES_MEMORY, i, - phys, phys + size - 1, size); - } - free(reg, M_OFWPROP); - - nintr = OF_getencprop_alloc(node, "interrupts", sizeof(*intr), - (void **)&intr); - if (nintr > 0) { - iparent = 0; - OF_searchprop(node, "interrupt-parent", &iparent, - sizeof(iparent)); - OF_searchprop(iparent, "#interrupt-cells", &icells, - sizeof(icells)); - for (i = 0; i < nintr; i+= icells) { - intr[i] = MAP_IRQ(iparent, intr[i]); - resource_list_add(&ndi->ndi_rl, SYS_RES_IRQ, i, intr[i], - intr[i], 1); - if (icells > 1) { - powerpc_config_intr(intr[i], (intr[i+1] & 1) ? - INTR_TRIGGER_LEVEL : INTR_TRIGGER_EDGE, - INTR_POLARITY_LOW); - } - } - free(intr, M_OFWPROP); - } - - return (ndi); -} - -static void -nexus_destroy_dinfo(struct nexus_devinfo *ndi) -{ - - resource_list_free(&ndi->ndi_rl); - ofw_bus_gen_destroy_devinfo(&ndi->ndi_obdinfo); - free(ndi, M_DEVBUF); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Tue May 13 18:08:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C85D66D1; Tue, 13 May 2014 18:08:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C07F2074; Tue, 13 May 2014 18:08:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4DI8FJl013644; Tue, 13 May 2014 18:08:15 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4DI8FTP013643; Tue, 13 May 2014 18:08:15 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405131808.s4DI8FTP013643@svn.freebsd.org> From: Ian Lepore Date: Tue, 13 May 2014 18:08:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265970 - stable/10/sys/powerpc/powermac X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 18:08:15 -0000 Author: ian Date: Tue May 13 18:08:15 2014 New Revision: 265970 URL: http://svnweb.freebsd.org/changeset/base/265970 Log: MFC r257093: Be a little more suspicious of thermal sensors, which can have single crazy readings occasionally. One wild reading should not be enough to trigger a shutdown, so instead wait for several concerning readings in a row. Modified: stable/10/sys/powerpc/powermac/powermac_thermal.c Modified: stable/10/sys/powerpc/powermac/powermac_thermal.c ============================================================================== --- stable/10/sys/powerpc/powermac/powermac_thermal.c Tue May 13 18:06:26 2014 (r265969) +++ stable/10/sys/powerpc/powermac/powermac_thermal.c Tue May 13 18:08:15 2014 (r265970) @@ -68,6 +68,8 @@ struct pmac_fan_le { struct pmac_sens_le { struct pmac_therm *sensor; int last_val; +#define MAX_CRITICAL_COUNT 6 + int critical_count; SLIST_ENTRY(pmac_sens_le) entries; }; static SLIST_HEAD(pmac_fans, pmac_fan_le) fans = SLIST_HEAD_INITIALIZER(fans); @@ -106,14 +108,27 @@ pmac_therm_manage_fans(void) sensor->last_val = temp; if (sensor->last_val > sensor->sensor->max_temp) { + sensor->critical_count++; printf("WARNING: Current temperature (%s: %d.%d C) " - "exceeds critical temperature (%d.%d C)! " - "Shutting down!\n", sensor->sensor->name, - (sensor->last_val - ZERO_C_TO_K) / 10, - (sensor->last_val - ZERO_C_TO_K) % 10, - (sensor->sensor->max_temp - ZERO_C_TO_K) / 10, - (sensor->sensor->max_temp - ZERO_C_TO_K) % 10); - shutdown_nice(RB_POWEROFF); + "exceeds critical temperature (%d.%d C); " + "count=%d\n", + sensor->sensor->name, + (sensor->last_val - ZERO_C_TO_K) / 10, + (sensor->last_val - ZERO_C_TO_K) % 10, + (sensor->sensor->max_temp - ZERO_C_TO_K) / 10, + (sensor->sensor->max_temp - ZERO_C_TO_K) % 10, + sensor->critical_count); + if (sensor->critical_count >= MAX_CRITICAL_COUNT) { + printf("WARNING: %s temperature exceeded " + "critical temperature %d times in a row; " + "shutting down!\n", + sensor->sensor->name, + sensor->critical_count); + shutdown_nice(RB_POWEROFF); + } + } else { + if (sensor->critical_count > 0) + sensor->critical_count--; } } @@ -177,6 +192,8 @@ pmac_thermal_sensor_register(struct pmac list_entry = malloc(sizeof(struct pmac_sens_le), M_PMACTHERM, M_ZERO | M_WAITOK); list_entry->sensor = sensor; + list_entry->last_val = 0; + list_entry->critical_count = 0; SLIST_INSERT_HEAD(&sensors, list_entry, entries); } From owner-svn-src-stable@FreeBSD.ORG Tue May 13 18:14:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2399694D; Tue, 13 May 2014 18:14:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DE9F2137; Tue, 13 May 2014 18:14:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4DIEWKv017795; Tue, 13 May 2014 18:14:32 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4DIEVsQ017792; Tue, 13 May 2014 18:14:31 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405131814.s4DIEVsQ017792@svn.freebsd.org> From: Ian Lepore Date: Tue, 13 May 2014 18:14:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265971 - in stable/10/sys: conf dev/fdt dev/ofw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 18:14:32 -0000 Author: ian Date: Tue May 13 18:14:31 2014 New Revision: 265971 URL: http://svnweb.freebsd.org/changeset/base/265971 Log: MFC r257114, r257118 Use common OFW root code to set up fdtbus. This is an almost purely negative diff that should improve reliability somewhat. There should be no differences in behavior -- please report any that crop up. This has been tested on ARM and PPC systems. Make sure to get the right node when looking up #interrupt-cells. Modified: stable/10/sys/conf/files stable/10/sys/dev/fdt/fdtbus.c stable/10/sys/dev/ofw/ofw_nexus.c Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Tue May 13 18:08:15 2014 (r265970) +++ stable/10/sys/conf/files Tue May 13 18:14:31 2014 (r265971) @@ -1969,6 +1969,7 @@ dev/ofw/ofw_bus_subr.c optional fdt dev/ofw/ofw_fdt.c optional fdt dev/ofw/ofw_if.m optional fdt dev/ofw/ofw_iicbus.c optional fdt iicbus +dev/ofw/ofw_nexus.c optional fdt dev/ofw/openfirm.c optional fdt dev/ofw/openfirmio.c optional fdt dev/patm/if_patm.c optional patm pci Modified: stable/10/sys/dev/fdt/fdtbus.c ============================================================================== --- stable/10/sys/dev/fdt/fdtbus.c Tue May 13 18:08:15 2014 (r265970) +++ stable/10/sys/dev/fdt/fdtbus.c Tue May 13 18:14:31 2014 (r265971) @@ -42,63 +42,20 @@ __FBSDID("$FreeBSD$"); #include #include +#include -#include "fdt_common.h" #include "ofw_bus_if.h" -#ifdef DEBUG -#define debugf(fmt, args...) do { printf("%s(): ", __func__); \ - printf(fmt,##args); } while (0) -#else -#define debugf(fmt, args...) -#endif - -static MALLOC_DEFINE(M_FDTBUS, "fdtbus", "FDTbus devices information"); - -struct fdtbus_devinfo { - phandle_t di_node; - char *di_name; - char *di_type; - char *di_compat; - struct resource_list di_res; - - /* Interrupts sense-level info for this device */ - struct fdt_sense_level di_intr_sl[DI_MAX_INTR_NUM]; -}; - -struct fdtbus_softc { - struct rman sc_irq; - struct rman sc_mem; -}; - /* * Prototypes. */ static void fdtbus_identify(driver_t *, device_t); static int fdtbus_probe(device_t); -static int fdtbus_attach(device_t); -static int fdtbus_print_child(device_t, device_t); -static struct resource *fdtbus_alloc_resource(device_t, device_t, int, - int *, u_long, u_long, u_long, u_int); -static int fdtbus_release_resource(device_t, device_t, int, int, - struct resource *); static int fdtbus_activate_resource(device_t, device_t, int, int, struct resource *); static int fdtbus_deactivate_resource(device_t, device_t, int, int, struct resource *); -static int fdtbus_setup_intr(device_t, device_t, struct resource *, int, - driver_filter_t *, driver_intr_t *, void *, void **); - -static const char *fdtbus_ofw_get_name(device_t, device_t); -static phandle_t fdtbus_ofw_get_node(device_t, device_t); -static const char *fdtbus_ofw_get_type(device_t, device_t); -static const char *fdtbus_ofw_get_compat(device_t, device_t); - -/* - * Local routines. - */ -static void newbus_device_from_fdt_node(device_t, phandle_t); /* * Bus interface definition. @@ -107,47 +64,26 @@ static device_method_t fdtbus_methods[] /* Device interface */ DEVMETHOD(device_identify, fdtbus_identify), DEVMETHOD(device_probe, fdtbus_probe), - DEVMETHOD(device_attach, fdtbus_attach), - DEVMETHOD(device_detach, bus_generic_detach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, bus_generic_resume), /* Bus interface */ - DEVMETHOD(bus_print_child, fdtbus_print_child), - DEVMETHOD(bus_alloc_resource, fdtbus_alloc_resource), - DEVMETHOD(bus_release_resource, fdtbus_release_resource), DEVMETHOD(bus_activate_resource, fdtbus_activate_resource), DEVMETHOD(bus_deactivate_resource, fdtbus_deactivate_resource), DEVMETHOD(bus_config_intr, bus_generic_config_intr), - DEVMETHOD(bus_setup_intr, fdtbus_setup_intr), + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), - /* OFW bus interface */ - DEVMETHOD(ofw_bus_get_node, fdtbus_ofw_get_node), - DEVMETHOD(ofw_bus_get_name, fdtbus_ofw_get_name), - DEVMETHOD(ofw_bus_get_type, fdtbus_ofw_get_type), - DEVMETHOD(ofw_bus_get_compat, fdtbus_ofw_get_compat), - - { 0, 0 } -}; - -static driver_t fdtbus_driver = { - "fdtbus", - fdtbus_methods, - sizeof(struct fdtbus_softc) + DEVMETHOD_END }; devclass_t fdtbus_devclass; - +DEFINE_CLASS_1(fdtbus, fdtbus_driver, fdtbus_methods, + sizeof(struct ofw_nexus_softc), ofw_nexus_driver); DRIVER_MODULE(fdtbus, nexus, fdtbus_driver, fdtbus_devclass, 0, 0); static void fdtbus_identify(driver_t *driver, device_t parent) { - debugf("%s(driver=%p, parent=%p)\n", __func__, driver, parent); - if (device_find_child(parent, "fdtbus", -1) == NULL) BUS_ADD_CHILD(parent, 0, "fdtbus", -1); } @@ -156,462 +92,11 @@ static int fdtbus_probe(device_t dev) { - debugf("%s(dev=%p); pass=%u\n", __func__, dev, bus_current_pass); - device_set_desc(dev, "Flattened Device Tree"); return (BUS_PROBE_NOWILDCARD); } static int -fdtbus_attach(device_t dev) -{ - phandle_t root; - phandle_t child; - struct fdtbus_softc *sc; - u_long start, end; - int error; - - if ((root = OF_finddevice("/")) == -1) - panic("fdtbus_attach: no root node."); - - sc = device_get_softc(dev); - - /* - * IRQ rman. - */ - start = 0; - end = ~0; - sc->sc_irq.rm_start = start; - sc->sc_irq.rm_end = end; - sc->sc_irq.rm_type = RMAN_ARRAY; - sc->sc_irq.rm_descr = "Interrupt request lines"; - if ((error = rman_init(&sc->sc_irq)) != 0) { - device_printf(dev, "could not init IRQ rman, error = %d\n", - error); - return (error); - } - if ((error = rman_manage_region(&sc->sc_irq, start, end)) != 0) { - device_printf(dev, "could not manage IRQ region, error = %d\n", - error); - return (error); - } - - /* - * Mem-mapped I/O space rman. - */ - start = 0; - end = ~0ul; - sc->sc_mem.rm_start = start; - sc->sc_mem.rm_end = end; - sc->sc_mem.rm_type = RMAN_ARRAY; - sc->sc_mem.rm_descr = "I/O memory"; - if ((error = rman_init(&sc->sc_mem)) != 0) { - device_printf(dev, "could not init I/O mem rman, error = %d\n", - error); - return (error); - } - if ((error = rman_manage_region(&sc->sc_mem, start, end)) != 0) { - device_printf(dev, "could not manage I/O mem region, " - "error = %d\n", error); - return (error); - } - - /* - * Walk the FDT root node and add top-level devices as our children. - */ - for (child = OF_child(root); child != 0; child = OF_peer(child)) { - /* Check and process 'status' property. */ - if (!(fdt_is_enabled(child))) - continue; - - newbus_device_from_fdt_node(dev, child); - } - - return (bus_generic_attach(dev)); -} - -static int -fdtbus_print_child(device_t dev, device_t child) -{ - struct fdtbus_devinfo *di; - struct resource_list *rl; - int rv; - - di = device_get_ivars(child); - rl = &di->di_res; - - rv = 0; - rv += bus_print_child_header(dev, child); - rv += resource_list_print_type(rl, "mem", SYS_RES_MEMORY, "%#lx"); - rv += resource_list_print_type(rl, "irq", SYS_RES_IRQ, "%ld"); - rv += bus_print_child_footer(dev, child); - - return (rv); -} - -static void -newbus_device_destroy(device_t dev) -{ - struct fdtbus_devinfo *di; - - di = device_get_ivars(dev); - if (di == NULL) - return; - - free(di->di_name, M_OFWPROP); - free(di->di_type, M_OFWPROP); - free(di->di_compat, M_OFWPROP); - - resource_list_free(&di->di_res); - free(di, M_FDTBUS); -} - -static device_t -newbus_device_create(device_t dev_par, phandle_t node, char *name, char *type, - char *compat) -{ - device_t child; - struct fdtbus_devinfo *di; - - child = device_add_child(dev_par, NULL, -1); - if (child == NULL) { - free(name, M_OFWPROP); - free(type, M_OFWPROP); - free(compat, M_OFWPROP); - return (NULL); - } - - di = malloc(sizeof(*di), M_FDTBUS, M_WAITOK); - di->di_node = node; - di->di_name = name; - di->di_type = type; - di->di_compat = compat; - - resource_list_init(&di->di_res); - - if (fdt_reg_to_rl(node, &di->di_res)) { - device_printf(child, "could not process 'reg' property\n"); - newbus_device_destroy(child); - child = NULL; - goto out; - } - - if (fdt_intr_to_rl(node, &di->di_res, di->di_intr_sl)) { - device_printf(child, "could not process 'interrupts' " - "property\n"); - newbus_device_destroy(child); - child = NULL; - goto out; - } - - device_set_ivars(child, di); - debugf("added child name='%s', node=%p\n", name, (void *)node); - -out: - return (child); -} - -static device_t -newbus_pci_create(device_t dev_par, phandle_t dt_node, u_long par_base, - u_long par_size) -{ - pcell_t reg[3 + 2]; - device_t dev_child; - u_long start, end, count; - struct fdtbus_devinfo *di; - char *name, *type, *compat; - int len; - - OF_getprop_alloc(dt_node, "device_type", 1, (void **)&type); - if (!(type != NULL && strcmp(type, "pci") == 0)) { - /* Only process 'pci' subnodes. */ - free(type, M_OFWPROP); - return (NULL); - } - - OF_getprop_alloc(dt_node, "name", 1, (void **)&name); - OF_getprop_alloc(OF_parent(dt_node), "compatible", 1, - (void **)&compat); - - dev_child = device_add_child(dev_par, NULL, -1); - if (dev_child == NULL) { - free(name, M_OFWPROP); - free(type, M_OFWPROP); - free(compat, M_OFWPROP); - return (NULL); - } - - di = malloc(sizeof(*di), M_FDTBUS, M_WAITOK); - di->di_node = dt_node; - di->di_name = name; - di->di_type = type; - di->di_compat = compat; - - resource_list_init(&di->di_res); - - /* - * Produce and set SYS_RES_MEMORY resources. - */ - start = 0; - count = 0; - - len = OF_getprop(dt_node, "reg", ®, sizeof(reg)); - if (len > 0) { - if (fdt_data_verify((void *)®[1], 2) != 0) { - device_printf(dev_child, "'reg' address value out of " - "range\n"); - newbus_device_destroy(dev_child); - dev_child = NULL; - goto out; - } - start = fdt_data_get((void *)®[1], 2); - - if (fdt_data_verify((void *)®[3], 2) != 0) { - device_printf(dev_child, "'reg' size value out of " - "range\n"); - newbus_device_destroy(dev_child); - dev_child = NULL; - goto out; - } - count = fdt_data_get((void *)®[3], 2); - } - - /* Calculate address range relative to base. */ - par_base &= 0x000ffffful; - start &= 0x000ffffful; - start += par_base + fdt_immr_va; - if (count == 0) - count = par_size; - end = start + count - 1; - - debugf("start = 0x%08lx, end = 0x%08lx, count = 0x%08lx\n", - start, end, count); - - if (count > par_size) { - device_printf(dev_child, "'reg' size value out of range\n"); - newbus_device_destroy(dev_child); - dev_child = NULL; - goto out; - } - - resource_list_add(&di->di_res, SYS_RES_MEMORY, 0, start, end, count); - - /* - * Set SYS_RES_IRQ resources. - */ - if (fdt_intr_to_rl(OF_parent(dt_node), &di->di_res, di->di_intr_sl)) { - device_printf(dev_child, "could not process 'interrupts' " - "property\n"); - newbus_device_destroy(dev_child); - dev_child = NULL; - goto out; - } - - device_set_ivars(dev_child, di); - debugf("added child name='%s', node=%p\n", name, - (void *)dt_node); - -out: - return (dev_child); -} - -static void -pci_from_fdt_node(device_t dev_par, phandle_t dt_node, char *name, - char *type, char *compat) -{ - u_long reg_base, reg_size; - phandle_t dt_child; - - /* - * Retrieve 'reg' property. - */ - if (fdt_regsize(dt_node, ®_base, ®_size) != 0) { - device_printf(dev_par, "could not retrieve 'reg' prop\n"); - return; - } - - /* - * Walk the PCI node and instantiate newbus devices representing - * logical resources (bridges / ports). - */ - for (dt_child = OF_child(dt_node); dt_child != 0; - dt_child = OF_peer(dt_child)) { - - if (!(fdt_is_enabled(dt_child))) - continue; - - newbus_pci_create(dev_par, dt_child, reg_base, reg_size); - } -} - -/* - * These FDT nodes do not need a corresponding newbus device object. - */ -static char *fdt_devices_skip[] = { - "aliases", - "chosen", - "memory", - NULL -}; - -static void -newbus_device_from_fdt_node(device_t dev_par, phandle_t node) -{ - char *name, *type, *compat; - device_t child; - int i; - - OF_getprop_alloc(node, "name", 1, (void **)&name); - OF_getprop_alloc(node, "device_type", 1, (void **)&type); - OF_getprop_alloc(node, "compatible", 1, (void **)&compat); - - for (i = 0; fdt_devices_skip[i] != NULL; i++) - if (name != NULL && strcmp(name, fdt_devices_skip[i]) == 0) { - debugf("skipping instantiating FDT device='%s'\n", - name); - return; - } - - child = newbus_device_create(dev_par, node, name, type, compat); - if (type != NULL && strcmp(type, "pci") == 0) - pci_from_fdt_node(child, node, name, type, compat); -} - -static struct resource * -fdtbus_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) -{ - struct fdtbus_softc *sc; - struct resource *res; - struct rman *rm; - struct fdtbus_devinfo *di; - struct resource_list_entry *rle; - int needactivate; - - /* - * Request for the default allocation with a given rid: use resource - * list stored in the local device info. - */ - if ((start == 0UL) && (end == ~0UL)) { - if ((di = device_get_ivars(child)) == NULL) - return (NULL); - - if (type == SYS_RES_IOPORT) - type = SYS_RES_MEMORY; - - rle = resource_list_find(&di->di_res, type, *rid); - if (rle == NULL) { - device_printf(bus, "no default resources for " - "rid = %d, type = %d\n", *rid, type); - return (NULL); - } - start = rle->start; - end = rle->end; - count = rle->count; - } - - sc = device_get_softc(bus); - - needactivate = flags & RF_ACTIVE; - flags &= ~RF_ACTIVE; - - switch (type) { - case SYS_RES_IRQ: - rm = &sc->sc_irq; - break; - - case SYS_RES_IOPORT: - case SYS_RES_MEMORY: - rm = &sc->sc_mem; - break; - - default: - return (NULL); - } - - res = rman_reserve_resource(rm, start, end, count, flags, child); - if (res == NULL) { - device_printf(bus, "failed to reserve resource %#lx - %#lx " - "(%#lx)\n", start, end, count); - return (NULL); - } - - rman_set_rid(res, *rid); - - if (type == SYS_RES_IOPORT || type == SYS_RES_MEMORY) { - /* XXX endianess should be set based on SOC node */ - rman_set_bustag(res, fdtbus_bs_tag); - rman_set_bushandle(res, rman_get_start(res)); - } - - if (needactivate) - if (bus_activate_resource(child, type, *rid, res)) { - device_printf(child, "resource activation failed\n"); - rman_release_resource(res); - return (NULL); - } - - return (res); -} - -static int -fdtbus_release_resource(device_t bus, device_t child, int type, int rid, - struct resource *res) -{ - int err; - - if (rman_get_flags(res) & RF_ACTIVE) { - err = bus_deactivate_resource(child, type, rid, res); - if (err) - return (err); - } - - return (rman_release_resource(res)); -} - -static int -fdtbus_setup_intr(device_t bus, device_t child, struct resource *res, - int flags, driver_filter_t *filter, driver_intr_t *ihand, void *arg, - void **cookiep) -{ - struct fdtbus_devinfo *di; - enum intr_trigger trig; - enum intr_polarity pol; - int error, rid; - - if (res == NULL) - return (EINVAL); - - /* - * We are responsible for configuring the interrupts of our direct - * children. - */ - if (device_get_parent(child) == bus) { - di = device_get_ivars(child); - if (di == NULL) - return (ENXIO); - - rid = rman_get_rid(res); - if (rid >= DI_MAX_INTR_NUM) - return (ENOENT); - - trig = di->di_intr_sl[rid].trig; - pol = di->di_intr_sl[rid].pol; - if (trig != INTR_TRIGGER_CONFORM || - pol != INTR_POLARITY_CONFORM) { - error = bus_generic_config_intr(bus, - rman_get_start(res), trig, pol); - if (error) - return (error); - } - } - - error = bus_generic_setup_intr(bus, child, res, flags, filter, ihand, - arg, cookiep); - return (error); -} - -static int fdtbus_activate_resource(device_t bus, device_t child, int type, int rid, struct resource *res) { @@ -619,6 +104,10 @@ fdtbus_activate_resource(device_t bus, d int error; if (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT) { + /* XXX endianess should be set based on SOC node */ + rman_set_bustag(res, fdtbus_bs_tag); + rman_set_bushandle(res, rman_get_start(res)); + error = bus_space_map(rman_get_bustag(res), rman_get_bushandle(res), rman_get_size(res), 0, &p); if (error) @@ -637,36 +126,3 @@ fdtbus_deactivate_resource(device_t bus, return (rman_deactivate_resource(res)); } -static const char * -fdtbus_ofw_get_name(device_t bus, device_t dev) -{ - struct fdtbus_devinfo *di; - - return ((di = device_get_ivars(dev)) == NULL ? NULL : di->di_name); -} - -static phandle_t -fdtbus_ofw_get_node(device_t bus, device_t dev) -{ - struct fdtbus_devinfo *di; - - return ((di = device_get_ivars(dev)) == NULL ? 0 : di->di_node); -} - -static const char * -fdtbus_ofw_get_type(device_t bus, device_t dev) -{ - struct fdtbus_devinfo *di; - - return ((di = device_get_ivars(dev)) == NULL ? NULL : di->di_type); -} - -static const char * -fdtbus_ofw_get_compat(device_t bus, device_t dev) -{ - struct fdtbus_devinfo *di; - - return ((di = device_get_ivars(dev)) == NULL ? NULL : di->di_compat); -} - - Modified: stable/10/sys/dev/ofw/ofw_nexus.c ============================================================================== --- stable/10/sys/dev/ofw/ofw_nexus.c Tue May 13 18:08:15 2014 (r265970) +++ stable/10/sys/dev/ofw/ofw_nexus.c Tue May 13 18:14:31 2014 (r265971) @@ -464,8 +464,8 @@ nexus_setup_dinfo(device_t dev, phandle_ iparent = 0; OF_searchencprop(node, "interrupt-parent", &iparent, sizeof(iparent)); - OF_searchencprop(iparent, "#interrupt-cells", &icells, - sizeof(icells)); + OF_searchencprop(OF_xref_phandle(iparent), "#interrupt-cells", + &icells, sizeof(icells)); for (i = 0; i < nintr; i+= icells) { intr[i] = ofw_bus_map_intr(dev, iparent, intr[i]); resource_list_add(&ndi->ndi_rl, SYS_RES_IRQ, i, intr[i], From owner-svn-src-stable@FreeBSD.ORG Tue May 13 18:24:04 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1045BCFE; Tue, 13 May 2014 18:24:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EFD45220A; Tue, 13 May 2014 18:24:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4DIO3rS022114; Tue, 13 May 2014 18:24:03 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4DIO3J2022108; Tue, 13 May 2014 18:24:03 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405131824.s4DIO3J2022108@svn.freebsd.org> From: Ian Lepore Date: Tue, 13 May 2014 18:24:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265972 - in stable/10/sys: conf powerpc/include powerpc/mpc85xx powerpc/powerpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 18:24:04 -0000 Author: ian Date: Tue May 13 18:24:02 2014 New Revision: 265972 URL: http://svnweb.freebsd.org/changeset/base/265972 Log: MFC r257115, r257116, r257117 Remove dead and duplicated code. Added: stable/10/sys/powerpc/mpc85xx/pci_mpc85xx.c - copied unchanged from r257117, head/sys/powerpc/mpc85xx/pci_mpc85xx.c Deleted: stable/10/sys/powerpc/mpc85xx/pci_fdt.c Modified: stable/10/sys/conf/files.powerpc stable/10/sys/powerpc/include/psl.h stable/10/sys/powerpc/powerpc/exec_machdep.c stable/10/sys/powerpc/powerpc/genassym.c Modified: stable/10/sys/conf/files.powerpc ============================================================================== --- stable/10/sys/conf/files.powerpc Tue May 13 18:14:31 2014 (r265971) +++ stable/10/sys/conf/files.powerpc Tue May 13 18:24:02 2014 (r265972) @@ -136,12 +136,12 @@ powerpc/mpc85xx/i2c.c optional iicbus f powerpc/mpc85xx/isa.c optional mpc85xx isa powerpc/mpc85xx/lbc.c optional mpc85xx powerpc/mpc85xx/mpc85xx.c optional mpc85xx -powerpc/mpc85xx/pci_fdt.c optional pci mpc85xx +powerpc/mpc85xx/pci_mpc85xx.c optional pci mpc85xx powerpc/ofw/ofw_cpu.c optional aim powerpc/ofw/ofw_machdep.c standard -powerpc/ofw/ofw_pci.c optional pci aim -powerpc/ofw/ofw_pcibus.c optional pci aim -powerpc/ofw/ofw_pcib_pci.c optional pci aim +powerpc/ofw/ofw_pci.c optional pci +powerpc/ofw/ofw_pcibus.c optional pci +powerpc/ofw/ofw_pcib_pci.c optional pci powerpc/ofw/ofw_real.c optional aim powerpc/ofw/ofw_syscons.c optional sc aim powerpc/ofw/ofwcall32.S optional aim powerpc Modified: stable/10/sys/powerpc/include/psl.h ============================================================================== --- stable/10/sys/powerpc/include/psl.h Tue May 13 18:14:31 2014 (r265971) +++ stable/10/sys/powerpc/include/psl.h Tue May 13 18:24:02 2014 (r265972) @@ -35,96 +35,44 @@ #ifndef _MACHINE_PSL_H_ #define _MACHINE_PSL_H_ -#if defined(BOOKE_E500) /* - * Machine State Register (MSR) - e500 core - * - * The PowerPC e500 does not implement the following bits: - * - * FP, FE0, FE1 - reserved, always cleared, setting has no effect. - * + * Machine State Register (MSR) - All cores */ +#define PSL_VEC 0x02000000UL /* AltiVec/SPE vector unit available */ +#define PSL_EE 0x00008000UL /* external interrupt enable */ +#define PSL_PR 0x00004000UL /* privilege mode (1 == user) */ +#define PSL_FP 0x00002000UL /* floating point enable */ +#define PSL_ME 0x00001000UL /* machine check enable */ +#define PSL_FE0 0x00000800UL /* floating point interrupt mode 0 */ +#define PSL_BE 0x00000200UL /* branch trace enable */ +#define PSL_FE1 0x00000100UL /* floating point interrupt mode 1 */ +#define PSL_PMM 0x00000004UL /* performance monitor mark */ + +/* Machine State Register - Book-E cores */ #define PSL_UCLE 0x04000000UL /* User mode cache lock enable */ -#define PSL_SPE 0x02000000UL /* SPE enable */ #define PSL_WE 0x00040000UL /* Wait state enable */ #define PSL_CE 0x00020000UL /* Critical interrupt enable */ -#define PSL_EE 0x00008000UL /* External interrupt enable */ -#define PSL_PR 0x00004000UL /* User mode */ -#define PSL_FP 0x00002000UL /* Floating point available */ -#define PSL_ME 0x00001000UL /* Machine check interrupt enable */ -#define PSL_FE0 0x00000800UL /* Floating point exception mode 0 */ -#define PSL_UBLE 0x00000400UL /* BTB lock enable */ +#define PSL_UBLE 0x00000400UL /* BTB lock enable - e500 only */ +#define PSL_DWE 0x00000400UL /* Debug Wait Enable - 440 only*/ #define PSL_DE 0x00000200UL /* Debug interrupt enable */ -#define PSL_FE1 0x00000100UL /* Floating point exception mode 1 */ #define PSL_IS 0x00000020UL /* Instruction address space */ #define PSL_DS 0x00000010UL /* Data address space */ -#define PSL_PMM 0x00000004UL /* Performance monitor mark */ - -#define PSL_FE_DFLT 0x00000000UL /* default == none */ - -/* Initial kernel MSR, use IS=1 ad DS=1. */ -#define PSL_KERNSET_INIT (PSL_IS | PSL_DS) -#define PSL_KERNSET (PSL_CE | PSL_ME | PSL_EE) -#define PSL_USERSET (PSL_KERNSET | PSL_PR) - -#elif defined(BOOKE_PPC4XX) -/* - * Machine State Register (MSR) - PPC4xx core - */ -#define PSL_WE (0x80000000 >> 13) /* Wait State Enable */ -#define PSL_CE (0x80000000 >> 14) /* Critical Interrupt Enable */ -#define PSL_EE (0x80000000 >> 16) /* External Interrupt Enable */ -#define PSL_PR (0x80000000 >> 17) /* Problem State */ -#define PSL_FP (0x80000000 >> 18) /* Floating Point Available */ -#define PSL_ME (0x80000000 >> 19) /* Machine Check Enable */ -#define PSL_FE0 (0x80000000 >> 20) /* Floating-point exception mode 0 */ -#define PSL_DWE (0x80000000 >> 21) /* Debug Wait Enable */ -#define PSL_DE (0x80000000 >> 22) /* Debug interrupt Enable */ -#define PSL_FE1 (0x80000000 >> 23) /* Floating-point exception mode 1 */ -#define PSL_IS (0x80000000 >> 26) /* Instruction Address Space */ -#define PSL_DS (0x80000000 >> 27) /* Data Address Space */ - -#define PSL_KERNSET (PSL_CE | PSL_ME | PSL_EE | PSL_FP) -#define PSL_USERSET (PSL_KERNSET | PSL_PR) - -#define PSL_FE_DFLT 0x00000000UL /* default == none */ - -#else /* if defined(BOOKE_*) */ -/* - * Machine State Register (MSR) - * - * The PowerPC 601 does not implement the following bits: - * - * VEC, POW, ILE, BE, RI, LE[*] - * - * [*] Little-endian mode on the 601 is implemented in the HID0 register. - */ +/* Machine State Register (MSR) - AIM cores */ #ifdef __powerpc64__ #define PSL_SF 0x8000000000000000UL /* 64-bit addressing */ #define PSL_HV 0x1000000000000000UL /* hyper-privileged mode */ #endif -#define PSL_VEC 0x02000000UL /* AltiVec vector unit available */ #define PSL_POW 0x00040000UL /* power management */ #define PSL_ILE 0x00010000UL /* interrupt endian mode (1 == le) */ -#define PSL_EE 0x00008000UL /* external interrupt enable */ -#define PSL_PR 0x00004000UL /* privilege mode (1 == user) */ -#define PSL_FP 0x00002000UL /* floating point enable */ -#define PSL_ME 0x00001000UL /* machine check enable */ -#define PSL_FE0 0x00000800UL /* floating point interrupt mode 0 */ #define PSL_SE 0x00000400UL /* single-step trace enable */ -#define PSL_BE 0x00000200UL /* branch trace enable */ -#define PSL_FE1 0x00000100UL /* floating point interrupt mode 1 */ -#define PSL_IP 0x00000040UL /* interrupt prefix */ +#define PSL_IP 0x00000040UL /* interrupt prefix - 601 only */ #define PSL_IR 0x00000020UL /* instruction address relocation */ #define PSL_DR 0x00000010UL /* data address relocation */ -#define PSL_PMM 0x00000004UL /* performance monitor mark */ #define PSL_RI 0x00000002UL /* recoverable interrupt */ #define PSL_LE 0x00000001UL /* endian mode (1 == le) */ -#define PSL_601_MASK ~(PSL_POW|PSL_ILE|PSL_BE|PSL_RI|PSL_LE) - /* * Floating-point exception modes: */ @@ -134,20 +82,21 @@ #define PSL_FE_PREC (PSL_FE0 | PSL_FE1) /* precise */ #define PSL_FE_DFLT PSL_FE_DIS /* default == none */ -/* - * Note that PSL_POW and PSL_ILE are not in the saved copy of the MSR - */ -#define PSL_MBO 0 -#define PSL_MBZ 0 - +#if defined(BOOKE_E500) +/* Initial kernel MSR, use IS=1 ad DS=1. */ +#define PSL_KERNSET_INIT (PSL_IS | PSL_DS) +#define PSL_KERNSET (PSL_CE | PSL_ME | PSL_EE) +#elif defined(BOOKE_PPC4XX) +#define PSL_KERNSET (PSL_CE | PSL_ME | PSL_EE | PSL_FP) +#elif defined(AIM) #ifdef __powerpc64__ #define PSL_KERNSET (PSL_SF | PSL_EE | PSL_ME | PSL_IR | PSL_DR | PSL_RI) #else #define PSL_KERNSET (PSL_EE | PSL_ME | PSL_IR | PSL_DR | PSL_RI) #endif -#define PSL_USERSET (PSL_KERNSET | PSL_PR) +#endif -#define PSL_USERSTATIC (PSL_USERSET | PSL_IP | 0x87c0008c) +#define PSL_USERSET (PSL_KERNSET | PSL_PR) +#define PSL_USERSTATIC ~(PSL_VEC | PSL_FP | PSL_FE0 | PSL_FE1) -#endif /* if defined(BOOKE_E500) */ #endif /* _MACHINE_PSL_H_ */ Copied: stable/10/sys/powerpc/mpc85xx/pci_mpc85xx.c (from r257117, head/sys/powerpc/mpc85xx/pci_mpc85xx.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/powerpc/mpc85xx/pci_mpc85xx.c Tue May 13 18:24:02 2014 (r265972, copy of r257117, head/sys/powerpc/mpc85xx/pci_mpc85xx.c) @@ -0,0 +1,827 @@ +/*- + * Copyright 2006-2007 by Juniper Networks. + * Copyright 2008 Semihalf. + * Copyright 2010 The FreeBSD Foundation + * All rights reserved. + * + * Portions of this software were developed by Semihalf + * under sponsorship from the FreeBSD Foundation. + * + * 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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. + * + * From: FreeBSD: src/sys/powerpc/mpc85xx/pci_ocp.c,v 1.9 2010/03/23 23:46:28 marcel + */ + +#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 "ofw_bus_if.h" +#include "pcib_if.h" + +#include +#include +#include + +#include + +#define REG_CFG_ADDR 0x0000 +#define CONFIG_ACCESS_ENABLE 0x80000000 + +#define REG_CFG_DATA 0x0004 +#define REG_INT_ACK 0x0008 + +#define REG_POTAR(n) (0x0c00 + 0x20 * (n)) +#define REG_POTEAR(n) (0x0c04 + 0x20 * (n)) +#define REG_POWBAR(n) (0x0c08 + 0x20 * (n)) +#define REG_POWAR(n) (0x0c10 + 0x20 * (n)) + +#define REG_PITAR(n) (0x0e00 - 0x20 * (n)) +#define REG_PIWBAR(n) (0x0e08 - 0x20 * (n)) +#define REG_PIWBEAR(n) (0x0e0c - 0x20 * (n)) +#define REG_PIWAR(n) (0x0e10 - 0x20 * (n)) + +#define REG_PEX_MES_DR 0x0020 +#define REG_PEX_MES_IER 0x0028 +#define REG_PEX_ERR_DR 0x0e00 +#define REG_PEX_ERR_EN 0x0e08 + +#define PCIR_LTSSM 0x404 +#define LTSSM_STAT_L0 0x16 + +#define DEVFN(b, s, f) ((b << 16) | (s << 8) | f) + +struct fsl_pcib_softc { + struct ofw_pci_softc pci_sc; + device_t sc_dev; + + int sc_iomem_target; + bus_addr_t sc_iomem_alloc, sc_iomem_start, sc_iomem_end; + int sc_ioport_target; + bus_addr_t sc_ioport_alloc, sc_ioport_start, sc_ioport_end; + + struct resource *sc_res; + bus_space_handle_t sc_bsh; + bus_space_tag_t sc_bst; + int sc_rid; + + int sc_busnr; + int sc_pcie; + uint8_t sc_pcie_capreg; /* PCI-E Capability Reg Set */ + + /* Devices that need special attention. */ + int sc_devfn_tundra; + int sc_devfn_via_ide; +}; + +/* Local forward declerations. */ +static uint32_t fsl_pcib_cfgread(struct fsl_pcib_softc *, u_int, u_int, u_int, + u_int, int); +static void fsl_pcib_cfgwrite(struct fsl_pcib_softc *, u_int, u_int, u_int, + u_int, uint32_t, int); +static int fsl_pcib_decode_win(phandle_t, struct fsl_pcib_softc *); +static void fsl_pcib_err_init(device_t); +static void fsl_pcib_inbound(struct fsl_pcib_softc *, int, int, u_long, + u_long, u_long); +static int fsl_pcib_init(struct fsl_pcib_softc *, int, int); +static void fsl_pcib_outbound(struct fsl_pcib_softc *, int, int, u_long, + u_long, u_long); + +/* Forward declerations. */ +static int fsl_pcib_attach(device_t); +static int fsl_pcib_detach(device_t); +static int fsl_pcib_probe(device_t); + +static int fsl_pcib_maxslots(device_t); +static uint32_t fsl_pcib_read_config(device_t, u_int, u_int, u_int, u_int, int); +static void fsl_pcib_write_config(device_t, u_int, u_int, u_int, u_int, + uint32_t, int); + +/* Configuration r/w mutex. */ +struct mtx pcicfg_mtx; +static int mtx_initialized = 0; + +/* + * Bus interface definitions. + */ +static device_method_t fsl_pcib_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, fsl_pcib_probe), + DEVMETHOD(device_attach, fsl_pcib_attach), + DEVMETHOD(device_detach, fsl_pcib_detach), + + /* pcib interface */ + DEVMETHOD(pcib_maxslots, fsl_pcib_maxslots), + DEVMETHOD(pcib_read_config, fsl_pcib_read_config), + DEVMETHOD(pcib_write_config, fsl_pcib_write_config), + + DEVMETHOD_END +}; + +static devclass_t fsl_pcib_devclass; + +DEFINE_CLASS_1(pcib, fsl_pcib_driver, fsl_pcib_methods, + sizeof(struct fsl_pcib_softc), ofw_pci_driver); +DRIVER_MODULE(pcib, fdtbus, fsl_pcib_driver, fsl_pcib_devclass, 0, 0); + +static int +fsl_pcib_probe(device_t dev) +{ + + if (ofw_bus_get_type(dev) == NULL || + strcmp(ofw_bus_get_type(dev), "pci") != 0) + return (ENXIO); + + if (!(ofw_bus_is_compatible(dev, "fsl,mpc8540-pci") || + ofw_bus_is_compatible(dev, "fsl,mpc8548-pcie"))) + return (ENXIO); + + device_set_desc(dev, "Freescale Integrated PCI/PCI-E Controller"); + return (BUS_PROBE_DEFAULT); +} + +static int +fsl_pcib_attach(device_t dev) +{ + struct fsl_pcib_softc *sc; + phandle_t node; + uint32_t cfgreg; + int maxslot, error; + uint8_t ltssm, capptr; + + sc = device_get_softc(dev); + sc->sc_dev = dev; + + sc->sc_rid = 0; + sc->sc_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->sc_rid, + RF_ACTIVE); + if (sc->sc_res == NULL) { + device_printf(dev, "could not map I/O memory\n"); + return (ENXIO); + } + sc->sc_bst = rman_get_bustag(sc->sc_res); + sc->sc_bsh = rman_get_bushandle(sc->sc_res); + sc->sc_busnr = 0; + + if (!mtx_initialized) { + mtx_init(&pcicfg_mtx, "pcicfg", NULL, MTX_SPIN); + mtx_initialized = 1; + } + + cfgreg = fsl_pcib_cfgread(sc, 0, 0, 0, PCIR_VENDOR, 2); + if (cfgreg != 0x1057 && cfgreg != 0x1957) + goto err; + + capptr = fsl_pcib_cfgread(sc, 0, 0, 0, PCIR_CAP_PTR, 1); + while (capptr != 0) { + cfgreg = fsl_pcib_cfgread(sc, 0, 0, 0, capptr, 2); + switch (cfgreg & 0xff) { + case PCIY_PCIX: + break; + case PCIY_EXPRESS: + sc->sc_pcie = 1; + sc->sc_pcie_capreg = capptr; + break; + } + capptr = (cfgreg >> 8) & 0xff; + } + + node = ofw_bus_get_node(dev); + + /* + * Initialize generic OF PCI interface (ranges, etc.) + */ + + error = ofw_pci_init(dev); + if (error) + return (error); + + /* + * Configure decode windows for PCI(E) access. + */ + if (fsl_pcib_decode_win(node, sc) != 0) + goto err; + + cfgreg = fsl_pcib_cfgread(sc, 0, 0, 0, PCIR_COMMAND, 2); + cfgreg |= PCIM_CMD_SERRESPEN | PCIM_CMD_BUSMASTEREN | PCIM_CMD_MEMEN | + PCIM_CMD_PORTEN; + fsl_pcib_cfgwrite(sc, 0, 0, 0, PCIR_COMMAND, cfgreg, 2); + + sc->sc_devfn_tundra = -1; + sc->sc_devfn_via_ide = -1; + + + /* + * Scan bus using firmware configured, 0 based bus numbering. + */ + sc->sc_busnr = 0; + maxslot = (sc->sc_pcie) ? 0 : PCI_SLOTMAX; + fsl_pcib_init(sc, sc->sc_busnr, maxslot); + + if (sc->sc_pcie) { + ltssm = fsl_pcib_cfgread(sc, 0, 0, 0, PCIR_LTSSM, 1); + if (ltssm < LTSSM_STAT_L0) { + if (bootverbose) + printf("PCI %d: no PCIE link, skipping\n", + device_get_unit(dev)); + return (0); + } + } + + fsl_pcib_err_init(dev); + + return (ofw_pci_attach(dev)); + +err: + return (ENXIO); +} + +static uint32_t +fsl_pcib_cfgread(struct fsl_pcib_softc *sc, u_int bus, u_int slot, u_int func, + u_int reg, int bytes) +{ + uint32_t addr, data; + + if (bus == sc->sc_busnr - 1) + bus = 0; + + addr = CONFIG_ACCESS_ENABLE; + addr |= (bus & 0xff) << 16; + addr |= (slot & 0x1f) << 11; + addr |= (func & 0x7) << 8; + addr |= reg & 0xfc; + if (sc->sc_pcie) + addr |= (reg & 0xf00) << 16; + + mtx_lock_spin(&pcicfg_mtx); + bus_space_write_4(sc->sc_bst, sc->sc_bsh, REG_CFG_ADDR, addr); + + switch (bytes) { + case 1: + data = bus_space_read_1(sc->sc_bst, sc->sc_bsh, + REG_CFG_DATA + (reg & 3)); + break; + case 2: + data = le16toh(bus_space_read_2(sc->sc_bst, sc->sc_bsh, + REG_CFG_DATA + (reg & 2))); + break; + case 4: + data = le32toh(bus_space_read_4(sc->sc_bst, sc->sc_bsh, + REG_CFG_DATA)); + break; + default: + data = ~0; + break; + } + mtx_unlock_spin(&pcicfg_mtx); + return (data); +} + +static void +fsl_pcib_cfgwrite(struct fsl_pcib_softc *sc, u_int bus, u_int slot, u_int func, + u_int reg, uint32_t data, int bytes) +{ + uint32_t addr; + + if (bus == sc->sc_busnr - 1) + bus = 0; + + addr = CONFIG_ACCESS_ENABLE; + addr |= (bus & 0xff) << 16; + addr |= (slot & 0x1f) << 11; + addr |= (func & 0x7) << 8; + addr |= reg & 0xfc; + if (sc->sc_pcie) + addr |= (reg & 0xf00) << 16; + + mtx_lock_spin(&pcicfg_mtx); + bus_space_write_4(sc->sc_bst, sc->sc_bsh, REG_CFG_ADDR, addr); + + switch (bytes) { + case 1: + bus_space_write_1(sc->sc_bst, sc->sc_bsh, + REG_CFG_DATA + (reg & 3), data); + break; + case 2: + bus_space_write_2(sc->sc_bst, sc->sc_bsh, + REG_CFG_DATA + (reg & 2), htole16(data)); + break; + case 4: + bus_space_write_4(sc->sc_bst, sc->sc_bsh, + REG_CFG_DATA, htole32(data)); + break; + } + mtx_unlock_spin(&pcicfg_mtx); +} + +#if 0 +static void +dump(struct fsl_pcib_softc *sc) +{ + unsigned int i; + +#define RD(o) bus_space_read_4(sc->sc_bst, sc->sc_bsh, o) + for (i = 0; i < 5; i++) { + printf("POTAR%u =0x%08x\n", i, RD(REG_POTAR(i))); + printf("POTEAR%u =0x%08x\n", i, RD(REG_POTEAR(i))); + printf("POWBAR%u =0x%08x\n", i, RD(REG_POWBAR(i))); + printf("POWAR%u =0x%08x\n", i, RD(REG_POWAR(i))); + } + printf("\n"); + for (i = 1; i < 4; i++) { + printf("PITAR%u =0x%08x\n", i, RD(REG_PITAR(i))); + printf("PIWBAR%u =0x%08x\n", i, RD(REG_PIWBAR(i))); + printf("PIWBEAR%u=0x%08x\n", i, RD(REG_PIWBEAR(i))); + printf("PIWAR%u =0x%08x\n", i, RD(REG_PIWAR(i))); + } + printf("\n"); +#undef RD + + for (i = 0; i < 0x48; i += 4) { + printf("cfg%02x=0x%08x\n", i, fsl_pcib_cfgread(sc, 0, 0, 0, + i, 4)); + } +} +#endif + +static int +fsl_pcib_maxslots(device_t dev) +{ + struct fsl_pcib_softc *sc = device_get_softc(dev); + + return ((sc->sc_pcie) ? 0 : PCI_SLOTMAX); +} + +static uint32_t +fsl_pcib_read_config(device_t dev, u_int bus, u_int slot, u_int func, + u_int reg, int bytes) +{ + struct fsl_pcib_softc *sc = device_get_softc(dev); + u_int devfn; + + if (bus == sc->sc_busnr && !sc->sc_pcie && slot < 10) + return (~0); + devfn = DEVFN(bus, slot, func); + if (devfn == sc->sc_devfn_tundra) + return (~0); + if (devfn == sc->sc_devfn_via_ide && reg == PCIR_INTPIN) + return (1); + return (fsl_pcib_cfgread(sc, bus, slot, func, reg, bytes)); +} + +static void +fsl_pcib_write_config(device_t dev, u_int bus, u_int slot, u_int func, + u_int reg, uint32_t val, int bytes) +{ + struct fsl_pcib_softc *sc = device_get_softc(dev); + + if (bus == sc->sc_busnr && !sc->sc_pcie && slot < 10) + return; + fsl_pcib_cfgwrite(sc, bus, slot, func, reg, val, bytes); +} + +static void +fsl_pcib_init_via(struct fsl_pcib_softc *sc, uint16_t device, int bus, + int slot, int fn) +{ + + if (device == 0x0686) { + fsl_pcib_write_config(sc->sc_dev, bus, slot, fn, 0x52, 0x34, 1); + fsl_pcib_write_config(sc->sc_dev, bus, slot, fn, 0x77, 0x00, 1); + fsl_pcib_write_config(sc->sc_dev, bus, slot, fn, 0x83, 0x98, 1); + fsl_pcib_write_config(sc->sc_dev, bus, slot, fn, 0x85, 0x03, 1); + } else if (device == 0x0571) { + sc->sc_devfn_via_ide = DEVFN(bus, slot, fn); + fsl_pcib_write_config(sc->sc_dev, bus, slot, fn, 0x40, 0x0b, 1); + } +} + +static int +fsl_pcib_init_bar(struct fsl_pcib_softc *sc, int bus, int slot, int func, + int barno) +{ + bus_addr_t *allocp; + uint32_t addr, mask, size; + int reg, width; + + reg = PCIR_BAR(barno); + + if (DEVFN(bus, slot, func) == sc->sc_devfn_via_ide) { + switch (barno) { + case 0: addr = 0x1f0; break; + case 1: addr = 0x3f4; break; + case 2: addr = 0x170; break; + case 3: addr = 0x374; break; + case 4: addr = 0xcc0; break; + default: return (1); + } + fsl_pcib_write_config(sc->sc_dev, bus, slot, func, reg, addr, 4); + return (1); + } + + fsl_pcib_write_config(sc->sc_dev, bus, slot, func, reg, ~0, 4); + size = fsl_pcib_read_config(sc->sc_dev, bus, slot, func, reg, 4); + if (size == 0) + return (1); + width = ((size & 7) == 4) ? 2 : 1; + + if (size & 1) { /* I/O port */ + allocp = &sc->sc_ioport_alloc; + size &= ~3; + if ((size & 0xffff0000) == 0) + size |= 0xffff0000; + } else { /* memory */ + allocp = &sc->sc_iomem_alloc; + size &= ~15; + } + mask = ~size; + size = mask + 1; + /* Sanity check (must be a power of 2). */ + if (size & mask) + return (width); + + addr = (*allocp + mask) & ~mask; + *allocp = addr + size; + + if (bootverbose) + printf("PCI %u:%u:%u:%u: reg %x: size=%08x: addr=%08x\n", + device_get_unit(sc->sc_dev), bus, slot, func, reg, + size, addr); + + fsl_pcib_write_config(sc->sc_dev, bus, slot, func, reg, addr, 4); + if (width == 2) + fsl_pcib_write_config(sc->sc_dev, bus, slot, func, reg + 4, + 0, 4); + return (width); +} + +static int +fsl_pcib_init(struct fsl_pcib_softc *sc, int bus, int maxslot) +{ + int secbus; + int old_pribus, old_secbus, old_subbus; + int new_pribus, new_secbus, new_subbus; + int slot, func, maxfunc; + int bar, maxbar; + uint16_t vendor, device; + uint8_t command, hdrtype, class, subclass; + + secbus = bus; + for (slot = 0; slot <= maxslot; slot++) { + maxfunc = 0; + for (func = 0; func <= maxfunc; func++) { + hdrtype = fsl_pcib_read_config(sc->sc_dev, bus, slot, + func, PCIR_HDRTYPE, 1); + + if ((hdrtype & PCIM_HDRTYPE) > PCI_MAXHDRTYPE) + continue; + + if (func == 0 && (hdrtype & PCIM_MFDEV)) + maxfunc = PCI_FUNCMAX; + + vendor = fsl_pcib_read_config(sc->sc_dev, bus, slot, + func, PCIR_VENDOR, 2); + device = fsl_pcib_read_config(sc->sc_dev, bus, slot, + func, PCIR_DEVICE, 2); + + if (vendor == 0x1957 && device == 0x3fff) { + sc->sc_devfn_tundra = DEVFN(bus, slot, func); + continue; + } + + command = fsl_pcib_read_config(sc->sc_dev, bus, slot, + func, PCIR_COMMAND, 1); + command &= ~(PCIM_CMD_MEMEN | PCIM_CMD_PORTEN); + fsl_pcib_write_config(sc->sc_dev, bus, slot, func, + PCIR_COMMAND, command, 1); + + if (vendor == 0x1106) + fsl_pcib_init_via(sc, device, bus, slot, func); + + /* Program the base address registers. */ + maxbar = (hdrtype & PCIM_HDRTYPE) ? 1 : 6; + bar = 0; + while (bar < maxbar) + bar += fsl_pcib_init_bar(sc, bus, slot, func, + bar); + + /* Put a placeholder interrupt value */ + fsl_pcib_write_config(sc->sc_dev, bus, slot, func, + PCIR_INTLINE, PCI_INVALID_IRQ, 1); + + command |= PCIM_CMD_MEMEN | PCIM_CMD_PORTEN; + fsl_pcib_write_config(sc->sc_dev, bus, slot, func, + PCIR_COMMAND, command, 1); + + /* + * Handle PCI-PCI bridges + */ + class = fsl_pcib_read_config(sc->sc_dev, bus, slot, + func, PCIR_CLASS, 1); + subclass = fsl_pcib_read_config(sc->sc_dev, bus, slot, + func, PCIR_SUBCLASS, 1); + + /* Allow only proper PCI-PCI briges */ + if (class != PCIC_BRIDGE) + continue; + if (subclass != PCIS_BRIDGE_PCI) + continue; + + secbus++; + + /* Program I/O decoder. */ + fsl_pcib_write_config(sc->sc_dev, bus, slot, func, + PCIR_IOBASEL_1, sc->sc_ioport_start >> 8, 1); + fsl_pcib_write_config(sc->sc_dev, bus, slot, func, + PCIR_IOLIMITL_1, sc->sc_ioport_end >> 8, 1); + fsl_pcib_write_config(sc->sc_dev, bus, slot, func, + PCIR_IOBASEH_1, sc->sc_ioport_start >> 16, 2); + fsl_pcib_write_config(sc->sc_dev, bus, slot, func, + PCIR_IOLIMITH_1, sc->sc_ioport_end >> 16, 2); + + /* Program (non-prefetchable) memory decoder. */ + fsl_pcib_write_config(sc->sc_dev, bus, slot, func, + PCIR_MEMBASE_1, sc->sc_iomem_start >> 16, 2); + fsl_pcib_write_config(sc->sc_dev, bus, slot, func, + PCIR_MEMLIMIT_1, sc->sc_iomem_end >> 16, 2); + + /* Program prefetchable memory decoder. */ + fsl_pcib_write_config(sc->sc_dev, bus, slot, func, + PCIR_PMBASEL_1, 0x0010, 2); + fsl_pcib_write_config(sc->sc_dev, bus, slot, func, + PCIR_PMLIMITL_1, 0x000f, 2); + fsl_pcib_write_config(sc->sc_dev, bus, slot, func, + PCIR_PMBASEH_1, 0x00000000, 4); + fsl_pcib_write_config(sc->sc_dev, bus, slot, func, + PCIR_PMLIMITH_1, 0x00000000, 4); + + /* Read currect bus register configuration */ + old_pribus = fsl_pcib_read_config(sc->sc_dev, bus, + slot, func, PCIR_PRIBUS_1, 1); + old_secbus = fsl_pcib_read_config(sc->sc_dev, bus, + slot, func, PCIR_SECBUS_1, 1); + old_subbus = fsl_pcib_read_config(sc->sc_dev, bus, + slot, func, PCIR_SUBBUS_1, 1); + + if (bootverbose) + printf("PCI: reading firmware bus numbers for " + "secbus = %d (bus/sec/sub) = (%d/%d/%d)\n", + secbus, old_pribus, old_secbus, old_subbus); + + new_pribus = bus; + new_secbus = secbus; + + secbus = fsl_pcib_init(sc, secbus, + (subclass == PCIS_BRIDGE_PCI) ? PCI_SLOTMAX : 0); + + new_subbus = secbus; + + if (bootverbose) + printf("PCI: translate firmware bus numbers " + "for secbus %d (%d/%d/%d) -> (%d/%d/%d)\n", + secbus, old_pribus, old_secbus, old_subbus, + new_pribus, new_secbus, new_subbus); + + fsl_pcib_write_config(sc->sc_dev, bus, slot, func, + PCIR_PRIBUS_1, new_pribus, 1); + fsl_pcib_write_config(sc->sc_dev, bus, slot, func, + PCIR_SECBUS_1, new_secbus, 1); + fsl_pcib_write_config(sc->sc_dev, bus, slot, func, + PCIR_SUBBUS_1, new_subbus, 1); + } + } + + return (secbus); +} + +static void +fsl_pcib_inbound(struct fsl_pcib_softc *sc, int wnd, int tgt, u_long start, + u_long size, u_long pci_start) +{ + uint32_t attr, bar, tar; + + KASSERT(wnd > 0, ("%s: inbound window 0 is invalid", __func__)); + + switch (tgt) { + /* XXX OCP85XX_TGTIF_RAM2, OCP85XX_TGTIF_RAM_INTL should be handled */ + case OCP85XX_TGTIF_RAM1: + attr = 0xa0f55000 | (ffsl(size) - 2); + break; + default: + attr = 0; + break; + } + tar = start >> 12; + bar = pci_start >> 12; + + bus_space_write_4(sc->sc_bst, sc->sc_bsh, REG_PITAR(wnd), tar); + bus_space_write_4(sc->sc_bst, sc->sc_bsh, REG_PIWBEAR(wnd), 0); + bus_space_write_4(sc->sc_bst, sc->sc_bsh, REG_PIWBAR(wnd), bar); + bus_space_write_4(sc->sc_bst, sc->sc_bsh, REG_PIWAR(wnd), attr); +} + +static void +fsl_pcib_outbound(struct fsl_pcib_softc *sc, int wnd, int res, u_long start, + u_long size, u_long pci_start) +{ + uint32_t attr, bar, tar; + + switch (res) { + case SYS_RES_MEMORY: + attr = 0x80044000 | (ffsl(size) - 2); + break; + case SYS_RES_IOPORT: + attr = 0x80088000 | (ffsl(size) - 2); + break; + default: + attr = 0x0004401f; + break; + } + bar = start >> 12; + tar = pci_start >> 12; + + bus_space_write_4(sc->sc_bst, sc->sc_bsh, REG_POTAR(wnd), tar); + bus_space_write_4(sc->sc_bst, sc->sc_bsh, REG_POTEAR(wnd), 0); + bus_space_write_4(sc->sc_bst, sc->sc_bsh, REG_POWBAR(wnd), bar); + bus_space_write_4(sc->sc_bst, sc->sc_bsh, REG_POWAR(wnd), attr); +} + + +static void +fsl_pcib_err_init(device_t dev) +{ + struct fsl_pcib_softc *sc; + uint16_t sec_stat, dsr; + uint32_t dcr, err_en; + + sc = device_get_softc(dev); + + sec_stat = fsl_pcib_cfgread(sc, 0, 0, 0, PCIR_SECSTAT_1, 2); + if (sec_stat) + fsl_pcib_cfgwrite(sc, 0, 0, 0, PCIR_SECSTAT_1, 0xffff, 2); + if (sc->sc_pcie) { + /* Clear error bits */ + bus_space_write_4(sc->sc_bst, sc->sc_bsh, REG_PEX_MES_IER, + 0xffffffff); + bus_space_write_4(sc->sc_bst, sc->sc_bsh, REG_PEX_MES_DR, + 0xffffffff); + bus_space_write_4(sc->sc_bst, sc->sc_bsh, REG_PEX_ERR_DR, + 0xffffffff); + + dsr = fsl_pcib_cfgread(sc, 0, 0, 0, + sc->sc_pcie_capreg + PCIER_DEVICE_STA, 2); + if (dsr) + fsl_pcib_cfgwrite(sc, 0, 0, 0, + sc->sc_pcie_capreg + PCIER_DEVICE_STA, + 0xffff, 2); + + /* Enable all errors reporting */ + err_en = 0x00bfff00; + bus_space_write_4(sc->sc_bst, sc->sc_bsh, REG_PEX_ERR_EN, + err_en); + + /* Enable error reporting: URR, FER, NFER */ + dcr = fsl_pcib_cfgread(sc, 0, 0, 0, + sc->sc_pcie_capreg + PCIER_DEVICE_CTL, 4); + dcr |= PCIEM_CTL_URR_ENABLE | PCIEM_CTL_FER_ENABLE | + PCIEM_CTL_NFER_ENABLE; + fsl_pcib_cfgwrite(sc, 0, 0, 0, + sc->sc_pcie_capreg + PCIER_DEVICE_CTL, dcr, 4); + } +} + +static int +fsl_pcib_detach(device_t dev) +{ + + if (mtx_initialized) { + mtx_destroy(&pcicfg_mtx); + mtx_initialized = 0; + } + return (bus_generic_detach(dev)); +} + +static int +fsl_pcib_decode_win(phandle_t node, struct fsl_pcib_softc *sc) +{ + device_t dev; + int error, i, trgt; + + dev = sc->sc_dev; + + fsl_pcib_outbound(sc, 0, -1, 0, 0, 0); + + /* + * Configure LAW decode windows. + */ + error = law_pci_target(sc->sc_res, &sc->sc_iomem_target, + &sc->sc_ioport_target); + if (error != 0) { + device_printf(dev, "could not retrieve PCI LAW target info\n"); + return (error); + } + + for (i = 0; i < sc->pci_sc.sc_nrange; i++) { + switch (sc->pci_sc.sc_range[i].pci_hi & + OFW_PCI_PHYS_HI_SPACEMASK) { + case OFW_PCI_PHYS_HI_SPACE_CONFIG: + continue; + case OFW_PCI_PHYS_HI_SPACE_IO: + trgt = sc->sc_ioport_target; + fsl_pcib_outbound(sc, 2, SYS_RES_IOPORT, + sc->pci_sc.sc_range[i].host, + sc->pci_sc.sc_range[i].size, + sc->pci_sc.sc_range[i].pci); + sc->sc_ioport_start = sc->pci_sc.sc_range[i].host; + sc->sc_ioport_end = sc->pci_sc.sc_range[i].host + + sc->pci_sc.sc_range[i].size; + sc->sc_ioport_alloc = 0x1000 + sc->pci_sc.sc_range[i].pci; + break; + case OFW_PCI_PHYS_HI_SPACE_MEM32: + case OFW_PCI_PHYS_HI_SPACE_MEM64: + trgt = sc->sc_iomem_target; + fsl_pcib_outbound(sc, 1, SYS_RES_MEMORY, + sc->pci_sc.sc_range[i].host, + sc->pci_sc.sc_range[i].size, + sc->pci_sc.sc_range[i].pci); + sc->sc_iomem_start = sc->pci_sc.sc_range[i].host; + sc->sc_iomem_end = sc->pci_sc.sc_range[i].host + + sc->pci_sc.sc_range[i].size; + sc->sc_iomem_alloc = sc->pci_sc.sc_range[i].pci; + break; + default: + panic("Unknown range type %#x\n", + sc->pci_sc.sc_range[i].pci_hi & + OFW_PCI_PHYS_HI_SPACEMASK); + } + error = law_enable(trgt, sc->pci_sc.sc_range[i].host, + sc->pci_sc.sc_range[i].size); + if (error != 0) { + device_printf(dev, "could not program LAW for range " + "%d\n", i); + return (error); + } + } + + /* + * Set outbout and inbound windows. + */ + fsl_pcib_outbound(sc, 3, -1, 0, 0, 0); + fsl_pcib_outbound(sc, 4, -1, 0, 0, 0); + + fsl_pcib_inbound(sc, 1, -1, 0, 0, 0); + fsl_pcib_inbound(sc, 2, -1, 0, 0, 0); + fsl_pcib_inbound(sc, 3, OCP85XX_TGTIF_RAM1, 0, + 2U * 1024U * 1024U * 1024U, 0); + + return (0); +} + Modified: stable/10/sys/powerpc/powerpc/exec_machdep.c ============================================================================== --- stable/10/sys/powerpc/powerpc/exec_machdep.c Tue May 13 18:14:31 2014 (r265971) +++ stable/10/sys/powerpc/powerpc/exec_machdep.c Tue May 13 18:24:02 2014 (r265972) @@ -449,14 +449,12 @@ set_mcontext(struct thread *td, const mc if (mcp->mc_vers != _MC_VERSION || mcp->mc_len != sizeof(*mcp)) return (EINVAL); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Tue May 13 19:09:01 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC0D99B6; Tue, 13 May 2014 19:09:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD2DD2597; Tue, 13 May 2014 19:09:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4DJ90SN040530; Tue, 13 May 2014 19:09:00 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4DJ90Cc040529; Tue, 13 May 2014 19:09:00 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405131909.s4DJ90Cc040529@svn.freebsd.org> From: Ian Lepore Date: Tue, 13 May 2014 19:09:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265973 - stable/10/sys/dev/uart X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 19:09:01 -0000 Author: ian Date: Tue May 13 19:09:00 2014 New Revision: 265973 URL: http://svnweb.freebsd.org/changeset/base/265973 Log: MFC r257111, r257144, r257157, r257183 Test UARTs physical address instead of virtual. Be a bit more flexible in how we find the console from the properties on /chosen, following the list of allowed console properties in ePAPR. Also do not require that stdin be defined and equal to stdout: stdin is nonstandard (for ePAPR) and console in an unexpected place is after all better than no console. Modified: stable/10/sys/dev/uart/uart_cpu_fdt.c Modified: stable/10/sys/dev/uart/uart_cpu_fdt.c ============================================================================== --- stable/10/sys/dev/uart/uart_cpu_fdt.c Tue May 13 18:24:02 2014 (r265972) +++ stable/10/sys/dev/uart/uart_cpu_fdt.c Tue May 13 19:09:00 2014 (r265973) @@ -36,6 +36,10 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include + +#include +#include #include #include @@ -88,13 +92,34 @@ int uart_cpu_eqres(struct uart_bas *b1, struct uart_bas *b2) { - return ((b1->bsh == b2->bsh && b1->bst == b2->bst) ? 1 : 0); + if (b1->bst != b2->bst) + return (0); + if (pmap_kextract(b1->bsh) == 0) + return (0); + if (pmap_kextract(b2->bsh) == 0) + return (0); + return ((pmap_kextract(b1->bsh) == pmap_kextract(b2->bsh)) ? 1 : 0); +} + +static int +phandle_chosen_propdev(phandle_t chosen, const char *name, phandle_t *node) +{ + char buf[64]; + + if (OF_getprop(chosen, name, buf, sizeof(buf)) <= 0) + return (ENXIO); + if ((*node = OF_finddevice(buf)) == -1) + return (ENXIO); + + return (0); } int uart_cpu_getdev(int devtype, struct uart_devinfo *di) { - char buf[64]; + const char *propnames[] = {"stdout-path", "linux,stdout-path", "stdout", + "stdin-path", "stdin", NULL}; + const char **name; const struct ofw_compat_data *cd; struct uart_class *class; phandle_t node, chosen; @@ -105,7 +130,7 @@ uart_cpu_getdev(int devtype, struct uart uart_bus_space_mem = fdtbus_bs_tag; uart_bus_space_io = NULL; - /* Allow overriding the FDT uning the environment. */ + /* Allow overriding the FDT using the environment. */ class = &uart_ns8250_class; err = uart_getenv(devtype, di, class); if (!err) @@ -119,14 +144,11 @@ uart_cpu_getdev(int devtype, struct uart */ if ((chosen = OF_finddevice("/chosen")) == -1) return (ENXIO); - if (OF_getprop(chosen, "stdin", buf, sizeof(buf)) <= 0) - return (ENXIO); - if ((node = OF_finddevice(buf)) == -1) - return (ENXIO); - if (OF_getprop(chosen, "stdout", buf, sizeof(buf)) <= 0) - return (ENXIO); - if (OF_finddevice(buf) != node) - /* Only stdin == stdout is supported. */ + for (name = propnames; *name != NULL; name++) { + if (phandle_chosen_propdev(chosen, *name, &node) == 0) + break; + } + if (*name == NULL) return (ENXIO); /* * Retrieve serial attributes. From owner-svn-src-stable@FreeBSD.ORG Tue May 13 19:12:55 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1AB52B64; Tue, 13 May 2014 19:12:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF8CF262B; Tue, 13 May 2014 19:12:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4DJCsEj044238; Tue, 13 May 2014 19:12:54 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4DJCsk8044233; Tue, 13 May 2014 19:12:54 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405131912.s4DJCsk8044233@svn.freebsd.org> From: Ian Lepore Date: Tue, 13 May 2014 19:12:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265974 - in stable/10/sys/powerpc: aim include pseries X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 19:12:55 -0000 Author: ian Date: Tue May 13 19:12:53 2014 New Revision: 265974 URL: http://svnweb.freebsd.org/changeset/base/265974 Log: MFC r257162, r257175 The old trap.h (then trap_aim.h) actually had trap ID codes for Book-E CPUs. Use it universally. Book-E traps may also need revisiting due to the introduction of fixed-offset traps and the deprecation of IVORs in POWER ISA 2.06, but that's very much an issue for another day. Deleted: stable/10/sys/powerpc/include/trap_aim.h stable/10/sys/powerpc/include/trap_booke.h Modified: stable/10/sys/powerpc/aim/mmu_oea.c stable/10/sys/powerpc/aim/mp_cpudep.c stable/10/sys/powerpc/include/trap.h stable/10/sys/powerpc/pseries/platform_chrp.c Modified: stable/10/sys/powerpc/aim/mmu_oea.c ============================================================================== --- stable/10/sys/powerpc/aim/mmu_oea.c Tue May 13 19:09:00 2014 (r265973) +++ stable/10/sys/powerpc/aim/mmu_oea.c Tue May 13 19:12:53 2014 (r265974) @@ -141,7 +141,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include "mmu_if.h" Modified: stable/10/sys/powerpc/aim/mp_cpudep.c ============================================================================== --- stable/10/sys/powerpc/aim/mp_cpudep.c Tue May 13 19:09:00 2014 (r265973) +++ stable/10/sys/powerpc/aim/mp_cpudep.c Tue May 13 19:12:53 2014 (r265974) @@ -43,7 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include Modified: stable/10/sys/powerpc/include/trap.h ============================================================================== --- stable/10/sys/powerpc/include/trap.h Tue May 13 19:09:00 2014 (r265973) +++ stable/10/sys/powerpc/include/trap.h Tue May 13 19:12:53 2014 (r265974) @@ -1,8 +1,128 @@ -/* $FreeBSD$ */ +/*- + * Copyright (C) 1995, 1996 Wolfgang Solfrank. + * Copyright (C) 1995, 1996 TooLs GmbH. + * All rights reserved. + * + * 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. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by TooLs GmbH. + * 4. The name of TooLs GmbH may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``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 TOOLS GMBH 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. + * + * $NetBSD: trap.h,v 1.7 2002/02/22 13:51:40 kleink Exp $ + * $FreeBSD$ + */ -#if defined(AIM) -#include -#elif defined(BOOKE) -#include +#ifndef _POWERPC_TRAP_H_ +#define _POWERPC_TRAP_H_ + +#define EXC_RSVD 0x0000 /* Reserved */ +#define EXC_RST 0x0100 /* Reset; all but IBM4xx */ +#define EXC_MCHK 0x0200 /* Machine Check */ +#define EXC_DSI 0x0300 /* Data Storage Interrupt */ +#define EXC_DSE 0x0380 /* Data Segment Interrupt */ +#define EXC_ISI 0x0400 /* Instruction Storage Interrupt */ +#define EXC_ISE 0x0480 /* Instruction Segment Interrupt */ +#define EXC_EXI 0x0500 /* External Interrupt */ +#define EXC_ALI 0x0600 /* Alignment Interrupt */ +#define EXC_PGM 0x0700 /* Program Interrupt */ +#define EXC_FPU 0x0800 /* Floating-point Unavailable */ +#define EXC_DECR 0x0900 /* Decrementer Interrupt */ +#define EXC_SC 0x0c00 /* System Call */ +#define EXC_TRC 0x0d00 /* Trace */ +#define EXC_FPA 0x0e00 /* Floating-point Assist */ + +/* The following is only available on the 601: */ +#define EXC_RUNMODETRC 0x2000 /* Run Mode/Trace Exception */ + +/* The following are only available on 970(G5): */ +#define EXC_VECAST_G5 0x1700 /* AltiVec Assist */ + +/* The following are only available on 7400(G4): */ +#define EXC_VEC 0x0f20 /* AltiVec Unavailable */ +#define EXC_VECAST_G4 0x1600 /* AltiVec Assist */ + +/* The following are only available on 604/750/7400: */ +#define EXC_PERF 0x0f00 /* Performance Monitoring */ +#define EXC_BPT 0x1300 /* Instruction Breakpoint */ +#define EXC_SMI 0x1400 /* System Managment Interrupt */ + +/* The following are only available on 750/7400: */ +#define EXC_THRM 0x1700 /* Thermal Management Interrupt */ + +/* And these are only on the 603: */ +#define EXC_IMISS 0x1000 /* Instruction translation miss */ +#define EXC_DLMISS 0x1100 /* Data load translation miss */ +#define EXC_DSMISS 0x1200 /* Data store translation miss */ + +/* The following are available on 4xx and 85xx */ +#define EXC_CRIT 0x0100 /* Critical Input Interrupt */ +#define EXC_PIT 0x1000 /* Programmable Interval Timer */ +#define EXC_FIT 0x1010 /* Fixed Interval Timer */ +#define EXC_WDOG 0x1020 /* Watchdog Timer */ +#define EXC_DTMISS 0x1100 /* Data TLB Miss */ +#define EXC_ITMISS 0x1200 /* Instruction TLB Miss */ +#define EXC_APU 0x1300 /* Auxiliary Processing Unit */ +#define EXC_DEBUG 0x2000 /* Debug trap */ + +#define EXC_LAST 0x2f00 /* Last possible exception vector */ + +#define EXC_AST 0x3000 /* Fake AST vector */ + +/* Trap was in user mode */ +#define EXC_USER 0x10000 + + +/* + * EXC_ALI sets bits in the DSISR and DAR to provide enough + * information to recover from the unaligned access without needing to + * parse the offending instruction. This includes certain bits of the + * opcode, and information about what registers are used. The opcode + * indicator values below come from Appendix F of Book III of "The + * PowerPC Architecture". + */ + +#define EXC_ALI_OPCODE_INDICATOR(dsisr) ((dsisr >> 10) & 0x7f) +#define EXC_ALI_LFD 0x09 +#define EXC_ALI_STFD 0x0b + +/* Macros to extract register information */ +#define EXC_ALI_RST(dsisr) ((dsisr >> 5) & 0x1f) /* source or target */ +#define EXC_ALI_RA(dsisr) (dsisr & 0x1f) + +/* + * SRR1 bits for program exception traps. These identify what caused + * the program exception. See section 6.5.9 of the Power ISA Version + * 2.05. + */ + +#define EXC_PGM_FPENABLED (1UL << 20) +#define EXC_PGM_ILLEGAL (1UL << 19) +#define EXC_PGM_PRIV (1UL << 18) +#define EXC_PGM_TRAP (1UL << 17) + +#ifndef LOCORE +struct trapframe; +void trap(struct trapframe *); #endif +#endif /* _POWERPC_TRAP_H_ */ Modified: stable/10/sys/powerpc/pseries/platform_chrp.c ============================================================================== --- stable/10/sys/powerpc/pseries/platform_chrp.c Tue May 13 19:09:00 2014 (r265973) +++ stable/10/sys/powerpc/pseries/platform_chrp.c Tue May 13 19:12:53 2014 (r265974) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include From owner-svn-src-stable@FreeBSD.ORG Tue May 13 19:35:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5EB83DB; Tue, 13 May 2014 19:35:31 +0000 (UTC) Received: from mail-wg0-x22d.google.com (mail-wg0-x22d.google.com [IPv6:2a00:1450:400c:c00::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5E69327CE; Tue, 13 May 2014 19:35:30 +0000 (UTC) Received: by mail-wg0-f45.google.com with SMTP id m15so865811wgh.4 for ; Tue, 13 May 2014 12:35:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=wjtdaeVlxIe9aQgICv+Bcv2h5HICWZcAyUpR7ooDjsE=; b=BFW8D9O9p9phneijnN+rTL0xkCPFRP4KnpGq5Qmnixk5bECQ85KIheHktYhGwBBHlB ZSLBQU8WmpzSdDgiBS2C8/pa/4S/BP7U3czqQx4EqhZ5zfhQb+WxICByL4hoKvri7w4d P+iXocaQiDT3cRMdKNv0uONIc1/+ENU7WI0xEJMUT2jMBYHJQF7on+Fw36NLOcK51SYz K3ii0bTShouHWpQzG2U4Z/td5mBvVjEDtD9pIvUzOyhA6I58d7B1o/SeBVaZ1TVTaY8R JXIJVZSYMw0wNWQnNY6wT1c3kQXycHWKI5b0wReXF9/51W12ftfbBYrAGhICcoU2hypX TekA== MIME-Version: 1.0 X-Received: by 10.180.24.68 with SMTP id s4mr1662219wif.12.1400009728749; Tue, 13 May 2014 12:35:28 -0700 (PDT) Sender: pluknet@gmail.com Received: by 10.216.169.193 with HTTP; Tue, 13 May 2014 12:35:28 -0700 (PDT) In-Reply-To: <201405131909.s4DJ90Cc040529@svn.freebsd.org> References: <201405131909.s4DJ90Cc040529@svn.freebsd.org> Date: Tue, 13 May 2014 23:35:28 +0400 X-Google-Sender-Auth: WLG_5nxsZ-qC_lYcSnKU6KAakXA Message-ID: Subject: Re: svn commit: r265973 - stable/10/sys/dev/uart From: Sergey Kandaurov To: Ian Lepore Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 19:35:31 -0000 On 13 May 2014 23:09, Ian Lepore wrote: > Author: ian > Date: Tue May 13 19:09:00 2014 > New Revision: 265973 > URL: http://svnweb.freebsd.org/changeset/base/265973 > > Log: > MFC r257111, r257144, r257157, r257183 > > Test UARTs physical address instead of virtual. > > Be a bit more flexible in how we find the console from the properties on > /chosen, following the list of allowed console properties in ePAPR. Also > do not require that stdin be defined and equal to stdout: stdin is > nonstandard (for ePAPR) and console in an unexpected place is after all > better than no console. > > Modified: > stable/10/sys/dev/uart/uart_cpu_fdt.c > Taking random commit of your merge series: all of them miss svn:mergeinfo. -- wbr, pluknet From owner-svn-src-stable@FreeBSD.ORG Tue May 13 21:27:19 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E70D4F1; Tue, 13 May 2014 21:27:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 30A612062; Tue, 13 May 2014 21:27:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4DLRJ2m004771; Tue, 13 May 2014 21:27:19 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4DLRI1F004768; Tue, 13 May 2014 21:27:18 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201405132127.s4DLRI1F004768@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 13 May 2014 21:27:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org Subject: svn commit: r265979 - stable/6/share/zoneinfo X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 21:27:19 -0000 Author: edwin Date: Tue May 13 21:27:18 2014 New Revision: 265979 URL: http://svnweb.freebsd.org/changeset/base/265979 Log: MFC of 265978, tzdata2014c - Egypt will go into DST on 15 May 2014 Modified: stable/6/share/zoneinfo/africa stable/6/share/zoneinfo/asia stable/6/share/zoneinfo/europe Directory Properties: stable/6/share/zoneinfo/ (props changed) Modified: stable/6/share/zoneinfo/africa ============================================================================== --- stable/6/share/zoneinfo/africa Tue May 13 21:25:59 2014 (r265978) +++ stable/6/share/zoneinfo/africa Tue May 13 21:27:18 2014 (r265979) @@ -335,11 +335,54 @@ Rule Egypt 2007 only - Sep Thu>=1 23:00s # http://www.worldtimezone.com/dst_news/dst_news_egypt02.html # +# From Ahmad El-Dardiry (2014-05-07): +# Egypt is to change back to Daylight system on May 15 +# http://english.ahram.org.eg/NewsContent/1/64/100735/Egypt/Politics-/Egypts-government-to-reapply-daylight-saving-time-.aspx + +# From Gunther Vermier (2015-05-13): +# our Egypt office confirms that the change will be at 15 May "midnight" (24:00) + +# From Paul Eggert (2014-05-13): +# Sarah El Deeb and Lee Keath of AP report that the Egyptian government says +# the change is because of blackouts in Cairo, even though Ahram Online (cited +# above) says DST had no affect on electricity consumption. The AP story says +# DST will not be observed during Ramadan. There is no information about when +# DST will end. See: +# http://abcnews.go.com/International/wireStory/el-sissi-pushes-egyptians-line-23614833 +# +# For now, guess that later transitions will use 2010's rules, and that +# Egypt will agree with Morocco (see below) about the date Ramadan starts and +# ends, though (unlike Morocco) it will switch at 00:00 standard time. In +# Egypt the spring-forward transitions are removed for 2020-2022, when the +# guessed spring-forward date falls during the estimated Ramadan, and all +# transitions removed for 2023-2038, where the estimated Ramadan falls entirely +# outside the guessed daylight-saving time. Ramadan intrudes on the guessed +# DST starting in 2039, but that's beyond our somewhat-arbitrary cutoff. + Rule Egypt 2008 only - Aug lastThu 23:00s 0 - Rule Egypt 2009 only - Aug 20 23:00s 0 - Rule Egypt 2010 only - Aug 11 0:00 0 - Rule Egypt 2010 only - Sep 10 0:00 1:00 S Rule Egypt 2010 only - Sep lastThu 23:00s 0 - +Rule Egypt 2014 only - May 15 24:00 1:00 S +Rule Egypt 2014 only - Jun 29 0:00s 0 - +Rule Egypt 2014 only - Jul 29 0:00s 1:00 S +Rule Egypt 2014 max - Sep lastThu 23:00s 0 - +Rule Egypt 2015 2019 - Apr lastFri 0:00s 1:00 S +Rule Egypt 2015 only - Jun 18 0:00s 0 - +Rule Egypt 2015 only - Jul 18 0:00s 1:00 S +Rule Egypt 2016 only - Jun 7 0:00s 0 - +Rule Egypt 2016 only - Jul 7 0:00s 1:00 S +Rule Egypt 2017 only - May 27 0:00s 0 - +Rule Egypt 2017 only - Jun 26 0:00s 1:00 S +Rule Egypt 2018 only - May 16 0:00s 0 - +Rule Egypt 2018 only - Jun 15 0:00s 1:00 S +Rule Egypt 2019 only - May 6 0:00s 0 - +Rule Egypt 2019 only - Jun 5 0:00s 1:00 S +Rule Egypt 2020 only - May 24 0:00s 1:00 S +Rule Egypt 2021 only - May 13 0:00s 1:00 S +Rule Egypt 2022 only - May 3 0:00s 1:00 S +Rule Egypt 2023 max - Apr lastFri 0:00s 1:00 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Cairo 2:05:09 - LMT 1900 Oct Modified: stable/6/share/zoneinfo/asia ============================================================================== --- stable/6/share/zoneinfo/asia Tue May 13 21:25:59 2014 (r265978) +++ stable/6/share/zoneinfo/asia Tue May 13 21:27:18 2014 (r265979) @@ -1347,22 +1347,6 @@ Zone Asia/Tokyo 9:18:59 - LMT 1887 Dec 3 # "Jordan will switch to winter time on Friday, October 27". # -# From Phil Pizzey (2009-04-02): -# ...I think I may have spotted an error in the timezone data for -# Jordan. -# The current (2009d) asia file shows Jordan going to daylight -# saving -# time on the last Thursday in March. -# -# Rule Jordan 2000 max - Mar lastThu 0:00s 1:00 S -# -# However timeanddate.com, which I usually find reliable, shows Jordan -# going to daylight saving time on the last Friday in March since 2002. -# Please see -# -# http://www.timeanddate.com/worldclock/timezone.html?n=11 -# - # From Steffen Thorsen (2009-04-02): # This single one might be good enough, (2009-03-24, Arabic): # Modified: stable/6/share/zoneinfo/europe ============================================================================== --- stable/6/share/zoneinfo/europe Tue May 13 21:25:59 2014 (r265978) +++ stable/6/share/zoneinfo/europe Tue May 13 21:27:18 2014 (r265979) @@ -2966,6 +2966,10 @@ Zone Europe/Simferopol 2:16:24 - LMT 188 # From Alexander Krivenyshev (2014-03-17): # time change at 2:00 (2am) on March 30, 2014 # http://vz.ru/news/2014/3/17/677464.html +# From Paul Eggert (2014-03-30): +# Simferopol and Sevastopol reportedly changed their central town clocks +# late the previous day, but this appears to have been ceremonial +# and the discrepancies are small enough to not worry about. 2:00 EU EE%sT 2014 Mar 30 2:00 4:00 - MSK From owner-svn-src-stable@FreeBSD.ORG Tue May 13 21:29:20 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 480ED64C; Tue, 13 May 2014 21:29:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28F6F207E; Tue, 13 May 2014 21:29:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4DLTKUg005072; Tue, 13 May 2014 21:29:20 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4DLTJJv005066; Tue, 13 May 2014 21:29:19 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201405132129.s4DLTJJv005066@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 13 May 2014 21:29:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r265980 - stable/7/share/zoneinfo X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 21:29:20 -0000 Author: edwin Date: Tue May 13 21:29:19 2014 New Revision: 265980 URL: http://svnweb.freebsd.org/changeset/base/265980 Log: MFC of 265978, tzdata2014c - Egypt will go into DST on 15 May 2014. Modified: stable/7/share/zoneinfo/africa stable/7/share/zoneinfo/asia stable/7/share/zoneinfo/europe Directory Properties: stable/7/share/zoneinfo/ (props changed) Modified: stable/7/share/zoneinfo/africa ============================================================================== --- stable/7/share/zoneinfo/africa Tue May 13 21:27:18 2014 (r265979) +++ stable/7/share/zoneinfo/africa Tue May 13 21:29:19 2014 (r265980) @@ -335,11 +335,54 @@ Rule Egypt 2007 only - Sep Thu>=1 23:00s # http://www.worldtimezone.com/dst_news/dst_news_egypt02.html # +# From Ahmad El-Dardiry (2014-05-07): +# Egypt is to change back to Daylight system on May 15 +# http://english.ahram.org.eg/NewsContent/1/64/100735/Egypt/Politics-/Egypts-government-to-reapply-daylight-saving-time-.aspx + +# From Gunther Vermier (2015-05-13): +# our Egypt office confirms that the change will be at 15 May "midnight" (24:00) + +# From Paul Eggert (2014-05-13): +# Sarah El Deeb and Lee Keath of AP report that the Egyptian government says +# the change is because of blackouts in Cairo, even though Ahram Online (cited +# above) says DST had no affect on electricity consumption. The AP story says +# DST will not be observed during Ramadan. There is no information about when +# DST will end. See: +# http://abcnews.go.com/International/wireStory/el-sissi-pushes-egyptians-line-23614833 +# +# For now, guess that later transitions will use 2010's rules, and that +# Egypt will agree with Morocco (see below) about the date Ramadan starts and +# ends, though (unlike Morocco) it will switch at 00:00 standard time. In +# Egypt the spring-forward transitions are removed for 2020-2022, when the +# guessed spring-forward date falls during the estimated Ramadan, and all +# transitions removed for 2023-2038, where the estimated Ramadan falls entirely +# outside the guessed daylight-saving time. Ramadan intrudes on the guessed +# DST starting in 2039, but that's beyond our somewhat-arbitrary cutoff. + Rule Egypt 2008 only - Aug lastThu 23:00s 0 - Rule Egypt 2009 only - Aug 20 23:00s 0 - Rule Egypt 2010 only - Aug 11 0:00 0 - Rule Egypt 2010 only - Sep 10 0:00 1:00 S Rule Egypt 2010 only - Sep lastThu 23:00s 0 - +Rule Egypt 2014 only - May 15 24:00 1:00 S +Rule Egypt 2014 only - Jun 29 0:00s 0 - +Rule Egypt 2014 only - Jul 29 0:00s 1:00 S +Rule Egypt 2014 max - Sep lastThu 23:00s 0 - +Rule Egypt 2015 2019 - Apr lastFri 0:00s 1:00 S +Rule Egypt 2015 only - Jun 18 0:00s 0 - +Rule Egypt 2015 only - Jul 18 0:00s 1:00 S +Rule Egypt 2016 only - Jun 7 0:00s 0 - +Rule Egypt 2016 only - Jul 7 0:00s 1:00 S +Rule Egypt 2017 only - May 27 0:00s 0 - +Rule Egypt 2017 only - Jun 26 0:00s 1:00 S +Rule Egypt 2018 only - May 16 0:00s 0 - +Rule Egypt 2018 only - Jun 15 0:00s 1:00 S +Rule Egypt 2019 only - May 6 0:00s 0 - +Rule Egypt 2019 only - Jun 5 0:00s 1:00 S +Rule Egypt 2020 only - May 24 0:00s 1:00 S +Rule Egypt 2021 only - May 13 0:00s 1:00 S +Rule Egypt 2022 only - May 3 0:00s 1:00 S +Rule Egypt 2023 max - Apr lastFri 0:00s 1:00 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Cairo 2:05:09 - LMT 1900 Oct Modified: stable/7/share/zoneinfo/asia ============================================================================== --- stable/7/share/zoneinfo/asia Tue May 13 21:27:18 2014 (r265979) +++ stable/7/share/zoneinfo/asia Tue May 13 21:29:19 2014 (r265980) @@ -1347,22 +1347,6 @@ Zone Asia/Tokyo 9:18:59 - LMT 1887 Dec 3 # "Jordan will switch to winter time on Friday, October 27". # -# From Phil Pizzey (2009-04-02): -# ...I think I may have spotted an error in the timezone data for -# Jordan. -# The current (2009d) asia file shows Jordan going to daylight -# saving -# time on the last Thursday in March. -# -# Rule Jordan 2000 max - Mar lastThu 0:00s 1:00 S -# -# However timeanddate.com, which I usually find reliable, shows Jordan -# going to daylight saving time on the last Friday in March since 2002. -# Please see -# -# http://www.timeanddate.com/worldclock/timezone.html?n=11 -# - # From Steffen Thorsen (2009-04-02): # This single one might be good enough, (2009-03-24, Arabic): # Modified: stable/7/share/zoneinfo/europe ============================================================================== --- stable/7/share/zoneinfo/europe Tue May 13 21:27:18 2014 (r265979) +++ stable/7/share/zoneinfo/europe Tue May 13 21:29:19 2014 (r265980) @@ -2966,6 +2966,10 @@ Zone Europe/Simferopol 2:16:24 - LMT 188 # From Alexander Krivenyshev (2014-03-17): # time change at 2:00 (2am) on March 30, 2014 # http://vz.ru/news/2014/3/17/677464.html +# From Paul Eggert (2014-03-30): +# Simferopol and Sevastopol reportedly changed their central town clocks +# late the previous day, but this appears to have been ceremonial +# and the discrepancies are small enough to not worry about. 2:00 EU EE%sT 2014 Mar 30 2:00 4:00 - MSK From owner-svn-src-stable@FreeBSD.ORG Tue May 13 21:30:10 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48C3A783; Tue, 13 May 2014 21:30:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29E652089; Tue, 13 May 2014 21:30:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4DLUAEx005325; Tue, 13 May 2014 21:30:10 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4DLU9oX005322; Tue, 13 May 2014 21:30:09 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201405132130.s4DLU9oX005322@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 13 May 2014 21:30:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r265981 - stable/8/share/zoneinfo X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 21:30:10 -0000 Author: edwin Date: Tue May 13 21:30:09 2014 New Revision: 265981 URL: http://svnweb.freebsd.org/changeset/base/265981 Log: MFC of 265978, tzdata2014c - Egypt will go into DST on 15 May 2014. Modified: stable/8/share/zoneinfo/africa stable/8/share/zoneinfo/asia stable/8/share/zoneinfo/europe Directory Properties: stable/8/share/zoneinfo/ (props changed) Modified: stable/8/share/zoneinfo/africa ============================================================================== --- stable/8/share/zoneinfo/africa Tue May 13 21:29:19 2014 (r265980) +++ stable/8/share/zoneinfo/africa Tue May 13 21:30:09 2014 (r265981) @@ -335,11 +335,54 @@ Rule Egypt 2007 only - Sep Thu>=1 23:00s # http://www.worldtimezone.com/dst_news/dst_news_egypt02.html # +# From Ahmad El-Dardiry (2014-05-07): +# Egypt is to change back to Daylight system on May 15 +# http://english.ahram.org.eg/NewsContent/1/64/100735/Egypt/Politics-/Egypts-government-to-reapply-daylight-saving-time-.aspx + +# From Gunther Vermier (2015-05-13): +# our Egypt office confirms that the change will be at 15 May "midnight" (24:00) + +# From Paul Eggert (2014-05-13): +# Sarah El Deeb and Lee Keath of AP report that the Egyptian government says +# the change is because of blackouts in Cairo, even though Ahram Online (cited +# above) says DST had no affect on electricity consumption. The AP story says +# DST will not be observed during Ramadan. There is no information about when +# DST will end. See: +# http://abcnews.go.com/International/wireStory/el-sissi-pushes-egyptians-line-23614833 +# +# For now, guess that later transitions will use 2010's rules, and that +# Egypt will agree with Morocco (see below) about the date Ramadan starts and +# ends, though (unlike Morocco) it will switch at 00:00 standard time. In +# Egypt the spring-forward transitions are removed for 2020-2022, when the +# guessed spring-forward date falls during the estimated Ramadan, and all +# transitions removed for 2023-2038, where the estimated Ramadan falls entirely +# outside the guessed daylight-saving time. Ramadan intrudes on the guessed +# DST starting in 2039, but that's beyond our somewhat-arbitrary cutoff. + Rule Egypt 2008 only - Aug lastThu 23:00s 0 - Rule Egypt 2009 only - Aug 20 23:00s 0 - Rule Egypt 2010 only - Aug 11 0:00 0 - Rule Egypt 2010 only - Sep 10 0:00 1:00 S Rule Egypt 2010 only - Sep lastThu 23:00s 0 - +Rule Egypt 2014 only - May 15 24:00 1:00 S +Rule Egypt 2014 only - Jun 29 0:00s 0 - +Rule Egypt 2014 only - Jul 29 0:00s 1:00 S +Rule Egypt 2014 max - Sep lastThu 23:00s 0 - +Rule Egypt 2015 2019 - Apr lastFri 0:00s 1:00 S +Rule Egypt 2015 only - Jun 18 0:00s 0 - +Rule Egypt 2015 only - Jul 18 0:00s 1:00 S +Rule Egypt 2016 only - Jun 7 0:00s 0 - +Rule Egypt 2016 only - Jul 7 0:00s 1:00 S +Rule Egypt 2017 only - May 27 0:00s 0 - +Rule Egypt 2017 only - Jun 26 0:00s 1:00 S +Rule Egypt 2018 only - May 16 0:00s 0 - +Rule Egypt 2018 only - Jun 15 0:00s 1:00 S +Rule Egypt 2019 only - May 6 0:00s 0 - +Rule Egypt 2019 only - Jun 5 0:00s 1:00 S +Rule Egypt 2020 only - May 24 0:00s 1:00 S +Rule Egypt 2021 only - May 13 0:00s 1:00 S +Rule Egypt 2022 only - May 3 0:00s 1:00 S +Rule Egypt 2023 max - Apr lastFri 0:00s 1:00 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Cairo 2:05:09 - LMT 1900 Oct Modified: stable/8/share/zoneinfo/asia ============================================================================== --- stable/8/share/zoneinfo/asia Tue May 13 21:29:19 2014 (r265980) +++ stable/8/share/zoneinfo/asia Tue May 13 21:30:09 2014 (r265981) @@ -1347,22 +1347,6 @@ Zone Asia/Tokyo 9:18:59 - LMT 1887 Dec 3 # "Jordan will switch to winter time on Friday, October 27". # -# From Phil Pizzey (2009-04-02): -# ...I think I may have spotted an error in the timezone data for -# Jordan. -# The current (2009d) asia file shows Jordan going to daylight -# saving -# time on the last Thursday in March. -# -# Rule Jordan 2000 max - Mar lastThu 0:00s 1:00 S -# -# However timeanddate.com, which I usually find reliable, shows Jordan -# going to daylight saving time on the last Friday in March since 2002. -# Please see -# -# http://www.timeanddate.com/worldclock/timezone.html?n=11 -# - # From Steffen Thorsen (2009-04-02): # This single one might be good enough, (2009-03-24, Arabic): # Modified: stable/8/share/zoneinfo/europe ============================================================================== --- stable/8/share/zoneinfo/europe Tue May 13 21:29:19 2014 (r265980) +++ stable/8/share/zoneinfo/europe Tue May 13 21:30:09 2014 (r265981) @@ -2966,6 +2966,10 @@ Zone Europe/Simferopol 2:16:24 - LMT 188 # From Alexander Krivenyshev (2014-03-17): # time change at 2:00 (2am) on March 30, 2014 # http://vz.ru/news/2014/3/17/677464.html +# From Paul Eggert (2014-03-30): +# Simferopol and Sevastopol reportedly changed their central town clocks +# late the previous day, but this appears to have been ceremonial +# and the discrepancies are small enough to not worry about. 2:00 EU EE%sT 2014 Mar 30 2:00 4:00 - MSK From owner-svn-src-stable@FreeBSD.ORG Tue May 13 21:31:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1BAEB930; Tue, 13 May 2014 21:31:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0FAC20FE; Tue, 13 May 2014 21:31:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4DLVDH3007619; Tue, 13 May 2014 21:31:13 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4DLVDlU007616; Tue, 13 May 2014 21:31:13 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201405132131.s4DLVDlU007616@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 13 May 2014 21:31:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265982 - stable/9/contrib/tzdata X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 21:31:14 -0000 Author: edwin Date: Tue May 13 21:31:13 2014 New Revision: 265982 URL: http://svnweb.freebsd.org/changeset/base/265982 Log: MFC of 265978, tzdata2014c - Egypt will go into DST on 15 May 2014. Modified: stable/9/contrib/tzdata/africa stable/9/contrib/tzdata/asia stable/9/contrib/tzdata/europe Directory Properties: stable/9/contrib/tzdata/ (props changed) Modified: stable/9/contrib/tzdata/africa ============================================================================== --- stable/9/contrib/tzdata/africa Tue May 13 21:30:09 2014 (r265981) +++ stable/9/contrib/tzdata/africa Tue May 13 21:31:13 2014 (r265982) @@ -335,11 +335,54 @@ Rule Egypt 2007 only - Sep Thu>=1 23:00s # http://www.worldtimezone.com/dst_news/dst_news_egypt02.html # +# From Ahmad El-Dardiry (2014-05-07): +# Egypt is to change back to Daylight system on May 15 +# http://english.ahram.org.eg/NewsContent/1/64/100735/Egypt/Politics-/Egypts-government-to-reapply-daylight-saving-time-.aspx + +# From Gunther Vermier (2015-05-13): +# our Egypt office confirms that the change will be at 15 May "midnight" (24:00) + +# From Paul Eggert (2014-05-13): +# Sarah El Deeb and Lee Keath of AP report that the Egyptian government says +# the change is because of blackouts in Cairo, even though Ahram Online (cited +# above) says DST had no affect on electricity consumption. The AP story says +# DST will not be observed during Ramadan. There is no information about when +# DST will end. See: +# http://abcnews.go.com/International/wireStory/el-sissi-pushes-egyptians-line-23614833 +# +# For now, guess that later transitions will use 2010's rules, and that +# Egypt will agree with Morocco (see below) about the date Ramadan starts and +# ends, though (unlike Morocco) it will switch at 00:00 standard time. In +# Egypt the spring-forward transitions are removed for 2020-2022, when the +# guessed spring-forward date falls during the estimated Ramadan, and all +# transitions removed for 2023-2038, where the estimated Ramadan falls entirely +# outside the guessed daylight-saving time. Ramadan intrudes on the guessed +# DST starting in 2039, but that's beyond our somewhat-arbitrary cutoff. + Rule Egypt 2008 only - Aug lastThu 23:00s 0 - Rule Egypt 2009 only - Aug 20 23:00s 0 - Rule Egypt 2010 only - Aug 11 0:00 0 - Rule Egypt 2010 only - Sep 10 0:00 1:00 S Rule Egypt 2010 only - Sep lastThu 23:00s 0 - +Rule Egypt 2014 only - May 15 24:00 1:00 S +Rule Egypt 2014 only - Jun 29 0:00s 0 - +Rule Egypt 2014 only - Jul 29 0:00s 1:00 S +Rule Egypt 2014 max - Sep lastThu 23:00s 0 - +Rule Egypt 2015 2019 - Apr lastFri 0:00s 1:00 S +Rule Egypt 2015 only - Jun 18 0:00s 0 - +Rule Egypt 2015 only - Jul 18 0:00s 1:00 S +Rule Egypt 2016 only - Jun 7 0:00s 0 - +Rule Egypt 2016 only - Jul 7 0:00s 1:00 S +Rule Egypt 2017 only - May 27 0:00s 0 - +Rule Egypt 2017 only - Jun 26 0:00s 1:00 S +Rule Egypt 2018 only - May 16 0:00s 0 - +Rule Egypt 2018 only - Jun 15 0:00s 1:00 S +Rule Egypt 2019 only - May 6 0:00s 0 - +Rule Egypt 2019 only - Jun 5 0:00s 1:00 S +Rule Egypt 2020 only - May 24 0:00s 1:00 S +Rule Egypt 2021 only - May 13 0:00s 1:00 S +Rule Egypt 2022 only - May 3 0:00s 1:00 S +Rule Egypt 2023 max - Apr lastFri 0:00s 1:00 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Cairo 2:05:09 - LMT 1900 Oct Modified: stable/9/contrib/tzdata/asia ============================================================================== --- stable/9/contrib/tzdata/asia Tue May 13 21:30:09 2014 (r265981) +++ stable/9/contrib/tzdata/asia Tue May 13 21:31:13 2014 (r265982) @@ -1347,22 +1347,6 @@ Zone Asia/Tokyo 9:18:59 - LMT 1887 Dec 3 # "Jordan will switch to winter time on Friday, October 27". # -# From Phil Pizzey (2009-04-02): -# ...I think I may have spotted an error in the timezone data for -# Jordan. -# The current (2009d) asia file shows Jordan going to daylight -# saving -# time on the last Thursday in March. -# -# Rule Jordan 2000 max - Mar lastThu 0:00s 1:00 S -# -# However timeanddate.com, which I usually find reliable, shows Jordan -# going to daylight saving time on the last Friday in March since 2002. -# Please see -# -# http://www.timeanddate.com/worldclock/timezone.html?n=11 -# - # From Steffen Thorsen (2009-04-02): # This single one might be good enough, (2009-03-24, Arabic): # Modified: stable/9/contrib/tzdata/europe ============================================================================== --- stable/9/contrib/tzdata/europe Tue May 13 21:30:09 2014 (r265981) +++ stable/9/contrib/tzdata/europe Tue May 13 21:31:13 2014 (r265982) @@ -2966,6 +2966,10 @@ Zone Europe/Simferopol 2:16:24 - LMT 188 # From Alexander Krivenyshev (2014-03-17): # time change at 2:00 (2am) on March 30, 2014 # http://vz.ru/news/2014/3/17/677464.html +# From Paul Eggert (2014-03-30): +# Simferopol and Sevastopol reportedly changed their central town clocks +# late the previous day, but this appears to have been ceremonial +# and the discrepancies are small enough to not worry about. 2:00 EU EE%sT 2014 Mar 30 2:00 4:00 - MSK From owner-svn-src-stable@FreeBSD.ORG Tue May 13 22:35:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C171968; Tue, 13 May 2014 22:35:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D707261C; Tue, 13 May 2014 22:35:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4DMZ7wl036625; Tue, 13 May 2014 22:35:07 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4DMZ6ln036621; Tue, 13 May 2014 22:35:06 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201405132235.s4DMZ6ln036621@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 13 May 2014 22:35:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265983 - stable/10/contrib/tzdata X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 22:35:07 -0000 Author: edwin Date: Tue May 13 22:35:06 2014 New Revision: 265983 URL: http://svnweb.freebsd.org/changeset/base/265983 Log: MFC of tzdata2014c - Egypt will go into DST in 15 May 2014 Modified: stable/10/contrib/tzdata/africa stable/10/contrib/tzdata/asia stable/10/contrib/tzdata/europe Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/tzdata/africa ============================================================================== --- stable/10/contrib/tzdata/africa Tue May 13 21:31:13 2014 (r265982) +++ stable/10/contrib/tzdata/africa Tue May 13 22:35:06 2014 (r265983) @@ -335,11 +335,54 @@ Rule Egypt 2007 only - Sep Thu>=1 23:00s # http://www.worldtimezone.com/dst_news/dst_news_egypt02.html # +# From Ahmad El-Dardiry (2014-05-07): +# Egypt is to change back to Daylight system on May 15 +# http://english.ahram.org.eg/NewsContent/1/64/100735/Egypt/Politics-/Egypts-government-to-reapply-daylight-saving-time-.aspx + +# From Gunther Vermier (2015-05-13): +# our Egypt office confirms that the change will be at 15 May "midnight" (24:00) + +# From Paul Eggert (2014-05-13): +# Sarah El Deeb and Lee Keath of AP report that the Egyptian government says +# the change is because of blackouts in Cairo, even though Ahram Online (cited +# above) says DST had no affect on electricity consumption. The AP story says +# DST will not be observed during Ramadan. There is no information about when +# DST will end. See: +# http://abcnews.go.com/International/wireStory/el-sissi-pushes-egyptians-line-23614833 +# +# For now, guess that later transitions will use 2010's rules, and that +# Egypt will agree with Morocco (see below) about the date Ramadan starts and +# ends, though (unlike Morocco) it will switch at 00:00 standard time. In +# Egypt the spring-forward transitions are removed for 2020-2022, when the +# guessed spring-forward date falls during the estimated Ramadan, and all +# transitions removed for 2023-2038, where the estimated Ramadan falls entirely +# outside the guessed daylight-saving time. Ramadan intrudes on the guessed +# DST starting in 2039, but that's beyond our somewhat-arbitrary cutoff. + Rule Egypt 2008 only - Aug lastThu 23:00s 0 - Rule Egypt 2009 only - Aug 20 23:00s 0 - Rule Egypt 2010 only - Aug 11 0:00 0 - Rule Egypt 2010 only - Sep 10 0:00 1:00 S Rule Egypt 2010 only - Sep lastThu 23:00s 0 - +Rule Egypt 2014 only - May 15 24:00 1:00 S +Rule Egypt 2014 only - Jun 29 0:00s 0 - +Rule Egypt 2014 only - Jul 29 0:00s 1:00 S +Rule Egypt 2014 max - Sep lastThu 23:00s 0 - +Rule Egypt 2015 2019 - Apr lastFri 0:00s 1:00 S +Rule Egypt 2015 only - Jun 18 0:00s 0 - +Rule Egypt 2015 only - Jul 18 0:00s 1:00 S +Rule Egypt 2016 only - Jun 7 0:00s 0 - +Rule Egypt 2016 only - Jul 7 0:00s 1:00 S +Rule Egypt 2017 only - May 27 0:00s 0 - +Rule Egypt 2017 only - Jun 26 0:00s 1:00 S +Rule Egypt 2018 only - May 16 0:00s 0 - +Rule Egypt 2018 only - Jun 15 0:00s 1:00 S +Rule Egypt 2019 only - May 6 0:00s 0 - +Rule Egypt 2019 only - Jun 5 0:00s 1:00 S +Rule Egypt 2020 only - May 24 0:00s 1:00 S +Rule Egypt 2021 only - May 13 0:00s 1:00 S +Rule Egypt 2022 only - May 3 0:00s 1:00 S +Rule Egypt 2023 max - Apr lastFri 0:00s 1:00 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Cairo 2:05:09 - LMT 1900 Oct Modified: stable/10/contrib/tzdata/asia ============================================================================== --- stable/10/contrib/tzdata/asia Tue May 13 21:31:13 2014 (r265982) +++ stable/10/contrib/tzdata/asia Tue May 13 22:35:06 2014 (r265983) @@ -1347,22 +1347,6 @@ Zone Asia/Tokyo 9:18:59 - LMT 1887 Dec 3 # "Jordan will switch to winter time on Friday, October 27". # -# From Phil Pizzey (2009-04-02): -# ...I think I may have spotted an error in the timezone data for -# Jordan. -# The current (2009d) asia file shows Jordan going to daylight -# saving -# time on the last Thursday in March. -# -# Rule Jordan 2000 max - Mar lastThu 0:00s 1:00 S -# -# However timeanddate.com, which I usually find reliable, shows Jordan -# going to daylight saving time on the last Friday in March since 2002. -# Please see -# -# http://www.timeanddate.com/worldclock/timezone.html?n=11 -# - # From Steffen Thorsen (2009-04-02): # This single one might be good enough, (2009-03-24, Arabic): # Modified: stable/10/contrib/tzdata/europe ============================================================================== --- stable/10/contrib/tzdata/europe Tue May 13 21:31:13 2014 (r265982) +++ stable/10/contrib/tzdata/europe Tue May 13 22:35:06 2014 (r265983) @@ -2966,6 +2966,10 @@ Zone Europe/Simferopol 2:16:24 - LMT 188 # From Alexander Krivenyshev (2014-03-17): # time change at 2:00 (2am) on March 30, 2014 # http://vz.ru/news/2014/3/17/677464.html +# From Paul Eggert (2014-03-30): +# Simferopol and Sevastopol reportedly changed their central town clocks +# late the previous day, but this appears to have been ceremonial +# and the discrepancies are small enough to not worry about. 2:00 EU EE%sT 2014 Mar 30 2:00 4:00 - MSK From owner-svn-src-stable@FreeBSD.ORG Tue May 13 22:43:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8988B1B; Tue, 13 May 2014 22:43:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A524426D1; Tue, 13 May 2014 22:43:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4DMh2it040599; Tue, 13 May 2014 22:43:02 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4DMh2pg040598; Tue, 13 May 2014 22:43:02 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201405132243.s4DMh2pg040598@svn.freebsd.org> From: Glen Barber Date: Tue, 13 May 2014 22:43:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265984 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 22:43:02 -0000 Author: gjb Date: Tue May 13 22:43:02 2014 New Revision: 265984 URL: http://svnweb.freebsd.org/changeset/base/265984 Log: Document r265922, mrsas(4) merge. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 13 22:35:06 2014 (r265983) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 13 22:43:02 2014 (r265984) @@ -138,6 +138,22 @@ providing support for LSI Fusion-MPT 3 12Gb SCSI/SATA controllers. + The &man.mrsas.4; driver has been added, + providing support for LSI MegaRAID SAS controllers. The + &man.mfi.4; driver will attach to the controller, by default. + To enable &man.mrsas.4; add + hw.mfi.mrsas_enable=1 to + /boot/loader.conf, which turns off + &man.mfi.4; device probing. + + + At this time, the &man.mfiutil.8; utility and + the &os; version of + MegaCLI and + StorCli do not work with + &man.mrsas.4;. + + Virtualization support From owner-svn-src-stable@FreeBSD.ORG Tue May 13 23:19:17 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 881935C2; Tue, 13 May 2014 23:19:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 758022941; Tue, 13 May 2014 23:19:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4DNJHuR055014; Tue, 13 May 2014 23:19:17 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4DNJH7T055013; Tue, 13 May 2014 23:19:17 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201405132319.s4DNJH7T055013@svn.freebsd.org> From: Xin LI Date: Tue, 13 May 2014 23:19:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265986 - stable/10/crypto/openssl/ssl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 23:19:17 -0000 Author: delphij Date: Tue May 13 23:19:16 2014 New Revision: 265986 URL: http://svnweb.freebsd.org/changeset/base/265986 Log: Fix OpenSSL NULL pointer deference vulnerability. Obtained from: OpenBSD Security: FreeBSD-SA-14:09.openssl Security: CVE-2014-0198 Modified: stable/10/crypto/openssl/ssl/s3_pkt.c Modified: stable/10/crypto/openssl/ssl/s3_pkt.c ============================================================================== --- stable/10/crypto/openssl/ssl/s3_pkt.c Tue May 13 23:17:24 2014 (r265985) +++ stable/10/crypto/openssl/ssl/s3_pkt.c Tue May 13 23:19:16 2014 (r265986) @@ -657,6 +657,10 @@ static int do_ssl3_write(SSL *s, int typ if (i <= 0) return(i); /* if it went, fall through and send more stuff */ + /* we may have released our buffer, so get it again */ + if (wb->buf == NULL) + if (!ssl3_setup_write_buffer(s)) + return -1; } if (len == 0 && !create_empty_fragment) From owner-svn-src-stable@FreeBSD.ORG Tue May 13 23:35:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0ACFDB80; Tue, 13 May 2014 23:35:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EBFCF2AB6; Tue, 13 May 2014 23:35:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4DNZTrN063541; Tue, 13 May 2014 23:35:29 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4DNZTMj063540; Tue, 13 May 2014 23:35:29 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201405132335.s4DNZTMj063540@svn.freebsd.org> From: Xin LI Date: Tue, 13 May 2014 23:35:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r265990 - stable/8/usr.sbin/kldxref X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 23:35:30 -0000 Author: delphij Date: Tue May 13 23:35:29 2014 New Revision: 265990 URL: http://svnweb.freebsd.org/changeset/base/265990 Log: Improve build repeatability for kldxref(8). [EN-14:04] Modified: stable/8/usr.sbin/kldxref/kldxref.c Modified: stable/8/usr.sbin/kldxref/kldxref.c ============================================================================== --- stable/8/usr.sbin/kldxref/kldxref.c Tue May 13 23:24:32 2014 (r265989) +++ stable/8/usr.sbin/kldxref/kldxref.c Tue May 13 23:35:29 2014 (r265990) @@ -275,6 +275,16 @@ usage(void) exit(1); } +static int +compare(const FTSENT *const *a, const FTSENT *const *b) +{ + if ((*a)->fts_info == FTS_D && (*b)->fts_info != FTS_D) + return 1; + if ((*a)->fts_info != FTS_D && (*b)->fts_info == FTS_D) + return -1; + return strcmp((*a)->fts_name, (*b)->fts_name); +} + int main(int argc, char *argv[]) { @@ -316,7 +326,7 @@ main(int argc, char *argv[]) err(1, "%s", argv[0]); } - ftsp = fts_open(argv, fts_options, 0); + ftsp = fts_open(argv, fts_options, compare); if (ftsp == NULL) exit(1); From owner-svn-src-stable@FreeBSD.ORG Tue May 13 23:36:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 511F5D9E for ; Tue, 13 May 2014 23:36:51 +0000 (UTC) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com [209.85.217.172]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CA9B42AC9 for ; Tue, 13 May 2014 23:36:50 +0000 (UTC) Received: by mail-lb0-f172.google.com with SMTP id l4so838664lbv.31 for ; Tue, 13 May 2014 16:36:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=EZNUp0y6eiXhLbMe2J1yDDpwniy+tCc/y8/eF9gAVIc=; b=iPZxRhA6oPpbTFb2lGiUfcFZkmdjplVhiDKmt2oK0pFC8D/Jj4w0iKxagwN7sWC+Kx 4C1LOYeUlStv+pCEf/NOPZq+XgSVf2jjdFLtJ+IZFzhBGTaD9/lPIweW0AF5nWRXam8T 0o/HSoNqu5Z7zsQyKOYED0WiRConHsyXgpGHutDeFgRuTiPQ9cNHqc19G1eS+4boEsn6 ybPRmXhNXQ2/RK0C9sCsWrYt2RTdCesgHeGLiIMvAFesF7fOnp3Our0yrpeN7sIjQsZN 5X1GBwryln28DiOgd59bX8D/u9DaYuDm2/RIet9ekV3AKx3mmXXuAjPZ2GA/lAogG/1m za9g== X-Gm-Message-State: ALoCoQnWchuuXpXFV22VRIxBo+mGWQ9CpsPdwMm3Fm+fdDbsrZ4ytMqE0JaB7XhKIhPNN15eF8ha X-Received: by 10.112.35.14 with SMTP id d14mr94826lbj.43.1400024207238; Tue, 13 May 2014 16:36:47 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by mx.google.com with ESMTPSA id oc3sm49842lbb.18.2014.05.13.16.36.46 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 13 May 2014 16:36:46 -0700 (PDT) Message-ID: <5372AC8E.1070507@freebsd.org> Date: Wed, 14 May 2014 03:36:46 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Xin LI , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r265986 - stable/10/crypto/openssl/ssl References: <201405132319.s4DNJH7T055013@svn.freebsd.org> In-Reply-To: <201405132319.s4DNJH7T055013@svn.freebsd.org> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 23:36:51 -0000 On 14.05.2014 3:19, Xin LI wrote: > Author: delphij > Date: Tue May 13 23:19:16 2014 > New Revision: 265986 > URL: http://svnweb.freebsd.org/changeset/base/265986 > > Log: > Fix OpenSSL NULL pointer deference vulnerability. > > Obtained from: OpenBSD > Security: FreeBSD-SA-14:09.openssl > Security: CVE-2014-0198 Official fix is a bit different: https://github.com/openssl/openssl/commit/b107586c0c3447ea22dba8698ebbcd81bb29d48c from https://rt.openssl.org/Ticket/Display.html?user=guest&pass=guest&id=3321 Do we follow official branch or OpenBSD fixes? > > Modified: > stable/10/crypto/openssl/ssl/s3_pkt.c > > Modified: stable/10/crypto/openssl/ssl/s3_pkt.c > ============================================================================== > --- stable/10/crypto/openssl/ssl/s3_pkt.c Tue May 13 23:17:24 2014 (r265985) > +++ stable/10/crypto/openssl/ssl/s3_pkt.c Tue May 13 23:19:16 2014 (r265986) > @@ -657,6 +657,10 @@ static int do_ssl3_write(SSL *s, int typ > if (i <= 0) > return(i); > /* if it went, fall through and send more stuff */ > + /* we may have released our buffer, so get it again */ > + if (wb->buf == NULL) > + if (!ssl3_setup_write_buffer(s)) > + return -1; > } > > if (len == 0 && !create_empty_fragment) > -- http://ache.vniz.net/ From owner-svn-src-stable@FreeBSD.ORG Tue May 13 23:56:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A163FA; Tue, 13 May 2014 23:56:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D7EA2C56; Tue, 13 May 2014 23:56:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4DNuqpd074147; Tue, 13 May 2014 23:56:52 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4DNuq7G074146; Tue, 13 May 2014 23:56:52 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405132356.s4DNuq7G074146@svn.freebsd.org> From: Ian Lepore Date: Tue, 13 May 2014 23:56:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265991 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 23:56:52 -0000 Author: ian Date: Tue May 13 23:56:51 2014 New Revision: 265991 URL: http://svnweb.freebsd.org/changeset/base/265991 Log: Record missing merge info caused by an erroneous "helper" script I wrote. Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Wed May 14 00:05:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 615ADF39; Wed, 14 May 2014 00:05:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32FC62EF8; Wed, 14 May 2014 00:05:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4E05ae3079596; Wed, 14 May 2014 00:05:36 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4E05aQc079595; Wed, 14 May 2014 00:05:36 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405140005.s4E05aQc079595@svn.freebsd.org> From: Ian Lepore Date: Wed, 14 May 2014 00:05:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265992 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 00:05:36 -0000 Author: ian Date: Wed May 14 00:05:35 2014 New Revision: 265992 URL: http://svnweb.freebsd.org/changeset/base/265992 Log: Record mergeinfo that was eaten by the dog. Yeah, that's my story and I'm sticking to it. Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Wed May 14 00:07:58 2014 Return-Path: Delivered-To: svn-src-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C41F8134; Wed, 14 May 2014 00:07:58 +0000 (UTC) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 969552F2C; Wed, 14 May 2014 00:07:58 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1WkMjl-000Oel-4S; Wed, 14 May 2014 00:07:57 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id s4E07sTf035719; Tue, 13 May 2014 18:07:54 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX19mD768Tjg8d3CJH0NTYbTw Subject: Re: svn commit: r265973 - stable/10/sys/dev/uart From: Ian Lepore To: Sergey Kandaurov In-Reply-To: References: <201405131909.s4DJ90Cc040529@svn.freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Tue, 13 May 2014 18:07:54 -0600 Message-ID: <1400026074.56626.18.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-10@FreeBSD.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 00:07:58 -0000 On Tue, 2014-05-13 at 23:35 +0400, Sergey Kandaurov wrote: > On 13 May 2014 23:09, Ian Lepore wrote: > > Author: ian > > Date: Tue May 13 19:09:00 2014 > > New Revision: 265973 > > URL: http://svnweb.freebsd.org/changeset/base/265973 > > > > Log: > > MFC r257111, r257144, r257157, r257183 > > > > Test UARTs physical address instead of virtual. > > > > Be a bit more flexible in how we find the console from the properties on > > /chosen, following the list of allowed console properties in ePAPR. Also > > do not require that stdin be defined and equal to stdout: stdin is > > nonstandard (for ePAPR) and console in an unexpected place is after all > > better than no console. > > > > Modified: > > stable/10/sys/dev/uart/uart_cpu_fdt.c > > > > Taking random commit of your merge series: all of them miss svn:mergeinfo. > Thanks. A combo of a misunderstanding on my part and a poorly written helper script caused this. (I wrote another script to help me fix it, I sure hope I got that one right) At least you let me know before it got too out of hand... I have over 400 ARM-related changesets to merge still. -- Ian From owner-svn-src-stable@FreeBSD.ORG Wed May 14 00:51:28 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C7F9EB06; Wed, 14 May 2014 00:51:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B356B2252; Wed, 14 May 2014 00:51:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4E0pSR0000639; Wed, 14 May 2014 00:51:28 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4E0pQJ2000627; Wed, 14 May 2014 00:51:26 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405140051.s4E0pQJ2000627@svn.freebsd.org> From: Ian Lepore Date: Wed, 14 May 2014 00:51:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265996 - in stable/10/sys/powerpc: aim booke include mpc85xx powerpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 00:51:28 -0000 Author: ian Date: Wed May 14 00:51:26 2014 New Revision: 265996 URL: http://svnweb.freebsd.org/changeset/base/265996 Log: MFC r257161, r257169, r257178, r257190, r257191 Add pmap_mapdev_attr() and pmap_kenter_attr() interfaces. Fix concurrency issues with TLB1 updates and make pmap_kextract() search TLB1 mappings as well Interrelated improvements to early boot mappings: - Remove explicit requirement that the SOC registers be found except as an optimization (although the MPC85XX LAW drivers still require they be found externally, which should change). - Remove magic CCSRBAR_VA value. - Allow bus_machdep.c's early-boot code to handle non 1:1 mappings and systems not in real-mode or global 1:1 maps in early boot. - Allow pmap_mapdev() on Book-E to reissue previous addresses if the area is already mapped. Additionally have it check all mappings, not just the CCSR area. Add some extra sanity checking and checks to printf format specifiers. Bump initial TLB size. The kernel is not necessarily less than 16 MB Handle (in a slightly ugly way) ePAPR-type loaders that just place a device tree into r3. Modified: stable/10/sys/powerpc/aim/machdep.c stable/10/sys/powerpc/booke/locore.S stable/10/sys/powerpc/booke/machdep.c stable/10/sys/powerpc/booke/machdep_e500.c stable/10/sys/powerpc/booke/pmap.c stable/10/sys/powerpc/include/pmap.h stable/10/sys/powerpc/include/tlb.h stable/10/sys/powerpc/include/vmparam.h stable/10/sys/powerpc/mpc85xx/mpc85xx.c stable/10/sys/powerpc/mpc85xx/mpc85xx.h stable/10/sys/powerpc/powerpc/bus_machdep.c Modified: stable/10/sys/powerpc/aim/machdep.c ============================================================================== --- stable/10/sys/powerpc/aim/machdep.c Wed May 14 00:50:31 2014 (r265995) +++ stable/10/sys/powerpc/aim/machdep.c Wed May 14 00:51:26 2014 (r265996) @@ -777,6 +777,13 @@ va_to_vsid(pmap_t pm, vm_offset_t va) #endif +vm_offset_t +pmap_early_io_map(vm_paddr_t pa, vm_size_t size) +{ + + return (pa); +} + /* From p3-53 of the MPC7450 RISC Microprocessor Family Reference Manual */ void flush_disable_caches(void) @@ -944,4 +951,4 @@ cpu_sleep() if (vectd == curthread) enable_vec(curthread); powerpc_sync(); -} +} \ No newline at end of file Modified: stable/10/sys/powerpc/booke/locore.S ============================================================================== --- stable/10/sys/powerpc/booke/locore.S Wed May 14 00:50:31 2014 (r265995) +++ stable/10/sys/powerpc/booke/locore.S Wed May 14 00:51:26 2014 (r265996) @@ -158,7 +158,7 @@ __start: mtspr SPR_MAS0, %r3 isync - li %r3, (TLB_SIZE_16M << MAS1_TSIZE_SHIFT)@l + li %r3, (TLB_SIZE_64M << MAS1_TSIZE_SHIFT)@l oris %r3, %r3, (MAS1_VALID | MAS1_IPROT)@h mtspr SPR_MAS1, %r3 /* note TS was not filled, so it's TS=0 */ isync Modified: stable/10/sys/powerpc/booke/machdep.c ============================================================================== --- stable/10/sys/powerpc/booke/machdep.c Wed May 14 00:50:31 2014 (r265995) +++ stable/10/sys/powerpc/booke/machdep.c Wed May 14 00:51:26 2014 (r265996) @@ -137,6 +137,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -276,6 +277,23 @@ print_kernel_section_addr(void) debugf(" _end = 0x%08x\n", (uint32_t)_end); } +static int +booke_check_for_fdt(uint32_t arg1, vm_offset_t *dtbp) +{ + void *ptr; + + if (arg1 % 8 != 0) + return (-1); + + ptr = (void *)pmap_early_io_map(arg1, PAGE_SIZE); + if (fdt_check_header(ptr) != 0) + return (-1); + + *dtbp = (vm_offset_t)ptr; + + return (0); +} + u_int booke_init(uint32_t arg1, uint32_t arg2) { @@ -288,6 +306,10 @@ booke_init(uint32_t arg1, uint32_t arg2) end = (uintptr_t)_end; dtbp = (vm_offset_t)NULL; + /* Set up TLB initially */ + bootinfo = NULL; + tlb1_init(); + /* * Handle the various ways we can get loaded and started: * - FreeBSD's loader passes the pointer to the metadata @@ -302,11 +324,21 @@ booke_init(uint32_t arg1, uint32_t arg2) * in arg1 and arg2 (resp). arg1 is between 1 and some * relatively small number, such as 64K. arg2 is the * physical address of the argv vector. + * - ePAPR loaders pass an FDT blob in r3 (arg1) and the magic hex + * string 0x45504150 ('ePAP') in r6 (which has been lost by now). + * r4 (arg2) is supposed to be set to zero, but is not always. */ - if (arg1 > (uintptr_t)kernel_text) /* FreeBSD loader */ - mdp = (void *)arg1; - else if (arg1 == 0) /* Juniper loader */ + + if (arg1 == 0) /* Juniper loader */ mdp = (void *)arg2; + else if (booke_check_for_fdt(arg1, &dtbp) == 0) { /* ePAPR */ + end = roundup(end, 8); + memmove((void *)end, (void *)dtbp, fdt_totalsize((void *)dtbp)); + dtbp = end; + end += fdt_totalsize((void *)dtbp); + mdp = NULL; + } else if (arg1 > (uintptr_t)kernel_text) /* FreeBSD loader */ + mdp = (void *)arg1; else /* U-Boot */ mdp = NULL; @@ -350,13 +382,18 @@ booke_init(uint32_t arg1, uint32_t arg2) if (OF_init((void *)dtbp) != 0) while (1); - if (fdt_immr_addr(CCSRBAR_VA) != 0) - while (1); - OF_interpret("perform-fixup", 0); - /* Set up TLB initially */ - booke_init_tlb(fdt_immr_pa); + /* Reset TLB1 to get rid of temporary mappings */ + tlb1_init(); + + /* Set up IMMR */ + if (fdt_immr_addr(0) == 0) { + fdt_immr_va = pmap_early_io_map(fdt_immr_pa, fdt_immr_size); + } else { + printf("Warning: SOC base registers could not be found!\n"); + fdt_immr_va = 0; + } /* Reset Time Base */ mttb(0); Modified: stable/10/sys/powerpc/booke/machdep_e500.c ============================================================================== --- stable/10/sys/powerpc/booke/machdep_e500.c Wed May 14 00:50:31 2014 (r265995) +++ stable/10/sys/powerpc/booke/machdep_e500.c Wed May 14 00:51:26 2014 (r265996) @@ -47,8 +47,6 @@ void booke_init_tlb(vm_paddr_t fdt_immr_pa) { - /* Initialize TLB1 handling */ - tlb1_init(fdt_immr_pa); } void Modified: stable/10/sys/powerpc/booke/pmap.c ============================================================================== --- stable/10/sys/powerpc/booke/pmap.c Wed May 14 00:50:31 2014 (r265995) +++ stable/10/sys/powerpc/booke/pmap.c Wed May 14 00:51:26 2014 (r265996) @@ -113,7 +113,6 @@ extern uint32_t *bootinfo; extern uint32_t bp_ntlb1s; #endif -vm_paddr_t ccsrbar_pa; vm_paddr_t kernload; vm_offset_t kernstart; vm_size_t kernsize; @@ -315,9 +314,11 @@ static void mmu_booke_activate(mmu_t, s static void mmu_booke_deactivate(mmu_t, struct thread *); static void mmu_booke_bootstrap(mmu_t, vm_offset_t, vm_offset_t); static void *mmu_booke_mapdev(mmu_t, vm_paddr_t, vm_size_t); +static void *mmu_booke_mapdev_attr(mmu_t, vm_paddr_t, vm_size_t, vm_memattr_t); static void mmu_booke_unmapdev(mmu_t, vm_offset_t, vm_size_t); static vm_paddr_t mmu_booke_kextract(mmu_t, vm_offset_t); static void mmu_booke_kenter(mmu_t, vm_offset_t, vm_paddr_t); +static void mmu_booke_kenter_attr(mmu_t, vm_offset_t, vm_paddr_t, vm_memattr_t); static void mmu_booke_kremove(mmu_t, vm_offset_t); static boolean_t mmu_booke_dev_direct_mapped(mmu_t, vm_paddr_t, vm_size_t); static void mmu_booke_sync_icache(mmu_t, pmap_t, vm_offset_t, @@ -371,7 +372,9 @@ static mmu_method_t mmu_booke_methods[] MMUMETHOD(mmu_bootstrap, mmu_booke_bootstrap), MMUMETHOD(mmu_dev_direct_mapped,mmu_booke_dev_direct_mapped), MMUMETHOD(mmu_mapdev, mmu_booke_mapdev), + MMUMETHOD(mmu_mapdev_attr, mmu_booke_mapdev_attr), MMUMETHOD(mmu_kenter, mmu_booke_kenter), + MMUMETHOD(mmu_kenter_attr, mmu_booke_kenter_attr), MMUMETHOD(mmu_kextract, mmu_booke_kextract), /* MMUMETHOD(mmu_kremove, mmu_booke_kremove), */ MMUMETHOD(mmu_unmapdev, mmu_booke_unmapdev), @@ -386,6 +389,42 @@ static mmu_method_t mmu_booke_methods[] MMU_DEF(booke_mmu, MMU_TYPE_BOOKE, mmu_booke_methods, 0); +static __inline uint32_t +tlb_calc_wimg(vm_offset_t pa, vm_memattr_t ma) +{ + uint32_t attrib; + int i; + + if (ma != VM_MEMATTR_DEFAULT) { + switch (ma) { + case VM_MEMATTR_UNCACHEABLE: + return (PTE_I | PTE_G); + case VM_MEMATTR_WRITE_COMBINING: + case VM_MEMATTR_WRITE_BACK: + case VM_MEMATTR_PREFETCHABLE: + return (PTE_I); + case VM_MEMATTR_WRITE_THROUGH: + return (PTE_W | PTE_M); + } + } + + /* + * Assume the page is cache inhibited and access is guarded unless + * it's in our available memory array. + */ + attrib = _TLB_ENTRY_IO; + for (i = 0; i < physmem_regions_sz; i++) { + if ((pa >= physmem_regions[i].mr_start) && + (pa < (physmem_regions[i].mr_start + + physmem_regions[i].mr_size))) { + attrib = _TLB_ENTRY_MEM; + break; + } + } + + return (attrib); +} + static inline void tlb_miss_lock(void) { @@ -1315,6 +1354,15 @@ mmu_booke_extract(mmu_t mmu, pmap_t pmap static vm_paddr_t mmu_booke_kextract(mmu_t mmu, vm_offset_t va) { + int i; + + /* Check TLB1 mappings */ + for (i = 0; i < tlb1_idx; i++) { + if (!(tlb1[i].mas1 & MAS1_VALID)) + continue; + if (va >= tlb1[i].virt && va < tlb1[i].virt + tlb1[i].size) + return (tlb1[i].phys + (va - tlb1[i].virt)); + } return (pte_vatopa(mmu, kernel_pmap, va)); } @@ -1392,6 +1440,13 @@ mmu_booke_qremove(mmu_t mmu, vm_offset_t static void mmu_booke_kenter(mmu_t mmu, vm_offset_t va, vm_paddr_t pa) { + + mmu_booke_kenter_attr(mmu, va, pa, VM_MEMATTR_DEFAULT); +} + +static void +mmu_booke_kenter_attr(mmu_t mmu, vm_offset_t va, vm_paddr_t pa, vm_memattr_t ma) +{ unsigned int pdir_idx = PDIR_IDX(va); unsigned int ptbl_idx = PTBL_IDX(va); uint32_t flags; @@ -1400,7 +1455,8 @@ mmu_booke_kenter(mmu_t mmu, vm_offset_t KASSERT(((va >= VM_MIN_KERNEL_ADDRESS) && (va <= VM_MAX_KERNEL_ADDRESS)), ("mmu_booke_kenter: invalid va")); - flags = PTE_M | PTE_SR | PTE_SW | PTE_SX | PTE_WIRED | PTE_VALID; + flags = PTE_SR | PTE_SW | PTE_SX | PTE_WIRED | PTE_VALID; + flags |= tlb_calc_wimg(pa, ma); pte = &(kernel_pmap->pm_pdir[pdir_idx][ptbl_idx]); @@ -2595,33 +2651,49 @@ mmu_booke_scan_md(mmu_t mmu, struct pmap static void * mmu_booke_mapdev(mmu_t mmu, vm_paddr_t pa, vm_size_t size) { + + return (mmu_booke_mapdev_attr(mmu, pa, size, VM_MEMATTR_DEFAULT)); +} + +static void * +mmu_booke_mapdev_attr(mmu_t mmu, vm_paddr_t pa, vm_size_t size, vm_memattr_t ma) +{ void *res; uintptr_t va; vm_size_t sz; + int i; /* - * CCSR is premapped. Note that (pa + size - 1) is there to make sure - * we don't wrap around. Devices on the local bus typically extend all - * the way up to and including 0xffffffff. In that case (pa + size) - * would be 0. This creates a false positive (i.e. we think it's - * within the CCSR) and not create a mapping. - */ - if (pa >= ccsrbar_pa && (pa + size - 1) < (ccsrbar_pa + CCSRBAR_SIZE)) { - va = CCSRBAR_VA + (pa - ccsrbar_pa); - return ((void *)va); + * Check if this is premapped in TLB1. Note: this should probably also + * check whether a sequence of TLB1 entries exist that match the + * requirement, but now only checks the easy case. + */ + if (ma == VM_MEMATTR_DEFAULT) { + for (i = 0; i < tlb1_idx; i++) { + if (!(tlb1[i].mas1 & MAS1_VALID)) + continue; + if (pa >= tlb1[i].phys && + (pa + size) <= (tlb1[i].phys + tlb1[i].size)) + return (void *)(tlb1[i].virt + + (pa - tlb1[i].phys)); + } } - va = (pa >= 0x80000000) ? pa : (0xe2000000 + pa); + size = roundup(size, PAGE_SIZE); + + if (pa >= (VM_MAXUSER_ADDRESS + PAGE_SIZE) && + (pa + size - 1) < VM_MIN_KERNEL_ADDRESS) + va = pa; + else + va = kva_alloc(size); res = (void *)va; - if (size < PAGE_SIZE) - size = PAGE_SIZE; do { sz = 1 << (ilog2(size) & ~1); if (bootverbose) printf("Wiring VA=%x to PA=%x (size=%x), " "using TLB1[%d]\n", va, pa, sz, tlb1_idx); - tlb1_set_entry(va, pa, sz, _TLB_ENTRY_IO); + tlb1_set_entry(va, pa, sz, tlb_calc_wimg(pa, ma)); size -= sz; pa += sz; va += sz; @@ -2636,6 +2708,7 @@ mmu_booke_mapdev(mmu_t mmu, vm_paddr_t p static void mmu_booke_unmapdev(mmu_t mmu, vm_offset_t va, vm_size_t size) { +#ifdef SUPPORTS_SHRINKING_TLB1 vm_offset_t base, offset; /* @@ -2647,6 +2720,7 @@ mmu_booke_unmapdev(mmu_t mmu, vm_offset_ size = roundup(offset + size, PAGE_SIZE); kva_free(base, size); } +#endif } /* @@ -2827,9 +2901,8 @@ tlb0_print_tlbentries(void) /* * TLB1 mapping notes: * - * TLB1[0] CCSRBAR - * TLB1[1] Kernel text and data. - * TLB1[2-15] Additional kernel text and data mappings (if required), PCI + * TLB1[0] Kernel text and data. + * TLB1[1-15] Additional kernel text and data mappings (if required), PCI * windows, other devices mappings. */ @@ -2913,9 +2986,10 @@ tlb1_set_entry(vm_offset_t va, vm_offset uint32_t flags) { uint32_t ts, tid; - int tsize; - - if (tlb1_idx >= TLB1_ENTRIES) { + int tsize, index; + + index = atomic_fetchadd_int(&tlb1_idx, 1); + if (index >= TLB1_ENTRIES) { printf("tlb1_set_entry: TLB1 full!\n"); return (-1); } @@ -2927,18 +3001,22 @@ tlb1_set_entry(vm_offset_t va, vm_offset /* XXX TS is hard coded to 0 for now as we only use single address space */ ts = (0 << MAS1_TS_SHIFT) & MAS1_TS_MASK; - /* XXX LOCK tlb1[] */ + /* + * Atomicity is preserved by the atomic increment above since nothing + * is ever removed from tlb1. + */ - tlb1[tlb1_idx].mas1 = MAS1_VALID | MAS1_IPROT | ts | tid; - tlb1[tlb1_idx].mas1 |= ((tsize << MAS1_TSIZE_SHIFT) & MAS1_TSIZE_MASK); - tlb1[tlb1_idx].mas2 = (va & MAS2_EPN_MASK) | flags; + tlb1[index].phys = pa; + tlb1[index].virt = va; + tlb1[index].size = size; + tlb1[index].mas1 = MAS1_VALID | MAS1_IPROT | ts | tid; + tlb1[index].mas1 |= ((tsize << MAS1_TSIZE_SHIFT) & MAS1_TSIZE_MASK); + tlb1[index].mas2 = (va & MAS2_EPN_MASK) | flags; /* Set supervisor RWX permission bits */ - tlb1[tlb1_idx].mas3 = (pa & MAS3_RPN) | MAS3_SR | MAS3_SW | MAS3_SX; + tlb1[index].mas3 = (pa & MAS3_RPN) | MAS3_SR | MAS3_SW | MAS3_SX; - tlb1_write_entry(tlb1_idx++); - - /* XXX UNLOCK tlb1[] */ + tlb1_write_entry(index); /* * XXX in general TLB1 updates should be propagated between CPUs, @@ -3017,14 +3095,12 @@ tlb1_mapin_region(vm_offset_t va, vm_pad * assembler level setup done in locore.S. */ void -tlb1_init(vm_offset_t ccsrbar) +tlb1_init() { - uint32_t mas0, mas1, mas3; + uint32_t mas0, mas1, mas2, mas3; uint32_t tsz; u_int i; - ccsrbar_pa = ccsrbar; - if (bootinfo != NULL && bootinfo[0] != 1) { tlb1_idx = *((uint16_t *)(bootinfo + 8)); } else @@ -3040,22 +3116,23 @@ tlb1_init(vm_offset_t ccsrbar) if ((mas1 & MAS1_VALID) == 0) continue; + mas2 = mfspr(SPR_MAS2); mas3 = mfspr(SPR_MAS3); tlb1[i].mas1 = mas1; tlb1[i].mas2 = mfspr(SPR_MAS2); tlb1[i].mas3 = mas3; + tlb1[i].virt = mas2 & MAS2_EPN_MASK; + tlb1[i].phys = mas3 & MAS3_RPN; if (i == 0) kernload = mas3 & MAS3_RPN; tsz = (mas1 & MAS1_TSIZE_MASK) >> MAS1_TSIZE_SHIFT; - kernsize += (tsz > 0) ? tsize2size(tsz) : 0; + tlb1[i].size = (tsz > 0) ? tsize2size(tsz) : 0; + kernsize += tlb1[i].size; } - /* Map in CCSRBAR. */ - tlb1_set_entry(CCSRBAR_VA, ccsrbar, CCSRBAR_SIZE, _TLB_ENTRY_IO); - #ifdef SMP bp_ntlb1s = tlb1_idx; #endif @@ -3068,6 +3145,43 @@ tlb1_init(vm_offset_t ccsrbar) set_mas4_defaults(); } +vm_offset_t +pmap_early_io_map(vm_paddr_t pa, vm_size_t size) +{ + static vm_offset_t early_io_map_base = VM_MAX_KERNEL_ADDRESS; + vm_paddr_t pa_base; + vm_offset_t va, sz; + int i; + + KASSERT(!pmap_bootstrapped, ("Do not use after PMAP is up!")); + + for (i = 0; i < tlb1_idx; i++) { + if (!(tlb1[i].mas1 & MAS1_VALID)) + continue; + if (pa >= tlb1[i].phys && (pa + size) <= + (tlb1[i].phys + tlb1[i].size)) + return (tlb1[i].virt + (pa - tlb1[i].phys)); + } + + pa_base = trunc_page(pa); + size = roundup(size + (pa - pa_base), PAGE_SIZE); + va = early_io_map_base + (pa - pa_base); + + do { + sz = 1 << (ilog2(size) & ~1); + tlb1_set_entry(early_io_map_base, pa_base, sz, _TLB_ENTRY_IO); + size -= sz; + pa_base += sz; + early_io_map_base += sz; + } while (size > 0); + +#ifdef SMP + bp_ntlb1s = tlb1_idx; +#endif + + return (va); +} + /* * Setup MAS4 defaults. * These values are loaded to MAS0-2 on a TLB miss. Modified: stable/10/sys/powerpc/include/pmap.h ============================================================================== --- stable/10/sys/powerpc/include/pmap.h Wed May 14 00:50:31 2014 (r265995) +++ stable/10/sys/powerpc/include/pmap.h Wed May 14 00:51:26 2014 (r265996) @@ -258,6 +258,8 @@ extern void pmap_dumpsys_unmap(struct pm extern struct pmap_md *pmap_scan_md(struct pmap_md *); +vm_offset_t pmap_early_io_map(vm_paddr_t pa, vm_size_t size); + #endif #endif /* !_MACHINE_PMAP_H_ */ Modified: stable/10/sys/powerpc/include/tlb.h ============================================================================== --- stable/10/sys/powerpc/include/tlb.h Wed May 14 00:50:31 2014 (r265995) +++ stable/10/sys/powerpc/include/tlb.h Wed May 14 00:51:26 2014 (r265996) @@ -126,6 +126,9 @@ #if !defined(LOCORE) typedef struct tlb_entry { + vm_paddr_t phys; + vm_offset_t virt; + vm_size_t size; uint32_t mas1; uint32_t mas2; uint32_t mas3; @@ -134,7 +137,7 @@ typedef struct tlb_entry { void tlb0_print_tlbentries(void); void tlb1_inval_entry(unsigned int); -void tlb1_init(vm_offset_t); +void tlb1_init(void); void tlb1_print_entries(void); void tlb1_print_tlbentries(void); #endif /* !LOCORE */ Modified: stable/10/sys/powerpc/include/vmparam.h ============================================================================== --- stable/10/sys/powerpc/include/vmparam.h Wed May 14 00:50:31 2014 (r265995) +++ stable/10/sys/powerpc/include/vmparam.h Wed May 14 00:51:26 2014 (r265996) @@ -108,12 +108,6 @@ #else /* Book-E */ -/* - * Kernel CCSRBAR location. We make this the reset location. - */ -#define CCSRBAR_VA 0xfef00000 -#define CCSRBAR_SIZE 0x00100000 - #define KERNBASE 0xc0000000 /* start of kernel virtual */ #define VM_MIN_KERNEL_ADDRESS KERNBASE Modified: stable/10/sys/powerpc/mpc85xx/mpc85xx.c ============================================================================== --- stable/10/sys/powerpc/mpc85xx/mpc85xx.c Wed May 14 00:50:31 2014 (r265995) +++ stable/10/sys/powerpc/mpc85xx/mpc85xx.c Wed May 14 00:51:26 2014 (r265996) @@ -41,6 +41,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include /* Modified: stable/10/sys/powerpc/mpc85xx/mpc85xx.h ============================================================================== --- stable/10/sys/powerpc/mpc85xx/mpc85xx.h Wed May 14 00:50:31 2014 (r265995) +++ stable/10/sys/powerpc/mpc85xx/mpc85xx.h Wed May 14 00:51:26 2014 (r265996) @@ -33,6 +33,7 @@ /* * Configuration control and status registers */ +#define CCSRBAR_VA fdt_immr_va #define OCP85XX_CCSRBAR (CCSRBAR_VA + 0x0) #define OCP85XX_BPTR (CCSRBAR_VA + 0x20) Modified: stable/10/sys/powerpc/powerpc/bus_machdep.c ============================================================================== --- stable/10/sys/powerpc/powerpc/bus_machdep.c Wed May 14 00:50:31 2014 (r265995) +++ stable/10/sys/powerpc/powerpc/bus_machdep.c Wed May 14 00:51:26 2014 (r265996) @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #define MAX_EARLYBOOT_MAPPINGS 6 static struct { + vm_offset_t virt; bus_addr_t addr; bus_size_t size; int flags; @@ -86,10 +87,12 @@ bs_gen_map(bus_addr_t addr, bus_size_t s KASSERT(earlyboot_map_idx < MAX_EARLYBOOT_MAPPINGS, ("%s: too many early boot mapping requests", __func__)); earlyboot_mappings[earlyboot_map_idx].addr = addr; + earlyboot_mappings[earlyboot_map_idx].virt = + pmap_early_io_map(addr, size); earlyboot_mappings[earlyboot_map_idx].size = size; earlyboot_mappings[earlyboot_map_idx].flags = flags; + *bshp = earlyboot_mappings[earlyboot_map_idx].virt; earlyboot_map_idx++; - *bshp = addr; } else { ma = VM_MEMATTR_DEFAULT; switch (flags) { @@ -110,13 +113,13 @@ void bs_remap_earlyboot(void) { int i; - vm_offset_t pa, spa; + vm_offset_t pa, spa, va; vm_memattr_t ma; for (i = 0; i < earlyboot_map_idx; i++) { spa = earlyboot_mappings[i].addr; - if (pmap_dev_direct_mapped(spa, earlyboot_mappings[i].size) - == 0) + if (spa == earlyboot_mappings[i].virt && + pmap_dev_direct_mapped(spa, earlyboot_mappings[i].size) == 0) continue; ma = VM_MEMATTR_DEFAULT; @@ -130,8 +133,10 @@ bs_remap_earlyboot(void) } pa = trunc_page(spa); + va = trunc_page(earlyboot_mappings[i].virt); while (pa < spa + earlyboot_mappings[i].size) { - pmap_kenter_attr(pa, pa, ma); + pmap_kenter_attr(va, pa, ma); + va += PAGE_SIZE; pa += PAGE_SIZE; } } From owner-svn-src-stable@FreeBSD.ORG Wed May 14 00:54:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 21715C6E; Wed, 14 May 2014 00:54:48 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 04CC622E3; Wed, 14 May 2014 00:54:47 +0000 (UTC) Received: from zeta.ixsystems.com (unknown [69.198.165.132]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id C4D0423587; Tue, 13 May 2014 17:54:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1400028881; bh=8lG9xizMxsVwhqrn56KAD48cva66tm1FshEU9VI1bDs=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=JhPtLeSyc/teA3ptAO0os6yygF2odu5ifjuVNV203WeCRnDgSKScr4FgPtrr25lcY lymMnVDmB+hisrZ96lRzKcQOUol/yWZCTPYHBC9cIHDy6zsx8tHhhkV51J1mwA9LlB 9ssTeVzfpsTSI5O+uyEToZb3pHl/X0HSvRtOc7us= Message-ID: <5372BED0.7010907@delphij.net> Date: Tue, 13 May 2014 17:54:40 -0700 From: Xin Li Reply-To: d@delphij.net Organization: The FreeBSD Project MIME-Version: 1.0 To: Andrey Chernov , Xin LI , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r265986 - stable/10/crypto/openssl/ssl References: <201405132319.s4DNJH7T055013@svn.freebsd.org> <5372AC8E.1070507@freebsd.org> In-Reply-To: <5372AC8E.1070507@freebsd.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Cc: "secteam@FreeBSD.org" X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 00:54:48 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 05/13/14 16:36, Andrey Chernov wrote: > On 14.05.2014 3:19, Xin LI wrote: >> Author: delphij Date: Tue May 13 23:19:16 2014 New Revision: >> 265986 URL: http://svnweb.freebsd.org/changeset/base/265986 >> >> Log: Fix OpenSSL NULL pointer deference vulnerability. >> >> Obtained from: OpenBSD Security: FreeBSD-SA-14:09.openssl >> Security: CVE-2014-0198 > > Official fix is a bit different: > https://github.com/openssl/openssl/commit/b107586c0c3447ea22dba8698ebbcd81bb29d48c > > from > https://rt.openssl.org/Ticket/Display.html?user=guest&pass=guest&id=3321 > > Do we follow official branch or OpenBSD fixes? Principally we follow the official branch whenever applicable, we didn't do it for this one because the advisory was prepared about two weeks ago. For -HEAD and -STABLE we should probably adopt the upstream version to ease future maintenance. Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBCgAGBQJTcr7QAAoJEJW2GBstM+nsZSkQAKxb/l+s7TEJadXf3a2pMR1/ DbNBW2WKTCS8QqGRyIqd2z9VPpsa5ECIVpaiekMLUxG85m+mBqV3sTQUXjFTwaU7 HQIGkiCbwnw8/u0+xoFByGzQW822qVvW/+OoylEw90JnDqtrWsoDfLND80H1/IUj LKPJu2lU4rI6EFQ2b6ps01XqaoWKK16MkyB47CiRcDlonqWJ5SvB9TsDsyFJjb5u gnq6RYuZfSFzt8NGL1/9wLXjR9QPtmd/ekp+NOkGRQHPoGjIQ7/Z/mKfEpm11UVs lHm3c89O0+JxNfVzZrlx70xMYrbZCI7oGPlIROjF8jel/RfpypVnDB4L162Nhslw oMlEtD88Kzlb0OWdBmyo811p9wqQ7l2xer774oQzWmfSjo1eZzuNcniYEBwGZ37y hif8tOLEnc4yXZmdKFb5qwpYftyBRfA76bKXEUGXz91b0zdK2M09SuPkgtUiks6Y 6Ame2UHpIwaMULzUA8r98o6C21YuirKM2mD3BGe1zZtWJQ6U2l6a0MCe4d9//6yq aciKsnLgZbaxa1aza3b1gO8fW3Da/9bQ06eeLhcM/F6wEx9dMSo+TAtrjWK95Q9L eNynRxAw3udWAqV+AdVB9U9SGckqe0lLDjMeJq2IV8GCwQb34oAfX5qklyRj2OaI LB21EyspUSw1/hjFrYYI =8DUK -----END PGP SIGNATURE----- From owner-svn-src-stable@FreeBSD.ORG Wed May 14 00:55:21 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E5E6AE89; Wed, 14 May 2014 00:55:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B966722EC; Wed, 14 May 2014 00:55:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4E0tLts003513; Wed, 14 May 2014 00:55:21 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4E0tL3u003512; Wed, 14 May 2014 00:55:21 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405140055.s4E0tL3u003512@svn.freebsd.org> From: Ian Lepore Date: Wed, 14 May 2014 00:55:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265997 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 00:55:22 -0000 Author: ian Date: Wed May 14 00:55:21 2014 New Revision: 265997 URL: http://svnweb.freebsd.org/changeset/base/265997 Log: Record mergeinfo that got run over by a bus. Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Wed May 14 01:16:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 821A330C; Wed, 14 May 2014 01:16:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62C82246F; Wed, 14 May 2014 01:16:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4E1G7i3012773; Wed, 14 May 2014 01:16:07 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4E1G6YI012767; Wed, 14 May 2014 01:16:06 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405140116.s4E1G6YI012767@svn.freebsd.org> From: Ian Lepore Date: Wed, 14 May 2014 01:16:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265998 - in stable/10/sys: boot/powerpc/ps3 dev/adb dev/uart powerpc/aim powerpc/booke powerpc/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 01:16:07 -0000 Author: ian Date: Wed May 14 01:16:05 2014 New Revision: 265998 URL: http://svnweb.freebsd.org/changeset/base/265998 Log: MFC r257180, r257195, r257196, r257198, r257209, r257295 Add some extra sanity checking and checks to printf format specifiers. Try even harder to find a console before giving up. Make devices with registers into the KVA region work reliably. Turn on VM_KMEM_SIZE_SCALE on 32-bit as well as 64-bit PowerPC. Return NOKEY instead of 0 if there are no more key presses queued. Modified: stable/10/sys/boot/powerpc/ps3/start.S stable/10/sys/dev/adb/adb_kbd.c stable/10/sys/dev/uart/uart_cpu_fdt.c stable/10/sys/powerpc/aim/mmu_oea64.c stable/10/sys/powerpc/booke/pmap.c stable/10/sys/powerpc/include/vmparam.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/powerpc/ps3/start.S ============================================================================== --- stable/10/sys/boot/powerpc/ps3/start.S Wed May 14 00:55:21 2014 (r265997) +++ stable/10/sys/boot/powerpc/ps3/start.S Wed May 14 01:16:05 2014 (r265998) @@ -27,7 +27,7 @@ #define LOCORE -#include +#include /* * KBoot and simulators will start this program from the _start symbol, with Modified: stable/10/sys/dev/adb/adb_kbd.c ============================================================================== --- stable/10/sys/dev/adb/adb_kbd.c Wed May 14 00:55:21 2014 (r265997) +++ stable/10/sys/dev/adb/adb_kbd.c Wed May 14 01:16:05 2014 (r265998) @@ -621,7 +621,7 @@ akbd_read_char(keyboard_t *kbd, int wait if (!sc->buffers) { mtx_unlock(&sc->sc_mutex); - return (0); + return (NOKEY); } adb_code = sc->buffer[0]; Modified: stable/10/sys/dev/uart/uart_cpu_fdt.c ============================================================================== --- stable/10/sys/dev/uart/uart_cpu_fdt.c Wed May 14 00:55:21 2014 (r265997) +++ stable/10/sys/dev/uart/uart_cpu_fdt.c Wed May 14 01:16:05 2014 (r265998) @@ -142,14 +142,19 @@ uart_cpu_getdev(int devtype, struct uart /* * Retrieve /chosen/std{in,out}. */ - if ((chosen = OF_finddevice("/chosen")) == -1) - return (ENXIO); - for (name = propnames; *name != NULL; name++) { - if (phandle_chosen_propdev(chosen, *name, &node) == 0) - break; + node = -1; + if ((chosen = OF_finddevice("/chosen")) != -1) { + for (name = propnames; *name != NULL; name++) { + if (phandle_chosen_propdev(chosen, *name, &node) == 0) + break; + } } - if (*name == NULL) + if (chosen == -1 || *name == NULL) + node = OF_finddevice("serial0"); /* Last ditch */ + + if (node == -1) /* Can't find anything */ return (ENXIO); + /* * Retrieve serial attributes. */ Modified: stable/10/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- stable/10/sys/powerpc/aim/mmu_oea64.c Wed May 14 00:55:21 2014 (r265997) +++ stable/10/sys/powerpc/aim/mmu_oea64.c Wed May 14 01:16:05 2014 (r265998) @@ -501,15 +501,7 @@ moea64_add_ofw_mappings(mmu_t mmup, phan qsort(translations, sz, sizeof (*translations), om_cmp); for (i = 0; i < sz; i++) { - CTR3(KTR_PMAP, "translation: pa=%#x va=%#x len=%#x", - (uint32_t)(translations[i].om_pa_lo), translations[i].om_va, - translations[i].om_len); - - if (translations[i].om_pa_lo % PAGE_SIZE) - panic("OFW translation not page-aligned!"); - pa_base = translations[i].om_pa_lo; - #ifdef __powerpc64__ pa_base += (vm_offset_t)translations[i].om_pa_hi << 32; #else @@ -517,6 +509,14 @@ moea64_add_ofw_mappings(mmu_t mmup, phan panic("OFW translations above 32-bit boundary!"); #endif + if (pa_base % PAGE_SIZE) + panic("OFW translation not page-aligned (phys)!"); + if (translations[i].om_va % PAGE_SIZE) + panic("OFW translation not page-aligned (virt)!"); + + CTR3(KTR_PMAP, "translation: pa=%#zx va=%#x len=%#x", + pa_base, translations[i].om_va, translations[i].om_len); + /* Now enter the pages for this mapping */ DISABLE_TRANS(msr); @@ -693,9 +693,9 @@ moea64_early_bootstrap(mmu_t mmup, vm_of hwphyssz = 0; TUNABLE_ULONG_FETCH("hw.physmem", (u_long *) &hwphyssz); for (i = 0, j = 0; i < regions_sz; i++, j += 2) { - CTR3(KTR_PMAP, "region: %#x - %#x (%#x)", regions[i].mr_start, - regions[i].mr_start + regions[i].mr_size, - regions[i].mr_size); + CTR3(KTR_PMAP, "region: %#zx - %#zx (%#zx)", + regions[i].mr_start, regions[i].mr_start + + regions[i].mr_size, regions[i].mr_size); if (hwphyssz != 0 && (physsz + regions[i].mr_size) >= hwphyssz) { if (physsz < hwphyssz) { Modified: stable/10/sys/powerpc/booke/pmap.c ============================================================================== --- stable/10/sys/powerpc/booke/pmap.c Wed May 14 00:55:21 2014 (r265997) +++ stable/10/sys/powerpc/booke/pmap.c Wed May 14 01:16:05 2014 (r265998) @@ -189,6 +189,7 @@ static tlb_entry_t tlb1[TLB1_ENTRIES]; /* Next free entry in the TLB1 */ static unsigned int tlb1_idx; +static vm_offset_t tlb1_map_base = VM_MAX_KERNEL_ADDRESS; static tlbtid_t tid_alloc(struct pmap *); @@ -2681,11 +2682,23 @@ mmu_booke_mapdev_attr(mmu_t mmu, vm_padd size = roundup(size, PAGE_SIZE); + /* + * We leave a hole for device direct mapping between the maximum user + * address (0x8000000) and the minimum KVA address (0xc0000000). If + * devices are in there, just map them 1:1. If not, map them to the + * device mapping area about VM_MAX_KERNEL_ADDRESS. These mapped + * addresses should be pulled from an allocator, but since we do not + * ever free TLB1 entries, it is safe just to increment a counter. + * Note that there isn't a lot of address space here (128 MB) and it + * is not at all difficult to imagine running out, since that is a 4:1 + * compression from the 0xc0000000 - 0xf0000000 address space that gets + * mapped there. + */ if (pa >= (VM_MAXUSER_ADDRESS + PAGE_SIZE) && (pa + size - 1) < VM_MIN_KERNEL_ADDRESS) va = pa; else - va = kva_alloc(size); + va = atomic_fetchadd_int(&tlb1_map_base, size); res = (void *)va; do { @@ -3085,7 +3098,7 @@ tlb1_mapin_region(vm_offset_t va, vm_pad } mapped = (va - base); - debugf("mapped size 0x%08x (wasted space 0x%08x)\n", + printf("mapped size 0x%08x (wasted space 0x%08x)\n", mapped, mapped - size); return (mapped); } @@ -3148,7 +3161,6 @@ tlb1_init() vm_offset_t pmap_early_io_map(vm_paddr_t pa, vm_size_t size) { - static vm_offset_t early_io_map_base = VM_MAX_KERNEL_ADDRESS; vm_paddr_t pa_base; vm_offset_t va, sz; int i; @@ -3165,14 +3177,14 @@ pmap_early_io_map(vm_paddr_t pa, vm_size pa_base = trunc_page(pa); size = roundup(size + (pa - pa_base), PAGE_SIZE); - va = early_io_map_base + (pa - pa_base); + va = tlb1_map_base + (pa - pa_base); do { sz = 1 << (ilog2(size) & ~1); - tlb1_set_entry(early_io_map_base, pa_base, sz, _TLB_ENTRY_IO); + tlb1_set_entry(tlb1_map_base, pa_base, sz, _TLB_ENTRY_IO); size -= sz; pa_base += sz; - early_io_map_base += sz; + tlb1_map_base += sz; } while (size > 0); #ifdef SMP Modified: stable/10/sys/powerpc/include/vmparam.h ============================================================================== --- stable/10/sys/powerpc/include/vmparam.h Wed May 14 00:55:21 2014 (r265997) +++ stable/10/sys/powerpc/include/vmparam.h Wed May 14 01:16:05 2014 (r265998) @@ -112,6 +112,7 @@ #define VM_MIN_KERNEL_ADDRESS KERNBASE #define VM_MAX_KERNEL_ADDRESS 0xf8000000 +#define VM_MAX_SAFE_KERNEL_ADDRESS VM_MAX_KERNEL_ADDRESS #endif /* AIM/E500 */ @@ -175,14 +176,21 @@ struct pmap_physseg { #define VM_KMEM_SIZE (12 * 1024 * 1024) #endif -#ifdef __powerpc64__ +/* + * How many physical pages per KVA page allocated. + * min(max(VM_KMEM_SIZE, Physical memory/VM_KMEM_SIZE_SCALE), VM_KMEM_SIZE_MAX) + * is the total KVA space allocated for kmem_map. + */ #ifndef VM_KMEM_SIZE_SCALE -#define VM_KMEM_SIZE_SCALE (3) +#define VM_KMEM_SIZE_SCALE (3) #endif +/* + * Ceiling on the amount of kmem_map KVA space: 40% of the entire KVA space. + */ #ifndef VM_KMEM_SIZE_MAX -#define VM_KMEM_SIZE_MAX 0x1c0000000 /* 7 GB */ -#endif +#define VM_KMEM_SIZE_MAX ((VM_MAX_SAFE_KERNEL_ADDRESS - \ + VM_MIN_KERNEL_ADDRESS + 1) * 2 / 5) #endif #define ZERO_REGION_SIZE (64 * 1024) /* 64KB */ From owner-svn-src-stable@FreeBSD.ORG Wed May 14 01:35:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04985C44; Wed, 14 May 2014 01:35:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E23C2263B; Wed, 14 May 2014 01:35:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4E1ZrXT021353; Wed, 14 May 2014 01:35:53 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4E1ZiFF021291; Wed, 14 May 2014 01:35:44 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405140135.s4E1ZiFF021291@svn.freebsd.org> From: Ian Lepore Date: Wed, 14 May 2014 01:35:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265999 - in stable/10/sys: arm/at91 arm/econa arm/s3c2xx0 arm/sa11x0 arm/xscale/i80321 arm/xscale/pxa dev/acpica dev/altera/atse dev/altera/avgen dev/altera/jtag_uart dev/altera/sdcard... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 01:35:54 -0000 Author: ian Date: Wed May 14 01:35:43 2014 New Revision: 265999 URL: http://svnweb.freebsd.org/changeset/base/265999 Log: MFC r257334, r257336, r257337, r257338, r257341, r257342, r257343, r257370, r257368, r257416 Hints-only devices should return BUS_PROBE_NOWILDCARD from their probe methods. Modified: stable/10/sys/arm/at91/at91.c stable/10/sys/arm/econa/econa.c stable/10/sys/arm/s3c2xx0/s3c24x0.c stable/10/sys/arm/sa11x0/sa11x0.c stable/10/sys/arm/xscale/i80321/iq80321.c stable/10/sys/arm/xscale/pxa/pxa_obio.c stable/10/sys/dev/acpica/acpi.c stable/10/sys/dev/altera/atse/if_atse_nexus.c stable/10/sys/dev/altera/avgen/altera_avgen_nexus.c stable/10/sys/dev/altera/jtag_uart/altera_jtag_uart_nexus.c stable/10/sys/dev/altera/sdcard/altera_sdcard_nexus.c stable/10/sys/dev/cfe/cfe_resource.c stable/10/sys/dev/gxemul/disk/gxemul_disk.c stable/10/sys/dev/gxemul/ether/if_gx.c stable/10/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c stable/10/sys/dev/rt/if_rt.c stable/10/sys/dev/terasic/de4led/terasic_de4led_nexus.c stable/10/sys/dev/terasic/mtl/terasic_mtl_nexus.c stable/10/sys/dev/xen/console/console.c stable/10/sys/dev/xen/pcifront/pcifront.c stable/10/sys/dev/xen/timer/timer.c stable/10/sys/mips/adm5120/obio.c stable/10/sys/mips/alchemy/obio.c stable/10/sys/mips/atheros/apb.c stable/10/sys/mips/atheros/ar71xx_ehci.c stable/10/sys/mips/atheros/ar71xx_pci.c stable/10/sys/mips/atheros/ar71xx_spi.c stable/10/sys/mips/atheros/ar71xx_wdog.c stable/10/sys/mips/atheros/ar724x_pci.c stable/10/sys/mips/atheros/if_arge.c stable/10/sys/mips/cavium/ciu.c stable/10/sys/mips/cavium/octeon_ebt3000_cf.c stable/10/sys/mips/cavium/octeon_pmc.c stable/10/sys/mips/cavium/octeon_rnd.c stable/10/sys/mips/cavium/octeon_rtc.c stable/10/sys/mips/idt/obio.c stable/10/sys/mips/malta/gt.c stable/10/sys/mips/mips/tick.c stable/10/sys/mips/nlm/tick.c stable/10/sys/mips/nlm/xlp_pci.c stable/10/sys/mips/rmi/iodi.c stable/10/sys/mips/rmi/tick.c stable/10/sys/mips/rt305x/obio.c stable/10/sys/mips/sibyte/sb_zbbus.c stable/10/sys/modules/Makefile stable/10/sys/powerpc/pseries/plpar_iommu.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/at91/at91.c ============================================================================== --- stable/10/sys/arm/at91/at91.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/arm/at91/at91.c Wed May 14 01:35:43 2014 (r265999) @@ -232,8 +232,7 @@ at91_probe(device_t dev) { device_set_desc(dev, "AT91 device bus"); - arm_post_filter = at91_eoi; - return (0); + return (BUS_PROBE_NOWILDCARD); } static void @@ -262,6 +261,8 @@ at91_attach(device_t dev) const struct arm_devmap_entry *pdevmap; int i; + arm_post_filter = at91_eoi; + at91_softc = sc; sc->sc_st = &at91_bs_tag; sc->sc_sh = AT91_BASE; Modified: stable/10/sys/arm/econa/econa.c ============================================================================== --- stable/10/sys/arm/econa/econa.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/arm/econa/econa.c Wed May 14 01:35:43 2014 (r265999) @@ -172,7 +172,7 @@ econa_probe(device_t dev) { device_set_desc(dev, "ECONA device bus"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static void Modified: stable/10/sys/arm/s3c2xx0/s3c24x0.c ============================================================================== --- stable/10/sys/arm/s3c2xx0/s3c24x0.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/arm/s3c2xx0/s3c24x0.c Wed May 14 01:35:43 2014 (r265999) @@ -429,7 +429,7 @@ s3c24x0_identify(driver_t *driver, devic int s3c24x0_probe(device_t dev) { - return 0; + return (BUS_PROBE_NOWILDCARD); } int Modified: stable/10/sys/arm/sa11x0/sa11x0.c ============================================================================== --- stable/10/sys/arm/sa11x0/sa11x0.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/arm/sa11x0/sa11x0.c Wed May 14 01:35:43 2014 (r265999) @@ -139,7 +139,7 @@ extern vm_offset_t saipic_base; int sa11x0_probe(device_t dev) { - return 0; + return (BUS_PROBE_NOWILDCARD); } void Modified: stable/10/sys/arm/xscale/i80321/iq80321.c ============================================================================== --- stable/10/sys/arm/xscale/i80321/iq80321.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/arm/xscale/i80321/iq80321.c Wed May 14 01:35:43 2014 (r265999) @@ -72,7 +72,7 @@ int iq80321_probe(device_t dev) { device_set_desc(dev, "Intel 80321"); - return (0); + return (BUS_PROBE_NOWILDCARD); } void Modified: stable/10/sys/arm/xscale/pxa/pxa_obio.c ============================================================================== --- stable/10/sys/arm/xscale/pxa/pxa_obio.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/arm/xscale/pxa/pxa_obio.c Wed May 14 01:35:43 2014 (r265999) @@ -92,7 +92,7 @@ pxa_probe(device_t dev) { device_set_desc(dev, "XScale PXA On-board IO"); - return (0); + return (BUS_PROBE_NOWILDCARD); } int Modified: stable/10/sys/dev/acpica/acpi.c ============================================================================== --- stable/10/sys/dev/acpica/acpi.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/dev/acpica/acpi.c Wed May 14 01:35:43 2014 (r265999) @@ -431,7 +431,7 @@ acpi_probe(device_t dev) device_set_desc(dev, acpi_desc); - return_VALUE (0); + return_VALUE (BUS_PROBE_NOWILDCARD); } static int Modified: stable/10/sys/dev/altera/atse/if_atse_nexus.c ============================================================================== --- stable/10/sys/dev/altera/atse/if_atse_nexus.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/dev/altera/atse/if_atse_nexus.c Wed May 14 01:35:43 2014 (r265999) @@ -129,7 +129,7 @@ atse_probe_nexus(device_t dev) /* Success. */ device_set_desc(dev, "Altera Triple-Speed Ethernet MegaCore"); - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_NOWILDCARD); } static int Modified: stable/10/sys/dev/altera/avgen/altera_avgen_nexus.c ============================================================================== --- stable/10/sys/dev/altera/avgen/altera_avgen_nexus.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/dev/altera/avgen/altera_avgen_nexus.c Wed May 14 01:35:43 2014 (r265999) @@ -58,7 +58,7 @@ altera_avgen_nexus_probe(device_t dev) { device_set_desc(dev, "Generic Altera Avalon device attachment"); - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_NOWILDCARD); } static int Modified: stable/10/sys/dev/altera/jtag_uart/altera_jtag_uart_nexus.c ============================================================================== --- stable/10/sys/dev/altera/jtag_uart/altera_jtag_uart_nexus.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/dev/altera/jtag_uart/altera_jtag_uart_nexus.c Wed May 14 01:35:43 2014 (r265999) @@ -62,7 +62,7 @@ altera_jtag_uart_nexus_probe(device_t de { device_set_desc(dev, "Altera JTAG UART"); - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_NOWILDCARD); } static int Modified: stable/10/sys/dev/altera/sdcard/altera_sdcard_nexus.c ============================================================================== --- stable/10/sys/dev/altera/sdcard/altera_sdcard_nexus.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/dev/altera/sdcard/altera_sdcard_nexus.c Wed May 14 01:35:43 2014 (r265999) @@ -62,7 +62,7 @@ altera_sdcard_nexus_probe(device_t dev) { device_set_desc(dev, "Altera Secure Data Card IP Core"); - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_NOWILDCARD); } static int Modified: stable/10/sys/dev/cfe/cfe_resource.c ============================================================================== --- stable/10/sys/dev/cfe/cfe_resource.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/dev/cfe/cfe_resource.c Wed May 14 01:35:43 2014 (r265999) @@ -61,7 +61,7 @@ static int cferes_probe(device_t dev) { - return (0); + return (BUS_PROBE_NOWILDCARD); } static int Modified: stable/10/sys/dev/gxemul/disk/gxemul_disk.c ============================================================================== --- stable/10/sys/dev/gxemul/disk/gxemul_disk.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/dev/gxemul/disk/gxemul_disk.c Wed May 14 01:35:43 2014 (r265999) @@ -158,7 +158,7 @@ gxemul_disk_probe(device_t dev) { device_set_desc(dev, "GXemul test disk"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static void Modified: stable/10/sys/dev/gxemul/ether/if_gx.c ============================================================================== --- stable/10/sys/dev/gxemul/ether/if_gx.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/dev/gxemul/ether/if_gx.c Wed May 14 01:35:43 2014 (r265999) @@ -125,7 +125,7 @@ gx_probe(device_t dev) device_set_desc(dev, "GXemul test Ethernet"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static int Modified: stable/10/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c ============================================================================== --- stable/10/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c Wed May 14 01:35:43 2014 (r265999) @@ -313,7 +313,7 @@ vmbus_probe(device_t dev) { device_set_desc(dev, "Vmbus Devices"); - return (0); + return (BUS_PROBE_NOWILDCARD); } /** Modified: stable/10/sys/dev/rt/if_rt.c ============================================================================== --- stable/10/sys/dev/rt/if_rt.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/dev/rt/if_rt.c Wed May 14 01:35:43 2014 (r265999) @@ -148,7 +148,7 @@ static int rt_probe(device_t dev) { device_set_desc(dev, "Ralink RT305XF onChip Ethernet MAC"); - return (0); + return (BUS_PROBE_NOWILDCARD); } /* Modified: stable/10/sys/dev/terasic/de4led/terasic_de4led_nexus.c ============================================================================== --- stable/10/sys/dev/terasic/de4led/terasic_de4led_nexus.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/dev/terasic/de4led/terasic_de4led_nexus.c Wed May 14 01:35:43 2014 (r265999) @@ -58,7 +58,7 @@ terasic_de4led_nexus_probe(device_t dev) { device_set_desc(dev, "Terasic DE4 8-element LED"); - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_NOWILDCARD); } static int Modified: stable/10/sys/dev/terasic/mtl/terasic_mtl_nexus.c ============================================================================== --- stable/10/sys/dev/terasic/mtl/terasic_mtl_nexus.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/dev/terasic/mtl/terasic_mtl_nexus.c Wed May 14 01:35:43 2014 (r265999) @@ -55,7 +55,7 @@ terasic_mtl_nexus_probe(device_t dev) { device_set_desc(dev, "Terasic Multi-touch LCD (MTL)"); - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_NOWILDCARD); } static int Modified: stable/10/sys/dev/xen/console/console.c ============================================================================== --- stable/10/sys/dev/xen/console/console.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/dev/xen/console/console.c Wed May 14 01:35:43 2014 (r265999) @@ -226,7 +226,7 @@ static int xc_probe(device_t dev) { - return (0); + return (BUS_PROBE_NOWILDCARD); } static int Modified: stable/10/sys/dev/xen/pcifront/pcifront.c ============================================================================== --- stable/10/sys/dev/xen/pcifront/pcifront.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/dev/xen/pcifront/pcifront.c Wed May 14 01:35:43 2014 (r265999) @@ -441,7 +441,7 @@ xpcife_probe(device_t dev) struct pcifront_device *pdev = (struct pcifront_device *)device_get_ivars(dev); DPRINTF("xpcife probe (unit=%d)\n", pdev->unit); #endif - return 0; + return (BUS_PROBE_NOWILDCARD); } /* Newbus xpcife device driver attach */ Modified: stable/10/sys/dev/xen/timer/timer.c ============================================================================== --- stable/10/sys/dev/xen/timer/timer.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/dev/xen/timer/timer.c Wed May 14 01:35:43 2014 (r265999) @@ -142,7 +142,7 @@ xentimer_probe(device_t dev) "VCPUOPs interface unavailable\n"); #undef XTREQUIRES device_set_desc(dev, "Xen PV Clock"); - return (0); + return (BUS_PROBE_NOWILDCARD); } /* Modified: stable/10/sys/mips/adm5120/obio.c ============================================================================== --- stable/10/sys/mips/adm5120/obio.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/mips/adm5120/obio.c Wed May 14 01:35:43 2014 (r265999) @@ -157,7 +157,7 @@ static int obio_probe(device_t dev) { - return (0); + return (BUS_PROBE_NOWILDCARD); } static int Modified: stable/10/sys/mips/alchemy/obio.c ============================================================================== --- stable/10/sys/mips/alchemy/obio.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/mips/alchemy/obio.c Wed May 14 01:35:43 2014 (r265999) @@ -158,7 +158,7 @@ static int obio_probe(device_t dev) { - return (0); + return (BUS_PROBE_NOWILDCARD); } static int Modified: stable/10/sys/mips/atheros/apb.c ============================================================================== --- stable/10/sys/mips/atheros/apb.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/mips/atheros/apb.c Wed May 14 01:35:43 2014 (r265999) @@ -103,7 +103,7 @@ static int apb_probe(device_t dev) { - return (0); + return (BUS_PROBE_NOWILDCARD); } static int Modified: stable/10/sys/mips/atheros/ar71xx_ehci.c ============================================================================== --- stable/10/sys/mips/atheros/ar71xx_ehci.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/mips/atheros/ar71xx_ehci.c Wed May 14 01:35:43 2014 (r265999) @@ -75,7 +75,7 @@ ar71xx_ehci_probe(device_t self) device_set_desc(self, EHCI_HC_DEVSTR); - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_NOWILDCARD); } static int Modified: stable/10/sys/mips/atheros/ar71xx_pci.c ============================================================================== --- stable/10/sys/mips/atheros/ar71xx_pci.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/mips/atheros/ar71xx_pci.c Wed May 14 01:35:43 2014 (r265999) @@ -371,7 +371,7 @@ static int ar71xx_pci_probe(device_t dev) { - return (0); + return (BUS_PROBE_NOWILDCARD); } static int Modified: stable/10/sys/mips/atheros/ar71xx_spi.c ============================================================================== --- stable/10/sys/mips/atheros/ar71xx_spi.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/mips/atheros/ar71xx_spi.c Wed May 14 01:35:43 2014 (r265999) @@ -84,7 +84,7 @@ static int ar71xx_spi_probe(device_t dev) { device_set_desc(dev, "AR71XX SPI"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static int Modified: stable/10/sys/mips/atheros/ar71xx_wdog.c ============================================================================== --- stable/10/sys/mips/atheros/ar71xx_wdog.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/mips/atheros/ar71xx_wdog.c Wed May 14 01:35:43 2014 (r265999) @@ -92,7 +92,7 @@ ar71xx_wdog_probe(device_t dev) { device_set_desc(dev, "Atheros AR71XX watchdog timer"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static void Modified: stable/10/sys/mips/atheros/ar724x_pci.c ============================================================================== --- stable/10/sys/mips/atheros/ar724x_pci.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/mips/atheros/ar724x_pci.c Wed May 14 01:35:43 2014 (r265999) @@ -349,7 +349,7 @@ static int ar724x_pci_probe(device_t dev) { - return (0); + return (BUS_PROBE_NOWILDCARD); } static int Modified: stable/10/sys/mips/atheros/if_arge.c ============================================================================== --- stable/10/sys/mips/atheros/if_arge.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/mips/atheros/if_arge.c Wed May 14 01:35:43 2014 (r265999) @@ -260,7 +260,7 @@ arge_probe(device_t dev) { device_set_desc(dev, "Atheros AR71xx built-in ethernet interface"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static void Modified: stable/10/sys/mips/cavium/ciu.c ============================================================================== --- stable/10/sys/mips/cavium/ciu.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/mips/cavium/ciu.c Wed May 14 01:35:43 2014 (r265999) @@ -109,7 +109,7 @@ ciu_probe(device_t dev) return (ENXIO); device_set_desc(dev, "Cavium Octeon Central Interrupt Unit"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static int Modified: stable/10/sys/mips/cavium/octeon_ebt3000_cf.c ============================================================================== --- stable/10/sys/mips/cavium/octeon_ebt3000_cf.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/mips/cavium/octeon_ebt3000_cf.c Wed May 14 01:35:43 2014 (r265999) @@ -599,7 +599,7 @@ static int cf_probe (device_t dev) device_set_desc(dev, "Octeon Compact Flash Driver"); - return (0); + return (BUS_PROBE_NOWILDCARD); } /* ------------------------------------------------------------------- * Modified: stable/10/sys/mips/cavium/octeon_pmc.c ============================================================================== --- stable/10/sys/mips/cavium/octeon_pmc.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/mips/cavium/octeon_pmc.c Wed May 14 01:35:43 2014 (r265999) @@ -71,7 +71,7 @@ octeon_pmc_probe(device_t dev) return (ENXIO); device_set_desc(dev, "Cavium Octeon Performance Counters"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static int Modified: stable/10/sys/mips/cavium/octeon_rnd.c ============================================================================== --- stable/10/sys/mips/cavium/octeon_rnd.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/mips/cavium/octeon_rnd.c Wed May 14 01:35:43 2014 (r265999) @@ -86,7 +86,7 @@ octeon_rnd_probe(device_t dev) return (ENXIO); device_set_desc(dev, "Cavium Octeon Random Number Generator"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static int Modified: stable/10/sys/mips/cavium/octeon_rtc.c ============================================================================== --- stable/10/sys/mips/cavium/octeon_rtc.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/mips/cavium/octeon_rtc.c Wed May 14 01:35:43 2014 (r265999) @@ -81,7 +81,7 @@ octeon_rtc_probe(device_t dev) return (ENXIO); device_set_desc(dev, "Cavium Octeon Realtime Clock"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static int Modified: stable/10/sys/mips/idt/obio.c ============================================================================== --- stable/10/sys/mips/idt/obio.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/mips/idt/obio.c Wed May 14 01:35:43 2014 (r265999) @@ -108,7 +108,7 @@ static int obio_probe(device_t dev) { - return (0); + return (BUS_PROBE_NOWILDCARD); } static int Modified: stable/10/sys/mips/malta/gt.c ============================================================================== --- stable/10/sys/mips/malta/gt.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/mips/malta/gt.c Wed May 14 01:35:43 2014 (r265999) @@ -51,7 +51,7 @@ static int gt_probe(device_t dev) { device_set_desc(dev, "GT64120 chip"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static void Modified: stable/10/sys/mips/mips/tick.c ============================================================================== --- stable/10/sys/mips/mips/tick.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/mips/mips/tick.c Wed May 14 01:35:43 2014 (r265999) @@ -313,7 +313,7 @@ clock_probe(device_t dev) panic("can't attach more clocks"); device_set_desc(dev, "Generic MIPS32 ticker"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static void Modified: stable/10/sys/mips/nlm/tick.c ============================================================================== --- stable/10/sys/mips/nlm/tick.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/mips/nlm/tick.c Wed May 14 01:35:43 2014 (r265999) @@ -318,7 +318,7 @@ clock_probe(device_t dev) panic("can't attach more clocks"); device_set_desc(dev, "Generic MIPS32 ticker"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static void Modified: stable/10/sys/mips/nlm/xlp_pci.c ============================================================================== --- stable/10/sys/mips/nlm/xlp_pci.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/mips/nlm/xlp_pci.c Wed May 14 01:35:43 2014 (r265999) @@ -383,8 +383,7 @@ xlp_pcib_probe(device_t dev) { device_set_desc(dev, "XLP PCI bus"); - xlp_pcib_init_resources(); - return (0); + return (BUS_PROBE_NOWILDCARD); } static int @@ -524,6 +523,8 @@ xlp_pcib_attach(device_t dev) { int node, link; + xlp_pcib_init_resources(); + /* enable hardware swap on all nodes/links */ for (node = 0; node < XLP_MAX_NODES; node++) for (link = 0; link < 4; link++) Modified: stable/10/sys/mips/rmi/iodi.c ============================================================================== --- stable/10/sys/mips/rmi/iodi.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/mips/rmi/iodi.c Wed May 14 01:35:43 2014 (r265999) @@ -190,7 +190,7 @@ static void iodi_identify(driver_t *, de int iodi_probe(device_t dev) { - return 0; + return (BUS_PROBE_NOWILDCARD); } void Modified: stable/10/sys/mips/rmi/tick.c ============================================================================== --- stable/10/sys/mips/rmi/tick.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/mips/rmi/tick.c Wed May 14 01:35:43 2014 (r265999) @@ -315,7 +315,7 @@ clock_probe(device_t dev) panic("can't attach more clocks"); device_set_desc(dev, "Generic MIPS32 ticker"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static void Modified: stable/10/sys/mips/rt305x/obio.c ============================================================================== --- stable/10/sys/mips/rt305x/obio.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/mips/rt305x/obio.c Wed May 14 01:35:43 2014 (r265999) @@ -148,7 +148,7 @@ static int obio_probe(device_t dev) { - return (0); + return (BUS_PROBE_NOWILDCARD); } static int Modified: stable/10/sys/mips/sibyte/sb_zbbus.c ============================================================================== --- stable/10/sys/mips/sibyte/sb_zbbus.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/mips/sibyte/sb_zbbus.c Wed May 14 01:35:43 2014 (r265999) @@ -207,7 +207,7 @@ zbbus_probe(device_t dev) { device_set_desc(dev, "Broadcom/Sibyte ZBbus"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static int Modified: stable/10/sys/modules/Makefile ============================================================================== --- stable/10/sys/modules/Makefile Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/modules/Makefile Wed May 14 01:35:43 2014 (r265999) @@ -2,6 +2,8 @@ .include +SUBDIR_PARALLEL= + # Modules that include binary-only blobs of microcode should be selectable by # MK_SOURCELESS_UCODE option (see below). Modified: stable/10/sys/powerpc/pseries/plpar_iommu.c ============================================================================== --- stable/10/sys/powerpc/pseries/plpar_iommu.c Wed May 14 01:16:05 2014 (r265998) +++ stable/10/sys/powerpc/pseries/plpar_iommu.c Wed May 14 01:35:43 2014 (r265999) @@ -69,7 +69,7 @@ struct dma_window { }; int -phyp_iommu_set_dma_tag(device_t dev, device_t child, bus_dma_tag_t tag) +phyp_iommu_set_dma_tag(device_t bus, device_t dev, bus_dma_tag_t tag) { device_t p; phandle_t node; @@ -77,7 +77,7 @@ phyp_iommu_set_dma_tag(device_t dev, dev struct iommu_map *i; int cell; - for (p = child; p != NULL; p = device_get_parent(p)) { + for (p = dev; device_get_parent(p) != NULL; p = device_get_parent(p)) { if (ofw_bus_has_prop(p, "ibm,my-dma-window")) break; if (ofw_bus_has_prop(p, "ibm,dma-window")) @@ -150,7 +150,7 @@ phyp_iommu_set_dma_tag(device_t dev, dev papr_supports_stuff_tce = !(phyp_hcall(H_STUFF_TCE, window->map->iobn, 0, 0, 0) == H_FUNCTION); - bus_dma_tag_set_iommu(tag, dev, window); + bus_dma_tag_set_iommu(tag, bus, window); return (0); } From owner-svn-src-stable@FreeBSD.ORG Wed May 14 01:53:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A276151; Wed, 14 May 2014 01:53:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 343BA2798; Wed, 14 May 2014 01:53:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4E1rO05029580; Wed, 14 May 2014 01:53:24 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4E1rLEI029563; Wed, 14 May 2014 01:53:21 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405140153.s4E1rLEI029563@svn.freebsd.org> From: Ian Lepore Date: Wed, 14 May 2014 01:53:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266000 - in stable/10/sys: arm/arm arm/broadcom/bcm2835 arm/freescale/imx arm/mv conf dev/fdt dev/mii dev/ofw mips/mips powerpc/booke powerpc/mpc85xx X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 01:53:24 -0000 Author: ian Date: Wed May 14 01:53:20 2014 New Revision: 266000 URL: http://svnweb.freebsd.org/changeset/base/266000 Log: MFC r257702, r257745, r257746, r257747, r257751, r257791, r257793, r257794, r257795, r257992 Teach nexus(4) about Open Firmware (e.g. FDT) on ARM and MIPS, retiring fdtbus in most cases. Make OF_nextprop() work correctly for FDT by using the libfdt fdt_next_property_offset() API. Do not panic if pmap_mincore() is called. An addendum: it is possible, though of questionable utility, for a node to have no properties at all. Add definition for the Atheros 8021 gigabit PHY. Consolidate Apple firmware hacks and improve them by switching on the presence of mac-io devices in the tree, which uniquely identifies Apple hardware. Allow OF_decode_addr() to also be able to map resources on big-endian devices. Make tsec work with the device tree present on the RB800. Be more flexible about which compatible strings to accept. This brings up the PCI Express bus on the RB800 using the firmware device tree. Rename the "bare" platform "mpc85xx", which is what it actually is, and add actual platform probing based on PVR. Modified: stable/10/sys/arm/arm/nexus.c stable/10/sys/arm/broadcom/bcm2835/bcm2835_fb.c stable/10/sys/arm/freescale/imx/tzic.c stable/10/sys/arm/mv/mv_localbus.c stable/10/sys/arm/mv/mv_pci.c stable/10/sys/conf/files stable/10/sys/dev/fdt/simplebus.c stable/10/sys/dev/mii/atphy.c stable/10/sys/dev/mii/miidevs stable/10/sys/dev/ofw/ofw_fdt.c stable/10/sys/mips/mips/nexus.c stable/10/sys/powerpc/booke/pmap.c stable/10/sys/powerpc/mpc85xx/lbc.c stable/10/sys/powerpc/mpc85xx/pci_mpc85xx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/nexus.c ============================================================================== --- stable/10/sys/arm/arm/nexus.c Wed May 14 01:35:43 2014 (r265999) +++ stable/10/sys/arm/arm/nexus.c Wed May 14 01:53:20 2014 (r266000) @@ -60,6 +60,12 @@ __FBSDID("$FreeBSD$"); #include #include +#include "opt_platform.h" + +#ifdef FDT +#include +#include +#else static MALLOC_DEFINE(M_NEXUSDEV, "nexusdev", "Nexus device"); struct nexus_device { @@ -76,13 +82,18 @@ static int nexus_print_child(device_t, d static device_t nexus_add_child(device_t, u_int, const char *, int); static struct resource *nexus_alloc_resource(device_t, device_t, int, int *, u_long, u_long, u_long, u_int); +#endif static int nexus_activate_resource(device_t, device_t, int, int, struct resource *); +static int nexus_deactivate_resource(device_t, device_t, int, int, + struct resource *); + static int nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep); static int nexus_teardown_intr(device_t, device_t, struct resource *, void *); static device_method_t nexus_methods[] = { +#ifndef FDT /* Device interface */ DEVMETHOD(device_probe, nexus_probe), DEVMETHOD(device_attach, nexus_attach), @@ -90,19 +101,28 @@ static device_method_t nexus_methods[] = DEVMETHOD(bus_print_child, nexus_print_child), DEVMETHOD(bus_add_child, nexus_add_child), DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), +#endif DEVMETHOD(bus_activate_resource, nexus_activate_resource), + DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), DEVMETHOD(bus_setup_intr, nexus_setup_intr), DEVMETHOD(bus_teardown_intr, nexus_teardown_intr), { 0, 0 } }; +static devclass_t nexus_devclass; +#ifndef FDT static driver_t nexus_driver = { "nexus", nexus_methods, 1 /* no softc */ }; -static devclass_t nexus_devclass; +#else +DEFINE_CLASS_1(nexus, nexus_driver, nexus_methods, + sizeof(struct ofw_nexus_softc), ofw_nexus_driver); +#endif +DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0); +#ifndef FDT static int nexus_probe(device_t dev) { @@ -113,30 +133,6 @@ nexus_probe(device_t dev) } static int -nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags, - driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep) -{ - int irq; - - if ((rman_get_flags(res) & RF_SHAREABLE) == 0) - flags |= INTR_EXCL; - - for (irq = rman_get_start(res); irq <= rman_get_end(res); irq++) { - arm_setup_irqhandler(device_get_nameunit(child), - filt, intr, arg, irq, flags, cookiep); - arm_unmask_irq(irq); - } - return (0); -} - -static int -nexus_teardown_intr(device_t dev, device_t child, struct resource *r, void *ih) -{ - - return (arm_remove_irqhandler(rman_get_start(r), ih)); -} - -static int nexus_attach(device_t dev) { @@ -156,7 +152,6 @@ nexus_attach(device_t dev) return (0); } - static int nexus_print_child(device_t bus, device_t child) { @@ -193,7 +188,6 @@ nexus_add_child(device_t bus, u_int orde * child of one of our descendants, not a direct child of nexus0. * (Exceptions include footbridge.) */ -#define ARM_BUS_SPACE_MEM 1 static struct resource * nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) @@ -204,6 +198,7 @@ nexus_alloc_resource(device_t bus, devic switch (type) { case SYS_RES_MEMORY: + case SYS_RES_IOPORT: rm = &mem_rman; break; @@ -216,7 +211,6 @@ nexus_alloc_resource(device_t bus, devic return (0); rman_set_rid(rv, *rid); - rman_set_bustag(rv, (void*)ARM_BUS_SPACE_MEM); rman_set_bushandle(rv, rman_get_start(rv)); if (needactivate) { @@ -228,6 +222,31 @@ nexus_alloc_resource(device_t bus, devic return (rv); } +#endif + +static int +nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags, + driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep) +{ + int irq; + + if ((rman_get_flags(res) & RF_SHAREABLE) == 0) + flags |= INTR_EXCL; + + for (irq = rman_get_start(res); irq <= rman_get_end(res); irq++) { + arm_setup_irqhandler(device_get_nameunit(child), + filt, intr, arg, irq, flags, cookiep); + arm_unmask_irq(irq); + } + return (0); +} + +static int +nexus_teardown_intr(device_t dev, device_t child, struct resource *r, void *ih) +{ + + return (arm_remove_irqhandler(rman_get_start(r), ih)); +} static int @@ -237,7 +256,7 @@ nexus_activate_resource(device_t bus, de /* * If this is a memory resource, map it into the kernel. */ - if (rman_get_bustag(r) == (void*)ARM_BUS_SPACE_MEM) { + if (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT) { caddr_t vaddr = 0; u_int32_t paddr; u_int32_t psize; @@ -248,9 +267,21 @@ nexus_activate_resource(device_t bus, de poffs = paddr - trunc_page(paddr); vaddr = (caddr_t) pmap_mapdev(paddr-poffs, psize+poffs) + poffs; rman_set_virtual(r, vaddr); +#ifdef FDT + rman_set_bustag(r, fdtbus_bs_tag); +#else + rman_set_bustag(r, (void *)1); +#endif rman_set_bushandle(r, (bus_space_handle_t) vaddr); } return (rman_activate_resource(r)); } -DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0); +static int +nexus_deactivate_resource(device_t bus, device_t child, int type, int rid, + struct resource *res) +{ + + return (rman_deactivate_resource(res)); +} + Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_fb.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_fb.c Wed May 14 01:35:43 2014 (r265999) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_fb.c Wed May 14 01:53:20 2014 (r266000) @@ -361,7 +361,7 @@ static driver_t bcm_fb_driver = { sizeof(struct bcmsc_softc), }; -DRIVER_MODULE(bcm2835fb, fdtbus, bcm_fb_driver, bcm_fb_devclass, 0, 0); +DRIVER_MODULE(bcm2835fb, nexus, bcm_fb_driver, bcm_fb_devclass, 0, 0); /* * Video driver routines and glue. Modified: stable/10/sys/arm/freescale/imx/tzic.c ============================================================================== --- stable/10/sys/arm/freescale/imx/tzic.c Wed May 14 01:35:43 2014 (r265999) +++ stable/10/sys/arm/freescale/imx/tzic.c Wed May 14 01:53:20 2014 (r266000) @@ -142,9 +142,9 @@ static devclass_t tzic_devclass; /* * Memory space of controller located outside of device range, so let him to - * attach not only to simplebus, but fdtbus also. + * attach not only to simplebus, but nexus also. */ -EARLY_DRIVER_MODULE(tzic, fdtbus, tzic_driver, tzic_devclass, 0, 0, +EARLY_DRIVER_MODULE(tzic, nexus, tzic_driver, tzic_devclass, 0, 0, BUS_PASS_INTERRUPT); EARLY_DRIVER_MODULE(tzic, simplebus, tzic_driver, tzic_devclass, 0, 0, BUS_PASS_INTERRUPT); Modified: stable/10/sys/arm/mv/mv_localbus.c ============================================================================== --- stable/10/sys/arm/mv/mv_localbus.c Wed May 14 01:35:43 2014 (r265999) +++ stable/10/sys/arm/mv/mv_localbus.c Wed May 14 01:53:20 2014 (r266000) @@ -156,7 +156,7 @@ static struct localbus_bank localbus_ban devclass_t localbus_devclass; -DRIVER_MODULE(localbus, fdtbus, localbus_driver, localbus_devclass, 0, 0); +DRIVER_MODULE(localbus, nexus, localbus_driver, localbus_devclass, 0, 0); static int fdt_localbus_reg_decode(phandle_t node, struct localbus_softc *sc, Modified: stable/10/sys/arm/mv/mv_pci.c ============================================================================== --- stable/10/sys/arm/mv/mv_pci.c Wed May 14 01:35:43 2014 (r265999) +++ stable/10/sys/arm/mv/mv_pci.c Wed May 14 01:53:20 2014 (r266000) @@ -230,7 +230,7 @@ static driver_t mv_pcib_driver = { devclass_t pcib_devclass; -DRIVER_MODULE(pcib, fdtbus, mv_pcib_driver, pcib_devclass, 0, 0); +DRIVER_MODULE(pcib, nexus, mv_pcib_driver, pcib_devclass, 0, 0); static struct mtx pcicfg_mtx; Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Wed May 14 01:35:43 2014 (r265999) +++ stable/10/sys/conf/files Wed May 14 01:53:20 2014 (r266000) @@ -1409,7 +1409,7 @@ dev/fdt/fdt_pci.c optional fdt pci dev/fdt/fdt_slicer.c optional fdt cfi | fdt nand dev/fdt/fdt_static_dtb.S optional fdt fdt_dtb_static \ dependency "$S/boot/fdt/dts/${FDT_DTS_FILE}" -dev/fdt/fdtbus.c optional fdt +dev/fdt/fdtbus.c optional fdtbus dev/fdt/simplebus.c optional fdt dev/fe/if_fe.c optional fe dev/fe/if_fe_pccard.c optional fe pccard Modified: stable/10/sys/dev/fdt/simplebus.c ============================================================================== --- stable/10/sys/dev/fdt/simplebus.c Wed May 14 01:35:43 2014 (r265999) +++ stable/10/sys/dev/fdt/simplebus.c Wed May 14 01:53:20 2014 (r266000) @@ -138,7 +138,7 @@ static driver_t simplebus_driver = { devclass_t simplebus_devclass; -DRIVER_MODULE(simplebus, fdtbus, simplebus_driver, simplebus_devclass, 0, 0); +DRIVER_MODULE(simplebus, nexus, simplebus_driver, simplebus_devclass, 0, 0); DRIVER_MODULE(simplebus, simplebus, simplebus_driver, simplebus_devclass, 0, 0); Modified: stable/10/sys/dev/mii/atphy.c ============================================================================== --- stable/10/sys/dev/mii/atphy.c Wed May 14 01:35:43 2014 (r265999) +++ stable/10/sys/dev/mii/atphy.c Wed May 14 01:53:20 2014 (r266000) @@ -80,6 +80,7 @@ static int atphy_setmedia(struct mii_sof static const struct mii_phydesc atphys[] = { MII_PHY_DESC(xxATHEROS, F1), MII_PHY_DESC(xxATHEROS, F1_7), + MII_PHY_DESC(xxATHEROS, AR8021), MII_PHY_DESC(xxATHEROS, F2), MII_PHY_END }; Modified: stable/10/sys/dev/mii/miidevs ============================================================================== --- stable/10/sys/dev/mii/miidevs Wed May 14 01:35:43 2014 (r265999) +++ stable/10/sys/dev/mii/miidevs Wed May 14 01:53:20 2014 (r266000) @@ -136,6 +136,7 @@ model yyAMD 79c901home 0x0039 Am79C901 /* Atheros Communications/Attansic PHYs */ model xxATHEROS F1 0x0001 Atheros F1 10/100/1000 PHY model xxATHEROS F2 0x0002 Atheros F2 10/100 PHY +model xxATHEROS AR8021 0x0004 Atheros AR8021 10/100/1000 PHY model xxATHEROS F1_7 0x0007 Atheros F1 10/100/1000 PHY /* Asix semiconductor PHYs */ Modified: stable/10/sys/dev/ofw/ofw_fdt.c ============================================================================== --- stable/10/sys/dev/ofw/ofw_fdt.c Wed May 14 01:35:43 2014 (r265999) +++ stable/10/sys/dev/ofw/ofw_fdt.c Wed May 14 01:53:20 2014 (r266000) @@ -137,26 +137,6 @@ fdt_phandle_offset(phandle_t p) return (pint - dtoff); } -static int -fdt_pointer_offset(const void *ptr) -{ - uintptr_t dt_struct, p; - int offset; - - p = (uintptr_t)ptr; - dt_struct = (uintptr_t)fdtp + fdt_off_dt_struct(fdtp); - - if ((p < dt_struct) || - p > (dt_struct + fdt_size_dt_struct(fdtp))) - return (-1); - - offset = p - dt_struct; - if (offset < 0) - return (-1); - - return (offset); -} - /* Return the next sibling of this node or 0. */ static phandle_t ofw_fdt_peer(ofw_t ofw, phandle_t node) @@ -285,41 +265,6 @@ ofw_fdt_getprop(ofw_t ofw, phandle_t pac return (len); } -static int -fdt_nextprop(int offset, char *buf, size_t size) -{ - const struct fdt_property *prop; - const char *name; - uint32_t tag; - int nextoffset, depth; - - depth = 0; - tag = fdt_next_tag(fdtp, offset, &nextoffset); - - /* Find the next prop */ - do { - offset = nextoffset; - tag = fdt_next_tag(fdtp, offset, &nextoffset); - - if (tag == FDT_BEGIN_NODE) - depth++; - else if (tag == FDT_END_NODE) - depth--; - else if ((tag == FDT_PROP) && (depth == 0)) { - prop = - (const struct fdt_property *)fdt_offset_ptr(fdtp, - offset, sizeof(*prop)); - name = fdt_string(fdtp, - fdt32_to_cpu(prop->nameoff)); - strncpy(buf, name, size); - return (strlen(name)); - } else - depth = -1; - } while (depth >= 0); - - return (0); -} - /* * Get the next property of a package. Return the actual len of retrieved * prop name. @@ -329,26 +274,42 @@ ofw_fdt_nextprop(ofw_t ofw, phandle_t pa size_t size) { const struct fdt_property *prop; - int offset, rv; + const char *name; + int offset; offset = fdt_phandle_offset(package); if (offset < 0) return (-1); - if (previous == NULL) - /* Find the first prop in the node */ - return (fdt_nextprop(offset, buf, size)); + /* Find the first prop in the node */ + offset = fdt_first_property_offset(fdtp, offset); + if (offset < 0) + return (0); /* No properties */ - /* - * Advance to the previous prop - */ - prop = fdt_get_property(fdtp, offset, previous, NULL); + if (previous != NULL) { + while (offset >= 0) { + prop = fdt_get_property_by_offset(fdtp, offset, NULL); + if (prop == NULL) + return (-1); /* Internal error */ + + offset = fdt_next_property_offset(fdtp, offset); + if (offset < 0) + return (0); /* No more properties */ + + /* Check if the last one was the one we wanted */ + name = fdt_string(fdtp, fdt32_to_cpu(prop->nameoff)); + if (strcmp(name, previous) == 0) + break; + } + } + + prop = fdt_get_property_by_offset(fdtp, offset, &offset); if (prop == NULL) - return (-1); + return (-1); /* Internal error */ - offset = fdt_pointer_offset(prop); - rv = fdt_nextprop(offset, buf, size); - return (rv); + strncpy(buf, fdt_string(fdtp, fdt32_to_cpu(prop->nameoff)), size); + + return (strlen(buf)); } /* Set the value of a property of a package. */ Modified: stable/10/sys/mips/mips/nexus.c ============================================================================== --- stable/10/sys/mips/mips/nexus.c Wed May 14 01:35:43 2014 (r265999) +++ stable/10/sys/mips/mips/nexus.c Wed May 14 01:53:20 2014 (r266000) @@ -58,6 +58,12 @@ __FBSDID("$FreeBSD$"); #include #include +#include "opt_platform.h" + +#ifdef FDT +#include +#endif + #undef NEXUS_DEBUG #ifdef NEXUS_DEBUG #define dprintf printf @@ -65,6 +71,9 @@ __FBSDID("$FreeBSD$"); #define dprintf(x, arg...) #endif /* NEXUS_DEBUG */ +#define NUM_MIPS_IRQS 6 + +#ifndef FDT static MALLOC_DEFINE(M_NEXUSDEV, "nexusdev", "Nexus device"); struct nexus_device { @@ -72,7 +81,6 @@ struct nexus_device { }; #define DEVTONX(dev) ((struct nexus_device *)device_get_ivars(dev)) -#define NUM_MIPS_IRQS 6 static struct rman irq_rman; static struct rman mem_rman; @@ -80,18 +88,13 @@ static struct rman mem_rman; static struct resource * nexus_alloc_resource(device_t, device_t, int, int *, u_long, u_long, u_long, u_int); -static int nexus_activate_resource(device_t, device_t, int, int, - struct resource *); static device_t nexus_add_child(device_t, u_int, const char *, int); static int nexus_attach(device_t); -static int nexus_deactivate_resource(device_t, device_t, int, int, - struct resource *); static void nexus_delete_resource(device_t, device_t, int, int); static struct resource_list * nexus_get_reslist(device_t, device_t); static int nexus_get_resource(device_t, device_t, int, int, u_long *, u_long *); -static void nexus_hinted_child(device_t, const char *, int); static int nexus_print_child(device_t, device_t); static int nexus_print_all_resources(device_t dev); static int nexus_probe(device_t); @@ -99,6 +102,12 @@ static int nexus_release_resource(device struct resource *); static int nexus_set_resource(device_t, device_t, int, int, u_long, u_long); +#endif +static int nexus_activate_resource(device_t, device_t, int, int, + struct resource *); +static int nexus_deactivate_resource(device_t, device_t, int, int, + struct resource *); +static void nexus_hinted_child(device_t, const char *, int); static int nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep); @@ -106,35 +115,43 @@ static int nexus_teardown_intr(device_t, void *); static device_method_t nexus_methods[] = { +#ifndef FDT /* Device interface */ DEVMETHOD(device_probe, nexus_probe), DEVMETHOD(device_attach, nexus_attach), /* Bus interface */ DEVMETHOD(bus_add_child, nexus_add_child), - DEVMETHOD(bus_activate_resource,nexus_activate_resource), DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), - DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), DEVMETHOD(bus_delete_resource, nexus_delete_resource), DEVMETHOD(bus_get_resource, nexus_get_resource), DEVMETHOD(bus_get_resource_list, nexus_get_reslist), - DEVMETHOD(bus_hinted_child, nexus_hinted_child), DEVMETHOD(bus_print_child, nexus_print_child), DEVMETHOD(bus_release_resource, nexus_release_resource), DEVMETHOD(bus_set_resource, nexus_set_resource), +#endif DEVMETHOD(bus_setup_intr, nexus_setup_intr), DEVMETHOD(bus_teardown_intr, nexus_teardown_intr), + DEVMETHOD(bus_activate_resource,nexus_activate_resource), + DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), + DEVMETHOD(bus_hinted_child, nexus_hinted_child), { 0, 0 } }; +#ifndef FDT static driver_t nexus_driver = { "nexus", nexus_methods, 1 /* no softc */ }; +#else +DEFINE_CLASS_1(nexus, nexus_driver, nexus_methods, + sizeof(struct ofw_nexus_softc), ofw_nexus_driver); +#endif static devclass_t nexus_devclass; +#ifndef FDT static int nexus_probe(device_t dev) { @@ -163,34 +180,6 @@ nexus_probe(device_t dev) } static int -nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags, - driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep) -{ - register_t s; - int irq; - - s = intr_disable(); - irq = rman_get_start(res); - if (irq >= NUM_MIPS_IRQS) { - intr_restore(s); - return (0); - } - - cpu_establish_hardintr(device_get_nameunit(child), filt, intr, arg, - irq, flags, cookiep); - intr_restore(s); - return (0); -} - -static int -nexus_teardown_intr(device_t dev, device_t child, struct resource *r, void *ih) -{ - - printf("Unimplemented %s at %s:%d\n", __func__, __FILE__, __LINE__); - return (0); -} - -static int nexus_attach(device_t dev) { @@ -231,59 +220,6 @@ nexus_print_all_resources(device_t dev) return (retval); } -static void -nexus_hinted_child(device_t bus, const char *dname, int dunit) -{ - device_t child; - long maddr; - int msize; - int order; - int result; - int irq; - int mem_hints_count; - - if ((resource_int_value(dname, dunit, "order", &order)) != 0) - order = 1000; - child = BUS_ADD_CHILD(bus, order, dname, dunit); - if (child == NULL) - return; - - /* - * Set hard-wired resources for hinted child using - * specific RIDs. - */ - mem_hints_count = 0; - if (resource_long_value(dname, dunit, "maddr", &maddr) == 0) - mem_hints_count++; - if (resource_int_value(dname, dunit, "msize", &msize) == 0) - mem_hints_count++; - - /* check if all info for mem resource has been provided */ - if ((mem_hints_count > 0) && (mem_hints_count < 2)) { - printf("Either maddr or msize hint is missing for %s%d\n", - dname, dunit); - } - else if (mem_hints_count) { - dprintf("%s: discovered hinted child %s at maddr %p(%d)\n", - __func__, device_get_nameunit(child), - (void *)(intptr_t)maddr, msize); - - result = bus_set_resource(child, SYS_RES_MEMORY, 0, maddr, - msize); - if (result != 0) { - device_printf(bus, - "warning: bus_set_resource() failed\n"); - } - } - - if (resource_int_value(dname, dunit, "irq", &irq) == 0) { - result = bus_set_resource(child, SYS_RES_IRQ, 0, irq, 1); - if (result != 0) - device_printf(bus, - "warning: bus_set_resource() failed\n"); - } -} - static device_t nexus_add_child(device_t bus, u_int order, const char *name, int unit) { @@ -381,30 +317,6 @@ nexus_alloc_resource(device_t bus, devic return (rv); } -static int -nexus_activate_resource(device_t bus, device_t child, int type, int rid, - struct resource *r) -{ - void *vaddr; - vm_paddr_t paddr; - vm_size_t psize; - - /* - * If this is a memory resource, use pmap_mapdev to map it. - */ - if (type == SYS_RES_MEMORY) { - paddr = rman_get_start(r); - psize = rman_get_size(r); - vaddr = pmap_mapdev(paddr, psize); - - rman_set_virtual(r, vaddr); - rman_set_bustag(r, mips_bus_space_generic); - rman_set_bushandle(r, (bus_space_handle_t)(uintptr_t)vaddr); - } - - return (rman_activate_resource(r)); -} - static struct resource_list * nexus_get_reslist(device_t dev, device_t child) { @@ -475,6 +387,31 @@ nexus_release_resource(device_t bus, dev return (rman_release_resource(r)); } +#endif + +static int +nexus_activate_resource(device_t bus, device_t child, int type, int rid, + struct resource *r) +{ + void *vaddr; + vm_paddr_t paddr; + vm_size_t psize; + + /* + * If this is a memory resource, use pmap_mapdev to map it. + */ + if (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT) { + paddr = rman_get_start(r); + psize = rman_get_size(r); + vaddr = pmap_mapdev(paddr, psize); + + rman_set_virtual(r, vaddr); + rman_set_bustag(r, mips_bus_space_generic); + rman_set_bushandle(r, (bus_space_handle_t)(uintptr_t)vaddr); + } + + return (rman_activate_resource(r)); +} static int nexus_deactivate_resource(device_t bus, device_t child, int type, int rid, @@ -490,4 +427,85 @@ nexus_deactivate_resource(device_t bus, return (rman_deactivate_resource(r)); } +static int +nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags, + driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep) +{ + register_t s; + int irq; + + s = intr_disable(); + irq = rman_get_start(res); + if (irq >= NUM_MIPS_IRQS) { + intr_restore(s); + return (0); + } + + cpu_establish_hardintr(device_get_nameunit(child), filt, intr, arg, + irq, flags, cookiep); + intr_restore(s); + return (0); +} + +static int +nexus_teardown_intr(device_t dev, device_t child, struct resource *r, void *ih) +{ + + printf("Unimplemented %s at %s:%d\n", __func__, __FILE__, __LINE__); + return (0); +} + +static void +nexus_hinted_child(device_t bus, const char *dname, int dunit) +{ + device_t child; + long maddr; + int msize; + int order; + int result; + int irq; + int mem_hints_count; + + if ((resource_int_value(dname, dunit, "order", &order)) != 0) + order = 1000; + child = BUS_ADD_CHILD(bus, order, dname, dunit); + if (child == NULL) + return; + + /* + * Set hard-wired resources for hinted child using + * specific RIDs. + */ + mem_hints_count = 0; + if (resource_long_value(dname, dunit, "maddr", &maddr) == 0) + mem_hints_count++; + if (resource_int_value(dname, dunit, "msize", &msize) == 0) + mem_hints_count++; + + /* check if all info for mem resource has been provided */ + if ((mem_hints_count > 0) && (mem_hints_count < 2)) { + printf("Either maddr or msize hint is missing for %s%d\n", + dname, dunit); + } + else if (mem_hints_count) { + dprintf("%s: discovered hinted child %s at maddr %p(%d)\n", + __func__, device_get_nameunit(child), + (void *)(intptr_t)maddr, msize); + + result = bus_set_resource(child, SYS_RES_MEMORY, 0, maddr, + msize); + if (result != 0) { + device_printf(bus, + "warning: bus_set_resource() failed\n"); + } + } + + if (resource_int_value(dname, dunit, "irq", &irq) == 0) { + result = bus_set_resource(child, SYS_RES_IRQ, 0, irq, 1); + if (result != 0) + device_printf(bus, + "warning: bus_set_resource() failed\n"); + } +} + DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0); Modified: stable/10/sys/powerpc/booke/pmap.c ============================================================================== --- stable/10/sys/powerpc/booke/pmap.c Wed May 14 01:35:43 2014 (r265999) +++ stable/10/sys/powerpc/booke/pmap.c Wed May 14 01:53:20 2014 (r266000) @@ -2759,7 +2759,7 @@ mmu_booke_mincore(mmu_t mmu, pmap_t pmap vm_paddr_t *locked_pa) { - TODO; + /* XXX: this should be implemented at some point */ return (0); } Modified: stable/10/sys/powerpc/mpc85xx/lbc.c ============================================================================== --- stable/10/sys/powerpc/mpc85xx/lbc.c Wed May 14 01:35:43 2014 (r265999) +++ stable/10/sys/powerpc/mpc85xx/lbc.c Wed May 14 01:53:20 2014 (r266000) @@ -113,7 +113,7 @@ static driver_t lbc_driver = { devclass_t lbc_devclass; -DRIVER_MODULE(lbc, fdtbus, lbc_driver, lbc_devclass, 0, 0); +DRIVER_MODULE(lbc, nexus, lbc_driver, lbc_devclass, 0, 0); /* * Calculate address mask used by OR(n) registers. Use memory region size to Modified: stable/10/sys/powerpc/mpc85xx/pci_mpc85xx.c ============================================================================== --- stable/10/sys/powerpc/mpc85xx/pci_mpc85xx.c Wed May 14 01:35:43 2014 (r265999) +++ stable/10/sys/powerpc/mpc85xx/pci_mpc85xx.c Wed May 14 01:53:20 2014 (r266000) @@ -170,7 +170,7 @@ static devclass_t fsl_pcib_devclass; DEFINE_CLASS_1(pcib, fsl_pcib_driver, fsl_pcib_methods, sizeof(struct fsl_pcib_softc), ofw_pci_driver); -DRIVER_MODULE(pcib, fdtbus, fsl_pcib_driver, fsl_pcib_devclass, 0, 0); +DRIVER_MODULE(pcib, nexus, fsl_pcib_driver, fsl_pcib_devclass, 0, 0); static int fsl_pcib_probe(device_t dev) From owner-svn-src-stable@FreeBSD.ORG Wed May 14 03:09:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 11215F87; Wed, 14 May 2014 03:09:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EFE822E51; Wed, 14 May 2014 03:09:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4E39dlH062504; Wed, 14 May 2014 03:09:39 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4E39bxJ062491; Wed, 14 May 2014 03:09:37 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405140309.s4E39bxJ062491@svn.freebsd.org> From: Ian Lepore Date: Wed, 14 May 2014 03:09:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266001 - in stable/10/sys: conf powerpc/aim powerpc/booke powerpc/include powerpc/powerpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 03:09:40 -0000 Author: ian Date: Wed May 14 03:09:37 2014 New Revision: 266001 URL: http://svnweb.freebsd.org/changeset/base/266001 Log: MFC r258002, r258024, r258027, r258051, r258052, r258243, r258244, r258002, r258024, r258027, r258051, r258052, r258243, Follow up r223485, which made AIM use the ABI thread pointer instead of PCPU fields for curthread, by doing the same to Book-E. Use the same implementation of copyinout.c for both AIM and Book-E. Actually add IOMMU domain to the list of known mappings. Following the approach with ACPI DMAR on x86, split IOMMU handling into a variant PCI bus instead of trying to shoehorn it into the PCI host bridge adapter. Make sure that TLB1 mappings are aligned correctly. Added: stable/10/sys/powerpc/powerpc/copyinout.c - copied, changed from r258024, head/sys/powerpc/powerpc/copyinout.c stable/10/sys/powerpc/powerpc/swtch32.S - copied unchanged from r258002, head/sys/powerpc/powerpc/swtch32.S stable/10/sys/powerpc/powerpc/swtch64.S - copied unchanged from r258002, head/sys/powerpc/powerpc/swtch64.S Deleted: stable/10/sys/powerpc/aim/copyinout.c stable/10/sys/powerpc/aim/swtch32.S stable/10/sys/powerpc/aim/swtch64.S stable/10/sys/powerpc/booke/copyinout.c stable/10/sys/powerpc/booke/swtch.S Modified: stable/10/sys/conf/files.powerpc stable/10/sys/powerpc/booke/locore.S stable/10/sys/powerpc/booke/machdep.c stable/10/sys/powerpc/booke/mp_cpudep.c stable/10/sys/powerpc/booke/pmap.c stable/10/sys/powerpc/booke/trap_subr.S stable/10/sys/powerpc/include/pcpu.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files.powerpc ============================================================================== --- stable/10/sys/conf/files.powerpc Wed May 14 01:53:20 2014 (r266000) +++ stable/10/sys/conf/files.powerpc Wed May 14 03:09:37 2014 (r266001) @@ -89,7 +89,6 @@ libkern/qdivrem.c optional powerpc libkern/ucmpdi2.c optional powerpc libkern/udivdi3.c optional powerpc libkern/umoddi3.c optional powerpc -powerpc/aim/copyinout.c optional aim powerpc/aim/interrupt.c optional aim powerpc/aim/locore.S optional aim no-obj powerpc/aim/machdep.c optional aim @@ -99,11 +98,8 @@ powerpc/aim/moea64_if.m optional aim powerpc/aim/moea64_native.c optional aim powerpc/aim/mp_cpudep.c optional aim powerpc/aim/slb.c optional aim powerpc64 -powerpc/aim/swtch32.S optional aim powerpc -powerpc/aim/swtch64.S optional aim powerpc64 powerpc/aim/trap.c optional aim powerpc/aim/uma_machdep.c optional aim -powerpc/booke/copyinout.c optional booke powerpc/booke/interrupt.c optional booke powerpc/booke/locore.S optional booke no-obj powerpc/booke/machdep.c optional booke @@ -111,7 +107,6 @@ powerpc/booke/machdep_e500.c optional bo powerpc/booke/mp_cpudep.c optional booke smp powerpc/booke/platform_bare.c optional mpc85xx powerpc/booke/pmap.c optional booke -powerpc/booke/swtch.S optional booke powerpc/booke/trap.c optional booke powerpc/cpufreq/dfs.c optional cpufreq powerpc/cpufreq/pcr.c optional cpufreq aim @@ -179,6 +174,7 @@ powerpc/powerpc/bcopy.c standard powerpc/powerpc/bus_machdep.c standard powerpc/powerpc/busdma_machdep.c standard powerpc/powerpc/clock.c standard +powerpc/powerpc/copyinout.c standard powerpc/powerpc/copystr.c standard powerpc/powerpc/cpu.c standard powerpc/powerpc/db_disasm.c optional ddb @@ -208,6 +204,8 @@ powerpc/powerpc/sc_machdep.c optional sc powerpc/powerpc/setjmp.S standard powerpc/powerpc/sigcode32.S optional powerpc | compat_freebsd32 powerpc/powerpc/sigcode64.S optional powerpc64 +powerpc/powerpc/swtch32.S optional powerpc +powerpc/powerpc/swtch64.S optional powerpc64 powerpc/powerpc/stack_machdep.c optional ddb | stack powerpc/powerpc/suswintr.c standard powerpc/powerpc/syncicache.c standard Modified: stable/10/sys/powerpc/booke/locore.S ============================================================================== --- stable/10/sys/powerpc/booke/locore.S Wed May 14 01:53:20 2014 (r266000) +++ stable/10/sys/powerpc/booke/locore.S Wed May 14 03:09:37 2014 (r266001) @@ -738,8 +738,7 @@ ENTRY(icache_enable) setfault: mflr %r0 mfsprg0 %r4 - lwz %r4, PC_CURTHREAD(%r4) - lwz %r4, TD_PCB(%r4) + lwz %r4, TD_PCB(%r2) stw %r3, PCB_ONFAULT(%r4) mfcr %r10 mfctr %r11 Modified: stable/10/sys/powerpc/booke/machdep.c ============================================================================== --- stable/10/sys/powerpc/booke/machdep.c Wed May 14 01:53:20 2014 (r266000) +++ stable/10/sys/powerpc/booke/machdep.c Wed May 14 03:09:37 2014 (r266001) @@ -409,6 +409,11 @@ booke_init(uint32_t arg1, uint32_t arg2) pc = &__pcpu[0]; pcpu_init(pc, 0, sizeof(struct pcpu)); pc->pc_curthread = &thread0; +#ifdef __powerpc64__ + __asm __volatile("mr 13,%0" :: "r"(pc->pc_curthread)); +#else + __asm __volatile("mr 2,%0" :: "r"(pc->pc_curthread)); +#endif __asm __volatile("mtsprg 0, %0" :: "r"(pc)); /* Initialize system mutexes. */ Modified: stable/10/sys/powerpc/booke/mp_cpudep.c ============================================================================== --- stable/10/sys/powerpc/booke/mp_cpudep.c Wed May 14 01:53:20 2014 (r266000) +++ stable/10/sys/powerpc/booke/mp_cpudep.c Wed May 14 03:09:37 2014 (r266001) @@ -71,6 +71,11 @@ cpudep_ap_bootstrap() /* Assign pcpu fields, return ptr to this AP's idle thread kstack */ pcpup->pc_curthread = pcpup->pc_idlethread; +#ifdef __powerpc64__ + __asm __volatile("mr 13,%0" :: "r"(pcpup->pc_curthread)); +#else + __asm __volatile("mr 2,%0" :: "r"(pcpup->pc_curthread)); +#endif pcpup->pc_curpcb = pcpup->pc_curthread->td_pcb; sp = pcpup->pc_curpcb->pcb_sp; Modified: stable/10/sys/powerpc/booke/pmap.c ============================================================================== --- stable/10/sys/powerpc/booke/pmap.c Wed May 14 01:53:20 2014 (r266000) +++ stable/10/sys/powerpc/booke/pmap.c Wed May 14 03:09:37 2014 (r266001) @@ -100,8 +100,6 @@ __FBSDID("$FreeBSD$"); #define TODO panic("%s: not implemented", __func__); -extern struct mtx sched_lock; - extern int dumpsys_minidump; extern unsigned char _etext[]; @@ -1906,7 +1904,7 @@ mmu_booke_activate(mmu_t mmu, struct thr KASSERT((pmap != kernel_pmap), ("mmu_booke_activate: kernel_pmap!")); - mtx_lock_spin(&sched_lock); + sched_pin(); cpuid = PCPU_GET(cpuid); CPU_SET_ATOMIC(cpuid, &pmap->pm_active); @@ -1919,7 +1917,7 @@ mmu_booke_activate(mmu_t mmu, struct thr mtspr(SPR_PID0, pmap->pm_tid[cpuid]); __asm __volatile("isync"); - mtx_unlock_spin(&sched_lock); + sched_unpin(); CTR3(KTR_PMAP, "%s: e (tid = %d for '%s')", __func__, pmap->pm_tid[PCPU_GET(cpuid)], td->td_proc->p_comm); @@ -3177,6 +3175,7 @@ pmap_early_io_map(vm_paddr_t pa, vm_size pa_base = trunc_page(pa); size = roundup(size + (pa - pa_base), PAGE_SIZE); + tlb1_map_base = roundup2(tlb1_map_base, 1 << (ilog2(size) & ~1)); va = tlb1_map_base + (pa - pa_base); do { Modified: stable/10/sys/powerpc/booke/trap_subr.S ============================================================================== --- stable/10/sys/powerpc/booke/trap_subr.S Wed May 14 01:53:20 2014 (r266000) +++ stable/10/sys/powerpc/booke/trap_subr.S Wed May 14 03:09:37 2014 (r266001) @@ -219,7 +219,8 @@ lwz %r30, (savearea+CPUSAVE_SRR0)(%r2); \ lwz %r31, (savearea+CPUSAVE_SRR1)(%r2); \ stw %r30, FRAME_SRR0+8(%r1); \ - stw %r31, FRAME_SRR1+8(%r1) + stw %r31, FRAME_SRR1+8(%r1); \ + lwz %r2,PC_CURTHREAD(%r2) /* set curthread pointer */ /* * @@ -734,7 +735,8 @@ interrupt_vector_top: INTERRUPT(int_debug) STANDARD_CRIT_PROLOG(SPR_SPRG2, PC_BOOKE_CRITSAVE, SPR_CSRR0, SPR_CSRR1) FRAME_SETUP(SPR_SPRG2, PC_BOOKE_CRITSAVE, EXC_DEBUG) - lwz %r3, (PC_BOOKE_CRITSAVE+CPUSAVE_SRR0)(%r2); + GET_CPUINFO(%r3) + lwz %r3, (PC_BOOKE_CRITSAVE+CPUSAVE_SRR0)(%r3) lis %r4, interrupt_vector_base@ha addi %r4, %r4, interrupt_vector_base@l cmplw cr0, %r3, %r4 @@ -748,9 +750,10 @@ INTERRUPT(int_debug) rlwinm %r3, %r3, 0, 23, 21 stw %r3, FRAME_SRR1+8(%r1); /* Restore srr0 and srr1 as they could have been clobbered. */ - lwz %r3, (PC_BOOKE_CRITSAVE+CPUSAVE_SRR0+8)(%r2); + GET_CPUINFO(%r4) + lwz %r3, (PC_BOOKE_CRITSAVE+CPUSAVE_SRR0+8)(%r4); mtspr SPR_SRR0, %r3 - lwz %r4, (PC_BOOKE_CRITSAVE+CPUSAVE_SRR1+8)(%r2); + lwz %r4, (PC_BOOKE_CRITSAVE+CPUSAVE_SRR1+8)(%r4); mtspr SPR_SRR1, %r4 b 9f 1: Modified: stable/10/sys/powerpc/include/pcpu.h ============================================================================== --- stable/10/sys/powerpc/include/pcpu.h Wed May 14 01:53:20 2014 (r266000) +++ stable/10/sys/powerpc/include/pcpu.h Wed May 14 03:09:37 2014 (r266001) @@ -136,7 +136,6 @@ struct pmap; #define pcpup ((struct pcpu *) powerpc_get_pcpup()) -#ifdef AIM /* Book-E not yet adapted */ static __inline __pure2 struct thread * __curthread(void) { @@ -149,7 +148,6 @@ __curthread(void) return (td); } #define curthread (__curthread()) -#endif #define PCPU_GET(member) (pcpup->pc_ ## member) Copied and modified: stable/10/sys/powerpc/powerpc/copyinout.c (from r258024, head/sys/powerpc/powerpc/copyinout.c) ============================================================================== --- head/sys/powerpc/powerpc/copyinout.c Mon Nov 11 23:37:16 2013 (r258024, copy source) +++ stable/10/sys/powerpc/powerpc/copyinout.c Wed May 14 03:09:37 2014 (r266001) @@ -195,7 +195,7 @@ copyout(const void *kaddr, void *udaddr, while (len > 0) { if (map_user_ptr(pm, udaddr, (void **)&p, len, &l)) { td->td_pcb->pcb_onfault = NULL; - return (-1); + return (EFAULT); } bcopy(kp, p, l); @@ -233,7 +233,7 @@ copyin(const void *udaddr, void *kaddr, while (len > 0) { if (map_user_ptr(pm, udaddr, (void **)&p, len, &l)) { td->td_pcb->pcb_onfault = NULL; - return (-1); + return (EFAULT); } bcopy(p, kp, l); Copied: stable/10/sys/powerpc/powerpc/swtch32.S (from r258002, head/sys/powerpc/powerpc/swtch32.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/powerpc/powerpc/swtch32.S Wed May 14 03:09:37 2014 (r266001, copy of r258002, head/sys/powerpc/powerpc/swtch32.S) @@ -0,0 +1,221 @@ +/* $FreeBSD$ */ +/* $NetBSD: locore.S,v 1.24 2000/05/31 05:09:17 thorpej Exp $ */ + +/*- + * Copyright (C) 2001 Benno Rice + * All rights reserved. + * + * 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 Benno Rice ``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 TOOLS GMBH 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. +*/ +/*- + * Copyright (C) 1995, 1996 Wolfgang Solfrank. + * Copyright (C) 1995, 1996 TooLs GmbH. + * All rights reserved. + * + * 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. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by TooLs GmbH. + * 4. The name of TooLs GmbH may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``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 TOOLS GMBH 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. + */ + +#include "assym.s" +#include "opt_sched.h" + +#include + +#include +#include +#include +#include + +/* + * void cpu_throw(struct thread *old, struct thread *new) + */ +ENTRY(cpu_throw) + mr %r2, %r4 + b cpu_switchin + +/* + * void cpu_switch(struct thread *old, + * struct thread *new, + * struct mutex *mtx); + * + * Switch to a new thread saving the current state in the old thread. + */ +ENTRY(cpu_switch) + lwz %r6,TD_PCB(%r3) /* Get the old thread's PCB ptr */ + stmw %r12,PCB_CONTEXT(%r6) /* Save the non-volatile GP regs. + These can now be used for scratch */ + + mfcr %r16 /* Save the condition register */ + stw %r16,PCB_CR(%r6) + mflr %r16 /* Save the link register */ + stw %r16,PCB_LR(%r6) +#ifdef BOOKE + mfctr %r16 + stw %r16,PCB_BOOKE_CTR(%r6) + mfxer %r16 + stw %r16,PCB_BOOKE_XER(%r6) + mfspr %r16,SPR_DBCR0 + stw %r16,PCB_BOOKE_DBCR0(%r6) +#endif + stw %r1,PCB_SP(%r6) /* Save the stack pointer */ + + mr %r14,%r3 /* Copy the old thread ptr... */ + mr %r2,%r4 /* and the new thread ptr in curthread */ + mr %r16,%r5 /* and the new lock */ + mr %r17,%r6 /* and the PCB */ + +#ifdef AIM + lwz %r7,PCB_FLAGS(%r17) + /* Save FPU context if needed */ + andi. %r7, %r7, PCB_FPU + beq .L1 + bl save_fpu + +.L1: + mr %r3,%r14 /* restore old thread ptr */ + lwz %r7,PCB_FLAGS(%r17) + /* Save Altivec context if needed */ + andi. %r7, %r7, PCB_VEC + beq .L2 + bl save_vec + +.L2: +#endif + mr %r3,%r14 /* restore old thread ptr */ + 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) + /* Wait for the new thread to become unblocked */ + lis %r6,blocked_lock@ha + addi %r6,%r6,blocked_lock@l +blocked_loop: + lwz %r7,TD_LOCK(%r2) + cmpw %r6,%r7 + beq- blocked_loop + isync +#endif + + 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) + + mr %r3,%r2 /* Get new thread ptr */ + bl pmap_activate /* Activate the new address space */ + +#ifdef AIM + lwz %r6, PCB_FLAGS(%r17) + /* Restore FPU context if needed */ + andi. %r6, %r6, PCB_FPU + beq .L3 + mr %r3,%r2 /* Pass curthread to enable_fpu */ + bl enable_fpu + +.L3: + lwz %r6, PCB_FLAGS(%r17) + /* Restore Altivec context if needed */ + andi. %r6, %r6, PCB_VEC + beq .L4 + mr %r3,%r2 /* Pass curthread to enable_vec */ + bl enable_vec + +.L4: +#endif + /* thread to restore is in r3 */ + mr %r3,%r17 /* Recover PCB ptr */ + lmw %r12,PCB_CONTEXT(%r3) /* Load the non-volatile GP regs */ + lwz %r5,PCB_CR(%r3) /* Load the condition register */ + mtcr %r5 + lwz %r5,PCB_LR(%r3) /* Load the link register */ + mtlr %r5 +#ifdef AIM + lwz %r5,PCB_AIM_USR_VSID(%r3) /* Load the USER_SR segment reg */ + isync + mtsr USER_SR,%r5 + isync +#endif +#ifdef BOOKE + lwz %r5,PCB_BOOKE_CTR(%r3) + mtctr %r5 + lwz %r5,PCB_BOOKE_XER(%r3) + mtctr %r5 + lwz %r5,PCB_BOOKE_DBCR0(%r3) + mtspr SPR_DBCR0,%r5 +#endif + lwz %r1,PCB_SP(%r3) /* Load the stack pointer */ + /* + * Perform a dummy stwcx. to clear any reservations we may have + * inherited from the previous thread. It doesn't matter if the + * stwcx succeeds or not. pcb_context[0] can be clobbered. + */ + stwcx. %r1, 0, %r3 + blr + +/* + * savectx(pcb) + * Update pcb, saving current processor state + */ +ENTRY(savectx) + stmw %r12,PCB_CONTEXT(%r3) /* Save the non-volatile GP regs */ + mfcr %r4 /* Save the condition register */ + stw %r4,PCB_CR(%r3) + blr + +/* + * fork_trampoline() + * Set up the return from cpu_fork() + */ +ENTRY(fork_trampoline) + lwz %r3,CF_FUNC(%r1) + lwz %r4,CF_ARG0(%r1) + lwz %r5,CF_ARG1(%r1) + bl fork_exit + addi %r1,%r1,CF_SIZE-FSP /* Allow 8 bytes in front of + trapframe to simulate FRAME_SETUP + does when allocating space for + a frame pointer/saved LR */ + b trapexit Copied: stable/10/sys/powerpc/powerpc/swtch64.S (from r258002, head/sys/powerpc/powerpc/swtch64.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/powerpc/powerpc/swtch64.S Wed May 14 03:09:37 2014 (r266001, copy of r258002, head/sys/powerpc/powerpc/swtch64.S) @@ -0,0 +1,287 @@ +/* $FreeBSD$ */ +/* $NetBSD: locore.S,v 1.24 2000/05/31 05:09:17 thorpej Exp $ */ + +/*- + * Copyright (C) 2001 Benno Rice + * All rights reserved. + * + * 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 Benno Rice ``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 TOOLS GMBH 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. +*/ +/*- + * Copyright (C) 1995, 1996 Wolfgang Solfrank. + * Copyright (C) 1995, 1996 TooLs GmbH. + * All rights reserved. + * + * 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. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by TooLs GmbH. + * 4. The name of TooLs GmbH may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``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 TOOLS GMBH 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. + */ + +#include "assym.s" +#include "opt_sched.h" + +#include + +#include +#include +#include + +/* + * void cpu_throw(struct thread *old, struct thread *new) + */ +ENTRY(cpu_throw) + mr %r13, %r4 + b cpu_switchin + +/* + * void cpu_switch(struct thread *old, + * struct thread *new, + * struct mutex *mtx); + * + * Switch to a new thread saving the current state in the old thread. + */ +ENTRY(cpu_switch) + ld %r6,TD_PCB(%r3) /* Get the old thread's PCB ptr */ + std %r12,PCB_CONTEXT(%r6) /* Save the non-volatile GP regs. + These can now be used for scratch */ + std %r14,PCB_CONTEXT+2*8(%r6) + std %r15,PCB_CONTEXT+3*8(%r6) + std %r16,PCB_CONTEXT+4*8(%r6) + std %r17,PCB_CONTEXT+5*8(%r6) + std %r18,PCB_CONTEXT+6*8(%r6) + std %r19,PCB_CONTEXT+7*8(%r6) + std %r20,PCB_CONTEXT+8*8(%r6) + std %r21,PCB_CONTEXT+9*8(%r6) + std %r22,PCB_CONTEXT+10*8(%r6) + std %r23,PCB_CONTEXT+11*8(%r6) + std %r24,PCB_CONTEXT+12*8(%r6) + std %r25,PCB_CONTEXT+13*8(%r6) + std %r26,PCB_CONTEXT+14*8(%r6) + std %r27,PCB_CONTEXT+15*8(%r6) + std %r28,PCB_CONTEXT+16*8(%r6) + std %r29,PCB_CONTEXT+17*8(%r6) + std %r30,PCB_CONTEXT+18*8(%r6) + std %r31,PCB_CONTEXT+19*8(%r6) + + mfcr %r16 /* Save the condition register */ + std %r16,PCB_CR(%r6) + mflr %r16 /* Save the link register */ + std %r16,PCB_LR(%r6) + std %r1,PCB_SP(%r6) /* Save the stack pointer */ + std %r2,PCB_TOC(%r6) /* Save the TOC pointer */ + + mr %r14,%r3 /* Copy the old thread ptr... */ + mr %r13,%r4 /* and the new thread ptr in curthread*/ + mr %r16,%r5 /* and the new lock */ + mr %r17,%r6 /* and the PCB */ + + stdu %r1,-48(%r1) + + lwz %r7,PCB_FLAGS(%r17) + /* Save FPU context if needed */ + andi. %r7, %r7, PCB_FPU + beq .L1 + bl save_fpu + nop + +.L1: + mr %r3,%r14 /* restore old thread ptr */ + lwz %r7,PCB_FLAGS(%r17) + /* Save Altivec context if needed */ + andi. %r7, %r7, PCB_VEC + beq .L2 + bl save_vec + nop + +.L2: + mr %r3,%r14 /* restore old thread ptr */ + bl pmap_deactivate /* Deactivate the current pmap */ + nop + + addi %r1,%r1,48 + + sync /* Make sure all of that finished */ + std %r16,TD_LOCK(%r14) /* ULE: update old thread's lock */ + +cpu_switchin: +#if defined(SMP) && defined(SCHED_ULE) + /* Wait for the new thread to become unblocked */ + lis %r6,blocked_lock@ha + addi %r6,%r6,blocked_lock@l +blocked_loop: + ld %r7,TD_LOCK(%r13) + cmpd %r6,%r7 + beq- blocked_loop + isync +#endif + + mfsprg %r7,0 /* Get the pcpu pointer */ + std %r13,PC_CURTHREAD(%r7) /* Store new current thread */ + ld %r17,TD_PCB(%r13) /* Store new current PCB */ + std %r17,PC_CURPCB(%r7) + + stdu %r1,-48(%r1) + + mr %r3,%r13 /* Get new thread ptr */ + bl pmap_activate /* Activate the new address space */ + nop + + lwz %r6, PCB_FLAGS(%r17) + /* Restore FPU context if needed */ + andi. %r6, %r6, PCB_FPU + beq .L3 + mr %r3,%r13 /* Pass curthread to enable_fpu */ + bl enable_fpu + nop + +.L3: + lwz %r6, PCB_FLAGS(%r17) + /* Restore Altivec context if needed */ + andi. %r6, %r6, PCB_VEC + beq .L4 + mr %r3,%r13 /* Pass curthread to enable_vec */ + bl enable_vec + nop + + /* thread to restore is in r3 */ +.L4: + addi %r1,%r1,48 + mr %r3,%r17 /* Recover PCB ptr */ + ld %r12,PCB_CONTEXT(%r3) /* Load the non-volatile GP regs. */ + ld %r14,PCB_CONTEXT+2*8(%r3) + ld %r15,PCB_CONTEXT+3*8(%r3) + ld %r16,PCB_CONTEXT+4*8(%r3) + ld %r17,PCB_CONTEXT+5*8(%r3) + ld %r18,PCB_CONTEXT+6*8(%r3) + ld %r19,PCB_CONTEXT+7*8(%r3) + ld %r20,PCB_CONTEXT+8*8(%r3) + ld %r21,PCB_CONTEXT+9*8(%r3) + ld %r22,PCB_CONTEXT+10*8(%r3) + ld %r23,PCB_CONTEXT+11*8(%r3) + ld %r24,PCB_CONTEXT+12*8(%r3) + ld %r25,PCB_CONTEXT+13*8(%r3) + ld %r26,PCB_CONTEXT+14*8(%r3) + ld %r27,PCB_CONTEXT+15*8(%r3) + ld %r28,PCB_CONTEXT+16*8(%r3) + ld %r29,PCB_CONTEXT+17*8(%r3) + ld %r30,PCB_CONTEXT+18*8(%r3) + ld %r31,PCB_CONTEXT+19*8(%r3) + ld %r5,PCB_CR(%r3) /* Load the condition register */ + mtcr %r5 + ld %r5,PCB_LR(%r3) /* Load the link register */ + mtlr %r5 + ld %r1,PCB_SP(%r3) /* Load the stack pointer */ + ld %r2,PCB_TOC(%r3) /* Load the TOC pointer */ + + lis %r5,USER_ADDR@highesta /* Load the copyin/out segment reg */ + ori %r5,%r5,USER_ADDR@highera + sldi %r5,%r5,32 + oris %r5,%r5,USER_ADDR@ha + isync + slbie %r5 + lis %r6,USER_SLB_SLBE@highesta + ori %r6,%r6,USER_SLB_SLBE@highera + sldi %r6,%r6,32 + oris %r6,%r6,USER_SLB_SLBE@ha + ori %r6,%r6,USER_SLB_SLBE@l + ld %r5,PCB_AIM_USR_VSID(%r3) + slbmte %r5,%r6 + isync + + /* + * Perform a dummy stdcx. to clear any reservations we may have + * inherited from the previous thread. It doesn't matter if the + * stdcx succeeds or not. pcb_context[0] can be clobbered. + */ + stdcx. %r1, 0, %r3 + blr + +/* + * savectx(pcb) + * Update pcb, saving current processor state + */ +ENTRY(savectx) + std %r12,PCB_CONTEXT(%r3) /* Save the non-volatile GP regs. */ + std %r13,PCB_CONTEXT+1*8(%r3) + std %r14,PCB_CONTEXT+2*8(%r3) + std %r15,PCB_CONTEXT+3*8(%r3) + std %r16,PCB_CONTEXT+4*8(%r3) + std %r17,PCB_CONTEXT+5*8(%r3) + std %r18,PCB_CONTEXT+6*8(%r3) + std %r19,PCB_CONTEXT+7*8(%r3) + std %r20,PCB_CONTEXT+8*8(%r3) + std %r21,PCB_CONTEXT+9*8(%r3) + std %r22,PCB_CONTEXT+10*8(%r3) + std %r23,PCB_CONTEXT+11*8(%r3) + std %r24,PCB_CONTEXT+12*8(%r3) + std %r25,PCB_CONTEXT+13*8(%r3) + std %r26,PCB_CONTEXT+14*8(%r3) + std %r27,PCB_CONTEXT+15*8(%r3) + std %r28,PCB_CONTEXT+16*8(%r3) + std %r29,PCB_CONTEXT+17*8(%r3) + std %r30,PCB_CONTEXT+18*8(%r3) + std %r31,PCB_CONTEXT+19*8(%r3) + + mfcr %r4 /* Save the condition register */ + std %r4,PCB_CR(%r3) + std %r2,PCB_TOC(%r3) /* Save the TOC pointer */ + blr + +/* + * fork_trampoline() + * Set up the return from cpu_fork() + */ + +ENTRY_NOPROF(fork_trampoline) + ld %r3,CF_FUNC(%r1) + ld %r4,CF_ARG0(%r1) + ld %r5,CF_ARG1(%r1) + + stdu %r1,-48(%r1) + bl fork_exit + nop + addi %r1,%r1,48+CF_SIZE-FSP /* Allow 8 bytes in front of + trapframe to simulate FRAME_SETUP + does when allocating space for + a frame pointer/saved LR */ + b trapexit + nop From owner-svn-src-stable@FreeBSD.ORG Wed May 14 04:15:01 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E545C462; Wed, 14 May 2014 04:15:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B681B2391; Wed, 14 May 2014 04:15:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4E4F0b4093658; Wed, 14 May 2014 04:15:00 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4E4ExDC093616; Wed, 14 May 2014 04:14:59 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405140414.s4E4ExDC093616@svn.freebsd.org> From: Ian Lepore Date: Wed, 14 May 2014 04:14:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266003 - in stable/10/sys: conf powerpc/booke powerpc/include powerpc/mpc85xx powerpc/powerpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 04:15:01 -0000 Author: ian Date: Wed May 14 04:14:58 2014 New Revision: 266003 URL: http://svnweb.freebsd.org/changeset/base/266003 Log: MFC r257995, r258244, r258246, Rename the "bare" platform "mpc85xx" Also turn "bare" into a truly bare platform Move CCSR discovery into the platform module There is no reason Book-E needs to save XER and CTR on context switches. Added: stable/10/sys/powerpc/mpc85xx/platform_mpc85xx.c - copied, changed from r257995, head/sys/powerpc/mpc85xx/platform_mpc85xx.c Modified: stable/10/sys/conf/files.powerpc stable/10/sys/powerpc/booke/machdep.c stable/10/sys/powerpc/booke/platform_bare.c stable/10/sys/powerpc/include/pcb.h stable/10/sys/powerpc/mpc85xx/mpc85xx.h stable/10/sys/powerpc/powerpc/genassym.c stable/10/sys/powerpc/powerpc/swtch32.S Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files.powerpc ============================================================================== --- stable/10/sys/conf/files.powerpc Wed May 14 04:02:59 2014 (r266002) +++ stable/10/sys/conf/files.powerpc Wed May 14 04:14:58 2014 (r266003) @@ -105,7 +105,7 @@ powerpc/booke/locore.S optional booke n powerpc/booke/machdep.c optional booke powerpc/booke/machdep_e500.c optional booke_e500 powerpc/booke/mp_cpudep.c optional booke smp -powerpc/booke/platform_bare.c optional mpc85xx +powerpc/booke/platform_bare.c optional booke powerpc/booke/pmap.c optional booke powerpc/booke/trap.c optional booke powerpc/cpufreq/dfs.c optional cpufreq @@ -131,6 +131,7 @@ powerpc/mpc85xx/i2c.c optional iicbus f powerpc/mpc85xx/isa.c optional mpc85xx isa powerpc/mpc85xx/lbc.c optional mpc85xx powerpc/mpc85xx/mpc85xx.c optional mpc85xx +powerpc/mpc85xx/platform_mpc85xx.c optional mpc85xx powerpc/mpc85xx/pci_mpc85xx.c optional pci mpc85xx powerpc/ofw/ofw_cpu.c optional aim powerpc/ofw/ofw_machdep.c standard Modified: stable/10/sys/powerpc/booke/machdep.c ============================================================================== --- stable/10/sys/powerpc/booke/machdep.c Wed May 14 04:02:59 2014 (r266002) +++ stable/10/sys/powerpc/booke/machdep.c Wed May 14 04:14:58 2014 (r266003) @@ -387,14 +387,6 @@ booke_init(uint32_t arg1, uint32_t arg2) /* Reset TLB1 to get rid of temporary mappings */ tlb1_init(); - /* Set up IMMR */ - if (fdt_immr_addr(0) == 0) { - fdt_immr_va = pmap_early_io_map(fdt_immr_pa, fdt_immr_size); - } else { - printf("Warning: SOC base registers could not be found!\n"); - fdt_immr_va = 0; - } - /* Reset Time Base */ mttb(0); Modified: stable/10/sys/powerpc/booke/platform_bare.c ============================================================================== --- stable/10/sys/powerpc/booke/platform_bare.c Wed May 14 04:02:59 2014 (r266002) +++ stable/10/sys/powerpc/booke/platform_bare.c Wed May 14 04:14:58 2014 (r266003) @@ -35,65 +35,34 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include #include -#include +#include +#include #include "platform_if.h" -#ifdef SMP -extern void *ap_pcpu; -extern vm_paddr_t kernload; /* Kernel physical load address */ -extern uint8_t __boot_page[]; /* Boot page body */ -extern uint32_t bp_ntlb1s; -extern uint32_t bp_tlb1[]; -extern uint32_t bp_tlb1_end[]; -#endif - extern uint32_t *bootinfo; -static int cpu, maxcpu; - static int bare_probe(platform_t); static void bare_mem_regions(platform_t, struct mem_region **phys, int *physsz, struct mem_region **avail, int *availsz); static u_long bare_timebase_freq(platform_t, struct cpuref *cpuref); -static int bare_smp_first_cpu(platform_t, struct cpuref *cpuref); -static int bare_smp_next_cpu(platform_t, struct cpuref *cpuref); -static int bare_smp_get_bsp(platform_t, struct cpuref *cpuref); -static int bare_smp_start_cpu(platform_t, struct pcpu *cpu); -static void booke_reset(platform_t); +static void bare_reset(platform_t); static platform_method_t bare_methods[] = { PLATFORMMETHOD(platform_probe, bare_probe), PLATFORMMETHOD(platform_mem_regions, bare_mem_regions), PLATFORMMETHOD(platform_timebase_freq, bare_timebase_freq), - PLATFORMMETHOD(platform_smp_first_cpu, bare_smp_first_cpu), - PLATFORMMETHOD(platform_smp_next_cpu, bare_smp_next_cpu), - PLATFORMMETHOD(platform_smp_get_bsp, bare_smp_get_bsp), - PLATFORMMETHOD(platform_smp_start_cpu, bare_smp_start_cpu), - - PLATFORMMETHOD(platform_reset, booke_reset), + PLATFORMMETHOD(platform_reset, bare_reset), PLATFORMMETHOD_END }; static platform_def_t bare_platform = { - "bare metal", + "bare", bare_methods, 0 }; @@ -103,65 +72,19 @@ PLATFORM_DEF(bare_platform); static int bare_probe(platform_t plat) { - phandle_t cpus, child; - uint32_t sr; - int i, law_max, tgt; - if ((cpus = OF_finddevice("/cpus")) != 0) { - for (maxcpu = 0, child = OF_child(cpus); child != 0; - child = OF_peer(child), maxcpu++) - ; - } else - maxcpu = 1; - - /* - * Clear local access windows. Skip DRAM entries, so we don't shoot - * ourselves in the foot. - */ - law_max = law_getmax(); - for (i = 0; i < law_max; i++) { - sr = ccsr_read4(OCP85XX_LAWSR(i)); - if ((sr & 0x80000000) == 0) - continue; - tgt = (sr & 0x01f00000) >> 20; - if (tgt == OCP85XX_TGTIF_RAM1 || tgt == OCP85XX_TGTIF_RAM2 || - tgt == OCP85XX_TGTIF_RAM_INTL) - continue; - - ccsr_write4(OCP85XX_LAWSR(i), sr & 0x7fffffff); - } + if (OF_peer(0) == -1) /* Needs device tree to work */ + return (ENXIO); return (BUS_PROBE_GENERIC); } -#define MEM_REGIONS 8 -static struct mem_region avail_regions[MEM_REGIONS]; - void bare_mem_regions(platform_t plat, struct mem_region **phys, int *physsz, struct mem_region **avail, int *availsz) { - uint32_t memsize; - int i, rv; - rv = fdt_get_mem_regions(avail_regions, availsz, &memsize); - if (rv != 0) - panic("%s: could not retrieve mem regions from the 'memory' " - "node, error: %d", __func__, rv); - - for (i = 0; i < *availsz; i++) { - if (avail_regions[i].mr_start < 1048576) { - avail_regions[i].mr_size = - avail_regions[i].mr_size - - (1048576 - avail_regions[i].mr_start); - avail_regions[i].mr_start = 1048576; - } - } - *avail = avail_regions; - - /* On the bare metal platform phys == avail memory */ - *physsz = *availsz; - *phys = *avail; + ofw_mem_regions(phys, physsz, avail, availsz); } static u_long @@ -226,138 +149,10 @@ out: return (ticks); } -static int -bare_smp_first_cpu(platform_t plat, struct cpuref *cpuref) -{ - - cpu = 0; - cpuref->cr_cpuid = cpu; - cpuref->cr_hwref = cpuref->cr_cpuid; - if (bootverbose) - printf("powerpc_smp_first_cpu: cpuid %d\n", cpuref->cr_cpuid); - cpu++; - - return (0); -} - -static int -bare_smp_next_cpu(platform_t plat, struct cpuref *cpuref) -{ - - if (cpu >= maxcpu) - return (ENOENT); - - cpuref->cr_cpuid = cpu++; - cpuref->cr_hwref = cpuref->cr_cpuid; - if (bootverbose) - printf("powerpc_smp_next_cpu: cpuid %d\n", cpuref->cr_cpuid); - - return (0); -} - -static int -bare_smp_get_bsp(platform_t plat, struct cpuref *cpuref) -{ - - cpuref->cr_cpuid = mfspr(SPR_PIR); - cpuref->cr_hwref = cpuref->cr_cpuid; - - return (0); -} - -static int -bare_smp_start_cpu(platform_t plat, struct pcpu *pc) -{ -#ifdef SMP - uint32_t *tlb1; - uint32_t bptr, eebpcr; - int i, timeout; - - eebpcr = ccsr_read4(OCP85XX_EEBPCR); - if ((eebpcr & (1 << (pc->pc_cpuid + 24))) != 0) { - printf("SMP: CPU %d already out of hold-off state!\n", - pc->pc_cpuid); - return (ENXIO); - } - - ap_pcpu = pc; - - i = 0; - tlb1 = bp_tlb1; - while (i < bp_ntlb1s && tlb1 < bp_tlb1_end) { - mtspr(SPR_MAS0, MAS0_TLBSEL(1) | MAS0_ESEL(i)); - __asm __volatile("isync; tlbre"); - tlb1[0] = mfspr(SPR_MAS1); - tlb1[1] = mfspr(SPR_MAS2); - tlb1[2] = mfspr(SPR_MAS3); - i++; - tlb1 += 3; - } - if (i < bp_ntlb1s) - bp_ntlb1s = i; - - /* - * Set BPTR to the physical address of the boot page - */ - bptr = ((uint32_t)__boot_page - KERNBASE) + kernload; - KASSERT((bptr & 0xfff) == 0, - ("%s: boot page is not aligned (%#x)", __func__, bptr)); - bptr = (bptr >> 12) | 0x80000000u; - ccsr_write4(OCP85XX_BPTR, bptr); - __asm __volatile("isync; msync"); - - /* Flush caches to have our changes hit DRAM. */ - cpu_flush_dcache(__boot_page, 4096); - - /* - * Release AP from hold-off state - */ - eebpcr |= (1 << (pc->pc_cpuid + 24)); - ccsr_write4(OCP85XX_EEBPCR, eebpcr); - __asm __volatile("isync; msync"); - - timeout = 500; - while (!pc->pc_awake && timeout--) - DELAY(1000); /* wait 1ms */ - - /* - * Disable boot page translation so that the 4K page at the default - * address (= 0xfffff000) isn't permanently remapped and thus not - * usable otherwise. - */ - ccsr_write4(OCP85XX_BPTR, 0); - __asm __volatile("isync; msync"); - - if (!pc->pc_awake) - printf("SMP: CPU %d didn't wake up.\n", pc->pc_cpuid); - return ((pc->pc_awake) ? 0 : EBUSY); -#else - /* No SMP support */ - return (ENXIO); -#endif -} - static void -booke_reset(platform_t plat) +bare_reset(platform_t plat) { - /* - * Try the dedicated reset register first. - * If the SoC doesn't have one, we'll fall - * back to using the debug control register. - */ - ccsr_write4(OCP85XX_RSTCR, 2); - - /* Clear DBCR0, disables debug interrupts and events. */ - mtspr(SPR_DBCR0, 0); - __asm __volatile("isync"); - - /* Enable Debug Interrupts in MSR. */ - mtmsr(mfmsr() | PSL_DE); - - /* Enable debug interrupts and issue reset. */ - mtspr(SPR_DBCR0, mfspr(SPR_DBCR0) | DBCR0_IDM | DBCR0_RST_SYSTEM); - printf("Reset failed...\n"); while (1) ; Modified: stable/10/sys/powerpc/include/pcb.h ============================================================================== --- stable/10/sys/powerpc/include/pcb.h Wed May 14 04:02:59 2014 (r266002) +++ stable/10/sys/powerpc/include/pcb.h Wed May 14 04:14:58 2014 (r266003) @@ -70,8 +70,6 @@ struct pcb { register_t usr_vsid; /* USER_SR segment */ } aim; struct { - register_t ctr; - register_t xer; register_t dbcr0; } booke; } pcb_cpu; Modified: stable/10/sys/powerpc/mpc85xx/mpc85xx.h ============================================================================== --- stable/10/sys/powerpc/mpc85xx/mpc85xx.h Wed May 14 04:02:59 2014 (r266002) +++ stable/10/sys/powerpc/mpc85xx/mpc85xx.h Wed May 14 04:14:58 2014 (r266003) @@ -33,7 +33,8 @@ /* * Configuration control and status registers */ -#define CCSRBAR_VA fdt_immr_va +extern vm_offset_t ccsrbar_va; +#define CCSRBAR_VA ccsrbar_va #define OCP85XX_CCSRBAR (CCSRBAR_VA + 0x0) #define OCP85XX_BPTR (CCSRBAR_VA + 0x20) Copied and modified: stable/10/sys/powerpc/mpc85xx/platform_mpc85xx.c (from r257995, head/sys/powerpc/mpc85xx/platform_mpc85xx.c) ============================================================================== --- head/sys/powerpc/mpc85xx/platform_mpc85xx.c Mon Nov 11 16:14:25 2013 (r257995, copy source) +++ stable/10/sys/powerpc/mpc85xx/platform_mpc85xx.c Wed May 14 04:14:58 2014 (r266003) @@ -49,6 +49,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include + #include #include "platform_if.h" @@ -63,6 +66,7 @@ extern uint32_t bp_tlb1_end[]; #endif extern uint32_t *bootinfo; +vm_offset_t ccsrbar_va; static int cpu, maxcpu; @@ -116,8 +120,12 @@ mpc85xx_probe(platform_t plat) static int mpc85xx_attach(platform_t plat) { - phandle_t cpus, child; + phandle_t cpus, child, ccsr; + const char *soc_name_guesses[] = {"/soc", "soc", NULL}; + const char **name; + pcell_t ranges[6], acells, pacells, scells; uint32_t sr; + uint64_t ccsrbar, ccsrsize; int i, law_max, tgt; if ((cpus = OF_finddevice("/cpus")) != -1) { @@ -128,6 +136,51 @@ mpc85xx_attach(platform_t plat) maxcpu = 1; /* + * Locate CCSR region. Irritatingly, there is no way to find it + * unless you already know where it is. Try to infer its location + * from the device tree. + */ + + ccsr = -1; + for (name = soc_name_guesses; *name != NULL && ccsr == -1; name++) + ccsr = OF_finddevice(*name); + if (ccsr == -1) { + char type[64]; + + /* That didn't work. Search for devices of type "soc" */ + child = OF_child(OF_peer(0)); + for (OF_child(child); child != 0; child = OF_peer(child)) { + if (OF_getprop(child, "device_type", type, sizeof(type)) + <= 0) + continue; + + if (strcmp(type, "soc") == 0) { + ccsr = child; + break; + } + } + } + + if (ccsr == -1) + panic("Could not locate CCSR window!"); + + OF_getprop(ccsr, "#size-cells", &scells, sizeof(scells)); + OF_getprop(ccsr, "#address-cells", &acells, sizeof(acells)); + OF_searchprop(OF_parent(ccsr), "#address-cells", &pacells, + sizeof(pacells)); + OF_getprop(ccsr, "ranges", ranges, sizeof(ranges)); + ccsrbar = ccsrsize = 0; + for (i = acells; i < acells + pacells; i++) { + ccsrbar <<= 32; + ccsrbar |= ranges[i]; + } + for (i = acells + pacells; i < acells + pacells + scells; i++) { + ccsrsize <<= 32; + ccsrsize |= ranges[i]; + } + ccsrbar_va = pmap_early_io_map(ccsrbar, ccsrsize); + + /* * Clear local access windows. Skip DRAM entries, so we don't shoot * ourselves in the foot. */ Modified: stable/10/sys/powerpc/powerpc/genassym.c ============================================================================== --- stable/10/sys/powerpc/powerpc/genassym.c Wed May 14 04:02:59 2014 (r266002) +++ stable/10/sys/powerpc/powerpc/genassym.c Wed May 14 04:14:58 2014 (r266003) @@ -193,8 +193,6 @@ ASSYM(PCB_FPU, PCB_FPU); ASSYM(PCB_VEC, PCB_VEC); ASSYM(PCB_AIM_USR_VSID, offsetof(struct pcb, pcb_cpu.aim.usr_vsid)); -ASSYM(PCB_BOOKE_CTR, offsetof(struct pcb, pcb_cpu.booke.ctr)); -ASSYM(PCB_BOOKE_XER, offsetof(struct pcb, pcb_cpu.booke.xer)); ASSYM(PCB_BOOKE_DBCR0, offsetof(struct pcb, pcb_cpu.booke.dbcr0)); ASSYM(TD_LOCK, offsetof(struct thread, td_lock)); Modified: stable/10/sys/powerpc/powerpc/swtch32.S ============================================================================== --- stable/10/sys/powerpc/powerpc/swtch32.S Wed May 14 04:02:59 2014 (r266002) +++ stable/10/sys/powerpc/powerpc/swtch32.S Wed May 14 04:14:58 2014 (r266003) @@ -90,10 +90,6 @@ ENTRY(cpu_switch) mflr %r16 /* Save the link register */ stw %r16,PCB_LR(%r6) #ifdef BOOKE - mfctr %r16 - stw %r16,PCB_BOOKE_CTR(%r6) - mfxer %r16 - stw %r16,PCB_BOOKE_XER(%r6) mfspr %r16,SPR_DBCR0 stw %r16,PCB_BOOKE_DBCR0(%r6) #endif @@ -179,10 +175,6 @@ blocked_loop: isync #endif #ifdef BOOKE - lwz %r5,PCB_BOOKE_CTR(%r3) - mtctr %r5 - lwz %r5,PCB_BOOKE_XER(%r3) - mtctr %r5 lwz %r5,PCB_BOOKE_DBCR0(%r3) mtspr SPR_DBCR0,%r5 #endif From owner-svn-src-stable@FreeBSD.ORG Wed May 14 04:42:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8316D7E7; Wed, 14 May 2014 04:42:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6523E26CE; Wed, 14 May 2014 04:42:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4E4geUZ006261; Wed, 14 May 2014 04:42:40 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4E4gc8G006249; Wed, 14 May 2014 04:42:38 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405140442.s4E4gc8G006249@svn.freebsd.org> From: Ian Lepore Date: Wed, 14 May 2014 04:42:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266004 - in stable/10/sys: conf powerpc/booke powerpc/fpu powerpc/include powerpc/powerpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 04:42:40 -0000 Author: ian Date: Wed May 14 04:42:38 2014 New Revision: 266004 URL: http://svnweb.freebsd.org/changeset/base/266004 Log: MFC r258247, r258250, r258257 Remove a pointless #ifdef AIM. This is just PPC64 specific, including 64-bit Book-E. Make single precision floating point arithmetic actually work Split the function of the PCB_FPU flags into two: PCB_FPU now indicates that the actual FPU is enabled, while PCB_FPREGS indicates that the FPU state structure in the PCB is valid. Modified: stable/10/sys/conf/files.powerpc stable/10/sys/powerpc/booke/trap.c stable/10/sys/powerpc/fpu/fpu_emu.c stable/10/sys/powerpc/fpu/fpu_explode.c stable/10/sys/powerpc/include/counter.h stable/10/sys/powerpc/include/pcb.h stable/10/sys/powerpc/powerpc/exec_machdep.c stable/10/sys/powerpc/powerpc/fpu.c stable/10/sys/powerpc/powerpc/swtch32.S Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files.powerpc ============================================================================== --- stable/10/sys/conf/files.powerpc Wed May 14 04:14:58 2014 (r266003) +++ stable/10/sys/conf/files.powerpc Wed May 14 04:42:38 2014 (r266004) @@ -169,7 +169,7 @@ powerpc/powermac/uninorth.c optional pow powerpc/powermac/uninorthpci.c optional powermac pci powerpc/powermac/vcoregpio.c optional powermac powerpc/powermac/windtunnel.c optional powermac windtunnel -powerpc/powerpc/altivec.c optional aim +powerpc/powerpc/altivec.c standard powerpc/powerpc/autoconf.c standard powerpc/powerpc/bcopy.c standard powerpc/powerpc/bus_machdep.c standard @@ -186,7 +186,7 @@ powerpc/powerpc/dump_machdep.c standard powerpc/powerpc/elf32_machdep.c optional powerpc | compat_freebsd32 powerpc/powerpc/elf64_machdep.c optional powerpc64 powerpc/powerpc/exec_machdep.c standard -powerpc/powerpc/fpu.c optional aim +powerpc/powerpc/fpu.c standard powerpc/powerpc/fuswintr.c standard powerpc/powerpc/gdb_machdep.c optional gdb powerpc/powerpc/in_cksum.c optional inet | inet6 Modified: stable/10/sys/powerpc/booke/trap.c ============================================================================== --- stable/10/sys/powerpc/booke/trap.c Wed May 14 04:14:58 2014 (r266003) +++ stable/10/sys/powerpc/booke/trap.c Wed May 14 04:42:38 2014 (r266004) @@ -194,6 +194,11 @@ trap(struct trapframe *frame) case EXC_PGM: /* Program exception */ #ifdef FPU_EMU + if (!(td->td_pcb->pcb_flags & PCB_FPREGS)) { + bzero(&td->td_pcb->pcb_fpu, + sizeof(td->td_pcb->pcb_fpu)); + td->td_pcb->pcb_flags |= PCB_FPREGS; + } sig = fpu_emulate(frame, (struct fpreg *)&td->td_pcb->pcb_fpu); #else Modified: stable/10/sys/powerpc/fpu/fpu_emu.c ============================================================================== --- stable/10/sys/powerpc/fpu/fpu_emu.c Wed May 14 04:14:58 2014 (r266003) +++ stable/10/sys/powerpc/fpu/fpu_emu.c Wed May 14 04:42:38 2014 (r266004) @@ -606,9 +606,11 @@ fpu_execute(struct trapframe *tf, struct rb = instr.i_a.i_frb; rc = instr.i_a.i_frc; - type = FTYPE_SNG; - if (instr.i_any.i_opcd & 0x4) - type = FTYPE_DBL; + /* + * All arithmetic operations work on registers, which + * are stored as doubles. + */ + type = FTYPE_DBL; switch ((unsigned int)instr.i_a.i_xo) { case OPC59_FDIVS: FPU_EMU_EVCNT_INCR(fdiv); @@ -725,6 +727,13 @@ fpu_execute(struct trapframe *tf, struct return (NOTFPU); break; } + + /* If the instruction was single precision, round */ + if (!(instr.i_any.i_opcd & 0x4)) { + fpu_implode(fe, fp, FTYPE_SNG, + (u_int *)&fs->fpreg[rt]); + fpu_explode(fe, fp = &fe->fe_f1, FTYPE_SNG, rt); + } } } else { return (NOTFPU); Modified: stable/10/sys/powerpc/fpu/fpu_explode.c ============================================================================== --- stable/10/sys/powerpc/fpu/fpu_explode.c Wed May 14 04:14:58 2014 (r266003) +++ stable/10/sys/powerpc/fpu/fpu_explode.c Wed May 14 04:42:38 2014 (r266004) @@ -235,6 +235,7 @@ fpu_explode(struct fpemu *fe, struct fpn s = fpu_dtof(fp, s, space[1]); break; + default: panic("fpu_explode"); panic("fpu_explode: invalid type %d", type); } Modified: stable/10/sys/powerpc/include/counter.h ============================================================================== --- stable/10/sys/powerpc/include/counter.h Wed May 14 04:14:58 2014 (r266003) +++ stable/10/sys/powerpc/include/counter.h Wed May 14 04:42:38 2014 (r266004) @@ -34,7 +34,7 @@ #include #endif -#if defined(AIM) && defined(__powerpc64__) +#ifdef __powerpc64__ #define counter_enter() do {} while (0) #define counter_exit() do {} while (0) @@ -98,7 +98,7 @@ counter_u64_add(counter_u64_t c, int64_t : "cc", "memory"); } -#else /* !AIM || !64bit */ +#else /* !64bit */ #define counter_enter() critical_enter() #define counter_exit() critical_exit() @@ -157,6 +157,6 @@ counter_u64_add(counter_u64_t c, int64_t counter_exit(); } -#endif /* AIM 64bit */ +#endif /* 64bit */ #endif /* ! __MACHINE_COUNTER_H__ */ Modified: stable/10/sys/powerpc/include/pcb.h ============================================================================== --- stable/10/sys/powerpc/include/pcb.h Wed May 14 04:14:58 2014 (r266003) +++ stable/10/sys/powerpc/include/pcb.h Wed May 14 04:42:38 2014 (r266004) @@ -47,8 +47,9 @@ struct pcb { faultbuf *pcb_onfault; /* For use during copyin/copyout */ int pcb_flags; -#define PCB_FPU 1 /* Process had FPU initialized */ -#define PCB_VEC 2 /* Process had Altivec initialized */ +#define PCB_FPU 1 /* Process uses FPU */ +#define PCB_FPREGS 2 /* Process had FPU registers initialized */ +#define PCB_VEC 4 /* Process had Altivec initialized */ struct fpu { double fpr[32]; double fpscr; /* FPSCR stored as double for easier access */ Modified: stable/10/sys/powerpc/powerpc/exec_machdep.c ============================================================================== --- stable/10/sys/powerpc/powerpc/exec_machdep.c Wed May 14 04:14:58 2014 (r266003) +++ stable/10/sys/powerpc/powerpc/exec_machdep.c Wed May 14 04:42:38 2014 (r266004) @@ -381,19 +381,20 @@ grab_mcontext(struct thread *td, mcontex mcp->mc_gpr[4] = 0; } -#ifdef AIM /* * This assumes that floating-point context is *not* lazy, * so if the thread has used FP there would have been a * FP-unavailable exception that would have set things up * correctly. */ - if (pcb->pcb_flags & PCB_FPU) { - KASSERT(td == curthread, - ("get_mcontext: fp save not curthread")); - critical_enter(); - save_fpu(td); - critical_exit(); + if (pcb->pcb_flags & PCB_FPREGS) { + if (pcb->pcb_flags & PCB_FPU) { + KASSERT(td == curthread, + ("get_mcontext: fp save not curthread")); + critical_enter(); + save_fpu(td); + critical_exit(); + } mcp->mc_flags |= _MC_FP_VALID; memcpy(&mcp->mc_fpscr, &pcb->pcb_fpu.fpscr, sizeof(double)); memcpy(mcp->mc_fpreg, pcb->pcb_fpu.fpr, 32*sizeof(double)); @@ -414,7 +415,6 @@ grab_mcontext(struct thread *td, mcontex mcp->mc_vrsave = pcb->pcb_vec.vrsave; memcpy(mcp->mc_avec, pcb->pcb_vec.vr, sizeof(mcp->mc_avec)); } -#endif mcp->mc_len = sizeof(*mcp); @@ -467,13 +467,9 @@ set_mcontext(struct thread *td, const mc else tf->fixreg[2] = tls; -#ifdef AIM if (mcp->mc_flags & _MC_FP_VALID) { - if ((pcb->pcb_flags & PCB_FPU) != PCB_FPU) { - critical_enter(); - enable_fpu(td); - critical_exit(); - } + /* enable_fpu() will happen lazily on a fault */ + pcb->pcb_flags |= PCB_FPREGS; memcpy(&pcb->pcb_fpu.fpscr, &mcp->mc_fpscr, sizeof(double)); memcpy(pcb->pcb_fpu.fpr, mcp->mc_fpreg, 32*sizeof(double)); } @@ -488,7 +484,6 @@ set_mcontext(struct thread *td, const mc pcb->pcb_vec.vrsave = mcp->mc_vrsave; memcpy(pcb->pcb_vec.vr, mcp->mc_avec, sizeof(mcp->mc_avec)); } -#endif return (0); } @@ -625,7 +620,7 @@ fill_fpregs(struct thread *td, struct fp pcb = td->td_pcb; - if ((pcb->pcb_flags & PCB_FPU) == 0) + if ((pcb->pcb_flags & PCB_FPREGS) == 0) memset(fpregs, 0, sizeof(struct fpreg)); else memcpy(fpregs, &pcb->pcb_fpu, sizeof(struct fpreg)); @@ -654,14 +649,11 @@ set_dbregs(struct thread *td, struct dbr int set_fpregs(struct thread *td, struct fpreg *fpregs) { -#ifdef AIM struct pcb *pcb; pcb = td->td_pcb; - if ((pcb->pcb_flags & PCB_FPU) == 0) - enable_fpu(td); + pcb->pcb_flags |= PCB_FPREGS; memcpy(&pcb->pcb_fpu, fpregs, sizeof(struct fpreg)); -#endif return (0); } @@ -1021,14 +1013,10 @@ cpu_set_upcall_kse(struct thread *td, vo tf->fixreg[3] = (register_t)arg; if (SV_PROC_FLAG(td->td_proc, SV_ILP32)) { tf->srr0 = (register_t)entry; - #ifdef AIM tf->srr1 = PSL_USERSET | PSL_FE_DFLT; #ifdef __powerpc64__ tf->srr1 &= ~PSL_SF; #endif - #else - tf->srr1 = PSL_USERSET; - #endif } else { #ifdef __powerpc64__ register_t entry_desc[3]; Modified: stable/10/sys/powerpc/powerpc/fpu.c ============================================================================== --- stable/10/sys/powerpc/powerpc/fpu.c Wed May 14 04:14:58 2014 (r266003) +++ stable/10/sys/powerpc/powerpc/fpu.c Wed May 14 04:42:38 2014 (r266004) @@ -66,10 +66,11 @@ enable_fpu(struct thread *td) * initialise the FPU registers and FPSCR to 0, and set the flag * to indicate that the FPU is in use. */ + pcb->pcb_flags |= PCB_FPU; tf->srr1 |= PSL_FP; - if (!(pcb->pcb_flags & PCB_FPU)) { + if (!(pcb->pcb_flags & PCB_FPREGS)) { memset(&pcb->pcb_fpu, 0, sizeof pcb->pcb_fpu); - pcb->pcb_flags |= PCB_FPU; + pcb->pcb_flags |= PCB_FPREGS; } /* Modified: stable/10/sys/powerpc/powerpc/swtch32.S ============================================================================== --- stable/10/sys/powerpc/powerpc/swtch32.S Wed May 14 04:14:58 2014 (r266003) +++ stable/10/sys/powerpc/powerpc/swtch32.S Wed May 14 04:42:38 2014 (r266004) @@ -100,7 +100,6 @@ ENTRY(cpu_switch) mr %r16,%r5 /* and the new lock */ mr %r17,%r6 /* and the PCB */ -#ifdef AIM lwz %r7,PCB_FLAGS(%r17) /* Save FPU context if needed */ andi. %r7, %r7, PCB_FPU @@ -116,7 +115,6 @@ ENTRY(cpu_switch) bl save_vec .L2: -#endif mr %r3,%r14 /* restore old thread ptr */ bl pmap_deactivate /* Deactivate the current pmap */ @@ -143,7 +141,6 @@ blocked_loop: mr %r3,%r2 /* Get new thread ptr */ bl pmap_activate /* Activate the new address space */ -#ifdef AIM lwz %r6, PCB_FLAGS(%r17) /* Restore FPU context if needed */ andi. %r6, %r6, PCB_FPU @@ -160,7 +157,6 @@ blocked_loop: bl enable_vec .L4: -#endif /* thread to restore is in r3 */ mr %r3,%r17 /* Recover PCB ptr */ lmw %r12,PCB_CONTEXT(%r3) /* Load the non-volatile GP regs */ From owner-svn-src-stable@FreeBSD.ORG Wed May 14 04:57:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B90AEEA; Wed, 14 May 2014 04:57:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6CC27B1; Wed, 14 May 2014 04:57:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4E4vv87011385; Wed, 14 May 2014 04:57:57 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4E4vt5T011373; Wed, 14 May 2014 04:57:55 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405140457.s4E4vt5T011373@svn.freebsd.org> From: Ian Lepore Date: Wed, 14 May 2014 04:57:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266005 - in stable/10/sys: conf dev/uart powerpc/aim powerpc/booke powerpc/fpu powerpc/include powerpc/powerpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 04:57:57 -0000 Author: ian Date: Wed May 14 04:57:55 2014 New Revision: 266005 URL: http://svnweb.freebsd.org/changeset/base/266005 Log: MFC r258259, r258798, r259010 Unify handling of illegal instruction faults between AIM and Book-E. Make uart_cpu_powerpc work on both FDT and OFW systems. Fix debug printfs in FPU_EMU to compile on powerpc64 and enable it for powerpc64. Modified: stable/10/sys/conf/files.powerpc stable/10/sys/dev/uart/uart_cpu_powerpc.c stable/10/sys/powerpc/aim/trap.c stable/10/sys/powerpc/booke/trap.c stable/10/sys/powerpc/fpu/fpu_emu.c stable/10/sys/powerpc/include/trap.h stable/10/sys/powerpc/powerpc/exec_machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files.powerpc ============================================================================== --- stable/10/sys/conf/files.powerpc Wed May 14 04:42:38 2014 (r266004) +++ stable/10/sys/conf/files.powerpc Wed May 14 04:57:55 2014 (r266005) @@ -65,8 +65,7 @@ dev/syscons/scterm-teken.c optional sc dev/syscons/scvtb.c optional sc dev/tsec/if_tsec.c optional tsec dev/tsec/if_tsec_fdt.c optional tsec fdt -dev/uart/uart_cpu_fdt.c optional uart fdt -dev/uart/uart_cpu_powerpc.c optional uart aim +dev/uart/uart_cpu_powerpc.c optional uart dev/usb/controller/ehci_fsl.c optional ehci mpc85xx dev/vt/hw/ofwfb/ofwfb.c optional vt aim kern/kern_clocksource.c standard @@ -111,15 +110,15 @@ powerpc/booke/trap.c optional booke powerpc/cpufreq/dfs.c optional cpufreq powerpc/cpufreq/pcr.c optional cpufreq aim powerpc/cpufreq/pmufreq.c optional cpufreq aim pmu -powerpc/fpu/fpu_add.c optional fpu_emu powerpc -powerpc/fpu/fpu_compare.c optional fpu_emu powerpc -powerpc/fpu/fpu_div.c optional fpu_emu powerpc -powerpc/fpu/fpu_emu.c optional fpu_emu powerpc -powerpc/fpu/fpu_explode.c optional fpu_emu powerpc -powerpc/fpu/fpu_implode.c optional fpu_emu powerpc -powerpc/fpu/fpu_mul.c optional fpu_emu powerpc -powerpc/fpu/fpu_sqrt.c optional fpu_emu powerpc -powerpc/fpu/fpu_subr.c optional fpu_emu powerpc +powerpc/fpu/fpu_add.c optional fpu_emu +powerpc/fpu/fpu_compare.c optional fpu_emu +powerpc/fpu/fpu_div.c optional fpu_emu +powerpc/fpu/fpu_emu.c optional fpu_emu +powerpc/fpu/fpu_explode.c optional fpu_emu +powerpc/fpu/fpu_implode.c optional fpu_emu +powerpc/fpu/fpu_mul.c optional fpu_emu +powerpc/fpu/fpu_sqrt.c optional fpu_emu +powerpc/fpu/fpu_subr.c optional fpu_emu powerpc/mambo/mambocall.S optional mambo powerpc/mambo/mambo.c optional mambo powerpc/mambo/mambo_console.c optional mambo Modified: stable/10/sys/dev/uart/uart_cpu_powerpc.c ============================================================================== --- stable/10/sys/dev/uart/uart_cpu_powerpc.c Wed May 14 04:42:38 2014 (r266004) +++ stable/10/sys/dev/uart/uart_cpu_powerpc.c Wed May 14 04:57:55 2014 (r266005) @@ -61,42 +61,96 @@ ofw_get_uart_console(phandle_t opts, pha input = OF_finddevice(buf); if (input == -1) return (ENXIO); - if (OF_getprop(opts, outputdev, buf, sizeof(buf)) == -1) - return (ENXIO); - if (OF_finddevice(buf) != input) - return (ENXIO); + + if (outputdev != NULL) { + if (OF_getprop(opts, outputdev, buf, sizeof(buf)) == -1) + return (ENXIO); + if (OF_finddevice(buf) != input) + return (ENXIO); + } *result = input; return (0); } +static int +ofw_get_console_phandle_path(phandle_t node, phandle_t *result, + const char *prop) +{ + union { + char buf[64]; + phandle_t ref; + } field; + phandle_t output; + ssize_t size; + + size = OF_getproplen(node, prop); + if (size == -1) + return (ENXIO); + OF_getprop(node, prop, &field, sizeof(field)); + + /* This property might be a phandle or might be a path. Hooray. */ + + output = -1; + if (field.buf[size - 1] == 0) + output = OF_finddevice(field.buf); + if (output == -1 && size == 4) + output = OF_xref_phandle(field.ref); + + if (output != -1) { + *result = output; + return (0); + } + + return (ENXIO); +} + int uart_cpu_getdev(int devtype, struct uart_devinfo *di) { char buf[64]; struct uart_class *class; - phandle_t input, opts; + phandle_t input, opts, chosen; int error; class = &uart_z8530_class; if (class == NULL) return (ENXIO); - if ((opts = OF_finddevice("/options")) == -1) - return (ENXIO); + opts = OF_finddevice("/options"); + chosen = OF_finddevice("/chosen"); switch (devtype) { case UART_DEV_CONSOLE: - if (ofw_get_uart_console(opts, &input, "input-device", - "output-device")) { - /* - * At least some G5 Xserves require that we - * probe input-device-1 as well - */ - - if (ofw_get_uart_console(opts, &input, "input-device-1", - "output-device-1")) - return (ENXIO); + error = ENXIO; + if (chosen != -1 && error != 0) + error = ofw_get_uart_console(chosen, &input, + "stdout-path", NULL); + if (chosen != -1 && error != 0) + error = ofw_get_uart_console(chosen, &input, + "linux,stdout-path", NULL); + if (chosen != -1 && error != 0) + error = ofw_get_console_phandle_path(chosen, &input, + "stdout"); + if (chosen != -1 && error != 0) + error = ofw_get_uart_console(chosen, &input, + "stdin-path", NULL); + if (chosen != -1 && error != 0) + error = ofw_get_console_phandle_path(chosen, &input, + "stdin"); + if (opts != -1 && error != 0) + error = ofw_get_uart_console(opts, &input, + "input-device", "output-device"); + if (opts != -1 && error != 0) + error = ofw_get_uart_console(opts, &input, + "input-device-1", "output-device-1"); + if (error != 0) { + input = OF_finddevice("serial0"); /* Last ditch */ + if (input == -1) + error = (ENXIO); } + + if (error != 0) + return (error); break; case UART_DEV_DBGPORT: if (!getenv_string("hw.uart.dbgport", buf, sizeof(buf))) @@ -113,14 +167,14 @@ uart_cpu_getdev(int devtype, struct uart return (ENXIO); if (strcmp(buf, "serial") != 0) return (ENXIO); - if (OF_getprop(input, "name", buf, sizeof(buf)) == -1) + if (OF_getprop(input, "compatible", buf, sizeof(buf)) == -1) return (ENXIO); - if (strcmp(buf, "ch-a") == 0) { + if (strncmp(buf, "chrp,es", 7) == 0) { class = &uart_z8530_class; di->bas.regshft = 4; di->bas.chan = 1; - } else if (strcmp(buf,"serial") == 0) { + } else if (strcmp(buf,"ns16550") == 0 || strcmp(buf,"ns8250") == 0) { class = &uart_ns8250_class; di->bas.regshft = 0; di->bas.chan = 0; @@ -139,9 +193,12 @@ uart_cpu_getdev(int devtype, struct uart if (OF_getprop(input, "current-speed", &di->baudrate, sizeof(di->baudrate)) == -1) di->baudrate = 0; + OF_getprop(input, "reg-shift", &di->bas.regshft, + sizeof(di->bas.regshft)); di->databits = 8; di->stopbits = 1; di->parity = UART_PARITY_NONE; return (0); } + Modified: stable/10/sys/powerpc/aim/trap.c ============================================================================== --- stable/10/sys/powerpc/aim/trap.c Wed May 14 04:42:38 2014 (r266004) +++ stable/10/sys/powerpc/aim/trap.c Wed May 14 04:57:55 2014 (r266005) @@ -80,7 +80,6 @@ static void printtrap(u_int vector, stru int user); static int trap_pfault(struct trapframe *frame, int user); static int fix_unaligned(struct thread *td, struct trapframe *frame); -static int ppc_instr_emulate(struct trapframe *frame); static int handle_onfault(struct trapframe *frame); static void syscall(struct trapframe *frame); @@ -292,10 +291,9 @@ trap(struct trapframe *frame) } #endif sig = SIGTRAP; - } else if (ppc_instr_emulate(frame) == 0) - frame->srr0 += 4; - else - sig = SIGILL; + } else { + sig = ppc_instr_emulate(frame, td->td_pcb); + } break; default: @@ -800,20 +798,3 @@ fix_unaligned(struct thread *td, struct return -1; } -static int -ppc_instr_emulate(struct trapframe *frame) -{ - uint32_t instr; - int reg; - - instr = fuword32((void *)frame->srr0); - - if ((instr & 0xfc1fffff) == 0x7c1f42a6) { /* mfpvr */ - reg = (instr & ~0xfc1fffff) >> 21; - frame->fixreg[reg] = mfpvr(); - return (0); - } - - return (-1); -} - Modified: stable/10/sys/powerpc/booke/trap.c ============================================================================== --- stable/10/sys/powerpc/booke/trap.c Wed May 14 04:42:38 2014 (r266004) +++ stable/10/sys/powerpc/booke/trap.c Wed May 14 04:57:55 2014 (r266005) @@ -71,10 +71,6 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef FPU_EMU -#include -#endif - #define FAULTBUF_LR 0 #define FAULTBUF_R1 1 #define FAULTBUF_R2 2 @@ -193,18 +189,7 @@ trap(struct trapframe *frame) break; case EXC_PGM: /* Program exception */ -#ifdef FPU_EMU - if (!(td->td_pcb->pcb_flags & PCB_FPREGS)) { - bzero(&td->td_pcb->pcb_fpu, - sizeof(td->td_pcb->pcb_fpu)); - td->td_pcb->pcb_flags |= PCB_FPREGS; - } - sig = fpu_emulate(frame, - (struct fpreg *)&td->td_pcb->pcb_fpu); -#else - /* XXX SIGILL for non-trap instructions. */ - sig = SIGTRAP; -#endif + sig = ppc_instr_emulate(frame, td->td_pcb); break; default: Modified: stable/10/sys/powerpc/fpu/fpu_emu.c ============================================================================== --- stable/10/sys/powerpc/fpu/fpu_emu.c Wed May 14 04:42:38 2014 (r266004) +++ stable/10/sys/powerpc/fpu/fpu_emu.c Wed May 14 04:57:55 2014 (r266005) @@ -326,8 +326,10 @@ fpu_execute(struct trapframe *tf, struct /* Store as integer */ ra = instr.i_x.i_ra; rb = instr.i_x.i_rb; - DPRINTF(FPE_INSN, ("reg %d has %x reg %d has %x\n", - ra, tf->fixreg[ra], rb, tf->fixreg[rb])); + DPRINTF(FPE_INSN, + ("reg %d has %jx reg %d has %jx\n", + ra, (uintmax_t)tf->fixreg[ra], rb, + (uintmax_t)tf->fixreg[rb])); addr = tf->fixreg[rb]; if (ra != 0) @@ -356,8 +358,9 @@ fpu_execute(struct trapframe *tf, struct /* calculate EA of load/store */ ra = instr.i_x.i_ra; rb = instr.i_x.i_rb; - DPRINTF(FPE_INSN, ("reg %d has %x reg %d has %x\n", - ra, tf->fixreg[ra], rb, tf->fixreg[rb])); + DPRINTF(FPE_INSN, ("reg %d has %jx reg %d has %jx\n", + ra, (uintmax_t)tf->fixreg[ra], rb, + (uintmax_t)tf->fixreg[rb])); addr = tf->fixreg[rb]; if (ra != 0) addr += tf->fixreg[ra]; @@ -373,8 +376,9 @@ fpu_execute(struct trapframe *tf, struct /* calculate EA of load/store */ ra = instr.i_d.i_ra; addr = instr.i_d.i_d; - DPRINTF(FPE_INSN, ("reg %d has %x displ %x\n", - ra, tf->fixreg[ra], addr)); + DPRINTF(FPE_INSN, ("reg %d has %jx displ %jx\n", + ra, (uintmax_t)tf->fixreg[ra], + (uintmax_t)addr)); if (ra != 0) addr += tf->fixreg[ra]; rt = instr.i_d.i_rt; @@ -420,7 +424,7 @@ fpu_execute(struct trapframe *tf, struct return (0); #ifdef notyet } else if (instr.i_any.i_opcd == OPC_load_st_62) { - /* These are 64-bit extenstions */ + /* These are 64-bit extensions */ return (NOTFPU); #endif } else if (instr.i_any.i_opcd == OPC_sp_fp_59 || @@ -784,7 +788,8 @@ fpu_execute(struct trapframe *tf, struct /* Move fpu condition codes to cr[1] */ tf->cr &= ~(0xf0000000>>bf); tf->cr |= (cond>>bf); - DPRINTF(FPE_INSN, ("fpu_execute: cr[%d] (cr=%x) <= %x\n", bf/4, tf->cr, cond)); + DPRINTF(FPE_INSN, ("fpu_execute: cr[%d] (cr=%jx) <= %x\n", + bf/4, (uintmax_t)tf->cr, cond)); } ((int *)&fs->fpscr)[1] = fsr; Modified: stable/10/sys/powerpc/include/trap.h ============================================================================== --- stable/10/sys/powerpc/include/trap.h Wed May 14 04:42:38 2014 (r266004) +++ stable/10/sys/powerpc/include/trap.h Wed May 14 04:57:55 2014 (r266005) @@ -122,7 +122,9 @@ #ifndef LOCORE struct trapframe; +struct pcb; void trap(struct trapframe *); +int ppc_instr_emulate(struct trapframe *, struct pcb *); #endif #endif /* _POWERPC_TRAP_H_ */ Modified: stable/10/sys/powerpc/powerpc/exec_machdep.c ============================================================================== --- stable/10/sys/powerpc/powerpc/exec_machdep.c Wed May 14 04:42:38 2014 (r266004) +++ stable/10/sys/powerpc/powerpc/exec_machdep.c Wed May 14 04:57:55 2014 (r266005) @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" +#include "opt_fpu_emu.h" #include #include @@ -92,6 +93,10 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FPU_EMU +#include +#endif + #ifdef COMPAT_FREEBSD32 #include #include @@ -1038,3 +1043,36 @@ cpu_set_upcall_kse(struct thread *td, vo td->td_retval[1] = 0; } +int +ppc_instr_emulate(struct trapframe *frame, struct pcb *pcb) +{ + uint32_t instr; + int reg, sig; + + instr = fuword32((void *)frame->srr0); + sig = SIGILL; + + if ((instr & 0xfc1fffff) == 0x7c1f42a6) { /* mfpvr */ + reg = (instr & ~0xfc1fffff) >> 21; + frame->fixreg[reg] = mfpvr(); + frame->srr0 += 4; + return (0); + } + + if ((instr & 0xfc000ffe) == 0x7c0004ac) { /* various sync */ + powerpc_sync(); /* Do a heavy-weight sync */ + frame->srr0 += 4; + return (0); + } + +#ifdef FPU_EMU + if (!(pcb->pcb_flags & PCB_FPREGS)) { + bzero(&pcb->pcb_fpu, sizeof(pcb->pcb_fpu)); + pcb->pcb_flags |= PCB_FPREGS; + } + sig = fpu_emulate(frame, (struct fpreg *)&pcb->pcb_fpu); +#endif + + return (sig); +} + From owner-svn-src-stable@FreeBSD.ORG Wed May 14 09:12:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 616CE624; Wed, 14 May 2014 09:12:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 433D12B52; Wed, 14 May 2014 09:12:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4E9C2iQ025347; Wed, 14 May 2014 09:12:02 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4E9C2Fj025346; Wed, 14 May 2014 09:12:02 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201405140912.s4E9C2Fj025346@svn.freebsd.org> From: Steven Hartland Date: Wed, 14 May 2014 09:12:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266008 - stable/10/sys/dev/pci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 09:12:02 -0000 Author: smh Date: Wed May 14 09:12:01 2014 New Revision: 266008 URL: http://svnweb.freebsd.org/changeset/base/266008 Log: MFC r265149 Make uninteresting PCI devices with no attached drivers only print out on a verbose boot. Sponsored by: Multiplay Modified: stable/10/sys/dev/pci/pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/pci/pci.c ============================================================================== --- stable/10/sys/dev/pci/pci.c Wed May 14 09:03:02 2014 (r266007) +++ stable/10/sys/dev/pci/pci.c Wed May 14 09:12:01 2014 (r266008) @@ -3726,105 +3726,107 @@ static const struct { int class; int subclass; + int report; /* 0 = bootverbose, 1 = always */ const char *desc; } pci_nomatch_tab[] = { - {PCIC_OLD, -1, "old"}, - {PCIC_OLD, PCIS_OLD_NONVGA, "non-VGA display device"}, - {PCIC_OLD, PCIS_OLD_VGA, "VGA-compatible display device"}, - {PCIC_STORAGE, -1, "mass storage"}, - {PCIC_STORAGE, PCIS_STORAGE_SCSI, "SCSI"}, - {PCIC_STORAGE, PCIS_STORAGE_IDE, "ATA"}, - {PCIC_STORAGE, PCIS_STORAGE_FLOPPY, "floppy disk"}, - {PCIC_STORAGE, PCIS_STORAGE_IPI, "IPI"}, - {PCIC_STORAGE, PCIS_STORAGE_RAID, "RAID"}, - {PCIC_STORAGE, PCIS_STORAGE_ATA_ADMA, "ATA (ADMA)"}, - {PCIC_STORAGE, PCIS_STORAGE_SATA, "SATA"}, - {PCIC_STORAGE, PCIS_STORAGE_SAS, "SAS"}, - {PCIC_STORAGE, PCIS_STORAGE_NVM, "NVM"}, - {PCIC_NETWORK, -1, "network"}, - {PCIC_NETWORK, PCIS_NETWORK_ETHERNET, "ethernet"}, - {PCIC_NETWORK, PCIS_NETWORK_TOKENRING, "token ring"}, - {PCIC_NETWORK, PCIS_NETWORK_FDDI, "fddi"}, - {PCIC_NETWORK, PCIS_NETWORK_ATM, "ATM"}, - {PCIC_NETWORK, PCIS_NETWORK_ISDN, "ISDN"}, - {PCIC_DISPLAY, -1, "display"}, - {PCIC_DISPLAY, PCIS_DISPLAY_VGA, "VGA"}, - {PCIC_DISPLAY, PCIS_DISPLAY_XGA, "XGA"}, - {PCIC_DISPLAY, PCIS_DISPLAY_3D, "3D"}, - {PCIC_MULTIMEDIA, -1, "multimedia"}, - {PCIC_MULTIMEDIA, PCIS_MULTIMEDIA_VIDEO, "video"}, - {PCIC_MULTIMEDIA, PCIS_MULTIMEDIA_AUDIO, "audio"}, - {PCIC_MULTIMEDIA, PCIS_MULTIMEDIA_TELE, "telephony"}, - {PCIC_MULTIMEDIA, PCIS_MULTIMEDIA_HDA, "HDA"}, - {PCIC_MEMORY, -1, "memory"}, - {PCIC_MEMORY, PCIS_MEMORY_RAM, "RAM"}, - {PCIC_MEMORY, PCIS_MEMORY_FLASH, "flash"}, - {PCIC_BRIDGE, -1, "bridge"}, - {PCIC_BRIDGE, PCIS_BRIDGE_HOST, "HOST-PCI"}, - {PCIC_BRIDGE, PCIS_BRIDGE_ISA, "PCI-ISA"}, - {PCIC_BRIDGE, PCIS_BRIDGE_EISA, "PCI-EISA"}, - {PCIC_BRIDGE, PCIS_BRIDGE_MCA, "PCI-MCA"}, - {PCIC_BRIDGE, PCIS_BRIDGE_PCI, "PCI-PCI"}, - {PCIC_BRIDGE, PCIS_BRIDGE_PCMCIA, "PCI-PCMCIA"}, - {PCIC_BRIDGE, PCIS_BRIDGE_NUBUS, "PCI-NuBus"}, - {PCIC_BRIDGE, PCIS_BRIDGE_CARDBUS, "PCI-CardBus"}, - {PCIC_BRIDGE, PCIS_BRIDGE_RACEWAY, "PCI-RACEway"}, - {PCIC_SIMPLECOMM, -1, "simple comms"}, - {PCIC_SIMPLECOMM, PCIS_SIMPLECOMM_UART, "UART"}, /* could detect 16550 */ - {PCIC_SIMPLECOMM, PCIS_SIMPLECOMM_PAR, "parallel port"}, - {PCIC_SIMPLECOMM, PCIS_SIMPLECOMM_MULSER, "multiport serial"}, - {PCIC_SIMPLECOMM, PCIS_SIMPLECOMM_MODEM, "generic modem"}, - {PCIC_BASEPERIPH, -1, "base peripheral"}, - {PCIC_BASEPERIPH, PCIS_BASEPERIPH_PIC, "interrupt controller"}, - {PCIC_BASEPERIPH, PCIS_BASEPERIPH_DMA, "DMA controller"}, - {PCIC_BASEPERIPH, PCIS_BASEPERIPH_TIMER, "timer"}, - {PCIC_BASEPERIPH, PCIS_BASEPERIPH_RTC, "realtime clock"}, - {PCIC_BASEPERIPH, PCIS_BASEPERIPH_PCIHOT, "PCI hot-plug controller"}, - {PCIC_BASEPERIPH, PCIS_BASEPERIPH_SDHC, "SD host controller"}, - {PCIC_INPUTDEV, -1, "input device"}, - {PCIC_INPUTDEV, PCIS_INPUTDEV_KEYBOARD, "keyboard"}, - {PCIC_INPUTDEV, PCIS_INPUTDEV_DIGITIZER,"digitizer"}, - {PCIC_INPUTDEV, PCIS_INPUTDEV_MOUSE, "mouse"}, - {PCIC_INPUTDEV, PCIS_INPUTDEV_SCANNER, "scanner"}, - {PCIC_INPUTDEV, PCIS_INPUTDEV_GAMEPORT, "gameport"}, - {PCIC_DOCKING, -1, "docking station"}, - {PCIC_PROCESSOR, -1, "processor"}, - {PCIC_SERIALBUS, -1, "serial bus"}, - {PCIC_SERIALBUS, PCIS_SERIALBUS_FW, "FireWire"}, - {PCIC_SERIALBUS, PCIS_SERIALBUS_ACCESS, "AccessBus"}, - {PCIC_SERIALBUS, PCIS_SERIALBUS_SSA, "SSA"}, - {PCIC_SERIALBUS, PCIS_SERIALBUS_USB, "USB"}, - {PCIC_SERIALBUS, PCIS_SERIALBUS_FC, "Fibre Channel"}, - {PCIC_SERIALBUS, PCIS_SERIALBUS_SMBUS, "SMBus"}, - {PCIC_WIRELESS, -1, "wireless controller"}, - {PCIC_WIRELESS, PCIS_WIRELESS_IRDA, "iRDA"}, - {PCIC_WIRELESS, PCIS_WIRELESS_IR, "IR"}, - {PCIC_WIRELESS, PCIS_WIRELESS_RF, "RF"}, - {PCIC_INTELLIIO, -1, "intelligent I/O controller"}, - {PCIC_INTELLIIO, PCIS_INTELLIIO_I2O, "I2O"}, - {PCIC_SATCOM, -1, "satellite communication"}, - {PCIC_SATCOM, PCIS_SATCOM_TV, "sat TV"}, - {PCIC_SATCOM, PCIS_SATCOM_AUDIO, "sat audio"}, - {PCIC_SATCOM, PCIS_SATCOM_VOICE, "sat voice"}, - {PCIC_SATCOM, PCIS_SATCOM_DATA, "sat data"}, - {PCIC_CRYPTO, -1, "encrypt/decrypt"}, - {PCIC_CRYPTO, PCIS_CRYPTO_NETCOMP, "network/computer crypto"}, - {PCIC_CRYPTO, PCIS_CRYPTO_ENTERTAIN, "entertainment crypto"}, - {PCIC_DASP, -1, "dasp"}, - {PCIC_DASP, PCIS_DASP_DPIO, "DPIO module"}, - {0, 0, NULL} + {PCIC_OLD, -1, 1, "old"}, + {PCIC_OLD, PCIS_OLD_NONVGA, 1, "non-VGA display device"}, + {PCIC_OLD, PCIS_OLD_VGA, 1, "VGA-compatible display device"}, + {PCIC_STORAGE, -1, 1, "mass storage"}, + {PCIC_STORAGE, PCIS_STORAGE_SCSI, 1, "SCSI"}, + {PCIC_STORAGE, PCIS_STORAGE_IDE, 1, "ATA"}, + {PCIC_STORAGE, PCIS_STORAGE_FLOPPY, 1, "floppy disk"}, + {PCIC_STORAGE, PCIS_STORAGE_IPI, 1, "IPI"}, + {PCIC_STORAGE, PCIS_STORAGE_RAID, 1, "RAID"}, + {PCIC_STORAGE, PCIS_STORAGE_ATA_ADMA, 1, "ATA (ADMA)"}, + {PCIC_STORAGE, PCIS_STORAGE_SATA, 1, "SATA"}, + {PCIC_STORAGE, PCIS_STORAGE_SAS, 1, "SAS"}, + {PCIC_STORAGE, PCIS_STORAGE_NVM, 1, "NVM"}, + {PCIC_NETWORK, -1, 1, "network"}, + {PCIC_NETWORK, PCIS_NETWORK_ETHERNET, 1, "ethernet"}, + {PCIC_NETWORK, PCIS_NETWORK_TOKENRING, 1, "token ring"}, + {PCIC_NETWORK, PCIS_NETWORK_FDDI, 1, "fddi"}, + {PCIC_NETWORK, PCIS_NETWORK_ATM, 1, "ATM"}, + {PCIC_NETWORK, PCIS_NETWORK_ISDN, 1, "ISDN"}, + {PCIC_DISPLAY, -1, 1, "display"}, + {PCIC_DISPLAY, PCIS_DISPLAY_VGA, 1, "VGA"}, + {PCIC_DISPLAY, PCIS_DISPLAY_XGA, 1, "XGA"}, + {PCIC_DISPLAY, PCIS_DISPLAY_3D, 1, "3D"}, + {PCIC_MULTIMEDIA, -1, 1, "multimedia"}, + {PCIC_MULTIMEDIA, PCIS_MULTIMEDIA_VIDEO, 1, "video"}, + {PCIC_MULTIMEDIA, PCIS_MULTIMEDIA_AUDIO, 1, "audio"}, + {PCIC_MULTIMEDIA, PCIS_MULTIMEDIA_TELE, 1, "telephony"}, + {PCIC_MULTIMEDIA, PCIS_MULTIMEDIA_HDA, 1, "HDA"}, + {PCIC_MEMORY, -1, 1, "memory"}, + {PCIC_MEMORY, PCIS_MEMORY_RAM, 1, "RAM"}, + {PCIC_MEMORY, PCIS_MEMORY_FLASH, 1, "flash"}, + {PCIC_BRIDGE, -1, 1, "bridge"}, + {PCIC_BRIDGE, PCIS_BRIDGE_HOST, 1, "HOST-PCI"}, + {PCIC_BRIDGE, PCIS_BRIDGE_ISA, 1, "PCI-ISA"}, + {PCIC_BRIDGE, PCIS_BRIDGE_EISA, 1, "PCI-EISA"}, + {PCIC_BRIDGE, PCIS_BRIDGE_MCA, 1, "PCI-MCA"}, + {PCIC_BRIDGE, PCIS_BRIDGE_PCI, 1, "PCI-PCI"}, + {PCIC_BRIDGE, PCIS_BRIDGE_PCMCIA, 1, "PCI-PCMCIA"}, + {PCIC_BRIDGE, PCIS_BRIDGE_NUBUS, 1, "PCI-NuBus"}, + {PCIC_BRIDGE, PCIS_BRIDGE_CARDBUS, 1, "PCI-CardBus"}, + {PCIC_BRIDGE, PCIS_BRIDGE_RACEWAY, 1, "PCI-RACEway"}, + {PCIC_SIMPLECOMM, -1, 1, "simple comms"}, + {PCIC_SIMPLECOMM, PCIS_SIMPLECOMM_UART, 1, "UART"}, /* could detect 16550 */ + {PCIC_SIMPLECOMM, PCIS_SIMPLECOMM_PAR, 1, "parallel port"}, + {PCIC_SIMPLECOMM, PCIS_SIMPLECOMM_MULSER, 1, "multiport serial"}, + {PCIC_SIMPLECOMM, PCIS_SIMPLECOMM_MODEM, 1, "generic modem"}, + {PCIC_BASEPERIPH, -1, 0, "base peripheral"}, + {PCIC_BASEPERIPH, PCIS_BASEPERIPH_PIC, 1, "interrupt controller"}, + {PCIC_BASEPERIPH, PCIS_BASEPERIPH_DMA, 1, "DMA controller"}, + {PCIC_BASEPERIPH, PCIS_BASEPERIPH_TIMER, 1, "timer"}, + {PCIC_BASEPERIPH, PCIS_BASEPERIPH_RTC, 1, "realtime clock"}, + {PCIC_BASEPERIPH, PCIS_BASEPERIPH_PCIHOT, 1, "PCI hot-plug controller"}, + {PCIC_BASEPERIPH, PCIS_BASEPERIPH_SDHC, 1, "SD host controller"}, + {PCIC_INPUTDEV, -1, 1, "input device"}, + {PCIC_INPUTDEV, PCIS_INPUTDEV_KEYBOARD, 1, "keyboard"}, + {PCIC_INPUTDEV, PCIS_INPUTDEV_DIGITIZER,1, "digitizer"}, + {PCIC_INPUTDEV, PCIS_INPUTDEV_MOUSE, 1, "mouse"}, + {PCIC_INPUTDEV, PCIS_INPUTDEV_SCANNER, 1, "scanner"}, + {PCIC_INPUTDEV, PCIS_INPUTDEV_GAMEPORT, 1, "gameport"}, + {PCIC_DOCKING, -1, 1, "docking station"}, + {PCIC_PROCESSOR, -1, 1, "processor"}, + {PCIC_SERIALBUS, -1, 1, "serial bus"}, + {PCIC_SERIALBUS, PCIS_SERIALBUS_FW, 1, "FireWire"}, + {PCIC_SERIALBUS, PCIS_SERIALBUS_ACCESS, 1, "AccessBus"}, + {PCIC_SERIALBUS, PCIS_SERIALBUS_SSA, 1, "SSA"}, + {PCIC_SERIALBUS, PCIS_SERIALBUS_USB, 1, "USB"}, + {PCIC_SERIALBUS, PCIS_SERIALBUS_FC, 1, "Fibre Channel"}, + {PCIC_SERIALBUS, PCIS_SERIALBUS_SMBUS, 0, "SMBus"}, + {PCIC_WIRELESS, -1, 1, "wireless controller"}, + {PCIC_WIRELESS, PCIS_WIRELESS_IRDA, 1, "iRDA"}, + {PCIC_WIRELESS, PCIS_WIRELESS_IR, 1, "IR"}, + {PCIC_WIRELESS, PCIS_WIRELESS_RF, 1, "RF"}, + {PCIC_INTELLIIO, -1, 1, "intelligent I/O controller"}, + {PCIC_INTELLIIO, PCIS_INTELLIIO_I2O, 1, "I2O"}, + {PCIC_SATCOM, -1, 1, "satellite communication"}, + {PCIC_SATCOM, PCIS_SATCOM_TV, 1, "sat TV"}, + {PCIC_SATCOM, PCIS_SATCOM_AUDIO, 1, "sat audio"}, + {PCIC_SATCOM, PCIS_SATCOM_VOICE, 1, "sat voice"}, + {PCIC_SATCOM, PCIS_SATCOM_DATA, 1, "sat data"}, + {PCIC_CRYPTO, -1, 1, "encrypt/decrypt"}, + {PCIC_CRYPTO, PCIS_CRYPTO_NETCOMP, 1, "network/computer crypto"}, + {PCIC_CRYPTO, PCIS_CRYPTO_ENTERTAIN, 1, "entertainment crypto"}, + {PCIC_DASP, -1, 0, "dasp"}, + {PCIC_DASP, PCIS_DASP_DPIO, 1, "DPIO module"}, + {0, 0, 0, NULL} }; void pci_probe_nomatch(device_t dev, device_t child) { - int i; + int i, report; const char *cp, *scp; char *device; /* * Look for a listing for this device in a loaded device database. */ + report = 1; if ((device = pci_describe_device(child)) != NULL) { device_printf(dev, "<%s>", device); free(device, M_DEVBUF); @@ -3839,19 +3841,25 @@ pci_probe_nomatch(device_t dev, device_t if (pci_nomatch_tab[i].class == pci_get_class(child)) { if (pci_nomatch_tab[i].subclass == -1) { cp = pci_nomatch_tab[i].desc; + report = pci_nomatch_tab[i].report; } else if (pci_nomatch_tab[i].subclass == pci_get_subclass(child)) { scp = pci_nomatch_tab[i].desc; + report = pci_nomatch_tab[i].report; } } } - device_printf(dev, "<%s%s%s>", - cp ? cp : "", - ((cp != NULL) && (scp != NULL)) ? ", " : "", - scp ? scp : ""); + if (report || bootverbose) { + device_printf(dev, "<%s%s%s>", + cp ? cp : "", + ((cp != NULL) && (scp != NULL)) ? ", " : "", + scp ? scp : ""); + } + } + if (report || bootverbose) { + printf(" at device %d.%d (no driver attached)\n", + pci_get_slot(child), pci_get_function(child)); } - printf(" at device %d.%d (no driver attached)\n", - pci_get_slot(child), pci_get_function(child)); pci_cfg_save(child, device_get_ivars(child), 1); } From owner-svn-src-stable@FreeBSD.ORG Wed May 14 09:13:34 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1089C768; Wed, 14 May 2014 09:13:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E52B52B64; Wed, 14 May 2014 09:13:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4E9DXEw025604; Wed, 14 May 2014 09:13:33 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4E9DXKh025603; Wed, 14 May 2014 09:13:33 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201405140913.s4E9DXKh025603@svn.freebsd.org> From: Steven Hartland Date: Wed, 14 May 2014 09:13:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266009 - stable/9/sys/dev/pci X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 09:13:34 -0000 Author: smh Date: Wed May 14 09:13:33 2014 New Revision: 266009 URL: http://svnweb.freebsd.org/changeset/base/266009 Log: MFC r265149 Make uninteresting PCI devices with no attached drivers only print out on a verbose boot. Sponsored by: Multiplay Modified: stable/9/sys/dev/pci/pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/pci/pci.c ============================================================================== --- stable/9/sys/dev/pci/pci.c Wed May 14 09:12:01 2014 (r266008) +++ stable/9/sys/dev/pci/pci.c Wed May 14 09:13:33 2014 (r266009) @@ -3659,105 +3659,107 @@ static const struct { int class; int subclass; + int report; /* 0 = bootverbose, 1 = always */ const char *desc; } pci_nomatch_tab[] = { - {PCIC_OLD, -1, "old"}, - {PCIC_OLD, PCIS_OLD_NONVGA, "non-VGA display device"}, - {PCIC_OLD, PCIS_OLD_VGA, "VGA-compatible display device"}, - {PCIC_STORAGE, -1, "mass storage"}, - {PCIC_STORAGE, PCIS_STORAGE_SCSI, "SCSI"}, - {PCIC_STORAGE, PCIS_STORAGE_IDE, "ATA"}, - {PCIC_STORAGE, PCIS_STORAGE_FLOPPY, "floppy disk"}, - {PCIC_STORAGE, PCIS_STORAGE_IPI, "IPI"}, - {PCIC_STORAGE, PCIS_STORAGE_RAID, "RAID"}, - {PCIC_STORAGE, PCIS_STORAGE_ATA_ADMA, "ATA (ADMA)"}, - {PCIC_STORAGE, PCIS_STORAGE_SATA, "SATA"}, - {PCIC_STORAGE, PCIS_STORAGE_SAS, "SAS"}, - {PCIC_STORAGE, PCIS_STORAGE_NVM, "NVM"}, - {PCIC_NETWORK, -1, "network"}, - {PCIC_NETWORK, PCIS_NETWORK_ETHERNET, "ethernet"}, - {PCIC_NETWORK, PCIS_NETWORK_TOKENRING, "token ring"}, - {PCIC_NETWORK, PCIS_NETWORK_FDDI, "fddi"}, - {PCIC_NETWORK, PCIS_NETWORK_ATM, "ATM"}, - {PCIC_NETWORK, PCIS_NETWORK_ISDN, "ISDN"}, - {PCIC_DISPLAY, -1, "display"}, - {PCIC_DISPLAY, PCIS_DISPLAY_VGA, "VGA"}, - {PCIC_DISPLAY, PCIS_DISPLAY_XGA, "XGA"}, - {PCIC_DISPLAY, PCIS_DISPLAY_3D, "3D"}, - {PCIC_MULTIMEDIA, -1, "multimedia"}, - {PCIC_MULTIMEDIA, PCIS_MULTIMEDIA_VIDEO, "video"}, - {PCIC_MULTIMEDIA, PCIS_MULTIMEDIA_AUDIO, "audio"}, - {PCIC_MULTIMEDIA, PCIS_MULTIMEDIA_TELE, "telephony"}, - {PCIC_MULTIMEDIA, PCIS_MULTIMEDIA_HDA, "HDA"}, - {PCIC_MEMORY, -1, "memory"}, - {PCIC_MEMORY, PCIS_MEMORY_RAM, "RAM"}, - {PCIC_MEMORY, PCIS_MEMORY_FLASH, "flash"}, - {PCIC_BRIDGE, -1, "bridge"}, - {PCIC_BRIDGE, PCIS_BRIDGE_HOST, "HOST-PCI"}, - {PCIC_BRIDGE, PCIS_BRIDGE_ISA, "PCI-ISA"}, - {PCIC_BRIDGE, PCIS_BRIDGE_EISA, "PCI-EISA"}, - {PCIC_BRIDGE, PCIS_BRIDGE_MCA, "PCI-MCA"}, - {PCIC_BRIDGE, PCIS_BRIDGE_PCI, "PCI-PCI"}, - {PCIC_BRIDGE, PCIS_BRIDGE_PCMCIA, "PCI-PCMCIA"}, - {PCIC_BRIDGE, PCIS_BRIDGE_NUBUS, "PCI-NuBus"}, - {PCIC_BRIDGE, PCIS_BRIDGE_CARDBUS, "PCI-CardBus"}, - {PCIC_BRIDGE, PCIS_BRIDGE_RACEWAY, "PCI-RACEway"}, - {PCIC_SIMPLECOMM, -1, "simple comms"}, - {PCIC_SIMPLECOMM, PCIS_SIMPLECOMM_UART, "UART"}, /* could detect 16550 */ - {PCIC_SIMPLECOMM, PCIS_SIMPLECOMM_PAR, "parallel port"}, - {PCIC_SIMPLECOMM, PCIS_SIMPLECOMM_MULSER, "multiport serial"}, - {PCIC_SIMPLECOMM, PCIS_SIMPLECOMM_MODEM, "generic modem"}, - {PCIC_BASEPERIPH, -1, "base peripheral"}, - {PCIC_BASEPERIPH, PCIS_BASEPERIPH_PIC, "interrupt controller"}, - {PCIC_BASEPERIPH, PCIS_BASEPERIPH_DMA, "DMA controller"}, - {PCIC_BASEPERIPH, PCIS_BASEPERIPH_TIMER, "timer"}, - {PCIC_BASEPERIPH, PCIS_BASEPERIPH_RTC, "realtime clock"}, - {PCIC_BASEPERIPH, PCIS_BASEPERIPH_PCIHOT, "PCI hot-plug controller"}, - {PCIC_BASEPERIPH, PCIS_BASEPERIPH_SDHC, "SD host controller"}, - {PCIC_INPUTDEV, -1, "input device"}, - {PCIC_INPUTDEV, PCIS_INPUTDEV_KEYBOARD, "keyboard"}, - {PCIC_INPUTDEV, PCIS_INPUTDEV_DIGITIZER,"digitizer"}, - {PCIC_INPUTDEV, PCIS_INPUTDEV_MOUSE, "mouse"}, - {PCIC_INPUTDEV, PCIS_INPUTDEV_SCANNER, "scanner"}, - {PCIC_INPUTDEV, PCIS_INPUTDEV_GAMEPORT, "gameport"}, - {PCIC_DOCKING, -1, "docking station"}, - {PCIC_PROCESSOR, -1, "processor"}, - {PCIC_SERIALBUS, -1, "serial bus"}, - {PCIC_SERIALBUS, PCIS_SERIALBUS_FW, "FireWire"}, - {PCIC_SERIALBUS, PCIS_SERIALBUS_ACCESS, "AccessBus"}, - {PCIC_SERIALBUS, PCIS_SERIALBUS_SSA, "SSA"}, - {PCIC_SERIALBUS, PCIS_SERIALBUS_USB, "USB"}, - {PCIC_SERIALBUS, PCIS_SERIALBUS_FC, "Fibre Channel"}, - {PCIC_SERIALBUS, PCIS_SERIALBUS_SMBUS, "SMBus"}, - {PCIC_WIRELESS, -1, "wireless controller"}, - {PCIC_WIRELESS, PCIS_WIRELESS_IRDA, "iRDA"}, - {PCIC_WIRELESS, PCIS_WIRELESS_IR, "IR"}, - {PCIC_WIRELESS, PCIS_WIRELESS_RF, "RF"}, - {PCIC_INTELLIIO, -1, "intelligent I/O controller"}, - {PCIC_INTELLIIO, PCIS_INTELLIIO_I2O, "I2O"}, - {PCIC_SATCOM, -1, "satellite communication"}, - {PCIC_SATCOM, PCIS_SATCOM_TV, "sat TV"}, - {PCIC_SATCOM, PCIS_SATCOM_AUDIO, "sat audio"}, - {PCIC_SATCOM, PCIS_SATCOM_VOICE, "sat voice"}, - {PCIC_SATCOM, PCIS_SATCOM_DATA, "sat data"}, - {PCIC_CRYPTO, -1, "encrypt/decrypt"}, - {PCIC_CRYPTO, PCIS_CRYPTO_NETCOMP, "network/computer crypto"}, - {PCIC_CRYPTO, PCIS_CRYPTO_ENTERTAIN, "entertainment crypto"}, - {PCIC_DASP, -1, "dasp"}, - {PCIC_DASP, PCIS_DASP_DPIO, "DPIO module"}, - {0, 0, NULL} + {PCIC_OLD, -1, 1, "old"}, + {PCIC_OLD, PCIS_OLD_NONVGA, 1, "non-VGA display device"}, + {PCIC_OLD, PCIS_OLD_VGA, 1, "VGA-compatible display device"}, + {PCIC_STORAGE, -1, 1, "mass storage"}, + {PCIC_STORAGE, PCIS_STORAGE_SCSI, 1, "SCSI"}, + {PCIC_STORAGE, PCIS_STORAGE_IDE, 1, "ATA"}, + {PCIC_STORAGE, PCIS_STORAGE_FLOPPY, 1, "floppy disk"}, + {PCIC_STORAGE, PCIS_STORAGE_IPI, 1, "IPI"}, + {PCIC_STORAGE, PCIS_STORAGE_RAID, 1, "RAID"}, + {PCIC_STORAGE, PCIS_STORAGE_ATA_ADMA, 1, "ATA (ADMA)"}, + {PCIC_STORAGE, PCIS_STORAGE_SATA, 1, "SATA"}, + {PCIC_STORAGE, PCIS_STORAGE_SAS, 1, "SAS"}, + {PCIC_STORAGE, PCIS_STORAGE_NVM, 1, "NVM"}, + {PCIC_NETWORK, -1, 1, "network"}, + {PCIC_NETWORK, PCIS_NETWORK_ETHERNET, 1, "ethernet"}, + {PCIC_NETWORK, PCIS_NETWORK_TOKENRING, 1, "token ring"}, + {PCIC_NETWORK, PCIS_NETWORK_FDDI, 1, "fddi"}, + {PCIC_NETWORK, PCIS_NETWORK_ATM, 1, "ATM"}, + {PCIC_NETWORK, PCIS_NETWORK_ISDN, 1, "ISDN"}, + {PCIC_DISPLAY, -1, 1, "display"}, + {PCIC_DISPLAY, PCIS_DISPLAY_VGA, 1, "VGA"}, + {PCIC_DISPLAY, PCIS_DISPLAY_XGA, 1, "XGA"}, + {PCIC_DISPLAY, PCIS_DISPLAY_3D, 1, "3D"}, + {PCIC_MULTIMEDIA, -1, 1, "multimedia"}, + {PCIC_MULTIMEDIA, PCIS_MULTIMEDIA_VIDEO, 1, "video"}, + {PCIC_MULTIMEDIA, PCIS_MULTIMEDIA_AUDIO, 1, "audio"}, + {PCIC_MULTIMEDIA, PCIS_MULTIMEDIA_TELE, 1, "telephony"}, + {PCIC_MULTIMEDIA, PCIS_MULTIMEDIA_HDA, 1, "HDA"}, + {PCIC_MEMORY, -1, 1, "memory"}, + {PCIC_MEMORY, PCIS_MEMORY_RAM, 1, "RAM"}, + {PCIC_MEMORY, PCIS_MEMORY_FLASH, 1, "flash"}, + {PCIC_BRIDGE, -1, 1, "bridge"}, + {PCIC_BRIDGE, PCIS_BRIDGE_HOST, 1, "HOST-PCI"}, + {PCIC_BRIDGE, PCIS_BRIDGE_ISA, 1, "PCI-ISA"}, + {PCIC_BRIDGE, PCIS_BRIDGE_EISA, 1, "PCI-EISA"}, + {PCIC_BRIDGE, PCIS_BRIDGE_MCA, 1, "PCI-MCA"}, + {PCIC_BRIDGE, PCIS_BRIDGE_PCI, 1, "PCI-PCI"}, + {PCIC_BRIDGE, PCIS_BRIDGE_PCMCIA, 1, "PCI-PCMCIA"}, + {PCIC_BRIDGE, PCIS_BRIDGE_NUBUS, 1, "PCI-NuBus"}, + {PCIC_BRIDGE, PCIS_BRIDGE_CARDBUS, 1, "PCI-CardBus"}, + {PCIC_BRIDGE, PCIS_BRIDGE_RACEWAY, 1, "PCI-RACEway"}, + {PCIC_SIMPLECOMM, -1, 1, "simple comms"}, + {PCIC_SIMPLECOMM, PCIS_SIMPLECOMM_UART, 1, "UART"}, /* could detect 16550 */ + {PCIC_SIMPLECOMM, PCIS_SIMPLECOMM_PAR, 1, "parallel port"}, + {PCIC_SIMPLECOMM, PCIS_SIMPLECOMM_MULSER, 1, "multiport serial"}, + {PCIC_SIMPLECOMM, PCIS_SIMPLECOMM_MODEM, 1, "generic modem"}, + {PCIC_BASEPERIPH, -1, 0, "base peripheral"}, + {PCIC_BASEPERIPH, PCIS_BASEPERIPH_PIC, 1, "interrupt controller"}, + {PCIC_BASEPERIPH, PCIS_BASEPERIPH_DMA, 1, "DMA controller"}, + {PCIC_BASEPERIPH, PCIS_BASEPERIPH_TIMER, 1, "timer"}, + {PCIC_BASEPERIPH, PCIS_BASEPERIPH_RTC, 1, "realtime clock"}, + {PCIC_BASEPERIPH, PCIS_BASEPERIPH_PCIHOT, 1, "PCI hot-plug controller"}, + {PCIC_BASEPERIPH, PCIS_BASEPERIPH_SDHC, 1, "SD host controller"}, + {PCIC_INPUTDEV, -1, 1, "input device"}, + {PCIC_INPUTDEV, PCIS_INPUTDEV_KEYBOARD, 1, "keyboard"}, + {PCIC_INPUTDEV, PCIS_INPUTDEV_DIGITIZER,1, "digitizer"}, + {PCIC_INPUTDEV, PCIS_INPUTDEV_MOUSE, 1, "mouse"}, + {PCIC_INPUTDEV, PCIS_INPUTDEV_SCANNER, 1, "scanner"}, + {PCIC_INPUTDEV, PCIS_INPUTDEV_GAMEPORT, 1, "gameport"}, + {PCIC_DOCKING, -1, 1, "docking station"}, + {PCIC_PROCESSOR, -1, 1, "processor"}, + {PCIC_SERIALBUS, -1, 1, "serial bus"}, + {PCIC_SERIALBUS, PCIS_SERIALBUS_FW, 1, "FireWire"}, + {PCIC_SERIALBUS, PCIS_SERIALBUS_ACCESS, 1, "AccessBus"}, + {PCIC_SERIALBUS, PCIS_SERIALBUS_SSA, 1, "SSA"}, + {PCIC_SERIALBUS, PCIS_SERIALBUS_USB, 1, "USB"}, + {PCIC_SERIALBUS, PCIS_SERIALBUS_FC, 1, "Fibre Channel"}, + {PCIC_SERIALBUS, PCIS_SERIALBUS_SMBUS, 0, "SMBus"}, + {PCIC_WIRELESS, -1, 1, "wireless controller"}, + {PCIC_WIRELESS, PCIS_WIRELESS_IRDA, 1, "iRDA"}, + {PCIC_WIRELESS, PCIS_WIRELESS_IR, 1, "IR"}, + {PCIC_WIRELESS, PCIS_WIRELESS_RF, 1, "RF"}, + {PCIC_INTELLIIO, -1, 1, "intelligent I/O controller"}, + {PCIC_INTELLIIO, PCIS_INTELLIIO_I2O, 1, "I2O"}, + {PCIC_SATCOM, -1, 1, "satellite communication"}, + {PCIC_SATCOM, PCIS_SATCOM_TV, 1, "sat TV"}, + {PCIC_SATCOM, PCIS_SATCOM_AUDIO, 1, "sat audio"}, + {PCIC_SATCOM, PCIS_SATCOM_VOICE, 1, "sat voice"}, + {PCIC_SATCOM, PCIS_SATCOM_DATA, 1, "sat data"}, + {PCIC_CRYPTO, -1, 1, "encrypt/decrypt"}, + {PCIC_CRYPTO, PCIS_CRYPTO_NETCOMP, 1, "network/computer crypto"}, + {PCIC_CRYPTO, PCIS_CRYPTO_ENTERTAIN, 1, "entertainment crypto"}, + {PCIC_DASP, -1, 0, "dasp"}, + {PCIC_DASP, PCIS_DASP_DPIO, 1, "DPIO module"}, + {0, 0, 0, NULL} }; void pci_probe_nomatch(device_t dev, device_t child) { - int i; + int i, report; const char *cp, *scp; char *device; /* * Look for a listing for this device in a loaded device database. */ + report = 1; if ((device = pci_describe_device(child)) != NULL) { device_printf(dev, "<%s>", device); free(device, M_DEVBUF); @@ -3772,19 +3774,25 @@ pci_probe_nomatch(device_t dev, device_t if (pci_nomatch_tab[i].class == pci_get_class(child)) { if (pci_nomatch_tab[i].subclass == -1) { cp = pci_nomatch_tab[i].desc; + report = pci_nomatch_tab[i].report; } else if (pci_nomatch_tab[i].subclass == pci_get_subclass(child)) { scp = pci_nomatch_tab[i].desc; + report = pci_nomatch_tab[i].report; } } } - device_printf(dev, "<%s%s%s>", - cp ? cp : "", - ((cp != NULL) && (scp != NULL)) ? ", " : "", - scp ? scp : ""); + if (report || bootverbose) { + device_printf(dev, "<%s%s%s>", + cp ? cp : "", + ((cp != NULL) && (scp != NULL)) ? ", " : "", + scp ? scp : ""); + } + } + if (report || bootverbose) { + printf(" at device %d.%d (no driver attached)\n", + pci_get_slot(child), pci_get_function(child)); } - printf(" at device %d.%d (no driver attached)\n", - pci_get_slot(child), pci_get_function(child)); pci_cfg_save(child, device_get_ivars(child), 1); } From owner-svn-src-stable@FreeBSD.ORG Wed May 14 13:45:55 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C91D052C; Wed, 14 May 2014 13:45:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B197720F7; Wed, 14 May 2014 13:45:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EDjt2S046176; Wed, 14 May 2014 13:45:55 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EDjpN7046151; Wed, 14 May 2014 13:45:51 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201405141345.s4EDjpN7046151@svn.freebsd.org> From: Marius Strobl Date: Wed, 14 May 2014 13:45:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266013 - in stable/9: sbin/bsdlabel sbin/ccdconfig sbin/fdisk sbin/gbde sbin/geom/class/eli sbin/geom/class/shsec sbin/geom/class/virstor sbin/gvinum sbin/mount_msdosfs sbin/newfs sbin... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 13:45:55 -0000 Author: marius Date: Wed May 14 13:45:51 2014 New Revision: 266013 URL: http://svnweb.freebsd.org/changeset/base/266013 Log: MFC: r255977 (partial) Sweep man pages replacing ad -> ada. Modified: stable/9/sbin/bsdlabel/bsdlabel.8 stable/9/sbin/ccdconfig/ccdconfig.8 stable/9/sbin/fdisk/fdisk.8 stable/9/sbin/gbde/gbde.8 stable/9/sbin/geom/class/eli/geli.8 stable/9/sbin/geom/class/shsec/gshsec.8 stable/9/sbin/geom/class/virstor/gvirstor.8 stable/9/sbin/gvinum/gvinum.8 stable/9/sbin/mount_msdosfs/mount_msdosfs.8 stable/9/sbin/newfs/newfs.8 stable/9/sbin/newfs_msdos/newfs_msdos.8 stable/9/sbin/recoverdisk/recoverdisk.1 stable/9/share/man/man4/geom_linux_lvm.4 stable/9/share/man/man5/ext2fs.5 stable/9/share/man/man5/msdosfs.5 stable/9/share/man/man5/reiserfs.5 stable/9/share/man/man8/picobsd.8 stable/9/sys/boot/common/loader.8 stable/9/usr.sbin/boot0cfg/boot0cfg.8 Directory Properties: stable/9/sbin/bsdlabel/ (props changed) stable/9/sbin/ccdconfig/ (props changed) stable/9/sbin/fdisk/ (props changed) stable/9/sbin/gbde/ (props changed) stable/9/sbin/geom/ (props changed) stable/9/sbin/geom/class/virstor/ (props changed) stable/9/sbin/gvinum/ (props changed) stable/9/sbin/mount_msdosfs/ (props changed) stable/9/sbin/newfs/ (props changed) stable/9/sbin/newfs_msdos/ (props changed) stable/9/sbin/recoverdisk/ (props changed) stable/9/share/man/man4/ (props changed) stable/9/share/man/man5/ (props changed) stable/9/share/man/man8/ (props changed) stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) stable/9/usr.sbin/boot0cfg/ (props changed) Modified: stable/9/sbin/bsdlabel/bsdlabel.8 ============================================================================== --- stable/9/sbin/bsdlabel/bsdlabel.8 Wed May 14 11:32:15 2014 (r266012) +++ stable/9/sbin/bsdlabel/bsdlabel.8 Wed May 14 13:45:51 2014 (r266013) @@ -31,7 +31,7 @@ .\" @(#)disklabel.8 8.2 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd March 5, 2011 +.Dd October 1, 2013 .Dt BSDLABEL 8 .Os .Sh NAME @@ -457,9 +457,9 @@ such as and .Cm * , which could be used as a source file for -.Dq Li "bsdlabel -R ad0s1 new_label_file" : +.Dq Li "bsdlabel -R ada0s1 new_label_file" : .Bd -literal -offset 4n -# /dev/ad0s1: +# /dev/ada0s1: 8 partitions: # size offset fstype [fsize bsize bps/cpg] Modified: stable/9/sbin/ccdconfig/ccdconfig.8 ============================================================================== --- stable/9/sbin/ccdconfig/ccdconfig.8 Wed May 14 11:32:15 2014 (r266012) +++ stable/9/sbin/ccdconfig/ccdconfig.8 Wed May 14 13:45:51 2014 (r266013) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 17, 1995 +.Dd October 1, 2013 .Dt CCDCONFIG 8 .Os .Sh NAME @@ -180,7 +180,7 @@ and read it from mdadm --create --chunk=32 --level=0 --raid-devices=2 /dev/md0 \\ /dev/hda1 /dev/hdb1 # Make the RAID-0 just created available on FreeBSD: -ccdconfig -c /dev/ccd0 32 linux /dev/ad0s1 /dev/ad0s2 +ccdconfig -c /dev/ccd0 32 linux /dev/ada0s1 /dev/ada0s2 .Ed .Pp When you create a new ccd disk you generally want to Modified: stable/9/sbin/fdisk/fdisk.8 ============================================================================== --- stable/9/sbin/fdisk/fdisk.8 Wed May 14 11:32:15 2014 (r266012) +++ stable/9/sbin/fdisk/fdisk.8 Wed May 14 13:45:51 2014 (r266013) @@ -1,6 +1,6 @@ .\" $FreeBSD$ .\" -.Dd May 24, 2009 +.Dd October 1, 2013 .Dt FDISK 8 .Os .Sh NAME @@ -159,7 +159,7 @@ mounted root device. When called with no arguments, it prints the sector 0 slice table. An example follows: .Bd -literal - ******* Working on device /dev/ad0 ******* + ******* Working on device /dev/ada0 ******* parameters extracted from in-core disklabel are: cylinders=769 heads=15 sectors/track=33 (495 blks/cyl) Modified: stable/9/sbin/gbde/gbde.8 ============================================================================== --- stable/9/sbin/gbde/gbde.8 Wed May 14 11:32:15 2014 (r266012) +++ stable/9/sbin/gbde/gbde.8 Wed May 14 13:45:51 2014 (r266013) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 8, 2006 +.Dd October 1, 2013 .Dt GBDE 8 .Os .Sh NAME @@ -207,23 +207,23 @@ used). .Sh EXAMPLES To initialize a device, using default parameters: .Pp -.Dl "gbde init /dev/ad0s1f -L /etc/ad0s1f.lock" +.Dl "gbde init /dev/ada0s1f -L /etc/ada0s1f.lock" .Pp To attach an encrypted device: .Pp -.Dl "gbde attach ad0s1f -l /etc/ad0s1f.lock" +.Dl "gbde attach ada0s1f -l /etc/ada0s1f.lock" .Pp The encrypted device has the suffix .Pa .bde so a typical command to create and mount a file system would be: .Pp -.Dl "newfs /dev/ad0s1f.bde" -.Dl "mount /dev/ad0s1f.bde /secret" +.Dl "newfs /dev/ada0s1f.bde" +.Dl "mount /dev/ada0s1f.bde /secret" .Pp To detach an encrypted device: .Pp -.Dl "gbde detach ad0s1f" +.Dl "gbde detach ada0s1f" .Pp Please notice that detaching an encrypted device corresponds to physically removing it, do not forget to unmount the file system first. @@ -231,11 +231,11 @@ physically removing it, do not forget to To initialize the second key using a detached lockfile and a trivial pass-phrase: .Pp -.Dl "gbde setkey ad0s1f -n 2 -P foo -L key2.lockfile" +.Dl "gbde setkey ada0s1f -n 2 -P foo -L key2.lockfile" .Pp To destroy all copies of the masterkey: .Pp -.Dl "gbde destroy ad0s1f -n -1" +.Dl "gbde destroy ada0s1f -n -1" .Sh SEE ALSO .Xr gbde 4 , .Xr geom 4 Modified: stable/9/sbin/geom/class/eli/geli.8 ============================================================================== --- stable/9/sbin/geom/class/eli/geli.8 Wed May 14 11:32:15 2014 (r266012) +++ stable/9/sbin/geom/class/eli/geli.8 Wed May 14 13:45:51 2014 (r266013) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 9, 2011 +.Dd October 1, 2013 .Dt GELI 8 .Os .Sh NAME @@ -733,10 +733,10 @@ Create an encrypted provider for use by forget their passphrases, so back Master Key up with your own random key: .Bd -literal -offset indent # dd if=/dev/random of=/mnt/pendrive/keys/`hostname` bs=64 count=1 -# geli init -P -K /mnt/pendrive/keys/`hostname` /dev/ad0s1e -# geli backup /dev/ad0s1e /mnt/pendrive/backups/`hostname` +# geli init -P -K /mnt/pendrive/keys/`hostname` /dev/ada0s1e +# geli backup /dev/ada0s1e /mnt/pendrive/backups/`hostname` (use key number 0, so the encrypted Master Key by you will be overwritten) -# geli setkey -n 0 -k /mnt/pendrive/keys/`hostname` /dev/ad0s1e +# geli setkey -n 0 -k /mnt/pendrive/keys/`hostname` /dev/ada0s1e (allow the user to enter his passphrase) Enter new passphrase: Reenter new passphrase: @@ -744,9 +744,9 @@ Reenter new passphrase: .Pp Encrypted swap partition setup: .Bd -literal -offset indent -# dd if=/dev/random of=/dev/ad0s1b bs=1m -# geli onetime -d -e 3des ad0s1b -# swapon /dev/ad0s1b.eli +# dd if=/dev/random of=/dev/ada0s1b bs=1m +# geli onetime -d -e 3des ada0s1b +# swapon /dev/ada0s1b.eli .Ed .Pp The example below shows how to configure two providers which will be attached Modified: stable/9/sbin/geom/class/shsec/gshsec.8 ============================================================================== --- stable/9/sbin/geom/class/shsec/gshsec.8 Wed May 14 11:32:15 2014 (r266012) +++ stable/9/sbin/geom/class/shsec/gshsec.8 Wed May 14 13:45:51 2014 (r266013) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 8, 2005 +.Dd October 1, 2013 .Dt GSHSEC 8 .Os .Sh NAME @@ -108,7 +108,7 @@ Exit status is 0 on success, and 1 if th The following example shows how to create a shared secret device. The secret will be split between a slice on a local disk and a USB Pen drive. .Bd -literal -offset indent -gshsec label -v secret /dev/ad0s1 /dev/da0 +gshsec label -v secret /dev/ada0s1 /dev/da0 newfs /dev/shsec/secret .Ed .Pp Modified: stable/9/sbin/geom/class/virstor/gvirstor.8 ============================================================================== --- stable/9/sbin/geom/class/virstor/gvirstor.8 Wed May 14 11:32:15 2014 (r266012) +++ stable/9/sbin/geom/class/virstor/gvirstor.8 Wed May 14 13:45:51 2014 (r266013) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 24, 2011 +.Dd October 1, 2013 .Dt GVIRSTOR 8 .Os .Sh NAME @@ -154,7 +154,7 @@ size .Pq 4 MiB , with two physical devices for backing storage. .Bd -literal -offset indent -.No gvirstor label -v Ar mydata Ar /dev/ad4 Ar /dev/ad6 +.No gvirstor label -v Ar mydata Ar /dev/ada4 Ar /dev/ada6 .No newfs Ar /dev/virstor/mydata .Ed .Pp @@ -163,11 +163,11 @@ From now on, the virtual device will be device entry. To add a new physical device / component to an active virstor device: .Bd -literal -offset indent -.No gvirstor add Ar mydata Ar ad8 +.No gvirstor add Ar mydata Ar ada8 .Ed .Pp This will add physical storage of -.Ar ad8 +.Ar ada8 to .Pa /dev/virstor/mydata device. Modified: stable/9/sbin/gvinum/gvinum.8 ============================================================================== --- stable/9/sbin/gvinum/gvinum.8 Wed May 14 11:32:15 2014 (r266012) +++ stable/9/sbin/gvinum/gvinum.8 Wed May 14 13:45:51 2014 (r266013) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 10, 2009 +.Dd October 1, 2013 .Dt GVINUM 8 .Os .Sh NAME @@ -279,27 +279,27 @@ directory with device nodes for objects .El .Sh EXAMPLES -To create a mirror on disks /dev/ad1 and /dev/ad2, create a filesystem, mount, -unmount and then stop +To create a mirror on disks /dev/ada1 and /dev/ada2, create a filesystem, +mount, unmount and then stop .Ic gvinum : .Pp -.Dl "gvinum mirror /dev/ad1 /dev/ad2" +.Dl "gvinum mirror /dev/ada1 /dev/ada2" .Dl "newfs /dev/gvinum/gvinumvolume0" .Dl "mount /dev/gvinum/gvinumvolume0 /mnt" .Dl "..." .Dl "unmount /mnt" .Dl "gvinum stop" .Pp -To create a striped mirror on disks /dev/ad1 /dev/ad2 /dev/ad3 and /dev/ad4 -named "data" and create a filesystem: +To create a striped mirror on disks /dev/ada1 /dev/ada2 /dev/ada3 and +/dev/ada4 named "data" and create a filesystem: .Pp -.Dl "gvinum mirror -s -n data /dev/ad1 /dev/ad2 /dev/ad3 /dev/ad4" +.Dl "gvinum mirror -s -n data /dev/ada1 /dev/ada2 /dev/ada3 /dev/ada4" .Dl "newfs /dev/gvinum/data" .Pp -To create a raid5 array on disks /dev/ad1 /dev/ad2 and /dev/ad3, with stripesize -493k you can use the raid5 command: +To create a raid5 array on disks /dev/ada1 /dev/ada2 and /dev/ada3, +with stripesize 493k you can use the raid5 command: .Pp -.Dl "gvinum raid5 -s 493k /dev/ad1 /dev/ad2 /dev/ad3" +.Dl "gvinum raid5 -s 493k /dev/ada1 /dev/ada2 /dev/ada3" .Pp Then the volume will be created automatically. Afterwards, you have to initialize the volume: @@ -313,9 +313,9 @@ The list command will give you informati Imagine that one of the drives fails, and the output of 'printconfig' looks something like this: .Pp -.Dl "drive gvinumdrive1 device /dev/ad2" +.Dl "drive gvinumdrive1 device /dev/ada2" .Dl "drive gvinumdrive2 device /dev/???" -.Dl "drive gvinumdrive0 device /dev/ad1" +.Dl "drive gvinumdrive0 device /dev/ada1" .Dl "volume myraid5vol" .Dl "plex name myraid5vol.p0 org raid5 986s vol myraid5vol" .Dl "sd name myraid5vol.p0.s2 drive gvinumdrive2 len 32538s driveoffset 265s" @@ -327,7 +327,7 @@ something like this: .Pp Create a new drive with this configuration: .Pp -.Dl "drive gdrive4 device /dev/ad4" +.Dl "drive gdrive4 device /dev/ada4" .Pp Then move the stale subdisk to the new drive: .Pp @@ -344,7 +344,7 @@ might be delayed. Given the configuration as in the previous example, growing a RAID-5 or STRIPED array is accomplished by using the grow command: .Pp -.Dl "gvinum grow myraid5vol.p0 /dev/ad4" +.Dl "gvinum grow myraid5vol.p0 /dev/ada4" .Pp If everything went ok, the plex state should now be set to growable. You can then start the growing with the Modified: stable/9/sbin/mount_msdosfs/mount_msdosfs.8 ============================================================================== --- stable/9/sbin/mount_msdosfs/mount_msdosfs.8 Wed May 14 11:32:15 2014 (r266012) +++ stable/9/sbin/mount_msdosfs/mount_msdosfs.8 Wed May 14 13:45:51 2014 (r266013) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 23, 2008 +.Dd October 1, 2013 .Dt MOUNT_MSDOSFS 8 .Os .Sh NAME @@ -182,14 +182,14 @@ Specify text file name with conversion t .El .Sh EXAMPLES To mount a Russian MS-DOS file system located in -.Pa /dev/ad1s1 : +.Pa /dev/ada1s1 : .Pp -.Dl "mount_msdosfs -L ru_RU.KOI8-R -D CP866 /dev/ad1s1 /mnt" +.Dl "mount_msdosfs -L ru_RU.KOI8-R -D CP866 /dev/ada1s1 /mnt" .Pp To mount a Japanese MS-DOS file system located in -.Pa /dev/ad1s1 : +.Pa /dev/ada1s1 : .Pp -.Dl "mount_msdosfs -L ja_JP.eucJP -D CP932 /dev/ad1s1 /mnt" +.Dl "mount_msdosfs -L ja_JP.eucJP -D CP932 /dev/ada1s1 /mnt" .Sh SEE ALSO .Xr mount 2 , .Xr unmount 2 , Modified: stable/9/sbin/newfs/newfs.8 ============================================================================== --- stable/9/sbin/newfs/newfs.8 Wed May 14 11:32:15 2014 (r266012) +++ stable/9/sbin/newfs/newfs.8 Wed May 14 13:45:51 2014 (r266013) @@ -28,7 +28,7 @@ .\" @(#)newfs.8 8.6 (Berkeley) 5/3/95 .\" $FreeBSD$ .\" -.Dd June 22, 2011 +.Dd October 1, 2013 .Dt NEWFS 8 .Os .Sh NAME @@ -285,10 +285,10 @@ to find the alternate superblocks if the The size of a sector in bytes (almost never anything but 512). .El .Sh EXAMPLES -.Dl newfs /dev/ad3s1a +.Dl newfs /dev/ada3s1a .Pp Creates a new ufs file system on -.Pa ad3s1a . +.Pa ada3s1a . The .Nm utility will use a block size of 32768 bytes, a fragment size of 4096 bytes Modified: stable/9/sbin/newfs_msdos/newfs_msdos.8 ============================================================================== --- stable/9/sbin/newfs_msdos/newfs_msdos.8 Wed May 14 11:32:15 2014 (r266012) +++ stable/9/sbin/newfs_msdos/newfs_msdos.8 Wed May 14 13:45:51 2014 (r266013) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 25, 2010 +.Dd October 1, 2013 .Dt NEWFS_MSDOS 8 .Os .Sh NAME @@ -209,9 +209,9 @@ The maximum file size is 4GB, even if th Exit status is 0 on success and 1 on error. .Sh EXAMPLES Create a file system, using default parameters, on -.Pa /dev/ad0s1 : +.Pa /dev/ada0s1 : .Bd -literal -offset indent -newfs_msdos /dev/ad0s1 +newfs_msdos /dev/ada0s1 .Ed .Pp Create a standard 1.44M file system, with volume label Modified: stable/9/sbin/recoverdisk/recoverdisk.1 ============================================================================== --- stable/9/sbin/recoverdisk/recoverdisk.1 Wed May 14 11:32:15 2014 (r266012) +++ stable/9/sbin/recoverdisk/recoverdisk.1 Wed May 14 13:45:51 2014 (r266013) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 1, 2011 +.Dd October 1, 2013 .Dt RECOVERDISK 1 .Os .Sh NAME @@ -104,11 +104,11 @@ Percent complete. .El .Sh EXAMPLES .Bd -literal -# recover data from failing hard drive ad3 -recoverdisk /dev/ad3 /data/disk.img +# recover data from failing hard drive ada3 +recoverdisk /dev/ada3 /data/disk.img # clone a hard disk -recoverdisk /dev/ad3 /dev/ad4 +recoverdisk /dev/ada3 /dev/ada4 # read an ISO image from a CD-ROM recoverdisk /dev/cd0 /data/cd.iso @@ -120,7 +120,7 @@ recoverdisk -r worklist -w worklist /dev recoverdisk /cdrom/file.avi file.avi # If the disk hangs the system on read-errors try: -recoverdisk -b 0 /dev/ad3 /somewhere +recoverdisk -b 0 /dev/ada3 /somewhere .Ed .Sh SEE ALSO Modified: stable/9/share/man/man4/geom_linux_lvm.4 ============================================================================== --- stable/9/share/man/man4/geom_linux_lvm.4 Wed May 14 11:32:15 2014 (r266012) +++ stable/9/share/man/man4/geom_linux_lvm.4 Wed May 14 13:45:51 2014 (r266013) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 20, 2008 +.Dd October 1, 2013 .Dt GEOM_LINUX_LVM 4 .Os .Sh NAME @@ -72,7 +72,7 @@ Providers: Sectorsize: 512 Mode: r0w0e0 Consumers: -1. Name: ad0s1 +1. Name: ada0s1 Mediasize: 80023716864 (75G) Sectorsize: 512 Mode: r0w0e0 Modified: stable/9/share/man/man5/ext2fs.5 ============================================================================== --- stable/9/share/man/man5/ext2fs.5 Wed May 14 11:32:15 2014 (r266012) +++ stable/9/share/man/man5/ext2fs.5 Wed May 14 13:45:51 2014 (r266013) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 16, 2006 +.Dd October 1, 2013 .Dt EXT2FS 5 .Os .Sh NAME @@ -53,9 +53,9 @@ file systems. To mount a .Nm volume located on -.Pa /dev/ad1s1 : +.Pa /dev/ada1s1 : .Pp -.Dl "mount -t ext2fs /dev/ad1s1 /mnt" +.Dl "mount -t ext2fs /dev/ada1s1 /mnt" .Sh SEE ALSO .Xr nmount 2 , .Xr unmount 2 , Modified: stable/9/share/man/man5/msdosfs.5 ============================================================================== --- stable/9/share/man/man5/msdosfs.5 Wed May 14 11:32:15 2014 (r266012) +++ stable/9/share/man/man5/msdosfs.5 Wed May 14 13:45:51 2014 (r266013) @@ -2,7 +2,7 @@ .\" Written by Tom Rhodes .\" This file is in the public domain. .\" -.Dd August 22, 2007 +.Dd October 1, 2013 .Dt MSDOSFS 5 .Os .Sh NAME @@ -21,7 +21,7 @@ based file systems. .Pp The most common usage follows: .Pp -.Dl "mount -t msdosfs /dev/ad0sN /mnt" +.Dl "mount -t msdosfs /dev/ada0sN /mnt" .Pp where .Ar N @@ -40,7 +40,7 @@ It is possible to define an entry in .Pa /etc/fstab that looks similar to: .Bd -literal -/dev/ad0sN /dos msdosfs rw 0 0 +/dev/ada0sN /dos msdosfs rw 0 0 .Ed .Pp This will mount an Modified: stable/9/share/man/man5/reiserfs.5 ============================================================================== --- stable/9/share/man/man5/reiserfs.5 Wed May 14 11:32:15 2014 (r266012) +++ stable/9/share/man/man5/reiserfs.5 Wed May 14 13:45:51 2014 (r266013) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 23, 2011 +.Dd October 1, 2013 .Dt REISERFS 5 .Os .Sh NAME @@ -53,9 +53,9 @@ file systems. To mount a .Nm volume located on -.Pa /dev/ad1s1 : +.Pa /dev/ada1s1 : .Pp -.Dl "mount -t reiserfs /dev/ad1s1 /mnt" +.Dl "mount -t reiserfs /dev/ada1s1 /mnt" .Sh SEE ALSO .Xr nmount 2 , .Xr unmount 2 , Modified: stable/9/share/man/man8/picobsd.8 ============================================================================== --- stable/9/share/man/man8/picobsd.8 Wed May 14 11:32:15 2014 (r266012) +++ stable/9/share/man/man8/picobsd.8 Wed May 14 13:45:51 2014 (r266013) @@ -1,6 +1,6 @@ .\" -*- nroff-fill -*- .\" $FreeBSD$ -.Dd June 25, 2009 +.Dd October 1, 2013 .Dt PICOBSD 8 .Os .Sh NAME @@ -406,9 +406,9 @@ and the floppy is ready to boot. The same process can be used to store the image on a hard disk (entire volume or one of the slices): .Bd -literal -offset indent -dd if=picobsd.bin of=/dev/ad2 -dd if=picobsd.bin of=/dev/ad2s3 -dd if=picobsd.bin of=/dev/ad2 oseek=NN +dd if=picobsd.bin of=/dev/ada2 +dd if=picobsd.bin of=/dev/ada2s3 +dd if=picobsd.bin of=/dev/ada2 oseek=NN .Ed .Pp The first form will install the image on the entire disk, and it @@ -433,8 +433,8 @@ You have to use the command to properly initialize the label (do not ask why!). One way to do this is .Bd -literal -offset indent -disklabel -w ad0s2 auto -disklabel -e ad0s2 +disklabel -w ada0s2 auto +disklabel -e ada0s2 .Ed .Pp and from the editor enter a line corresponding to the actual partition, e.g.\& Modified: stable/9/sys/boot/common/loader.8 ============================================================================== --- stable/9/sys/boot/common/loader.8 Wed May 14 11:32:15 2014 (r266012) +++ stable/9/sys/boot/common/loader.8 Wed May 14 13:45:51 2014 (r266013) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 7, 2012 +.Dd October 1, 2013 .Dt LOADER 8 .Os .Sh NAME @@ -972,7 +972,7 @@ autoboot 5 .Pp Set the disk unit of the root device to 2, and then boot. This would be needed in a system with two IDE disks, -with the second IDE disk hardwired to ad2 instead of ad1. +with the second IDE disk hardwired to ada2 instead of ada1. .Bd -literal -offset indent set root_disk_unit=2 boot /boot/kernel/kernel Modified: stable/9/usr.sbin/boot0cfg/boot0cfg.8 ============================================================================== --- stable/9/usr.sbin/boot0cfg/boot0cfg.8 Wed May 14 11:32:15 2014 (r266012) +++ stable/9/usr.sbin/boot0cfg/boot0cfg.8 Wed May 14 13:45:51 2014 (r266013) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 4, 2012 +.Dd October 1, 2013 .Dt BOOT0CFG 8 .Os .Sh NAME @@ -173,17 +173,17 @@ Image for serial consoles (COM1,9600,8,N .Sh EXAMPLES To boot slice 2 on the next boot: .Pp -.Dl "boot0cfg -s 2 ad0" +.Dl "boot0cfg -s 2 ada0" .Pp To enable just slices 1 and 3 in the menu: .Pp -.Dl "boot0cfg -m 0x5 ad0" +.Dl "boot0cfg -m 0x5 ada0" .Pp To go back to non-interactive booting, use .Xr fdisk 8 to install the default MBR: .Pp -.Dl "fdisk -B ad0" +.Dl "fdisk -B ada0" .Pp .Sh SEE ALSO .Xr geom 4 , From owner-svn-src-stable@FreeBSD.ORG Wed May 14 13:47:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B6CE6CB; Wed, 14 May 2014 13:47:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4700C2132; Wed, 14 May 2014 13:47:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EDlp0X046486; Wed, 14 May 2014 13:47:51 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EDlotT046483; Wed, 14 May 2014 13:47:50 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201405141347.s4EDlotT046483@svn.freebsd.org> From: Marius Strobl Date: Wed, 14 May 2014 13:47:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266014 - stable/10/sbin/gvinum X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 13:47:51 -0000 Author: marius Date: Wed May 14 13:47:50 2014 New Revision: 266014 URL: http://svnweb.freebsd.org/changeset/base/266014 Log: MFC: r265454 - Allow foot shooting with the resetconfig command via the -f option. - Fix typos preventing -f to actually work with the create command. - Initialize flags to zero rather than using stack garbage when handling the grow command. Sponsored by: Bally Wulff Games & Entertainment GmbH Modified: stable/10/sbin/gvinum/gvinum.8 stable/10/sbin/gvinum/gvinum.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/gvinum/gvinum.8 ============================================================================== --- stable/10/sbin/gvinum/gvinum.8 Wed May 14 13:45:51 2014 (r266013) +++ stable/10/sbin/gvinum/gvinum.8 Wed May 14 13:47:50 2014 (r266014) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 1, 2013 +.Dd May 6, 2014 .Dt GVINUM 8 .Os .Sh NAME @@ -168,7 +168,7 @@ the beginning of the plex if the .Fl f flag is specified, or otherwise at the location of the parity check pointer. All subdisks in the plex must be up for a parity check. -.It Ic resetconfig +.It Ic resetconfig Oo Fl f Oc Reset the complete .Nm configuration. Modified: stable/10/sbin/gvinum/gvinum.c ============================================================================== --- stable/10/sbin/gvinum/gvinum.c Wed May 14 13:45:51 2014 (r266013) +++ stable/10/sbin/gvinum/gvinum.c Wed May 14 13:47:50 2014 (r266014) @@ -71,7 +71,7 @@ void gvinum_parityop(int, char **, int); void gvinum_printconfig(int, char **); void gvinum_raid5(int, char **); void gvinum_rename(int, char **); -void gvinum_resetconfig(void); +void gvinum_resetconfig(int, char **); void gvinum_rm(int, char **); void gvinum_saveconfig(void); void gvinum_setstate(int, char **); @@ -193,8 +193,8 @@ gvinum_create(int argc, char **argv) flags |= GV_FLAG_F; /* Else it must be a file. */ } else { - if ((tmp = fopen(argv[1], "r")) == NULL) { - warn("can't open '%s' for reading", argv[1]); + if ((tmp = fopen(argv[i], "r")) == NULL) { + warn("can't open '%s' for reading", argv[i]); return; } } @@ -720,7 +720,7 @@ gvinum_help(void) " Change the name of the specified object.\n" "rebuildparity plex [-f]\n" " Rebuild the parity blocks of a RAID-5 plex.\n" - "resetconfig\n" + "resetconfig [-f]\n" " Reset the complete gvinum configuration\n" "rm [-r] [-f] volume | plex | subdisk | drive\n" " Remove an object.\n" @@ -1099,26 +1099,40 @@ gvinum_rm(int argc, char **argv) } void -gvinum_resetconfig(void) +gvinum_resetconfig(int argc, char **argv) { struct gctl_req *req; const char *errstr; char reply[32]; + int flags, i; - if (!isatty(STDIN_FILENO)) { - warn("Please enter this command from a tty device\n"); - return; + flags = 0; + while ((i = getopt(argc, argv, "f")) != -1) { + switch (i) { + case 'f': + flags |= GV_FLAG_F; + break; + default: + warn("invalid flag: %c", i); + return; + } } - printf(" WARNING! This command will completely wipe out your gvinum" - "configuration.\n" - " All data will be lost. If you really want to do this," - " enter the text\n\n" - " NO FUTURE\n" - " Enter text -> "); - fgets(reply, sizeof(reply), stdin); - if (strcmp(reply, "NO FUTURE\n")) { - printf("\n No change\n"); - return; + if ((flags & GV_FLAG_F) == 0) { + if (!isatty(STDIN_FILENO)) { + warn("Please enter this command from a tty device\n"); + return; + } + printf(" WARNING! This command will completely wipe out" + " your gvinum configuration.\n" + " All data will be lost. If you really want to do this," + " enter the text\n\n" + " NO FUTURE\n" + " Enter text -> "); + fgets(reply, sizeof(reply), stdin); + if (strcmp(reply, "NO FUTURE\n")) { + printf("\n No change\n"); + return; + } } req = gctl_get_handle(); gctl_ro_param(req, "class", -1, "VINUM"); @@ -1259,6 +1273,7 @@ gvinum_grow(int argc, char **argv) const char *errstr; int drives, volumes, plexes, subdisks, flags; + flags = 0; drives = volumes = plexes = subdisks = 0; if (argc < 3) { warnx("usage:\tgrow plex drive\n"); @@ -1369,7 +1384,7 @@ parseline(int argc, char **argv) else if (!strcmp(argv[0], "rename")) gvinum_rename(argc, argv); else if (!strcmp(argv[0], "resetconfig")) - gvinum_resetconfig(); + gvinum_resetconfig(argc, argv); else if (!strcmp(argv[0], "rm")) gvinum_rm(argc, argv); else if (!strcmp(argv[0], "saveconfig")) From owner-svn-src-stable@FreeBSD.ORG Wed May 14 13:48:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E35377F2; Wed, 14 May 2014 13:48:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF0E32134; Wed, 14 May 2014 13:48:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EDm2Nc046577; Wed, 14 May 2014 13:48:02 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EDm28f046575; Wed, 14 May 2014 13:48:02 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201405141348.s4EDm28f046575@svn.freebsd.org> From: Marius Strobl Date: Wed, 14 May 2014 13:48:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266015 - stable/9/sbin/gvinum X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 13:48:03 -0000 Author: marius Date: Wed May 14 13:48:02 2014 New Revision: 266015 URL: http://svnweb.freebsd.org/changeset/base/266015 Log: MFC: r265454 - Allow foot shooting with the resetconfig command via the -f option. - Fix typos preventing -f to actually work with the create command. - Initialize flags to zero rather than using stack garbage when handling the grow command. Sponsored by: Bally Wulff Games & Entertainment GmbH Modified: stable/9/sbin/gvinum/gvinum.8 stable/9/sbin/gvinum/gvinum.c Directory Properties: stable/9/sbin/gvinum/ (props changed) Modified: stable/9/sbin/gvinum/gvinum.8 ============================================================================== --- stable/9/sbin/gvinum/gvinum.8 Wed May 14 13:47:50 2014 (r266014) +++ stable/9/sbin/gvinum/gvinum.8 Wed May 14 13:48:02 2014 (r266015) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 1, 2013 +.Dd May 6, 2014 .Dt GVINUM 8 .Os .Sh NAME @@ -168,7 +168,7 @@ the beginning of the plex if the .Fl f flag is specified, or otherwise at the location of the parity check pointer. All subdisks in the plex must be up for a parity check. -.It Ic resetconfig +.It Ic resetconfig Oo Fl f Oc Reset the complete .Nm configuration. Modified: stable/9/sbin/gvinum/gvinum.c ============================================================================== --- stable/9/sbin/gvinum/gvinum.c Wed May 14 13:47:50 2014 (r266014) +++ stable/9/sbin/gvinum/gvinum.c Wed May 14 13:48:02 2014 (r266015) @@ -71,7 +71,7 @@ void gvinum_parityop(int, char **, int); void gvinum_printconfig(int, char **); void gvinum_raid5(int, char **); void gvinum_rename(int, char **); -void gvinum_resetconfig(void); +void gvinum_resetconfig(int, char **); void gvinum_rm(int, char **); void gvinum_saveconfig(void); void gvinum_setstate(int, char **); @@ -191,8 +191,8 @@ gvinum_create(int argc, char **argv) flags |= GV_FLAG_F; /* Else it must be a file. */ } else { - if ((tmp = fopen(argv[1], "r")) == NULL) { - warn("can't open '%s' for reading", argv[1]); + if ((tmp = fopen(argv[i], "r")) == NULL) { + warn("can't open '%s' for reading", argv[i]); return; } } @@ -718,7 +718,7 @@ gvinum_help(void) " Change the name of the specified object.\n" "rebuildparity plex [-f]\n" " Rebuild the parity blocks of a RAID-5 plex.\n" - "resetconfig\n" + "resetconfig [-f]\n" " Reset the complete gvinum configuration\n" "rm [-r] [-f] volume | plex | subdisk | drive\n" " Remove an object.\n" @@ -1097,26 +1097,40 @@ gvinum_rm(int argc, char **argv) } void -gvinum_resetconfig(void) +gvinum_resetconfig(int argc, char **argv) { struct gctl_req *req; const char *errstr; char reply[32]; + int flags, i; - if (!isatty(STDIN_FILENO)) { - warn("Please enter this command from a tty device\n"); - return; + flags = 0; + while ((i = getopt(argc, argv, "f")) != -1) { + switch (i) { + case 'f': + flags |= GV_FLAG_F; + break; + default: + warn("invalid flag: %c", i); + return; + } } - printf(" WARNING! This command will completely wipe out your gvinum" - "configuration.\n" - " All data will be lost. If you really want to do this," - " enter the text\n\n" - " NO FUTURE\n" - " Enter text -> "); - fgets(reply, sizeof(reply), stdin); - if (strcmp(reply, "NO FUTURE\n")) { - printf("\n No change\n"); - return; + if ((flags & GV_FLAG_F) == 0) { + if (!isatty(STDIN_FILENO)) { + warn("Please enter this command from a tty device\n"); + return; + } + printf(" WARNING! This command will completely wipe out" + " your gvinum configuration.\n" + " All data will be lost. If you really want to do this," + " enter the text\n\n" + " NO FUTURE\n" + " Enter text -> "); + fgets(reply, sizeof(reply), stdin); + if (strcmp(reply, "NO FUTURE\n")) { + printf("\n No change\n"); + return; + } } req = gctl_get_handle(); gctl_ro_param(req, "class", -1, "VINUM"); @@ -1256,6 +1270,7 @@ gvinum_grow(int argc, char **argv) const char *errstr; int drives, volumes, plexes, subdisks, flags; + flags = 0; drives = volumes = plexes = subdisks = 0; if (argc < 3) { warnx("usage:\tgrow plex drive\n"); @@ -1366,7 +1381,7 @@ parseline(int argc, char **argv) else if (!strcmp(argv[0], "rename")) gvinum_rename(argc, argv); else if (!strcmp(argv[0], "resetconfig")) - gvinum_resetconfig(); + gvinum_resetconfig(argc, argv); else if (!strcmp(argv[0], "rm")) gvinum_rm(argc, argv); else if (!strcmp(argv[0], "saveconfig")) From owner-svn-src-stable@FreeBSD.ORG Wed May 14 13:48:29 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD2FC924; Wed, 14 May 2014 13:48:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8E26213A; Wed, 14 May 2014 13:48:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EDmT7e046682; Wed, 14 May 2014 13:48:29 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EDmTTo046680; Wed, 14 May 2014 13:48:29 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201405141348.s4EDmTTo046680@svn.freebsd.org> From: Marius Strobl Date: Wed, 14 May 2014 13:48:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r266016 - stable/8/sbin/gvinum X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 13:48:30 -0000 Author: marius Date: Wed May 14 13:48:29 2014 New Revision: 266016 URL: http://svnweb.freebsd.org/changeset/base/266016 Log: MFC: r265454 - Allow foot shooting with the resetconfig command via the -f option. - Fix typos preventing -f to actually work with the create command. - Initialize flags to zero rather than using stack garbage when handling the grow command. Sponsored by: Bally Wulff Games & Entertainment GmbH Modified: stable/8/sbin/gvinum/gvinum.8 stable/8/sbin/gvinum/gvinum.c Directory Properties: stable/8/sbin/gvinum/ (props changed) Modified: stable/8/sbin/gvinum/gvinum.8 ============================================================================== --- stable/8/sbin/gvinum/gvinum.8 Wed May 14 13:48:02 2014 (r266015) +++ stable/8/sbin/gvinum/gvinum.8 Wed May 14 13:48:29 2014 (r266016) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 10, 2009 +.Dd May 6, 2014 .Dt GVINUM 8 .Os .Sh NAME @@ -168,7 +168,7 @@ the beginning of the plex if the .Fl f flag is specified, or otherwise at the location of the parity check pointer. All subdisks in the plex must be up for a parity check. -.It Ic resetconfig +.It Ic resetconfig Oo Fl f Oc Reset the complete .Nm configuration. Modified: stable/8/sbin/gvinum/gvinum.c ============================================================================== --- stable/8/sbin/gvinum/gvinum.c Wed May 14 13:48:02 2014 (r266015) +++ stable/8/sbin/gvinum/gvinum.c Wed May 14 13:48:29 2014 (r266016) @@ -71,7 +71,7 @@ void gvinum_parityop(int, char **, int); void gvinum_printconfig(int, char **); void gvinum_raid5(int, char **); void gvinum_rename(int, char **); -void gvinum_resetconfig(void); +void gvinum_resetconfig(int, char **); void gvinum_rm(int, char **); void gvinum_saveconfig(void); void gvinum_setstate(int, char **); @@ -190,8 +190,8 @@ gvinum_create(int argc, char **argv) flags |= GV_FLAG_F; /* Else it must be a file. */ } else { - if ((tmp = fopen(argv[1], "r")) == NULL) { - warn("can't open '%s' for reading", argv[1]); + if ((tmp = fopen(argv[i], "r")) == NULL) { + warn("can't open '%s' for reading", argv[i]); return; } } @@ -717,7 +717,7 @@ gvinum_help(void) " Change the name of the specified object.\n" "rebuildparity plex [-f]\n" " Rebuild the parity blocks of a RAID-5 plex.\n" - "resetconfig\n" + "resetconfig [-f]\n" " Reset the complete gvinum configuration\n" "rm [-r] [-f] volume | plex | subdisk | drive\n" " Remove an object.\n" @@ -1099,26 +1099,40 @@ gvinum_rm(int argc, char **argv) } void -gvinum_resetconfig(void) +gvinum_resetconfig(int argc, char **argv) { struct gctl_req *req; const char *errstr; char reply[32]; + int flags, i; - if (!isatty(STDIN_FILENO)) { - warn("Please enter this command from a tty device\n"); - return; + flags = 0; + while ((i = getopt(argc, argv, "f")) != -1) { + switch (i) { + case 'f': + flags |= GV_FLAG_F; + break; + default: + warn("invalid flag: %c", i); + return; + } } - printf(" WARNING! This command will completely wipe out your gvinum" - "configuration.\n" - " All data will be lost. If you really want to do this," - " enter the text\n\n" - " NO FUTURE\n" - " Enter text -> "); - fgets(reply, sizeof(reply), stdin); - if (strcmp(reply, "NO FUTURE\n")) { - printf("\n No change\n"); - return; + if ((flags & GV_FLAG_F) == 0) { + if (!isatty(STDIN_FILENO)) { + warn("Please enter this command from a tty device\n"); + return; + } + printf(" WARNING! This command will completely wipe out" + " your gvinum configuration.\n" + " All data will be lost. If you really want to do this," + " enter the text\n\n" + " NO FUTURE\n" + " Enter text -> "); + fgets(reply, sizeof(reply), stdin); + if (strcmp(reply, "NO FUTURE\n")) { + printf("\n No change\n"); + return; + } } req = gctl_get_handle(); gctl_ro_param(req, "class", -1, "VINUM"); @@ -1258,6 +1272,7 @@ gvinum_grow(int argc, char **argv) const char *errstr; int drives, volumes, plexes, subdisks, flags; + flags = 0; drives = volumes = plexes = subdisks = 0; if (argc < 3) { warnx("usage:\tgrow plex drive\n"); @@ -1370,7 +1385,7 @@ parseline(int argc, char **argv) else if (!strcmp(argv[0], "rename")) gvinum_rename(argc, argv); else if (!strcmp(argv[0], "resetconfig")) - gvinum_resetconfig(); + gvinum_resetconfig(argc, argv); else if (!strcmp(argv[0], "rm")) gvinum_rm(argc, argv); else if (!strcmp(argv[0], "saveconfig")) From owner-svn-src-stable@FreeBSD.ORG Wed May 14 13:54:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4372ED6D; Wed, 14 May 2014 13:54:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F0A321FA; Wed, 14 May 2014 13:54:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EDs8LW050537; Wed, 14 May 2014 13:54:08 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EDs8tH050536; Wed, 14 May 2014 13:54:08 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201405141354.s4EDs8tH050536@svn.freebsd.org> From: Christian Brueffer Date: Wed, 14 May 2014 13:54:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266017 - stable/10/release/doc/en_US.ISO8859-1/hardware X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 13:54:08 -0000 Author: brueffer Date: Wed May 14 13:54:07 2014 New Revision: 266017 URL: http://svnweb.freebsd.org/changeset/base/266017 Log: MFC: r265362 Mention the axge(4) driver in the hardware notes. Modified: stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Directory Properties: stable/10/ (props changed) Modified: stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Wed May 14 13:48:29 2014 (r266016) +++ stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Wed May 14 13:54:07 2014 (r266017) @@ -821,6 +821,9 @@ &hwlist.axe; + ASIX Electronics AX88178A/AX88179 USB Gigabit Ethernet + adapters (&man.axge.4; driver) + &hwlist.bce; [&arch.amd64;, &arch.i386;] Broadcom BCM4401 based Fast From owner-svn-src-stable@FreeBSD.ORG Wed May 14 13:55:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB447EB8; Wed, 14 May 2014 13:55:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A79CC2209; Wed, 14 May 2014 13:55:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EDtEg7050790; Wed, 14 May 2014 13:55:14 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EDtE1Y050789; Wed, 14 May 2014 13:55:14 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201405141355.s4EDtE1Y050789@svn.freebsd.org> From: Christian Brueffer Date: Wed, 14 May 2014 13:55:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266018 - stable/9/release/doc/en_US.ISO8859-1/hardware X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 13:55:14 -0000 Author: brueffer Date: Wed May 14 13:55:14 2014 New Revision: 266018 URL: http://svnweb.freebsd.org/changeset/base/266018 Log: MFC: r265362 Mention the axge(4) driver in the hardware notes. Modified: stable/9/release/doc/en_US.ISO8859-1/hardware/article.xml Directory Properties: stable/9/release/doc/ (props changed) stable/9/release/doc/en_US.ISO8859-1/hardware/ (props changed) Modified: stable/9/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/hardware/article.xml Wed May 14 13:54:07 2014 (r266017) +++ stable/9/release/doc/en_US.ISO8859-1/hardware/article.xml Wed May 14 13:55:14 2014 (r266018) @@ -880,6 +880,9 @@ &hwlist.axe; + ASIX Electronics AX88178A/AX88179 USB Gigabit Ethernet + adapters (&man.axge.4; driver) + &hwlist.bce; [&arch.amd64;, &arch.i386;] Broadcom BCM4401 based Fast From owner-svn-src-stable@FreeBSD.ORG Wed May 14 14:08:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 336895E0; Wed, 14 May 2014 14:08:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1DE5B237A; Wed, 14 May 2014 14:08:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EE8mAl056070; Wed, 14 May 2014 14:08:48 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EE8joX056047; Wed, 14 May 2014 14:08:45 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405141408.s4EE8joX056047@svn.freebsd.org> From: Ian Lepore Date: Wed, 14 May 2014 14:08:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266019 - in stable/10/sys/powerpc: aim booke ofw powermac pseries X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 14:08:48 -0000 Author: ian Date: Wed May 14 14:08:45 2014 New Revision: 266019 URL: http://svnweb.freebsd.org/changeset/base/266019 Log: MFC r258268, r258271, r258272, r258274, r258275, r258427, r258694, r258696, r258697, r258757 Do not assume a value for #address-cells when parsing the OF translations map. This allows the kernel to get farther with OpenBIOS on 64-bit CPUs. Actually look up #address-cells instead of assuming it is correlated with the Uninorth version number. #interrupt-cells belongs to the iparent, not the device parent. Add a sysctl to allow disabling resetting the OF syscons. For PCI<->PCI bridges, #address-cells may be 3. Make RTAS calls, which call setfault() to recover from machine checks, preserve any existing fault buffer. badaddr() is used only in the grackle PCI driver, so move its definition there. Clean up a spurious setfault() declaration as well. This [phyp_console] driver doesn't need the /options node, so don't check for it. Use the Open Firmware-based CPU frequency determination as a generic fallback if we can't measure CPU frequency. This is also useful on a variety of embedded systems using FDT. Modified: stable/10/sys/powerpc/aim/machdep.c stable/10/sys/powerpc/aim/mmu_oea64.c stable/10/sys/powerpc/aim/trap.c stable/10/sys/powerpc/booke/trap.c stable/10/sys/powerpc/ofw/ofw_syscons.c stable/10/sys/powerpc/powermac/grackle.c stable/10/sys/powerpc/powermac/macio.c stable/10/sys/powerpc/powermac/uninorth.c stable/10/sys/powerpc/powermac/uninorthpci.c stable/10/sys/powerpc/powermac/uninorthvar.h stable/10/sys/powerpc/pseries/phyp_console.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/powerpc/aim/machdep.c ============================================================================== --- stable/10/sys/powerpc/aim/machdep.c Wed May 14 13:55:14 2014 (r266018) +++ stable/10/sys/powerpc/aim/machdep.c Wed May 14 14:08:45 2014 (r266019) @@ -159,8 +159,6 @@ SYSCTL_INT(_machdep, CPU_CACHELINE, cach uintptr_t powerpc_init(vm_offset_t, vm_offset_t, vm_offset_t, void *); -int setfault(faultbuf); /* defined in locore.S */ - long Maxmem = 0; long realmem = 0; Modified: stable/10/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- stable/10/sys/powerpc/aim/mmu_oea64.c Wed May 14 13:55:14 2014 (r266018) +++ stable/10/sys/powerpc/aim/mmu_oea64.c Wed May 14 14:08:45 2014 (r266019) @@ -180,8 +180,7 @@ uintptr_t moea64_get_unique_vsid(void); struct ofw_map { cell_t om_va; cell_t om_len; - cell_t om_pa_hi; - cell_t om_pa_lo; + uint64_t om_pa; cell_t om_mode; }; @@ -471,13 +470,9 @@ om_cmp(const void *a, const void *b) mapa = a; mapb = b; - if (mapa->om_pa_hi < mapb->om_pa_hi) + if (mapa->om_pa < mapb->om_pa) return (-1); - else if (mapa->om_pa_hi > mapb->om_pa_hi) - return (1); - else if (mapa->om_pa_lo < mapb->om_pa_lo) - return (-1); - else if (mapa->om_pa_lo > mapb->om_pa_lo) + else if (mapa->om_pa > mapb->om_pa) return (1); else return (0); @@ -486,26 +481,41 @@ om_cmp(const void *a, const void *b) static void moea64_add_ofw_mappings(mmu_t mmup, phandle_t mmu, size_t sz) { - struct ofw_map translations[sz/sizeof(struct ofw_map)]; + struct ofw_map translations[sz/(4*sizeof(cell_t))]; /*>= 4 cells per */ + pcell_t acells, trans_cells[sz/sizeof(cell_t)]; register_t msr; vm_offset_t off; vm_paddr_t pa_base; - int i; + int i, j; bzero(translations, sz); - if (OF_getprop(mmu, "translations", translations, sz) == -1) + OF_getprop(OF_finddevice("/"), "#address-cells", &acells, + sizeof(acells)); + if (OF_getprop(mmu, "translations", trans_cells, sz) == -1) panic("moea64_bootstrap: can't get ofw translations"); CTR0(KTR_PMAP, "moea64_add_ofw_mappings: translations"); - sz /= sizeof(*translations); + sz /= sizeof(cell_t); + for (i = 0, j = 0; i < sz; j++) { + translations[j].om_va = trans_cells[i++]; + translations[j].om_len = trans_cells[i++]; + translations[j].om_pa = trans_cells[i++]; + if (acells == 2) { + translations[j].om_pa <<= 32; + translations[j].om_pa |= trans_cells[i++]; + } + translations[j].om_mode = trans_cells[i++]; + } + KASSERT(i == sz, ("Translations map has incorrect cell count (%d/%zd)", + i, sz)); + + sz = j; qsort(translations, sz, sizeof (*translations), om_cmp); for (i = 0; i < sz; i++) { - pa_base = translations[i].om_pa_lo; - #ifdef __powerpc64__ - pa_base += (vm_offset_t)translations[i].om_pa_hi << 32; - #else - if (translations[i].om_pa_hi) + pa_base = translations[i].om_pa; + #ifndef __powerpc64__ + if ((translations[i].om_pa >> 32) != 0) panic("OFW translations above 32-bit boundary!"); #endif Modified: stable/10/sys/powerpc/aim/trap.c ============================================================================== --- stable/10/sys/powerpc/aim/trap.c Wed May 14 13:55:14 2014 (r266018) +++ stable/10/sys/powerpc/aim/trap.c Wed May 14 14:08:45 2014 (r266019) @@ -89,12 +89,6 @@ static int handle_user_slb_spill(pmap_t extern int n_slbs; #endif -int setfault(faultbuf); /* defined in locore.S */ - -/* Why are these not defined in a header? */ -int badaddr(void *, size_t); -int badaddr_read(void *, size_t, int *); - struct powerpc_exception { u_int vector; char *name; @@ -695,59 +689,6 @@ trap_pfault(struct trapframe *frame, int return (SIGSEGV); } -int -badaddr(void *addr, size_t size) -{ - return (badaddr_read(addr, size, NULL)); -} - -int -badaddr_read(void *addr, size_t size, int *rptr) -{ - struct thread *td; - faultbuf env; - int x; - - /* Get rid of any stale machine checks that have been waiting. */ - __asm __volatile ("sync; isync"); - - td = curthread; - - if (setfault(env)) { - td->td_pcb->pcb_onfault = 0; - __asm __volatile ("sync"); - return 1; - } - - __asm __volatile ("sync"); - - switch (size) { - case 1: - x = *(volatile int8_t *)addr; - break; - case 2: - x = *(volatile int16_t *)addr; - break; - case 4: - x = *(volatile int32_t *)addr; - break; - default: - panic("badaddr: invalid size (%zd)", size); - } - - /* Make sure we took the machine check, if we caused one. */ - __asm __volatile ("sync; isync"); - - td->td_pcb->pcb_onfault = 0; - __asm __volatile ("sync"); /* To be sure. */ - - /* Use the value to avoid reorder. */ - if (rptr) - *rptr = x; - - return (0); -} - /* * For now, this only deals with the particular unaligned access case * that gcc tends to generate. Eventually it should handle all of the Modified: stable/10/sys/powerpc/booke/trap.c ============================================================================== --- stable/10/sys/powerpc/booke/trap.c Wed May 14 13:55:14 2014 (r266018) +++ stable/10/sys/powerpc/booke/trap.c Wed May 14 14:08:45 2014 (r266019) @@ -87,12 +87,6 @@ static int fix_unaligned(struct thread * static int handle_onfault(struct trapframe *frame); static void syscall(struct trapframe *frame); -int setfault(faultbuf); /* defined in locore.S */ - -/* Why are these not defined in a header? */ -int badaddr(void *, size_t); -int badaddr_read(void *, size_t, int *); - struct powerpc_exception { u_int vector; char *name; @@ -461,60 +455,6 @@ trap_pfault(struct trapframe *frame, int return ((rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV); } -int -badaddr(void *addr, size_t size) -{ - - return (badaddr_read(addr, size, NULL)); -} - -int -badaddr_read(void *addr, size_t size, int *rptr) -{ - struct thread *td; - faultbuf env; - int x; - - /* Get rid of any stale machine checks that have been waiting. */ - __asm __volatile ("sync; isync"); - - td = curthread; - - if (setfault(env)) { - td->td_pcb->pcb_onfault = 0; - __asm __volatile ("sync"); - return (1); - } - - __asm __volatile ("sync"); - - switch (size) { - case 1: - x = *(volatile int8_t *)addr; - break; - case 2: - x = *(volatile int16_t *)addr; - break; - case 4: - x = *(volatile int32_t *)addr; - break; - default: - panic("badaddr: invalid size (%d)", size); - } - - /* Make sure we took the machine check, if we caused one. */ - __asm __volatile ("sync; isync"); - - td->td_pcb->pcb_onfault = 0; - __asm __volatile ("sync"); /* To be sure. */ - - /* Use the value to avoid reorder. */ - if (rptr) - *rptr = x; - - return (0); -} - /* * For now, this only deals with the particular unaligned access case * that gcc tends to generate. Eventually it should handle all of the Modified: stable/10/sys/powerpc/ofw/ofw_syscons.c ============================================================================== --- stable/10/sys/powerpc/ofw/ofw_syscons.c Wed May 14 13:55:14 2014 (r266018) +++ stable/10/sys/powerpc/ofw/ofw_syscons.c Wed May 14 14:08:45 2014 (r266019) @@ -57,9 +57,12 @@ __FBSDID("$FreeBSD$"); #include static int ofwfb_ignore_mmap_checks = 1; +static int ofwfb_reset_on_switch = 1; static SYSCTL_NODE(_hw, OID_AUTO, ofwfb, CTLFLAG_RD, 0, "ofwfb"); SYSCTL_INT(_hw_ofwfb, OID_AUTO, relax_mmap, CTLFLAG_RW, &ofwfb_ignore_mmap_checks, 0, "relaxed mmap bounds checking"); +SYSCTL_INT(_hw_ofwfb, OID_AUTO, reset_on_mode_switch, CTLFLAG_RW, + &ofwfb_reset_on_switch, 0, "reset the framebuffer driver on mode switch"); extern u_char dflt_font_16[]; extern u_char dflt_font_14[]; @@ -447,26 +450,28 @@ ofwfb_set_mode(video_adapter_t *adp, int sc = (struct ofwfb_softc *)adp; - /* - * Open the display device, which will initialize it. - */ - - memset(name, 0, sizeof(name)); - OF_package_to_path(sc->sc_node, name, sizeof(name)); - ih = OF_open(name); - - if (sc->sc_depth == 8) { + if (ofwfb_reset_on_switch) { /* - * Install the ISO6429 colormap - older OFW systems - * don't do this by default + * Open the display device, which will initialize it. */ - for (i = 0; i < 16; i++) { - OF_call_method("color!", ih, 4, 1, - ofwfb_cmap[i].red, - ofwfb_cmap[i].green, - ofwfb_cmap[i].blue, - i, - &retval); + + memset(name, 0, sizeof(name)); + OF_package_to_path(sc->sc_node, name, sizeof(name)); + ih = OF_open(name); + + if (sc->sc_depth == 8) { + /* + * Install the ISO6429 colormap - older OFW systems + * don't do this by default + */ + for (i = 0; i < 16; i++) { + OF_call_method("color!", ih, 4, 1, + ofwfb_cmap[i].red, + ofwfb_cmap[i].green, + ofwfb_cmap[i].blue, + i, + &retval); + } } } Modified: stable/10/sys/powerpc/powermac/grackle.c ============================================================================== --- stable/10/sys/powerpc/powermac/grackle.c Wed May 14 13:55:14 2014 (r266018) +++ stable/10/sys/powerpc/powermac/grackle.c Wed May 14 14:08:45 2014 (r266019) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -59,8 +60,6 @@ __FBSDID("$FreeBSD$"); #include "pcib_if.h" -int badaddr(void *, size_t); /* XXX */ - /* * Device interface. */ @@ -81,6 +80,9 @@ static void grackle_write_config(device static int grackle_enable_config(struct grackle_softc *, u_int, u_int, u_int, u_int); static void grackle_disable_config(struct grackle_softc *); +static int badaddr(void *, size_t); + +int setfault(faultbuf); /* defined in locore.S */ /* * Driver methods. @@ -238,6 +240,50 @@ grackle_disable_config(struct grackle_so out32rb(sc->sc_addr, 0); } +static int +badaddr(void *addr, size_t size) +{ + struct thread *td; + faultbuf env, *oldfaultbuf; + int x; + + /* Get rid of any stale machine checks that have been waiting. */ + __asm __volatile ("sync; isync"); + + td = curthread; + + oldfaultbuf = td->td_pcb->pcb_onfault; + if (setfault(env)) { + td->td_pcb->pcb_onfault = oldfaultbuf; + __asm __volatile ("sync"); + return 1; + } + + __asm __volatile ("sync"); + + switch (size) { + case 1: + x = *(volatile int8_t *)addr; + break; + case 2: + x = *(volatile int16_t *)addr; + break; + case 4: + x = *(volatile int32_t *)addr; + break; + default: + panic("badaddr: invalid size (%zd)", size); + } + + /* Make sure we took the machine check, if we caused one. */ + __asm __volatile ("sync; isync"); + + td->td_pcb->pcb_onfault = oldfaultbuf; + __asm __volatile ("sync"); /* To be sure. */ + + return (0); +} + /* * Driver to swallow Grackle host bridges from the PCI bus side. */ Modified: stable/10/sys/powerpc/powermac/macio.c ============================================================================== --- stable/10/sys/powerpc/powermac/macio.c Wed May 14 13:55:14 2014 (r266018) +++ stable/10/sys/powerpc/powermac/macio.c Wed May 14 14:08:45 2014 (r266019) @@ -201,10 +201,6 @@ macio_add_intr(phandle_t devnode, struct return; } - if (OF_searchprop(devnode, "#interrupt-cells", &icells, sizeof(icells)) - <= 0) - icells = 1; - nintr = OF_getprop_alloc(devnode, "interrupts", sizeof(*intr), (void **)&intr); if (nintr == -1) { @@ -221,6 +217,10 @@ macio_add_intr(phandle_t devnode, struct <= 0) panic("Interrupt but no interrupt parent!\n"); + if (OF_getprop(OF_xref_phandle(iparent), "#interrupt-cells", &icells, + sizeof(icells)) <= 0) + icells = 1; + for (i = 0; i < nintr; i+=icells) { u_int irq = MAP_IRQ(iparent, intr[i]); Modified: stable/10/sys/powerpc/powermac/uninorth.c ============================================================================== --- stable/10/sys/powerpc/powermac/uninorth.c Wed May 14 13:55:14 2014 (r266018) +++ stable/10/sys/powerpc/powermac/uninorth.c Wed May 14 14:08:45 2014 (r266019) @@ -270,6 +270,7 @@ unin_chip_attach(device_t dev) phandle_t child; phandle_t iparent; device_t cdev; + cell_t acells, scells; char compat[32]; char name[32]; u_int irq, reg[3]; @@ -281,12 +282,21 @@ unin_chip_attach(device_t dev) if (OF_getprop(root, "reg", reg, sizeof(reg)) < 8) return (ENXIO); - if (strcmp(ofw_bus_get_name(dev), "u3") == 0 - || strcmp(ofw_bus_get_name(dev), "u4") == 0) - i = 1; /* #address-cells lies */ - - sc->sc_physaddr = reg[i]; - sc->sc_size = reg[i+1]; + acells = scells = 1; + OF_getprop(OF_parent(root), "#address-cells", &acells, sizeof(acells)); + OF_getprop(OF_parent(root), "#size-cells", &scells, sizeof(scells)); + + i = 0; + sc->sc_physaddr = reg[i++]; + if (acells == 2) { + sc->sc_physaddr <<= 32; + sc->sc_physaddr |= reg[i++]; + } + sc->sc_size = reg[i++]; + if (scells == 2) { + sc->sc_size <<= 32; + sc->sc_size |= reg[i++]; + } sc->sc_mem_rman.rm_type = RMAN_ARRAY; sc->sc_mem_rman.rm_descr = "UniNorth Device Memory"; Modified: stable/10/sys/powerpc/powermac/uninorthpci.c ============================================================================== --- stable/10/sys/powerpc/powermac/uninorthpci.c Wed May 14 13:55:14 2014 (r266018) +++ stable/10/sys/powerpc/powermac/uninorthpci.c Wed May 14 14:08:45 2014 (r266019) @@ -134,7 +134,9 @@ uninorth_attach(device_t dev) struct uninorth_softc *sc; const char *compatible; phandle_t node; - u_int32_t reg[3]; + uint32_t reg[3]; + uint64_t regbase; + cell_t acells; node = ofw_bus_get_node(dev); sc = device_get_softc(dev); @@ -149,14 +151,18 @@ uninorth_attach(device_t dev) if (strcmp(compatible, "u4-pcie") == 0) sc->sc_ver = 4; - if (sc->sc_ver >= 3) { - sc->sc_addr = (vm_offset_t)pmap_mapdev(reg[1] + 0x800000, PAGE_SIZE); - sc->sc_data = (vm_offset_t)pmap_mapdev(reg[1] + 0xc00000, PAGE_SIZE); - } else { - sc->sc_addr = (vm_offset_t)pmap_mapdev(reg[0] + 0x800000, PAGE_SIZE); - sc->sc_data = (vm_offset_t)pmap_mapdev(reg[0] + 0xc00000, PAGE_SIZE); + acells = 1; + OF_getprop(OF_parent(node), "#address-cells", &acells, sizeof(acells)); + + regbase = reg[0]; + if (acells == 2) { + regbase <<= 32; + regbase |= reg[1]; } + sc->sc_addr = (vm_offset_t)pmap_mapdev(regbase + 0x800000, PAGE_SIZE); + sc->sc_data = (vm_offset_t)pmap_mapdev(regbase + 0xc00000, PAGE_SIZE); + return (ofw_pci_attach(dev)); } Modified: stable/10/sys/powerpc/powermac/uninorthvar.h ============================================================================== --- stable/10/sys/powerpc/powermac/uninorthvar.h Wed May 14 13:55:14 2014 (r266018) +++ stable/10/sys/powerpc/powermac/uninorthvar.h Wed May 14 14:08:45 2014 (r266019) @@ -40,9 +40,9 @@ struct uninorth_softc { }; struct unin_chip_softc { - u_int32_t sc_physaddr; + uint64_t sc_physaddr; + uint64_t sc_size; vm_offset_t sc_addr; - u_int32_t sc_size; struct rman sc_mem_rman; int sc_version; }; Modified: stable/10/sys/powerpc/pseries/phyp_console.c ============================================================================== --- stable/10/sys/powerpc/pseries/phyp_console.c Wed May 14 13:55:14 2014 (r266018) +++ stable/10/sys/powerpc/pseries/phyp_console.c Wed May 14 14:08:45 2014 (r266019) @@ -192,11 +192,9 @@ uart_phyp_cnprobe(struct consdev *cp) { char buf[64]; ihandle_t stdout; - phandle_t input, opts, chosen; + phandle_t input, chosen; static struct uart_phyp_softc sc; - if ((opts = OF_finddevice("/options")) == -1) - goto fail; if ((chosen = OF_finddevice("/chosen")) == -1) goto fail; From owner-svn-src-stable@FreeBSD.ORG Wed May 14 14:17:55 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A534830; Wed, 14 May 2014 14:17:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 030EA2430; Wed, 14 May 2014 14:17:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EEHsKZ060553; Wed, 14 May 2014 14:17:54 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EEHqW2060536; Wed, 14 May 2014 14:17:52 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405141417.s4EEHqW2060536@svn.freebsd.org> From: Ian Lepore Date: Wed, 14 May 2014 14:17:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266020 - in stable/10/sys: arm/mv dev/fdt dev/ofw dev/uart powerpc/aim powerpc/booke powerpc/include powerpc/mpc85xx powerpc/ofw powerpc/powermac powerpc/powerpc powerpc/ps3 powerpc/ps... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 14:17:55 -0000 Author: ian Date: Wed May 14 14:17:51 2014 New Revision: 266020 URL: http://svnweb.freebsd.org/changeset/base/266020 Log: MFC r258800, r258802, r258805, r258806, r258807, r258851, r258857, r259199, r259484, r259513, r259514, r259516 The kernel stack guard pages are only below the stack pointer, not above. Remove unnecessary double-setting of the thread's onfault state in copyinstr(). Open Firmware mandates that certain cross-references, in particular those in /chosen, be ihandles. The ePAPR spec makes those cross-reference phandles, since FDT has no concept of ihandles. Have the OF FDT CI module interpret queries about ihandles as cross-reference phandles. Real OF systems have an ihandle under /chosen/stdout, not a phandle. Use the right type. Rearchitect platform memory map parsing to make it less Open Firmware-centric. Remove fdtbus_bs_tag definition, which is now obsolete. The remainder of this file is also slated for future demolition. Return the correct IEEE 1275 code for "nextprop". Use the common Open Firmware PCI interrupt routing code instead of the duplicate version in dev/fdt. Configure interrupt sense based on device tree information. Simplify the ofw_bus_lookup_imap() API slightly: make it allocate maskbuf internally instead of requiring the caller to allocate it. Modified: stable/10/sys/arm/mv/mv_pci.c stable/10/sys/dev/fdt/fdt_common.h stable/10/sys/dev/fdt/fdt_pci.c stable/10/sys/dev/ofw/ofw_bus_subr.c stable/10/sys/dev/ofw/ofw_bus_subr.h stable/10/sys/dev/ofw/ofw_fdt.c stable/10/sys/dev/uart/uart_cpu_powerpc.c stable/10/sys/powerpc/aim/trap_subr32.S stable/10/sys/powerpc/aim/trap_subr64.S stable/10/sys/powerpc/booke/platform_bare.c stable/10/sys/powerpc/include/fdt.h stable/10/sys/powerpc/include/ofw_machdep.h stable/10/sys/powerpc/mpc85xx/platform_mpc85xx.c stable/10/sys/powerpc/ofw/ofw_machdep.c stable/10/sys/powerpc/ofw/ofw_pci.c stable/10/sys/powerpc/ofw/ofw_pcib_pci.c stable/10/sys/powerpc/powermac/platform_powermac.c stable/10/sys/powerpc/powerpc/copyinout.c stable/10/sys/powerpc/powerpc/platform.c stable/10/sys/powerpc/powerpc/platform_if.m stable/10/sys/powerpc/ps3/platform_ps3.c stable/10/sys/powerpc/pseries/platform_chrp.c stable/10/sys/powerpc/wii/platform_wii.c stable/10/sys/sparc64/ebus/ebus.c stable/10/sys/sparc64/isa/ofw_isa.c stable/10/sys/sparc64/pci/fire.c stable/10/sys/sparc64/pci/ofw_pcib_subr.c stable/10/sys/sparc64/pci/psycho.c stable/10/sys/sparc64/pci/schizo.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/mv/mv_pci.c ============================================================================== --- stable/10/sys/arm/mv/mv_pci.c Wed May 14 14:08:45 2014 (r266019) +++ stable/10/sys/arm/mv/mv_pci.c Wed May 14 14:17:51 2014 (r266020) @@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -142,7 +143,7 @@ struct mv_pcib_softc { int sc_type; int sc_mode; /* Endpoint / Root Complex */ - struct fdt_pci_intr sc_intr_info; + struct ofw_bus_iinfo sc_pci_iinfo; }; /* Local forward prototypes */ @@ -155,7 +156,6 @@ static void mv_pcib_hw_cfgwrite(struct m static int mv_pcib_init(struct mv_pcib_softc *, int, int); static int mv_pcib_init_all_bars(struct mv_pcib_softc *, int, int, int, int); static void mv_pcib_init_bridge(struct mv_pcib_softc *, int, int, int); -static int mv_pcib_intr_info(phandle_t, struct mv_pcib_softc *); static inline void pcib_write_irq_mask(struct mv_pcib_softc *, uint32_t); static void mv_pcib_enable(struct mv_pcib_softc *, uint32_t); static int mv_pcib_mem_init(struct mv_pcib_softc *); @@ -243,8 +243,8 @@ mv_pcib_probe(device_t self) if (!fdt_is_type(node, "pci")) return (ENXIO); - if (!(fdt_is_compatible(node, "mrvl,pcie") || - fdt_is_compatible(node, "mrvl,pci"))) + if (!(ofw_bus_is_compatible(self, "mrvl,pcie") || + ofw_bus_is_compatible(self, "mrvl,pci"))) return (ENXIO); device_set_desc(self, "Marvell Integrated PCI/PCI-E Controller"); @@ -299,11 +299,8 @@ mv_pcib_attach(device_t self) /* * Get PCI interrupt info. */ - if ((sc->sc_mode == MV_MODE_ROOT) && - (mv_pcib_intr_info(node, sc) != 0)) { - device_printf(self, "could not retrieve interrupt info\n"); - return (ENXIO); - } + if (sc->sc_mode == MV_MODE_ROOT) + ofw_bus_setup_iinfo(node, &sc->sc_pci_iinfo, sizeof(pcell_t)); /* * Configure decode windows for PCI(E) access. @@ -881,19 +878,32 @@ mv_pcib_write_config(device_t dev, u_int } static int -mv_pcib_route_interrupt(device_t pcib, device_t dev, int pin) +mv_pcib_route_interrupt(device_t bus, device_t dev, int pin) { struct mv_pcib_softc *sc; - int err, interrupt; - - sc = device_get_softc(pcib); - - err = fdt_pci_route_intr(pci_get_bus(dev), pci_get_slot(dev), - pci_get_function(dev), pin, &sc->sc_intr_info, &interrupt); - if (err == 0) - return (interrupt); + struct ofw_pci_register reg; + uint32_t pintr, mintr; + phandle_t iparent; + + sc = device_get_softc(bus); + pintr = pin; + + /* Fabricate imap information in case this isn't an OFW device */ + bzero(®, sizeof(reg)); + reg.phys_hi = (pci_get_bus(dev) << OFW_PCI_PHYS_HI_BUSSHIFT) | + (pci_get_slot(dev) << OFW_PCI_PHYS_HI_DEVICESHIFT) | + (pci_get_function(dev) << OFW_PCI_PHYS_HI_FUNCTIONSHIFT); + + if (ofw_bus_lookup_imap(ofw_bus_get_node(dev), &sc->sc_pci_iinfo, ®, + sizeof(reg), &pintr, sizeof(pintr), &mintr, sizeof(mintr), + &iparent)) + return (ofw_bus_map_intr(dev, iparent, mintr)); + + /* Maybe it's a real interrupt, not an intpin */ + if (pin > 4) + return (pin); - device_printf(pcib, "could not route pin %d for device %d.%d\n", + device_printf(bus, "could not route pin %d for device %d.%d\n", pin, pci_get_slot(dev), pci_get_function(dev)); return (PCI_INVALID_IRQ); } @@ -938,17 +948,6 @@ mv_pcib_decode_win(phandle_t node, struc return (0); } -static int -mv_pcib_intr_info(phandle_t node, struct mv_pcib_softc *sc) -{ - int error; - - if ((error = fdt_pci_intr_info(node, &sc->sc_intr_info)) != 0) - return (error); - - return (0); -} - #if defined(SOC_MV_ARMADAXP) static int mv_pcib_map_msi(device_t dev, device_t child, int irq, uint64_t *addr, Modified: stable/10/sys/dev/fdt/fdt_common.h ============================================================================== --- stable/10/sys/dev/fdt/fdt_common.h Wed May 14 14:08:45 2014 (r266019) +++ stable/10/sys/dev/fdt/fdt_common.h Wed May 14 14:17:51 2014 (r266020) @@ -47,14 +47,6 @@ struct fdt_pci_range { u_long len; }; -struct fdt_pci_intr { - int addr_cells; - int intr_cells; - int map_len; - pcell_t *map; - pcell_t *mask; -}; - struct fdt_sense_level { enum intr_trigger trig; enum intr_polarity pol; @@ -110,11 +102,9 @@ int fdt_is_enabled(phandle_t); int fdt_pm_is_enabled(phandle_t); int fdt_is_type(phandle_t, const char *); int fdt_parent_addr_cells(phandle_t); -int fdt_pci_intr_info(phandle_t, struct fdt_pci_intr *); int fdt_pci_ranges(phandle_t, struct fdt_pci_range *, struct fdt_pci_range *); int fdt_pci_ranges_decode(phandle_t, struct fdt_pci_range *, struct fdt_pci_range *); -int fdt_pci_route_intr(int, int, int, int, struct fdt_pci_intr *, int *); int fdt_ranges_verify(pcell_t *, int, int, int, int); int fdt_reg_to_rl(phandle_t, struct resource_list *); int fdt_pm(phandle_t); Modified: stable/10/sys/dev/fdt/fdt_pci.c ============================================================================== --- stable/10/sys/dev/fdt/fdt_pci.c Wed May 14 14:08:45 2014 (r266019) +++ stable/10/sys/dev/fdt/fdt_pci.c Wed May 14 14:17:51 2014 (r266020) @@ -180,159 +180,6 @@ fdt_pci_ranges(phandle_t node, struct fd return (0); } -static int -fdt_addr_cells(phandle_t node, int *addr_cells) -{ - pcell_t cell; - int cell_size; - - cell_size = sizeof(cell); - if (OF_getprop(node, "#address-cells", &cell, cell_size) < cell_size) - return (EINVAL); - *addr_cells = fdt32_to_cpu((int)cell); - - if (*addr_cells > 3) - return (ERANGE); - return (0); -} - -static int -fdt_interrupt_cells(phandle_t node) -{ - pcell_t intr_cells; - - if (OF_getprop(node, "#interrupt-cells", &intr_cells, - sizeof(intr_cells)) <= 0) { - debugf("no intr-cells defined, defaulting to 1\n"); - intr_cells = 1; - } - intr_cells = fdt32_to_cpu(intr_cells); - - return ((int)intr_cells); -} - -int -fdt_pci_intr_info(phandle_t node, struct fdt_pci_intr *intr_info) -{ - void *map, *mask; - int acells, icells; - int error, len; - - error = fdt_addr_cells(node, &acells); - if (error) - return (error); - - icells = fdt_interrupt_cells(node); - - /* - * Retrieve the interrupt map and mask properties. - */ - len = OF_getprop_alloc(node, "interrupt-map-mask", 1, &mask); - if (len / sizeof(pcell_t) != (acells + icells)) { - debugf("bad mask len = %d\n", len); - goto err; - } - - len = OF_getprop_alloc(node, "interrupt-map", 1, &map); - if (len <= 0) { - debugf("bad map len = %d\n", len); - goto err; - } - - intr_info->map_len = len; - intr_info->map = map; - intr_info->mask = mask; - intr_info->addr_cells = acells; - intr_info->intr_cells = icells; - - debugf("acells=%u, icells=%u, map_len=%u\n", acells, icells, len); - return (0); - -err: - free(mask, M_OFWPROP); - return (ENXIO); -} - -int -fdt_pci_route_intr(int bus, int slot, int func, int pin, - struct fdt_pci_intr *intr_info, int *interrupt) -{ - pcell_t child_spec[4], masked[4]; - phandle_t iph; - pcell_t intr_par; - pcell_t *map_ptr; - uint32_t addr; - int i, j, map_len; - int par_intr_cells, par_addr_cells, child_spec_cells, row_cells; - int par_idx, spec_idx, err, trig, pol; - - child_spec_cells = intr_info->addr_cells + intr_info->intr_cells; - if (child_spec_cells > sizeof(child_spec) / sizeof(pcell_t)) - return (ENOMEM); - - addr = (bus << 16) | (slot << 11) | (func << 8); - child_spec[0] = addr; - child_spec[1] = 0; - child_spec[2] = 0; - child_spec[3] = pin; - - map_len = intr_info->map_len; - map_ptr = intr_info->map; - - par_idx = child_spec_cells; - i = 0; - while (i < map_len) { - iph = fdt32_to_cpu(map_ptr[par_idx]); - intr_par = OF_xref_phandle(iph); - - err = fdt_addr_cells(intr_par, &par_addr_cells); - if (err != 0) { - debugf("could not retrieve intr parent #addr-cells\n"); - return (err); - } - par_intr_cells = fdt_interrupt_cells(intr_par); - - row_cells = child_spec_cells + 1 + par_addr_cells + - par_intr_cells; - - /* - * Apply mask and look up the entry in interrupt map. - */ - for (j = 0; j < child_spec_cells; j++) { - masked[j] = child_spec[j] & - fdt32_to_cpu(intr_info->mask[j]); - - if (masked[j] != fdt32_to_cpu(map_ptr[j])) - goto next; - } - - /* - * Decode interrupt of the parent intr controller. - */ - spec_idx = child_spec_cells + 1 + par_addr_cells; - err = fdt_intr_decode(intr_par, &map_ptr[spec_idx], - interrupt, &trig, &pol); - if (err != 0) { - debugf("could not decode interrupt\n"); - return (err); - } - debugf("decoded intr = %d, trig = %d, pol = %d\n", *interrupt, - trig, pol); - -#if defined(__powerpc__) - powerpc_config_intr(FDT_MAP_IRQ(iph, *interrupt), trig, - pol); -#endif - return (0); - -next: - map_ptr += row_cells; - i += (row_cells * sizeof(pcell_t)); - } - - return (ENXIO); -} - #if defined(__arm__) int fdt_pci_devmap(phandle_t node, struct arm_devmap_entry *devmap, vm_offset_t io_va, @@ -360,217 +207,3 @@ fdt_pci_devmap(phandle_t node, struct ar } #endif -#if 0 -static int -fdt_pci_config_bar(device_t dev, int bus, int slot, int func, int bar) -{ -} - -static int -fdt_pci_config_normal(device_t dev, int bus, int slot, int func) -{ - int bar; - uint8_t command, intline, intpin; - - command = PCIB_READ_CONFIG(dev, bus, slot, func, PCIR_COMMAND, 1); - command &= ~(PCIM_CMD_MEMEN | PCIM_CMD_PORTEN); - PCIB_WRITE_CONFIG(dev, bus, slot, func, PCIR_COMMAND, command, 1); - - /* Program the base address registers. */ - bar = 0; - while (bar <= PCIR_MAX_BAR_0) - bar += fdt_pci_config_bar(dev, bus, slot, func, bar); - - /* Perform interrupt routing. */ - intpin = PCIB_READ_CONFIG(dev, bus, slot, func, PCIR_INTPIN, 1); - intline = fsl_pcib_route_int(dev, bus, slot, func, intpin); - PCIB_WRITE_CONFIG(dev, bus, slot, func, PCIR_INTLINE, intline, 1); - - command |= PCIM_CMD_MEMEN | PCIM_CMD_PORTEN; - PCIB_WRITE_CONFIG(dev, bus, slot, func, PCIR_COMMAND, command, 1); -} - -static int -fdt_pci_config_bridge(device_t dev, int bus, int secbus, int slot, int func) -{ - int maxbar; - uint8_t command; - - command = PCIB_READ_CONFIG(dev, bus, slot, func, PCIR_COMMAND, 1); - command &= ~(PCIM_CMD_MEMEN | PCIM_CMD_PORTEN); - PCIB_WRITE_CONFIG(dev, bus, slot, func, PCIR_COMMAND, command, 1); - - /* Program the base address registers. */ - maxbar = (hdrtype & PCIM_HDRTYPE) ? 1 : 6; - bar = 0; - while (bar < maxbar) - bar += fsl_pcib_init_bar(sc, bus, slot, func, - bar); - - /* Perform interrupt routing. */ - intpin = fsl_pcib_read_config(sc->sc_dev, bus, slot, - func, PCIR_INTPIN, 1); - intline = fsl_pcib_route_int(sc, bus, slot, func, - intpin); - fsl_pcib_write_config(sc->sc_dev, bus, slot, func, - PCIR_INTLINE, intline, 1); - - command |= PCIM_CMD_MEMEN | PCIM_CMD_PORTEN; - fsl_pcib_write_config(sc->sc_dev, bus, slot, func, - PCIR_COMMAND, command, 1); - - /* - * Handle PCI-PCI bridges - */ - class = fsl_pcib_read_config(sc->sc_dev, bus, slot, - func, PCIR_CLASS, 1); - subclass = fsl_pcib_read_config(sc->sc_dev, bus, slot, - func, PCIR_SUBCLASS, 1); - - /* Allow only proper PCI-PCI briges */ - if (class != PCIC_BRIDGE) - continue; - if (subclass != PCIS_BRIDGE_PCI) - continue; - - secbus++; - - /* Program I/O decoder. */ - fsl_pcib_write_config(sc->sc_dev, bus, slot, func, - PCIR_IOBASEL_1, sc->sc_ioport.rm_start >> 8, 1); - fsl_pcib_write_config(sc->sc_dev, bus, slot, func, - PCIR_IOLIMITL_1, sc->sc_ioport.rm_end >> 8, 1); - fsl_pcib_write_config(sc->sc_dev, bus, slot, func, - PCIR_IOBASEH_1, sc->sc_ioport.rm_start >> 16, 2); - fsl_pcib_write_config(sc->sc_dev, bus, slot, func, - PCIR_IOLIMITH_1, sc->sc_ioport.rm_end >> 16, 2); - - /* Program (non-prefetchable) memory decoder. */ - fsl_pcib_write_config(sc->sc_dev, bus, slot, func, - PCIR_MEMBASE_1, sc->sc_iomem.rm_start >> 16, 2); - fsl_pcib_write_config(sc->sc_dev, bus, slot, func, - PCIR_MEMLIMIT_1, sc->sc_iomem.rm_end >> 16, 2); - - /* Program prefetchable memory decoder. */ - fsl_pcib_write_config(sc->sc_dev, bus, slot, func, - PCIR_PMBASEL_1, 0x0010, 2); - fsl_pcib_write_config(sc->sc_dev, bus, slot, func, - PCIR_PMLIMITL_1, 0x000f, 2); - fsl_pcib_write_config(sc->sc_dev, bus, slot, func, - PCIR_PMBASEH_1, 0x00000000, 4); - fsl_pcib_write_config(sc->sc_dev, bus, slot, func, - PCIR_PMLIMITH_1, 0x00000000, 4); - - /* Read currect bus register configuration */ - old_pribus = fsl_pcib_read_config(sc->sc_dev, bus, - slot, func, PCIR_PRIBUS_1, 1); - old_secbus = fsl_pcib_read_config(sc->sc_dev, bus, - slot, func, PCIR_SECBUS_1, 1); - old_subbus = fsl_pcib_read_config(sc->sc_dev, bus, - slot, func, PCIR_SUBBUS_1, 1); - - if (bootverbose) - printf("PCI: reading firmware bus numbers for " - "secbus = %d (bus/sec/sub) = (%d/%d/%d)\n", - secbus, old_pribus, old_secbus, old_subbus); - - new_pribus = bus; - new_secbus = secbus; - - secbus = fsl_pcib_init(sc, secbus, - (subclass == PCIS_BRIDGE_PCI) ? PCI_SLOTMAX : 0); - - new_subbus = secbus; - - if (bootverbose) - printf("PCI: translate firmware bus numbers " - "for secbus %d (%d/%d/%d) -> (%d/%d/%d)\n", - secbus, old_pribus, old_secbus, old_subbus, - new_pribus, new_secbus, new_subbus); - - fsl_pcib_write_config(sc->sc_dev, bus, slot, func, - PCIR_PRIBUS_1, new_pribus, 1); - fsl_pcib_write_config(sc->sc_dev, bus, slot, func, - PCIR_SECBUS_1, new_secbus, 1); - fsl_pcib_write_config(sc->sc_dev, bus, slot, func, - PCIR_SUBBUS_1, new_subbus, 1); - -} - -static int -fdt_pci_config_slot(device_t dev, int bus, int secbus, int slot) -{ - int func, maxfunc; - uint16_t vendor; - uint8_t hdrtype; - - maxfunc = 0; - for (func = 0; func <= maxfunc; func++) { - hdrtype = PCIB_READ_CONFIG(dev, bus, slot, func, - PCIR_HDRTYPE, 1); - if ((hdrtype & PCIM_HDRTYPE) > PCI_MAXHDRTYPE) - continue; - if (func == 0 && (hdrtype & PCIM_MFDEV)) - maxfunc = PCI_FUNCMAX; - - vendor = PCIB_READ_CONFIG(dev, bus, slot, func, - PCIR_VENDOR, 2); - if (vendor == 0xffff) - continue; - - if ((hdrtype & PCIM_HDRTYPE) == PCIM_HDRTYPE_NORMAL) - fdt_pci_config_normal(dev, bus, slot, func); - else - secbus = fdt_pci_config_bridge(dev, bus, secbus, - slot, func); - } - - return (secbus); -} - -static int -fdt_pci_config_bus(device_t dev, int bus, int maxslot) -{ - int func, maxfunc, secbus, slot; - - secbus = bus; - for (slot = 0; slot <= maxslot; slot++) - secbus = fdt_pci_config_slot(dev, bus, secbus, slot); - - return (secbus); -} - -int -fdt_pci_config_domain(device_t dev) -{ - pcell_t bus_range[2]; - phandle_t root; - int bus, error, maxslot; - - root = ofw_bus_get_node(dev); - if (root == 0) - return (EINVAL); - if (!fdt_is_type(root, "pci")) - return (EINVAL); - - /* - * Determine the bus number of the root in this domain. - * Lacking any information, this will be bus 0. - * Write the bus number to the bus device, using the IVAR. - */ - if ((OF_getprop(root, "bus-range", bus_range, sizeof(bus_range)) <= 0) - bus = 0; - else - bus = fdt32_to_cpu(bus_range[0]); - - error = BUS_WRITE_IVAR(dev, NULL, PCIB_IVAR_BUS, bus); - if (error) - return (error); - - /* Get the maximum slot number for bus-enumeration. */ - maxslot = PCIB_MAXSLOTS(dev); - - bus = fdt_pci_config_bus(dev, bus, maxslot); - return (0); -} -#endif Modified: stable/10/sys/dev/ofw/ofw_bus_subr.c ============================================================================== --- stable/10/sys/dev/ofw/ofw_bus_subr.c Wed May 14 14:08:45 2014 (r266019) +++ stable/10/sys/dev/ofw/ofw_bus_subr.c Wed May 14 14:17:51 2014 (r266020) @@ -251,8 +251,9 @@ ofw_bus_setup_iinfo(phandle_t node, stru int ofw_bus_lookup_imap(phandle_t node, struct ofw_bus_iinfo *ii, void *reg, int regsz, void *pintr, int pintrsz, void *mintr, int mintrsz, - phandle_t *iparent, void *maskbuf) + phandle_t *iparent) { + uint8_t maskbuf[regsz + pintrsz]; int rv; if (ii->opi_imapsz <= 0) @@ -285,7 +286,7 @@ ofw_bus_lookup_imap(phandle_t node, stru * maskbuf must point to a buffer of length physsz + intrsz. * The interrupt is returned in result, which must point to a buffer of length * rintrsz (which gives the expected size of the mapped interrupt). - * Returns 1 if a mapping was found, 0 otherwise. + * Returns number of cells in the interrupt if a mapping was found, 0 otherwise. */ int ofw_bus_search_intrmap(void *intr, int intrsz, void *regs, int physsz, @@ -325,19 +326,13 @@ ofw_bus_search_intrmap(void *intr, int i tsz = physsz + intrsz + sizeof(phandle_t) + pintrsz; KASSERT(i >= tsz, ("ofw_bus_search_intrmap: truncated map")); - /* - * XXX: Apple hardware uses a second cell to set information - * on the interrupt trigger type. This information should - * be used somewhere to program the PIC. - */ - if (bcmp(ref, mptr, physsz + intrsz) == 0) { bcopy(mptr + physsz + intrsz + sizeof(parent), - result, rintrsz); + result, MIN(rintrsz, pintrsz)); if (iparent != NULL) *iparent = parent; - return (1); + return (pintrsz/sizeof(pcell_t)); } mptr += tsz; i -= tsz; Modified: stable/10/sys/dev/ofw/ofw_bus_subr.h ============================================================================== --- stable/10/sys/dev/ofw/ofw_bus_subr.h Wed May 14 14:08:45 2014 (r266019) +++ stable/10/sys/dev/ofw/ofw_bus_subr.h Wed May 14 14:17:51 2014 (r266020) @@ -68,7 +68,7 @@ bus_child_pnpinfo_str_t ofw_bus_gen_chil /* Routines for processing firmware interrupt maps */ void ofw_bus_setup_iinfo(phandle_t, struct ofw_bus_iinfo *, int); int ofw_bus_lookup_imap(phandle_t, struct ofw_bus_iinfo *, void *, int, - void *, int, void *, int, phandle_t *, void *); + void *, int, void *, int, phandle_t *); int ofw_bus_search_intrmap(void *, int, void *, int, void *, int, void *, void *, void *, int, phandle_t *); Modified: stable/10/sys/dev/ofw/ofw_fdt.c ============================================================================== --- stable/10/sys/dev/ofw/ofw_fdt.c Wed May 14 14:08:45 2014 (r266019) +++ stable/10/sys/dev/ofw/ofw_fdt.c Wed May 14 14:17:51 2014 (r266020) @@ -207,7 +207,8 @@ static phandle_t ofw_fdt_instance_to_package(ofw_t ofw, ihandle_t instance) { - return (-1); + /* Where real OF uses ihandles in the tree, FDT uses xref phandles */ + return (OF_xref_phandle(instance)); } /* Get the length of a property of a package. */ @@ -266,8 +267,10 @@ ofw_fdt_getprop(ofw_t ofw, phandle_t pac } /* - * Get the next property of a package. Return the actual len of retrieved - * prop name. + * Get the next property of a package. Return values: + * -1: package or previous property does not exist + * 0: no more properties + * 1: success */ static int ofw_fdt_nextprop(ofw_t ofw, phandle_t package, const char *previous, char *buf, @@ -309,7 +312,7 @@ ofw_fdt_nextprop(ofw_t ofw, phandle_t pa strncpy(buf, fdt_string(fdtp, fdt32_to_cpu(prop->nameoff)), size); - return (strlen(buf)); + return (1); } /* Set the value of a property of a package. */ @@ -350,8 +353,13 @@ ofw_fdt_finddevice(ofw_t ofw, const char static ssize_t ofw_fdt_instance_to_path(ofw_t ofw, ihandle_t instance, char *buf, size_t len) { + phandle_t phandle; - return (-1); + phandle = OF_instance_to_package(instance); + if (phandle == -1) + return (-1); + + return (OF_package_to_path(phandle, buf, len)); } /* Return the fully qualified pathname corresponding to a package. */ Modified: stable/10/sys/dev/uart/uart_cpu_powerpc.c ============================================================================== --- stable/10/sys/dev/uart/uart_cpu_powerpc.c Wed May 14 14:08:45 2014 (r266019) +++ stable/10/sys/dev/uart/uart_cpu_powerpc.c Wed May 14 14:17:51 2014 (r266020) @@ -89,13 +89,13 @@ ofw_get_console_phandle_path(phandle_t n return (ENXIO); OF_getprop(node, prop, &field, sizeof(field)); - /* This property might be a phandle or might be a path. Hooray. */ + /* This property might be either a ihandle or path. Hooray. */ output = -1; if (field.buf[size - 1] == 0) output = OF_finddevice(field.buf); if (output == -1 && size == 4) - output = OF_xref_phandle(field.ref); + output = OF_instance_to_package(field.ref); if (output != -1) { *result = output; Modified: stable/10/sys/powerpc/aim/trap_subr32.S ============================================================================== --- stable/10/sys/powerpc/aim/trap_subr32.S Wed May 14 14:08:45 2014 (r266019) +++ stable/10/sys/powerpc/aim/trap_subr32.S Wed May 14 14:17:51 2014 (r266020) @@ -672,11 +672,12 @@ disitrap: stw %r31,(PC_TEMPSAVE+CPUSAVE_AIM_DSISR)(%r1) #ifdef KDB - /* Try and detect a kernel stack overflow */ + /* Try to detect a kernel stack overflow */ mfsrr1 %r31 mtcr %r31 bt 17,realtrap /* branch is user mode */ mfsprg1 %r31 /* get old SP */ + clrrwi %r31,%r31,11 /* Round SP down to nearest page */ sub. %r30,%r31,%r30 /* SP - DAR */ bge 1f neg %r30,%r30 /* modulo value */ Modified: stable/10/sys/powerpc/aim/trap_subr64.S ============================================================================== --- stable/10/sys/powerpc/aim/trap_subr64.S Wed May 14 14:08:45 2014 (r266019) +++ stable/10/sys/powerpc/aim/trap_subr64.S Wed May 14 14:17:51 2014 (r266020) @@ -580,11 +580,12 @@ disitrap: std %r31,(PC_TEMPSAVE+CPUSAVE_AIM_DSISR)(%r1) #ifdef KDB - /* Try and detect a kernel stack overflow */ + /* Try to detect a kernel stack overflow */ mfsrr1 %r31 mtcr %r31 bt 17,realtrap /* branch is user mode */ mfsprg1 %r31 /* get old SP */ + clrrdi %r31,%r31,11 /* Round SP down to nearest page */ sub. %r30,%r31,%r30 /* SP - DAR */ bge 1f neg %r30,%r30 /* modulo value */ Modified: stable/10/sys/powerpc/booke/platform_bare.c ============================================================================== --- stable/10/sys/powerpc/booke/platform_bare.c Wed May 14 14:08:45 2014 (r266019) +++ stable/10/sys/powerpc/booke/platform_bare.c Wed May 14 14:17:51 2014 (r266020) @@ -45,8 +45,8 @@ __FBSDID("$FreeBSD$"); extern uint32_t *bootinfo; static int bare_probe(platform_t); -static void bare_mem_regions(platform_t, struct mem_region **phys, int *physsz, - struct mem_region **avail, int *availsz); +static void bare_mem_regions(platform_t, struct mem_region *phys, int *physsz, + struct mem_region *avail, int *availsz); static u_long bare_timebase_freq(platform_t, struct cpuref *cpuref); static void bare_reset(platform_t); @@ -80,8 +80,8 @@ bare_probe(platform_t plat) } void -bare_mem_regions(platform_t plat, struct mem_region **phys, int *physsz, - struct mem_region **avail, int *availsz) +bare_mem_regions(platform_t plat, struct mem_region *phys, int *physsz, + struct mem_region *avail, int *availsz) { ofw_mem_regions(phys, physsz, avail, availsz); Modified: stable/10/sys/powerpc/include/fdt.h ============================================================================== --- stable/10/sys/powerpc/include/fdt.h Wed May 14 14:08:45 2014 (r266019) +++ stable/10/sys/powerpc/include/fdt.h Wed May 14 14:17:51 2014 (r266020) @@ -35,15 +35,7 @@ #include #include -/* Max interrupt number */ -#define FDT_INTR_MAX INTR_VECTORS - /* Map phandle/intpin pair to global IRQ number */ #define FDT_MAP_IRQ(node, pin) powerpc_get_irq(node, pin) -/* - * Bus space tag. XXX endianess info needs to be derived from the blob. - */ -#define fdtbus_bs_tag (&bs_be_tag) - #endif /* _MACHINE_FDT_H_ */ Modified: stable/10/sys/powerpc/include/ofw_machdep.h ============================================================================== --- stable/10/sys/powerpc/include/ofw_machdep.h Wed May 14 14:08:45 2014 (r266019) +++ stable/10/sys/powerpc/include/ofw_machdep.h Wed May 14 14:17:51 2014 (r266020) @@ -45,7 +45,7 @@ boolean_t OF_bootstrap(void); void OF_reboot(void); -void ofw_mem_regions(struct mem_region **, int *, struct mem_region **, int *); +void ofw_mem_regions(struct mem_region *, int *, struct mem_region *, int *); void ofw_quiesce(void); /* Must be called before VM is up! */ void ofw_save_trap_vec(char *); Modified: stable/10/sys/powerpc/mpc85xx/platform_mpc85xx.c ============================================================================== --- stable/10/sys/powerpc/mpc85xx/platform_mpc85xx.c Wed May 14 14:08:45 2014 (r266019) +++ stable/10/sys/powerpc/mpc85xx/platform_mpc85xx.c Wed May 14 14:17:51 2014 (r266020) @@ -72,8 +72,8 @@ static int cpu, maxcpu; static int mpc85xx_probe(platform_t); static int mpc85xx_attach(platform_t); -static void mpc85xx_mem_regions(platform_t, struct mem_region **phys, - int *physsz, struct mem_region **avail, int *availsz); +static void mpc85xx_mem_regions(platform_t, struct mem_region *phys, + int *physsz, struct mem_region *avail, int *availsz); static u_long mpc85xx_timebase_freq(platform_t, struct cpuref *cpuref); static int mpc85xx_smp_first_cpu(platform_t, struct cpuref *cpuref); static int mpc85xx_smp_next_cpu(platform_t, struct cpuref *cpuref); @@ -201,8 +201,8 @@ mpc85xx_attach(platform_t plat) } void -mpc85xx_mem_regions(platform_t plat, struct mem_region **phys, int *physsz, - struct mem_region **avail, int *availsz) +mpc85xx_mem_regions(platform_t plat, struct mem_region *phys, int *physsz, + struct mem_region *avail, int *availsz) { ofw_mem_regions(phys, physsz, avail, availsz); Modified: stable/10/sys/powerpc/ofw/ofw_machdep.c ============================================================================== --- stable/10/sys/powerpc/ofw/ofw_machdep.c Wed May 14 14:08:45 2014 (r266019) +++ stable/10/sys/powerpc/ofw/ofw_machdep.c Wed May 14 14:17:51 2014 (r266020) @@ -61,11 +61,6 @@ __FBSDID("$FreeBSD$"); #include #include -static struct mem_region OFmem[PHYS_AVAIL_SZ], OFavail[PHYS_AVAIL_SZ]; -static struct mem_region OFfree[PHYS_AVAIL_SZ]; - -static int apple_hacks; - #ifdef AIM extern register_t ofmsr[5]; extern void *openfirmware_entry; @@ -80,7 +75,7 @@ static int openfirmware(void *args); __inline void ofw_save_trap_vec(char *save_trap_vec) { - if (apple_hacks) + if (!ofw_real_mode) return; bcopy((void *)EXC_RST, save_trap_vec, EXC_LAST - EXC_RST); @@ -89,7 +84,7 @@ ofw_save_trap_vec(char *save_trap_vec) static __inline void ofw_restore_trap_vec(char *restore_trap_vec) { - if (apple_hacks) + if (!ofw_real_mode) return; bcopy(restore_trap_vec, (void *)EXC_RST, EXC_LAST - EXC_RST); @@ -104,7 +99,7 @@ register_t ofw_sprg0_save; static __inline void ofw_sprg_prepare(void) { - if (!apple_hacks) + if (ofw_real_mode) return; /* @@ -126,8 +121,10 @@ ofw_sprg_prepare(void) static __inline void ofw_sprg_restore(void) { - if (!apple_hacks) +#if 0 + if (ofw_real_mode) return; +#endif /* * Note that SPRG1-3 contents are irrelevant. They are scratch @@ -140,50 +137,6 @@ ofw_sprg_restore(void) } #endif -/* - * Memory region utilities: determine if two regions overlap, - * and merge two overlapping regions into one - */ -static int -memr_overlap(struct mem_region *r1, struct mem_region *r2) -{ - if ((r1->mr_start + r1->mr_size) < r2->mr_start || - (r2->mr_start + r2->mr_size) < r1->mr_start) - return (FALSE); - - return (TRUE); -} - -static void -memr_merge(struct mem_region *from, struct mem_region *to) -{ - vm_offset_t end; - end = ulmax(to->mr_start + to->mr_size, from->mr_start + from->mr_size); - to->mr_start = ulmin(from->mr_start, to->mr_start); - to->mr_size = end - to->mr_start; -} - -/* - * Quick sort callout for comparing memory regions. - */ -static int mr_cmp(const void *a, const void *b); - -static int -mr_cmp(const void *a, const void *b) -{ - const struct mem_region *regiona; - const struct mem_region *regionb; - - regiona = a; - regionb = b; - if (regiona->mr_start < regionb->mr_start) - return (-1); - else if (regiona->mr_start > regionb->mr_start) - return (1); - else - return (0); -} - static int parse_ofw_memory(phandle_t node, const char *prop, struct mem_region *output) { @@ -209,14 +162,6 @@ parse_ofw_memory(phandle_t node, const c size_cells = 1; /* - * On Apple hardware, address_cells is always 1 for "available", - * even when it is explicitly set to 2. All memory above 4 GB - * also needs to be added by hand to the available list. - */ - if (strcmp(prop, "available") == 0 && apple_hacks) - address_cells = 1; - - /* * Get memory. */ if (node == -1 || (sz = OF_getprop(node, prop, @@ -267,103 +212,9 @@ parse_ofw_memory(phandle_t node, const c } sz = j*sizeof(output[0]); - #ifdef __powerpc64__ - if (strcmp(prop, "available") == 0 && apple_hacks) { - /* Add in regions above 4 GB to the available list */ - struct mem_region himem[16]; - int hisz; - - hisz = parse_ofw_memory(node, "reg", himem); - for (i = 0; i < hisz/sizeof(himem[0]); i++) { - if (himem[i].mr_start > BUS_SPACE_MAXADDR_32BIT) { - output[j].mr_start = himem[i].mr_start; - output[j].mr_size = himem[i].mr_size; - j++; - } - } - sz = j*sizeof(output[0]); - } - #endif - return (sz); } -static int -parse_drconf_memory(int *msz, int *asz, struct mem_region *ofmem, - struct mem_region *ofavail) -{ - phandle_t phandle; - vm_offset_t base; - int i, idx, len, lasz, lmsz, res; - uint32_t lmb_size[2]; - unsigned long *dmem, flags; - - lmsz = *msz; - lasz = *asz; - - phandle = OF_finddevice("/ibm,dynamic-reconfiguration-memory"); - if (phandle == -1) - /* No drconf node, return. */ - return (0); - - res = OF_getprop(phandle, "ibm,lmb-size", lmb_size, sizeof(lmb_size)); - if (res == -1) - return (0); - printf("Logical Memory Block size: %d MB\n", lmb_size[1] >> 20); - - /* Parse the /ibm,dynamic-memory. - The first position gives the # of entries. The next two words - reflect the address of the memory block. The next four words are - the DRC index, reserved, list index and flags. - (see PAPR C.6.6.2 ibm,dynamic-reconfiguration-memory) - - #el Addr DRC-idx res list-idx flags - ------------------------------------------------- - | 4 | 8 | 4 | 4 | 4 | 4 |.... - ------------------------------------------------- - */ - - len = OF_getproplen(phandle, "ibm,dynamic-memory"); - if (len > 0) { - - /* We have to use a variable length array on the stack - since we have very limited stack space. - */ - cell_t arr[len/sizeof(cell_t)]; - - res = OF_getprop(phandle, "ibm,dynamic-memory", &arr, - sizeof(arr)); - if (res == -1) - return (0); - - /* Number of elements */ - idx = arr[0]; - - /* First address. */ - dmem = (void*)&arr[1]; - - for (i = 0; i < idx; i++) { - base = *dmem; - dmem += 2; - flags = *dmem; - /* Use region only if available and not reserved. */ - if ((flags & 0x8) && !(flags & 0x80)) { - ofmem[lmsz].mr_start = base; - ofmem[lmsz].mr_size = (vm_size_t)lmb_size[1]; - ofavail[lasz].mr_start = base; - ofavail[lasz].mr_size = (vm_size_t)lmb_size[1]; - lmsz++; - lasz++; - } - dmem++; - } - } - - *msz = lmsz; - *asz = lasz; - - return (1); -} /* * This is called during powerpc_init, before the system is really initialized. * It shall provide the total and the available regions of RAM. @@ -372,14 +223,12 @@ parse_drconf_memory(int *msz, int *asz, * to provide space for two additional entry beyond the terminating one. */ void -ofw_mem_regions(struct mem_region **memp, int *memsz, - struct mem_region **availp, int *availsz) +ofw_mem_regions(struct mem_region *memp, int *memsz, + struct mem_region *availp, int *availsz) { phandle_t phandle; - vm_offset_t maxphysaddr; - int asz, msz, fsz; - int i, j, res; - int still_merging; + int asz, msz; + int res; char name[31]; asz = msz = 0; @@ -394,72 +243,18 @@ ofw_mem_regions(struct mem_region **memp if (strncmp(name, "memory", sizeof(name)) != 0) continue; - res = parse_ofw_memory(phandle, "reg", &OFmem[msz]); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Wed May 14 14:37:28 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B46BF2F5; Wed, 14 May 2014 14:37:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95005263A; Wed, 14 May 2014 14:37:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EEbS6Z069818; Wed, 14 May 2014 14:37:28 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EEbS1K069815; Wed, 14 May 2014 14:37:28 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405141437.s4EEbS1K069815@svn.freebsd.org> From: Ian Lepore Date: Wed, 14 May 2014 14:37:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266022 - in stable/10/sys/arm: broadcom/bcm2835 conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 14:37:28 -0000 Author: ian Date: Wed May 14 14:37:27 2014 New Revision: 266022 URL: http://svnweb.freebsd.org/changeset/base/266022 Log: MFC r259517, r259518 Add vt support for RPi. (No early stage yet.) Added: stable/10/sys/arm/broadcom/bcm2835/bcm2835_fbd.c - copied, changed from r259517, head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Modified: stable/10/sys/arm/broadcom/bcm2835/files.bcm2835 stable/10/sys/arm/conf/RPI-B Directory Properties: stable/10/ (props changed) Copied and modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_fbd.c (from r259517, head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c) ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Tue Dec 17 15:23:47 2013 (r259517, copy source) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Wed May 14 14:37:27 2014 (r266022) @@ -1,7 +1,11 @@ /*- * Copyright (c) 2012 Oleksandr Tymoshenko + * Copyright (c) 2012, 2013 The FreeBSD Foundation * All rights reserved. * + * Portions of this software were developed by Oleksandr Rybalko + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -99,13 +103,14 @@ struct bcmsc_softc { static int bcm_fb_probe(device_t); static int bcm_fb_attach(device_t); -static void bcm_fb_dmamap_cb(void *arg, bus_dma_segment_t *segs, int nseg, int err); +static void bcm_fb_dmamap_cb(void *arg, bus_dma_segment_t *segs, int nseg, + int err); static void bcm_fb_init(void *arg) { - struct bcmsc_softc *sc = arg; - volatile struct bcm_fb_config* fb_config = sc->fb_config; + volatile struct bcm_fb_config *fb_config; + struct bcmsc_softc *sc; struct fb_info *info; phandle_t node; pcell_t cell; @@ -113,6 +118,8 @@ bcm_fb_init(void *arg) device_t fbd; int err = 0; + sc = arg; + fb_config = sc->fb_config; node = ofw_bus_get_node(sc->dev); fb_config->xres = 0; @@ -153,23 +160,25 @@ bcm_fb_init(void *arg) BUS_DMASYNC_POSTREAD); if (fb_config->base != 0) { - device_printf(sc->dev, "%dx%d(%dx%d@%d,%d) %dbpp\n", + device_printf(sc->dev, "%dx%d(%dx%d@%d,%d) %dbpp\n", fb_config->xres, fb_config->yres, fb_config->vxres, fb_config->vyres, fb_config->xoffset, fb_config->yoffset, fb_config->bpp); - device_printf(sc->dev, "pitch %d, base 0x%08x, screen_size %d\n", + device_printf(sc->dev, "pitch %d, base 0x%08x, screen_size %d\n", fb_config->pitch, fb_config->base, fb_config->screen_size); - info = malloc(sizeof(struct fb_info), M_DEVBUF, M_WAITOK | M_ZERO); + info = malloc(sizeof(struct fb_info), M_DEVBUF, + M_WAITOK | M_ZERO); info->fb_name = device_get_nameunit(sc->dev); - info->fb_vbase = (intptr_t)pmap_mapdev(fb_config->base, fb_config->screen_size); + info->fb_vbase = (intptr_t)pmap_mapdev(fb_config->base, + fb_config->screen_size); info->fb_pbase = fb_config->base; info->fb_size = fb_config->screen_size; info->fb_bpp = info->fb_depth = fb_config->bpp; @@ -179,7 +188,8 @@ bcm_fb_init(void *arg) sc->info = info; - fbd = device_add_child(sc->dev, "fbd", device_get_unit(sc->dev)); + fbd = device_add_child(sc->dev, "fbd", + device_get_unit(sc->dev)); if (fbd == NULL) { device_printf(sc->dev, "Failed to add fbd child\n"); return; @@ -244,8 +254,8 @@ bcm_fb_attach(device_t dev) goto fail; } - /* - * We have to wait until interrupts are enabled. + /* + * We have to wait until interrupts are enabled. * Mailbox relies on it to get data from VideoCore */ sc->init_hook.ich_func = bcm_fb_init; Modified: stable/10/sys/arm/broadcom/bcm2835/files.bcm2835 ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/files.bcm2835 Wed May 14 14:19:57 2014 (r266021) +++ stable/10/sys/arm/broadcom/bcm2835/files.bcm2835 Wed May 14 14:37:27 2014 (r266022) @@ -3,6 +3,7 @@ arm/broadcom/bcm2835/bcm2835_bsc.c optional bcm2835_bsc arm/broadcom/bcm2835/bcm2835_dma.c standard arm/broadcom/bcm2835/bcm2835_fb.c optional sc +arm/broadcom/bcm2835/bcm2835_fbd.c optional vt arm/broadcom/bcm2835/bcm2835_gpio.c optional gpio arm/broadcom/bcm2835/bcm2835_intr.c standard arm/broadcom/bcm2835/bcm2835_machdep.c standard Modified: stable/10/sys/arm/conf/RPI-B ============================================================================== --- stable/10/sys/arm/conf/RPI-B Wed May 14 14:19:57 2014 (r266021) +++ stable/10/sys/arm/conf/RPI-B Wed May 14 14:37:27 2014 (r266022) @@ -66,7 +66,7 @@ device pl011 device pty # Comment following lines for boot console on serial port -device sc +device vt device kbdmux options SC_DFLT_FONT # compile font in makeoptions SC_DFLT_FONT=cp437 From owner-svn-src-stable@FreeBSD.ORG Wed May 14 15:16:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2974A18; Wed, 14 May 2014 15:16:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEE5F29CD; Wed, 14 May 2014 15:16:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EFG2iX087378; Wed, 14 May 2014 15:16:02 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EFG2N2087377; Wed, 14 May 2014 15:16:02 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201405141516.s4EFG2N2087377@svn.freebsd.org> From: Bryan Drewery Date: Wed, 14 May 2014 15:16:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266023 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 15:16:03 -0000 Author: bdrewery Date: Wed May 14 15:16:02 2014 New Revision: 266023 URL: http://svnweb.freebsd.org/changeset/base/266023 Log: MFC r264385: Use proper MFSNAMELEN for fs type. Modified: stable/10/sys/kern/vfs_mount.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/vfs_mount.c ============================================================================== --- stable/10/sys/kern/vfs_mount.c Wed May 14 14:37:27 2014 (r266022) +++ stable/10/sys/kern/vfs_mount.c Wed May 14 15:16:02 2014 (r266023) @@ -748,7 +748,7 @@ sys_mount(td, uap) return (EOPNOTSUPP); } - ma = mount_argsu(ma, "fstype", uap->type, MNAMELEN); + ma = mount_argsu(ma, "fstype", uap->type, MFSNAMELEN); ma = mount_argsu(ma, "fspath", uap->path, MNAMELEN); ma = mount_argb(ma, flags & MNT_RDONLY, "noro"); ma = mount_argb(ma, !(flags & MNT_NOSUID), "nosuid"); From owner-svn-src-stable@FreeBSD.ORG Wed May 14 15:17:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F498B5A; Wed, 14 May 2014 15:17:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6BF9D29E1; Wed, 14 May 2014 15:17:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EFHDeC087558; Wed, 14 May 2014 15:17:13 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EFHDmi087557; Wed, 14 May 2014 15:17:13 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201405141517.s4EFHDmi087557@svn.freebsd.org> From: Bryan Drewery Date: Wed, 14 May 2014 15:17:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266024 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 15:17:13 -0000 Author: bdrewery Date: Wed May 14 15:17:12 2014 New Revision: 266024 URL: http://svnweb.freebsd.org/changeset/base/266024 Log: MFC r264385: Use proper MFSNAMELEN for fs type. Modified: stable/9/sys/kern/vfs_mount.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_mount.c ============================================================================== --- stable/9/sys/kern/vfs_mount.c Wed May 14 15:16:02 2014 (r266023) +++ stable/9/sys/kern/vfs_mount.c Wed May 14 15:17:12 2014 (r266024) @@ -748,7 +748,7 @@ sys_mount(td, uap) return (EOPNOTSUPP); } - ma = mount_argsu(ma, "fstype", uap->type, MNAMELEN); + ma = mount_argsu(ma, "fstype", uap->type, MFSNAMELEN); ma = mount_argsu(ma, "fspath", uap->path, MNAMELEN); ma = mount_argb(ma, flags & MNT_RDONLY, "noro"); ma = mount_argb(ma, !(flags & MNT_NOSUID), "nosuid"); From owner-svn-src-stable@FreeBSD.ORG Wed May 14 15:19:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED115E15; Wed, 14 May 2014 15:19:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9C762A05; Wed, 14 May 2014 15:19:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EFJqZs088068; Wed, 14 May 2014 15:19:52 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EFJqqd088067; Wed, 14 May 2014 15:19:52 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201405141519.s4EFJqqd088067@svn.freebsd.org> From: Bryan Drewery Date: Wed, 14 May 2014 15:19:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r266025 - stable/8/sys/kern X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 15:19:53 -0000 Author: bdrewery Date: Wed May 14 15:19:52 2014 New Revision: 266025 URL: http://svnweb.freebsd.org/changeset/base/266025 Log: MFC r264385: Use proper MFSNAMELEN for fs type. Modified: stable/8/sys/kern/vfs_mount.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) Modified: stable/8/sys/kern/vfs_mount.c ============================================================================== --- stable/8/sys/kern/vfs_mount.c Wed May 14 15:17:12 2014 (r266024) +++ stable/8/sys/kern/vfs_mount.c Wed May 14 15:19:52 2014 (r266025) @@ -807,7 +807,7 @@ mount(td, uap) return (EOPNOTSUPP); } - ma = mount_argsu(ma, "fstype", uap->type, MNAMELEN); + ma = mount_argsu(ma, "fstype", uap->type, MFSNAMELEN); ma = mount_argsu(ma, "fspath", uap->path, MNAMELEN); ma = mount_argb(ma, uap->flags & MNT_RDONLY, "noro"); ma = mount_argb(ma, !(uap->flags & MNT_NOSUID), "nosuid"); From owner-svn-src-stable@FreeBSD.ORG Wed May 14 15:21:28 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E21CFC3; Wed, 14 May 2014 15:21:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EEB072A8C; Wed, 14 May 2014 15:21:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EFLR7w090626; Wed, 14 May 2014 15:21:27 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EFLRHb090625; Wed, 14 May 2014 15:21:27 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201405141521.s4EFLRHb090625@svn.freebsd.org> From: Bryan Drewery Date: Wed, 14 May 2014 15:21:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266026 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 15:21:28 -0000 Author: bdrewery Date: Wed May 14 15:21:27 2014 New Revision: 266026 URL: http://svnweb.freebsd.org/changeset/base/266026 Log: MFC r264795: Fix grammar error and trailing newline. Modified: stable/10/sys/kern/subr_prf.c Modified: stable/10/sys/kern/subr_prf.c ============================================================================== --- stable/10/sys/kern/subr_prf.c Wed May 14 15:19:52 2014 (r266025) +++ stable/10/sys/kern/subr_prf.c Wed May 14 15:21:27 2014 (r266026) @@ -914,7 +914,7 @@ number: while (percent < fmt) PCHAR(*percent++); /* - * Since we ignore an formatting argument it is no + * Since we ignore a formatting argument it is no * longer safe to obey the remaining formatting * arguments as the arguments will no longer match * the format specs. @@ -1122,4 +1122,3 @@ hexdump(const void *ptr, int length, con printf("\n"); } } - From owner-svn-src-stable@FreeBSD.ORG Wed May 14 15:22:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9389F196; Wed, 14 May 2014 15:22:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6703D2A9F; Wed, 14 May 2014 15:22:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EFM9UA091538; Wed, 14 May 2014 15:22:09 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EFM9Hs091537; Wed, 14 May 2014 15:22:09 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201405141522.s4EFM9Hs091537@svn.freebsd.org> From: Bryan Drewery Date: Wed, 14 May 2014 15:22:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266027 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 15:22:09 -0000 Author: bdrewery Date: Wed May 14 15:22:08 2014 New Revision: 266027 URL: http://svnweb.freebsd.org/changeset/base/266027 Log: Add missing mergeinfo for r266026 Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Wed May 14 15:22:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E0AA2E0; Wed, 14 May 2014 15:22:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A2272AAA; Wed, 14 May 2014 15:22:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EFMhAm091649; Wed, 14 May 2014 15:22:43 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EFMhYj091648; Wed, 14 May 2014 15:22:43 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201405141522.s4EFMhYj091648@svn.freebsd.org> From: Marius Strobl Date: Wed, 14 May 2014 15:22:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r266028 - stable/8/sbin/gvinum X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 15:22:43 -0000 Author: marius Date: Wed May 14 15:22:42 2014 New Revision: 266028 URL: http://svnweb.freebsd.org/changeset/base/266028 Log: MFC: r204665 - Make function of finding an available drive name a macro. - Move check of /dev/ prefix and copy into a function to save code duplication. This also fixes a bug where the /dev/ prefix could not be used when creating volumes on the command line. MFC: r209051 Initialize variables before usage. Found by: clang static analyzer Found by: Coverity Prevent[tm] (CID 7736, 7760) MFC: r215704 Fix some more warnings found by clang. MFC: r229915 Fix warning when compiling with gcc46. Modified: stable/8/sbin/gvinum/gvinum.c Directory Properties: stable/8/sbin/gvinum/ (props changed) Modified: stable/8/sbin/gvinum/gvinum.c ============================================================================== --- stable/8/sbin/gvinum/gvinum.c Wed May 14 15:22:08 2014 (r266027) +++ stable/8/sbin/gvinum/gvinum.c Wed May 14 15:22:42 2014 (r266028) @@ -84,8 +84,9 @@ void printconfig(FILE *, char *); char *create_drive(char *); void create_volume(int, char **, char *); char *find_name(const char *, int, int); -char *find_drive(const char *); char *find_pattern(char *, char *); +void copy_device(struct gv_drive *, const char *); +#define find_drive() find_name("gvinumdrive", GV_TYPE_DRIVE, GV_MAXDRIVENAME) int main(int argc, char **argv) @@ -425,7 +426,7 @@ create_drive(char *device) drives = 1; dname = NULL; - drivename = find_drive(device); + drivename = find_drive(); if (drivename == NULL) return (NULL); @@ -437,7 +438,7 @@ create_drive(char *device) err(1, "unable to allocate for gv_drive object"); strlcpy(d->name, drivename, sizeof(d->name)); - strlcpy(d->device, device, sizeof(d->device)); + copy_device(d, device); gctl_ro_param(req, "drive0", sizeof(*d), d); gctl_ro_param(req, "flags", sizeof(int), &flags); gctl_ro_param(req, "drives", sizeof(int), &drives); @@ -627,14 +628,13 @@ find_name(const char *prefix, int type, return (NULL); } -char * -find_drive(const char *device) +void +copy_device(struct gv_drive *d, const char *device) { - - /* Strip possible /dev/ in front. */ if (strncmp(device, "/dev/", 5) == 0) - device += 5; - return (find_name("gvinumdrive", GV_TYPE_DRIVE, GV_MAXDRIVENAME)); + strlcpy(d->device, (device + 5), sizeof(d->device)); + else + strlcpy(d->device, device, sizeof(d->device)); } /* Detach a plex or subdisk from its parent. */ @@ -645,6 +645,7 @@ gvinum_detach(int argc, char **argv) struct gctl_req *req; int flags, i; + flags = 0; optreset = 1; optind = 1; while ((i = getopt(argc, argv, "f")) != -1) { @@ -936,14 +937,12 @@ gvinum_parityop(int argc, char **argv, i struct gctl_req *req; int flags, i; const char *errstr; - char *op, *msg; + char *op; if (rebuild) { op = "rebuildparity"; - msg = "Rebuilding"; } else { op = "checkparity"; - msg = "Checking"; } optreset = 1; @@ -1056,9 +1055,8 @@ gvinum_rm(int argc, char **argv) struct gctl_req *req; int flags, i, j; const char *errstr; - char buf[20], *cmd; + char buf[20]; - cmd = argv[0]; flags = 0; optreset = 1; optind = 1; @@ -1291,7 +1289,7 @@ gvinum_grow(int argc, char **argv) return; } /* Lookup device and set an appropriate drive name. */ - drive = find_drive(argv[2]); + drive = find_drive(); if (drive == NULL) { warn("unable to find an appropriate drive name"); free(s); @@ -1299,10 +1297,8 @@ gvinum_grow(int argc, char **argv) return; } strlcpy(d->name, drive, sizeof(d->name)); - if (strncmp(argv[2], "/dev/", 5) == 0) - strlcpy(d->device, (argv[2] + 5), sizeof(d->device)); - else - strlcpy(d->device, argv[2], sizeof(d->device)); + copy_device(d, argv[2]); + drives = 1; /* We try to use the plex name as basis for the subdisk name. */ @@ -1444,5 +1440,5 @@ printconfig(FILE *of, char *comment) if (*comment != '\0') fprintf(of, "# Current configuration:\n"); - fprintf(of, buf); + fprintf(of, "%s", buf); } From owner-svn-src-stable@FreeBSD.ORG Wed May 14 15:23:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 50D81416; Wed, 14 May 2014 15:23:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23BFD2AB2; Wed, 14 May 2014 15:23:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EFN74O091746; Wed, 14 May 2014 15:23:07 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EFN6lh091744; Wed, 14 May 2014 15:23:06 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201405141523.s4EFN6lh091744@svn.freebsd.org> From: Bryan Drewery Date: Wed, 14 May 2014 15:23:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266029 - stable/10/share/skel X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 15:23:07 -0000 Author: bdrewery Date: Wed May 14 15:23:06 2014 New Revision: 266029 URL: http://svnweb.freebsd.org/changeset/base/266029 Log: MFC r264465: Prefer /etc/login.conf for some of these environment values. Modified: stable/10/share/skel/dot.cshrc stable/10/share/skel/dot.profile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/skel/dot.cshrc ============================================================================== --- stable/10/share/skel/dot.cshrc Wed May 14 15:22:42 2014 (r266028) +++ stable/10/share/skel/dot.cshrc Wed May 14 15:23:06 2014 (r266029) @@ -12,14 +12,15 @@ alias la ls -aF alias lf ls -FA alias ll ls -lAF +# These are normally set through /etc/login.conf. You may override them here +# if wanted. +# set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $HOME/bin) +# setenv BLOCKSIZE K # A righteous umask -umask 22 - -set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $HOME/bin) +# umask 22 setenv EDITOR vi setenv PAGER more -setenv BLOCKSIZE K if ($?prompt) then # An interactive shell -- set some stuff up Modified: stable/10/share/skel/dot.profile ============================================================================== --- stable/10/share/skel/dot.profile Wed May 14 15:22:42 2014 (r266028) +++ stable/10/share/skel/dot.profile Wed May 14 15:23:06 2014 (r266029) @@ -5,15 +5,16 @@ # see also sh(1), environ(7). # -# remove /usr/games if you want -PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:$HOME/bin; export PATH +# These are normally set through /etc/login.conf. You may override them here +# if wanted. +# PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:$HOME/bin; export PATH +# BLOCKSIZE=K; export BLOCKSIZE # Setting TERM is normally done through /etc/ttys. Do only override # if you're sure that you'll never log in via telnet or xterm or a # serial line. # TERM=xterm; export TERM -BLOCKSIZE=K; export BLOCKSIZE EDITOR=vi; export EDITOR PAGER=more; export PAGER From owner-svn-src-stable@FreeBSD.ORG Wed May 14 15:24:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0419554; Wed, 14 May 2014 15:24:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D0432ABF; Wed, 14 May 2014 15:24:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EFOPUr091971; Wed, 14 May 2014 15:24:25 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EFOPIm091970; Wed, 14 May 2014 15:24:25 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201405141524.s4EFOPIm091970@svn.freebsd.org> From: Bryan Drewery Date: Wed, 14 May 2014 15:24:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266030 - stable/10/usr.bin/sort X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 15:24:25 -0000 Author: bdrewery Date: Wed May 14 15:24:25 2014 New Revision: 266030 URL: http://svnweb.freebsd.org/changeset/base/266030 Log: MFC r264918: Fix spelling error. Modified: stable/10/usr.bin/sort/sort.1.in Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/sort/sort.1.in ============================================================================== --- stable/10/usr.bin/sort/sort.1.in Wed May 14 15:23:06 2014 (r266029) +++ stable/10/usr.bin/sort/sort.1.in Wed May 14 15:24:25 2014 (r266030) @@ -147,7 +147,7 @@ specifications, they apply globally to a When attached to a specific key (see .Fl k ) , the ordering options override all global ordering options for -the key they are attahced to. +the key they are attached to. .Bl -tag -width indent .It Fl b, Fl Fl ignore-leading-blanks Ignore leading blank characters when comparing lines. From owner-svn-src-stable@FreeBSD.ORG Wed May 14 15:30:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19313D44; Wed, 14 May 2014 15:30:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05D682B34; Wed, 14 May 2014 15:30:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EFUnQs094309; Wed, 14 May 2014 15:30:49 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EFUnQ1094308; Wed, 14 May 2014 15:30:49 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201405141530.s4EFUnQ1094308@svn.freebsd.org> From: Bryan Drewery Date: Wed, 14 May 2014 15:30:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266031 - stable/10/sys/geom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 15:30:50 -0000 Author: bdrewery Date: Wed May 14 15:30:49 2014 New Revision: 266031 URL: http://svnweb.freebsd.org/changeset/base/266031 Log: MFC r264499: Make g_access() KASSERT() more useful. Modified: stable/10/sys/geom/geom_subr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/geom_subr.c ============================================================================== --- stable/10/sys/geom/geom_subr.c Wed May 14 15:24:25 2014 (r266030) +++ stable/10/sys/geom/geom_subr.c Wed May 14 15:30:49 2014 (r266031) @@ -912,8 +912,9 @@ g_access(struct g_consumer *cp, int dcr, error = pp->geom->access(pp, dcr, dcw, dce); KASSERT(dcr > 0 || dcw > 0 || dce > 0 || error == 0, - ("Geom provider %s::%s failed closing ->access()", - pp->geom->class->name, pp->name)); + ("Geom provider %s::%s dcr=%d dcw=%d dce=%d error=%d failed " + "closing ->access()", pp->geom->class->name, pp->name, dcr, dcw, + dce, error)); if (!error) { /* * If we open first write, spoil any partner consumers. From owner-svn-src-stable@FreeBSD.ORG Wed May 14 15:32:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C82BF26A; Wed, 14 May 2014 15:32:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B4F922BB2; Wed, 14 May 2014 15:32:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EFWoKD096900; Wed, 14 May 2014 15:32:50 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EFWoNX096899; Wed, 14 May 2014 15:32:50 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201405141532.s4EFWoNX096899@svn.freebsd.org> From: Bryan Drewery Date: Wed, 14 May 2014 15:32:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266034 - stable/9/sys/geom X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 15:32:50 -0000 Author: bdrewery Date: Wed May 14 15:32:50 2014 New Revision: 266034 URL: http://svnweb.freebsd.org/changeset/base/266034 Log: MFC r264499: Make g_access() KASSERT() more useful. Modified: stable/9/sys/geom/geom_subr.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/geom_subr.c ============================================================================== --- stable/9/sys/geom/geom_subr.c Wed May 14 15:31:18 2014 (r266033) +++ stable/9/sys/geom/geom_subr.c Wed May 14 15:32:50 2014 (r266034) @@ -835,8 +835,9 @@ g_access(struct g_consumer *cp, int dcr, error = pp->geom->access(pp, dcr, dcw, dce); KASSERT(dcr > 0 || dcw > 0 || dce > 0 || error == 0, - ("Geom provider %s::%s failed closing ->access()", - pp->geom->class->name, pp->name)); + ("Geom provider %s::%s dcr=%d dcw=%d dce=%d error=%d failed " + "closing ->access()", pp->geom->class->name, pp->name, dcr, dcw, + dce, error)); if (!error) { /* * If we open first write, spoil any partner consumers. From owner-svn-src-stable@FreeBSD.ORG Wed May 14 15:33:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55FCB3B6; Wed, 14 May 2014 15:33:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42BFE2BC1; Wed, 14 May 2014 15:33:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EFXqCm097124; Wed, 14 May 2014 15:33:52 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EFXqh7097123; Wed, 14 May 2014 15:33:52 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201405141533.s4EFXqh7097123@svn.freebsd.org> From: Bryan Drewery Date: Wed, 14 May 2014 15:33:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r266035 - stable/8/sys/geom X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 15:33:52 -0000 Author: bdrewery Date: Wed May 14 15:33:51 2014 New Revision: 266035 URL: http://svnweb.freebsd.org/changeset/base/266035 Log: MFC r264499: Make g_access() KASSERT() more useful. Modified: stable/8/sys/geom/geom_subr.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/geom/ (props changed) Modified: stable/8/sys/geom/geom_subr.c ============================================================================== --- stable/8/sys/geom/geom_subr.c Wed May 14 15:32:50 2014 (r266034) +++ stable/8/sys/geom/geom_subr.c Wed May 14 15:33:51 2014 (r266035) @@ -829,8 +829,9 @@ g_access(struct g_consumer *cp, int dcr, error = pp->geom->access(pp, dcr, dcw, dce); KASSERT(dcr > 0 || dcw > 0 || dce > 0 || error == 0, - ("Geom provider %s::%s failed closing ->access()", - pp->geom->class->name, pp->name)); + ("Geom provider %s::%s dcr=%d dcw=%d dce=%d error=%d failed " + "closing ->access()", pp->geom->class->name, pp->name, dcr, dcw, + dce, error)); if (!error) { /* * If we open first write, spoil any partner consumers. From owner-svn-src-stable@FreeBSD.ORG Wed May 14 15:35:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55C0E4F2; Wed, 14 May 2014 15:35:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41FC12BCD; Wed, 14 May 2014 15:35:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EFZ2ta097351; Wed, 14 May 2014 15:35:02 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EFZ2wm097350; Wed, 14 May 2014 15:35:02 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201405141535.s4EFZ2wm097350@svn.freebsd.org> From: Bryan Drewery Date: Wed, 14 May 2014 15:35:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266036 - stable/10/sys/geom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 15:35:02 -0000 Author: bdrewery Date: Wed May 14 15:35:01 2014 New Revision: 266036 URL: http://svnweb.freebsd.org/changeset/base/266036 Log: MFC r265072: Remove redundant include Modified: stable/10/sys/geom/geom_disk.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/geom_disk.c ============================================================================== --- stable/10/sys/geom/geom_disk.c Wed May 14 15:33:51 2014 (r266035) +++ stable/10/sys/geom/geom_disk.c Wed May 14 15:35:01 2014 (r266036) @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include From owner-svn-src-stable@FreeBSD.ORG Wed May 14 15:35:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4E75620; Wed, 14 May 2014 15:35:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A1B9F2BD3; Wed, 14 May 2014 15:35:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EFZpQe097482; Wed, 14 May 2014 15:35:51 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EFZpdh097481; Wed, 14 May 2014 15:35:51 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201405141535.s4EFZpdh097481@svn.freebsd.org> From: Bryan Drewery Date: Wed, 14 May 2014 15:35:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266037 - stable/9/sys/geom X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 15:35:51 -0000 Author: bdrewery Date: Wed May 14 15:35:51 2014 New Revision: 266037 URL: http://svnweb.freebsd.org/changeset/base/266037 Log: MFC r265072: Remove redundant include Modified: stable/9/sys/geom/geom_disk.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/geom_disk.c ============================================================================== --- stable/9/sys/geom/geom_disk.c Wed May 14 15:35:01 2014 (r266036) +++ stable/9/sys/geom/geom_disk.c Wed May 14 15:35:51 2014 (r266037) @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include From owner-svn-src-stable@FreeBSD.ORG Wed May 14 15:36:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 45653755; Wed, 14 May 2014 15:36:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 322A32BDB; Wed, 14 May 2014 15:36:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EFaOTH097615; Wed, 14 May 2014 15:36:24 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EFaOU8097614; Wed, 14 May 2014 15:36:24 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201405141536.s4EFaOU8097614@svn.freebsd.org> From: Bryan Drewery Date: Wed, 14 May 2014 15:36:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r266038 - stable/8/sys/geom X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 15:36:24 -0000 Author: bdrewery Date: Wed May 14 15:36:23 2014 New Revision: 266038 URL: http://svnweb.freebsd.org/changeset/base/266038 Log: MFC r265072: Remove redundant include Modified: stable/8/sys/geom/geom_disk.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/geom/ (props changed) Modified: stable/8/sys/geom/geom_disk.c ============================================================================== --- stable/8/sys/geom/geom_disk.c Wed May 14 15:35:51 2014 (r266037) +++ stable/8/sys/geom/geom_disk.c Wed May 14 15:36:23 2014 (r266038) @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include From owner-svn-src-stable@FreeBSD.ORG Wed May 14 15:52:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1F5D6ECE; Wed, 14 May 2014 15:52:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C0752D90; Wed, 14 May 2014 15:52:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EFqQjR005825; Wed, 14 May 2014 15:52:26 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EFqQF7005824; Wed, 14 May 2014 15:52:26 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201405141552.s4EFqQF7005824@svn.freebsd.org> From: Marius Strobl Date: Wed, 14 May 2014 15:52:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266040 - stable/9/sbin/gvinum X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 15:52:27 -0000 Author: marius Date: Wed May 14 15:52:26 2014 New Revision: 266040 URL: http://svnweb.freebsd.org/changeset/base/266040 Log: MFC: r256561 Prevent an unlikely, but real double free issue in gvinum(8). Coverity ID: 1018965 Modified: stable/9/sbin/gvinum/gvinum.c Directory Properties: stable/9/sbin/gvinum/ (props changed) Modified: stable/9/sbin/gvinum/gvinum.c ============================================================================== --- stable/9/sbin/gvinum/gvinum.c Wed May 14 15:46:07 2014 (r266039) +++ stable/9/sbin/gvinum/gvinum.c Wed May 14 15:52:26 2014 (r266040) @@ -421,6 +421,7 @@ create_drive(char *device) const char *errstr; char *drivename, *dname; int drives, i, flags, volumes, subdisks, plexes; + int found = 0; flags = plexes = subdisks = volumes = 0; drives = 1; @@ -448,10 +449,8 @@ create_drive(char *device) errstr = gctl_issue(req); if (errstr != NULL) { warnx("error creating drive: %s", errstr); - gctl_free(req); - return (NULL); + drivename = NULL; } else { - gctl_free(req); /* XXX: This is needed because we have to make sure the drives * are created before we return. */ /* Loop until it's in the config. */ @@ -461,14 +460,18 @@ create_drive(char *device) /* If we got a different name, quit. */ if (dname == NULL) continue; - if (strcmp(dname, drivename)) { - free(dname); - return (drivename); - } + if (strcmp(dname, drivename)) + found = 1; free(dname); dname = NULL; + if (found) + break; usleep(100000); /* Sleep for 0.1s */ } + if (found == 0) { + warnx("error creating drive"); + drivename = NULL; + } } gctl_free(req); return (drivename); From owner-svn-src-stable@FreeBSD.ORG Wed May 14 15:52:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 47E66B6; Wed, 14 May 2014 15:52:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33CBC2D93; Wed, 14 May 2014 15:52:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EFqbFN005877; Wed, 14 May 2014 15:52:37 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EFqbwc005876; Wed, 14 May 2014 15:52:37 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201405141552.s4EFqbwc005876@svn.freebsd.org> From: Marius Strobl Date: Wed, 14 May 2014 15:52:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r266041 - stable/8/sbin/gvinum X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 15:52:37 -0000 Author: marius Date: Wed May 14 15:52:36 2014 New Revision: 266041 URL: http://svnweb.freebsd.org/changeset/base/266041 Log: MFC: r256561 Prevent an unlikely, but real double free issue in gvinum(8). Coverity ID: 1018965 Modified: stable/8/sbin/gvinum/gvinum.c Directory Properties: stable/8/sbin/gvinum/ (props changed) Modified: stable/8/sbin/gvinum/gvinum.c ============================================================================== --- stable/8/sbin/gvinum/gvinum.c Wed May 14 15:52:26 2014 (r266040) +++ stable/8/sbin/gvinum/gvinum.c Wed May 14 15:52:36 2014 (r266041) @@ -421,6 +421,7 @@ create_drive(char *device) const char *errstr; char *drivename, *dname; int drives, i, flags, volumes, subdisks, plexes; + int found = 0; flags = plexes = subdisks = volumes = 0; drives = 1; @@ -448,10 +449,8 @@ create_drive(char *device) errstr = gctl_issue(req); if (errstr != NULL) { warnx("error creating drive: %s", errstr); - gctl_free(req); - return (NULL); + drivename = NULL; } else { - gctl_free(req); /* XXX: This is needed because we have to make sure the drives * are created before we return. */ /* Loop until it's in the config. */ @@ -461,14 +460,18 @@ create_drive(char *device) /* If we got a different name, quit. */ if (dname == NULL) continue; - if (strcmp(dname, drivename)) { - free(dname); - return (drivename); - } + if (strcmp(dname, drivename)) + found = 1; free(dname); dname = NULL; + if (found) + break; usleep(100000); /* Sleep for 0.1s */ } + if (found == 0) { + warnx("error creating drive"); + drivename = NULL; + } } gctl_free(req); return (drivename); From owner-svn-src-stable@FreeBSD.ORG Wed May 14 16:16:23 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9FEAB5C8; Wed, 14 May 2014 16:16:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C6D22F7A; Wed, 14 May 2014 16:16:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EGGNMJ015738; Wed, 14 May 2014 16:16:23 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EGGNot015737; Wed, 14 May 2014 16:16:23 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201405141616.s4EGGNot015737@svn.freebsd.org> From: Marius Strobl Date: Wed, 14 May 2014 16:16:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266042 - stable/10/sbin/gvinum X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 16:16:23 -0000 Author: marius Date: Wed May 14 16:16:23 2014 New Revision: 266042 URL: http://svnweb.freebsd.org/changeset/base/266042 Log: MFC: r256561 Prevent an unlikely, but real double free issue in gvinum(8). Coverity ID: 1018965 Modified: stable/10/sbin/gvinum/gvinum.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/gvinum/gvinum.c ============================================================================== --- stable/10/sbin/gvinum/gvinum.c Wed May 14 15:52:36 2014 (r266041) +++ stable/10/sbin/gvinum/gvinum.c Wed May 14 16:16:23 2014 (r266042) @@ -423,6 +423,7 @@ create_drive(char *device) const char *errstr; char *drivename, *dname; int drives, i, flags, volumes, subdisks, plexes; + int found = 0; flags = plexes = subdisks = volumes = 0; drives = 1; @@ -450,10 +451,8 @@ create_drive(char *device) errstr = gctl_issue(req); if (errstr != NULL) { warnx("error creating drive: %s", errstr); - gctl_free(req); - return (NULL); + drivename = NULL; } else { - gctl_free(req); /* XXX: This is needed because we have to make sure the drives * are created before we return. */ /* Loop until it's in the config. */ @@ -463,14 +462,18 @@ create_drive(char *device) /* If we got a different name, quit. */ if (dname == NULL) continue; - if (strcmp(dname, drivename)) { - free(dname); - return (drivename); - } + if (strcmp(dname, drivename)) + found = 1; free(dname); dname = NULL; + if (found) + break; usleep(100000); /* Sleep for 0.1s */ } + if (found == 0) { + warnx("error creating drive"); + drivename = NULL; + } } gctl_free(req); return (drivename); From owner-svn-src-stable@FreeBSD.ORG Wed May 14 16:18:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A312E738; Wed, 14 May 2014 16:18:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E77C2F8E; Wed, 14 May 2014 16:18:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EGI8bs016008; Wed, 14 May 2014 16:18:08 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EGI86k016007; Wed, 14 May 2014 16:18:08 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201405141618.s4EGI86k016007@svn.freebsd.org> From: Marius Strobl Date: Wed, 14 May 2014 16:18:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266043 - stable/10/sbin/gvinum X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 16:18:08 -0000 Author: marius Date: Wed May 14 16:18:08 2014 New Revision: 266043 URL: http://svnweb.freebsd.org/changeset/base/266043 Log: MFC: r265535 - Sprinkle const and static as appropriate. - Fix whitespace bugs. - Remove pointless returns in void functions. - Nuke pointless switch cases mirroring the default. Sponsored by: Bally Wulff Games & Entertainment GmbH Modified: stable/10/sbin/gvinum/gvinum.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/gvinum/gvinum.c ============================================================================== --- stable/10/sbin/gvinum/gvinum.c Wed May 14 16:16:23 2014 (r266042) +++ stable/10/sbin/gvinum/gvinum.c Wed May 14 16:18:08 2014 (r266043) @@ -58,35 +58,36 @@ #include "gvinum.h" -void gvinum_attach(int, char **); -void gvinum_concat(int, char **); -void gvinum_create(int, char **); -void gvinum_detach(int, char **); -void gvinum_grow(int, char **); -void gvinum_help(void); -void gvinum_list(int, char **); -void gvinum_move(int, char **); -void gvinum_mirror(int, char **); -void gvinum_parityop(int, char **, int); -void gvinum_printconfig(int, char **); -void gvinum_raid5(int, char **); -void gvinum_rename(int, char **); -void gvinum_resetconfig(int, char **); -void gvinum_rm(int, char **); -void gvinum_saveconfig(void); -void gvinum_setstate(int, char **); -void gvinum_start(int, char **); -void gvinum_stop(int, char **); -void gvinum_stripe(int, char **); -void parseline(int, char **); -void printconfig(FILE *, char *); - -char *create_drive(char *); -void create_volume(int, char **, char *); -char *find_name(const char *, int, int); -char *find_pattern(char *, char *); -void copy_device(struct gv_drive *, const char *); -#define find_drive() find_name("gvinumdrive", GV_TYPE_DRIVE, GV_MAXDRIVENAME) +static void gvinum_attach(int, char * const *); +static void gvinum_concat(int, char * const *); +static void gvinum_create(int, char * const *); +static void gvinum_detach(int, char * const *); +static void gvinum_grow(int, char * const *); +static void gvinum_help(void); +static void gvinum_list(int, char * const *); +static void gvinum_move(int, char * const *); +static void gvinum_mirror(int, char * const *); +static void gvinum_parityop(int, char * const * , int); +static void gvinum_printconfig(int, char * const *); +static void gvinum_raid5(int, char * const *); +static void gvinum_rename(int, char * const *); +static void gvinum_resetconfig(int, char * const *); +static void gvinum_rm(int, char * const *); +static void gvinum_saveconfig(void); +static void gvinum_setstate(int, char * const *); +static void gvinum_start(int, char * const *); +static void gvinum_stop(int, char * const *); +static void gvinum_stripe(int, char * const *); +static void parseline(int, char * const *); +static void printconfig(FILE *, const char *); + +static char *create_drive(const char *); +static void create_volume(int, char * const * , const char *); +static char *find_name(const char *, int, int); +static const char *find_pattern(char *, const char *); +static void copy_device(struct gv_drive *, const char *); +#define find_drive() \ + find_name("gvinumdrive", GV_TYPE_DRIVE, GV_MAXDRIVENAME) int main(int argc, char **argv) @@ -132,8 +133,8 @@ main(int argc, char **argv) } /* Attach a plex to a volume or a subdisk to a plex. */ -void -gvinum_attach(int argc, char **argv) +static void +gvinum_attach(int argc, char * const *argv) { struct gctl_req *req; const char *errstr; @@ -169,8 +170,8 @@ gvinum_attach(int argc, char **argv) gctl_free(req); } -void -gvinum_create(int argc, char **argv) +static void +gvinum_create(int argc, char * const *argv) { struct gctl_req *req; struct gv_drive *d; @@ -402,8 +403,8 @@ gvinum_create(int argc, char **argv) } /* Create a concatenated volume. */ -void -gvinum_concat(int argc, char **argv) +static void +gvinum_concat(int argc, char * const *argv) { if (argc < 2) { @@ -413,10 +414,9 @@ gvinum_concat(int argc, char **argv) create_volume(argc, argv, "concat"); } - /* Create a drive quick and dirty. */ -char * -create_drive(char *device) +static char * +create_drive(const char *device) { struct gv_drive *d; struct gctl_req *req; @@ -479,12 +479,12 @@ create_drive(char *device) return (drivename); } -/* +/* * General routine for creating a volume. Mainly for use by concat, mirror, * raid5 and stripe commands. */ -void -create_volume(int argc, char **argv, char *verb) +static void +create_volume(int argc, char * const *argv, const char *verb) { struct gctl_req *req; const char *errstr; @@ -518,7 +518,7 @@ create_volume(int argc, char **argv, cha snprintf(buf, sizeof(buf), "drive%d", drives++); /* First we create the drive. */ - drivename = create_drive(argv[i]); + drivename = create_drive(argv[i]); if (drivename == NULL) goto bad; /* Then we add it to the request. */ @@ -534,7 +534,7 @@ create_volume(int argc, char **argv, cha /* Then we send a request to actually create the volumes. */ gctl_ro_param(req, "verb", -1, verb); - gctl_ro_param(req, "flags", sizeof(int), &flags); + gctl_ro_param(req, "flags", sizeof(int), &flags); gctl_ro_param(req, "drives", sizeof(int), &drives); gctl_ro_param(req, "name", -1, volname); errstr = gctl_issue(req); @@ -545,8 +545,8 @@ bad: } /* Parse a line of the config, return the word after . */ -char * -find_pattern(char *line, char *pattern) +static const char * +find_pattern(char *line, const char *pattern) { char *ptr; @@ -563,12 +563,12 @@ find_pattern(char *line, char *pattern) } /* Find a free name for an object given a prefix. */ -char * +static char * find_name(const char *prefix, int type, int namelen) { struct gctl_req *req; - char comment[1], buf[GV_CFG_LEN - 1], *name, *sname, *ptr; - const char *errstr; + char comment[1], buf[GV_CFG_LEN - 1], *sname, *ptr; + const char *errstr, *name; int i, n, begin, len, conflict; char line[1024]; @@ -633,9 +633,10 @@ find_name(const char *prefix, int type, return (NULL); } -void +static void copy_device(struct gv_drive *d, const char *device) { + if (strncmp(device, "/dev/", 5) == 0) strlcpy(d->device, (device + 5), sizeof(d->device)); else @@ -643,8 +644,8 @@ copy_device(struct gv_drive *d, const ch } /* Detach a plex or subdisk from its parent. */ -void -gvinum_detach(int argc, char **argv) +static void +gvinum_detach(int argc, char * const *argv) { const char *errstr; struct gctl_req *req; @@ -654,7 +655,7 @@ gvinum_detach(int argc, char **argv) optreset = 1; optind = 1; while ((i = getopt(argc, argv, "f")) != -1) { - switch(i) { + switch (i) { case 'f': flags |= GV_FLAG_F; break; @@ -682,9 +683,10 @@ gvinum_detach(int argc, char **argv) gctl_free(req); } -void +static void gvinum_help(void) { + printf("COMMANDS\n" "checkparity [-f] plex\n" " Check the parity blocks of a RAID-5 plex.\n" @@ -739,12 +741,10 @@ gvinum_help(void) "stripe [-fv] [-n name] drives\n" " Create a striped volume from the specified drives.\n" ); - - return; } -void -gvinum_setstate(int argc, char **argv) +static void +gvinum_setstate(int argc, char * const *argv) { struct gctl_req *req; int flags, i; @@ -798,8 +798,8 @@ gvinum_setstate(int argc, char **argv) gctl_free(req); } -void -gvinum_list(int argc, char **argv) +static void +gvinum_list(int argc, char * const *argv) { struct gctl_req *req; int flags, i, j; @@ -860,12 +860,11 @@ gvinum_list(int argc, char **argv) printf("%s", config); gctl_free(req); - return; } /* Create a mirrored volume. */ -void -gvinum_mirror(int argc, char **argv) +static void +gvinum_mirror(int argc, char * const *argv) { if (argc < 2) { @@ -876,8 +875,8 @@ gvinum_mirror(int argc, char **argv) } /* Note that move is currently of form '[-r] target object [...]' */ -void -gvinum_move(int argc, char **argv) +static void +gvinum_move(int argc, char * const *argv) { struct gctl_req *req; const char *errstr; @@ -927,17 +926,17 @@ gvinum_move(int argc, char **argv) if (errstr != NULL) warnx("can't move object(s): %s", errstr); gctl_free(req); - return; } -void -gvinum_printconfig(int argc, char **argv) +static void +gvinum_printconfig(int argc, char * const *argv) { + printconfig(stdout, ""); } -void -gvinum_parityop(int argc, char **argv, int rebuild) +static void +gvinum_parityop(int argc, char * const *argv, int rebuild) { struct gctl_req *req; int flags, i; @@ -961,7 +960,6 @@ gvinum_parityop(int argc, char **argv, i case 'v': flags |= GV_FLAG_V; break; - case '?': default: warnx("invalid flag '%c'", i); return; @@ -989,8 +987,8 @@ gvinum_parityop(int argc, char **argv, i } /* Create a RAID-5 volume. */ -void -gvinum_raid5(int argc, char **argv) +static void +gvinum_raid5(int argc, char * const *argv) { if (argc < 2) { @@ -1000,9 +998,8 @@ gvinum_raid5(int argc, char **argv) create_volume(argc, argv, "raid5"); } - -void -gvinum_rename(int argc, char **argv) +static void +gvinum_rename(int argc, char * const *argv) { struct gctl_req *req; const char *errstr; @@ -1018,7 +1015,6 @@ gvinum_rename(int argc, char **argv) case 'r': flags |= GV_FLAG_R; break; - case '?': default: return; } @@ -1051,11 +1047,10 @@ gvinum_rename(int argc, char **argv) if (errstr != NULL) warnx("can't rename object: %s", errstr); gctl_free(req); - return; } -void -gvinum_rm(int argc, char **argv) +static void +gvinum_rm(int argc, char * const *argv) { struct gctl_req *req; int flags, i, j; @@ -1073,7 +1068,6 @@ gvinum_rm(int argc, char **argv) case 'r': flags |= GV_FLAG_R; break; - case '?': default: return; } @@ -1101,8 +1095,8 @@ gvinum_rm(int argc, char **argv) gctl_free(req); } -void -gvinum_resetconfig(int argc, char **argv) +static void +gvinum_resetconfig(int argc, char * const *argv) { struct gctl_req *req; const char *errstr; @@ -1150,7 +1144,7 @@ gvinum_resetconfig(int argc, char **argv printf("gvinum configuration obliterated\n"); } -void +static void gvinum_saveconfig(void) { struct gctl_req *req; @@ -1165,8 +1159,8 @@ gvinum_saveconfig(void) gctl_free(req); } -void -gvinum_start(int argc, char **argv) +static void +gvinum_start(int argc, char * const *argv) { struct gctl_req *req; int i, initsize, j; @@ -1186,7 +1180,6 @@ gvinum_start(int argc, char **argv) case 'S': initsize = atoi(optarg); break; - case '?': default: return; } @@ -1218,8 +1211,8 @@ gvinum_start(int argc, char **argv) gctl_free(req); } -void -gvinum_stop(int argc, char **argv) +static void +gvinum_stop(int argc, char * const *argv) { int err, fileid; @@ -1253,8 +1246,8 @@ gvinum_stop(int argc, char **argv) } /* Create a striped volume. */ -void -gvinum_stripe(int argc, char **argv) +static void +gvinum_stripe(int argc, char * const *argv) { if (argc < 2) { @@ -1265,8 +1258,8 @@ gvinum_stripe(int argc, char **argv) } /* Grow a subdisk by adding disk backed by provider. */ -void -gvinum_grow(int argc, char **argv) +static void +gvinum_grow(int argc, char * const *argv) { struct gctl_req *req; char *drive, *sdname; @@ -1344,9 +1337,10 @@ gvinum_grow(int argc, char **argv) gctl_free(req); } -void -parseline(int argc, char **argv) +static void +parseline(int argc, char * const *argv) { + if (argc <= 0) return; @@ -1406,8 +1400,6 @@ parseline(int argc, char **argv) gvinum_parityop(argc, argv, 1); else printf("unknown command '%s'\n", argv[0]); - - return; } /* @@ -1415,8 +1407,8 @@ parseline(int argc, char **argv) * gvinum_create when called without an argument, in order to give the user * something to edit. */ -void -printconfig(FILE *of, char *comment) +static void +printconfig(FILE *of, const char *comment) { struct gctl_req *req; struct utsname uname_s; From owner-svn-src-stable@FreeBSD.ORG Wed May 14 16:18:20 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4AECB867; Wed, 14 May 2014 16:18:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 36CD22F95; Wed, 14 May 2014 16:18:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EGIKjn016077; Wed, 14 May 2014 16:18:20 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EGIK9W016076; Wed, 14 May 2014 16:18:20 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201405141618.s4EGIK9W016076@svn.freebsd.org> From: Marius Strobl Date: Wed, 14 May 2014 16:18:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266044 - stable/9/sbin/gvinum X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 16:18:20 -0000 Author: marius Date: Wed May 14 16:18:19 2014 New Revision: 266044 URL: http://svnweb.freebsd.org/changeset/base/266044 Log: MFC: r265535 - Sprinkle const and static as appropriate. - Fix whitespace bugs. - Remove pointless returns in void functions. - Nuke pointless switch cases mirroring the default. Sponsored by: Bally Wulff Games & Entertainment GmbH Modified: stable/9/sbin/gvinum/gvinum.c Directory Properties: stable/9/sbin/gvinum/ (props changed) Modified: stable/9/sbin/gvinum/gvinum.c ============================================================================== --- stable/9/sbin/gvinum/gvinum.c Wed May 14 16:18:08 2014 (r266043) +++ stable/9/sbin/gvinum/gvinum.c Wed May 14 16:18:19 2014 (r266044) @@ -58,35 +58,36 @@ #include "gvinum.h" -void gvinum_attach(int, char **); -void gvinum_concat(int, char **); -void gvinum_create(int, char **); -void gvinum_detach(int, char **); -void gvinum_grow(int, char **); -void gvinum_help(void); -void gvinum_list(int, char **); -void gvinum_move(int, char **); -void gvinum_mirror(int, char **); -void gvinum_parityop(int, char **, int); -void gvinum_printconfig(int, char **); -void gvinum_raid5(int, char **); -void gvinum_rename(int, char **); -void gvinum_resetconfig(int, char **); -void gvinum_rm(int, char **); -void gvinum_saveconfig(void); -void gvinum_setstate(int, char **); -void gvinum_start(int, char **); -void gvinum_stop(int, char **); -void gvinum_stripe(int, char **); -void parseline(int, char **); -void printconfig(FILE *, char *); - -char *create_drive(char *); -void create_volume(int, char **, char *); -char *find_name(const char *, int, int); -char *find_pattern(char *, char *); -void copy_device(struct gv_drive *, const char *); -#define find_drive() find_name("gvinumdrive", GV_TYPE_DRIVE, GV_MAXDRIVENAME) +static void gvinum_attach(int, char * const *); +static void gvinum_concat(int, char * const *); +static void gvinum_create(int, char * const *); +static void gvinum_detach(int, char * const *); +static void gvinum_grow(int, char * const *); +static void gvinum_help(void); +static void gvinum_list(int, char * const *); +static void gvinum_move(int, char * const *); +static void gvinum_mirror(int, char * const *); +static void gvinum_parityop(int, char * const * , int); +static void gvinum_printconfig(int, char * const *); +static void gvinum_raid5(int, char * const *); +static void gvinum_rename(int, char * const *); +static void gvinum_resetconfig(int, char * const *); +static void gvinum_rm(int, char * const *); +static void gvinum_saveconfig(void); +static void gvinum_setstate(int, char * const *); +static void gvinum_start(int, char * const *); +static void gvinum_stop(int, char * const *); +static void gvinum_stripe(int, char * const *); +static void parseline(int, char * const *); +static void printconfig(FILE *, const char *); + +static char *create_drive(const char *); +static void create_volume(int, char * const * , const char *); +static char *find_name(const char *, int, int); +static const char *find_pattern(char *, const char *); +static void copy_device(struct gv_drive *, const char *); +#define find_drive() \ + find_name("gvinumdrive", GV_TYPE_DRIVE, GV_MAXDRIVENAME) int main(int argc, char **argv) @@ -130,8 +131,8 @@ main(int argc, char **argv) } /* Attach a plex to a volume or a subdisk to a plex. */ -void -gvinum_attach(int argc, char **argv) +static void +gvinum_attach(int argc, char * const *argv) { struct gctl_req *req; const char *errstr; @@ -167,8 +168,8 @@ gvinum_attach(int argc, char **argv) gctl_free(req); } -void -gvinum_create(int argc, char **argv) +static void +gvinum_create(int argc, char * const *argv) { struct gctl_req *req; struct gv_drive *d; @@ -400,8 +401,8 @@ gvinum_create(int argc, char **argv) } /* Create a concatenated volume. */ -void -gvinum_concat(int argc, char **argv) +static void +gvinum_concat(int argc, char * const *argv) { if (argc < 2) { @@ -411,10 +412,9 @@ gvinum_concat(int argc, char **argv) create_volume(argc, argv, "concat"); } - /* Create a drive quick and dirty. */ -char * -create_drive(char *device) +static char * +create_drive(const char *device) { struct gv_drive *d; struct gctl_req *req; @@ -477,12 +477,12 @@ create_drive(char *device) return (drivename); } -/* +/* * General routine for creating a volume. Mainly for use by concat, mirror, * raid5 and stripe commands. */ -void -create_volume(int argc, char **argv, char *verb) +static void +create_volume(int argc, char * const *argv, const char *verb) { struct gctl_req *req; const char *errstr; @@ -516,7 +516,7 @@ create_volume(int argc, char **argv, cha snprintf(buf, sizeof(buf), "drive%d", drives++); /* First we create the drive. */ - drivename = create_drive(argv[i]); + drivename = create_drive(argv[i]); if (drivename == NULL) goto bad; /* Then we add it to the request. */ @@ -532,7 +532,7 @@ create_volume(int argc, char **argv, cha /* Then we send a request to actually create the volumes. */ gctl_ro_param(req, "verb", -1, verb); - gctl_ro_param(req, "flags", sizeof(int), &flags); + gctl_ro_param(req, "flags", sizeof(int), &flags); gctl_ro_param(req, "drives", sizeof(int), &drives); gctl_ro_param(req, "name", -1, volname); errstr = gctl_issue(req); @@ -543,8 +543,8 @@ bad: } /* Parse a line of the config, return the word after . */ -char * -find_pattern(char *line, char *pattern) +static const char * +find_pattern(char *line, const char *pattern) { char *ptr; @@ -561,12 +561,12 @@ find_pattern(char *line, char *pattern) } /* Find a free name for an object given a prefix. */ -char * +static char * find_name(const char *prefix, int type, int namelen) { struct gctl_req *req; - char comment[1], buf[GV_CFG_LEN - 1], *name, *sname, *ptr; - const char *errstr; + char comment[1], buf[GV_CFG_LEN - 1], *sname, *ptr; + const char *errstr, *name; int i, n, begin, len, conflict; char line[1024]; @@ -631,9 +631,10 @@ find_name(const char *prefix, int type, return (NULL); } -void +static void copy_device(struct gv_drive *d, const char *device) { + if (strncmp(device, "/dev/", 5) == 0) strlcpy(d->device, (device + 5), sizeof(d->device)); else @@ -641,8 +642,8 @@ copy_device(struct gv_drive *d, const ch } /* Detach a plex or subdisk from its parent. */ -void -gvinum_detach(int argc, char **argv) +static void +gvinum_detach(int argc, char * const *argv) { const char *errstr; struct gctl_req *req; @@ -652,7 +653,7 @@ gvinum_detach(int argc, char **argv) optreset = 1; optind = 1; while ((i = getopt(argc, argv, "f")) != -1) { - switch(i) { + switch (i) { case 'f': flags |= GV_FLAG_F; break; @@ -680,9 +681,10 @@ gvinum_detach(int argc, char **argv) gctl_free(req); } -void +static void gvinum_help(void) { + printf("COMMANDS\n" "checkparity [-f] plex\n" " Check the parity blocks of a RAID-5 plex.\n" @@ -737,12 +739,10 @@ gvinum_help(void) "stripe [-fv] [-n name] drives\n" " Create a striped volume from the specified drives.\n" ); - - return; } -void -gvinum_setstate(int argc, char **argv) +static void +gvinum_setstate(int argc, char * const *argv) { struct gctl_req *req; int flags, i; @@ -796,8 +796,8 @@ gvinum_setstate(int argc, char **argv) gctl_free(req); } -void -gvinum_list(int argc, char **argv) +static void +gvinum_list(int argc, char * const *argv) { struct gctl_req *req; int flags, i, j; @@ -858,12 +858,11 @@ gvinum_list(int argc, char **argv) printf("%s", config); gctl_free(req); - return; } /* Create a mirrored volume. */ -void -gvinum_mirror(int argc, char **argv) +static void +gvinum_mirror(int argc, char * const *argv) { if (argc < 2) { @@ -874,8 +873,8 @@ gvinum_mirror(int argc, char **argv) } /* Note that move is currently of form '[-r] target object [...]' */ -void -gvinum_move(int argc, char **argv) +static void +gvinum_move(int argc, char * const *argv) { struct gctl_req *req; const char *errstr; @@ -925,17 +924,17 @@ gvinum_move(int argc, char **argv) if (errstr != NULL) warnx("can't move object(s): %s", errstr); gctl_free(req); - return; } -void -gvinum_printconfig(int argc, char **argv) +static void +gvinum_printconfig(int argc, char * const *argv) { + printconfig(stdout, ""); } -void -gvinum_parityop(int argc, char **argv, int rebuild) +static void +gvinum_parityop(int argc, char * const *argv, int rebuild) { struct gctl_req *req; int flags, i; @@ -959,7 +958,6 @@ gvinum_parityop(int argc, char **argv, i case 'v': flags |= GV_FLAG_V; break; - case '?': default: warnx("invalid flag '%c'", i); return; @@ -987,8 +985,8 @@ gvinum_parityop(int argc, char **argv, i } /* Create a RAID-5 volume. */ -void -gvinum_raid5(int argc, char **argv) +static void +gvinum_raid5(int argc, char * const *argv) { if (argc < 2) { @@ -998,9 +996,8 @@ gvinum_raid5(int argc, char **argv) create_volume(argc, argv, "raid5"); } - -void -gvinum_rename(int argc, char **argv) +static void +gvinum_rename(int argc, char * const *argv) { struct gctl_req *req; const char *errstr; @@ -1016,7 +1013,6 @@ gvinum_rename(int argc, char **argv) case 'r': flags |= GV_FLAG_R; break; - case '?': default: return; } @@ -1049,11 +1045,10 @@ gvinum_rename(int argc, char **argv) if (errstr != NULL) warnx("can't rename object: %s", errstr); gctl_free(req); - return; } -void -gvinum_rm(int argc, char **argv) +static void +gvinum_rm(int argc, char * const *argv) { struct gctl_req *req; int flags, i, j; @@ -1071,7 +1066,6 @@ gvinum_rm(int argc, char **argv) case 'r': flags |= GV_FLAG_R; break; - case '?': default: return; } @@ -1099,8 +1093,8 @@ gvinum_rm(int argc, char **argv) gctl_free(req); } -void -gvinum_resetconfig(int argc, char **argv) +static void +gvinum_resetconfig(int argc, char * const *argv) { struct gctl_req *req; const char *errstr; @@ -1148,7 +1142,7 @@ gvinum_resetconfig(int argc, char **argv printf("gvinum configuration obliterated\n"); } -void +static void gvinum_saveconfig(void) { struct gctl_req *req; @@ -1163,8 +1157,8 @@ gvinum_saveconfig(void) gctl_free(req); } -void -gvinum_start(int argc, char **argv) +static void +gvinum_start(int argc, char * const *argv) { struct gctl_req *req; int i, initsize, j; @@ -1184,7 +1178,6 @@ gvinum_start(int argc, char **argv) case 'S': initsize = atoi(optarg); break; - case '?': default: return; } @@ -1216,8 +1209,8 @@ gvinum_start(int argc, char **argv) gctl_free(req); } -void -gvinum_stop(int argc, char **argv) +static void +gvinum_stop(int argc, char * const *argv) { int err, fileid; @@ -1250,8 +1243,8 @@ gvinum_stop(int argc, char **argv) } /* Create a striped volume. */ -void -gvinum_stripe(int argc, char **argv) +static void +gvinum_stripe(int argc, char * const *argv) { if (argc < 2) { @@ -1262,8 +1255,8 @@ gvinum_stripe(int argc, char **argv) } /* Grow a subdisk by adding disk backed by provider. */ -void -gvinum_grow(int argc, char **argv) +static void +gvinum_grow(int argc, char * const *argv) { struct gctl_req *req; char *drive, *sdname; @@ -1341,9 +1334,10 @@ gvinum_grow(int argc, char **argv) gctl_free(req); } -void -parseline(int argc, char **argv) +static void +parseline(int argc, char * const *argv) { + if (argc <= 0) return; @@ -1403,8 +1397,6 @@ parseline(int argc, char **argv) gvinum_parityop(argc, argv, 1); else printf("unknown command '%s'\n", argv[0]); - - return; } /* @@ -1412,8 +1404,8 @@ parseline(int argc, char **argv) * gvinum_create when called without an argument, in order to give the user * something to edit. */ -void -printconfig(FILE *of, char *comment) +static void +printconfig(FILE *of, const char *comment) { struct gctl_req *req; struct utsname uname_s; From owner-svn-src-stable@FreeBSD.ORG Wed May 14 16:18:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC113994; Wed, 14 May 2014 16:18:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7E632F97; Wed, 14 May 2014 16:18:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EGIQ2V016131; Wed, 14 May 2014 16:18:26 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EGIQUc016130; Wed, 14 May 2014 16:18:26 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201405141618.s4EGIQUc016130@svn.freebsd.org> From: Marius Strobl Date: Wed, 14 May 2014 16:18:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r266045 - stable/8/sbin/gvinum X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 16:18:26 -0000 Author: marius Date: Wed May 14 16:18:26 2014 New Revision: 266045 URL: http://svnweb.freebsd.org/changeset/base/266045 Log: MFC: r265535 - Sprinkle const and static as appropriate. - Fix whitespace bugs. - Remove pointless returns in void functions. - Nuke pointless switch cases mirroring the default. Sponsored by: Bally Wulff Games & Entertainment GmbH Modified: stable/8/sbin/gvinum/gvinum.c Directory Properties: stable/8/sbin/gvinum/ (props changed) Modified: stable/8/sbin/gvinum/gvinum.c ============================================================================== --- stable/8/sbin/gvinum/gvinum.c Wed May 14 16:18:19 2014 (r266044) +++ stable/8/sbin/gvinum/gvinum.c Wed May 14 16:18:26 2014 (r266045) @@ -58,35 +58,36 @@ #include "gvinum.h" -void gvinum_attach(int, char **); -void gvinum_concat(int, char **); -void gvinum_create(int, char **); -void gvinum_detach(int, char **); -void gvinum_grow(int, char **); -void gvinum_help(void); -void gvinum_list(int, char **); -void gvinum_move(int, char **); -void gvinum_mirror(int, char **); -void gvinum_parityop(int, char **, int); -void gvinum_printconfig(int, char **); -void gvinum_raid5(int, char **); -void gvinum_rename(int, char **); -void gvinum_resetconfig(int, char **); -void gvinum_rm(int, char **); -void gvinum_saveconfig(void); -void gvinum_setstate(int, char **); -void gvinum_start(int, char **); -void gvinum_stop(int, char **); -void gvinum_stripe(int, char **); -void parseline(int, char **); -void printconfig(FILE *, char *); - -char *create_drive(char *); -void create_volume(int, char **, char *); -char *find_name(const char *, int, int); -char *find_pattern(char *, char *); -void copy_device(struct gv_drive *, const char *); -#define find_drive() find_name("gvinumdrive", GV_TYPE_DRIVE, GV_MAXDRIVENAME) +static void gvinum_attach(int, char * const *); +static void gvinum_concat(int, char * const *); +static void gvinum_create(int, char * const *); +static void gvinum_detach(int, char * const *); +static void gvinum_grow(int, char * const *); +static void gvinum_help(void); +static void gvinum_list(int, char * const *); +static void gvinum_move(int, char * const *); +static void gvinum_mirror(int, char * const *); +static void gvinum_parityop(int, char * const * , int); +static void gvinum_printconfig(int, char * const *); +static void gvinum_raid5(int, char * const *); +static void gvinum_rename(int, char * const *); +static void gvinum_resetconfig(int, char * const *); +static void gvinum_rm(int, char * const *); +static void gvinum_saveconfig(void); +static void gvinum_setstate(int, char * const *); +static void gvinum_start(int, char * const *); +static void gvinum_stop(int, char * const *); +static void gvinum_stripe(int, char * const *); +static void parseline(int, char * const *); +static void printconfig(FILE *, const char *); + +static char *create_drive(const char *); +static void create_volume(int, char * const * , const char *); +static char *find_name(const char *, int, int); +static const char *find_pattern(char *, const char *); +static void copy_device(struct gv_drive *, const char *); +#define find_drive() \ + find_name("gvinumdrive", GV_TYPE_DRIVE, GV_MAXDRIVENAME) int main(int argc, char **argv) @@ -130,8 +131,8 @@ main(int argc, char **argv) } /* Attach a plex to a volume or a subdisk to a plex. */ -void -gvinum_attach(int argc, char **argv) +static void +gvinum_attach(int argc, char * const *argv) { struct gctl_req *req; const char *errstr; @@ -167,8 +168,8 @@ gvinum_attach(int argc, char **argv) gctl_free(req); } -void -gvinum_create(int argc, char **argv) +static void +gvinum_create(int argc, char * const *argv) { struct gctl_req *req; struct gv_drive *d; @@ -400,8 +401,8 @@ gvinum_create(int argc, char **argv) } /* Create a concatenated volume. */ -void -gvinum_concat(int argc, char **argv) +static void +gvinum_concat(int argc, char * const *argv) { if (argc < 2) { @@ -411,10 +412,9 @@ gvinum_concat(int argc, char **argv) create_volume(argc, argv, "concat"); } - /* Create a drive quick and dirty. */ -char * -create_drive(char *device) +static char * +create_drive(const char *device) { struct gv_drive *d; struct gctl_req *req; @@ -477,12 +477,12 @@ create_drive(char *device) return (drivename); } -/* +/* * General routine for creating a volume. Mainly for use by concat, mirror, * raid5 and stripe commands. */ -void -create_volume(int argc, char **argv, char *verb) +static void +create_volume(int argc, char * const *argv, const char *verb) { struct gctl_req *req; const char *errstr; @@ -516,7 +516,7 @@ create_volume(int argc, char **argv, cha snprintf(buf, sizeof(buf), "drive%d", drives++); /* First we create the drive. */ - drivename = create_drive(argv[i]); + drivename = create_drive(argv[i]); if (drivename == NULL) goto bad; /* Then we add it to the request. */ @@ -532,7 +532,7 @@ create_volume(int argc, char **argv, cha /* Then we send a request to actually create the volumes. */ gctl_ro_param(req, "verb", -1, verb); - gctl_ro_param(req, "flags", sizeof(int), &flags); + gctl_ro_param(req, "flags", sizeof(int), &flags); gctl_ro_param(req, "drives", sizeof(int), &drives); gctl_ro_param(req, "name", -1, volname); errstr = gctl_issue(req); @@ -543,8 +543,8 @@ bad: } /* Parse a line of the config, return the word after . */ -char * -find_pattern(char *line, char *pattern) +static const char * +find_pattern(char *line, const char *pattern) { char *ptr; @@ -561,12 +561,12 @@ find_pattern(char *line, char *pattern) } /* Find a free name for an object given a prefix. */ -char * +static char * find_name(const char *prefix, int type, int namelen) { struct gctl_req *req; - char comment[1], buf[GV_CFG_LEN - 1], *name, *sname, *ptr; - const char *errstr; + char comment[1], buf[GV_CFG_LEN - 1], *sname, *ptr; + const char *errstr, *name; int i, n, begin, len, conflict; char line[1024]; @@ -631,9 +631,10 @@ find_name(const char *prefix, int type, return (NULL); } -void +static void copy_device(struct gv_drive *d, const char *device) { + if (strncmp(device, "/dev/", 5) == 0) strlcpy(d->device, (device + 5), sizeof(d->device)); else @@ -641,8 +642,8 @@ copy_device(struct gv_drive *d, const ch } /* Detach a plex or subdisk from its parent. */ -void -gvinum_detach(int argc, char **argv) +static void +gvinum_detach(int argc, char * const *argv) { const char *errstr; struct gctl_req *req; @@ -652,7 +653,7 @@ gvinum_detach(int argc, char **argv) optreset = 1; optind = 1; while ((i = getopt(argc, argv, "f")) != -1) { - switch(i) { + switch (i) { case 'f': flags |= GV_FLAG_F; break; @@ -680,9 +681,10 @@ gvinum_detach(int argc, char **argv) gctl_free(req); } -void +static void gvinum_help(void) { + printf("COMMANDS\n" "checkparity [-f] plex\n" " Check the parity blocks of a RAID-5 plex.\n" @@ -737,12 +739,10 @@ gvinum_help(void) "stripe [-fv] [-n name] drives\n" " Create a striped volume from the specified drives.\n" ); - - return; } -void -gvinum_setstate(int argc, char **argv) +static void +gvinum_setstate(int argc, char * const *argv) { struct gctl_req *req; int flags, i; @@ -796,8 +796,8 @@ gvinum_setstate(int argc, char **argv) gctl_free(req); } -void -gvinum_list(int argc, char **argv) +static void +gvinum_list(int argc, char * const *argv) { struct gctl_req *req; int flags, i, j; @@ -858,12 +858,11 @@ gvinum_list(int argc, char **argv) printf("%s", config); gctl_free(req); - return; } /* Create a mirrored volume. */ -void -gvinum_mirror(int argc, char **argv) +static void +gvinum_mirror(int argc, char * const *argv) { if (argc < 2) { @@ -874,8 +873,8 @@ gvinum_mirror(int argc, char **argv) } /* Note that move is currently of form '[-r] target object [...]' */ -void -gvinum_move(int argc, char **argv) +static void +gvinum_move(int argc, char * const *argv) { struct gctl_req *req; const char *errstr; @@ -925,17 +924,17 @@ gvinum_move(int argc, char **argv) if (errstr != NULL) warnx("can't move object(s): %s", errstr); gctl_free(req); - return; } -void -gvinum_printconfig(int argc, char **argv) +static void +gvinum_printconfig(int argc, char * const *argv) { + printconfig(stdout, ""); } -void -gvinum_parityop(int argc, char **argv, int rebuild) +static void +gvinum_parityop(int argc, char * const *argv, int rebuild) { struct gctl_req *req; int flags, i; @@ -959,7 +958,6 @@ gvinum_parityop(int argc, char **argv, i case 'v': flags |= GV_FLAG_V; break; - case '?': default: warnx("invalid flag '%c'", i); return; @@ -987,8 +985,8 @@ gvinum_parityop(int argc, char **argv, i } /* Create a RAID-5 volume. */ -void -gvinum_raid5(int argc, char **argv) +static void +gvinum_raid5(int argc, char * const *argv) { if (argc < 2) { @@ -998,9 +996,8 @@ gvinum_raid5(int argc, char **argv) create_volume(argc, argv, "raid5"); } - -void -gvinum_rename(int argc, char **argv) +static void +gvinum_rename(int argc, char * const *argv) { struct gctl_req *req; const char *errstr; @@ -1016,7 +1013,6 @@ gvinum_rename(int argc, char **argv) case 'r': flags |= GV_FLAG_R; break; - case '?': default: return; } @@ -1049,11 +1045,10 @@ gvinum_rename(int argc, char **argv) if (errstr != NULL) warnx("can't rename object: %s", errstr); gctl_free(req); - return; } -void -gvinum_rm(int argc, char **argv) +static void +gvinum_rm(int argc, char * const *argv) { struct gctl_req *req; int flags, i, j; @@ -1071,7 +1066,6 @@ gvinum_rm(int argc, char **argv) case 'r': flags |= GV_FLAG_R; break; - case '?': default: return; } @@ -1099,8 +1093,8 @@ gvinum_rm(int argc, char **argv) gctl_free(req); } -void -gvinum_resetconfig(int argc, char **argv) +static void +gvinum_resetconfig(int argc, char * const *argv) { struct gctl_req *req; const char *errstr; @@ -1148,7 +1142,7 @@ gvinum_resetconfig(int argc, char **argv printf("gvinum configuration obliterated\n"); } -void +static void gvinum_saveconfig(void) { struct gctl_req *req; @@ -1163,8 +1157,8 @@ gvinum_saveconfig(void) gctl_free(req); } -void -gvinum_start(int argc, char **argv) +static void +gvinum_start(int argc, char * const *argv) { struct gctl_req *req; int i, initsize, j; @@ -1184,7 +1178,6 @@ gvinum_start(int argc, char **argv) case 'S': initsize = atoi(optarg); break; - case '?': default: return; } @@ -1216,8 +1209,8 @@ gvinum_start(int argc, char **argv) gctl_free(req); } -void -gvinum_stop(int argc, char **argv) +static void +gvinum_stop(int argc, char * const *argv) { int err, fileid; @@ -1250,8 +1243,8 @@ gvinum_stop(int argc, char **argv) } /* Create a striped volume. */ -void -gvinum_stripe(int argc, char **argv) +static void +gvinum_stripe(int argc, char * const *argv) { if (argc < 2) { @@ -1262,8 +1255,8 @@ gvinum_stripe(int argc, char **argv) } /* Grow a subdisk by adding disk backed by provider. */ -void -gvinum_grow(int argc, char **argv) +static void +gvinum_grow(int argc, char * const *argv) { struct gctl_req *req; char *drive, *sdname; @@ -1341,9 +1334,10 @@ gvinum_grow(int argc, char **argv) gctl_free(req); } -void -parseline(int argc, char **argv) +static void +parseline(int argc, char * const *argv) { + if (argc <= 0) return; @@ -1403,8 +1397,6 @@ parseline(int argc, char **argv) gvinum_parityop(argc, argv, 1); else printf("unknown command '%s'\n", argv[0]); - - return; } /* @@ -1412,8 +1404,8 @@ parseline(int argc, char **argv) * gvinum_create when called without an argument, in order to give the user * something to edit. */ -void -printconfig(FILE *of, char *comment) +static void +printconfig(FILE *of, const char *comment) { struct gctl_req *req; struct utsname uname_s; From owner-svn-src-stable@FreeBSD.ORG Wed May 14 16:32:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5BCE0E7B; Wed, 14 May 2014 16:32:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4602D2106; Wed, 14 May 2014 16:32:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EGWVIf024269; Wed, 14 May 2014 16:32:31 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EGWR3n024251; Wed, 14 May 2014 16:32:27 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405141632.s4EGWR3n024251@svn.freebsd.org> From: Ian Lepore Date: Wed, 14 May 2014 16:32:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266046 - in stable/10/sys: arm/arm arm/conf arm/include arm/mv arm/mv/armadaxp boot/fdt/dts conf dev/ic dev/mvs dev/uart X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 16:32:31 -0000 Author: ian Date: Wed May 14 16:32:27 2014 New Revision: 266046 URL: http://svnweb.freebsd.org/changeset/base/266046 Log: MFC r257170, r257171, r257172, r257240, r257278, r257279, r257280, r257281, r257282, r257332 Wait for DesignWare UART transfers completion before accessing line control Enable UART busy detection handling for Armada XP - based board Enable SATA interface on Armada XP Run mvs SATA driver on Armada XP instead of old mv_sata Retire arm_remap_nocache() and the data and constants associated with it. Remove hard-coded mappings related to Armada XP support Fix-up DTB for Armada XP registers' base according to the actual settings Change Armada XP kernel load address to the u-boot's end address Remove not working and deprecated PJ4Bv6 support Switch off explicit broadcasting of the TLB flush operations for PJ4B CPU Add missing ARMv6 CPU functions to ARM Makefile Modified: stable/10/sys/arm/arm/cpufunc.c stable/10/sys/arm/arm/cpufunc_asm_pj4b.S stable/10/sys/arm/arm/identcpu.c stable/10/sys/arm/arm/locore.S stable/10/sys/arm/arm/mp_machdep.c stable/10/sys/arm/conf/ARMADAXP stable/10/sys/arm/include/armreg.h stable/10/sys/arm/include/cpufunc.h stable/10/sys/arm/mv/armadaxp/std.armadaxp stable/10/sys/arm/mv/common.c stable/10/sys/arm/mv/mv_machdep.c stable/10/sys/arm/mv/mv_sata.c stable/10/sys/boot/fdt/dts/db78460.dts stable/10/sys/conf/Makefile.arm stable/10/sys/dev/ic/ns16550.h stable/10/sys/dev/mvs/mvs_soc.c stable/10/sys/dev/uart/uart_dev_ns8250.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/cpufunc.c ============================================================================== --- stable/10/sys/arm/arm/cpufunc.c Wed May 14 16:18:26 2014 (r266045) +++ stable/10/sys/arm/arm/cpufunc.c Wed May 14 16:32:27 2014 (r266046) @@ -541,65 +541,6 @@ struct cpu_functions pj4bv7_cpufuncs = { pj4bv7_setup /* cpu setup */ }; - -struct cpu_functions pj4bv6_cpufuncs = { - /* CPU functions */ - - cpufunc_id, /* id */ - arm11_drain_writebuf, /* cpwait */ - - /* MMU functions */ - - cpufunc_control, /* control */ - cpufunc_domains, /* Domain */ - pj4b_setttb, /* Setttb */ - cpufunc_faultstatus, /* Faultstatus */ - cpufunc_faultaddress, /* Faultaddress */ - - /* TLB functions */ - - arm11_tlb_flushID, /* tlb_flushID */ - arm11_tlb_flushID_SE, /* tlb_flushID_SE */ - arm11_tlb_flushI, /* tlb_flushI */ - arm11_tlb_flushI_SE, /* tlb_flushI_SE */ - arm11_tlb_flushD, /* tlb_flushD */ - arm11_tlb_flushD_SE, /* tlb_flushD_SE */ - - /* Cache operations */ - armv6_icache_sync_all, /* icache_sync_all */ - pj4b_icache_sync_range, /* icache_sync_range */ - - armv6_dcache_wbinv_all, /* dcache_wbinv_all */ - pj4b_dcache_wbinv_range, /* dcache_wbinv_range */ - pj4b_dcache_inv_range, /* dcache_inv_range */ - pj4b_dcache_wb_range, /* dcache_wb_range */ - - armv6_idcache_wbinv_all, /* idcache_wbinv_all */ - pj4b_idcache_wbinv_range, /* idcache_wbinv_all */ - - (void *)cpufunc_nullop, /* l2cache_wbinv_all */ - (void *)cpufunc_nullop, /* l2cache_wbinv_range */ - (void *)cpufunc_nullop, /* l2cache_inv_range */ - (void *)cpufunc_nullop, /* l2cache_wb_range */ - - /* Other functions */ - - pj4b_drain_readbuf, /* flush_prefetchbuf */ - arm11_drain_writebuf, /* drain_writebuf */ - pj4b_flush_brnchtgt_all, /* flush_brnchtgt_C */ - pj4b_flush_brnchtgt_va, /* flush_brnchtgt_E */ - - (void *)cpufunc_nullop, /* sleep */ - - /* Soft functions */ - - cpufunc_null_fixup, /* dataabt_fixup */ - cpufunc_null_fixup, /* prefetchabt_fixup */ - - arm11_context_switch, /* context_switch */ - - pj4bv6_setup /* cpu setup */ -}; #endif /* CPU_MV_PJ4B */ #ifdef CPU_SA110 @@ -1496,27 +1437,14 @@ set_cpufuncs() #endif /* CPU_CORTEXA */ #if defined(CPU_MV_PJ4B) - if (cputype == CPU_ID_MV88SV581X_V6 || - cputype == CPU_ID_MV88SV581X_V7 || + if (cputype == CPU_ID_MV88SV581X_V7 || cputype == CPU_ID_MV88SV584X_V7 || - cputype == CPU_ID_ARM_88SV581X_V6 || cputype == CPU_ID_ARM_88SV581X_V7) { - if (cpu_pfr(0) & ARM_PFR0_THUMBEE_MASK) - cpufuncs = pj4bv7_cpufuncs; - else - cpufuncs = pj4bv6_cpufuncs; - - get_cachetype_cp15(); - pmap_pte_init_mmu_v6(); - goto out; - } else if (cputype == CPU_ID_ARM_88SV584X_V6 || - cputype == CPU_ID_MV88SV584X_V6) { - cpufuncs = pj4bv6_cpufuncs; + cpufuncs = pj4bv7_cpufuncs; get_cachetype_cp15(); pmap_pte_init_mmu_v6(); goto out; } - #endif /* CPU_MV_PJ4B */ #ifdef CPU_SA110 if (cputype == CPU_ID_SA110) { @@ -2446,44 +2374,6 @@ arm11x6_setup(char *args) #ifdef CPU_MV_PJ4B void -pj4bv6_setup(char *args) -{ - int cpuctrl; - - pj4b_config(); - - cpuctrl = CPU_CONTROL_MMU_ENABLE; -#ifndef ARM32_DISABLE_ALIGNMENT_FAULTS - cpuctrl |= CPU_CONTROL_AFLT_ENABLE; -#endif - cpuctrl |= CPU_CONTROL_DC_ENABLE; - cpuctrl |= (0xf << 3); -#ifdef __ARMEB__ - cpuctrl |= CPU_CONTROL_BEND_ENABLE; -#endif - cpuctrl |= CPU_CONTROL_SYST_ENABLE; - cpuctrl |= CPU_CONTROL_BPRD_ENABLE; - cpuctrl |= CPU_CONTROL_IC_ENABLE; - if (vector_page == ARM_VECTORS_HIGH) - cpuctrl |= CPU_CONTROL_VECRELOC; - cpuctrl |= (0x5 << 16); - cpuctrl |= CPU_CONTROL_V6_EXTPAGE; - /* XXX not yet */ - /* cpuctrl |= CPU_CONTROL_L2_ENABLE; */ - - /* Make sure caches are clean. */ - cpu_idcache_wbinv_all(); - cpu_l2cache_wbinv_all(); - - /* Set the control register */ - ctrl = cpuctrl; - cpu_control(0xffffffff, cpuctrl); - - cpu_idcache_wbinv_all(); - cpu_l2cache_wbinv_all(); -} - -void pj4bv7_setup(args) char *args; { Modified: stable/10/sys/arm/arm/cpufunc_asm_pj4b.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_pj4b.S Wed May 14 16:18:26 2014 (r266045) +++ stable/10/sys/arm/arm/cpufunc_asm_pj4b.S Wed May 14 16:32:27 2014 (r266046) @@ -34,9 +34,6 @@ __FBSDID("$FreeBSD$"); #include -.Lpj4b_cache_line_size: - .word _C_LABEL(arm_pdcache_line_size) - .Lpj4b_sf_ctrl_reg: .word 0xf1021820 @@ -52,135 +49,6 @@ ENTRY(pj4b_setttb) RET END(pj4b_setttb) -ENTRY_NP(armv6_icache_sync_all) - /* - * We assume that the code here can never be out of sync with the - * dcache, so that we can safely flush the Icache and fall through - * into the Dcache cleaning code. - */ - mov r0, #0 - mcr p15, 0, r0, c7, c5, 0 /* Invalidate ICache */ - mcr p15, 0, r0, c7, c10, 0 /* Clean (don't invalidate) DCache */ - mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ - RET -END(armv6_icache_sync_all) - -ENTRY(pj4b_icache_sync_range) - sub r1, r1, #1 - add r1, r0, r1 - mcrr p15, 0, r1, r0, c5 /* invalidate IC range */ - mcrr p15, 0, r1, r0, c12 /* clean DC range */ - mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ - RET -END(pj4b_icache_sync_range) - -ENTRY(pj4b_dcache_inv_range) - ldr ip, .Lpj4b_cache_line_size - ldr ip, [ip] - sub r1, r1, #1 /* Don't overrun */ - sub r3, ip, #1 - and r2, r0, r3 - add r1, r1, r2 - bic r0, r0, r3 - - mcr p15, 0, r0, c7, c10, 5 /* Data Memory Barrier err:4413 */ -1: - mcr p15, 0, r0, c7, c6, 1 - add r0, r0, ip - subs r1, r1, ip - bpl 1b - mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ - RET -END(pj4b_dcache_inv_range) - -ENTRY(armv6_idcache_wbinv_all) - mov r0, #0 - mcr p15, 0, r0, c7, c5, 0 /* invalidate ICache */ - mcr p15, 0, r0, c7, c14, 0 /* clean and invalidate DCache */ - mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ - RET -END(armv6_idcache_wbinv_all) - -ENTRY(armv6_dcache_wbinv_all) - mov r0, #0 - mcr p15, 0, r0, c7, c14, 0 /* clean and invalidate DCache */ - mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ - RET -END(armv6_dcache_wbinv_all) - -ENTRY(pj4b_idcache_wbinv_range) - ldr ip, .Lpj4b_cache_line_size - ldr ip, [ip] - sub r1, r1, #1 /* Don't overrun */ - sub r3, ip, #1 - and r2, r0, r3 - add r1, r1, r2 - bic r0, r0, r3 - - mcr p15, 0, r0, c7, c10, 5 /* Data Memory Barrier err:4611 */ -1: -#ifdef SMP - /* Request for ownership */ - ldr r2, [r0] - str r2, [r0] -#endif - mcr p15, 0, r0, c7, c5, 1 - mcr p15, 0, r0, c7, c14, 1 /* L2C clean and invalidate entry */ - add r0, r0, ip - subs r1, r1, ip - bpl 1b - mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ - RET -END(pj4b_idcache_wbinv_range) - -ENTRY(pj4b_dcache_wbinv_range) - ldr ip, .Lpj4b_cache_line_size - ldr ip, [ip] - sub r1, r1, #1 /* Don't overrun */ - sub r3, ip, #1 - and r2, r0, r3 - add r1, r1, r2 - bic r0, r0, r3 - - mcr p15, 0, r0, c7, c10, 5 /* Data Memory Barrier err:4611 */ -1: -#ifdef SMP - /* Request for ownership */ - ldr r2, [r0] - str r2, [r0] -#endif - mcr p15, 0, r0, c7, c14, 1 - add r0, r0, ip - subs r1, r1, ip - bpl 1b - mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ - RET -END(pj4b_dcache_wbinv_range) - -ENTRY(pj4b_dcache_wb_range) - ldr ip, .Lpj4b_cache_line_size - ldr ip, [ip] - sub r1, r1, #1 /* Don't overrun */ - sub r3, ip, #1 - and r2, r0, r3 - add r1, r1, r2 - bic r0, r0, r3 - - mcr p15, 0, r0, c7, c10, 5 /* Data Memory Barrier err:4611 */ -1: -#ifdef SMP - /* Request for ownership */ - ldr r2, [r0] - str r2, [r0] -#endif - mcr p15, 0, r0, c7, c10, 1 /* L2C clean single entry by MVA */ - add r0, r0, ip - subs r1, r1, ip - bpl 1b - mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ - RET -END(pj4b_dcache_wb_range) - ENTRY(pj4b_drain_readbuf) mcr p15, 0, r0, c7, c5, 4 /* flush prefetch buffers */ RET Modified: stable/10/sys/arm/arm/identcpu.c ============================================================================== --- stable/10/sys/arm/arm/identcpu.c Wed May 14 16:18:26 2014 (r266045) +++ stable/10/sys/arm/arm/identcpu.c Wed May 14 16:32:27 2014 (r266046) @@ -321,18 +321,10 @@ const struct cpuidtab cpuids[] = { { CPU_ID_MV88FR571_VD, CPU_CLASS_MARVELL, "Feroceon 88FR571-VD", generic_steppings }, - { CPU_ID_MV88SV581X_V6, CPU_CLASS_MARVELL, "Sheeva 88SV581x", - generic_steppings }, - { CPU_ID_ARM_88SV581X_V6, CPU_CLASS_MARVELL, "Sheeva 88SV581x", - generic_steppings }, { CPU_ID_MV88SV581X_V7, CPU_CLASS_MARVELL, "Sheeva 88SV581x", generic_steppings }, { CPU_ID_ARM_88SV581X_V7, CPU_CLASS_MARVELL, "Sheeva 88SV581x", generic_steppings }, - { CPU_ID_MV88SV584X_V6, CPU_CLASS_MARVELL, "Sheeva 88SV584x", - generic_steppings }, - { CPU_ID_ARM_88SV584X_V6, CPU_CLASS_MARVELL, "Sheeva 88SV584x", - generic_steppings }, { CPU_ID_MV88SV584X_V7, CPU_CLASS_MARVELL, "Sheeva 88SV584x", generic_steppings }, Modified: stable/10/sys/arm/arm/locore.S ============================================================================== --- stable/10/sys/arm/arm/locore.S Wed May 14 16:18:26 2014 (r266045) +++ stable/10/sys/arm/arm/locore.S Wed May 14 16:32:27 2014 (r266046) @@ -266,10 +266,6 @@ mmu_init_table: /* map VA 0xc0000000..0xc3ffffff to PA */ MMU_INIT(KERNBASE, PHYSADDR, 64, L1_TYPE_S|L1_SHARED|L1_S_C|L1_S_AP(AP_KRW)) MMU_INIT(0x48000000, 0x48000000, 1, L1_TYPE_S|L1_SHARED|L1_S_C|L1_S_AP(AP_KRW)) -#if defined(CPU_MV_PJ4B) - /* map VA 0xf1000000..0xf1100000 to PA 0xd0000000 */ - MMU_INIT(0xf1000000, 0xd0000000, 1, L1_TYPE_S|L1_SHARED|L1_S_B|L1_S_AP(AP_KRW)) -#endif /* CPU_MV_PJ4B */ #endif /* SMP */ .word 0 /* end of table */ #endif Modified: stable/10/sys/arm/arm/mp_machdep.c ============================================================================== --- stable/10/sys/arm/arm/mp_machdep.c Wed May 14 16:18:26 2014 (r266045) +++ stable/10/sys/arm/arm/mp_machdep.c Wed May 14 16:32:27 2014 (r266046) @@ -52,6 +52,10 @@ __FBSDID("$FreeBSD$"); #ifdef VFP #include #endif +#ifdef CPU_MV_PJ4B +#include +#include +#endif #include "opt_smp.h" @@ -131,8 +135,8 @@ cpu_mp_start(void) #if defined(CPU_MV_PJ4B) /* Add ARMADAXP registers required for snoop filter initialization */ - ((int *)(temp_pagetable_va))[0xf1000000 >> L1_S_SHIFT] = - L1_TYPE_S|L1_SHARED|L1_S_B|L1_S_AP(AP_KRW)|0xd0000000; + ((int *)(temp_pagetable_va))[MV_BASE >> L1_S_SHIFT] = + L1_TYPE_S|L1_SHARED|L1_S_B|L1_S_AP(AP_KRW)|fdt_immr_pa; #endif temp_pagetable = (void*)(vtophys(temp_pagetable_va)); Modified: stable/10/sys/arm/conf/ARMADAXP ============================================================================== --- stable/10/sys/arm/conf/ARMADAXP Wed May 14 16:18:26 2014 (r266045) +++ stable/10/sys/arm/conf/ARMADAXP Wed May 14 16:32:27 2014 (r266046) @@ -76,8 +76,7 @@ device pass device da # SATA -device ata -#device mvs +device mvs # Serial ports device uart Modified: stable/10/sys/arm/include/armreg.h ============================================================================== --- stable/10/sys/arm/include/armreg.h Wed May 14 16:18:26 2014 (r266045) +++ stable/10/sys/arm/include/armreg.h Wed May 14 16:32:27 2014 (r266046) @@ -172,14 +172,10 @@ #define CPU_ID_MV88FR571_41 0x41159260 /* Marvell Feroceon 88FR571-VD Core (actual ID from CPU reg) */ #endif -#define CPU_ID_MV88SV581X_V6 0x560F5810 /* Marvell Sheeva 88SV581x v6 Core */ #define CPU_ID_MV88SV581X_V7 0x561F5810 /* Marvell Sheeva 88SV581x v7 Core */ -#define CPU_ID_MV88SV584X_V6 0x561F5840 /* Marvell Sheeva 88SV584x v6 Core */ #define CPU_ID_MV88SV584X_V7 0x562F5840 /* Marvell Sheeva 88SV584x v7 Core */ /* Marvell's CPUIDs with ARM ID in implementor field */ -#define CPU_ID_ARM_88SV581X_V6 0x410fb760 /* Marvell Sheeva 88SV581x v6 Core */ #define CPU_ID_ARM_88SV581X_V7 0x413FC080 /* Marvell Sheeva 88SV581x v7 Core */ -#define CPU_ID_ARM_88SV584X_V6 0x410FB020 /* Marvell Sheeva 88SV584x v6 Core */ #define CPU_ID_FA526 0x66015260 #define CPU_ID_FA626TE 0x66056260 Modified: stable/10/sys/arm/include/cpufunc.h ============================================================================== --- stable/10/sys/arm/include/cpufunc.h Wed May 14 16:18:26 2014 (r266045) +++ stable/10/sys/arm/include/cpufunc.h Wed May 14 16:32:27 2014 (r266046) @@ -188,7 +188,7 @@ extern u_int cputype; #else void tlb_broadcast(int); -#ifdef CPU_CORTEXA +#if defined(CPU_CORTEXA) || defined(CPU_MV_PJ4B) #define TLB_BROADCAST /* No need to explicitely send an IPI */ #else #define TLB_BROADCAST tlb_broadcast(7) @@ -482,14 +482,6 @@ void arm11_drain_writebuf (void); void pj4b_setttb (u_int); -void pj4b_icache_sync_range (vm_offset_t, vm_size_t); - -void pj4b_dcache_wbinv_range (vm_offset_t, vm_size_t); -void pj4b_dcache_inv_range (vm_offset_t, vm_size_t); -void pj4b_dcache_wb_range (vm_offset_t, vm_size_t); - -void pj4b_idcache_wbinv_range (vm_offset_t, vm_size_t); - void pj4b_drain_readbuf (void); void pj4b_flush_brnchtgt_all (void); void pj4b_flush_brnchtgt_va (u_int); @@ -523,7 +515,6 @@ void armv7_drain_writebuf (void); void armv7_sev (void); u_int armv7_auxctrl (u_int, u_int); void pj4bv7_setup (char *string); -void pj4bv6_setup (char *string); void pj4b_config (void); int get_core_id (void); Modified: stable/10/sys/arm/mv/armadaxp/std.armadaxp ============================================================================== --- stable/10/sys/arm/mv/armadaxp/std.armadaxp Wed May 14 16:18:26 2014 (r266045) +++ stable/10/sys/arm/mv/armadaxp/std.armadaxp Wed May 14 16:32:27 2014 (r266046) @@ -1,16 +1,16 @@ # $FreeBSD$ -# kernel gets loaded at 0x00f00000 by the loader, but runs at virtual address -# 0xc0f00000. RAM starts at 0. We put the pagetable at a reasonable place +# kernel gets loaded at 0x00200000 by the loader, but runs at virtual address +# 0xc0200000. RAM starts at 0. We put the pagetable at a reasonable place # in memory, but may need to bounce it higher if there's a problem with this. # We could paper over this by loading the kernel at 0xc0000000 virtual, but # that leads to other complications, so we'll just reclaim the lower region of # ram after we're loaded. Put the page tables for startup at 1MB. -makeoptions KERNPHYSADDR=0x00f00000 -makeoptions KERNVIRTADDR=0xc0f00000 +makeoptions KERNPHYSADDR=0x00200000 +makeoptions KERNVIRTADDR=0xc0200000 -options KERNPHYSADDR=0x00f00000 -options KERNVIRTADDR=0xc0f00000 +options KERNPHYSADDR=0x00200000 +options KERNVIRTADDR=0xc0200000 options PHYSADDR=0x00000000 options STARTUP_PAGETABLE_ADDR=0x00100000 Modified: stable/10/sys/arm/mv/common.c ============================================================================== --- stable/10/sys/arm/mv/common.c Wed May 14 16:18:26 2014 (r266045) +++ stable/10/sys/arm/mv/common.c Wed May 14 16:32:27 2014 (r266046) @@ -2078,9 +2078,79 @@ fdt_fixup_busfreq(phandle_t root) OF_setprop(sb, "bus-frequency", (void *)&freq, sizeof(freq)); } +static void +fdt_fixup_ranges(phandle_t root) +{ + phandle_t node; + pcell_t par_addr_cells, addr_cells, size_cells; + pcell_t ranges[3], reg[2], *rangesptr; + int len, tuple_size, tuples_count; + uint32_t base; + + /* Fix-up SoC ranges according to real fdt_immr_pa */ + if ((node = fdt_find_compatible(root, "simple-bus", 1)) != 0) { + if (fdt_addrsize_cells(node, &addr_cells, &size_cells) == 0 && + (par_addr_cells = fdt_parent_addr_cells(node) <= 2)) { + tuple_size = sizeof(pcell_t) * (par_addr_cells + + addr_cells + size_cells); + len = OF_getprop(node, "ranges", ranges, + sizeof(ranges)); + tuples_count = len / tuple_size; + /* Unexpected settings are not supported */ + if (tuples_count != 1) + goto fixup_failed; + + rangesptr = &ranges[0]; + rangesptr += par_addr_cells; + base = fdt_data_get((void *)rangesptr, addr_cells); + *rangesptr = cpu_to_fdt32(fdt_immr_pa); + if (OF_setprop(node, "ranges", (void *)&ranges[0], + sizeof(ranges)) < 0) + goto fixup_failed; + } + } + + /* Fix-up PCIe reg according to real PCIe registers' PA */ + if ((node = fdt_find_compatible(root, "mrvl,pcie", 1)) != 0) { + if (fdt_addrsize_cells(OF_parent(node), &par_addr_cells, + &size_cells) == 0) { + tuple_size = sizeof(pcell_t) * (par_addr_cells + + size_cells); + len = OF_getprop(node, "reg", reg, sizeof(reg)); + tuples_count = len / tuple_size; + /* Unexpected settings are not supported */ + if (tuples_count != 1) + goto fixup_failed; + + base = fdt_data_get((void *)®[0], par_addr_cells); + base &= ~0xFF000000; + base |= fdt_immr_pa; + reg[0] = cpu_to_fdt32(base); + if (OF_setprop(node, "reg", (void *)®[0], + sizeof(reg)) < 0) + goto fixup_failed; + } + } + /* Fix-up succeeded. May return and continue */ + return; + +fixup_failed: + while (1) { + /* + * In case of any error while fixing ranges just hang. + * 1. No message can be displayed yet since console + * is not initialized. + * 2. Going further will cause failure on bus_space_map() + * relying on the wrong ranges or data abort when + * accessing PCIe registers. + */ + } +} + struct fdt_fixup_entry fdt_fixup_table[] = { { "mrvl,DB-88F6281", &fdt_fixup_busfreq }, { "mrvl,DB-78460", &fdt_fixup_busfreq }, + { "mrvl,DB-78460", &fdt_fixup_ranges }, { NULL, NULL } }; Modified: stable/10/sys/arm/mv/mv_machdep.c ============================================================================== --- stable/10/sys/arm/mv/mv_machdep.c Wed May 14 16:18:26 2014 (r266045) +++ stable/10/sys/arm/mv/mv_machdep.c Wed May 14 16:32:27 2014 (r266046) @@ -329,6 +329,19 @@ initarm_devmap_init(void) i = 0; arm_devmap_register_table(&fdt_devmap[0]); +#ifdef SOC_MV_ARMADAXP + vm_paddr_t cur_immr_pa; + + /* + * Acquire SoC registers' base passed by u-boot and fill devmap + * accordingly. DTB is going to be modified basing on this data + * later. + */ + __asm __volatile("mrc p15, 4, %0, c15, c0, 0" : "=r" (cur_immr_pa)); + cur_immr_pa = (cur_immr_pa << 13) & 0xff000000; + if (cur_immr_pa != 0) + fdt_immr_pa = cur_immr_pa; +#endif /* * IMMR range. */ Modified: stable/10/sys/arm/mv/mv_sata.c ============================================================================== --- stable/10/sys/arm/mv/mv_sata.c Wed May 14 16:18:26 2014 (r266045) +++ stable/10/sys/arm/mv/mv_sata.c Wed May 14 16:32:27 2014 (r266046) @@ -200,6 +200,7 @@ sata_probe(device_t dev) case MV_DEV_88F6282: case MV_DEV_MV78100: case MV_DEV_MV78100_Z0: + case MV_DEV_MV78460: sc->sc_version = 2; sc->sc_edma_qlen = 32; break; Modified: stable/10/sys/boot/fdt/dts/db78460.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/db78460.dts Wed May 14 16:18:26 2014 (r266045) +++ stable/10/sys/boot/fdt/dts/db78460.dts Wed May 14 16:32:27 2014 (r266046) @@ -116,6 +116,7 @@ reg-shift = <2>; current-speed = <115200>; clock-frequency = <0>; + busy-detect = <1>; interrupts = <41>; interrupt-parent = <&MPIC>; }; @@ -126,6 +127,7 @@ reg-shift = <2>; current-speed = <115200>; clock-frequency = <0>; + busy-detect = <1>; interrupts = <42>; interrupt-parent = <&MPIC>; }; @@ -136,6 +138,7 @@ reg-shift = <2>; current-speed = <115200>; clock-frequency = <0>; + busy-detect = <1>; interrupts = <43>; interrupt-parent = <&MPIC>; }; @@ -146,6 +149,7 @@ reg-shift = <2>; current-speed = <115200>; clock-frequency = <0>; + busy-detect = <1>; interrupts = <44>; interrupt-parent = <&MPIC>; }; @@ -279,6 +283,13 @@ }; }; }; + + sata@A0000 { + compatible = "mrvl,sata"; + reg = <0xA0000 0x6000>; + interrupts = <55>; + interrupt-parent = <&MPIC>; + }; }; pci0: pcie@d0040000 { Modified: stable/10/sys/conf/Makefile.arm ============================================================================== --- stable/10/sys/conf/Makefile.arm Wed May 14 16:18:26 2014 (r266045) +++ stable/10/sys/conf/Makefile.arm Wed May 14 16:32:27 2014 (r266046) @@ -75,7 +75,8 @@ FILES_CPU_FUNC = $S/$M/$M/cpufunc_asm_ar $S/$M/$M/cpufunc_asm_xscale.S $S/$M/$M/cpufunc_asm.S \ $S/$M/$M/cpufunc_asm_xscale_c3.S $S/$M/$M/cpufunc_asm_armv5_ec.S \ $S/$M/$M/cpufunc_asm_fa526.S $S/$M/$M/cpufunc_asm_sheeva.S \ - $S/$M/$M/cpufunc_asm_pj4b.S $S/$M/$M/cpufunc_asm_armv7.S + $S/$M/$M/cpufunc_asm_pj4b.S $S/$M/$M/cpufunc_asm_armv6.S \ + $S/$M/$M/cpufunc_asm_armv7.S KERNEL_EXTRA=trampoline KERNEL_EXTRA_INSTALL=kernel.gz.tramp Modified: stable/10/sys/dev/ic/ns16550.h ============================================================================== --- stable/10/sys/dev/ic/ns16550.h Wed May 14 16:18:26 2014 (r266045) +++ stable/10/sys/dev/ic/ns16550.h Wed May 14 16:32:27 2014 (r266046) @@ -185,6 +185,7 @@ #define DW_REG_USR 31 /* DesignWare derived Uart Status Reg */ #define com_usr 39 /* Octeon 16750/16550 Uart Status Reg */ #define REG_USR com_usr +#define USR_BUSY 1 /* Uart Busy. Serial transfer in progress */ #define USR_TXFIFO_NOTFULL 2 /* Uart TX FIFO Not full */ /* 16950 register #1. Access enabled by ACR[7]. Also requires !LCR[7]. */ Modified: stable/10/sys/dev/mvs/mvs_soc.c ============================================================================== --- stable/10/sys/dev/mvs/mvs_soc.c Wed May 14 16:18:26 2014 (r266045) +++ stable/10/sys/dev/mvs/mvs_soc.c Wed May 14 16:32:27 2014 (r266046) @@ -66,6 +66,8 @@ static struct { {MV_DEV_88F6282, 0x00, "Marvell 88F6282", 2, MVS_Q_GENIIE|MVS_Q_SOC}, {MV_DEV_MV78100, 0x00, "Marvell MV78100", 2, MVS_Q_GENIIE|MVS_Q_SOC}, {MV_DEV_MV78100_Z0, 0x00,"Marvell MV78100", 2, MVS_Q_GENIIE|MVS_Q_SOC}, + {MV_DEV_MV78260, 0x00, "Marvell MV78260", 2, MVS_Q_GENIIE|MVS_Q_SOC}, + {MV_DEV_MV78460, 0x00, "Marvell MV78460", 2, MVS_Q_GENIIE|MVS_Q_SOC}, {0, 0x00, NULL, 0, 0} }; Modified: stable/10/sys/dev/uart/uart_dev_ns8250.c ============================================================================== --- stable/10/sys/dev/uart/uart_dev_ns8250.c Wed May 14 16:18:26 2014 (r266045) +++ stable/10/sys/dev/uart/uart_dev_ns8250.c Wed May 14 16:32:27 2014 (r266046) @@ -649,11 +649,35 @@ int ns8250_bus_param(struct uart_softc *sc, int baudrate, int databits, int stopbits, int parity) { + struct ns8250_softc *ns8250; struct uart_bas *bas; - int error; + int error, limit; + ns8250 = (struct ns8250_softc*)sc; bas = &sc->sc_bas; uart_lock(sc->sc_hwmtx); + /* + * When using DW UART with BUSY detection it is necessary to wait + * until all serial transfers are finished before manipulating the + * line control. LCR will not be affected when UART is busy. + */ + if (ns8250->busy_detect != 0) { + /* + * Pick an arbitrary high limit to avoid getting stuck in + * an infinite loop in case when the hardware is broken. + */ + limit = 10 * 1024; + while (((uart_getreg(bas, DW_REG_USR) & USR_BUSY) != 0) && + --limit) + DELAY(4); + + if (limit <= 0) { + /* UART appears to be stuck */ + uart_unlock(sc->sc_hwmtx); + return (EIO); + } + } + error = ns8250_param(bas, baudrate, databits, stopbits, parity); uart_unlock(sc->sc_hwmtx); return (error); From owner-svn-src-stable@FreeBSD.ORG Wed May 14 16:57:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E6B5E796; Wed, 14 May 2014 16:57:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B92BE2318; Wed, 14 May 2014 16:57:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EGv8Yh033773; Wed, 14 May 2014 16:57:08 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EGv8VS033770; Wed, 14 May 2014 16:57:08 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405141657.s4EGv8VS033770@svn.freebsd.org> From: Michael Tuexen Date: Wed, 14 May 2014 16:57:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266047 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 16:57:09 -0000 Author: tuexen Date: Wed May 14 16:57:08 2014 New Revision: 266047 URL: http://svnweb.freebsd.org/changeset/base/266047 Log: MFC r256556 Remove a buggy comparision when setting manually the path MTU. After fixing, the comparision would have become redundant. Thanks to Andrew Galante for reporting the issue. Modified: stable/9/sys/netinet/sctp_constants.h stable/9/sys/netinet/sctp_usrreq.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_constants.h ============================================================================== --- stable/9/sys/netinet/sctp_constants.h Wed May 14 16:32:27 2014 (r266046) +++ stable/9/sys/netinet/sctp_constants.h Wed May 14 16:57:08 2014 (r266047) @@ -726,7 +726,6 @@ __FBSDID("$FreeBSD$"); /* small chunk store for looking at chunk_list in auth */ #define SCTP_SMALL_CHUNK_STORE 260 -#define SCTP_DEFAULT_MINSEGMENT 512 /* MTU size ... if no mtu disc */ #define SCTP_HOW_MANY_SECRETS 2 /* how many secrets I keep */ #define SCTP_NUMBER_OF_SECRETS 8 /* or 8 * 4 = 32 octets */ Modified: stable/9/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/9/sys/netinet/sctp_usrreq.c Wed May 14 16:32:27 2014 (r266046) +++ stable/9/sys/netinet/sctp_usrreq.c Wed May 14 16:57:08 2014 (r266047) @@ -4796,11 +4796,9 @@ sctp_setopt(struct socket *so, int optna SCTP_FROM_SCTP_USRREQ + SCTP_LOC_10); } net->dest_state |= SCTP_ADDR_NO_PMTUD; - if (paddrp->spp_pathmtu > SCTP_DEFAULT_MINSEGMENT) { - net->mtu = paddrp->spp_pathmtu + ovh; - if (net->mtu < stcb->asoc.smallest_mtu) { - sctp_pathmtu_adjustment(stcb, net->mtu); - } + net->mtu = paddrp->spp_pathmtu + ovh; + if (net->mtu < stcb->asoc.smallest_mtu) { + sctp_pathmtu_adjustment(stcb, net->mtu); } } if (paddrp->spp_flags & SPP_PMTUD_ENABLE) { @@ -4920,11 +4918,9 @@ sctp_setopt(struct socket *so, int optna SCTP_FROM_SCTP_USRREQ + SCTP_LOC_10); } net->dest_state |= SCTP_ADDR_NO_PMTUD; - if (paddrp->spp_pathmtu > SCTP_DEFAULT_MINSEGMENT) { - net->mtu = paddrp->spp_pathmtu + ovh; - if (net->mtu < stcb->asoc.smallest_mtu) { - sctp_pathmtu_adjustment(stcb, net->mtu); - } + net->mtu = paddrp->spp_pathmtu + ovh; + if (net->mtu < stcb->asoc.smallest_mtu) { + sctp_pathmtu_adjustment(stcb, net->mtu); } } sctp_stcb_feature_on(inp, stcb, SCTP_PCB_FLAGS_DO_NOT_PMTUD); From owner-svn-src-stable@FreeBSD.ORG Wed May 14 16:59:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F03718EF; Wed, 14 May 2014 16:59:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DCA83232D; Wed, 14 May 2014 16:59:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EGxWd8034112; Wed, 14 May 2014 16:59:32 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EGxW6Z034111; Wed, 14 May 2014 16:59:32 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405141659.s4EGxW6Z034111@svn.freebsd.org> From: Michael Tuexen Date: Wed, 14 May 2014 16:59:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266048 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 16:59:33 -0000 Author: tuexen Date: Wed May 14 16:59:32 2014 New Revision: 266048 URL: http://svnweb.freebsd.org/changeset/base/266048 Log: MFC r257272: Fix compilation if SCTP_DONT_DO_PRIVADDR_SCOPE is defined. The issue was reported by Andrew Galante. Modified: stable/9/sys/netinet/sctp_pcb.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_pcb.c ============================================================================== --- stable/9/sys/netinet/sctp_pcb.c Wed May 14 16:57:08 2014 (r266047) +++ stable/9/sys/netinet/sctp_pcb.c Wed May 14 16:59:32 2014 (r266048) @@ -3740,7 +3740,7 @@ sctp_add_remote_addr(struct sctp_tcb *st sin->sin_len = sizeof(struct sockaddr_in); if (set_scope) { #ifdef SCTP_DONT_DO_PRIVADDR_SCOPE - stcb->ipv4_local_scope = 1; + stcb->asoc.scope.ipv4_local_scope = 1; #else if (IN4_ISPRIVATE_ADDRESS(&sin->sin_addr)) { stcb->asoc.scope.ipv4_local_scope = 1; From owner-svn-src-stable@FreeBSD.ORG Wed May 14 17:01:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48EB8B94; Wed, 14 May 2014 17:01:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 359FD23C0; Wed, 14 May 2014 17:01:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EH1W5a037378; Wed, 14 May 2014 17:01:32 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EH1W32037377; Wed, 14 May 2014 17:01:32 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405141701.s4EH1W32037377@svn.freebsd.org> From: Michael Tuexen Date: Wed, 14 May 2014 17:01:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266049 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 17:01:32 -0000 Author: tuexen Date: Wed May 14 17:01:31 2014 New Revision: 266049 URL: http://svnweb.freebsd.org/changeset/base/266049 Log: MFC r257274: Fis the value of *optlen when calling getsockopt() for SCTP_REMOTE_UDP_ENCAPS_PORT. This issue was reported by Andrew Galante. Modified: stable/9/sys/netinet/sctp_usrreq.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/9/sys/netinet/sctp_usrreq.c Wed May 14 16:59:32 2014 (r266048) +++ stable/9/sys/netinet/sctp_usrreq.c Wed May 14 17:01:31 2014 (r266049) @@ -3281,7 +3281,7 @@ flags_out: } } if (error == 0) { - *optsize = sizeof(struct sctp_paddrparams); + *optsize = sizeof(struct sctp_udpencaps); } break; } From owner-svn-src-stable@FreeBSD.ORG Wed May 14 17:01:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2381BCBB; Wed, 14 May 2014 17:01:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05E5023C1; Wed, 14 May 2014 17:01:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EH1ZwS037432; Wed, 14 May 2014 17:01:35 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EH1ZaV037429; Wed, 14 May 2014 17:01:35 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405141701.s4EH1ZaV037429@svn.freebsd.org> From: Ian Lepore Date: Wed, 14 May 2014 17:01:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266050 - in stable/10/sys/arm: arm include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 17:01:36 -0000 Author: ian Date: Wed May 14 17:01:35 2014 New Revision: 266050 URL: http://svnweb.freebsd.org/changeset/base/266050 Log: MFC r256707, r256708, r257291, r258358 Switch to use WBWA mappings for page tables on armv6, this is needed for SMP. Fix PTE_SYNC() for PIPT L2 caches, using the virtual address wasn't so useful. Use PTE_SYNC() for >= armv6 Spell cpu_l2cache_wb_range correctly. Fix condition that determines PMAP_NEEDS_PTE_SYNC value for ARM Use values of the correct defines to determine statement's result. ARM_ARCH_ symbols are always defined, hence only values are relevant. Avoid clearing EXEC permission bit when setting the page RW on ARMv6/v7 When emulating modified bit the executable attribute was cleared by mistake when calling pmap_set_prot(). Modified: stable/10/sys/arm/arm/cpufunc_asm_armv7.S stable/10/sys/arm/arm/pmap-v6.c stable/10/sys/arm/include/pmap.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/cpufunc_asm_armv7.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_armv7.S Wed May 14 17:01:31 2014 (r266049) +++ stable/10/sys/arm/arm/cpufunc_asm_armv7.S Wed May 14 17:01:35 2014 (r266050) @@ -57,9 +57,9 @@ __FBSDID("$FreeBSD$"); #define PT_OUTER_WBWA (1 << 3) #ifdef SMP -#define PT_ATTR (PT_S|PT_INNER_WT|PT_OUTER_WT|PT_NOS) +#define PT_ATTR (PT_S|PT_INNER_WBWA|PT_OUTER_WBWA|PT_NOS) #else -#define PT_ATTR (PT_INNER_WT|PT_OUTER_WT) +#define PT_ATTR (PT_INNER_WBWA|PT_OUTER_WBWA) #endif ENTRY(armv7_setttb) @@ -98,7 +98,7 @@ ENTRY(armv7_tlb_flushID_SE) ldr r1, .Lpage_mask bic r0, r0, r1 #ifdef SMP - mcr p15, 0, r0, c8, c3, 1 /* flush D tlb single entry Inner Shareable*/ + mcr p15, 0, r0, c8, c3, 3 /* flush D tlb single entry Inner Shareable*/ mcr p15, 0, r0, c7, c1, 6 /* flush BTB Inner Shareable */ #else mcr p15, 0, r0, c8, c7, 1 /* flush D tlb single entry */ Modified: stable/10/sys/arm/arm/pmap-v6.c ============================================================================== --- stable/10/sys/arm/arm/pmap-v6.c Wed May 14 17:01:31 2014 (r266049) +++ stable/10/sys/arm/arm/pmap-v6.c Wed May 14 17:01:35 2014 (r266050) @@ -1519,10 +1519,10 @@ pmap_fault_fixup(pmap_t pmap, vm_offset_ vm_page_dirty(m); /* Re-enable write permissions for the page */ - pmap_set_prot(ptep, VM_PROT_WRITE, *ptep & L2_S_PROT_U); - CTR1(KTR_PMAP, "pmap_fault_fix: new pte:0x%x", pte); + *ptep = (pte & ~L2_APX); PTE_SYNC(ptep); rv = 1; + CTR1(KTR_PMAP, "pmap_fault_fix: new pte:0x%x", *ptep); } else if (!L2_S_REFERENCED(pte)) { /* * This looks like a good candidate for "page referenced" @@ -1545,6 +1545,7 @@ pmap_fault_fixup(pmap_t pmap, vm_offset_ *ptep = pte | L2_S_REF; PTE_SYNC(ptep); rv = 1; + CTR1(KTR_PMAP, "pmap_fault_fix: new pte:0x%x", *ptep); } /* @@ -2453,6 +2454,8 @@ vm_paddr_t pmap_kextract(vm_offset_t va) { + if (kernel_vm_end == 0) + return (0); return (pmap_extract_locked(kernel_pmap, va)); } @@ -3302,9 +3305,11 @@ pmap_extract(pmap_t pmap, vm_offset_t va { vm_paddr_t pa; - PMAP_LOCK(pmap); + if (kernel_vm_end != 0) + PMAP_LOCK(pmap); pa = pmap_extract_locked(pmap, va); - PMAP_UNLOCK(pmap); + if (kernel_vm_end != 0) + PMAP_UNLOCK(pmap); return (pa); } @@ -3317,7 +3322,7 @@ pmap_extract_locked(pmap_t pmap, vm_offs vm_paddr_t pa; u_int l1idx; - if (pmap != kernel_pmap) + if (kernel_vm_end != 0 && pmap != kernel_pmap) PMAP_ASSERT_LOCKED(pmap); l1idx = L1_IDX(va); l1pd = pmap->pm_l1->l1_kva[l1idx]; Modified: stable/10/sys/arm/include/pmap.h ============================================================================== --- stable/10/sys/arm/include/pmap.h Wed May 14 17:01:31 2014 (r266049) +++ stable/10/sys/arm/include/pmap.h Wed May 14 17:01:35 2014 (r266050) @@ -63,7 +63,7 @@ #endif #define PTE_CACHE 6 #define PTE_DEVICE 2 -#define PTE_PAGETABLE 4 +#define PTE_PAGETABLE 6 #else #define PTE_NOCACHE 1 #define PTE_CACHE 2 @@ -491,7 +491,7 @@ extern int pmap_needs_pte_sync; #if (ARM_MMU_SA1 == 1) && (ARM_NMMUS == 1) #define PMAP_NEEDS_PTE_SYNC 1 #define PMAP_INCLUDE_PTE_SYNC -#elif defined(CPU_XSCALE_81342) +#elif defined(CPU_XSCALE_81342) || ARM_ARCH_6 || ARM_ARCH_7A #define PMAP_NEEDS_PTE_SYNC 1 #define PMAP_INCLUDE_PTE_SYNC #elif (ARM_MMU_SA1 == 0) @@ -561,11 +561,18 @@ extern int pmap_needs_pte_sync; #define PMAP_INCLUDE_PTE_SYNC #endif +#ifdef ARM_L2_PIPT +#define _sync_l2(pte, size) cpu_l2cache_wb_range(vtophys(pte), size) +#else +#define _sync_l2(pte, size) cpu_l2cache_wb_range(pte, size) +#endif + #define PTE_SYNC(pte) \ do { \ if (PMAP_NEEDS_PTE_SYNC) { \ cpu_dcache_wb_range((vm_offset_t)(pte), sizeof(pt_entry_t));\ - cpu_l2cache_wb_range((vm_offset_t)(pte), sizeof(pt_entry_t));\ + cpu_drain_writebuf(); \ + _sync_l2((vm_offset_t)(pte), sizeof(pt_entry_t));\ } else \ cpu_drain_writebuf(); \ } while (/*CONSTCOND*/0) @@ -575,7 +582,8 @@ do { \ if (PMAP_NEEDS_PTE_SYNC) { \ cpu_dcache_wb_range((vm_offset_t)(pte), \ (cnt) << 2); /* * sizeof(pt_entry_t) */ \ - cpu_l2cache_wb_range((vm_offset_t)(pte), \ + cpu_drain_writebuf(); \ + _sync_l2((vm_offset_t)(pte), \ (cnt) << 2); /* * sizeof(pt_entry_t) */ \ } else \ cpu_drain_writebuf(); \ From owner-svn-src-stable@FreeBSD.ORG Wed May 14 17:07:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 749D0357; Wed, 14 May 2014 17:07:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 610CC2431; Wed, 14 May 2014 17:07:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EH7FOn038873; Wed, 14 May 2014 17:07:15 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EH7FEd038872; Wed, 14 May 2014 17:07:15 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405141707.s4EH7FEd038872@svn.freebsd.org> From: Michael Tuexen Date: Wed, 14 May 2014 17:07:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266052 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 17:07:15 -0000 Author: tuexen Date: Wed May 14 17:07:14 2014 New Revision: 266052 URL: http://svnweb.freebsd.org/changeset/base/266052 Log: MFC r257359: Terminate a debug output with a \n. Modified: stable/9/sys/netinet/sctp_timer.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_timer.c ============================================================================== --- stable/9/sys/netinet/sctp_timer.c Wed May 14 17:04:02 2014 (r266051) +++ stable/9/sys/netinet/sctp_timer.c Wed May 14 17:07:14 2014 (r266052) @@ -552,7 +552,7 @@ start_again: TAILQ_FOREACH_SAFE(chk, &stcb->asoc.sent_queue, sctp_next, nchk) { if (SCTP_TSN_GE(stcb->asoc.last_acked_seq, chk->rec.data.TSN_seq)) { /* Strange case our list got out of order? */ - SCTP_PRINTF("Our list is out of order? last_acked:%x chk:%x", + SCTP_PRINTF("Our list is out of order? last_acked:%x chk:%x\n", (unsigned int)stcb->asoc.last_acked_seq, (unsigned int)chk->rec.data.TSN_seq); recovery_cnt++; #ifdef INVARIANTS From owner-svn-src-stable@FreeBSD.ORG Wed May 14 17:16:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE239A37; Wed, 14 May 2014 17:16:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 992C22544; Wed, 14 May 2014 17:16:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EHGopT043504; Wed, 14 May 2014 17:16:50 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EHGnAd043495; Wed, 14 May 2014 17:16:49 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405141716.s4EHGnAd043495@svn.freebsd.org> From: Michael Tuexen Date: Wed, 14 May 2014 17:16:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266054 - in stable/9/sys: netinet netinet6 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 17:16:50 -0000 Author: tuexen Date: Wed May 14 17:16:49 2014 New Revision: 266054 URL: http://svnweb.freebsd.org/changeset/base/266054 Log: MFC r257555: Changes from upstream to improve compilation when INET or INET6 or none of them is defined. Modified: stable/9/sys/netinet/sctp_asconf.c stable/9/sys/netinet/sctp_output.c stable/9/sys/netinet/sctp_pcb.c stable/9/sys/netinet/sctp_usrreq.c stable/9/sys/netinet/sctputil.c stable/9/sys/netinet6/sctp6_usrreq.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_asconf.c ============================================================================== --- stable/9/sys/netinet/sctp_asconf.c Wed May 14 17:11:57 2014 (r266053) +++ stable/9/sys/netinet/sctp_asconf.c Wed May 14 17:16:49 2014 (r266054) @@ -150,7 +150,12 @@ sctp_process_asconf_add_ip(struct sockad struct mbuf *m_reply = NULL; struct sockaddr_storage sa_store; struct sctp_paramhdr *ph; - uint16_t param_type, param_length, aparam_length; + uint16_t param_type, aparam_length; + +#if defined(INET) || defined(INET6) + uint16_t param_length; + +#endif struct sockaddr *sa; int zero_address = 0; int bad_address = 0; @@ -169,8 +174,9 @@ sctp_process_asconf_add_ip(struct sockad aparam_length = ntohs(aph->ph.param_length); ph = (struct sctp_paramhdr *)(aph + 1); param_type = ntohs(ph->param_type); +#if defined(INET) || defined(INET6) param_length = ntohs(ph->param_length); - +#endif sa = (struct sockaddr *)&sa_store; switch (param_type) { #ifdef INET @@ -298,7 +304,12 @@ sctp_process_asconf_delete_ip(struct soc struct mbuf *m_reply = NULL; struct sockaddr_storage sa_store; struct sctp_paramhdr *ph; - uint16_t param_type, param_length, aparam_length; + uint16_t param_type, aparam_length; + +#if defined(INET) || defined(INET6) + uint16_t param_length; + +#endif struct sockaddr *sa; int zero_address = 0; int result; @@ -317,8 +328,9 @@ sctp_process_asconf_delete_ip(struct soc aparam_length = ntohs(aph->ph.param_length); ph = (struct sctp_paramhdr *)(aph + 1); param_type = ntohs(ph->param_type); +#if defined(INET) || defined(INET6) param_length = ntohs(ph->param_length); - +#endif sa = (struct sockaddr *)&sa_store; switch (param_type) { #ifdef INET @@ -427,7 +439,12 @@ sctp_process_asconf_set_primary(struct s struct mbuf *m_reply = NULL; struct sockaddr_storage sa_store; struct sctp_paramhdr *ph; - uint16_t param_type, param_length, aparam_length; + uint16_t param_type, aparam_length; + +#if defined(INET) || defined(INET6) + uint16_t param_length; + +#endif struct sockaddr *sa; int zero_address = 0; @@ -445,8 +462,9 @@ sctp_process_asconf_set_primary(struct s aparam_length = ntohs(aph->ph.param_length); ph = (struct sctp_paramhdr *)(aph + 1); param_type = ntohs(ph->param_type); +#if defined(INET) || defined(INET6) param_length = ntohs(ph->param_length); - +#endif sa = (struct sockaddr *)&sa_store; switch (param_type) { #ifdef INET @@ -860,10 +878,12 @@ sctp_asconf_addr_match(struct sctp_ascon static uint32_t sctp_addr_match(struct sctp_paramhdr *ph, struct sockaddr *sa) { +#if defined(INET) || defined(INET6) uint16_t param_type, param_length; param_type = ntohs(ph->param_type); param_length = ntohs(ph->param_length); +#endif switch (sa->sa_family) { #ifdef INET6 case AF_INET6: @@ -874,7 +894,7 @@ sctp_addr_match(struct sctp_paramhdr *ph v6addr = (struct sctp_ipv6addr_param *)ph; if ((param_type == SCTP_IPV6_ADDRESS) && - param_length == sizeof(struct sctp_ipv6addr_param) && + (param_length == sizeof(struct sctp_ipv6addr_param)) && (memcmp(&v6addr->addr, &sin6->sin6_addr, sizeof(struct in6_addr)) == 0)) { return (1); @@ -890,7 +910,7 @@ sctp_addr_match(struct sctp_paramhdr *ph v4addr = (struct sctp_ipv4addr_param *)ph; if ((param_type == SCTP_IPV4_ADDRESS) && - param_length == sizeof(struct sctp_ipv4addr_param) && + (param_length == sizeof(struct sctp_ipv4addr_param)) && (memcmp(&v4addr->addr, &sin->sin_addr, sizeof(struct in_addr)) == 0)) { return (1); Modified: stable/9/sys/netinet/sctp_output.c ============================================================================== --- stable/9/sys/netinet/sctp_output.c Wed May 14 17:11:57 2014 (r266053) +++ stable/9/sys/netinet/sctp_output.c Wed May 14 17:16:49 2014 (r266054) @@ -1937,10 +1937,13 @@ sctp_is_address_in_scope(struct sctp_ifa static struct mbuf * sctp_add_addr_to_mbuf(struct mbuf *m, struct sctp_ifa *ifa, uint16_t * len) { +#if defined(INET) || defined(INET6) struct sctp_paramhdr *parmh; struct mbuf *mret; uint16_t plen; +#endif + switch (ifa->address.sa.sa_family) { #ifdef INET case AF_INET: @@ -1955,6 +1958,7 @@ sctp_add_addr_to_mbuf(struct mbuf *m, st default: return (m); } +#if defined(INET) || defined(INET6) if (M_TRAILINGSPACE(m) >= plen) { /* easy side we just drop it on the end */ parmh = (struct sctp_paramhdr *)(SCTP_BUF_AT(m, SCTP_BUF_LEN(m))); @@ -2015,6 +2019,7 @@ sctp_add_addr_to_mbuf(struct mbuf *m, st *len += plen; } return (mret); +#endif } @@ -3855,8 +3860,11 @@ sctp_lowlevel_chunk_output(struct sctp_i struct sctphdr *sctphdr; int packet_length; int ret; + +#if defined(INET) || defined(INET6) uint32_t vrf_id; +#endif #if defined(INET) || defined(INET6) struct mbuf *o_pak; sctp_route_t *ro = NULL; @@ -3875,12 +3883,13 @@ sctp_lowlevel_chunk_output(struct sctp_i sctp_m_freem(m); return (EFAULT); } +#if defined(INET) || defined(INET6) if (stcb) { vrf_id = stcb->asoc.vrf_id; } else { vrf_id = inp->def_vrf_id; } - +#endif /* fill in the HMAC digest for any AUTH chunk in the packet */ if ((auth != NULL) && (stcb != NULL)) { sctp_fill_hmac_digest_m(m, auth_offset, auth, stcb, auth_keyid); @@ -10798,8 +10807,12 @@ sctp_send_resp_msg(struct sockaddr *src, struct sctphdr *shout; struct sctp_chunkhdr *ch; struct udphdr *udp; - int len, cause_len, padding_len, ret; + int len, cause_len, padding_len; +#if defined(INET) || defined(INET6) + int ret; + +#endif #ifdef INET struct sockaddr_in *src_sin, *dst_sin; struct ip *ip; Modified: stable/9/sys/netinet/sctp_pcb.c ============================================================================== --- stable/9/sys/netinet/sctp_pcb.c Wed May 14 17:11:57 2014 (r266053) +++ stable/9/sys/netinet/sctp_pcb.c Wed May 14 17:16:49 2014 (r266054) @@ -827,18 +827,30 @@ out_now: static int sctp_does_stcb_own_this_addr(struct sctp_tcb *stcb, struct sockaddr *to) { - int loopback_scope, ipv4_local_scope, local_scope, site_scope; - int ipv4_addr_legal, ipv6_addr_legal; + int loopback_scope; + +#if defined(INET) + int ipv4_local_scope, ipv4_addr_legal; + +#endif +#if defined(INET6) + int local_scope, site_scope, ipv6_addr_legal; + +#endif struct sctp_vrf *vrf; struct sctp_ifn *sctp_ifn; struct sctp_ifa *sctp_ifa; loopback_scope = stcb->asoc.scope.loopback_scope; +#if defined(INET) ipv4_local_scope = stcb->asoc.scope.ipv4_local_scope; + ipv4_addr_legal = stcb->asoc.scope.ipv4_addr_legal; +#endif +#if defined(INET6) local_scope = stcb->asoc.scope.local_scope; site_scope = stcb->asoc.scope.site_scope; - ipv4_addr_legal = stcb->asoc.scope.ipv4_addr_legal; ipv6_addr_legal = stcb->asoc.scope.ipv6_addr_legal; +#endif SCTP_IPI_ADDR_RLOCK(); vrf = sctp_find_vrf(stcb->asoc.vrf_id); @@ -1971,8 +1983,13 @@ sctp_findassociation_special_addr(struct struct sockaddr *dst) { struct sctp_paramhdr *phdr, parm_buf; + +#if defined(INET) || defined(INET6) struct sctp_tcb *stcb; - uint32_t ptype, plen; + uint16_t ptype; + +#endif + uint16_t plen; #ifdef INET struct sockaddr_in sin4; @@ -1996,13 +2013,14 @@ sctp_findassociation_special_addr(struct sin6.sin6_port = sh->src_port; #endif - stcb = NULL; offset += sizeof(struct sctp_init_chunk); phdr = sctp_get_next_param(m, offset, &parm_buf, sizeof(parm_buf)); while (phdr != NULL) { /* now we must see if we want the parameter */ +#if defined(INET) || defined(INET6) ptype = ntohs(phdr->param_type); +#endif plen = ntohs(phdr->param_length); if (plen == 0) { break; Modified: stable/9/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/9/sys/netinet/sctp_usrreq.c Wed May 14 17:11:57 2014 (r266053) +++ stable/9/sys/netinet/sctp_usrreq.c Wed May 14 17:16:49 2014 (r266054) @@ -1120,9 +1120,17 @@ sctp_fill_up_addresses_vrf(struct sctp_i { struct sctp_ifn *sctp_ifn; struct sctp_ifa *sctp_ifa; - int loopback_scope, ipv4_local_scope, local_scope, site_scope; size_t actual; - int ipv4_addr_legal, ipv6_addr_legal; + int loopback_scope; + +#if defined(INET) + int ipv4_local_scope, ipv4_addr_legal; + +#endif +#if defined(INET6) + int local_scope, site_scope, ipv6_addr_legal; + +#endif struct sctp_vrf *vrf; actual = 0; @@ -1132,27 +1140,43 @@ sctp_fill_up_addresses_vrf(struct sctp_i if (stcb) { /* Turn on all the appropriate scope */ loopback_scope = stcb->asoc.scope.loopback_scope; +#if defined(INET) ipv4_local_scope = stcb->asoc.scope.ipv4_local_scope; + ipv4_addr_legal = stcb->asoc.scope.ipv4_addr_legal; +#endif +#if defined(INET6) local_scope = stcb->asoc.scope.local_scope; site_scope = stcb->asoc.scope.site_scope; - ipv4_addr_legal = stcb->asoc.scope.ipv4_addr_legal; ipv6_addr_legal = stcb->asoc.scope.ipv6_addr_legal; +#endif } else { /* Use generic values for endpoints. */ loopback_scope = 1; +#if defined(INET) ipv4_local_scope = 1; +#endif +#if defined(INET6) local_scope = 1; site_scope = 1; +#endif if (inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) { +#if defined(INET6) ipv6_addr_legal = 1; +#endif +#if defined(INET) if (SCTP_IPV6_V6ONLY(inp)) { ipv4_addr_legal = 0; } else { ipv4_addr_legal = 1; } +#endif } else { +#if defined(INET6) ipv6_addr_legal = 0; +#endif +#if defined(INET) ipv4_addr_legal = 1; +#endif } } vrf = sctp_find_vrf(vrf_id); Modified: stable/9/sys/netinet/sctputil.c ============================================================================== --- stable/9/sys/netinet/sctputil.c Wed May 14 17:11:57 2014 (r266053) +++ stable/9/sys/netinet/sctputil.c Wed May 14 17:16:49 2014 (r266054) @@ -6612,8 +6612,16 @@ sctp_bindx_delete_address(struct sctp_in int sctp_local_addr_count(struct sctp_tcb *stcb) { - int loopback_scope, ipv4_local_scope, local_scope, site_scope; - int ipv4_addr_legal, ipv6_addr_legal; + int loopback_scope; + +#if defined(INET) + int ipv4_local_scope, ipv4_addr_legal; + +#endif +#if defined (INET6) + int local_scope, site_scope, ipv6_addr_legal; + +#endif struct sctp_vrf *vrf; struct sctp_ifn *sctp_ifn; struct sctp_ifa *sctp_ifa; @@ -6621,11 +6629,15 @@ sctp_local_addr_count(struct sctp_tcb *s /* Turn on all the appropriate scopes */ loopback_scope = stcb->asoc.scope.loopback_scope; +#if defined(INET) ipv4_local_scope = stcb->asoc.scope.ipv4_local_scope; + ipv4_addr_legal = stcb->asoc.scope.ipv4_addr_legal; +#endif +#if defined(INET6) local_scope = stcb->asoc.scope.local_scope; site_scope = stcb->asoc.scope.site_scope; - ipv4_addr_legal = stcb->asoc.scope.ipv4_addr_legal; ipv6_addr_legal = stcb->asoc.scope.ipv6_addr_legal; +#endif SCTP_IPI_ADDR_RLOCK(); vrf = sctp_find_vrf(stcb->asoc.vrf_id); if (vrf == NULL) { Modified: stable/9/sys/netinet6/sctp6_usrreq.c ============================================================================== --- stable/9/sys/netinet6/sctp6_usrreq.c Wed May 14 17:11:57 2014 (r266053) +++ stable/9/sys/netinet6/sctp6_usrreq.c Wed May 14 17:16:49 2014 (r266054) @@ -839,16 +839,18 @@ sctp6_connect(struct socket *so, struct uint32_t vrf_id; int error = 0; struct sctp_inpcb *inp; - struct in6pcb *inp6; struct sctp_tcb *stcb; #ifdef INET + struct in6pcb *inp6; struct sockaddr_in6 *sin6; struct sockaddr_storage ss; #endif +#ifdef INET inp6 = (struct in6pcb *)so->so_pcb; +#endif inp = (struct sctp_inpcb *)so->so_pcb; if (inp == NULL) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, ECONNRESET); From owner-svn-src-stable@FreeBSD.ORG Wed May 14 17:19:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 25E19DDE; Wed, 14 May 2014 17:19:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 126A82579; Wed, 14 May 2014 17:19:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EHJgph043901; Wed, 14 May 2014 17:19:42 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EHJgso043900; Wed, 14 May 2014 17:19:42 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405141719.s4EHJgso043900@svn.freebsd.org> From: Michael Tuexen Date: Wed, 14 May 2014 17:19:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266055 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 17:19:43 -0000 Author: tuexen Date: Wed May 14 17:19:42 2014 New Revision: 266055 URL: http://svnweb.freebsd.org/changeset/base/266055 Log: MFC r257574: Unlock the lock before destroying it. This issue was reported by Andrew Galante. Modified: stable/9/sys/netinet/sctp_pcb.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_pcb.c ============================================================================== --- stable/9/sys/netinet/sctp_pcb.c Wed May 14 17:16:49 2014 (r266054) +++ stable/9/sys/netinet/sctp_pcb.c Wed May 14 17:19:42 2014 (r266055) @@ -4332,6 +4332,7 @@ sctp_aloc_assoc(struct sctp_inpcb *inp, asoc->nr_mapping_array = NULL; } SCTP_DECR_ASOC_COUNT(); + SCTP_TCB_UNLOCK(stcb); SCTP_TCB_LOCK_DESTROY(stcb); SCTP_TCB_SEND_LOCK_DESTROY(stcb); LIST_REMOVE(stcb, sctp_tcbasocidhash); @@ -5134,6 +5135,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, /* Insert new items here :> */ /* Get rid of LOCK */ + SCTP_TCB_UNLOCK(stcb); SCTP_TCB_LOCK_DESTROY(stcb); SCTP_TCB_SEND_LOCK_DESTROY(stcb); if (from_inpcbfree == SCTP_NORMAL_PROC) { From owner-svn-src-stable@FreeBSD.ORG Wed May 14 17:26:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CB812CD; Wed, 14 May 2014 17:26:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0964B263E; Wed, 14 May 2014 17:26:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EHQ6ts048096; Wed, 14 May 2014 17:26:06 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EHQ6mS048094; Wed, 14 May 2014 17:26:06 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405141726.s4EHQ6mS048094@svn.freebsd.org> From: Michael Tuexen Date: Wed, 14 May 2014 17:26:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266056 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 17:26:07 -0000 Author: tuexen Date: Wed May 14 17:26:06 2014 New Revision: 266056 URL: http://svnweb.freebsd.org/changeset/base/266056 Log: MFC r257800: Use htons()/ntohs() appropriately. These issues were reported by Andrew Galante. Modified: stable/9/sys/netinet/sctp_asconf.c stable/9/sys/netinet/sctputil.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_asconf.c ============================================================================== --- stable/9/sys/netinet/sctp_asconf.c Wed May 14 17:19:42 2014 (r266055) +++ stable/9/sys/netinet/sctp_asconf.c Wed May 14 17:26:06 2014 (r266056) @@ -2737,7 +2737,7 @@ sctp_compose_asconf(struct sctp_tcb *stc /* chain it all together */ SCTP_BUF_NEXT(m_asconf_chk) = m_asconf; *retlen = SCTP_BUF_LEN(m_asconf_chk) + SCTP_BUF_LEN(m_asconf); - acp->ch.chunk_length = ntohs(*retlen); + acp->ch.chunk_length = htons(*retlen); return (m_asconf_chk); } Modified: stable/9/sys/netinet/sctputil.c ============================================================================== --- stable/9/sys/netinet/sctputil.c Wed May 14 17:19:42 2014 (r266055) +++ stable/9/sys/netinet/sctputil.c Wed May 14 17:26:06 2014 (r266056) @@ -2602,7 +2602,7 @@ sctp_notify_assoc_change(uint16_t state, if (sctp_stcb_is_feature_on(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVASSOCEVNT)) { notif_len = sizeof(struct sctp_assoc_change); if (abort != NULL) { - abort_len = htons(abort->ch.chunk_length); + abort_len = ntohs(abort->ch.chunk_length); } else { abort_len = 0; } @@ -3474,7 +3474,7 @@ sctp_notify_remote_error(struct sctp_tcb return; } if (chunk != NULL) { - chunk_len = htons(chunk->ch.chunk_length); + chunk_len = ntohs(chunk->ch.chunk_length); } else { chunk_len = 0; } From owner-svn-src-stable@FreeBSD.ORG Wed May 14 17:28:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 34259419; Wed, 14 May 2014 17:28:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20FB62655; Wed, 14 May 2014 17:28:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EHSoqB048442; Wed, 14 May 2014 17:28:50 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EHSnNF048441; Wed, 14 May 2014 17:28:49 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405141728.s4EHSnNF048441@svn.freebsd.org> From: Michael Tuexen Date: Wed, 14 May 2014 17:28:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266057 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 17:28:50 -0000 Author: tuexen Date: Wed May 14 17:28:49 2014 New Revision: 266057 URL: http://svnweb.freebsd.org/changeset/base/266057 Log: MFC r257803: Make sure that we don't try to build an ASCONF-ACK chunk larger than what fits in the the mbuf cluster. This issue was reported by Andrew Galante. Modified: stable/9/sys/netinet/sctp_asconf.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_asconf.c ============================================================================== --- stable/9/sys/netinet/sctp_asconf.c Wed May 14 17:26:06 2014 (r266056) +++ stable/9/sys/netinet/sctp_asconf.c Wed May 14 17:28:49 2014 (r266057) @@ -2616,7 +2616,8 @@ sctp_compose_asconf(struct sctp_tcb *stc /* get the parameter length */ p_length = SCTP_SIZE32(aa->ap.aph.ph.param_length); /* will it fit in current chunk? */ - if (SCTP_BUF_LEN(m_asconf) + p_length > stcb->asoc.smallest_mtu) { + if ((SCTP_BUF_LEN(m_asconf) + p_length > stcb->asoc.smallest_mtu) || + (SCTP_BUF_LEN(m_asconf) + p_length > MCLBYTES)) { /* won't fit, so we're done with this chunk */ break; } From owner-svn-src-stable@FreeBSD.ORG Wed May 14 17:40:22 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1F51666E; Wed, 14 May 2014 17:40:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 011E12739; Wed, 14 May 2014 17:40:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EHeLgD052999; Wed, 14 May 2014 17:40:21 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EHeJnd052981; Wed, 14 May 2014 17:40:19 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405141740.s4EHeJnd052981@svn.freebsd.org> From: Ian Lepore Date: Wed, 14 May 2014 17:40:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266058 - in stable/10/sys: arm/arm arm/include conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 17:40:22 -0000 Author: ian Date: Wed May 14 17:40:18 2014 New Revision: 266058 URL: http://svnweb.freebsd.org/changeset/base/266058 Log: MFC r258359, r258742, r258845, r259936, r259640 Apply access flags for managed and unmanaged pages properly on ARMv6/v7 Set the PGA_WRITEABLE flag when the protections indicate write access, not just when the current access is a write. Enable missing Access Flag for secondary cores on ARMv6/v7 Add identification and necessary type checks for Krait CPU cores. Modified: stable/10/sys/arm/arm/cpufunc.c stable/10/sys/arm/arm/elf_trampoline.c stable/10/sys/arm/arm/identcpu.c stable/10/sys/arm/arm/locore.S stable/10/sys/arm/arm/pmap-v6.c stable/10/sys/arm/arm/swtch.S stable/10/sys/arm/include/armreg.h stable/10/sys/arm/include/cpuconf.h stable/10/sys/arm/include/cpufunc.h stable/10/sys/arm/include/intr.h stable/10/sys/arm/include/md_var.h stable/10/sys/conf/files.arm stable/10/sys/conf/options.arm Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/cpufunc.c ============================================================================== --- stable/10/sys/arm/arm/cpufunc.c Wed May 14 17:28:49 2014 (r266057) +++ stable/10/sys/arm/arm/cpufunc.c Wed May 14 17:40:18 2014 (r266058) @@ -1038,7 +1038,7 @@ struct cpu_functions arm1176_cpufuncs = }; #endif /*CPU_ARM1176 */ -#if defined(CPU_CORTEXA) +#if defined(CPU_CORTEXA) || defined(CPU_KRAIT) struct cpu_functions cortexa_cpufuncs = { /* CPU functions */ @@ -1118,7 +1118,7 @@ u_int cpu_reset_needs_v4_MMU_disable; /* defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ defined(CPU_FA526) || defined(CPU_FA626TE) || defined(CPU_MV_PJ4B) || \ defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342) || \ - defined(CPU_CORTEXA) + defined(CPU_CORTEXA) || defined(CPU_KRAIT) static void get_cachetype_cp15(void); @@ -1416,7 +1416,7 @@ set_cpufuncs() goto out; } #endif /* CPU_ARM1136 || CPU_ARM1176 */ -#ifdef CPU_CORTEXA +#if defined(CPU_CORTEXA) || defined(CPU_KRAIT) if (cputype == CPU_ID_CORTEXA7 || cputype == CPU_ID_CORTEXA8R1 || cputype == CPU_ID_CORTEXA8R2 || @@ -1424,7 +1424,8 @@ set_cpufuncs() cputype == CPU_ID_CORTEXA9R1 || cputype == CPU_ID_CORTEXA9R2 || cputype == CPU_ID_CORTEXA9R3 || - cputype == CPU_ID_CORTEXA15 ) { + cputype == CPU_ID_CORTEXA15 || + cputype == CPU_ID_KRAIT ) { cpufuncs = cortexa_cpufuncs; cpu_reset_needs_v4_MMU_disable = 1; /* V4 or higher */ get_cachetype_cp15(); @@ -2406,7 +2407,7 @@ pj4bv7_setup(args) } #endif /* CPU_MV_PJ4B */ -#ifdef CPU_CORTEXA +#if defined(CPU_CORTEXA) || defined(CPU_KRAIT) void cortexa_setup(char *args) Modified: stable/10/sys/arm/arm/elf_trampoline.c ============================================================================== --- stable/10/sys/arm/arm/elf_trampoline.c Wed May 14 17:28:49 2014 (r266057) +++ stable/10/sys/arm/arm/elf_trampoline.c Wed May 14 17:40:18 2014 (r266058) @@ -102,7 +102,7 @@ extern void xscalec3_l2cache_purge(void) #elif defined(SOC_MV_KIRKWOOD) || defined(SOC_MV_DISCOVERY) #define cpu_l2cache_wbinv_all sheeva_l2cache_wbinv_all extern void sheeva_l2cache_wbinv_all(void); -#elif defined(CPU_CORTEXA) +#elif defined(CPU_CORTEXA) || defined(CPU_KRAIT) #define cpu_idcache_wbinv_all armv7_idcache_wbinv_all #define cpu_l2cache_wbinv_all() #else Modified: stable/10/sys/arm/arm/identcpu.c ============================================================================== --- stable/10/sys/arm/arm/identcpu.c Wed May 14 17:28:49 2014 (r266057) +++ stable/10/sys/arm/arm/identcpu.c Wed May 14 17:40:18 2014 (r266058) @@ -252,6 +252,8 @@ const struct cpuidtab cpuids[] = { generic_steppings }, { CPU_ID_CORTEXA15, CPU_CLASS_CORTEXA, "Cortex A15", generic_steppings }, + { CPU_ID_KRAIT, CPU_CLASS_KRAIT, "Krait", + generic_steppings }, { CPU_ID_SA110, CPU_CLASS_SA1, "SA-110", sa110_steppings }, @@ -351,6 +353,7 @@ const struct cpu_classtab cpu_classes[] { "ARM10E", "CPU_ARM10" }, /* CPU_CLASS_ARM10E */ { "ARM10EJ", "CPU_ARM10" }, /* CPU_CLASS_ARM10EJ */ { "Cortex-A", "CPU_CORTEXA" }, /* CPU_CLASS_CORTEXA */ + { "Krait", "CPU_KRAIT" }, /* CPU_CLASS_KRAIT */ { "SA-1", "CPU_SA110" }, /* CPU_CLASS_SA1 */ { "XScale", "CPU_XSCALE_..." }, /* CPU_CLASS_XSCALE */ { "ARM11J", "CPU_ARM11" }, /* CPU_CLASS_ARM11J */ Modified: stable/10/sys/arm/arm/locore.S ============================================================================== --- stable/10/sys/arm/arm/locore.S Wed May 14 17:28:49 2014 (r266057) +++ stable/10/sys/arm/arm/locore.S Wed May 14 17:40:18 2014 (r266058) @@ -170,7 +170,7 @@ Lunmapped: mcr p15, 0, r0, c2, c0, 0 /* Set TTB */ mcr p15, 0, r0, c8, c7, 0 /* Flush TLB */ -#if defined(CPU_ARM1136) || defined(CPU_ARM1176) || defined(CPU_CORTEXA) || defined(CPU_MV_PJ4B) +#if defined(CPU_ARM1136) || defined(CPU_ARM1176) || defined(CPU_CORTEXA) || defined(CPU_MV_PJ4B) || defined(CPU_KRAIT) mov r0, #0 mcr p15, 0, r0, c13, c0, 1 /* Set ASID to 0 */ #endif @@ -377,7 +377,7 @@ Ltag: mcr p15, 0, r0, c2, c0, 0 /* Set TTB */ mcr p15, 0, r0, c8, c7, 0 /* Flush TLB */ -#if defined(CPU_ARM1136) || defined(CPU_ARM1176) || defined(CPU_MV_PJ4B) || defined(CPU_CORTEXA) +#if defined(CPU_ARM1136) || defined(CPU_ARM1176) || defined(CPU_MV_PJ4B) || defined(CPU_CORTEXA) || defined(CPU_KRAIT) mov r0, #0 mcr p15, 0, r0, c13, c0, 1 /* Set ASID to 0 */ #endif @@ -389,8 +389,9 @@ Ltag: mcr p15, 0, r0, c3, c0, 0 /* Enable MMU */ mrc p15, 0, r0, c1, c0, 0 -#if defined(CPU_ARM1136) || defined(CPU_ARM1176) || defined(CPU_MV_PJ4B) || defined(CPU_CORTEXA) +#if defined(CPU_ARM1136) || defined(CPU_ARM1176) || defined(CPU_MV_PJ4B) || defined(CPU_CORTEXA) || defined(CPU_KRAIT) orr r0, r0, #CPU_CONTROL_V6_EXTPAGE + orr r0, r0, #CPU_CONTROL_AF_ENABLE #endif orr r0, r0, #(CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_DC_ENABLE) mcr p15, 0, r0, c1, c0, 0 Modified: stable/10/sys/arm/arm/pmap-v6.c ============================================================================== --- stable/10/sys/arm/arm/pmap-v6.c Wed May 14 17:28:49 2014 (r266057) +++ stable/10/sys/arm/arm/pmap-v6.c Wed May 14 17:40:18 2014 (r266058) @@ -3079,31 +3079,33 @@ validate: * then continue setting mapping parameters */ if (m != NULL) { - if (prot & (VM_PROT_ALL)) { - if ((m->oflags & VPO_UNMANAGED) == 0) + if ((m->oflags & VPO_UNMANAGED) == 0) { + if (prot & (VM_PROT_ALL)) { vm_page_aflag_set(m, PGA_REFERENCED); - } else { - /* - * Need to do page referenced emulation. - */ - npte &= ~L2_S_REF; + } else { + /* + * Need to do page referenced emulation. + */ + npte &= ~L2_S_REF; + } } if (prot & VM_PROT_WRITE) { - /* Write enable */ - npte &= ~(L2_APX); - if ((m->oflags & VPO_UNMANAGED) == 0) { vm_page_aflag_set(m, PGA_WRITEABLE); /* - * The access type and permissions indicate - * that the page will be written as soon as - * returned from fault service. - * Mark it dirty from the outset. + * XXX: Skip modified bit emulation for now. + * The emulation reveals problems + * that result in random failures + * during memory allocation on some + * platforms. + * Therefore, the page is marked RW + * immediately. */ - if ((access & VM_PROT_WRITE) != 0) - vm_page_dirty(m); - } + npte &= ~(L2_APX); + vm_page_dirty(m); + } else + npte &= ~(L2_APX); } if (!(prot & VM_PROT_EXECUTE)) npte |= L2_XN; Modified: stable/10/sys/arm/arm/swtch.S ============================================================================== --- stable/10/sys/arm/arm/swtch.S Wed May 14 17:28:49 2014 (r266057) +++ stable/10/sys/arm/arm/swtch.S Wed May 14 17:40:18 2014 (r266058) @@ -131,7 +131,7 @@ ENTRY(cpu_throw) /* Switch to lwp0 context */ ldr r9, .Lcpufuncs -#if !defined(CPU_ARM11) && !defined(CPU_CORTEXA) && !defined(CPU_MV_PJ4B) +#if !defined(CPU_ARM11) && !defined(CPU_CORTEXA) && !defined(CPU_MV_PJ4B) && !defined(CPU_KRAIT) mov lr, pc ldr pc, [r9, #CF_IDCACHE_WBINV_ALL] #endif @@ -361,7 +361,7 @@ ENTRY(cpu_switch) cmpeq r0, r5 /* Same DACR? */ beq .Lcs_context_switched /* yes! */ -#if !defined(CPU_ARM11) && !defined(CPU_CORTEXA) && !defined(CPU_MV_PJ4B) +#if !defined(CPU_ARM11) && !defined(CPU_CORTEXA) && !defined(CPU_MV_PJ4B) && !defined(CPU_KRAIT) /* * Definately need to flush the cache. */ Modified: stable/10/sys/arm/include/armreg.h ============================================================================== --- stable/10/sys/arm/include/armreg.h Wed May 14 17:28:49 2014 (r266057) +++ stable/10/sys/arm/include/armreg.h Wed May 14 17:40:18 2014 (r266058) @@ -157,6 +157,7 @@ #define CPU_ID_CORTEXA15 0x410fc0f0 #define CPU_ID_SA110 0x4401a100 #define CPU_ID_SA1100 0x4401a110 +#define CPU_ID_KRAIT 0x510f06f0 /* Snapdragon S4 Pro/APQ8064 */ #define CPU_ID_TI925T 0x54029250 #define CPU_ID_MV88FR131 0x56251310 /* Marvell Feroceon 88FR131 Core */ #define CPU_ID_MV88FR331 0x56153310 /* Marvell Feroceon 88FR331 Core */ Modified: stable/10/sys/arm/include/cpuconf.h ============================================================================== --- stable/10/sys/arm/include/cpuconf.h Wed May 14 17:28:49 2014 (r266057) +++ stable/10/sys/arm/include/cpuconf.h Wed May 14 17:40:18 2014 (r266058) @@ -66,6 +66,7 @@ defined(CPU_FA626TE) + \ defined(CPU_XSCALE_IXP425)) + \ defined(CPU_CORTEXA) + \ + defined(CPU_KRAIT) + \ defined(CPU_MV_PJ4B) /* @@ -97,7 +98,7 @@ #endif #endif -#if defined(CPU_CORTEXA) +#if defined(CPU_CORTEXA) || defined(CPU_KRAIT) #define ARM_ARCH_7A 1 #else #define ARM_ARCH_7A 0 @@ -156,7 +157,7 @@ #define ARM_MMU_V6 0 #endif -#if defined(CPU_CORTEXA) +#if defined(CPU_CORTEXA) || defined(CPU_KRAIT) #define ARM_MMU_V7 1 #else #define ARM_MMU_V7 0 Modified: stable/10/sys/arm/include/cpufunc.h ============================================================================== --- stable/10/sys/arm/include/cpufunc.h Wed May 14 17:28:49 2014 (r266057) +++ stable/10/sys/arm/include/cpufunc.h Wed May 14 17:40:18 2014 (r266058) @@ -188,7 +188,7 @@ extern u_int cputype; #else void tlb_broadcast(int); -#if defined(CPU_CORTEXA) || defined(CPU_MV_PJ4B) +#if defined(CPU_CORTEXA) || defined(CPU_MV_PJ4B) || defined(CPU_KRAIT) #define TLB_BROADCAST /* No need to explicitely send an IPI */ #else #define TLB_BROADCAST tlb_broadcast(7) @@ -463,7 +463,7 @@ void sheeva_l2cache_wbinv_all (void); #endif #if defined(CPU_ARM1136) || defined(CPU_ARM1176) || \ - defined(CPU_MV_PJ4B) || defined(CPU_CORTEXA) + defined(CPU_MV_PJ4B) || defined(CPU_CORTEXA) || defined(CPU_KRAIT) void arm11_setttb (u_int); void arm11_sleep (int); Modified: stable/10/sys/arm/include/intr.h ============================================================================== --- stable/10/sys/arm/include/intr.h Wed May 14 17:28:49 2014 (r266057) +++ stable/10/sys/arm/include/intr.h Wed May 14 17:40:18 2014 (r266058) @@ -52,6 +52,8 @@ #define NIRQ 64 #elif defined(CPU_CORTEXA) #define NIRQ 160 +#elif defined(CPU_KRAIT) +#define NIRQ 288 #elif defined(CPU_ARM1136) || defined(CPU_ARM1176) #define NIRQ 128 #elif defined(SOC_MV_ARMADAXP) Modified: stable/10/sys/arm/include/md_var.h ============================================================================== --- stable/10/sys/arm/include/md_var.h Wed May 14 17:28:49 2014 (r266057) +++ stable/10/sys/arm/include/md_var.h Wed May 14 17:40:18 2014 (r266058) @@ -63,6 +63,7 @@ enum cpu_class { CPU_CLASS_ARM10E, CPU_CLASS_ARM10EJ, CPU_CLASS_CORTEXA, + CPU_CLASS_KRAIT, CPU_CLASS_SA1, CPU_CLASS_XSCALE, CPU_CLASS_ARM11J, Modified: stable/10/sys/conf/files.arm ============================================================================== --- stable/10/sys/conf/files.arm Wed May 14 17:28:49 2014 (r266057) +++ stable/10/sys/conf/files.arm Wed May 14 17:40:18 2014 (r266058) @@ -6,7 +6,7 @@ arm/arm/blockio.S standard arm/arm/bootconfig.c standard arm/arm/bus_space_asm_generic.S standard arm/arm/busdma_machdep.c optional cpu_arm9 | cpu_arm9e | cpu_fa526 | cpu_sa1100 | cpu_sa1110 | cpu_xscale_80219 | cpu_xscale_80321 | cpu_xscale_81342 | cpu_xscale_ixp425 | cpu_xscale_ixp435 | cpu_xscale_pxa2x0 -arm/arm/busdma_machdep-v6.c optional cpu_arm1136 | cpu_arm1176 | cpu_cortexa | cpu_mv_pj4b +arm/arm/busdma_machdep-v6.c optional cpu_arm1136 | cpu_arm1176 | cpu_cortexa | cpu_mv_pj4b | cpu_krait arm/arm/copystr.S standard arm/arm/cpufunc.c standard arm/arm/cpufunc_asm.S standard @@ -36,7 +36,7 @@ arm/arm/nexus.c standard arm/arm/pl190.c optional pl190 arm/arm/pl310.c optional pl310 arm/arm/pmap.c optional cpu_arm9 | cpu_arm9e | cpu_fa526 | cpu_sa1100 | cpu_sa1110 | cpu_xscale_80219 | cpu_xscale_80321 | cpu_xscale_81342 | cpu_xscale_ixp425 | cpu_xscale_ixp435 | cpu_xscale_pxa2x0 -arm/arm/pmap-v6.c optional cpu_arm1136 | cpu_arm1176 | cpu_cortexa | cpu_mv_pj4b +arm/arm/pmap-v6.c optional cpu_arm1136 | cpu_arm1176 | cpu_cortexa | cpu_mv_pj4b | cpu_krait arm/arm/sc_machdep.c optional sc arm/arm/setcpsr.S standard arm/arm/setstack.s standard Modified: stable/10/sys/conf/options.arm ============================================================================== --- stable/10/sys/conf/options.arm Wed May 14 17:28:49 2014 (r266057) +++ stable/10/sys/conf/options.arm Wed May 14 17:40:18 2014 (r266058) @@ -13,6 +13,7 @@ CPU_ARM9E opt_global.h CPU_ARM1136 opt_global.h CPU_ARM1176 opt_global.h CPU_CORTEXA opt_global.h +CPU_KRAIT opt_global.h CPU_FA526 opt_global.h CPU_FA626TE opt_global.h CPU_MV_PJ4B opt_global.h From owner-svn-src-stable@FreeBSD.ORG Wed May 14 17:43:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A2C07C1; Wed, 14 May 2014 17:43:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46C1927B5; Wed, 14 May 2014 17:43:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EHhoMY056396; Wed, 14 May 2014 17:43:50 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EHhoL5056395; Wed, 14 May 2014 17:43:50 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405141743.s4EHhoL5056395@svn.freebsd.org> From: Ian Lepore Date: Wed, 14 May 2014 17:43:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266059 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 17:43:50 -0000 Author: ian Date: Wed May 14 17:43:49 2014 New Revision: 266059 URL: http://svnweb.freebsd.org/changeset/base/266059 Log: MFC r260118 Delete echoed doesn't rub out the previous character, so always use instead. This fixes hitting DELETE instead of BACKSPACE at mountroot> prompt. Modified: stable/10/sys/kern/kern_cons.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_cons.c ============================================================================== --- stable/10/sys/kern/kern_cons.c Wed May 14 17:40:18 2014 (r266058) +++ stable/10/sys/kern/kern_cons.c Wed May 14 17:43:49 2014 (r266059) @@ -432,10 +432,8 @@ cngets(char *cp, size_t size, int visibl case '\b': case '\177': if (lp > cp) { - if (visible) { - cnputc(c); - cnputs(" \b"); - } + if (visible) + cnputs("\b \b"); lp--; } continue; From owner-svn-src-stable@FreeBSD.ORG Wed May 14 17:45:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 955728F5; Wed, 14 May 2014 17:45:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75F0427BD; Wed, 14 May 2014 17:45:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EHjBLT056715; Wed, 14 May 2014 17:45:11 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EHjBn9056713; Wed, 14 May 2014 17:45:11 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405141745.s4EHjBn9056713@svn.freebsd.org> From: Michael Tuexen Date: Wed, 14 May 2014 17:45:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266060 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 17:45:11 -0000 Author: tuexen Date: Wed May 14 17:45:10 2014 New Revision: 266060 URL: http://svnweb.freebsd.org/changeset/base/266060 Log: MFC r257804: Get rid of the artification limitation enforced by SCTP_AUTH_RANDOM_SIZE_MAX. This was suggested by Andrew Galante. Modified: stable/9/sys/netinet/sctp_auth.c stable/9/sys/netinet/sctp_auth.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_auth.c ============================================================================== --- stable/9/sys/netinet/sctp_auth.c Wed May 14 17:43:49 2014 (r266059) +++ stable/9/sys/netinet/sctp_auth.c Wed May 14 17:45:10 2014 (r266060) @@ -333,10 +333,6 @@ sctp_generate_random_key(uint32_t keylen { sctp_key_t *new_key; - /* validate keylen */ - if (keylen > SCTP_AUTH_RANDOM_SIZE_MAX) - keylen = SCTP_AUTH_RANDOM_SIZE_MAX; - new_key = sctp_alloc_key(keylen); if (new_key == NULL) { /* out of memory */ @@ -374,7 +370,7 @@ sctp_compare_key(sctp_key_t * key1, sctp uint32_t i; uint32_t key1len, key2len; uint8_t *key_1, *key_2; - uint8_t temp[SCTP_AUTH_RANDOM_SIZE_MAX]; + uint8_t val1, val2; /* sanity/length check */ key1len = sctp_get_keylen(key1); @@ -386,38 +382,24 @@ sctp_compare_key(sctp_key_t * key1, sctp else if (key2len == 0) return (1); - if (key1len != key2len) { - if (key1len >= key2len) - maxlen = key1len; - else - maxlen = key2len; - bzero(temp, maxlen); - if (key1len < maxlen) { - /* prepend zeroes to key1 */ - bcopy(key1->key, temp + (maxlen - key1len), key1len); - key_1 = temp; - key_2 = key2->key; - } else { - /* prepend zeroes to key2 */ - bcopy(key2->key, temp + (maxlen - key2len), key2len); - key_1 = key1->key; - key_2 = temp; - } + if (key1len < key2len) { + maxlen = key2len; } else { maxlen = key1len; - key_1 = key1->key; - key_2 = key2->key; } - + key_1 = key1->key; + key_2 = key2->key; + /* check for numeric equality */ for (i = 0; i < maxlen; i++) { - if (*key_1 > *key_2) + /* left-pad with zeros */ + val1 = (i < (maxlen - key1len)) ? 0 : *(key_1++); + val2 = (i < (maxlen - key2len)) ? 0 : *(key_2++); + if (val1 > val2) { return (1); - else if (*key_1 < *key_2) + } else if (val1 < val2) { return (-1); - key_1++; - key_2++; + } } - /* keys are equal value, so check lengths */ if (key1len == key2len) return (0); Modified: stable/9/sys/netinet/sctp_auth.h ============================================================================== --- stable/9/sys/netinet/sctp_auth.h Wed May 14 17:43:49 2014 (r266059) +++ stable/9/sys/netinet/sctp_auth.h Wed May 14 17:45:10 2014 (r266060) @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); /* random sizes */ #define SCTP_AUTH_RANDOM_SIZE_DEFAULT 32 #define SCTP_AUTH_RANDOM_SIZE_REQUIRED 32 -#define SCTP_AUTH_RANDOM_SIZE_MAX 256 /* union of all supported HMAC algorithm contexts */ typedef union sctp_hash_context { From owner-svn-src-stable@FreeBSD.ORG Wed May 14 18:01:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 615D0EC6; Wed, 14 May 2014 18:01:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D95D291A; Wed, 14 May 2014 18:01:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EI1j9C063008; Wed, 14 May 2014 18:01:45 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EI1ivL063005; Wed, 14 May 2014 18:01:44 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405141801.s4EI1ivL063005@svn.freebsd.org> From: Michael Tuexen Date: Wed, 14 May 2014 18:01:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266061 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 18:01:45 -0000 Author: tuexen Date: Wed May 14 18:01:44 2014 New Revision: 266061 URL: http://svnweb.freebsd.org/changeset/base/266061 Log: MFC r258221: Cleanups which result in fixes which have been made upstream and where partially suggested by Andrew Galante. There is no functional change in FreeBSD. Modified: stable/9/sys/netinet/sctp_bsd_addr.c stable/9/sys/netinet/sctp_pcb.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_bsd_addr.c ============================================================================== --- stable/9/sys/netinet/sctp_bsd_addr.c Wed May 14 17:45:10 2014 (r266060) +++ stable/9/sys/netinet/sctp_bsd_addr.c Wed May 14 18:01:44 2014 (r266061) @@ -96,22 +96,12 @@ sctp_iterator_thread(void *v SCTP_UNUSED void sctp_startup_iterator(void) { - static int called = 0; - int ret; - - if (called) { + if (sctp_it_ctl.thread_proc) { /* You only get one */ return; } - /* init the iterator head */ - called = 1; - sctp_it_ctl.iterator_running = 0; - sctp_it_ctl.iterator_flags = 0; - sctp_it_ctl.cur_it = NULL; - SCTP_ITERATOR_LOCK_INIT(); - SCTP_IPI_ITERATOR_WQ_INIT(); TAILQ_INIT(&sctp_it_ctl.iteratorhead); - ret = kproc_create(sctp_iterator_thread, + kproc_create(sctp_iterator_thread, (void *)NULL, &sctp_it_ctl.thread_proc, RFPROC, Modified: stable/9/sys/netinet/sctp_pcb.c ============================================================================== --- stable/9/sys/netinet/sctp_pcb.c Wed May 14 17:45:10 2014 (r266060) +++ stable/9/sys/netinet/sctp_pcb.c Wed May 14 18:01:44 2014 (r266061) @@ -5861,7 +5861,8 @@ sctp_pcb_init() for (i = 0; i < SCTP_STACK_VTAG_HASH_SIZE; i++) { LIST_INIT(&SCTP_BASE_INFO(vtag_timewait)[i]); } - + SCTP_ITERATOR_LOCK_INIT(); + SCTP_IPI_ITERATOR_WQ_INIT(); sctp_startup_iterator(); #if defined(__FreeBSD__) && defined(SCTP_MCORE_INPUT) && defined(SMP) @@ -5890,35 +5891,31 @@ sctp_pcb_finish(void) struct sctp_tagblock *twait_block, *prev_twait_block; struct sctp_laddr *wi, *nwi; int i; + struct sctp_iterator *it, *nit; /* - * Free BSD the it thread never exits but we do clean up. The only - * way freebsd reaches here if we have VRF's but we still add the - * ifdef to make it compile on old versions. + * In FreeBSD the iterator thread never exits but we do clean up. + * The only way FreeBSD reaches here is if we have VRF's but we + * still add the ifdef to make it compile on old versions. */ - { - struct sctp_iterator *it, *nit; - - SCTP_IPI_ITERATOR_WQ_LOCK(); - TAILQ_FOREACH_SAFE(it, &sctp_it_ctl.iteratorhead, sctp_nxt_itr, nit) { - if (it->vn != curvnet) { - continue; - } - TAILQ_REMOVE(&sctp_it_ctl.iteratorhead, it, sctp_nxt_itr); - if (it->function_atend != NULL) { - (*it->function_atend) (it->pointer, it->val); - } - SCTP_FREE(it, SCTP_M_ITER); - } - SCTP_IPI_ITERATOR_WQ_UNLOCK(); - SCTP_ITERATOR_LOCK(); - if ((sctp_it_ctl.cur_it) && - (sctp_it_ctl.cur_it->vn == curvnet)) { - sctp_it_ctl.iterator_flags |= SCTP_ITERATOR_STOP_CUR_IT; + SCTP_IPI_ITERATOR_WQ_LOCK(); + TAILQ_FOREACH_SAFE(it, &sctp_it_ctl.iteratorhead, sctp_nxt_itr, nit) { + if (it->vn != curvnet) { + continue; + } + TAILQ_REMOVE(&sctp_it_ctl.iteratorhead, it, sctp_nxt_itr); + if (it->function_atend != NULL) { + (*it->function_atend) (it->pointer, it->val); } - SCTP_ITERATOR_UNLOCK(); + SCTP_FREE(it, SCTP_M_ITER); } - + SCTP_IPI_ITERATOR_WQ_UNLOCK(); + SCTP_ITERATOR_LOCK(); + if ((sctp_it_ctl.cur_it) && + (sctp_it_ctl.cur_it->vn == curvnet)) { + sctp_it_ctl.iterator_flags |= SCTP_ITERATOR_STOP_CUR_IT; + } + SCTP_ITERATOR_UNLOCK(); SCTP_OS_TIMER_STOP(&SCTP_BASE_INFO(addr_wq_timer.timer)); SCTP_WQ_ADDR_LOCK(); LIST_FOREACH_SAFE(wi, &SCTP_BASE_INFO(addr_wq), sctp_nxt_addr, nwi) { From owner-svn-src-stable@FreeBSD.ORG Wed May 14 18:12:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A83CD21D; Wed, 14 May 2014 18:12:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 94CEC2A87; Wed, 14 May 2014 18:12:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EICgCU070133; Wed, 14 May 2014 18:12:42 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EICg3p070132; Wed, 14 May 2014 18:12:42 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405141812.s4EICg3p070132@svn.freebsd.org> From: Michael Tuexen Date: Wed, 14 May 2014 18:12:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266062 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 18:12:42 -0000 Author: tuexen Date: Wed May 14 18:12:42 2014 New Revision: 266062 URL: http://svnweb.freebsd.org/changeset/base/266062 Log: MFC r258224: When determining if an address belongs to an stcb, take the address family into account for wildcard bound endpoints. Modified: stable/9/sys/netinet/sctp_pcb.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_pcb.c ============================================================================== --- stable/9/sys/netinet/sctp_pcb.c Wed May 14 18:01:44 2014 (r266061) +++ stable/9/sys/netinet/sctp_pcb.c Wed May 14 18:12:42 2014 (r266062) @@ -875,6 +875,9 @@ sctp_does_stcb_own_this_addr(struct sctp */ continue; } + if (sctp_ifa->address.sa.sa_family != to->sa_family) { + continue; + } switch (sctp_ifa->address.sa.sa_family) { #ifdef INET case AF_INET: From owner-svn-src-stable@FreeBSD.ORG Wed May 14 18:14:17 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C08B33BD; Wed, 14 May 2014 18:14:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD7512AA3; Wed, 14 May 2014 18:14:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EIEHUh070455; Wed, 14 May 2014 18:14:17 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EIEHRQ070454; Wed, 14 May 2014 18:14:17 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405141814.s4EIEHRQ070454@svn.freebsd.org> From: Michael Tuexen Date: Wed, 14 May 2014 18:14:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266063 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 18:14:17 -0000 Author: tuexen Date: Wed May 14 18:14:17 2014 New Revision: 266063 URL: http://svnweb.freebsd.org/changeset/base/266063 Log: MFC r258228: Remove a stray write operation. Modified: stable/9/sys/netinet/sctp_indata.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_indata.c ============================================================================== --- stable/9/sys/netinet/sctp_indata.c Wed May 14 18:12:42 2014 (r266062) +++ stable/9/sys/netinet/sctp_indata.c Wed May 14 18:14:17 2014 (r266063) @@ -1787,7 +1787,6 @@ failed_express_del: asoc->highest_tsn_inside_nr_map = tsn; } SCTP_STAT_INCR(sctps_recvexpressm); - control->sinfo_tsn = tsn; asoc->tsn_last_delivered = tsn; asoc->fragment_flags = chunk_flags; asoc->tsn_of_pdapi_last_delivered = tsn; From owner-svn-src-stable@FreeBSD.ORG Wed May 14 18:15:55 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0C9D520; Wed, 14 May 2014 18:15:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D1EF2ABA; Wed, 14 May 2014 18:15:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EIFtt1070746; Wed, 14 May 2014 18:15:55 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EIFtS2070745; Wed, 14 May 2014 18:15:55 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405141815.s4EIFtS2070745@svn.freebsd.org> From: Michael Tuexen Date: Wed, 14 May 2014 18:15:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266064 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 18:15:55 -0000 Author: tuexen Date: Wed May 14 18:15:55 2014 New Revision: 266064 URL: http://svnweb.freebsd.org/changeset/base/266064 Log: MFC r258235: Use SCTP_PR_SCTP_TTL when the user provides a positive timetolive in sctp_sendmsg(). Modified: stable/9/sys/netinet/sctp_output.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_output.c ============================================================================== --- stable/9/sys/netinet/sctp_output.c Wed May 14 18:14:17 2014 (r266063) +++ stable/9/sys/netinet/sctp_output.c Wed May 14 18:15:55 2014 (r266064) @@ -3389,7 +3389,11 @@ sctp_find_cmsg(int c_type, void *data, s return (found); } m_copydata(control, at + CMSG_ALIGN(sizeof(cmh)), sizeof(struct sctp_prinfo), (caddr_t)&prinfo); - sndrcvinfo->sinfo_timetolive = prinfo.pr_value; + if (prinfo.pr_policy != SCTP_PR_SCTP_NONE) { + sndrcvinfo->sinfo_timetolive = prinfo.pr_value; + } else { + sndrcvinfo->sinfo_timetolive = 0; + } sndrcvinfo->sinfo_flags |= prinfo.pr_policy; break; case SCTP_AUTHINFO: @@ -6078,13 +6082,13 @@ sctp_set_prsctp_policy(struct sctp_strea { /* * We assume that the user wants PR_SCTP_TTL if the user provides a - * positive lifetime but does not specify any PR_SCTP policy. This - * is a BAD assumption and causes problems at least with the - * U-Vancovers MPI folks. I will change this to be no policy means - * NO PR-SCTP. + * positive lifetime but does not specify any PR_SCTP policy. */ if (PR_SCTP_ENABLED(sp->sinfo_flags)) { sp->act_flags |= PR_SCTP_POLICY(sp->sinfo_flags); + } else if (sp->timetolive > 0) { + sp->sinfo_flags |= SCTP_PR_SCTP_TTL; + sp->act_flags |= PR_SCTP_POLICY(sp->sinfo_flags); } else { return; } From owner-svn-src-stable@FreeBSD.ORG Wed May 14 18:16:34 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17E9865F; Wed, 14 May 2014 18:16:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEA1C2AC6; Wed, 14 May 2014 18:16:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EIGXF1070891; Wed, 14 May 2014 18:16:33 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EIGXEF070887; Wed, 14 May 2014 18:16:33 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405141816.s4EIGXEF070887@svn.freebsd.org> From: Ian Lepore Date: Wed, 14 May 2014 18:16:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266065 - in stable/10/sys: arm/at91 conf dev/nand X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 18:16:34 -0000 Author: ian Date: Wed May 14 18:16:32 2014 New Revision: 266065 URL: http://svnweb.freebsd.org/changeset/base/266065 Log: MFC r260092, r260093, r260121, r260180, Allow AT91_MCI_ALLOW_OVERCLOCK to be an option in kernel config files. Set the SoC name for the atmelbus name. Add support for Samsung K9F2G08U0A (256MiB SLC) NAND Comment updates. Modified: stable/10/sys/arm/at91/at91.c stable/10/sys/conf/options.arm stable/10/sys/dev/nand/nand_id.c stable/10/sys/dev/nand/nandbus.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/at91/at91.c ============================================================================== --- stable/10/sys/arm/at91/at91.c Wed May 14 18:15:55 2014 (r266064) +++ stable/10/sys/arm/at91/at91.c Wed May 14 18:16:32 2014 (r266065) @@ -231,7 +231,7 @@ static int at91_probe(device_t dev) { - device_set_desc(dev, "AT91 device bus"); + device_set_desc(dev, soc_info.name); return (BUS_PROBE_NOWILDCARD); } Modified: stable/10/sys/conf/options.arm ============================================================================== --- stable/10/sys/conf/options.arm Wed May 14 18:15:55 2014 (r266064) +++ stable/10/sys/conf/options.arm Wed May 14 18:16:32 2014 (r266065) @@ -55,6 +55,7 @@ XSACLE_DISABLE_CCNT opt_timer.h VERBOSE_INIT_ARM opt_global.h VM_MAXUSER_ADDRESS opt_global.h AT91_ATE_USE_RMII opt_at91.h +AT91_MCI_ALLOW_OVERCLOCK opt_at91.h AT91_MCI_HAS_4WIRE opt_at91.h AT91_MCI_SLOT_B opt_at91.h GFB_DEBUG opt_gfb.h Modified: stable/10/sys/dev/nand/nand_id.c ============================================================================== --- stable/10/sys/dev/nand/nand_id.c Wed May 14 18:15:55 2014 (r266064) +++ stable/10/sys/dev/nand/nand_id.c Wed May 14 18:16:32 2014 (r266065) @@ -39,6 +39,8 @@ struct nand_params nand_ids[] = { 0x400, 0x800, 0x40, 0x40, 0 }, { { NAND_MAN_SAMSUNG, 0xdc }, "Samsung NAND 512MiB 3,3V 8-bit", 0x200, 0x800, 0x40, 0x40, 0 }, + { { NAND_MAN_SAMSUNG, 0xda }, "Samsung NAND 256MiB 3,3V 8-bit", + 0x100, 0x800, 0x40, 0x40, 0 }, { { NAND_MAN_HYNIX, 0x76 }, "Hynix NAND 64MiB 3,3V 8-bit", 0x40, 0x200, 0x10, 0x20, 0 }, { { NAND_MAN_HYNIX, 0xdc }, "Hynix NAND 512MiB 3,3V 8-bit", Modified: stable/10/sys/dev/nand/nandbus.c ============================================================================== --- stable/10/sys/dev/nand/nandbus.c Wed May 14 18:15:55 2014 (r266064) +++ stable/10/sys/dev/nand/nandbus.c Wed May 14 18:16:32 2014 (r266065) @@ -503,7 +503,7 @@ nandbus_wait_ready(device_t dev, uint8_t struct timeval tv, tv2; tv2.tv_sec = 0; - tv2.tv_usec = 50 * 5000; /* 10ms */ + tv2.tv_usec = 50 * 5000; /* 250ms */ getmicrotime(&tv); timevaladd(&tv, &tv2); From owner-svn-src-stable@FreeBSD.ORG Wed May 14 18:18:17 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F13827C2; Wed, 14 May 2014 18:18:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD8C22AE1; Wed, 14 May 2014 18:18:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EIIGN9071149; Wed, 14 May 2014 18:18:16 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EIIGT6071148; Wed, 14 May 2014 18:18:16 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405141818.s4EIIGT6071148@svn.freebsd.org> From: Michael Tuexen Date: Wed, 14 May 2014 18:18:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266066 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 18:18:17 -0000 Author: tuexen Date: Wed May 14 18:18:16 2014 New Revision: 266066 URL: http://svnweb.freebsd.org/changeset/base/266066 Log: MFC r258574 from rodrigc@ Only initialize some mutexes for the default VNET. In r208160, sctp_it_ctl was made a global variable, across all VNETs. However, sctp_init() is called for every VNET that is created. This results in the same global mutexes which are part of sctp_it_ctl being initialized. This can result in crashes if many jails are created. To reproduce the problem: (1) Take a GENERIC kernel config, and add options for: VIMAGE, WITNESS, INVARIANTS. (2) Run this command in a loop: jail -l -u root -c path=/ name=foo persist vnet && jexec foo ifconfig lo0 127.0.0.1/8 && jail -r foo (see http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021280.html ) Witness will warn about the same mutex being initialized. Fix the problem by only initializing these mutexes in the default VNET. Modified: stable/9/sys/netinet/sctp_pcb.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_pcb.c ============================================================================== --- stable/9/sys/netinet/sctp_pcb.c Wed May 14 18:16:32 2014 (r266065) +++ stable/9/sys/netinet/sctp_pcb.c Wed May 14 18:18:16 2014 (r266066) @@ -5864,8 +5864,14 @@ sctp_pcb_init() for (i = 0; i < SCTP_STACK_VTAG_HASH_SIZE; i++) { LIST_INIT(&SCTP_BASE_INFO(vtag_timewait)[i]); } - SCTP_ITERATOR_LOCK_INIT(); - SCTP_IPI_ITERATOR_WQ_INIT(); + /* + * Only initialize non-VNET global mutexes for the + * default instance. + */ + if (IS_DEFAULT_VNET(curvnet)) { + SCTP_ITERATOR_LOCK_INIT(); + SCTP_IPI_ITERATOR_WQ_INIT(); + } sctp_startup_iterator(); #if defined(__FreeBSD__) && defined(SCTP_MCORE_INPUT) && defined(SMP) From owner-svn-src-stable@FreeBSD.ORG Wed May 14 18:20:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A770692C; Wed, 14 May 2014 18:20:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79B6E2AFA; Wed, 14 May 2014 18:20:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EIKaMf073650; Wed, 14 May 2014 18:20:36 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EIKa5a073648; Wed, 14 May 2014 18:20:36 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405141820.s4EIKa5a073648@svn.freebsd.org> From: Michael Tuexen Date: Wed, 14 May 2014 18:20:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266067 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 18:20:36 -0000 Author: tuexen Date: Wed May 14 18:20:35 2014 New Revision: 266067 URL: http://svnweb.freebsd.org/changeset/base/266067 Log: MFC r258765: In http://svnweb.freebsd.org/changeset/base/258221 I introduced a bug which initialized global locks whenever the SCTP stack initialized. This was fixed in http://svnweb.freebsd.org/changeset/base/258574 by rodrigc@. He just initialized the locks for the default vnet. This fix reverts to the old behaviour before r258221, which explicitly makes sure it is only called once, because this works also on other platforms. Modified: stable/9/sys/netinet/sctp_bsd_addr.c stable/9/sys/netinet/sctp_pcb.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_bsd_addr.c ============================================================================== --- stable/9/sys/netinet/sctp_bsd_addr.c Wed May 14 18:18:16 2014 (r266066) +++ stable/9/sys/netinet/sctp_bsd_addr.c Wed May 14 18:20:35 2014 (r266067) @@ -100,6 +100,9 @@ sctp_startup_iterator(void) /* You only get one */ return; } + /* Initialize global locks here, thus only once. */ + SCTP_ITERATOR_LOCK_INIT(); + SCTP_IPI_ITERATOR_WQ_INIT(); TAILQ_INIT(&sctp_it_ctl.iteratorhead); kproc_create(sctp_iterator_thread, (void *)NULL, Modified: stable/9/sys/netinet/sctp_pcb.c ============================================================================== --- stable/9/sys/netinet/sctp_pcb.c Wed May 14 18:18:16 2014 (r266066) +++ stable/9/sys/netinet/sctp_pcb.c Wed May 14 18:20:35 2014 (r266067) @@ -5864,14 +5864,6 @@ sctp_pcb_init() for (i = 0; i < SCTP_STACK_VTAG_HASH_SIZE; i++) { LIST_INIT(&SCTP_BASE_INFO(vtag_timewait)[i]); } - /* - * Only initialize non-VNET global mutexes for the - * default instance. - */ - if (IS_DEFAULT_VNET(curvnet)) { - SCTP_ITERATOR_LOCK_INIT(); - SCTP_IPI_ITERATOR_WQ_INIT(); - } sctp_startup_iterator(); #if defined(__FreeBSD__) && defined(SCTP_MCORE_INPUT) && defined(SMP) From owner-svn-src-stable@FreeBSD.ORG Wed May 14 18:22:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 12AF2A83; Wed, 14 May 2014 18:22:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F384C2B80; Wed, 14 May 2014 18:22:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EIMBJY074832; Wed, 14 May 2014 18:22:11 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EIMBDH074829; Wed, 14 May 2014 18:22:11 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405141822.s4EIMBDH074829@svn.freebsd.org> From: Michael Tuexen Date: Wed, 14 May 2014 18:22:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266068 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 18:22:12 -0000 Author: tuexen Date: Wed May 14 18:22:11 2014 New Revision: 266068 URL: http://svnweb.freebsd.org/changeset/base/266068 Log: MFC r259943: Address some warnings which showed up on the userland version. Modified: stable/9/sys/netinet/sctp_usrreq.c stable/9/sys/netinet/sctputil.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/9/sys/netinet/sctp_usrreq.c Wed May 14 18:20:35 2014 (r266067) +++ stable/9/sys/netinet/sctp_usrreq.c Wed May 14 18:22:11 2014 (r266068) @@ -2788,7 +2788,7 @@ flags_out: if (stcb) { /* simply copy out the sockaddr_storage... */ - int len; + size_t len; len = *optsize; if (len > stcb->asoc.primary_destination->ro._l_addr.sa.sa_len) Modified: stable/9/sys/netinet/sctputil.c ============================================================================== --- stable/9/sys/netinet/sctputil.c Wed May 14 18:20:35 2014 (r266067) +++ stable/9/sys/netinet/sctputil.c Wed May 14 18:22:11 2014 (r266068) @@ -5868,8 +5868,8 @@ get_more_data: goto release; } if ((uio->uio_resid == 0) || - ((in_eeor_mode) && (copied_so_far >= max(so->so_rcv.sb_lowat, 1))) - ) { + ((in_eeor_mode) && + (copied_so_far >= (uint32_t) max(so->so_rcv.sb_lowat, 1)))) { goto release; } /* From owner-svn-src-stable@FreeBSD.ORG Wed May 14 18:23:58 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 22FB8BEB; Wed, 14 May 2014 18:23:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9B572BAB; Wed, 14 May 2014 18:23:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EINvpT075071; Wed, 14 May 2014 18:23:57 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EINv1S075070; Wed, 14 May 2014 18:23:57 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405141823.s4EINv1S075070@svn.freebsd.org> From: Michael Tuexen Date: Wed, 14 May 2014 18:23:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266069 - stable/9/lib/libc/net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 18:23:58 -0000 Author: tuexen Date: Wed May 14 18:23:57 2014 New Revision: 266069 URL: http://svnweb.freebsd.org/changeset/base/266069 Log: MFC r260257: Fix several bugs in sctp_bindx(): * Set errno to EAFNOSUPPORT if an address is provided which is neither AF_INET nor AF_INET6. * Don't modify the arguments. * Don't smash the stack when provided with a non-zero port. * Handle the case correctly where the first address provided is an IPv6 address. Modified: stable/9/lib/libc/net/sctp_sys_calls.c Directory Properties: stable/9/lib/ (props changed) stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/net/sctp_sys_calls.c ============================================================================== --- stable/9/lib/libc/net/sctp_sys_calls.c Wed May 14 18:22:11 2014 (r266068) +++ stable/9/lib/libc/net/sctp_sys_calls.c Wed May 14 18:23:57 2014 (r266069) @@ -233,19 +233,11 @@ sctp_bindx(int sd, struct sockaddr *addr break; default: /* Invalid address family specified. */ - errno = EINVAL; + errno = EAFNOSUPPORT; return (-1); } sa = (struct sockaddr *)((caddr_t)sa + sa->sa_len); } - /* - * Now if there was a port mentioned, assure that the first address - * has that port to make sure it fails or succeeds correctly. - */ - if (sport) { - sin = (struct sockaddr_in *)sa; - sin->sin_port = sport; - } argsz = sizeof(struct sctp_getaddresses) + sizeof(struct sockaddr_storage); if ((gaddrs = (struct sctp_getaddresses *)malloc(argsz)) == NULL) { @@ -257,6 +249,23 @@ sctp_bindx(int sd, struct sockaddr *addr memset(gaddrs, 0, argsz); gaddrs->sget_assoc_id = 0; memcpy(gaddrs->addr, sa, sa->sa_len); + /* + * Now, if there was a port mentioned, assure that the first + * address has that port to make sure it fails or succeeds + * correctly. + */ + if ((i == 0) && (sport != 0)) { + switch (gaddrs->addr->sa_family) { + case AF_INET: + sin = (struct sockaddr_in *)gaddrs->addr; + sin->sin_port = sport; + break; + case AF_INET6: + sin6 = (struct sockaddr_in6 *)gaddrs->addr; + sin6->sin6_port = sport; + break; + } + } if (setsockopt(sd, IPPROTO_SCTP, flags, gaddrs, (socklen_t) argsz) != 0) { free(gaddrs); From owner-svn-src-stable@FreeBSD.ORG Wed May 14 18:25:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0C319D2B; Wed, 14 May 2014 18:25:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E14382BB5; Wed, 14 May 2014 18:25:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EIPEwI075329; Wed, 14 May 2014 18:25:14 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EIPDFb075319; Wed, 14 May 2014 18:25:13 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405141825.s4EIPDFb075319@svn.freebsd.org> From: Ian Lepore Date: Wed, 14 May 2014 18:25:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266070 - in stable/10/sys: arm/arm arm/include arm/versatile dev/ahci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 18:25:15 -0000 Author: ian Date: Wed May 14 18:25:13 2014 New Revision: 266070 URL: http://svnweb.freebsd.org/changeset/base/266070 Log: MFC r260161, r260163, r260165, r260166, r260189 Add polarity and level support to ARM GIC Do not attach to PCI bridges in AHCI driver Use only mapped BIOs on ARM Fix race condition in DELAY for SP804 timer. Modified: stable/10/sys/arm/arm/gic.c stable/10/sys/arm/arm/intr.c stable/10/sys/arm/arm/nexus.c stable/10/sys/arm/include/intr.h stable/10/sys/arm/versatile/sp804.c stable/10/sys/dev/ahci/ahci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/gic.c ============================================================================== --- stable/10/sys/arm/arm/gic.c Wed May 14 18:23:57 2014 (r266069) +++ stable/10/sys/arm/arm/gic.c Wed May 14 18:25:13 2014 (r266070) @@ -83,6 +83,15 @@ __FBSDID("$FreeBSD$"); #define GICC_ABPR 0x001C /* v1 ICCABPR */ #define GICC_IIDR 0x00FC /* v1 ICCIIDR*/ +/* First bit is a polarity bit (0 - low, 1 - high) */ +#define GICD_ICFGR_POL_LOW (0 << 0) +#define GICD_ICFGR_POL_HIGH (1 << 0) +#define GICD_ICFGR_POL_MASK 0x1 +/* Second bit is a trigger bit (0 - level, 1 - edge) */ +#define GICD_ICFGR_TRIG_LVL (0 << 1) +#define GICD_ICFGR_TRIG_EDGE (1 << 1) +#define GICD_ICFGR_TRIG_MASK 0x2 + struct arm_gic_softc { struct resource * gic_res[3]; bus_space_tag_t gic_c_bst; @@ -90,6 +99,9 @@ struct arm_gic_softc { bus_space_handle_t gic_c_bsh; bus_space_handle_t gic_d_bsh; uint8_t ver; + device_t dev; + struct mtx mutex; + uint32_t nirqs; }; static struct resource_spec arm_gic_spec[] = { @@ -109,6 +121,8 @@ static struct arm_gic_softc *arm_gic_sc #define gic_d_write_4(reg, val) \ bus_space_write_4(arm_gic_sc->gic_d_bst, arm_gic_sc->gic_d_bsh, reg, val) +static int gic_config_irq(int irq, enum intr_trigger trig, + enum intr_polarity pol); static void gic_post_filter(void *); static int @@ -157,19 +171,20 @@ arm_gic_attach(device_t dev) struct arm_gic_softc *sc; int i; uint32_t icciidr; - uint32_t nirqs; if (arm_gic_sc) return (ENXIO); sc = device_get_softc(dev); + sc->dev = dev; if (bus_alloc_resources(dev, arm_gic_spec, sc->gic_res)) { device_printf(dev, "could not allocate resources\n"); return (ENXIO); } - arm_post_filter = gic_post_filter; + /* Initialize mutex */ + mtx_init(&sc->mutex, "GIC lock", "", MTX_SPIN); /* Distributor Interface */ sc->gic_d_bst = rman_get_bustag(sc->gic_res[0]); @@ -185,31 +200,35 @@ arm_gic_attach(device_t dev) gic_d_write_4(GICD_CTLR, 0x00); /* Get the number of interrupts */ - nirqs = gic_d_read_4(GICD_TYPER); - nirqs = 32 * ((nirqs & 0x1f) + 1); + sc->nirqs = gic_d_read_4(GICD_TYPER); + sc->nirqs = 32 * ((sc->nirqs & 0x1f) + 1); + + /* Set up function pointers */ + arm_post_filter = gic_post_filter; + arm_config_irq = gic_config_irq; icciidr = gic_c_read_4(GICC_IIDR); - device_printf(dev,"pn 0x%x, arch 0x%x, rev 0x%x, implementer 0x%x nirqs %u\n", + device_printf(dev,"pn 0x%x, arch 0x%x, rev 0x%x, implementer 0x%x sc->nirqs %u\n", icciidr>>20, (icciidr>>16) & 0xF, (icciidr>>12) & 0xf, - (icciidr & 0xfff), nirqs); + (icciidr & 0xfff), sc->nirqs); /* Set all global interrupts to be level triggered, active low. */ - for (i = 32; i < nirqs; i += 32) { - gic_d_write_4(GICD_ICFGR(i >> 5), 0x00000000); + for (i = 32; i < sc->nirqs; i += 16) { + gic_d_write_4(GICD_ICFGR(i >> 4), 0x00000000); } /* Disable all interrupts. */ - for (i = 32; i < nirqs; i += 32) { + for (i = 32; i < sc->nirqs; i += 32) { gic_d_write_4(GICD_ICENABLER(i >> 5), 0xFFFFFFFF); } - for (i = 0; i < nirqs; i += 4) { + for (i = 0; i < sc->nirqs; i += 4) { gic_d_write_4(GICD_IPRIORITYR(i >> 2), 0); gic_d_write_4(GICD_ITARGETSR(i >> 2), 1 << 0 | 1 << 8 | 1 << 16 | 1 << 24); } /* Set all the interrupts to be in Group 0 (secure) */ - for (i = 0; i < nirqs; i += 32) { + for (i = 0; i < sc->nirqs; i += 32) { gic_d_write_4(GICD_IGROUPR(i >> 5), 0); } @@ -290,6 +309,58 @@ arm_unmask_irq(uintptr_t nb) gic_d_write_4(GICD_ISENABLER(nb >> 5), (1UL << (nb & 0x1F))); } +static int +gic_config_irq(int irq, enum intr_trigger trig, + enum intr_polarity pol) +{ + uint32_t reg; + uint32_t mask; + + /* Function is public-accessible, so validate input arguments */ + if ((irq < 0) || (irq >= arm_gic_sc->nirqs)) + goto invalid_args; + if ((trig != INTR_TRIGGER_EDGE) && (trig != INTR_TRIGGER_LEVEL) && + (trig != INTR_TRIGGER_CONFORM)) + goto invalid_args; + if ((pol != INTR_POLARITY_HIGH) && (pol != INTR_POLARITY_LOW) && + (pol != INTR_POLARITY_CONFORM)) + goto invalid_args; + + mtx_lock_spin(&arm_gic_sc->mutex); + + reg = gic_d_read_4(GICD_ICFGR(irq >> 4)); + mask = (reg >> 2*(irq % 16)) & 0x3; + + if (pol == INTR_POLARITY_LOW) { + mask &= ~GICD_ICFGR_POL_MASK; + mask |= GICD_ICFGR_POL_LOW; + } else if (pol == INTR_POLARITY_HIGH) { + mask &= ~GICD_ICFGR_POL_MASK; + mask |= GICD_ICFGR_POL_HIGH; + } + + if (trig == INTR_TRIGGER_LEVEL) { + mask &= ~GICD_ICFGR_TRIG_MASK; + mask |= GICD_ICFGR_TRIG_LVL; + } else if (trig == INTR_TRIGGER_EDGE) { + mask &= ~GICD_ICFGR_TRIG_MASK; + mask |= GICD_ICFGR_TRIG_EDGE; + } + + /* Set mask */ + reg = reg & ~(0x3 << 2*(irq % 16)); + reg = reg | (mask << 2*(irq % 16)); + gic_d_write_4(GICD_ICFGR(irq >> 4), reg); + + mtx_unlock_spin(&arm_gic_sc->mutex); + + return (0); + +invalid_args: + device_printf(arm_gic_sc->dev, "gic_config_irg, invalid parameters\n"); + return (EINVAL); +} + #ifdef SMP void pic_ipi_send(cpuset_t cpus, u_int ipi) Modified: stable/10/sys/arm/arm/intr.c ============================================================================== --- stable/10/sys/arm/arm/intr.c Wed May 14 18:23:57 2014 (r266069) +++ stable/10/sys/arm/arm/intr.c Wed May 14 18:25:13 2014 (r266070) @@ -59,6 +59,8 @@ static struct intr_event *intr_events[NI void arm_handler_execute(struct trapframe *, int); void (*arm_post_filter)(void *) = NULL; +int (*arm_config_irq)(int irq, enum intr_trigger trig, + enum intr_polarity pol) = NULL; /* * Pre-format intrnames into an array of fixed-size strings containing spaces. Modified: stable/10/sys/arm/arm/nexus.c ============================================================================== --- stable/10/sys/arm/arm/nexus.c Wed May 14 18:23:57 2014 (r266069) +++ stable/10/sys/arm/arm/nexus.c Wed May 14 18:25:13 2014 (r266070) @@ -85,6 +85,8 @@ static struct resource *nexus_alloc_reso #endif static int nexus_activate_resource(device_t, device_t, int, int, struct resource *); +static int nexus_config_intr(device_t dev, int irq, enum intr_trigger trig, + enum intr_polarity pol); static int nexus_deactivate_resource(device_t, device_t, int, int, struct resource *); @@ -103,6 +105,7 @@ static device_method_t nexus_methods[] = DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), #endif DEVMETHOD(bus_activate_resource, nexus_activate_resource), + DEVMETHOD(bus_config_intr, nexus_config_intr), DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), DEVMETHOD(bus_setup_intr, nexus_setup_intr), DEVMETHOD(bus_teardown_intr, nexus_teardown_intr), @@ -225,6 +228,18 @@ nexus_alloc_resource(device_t bus, devic #endif static int +nexus_config_intr(device_t dev, int irq, enum intr_trigger trig, + enum intr_polarity pol) +{ + int ret = ENODEV; + + if (arm_config_irq) + ret = (*arm_config_irq)(irq, trig, pol); + + return (ret); +} + +static int nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep) { Modified: stable/10/sys/arm/include/intr.h ============================================================================== --- stable/10/sys/arm/include/intr.h Wed May 14 18:23:57 2014 (r266069) +++ stable/10/sys/arm/include/intr.h Wed May 14 18:25:13 2014 (r266070) @@ -68,6 +68,7 @@ #endif #include +#include int arm_get_next_irq(int); void arm_mask_irq(uintptr_t); @@ -77,6 +78,8 @@ void arm_setup_irqhandler(const char *, void *, int, int, void **); int arm_remove_irqhandler(int, void *); extern void (*arm_post_filter)(void *); +extern int (*arm_config_irq)(int irq, enum intr_trigger trig, + enum intr_polarity pol); void gic_init_secondary(void); Modified: stable/10/sys/arm/versatile/sp804.c ============================================================================== --- stable/10/sys/arm/versatile/sp804.c Wed May 14 18:23:57 2014 (r266069) +++ stable/10/sys/arm/versatile/sp804.c Wed May 14 18:25:13 2014 (r266070) @@ -100,6 +100,7 @@ struct sp804_timer_softc { struct timecounter tc; bool et_enabled; struct eventtimer et; + int timer_initialized; }; /* Read/Write macros for Timer used as timecounter */ @@ -198,6 +199,8 @@ sp804_timer_attach(device_t dev) int rid = 0; int i; uint32_t id, reg; + phandle_t node; + pcell_t clock; sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (sc->mem_res == NULL) { @@ -215,8 +218,12 @@ sp804_timer_attach(device_t dev) return (ENXIO); } - /* TODO: get frequency from FDT */ sc->sysclk_freq = DEFAULT_FREQUENCY; + /* Get the base clock frequency */ + node = ofw_bus_get_node(dev); + if ((OF_getprop(node, "clock-frequency", &clock, sizeof(clock))) > 0) { + sc->sysclk_freq = fdt32_to_cpu(clock); + } /* Setup and enable the timer */ if (bus_setup_intr(dev, sc->irq_res, INTR_TYPE_CLK, @@ -234,8 +241,8 @@ sp804_timer_attach(device_t dev) /* * Timer 1, timecounter */ - sc->tc.tc_frequency = DEFAULT_FREQUENCY; - sc->tc.tc_name = "SP804 Timecouter"; + sc->tc.tc_frequency = sc->sysclk_freq; + sc->tc.tc_name = "SP804 Time Counter"; sc->tc.tc_get_timecount = sp804_timer_tc_get_timecount; sc->tc.tc_poll_pps = NULL; sc->tc.tc_counter_mask = ~0u; @@ -283,6 +290,8 @@ sp804_timer_attach(device_t dev) device_printf(dev, "PrimeCell ID: %08x\n", id); + sc->timer_initialized = 1; + return (0); } @@ -309,10 +318,18 @@ DELAY(int usec) uint32_t first, last; device_t timer_dev; struct sp804_timer_softc *sc; + int timer_initialized = 0; timer_dev = devclass_get_device(sp804_timer_devclass, 0); - if (timer_dev == NULL) { + if (timer_dev) { + sc = device_get_softc(timer_dev); + + if (sc) + timer_initialized = sc->timer_initialized; + } + + if (!timer_initialized) { /* * Timer is not initialized yet */ @@ -323,8 +340,6 @@ DELAY(int usec) return; } - sc = device_get_softc(timer_dev); - /* Get the number of times to count */ counts = usec * ((sc->tc.tc_frequency / 1000000) + 1); Modified: stable/10/sys/dev/ahci/ahci.c ============================================================================== --- stable/10/sys/dev/ahci/ahci.c Wed May 14 18:23:57 2014 (r266069) +++ stable/10/sys/dev/ahci/ahci.c Wed May 14 18:25:13 2014 (r266070) @@ -376,6 +376,13 @@ ahci_probe(device_t dev) uint32_t devid = pci_get_devid(dev); uint8_t revid = pci_get_revid(dev); + /* + * Ensure it is not a PCI bridge (some vendors use + * the same PID and VID in PCI bridge and AHCI cards). + */ + if (pci_get_class(dev) == PCIC_BRIDGE) + return (ENXIO); + /* Is this a possible AHCI candidate? */ if (pci_get_class(dev) == PCIC_STORAGE && pci_get_subclass(dev) == PCIS_STORAGE_SATA && From owner-svn-src-stable@FreeBSD.ORG Wed May 14 18:25:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E4B68E63; Wed, 14 May 2014 18:25:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B778D2BBF; Wed, 14 May 2014 18:25:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EIPoe9075437; Wed, 14 May 2014 18:25:50 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EIPohG075432; Wed, 14 May 2014 18:25:50 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405141825.s4EIPohG075432@svn.freebsd.org> From: Michael Tuexen Date: Wed, 14 May 2014 18:25:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266071 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 18:25:51 -0000 Author: tuexen Date: Wed May 14 18:25:50 2014 New Revision: 266071 URL: http://svnweb.freebsd.org/changeset/base/266071 Log: MFC r262252: Remove redundant code and fix a style error. Modified: stable/9/sys/netinet/sctp_input.c stable/9/sys/netinet/sctp_output.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_input.c ============================================================================== --- stable/9/sys/netinet/sctp_input.c Wed May 14 18:25:13 2014 (r266070) +++ stable/9/sys/netinet/sctp_input.c Wed May 14 18:25:50 2014 (r266071) @@ -439,7 +439,6 @@ sctp_process_init_ack(struct mbuf *m, in /* First verify that we have no illegal param's */ abort_flag = 0; - op_err = NULL; op_err = sctp_arethere_unrecognized_parameters(m, (offset + sizeof(struct sctp_init_chunk)), @@ -1553,8 +1552,7 @@ sctp_process_cookie_existing(struct mbuf return (NULL); } - switch SCTP_GET_STATE - (asoc) { + switch (SCTP_GET_STATE(asoc)) { case SCTP_STATE_COOKIE_WAIT: case SCTP_STATE_COOKIE_ECHOED: /* @@ -1644,7 +1642,7 @@ sctp_process_cookie_existing(struct mbuf * have simply lost the COOKIE-ACK */ break; - } /* end switch */ + } /* end switch */ sctp_stop_all_cookie_timers(stcb); /* * We ignore the return code here.. not sure if we should Modified: stable/9/sys/netinet/sctp_output.c ============================================================================== --- stable/9/sys/netinet/sctp_output.c Wed May 14 18:25:13 2014 (r266070) +++ stable/9/sys/netinet/sctp_output.c Wed May 14 18:25:50 2014 (r266071) @@ -3671,7 +3671,6 @@ sctp_add_cookie(struct mbuf *init, int i int sig_offset; uint16_t cookie_sz; - mret = NULL; mret = sctp_get_mbuf_for_msg((sizeof(struct sctp_state_cookie) + sizeof(struct sctp_paramhdr)), 0, M_DONTWAIT, 1, MT_DATA); @@ -8960,7 +8959,6 @@ sctp_send_cookie_ack(struct sctp_tcb *st struct sctp_chunkhdr *hdr; struct sctp_tmit_chunk *chk; - cookie_ack = NULL; SCTP_TCB_LOCK_ASSERT(stcb); cookie_ack = sctp_get_mbuf_for_msg(sizeof(struct sctp_chunkhdr), 0, M_DONTWAIT, 1, MT_HEADER); From owner-svn-src-stable@FreeBSD.ORG Wed May 14 18:54:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5967DE14; Wed, 14 May 2014 18:54:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39E682E7F; Wed, 14 May 2014 18:54:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EIsamA088807; Wed, 14 May 2014 18:54:36 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EIsYj4088799; Wed, 14 May 2014 18:54:34 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405141854.s4EIsYj4088799@svn.freebsd.org> From: Ian Lepore Date: Wed, 14 May 2014 18:54:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266079 - in stable/10/sys: arm/arm dev/fdt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 18:54:36 -0000 Author: ian Date: Wed May 14 18:54:34 2014 New Revision: 266079 URL: http://svnweb.freebsd.org/changeset/base/266079 Log: MFC r260281, r260282, r260283, r260285 Implement OFW_BUS_MAP_INTR() in terms of the FDT PIC table Reimplement fdt_intr_to_rl() in terms of OFW_BUS_MAP_INTR() and OFW_BUS_CONFIG_INTR(). Use bus_space_map() rather than pmap_mapdev() in nexus_activate_resource(), when running on FDT systems. Unmap memory in nexus_deactivate_resource(). Remove fdt_pic_table code from MIPS, PowerPC, and x86, as it is no longer used by anything. Modified: stable/10/sys/arm/arm/nexus.c stable/10/sys/dev/fdt/fdt_common.c stable/10/sys/dev/fdt/fdt_common.h stable/10/sys/dev/fdt/fdt_mips.c stable/10/sys/dev/fdt/fdt_powerpc.c stable/10/sys/dev/fdt/fdt_x86.c stable/10/sys/dev/fdt/simplebus.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/nexus.c ============================================================================== --- stable/10/sys/arm/arm/nexus.c Wed May 14 18:44:38 2014 (r266078) +++ stable/10/sys/arm/arm/nexus.c Wed May 14 18:54:34 2014 (r266079) @@ -64,7 +64,9 @@ __FBSDID("$FreeBSD$"); #ifdef FDT #include +#include #include +#include "ofw_bus_if.h" #else static MALLOC_DEFINE(M_NEXUSDEV, "nexusdev", "Nexus device"); @@ -94,6 +96,11 @@ static int nexus_setup_intr(device_t dev int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep); static int nexus_teardown_intr(device_t, device_t, struct resource *, void *); +#ifdef FDT +static int nexus_ofw_map_intr(device_t dev, device_t child, phandle_t iparent, + int irq); +#endif + static device_method_t nexus_methods[] = { #ifndef FDT /* Device interface */ @@ -109,6 +116,9 @@ static device_method_t nexus_methods[] = DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), DEVMETHOD(bus_setup_intr, nexus_setup_intr), DEVMETHOD(bus_teardown_intr, nexus_teardown_intr), +#ifdef FDT + DEVMETHOD(ofw_bus_map_intr, nexus_ofw_map_intr), +#endif { 0, 0 } }; @@ -268,35 +278,92 @@ static int nexus_activate_resource(device_t bus, device_t child, int type, int rid, struct resource *r) { + int err; + bus_addr_t paddr; + bus_size_t psize; + bus_space_handle_t vaddr; + + if ((err = rman_activate_resource(r)) != 0) + return (err); + /* * If this is a memory resource, map it into the kernel. */ 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; - - 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; - rman_set_virtual(r, vaddr); + paddr = (bus_addr_t)rman_get_start(r); + psize = (bus_size_t)rman_get_size(r); #ifdef FDT + err = bus_space_map(fdtbus_bs_tag, paddr, psize, 0, &vaddr); + if (err != 0) { + rman_deactivate_resource(r); + return (err); + } rman_set_bustag(r, fdtbus_bs_tag); #else + vaddr = (bus_space_handle_t)pmap_mapdev((vm_offset_t)paddr, + (vm_size_t)psize); + if (vaddr == 0) { + rman_deactivate_resource(r); + return (ENOMEM); + } rman_set_bustag(r, (void *)1); #endif - rman_set_bushandle(r, (bus_space_handle_t) vaddr); + rman_set_virtual(r, (void *)vaddr); + rman_set_bushandle(r, vaddr); } - return (rman_activate_resource(r)); + return (0); } static int nexus_deactivate_resource(device_t bus, device_t child, int type, int rid, - struct resource *res) + struct resource *r) { + bus_size_t psize; + bus_space_handle_t vaddr; + + psize = (bus_size_t)rman_get_size(r); + vaddr = rman_get_bushandle(r); + + if (vaddr != 0) { +#ifdef FDT + bus_space_unmap(fdtbus_bs_tag, vaddr, psize); +#else + pmap_unmapdev((vm_offset_t)vaddr, (vm_size_t)psize); +#endif + rman_set_virtual(r, NULL); + rman_set_bushandle(r, 0); + } - return (rman_deactivate_resource(res)); + return (rman_deactivate_resource(r)); } +#ifdef FDT +static int +nexus_ofw_map_intr(device_t dev, device_t child, phandle_t iparent, int irq) +{ + pcell_t intr[2]; + fdt_pic_decode_t intr_decode; + phandle_t intr_offset; + int i, rv, interrupt, trig, pol; + + intr_offset = OF_xref_phandle(iparent); + intr[0] = cpu_to_fdt32(irq); + + for (i = 0; fdt_pic_table[i] != NULL; i++) { + intr_decode = fdt_pic_table[i]; + rv = intr_decode(intr_offset, intr, &interrupt, &trig, &pol); + + if (rv == 0) { + /* This was recognized as our PIC and decoded. */ + interrupt = FDT_MAP_IRQ(intr_parent, interrupt); + return (interrupt); + } + } + + /* Not in table, so guess */ + interrupt = FDT_MAP_IRQ(intr_parent, fdt32_to_cpu(*intr)); + + return (interrupt); +} +#endif + Modified: stable/10/sys/dev/fdt/fdt_common.c ============================================================================== --- stable/10/sys/dev/fdt/fdt_common.c Wed May 14 18:44:38 2014 (r266078) +++ stable/10/sys/dev/fdt/fdt_common.c Wed May 14 18:54:34 2014 (r266079) @@ -474,104 +474,32 @@ out: } int -fdt_intr_decode(phandle_t intr_parent, pcell_t *intr, int *interrupt, - int *trig, int *pol) -{ - fdt_pic_decode_t intr_decode; - phandle_t intr_offset; - int i, rv; - - intr_offset = OF_xref_phandle(intr_parent); - - for (i = 0; fdt_pic_table[i] != NULL; i++) { - - /* XXX check if pic_handle has interrupt-controller prop? */ - - intr_decode = fdt_pic_table[i]; - rv = intr_decode(intr_offset, intr, interrupt, trig, pol); - - if (rv == 0) { - /* This was recognized as our PIC and decoded. */ - *interrupt = FDT_MAP_IRQ(intr_parent, *interrupt); - return (0); - } - } - - /* Not in table, so guess */ - *interrupt = FDT_MAP_IRQ(intr_parent, fdt32_to_cpu(*intr)); - *trig = INTR_TRIGGER_CONFORM; - *pol = INTR_POLARITY_CONFORM; - - return (0); -} - -int -fdt_intr_to_rl(phandle_t node, struct resource_list *rl, +fdt_intr_to_rl(device_t dev, phandle_t node, struct resource_list *rl, struct fdt_sense_level *intr_sl) { - phandle_t intr_par; - phandle_t iph; - pcell_t *intr; - pcell_t intr_cells; - int interrupt, trig, pol; - int i, intr_num, rv; - - if (OF_getproplen(node, "interrupts") <= 0) - /* Node does not have 'interrupts' property. */ - return (0); - - /* - * Find #interrupt-cells of the interrupt domain. - */ - if (OF_getencprop(node, "interrupt-parent", &iph, sizeof(iph)) <= 0) { - debugf("no intr-parent phandle\n"); - intr_par = OF_parent(node); - } else { - intr_par = OF_xref_phandle(iph); - } - - if (OF_getprop(intr_par, "#interrupt-cells", &intr_cells, - sizeof(intr_cells)) <= 0) { - debugf("no intr-cells defined, defaulting to 1\n"); - intr_cells = 1; - } - else - intr_cells = fdt32_to_cpu(intr_cells); - - intr_num = OF_getprop_alloc(node, "interrupts", - intr_cells * sizeof(pcell_t), (void **)&intr); - if (intr_num <= 0 || intr_num > DI_MAX_INTR_NUM) - return (ERANGE); - - rv = 0; - for (i = 0; i < intr_num; i++) { - - interrupt = -1; - trig = pol = 0; - - if (fdt_intr_decode(iph, &intr[i * intr_cells], - &interrupt, &trig, &pol) != 0) { - rv = ENXIO; - goto out; + phandle_t iparent; + uint32_t *intr, icells; + int nintr, i, k; + + nintr = OF_getencprop_alloc(node, "interrupts", sizeof(*intr), + (void **)&intr); + if (nintr > 0) { + iparent = 0; + OF_searchencprop(node, "interrupt-parent", &iparent, + sizeof(iparent)); + OF_searchencprop(OF_xref_phandle(iparent), "#interrupt-cells", + &icells, sizeof(icells)); + for (i = 0, k = 0; i < nintr; i += icells, k++) { + intr[i] = ofw_bus_map_intr(dev, iparent, intr[i]); + resource_list_add(rl, SYS_RES_IRQ, k, intr[i], intr[i], + 1); + if (icells > 1) + ofw_bus_config_intr(dev, intr[i], intr[i+1]); } - - if (interrupt < 0) { - rv = ERANGE; - goto out; - } - - debugf("decoded intr = %d, trig = %d, pol = %d\n", interrupt, - trig, pol); - - intr_sl[i].trig = trig; - intr_sl[i].pol = pol; - - resource_list_add(rl, SYS_RES_IRQ, i, interrupt, interrupt, 1); + free(intr, M_OFWPROP); } -out: - free(intr, M_OFWPROP); - return (rv); + return (0); } int Modified: stable/10/sys/dev/fdt/fdt_common.h ============================================================================== --- stable/10/sys/dev/fdt/fdt_common.h Wed May 14 18:44:38 2014 (r266078) +++ stable/10/sys/dev/fdt/fdt_common.h Wed May 14 18:54:34 2014 (r266079) @@ -94,8 +94,7 @@ int fdt_get_phyaddr(phandle_t, device_t, int fdt_get_range(phandle_t, int, u_long *, u_long *); int fdt_immr_addr(vm_offset_t); int fdt_regsize(phandle_t, u_long *, u_long *); -int fdt_intr_decode(phandle_t, pcell_t *, int *, int *, int *); -int fdt_intr_to_rl(phandle_t, struct resource_list *, struct fdt_sense_level *); +int fdt_intr_to_rl(device_t, phandle_t, struct resource_list *, struct fdt_sense_level *); int fdt_is_compatible(phandle_t, const char *); int fdt_is_compatible_strict(phandle_t, const char *); int fdt_is_enabled(phandle_t); Modified: stable/10/sys/dev/fdt/fdt_mips.c ============================================================================== --- stable/10/sys/dev/fdt/fdt_mips.c Wed May 14 18:44:38 2014 (r266078) +++ stable/10/sys/dev/fdt/fdt_mips.c Wed May 14 18:54:34 2014 (r266079) @@ -49,45 +49,3 @@ struct fdt_fixup_entry fdt_fixup_table[] { NULL, NULL } }; -/* - * For PIC-free boards, provide a PIC decoder to be used with mips4k CP0 - * interrupt control directly. - */ -static int -fdt_pic_decode_mips4k_cp0(phandle_t node, pcell_t *intr, int *interrupt, - int *trig, int *pol) -{ - - if (!fdt_is_compatible(node, "mips,mips4k")) - return (ENXIO); - - *interrupt = fdt32_to_cpu(intr[0]); - *trig = INTR_TRIGGER_CONFORM; - *pol = INTR_POLARITY_CONFORM; - - return (0); -} - -/* - * CHERI PIC decoder. - */ -static int -fdt_pic_decode_beri(phandle_t node, pcell_t *intr, int *interrupt, - int *trig, int *pol) -{ - - if (!fdt_is_compatible(node, "sri-cambridge,beri-pic")) - return (ENXIO); - - *interrupt = fdt32_to_cpu(intr[0]); - *trig = INTR_TRIGGER_CONFORM; - *pol = INTR_POLARITY_CONFORM; - - return (0); -} - -fdt_pic_decode_t fdt_pic_table[] = { - &fdt_pic_decode_mips4k_cp0, - &fdt_pic_decode_beri, - NULL -}; Modified: stable/10/sys/dev/fdt/fdt_powerpc.c ============================================================================== --- stable/10/sys/dev/fdt/fdt_powerpc.c Wed May 14 18:44:38 2014 (r266078) +++ stable/10/sys/dev/fdt/fdt_powerpc.c Wed May 14 18:54:34 2014 (r266079) @@ -81,89 +81,3 @@ struct fdt_fixup_entry fdt_fixup_table[] { NULL, NULL } }; -static int -fdt_pic_decode_iic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, - int *pol) -{ - if (!fdt_is_compatible(node, "chrp,iic")) - return (ENXIO); - - *interrupt = intr[0]; - - switch (intr[1]) { - case 0: - /* Active L level */ - *trig = INTR_TRIGGER_LEVEL; - *pol = INTR_POLARITY_LOW; - break; - case 1: - /* Active H level */ - *trig = INTR_TRIGGER_LEVEL; - *pol = INTR_POLARITY_HIGH; - break; - case 2: - /* H to L edge */ - *trig = INTR_TRIGGER_EDGE; - *pol = INTR_POLARITY_LOW; - break; - case 3: - /* L to H edge */ - *trig = INTR_TRIGGER_EDGE; - *pol = INTR_POLARITY_HIGH; - break; - default: - *trig = INTR_TRIGGER_CONFORM; - *pol = INTR_POLARITY_CONFORM; - } - return (0); -} - -static int -fdt_pic_decode_openpic(phandle_t node, pcell_t *intr, int *interrupt, - int *trig, int *pol) -{ - - if (!fdt_is_compatible(node, "chrp,open-pic") && - !fdt_is_type(node, "open-pic")) - return (ENXIO); - - /* - * XXX The interrupt number read out from the MPC85XX device tree is - * already offset by 16 to reflect the 'internal' IRQ range shift on - * the OpenPIC. - */ - *interrupt = intr[0]; - - switch (intr[1]) { - case 0: - /* L to H edge */ - *trig = INTR_TRIGGER_EDGE; - *pol = INTR_POLARITY_HIGH; - break; - case 1: - /* Active L level */ - *trig = INTR_TRIGGER_LEVEL; - *pol = INTR_POLARITY_LOW; - break; - case 2: - /* Active H level */ - *trig = INTR_TRIGGER_LEVEL; - *pol = INTR_POLARITY_HIGH; - break; - case 3: - /* H to L edge */ - *trig = INTR_TRIGGER_EDGE; - *pol = INTR_POLARITY_LOW; - break; - default: - *trig = INTR_TRIGGER_CONFORM; - *pol = INTR_POLARITY_CONFORM; - } - return (0); -} - -fdt_pic_decode_t fdt_pic_table[] = { - &fdt_pic_decode_iic, - &fdt_pic_decode_openpic, - NULL -}; Modified: stable/10/sys/dev/fdt/fdt_x86.c ============================================================================== --- stable/10/sys/dev/fdt/fdt_x86.c Wed May 14 18:44:38 2014 (r266078) +++ stable/10/sys/dev/fdt/fdt_x86.c Wed May 14 18:54:34 2014 (r266079) @@ -46,6 +46,3 @@ struct fdt_fixup_entry fdt_fixup_table[] { NULL, NULL } }; -fdt_pic_decode_t fdt_pic_table[] = { - NULL -}; Modified: stable/10/sys/dev/fdt/simplebus.c ============================================================================== --- stable/10/sys/dev/fdt/simplebus.c Wed May 14 18:44:38 2014 (r266078) +++ stable/10/sys/dev/fdt/simplebus.c Wed May 14 18:54:34 2014 (r266079) @@ -196,7 +196,7 @@ simplebus_attach(device_t dev) continue; } - if (fdt_intr_to_rl(dt_child, &di->di_res, di->di_intr_sl)) { + if (fdt_intr_to_rl(dev, dt_child, &di->di_res, di->di_intr_sl)) { device_printf(dev, "%s: could not process " "'interrupts' property\n", di->di_ofw.obd_name); resource_list_free(&di->di_res); From owner-svn-src-stable@FreeBSD.ORG Wed May 14 18:57:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9C8E0F7C; Wed, 14 May 2014 18:57:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 895722EA0; Wed, 14 May 2014 18:57:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EIv9sp089212; Wed, 14 May 2014 18:57:09 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EIv9XU089211; Wed, 14 May 2014 18:57:09 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405141857.s4EIv9XU089211@svn.freebsd.org> From: Michael Tuexen Date: Wed, 14 May 2014 18:57:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266080 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 18:57:09 -0000 Author: tuexen Date: Wed May 14 18:57:09 2014 New Revision: 266080 URL: http://svnweb.freebsd.org/changeset/base/266080 Log: MFC r263094: SCTP uses CRC32C and not Adler anymore. While there change the reference to RFC 4960. This does not change any code, just comments. Modified: stable/9/sys/netinet/sctp.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp.h ============================================================================== --- stable/9/sys/netinet/sctp.h Wed May 14 18:54:34 2014 (r266079) +++ stable/9/sys/netinet/sctp.h Wed May 14 18:57:09 2014 (r266080) @@ -43,13 +43,13 @@ __FBSDID("$FreeBSD$"); #define SCTP_PACKED __attribute__((packed)) /* - * SCTP protocol - RFC2960. + * SCTP protocol - RFC4960. */ struct sctphdr { uint16_t src_port; /* source port */ uint16_t dest_port; /* destination port */ uint32_t v_tag; /* verification tag of packet */ - uint32_t checksum; /* Adler32 C-Sum */ + uint32_t checksum; /* CRC32C checksum */ /* chunks follow... */ } SCTP_PACKED; From owner-svn-src-stable@FreeBSD.ORG Wed May 14 19:00:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B00FC199; Wed, 14 May 2014 19:00:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82E782EC9; Wed, 14 May 2014 19:00:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EJ02bn089939; Wed, 14 May 2014 19:00:02 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EJ02OO089938; Wed, 14 May 2014 19:00:02 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405141900.s4EJ02OO089938@svn.freebsd.org> From: Michael Tuexen Date: Wed, 14 May 2014 19:00:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266081 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 19:00:02 -0000 Author: tuexen Date: Wed May 14 19:00:01 2014 New Revision: 266081 URL: http://svnweb.freebsd.org/changeset/base/266081 Log: MFC r263096: Put the offset of the CRC32C in csum_data instead of 0. The virtio driver needs the offset to be stored in csum_data, like in the case for UDP and TCP. The virtio problem was reported by Niu Zhixiong , who helped in debugging and testing the patch. Modified: stable/9/sys/netinet/sctp_output.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_output.c ============================================================================== --- stable/9/sys/netinet/sctp_output.c Wed May 14 18:57:09 2014 (r266080) +++ stable/9/sys/netinet/sctp_output.c Wed May 14 19:00:01 2014 (r266081) @@ -4108,7 +4108,7 @@ sctp_lowlevel_chunk_output(struct sctp_i SCTP_STAT_INCR(sctps_sendnocrc); #else m->m_pkthdr.csum_flags = CSUM_SCTP; - m->m_pkthdr.csum_data = 0; + m->m_pkthdr.csum_data = offsetof(struct sctphdr, checksum); SCTP_STAT_INCR(sctps_sendhwcrc); #endif } @@ -4457,7 +4457,7 @@ sctp_lowlevel_chunk_output(struct sctp_i SCTP_STAT_INCR(sctps_sendnocrc); #else m->m_pkthdr.csum_flags = CSUM_SCTP_IPV6; - m->m_pkthdr.csum_data = 0; + m->m_pkthdr.csum_data = offsetof(struct sctphdr, checksum); SCTP_STAT_INCR(sctps_sendhwcrc); #endif } @@ -11007,7 +11007,7 @@ sctp_send_resp_msg(struct sockaddr *src, SCTP_STAT_INCR(sctps_sendnocrc); #else mout->m_pkthdr.csum_flags = CSUM_SCTP; - mout->m_pkthdr.csum_data = 0; + mout->m_pkthdr.csum_data = offsetof(struct sctphdr, checksum); SCTP_STAT_INCR(sctps_sendhwcrc); #endif } @@ -11037,7 +11037,7 @@ sctp_send_resp_msg(struct sockaddr *src, SCTP_STAT_INCR(sctps_sendnocrc); #else mout->m_pkthdr.csum_flags = CSUM_SCTP_IPV6; - mout->m_pkthdr.csum_data = 0; + mout->m_pkthdr.csum_data = offsetof(struct sctphdr, checksum); SCTP_STAT_INCR(sctps_sendhwcrc); #endif } From owner-svn-src-stable@FreeBSD.ORG Wed May 14 19:19:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4179A813; Wed, 14 May 2014 19:19:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A42F20C4; Wed, 14 May 2014 19:19:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EJJ3U0003542; Wed, 14 May 2014 19:19:03 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EJIxOC003489; Wed, 14 May 2014 19:18:59 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405141918.s4EJIxOC003489@svn.freebsd.org> From: Ian Lepore Date: Wed, 14 May 2014 19:18:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266084 - in stable/10/sys: arm/allwinner arm/arm arm/broadcom/bcm2835 arm/conf arm/freescale/imx arm/include arm/lpc arm/mv arm/tegra arm/ti arm/versatile arm/xilinx boot/fdt/dts conf ... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 19:19:03 -0000 Author: ian Date: Wed May 14 19:18:58 2014 New Revision: 266084 URL: http://svnweb.freebsd.org/changeset/base/266084 Log: MFC r257738, r259202, r258410, r260288, r260292, r260294, r260320, r260323, r260326, r260327, r260331, r260333, r260340, r260371, r260372, r260373, r260374, r260375 Add common bus_space tag definition shared for most supported ARMv6/v7 SoCs. Correct license statements to reflect the fact that these files were all derived from sys/arm/mv/bus_space.c. In pmap_unmapdev(), remember the size, and use that as an argument to kva_free(), or we'd end up always passing it a size of 0 In pmap_mapdev(), first check whether a static mapping exists, Convert TI static device mapping to use the new arm_devmap_add_entry(), Use the common armv6 fdt_bus_tag defintion for tegra instead of a local copy. Eliminate use of fdt_immr_addr(), it's not needed for tegra Convert lpc from using fdt_immr style to arm_devmap_add_entry() to make static device mappings. Retire machine/fdt.h as a header used by MI code, as its function is now obsolete. This involves the following pieces: - Remove it entirely on PowerPC, where it is not used by MD code either - Remove all references to machine/fdt.h in non-architecture-specific code (aside from uart_cpu_fdt.c, shared by ARM and MIPS, and so is somewhat non-arch-specific). - Fix code relying on header pollution from machine/fdt.h includes - Legacy fdtbus.c (still used on x86 FDT systems) now passes resource requests to its parent (nexus). This allows x86 FDT devices to allocate both memory and IO requests and removes the last notionally MI use of fdtbus_bs_tag. - On those architectures that retain a machine/fdt.h, unused bits like FDT_MAP_IRQ and FDT_INTR_MAX have been removed. Add #include to a few files that used to get it via pollution Enable the mv cesa security/crypto device by providing the required property in the dts source, and adding the right devices to the kernel config. Remove dev/fdt/fdt_pci.c, which was code specific to Marvell ARM SoCs, related to setting up static device mappings. Since it was only used by arm/mv/mv_pci.c, it's now just static functions within that file, plus one public function that gets called only from arm/mv/mv_machdep.c. Switch RPi to using arm_devmap_add_entry() to set up static device mapping. Allow 'no static device mappings' to potentially work. Don't try to find a static mapping before calling pmap_mapdev(), that logic is now part of pmap_mapdev() and doesn't need to be duplicated here. Switch a10 to using arm_devmap_add_entry() to set up static device mapping. Added: stable/10/sys/arm/arm/bus_space-v6.c - copied, changed from r257738, head/sys/arm/arm/bus_space-v6.c Deleted: stable/10/sys/arm/tegra/bus_space.c stable/10/sys/dev/fdt/fdt_pci.c stable/10/sys/powerpc/include/fdt.h Modified: stable/10/sys/arm/allwinner/a10_machdep.c stable/10/sys/arm/arm/bus_space_generic.c stable/10/sys/arm/arm/devmap.c stable/10/sys/arm/arm/machdep.c stable/10/sys/arm/arm/trap.c stable/10/sys/arm/broadcom/bcm2835/bcm2835_fbd.c stable/10/sys/arm/broadcom/bcm2835/bcm2835_machdep.c stable/10/sys/arm/conf/DOCKSTAR stable/10/sys/arm/freescale/imx/imx51_ipuv3.c stable/10/sys/arm/include/fdt.h stable/10/sys/arm/include/intr.h stable/10/sys/arm/include/ofw_machdep.h stable/10/sys/arm/include/psl.h stable/10/sys/arm/lpc/lpc_gpio.c stable/10/sys/arm/lpc/lpc_machdep.c stable/10/sys/arm/lpc/lpc_mmc.c stable/10/sys/arm/lpc/lpcreg.h stable/10/sys/arm/mv/mv_machdep.c stable/10/sys/arm/mv/mv_pci.c stable/10/sys/arm/mv/mvvar.h stable/10/sys/arm/tegra/files.tegra2 stable/10/sys/arm/tegra/tegra2_machdep.c stable/10/sys/arm/ti/ti_machdep.c stable/10/sys/arm/versatile/bus_space.c stable/10/sys/arm/xilinx/zy7_bus_space.c stable/10/sys/boot/fdt/dts/dockstar.dts stable/10/sys/conf/files stable/10/sys/dev/fdt/fdt_common.c stable/10/sys/dev/fdt/fdt_common.h stable/10/sys/dev/fdt/fdtbus.c stable/10/sys/dev/fdt/simplebus.c stable/10/sys/dev/uart/uart_bus_fdt.c stable/10/sys/dev/uart/uart_dev_lpc.c stable/10/sys/mips/include/fdt.h stable/10/sys/x86/include/fdt.h stable/10/sys/x86/include/ofw_machdep.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/allwinner/a10_machdep.c ============================================================================== --- stable/10/sys/arm/allwinner/a10_machdep.c Wed May 14 19:11:15 2014 (r266083) +++ stable/10/sys/arm/allwinner/a10_machdep.c Wed May 14 19:18:58 2014 (r266084) @@ -50,21 +50,16 @@ __FBSDID("$FreeBSD$"); #include -/* Start of address space used for bootstrap map */ -#define DEVMAP_BOOTSTRAP_MAP_START 0xE0000000 - - vm_offset_t initarm_lastaddr(void) { - return (DEVMAP_BOOTSTRAP_MAP_START); + return (arm_devmap_lastaddr()); } void initarm_early_init(void) { - } void @@ -77,28 +72,21 @@ initarm_late_init(void) { } -#define FDT_DEVMAP_MAX (1 + 2 + 1 + 1) -static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = { - { 0, 0, 0, 0, 0, } -}; - /* - * Construct pmap_devmap[] with DT-derived config data. + * Set up static device mappings. + * + * This covers all the on-chip device with 1MB section mappings, which is good + * for performance (uses fewer TLB entries for device access). + * + * XXX It also covers a block of SRAM and some GPU (mali400) stuff that maybe + * shouldn't be device-mapped. The original code mapped a 4MB block, but + * perhaps a 1MB block would be more appropriate. */ int initarm_devmap_init(void) { - int i = 0; - - fdt_devmap[i].pd_va = 0xE1C00000; - fdt_devmap[i].pd_pa = 0x01C00000; - fdt_devmap[i].pd_size = 0x00400000; /* 4 MB */ - fdt_devmap[i].pd_prot = VM_PROT_READ | VM_PROT_WRITE; - fdt_devmap[i].pd_cache = PTE_DEVICE; - - i++; - arm_devmap_register_table(&fdt_devmap[0]); + arm_devmap_add_entry(0x01C00000, 0x00400000); /* 4MB */ return (0); } Copied and modified: stable/10/sys/arm/arm/bus_space-v6.c (from r257738, head/sys/arm/arm/bus_space-v6.c) ============================================================================== --- head/sys/arm/arm/bus_space-v6.c Wed Nov 6 09:41:19 2013 (r257738, copy source) +++ stable/10/sys/arm/arm/bus_space-v6.c Wed May 14 19:18:58 2014 (r266084) @@ -1,7 +1,9 @@ /*- - * Copyright (c) 2012 Damjan Marion + * Copyright (C) 2008 MARVELL INTERNATIONAL LTD. * All rights reserved. * + * Developed by Semihalf. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -10,11 +12,14 @@ * 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. + * 3. Neither the name of MARVELL nor the names of contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY 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 + * ARE DISCLAIMED. IN NO EVENT SHALL 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) Modified: stable/10/sys/arm/arm/bus_space_generic.c ============================================================================== --- stable/10/sys/arm/arm/bus_space_generic.c Wed May 14 19:11:15 2014 (r266083) +++ stable/10/sys/arm/arm/bus_space_generic.c Wed May 14 19:18:58 2014 (r266084) @@ -62,16 +62,12 @@ generic_bs_map(void *t, bus_addr_t bpa, void *va; /* - * Look up the address in the static device mappings. If it's not - * there, establish a new dynamic mapping. - * * We don't even examine the passed-in flags. For ARM, the CACHEABLE * flag doesn't make sense (we create PTE_DEVICE mappings), and the * LINEAR flag is just implied because we use kva_alloc(size). */ - if ((va = arm_devmap_ptov(bpa, size)) == NULL) - if ((va = pmap_mapdev(bpa, size)) == NULL) - return (ENOMEM); + if ((va = pmap_mapdev(bpa, size)) == NULL) + return (ENOMEM); *bshp = (bus_space_handle_t)va; return (0); } @@ -90,12 +86,7 @@ void generic_bs_unmap(void *t, bus_space_handle_t h, bus_size_t size) { - /* - * If the region is static-mapped do nothing, otherwise remove the - * dynamic mapping. - */ - if (arm_devmap_vtop((void*)h, size) == DEVMAP_PADDR_NOTFOUND) - pmap_unmapdev((vm_offset_t)h, size); + pmap_unmapdev((vm_offset_t)h, size); } void Modified: stable/10/sys/arm/arm/devmap.c ============================================================================== --- stable/10/sys/arm/arm/devmap.c Wed May 14 19:11:15 2014 (r266083) +++ stable/10/sys/arm/arm/devmap.c Wed May 14 19:18:58 2014 (r266084) @@ -67,11 +67,8 @@ arm_devmap_lastaddr() if (akva_devmap_idx > 0) return (akva_devmap_vaddr); - if (devmap_table == NULL) - panic("arm_devmap_lastaddr(): No devmap table registered."); - lowaddr = ARM_VECTORS_HIGH; - for (pd = devmap_table; pd->pd_size != 0; ++pd) { + for (pd = devmap_table; pd != NULL && pd->pd_size != 0; ++pd) { if (lowaddr > pd->pd_va) lowaddr = pd->pd_va; } @@ -145,22 +142,21 @@ arm_devmap_bootstrap(vm_offset_t l1pt, c { const struct arm_devmap_entry *pd; + devmap_bootstrap_done = true; + /* - * If given a table pointer, use it, else ensure a table was previously - * registered. This happens early in boot, and there's a good chance - * the panic message won't be seen, but there's not much we can do. + * If given a table pointer, use it. Otherwise, if a table was + * previously registered, use it. Otherwise, no work to do. */ if (table != NULL) devmap_table = table; else if (devmap_table == NULL) - panic("arm_devmap_bootstrap(): No devmap table registered"); + return; for (pd = devmap_table; pd->pd_size != 0; ++pd) { pmap_map_chunk(l1pt, pd->pd_va, pd->pd_pa, pd->pd_size, pd->pd_prot,pd->pd_cache); } - - devmap_bootstrap_done = true; } /* @@ -207,13 +203,23 @@ arm_devmap_vtop(void * vpva, vm_size_t s /* * Map a set of physical memory pages into the kernel virtual address space. - * Return a pointer to where it is mapped. This routine is intended to be used - * for mapping device memory, NOT real memory. + * Return a pointer to where it is mapped. + * + * This uses a pre-established static mapping if one exists for the requested + * range, otherwise it allocates kva space and maps the physical pages into it. + * + * This routine is intended to be used for mapping device memory, NOT real + * memory; the mapping type is inherently PTE_DEVICE in pmap_kenter_device(). */ void * pmap_mapdev(vm_offset_t pa, vm_size_t size) { vm_offset_t va, tmpva, offset; + void * rva; + + /* First look in the static mapping table. */ + if ((rva = arm_devmap_ptov(pa, size)) != NULL) + return (rva); offset = pa & PAGE_MASK; pa = trunc_page(pa); @@ -240,7 +246,13 @@ void pmap_unmapdev(vm_offset_t va, vm_size_t size) { vm_offset_t tmpva, offset; - + vm_size_t origsize; + + /* Nothing to do if we find the mapping in the static table. */ + if (arm_devmap_vtop((void*)va, size) != DEVMAP_PADDR_NOTFOUND) + return; + + origsize = size; offset = va & PAGE_MASK; va = trunc_page(va); size = round_page(size + offset); @@ -251,6 +263,6 @@ pmap_unmapdev(vm_offset_t va, vm_size_t tmpva += PAGE_SIZE; } - kva_free(va, size); + kva_free(va, origsize); } Modified: stable/10/sys/arm/arm/machdep.c ============================================================================== --- stable/10/sys/arm/arm/machdep.c Wed May 14 19:11:15 2014 (r266083) +++ stable/10/sys/arm/arm/machdep.c Wed May 14 19:18:58 2014 (r266084) @@ -92,6 +92,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: stable/10/sys/arm/arm/trap.c ============================================================================== --- stable/10/sys/arm/arm/trap.c Wed May 14 19:11:15 2014 (r266083) +++ stable/10/sys/arm/arm/trap.c Wed May 14 19:18:58 2014 (r266084) @@ -85,6 +85,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_fbd.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Wed May 14 19:11:15 2014 (r266083) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Wed May 14 19:18:58 2014 (r266084) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_machdep.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Wed May 14 19:11:15 2014 (r266083) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Wed May 14 19:18:58 2014 (r266084) @@ -59,14 +59,11 @@ __FBSDID("$FreeBSD$"); #include -/* Start of address space used for bootstrap map */ -#define DEVMAP_BOOTSTRAP_MAP_START 0xE0000000 - vm_offset_t initarm_lastaddr(void) { - return (DEVMAP_BOOTSTRAP_MAP_START); + return (arm_devmap_lastaddr()); } void @@ -99,28 +96,16 @@ initarm_late_init(void) } } -#define FDT_DEVMAP_MAX (2) // FIXME -static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = { - { 0, 0, 0, 0, 0, } -}; - - /* - * Construct pmap_devmap[] with DT-derived config data. + * Set up static device mappings. + * All on-chip peripherals exist in a 16MB range starting at 0x20000000. + * Map the entire range using 1MB section mappings. */ int initarm_devmap_init(void) { - int i = 0; - - fdt_devmap[i].pd_va = 0xf2000000; - fdt_devmap[i].pd_pa = 0x20000000; - fdt_devmap[i].pd_size = 0x01000000; /* 1 MB */ - fdt_devmap[i].pd_prot = VM_PROT_READ | VM_PROT_WRITE; - fdt_devmap[i].pd_cache = PTE_DEVICE; - i++; - arm_devmap_register_table(&fdt_devmap[0]); + arm_devmap_add_entry(0x20000000, 0x01000000); return (0); } Modified: stable/10/sys/arm/conf/DOCKSTAR ============================================================================== --- stable/10/sys/arm/conf/DOCKSTAR Wed May 14 19:11:15 2014 (r266083) +++ stable/10/sys/arm/conf/DOCKSTAR Wed May 14 19:18:58 2014 (r266084) @@ -3,73 +3,165 @@ # # $FreeBSD$ # +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ +# ident DOCKSTAR + include "../mv/kirkwood/std.db88f6xxx" -options SOC_MV_KIRKWOOD +makeoptions FDT_DTS_FILE=dockstar.dts + makeoptions MODULES_OVERRIDE="" -#makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols -makeoptions WERROR="-Werror" +options SOC_MV_KIRKWOOD options SCHED_4BSD #4BSD scheduler options INET #InterNETworking options INET6 #IPv6 communications protocols +options SOFTUPDATES +options CD9660 #ISO 9660 filesystem options FFS #Berkeley Fast Filesystem -options NFSCL #New Network Filesystem Client -options NFSLOCKD #Network Lock Manager -options NFS_ROOT #NFS usable as /, requires NFSCL -options BOOTP -options BOOTP_NFSROOT -options BOOTP_NFSV3 -options BOOTP_COMPAT -options BOOTP_WIRED_TO=mge0 - -# Root fs on USB device -#options ROOTDEVNAME=\"ufs:/dev/da0a\" - +options MSDOSFS #MS DOS File System (FAT, FAT32) +options NULLFS #NULL filesystem +options TMPFS #Efficient memory filesystem options SYSVSHM #SYSV-style shared memory options SYSVMSG #SYSV-style message queues options SYSVSEM #SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions -options MUTEX_NOINLINE -options RWLOCK_NOINLINE -options NO_FFS_SNAPSHOT -options NO_SWAPPING +options GEOM_ELI # Disk encryption. +options GEOM_LABEL # Providers labelization. +options GEOM_PART_GPT # GPT partitioning -# Debugging -options ALT_BREAK_TO_DEBUGGER -options DDB -options KDB +# Flattened Device Tree +device fdt +options FDT +options FDT_DTB_STATIC + +# Misc pseudo devices +device bpf #Required for DHCP +device faith #IPv6-to-IPv4 relaying (translation) +device firmware #firmware(9) required for USB wlan +device gif #IPv6 and IPv4 tunneling +device loop #Network loopback +device md #Memory/malloc disk +device pty #BSD-style compatibility pseudo ttys +device random #Entropy device +device tun #Packet tunnel. +device ether #Required for all ethernet devices +device vlan #802.1Q VLAN support +device wlan #802.11 WLAN support -# Pseudo devices -device md -device random -device loop +# cam support for umass and ahci +device scbus +device pass +device da # Serial ports device uart # Networking -device ether device mge # Marvell Gigabit Ethernet controller device mii -device bpf -options HZ=1000 -options DEVICE_POLLING -device vlan +device e1000phy # USB -options USB_DEBUG # enable debug msgs -device usb -device ehci -device umass -device scbus -device pass -device da +options USB_HOST_ALIGN=32 # Align DMA to cacheline +#options USB_DEBUG # Compile in USB debug support +device usb # Basic usb support +device ehci # USB host controller +device umass # Mass storage +device uhid # Human-interface devices +device rum # Ralink Technology RT2501USB wireless NICs +device uath # Atheros AR5523 wireless NICs +device ural # Ralink Technology RT2500USB wireless NICs +device zyd # ZyDAS zb1211/zb1211b wireless NICs +device urtw # Realtek RTL8187B/L USB +device upgt # Conexant/Intersil PrismGT SoftMAC USB +device u3g # USB-based 3G modems (Option, Huawei, Sierra) + +# I2C (TWSI) +device iic +device iicbus + +# Sound +device sound +device snd_uaudio + +#crypto +device cesa # Marvell security engine +device crypto +device cryptodev + +# IPSec +device enc +options IPSEC +options IPSEC_NAT_T +options TCP_SIGNATURE #include support for RFC 2385 + +# IPFW +options IPFIREWALL +options IPFIREWALL_DEFAULT_TO_ACCEPT +options IPFIREWALL_VERBOSE +options IPFIREWALL_VERBOSE_LIMIT=100 +options IPFIREWALL_NAT +options LIBALIAS +options DUMMYNET +options IPDIVERT + +#PF +device pf +device pflog +device pfsync + +# ALTQ, required for PF +options ALTQ # Basic ALTQ support +options ALTQ_CBQ # Class Based Queueing +options ALTQ_RED # Random Early Detection +options ALTQ_RIO # RED In/Out +options ALTQ_HFSC # Hierarchical Packet Scheduler +options ALTQ_CDNR # Traffic conditioner +options ALTQ_PRIQ # Priority Queueing +options ALTQ_NOPCC # Required if the TSC is unusable +#options ALTQ_DEBUG + +# Debugging +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +options BREAK_TO_DEBUGGER +options ALT_BREAK_TO_DEBUGGER +options DDB +options KDB +options DIAGNOSTIC +options INVARIANTS #Enable calls of extra sanity checking +options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS #Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +#options WITNESS_KDB + +# Enable these options for nfs root configured via BOOTP. +options NFSCL #Network Filesystem Client +options NFSLOCKD #Network Lock Manager +#options NFS_ROOT #NFS usable as /, requires NFSCLIENT +#options BOOTP +#options BOOTP_NFSROOT +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=mge0 + +# If not using BOOTP, use something like one of these... +#options ROOTDEVNAME=\"ufs:/dev/da0a\" +options ROOTDEVNAME=\"ufs:/dev/da0s1a\" +#options ROOTDEVNAME=\"ufs:/dev/da0p10\" +#options ROOTDEVNAME=\"nfs:192.168.0.254/dreamplug\" -# Flattened Device Tree -options FDT -options FDT_DTB_STATIC -makeoptions FDT_DTS_FILE=dockstar.dts Modified: stable/10/sys/arm/freescale/imx/imx51_ipuv3.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx51_ipuv3.c Wed May 14 19:11:15 2014 (r266083) +++ stable/10/sys/arm/freescale/imx/imx51_ipuv3.c Wed May 14 19:18:58 2014 (r266084) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: stable/10/sys/arm/include/fdt.h ============================================================================== --- stable/10/sys/arm/include/fdt.h Wed May 14 19:11:15 2014 (r266083) +++ stable/10/sys/arm/include/fdt.h Wed May 14 19:18:58 2014 (r266084) @@ -51,15 +51,8 @@ */ extern bus_space_tag_t fdtbus_bs_tag; -struct mem_region { - vm_offset_t mr_start; - vm_size_t mr_size; -}; - struct arm_devmap_entry; int fdt_localbus_devmap(phandle_t, struct arm_devmap_entry *, int, int *); -int fdt_pci_devmap(phandle_t, struct arm_devmap_entry *devmap, vm_offset_t, - vm_offset_t); #endif /* _MACHINE_FDT_H_ */ Modified: stable/10/sys/arm/include/intr.h ============================================================================== --- stable/10/sys/arm/include/intr.h Wed May 14 19:11:15 2014 (r266083) +++ stable/10/sys/arm/include/intr.h Wed May 14 19:18:58 2014 (r266084) @@ -67,8 +67,6 @@ #define NIRQ 32 #endif -#include -#include int arm_get_next_irq(int); void arm_mask_irq(uintptr_t); Modified: stable/10/sys/arm/include/ofw_machdep.h ============================================================================== --- stable/10/sys/arm/include/ofw_machdep.h Wed May 14 19:11:15 2014 (r266083) +++ stable/10/sys/arm/include/ofw_machdep.h Wed May 14 19:18:58 2014 (r266084) @@ -32,6 +32,13 @@ #ifndef _MACHINE_OFW_MACHDEP_H_ #define _MACHINE_OFW_MACHDEP_H_ +#include + typedef uint32_t cell_t; +struct mem_region { + vm_offset_t mr_start; + vm_size_t mr_size; +}; + #endif /* _MACHINE_OFW_MACHDEP_H_ */ Modified: stable/10/sys/arm/include/psl.h ============================================================================== --- stable/10/sys/arm/include/psl.h Wed May 14 19:11:15 2014 (r266083) +++ stable/10/sys/arm/include/psl.h Wed May 14 19:18:58 2014 (r266084) @@ -46,7 +46,6 @@ #ifndef _MACHINE_PSL_H_ #define _MACHINE_PSL_H_ -#include /* * These are the different SPL states Modified: stable/10/sys/arm/lpc/lpc_gpio.c ============================================================================== --- stable/10/sys/arm/lpc/lpc_gpio.c Wed May 14 19:11:15 2014 (r266083) +++ stable/10/sys/arm/lpc/lpc_gpio.c Wed May 14 19:18:58 2014 (r266084) @@ -502,12 +502,18 @@ lpc_gpio_get_state(device_t dev, int pin void platform_gpio_init() { + bus_space_tag_t bst; + bus_space_handle_t bsh; + + bst = fdtbus_bs_tag; + /* Preset SPI devices CS pins to one */ - bus_space_write_4(fdtbus_bs_tag, - LPC_GPIO_BASE, LPC_GPIO_P3_OUTP_SET, + bus_space_map(bst, LPC_GPIO_PHYS_BASE, LPC_GPIO_SIZE, 0, &bsh); + bus_space_write_4(bst, bsh, LPC_GPIO_P3_OUTP_SET, 1 << (SSD1289_CS_PIN - LPC_GPIO_GPO_00(0)) | 1 << (SSD1289_DC_PIN - LPC_GPIO_GPO_00(0)) | 1 << (ADS7846_CS_PIN - LPC_GPIO_GPO_00(0))); + bus_space_unmap(bst, bsh, LPC_GPIO_SIZE); } static device_method_t lpc_gpio_methods[] = { Modified: stable/10/sys/arm/lpc/lpc_machdep.c ============================================================================== --- stable/10/sys/arm/lpc/lpc_machdep.c Wed May 14 19:11:15 2014 (r266083) +++ stable/10/sys/arm/lpc/lpc_machdep.c Wed May 14 19:18:58 2014 (r266084) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -57,21 +58,17 @@ __FBSDID("$FreeBSD$"); #include #include -#include vm_offset_t initarm_lastaddr(void) { - return (fdt_immr_va); + return (arm_devmap_lastaddr()); } void initarm_early_init(void) { - - if (fdt_immr_addr(LPC_DEV_BASE) != 0) - while (1); } void @@ -89,28 +86,16 @@ initarm_late_init(void) { } -#define FDT_DEVMAP_MAX (1 + 2 + 1 + 1) -static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = { - { 0, 0, 0, 0, 0, } -}; - /* - * Construct pmap_devmap[] with DT-derived config data. + * Add a single static device mapping. + * The values used were taken from the ranges property of the SoC node in the + * dts file when this code was converted to arm_devmap_add_entry(). */ int initarm_devmap_init(void) { - /* - * IMMR range. - */ - fdt_devmap[0].pd_va = fdt_immr_va; - fdt_devmap[0].pd_pa = fdt_immr_pa; - fdt_devmap[0].pd_size = fdt_immr_size; - fdt_devmap[0].pd_prot = VM_PROT_READ | VM_PROT_WRITE; - fdt_devmap[0].pd_cache = PTE_NOCACHE; - - arm_devmap_register_table(&fdt_devmap[0]); + arm_devmap_add_entry(LPC_DEV_PHYS_BASE, LPC_DEV_SIZE); return (0); } @@ -131,15 +116,24 @@ bus_dma_get_range_nb(void) void cpu_reset(void) { + bus_space_tag_t bst; + bus_space_handle_t bsh; + + bst = fdtbus_bs_tag; + /* Enable WDT */ - bus_space_write_4(fdtbus_bs_tag, - LPC_CLKPWR_BASE, LPC_CLKPWR_TIMCLK_CTRL, + bus_space_map(bst, LPC_CLKPWR_PHYS_BASE, LPC_CLKPWR_SIZE, 0, &bsh); + bus_space_write_4(bst, bsh, LPC_CLKPWR_TIMCLK_CTRL, LPC_CLKPWR_TIMCLK_CTRL_WATCHDOG); + bus_space_unmap(bst, bsh, LPC_CLKPWR_SIZE); /* Instant assert of RESETOUT_N with pulse length 1ms */ - bus_space_write_4(fdtbus_bs_tag, LPC_WDTIM_BASE, LPC_WDTIM_PULSE, 13000); - bus_space_write_4(fdtbus_bs_tag, LPC_WDTIM_BASE, LPC_WDTIM_MCTRL, 0x70); + bus_space_map(bst, LPC_WDTIM_PHYS_BASE, LPC_WDTIM_SIZE, 0, &bsh); + bus_space_write_4(bst, bsh, LPC_WDTIM_PULSE, 13000); + bus_space_write_4(bst, bsh, LPC_WDTIM_MCTRL, 0x70); + bus_space_unmap(bst, bsh, LPC_WDTIM_SIZE); - for (;;); + for (;;) + continue; } Modified: stable/10/sys/arm/lpc/lpc_mmc.c ============================================================================== --- stable/10/sys/arm/lpc/lpc_mmc.c Wed May 14 19:11:15 2014 (r266083) +++ stable/10/sys/arm/lpc/lpc_mmc.c Wed May 14 19:18:58 2014 (r266084) @@ -507,14 +507,14 @@ lpc_mmc_setup_xfer(struct lpc_mmc_softc if (data->flags & MMC_DATA_READ) { sc->lm_xfer_direction = DIRECTION_READ; lpc_dmac_setup_transfer(sc->lm_dev, LPC_MMC_DMACH_READ, - LPC_SD_BASE + LPC_SD_FIFO, sc->lm_buffer_phys, + LPC_SD_PHYS_BASE + LPC_SD_FIFO, sc->lm_buffer_phys, data_words, 0); } if (data->flags & MMC_DATA_WRITE) { sc->lm_xfer_direction = DIRECTION_WRITE; lpc_dmac_setup_transfer(sc->lm_dev, LPC_MMC_DMACH_WRITE, - sc->lm_buffer_phys, LPC_SD_BASE + LPC_SD_FIFO, + sc->lm_buffer_phys, LPC_SD_PHYS_BASE + LPC_SD_FIFO, data_words, 0); } Modified: stable/10/sys/arm/lpc/lpcreg.h ============================================================================== --- stable/10/sys/arm/lpc/lpcreg.h Wed May 14 19:11:15 2014 (r266083) +++ stable/10/sys/arm/lpc/lpcreg.h Wed May 14 19:18:58 2014 (r266084) @@ -32,7 +32,6 @@ #define LPC_DEV_PHYS_BASE 0x40000000 #define LPC_DEV_P5_PHYS_BASE 0x20000000 #define LPC_DEV_P6_PHYS_BASE 0x30000000 -#define LPC_DEV_BASE 0xd0000000 #define LPC_DEV_SIZE 0x10000000 /* @@ -88,7 +87,7 @@ /* * Watchdog timer. (from UM10326: LPC32x0 User manual, page 572) */ -#define LPC_WDTIM_BASE (LPC_DEV_BASE + 0x3c000) +#define LPC_WDTIM_PHYS_BASE (LPC_DEV_PHYS_BASE + 0x3c000) #define LPC_WDTIM_INT 0x00 #define LPC_WDTIM_CTRL 0x04 #define LPC_WDTIM_COUNTER 0x08 @@ -97,11 +96,12 @@ #define LPC_WDTIM_EMR 0x14 #define LPC_WDTIM_PULSE 0x18 #define LPC_WDTIM_RES 0x1c +#define LPC_WDTIM_SIZE 0x20 /* * Clocking and power control. (from UM10326: LPC32x0 User manual, page 58) */ -#define LPC_CLKPWR_BASE (LPC_DEV_BASE + 0x4000) +#define LPC_CLKPWR_PHYS_BASE (LPC_DEV_PHYS_BASE + 0x4000) #define LPC_CLKPWR_PWR_CTRL 0x44 #define LPC_CLKPWR_OSC_CTRL 0x4c #define LPC_CLKPWR_SYSCLK_CTRL 0x50 @@ -189,6 +189,7 @@ #define LPC_CLKPWR_UARTCLK_CTRL 0xe4 #define LPC_CLKPWR_POS0_IRAM_CTRL 0x110 #define LPC_CLKPWR_POS1_IRAM_CTRL 0x114 +#define LPC_CLKPWR_SIZE 0x118 /* Additional UART registers in CLKPWR address space. */ #define LPC_CLKPWR_UART_U3CLK 0xd0 @@ -201,9 +202,9 @@ #define LPC_CLKPWR_UART_IRDACLK 0xe0 /* Additional UART registers */ -#define LPC_UART_BASE (LPC_DEV_BASE + 0x80000) -#define LPC_UART_CONTROL_BASE (LPC_DEV_BASE + 0x54000) -#define LPC_UART5_BASE (LPC_DEV_BASE + 0x90000) +#define LPC_UART_BASE 0x80000 +#define LPC_UART_CONTROL_BASE 0x54000 +#define LPC_UART5_BASE 0x90000 #define LPC_UART_CTRL 0x00 #define LPC_UART_CLKMODE 0x04 #define LPC_UART_CLKMODE_UART3(_n) (((_n) & 0x3) << 4) @@ -211,6 +212,7 @@ #define LPC_UART_CLKMODE_UART5(_n) (((_n) & 0x3) << 8) #define LPC_UART_CLKMODE_UART6(_n) (((_n) & 0x3) << 10) #define LPC_UART_LOOP 0x08 +#define LPC_UART_CONTROL_SIZE 0x0c #define LPC_UART_FIFOSIZE 64 /* @@ -236,7 +238,7 @@ /* * MMC/SD controller. (from UM10326: LPC32x0 User manual, page 436) */ -#define LPC_SD_BASE (LPC_DEV_P5_PHYS_BASE + 0x98000) +#define LPC_SD_PHYS_BASE (LPC_DEV_P5_PHYS_BASE + 0x98000) #define LPC_SD_CLK (13 * 1000 * 1000) // 13Mhz #define LPC_SD_POWER 0x00 #define LPC_SD_POWER_OPENDRAIN (1 << 6) @@ -535,7 +537,7 @@ /* * GPIO (from UM10326: LPC32x0 User manual, page 606) */ -#define LPC_GPIO_BASE (LPC_DEV_BASE + 0x28000) +#define LPC_GPIO_PHYS_BASE (LPC_DEV_PHYS_BASE + 0x28000) #define LPC_GPIO_P0_COUNT 8 #define LPC_GPIO_P1_COUNT 24 #define LPC_GPIO_P2_COUNT 13 @@ -564,6 +566,8 @@ #define LPC_GPIO_P3_OUTP_SET 0x04 #define LPC_GPIO_P3_OUTP_CLR 0x08 #define LPC_GPIO_P3_OUTP_STATE 0x0c +#define LPC_GPIO_SIZE 0x80 + /* Aliases for logical pin numbers: */ #define LPC_GPIO_GPI_00(_n) (0 + _n) #define LPC_GPIO_GPI_15(_n) (10 + _n) Modified: stable/10/sys/arm/mv/mv_machdep.c ============================================================================== --- stable/10/sys/arm/mv/mv_machdep.c Wed May 14 19:11:15 2014 (r266083) +++ stable/10/sys/arm/mv/mv_machdep.c Wed May 14 19:18:58 2014 (r266084) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include /* XXX */ @@ -293,11 +294,11 @@ out: } /* - * Supply a default do-nothing implementation of fdt_pci_devmap() via a weak + * Supply a default do-nothing implementation of mv_pci_devmap() via a weak * alias. Many Marvell platforms don't support a PCI interface, but to support * those that do, we end up with a reference to this function below, in * platform_devmap_init(). If "device pci" appears in the kernel config, the - * real implementation of this function in dev/fdt/fdt_pci.c overrides the weak + * real implementation of this function in arm/mv/mv_pci.c overrides the weak * alias defined here. */ int mv_default_fdt_pci_devmap(phandle_t node, struct arm_devmap_entry *devmap, @@ -309,7 +310,7 @@ mv_default_fdt_pci_devmap(phandle_t node return (0); } -__weak_reference(mv_default_fdt_pci_devmap, fdt_pci_devmap); +__weak_reference(mv_default_fdt_pci_devmap, mv_pci_devmap); /* * XXX: When device entry in devmap has pd_size smaller than section size, @@ -378,7 +379,7 @@ initarm_devmap_init(void) * XXX this should account for PCI and multiple ranges * of a given kind. */ - if (fdt_pci_devmap(child, &fdt_devmap[i], MV_PCI_VA_IO_BASE, + if (mv_pci_devmap(child, &fdt_devmap[i], MV_PCI_VA_IO_BASE, MV_PCI_VA_MEM_BASE) != 0) return (ENXIO); i += 2; Modified: stable/10/sys/arm/mv/mv_pci.c ============================================================================== --- stable/10/sys/arm/mv/mv_pci.c Wed May 14 19:11:15 2014 (r266083) +++ stable/10/sys/arm/mv/mv_pci.c Wed May 14 19:18:58 2014 (r266084) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -69,6 +70,7 @@ __FBSDID("$FreeBSD$"); #include "ofw_bus_if.h" #include "pcib_if.h" +#include #include #include @@ -82,6 +84,172 @@ __FBSDID("$FreeBSD$"); #define debugf(fmt, args...) #endif +/* + * Code and data related to fdt-based PCI configuration. + * + * This stuff used to be in dev/fdt/fdt_pci.c and fdt_common.h, but it was + * always Marvell-specific so that was deleted and the code now lives here. + */ + +struct mv_pci_range { + u_long base_pci; + u_long base_parent; + u_long len; +}; + +#define FDT_RANGES_CELLS ((3 + 3 + 2) * 2) + +static void +mv_pci_range_dump(struct mv_pci_range *range) +{ +#ifdef DEBUG + printf("\n"); + printf(" base_pci = 0x%08lx\n", range->base_pci); + printf(" base_par = 0x%08lx\n", range->base_parent); + printf(" len = 0x%08lx\n", range->len); +#endif +} + +static int +mv_pci_ranges_decode(phandle_t node, struct mv_pci_range *io_space, + struct mv_pci_range *mem_space) +{ + pcell_t ranges[FDT_RANGES_CELLS]; + struct mv_pci_range *pci_space; + pcell_t addr_cells, size_cells, par_addr_cells; + pcell_t *rangesptr; + pcell_t cell0, cell1, cell2; + int tuple_size, tuples, i, rv, offset_cells, len; + + /* + * Retrieve 'ranges' property. + */ + if ((fdt_addrsize_cells(node, &addr_cells, &size_cells)) != 0) + return (EINVAL); + if (addr_cells != 3 || size_cells != 2) + return (ERANGE); + + par_addr_cells = fdt_parent_addr_cells(node); + if (par_addr_cells > 3) + return (ERANGE); + + len = OF_getproplen(node, "ranges"); + if (len > sizeof(ranges)) + return (ENOMEM); + + if (OF_getprop(node, "ranges", ranges, sizeof(ranges)) <= 0) + return (EINVAL); + + tuple_size = sizeof(pcell_t) * (addr_cells + par_addr_cells + + size_cells); + tuples = len / tuple_size; + + /* + * Initialize the ranges so that we don't have to worry about + * having them all defined in the FDT. In particular, it is + * perfectly fine not to want I/O space on PCI busses. + */ + bzero(io_space, sizeof(*io_space)); + bzero(mem_space, sizeof(*mem_space)); + + rangesptr = &ranges[0]; + offset_cells = 0; + for (i = 0; i < tuples; i++) { + cell0 = fdt_data_get((void *)rangesptr, 1); + rangesptr++; + cell1 = fdt_data_get((void *)rangesptr, 1); + rangesptr++; + cell2 = fdt_data_get((void *)rangesptr, 1); + rangesptr++; + + if (cell0 & 0x02000000) { + pci_space = mem_space; + } else if (cell0 & 0x01000000) { + pci_space = io_space; + } else { + rv = ERANGE; + goto out; + } + + if (par_addr_cells == 3) { + /* + * This is a PCI subnode 'ranges'. Skip cell0 and + * cell1 of this entry and only use cell2. + */ + offset_cells = 2; + rangesptr += offset_cells; + } + + if (fdt_data_verify((void *)rangesptr, par_addr_cells - + offset_cells)) { + rv = ERANGE; + goto out; + } + pci_space->base_parent = fdt_data_get((void *)rangesptr, + par_addr_cells - offset_cells); + rangesptr += par_addr_cells - offset_cells; + + if (fdt_data_verify((void *)rangesptr, size_cells)) { + rv = ERANGE; + goto out; + } + pci_space->len = fdt_data_get((void *)rangesptr, size_cells); + rangesptr += size_cells; + + pci_space->base_pci = cell2; + } + rv = 0; +out: + return (rv); +} + +static int +mv_pci_ranges(phandle_t node, struct mv_pci_range *io_space, + struct mv_pci_range *mem_space) +{ + int err; + + debugf("Processing PCI node: %x\n", node); + if ((err = mv_pci_ranges_decode(node, io_space, mem_space)) != 0) { + debugf("could not decode parent PCI node 'ranges'\n"); + return (err); + } + + debugf("Post fixup dump:\n"); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Wed May 14 20:11:23 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 15E844CB; Wed, 14 May 2014 20:11:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 005202543; Wed, 14 May 2014 20:11:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EKBM3U032419; Wed, 14 May 2014 20:11:22 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EKBKpM032405; Wed, 14 May 2014 20:11:20 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405142011.s4EKBKpM032405@svn.freebsd.org> From: Ian Lepore Date: Wed, 14 May 2014 20:11:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266085 - in stable/10/sys: arm/broadcom/bcm2835 arm/conf arm/freescale/vybrid boot/fdt/dts dev/uart dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 20:11:23 -0000 Author: ian Date: Wed May 14 20:11:20 2014 New Revision: 266085 URL: http://svnweb.freebsd.org/changeset/base/266085 Log: MFC r256839, r256948, r256950, r257299, r257414, r258057, r259090 Add configuration for the Freescale i.MX53 Quick Start Board. Add the Raspberry Pi BSC (I2C compliant) controller driver. Add Radxa Rock board (by radxa.com) support. Digi-CCWMX53: enable ffec and uart, USB. Add support for Freescale Vybrid Family VF600 Move and rename dwc otg driver to more generic one as it appears to work for rk3188 SoC based board too. Added: stable/10/sys/arm/conf/COSMIC - copied unchanged from r258057, head/sys/arm/conf/COSMIC stable/10/sys/arm/conf/RADXA - copied unchanged from r256950, head/sys/arm/conf/RADXA stable/10/sys/arm/freescale/vybrid/ - copied from r258057, head/sys/arm/freescale/vybrid/ stable/10/sys/boot/fdt/dts/rk3188-radxa.dts - copied unchanged from r256948, head/sys/boot/fdt/dts/rk3188-radxa.dts stable/10/sys/boot/fdt/dts/rk3188.dtsi - copied unchanged from r256948, head/sys/boot/fdt/dts/rk3188.dtsi stable/10/sys/boot/fdt/dts/vybrid-cosmic.dts - copied unchanged from r258057, head/sys/boot/fdt/dts/vybrid-cosmic.dts stable/10/sys/boot/fdt/dts/vybrid.dtsi - copied unchanged from r258057, head/sys/boot/fdt/dts/vybrid.dtsi stable/10/sys/dev/usb/controller/dwc_otg_fdt.c - copied unchanged from r256839, head/sys/dev/usb/controller/dwc_otg_fdt.c Deleted: stable/10/sys/arm/broadcom/bcm2835/dwc_otg_brcm.c Modified: stable/10/sys/arm/broadcom/bcm2835/files.bcm2835 stable/10/sys/arm/conf/DIGI-CCWMX53 stable/10/sys/boot/fdt/dts/digi-ccwmx53.dts stable/10/sys/dev/uart/uart.h stable/10/sys/dev/uart/uart_bus_fdt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/broadcom/bcm2835/files.bcm2835 ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/files.bcm2835 Wed May 14 19:18:58 2014 (r266084) +++ stable/10/sys/arm/broadcom/bcm2835/files.bcm2835 Wed May 14 20:11:20 2014 (r266085) @@ -14,7 +14,7 @@ arm/broadcom/bcm2835/bcm2835_systimer.c arm/broadcom/bcm2835/bcm2835_wdog.c standard arm/broadcom/bcm2835/bus_space.c optional fdt arm/broadcom/bcm2835/common.c optional fdt -arm/broadcom/bcm2835/dwc_otg_brcm.c optional dwcotg +dev/usb/controller/dwc_otg_fdt.c optional dwcotg arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard Copied: stable/10/sys/arm/conf/COSMIC (from r258057, head/sys/arm/conf/COSMIC) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/conf/COSMIC Wed May 14 20:11:20 2014 (r266085, copy of r258057, head/sys/arm/conf/COSMIC) @@ -0,0 +1,139 @@ +# Kernel configuration for Cosmic Board (Freescale Vybrid Family development board). +# +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +ident COSMIC + +include "../freescale/vybrid/std.vybrid" + +makeoptions MODULES_OVERRIDE="" +makeoptions WITHOUT_MODULES="ahc" + +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +makeoptions WERROR="-Werror" + +options HZ=100 ## +options SCHED_4BSD #4BSD scheduler +options INET #InterNETworking +options INET6 #IPv6 communications protocols +options FFS #Berkeley Fast Filesystem +options SOFTUPDATES +options UFS_ACL #Support for access control lists +options UFS_DIRHASH #Improve performance on big directories +options MSDOSFS #MSDOS Filesystem +options CD9660 #ISO 9660 Filesystem +options PROCFS #Process filesystem (requires PSEUDOFS) +options PSEUDOFS #Pseudo-filesystem framework +#options NANDFS #NAND Filesystem +options TMPFS +options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!] +options SCSI_DELAY=5000 #Delay (in ms) before probing SCSI +options KTRACE +options SYSVSHM #SYSV-style shared memory +options SYSVMSG #SYSV-style message queues +options SYSVSEM #SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +options KBD_INSTALL_CDEV +options PREEMPTION +options FREEBSD_BOOT_LOADER +options VFP # vfp/neon + +# Debugging +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +options BREAK_TO_DEBUGGER +#options VERBOSE_SYSINIT #Enable verbose sysinit messages +options KDB +options DDB #Enable the kernel debugger +options INVARIANTS #Enable calls of extra sanity checking +options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS #Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +options DIAGNOSTIC + +# NFS support +options NFSCL #Network Filesystem Client +options NFSLOCKD #Network Lock Manager +options NFS_ROOT #NFS usable as /, requires NFSCLIENT + +# Uncomment this for NFS root +#options NFS_ROOT #NFS usable as /, requires NFSCL +#options BOOTP_NFSROOT +#options BOOTP_COMPAT +#options BOOTP +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=ffec0 + +device mmc # mmc/sd bus +device mmcsd # mmc/sd flash cards +device sdhci # generic sdhci + +#options ROOTDEVNAME=\"nfs:10.5.0.1:/tftpboot/cosmic\" +#options ROOTDEVNAME=\"nandfs:/dev/gnand0s.root\" +options ROOTDEVNAME=\"ufs:/dev/da0\" + +#options SMP + +# Pseudo devices + +device loop +device random +device pty +device md +device gpio + +# USB support +device usb +options USB_DEBUG +#options USB_REQ_DEBUG +#options USB_VERBOSE +#device musb +device ehci +#device ohci + +device umass +device scbus # SCSI bus (required for SCSI) +device da # Direct Access (disks) +device pass + +# SATA +#device ata +#device atadisk +#device mvs + +device nand + +# Serial ports +device uart + +# I2C (TWSI) +#device iic +#device iicbus + +# Ethernet +device ether +device ffec + +# USB ethernet support, requires miibus +device miibus +device axe # ASIX Electronics USB Ethernet +device bpf # Berkeley packet filter + +#FDT +options FDT +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=vybrid-cosmic.dts Modified: stable/10/sys/arm/conf/DIGI-CCWMX53 ============================================================================== --- stable/10/sys/arm/conf/DIGI-CCWMX53 Wed May 14 19:18:58 2014 (r266084) +++ stable/10/sys/arm/conf/DIGI-CCWMX53 Wed May 14 20:11:20 2014 (r266085) @@ -65,7 +65,7 @@ options VFP # vfp/neon #options BOOTP_COMPAT #options BOOTP_NFSROOT #options BOOTP_NFSV3 -#options BOOTP_WIRED_TO=ue0 +#options BOOTP_WIRED_TO=ffec0 #options ROOTDEVNAME=\"ufs:ada0s2a\" @@ -105,8 +105,12 @@ device ether # Ethernet support #device faith # IPv6-to-IPv4 relaying (translation) #device firmware # firmware assist module +# Ethernet +device ffec # Freescale Fast Ethernet Controller +device miibus # Standard mii bus + # Serial (COM) ports -#device uart # Multi-uart driver +device uart # Multi-uart driver options ALT_BREAK_TO_DEBUGGER device ata @@ -130,13 +134,13 @@ device cd # CD device pass # Passthrough device (direct SCSI access) # USB support -#options USB_DEBUG # enable debug msgs -#device ehci # OHCI USB interface -#device usb # USB Bus (required) -#device umass # Disks/Mass storage - Requires scbus and da -#device uhid # "Human Interface Devices" +options USB_DEBUG # enable debug msgs +device ehci # OHCI USB interface +device usb # USB Bus (required) +device umass # Disks/Mass storage - Requires scbus and da +device uhid # "Human Interface Devices" #device ukbd # Allow keyboard like HIDs to control console -#device ums +device ums # USB Ethernet, requires miibus #device miibus Copied: stable/10/sys/arm/conf/RADXA (from r256950, head/sys/arm/conf/RADXA) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/conf/RADXA Wed May 14 20:11:20 2014 (r266085, copy of r256950, head/sys/arm/conf/RADXA) @@ -0,0 +1,119 @@ +# RADXA -- Custom configuration for the RADXA ARM development +# platform, check out http://www.radxa.com +# +# For more information on this file, please read the handbook section on +# Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +ident RADXA + +include "../rockchip/std.rk30xx" + +makeoptions MODULES_OVERRIDE="" +makeoptions WITHOUT_MODULES="ahc" + +options HZ=100 +options SCHED_4BSD #4BSD scheduler +options INET #InterNETworking +options INET6 #IPv6 communications protocols +options FFS #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 +options MSDOSFS #MSDOS Filesystem +options CD9660 #ISO 9660 Filesystem +options PROCFS #Process filesystem (requires PSEUDOFS) +options PSEUDOFS #Pseudo-filesystem framework +options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!] +options SCSI_DELAY=5000 #Delay (in ms) before probing SCSI +options KTRACE #ktrace(1) support +options SYSVSHM #SYSV-style shared memory +options SYSVMSG #SYSV-style message queues +options SYSVSEM #SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +options KBD_INSTALL_CDEV # install a CDEV entry in /dev +options PREEMPTION +options FREEBSD_BOOT_LOADER +options VFP # vfp/neon + +# Debugging +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +options BREAK_TO_DEBUGGER +#options VERBOSE_SYSINIT #Enable verbose sysinit messages +options KDB +options DDB #Enable the kernel debugger +#options INVARIANTS #Enable calls of extra sanity checking +#options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +options WITNESS #Enable checks to detect deadlocks and cycles +options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +options DIAGNOSTIC + +# NFS support +#options NFSCL +#options NFSSERVER #Network Filesystem Server +#options NFSCLIENT #Network Filesystem Client + +# MMC/SD/SDIO card slot support +#device mmc # mmc/sd bus +#device mmcsd # mmc/sd flash cards + +# Boot device is 2nd slice on MMC/SD card +options ROOTDEVNAME=\"ufs:/dev/da0s2\" + +# Console and misc +device uart +device uart_ns8250 +device pty +device snp +device md +device random # Entropy device + +# I2C support +#device iicbus +#device iic + +# GPIO +device gpio + +device scbus # SCSI bus (required for SCSI) +device da # Direct Access (disks) +device pass + +# USB support +device usb +options USB_DEBUG +#options USB_REQ_DEBUG +#options USB_VERBOSE +device dwcotg #DWC OTG controller + +device umass + +# Ethernet +device loop +device ether +device mii +device smscphy +device bpf + +# USB ethernet support, requires miibus +device miibus +device udav + +# Flattened Device Tree +options FDT +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=rk3188-radxa.dts + Modified: stable/10/sys/boot/fdt/dts/digi-ccwmx53.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/digi-ccwmx53.dts Wed May 14 19:18:58 2014 (r266084) +++ stable/10/sys/boot/fdt/dts/digi-ccwmx53.dts Wed May 14 20:11:20 2014 (r266085) @@ -101,6 +101,10 @@ }; }; aips@60000000 { + ethernet@63fec000 { + status = "okay"; + phy-mode = "rmii"; + }; i2c@63fc4000 { status = "okay"; }; Copied: stable/10/sys/boot/fdt/dts/rk3188-radxa.dts (from r256948, head/sys/boot/fdt/dts/rk3188-radxa.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/fdt/dts/rk3188-radxa.dts Wed May 14 20:11:20 2014 (r266085, copy of r256948, head/sys/boot/fdt/dts/rk3188-radxa.dts) @@ -0,0 +1,59 @@ +/*- + * Copyright (c) 2013 Ganbold Tsagaankhuu + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +/dts-v1/; + +/include/ "rk3188.dtsi" + +/ { + model = "Radxa RadxaRock"; + + memory { + device_type = "memory"; + reg = < 0x60000000 0x80000000 >; /* 2GB RAM */ + }; + + aliases { + soc = &SOC; + }; + + SOC: rk3188 { + + uart2: serial@20064000 { + status = "okay"; + }; + + }; + + chosen { + bootargs = "-v"; + stdin = &uart2; + stdout = &uart2; + }; +}; + Copied: stable/10/sys/boot/fdt/dts/rk3188.dtsi (from r256948, head/sys/boot/fdt/dts/rk3188.dtsi) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/fdt/dts/rk3188.dtsi Wed May 14 20:11:20 2014 (r266085, copy of r256948, head/sys/boot/fdt/dts/rk3188.dtsi) @@ -0,0 +1,251 @@ +/*- + * Copyright (c) 2013 Ganbold Tsagaankhuu + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +/ { + compatible = "rockchip,rk3188"; + #address-cells = <1>; + #size-cells = <1>; + + aliases { + soc = &SOC; + }; + + SOC: rk3188 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "simple-bus"; + ranges; + bus-frequency = <0>; + + GIC: interrupt-controller@1013d000 { + compatible = "arm,gic"; + reg = <0x1013d000 0x1000>, /* Distributor Registers */ + <0x1013c100 0x0100>; /* CPU Interface Registers */ + interrupt-controller; + #interrupt-cells = <1>; + }; + + pmu@20004000 { + compatible = "rockchip,rk30xx-pmu"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0x20004000 0x100>; + }; + + grf@20008000 { + compatible = "rockchip,rk30xx-grf"; + #address-cells = <1>; + #size-cells = <1>; + reg = < 0x20008000 0x2000 >; + }; + + mp_tmr@1013c600 { + compatible = "arm,mpcore-timers"; + #address-cells = <1>; + #size-cells = <0>; + clock-frequency = < 148500000 >; + reg = <0x1013c200 0x100>, /* Global Timer Regs */ + <0x1013c600 0x20>; /* Private Timer Regs */ + interrupts = < 27 29 >; + interrupt-parent = <&GIC>; + }; + + timer@20038000 { + compatible = "rockchip,rk30xx-timer"; + compatible = "rockchip,rk3188-dw-apb-timer-osc"; + reg = <0x20038000 0x20>; + interrupts = <76>; + clocks = <24000000>; + status = "disabled"; + }; + + timer@20038020 { + compatible = "rockchip,rk30xx-timer"; + reg = <0x20038020 0x20>; + interrupts = <77>; + clocks = <24000000>; + status = "disabled"; + }; + + timer@20038060 { + compatible = "rockchip,rk30xx-timer"; + reg = <0x20038060 0x20>; + interrupts = <91>; + clocks = <24000000>; + status = "disabled"; + }; + + timer@20038080 { + compatible = "rockchip,rk30xx-timer"; + reg = <0x20038080 0x20>; + interrupts = <92>; + clocks = <24000000>; + status = "disabled"; + }; + + timer@200380a0 { + compatible = "rockchip,rk30xx-timer"; + reg = <0x200380a0 0x20>; + interrupts = <96>; + clocks = <24000000>; + status = "disabled"; + }; + + watchdog@2004c000 { + compatible = "rockchip,rk30xx-wdt"; + reg = <0x2004c000 0x100>; + }; + + gpio0: gpio@2000a000 { + compatible = "rockchip,rk30xx-gpio"; + gpio-controller; + #gpio-cells = <2>; + reg = <0x2000a000 0x100>; + interrupts = <86>; + interrupt-parent = <&GIC>; + }; + + gpio1: gpio@2003c000 { + compatible = "rockchip,rk30xx-gpio"; + gpio-controller; + #gpio-cells = <2>; + reg = <0x2003c000 0x100>; + interrupts = <87>; + interrupt-parent = <&GIC>; + }; + + gpio2: gpio@2003e000 { + compatible = "rockchip,rk30xx-gpio"; + gpio-controller; + #gpio-cells = <2>; + reg = <0x2003e000 0x100>; + interrupts = <88>; + interrupt-parent = <&GIC>; + }; + + gpio3: gpio@20080000 { + compatible = "rockchip,rk30xx-gpio"; + gpio-controller; + #gpio-cells = <2>; + reg = <0x20080000 0x100>; + interrupts = <89>; + interrupt-parent = <&GIC>; + }; + + usb0: usb@10180000 { + compatible = "synopsys,designware-hs-otg2"; + reg = <0x10180000 0x40000>; + interrupts = <48>; + interrupt-parent = <&GIC>; + #address-cells = <1>; + #size-cells = <0>; + }; + + usb1: usb@101c0000 { + compatible = "synopsys,designware-hs-otg2"; + reg = <0x101c0000 0x40000>; + interrupts = < 49 >; + interrupt-parent = <&GIC>; + #address-cells = <1>; + #size-cells = <0>; + }; + + uart0: serial@10124000 { + compatible = "ns16550"; + reg = <0x10124000 0x400>; + reg-shift = <2>; + interrupts = <66>; + interrupt-parent = <&GIC>; + current-speed = <115200>; + clock-frequency = < 24000000 >; + busy-detect = <1>; + broken-txfifo = <1>; + status = "disabled"; + }; + + uart1: serial@10126000 { + compatible = "ns16550"; + reg = <0x10126000 0x400>; + reg-shift = <2>; + interrupts = <67>; + interrupt-parent = <&GIC>; + current-speed = <115200>; + clock-frequency = < 24000000 >; + busy-detect = <1>; + broken-txfifo = <1>; + status = "disabled"; + }; + + uart2: serial@20064000 { + compatible = "ns16550"; + reg = <0x20064000 0x400>; + reg-shift = <2>; + interrupts = <68>; + interrupt-parent = <&GIC>; + current-speed = <115200>; + clock-frequency = < 24000000 >; + busy-detect = <1>; + broken-txfifo = <1>; + status = "disabled"; + }; + + uart3: serial@20068000 { + compatible = "ns16550"; + reg = <0x20068000 0x400>; + reg-shift = <2>; + interrupts = <69>; + interrupt-parent = <&GIC>; + current-speed = <115200>; + clock-frequency = < 24000000 >; + busy-detect = <1>; + broken-txfifo = <1>; + status = "disabled"; + }; + + mmc@10214000 { + compatible = "rockchip,rk30xx-mmc"; + reg = <0x10214000 0x1000>; + interrupts = <55>; + #address-cells = <1>; + #size-cells = <0>; + clocks = <24000000>; /* TODO: verify freq */ + status = "disabled"; + }; + + mmc@10218000 { + compatible = "rockchip,rk30xx-mmc"; + reg = <0x10218000 0x1000>; + interrupts = <56>; + #address-cells = <1>; + #size-cells = <0>; + clocks = <24000000>; /* TODO: verify freq */ + status = "disabled"; + }; + }; +}; + Copied: stable/10/sys/boot/fdt/dts/vybrid-cosmic.dts (from r258057, head/sys/boot/fdt/dts/vybrid-cosmic.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/fdt/dts/vybrid-cosmic.dts Wed May 14 20:11:20 2014 (r266085, copy of r258057, head/sys/boot/fdt/dts/vybrid-cosmic.dts) @@ -0,0 +1,56 @@ +/*- + * Copyright (c) 2013 Ruslan Bukin + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +/dts-v1/; + +/include/ "vybrid.dtsi" + +/ { + model = "Cosmic Board"; + + memory { + device_type = "memory"; + reg = < 0x80000000 0x10000000 >; /* 256MB RAM */ + }; + + SOC: vybrid { + serial0: serial@40027000 { + status = "disabled"; + }; + + fec0: ethernet@400D0000 { + status = "disabled"; + }; + }; + + chosen { + bootargs = "-v"; + stdin = "serial1"; + stdout = "serial1"; + }; +}; Copied: stable/10/sys/boot/fdt/dts/vybrid.dtsi (from r258057, head/sys/boot/fdt/dts/vybrid.dtsi) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/fdt/dts/vybrid.dtsi Wed May 14 20:11:20 2014 (r266085, copy of r258057, head/sys/boot/fdt/dts/vybrid.dtsi) @@ -0,0 +1,223 @@ +/*- + * Copyright (c) 2013 Ruslan Bukin + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +/ { + model = "Freescale Vybrid Family"; + compatible = "freescale,vybrid", "fsl,vf"; + #address-cells = <1>; + #size-cells = <1>; + + interrupt-parent = <&GIC>; + + aliases { + soc = &SOC; + serial0 = &serial0; + serial1 = &serial1; + src = &SRC; + }; + + SOC: vybrid { + #address-cells = <1>; + #size-cells = <1>; + compatible = "simple-bus"; + ranges; + bus-frequency = <0>; + + SRC: src@4006E000 { + compatible = "fsl,mvf600-src"; + reg = <0x4006E000 0x100>; + }; + + mscm@40001000 { + compatible = "fsl,mvf600-mscm"; + reg = <0x40001000 0x1000>; + }; + + GIC: interrupt-controller@01c81000 { + compatible = "arm,gic"; + reg = <0x40003000 0x1000>, /* Distributor Registers */ + <0x40002100 0x100>; /* CPU Interface Registers */ + interrupt-controller; + #interrupt-cells = <1>; + }; + + anadig@40050000 { + compatible = "fsl,mvf600-anadig"; + reg = <0x40050000 0x300>; + }; + + ccm@4006b000 { + compatible = "fsl,mvf600-ccm"; + reg = <0x4006b000 0x1000>; + }; + + mp_tmr@40002100 { + compatible = "arm,mpcore-timers"; + clock-frequency = <133000000>; + #address-cells = <1>; + #size-cells = <0>; + reg = < 0x40002200 0x100 >, /* Global Timer Registers */ + < 0x40002600 0x100 >; /* Private Timer Registers */ + interrupts = < 27 29 >; + interrupt-parent = < &GIC >; + }; + + pit@40037000 { + compatible = "fsl,mvf600-pit"; + reg = <0x40037000 0x1000>; + interrupts = < 71 >; + interrupt-parent = <&GIC>; + clock-frequency = < 24000000 >; + }; + + lptmr@40040000 { + compatible = "fsl,mvf600-lptmr"; + reg = <0x40040000 0x1000>; + interrupts = < 72 >; + interrupt-parent = <&GIC>; + clock-frequency = < 24000000 >; + }; + + iomuxc@40048000 { + compatible = "fsl,mvf600-iomuxc"; + reg = <0x40048000 0x1000>; + }; + + gpio@400FF000 { + compatible = "fsl,mvf600-gpio"; + reg = <0x400FF000 0x200>; + #gpio-cells = <3>; + gpio-controller; + interrupts = < 139 140 141 142 143 >; + interrupt-parent = <&GIC>; + + }; + + nand@400E0000 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "fsl,mvf600-nand"; + reg = <0x400E0000 0x10000>; + interrupts = < 115 >; + interrupt-parent = <&GIC>; + + partition@40000 { + reg = <0x40000 0x200000>; /* 2MB */ + label = "u-boot"; + read-only; + }; + + partition@240000 { + reg = <0x240000 0x200000>; /* 2MB */ + label = "test"; + }; + + partition@440000 { + reg = <0x440000 0xa00000>; /* 10MB */ + label = "kernel"; + }; + + partition@e40000 { + reg = <0xe40000 0x1e000000>; /* 480MB */ + label = "root"; + }; + + }; + + sdhci0: sdhci@400B1000 { + compatible = "fsl,mvf600-sdhci"; + reg = <0x400B1000 0x1000>; + interrupts = < 59 >; + interrupt-parent = <&GIC>; + clock-frequency = <50000000>; + }; + + sdhci1: sdhci@400B2000 { + compatible = "fsl,mvf600-sdhci"; + reg = <0x400B2000 0x1000>; + interrupts = < 60 >; + interrupt-parent = <&GIC>; + clock-frequency = <50000000>; + }; + + serial0: serial@40027000 { + compatible = "fsl,mvf600-uart"; + reg = <0x40027000 0x1000>; + interrupts = <93>; + interrupt-parent = <&GIC>; + current-speed = <115200>; + clock-frequency = < 24000000 >; + }; + + serial1: serial@40028000 { + compatible = "fsl,mvf600-uart"; + reg = <0x40028000 0x1000>; + interrupts = <94>; + interrupt-parent = <&GIC>; + current-speed = <115200>; + clock-frequency = < 24000000 >; + }; + + usb@40034000 { + compatible = "fsl,mvf600-usb-ehci", "usb-ehci"; + reg = < 0x40034000 0x1000 >, /* ehci */ + < 0x40035000 0x1000 >, /* usbc */ + < 0x40050800 0x100 >; /* phy */ + interrupts = < 107 >; + interrupt-parent = <&GIC>; + }; + + usb@400b4000 { + compatible = "fsl,mvf600-usb-ehci", "usb-ehci"; + reg = < 0x400b4000 0x1000 >, /* ehci */ + < 0x400b5000 0x1000 >, /* usbc */ + < 0x40050C00 0x100 >; /* phy */ + interrupts = < 108 >; + interrupt-parent = <&GIC>; + }; + + fec0: ethernet@400D0000 { + compatible = "fsl,mvf600-fec"; + reg = <0x400D0000 0x1000>; + interrupts = < 110 >; + interrupt-parent = <&GIC>; + phy-mode = "rmii"; + phy-disable-preamble; + }; + + fec1: ethernet@400D1000 { + compatible = "fsl,mvf600-fec"; + reg = <0x400D1000 0x1000>; + interrupts = < 111 >; + interrupt-parent = <&GIC>; + phy-mode = "rmii"; + phy-disable-preamble; + }; + + }; +}; Modified: stable/10/sys/dev/uart/uart.h ============================================================================== --- stable/10/sys/dev/uart/uart.h Wed May 14 19:18:58 2014 (r266084) +++ stable/10/sys/dev/uart/uart.h Wed May 14 20:11:20 2014 (r266085) @@ -75,6 +75,7 @@ extern struct uart_class uart_lpc_class extern struct uart_class uart_pl011_class __attribute__((weak)); extern struct uart_class uart_cdnc_class __attribute__((weak)); extern struct uart_class uart_ti8250_class __attribute__((weak)); +extern struct uart_class uart_vybrid_class __attribute__((weak)); #ifdef FDT struct ofw_compat_data; Modified: stable/10/sys/dev/uart/uart_bus_fdt.c ============================================================================== --- stable/10/sys/dev/uart/uart_bus_fdt.c Wed May 14 19:18:58 2014 (r266084) +++ stable/10/sys/dev/uart/uart_bus_fdt.c Wed May 14 20:11:20 2014 (r266085) @@ -80,6 +80,7 @@ static struct ofw_compat_data compat_dat {"fsl,imx27-uart", (uintptr_t)&uart_imx_class}, {"fsl,imx25-uart", (uintptr_t)&uart_imx_class}, {"fsl,imx21-uart", (uintptr_t)&uart_imx_class}, + {"fsl,mvf600-uart", (uintptr_t)&uart_vybrid_class}, {"lpc,uart", (uintptr_t)&uart_lpc_class}, {"ti,ns16550", (uintptr_t)&uart_ti8250_class}, {"ns16550", (uintptr_t)&uart_ns8250_class}, Copied: stable/10/sys/dev/usb/controller/dwc_otg_fdt.c (from r256839, head/sys/dev/usb/controller/dwc_otg_fdt.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/usb/controller/dwc_otg_fdt.c Wed May 14 20:11:20 2014 (r266085, copy of r256839, head/sys/dev/usb/controller/dwc_otg_fdt.c) @@ -0,0 +1,211 @@ +/*- + * Copyright (c) 2012 Hans Petter Selasky. All rights reserved. + * + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Wed May 14 20:17:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 77562864; Wed, 14 May 2014 20:17:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6341B25F9; Wed, 14 May 2014 20:17:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EKHeUA033414; Wed, 14 May 2014 20:17:40 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EKHVcQ033361; Wed, 14 May 2014 20:17:31 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405142017.s4EKHVcQ033361@svn.freebsd.org> From: Ian Lepore Date: Wed, 14 May 2014 20:17:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266086 - in stable/10/sys: arm/arm arm/conf arm/include boot/fdt/dts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 20:17:40 -0000 Author: ian Date: Wed May 14 20:17:31 2014 New Revision: 266086 URL: http://svnweb.freebsd.org/changeset/base/266086 Log: MFC r260440, r260441, r260447, r260490, r260493 Add option USB_HOST_ALIGN to configs that contain 'device usb'. Update dts files of Cubieboard1,2 to use 1GB memory. Add a function to print the contents of the static device mapping table, Modified: stable/10/sys/arm/arm/devmap.c stable/10/sys/arm/arm/machdep.c stable/10/sys/arm/conf/AC100 stable/10/sys/arm/conf/ARMADAXP stable/10/sys/arm/conf/ARNDALE stable/10/sys/arm/conf/ATMEL stable/10/sys/arm/conf/AVILA stable/10/sys/arm/conf/BWCT stable/10/sys/arm/conf/CAMBRIA stable/10/sys/arm/conf/CNS11XXNAS stable/10/sys/arm/conf/COSMIC stable/10/sys/arm/conf/CUBIEBOARD stable/10/sys/arm/conf/CUBIEBOARD2 stable/10/sys/arm/conf/DB-78XXX stable/10/sys/arm/conf/DB-88F5XXX stable/10/sys/arm/conf/DB-88F6XXX stable/10/sys/arm/conf/DIGI-CCWMX53 stable/10/sys/arm/conf/EA3250 stable/10/sys/arm/conf/EB9200 stable/10/sys/arm/conf/EFIKA_MX stable/10/sys/arm/conf/ETHERNUT5 stable/10/sys/arm/conf/HL200 stable/10/sys/arm/conf/HL201 stable/10/sys/arm/conf/IMX53-QSB stable/10/sys/arm/conf/KB920X stable/10/sys/arm/conf/LN2410SBC stable/10/sys/arm/conf/NSLU stable/10/sys/arm/conf/PANDABOARD stable/10/sys/arm/conf/QILA9G20 stable/10/sys/arm/conf/RADXA stable/10/sys/arm/conf/RPI-B stable/10/sys/arm/conf/SAM9260EK stable/10/sys/arm/conf/SAM9G20EK stable/10/sys/arm/conf/SAM9X25EK stable/10/sys/arm/conf/SHEEVAPLUG stable/10/sys/arm/conf/SN9G45 stable/10/sys/arm/conf/TS7800 stable/10/sys/arm/conf/ZEDBOARD stable/10/sys/arm/include/devmap.h stable/10/sys/boot/fdt/dts/cubieboard.dts stable/10/sys/boot/fdt/dts/cubieboard2.dts Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/devmap.c ============================================================================== --- stable/10/sys/arm/arm/devmap.c Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/arm/devmap.c Wed May 14 20:17:31 2014 (r266086) @@ -31,6 +31,8 @@ __FBSDID("$FreeBSD$"); * Routines for mapping device memory. */ +#include "opt_ddb.h" + #include #include #include @@ -54,6 +56,36 @@ static u_int akva_devmap_idx; static vm_offset_t akva_devmap_vaddr = ARM_VECTORS_HIGH; /* + * Print the contents of the static mapping table using the provided printf-like + * output function (which will be either printf or db_printf). + */ +static void +devmap_dump_table(int (*prfunc)(const char *, ...)) +{ + const struct arm_devmap_entry *pd; + + if (devmap_table == NULL || devmap_table[0].pd_size == 0) { + prfunc("No static device mappings.\n"); + return; + } + + prfunc("Static device mappings:\n"); + for (pd = devmap_table; pd->pd_size != 0; ++pd) { + prfunc(" 0x%08x - 0x%08x mapped at VA 0x%08x\n", + pd->pd_pa, pd->pd_pa + pd->pd_size - 1, pd->pd_va); + } +} + +/* + * Print the contents of the static mapping table. Used for bootverbose. + */ +void +arm_devmap_print_table() +{ + devmap_dump_table(printf); +} + +/* * Return the "last" kva address used by the registered devmap table. It's * actually the lowest address used by the static mappings, i.e., the address of * the first unusable byte of KVA. @@ -266,3 +298,13 @@ pmap_unmapdev(vm_offset_t va, vm_size_t kva_free(va, origsize); } +#ifdef DDB +#include + +DB_SHOW_COMMAND(devmap, db_show_devmap) +{ + devmap_dump_table(db_printf); +} + +#endif /* DDB */ + Modified: stable/10/sys/arm/arm/machdep.c ============================================================================== --- stable/10/sys/arm/arm/machdep.c Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/arm/machdep.c Wed May 14 20:17:31 2014 (r266086) @@ -379,10 +379,10 @@ cpu_startup(void *dummy) vm_paddr_t size; size = phys_avail[indx + 1] - phys_avail[indx]; - printf("%#08jx - %#08jx, %ju bytes (%ju pages)\n", + printf(" 0x%08jx - 0x%08jx, %ju KBytes (%ju pages)\n", (uintmax_t)phys_avail[indx], (uintmax_t)phys_avail[indx + 1] - 1, - (uintmax_t)size, (uintmax_t)size / PAGE_SIZE); + (uintmax_t)size / 1024, (uintmax_t)size / PAGE_SIZE); } } @@ -392,6 +392,9 @@ cpu_startup(void *dummy) (uintmax_t)ptoa(cnt.v_free_count), (uintmax_t)ptoa(cnt.v_free_count) / 1048576); + if (bootverbose) + arm_devmap_print_table(); + bufinit(); vm_pager_bufferinit(); pcb->un_32.pcb32_und_sp = (u_int)thread0.td_kstack + Modified: stable/10/sys/arm/conf/AC100 ============================================================================== --- stable/10/sys/arm/conf/AC100 Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/AC100 Wed May 14 20:17:31 2014 (r266086) @@ -66,6 +66,7 @@ device loop device md # USB +options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. #options USB_DEBUG # enable debug msgs #device usb #device ehci Modified: stable/10/sys/arm/conf/ARMADAXP ============================================================================== --- stable/10/sys/arm/conf/ARMADAXP Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/ARMADAXP Wed May 14 20:17:31 2014 (r266086) @@ -67,6 +67,7 @@ device loop device md # USB +options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. options USB_DEBUG # enable debug msgs device usb device ehci Modified: stable/10/sys/arm/conf/ARNDALE ============================================================================== --- stable/10/sys/arm/conf/ARNDALE Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/ARNDALE Wed May 14 20:17:31 2014 (r266086) @@ -94,6 +94,7 @@ device md device gpio # USB support +options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. device usb options USB_DEBUG #options USB_REQ_DEBUG Modified: stable/10/sys/arm/conf/ATMEL ============================================================================== --- stable/10/sys/arm/conf/ATMEL Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/ATMEL Wed May 14 20:17:31 2014 (r266086) @@ -157,6 +157,7 @@ device uart # Multi-uart driver options ALT_BREAK_TO_DEBUGGER # USB support +options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. options USB_DEBUG # enable debug msgs device ohci # OHCI USB interface device usb # USB Bus (required) Modified: stable/10/sys/arm/conf/AVILA ============================================================================== --- stable/10/sys/arm/conf/AVILA Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/AVILA Wed May 14 20:17:31 2014 (r266086) @@ -143,6 +143,7 @@ device ath_ar9160 device ath_ar9280 device usb +options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. #options USB_DEBUG device ohci device ehci Modified: stable/10/sys/arm/conf/BWCT ============================================================================== --- stable/10/sys/arm/conf/BWCT Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/BWCT Wed May 14 20:17:31 2014 (r266086) @@ -104,6 +104,7 @@ device spibus device bpf # Berkeley packet filter #options USB_DEBUG +options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. #device ohci #device usb #device umass # Disks/Mass storage - Requires scbus and da Modified: stable/10/sys/arm/conf/CAMBRIA ============================================================================== --- stable/10/sys/arm/conf/CAMBRIA Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/CAMBRIA Wed May 14 20:17:31 2014 (r266086) @@ -136,6 +136,7 @@ options AH_SUPPORT_AR5416 # NB: for 11n device ath_hal # NB: 2 USB 2.0 ports standard +options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. device usb options USB_EHCI_BIG_ENDIAN_DESC # handle big-endian byte order #options USB_DEBUG Modified: stable/10/sys/arm/conf/CNS11XXNAS ============================================================================== --- stable/10/sys/arm/conf/CNS11XXNAS Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/CNS11XXNAS Wed May 14 20:17:31 2014 (r266086) @@ -106,6 +106,7 @@ device random # Entrop #options ARM_USE_SMALL_ALLOC device usb +options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. #options USB_DEBUG device ohci device ehci Modified: stable/10/sys/arm/conf/COSMIC ============================================================================== --- stable/10/sys/arm/conf/COSMIC Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/COSMIC Wed May 14 20:17:31 2014 (r266086) @@ -97,6 +97,7 @@ device md device gpio # USB support +options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. device usb options USB_DEBUG #options USB_REQ_DEBUG Modified: stable/10/sys/arm/conf/CUBIEBOARD ============================================================================== --- stable/10/sys/arm/conf/CUBIEBOARD Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/CUBIEBOARD Wed May 14 20:17:31 2014 (r266086) @@ -106,6 +106,7 @@ device da # Direct Access (disks) device pass # USB support +options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. device usb options USB_DEBUG #options USB_REQ_DEBUG Modified: stable/10/sys/arm/conf/CUBIEBOARD2 ============================================================================== --- stable/10/sys/arm/conf/CUBIEBOARD2 Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/CUBIEBOARD2 Wed May 14 20:17:31 2014 (r266086) @@ -106,6 +106,7 @@ device da # Direct Access (disks) device pass # USB support +options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. device usb options USB_DEBUG #options USB_REQ_DEBUG Modified: stable/10/sys/arm/conf/DB-78XXX ============================================================================== --- stable/10/sys/arm/conf/DB-78XXX Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/DB-78XXX Wed May 14 20:17:31 2014 (r266086) @@ -67,6 +67,7 @@ device e1000phy device bpf # USB +options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. options USB_DEBUG # enable debug msgs device usb device ehci Modified: stable/10/sys/arm/conf/DB-88F5XXX ============================================================================== --- stable/10/sys/arm/conf/DB-88F5XXX Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/DB-88F5XXX Wed May 14 20:17:31 2014 (r266086) @@ -73,6 +73,7 @@ device iicbus device ds133x # USB +options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. options USB_DEBUG # enable debug msgs device usb device ehci Modified: stable/10/sys/arm/conf/DB-88F6XXX ============================================================================== --- stable/10/sys/arm/conf/DB-88F6XXX Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/DB-88F6XXX Wed May 14 20:17:31 2014 (r266086) @@ -71,6 +71,7 @@ device crypto device cryptodev # USB +options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. options USB_DEBUG # enable debug msgs device usb device ehci Modified: stable/10/sys/arm/conf/DIGI-CCWMX53 ============================================================================== --- stable/10/sys/arm/conf/DIGI-CCWMX53 Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/DIGI-CCWMX53 Wed May 14 20:17:31 2014 (r266086) @@ -134,6 +134,7 @@ device cd # CD device pass # Passthrough device (direct SCSI access) # USB support +options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. options USB_DEBUG # enable debug msgs device ehci # OHCI USB interface device usb # USB Bus (required) Modified: stable/10/sys/arm/conf/EA3250 ============================================================================== --- stable/10/sys/arm/conf/EA3250 Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/EA3250 Wed May 14 20:17:31 2014 (r266086) @@ -65,6 +65,7 @@ device bpf device lpe # USB +options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. options USB_DEBUG device usb device ohci Modified: stable/10/sys/arm/conf/EB9200 ============================================================================== --- stable/10/sys/arm/conf/EB9200 Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/EB9200 Wed May 14 20:17:31 2014 (r266086) @@ -92,6 +92,7 @@ device icee device bpf # USB support +options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. options USB_DEBUG # enable debug msgs device ohci # OHCI localbus->USB interface device usb # USB Bus (required) Modified: stable/10/sys/arm/conf/EFIKA_MX ============================================================================== --- stable/10/sys/arm/conf/EFIKA_MX Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/EFIKA_MX Wed May 14 20:17:31 2014 (r266086) @@ -130,6 +130,7 @@ device cd # CD device pass # Passthrough device (direct SCSI access) # USB support +options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. #options USB_DEBUG # enable debug msgs device ehci # OHCI USB interface device usb # USB Bus (required) Modified: stable/10/sys/arm/conf/ETHERNUT5 ============================================================================== --- stable/10/sys/arm/conf/ETHERNUT5 Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/ETHERNUT5 Wed May 14 20:17:31 2014 (r266086) @@ -149,6 +149,7 @@ device uart # Multi-uart driver options ALT_BREAK_TO_DEBUGGER # USB support +options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. #options USB_DEBUG # enable debug msgs device ohci # OHCI USB interface device usb # USB Bus (required) Modified: stable/10/sys/arm/conf/HL200 ============================================================================== --- stable/10/sys/arm/conf/HL200 Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/HL200 Wed May 14 20:17:31 2014 (r266086) @@ -94,6 +94,7 @@ device icee device bpf # USB support +options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. options USB_DEBUG # enable debug msgs device ohci # OHCI localbus->USB interface device usb # USB Bus (required) Modified: stable/10/sys/arm/conf/HL201 ============================================================================== --- stable/10/sys/arm/conf/HL201 Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/HL201 Wed May 14 20:17:31 2014 (r266086) @@ -96,6 +96,7 @@ device icee device bpf # USB support +options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. #device ohci # OHCI localbus->USB interface device usb # USB Bus (required) #device udbp # USB Double Bulk Pipe devices Modified: stable/10/sys/arm/conf/IMX53-QSB ============================================================================== --- stable/10/sys/arm/conf/IMX53-QSB Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/IMX53-QSB Wed May 14 20:17:31 2014 (r266086) @@ -133,6 +133,7 @@ device cd # CD device pass # Passthrough device (direct SCSI access) # USB support +options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. #options USB_DEBUG # enable debug msgs device ehci # OHCI USB interface device usb # USB Bus (required) Modified: stable/10/sys/arm/conf/KB920X ============================================================================== --- stable/10/sys/arm/conf/KB920X Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/KB920X Wed May 14 20:17:31 2014 (r266086) @@ -95,6 +95,7 @@ device icee device bpf # USB support +options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. options USB_DEBUG # enable debug msgs device ohci # OHCI localbus->USB interface device usb # USB Bus (required) Modified: stable/10/sys/arm/conf/LN2410SBC ============================================================================== --- stable/10/sys/arm/conf/LN2410SBC Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/LN2410SBC Wed May 14 20:17:31 2014 (r266086) @@ -77,6 +77,7 @@ options WITNESS_SKIPSPIN #Don't run wit device md +options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. options USB_DEBUG # enable debug msgs device usb device ohci Modified: stable/10/sys/arm/conf/NSLU ============================================================================== --- stable/10/sys/arm/conf/NSLU Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/NSLU Wed May 14 20:17:31 2014 (r266086) @@ -109,6 +109,7 @@ device random # Entropy device #options ARM_USE_SMALL_ALLOC device usb +options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. options USB_DEBUG device ohci device ehci Modified: stable/10/sys/arm/conf/PANDABOARD ============================================================================== --- stable/10/sys/arm/conf/PANDABOARD Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/PANDABOARD Wed May 14 20:17:31 2014 (r266086) @@ -112,6 +112,7 @@ device md device random # Entropy device # USB support +options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. device usb options USB_DEBUG #options USB_REQ_DEBUG Modified: stable/10/sys/arm/conf/QILA9G20 ============================================================================== --- stable/10/sys/arm/conf/QILA9G20 Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/QILA9G20 Wed May 14 20:17:31 2014 (r266086) @@ -119,6 +119,7 @@ device cd # CD device pass # Passthrough device (direct SCSI access) # USB support +options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. device ohci # OHCI localbus->USB interface device usb # USB Bus (required) device umass # Disks/Mass storage - Requires scbus and da Modified: stable/10/sys/arm/conf/RADXA ============================================================================== --- stable/10/sys/arm/conf/RADXA Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/RADXA Wed May 14 20:17:31 2014 (r266086) @@ -93,6 +93,7 @@ device da # Direct Access (disks) device pass # USB support +options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. device usb options USB_DEBUG #options USB_REQ_DEBUG Modified: stable/10/sys/arm/conf/RPI-B ============================================================================== --- stable/10/sys/arm/conf/RPI-B Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/RPI-B Wed May 14 20:17:31 2014 (r266086) @@ -93,6 +93,7 @@ device md device random # Entropy device # USB support +options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. device usb options USB_DEBUG device dwcotg #DWC OTG controller Modified: stable/10/sys/arm/conf/SAM9260EK ============================================================================== --- stable/10/sys/arm/conf/SAM9260EK Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/SAM9260EK Wed May 14 20:17:31 2014 (r266086) @@ -157,6 +157,7 @@ device uart # Multi-uart driver options ALT_BREAK_TO_DEBUGGER # USB support +options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. #options USB_DEBUG # enable debug msgs device ohci # OHCI USB interface device usb # USB Bus (required) Modified: stable/10/sys/arm/conf/SAM9G20EK ============================================================================== --- stable/10/sys/arm/conf/SAM9G20EK Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/SAM9G20EK Wed May 14 20:17:31 2014 (r266086) @@ -119,6 +119,7 @@ device cd # CD device pass # Passthrough device (direct SCSI access) # USB support +options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. device ohci # OHCI localbus->USB interface device usb # USB Bus (required) device umass # Disks/Mass storage - Requires scbus and da Modified: stable/10/sys/arm/conf/SAM9X25EK ============================================================================== --- stable/10/sys/arm/conf/SAM9X25EK Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/SAM9X25EK Wed May 14 20:17:31 2014 (r266086) @@ -121,6 +121,7 @@ device cd # CD device pass # Passthrough device (direct SCSI access) # USB support +options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. #device ohci # OHCI localbus->USB interface #device usb # USB Bus (required) #device umass # Disks/Mass storage - Requires scbus and da Modified: stable/10/sys/arm/conf/SHEEVAPLUG ============================================================================== --- stable/10/sys/arm/conf/SHEEVAPLUG Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/SHEEVAPLUG Wed May 14 20:17:31 2014 (r266086) @@ -65,6 +65,7 @@ device crypto device cryptodev # USB +options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. options USB_DEBUG # enable debug msgs device usb device ehci Modified: stable/10/sys/arm/conf/SN9G45 ============================================================================== --- stable/10/sys/arm/conf/SN9G45 Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/SN9G45 Wed May 14 20:17:31 2014 (r266086) @@ -97,6 +97,7 @@ device cd # CD device pass # Passthrough device (direct SCSI access) # USB support +options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. device ohci # OHCI localbus->USB interface device usb # USB Bus (required) device umass # Disks/Mass storage - Requires scbus and da Modified: stable/10/sys/arm/conf/TS7800 ============================================================================== --- stable/10/sys/arm/conf/TS7800 Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/TS7800 Wed May 14 20:17:31 2014 (r266086) @@ -61,6 +61,7 @@ device bpf options HZ=1000 # USB +options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. device usb device ehci device umass Modified: stable/10/sys/arm/conf/ZEDBOARD ============================================================================== --- stable/10/sys/arm/conf/ZEDBOARD Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/conf/ZEDBOARD Wed May 14 20:17:31 2014 (r266086) @@ -81,6 +81,7 @@ device sdhci # generic sdhci device bpf # Berkeley packet filter # USB support +options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. device usb options USB_DEBUG #options USB_REQ_DEBUG Modified: stable/10/sys/arm/include/devmap.h ============================================================================== --- stable/10/sys/arm/include/devmap.h Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/arm/include/devmap.h Wed May 14 20:17:31 2014 (r266086) @@ -87,4 +87,7 @@ void arm_devmap_bootstrap(vm_offset_t _l void * arm_devmap_ptov(vm_paddr_t _pa, vm_size_t _sz); vm_paddr_t arm_devmap_vtop(void * _va, vm_size_t _sz); +/* Print the static mapping table; used for bootverbose output. */ +void arm_devmap_print_table(void); + #endif Modified: stable/10/sys/boot/fdt/dts/cubieboard.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/cubieboard.dts Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/boot/fdt/dts/cubieboard.dts Wed May 14 20:17:31 2014 (r266086) @@ -38,7 +38,7 @@ memory { device_type = "memory"; - reg = < 0x40000000 0x20000000 >; /* 512MB RAM */ + reg = < 0x40000000 0x40000000 >; /* 1GB RAM */ }; aliases { Modified: stable/10/sys/boot/fdt/dts/cubieboard2.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/cubieboard2.dts Wed May 14 20:11:20 2014 (r266085) +++ stable/10/sys/boot/fdt/dts/cubieboard2.dts Wed May 14 20:17:31 2014 (r266086) @@ -38,7 +38,7 @@ memory { device_type = "memory"; - reg = < 0x40000000 0x20000000 >; /* 512MB RAM */ + reg = < 0x40000000 0x40000000 >; /* 1GB RAM */ }; aliases { @@ -61,7 +61,7 @@ #interrupt-cells = <1>; }; - cpu-cfg@01c20000 { + cpu-cfg@01c25c00 { compatible = "allwinner,sun7i-cpu-cfg"; #address-cells = <1>; #size-cells = <1>; From owner-svn-src-stable@FreeBSD.ORG Wed May 14 20:31:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3C15BB8; Wed, 14 May 2014 20:31:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF7632785; Wed, 14 May 2014 20:31:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EKVv5s040936; Wed, 14 May 2014 20:31:57 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EKVsgi040549; Wed, 14 May 2014 20:31:54 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405142031.s4EKVsgi040549@svn.freebsd.org> From: Ian Lepore Date: Wed, 14 May 2014 20:31:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266087 - in stable/10/sys: arm/at91 arm/conf dev/nand X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 20:31:58 -0000 Author: ian Date: Wed May 14 20:31:54 2014 New Revision: 266087 URL: http://svnweb.freebsd.org/changeset/base/266087 Log: MFC r260695, r260696, r260884, r260885, r260886, r260887 Provide a simplified way to specify GPIO pins for the Atmel port. Add at91 data so we can convert a PIO unit number into a base address. Add at91 standard memory controller helper functions. Generalize AT91 NAND support a bit. Connect NAND for the SAM9260EK eval board, as well as the HotE HL-201. Add nand device and NANDFS into the mix for those at91 boards that have support for it at the moment. Added: stable/10/sys/arm/at91/at91_gpio.h - copied unchanged from r260695, head/sys/arm/at91/at91_gpio.h stable/10/sys/arm/at91/at91_smc.c - copied unchanged from r260884, head/sys/arm/at91/at91_smc.c stable/10/sys/arm/at91/at91_smc.h - copied unchanged from r260884, head/sys/arm/at91/at91_smc.h stable/10/sys/dev/nand/nfc_at91.h - copied unchanged from r260885, head/sys/dev/nand/nfc_at91.h Modified: stable/10/sys/arm/at91/at91rm9200.c stable/10/sys/arm/at91/at91sam9260.c stable/10/sys/arm/at91/at91sam9g20.c stable/10/sys/arm/at91/at91sam9g45.c stable/10/sys/arm/at91/at91sam9x5.c stable/10/sys/arm/at91/at91var.h stable/10/sys/arm/at91/files.at91 stable/10/sys/arm/conf/ATMEL stable/10/sys/arm/conf/HL201 stable/10/sys/arm/conf/SAM9260EK stable/10/sys/dev/nand/nfc_at91.c Directory Properties: stable/10/ (props changed) Copied: stable/10/sys/arm/at91/at91_gpio.h (from r260695, head/sys/arm/at91/at91_gpio.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/at91/at91_gpio.h Wed May 14 20:31:54 2014 (r266087, copy of r260695, head/sys/arm/at91/at91_gpio.h) @@ -0,0 +1,296 @@ +/*- + * Copyright (c) 2014 M. Warner Losh. All rights reserved. + * + * 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 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 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. + */ + +/* $FreeBSD$ */ + +#ifndef ARM_AT91_AT91_GPIO_H +#define ARM_AT91_AT91_GPIO_H + +typedef uint32_t at91_pin_t; + +#define AT91_PIN_NONE 0xfffffffful /* No pin / Not GPIO controlled */ + +/* + * Map Atmel PIO pins to a unique number. They are just numbered sequentially. + */ + +#define AT91_PIN_PA0 (at91_pin_t)0 +#define AT91_PIN_PA1 (at91_pin_t)1 +#define AT91_PIN_PA2 (at91_pin_t)2 +#define AT91_PIN_PA3 (at91_pin_t)3 +#define AT91_PIN_PA4 (at91_pin_t)4 +#define AT91_PIN_PA5 (at91_pin_t)5 +#define AT91_PIN_PA6 (at91_pin_t)6 +#define AT91_PIN_PA7 (at91_pin_t)7 +#define AT91_PIN_PA8 (at91_pin_t)8 +#define AT91_PIN_PA9 (at91_pin_t)9 +#define AT91_PIN_PA10 (at91_pin_t)10 +#define AT91_PIN_PA11 (at91_pin_t)11 +#define AT91_PIN_PA12 (at91_pin_t)12 +#define AT91_PIN_PA13 (at91_pin_t)13 +#define AT91_PIN_PA14 (at91_pin_t)14 +#define AT91_PIN_PA15 (at91_pin_t)15 +#define AT91_PIN_PA16 (at91_pin_t)16 +#define AT91_PIN_PA17 (at91_pin_t)17 +#define AT91_PIN_PA18 (at91_pin_t)18 +#define AT91_PIN_PA19 (at91_pin_t)19 +#define AT91_PIN_PA20 (at91_pin_t)20 +#define AT91_PIN_PA21 (at91_pin_t)21 +#define AT91_PIN_PA22 (at91_pin_t)22 +#define AT91_PIN_PA23 (at91_pin_t)23 +#define AT91_PIN_PA24 (at91_pin_t)24 +#define AT91_PIN_PA25 (at91_pin_t)25 +#define AT91_PIN_PA26 (at91_pin_t)26 +#define AT91_PIN_PA27 (at91_pin_t)27 +#define AT91_PIN_PA28 (at91_pin_t)28 +#define AT91_PIN_PA29 (at91_pin_t)29 +#define AT91_PIN_PA30 (at91_pin_t)30 +#define AT91_PIN_PA31 (at91_pin_t)31 +#define AT91_PIN_PB0 (at91_pin_t)32 +#define AT91_PIN_PB1 (at91_pin_t)33 +#define AT91_PIN_PB2 (at91_pin_t)34 +#define AT91_PIN_PB3 (at91_pin_t)35 +#define AT91_PIN_PB4 (at91_pin_t)36 +#define AT91_PIN_PB5 (at91_pin_t)37 +#define AT91_PIN_PB6 (at91_pin_t)38 +#define AT91_PIN_PB7 (at91_pin_t)39 +#define AT91_PIN_PB8 (at91_pin_t)40 +#define AT91_PIN_PB9 (at91_pin_t)41 +#define AT91_PIN_PB10 (at91_pin_t)42 +#define AT91_PIN_PB11 (at91_pin_t)43 +#define AT91_PIN_PB12 (at91_pin_t)44 +#define AT91_PIN_PB13 (at91_pin_t)45 +#define AT91_PIN_PB14 (at91_pin_t)46 +#define AT91_PIN_PB15 (at91_pin_t)47 +#define AT91_PIN_PB16 (at91_pin_t)48 +#define AT91_PIN_PB17 (at91_pin_t)49 +#define AT91_PIN_PB18 (at91_pin_t)50 +#define AT91_PIN_PB19 (at91_pin_t)51 +#define AT91_PIN_PB20 (at91_pin_t)52 +#define AT91_PIN_PB21 (at91_pin_t)53 +#define AT91_PIN_PB22 (at91_pin_t)54 +#define AT91_PIN_PB23 (at91_pin_t)55 +#define AT91_PIN_PB24 (at91_pin_t)56 +#define AT91_PIN_PB25 (at91_pin_t)57 +#define AT91_PIN_PB26 (at91_pin_t)58 +#define AT91_PIN_PB27 (at91_pin_t)59 +#define AT91_PIN_PB28 (at91_pin_t)60 +#define AT91_PIN_PB29 (at91_pin_t)61 +#define AT91_PIN_PB30 (at91_pin_t)62 +#define AT91_PIN_PB31 (at91_pin_t)63 +#define AT91_PIN_PC0 (at91_pin_t)64 +#define AT91_PIN_PC1 (at91_pin_t)65 +#define AT91_PIN_PC2 (at91_pin_t)66 +#define AT91_PIN_PC3 (at91_pin_t)67 +#define AT91_PIN_PC4 (at91_pin_t)68 +#define AT91_PIN_PC5 (at91_pin_t)69 +#define AT91_PIN_PC6 (at91_pin_t)70 +#define AT91_PIN_PC7 (at91_pin_t)71 +#define AT91_PIN_PC8 (at91_pin_t)72 +#define AT91_PIN_PC9 (at91_pin_t)73 +#define AT91_PIN_PC10 (at91_pin_t)74 +#define AT91_PIN_PC11 (at91_pin_t)75 +#define AT91_PIN_PC12 (at91_pin_t)76 +#define AT91_PIN_PC13 (at91_pin_t)77 +#define AT91_PIN_PC14 (at91_pin_t)78 +#define AT91_PIN_PC15 (at91_pin_t)79 +#define AT91_PIN_PC16 (at91_pin_t)80 +#define AT91_PIN_PC17 (at91_pin_t)81 +#define AT91_PIN_PC18 (at91_pin_t)82 +#define AT91_PIN_PC19 (at91_pin_t)83 +#define AT91_PIN_PC20 (at91_pin_t)84 +#define AT91_PIN_PC21 (at91_pin_t)85 +#define AT91_PIN_PC22 (at91_pin_t)86 +#define AT91_PIN_PC23 (at91_pin_t)87 +#define AT91_PIN_PC24 (at91_pin_t)88 +#define AT91_PIN_PC25 (at91_pin_t)89 +#define AT91_PIN_PC26 (at91_pin_t)90 +#define AT91_PIN_PC27 (at91_pin_t)91 +#define AT91_PIN_PC28 (at91_pin_t)92 +#define AT91_PIN_PC29 (at91_pin_t)93 +#define AT91_PIN_PC30 (at91_pin_t)94 +#define AT91_PIN_PC31 (at91_pin_t)95 +#define AT91_PIN_PD0 (at91_pin_t)96 +#define AT91_PIN_PD1 (at91_pin_t)97 +#define AT91_PIN_PD2 (at91_pin_t)98 +#define AT91_PIN_PD3 (at91_pin_t)99 +#define AT91_PIN_PD4 (at91_pin_t)100 +#define AT91_PIN_PD5 (at91_pin_t)101 +#define AT91_PIN_PD6 (at91_pin_t)102 +#define AT91_PIN_PD7 (at91_pin_t)103 +#define AT91_PIN_PD8 (at91_pin_t)104 +#define AT91_PIN_PD9 (at91_pin_t)105 +#define AT91_PIN_PD10 (at91_pin_t)106 +#define AT91_PIN_PD11 (at91_pin_t)107 +#define AT91_PIN_PD12 (at91_pin_t)108 +#define AT91_PIN_PD13 (at91_pin_t)109 +#define AT91_PIN_PD14 (at91_pin_t)110 +#define AT91_PIN_PD15 (at91_pin_t)111 +#define AT91_PIN_PD16 (at91_pin_t)112 +#define AT91_PIN_PD17 (at91_pin_t)113 +#define AT91_PIN_PD18 (at91_pin_t)114 +#define AT91_PIN_PD19 (at91_pin_t)115 +#define AT91_PIN_PD20 (at91_pin_t)116 +#define AT91_PIN_PD21 (at91_pin_t)117 +#define AT91_PIN_PD22 (at91_pin_t)118 +#define AT91_PIN_PD23 (at91_pin_t)119 +#define AT91_PIN_PD24 (at91_pin_t)120 +#define AT91_PIN_PD25 (at91_pin_t)121 +#define AT91_PIN_PD26 (at91_pin_t)122 +#define AT91_PIN_PD27 (at91_pin_t)123 +#define AT91_PIN_PD28 (at91_pin_t)124 +#define AT91_PIN_PD29 (at91_pin_t)125 +#define AT91_PIN_PD30 (at91_pin_t)126 +#define AT91_PIN_PD31 (at91_pin_t)127 +#define AT91_PIN_PE0 (at91_pin_t)128 +#define AT91_PIN_PE1 (at91_pin_t)129 +#define AT91_PIN_PE2 (at91_pin_t)130 +#define AT91_PIN_PE3 (at91_pin_t)131 +#define AT91_PIN_PE4 (at91_pin_t)132 +#define AT91_PIN_PE5 (at91_pin_t)133 +#define AT91_PIN_PE6 (at91_pin_t)134 +#define AT91_PIN_PE7 (at91_pin_t)135 +#define AT91_PIN_PE8 (at91_pin_t)136 +#define AT91_PIN_PE9 (at91_pin_t)137 +#define AT91_PIN_PE10 (at91_pin_t)138 +#define AT91_PIN_PE11 (at91_pin_t)139 +#define AT91_PIN_PE12 (at91_pin_t)140 +#define AT91_PIN_PE13 (at91_pin_t)141 +#define AT91_PIN_PE14 (at91_pin_t)142 +#define AT91_PIN_PE15 (at91_pin_t)143 +#define AT91_PIN_PE16 (at91_pin_t)144 +#define AT91_PIN_PE17 (at91_pin_t)145 +#define AT91_PIN_PE18 (at91_pin_t)146 +#define AT91_PIN_PE19 (at91_pin_t)147 +#define AT91_PIN_PE20 (at91_pin_t)148 +#define AT91_PIN_PE21 (at91_pin_t)149 +#define AT91_PIN_PE22 (at91_pin_t)150 +#define AT91_PIN_PE23 (at91_pin_t)151 +#define AT91_PIN_PE24 (at91_pin_t)152 +#define AT91_PIN_PE25 (at91_pin_t)153 +#define AT91_PIN_PE26 (at91_pin_t)154 +#define AT91_PIN_PE27 (at91_pin_t)155 +#define AT91_PIN_PE28 (at91_pin_t)156 +#define AT91_PIN_PE29 (at91_pin_t)157 +#define AT91_PIN_PE30 (at91_pin_t)158 +#define AT91_PIN_PE31 (at91_pin_t)159 +#define AT91_PIN_PF0 (at91_pin_t)160 +#define AT91_PIN_PF1 (at91_pin_t)161 +#define AT91_PIN_PF2 (at91_pin_t)162 +#define AT91_PIN_PF3 (at91_pin_t)163 +#define AT91_PIN_PF4 (at91_pin_t)164 +#define AT91_PIN_PF5 (at91_pin_t)165 +#define AT91_PIN_PF6 (at91_pin_t)166 +#define AT91_PIN_PF7 (at91_pin_t)167 +#define AT91_PIN_PF8 (at91_pin_t)168 +#define AT91_PIN_PF9 (at91_pin_t)169 +#define AT91_PIN_PF10 (at91_pin_t)170 +#define AT91_PIN_PF11 (at91_pin_t)171 +#define AT91_PIN_PF12 (at91_pin_t)172 +#define AT91_PIN_PF13 (at91_pin_t)173 +#define AT91_PIN_PF14 (at91_pin_t)174 +#define AT91_PIN_PF15 (at91_pin_t)175 +#define AT91_PIN_PF16 (at91_pin_t)176 +#define AT91_PIN_PF17 (at91_pin_t)177 +#define AT91_PIN_PF18 (at91_pin_t)178 +#define AT91_PIN_PF19 (at91_pin_t)179 +#define AT91_PIN_PF20 (at91_pin_t)180 +#define AT91_PIN_PF21 (at91_pin_t)181 +#define AT91_PIN_PF22 (at91_pin_t)182 +#define AT91_PIN_PF23 (at91_pin_t)183 +#define AT91_PIN_PF24 (at91_pin_t)184 +#define AT91_PIN_PF25 (at91_pin_t)185 +#define AT91_PIN_PF26 (at91_pin_t)186 +#define AT91_PIN_PF27 (at91_pin_t)187 +#define AT91_PIN_PF28 (at91_pin_t)188 +#define AT91_PIN_PF29 (at91_pin_t)189 +#define AT91_PIN_PF30 (at91_pin_t)190 +#define AT91_PIN_PF31 (at91_pin_t)191 +#define AT91_PIN_PG0 (at91_pin_t)192 +#define AT91_PIN_PG1 (at91_pin_t)193 +#define AT91_PIN_PG2 (at91_pin_t)194 +#define AT91_PIN_PG3 (at91_pin_t)195 +#define AT91_PIN_PG4 (at91_pin_t)196 +#define AT91_PIN_PG5 (at91_pin_t)197 +#define AT91_PIN_PG6 (at91_pin_t)198 +#define AT91_PIN_PG7 (at91_pin_t)199 +#define AT91_PIN_PG8 (at91_pin_t)200 +#define AT91_PIN_PG9 (at91_pin_t)201 +#define AT91_PIN_PG10 (at91_pin_t)202 +#define AT91_PIN_PG11 (at91_pin_t)203 +#define AT91_PIN_PG12 (at91_pin_t)204 +#define AT91_PIN_PG13 (at91_pin_t)205 +#define AT91_PIN_PG14 (at91_pin_t)206 +#define AT91_PIN_PG15 (at91_pin_t)207 +#define AT91_PIN_PG16 (at91_pin_t)208 +#define AT91_PIN_PG17 (at91_pin_t)209 +#define AT91_PIN_PG18 (at91_pin_t)210 +#define AT91_PIN_PG19 (at91_pin_t)211 +#define AT91_PIN_PG20 (at91_pin_t)212 +#define AT91_PIN_PG21 (at91_pin_t)213 +#define AT91_PIN_PG22 (at91_pin_t)214 +#define AT91_PIN_PG23 (at91_pin_t)215 +#define AT91_PIN_PG24 (at91_pin_t)216 +#define AT91_PIN_PG25 (at91_pin_t)217 +#define AT91_PIN_PG26 (at91_pin_t)218 +#define AT91_PIN_PG27 (at91_pin_t)219 +#define AT91_PIN_PG28 (at91_pin_t)220 +#define AT91_PIN_PG29 (at91_pin_t)221 +#define AT91_PIN_PG30 (at91_pin_t)222 +#define AT91_PIN_PG31 (at91_pin_t)223 +#define AT91_PIN_PH0 (at91_pin_t)224 +#define AT91_PIN_PH1 (at91_pin_t)225 +#define AT91_PIN_PH2 (at91_pin_t)226 +#define AT91_PIN_PH3 (at91_pin_t)227 +#define AT91_PIN_PH4 (at91_pin_t)228 +#define AT91_PIN_PH5 (at91_pin_t)229 +#define AT91_PIN_PH6 (at91_pin_t)230 +#define AT91_PIN_PH7 (at91_pin_t)231 +#define AT91_PIN_PH8 (at91_pin_t)232 +#define AT91_PIN_PH9 (at91_pin_t)233 +#define AT91_PIN_PH10 (at91_pin_t)234 +#define AT91_PIN_PH11 (at91_pin_t)235 +#define AT91_PIN_PH12 (at91_pin_t)236 +#define AT91_PIN_PH13 (at91_pin_t)237 +#define AT91_PIN_PH14 (at91_pin_t)238 +#define AT91_PIN_PH15 (at91_pin_t)239 +#define AT91_PIN_PH16 (at91_pin_t)240 +#define AT91_PIN_PH17 (at91_pin_t)241 +#define AT91_PIN_PH18 (at91_pin_t)242 +#define AT91_PIN_PH19 (at91_pin_t)243 +#define AT91_PIN_PH20 (at91_pin_t)244 +#define AT91_PIN_PH21 (at91_pin_t)245 +#define AT91_PIN_PH22 (at91_pin_t)246 +#define AT91_PIN_PH23 (at91_pin_t)247 +#define AT91_PIN_PH24 (at91_pin_t)248 +#define AT91_PIN_PH25 (at91_pin_t)249 +#define AT91_PIN_PH26 (at91_pin_t)250 +#define AT91_PIN_PH27 (at91_pin_t)251 +#define AT91_PIN_PH28 (at91_pin_t)252 +#define AT91_PIN_PH29 (at91_pin_t)253 +#define AT91_PIN_PH30 (at91_pin_t)254 +#define AT91_PIN_PH31 (at91_pin_t)255 + +#endif /* ARM_AT91_AT91_GPIO_H */ Copied: stable/10/sys/arm/at91/at91_smc.c (from r260884, head/sys/arm/at91/at91_smc.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/at91/at91_smc.c Wed May 14 20:31:54 2014 (r266087, copy of r260884, head/sys/arm/at91/at91_smc.c) @@ -0,0 +1,91 @@ +/*- + * Copyright (c) 2014 M. Warner Losh. All rights reserved. + * + * 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 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 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +#include +#include +#include + +/* + * RD4HW()/WR4HW() read and write at91 hardware register space directly. They + * serve the same purpose as the RD4()/WR4() idiom you see in many drivers, + * except that those translate to bus_space calls, but in this code we need to + * access some devices before bus_space is ready to use. Of course for this to + * work the appropriate static device mappings need to be made in machdep.c. + */ +static inline uint32_t +RD4HW(uint32_t devbase, uint32_t regoff) +{ + + return *(volatile uint32_t *)(AT91_BASE + devbase + regoff); +} + + +static inline void +WR4HW(uint32_t devbase, uint32_t regoff, uint32_t val) +{ + + *(volatile uint32_t *)(AT91_BASE + devbase + regoff) = val; +} + + +void +at91_smc_setup(int id, int cs, const struct at91_smc_init *smc) +{ + // Need a generic way to get this address for all SoCs... Assume 9260 for now... + uint32_t base = AT91SAM9260_SMC_BASE + SMC_CS_OFF(cs); + + WR4HW(base, SMC_SETUP, SMC_SETUP_NCS_RD_SETUP(smc->ncs_rd_setup) | + SMC_SETUP_NRD_SETUP(smc->nrd_setup) | + SMC_SETUP_NCS_WR_SETUP(smc->ncs_wr_setup) | + SMC_SETUP_NWE_SETUP(smc->nwe_setup)); + WR4HW(base, SMC_PULSE, SMC_PULSE_NCS_RD_PULSE(smc->ncs_rd_pulse) | + SMC_PULSE_NRD_PULSE(smc->nrd_pulse) | + SMC_PULSE_NCS_WR_PULSE(smc->ncs_wr_pulse) | + SMC_PULSE_NWE_PULSE(smc->nwe_pulse)); + WR4HW(base, SMC_CYCLE, SMC_CYCLE_NRD_CYCLE(smc->nrd_cycle) | + SMC_CYCLE_NWE_CYCLE(smc->nwe_cycle)); + WR4HW(base, SMC_MODE, smc->mode | SMC_MODE_TDF_CYCLES(smc->tdf_cycles)); +} + +void +at91_ebi_enable(int bank) +{ + + WR4HW(AT91SAM9260_MATRIX_BASE, AT91SAM9260_EBICSA, (1 << bank) | + RD4HW(AT91SAM9260_MATRIX_BASE, AT91SAM9260_EBICSA)); +} + +void +at91_ebi_disable(int bank) +{ + + WR4HW(AT91SAM9260_MATRIX_BASE, AT91SAM9260_EBICSA, ~(1 << bank) & + RD4HW(AT91SAM9260_MATRIX_BASE, AT91SAM9260_EBICSA)); +} Copied: stable/10/sys/arm/at91/at91_smc.h (from r260884, head/sys/arm/at91/at91_smc.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/at91/at91_smc.h Wed May 14 20:31:54 2014 (r266087, copy of r260884, head/sys/arm/at91/at91_smc.h) @@ -0,0 +1,116 @@ +/*- + * Copyright (c) 2014 M. Warner Losh. All rights reserved. + * + * 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 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 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. + */ + +/* $FreeBSD$ */ + +#ifndef ARM_AT91_AT91_SMC_H +#define ARM_AT91_AT91_SMC_H + +/* Registers */ +#define SMC_SETUP 0x00 +#define SMC_PULSE 0x04 +#define SMC_CYCLE 0x08 +#define SMC_MODE 0x0C + +#define SMC_CS_OFF(cs) (0x10 * (cs)) + +/* Setup */ +#define SMC_SETUP_NCS_RD_SETUP(x) ((x) << 24) +#define SMC_SETUP_NRD_SETUP(x) ((x) << 16) +#define SMC_SETUP_NCS_WR_SETUP(x) ((x) << 8) +#define SMC_SETUP_NWE_SETUP(x) (x) + +/* Pulse */ +#define SMC_PULSE_NCS_RD_PULSE(x) ((x) << 24) +#define SMC_PULSE_NRD_PULSE(x) ((x) << 16) +#define SMC_PULSE_NCS_WR_PULSE(x) ((x) << 8) +#define SMC_PULSE_NWE_PULSE(x) (x) + +/* Cycle */ +#define SMC_CYCLE_NRD_CYCLE(x) ((x) << 16) +#define SMC_CYCLE_NWE_CYCLE(x) (x) + +/* Mode */ +#define SMC_MODE_READ (1 << 0) +#define SMC_MODE_WRITE (1 << 1) +#define SMC_MODE_EXNW_DISABLED (0 << 4) +#define SMC_MODE_EXNW_FROZEN_MODE (2 << 4) +#define SMC_MODE_EXNW_READY_MODE (3 << 4) +#define SMC_MODE_BAT (1 << 8) +#define SMC_MODE_DBW_8BIT (0 << 12) +#define SMC_MODE_DBW_16BIT (1 << 12) +#define SMC_MODE_DBW_32_BIT (2 << 12) +#define SMC_MODE_TDF_CYCLES(x) ((x) << 16) +#define SMC_MODE_TDF_MODE (1 << 20) +#define SMC_MODE_PMEN (1 << 24) +#define SMC_PS_4BYTE (0 << 28) +#define SMC_PS_8BYTE (1 << 28) +#define SMC_PS_16BYTE (2 << 28) +#define SMC_PS_32BYTE (3 << 28) + +/* + * structure to ease init. See the SMC chapter in the datasheet for + * the appropriate SoC you are using for details. + */ +struct at91_smc_init +{ + /* Setup register */ + uint8_t ncs_rd_setup; + uint8_t nrd_setup; + uint8_t ncs_wr_setup; + uint8_t nwe_setup; + + /* Pulse register */ + uint8_t ncs_rd_pulse; + uint8_t nrd_pulse; + uint8_t ncs_wr_pulse; + uint8_t nwe_pulse; + + /* Cycle register */ + uint16_t nrd_cycle; + uint16_t nwe_cycle; + + /* Mode register */ + uint8_t mode; /* Combo of READ/WRITE/EXNW fields */ + uint8_t bat; + uint8_t dwb; + uint8_t tdf_cycles; + uint8_t tdf_mode; + uint8_t pmen; + uint8_t ps; +}; + +/* + * Convenience routine to fill in SMC registers for a given chip select. + */ +void at91_smc_setup(int id, int cs, const struct at91_smc_init *smc); + +/* + * Disable/Enable different External Bus Interfaces (EBI) + */ +void at91_ebi_enable(int cs); +void at91_ebi_disable(int cs); + +#endif /* ARM_AT91_AT91_SMC_H */ Modified: stable/10/sys/arm/at91/at91rm9200.c ============================================================================== --- stable/10/sys/arm/at91/at91rm9200.c Wed May 14 20:17:31 2014 (r266086) +++ stable/10/sys/arm/at91/at91rm9200.c Wed May 14 20:31:54 2014 (r266087) @@ -88,6 +88,13 @@ static const int at91_irq_prio[32] = 0 /* Advanced Interrupt Controller (IRQ6) */ }; +static const uint32_t at91_pio_base[] = { + AT91RM92_PIOA_BASE, + AT91RM92_PIOB_BASE, + AT91RM92_PIOC_BASE, + AT91RM92_PIOD_BASE, +}; + #define DEVICE(_name, _id, _unit) \ { \ _name, _unit, \ @@ -195,6 +202,8 @@ static struct at91_soc_data soc_data = { .soc_clock_init = at91_clock_init, .soc_irq_prio = at91_irq_prio, .soc_children = at91_devs, + .soc_pio_base = at91_pio_base, + .soc_pio_count = nitems(at91_pio_base), }; AT91_SOC(AT91_T_RM9200, &soc_data); Modified: stable/10/sys/arm/at91/at91sam9260.c ============================================================================== --- stable/10/sys/arm/at91/at91sam9260.c Wed May 14 20:17:31 2014 (r266086) +++ stable/10/sys/arm/at91/at91sam9260.c Wed May 14 20:31:54 2014 (r266087) @@ -87,6 +87,12 @@ static const int at91_irq_prio[32] = 0, /* Advanced Interrupt Controller IRQ2 */ }; +static const uint32_t at91_pio_base[] = { + AT91SAM9260_PIOA_BASE, + AT91SAM9260_PIOB_BASE, + AT91SAM9260_PIOC_BASE, +}; + #define DEVICE(_name, _id, _unit) \ { \ _name, _unit, \ @@ -204,6 +210,8 @@ static struct at91_soc_data soc_data = { .soc_clock_init = at91_clock_init, .soc_irq_prio = at91_irq_prio, .soc_children = at91_devs, + .soc_pio_base = at91_pio_base, + .soc_pio_count = nitems(at91_pio_base), }; AT91_SOC(AT91_T_SAM9260, &soc_data); Modified: stable/10/sys/arm/at91/at91sam9g20.c ============================================================================== --- stable/10/sys/arm/at91/at91sam9g20.c Wed May 14 20:17:31 2014 (r266086) +++ stable/10/sys/arm/at91/at91sam9g20.c Wed May 14 20:31:54 2014 (r266087) @@ -87,6 +87,12 @@ static const int at91_irq_prio[32] = 0, /* Advanced Interrupt Controller IRQ2 */ }; +static const uint32_t at91_pio_base[] = { + AT91SAM9G20_PIOA_BASE, + AT91SAM9G20_PIOB_BASE, + AT91SAM9G20_PIOC_BASE, +}; + #define DEVICE(_name, _id, _unit) \ { \ _name, _unit, \ @@ -169,6 +175,8 @@ static struct at91_soc_data soc_data = { .soc_clock_init = at91_clock_init, .soc_irq_prio = at91_irq_prio, .soc_children = at91_devs, + .soc_pio_base = at91_pio_base, + .soc_pio_count = nitems(at91_pio_base), }; AT91_SOC(AT91_T_SAM9G20, &soc_data); Modified: stable/10/sys/arm/at91/at91sam9g45.c ============================================================================== --- stable/10/sys/arm/at91/at91sam9g45.c Wed May 14 20:17:31 2014 (r266086) +++ stable/10/sys/arm/at91/at91sam9g45.c Wed May 14 20:31:54 2014 (r266087) @@ -88,6 +88,14 @@ static const int at91_irq_prio[32] = 0, /* Advanced Interrupt Controller IRQ0 */ }; +static const uint32_t at91_pio_base[] = { + AT91SAM9G45_PIOA_BASE, + AT91SAM9G45_PIOB_BASE, + AT91SAM9G45_PIOC_BASE, + AT91SAM9G45_PIOD_BASE, + AT91SAM9G45_PIOE_BASE, +}; + #define DEVICE(_name, _id, _unit) \ { \ _name, _unit, \ @@ -155,6 +163,8 @@ static struct at91_soc_data soc_data = { .soc_clock_init = at91_clock_init, .soc_irq_prio = at91_irq_prio, .soc_children = at91_devs, + .soc_pio_base = at91_pio_base, + .soc_pio_count = nitems(at91_pio_base), }; AT91_SOC(AT91_T_SAM9G45, &soc_data); Modified: stable/10/sys/arm/at91/at91sam9x5.c ============================================================================== --- stable/10/sys/arm/at91/at91sam9x5.c Wed May 14 20:17:31 2014 (r266086) +++ stable/10/sys/arm/at91/at91sam9x5.c Wed May 14 20:31:54 2014 (r266087) @@ -87,6 +87,13 @@ static const int at91_irq_prio[32] = 0, /* Advanced Interrupt Controller (IRQ0) */ }; +static const uint32_t at91_pio_base[] = { + AT91SAM9X25_PIOA_BASE, + AT91SAM9X25_PIOB_BASE, + AT91SAM9X25_PIOC_BASE, + AT91SAM9X25_PIOD_BASE, +}; + #define DEVICE(_name, _id, _unit) \ { \ _name, _unit, \ @@ -172,6 +179,8 @@ static struct at91_soc_data soc_data = { .soc_clock_init = at91_clock_init, .soc_irq_prio = at91_irq_prio, .soc_children = at91_devs, + .soc_pio_base = at91_pio_base, + .soc_pio_count = nitems(at91_pio_base), }; AT91_SOC_SUB(AT91_T_SAM9X5, AT91_ST_SAM9X25, &soc_data); Modified: stable/10/sys/arm/at91/at91var.h ============================================================================== --- stable/10/sys/arm/at91/at91var.h Wed May 14 20:17:31 2014 (r266086) +++ stable/10/sys/arm/at91/at91var.h Wed May 14 20:31:54 2014 (r266087) @@ -107,11 +107,13 @@ typedef void (*cpu_reset_t)(void); typedef void (*clk_init_t)(void); struct at91_soc_data { - DELAY_t soc_delay; - cpu_reset_t soc_reset; - clk_init_t soc_clock_init; - const int *soc_irq_prio; - const struct cpu_devs *soc_children; + DELAY_t soc_delay; /* SoC specific delay function */ + cpu_reset_t soc_reset; /* SoC specific reset function */ + clk_init_t soc_clock_init; /* SoC specific clock init function */ + const int *soc_irq_prio; /* SoC specific IRQ priorities */ + const struct cpu_devs *soc_children; /* SoC specific children list */ + const uint32_t *soc_pio_base; /* SoC specific PIO base registers */ + size_t soc_pio_count; /* Count of PIO units (not pins) in SoC */ }; struct at91_soc_info { Modified: stable/10/sys/arm/at91/files.at91 ============================================================================== --- stable/10/sys/arm/at91/files.at91 Wed May 14 20:17:31 2014 (r266086) +++ stable/10/sys/arm/at91/files.at91 Wed May 14 20:31:54 2014 (r266087) @@ -12,6 +12,7 @@ arm/at91/at91_pit.c optional at91sam9 arm/at91/at91_reset.S optional at91sam9 arm/at91/at91_rst.c optional at91sam9 arm/at91/at91_rtc.c optional at91_rtc +arm/at91/at91_smc.c standard arm/at91/at91_spi.c optional at91_spi \ dependency "spibus_if.h" arm/at91/at91_ssc.c optional at91_ssc Modified: stable/10/sys/arm/conf/ATMEL ============================================================================== --- stable/10/sys/arm/conf/ATMEL Wed May 14 20:17:31 2014 (r266086) +++ stable/10/sys/arm/conf/ATMEL Wed May 14 20:31:54 2014 (r266087) @@ -175,3 +175,6 @@ device at91_wdt # Atmel AT91 Watchdog T device at91_rtc device at91_ssc #device at91_tc # missing? + +# NAND Flash - Reference design has Samsung 256MB but others possible +device nand # NAND interface on CS3 Modified: stable/10/sys/arm/conf/HL201 ============================================================================== --- stable/10/sys/arm/conf/HL201 Wed May 14 20:17:31 2014 (r266086) +++ stable/10/sys/arm/conf/HL201 Wed May 14 20:31:54 2014 (r266087) @@ -37,7 +37,8 @@ options FFS #Berkeley Fast Filesystem #options UFS_ACL #Support for access control lists #options UFS_DIRHASH #Improve performance on big directories #options MD_ROOT #MD is a potential root device -#options MD_ROOT_SIZE=4096 # 3MB ram disk +#options MD_ROOT_SIZE=4096 # 4MB ram disk +options NANDFS # NAND file system #options ROOTDEVNAME=\"ufs:/dev/mmcsd0s1a\" options NFSCL #New Network Filesystem Client #options NFSD #New Network Filesystem Server @@ -131,3 +132,5 @@ device pass # Passthrough device (dire #device wlan_amrr # AMRR transmit rate control algorithm options ROOTDEVNAME=\"ufs:da0s1a\" +# NAND Flash - my board as 128MB Samsung part +device nand # NAND interface on CS3 Modified: stable/10/sys/arm/conf/SAM9260EK ============================================================================== --- stable/10/sys/arm/conf/SAM9260EK Wed May 14 20:17:31 2014 (r266086) +++ stable/10/sys/arm/conf/SAM9260EK Wed May 14 20:31:54 2014 (r266087) @@ -1,4 +1,4 @@ -# Kernel configuration for Ethernut 5 boards +# Kernel configuration for Atmel SAM9260-EK eval board # # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: @@ -37,6 +37,7 @@ options SOFTUPDATES # Enable FFS soft options UFS_DIRHASH # Improve performance on big directories #options UFS_GJOURNAL # Enable gjournal-based UFS journaling #options MD_ROOT # MD is a potential root device +options NANDFS # NAND file system options NFSCL # New Network Filesystem Client #options NFSD # New Network Filesystem Server options NFSLOCKD # Network Lock Manager @@ -165,3 +166,6 @@ device umass # Disks/Mass storage - Re # watchdog device at91_wdt # Atmel AT91 Watchdog Timer + +# NAND Flash - Reference design has Samsung 256MB but others possible +device nand # NAND interface on CS3 Modified: stable/10/sys/dev/nand/nfc_at91.c ============================================================================== --- stable/10/sys/dev/nand/nfc_at91.c Wed May 14 20:17:31 2014 (r266086) +++ stable/10/sys/dev/nand/nfc_at91.c Wed May 14 20:31:54 2014 (r266087) @@ -54,23 +54,29 @@ __FBSDID("$FreeBSD$"); #include #include "nfc_if.h" +#include +#include + /* * Data cycles are triggered by access to any address within the EBI CS3 region * that has A21 and A22 clear. Command cycles are any access with bit A21 - * asserted. Address cycles are any access with bit A22 asserted. - * - * XXX The atmel docs say that any address bits can be used instead of A21 and - * A22; these values should be configurable. + * asserted. Address cycles are any access with bit A22 asserted. Or vice versa. + * We get these parameters from the nand_param that the board is required to + * call at91_enable_nand, and enable the GPIO lines properly (that will be moved + * into at91_enable_nand when the great GPIO pin renumbering happens). We use + * ale (Address Latch Enable) and cle (Comand Latch Enable) to match the hardware + * names used in NAND. */ #define AT91_NAND_DATA 0 -#define AT91_NAND_COMMAND (1 << 21) -#define AT91_NAND_ADDRESS (1 << 22) struct at91_nand_softc { struct nand_softc nand_sc; struct resource *res; + struct at91_nand_params *nand_param; }; +static struct at91_nand_params nand_param; + static int at91_nand_attach(device_t); static int at91_nand_probe(device_t); static uint8_t at91_nand_read_byte(device_t); @@ -81,6 +87,12 @@ static int at91_nand_send_command(device static int at91_nand_send_address(device_t, uint8_t); static void at91_nand_write_buf(device_t, void *, uint32_t); +void +at91_enable_nand(const struct at91_nand_params *np) +{ + nand_param = *np; +} + static inline u_int8_t dev_read_1(struct at91_nand_softc *sc, bus_size_t offset) { @@ -108,6 +120,14 @@ at91_nand_attach(device_t dev) int err, rid; sc = device_get_softc(dev); + sc->nand_param = &nand_param; + if (sc->nand_param->width != 8 && sc->nand_param->width != 16) { + device_printf(dev, "Bad bus width (%d) defaulting to 8 bits\n", + sc->nand_param->width); + sc->nand_param->width = 8; + } + at91_ebi_enable(sc->nand_param->cs); + rid = 0; sc->res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); @@ -128,10 +148,10 @@ at91_nand_send_command(device_t dev, uin { struct at91_nand_softc *sc; - /* nand_debug(NDBG_DRV,"at91_nand_send_command: 0x%02x", command); */ + nand_debug(NDBG_DRV,"at91_nand_send_command: 0x%02x", command); sc = device_get_softc(dev); - dev_write_1(sc, AT91_NAND_COMMAND, command); + dev_write_1(sc, sc->nand_param->cle, command); return (0); } @@ -140,10 +160,10 @@ at91_nand_send_address(device_t dev, uin { struct at91_nand_softc *sc; - /* nand_debug(NDBG_DRV,"at91_nand_send_address: x%02x", addr); */ + nand_debug(NDBG_DRV,"at91_nand_send_address: x%02x", addr); sc = device_get_softc(dev); - dev_write_1(sc, AT91_NAND_ADDRESS, addr); + dev_write_1(sc, sc->nand_param->ale, addr); return (0); } @@ -156,7 +176,7 @@ at91_nand_read_byte(device_t dev) sc = device_get_softc(dev); data = dev_read_1(sc, AT91_NAND_DATA); - /* nand_debug(NDBG_DRV,"at91_nand_read_byte: 0x%02x", data); */ + nand_debug(NDBG_DRV,"at91_nand_read_byte: 0x%02x", data); return (data); } Copied: stable/10/sys/dev/nand/nfc_at91.h (from r260885, head/sys/dev/nand/nfc_at91.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/nand/nfc_at91.h Wed May 14 20:31:54 2014 (r266087, copy of r260885, head/sys/dev/nand/nfc_at91.h) @@ -0,0 +1,50 @@ +/*- + * Copyright (C) 2014 Warner Losh. + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +/* + * Atmel at91-family integrated NAND controller driver. + * + * Interface to board setup code to set parameters. + */ + +#ifndef DEV_NAND_NFC_AT91_H +#define DEV_NAND_NFC_AT91_H 1 + +struct at91_nand_params +{ + uint32_t ale; /* Address for ALE (address) NAND cycles */ + uint32_t cle; /* Address for CLE (command) NAND cycles */ + uint32_t width; /* 8 or 16 bits (specify in bits) */ + uint32_t cs; /* Chip Select NAND is connected to */ + uint32_t rnb_pin; /* GPIO pin # for Read/notBusy */ + uint32_t nce_pin; /* GPIO pin # for CE (active low) */ +}; + +void at91_enable_nand(const struct at91_nand_params *); + +#endif /* DEV_NAND_NFC_AT91_H */ From owner-svn-src-stable@FreeBSD.ORG Wed May 14 20:38:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 223BCE90; Wed, 14 May 2014 20:38:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F24427C8; Wed, 14 May 2014 20:38:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EKc50t042345; Wed, 14 May 2014 20:38:05 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EKc5so042343; Wed, 14 May 2014 20:38:05 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405142038.s4EKc5so042343@svn.freebsd.org> From: Ian Lepore Date: Wed, 14 May 2014 20:38:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266088 - stable/10/sys/arm/freescale/imx X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 20:38:06 -0000 Author: ian Date: Wed May 14 20:38:05 2014 New Revision: 266088 URL: http://svnweb.freebsd.org/changeset/base/266088 Log: MFC r259728, r260752 Add Freescale i.MX515 vt(9) driver. Added: stable/10/sys/arm/freescale/imx/imx51_ipuv3_fbd.c - copied, changed from r259728, head/sys/arm/freescale/imx/imx51_ipuv3_fbd.c Modified: stable/10/sys/arm/freescale/imx/files.imx51 Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/freescale/imx/files.imx51 ============================================================================== --- stable/10/sys/arm/freescale/imx/files.imx51 Wed May 14 20:31:54 2014 (r266087) +++ stable/10/sys/arm/freescale/imx/files.imx51 Wed May 14 20:38:05 2014 (r266088) @@ -50,4 +50,5 @@ dev/ofw/ofw_iicbus.c optional fsliic # IPU - Image Processing Unit (frame buffer also) arm/freescale/imx/imx51_ipuv3.c optional sc - +arm/freescale/imx/imx51_ipuv3_fbd.c optional vt +dev/vt/hw/fb/vt_early_fb.c optional vt Copied and modified: stable/10/sys/arm/freescale/imx/imx51_ipuv3_fbd.c (from r259728, head/sys/arm/freescale/imx/imx51_ipuv3_fbd.c) ============================================================================== --- head/sys/arm/freescale/imx/imx51_ipuv3_fbd.c Sun Dec 22 16:09:29 2013 (r259728, copy source) +++ stable/10/sys/arm/freescale/imx/imx51_ipuv3_fbd.c Wed May 14 20:38:05 2014 (r266088) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include From owner-svn-src-stable@FreeBSD.ORG Wed May 14 20:47:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3C694140; Wed, 14 May 2014 20:47:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 299632897; Wed, 14 May 2014 20:47:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EKlqGr046616; Wed, 14 May 2014 20:47:52 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EKlq1H046614; Wed, 14 May 2014 20:47:52 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405142047.s4EKlq1H046614@svn.freebsd.org> From: Ian Lepore Date: Wed, 14 May 2014 20:47:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266089 - stable/10/sys/dev/aha X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 20:47:52 -0000 Author: ian Date: Wed May 14 20:47:51 2014 New Revision: 266089 URL: http://svnweb.freebsd.org/changeset/base/266089 Log: MFC r260893: Free dma memory from the dma map before destroying the map. Modified: stable/10/sys/dev/aha/aha.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/aha/aha.c ============================================================================== --- stable/10/sys/dev/aha/aha.c Wed May 14 20:38:05 2014 (r266088) +++ stable/10/sys/dev/aha/aha.c Wed May 14 20:47:51 2014 (r266089) @@ -207,9 +207,9 @@ aha_free(struct aha_softc *aha) case 7: bus_dmamap_unload(aha->ccb_dmat, aha->ccb_dmamap); case 6: - bus_dmamap_destroy(aha->ccb_dmat, aha->ccb_dmamap); bus_dmamem_free(aha->ccb_dmat, aha->aha_ccb_array, aha->ccb_dmamap); + bus_dmamap_destroy(aha->ccb_dmat, aha->ccb_dmamap); case 5: bus_dma_tag_destroy(aha->ccb_dmat); case 4: From owner-svn-src-stable@FreeBSD.ORG Wed May 14 20:49:10 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E28BE28C; Wed, 14 May 2014 20:49:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF92928A6; Wed, 14 May 2014 20:49:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EKnA9s046835; Wed, 14 May 2014 20:49:10 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EKnA0M046834; Wed, 14 May 2014 20:49:10 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405142049.s4EKnA0M046834@svn.freebsd.org> From: Ian Lepore Date: Wed, 14 May 2014 20:49:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266090 - stable/10/sys/arm/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 20:49:11 -0000 Author: ian Date: Wed May 14 20:49:10 2014 New Revision: 266090 URL: http://svnweb.freebsd.org/changeset/base/266090 Log: MFC r260921: Add nand to arm NOTES Modified: stable/10/sys/arm/conf/NOTES Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/NOTES ============================================================================== --- stable/10/sys/arm/conf/NOTES Wed May 14 20:47:51 2014 (r266089) +++ stable/10/sys/arm/conf/NOTES Wed May 14 20:49:10 2014 (r266090) @@ -60,6 +60,7 @@ device at91_board_sam9g20ek device at91_board_sam9x25ek device at91_board_tsc4370 device at91rm9200 +device nand device board_ln2410sbc nooptions SMP From owner-svn-src-stable@FreeBSD.ORG Wed May 14 22:52:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 313A410E; Wed, 14 May 2014 22:52:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11A70234C; Wed, 14 May 2014 22:52:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EMqH9Z003931; Wed, 14 May 2014 22:52:17 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EMqGma003919; Wed, 14 May 2014 22:52:16 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405142252.s4EMqGma003919@svn.freebsd.org> From: Ian Lepore Date: Wed, 14 May 2014 22:52:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266094 - in stable/10/sys: arm/arm arm/at91 arm/conf conf kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 22:52:18 -0000 Author: ian Date: Wed May 14 22:52:16 2014 New Revision: 266094 URL: http://svnweb.freebsd.org/changeset/base/266094 Log: MFC r261038, r261039, r261040, r261041 Implement generic support for early printf. Modified: stable/10/sys/arm/arm/locore.S stable/10/sys/arm/at91/uart_dev_at91usart.c stable/10/sys/arm/conf/HL201 stable/10/sys/conf/options stable/10/sys/conf/options.arm stable/10/sys/kern/subr_prf.c stable/10/sys/sys/systm.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/locore.S ============================================================================== --- stable/10/sys/arm/arm/locore.S Wed May 14 22:24:09 2014 (r266093) +++ stable/10/sys/arm/arm/locore.S Wed May 14 22:52:16 2014 (r266094) @@ -258,9 +258,13 @@ mmu_init_table: /* fill all table VA==PA */ /* map SDRAM VA==PA, WT cacheable */ #if !defined(SMP) - MMU_INIT(PHYSADDR, PHYSADDR , 64, L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW)) + MMU_INIT(PHYSADDR, PHYSADDR, 64, L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW)) /* map VA 0xc0000000..0xc3ffffff to PA */ MMU_INIT(KERNBASE, PHYSADDR, 64, L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW)) +#if defined(SOCDEV_PA) && defined(SOCKDEV_VA) + /* Map in 0x04000000 worth of the SoC's devices for bootstrap debugging */ + MMU_INIT(SOCKDEV_VA, SOCDEV_PA, 64, L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW)) +#endif #else MMU_INIT(PHYSADDR, PHYSADDR , 64, L1_TYPE_S|L1_SHARED|L1_S_C|L1_S_AP(AP_KRW)) /* map VA 0xc0000000..0xc3ffffff to PA */ Modified: stable/10/sys/arm/at91/uart_dev_at91usart.c ============================================================================== --- stable/10/sys/arm/at91/uart_dev_at91usart.c Wed May 14 22:24:09 2014 (r266093) +++ stable/10/sys/arm/at91/uart_dev_at91usart.c Wed May 14 22:52:16 2014 (r266094) @@ -276,6 +276,24 @@ at91_usart_putc(struct uart_bas *bas, in WR4(bas, USART_THR, c); } +#ifdef EARLY_PRINTF +/* + * Early printf support. This assumes that we have the SoC "system" devices + * mapped into AT91_BASE. To use this before we adjust the boostrap tables, + * You'll need to define SOCDEV_VA to be 0xdc000000 and SOCDEV_PA to be + * 0xfc000000 in your config file where you define EARLY_PRINTF + */ +volatile uint32_t *at91_dbgu = (volatile uint32_t *)(AT91_BASE + AT91_DBGU0); + +void +eputc(int c) +{ + while (!(at91_dbgu[USART_CSR / 4] & USART_CSR_TXRDY)) + continue; + at91_dbgu[USART_THR / 4] = c; +} +#endif + /* * Check for a character available. */ Modified: stable/10/sys/arm/conf/HL201 ============================================================================== --- stable/10/sys/arm/conf/HL201 Wed May 14 22:24:09 2014 (r266093) +++ stable/10/sys/arm/conf/HL201 Wed May 14 22:52:16 2014 (r266094) @@ -1,4 +1,4 @@ -# Kernel configuration for the AT91SAM9 based Hot-e configuration file +# Kernel configuration for the AT91SAM9G20 based Hot-e configuration file # # For more information on this file, please read the handbook section on # Kernel Configuration Files: @@ -39,16 +39,16 @@ options FFS #Berkeley Fast Filesystem #options MD_ROOT #MD is a potential root device #options MD_ROOT_SIZE=4096 # 4MB ram disk options NANDFS # NAND file system -#options ROOTDEVNAME=\"ufs:/dev/mmcsd0s1a\" +options ROOTDEVNAME=\"ufs:/dev/mmcsd0s1a\" options NFSCL #New Network Filesystem Client #options NFSD #New Network Filesystem Server #options NFSLOCKD #Network Lock Manager options NFS_ROOT #NFS usable as /, requires NFSCL -options BOOTP_NFSROOT -options BOOTP -options BOOTP_NFSV3 +#options BOOTP_NFSROOT +#options BOOTP +#options BOOTP_NFSV3 #options BOOTP_WIRED_TO=ate0 -options BOOTP_COMPAT +#options BOOTP_COMPAT options ALT_BREAK_TO_DEBUGGER @@ -62,7 +62,6 @@ options SYSVSHM #SYSV-style shared me options SYSVMSG #SYSV-style message queues options SYSVSEM #SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions -#options SYSCTL_OMIT_DESCR options MUTEX_NOINLINE options RWLOCK_NOINLINE options NO_FFS_SNAPSHOT @@ -83,22 +82,11 @@ device mii #options DIAGNOSTIC device md -#device at91_twi # TWI: Two Wire Interface -#device at91_spi # SPI: -device spibus -# MMC/SD -#device at91_mci -#device mmc -#device mmcsd -# iic -device iic -device iicbus -device icee - device bpf + # USB support options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. -#device ohci # OHCI localbus->USB interface +device ohci # OHCI localbus->USB interface device usb # USB Bus (required) #device udbp # USB Double Bulk Pipe devices device uhid # "Human Interface Devices" @@ -132,5 +120,14 @@ device pass # Passthrough device (dire #device wlan_amrr # AMRR transmit rate control algorithm options ROOTDEVNAME=\"ufs:da0s1a\" -# NAND Flash - my board as 128MB Samsung part -device nand # NAND interface on CS3 +# NAND Flash - my board as 128MB Samsung part, YMMV. +device nand # NAND interface on CS3 + +# Coming soon, but not yet +#options FDT +#options FDT_DTB_STATIC +#makeoptions FDT_DTS_FILE=at91sam9g20ek.dts + +options EARLY_PRINTF +options SOCDEV_PA=0xfc000000 +options SOCDEV_VA=0xdc000000 Modified: stable/10/sys/conf/options ============================================================================== --- stable/10/sys/conf/options Wed May 14 22:24:09 2014 (r266093) +++ stable/10/sys/conf/options Wed May 14 22:52:16 2014 (r266094) @@ -62,6 +62,7 @@ KDB_TRACE opt_kdb.h KDB_UNATTENDED opt_kdb.h KLD_DEBUG opt_kld.h SYSCTL_DEBUG opt_sysctl.h +EARLY_PRINTF opt_global.h TEXTDUMP_PREFERRED opt_ddb.h TEXTDUMP_VERBOSE opt_ddb.h Modified: stable/10/sys/conf/options.arm ============================================================================== --- stable/10/sys/conf/options.arm Wed May 14 22:24:09 2014 (r266093) +++ stable/10/sys/conf/options.arm Wed May 14 22:52:16 2014 (r266094) @@ -36,6 +36,8 @@ LINUX_BOOT_ABI opt_global.h LOADERRAMADDR opt_global.h NO_EVENTTIMERS opt_timer.h PHYSADDR opt_global.h +SOCDEV_PA opt_global.h +SOCDEV_VA opt_global.h PV_STATS opt_pmap.h QEMU_WORKAROUNDS opt_global.h SOC_MV_ARMADAXP opt_global.h Modified: stable/10/sys/kern/subr_prf.c ============================================================================== --- stable/10/sys/kern/subr_prf.c Wed May 14 22:24:09 2014 (r266093) +++ stable/10/sys/kern/subr_prf.c Wed May 14 22:52:16 2014 (r266094) @@ -1122,3 +1122,25 @@ hexdump(const void *ptr, int length, con printf("\n"); } } +#ifdef EARLY_PRINTF +/* + * Support for calling an alternate printf early in boot (like before + * cn_init() can be called). Platforms need to define eputc that want + * to use this. + */ +static void +early_putc_func(int ch, void *arg __unused) +{ + eputc(ch); +} + +void +eprintf(const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + kvprintf(fmt, early_putc_func, NULL, 10, ap); + va_end(ap); +} +#endif Modified: stable/10/sys/sys/systm.h ============================================================================== --- stable/10/sys/sys/systm.h Wed May 14 22:24:09 2014 (r266093) +++ stable/10/sys/sys/systm.h Wed May 14 22:52:16 2014 (r266094) @@ -196,6 +196,10 @@ void init_param1(void); void init_param2(long physpages); void init_static_kenv(char *, size_t); void tablefull(const char *); +#ifdef EARLY_PRINTF +void eprintf(const char *, ...) __printflike(1, 2); +void eputc(int ch); +#endif int kvprintf(char const *, void (*)(int, void*), void *, int, __va_list) __printflike(1, 0); void log(int, const char *, ...) __printflike(2, 3); From owner-svn-src-stable@FreeBSD.ORG Wed May 14 23:17:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 64D284D3; Wed, 14 May 2014 23:17:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44EC524E1; Wed, 14 May 2014 23:17:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4ENHa4a013775; Wed, 14 May 2014 23:17:36 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4ENHYmj013761; Wed, 14 May 2014 23:17:34 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405142317.s4ENHYmj013761@svn.freebsd.org> From: Ian Lepore Date: Wed, 14 May 2014 23:17:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266095 - in stable/10/sys: arm/at91 arm/conf dev/uart X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 23:17:36 -0000 Author: ian Date: Wed May 14 23:17:33 2014 New Revision: 266095 URL: http://svnweb.freebsd.org/changeset/base/266095 Log: MFC r261083, r261092, r261126, r261127, r261128, r261129, r261130, r261131 Add Atmel serial drivers. uart clock-frequency is a FreeBSD-specific extention. Make it optional and allow the client uart drivers to decide if a frequency is required. Remove redundant declaration for uart devclass. Commit some unrelated, but harmless, FDT ifdefs. Add at91 NAND support, Fix comment. Remove obsolete options and fix comments Modified: stable/10/sys/arm/at91/uart_bus_at91usart.c stable/10/sys/arm/at91/uart_cpu_at91usart.c stable/10/sys/arm/conf/BWCT stable/10/sys/arm/conf/HL200 stable/10/sys/arm/conf/QILA9G20 stable/10/sys/arm/conf/SAM9G20EK stable/10/sys/arm/conf/SAM9X25EK stable/10/sys/arm/conf/SN9G45 stable/10/sys/dev/uart/uart.h stable/10/sys/dev/uart/uart_bus_fdt.c stable/10/sys/dev/uart/uart_cpu_fdt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/at91/uart_bus_at91usart.c ============================================================================== --- stable/10/sys/arm/at91/uart_bus_at91usart.c Wed May 14 22:52:16 2014 (r266094) +++ stable/10/sys/arm/at91/uart_bus_at91usart.c Wed May 14 23:17:33 2014 (r266095) @@ -48,8 +48,6 @@ __FBSDID("$FreeBSD$"); static int usart_at91_probe(device_t dev); -extern struct uart_class at91_usart_class; - static device_method_t usart_at91_methods[] = { /* Device interface */ DEVMETHOD(device_probe, usart_at91_probe), Modified: stable/10/sys/arm/at91/uart_cpu_at91usart.c ============================================================================== --- stable/10/sys/arm/at91/uart_cpu_at91usart.c Wed May 14 22:52:16 2014 (r266094) +++ stable/10/sys/arm/at91/uart_cpu_at91usart.c Wed May 14 23:17:33 2014 (r266095) @@ -26,8 +26,10 @@ * SUCH DAMAGE. */ +#include "opt_platform.h" #include "opt_uart.h" +#ifndef FDT #include __FBSDID("$FreeBSD$"); @@ -48,7 +50,6 @@ __FBSDID("$FreeBSD$"); bus_space_tag_t uart_bus_space_io; bus_space_tag_t uart_bus_space_mem; -extern struct uart_class at91_usart_class; extern struct bus_space at91_bs_tag; int @@ -86,3 +87,4 @@ uart_cpu_getdev(int devtype, struct uart uart_getenv(devtype, di, class); return (0); } +#endif Modified: stable/10/sys/arm/conf/BWCT ============================================================================== --- stable/10/sys/arm/conf/BWCT Wed May 14 22:52:16 2014 (r266094) +++ stable/10/sys/arm/conf/BWCT Wed May 14 23:17:33 2014 (r266095) @@ -41,7 +41,7 @@ options SOFTUPDATES #Enable FFS soft u #options UFS_ACL #Support for access control lists #options UFS_DIRHASH #Improve performance on big directories #options MD_ROOT #MD is a potential root device -#options MD_ROOT_SIZE=4096 # 3MB ram disk +#options MD_ROOT_SIZE=4096 # 4MB ram disk #options ROOTDEVNAME=\"ufs:md0\" #options ROOTDEVNAME=\"ufs:/dev/mmcsd0s1a\" options NFSCL #New Network Filesystem Client Modified: stable/10/sys/arm/conf/HL200 ============================================================================== --- stable/10/sys/arm/conf/HL200 Wed May 14 22:52:16 2014 (r266094) +++ stable/10/sys/arm/conf/HL200 Wed May 14 23:17:33 2014 (r266095) @@ -37,7 +37,7 @@ options FFS #Berkeley Fast Filesystem #options UFS_ACL #Support for access control lists #options UFS_DIRHASH #Improve performance on big directories #options MD_ROOT #MD is a potential root device -#options MD_ROOT_SIZE=4096 # 3MB ram disk +#options MD_ROOT_SIZE=4096 # 4MB ram disk #options ROOTDEVNAME=\"ufs:/dev/mmcsd0s1a\" options NFSCL #New Network Filesystem Client #options NFSD #New Network Filesystem Server Modified: stable/10/sys/arm/conf/QILA9G20 ============================================================================== --- stable/10/sys/arm/conf/QILA9G20 Wed May 14 22:52:16 2014 (r266094) +++ stable/10/sys/arm/conf/QILA9G20 Wed May 14 23:17:33 2014 (r266095) @@ -38,7 +38,7 @@ options FFS #Berkeley Fast Filesystem #options UFS_ACL #Support for access control lists #options UFS_DIRHASH #Improve performance on big directories #options MD_ROOT #MD is a potential root device -#options MD_ROOT_SIZE=4096 # 3MB ram disk +#options MD_ROOT_SIZE=4096 # 4MB ram disk options NFSCL #New Network Filesystem Client #options NFSD #New Network Filesystem Server #options NFSLOCKD #Network Lock Manager @@ -63,7 +63,6 @@ options SYSVSHM #SYSV-style shared me options SYSVMSG #SYSV-style message queues options SYSVSEM #SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions -#options SYSCTL_OMIT_DESCR options MUTEX_NOINLINE options RWLOCK_NOINLINE options NO_FFS_SNAPSHOT Modified: stable/10/sys/arm/conf/SAM9G20EK ============================================================================== --- stable/10/sys/arm/conf/SAM9G20EK Wed May 14 22:52:16 2014 (r266094) +++ stable/10/sys/arm/conf/SAM9G20EK Wed May 14 23:17:33 2014 (r266095) @@ -37,7 +37,8 @@ options FFS #Berkeley Fast Filesystem #options UFS_ACL #Support for access control lists #options UFS_DIRHASH #Improve performance on big directories #options MD_ROOT #MD is a potential root device -#options MD_ROOT_SIZE=4096 # 3MB ram disk +#options MD_ROOT_SIZE=4096 # 4MB ram disk +options NANDFS #NAND file system options NFSCL #New Network Filesystem Client #options NFSD #New Network Filesystem Server #options NFSLOCKD #Network Lock Manager @@ -62,7 +63,6 @@ options SYSVSHM #SYSV-style shared me options SYSVMSG #SYSV-style message queues options SYSVSEM #SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions -#options SYSCTL_OMIT_DESCR options MUTEX_NOINLINE options RWLOCK_NOINLINE options NO_FFS_SNAPSHOT @@ -91,6 +91,9 @@ option AT91_ATE_USE_RMII device at91_twi # TWI: Two Wire Interface (EEPROM) device at91_wdt # WDT: Watchdog timer +# NAND Flash - Reference design has Samsung 256MB but others possible +device nand # NAND interface on CS3 + # NOTE: SPI DataFlash and mci/mmc/mmcsd have hardware # confilict on this card. Use one or the other. # see board_sam9g20ek.c @@ -105,7 +108,7 @@ device at91_mci device mmc device mmcsd option AT91_MCI_SLOT_B -#option AT91_MCI_HAS_4WIRE +option AT91_MCI_HAS_4WIRE # iic device iic @@ -128,14 +131,14 @@ device uhid # "Human Interface Devices #device udbp # USB Double Bulk Pipe devices # USB Ethernet, requires miibus -device miibus +#device miibus #device aue # ADMtek USB Ethernet #device axe # ASIX Electronics USB Ethernet #device cdce # Generic USB over Ethernet #device cue # CATC USB Ethernet #device kue # Kawasaki LSI USB Ethernet #device rue # RealTek RTL8150 USB Ethernet -device udav # Davicom DM9601E USB +#device udav # Davicom DM9601E USB # USB Wireless #device rum # Ralink Technology RT2501USB wireless NICs @@ -149,4 +152,3 @@ device udav # Davicom DM9601E USB #device wlan_ccmp # 802.11 CCMP support #device wlan_tkip # 802.11 TKIP support #device wlan_amrr # AMRR transmit rate control algorithm - Modified: stable/10/sys/arm/conf/SAM9X25EK ============================================================================== --- stable/10/sys/arm/conf/SAM9X25EK Wed May 14 22:52:16 2014 (r266094) +++ stable/10/sys/arm/conf/SAM9X25EK Wed May 14 23:17:33 2014 (r266095) @@ -38,7 +38,7 @@ options FFS #Berkeley Fast Filesystem #options UFS_ACL #Support for access control lists #options UFS_DIRHASH #Improve performance on big directories #options MD_ROOT #MD is a potential root device -#options MD_ROOT_SIZE=4096 # 3MB ram disk +#options MD_ROOT_SIZE=4096 # 4MB ram disk options NFSCL #New Network Filesystem Client #options NFSD #New Network Filesystem Server #options NFSLOCKD #Network Lock Manager @@ -63,7 +63,6 @@ options SYSVSHM #SYSV-style shared me options SYSVMSG #SYSV-style message queues options SYSVSEM #SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions -#options SYSCTL_OMIT_DESCR options MUTEX_NOINLINE options RWLOCK_NOINLINE options NO_FFS_SNAPSHOT Modified: stable/10/sys/arm/conf/SN9G45 ============================================================================== --- stable/10/sys/arm/conf/SN9G45 Wed May 14 22:52:16 2014 (r266094) +++ stable/10/sys/arm/conf/SN9G45 Wed May 14 23:17:33 2014 (r266095) @@ -37,7 +37,7 @@ options FFS #Berkeley Fast Filesystem #options UFS_ACL #Support for access control lists #options UFS_DIRHASH #Improve performance on big directories #options MD_ROOT #MD is a potential root device -#options MD_ROOT_SIZE=4096 # 3MB ram disk +#options MD_ROOT_SIZE=4096 # 4MB ram disk options NFSCL #New Network Filesystem Client #options NFSD #New Network Filesystem Server #options NFSLOCKD #Network Lock Manager @@ -62,7 +62,6 @@ options SYSVSHM #SYSV-style shared me options SYSVMSG #SYSV-style message queues options SYSVSEM #SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions -#options SYSCTL_OMIT_DESCR options MUTEX_NOINLINE options RWLOCK_NOINLINE options NO_FFS_SNAPSHOT Modified: stable/10/sys/dev/uart/uart.h ============================================================================== --- stable/10/sys/dev/uart/uart.h Wed May 14 22:52:16 2014 (r266094) +++ stable/10/sys/dev/uart/uart.h Wed May 14 23:17:33 2014 (r266095) @@ -76,6 +76,7 @@ extern struct uart_class uart_pl011_clas extern struct uart_class uart_cdnc_class __attribute__((weak)); extern struct uart_class uart_ti8250_class __attribute__((weak)); extern struct uart_class uart_vybrid_class __attribute__((weak)); +extern struct uart_class at91_usart_class __attribute__((weak)); #ifdef FDT struct ofw_compat_data; Modified: stable/10/sys/dev/uart/uart_bus_fdt.c ============================================================================== --- stable/10/sys/dev/uart/uart_bus_fdt.c Wed May 14 22:52:16 2014 (r266094) +++ stable/10/sys/dev/uart/uart_bus_fdt.c Wed May 14 23:17:33 2014 (r266095) @@ -71,6 +71,8 @@ static driver_t uart_fdt_driver = { */ static struct ofw_compat_data compat_data[] = { {"arm,pl011", (uintptr_t)&uart_pl011_class}, + {"atmel,at91rm9200-usart",(uintptr_t)&at91_usart_class}, + {"atmel,at91sam9260-usart",(uintptr_t)&at91_usart_class}, {"cadence,uart", (uintptr_t)&uart_cdnc_class}, {"exynos", (uintptr_t)&uart_s3c2410_class}, {"fsl,imx6q-uart", (uintptr_t)&uart_imx_class}, Modified: stable/10/sys/dev/uart/uart_cpu_fdt.c ============================================================================== --- stable/10/sys/dev/uart/uart_cpu_fdt.c Wed May 14 22:52:16 2014 (r266094) +++ stable/10/sys/dev/uart/uart_cpu_fdt.c Wed May 14 23:17:33 2014 (r266095) @@ -62,9 +62,10 @@ uart_fdt_get_clock(phandle_t node, pcell { pcell_t clock; + /* clock-frequency is a FreeBSD-only extention. */ if ((OF_getprop(node, "clock-frequency", &clock, sizeof(clock))) <= 0) - return (ENXIO); + clock = 0; if (clock == 0) /* Try to retrieve parent 'bus-frequency' */ From owner-svn-src-stable@FreeBSD.ORG Wed May 14 23:33:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D0978C8; Wed, 14 May 2014 23:33:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 773C2263F; Wed, 14 May 2014 23:33:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4ENXd12022009; Wed, 14 May 2014 23:33:39 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4ENXcGD022004; Wed, 14 May 2014 23:33:38 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201405142333.s4ENXcGD022004@svn.freebsd.org> From: Luiz Otavio O Souza Date: Wed, 14 May 2014 23:33:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266096 - in stable/10: share/man/man4 usr.sbin/gpioctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 23:33:39 -0000 Author: loos Date: Wed May 14 23:33:38 2014 New Revision: 266096 URL: http://svnweb.freebsd.org/changeset/base/266096 Log: MFC r258044, r258679, r263990 Adds gpioiic.4 and gpioled.4 man pages. Moves some of the information that was previously available on gpio.4 to their respectives pages. Add the cross references on gpioctl.8. Add gpiobus(4) as a link to gpio(4). Added: stable/10/share/man/man4/gpioiic.4 - copied unchanged from r258044, head/share/man/man4/gpioiic.4 stable/10/share/man/man4/gpioled.4 - copied unchanged from r258044, head/share/man/man4/gpioled.4 Modified: stable/10/share/man/man4/Makefile stable/10/share/man/man4/gpio.4 stable/10/usr.sbin/gpioctl/gpioctl.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Wed May 14 23:17:33 2014 (r266095) +++ stable/10/share/man/man4/Makefile Wed May 14 23:33:38 2014 (r266096) @@ -157,6 +157,8 @@ MAN= aac.4 \ gif.4 \ gpib.4 \ gpio.4 \ + gpioiic.4 \ + gpioled.4 \ gre.4 \ h_ertt.4 \ hatm.4 \ @@ -635,6 +637,7 @@ MLINKS+=fxp.4 if_fxp.4 MLINKS+=gem.4 if_gem.4 MLINKS+=geom.4 GEOM.4 MLINKS+=gif.4 if_gif.4 +MLINKS+=gpio.4 gpiobus.4 MLINKS+=gre.4 if_gre.4 MLINKS+=hatm.4 if_hatm.4 MLINKS+=hme.4 if_hme.4 Modified: stable/10/share/man/man4/gpio.4 ============================================================================== --- stable/10/share/man/man4/gpio.4 Wed May 14 23:17:33 2014 (r266095) +++ stable/10/share/man/man4/gpio.4 Wed May 14 23:33:38 2014 (r266096) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 13, 2013 +.Dd November 5, 2013 .Dt GPIO 4 .Os .Sh NAME @@ -34,10 +34,9 @@ To compile these devices into your kernel and use the device hints, place the following lines in your kernel configuration file: .Bd -ragged -offset indent -.Cd "device gpiobus" -.Cd "device gpioiic" .Cd "device gpio" .Cd "device gpioc" +.Cd "device gpioiic" .Cd "device gpioled" .Ed .Pp @@ -76,8 +75,9 @@ architecure include: .Sh DESCRIPTION The .Em gpiobus -system provides a simple interface to the bit banging style GPIO bus -found on embedded architectures. +system provides a simple interface to the GPIO pins that are usually +available on embedded architectures and can provide bit banging style +devices to the system. .Pp The acronym .Li GPIO @@ -88,36 +88,20 @@ The BUS physically consists of multiple for input/output, IRQ delivery, SDA/SCL .Em iicbus use, etc. -On most embedded architechtures (mips/arm), discovery of the bus and +.Pp +On some embedded architechtures (like MIPS), discovery of the bus and configuration of the pins is done via .Xr device.hints 5 in the platform's kernel .Xr config 5 file. .Pp -Assignment of -.Xr gpioiic 4 -bus variables is done via: -.Bl -tag -width ".Va hint.gpioiic.%d.atXXX" -.It Va hint.gpioiic.%d.at -Normally just gpiobus0. -.It Va hint.gpioiic.%d.pins -This is a bitmask of the pins on the gpio board that are to be used for -SCLOCK and SDATA from the IIC bus. -To configure pin 0 and 7, use the bitmask of -10000001 and convert it to a hexadecimal value of 0x0081. -Should only ever have two bits set in mask. -.It Va hint.gpioiic.%d.scl -Indicates which bit in the -.Va hint.gpioiic.%d.pins -should be used as the SCLOCK -source. -.It Va hint.gpioiic.%d.sda -Indicates which bit in the -.Va hint.gpioiic.%d.pins -should be used as the SDATA -source. -.El +On some others (like ARM), where +.Xr FDT 4 +is used to describe the device tree, the bus discovery is done via the DTS +passed to the kernel, being either statically compiled in, or by a variety +of ways where the boot loader (or Open Firmware enabled system) passes the +DTS blob to kernel at boot. .Pp The following are only provided by the .Cd ar71xx_gpio @@ -141,28 +125,11 @@ This is mainly used to set/clear functio not setup by uBoot. .El .Pp -These values are configureable from the -.Xr gpioled 4 -interface and help create -.Xr led 4 -compatible devices in -.Pa /dev/led/ . -.Bl -tag -width ".Va hint.gpioiic.%d.atXXX" -.It Va hint.gpioled.%d.at -Normally assigned to gpiobus0. -.It Va hint.gpioled.%d.name -Arbitrary name of device in -.Pa /dev/led/ -to create for -.Xr led 4 -interfaces. -.It Va hint.gpioled.%d.pins -Which pin on the GPIO interface to map to this instance. -.El -.Pp Simply put, each pin of the GPIO interface is connected to an input/output of some device in a system. .Sh SEE ALSO +.Xr gpioiic 4 , +.Xr gpioled 4 , .Xr iicbus 4 , .Xr gpioctl 8 .Sh HISTORY Copied: stable/10/share/man/man4/gpioiic.4 (from r258044, head/share/man/man4/gpioiic.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man4/gpioiic.4 Wed May 14 23:33:38 2014 (r266096, copy of r258044, head/share/man/man4/gpioiic.4) @@ -0,0 +1,96 @@ +.\" Copyright (c) 2013, Luiz Otavio O Souza +.\" All rights reserved. +.\" +.\" 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. +.\" +.\" $FreeBSD$ +.\" +.Dd November 5, 2013 +.Dt GPIOIIC 4 +.Os +.Sh NAME +.Nm gpioiic +.Nd GPIO I2C bit-banging device driver +.Sh SYNOPSIS +.Cd "device gpio" +.Cd "device gpioiic" +.Cd "device iic" +.Cd "device iicbb" +.Cd "device iicbus" +.Sh DESCRIPTION +The +.Em gpioiic +driver provides an IIC bit-banging interface using two GPIO pins for the +SCL and SDA on the +.Em gpiobus . +.Nm +implements an open colector kind of output, as recommended by the standard, +when driving the pins on the +.Em gpiobus , +i.e, they are never switched to the logical value of '1', +or they are '0' or simply open (Hi-Z/tri-state). +So the pullup resistors are required so +.Nm +can work. +.Pp +On a hint based system, like +.Li MIPS , these values are configureable for the +.Nm gpioiic : +.Bl -tag -width ".Va hint.gpioiic.%d.atXXX" +.It Va hint.gpioiic.%d.at +The gpiobus you are attaching to. +Normally just gpiobus0. +.It Va hint.gpioiic.%d.pins +This is a bitmask of the pins on the +.Em gpiobus +that are to be used for SCLOCK and SDATA from the GPIO IIC +bit-banging bus. +To configure pin 0 and 7, use the bitmask of +10000001 and convert it to a hexadecimal value of 0x0081. +Please note that this mask should only ever have two bits set +(any others bits - i.e., pins - will be ignored). +.It Va hint.gpioiic.%d.scl +Indicates which bit in the +.Va hint.gpioiic.%d.pins +should be used as the SCLOCK +source. +.It Va hint.gpioiic.%d.sda +Indicates which bit in the +.Va hint.gpioiic.%d.pins +should be used as the SDATA +source. +.El +.Sh SEE ALSO +.Xr gpio 4 , +.Xr gpioled 4 , +.Xr iic 4 , +.Xr iicbb 4 , +.Xr iicbus 4 +.Sh HISTORY +The +.Nm +manual page first appeared in +.Fx 11.0 . +.Sh AUTHORS +This +manual page was written by +.An Luiz Otavio O Souza . Copied: stable/10/share/man/man4/gpioled.4 (from r258044, head/share/man/man4/gpioled.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man4/gpioled.4 Wed May 14 23:33:38 2014 (r266096, copy of r258044, head/share/man/man4/gpioled.4) @@ -0,0 +1,83 @@ +.\" Copyright (c) 2013, Luiz Otavio O Souza +.\" All rights reserved. +.\" +.\" 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. +.\" +.\" $FreeBSD$ +.\" +.Dd November 5, 2013 +.Dt GPIOLED 4 +.Os +.Sh NAME +.Nm gpioled +.Nd GPIO led generic device driver +.Sh SYNOPSIS +.Cd "device gpio" +.Cd "device gpioled" +.Pp +This driver attaches a +.Xr led 4 +device to a GPIO pin. +.Sh DESCRIPTION +The +.Em gpioled +driver provides a glue to attach a +.Xr led 4 +compatible device to a GPIO pin. +Each led on the system has a +.Pa name +which is used to export a device in +.Pa /dev/led/ . +The GPIO pin can then be controlled by writing to this device as described +on +.Xr led 4 . +.Pp +On a hint based system, like +.Li MIPS , these values are configureable for +.Nm : +.Bl -tag -width ".Va hint.gpioiic.%d.atXXX" +.It Va hint.gpioled.%d.at +The gpiobus you are attaching to. +Normally assigned to gpiobus0. +.It Va hint.gpioled.%d.name +Arbitrary name of device in +.Pa /dev/led/ +to create for +.Xr led 4 . +.It Va hint.gpioled.%d.pins +Which pin on the GPIO interface to map to this instance. +Please note that this mask should only ever have one bit set +(any others bits - i.e., pins - will be ignored). +.El +.Sh SEE ALSO +.Xr gpio 4 , +.Xr led 4 , +.Xr gpioiic 4 +.Sh HISTORY +The +.Nm +manual page first appeared in +.Fx 11.0 . +.Sh AUTHORS +This +manual page was written by +.An Luiz Otavio O Souza . Modified: stable/10/usr.sbin/gpioctl/gpioctl.8 ============================================================================== --- stable/10/usr.sbin/gpioctl/gpioctl.8 Wed May 14 23:17:33 2014 (r266095) +++ stable/10/usr.sbin/gpioctl/gpioctl.8 Wed May 14 23:33:38 2014 (r266096) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 13, 2013 +.Dd November 7, 2013 .Dt GPIOCTL 1 .Os .Sh NAME @@ -109,6 +109,8 @@ gpioctl -f /dev/gpioc0 -c 12 IN .El .Sh SEE ALSO .Xr gpio 4 +.Xr gpioiic 4 +.Xr gpioled 4 .Sh HISTORY The .Nm From owner-svn-src-stable@FreeBSD.ORG Wed May 14 23:51:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E282D43; Wed, 14 May 2014 23:51:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A01D27B5; Wed, 14 May 2014 23:51:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4ENp8Qt029569; Wed, 14 May 2014 23:51:08 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4ENp7Ek029565; Wed, 14 May 2014 23:51:07 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405142351.s4ENp7Ek029565@svn.freebsd.org> From: Ian Lepore Date: Wed, 14 May 2014 23:51:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266097 - in stable/10/sys/arm: arm at91 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 23:51:08 -0000 Author: ian Date: Wed May 14 23:51:07 2014 New Revision: 266097 URL: http://svnweb.freebsd.org/changeset/base/266097 Log: MFC r260886, r261165, r261171, r261172, r261214 Fix gcc with -Wstrict-prototypes by telling it bi_emac takes no parameters. Bus space handles need to be the VA of the requested resource, not the rounded page VA. Correct so the DBGU device can be mapped for FDT console since it isn't on a page boundary. Make early printf output nicer by inserting a carriage return before any linefeeds that are output. Before resetting the USART, delay a bit to allow the transmitter to finish the current character to drain to avoid glitching. Also, simplify the code a smidge. Remove extra parens to silence clang warning. Modified: stable/10/sys/arm/arm/db_trace.c stable/10/sys/arm/at91/at91.c stable/10/sys/arm/at91/board_sam9260ek.c stable/10/sys/arm/at91/uart_dev_at91usart.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/db_trace.c ============================================================================== --- stable/10/sys/arm/arm/db_trace.c Wed May 14 23:33:38 2014 (r266096) +++ stable/10/sys/arm/arm/db_trace.c Wed May 14 23:51:07 2014 (r266097) @@ -269,7 +269,7 @@ db_unwind_exec_insn(struct unwind_state /* Stop processing */ state->entries = 0; - } else if ((insn == INSN_POP_REGS)) { + } else if (insn == INSN_POP_REGS) { unsigned int mask, reg; mask = db_unwind_exec_read_byte(state); Modified: stable/10/sys/arm/at91/at91.c ============================================================================== --- stable/10/sys/arm/at91/at91.c Wed May 14 23:33:38 2014 (r266096) +++ stable/10/sys/arm/at91/at91.c Wed May 14 23:51:07 2014 (r266097) @@ -65,11 +65,13 @@ at91_bs_map(void *t, bus_addr_t bpa, bus pa = trunc_page(bpa); if (pa >= AT91_PA_BASE + 0xff00000) { - *bshp = pa - AT91_PA_BASE + AT91_BASE; + *bshp = bpa - AT91_PA_BASE + AT91_BASE; return (0); } - if (pa >= AT91_BASE + 0xff00000) + if (pa >= AT91_BASE + 0xff00000) { + *bshp = bpa; return (0); + } endpa = round_page(bpa + size); *bshp = (vm_offset_t)pmap_mapdev(pa, endpa - pa); Modified: stable/10/sys/arm/at91/board_sam9260ek.c ============================================================================== --- stable/10/sys/arm/at91/board_sam9260ek.c Wed May 14 23:33:38 2014 (r266096) +++ stable/10/sys/arm/at91/board_sam9260ek.c Wed May 14 23:51:07 2014 (r266097) @@ -38,9 +38,39 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include + +static struct at91_smc_init nand_smc = { + .ncs_rd_setup = 0, + .nrd_setup = 1, + .ncs_wr_setup = 0, + .nwe_setup = 1, + + .ncs_rd_pulse = 3, + .nrd_pulse = 3, + .ncs_wr_pulse = 3, + .nwe_pulse = 3, + + .nrd_cycle = 5, + .nwe_cycle = 5, + + .mode = SMC_MODE_READ | SMC_MODE_WRITE | SMC_MODE_EXNW_DISABLED, + .tdf_cycles = 2, +}; + +static struct at91_nand_params nand_param = { + .ale = 1u << 21, + .cle = 1u << 22, + .width = 8, + .rnb_pin = AT91_PIN_PC13, + .nce_pin = AT91_PIN_PC14, + .cs = 3, +}; -BOARD_INIT long -board_init(void) +static void +bi_dbgu(void) { /* @@ -50,6 +80,11 @@ board_init(void) at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB14, 0); /* DTXD */ at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB15, 1); +} + +static void +bi_emac(void) +{ /* * EMAC @@ -91,7 +126,11 @@ board_init(void) at91_pio_use_periph_b(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA28, 0); /* ECOL */ at91_pio_use_periph_b(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA29, 0); +} +static void +bi_mmc(void) +{ /* * MMC, wired to socket B. @@ -114,11 +153,11 @@ board_init(void) * don't support the dataflash. But if you did, you'd have to * use CS0 and CS1. */ +} - /* - * SPI1 is wired to a audio CODEC that we don't support, so - * give it a pass. - */ +static void +bi_iic(void) +{ /* * TWI. Only one child on the iic bus, which we take care of @@ -128,6 +167,11 @@ board_init(void) at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA23, 1); /* TWCK */ at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA24, 1); +} + +static void +bi_usart0(void) +{ /* * USART0 @@ -148,7 +192,11 @@ board_init(void) at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB26, 1); /* CTS0 */ at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB27, 0); +} +static void +bi_usart1(void) +{ /* * USART1 */ @@ -160,9 +208,54 @@ board_init(void) at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB6, 1); /* RXD1 */ at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB7, 0); +} + +static void +bi_nand(void) +{ + /* Samsung 256MB SLC Flash */ + + /* Setup Static Memory Controller */ + at91_smc_setup(0, 3, &nand_smc); + at91_enable_nand(&nand_param); + + /* + * This assumes + * - RNB is on pin PC13 + * - CE is on pin PC14 + * + * Nothing actually uses RNB right now. + * + * For CE, this currently asserts it during board setup and leaves it + * that way forever. + * + * All this can go away when the gpio pin-renumbering happens... + */ + at91_pio_use_gpio(AT91SAM9260_PIOC_BASE, AT91C_PIO_PC13 | AT91C_PIO_PC14); + at91_pio_gpio_input(AT91SAM9260_PIOC_BASE, AT91C_PIO_PC13); /* RNB */ + at91_pio_gpio_output(AT91SAM9260_PIOC_BASE, AT91C_PIO_PC14, 0); /* nCS */ + at91_pio_gpio_clear(AT91SAM9260_PIOC_BASE, AT91C_PIO_PC14); /* Assert nCS */ +} + +BOARD_INIT long +board_init(void) +{ + bi_dbgu(); + bi_emac(); + bi_mmc(); + + /* + * SPI1 is wired to a audio CODEC that we don't support, so + * give it a pass. + */ + bi_iic(); + bi_usart0(); + bi_usart1(); /* USART2 - USART5 aren't wired up, except via PIO pins, ignore them. */ + bi_nand(); + return (at91_ramsize()); } Modified: stable/10/sys/arm/at91/uart_dev_at91usart.c ============================================================================== --- stable/10/sys/arm/at91/uart_dev_at91usart.c Wed May 14 23:33:38 2014 (r266096) +++ stable/10/sys/arm/at91/uart_dev_at91usart.c Wed May 14 23:51:07 2014 (r266097) @@ -288,6 +288,10 @@ volatile uint32_t *at91_dbgu = (volatile void eputc(int c) { + + if (c == '\n') + eputc('\r'); + while (!(at91_dbgu[USART_CSR / 4] & USART_CSR_TXRDY)) continue; at91_dbgu[USART_THR / 4] = c; From owner-svn-src-stable@FreeBSD.ORG Wed May 14 23:57:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 24793EAC; Wed, 14 May 2014 23:57:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 108B927E3; Wed, 14 May 2014 23:57:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4ENv8Gt031223; Wed, 14 May 2014 23:57:08 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4ENv8sh031217; Wed, 14 May 2014 23:57:08 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405142357.s4ENv8sh031217@svn.freebsd.org> From: Ian Lepore Date: Wed, 14 May 2014 23:57:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266098 - stable/10/sys/arm/ti X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 23:57:09 -0000 Author: ian Date: Wed May 14 23:57:07 2014 New Revision: 266098 URL: http://svnweb.freebsd.org/changeset/base/266098 Log: MFC r258209, r258210, r261211, Add a driver for the Texas Instruments Mailbox hardware. Add a driver for the TI Programmable Realtime Unit Subsystem. fix args to mtx_init Added: stable/10/sys/arm/ti/ti_mbox.c - copied, changed from r258209, head/sys/arm/ti/ti_mbox.c stable/10/sys/arm/ti/ti_mbox.h - copied unchanged from r258209, head/sys/arm/ti/ti_mbox.h stable/10/sys/arm/ti/ti_pruss.c - copied, changed from r258210, head/sys/arm/ti/ti_pruss.c stable/10/sys/arm/ti/ti_pruss.h - copied unchanged from r258210, head/sys/arm/ti/ti_pruss.h Modified: Directory Properties: stable/10/ (props changed) Copied and modified: stable/10/sys/arm/ti/ti_mbox.c (from r258209, head/sys/arm/ti/ti_mbox.c) ============================================================================== --- head/sys/arm/ti/ti_mbox.c Sat Nov 16 08:20:50 2013 (r258209, copy source) +++ stable/10/sys/arm/ti/ti_mbox.c Wed May 14 23:57:07 2014 (r266098) @@ -140,7 +140,7 @@ ti_mbox_attach(device_t dev) } sc = device_get_softc(dev); rid = 0; - mtx_init(&sc->sc_mtx, "TI mbox", MTX_DEF, 0); + mtx_init(&sc->sc_mtx, "TI mbox", NULL, MTX_DEF); sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (sc->sc_mem_res == NULL) { Copied: stable/10/sys/arm/ti/ti_mbox.h (from r258209, head/sys/arm/ti/ti_mbox.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/ti/ti_mbox.h Wed May 14 23:57:07 2014 (r266098, copy of r258209, head/sys/arm/ti/ti_mbox.h) @@ -0,0 +1,44 @@ +/*- + * Copyright (c) 2013 Rui Paulo + * All rights reserved. + * + * 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 ``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 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. + * + * $FreeBSD$ + */ + +#ifndef _TI_MBOX_H_ +#define _TI_MBOX_H_ + +#define TI_MBOX_REVISION 0x00 +#define TI_MBOX_SYSCONFIG 0x10 +#define TI_MBOX_SYSCONFIG_SOFTRST 0x01 +#define TI_MBOX_SYSCONFIG_SMARTIDLE (0x02 << 2) +#define TI_MBOX_MESSAGE(n) (0x40 + (n) * 0x4) +#define TI_MBOX_FIFOSTATUS(n) (0x80 + (n) * 0x4) +#define TI_MBOX_MSGSTATUS(n) (0xc0 + (n) * 0x4) +#define TI_MBOX_IRQSTATUS_RAW(n) (0x100 + (n) * 0x10) +#define TI_MBOX_IRQSTATUS_CLR(n) (0x104 + (n) * 0x10) +#define TI_MBOX_IRQENABLE_SET(n) (0x108 + (n) * 0x10) +#define TI_MBOX_IRQENABLE_CLR(n) (0x10c + (n) * 0x10) + +#endif /* _TI_MBOX_H_ */ Copied and modified: stable/10/sys/arm/ti/ti_pruss.c (from r258210, head/sys/arm/ti/ti_pruss.c) ============================================================================== --- head/sys/arm/ti/ti_pruss.c Sat Nov 16 08:23:15 2013 (r258210, copy source) +++ stable/10/sys/arm/ti/ti_pruss.c Wed May 14 23:57:07 2014 (r266098) @@ -166,7 +166,7 @@ ti_pruss_attach(device_t dev) } sc = device_get_softc(dev); rid = 0; - mtx_init(&sc->sc_mtx, "TI PRUSS", MTX_DEF, 0); + mtx_init(&sc->sc_mtx, "TI PRUSS", NULL, MTX_DEF); sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (sc->sc_mem_res == NULL) { Copied: stable/10/sys/arm/ti/ti_pruss.h (from r258210, head/sys/arm/ti/ti_pruss.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/ti/ti_pruss.h Wed May 14 23:57:07 2014 (r266098, copy of r258210, head/sys/arm/ti/ti_pruss.h) @@ -0,0 +1,36 @@ +/*- + * Copyright (c) 2013 Rui Paulo + * All rights reserved. + * + * 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 ``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 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. + * + * $FreeBSD$ + */ +#ifndef _TI_PRUSS_H_ +#define _TI_PRUSS_H_ + +#define PRUSS_AM18XX_INTC 0x04000 +#define PRUSS_AM18XX_REV 0x4e825900 +#define PRUSS_AM33XX_REV 0x4e82A900 +#define PRUSS_AM33XX_INTC 0x20000 + +#endif /* _TI_PRUSS_H_ */ From owner-svn-src-stable@FreeBSD.ORG Thu May 15 00:11:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 049113C1 for ; Thu, 15 May 2014 00:11:53 +0000 (UTC) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3C45292F for ; Thu, 15 May 2014 00:11:52 +0000 (UTC) Received: from compute2.internal (compute2.nyi.mail.srv.osa [10.202.2.42]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 5035420D0D for ; Wed, 14 May 2014 20:11:50 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute2.internal (MEProxy); Wed, 14 May 2014 20:11:50 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.net; h= message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; s=mesmtp; bh=l4j5tywIG66/CNiGInKoFppfcQo=; b=Yxqe1kEsGQDgSUQGJtsmYqYMjbBJ XWTPDEerq3UGroEJzEKOOWdnnXNX9ZaKrsMPH2Iy0+1V72oPoZauPYnLj/osIP/3 M0pgfi0pnTVlImv74J6YiO5yNprFkxSdTgbbtsbx3fRTo3MAsedv7os/sDafCYtx mT8atTiqtAcopvs= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=l4j5tywIG66/CNiGInKoFp pfcQo=; b=OGfG7ifR8AYHiondeMC4iI7IQVKBRxlhP8oBuUG/jrAGFpW+vh5XcZ eqnxRbyqCAzTgR9ilAZmgH+rViJy9hN/jAexAxwh00YzmtFSW/139vrplu9N9Gc+ xvqhOvCUCb0gEfgFx/Il78geCqXXlPVJx/aUbZneQlChhVxbTy0k8= X-Sasl-enc: AlDHcJvLnrxM3/tATSO8EzTMbFwkx5eGWkPNRym0YCZI 1400112710 Received: from [206.87.178.155] (unknown [206.87.178.155]) by mail.messagingengine.com (Postfix) with ESMTPA id B82DDC00003; Wed, 14 May 2014 20:11:49 -0400 (EDT) Message-ID: <53740645.7060003@fastmail.net> Date: Wed, 14 May 2014 17:11:49 -0700 From: Bruce Simpson User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r266098 - stable/10/sys/arm/ti References: <201405142357.s4ENv8sh031217@svn.freebsd.org> In-Reply-To: <201405142357.s4ENv8sh031217@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 00:11:53 -0000 On 14/05/2014 16:57, Ian Lepore wrote: > TI Programmable Realtime Unit Subsystem. OK, so PRUSS is one vowel change away from the name of a killer android in a work by Philip K. Dick. Are there applications for this driver? I'm just curious having skimmed this document [1]: "The PRU subsystem on the OMAP-L1x processors, C674x DSPs, and AM1x Sitara ARM MPUs allows the application developer to implement soft peripherals; peripherals implemented using a combination of on-chip hardware and software." [1] http://www.ti.com/lit/wp/spry136a/spry136a.pdf From owner-svn-src-stable@FreeBSD.ORG Thu May 15 00:50:58 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B435DF5E; Thu, 15 May 2014 00:50:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 94ED62CA5; Thu, 15 May 2014 00:50:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4F0owOQ054988; Thu, 15 May 2014 00:50:58 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4F0ow92054985; Thu, 15 May 2014 00:50:58 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201405150050.s4F0ow92054985@svn.freebsd.org> From: Mark Johnston Date: Thu, 15 May 2014 00:50:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266101 - in stable/9/sys/cddl: contrib/opensolaris/uts/common/dtrace dev/dtrace X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 00:50:58 -0000 Author: markj Date: Thu May 15 00:50:57 2014 New Revision: 266101 URL: http://svnweb.freebsd.org/changeset/base/266101 Log: MFC r262665: Expose a few DTrace parameters as sysctls under kern.dtrace and add descriptions for several existing sysctls. PR: 187027 Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c stable/9/sys/cddl/dev/dtrace/dtrace_ioctl.c stable/9/sys/cddl/dev/dtrace/dtrace_sysctl.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Thu May 15 00:48:05 2014 (r266100) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Thu May 15 00:50:57 2014 (r266101) @@ -300,7 +300,8 @@ static kmutex_t dtrace_meta_lock; /* me #define PRIV_PROC_ZONE (1 << 5) #define PRIV_ALL ~0 -SYSCTL_NODE(_debug, OID_AUTO, dtrace, CTLFLAG_RD, 0, "DTrace Information"); +SYSCTL_DECL(_debug_dtrace); +SYSCTL_DECL(_kern_dtrace); #endif #if defined(sun) Modified: stable/9/sys/cddl/dev/dtrace/dtrace_ioctl.c ============================================================================== --- stable/9/sys/cddl/dev/dtrace/dtrace_ioctl.c Thu May 15 00:48:05 2014 (r266100) +++ stable/9/sys/cddl/dev/dtrace/dtrace_ioctl.c Thu May 15 00:50:57 2014 (r266101) @@ -23,7 +23,8 @@ */ static int dtrace_verbose_ioctl; -SYSCTL_INT(_debug_dtrace, OID_AUTO, verbose_ioctl, CTLFLAG_RW, &dtrace_verbose_ioctl, 0, ""); +SYSCTL_INT(_debug_dtrace, OID_AUTO, verbose_ioctl, CTLFLAG_RW, + &dtrace_verbose_ioctl, 0, "log DTrace ioctls"); #define DTRACE_IOCTL_PRINTF(fmt, ...) if (dtrace_verbose_ioctl) printf(fmt, ## __VA_ARGS__ ) Modified: stable/9/sys/cddl/dev/dtrace/dtrace_sysctl.c ============================================================================== --- stable/9/sys/cddl/dev/dtrace/dtrace_sysctl.c Thu May 15 00:48:05 2014 (r266100) +++ stable/9/sys/cddl/dev/dtrace/dtrace_sysctl.c Thu May 15 00:50:57 2014 (r266101) @@ -22,6 +22,8 @@ * */ +SYSCTL_NODE(_debug, OID_AUTO, dtrace, CTLFLAG_RD, 0, "DTrace debug parameters"); + int dtrace_debug = 0; TUNABLE_INT("debug.dtrace.debug", &dtrace_debug); SYSCTL_INT(_debug_dtrace, OID_AUTO, debug, CTLFLAG_RW, &dtrace_debug, 0, ""); @@ -78,5 +80,12 @@ sysctl_dtrace_providers(SYSCTL_HANDLER_A } SYSCTL_PROC(_debug_dtrace, OID_AUTO, providers, CTLTYPE_STRING | CTLFLAG_RD, - 0, 0, sysctl_dtrace_providers, "A", ""); + 0, 0, sysctl_dtrace_providers, "A", "available DTrace providers"); + +SYSCTL_NODE(_kern, OID_AUTO, dtrace, CTLFLAG_RD, 0, "DTrace parameters"); + +SYSCTL_LONG(_kern_dtrace, OID_AUTO, dof_maxsize, CTLFLAG_RW, + &dtrace_dof_maxsize, 0, "largest allowed DOF table"); +SYSCTL_LONG(_kern_dtrace, OID_AUTO, helper_actions_max, CTLFLAG_RW, + &dtrace_helper_actions_max, 0, "maximum number of allowed helper actions"); From owner-svn-src-stable@FreeBSD.ORG Thu May 15 00:52:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D6056496; Thu, 15 May 2014 00:52:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B48AC2D56; Thu, 15 May 2014 00:52:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4F0qI2S058202; Thu, 15 May 2014 00:52:18 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4F0qI8U058199; Thu, 15 May 2014 00:52:18 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201405150052.s4F0qI8U058199@svn.freebsd.org> From: Mark Johnston Date: Thu, 15 May 2014 00:52:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266102 - in stable/10/sys/cddl: contrib/opensolaris/uts/common/dtrace dev/dtrace X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 00:52:19 -0000 Author: markj Date: Thu May 15 00:52:17 2014 New Revision: 266102 URL: http://svnweb.freebsd.org/changeset/base/266102 Log: MFC r262665: Expose a few DTrace parameters as sysctls under kern.dtrace and add descriptions for several existing sysctls. PR: 187027 Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c stable/10/sys/cddl/dev/dtrace/dtrace_ioctl.c stable/10/sys/cddl/dev/dtrace/dtrace_sysctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Thu May 15 00:50:57 2014 (r266101) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Thu May 15 00:52:17 2014 (r266102) @@ -300,7 +300,8 @@ static kmutex_t dtrace_meta_lock; /* me #define PRIV_PROC_ZONE (1 << 5) #define PRIV_ALL ~0 -SYSCTL_NODE(_debug, OID_AUTO, dtrace, CTLFLAG_RD, 0, "DTrace Information"); +SYSCTL_DECL(_debug_dtrace); +SYSCTL_DECL(_kern_dtrace); #endif #if defined(sun) Modified: stable/10/sys/cddl/dev/dtrace/dtrace_ioctl.c ============================================================================== --- stable/10/sys/cddl/dev/dtrace/dtrace_ioctl.c Thu May 15 00:50:57 2014 (r266101) +++ stable/10/sys/cddl/dev/dtrace/dtrace_ioctl.c Thu May 15 00:52:17 2014 (r266102) @@ -23,7 +23,8 @@ */ static int dtrace_verbose_ioctl; -SYSCTL_INT(_debug_dtrace, OID_AUTO, verbose_ioctl, CTLFLAG_RW, &dtrace_verbose_ioctl, 0, ""); +SYSCTL_INT(_debug_dtrace, OID_AUTO, verbose_ioctl, CTLFLAG_RW, + &dtrace_verbose_ioctl, 0, "log DTrace ioctls"); #define DTRACE_IOCTL_PRINTF(fmt, ...) if (dtrace_verbose_ioctl) printf(fmt, ## __VA_ARGS__ ) Modified: stable/10/sys/cddl/dev/dtrace/dtrace_sysctl.c ============================================================================== --- stable/10/sys/cddl/dev/dtrace/dtrace_sysctl.c Thu May 15 00:50:57 2014 (r266101) +++ stable/10/sys/cddl/dev/dtrace/dtrace_sysctl.c Thu May 15 00:52:17 2014 (r266102) @@ -22,6 +22,8 @@ * */ +SYSCTL_NODE(_debug, OID_AUTO, dtrace, CTLFLAG_RD, 0, "DTrace debug parameters"); + int dtrace_debug = 0; TUNABLE_INT("debug.dtrace.debug", &dtrace_debug); SYSCTL_INT(_debug_dtrace, OID_AUTO, debug, CTLFLAG_RW, &dtrace_debug, 0, ""); @@ -78,5 +80,12 @@ sysctl_dtrace_providers(SYSCTL_HANDLER_A } SYSCTL_PROC(_debug_dtrace, OID_AUTO, providers, CTLTYPE_STRING | CTLFLAG_RD, - 0, 0, sysctl_dtrace_providers, "A", ""); + 0, 0, sysctl_dtrace_providers, "A", "available DTrace providers"); + +SYSCTL_NODE(_kern, OID_AUTO, dtrace, CTLFLAG_RD, 0, "DTrace parameters"); + +SYSCTL_LONG(_kern_dtrace, OID_AUTO, dof_maxsize, CTLFLAG_RW, + &dtrace_dof_maxsize, 0, "largest allowed DOF table"); +SYSCTL_LONG(_kern_dtrace, OID_AUTO, helper_actions_max, CTLFLAG_RW, + &dtrace_helper_actions_max, 0, "maximum number of allowed helper actions"); From owner-svn-src-stable@FreeBSD.ORG Thu May 15 01:27:58 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D83923D; Thu, 15 May 2014 01:27:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 765FF210E; Thu, 15 May 2014 01:27:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4F1Rwwi072887; Thu, 15 May 2014 01:27:58 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4F1Rsbx072863; Thu, 15 May 2014 01:27:54 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201405150127.s4F1Rsbx072863@svn.freebsd.org> From: Luiz Otavio O Souza Date: Thu, 15 May 2014 01:27:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266105 - in stable/10: share/man/man4 sys/arm/broadcom/bcm2835 sys/arm/conf sys/arm/ti sys/boot/fdt/dts sys/conf sys/dev/gpio sys/dev/iicbus sys/dev/ofw sys/modules/gpio/gpiobus sys/mo... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 01:27:58 -0000 Author: loos Date: Thu May 15 01:27:53 2014 New Revision: 266105 URL: http://svnweb.freebsd.org/changeset/base/266105 Log: MFC r258046, r258047, r258050, r259035, r259036, r259037, r261842, r261843, r261844, r261845, r261846, r262194, r262522, r262559 r258046: Fix a typo on a comment in ofw_bus_if.m, the default method will return -1 when a node doesn't exist. r258047: Move the KASSERT() check to the point before the increase of number of pins. r258050: Fix gpiobus to return BUS_PROBE_GENERIC insted of BUS_PROBE_SPECIFIC (0) so it can be overriden by its OFW/FDT version. Give a chance for GPIO devices that implement the device_identify method to attach. r259035: Remove unnecessary includes and an unused softc variable. While here apply two minor style(9) fixes. r259036: Move the GPIOBUS_SET_PINFLAGS(..., ..., pin, GPIO_PIN_OUTPUT) to led(4) control callback function. This makes gpioled(4) works even if the pin is accidentally set to an input. r259037: Fix the pin value reading on AM335x. Because of the inverted logic it was always returning '0' for all the reads, even for the outputs. It is now known to work with gpioiic(4) and gpioled(4). r261842: Add an OFW GPIO compatible bus. This allows the use of the DTS files to describe GPIO bindings in the system. Move the GPIOBUS lock macros to gpiobusvar.h as they are now shared between the OFW and the non OFW versions of GPIO bus. Export gpiobus_print_pins() so it can also be used on the OFW GPIO bus. r261843: Add OFW support to the in tree gpio compatible devices: gpioiic(4) and gpioled(4). Tested on RPi and BBB (using the hardware I2C controller and gpioiic(4) for the I2C tests). It was also verified for regressions on RSPRO (MIPS/ar71xx) used as reference for a non OFW-based system. Update the gpioled(4) and gpioiic(4) man pages with some details and examples about the FDT/OFW support. Some compatibility details pointed out by imp@ will follow in subsequent commits. r261844: Allow the use of OFW I2C bus together with iicbb(4) on OFW-based systems. This change makes ofw_iicbus attach to iicbb(4) controllers in addition to the already supported i2c host bridges (iichb). On iicbb(4) allow the direct access of the OFW parent node by its children, so they can be directly attached to iicbb(4) node on the DTS without the need of describing the i2c bus. r261845: Allow the use of the OFW GPIO bus for ti_gpio and bcm2835_gpio. With this change the gpio children can be described as directly connected to the GPIO controller without the need of describing the OFW GPIO bus itself on the DTS file. With this commit the OFW GPIO bus is fully functional on BBB and RPi. GPIO controllers which want to use the OFW GPIO bus will need similar changes. r261846: Make the gpioled(4) work out of the box on BBB. Add gpioled(4) to BEAGLEBONE kernel and add the description of the four on-board leds of beaglebone-black to its DTS file. r262194: Remove an unnecessary header. r262522: Fix make depend for iicbus. r262559: Inspired by r262522, fix make depend. This fixes the build of gpio modules. Added: stable/10/sys/dev/gpio/ofw_gpiobus.c - copied, changed from r261842, head/sys/dev/gpio/ofw_gpiobus.c Modified: stable/10/share/man/man4/gpioiic.4 stable/10/share/man/man4/gpioled.4 stable/10/sys/arm/broadcom/bcm2835/bcm2835_gpio.c stable/10/sys/arm/conf/BEAGLEBONE stable/10/sys/arm/ti/ti_gpio.c stable/10/sys/boot/fdt/dts/beaglebone-black.dts stable/10/sys/boot/fdt/dts/bindings-gpio.txt stable/10/sys/conf/files stable/10/sys/dev/gpio/gpiobus.c stable/10/sys/dev/gpio/gpiobusvar.h stable/10/sys/dev/gpio/gpioiic.c stable/10/sys/dev/gpio/gpioled.c stable/10/sys/dev/iicbus/iicbb.c stable/10/sys/dev/ofw/ofw_bus_if.m stable/10/sys/dev/ofw/ofw_iicbus.c stable/10/sys/modules/gpio/gpiobus/Makefile stable/10/sys/modules/gpio/gpioiic/Makefile stable/10/sys/modules/gpio/gpioled/Makefile stable/10/sys/modules/i2c/iicbb/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/gpioiic.4 ============================================================================== --- stable/10/share/man/man4/gpioiic.4 Thu May 15 01:27:24 2014 (r266104) +++ stable/10/share/man/man4/gpioiic.4 Thu May 15 01:27:53 2014 (r266105) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 5, 2013 +.Dd February 13, 2014 .Dt GPIOIIC 4 .Os .Sh NAME @@ -65,7 +65,7 @@ This is a bitmask of the pins on the that are to be used for SCLOCK and SDATA from the GPIO IIC bit-banging bus. To configure pin 0 and 7, use the bitmask of -10000001 and convert it to a hexadecimal value of 0x0081. +0b10000001 and convert it to a hexadecimal value of 0x0081. Please note that this mask should only ever have two bits set (any others bits - i.e., pins - will be ignored). .It Va hint.gpioiic.%d.scl @@ -73,13 +73,77 @@ Indicates which bit in the .Va hint.gpioiic.%d.pins should be used as the SCLOCK source. +Optional, defaults to 0. .It Va hint.gpioiic.%d.sda Indicates which bit in the .Va hint.gpioiic.%d.pins should be used as the SDATA source. +Optional, defaults to 1. +.El +.Pp +On a +.Xr FDT 4 +based system, like +.Li ARM , the dts part for a +.Nm gpioiic +device usually looks like: +.Bd -literal +gpio: gpio { + + gpio-controller; + ... + + gpioiic0 { + compatible = "gpioiic"; + /* + * Attach to GPIO pins 21 and 22. Set them + * initially as inputs. + */ + gpios = <&gpio 21 1 0 + &gpio 22 1 0>; + scl = <0>; /* GPIO pin 21 - optional */ + sda = <1>; /* GPIO pin 22 - optional */ + + /* This is an example of a gpioiic child. */ + gpioiic-child0 { + compatible = "lm75"; + i2c-address = <0x4f>; + }; + }; +}; +.Ed +.Pp +Where: +.Bl -tag -width ".Va compatible" +.It Va compatible +Should always be set to "gpioiic". +.It Va gpios +The +.Va gpios +property indicates which GPIO pins should be used for SCLOCK and SDATA +on the GPIO IIC bit-banging bus. +For more details about the +.Va gpios +property, please consult +.Pa /usr/src/sys/boot/fdt/dts/bindings-gpio.txt . +.It Va scl +The +.Va scl +option indicates which bit in the +.Va gpios +should be used as the SCLOCK source. +Optional, defaults to 0. +.It Va sda +The +.Va sda +option indicates which bit in the +.Va gpios +should be used as the SDATA source. +Optional, defaults to 1. .El .Sh SEE ALSO +.Xr fdt 4 , .Xr gpio 4 , .Xr gpioled 4 , .Xr iic 4 , Modified: stable/10/share/man/man4/gpioled.4 ============================================================================== --- stable/10/share/man/man4/gpioled.4 Thu May 15 01:27:24 2014 (r266104) +++ stable/10/share/man/man4/gpioled.4 Thu May 15 01:27:53 2014 (r266105) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 5, 2013 +.Dd February 13, 2014 .Dt GPIOLED 4 .Os .Sh NAME @@ -68,7 +68,75 @@ Which pin on the GPIO interface to map t Please note that this mask should only ever have one bit set (any others bits - i.e., pins - will be ignored). .El +.Pp +On a +.Xr FDT 4 +based system, like +.Li ARM , the dts part for a +.Nm gpioled +device usually looks like: +.Bd -literal +gpio: gpio { + + gpio-controller; + ... + + led0 { + compatible = "gpioled"; + gpios = <&gpio 16 2 0>; /* GPIO pin 16. */ + name = "ok"; + }; + + led1 { + compatible = "gpioled"; + gpios = <&gpio 17 2 0>; /* GPIO pin 17. */ + name = "user-led1"; + }; +}; +.Ed +.Pp +And optionally, you can choose combine all the leds under a single +.Dq gpio-leds +compatible node: +.Bd -literal +simplebus0 { + + ... + + leds { + compatible = "gpio-leds"; + + led0 { + gpios = <&gpio 16 2 0>; + name = "ok" + }; + + led1 { + gpios = <&gpio 17 2 0>; + name = "user-led1" + }; + }; +}; +.Ed +.Pp +Both methods are equally supported and it is possible to have the leds +defined with any sort of mix between the methods. +The only restriction is that a GPIO pin cannot be mapped by two different +(gpio)leds. +.Pp +For more details about the +.Va gpios +property, please consult +.Pa /usr/src/sys/boot/fdt/dts/bindings-gpio.txt . +.Pp +The property +.Va name +is the arbitrary name of device in +.Pa /dev/led/ +to create for +.Xr led 4 . .Sh SEE ALSO +.Xr fdt 4 , .Xr gpio 4 , .Xr led 4 , .Xr gpioiic 4 Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_gpio.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Thu May 15 01:27:24 2014 (r266104) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Thu May 15 01:27:53 2014 (r266105) @@ -762,6 +762,14 @@ bcm_gpio_detach(device_t dev) return (EBUSY); } +static phandle_t +bcm_gpio_get_node(device_t bus, device_t dev) +{ + + /* We only have one child, the GPIO bus, which needs our own node. */ + return (ofw_bus_get_node(bus)); +} + static device_method_t bcm_gpio_methods[] = { /* Device interface */ DEVMETHOD(device_probe, bcm_gpio_probe), @@ -778,6 +786,9 @@ static device_method_t bcm_gpio_methods[ DEVMETHOD(gpio_pin_set, bcm_gpio_pin_set), DEVMETHOD(gpio_pin_toggle, bcm_gpio_pin_toggle), + /* ofw_bus interface */ + DEVMETHOD(ofw_bus_get_node, bcm_gpio_get_node), + DEVMETHOD_END }; Modified: stable/10/sys/arm/conf/BEAGLEBONE ============================================================================== --- stable/10/sys/arm/conf/BEAGLEBONE Thu May 15 01:27:24 2014 (r266104) +++ stable/10/sys/arm/conf/BEAGLEBONE Thu May 15 01:27:53 2014 (r266105) @@ -101,6 +101,7 @@ device am335x_pmic # AM335x Power Mana # GPIO device gpio +device gpioled # USB support device usb Modified: stable/10/sys/arm/ti/ti_gpio.c ============================================================================== --- stable/10/sys/arm/ti/ti_gpio.c Thu May 15 01:27:24 2014 (r266104) +++ stable/10/sys/arm/ti/ti_gpio.c Thu May 15 01:27:53 2014 (r266105) @@ -543,9 +543,9 @@ ti_gpio_pin_get(device_t dev, uint32_t p /* Read the value on the pin */ if (val & mask) - *value = (ti_gpio_read_4(sc, bank, TI_GPIO_DATAOUT) & mask) ? 1 : 0; - else *value = (ti_gpio_read_4(sc, bank, TI_GPIO_DATAIN) & mask) ? 1 : 0; + else + *value = (ti_gpio_read_4(sc, bank, TI_GPIO_DATAOUT) & mask) ? 1 : 0; TI_GPIO_UNLOCK(sc); @@ -788,6 +788,14 @@ ti_gpio_detach(device_t dev) return(0); } +static phandle_t +ti_gpio_get_node(device_t bus, device_t dev) +{ + + /* We only have one child, the GPIO bus, which needs our own node. */ + return (ofw_bus_get_node(bus)); +} + static device_method_t ti_gpio_methods[] = { DEVMETHOD(device_probe, ti_gpio_probe), DEVMETHOD(device_attach, ti_gpio_attach), @@ -802,6 +810,10 @@ static device_method_t ti_gpio_methods[] DEVMETHOD(gpio_pin_get, ti_gpio_pin_get), DEVMETHOD(gpio_pin_set, ti_gpio_pin_set), DEVMETHOD(gpio_pin_toggle, ti_gpio_pin_toggle), + + /* ofw_bus interface */ + DEVMETHOD(ofw_bus_get_node, ti_gpio_get_node), + {0, 0}, }; Modified: stable/10/sys/boot/fdt/dts/beaglebone-black.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/beaglebone-black.dts Thu May 15 01:27:24 2014 (r266104) +++ stable/10/sys/boot/fdt/dts/beaglebone-black.dts Thu May 15 01:27:53 2014 (r266105) @@ -153,6 +153,30 @@ } }; + leds { + compatible = "gpio-leds"; + + led1 { + gpios = <&GPIO 53 2 0>; + name = "led1"; + }; + + led2 { + gpios = <&GPIO 54 2 0>; + name = "led2"; + }; + + led3 { + gpios = <&GPIO 55 2 0>; + name = "led3"; + }; + + led4 { + gpios = <&GPIO 56 2 0>; + name = "led4"; + }; + }; + chosen { stdin = "uart0"; stdout = "uart0"; Modified: stable/10/sys/boot/fdt/dts/bindings-gpio.txt ============================================================================== --- stable/10/sys/boot/fdt/dts/bindings-gpio.txt Thu May 15 01:27:24 2014 (r266104) +++ stable/10/sys/boot/fdt/dts/bindings-gpio.txt Thu May 15 01:27:53 2014 (r266105) @@ -82,7 +82,7 @@ dir: flags: 0x0000---- IN_NONE - 0x0001---- IN_POL_LOW Polarity low (inverted input value. + 0x0001---- IN_POL_LOW Polarity low (active-low). 0x0002---- IN_IRQ_EDGE Interrupt, edge triggered. 0x0004---- IN_IRQ_LEVEL Interrupt, level triggered. Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Thu May 15 01:27:24 2014 (r266104) +++ stable/10/sys/conf/files Thu May 15 01:27:53 2014 (r266105) @@ -1439,6 +1439,7 @@ dev/gpio/gpioiic.c optional gpioiic dev/gpio/gpioled.c optional gpioled dev/gpio/gpio_if.m optional gpio dev/gpio/gpiobus_if.m optional gpio +dev/gpio/ofw_gpiobus.c optional fdt gpio dev/hatm/if_hatm.c optional hatm pci dev/hatm/if_hatm_intr.c optional hatm pci dev/hatm/if_hatm_ioctl.c optional hatm pci Modified: stable/10/sys/dev/gpio/gpiobus.c ============================================================================== --- stable/10/sys/dev/gpio/gpiobus.c Thu May 15 01:27:24 2014 (r266104) +++ stable/10/sys/dev/gpio/gpiobus.c Thu May 15 01:27:53 2014 (r266105) @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include "gpio_if.h" #include "gpiobus_if.h" -static void gpiobus_print_pins(struct gpiobus_ivar *); static int gpiobus_parse_pins(struct gpiobus_softc *, device_t, int); static int gpiobus_probe(device_t); static int gpiobus_attach(device_t); @@ -73,17 +72,7 @@ static int gpiobus_pin_set(device_t, dev static int gpiobus_pin_get(device_t, device_t, uint32_t, unsigned int*); static int gpiobus_pin_toggle(device_t, device_t, uint32_t); -#define GPIOBUS_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) -#define GPIOBUS_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) -#define GPIOBUS_LOCK_INIT(_sc) \ - mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->sc_dev), \ - "gpiobus", MTX_DEF) -#define GPIOBUS_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx); -#define GPIOBUS_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED); -#define GPIOBUS_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED); - - -static void +void gpiobus_print_pins(struct gpiobus_ivar *devi) { int range_start, range_stop, need_coma; @@ -175,7 +164,8 @@ static int gpiobus_probe(device_t dev) { device_set_desc(dev, "GPIO bus"); - return (0); + + return (BUS_PROBE_GENERIC); } static int @@ -190,13 +180,13 @@ gpiobus_attach(device_t dev) if (res) return (ENXIO); + KASSERT(sc->sc_npins != 0, ("GPIO device with no pins")); + /* * Increase to get number of pins */ sc->sc_npins++; - KASSERT(sc->sc_npins != 0, ("GPIO device with no pins")); - sc->sc_pins_mapped = malloc(sizeof(int) * sc->sc_npins, M_DEVBUF, M_NOWAIT | M_ZERO); @@ -209,7 +199,9 @@ gpiobus_attach(device_t dev) /* * Get parent's pins and mark them as unmapped */ + bus_generic_probe(dev); bus_enumerate_hinted_children(dev); + return (bus_generic_attach(dev)); } Modified: stable/10/sys/dev/gpio/gpiobusvar.h ============================================================================== --- stable/10/sys/dev/gpio/gpiobusvar.h Thu May 15 01:27:24 2014 (r266104) +++ stable/10/sys/dev/gpio/gpiobusvar.h Thu May 15 01:27:53 2014 (r266105) @@ -30,12 +30,25 @@ #ifndef __GPIOBUS_H__ #define __GPIOBUS_H__ +#include "opt_platform.h" + #include #include #include -#define GPIOBUS_IVAR(d) (struct gpiobus_ivar *) device_get_ivars(d) -#define GPIOBUS_SOFTC(d) (struct gpiobus_softc *) device_get_softc(d) +#ifdef FDT +#include +#endif + +#define GPIOBUS_IVAR(d) (struct gpiobus_ivar *) device_get_ivars(d) +#define GPIOBUS_SOFTC(d) (struct gpiobus_softc *) device_get_softc(d) +#define GPIOBUS_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) +#define GPIOBUS_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) +#define GPIOBUS_LOCK_INIT(_sc) mtx_init(&_sc->sc_mtx, \ + device_get_nameunit(_sc->sc_dev), "gpiobus", MTX_DEF) +#define GPIOBUS_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx) +#define GPIOBUS_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED) +#define GPIOBUS_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED) struct gpiobus_softc { @@ -54,4 +67,11 @@ struct gpiobus_ivar uint32_t *pins; /* pins map */ }; +void gpiobus_print_pins(struct gpiobus_ivar *); +#ifdef FDT +device_t ofw_gpiobus_add_fdt_child(device_t, phandle_t); +#endif + +extern driver_t gpiobus_driver; + #endif /* __GPIOBUS_H__ */ Modified: stable/10/sys/dev/gpio/gpioiic.c ============================================================================== --- stable/10/sys/dev/gpio/gpioiic.c Thu May 15 01:27:24 2014 (r266104) +++ stable/10/sys/dev/gpio/gpioiic.c Thu May 15 01:27:53 2014 (r266105) @@ -28,21 +28,24 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_platform.h" + #include #include -#include #include #include #include -#include -#include -#include #include -#include #include #include "gpiobus_if.h" +#ifdef FDT +#include +#include +#include +#endif + #include #include @@ -55,7 +58,6 @@ struct gpioiic_softc { device_t sc_dev; device_t sc_busdev; - struct cdev *sc_leddev; int scl_pin; int sda_pin; }; @@ -77,7 +79,12 @@ static int gpioiic_probe(device_t dev) { +#ifdef FDT + if (!ofw_bus_is_compatible(dev, "gpioiic")) + return (ENXIO); +#endif device_set_desc(dev, "GPIO I2C bit-banging driver"); + return (0); } @@ -86,6 +93,10 @@ gpioiic_attach(device_t dev) { struct gpioiic_softc *sc = device_get_softc(dev); device_t bitbang; +#ifdef FDT + phandle_t node; + pcell_t pin; +#endif sc->sc_dev = dev; sc->sc_busdev = device_get_parent(dev); @@ -96,6 +107,15 @@ gpioiic_attach(device_t dev) device_get_unit(dev), "sda", &sc->sda_pin)) sc->sda_pin = SDA_PIN_DEFAULT; +#ifdef FDT + if ((node = ofw_bus_get_node(dev)) == -1) + return (ENXIO); + if (OF_getencprop(node, "scl", &pin, sizeof(pin)) > 0) + sc->scl_pin = (int)pin; + if (OF_getencprop(node, "sda", &pin, sizeof(pin)) > 0) + sc->sda_pin = (int)pin; +#endif + /* add generic bit-banging code */ bitbang = device_add_child(dev, "iicbb", -1); device_probe_and_attach(bitbang); @@ -139,7 +159,7 @@ gpioiic_callback(device_t dev, int index error = EINVAL; } - return(error); + return (error); } static void @@ -214,6 +234,16 @@ gpioiic_reset(device_t dev, u_char speed return (IIC_ENOADDR); } +#ifdef FDT +static phandle_t +gpioiic_get_node(device_t bus, device_t dev) +{ + + /* We only have one child, the iicbb, which needs our own node. */ + return (ofw_bus_get_node(bus)); +} +#endif + static devclass_t gpioiic_devclass; static device_method_t gpioiic_methods[] = { @@ -230,6 +260,11 @@ static device_method_t gpioiic_methods[] DEVMETHOD(iicbb_getscl, gpioiic_getscl), DEVMETHOD(iicbb_reset, gpioiic_reset), +#ifdef FDT + /* OFW bus interface */ + DEVMETHOD(ofw_bus_get_node, gpioiic_get_node), +#endif + { 0, 0 } }; Modified: stable/10/sys/dev/gpio/gpioled.c ============================================================================== --- stable/10/sys/dev/gpio/gpioled.c Thu May 15 01:27:24 2014 (r266104) +++ stable/10/sys/dev/gpio/gpioled.c Thu May 15 01:27:53 2014 (r266105) @@ -27,6 +27,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_platform.h" + #include #include #include @@ -39,6 +41,12 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FDT +#include +#include +#include +#endif + #include #include #include "gpiobus_if.h" @@ -75,6 +83,8 @@ gpioled_control(void *priv, int onoff) GPIOLED_LOCK(sc); GPIOBUS_LOCK_BUS(sc->sc_busdev); GPIOBUS_ACQUIRE_BUS(sc->sc_busdev, sc->sc_dev); + GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, GPIOLED_PIN, + GPIO_PIN_OUTPUT); GPIOBUS_PIN_SET(sc->sc_busdev, sc->sc_dev, GPIOLED_PIN, onoff ? GPIO_PIN_HIGH : GPIO_PIN_LOW); GPIOBUS_RELEASE_BUS(sc->sc_busdev, sc->sc_dev); @@ -82,10 +92,65 @@ gpioled_control(void *priv, int onoff) GPIOLED_UNLOCK(sc); } +#ifdef FDT +static void +gpioled_identify(driver_t *driver, device_t bus) +{ + phandle_t child, leds, root; + + root = OF_finddevice("/"); + if (root == 0) + return; + leds = fdt_find_compatible(root, "gpio-leds", 1); + if (leds == 0) + return; + + /* Traverse the 'gpio-leds' node and add its children. */ + for (child = OF_child(leds); child != 0; child = OF_peer(child)) + if (ofw_gpiobus_add_fdt_child(bus, child) == NULL) + continue; +} +#endif + static int gpioled_probe(device_t dev) { +#ifdef FDT + int match; + phandle_t node; + char *compat; + + /* + * We can match against our own node compatible string and also against + * our parent node compatible string. The first is normally used to + * describe leds on a gpiobus and the later when there is a common node + * compatible with 'gpio-leds' which is used to concentrate all the + * leds nodes on the dts. + */ + match = 0; + if (ofw_bus_is_compatible(dev, "gpioled")) + match = 1; + + if (match == 0) { + if ((node = ofw_bus_get_node(dev)) == -1) + return (ENXIO); + if ((node = OF_parent(node)) == -1) + return (ENXIO); + if (OF_getprop_alloc(node, "compatible", 1, + (void **)&compat) == -1) + return (ENXIO); + + if (strcasecmp(compat, "gpio-leds") == 0) + match = 1; + + free(compat, M_OFWPROP); + } + + if (match == 0) + return (ENXIO); +#endif device_set_desc(dev, "GPIO led"); + return (0); } @@ -93,21 +158,35 @@ static int gpioled_attach(device_t dev) { struct gpioled_softc *sc; +#ifdef FDT + phandle_t node; + char *name; +#else const char *name; +#endif sc = device_get_softc(dev); sc->sc_dev = dev; sc->sc_busdev = device_get_parent(dev); GPIOLED_LOCK_INIT(sc); +#ifdef FDT + name = NULL; + if ((node = ofw_bus_get_node(dev)) == -1) + return (ENXIO); + if (OF_getprop_alloc(node, "label", 1, (void **)&name) == -1) + OF_getprop_alloc(node, "name", 1, (void **)&name); +#else if (resource_string_value(device_get_name(dev), device_get_unit(dev), "name", &name)) name = NULL; - - GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, GPIOLED_PIN, - GPIO_PIN_OUTPUT); +#endif sc->sc_leddev = led_create(gpioled_control, sc, name ? name : device_get_nameunit(dev)); +#ifdef FDT + if (name != NULL) + free(name, M_OFWPROP); +#endif return (0); } @@ -130,6 +209,9 @@ static devclass_t gpioled_devclass; static device_method_t gpioled_methods[] = { /* Device interface */ +#ifdef FDT + DEVMETHOD(device_identify, gpioled_identify), +#endif DEVMETHOD(device_probe, gpioled_probe), DEVMETHOD(device_attach, gpioled_attach), DEVMETHOD(device_detach, gpioled_detach), Copied and modified: stable/10/sys/dev/gpio/ofw_gpiobus.c (from r261842, head/sys/dev/gpio/ofw_gpiobus.c) ============================================================================== --- head/sys/dev/gpio/ofw_gpiobus.c Thu Feb 13 17:08:29 2014 (r261842, copy source) +++ stable/10/sys/dev/gpio/ofw_gpiobus.c Thu May 15 01:27:53 2014 (r266105) @@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Modified: stable/10/sys/dev/iicbus/iicbb.c ============================================================================== --- stable/10/sys/dev/iicbus/iicbb.c Thu May 15 01:27:24 2014 (r266104) +++ stable/10/sys/dev/iicbus/iicbb.c Thu May 15 01:27:53 2014 (r266105) @@ -43,6 +43,8 @@ __FBSDID("$FreeBSD$"); * */ +#include "opt_platform.h" + #include #include #include @@ -50,6 +52,11 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FDT +#include +#include +#include +#endif #include #include @@ -77,6 +84,9 @@ static int iicbb_write(device_t, const c static int iicbb_read(device_t, char *, int, int *, int, int); static int iicbb_reset(device_t, u_char, u_char, u_char *); static int iicbb_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs); +#ifdef FDT +static phandle_t iicbb_get_node(device_t, device_t); +#endif static device_method_t iicbb_methods[] = { /* device interface */ @@ -98,6 +108,11 @@ static device_method_t iicbb_methods[] = DEVMETHOD(iicbus_reset, iicbb_reset), DEVMETHOD(iicbus_transfer, iicbb_transfer), +#ifdef FDT + /* ofw_bus interface */ + DEVMETHOD(ofw_bus_get_node, iicbb_get_node), +#endif + { 0, 0 } }; @@ -154,6 +169,16 @@ iicbb_detach(device_t dev) return (0); } +#ifdef FDT +static phandle_t +iicbb_get_node(device_t bus, device_t dev) +{ + + /* We only have one child, the I2C bus, which needs our own node. */ + return (ofw_bus_get_node(bus)); +} +#endif + static void iicbb_child_detached( device_t dev, device_t child ) { Modified: stable/10/sys/dev/ofw/ofw_bus_if.m ============================================================================== --- stable/10/sys/dev/ofw/ofw_bus_if.m Thu May 15 01:27:24 2014 (r266104) +++ stable/10/sys/dev/ofw/ofw_bus_if.m Thu May 15 01:27:53 2014 (r266105) @@ -158,7 +158,7 @@ METHOD const char * get_name { } DEFAULT ofw_bus_default_get_name; # Get the firmware node for the device dev on the bus. The default method will -# return 0, which signals that there is no such node. +# return -1, which signals that there is no such node. METHOD phandle_t get_node { device_t bus; device_t dev; Modified: stable/10/sys/dev/ofw/ofw_iicbus.c ============================================================================== --- stable/10/sys/dev/ofw/ofw_iicbus.c Thu May 15 01:27:24 2014 (r266104) +++ stable/10/sys/dev/ofw/ofw_iicbus.c Thu May 15 01:27:53 2014 (r266105) @@ -80,6 +80,7 @@ static devclass_t ofwiicbus_devclass; DEFINE_CLASS_1(iicbus, ofw_iicbus_driver, ofw_iicbus_methods, sizeof(struct iicbus_softc), iicbus_driver); +DRIVER_MODULE(ofw_iicbus, iicbb, ofw_iicbus_driver, ofwiicbus_devclass, 0, 0); DRIVER_MODULE(ofw_iicbus, iichb, ofw_iicbus_driver, ofwiicbus_devclass, 0, 0); MODULE_VERSION(ofw_iicbus, 1); MODULE_DEPEND(ofw_iicbus, iicbus, 1, 1, 1); Modified: stable/10/sys/modules/gpio/gpiobus/Makefile ============================================================================== --- stable/10/sys/modules/gpio/gpiobus/Makefile Thu May 15 01:27:24 2014 (r266104) +++ stable/10/sys/modules/gpio/gpiobus/Makefile Thu May 15 01:27:53 2014 (r266105) @@ -33,7 +33,7 @@ KMOD= gpiobus SRCS= gpiobus.c -SRCS+= device_if.h bus_if.h gpio_if.h gpiobus_if.h +SRCS+= device_if.h bus_if.h gpio_if.h gpiobus_if.h opt_platform.h CFLAGS+= -I. -I${.CURDIR}/../../../dev/gpio/ Modified: stable/10/sys/modules/gpio/gpioiic/Makefile ============================================================================== --- stable/10/sys/modules/gpio/gpioiic/Makefile Thu May 15 01:27:24 2014 (r266104) +++ stable/10/sys/modules/gpio/gpioiic/Makefile Thu May 15 01:27:53 2014 (r266105) @@ -34,6 +34,7 @@ KMOD= gpioiic SRCS= gpioiic.c SRCS+= device_if.h bus_if.h gpio_if.h gpiobus_if.h iicbus_if.h iicbb_if.h +SRCS+= opt_platform.h CFLAGS+= -I. -I${.CURDIR}/../../../dev/gpio/ Modified: stable/10/sys/modules/gpio/gpioled/Makefile ============================================================================== --- stable/10/sys/modules/gpio/gpioled/Makefile Thu May 15 01:27:24 2014 (r266104) +++ stable/10/sys/modules/gpio/gpioled/Makefile Thu May 15 01:27:53 2014 (r266105) @@ -33,7 +33,7 @@ KMOD= gpioled SRCS= gpioled.c -SRCS+= device_if.h bus_if.h gpio_if.h gpiobus_if.h +SRCS+= device_if.h bus_if.h gpio_if.h gpiobus_if.h opt_platform.h CFLAGS+= -I. -I${.CURDIR}/../../../dev/gpio/ Modified: stable/10/sys/modules/i2c/iicbb/Makefile ============================================================================== --- stable/10/sys/modules/i2c/iicbb/Makefile Thu May 15 01:27:24 2014 (r266104) +++ stable/10/sys/modules/i2c/iicbb/Makefile Thu May 15 01:27:53 2014 (r266105) @@ -3,6 +3,6 @@ .PATH: ${.CURDIR}/../../../dev/iicbus KMOD = iicbb SRCS = device_if.h bus_if.h iicbus_if.h \ - iicbb_if.h iicbb_if.c iicbb.c + iicbb_if.h iicbb_if.c iicbb.c opt_platform.h .include From owner-svn-src-stable@FreeBSD.ORG Thu May 15 01:37:17 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E772341F; Thu, 15 May 2014 01:37:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D479C21C7; Thu, 15 May 2014 01:37:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4F1bHSH077145; Thu, 15 May 2014 01:37:17 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4F1bHI6077142; Thu, 15 May 2014 01:37:17 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201405150137.s4F1bHI6077142@svn.freebsd.org> From: Luiz Otavio O Souza Date: Thu, 15 May 2014 01:37:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266106 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 01:37:18 -0000 Author: loos Date: Thu May 15 01:37:17 2014 New Revision: 266106 URL: http://svnweb.freebsd.org/changeset/base/266106 Log: MFC r266092 gpioiic.4 and gpioled.4 will first appear in 10.1-RELEASE. Modified: stable/10/share/man/man4/gpioiic.4 stable/10/share/man/man4/gpioled.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/gpioiic.4 ============================================================================== --- stable/10/share/man/man4/gpioiic.4 Thu May 15 01:27:53 2014 (r266105) +++ stable/10/share/man/man4/gpioiic.4 Thu May 15 01:37:17 2014 (r266106) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 13, 2014 +.Dd May 14, 2014 .Dt GPIOIIC 4 .Os .Sh NAME @@ -153,7 +153,7 @@ Optional, defaults to 1. The .Nm manual page first appeared in -.Fx 11.0 . +.Fx 10.1 . .Sh AUTHORS This manual page was written by Modified: stable/10/share/man/man4/gpioled.4 ============================================================================== --- stable/10/share/man/man4/gpioled.4 Thu May 15 01:27:53 2014 (r266105) +++ stable/10/share/man/man4/gpioled.4 Thu May 15 01:37:17 2014 (r266106) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 13, 2014 +.Dd May 14, 2014 .Dt GPIOLED 4 .Os .Sh NAME @@ -144,7 +144,7 @@ to create for The .Nm manual page first appeared in -.Fx 11.0 . +.Fx 10.1 . .Sh AUTHORS This manual page was written by From owner-svn-src-stable@FreeBSD.ORG Thu May 15 01:58:54 2014 Return-Path: Delivered-To: svn-src-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C6F6B68F; Thu, 15 May 2014 01:58:54 +0000 (UTC) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A24D2323; Thu, 15 May 2014 01:58:54 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1Wkkwf-000GSH-9r; Thu, 15 May 2014 01:58:53 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id s4F1wpTG037306; Wed, 14 May 2014 19:58:51 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+KN7kyyh8TN3vLanPoy0sm Subject: Re: svn commit: r266098 - stable/10/sys/arm/ti From: Ian Lepore To: Bruce Simpson In-Reply-To: <53740645.7060003@fastmail.net> References: <201405142357.s4ENv8sh031217@svn.freebsd.org> <53740645.7060003@fastmail.net> Content-Type: text/plain; charset="us-ascii" Date: Wed, 14 May 2014 19:58:50 -0600 Message-ID: <1400119130.56626.28.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-10@FreeBSD.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 01:58:54 -0000 On Wed, 2014-05-14 at 17:11 -0700, Bruce Simpson wrote: > On 14/05/2014 16:57, Ian Lepore wrote: > > TI Programmable Realtime Unit Subsystem. > OK, so PRUSS is one vowel change away from the name of a killer android > in a work by Philip K. Dick. > > Are there applications for this driver? I'm just curious having skimmed > this document [1]: > > "The PRU subsystem on the OMAP-L1x processors, C674x DSPs, and AM1x > Sitara ARM MPUs allows the application developer to implement soft > peripherals; peripherals implemented using a combination of on-chip > hardware and software." > > [1] http://www.ti.com/lit/wp/spry136a/spry136a.pdf > I don't know anything about it myself, I'm just syncing up all the ARM changes from the past few months into 10-stable. -- Ian From owner-svn-src-stable@FreeBSD.ORG Thu May 15 02:41:35 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DCEF9F59; Thu, 15 May 2014 02:41:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C645125DD; Thu, 15 May 2014 02:41:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4F2fYhm005309; Thu, 15 May 2014 02:41:34 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4F2fNTq005242; Thu, 15 May 2014 02:41:23 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405150241.s4F2fNTq005242@svn.freebsd.org> From: Ian Lepore Date: Thu, 15 May 2014 02:41:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266110 - in stable/10/sys: arm/allwinner arm/allwinner/a20 arm/arm arm/at91 arm/broadcom/bcm2835 arm/conf arm/econa arm/freescale/imx arm/freescale/vybrid arm/lpc arm/mv/armadaxp arm/m... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 02:41:35 -0000 Author: ian Date: Thu May 15 02:41:23 2014 New Revision: 266110 URL: http://svnweb.freebsd.org/changeset/base/266110 Log: MFC r261252, r261279, r261304, r261305, r261322, r261336, r261337, r261338, r261353 Fix the name of the dts file for the HL201... When mapping an address, the bsh needs the same offset we do for other things. Add explicit depends on bus_if.h and device_if.h to avoid a chicken and egg problem in some compilation environments. Switch to using PAs rather than VAs for the addresses we map for devices. This is a nop, except for what's reported by atmelbus for the resources. Comment cleanups. Move things around for diff reduction against FDT work. Modified: stable/10/sys/arm/allwinner/a20/std.a20 stable/10/sys/arm/allwinner/std.a10 stable/10/sys/arm/arm/genassym.c stable/10/sys/arm/arm/locore.S stable/10/sys/arm/at91/at91.c stable/10/sys/arm/at91/at91_machdep.c stable/10/sys/arm/at91/at91rm92reg.h stable/10/sys/arm/at91/at91sam9260reg.h stable/10/sys/arm/at91/at91sam9g20reg.h stable/10/sys/arm/at91/at91sam9g45reg.h stable/10/sys/arm/at91/std.bwct stable/10/sys/arm/at91/std.eb9200 stable/10/sys/arm/at91/std.ethernut5 stable/10/sys/arm/at91/std.hl200 stable/10/sys/arm/at91/std.hl201 stable/10/sys/arm/at91/std.kb920x stable/10/sys/arm/at91/std.qila9g20 stable/10/sys/arm/at91/std.sam9260ek stable/10/sys/arm/at91/std.sam9g20ek stable/10/sys/arm/at91/std.sam9x25ek stable/10/sys/arm/at91/std.sn9g45 stable/10/sys/arm/at91/std.tsc4370 stable/10/sys/arm/broadcom/bcm2835/std.rpi stable/10/sys/arm/conf/ATMEL stable/10/sys/arm/conf/CNS11XXNAS stable/10/sys/arm/conf/CRB stable/10/sys/arm/conf/EP80219 stable/10/sys/arm/conf/GUMSTIX stable/10/sys/arm/conf/HL201 stable/10/sys/arm/conf/IQ31244 stable/10/sys/arm/conf/NSLU stable/10/sys/arm/conf/VERSATILEPB stable/10/sys/arm/econa/std.econa stable/10/sys/arm/freescale/imx/std.imx51 stable/10/sys/arm/freescale/imx/std.imx53 stable/10/sys/arm/freescale/imx/std.imx6 stable/10/sys/arm/freescale/vybrid/std.vybrid stable/10/sys/arm/lpc/std.lpc stable/10/sys/arm/mv/armadaxp/std.armadaxp stable/10/sys/arm/mv/discovery/std.db78xxx stable/10/sys/arm/mv/kirkwood/std.kirkwood stable/10/sys/arm/mv/orion/std.db88f5xxx stable/10/sys/arm/mv/orion/std.ts7800 stable/10/sys/arm/rockchip/std.rk30xx stable/10/sys/arm/s3c2xx0/std.ln2410sbc stable/10/sys/arm/samsung/exynos/std.exynos5 stable/10/sys/arm/tegra/std.tegra2 stable/10/sys/arm/ti/am335x/std.am335x stable/10/sys/arm/ti/omap4/std.omap4 stable/10/sys/arm/xilinx/std.zynq7 stable/10/sys/arm/xscale/ixp425/std.avila stable/10/sys/conf/Makefile.arm stable/10/sys/conf/ldscript.arm stable/10/sys/conf/options.arm Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/allwinner/a20/std.a20 ============================================================================== --- stable/10/sys/arm/allwinner/a20/std.a20 Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/allwinner/a20/std.a20 Thu May 15 02:41:23 2014 (r266110) @@ -16,8 +16,6 @@ options KERNPHYSADDR=0x40200000 makeoptions KERNVIRTADDR=0xc0200000 options KERNVIRTADDR=0xc0200000 -options STARTUP_PAGETABLE_ADDR=0x48000000 - options ARM_L2_PIPT options IPI_IRQ_START=0 Modified: stable/10/sys/arm/allwinner/std.a10 ============================================================================== --- stable/10/sys/arm/allwinner/std.a10 Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/allwinner/std.a10 Thu May 15 02:41:23 2014 (r266110) @@ -16,6 +16,4 @@ options KERNPHYSADDR=0x40200000 makeoptions KERNVIRTADDR=0xc0200000 options KERNVIRTADDR=0xc0200000 -options STARTUP_PAGETABLE_ADDR=0x48000000 - files "../allwinner/files.a10" Modified: stable/10/sys/arm/arm/genassym.c ============================================================================== --- stable/10/sys/arm/arm/genassym.c Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/arm/genassym.c Thu May 15 02:41:23 2014 (r266110) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: stable/10/sys/arm/arm/locore.S ============================================================================== --- stable/10/sys/arm/arm/locore.S Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/arm/locore.S Thu May 15 02:41:23 2014 (r266110) @@ -144,9 +144,15 @@ disable_mmu: nop mov pc, r7 Lunmapped: -#ifdef STARTUP_PAGETABLE_ADDR - /* build page table from scratch */ - ldr r0, Lstartup_pagetable + /* + * Build page table from scratch. + */ + + /* Load the page tables physical address */ + ldr r1, Lstartup_pagetable + ldr r2, =(KERNVIRTADDR - KERNPHYSADDR) + sub r0, r1, r2 + adr r4, mmu_init_table b 3f @@ -197,7 +203,6 @@ Lunmapped: nop CPWAIT(r0) -#endif mmu_done: nop adr r1, .Lstart @@ -231,7 +236,6 @@ virt_done: adr r0, .Lmainreturned b _C_LABEL(panic) /* NOTREACHED */ -#ifdef STARTUP_PAGETABLE_ADDR #define MMU_INIT(va,pa,n_sec,attr) \ .word n_sec ; \ .word 4*((va)>>L1_S_SHIFT) ; \ @@ -246,7 +250,7 @@ Lreal_start: Lend: .word _edata Lstartup_pagetable: - .word STARTUP_PAGETABLE_ADDR + .word pagetable #ifdef SMP Lstartup_pagetable_secondary: .word temp_pagetable @@ -261,9 +265,9 @@ mmu_init_table: MMU_INIT(PHYSADDR, PHYSADDR, 64, L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW)) /* map VA 0xc0000000..0xc3ffffff to PA */ MMU_INIT(KERNBASE, PHYSADDR, 64, L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW)) -#if defined(SOCDEV_PA) && defined(SOCKDEV_VA) +#if defined(SOCDEV_PA) && defined(SOCDEV_VA) /* Map in 0x04000000 worth of the SoC's devices for bootstrap debugging */ - MMU_INIT(SOCKDEV_VA, SOCDEV_PA, 64, L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW)) + MMU_INIT(SOCDEV_VA, SOCDEV_PA, 64, L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW)) #endif #else MMU_INIT(PHYSADDR, PHYSADDR , 64, L1_TYPE_S|L1_SHARED|L1_S_C|L1_S_AP(AP_KRW)) @@ -272,10 +276,9 @@ mmu_init_table: MMU_INIT(0x48000000, 0x48000000, 1, L1_TYPE_S|L1_SHARED|L1_S_C|L1_S_AP(AP_KRW)) #endif /* SMP */ .word 0 /* end of table */ -#endif .Lstart: .word _edata - .word _end + .word _ebss .word svcstk + INIT_ARM_STACK_SIZE .Lvirt_done: @@ -293,6 +296,15 @@ mmu_init_table: svcstk: .space INIT_ARM_STACK_SIZE +/* + * Memory for the initial pagetable. We are unable to place this in + * the bss as this will be cleared after the table is loaded. + */ + .section ".init_pagetable" + .align 14 /* 16KiB aligned */ +pagetable: + .space L1_TABLE_SIZE + .text .align 0 Modified: stable/10/sys/arm/at91/at91.c ============================================================================== --- stable/10/sys/arm/at91/at91.c Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/at91/at91.c Thu May 15 02:41:23 2014 (r266110) @@ -74,7 +74,7 @@ at91_bs_map(void *t, bus_addr_t bpa, bus } endpa = round_page(bpa + size); - *bshp = (vm_offset_t)pmap_mapdev(pa, endpa - pa); + *bshp = (vm_offset_t)pmap_mapdev(pa, endpa - pa) + (bpa - pa); return (0); } @@ -260,7 +260,6 @@ static int at91_attach(device_t dev) { struct at91_softc *sc = device_get_softc(dev); - const struct arm_devmap_entry *pdevmap; int i; arm_post_filter = at91_eoi; @@ -281,11 +280,15 @@ at91_attach(device_t dev) sc->sc_mem_rman.rm_descr = "AT91 Memory"; if (rman_init(&sc->sc_mem_rman) != 0) panic("at91_attach: failed to set up memory rman"); - for (pdevmap = at91_devmap; pdevmap->pd_va != 0; pdevmap++) { - if (rman_manage_region(&sc->sc_mem_rman, pdevmap->pd_va, - pdevmap->pd_va + pdevmap->pd_size - 1) != 0) - panic("at91_attach: failed to set up memory rman"); - } + /* + * Manage the physical space, defined as being everything that isn't + * DRAM. + */ + if (rman_manage_region(&sc->sc_mem_rman, 0, PHYSADDR - 1) != 0) + panic("at91_attach: failed to set up memory rman"); + if (rman_manage_region(&sc->sc_mem_rman, PHYSADDR + (256 << 20), + 0xfffffffful) != 0) + panic("at91_attach: failed to set up memory rman"); /* * Setup the interrupt table. @@ -330,6 +333,7 @@ at91_alloc_resource(device_t dev, device struct resource_list_entry *rle; struct at91_ivar *ivar = device_get_ivars(child); struct resource_list *rl = &ivar->resources; + bus_space_handle_t bsh; if (device_get_parent(child) != dev) return (BUS_ALLOC_RESOURCE(device_get_parent(dev), child, @@ -355,8 +359,10 @@ at91_alloc_resource(device_t dev, device rle->res = rman_reserve_resource(&sc->sc_mem_rman, start, end, count, flags, child); if (rle->res != NULL) { + bus_space_map(&at91_bs_tag, start, + rman_get_size(rle->res), 0, &bsh); rman_set_bustag(rle->res, &at91_bs_tag); - rman_set_bushandle(rle->res, start); + rman_set_bushandle(rle->res, bsh); } break; } @@ -538,8 +544,14 @@ at91_add_child(device_t dev, int prio, c bus_set_resource(kid, SYS_RES_IRQ, 1, irq1, 1); if (irq2 != 0) bus_set_resource(kid, SYS_RES_IRQ, 2, irq2, 1); - if (addr != 0 && addr < AT91_BASE) - addr += AT91_BASE; + /* + * Special case for on-board devices. These have their address + * defined relative to AT91_PA_BASE in all the register files we + * have. We could change this, but that's a lot of effort which + * will be obsoleted when FDT arrives. + */ + if (addr != 0 && addr < 0x10000000 && addr >= 0x0f000000) + addr += AT91_PA_BASE; if (addr != 0) bus_set_resource(kid, SYS_RES_MEMORY, 0, addr, size); } Modified: stable/10/sys/arm/at91/at91_machdep.c ============================================================================== --- stable/10/sys/arm/at91/at91_machdep.c Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/at91/at91_machdep.c Thu May 15 02:41:23 2014 (r266110) @@ -116,36 +116,22 @@ extern u_int undefined_handler_address; struct pv_addr kernel_pt_table[NUM_KERNEL_PTS]; -/* Physical and virtual addresses for some global pages */ - -vm_paddr_t phys_avail[10]; -vm_paddr_t dump_avail[4]; - -struct pv_addr systempage; -struct pv_addr msgbufpv; -struct pv_addr irqstack; -struct pv_addr undstack; -struct pv_addr abtstack; -struct pv_addr kernelstack; - /* Static device mappings. */ const struct arm_devmap_entry at91_devmap[] = { /* - * Map the on-board devices VA == PA so that we can access them - * with the MMU on or off. + * Map the critical on-board devices. The interrupt vector at + * 0xffff0000 makes it impossible to map them PA == VA, so we map all + * 0xfffxxxxx addresses to 0xdffxxxxx. This covers all critical devices + * on all members of the AT91SAM9 and AT91RM9200 families. */ { - /* - * This at least maps the interrupt controller, the UART - * and the timer. Other devices should use newbus to - * map their memory anyway. - */ 0xdff00000, 0xfff00000, 0x00100000, VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, + /* There's a notion that we should do the rest of these lazily. */ /* * We can't just map the OHCI registers VA == PA, because * AT91xx_xxx_BASE belongs to the userland address space. @@ -163,16 +149,16 @@ const struct arm_devmap_entry at91_devma * on this chip select for a VA/PA mapping. */ /* Internal Memory 1MB */ + AT91RM92_OHCI_VA_BASE, AT91RM92_OHCI_BASE, - AT91RM92_OHCI_PA_BASE, 0x00100000, VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, { /* CompactFlash controller. Portion of EBI CS4 1MB */ + AT91RM92_CF_VA_BASE, AT91RM92_CF_BASE, - AT91RM92_CF_PA_BASE, 0x00100000, VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, @@ -183,16 +169,16 @@ const struct arm_devmap_entry at91_devma */ { /* Internal Memory 1MB */ + AT91SAM9G20_OHCI_VA_BASE, AT91SAM9G20_OHCI_BASE, - AT91SAM9G20_OHCI_PA_BASE, 0x00100000, VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, { /* EBI CS3 256MB */ + AT91SAM9G20_NAND_VA_BASE, AT91SAM9G20_NAND_BASE, - AT91SAM9G20_NAND_PA_BASE, AT91SAM9G20_NAND_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, @@ -202,8 +188,8 @@ const struct arm_devmap_entry at91_devma */ { /* Internal Memory 1MB */ + AT91SAM9G45_OHCI_VA_BASE, AT91SAM9G45_OHCI_BASE, - AT91SAM9G45_OHCI_PA_BASE, 0x00100000, VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, @@ -211,6 +197,18 @@ const struct arm_devmap_entry at91_devma { 0, 0, 0, 0, 0, } }; +/* Physical and virtual addresses for some global pages */ + +vm_paddr_t phys_avail[10]; +vm_paddr_t dump_avail[4]; + +struct pv_addr systempage; +struct pv_addr msgbufpv; +struct pv_addr irqstack; +struct pv_addr undstack; +struct pv_addr abtstack; +struct pv_addr kernelstack; + #ifdef LINUX_BOOT_ABI extern int membanks; extern int memstart[]; Modified: stable/10/sys/arm/at91/at91rm92reg.h ============================================================================== --- stable/10/sys/arm/at91/at91rm92reg.h Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/at91/at91rm92reg.h Thu May 15 02:41:23 2014 (r266110) @@ -255,12 +255,12 @@ * other * soc's so phyical and vm address * mapping are unique. XXX */ -#define AT91RM92_OHCI_BASE 0xdfe00000 -#define AT91RM92_OHCI_PA_BASE 0x00300000 +#define AT91RM92_OHCI_VA_BASE 0xdfe00000 +#define AT91RM92_OHCI_BASE 0x00300000 #define AT91RM92_OHCI_SIZE 0x00100000 -#define AT91RM92_CF_BASE 0xdfd00000 -#define AT91RM92_CF_PA_BASE 0x51400000 +#define AT91RM92_CF_VA_BASE 0xdfd00000 +#define AT91RM92_CF_BASE 0x51400000 #define AT91RM92_CF_SIZE 0x00100000 /* SDRAMC */ Modified: stable/10/sys/arm/at91/at91sam9260reg.h ============================================================================== --- stable/10/sys/arm/at91/at91sam9260reg.h Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/at91/at91sam9260reg.h Thu May 15 02:41:23 2014 (r266110) @@ -251,12 +251,12 @@ * other * soc's so phyical and vm address * mapping are unique. XXX */ -#define AT91SAM9260_OHCI_BASE 0xdfc00000 -#define AT91SAM9260_OHCI_PA_BASE 0x00500000 +#define AT91SAM9260_OHCI_VA_BASE 0xdfc00000 +#define AT91SAM9260_OHCI_BASE 0x00500000 #define AT91SAM9260_OHCI_SIZE 0x00100000 -#define AT91SAM9260_NAND_BASE 0xe0000000 -#define AT91SAM9260_NAND_PA_BASE 0x40000000 +#define AT91SAM9260_NAND_VA_BASE 0xe0000000 +#define AT91SAM9260_NAND_BASE 0x40000000 #define AT91SAM9260_NAND_SIZE 0x10000000 Modified: stable/10/sys/arm/at91/at91sam9g20reg.h ============================================================================== --- stable/10/sys/arm/at91/at91sam9g20reg.h Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/at91/at91sam9g20reg.h Thu May 15 02:41:23 2014 (r266110) @@ -252,14 +252,13 @@ * other * soc's so phyical and vm address * mapping are unique. XXX */ -#define AT91SAM9G20_OHCI_BASE 0xdfc00000 -#define AT91SAM9G20_OHCI_PA_BASE 0x00500000 -#define AT91SAM9G20_OHCI_SIZE 0x00100000 - -#define AT91SAM9G20_NAND_BASE 0xe0000000 -#define AT91SAM9G20_NAND_PA_BASE 0x40000000 -#define AT91SAM9G20_NAND_SIZE 0x10000000 +#define AT91SAM9G20_OHCI_VA_BASE 0xdfc00000 +#define AT91SAM9G20_OHCI_BASE 0x00500000 +#define AT91SAM9G20_OHCI_SIZE 0x00100000 +#define AT91SAM9G20_NAND_VA_BASE 0xe0000000 +#define AT91SAM9G20_NAND_BASE 0x40000000 +#define AT91SAM9G20_NAND_SIZE 0x10000000 /* SDRAMC */ #define AT91SAM9G20_SDRAMC_BASE 0xfffea00 Modified: stable/10/sys/arm/at91/at91sam9g45reg.h ============================================================================== --- stable/10/sys/arm/at91/at91sam9g45reg.h Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/at91/at91sam9g45reg.h Thu May 15 02:41:23 2014 (r266110) @@ -243,13 +243,13 @@ * other * soc's so phyical and vm address * mapping are unique. XXX */ -#define AT91SAM9G45_OHCI_BASE 0xdfb00000 -#define AT91SAM9G45_OHCI_PA_BASE 0x00700000 -#define AT91SAM9G45_OHCI_SIZE 0x00100000 +#define AT91SAM9G45_OHCI_VA_BASE 0xdfb00000 +#define AT91SAM9G45_OHCI_BASE 0x00700000 +#define AT91SAM9G45_OHCI_SIZE 0x00100000 -#define AT91SAM9G45_NAND_BASE 0xe0000000 -#define AT91SAM9G45_NAND_PA_BASE 0x40000000 -#define AT91SAM9G45_NAND_SIZE 0x10000000 +#define AT91SAM9G45_NAND_VA_BASE 0xe0000000 +#define AT91SAM9G45_NAND_BASE 0x40000000 +#define AT91SAM9G45_NAND_SIZE 0x10000000 /* DDRSDRC */ Modified: stable/10/sys/arm/at91/std.bwct ============================================================================== --- stable/10/sys/arm/at91/std.bwct Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/at91/std.bwct Thu May 15 02:41:23 2014 (r266110) @@ -1,7 +1,6 @@ #$FreeBSD$ include "../at91/std.at91" -options STARTUP_PAGETABLE_ADDR=0x20800000 makeoptions KERNPHYSADDR=0x20000000 options KERNPHYSADDR=0x20000000 makeoptions KERNVIRTADDR=0xc0000000 Modified: stable/10/sys/arm/at91/std.eb9200 ============================================================================== --- stable/10/sys/arm/at91/std.eb9200 Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/at91/std.eb9200 Thu May 15 02:41:23 2014 (r266110) @@ -1,7 +1,6 @@ #$FreeBSD$ include "../at91/std.at91" -options STARTUP_PAGETABLE_ADDR=0x20800000 makeoptions KERNPHYSADDR=0x20000000 options KERNPHYSADDR=0x20000000 makeoptions KERNVIRTADDR=0xc0000000 Modified: stable/10/sys/arm/at91/std.ethernut5 ============================================================================== --- stable/10/sys/arm/at91/std.ethernut5 Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/at91/std.ethernut5 Thu May 15 02:41:23 2014 (r266110) @@ -1,7 +1,6 @@ # $FreeBSD$ include "../at91/std.at91sam9" -options STARTUP_PAGETABLE_ADDR=0x20800000 makeoptions KERNPHYSADDR=0x20000000 makeoptions KERNVIRTADDR=0xc0000000 options KERNPHYSADDR=0x20000000 Modified: stable/10/sys/arm/at91/std.hl200 ============================================================================== --- stable/10/sys/arm/at91/std.hl200 Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/at91/std.hl200 Thu May 15 02:41:23 2014 (r266110) @@ -1,7 +1,6 @@ #$FreeBSD$ include "../at91/std.at91" -options STARTUP_PAGETABLE_ADDR=0x20000000 makeoptions KERNPHYSADDR=0x20100000 options KERNPHYSADDR=0x20100000 makeoptions KERNVIRTADDR=0xc0100000 Modified: stable/10/sys/arm/at91/std.hl201 ============================================================================== --- stable/10/sys/arm/at91/std.hl201 Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/at91/std.hl201 Thu May 15 02:41:23 2014 (r266110) @@ -1,7 +1,6 @@ #$FreeBSD$ include "../at91/std.at91sam9" -options STARTUP_PAGETABLE_ADDR=0x20800000 makeoptions KERNPHYSADDR=0x20000000 makeoptions KERNVIRTADDR=0xc0000000 options KERNPHYSADDR=0x20000000 Modified: stable/10/sys/arm/at91/std.kb920x ============================================================================== --- stable/10/sys/arm/at91/std.kb920x Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/at91/std.kb920x Thu May 15 02:41:23 2014 (r266110) @@ -1,7 +1,6 @@ #$FreeBSD$ include "../at91/std.at91" -options STARTUP_PAGETABLE_ADDR=0x20800000 makeoptions KERNPHYSADDR=0x20000000 options KERNPHYSADDR=0x20000000 makeoptions KERNVIRTADDR=0xc0000000 Modified: stable/10/sys/arm/at91/std.qila9g20 ============================================================================== --- stable/10/sys/arm/at91/std.qila9g20 Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/at91/std.qila9g20 Thu May 15 02:41:23 2014 (r266110) @@ -1,7 +1,6 @@ #$FreeBSD$ include "../at91/std.at91sam9" -options STARTUP_PAGETABLE_ADDR=0x20800000 makeoptions KERNPHYSADDR=0x20000000 makeoptions KERNVIRTADDR=0xc0000000 options KERNPHYSADDR=0x20000000 Modified: stable/10/sys/arm/at91/std.sam9260ek ============================================================================== --- stable/10/sys/arm/at91/std.sam9260ek Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/at91/std.sam9260ek Thu May 15 02:41:23 2014 (r266110) @@ -1,7 +1,6 @@ # $FreeBSD$ include "../at91/std.at91sam9" -options STARTUP_PAGETABLE_ADDR=0x20800000 makeoptions KERNPHYSADDR=0x20000000 makeoptions KERNVIRTADDR=0xc0000000 options KERNPHYSADDR=0x20000000 Modified: stable/10/sys/arm/at91/std.sam9g20ek ============================================================================== --- stable/10/sys/arm/at91/std.sam9g20ek Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/at91/std.sam9g20ek Thu May 15 02:41:23 2014 (r266110) @@ -1,7 +1,6 @@ #$FreeBSD$ include "../at91/std.at91sam9" -options STARTUP_PAGETABLE_ADDR=0x20800000 makeoptions KERNPHYSADDR=0x20000000 makeoptions KERNVIRTADDR=0xc0000000 options KERNPHYSADDR=0x20000000 Modified: stable/10/sys/arm/at91/std.sam9x25ek ============================================================================== --- stable/10/sys/arm/at91/std.sam9x25ek Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/at91/std.sam9x25ek Thu May 15 02:41:23 2014 (r266110) @@ -1,7 +1,6 @@ #$FreeBSD$ include "../at91/std.at91sam9" -options STARTUP_PAGETABLE_ADDR=0x20800000 makeoptions KERNPHYSADDR=0x20000000 makeoptions KERNVIRTADDR=0xc0000000 options KERNPHYSADDR=0x20000000 Modified: stable/10/sys/arm/at91/std.sn9g45 ============================================================================== --- stable/10/sys/arm/at91/std.sn9g45 Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/at91/std.sn9g45 Thu May 15 02:41:23 2014 (r266110) @@ -1,7 +1,6 @@ #$FreeBSD$ include "../at91/std.at91sam9g45" -options STARTUP_PAGETABLE_ADDR=0x70800000 makeoptions KERNPHYSADDR=0x70008000 options KERNPHYSADDR=0x70008000 makeoptions KERNVIRTADDR=0xc0008000 Modified: stable/10/sys/arm/at91/std.tsc4370 ============================================================================== --- stable/10/sys/arm/at91/std.tsc4370 Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/at91/std.tsc4370 Thu May 15 02:41:23 2014 (r266110) @@ -1,7 +1,6 @@ #$FreeBSD$ include "../at91/std.at91" -options STARTUP_PAGETABLE_ADDR=0x20800000 makeoptions KERNPHYSADDR=0x20000000 makeoptions KERNVIRTADDR=0xc0000000 options KERNPHYSADDR=0x20000000 Modified: stable/10/sys/arm/broadcom/bcm2835/std.rpi ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/std.rpi Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/broadcom/bcm2835/std.rpi Thu May 15 02:41:23 2014 (r266110) @@ -7,6 +7,5 @@ makeoptions KERNVIRTADDR=0xc0100000 options KERNPHYSADDR=0x00100000 makeoptions KERNPHYSADDR=0x00100000 options PHYSADDR=0x00000000 -options STARTUP_PAGETABLE_ADDR=0x01000000 options FREEBSD_BOOT_LOADER options LINUX_BOOT_ABI Modified: stable/10/sys/arm/conf/ATMEL ============================================================================== --- stable/10/sys/arm/conf/ATMEL Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/conf/ATMEL Thu May 15 02:41:23 2014 (r266110) @@ -10,7 +10,6 @@ include "../at91/std.atmel" # Typical values for most SoCs and board configurations. Will not work for # at91sam9g45 or on some boards with non u-boot boot loaders. -options STARTUP_PAGETABLE_ADDR=0x20800000 makeoptions KERNPHYSADDR=0x20000000 makeoptions KERNVIRTADDR=0xc0000000 options KERNPHYSADDR=0x20000000 Modified: stable/10/sys/arm/conf/CNS11XXNAS ============================================================================== --- stable/10/sys/arm/conf/CNS11XXNAS Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/conf/CNS11XXNAS Thu May 15 02:41:23 2014 (r266110) @@ -25,7 +25,6 @@ ident CNS11XXNAS #options KERNVIRTADDR=0xc0200000 # Used in ldscript.arm #options FLASHADDR=0x50000000 #options LOADERRAMADDR=0x00000000 -#options STARTUP_PAGETABLE_ADDR=0x10000000 include "../econa/std.econa" Modified: stable/10/sys/arm/conf/CRB ============================================================================== --- stable/10/sys/arm/conf/CRB Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/conf/CRB Thu May 15 02:41:23 2014 (r266110) @@ -24,7 +24,6 @@ options KERNPHYSADDR=0x00200000 options KERNVIRTADDR=0xc0200000 # Used in ldscript.arm options COUNTS_PER_SEC=400000000 -options STARTUP_PAGETABLE_ADDR=0x00000000 include "../xscale/i8134x/std.crb" makeoptions MODULES_OVERRIDE="" Modified: stable/10/sys/arm/conf/EP80219 ============================================================================== --- stable/10/sys/arm/conf/EP80219 Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/conf/EP80219 Thu May 15 02:41:23 2014 (r266110) @@ -23,7 +23,6 @@ options PHYSADDR=0xa0000000 options KERNPHYSADDR=0xa0200000 options KERNVIRTADDR=0xc0200000 # Used in ldscript.arm -options STARTUP_PAGETABLE_ADDR=0xa0000000 #options ARM32_NEW_VM_LAYOUT include "../xscale/i80321/std.ep80219" makeoptions MODULES_OVERRIDE="" Modified: stable/10/sys/arm/conf/GUMSTIX ============================================================================== --- stable/10/sys/arm/conf/GUMSTIX Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/conf/GUMSTIX Thu May 15 02:41:23 2014 (r266110) @@ -30,7 +30,6 @@ options PHYSADDR=0xa0000000 options KERNPHYSADDR=0xa0200000 options KERNVIRTADDR=0xc0200000 # Used in ldscript.arm -options STARTUP_PAGETABLE_ADDR=0xa0000000 include "../xscale/pxa/std.pxa" makeoptions MODULES_OVERRIDE="" Modified: stable/10/sys/arm/conf/HL201 ============================================================================== --- stable/10/sys/arm/conf/HL201 Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/conf/HL201 Thu May 15 02:41:23 2014 (r266110) @@ -126,7 +126,7 @@ device nand # NAND interface on CS3 # Coming soon, but not yet #options FDT #options FDT_DTB_STATIC -#makeoptions FDT_DTS_FILE=at91sam9g20ek.dts +#makeoptions FDT_DTS_FILE=hl201.dts options EARLY_PRINTF options SOCDEV_PA=0xfc000000 Modified: stable/10/sys/arm/conf/IQ31244 ============================================================================== --- stable/10/sys/arm/conf/IQ31244 Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/conf/IQ31244 Thu May 15 02:41:23 2014 (r266110) @@ -25,7 +25,6 @@ options KERNVIRTADDR=0xc0200000 # Used options FLASHADDR=0xf0000000 options LOADERRAMADDR=0x00000000 -options STARTUP_PAGETABLE_ADDR=0xa0000000 include "../xscale/i80321/std.iq31244" makeoptions MODULES_OVERRIDE="" Modified: stable/10/sys/arm/conf/NSLU ============================================================================== --- stable/10/sys/arm/conf/NSLU Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/conf/NSLU Thu May 15 02:41:23 2014 (r266110) @@ -25,7 +25,6 @@ ident NSLU #options KERNVIRTADDR=0xc0200000 # Used in ldscript.arm #options FLASHADDR=0x50000000 #options LOADERRAMADDR=0x00000000 -#options STARTUP_PAGETABLE_ADDR=0x10000000 include "../xscale/ixp425/std.ixp425" # NB: memory mapping is defined in std.avila (see also comment above) Modified: stable/10/sys/arm/conf/VERSATILEPB ============================================================================== --- stable/10/sys/arm/conf/VERSATILEPB Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/conf/VERSATILEPB Thu May 15 02:41:23 2014 (r266110) @@ -29,7 +29,6 @@ makeoptions KERNVIRTADDR=0xc0100000 options KERNPHYSADDR=0x00100000 makeoptions KERNPHYSADDR=0x00100000 options PHYSADDR=0x00000000 -options STARTUP_PAGETABLE_ADDR=0x01000000 options FREEBSD_BOOT_LOADER options LINUX_BOOT_ABI Modified: stable/10/sys/arm/econa/std.econa ============================================================================== --- stable/10/sys/arm/econa/std.econa Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/econa/std.econa Thu May 15 02:41:23 2014 (r266110) @@ -12,6 +12,5 @@ options KERNPHYSADDR=0x01000000 options KERNVIRTADDR=0xc1000000 # Used in ldscript.arm options FLASHADDR=0xD0000000 options LOADERRAMADDR=0x00000000 -options STARTUP_PAGETABLE_ADDR=0x00100000 options NO_EVENTTIMERS Modified: stable/10/sys/arm/freescale/imx/std.imx51 ============================================================================== --- stable/10/sys/arm/freescale/imx/std.imx51 Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/freescale/imx/std.imx51 Thu May 15 02:41:23 2014 (r266110) @@ -9,7 +9,6 @@ makeoptions KERNVIRTADDR=0xc0100000 options KERNPHYSADDR=0x90100000 makeoptions KERNPHYSADDR=0x90100000 options PHYSADDR=0x90000000 -options STARTUP_PAGETABLE_ADDR=0x91000000 files "../freescale/imx/files.imx51" Modified: stable/10/sys/arm/freescale/imx/std.imx53 ============================================================================== --- stable/10/sys/arm/freescale/imx/std.imx53 Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/freescale/imx/std.imx53 Thu May 15 02:41:23 2014 (r266110) @@ -9,7 +9,6 @@ makeoptions KERNVIRTADDR=0xc0100000 options KERNPHYSADDR=0x70100000 makeoptions KERNPHYSADDR=0x70100000 options PHYSADDR=0x70000000 -options STARTUP_PAGETABLE_ADDR=0x71000000 files "../freescale/imx/files.imx53" Modified: stable/10/sys/arm/freescale/imx/std.imx6 ============================================================================== --- stable/10/sys/arm/freescale/imx/std.imx6 Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/freescale/imx/std.imx6 Thu May 15 02:41:23 2014 (r266110) @@ -9,7 +9,6 @@ makeoptions KERNVIRTADDR = 0xc2000000 options KERNPHYSADDR = 0x12000000 makeoptions KERNPHYSADDR = 0x12000000 options PHYSADDR = 0x10000000 -options STARTUP_PAGETABLE_ADDR = 0x11f00000 files "../freescale/imx/files.imx6" Modified: stable/10/sys/arm/freescale/vybrid/std.vybrid ============================================================================== --- stable/10/sys/arm/freescale/vybrid/std.vybrid Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/freescale/vybrid/std.vybrid Thu May 15 02:41:23 2014 (r266110) @@ -13,8 +13,6 @@ options KERNPHYSADDR=0x80100000 makeoptions KERNVIRTADDR=0xc0100000 options KERNVIRTADDR=0xc0100000 -options STARTUP_PAGETABLE_ADDR=0x81000000 - options ARM_L2_PIPT files "../freescale/vybrid/files.vybrid" Modified: stable/10/sys/arm/lpc/std.lpc ============================================================================== --- stable/10/sys/arm/lpc/std.lpc Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/lpc/std.lpc Thu May 15 02:41:23 2014 (r266110) @@ -8,7 +8,6 @@ cpu CPU_ARM9 machine arm makeoptions CONF_CFLAGS="-march=armv5te" options PHYSADDR=0x80000000 -options STARTUP_PAGETABLE_ADDR=0x80000000 makeoptions KERNPHYSADDR=0x80100000 options KERNPHYSADDR=0x80100000 makeoptions KERNVIRTADDR=0xc0100000 Modified: stable/10/sys/arm/mv/armadaxp/std.armadaxp ============================================================================== --- stable/10/sys/arm/mv/armadaxp/std.armadaxp Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/mv/armadaxp/std.armadaxp Thu May 15 02:41:23 2014 (r266110) @@ -12,6 +12,5 @@ makeoptions KERNVIRTADDR=0xc0200000 options KERNPHYSADDR=0x00200000 options KERNVIRTADDR=0xc0200000 options PHYSADDR=0x00000000 -options STARTUP_PAGETABLE_ADDR=0x00100000 options ARM_L2_PIPT Modified: stable/10/sys/arm/mv/discovery/std.db78xxx ============================================================================== --- stable/10/sys/arm/mv/discovery/std.db78xxx Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/mv/discovery/std.db78xxx Thu May 15 02:41:23 2014 (r266110) @@ -9,4 +9,3 @@ makeoptions KERNVIRTADDR=0xc0900000 options KERNPHYSADDR=0x00900000 options KERNVIRTADDR=0xc0900000 options PHYSADDR=0x00000000 -options STARTUP_PAGETABLE_ADDR=0x00100000 Modified: stable/10/sys/arm/mv/kirkwood/std.kirkwood ============================================================================== --- stable/10/sys/arm/mv/kirkwood/std.kirkwood Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/mv/kirkwood/std.kirkwood Thu May 15 02:41:23 2014 (r266110) @@ -12,4 +12,3 @@ makeoptions KERNVIRTADDR=0xc0900000 options KERNPHYSADDR=0x00900000 options KERNVIRTADDR=0xc0900000 options PHYSADDR=0x00000000 -options STARTUP_PAGETABLE_ADDR=0x00100000 Modified: stable/10/sys/arm/mv/orion/std.db88f5xxx ============================================================================== --- stable/10/sys/arm/mv/orion/std.db88f5xxx Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/mv/orion/std.db88f5xxx Thu May 15 02:41:23 2014 (r266110) @@ -9,4 +9,3 @@ makeoptions KERNVIRTADDR=0xc0900000 options KERNPHYSADDR=0x00900000 options KERNVIRTADDR=0xc0900000 options PHYSADDR=0x00000000 -options STARTUP_PAGETABLE_ADDR=0x00100000 Modified: stable/10/sys/arm/mv/orion/std.ts7800 ============================================================================== --- stable/10/sys/arm/mv/orion/std.ts7800 Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/mv/orion/std.ts7800 Thu May 15 02:41:23 2014 (r266110) @@ -9,7 +9,6 @@ makeoptions KERNVIRTADDR=0xc0900000 options KERNPHYSADDR=0x00900000 options KERNVIRTADDR=0xc0900000 options PHYSADDR=0x00000000 -options STARTUP_PAGETABLE_ADDR=0x00100000 options LOADERRAMADDR=0x00000000 options FLASHADDR=0x00008000 Modified: stable/10/sys/arm/rockchip/std.rk30xx ============================================================================== --- stable/10/sys/arm/rockchip/std.rk30xx Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/rockchip/std.rk30xx Thu May 15 02:41:23 2014 (r266110) @@ -17,8 +17,6 @@ options KERNPHYSADDR=0x60400000 makeoptions KERNVIRTADDR=0xc0400000 options KERNVIRTADDR=0xc0400000 -options STARTUP_PAGETABLE_ADDR=0x60200000 - options ARM_L2_PIPT options IPI_IRQ_START=0 Modified: stable/10/sys/arm/s3c2xx0/std.ln2410sbc ============================================================================== --- stable/10/sys/arm/s3c2xx0/std.ln2410sbc Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/s3c2xx0/std.ln2410sbc Thu May 15 02:41:23 2014 (r266110) @@ -6,6 +6,5 @@ makeoptions KERNVIRTADDR=0xc0000000 options KERNPHYSADDR=0x30000000 options KERNVIRTADDR=0xc0000000 options PHYSADDR=0x30000000 -options STARTUP_PAGETABLE_ADDR=0x30800000 options NO_EVENTTIMERS Modified: stable/10/sys/arm/samsung/exynos/std.exynos5 ============================================================================== --- stable/10/sys/arm/samsung/exynos/std.exynos5 Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/samsung/exynos/std.exynos5 Thu May 15 02:41:23 2014 (r266110) @@ -13,8 +13,6 @@ options KERNPHYSADDR=0x40f00000 makeoptions KERNVIRTADDR=0xc0f00000 options KERNVIRTADDR=0xc0f00000 -options STARTUP_PAGETABLE_ADDR=0x40100000 - options ARM_L2_PIPT options IPI_IRQ_START=0 Modified: stable/10/sys/arm/tegra/std.tegra2 ============================================================================== --- stable/10/sys/arm/tegra/std.tegra2 Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/tegra/std.tegra2 Thu May 15 02:41:23 2014 (r266110) @@ -11,6 +11,4 @@ options KERNPHYSADDR=0x00200000 makeoptions KERNVIRTADDR=0xc0200000 options KERNVIRTADDR=0xc0200000 -options STARTUP_PAGETABLE_ADDR=0x00100000 - files "../tegra/files.tegra2" Modified: stable/10/sys/arm/ti/am335x/std.am335x ============================================================================== --- stable/10/sys/arm/ti/am335x/std.am335x Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/ti/am335x/std.am335x Thu May 15 02:41:23 2014 (r266110) @@ -14,8 +14,6 @@ makeoptions KERNPHYSADDR=0x80200000 options KERNVIRTADDR=0xc0200000 # Used in ldscript.arm makeoptions KERNVIRTADDR=0xc0200000 -options STARTUP_PAGETABLE_ADDR=0x80000000 - options SOC_TI_AM335X options ARM_L2_PIPT Modified: stable/10/sys/arm/ti/omap4/std.omap4 ============================================================================== --- stable/10/sys/arm/ti/omap4/std.omap4 Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/ti/omap4/std.omap4 Thu May 15 02:41:23 2014 (r266110) @@ -14,8 +14,6 @@ makeoptions KERNPHYSADDR=0x80200000 options KERNVIRTADDR=0xc0200000 # Used in ldscript.arm makeoptions KERNVIRTADDR=0xc0200000 -options STARTUP_PAGETABLE_ADDR=0x80000000 - options SOC_OMAP4 options ARM_L2_PIPT Modified: stable/10/sys/arm/xilinx/std.zynq7 ============================================================================== --- stable/10/sys/arm/xilinx/std.zynq7 Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/xilinx/std.zynq7 Thu May 15 02:41:23 2014 (r266110) @@ -18,6 +18,5 @@ makeoptions KERNPHYSADDR=0x00100000 options KERNVIRTADDR=0xc0100000 # Used in ldscript.arm makeoptions KERNVIRTADDR=0xc0100000 -options STARTUP_PAGETABLE_ADDR=0x000f0000 options ARM_L2_PIPT Modified: stable/10/sys/arm/xscale/ixp425/std.avila ============================================================================== --- stable/10/sys/arm/xscale/ixp425/std.avila Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/arm/xscale/ixp425/std.avila Thu May 15 02:41:23 2014 (r266110) @@ -19,4 +19,3 @@ options KERNVIRTADDR=0xc0200000 # Used makeoptions KERNVIRTADDR=0xc0200000 options FLASHADDR=0x50000000 options LOADERRAMADDR=0x00000000 -options STARTUP_PAGETABLE_ADDR=0x00000000 Modified: stable/10/sys/conf/Makefile.arm ============================================================================== --- stable/10/sys/conf/Makefile.arm Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/conf/Makefile.arm Thu May 15 02:41:23 2014 (r266110) @@ -55,6 +55,9 @@ CFLAGS += -mllvm -arm-enable-ehabi .endif .endif +# hack because genassym.c includes sys/bus.h which includes these. +genassym.o: bus_if.h device_if.h + SYSTEM_LD_ = ${LD} -Bdynamic -T ldscript.$M.noheader ${LDFLAGS} \ -warn-common -export-dynamic -dynamic-linker /red/herring -o \ ${FULLKERNEL}.noheader -X ${SYSTEM_OBJS} vers.o Modified: stable/10/sys/conf/ldscript.arm ============================================================================== --- stable/10/sys/conf/ldscript.arm Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/conf/ldscript.arm Thu May 15 02:41:23 2014 (r266110) @@ -107,6 +107,12 @@ SECTIONS *(.dynbss) *(.bss) *(COMMON) + . = ALIGN(32 / 8); + _ebss = .; + /* A section for the initial page table, it doesn't need to be in the + kernel file, however unlike normal .bss entries should not be zeroed + out as we use it before the .bss section is cleared. */ + *(.init_pagetable) } . = ALIGN(32 / 8); _end = . ; Modified: stable/10/sys/conf/options.arm ============================================================================== --- stable/10/sys/conf/options.arm Thu May 15 02:37:59 2014 (r266109) +++ stable/10/sys/conf/options.arm Thu May 15 02:41:23 2014 (r266110) @@ -51,7 +51,6 @@ SOC_OMAP3 opt_global.h SOC_OMAP4 opt_global.h SOC_TI_AM335X opt_global.h SOC_TEGRA2 opt_global.h -STARTUP_PAGETABLE_ADDR opt_global.h XSCALE_CACHE_READ_WRITE_ALLOCATE opt_global.h XSACLE_DISABLE_CCNT opt_timer.h VERBOSE_INIT_ARM opt_global.h From owner-svn-src-stable@FreeBSD.ORG Thu May 15 03:22:59 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3BAE998; Thu, 15 May 2014 03:22:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4F4329EB; Thu, 15 May 2014 03:22:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4F3MwLK026174; Thu, 15 May 2014 03:22:58 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4F3Mw1C026171; Thu, 15 May 2014 03:22:58 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405150322.s4F3Mw1C026171@svn.freebsd.org> From: Ian Lepore Date: Thu, 15 May 2014 03:22:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266113 - stable/10/sys/arm/rockchip X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 03:22:59 -0000 Author: ian Date: Thu May 15 03:22:57 2014 New Revision: 266113 URL: http://svnweb.freebsd.org/changeset/base/266113 Log: MFC r258546: Add watchdog driver for rk3188. Added: stable/10/sys/arm/rockchip/rk30xx_wdog.c - copied unchanged from r258546, head/sys/arm/rockchip/rk30xx_wdog.c stable/10/sys/arm/rockchip/rk30xx_wdog.h - copied unchanged from r258546, head/sys/arm/rockchip/rk30xx_wdog.h Modified: stable/10/sys/arm/rockchip/files.rk30xx Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/rockchip/files.rk30xx ============================================================================== --- stable/10/sys/arm/rockchip/files.rk30xx Thu May 15 03:18:22 2014 (r266112) +++ stable/10/sys/arm/rockchip/files.rk30xx Thu May 15 03:22:57 2014 (r266113) @@ -17,5 +17,6 @@ arm/rockchip/common.c standard arm/rockchip/rk30xx_machdep.c standard arm/rockchip/rk30xx_pmu.c standard arm/rockchip/rk30xx_grf.c standard +arm/rockchip/rk30xx_wdog.c standard arm/rockchip/rk30xx_gpio.c optional gpio dev/usb/controller/dwc_otg_fdt.c optional dwcotg Copied: stable/10/sys/arm/rockchip/rk30xx_wdog.c (from r258546, head/sys/arm/rockchip/rk30xx_wdog.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/rockchip/rk30xx_wdog.c Thu May 15 03:22:57 2014 (r266113, copy of r258546, head/sys/arm/rockchip/rk30xx_wdog.c) @@ -0,0 +1,198 @@ +/*- + * Copyright (c) 2013 Ganbold Tsagaankhuu + * All rights reserved. + * + * 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. + */ +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +#ifndef RK30_WDT_BASE +#define RK30_WDT_BASE 0x2004c000 +#define RK30_WDT_PSIZE 0x100 +#endif + +#define RK30_WDT_READ(_sc, _r) bus_read_4((_sc)->res, (_r)) +#define RK30_WDT_WRITE(_sc, _r, _v) bus_write_4((_sc)->res, (_r), (_v)) + +#define WDOG_CTRL 0x00 +#define WDOG_CTRL_EN (1 << 0) +#define WDOG_CTRL_RSP_MODE (1 << 1) +#define WDOG_CTRL_RST_PULSE (4 << 2) +#define WDOG_CTRL_RST 0xa +#define WDOG_TORR 0x04 +#define WDOG_TORR_INTVL_SHIFT 0 +#define WDOG_CCVR 0x08 +#define WDOG_CRR 0x0c +#define WDOG_CRR_PWD 0x76 +#define WDOG_STAT 0x10 +#define WDOG_EOI 0x14 + +static struct rk30_wd_softc *rk30_wd_sc = NULL; + +struct rk30_wd_softc { + device_t dev; + struct resource *res; + struct mtx mtx; + int freq; +}; + +static void rk30_wd_watchdog_fn(void *private, u_int cmd, int *error); + +static int +rk30_wd_probe(device_t dev) +{ + + if (ofw_bus_is_compatible(dev, "rockchip,rk30xx-wdt")) { + device_set_desc(dev, "Rockchip RK30XX Watchdog"); + return (BUS_PROBE_DEFAULT); + } + + return (ENXIO); +} + +static int +rk30_wd_attach(device_t dev) +{ + struct rk30_wd_softc *sc; + int rid; + phandle_t node; + pcell_t cell; + + if (rk30_wd_sc != NULL) + return (ENXIO); + + sc = device_get_softc(dev); + sc->dev = dev; + + node = ofw_bus_get_node(sc->dev); + if (OF_getencprop(node, "clock-frequency", &cell, sizeof(cell)) > 0) + sc->freq = cell / 1000000; + else + return (ENXIO); + + rid = 0; + sc->res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); + if (sc->res == NULL) { + device_printf(dev, "could not allocate memory resource\n"); + return (ENXIO); + } + + rk30_wd_sc = sc; + mtx_init(&sc->mtx, "RK30XX Watchdog", "rk30_wd", MTX_DEF); + EVENTHANDLER_REGISTER(watchdog_list, rk30_wd_watchdog_fn, sc, 0); + + return (0); +} + +static void +rk30_wd_watchdog_fn(void *private, u_int cmd, int *error) +{ + struct rk30_wd_softc *sc; + uint64_t ms, m, max; + int i; + + sc = private; + mtx_lock(&sc->mtx); + + cmd &= WD_INTERVAL; + + if (cmd > 0) { + ms = ((uint64_t)1 << (cmd & WD_INTERVAL)) / 1000000; + m = 0xffff / sc->freq; + max = 0x7fffffff / sc->freq + 1; + i = 0; + while (m < max && m < ms) { + m <<= 1; + i++; + } + if (m < max) { + RK30_WDT_WRITE(sc, WDOG_TORR, + i << WDOG_TORR_INTVL_SHIFT); + RK30_WDT_WRITE(sc, WDOG_CTRL, + WDOG_CTRL_EN | WDOG_CTRL_RSP_MODE | + WDOG_CTRL_RST_PULSE); + RK30_WDT_WRITE(sc, WDOG_CRR, WDOG_CRR_PWD); + *error = 0; + } else { + device_printf(sc->dev, "Can not be disabled\n"); + mtx_unlock(&sc->mtx); + RK30_WDT_WRITE(sc, WDOG_CTRL, WDOG_CTRL_RST); + return; + } + } + else + RK30_WDT_WRITE(sc, WDOG_CTRL, WDOG_CTRL_RST); + + mtx_unlock(&sc->mtx); +} + +void +rk30_wd_watchdog_reset() +{ + bus_space_handle_t bsh; + + bus_space_map(fdtbus_bs_tag, RK30_WDT_BASE, RK30_WDT_PSIZE, 0, &bsh); + bus_space_write_4(fdtbus_bs_tag, bsh, WDOG_TORR, 0); + bus_space_write_4(fdtbus_bs_tag, bsh, WDOG_CTRL, + WDOG_CTRL_EN | WDOG_CTRL_RSP_MODE | WDOG_CTRL_RST_PULSE); + + while (1); +} + +static device_method_t rk30_wd_methods[] = { + DEVMETHOD(device_probe, rk30_wd_probe), + DEVMETHOD(device_attach, rk30_wd_attach), + + DEVMETHOD_END +}; + +static driver_t rk30_wd_driver = { + "rk30_wd", + rk30_wd_methods, + sizeof(struct rk30_wd_softc), +}; +static devclass_t rk30_wd_devclass; + +DRIVER_MODULE(rk30_wd, simplebus, rk30_wd_driver, rk30_wd_devclass, 0, 0); Copied: stable/10/sys/arm/rockchip/rk30xx_wdog.h (from r258546, head/sys/arm/rockchip/rk30xx_wdog.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/rockchip/rk30xx_wdog.h Thu May 15 03:22:57 2014 (r266113, copy of r258546, head/sys/arm/rockchip/rk30xx_wdog.h) @@ -0,0 +1,35 @@ +/*- + * Copyright (c) 2013 Ganbold Tsagaankhuu + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + * + */ +#ifndef __RK30XX_WDOG_H__ +#define __RK30XX_WDOG_H__ + +void rk30_wd_watchdog_reset(void); + +#endif /*__RK30XX_WDOG_H__*/ + From owner-svn-src-stable@FreeBSD.ORG Thu May 15 09:55:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CC85B7FA; Thu, 15 May 2014 09:55:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B82EE25C5; Thu, 15 May 2014 09:55:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4F9tOS5095614; Thu, 15 May 2014 09:55:24 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4F9tMmh095603; Thu, 15 May 2014 09:55:22 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201405150955.s4F9tMmh095603@svn.freebsd.org> From: Marius Strobl Date: Thu, 15 May 2014 09:55:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r266118 - in stable/8/sys/cam: . ata scsi X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 09:55:25 -0000 Author: marius Date: Thu May 15 09:55:21 2014 New Revision: 266118 URL: http://svnweb.freebsd.org/changeset/base/266118 Log: Revert the following MFCs done as part of r265147: r249438, r249466, r249481, r250025, r253958 leaving the MFCs of r241028 and r241444 in place. While the CAM queuing changes in question are pretty much self-contained and work fine with all kinds of SAS, SATA and USB devices, for reasons unknown they cause a hang with Initio INIC-1610P USB disks not seen with later branches containing these rewrites. In turn, r241444 actually is sufficient to fix the panic and problems I was seeing and that lead me to bringing CAM queuing up to date. Reported by: Scott Allendorf Modified: stable/8/sys/cam/ata/ata_da.c stable/8/sys/cam/ata/ata_pmp.c stable/8/sys/cam/ata/ata_xpt.c stable/8/sys/cam/cam.h stable/8/sys/cam/cam_ccb.h stable/8/sys/cam/cam_periph.c stable/8/sys/cam/cam_periph.h stable/8/sys/cam/cam_queue.c stable/8/sys/cam/cam_queue.h stable/8/sys/cam/cam_xpt.c stable/8/sys/cam/cam_xpt_internal.h stable/8/sys/cam/cam_xpt_sim.h stable/8/sys/cam/scsi/scsi_cd.c stable/8/sys/cam/scsi/scsi_pass.c stable/8/sys/cam/scsi/scsi_xpt.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cam/ (props changed) Modified: stable/8/sys/cam/ata/ata_da.c ============================================================================== --- stable/8/sys/cam/ata/ata_da.c Thu May 15 05:35:00 2014 (r266117) +++ stable/8/sys/cam/ata/ata_da.c Thu May 15 09:55:21 2014 (r266118) @@ -978,6 +978,8 @@ adaasync(void *callback_arg, u_int32_t c else break; cam_periph_acquire(periph); + cam_freeze_devq_arg(periph->path, + RELSIM_RELEASE_RUNLEVEL, CAM_RL_DEV + 1); xpt_schedule(periph, CAM_PRIORITY_DEV); } default: @@ -1273,11 +1275,15 @@ adaregister(struct cam_periph *periph, v cgd->ident_data.support.command1 & ATA_SUPPORT_LOOKAHEAD) { softc->state = ADA_STATE_RAHEAD; cam_periph_acquire(periph); + cam_freeze_devq_arg(periph->path, + RELSIM_RELEASE_RUNLEVEL, CAM_RL_DEV + 1); xpt_schedule(periph, CAM_PRIORITY_DEV); } else if (ADA_WC >= 0 && cgd->ident_data.support.command1 & ATA_SUPPORT_WRITECACHE) { softc->state = ADA_STATE_WCACHE; cam_periph_acquire(periph); + cam_freeze_devq_arg(periph->path, + RELSIM_RELEASE_RUNLEVEL, CAM_RL_DEV + 1); xpt_schedule(periph, CAM_PRIORITY_DEV); } else softc->state = ADA_STATE_NORMAL; @@ -1561,6 +1567,8 @@ out: if (softc->flags & ADA_FLAG_PACK_INVALID) { softc->state = ADA_STATE_NORMAL; xpt_release_ccb(start_ccb); + cam_release_devq(periph->path, + RELSIM_RELEASE_RUNLEVEL, 0, CAM_RL_DEV + 1, FALSE); adaschedule(periph); cam_periph_release_locked(periph); return; @@ -1584,7 +1592,6 @@ out: ATA_SF_ENAB_WCACHE : ATA_SF_DIS_WCACHE, 0, 0); start_ccb->ccb_h.ccb_state = ADA_CCB_WCACHE; } - start_ccb->ccb_h.flags |= CAM_DEV_QFREEZE; xpt_action(start_ccb); break; } @@ -1597,13 +1604,11 @@ adadone(struct cam_periph *periph, union struct ada_softc *softc; struct ccb_ataio *ataio; struct ccb_getdev *cgd; - struct cam_path *path; softc = (struct ada_softc *)periph->softc; ataio = &done_ccb->ataio; - path = done_ccb->ccb_h.path; - CAM_DEBUG(path, CAM_DEBUG_TRACE, ("adadone\n")); + CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("adadone\n")); switch (ataio->ccb_h.ccb_state & ADA_CCB_TYPE_MASK) { case ADA_CCB_BUFFER_IO: @@ -1631,7 +1636,8 @@ adadone(struct cam_periph *periph, union * XXX See if this is really a media * XXX change first? */ - xpt_print(path, "Invalidating pack\n"); + xpt_print(periph->path, + "Invalidating pack\n"); softc->flags |= ADA_FLAG_PACK_INVALID; } bp->bio_error = error; @@ -1644,7 +1650,7 @@ adadone(struct cam_periph *periph, union bp->bio_flags |= BIO_ERROR; } if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(path, + cam_release_devq(done_ccb->ccb_h.path, /*relsim_flags*/0, /*reduction*/0, /*timeout*/0, @@ -1685,12 +1691,9 @@ adadone(struct cam_periph *periph, union { if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { if (adaerror(done_ccb, 0, 0) == ERESTART) { -out: - /* Drop freeze taken due to CAM_DEV_QFREEZE */ - cam_release_devq(path, 0, 0, 0, FALSE); return; } else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { - cam_release_devq(path, + cam_release_devq(done_ccb->ccb_h.path, /*relsim_flags*/0, /*reduction*/0, /*timeout*/0, @@ -1707,7 +1710,7 @@ out: * operation. */ cgd = (struct ccb_getdev *)done_ccb; - xpt_setup_ccb(&cgd->ccb_h, path, CAM_PRIORITY_NORMAL); + xpt_setup_ccb(&cgd->ccb_h, periph->path, CAM_PRIORITY_NORMAL); cgd->ccb_h.func_code = XPT_GDEV_TYPE; xpt_action((union ccb *)cgd); if (ADA_WC >= 0 && @@ -1715,12 +1718,12 @@ out: softc->state = ADA_STATE_WCACHE; xpt_release_ccb(done_ccb); xpt_schedule(periph, CAM_PRIORITY_DEV); - goto out; + return; } softc->state = ADA_STATE_NORMAL; xpt_release_ccb(done_ccb); - /* Drop freeze taken due to CAM_DEV_QFREEZE */ - cam_release_devq(path, 0, 0, 0, FALSE); + cam_release_devq(periph->path, + RELSIM_RELEASE_RUNLEVEL, 0, CAM_RL_DEV + 1, FALSE); adaschedule(periph); cam_periph_release_locked(periph); return; @@ -1729,9 +1732,9 @@ out: { if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { if (adaerror(done_ccb, 0, 0) == ERESTART) { - goto out; + return; } else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { - cam_release_devq(path, + cam_release_devq(done_ccb->ccb_h.path, /*relsim_flags*/0, /*reduction*/0, /*timeout*/0, @@ -1749,8 +1752,8 @@ out: * operation. */ xpt_release_ccb(done_ccb); - /* Drop freeze taken due to CAM_DEV_QFREEZE */ - cam_release_devq(path, 0, 0, 0, FALSE); + cam_release_devq(periph->path, + RELSIM_RELEASE_RUNLEVEL, 0, CAM_RL_DEV + 1, FALSE); adaschedule(periph); cam_periph_release_locked(periph); return; Modified: stable/8/sys/cam/ata/ata_pmp.c ============================================================================== --- stable/8/sys/cam/ata/ata_pmp.c Thu May 15 05:35:00 2014 (r266117) +++ stable/8/sys/cam/ata/ata_pmp.c Thu May 15 09:55:21 2014 (r266118) @@ -193,7 +193,8 @@ pmpfreeze(struct cam_periph *periph, int i, 0) == CAM_REQ_CMP) { softc->frozen |= (1 << i); xpt_acquire_device(dpath->device); - cam_freeze_devq(dpath); + cam_freeze_devq_arg(dpath, + RELSIM_RELEASE_RUNLEVEL, CAM_RL_BUS + 1); xpt_free_path(dpath); } } @@ -214,7 +215,8 @@ pmprelease(struct cam_periph *periph, in xpt_path_path_id(periph->path), i, 0) == CAM_REQ_CMP) { softc->frozen &= ~(1 << i); - cam_release_devq(dpath, 0, 0, 0, FALSE); + cam_release_devq(dpath, + RELSIM_RELEASE_RUNLEVEL, 0, CAM_RL_BUS + 1, FALSE); xpt_release_device(dpath->device); xpt_free_path(dpath); } Modified: stable/8/sys/cam/ata/ata_xpt.c ============================================================================== --- stable/8/sys/cam/ata/ata_xpt.c Thu May 15 05:35:00 2014 (r266117) +++ stable/8/sys/cam/ata/ata_xpt.c Thu May 15 09:55:21 2014 (r266118) @@ -250,6 +250,12 @@ proberegister(struct cam_periph *periph, return (status); } CAM_DEBUG(periph->path, CAM_DEBUG_PROBE, ("Probe started\n")); + + /* + * Ensure nobody slip in until probe finish. + */ + cam_freeze_devq_arg(periph->path, + RELSIM_RELEASE_RUNLEVEL, CAM_RL_XPT + 1); probeschedule(periph); return(CAM_REQ_CMP); } @@ -624,7 +630,6 @@ negotiate: default: panic("probestart: invalid action state 0x%x\n", softc->action); } - start_ccb->ccb_h.flags |= CAM_DEV_QFREEZE; xpt_action(start_ccb); } @@ -670,15 +675,12 @@ probedone(struct cam_periph *periph, uni cam_error_print(done_ccb, CAM_ESF_ALL, CAM_EPF_ALL); } - } else if (cam_periph_error(done_ccb, 0, 0, NULL) == ERESTART) { -out: - /* Drop freeze taken due to CAM_DEV_QFREEZE flag set. */ - cam_release_devq(path, 0, 0, 0, FALSE); + } else if (cam_periph_error(done_ccb, 0, 0, NULL) == ERESTART) return; - } if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { /* Don't wedge the queue */ - xpt_release_devq(path, /*count*/1, /*run_queue*/TRUE); + xpt_release_devq(done_ccb->ccb_h.path, /*count*/1, + /*run_queue*/TRUE); } status = done_ccb->ccb_h.status & CAM_STATUS_MASK; if (softc->restart) { @@ -771,7 +773,7 @@ noerror: } xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); - goto out; + return; } case PROBE_IDENTIFY: { @@ -806,7 +808,7 @@ noerror: PROBE_SET_ACTION(softc, PROBE_SPINUP); xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); - goto out; + return; } ident_buf = &path->device->ident_data; if ((periph->path->device->flags & CAM_DEV_UNCONFIGURED) == 0) { @@ -879,7 +881,7 @@ noerror: PROBE_SET_ACTION(softc, PROBE_SETMODE); xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); - goto out; + return; } case PROBE_SPINUP: if (bootverbose) @@ -888,7 +890,7 @@ noerror: PROBE_SET_ACTION(softc, PROBE_IDENTIFY); xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); - goto out; + return; case PROBE_SETMODE: if (path->device->transport != XPORT_SATA) goto notsata; @@ -933,7 +935,7 @@ noerror: PROBE_SET_ACTION(softc, PROBE_SETPM); xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); - goto out; + return; } /* FALLTHROUGH */ case PROBE_SETPM: @@ -944,7 +946,7 @@ noerror: PROBE_SET_ACTION(softc, PROBE_SETAPST); xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); - goto out; + return; } /* FALLTHROUGH */ case PROBE_SETAPST: @@ -954,7 +956,7 @@ noerror: PROBE_SET_ACTION(softc, PROBE_SETDMAAA); xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); - goto out; + return; } /* FALLTHROUGH */ case PROBE_SETDMAAA: @@ -964,7 +966,7 @@ noerror: PROBE_SET_ACTION(softc, PROBE_SETAN); xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); - goto out; + return; } /* FALLTHROUGH */ case PROBE_SETAN: @@ -976,14 +978,15 @@ notsata: } xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); - goto out; + return; case PROBE_SET_MULTI: if (periph->path->device->flags & CAM_DEV_UNCONFIGURED) { path->device->flags &= ~CAM_DEV_UNCONFIGURED; xpt_acquire_device(path->device); done_ccb->ccb_h.func_code = XPT_GDEV_TYPE; xpt_action(done_ccb); - xpt_async(AC_FOUND_DEVICE, path, done_ccb); + xpt_async(AC_FOUND_DEVICE, done_ccb->ccb_h.path, + done_ccb); } PROBE_SET_ACTION(softc, PROBE_DONE); break; @@ -1018,7 +1021,7 @@ notsata: PROBE_SET_ACTION(softc, PROBE_FULL_INQUIRY); xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); - goto out; + return; } ata_device_transport(path); @@ -1027,7 +1030,7 @@ notsata: xpt_acquire_device(path->device); done_ccb->ccb_h.func_code = XPT_GDEV_TYPE; xpt_action(done_ccb); - xpt_async(AC_FOUND_DEVICE, path, done_ccb); + xpt_async(AC_FOUND_DEVICE, done_ccb->ccb_h.path, done_ccb); } PROBE_SET_ACTION(softc, PROBE_DONE); break; @@ -1045,7 +1048,7 @@ notsata: PROBE_SET_ACTION(softc, PROBE_PM_PRV); xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); - goto out; + return; case PROBE_PM_PRV: softc->pm_prv = (done_ccb->ataio.res.lba_high << 24) + (done_ccb->ataio.res.lba_mid << 16) + @@ -1094,11 +1097,12 @@ notsata: xpt_acquire_device(path->device); done_ccb->ccb_h.func_code = XPT_GDEV_TYPE; xpt_action(done_ccb); - xpt_async(AC_FOUND_DEVICE, path, done_ccb); + xpt_async(AC_FOUND_DEVICE, done_ccb->ccb_h.path, + done_ccb); } else { done_ccb->ccb_h.func_code = XPT_GDEV_TYPE; xpt_action(done_ccb); - xpt_async(AC_SCSI_AEN, path, done_ccb); + xpt_async(AC_SCSI_AEN, done_ccb->ccb_h.path, done_ccb); } PROBE_SET_ACTION(softc, PROBE_DONE); break; @@ -1110,7 +1114,7 @@ done: softc->restart = 0; xpt_release_ccb(done_ccb); probeschedule(periph); - goto out; + return; } xpt_release_ccb(done_ccb); CAM_DEBUG(periph->path, CAM_DEBUG_PROBE, ("Probe completed\n")); @@ -1120,9 +1124,9 @@ done: done_ccb->ccb_h.status = found ? CAM_REQ_CMP : CAM_REQ_CMP_ERR; xpt_done(done_ccb); } - /* Drop freeze taken due to CAM_DEV_QFREEZE flag set. */ - cam_release_devq(path, 0, 0, 0, FALSE); cam_periph_invalidate(periph); + cam_release_devq(periph->path, + RELSIM_RELEASE_RUNLEVEL, 0, CAM_RL_XPT + 1, FALSE); cam_periph_release_locked(periph); } Modified: stable/8/sys/cam/cam.h ============================================================================== --- stable/8/sys/cam/cam.h Thu May 15 05:35:00 2014 (r266117) +++ stable/8/sys/cam/cam.h Thu May 15 09:55:21 2014 (r266118) @@ -80,15 +80,15 @@ typedef struct { #define CAM_PRIORITY_BUS ((CAM_RL_BUS << 8) + 0x80) #define CAM_PRIORITY_XPT ((CAM_RL_XPT << 8) + 0x80) #define CAM_PRIORITY_DEV ((CAM_RL_DEV << 8) + 0x80) -#define CAM_PRIORITY_OOB (CAM_RL_DEV << 8) #define CAM_PRIORITY_NORMAL ((CAM_RL_NORMAL << 8) + 0x80) #define CAM_PRIORITY_NONE (u_int32_t)-1 +#define CAM_PRIORITY_TO_RL(x) ((x) >> 8) +#define CAM_RL_TO_PRIORITY(x) ((x) << 8) u_int32_t generation; int index; #define CAM_UNQUEUED_INDEX -1 #define CAM_ACTIVE_INDEX -2 #define CAM_DONEQ_INDEX -3 -#define CAM_EXTRAQ_INDEX INT_MAX } cam_pinfo; /* Modified: stable/8/sys/cam/cam_ccb.h ============================================================================== --- stable/8/sys/cam/cam_ccb.h Thu May 15 05:35:00 2014 (r266117) +++ stable/8/sys/cam/cam_ccb.h Thu May 15 09:55:21 2014 (r266118) @@ -142,6 +142,8 @@ typedef enum { /* Path statistics (error counts, etc.) */ XPT_GDEV_STATS = 0x0c, /* Device statistics (error counts, etc.) */ + XPT_FREEZE_QUEUE = 0x0d, + /* Freeze device queue */ /* SCSI Control Functions: 0x10->0x1F */ XPT_ABORT = 0x10, /* Abort the specified CCB */ @@ -698,6 +700,7 @@ struct ccb_relsim { #define RELSIM_RELEASE_AFTER_TIMEOUT 0x02 #define RELSIM_RELEASE_AFTER_CMDCMPLT 0x04 #define RELSIM_RELEASE_AFTER_QEMPTY 0x08 +#define RELSIM_RELEASE_RUNLEVEL 0x10 u_int32_t openings; u_int32_t release_timeout; /* Abstract argument. */ u_int32_t qfrozen_cnt; Modified: stable/8/sys/cam/cam_periph.c ============================================================================== --- stable/8/sys/cam/cam_periph.c Thu May 15 05:35:00 2014 (r266117) +++ stable/8/sys/cam/cam_periph.c Thu May 15 09:55:21 2014 (r266118) @@ -998,12 +998,21 @@ cam_periph_runccb(union ccb *ccb, void cam_freeze_devq(struct cam_path *path) { - struct ccb_hdr ccb_h; - xpt_setup_ccb(&ccb_h, path, /*priority*/1); - ccb_h.func_code = XPT_NOOP; - ccb_h.flags = CAM_DEV_QFREEZE; - xpt_action((union ccb *)&ccb_h); + cam_freeze_devq_arg(path, 0, 0); +} + +void +cam_freeze_devq_arg(struct cam_path *path, uint32_t flags, uint32_t arg) +{ + struct ccb_relsim crs; + + xpt_setup_ccb(&crs.ccb_h, path, CAM_PRIORITY_NONE); + crs.ccb_h.func_code = XPT_FREEZE_QUEUE; + crs.release_flags = flags; + crs.openings = arg; + crs.release_timeout = arg; + xpt_action((union ccb *)&crs); } u_int32_t Modified: stable/8/sys/cam/cam_periph.h ============================================================================== --- stable/8/sys/cam/cam_periph.h Thu May 15 05:35:00 2014 (r266117) +++ stable/8/sys/cam/cam_periph.h Thu May 15 09:55:21 2014 (r266118) @@ -169,6 +169,8 @@ int cam_periph_ioctl(struct cam_periph cam_flags camflags, u_int32_t sense_flags)); void cam_freeze_devq(struct cam_path *path); +void cam_freeze_devq_arg(struct cam_path *path, u_int32_t flags, + uint32_t arg); u_int32_t cam_release_devq(struct cam_path *path, u_int32_t relsim_flags, u_int32_t opening_reduction, u_int32_t arg, int getcount_only); Modified: stable/8/sys/cam/cam_queue.c ============================================================================== --- stable/8/sys/cam/cam_queue.c Thu May 15 05:35:00 2014 (r266117) +++ stable/8/sys/cam/cam_queue.c Thu May 15 09:55:21 2014 (r266118) @@ -230,8 +230,15 @@ int cam_devq_init(struct cam_devq *devq, int devices, int openings) { bzero(devq, sizeof(*devq)); - if (camq_init(&devq->send_queue, devices) != 0) + if (camq_init(&devq->alloc_queue, devices) != 0) { return (1); + } + if (camq_init(&devq->send_queue, devices) != 0) { + camq_fini(&devq->alloc_queue); + return (1); + } + devq->alloc_openings = openings; + devq->alloc_active = 0; devq->send_openings = openings; devq->send_active = 0; return (0); @@ -240,6 +247,7 @@ cam_devq_init(struct cam_devq *devq, int void cam_devq_free(struct cam_devq *devq) { + camq_fini(&devq->alloc_queue); camq_fini(&devq->send_queue); free(devq, M_CAMDEVQ); } @@ -249,7 +257,11 @@ cam_devq_resize(struct cam_devq *camq, i { u_int32_t retval; - retval = camq_resize(&camq->send_queue, devices); + retval = camq_resize(&camq->alloc_queue, devices); + + if (retval == CAM_REQ_CMP) + retval = camq_resize(&camq->send_queue, devices); + return (retval); } @@ -284,27 +296,43 @@ u_int32_t cam_ccbq_resize(struct cam_ccbq *ccbq, int new_size) { int delta; + int space_left; delta = new_size - (ccbq->dev_active + ccbq->dev_openings); - ccbq->devq_openings += delta; - ccbq->dev_openings += delta; - - new_size = imax(64, 1 << fls(new_size + new_size / 2)); - if (new_size > ccbq->queue.array_size) - return (camq_resize(&ccbq->queue, new_size)); - else + space_left = new_size + - ccbq->queue.entries + - ccbq->held + - ccbq->dev_active; + + /* + * Only attempt to change the underlying queue size if we are + * shrinking it and there is space for all outstanding entries + * in the new array or we have been requested to grow the array. + * We don't fail in the case where we can't reduce the array size, + * but clients that care that the queue be "garbage collected" + * should detect this condition and call us again with the + * same size once the outstanding entries have been processed. + */ + if (space_left < 0 + || camq_resize(&ccbq->queue, new_size + (CAM_RL_VALUES - 1)) == + CAM_REQ_CMP) { + ccbq->devq_openings += delta; + ccbq->dev_openings += delta; return (CAM_REQ_CMP); + } else { + return (CAM_RESRC_UNAVAIL); + } } int cam_ccbq_init(struct cam_ccbq *ccbq, int openings) { bzero(ccbq, sizeof(*ccbq)); - if (camq_init(&ccbq->queue, - imax(64, 1 << fls(openings + openings / 2))) != 0) + if (camq_init(&ccbq->queue, openings + (CAM_RL_VALUES - 1)) != 0) { return (1); + } ccbq->devq_openings = openings; - ccbq->dev_openings = openings; + ccbq->dev_openings = openings; return (0); } Modified: stable/8/sys/cam/cam_queue.h ============================================================================== --- stable/8/sys/cam/cam_queue.h Thu May 15 05:35:00 2014 (r266117) +++ stable/8/sys/cam/cam_queue.h Thu May 15 09:55:21 2014 (r266118) @@ -48,7 +48,7 @@ struct camq { int array_size; int entries; u_int32_t generation; - u_int32_t qfrozen_cnt; + u_int32_t qfrozen_cnt[CAM_RL_VALUES]; }; TAILQ_HEAD(ccb_hdr_tailq, ccb_hdr); @@ -57,11 +57,8 @@ SLIST_HEAD(ccb_hdr_slist, ccb_hdr); struct cam_ccbq { struct camq queue; - struct ccb_hdr_tailq queue_extra_head; - int queue_extra_entries; int devq_openings; - int devq_allocating; - int dev_openings; + int dev_openings; int dev_active; int held; }; @@ -69,7 +66,11 @@ struct cam_ccbq { struct cam_ed; struct cam_devq { + struct camq alloc_queue; struct camq send_queue; + struct cam_ed *active_dev; + int alloc_openings; + int alloc_active; int send_openings; int send_active; }; @@ -157,10 +158,10 @@ cam_ccbq_pending_ccb_count(struct cam_cc static __inline void cam_ccbq_take_opening(struct cam_ccbq *ccbq); -static __inline void +static __inline int cam_ccbq_insert_ccb(struct cam_ccbq *ccbq, union ccb *new_ccb); -static __inline void +static __inline int cam_ccbq_remove_ccb(struct cam_ccbq *ccbq, union ccb *ccb); static __inline union ccb * @@ -179,7 +180,7 @@ cam_ccbq_release_opening(struct cam_ccbq static __inline int cam_ccbq_pending_ccb_count(struct cam_ccbq *ccbq) { - return (ccbq->queue.entries + ccbq->queue_extra_entries); + return (ccbq->queue.entries); } static __inline void @@ -189,64 +190,31 @@ cam_ccbq_take_opening(struct cam_ccbq *c ccbq->held++; } -static __inline void +static __inline int cam_ccbq_insert_ccb(struct cam_ccbq *ccbq, union ccb *new_ccb) { - struct ccb_hdr *old_ccb; - struct camq *queue = &ccbq->queue; - ccbq->held--; - - /* - * If queue is already full, try to resize. - * If resize fail, push CCB with lowest priority out to the TAILQ. - */ - if (queue->entries == queue->array_size && - camq_resize(&ccbq->queue, queue->array_size * 2) != CAM_REQ_CMP) { - old_ccb = (struct ccb_hdr *)camq_remove(queue, queue->entries); - TAILQ_INSERT_HEAD(&ccbq->queue_extra_head, old_ccb, - xpt_links.tqe); - old_ccb->pinfo.index = CAM_EXTRAQ_INDEX; - ccbq->queue_extra_entries++; - } - - camq_insert(queue, &new_ccb->ccb_h.pinfo); + camq_insert(&ccbq->queue, &new_ccb->ccb_h.pinfo); + if (ccbq->queue.qfrozen_cnt[CAM_PRIORITY_TO_RL( + new_ccb->ccb_h.pinfo.priority)] > 0) { + ccbq->devq_openings++; + ccbq->held++; + return (1); + } else + return (0); } -static __inline void +static __inline int cam_ccbq_remove_ccb(struct cam_ccbq *ccbq, union ccb *ccb) { - struct ccb_hdr *cccb, *bccb; - struct camq *queue = &ccbq->queue; - - /* If the CCB is on the TAILQ, remove it from there. */ - if (ccb->ccb_h.pinfo.index == CAM_EXTRAQ_INDEX) { - TAILQ_REMOVE(&ccbq->queue_extra_head, &ccb->ccb_h, - xpt_links.tqe); - ccb->ccb_h.pinfo.index = CAM_UNQUEUED_INDEX; - ccbq->queue_extra_entries--; - return; - } - - camq_remove(queue, ccb->ccb_h.pinfo.index); - - /* - * If there are some CCBs on TAILQ, find the best one and move it - * to the emptied space in the queue. - */ - bccb = TAILQ_FIRST(&ccbq->queue_extra_head); - if (bccb == NULL) - return; - TAILQ_FOREACH(cccb, &ccbq->queue_extra_head, xpt_links.tqe) { - if (bccb->pinfo.priority > cccb->pinfo.priority || - (bccb->pinfo.priority == cccb->pinfo.priority && - GENERATIONCMP(bccb->pinfo.generation, >, - cccb->pinfo.generation))) - bccb = cccb; - } - TAILQ_REMOVE(&ccbq->queue_extra_head, bccb, xpt_links.tqe); - ccbq->queue_extra_entries--; - camq_insert(queue, &bccb->pinfo); + camq_remove(&ccbq->queue, ccb->ccb_h.pinfo.index); + if (ccbq->queue.qfrozen_cnt[CAM_PRIORITY_TO_RL( + ccb->ccb_h.pinfo.priority)] > 0) { + ccbq->devq_openings--; + ccbq->held--; + return (1); + } else + return (0); } static __inline union ccb * @@ -280,5 +248,81 @@ cam_ccbq_release_opening(struct cam_ccbq ccbq->devq_openings++; } +static __inline int +cam_ccbq_freeze(struct cam_ccbq *ccbq, cam_rl rl, u_int32_t cnt) +{ + int i, frozen = 0; + cam_rl p, n; + + /* Find pevious run level. */ + for (p = 0; p < CAM_RL_VALUES && ccbq->queue.qfrozen_cnt[p] == 0; p++); + /* Find new run level. */ + n = min(rl, p); + /* Apply new run level. */ + for (i = rl; i < CAM_RL_VALUES; i++) + ccbq->queue.qfrozen_cnt[i] += cnt; + /* Update ccbq statistics. */ + if (n == p) + return (0); + for (i = CAMQ_HEAD; i <= ccbq->queue.entries; i++) { + cam_rl rrl = + CAM_PRIORITY_TO_RL(ccbq->queue.queue_array[i]->priority); + if (rrl < n) + continue; + if (rrl >= p) + break; + ccbq->devq_openings++; + ccbq->held++; + frozen++; + } + return (frozen); +} + +static __inline int +cam_ccbq_release(struct cam_ccbq *ccbq, cam_rl rl, u_int32_t cnt) +{ + int i, released = 0; + cam_rl p, n; + + /* Apply new run level. */ + for (i = rl; i < CAM_RL_VALUES; i++) + ccbq->queue.qfrozen_cnt[i] -= cnt; + /* Find new run level. */ + for (n = 0; n < CAM_RL_VALUES && ccbq->queue.qfrozen_cnt[n] == 0; n++); + /* Find previous run level. */ + p = min(rl, n); + /* Update ccbq statistics. */ + if (n == p) + return (0); + for (i = CAMQ_HEAD; i <= ccbq->queue.entries; i++) { + cam_rl rrl = + CAM_PRIORITY_TO_RL(ccbq->queue.queue_array[i]->priority); + if (rrl < p) + continue; + if (rrl >= n) + break; + ccbq->devq_openings--; + ccbq->held--; + released++; + } + return (released); +} + +static __inline u_int32_t +cam_ccbq_frozen(struct cam_ccbq *ccbq, cam_rl rl) +{ + + return (ccbq->queue.qfrozen_cnt[rl]); +} + +static __inline u_int32_t +cam_ccbq_frozen_top(struct cam_ccbq *ccbq) +{ + cam_rl rl; + + rl = CAM_PRIORITY_TO_RL(CAMQ_GET_PRIO(&ccbq->queue)); + return (ccbq->queue.qfrozen_cnt[rl]); +} + #endif /* _KERNEL */ #endif /* _CAM_CAM_QUEUE_H */ Modified: stable/8/sys/cam/cam_xpt.c ============================================================================== --- stable/8/sys/cam/cam_xpt.c Thu May 15 05:35:00 2014 (r266117) +++ stable/8/sys/cam/cam_xpt.c Thu May 15 09:55:21 2014 (r266118) @@ -96,7 +96,7 @@ struct xpt_softc { u_int32_t xpt_generation; /* number of high powered commands that can go through right now */ - STAILQ_HEAD(highpowerlist, cam_ed) highpowerq; + STAILQ_HEAD(highpowerlist, ccb_hdr) highpowerq; int num_highpower; /* queue for handling async rescan requests. */ @@ -221,13 +221,13 @@ static void xpt_async_bcast(struct asyn static path_id_t xptnextfreepathid(void); static path_id_t xptpathid(const char *sim_name, int sim_unit, int sim_bus); static union ccb *xpt_get_ccb(struct cam_ed *device); -static void xpt_run_dev_allocq(struct cam_ed *device); -static void xpt_run_devq(struct cam_devq *devq); +static void xpt_run_dev_allocq(struct cam_eb *bus); +static void xpt_run_dev_sendq(struct cam_eb *bus); static timeout_t xpt_release_devq_timeout; static void xpt_release_simq_timeout(void *arg) __unused; static void xpt_release_bus(struct cam_eb *bus); -static void xpt_release_devq_device(struct cam_ed *dev, u_int count, - int run_queue); +static void xpt_release_devq_device(struct cam_ed *dev, cam_rl rl, + u_int count, int run_queue); static struct cam_et* xpt_alloc_target(struct cam_eb *bus, target_id_t target_id); static void xpt_release_target(struct cam_et *target); @@ -297,24 +297,49 @@ static xpt_busfunc_t xptsetasyncbusfunc; static cam_status xptregister(struct cam_periph *periph, void *arg); static __inline int periph_is_queued(struct cam_periph *periph); -static __inline int device_is_queued(struct cam_ed *device); +static __inline int device_is_alloc_queued(struct cam_ed *device); +static __inline int device_is_send_queued(struct cam_ed *device); static __inline int -xpt_schedule_devq(struct cam_devq *devq, struct cam_ed *dev) +xpt_schedule_dev_allocq(struct cam_eb *bus, struct cam_ed *dev) +{ + int retval; + + if ((dev->drvq.entries > 0) && + (dev->ccbq.devq_openings > 0) && + (cam_ccbq_frozen(&dev->ccbq, CAM_PRIORITY_TO_RL( + CAMQ_GET_PRIO(&dev->drvq))) == 0)) { + /* + * The priority of a device waiting for CCB resources + * is that of the highest priority peripheral driver + * enqueued. + */ + retval = xpt_schedule_dev(&bus->sim->devq->alloc_queue, + &dev->alloc_ccb_entry.pinfo, + CAMQ_GET_PRIO(&dev->drvq)); + } else { + retval = 0; + } + + return (retval); +} + +static __inline int +xpt_schedule_dev_sendq(struct cam_eb *bus, struct cam_ed *dev) { int retval; if ((dev->ccbq.queue.entries > 0) && (dev->ccbq.dev_openings > 0) && - (dev->ccbq.queue.qfrozen_cnt == 0)) { + (cam_ccbq_frozen_top(&dev->ccbq) == 0)) { /* * The priority of a device waiting for controller * resources is that of the highest priority CCB * enqueued. */ retval = - xpt_schedule_dev(&devq->send_queue, - &dev->devq_entry.pinfo, + xpt_schedule_dev(&bus->sim->devq->send_queue, + &dev->send_ccb_entry.pinfo, CAMQ_GET_PRIO(&dev->ccbq.queue)); } else { retval = 0; @@ -329,9 +354,15 @@ periph_is_queued(struct cam_periph *peri } static __inline int -device_is_queued(struct cam_ed *device) +device_is_alloc_queued(struct cam_ed *device) { - return (device->devq_entry.pinfo.index != CAM_UNQUEUED_INDEX); + return (device->alloc_ccb_entry.pinfo.index != CAM_UNQUEUED_INDEX); +} + +static __inline int +device_is_send_queued(struct cam_ed *device) +{ + return (device->send_ccb_entry.pinfo.index != CAM_UNQUEUED_INDEX); } static void @@ -2456,10 +2487,17 @@ xpt_action_default(union ccb *start_ccb) /* FALLTHROUGH */ case XPT_RESET_DEV: case XPT_ENG_EXEC: - cam_ccbq_insert_ccb(&path->device->ccbq, start_ccb); - if (xpt_schedule_devq(path->bus->sim->devq, path->device)) - xpt_run_devq(path->bus->sim->devq); + { + int frozen; + + frozen = cam_ccbq_insert_ccb(&path->device->ccbq, start_ccb); + path->device->sim->devq->alloc_openings += frozen; + if (frozen > 0) + xpt_run_dev_allocq(path->bus); + if (xpt_schedule_dev_sendq(path->bus, path->device)) + xpt_run_dev_sendq(path->bus); break; + } case XPT_CALC_GEOMETRY: { struct cam_sim *sim; @@ -2508,7 +2546,8 @@ xpt_action_default(union ccb *start_ccb) device = abort_ccb->ccb_h.path->device; ccbq = &device->ccbq; - cam_ccbq_remove_ccb(ccbq, abort_ccb); + device->sim->devq->alloc_openings -= + cam_ccbq_remove_ccb(ccbq, abort_ccb); abort_ccb->ccb_h.status = CAM_REQ_ABORTED|CAM_DEV_QFRZN; xpt_freeze_devq(abort_ccb->ccb_h.path, 1); @@ -2616,7 +2655,7 @@ xpt_action_default(union ccb *start_ccb) cgds->dev_openings = dev->ccbq.dev_openings; cgds->dev_active = dev->ccbq.dev_active; cgds->devq_openings = dev->ccbq.devq_openings; - cgds->devq_queued = cam_ccbq_pending_ccb_count(&dev->ccbq); + cgds->devq_queued = dev->ccbq.queue.entries; cgds->held = dev->ccbq.held; cgds->last_reset = tar->last_reset; cgds->maxtags = dev->maxtags; @@ -2883,9 +2922,13 @@ xpt_action_default(union ccb *start_ccb) } } - if ((start_ccb->ccb_h.flags & CAM_DEV_QFREEZE) == 0) - xpt_release_devq(path, /*count*/1, /*run_queue*/TRUE); - start_ccb->crs.qfrozen_cnt = dev->ccbq.queue.qfrozen_cnt; + if ((start_ccb->ccb_h.flags & CAM_DEV_QFREEZE) == 0) { + xpt_release_devq_rl(path, /*runlevel*/ + (crs->release_flags & RELSIM_RELEASE_RUNLEVEL) ? + crs->release_timeout : 0, + /*count*/1, /*run_queue*/TRUE); + } + start_ccb->crs.qfrozen_cnt = dev->ccbq.queue.qfrozen_cnt[0]; start_ccb->ccb_h.status = CAM_REQ_CMP; break; } @@ -2920,6 +2963,16 @@ xpt_action_default(union ccb *start_ccb) } break; } + case XPT_FREEZE_QUEUE: + { + struct ccb_relsim *crs = &start_ccb->crs; + + xpt_freeze_devq_rl(path, /*runlevel*/ + (crs->release_flags & RELSIM_RELEASE_RUNLEVEL) ? + crs->release_timeout : 0, /*count*/1); + start_ccb->ccb_h.status = CAM_REQ_CMP; + break; + } case XPT_NOOP: if ((start_ccb->ccb_h.flags & CAM_DEV_QFREEZE) != 0) xpt_freeze_devq(path, 1); @@ -3023,7 +3076,7 @@ xpt_schedule(struct cam_periph *perph, u camq_change_priority(&device->drvq, perph->pinfo.index, new_priority); - runq = 1; + runq = xpt_schedule_dev_allocq(perph->path->bus, device); } } else { /* New entry on the queue */ @@ -3032,12 +3085,12 @@ xpt_schedule(struct cam_periph *perph, u perph->pinfo.priority = new_priority; perph->pinfo.generation = ++device->drvq.generation; camq_insert(&device->drvq, &perph->pinfo); - runq = 1; + runq = xpt_schedule_dev_allocq(perph->path->bus, device); } if (runq != 0) { CAM_DEBUG(perph->path, CAM_DEBUG_SUBTRACE, - (" calling xpt_run_dev_allocq\n")); - xpt_run_dev_allocq(device); + (" calling xpt_run_devq\n")); + xpt_run_dev_allocq(perph->path->bus); } } @@ -3090,25 +3143,43 @@ xpt_schedule_dev(struct camq *queue, cam } static void -xpt_run_dev_allocq(struct cam_ed *device) +xpt_run_dev_allocq(struct cam_eb *bus) { - struct camq *drvq; + struct cam_devq *devq; - if (device->ccbq.devq_allocating) - return; - device->ccbq.devq_allocating = 1; - CAM_DEBUG_PRINT(CAM_DEBUG_XPT, ("xpt_run_dev_allocq(%p)\n", device)); - drvq = &device->drvq; - while ((drvq->entries > 0) && - (device->ccbq.devq_openings > 0 || - CAMQ_GET_PRIO(drvq) <= CAM_PRIORITY_OOB) && - (device->ccbq.queue.qfrozen_cnt == 0)) { + CAM_DEBUG_PRINT(CAM_DEBUG_XPT, ("xpt_run_dev_allocq\n")); + devq = bus->sim->devq; + + CAM_DEBUG_PRINT(CAM_DEBUG_XPT, + (" qfrozen_cnt == 0x%x, entries == %d, " + "openings == %d, active == %d\n", + devq->alloc_queue.qfrozen_cnt[0], + devq->alloc_queue.entries, + devq->alloc_openings, + devq->alloc_active)); + + devq->alloc_queue.qfrozen_cnt[0]++; + while ((devq->alloc_queue.entries > 0) + && (devq->alloc_openings > 0) + && (devq->alloc_queue.qfrozen_cnt[0] <= 1)) { + struct cam_ed_qinfo *qinfo; + struct cam_ed *device; union ccb *work_ccb; struct cam_periph *drv; + struct camq *drvq; + + qinfo = (struct cam_ed_qinfo *)camq_remove(&devq->alloc_queue, + CAMQ_HEAD); + device = qinfo->device; + CAM_DEBUG_PRINT(CAM_DEBUG_XPT, + ("running device %p\n", device)); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu May 15 12:39:29 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE84522E; Thu, 15 May 2014 12:39:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA623236D; Thu, 15 May 2014 12:39:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FCdSbc068405; Thu, 15 May 2014 12:39:28 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FCdSOD068403; Thu, 15 May 2014 12:39:28 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201405151239.s4FCdSOD068403@svn.freebsd.org> From: Steven Hartland Date: Thu, 15 May 2014 12:39:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266122 - in stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 12:39:29 -0000 Author: smh Date: Thu May 15 12:39:28 2014 New Revision: 266122 URL: http://svnweb.freebsd.org/changeset/base/266122 Log: MFC r264850 Add the ability to set a minimum ashift size for ZFS pool creation or root level vdev addition. Change max_auto_ashift sysctl to error when an invalid value is requested instead of silently limiting it. Sponsored by: Multiplay Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Thu May 15 11:30:17 2014 (r266121) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Thu May 15 12:39:28 2014 (r266122) @@ -106,7 +106,7 @@ _NOTE(CONSTCOND) } while (0) #define SPA_BLOCKSIZES (SPA_MAXBLOCKSHIFT - SPA_MINBLOCKSHIFT + 1) /* - * Maximum supported logical ashift. + * Default maximum supported logical ashift. * * The current 8k allocation block size limit is due to the 8k * aligned/sized operations performed by vdev_probe() on @@ -117,6 +117,11 @@ _NOTE(CONSTCOND) } while (0) #define SPA_MAXASHIFT 13 /* + * Default minimum supported logical ashift. + */ +#define SPA_MINASHIFT SPA_MINBLOCKSHIFT + +/* * Size of block to hold the configuration data (a packed nvlist) */ #define SPA_CONFIG_BLOCKSIZE (1ULL << 14) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Thu May 15 11:30:17 2014 (r266121) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Thu May 15 12:39:28 2014 (r266122) @@ -53,7 +53,7 @@ SYSCTL_NODE(_vfs_zfs, OID_AUTO, vdev, CT * Virtual device management. */ -/** +/* * The limit for ZFS to automatically increase a top-level vdev's ashift * from logical ashift to physical ashift. * @@ -61,19 +61,34 @@ SYSCTL_NODE(_vfs_zfs, OID_AUTO, vdev, CT * child->vdev_ashift = 9 (512 bytes) * child->vdev_physical_ashift = 12 (4096 bytes) * zfs_max_auto_ashift = 11 (2048 bytes) + * zfs_min_auto_ashift = 9 (512 bytes) * - * On pool creation or the addition of a new top-leve vdev, ZFS will - * bump the ashift of the top-level vdev to 2048. + * On pool creation or the addition of a new top-level vdev, ZFS will + * increase the ashift of the top-level vdev to 2048 as limited by + * zfs_max_auto_ashift. * * Example: one or more 512B emulation child vdevs * child->vdev_ashift = 9 (512 bytes) * child->vdev_physical_ashift = 12 (4096 bytes) * zfs_max_auto_ashift = 13 (8192 bytes) + * zfs_min_auto_ashift = 9 (512 bytes) + * + * On pool creation or the addition of a new top-level vdev, ZFS will + * increase the ashift of the top-level vdev to 4096 to match the + * max vdev_physical_ashift. * - * On pool creation or the addition of a new top-leve vdev, ZFS will - * bump the ashift of the top-level vdev to 4096. + * Example: one or more 512B emulation child vdevs + * child->vdev_ashift = 9 (512 bytes) + * child->vdev_physical_ashift = 9 (512 bytes) + * zfs_max_auto_ashift = 13 (8192 bytes) + * zfs_min_auto_ashift = 12 (4096 bytes) + * + * On pool creation or the addition of a new top-level vdev, ZFS will + * increase the ashift of the top-level vdev to 4096 to match the + * zfs_min_auto_ashift. */ static uint64_t zfs_max_auto_ashift = SPA_MAXASHIFT; +static uint64_t zfs_min_auto_ashift = SPA_MINASHIFT; static int sysctl_vfs_zfs_max_auto_ashift(SYSCTL_HANDLER_ARGS) @@ -86,8 +101,8 @@ sysctl_vfs_zfs_max_auto_ashift(SYSCTL_HA if (err != 0 || req->newptr == NULL) return (err); - if (val > SPA_MAXASHIFT) - val = SPA_MAXASHIFT; + if (val > SPA_MAXASHIFT || val < zfs_min_auto_ashift) + return (EINVAL); zfs_max_auto_ashift = val; @@ -96,7 +111,31 @@ sysctl_vfs_zfs_max_auto_ashift(SYSCTL_HA SYSCTL_PROC(_vfs_zfs, OID_AUTO, max_auto_ashift, CTLTYPE_U64 | CTLFLAG_MPSAFE | CTLFLAG_RW, 0, sizeof(uint64_t), sysctl_vfs_zfs_max_auto_ashift, "QU", - "Cap on logical -> physical ashift adjustment on new top-level vdevs."); + "Max ashift used when optimising for logical -> physical sectors size on " + "new top-level vdevs."); + +static int +sysctl_vfs_zfs_min_auto_ashift(SYSCTL_HANDLER_ARGS) +{ + uint64_t val; + int err; + + val = zfs_min_auto_ashift; + err = sysctl_handle_64(oidp, &val, 0, req); + if (err != 0 || req->newptr == NULL) + return (err); + + if (val < SPA_MINASHIFT || val > zfs_max_auto_ashift) + return (EINVAL); + + zfs_min_auto_ashift = val; + + return (0); +} +SYSCTL_PROC(_vfs_zfs, OID_AUTO, min_auto_ashift, + CTLTYPE_U64 | CTLFLAG_MPSAFE | CTLFLAG_RW, 0, sizeof(uint64_t), + sysctl_vfs_zfs_min_auto_ashift, "QU", + "Min ashift used when creating new top-level vdevs."); static vdev_ops_t *vdev_ops_table[] = { &vdev_root_ops, @@ -1631,19 +1670,30 @@ vdev_metaslab_set_size(vdev_t *vd) } /* - * Maximize performance by inflating the configured ashift for - * top level vdevs to be as close to the physical ashift as - * possible without exceeding the administrator specified - * limit. + * Maximize performance by inflating the configured ashift for top level + * vdevs to be as close to the physical ashift as possible while maintaining + * administrator defined limits and ensuring it doesn't go below the + * logical ashift. */ void vdev_ashift_optimize(vdev_t *vd) { - if (vd == vd->vdev_top && - (vd->vdev_ashift < vd->vdev_physical_ashift) && - (vd->vdev_ashift < zfs_max_auto_ashift)) { - vd->vdev_ashift = MIN(zfs_max_auto_ashift, - vd->vdev_physical_ashift); + if (vd == vd->vdev_top) { + if (vd->vdev_ashift < vd->vdev_physical_ashift) { + vd->vdev_ashift = MIN( + MAX(zfs_max_auto_ashift, vd->vdev_ashift), + MAX(zfs_min_auto_ashift, vd->vdev_physical_ashift)); + } else { + /* + * Unusual case where logical ashift > physical ashift + * so we can't cap the calculated ashift based on max + * ashift as that would cause failures. + * We still check if we need to increase it to match + * the min ashift. + */ + vd->vdev_ashift = MAX(zfs_min_auto_ashift, + vd->vdev_ashift); + } } } From owner-svn-src-stable@FreeBSD.ORG Thu May 15 12:44:00 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E94705F4; Thu, 15 May 2014 12:44:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5735241F; Thu, 15 May 2014 12:44:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FCi0sH072257; Thu, 15 May 2014 12:44:00 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FCi04k072254; Thu, 15 May 2014 12:44:00 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201405151244.s4FCi04k072254@svn.freebsd.org> From: Steven Hartland Date: Thu, 15 May 2014 12:44:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266123 - in stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 12:44:01 -0000 Author: smh Date: Thu May 15 12:44:00 2014 New Revision: 266123 URL: http://svnweb.freebsd.org/changeset/base/266123 Log: MFC r264850 Add the ability to set a minimum ashift size for ZFS pool creation or root level vdev addition. Change max_auto_ashift sysctl to error when an invalid value is requested instead of silently limiting it. Sponsored by: Multiplay Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Thu May 15 12:39:28 2014 (r266122) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Thu May 15 12:44:00 2014 (r266123) @@ -106,7 +106,7 @@ _NOTE(CONSTCOND) } while (0) #define SPA_BLOCKSIZES (SPA_MAXBLOCKSHIFT - SPA_MINBLOCKSHIFT + 1) /* - * Maximum supported logical ashift. + * Default maximum supported logical ashift. * * The current 8k allocation block size limit is due to the 8k * aligned/sized operations performed by vdev_probe() on @@ -117,6 +117,11 @@ _NOTE(CONSTCOND) } while (0) #define SPA_MAXASHIFT 13 /* + * Default minimum supported logical ashift. + */ +#define SPA_MINASHIFT SPA_MINBLOCKSHIFT + +/* * Size of block to hold the configuration data (a packed nvlist) */ #define SPA_CONFIG_BLOCKSIZE (1ULL << 14) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Thu May 15 12:39:28 2014 (r266122) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Thu May 15 12:44:00 2014 (r266123) @@ -53,7 +53,7 @@ SYSCTL_NODE(_vfs_zfs, OID_AUTO, vdev, CT * Virtual device management. */ -/** +/* * The limit for ZFS to automatically increase a top-level vdev's ashift * from logical ashift to physical ashift. * @@ -61,19 +61,34 @@ SYSCTL_NODE(_vfs_zfs, OID_AUTO, vdev, CT * child->vdev_ashift = 9 (512 bytes) * child->vdev_physical_ashift = 12 (4096 bytes) * zfs_max_auto_ashift = 11 (2048 bytes) + * zfs_min_auto_ashift = 9 (512 bytes) * - * On pool creation or the addition of a new top-leve vdev, ZFS will - * bump the ashift of the top-level vdev to 2048. + * On pool creation or the addition of a new top-level vdev, ZFS will + * increase the ashift of the top-level vdev to 2048 as limited by + * zfs_max_auto_ashift. * * Example: one or more 512B emulation child vdevs * child->vdev_ashift = 9 (512 bytes) * child->vdev_physical_ashift = 12 (4096 bytes) * zfs_max_auto_ashift = 13 (8192 bytes) + * zfs_min_auto_ashift = 9 (512 bytes) + * + * On pool creation or the addition of a new top-level vdev, ZFS will + * increase the ashift of the top-level vdev to 4096 to match the + * max vdev_physical_ashift. * - * On pool creation or the addition of a new top-leve vdev, ZFS will - * bump the ashift of the top-level vdev to 4096. + * Example: one or more 512B emulation child vdevs + * child->vdev_ashift = 9 (512 bytes) + * child->vdev_physical_ashift = 9 (512 bytes) + * zfs_max_auto_ashift = 13 (8192 bytes) + * zfs_min_auto_ashift = 12 (4096 bytes) + * + * On pool creation or the addition of a new top-level vdev, ZFS will + * increase the ashift of the top-level vdev to 4096 to match the + * zfs_min_auto_ashift. */ static uint64_t zfs_max_auto_ashift = SPA_MAXASHIFT; +static uint64_t zfs_min_auto_ashift = SPA_MINASHIFT; static int sysctl_vfs_zfs_max_auto_ashift(SYSCTL_HANDLER_ARGS) @@ -86,8 +101,8 @@ sysctl_vfs_zfs_max_auto_ashift(SYSCTL_HA if (err != 0 || req->newptr == NULL) return (err); - if (val > SPA_MAXASHIFT) - val = SPA_MAXASHIFT; + if (val > SPA_MAXASHIFT || val < zfs_min_auto_ashift) + return (EINVAL); zfs_max_auto_ashift = val; @@ -96,7 +111,31 @@ sysctl_vfs_zfs_max_auto_ashift(SYSCTL_HA SYSCTL_PROC(_vfs_zfs, OID_AUTO, max_auto_ashift, CTLTYPE_U64 | CTLFLAG_MPSAFE | CTLFLAG_RW, 0, sizeof(uint64_t), sysctl_vfs_zfs_max_auto_ashift, "QU", - "Cap on logical -> physical ashift adjustment on new top-level vdevs."); + "Max ashift used when optimising for logical -> physical sectors size on " + "new top-level vdevs."); + +static int +sysctl_vfs_zfs_min_auto_ashift(SYSCTL_HANDLER_ARGS) +{ + uint64_t val; + int err; + + val = zfs_min_auto_ashift; + err = sysctl_handle_64(oidp, &val, 0, req); + if (err != 0 || req->newptr == NULL) + return (err); + + if (val < SPA_MINASHIFT || val > zfs_max_auto_ashift) + return (EINVAL); + + zfs_min_auto_ashift = val; + + return (0); +} +SYSCTL_PROC(_vfs_zfs, OID_AUTO, min_auto_ashift, + CTLTYPE_U64 | CTLFLAG_MPSAFE | CTLFLAG_RW, 0, sizeof(uint64_t), + sysctl_vfs_zfs_min_auto_ashift, "QU", + "Min ashift used when creating new top-level vdevs."); static vdev_ops_t *vdev_ops_table[] = { &vdev_root_ops, @@ -1631,19 +1670,30 @@ vdev_metaslab_set_size(vdev_t *vd) } /* - * Maximize performance by inflating the configured ashift for - * top level vdevs to be as close to the physical ashift as - * possible without exceeding the administrator specified - * limit. + * Maximize performance by inflating the configured ashift for top level + * vdevs to be as close to the physical ashift as possible while maintaining + * administrator defined limits and ensuring it doesn't go below the + * logical ashift. */ void vdev_ashift_optimize(vdev_t *vd) { - if (vd == vd->vdev_top && - (vd->vdev_ashift < vd->vdev_physical_ashift) && - (vd->vdev_ashift < zfs_max_auto_ashift)) { - vd->vdev_ashift = MIN(zfs_max_auto_ashift, - vd->vdev_physical_ashift); + if (vd == vd->vdev_top) { + if (vd->vdev_ashift < vd->vdev_physical_ashift) { + vd->vdev_ashift = MIN( + MAX(zfs_max_auto_ashift, vd->vdev_ashift), + MAX(zfs_min_auto_ashift, vd->vdev_physical_ashift)); + } else { + /* + * Unusual case where logical ashift > physical ashift + * so we can't cap the calculated ashift based on max + * ashift as that would cause failures. + * We still check if we need to increase it to match + * the min ashift. + */ + vd->vdev_ashift = MAX(zfs_min_auto_ashift, + vd->vdev_ashift); + } } } From owner-svn-src-stable@FreeBSD.ORG Thu May 15 14:26:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 83F2CD3E; Thu, 15 May 2014 14:26:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E7772D90; Thu, 15 May 2014 14:26:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FEQEuI018851; Thu, 15 May 2014 14:26:14 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FEQCio018830; Thu, 15 May 2014 14:26:12 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405151426.s4FEQCio018830@svn.freebsd.org> From: Ian Lepore Date: Thu, 15 May 2014 14:26:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266128 - in stable/10/sys: arm/arm arm/mv conf dev/fdt dev/ofw mips/beri powerpc/ofw powerpc/powerpc powerpc/pseries X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 14:26:14 -0000 Author: ian Date: Thu May 15 14:26:11 2014 New Revision: 266128 URL: http://svnweb.freebsd.org/changeset/base/266128 Log: MFC r261351, r261352, r261355, r261396, r261397, r261398, r261403, r261404, r261405 Open Firmware interrupt specifiers can consist of arbitrary-length byte strings and include arbitrary information (IRQ line/domain/sense). When the ofw_bus_map_intr() API was introduced, it assumed that, as on most systems, these were either 1 cell, containing an interrupt line, or 2, containing a line number plus a sense code. It turns out a non-negligible number of ARM systems use 3 (or even 4!) cells for interrupts, so make this more general. Provide a simpler and more standards-compliant simplebus implementation to get the Routerboard 800 up and running with the vendor device tree. This does not implement some BERI-specific features (which hopefully won't be necessary soon), so move the old code to mips/beri, with a higher attach priority when built, until MIPS interrupt domain support is rearranged. Allow nesting of simplebuses. Add a set of helpers (ofw_bus_get_status() and ofw_bus_status_okay()) to process "status" properties of OF nodes. Fix one remnant endian flaw in nexus. Added: stable/10/sys/mips/beri/beri_simplebus.c - copied unchanged from r261352, head/sys/mips/beri/beri_simplebus.c - copied unchanged from r261352, head/sys/mips/beri/fdt_ic_if.m Directory Properties: stable/10/sys/mips/beri/fdt_ic_if.m (props changed) Deleted: stable/10/sys/dev/fdt/fdt_ic_if.m Modified: stable/10/sys/arm/arm/nexus.c stable/10/sys/arm/mv/mv_pci.c stable/10/sys/conf/files stable/10/sys/dev/fdt/fdt_common.c stable/10/sys/dev/fdt/simplebus.c stable/10/sys/dev/ofw/ofw_bus.h stable/10/sys/dev/ofw/ofw_bus_if.m stable/10/sys/dev/ofw/ofw_bus_subr.c stable/10/sys/dev/ofw/ofw_bus_subr.h stable/10/sys/dev/ofw/ofw_nexus.c stable/10/sys/mips/beri/files.beri stable/10/sys/powerpc/ofw/ofw_pci.c stable/10/sys/powerpc/ofw/ofw_pcib_pci.c stable/10/sys/powerpc/ofw/ofw_pcibus.c stable/10/sys/powerpc/powerpc/nexus.c stable/10/sys/powerpc/pseries/vdevice.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/nexus.c ============================================================================== --- stable/10/sys/arm/arm/nexus.c Thu May 15 14:23:36 2014 (r266127) +++ stable/10/sys/arm/arm/nexus.c Thu May 15 14:26:11 2014 (r266128) @@ -98,7 +98,7 @@ static int nexus_teardown_intr(device_t, #ifdef FDT static int nexus_ofw_map_intr(device_t dev, device_t child, phandle_t iparent, - int irq); + int icells, pcell_t *intr); #endif static device_method_t nexus_methods[] = { @@ -339,15 +339,16 @@ nexus_deactivate_resource(device_t bus, #ifdef FDT static int -nexus_ofw_map_intr(device_t dev, device_t child, phandle_t iparent, int irq) +nexus_ofw_map_intr(device_t dev, device_t child, phandle_t iparent, int icells, + pcell_t *intr) { - pcell_t intr[2]; fdt_pic_decode_t intr_decode; phandle_t intr_offset; int i, rv, interrupt, trig, pol; intr_offset = OF_xref_phandle(iparent); - intr[0] = cpu_to_fdt32(irq); + for (i = 0; i < icells; i++) + intr[i] = cpu_to_fdt32(intr[i]); for (i = 0; fdt_pic_table[i] != NULL; i++) { intr_decode = fdt_pic_table[i]; @@ -361,7 +362,7 @@ nexus_ofw_map_intr(device_t dev, device_ } /* Not in table, so guess */ - interrupt = FDT_MAP_IRQ(intr_parent, fdt32_to_cpu(*intr)); + interrupt = FDT_MAP_IRQ(intr_parent, fdt32_to_cpu(intr[0])); return (interrupt); } Modified: stable/10/sys/arm/mv/mv_pci.c ============================================================================== --- stable/10/sys/arm/mv/mv_pci.c Thu May 15 14:23:36 2014 (r266127) +++ stable/10/sys/arm/mv/mv_pci.c Thu May 15 14:26:11 2014 (r266128) @@ -1050,7 +1050,8 @@ mv_pcib_route_interrupt(device_t bus, de { struct mv_pcib_softc *sc; struct ofw_pci_register reg; - uint32_t pintr, mintr; + uint32_t pintr, mintr[4]; + int icells; phandle_t iparent; sc = device_get_softc(bus); @@ -1062,10 +1063,11 @@ mv_pcib_route_interrupt(device_t bus, de (pci_get_slot(dev) << OFW_PCI_PHYS_HI_DEVICESHIFT) | (pci_get_function(dev) << OFW_PCI_PHYS_HI_FUNCTIONSHIFT); - if (ofw_bus_lookup_imap(ofw_bus_get_node(dev), &sc->sc_pci_iinfo, ®, - sizeof(reg), &pintr, sizeof(pintr), &mintr, sizeof(mintr), - &iparent)) - return (ofw_bus_map_intr(dev, iparent, mintr)); + icells = ofw_bus_lookup_imap(ofw_bus_get_node(dev), &sc->sc_pci_iinfo, + ®, sizeof(reg), &pintr, sizeof(pintr), mintr, sizeof(mintr), + &iparent); + if (icells > 0) + return (ofw_bus_map_intr(dev, iparent, icells, mintr)); /* Maybe it's a real interrupt, not an intpin */ if (pin > 4) Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Thu May 15 14:23:36 2014 (r266127) +++ stable/10/sys/conf/files Thu May 15 14:26:11 2014 (r266128) @@ -1404,7 +1404,6 @@ dev/fb/fbd.c optional fbd | vt dev/fb/fb_if.m standard dev/fb/splash.c optional sc splash dev/fdt/fdt_common.c optional fdt -dev/fdt/fdt_ic_if.m optional fdt dev/fdt/fdt_slicer.c optional fdt cfi | fdt nand dev/fdt/fdt_static_dtb.S optional fdt fdt_dtb_static \ dependency "$S/boot/fdt/dts/${FDT_DTS_FILE}" Modified: stable/10/sys/dev/fdt/fdt_common.c ============================================================================== --- stable/10/sys/dev/fdt/fdt_common.c Thu May 15 14:23:36 2014 (r266127) +++ stable/10/sys/dev/fdt/fdt_common.c Thu May 15 14:26:11 2014 (r266128) @@ -489,11 +489,10 @@ fdt_intr_to_rl(device_t dev, phandle_t n OF_searchencprop(OF_xref_phandle(iparent), "#interrupt-cells", &icells, sizeof(icells)); for (i = 0, k = 0; i < nintr; i += icells, k++) { - intr[i] = ofw_bus_map_intr(dev, iparent, intr[i]); + intr[i] = ofw_bus_map_intr(dev, iparent, icells, + &intr[i]); resource_list_add(rl, SYS_RES_IRQ, k, intr[i], intr[i], 1); - if (icells > 1) - ofw_bus_config_intr(dev, intr[i], intr[i+1]); } free(intr, M_OFWPROP); } Modified: stable/10/sys/dev/fdt/simplebus.c ============================================================================== --- stable/10/sys/dev/fdt/simplebus.c Thu May 15 14:23:36 2014 (r266127) +++ stable/10/sys/dev/fdt/simplebus.c Thu May 15 14:26:11 2014 (r266128) @@ -1,10 +1,7 @@ /*- - * Copyright (c) 2009-2010 The FreeBSD Foundation + * Copyright (c) 2013 Nathan Whitehorn * All rights reserved. * - * This software was developed by Semihalf under sponsorship from - * the FreeBSD Foundation. - * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -17,7 +14,7 @@ * 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 + * 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) @@ -29,95 +26,85 @@ #include __FBSDID("$FreeBSD$"); - -#include "opt_platform.h" #include #include -#include -#include #include #include +#include +#include #include -#include +#include #include #include -#include -#include "fdt_common.h" -#include "fdt_ic_if.h" -#include "ofw_bus_if.h" - -#ifdef DEBUG -#define debugf(fmt, args...) do { printf("%s(): ", __func__); \ - printf(fmt,##args); } while (0) -#else -#define debugf(fmt, args...) -#endif - -static MALLOC_DEFINE(M_SIMPLEBUS, "simplebus", "simplebus devices information"); +struct simplebus_range { + uint64_t bus; + uint64_t host; + uint64_t size; +}; struct simplebus_softc { - int sc_addr_cells; - int sc_size_cells; + device_t dev; + phandle_t node; + + struct simplebus_range *ranges; + int nranges; + + pcell_t acells, scells; }; struct simplebus_devinfo { - struct ofw_bus_devinfo di_ofw; - struct resource_list di_res; - - /* Interrupts sense-level info for this device */ - struct fdt_sense_level di_intr_sl[DI_MAX_INTR_NUM]; + struct ofw_bus_devinfo obdinfo; + struct resource_list rl; }; /* - * Prototypes. + * Bus interface. */ -static int simplebus_probe(device_t); -static int simplebus_attach(device_t); - -static int simplebus_print_child(device_t, device_t); -static int simplebus_setup_intr(device_t, device_t, struct resource *, int, - driver_filter_t *, driver_intr_t *, void *, void **); -static int simplebus_teardown_intr(device_t, device_t, struct resource *, - void *); - -static int simplebus_activate_resource(device_t, device_t, int, int, - struct resource *); +static int simplebus_probe(device_t dev); +static int simplebus_attach(device_t dev); static struct resource *simplebus_alloc_resource(device_t, device_t, int, int *, u_long, u_long, u_long, u_int); -static int simplebus_deactivate_resource(device_t, device_t, int, int, - struct resource *); -static int simplebus_release_resource(device_t, device_t, int, int, - struct resource *); -static device_t simplebus_get_interrupt_parent(device_t); -static struct resource_list *simplebus_get_resource_list(device_t, device_t); +static void simplebus_probe_nomatch(device_t bus, device_t child); +static int simplebus_print_child(device_t bus, device_t child); + +/* + * ofw_bus interface + */ +static const struct ofw_bus_devinfo *simplebus_get_devinfo(device_t bus, + device_t child); -static ofw_bus_get_devinfo_t simplebus_get_devinfo; +/* + * local methods + */ + +static int simplebus_fill_ranges(phandle_t node, + struct simplebus_softc *sc); +static struct simplebus_devinfo *simplebus_setup_dinfo(device_t dev, + phandle_t node); /* - * Bus interface definition. + * Driver methods. */ -static device_method_t simplebus_methods[] = { +static device_method_t simplebus_methods[] = { /* Device interface */ DEVMETHOD(device_probe, simplebus_probe), DEVMETHOD(device_attach, simplebus_attach), - DEVMETHOD(device_detach, bus_generic_detach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, bus_generic_resume), /* Bus interface */ DEVMETHOD(bus_print_child, simplebus_print_child), + DEVMETHOD(bus_probe_nomatch, simplebus_probe_nomatch), + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), DEVMETHOD(bus_alloc_resource, simplebus_alloc_resource), - DEVMETHOD(bus_release_resource, simplebus_release_resource), - DEVMETHOD(bus_activate_resource, simplebus_activate_resource), - DEVMETHOD(bus_deactivate_resource, simplebus_deactivate_resource), - DEVMETHOD(bus_setup_intr, simplebus_setup_intr), - DEVMETHOD(bus_teardown_intr, simplebus_teardown_intr), - DEVMETHOD(bus_get_resource_list, simplebus_get_resource_list), + DEVMETHOD(bus_release_resource, bus_generic_release_resource), + DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), + DEVMETHOD(bus_child_pnpinfo_str, ofw_bus_gen_child_pnpinfo_str), - /* OFW bus interface */ + /* ofw_bus interface */ DEVMETHOD(ofw_bus_get_devinfo, simplebus_get_devinfo), DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), DEVMETHOD(ofw_bus_get_model, ofw_bus_gen_get_model), @@ -125,7 +112,7 @@ static device_method_t simplebus_methods DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), - { 0, 0 } + DEVMETHOD_END }; static driver_t simplebus_driver = { @@ -133,18 +120,17 @@ static driver_t simplebus_driver = { simplebus_methods, sizeof(struct simplebus_softc) }; - -devclass_t simplebus_devclass; - +static devclass_t simplebus_devclass; DRIVER_MODULE(simplebus, nexus, simplebus_driver, simplebus_devclass, 0, 0); -DRIVER_MODULE(simplebus, simplebus, simplebus_driver, simplebus_devclass, 0, - 0); +DRIVER_MODULE(simplebus, simplebus, simplebus_driver, simplebus_devclass, 0, 0); static int simplebus_probe(device_t dev) { - - if (!ofw_bus_is_compatible(dev, "simple-bus")) + + if (!ofw_bus_is_compatible(dev, "simple-bus") && + (ofw_bus_get_type(dev) == NULL || strcmp(ofw_bus_get_type(dev), + "soc") != 0)) return (ENXIO); device_set_desc(dev, "Flattened device tree simple bus"); @@ -155,102 +141,200 @@ simplebus_probe(device_t dev) static int simplebus_attach(device_t dev) { - device_t dev_child; - struct simplebus_devinfo *di; - struct simplebus_softc *sc; - phandle_t dt_node, dt_child; + struct simplebus_softc *sc; + struct simplebus_devinfo *di; + phandle_t node; + device_t cdev; + node = ofw_bus_get_node(dev); sc = device_get_softc(dev); + sc->dev = dev; + sc->node = node; + /* - * Walk simple-bus and add direct subordinates as our children. + * Some important numbers */ - dt_node = ofw_bus_get_node(dev); - for (dt_child = OF_child(dt_node); dt_child != 0; - dt_child = OF_peer(dt_child)) { - - /* Check and process 'status' property. */ - if (!(fdt_is_enabled(dt_child))) - continue; + sc->acells = 2; + OF_getencprop(node, "#address-cells", &sc->acells, sizeof(sc->acells)); + sc->scells = 1; + OF_getencprop(node, "#size-cells", &sc->scells, sizeof(sc->scells)); - if (!(fdt_pm_is_enabled(dt_child))) - continue; + if (simplebus_fill_ranges(node, sc) < 0) { + device_printf(dev, "could not get ranges\n"); + return (ENXIO); + } - di = malloc(sizeof(*di), M_SIMPLEBUS, M_WAITOK | M_ZERO); + /* + * In principle, simplebus could have an interrupt map, but ignore that + * for now + */ - if (ofw_bus_gen_setup_devinfo(&di->di_ofw, dt_child) != 0) { - free(di, M_SIMPLEBUS); - device_printf(dev, "could not set up devinfo\n"); + for (node = OF_child(node); node > 0; node = OF_peer(node)) { + if ((di = simplebus_setup_dinfo(dev, node)) == NULL) continue; - } - - resource_list_init(&di->di_res); - if (fdt_reg_to_rl(dt_child, &di->di_res)) { - device_printf(dev, - "%s: could not process 'reg' " - "property\n", di->di_ofw.obd_name); - ofw_bus_gen_destroy_devinfo(&di->di_ofw); - free(di, M_SIMPLEBUS); + cdev = device_add_child(dev, NULL, -1); + if (cdev == NULL) { + device_printf(dev, "<%s>: device_add_child failed\n", + di->obdinfo.obd_name); + resource_list_free(&di->rl); + ofw_bus_gen_destroy_devinfo(&di->obdinfo); + free(di, M_DEVBUF); continue; } + device_set_ivars(cdev, di); + } - if (fdt_intr_to_rl(dev, dt_child, &di->di_res, di->di_intr_sl)) { - device_printf(dev, "%s: could not process " - "'interrupts' property\n", di->di_ofw.obd_name); - resource_list_free(&di->di_res); - ofw_bus_gen_destroy_devinfo(&di->di_ofw); - free(di, M_SIMPLEBUS); - continue; - } + return (bus_generic_attach(dev)); +} - /* Add newbus device for this FDT node */ - dev_child = device_add_child(dev, NULL, -1); - if (dev_child == NULL) { - device_printf(dev, "could not add child: %s\n", - di->di_ofw.obd_name); - resource_list_free(&di->di_res); - ofw_bus_gen_destroy_devinfo(&di->di_ofw); - free(di, M_SIMPLEBUS); - continue; +static int +simplebus_fill_ranges(phandle_t node, struct simplebus_softc *sc) +{ + int host_address_cells; + cell_t *base_ranges; + ssize_t nbase_ranges; + int err; + int i, j, k; + + err = OF_searchencprop(OF_parent(node), "#address-cells", + &host_address_cells, sizeof(host_address_cells)); + if (err <= 0) + return (-1); + + nbase_ranges = OF_getproplen(node, "ranges"); + if (nbase_ranges < 0) + return (-1); + sc->nranges = nbase_ranges / sizeof(cell_t) / + (sc->acells + host_address_cells + sc->scells); + if (sc->nranges == 0) + return (0); + + sc->ranges = malloc(sc->nranges * sizeof(sc->ranges[0]), + M_DEVBUF, M_WAITOK); + base_ranges = malloc(nbase_ranges, M_DEVBUF, M_WAITOK); + OF_getencprop(node, "ranges", base_ranges, nbase_ranges); + + for (i = 0, j = 0; i < sc->nranges; i++) { + sc->ranges[i].bus = 0; + for (k = 0; k < sc->acells; k++) { + sc->ranges[i].bus <<= 32; + sc->ranges[i].bus |= base_ranges[j++]; + } + sc->ranges[i].host = 0; + for (k = 0; k < host_address_cells; k++) { + sc->ranges[i].host <<= 32; + sc->ranges[i].host |= base_ranges[j++]; + } + sc->ranges[i].size = 0; + for (k = 0; k < sc->scells; k++) { + sc->ranges[i].size <<= 32; + sc->ranges[i].size |= base_ranges[j++]; } -#ifdef DEBUG - device_printf(dev, "added child: %s\n\n", di->di_ofw.obd_name); -#endif - device_set_ivars(dev_child, di); } - return (bus_generic_attach(dev)); + free(base_ranges, M_DEVBUF); + return (sc->nranges); } -static int -simplebus_print_child(device_t dev, device_t child) +static struct simplebus_devinfo * +simplebus_setup_dinfo(device_t dev, phandle_t node) { - device_t ip; - struct simplebus_devinfo *di; - struct resource_list *rl; - int rv; + struct simplebus_softc *sc; + struct simplebus_devinfo *ndi; + uint32_t *reg, *intr, icells; + uint64_t phys, size; + phandle_t iparent; + int i, j, k; + int nintr; + int nreg; - di = device_get_ivars(child); - rl = &di->di_res; + sc = device_get_softc(dev); - rv = 0; - rv += bus_print_child_header(dev, child); - rv += resource_list_print_type(rl, "mem", SYS_RES_MEMORY, "%#lx"); - rv += resource_list_print_type(rl, "irq", SYS_RES_IRQ, "%ld"); - if ((ip = simplebus_get_interrupt_parent(child)) != NULL) - rv += printf(" (%s)", device_get_nameunit(ip)); - rv += bus_print_child_footer(dev, child); + ndi = malloc(sizeof(*ndi), M_DEVBUF, M_WAITOK | M_ZERO); + if (ofw_bus_gen_setup_devinfo(&ndi->obdinfo, node) != 0) { + free(ndi, M_DEVBUF); + return (NULL); + } - return (rv); + resource_list_init(&ndi->rl); + nreg = OF_getencprop_alloc(node, "reg", sizeof(*reg), (void **)®); + if (nreg == -1) + nreg = 0; + if (nreg % (sc->acells + sc->scells) != 0) { + if (bootverbose) + device_printf(dev, "Malformed reg property on <%s>\n", + ndi->obdinfo.obd_name); + nreg = 0; + } + + for (i = 0, k = 0; i < nreg; i += sc->acells + sc->scells, k++) { + phys = size = 0; + for (j = 0; j < sc->acells; j++) { + phys <<= 32; + phys |= reg[i + j]; + } + for (j = 0; j < sc->scells; j++) { + size <<= 32; + size |= reg[i + sc->acells + j]; + } + + resource_list_add(&ndi->rl, SYS_RES_MEMORY, k, + phys, phys + size - 1, size); + } + free(reg, M_OFWPROP); + + nintr = OF_getencprop_alloc(node, "interrupts", sizeof(*intr), + (void **)&intr); + if (nintr > 0) { + if (OF_searchencprop(node, "interrupt-parent", &iparent, + sizeof(iparent)) == -1) { + device_printf(dev, "No interrupt-parent found, " + "assuming direct parent\n"); + iparent = OF_parent(node); + } + if (OF_searchencprop(OF_xref_phandle(iparent), + "#interrupt-cells", &icells, sizeof(icells)) == -1) { + device_printf(dev, "Missing #interrupt-cells property, " + "assuming <1>\n"); + icells = 1; + } + if (icells < 1 || icells > nintr) { + device_printf(dev, "Invalid #interrupt-cells property " + "value <%d>, assuming <1>\n", icells); + icells = 1; + } + for (i = 0, k = 0; i < nintr; i += icells, k++) { + intr[i] = ofw_bus_map_intr(dev, iparent, icells, + &intr[i]); + resource_list_add(&ndi->rl, SYS_RES_IRQ, k, intr[i], + intr[i], 1); + } + free(intr, M_OFWPROP); + } + + return (ndi); +} + +static const struct ofw_bus_devinfo * +simplebus_get_devinfo(device_t bus __unused, device_t child) +{ + struct simplebus_devinfo *ndi; + + ndi = device_get_ivars(child); + return (&ndi->obdinfo); } static struct resource * simplebus_alloc_resource(device_t bus, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) { - device_t ic; + struct simplebus_softc *sc; struct simplebus_devinfo *di; struct resource_list_entry *rle; + int j; + + sc = device_get_softc(bus); /* * Request for the default allocation with a given rid: use resource @@ -263,7 +347,7 @@ simplebus_alloc_resource(device_t bus, d if (type == SYS_RES_IOPORT) type = SYS_RES_MEMORY; - rle = resource_list_find(&di->di_res, type, *rid); + rle = resource_list_find(&di->rl, type, *rid); if (rle == NULL) { if (bootverbose) device_printf(bus, "no default resources for " @@ -273,153 +357,69 @@ simplebus_alloc_resource(device_t bus, d start = rle->start; end = rle->end; count = rle->count; - } + } + + if (type == SYS_RES_MEMORY) { + /* Remap through ranges property */ + for (j = 0; j < sc->nranges; j++) { + if (start >= sc->ranges[j].bus && end < + sc->ranges[j].bus + sc->ranges[j].size) { + start -= sc->ranges[j].bus; + start += sc->ranges[j].host; + end -= sc->ranges[j].bus; + end += sc->ranges[j].host; + break; + } + } + if (j == sc->nranges && sc->nranges != 0) { + if (bootverbose) + device_printf(bus, "Could not map resource " + "%#lx-%#lx\n", start, end); - if (type == SYS_RES_IRQ && - (ic = simplebus_get_interrupt_parent(child)) != NULL) - return(FDT_IC_ALLOC_INTR(ic, child, rid, start, flags)); + return (NULL); + } + } return (bus_generic_alloc_resource(bus, child, type, rid, start, end, count, flags)); } static int -simplebus_activate_resource(device_t dev, device_t child, int type, int rid, - struct resource *r) -{ - device_t ic; - - if (type == SYS_RES_IRQ && - (ic = simplebus_get_interrupt_parent(child)) != NULL) - return (FDT_IC_ACTIVATE_INTR(ic, r)); - - return (bus_generic_activate_resource(dev, child, type, rid, r)); -} - -static int -simplebus_deactivate_resource(device_t dev, device_t child, int type, int rid, - struct resource *r) -{ - device_t ic; - - if (type == SYS_RES_IRQ && - (ic = simplebus_get_interrupt_parent(child)) != NULL) - return (FDT_IC_DEACTIVATE_INTR(ic, r)); - - return (bus_generic_deactivate_resource(dev, child, type, rid, r)); -} - -static int -simplebus_release_resource(device_t dev, device_t child, int type, int rid, - struct resource *r) +simplebus_print_res(struct simplebus_devinfo *di) { - device_t ic; - - if (type == SYS_RES_IRQ && - (ic = simplebus_get_interrupt_parent(child)) != NULL) - return (FDT_IC_RELEASE_INTR(ic, r)); - - return (bus_generic_release_resource(dev, child, type, rid, r)); -} - -static struct resource_list * -simplebus_get_resource_list(device_t bus, device_t child) -{ - struct simplebus_devinfo *di; - - di = device_get_ivars(child); - return (&di->di_res); -} - -static device_t -simplebus_get_interrupt_parent(device_t dev) -{ - struct simplebus_devinfo *di; - struct fdt_ic *ic; - device_t ip; - phandle_t ph, iph; - - ip = NULL; - - di = device_get_ivars(dev); - if (di == NULL) - return (NULL); + int rv; - if (OF_getencprop(di->di_ofw.obd_node, "interrupt-parent", &iph, - sizeof(iph)) > 0) { - ph = OF_xref_phandle(iph); - SLIST_FOREACH(ic, &fdt_ic_list_head, fdt_ics) { - if (ic->iph == ph) { - ip = ic->dev; - break; - } - } - } - return (ip); + rv = 0; + rv += resource_list_print_type(&di->rl, "mem", SYS_RES_MEMORY, "%#lx"); + rv += resource_list_print_type(&di->rl, "irq", SYS_RES_IRQ, "%ld"); + return (rv); } -static int -simplebus_setup_intr(device_t bus, device_t child, struct resource *res, - int flags, driver_filter_t *filter, driver_intr_t *ihand, void *arg, - void **cookiep) +static void +simplebus_probe_nomatch(device_t bus, device_t child) { - struct simplebus_devinfo *di; - device_t ic; - enum intr_trigger trig; - enum intr_polarity pol; - int error, irq, rid; + const char *name, *type; - di = device_get_ivars(child); - if (di == NULL) - return (ENXIO); - - if (res == NULL) - return (EINVAL); + if (!bootverbose) + return; - rid = rman_get_rid(res); - if (rid >= DI_MAX_INTR_NUM) - return (ENOENT); - - ic = simplebus_get_interrupt_parent(child); - - trig = di->di_intr_sl[rid].trig; - pol = di->di_intr_sl[rid].pol; - if (trig != INTR_TRIGGER_CONFORM || pol != INTR_POLARITY_CONFORM) { - irq = rman_get_start(res); - if (ic != NULL) - error = FDT_IC_CONFIG_INTR(ic, irq, trig, pol); - else - error = bus_generic_config_intr(bus, irq, trig, pol); - if (error) - return (error); - } + name = ofw_bus_get_name(child); + type = ofw_bus_get_type(child); - if (ic != NULL) - error = FDT_IC_SETUP_INTR(ic, child, res, flags, filter, - ihand, arg, cookiep); - else - error = bus_generic_setup_intr(bus, child, res, flags, filter, - ihand, arg, cookiep); - return (error); + device_printf(bus, "<%s>", name != NULL ? name : "unknown"); + simplebus_print_res(device_get_ivars(child)); + printf(" type %s (no driver attached)\n", + type != NULL ? type : "unknown"); } static int -simplebus_teardown_intr(device_t bus, device_t child, struct resource *res, - void *cookie) +simplebus_print_child(device_t bus, device_t child) { - device_t ic; - - if ((ic = simplebus_get_interrupt_parent(child)) != NULL) - return (FDT_IC_TEARDOWN_INTR(ic, child, res, cookie)); + int rv; - return (bus_generic_teardown_intr(bus, child, res, cookie)); + rv = bus_print_child_header(bus, child); + rv += simplebus_print_res(device_get_ivars(child)); + rv += bus_print_child_footer(bus, child); + return (rv); } -static const struct ofw_bus_devinfo * -simplebus_get_devinfo(device_t bus, device_t child) -{ - struct simplebus_devinfo *di; - - di = device_get_ivars(child); - return (&di->di_ofw); -} Modified: stable/10/sys/dev/ofw/ofw_bus.h ============================================================================== --- stable/10/sys/dev/ofw/ofw_bus.h Thu May 15 14:23:36 2014 (r266127) +++ stable/10/sys/dev/ofw/ofw_bus.h Thu May 15 14:26:11 2014 (r266128) @@ -71,15 +71,9 @@ ofw_bus_get_type(device_t dev) } static __inline int -ofw_bus_map_intr(device_t dev, phandle_t iparent, int irq) +ofw_bus_map_intr(device_t dev, phandle_t iparent, int icells, pcell_t *intr) { - return (OFW_BUS_MAP_INTR(dev, dev, iparent, irq)); -} - -static __inline int -ofw_bus_config_intr(device_t dev, int irq, int sense) -{ - return (OFW_BUS_CONFIG_INTR(dev, dev, irq, sense)); + return (OFW_BUS_MAP_INTR(dev, dev, iparent, icells, intr)); } #endif /* !_DEV_OFW_OFW_BUS_H_ */ Modified: stable/10/sys/dev/ofw/ofw_bus_if.m ============================================================================== --- stable/10/sys/dev/ofw/ofw_bus_if.m Thu May 15 14:23:36 2014 (r266127) +++ stable/10/sys/dev/ofw/ofw_bus_if.m Thu May 15 14:26:11 2014 (r266128) @@ -46,6 +46,7 @@ HEADER { char *obd_model; char *obd_name; char *obd_type; + char *obd_status; }; }; @@ -57,7 +58,6 @@ CODE { static ofw_bus_get_node_t ofw_bus_default_get_node; static ofw_bus_get_type_t ofw_bus_default_get_type; static ofw_bus_map_intr_t ofw_bus_default_map_intr; - static ofw_bus_config_intr_t ofw_bus_default_config_intr; static const struct ofw_bus_devinfo * ofw_bus_default_get_devinfo(device_t bus, device_t dev) @@ -103,27 +103,15 @@ CODE { int ofw_bus_default_map_intr(device_t bus, device_t dev, phandle_t iparent, - int irq) + int icells, pcell_t *interrupt) { /* Propagate up the bus hierarchy until someone handles it. */ if (device_get_parent(bus) != NULL) return OFW_BUS_MAP_INTR(device_get_parent(bus), dev, - iparent, irq); + iparent, icells, interrupt); /* If that fails, then assume a one-domain system */ - return (irq); - } - - int - ofw_bus_default_config_intr(device_t bus, device_t dev, int irq, - int sense) - { - /* Propagate up the bus hierarchy until someone handles it. */ - if (device_get_parent(bus) != NULL) - return OFW_BUS_CONFIG_INTR(device_get_parent(bus), dev, - irq, sense); - - return (ENXIO); + return (interrupt[0]); } }; @@ -172,20 +160,14 @@ METHOD const char * get_type { } DEFAULT ofw_bus_default_get_type; # Map an (interrupt parent, IRQ) pair to a unique system-wide interrupt number. +# If the interrupt encoding includes a sense field, the interrupt sense will +# also be configured. METHOD int map_intr { device_t bus; device_t dev; phandle_t iparent; - int irq; + int icells; + pcell_t *interrupt; } DEFAULT ofw_bus_default_map_intr; -# Configure an interrupt using the device-tree encoded sense key (the second -# value in the interrupts property if interrupt-cells is 2). IRQ should be -# encoded as from ofw_bus_map_intr(). -METHOD int config_intr { - device_t bus; - device_t dev; - int irq; - int sense; -} DEFAULT ofw_bus_default_config_intr; Modified: stable/10/sys/dev/ofw/ofw_bus_subr.c ============================================================================== --- stable/10/sys/dev/ofw/ofw_bus_subr.c Thu May 15 14:23:36 2014 (r266127) +++ stable/10/sys/dev/ofw/ofw_bus_subr.c Thu May 15 14:26:11 2014 (r266128) @@ -55,6 +55,7 @@ ofw_bus_gen_setup_devinfo(struct ofw_bus OF_getprop_alloc(node, "compatible", 1, (void **)&obd->obd_compat); OF_getprop_alloc(node, "device_type", 1, (void **)&obd->obd_type); OF_getprop_alloc(node, "model", 1, (void **)&obd->obd_model); + OF_getprop_alloc(node, "status", 1, (void **)&obd->obd_status); obd->obd_node = node; return (0); } @@ -73,6 +74,8 @@ ofw_bus_gen_destroy_devinfo(struct ofw_b free(obd->obd_name, M_OFWPROP); if (obd->obd_type != NULL) free(obd->obd_type, M_OFWPROP); + if (obd->obd_status != NULL) + free(obd->obd_status, M_OFWPROP); } int @@ -147,6 +150,30 @@ ofw_bus_gen_get_type(device_t bus, devic return (obd->obd_type); } +const char * +ofw_bus_get_status(device_t dev) +{ + const struct ofw_bus_devinfo *obd; + + obd = OFW_BUS_GET_DEVINFO(device_get_parent(dev), dev); + if (obd == NULL) + return (NULL); + + return (obd->obd_status); +} + +int +ofw_bus_status_okay(device_t dev) +{ + const char *status; + + status = ofw_bus_get_status(dev); + if (status == NULL || strcmp(status, "okay") == 0) + return (1); + + return (0); +} + int ofw_bus_is_compatible(device_t dev, const char *onecompat) { Modified: stable/10/sys/dev/ofw/ofw_bus_subr.h ============================================================================== --- stable/10/sys/dev/ofw/ofw_bus_subr.h Thu May 15 14:23:36 2014 (r266127) +++ stable/10/sys/dev/ofw/ofw_bus_subr.h Thu May 15 14:26:11 2014 (r266128) @@ -72,6 +72,10 @@ int ofw_bus_lookup_imap(phandle_t, struc int ofw_bus_search_intrmap(void *, int, void *, int, void *, int, void *, void *, void *, int, phandle_t *); +/* Helper to get device status property */ +const char *ofw_bus_get_status(device_t dev); +int ofw_bus_status_okay(device_t dev); + /* Helper to get node's interrupt parent */ void ofw_bus_find_iparent(phandle_t); Modified: stable/10/sys/dev/ofw/ofw_nexus.c ============================================================================== --- stable/10/sys/dev/ofw/ofw_nexus.c Thu May 15 14:23:36 2014 (r266127) +++ stable/10/sys/dev/ofw/ofw_nexus.c Thu May 15 14:26:11 2014 (r266128) @@ -467,11 +467,10 @@ nexus_setup_dinfo(device_t dev, phandle_ OF_searchencprop(OF_xref_phandle(iparent), "#interrupt-cells", &icells, sizeof(icells)); for (i = 0; i < nintr; i+= icells) { - intr[i] = ofw_bus_map_intr(dev, iparent, intr[i]); + intr[i] = ofw_bus_map_intr(dev, iparent, icells, + &intr[i]); resource_list_add(&ndi->ndi_rl, SYS_RES_IRQ, i, intr[i], intr[i], 1); - if (icells > 1) - ofw_bus_config_intr(dev, intr[i], intr[i+1]); } free(intr, M_OFWPROP); } Copied: stable/10/sys/mips/beri/beri_simplebus.c (from r261352, head/sys/mips/beri/beri_simplebus.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/mips/beri/beri_simplebus.c Thu May 15 14:26:11 2014 (r266128, copy of r261352, head/sys/mips/beri/beri_simplebus.c) @@ -0,0 +1,425 @@ +/*- + * Copyright (c) 2009-2010 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Semihalf under sponsorship from + * the FreeBSD Foundation. + * + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_platform.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include "fdt_ic_if.h" +#include "ofw_bus_if.h" + +#ifdef DEBUG +#define debugf(fmt, args...) do { printf("%s(): ", __func__); \ + printf(fmt,##args); } while (0) +#else +#define debugf(fmt, args...) +#endif *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu May 15 14:37:55 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DEF4C236; Thu, 15 May 2014 14:37:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFB822E8C; Thu, 15 May 2014 14:37:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FEbsq0023588; Thu, 15 May 2014 14:37:54 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FEbqVs023572; Thu, 15 May 2014 14:37:52 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405151437.s4FEbqVs023572@svn.freebsd.org> From: Ian Lepore Date: Thu, 15 May 2014 14:37:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266130 - in stable/10: contrib/dtc contrib/dtc/Documentation contrib/dtc/libfdt usr.bin X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 14:37:55 -0000 Author: ian Date: Thu May 15 14:37:52 2014 New Revision: 266130 URL: http://svnweb.freebsd.org/changeset/base/266130 Log: MFC r261215, r261257 Merge from vendor branch importing dtc git rev 6a15eb2350426d285130e4c9d84c0bdb6575547a Don't build BSDL dtc if the GPL dtc is enabled. Modified: stable/10/contrib/dtc/Documentation/manual.txt stable/10/contrib/dtc/Makefile stable/10/contrib/dtc/checks.c stable/10/contrib/dtc/data.c stable/10/contrib/dtc/dtc-lexer.l stable/10/contrib/dtc/dtc-parser.y stable/10/contrib/dtc/dtc.c stable/10/contrib/dtc/dtc.h stable/10/contrib/dtc/fdtdump.c stable/10/contrib/dtc/fdtget.c stable/10/contrib/dtc/fdtput.c stable/10/contrib/dtc/flattree.c stable/10/contrib/dtc/libfdt/Makefile.libfdt stable/10/contrib/dtc/libfdt/fdt.c stable/10/contrib/dtc/libfdt/fdt.h stable/10/contrib/dtc/libfdt/fdt_ro.c stable/10/contrib/dtc/libfdt/fdt_rw.c stable/10/contrib/dtc/libfdt/fdt_sw.c stable/10/contrib/dtc/libfdt/fdt_wip.c stable/10/contrib/dtc/libfdt/libfdt.h stable/10/contrib/dtc/libfdt/libfdt_env.h stable/10/contrib/dtc/libfdt/version.lds stable/10/contrib/dtc/livetree.c stable/10/contrib/dtc/srcpos.c stable/10/contrib/dtc/srcpos.h stable/10/contrib/dtc/treesource.c stable/10/contrib/dtc/util.c stable/10/contrib/dtc/util.h stable/10/usr.bin/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/dtc/Documentation/manual.txt ============================================================================== --- stable/10/contrib/dtc/Documentation/manual.txt Thu May 15 14:37:35 2014 (r266129) +++ stable/10/contrib/dtc/Documentation/manual.txt Thu May 15 14:37:52 2014 (r266130) @@ -3,6 +3,7 @@ Device Tree Compiler Manual I - "dtc", the device tree compiler 1) Obtaining Sources + 1.1) Submitting Patches 2) Description 3) Command Line 4) Source File @@ -44,6 +45,10 @@ Tarballs of the 1.0.0 and latest release http://www.jdl.com/software/dtc-v1.2.0.tgz http://www.jdl.com/software/dtc-latest.tgz +1.1) Submitting Patches + +Patches should be sent to jdl@jdl.com, and CC'ed to +devicetree-discuss@lists.ozlabs.org. 2) Description Modified: stable/10/contrib/dtc/Makefile ============================================================================== --- stable/10/contrib/dtc/Makefile Thu May 15 14:37:35 2014 (r266129) +++ stable/10/contrib/dtc/Makefile Thu May 15 14:37:52 2014 (r266130) @@ -9,7 +9,7 @@ # CONFIG_LOCALVERSION from some future config system. # VERSION = 1 -PATCHLEVEL = 3 +PATCHLEVEL = 4 SUBLEVEL = 0 EXTRAVERSION = LOCAL_VERSION = @@ -160,18 +160,26 @@ endif # intermediate target and building them again "for real" .SECONDARY: $(DTC_GEN_SRCS) $(CONVERT_GEN_SRCS) -install: all $(SCRIPTS) - @$(VECHO) INSTALL +install-bin: all $(SCRIPTS) + @$(VECHO) INSTALL-BIN $(INSTALL) -d $(DESTDIR)$(BINDIR) $(INSTALL) $(BIN) $(SCRIPTS) $(DESTDIR)$(BINDIR) + +install-lib: all + @$(VECHO) INSTALL-LIB $(INSTALL) -d $(DESTDIR)$(LIBDIR) $(INSTALL) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR) ln -sf $(notdir $(LIBFDT_lib)) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname) ln -sf $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)/libfdt.$(SHAREDLIB_EXT) $(INSTALL) -m 644 $(LIBFDT_archive) $(DESTDIR)$(LIBDIR) + +install-includes: + @$(VECHO) INSTALL-INC $(INSTALL) -d $(DESTDIR)$(INCLUDEDIR) $(INSTALL) -m 644 $(LIBFDT_include) $(DESTDIR)$(INCLUDEDIR) +install: install-bin install-lib install-includes + $(VERSION_FILE): Makefile FORCE $(call filechk,version) Modified: stable/10/contrib/dtc/checks.c ============================================================================== --- stable/10/contrib/dtc/checks.c Thu May 15 14:37:35 2014 (r266129) +++ stable/10/contrib/dtc/checks.c Thu May 15 14:37:52 2014 (r266130) @@ -53,7 +53,7 @@ struct check { void *data; bool warn, error; enum checkstatus status; - int inprogress; + bool inprogress; int num_prereqs; struct check **prereq; }; @@ -141,9 +141,9 @@ static void check_nodes_props(struct che check_nodes_props(c, dt, child); } -static int run_check(struct check *c, struct node *dt) +static bool run_check(struct check *c, struct node *dt) { - int error = 0; + bool error = false; int i; assert(!c->inprogress); @@ -151,11 +151,11 @@ static int run_check(struct check *c, st if (c->status != UNCHECKED) goto out; - c->inprogress = 1; + c->inprogress = true; for (i = 0; i < c->num_prereqs; i++) { struct check *prq = c->prereq[i]; - error |= run_check(prq, dt); + error = error || run_check(prq, dt); if (prq->status != PASSED) { c->status = PREREQ; check_msg(c, "Failed prerequisite '%s'", @@ -177,9 +177,9 @@ static int run_check(struct check *c, st TRACE(c, "\tCompleted, status %d", c->status); out: - c->inprogress = 0; + c->inprogress = false; if ((c->status != PASSED) && (c->error)) - error = 1; + error = true; return error; } @@ -256,11 +256,15 @@ static void check_duplicate_property_nam { struct property *prop, *prop2; - for_each_property(node, prop) - for (prop2 = prop->next; prop2; prop2 = prop2->next) + for_each_property(node, prop) { + for (prop2 = prop->next; prop2; prop2 = prop2->next) { + if (prop2->deleted) + continue; if (streq(prop->name, prop2->name)) FAIL(c, "Duplicate property name %s in %s", prop->name, node->fullpath); + } + } } NODE_ERROR(duplicate_property_names, NULL); @@ -729,7 +733,7 @@ void parse_checks_option(bool warn, bool die("Unrecognized check name \"%s\"\n", name); } -void process_checks(int force, struct boot_info *bi) +void process_checks(bool force, struct boot_info *bi) { struct node *dt = bi->dt; int i; Modified: stable/10/contrib/dtc/data.c ============================================================================== --- stable/10/contrib/dtc/data.c Thu May 15 14:37:35 2014 (r266129) +++ stable/10/contrib/dtc/data.c Thu May 15 14:37:52 2014 (r266130) @@ -250,20 +250,20 @@ struct data data_add_marker(struct data return data_append_markers(d, m); } -int data_is_one_string(struct data d) +bool data_is_one_string(struct data d) { int i; int len = d.len; if (len == 0) - return 0; + return false; for (i = 0; i < len-1; i++) if (d.val[i] == '\0') - return 0; + return false; if (d.val[len-1] != '\0') - return 0; + return false; - return 1; + return true; } Modified: stable/10/contrib/dtc/dtc-lexer.l ============================================================================== --- stable/10/contrib/dtc/dtc-lexer.l Thu May 15 14:37:35 2014 (r266129) +++ stable/10/contrib/dtc/dtc-lexer.l Thu May 15 14:37:52 2014 (r266130) @@ -44,6 +44,7 @@ YY_BUFFER_STATE include_stack[MAX_INCLUD int include_stack_pointer = 0; YYLTYPE yylloc; +extern bool treesource_error; /* CAUTION: this will stop working if we ever use yyless() or yyunput() */ #define YY_USER_ACTION \ @@ -65,7 +66,8 @@ static int dts_version = 1; BEGIN(V1); \ static void push_input_file(const char *filename); -static int pop_input_file(void); +static bool pop_input_file(void); +static void lexical_error(const char *fmt, ...); %} %% @@ -75,6 +77,27 @@ static int pop_input_file(void); push_input_file(name); } +<*>^"#"(line)?[ \t]+[0-9]+[ \t]+{STRING}([ \t]+[0-9]+)? { + char *line, *tmp, *fn; + /* skip text before line # */ + line = yytext; + while (!isdigit((unsigned char)*line)) + line++; + /* skip digits in line # */ + tmp = line; + while (!isspace((unsigned char)*tmp)) + tmp++; + /* "NULL"-terminate line # */ + *tmp = '\0'; + /* start of filename */ + fn = strchr(tmp + 1, '"') + 1; + /* strip trailing " from filename */ + tmp = strchr(fn, '"'); + *tmp = 0; + /* -1 since #line is the number of the next line */ + srcpos_set_line(xstrdup(fn), atoi(line) - 1); + } + <*><> { if (!pop_input_file()) { yyterminate(); @@ -107,6 +130,20 @@ static int pop_input_file(void); return DT_BITS; } +<*>"/delete-property/" { + DPRINT("Keyword: /delete-property/\n"); + DPRINT("\n"); + BEGIN(PROPNODENAME); + return DT_DEL_PROP; + } + +<*>"/delete-node/" { + DPRINT("Keyword: /delete-node/\n"); + DPRINT("\n"); + BEGIN(PROPNODENAME); + return DT_DEL_NODE; + } + <*>{LABEL}: { DPRINT("Label: %s\n", yytext); yylval.labelref = xstrdup(yytext); @@ -115,15 +152,42 @@ static int pop_input_file(void); } ([0-9]+|0[xX][0-9a-fA-F]+)(U|L|UL|LL|ULL)? { - yylval.literal = xstrdup(yytext); - DPRINT("Literal: '%s'\n", yylval.literal); + char *e; + DPRINT("Integer Literal: '%s'\n", yytext); + + errno = 0; + yylval.integer = strtoull(yytext, &e, 0); + + assert(!(*e) || !e[strspn(e, "UL")]); + + if (errno == ERANGE) + lexical_error("Integer literal '%s' out of range", + yytext); + else + /* ERANGE is the only strtoull error triggerable + * by strings matching the pattern */ + assert(errno == 0); return DT_LITERAL; } <*>{CHAR_LITERAL} { - yytext[yyleng-1] = '\0'; - yylval.literal = xstrdup(yytext+1); - DPRINT("Character literal: %s\n", yylval.literal); + struct data d; + DPRINT("Character literal: %s\n", yytext); + + d = data_copy_escape_string(yytext+1, yyleng-2); + if (d.len == 1) { + lexical_error("Empty character literal"); + yylval.integer = 0; + return DT_CHAR_LITERAL; + } + + yylval.integer = (unsigned char)d.val[0]; + + if (d.len > 2) + lexical_error("Character literal has %d" + " characters instead of 1", + d.len - 1); + return DT_CHAR_LITERAL; } @@ -152,9 +216,10 @@ static int pop_input_file(void); return ']'; } -{PROPNODECHAR}+ { +\\?{PROPNODECHAR}+ { DPRINT("PropNodeName: %s\n", yytext); - yylval.propnodename = xstrdup(yytext); + yylval.propnodename = xstrdup((yytext[0] == '\\') ? + yytext + 1 : yytext); BEGIN_DEFAULT(); return DT_PROPNODENAME; } @@ -210,10 +275,10 @@ static void push_input_file(const char * } -static int pop_input_file(void) +static bool pop_input_file(void) { if (srcfile_pop() == 0) - return 0; + return false; assert(include_stack_pointer > 0); @@ -223,5 +288,16 @@ static int pop_input_file(void) yyin = current_srcfile->f; - return 1; + return true; +} + +static void lexical_error(const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + srcpos_verror(&yylloc, "Lexical error", fmt, ap); + va_end(ap); + + treesource_error = true; } Modified: stable/10/contrib/dtc/dtc-parser.y ============================================================================== --- stable/10/contrib/dtc/dtc-parser.y Thu May 15 14:37:35 2014 (r266129) +++ stable/10/contrib/dtc/dtc-parser.y Thu May 15 14:37:52 2014 (r266130) @@ -31,15 +31,11 @@ extern void print_error(char const *fmt, extern void yyerror(char const *s); extern struct boot_info *the_boot_info; -extern int treesource_error; - -static unsigned long long eval_literal(const char *s, int base, int bits); -static unsigned char eval_char_literal(const char *s); +extern bool treesource_error; %} %union { char *propnodename; - char *literal; char *labelref; unsigned int cbase; uint8_t byte; @@ -62,9 +58,11 @@ static unsigned char eval_char_literal(c %token DT_MEMRESERVE %token DT_LSHIFT DT_RSHIFT DT_LE DT_GE DT_EQ DT_NE DT_AND DT_OR %token DT_BITS +%token DT_DEL_PROP +%token DT_DEL_NODE %token DT_PROPNODENAME -%token DT_LITERAL -%token DT_CHAR_LITERAL +%token DT_LITERAL +%token DT_CHAR_LITERAL %token DT_BASE %token DT_BYTE %token DT_STRING @@ -153,6 +151,17 @@ devicetree: print_error("label or path, '%s', not found", $2); $$ = $1; } + | devicetree DT_DEL_NODE DT_REF ';' + { + struct node *target = get_node_by_ref($1, $3); + + if (!target) + print_error("label or path, '%s', not found", $3); + else + delete_node(target); + + $$ = $1; + } ; nodedef: @@ -182,6 +191,10 @@ propdef: { $$ = build_property($1, empty_data); } + | DT_DEL_PROP DT_PROPNODENAME ';' + { + $$ = build_property_delete($2); + } | DT_LABEL propdef { add_label(&$2->labels, $1); @@ -213,10 +226,9 @@ propdata: if ($6 != 0) if (fseek(f, $6, SEEK_SET) != 0) - print_error("Couldn't seek to offset %llu in \"%s\": %s", - (unsigned long long)$6, - $4.val, - strerror(errno)); + die("Couldn't seek to offset %llu in \"%s\": %s", + (unsigned long long)$6, $4.val, + strerror(errno)); d = data_copy_file(f, $8); @@ -257,18 +269,20 @@ propdataprefix: arrayprefix: DT_BITS DT_LITERAL '<' { - $$.data = empty_data; - $$.bits = eval_literal($2, 0, 7); + unsigned long long bits; - if (($$.bits != 8) && - ($$.bits != 16) && - ($$.bits != 32) && - ($$.bits != 64)) + bits = $2; + + if ((bits != 8) && (bits != 16) && + (bits != 32) && (bits != 64)) { print_error("Only 8, 16, 32 and 64-bit elements" " are currently supported"); - $$.bits = 32; + bits = 32; } + + $$.data = empty_data; + $$.bits = bits; } | '<' { @@ -317,13 +331,7 @@ arrayprefix: integer_prim: DT_LITERAL - { - $$ = eval_literal($1, 0, 64); - } | DT_CHAR_LITERAL - { - $$ = eval_char_literal($1); - } | '(' integer_expr ')' { $$ = $2; @@ -440,6 +448,10 @@ subnode: { $$ = name_node($2, $1); } + | DT_DEL_NODE DT_PROPNODENAME ';' + { + $$ = name_node(build_node_delete(), $2); + } | DT_LABEL subnode { add_label(&$2->labels, $1); @@ -454,58 +466,12 @@ void print_error(char const *fmt, ...) va_list va; va_start(va, fmt); - srcpos_verror(&yylloc, fmt, va); + srcpos_verror(&yylloc, "Error", fmt, va); va_end(va); - treesource_error = 1; + treesource_error = true; } void yyerror(char const *s) { print_error("%s", s); } - -static unsigned long long eval_literal(const char *s, int base, int bits) -{ - unsigned long long val; - char *e; - - errno = 0; - val = strtoull(s, &e, base); - if (*e) { - size_t uls = strspn(e, "UL"); - if (e[uls]) - print_error("bad characters in literal"); - } - if ((errno == ERANGE) - || ((bits < 64) && (val >= (1ULL << bits)))) - print_error("literal out of range"); - else if (errno != 0) - print_error("bad literal"); - return val; -} - -static unsigned char eval_char_literal(const char *s) -{ - int i = 1; - char c = s[0]; - - if (c == '\0') - { - print_error("empty character literal"); - return 0; - } - - /* - * If the first character in the character literal is a \ then process - * the remaining characters as an escape encoding. If the first - * character is neither an escape or a terminator it should be the only - * character in the literal and will be returned. - */ - if (c == '\\') - c = get_escape_char(s, &i); - - if (s[i] != '\0') - print_error("malformed character literal"); - - return c; -} Modified: stable/10/contrib/dtc/dtc.c ============================================================================== --- stable/10/contrib/dtc/dtc.c Thu May 15 14:37:35 2014 (r266129) +++ stable/10/contrib/dtc/dtc.c Thu May 15 14:37:52 2014 (r266130) @@ -21,8 +21,6 @@ #include "dtc.h" #include "srcpos.h" -#include "version_gen.h" - /* * Command line options */ @@ -49,55 +47,60 @@ static void fill_fullpaths(struct node * fill_fullpaths(child, tree->fullpath); } -static void __attribute__ ((noreturn)) usage(void) -{ - fprintf(stderr, "Usage:\n"); - fprintf(stderr, "\tdtc [options] \n"); - fprintf(stderr, "\nOptions:\n"); - fprintf(stderr, "\t-h\n"); - fprintf(stderr, "\t\tThis help text\n"); - fprintf(stderr, "\t-q\n"); - fprintf(stderr, "\t\tQuiet: -q suppress warnings, -qq errors, -qqq all\n"); - fprintf(stderr, "\t-I \n"); - fprintf(stderr, "\t\tInput formats are:\n"); - fprintf(stderr, "\t\t\tdts - device tree source text\n"); - fprintf(stderr, "\t\t\tdtb - device tree blob\n"); - fprintf(stderr, "\t\t\tfs - /proc/device-tree style directory\n"); - fprintf(stderr, "\t-o \n"); - fprintf(stderr, "\t-O \n"); - fprintf(stderr, "\t\tOutput formats are:\n"); - fprintf(stderr, "\t\t\tdts - device tree source text\n"); - fprintf(stderr, "\t\t\tdtb - device tree blob\n"); - fprintf(stderr, "\t\t\tasm - assembler source\n"); - fprintf(stderr, "\t-V \n"); - fprintf(stderr, "\t\tBlob version to produce, defaults to %d (relevant for dtb\n\t\tand asm output only)\n", DEFAULT_FDT_VERSION); - fprintf(stderr, "\t-d \n"); - fprintf(stderr, "\t-R \n"); - fprintf(stderr, "\t\tMake space for reserve map entries (relevant for \n\t\tdtb and asm output only)\n"); - fprintf(stderr, "\t-S \n"); - fprintf(stderr, "\t\tMake the blob at least long (extra space)\n"); - fprintf(stderr, "\t-p \n"); - fprintf(stderr, "\t\tAdd padding to the blob of long (extra space)\n"); - fprintf(stderr, "\t-b \n"); - fprintf(stderr, "\t\tSet the physical boot cpu\n"); - fprintf(stderr, "\t-f\n"); - fprintf(stderr, "\t\tForce - try to produce output even if the input tree has errors\n"); - fprintf(stderr, "\t-i\n"); - fprintf(stderr, "\t\tAdd a path to search for include files\n"); - fprintf(stderr, "\t-s\n"); - fprintf(stderr, "\t\tSort nodes and properties before outputting (only useful for\n\t\tcomparing trees)\n"); - fprintf(stderr, "\t-v\n"); - fprintf(stderr, "\t\tPrint DTC version and exit\n"); - fprintf(stderr, "\t-H \n"); - fprintf(stderr, "\t\tphandle formats are:\n"); - fprintf(stderr, "\t\t\tlegacy - \"linux,phandle\" properties only\n"); - fprintf(stderr, "\t\t\tepapr - \"phandle\" properties only\n"); - fprintf(stderr, "\t\t\tboth - Both \"linux,phandle\" and \"phandle\" properties\n"); - fprintf(stderr, "\t-W [no-]\n"); - fprintf(stderr, "\t-E [no-]\n"); - fprintf(stderr, "\t\t\tenable or disable warnings and errors\n"); - exit(3); -} +/* Usage related data. */ +static const char usage_synopsis[] = "dtc [options] "; +static const char usage_short_opts[] = "qI:O:o:V:d:R:S:p:fb:i:H:sW:E:hv"; +static struct option const usage_long_opts[] = { + {"quiet", no_argument, NULL, 'q'}, + {"in-format", a_argument, NULL, 'I'}, + {"out", a_argument, NULL, 'o'}, + {"out-format", a_argument, NULL, 'O'}, + {"out-version", a_argument, NULL, 'V'}, + {"out-dependency", a_argument, NULL, 'd'}, + {"reserve", a_argument, NULL, 'R'}, + {"space", a_argument, NULL, 'S'}, + {"pad", a_argument, NULL, 'p'}, + {"boot-cpu", a_argument, NULL, 'b'}, + {"force", no_argument, NULL, 'f'}, + {"include", a_argument, NULL, 'i'}, + {"sort", no_argument, NULL, 's'}, + {"phandle", a_argument, NULL, 'H'}, + {"warning", a_argument, NULL, 'W'}, + {"error", a_argument, NULL, 'E'}, + {"help", no_argument, NULL, 'h'}, + {"version", no_argument, NULL, 'v'}, + {NULL, no_argument, NULL, 0x0}, +}; +static const char * const usage_opts_help[] = { + "\n\tQuiet: -q suppress warnings, -qq errors, -qqq all", + "\n\tInput formats are:\n" + "\t\tdts - device tree source text\n" + "\t\tdtb - device tree blob\n" + "\t\tfs - /proc/device-tree style directory", + "\n\tOutput file", + "\n\tOutput formats are:\n" + "\t\tdts - device tree source text\n" + "\t\tdtb - device tree blob\n" + "\t\tasm - assembler source", + "\n\tBlob version to produce, defaults to %d (for dtb and asm output)", //, DEFAULT_FDT_VERSION); + "\n\tOutput dependency file", + "\n\ttMake space for reserve map entries (for dtb and asm output)", + "\n\tMake the blob at least long (extra space)", + "\n\tAdd padding to the blob of long (extra space)", + "\n\tSet the physical boot cpu", + "\n\tTry to produce output even if the input tree has errors", + "\n\tAdd a path to search for include files", + "\n\tSort nodes and properties before outputting (useful for comparing trees)", + "\n\tValid phandle formats are:\n" + "\t\tlegacy - \"linux,phandle\" properties only\n" + "\t\tepapr - \"phandle\" properties only\n" + "\t\tboth - Both \"linux,phandle\" and \"phandle\" properties", + "\n\tEnable/disable warnings (prefix with \"no-\")", + "\n\tEnable/disable errors (prefix with \"no-\")", + "\n\tPrint this help and exit", + "\n\tPrint version and exit", + NULL, +}; int main(int argc, char *argv[]) { @@ -106,7 +109,7 @@ int main(int argc, char *argv[]) const char *outform = "dts"; const char *outname = "-"; const char *depname = NULL; - int force = 0, sort = 0; + bool force = false, sort = false; const char *arg; int opt; FILE *outf = NULL; @@ -118,8 +121,7 @@ int main(int argc, char *argv[]) minsize = 0; padsize = 0; - while ((opt = getopt(argc, argv, "hI:O:o:V:d:R:S:p:fqb:i:vH:sW:E:")) - != EOF) { + while ((opt = util_getopt_long()) != EOF) { switch (opt) { case 'I': inform = optarg; @@ -146,7 +148,7 @@ int main(int argc, char *argv[]) padsize = strtol(optarg, NULL, 0); break; case 'f': - force = 1; + force = true; break; case 'q': quiet++; @@ -158,8 +160,7 @@ int main(int argc, char *argv[]) srcfile_add_search_path(optarg); break; case 'v': - printf("Version: %s\n", DTC_VERSION); - exit(0); + util_version(); case 'H': if (streq(optarg, "legacy")) phandle_format = PHANDLE_LEGACY; @@ -173,7 +174,7 @@ int main(int argc, char *argv[]) break; case 's': - sort = 1; + sort = true; break; case 'W': @@ -185,13 +186,14 @@ int main(int argc, char *argv[]) break; case 'h': + usage(NULL); default: - usage(); + usage("unknown option"); } } if (argc > (optind+1)) - usage(); + usage("missing files"); else if (argc < (optind+1)) arg = "-"; else @@ -201,9 +203,6 @@ int main(int argc, char *argv[]) if (minsize && padsize) die("Can't set both -p and -S\n"); - if (minsize) - fprintf(stderr, "DTC: Use of \"-S\" is deprecated; it will be removed soon, use \"-p\" instead\n"); - if (depname) { depfile = fopen(depname, "w"); if (!depfile) Modified: stable/10/contrib/dtc/dtc.h ============================================================================== --- stable/10/contrib/dtc/dtc.h Thu May 15 14:37:35 2014 (r266129) +++ stable/10/contrib/dtc/dtc.h Thu May 15 14:37:52 2014 (r266130) @@ -66,7 +66,6 @@ typedef uint32_t cell_t; #define strneq(a, b, n) (strncmp((a), (b), (n)) == 0) #define ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1)) -#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) /* Data blobs */ enum markertype { @@ -119,7 +118,7 @@ struct data data_append_align(struct dat struct data data_add_marker(struct data d, enum markertype type, char *ref); -int data_is_one_string(struct data d); +bool data_is_one_string(struct data d); /* DT constraints */ @@ -128,11 +127,13 @@ int data_is_one_string(struct data d); /* Live trees */ struct label { + bool deleted; char *label; struct label *next; }; struct property { + bool deleted; char *name; struct data val; @@ -142,6 +143,7 @@ struct property { }; struct node { + bool deleted; char *name; struct property *proplist; struct node *children; @@ -158,28 +160,47 @@ struct node { struct label *labels; }; -#define for_each_label(l0, l) \ +#define for_each_label_withdel(l0, l) \ for ((l) = (l0); (l); (l) = (l)->next) -#define for_each_property(n, p) \ +#define for_each_label(l0, l) \ + for_each_label_withdel(l0, l) \ + if (!(l)->deleted) + +#define for_each_property_withdel(n, p) \ for ((p) = (n)->proplist; (p); (p) = (p)->next) -#define for_each_child(n, c) \ +#define for_each_property(n, p) \ + for_each_property_withdel(n, p) \ + if (!(p)->deleted) + +#define for_each_child_withdel(n, c) \ for ((c) = (n)->children; (c); (c) = (c)->next_sibling) +#define for_each_child(n, c) \ + for_each_child_withdel(n, c) \ + if (!(c)->deleted) + void add_label(struct label **labels, char *label); +void delete_labels(struct label **labels); struct property *build_property(char *name, struct data val); +struct property *build_property_delete(char *name); struct property *chain_property(struct property *first, struct property *list); struct property *reverse_properties(struct property *first); struct node *build_node(struct property *proplist, struct node *children); +struct node *build_node_delete(void); struct node *name_node(struct node *node, char *name); struct node *chain_node(struct node *first, struct node *list); struct node *merge_nodes(struct node *old_node, struct node *new_node); void add_property(struct node *node, struct property *prop); +void delete_property_by_name(struct node *node, char *name); +void delete_property(struct property *prop); void add_child(struct node *parent, struct node *child); +void delete_node_by_name(struct node *parent, char *name); +void delete_node(struct node *node); const char *get_unitname(struct node *node); struct property *get_property(struct node *node, const char *propname); @@ -227,7 +248,7 @@ void sort_tree(struct boot_info *bi); /* Checks */ void parse_checks_option(bool warn, bool error, const char *optarg); -void process_checks(int force, struct boot_info *bi); +void process_checks(bool force, struct boot_info *bi); /* Flattened trees */ Modified: stable/10/contrib/dtc/fdtdump.c ============================================================================== --- stable/10/contrib/dtc/fdtdump.c Thu May 15 14:37:35 2014 (r266129) +++ stable/10/contrib/dtc/fdtdump.c Thu May 15 14:37:52 2014 (r266130) @@ -2,14 +2,16 @@ * fdtdump.c - Contributed by Pantelis Antoniou */ +#include #include #include #include #include #include -#include +#include #include +#include #include "util.h" @@ -17,33 +19,29 @@ #define PALIGN(p, a) ((void *)(ALIGN((unsigned long)(p), (a)))) #define GET_CELL(p) (p += 4, *((const uint32_t *)(p-4))) -static void print_data(const char *data, int len) +static const char *tagname(uint32_t tag) { - int i; - const char *p = data; - - /* no data, don't print */ - if (len == 0) - return; - - if (util_is_printable_string(data, len)) { - printf(" = \"%s\"", (const char *)data); - } else if ((len % 4) == 0) { - printf(" = <"); - for (i = 0; i < len; i += 4) - printf("0x%08x%s", fdt32_to_cpu(GET_CELL(p)), - i < (len - 4) ? " " : ""); - printf(">"); - } else { - printf(" = ["); - for (i = 0; i < len; i++) - printf("%02x%s", *p++, i < len - 1 ? " " : ""); - printf("]"); - } + static const char * const names[] = { +#define TN(t) [t] #t + TN(FDT_BEGIN_NODE), + TN(FDT_END_NODE), + TN(FDT_PROP), + TN(FDT_NOP), + TN(FDT_END), +#undef TN + }; + if (tag < ARRAY_SIZE(names)) + if (names[tag]) + return names[tag]; + return "FDT_???"; } -static void dump_blob(void *blob) +#define dumpf(fmt, args...) \ + do { if (debug) printf("// " fmt, ## args); } while (0) + +static void dump_blob(void *blob, bool debug) { + uintptr_t blob_off = (uintptr_t)blob; struct fdt_header *bph = blob; uint32_t off_mem_rsvmap = fdt32_to_cpu(bph->off_mem_rsvmap); uint32_t off_dt = fdt32_to_cpu(bph->off_dt_struct); @@ -97,7 +95,8 @@ static void dump_blob(void *blob) p = p_struct; while ((tag = fdt32_to_cpu(GET_CELL(p))) != FDT_END) { - /* printf("tag: 0x%08x (%d)\n", tag, p - p_struct); */ + dumpf("%04zx: tag: 0x%08x (%s)\n", + (uintptr_t)p - blob_off - 4, tag, tagname(tag)); if (tag == FDT_BEGIN_NODE) { s = p; @@ -136,27 +135,93 @@ static void dump_blob(void *blob) p = PALIGN(p + sz, 4); + dumpf("%04zx: string: %s\n", (uintptr_t)s - blob_off, s); + dumpf("%04zx: value\n", (uintptr_t)t - blob_off); printf("%*s%s", depth * shift, "", s); - print_data(t, sz); + utilfdt_print_data(t, sz); printf(";\n"); } } +/* Usage related data. */ +static const char usage_synopsis[] = "fdtdump [options] "; +static const char usage_short_opts[] = "ds" USAGE_COMMON_SHORT_OPTS; +static struct option const usage_long_opts[] = { + {"debug", no_argument, NULL, 'd'}, + {"scan", no_argument, NULL, 's'}, + USAGE_COMMON_LONG_OPTS +}; +static const char * const usage_opts_help[] = { + "Dump debug information while decoding the file", + "Scan for an embedded fdt in file", + USAGE_COMMON_OPTS_HELP +}; int main(int argc, char *argv[]) { + int opt; + const char *file; char *buf; + bool debug = false; + bool scan = false; + off_t len; + + while ((opt = util_getopt_long()) != EOF) { + switch (opt) { + case_USAGE_COMMON_FLAGS - if (argc < 2) { - fprintf(stderr, "supply input filename\n"); - return 5; + case 'd': + debug = true; + break; + case 's': + scan = true; + break; + } + } + if (optind != argc - 1) + usage("missing input filename"); + file = argv[optind]; + + buf = utilfdt_read_len(file, &len); + if (!buf) + die("could not read: %s\n", file); + + /* try and locate an embedded fdt in a bigger blob */ + if (scan) { + unsigned char smagic[4]; + char *p = buf; + char *endp = buf + len; + + fdt_set_magic(smagic, FDT_MAGIC); + + /* poor man's memmem */ + while (true) { + p = memchr(p, smagic[0], endp - p - 4); + if (!p) + break; + if (fdt_magic(p) == FDT_MAGIC) { + /* try and validate the main struct */ + off_t this_len = endp - p; + fdt32_t max_version = 17; + if (fdt_version(p) <= max_version && + fdt_last_comp_version(p) < max_version && + fdt_totalsize(p) < this_len && + fdt_off_dt_struct(p) < this_len && + fdt_off_dt_strings(p) < this_len) + break; + if (debug) + printf("%s: skipping fdt magic at offset %#zx\n", + file, p - buf); + } + ++p; + } + if (!p) + die("%s: could not locate fdt magic\n", file); + printf("%s: found fdt at offset %#zx\n", file, p - buf); + buf = p; } - buf = utilfdt_read(argv[1]); - if (buf) - dump_blob(buf); - else - return 10; + dump_blob(buf, debug); return 0; } Modified: stable/10/contrib/dtc/fdtget.c ============================================================================== --- stable/10/contrib/dtc/fdtget.c Thu May 15 14:37:35 2014 (r266129) +++ stable/10/contrib/dtc/fdtget.c Thu May 15 14:37:52 2014 (r266130) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu May 15 15:02:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1544D4C; Thu, 15 May 2014 15:02:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D6BF2136; Thu, 15 May 2014 15:02:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FF2nOH038772; Thu, 15 May 2014 15:02:49 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FF2nIB038769; Thu, 15 May 2014 15:02:49 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405151502.s4FF2nIB038769@svn.freebsd.org> From: Ian Lepore Date: Thu, 15 May 2014 15:02:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266133 - in stable/10/lib/msun: arm src X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 15:02:49 -0000 Author: ian Date: Thu May 15 15:02:48 2014 New Revision: 266133 URL: http://svnweb.freebsd.org/changeset/base/266133 Log: MFC r257207, r261161, r261163: Update the hard-float version of the fenv functions to use the VFP unit. Any other floating-point unit is unsupported on ARM. Use __fenv_static for all static inline functions. Correctly shift the mask when masking/unmasking exceptions. Modified: stable/10/lib/msun/arm/fenv.h stable/10/lib/msun/src/fenv-softfloat.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/msun/arm/fenv.h ============================================================================== --- stable/10/lib/msun/arm/fenv.h Thu May 15 14:48:25 2014 (r266132) +++ stable/10/lib/msun/arm/fenv.h Thu May 15 15:02:48 2014 (r266133) @@ -44,14 +44,27 @@ typedef __uint32_t fexcept_t; #define FE_OVERFLOW 0x0004 #define FE_UNDERFLOW 0x0008 #define FE_INEXACT 0x0010 +#ifdef __ARM_PCS_VFP +#define FE_DENORMAL 0x0080 +#define FE_ALL_EXCEPT (FE_DIVBYZERO | FE_INEXACT | \ + FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW | FE_DENORMAL) +#else #define FE_ALL_EXCEPT (FE_DIVBYZERO | FE_INEXACT | \ FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW) +#endif /* Rounding modes */ +#ifdef __ARM_PCS_VFP +#define FE_TONEAREST 0x00000000 +#define FE_UPWARD 0x00400000 +#define FE_DOWNWARD 0x00800000 +#define FE_TOWARDZERO 0x00c00000 +#else #define FE_TONEAREST 0x0000 #define FE_TOWARDZERO 0x0001 #define FE_UPWARD 0x0002 #define FE_DOWNWARD 0x0003 +#endif #define _ROUND_MASK (FE_TONEAREST | FE_DOWNWARD | \ FE_UPWARD | FE_TOWARDZERO) __BEGIN_DECLS @@ -61,10 +74,12 @@ extern const fenv_t __fe_dfl_env; #define FE_DFL_ENV (&__fe_dfl_env) /* We need to be able to map status flag positions to mask flag positions */ -#define _FPUSW_SHIFT 16 +#ifndef __ARM_PCS_VFP +#define _FPUSW_SHIFT 16 #define _ENABLE_MASK (FE_ALL_EXCEPT << _FPUSW_SHIFT) +#endif -#ifndef ARM_HARD_FLOAT +#ifndef __ARM_PCS_VFP int feclearexcept(int __excepts); int fegetexceptflag(fexcept_t *__flagp, int __excepts); @@ -78,19 +93,21 @@ int feholdexcept(fenv_t *__envp); int fesetenv(const fenv_t *__envp); int feupdateenv(const fenv_t *__envp); -#else /* ARM_HARD_FLOAT */ +#else /* __ARM_PCS_VFP */ + +#define vmrs_fpscr(__r) __asm __volatile("vmrs %0, fpscr" : "=&r"(__r)) +#define vmsr_fpscr(__r) __asm __volatile("vmsr fpscr, %0" : : "r"(__r)) -#define __rfs(__fpsr) __asm __volatile("rfs %0" : "=r" (*(__fpsr))) -#define __wfs(__fpsr) __asm __volatile("wfs %0" : : "r" (__fpsr)) +#define _FPU_MASK_SHIFT 8 __fenv_static inline int feclearexcept(int __excepts) { fexcept_t __fpsr; - __rfs(&__fpsr); + vmrs_fpscr(__fpsr); __fpsr &= ~__excepts; - __wfs(__fpsr); + vmsr_fpscr(__fpsr); return (0); } @@ -99,7 +116,7 @@ fegetexceptflag(fexcept_t *__flagp, int { fexcept_t __fpsr; - __rfs(&__fpsr); + vmrs_fpscr(__fpsr); *__flagp = __fpsr & __excepts; return (0); } @@ -109,10 +126,10 @@ fesetexceptflag(const fexcept_t *__flagp { fexcept_t __fpsr; - __rfs(&__fpsr); + vmrs_fpscr(__fpsr); __fpsr &= ~__excepts; __fpsr |= *__flagp & __excepts; - __wfs(__fpsr); + vmsr_fpscr(__fpsr); return (0); } @@ -130,34 +147,36 @@ fetestexcept(int __excepts) { fexcept_t __fpsr; - __rfs(&__fpsr); + vmrs_fpscr(__fpsr); return (__fpsr & __excepts); } __fenv_static inline int fegetround(void) { + fenv_t __fpsr; - /* - * Apparently, the rounding mode is specified as part of the - * instruction format on ARM, so the dynamic rounding mode is - * indeterminate. Some FPUs may differ. - */ - return (-1); + vmrs_fpscr(__fpsr); + return (__fpsr & _ROUND_MASK); } __fenv_static inline int fesetround(int __round) { + fenv_t __fpsr; - return (-1); + vmrs_fpscr(__fpsr); + __fpsr &= ~(_ROUND_MASK); + __fpsr |= __round; + vmsr_fpscr(__fpsr); + return (0); } __fenv_static inline int fegetenv(fenv_t *__envp) { - __rfs(__envp); + vmrs_fpscr(*__envp); return (0); } @@ -166,10 +185,10 @@ feholdexcept(fenv_t *__envp) { fenv_t __env; - __rfs(&__env); + vmrs_fpscr(__env); *__envp = __env; - __env &= ~(FE_ALL_EXCEPT | _ENABLE_MASK); - __wfs(__env); + __env &= ~(FE_ALL_EXCEPT); + vmsr_fpscr(__env); return (0); } @@ -177,7 +196,7 @@ __fenv_static inline int fesetenv(const fenv_t *__envp) { - __wfs(*__envp); + vmsr_fpscr(*__envp); return (0); } @@ -186,8 +205,8 @@ feupdateenv(const fenv_t *__envp) { fexcept_t __fpsr; - __rfs(&__fpsr); - __wfs(*__envp); + vmrs_fpscr(__fpsr); + vmsr_fpscr(*__envp); feraiseexcept(__fpsr & FE_ALL_EXCEPT); return (0); } @@ -196,40 +215,42 @@ feupdateenv(const fenv_t *__envp) /* We currently provide no external definitions of the functions below. */ -static inline int +__fenv_static inline int feenableexcept(int __mask) { fenv_t __old_fpsr, __new_fpsr; - __rfs(&__old_fpsr); - __new_fpsr = __old_fpsr | (__mask & FE_ALL_EXCEPT) << _FPUSW_SHIFT; - __wfs(__new_fpsr); - return ((__old_fpsr >> _FPUSW_SHIFT) & FE_ALL_EXCEPT); + vmrs_fpscr(__old_fpsr); + __new_fpsr = __old_fpsr | + ((__mask & FE_ALL_EXCEPT) << _FPU_MASK_SHIFT); + vmsr_fpscr(__new_fpsr); + return ((__old_fpsr >> _FPU_MASK_SHIFT) & FE_ALL_EXCEPT); } -static inline int +__fenv_static inline int fedisableexcept(int __mask) { fenv_t __old_fpsr, __new_fpsr; - __rfs(&__old_fpsr); - __new_fpsr = __old_fpsr & ~((__mask & FE_ALL_EXCEPT) << _FPUSW_SHIFT); - __wfs(__new_fpsr); - return ((__old_fpsr >> _FPUSW_SHIFT) & FE_ALL_EXCEPT); + vmrs_fpscr(__old_fpsr); + __new_fpsr = __old_fpsr & + ~((__mask & FE_ALL_EXCEPT) << _FPU_MASK_SHIFT); + vmsr_fpscr(__new_fpsr); + return ((__old_fpsr >> _FPU_MASK_SHIFT) & FE_ALL_EXCEPT); } -static inline int +__fenv_static inline int fegetexcept(void) { fenv_t __fpsr; - __rfs(&__fpsr); - return ((__fpsr & _ENABLE_MASK) >> _FPUSW_SHIFT); + vmrs_fpscr(__fpsr); + return (__fpsr & FE_ALL_EXCEPT); } #endif /* __BSD_VISIBLE */ -#endif /* ARM_HARD_FLOAT */ +#endif /* __ARM_PCS_VFP */ __END_DECLS Modified: stable/10/lib/msun/src/fenv-softfloat.h ============================================================================== --- stable/10/lib/msun/src/fenv-softfloat.h Thu May 15 14:48:25 2014 (r266132) +++ stable/10/lib/msun/src/fenv-softfloat.h Thu May 15 15:02:48 2014 (r266133) @@ -156,7 +156,7 @@ feupdateenv(const fenv_t *__envp) /* We currently provide no external definitions of the functions below. */ -static inline int +__fenv_static inline int feenableexcept(int __mask) { int __omask = __softfloat_float_exception_mask; @@ -165,7 +165,7 @@ feenableexcept(int __mask) return (__omask); } -static inline int +__fenv_static inline int fedisableexcept(int __mask) { int __omask = __softfloat_float_exception_mask; @@ -174,7 +174,7 @@ fedisableexcept(int __mask) return (__omask); } -static inline int +__fenv_static inline int fegetexcept(void) { From owner-svn-src-stable@FreeBSD.ORG Thu May 15 15:15:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D4E082EE; Thu, 15 May 2014 15:15:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7AE12254; Thu, 15 May 2014 15:15:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FFFOFE044042; Thu, 15 May 2014 15:15:24 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FFFNW9044037; Thu, 15 May 2014 15:15:23 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201405151515.s4FFFNW9044037@svn.freebsd.org> From: Luiz Otavio O Souza Date: Thu, 15 May 2014 15:15:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266135 - in stable/10/sys/dev: gpio ofw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 15:15:25 -0000 Author: loos Date: Thu May 15 15:15:23 2014 New Revision: 266135 URL: http://svnweb.freebsd.org/changeset/base/266135 Log: MFC r265012, r265191, r265289, r265310 r265012: Fix the gpio-specifier decoding by respecting the GPIO controller's #gpio-cells property. Add a new ofw_bus method (OFW_BUS_MAP_GPIOS()) that allows the GPIO controller to implement its own mapping to deal with gpio-specifiers, allowing the decoding of gpio-specifiers to be controller specific. The default ofw_bus_map_gpios() decodes the linux standard (#gpio-cells = <2>) and the FreeBSD standard (#gpio-cells = <3>). It pass the gpio-specifier flag field to the children as an ivar variable so they can act upon. r265191: Remove unnecessary headers. Sort out the headers. Add a missing header on ofw_gpiobus.c (it was working because of sys/libkern.h). r265289: eally sort out the headers. sys/systm.h must always come after sys/param.h. Remove sys/types.h which should never be included together with sys/param.h. Add sys/malloc.h for correctness even if it seems to don't be needed. Remove more unused headers found by unusedinc (from bde@). r265310: Move gpiobus routines to dev/gpio. Avoid polluting ofw_bus with bus specific parts. Modified: stable/10/sys/dev/gpio/gpio_if.m stable/10/sys/dev/gpio/gpiobus.c stable/10/sys/dev/gpio/gpiobusvar.h stable/10/sys/dev/gpio/ofw_gpiobus.c stable/10/sys/dev/ofw/ofw_bus_if.m Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/gpio/gpio_if.m ============================================================================== --- stable/10/sys/dev/gpio/gpio_if.m Thu May 15 15:14:37 2014 (r266134) +++ stable/10/sys/dev/gpio/gpio_if.m Thu May 15 15:15:23 2014 (r266135) @@ -31,6 +31,32 @@ INTERFACE gpio; +CODE { + static gpio_map_gpios_t gpio_default_map_gpios; + + int + gpio_default_map_gpios(device_t bus, phandle_t dev, + phandle_t gparent, int gcells, pcell_t *gpios, uint32_t *pin, + uint32_t *flags) + { + /* Propagate up the bus hierarchy until someone handles it. */ + if (device_get_parent(bus) != NULL) + return (GPIO_MAP_GPIOS(device_get_parent(bus), dev, + gparent, gcells, gpios, pin, flags)); + + /* If that fails, then assume the FreeBSD defaults. */ + *pin = gpios[0]; + if (gcells == 2 || gcells == 3) + *flags = gpios[gcells - 1]; + + return (0); + } +}; + +HEADER { + #include +}; + # # Get total number of pins # @@ -100,3 +126,16 @@ METHOD int pin_setflags { uint32_t pin_num; uint32_t flags; }; + +# +# Allow the GPIO controller to map the gpio-specifier on its own. +# +METHOD int map_gpios { + device_t bus; + phandle_t dev; + phandle_t gparent; + int gcells; + pcell_t *gpios; + uint32_t *pin; + uint32_t *flags; +} DEFAULT gpio_default_map_gpios; Modified: stable/10/sys/dev/gpio/gpiobus.c ============================================================================== --- stable/10/sys/dev/gpio/gpiobus.c Thu May 15 15:14:37 2014 (r266134) +++ stable/10/sys/dev/gpio/gpiobus.c Thu May 15 15:15:23 2014 (r266135) @@ -29,21 +29,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include -#include -#include -#include -#include -#include -#include -#include -#include - -#include #include -#include "gpio_if.h" + #include "gpiobus_if.h" static int gpiobus_parse_pins(struct gpiobus_softc *, device_t, int); Modified: stable/10/sys/dev/gpio/gpiobusvar.h ============================================================================== --- stable/10/sys/dev/gpio/gpiobusvar.h Thu May 15 15:14:37 2014 (r266134) +++ stable/10/sys/dev/gpio/gpiobusvar.h Thu May 15 15:15:23 2014 (r266135) @@ -32,7 +32,6 @@ #include "opt_platform.h" -#include #include #include @@ -40,6 +39,8 @@ #include #endif +#include "gpio_if.h" + #define GPIOBUS_IVAR(d) (struct gpiobus_ivar *) device_get_ivars(d) #define GPIOBUS_SOFTC(d) (struct gpiobus_softc *) device_get_softc(d) #define GPIOBUS_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) @@ -60,17 +61,29 @@ struct gpiobus_softc int *sc_pins_mapped; /* mark mapped pins */ }; - struct gpiobus_ivar { uint32_t npins; /* pins total */ + uint32_t *flags; /* pins flags */ uint32_t *pins; /* pins map */ }; -void gpiobus_print_pins(struct gpiobus_ivar *); #ifdef FDT +struct ofw_gpiobus_devinfo { + struct gpiobus_ivar opd_dinfo; + struct ofw_bus_devinfo opd_obdinfo; +}; + +static __inline int +gpio_map_gpios(device_t bus, phandle_t dev, phandle_t gparent, int gcells, + pcell_t *gpios, uint32_t *pin, uint32_t *flags) +{ + return (GPIO_MAP_GPIOS(bus, dev, gparent, gcells, gpios, pin, flags)); +} + device_t ofw_gpiobus_add_fdt_child(device_t, phandle_t); #endif +void gpiobus_print_pins(struct gpiobus_ivar *); extern driver_t gpiobus_driver; Modified: stable/10/sys/dev/gpio/ofw_gpiobus.c ============================================================================== --- stable/10/sys/dev/gpio/ofw_gpiobus.c Thu May 15 15:14:37 2014 (r266134) +++ stable/10/sys/dev/gpio/ofw_gpiobus.c Thu May 15 15:15:23 2014 (r266135) @@ -30,27 +30,14 @@ __FBSDID("$FreeBSD$"); #include +#include #include -#include #include -#include -#include +#include #include -#include #include #include -#include - -#include - -#include "gpio_if.h" -#include "gpiobus_if.h" - -struct ofw_gpiobus_devinfo { - struct gpiobus_ivar opd_dinfo; - struct ofw_bus_devinfo opd_obdinfo; -}; static int ofw_gpiobus_parse_gpios(struct gpiobus_softc *, struct gpiobus_ivar *, phandle_t); @@ -83,10 +70,37 @@ ofw_gpiobus_add_fdt_child(device_t bus, } static int +ofw_gpiobus_alloc_ivars(struct gpiobus_ivar *dinfo) +{ + + /* Allocate pins and flags memory. */ + dinfo->pins = malloc(sizeof(uint32_t) * dinfo->npins, M_DEVBUF, + M_NOWAIT | M_ZERO); + if (dinfo->pins == NULL) + return (ENOMEM); + dinfo->flags = malloc(sizeof(uint32_t) * dinfo->npins, M_DEVBUF, + M_NOWAIT | M_ZERO); + if (dinfo->flags == NULL) { + free(dinfo->pins, M_DEVBUF); + return (ENOMEM); + } + + return (0); +} + +static void +ofw_gpiobus_free_ivars(struct gpiobus_ivar *dinfo) +{ + + free(dinfo->flags, M_DEVBUF); + free(dinfo->pins, M_DEVBUF); +} + +static int ofw_gpiobus_parse_gpios(struct gpiobus_softc *sc, struct gpiobus_ivar *dinfo, phandle_t child) { - int i, len; + int cells, i, j, len; pcell_t *gpios; phandle_t gpio; @@ -102,44 +116,81 @@ ofw_gpiobus_parse_gpios(struct gpiobus_s } /* - * Each 'gpios' entry must contain 4 pcells. - * The first one is the GPIO controller phandler. - * Then the last three are the GPIO pin, the GPIO pin direction and - * the GPIO pin flags. + * The gpio-specifier is controller independent, but the first pcell + * has the reference to the GPIO controller phandler. + * One the first pass we count the number of encoded gpio-specifiers. */ - if ((len / sizeof(pcell_t)) % 4) { + i = 0; + len /= sizeof(pcell_t); + while (i < len) { + /* Allow NULL specifiers. */ + if (gpios[i] == 0) { + dinfo->npins++; + i++; + continue; + } + gpio = OF_xref_phandle(gpios[i]); + /* Verify if we're attaching to the correct GPIO controller. */ + if (!OF_hasprop(gpio, "gpio-controller") || + gpio != ofw_bus_get_node(sc->sc_dev)) { + free(gpios, M_DEVBUF); + return (EINVAL); + } + /* Read gpio-cells property for this GPIO controller. */ + if (OF_getencprop(gpio, "#gpio-cells", &cells, + sizeof(cells)) < 0) { + free(gpios, M_DEVBUF); + return (EINVAL); + } + dinfo->npins++; + i += cells + 1; + } + + if (dinfo->npins == 0) { free(gpios, M_DEVBUF); return (EINVAL); } - dinfo->npins = len / (sizeof(pcell_t) * 4); - dinfo->pins = malloc(sizeof(uint32_t) * dinfo->npins, M_DEVBUF, - M_NOWAIT | M_ZERO); - if (dinfo->pins == NULL) { + + /* Allocate the child resources. */ + if (ofw_gpiobus_alloc_ivars(dinfo) != 0) { free(gpios, M_DEVBUF); return (ENOMEM); } - for (i = 0; i < dinfo->npins; i++) { + /* Decode the gpio specifier on the second pass. */ + i = 0; + j = 0; + while (i < len) { + /* Allow NULL specifiers. */ + if (gpios[i] == 0) { + i++; + j++; + continue; + } - /* Verify if we're attaching to the correct gpio controller. */ - gpio = OF_xref_phandle(gpios[i * 4 + 0]); - if (!OF_hasprop(gpio, "gpio-controller") || - gpio != ofw_bus_get_node(sc->sc_dev)) { - free(dinfo->pins, M_DEVBUF); + gpio = OF_xref_phandle(gpios[i]); + /* Read gpio-cells property for this GPIO controller. */ + if (OF_getencprop(gpio, "#gpio-cells", &cells, + sizeof(cells)) < 0) { + ofw_gpiobus_free_ivars(dinfo); free(gpios, M_DEVBUF); return (EINVAL); } - /* Get the GPIO pin number. */ - dinfo->pins[i] = gpios[i * 4 + 1]; - /* gpios[i * 4 + 2] - GPIO pin direction */ - /* gpios[i * 4 + 3] - GPIO pin flags */ + /* Get the GPIO pin number and flags. */ + if (gpio_map_gpios(sc->sc_dev, child, gpio, cells, + &gpios[i + 1], &dinfo->pins[j], &dinfo->flags[j]) != 0) { + ofw_gpiobus_free_ivars(dinfo); + free(gpios, M_DEVBUF); + return (EINVAL); + } - if (dinfo->pins[i] > sc->sc_npins) { + /* Consistency check. */ + if (dinfo->pins[j] > sc->sc_npins) { device_printf(sc->sc_busdev, "invalid pin %d, max: %d\n", - dinfo->pins[i], sc->sc_npins - 1); - free(dinfo->pins, M_DEVBUF); + dinfo->pins[j], sc->sc_npins - 1); + ofw_gpiobus_free_ivars(dinfo); free(gpios, M_DEVBUF); return (EINVAL); } @@ -147,15 +198,18 @@ ofw_gpiobus_parse_gpios(struct gpiobus_s /* * Mark pin as mapped and give warning if it's already mapped. */ - if (sc->sc_pins_mapped[dinfo->pins[i]]) { + if (sc->sc_pins_mapped[dinfo->pins[j]]) { device_printf(sc->sc_busdev, "warning: pin %d is already mapped\n", - dinfo->pins[i]); - free(dinfo->pins, M_DEVBUF); + dinfo->pins[j]); + ofw_gpiobus_free_ivars(dinfo); free(gpios, M_DEVBUF); return (EINVAL); } - sc->sc_pins_mapped[dinfo->pins[i]] = 1; + sc->sc_pins_mapped[dinfo->pins[j]] = 1; + + i += cells + 1; + j++; } free(gpios, M_DEVBUF); Modified: stable/10/sys/dev/ofw/ofw_bus_if.m ============================================================================== --- stable/10/sys/dev/ofw/ofw_bus_if.m Thu May 15 15:14:37 2014 (r266134) +++ stable/10/sys/dev/ofw/ofw_bus_if.m Thu May 15 15:15:23 2014 (r266135) @@ -169,5 +169,3 @@ METHOD int map_intr { int icells; pcell_t *interrupt; } DEFAULT ofw_bus_default_map_intr; - - From owner-svn-src-stable@FreeBSD.ORG Thu May 15 15:40:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D4ED509; Thu, 15 May 2014 15:40:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED3622475; Thu, 15 May 2014 15:40:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FFe7Wi054190; Thu, 15 May 2014 15:40:07 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FFe5Aj054173; Thu, 15 May 2014 15:40:05 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405151540.s4FFe5Aj054173@svn.freebsd.org> From: Ian Lepore Date: Thu, 15 May 2014 15:40:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266144 - in stable/10/sys/arm: arm include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 15:40:08 -0000 Author: ian Date: Thu May 15 15:40:05 2014 New Revision: 266144 URL: http://svnweb.freebsd.org/changeset/base/266144 Log: MFC r261137, r261393 Correct the alignment of sp through functions that use UNWINDSVCFRAME. Update all arm code that manipulates the PSR registers to use modern syntax. Modified: stable/10/sys/arm/arm/cpufunc_asm_arm8.S stable/10/sys/arm/arm/cpufunc_asm_sa1.S stable/10/sys/arm/arm/cpufunc_asm_sa11x0.S stable/10/sys/arm/arm/cpufunc_asm_xscale.S stable/10/sys/arm/arm/cpufunc_asm_xscale_c3.S stable/10/sys/arm/arm/exception.S stable/10/sys/arm/arm/fiq_subr.S stable/10/sys/arm/arm/locore.S stable/10/sys/arm/arm/setcpsr.S stable/10/sys/arm/arm/setstack.s stable/10/sys/arm/include/asmacros.h stable/10/sys/arm/include/atomic.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/cpufunc_asm_arm8.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_arm8.S Thu May 15 15:38:39 2014 (r266143) +++ stable/10/sys/arm/arm/cpufunc_asm_arm8.S Thu May 15 15:40:05 2014 (r266144) @@ -67,9 +67,9 @@ END(arm8_clock_config) * addresses that are about to change. */ ENTRY(arm8_setttb) - mrs r3, cpsr_all + mrs r3, cpsr orr r1, r3, #(I32_bit | F32_bit) - msr cpsr_all, r1 + msr cpsr_fsxc, r1 stmfd sp!, {r0-r3, lr} bl _C_LABEL(arm8_cache_cleanID) @@ -88,7 +88,7 @@ ENTRY(arm8_setttb) /* Make sure that pipeline is emptied */ mov r0, r0 mov r0, r0 - msr cpsr_all, r3 + msr cpsr_fsxc, r3 RET END(arm8_setttb) @@ -182,9 +182,9 @@ ENTRY(arm8_cache_purgeID) mov r0, #0x00000000 - mrs r3, cpsr_all + mrs r3, cpsr orr r2, r3, #(I32_bit | F32_bit) - msr cpsr_all, r2 + msr cpsr_fsxc, r2 1: mov r2, r0 mcr p15, 0, r2, c7, c11, 1 @@ -238,7 +238,7 @@ ENTRY(arm8_cache_purgeID) adds r0, r0, #0x04000000 bne 1b - msr cpsr_all, r3 + msr cpsr_fsxc, r3 RET END(arm8_cache_purgeID) @@ -255,12 +255,12 @@ ENTRY(arm8_cache_purgeID_E) * mcr p15, 0, rd, c7, c11, 1 * mcr p15, 0, rd, c7, c7, 1 */ - mrs r3, cpsr_all + mrs r3, cpsr orr r2, r3, #(I32_bit | F32_bit) - msr cpsr_all, r2 + msr cpsr_fsxc, r2 mcr p15, 0, r0, c7, c11, 1 /* clean I+D single entry */ mcr p15, 0, r0, c7, c7, 1 /* flush I+D single entry */ - msr cpsr_all, r3 + msr cpsr_fsxc, r3 RET END(arm8_cache_purgeID_E) Modified: stable/10/sys/arm/arm/cpufunc_asm_sa1.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_sa1.S Thu May 15 15:38:39 2014 (r266143) +++ stable/10/sys/arm/arm/cpufunc_asm_sa1.S Thu May 15 15:40:05 2014 (r266144) @@ -52,9 +52,9 @@ ENTRY(getttb) mrc p15, 0, r0, c2, c0, 0 ENTRY(sa1_setttb) #ifdef CACHE_CLEAN_BLOCK_INTR - mrs r3, cpsr_all + mrs r3, cpsr orr r1, r3, #(I32_bit | F32_bit) - msr cpsr_all, r1 + msr cpsr_fsxc, r1 #else ldr r3, .Lblock_userspace_access ldr r2, [r3] @@ -80,7 +80,7 @@ ENTRY(sa1_setttb) mov r0, r0 mov r0, r0 #ifdef CACHE_CLEAN_BLOCK_INTR - msr cpsr_all, r3 + msr cpsr_fsxc, r3 #else str r2, [r3] #endif @@ -154,12 +154,12 @@ _C_LABEL(sa1_cache_clean_size): #ifdef CACHE_CLEAN_BLOCK_INTR #define SA1_CACHE_CLEAN_BLOCK \ - mrs r3, cpsr_all ; \ + mrs r3, cpsr ; \ orr r0, r3, #(I32_bit | F32_bit) ; \ - msr cpsr_all, r0 + msr cpsr_fsxc, r0 #define SA1_CACHE_CLEAN_UNBLOCK \ - msr cpsr_all, r3 + msr cpsr_fsxc, r3 #else #define SA1_CACHE_CLEAN_BLOCK \ ldr r3, .Lblock_userspace_access ; \ Modified: stable/10/sys/arm/arm/cpufunc_asm_sa11x0.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_sa11x0.S Thu May 15 15:38:39 2014 (r266143) +++ stable/10/sys/arm/arm/cpufunc_asm_sa11x0.S Thu May 15 15:40:05 2014 (r266144) @@ -80,9 +80,9 @@ ENTRY(sa11x0_cpu_sleep) * re-enable clock switching before servicing interrupts. */ - mrs r3, cpsr_all /* 6 */ + mrs r3, cpsr /* 6 */ orr r2, r3, #(I32_bit|F32_bit) /* 7 */ - msr cpsr_all, r2 /* 8 */ + msr cpsr_fsxc, r2 /* 8 */ /* We're now 32-byte aligned */ @@ -93,7 +93,7 @@ ENTRY(sa11x0_cpu_sleep) mcr p15, 0, r0, c15, c1, 2 /* re-enable clock switching */ /* Restore interrupts (which will cause them to be serviced). */ - msr cpsr_all, r3 + msr cpsr_fsxc, r3 RET END(sa11x0_cpu_sleep) Modified: stable/10/sys/arm/arm/cpufunc_asm_xscale.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_xscale.S Thu May 15 15:38:39 2014 (r266143) +++ stable/10/sys/arm/arm/cpufunc_asm_xscale.S Thu May 15 15:40:05 2014 (r266144) @@ -134,9 +134,9 @@ END(xscale_control) */ ENTRY(xscale_setttb) #ifdef CACHE_CLEAN_BLOCK_INTR - mrs r3, cpsr_all + mrs r3, cpsr orr r1, r3, #(I32_bit | F32_bit) - msr cpsr_all, r1 + msr cpsr_fsxc, r1 #else ldr r3, .Lblock_userspace_access ldr r2, [r3] @@ -164,7 +164,7 @@ ENTRY(xscale_setttb) CPWAIT(r0) #ifdef CACHE_CLEAN_BLOCK_INTR - msr cpsr_all, r3 + msr cpsr_fsxc, r3 #else str r2, [r3] #endif @@ -266,12 +266,12 @@ _C_LABEL(xscale_minidata_clean_size): #ifdef CACHE_CLEAN_BLOCK_INTR #define XSCALE_CACHE_CLEAN_BLOCK \ - mrs r3, cpsr_all ; \ + mrs r3, cpsr ; \ orr r0, r3, #(I32_bit | F32_bit) ; \ - msr cpsr_all, r0 + msr cpsr_fsxc, r0 #define XSCALE_CACHE_CLEAN_UNBLOCK \ - msr cpsr_all, r3 + msr cpsr_fsxc, r3 #else #define XSCALE_CACHE_CLEAN_BLOCK \ ldr r3, .Lblock_userspace_access ; \ Modified: stable/10/sys/arm/arm/cpufunc_asm_xscale_c3.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_xscale_c3.S Thu May 15 15:38:39 2014 (r266143) +++ stable/10/sys/arm/arm/cpufunc_asm_xscale_c3.S Thu May 15 15:40:05 2014 (r266144) @@ -121,12 +121,12 @@ __FBSDID("$FreeBSD$"); #ifdef CACHE_CLEAN_BLOCK_INTR #define XSCALE_CACHE_CLEAN_BLOCK \ stmfd sp!, {r4} ; \ - mrs r4, cpsr_all ; \ + mrs r4, cpsr ; \ orr r0, r4, #(I32_bit | F32_bit) ; \ - msr cpsr_all, r0 + msr cpsr_fsxc, r0 #define XSCALE_CACHE_CLEAN_UNBLOCK \ - msr cpsr_all, r4 ; \ + msr cpsr_fsxc, r4 ; \ ldmfd sp!, {r4} #else #define XSCALE_CACHE_CLEAN_BLOCK \ @@ -348,9 +348,9 @@ END(xscalec3_l2cache_flush_rng) */ ENTRY(xscalec3_setttb) #ifdef CACHE_CLEAN_BLOCK_INTR - mrs r3, cpsr_all + mrs r3, cpsr orr r1, r3, #(I32_bit | F32_bit) - msr cpsr_all, r1 + msr cpsr_fsxc, r1 #else ldr r3, .Lblock_userspace_access ldr r2, [r3] @@ -378,7 +378,7 @@ ENTRY(xscalec3_setttb) CPWAIT(r0) #ifdef CACHE_CLEAN_BLOCK_INTR - msr cpsr_all, r3 + msr cpsr_fsxc, r3 #else str r2, [r3] #endif Modified: stable/10/sys/arm/arm/exception.S ============================================================================== --- stable/10/sys/arm/arm/exception.S Thu May 15 15:38:39 2014 (r266143) +++ stable/10/sys/arm/arm/exception.S Thu May 15 15:40:05 2014 (r266144) @@ -173,8 +173,8 @@ END(data_abort_entry) * it like a Data Abort. */ ASENTRY_NP(address_exception_entry) - mrs r1, cpsr_all - mrs r2, spsr_all + mrs r1, cpsr + mrs r2, spsr mov r3, lr adr r0, Laddress_exception_msg bl _C_LABEL(printf) /* XXX CLOBBERS LR!! */ Modified: stable/10/sys/arm/arm/fiq_subr.S ============================================================================== --- stable/10/sys/arm/arm/fiq_subr.S Thu May 15 15:38:39 2014 (r266143) +++ stable/10/sys/arm/arm/fiq_subr.S Thu May 15 15:40:05 2014 (r266144) @@ -52,14 +52,14 @@ __FBSDID("$FreeBSD$"); #endif #define SWITCH_TO_FIQ_MODE \ - mrs r2, cpsr_all ; \ + mrs r2, cpsr ; \ mov r3, r2 ; \ bic r2, r2, #(PSR_MODE) ; \ orr r2, r2, #(PSR_FIQ32_MODE) ; \ - msr cpsr_all, r2 + msr cpsr_fsxc, r2 #define BACK_TO_SVC_MODE \ - msr cpsr_all, r3 + msr cpsr_fsxc, r3 /* * fiq_getregs: Modified: stable/10/sys/arm/arm/locore.S ============================================================================== --- stable/10/sys/arm/arm/locore.S Thu May 15 15:38:39 2014 (r266143) +++ stable/10/sys/arm/arm/locore.S Thu May 15 15:40:05 2014 (r266144) @@ -333,10 +333,10 @@ ASENTRY_NP(mptramp) AP_DEBUG(#1) - mrs r3, cpsr_all + mrs r3, cpsr bic r3, r3, #(PSR_MODE) orr r3, r3, #(PSR_SVC32_MODE) - msr cpsr_all, r3 + msr cpsr_fsxc, r3 mrc p15, 0, r0, c0, c0, 5 and r0, #0x0f /* Get CPU ID */ @@ -446,7 +446,7 @@ ENTRY_NP(cpu_halt) bic r2, r2, #(PSR_MODE) orr r2, r2, #(PSR_SVC32_MODE) orr r2, r2, #(I32_bit | F32_bit) - msr cpsr_all, r2 + msr cpsr_fsxc, r2 ldr r4, .Lcpu_reset_address ldr r4, [r4] Modified: stable/10/sys/arm/arm/setcpsr.S ============================================================================== --- stable/10/sys/arm/arm/setcpsr.S Thu May 15 15:38:39 2014 (r266143) +++ stable/10/sys/arm/arm/setcpsr.S Thu May 15 15:40:05 2014 (r266144) @@ -61,7 +61,7 @@ ENTRY_NP(SetCPSR) mrs r3, cpsr /* Set the CPSR */ bic r2, r3, r0 eor r2, r2, r1 - msr cpsr_all, r2 + msr cpsr_fsxc, r2 mov r0, r3 /* Return the old CPSR */ Modified: stable/10/sys/arm/arm/setstack.s ============================================================================== --- stable/10/sys/arm/arm/setstack.s Thu May 15 15:38:39 2014 (r266143) +++ stable/10/sys/arm/arm/setstack.s Thu May 15 15:40:05 2014 (r266144) @@ -61,14 +61,14 @@ __FBSDID("$FreeBSD$"); */ ENTRY(set_stackptr) - mrs r3, cpsr_all /* Switch to the appropriate mode */ + mrs r3, cpsr /* Switch to the appropriate mode */ bic r2, r3, #(PSR_MODE) orr r2, r2, r0 - msr cpsr_all, r2 + msr cpsr_fsxc, r2 mov sp, r1 /* Set the stack pointer */ - msr cpsr_all, r3 /* Restore the old mode */ + msr cpsr_fsxc, r3 /* Restore the old mode */ mov pc, lr /* Exit */ @@ -80,14 +80,14 @@ ENTRY(set_stackptr) */ ENTRY(get_stackptr) - mrs r3, cpsr_all /* Switch to the appropriate mode */ + mrs r3, cpsr /* Switch to the appropriate mode */ bic r2, r3, #(PSR_MODE) orr r2, r2, r0 - msr cpsr_all, r2 + msr cpsr_fsxc, r2 mov r0, sp /* Set the stack pointer */ - msr cpsr_all, r3 /* Restore the old mode */ + msr cpsr_fsxc, r3 /* Restore the old mode */ mov pc, lr /* Exit */ Modified: stable/10/sys/arm/include/asmacros.h ============================================================================== --- stable/10/sys/arm/include/asmacros.h Thu May 15 15:38:39 2014 (r266143) +++ stable/10/sys/arm/include/asmacros.h Thu May 15 15:40:05 2014 (r266144) @@ -70,7 +70,7 @@ add r0, sp, #(4*13); /* Adjust the stack pointer */ \ stmia r0, {r13-r14}^; /* Push the user mode registers */ \ mov r0, r0; /* NOP for previous instruction */ \ - mrs r0, spsr_all; /* Put the SPSR on the stack */ \ + mrs r0, spsr; /* Put the SPSR on the stack */ \ str r0, [sp, #-4]!; \ ldr r0, =ARM_RAS_START; \ mov r1, #0; \ @@ -86,7 +86,7 @@ add r0, sp, #(4*13); /* Adjust the stack pointer */ \ stmia r0, {r13-r14}^; /* Push the user mode registers */ \ mov r0, r0; /* NOP for previous instruction */ \ - mrs r0, spsr_all; /* Put the SPSR on the stack */ \ + mrs r0, spsr; /* Put the SPSR on the stack */ \ str r0, [sp, #-4]!; #endif @@ -98,7 +98,7 @@ #ifdef ARM_TP_ADDRESS #define PULLFRAME \ ldr r0, [sp], #0x0004; /* Get the SPSR from stack */ \ - msr spsr_all, r0; \ + msr spsr_fsxc, r0; \ ldmia sp, {r0-r14}^; /* Restore registers (usr mode) */ \ mov r0, r0; /* NOP for previous instruction */ \ add sp, sp, #(4*17); /* Adjust the stack pointer */ \ @@ -107,7 +107,7 @@ #else #define PULLFRAME \ ldr r0, [sp], #0x0004; /* Get the SPSR from stack */ \ - msr spsr_all, r0; \ + msr spsr_fsxc, r0; \ clrex; \ ldmia sp, {r0-r14}^; /* Restore registers (usr mode) */ \ mov r0, r0; /* NOP for previous instruction */ \ @@ -142,7 +142,7 @@ str r0, [sp, #-4]!; /* Push return address */ \ str lr, [sp, #-4]!; /* Push SVC lr */ \ str r2, [sp, #-4]!; /* Push SVC sp */ \ - msr spsr_all, r3; /* Restore correct spsr */ \ + msr spsr_fsxc, r3; /* Restore correct spsr */ \ ldmdb r1, {r0-r3}; /* Restore 4 regs from xxx mode */ \ sub sp, sp, #(4*15); /* Adjust the stack pointer */ \ stmia sp, {r0-r12}; /* Push the user mode registers */ \ @@ -161,7 +161,7 @@ ldrne r1, [r0, #16]; /* adjust the saved PC so that */ \ cmpne r4, r1; /* execution later resumes at */ \ strhi r3, [r0, #16]; /* the RAS_START location. */ \ - mrs r0, spsr_all; \ + mrs r0, spsr; \ str r0, [sp, #-4]! #else #define PUSHFRAMEINSVC \ @@ -179,14 +179,14 @@ str r0, [sp, #-4]!; /* Push return address */ \ str lr, [sp, #-4]!; /* Push SVC lr */ \ str r2, [sp, #-4]!; /* Push SVC sp */ \ - msr spsr_all, r3; /* Restore correct spsr */ \ + msr spsr_fsxc, r3; /* Restore correct spsr */ \ ldmdb r1, {r0-r3}; /* Restore 4 regs from xxx mode */ \ sub sp, sp, #(4*15); /* Adjust the stack pointer */ \ stmia sp, {r0-r12}; /* Push the user mode registers */ \ add r0, sp, #(4*13); /* Adjust the stack pointer */ \ stmia r0, {r13-r14}^; /* Push the user mode registers */ \ mov r0, r0; /* NOP for previous instruction */ \ - mrs r0, spsr_all; /* Put the SPSR on the stack */ \ + mrs r0, spsr; /* Put the SPSR on the stack */ \ str r0, [sp, #-4]! #endif @@ -200,7 +200,7 @@ #ifdef ARM_TP_ADDRESS #define PULLFRAMEFROMSVCANDEXIT \ ldr r0, [sp], #0x0004; /* Get the SPSR from stack */ \ - msr spsr_all, r0; /* restore SPSR */ \ + msr spsr_fsxc, r0; /* restore SPSR */ \ ldmia sp, {r0-r14}^; /* Restore registers (usr mode) */ \ mov r0, r0; /* NOP for previous instruction */ \ add sp, sp, #(4*15); /* Adjust the stack pointer */ \ @@ -208,7 +208,7 @@ #else #define PULLFRAMEFROMSVCANDEXIT \ ldr r0, [sp], #0x0004; /* Get the SPSR from stack */ \ - msr spsr_all, r0; /* restore SPSR */ \ + msr spsr_fsxc, r0; /* restore SPSR */ \ clrex; \ ldmia sp, {r0-r14}^; /* Restore registers (usr mode) */ \ mov r0, r0; /* NOP for previous instruction */ \ @@ -216,8 +216,13 @@ ldmia sp, {sp, lr, pc}^ /* Restore lr and exit */ #endif #if defined(__ARM_EABI__) +/* + * Unwind hints so we can unwind past functions that use + * PULLFRAMEFROMSVCANDEXIT. They are run in reverse order. + * As the last thing we do is restore the stack pointer + * we can ignore the padding at the end of struct trapframe. + */ #define UNWINDSVCFRAME \ - .pad #(4); /* Skip stack alignment */ \ .save {r13-r15}; /* Restore sp, lr, pc */ \ .pad #(2*4); /* Skip user sp and lr */ \ .save {r0-r12}; /* Restore r0-r12 */ \ Modified: stable/10/sys/arm/include/atomic.h ============================================================================== --- stable/10/sys/arm/include/atomic.h Thu May 15 15:38:39 2014 (r266143) +++ stable/10/sys/arm/include/atomic.h Thu May 15 15:40:05 2014 (r266144) @@ -450,13 +450,13 @@ atomic_store_rel_long(volatile u_long *p __asm __volatile( \ "mrs %0, cpsr;" \ "orr %1, %0, %2;" \ - "msr cpsr_all, %1;" \ + "msr cpsr_fsxc, %1;" \ : "=r" (cpsr_save), "=r" (tmp) \ : "I" (I32_bit | F32_bit) \ : "cc" ); \ (expr); \ __asm __volatile( \ - "msr cpsr_all, %0" \ + "msr cpsr_fsxc, %0" \ : /* no output */ \ : "r" (cpsr_save) \ : "cc" ); \ From owner-svn-src-stable@FreeBSD.ORG Thu May 15 15:43:34 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A12359D0; Thu, 15 May 2014 15:43:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 819DD2515; Thu, 15 May 2014 15:43:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FFhYJW057996; Thu, 15 May 2014 15:43:34 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FFhXgV057990; Thu, 15 May 2014 15:43:33 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405151543.s4FFhXgV057990@svn.freebsd.org> From: Ian Lepore Date: Thu, 15 May 2014 15:43:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266146 - in stable/10/sys: arm/conf arm/freescale/vybrid boot/fdt/dts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 15:43:34 -0000 Author: ian Date: Thu May 15 15:43:33 2014 New Revision: 266146 URL: http://svnweb.freebsd.org/changeset/base/266146 Log: MFC r261406, r261409: enhance Vybrid support... o Expand device tree information o Export iomuxc (pins) configuration to DTS o Allow devices to assign clocks in DTS o Split kernel configuration to chip common and board specific parts. Added: stable/10/sys/arm/conf/VYBRID.common - copied unchanged from r261409, head/sys/arm/conf/VYBRID.common Modified: stable/10/sys/arm/conf/COSMIC stable/10/sys/arm/freescale/vybrid/vf_ccm.c stable/10/sys/arm/freescale/vybrid/vf_iomuxc.c stable/10/sys/boot/fdt/dts/vybrid-cosmic.dts stable/10/sys/boot/fdt/dts/vybrid.dtsi Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/COSMIC ============================================================================== --- stable/10/sys/arm/conf/COSMIC Thu May 15 15:41:42 2014 (r266145) +++ stable/10/sys/arm/conf/COSMIC Thu May 15 15:43:33 2014 (r266146) @@ -17,123 +17,9 @@ # # $FreeBSD$ +include "VYBRID.common" ident COSMIC -include "../freescale/vybrid/std.vybrid" - -makeoptions MODULES_OVERRIDE="" -makeoptions WITHOUT_MODULES="ahc" - -makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols -makeoptions WERROR="-Werror" - -options HZ=100 ## -options SCHED_4BSD #4BSD scheduler -options INET #InterNETworking -options INET6 #IPv6 communications protocols -options FFS #Berkeley Fast Filesystem -options SOFTUPDATES -options UFS_ACL #Support for access control lists -options UFS_DIRHASH #Improve performance on big directories -options MSDOSFS #MSDOS Filesystem -options CD9660 #ISO 9660 Filesystem -options PROCFS #Process filesystem (requires PSEUDOFS) -options PSEUDOFS #Pseudo-filesystem framework -#options NANDFS #NAND Filesystem -options TMPFS -options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!] -options SCSI_DELAY=5000 #Delay (in ms) before probing SCSI -options KTRACE -options SYSVSHM #SYSV-style shared memory -options SYSVMSG #SYSV-style message queues -options SYSVSEM #SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions -options KBD_INSTALL_CDEV -options PREEMPTION -options FREEBSD_BOOT_LOADER -options VFP # vfp/neon - -# Debugging -makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols -options BREAK_TO_DEBUGGER -#options VERBOSE_SYSINIT #Enable verbose sysinit messages -options KDB -options DDB #Enable the kernel debugger -options INVARIANTS #Enable calls of extra sanity checking -options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS #Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed -options DIAGNOSTIC - -# NFS support -options NFSCL #Network Filesystem Client -options NFSLOCKD #Network Lock Manager -options NFS_ROOT #NFS usable as /, requires NFSCLIENT - -# Uncomment this for NFS root -#options NFS_ROOT #NFS usable as /, requires NFSCL -#options BOOTP_NFSROOT -#options BOOTP_COMPAT -#options BOOTP -#options BOOTP_NFSV3 -#options BOOTP_WIRED_TO=ffec0 - -device mmc # mmc/sd bus -device mmcsd # mmc/sd flash cards -device sdhci # generic sdhci - -#options ROOTDEVNAME=\"nfs:10.5.0.1:/tftpboot/cosmic\" -#options ROOTDEVNAME=\"nandfs:/dev/gnand0s.root\" -options ROOTDEVNAME=\"ufs:/dev/da0\" - -#options SMP - -# Pseudo devices - -device loop -device random -device pty -device md -device gpio - -# USB support -options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. -device usb -options USB_DEBUG -#options USB_REQ_DEBUG -#options USB_VERBOSE -#device musb -device ehci -#device ohci - -device umass -device scbus # SCSI bus (required for SCSI) -device da # Direct Access (disks) -device pass - -# SATA -#device ata -#device atadisk -#device mvs - -device nand - -# Serial ports -device uart - -# I2C (TWSI) -#device iic -#device iicbus - -# Ethernet -device ether -device ffec - -# USB ethernet support, requires miibus -device miibus -device axe # ASIX Electronics USB Ethernet -device bpf # Berkeley packet filter - #FDT options FDT options FDT_DTB_STATIC Copied: stable/10/sys/arm/conf/VYBRID.common (from r261409, head/sys/arm/conf/VYBRID.common) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/conf/VYBRID.common Thu May 15 15:43:33 2014 (r266146, copy of r261409, head/sys/arm/conf/VYBRID.common) @@ -0,0 +1,139 @@ +# Kernel configuration for Vybrid Family boards. +# +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +include "../freescale/vybrid/std.vybrid" + +makeoptions MODULES_OVERRIDE="" +makeoptions WITHOUT_MODULES="ahc" + +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +makeoptions WERROR="-Werror" + +options HZ=100 ## +options SCHED_4BSD #4BSD scheduler +options INET #InterNETworking +options INET6 #IPv6 communications protocols +options FFS #Berkeley Fast Filesystem +options SOFTUPDATES +options UFS_ACL #Support for access control lists +options UFS_DIRHASH #Improve performance on big directories +options MSDOSFS #MSDOS Filesystem +options CD9660 #ISO 9660 Filesystem +options PROCFS #Process filesystem (requires PSEUDOFS) +options PSEUDOFS #Pseudo-filesystem framework +#options NANDFS #NAND Filesystem +options TMPFS +options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!] +options SCSI_DELAY=5000 #Delay (in ms) before probing SCSI +options KTRACE +options SYSVSHM #SYSV-style shared memory +options SYSVMSG #SYSV-style message queues +options SYSVSEM #SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +options KBD_INSTALL_CDEV +options PREEMPTION +options FREEBSD_BOOT_LOADER +options MUTEX_NOINLINE +options RWLOCK_NOINLINE +options NO_FFS_SNAPSHOT +options NO_SWAPPING +options VFP # vfp/neon + +# Debugging +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +options BREAK_TO_DEBUGGER +#options VERBOSE_SYSINIT #Enable verbose sysinit messages +options KDB +options DDB #Enable the kernel debugger +options INVARIANTS #Enable calls of extra sanity checking +options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS #Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +options DIAGNOSTIC + +# NFS support +options NFSCL #Network Filesystem Client +options NFSLOCKD #Network Lock Manager +options NFS_ROOT #NFS usable as /, requires NFSCLIENT + +# Uncomment this for NFS root +#options NFS_ROOT #NFS usable as /, requires NFSCL +#options BOOTP_NFSROOT +#options BOOTP_COMPAT +#options BOOTP +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=ffec0 + +device mmc # mmc/sd bus +device mmcsd # mmc/sd flash cards +device sdhci # generic sdhci + +#options ROOTDEVNAME=\"nfs:10.5.0.1:/tftpboot/cosmic\" +#options ROOTDEVNAME=\"nandfs:/dev/gnand0s.root\" +options ROOTDEVNAME=\"ufs:/dev/da0\" + +#options SMP + +# Pseudo devices + +device loop +device random +device pty +device md +device gpio + +# USB support +options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. +device usb +options USB_DEBUG +#options USB_REQ_DEBUG +#options USB_VERBOSE +#device musb +device ehci +#device ohci + +device umass +device scbus # SCSI bus (required for SCSI) +device da # Direct Access (disks) +device pass + +# SATA +#device ata +#device atadisk +#device mvs + +device nand + +# Serial ports +device uart + +# I2C (TWSI) +#device iic +#device iicbus + +# Ethernet +device ether +device ffec + +# USB ethernet support, requires miibus +device miibus +device axe # ASIX Electronics USB Ethernet +device bpf # Berkeley packet filter + +device sound Modified: stable/10/sys/arm/freescale/vybrid/vf_ccm.c ============================================================================== --- stable/10/sys/arm/freescale/vybrid/vf_ccm.c Thu May 15 15:41:42 2014 (r266145) +++ stable/10/sys/arm/freescale/vybrid/vf_ccm.c Thu May 15 15:43:33 2014 (r266146) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ruslan Bukin + * Copyright (c) 2013-2014 Ruslan Bukin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -73,8 +73,8 @@ __FBSDID("$FreeBSD$"); #define CCM_CCGRN 12 #define CCM_CCGR(n) (0x40 + (n * 0x04)) /* Clock Gating Register */ -#define CCM_CMEOR(n) (0x70 + (n * 0x70)) /* Module Enable Override Reg */ -#define CCM_CCPGR(n) (0x90 + (n * 0x04)) /* Platform Clock Gating Reg */ +#define CCM_CMEOR(n) (0x70 + (n * 0x70)) /* Module Enable Override */ +#define CCM_CCPGR(n) (0x90 + (n * 0x04)) /* Platform Clock Gating */ #define CCM_CPPDSR 0x88 /* PLL PFD Disable Status Register */ #define CCM_CCOWR 0x8C /* CORE Wakeup Register */ @@ -100,6 +100,228 @@ __FBSDID("$FreeBSD$"); /* CCM_CSCDR1 */ #define ENET_TS_EN (1 << 23) #define RMII_CLK_EN (1 << 24) +#define SAI3_EN (1 << 19) + +/* CCM_CSCDR2 */ +#define ESAI_EN (1 << 30) +#define ESDHC1_EN (1 << 29) +#define ESDHC0_EN (1 << 28) +#define NFC_EN (1 << 9) +#define ESDHC1_DIV_S 20 +#define ESDHC1_DIV_M 0xf +#define ESDHC0_DIV_S 16 +#define ESDHC0_DIV_M 0xf + +/* CCM_CSCDR3 */ +#define DCU0_EN (1 << 19) + +#define QSPI1_EN (1 << 12) +#define QSPI1_DIV (1 << 11) +#define QSPI1_X2_DIV (1 << 10) +#define QSPI1_X4_DIV_M 0x3 +#define QSPI1_X4_DIV_S 8 + +#define QSPI0_EN (1 << 4) +#define QSPI0_DIV (1 << 3) +#define QSPI0_X2_DIV (1 << 2) +#define QSPI0_X4_DIV_M 0x3 +#define QSPI0_X4_DIV_S 0 + +#define SAI3_DIV_SHIFT 12 +#define SAI3_DIV_MASK 0xf +#define ESAI_DIV_SHIFT 24 +#define ESAI_DIV_MASK 0xf + +#define PLL4_CLK_DIV_SHIFT 6 +#define PLL4_CLK_DIV_MASK 0x7 + +#define IPG_CLK_DIV_SHIFT 11 +#define IPG_CLK_DIV_MASK 0x3 + +#define ESAI_CLK_SEL_SHIFT 20 +#define ESAI_CLK_SEL_MASK 0x3 + +#define SAI3_CLK_SEL_SHIFT 6 +#define SAI3_CLK_SEL_MASK 0x3 + +#define CKO1_EN (1 << 10) +#define CKO1_DIV_MASK 0xf +#define CKO1_DIV_SHIFT 6 +#define CKO1_SEL_MASK 0x3f +#define CKO1_SEL_SHIFT 0 +#define CKO1_PLL4_MAIN 0x6 +#define CKO1_PLL4_DIVD 0x7 + +struct clk { + uint32_t reg; + uint32_t enable_reg; + uint32_t div_mask; + uint32_t div_shift; + uint32_t div_val; + uint32_t sel_reg; + uint32_t sel_mask; + uint32_t sel_shift; + uint32_t sel_val; +}; + +/* + PLL4 clock divider (before switching the clocks should be gated) + 000 Divide by 1 (only if PLL frequency less than or equal to 650 MHz) + 001 Divide by 4 + 010 Divide by 6 + 011 Divide by 8 + 100 Divide by 10 + 101 Divide by 12 + 110 Divide by 14 + 111 Divide by 16 +*/ + +static struct clk pll4_clk = { + .reg = CCM_CACRR, + .enable_reg = 0, + .div_mask = PLL4_CLK_DIV_MASK, + .div_shift = PLL4_CLK_DIV_SHIFT, + .div_val = 5, /* Divide by 12 */ + .sel_reg = 0, + .sel_mask = 0, + .sel_shift = 0, + .sel_val = 0, +}; + +static struct clk sai3_clk = { + .reg = CCM_CSCDR1, + .enable_reg = SAI3_EN, + .div_mask = SAI3_DIV_MASK, + .div_shift = SAI3_DIV_SHIFT, + .div_val = 1, + .sel_reg = CCM_CSCMR1, + .sel_mask = SAI3_CLK_SEL_MASK, + .sel_shift = SAI3_CLK_SEL_SHIFT, + .sel_val = 0x3, /* Divided PLL4 main clock */ +}; + +static struct clk cko1_clk = { + .reg = CCM_CCOSR, + .enable_reg = CKO1_EN, + .div_mask = CKO1_DIV_MASK, + .div_shift = CKO1_DIV_SHIFT, + .div_val = 1, + .sel_reg = CCM_CCOSR, + .sel_mask = CKO1_SEL_MASK, + .sel_shift = CKO1_SEL_SHIFT, + .sel_val = CKO1_PLL4_DIVD, +}; + +static struct clk esdhc0_clk = { + .reg = CCM_CSCDR2, + .enable_reg = ESDHC0_EN, + .div_mask = ESDHC0_DIV_M, + .div_shift = ESDHC0_DIV_S, + .div_val = 0x9, + .sel_reg = 0, + .sel_mask = 0, + .sel_shift = 0, + .sel_val = 0, +}; + +static struct clk esdhc1_clk = { + .reg = CCM_CSCDR2, + .enable_reg = ESDHC1_EN, + .div_mask = ESDHC1_DIV_M, + .div_shift = ESDHC1_DIV_S, + .div_val = 0x9, + .sel_reg = 0, + .sel_mask = 0, + .sel_shift = 0, + .sel_val = 0, +}; + +static struct clk qspi0_clk = { + .reg = CCM_CSCDR3, + .enable_reg = QSPI0_EN, + .div_mask = 0, + .div_shift = 0, + .div_val = 0, + .sel_reg = 0, + .sel_mask = 0, + .sel_shift = 0, + .sel_val = 0, +}; + +static struct clk dcu0_clk = { + .reg = CCM_CSCDR3, + .enable_reg = DCU0_EN, + .div_mask = 0x7, + .div_shift = 16, /* DCU0_DIV */ + .div_val = 0, /* divide by 1 */ + .sel_reg = 0, + .sel_mask = 0, + .sel_shift = 0, + .sel_val = 0, +}; + +static struct clk enet_clk = { + .reg = CCM_CSCDR1, + .enable_reg = (ENET_TS_EN | RMII_CLK_EN), + .div_mask = 0, + .div_shift = 0, + .div_val = 0, + .sel_reg = 0, + .sel_mask = 0, + .sel_shift = 0, + .sel_val = 0, +}; + +static struct clk nand_clk = { + .reg = CCM_CSCDR2, + .enable_reg = NFC_EN, + .div_mask = 0, + .div_shift = 0, + .div_val = 0, + .sel_reg = 0, + .sel_mask = 0, + .sel_shift = 0, + .sel_val = 0, +}; + +/* + Divider to generate ESAI clock + 0000 Divide by 1 + 0001 Divide by 2 + ... ... + 1111 Divide by 16 +*/ + +static struct clk esai_clk = { + .reg = CCM_CSCDR2, + .enable_reg = ESAI_EN, + .div_mask = ESAI_DIV_MASK, + .div_shift = ESAI_DIV_SHIFT, + .div_val = 3, /* Divide by 4 */ + .sel_reg = CCM_CSCMR1, + .sel_mask = ESAI_CLK_SEL_MASK, + .sel_shift = ESAI_CLK_SEL_SHIFT, + .sel_val = 0x3, /* Divided PLL4 main clock */ +}; + +struct clock_entry { + char *name; + struct clk *clk; +}; + +static struct clock_entry clock_map[] = { + {"pll4", &pll4_clk}, + {"sai3", &sai3_clk}, + {"cko1", &cko1_clk}, + {"esdhc0", &esdhc0_clk}, + {"esdhc1", &esdhc1_clk}, + {"qspi0", &qspi0_clk}, + {"dcu0", &dcu0_clk}, + {"enet", &enet_clk}, + {"nand", &nand_clk}, + {"esai", &esai_clk}, + {NULL, NULL} +}; struct ccm_softc { struct resource *res[1]; @@ -125,6 +347,83 @@ ccm_probe(device_t dev) } static int +set_clock(struct ccm_softc *sc, char *name) +{ + struct clk *clk; + int reg; + int i; + + for (i = 0; clock_map[i].name != NULL; i++) { + if (strcmp(clock_map[i].name, name) == 0) { +#if 0 + device_printf(sc->dev, "Configuring %s clk\n", name); +#endif + clk = clock_map[i].clk; + if (clk->sel_reg != 0) { + reg = READ4(sc, clk->sel_reg); + reg &= ~(clk->sel_mask << clk->sel_shift); + reg |= (clk->sel_val << clk->sel_shift); + WRITE4(sc, clk->sel_reg, reg); + }; + + reg = READ4(sc, clk->reg); + reg |= clk->enable_reg; + reg &= ~(clk->div_mask << clk->div_shift); + reg |= (clk->div_val << clk->div_shift); + WRITE4(sc, clk->reg, reg); + }; + }; + + return (0); +} + +static int +ccm_fdt_set(struct ccm_softc *sc) +{ + phandle_t child, parent, root; + int len; + char *fdt_config, *name; + + root = OF_finddevice("/"); + len = 0; + parent = root; + + /* Find 'clock_names' prop in the tree */ + for (child = OF_child(parent); child != 0; child = OF_peer(child)) { + + /* Find a 'leaf'. Start the search from this node. */ + while (OF_child(child)) { + parent = child; + child = OF_child(child); + } + + if (!fdt_is_enabled(child)) + continue; + + if ((len = OF_getproplen(child, "clock_names")) > 0) { + len = OF_getproplen(child, "clock_names"); + OF_getprop_alloc(child, "clock_names", 1, + (void **)&fdt_config); + + while (len > 0) { + name = fdt_config; + fdt_config += strlen(name) + 1; + len -= strlen(name) + 1; + set_clock(sc, name); + }; + }; + + if (OF_peer(child) == 0) { + /* No more siblings. */ + child = parent; + parent = OF_parent(child); + } + } + + return (0); +} + +static int ccm_attach(device_t dev) { struct ccm_softc *sc; @@ -163,10 +462,8 @@ ccm_attach(device_t dev) WRITE4(sc, CCM_CCGR(i), 0xffffffff); } - /* Enable ENET clocks */ - reg = READ4(sc, CCM_CSCDR1); - reg |= (ENET_TS_EN | RMII_CLK_EN); - WRITE4(sc, CCM_CSCDR1, reg); + /* Take and apply FDT clocks */ + ccm_fdt_set(sc); return (0); } Modified: stable/10/sys/arm/freescale/vybrid/vf_iomuxc.c ============================================================================== --- stable/10/sys/arm/freescale/vybrid/vf_iomuxc.c Thu May 15 15:41:42 2014 (r266145) +++ stable/10/sys/arm/freescale/vybrid/vf_iomuxc.c Thu May 15 15:43:33 2014 (r266146) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ruslan Bukin + * Copyright (c) 2013-2014 Ruslan Bukin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -67,16 +67,12 @@ __FBSDID("$FreeBSD$"); #define MUX_MODE_MASK 7 #define MUX_MODE_SHIFT 20 #define MUX_MODE_GPIO 0 -#define MUX_MODE_RMII 1 -#define MUX_MODE_RMII_CLKIN 2 #define MUX_MODE_VBUS_EN_OTG 2 #define PUS_22_KOHM_PULL_UP (3 << 4) #define DSE_25_OHM (6 << 6) -#define NET0_PAD_START 45 -#define NET1_PAD_START 54 -#define NET_PAD_N 9 +#define MAX_MUX_LEN 1024 struct iomuxc_softc { struct resource *tmr_res[1]; @@ -115,11 +111,62 @@ configure_pad(struct iomuxc_softc *sc, i } static int +pinmux_set(struct iomuxc_softc *sc) +{ + phandle_t child, parent, root; + pcell_t iomux_config[MAX_MUX_LEN]; + int len; + int values; + int pin; + int mux_mode; + int i; + + root = OF_finddevice("/"); + len = 0; + parent = root; + + /* Find 'iomux_config' prop in the nodes */ + for (child = OF_child(parent); child != 0; child = OF_peer(child)) { + + /* Find a 'leaf'. Start the search from this node. */ + while (OF_child(child)) { + parent = child; + child = OF_child(child); + } + + if (!fdt_is_enabled(child)) + continue; + + if ((len = OF_getproplen(child, "iomux_config")) > 0) { + OF_getprop(child, "iomux_config", &iomux_config, len); + + values = len / (sizeof(uint32_t)); + for (i = 0; i < values; i += 2) { + pin = fdt32_to_cpu(iomux_config[i]); + mux_mode = fdt32_to_cpu(iomux_config[i+1]); +#if 0 + device_printf(sc->dev, "Set pin %d to ALT%d\n", + pin, mux_mode); +#endif + configure_pad(sc, IOMUXC(pin), mux_mode); + } + } + + if (OF_peer(child) == 0) { + /* No more siblings. */ + child = parent; + parent = OF_parent(child); + } + } + + return (0); +} + +static int iomuxc_attach(device_t dev) { struct iomuxc_softc *sc; int reg; - int i; sc = device_get_softc(dev); sc->dev = dev; @@ -138,18 +185,7 @@ iomuxc_attach(device_t dev) reg = (PKE | PUE | PUS_22_KOHM_PULL_UP | DSE_25_OHM | OBE); WRITE4(sc, IOMUXC_PTA7, reg); - /* NET */ - configure_pad(sc, IOMUXC_PTA6, MUX_MODE_RMII_CLKIN); - - /* NET0 */ - for (i = NET0_PAD_START; i <= (NET0_PAD_START + NET_PAD_N); i++) { - configure_pad(sc, IOMUXC(i), MUX_MODE_RMII); - } - - /* NET1 */ - for (i = NET1_PAD_START; i <= (NET1_PAD_START + NET_PAD_N); i++) { - configure_pad(sc, IOMUXC(i), MUX_MODE_RMII); - } + pinmux_set(sc); return (0); } Modified: stable/10/sys/boot/fdt/dts/vybrid-cosmic.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/vybrid-cosmic.dts Thu May 15 15:41:42 2014 (r266145) +++ stable/10/sys/boot/fdt/dts/vybrid-cosmic.dts Thu May 15 15:43:33 2014 (r266146) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ruslan Bukin + * Copyright (c) 2013-2014 Ruslan Bukin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -39,12 +39,37 @@ }; SOC: vybrid { - serial0: serial@40027000 { - status = "disabled"; + serial1: serial@40028000 { + status = "okay"; }; - fec0: ethernet@400D0000 { - status = "disabled"; + fec1: ethernet@400D1000 { + status = "okay"; + iomux_config = < 54 0x1 55 0x1 + 56 0x1 57 0x1 + 58 0x1 59 0x1 + 60 0x1 61 0x1 + 62 0x1 0 0x2 >; + }; + + esai: esai@40062000 { + status = "okay"; + }; + + edma1: edma@40098000 { + status = "okay"; + }; + + tcon0: tcon@4003D000 { + status = "okay"; + }; + + dcu0: dcu4@40058000 { + status = "okay"; + }; + + adc0: adc@4003B000 { + status = "okay"; }; }; Modified: stable/10/sys/boot/fdt/dts/vybrid.dtsi ============================================================================== --- stable/10/sys/boot/fdt/dts/vybrid.dtsi Thu May 15 15:41:42 2014 (r266145) +++ stable/10/sys/boot/fdt/dts/vybrid.dtsi Thu May 15 15:43:33 2014 (r266146) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ruslan Bukin + * Copyright (c) 2013-2014 Ruslan Bukin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -28,7 +28,7 @@ / { model = "Freescale Vybrid Family"; - compatible = "freescale,vybrid", "fsl,vf"; + compatible = "freescale,vybrid", "fsl,mvf"; #address-cells = <1>; #size-cells = <1>; @@ -38,6 +38,15 @@ soc = &SOC; serial0 = &serial0; serial1 = &serial1; + sai0 = &sai0; + sai1 = &sai1; + sai2 = &sai2; + sai3 = &sai3; + esai = &esai; + adc0 = &adc0; + adc1 = &adc1; + edma0 = &edma0; + edma1 = &edma1; src = &SRC; }; @@ -74,6 +83,7 @@ ccm@4006b000 { compatible = "fsl,mvf600-ccm"; reg = <0x4006b000 0x1000>; + clock_names = "pll4"; }; mp_tmr@40002100 { @@ -87,6 +97,32 @@ interrupt-parent = < &GIC >; }; + dmamux@40024000 { + compatible = "fsl,mvf600-dmamux"; + reg = <0x40024000 0x100>, + <0x40025000 0x100>, + <0x400A1000 0x100>, + <0x400A2000 0x100>; + }; + + edma0: edma@40018000 { + compatible = "fsl,mvf600-edma"; + reg = <0x40018000 0x1000>, + <0x40019000 0x1000>; /* TCD */ + interrupts = < 40 41 >; + interrupt-parent = <&GIC>; + status = "disabled"; + }; + + edma1: edma@40098000 { + compatible = "fsl,mvf600-edma"; + reg = <0x40098000 0x1000>, + <0x40099000 0x1000>; /* TCD */ + interrupts = < 42 43 >; + interrupt-parent = <&GIC>; + status = "disabled"; + }; + pit@40037000 { compatible = "fsl,mvf600-pit"; reg = <0x40037000 0x1000>; @@ -115,7 +151,6 @@ gpio-controller; interrupts = < 139 140 141 142 143 >; interrupt-parent = <&GIC>; - }; nand@400E0000 { @@ -125,6 +160,8 @@ reg = <0x400E0000 0x10000>; interrupts = < 115 >; interrupt-parent = <&GIC>; + clock_names = "nand"; + status = "disabled"; partition@40000 { reg = <0x40000 0x200000>; /* 2MB */ @@ -146,7 +183,6 @@ reg = <0xe40000 0x1e000000>; /* 480MB */ label = "root"; }; - }; sdhci0: sdhci@400B1000 { @@ -155,6 +191,8 @@ interrupts = < 59 >; interrupt-parent = <&GIC>; clock-frequency = <50000000>; + status = "disabled"; + clock_names = "esdhc0"; }; sdhci1: sdhci@400B2000 { @@ -163,6 +201,11 @@ interrupts = < 60 >; interrupt-parent = <&GIC>; clock-frequency = <50000000>; + status = "disabled"; + clock_names = "esdhc1"; + iomux_config = < 14 0x5 15 0x5 + 16 0x5 17 0x5 + 18 0x5 19 0x5 >; }; serial0: serial@40027000 { @@ -172,6 +215,7 @@ interrupt-parent = <&GIC>; current-speed = <115200>; clock-frequency = < 24000000 >; + status = "disabled"; }; serial1: serial@40028000 { @@ -181,6 +225,7 @@ interrupt-parent = <&GIC>; current-speed = <115200>; clock-frequency = < 24000000 >; + status = "disabled"; }; usb@40034000 { @@ -208,6 +253,13 @@ interrupt-parent = <&GIC>; phy-mode = "rmii"; phy-disable-preamble; + status = "disabled"; + clock_names = "enet"; + iomux_config = < 45 0x1 46 0x1 + 47 0x1 48 0x1 + 49 0x1 50 0x1 + 51 0x1 52 0x1 + 53 0x1 >; }; fec1: ethernet@400D1000 { @@ -217,7 +269,145 @@ interrupt-parent = <&GIC>; phy-mode = "rmii"; phy-disable-preamble; + status = "disabled"; + clock_names = "enet"; + iomux_config = < 54 0x1 55 0x1 + 56 0x1 57 0x1 + 58 0x1 59 0x1 + 60 0x1 61 0x1 + 62 0x1 >; + }; + + sai0: sai@4002F000 { + compatible = "fsl,mvf600-sai"; + reg = <0x4002F000 0x1000>; + interrupts = < 116 >; + interrupt-parent = <&GIC>; + status = "disabled"; + }; + + sai1: sai@40030000 { + compatible = "fsl,mvf600-sai"; + reg = <0x40030000 0x1000>; + interrupts = < 117 >; + interrupt-parent = <&GIC>; + status = "disabled"; + }; + + sai2: sai@40031000 { + compatible = "fsl,mvf600-sai"; + reg = <0x40031000 0x1000>; + interrupts = < 118 >; + interrupt-parent = <&GIC>; + status = "disabled"; + }; + + sai3: sai@40032000 { + compatible = "fsl,mvf600-sai"; + reg = <0x40032000 0x1000>; + interrupts = < 119 >; + interrupt-parent = <&GIC>; + status = "disabled"; + clock_names = "sai3", "cko1"; + iomux_config = < 16 0x2 + 19 0x2 + 21 0x2 + 40 0x4 >; /* CKO1 */ + }; + + esai: esai@40062000 { + compatible = "fsl,mvf600-esai"; + reg = <0x40062000 0x1000>; + interrupts = < 120 >; + interrupt-parent = <&GIC>; + status = "disabled"; + clock_names = "esai"; + iomux_config = < 45 0x4 46 0x4 + 47 0x4 48 0x4 + 49 0x4 50 0x4 + 51 0x4 52 0x4 + 78 0x3 40 0x4>; + }; + + spi0: spi@4002C000 { + compatible = "fsl,mvf600-spi"; + reg = <0x4002C000 0x1000>; + interrupts = < 99 >; + interrupt-parent = <&GIC>; + status = "disabled"; + iomux_config = < 40 0x1 41 0x1 + 42 0x1 43 0x1 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu May 15 15:47:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D9C5E88; Thu, 15 May 2014 15:47:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19883254B; Thu, 15 May 2014 15:47:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FFlrAZ059187; Thu, 15 May 2014 15:47:53 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FFlqY7059185; Thu, 15 May 2014 15:47:52 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201405151547.s4FFlqY7059185@svn.freebsd.org> From: Luiz Otavio O Souza Date: Thu, 15 May 2014 15:47:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266148 - in stable/10/sys/arm/ti: . am335x X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 15:47:53 -0000 Author: loos Date: Thu May 15 15:47:52 2014 New Revision: 266148 URL: http://svnweb.freebsd.org/changeset/base/266148 Log: MFC r259125, r264019, r264083, r264153, r264197 r259125: Fix a few typos on the scm (control module) pin mux definitions. r264019: Fix some of the style(9) problems on ti_gpio. Remove redundant code and declarations. r264083: Move the GPIO bank initialization to a new function to make easier to detect errors. Reset the GPIO module during the initialization. This is guaranteed to be the same as a hardware reset. Tested on AM335x (BBB) and checked against the omap3 and omap4 TRM. Do a better job freeing resources when there are errors and on ti_gpio_detach(). r264153: - Fix the setup of interrupts for banks 2 and 3 on AM335x. On AM335x each one of the four GPIO banks has two physical interrupt lines, so we now allocate resources and setup our interrupt handler for all the (8) available interrupts. On OMAP3 and OMAP4 there is only one interrupt for each GPIO bank (6 banks, 6 interrupts), but there are two set of registers where the first one is used to setup the delivery of interrupts to the MPU and the second set, setup the delivery of interrupts to the DSP. On AM335x, each set of registers controls each one of the interrupt lines. - Remove nonexistent registers for OMAP4 and AM335x, replace their use with the correct ones for these SoCs. - Remove stray whitespace. r264197: Partially revert r264083. While it is the recommended initialization procedure, it hangs on the reset of the second GPIO module on pandaboard. Removes the module reset for now as more investigation is needed. Modified: stable/10/sys/arm/ti/am335x/am335x_scm_padconf.c stable/10/sys/arm/ti/ti_gpio.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/ti/am335x/am335x_scm_padconf.c ============================================================================== --- stable/10/sys/arm/ti/am335x/am335x_scm_padconf.c Thu May 15 15:45:45 2014 (r266147) +++ stable/10/sys/arm/ti/am335x/am335x_scm_padconf.c Thu May 15 15:47:52 2014 (r266148) @@ -170,8 +170,8 @@ const struct ti_scm_padconf ti_padconf_d _PIN(0x948, "MDIO", 0, 7, "mdio_data", "timer6", "uart5_rxd", "uart3_ctsn", "mmc0_sdcd","mmc1_cmd", "mmc2_cmd","gpio0_0"), _PIN(0x94c, "MDC", 1, 7, "mdio_clk", "timer5", "uart5_txd", "uart3_rtsn", "mmc0_sdwp", "mmc1_clk", "mmc2_clk", "gpio0_1"), _PIN(0x950, "SPI0_SCLK", 2, 7, "spi0_sclk", "uart2_rxd", "I2C2_SDA", "ehrpwm0A", "pr1_uart0_cts_n", "pr1_edio_sof", "EMU2", "gpio0_2"), - _PIN(0x954, "SPI0_D0", 3, 7, "spi0_d0", "uart2_txd", "i2C2_SCL", "ehrpwm0B", "pr1_uart0_rts_n", "pr1_edio_latch_in", "EMU3", "gpio0_3"), - _PIN(0x958, "SPIO_D1", 4, 7, "spi0_d1", "mmc1_sdwp", "I2C1_SDA", "ehrpwm0_tripzone_input", "pr1_uart0_rxd", "pr1_edio_data_in0", "pr1_edio_data_out0", "gpio0_4"), + _PIN(0x954, "SPI0_D0", 3, 7, "spi0_d0", "uart2_txd", "I2C2_SCL", "ehrpwm0B", "pr1_uart0_rts_n", "pr1_edio_latch_in", "EMU3", "gpio0_3"), + _PIN(0x958, "SPI0_D1", 4, 7, "spi0_d1", "mmc1_sdwp", "I2C1_SDA", "ehrpwm0_tripzone_input", "pr1_uart0_rxd", "pr1_edio_data_in0", "pr1_edio_data_out0", "gpio0_4"), _PIN(0x95c, "SPI0_CS0", 5, 7, "spi0_cs0", "mmc2_sdwp", "I2C1_SCL", "ehrpwm0_synci", "pr1_uart0_txd", "pr1_edio_data_in1", "pr1_edio_data_out1", "gpio0_5"), _PIN(0x960, "SPI0_CS1", 6, 7, "spi0_cs1", "uart3_rxd", "eCAP1_in_PWM1_out", "mcc0_pow", "xdm_event_intr2", "mmc0_sdcd", "EMU4", "gpio0_6"), _PIN(0x964, "ECAP0_IN_PWM0_OUT",7, 7, "eCAP0_in_PWM0_out", "uart3_txd", "spi1_cs1", "pr1_ecap0_ecap_capin_apwm_o", "spi1_sclk", "mmc0_sdwp", "xdma_event_intr2", "gpio0_7"), @@ -180,7 +180,7 @@ const struct ti_scm_padconf ti_padconf_d _PIN(0x970, "UART0_rxd", 42, 7, "uart0_rxd", "spi1_cs0", "dcan0_tx", "I2C2_SDA", "eCAP2_in_PWM2_out", "pr1_pru1_pru_r30_14", "pr1_pru1_pru_r31_14", "gpio1_10"), _PIN(0x974, "UART0_txd", 43, 7, "uart0_txd", "spi1_cs1", "dcan0_rx", "I2C2_SCL", "eCAP1_in_PWM1_out", "pr1_pru1_pru_r30_15", "pr1_pru1_pru_r31_15", "gpio1_11"), _PIN(0x978, "UART1_CTSn", 12, 7, "uart1_ctsn", "timer6_mux1", "dcan0_tx", "I2C2_SDA", "spi1_cs0", "pr1_uart0_cts_n", "pr1_edc_latch0_in", "gpio0_12"), - _PIN(0x97c, "UART1_RTSn", 13, 7, "uart1_rtsn", "timer5_mux1", "dcan0_rx", "I2C2_SCL", "spi1_cs1", "pr1_uart0_rts_n ", "pr1_edc_latch1_in", "gpio0_13"), + _PIN(0x97c, "UART1_RTSn", 13, 7, "uart1_rtsn", "timer5_mux1", "dcan0_rx", "I2C2_SCL", "spi1_cs1", "pr1_uart0_rts_n", "pr1_edc_latch1_in", "gpio0_13"), _PIN(0x980, "UART1_RXD", 14, 7, "uart1_rxd", "mmc1_sdwp", "dcan1_tx", "I2C1_SDA", NULL, "pr1_uart0_rxd", "pr1_pru1_pru_r31_16", "gpio0_14"), _PIN(0x984, "UART1_TXD", 15, 7, "uart1_txd", "mmc2_sdwp", "dcan1_rx", "I2C1_SCL", NULL, "pr1_uart0_txd", "pr1_pru0_pru_r31_16", "gpio0_15"), _PIN(0x988, "I2C0_SDA", 101, 7, "I2C0_SDA", "timer4", "uart2_ctsn", "eCAP2_in_PWM2_out", NULL, NULL, NULL, "gpio3_5"), Modified: stable/10/sys/arm/ti/ti_gpio.c ============================================================================== --- stable/10/sys/arm/ti/ti_gpio.c Thu May 15 15:45:45 2014 (r266147) +++ stable/10/sys/arm/ti/ti_gpio.c Thu May 15 15:47:52 2014 (r266148) @@ -66,92 +66,88 @@ __FBSDID("$FreeBSD$"); #include "gpio_if.h" - /* Register definitions */ -#define TI_GPIO_REVISION 0x0000 -#define TI_GPIO_SYSCONFIG 0x0010 +/* Register definitions */ +#define TI_GPIO_REVISION 0x0000 +#define TI_GPIO_SYSCONFIG 0x0010 #if defined(SOC_OMAP3) -#define TI_GPIO_REVISION 0x0000 -#define TI_GPIO_SYSCONFIG 0x0010 -#define TI_GPIO_SYSSTATUS 0x0014 -#define TI_GPIO_IRQSTATUS1 0x0018 -#define TI_GPIO_IRQENABLE1 0x001C -#define TI_GPIO_WAKEUPENABLE 0x0020 -#define TI_GPIO_IRQSTATUS2 0x0028 -#define TI_GPIO_IRQENABLE2 0x002C -#define TI_GPIO_CTRL 0x0030 -#define TI_GPIO_OE 0x0034 -#define TI_GPIO_DATAIN 0x0038 -#define TI_GPIO_DATAOUT 0x003C -#define TI_GPIO_LEVELDETECT0 0x0040 -#define TI_GPIO_LEVELDETECT1 0x0044 -#define TI_GPIO_RISINGDETECT 0x0048 -#define TI_GPIO_FALLINGDETECT 0x004C -#define TI_GPIO_DEBOUNCENABLE 0x0050 -#define TI_GPIO_DEBOUNCINGTIME 0x0054 -#define TI_GPIO_CLEARIRQENABLE1 0x0060 -#define TI_GPIO_SETIRQENABLE1 0x0064 -#define TI_GPIO_CLEARIRQENABLE2 0x0070 -#define TI_GPIO_SETIRQENABLE2 0x0074 -#define TI_GPIO_CLEARWKUENA 0x0080 -#define TI_GPIO_SETWKUENA 0x0084 -#define TI_GPIO_CLEARDATAOUT 0x0090 -#define TI_GPIO_SETDATAOUT 0x0094 +#define TI_GPIO_SYSSTATUS 0x0014 +#define TI_GPIO_IRQSTATUS1 0x0018 +#define TI_GPIO_IRQENABLE1 0x001C +#define TI_GPIO_WAKEUPENABLE 0x0020 +#define TI_GPIO_IRQSTATUS2 0x0028 +#define TI_GPIO_IRQENABLE2 0x002C +#define TI_GPIO_CTRL 0x0030 +#define TI_GPIO_OE 0x0034 +#define TI_GPIO_DATAIN 0x0038 +#define TI_GPIO_DATAOUT 0x003C +#define TI_GPIO_LEVELDETECT0 0x0040 +#define TI_GPIO_LEVELDETECT1 0x0044 +#define TI_GPIO_RISINGDETECT 0x0048 +#define TI_GPIO_FALLINGDETECT 0x004C +#define TI_GPIO_DEBOUNCENABLE 0x0050 +#define TI_GPIO_DEBOUNCINGTIME 0x0054 +#define TI_GPIO_CLEARIRQENABLE1 0x0060 +#define TI_GPIO_SETIRQENABLE1 0x0064 +#define TI_GPIO_CLEARIRQENABLE2 0x0070 +#define TI_GPIO_SETIRQENABLE2 0x0074 +#define TI_GPIO_CLEARWKUENA 0x0080 +#define TI_GPIO_SETWKUENA 0x0084 +#define TI_GPIO_CLEARDATAOUT 0x0090 +#define TI_GPIO_SETDATAOUT 0x0094 #elif defined(SOC_OMAP4) || defined(SOC_TI_AM335X) -#define TI_GPIO_IRQSTATUS_RAW_0 0x0024 -#define TI_GPIO_IRQSTATUS_RAW_1 0x0028 -#define TI_GPIO_IRQSTATUS_0 0x002C -#define TI_GPIO_IRQSTATUS_1 0x0030 -#define TI_GPIO_IRQSTATUS_SET_0 0x0034 -#define TI_GPIO_IRQSTATUS_SET_1 0x0038 -#define TI_GPIO_IRQSTATUS_CLR_0 0x003C -#define TI_GPIO_IRQSTATUS_CLR_1 0x0040 -#define TI_GPIO_IRQWAKEN_0 0x0044 -#define TI_GPIO_IRQWAKEN_1 0x0048 -#define TI_GPIO_SYSSTATUS 0x0114 -#define TI_GPIO_IRQSTATUS1 0x0118 -#define TI_GPIO_IRQENABLE1 0x011C -#define TI_GPIO_WAKEUPENABLE 0x0120 -#define TI_GPIO_IRQSTATUS2 0x0128 -#define TI_GPIO_IRQENABLE2 0x012C -#define TI_GPIO_CTRL 0x0130 -#define TI_GPIO_OE 0x0134 -#define TI_GPIO_DATAIN 0x0138 -#define TI_GPIO_DATAOUT 0x013C -#define TI_GPIO_LEVELDETECT0 0x0140 -#define TI_GPIO_LEVELDETECT1 0x0144 -#define TI_GPIO_RISINGDETECT 0x0148 -#define TI_GPIO_FALLINGDETECT 0x014C -#define TI_GPIO_DEBOUNCENABLE 0x0150 -#define TI_GPIO_DEBOUNCINGTIME 0x0154 -#define TI_GPIO_CLEARIRQENABLE1 0x0160 -#define TI_GPIO_SETIRQENABLE1 0x0164 -#define TI_GPIO_CLEARIRQENABLE2 0x0170 -#define TI_GPIO_SETIRQENABLE2 0x0174 -#define TI_GPIO_CLEARWKUPENA 0x0180 -#define TI_GPIO_SETWKUENA 0x0184 -#define TI_GPIO_CLEARDATAOUT 0x0190 -#define TI_GPIO_SETDATAOUT 0x0194 +#define TI_GPIO_IRQSTATUS_RAW_0 0x0024 +#define TI_GPIO_IRQSTATUS_RAW_1 0x0028 +#define TI_GPIO_IRQSTATUS_0 0x002C +#define TI_GPIO_IRQSTATUS_1 0x0030 +#define TI_GPIO_IRQSTATUS_SET_0 0x0034 +#define TI_GPIO_IRQSTATUS_SET_1 0x0038 +#define TI_GPIO_IRQSTATUS_CLR_0 0x003C +#define TI_GPIO_IRQSTATUS_CLR_1 0x0040 +#define TI_GPIO_IRQWAKEN_0 0x0044 +#define TI_GPIO_IRQWAKEN_1 0x0048 +#define TI_GPIO_SYSSTATUS 0x0114 +#define TI_GPIO_IRQSTATUS1 0x0118 +#define TI_GPIO_IRQENABLE1 0x011C +#define TI_GPIO_WAKEUPENABLE 0x0120 +#define TI_GPIO_IRQSTATUS2 0x0128 +#define TI_GPIO_IRQENABLE2 0x012C +#define TI_GPIO_CTRL 0x0130 +#define TI_GPIO_OE 0x0134 +#define TI_GPIO_DATAIN 0x0138 +#define TI_GPIO_DATAOUT 0x013C +#define TI_GPIO_LEVELDETECT0 0x0140 +#define TI_GPIO_LEVELDETECT1 0x0144 +#define TI_GPIO_RISINGDETECT 0x0148 +#define TI_GPIO_FALLINGDETECT 0x014C +#define TI_GPIO_DEBOUNCENABLE 0x0150 +#define TI_GPIO_DEBOUNCINGTIME 0x0154 +#define TI_GPIO_CLEARWKUPENA 0x0180 +#define TI_GPIO_SETWKUENA 0x0184 +#define TI_GPIO_CLEARDATAOUT 0x0190 +#define TI_GPIO_SETDATAOUT 0x0194 #else #error "Unknown SoC" #endif - /*Other SoC Specific definitions*/ +/* Other SoC Specific definitions */ #if defined(SOC_OMAP3) -#define MAX_GPIO_BANKS 6 -#define FIRST_GPIO_BANK 1 -#define PINS_PER_BANK 32 -#define TI_GPIO_REV 0x00000025 +#define MAX_GPIO_BANKS 6 +#define FIRST_GPIO_BANK 1 +#define INTR_PER_BANK 1 +#define TI_GPIO_REV 0x00000025 #elif defined(SOC_OMAP4) -#define MAX_GPIO_BANKS 6 -#define FIRST_GPIO_BANK 1 -#define PINS_PER_BANK 32 -#define TI_GPIO_REV 0x50600801 +#define MAX_GPIO_BANKS 6 +#define FIRST_GPIO_BANK 1 +#define INTR_PER_BANK 1 +#define TI_GPIO_REV 0x50600801 #elif defined(SOC_TI_AM335X) -#define MAX_GPIO_BANKS 4 -#define FIRST_GPIO_BANK 0 -#define PINS_PER_BANK 32 -#define TI_GPIO_REV 0x50600801 +#define MAX_GPIO_BANKS 4 +#define FIRST_GPIO_BANK 0 +#define INTR_PER_BANK 2 +#define TI_GPIO_REV 0x50600801 #endif +#define PINS_PER_BANK 32 +#define MAX_GPIO_INTRS MAX_GPIO_BANKS * INTR_PER_BANK /** * ti_gpio_mem_spec - Resource specification used when allocating resources @@ -159,6 +155,15 @@ __FBSDID("$FreeBSD$"); * * This driver module can have up to six independent memory regions, each * region typically controls 32 GPIO pins. + * + * On OMAP3 and OMAP4 there is only one physical interrupt line per bank, + * but there are two set of registers which control the interrupt delivery + * to internal subsystems. The first set of registers control the + * interrupts delivery to the MPU and the second set control the + * interrupts delivery to the DSP. + * + * On AM335x there are two physical interrupt lines for each GPIO module. + * Each interrupt line is controlled by a set of registers. */ static struct resource_spec ti_gpio_mem_spec[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, @@ -176,9 +181,11 @@ static struct resource_spec ti_gpio_irq_ { SYS_RES_IRQ, 1, RF_ACTIVE | RF_OPTIONAL }, { SYS_RES_IRQ, 2, RF_ACTIVE | RF_OPTIONAL }, { SYS_RES_IRQ, 3, RF_ACTIVE | RF_OPTIONAL }, -#if !defined(SOC_TI_AM335X) { SYS_RES_IRQ, 4, RF_ACTIVE | RF_OPTIONAL }, { SYS_RES_IRQ, 5, RF_ACTIVE | RF_OPTIONAL }, +#if defined(SOC_TI_AM335X) + { SYS_RES_IRQ, 6, RF_ACTIVE | RF_OPTIONAL }, + { SYS_RES_IRQ, 7, RF_ACTIVE | RF_OPTIONAL }, #endif { -1, 0, 0 } }; @@ -189,34 +196,38 @@ static struct resource_spec ti_gpio_irq_ * This structure is allocated during driver attach. */ struct ti_gpio_softc { - device_t sc_dev; + device_t sc_dev; - /* The memory resource(s) for the PRCM register set, when the device is - * created the caller can assign up to 4 memory regions. + /* + * The memory resource(s) for the PRCM register set, when the device is + * created the caller can assign up to 6 memory regions depending on + * the SoC type. */ - struct resource* sc_mem_res[MAX_GPIO_BANKS]; - struct resource* sc_irq_res[MAX_GPIO_BANKS]; + struct resource *sc_mem_res[MAX_GPIO_BANKS]; + struct resource *sc_irq_res[MAX_GPIO_INTRS]; - /* The handle for the register IRQ handlers */ - void* sc_irq_hdl[MAX_GPIO_BANKS]; + /* The handle for the register IRQ handlers. */ + void *sc_irq_hdl[MAX_GPIO_INTRS]; - /* The following describes the H/W revision of each of the GPIO banks */ - uint32_t sc_revision[MAX_GPIO_BANKS]; + /* + * The following describes the H/W revision of each of the GPIO banks. + */ + uint32_t sc_revision[MAX_GPIO_BANKS]; - struct mtx sc_mtx; + struct mtx sc_mtx; }; /** * Macros for driver mutex locking */ -#define TI_GPIO_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) -#define TI_GPIO_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) -#define TI_GPIO_LOCK_INIT(_sc) \ +#define TI_GPIO_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) +#define TI_GPIO_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) +#define TI_GPIO_LOCK_INIT(_sc) \ mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->sc_dev), \ - "ti_gpio", MTX_DEF) -#define TI_GPIO_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx); -#define TI_GPIO_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED); -#define TI_GPIO_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED); + "ti_gpio", MTX_DEF) +#define TI_GPIO_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx) +#define TI_GPIO_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED) +#define TI_GPIO_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED) /** * ti_gpio_read_4 - reads a 16-bit value from one of the PADCONFS registers @@ -251,6 +262,20 @@ ti_gpio_write_4(struct ti_gpio_softc *sc bus_write_4(sc->sc_mem_res[bank], off, val); } +static inline void +ti_gpio_intr_clr(struct ti_gpio_softc *sc, unsigned int bank, uint32_t mask) +{ + + /* We clear both set of registers. */ +#if defined(SOC_OMAP4) || defined(SOC_TI_AM335X) + ti_gpio_write_4(sc, bank, TI_GPIO_IRQSTATUS_CLR_0, mask); + ti_gpio_write_4(sc, bank, TI_GPIO_IRQSTATUS_CLR_1, mask); +#else + ti_gpio_write_4(sc, bank, TI_GPIO_CLEARIRQENABLE1, mask); + ti_gpio_write_4(sc, bank, TI_GPIO_CLEARIRQENABLE2, mask); +#endif +} + /** * ti_gpio_pin_max - Returns the maximum number of GPIO pins * @dev: gpio device handle @@ -441,7 +466,6 @@ ti_gpio_pin_setflags(device_t dev, uint3 (GPIO_PIN_PULLUP|GPIO_PIN_PULLDOWN)) return (EINVAL); - TI_GPIO_LOCK(sc); /* Sanity check the pin number is valid */ @@ -464,7 +488,6 @@ ti_gpio_pin_setflags(device_t dev, uint3 reg_val &= ~mask; ti_gpio_write_4(sc, bank, TI_GPIO_OE, reg_val); - TI_GPIO_UNLOCK(sc); return (0); @@ -631,6 +654,97 @@ ti_gpio_probe(device_t dev) return (ENXIO); device_set_desc(dev, "TI General Purpose I/O (GPIO)"); + + return (0); +} + +static int +ti_gpio_attach_intr(device_t dev) +{ + int i; + struct ti_gpio_softc *sc; + + sc = device_get_softc(dev); + for (i = 0; i < MAX_GPIO_INTRS; i++) { + if (sc->sc_irq_res[i] == NULL) + break; + + /* + * Register our interrupt handler for each of the IRQ resources. + */ + if (bus_setup_intr(dev, sc->sc_irq_res[i], + INTR_TYPE_MISC | INTR_MPSAFE, NULL, ti_gpio_intr, sc, + &sc->sc_irq_hdl[i]) != 0) { + device_printf(dev, + "WARNING: unable to register interrupt handler\n"); + return (-1); + } + } + + return (0); +} + +static int +ti_gpio_detach_intr(device_t dev) +{ + int i; + struct ti_gpio_softc *sc; + + /* Teardown our interrupt handlers. */ + sc = device_get_softc(dev); + for (i = 0; i < MAX_GPIO_INTRS; i++) { + if (sc->sc_irq_res[i] == NULL) + break; + + if (sc->sc_irq_hdl[i]) { + bus_teardown_intr(dev, sc->sc_irq_res[i], + sc->sc_irq_hdl[i]); + } + } + + return (0); +} + +static int +ti_gpio_bank_init(device_t dev, int bank) +{ + int pin; + struct ti_gpio_softc *sc; + uint32_t flags, reg_oe; + + sc = device_get_softc(dev); + + /* Enable the interface and functional clocks for the module. */ + ti_prcm_clk_enable(GPIO0_CLK + FIRST_GPIO_BANK + bank); + + /* + * Read the revision number of the module. TI don't publish the + * actual revision numbers, so instead the values have been + * determined by experimentation. + */ + sc->sc_revision[bank] = ti_gpio_read_4(sc, bank, TI_GPIO_REVISION); + + /* Check the revision. */ + if (sc->sc_revision[bank] != TI_GPIO_REV) { + device_printf(dev, "Warning: could not determine the revision " + "of %u GPIO module (revision:0x%08x)\n", + bank, sc->sc_revision[bank]); + return (EINVAL); + } + + /* Disable interrupts for all pins. */ + ti_gpio_intr_clr(sc, bank, 0xffffffff); + + /* Init OE register based on pads configuration. */ + reg_oe = 0xffffffff; + for (pin = 0; pin < PINS_PER_BANK; pin++) { + ti_scm_padconf_get_gpioflags(PINS_PER_BANK * bank + pin, + &flags); + if (flags & GPIO_PIN_OUTPUT) + reg_oe &= ~(1UL << pin); + } + ti_gpio_write_4(sc, bank, TI_GPIO_OE, reg_oe); + return (0); } @@ -650,90 +764,56 @@ ti_gpio_probe(device_t dev) static int ti_gpio_attach(device_t dev) { - struct ti_gpio_softc *sc = device_get_softc(dev); + struct ti_gpio_softc *sc; unsigned int i; - int err = 0; - int pin; - uint32_t flags; - uint32_t reg_oe; + int err; + sc = device_get_softc(dev); sc->sc_dev = dev; TI_GPIO_LOCK_INIT(sc); - /* There are up to 6 different GPIO register sets located in different * memory areas on the chip. The memory range should have been set for * the driver when it was added as a child. */ - err = bus_alloc_resources(dev, ti_gpio_mem_spec, sc->sc_mem_res); - if (err) { + if (bus_alloc_resources(dev, ti_gpio_mem_spec, sc->sc_mem_res) != 0) { device_printf(dev, "Error: could not allocate mem resources\n"); return (ENXIO); } /* Request the IRQ resources */ - err = bus_alloc_resources(dev, ti_gpio_irq_spec, sc->sc_irq_res); - if (err) { + if (bus_alloc_resources(dev, ti_gpio_irq_spec, sc->sc_irq_res) != 0) { + bus_release_resources(dev, ti_gpio_mem_spec, sc->sc_mem_res); device_printf(dev, "Error: could not allocate irq resources\n"); return (ENXIO); } /* Setup the IRQ resources */ - for (i = 0; i < MAX_GPIO_BANKS; i++) { - if (sc->sc_irq_res[i] == NULL) - break; - - /* Register an interrupt handler for each of the IRQ resources */ - if ((bus_setup_intr(dev, sc->sc_irq_res[i], INTR_TYPE_MISC | INTR_MPSAFE, - NULL, ti_gpio_intr, sc, &(sc->sc_irq_hdl[i])))) { - device_printf(dev, "WARNING: unable to register interrupt handler\n"); - return (ENXIO); - } + if (ti_gpio_attach_intr(dev) != 0) { + ti_gpio_detach_intr(dev); + bus_release_resources(dev, ti_gpio_irq_spec, sc->sc_irq_res); + bus_release_resources(dev, ti_gpio_mem_spec, sc->sc_mem_res); + return (ENXIO); } - /* Store the device handle back in the sc */ - sc->sc_dev = dev; - /* We need to go through each block and ensure the clocks are running and * the module is enabled. It might be better to do this only when the * pins are configured which would result in less power used if the GPIO * pins weren't used ... */ - for (i = 0; i < MAX_GPIO_BANKS; i++) { + for (i = 0; i < MAX_GPIO_BANKS; i++) { if (sc->sc_mem_res[i] != NULL) { - - /* Enable the interface and functional clocks for the module */ - ti_prcm_clk_enable(GPIO0_CLK + FIRST_GPIO_BANK + i); - - /* Read the revision number of the module. TI don't publish the - * actual revision numbers, so instead the values have been - * determined by experimentation. - */ - sc->sc_revision[i] = ti_gpio_read_4(sc, i, TI_GPIO_REVISION); - - /* Check the revision */ - if (sc->sc_revision[i] != TI_GPIO_REV) { - device_printf(dev, "Warning: could not determine the revision" - "of %u GPIO module (revision:0x%08x)\n", - i, sc->sc_revision[i]); - continue; + /* Initialize the GPIO module. */ + err = ti_gpio_bank_init(dev, i); + if (err != 0) { + ti_gpio_detach_intr(dev); + bus_release_resources(dev, ti_gpio_irq_spec, + sc->sc_irq_res); + bus_release_resources(dev, ti_gpio_mem_spec, + sc->sc_mem_res); + return (err); } - - /* Disable interrupts for all pins */ - ti_gpio_write_4(sc, i, TI_GPIO_CLEARIRQENABLE1, 0xffffffff); - ti_gpio_write_4(sc, i, TI_GPIO_CLEARIRQENABLE2, 0xffffffff); - - /* Init OE register based on pads configuration */ - reg_oe = 0xffffffff; - for (pin = 0; pin < 32; pin++) { - ti_scm_padconf_get_gpioflags( - PINS_PER_BANK*i + pin, &flags); - if (flags & GPIO_PIN_OUTPUT) - reg_oe &= ~(1U << pin); - } - - ti_gpio_write_4(sc, i, TI_GPIO_OE, reg_oe); } } @@ -766,26 +846,21 @@ ti_gpio_detach(device_t dev) KASSERT(mtx_initialized(&sc->sc_mtx), ("gpio mutex not initialized")); /* Disable all interrupts */ - for (i = 0; i < MAX_GPIO_BANKS; i++) { - if (sc->sc_mem_res[i] != NULL) { - ti_gpio_write_4(sc, i, TI_GPIO_CLEARIRQENABLE1, 0xffffffff); - ti_gpio_write_4(sc, i, TI_GPIO_CLEARIRQENABLE2, 0xffffffff); - } + for (i = 0; i < MAX_GPIO_BANKS; i++) { + if (sc->sc_mem_res[i] != NULL) + ti_gpio_intr_clr(sc, i, 0xffffffff); } bus_generic_detach(dev); - /* Release the memory and IRQ resources */ - for (i = 0; i < MAX_GPIO_BANKS; i++) { - if (sc->sc_mem_res[i] != NULL) - bus_release_resource(dev, SYS_RES_MEMORY, i, sc->sc_mem_res[i]); - if (sc->sc_irq_res[i] != NULL) - bus_release_resource(dev, SYS_RES_IRQ, i, sc->sc_irq_res[i]); - } + /* Release the memory and IRQ resources. */ + ti_gpio_detach_intr(dev); + bus_release_resources(dev, ti_gpio_irq_spec, sc->sc_irq_res); + bus_release_resources(dev, ti_gpio_mem_spec, sc->sc_mem_res); TI_GPIO_LOCK_DESTROY(sc); - return(0); + return (0); } static phandle_t From owner-svn-src-stable@FreeBSD.ORG Thu May 15 16:11:23 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87EA0CD7; Thu, 15 May 2014 16:11:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70A1427C0; Thu, 15 May 2014 16:11:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FGBNva070031; Thu, 15 May 2014 16:11:23 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FGB6E1069906; Thu, 15 May 2014 16:11:06 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405151611.s4FGB6E1069906@svn.freebsd.org> From: Ian Lepore Date: Thu, 15 May 2014 16:11:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266152 - in stable/10/sys: arm/allwinner arm/allwinner/a20 arm/arm arm/broadcom/bcm2835 arm/freescale/imx arm/freescale/vybrid arm/lpc arm/mv arm/rockchip arm/samsung/exynos arm/ti arm... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 16:11:23 -0000 Author: ian Date: Thu May 15 16:11:06 2014 New Revision: 266152 URL: http://svnweb.freebsd.org/changeset/base/266152 Log: MFC r261410 Follow r261352 by updating all drivers which are children of simplebus to check the status property in their probe routines. Modified: stable/10/sys/arm/allwinner/a10_clk.c stable/10/sys/arm/allwinner/a10_ehci.c stable/10/sys/arm/allwinner/a10_gpio.c stable/10/sys/arm/allwinner/a10_wdog.c stable/10/sys/arm/allwinner/a20/a20_cpu_cfg.c stable/10/sys/arm/allwinner/aintc.c stable/10/sys/arm/arm/generic_timer.c stable/10/sys/arm/arm/gic.c stable/10/sys/arm/arm/mpcore_timer.c stable/10/sys/arm/arm/pl190.c stable/10/sys/arm/arm/pl310.c stable/10/sys/arm/broadcom/bcm2835/bcm2835_bsc.c stable/10/sys/arm/broadcom/bcm2835/bcm2835_dma.c stable/10/sys/arm/broadcom/bcm2835/bcm2835_gpio.c stable/10/sys/arm/broadcom/bcm2835/bcm2835_intr.c stable/10/sys/arm/broadcom/bcm2835/bcm2835_mbox.c stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c stable/10/sys/arm/broadcom/bcm2835/bcm2835_spi.c stable/10/sys/arm/broadcom/bcm2835/bcm2835_systimer.c stable/10/sys/arm/broadcom/bcm2835/bcm2835_wdog.c stable/10/sys/arm/freescale/imx/i2c.c stable/10/sys/arm/freescale/imx/imx51_ccm.c stable/10/sys/arm/freescale/imx/imx51_gpio.c stable/10/sys/arm/freescale/imx/imx51_iomux.c stable/10/sys/arm/freescale/imx/imx51_ipuv3.c stable/10/sys/arm/freescale/imx/imx51_ipuv3_fbd.c stable/10/sys/arm/freescale/imx/imx6_anatop.c stable/10/sys/arm/freescale/imx/imx6_ccm.c stable/10/sys/arm/freescale/imx/imx6_usbphy.c stable/10/sys/arm/freescale/imx/imx_gpt.c stable/10/sys/arm/freescale/imx/imx_nop_usbphy.c stable/10/sys/arm/freescale/imx/imx_sdhci.c stable/10/sys/arm/freescale/imx/imx_wdog.c stable/10/sys/arm/freescale/imx/tzic.c stable/10/sys/arm/freescale/vybrid/vf_anadig.c stable/10/sys/arm/freescale/vybrid/vf_ccm.c stable/10/sys/arm/freescale/vybrid/vf_ehci.c stable/10/sys/arm/freescale/vybrid/vf_gpio.c stable/10/sys/arm/freescale/vybrid/vf_iomuxc.c stable/10/sys/arm/freescale/vybrid/vf_mscm.c stable/10/sys/arm/freescale/vybrid/vf_nfc.c stable/10/sys/arm/freescale/vybrid/vf_src.c stable/10/sys/arm/lpc/if_lpe.c stable/10/sys/arm/lpc/lpc_dmac.c stable/10/sys/arm/lpc/lpc_fb.c stable/10/sys/arm/lpc/lpc_gpio.c stable/10/sys/arm/lpc/lpc_intc.c stable/10/sys/arm/lpc/lpc_mmc.c stable/10/sys/arm/lpc/lpc_ohci.c stable/10/sys/arm/lpc/lpc_pwr.c stable/10/sys/arm/lpc/lpc_rtc.c stable/10/sys/arm/lpc/lpc_spi.c stable/10/sys/arm/lpc/lpc_timer.c stable/10/sys/arm/mv/gpio.c stable/10/sys/arm/mv/ic.c stable/10/sys/arm/mv/mpic.c stable/10/sys/arm/mv/mv_sata.c stable/10/sys/arm/mv/mv_ts.c stable/10/sys/arm/mv/rtc.c stable/10/sys/arm/mv/timer.c stable/10/sys/arm/mv/twsi.c stable/10/sys/arm/rockchip/rk30xx_gpio.c stable/10/sys/arm/rockchip/rk30xx_grf.c stable/10/sys/arm/rockchip/rk30xx_pmu.c stable/10/sys/arm/rockchip/rk30xx_wdog.c stable/10/sys/arm/samsung/exynos/arch_timer.c stable/10/sys/arm/samsung/exynos/ehci_exynos5.c stable/10/sys/arm/ti/aintc.c stable/10/sys/arm/ti/am335x/am335x_dmtimer.c stable/10/sys/arm/ti/am335x/am335x_lcd.c stable/10/sys/arm/ti/am335x/am335x_prcm.c stable/10/sys/arm/ti/am335x/am335x_pwm.c stable/10/sys/arm/ti/am335x/am335x_usbss.c stable/10/sys/arm/ti/cpsw/if_cpsw.c stable/10/sys/arm/ti/omap4/omap4_prcm_clks.c stable/10/sys/arm/ti/ti_edma3.c stable/10/sys/arm/ti/ti_gpio.c stable/10/sys/arm/ti/ti_i2c.c stable/10/sys/arm/ti/ti_mbox.c stable/10/sys/arm/ti/ti_mmchs.c stable/10/sys/arm/ti/ti_pruss.c stable/10/sys/arm/ti/ti_scm.c stable/10/sys/arm/ti/ti_sdhci.c stable/10/sys/arm/ti/ti_sdma.c stable/10/sys/arm/ti/usb/omap_ehci.c stable/10/sys/arm/versatile/if_smc_fdt.c stable/10/sys/arm/versatile/pl050.c stable/10/sys/arm/versatile/sp804.c stable/10/sys/arm/versatile/versatile_clcd.c stable/10/sys/arm/versatile/versatile_pci.c stable/10/sys/arm/versatile/versatile_sic.c stable/10/sys/arm/xilinx/zy7_devcfg.c stable/10/sys/arm/xilinx/zy7_ehci.c stable/10/sys/arm/xilinx/zy7_gpio.c stable/10/sys/arm/xilinx/zy7_slcr.c stable/10/sys/dev/altera/atse/if_atse_fdt.c stable/10/sys/dev/altera/avgen/altera_avgen_fdt.c stable/10/sys/dev/altera/jtag_uart/altera_jtag_uart_fdt.c stable/10/sys/dev/altera/sdcard/altera_sdcard_fdt.c stable/10/sys/dev/ata/chipsets/ata-fsl.c stable/10/sys/dev/cesa/cesa.c stable/10/sys/dev/cfi/cfi_bus_fdt.c stable/10/sys/dev/fdt/simplebus.c stable/10/sys/dev/ffec/if_ffec.c stable/10/sys/dev/mge/if_mge.c stable/10/sys/dev/mvs/mvs_soc.c stable/10/sys/dev/quicc/quicc_bfe_fdt.c stable/10/sys/dev/sdhci/sdhci_fdt.c stable/10/sys/dev/sec/sec.c stable/10/sys/dev/terasic/de4led/terasic_de4led_fdt.c stable/10/sys/dev/terasic/mtl/terasic_mtl_fdt.c stable/10/sys/dev/tsec/if_tsec_fdt.c stable/10/sys/dev/uart/uart_bus_fdt.c stable/10/sys/dev/usb/controller/dwc_otg_fdt.c stable/10/sys/dev/usb/controller/ehci_fsl.c stable/10/sys/dev/usb/controller/ehci_imx.c stable/10/sys/dev/usb/controller/ehci_mv.c stable/10/sys/mips/beri/beri_pic.c stable/10/sys/mips/beri/beri_simplebus.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/allwinner/a10_clk.c ============================================================================== --- stable/10/sys/arm/allwinner/a10_clk.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/allwinner/a10_clk.c Thu May 15 16:11:06 2014 (r266152) @@ -69,6 +69,10 @@ static struct a10_ccm_softc *a10_ccm_sc static int a10_ccm_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "allwinner,sun4i-ccm")) { device_set_desc(dev, "Allwinner Clock Control Module"); return(BUS_PROBE_DEFAULT); Modified: stable/10/sys/arm/allwinner/a10_ehci.c ============================================================================== --- stable/10/sys/arm/allwinner/a10_ehci.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/allwinner/a10_ehci.c Thu May 15 16:11:06 2014 (r266152) @@ -93,6 +93,10 @@ bs_w_1_proto(reversed); static int a10_ehci_probe(device_t self) { + + if (!ofw_bus_status_okay(self)) + return (ENXIO); + if (!ofw_bus_is_compatible(self, "allwinner,usb-ehci")) return (ENXIO); Modified: stable/10/sys/arm/allwinner/a10_gpio.c ============================================================================== --- stable/10/sys/arm/allwinner/a10_gpio.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/allwinner/a10_gpio.c Thu May 15 16:11:06 2014 (r266152) @@ -410,6 +410,10 @@ a10_gpio_pin_toggle(device_t dev, uint32 static int a10_gpio_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "allwinner,sun4i-gpio")) return (ENXIO); Modified: stable/10/sys/arm/allwinner/a10_wdog.c ============================================================================== --- stable/10/sys/arm/allwinner/a10_wdog.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/allwinner/a10_wdog.c Thu May 15 16:11:06 2014 (r266152) @@ -93,6 +93,9 @@ static int a10wd_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "allwinner,sun4i-wdt")) { device_set_desc(dev, "Allwinner A10 Watchdog"); return (BUS_PROBE_DEFAULT); Modified: stable/10/sys/arm/allwinner/a20/a20_cpu_cfg.c ============================================================================== --- stable/10/sys/arm/allwinner/a20/a20_cpu_cfg.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/allwinner/a20/a20_cpu_cfg.c Thu May 15 16:11:06 2014 (r266152) @@ -70,6 +70,9 @@ static int a20_cpu_cfg_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "allwinner,sun7i-cpu-cfg")) { device_set_desc(dev, "A20 CPU Configuration Module"); return(BUS_PROBE_DEFAULT); Modified: stable/10/sys/arm/allwinner/aintc.c ============================================================================== --- stable/10/sys/arm/allwinner/aintc.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/allwinner/aintc.c Thu May 15 16:11:06 2014 (r266152) @@ -97,6 +97,10 @@ static struct a10_aintc_softc *a10_aintc static int a10_aintc_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "allwinner,sun4i-ic")) return (ENXIO); device_set_desc(dev, "A10 AINTC Interrupt Controller"); Modified: stable/10/sys/arm/arm/generic_timer.c ============================================================================== --- stable/10/sys/arm/arm/generic_timer.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/arm/generic_timer.c Thu May 15 16:11:06 2014 (r266152) @@ -244,6 +244,9 @@ static int arm_tmr_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "arm,armv7-timer")) return (ENXIO); Modified: stable/10/sys/arm/arm/gic.c ============================================================================== --- stable/10/sys/arm/arm/gic.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/arm/gic.c Thu May 15 16:11:06 2014 (r266152) @@ -129,6 +129,9 @@ static int arm_gic_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "arm,gic")) return (ENXIO); device_set_desc(dev, "ARM Generic Interrupt Controller"); Modified: stable/10/sys/arm/arm/mpcore_timer.c ============================================================================== --- stable/10/sys/arm/arm/mpcore_timer.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/arm/mpcore_timer.c Thu May 15 16:11:06 2014 (r266152) @@ -247,6 +247,10 @@ arm_tmr_intr(void *arg) static int arm_tmr_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "arm,mpcore-timers")) return (ENXIO); Modified: stable/10/sys/arm/arm/pl190.c ============================================================================== --- stable/10/sys/arm/arm/pl190.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/arm/pl190.c Thu May 15 16:11:06 2014 (r266152) @@ -78,6 +78,10 @@ static struct pl190_intc_softc *pl190_in static int pl190_intc_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "arm,versatile-vic")) return (ENXIO); device_set_desc(dev, "ARM PL190 VIC"); Modified: stable/10/sys/arm/arm/pl310.c ============================================================================== --- stable/10/sys/arm/arm/pl310.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/arm/pl310.c Thu May 15 16:11:06 2014 (r266152) @@ -281,6 +281,9 @@ static int pl310_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "arm,pl310")) return (ENXIO); device_set_desc(dev, "PL310 L2 cache controller"); Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_bsc.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Thu May 15 16:11:06 2014 (r266152) @@ -222,6 +222,9 @@ static int bcm_bsc_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "broadcom,bcm2835-bsc")) return (ENXIO); Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_dma.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_dma.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_dma.c Thu May 15 16:11:06 2014 (r266152) @@ -637,6 +637,9 @@ static int bcm_dma_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "broadcom,bcm2835-dma")) return (ENXIO); Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_gpio.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Thu May 15 16:11:06 2014 (r266152) @@ -674,6 +674,10 @@ bcm_gpio_get_reserved_pins(struct bcm_gp static int bcm_gpio_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "broadcom,bcm2835-gpio")) return (ENXIO); Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_intr.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_intr.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_intr.c Thu May 15 16:11:06 2014 (r266152) @@ -90,6 +90,10 @@ static struct bcm_intc_softc *bcm_intc_s static int bcm_intc_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "broadcom,bcm2835-armctrl-ic")) return (ENXIO); device_set_desc(dev, "BCM2835 Interrupt Controller"); Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_mbox.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Thu May 15 16:11:06 2014 (r266152) @@ -128,6 +128,9 @@ static int bcm_mbox_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "broadcom,bcm2835-mbox")) { device_set_desc(dev, "BCM2835 VideoCore Mailbox"); return(BUS_PROBE_DEFAULT); Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Thu May 15 16:11:06 2014 (r266152) @@ -151,6 +151,10 @@ bcm_dmamap_cb(void *arg, bus_dma_segment static int bcm_sdhci_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "broadcom,bcm2835-sdhci")) return (ENXIO); Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_spi.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_spi.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_spi.c Thu May 15 16:11:06 2014 (r266152) @@ -231,6 +231,9 @@ static int bcm_spi_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "broadcom,bcm2835-spi")) return (ENXIO); Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_systimer.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_systimer.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_systimer.c Thu May 15 16:11:06 2014 (r266152) @@ -186,6 +186,9 @@ static int bcm_systimer_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "broadcom,bcm2835-system-timer")) { device_set_desc(dev, "BCM2835 System Timer"); return (BUS_PROBE_DEFAULT); Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_wdog.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_wdog.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_wdog.c Thu May 15 16:11:06 2014 (r266152) @@ -86,6 +86,9 @@ static int bcmwd_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "broadcom,bcm2835-wdt")) { device_set_desc(dev, "BCM2708/2835 Watchdog"); return (BUS_PROBE_DEFAULT); Modified: stable/10/sys/arm/freescale/imx/i2c.c ============================================================================== --- stable/10/sys/arm/freescale/imx/i2c.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/freescale/imx/i2c.c Thu May 15 16:11:06 2014 (r266152) @@ -224,6 +224,9 @@ i2c_probe(device_t dev) { struct i2c_softc *sc; + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "fsl,imx-i2c")) return (ENXIO); Modified: stable/10/sys/arm/freescale/imx/imx51_ccm.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx51_ccm.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/freescale/imx/imx51_ccm.c Thu May 15 16:11:06 2014 (r266152) @@ -141,6 +141,9 @@ static int imxccm_match(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "fsl,imx51-ccm") && !ofw_bus_is_compatible(dev, "fsl,imx53-ccm")) return (ENXIO); Modified: stable/10/sys/arm/freescale/imx/imx51_gpio.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx51_gpio.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/freescale/imx/imx51_gpio.c Thu May 15 16:11:06 2014 (r266152) @@ -370,6 +370,9 @@ static int imx51_gpio_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "fsl,imx51-gpio") || ofw_bus_is_compatible(dev, "fsl,imx53-gpio")) { device_set_desc(dev, "i.MX515 GPIO Controller"); Modified: stable/10/sys/arm/freescale/imx/imx51_iomux.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx51_iomux.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/freescale/imx/imx51_iomux.c Thu May 15 16:11:06 2014 (r266152) @@ -106,6 +106,9 @@ static int iomux_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "fsl,imx51-iomux") && !ofw_bus_is_compatible(dev, "fsl,imx53-iomux")) return (ENXIO); Modified: stable/10/sys/arm/freescale/imx/imx51_ipuv3.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx51_ipuv3.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/freescale/imx/imx51_ipuv3.c Thu May 15 16:11:06 2014 (r266152) @@ -254,6 +254,9 @@ ipu3_fb_probe(device_t dev) { int error; + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "fsl,ipu3")) return (ENXIO); Modified: stable/10/sys/arm/freescale/imx/imx51_ipuv3_fbd.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx51_ipuv3_fbd.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/freescale/imx/imx51_ipuv3_fbd.c Thu May 15 16:11:06 2014 (r266152) @@ -184,6 +184,9 @@ static int ipu3_fb_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "fsl,ipu3")) return (ENXIO); Modified: stable/10/sys/arm/freescale/imx/imx6_anatop.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx6_anatop.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/freescale/imx/imx6_anatop.c Thu May 15 16:11:06 2014 (r266152) @@ -126,6 +126,9 @@ static int imx6_anatop_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "fsl,imx6q-anatop") == 0) return (ENXIO); Modified: stable/10/sys/arm/freescale/imx/imx6_ccm.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx6_ccm.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/freescale/imx/imx6_ccm.c Thu May 15 16:11:06 2014 (r266152) @@ -121,6 +121,9 @@ static int ccm_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "fsl,imx6q-ccm") == 0) return (ENXIO); Modified: stable/10/sys/arm/freescale/imx/imx6_usbphy.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx6_usbphy.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/freescale/imx/imx6_usbphy.c Thu May 15 16:11:06 2014 (r266152) @@ -160,6 +160,9 @@ static int usbphy_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "fsl,imx6q-usbphy") == 0) return (ENXIO); Modified: stable/10/sys/arm/freescale/imx/imx_gpt.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx_gpt.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/freescale/imx/imx_gpt.c Thu May 15 16:11:06 2014 (r266152) @@ -121,6 +121,9 @@ static int imx_gpt_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data != 0) { device_set_desc(dev, "Freescale i.MX GPT timer"); return (BUS_PROBE_DEFAULT); Modified: stable/10/sys/arm/freescale/imx/imx_nop_usbphy.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx_nop_usbphy.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/freescale/imx/imx_nop_usbphy.c Thu May 15 16:11:06 2014 (r266152) @@ -89,6 +89,9 @@ static int usbphy_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data != 0) { device_set_desc(dev, "Freescale USB PHY"); return (BUS_PROBE_DEFAULT); Modified: stable/10/sys/arm/freescale/imx/imx_sdhci.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx_sdhci.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/freescale/imx/imx_sdhci.c Thu May 15 16:11:06 2014 (r266152) @@ -643,6 +643,9 @@ static int imx_sdhci_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + switch (ofw_bus_search_compatible(dev, compat_data)->ocd_data) { case HWTYPE_ESDHC: device_set_desc(dev, "Freescale eSDHC controller"); Modified: stable/10/sys/arm/freescale/imx/imx_wdog.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx_wdog.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/freescale/imx/imx_wdog.c Thu May 15 16:11:06 2014 (r266152) @@ -130,6 +130,9 @@ static int imx_wdog_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "fsl,imx51-wdt") && !ofw_bus_is_compatible(dev, "fsl,imx53-wdt")) return (ENXIO); Modified: stable/10/sys/arm/freescale/imx/tzic.c ============================================================================== --- stable/10/sys/arm/freescale/imx/tzic.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/freescale/imx/tzic.c Thu May 15 16:11:06 2014 (r266152) @@ -76,6 +76,10 @@ static void tzic_post_filter(void *); static int tzic_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "fsl,tzic")) { device_set_desc(dev, "TrustZone Interrupt Controller"); return (BUS_PROBE_DEFAULT); Modified: stable/10/sys/arm/freescale/vybrid/vf_anadig.c ============================================================================== --- stable/10/sys/arm/freescale/vybrid/vf_anadig.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/freescale/vybrid/vf_anadig.c Thu May 15 16:11:06 2014 (r266152) @@ -114,6 +114,9 @@ static int anadig_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "fsl,mvf600-anadig")) return (ENXIO); Modified: stable/10/sys/arm/freescale/vybrid/vf_ccm.c ============================================================================== --- stable/10/sys/arm/freescale/vybrid/vf_ccm.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/freescale/vybrid/vf_ccm.c Thu May 15 16:11:06 2014 (r266152) @@ -339,6 +339,9 @@ static int ccm_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "fsl,mvf600-ccm")) return (ENXIO); Modified: stable/10/sys/arm/freescale/vybrid/vf_ehci.c ============================================================================== --- stable/10/sys/arm/freescale/vybrid/vf_ehci.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/freescale/vybrid/vf_ehci.c Thu May 15 16:11:06 2014 (r266152) @@ -176,6 +176,9 @@ static int vybrid_ehci_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "fsl,mvf600-usb-ehci") == 0) return (ENXIO); Modified: stable/10/sys/arm/freescale/vybrid/vf_gpio.c ============================================================================== --- stable/10/sys/arm/freescale/vybrid/vf_gpio.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/freescale/vybrid/vf_gpio.c Thu May 15 16:11:06 2014 (r266152) @@ -123,6 +123,9 @@ static int vf_gpio_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "fsl,mvf600-gpio")) return (ENXIO); Modified: stable/10/sys/arm/freescale/vybrid/vf_iomuxc.c ============================================================================== --- stable/10/sys/arm/freescale/vybrid/vf_iomuxc.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/freescale/vybrid/vf_iomuxc.c Thu May 15 16:11:06 2014 (r266152) @@ -90,6 +90,9 @@ static int iomuxc_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "fsl,mvf600-iomuxc")) return (ENXIO); Modified: stable/10/sys/arm/freescale/vybrid/vf_mscm.c ============================================================================== --- stable/10/sys/arm/freescale/vybrid/vf_mscm.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/freescale/vybrid/vf_mscm.c Thu May 15 16:11:06 2014 (r266152) @@ -75,6 +75,9 @@ static int mscm_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "fsl,mvf600-mscm")) return (ENXIO); Modified: stable/10/sys/arm/freescale/vybrid/vf_nfc.c ============================================================================== --- stable/10/sys/arm/freescale/vybrid/vf_nfc.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/freescale/vybrid/vf_nfc.c Thu May 15 16:11:06 2014 (r266152) @@ -171,6 +171,9 @@ static int vf_nand_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "fsl,mvf600-nand")) return (ENXIO); Modified: stable/10/sys/arm/freescale/vybrid/vf_src.c ============================================================================== --- stable/10/sys/arm/freescale/vybrid/vf_src.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/freescale/vybrid/vf_src.c Thu May 15 16:11:06 2014 (r266152) @@ -102,6 +102,9 @@ static int src_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "fsl,mvf600-src")) return (ENXIO); Modified: stable/10/sys/arm/lpc/if_lpe.c ============================================================================== --- stable/10/sys/arm/lpc/if_lpe.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/lpc/if_lpe.c Thu May 15 16:11:06 2014 (r266152) @@ -190,6 +190,9 @@ static int lpe_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "lpc,ethernet")) return (ENXIO); Modified: stable/10/sys/arm/lpc/lpc_dmac.c ============================================================================== --- stable/10/sys/arm/lpc/lpc_dmac.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/lpc/lpc_dmac.c Thu May 15 16:11:06 2014 (r266152) @@ -90,6 +90,10 @@ static void lpc_dmac_intr(void *); static int lpc_dmac_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "lpc,dmac")) return (ENXIO); Modified: stable/10/sys/arm/lpc/lpc_fb.c ============================================================================== --- stable/10/sys/arm/lpc/lpc_fb.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/lpc/lpc_fb.c Thu May 15 16:11:06 2014 (r266152) @@ -138,6 +138,10 @@ static struct cdevsw lpc_fb_cdevsw = { static int lpc_fb_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "lpc,fb")) return (ENXIO); Modified: stable/10/sys/arm/lpc/lpc_gpio.c ============================================================================== --- stable/10/sys/arm/lpc/lpc_gpio.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/lpc/lpc_gpio.c Thu May 15 16:11:06 2014 (r266152) @@ -160,6 +160,10 @@ static struct lpc_gpio_softc *lpc_gpio_s static int lpc_gpio_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "lpc,gpio")) return (ENXIO); Modified: stable/10/sys/arm/lpc/lpc_intc.c ============================================================================== --- stable/10/sys/arm/lpc/lpc_intc.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/lpc/lpc_intc.c Thu May 15 16:11:06 2014 (r266152) @@ -68,6 +68,9 @@ static int lpc_intc_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "lpc,pic")) return (ENXIO); Modified: stable/10/sys/arm/lpc/lpc_mmc.c ============================================================================== --- stable/10/sys/arm/lpc/lpc_mmc.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/lpc/lpc_mmc.c Thu May 15 16:11:06 2014 (r266152) @@ -166,6 +166,10 @@ static struct lpc_dmac_channel_config lp static int lpc_mmc_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "lpc,mmc")) return (ENXIO); Modified: stable/10/sys/arm/lpc/lpc_ohci.c ============================================================================== --- stable/10/sys/arm/lpc/lpc_ohci.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/lpc/lpc_ohci.c Thu May 15 16:11:06 2014 (r266152) @@ -98,6 +98,10 @@ static void lpc_isp3101_configure(device static int lpc_ohci_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "lpc,usb-ohci")) return (ENXIO); Modified: stable/10/sys/arm/lpc/lpc_pwr.c ============================================================================== --- stable/10/sys/arm/lpc/lpc_pwr.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/lpc/lpc_pwr.c Thu May 15 16:11:06 2014 (r266152) @@ -65,6 +65,9 @@ static int lpc_pwr_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "lpc,pwr")) return (ENXIO); Modified: stable/10/sys/arm/lpc/lpc_rtc.c ============================================================================== --- stable/10/sys/arm/lpc/lpc_rtc.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/lpc/lpc_rtc.c Thu May 15 16:11:06 2014 (r266152) @@ -63,6 +63,9 @@ static int lpc_rtc_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "lpc,rtc")) return (ENXIO); Modified: stable/10/sys/arm/lpc/lpc_spi.c ============================================================================== --- stable/10/sys/arm/lpc/lpc_spi.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/lpc/lpc_spi.c Thu May 15 16:11:06 2014 (r266152) @@ -85,6 +85,10 @@ static int lpc_spi_transfer(device_t, de static int lpc_spi_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "lpc,spi")) return (ENXIO); Modified: stable/10/sys/arm/lpc/lpc_timer.c ============================================================================== --- stable/10/sys/arm/lpc/lpc_timer.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/lpc/lpc_timer.c Thu May 15 16:11:06 2014 (r266152) @@ -111,6 +111,9 @@ static int lpc_timer_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "lpc,timer")) return (ENXIO); Modified: stable/10/sys/arm/mv/gpio.c ============================================================================== --- stable/10/sys/arm/mv/gpio.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/mv/gpio.c Thu May 15 16:11:06 2014 (r266152) @@ -125,6 +125,9 @@ static int mv_gpio_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "mrvl,gpio")) return (ENXIO); Modified: stable/10/sys/arm/mv/ic.c ============================================================================== --- stable/10/sys/arm/mv/ic.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/mv/ic.c Thu May 15 16:11:06 2014 (r266152) @@ -80,6 +80,9 @@ static int mv_ic_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "mrvl,pic")) return (ENXIO); Modified: stable/10/sys/arm/mv/mpic.c ============================================================================== --- stable/10/sys/arm/mv/mpic.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/mv/mpic.c Thu May 15 16:11:06 2014 (r266152) @@ -127,6 +127,9 @@ static int mv_mpic_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "mrvl,mpic")) return (ENXIO); Modified: stable/10/sys/arm/mv/mv_sata.c ============================================================================== --- stable/10/sys/arm/mv/mv_sata.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/mv/mv_sata.c Thu May 15 16:11:06 2014 (r266152) @@ -185,6 +185,9 @@ sata_probe(device_t dev) struct sata_softc *sc; uint32_t d, r; + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "mrvl,sata")) return (ENXIO); Modified: stable/10/sys/arm/mv/mv_ts.c ============================================================================== --- stable/10/sys/arm/mv/mv_ts.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/mv/mv_ts.c Thu May 15 16:11:06 2014 (r266152) @@ -59,6 +59,9 @@ ts_probe(device_t dev) { uint32_t d, r; + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "mrvl,ts")) return (ENXIO); soc_id(&d, &r); Modified: stable/10/sys/arm/mv/rtc.c ============================================================================== --- stable/10/sys/arm/mv/rtc.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/mv/rtc.c Thu May 15 16:11:06 2014 (r266152) @@ -97,6 +97,9 @@ static int mv_rtc_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "mrvl,rtc")) return (ENXIO); Modified: stable/10/sys/arm/mv/timer.c ============================================================================== --- stable/10/sys/arm/mv/timer.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/mv/timer.c Thu May 15 16:11:06 2014 (r266152) @@ -108,6 +108,9 @@ static int mv_timer_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "mrvl,timer")) return (ENXIO); Modified: stable/10/sys/arm/mv/twsi.c ============================================================================== --- stable/10/sys/arm/mv/twsi.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/mv/twsi.c Thu May 15 16:11:06 2014 (r266152) @@ -305,6 +305,9 @@ static int mv_twsi_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "mrvl,twsi")) return (ENXIO); Modified: stable/10/sys/arm/rockchip/rk30xx_gpio.c ============================================================================== --- stable/10/sys/arm/rockchip/rk30xx_gpio.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/rockchip/rk30xx_gpio.c Thu May 15 16:11:06 2014 (r266152) @@ -421,6 +421,9 @@ static int rk30_gpio_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "rockchip,rk30xx-gpio")) return (ENXIO); Modified: stable/10/sys/arm/rockchip/rk30xx_grf.c ============================================================================== --- stable/10/sys/arm/rockchip/rk30xx_grf.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/rockchip/rk30xx_grf.c Thu May 15 16:11:06 2014 (r266152) @@ -70,6 +70,9 @@ static int rk30_grf_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "rockchip,rk30xx-grf")) { device_set_desc(dev, "RK30XX General Register File"); return(BUS_PROBE_DEFAULT); Modified: stable/10/sys/arm/rockchip/rk30xx_pmu.c ============================================================================== --- stable/10/sys/arm/rockchip/rk30xx_pmu.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/rockchip/rk30xx_pmu.c Thu May 15 16:11:06 2014 (r266152) @@ -70,6 +70,9 @@ static int rk30_pmu_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "rockchip,rk30xx-pmu")) { device_set_desc(dev, "RK30XX PMU"); return(BUS_PROBE_DEFAULT); Modified: stable/10/sys/arm/rockchip/rk30xx_wdog.c ============================================================================== --- stable/10/sys/arm/rockchip/rk30xx_wdog.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/rockchip/rk30xx_wdog.c Thu May 15 16:11:06 2014 (r266152) @@ -84,6 +84,9 @@ static int rk30_wd_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "rockchip,rk30xx-wdt")) { device_set_desc(dev, "Rockchip RK30XX Watchdog"); return (BUS_PROBE_DEFAULT); Modified: stable/10/sys/arm/samsung/exynos/arch_timer.c ============================================================================== --- stable/10/sys/arm/samsung/exynos/arch_timer.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/samsung/exynos/arch_timer.c Thu May 15 16:11:06 2014 (r266152) @@ -71,6 +71,10 @@ static struct resource_spec arm_tmr_spec static int arm_tmr_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "exynos,mct")) return (ENXIO); Modified: stable/10/sys/arm/samsung/exynos/ehci_exynos5.c ============================================================================== --- stable/10/sys/arm/samsung/exynos/ehci_exynos5.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/samsung/exynos/ehci_exynos5.c Thu May 15 16:11:06 2014 (r266152) @@ -147,6 +147,9 @@ static int exynos_ehci_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "exynos,usb-ehci") == 0) return (ENXIO); Modified: stable/10/sys/arm/ti/aintc.c ============================================================================== --- stable/10/sys/arm/ti/aintc.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/ti/aintc.c Thu May 15 16:11:06 2014 (r266152) @@ -81,6 +81,10 @@ static struct ti_aintc_softc *ti_aintc_s static int ti_aintc_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_is_compatible(dev, "ti,aintc")) return (ENXIO); device_set_desc(dev, "TI AINTC Interrupt Controller"); Modified: stable/10/sys/arm/ti/am335x/am335x_dmtimer.c ============================================================================== --- stable/10/sys/arm/ti/am335x/am335x_dmtimer.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/ti/am335x/am335x_dmtimer.c Thu May 15 16:11:06 2014 (r266152) @@ -528,6 +528,9 @@ static int am335x_dmtimer_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "ti,am335x-dmtimer")) { device_set_desc(dev, "AM335x DMTimer"); return(BUS_PROBE_DEFAULT); Modified: stable/10/sys/arm/ti/am335x/am335x_lcd.c ============================================================================== --- stable/10/sys/arm/ti/am335x/am335x_lcd.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/ti/am335x/am335x_lcd.c Thu May 15 16:11:06 2014 (r266152) @@ -404,6 +404,9 @@ am335x_lcd_probe(device_t dev) { int err; + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "ti,am335x-lcd")) return (ENXIO); Modified: stable/10/sys/arm/ti/am335x/am335x_prcm.c ============================================================================== --- stable/10/sys/arm/ti/am335x/am335x_prcm.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/ti/am335x/am335x_prcm.c Thu May 15 16:11:06 2014 (r266152) @@ -370,6 +370,10 @@ void am335x_prcm_setup_dmtimer(int); static int am335x_prcm_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "am335x,prcm")) { device_set_desc(dev, "AM335x Power and Clock Management"); return(BUS_PROBE_DEFAULT); Modified: stable/10/sys/arm/ti/am335x/am335x_pwm.c ============================================================================== --- stable/10/sys/arm/ti/am335x/am335x_pwm.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/ti/am335x/am335x_pwm.c Thu May 15 16:11:06 2014 (r266152) @@ -309,6 +309,10 @@ am335x_pwm_sysctl_period(SYSCTL_HANDLER_ static int am335x_pwm_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "ti,am335x-pwm")) return (ENXIO); Modified: stable/10/sys/arm/ti/am335x/am335x_usbss.c ============================================================================== --- stable/10/sys/arm/ti/am335x/am335x_usbss.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/ti/am335x/am335x_usbss.c Thu May 15 16:11:06 2014 (r266152) @@ -250,6 +250,10 @@ musbotg_wrapper_interrupt(void *arg) static int musbotg_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "ti,musb-am33xx")) return (ENXIO); Modified: stable/10/sys/arm/ti/cpsw/if_cpsw.c ============================================================================== --- stable/10/sys/arm/ti/cpsw/if_cpsw.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/ti/cpsw/if_cpsw.c Thu May 15 16:11:06 2014 (r266152) @@ -445,6 +445,9 @@ static int cpsw_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "ti,cpsw")) return (ENXIO); Modified: stable/10/sys/arm/ti/omap4/omap4_prcm_clks.c ============================================================================== --- stable/10/sys/arm/ti/omap4/omap4_prcm_clks.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/ti/omap4/omap4_prcm_clks.c Thu May 15 16:11:06 2014 (r266152) @@ -1363,6 +1363,10 @@ omap4_prcm_reset(void) static int omap4_prcm_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "ti,omap4_prcm")) return (ENXIO); Modified: stable/10/sys/arm/ti/ti_edma3.c ============================================================================== --- stable/10/sys/arm/ti/ti_edma3.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/ti/ti_edma3.c Thu May 15 16:11:06 2014 (r266152) @@ -142,6 +142,10 @@ static struct { static int ti_edma3_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "ti,edma3")) return (ENXIO); Modified: stable/10/sys/arm/ti/ti_gpio.c ============================================================================== --- stable/10/sys/arm/ti/ti_gpio.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/ti/ti_gpio.c Thu May 15 16:11:06 2014 (r266152) @@ -650,6 +650,10 @@ ti_gpio_intr(void *arg) static int ti_gpio_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "ti,gpio")) return (ENXIO); Modified: stable/10/sys/arm/ti/ti_i2c.c ============================================================================== --- stable/10/sys/arm/ti/ti_i2c.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/ti/ti_i2c.c Thu May 15 16:11:06 2014 (r266152) @@ -1020,6 +1020,10 @@ ti_i2c_deactivate(device_t dev) static int ti_i2c_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "ti,i2c")) return (ENXIO); Modified: stable/10/sys/arm/ti/ti_mbox.c ============================================================================== --- stable/10/sys/arm/ti/ti_mbox.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/ti/ti_mbox.c Thu May 15 16:11:06 2014 (r266152) @@ -119,6 +119,10 @@ ti_mbox_reg_write(struct ti_mbox_softc * static int ti_mbox_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "ti,system-mbox")) { device_set_desc(dev, "TI System Mailbox"); return (BUS_PROBE_DEFAULT); Modified: stable/10/sys/arm/ti/ti_mmchs.c ============================================================================== --- stable/10/sys/arm/ti/ti_mmchs.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/ti/ti_mmchs.c Thu May 15 16:11:06 2014 (r266152) @@ -1656,6 +1656,10 @@ errout: static int ti_mmchs_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "ti,mmchs")) return (ENXIO); Modified: stable/10/sys/arm/ti/ti_pruss.c ============================================================================== --- stable/10/sys/arm/ti/ti_pruss.c Thu May 15 15:50:37 2014 (r266151) +++ stable/10/sys/arm/ti/ti_pruss.c Thu May 15 16:11:06 2014 (r266152) @@ -145,6 +145,10 @@ ti_pruss_reg_write(struct ti_pruss_softc static int ti_pruss_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "ti,pruss-v1") || ofw_bus_is_compatible(dev, "ti,pruss-v2")) { device_set_desc(dev, "TI Programmable Realtime Unit Subsystem"); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu May 15 16:23:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23FEB214; Thu, 15 May 2014 16:23:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 04AA328A8; Thu, 15 May 2014 16:23:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FGNP4Q077512; Thu, 15 May 2014 16:23:25 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FGNOrt077505; Thu, 15 May 2014 16:23:24 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405151623.s4FGNOrt077505@svn.freebsd.org> From: Ian Lepore Date: Thu, 15 May 2014 16:23:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266155 - in stable/10/sys: arm/conf arm/freescale/vybrid boot/fdt/dts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 16:23:26 -0000 Author: ian Date: Thu May 15 16:23:24 2014 New Revision: 266155 URL: http://svnweb.freebsd.org/changeset/base/266155 Log: MFC r261411, r261413, r261416: Add support for Colibri VF50 Evaluation Board. Add driver for Display Control Unit (DCU4). Add prototype for tcon_bypass() used by dcu4. Add register definition. Added: stable/10/sys/arm/conf/COLIBRI-VF50 - copied unchanged from r261411, head/sys/arm/conf/COLIBRI-VF50 stable/10/sys/arm/freescale/vybrid/vf_dcu4.c - copied unchanged from r261413, head/sys/arm/freescale/vybrid/vf_dcu4.c stable/10/sys/arm/freescale/vybrid/vf_tcon.c - copied, changed from r261413, head/sys/arm/freescale/vybrid/vf_tcon.c stable/10/sys/boot/fdt/dts/vybrid-colibri-vf50.dts - copied unchanged from r261411, head/sys/boot/fdt/dts/vybrid-colibri-vf50.dts Modified: stable/10/sys/arm/conf/VYBRID.common stable/10/sys/arm/freescale/vybrid/files.vybrid stable/10/sys/arm/freescale/vybrid/vf_common.h Directory Properties: stable/10/ (props changed) Copied: stable/10/sys/arm/conf/COLIBRI-VF50 (from r261411, head/sys/arm/conf/COLIBRI-VF50) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/conf/COLIBRI-VF50 Thu May 15 16:23:24 2014 (r266155, copy of r261411, head/sys/arm/conf/COLIBRI-VF50) @@ -0,0 +1,26 @@ +# Kernel configuration for Toradex Colibri VF50 Evaluation Board. +# +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +include "VYBRID.common" +ident COLIBRI-VF50 + +#FDT +options FDT +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=vybrid-colibri-vf50.dts Modified: stable/10/sys/arm/conf/VYBRID.common ============================================================================== --- stable/10/sys/arm/conf/VYBRID.common Thu May 15 16:22:09 2014 (r266154) +++ stable/10/sys/arm/conf/VYBRID.common Thu May 15 16:23:24 2014 (r266155) @@ -137,3 +137,10 @@ device axe # ASIX Electronics USB Eth device bpf # Berkeley packet filter device sound + +# Framebuffer +device vt +device kbdmux +options SC_DFLT_FONT # compile font in +makeoptions SC_DFLT_FONT=cp437 +device ukbd Modified: stable/10/sys/arm/freescale/vybrid/files.vybrid ============================================================================== --- stable/10/sys/arm/freescale/vybrid/files.vybrid Thu May 15 16:22:09 2014 (r266154) +++ stable/10/sys/arm/freescale/vybrid/files.vybrid Thu May 15 16:23:24 2014 (r266155) @@ -21,6 +21,8 @@ arm/freescale/vybrid/vf_anadig.c standa arm/freescale/vybrid/vf_iomuxc.c standard arm/freescale/vybrid/vf_mscm.c standard arm/freescale/vybrid/vf_src.c standard +arm/freescale/vybrid/vf_tcon.c optional vt +arm/freescale/vybrid/vf_dcu4.c optional vt arm/freescale/vybrid/vf_nfc.c optional nand arm/freescale/vybrid/vf_ehci.c optional ehci arm/freescale/vybrid/vf_gpio.c optional gpio Modified: stable/10/sys/arm/freescale/vybrid/vf_common.h ============================================================================== --- stable/10/sys/arm/freescale/vybrid/vf_common.h Thu May 15 16:22:09 2014 (r266154) +++ stable/10/sys/arm/freescale/vybrid/vf_common.h Thu May 15 16:23:24 2014 (r266155) @@ -38,3 +38,5 @@ bus_space_read_1(_sc->bst, _sc->bsh, _reg) #define WRITE1(_sc, _reg, _val) \ bus_space_write_1(_sc->bst, _sc->bsh, _reg, _val) + +uint32_t tcon_bypass(void); Copied: stable/10/sys/arm/freescale/vybrid/vf_dcu4.c (from r261413, head/sys/arm/freescale/vybrid/vf_dcu4.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/freescale/vybrid/vf_dcu4.c Thu May 15 16:23:24 2014 (r266155, copy of r261413, head/sys/arm/freescale/vybrid/vf_dcu4.c) @@ -0,0 +1,359 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * All rights reserved. + * + * 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. + */ + +/* + * Vybrid Family Display Control Unit (DCU4) + * Chapter 55, Vybrid Reference Manual, Rev. 5, 07/2013 + */ + +#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 "fb_if.h" + +#include + +#define DCU_CTRLDESCCURSOR1 0x000 /* Control Descriptor Cursor 1 */ +#define DCU_CTRLDESCCURSOR2 0x004 /* Control Descriptor Cursor 2 */ +#define DCU_CTRLDESCCURSOR3 0x008 /* Control Descriptor Cursor 3 */ +#define DCU_CTRLDESCCURSOR4 0x00C /* Control Descriptor Cursor 4 */ +#define DCU_DCU_MODE 0x010 /* DCU4 Mode */ +#define DCU_MODE_M 0x3 +#define DCU_MODE_S 0 +#define DCU_MODE_NORMAL 0x1 +#define DCU_MODE_TEST 0x2 +#define DCU_MODE_COLBAR 0x3 +#define RASTER_EN (1 << 14) /* Raster scan of pixel data */ +#define DCU_BGND 0x014 /* Background */ +#define DCU_DISP_SIZE 0x018 /* Display Size */ +#define DELTA_M 0x7ff +#define DELTA_Y_S 16 +#define DELTA_X_S 0 +#define DCU_HSYN_PARA 0x01C /* Horizontal Sync Parameter */ +#define BP_H_SHIFT 22 +#define PW_H_SHIFT 11 +#define FP_H_SHIFT 0 +#define DCU_VSYN_PARA 0x020 /* Vertical Sync Parameter */ +#define BP_V_SHIFT 22 +#define PW_V_SHIFT 11 +#define FP_V_SHIFT 0 +#define DCU_SYNPOL 0x024 /* Synchronize Polarity */ +#define INV_HS (1 << 0) +#define INV_VS (1 << 1) +#define DCU_THRESHOLD 0x028 /* Threshold */ +#define LS_BF_VS_SHIFT 16 +#define OUT_BUF_HIGH_SHIFT 8 +#define OUT_BUF_LOW_SHIFT 0 +#define DCU_INT_STATUS 0x02C /* Interrupt Status */ +#define DCU_INT_MASK 0x030 /* Interrupt Mask */ +#define DCU_COLBAR_1 0x034 /* COLBAR_1 */ +#define DCU_COLBAR_2 0x038 /* COLBAR_2 */ +#define DCU_COLBAR_3 0x03C /* COLBAR_3 */ +#define DCU_COLBAR_4 0x040 /* COLBAR_4 */ +#define DCU_COLBAR_5 0x044 /* COLBAR_5 */ +#define DCU_COLBAR_6 0x048 /* COLBAR_6 */ +#define DCU_COLBAR_7 0x04C /* COLBAR_7 */ +#define DCU_COLBAR_8 0x050 /* COLBAR_8 */ +#define DCU_DIV_RATIO 0x054 /* Divide Ratio */ +#define DCU_SIGN_CALC_1 0x058 /* Sign Calculation 1 */ +#define DCU_SIGN_CALC_2 0x05C /* Sign Calculation 2 */ +#define DCU_CRC_VAL 0x060 /* CRC Value */ +#define DCU_PDI_STATUS 0x064 /* PDI Status */ +#define DCU_PDI_STA_MSK 0x068 /* PDI Status Mask */ +#define DCU_PARR_ERR_STATUS1 0x06C /* Parameter Error Status 1 */ +#define DCU_PARR_ERR_STATUS2 0x070 /* Parameter Error Status 2 */ +#define DCU_PARR_ERR_STATUS3 0x07C /* Parameter Error Status 3 */ +#define DCU_MASK_PARR_ERR_ST1 0x080 /* Mask Parameter Error Status 1 */ +#define DCU_MASK_PARR_ERR_ST2 0x084 /* Mask Parameter Error Status 2 */ +#define DCU_MASK_PARR_ERR_ST3 0x090 /* Mask Parameter Error Status 3 */ +#define DCU_THRESHOLD_INP_BUF_1 0x094 /* Threshold Input 1 */ +#define DCU_THRESHOLD_INP_BUF_2 0x098 /* Threshold Input 2 */ +#define DCU_THRESHOLD_INP_BUF_3 0x09C /* Threshold Input 3 */ +#define DCU_LUMA_COMP 0x0A0 /* LUMA Component */ +#define DCU_CHROMA_RED 0x0A4 /* Red Chroma Components */ +#define DCU_CHROMA_GREEN 0x0A8 /* Green Chroma Components */ +#define DCU_CHROMA_BLUE 0x0AC /* Blue Chroma Components */ +#define DCU_CRC_POS 0x0B0 /* CRC Position */ +#define DCU_LYR_INTPOL_EN 0x0B4 /* Layer Interpolation Enable */ +#define DCU_LYR_LUMA_COMP 0x0B8 /* Layer Luminance Component */ +#define DCU_LYR_CHRM_RED 0x0BC /* Layer Chroma Red */ +#define DCU_LYR_CHRM_GRN 0x0C0 /* Layer Chroma Green */ +#define DCU_LYR_CHRM_BLUE 0x0C4 /* Layer Chroma Blue */ +#define DCU_COMP_IMSIZE 0x0C8 /* Compression Image Size */ +#define DCU_UPDATE_MODE 0x0CC /* Update Mode */ +#define READREG (1 << 30) +#define MODE (1 << 31) +#define DCU_UNDERRUN 0x0D0 /* Underrun */ +#define DCU_GLBL_PROTECT 0x100 /* Global Protection */ +#define DCU_SFT_LCK_BIT_L0 0x104 /* Soft Lock Bit Layer 0 */ +#define DCU_SFT_LCK_BIT_L1 0x108 /* Soft Lock Bit Layer 1 */ +#define DCU_SFT_LCK_DISP_SIZE 0x10C /* Soft Lock Display Size */ +#define DCU_SFT_LCK_HS_VS_PARA 0x110 /* Soft Lock Hsync/Vsync Parameter */ +#define DCU_SFT_LCK_POL 0x114 /* Soft Lock POL */ +#define DCU_SFT_LCK_L0_TRANSP 0x118 /* Soft Lock L0 Transparency */ +#define DCU_SFT_LCK_L1_TRANSP 0x11C /* Soft Lock L1 Transparency */ + +/* Control Descriptor */ +#define DCU_CTRLDESCL(n, m) 0x200 + (0x40 * n) + 0x4 * (m - 1) +#define DCU_CTRLDESCLn_1(n) DCU_CTRLDESCL(n, 1) +#define DCU_CTRLDESCLn_2(n) DCU_CTRLDESCL(n, 2) +#define DCU_CTRLDESCLn_3(n) DCU_CTRLDESCL(n, 3) +#define TRANS_SHIFT 20 +#define DCU_CTRLDESCLn_4(n) DCU_CTRLDESCL(n, 4) +#define BPP_MASK 0xf /* Bit per pixel Mask */ +#define BPP_SHIFT 16 /* Bit per pixel Shift */ +#define BPP24 0x5 +#define EN_LAYER (1 << 31) /* Enable the layer */ +#define DCU_CTRLDESCLn_5(n) DCU_CTRLDESCL(n, 5) +#define DCU_CTRLDESCLn_6(n) DCU_CTRLDESCL(n, 6) +#define DCU_CTRLDESCLn_7(n) DCU_CTRLDESCL(n, 7) +#define DCU_CTRLDESCLn_8(n) DCU_CTRLDESCL(n, 8) +#define DCU_CTRLDESCLn_9(n) DCU_CTRLDESCL(n, 9) + +#define DISPLAY_WIDTH 480 +#define DISPLAY_HEIGHT 272 + +struct dcu_softc { + struct resource *res[2]; + bus_space_tag_t bst; + bus_space_handle_t bsh; + void *ih; + device_t dev; + device_t sc_fbd; /* fbd child */ + struct fb_info sc_info; +}; + +static struct resource_spec dcu_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { SYS_RES_IRQ, 0, RF_ACTIVE }, + { -1, 0 } +}; + +static int +dcu_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_is_compatible(dev, "fsl,mvf600-dcu4")) + return (ENXIO); + + device_set_desc(dev, "Vybrid Family Display Control Unit (DCU4)"); + return (BUS_PROBE_DEFAULT); +} + +static void +dcu_intr(void *arg) +{ + struct dcu_softc *sc; + int reg; + + sc = arg; + + /* Ack interrupts */ + reg = READ4(sc, DCU_INT_STATUS); + WRITE4(sc, DCU_INT_STATUS, reg); + + /* TODO interrupt handler */ +} + +static int +dcu_init(struct dcu_softc *sc) +{ + int reg; + + /* Configure DCU */ + reg = ((sc->sc_info.fb_height) << DELTA_Y_S); + reg |= (sc->sc_info.fb_width / 16); + WRITE4(sc, DCU_DISP_SIZE, reg); + + /* TODO: export panel info to FDT */ + + reg = (2 << BP_H_SHIFT); + reg |= (41 << PW_H_SHIFT); + reg |= (2 << FP_H_SHIFT); + WRITE4(sc, DCU_HSYN_PARA, reg); + + reg = (2 << BP_V_SHIFT); + reg |= (10 << PW_V_SHIFT); + reg |= (2 << FP_V_SHIFT); + WRITE4(sc, DCU_VSYN_PARA, reg); + + WRITE4(sc, DCU_BGND, 0); + WRITE4(sc, DCU_DIV_RATIO, 30); + + reg = (INV_VS | INV_HS); + WRITE4(sc, DCU_SYNPOL, reg); + + reg = (0x3 << LS_BF_VS_SHIFT); + reg |= (0x78 << OUT_BUF_HIGH_SHIFT); + reg |= (0 << OUT_BUF_LOW_SHIFT); + WRITE4(sc, DCU_THRESHOLD, reg); + + /* Mask all the interrupts */ + WRITE4(sc, DCU_INT_MASK, 0xffffffff); + + /* Setup first layer */ + reg = (sc->sc_info.fb_width | (sc->sc_info.fb_height << 16)); + WRITE4(sc, DCU_CTRLDESCLn_1(0), reg); + WRITE4(sc, DCU_CTRLDESCLn_2(0), 0x0); + WRITE4(sc, DCU_CTRLDESCLn_3(0), sc->sc_info.fb_pbase); + reg = (BPP24 << BPP_SHIFT); + reg |= EN_LAYER; + reg |= (0xFF << TRANS_SHIFT); /* completely opaque */ + WRITE4(sc, DCU_CTRLDESCLn_4(0), reg); + WRITE4(sc, DCU_CTRLDESCLn_5(0), 0xffffff); + WRITE4(sc, DCU_CTRLDESCLn_6(0), 0x0); + WRITE4(sc, DCU_CTRLDESCLn_7(0), 0x0); + WRITE4(sc, DCU_CTRLDESCLn_8(0), 0x0); + WRITE4(sc, DCU_CTRLDESCLn_9(0), 0x0); + + /* Enable DCU in normal mode */ + reg = READ4(sc, DCU_DCU_MODE); + reg &= ~(DCU_MODE_M << DCU_MODE_S); + reg |= (DCU_MODE_NORMAL << DCU_MODE_S); + reg |= (RASTER_EN); + WRITE4(sc, DCU_DCU_MODE, reg); + WRITE4(sc, DCU_UPDATE_MODE, READREG); + + return (0); +} + +static int +dcu_attach(device_t dev) +{ + struct dcu_softc *sc; + int err; + + sc = device_get_softc(dev); + + if (bus_alloc_resources(dev, dcu_spec, sc->res)) { + device_printf(dev, "could not allocate resources\n"); + return (ENXIO); + } + + /* Memory interface */ + sc->bst = rman_get_bustag(sc->res[0]); + sc->bsh = rman_get_bushandle(sc->res[0]); + + /* Setup interrupt handler */ + err = bus_setup_intr(dev, sc->res[1], INTR_TYPE_BIO | INTR_MPSAFE, + NULL, dcu_intr, sc, &sc->ih); + if (err) { + device_printf(dev, "Unable to alloc interrupt resource.\n"); + return (ENXIO); + } + + /* Bypass timing control (used for raw lcd panels) */ + tcon_bypass(); + + sc->sc_info.fb_width = DISPLAY_WIDTH; + sc->sc_info.fb_height = DISPLAY_HEIGHT; + sc->sc_info.fb_stride = sc->sc_info.fb_width * 3; + sc->sc_info.fb_bpp = sc->sc_info.fb_depth = 24; + sc->sc_info.fb_size = sc->sc_info.fb_height * sc->sc_info.fb_stride; + sc->sc_info.fb_vbase = (intptr_t)contigmalloc(sc->sc_info.fb_size, + M_DEVBUF, M_ZERO, 0, ~0, PAGE_SIZE, 0); + sc->sc_info.fb_pbase = (intptr_t)vtophys(sc->sc_info.fb_vbase); + +#if 0 + printf("%dx%d [%d]\n", sc->sc_info.fb_width, sc->sc_info.fb_height, + sc->sc_info.fb_stride); + printf("pbase == 0x%08x\n", sc->sc_info.fb_pbase); +#endif + + memset((int8_t *)sc->sc_info.fb_vbase, 0x0, sc->sc_info.fb_size); + + dcu_init(sc); + + sc->sc_info.fb_name = device_get_nameunit(dev); + + /* Ask newbus to attach framebuffer device to me. */ + sc->sc_fbd = device_add_child(dev, "fbd", device_get_unit(dev)); + if (sc->sc_fbd == NULL) + device_printf(dev, "Can't attach fbd device\n"); + + if (device_probe_and_attach(sc->sc_fbd) != 0) { + device_printf(sc->dev, "Failed to attach fbd device\n"); + } + + return (0); +} + +static struct fb_info * +dcu4_fb_getinfo(device_t dev) +{ + struct dcu_softc *sc = device_get_softc(dev); + + return (&sc->sc_info); +} + +static device_method_t dcu_methods[] = { + DEVMETHOD(device_probe, dcu_probe), + DEVMETHOD(device_attach, dcu_attach), + + /* Framebuffer service methods */ + DEVMETHOD(fb_getinfo, dcu4_fb_getinfo), + { 0, 0 } +}; + +static driver_t dcu_driver = { + "fb", + dcu_methods, + sizeof(struct dcu_softc), +}; + +static devclass_t dcu_devclass; + +DRIVER_MODULE(fb, simplebus, dcu_driver, dcu_devclass, 0, 0); Copied and modified: stable/10/sys/arm/freescale/vybrid/vf_tcon.c (from r261413, head/sys/arm/freescale/vybrid/vf_tcon.c) ============================================================================== --- head/sys/arm/freescale/vybrid/vf_tcon.c Sun Feb 2 20:25:27 2014 (r261413, copy source) +++ stable/10/sys/arm/freescale/vybrid/vf_tcon.c Thu May 15 16:23:24 2014 (r266155) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include #define TCON0_CTRL1 0x00 +#define TCON_BYPASS (1 << 29) struct tcon_softc { struct resource *res[1]; @@ -80,7 +81,7 @@ tcon_bypass(void) sc = tcon_sc; - WRITE4(tcon_sc, TCON0_CTRL1, (1 << 29)); + WRITE4(tcon_sc, TCON0_CTRL1, TCON_BYPASS); return (0); } Copied: stable/10/sys/boot/fdt/dts/vybrid-colibri-vf50.dts (from r261411, head/sys/boot/fdt/dts/vybrid-colibri-vf50.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/fdt/dts/vybrid-colibri-vf50.dts Thu May 15 16:23:24 2014 (r266155, copy of r261411, head/sys/boot/fdt/dts/vybrid-colibri-vf50.dts) @@ -0,0 +1,73 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +/dts-v1/; + +/include/ "vybrid.dtsi" + +/ { + model = "Toradex Colibri VF50"; + + memory { + device_type = "memory"; + reg = < 0x80000000 0x08000000 >; /* 128MB RAM */ + }; + + SOC: vybrid { + serial0: serial@40027000 { + status = "okay"; + }; + + fec1: ethernet@400D1000 { + status = "okay"; + iomux_config = < 54 0x1 55 0x1 + 56 0x1 57 0x1 + 58 0x1 59 0x1 + 60 0x1 61 0x1 + 62 0x1 0 0x1 >; + }; + + sai3: sai@40032000 { + status = "okay"; + }; + + adc0: adc@4003B000 { + status = "okay"; + }; + + edma1: edma@40098000 { + status = "okay"; + }; + }; + + chosen { + bootargs = "-v"; + stdin = "serial0"; + stdout = "serial0"; + }; +}; From owner-svn-src-stable@FreeBSD.ORG Thu May 15 16:59:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19270EDD; Thu, 15 May 2014 16:59:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EECA72BF7; Thu, 15 May 2014 16:59:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FGxoj9091412; Thu, 15 May 2014 16:59:50 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FGxmqA091398; Thu, 15 May 2014 16:59:48 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405151659.s4FGxmqA091398@svn.freebsd.org> From: Ian Lepore Date: Thu, 15 May 2014 16:59:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266159 - in stable/10/sys/arm: arm include ti X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 16:59:51 -0000 Author: ian Date: Thu May 15 16:59:47 2014 New Revision: 266159 URL: http://svnweb.freebsd.org/changeset/base/266159 Log: MFC r261414, r261415, r261417, r261418, r261419 Don't call device_set_ivars() for the mmchs Change the way pcpu and curthread are stored per-core Invalidate cachelines for bounce pages on PREREAD too, there may still be stale entries from a previous transfer. Only use the CPU ID register if SMP is defined. Some non-MPCore armv6 cpu, such as the one found in the RPi, don't have it, and just hang when we try to access it. Modified: stable/10/sys/arm/arm/bcopyinout.S stable/10/sys/arm/arm/bcopyinout_xscale.S stable/10/sys/arm/arm/busdma_machdep-v6.c stable/10/sys/arm/arm/copystr.S stable/10/sys/arm/arm/fusu.S stable/10/sys/arm/arm/genassym.c stable/10/sys/arm/arm/machdep.c stable/10/sys/arm/arm/mp_machdep.c stable/10/sys/arm/arm/swtch.S stable/10/sys/arm/arm/vfp.c stable/10/sys/arm/include/asmacros.h stable/10/sys/arm/include/pcpu.h stable/10/sys/arm/ti/ti_mmchs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/bcopyinout.S ============================================================================== --- stable/10/sys/arm/arm/bcopyinout.S Thu May 15 16:51:45 2014 (r266158) +++ stable/10/sys/arm/arm/bcopyinout.S Thu May 15 16:59:47 2014 (r266159) @@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$"); #ifdef _ARM_ARCH_6 #define GET_PCB(tmp) \ mrc p15, 0, tmp, c13, c0, 4; \ - add tmp, tmp, #(PC_CURPCB) + add tmp, tmp, #(TD_PCB) #else .Lcurpcb: .word _C_LABEL(__pcpu) + PC_CURPCB Modified: stable/10/sys/arm/arm/bcopyinout_xscale.S ============================================================================== --- stable/10/sys/arm/arm/bcopyinout_xscale.S Thu May 15 16:51:45 2014 (r266158) +++ stable/10/sys/arm/arm/bcopyinout_xscale.S Thu May 15 16:59:47 2014 (r266159) @@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$"); #ifdef _ARM_ARCH_6 #define GET_PCB(tmp) \ mrc p15, 0, tmp, c13, c0, 4; \ - add tmp, tmp, #(PC_CURPCB) + add tmp, tmp, #(TD_PCB) #else .Lcurpcb: .word _C_LABEL(__pcpu) + PC_CURPCB Modified: stable/10/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- stable/10/sys/arm/arm/busdma_machdep-v6.c Thu May 15 16:51:45 2014 (r266158) +++ stable/10/sys/arm/arm/busdma_machdep-v6.c Thu May 15 16:59:47 2014 (r266159) @@ -1220,6 +1220,17 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus dmat->bounce_zone->total_bounced++; } + if (op & BUS_DMASYNC_PREREAD) { + bpage = STAILQ_FIRST(&map->bpages); + while (bpage != NULL) { + cpu_dcache_inv_range((vm_offset_t)bpage->vaddr, + bpage->datacount); + l2cache_inv_range((vm_offset_t)bpage->vaddr, + (vm_offset_t)bpage->busaddr, + bpage->datacount); + bpage = STAILQ_NEXT(bpage, links); + } + } if (op & BUS_DMASYNC_POSTREAD) { while (bpage != NULL) { vm_offset_t startv; Modified: stable/10/sys/arm/arm/copystr.S ============================================================================== --- stable/10/sys/arm/arm/copystr.S Thu May 15 16:51:45 2014 (r266158) +++ stable/10/sys/arm/arm/copystr.S Thu May 15 16:59:47 2014 (r266159) @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$"); #ifdef _ARM_ARCH_6 #define GET_PCB(tmp) \ mrc p15, 0, tmp, c13, c0, 4; \ - add tmp, tmp, #(PC_CURPCB) + add tmp, tmp, #(TD_PCB) #else .Lpcb: .word _C_LABEL(__pcpu) + PC_CURPCB Modified: stable/10/sys/arm/arm/fusu.S ============================================================================== --- stable/10/sys/arm/arm/fusu.S Thu May 15 16:51:45 2014 (r266158) +++ stable/10/sys/arm/arm/fusu.S Thu May 15 16:59:47 2014 (r266159) @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$"); #ifdef _ARM_ARCH_6 #define GET_PCB(tmp) \ mrc p15, 0, tmp, c13, c0, 4; \ - add tmp, tmp, #(PC_CURPCB) + add tmp, tmp, #(TD_PCB) #else .Lcurpcb: .word _C_LABEL(__pcpu) + PC_CURPCB Modified: stable/10/sys/arm/arm/genassym.c ============================================================================== --- stable/10/sys/arm/arm/genassym.c Thu May 15 16:51:45 2014 (r266158) +++ stable/10/sys/arm/arm/genassym.c Thu May 15 16:59:47 2014 (r266159) @@ -140,3 +140,4 @@ ASSYM(TRAPFRAMESIZE, sizeof(struct trapf ASSYM(MAXCOMLEN, MAXCOMLEN); ASSYM(NIRQ, NIRQ); +ASSYM(PCPU_SIZE, sizeof(struct pcpu)); Modified: stable/10/sys/arm/arm/machdep.c ============================================================================== --- stable/10/sys/arm/arm/machdep.c Thu May 15 16:51:45 2014 (r266158) +++ stable/10/sys/arm/arm/machdep.c Thu May 15 16:59:47 2014 (r266159) @@ -874,7 +874,7 @@ void pcpu0_init(void) { #if ARM_ARCH_6 || ARM_ARCH_7A || defined(CPU_MV_PJ4B) - set_pcpu(pcpup); + set_curthread(&thread0); #endif pcpu_init(pcpup, 0, sizeof(struct pcpu)); PCPU_SET(curthread, &thread0); Modified: stable/10/sys/arm/arm/mp_machdep.c ============================================================================== --- stable/10/sys/arm/arm/mp_machdep.c Thu May 15 16:51:45 2014 (r266158) +++ stable/10/sys/arm/arm/mp_machdep.c Thu May 15 16:59:47 2014 (r266159) @@ -177,7 +177,6 @@ init_secondary(int cpu) cpu_tlb_flushID(); pc = &__pcpu[cpu]; - set_pcpu(pc); /* * pcpu_init() updates queue, so it should not be executed in parallel @@ -203,6 +202,7 @@ init_secondary(int cpu) KASSERT(PCPU_GET(idlethread) != NULL, ("no idle thread")); pc->pc_curthread = pc->pc_idlethread; pc->pc_curpcb = pc->pc_idlethread->td_pcb; + set_curthread(pc->pc_idlethread); #ifdef VFP pc->pc_cpu = cpu; Modified: stable/10/sys/arm/arm/swtch.S ============================================================================== --- stable/10/sys/arm/arm/swtch.S Thu May 15 16:51:45 2014 (r266158) +++ stable/10/sys/arm/arm/swtch.S Thu May 15 16:59:47 2014 (r266159) @@ -88,17 +88,23 @@ __FBSDID("$FreeBSD$"); #define DOMAIN_CLIENT 0x01 -#ifdef _ARM_ARCH_6 -#define GET_PCPU(tmp) \ - mrc p15, 0, tmp, c13, c0, 4; +#if defined(_ARM_ARCH_6) && defined(SMP) +#define GET_PCPU(tmp, tmp2) \ + mrc p15, 0, tmp, c0, c0, 5; \ + and tmp, tmp, #0xf; \ + ldr tmp2, .Lcurpcpu+4; \ + mul tmp, tmp, tmp2; \ + ldr tmp2, .Lcurpcpu; \ + add tmp, tmp, tmp2; #else -.Lcurpcpu: - .word _C_LABEL(__pcpu) -#define GET_PCPU(tmp) \ +#define GET_PCPU(tmp, tmp2) \ ldr tmp, .Lcurpcpu #endif +.Lcurpcpu: + .word _C_LABEL(__pcpu) + .word PCPU_SIZE .Lcpufuncs: .word _C_LABEL(cpufuncs) .Lblocked_lock: @@ -112,7 +118,7 @@ ENTRY(cpu_throw) * r5 = newtd */ - GET_PCPU(r7) + GET_PCPU(r7, r9) #ifdef VFP /* @@ -191,10 +197,15 @@ ENTRY(cpu_throw) ldr r13, [r7, #(PCB_SP)] #endif + GET_PCPU(r6, r4) + /* Hook in a new pcb */ + str r7, [r6, #PC_CURPCB] /* We have a new curthread now so make a note it */ - GET_CURTHREAD_PTR(r6) + add r6, r6, #PC_CURTHREAD str r5, [r6] - +#ifndef ARM_TP_ADDRESS + mcr p15, 0, r5, c13, c0, 4 +#endif /* Set the new tp */ ldr r6, [r5, #(TD_MD + MD_TP)] #ifdef ARM_TP_ADDRESS @@ -207,9 +218,6 @@ ENTRY(cpu_throw) #else mcr p15, 0, r6, c13, c0, 3 #endif - /* Hook in a new pcb */ - GET_PCPU(r6) - str r7, [r6, #PC_CURPCB] add sp, sp, #4; ldmfd sp!, {r4-r7, pc} @@ -231,11 +239,13 @@ ENTRY(cpu_switch) /* Process is now on a processor. */ /* We have a new curthread now so make a note it */ - GET_CURTHREAD_PTR(r7) - str r1, [r7] + GET_PCPU(r7, r2) + str r1, [r7, #PC_CURTHREAD] +#ifndef ARM_TP_ADDRESS + mcr p15, 0, r1, c13, c0, 4 +#endif /* Hook in a new pcb */ - GET_PCPU(r7) ldr r2, [r1, #TD_PCB] str r2, [r7, #PC_CURPCB] @@ -315,7 +325,7 @@ ENTRY(cpu_switch) * a future exception will bounce the backup settings in the fp unit. * XXX vfp_store can't change r4 */ - GET_PCPU(r7) + GET_PCPU(r7, r8) ldr r8, [r7, #(PC_VFPCTHREAD)] cmp r4, r8 /* old thread used vfp? */ bne 1f /* no, don't save */ @@ -440,7 +450,6 @@ ENTRY(cpu_switch) #if defined(SCHED_ULE) && defined(SMP) ldr r6, .Lblocked_lock GET_CURTHREAD_PTR(r3) - 1: ldr r4, [r3, #TD_LOCK] cmp r4, r6 @@ -516,7 +525,7 @@ ENTRY(savectx) * registers and state, and modify the control as needed. * a future exception will bounce the backup settings in the fp unit. */ - GET_PCPU(r7) + GET_PCPU(r7, r4) ldr r4, [r7, #(PC_VFPCTHREAD)] /* vfp thread */ ldr r2, [r7, #(PC_CURTHREAD)] /* current thread */ cmp r4, r2 Modified: stable/10/sys/arm/arm/vfp.c ============================================================================== --- stable/10/sys/arm/arm/vfp.c Thu May 15 16:51:45 2014 (r266158) +++ stable/10/sys/arm/arm/vfp.c Thu May 15 16:59:47 2014 (r266159) @@ -140,9 +140,11 @@ vfp_bounce(u_int addr, u_int insn, struc u_int fpexc; struct pcb *curpcb; struct thread *vfptd; + int i; if (!vfp_exists) return 1; /* vfp does not exist */ + i = disable_interrupts(I32_bit|F32_bit); fpexc = fmrx(VFPEXC); /* read the vfp exception reg */ if (fpexc & VFPEXC_EN) { vfptd = PCPU_GET(vfpcthread); @@ -164,6 +166,7 @@ vfp_bounce(u_int addr, u_int insn, struc fmxr(VFPEXC, fpexc); /* turn vfp hardware off */ if (vfptd == curthread) { /* kill the process - we do not handle emulation */ + restore_interrupts(i); killproc(curthread->td_proc, "vfp emulation"); return 1; } @@ -173,7 +176,7 @@ vfp_bounce(u_int addr, u_int insn, struc } fpexc |= VFPEXC_EN; fmxr(VFPEXC, fpexc); /* enable the vfp and repeat command */ - curpcb = PCPU_GET(curpcb); + curpcb = curthread->td_pcb; /* If we were the last process to use the VFP, the process did not * use a VFP on another processor, then the registers in the VFP * will still be ours and are current. Eventually, we will make the @@ -183,7 +186,8 @@ vfp_bounce(u_int addr, u_int insn, struc #ifdef SMP curpcb->pcb_vfpcpu = PCPU_GET(cpu); #endif - PCPU_SET(vfpcthread, PCPU_GET(curthread)); + PCPU_SET(vfpcthread, curthread); + restore_interrupts(i); return 0; } @@ -218,7 +222,6 @@ vfp_restore(struct vfp_state *vfpsave) "ldr %0, [%1]\n" /* set old vfpscr */ "mcr p10, 7, %0, cr1, c0, 0\n" : "=&r" (vfpscr) : "r" (vfpsave), "r" (is_d32) : "cc"); - PCPU_SET(vfpcthread, PCPU_GET(curthread)); } } @@ -237,7 +240,7 @@ vfp_store(struct vfp_state *vfpsave) u_int tmp, vfpscr = 0; tmp = fmrx(VFPEXC); /* Is the vfp enabled? */ - if (vfpsave && tmp & VFPEXC_EN) { + if (vfpsave && (tmp & VFPEXC_EN)) { __asm __volatile("stc p11, c0, [%1], #128\n" /* d0-d15 */ "cmp %2, #0\n" /* -D16 or -D32? */ stclne" p11, c0, [%1], #128\n" /* d16-d31 */ @@ -265,6 +268,12 @@ vfp_discard() { u_int tmp = 0; + /* + * No need to protect the access to vfpcthread by disabling + * interrupts, since it's called from cpu_throw(), who is called + * with interrupts disabled. + */ + PCPU_SET(vfpcthread, 0); /* permanent forget about reg */ tmp = fmrx(VFPEXC); tmp &= ~VFPEXC_EN; /* turn off VFP hardware */ Modified: stable/10/sys/arm/include/asmacros.h ============================================================================== --- stable/10/sys/arm/include/asmacros.h Thu May 15 16:51:45 2014 (r266158) +++ stable/10/sys/arm/include/asmacros.h Thu May 15 16:59:47 2014 (r266159) @@ -241,15 +241,15 @@ name: #ifdef _ARM_ARCH_6 #define AST_LOCALS #define GET_CURTHREAD_PTR(tmp) \ - mrc p15, 0, tmp, c13, c0, 4; \ - add tmp, tmp, #(PC_CURTHREAD) + mrc p15, 0, tmp, c13, c0, 4 #else #define AST_LOCALS ;\ .Lcurthread: ;\ .word _C_LABEL(__pcpu) + PC_CURTHREAD #define GET_CURTHREAD_PTR(tmp) \ - ldr tmp, .Lcurthread + ldr tmp, .Lcurthread; \ + ldr tmp, [tmp] #endif #define DO_AST \ @@ -262,7 +262,6 @@ name: bne 2f /* Nope, get out now */ ;\ bic r4, r4, #(I32_bit|F32_bit) ;\ 1: GET_CURTHREAD_PTR(r5) ;\ - ldr r5, [r5] ;\ ldr r1, [r5, #(TD_FLAGS)] ;\ and r1, r1, #(TDF_ASTPENDING|TDF_NEEDRESCHED) ;\ teq r1, #0x00000000 ;\ Modified: stable/10/sys/arm/include/pcpu.h ============================================================================== --- stable/10/sys/arm/include/pcpu.h Thu May 15 16:51:45 2014 (r266158) +++ stable/10/sys/arm/include/pcpu.h Thu May 15 16:59:47 2014 (r266159) @@ -62,22 +62,36 @@ struct pcpu; extern struct pcpu *pcpup; #if ARM_ARCH_6 || ARM_ARCH_7A /* or ARM_TP_ADDRESS mark REMOVE ME NOTE */ -static inline struct pcpu * -get_pcpu(void) + +#define CPU_MASK (0xf) + +#ifndef SMP +#define get_pcpu() (pcpup) +#else +#define get_pcpu() __extension__ ({ \ + int id; \ + __asm __volatile("mrc p15, 0, %0, c0, c0, 5" : "=r" (id)); \ + (pcpup + (id & CPU_MASK)); \ + }) +#endif + +static inline struct thread * +get_curthread(void) { - void *pcpu; + void *ret; - __asm __volatile("mrc p15, 0, %0, c13, c0, 4" : "=r" (pcpu)); - return (pcpu); + __asm __volatile("mrc p15, 0, %0, c13, c0, 4" : "=r" (ret)); + return (ret); } static inline void -set_pcpu(void *pcpu) +set_curthread(struct thread *td) { - __asm __volatile("mcr p15, 0, %0, c13, c0, 4" : : "r" (pcpu)); + __asm __volatile("mcr p15, 0, %0, c13, c0, 4" : : "r" (td)); } + static inline void * get_tls(void) { @@ -93,6 +107,9 @@ set_tls(void *tls) __asm __volatile("mcr p15, 0, %0, c13, c0, 3" : : "r" (tls)); } + +#define curthread get_curthread() + #else #define get_pcpu() pcpup #endif Modified: stable/10/sys/arm/ti/ti_mmchs.c ============================================================================== --- stable/10/sys/arm/ti/ti_mmchs.c Thu May 15 16:51:45 2014 (r266158) +++ stable/10/sys/arm/ti/ti_mmchs.c Thu May 15 16:59:47 2014 (r266159) @@ -1755,7 +1755,6 @@ ti_mmchs_attach(device_t dev) device_add_child(dev, "mmc", 0); - device_set_ivars(dev, &sc->host); err = bus_generic_attach(dev); out: From owner-svn-src-stable@FreeBSD.ORG Thu May 15 17:30:21 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EFAC3794; Thu, 15 May 2014 17:30:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8AFC2EEC; Thu, 15 May 2014 17:30:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FHULME005759; Thu, 15 May 2014 17:30:21 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FHUGw3005353; Thu, 15 May 2014 17:30:16 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405151730.s4FHUGw3005353@svn.freebsd.org> From: Ian Lepore Date: Thu, 15 May 2014 17:30:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266160 - in stable/10/sys: arm/arm arm/at91 arm/broadcom/bcm2835 arm/econa arm/freescale/imx arm/include arm/mv arm/s3c2xx0 arm/xscale/ixp425 conf dev/fdt dev/mmc dev/ofw dev/powermac_... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 17:30:22 -0000 Author: ian Date: Thu May 15 17:30:16 2014 New Revision: 266160 URL: http://svnweb.freebsd.org/changeset/base/266160 Log: MFC r261423, r261424, r261516, r261513, r261562, r261563, r261564, r261565, r261596, r261606 Add the imx sdhci controller. Move Open Firmware device root on PowerPC, ARM, and MIPS systems to a sub-node of nexus (ofwbus) rather than direct attach under nexus. This fixes FDT on x86 and will make coexistence with ACPI on ARM systems easier. SPARC is unchanged. Add the missing ')' at end of sentence. Reword it to use a more common idiom. Pass the kernel physical address to initarm through the boot param struct. Make functions only used in vfp.c static, and remove vfp_enable. Fix __syscall on armeb EABI. As it returns a 64-bit value it needs to place 32-bit data in r1, not r0. 64-bit data is already packed correctly. Use abp_physaddr for the physical address over KERNPHYSADDR. This helps us remove the need to load the kernel at a fixed address. Remove references to PHYSADDR where it's used only in debugging output. Dynamically generate the page table. This will allow us to detect the physical address we are loaded at to change the mapping. Added: stable/10/sys/dev/ofw/ofwbus.c - copied unchanged from r261513, head/sys/dev/ofw/ofwbus.c Deleted: stable/10/sys/dev/fdt/fdtbus.c stable/10/sys/dev/ofw/ofw_nexus.c stable/10/sys/dev/ofw/ofw_nexus.h Modified: stable/10/sys/arm/arm/elf_trampoline.c stable/10/sys/arm/arm/locore.S stable/10/sys/arm/arm/machdep.c stable/10/sys/arm/arm/nexus.c stable/10/sys/arm/arm/pmap-v6.c stable/10/sys/arm/arm/pmap.c stable/10/sys/arm/arm/support.S stable/10/sys/arm/arm/vfp.c stable/10/sys/arm/arm/vm_machdep.c stable/10/sys/arm/at91/at91_machdep.c stable/10/sys/arm/broadcom/bcm2835/bcm2835_fb.c stable/10/sys/arm/broadcom/bcm2835/bcm2835_fbd.c stable/10/sys/arm/econa/econa_machdep.c stable/10/sys/arm/freescale/imx/tzic.c stable/10/sys/arm/include/cpu.h stable/10/sys/arm/include/machdep.h stable/10/sys/arm/mv/mv_localbus.c stable/10/sys/arm/mv/mv_pci.c stable/10/sys/arm/s3c2xx0/s3c24x0_machdep.c stable/10/sys/arm/xscale/ixp425/avila_machdep.c stable/10/sys/conf/files stable/10/sys/conf/files.powerpc stable/10/sys/dev/fdt/simplebus.c stable/10/sys/dev/mmc/mmc.c stable/10/sys/dev/powermac_nvram/powermac_nvram.c stable/10/sys/mips/beri/beri_simplebus.c stable/10/sys/mips/mips/nexus.c stable/10/sys/powerpc/mambo/mambo.c stable/10/sys/powerpc/mpc85xx/lbc.c stable/10/sys/powerpc/mpc85xx/pci_mpc85xx.c stable/10/sys/powerpc/ofw/ofw_cpu.c stable/10/sys/powerpc/ofw/openpic_ofw.c stable/10/sys/powerpc/powermac/cpcht.c stable/10/sys/powerpc/powermac/grackle.c stable/10/sys/powerpc/powermac/smu.c stable/10/sys/powerpc/powermac/uninorth.c stable/10/sys/powerpc/powermac/uninorthpci.c stable/10/sys/powerpc/powerpc/nexus.c stable/10/sys/powerpc/pseries/rtas_dev.c stable/10/sys/powerpc/pseries/rtas_pci.c stable/10/sys/powerpc/pseries/vdevice.c stable/10/sys/powerpc/pseries/xics.c stable/10/sys/powerpc/psim/iobus.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/elf_trampoline.c ============================================================================== --- stable/10/sys/arm/arm/elf_trampoline.c Thu May 15 16:59:47 2014 (r266159) +++ stable/10/sys/arm/arm/elf_trampoline.c Thu May 15 17:30:16 2014 (r266160) @@ -189,7 +189,7 @@ _startC(void) int physaddr = KERNPHYSADDR; int tmp1; unsigned int sp = ((unsigned int)&_end & ~3) + 4; -#if defined(FLASHADDR) && defined(LOADERRAMADDR) +#if defined(FLASHADDR) && defined(PHYSADDR) && defined(LOADERRAMADDR) unsigned int pc; __asm __volatile("mov %0, pc\n" Modified: stable/10/sys/arm/arm/locore.S ============================================================================== --- stable/10/sys/arm/arm/locore.S Thu May 15 16:59:47 2014 (r266159) +++ stable/10/sys/arm/arm/locore.S Thu May 15 17:30:16 2014 (r266160) @@ -153,22 +153,27 @@ Lunmapped: ldr r2, =(KERNVIRTADDR - KERNPHYSADDR) sub r0, r1, r2 - adr r4, mmu_init_table - b 3f - -2: - str r3, [r0, r2] - add r2, r2, #4 - add r3, r3, #(L1_S_SIZE) - adds r1, r1, #-1 - bhi 2b -3: - ldmia r4!, {r1,r2,r3} /* # of sections, VA, PA|attr */ - cmp r1, #0 - adrne r5, 2b - bicne r5, r5, #0xf0000000 - orrne r5, r5, #PHYSADDR - movne pc, r5 + /* + * Map PA == VA + */ + ldr r5, =(PHYSADDR) + mov r1, r5 + mov r2, r5 + /* Map 64MiB, preserved over calls to build_pagetables */ + mov r3, #64 + bl build_pagetables + + /* Create the kernel map to jump to */ + mov r1, r5 + ldr r2, =(KERNBASE) + bl build_pagetables + +#if defined(SOCDEV_PA) && defined(SOCDEV_VA) + /* Create the custom map */ + ldr r1, =SOCDEV_VA + ldr r2, =SOCDEV_PA + bl build_pagetables +#endif #if defined(SMP) orr r0, r0, #2 /* Set TTB shared memory flag */ @@ -216,7 +221,7 @@ mmu_done: ldr pc, .Lvirt_done virt_done: - mov r1, #20 /* loader info size is 20 bytes also second arg */ + mov r1, #24 /* loader info size is 24 bytes also second arg */ subs sp, sp, r1 /* allocate arm_boot_params struct on stack */ bic sp, sp, #7 /* align stack to 8 bytes */ mov r0, sp /* loader info pointer is first arg */ @@ -225,6 +230,8 @@ virt_done: str r8, [r0, #8] /* Store r1 from boot loader */ str ip, [r0, #12] /* store r2 from boot loader */ str fp, [r0, #16] /* store r3 from boot loader */ + ldr r5, =KERNPHYSADDR /* load KERNPHYSADDR as the physical address */ + str r5, [r0, #20] /* store the physical address */ mov fp, #0 /* trace back starts here */ bl _C_LABEL(initarm) /* Off we go */ @@ -236,6 +243,40 @@ virt_done: adr r0, .Lmainreturned b _C_LABEL(panic) /* NOTREACHED */ +END(btext) +END(_start) + +/* + * Builds the page table + * r0 - The table base address + * r1 - The physical address (trashed) + * r2 - The virtual address (trashed) + * r3 - The number of 1MiB sections + * r4 - Trashed + * + * Addresses must be 1MiB aligned + */ +build_pagetables: + /* Set the required page attributed */ + ldr r4, =(L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW)) +#if defined(SMP) + orr r4, #(L1_SHARED) +#endif + orr r1, r4 + + /* Move the virtual address to the correct bit location */ + lsr r2, #(L1_S_SHIFT - 2) + + mov r4, r3 +1: + str r1, [r0, r2] + add r2, r2, #4 + add r1, r1, #(L1_S_SIZE) + adds r4, r4, #-1 + bhi 1b + + RET + #define MMU_INIT(va,pa,n_sec,attr) \ .word n_sec ; \ .word 4*((va)>>L1_S_SHIFT) ; \ @@ -255,27 +296,7 @@ Lstartup_pagetable: Lstartup_pagetable_secondary: .word temp_pagetable #endif -END(btext) -END(_start) -mmu_init_table: - /* fill all table VA==PA */ - /* map SDRAM VA==PA, WT cacheable */ -#if !defined(SMP) - MMU_INIT(PHYSADDR, PHYSADDR, 64, L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW)) - /* map VA 0xc0000000..0xc3ffffff to PA */ - MMU_INIT(KERNBASE, PHYSADDR, 64, L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW)) -#if defined(SOCDEV_PA) && defined(SOCDEV_VA) - /* Map in 0x04000000 worth of the SoC's devices for bootstrap debugging */ - MMU_INIT(SOCDEV_VA, SOCDEV_PA, 64, L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW)) -#endif -#else - MMU_INIT(PHYSADDR, PHYSADDR , 64, L1_TYPE_S|L1_SHARED|L1_S_C|L1_S_AP(AP_KRW)) - /* map VA 0xc0000000..0xc3ffffff to PA */ - MMU_INIT(KERNBASE, PHYSADDR, 64, L1_TYPE_S|L1_SHARED|L1_S_C|L1_S_AP(AP_KRW)) - MMU_INIT(0x48000000, 0x48000000, 1, L1_TYPE_S|L1_SHARED|L1_S_C|L1_S_AP(AP_KRW)) -#endif /* SMP */ - .word 0 /* end of table */ .Lstart: .word _edata .word _ebss Modified: stable/10/sys/arm/arm/machdep.c ============================================================================== --- stable/10/sys/arm/arm/machdep.c Thu May 15 16:59:47 2014 (r266159) +++ stable/10/sys/arm/arm/machdep.c Thu May 15 17:30:16 2014 (r266160) @@ -788,7 +788,7 @@ makectx(struct trapframe *tf, struct pcb * calling pmap_bootstrap. */ void -arm_dump_avail_init(vm_offset_t ramsize, size_t max) +arm_dump_avail_init(vm_paddr_t physaddr, vm_offset_t ramsize, size_t max) { #ifdef LINUX_BOOT_ABI /* @@ -814,8 +814,8 @@ arm_dump_avail_init(vm_offset_t ramsize, if (max < 4) panic("dump_avail too small\n"); - dump_avail[0] = round_page(PHYSADDR); - dump_avail[1] = trunc_page(PHYSADDR + ramsize); + dump_avail[0] = round_page(physaddr); + dump_avail[1] = trunc_page(physaddr + ramsize); dump_avail[2] = 0; dump_avail[3] = 0; } @@ -901,7 +901,7 @@ linux_parse_boot_param(struct arm_boot_p board_id = abp->abp_r1; walker = (struct arm_lbabi_tag *) - (abp->abp_r2 + KERNVIRTADDR - KERNPHYSADDR); + (abp->abp_r2 + KERNVIRTADDR - abp->abp_physaddr); /* xxx - Need to also look for binary device tree */ if (ATAG_TAG(walker) != ATAG_CORE) @@ -979,7 +979,7 @@ freebsd_parse_boot_param(struct arm_boot ksym_start = MD_FETCH(kmdp, MODINFOMD_SSYM, uintptr_t); ksym_end = MD_FETCH(kmdp, MODINFOMD_ESYM, uintptr_t); #endif - preload_addr_relocate = KERNVIRTADDR - KERNPHYSADDR; + preload_addr_relocate = KERNVIRTADDR - abp->abp_physaddr; return lastaddr; } #endif @@ -1081,15 +1081,15 @@ print_kenv(void) } static void -physmap_init(struct mem_region *availmem_regions, int availmem_regions_sz) +physmap_init(struct mem_region *availmem_regions, int availmem_regions_sz, + vm_offset_t kernload) { int i, j, cnt; - vm_offset_t phys_kernelend, kernload; + vm_offset_t phys_kernelend; uint32_t s, e, sz; struct mem_region *mp, *mp1; - phys_kernelend = KERNPHYSADDR + (virtual_avail - KERNVIRTADDR); - kernload = KERNPHYSADDR; + phys_kernelend = kernload + (virtual_avail - KERNVIRTADDR); /* * Remove kernel physical address range from avail @@ -1327,7 +1327,7 @@ initarm(struct arm_boot_params *abp) /* Define a macro to simplify memory allocation */ #define valloc_pages(var, np) \ alloc_pages((var).pv_va, (np)); \ - (var).pv_pa = (var).pv_va + (KERNPHYSADDR - KERNVIRTADDR); + (var).pv_pa = (var).pv_va + (abp->abp_physaddr - KERNVIRTADDR); #define alloc_pages(var, np) \ (var) = freemempos; \ @@ -1348,7 +1348,7 @@ initarm(struct arm_boot_params *abp) L2_TABLE_SIZE_REAL * (i - j); kernel_pt_table[i].pv_pa = kernel_pt_table[i].pv_va - KERNVIRTADDR + - KERNPHYSADDR; + abp->abp_physaddr; } } @@ -1393,7 +1393,7 @@ initarm(struct arm_boot_params *abp) pmap_curmaxkvaddr = l2_start + (l2size - 1) * L1_S_SIZE; /* Map kernel code and data */ - pmap_map_chunk(l1pagetable, KERNVIRTADDR, KERNPHYSADDR, + pmap_map_chunk(l1pagetable, KERNVIRTADDR, abp->abp_physaddr, (((uint32_t)(lastaddr) - KERNVIRTADDR) + PAGE_MASK) & ~PAGE_MASK, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); @@ -1497,7 +1497,8 @@ initarm(struct arm_boot_params *abp) arm_intrnames_init(); arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL); - arm_dump_avail_init(memsize, sizeof(dump_avail) / sizeof(dump_avail[0])); + arm_dump_avail_init(abp->abp_physaddr, memsize, + sizeof(dump_avail) / sizeof(dump_avail[0])); pmap_bootstrap(freemempos, &kernel_l1pt); msgbufp = (void *)msgbufpv.pv_va; msgbufinit(msgbufp, msgbufsize); @@ -1506,7 +1507,7 @@ initarm(struct arm_boot_params *abp) /* * Prepare map of physical memory regions available to vm subsystem. */ - physmap_init(availmem_regions, availmem_regions_sz); + physmap_init(availmem_regions, availmem_regions_sz, abp->abp_physaddr); init_param2(physmem); kdb_init(); Modified: stable/10/sys/arm/arm/nexus.c ============================================================================== --- stable/10/sys/arm/arm/nexus.c Thu May 15 16:59:47 2014 (r266159) +++ stable/10/sys/arm/arm/nexus.c Thu May 15 17:30:16 2014 (r266160) @@ -63,11 +63,11 @@ __FBSDID("$FreeBSD$"); #include "opt_platform.h" #ifdef FDT -#include #include #include #include "ofw_bus_if.h" -#else +#endif + static MALLOC_DEFINE(M_NEXUSDEV, "nexusdev", "Nexus device"); struct nexus_device { @@ -84,7 +84,6 @@ static int nexus_print_child(device_t, d static device_t nexus_add_child(device_t, u_int, const char *, int); static struct resource *nexus_alloc_resource(device_t, device_t, int, int *, u_long, u_long, u_long, u_int); -#endif static int nexus_activate_resource(device_t, device_t, int, int, struct resource *); static int nexus_config_intr(device_t dev, int irq, enum intr_trigger trig, @@ -102,7 +101,6 @@ static int nexus_ofw_map_intr(device_t d #endif static device_method_t nexus_methods[] = { -#ifndef FDT /* Device interface */ DEVMETHOD(device_probe, nexus_probe), DEVMETHOD(device_attach, nexus_attach), @@ -110,7 +108,6 @@ static device_method_t nexus_methods[] = DEVMETHOD(bus_print_child, nexus_print_child), DEVMETHOD(bus_add_child, nexus_add_child), DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), -#endif DEVMETHOD(bus_activate_resource, nexus_activate_resource), DEVMETHOD(bus_config_intr, nexus_config_intr), DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), @@ -123,19 +120,13 @@ static device_method_t nexus_methods[] = }; static devclass_t nexus_devclass; -#ifndef FDT static driver_t nexus_driver = { "nexus", nexus_methods, 1 /* no softc */ }; -#else -DEFINE_CLASS_1(nexus, nexus_driver, nexus_methods, - sizeof(struct ofw_nexus_softc), ofw_nexus_driver); -#endif DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0); -#ifndef FDT static int nexus_probe(device_t dev) { @@ -235,7 +226,6 @@ nexus_alloc_resource(device_t bus, devic return (rv); } -#endif static int nexus_config_intr(device_t dev, int irq, enum intr_trigger trig, Modified: stable/10/sys/arm/arm/pmap-v6.c ============================================================================== --- stable/10/sys/arm/arm/pmap-v6.c Thu May 15 16:59:47 2014 (r266159) +++ stable/10/sys/arm/arm/pmap-v6.c Thu May 15 17:30:16 2014 (r266160) @@ -1312,8 +1312,6 @@ pmap_init(void) vm_size_t s; int i, pv_npg; - PDEBUG(1, printf("pmap_init: phys_start = %08x\n", PHYSADDR)); - l2zone = uma_zcreate("L2 Table", L2_TABLE_SIZE_REAL, pmap_l2ptp_ctor, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM | UMA_ZONE_NOFREE); l2table_zone = uma_zcreate("L2 Table", sizeof(struct l2_dtable), NULL, Modified: stable/10/sys/arm/arm/pmap.c ============================================================================== --- stable/10/sys/arm/arm/pmap.c Thu May 15 16:59:47 2014 (r266159) +++ stable/10/sys/arm/arm/pmap.c Thu May 15 17:30:16 2014 (r266160) @@ -1826,8 +1826,6 @@ pmap_init(void) { int shpgperproc = PMAP_SHPGPERPROC; - PDEBUG(1, printf("pmap_init: phys_start = %08x\n", PHYSADDR)); - l2zone = uma_zcreate("L2 Table", L2_TABLE_SIZE_REAL, pmap_l2ptp_ctor, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM | UMA_ZONE_NOFREE); l2table_zone = uma_zcreate("L2 Table", sizeof(struct l2_dtable), NULL, Modified: stable/10/sys/arm/arm/support.S ============================================================================== --- stable/10/sys/arm/arm/support.S Thu May 15 16:59:47 2014 (r266159) +++ stable/10/sys/arm/arm/support.S Thu May 15 17:30:16 2014 (r266160) @@ -939,7 +939,7 @@ END(memmove) ENTRY(memcpy) /* save leaf functions having to store this away */ /* Do not check arm_memcpy if we're running from flash */ -#ifdef FLASHADDR +#if defined(FLASHADDR) && defined(PHYSADDR) #if FLASHADDR > PHYSADDR ldr r3, =FLASHADDR cmp r3, pc Modified: stable/10/sys/arm/arm/vfp.c ============================================================================== --- stable/10/sys/arm/arm/vfp.c Thu May 15 16:59:47 2014 (r266159) +++ stable/10/sys/arm/arm/vfp.c Thu May 15 17:30:16 2014 (r266160) @@ -42,10 +42,9 @@ __FBSDID("$FreeBSD$"); /* function prototypes */ unsigned int get_coprocessorACR(void); -int vfp_bounce(u_int, u_int, struct trapframe *, int); +static int vfp_bounce(u_int, u_int, struct trapframe *, int); +static void vfp_restore(struct vfp_state *); void vfp_discard(void); -void vfp_enable(void); -void vfp_restore(struct vfp_state *); void vfp_store(struct vfp_state *); void set_coprocessorACR(u_int); @@ -134,7 +133,7 @@ SYSINIT(vfp, SI_SUB_CPU, SI_ORDER_ANY, v /* start VFP unit, restore the vfp registers from the PCB and retry * the instruction */ -int +static int vfp_bounce(u_int addr, u_int insn, struct trapframe *frame, int code) { u_int fpexc; @@ -196,7 +195,7 @@ vfp_bounce(u_int addr, u_int insn, struc * Eventually we will use the information that this process was the last * to use the VFP hardware and bypass the restore, just turn on the hardware. */ -void +static void vfp_restore(struct vfp_state *vfpsave) { u_int vfpscr = 0; @@ -280,17 +279,5 @@ vfp_discard() fmxr(VFPEXC, tmp); } -/* Enable the VFP hardware without restoring registers. - * Called when the registers are still in the VFP unit - */ -void -vfp_enable() -{ - u_int tmp = 0; - - tmp = fmrx(VFPEXC); - tmp |= VFPEXC_EN; - fmxr(VFPEXC, tmp); -} #endif Modified: stable/10/sys/arm/arm/vm_machdep.c ============================================================================== --- stable/10/sys/arm/arm/vm_machdep.c Thu May 15 16:59:47 2014 (r266159) +++ stable/10/sys/arm/arm/vm_machdep.c Thu May 15 17:30:16 2014 (r266160) @@ -298,15 +298,25 @@ cpu_set_syscall_retval(struct thread *td struct trapframe *frame; int fixup; #ifdef __ARMEB__ - uint32_t insn; + u_int call; #endif frame = td->td_frame; fixup = 0; #ifdef __ARMEB__ - insn = *(u_int32_t *)(frame->tf_pc - INSN_SIZE); - if ((insn & 0x000fffff) == SYS___syscall) { + /* + * __syscall returns an off_t while most other syscalls return an + * int. As an off_t is 64-bits and an int is 32-bits we need to + * place the returned data into r1. As the lseek and frerebsd6_lseek + * syscalls also return an off_t they do not need this fixup. + */ +#ifdef __ARM_EABI__ + call = frame->tf_r7; +#else + call = *(u_int32_t *)(frame->tf_pc - INSN_SIZE) & 0x000fffff; +#endif + if (call == SYS___syscall) { register_t *ap = &frame->tf_r0; register_t code = ap[_QUAD_LOWWORD]; if (td->td_proc->p_sysent->sv_mask) Modified: stable/10/sys/arm/at91/at91_machdep.c ============================================================================== --- stable/10/sys/arm/at91/at91_machdep.c Thu May 15 16:59:47 2014 (r266159) +++ stable/10/sys/arm/at91/at91_machdep.c Thu May 15 17:30:16 2014 (r266160) @@ -630,7 +630,8 @@ initarm(struct arm_boot_params *abp) arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL); pmap_curmaxkvaddr = afterkern + L1_S_SIZE * (KERNEL_PT_KERN_NUM - 1); - arm_dump_avail_init(memsize, sizeof(dump_avail)/sizeof(dump_avail[0])); + arm_dump_avail_init(abp->abp_physaddr, memsize, + sizeof(dump_avail)/sizeof(dump_avail[0])); /* Always use the 256MB of KVA we have available between the kernel and devices */ vm_max_kernel_address = KERNVIRTADDR + (256 << 20); pmap_bootstrap(freemempos, &kernel_l1pt); Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_fb.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_fb.c Thu May 15 16:59:47 2014 (r266159) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_fb.c Thu May 15 17:30:16 2014 (r266160) @@ -361,7 +361,7 @@ static driver_t bcm_fb_driver = { sizeof(struct bcmsc_softc), }; -DRIVER_MODULE(bcm2835fb, nexus, bcm_fb_driver, bcm_fb_devclass, 0, 0); +DRIVER_MODULE(bcm2835fb, ofwbus, bcm_fb_driver, bcm_fb_devclass, 0, 0); /* * Video driver routines and glue. Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_fbd.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Thu May 15 16:59:47 2014 (r266159) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Thu May 15 17:30:16 2014 (r266160) @@ -315,4 +315,4 @@ static driver_t bcm_fb_driver = { sizeof(struct bcmsc_softc), }; -DRIVER_MODULE(bcm2835fb, nexus, bcm_fb_driver, bcm_fb_devclass, 0, 0); +DRIVER_MODULE(bcm2835fb, ofwbus, bcm_fb_driver, bcm_fb_devclass, 0, 0); Modified: stable/10/sys/arm/econa/econa_machdep.c ============================================================================== --- stable/10/sys/arm/econa/econa_machdep.c Thu May 15 16:59:47 2014 (r266159) +++ stable/10/sys/arm/econa/econa_machdep.c Thu May 15 17:30:16 2014 (r266160) @@ -322,7 +322,8 @@ initarm(struct arm_boot_params *abp) arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL); pmap_curmaxkvaddr = afterkern + L1_S_SIZE * (KERNEL_PT_KERN_NUM - 1); - arm_dump_avail_init(memsize, sizeof(dump_avail) / sizeof(dump_avail[0])); + arm_dump_avail_init(abp->abp_physaddr, memsize, + sizeof(dump_avail) / sizeof(dump_avail[0])); vm_max_kernel_address = KERNVIRTADDR + 3 * memsize; pmap_bootstrap(freemempos, &kernel_l1pt); Modified: stable/10/sys/arm/freescale/imx/tzic.c ============================================================================== --- stable/10/sys/arm/freescale/imx/tzic.c Thu May 15 16:59:47 2014 (r266159) +++ stable/10/sys/arm/freescale/imx/tzic.c Thu May 15 17:30:16 2014 (r266160) @@ -146,9 +146,9 @@ static devclass_t tzic_devclass; /* * Memory space of controller located outside of device range, so let him to - * attach not only to simplebus, but nexus also. + * attach not only to simplebus, but ofwbus also. */ -EARLY_DRIVER_MODULE(tzic, nexus, tzic_driver, tzic_devclass, 0, 0, +EARLY_DRIVER_MODULE(tzic, ofwbus, tzic_driver, tzic_devclass, 0, 0, BUS_PASS_INTERRUPT); EARLY_DRIVER_MODULE(tzic, simplebus, tzic_driver, tzic_devclass, 0, 0, BUS_PASS_INTERRUPT); Modified: stable/10/sys/arm/include/cpu.h ============================================================================== --- stable/10/sys/arm/include/cpu.h Thu May 15 16:59:47 2014 (r266159) +++ stable/10/sys/arm/include/cpu.h Thu May 15 17:30:16 2014 (r266160) @@ -41,6 +41,7 @@ struct arm_boot_params { register_t abp_r1; /* r1 from the boot loader */ register_t abp_r2; /* r2 from the boot loader */ register_t abp_r3; /* r3 from the boot loader */ + vm_offset_t abp_physaddr; /* The kernel physical address */ }; void arm_vector_init(vm_offset_t, int); Modified: stable/10/sys/arm/include/machdep.h ============================================================================== --- stable/10/sys/arm/include/machdep.h Thu May 15 16:59:47 2014 (r266159) +++ stable/10/sys/arm/include/machdep.h Thu May 15 17:30:16 2014 (r266160) @@ -72,6 +72,6 @@ void board_set_serial(uint64_t); void board_set_revision(uint32_t); /* Setup standard arrays */ -void arm_dump_avail_init( vm_offset_t memsize, size_t max); +void arm_dump_avail_init(vm_paddr_t, vm_offset_t, size_t); #endif /* !_MACHINE_MACHDEP_H_ */ Modified: stable/10/sys/arm/mv/mv_localbus.c ============================================================================== --- stable/10/sys/arm/mv/mv_localbus.c Thu May 15 16:59:47 2014 (r266159) +++ stable/10/sys/arm/mv/mv_localbus.c Thu May 15 17:30:16 2014 (r266160) @@ -156,7 +156,7 @@ static struct localbus_bank localbus_ban devclass_t localbus_devclass; -DRIVER_MODULE(localbus, nexus, localbus_driver, localbus_devclass, 0, 0); +DRIVER_MODULE(localbus, ofwbus, localbus_driver, localbus_devclass, 0, 0); static int fdt_localbus_reg_decode(phandle_t node, struct localbus_softc *sc, Modified: stable/10/sys/arm/mv/mv_pci.c ============================================================================== --- stable/10/sys/arm/mv/mv_pci.c Thu May 15 16:59:47 2014 (r266159) +++ stable/10/sys/arm/mv/mv_pci.c Thu May 15 17:30:16 2014 (r266160) @@ -398,7 +398,7 @@ static driver_t mv_pcib_driver = { devclass_t pcib_devclass; -DRIVER_MODULE(pcib, nexus, mv_pcib_driver, pcib_devclass, 0, 0); +DRIVER_MODULE(pcib, ofwbus, mv_pcib_driver, pcib_devclass, 0, 0); static struct mtx pcicfg_mtx; Modified: stable/10/sys/arm/s3c2xx0/s3c24x0_machdep.c ============================================================================== --- stable/10/sys/arm/s3c2xx0/s3c24x0_machdep.c Thu May 15 16:59:47 2014 (r266159) +++ stable/10/sys/arm/s3c2xx0/s3c24x0_machdep.c Thu May 15 17:30:16 2014 (r266160) @@ -384,7 +384,8 @@ initarm(struct arm_boot_params *abp) arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL); pmap_curmaxkvaddr = afterkern + 0x100000 * (KERNEL_PT_KERN_NUM - 1); - arm_dump_avail_init(memsize, sizeof(dump_avail) / sizeof(dump_avail[0])); + arm_dump_avail_init(abp->abp_physaddr, memsize, + sizeof(dump_avail) / sizeof(dump_avail[0])); vm_max_kernel_address = KERNVIRTADDR + 3 * memsize; pmap_bootstrap(freemempos, &kernel_l1pt); msgbufp = (void*)msgbufpv.pv_va; Modified: stable/10/sys/arm/xscale/ixp425/avila_machdep.c ============================================================================== --- stable/10/sys/arm/xscale/ixp425/avila_machdep.c Thu May 15 16:59:47 2014 (r266159) +++ stable/10/sys/arm/xscale/ixp425/avila_machdep.c Thu May 15 17:30:16 2014 (r266160) @@ -433,7 +433,8 @@ initarm(struct arm_boot_params *abp) arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL); pmap_curmaxkvaddr = afterkern + PAGE_SIZE; - arm_dump_avail_init(memsize, sizeof(dump_avail) / sizeof(dump_avail[0])); + arm_dump_avail_init(abp->abp_physaddr, memsize, + sizeof(dump_avail) / sizeof(dump_avail[0])); vm_max_kernel_address = 0xd0000000; pmap_bootstrap(pmap_curmaxkvaddr, &kernel_l1pt); msgbufp = (void*)msgbufpv.pv_va; Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Thu May 15 16:59:47 2014 (r266159) +++ stable/10/sys/conf/files Thu May 15 17:30:16 2014 (r266160) @@ -1407,7 +1407,6 @@ dev/fdt/fdt_common.c optional fdt dev/fdt/fdt_slicer.c optional fdt cfi | fdt nand dev/fdt/fdt_static_dtb.S optional fdt fdt_dtb_static \ dependency "$S/boot/fdt/dts/${FDT_DTS_FILE}" -dev/fdt/fdtbus.c optional fdtbus dev/fdt/simplebus.c optional fdt dev/fe/if_fe.c optional fe dev/fe/if_fe_pccard.c optional fe pccard @@ -1968,7 +1967,7 @@ dev/ofw/ofw_bus_subr.c optional fdt dev/ofw/ofw_fdt.c optional fdt dev/ofw/ofw_if.m optional fdt dev/ofw/ofw_iicbus.c optional fdt iicbus -dev/ofw/ofw_nexus.c optional fdt +dev/ofw/ofwbus.c optional fdt dev/ofw/openfirm.c optional fdt dev/ofw/openfirmio.c optional fdt dev/patm/if_patm.c optional patm pci Modified: stable/10/sys/conf/files.powerpc ============================================================================== --- stable/10/sys/conf/files.powerpc Thu May 15 16:59:47 2014 (r266159) +++ stable/10/sys/conf/files.powerpc Thu May 15 17:30:16 2014 (r266160) @@ -48,7 +48,7 @@ dev/ofw/ofw_bus_subr.c optional aim dev/ofw/ofw_console.c optional aim dev/ofw/ofw_disk.c optional ofwd aim dev/ofw/ofw_iicbus.c optional iicbus aim -dev/ofw/ofw_nexus.c optional aim | fdt +dev/ofw/ofwbus.c optional aim | fdt dev/ofw/ofw_standard.c optional aim powerpc dev/powermac_nvram/powermac_nvram.c optional powermac_nvram powermac dev/quicc/quicc_bfe_fdt.c optional quicc mpc85xx Modified: stable/10/sys/dev/fdt/simplebus.c ============================================================================== --- stable/10/sys/dev/fdt/simplebus.c Thu May 15 16:59:47 2014 (r266159) +++ stable/10/sys/dev/fdt/simplebus.c Thu May 15 17:30:16 2014 (r266160) @@ -121,7 +121,7 @@ static driver_t simplebus_driver = { sizeof(struct simplebus_softc) }; static devclass_t simplebus_devclass; -DRIVER_MODULE(simplebus, nexus, simplebus_driver, simplebus_devclass, 0, 0); +DRIVER_MODULE(simplebus, ofwbus, simplebus_driver, simplebus_devclass, 0, 0); DRIVER_MODULE(simplebus, simplebus, simplebus_driver, simplebus_devclass, 0, 0); static int Modified: stable/10/sys/dev/mmc/mmc.c ============================================================================== --- stable/10/sys/dev/mmc/mmc.c Thu May 15 16:59:47 2014 (r266159) +++ stable/10/sys/dev/mmc/mmc.c Thu May 15 17:30:16 2014 (r266160) @@ -1756,9 +1756,11 @@ static driver_t mmc_driver = { }; static devclass_t mmc_devclass; -DRIVER_MODULE(mmc, ti_mmchs, mmc_driver, mmc_devclass, NULL, NULL); DRIVER_MODULE(mmc, at91_mci, mmc_driver, mmc_devclass, NULL, NULL); -DRIVER_MODULE(mmc, sdhci_pci, mmc_driver, mmc_devclass, NULL, NULL); DRIVER_MODULE(mmc, sdhci_bcm, mmc_driver, mmc_devclass, NULL, NULL); DRIVER_MODULE(mmc, sdhci_fdt, mmc_driver, mmc_devclass, NULL, NULL); +DRIVER_MODULE(mmc, sdhci_imx, mmc_driver, mmc_devclass, NULL, NULL); +DRIVER_MODULE(mmc, sdhci_pci, mmc_driver, mmc_devclass, NULL, NULL); DRIVER_MODULE(mmc, sdhci_ti, mmc_driver, mmc_devclass, NULL, NULL); +DRIVER_MODULE(mmc, ti_mmchs, mmc_driver, mmc_devclass, NULL, NULL); + Copied: stable/10/sys/dev/ofw/ofwbus.c (from r261513, head/sys/dev/ofw/ofwbus.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/ofw/ofwbus.c Thu May 15 17:30:16 2014 (r266160, copy of r261513, head/sys/dev/ofw/ofwbus.c) @@ -0,0 +1,527 @@ +/*- + * Copyright 1998 Massachusetts Institute of Technology + * Copyright 2001 by Thomas Moestl . + * Copyright 2006 by Marius Strobl . + * All rights reserved. + * + * Permission to use, copy, modify, and distribute this software and + * its documentation for any purpose and without fee is hereby + * granted, provided that both the above copyright notice and this + * permission notice appear in all copies, that both the above + * copyright notice and this permission notice appear in all + * supporting documentation, and that the name of M.I.T. not be used + * in advertising or publicity pertaining to distribution of the + * software without specific, written prior permission. M.I.T. makes + * no representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied + * warranty. + * + * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS + * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT + * SHALL M.I.T. 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. + * + * from: FreeBSD: src/sys/i386/i386/nexus.c,v 1.43 2001/02/09 + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include +#include + +/* + * The ofwbus (which is a pseudo-bus actually) iterates over the nodes that + * hang from the Open Firmware root node and adds them as devices to this bus + * (except some special nodes which are excluded) so that drivers can be + * attached to them. + * + */ + +struct ofwbus_devinfo { + struct ofw_bus_devinfo ndi_obdinfo; + struct resource_list ndi_rl; +}; + +struct ofwbus_softc { + uint32_t acells, scells; + struct rman sc_intr_rman; + struct rman sc_mem_rman; +}; + +static device_identify_t ofwbus_identify; +static device_probe_t ofwbus_probe; +static device_attach_t ofwbus_attach; +static bus_print_child_t ofwbus_print_child; +static bus_add_child_t ofwbus_add_child; +static bus_probe_nomatch_t ofwbus_probe_nomatch; +static bus_alloc_resource_t ofwbus_alloc_resource; +static bus_adjust_resource_t ofwbus_adjust_resource; +static bus_release_resource_t ofwbus_release_resource; +static bus_get_resource_list_t ofwbus_get_resource_list; +static ofw_bus_get_devinfo_t ofwbus_get_devinfo; + +static int ofwbus_inlist(const char *, const char *const *); +static struct ofwbus_devinfo * ofwbus_setup_dinfo(device_t, phandle_t); +static void ofwbus_destroy_dinfo(struct ofwbus_devinfo *); +static int ofwbus_print_res(struct ofwbus_devinfo *); + +static device_method_t ofwbus_methods[] = { + /* Device interface */ + DEVMETHOD(device_identify, ofwbus_identify), + DEVMETHOD(device_probe, ofwbus_probe), + DEVMETHOD(device_attach, ofwbus_attach), + DEVMETHOD(device_detach, bus_generic_detach), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + + /* Bus interface */ + DEVMETHOD(bus_print_child, ofwbus_print_child), + DEVMETHOD(bus_probe_nomatch, ofwbus_probe_nomatch), + DEVMETHOD(bus_read_ivar, bus_generic_read_ivar), + DEVMETHOD(bus_write_ivar, bus_generic_write_ivar), + DEVMETHOD(bus_add_child, ofwbus_add_child), + DEVMETHOD(bus_child_pnpinfo_str, ofw_bus_gen_child_pnpinfo_str), + DEVMETHOD(bus_alloc_resource, ofwbus_alloc_resource), + DEVMETHOD(bus_adjust_resource, ofwbus_adjust_resource), + DEVMETHOD(bus_release_resource, ofwbus_release_resource), + DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), + DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), + DEVMETHOD(bus_get_resource_list, ofwbus_get_resource_list), + DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_config_intr, bus_generic_config_intr), + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), + + /* ofw_bus interface */ + DEVMETHOD(ofw_bus_get_devinfo, ofwbus_get_devinfo), + DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), + DEVMETHOD(ofw_bus_get_model, ofw_bus_gen_get_model), + DEVMETHOD(ofw_bus_get_name, ofw_bus_gen_get_name), + DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), + DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), + + DEVMETHOD_END +}; + +static driver_t ofwbus_driver = { + "ofwbus", + ofwbus_methods, + sizeof(struct ofwbus_softc) +}; +static devclass_t ofwbus_devclass; +DRIVER_MODULE(ofwbus, nexus, ofwbus_driver, ofwbus_devclass, 0, 0); +MODULE_VERSION(ofwbus, 1); + +static const char *const ofwbus_excl_name[] = { + "FJSV,system", + "aliases", + "associations", + "chosen", + "cmp", + "counter-timer", /* No separate device; handled by psycho/sbus */ + "failsafe", + "memory", + "openprom", + "options", + "packages", + "physical-memory", + "rsc", + "sgcn", + "todsg", + "virtual-memory", + NULL +}; + +static const char *const ofwbus_excl_type[] = { + "core", + "cpu", + NULL +}; + +static int +ofwbus_inlist(const char *name, const char *const *list) +{ + int i; + + if (name == NULL) + return (0); + for (i = 0; list[i] != NULL; i++) + if (strcmp(name, list[i]) == 0) + return (1); + return (0); +} + +#define OFWBUS_EXCLUDED(name, type) \ + (ofwbus_inlist((name), ofwbus_excl_name) || \ + ((type) != NULL && ofwbus_inlist((type), ofwbus_excl_type))) + +static void +ofwbus_identify(driver_t *driver, device_t parent) +{ + + /* Check if Open Firmware has been instantiated */ + if (OF_peer(0) == -1) + return; + + if (device_find_child(parent, "ofwbus", -1) == NULL) + BUS_ADD_CHILD(parent, 0, "ofwbus", -1); +} + +static int +ofwbus_probe(device_t dev) +{ + + device_set_desc(dev, "Open Firmware Device Tree"); + return (BUS_PROBE_NOWILDCARD); +} + +static int +ofwbus_attach(device_t dev) +{ + struct ofwbus_devinfo *ndi; + struct ofwbus_softc *sc; + device_t cdev; + phandle_t node; + + sc = device_get_softc(dev); + + node = OF_peer(0); + + /* + * If no Open Firmware, bail early + */ + if (node == -1) + return (ENXIO); + + sc->sc_intr_rman.rm_type = RMAN_ARRAY; + sc->sc_intr_rman.rm_descr = "Interrupts"; + sc->sc_mem_rman.rm_type = RMAN_ARRAY; + sc->sc_mem_rman.rm_descr = "Device Memory"; + if (rman_init(&sc->sc_intr_rman) != 0 || + rman_init(&sc->sc_mem_rman) != 0 || + rman_manage_region(&sc->sc_intr_rman, 0, ~0) != 0 || + rman_manage_region(&sc->sc_mem_rman, 0, BUS_SPACE_MAXADDR) != 0) + panic("%s: failed to set up rmans.", __func__); + + /* + * Allow devices to identify. + */ + bus_generic_probe(dev); + + /* + * Some important numbers + */ + sc->acells = 2; + OF_getencprop(node, "#address-cells", &sc->acells, sizeof(sc->acells)); + sc->scells = 1; + OF_getencprop(node, "#size-cells", &sc->scells, sizeof(sc->scells)); + + /* + * Now walk the OFW tree and attach top-level devices. + */ + for (node = OF_child(node); node > 0; node = OF_peer(node)) { + if ((ndi = ofwbus_setup_dinfo(dev, node)) == NULL) + continue; + cdev = device_add_child(dev, NULL, -1); + if (cdev == NULL) { + device_printf(dev, "<%s>: device_add_child failed\n", + ndi->ndi_obdinfo.obd_name); + ofwbus_destroy_dinfo(ndi); + continue; + } + device_set_ivars(cdev, ndi); + } + return (bus_generic_attach(dev)); +} + +static device_t +ofwbus_add_child(device_t dev, u_int order, const char *name, int unit) +{ + device_t cdev; + struct ofwbus_devinfo *ndi; + + cdev = device_add_child_ordered(dev, order, name, unit); + if (cdev == NULL) + return (NULL); + + ndi = malloc(sizeof(*ndi), M_DEVBUF, M_WAITOK | M_ZERO); + ndi->ndi_obdinfo.obd_node = -1; + resource_list_init(&ndi->ndi_rl); + device_set_ivars(cdev, ndi); + + return (cdev); +} + +static int +ofwbus_print_child(device_t bus, device_t child) +{ + int rv; + + rv = bus_print_child_header(bus, child); + rv += ofwbus_print_res(device_get_ivars(child)); + rv += bus_print_child_footer(bus, child); + return (rv); +} + +static void +ofwbus_probe_nomatch(device_t bus, device_t child) +{ + const char *name, *type; + + if (!bootverbose) + return; + + name = ofw_bus_get_name(child); + type = ofw_bus_get_type(child); + + device_printf(bus, "<%s>", + name != NULL ? name : "unknown"); + ofwbus_print_res(device_get_ivars(child)); + printf(" type %s (no driver attached)\n", + type != NULL ? type : "unknown"); +} + +static struct resource * +ofwbus_alloc_resource(device_t bus, device_t child, int type, int *rid, + u_long start, u_long end, u_long count, u_int flags) +{ + struct ofwbus_softc *sc; + struct rman *rm; + struct resource *rv; + struct resource_list_entry *rle; + int isdefault, passthrough; + + isdefault = (start == 0UL && end == ~0UL); + passthrough = (device_get_parent(child) != bus); + sc = device_get_softc(bus); + rle = NULL; + + if (!passthrough && isdefault) { + rle = resource_list_find(BUS_GET_RESOURCE_LIST(bus, child), + type, *rid); + if (rle == NULL) + return (NULL); + if (rle->res != NULL) + panic("%s: resource entry is busy", __func__); + start = rle->start; + count = ulmax(count, rle->count); + end = ulmax(rle->end, start + count - 1); + } + + switch (type) { + case SYS_RES_IRQ: + rm = &sc->sc_intr_rman; + break; + case SYS_RES_MEMORY: + rm = &sc->sc_mem_rman; + break; + default: + return (NULL); + } + + rv = rman_reserve_resource(rm, start, end, count, flags & ~RF_ACTIVE, + child); + if (rv == NULL) + return (NULL); + rman_set_rid(rv, *rid); + + if ((flags & RF_ACTIVE) != 0 && bus_activate_resource(child, type, + *rid, rv) != 0) { + rman_release_resource(rv); + return (NULL); + } + + if (!passthrough && rle != NULL) { + rle->res = rv; + rle->start = rman_get_start(rv); + rle->end = rman_get_end(rv); + rle->count = rle->end - rle->start + 1; + } + + return (rv); +} + +static int +ofwbus_adjust_resource(device_t bus, device_t child __unused, int type, + struct resource *r, u_long start, u_long end) +{ + struct ofwbus_softc *sc; + struct rman *rm; + device_t ofwbus; + + ofwbus = bus; + while (strcmp(device_get_name(device_get_parent(ofwbus)), "root") != 0) + ofwbus = device_get_parent(ofwbus); + sc = device_get_softc(ofwbus); + switch (type) { + case SYS_RES_IRQ: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu May 15 17:53:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29AA348A; Thu, 15 May 2014 17:53:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16B372159; Thu, 15 May 2014 17:53:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FHrn29018137; Thu, 15 May 2014 17:53:49 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FHrgAs018095; Thu, 15 May 2014 17:53:42 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405151753.s4FHrgAs018095@svn.freebsd.org> From: Ian Lepore Date: Thu, 15 May 2014 17:53:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266162 - stable/10/sys/arm/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 17:53:49 -0000 Author: ian Date: Thu May 15 17:53:42 2014 New Revision: 266162 URL: http://svnweb.freebsd.org/changeset/base/266162 Log: MFC r261570, r261572 Revert r260440 (add USB_HOST_ALIGN to all configs, it's only needed for platforms with a 64-byte cacheline size). Add option USB_HOST_ALIGN=64 for all SoCs that have 64 byte cache lines. Modified: stable/10/sys/arm/conf/AC100 stable/10/sys/arm/conf/ARMADAXP stable/10/sys/arm/conf/ATMEL stable/10/sys/arm/conf/AVILA stable/10/sys/arm/conf/BWCT stable/10/sys/arm/conf/CAMBRIA stable/10/sys/arm/conf/CNS11XXNAS stable/10/sys/arm/conf/DB-78XXX stable/10/sys/arm/conf/DB-88F5XXX stable/10/sys/arm/conf/DB-88F6XXX stable/10/sys/arm/conf/DIGI-CCWMX53 stable/10/sys/arm/conf/EA3250 stable/10/sys/arm/conf/EB9200 stable/10/sys/arm/conf/EFIKA_MX stable/10/sys/arm/conf/ETHERNUT5 stable/10/sys/arm/conf/HL200 stable/10/sys/arm/conf/HL201 stable/10/sys/arm/conf/IMX53-QSB stable/10/sys/arm/conf/KB920X stable/10/sys/arm/conf/LN2410SBC stable/10/sys/arm/conf/NSLU stable/10/sys/arm/conf/QILA9G20 stable/10/sys/arm/conf/RPI-B stable/10/sys/arm/conf/SAM9260EK stable/10/sys/arm/conf/SAM9G20EK stable/10/sys/arm/conf/SAM9X25EK stable/10/sys/arm/conf/SHEEVAPLUG stable/10/sys/arm/conf/SN9G45 stable/10/sys/arm/conf/TS7800 stable/10/sys/arm/conf/ZEDBOARD Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/AC100 ============================================================================== --- stable/10/sys/arm/conf/AC100 Thu May 15 17:52:28 2014 (r266161) +++ stable/10/sys/arm/conf/AC100 Thu May 15 17:53:42 2014 (r266162) @@ -66,7 +66,6 @@ device loop device md # USB -options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. #options USB_DEBUG # enable debug msgs #device usb #device ehci Modified: stable/10/sys/arm/conf/ARMADAXP ============================================================================== --- stable/10/sys/arm/conf/ARMADAXP Thu May 15 17:52:28 2014 (r266161) +++ stable/10/sys/arm/conf/ARMADAXP Thu May 15 17:53:42 2014 (r266162) @@ -67,7 +67,6 @@ device loop device md # USB -options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. options USB_DEBUG # enable debug msgs device usb device ehci Modified: stable/10/sys/arm/conf/ATMEL ============================================================================== --- stable/10/sys/arm/conf/ATMEL Thu May 15 17:52:28 2014 (r266161) +++ stable/10/sys/arm/conf/ATMEL Thu May 15 17:53:42 2014 (r266162) @@ -156,7 +156,6 @@ device uart # Multi-uart driver options ALT_BREAK_TO_DEBUGGER # USB support -options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. options USB_DEBUG # enable debug msgs device ohci # OHCI USB interface device usb # USB Bus (required) Modified: stable/10/sys/arm/conf/AVILA ============================================================================== --- stable/10/sys/arm/conf/AVILA Thu May 15 17:52:28 2014 (r266161) +++ stable/10/sys/arm/conf/AVILA Thu May 15 17:53:42 2014 (r266162) @@ -143,7 +143,6 @@ device ath_ar9160 device ath_ar9280 device usb -options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. #options USB_DEBUG device ohci device ehci Modified: stable/10/sys/arm/conf/BWCT ============================================================================== --- stable/10/sys/arm/conf/BWCT Thu May 15 17:52:28 2014 (r266161) +++ stable/10/sys/arm/conf/BWCT Thu May 15 17:53:42 2014 (r266162) @@ -104,7 +104,6 @@ device spibus device bpf # Berkeley packet filter #options USB_DEBUG -options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. #device ohci #device usb #device umass # Disks/Mass storage - Requires scbus and da Modified: stable/10/sys/arm/conf/CAMBRIA ============================================================================== --- stable/10/sys/arm/conf/CAMBRIA Thu May 15 17:52:28 2014 (r266161) +++ stable/10/sys/arm/conf/CAMBRIA Thu May 15 17:53:42 2014 (r266162) @@ -136,7 +136,6 @@ options AH_SUPPORT_AR5416 # NB: for 11n device ath_hal # NB: 2 USB 2.0 ports standard -options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. device usb options USB_EHCI_BIG_ENDIAN_DESC # handle big-endian byte order #options USB_DEBUG Modified: stable/10/sys/arm/conf/CNS11XXNAS ============================================================================== --- stable/10/sys/arm/conf/CNS11XXNAS Thu May 15 17:52:28 2014 (r266161) +++ stable/10/sys/arm/conf/CNS11XXNAS Thu May 15 17:53:42 2014 (r266162) @@ -105,7 +105,6 @@ device random # Entrop #options ARM_USE_SMALL_ALLOC device usb -options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. #options USB_DEBUG device ohci device ehci Modified: stable/10/sys/arm/conf/DB-78XXX ============================================================================== --- stable/10/sys/arm/conf/DB-78XXX Thu May 15 17:52:28 2014 (r266161) +++ stable/10/sys/arm/conf/DB-78XXX Thu May 15 17:53:42 2014 (r266162) @@ -67,7 +67,6 @@ device e1000phy device bpf # USB -options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. options USB_DEBUG # enable debug msgs device usb device ehci Modified: stable/10/sys/arm/conf/DB-88F5XXX ============================================================================== --- stable/10/sys/arm/conf/DB-88F5XXX Thu May 15 17:52:28 2014 (r266161) +++ stable/10/sys/arm/conf/DB-88F5XXX Thu May 15 17:53:42 2014 (r266162) @@ -73,7 +73,6 @@ device iicbus device ds133x # USB -options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. options USB_DEBUG # enable debug msgs device usb device ehci Modified: stable/10/sys/arm/conf/DB-88F6XXX ============================================================================== --- stable/10/sys/arm/conf/DB-88F6XXX Thu May 15 17:52:28 2014 (r266161) +++ stable/10/sys/arm/conf/DB-88F6XXX Thu May 15 17:53:42 2014 (r266162) @@ -71,7 +71,6 @@ device crypto device cryptodev # USB -options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. options USB_DEBUG # enable debug msgs device usb device ehci Modified: stable/10/sys/arm/conf/DIGI-CCWMX53 ============================================================================== --- stable/10/sys/arm/conf/DIGI-CCWMX53 Thu May 15 17:52:28 2014 (r266161) +++ stable/10/sys/arm/conf/DIGI-CCWMX53 Thu May 15 17:53:42 2014 (r266162) @@ -134,7 +134,7 @@ device cd # CD device pass # Passthrough device (direct SCSI access) # USB support -options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. +options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. options USB_DEBUG # enable debug msgs device ehci # OHCI USB interface device usb # USB Bus (required) Modified: stable/10/sys/arm/conf/EA3250 ============================================================================== --- stable/10/sys/arm/conf/EA3250 Thu May 15 17:52:28 2014 (r266161) +++ stable/10/sys/arm/conf/EA3250 Thu May 15 17:53:42 2014 (r266162) @@ -65,7 +65,6 @@ device bpf device lpe # USB -options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. options USB_DEBUG device usb device ohci Modified: stable/10/sys/arm/conf/EB9200 ============================================================================== --- stable/10/sys/arm/conf/EB9200 Thu May 15 17:52:28 2014 (r266161) +++ stable/10/sys/arm/conf/EB9200 Thu May 15 17:53:42 2014 (r266162) @@ -92,7 +92,6 @@ device icee device bpf # USB support -options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. options USB_DEBUG # enable debug msgs device ohci # OHCI localbus->USB interface device usb # USB Bus (required) Modified: stable/10/sys/arm/conf/EFIKA_MX ============================================================================== --- stable/10/sys/arm/conf/EFIKA_MX Thu May 15 17:52:28 2014 (r266161) +++ stable/10/sys/arm/conf/EFIKA_MX Thu May 15 17:53:42 2014 (r266162) @@ -130,7 +130,7 @@ device cd # CD device pass # Passthrough device (direct SCSI access) # USB support -options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. +options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. #options USB_DEBUG # enable debug msgs device ehci # OHCI USB interface device usb # USB Bus (required) Modified: stable/10/sys/arm/conf/ETHERNUT5 ============================================================================== --- stable/10/sys/arm/conf/ETHERNUT5 Thu May 15 17:52:28 2014 (r266161) +++ stable/10/sys/arm/conf/ETHERNUT5 Thu May 15 17:53:42 2014 (r266162) @@ -149,7 +149,6 @@ device uart # Multi-uart driver options ALT_BREAK_TO_DEBUGGER # USB support -options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. #options USB_DEBUG # enable debug msgs device ohci # OHCI USB interface device usb # USB Bus (required) Modified: stable/10/sys/arm/conf/HL200 ============================================================================== --- stable/10/sys/arm/conf/HL200 Thu May 15 17:52:28 2014 (r266161) +++ stable/10/sys/arm/conf/HL200 Thu May 15 17:53:42 2014 (r266162) @@ -94,7 +94,6 @@ device icee device bpf # USB support -options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. options USB_DEBUG # enable debug msgs device ohci # OHCI localbus->USB interface device usb # USB Bus (required) Modified: stable/10/sys/arm/conf/HL201 ============================================================================== --- stable/10/sys/arm/conf/HL201 Thu May 15 17:52:28 2014 (r266161) +++ stable/10/sys/arm/conf/HL201 Thu May 15 17:53:42 2014 (r266162) @@ -85,7 +85,6 @@ device md device bpf # USB support -options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. device ohci # OHCI localbus->USB interface device usb # USB Bus (required) #device udbp # USB Double Bulk Pipe devices Modified: stable/10/sys/arm/conf/IMX53-QSB ============================================================================== --- stable/10/sys/arm/conf/IMX53-QSB Thu May 15 17:52:28 2014 (r266161) +++ stable/10/sys/arm/conf/IMX53-QSB Thu May 15 17:53:42 2014 (r266162) @@ -133,7 +133,7 @@ device cd # CD device pass # Passthrough device (direct SCSI access) # USB support -options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. +options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. #options USB_DEBUG # enable debug msgs device ehci # OHCI USB interface device usb # USB Bus (required) Modified: stable/10/sys/arm/conf/KB920X ============================================================================== --- stable/10/sys/arm/conf/KB920X Thu May 15 17:52:28 2014 (r266161) +++ stable/10/sys/arm/conf/KB920X Thu May 15 17:53:42 2014 (r266162) @@ -95,7 +95,6 @@ device icee device bpf # USB support -options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. options USB_DEBUG # enable debug msgs device ohci # OHCI localbus->USB interface device usb # USB Bus (required) Modified: stable/10/sys/arm/conf/LN2410SBC ============================================================================== --- stable/10/sys/arm/conf/LN2410SBC Thu May 15 17:52:28 2014 (r266161) +++ stable/10/sys/arm/conf/LN2410SBC Thu May 15 17:53:42 2014 (r266162) @@ -77,7 +77,6 @@ options WITNESS_SKIPSPIN #Don't run wit device md -options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. options USB_DEBUG # enable debug msgs device usb device ohci Modified: stable/10/sys/arm/conf/NSLU ============================================================================== --- stable/10/sys/arm/conf/NSLU Thu May 15 17:52:28 2014 (r266161) +++ stable/10/sys/arm/conf/NSLU Thu May 15 17:53:42 2014 (r266162) @@ -108,7 +108,6 @@ device random # Entropy device #options ARM_USE_SMALL_ALLOC device usb -options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. options USB_DEBUG device ohci device ehci Modified: stable/10/sys/arm/conf/QILA9G20 ============================================================================== --- stable/10/sys/arm/conf/QILA9G20 Thu May 15 17:52:28 2014 (r266161) +++ stable/10/sys/arm/conf/QILA9G20 Thu May 15 17:53:42 2014 (r266162) @@ -118,7 +118,6 @@ device cd # CD device pass # Passthrough device (direct SCSI access) # USB support -options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. device ohci # OHCI localbus->USB interface device usb # USB Bus (required) device umass # Disks/Mass storage - Requires scbus and da Modified: stable/10/sys/arm/conf/RPI-B ============================================================================== --- stable/10/sys/arm/conf/RPI-B Thu May 15 17:52:28 2014 (r266161) +++ stable/10/sys/arm/conf/RPI-B Thu May 15 17:53:42 2014 (r266162) @@ -93,7 +93,6 @@ device md device random # Entropy device # USB support -options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. device usb options USB_DEBUG device dwcotg #DWC OTG controller Modified: stable/10/sys/arm/conf/SAM9260EK ============================================================================== --- stable/10/sys/arm/conf/SAM9260EK Thu May 15 17:52:28 2014 (r266161) +++ stable/10/sys/arm/conf/SAM9260EK Thu May 15 17:53:42 2014 (r266162) @@ -158,7 +158,6 @@ device uart # Multi-uart driver options ALT_BREAK_TO_DEBUGGER # USB support -options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. #options USB_DEBUG # enable debug msgs device ohci # OHCI USB interface device usb # USB Bus (required) Modified: stable/10/sys/arm/conf/SAM9G20EK ============================================================================== --- stable/10/sys/arm/conf/SAM9G20EK Thu May 15 17:52:28 2014 (r266161) +++ stable/10/sys/arm/conf/SAM9G20EK Thu May 15 17:53:42 2014 (r266162) @@ -122,7 +122,6 @@ device cd # CD device pass # Passthrough device (direct SCSI access) # USB support -options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. device ohci # OHCI localbus->USB interface device usb # USB Bus (required) device umass # Disks/Mass storage - Requires scbus and da Modified: stable/10/sys/arm/conf/SAM9X25EK ============================================================================== --- stable/10/sys/arm/conf/SAM9X25EK Thu May 15 17:52:28 2014 (r266161) +++ stable/10/sys/arm/conf/SAM9X25EK Thu May 15 17:53:42 2014 (r266162) @@ -120,7 +120,6 @@ device cd # CD device pass # Passthrough device (direct SCSI access) # USB support -options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. #device ohci # OHCI localbus->USB interface #device usb # USB Bus (required) #device umass # Disks/Mass storage - Requires scbus and da Modified: stable/10/sys/arm/conf/SHEEVAPLUG ============================================================================== --- stable/10/sys/arm/conf/SHEEVAPLUG Thu May 15 17:52:28 2014 (r266161) +++ stable/10/sys/arm/conf/SHEEVAPLUG Thu May 15 17:53:42 2014 (r266162) @@ -65,7 +65,6 @@ device crypto device cryptodev # USB -options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. options USB_DEBUG # enable debug msgs device usb device ehci Modified: stable/10/sys/arm/conf/SN9G45 ============================================================================== --- stable/10/sys/arm/conf/SN9G45 Thu May 15 17:52:28 2014 (r266161) +++ stable/10/sys/arm/conf/SN9G45 Thu May 15 17:53:42 2014 (r266162) @@ -96,7 +96,6 @@ device cd # CD device pass # Passthrough device (direct SCSI access) # USB support -options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. device ohci # OHCI localbus->USB interface device usb # USB Bus (required) device umass # Disks/Mass storage - Requires scbus and da Modified: stable/10/sys/arm/conf/TS7800 ============================================================================== --- stable/10/sys/arm/conf/TS7800 Thu May 15 17:52:28 2014 (r266161) +++ stable/10/sys/arm/conf/TS7800 Thu May 15 17:53:42 2014 (r266162) @@ -61,7 +61,6 @@ device bpf options HZ=1000 # USB -options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. device usb device ehci device umass Modified: stable/10/sys/arm/conf/ZEDBOARD ============================================================================== --- stable/10/sys/arm/conf/ZEDBOARD Thu May 15 17:52:28 2014 (r266161) +++ stable/10/sys/arm/conf/ZEDBOARD Thu May 15 17:53:42 2014 (r266162) @@ -81,7 +81,6 @@ device sdhci # generic sdhci device bpf # Berkeley packet filter # USB support -options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. device usb options USB_DEBUG #options USB_REQ_DEBUG From owner-svn-src-stable@FreeBSD.ORG Thu May 15 18:05:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A10878C7; Thu, 15 May 2014 18:05:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D478224D; Thu, 15 May 2014 18:05:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FI5qKE023371; Thu, 15 May 2014 18:05:52 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FI5qqA023367; Thu, 15 May 2014 18:05:52 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201405151805.s4FI5qqA023367@svn.freebsd.org> From: Luiz Otavio O Souza Date: Thu, 15 May 2014 18:05:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266164 - stable/10/sys/arm/broadcom/bcm2835 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 18:05:52 -0000 Author: loos Date: Thu May 15 18:05:51 2014 New Revision: 266164 URL: http://svnweb.freebsd.org/changeset/base/266164 Log: MFC r256871, r259034, r266010 r256871: Implement watchdog function and register it with watchdog list. r259034: Make the sysctl node read-only. r266010: Remove extra newlines. No functional changes. Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_fbd.c stable/10/sys/arm/broadcom/bcm2835/bcm2835_gpio.c stable/10/sys/arm/broadcom/bcm2835/bcm2835_wdog.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_fbd.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Thu May 15 18:02:08 2014 (r266163) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Thu May 15 18:05:51 2014 (r266164) @@ -99,7 +99,6 @@ struct bcmsc_softc { struct bcm_fb_config* fb_config; bus_addr_t fb_config_phys; struct intr_config_hook init_hook; - }; static int bcm_fb_probe(device_t); @@ -167,14 +166,10 @@ bcm_fb_init(void *arg) fb_config->xoffset, fb_config->yoffset, fb_config->bpp); - device_printf(sc->dev, "pitch %d, base 0x%08x, screen_size %d\n", fb_config->pitch, fb_config->base, fb_config->screen_size); - - - info = malloc(sizeof(struct fb_info), M_DEVBUF, M_WAITOK | M_ZERO); info->fb_name = device_get_nameunit(sc->dev); @@ -199,8 +194,6 @@ bcm_fb_init(void *arg) device_printf(sc->dev, "Failed to attach fbd device\n"); return; } - - } else { device_printf(sc->dev, "Failed to set framebuffer info\n"); return; @@ -273,7 +266,6 @@ fail: return (ENXIO); } - static void bcm_fb_dmamap_cb(void *arg, bus_dma_segment_t *segs, int nseg, int err) { Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_gpio.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Thu May 15 18:02:08 2014 (r266163) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Thu May 15 18:05:51 2014 (r266164) @@ -589,7 +589,7 @@ bcm_gpio_sysctl_init(struct bcm_gpio_sof tree_node = device_get_sysctl_tree(sc->sc_dev); tree = SYSCTL_CHILDREN(tree_node); pin_node = SYSCTL_ADD_NODE(ctx, tree, OID_AUTO, "pin", - CTLFLAG_RW, NULL, "GPIO Pins"); + CTLFLAG_RD, NULL, "GPIO Pins"); pin_tree = SYSCTL_CHILDREN(pin_node); for (i = 0; i < sc->sc_gpio_npins; i++) { Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_wdog.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_wdog.c Thu May 15 18:02:08 2014 (r266163) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_wdog.c Thu May 15 18:05:51 2014 (r266164) @@ -76,11 +76,10 @@ struct bcmwd_softc { int wdog_armed; int wdog_period; char wdog_passwd; + struct mtx mtx; }; -#ifdef notyet static void bcmwd_watchdog_fn(void *private, u_int cmd, int *error); -#endif static int bcmwd_probe(device_t dev) @@ -123,19 +122,59 @@ bcmwd_attach(device_t dev) sc->bsh = rman_get_bushandle(sc->res); bcmwd_lsc = sc; -#ifdef notyet + mtx_init(&sc->mtx, "BCM2835 Watchdog", "bcmwd", MTX_DEF); EVENTHANDLER_REGISTER(watchdog_list, bcmwd_watchdog_fn, sc, 0); -#endif + return (0); } -#ifdef notyet static void bcmwd_watchdog_fn(void *private, u_int cmd, int *error) { - /* XXX: not yet */ + struct bcmwd_softc *sc; + uint64_t sec; + uint32_t ticks, reg; + + sc = private; + mtx_lock(&sc->mtx); + + cmd &= WD_INTERVAL; + + if (cmd > 0) { + sec = ((uint64_t)1 << (cmd & WD_INTERVAL)) / 1000000000; + ticks = (sec << 16) & BCM2835_WDOG_TIME_MASK; + if (ticks == 0) { + /* + * Can't arm + * disable watchdog as watchdog(9) requires + */ + device_printf(sc->dev, + "Can't arm, timeout is less than 1 second\n"); + WRITE(sc, BCM2835_RSTC_REG, + (BCM2835_PASWORD << BCM2835_PASSWORD_SHIFT) | + BCM2835_RSTC_RESET); + mtx_unlock(&sc->mtx); + return; + } + + reg = (BCM2835_PASWORD << BCM2835_PASSWORD_SHIFT) | ticks; + WRITE(sc, BCM2835_WDOG_REG, reg); + + reg = READ(sc, BCM2835_RSTC_REG); + reg &= BCM2835_RSTC_WRCFG_CLR; + reg |= BCM2835_RSTC_WRCFG_FULL_RESET; + reg |= (BCM2835_PASWORD << BCM2835_PASSWORD_SHIFT); + WRITE(sc, BCM2835_RSTC_REG, reg); + + *error = 0; + } + else + WRITE(sc, BCM2835_RSTC_REG, + (BCM2835_PASWORD << BCM2835_PASSWORD_SHIFT) | + BCM2835_RSTC_RESET); + + mtx_unlock(&sc->mtx); } -#endif void bcmwd_watchdog_reset() From owner-svn-src-stable@FreeBSD.ORG Thu May 15 18:07:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 07C4BA19; Thu, 15 May 2014 18:07:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8998226E; Thu, 15 May 2014 18:07:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FI7Z8d023707; Thu, 15 May 2014 18:07:35 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FI7ZHg023706; Thu, 15 May 2014 18:07:35 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201405151807.s4FI7ZHg023706@svn.freebsd.org> From: Colin Percival Date: Thu, 15 May 2014 18:07:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266165 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 18:07:36 -0000 Author: cperciva Date: Thu May 15 18:07:35 2014 New Revision: 266165 URL: http://svnweb.freebsd.org/changeset/base/266165 Log: MFC r265876: In cf_get_method, when we don't already know what clock speed the CPU is running at, guess the nearest value instead of looking for a value within 25 MHz of the observed frequency. Prior to this change, if a system booted with Intel Turbo Boost enabled, the dev.cpu.0.freq sysctl is nonfunctional, since the ACPI-reported frequency for Turbo Boost states does not match the actual clock frequency (and thus no levels are within 25 MHz of the observed frequency) and the current performance level is read before a new level is set. Relnotes: Bug fix in power management on CPUs with Intel Turbo Boost Modified: stable/10/sys/kern/kern_cpu.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_cpu.c ============================================================================== --- stable/10/sys/kern/kern_cpu.c Thu May 15 18:05:51 2014 (r266164) +++ stable/10/sys/kern/kern_cpu.c Thu May 15 18:07:35 2014 (r266165) @@ -418,7 +418,7 @@ cf_get_method(device_t dev, struct cf_le struct cf_setting *curr_set, set; struct pcpu *pc; device_t *devs; - int count, error, i, n, numdevs; + int bdiff, count, diff, error, i, n, numdevs; uint64_t rate; sc = device_get_softc(dev); @@ -494,14 +494,15 @@ cf_get_method(device_t dev, struct cf_le } cpu_est_clockrate(pc->pc_cpuid, &rate); rate /= 1000000; + bdiff = 1 << 30; for (i = 0; i < count; i++) { - if (CPUFREQ_CMP(rate, levels[i].total_set.freq)) { + diff = abs(levels[i].total_set.freq - rate); + if (diff < bdiff) { + bdiff = diff; sc->curr_level = levels[i]; - CF_DEBUG("get estimated freq %d\n", curr_set->freq); - goto out; } } - error = ENXIO; + CF_DEBUG("get estimated freq %d\n", curr_set->freq); out: if (error == 0) From owner-svn-src-stable@FreeBSD.ORG Thu May 15 18:14:20 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79D74D6C; Thu, 15 May 2014 18:14:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66554234B; Thu, 15 May 2014 18:14:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FIEK2a027970; Thu, 15 May 2014 18:14:20 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FIEKOu027969; Thu, 15 May 2014 18:14:20 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201405151814.s4FIEKOu027969@svn.freebsd.org> From: Colin Percival Date: Thu, 15 May 2014 18:14:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266167 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 18:14:20 -0000 Author: cperciva Date: Thu May 15 18:14:19 2014 New Revision: 266167 URL: http://svnweb.freebsd.org/changeset/base/266167 Log: MFC r265876: In cf_get_method, when we don't already know what clock speed the CPU is running at, guess the nearest value instead of looking for a value within 25 MHz of the observed frequency. Prior to this change, if a system booted with Intel Turbo Boost enabled, the dev.cpu.0.freq sysctl is nonfunctional, since the ACPI-reported frequency for Turbo Boost states does not match the actual clock frequency (and thus no levels are within 25 MHz of the observed frequency) and the current performance level is read before a new level is set. Relnotes: Bug fix in power management on CPUs with Intel Turbo Boost Modified: stable/9/sys/kern/kern_cpu.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_cpu.c ============================================================================== --- stable/9/sys/kern/kern_cpu.c Thu May 15 18:12:47 2014 (r266166) +++ stable/9/sys/kern/kern_cpu.c Thu May 15 18:14:19 2014 (r266167) @@ -418,7 +418,7 @@ cf_get_method(device_t dev, struct cf_le struct cf_setting *curr_set, set; struct pcpu *pc; device_t *devs; - int count, error, i, n, numdevs; + int bdiff, count, diff, error, i, n, numdevs; uint64_t rate; sc = device_get_softc(dev); @@ -494,14 +494,15 @@ cf_get_method(device_t dev, struct cf_le } cpu_est_clockrate(pc->pc_cpuid, &rate); rate /= 1000000; + bdiff = 1 << 30; for (i = 0; i < count; i++) { - if (CPUFREQ_CMP(rate, levels[i].total_set.freq)) { + diff = abs(levels[i].total_set.freq - rate); + if (diff < bdiff) { + bdiff = diff; sc->curr_level = levels[i]; - CF_DEBUG("get estimated freq %d\n", curr_set->freq); - goto out; } } - error = ENXIO; + CF_DEBUG("get estimated freq %d\n", curr_set->freq); out: if (error == 0) From owner-svn-src-stable@FreeBSD.ORG Thu May 15 18:18:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 980B2FAD; Thu, 15 May 2014 18:18:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A230237E; Thu, 15 May 2014 18:18:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FIIsLL028720; Thu, 15 May 2014 18:18:54 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FIIrQ6028714; Thu, 15 May 2014 18:18:53 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201405151818.s4FIIrQ6028714@svn.freebsd.org> From: Luiz Otavio O Souza Date: Thu, 15 May 2014 18:18:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266168 - in stable/10/sys/arm: freescale/imx ti X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 18:18:54 -0000 Author: loos Date: Thu May 15 18:18:53 2014 New Revision: 266168 URL: http://svnweb.freebsd.org/changeset/base/266168 Log: MFC r259270 After r266105 ofw_iicbuc.c will be built by default for any kernel which includes options 'iicbus' and 'fdt'. Remove the (now) unnecessary entries. Modified: stable/10/sys/arm/freescale/imx/files.imx51 stable/10/sys/arm/freescale/imx/files.imx53 stable/10/sys/arm/freescale/imx/files.imx6 stable/10/sys/arm/ti/files.ti Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/freescale/imx/files.imx51 ============================================================================== --- stable/10/sys/arm/freescale/imx/files.imx51 Thu May 15 18:14:19 2014 (r266167) +++ stable/10/sys/arm/freescale/imx/files.imx51 Thu May 15 18:18:53 2014 (r266168) @@ -46,7 +46,6 @@ arm/freescale/imx/imx_wdog.c optional i # i2c arm/freescale/imx/i2c.c optional fsliic -dev/ofw/ofw_iicbus.c optional fsliic # IPU - Image Processing Unit (frame buffer also) arm/freescale/imx/imx51_ipuv3.c optional sc Modified: stable/10/sys/arm/freescale/imx/files.imx53 ============================================================================== --- stable/10/sys/arm/freescale/imx/files.imx53 Thu May 15 18:14:19 2014 (r266167) +++ stable/10/sys/arm/freescale/imx/files.imx53 Thu May 15 18:18:53 2014 (r266168) @@ -46,7 +46,6 @@ arm/freescale/imx/imx_wdog.c optional i # i2c arm/freescale/imx/i2c.c optional fsliic -dev/ofw/ofw_iicbus.c optional fsliic # IPU - Image Processing Unit (frame buffer also) arm/freescale/imx/imx51_ipuv3.c optional sc Modified: stable/10/sys/arm/freescale/imx/files.imx6 ============================================================================== --- stable/10/sys/arm/freescale/imx/files.imx6 Thu May 15 18:14:19 2014 (r266167) +++ stable/10/sys/arm/freescale/imx/files.imx6 Thu May 15 18:18:53 2014 (r266168) @@ -51,6 +51,5 @@ arm/freescale/imx/imx6_usbphy.c optiona #arm/freescale/imx/imx51_gpio.c optional gpio #dev/ata/chipsets/ata-fsl.c optional imxata #arm/freescale/imx/i2c.c optional fsliic -#dev/ofw/ofw_iicbus.c optional fsliic #arm/freescale/imx/imx51_ipuv3.c optional sc Modified: stable/10/sys/arm/ti/files.ti ============================================================================== --- stable/10/sys/arm/ti/files.ti Thu May 15 18:14:19 2014 (r266167) +++ stable/10/sys/arm/ti/files.ti Thu May 15 18:18:53 2014 (r266168) @@ -19,7 +19,6 @@ arm/ti/ti_scm.c standard arm/ti/ti_gpio.c optional gpio arm/ti/ti_i2c.c optional ti_i2c -dev/ofw/ofw_iicbus.c optional iicbus dev/uart/uart_dev_ti8250.c optional uart dev/uart/uart_dev_ns8250.c optional uart From owner-svn-src-stable@FreeBSD.ORG Thu May 15 18:38:21 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E567070A; Thu, 15 May 2014 18:38:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFC8F25E9; Thu, 15 May 2014 18:38:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FIcL0C037303; Thu, 15 May 2014 18:38:21 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FIcKHD037294; Thu, 15 May 2014 18:38:20 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405151838.s4FIcKHD037294@svn.freebsd.org> From: Ian Lepore Date: Thu, 15 May 2014 18:38:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266170 - in stable/10/sys: arm/freescale/vybrid boot/fdt/dts dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 18:38:22 -0000 Author: ian Date: Thu May 15 18:38:19 2014 New Revision: 266170 URL: http://svnweb.freebsd.org/changeset/base/266170 Log: MFC r261616, r261639 Remove FreeBSD 6 support from atmel usb controllers. Add Vybrid drivers for: - Enhanced Direct Memory Access Controller (eDMA) - Direct Memory Access Multiplexer (DMAMUX) Added: stable/10/sys/arm/freescale/vybrid/vf_dmamux.c - copied unchanged from r261639, head/sys/arm/freescale/vybrid/vf_dmamux.c stable/10/sys/arm/freescale/vybrid/vf_dmamux.h - copied unchanged from r261639, head/sys/arm/freescale/vybrid/vf_dmamux.h stable/10/sys/arm/freescale/vybrid/vf_edma.c - copied unchanged from r261639, head/sys/arm/freescale/vybrid/vf_edma.c stable/10/sys/arm/freescale/vybrid/vf_edma.h - copied unchanged from r261639, head/sys/arm/freescale/vybrid/vf_edma.h Modified: stable/10/sys/arm/freescale/vybrid/files.vybrid stable/10/sys/boot/fdt/dts/vybrid.dtsi stable/10/sys/dev/usb/controller/at91dci_atmelarm.c stable/10/sys/dev/usb/controller/ohci_atmelarm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/freescale/vybrid/files.vybrid ============================================================================== --- stable/10/sys/arm/freescale/vybrid/files.vybrid Thu May 15 18:34:31 2014 (r266169) +++ stable/10/sys/arm/freescale/vybrid/files.vybrid Thu May 15 18:38:19 2014 (r266170) @@ -21,6 +21,8 @@ arm/freescale/vybrid/vf_anadig.c standa arm/freescale/vybrid/vf_iomuxc.c standard arm/freescale/vybrid/vf_mscm.c standard arm/freescale/vybrid/vf_src.c standard +arm/freescale/vybrid/vf_edma.c standard +arm/freescale/vybrid/vf_dmamux.c standard arm/freescale/vybrid/vf_tcon.c optional vt arm/freescale/vybrid/vf_dcu4.c optional vt arm/freescale/vybrid/vf_nfc.c optional nand Copied: stable/10/sys/arm/freescale/vybrid/vf_dmamux.c (from r261639, head/sys/arm/freescale/vybrid/vf_dmamux.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/freescale/vybrid/vf_dmamux.c Thu May 15 18:38:19 2014 (r266170, copy of r261639, head/sys/arm/freescale/vybrid/vf_dmamux.c) @@ -0,0 +1,155 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * All rights reserved. + * + * 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. + */ + +/* + * Vybrid Family Direct Memory Access Multiplexer (DMAMUX) + * Chapter 22, Vybrid Reference Manual, Rev. 5, 07/2013 + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +#define DMAMUX_CHCFG(n) (0x1 * n) /* Channels 0-15 Cfg Reg */ +#define CHCFG_ENBL (1 << 7) /* Channel Enable */ +#define CHCFG_TRIG (1 << 6) /* Channel Trigger Enable */ +#define CHCFG_SOURCE_MASK 0x3f /* Channel Source (Slot) */ +#define CHCFG_SOURCE_SHIFT 0 + +struct dmamux_softc { + struct resource *res[4]; + bus_space_tag_t bst[4]; + bus_space_handle_t bsh[4]; +}; + +struct dmamux_softc *dmamux_sc; + +static struct resource_spec dmamux_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, /* DMAMUX0 */ + { SYS_RES_MEMORY, 1, RF_ACTIVE }, /* DMAMUX1 */ + { SYS_RES_MEMORY, 2, RF_ACTIVE }, /* DMAMUX2 */ + { SYS_RES_MEMORY, 3, RF_ACTIVE }, /* DMAMUX3 */ + { -1, 0 } +}; + +static int +dmamux_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_is_compatible(dev, "fsl,mvf600-dmamux")) + return (ENXIO); + + device_set_desc(dev, "Vybrid Family Direct Memory Access Multiplexer"); + return (BUS_PROBE_DEFAULT); +} + +int +dmamux_configure(int mux, int source, int channel, int enable) +{ + struct dmamux_softc *sc; + int reg; + + sc = dmamux_sc; + + MUX_WRITE1(sc, mux, DMAMUX_CHCFG(channel), 0x0); + + reg = 0; + if (enable) + reg |= (CHCFG_ENBL); + + reg &= ~(CHCFG_SOURCE_MASK << CHCFG_SOURCE_SHIFT); + reg |= (source << CHCFG_SOURCE_SHIFT); + + MUX_WRITE1(sc, mux, DMAMUX_CHCFG(channel), reg); + + return (0); +} + +static int +dmamux_attach(device_t dev) +{ + struct dmamux_softc *sc; + int i; + + sc = device_get_softc(dev); + + if (bus_alloc_resources(dev, dmamux_spec, sc->res)) { + device_printf(dev, "could not allocate resources\n"); + return (ENXIO); + } + + /* Memory interface */ + for (i = 0; i < 4; i++) { + sc->bst[i] = rman_get_bustag(sc->res[i]); + sc->bsh[i] = rman_get_bushandle(sc->res[i]); + } + + dmamux_sc = sc; + + return (0); +} + +static device_method_t dmamux_methods[] = { + DEVMETHOD(device_probe, dmamux_probe), + DEVMETHOD(device_attach, dmamux_attach), + { 0, 0 } +}; + +static driver_t dmamux_driver = { + "dmamux", + dmamux_methods, + sizeof(struct dmamux_softc), +}; + +static devclass_t dmamux_devclass; + +DRIVER_MODULE(dmamux, simplebus, dmamux_driver, dmamux_devclass, 0, 0); Copied: stable/10/sys/arm/freescale/vybrid/vf_dmamux.h (from r261639, head/sys/arm/freescale/vybrid/vf_dmamux.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/freescale/vybrid/vf_dmamux.h Thu May 15 18:38:19 2014 (r266170, copy of r261639, head/sys/arm/freescale/vybrid/vf_dmamux.h) @@ -0,0 +1,48 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +int dmamux_configure(int mux, int source, int channel, int enable); + +enum mux_num { + MUX0, + MUX1, + MUX2, + MUX3, +}; + +enum mux_grp { + MUXGRP0, /* MUX[0,3] */ + MUXGRP1, /* MUX[1,2] */ +}; + +/* DMAMUX */ +#define MUX_READ1(_sc, _mux, _reg) \ + bus_space_read_1(_sc->bst[_mux], _sc->bsh[_mux], _reg) + +#define MUX_WRITE1(_sc, _mux, _reg, _val) \ + bus_space_write_1(_sc->bst[_mux], _sc->bsh[_mux], _reg, _val) Copied: stable/10/sys/arm/freescale/vybrid/vf_edma.c (from r261639, head/sys/arm/freescale/vybrid/vf_edma.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/freescale/vybrid/vf_edma.c Thu May 15 18:38:19 2014 (r266170, copy of r261639, head/sys/arm/freescale/vybrid/vf_edma.c) @@ -0,0 +1,338 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * All rights reserved. + * + * 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. + */ + +/* + * Vybrid Family Enhanced Direct Memory Access Controller (eDMA) + * Chapter 21, Vybrid Reference Manual, Rev. 5, 07/2013 + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +struct edma_channel { + uint32_t enabled; + uint32_t mux_num; + uint32_t mux_src; + uint32_t mux_chn; + uint32_t (*ih) (void *, int); + void *ih_user; +}; + +static struct edma_channel edma_map[EDMA_NUM_CHANNELS]; + +static struct resource_spec edma_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { SYS_RES_MEMORY, 1, RF_ACTIVE }, /* TCD */ + { SYS_RES_IRQ, 0, RF_ACTIVE }, /* Transfer complete */ + { SYS_RES_IRQ, 1, RF_ACTIVE }, /* Error Interrupt */ + { -1, 0 } +}; + +static int +edma_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_is_compatible(dev, "fsl,mvf600-edma")) + return (ENXIO); + + device_set_desc(dev, "Vybrid Family eDMA Controller"); + return (BUS_PROBE_DEFAULT); +} + +static void +edma_transfer_complete_intr(void *arg) +{ + struct edma_channel *ch; + struct edma_softc *sc; + int interrupts; + int i; + + sc = arg; + + interrupts = READ4(sc, DMA_INT); + WRITE1(sc, DMA_CINT, CINT_CAIR); + + for (i = 0; i < EDMA_NUM_CHANNELS; i++) { + if (interrupts & (0x1 << i)) { + ch = &edma_map[i]; + if (ch->enabled == 1) { + if (ch->ih != NULL) { + ch->ih(ch->ih_user, i); + } + } + } + } +} + +static void +edma_err_intr(void *arg) +{ + struct edma_softc *sc; + int reg; + + sc = arg; + + reg = READ4(sc, DMA_ERR); + +#if 0 + device_printf(sc->dev, "DMA_ERR 0x%08x, ES 0x%08x\n", + reg, READ4(sc, DMA_ES)); +#endif + + WRITE1(sc, DMA_CERR, CERR_CAEI); +} + +static int +channel_free(struct edma_softc *sc, int chnum) +{ + struct edma_channel *ch; + + ch = &edma_map[chnum]; + ch->enabled = 0; + + dmamux_configure(ch->mux_num, ch->mux_src, ch->mux_chn, 0); + + return (0); +} + +static int +channel_configure(struct edma_softc *sc, int mux_grp, int mux_src) +{ + struct edma_channel *ch; + int channel_first; + int mux_num; + int chnum; + int i; + + if ((sc->device_id == 0 && mux_grp == 1) || \ + (sc->device_id == 1 && mux_grp == 0)) { + channel_first = NCHAN_PER_MUX; + mux_num = (sc->device_id * 2) + 1; + } else { + channel_first = 0; + mux_num = sc->device_id * 2; + }; + + /* Take first unused eDMA channel */ + ch = NULL; + for (i = channel_first; i < (channel_first + NCHAN_PER_MUX); i++) { + ch = &edma_map[i]; + if (ch->enabled == 0) { + break; + } + ch = NULL; + }; + + if (ch == NULL) { + /* Can't find free channel */ + return (-1); + }; + + chnum = i; + + ch->enabled = 1; + ch->mux_num = mux_num; + ch->mux_src = mux_src; + ch->mux_chn = (chnum - channel_first); /* 0 to 15 */ + + dmamux_configure(ch->mux_num, ch->mux_src, ch->mux_chn, 1); + + return (chnum); +} + +static int +dma_stop(struct edma_softc *sc, int chnum) +{ + int reg; + + reg = READ4(sc, DMA_ERQ); + reg &= ~(0x1 << chnum); + WRITE4(sc, DMA_ERQ, reg); + + return (0); +} + +static int +dma_setup(struct edma_softc *sc, struct tcd_conf *tcd) +{ + struct edma_channel *ch; + int chnum; + int reg; + + chnum = tcd->channel; + + ch = &edma_map[chnum]; + ch->ih = tcd->ih; + ch->ih_user = tcd->ih_user; + + TCD_WRITE4(sc, DMA_TCDn_SADDR(chnum), tcd->saddr); + TCD_WRITE4(sc, DMA_TCDn_DADDR(chnum), tcd->daddr); + + reg = (tcd->smod << TCD_ATTR_SMOD_SHIFT); + reg |= (tcd->dmod << TCD_ATTR_DMOD_SHIFT); + reg |= (tcd->ssize << TCD_ATTR_SSIZE_SHIFT); + reg |= (tcd->dsize << TCD_ATTR_DSIZE_SHIFT); + TCD_WRITE2(sc, DMA_TCDn_ATTR(chnum), reg); + + TCD_WRITE2(sc, DMA_TCDn_SOFF(chnum), tcd->soff); + TCD_WRITE2(sc, DMA_TCDn_DOFF(chnum), tcd->doff); + TCD_WRITE4(sc, DMA_TCDn_SLAST(chnum), tcd->slast); + TCD_WRITE4(sc, DMA_TCDn_DLASTSGA(chnum), tcd->dlast_sga); + TCD_WRITE4(sc, DMA_TCDn_NBYTES_MLOFFYES(chnum), tcd->nbytes); + + reg = tcd->nmajor; /* Current Major Iteration Count */ + TCD_WRITE2(sc, DMA_TCDn_CITER_ELINKNO(chnum), reg); + TCD_WRITE2(sc, DMA_TCDn_BITER_ELINKNO(chnum), reg); + + reg = (TCD_CSR_INTMAJOR); + if(tcd->majorelink == 1) { + reg |= TCD_CSR_MAJORELINK; + reg |= (tcd->majorelinkch << TCD_CSR_MAJORELINKCH_SHIFT); + } + TCD_WRITE2(sc, DMA_TCDn_CSR(chnum), reg); + + /* Enable requests */ + reg = READ4(sc, DMA_ERQ); + reg |= (0x1 << chnum); + WRITE4(sc, DMA_ERQ, reg); + + /* Enable error interrupts */ + reg = READ4(sc, DMA_EEI); + reg |= (0x1 << chnum); + WRITE4(sc, DMA_EEI, reg); + + return (0); +} + +static int +dma_request(struct edma_softc *sc, int chnum) +{ + int reg; + + /* Start */ + reg = TCD_READ2(sc, DMA_TCDn_CSR(chnum)); + reg |= TCD_CSR_START; + TCD_WRITE2(sc, DMA_TCDn_CSR(chnum), reg); + + return (0); +} + +static int +edma_attach(device_t dev) +{ + struct edma_softc *sc; + phandle_t node; + int dts_value; + int len; + + sc = device_get_softc(dev); + sc->dev = dev; + + if ((node = ofw_bus_get_node(sc->dev)) == -1) + return (ENXIO); + + if ((len = OF_getproplen(node, "device-id")) <= 0) + return (ENXIO); + + OF_getprop(node, "device-id", &dts_value, len); + sc->device_id = fdt32_to_cpu(dts_value); + + sc->dma_stop = dma_stop; + sc->dma_setup = dma_setup; + sc->dma_request = dma_request; + sc->channel_configure = channel_configure; + sc->channel_free = channel_free; + + if (bus_alloc_resources(dev, edma_spec, sc->res)) { + device_printf(dev, "could not allocate resources\n"); + return (ENXIO); + } + + /* Memory interface */ + sc->bst = rman_get_bustag(sc->res[0]); + sc->bsh = rman_get_bushandle(sc->res[0]); + sc->bst_tcd = rman_get_bustag(sc->res[1]); + sc->bsh_tcd = rman_get_bushandle(sc->res[1]); + + /* Setup interrupt handlers */ + if (bus_setup_intr(dev, sc->res[2], INTR_TYPE_BIO | INTR_MPSAFE, + NULL, edma_transfer_complete_intr, sc, &sc->tc_ih)) { + device_printf(dev, "Unable to alloc DMA intr resource.\n"); + return (ENXIO); + } + + if (bus_setup_intr(dev, sc->res[3], INTR_TYPE_BIO | INTR_MPSAFE, + NULL, edma_err_intr, sc, &sc->err_ih)) { + device_printf(dev, "Unable to alloc DMA Err intr resource.\n"); + return (ENXIO); + } + + return (0); +} + +static device_method_t edma_methods[] = { + DEVMETHOD(device_probe, edma_probe), + DEVMETHOD(device_attach, edma_attach), + { 0, 0 } +}; + +static driver_t edma_driver = { + "edma", + edma_methods, + sizeof(struct edma_softc), +}; + +static devclass_t edma_devclass; + +DRIVER_MODULE(edma, simplebus, edma_driver, edma_devclass, 0, 0); Copied: stable/10/sys/arm/freescale/vybrid/vf_edma.h (from r261639, head/sys/arm/freescale/vybrid/vf_edma.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/freescale/vybrid/vf_edma.h Thu May 15 18:38:19 2014 (r266170, copy of r261639, head/sys/arm/freescale/vybrid/vf_edma.h) @@ -0,0 +1,186 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +#define DMA_CR 0x000 /* Control */ +#define DMA_ES 0x004 /* Error Status */ +#define DMA_ERQ 0x00C /* Enable Request */ +#define DMA_EEI 0x014 /* Enable Error Interrupt */ +#define DMA_CEEI 0x018 /* Clear Enable Error Interrupt */ +#define DMA_SEEI 0x019 /* Set Enable Error Interrupt */ +#define DMA_CERQ 0x01A /* Clear Enable Request */ +#define DMA_SERQ 0x01B /* Set Enable Request */ +#define DMA_CDNE 0x01C /* Clear DONE Status Bit */ +#define DMA_SSRT 0x01D /* Set START Bit */ +#define DMA_CERR 0x01E /* Clear Error */ +#define CERR_CAEI (1 << 6) /* Clear All Error Indicators */ +#define DMA_CINT 0x01F /* Clear Interrupt Request */ +#define CINT_CAIR (1 << 6) /* Clear All Interrupt Requests */ +#define DMA_INT 0x024 /* Interrupt Request */ +#define DMA_ERR 0x02C /* Error */ +#define DMA_HRS 0x034 /* Hardware Request Status */ +#define DMA_EARS 0x044 /* Enable Asynchronous Request in Stop */ +#define DMA_DCHPRI3 0x100 /* Channel n Priority */ +#define DMA_DCHPRI2 0x101 /* Channel n Priority */ +#define DMA_DCHPRI1 0x102 /* Channel n Priority */ +#define DMA_DCHPRI0 0x103 /* Channel n Priority */ +#define DMA_DCHPRI7 0x104 /* Channel n Priority */ +#define DMA_DCHPRI6 0x105 /* Channel n Priority */ +#define DMA_DCHPRI5 0x106 /* Channel n Priority */ +#define DMA_DCHPRI4 0x107 /* Channel n Priority */ +#define DMA_DCHPRI11 0x108 /* Channel n Priority */ +#define DMA_DCHPRI10 0x109 /* Channel n Priority */ +#define DMA_DCHPRI9 0x10A /* Channel n Priority */ +#define DMA_DCHPRI8 0x10B /* Channel n Priority */ +#define DMA_DCHPRI15 0x10C /* Channel n Priority */ +#define DMA_DCHPRI14 0x10D /* Channel n Priority */ +#define DMA_DCHPRI13 0x10E /* Channel n Priority */ +#define DMA_DCHPRI12 0x10F /* Channel n Priority */ +#define DMA_DCHPRI19 0x110 /* Channel n Priority */ +#define DMA_DCHPRI18 0x111 /* Channel n Priority */ +#define DMA_DCHPRI17 0x112 /* Channel n Priority */ +#define DMA_DCHPRI16 0x113 /* Channel n Priority */ +#define DMA_DCHPRI23 0x114 /* Channel n Priority */ +#define DMA_DCHPRI22 0x115 /* Channel n Priority */ +#define DMA_DCHPRI21 0x116 /* Channel n Priority */ +#define DMA_DCHPRI20 0x117 /* Channel n Priority */ +#define DMA_DCHPRI27 0x118 /* Channel n Priority */ +#define DMA_DCHPRI26 0x119 /* Channel n Priority */ +#define DMA_DCHPRI25 0x11A /* Channel n Priority */ +#define DMA_DCHPRI24 0x11B /* Channel n Priority */ +#define DMA_DCHPRI31 0x11C /* Channel n Priority */ +#define DMA_DCHPRI30 0x11D /* Channel n Priority */ +#define DMA_DCHPRI29 0x11E /* Channel n Priority */ +#define DMA_DCHPRI28 0x11F /* Channel n Priority */ + +#define DMA_TCDn_SADDR(n) (0x00 + 0x20 * n) /* Source Address */ +#define DMA_TCDn_SOFF(n) (0x04 + 0x20 * n) /* Signed Source Address Offset */ +#define DMA_TCDn_ATTR(n) (0x06 + 0x20 * n) /* Transfer Attributes */ +#define DMA_TCDn_NBYTES_MLNO(n) (0x08 + 0x20 * n) /* Minor Byte Count */ +#define DMA_TCDn_NBYTES_MLOFFNO(n) (0x08 + 0x20 * n) /* Signed Minor Loop Offset */ +#define DMA_TCDn_NBYTES_MLOFFYES(n) (0x08 + 0x20 * n) /* Signed Minor Loop Offset */ +#define DMA_TCDn_SLAST(n) (0x0C + 0x20 * n) /* Last Source Address Adjustment */ +#define DMA_TCDn_DADDR(n) (0x10 + 0x20 * n) /* Destination Address */ +#define DMA_TCDn_DOFF(n) (0x14 + 0x20 * n) /* Signed Destination Address Offset */ +#define DMA_TCDn_CITER_ELINKYES(n) (0x16 + 0x20 * n) /* Current Minor Loop Link, Major Loop Count */ +#define DMA_TCDn_CITER_ELINKNO(n) (0x16 + 0x20 * n) +#define DMA_TCDn_DLASTSGA(n) (0x18 + 0x20 * n) /* Last Dst Addr Adjustment/Scatter Gather Address */ +#define DMA_TCDn_CSR(n) (0x1C + 0x20 * n) /* Control and Status */ +#define DMA_TCDn_BITER_ELINKYES(n) (0x1E + 0x20 * n) /* Beginning Minor Loop Link, Major Loop Count */ +#define DMA_TCDn_BITER_ELINKNO(n) (0x1E + 0x20 * n) /* Beginning Minor Loop Link, Major Loop Count */ + +#define TCD_CSR_START (1 << 0) +#define TCD_CSR_INTMAJOR (1 << 1) +#define TCD_CSR_INTHALF (1 << 2) +#define TCD_CSR_DREQ (1 << 3) +#define TCD_CSR_ESG (1 << 4) +#define TCD_CSR_MAJORELINK (1 << 5) +#define TCD_CSR_ACTIVE (1 << 6) +#define TCD_CSR_DONE (1 << 7) +#define TCD_CSR_MAJORELINKCH_SHIFT 8 + +#define TCD_ATTR_SMOD_SHIFT 11 /* Source Address Modulo */ +#define TCD_ATTR_SSIZE_SHIFT 8 /* Source Data Transfer Size */ +#define TCD_ATTR_DMOD_SHIFT 3 /* Dst Address Modulo */ +#define TCD_ATTR_DSIZE_SHIFT 0 /* Dst Data Transfer Size */ + +#define TCD_READ4(_sc, _reg) \ + bus_space_read_4(_sc->bst_tcd, _sc->bsh_tcd, _reg) +#define TCD_WRITE4(_sc, _reg, _val) \ + bus_space_write_4(_sc->bst_tcd, _sc->bsh_tcd, _reg, _val) +#define TCD_READ2(_sc, _reg) \ + bus_space_read_2(_sc->bst_tcd, _sc->bsh_tcd, _reg) +#define TCD_WRITE2(_sc, _reg, _val) \ + bus_space_write_2(_sc->bst_tcd, _sc->bsh_tcd, _reg, _val) +#define TCD_READ1(_sc, _reg) \ + bus_space_read_1(_sc->bst_tcd, _sc->bsh_tcd, _reg) +#define TCD_WRITE1(_sc, _reg, _val) \ + bus_space_write_1(_sc->bst_tcd, _sc->bsh_tcd, _reg, _val) + +#define EDMA_NUM_DEVICES 2 +#define EDMA_NUM_CHANNELS 32 +#define NCHAN_PER_MUX 16 + +struct tcd_conf { + bus_addr_t saddr; + bus_addr_t daddr; + uint32_t nbytes; + uint32_t nmajor; + uint32_t majorelink; + uint32_t majorelinkch; + uint32_t esg; + uint32_t smod; + uint32_t dmod; + uint32_t soff; + uint32_t doff; + uint32_t ssize; + uint32_t dsize; + uint32_t slast; + uint32_t dlast_sga; + uint32_t channel; + uint32_t (*ih)(void *, int); + void *ih_user; +}; + +/* + * TCD struct is described at + * Vybrid Reference Manual, Rev. 5, 07/2013 + * + * Should be used for Scatter/Gathering feature. + */ + +struct TCD { + uint32_t saddr; + uint16_t attr; + uint16_t soff; + uint32_t nbytes; + uint32_t slast; + uint32_t daddr; + uint16_t citer; + uint16_t doff; + uint32_t dlast_sga; + uint16_t biter; + uint16_t csr; +} __packed; + +struct edma_softc { + device_t dev; + struct resource *res[4]; + bus_space_tag_t bst; + bus_space_handle_t bsh; + bus_space_tag_t bst_tcd; + bus_space_handle_t bsh_tcd; + void *tc_ih; + void *err_ih; + uint32_t device_id; + + int (*channel_configure) (struct edma_softc *, int, int); + int (*channel_free) (struct edma_softc *, int); + int (*dma_request) (struct edma_softc *, int); + int (*dma_setup) (struct edma_softc *, struct tcd_conf *); + int (*dma_stop) (struct edma_softc *, int); +}; Modified: stable/10/sys/boot/fdt/dts/vybrid.dtsi ============================================================================== --- stable/10/sys/boot/fdt/dts/vybrid.dtsi Thu May 15 18:34:31 2014 (r266169) +++ stable/10/sys/boot/fdt/dts/vybrid.dtsi Thu May 15 18:38:19 2014 (r266170) @@ -111,6 +111,7 @@ <0x40019000 0x1000>; /* TCD */ interrupts = < 40 41 >; interrupt-parent = <&GIC>; + device-id = < 0 >; status = "disabled"; }; @@ -120,6 +121,7 @@ <0x40099000 0x1000>; /* TCD */ interrupts = < 42 43 >; interrupt-parent = <&GIC>; + device-id = < 1 >; status = "disabled"; }; @@ -308,6 +310,7 @@ interrupts = < 119 >; interrupt-parent = <&GIC>; status = "disabled"; + edma-controller = <&edma1>; clock_names = "sai3", "cko1"; iomux_config = < 16 0x2 19 0x2 Modified: stable/10/sys/dev/usb/controller/at91dci_atmelarm.c ============================================================================== --- stable/10/sys/dev/usb/controller/at91dci_atmelarm.c Thu May 15 18:34:31 2014 (r266169) +++ stable/10/sys/dev/usb/controller/at91dci_atmelarm.c Thu May 15 18:38:19 2014 (r266170) @@ -212,13 +212,8 @@ at91_udp_attach(device_t dev) } device_set_ivars(sc->sc_dci.sc_bus.bdev, &sc->sc_dci.sc_bus); -#if (__FreeBSD_version >= 700031) err = bus_setup_intr(dev, sc->sc_dci.sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, NULL, (driver_intr_t *)at91dci_interrupt, sc, &sc->sc_dci.sc_intr_hdl); -#else - err = bus_setup_intr(dev, sc->sc_dci.sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, - (driver_intr_t *)at91dci_interrupt, sc, &sc->sc_dci.sc_intr_hdl); -#endif if (err) { sc->sc_dci.sc_intr_hdl = NULL; goto error; Modified: stable/10/sys/dev/usb/controller/ohci_atmelarm.c ============================================================================== --- stable/10/sys/dev/usb/controller/ohci_atmelarm.c Thu May 15 18:34:31 2014 (r266169) +++ stable/10/sys/dev/usb/controller/ohci_atmelarm.c Thu May 15 18:38:19 2014 (r266170) @@ -131,13 +131,8 @@ ohci_atmelarm_attach(device_t dev) strlcpy(sc->sc_ohci.sc_vendor, "Atmel", sizeof(sc->sc_ohci.sc_vendor)); -#if (__FreeBSD_version >= 700031) err = bus_setup_intr(dev, sc->sc_ohci.sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, NULL, (driver_intr_t *)ohci_interrupt, sc, &sc->sc_ohci.sc_intr_hdl); -#else - err = bus_setup_intr(dev, sc->sc_ohci.sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, - (driver_intr_t *)ohci_interrupt, sc, &sc->sc_ohci.sc_intr_hdl); -#endif if (err) { sc->sc_ohci.sc_intr_hdl = NULL; goto error; From owner-svn-src-stable@FreeBSD.ORG Thu May 15 19:09:35 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B9306DA; Thu, 15 May 2014 19:09:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55C4628F8; Thu, 15 May 2014 19:09:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FJ9ZhP051508; Thu, 15 May 2014 19:09:35 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FJ9Vek051483; Thu, 15 May 2014 19:09:31 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405151909.s4FJ9Vek051483@svn.freebsd.org> From: Ian Lepore Date: Thu, 15 May 2014 19:09:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266175 - in stable/10/sys: arm/arm arm/conf arm/include arm/xscale/i80321 arm/xscale/i8134x arm/xscale/ixp425 arm/xscale/pxa conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 19:09:35 -0000 Author: ian Date: Thu May 15 19:09:31 2014 New Revision: 266175 URL: http://svnweb.freebsd.org/changeset/base/266175 Log: MFC r257549, r261642 Don't create a distinct free page pool for segregating allocations that are accessed through the direct map unless the kernel configuration actually includes a direct map. Only a few configurations do, and for the rest the unnecessary free page pool is a small pessimization. Remove the ARM_USE_SMALL_ALLOC option and code related to it. Modified: stable/10/sys/arm/arm/machdep.c stable/10/sys/arm/arm/mem.c stable/10/sys/arm/arm/pmap.c stable/10/sys/arm/arm/vm_machdep.c stable/10/sys/arm/conf/AVILA stable/10/sys/arm/conf/CAMBRIA stable/10/sys/arm/conf/CNS11XXNAS stable/10/sys/arm/conf/CRB stable/10/sys/arm/conf/EP80219 stable/10/sys/arm/conf/IQ31244 stable/10/sys/arm/conf/NSLU stable/10/sys/arm/include/pmap.h stable/10/sys/arm/include/sf_buf.h stable/10/sys/arm/include/vmparam.h stable/10/sys/arm/xscale/i80321/ep80219_machdep.c stable/10/sys/arm/xscale/i80321/iq31244_machdep.c stable/10/sys/arm/xscale/i8134x/crb_machdep.c stable/10/sys/arm/xscale/ixp425/avila_machdep.c stable/10/sys/arm/xscale/pxa/pxa_machdep.c stable/10/sys/arm/xscale/pxa/std.pxa stable/10/sys/conf/options.arm Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/machdep.c ============================================================================== --- stable/10/sys/arm/arm/machdep.c Thu May 15 18:53:02 2014 (r266174) +++ stable/10/sys/arm/arm/machdep.c Thu May 15 19:09:31 2014 (r266175) @@ -783,9 +783,6 @@ makectx(struct trapframe *tf, struct pcb * Make a standard dump_avail array. Can't make the phys_avail * since we need to do that after we call pmap_bootstrap, but this * is needed before pmap_boostrap. - * - * ARM_USE_SMALL_ALLOC uses dump_avail, so it must be filled before - * calling pmap_bootstrap. */ void arm_dump_avail_init(vm_paddr_t physaddr, vm_offset_t ramsize, size_t max) Modified: stable/10/sys/arm/arm/mem.c ============================================================================== --- stable/10/sys/arm/arm/mem.c Thu May 15 18:53:02 2014 (r266174) +++ stable/10/sys/arm/arm/mem.c Thu May 15 19:09:31 2014 (r266175) @@ -135,10 +135,6 @@ memrw(struct cdev *dev, struct uio *uio, if (!kernacc((caddr_t)(int)uio->uio_offset, c, uio->uio_rw == UIO_READ ? VM_PROT_READ : VM_PROT_WRITE)) -#ifdef ARM_USE_SMALL_ALLOC - if (addr <= VM_MAXUSER_ADDRESS || - addr >= KERNBASE) -#endif return (EFAULT); error = uiomove((caddr_t)(int)uio->uio_offset, (int)c, uio); continue; Modified: stable/10/sys/arm/arm/pmap.c ============================================================================== --- stable/10/sys/arm/arm/pmap.c Thu May 15 18:53:02 2014 (r266174) +++ stable/10/sys/arm/arm/pmap.c Thu May 15 19:09:31 2014 (r266175) @@ -1069,9 +1069,7 @@ pmap_l2ptp_ctor(void *mem, int size, voi #ifndef PMAP_INCLUDE_PTE_SYNC struct l2_bucket *l2b; pt_entry_t *ptep, pte; -#ifdef ARM_USE_SMALL_ALLOC - pd_entry_t *pde; -#endif + vm_offset_t va = (vm_offset_t)mem & ~PAGE_MASK; /* @@ -1082,10 +1080,6 @@ pmap_l2ptp_ctor(void *mem, int size, voi * page tables, we simply fix up the cache-mode here if it's not * correct. */ -#ifdef ARM_USE_SMALL_ALLOC - pde = &kernel_pmap->pm_l1->l1_kva[L1_IDX(va)]; - if (!l1pte_section_p(*pde)) { -#endif l2b = pmap_get_l2_bucket(pmap_kernel(), va); ptep = &l2b->l2b_kva[l2pte_index(va)]; pte = *ptep; @@ -1100,9 +1094,6 @@ pmap_l2ptp_ctor(void *mem, int size, voi cpu_tlb_flushD_SE(va); cpu_cpwait(); } -#ifdef ARM_USE_SMALL_ALLOC - } -#endif #endif memset(mem, 0, L2_TABLE_SIZE_REAL); PTE_SYNC_RANGE(mem, L2_TABLE_SIZE_REAL / sizeof(pt_entry_t)); @@ -2259,10 +2250,6 @@ pmap_alloc_specials(vm_offset_t *availp, * (physical) address starting relative to 0] */ #define PMAP_STATIC_L2_SIZE 16 -#ifdef ARM_USE_SMALL_ALLOC -extern struct mtx smallalloc_mtx; -#endif - void pmap_bootstrap(vm_offset_t firstaddr, struct pv_addr *l1pt) { @@ -2425,10 +2412,6 @@ pmap_bootstrap(vm_offset_t firstaddr, st kernel_vm_end = pmap_curmaxkvaddr; mtx_init(&cmtx, "TMP mappings mtx", NULL, MTX_DEF); -#ifdef ARM_USE_SMALL_ALLOC - mtx_init(&smallalloc_mtx, "Small alloc page list", NULL, MTX_DEF); - arm_init_smallalloc(); -#endif pmap_set_pcb_pagedir(kernel_pmap, thread0.td_pcb); } @@ -2672,11 +2655,7 @@ pmap_remove_pages(pmap_t pmap) KASSERT(l2b != NULL, ("No L2 bucket in pmap_remove_pages")); pt = &l2b->l2b_kva[l2pte_index(pv->pv_va)]; m = PHYS_TO_VM_PAGE(*pt & L2_ADDR_MASK); -#ifdef ARM_USE_SMALL_ALLOC - KASSERT((vm_offset_t)m >= alloc_firstaddr, ("Trying to access non-existent page va %x pte %x", pv->pv_va, *pt)); -#else KASSERT((vm_offset_t)m >= KERNBASE, ("Trying to access non-existent page va %x pte %x", pv->pv_va, *pt)); -#endif *pt = 0; PTE_SYNC(pt); npv = TAILQ_NEXT(pv, pv_plist); @@ -2935,9 +2914,6 @@ pmap_kremove(vm_offset_t va) vm_offset_t pmap_map(vm_offset_t *virt, vm_offset_t start, vm_offset_t end, int prot) { -#ifdef ARM_USE_SMALL_ALLOC - return (arm_ptovirt(start)); -#else vm_offset_t sva = *virt; vm_offset_t va = sva; @@ -2952,7 +2928,6 @@ pmap_map(vm_offset_t *virt, vm_offset_t } *virt = va; return (sva); -#endif } static void @@ -4010,27 +3985,11 @@ pmap_remove(pmap_t pm, vm_offset_t sva, void pmap_zero_page_generic(vm_paddr_t phys, int off, int size) { -#ifdef ARM_USE_SMALL_ALLOC - char *dstpg; -#endif if (_arm_bzero && size >= _min_bzero_size && _arm_bzero((void *)(phys + off), size, IS_PHYSICAL) == 0) return; -#ifdef ARM_USE_SMALL_ALLOC - dstpg = (char *)arm_ptovirt(phys); - if (off || size != PAGE_SIZE) { - bzero(dstpg + off, size); - cpu_dcache_wbinv_range((vm_offset_t)(dstpg + off), size); - cpu_l2cache_wbinv_range((vm_offset_t)(dstpg + off), size); - } else { - bzero_page((vm_offset_t)dstpg); - cpu_dcache_wbinv_range((vm_offset_t)dstpg, PAGE_SIZE); - cpu_l2cache_wbinv_range((vm_offset_t)dstpg, PAGE_SIZE); - } -#else - mtx_lock(&cmtx); /* * Hook in the page, zero it, invalidate the TLB as needed. @@ -4048,7 +4007,6 @@ pmap_zero_page_generic(vm_paddr_t phys, bzero_page(cdstp); mtx_unlock(&cmtx); -#endif } #endif /* (ARM_MMU_GENERIC + ARM_MMU_SA1) != 0 */ @@ -4056,23 +4014,11 @@ pmap_zero_page_generic(vm_paddr_t phys, void pmap_zero_page_xscale(vm_paddr_t phys, int off, int size) { -#ifdef ARM_USE_SMALL_ALLOC - char *dstpg; -#endif if (_arm_bzero && size >= _min_bzero_size && _arm_bzero((void *)(phys + off), size, IS_PHYSICAL) == 0) return; -#ifdef ARM_USE_SMALL_ALLOC - dstpg = (char *)arm_ptovirt(phys); - if (off || size != PAGE_SIZE) { - bzero(dstpg + off, size); - cpu_dcache_wbinv_range((vm_offset_t)(dstpg + off), size); - } else { - bzero_page((vm_offset_t)dstpg); - cpu_dcache_wbinv_range((vm_offset_t)dstpg, PAGE_SIZE); - } -#else + mtx_lock(&cmtx); /* * Hook in the page, zero it, and purge the cache for that @@ -4090,7 +4036,6 @@ pmap_zero_page_xscale(vm_paddr_t phys, i bzero_page(cdstp); mtx_unlock(&cmtx); xscale_cache_clean_minidata(); -#endif } /* @@ -4415,9 +4360,6 @@ pmap_copy_page_offs_xscale(vm_paddr_t a_ void pmap_copy_page(vm_page_t src, vm_page_t dst) { -#ifdef ARM_USE_SMALL_ALLOC - vm_offset_t srcpg, dstpg; -#endif cpu_dcache_wbinv_all(); cpu_l2cache_wbinv_all(); @@ -4425,15 +4367,7 @@ pmap_copy_page(vm_page_t src, vm_page_t _arm_memcpy((void *)VM_PAGE_TO_PHYS(dst), (void *)VM_PAGE_TO_PHYS(src), PAGE_SIZE, IS_PHYSICAL) == 0) return; -#ifdef ARM_USE_SMALL_ALLOC - srcpg = arm_ptovirt(VM_PAGE_TO_PHYS(src)); - dstpg = arm_ptovirt(VM_PAGE_TO_PHYS(dst)); - bcopy_page(srcpg, dstpg); - cpu_dcache_wbinv_range(dstpg, PAGE_SIZE); - cpu_l2cache_wbinv_range(dstpg, PAGE_SIZE); -#else pmap_copy_page_func(VM_PAGE_TO_PHYS(src), VM_PAGE_TO_PHYS(dst)); -#endif } int unmapped_buf_allowed = 1; @@ -4445,9 +4379,6 @@ pmap_copy_pages(vm_page_t ma[], vm_offse vm_page_t a_pg, b_pg; vm_offset_t a_pg_offset, b_pg_offset; int cnt; -#ifdef ARM_USE_SMALL_ALLOC - vm_offset_t a_va, b_va; -#endif cpu_dcache_wbinv_all(); cpu_l2cache_wbinv_all(); @@ -4458,16 +4389,8 @@ pmap_copy_pages(vm_page_t ma[], vm_offse b_pg = mb[b_offset >> PAGE_SHIFT]; b_pg_offset = b_offset & PAGE_MASK; cnt = min(cnt, PAGE_SIZE - b_pg_offset); -#ifdef ARM_USE_SMALL_ALLOC - a_va = arm_ptovirt(VM_PAGE_TO_PHYS(a_pg)) + a_pg_offset; - b_va = arm_ptovirt(VM_PAGE_TO_PHYS(b_pg)) + b_pg_offset; - bcopy((char *)a_va, (char *)b_va, cnt); - cpu_dcache_wbinv_range(b_va, cnt); - cpu_l2cache_wbinv_range(b_va, cnt); -#else pmap_copy_page_offs_func(VM_PAGE_TO_PHYS(a_pg), a_pg_offset, VM_PAGE_TO_PHYS(b_pg), b_pg_offset, cnt); -#endif xfersize -= cnt; a_offset += cnt; b_offset += cnt; Modified: stable/10/sys/arm/arm/vm_machdep.c ============================================================================== --- stable/10/sys/arm/arm/vm_machdep.c Thu May 15 18:53:02 2014 (r266174) +++ stable/10/sys/arm/arm/vm_machdep.c Thu May 15 19:09:31 2014 (r266175) @@ -82,8 +82,6 @@ __FBSDID("$FreeBSD$"); CTASSERT(sizeof(struct switchframe) == 24); CTASSERT(sizeof(struct trapframe) == 80); -#ifndef ARM_USE_SMALL_ALLOC - #ifndef NSFBUFS #define NSFBUFS (512 + maxusers * 16) #endif @@ -119,7 +117,6 @@ static u_int sf_buf_alloc_want; * A lock used to synchronize access to the hash table and free list */ static struct mtx sf_buf_lock; -#endif /* !ARM_USE_SMALL_ALLOC */ /* * Finish a fork operation, with process p2 nearly set up. @@ -191,7 +188,7 @@ cpu_thread_swapout(struct thread *td) void sf_buf_free(struct sf_buf *sf) { -#ifndef ARM_USE_SMALL_ALLOC + mtx_lock(&sf_buf_lock); sf->ref_count--; if (sf->ref_count == 0) { @@ -204,10 +201,8 @@ sf_buf_free(struct sf_buf *sf) wakeup(&sf_buf_freelist); } mtx_unlock(&sf_buf_lock); -#endif } -#ifndef ARM_USE_SMALL_ALLOC /* * Allocate a pool of sf_bufs (sendfile(2) or "super-fast" if you prefer. :-)) */ @@ -233,7 +228,6 @@ sf_buf_init(void *arg) sf_buf_alloc_want = 0; mtx_init(&sf_buf_lock, "sf_buf", NULL, MTX_DEF); } -#endif /* * Get an sf_buf from the freelist. Will block if none are available. @@ -241,9 +235,6 @@ sf_buf_init(void *arg) struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags) { -#ifdef ARM_USE_SMALL_ALLOC - return ((struct sf_buf *)m); -#else struct sf_head *hash_list; struct sf_buf *sf; int error; @@ -289,7 +280,6 @@ sf_buf_alloc(struct vm_page *m, int flag done: mtx_unlock(&sf_buf_lock); return (sf); -#endif } void @@ -492,194 +482,3 @@ cpu_exit(struct thread *td) { } -#ifdef ARM_USE_SMALL_ALLOC - -static TAILQ_HEAD(,arm_small_page) pages_normal = - TAILQ_HEAD_INITIALIZER(pages_normal); -static TAILQ_HEAD(,arm_small_page) pages_wt = - TAILQ_HEAD_INITIALIZER(pages_wt); -static TAILQ_HEAD(,arm_small_page) free_pgdesc = - TAILQ_HEAD_INITIALIZER(free_pgdesc); - -extern uma_zone_t l2zone; - -struct mtx smallalloc_mtx; - -vm_offset_t alloc_firstaddr; - -#ifdef ARM_HAVE_SUPERSECTIONS -#define S_FRAME L1_SUP_FRAME -#define S_SIZE L1_SUP_SIZE -#else -#define S_FRAME L1_S_FRAME -#define S_SIZE L1_S_SIZE -#endif - -vm_offset_t -arm_ptovirt(vm_paddr_t pa) -{ - int i; - vm_offset_t addr = alloc_firstaddr; - - KASSERT(alloc_firstaddr != 0, ("arm_ptovirt called too early ?")); - for (i = 0; dump_avail[i + 1]; i += 2) { - if (pa >= dump_avail[i] && pa < dump_avail[i + 1]) - break; - addr += (dump_avail[i + 1] & S_FRAME) + S_SIZE - - (dump_avail[i] & S_FRAME); - } - KASSERT(dump_avail[i + 1] != 0, ("Trying to access invalid physical address")); - return (addr + (pa - (dump_avail[i] & S_FRAME))); -} - -void -arm_init_smallalloc(void) -{ - vm_offset_t to_map = 0, mapaddr; - int i; - - /* - * We need to use dump_avail and not phys_avail, since we want to - * map the whole memory and not just the memory available to the VM - * to be able to do a pa => va association for any address. - */ - - for (i = 0; dump_avail[i + 1]; i+= 2) { - to_map += (dump_avail[i + 1] & S_FRAME) + S_SIZE - - (dump_avail[i] & S_FRAME); - } - alloc_firstaddr = mapaddr = KERNBASE - to_map; - for (i = 0; dump_avail[i + 1]; i+= 2) { - vm_offset_t size = (dump_avail[i + 1] & S_FRAME) + - S_SIZE - (dump_avail[i] & S_FRAME); - vm_offset_t did = 0; - while (size > 0) { -#ifdef ARM_HAVE_SUPERSECTIONS - pmap_kenter_supersection(mapaddr, - (dump_avail[i] & L1_SUP_FRAME) + did, - SECTION_CACHE); -#else - pmap_kenter_section(mapaddr, - (dump_avail[i] & L1_S_FRAME) + did, SECTION_CACHE); -#endif - mapaddr += S_SIZE; - did += S_SIZE; - size -= S_SIZE; - } - } -} - -void -arm_add_smallalloc_pages(void *list, void *mem, int bytes, int pagetable) -{ - struct arm_small_page *pg; - - bytes &= ~PAGE_MASK; - while (bytes > 0) { - pg = (struct arm_small_page *)list; - pg->addr = mem; - if (pagetable) - TAILQ_INSERT_HEAD(&pages_wt, pg, pg_list); - else - TAILQ_INSERT_HEAD(&pages_normal, pg, pg_list); - list = (char *)list + sizeof(*pg); - mem = (char *)mem + PAGE_SIZE; - bytes -= PAGE_SIZE; - } -} - -void * -uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) -{ - void *ret; - struct arm_small_page *sp; - TAILQ_HEAD(,arm_small_page) *head; - vm_page_t m; - - *flags = UMA_SLAB_PRIV; - /* - * For CPUs where we setup page tables as write back, there's no - * need to maintain two separate pools. - */ - if (zone == l2zone && pte_l1_s_cache_mode != pte_l1_s_cache_mode_pt) - head = (void *)&pages_wt; - else - head = (void *)&pages_normal; - - mtx_lock(&smallalloc_mtx); - sp = TAILQ_FIRST(head); - - if (!sp) { - int pflags; - - mtx_unlock(&smallalloc_mtx); - if (zone == l2zone && - pte_l1_s_cache_mode != pte_l1_s_cache_mode_pt) { - *flags = UMA_SLAB_KMEM; - ret = ((void *)kmem_malloc(kmem_arena, bytes, - M_NOWAIT)); - return (ret); - } - pflags = malloc2vm_flags(wait) | VM_ALLOC_WIRED; - for (;;) { - m = vm_page_alloc(NULL, 0, pflags | VM_ALLOC_NOOBJ); - if (m == NULL) { - if (wait & M_NOWAIT) - return (NULL); - VM_WAIT; - } else - break; - } - ret = (void *)arm_ptovirt(VM_PAGE_TO_PHYS(m)); - if ((wait & M_ZERO) && (m->flags & PG_ZERO) == 0) - bzero(ret, PAGE_SIZE); - return (ret); - } - TAILQ_REMOVE(head, sp, pg_list); - TAILQ_INSERT_HEAD(&free_pgdesc, sp, pg_list); - ret = sp->addr; - mtx_unlock(&smallalloc_mtx); - if ((wait & M_ZERO)) - bzero(ret, bytes); - return (ret); -} - -void -uma_small_free(void *mem, int size, u_int8_t flags) -{ - pd_entry_t *pd; - pt_entry_t *pt; - - if (flags & UMA_SLAB_KMEM) - kmem_free(kmem_arena, (vm_offset_t)mem, size); - else { - struct arm_small_page *sp; - - if ((vm_offset_t)mem >= KERNBASE) { - mtx_lock(&smallalloc_mtx); - sp = TAILQ_FIRST(&free_pgdesc); - KASSERT(sp != NULL, ("No more free page descriptor ?")); - TAILQ_REMOVE(&free_pgdesc, sp, pg_list); - sp->addr = mem; - pmap_get_pde_pte(kernel_pmap, (vm_offset_t)mem, &pd, - &pt); - if ((*pd & pte_l1_s_cache_mask) == - pte_l1_s_cache_mode_pt && - pte_l1_s_cache_mode_pt != pte_l1_s_cache_mode) - TAILQ_INSERT_HEAD(&pages_wt, sp, pg_list); - else - TAILQ_INSERT_HEAD(&pages_normal, sp, pg_list); - mtx_unlock(&smallalloc_mtx); - } else { - vm_page_t m; - vm_paddr_t pa = vtophys((vm_offset_t)mem); - - m = PHYS_TO_VM_PAGE(pa); - m->wire_count--; - vm_page_free(m); - atomic_subtract_int(&cnt.v_wire_count, 1); - } - } -} - -#endif Modified: stable/10/sys/arm/conf/AVILA ============================================================================== --- stable/10/sys/arm/conf/AVILA Thu May 15 18:53:02 2014 (r266174) +++ stable/10/sys/arm/conf/AVILA Thu May 15 19:09:31 2014 (r266175) @@ -24,7 +24,6 @@ include "../xscale/ixp425/std.ixp425" # NB: memory mapping is defined in std.avila include "../xscale/ixp425/std.avila" options XSCALE_CACHE_READ_WRITE_ALLOCATE -#options ARM_USE_SMALL_ALLOC #To statically compile in device wiring instead of /boot/device.hints hints "AVILA.hints" #Default places to look for devices. makeoptions MODULES_OVERRIDE="" Modified: stable/10/sys/arm/conf/CAMBRIA ============================================================================== --- stable/10/sys/arm/conf/CAMBRIA Thu May 15 18:53:02 2014 (r266174) +++ stable/10/sys/arm/conf/CAMBRIA Thu May 15 19:09:31 2014 (r266175) @@ -24,7 +24,6 @@ include "../xscale/ixp425/std.ixp435" # NB: memory mapping is defined in std.avila include "../xscale/ixp425/std.avila" options XSCALE_CACHE_READ_WRITE_ALLOCATE -#options ARM_USE_SMALL_ALLOC #To statically compile in device wiring instead of /boot/device.hints hints "CAMBRIA.hints" # Default places to look for devices. Modified: stable/10/sys/arm/conf/CNS11XXNAS ============================================================================== --- stable/10/sys/arm/conf/CNS11XXNAS Thu May 15 18:53:02 2014 (r266174) +++ stable/10/sys/arm/conf/CNS11XXNAS Thu May 15 19:09:31 2014 (r266175) @@ -102,7 +102,6 @@ device loop device md device random # Entropy device -#options ARM_USE_SMALL_ALLOC device usb #options USB_DEBUG Modified: stable/10/sys/arm/conf/CRB ============================================================================== --- stable/10/sys/arm/conf/CRB Thu May 15 18:53:02 2014 (r266174) +++ stable/10/sys/arm/conf/CRB Thu May 15 19:09:31 2014 (r266175) @@ -106,6 +106,5 @@ device md device random # Entropy device device iopwdog -options ARM_USE_SMALL_ALLOC # Floppy drives Modified: stable/10/sys/arm/conf/EP80219 ============================================================================== --- stable/10/sys/arm/conf/EP80219 Thu May 15 18:53:02 2014 (r266174) +++ stable/10/sys/arm/conf/EP80219 Thu May 15 19:09:31 2014 (r266175) @@ -101,7 +101,6 @@ options XSCALE_CACHE_READ_WRITE_ALLOCAT device md device random # Entropy device -options ARM_USE_SMALL_ALLOC # Floppy drives options INCLUDE_CONFIG_FILE # Include this file in kernel Modified: stable/10/sys/arm/conf/IQ31244 ============================================================================== --- stable/10/sys/arm/conf/IQ31244 Thu May 15 18:53:02 2014 (r266174) +++ stable/10/sys/arm/conf/IQ31244 Thu May 15 19:09:31 2014 (r266175) @@ -106,6 +106,5 @@ options XSCALE_CACHE_READ_WRITE_ALLOCAT device md device random # Entropy device -options ARM_USE_SMALL_ALLOC # Floppy drives Modified: stable/10/sys/arm/conf/NSLU ============================================================================== --- stable/10/sys/arm/conf/NSLU Thu May 15 18:53:02 2014 (r266174) +++ stable/10/sys/arm/conf/NSLU Thu May 15 19:09:31 2014 (r266175) @@ -105,8 +105,6 @@ device loop device md device random # Entropy device -#options ARM_USE_SMALL_ALLOC - device usb options USB_DEBUG device ohci Modified: stable/10/sys/arm/include/pmap.h ============================================================================== --- stable/10/sys/arm/include/pmap.h Thu May 15 18:53:02 2014 (r266174) +++ stable/10/sys/arm/include/pmap.h Thu May 15 19:09:31 2014 (r266175) @@ -708,17 +708,6 @@ extern char *_tmppt; void pmap_postinit(void); -#ifdef ARM_USE_SMALL_ALLOC -void arm_add_smallalloc_pages(void *, void *, int, int); -vm_offset_t arm_ptovirt(vm_paddr_t); -void arm_init_smallalloc(void); -struct arm_small_page { - void *addr; - TAILQ_ENTRY(arm_small_page) pg_list; -}; - -#endif - extern vm_paddr_t dump_avail[]; #endif /* _KERNEL */ Modified: stable/10/sys/arm/include/sf_buf.h ============================================================================== --- stable/10/sys/arm/include/sf_buf.h Thu May 15 18:53:02 2014 (r266174) +++ stable/10/sys/arm/include/sf_buf.h Thu May 15 19:09:31 2014 (r266175) @@ -29,33 +29,10 @@ #ifndef _MACHINE_SF_BUF_H_ #define _MACHINE_SF_BUF_H_ +#include struct vm_page; -#ifdef ARM_USE_SMALL_ALLOC - -#include -#include -#include - -struct sf_buf; - -static __inline vm_offset_t -sf_buf_kva(struct sf_buf *sf) -{ - return arm_ptovirt(VM_PAGE_TO_PHYS((vm_page_t)sf)); -} - -static __inline vm_page_t -sf_buf_page(struct sf_buf *sf) -{ - return ((vm_page_t)sf); -} - -#else - -#include - struct sf_buf { LIST_ENTRY(sf_buf) list_entry; /* list of buffers */ TAILQ_ENTRY(sf_buf) free_entry; /* list of buffers */ @@ -78,8 +55,6 @@ sf_buf_page(struct sf_buf *sf) return (sf->m); } -#endif - struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags); void sf_buf_free(struct sf_buf *sf); Modified: stable/10/sys/arm/include/vmparam.h ============================================================================== --- stable/10/sys/arm/include/vmparam.h Thu May 15 18:53:02 2014 (r266174) +++ stable/10/sys/arm/include/vmparam.h Thu May 15 19:09:31 2014 (r266175) @@ -82,15 +82,15 @@ #define VM_PHYSSEG_DENSE /* - * Create three free page pools: VM_FREEPOOL_DEFAULT is the default pool - * from which physical pages are allocated and VM_FREEPOOL_DIRECT is - * the pool from which physical pages for small UMA objects are - * allocated. + * Create two free page pools. Since the ARM kernel virtual address + * space does not include a mapping onto the machine's entire physical + * memory, VM_FREEPOOL_DIRECT is defined as an alias for the default + * pool, VM_FREEPOOL_DEFAULT. */ -#define VM_NFREEPOOL 3 -#define VM_FREEPOOL_CACHE 2 +#define VM_NFREEPOOL 2 +#define VM_FREEPOOL_CACHE 1 #define VM_FREEPOOL_DEFAULT 0 -#define VM_FREEPOOL_DIRECT 1 +#define VM_FREEPOOL_DIRECT 0 /* * we support 2 free lists: @@ -126,23 +126,9 @@ #define UPT_MIN_ADDRESS VADDR(UPTPTDI, 0) #define VM_MIN_ADDRESS (0x00001000) -#ifdef ARM_USE_SMALL_ALLOC -/* - * ARM_KERN_DIRECTMAP is used to make sure there's enough space between - * VM_MAXUSER_ADDRESS and KERNBASE to map the whole memory. - * It has to be a compile-time constant, even if arm_init_smallalloc(), - * which will do the mapping, gets the real amount of memory at runtime, - * because VM_MAXUSER_ADDRESS is a constant. - */ -#ifndef ARM_KERN_DIRECTMAP -#define ARM_KERN_DIRECTMAP 512 * 1024 * 1024 /* 512 MB */ -#endif -#define VM_MAXUSER_ADDRESS KERNBASE - ARM_KERN_DIRECTMAP -#else /* ARM_USE_SMALL_ALLOC */ #ifndef VM_MAXUSER_ADDRESS #define VM_MAXUSER_ADDRESS KERNBASE #endif /* VM_MAXUSER_ADDRESS */ -#endif /* ARM_USE_SMALL_ALLOC */ #define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS #define USRSTACK VM_MAXUSER_ADDRESS @@ -176,10 +162,6 @@ VM_MIN_KERNEL_ADDRESS + 1) * 2 / 5) #endif -#ifdef ARM_USE_SMALL_ALLOC -#define UMA_MD_SMALL_ALLOC -#endif /* ARM_USE_SMALL_ALLOC */ - extern vm_offset_t vm_max_kernel_address; #define ZERO_REGION_SIZE (64 * 1024) /* 64KB */ Modified: stable/10/sys/arm/xscale/i80321/ep80219_machdep.c ============================================================================== --- stable/10/sys/arm/xscale/i80321/ep80219_machdep.c Thu May 15 18:53:02 2014 (r266174) +++ stable/10/sys/arm/xscale/i80321/ep80219_machdep.c Thu May 15 19:09:31 2014 (r266175) @@ -231,21 +231,6 @@ initarm(struct arm_boot_params *abp) valloc_pages(kernelstack, KSTACK_PAGES); alloc_pages(minidataclean.pv_pa, 1); valloc_pages(msgbufpv, round_page(msgbufsize) / PAGE_SIZE); -#ifdef ARM_USE_SMALL_ALLOC - freemempos -= PAGE_SIZE; - freemem_pt = trunc_page(freemem_pt); - freemem_after = freemempos - ((freemem_pt - 0xa0100000) / - PAGE_SIZE) * sizeof(struct arm_small_page); - arm_add_smallalloc_pages((void *)(freemem_after + 0x20000000), - (void *)0xc0100000, freemem_pt - 0xa0100000, 1); - freemem_after -= ((freemem_after - 0xa0001000) / PAGE_SIZE) * - sizeof(struct arm_small_page); - arm_add_smallalloc_pages((void *)(freemem_after + 0x20000000), - (void *)0xc0001000, trunc_page(freemem_after) - 0xa0001000, 0); - - freemempos = trunc_page(freemem_after); - freemempos -= PAGE_SIZE; -#endif /* * Allocate memory for the l1 and l2 page tables. The scheme to avoid * wasting memory by allocating the l1pt on the first 16k memory was @@ -285,15 +270,6 @@ initarm(struct arm_boot_params *abp) VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); -#ifdef ARM_USE_SMALL_ALLOC - if ((freemem_after + 2 * PAGE_SIZE) <= afterkern) { - arm_add_smallalloc_pages((void *)(freemem_after), - (void*)(freemem_after + PAGE_SIZE), - afterkern - (freemem_after + PAGE_SIZE), 0); - - } -#endif - /* Map the Mini-Data cache clean area. */ xscale_setup_minidata(l1pagetable, afterkern, minidataclean.pv_pa); @@ -359,10 +335,6 @@ initarm(struct arm_boot_params *abp) arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL); pmap_curmaxkvaddr = afterkern + PAGE_SIZE; - /* - * ARM_USE_SMALL_ALLOC uses dump_avail, so it must be filled before - * calling pmap_bootstrap. - */ dump_avail[0] = 0xa0000000; dump_avail[1] = 0xa0000000 + memsize; dump_avail[2] = 0; @@ -375,13 +347,6 @@ initarm(struct arm_boot_params *abp) mutex_init(); i = 0; -#ifdef ARM_USE_SMALL_ALLOC - phys_avail[i++] = 0xa0000000; - phys_avail[i++] = 0xa0001000; /* - *XXX: Gross hack to get our - * pages in the vm_page_array - . */ -#endif phys_avail[i++] = round_page(virtual_avail - KERNBASE + IQ80321_SDRAM_START); phys_avail[i++] = trunc_page(0xa0000000 + memsize - 1); phys_avail[i++] = 0; Modified: stable/10/sys/arm/xscale/i80321/iq31244_machdep.c ============================================================================== --- stable/10/sys/arm/xscale/i80321/iq31244_machdep.c Thu May 15 18:53:02 2014 (r266174) +++ stable/10/sys/arm/xscale/i80321/iq31244_machdep.c Thu May 15 19:09:31 2014 (r266175) @@ -232,21 +232,6 @@ initarm(struct arm_boot_params *abp) valloc_pages(kernelstack, KSTACK_PAGES); alloc_pages(minidataclean.pv_pa, 1); valloc_pages(msgbufpv, round_page(msgbufsize) / PAGE_SIZE); -#ifdef ARM_USE_SMALL_ALLOC - freemempos -= PAGE_SIZE; - freemem_pt = trunc_page(freemem_pt); - freemem_after = freemempos - ((freemem_pt - 0xa0100000) / - PAGE_SIZE) * sizeof(struct arm_small_page); - arm_add_smallalloc_pages((void *)(freemem_after + 0x20000000), - (void *)0xc0100000, freemem_pt - 0xa0100000, 1); - freemem_after -= ((freemem_after - 0xa0001000) / PAGE_SIZE) * - sizeof(struct arm_small_page); - arm_add_smallalloc_pages((void *)(freemem_after + 0x20000000), - (void *)0xc0001000, trunc_page(freemem_after) - 0xa0001000, 0); - - freemempos = trunc_page(freemem_after); - freemempos -= PAGE_SIZE; -#endif /* * Allocate memory for the l1 and l2 page tables. The scheme to avoid * wasting memory by allocating the l1pt on the first 16k memory was @@ -286,15 +271,6 @@ initarm(struct arm_boot_params *abp) VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); -#ifdef ARM_USE_SMALL_ALLOC - if ((freemem_after + 2 * PAGE_SIZE) <= afterkern) { - arm_add_smallalloc_pages((void *)(freemem_after), - (void*)(freemem_after + PAGE_SIZE), - afterkern - (freemem_after + PAGE_SIZE), 0); - - } -#endif - /* Map the Mini-Data cache clean area. */ xscale_setup_minidata(l1pagetable, afterkern, minidataclean.pv_pa); @@ -360,10 +336,6 @@ initarm(struct arm_boot_params *abp) arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL); pmap_curmaxkvaddr = afterkern + PAGE_SIZE; - /* - * ARM_USE_SMALL_ALLOC uses dump_avail, so it must be filled before - * calling pmap_bootstrap. - */ dump_avail[0] = 0xa0000000; dump_avail[1] = 0xa0000000 + memsize; dump_avail[2] = 0; @@ -376,13 +348,6 @@ initarm(struct arm_boot_params *abp) mutex_init(); i = 0; -#ifdef ARM_USE_SMALL_ALLOC - phys_avail[i++] = 0xa0000000; - phys_avail[i++] = 0xa0001000; /* - *XXX: Gross hack to get our - * pages in the vm_page_array - . */ -#endif phys_avail[i++] = round_page(virtual_avail - KERNBASE + SDRAM_START); phys_avail[i++] = trunc_page(0xa0000000 + memsize - 1); phys_avail[i++] = 0; Modified: stable/10/sys/arm/xscale/i8134x/crb_machdep.c ============================================================================== --- stable/10/sys/arm/xscale/i8134x/crb_machdep.c Thu May 15 18:53:02 2014 (r266174) +++ stable/10/sys/arm/xscale/i8134x/crb_machdep.c Thu May 15 19:09:31 2014 (r266175) @@ -230,22 +230,6 @@ initarm(struct arm_boot_params *abp) valloc_pages(undstack, UND_STACK_SIZE); valloc_pages(kernelstack, KSTACK_PAGES); valloc_pages(msgbufpv, round_page(msgbufsize) / PAGE_SIZE); -#ifdef ARM_USE_SMALL_ALLOC - freemempos -= PAGE_SIZE; - freemem_pt = trunc_page(freemem_pt); - freemem_after = freemempos - ((freemem_pt - 0x00100000) / - PAGE_SIZE) * sizeof(struct arm_small_page); - arm_add_smallalloc_pages((void *)(freemem_after + 0xc0000000) - , (void *)0xc0100000, freemem_pt - 0x00100000, 1); - freemem_after -= ((freemem_after - 0x00001000) / PAGE_SIZE) * - sizeof(struct arm_small_page); -#if 0 - arm_add_smallalloc_pages((void *)(freemem_after + 0xc0000000) - , (void *)0xc0001000, trunc_page(freemem_after) - 0x00001000, 0); -#endif - freemempos = trunc_page(freemem_after); - freemempos -= PAGE_SIZE; -#endif /* * Now we start construction of the L1 page table * We start by mapping the L2 page tables into the L1. @@ -274,15 +258,6 @@ initarm(struct arm_boot_params *abp) } -#ifdef ARM_USE_SMALL_ALLOC - if ((freemem_after + 2 * PAGE_SIZE) <= afterkern) { - arm_add_smallalloc_pages((void *)(freemem_after), - (void*)(freemem_after + PAGE_SIZE), - afterkern - (freemem_after + PAGE_SIZE), 0); - - } -#endif - /* Map the vector page. */ pmap_map_entry(l1pagetable, ARM_VECTORS_HIGH, systempage.pv_pa, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); @@ -338,10 +313,7 @@ initarm(struct arm_boot_params *abp) arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL); pmap_curmaxkvaddr = afterkern + PAGE_SIZE; - /* - * ARM_USE_SMALL_ALLOC uses dump_avail, so it must be filled before - * calling pmap_bootstrap. - */ + dump_avail[0] = 0x00000000; dump_avail[1] = 0x00000000 + memsize; dump_avail[2] = 0; @@ -354,13 +326,6 @@ initarm(struct arm_boot_params *abp) mutex_init(); i = 0; -#ifdef ARM_USE_SMALL_ALLOC - phys_avail[i++] = 0x00001000; - phys_avail[i++] = 0x00002000; /* - *XXX: Gross hack to get our - * pages in the vm_page_array - . */ -#endif phys_avail[i++] = round_page(virtual_avail - KERNBASE + SDRAM_START); phys_avail[i++] = trunc_page(0x00000000 + memsize - 1); phys_avail[i++] = 0; Modified: stable/10/sys/arm/xscale/ixp425/avila_machdep.c ============================================================================== --- stable/10/sys/arm/xscale/ixp425/avila_machdep.c Thu May 15 18:53:02 2014 (r266174) +++ stable/10/sys/arm/xscale/ixp425/avila_machdep.c Thu May 15 19:09:31 2014 (r266175) @@ -301,24 +301,6 @@ initarm(struct arm_boot_params *abp) valloc_pages(kernelstack, KSTACK_PAGES); alloc_pages(minidataclean.pv_pa, 1); valloc_pages(msgbufpv, round_page(msgbufsize) / PAGE_SIZE); -#ifdef ARM_USE_SMALL_ALLOC - freemempos -= PAGE_SIZE; - freemem_pt = trunc_page(freemem_pt); - freemem_after = freemempos - ((freemem_pt - (PHYSADDR + 0x100000)) / - PAGE_SIZE) * sizeof(struct arm_small_page); - arm_add_smallalloc_pages( - (void *)(freemem_after + (KERNVIRTADDR - KERNPHYSADDR)), - (void *)0xc0100000, - freemem_pt - (PHYSADDR + 0x100000), 1); - freemem_after -= ((freemem_after - (PHYSADDR + 0x1000)) / PAGE_SIZE) * - sizeof(struct arm_small_page); - arm_add_smallalloc_pages( - (void *)(freemem_after + (KERNVIRTADDR - KERNPHYSADDR)), - (void *)0xc0001000, - trunc_page(freemem_after) - (PHYSADDR + 0x1000), 0); - freemempos = trunc_page(freemem_after); - freemempos -= PAGE_SIZE; -#endif /* * Now construct the L1 page table. First map the L2 @@ -354,14 +336,6 @@ initarm(struct arm_boot_params *abp) pmap_map_entry(l1pagetable, afterkern, minidataclean.pv_pa, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); -#ifdef ARM_USE_SMALL_ALLOC - if ((freemem_after + 2 * PAGE_SIZE) <= afterkern) { - arm_add_smallalloc_pages((void *)(freemem_after), - (void*)(freemem_after + PAGE_SIZE), - afterkern - (freemem_after + PAGE_SIZE), 0); - - } -#endif /* Map the Mini-Data cache clean area. */ xscale_setup_minidata(l1pagetable, afterkern, @@ -442,13 +416,6 @@ initarm(struct arm_boot_params *abp) mutex_init(); i = 0; -#ifdef ARM_USE_SMALL_ALLOC - phys_avail[i++] = PHYSADDR; - phys_avail[i++] = PHYSADDR + PAGE_SIZE; /* - *XXX: Gross hack to get our - * pages in the vm_page_array. - */ -#endif phys_avail[i++] = round_page(virtual_avail - KERNBASE + PHYSADDR); phys_avail[i++] = trunc_page(PHYSADDR + memsize - 1); phys_avail[i++] = 0; Modified: stable/10/sys/arm/xscale/pxa/pxa_machdep.c ============================================================================== --- stable/10/sys/arm/xscale/pxa/pxa_machdep.c Thu May 15 18:53:02 2014 (r266174) +++ stable/10/sys/arm/xscale/pxa/pxa_machdep.c Thu May 15 19:09:31 2014 (r266175) @@ -213,20 +213,6 @@ initarm(struct arm_boot_params *abp) valloc_pages(kernelstack, KSTACK_PAGES); alloc_pages(minidataclean.pv_pa, 1); valloc_pages(msgbufpv, round_page(msgbufsize) / PAGE_SIZE); -#ifdef ARM_USE_SMALL_ALLOC - freemempos -= PAGE_SIZE; - freemem_pt = trunc_page(freemem_pt); - freemem_after = freemempos - ((freemem_pt - 0xa0100000) / - PAGE_SIZE) * sizeof(struct arm_small_page); - arm_add_smallalloc_pages((void *)(freemem_after + 0x20000000) - , (void *)0xc0100000, freemem_pt - 0xa0100000, 1); - freemem_after -= ((freemem_after - 0xa0001000) / PAGE_SIZE) * - sizeof(struct arm_small_page); - arm_add_smallalloc_pages((void *)(freemem_after + 0x20000000) - , (void *)0xc0001000, trunc_page(freemem_after) - 0xa0001000, 0); - freemempos = trunc_page(freemem_after); - freemempos -= PAGE_SIZE; -#endif /* * Allocate memory for the l1 and l2 page tables. The scheme to avoid * wasting memory by allocating the l1pt on the first 16k memory was @@ -267,13 +253,6 @@ initarm(struct arm_boot_params *abp) pmap_map_entry(l1pagetable, afterkern, minidataclean.pv_pa, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); -#ifdef ARM_USE_SMALL_ALLOC - if ((freemem_after + 2 * PAGE_SIZE) <= afterkern) { - arm_add_smallalloc_pages((void *)(freemem_after), - (void*)(freemem_after + PAGE_SIZE), - afterkern - (freemem_after + PAGE_SIZE), 0); - } -#endif /* Map the Mini-Data cache clean area. */ xscale_setup_minidata(l1pagetable, afterkern, @@ -350,10 +329,6 @@ initarm(struct arm_boot_params *abp) arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL); pmap_curmaxkvaddr = afterkern + PAGE_SIZE; - /* - * ARM USE_SMALL_ALLOC uses dump_avail, so it must be filled before - * calling pmap_bootstrap. - */ i = 0; for (j = 0; j < PXA2X0_SDRAM_BANKS; j++) { if (memsize[j] > 0) { @@ -371,13 +346,6 @@ initarm(struct arm_boot_params *abp) mutex_init(); i = 0; -#ifdef ARM_USE_SMALL_ALLOC - phys_avail[i++] = 0xa0000000; - phys_avail[i++] = 0xa0001000; /* - *XXX: Gross hack to get our - * pages in the vm_page_array - . */ -#endif *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu May 15 19:28:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C7EE8117; Thu, 15 May 2014 19:28:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B4E322AEE; Thu, 15 May 2014 19:28:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FJSqsh060676; Thu, 15 May 2014 19:28:52 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FJSqF5060675; Thu, 15 May 2014 19:28:52 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405151928.s4FJSqF5060675@svn.freebsd.org> From: Ian Lepore Date: Thu, 15 May 2014 19:28:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266178 - stable/10/sys/arm/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 19:28:52 -0000 Author: ian Date: Thu May 15 19:28:52 2014 New Revision: 266178 URL: http://svnweb.freebsd.org/changeset/base/266178 Log: MFC r256672 If we avoid to use the page at addr 0, we should adjust the size to reflect it. Modified: stable/10/sys/arm/arm/machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/machdep.c ============================================================================== --- stable/10/sys/arm/arm/machdep.c Thu May 15 19:26:20 2014 (r266177) +++ stable/10/sys/arm/arm/machdep.c Thu May 15 19:28:52 2014 (r266178) @@ -1169,11 +1169,15 @@ physmap_init(struct mem_region *availmem */ if (availmem_regions[i].mr_start > 0 || availmem_regions[i].mr_size > PAGE_SIZE) { + vm_size_t size; phys_avail[j] = availmem_regions[i].mr_start; - if (phys_avail[j] == 0) + + size = availmem_regions[i].mr_size; + if (phys_avail[j] == 0) { phys_avail[j] += PAGE_SIZE; - phys_avail[j + 1] = availmem_regions[i].mr_start + - availmem_regions[i].mr_size; + size -= PAGE_SIZE; + } + phys_avail[j + 1] = availmem_regions[i].mr_start + size; } else j -= 2; } From owner-svn-src-stable@FreeBSD.ORG Thu May 15 20:01:22 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4FF13C7A; Thu, 15 May 2014 20:01:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B1822DED; Thu, 15 May 2014 20:01:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FK1M2J076371; Thu, 15 May 2014 20:01:22 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FK1L50076365; Thu, 15 May 2014 20:01:21 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405152001.s4FK1L50076365@svn.freebsd.org> From: Michael Tuexen Date: Thu, 15 May 2014 20:01:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266181 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 20:01:22 -0000 Author: tuexen Date: Thu May 15 20:01:21 2014 New Revision: 266181 URL: http://svnweb.freebsd.org/changeset/base/266181 Log: MFC r263237: * Provide information in error causes in ASCII instead of proprietary binary format. * Add support for a diagnostic information error cause. The code is sysctlable and the default is 0, which means it is not sent. This is joint work with rrs@. Modified: stable/9/sys/netinet/sctp.h stable/9/sys/netinet/sctp_constants.h stable/9/sys/netinet/sctp_indata.c stable/9/sys/netinet/sctp_input.c stable/9/sys/netinet/sctp_output.c stable/9/sys/netinet/sctp_pcb.c stable/9/sys/netinet/sctp_sysctl.c stable/9/sys/netinet/sctp_sysctl.h stable/9/sys/netinet/sctp_timer.c stable/9/sys/netinet/sctp_usrreq.c stable/9/sys/netinet/sctputil.c stable/9/sys/netinet/sctputil.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp.h ============================================================================== --- stable/9/sys/netinet/sctp.h Thu May 15 19:48:52 2014 (r266180) +++ stable/9/sys/netinet/sctp.h Thu May 15 20:01:21 2014 (r266181) @@ -365,6 +365,12 @@ struct sctp_paramhdr { /* * error cause parameters (user visible) */ +struct sctp_gen_error_cause { + uint16_t code; + uint16_t length; + uint8_t info[]; +} SCTP_PACKED; + struct sctp_error_cause { uint16_t code; uint16_t length; Modified: stable/9/sys/netinet/sctp_constants.h ============================================================================== --- stable/9/sys/netinet/sctp_constants.h Thu May 15 19:48:52 2014 (r266180) +++ stable/9/sys/netinet/sctp_constants.h Thu May 15 20:01:21 2014 (r266181) @@ -771,6 +771,9 @@ __FBSDID("$FreeBSD$"); */ #define SCTP_DEFAULT_SPLIT_POINT_MIN 2904 +/* Maximum length of diagnostic information in error causes */ +#define SCTP_DIAG_INFO_LEN 64 + /* ABORT CODES and other tell-tale location * codes are generated by adding the below * to the instance id. Modified: stable/9/sys/netinet/sctp_indata.c ============================================================================== --- stable/9/sys/netinet/sctp_indata.c Thu May 15 19:48:52 2014 (r266180) +++ stable/9/sys/netinet/sctp_indata.c Thu May 15 20:01:21 2014 (r266181) @@ -561,7 +561,8 @@ sctp_queue_data_to_stream(struct sctp_tc struct sctp_queued_to_read *at; int queue_needed; uint16_t nxt_todel; - struct mbuf *oper; + struct mbuf *op_err; + char msg[SCTP_DIAG_INFO_LEN]; queue_needed = 1; asoc->size_on_all_streams += control->length; @@ -578,7 +579,7 @@ sctp_queue_data_to_stream(struct sctp_tc (uint32_t) nxt_todel); if (SCTP_SSN_GE(strm->last_sequence_delivered, control->sinfo_ssn)) { /* The incoming sseq is behind where we last delivered? */ - SCTPDBG(SCTP_DEBUG_INDATA1, "Duplicate S-SEQ:%d delivered:%d from peer, Abort association\n", + SCTPDBG(SCTP_DEBUG_INDATA1, "Duplicate S-SEQ:%d delivered:%d from peer, Abort association\n", control->sinfo_ssn, strm->last_sequence_delivered); protocol_error: /* @@ -586,26 +587,12 @@ protocol_error: * association destruction */ TAILQ_INSERT_HEAD(&strm->inqueue, control, next); - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_DONTWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = sizeof(struct sctp_paramhdr) + - (sizeof(uint32_t) * 3); - ph = mtod(oper, struct sctp_paramhdr *); - ph->param_type = htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_1); - ippp++; - *ippp = control->sinfo_tsn; - ippp++; - *ippp = ((control->sinfo_stream << 16) | control->sinfo_ssn); - } + snprintf(msg, sizeof(msg), "Delivered SSN=%4.4x, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + strm->last_sequence_delivered, control->sinfo_tsn, + control->sinfo_stream, control->sinfo_ssn); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_1; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; @@ -839,7 +826,9 @@ static void sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc, struct sctp_tmit_chunk *chk, int *abort_flag) { - struct mbuf *oper; + struct mbuf *op_err; + char msg[SCTP_DIAG_INFO_LEN]; + uint32_t cum_ackp1, prev_tsn, post_tsn; struct sctp_tmit_chunk *at, *prev, *next; @@ -864,30 +853,14 @@ sctp_queue_data_for_reasm(struct sctp_tc * a FIRST fragment mark. */ SCTPDBG(SCTP_DEBUG_INDATA1, "Gak, Evil plot, its not first, no fragmented delivery in progress\n"); - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_DONTWAIT, 1, MT_DATA); - - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = - sizeof(struct sctp_paramhdr) + - (sizeof(uint32_t) * 3); - ph = mtod(oper, struct sctp_paramhdr *); - ph->param_type = - htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_2); - ippp++; - *ippp = chk->rec.data.TSN_seq; - ippp++; - *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); - - } + snprintf(msg, sizeof(msg), + "Expected B-bit for TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + chk->rec.data.TSN_seq, + chk->rec.data.stream_number, + chk->rec.data.stream_seq); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_2; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; } else if (asoc->fragmented_delivery_inprogress && (chk->rec.data.rcv_flags & SCTP_DATA_FIRST_FRAG) == SCTP_DATA_FIRST_FRAG) { @@ -897,28 +870,14 @@ sctp_queue_data_for_reasm(struct sctp_tc * MIDDLE fragment NOT a FIRST */ SCTPDBG(SCTP_DEBUG_INDATA1, "Gak, Evil plot, it IS a first and fragmented delivery in progress\n"); - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_DONTWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = - sizeof(struct sctp_paramhdr) + - (3 * sizeof(uint32_t)); - ph = mtod(oper, struct sctp_paramhdr *); - ph->param_type = - htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_3); - ippp++; - *ippp = chk->rec.data.TSN_seq; - ippp++; - *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); - } + snprintf(msg, sizeof(msg), + "Didn't expect B-bit for TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + chk->rec.data.TSN_seq, + chk->rec.data.stream_number, + chk->rec.data.stream_seq); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_3; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; } else if (asoc->fragmented_delivery_inprogress) { /* @@ -931,30 +890,15 @@ sctp_queue_data_for_reasm(struct sctp_tc SCTPDBG(SCTP_DEBUG_INDATA1, "Gak, Evil plot, it IS not same stream number %d vs %d\n", chk->rec.data.stream_number, asoc->str_of_pdapi); - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_DONTWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = - sizeof(struct sctp_paramhdr) + - (sizeof(uint32_t) * 3); - ph = mtod(oper, - struct sctp_paramhdr *); - ph->param_type = - htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = - htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_4); - ippp++; - *ippp = chk->rec.data.TSN_seq; - ippp++; - *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); - } + snprintf(msg, sizeof(msg), + "Expected SID=%4.4x, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + asoc->str_of_pdapi, + chk->rec.data.TSN_seq, + chk->rec.data.stream_number, + chk->rec.data.stream_seq); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_4; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; } else if ((asoc->fragment_flags & SCTP_DATA_UNORDERED) != SCTP_DATA_UNORDERED && @@ -963,31 +907,15 @@ sctp_queue_data_for_reasm(struct sctp_tc SCTPDBG(SCTP_DEBUG_INDATA1, "Gak, Evil plot, it IS not same stream seq %d vs %d\n", chk->rec.data.stream_seq, asoc->ssn_of_pdapi); - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_DONTWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = - sizeof(struct sctp_paramhdr) + - (3 * sizeof(uint32_t)); - ph = mtod(oper, - struct sctp_paramhdr *); - ph->param_type = - htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = - htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_5); - ippp++; - *ippp = chk->rec.data.TSN_seq; - ippp++; - *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); - - } + snprintf(msg, sizeof(msg), + "Expected SSN=%4.4x, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + asoc->ssn_of_pdapi, + chk->rec.data.TSN_seq, + chk->rec.data.stream_number, + chk->rec.data.stream_seq); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_5; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; } } @@ -1057,31 +985,14 @@ sctp_queue_data_for_reasm(struct sctp_tc SCTP_DATA_FIRST_FRAG) { SCTPDBG(SCTP_DEBUG_INDATA1, "Prev check - It can be a midlle or last but not a first\n"); SCTPDBG(SCTP_DEBUG_INDATA1, "Gak, Evil plot, it's a FIRST!\n"); - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_DONTWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = - sizeof(struct sctp_paramhdr) + - (3 * sizeof(uint32_t)); - ph = mtod(oper, - struct sctp_paramhdr *); - ph->param_type = - htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = - htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_6); - ippp++; - *ippp = chk->rec.data.TSN_seq; - ippp++; - *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); - - } + snprintf(msg, sizeof(msg), + "Can't handle B-bit, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + chk->rec.data.TSN_seq, + chk->rec.data.stream_number, + chk->rec.data.stream_seq); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_6; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1091,33 +1002,18 @@ sctp_queue_data_for_reasm(struct sctp_tc * Huh, need the correct STR here, * they must be the same. */ - SCTP_PRINTF("Prev check - Gak, Evil plot, ssn:%d not the same as at:%d\n", + SCTP_PRINTF("Prev check - Gak, Evil plot, sid:%d not the same as at:%d\n", chk->rec.data.stream_number, prev->rec.data.stream_number); - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_DONTWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = - sizeof(struct sctp_paramhdr) + - (3 * sizeof(uint32_t)); - ph = mtod(oper, - struct sctp_paramhdr *); - ph->param_type = - htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = - htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_7); - ippp++; - *ippp = chk->rec.data.TSN_seq; - ippp++; - *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); - } + snprintf(msg, sizeof(msg), + "Expect SID=%4.4x, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + prev->rec.data.stream_number, + chk->rec.data.TSN_seq, + chk->rec.data.stream_number, + chk->rec.data.stream_seq); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_7; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1131,30 +1027,15 @@ sctp_queue_data_for_reasm(struct sctp_tc SCTPDBG(SCTP_DEBUG_INDATA1, "Prev check - Gak, Evil plot, sseq:%d not the same as at:%d\n", chk->rec.data.stream_seq, prev->rec.data.stream_seq); - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_DONTWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = - sizeof(struct sctp_paramhdr) + - (3 * sizeof(uint32_t)); - ph = mtod(oper, - struct sctp_paramhdr *); - ph->param_type = - htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = - htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_8); - ippp++; - *ippp = chk->rec.data.TSN_seq; - ippp++; - *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); - } + snprintf(msg, sizeof(msg), + "Expect SSN=%4.4x, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + prev->rec.data.stream_seq, + chk->rec.data.TSN_seq, + chk->rec.data.stream_number, + chk->rec.data.stream_seq); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_8; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1164,31 +1045,14 @@ sctp_queue_data_for_reasm(struct sctp_tc if ((chk->rec.data.rcv_flags & SCTP_DATA_FRAG_MASK) != SCTP_DATA_FIRST_FRAG) { SCTPDBG(SCTP_DEBUG_INDATA1, "Prev check - Gak, evil plot, its not FIRST and it must be!\n"); - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_DONTWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = - sizeof(struct sctp_paramhdr) + - (3 * sizeof(uint32_t)); - ph = mtod(oper, - struct sctp_paramhdr *); - ph->param_type = - htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = - htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_9); - ippp++; - *ippp = chk->rec.data.TSN_seq; - ippp++; - *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); - - } + snprintf(msg, sizeof(msg), + "Expect B-bit, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + chk->rec.data.TSN_seq, + chk->rec.data.stream_number, + chk->rec.data.stream_seq); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_9; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1208,30 +1072,14 @@ sctp_queue_data_for_reasm(struct sctp_tc != SCTP_DATA_LAST_FRAG) { SCTPDBG(SCTP_DEBUG_INDATA1, "Next chk - Next is FIRST, we must be LAST\n"); SCTPDBG(SCTP_DEBUG_INDATA1, "Gak, Evil plot, its not a last!\n"); - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_DONTWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = - sizeof(struct sctp_paramhdr) + - (3 * sizeof(uint32_t)); - ph = mtod(oper, - struct sctp_paramhdr *); - ph->param_type = - htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = - htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_10); - ippp++; - *ippp = chk->rec.data.TSN_seq; - ippp++; - *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); - } + snprintf(msg, sizeof(msg), + "Expect only E-bit, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + chk->rec.data.TSN_seq, + chk->rec.data.stream_number, + chk->rec.data.stream_seq); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_10; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1247,31 +1095,14 @@ sctp_queue_data_for_reasm(struct sctp_tc SCTP_DATA_LAST_FRAG) { SCTPDBG(SCTP_DEBUG_INDATA1, "Next chk - Next is a MIDDLE/LAST\n"); SCTPDBG(SCTP_DEBUG_INDATA1, "Gak, Evil plot, new prev chunk is a LAST\n"); - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_DONTWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = - sizeof(struct sctp_paramhdr) + - (3 * sizeof(uint32_t)); - ph = mtod(oper, - struct sctp_paramhdr *); - ph->param_type = - htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = - htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_11); - ippp++; - *ippp = chk->rec.data.TSN_seq; - ippp++; - *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); - - } + snprintf(msg, sizeof(msg), + "Didn't expect E-bit, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + chk->rec.data.TSN_seq, + chk->rec.data.stream_number, + chk->rec.data.stream_seq); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_11; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1284,31 +1115,15 @@ sctp_queue_data_for_reasm(struct sctp_tc SCTPDBG(SCTP_DEBUG_INDATA1, "Next chk - Gak, Evil plot, ssn:%d not the same as at:%d\n", chk->rec.data.stream_number, next->rec.data.stream_number); - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_DONTWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = - sizeof(struct sctp_paramhdr) + - (3 * sizeof(uint32_t)); - ph = mtod(oper, - struct sctp_paramhdr *); - ph->param_type = - htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = - htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_12); - ippp++; - *ippp = chk->rec.data.TSN_seq; - ippp++; - *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); - - } + snprintf(msg, sizeof(msg), + "Required SID %4.4x, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + next->rec.data.stream_number, + chk->rec.data.TSN_seq, + chk->rec.data.stream_number, + chk->rec.data.stream_seq); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_12; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1322,30 +1137,15 @@ sctp_queue_data_for_reasm(struct sctp_tc SCTPDBG(SCTP_DEBUG_INDATA1, "Next chk - Gak, Evil plot, sseq:%d not the same as at:%d\n", chk->rec.data.stream_seq, next->rec.data.stream_seq); - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_DONTWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = - sizeof(struct sctp_paramhdr) + - (3 * sizeof(uint32_t)); - ph = mtod(oper, - struct sctp_paramhdr *); - ph->param_type = - htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = - htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_13); - ippp++; - *ippp = chk->rec.data.TSN_seq; - ippp++; - *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); - } + snprintf(msg, sizeof(msg), + "Required SSN %4.4x, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + next->rec.data.stream_seq, + chk->rec.data.TSN_seq, + chk->rec.data.stream_number, + chk->rec.data.stream_seq); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_13; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1430,7 +1230,8 @@ sctp_process_a_data_chunk(struct sctp_tc int the_len; int need_reasm_check = 0; uint16_t strmno, strmseq; - struct mbuf *oper; + struct mbuf *op_err; + char msg[SCTP_DIAG_INFO_LEN]; struct sctp_queued_to_read *control; int ordered; uint32_t protocol_id; @@ -1497,15 +1298,12 @@ sctp_process_a_data_chunk(struct sctp_tc */ if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) || (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) || - (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET)) - ) { + (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET))) { /* * wait a minute, this guy is gone, there is no longer a * receiver. Send peer an ABORT! */ - struct mbuf *op_err; - - op_err = sctp_generate_invmanparam(SCTP_CAUSE_OUT_OF_RESC); + op_err = sctp_generate_cause(SCTP_CAUSE_OUT_OF_RESC, ""); sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return (0); @@ -1633,27 +1431,12 @@ sctp_process_a_data_chunk(struct sctp_tc /* The incoming sseq is behind where we last delivered? */ SCTPDBG(SCTP_DEBUG_INDATA1, "EVIL/Broken-Dup S-SEQ:%d delivered:%d from peer, Abort!\n", strmseq, asoc->strmin[strmno].last_sequence_delivered); - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_DONTWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = sizeof(struct sctp_paramhdr) + - (3 * sizeof(uint32_t)); - ph = mtod(oper, struct sctp_paramhdr *); - ph->param_type = htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_14); - ippp++; - *ippp = tsn; - ippp++; - *ippp = ((strmno << 16) | strmseq); - - } + snprintf(msg, sizeof(msg), "Delivered SSN=%4.4x, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + asoc->strmin[strmno].last_sequence_delivered, + tsn, strmno, strmseq); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_14; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return (0); } @@ -1892,28 +1675,11 @@ failed_pdapi_express_del: control->whoFrom = NULL; } sctp_free_a_readq(stcb, control); - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_DONTWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = - sizeof(struct sctp_paramhdr) + - (3 * sizeof(uint32_t)); - ph = mtod(oper, struct sctp_paramhdr *); - ph->param_type = - htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_15); - ippp++; - *ippp = tsn; - ippp++; - *ippp = ((strmno << 16) | strmseq); - } + snprintf(msg, sizeof(msg), "Reas. queue emtpy, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + tsn, strmno, strmseq); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_15; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return (0); } else { @@ -1925,31 +1691,11 @@ failed_pdapi_express_del: control->whoFrom = NULL; } sctp_free_a_readq(stcb, control); - - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_DONTWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = - sizeof(struct sctp_paramhdr) + - (3 * sizeof(uint32_t)); - ph = mtod(oper, - struct sctp_paramhdr *); - ph->param_type = - htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = - htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_16); - ippp++; - *ippp = tsn; - ippp++; - *ippp = ((strmno << 16) | strmseq); - } + snprintf(msg, sizeof(msg), "PD ongoing, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + tsn, strmno, strmseq); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_16; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return (0); } @@ -1971,30 +1717,11 @@ failed_pdapi_express_del: control->whoFrom = NULL; } sctp_free_a_readq(stcb, control); - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_DONTWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = - sizeof(struct sctp_paramhdr) + - (3 * sizeof(uint32_t)); - ph = mtod(oper, - struct sctp_paramhdr *); - ph->param_type = - htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = - htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_17); - ippp++; - *ippp = tsn; - ippp++; - *ippp = ((strmno << 16) | strmseq); - } + snprintf(msg, sizeof(msg), "No PD ongoing, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + tsn, strmno, strmseq); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_17; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return (0); } @@ -2601,26 +2328,11 @@ sctp_process_data(struct mbuf **mm, int * invalid data chunk. */ struct mbuf *op_err; + char msg[SCTP_DIAG_INFO_LEN]; - op_err = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 2 * sizeof(uint32_t)), - 0, M_DONTWAIT, 1, MT_DATA); - - if (op_err) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(op_err) = sizeof(struct sctp_paramhdr) + - (2 * sizeof(uint32_t)); - ph = mtod(op_err, struct sctp_paramhdr *); - ph->param_type = - htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = htons(SCTP_BUF_LEN(op_err)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_19); - ippp++; - *ippp = asoc->cumulative_tsn; - - } + snprintf(msg, sizeof(msg), "DATA chunk of length %d", + chk_length); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_19; sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, @@ -2688,7 +2400,7 @@ sctp_process_data(struct mbuf **mm, int if (SCTP_BASE_SYSCTL(sctp_strict_data_order)) { struct mbuf *op_err; - op_err = sctp_generate_invmanparam(SCTP_CAUSE_PROTOCOL_VIOLATION); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, ""); sctp_abort_association(inp, stcb, m, iphlen, src, dst, @@ -3837,7 +3549,8 @@ sctp_express_handle_sack(struct sctp_tcb } if (SCTP_TSN_GE(cumack, send_s)) { #ifndef INVARIANTS - struct mbuf *oper; + struct mbuf *op_err; + char msg[SCTP_DIAG_INFO_LEN]; #endif #ifdef INVARIANTS @@ -3846,22 +3559,11 @@ sctp_express_handle_sack(struct sctp_tcb *abort_now = 1; /* XXX */ - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + sizeof(uint32_t)), - 0, M_DONTWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = sizeof(struct sctp_paramhdr) + - sizeof(uint32_t); - ph = mtod(oper, struct sctp_paramhdr *); - ph->param_type = htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_25); - } + snprintf(msg, sizeof(msg), "Cum ack %8.8x greater or equal then TSN %8.8x", + cumack, send_s); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_25; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); return; #endif } @@ -4211,23 +3913,14 @@ again: (asoc->stream_queue_cnt == 0)) { if (asoc->state & SCTP_STATE_PARTIAL_MSG_LEFT) { /* Need to abort here */ - struct mbuf *oper; + struct mbuf *op_err; abort_out_now: *abort_now = 1; /* XXX */ - oper = sctp_get_mbuf_for_msg(sizeof(struct sctp_paramhdr), - 0, M_DONTWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - - SCTP_BUF_LEN(oper) = sizeof(struct sctp_paramhdr); - ph = mtod(oper, struct sctp_paramhdr *); - ph->param_type = htons(SCTP_CAUSE_USER_INITIATED_ABT); - ph->param_length = htons(SCTP_BUF_LEN(oper)); - } + op_err = sctp_generate_cause(SCTP_CAUSE_USER_INITIATED_ABT, ""); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_24; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); } else { struct sctp_nets *netp; @@ -4420,7 +4113,8 @@ sctp_handle_sack(struct mbuf *m, int off send_s = asoc->sending_seq; } if (SCTP_TSN_GE(cum_ack, send_s)) { - struct mbuf *oper; + struct mbuf *op_err; + char msg[SCTP_DIAG_INFO_LEN]; /* * no way, we have not even sent this TSN out yet. @@ -4435,22 +4129,11 @@ sctp_handle_sack(struct mbuf *m, int off hopeless_peer: *abort_now = 1; /* XXX */ - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + sizeof(uint32_t)), - 0, M_DONTWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = sizeof(struct sctp_paramhdr) + - sizeof(uint32_t); - ph = mtod(oper, struct sctp_paramhdr *); - ph->param_type = htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_25); - } + snprintf(msg, sizeof(msg), "Cum ack %8.8x greater or equal then TSN %8.8x", + cum_ack, send_s); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_25; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); return; } } @@ -4939,23 +4622,14 @@ sctp_handle_sack(struct mbuf *m, int off (asoc->stream_queue_cnt == 0)) { if (asoc->state & SCTP_STATE_PARTIAL_MSG_LEFT) { /* Need to abort here */ - struct mbuf *oper; + struct mbuf *op_err; abort_out_now: *abort_now = 1; /* XXX */ - oper = sctp_get_mbuf_for_msg(sizeof(struct sctp_paramhdr), - 0, M_DONTWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - - SCTP_BUF_LEN(oper) = sizeof(struct sctp_paramhdr); - ph = mtod(oper, struct sctp_paramhdr *); - ph->param_type = htons(SCTP_CAUSE_USER_INITIATED_ABT); - ph->param_length = htons(SCTP_BUF_LEN(oper)); - } + op_err = sctp_generate_cause(SCTP_CAUSE_USER_INITIATED_ABT, ""); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_31; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); return; } else { struct sctp_nets *netp; @@ -5384,33 +5058,20 @@ sctp_handle_forward_tsn(struct sctp_tcb asoc->cumulative_tsn = new_cum_tsn; if (gap >= m_size) { if ((long)gap > sctp_sbspace(&stcb->asoc, &stcb->sctp_socket->so_rcv)) { - struct mbuf *oper; + struct mbuf *op_err; + char msg[SCTP_DIAG_INFO_LEN]; /* * out of range (of single byte chunks in the rwnd I * give out). This must be an attacker. */ *abort_flag = 1; - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_DONTWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = sizeof(struct sctp_paramhdr) + - (sizeof(uint32_t) * 3); - ph = mtod(oper, struct sctp_paramhdr *); - ph->param_type = htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_33); - ippp++; - *ippp = asoc->highest_tsn_inside_map; - ippp++; - *ippp = new_cum_tsn; - } + snprintf(msg, sizeof(msg), + "New cum ack %8.8x too high, highest TSN %8.8x", + new_cum_tsn, asoc->highest_tsn_inside_map); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_33; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); return; } SCTP_STAT_INCR(sctps_fwdtsn_map_over); Modified: stable/9/sys/netinet/sctp_input.c ============================================================================== --- stable/9/sys/netinet/sctp_input.c Thu May 15 19:48:52 2014 (r266180) +++ stable/9/sys/netinet/sctp_input.c Thu May 15 20:01:21 2014 (r266181) @@ -97,7 +97,7 @@ sctp_handle_init(struct mbuf *m, int iph } /* validate length */ if (ntohs(cp->ch.chunk_length) < sizeof(struct sctp_init_chunk)) { - op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM); + op_err = sctp_generate_cause(SCTP_CAUSE_INVALID_PARAM, ""); sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, use_mflowid, mflowid, vrf_id, port); @@ -109,7 +109,7 @@ sctp_handle_init(struct mbuf *m, int iph init = &cp->init; if (init->initiate_tag == 0) { /* protocol error... send abort */ - op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM); + op_err = sctp_generate_cause(SCTP_CAUSE_INVALID_PARAM, ""); sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, use_mflowid, mflowid, vrf_id, port); @@ -119,7 +119,7 @@ sctp_handle_init(struct mbuf *m, int iph } if (ntohl(init->a_rwnd) < SCTP_MIN_RWND) { /* invalid parameter... send abort */ - op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM); + op_err = sctp_generate_cause(SCTP_CAUSE_INVALID_PARAM, ""); sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, use_mflowid, mflowid, vrf_id, port); @@ -129,7 +129,7 @@ sctp_handle_init(struct mbuf *m, int iph } if (init->num_inbound_streams == 0) { /* protocol error... send abort */ - op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM); + op_err = sctp_generate_cause(SCTP_CAUSE_INVALID_PARAM, ""); sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, use_mflowid, mflowid, vrf_id, port); @@ -139,7 +139,7 @@ sctp_handle_init(struct mbuf *m, int iph } if (init->num_outbound_streams == 0) { /* protocol error... send abort */ - op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM); + op_err = sctp_generate_cause(SCTP_CAUSE_INVALID_PARAM, ""); sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, use_mflowid, mflowid, vrf_id, port); @@ -150,7 +150,9 @@ sctp_handle_init(struct mbuf *m, int iph if (sctp_validate_init_auth_params(m, offset + sizeof(*cp), offset + ntohs(cp->ch.chunk_length))) { /* auth parameter(s) error... send abort */ - sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, NULL, + op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), + "Problem with AUTH parameters"); + sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, use_mflowid, mflowid, vrf_id, port); if (stcb) @@ -179,7 +181,9 @@ sctp_handle_init(struct mbuf *m, int iph * state :-) */ if (SCTP_BASE_SYSCTL(sctp_blackhole) == 0) { - sctp_send_abort(m, iphlen, src, dst, sh, 0, NULL, + op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), + "No listener"); + sctp_send_abort(m, iphlen, src, dst, sh, 0, op_err, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu May 15 20:03:58 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2EC64DC8; Thu, 15 May 2014 20:03:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 01F822DFE; Thu, 15 May 2014 20:03:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FK3vZ6078099; Thu, 15 May 2014 20:03:57 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FK3vWw078097; Thu, 15 May 2014 20:03:57 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405152003.s4FK3vWw078097@svn.freebsd.org> From: Michael Tuexen Date: Thu, 15 May 2014 20:03:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266182 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 20:03:58 -0000 Author: tuexen Date: Thu May 15 20:03:57 2014 New Revision: 266182 URL: http://svnweb.freebsd.org/changeset/base/266182 Log: MFC r263921: Use SCTP_OVER_UDP_TUNNELING_PORT more consistently. Modified: stable/9/sys/netinet/sctp_constants.h stable/9/sys/netinet/sctp_sysctl.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_constants.h ============================================================================== --- stable/9/sys/netinet/sctp_constants.h Thu May 15 20:01:21 2014 (r266181) +++ stable/9/sys/netinet/sctp_constants.h Thu May 15 20:03:57 2014 (r266182) @@ -36,16 +36,10 @@ __FBSDID("$FreeBSD$"); #ifndef _NETINET_SCTP_CONSTANTS_H_ #define _NETINET_SCTP_CONSTANTS_H_ + /* IANA assigned port number for SCTP over UDP encapsulation */ -/* For freebsd we cannot bind the port at - * startup. Otherwise what will happen is - * we really won't be bound. The user must - * put it into the sysctl... or we need - * to build a special timer for this to allow - * us to wait 1 second or so after the system - * comes up. - */ -#define SCTP_OVER_UDP_TUNNELING_PORT 0 +#define SCTP_OVER_UDP_TUNNELING_PORT 9899 + /* Number of packets to get before sack sent by default */ #define SCTP_DEFAULT_SACK_FREQ 2 Modified: stable/9/sys/netinet/sctp_sysctl.h ============================================================================== --- stable/9/sys/netinet/sctp_sysctl.h Thu May 15 20:01:21 2014 (r266181) +++ stable/9/sys/netinet/sctp_sysctl.h Thu May 15 20:03:57 2014 (r266182) @@ -466,7 +466,7 @@ struct sctp_sysctl { #define SCTPCTL_UDP_TUNNELING_PORT_DESC "Set the SCTP/UDP tunneling port" #define SCTPCTL_UDP_TUNNELING_PORT_MIN 0 #define SCTPCTL_UDP_TUNNELING_PORT_MAX 65535 -#define SCTPCTL_UDP_TUNNELING_PORT_DEFAULT SCTP_OVER_UDP_TUNNELING_PORT +#define SCTPCTL_UDP_TUNNELING_PORT_DEFAULT 0 /* Enable sending of the SACK-IMMEDIATELY bit */ #define SCTPCTL_SACK_IMMEDIATELY_ENABLE_DESC "Enable sending of the SACK-IMMEDIATELY-bit." From owner-svn-src-stable@FreeBSD.ORG Thu May 15 20:06:29 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E341AF2C; Thu, 15 May 2014 20:06:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D01512E1A; Thu, 15 May 2014 20:06:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FK6TPg078625; Thu, 15 May 2014 20:06:29 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FK6TYL078624; Thu, 15 May 2014 20:06:29 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405152006.s4FK6TYL078624@svn.freebsd.org> From: Michael Tuexen Date: Thu, 15 May 2014 20:06:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266183 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 20:06:30 -0000 Author: tuexen Date: Thu May 15 20:06:29 2014 New Revision: 266183 URL: http://svnweb.freebsd.org/changeset/base/266183 Log: MFC r263922: Handle an edge case of address management similar to TCP. This needs to be reconsidered when the address handling will be reimplemented. The patch is from rrs@. Modified: stable/9/sys/netinet/sctp_pcb.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_pcb.c ============================================================================== --- stable/9/sys/netinet/sctp_pcb.c Thu May 15 20:03:57 2014 (r266182) +++ stable/9/sys/netinet/sctp_pcb.c Thu May 15 20:06:29 2014 (r266183) @@ -772,7 +772,14 @@ sctp_del_addr_from_vrf(uint32_t vrf_id, } SCTPDBG(SCTP_DEBUG_PCB4, "Deleting ifa %p\n", (void *)sctp_ifap); sctp_ifap->localifa_flags &= SCTP_ADDR_VALID; - sctp_ifap->localifa_flags |= SCTP_BEING_DELETED; + /* + * We don't set the flag. This means that the structure will + * hang around in EP's that have bound specific to it until + * they close. This gives us TCP like behavior if someone + * removes an address (or for that matter adds it right + * back). + */ + /* sctp_ifap->localifa_flags |= SCTP_BEING_DELETED; */ vrf->total_ifa_count--; LIST_REMOVE(sctp_ifap, next_bucket); sctp_remove_ifa_from_ifn(sctp_ifap); From owner-svn-src-stable@FreeBSD.ORG Thu May 15 20:08:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D14C112; Thu, 15 May 2014 20:08:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE3A42E38; Thu, 15 May 2014 20:08:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FK8P3I079004; Thu, 15 May 2014 20:08:25 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FK8PEf079003; Thu, 15 May 2014 20:08:25 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405152008.s4FK8PEf079003@svn.freebsd.org> From: Michael Tuexen Date: Thu, 15 May 2014 20:08:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266184 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 20:08:26 -0000 Author: tuexen Date: Thu May 15 20:08:25 2014 New Revision: 266184 URL: http://svnweb.freebsd.org/changeset/base/266184 Log: MFC r264017: Increment the SSN only after processing the last fragment of an ordered user message. Modified: stable/9/sys/netinet/sctp_output.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_output.c ============================================================================== --- stable/9/sys/netinet/sctp_output.c Thu May 15 20:06:29 2014 (r266183) +++ stable/9/sys/netinet/sctp_output.c Thu May 15 20:08:25 2014 (r266184) @@ -7367,7 +7367,8 @@ dont_do_it: chk->pad_inplace = 0; chk->no_fr_allowed = 0; chk->rec.data.stream_seq = strq->next_sequence_send; - if (rcv_flags & SCTP_DATA_LAST_FRAG) { + if ((rcv_flags & SCTP_DATA_LAST_FRAG) && + !(rcv_flags & SCTP_DATA_UNORDERED)) { strq->next_sequence_send++; } chk->rec.data.stream_number = sp->stream; From owner-svn-src-stable@FreeBSD.ORG Thu May 15 20:10:59 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0EA3B281; Thu, 15 May 2014 20:10:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EFD7A2E54; Thu, 15 May 2014 20:10:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FKAwtK081716; Thu, 15 May 2014 20:10:58 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FKAwRM081715; Thu, 15 May 2014 20:10:58 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405152010.s4FKAwRM081715@svn.freebsd.org> From: Michael Tuexen Date: Thu, 15 May 2014 20:10:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266185 - stable/9/sys/net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 20:10:59 -0000 Author: tuexen Date: Thu May 15 20:10:58 2014 New Revision: 266185 URL: http://svnweb.freebsd.org/changeset/base/266185 Log: MFC r264241: Call sctp_addr_change() from rt_addrmsg() instead of rt_newaddrmsg_fib(), since rt_addrmsg() gets also called from other functions. Modified: stable/9/sys/net/route.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/net/ (props changed) Modified: stable/9/sys/net/route.c ============================================================================== --- stable/9/sys/net/route.c Thu May 15 20:08:25 2014 (r266184) +++ stable/9/sys/net/route.c Thu May 15 20:10:58 2014 (r266185) @@ -1773,6 +1773,16 @@ rt_addrmsg(int cmd, struct ifaddr *ifa, KASSERT(fibnum == RT_ALL_FIBS || (fibnum >= 0 && fibnum < rt_numfibs), ("%s: fib out of range 0 <=%d<%d", __func__, fibnum, rt_numfibs)); +#if defined(INET) || defined(INET6) +#ifdef SCTP + /* + * notify the SCTP stack + * this will only get called when an address is added/deleted + * XXX pass the ifaddr struct instead if ifa->ifa_addr... + */ + sctp_addr_change(ifa, cmd); +#endif /* SCTP */ +#endif return (rtsock_addrmsg(cmd, ifa, fibnum)); } @@ -1823,16 +1833,6 @@ rt_newaddrmsg_fib(int cmd, struct ifaddr KASSERT(fibnum == RT_ALL_FIBS || (fibnum >= 0 && fibnum < rt_numfibs), ("%s: fib out of range 0 <=%d<%d", __func__, fibnum, rt_numfibs)); -#if defined(INET) || defined(INET6) -#ifdef SCTP - /* - * notify the SCTP stack - * this will only get called when an address is added/deleted - * XXX pass the ifaddr struct instead if ifa->ifa_addr... - */ - sctp_addr_change(ifa, cmd); -#endif /* SCTP */ -#endif if (cmd == RTM_ADD) { rt_addrmsg(cmd, ifa, fibnum); if (rt != NULL) From owner-svn-src-stable@FreeBSD.ORG Thu May 15 20:13:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 58F303E4; Thu, 15 May 2014 20:13:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 458312ED2; Thu, 15 May 2014 20:13:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FKDjKD082994; Thu, 15 May 2014 20:13:45 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FKDinq082989; Thu, 15 May 2014 20:13:44 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405152013.s4FKDinq082989@svn.freebsd.org> From: Michael Tuexen Date: Thu, 15 May 2014 20:13:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266186 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 20:13:45 -0000 Author: tuexen Date: Thu May 15 20:13:44 2014 New Revision: 266186 URL: http://svnweb.freebsd.org/changeset/base/266186 Log: MFC r264679: Send the correct error cause, when a DATA chunk with no user data is received. This bug was reported by Irene Ruengeler. Modified: stable/9/sys/netinet/sctp.h stable/9/sys/netinet/sctp_indata.c stable/9/sys/netinet/sctputil.c stable/9/sys/netinet/sctputil.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp.h ============================================================================== --- stable/9/sys/netinet/sctp.h Thu May 15 20:10:58 2014 (r266185) +++ stable/9/sys/netinet/sctp.h Thu May 15 20:13:44 2014 (r266186) @@ -408,6 +408,11 @@ struct sctp_error_unrecognized_chunk { struct sctp_chunkhdr ch;/* header from chunk in error */ } SCTP_PACKED; +struct sctp_error_no_user_data { + struct sctp_error_cause cause; /* code=SCTP_CAUSE_NO_USER_DATA */ + uint32_t tsn; /* TSN of the empty data chunk */ +} SCTP_PACKED; + /* * Main SCTP chunk types we place these here so natd and f/w's in user land * can find them. Modified: stable/9/sys/netinet/sctp_indata.c ============================================================================== --- stable/9/sys/netinet/sctp_indata.c Thu May 15 20:10:58 2014 (r266185) +++ stable/9/sys/netinet/sctp_indata.c Thu May 15 20:13:44 2014 (r266186) @@ -2322,7 +2322,7 @@ sctp_process_data(struct mbuf **mm, int continue; } if (ch->ch.chunk_type == SCTP_DATA) { - if ((size_t)chk_length < sizeof(struct sctp_data_chunk) + 1) { + if ((size_t)chk_length < sizeof(struct sctp_data_chunk)) { /* * Need to send an abort since we had a * invalid data chunk. @@ -2340,6 +2340,21 @@ sctp_process_data(struct mbuf **mm, int vrf_id, port); return (2); } + if ((size_t)chk_length == sizeof(struct sctp_data_chunk)) { + /* + * Need to send an abort since we had an + * empty data chunk. + */ + struct mbuf *op_err; + + op_err = sctp_generate_no_user_data_cause(ch->dp.tsn); + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_19; + sctp_abort_association(inp, stcb, m, iphlen, + src, dst, sh, op_err, + use_mflowid, mflowid, + vrf_id, port); + return (2); + } #ifdef SCTP_AUDITING_ENABLED sctp_audit_log(0xB1, 0); #endif Modified: stable/9/sys/netinet/sctputil.c ============================================================================== --- stable/9/sys/netinet/sctputil.c Thu May 15 20:10:58 2014 (r266185) +++ stable/9/sys/netinet/sctputil.c Thu May 15 20:13:44 2014 (r266186) @@ -4654,6 +4654,25 @@ sctp_generate_cause(uint16_t code, char return (m); } +struct mbuf * +sctp_generate_no_user_data_cause(uint32_t tsn) +{ + struct mbuf *m; + struct sctp_error_no_user_data *no_user_data_cause; + size_t len; + + len = sizeof(struct sctp_error_no_user_data); + m = sctp_get_mbuf_for_msg(len, 0, M_NOWAIT, 1, MT_DATA); + if (m != NULL) { + SCTP_BUF_LEN(m) = len; + no_user_data_cause = mtod(m, struct sctp_error_no_user_data *); + no_user_data_cause->cause.code = htons(SCTP_CAUSE_NO_USER_DATA); + no_user_data_cause->cause.length = htons((uint16_t) len); + no_user_data_cause->tsn = tsn; /* tsn is passed in as NBO */ + } + return (m); +} + #ifdef SCTP_MBCNT_LOGGING void sctp_free_bufspace(struct sctp_tcb *stcb, struct sctp_association *asoc, Modified: stable/9/sys/netinet/sctputil.h ============================================================================== --- stable/9/sys/netinet/sctputil.h Thu May 15 20:10:58 2014 (r266185) +++ stable/9/sys/netinet/sctputil.h Thu May 15 20:13:44 2014 (r266186) @@ -254,6 +254,7 @@ sctp_release_pr_sctp_chunk(struct sctp_t ); struct mbuf *sctp_generate_cause(uint16_t, char *); +struct mbuf *sctp_generate_no_user_data_cause(uint32_t); void sctp_bindx_add_address(struct socket *so, struct sctp_inpcb *inp, From owner-svn-src-stable@FreeBSD.ORG Thu May 15 20:15:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5773A548; Thu, 15 May 2014 20:15:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 447262EEF; Thu, 15 May 2014 20:15:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FKFhd8083388; Thu, 15 May 2014 20:15:43 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FKFhtP083387; Thu, 15 May 2014 20:15:43 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405152015.s4FKFhtP083387@svn.freebsd.org> From: Michael Tuexen Date: Thu, 15 May 2014 20:15:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266187 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 20:15:43 -0000 Author: tuexen Date: Thu May 15 20:15:42 2014 New Revision: 266187 URL: http://svnweb.freebsd.org/changeset/base/266187 Log: MFC r264682: Use consistently debug output instead of an unconditional printf. Modified: stable/9/sys/netinet/sctp_indata.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_indata.c ============================================================================== --- stable/9/sys/netinet/sctp_indata.c Thu May 15 20:13:44 2014 (r266186) +++ stable/9/sys/netinet/sctp_indata.c Thu May 15 20:15:42 2014 (r266187) @@ -1002,7 +1002,7 @@ sctp_queue_data_for_reasm(struct sctp_tc * Huh, need the correct STR here, * they must be the same. */ - SCTP_PRINTF("Prev check - Gak, Evil plot, sid:%d not the same as at:%d\n", + SCTPDBG(SCTP_DEBUG_INDATA1, "Prev check - Gak, Evil plot, sid:%d not the same as at:%d\n", chk->rec.data.stream_number, prev->rec.data.stream_number); snprintf(msg, sizeof(msg), From owner-svn-src-stable@FreeBSD.ORG Thu May 15 20:17:21 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A732694; Thu, 15 May 2014 20:17:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 472D32F05; Thu, 15 May 2014 20:17:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FKHLvu083645; Thu, 15 May 2014 20:17:21 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FKHLc1083644; Thu, 15 May 2014 20:17:21 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405152017.s4FKHLc1083644@svn.freebsd.org> From: Michael Tuexen Date: Thu, 15 May 2014 20:17:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266188 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 20:17:21 -0000 Author: tuexen Date: Thu May 15 20:17:20 2014 New Revision: 266188 URL: http://svnweb.freebsd.org/changeset/base/266188 Log: MFC r264701: Send also a packet containing an ABORT chunk in response to an OOTB packet containing a COOKIE-ECHO chunk. Modified: stable/9/sys/netinet/sctputil.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctputil.c ============================================================================== --- stable/9/sys/netinet/sctputil.c Thu May 15 20:15:42 2014 (r266187) +++ stable/9/sys/netinet/sctputil.c Thu May 15 20:17:20 2014 (r266188) @@ -4047,9 +4047,6 @@ sctp_handle_ootb(struct mbuf *m, int iph case SCTP_INIT: contains_init_chunk = 1; break; - case SCTP_COOKIE_ECHO: - /* We hit here only if the assoc is being freed */ - return; case SCTP_PACKET_DROPPED: /* we don't respond to pkt-dropped */ return; From owner-svn-src-stable@FreeBSD.ORG Thu May 15 20:19:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B41A37ED; Thu, 15 May 2014 20:19:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 94CAD2F1A; Thu, 15 May 2014 20:19:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FKJXRQ083960; Thu, 15 May 2014 20:19:33 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FKJXMr083959; Thu, 15 May 2014 20:19:33 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405152019.s4FKJXMr083959@svn.freebsd.org> From: Michael Tuexen Date: Thu, 15 May 2014 20:19:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266189 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 20:19:33 -0000 Author: tuexen Date: Thu May 15 20:19:33 2014 New Revision: 266189 URL: http://svnweb.freebsd.org/changeset/base/266189 Log: MFC r264704: Add consistency checks to ensure that fragments of a user message have the same U-bit. Modified: stable/9/sys/netinet/sctp_indata.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_indata.c ============================================================================== --- stable/9/sys/netinet/sctp_indata.c Thu May 15 20:17:20 2014 (r266188) +++ stable/9/sys/netinet/sctp_indata.c Thu May 15 20:19:33 2014 (r266189) @@ -828,7 +828,6 @@ sctp_queue_data_for_reasm(struct sctp_tc { struct mbuf *op_err; char msg[SCTP_DIAG_INFO_LEN]; - uint32_t cum_ackp1, prev_tsn, post_tsn; struct sctp_tmit_chunk *at, *prev, *next; @@ -1017,6 +1016,24 @@ sctp_queue_data_for_reasm(struct sctp_tc *abort_flag = 1; return; } + if ((chk->rec.data.rcv_flags & SCTP_DATA_UNORDERED) != + (prev->rec.data.rcv_flags & SCTP_DATA_UNORDERED)) { + /* + * Huh, need the same ordering here, + * they must be the same. + */ + SCTPDBG(SCTP_DEBUG_INDATA1, "Prev check - Gak, Evil plot, U-bit not constant\n"); + snprintf(msg, sizeof(msg), + "Expect U-bit=%d for TSN=%8.8x, got U-bit=%d", + (prev->rec.data.rcv_flags & SCTP_DATA_UNORDERED) ? 1 : 0, + chk->rec.data.TSN_seq, + (chk->rec.data.rcv_flags & SCTP_DATA_UNORDERED) ? 1 : 0); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_7; + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); + *abort_flag = 1; + return; + } if ((prev->rec.data.rcv_flags & SCTP_DATA_UNORDERED) == 0 && chk->rec.data.stream_seq != prev->rec.data.stream_seq) { @@ -1127,6 +1144,24 @@ sctp_queue_data_for_reasm(struct sctp_tc *abort_flag = 1; return; } + if ((chk->rec.data.rcv_flags & SCTP_DATA_UNORDERED) != + (next->rec.data.rcv_flags & SCTP_DATA_UNORDERED)) { + /* + * Huh, need the same ordering here, + * they must be the same. + */ + SCTPDBG(SCTP_DEBUG_INDATA1, "Next check - Gak, Evil plot, U-bit not constant\n"); + snprintf(msg, sizeof(msg), + "Expect U-bit=%d for TSN=%8.8x, got U-bit=%d", + (next->rec.data.rcv_flags & SCTP_DATA_UNORDERED) ? 1 : 0, + chk->rec.data.TSN_seq, + (chk->rec.data.rcv_flags & SCTP_DATA_UNORDERED) ? 1 : 0); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_12; + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); + *abort_flag = 1; + return; + } if ((next->rec.data.rcv_flags & SCTP_DATA_UNORDERED) == 0 && chk->rec.data.stream_seq != next->rec.data.stream_seq) { From owner-svn-src-stable@FreeBSD.ORG Thu May 15 20:21:19 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF7C6967; Thu, 15 May 2014 20:21:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C23372FA4; Thu, 15 May 2014 20:21:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FKLJOO086879; Thu, 15 May 2014 20:21:19 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FKLJ5c086878; Thu, 15 May 2014 20:21:19 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405152021.s4FKLJ5c086878@svn.freebsd.org> From: Michael Tuexen Date: Thu, 15 May 2014 20:21:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266190 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 20:21:20 -0000 Author: tuexen Date: Thu May 15 20:21:19 2014 New Revision: 266190 URL: http://svnweb.freebsd.org/changeset/base/266190 Log: MFC r264838: Don't free an mbuf twice. This only happens in very rare error cases where the peer sends illegal sequencing information in DATA chunks for an existing association. Modified: stable/9/sys/netinet/sctp_indata.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_indata.c ============================================================================== --- stable/9/sys/netinet/sctp_indata.c Thu May 15 20:19:33 2014 (r266189) +++ stable/9/sys/netinet/sctp_indata.c Thu May 15 20:21:19 2014 (r266190) @@ -1716,6 +1716,9 @@ failed_pdapi_express_del: stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_15; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; + if (last_chunk) { + *m = NULL; + } return (0); } else { if (sctp_does_tsn_belong_to_reasm(asoc, control->sinfo_tsn)) { @@ -1732,6 +1735,9 @@ failed_pdapi_express_del: stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_16; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; + if (last_chunk) { + *m = NULL; + } return (0); } } @@ -1758,6 +1764,9 @@ failed_pdapi_express_del: stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_17; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; + if (last_chunk) { + *m = NULL; + } return (0); } } @@ -1821,6 +1830,9 @@ failed_pdapi_express_del: } else { sctp_queue_data_to_stream(stcb, asoc, control, abort_flag); if (*abort_flag) { + if (last_chunk) { + *m = NULL; + } return (0); } } @@ -1833,7 +1845,9 @@ failed_pdapi_express_del: * the assoc is now gone and chk was put onto the * reasm queue, which has all been freed. */ - *m = NULL; + if (last_chunk) { + *m = NULL; + } return (0); } } From owner-svn-src-stable@FreeBSD.ORG Thu May 15 20:24:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4DCEAC07; Thu, 15 May 2014 20:24:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A76B2FE1; Thu, 15 May 2014 20:24:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FKOqi1087752; Thu, 15 May 2014 20:24:52 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FKOqao087751; Thu, 15 May 2014 20:24:52 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405152024.s4FKOqao087751@svn.freebsd.org> From: Michael Tuexen Date: Thu, 15 May 2014 20:24:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266191 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 20:24:52 -0000 Author: tuexen Date: Thu May 15 20:24:51 2014 New Revision: 266191 URL: http://svnweb.freebsd.org/changeset/base/266191 Log: MFC r265455: Remove unused code. This is triggered by the bugreport of Sylvestre Ledru which deal with useless code in the user land stack: https://bugzilla.mozilla.org/show_bug.cgi?id=1003929 Modified: stable/9/sys/netinet/sctp_pcb.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_pcb.c ============================================================================== --- stable/9/sys/netinet/sctp_pcb.c Thu May 15 20:21:19 2014 (r266190) +++ stable/9/sys/netinet/sctp_pcb.c Thu May 15 20:24:51 2014 (r266191) @@ -2735,7 +2735,6 @@ sctp_inpcb_bind(struct socket *so, struc uint32_t vrf_id; lport = 0; - error = 0; bindall = 1; inp = (struct sctp_inpcb *)so->so_pcb; ip_inp = (struct inpcb *)so->so_pcb; @@ -2856,13 +2855,6 @@ sctp_inpcb_bind(struct socket *so, struc return (error); } } - if (p == NULL) { - SCTP_INP_DECR_REF(inp); - SCTP_INP_WUNLOCK(inp); - SCTP_INP_INFO_WUNLOCK(); - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, error); - return (error); - } SCTP_INP_WUNLOCK(inp); if (bindall) { vrf_id = inp->def_vrf_id; From owner-svn-src-stable@FreeBSD.ORG Thu May 15 20:27:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E61BDD7B; Thu, 15 May 2014 20:27:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2C1C2008; Thu, 15 May 2014 20:27:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FKRvIF088189; Thu, 15 May 2014 20:27:57 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FKRvGI088188; Thu, 15 May 2014 20:27:57 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405152027.s4FKRvGI088188@svn.freebsd.org> From: Michael Tuexen Date: Thu, 15 May 2014 20:27:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266192 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 20:27:58 -0000 Author: tuexen Date: Thu May 15 20:27:57 2014 New Revision: 266192 URL: http://svnweb.freebsd.org/changeset/base/266192 Log: MFC r265691, r265713: For some UDP packets (for example with 200 byte payload) and IP options, the IP header and the UDP header are not in the same mbuf. Add code to in_delayed_cksum() to deal with this case. Use KASSERTs as suggested by glebius@ Modified: stable/9/sys/netinet/ip_output.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/ip_output.c ============================================================================== --- stable/9/sys/netinet/ip_output.c Thu May 15 20:24:51 2014 (r266191) +++ stable/9/sys/netinet/ip_output.c Thu May 15 20:27:57 2014 (r266192) @@ -867,17 +867,13 @@ in_delayed_cksum(struct mbuf *m) csum = 0xffff; offset += m->m_pkthdr.csum_data; /* checksum offset */ - if (offset + sizeof(u_short) > m->m_len) { - printf("delayed m_pullup, m->len: %d off: %d p: %d\n", - m->m_len, offset, ip->ip_p); - /* - * XXX - * this shouldn't happen, but if it does, the - * correct behavior may be to insert the checksum - * in the appropriate next mbuf in the chain. - */ - return; + /* find the mbuf in the chain where the checksum starts*/ + while ((m != NULL) && (offset >= m->m_len)) { + offset -= m->m_len; + m = m->m_next; } + KASSERT(m != NULL, ("in_delayed_cksum: checksum outside mbuf chain.")); + KASSERT(offset + sizeof(u_short) <= m->m_len, ("in_delayed_cksum: checksum split between mbufs.")); *(u_short *)(m->m_data + offset) = csum; } From owner-svn-src-stable@FreeBSD.ORG Thu May 15 20:58:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E059928; Thu, 15 May 2014 20:58:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 374B92305; Thu, 15 May 2014 20:58:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FKwQxM001371; Thu, 15 May 2014 20:58:26 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FKwNUh001355; Thu, 15 May 2014 20:58:23 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405152058.s4FKwNUh001355@svn.freebsd.org> From: Ian Lepore Date: Thu, 15 May 2014 20:58:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266194 - in stable/10/sys: arm/arm arm/at91 arm/conf arm/econa arm/include arm/s3c2xx0 arm/sa11x0 arm/xscale/i80321 arm/xscale/i8134x arm/xscale/ixp425 arm/xscale/pxa conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 20:58:26 -0000 Author: ian Date: Thu May 15 20:58:23 2014 New Revision: 266194 URL: http://svnweb.freebsd.org/changeset/base/266194 Log: MFC r261643, r261646, r261648, r261649, r261651, r261656, r261657, r261663, r261676, r261677, r261698, r261778 Consolidate code related to setting up physical memory configuration into a new physmem.c file. Replace compile-time constant KERNPHYSADDR with abp_physaddr Calculate the kernel's load address from the PC in the elf / gzip trampoline instead of relying on KERNPHYSADDR as a compile-time constant. It turns out a global variable is the only straightforward way to communicate the kernel's physical load address from where it's known in initarm() into cpu_mp_start() which is called from non-arm code and takes no parameters. Remove the now unused MMU_INIT macro. Use vm_paddr_t, not vm_offset_t, when dealing with physical addresses. No need to set physmem in each initarm() instance anymore, it's handled in common code now. Pass the pagetable used from locore.S to initarm to allow it to map data in as required. Fix the physmem exclude-region clipping logic for the edge-trim case. Add some extra debugging output when DEBUG is defined. Update legacy platforms to use new arm_physmem helper routines. Added: stable/10/sys/arm/arm/physmem.c - copied, changed from r261643, head/sys/arm/arm/physmem.c stable/10/sys/arm/include/physmem.h - copied, changed from r261643, head/sys/arm/include/physmem.h Modified: stable/10/sys/arm/arm/elf_trampoline.c stable/10/sys/arm/arm/locore.S stable/10/sys/arm/arm/machdep.c stable/10/sys/arm/arm/mp_machdep.c stable/10/sys/arm/at91/at91_machdep.c stable/10/sys/arm/conf/VYBRID.common stable/10/sys/arm/econa/econa_machdep.c stable/10/sys/arm/include/cpu.h stable/10/sys/arm/include/machdep.h stable/10/sys/arm/s3c2xx0/s3c24x0_machdep.c stable/10/sys/arm/sa11x0/assabet_machdep.c stable/10/sys/arm/xscale/i80321/ep80219_machdep.c stable/10/sys/arm/xscale/i80321/iq31244_machdep.c stable/10/sys/arm/xscale/i8134x/crb_machdep.c stable/10/sys/arm/xscale/ixp425/avila_machdep.c stable/10/sys/arm/xscale/pxa/pxa_machdep.c stable/10/sys/conf/files.arm Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/elf_trampoline.c ============================================================================== --- stable/10/sys/arm/arm/elf_trampoline.c Thu May 15 20:41:16 2014 (r266193) +++ stable/10/sys/arm/arm/elf_trampoline.c Thu May 15 20:58:23 2014 (r266194) @@ -186,14 +186,20 @@ static void arm9_setup(void); void _startC(void) { - int physaddr = KERNPHYSADDR; int tmp1; unsigned int sp = ((unsigned int)&_end & ~3) + 4; -#if defined(FLASHADDR) && defined(PHYSADDR) && defined(LOADERRAMADDR) - unsigned int pc; + unsigned int pc, kernphysaddr; + /* + * Figure out the physical address the kernel was loaded at. This + * assumes the entry point (this code right here) is in the first page, + * which will always be the case for this trampoline code. + */ __asm __volatile("mov %0, pc\n" : "=r" (pc)); + kernphysaddr = pc & ~PAGE_MASK; + +#if defined(FLASHADDR) && defined(PHYSADDR) && defined(LOADERRAMADDR) if ((FLASHADDR > LOADERRAMADDR && pc >= FLASHADDR) || (FLASHADDR < LOADERRAMADDR && pc < LOADERRAMADDR)) { /* @@ -247,7 +253,7 @@ _startC(void) "mov pc, %0\n" "2: nop\n" "mov sp, %2\n" - : "=r" (tmp1), "+r" (physaddr), "+r" (sp)); + : "=r" (tmp1), "+r" (kernphysaddr), "+r" (sp)); #ifndef KZIP #ifdef CPU_ARM9 /* So that idcache_wbinv works; */ Modified: stable/10/sys/arm/arm/locore.S ============================================================================== --- stable/10/sys/arm/arm/locore.S Thu May 15 20:41:16 2014 (r266193) +++ stable/10/sys/arm/arm/locore.S Thu May 15 20:58:23 2014 (r266194) @@ -221,7 +221,7 @@ mmu_done: ldr pc, .Lvirt_done virt_done: - mov r1, #24 /* loader info size is 24 bytes also second arg */ + mov r1, #28 /* loader info size is 28 bytes also second arg */ subs sp, sp, r1 /* allocate arm_boot_params struct on stack */ bic sp, sp, #7 /* align stack to 8 bytes */ mov r0, sp /* loader info pointer is first arg */ @@ -232,6 +232,8 @@ virt_done: str fp, [r0, #16] /* store r3 from boot loader */ ldr r5, =KERNPHYSADDR /* load KERNPHYSADDR as the physical address */ str r5, [r0, #20] /* store the physical address */ + ldr r5, Lstartup_pagetable + str r5, [r0, #24] /* store the pagetable address */ mov fp, #0 /* trace back starts here */ bl _C_LABEL(initarm) /* Off we go */ @@ -277,11 +279,6 @@ build_pagetables: RET -#define MMU_INIT(va,pa,n_sec,attr) \ - .word n_sec ; \ - .word 4*((va)>>L1_S_SHIFT) ; \ - .word (pa)|(attr) ; - Lvirtaddr: .word KERNVIRTADDR Lphysaddr: Modified: stable/10/sys/arm/arm/machdep.c ============================================================================== --- stable/10/sys/arm/arm/machdep.c Thu May 15 20:41:16 2014 (r266193) +++ stable/10/sys/arm/arm/machdep.c Thu May 15 20:58:23 2014 (r266194) @@ -97,6 +97,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -122,8 +123,6 @@ uint32_t cpu_reset_address = 0; int cold = 1; vm_offset_t vector_page; -long realmem = 0; - int (*_arm_memcpy)(void *, void *, int, int) = NULL; int (*_arm_bzero)(void *, int, int) = NULL; int _min_memcpy_size = 0; @@ -144,9 +143,6 @@ extern vm_offset_t ksym_start, ksym_end; static struct pv_addr kernel_pt_table[KERNEL_PT_MAX]; -vm_paddr_t phys_avail[10]; -vm_paddr_t dump_avail[4]; - extern u_int data_abort_handler_address; extern u_int prefetch_abort_handler_address; extern u_int undefined_handler_address; @@ -356,6 +352,7 @@ static void cpu_startup(void *dummy) { struct pcb *pcb = thread0.td_pcb; + const unsigned int mbyte = 1024 * 1024; #ifdef ARM_TP_ADDRESS #ifndef ARM_CACHE_LOCK_ENABLE vm_page_t m; @@ -364,36 +361,21 @@ cpu_startup(void *dummy) identify_arm_cpu(); - printf("real memory = %ju (%ju MB)\n", (uintmax_t)ptoa(physmem), - (uintmax_t)ptoa(physmem) / 1048576); - realmem = physmem; + vm_ksubmap_init(&kmi); /* * Display the RAM layout. */ - if (bootverbose) { - int indx; - - printf("Physical memory chunk(s):\n"); - for (indx = 0; phys_avail[indx + 1] != 0; indx += 2) { - vm_paddr_t size; - - size = phys_avail[indx + 1] - phys_avail[indx]; - printf(" 0x%08jx - 0x%08jx, %ju KBytes (%ju pages)\n", - (uintmax_t)phys_avail[indx], - (uintmax_t)phys_avail[indx + 1] - 1, - (uintmax_t)size / 1024, (uintmax_t)size / PAGE_SIZE); - } - } - - vm_ksubmap_init(&kmi); - + printf("real memory = %ju (%ju MB)\n", + (uintmax_t)arm32_ptob(realmem), + (uintmax_t)arm32_ptob(realmem) / mbyte); printf("avail memory = %ju (%ju MB)\n", - (uintmax_t)ptoa(cnt.v_free_count), - (uintmax_t)ptoa(cnt.v_free_count) / 1048576); - - if (bootverbose) + (uintmax_t)arm32_ptob(cnt.v_free_count), + (uintmax_t)arm32_ptob(cnt.v_free_count) / mbyte); + if (bootverbose) { + arm_physmem_print_tables(); arm_devmap_print_table(); + } bufinit(); vm_pager_bufferinit(); @@ -780,44 +762,6 @@ makectx(struct trapframe *tf, struct pcb } /* - * Make a standard dump_avail array. Can't make the phys_avail - * since we need to do that after we call pmap_bootstrap, but this - * is needed before pmap_boostrap. - */ -void -arm_dump_avail_init(vm_paddr_t physaddr, vm_offset_t ramsize, size_t max) -{ -#ifdef LINUX_BOOT_ABI - /* - * Linux boot loader passes us the actual banks of memory, so use them - * to construct the dump_avail array. - */ - if (membanks > 0) - { - int i, j; - - if (max < (membanks + 1) * 2) - panic("dump_avail[%d] too small for %d banks\n", - max, membanks); - for (j = 0, i = 0; i < membanks; i++) { - dump_avail[j++] = round_page(memstart[i]); - dump_avail[j++] = trunc_page(memstart[i] + memsize[i]); - } - dump_avail[j++] = 0; - dump_avail[j++] = 0; - return; - } -#endif - if (max < 4) - panic("dump_avail too small\n"); - - dump_avail[0] = round_page(physaddr); - dump_avail[1] = trunc_page(physaddr + ramsize); - dump_avail[2] = 0; - dump_avail[3] = 0; -} - -/* * Fake up a boot descriptor table */ vm_offset_t @@ -910,11 +854,8 @@ linux_parse_boot_param(struct arm_boot_p case ATAG_CORE: break; case ATAG_MEM: - if (membanks < LBABI_MAX_BANKS) { - memstart[membanks] = walker->u.tag_mem.start; - memsize[membanks] = walker->u.tag_mem.size; - } - membanks++; + arm_physmem_hardware_region(walker->u.tag_mem.start, + walker->u.tag_mem.size); break; case ATAG_INITRD2: break; @@ -1077,120 +1018,10 @@ print_kenv(void) debugf(" %x %s\n", (uint32_t)cp, cp); } -static void -physmap_init(struct mem_region *availmem_regions, int availmem_regions_sz, - vm_offset_t kernload) -{ - int i, j, cnt; - vm_offset_t phys_kernelend; - uint32_t s, e, sz; - struct mem_region *mp, *mp1; - - phys_kernelend = kernload + (virtual_avail - KERNVIRTADDR); - - /* - * Remove kernel physical address range from avail - * regions list. Page align all regions. - * Non-page aligned memory isn't very interesting to us. - * Also, sort the entries for ascending addresses. - */ - sz = 0; - cnt = availmem_regions_sz; - debugf("processing avail regions:\n"); - for (mp = availmem_regions; mp->mr_size; mp++) { - s = mp->mr_start; - e = mp->mr_start + mp->mr_size; - debugf(" %08x-%08x -> ", s, e); - /* Check whether this region holds all of the kernel. */ - if (s < kernload && e > phys_kernelend) { - availmem_regions[cnt].mr_start = phys_kernelend; - availmem_regions[cnt++].mr_size = e - phys_kernelend; - e = kernload; - } - /* Look whether this regions starts within the kernel. */ - if (s >= kernload && s < phys_kernelend) { - if (e <= phys_kernelend) - goto empty; - s = phys_kernelend; - } - /* Now look whether this region ends within the kernel. */ - if (e > kernload && e <= phys_kernelend) { - if (s >= kernload) { - goto empty; - } - e = kernload; - } - /* Now page align the start and size of the region. */ - s = round_page(s); - e = trunc_page(e); - if (e < s) - e = s; - sz = e - s; - debugf("%08x-%08x = %x\n", s, e, sz); - - /* Check whether some memory is left here. */ - if (sz == 0) { - empty: - printf("skipping\n"); - bcopy(mp + 1, mp, - (cnt - (mp - availmem_regions)) * sizeof(*mp)); - cnt--; - mp--; - continue; - } - - /* Do an insertion sort. */ - for (mp1 = availmem_regions; mp1 < mp; mp1++) - if (s < mp1->mr_start) - break; - if (mp1 < mp) { - bcopy(mp1, mp1 + 1, (char *)mp - (char *)mp1); - mp1->mr_start = s; - mp1->mr_size = sz; - } else { - mp->mr_start = s; - mp->mr_size = sz; - } - } - availmem_regions_sz = cnt; - - /* Fill in phys_avail table, based on availmem_regions */ - debugf("fill in phys_avail:\n"); - for (i = 0, j = 0; i < availmem_regions_sz; i++, j += 2) { - - debugf(" region: 0x%08x - 0x%08x (0x%08x)\n", - availmem_regions[i].mr_start, - availmem_regions[i].mr_start + availmem_regions[i].mr_size, - availmem_regions[i].mr_size); - - /* - * We should not map the page at PA 0x0000000, the VM can't - * handle it, as pmap_extract() == 0 means failure. - */ - if (availmem_regions[i].mr_start > 0 || - availmem_regions[i].mr_size > PAGE_SIZE) { - vm_size_t size; - phys_avail[j] = availmem_regions[i].mr_start; - - size = availmem_regions[i].mr_size; - if (phys_avail[j] == 0) { - phys_avail[j] += PAGE_SIZE; - size -= PAGE_SIZE; - } - phys_avail[j + 1] = availmem_regions[i].mr_start + size; - } else - j -= 2; - } - phys_avail[j] = 0; - phys_avail[j + 1] = 0; -} - void * initarm(struct arm_boot_params *abp) { - struct mem_region memory_regions[FDT_MEM_REGIONS]; - struct mem_region availmem_regions[FDT_MEM_REGIONS]; - struct mem_region reserved_regions[FDT_MEM_REGIONS]; + struct mem_region mem_regions[FDT_MEM_REGIONS]; struct pv_addr kernel_l1pt; struct pv_addr dpcpu; vm_offset_t dtbp, freemempos, l2_start, lastaddr; @@ -1198,15 +1029,11 @@ initarm(struct arm_boot_params *abp) char *env; void *kmdp; u_int l1pagetable; - int i = 0, j = 0, err_devmap = 0; - int memory_regions_sz; - int availmem_regions_sz; - int reserved_regions_sz; - vm_offset_t start, end; - vm_offset_t rstart, rend; - int curr; + int i, j, err_devmap, mem_regions_sz; lastaddr = parse_boot_param(abp); + arm_physmem_kernaddr = abp->abp_physaddr; + memsize = 0; set_cpufuncs(); @@ -1235,72 +1062,14 @@ initarm(struct arm_boot_params *abp) while (1); /* Grab physical memory regions information from device tree. */ - if (fdt_get_mem_regions(memory_regions, &memory_regions_sz, - &memsize) != 0) - while(1); - - /* Grab physical memory regions information from device tree. */ - if (fdt_get_reserved_regions(reserved_regions, &reserved_regions_sz) != 0) - reserved_regions_sz = 0; - - /* - * Now exclude all the reserved regions - */ - curr = 0; - for (i = 0; i < memory_regions_sz; i++) { - start = memory_regions[i].mr_start; - end = start + memory_regions[i].mr_size; - for (j = 0; j < reserved_regions_sz; j++) { - rstart = reserved_regions[j].mr_start; - rend = rstart + reserved_regions[j].mr_size; - /* - * Restricted region is before available - * Skip restricted region - */ - if (rend <= start) - continue; - /* - * Restricted region is behind available - * No further processing required - */ - if (rstart >= end) - break; - /* - * Restricted region includes memory region - * skip available region - */ - if ((start >= rstart) && (rend >= end)) { - start = rend; - end = rend; - break; - } - /* - * Memory region includes restricted region - */ - if ((rstart > start) && (end > rend)) { - availmem_regions[curr].mr_start = start; - availmem_regions[curr++].mr_size = rstart - start; - start = rend; - break; - } - /* - * Memory region partially overlaps with restricted - */ - if ((rstart >= start) && (rstart <= end)) { - end = rstart; - } - else if ((rend >= start) && (rend <= end)) { - start = rend; - } - } - - if (end > start) { - availmem_regions[curr].mr_start = start; - availmem_regions[curr++].mr_size = end - start; - } - } - - availmem_regions_sz = curr; + if (fdt_get_mem_regions(mem_regions, &mem_regions_sz, &memsize) != 0) + panic("Cannot get physical memory regions"); + arm_physmem_hardware_regions(mem_regions, mem_regions_sz); + + /* Grab reserved memory regions information from device tree. */ + if (fdt_get_reserved_regions(mem_regions, &mem_regions_sz) == 0) + arm_physmem_exclude_regions(mem_regions, mem_regions_sz, + EXFLAG_NODUMP | EXFLAG_NOALLOC); /* Platform-specific initialisation */ initarm_early_init(); @@ -1339,7 +1108,7 @@ initarm(struct arm_boot_params *abp) freemempos += PAGE_SIZE; valloc_pages(kernel_l1pt, L1_TABLE_SIZE / PAGE_SIZE); - for (i = 0; i < l2size; ++i) { + for (i = 0, j = 0; i < l2size; ++i) { if (!(i % (PAGE_SIZE / L2_TABLE_SIZE_REAL))) { valloc_pages(kernel_pt_table[i], L2_TABLE_SIZE / PAGE_SIZE); @@ -1446,8 +1215,6 @@ initarm(struct arm_boot_params *abp) cninit(); - physmem = memsize / PAGE_SIZE; - debugf("initarm: console initialized\n"); debugf(" arg1 kmdp = 0x%08x\n", (uint32_t)kmdp); debugf(" boothowto = 0x%08x\n", boothowto); @@ -1498,17 +1265,22 @@ initarm(struct arm_boot_params *abp) arm_intrnames_init(); arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL); - arm_dump_avail_init(abp->abp_physaddr, memsize, - sizeof(dump_avail) / sizeof(dump_avail[0])); pmap_bootstrap(freemempos, &kernel_l1pt); msgbufp = (void *)msgbufpv.pv_va; msgbufinit(msgbufp, msgbufsize); mutex_init(); /* - * Prepare map of physical memory regions available to vm subsystem. + * Exclude the kernel (and all the things we allocated which immediately + * follow the kernel) from the VM allocation pool but not from crash + * dumps. virtual_avail is a global variable which tracks the kva we've + * "allocated" while setting up pmaps. + * + * Prepare the list of physical memory available to the vm subsystem. */ - physmap_init(availmem_regions, availmem_regions_sz, abp->abp_physaddr); + arm_physmem_exclude_region(abp->abp_physaddr, + (virtual_avail - KERNVIRTADDR), EXFLAG_NOALLOC); + arm_physmem_init_kernel_globals(); init_param2(physmem); kdb_init(); Modified: stable/10/sys/arm/arm/mp_machdep.c ============================================================================== --- stable/10/sys/arm/arm/mp_machdep.c Thu May 15 20:41:16 2014 (r266193) +++ stable/10/sys/arm/arm/mp_machdep.c Thu May 15 20:58:23 2014 (r266194) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #ifdef VFP @@ -120,16 +121,16 @@ cpu_mp_start(void) M_WAITOK | M_ZERO); temp_pagetable_va = (vm_offset_t)contigmalloc(L1_TABLE_SIZE, M_TEMP, 0, 0x0, 0xffffffff, L1_TABLE_SIZE, 0); - addr = KERNPHYSADDR; - addr_end = (vm_offset_t)&_end - KERNVIRTADDR + KERNPHYSADDR; + addr = arm_physmem_kernaddr; + addr_end = (vm_offset_t)&_end - KERNVIRTADDR + arm_physmem_kernaddr; addr_end &= ~L1_S_OFFSET; addr_end += L1_S_SIZE; bzero((void *)temp_pagetable_va, L1_TABLE_SIZE); - for (addr = KERNPHYSADDR; addr <= addr_end; addr += L1_S_SIZE) { + for (addr = arm_physmem_kernaddr; addr <= addr_end; addr += L1_S_SIZE) { ((int *)(temp_pagetable_va))[addr >> L1_S_SHIFT] = L1_TYPE_S|L1_SHARED|L1_S_C|L1_S_AP(AP_KRW)|L1_S_DOM(PMAP_DOMAIN_KERNEL)|addr; ((int *)(temp_pagetable_va))[(addr - - KERNPHYSADDR + KERNVIRTADDR) >> L1_S_SHIFT] = + arm_physmem_kernaddr + KERNVIRTADDR) >> L1_S_SHIFT] = L1_TYPE_S|L1_SHARED|L1_S_C|L1_S_AP(AP_KRW)|L1_S_DOM(PMAP_DOMAIN_KERNEL)|addr; } Copied and modified: stable/10/sys/arm/arm/physmem.c (from r261643, head/sys/arm/arm/physmem.c) ============================================================================== --- head/sys/arm/arm/physmem.c Sat Feb 8 23:54:16 2014 (r261643, copy source) +++ stable/10/sys/arm/arm/physmem.c Thu May 15 20:58:23 2014 (r266194) @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); #define MAX_EXCNT 10 struct region { - vm_offset_t addr; + vm_paddr_t addr; vm_size_t size; uint32_t flags; }; @@ -89,6 +89,9 @@ vm_paddr_t dump_avail[MAX_AVAIL_ENTRIES /* This is the total number of hardware pages, excluded or not. */ long realmem; +/* The address at which the kernel was loaded. Set early in initarm(). */ +vm_paddr_t arm_physmem_kernaddr; + /* * Print the contents of the physical and excluded region tables using the * provided printf-like output function (which will be either printf or @@ -119,6 +122,16 @@ physmem_dump_tables(int (*prfunc)(const (flags & EXFLAG_NOALLOC) ? "NoAlloc" : "", (flags & EXFLAG_NODUMP) ? "NoDump" : ""); } + +#ifdef DEBUG + prfunc("Avail lists:\n"); + for (i = 0; phys_avail[i] != 0; ++i) { + prfunc(" phys_avail[%d] 0x%08x\n", i, phys_avail[i]); + } + for (i = 0; dump_avail[i] != 0; ++i) { + prfunc(" dump_avail[%d] 0x%08x\n", i, dump_avail[i]); + } +#endif } /* @@ -195,14 +208,14 @@ regions_to_avail(vm_paddr_t *avail, uint continue; } /* - * If excluded region partially overlaps this region, - * trim the excluded portion off the appropriate end. + * We know the excluded region overlaps either the start + * or end of this hardware region (but not both), trim + * the excluded portion off the appropriate end. */ - if ((xstart >= start) && (xstart <= end)) { - end = xstart; - } else if ((xend >= start) && (xend <= end)) { + if (xstart <= start) start = xend; - } + else + end = xstart; } /* * If the trimming actions above left a non-zero size, create an @@ -224,7 +237,7 @@ regions_to_avail(vm_paddr_t *avail, uint * Insertion-sort a new entry into a regions list; sorted by start address. */ static void -insert_region(struct region *regions, size_t rcnt, vm_offset_t addr, +insert_region(struct region *regions, size_t rcnt, vm_paddr_t addr, vm_size_t size, uint32_t flags) { size_t i; @@ -246,7 +259,7 @@ insert_region(struct region *regions, si * Add a hardware memory region. */ void -arm_physmem_hardware_region(vm_offset_t pa, vm_size_t sz) +arm_physmem_hardware_region(vm_paddr_t pa, vm_size_t sz) { vm_offset_t adj; @@ -274,7 +287,7 @@ arm_physmem_hardware_region(vm_offset_t /* * Add an exclusion region. */ -void arm_physmem_exclude_region(vm_offset_t pa, vm_size_t sz, uint32_t exflags) +void arm_physmem_exclude_region(vm_paddr_t pa, vm_size_t sz, uint32_t exflags) { vm_offset_t adj; Modified: stable/10/sys/arm/at91/at91_machdep.c ============================================================================== --- stable/10/sys/arm/at91/at91_machdep.c Thu May 15 20:41:16 2014 (r266193) +++ stable/10/sys/arm/at91/at91_machdep.c Thu May 15 20:58:23 2014 (r266194) @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -199,9 +200,6 @@ const struct arm_devmap_entry at91_devma /* Physical and virtual addresses for some global pages */ -vm_paddr_t phys_avail[10]; -vm_paddr_t dump_avail[4]; - struct pv_addr systempage; struct pv_addr msgbufpv; struct pv_addr irqstack; @@ -463,6 +461,7 @@ initarm(struct arm_boot_params *abp) vm_offset_t lastaddr; lastaddr = parse_boot_param(abp); + arm_physmem_kernaddr = abp->abp_physaddr; set_cpufuncs(); pcpu0_init(); @@ -473,7 +472,7 @@ initarm(struct arm_boot_params *abp) /* Define a macro to simplify memory allocation */ #define valloc_pages(var, np) \ alloc_pages((var).pv_va, (np)); \ - (var).pv_pa = (var).pv_va + (KERNPHYSADDR - KERNVIRTADDR); + (var).pv_pa = (var).pv_va + (abp->abp_physaddr - KERNVIRTADDR); #define alloc_pages(var, np) \ (var) = freemempos; \ @@ -493,7 +492,7 @@ initarm(struct arm_boot_params *abp) L2_TABLE_SIZE_REAL; kernel_pt_table[i].pv_pa = kernel_pt_table[i].pv_va - KERNVIRTADDR + - KERNPHYSADDR; + abp->abp_physaddr; } } /* @@ -591,7 +590,6 @@ initarm(struct arm_boot_params *abp) printf("Warning: No soc support for %s found.\n", soc_info.name); memsize = board_init(); - physmem = memsize / PAGE_SIZE; /* * Pages were allocated during the secondary bootstrap for the @@ -630,8 +628,6 @@ initarm(struct arm_boot_params *abp) arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL); pmap_curmaxkvaddr = afterkern + L1_S_SIZE * (KERNEL_PT_KERN_NUM - 1); - arm_dump_avail_init(abp->abp_physaddr, memsize, - sizeof(dump_avail)/sizeof(dump_avail[0])); /* Always use the 256MB of KVA we have available between the kernel and devices */ vm_max_kernel_address = KERNVIRTADDR + (256 << 20); pmap_bootstrap(freemempos, &kernel_l1pt); @@ -639,15 +635,21 @@ initarm(struct arm_boot_params *abp) msgbufinit(msgbufp, msgbufsize); mutex_init(); - i = 0; -#if PHYSADDR != KERNPHYSADDR - phys_avail[i++] = PHYSADDR; - phys_avail[i++] = KERNPHYSADDR; -#endif - phys_avail[i++] = virtual_avail - KERNVIRTADDR + KERNPHYSADDR; - phys_avail[i++] = PHYSADDR + memsize; - phys_avail[i++] = 0; - phys_avail[i++] = 0; + /* + * Add the physical ram we have available. + * + * Exclude the kernel, and all the things we allocated which immediately + * follow the kernel, from the VM allocation pool but not from crash + * dumps. virtual_avail is a global variable which tracks the kva we've + * "allocated" while setting up pmaps. + * + * Prepare the list of physical memory available to the vm subsystem. + */ + arm_physmem_hardware_region(PHYSADDR, memsize); + arm_physmem_exclude_region(abp->abp_physaddr, + virtual_avail - KERNVIRTADDR, EXFLAG_NOALLOC); + arm_physmem_init_kernel_globals(); + init_param2(physmem); kdb_init(); return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - Modified: stable/10/sys/arm/conf/VYBRID.common ============================================================================== --- stable/10/sys/arm/conf/VYBRID.common Thu May 15 20:41:16 2014 (r266193) +++ stable/10/sys/arm/conf/VYBRID.common Thu May 15 20:58:23 2014 (r266194) @@ -61,11 +61,11 @@ options BREAK_TO_DEBUGGER #options VERBOSE_SYSINIT #Enable verbose sysinit messages options KDB options DDB #Enable the kernel debugger -options INVARIANTS #Enable calls of extra sanity checking -options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +#options INVARIANTS #Enable calls of extra sanity checking +#options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS #Enable checks to detect deadlocks and cycles #options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed -options DIAGNOSTIC +#options DIAGNOSTIC # NFS support options NFSCL #Network Filesystem Client Modified: stable/10/sys/arm/econa/econa_machdep.c ============================================================================== --- stable/10/sys/arm/econa/econa_machdep.c Thu May 15 20:41:16 2014 (r266193) +++ stable/10/sys/arm/econa/econa_machdep.c Thu May 15 20:58:23 2014 (r266194) @@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -98,9 +99,6 @@ struct pv_addr kernel_pt_table[NUM_KERNE /* Physical and virtual addresses for some global pages */ -vm_paddr_t phys_avail[10]; -vm_paddr_t dump_avail[4]; - struct pv_addr systempage; struct pv_addr msgbufpv; struct pv_addr irqstack; @@ -180,6 +178,7 @@ initarm(struct arm_boot_params *abp) boothowto = RB_VERBOSE; lastaddr = parse_boot_param(abp); + arm_physmem_kernaddr = abp->abp_physaddr; set_cpufuncs(); pcpu0_init(); @@ -191,7 +190,7 @@ initarm(struct arm_boot_params *abp) /* Define a macro to simplify memory allocation */ #define valloc_pages(var, np) \ alloc_pages((var).pv_va, (np)); \ - (var).pv_pa = (var).pv_va + (KERNPHYSADDR - KERNVIRTADDR); + (var).pv_pa = (var).pv_va + (abp->abp_physaddr - KERNVIRTADDR); #define alloc_pages(var, np) \ (var) = freemempos; \ @@ -211,7 +210,7 @@ initarm(struct arm_boot_params *abp) L2_TABLE_SIZE_REAL; kernel_pt_table[loop].pv_pa = kernel_pt_table[loop].pv_va - KERNVIRTADDR + - KERNPHYSADDR; + abp->abp_physaddr; } } /* @@ -284,7 +283,6 @@ initarm(struct arm_boot_params *abp) cninit(); mem_info = ((*ddr) >> 4) & 0x3; memsize = (8<abp_physaddr, memsize, - sizeof(dump_avail) / sizeof(dump_avail[0])); vm_max_kernel_address = KERNVIRTADDR + 3 * memsize; pmap_bootstrap(freemempos, &kernel_l1pt); @@ -332,16 +328,21 @@ initarm(struct arm_boot_params *abp) mutex_init(); - i = 0; -#if PHYSADDR != KERNPHYSADDR - phys_avail[i++] = PHYSADDR; - phys_avail[i++] = KERNPHYSADDR; -#endif - phys_avail[i++] = virtual_avail - KERNVIRTADDR + KERNPHYSADDR; - - phys_avail[i++] = PHYSADDR + memsize; - phys_avail[i++] = 0; - phys_avail[i++] = 0; + /* + * Add the physical ram we have available. + * + * Exclude the kernel, and all the things we allocated which immediately + * follow the kernel, from the VM allocation pool but not from crash + * dumps. virtual_avail is a global variable which tracks the kva we've + * "allocated" while setting up pmaps. + * + * Prepare the list of physical memory available to the vm subsystem. + */ + arm_physmem_hardware_region(PHYSADDR, memsize); + arm_physmem_exclude_region(abp->abp_physaddr, + virtual_avail - KERNVIRTADDR, EXFLAG_NOALLOC); + arm_physmem_init_kernel_globals(); + init_param2(physmem); kdb_init(); Modified: stable/10/sys/arm/include/cpu.h ============================================================================== --- stable/10/sys/arm/include/cpu.h Thu May 15 20:41:16 2014 (r266193) +++ stable/10/sys/arm/include/cpu.h Thu May 15 20:58:23 2014 (r266194) @@ -35,6 +35,11 @@ get_cyclecount(void) extern vm_offset_t vector_page; +/* + * Params passed into initarm. If you change the size of this you will + * need to update locore.S to allocate more memory on the stack before + * it calls initarm. + */ struct arm_boot_params { register_t abp_size; /* Size of this structure */ register_t abp_r0; /* r0 from the boot loader */ @@ -42,6 +47,7 @@ struct arm_boot_params { register_t abp_r2; /* r2 from the boot loader */ register_t abp_r3; /* r3 from the boot loader */ vm_offset_t abp_physaddr; /* The kernel physical address */ + vm_offset_t abp_pagetable; /* The early page table */ }; void arm_vector_init(vm_offset_t, int); Modified: stable/10/sys/arm/include/machdep.h ============================================================================== --- stable/10/sys/arm/include/machdep.h Thu May 15 20:41:16 2014 (r266193) +++ stable/10/sys/arm/include/machdep.h Thu May 15 20:58:23 2014 (r266194) @@ -71,7 +71,4 @@ void initarm_late_init(void); void board_set_serial(uint64_t); void board_set_revision(uint32_t); -/* Setup standard arrays */ -void arm_dump_avail_init(vm_paddr_t, vm_offset_t, size_t); - #endif /* !_MACHINE_MACHDEP_H_ */ Copied and modified: stable/10/sys/arm/include/physmem.h (from r261643, head/sys/arm/include/physmem.h) ============================================================================== --- head/sys/arm/include/physmem.h Sat Feb 8 23:54:16 2014 (r261643, copy source) +++ stable/10/sys/arm/include/physmem.h Thu May 15 20:58:23 2014 (r266194) @@ -30,6 +30,11 @@ #define _MACHINE_PHYSMEM_H_ /* + * The physical address at which the kernel was loaded. + */ +extern vm_paddr_t arm_physmem_kernaddr; + +/* * Routines to help configure physical ram. * * Multiple regions of contiguous physical ram can be added (in any order). @@ -47,8 +52,8 @@ #define EXFLAG_NODUMP 0x01 #define EXFLAG_NOALLOC 0x02 -void arm_physmem_hardware_region(vm_offset_t pa, vm_size_t sz); -void arm_physmem_exclude_region(vm_offset_t pa, vm_size_t sz, uint32_t flags); +void arm_physmem_hardware_region(vm_paddr_t pa, vm_size_t sz); +void arm_physmem_exclude_region(vm_paddr_t pa, vm_size_t sz, uint32_t flags); void arm_physmem_init_kernel_globals(void); void arm_physmem_print_tables(void); Modified: stable/10/sys/arm/s3c2xx0/s3c24x0_machdep.c ============================================================================== --- stable/10/sys/arm/s3c2xx0/s3c24x0_machdep.c Thu May 15 20:41:16 2014 (r266193) +++ stable/10/sys/arm/s3c2xx0/s3c24x0_machdep.c Thu May 15 20:58:23 2014 (r266194) @@ -70,6 +70,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -113,9 +114,6 @@ struct pv_addr kernel_pt_table[NUM_KERNE /* Physical and virtual addresses for some global pages */ -vm_paddr_t phys_avail[10]; -vm_paddr_t dump_avail[4]; - struct pv_addr systempage; struct pv_addr msgbufpv; struct pv_addr irqstack; @@ -227,6 +225,7 @@ initarm(struct arm_boot_params *abp) boothowto = 0; /* Likely not needed */ lastaddr = parse_boot_param(abp); + arm_physmem_kernaddr = abp->abp_physaddr; i = 0; set_cpufuncs(); cpufuncs.cf_sleep = s3c24x0_sleep; @@ -241,7 +240,7 @@ initarm(struct arm_boot_params *abp) /* Define a macro to simplify memory allocation */ #define valloc_pages(var, np) \ alloc_pages((var).pv_va, (np)); \ - (var).pv_pa = (var).pv_va + (KERNPHYSADDR - KERNVIRTADDR); + (var).pv_pa = (var).pv_va + (abp->abp_physaddr - KERNVIRTADDR); #define alloc_pages(var, np) \ (var) = freemempos; \ @@ -261,7 +260,7 @@ initarm(struct arm_boot_params *abp) L2_TABLE_SIZE_REAL; kernel_pt_table[loop].pv_pa = kernel_pt_table[loop].pv_va - KERNVIRTADDR + - KERNPHYSADDR; + abp->abp_physaddr; } } /* @@ -384,20 +383,26 @@ initarm(struct arm_boot_params *abp) arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL); pmap_curmaxkvaddr = afterkern + 0x100000 * (KERNEL_PT_KERN_NUM - 1); - arm_dump_avail_init(abp->abp_physaddr, memsize, - sizeof(dump_avail) / sizeof(dump_avail[0])); vm_max_kernel_address = KERNVIRTADDR + 3 * memsize; pmap_bootstrap(freemempos, &kernel_l1pt); msgbufp = (void*)msgbufpv.pv_va; msgbufinit(msgbufp, msgbufsize); mutex_init(); - physmem = memsize / PAGE_SIZE; - - phys_avail[0] = virtual_avail - KERNVIRTADDR + KERNPHYSADDR; - phys_avail[1] = PHYSADDR + memsize; - phys_avail[2] = 0; - phys_avail[3] = 0; + /* + * Add the physical ram we have available. + * + * Exclude the kernel, and all the things we allocated which immediately + * follow the kernel, from the VM allocation pool but not from crash + * dumps. virtual_avail is a global variable which tracks the kva we've + * "allocated" while setting up pmaps. + * + * Prepare the list of physical memory available to the vm subsystem. + */ + arm_physmem_hardware_region(PHYSADDR, memsize); + arm_physmem_exclude_region(abp->abp_physaddr, + virtual_avail - KERNVIRTADDR, EXFLAG_NOALLOC); + arm_physmem_init_kernel_globals(); init_param2(physmem); kdb_init(); Modified: stable/10/sys/arm/sa11x0/assabet_machdep.c ============================================================================== --- stable/10/sys/arm/sa11x0/assabet_machdep.c Thu May 15 20:41:16 2014 (r266193) +++ stable/10/sys/arm/sa11x0/assabet_machdep.c Thu May 15 20:58:23 2014 (r266194) @@ -87,6 +87,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include + #include #include @@ -122,8 +124,6 @@ extern vm_offset_t sa1_cache_clean_addr; #endif /* Physical and virtual addresses for some global pages */ -vm_paddr_t phys_avail[10]; -vm_paddr_t dump_avail[4]; vm_paddr_t physical_start; vm_paddr_t physical_end; vm_paddr_t physical_freestart; @@ -202,9 +202,9 @@ initarm(struct arm_boot_params *abp) boothowto = RB_VERBOSE | RB_SINGLE; /* Default value */ lastaddr = parse_boot_param(abp); + arm_physmem_kernaddr = abp->abp_physaddr; cninit(); set_cpufuncs(); - physmem = memsize / PAGE_SIZE; pcpu0_init(); /* Do basic tuning, hz etc */ @@ -374,16 +374,25 @@ initarm(struct arm_boot_params *abp) cpu_setup(""); pmap_curmaxkvaddr = freemempos + KERNEL_PT_VMDATA_NUM * 0x400000; - - dump_avail[0] = phys_avail[0] = round_page(virtual_avail); - dump_avail[1] = phys_avail[1] = 0xc0000000 + 0x02000000 - 1; - dump_avail[2] = phys_avail[2] = 0; - dump_avail[3] = phys_avail[3] = 0; - mutex_init(); vm_max_kernel_address = 0xd0000000; pmap_bootstrap(freemempos, &kernel_l1pt); + /* + * Add the physical ram we have available. + * + * Exclude the kernel (and all the things we allocated which immediately + * follow the kernel) from the VM allocation pool but not from crash + * dumps. virtual_avail is a global variable which tracks the kva we've + * "allocated" while setting up pmaps. + * + * Prepare the list of physical memory available to the vm subsystem. + */ + arm_physmem_hardware_region(physical_start, memsize); + arm_physmem_exclude_region(abp->abp_physaddr, + virtual_avail - KERNVIRTADDR, EXFLAG_NOALLOC); + arm_physmem_init_kernel_globals(); + init_param2(physmem); kdb_init(); return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu May 15 21:21:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A75DDB8; Thu, 15 May 2014 21:21:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 658FB24C8; Thu, 15 May 2014 21:21:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FLLoBV014246; Thu, 15 May 2014 21:21:50 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FLLl4o014230; Thu, 15 May 2014 21:21:47 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405152121.s4FLLl4o014230@svn.freebsd.org> From: Ian Lepore Date: Thu, 15 May 2014 21:21:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266196 - in stable/10/sys: arm/arm arm/at91 dev/fdt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 21:21:50 -0000 Author: ian Date: Thu May 15 21:21:47 2014 New Revision: 266196 URL: http://svnweb.freebsd.org/changeset/base/266196 Log: MFC r261681, r261682, r261683, r261684, r261685, r261686, r261687, r261688, r261689, r261690, r261783, r261791, r261836, r261837, r261841, Add FDT matching code to AT91 device drivers. Better nomatch messages: include compat string. Also, flag devices as disabled in the successful probe message, but leave what that means to the actual driver (no semantic changes). Fix Embest board name and id. Honor the disabled status by only grabbing resources and returning when running under FDT in the AT91 SPI driver. Modified: stable/10/sys/arm/arm/locore.S stable/10/sys/arm/at91/at91_machdep.c stable/10/sys/arm/at91/at91_mci.c stable/10/sys/arm/at91/at91_pio.c stable/10/sys/arm/at91/at91_pit.c stable/10/sys/arm/at91/at91_pmc.c stable/10/sys/arm/at91/at91_rst.c stable/10/sys/arm/at91/at91_spi.c stable/10/sys/arm/at91/at91_twi.c stable/10/sys/arm/at91/at91_wdt.c stable/10/sys/arm/at91/board_eb9200.c stable/10/sys/arm/at91/if_ate.c stable/10/sys/dev/fdt/simplebus.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/locore.S ============================================================================== --- stable/10/sys/arm/arm/locore.S Thu May 15 21:19:13 2014 (r266195) +++ stable/10/sys/arm/arm/locore.S Thu May 15 21:21:47 2014 (r266196) @@ -170,8 +170,8 @@ Lunmapped: #if defined(SOCDEV_PA) && defined(SOCDEV_VA) /* Create the custom map */ - ldr r1, =SOCDEV_VA - ldr r2, =SOCDEV_PA + ldr r1, =SOCDEV_PA + ldr r2, =SOCDEV_VA bl build_pagetables #endif Modified: stable/10/sys/arm/at91/at91_machdep.c ============================================================================== --- stable/10/sys/arm/at91/at91_machdep.c Thu May 15 21:19:13 2014 (r266195) +++ stable/10/sys/arm/at91/at91_machdep.c Thu May 15 21:21:47 2014 (r266196) @@ -590,6 +590,11 @@ initarm(struct arm_boot_params *abp) printf("Warning: No soc support for %s found.\n", soc_info.name); memsize = board_init(); + if (memsize == -1) { + printf("board_init() failed, cannot determine ram size; " + "assuming 16MB\n"); + memsize = 16 * 1024 * 1024; + } /* * Pages were allocated during the secondary bootstrap for the Modified: stable/10/sys/arm/at91/at91_mci.c ============================================================================== --- stable/10/sys/arm/at91/at91_mci.c Thu May 15 21:19:13 2014 (r266195) +++ stable/10/sys/arm/at91/at91_mci.c Thu May 15 21:21:47 2014 (r266196) @@ -25,6 +25,8 @@ * SUCH DAMAGE. */ +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); @@ -62,6 +64,12 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FDT +#include +#include +#include +#endif + #include "mmcbr_if.h" #include "opt_at91.h" @@ -342,7 +350,10 @@ at91_mci_fini(device_t dev) static int at91_mci_probe(device_t dev) { - +#ifdef FDT + if (!ofw_bus_is_compatible(dev, "atmel,hsmci")) + return (ENXIO); +#endif device_set_desc(dev, "MCI mmc/sd host bridge"); return (0); } @@ -1393,5 +1404,10 @@ static driver_t at91_mci_driver = { static devclass_t at91_mci_devclass; +#ifdef FDT +DRIVER_MODULE(at91_mci, simplebus, at91_mci_driver, at91_mci_devclass, NULL, + NULL); +#else DRIVER_MODULE(at91_mci, atmelarm, at91_mci_driver, at91_mci_devclass, NULL, NULL); +#endif Modified: stable/10/sys/arm/at91/at91_pio.c ============================================================================== --- stable/10/sys/arm/at91/at91_pio.c Thu May 15 21:19:13 2014 (r266195) +++ stable/10/sys/arm/at91/at91_pio.c Thu May 15 21:21:47 2014 (r266196) @@ -24,6 +24,8 @@ * SUCH DAMAGE. */ +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); @@ -48,6 +50,12 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FDT +#include +#include +#include +#endif + #define MAX_CHANGE 64 struct at91_pio_softc @@ -122,7 +130,10 @@ static int at91_pio_probe(device_t dev) { const char *name; - +#ifdef FDT + if (!ofw_bus_is_compatible(dev, "atmel,at91rm9200-gpio")) + return (ENXIO); +#endif switch (device_get_unit(dev)) { case 0: name = "PIOA"; @@ -136,6 +147,12 @@ at91_pio_probe(device_t dev) case 3: name = "PIOD"; break; + case 4: + name = "PIOE"; + break; + case 5: + name = "PIOF"; + break; default: name = "PIO"; break; @@ -609,5 +626,10 @@ static driver_t at91_pio_driver = { sizeof(struct at91_pio_softc), }; +#ifdef FDT +DRIVER_MODULE(at91_pio, simplebus, at91_pio_driver, at91_pio_devclass, NULL, + NULL); +#else DRIVER_MODULE(at91_pio, atmelarm, at91_pio_driver, at91_pio_devclass, NULL, NULL); +#endif Modified: stable/10/sys/arm/at91/at91_pit.c ============================================================================== --- stable/10/sys/arm/at91/at91_pit.c Thu May 15 21:19:13 2014 (r266195) +++ stable/10/sys/arm/at91/at91_pit.c Thu May 15 21:21:47 2014 (r266196) @@ -24,6 +24,8 @@ * SUCH DAMAGE. */ +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); @@ -48,6 +50,12 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FDT +#include +#include +#include +#endif + #ifndef PIT_PRESCALE #define PIT_PRESCALE (16) #endif @@ -83,6 +91,9 @@ at91_pit_delay(int us) uint64_t pit_freq; const uint64_t mhz = 1E6; + if (sc == NULL) + return; + last = PIT_PIV(RD4(sc, PIT_PIIR)); /* Max delay ~= 260s. @ 133Mhz */ @@ -111,7 +122,10 @@ static struct timecounter at91_pit_timec static int at91_pit_probe(device_t dev) { - +#ifdef FDT + if (!ofw_bus_is_compatible(dev, "atmel,at91sam9260-pit")) + return (ENXIO); +#endif device_set_desc(dev, "AT91SAM9 PIT"); return (0); } @@ -121,10 +135,8 @@ at91_pit_attach(device_t dev) { void *ih; int rid, err = 0; - struct at91_softc *at91_sc; struct resource *irq; - at91_sc = device_get_softc(device_get_parent(dev)); sc = device_get_softc(dev); sc->sc_dev = dev; @@ -158,22 +170,6 @@ out: return (err); } -static device_method_t at91_pit_methods[] = { - DEVMETHOD(device_probe, at91_pit_probe), - DEVMETHOD(device_attach, at91_pit_attach), - DEVMETHOD_END -}; - -static driver_t at91_pit_driver = { - "at91_pit", - at91_pit_methods, - sizeof(struct pit_softc), -}; - -static devclass_t at91_pit_devclass; - -DRIVER_MODULE(at91_pit, atmelarm, at91_pit_driver, at91_pit_devclass, NULL, - NULL); static int pit_intr(void *arg) @@ -202,3 +198,25 @@ at91_pit_get_timecount(struct timecounte icnt = piir >> 20; /* Overflows */ return (timecount + PIT_PIV(piir) + PIT_PIV(RD4(sc, PIT_MR)) * icnt); } + +static device_method_t at91_pit_methods[] = { + DEVMETHOD(device_probe, at91_pit_probe), + DEVMETHOD(device_attach, at91_pit_attach), + DEVMETHOD_END +}; + +static driver_t at91_pit_driver = { + "at91_pit", + at91_pit_methods, + sizeof(struct pit_softc), +}; + +static devclass_t at91_pit_devclass; + +#ifdef FDT +DRIVER_MODULE(at91_pit, simplebus, at91_pit_driver, at91_pit_devclass, NULL, + NULL); +#else +DRIVER_MODULE(at91_pit, atmelarm, at91_pit_driver, at91_pit_devclass, NULL, + NULL); +#endif Modified: stable/10/sys/arm/at91/at91_pmc.c ============================================================================== --- stable/10/sys/arm/at91/at91_pmc.c Thu May 15 21:19:13 2014 (r266195) +++ stable/10/sys/arm/at91/at91_pmc.c Thu May 15 21:21:47 2014 (r266196) @@ -24,6 +24,8 @@ * SUCH DAMAGE. */ +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); @@ -49,6 +51,12 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FDT +#include +#include +#include +#endif + static struct at91_pmc_softc { bus_space_tag_t sc_st; bus_space_handle_t sc_sh; @@ -526,6 +534,8 @@ at91_pmc_init_clock(void) uint32_t mckr; uint32_t mdiv; + soc_info.soc_data->soc_clock_init(); + main_clock = at91_pmc_sense_main_clock(); if (at91_is_sam9() || at91_is_sam9xe()) { @@ -650,7 +660,10 @@ errout: static int at91_pmc_probe(device_t dev) { - +#ifdef FDT + if (!ofw_bus_is_compatible(dev, "atmel,at91rm9200-pmc")) + return (ENXIO); +#endif device_set_desc(dev, "PMC"); return (0); } @@ -695,5 +708,10 @@ static driver_t at91_pmc_driver = { }; static devclass_t at91_pmc_devclass; +#ifdef FDT +DRIVER_MODULE(at91_pmc, simplebus, at91_pmc_driver, at91_pmc_devclass, NULL, + NULL); +#else DRIVER_MODULE(at91_pmc, atmelarm, at91_pmc_driver, at91_pmc_devclass, NULL, NULL); +#endif Modified: stable/10/sys/arm/at91/at91_rst.c ============================================================================== --- stable/10/sys/arm/at91/at91_rst.c Thu May 15 21:19:13 2014 (r266195) +++ stable/10/sys/arm/at91/at91_rst.c Thu May 15 21:21:47 2014 (r266196) @@ -23,6 +23,8 @@ * SUCH DAMAGE. */ +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); @@ -39,10 +41,19 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FDT +#include +#include +#include +#define FDT_HACKS 1 +#endif + #define RST_TIMEOUT (5) /* Seconds to hold NRST for hard reset */ #define RST_TICK (20) /* sample NRST at hz/RST_TICK intervals */ +#ifndef FDT static int at91_rst_intr(void *arg); +#endif static struct at91_rst_softc { struct resource *mem_res; /* Memory resource */ @@ -93,6 +104,10 @@ at91_rst_cpu_reset(void) static int at91_rst_probe(device_t dev) { +#ifdef FDT + if (!ofw_bus_is_compatible(dev, "atmel,at91sam9260-rstc")) + return (ENXIO); +#endif device_set_desc(dev, "AT91SAM9 Reset Controller"); return (0); @@ -103,7 +118,7 @@ at91_rst_attach(device_t dev) { struct at91_rst_softc *sc; const char *cause; - int rid, err; + int rid, err = 0; at91_rst_sc = sc = device_get_softc(dev); sc->sc_dev = dev; @@ -118,6 +133,8 @@ at91_rst_attach(device_t dev) err = ENOMEM; goto out; } + +#ifndef FDT_HACKS rid = 0; sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE | RF_SHAREABLE); @@ -132,6 +149,7 @@ at91_rst_attach(device_t dev) at91_rst_intr, NULL, sc, &sc->intrhand); if (err) device_printf(dev, "could not establish interrupt handler.\n"); +#endif WR4(at91_rst_sc, RST_MR, RST_MR_ERSTL(0xd) | RST_MR_URSIEN | RST_MR_KEY); @@ -161,6 +179,7 @@ out: return (err); } +#ifndef FDT_HACKS static void at91_rst_tick(void *argp) { @@ -191,6 +210,7 @@ at91_rst_intr(void *argp) } return (FILTER_STRAY); } +#endif static device_method_t at91_rst_methods[] = { DEVMETHOD(device_probe, at91_rst_probe), @@ -206,5 +226,10 @@ static driver_t at91_rst_driver = { static devclass_t at91_rst_devclass; +#ifdef FDT +DRIVER_MODULE(at91_rst, simplebus, at91_rst_driver, at91_rst_devclass, NULL, + NULL); +#else DRIVER_MODULE(at91_rst, atmelarm, at91_rst_driver, at91_rst_devclass, NULL, NULL); +#endif Modified: stable/10/sys/arm/at91/at91_spi.c ============================================================================== --- stable/10/sys/arm/at91/at91_spi.c Thu May 15 21:19:13 2014 (r266195) +++ stable/10/sys/arm/at91/at91_spi.c Thu May 15 21:21:47 2014 (r266196) @@ -25,6 +25,8 @@ * SUCH DAMAGE. */ +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); @@ -49,6 +51,12 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FDT +#include +#include +#include +#endif + #include "spibus_if.h" struct at91_spi_softc @@ -96,7 +104,10 @@ static void at91_spi_intr(void *arg); static int at91_spi_probe(device_t dev) { - +#ifdef FDT + if (!ofw_bus_is_compatible(dev, "atmel,at91rm9200-spi")) + return (ENXIO); +#endif device_set_desc(dev, "AT91 SPI"); return (0); } @@ -120,6 +131,15 @@ at91_spi_attach(device_t dev) if (err) goto out; +#ifdef FDT + /* + * Disable devices need to hold their resources, so return now and not attach + * the spibus, setup interrupt handlers, etc. + */ + if (!ofw_bus_status_okay(dev)) + return 0; +#endif + /* * Set up the hardware. */ @@ -428,5 +448,10 @@ static driver_t at91_spi_driver = { sizeof(struct at91_spi_softc), }; +#ifdef FDT +DRIVER_MODULE(at91_spi, simplebus, at91_spi_driver, at91_spi_devclass, NULL, + NULL); +#else DRIVER_MODULE(at91_spi, atmelarm, at91_spi_driver, at91_spi_devclass, NULL, NULL); +#endif Modified: stable/10/sys/arm/at91/at91_twi.c ============================================================================== --- stable/10/sys/arm/at91/at91_twi.c Thu May 15 21:19:13 2014 (r266195) +++ stable/10/sys/arm/at91/at91_twi.c Thu May 15 21:21:47 2014 (r266196) @@ -23,6 +23,8 @@ * SUCH DAMAGE. */ +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); @@ -46,6 +48,12 @@ __FBSDID("$FreeBSD$"); #include #include "iicbus_if.h" +#ifdef FDT +#include +#include +#include +#endif + #define TWI_SLOW_CLOCK 1500 #define TWI_FAST_CLOCK 45000 #define TWI_FASTEST_CLOCK 90000 @@ -104,7 +112,11 @@ static void at91_twi_deactivate(device_t static int at91_twi_probe(device_t dev) { - +#ifdef FDT + /* XXXX need a whole list, since there's at least 4 different ones */ + if (!ofw_bus_is_compatible(dev, "atmel,at91sam9g20-i2c")) + return (ENXIO); +#endif device_set_desc(dev, "TWI"); return (0); } @@ -122,6 +134,15 @@ at91_twi_attach(device_t dev) AT91_TWI_LOCK_INIT(sc); +#ifdef FDT + /* + * Disable devices need to hold their resources, so return now and not attach + * the iicbus, setup interrupt handlers, etc. + */ + if (!ofw_bus_status_okay(dev)) + return 0; +#endif + /* * Activate the interrupt */ @@ -397,7 +418,12 @@ static driver_t at91_twi_driver = { sizeof(struct at91_twi_softc), }; +#ifdef FDT +DRIVER_MODULE(at91_twi, simplebus, at91_twi_driver, at91_twi_devclass, NULL, + NULL); +#else DRIVER_MODULE(at91_twi, atmelarm, at91_twi_driver, at91_twi_devclass, NULL, NULL); +#endif DRIVER_MODULE(iicbus, at91_twi, iicbus_driver, iicbus_devclass, NULL, NULL); MODULE_DEPEND(at91_twi, iicbus, 1, 1, 1); Modified: stable/10/sys/arm/at91/at91_wdt.c ============================================================================== --- stable/10/sys/arm/at91/at91_wdt.c Thu May 15 21:19:13 2014 (r266195) +++ stable/10/sys/arm/at91/at91_wdt.c Thu May 15 21:21:47 2014 (r266196) @@ -29,6 +29,8 @@ * handler. The watchdog is halted in processor debug mode. */ +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); @@ -45,6 +47,12 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FDT +#include +#include +#include +#endif + struct wdt_softc { struct mtx sc_mtx; device_t sc_dev; @@ -131,12 +139,12 @@ wdt_tick(void *argp) static int wdt_probe(device_t dev) { - - if (at91_is_sam9() || at91_is_sam9xe()) { - device_set_desc(dev, "WDT"); - return (0); - } - return (ENXIO); +#ifdef FDT + if (!ofw_bus_is_compatible(dev, "atmel,at91sam9260-wdt")) + return (ENXIO); +#endif + device_set_desc(dev, "WDT"); + return (0); } static int @@ -223,4 +231,8 @@ static driver_t wdt_driver = { static devclass_t wdt_devclass; +#ifdef FDT +DRIVER_MODULE(at91_wdt, simplebus, wdt_driver, wdt_devclass, NULL, NULL); +#else DRIVER_MODULE(at91_wdt, atmelarm, wdt_driver, wdt_devclass, NULL, NULL); +#endif Modified: stable/10/sys/arm/at91/board_eb9200.c ============================================================================== --- stable/10/sys/arm/at91/board_eb9200.c Thu May 15 21:19:13 2014 (r266195) +++ stable/10/sys/arm/at91/board_eb9200.c Thu May 15 21:21:47 2014 (r266196) @@ -65,4 +65,4 @@ board_init(void) return (at91_ramsize()); } -ARM_BOARD(KB9200, "Kwikbyte KB920x") +ARM_BOARD(ATEB9200, "Embest ATEB9200") Modified: stable/10/sys/arm/at91/if_ate.c ============================================================================== --- stable/10/sys/arm/at91/if_ate.c Thu May 15 21:19:13 2014 (r266195) +++ stable/10/sys/arm/at91/if_ate.c Thu May 15 21:21:47 2014 (r266196) @@ -30,6 +30,8 @@ * 2) GPIO initializtion in board setup code. */ +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); @@ -74,6 +76,12 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FDT +#include +#include +#include +#endif + #include "miibus_if.h" /* @@ -229,7 +237,10 @@ static int ate_miibus_writereg(device_t static int ate_probe(device_t dev) { - +#ifdef FDT + if (!ofw_bus_is_compatible(dev, "cdns,at32ap7000-macb")) + return (ENXIO); +#endif device_set_desc(dev, "EMAC"); return (0); } @@ -1458,7 +1469,11 @@ static driver_t ate_driver = { sizeof(struct ate_softc), }; +#ifdef FDT +DRIVER_MODULE(ate, simplebus, ate_driver, ate_devclass, NULL, NULL); +#else DRIVER_MODULE(ate, atmelarm, ate_driver, ate_devclass, NULL, NULL); +#endif DRIVER_MODULE(miibus, ate, miibus_driver, miibus_devclass, NULL, NULL); MODULE_DEPEND(ate, miibus, 1, 1, 1); MODULE_DEPEND(ate, ether, 1, 1, 1); Modified: stable/10/sys/dev/fdt/simplebus.c ============================================================================== --- stable/10/sys/dev/fdt/simplebus.c Thu May 15 21:19:13 2014 (r266195) +++ stable/10/sys/dev/fdt/simplebus.c Thu May 15 21:21:47 2014 (r266196) @@ -401,18 +401,24 @@ simplebus_print_res(struct simplebus_dev static void simplebus_probe_nomatch(device_t bus, device_t child) { - const char *name, *type; + const char *name, *type, *compat; if (!bootverbose) return; name = ofw_bus_get_name(child); type = ofw_bus_get_type(child); + compat = ofw_bus_get_compat(child); device_printf(bus, "<%s>", name != NULL ? name : "unknown"); simplebus_print_res(device_get_ivars(child)); - printf(" type %s (no driver attached)\n", - type != NULL ? type : "unknown"); + if (!ofw_bus_status_okay(child)) + printf(" disabled"); + if (type) + printf(" type %s", type); + if (compat) + printf(" compat %s", compat); + printf(" (no driver attached)\n"); } static int @@ -422,7 +428,8 @@ simplebus_print_child(device_t bus, devi rv = bus_print_child_header(bus, child); rv += simplebus_print_res(device_get_ivars(child)); + if (!ofw_bus_status_okay(child)) + rv += printf(" disabled"); rv += bus_print_child_footer(bus, child); return (rv); } - From owner-svn-src-stable@FreeBSD.ORG Thu May 15 21:41:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C911C4B3; Thu, 15 May 2014 21:41:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8AAA26C6; Thu, 15 May 2014 21:41:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FLfXa2023035; Thu, 15 May 2014 21:41:33 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FLfWVI023030; Thu, 15 May 2014 21:41:32 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405152141.s4FLfWVI023030@svn.freebsd.org> From: Ian Lepore Date: Thu, 15 May 2014 21:41:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266197 - in stable/10/sys: arm/arm arm/at91 kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 21:41:34 -0000 Author: ian Date: Thu May 15 21:41:32 2014 New Revision: 266197 URL: http://svnweb.freebsd.org/changeset/base/266197 Log: MFC r261786, r261789 Rework the EARLY_PRINTF mechanism. Instead of defining a special eprintf() routine, now a platform can provide a pointer to an early_putc() routine which is used instead of cn_putc(). Control can be handed off from early printf support to standard console support by NULLing out the pointer during standard console init. Convert two while(1); statements into proper panics. Modified: stable/10/sys/arm/arm/machdep.c stable/10/sys/arm/at91/uart_dev_at91usart.c stable/10/sys/kern/kern_cons.c stable/10/sys/kern/subr_prf.c stable/10/sys/sys/systm.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/machdep.c ============================================================================== --- stable/10/sys/arm/arm/machdep.c Thu May 15 21:21:47 2014 (r266196) +++ stable/10/sys/arm/arm/machdep.c Thu May 15 21:41:32 2014 (r266197) @@ -1056,10 +1056,10 @@ initarm(struct arm_boot_params *abp) #endif if (OF_install(OFW_FDT, 0) == FALSE) - while (1); + panic("Cannot install FDT"); if (OF_init((void *)dtbp) != 0) - while (1); + panic("OF_init failed with the found device tree"); /* Grab physical memory regions information from device tree. */ if (fdt_get_mem_regions(mem_regions, &mem_regions_sz, &memsize) != 0) Modified: stable/10/sys/arm/at91/uart_dev_at91usart.c ============================================================================== --- stable/10/sys/arm/at91/uart_dev_at91usart.c Thu May 15 21:21:47 2014 (r266196) +++ stable/10/sys/arm/at91/uart_dev_at91usart.c Thu May 15 21:41:32 2014 (r266197) @@ -228,6 +228,27 @@ static struct uart_ops at91_usart_ops = .getc = at91_usart_getc, }; +#ifdef EARLY_PRINTF +/* + * Early printf support. This assumes that we have the SoC "system" devices + * mapped into AT91_BASE. To use this before we adjust the boostrap tables, + * you'll need to define SOCDEV_VA to be 0xdc000000 and SOCDEV_PA to be + * 0xfc000000 in your config file where you define EARLY_PRINTF + */ +volatile uint32_t *at91_dbgu = (volatile uint32_t *)(AT91_BASE + AT91_DBGU0); + +static void +eputc(int c) +{ + + while (!(at91_dbgu[USART_CSR / 4] & USART_CSR_TXRDY)) + continue; + at91_dbgu[USART_THR / 4] = c; +} + +early_putc_t * early_putc = eputc; +#endif + static int at91_usart_probe(struct uart_bas *bas) { @@ -244,6 +265,22 @@ at91_usart_init(struct uart_bas *bas, in int parity) { +#ifdef EARLY_PRINTF + if (early_putc != NULL) { + printf("Early printf yielding control to the real console.\n"); + early_putc = NULL; + } +#endif + + /* + * This routine is called multiple times, sometimes right after writing + * some output, and the last byte is still shifting out. If that's the + * case delay briefly before resetting, but don't loop on TXRDY because + * we don't want to hang here forever if the hardware is in a bad state. + */ + if (!(RD4(bas, USART_CSR) & USART_CSR_TXRDY)) + DELAY(1000); + at91_usart_param(bas, baudrate, databits, stopbits, parity); /* Reset the rx and tx buffers and turn on rx and tx */ @@ -276,28 +313,6 @@ at91_usart_putc(struct uart_bas *bas, in WR4(bas, USART_THR, c); } -#ifdef EARLY_PRINTF -/* - * Early printf support. This assumes that we have the SoC "system" devices - * mapped into AT91_BASE. To use this before we adjust the boostrap tables, - * You'll need to define SOCDEV_VA to be 0xdc000000 and SOCDEV_PA to be - * 0xfc000000 in your config file where you define EARLY_PRINTF - */ -volatile uint32_t *at91_dbgu = (volatile uint32_t *)(AT91_BASE + AT91_DBGU0); - -void -eputc(int c) -{ - - if (c == '\n') - eputc('\r'); - - while (!(at91_dbgu[USART_CSR / 4] & USART_CSR_TXRDY)) - continue; - at91_dbgu[USART_THR / 4] = c; -} -#endif - /* * Check for a character available. */ Modified: stable/10/sys/kern/kern_cons.c ============================================================================== --- stable/10/sys/kern/kern_cons.c Thu May 15 21:21:47 2014 (r266196) +++ stable/10/sys/kern/kern_cons.c Thu May 15 21:41:32 2014 (r266197) @@ -464,6 +464,15 @@ cnputc(int c) struct consdev *cn; char *cp; +#ifdef EARLY_PRINTF + if (early_putc != NULL) { + if (c == '\n') + early_putc('\r'); + early_putc(c); + return; + } +#endif + if (cn_mute || c == '\0') return; STAILQ_FOREACH(cnd, &cn_devlist, cnd_next) { Modified: stable/10/sys/kern/subr_prf.c ============================================================================== --- stable/10/sys/kern/subr_prf.c Thu May 15 21:21:47 2014 (r266196) +++ stable/10/sys/kern/subr_prf.c Thu May 15 21:41:32 2014 (r266197) @@ -1122,25 +1122,3 @@ hexdump(const void *ptr, int length, con printf("\n"); } } -#ifdef EARLY_PRINTF -/* - * Support for calling an alternate printf early in boot (like before - * cn_init() can be called). Platforms need to define eputc that want - * to use this. - */ -static void -early_putc_func(int ch, void *arg __unused) -{ - eputc(ch); -} - -void -eprintf(const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - kvprintf(fmt, early_putc_func, NULL, 10, ap); - va_end(ap); -} -#endif Modified: stable/10/sys/sys/systm.h ============================================================================== --- stable/10/sys/sys/systm.h Thu May 15 21:21:47 2014 (r266196) +++ stable/10/sys/sys/systm.h Thu May 15 21:41:32 2014 (r266197) @@ -197,8 +197,8 @@ void init_param2(long physpages); void init_static_kenv(char *, size_t); void tablefull(const char *); #ifdef EARLY_PRINTF -void eprintf(const char *, ...) __printflike(1, 2); -void eputc(int ch); +typedef void early_putc_t(int ch); +extern early_putc_t *early_putc; #endif int kvprintf(char const *, void (*)(int, void*), void *, int, __va_list) __printflike(1, 0); From owner-svn-src-stable@FreeBSD.ORG Thu May 15 22:03:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E729830; Thu, 15 May 2014 22:03:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 78D572872; Thu, 15 May 2014 22:03:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FM3Rv9032078; Thu, 15 May 2014 22:03:27 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FM3PbP032056; Thu, 15 May 2014 22:03:25 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405152203.s4FM3PbP032056@svn.freebsd.org> From: Ian Lepore Date: Thu, 15 May 2014 22:03:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266198 - in stable/10/sys: arm/arm arm/freescale/imx arm/freescale/vybrid arm/include boot/fdt/dts dev/sdhci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 22:03:27 -0000 Author: ian Date: Thu May 15 22:03:24 2014 New Revision: 266198 URL: http://svnweb.freebsd.org/changeset/base/266198 Log: MFC r261803, r261808, r261814, r261815, r261816, r261817, r261818, r261826, r261848, r261855 On armv6 and later, use the WriteNotRead bit of the fault status register to decide what protections are required by the faulting access. Use the right symbols for determining arm architecture. Include the necessary header file which has the new FAULT_WNR symbol defined in it. Allow the kernel to be loaded at any 1MiB address. This requirement is because we use the 1MiB section maps as they only need a single pagetable. Add function for configuring Vybrid PLL4 (Audio) clock frequency output. imx6 changes ... - Fix the definition of the SDHCI_STATE_DAT and SDHCI_STATE_CMD fields, and add SDHCI_RETUNE_REQUEST. None of these are actually used in the code yet. - Write translation code for the SDHCI_PRESENT_STATE register. Freescale moved some bits around in their version of the register, adjust things so that the sdhci code sees the standard layout. - Add standard non-removable and cd-gpios properties to the usdhc devices. That generates references to gpio devices, so uncomment them even though there isn't a gpio driver to do anything with them yet. - Add handling of standard "non-removable" property, and also some workaround code so that if card detect is wired to a gpio pin, for now we just treat it the same as non-removable (because there isn't a gpio driver yet). - Enable both sdcard slots, but not the sdio-based wifi that we don't yet have a driver for. - Remove a couple obsolete function declarations. Modified: stable/10/sys/arm/arm/locore.S stable/10/sys/arm/arm/trap.c stable/10/sys/arm/freescale/imx/imx_machdep.h stable/10/sys/arm/freescale/imx/imx_sdhci.c stable/10/sys/arm/freescale/vybrid/vf_anadig.c stable/10/sys/arm/freescale/vybrid/vf_common.h stable/10/sys/arm/include/armreg.h stable/10/sys/boot/fdt/dts/imx6.dtsi stable/10/sys/boot/fdt/dts/wandboard-dual.dts stable/10/sys/boot/fdt/dts/wandboard-quad.dts stable/10/sys/boot/fdt/dts/wandboard-solo.dts stable/10/sys/dev/sdhci/sdhci.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/locore.S ============================================================================== --- stable/10/sys/arm/arm/locore.S Thu May 15 21:41:32 2014 (r266197) +++ stable/10/sys/arm/arm/locore.S Thu May 15 22:03:24 2014 (r266198) @@ -148,15 +148,31 @@ Lunmapped: * Build page table from scratch. */ - /* Load the page tables physical address */ - ldr r1, Lstartup_pagetable - ldr r2, =(KERNVIRTADDR - KERNPHYSADDR) + /* Find the delta between VA and PA */ + adr r0, Lpagetable + ldr r1, [r0] + sub r2, r1, r0 + /* At this point: r2 = VA - PA */ + + /* + * Find the physical address of the table. After these two + * instructions: + * r1 = va(pagetable) + * + * r0 = va(pagetable) - (VA - PA) + * = va(pagetable) - VA + PA + * = pa(pagetable) + */ + ldr r1, [r0, #4] sub r0, r1, r2 /* * Map PA == VA */ - ldr r5, =(PHYSADDR) + /* Find the start kernels load address */ + adr r5, _start + ldr r2, =(L1_S_OFFSET) + bic r5, r2 mov r1, r5 mov r2, r5 /* Map 64MiB, preserved over calls to build_pagetables */ @@ -165,7 +181,7 @@ Lunmapped: /* Create the kernel map to jump to */ mov r1, r5 - ldr r2, =(KERNBASE) + ldr r2, =(KERNVIRTADDR) bl build_pagetables #if defined(SOCDEV_PA) && defined(SOCDEV_VA) @@ -223,16 +239,16 @@ mmu_done: virt_done: mov r1, #28 /* loader info size is 28 bytes also second arg */ subs sp, sp, r1 /* allocate arm_boot_params struct on stack */ - bic sp, sp, #7 /* align stack to 8 bytes */ mov r0, sp /* loader info pointer is first arg */ + bic sp, sp, #7 /* align stack to 8 bytes */ str r1, [r0] /* Store length of loader info */ str r9, [r0, #4] /* Store r0 from boot loader */ str r8, [r0, #8] /* Store r1 from boot loader */ str ip, [r0, #12] /* store r2 from boot loader */ str fp, [r0, #16] /* store r3 from boot loader */ - ldr r5, =KERNPHYSADDR /* load KERNPHYSADDR as the physical address */ str r5, [r0, #20] /* store the physical address */ - ldr r5, Lstartup_pagetable + adr r4, Lpagetable /* load the pagetable address */ + ldr r5, [r4, #4] str r5, [r0, #24] /* store the pagetable address */ mov fp, #0 /* trace back starts here */ bl _C_LABEL(initarm) /* Off we go */ @@ -279,16 +295,19 @@ build_pagetables: RET +Lpagetable: + .word . + .word pagetable + Lvirtaddr: .word KERNVIRTADDR Lphysaddr: .word KERNPHYSADDR Lreal_start: .word _start -Lend: +Lend: .word _edata -Lstartup_pagetable: - .word pagetable + #ifdef SMP Lstartup_pagetable_secondary: .word temp_pagetable Modified: stable/10/sys/arm/arm/trap.c ============================================================================== --- stable/10/sys/arm/arm/trap.c Thu May 15 21:41:32 2014 (r266197) +++ stable/10/sys/arm/arm/trap.c Thu May 15 22:03:24 2014 (r266198) @@ -108,6 +108,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -386,17 +387,16 @@ data_abort_handler(struct trapframe *tf) } /* - * We need to know whether the page should be mapped - * as R or R/W. The MMU does not give us the info as - * to whether the fault was caused by a read or a write. - * - * However, we know that a permission fault can only be - * the result of a write to a read-only location, so - * we can deal with those quickly. - * - * Otherwise we need to disassemble the instruction - * responsible to determine if it was a write. + * We need to know whether the page should be mapped as R or R/W. On + * armv6 and later the fault status register indicates whether the + * access was a read or write. Prior to armv6, we know that a + * permission fault can only be the result of a write to a read-only + * location, so we can deal with those quickly. Otherwise we need to + * disassemble the faulting instruction to determine if it was a write. */ +#if ARM_ARCH_6 || ARM_ARCH_7A + ftype = (fsr & FAULT_WNR) ? VM_PROT_READ | VM_PROT_WRITE : VM_PROT_READ; +#else if (IS_PERMISSION_FAULT(fsr)) ftype = VM_PROT_WRITE; else { @@ -413,6 +413,7 @@ data_abort_handler(struct trapframe *tf) ftype = VM_PROT_READ; } } +#endif /* * See if the fault is as a result of ref/mod emulation, Modified: stable/10/sys/arm/freescale/imx/imx_machdep.h ============================================================================== --- stable/10/sys/arm/freescale/imx/imx_machdep.h Thu May 15 21:41:32 2014 (r266197) +++ stable/10/sys/arm/freescale/imx/imx_machdep.h Thu May 15 22:03:24 2014 (r266198) @@ -33,7 +33,6 @@ /* Common functions, implemented in imx_machdep.c. */ -void imx_devmap_addentry(vm_paddr_t _pa, vm_size_t _sz); void imx_wdog_cpu_reset(vm_offset_t _wdcr_phys) __attribute__((__noreturn__)); /* From here down, routines are implemented in imxNN_machdep.c. */ @@ -57,8 +56,6 @@ void imx_wdog_cpu_reset(vm_offset_t _wdc u_int imx_soc_type(void); u_int imx_soc_family(void); -void imx_devmap_init(void); - /* * We need a clock management system that works across unrelated SoCs and * devices. For now, to keep imx development moving, define some barebones Modified: stable/10/sys/arm/freescale/imx/imx_sdhci.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx_sdhci.c Thu May 15 21:41:32 2014 (r266197) +++ stable/10/sys/arm/freescale/imx/imx_sdhci.c Thu May 15 22:03:24 2014 (r266198) @@ -71,6 +71,7 @@ struct imx_sdhci_softc { uint32_t r1bfix_intmask; uint8_t r1bfix_type; uint8_t hwtype; + boolean_t force_card_present; }; #define R1BFIX_NONE 0 /* No fix needed at next interrupt. */ @@ -89,6 +90,27 @@ struct imx_sdhci_softc { #define SDHC_VEND_HCKEN (1 << 12) #define SDHC_VEND_PEREN (1 << 13) +#define SDHC_PRES_STATE 0x24 +#define SDHC_PRES_CIHB (1 << 0) +#define SDHC_PRES_CDIHB (1 << 1) +#define SDHC_PRES_DLA (1 << 2) +#define SDHC_PRES_SDSTB (1 << 3) +#define SDHC_PRES_IPGOFF (1 << 4) +#define SDHC_PRES_HCKOFF (1 << 5) +#define SDHC_PRES_PEROFF (1 << 6) +#define SDHC_PRES_SDOFF (1 << 7) +#define SDHC_PRES_WTA (1 << 8) +#define SDHC_PRES_RTA (1 << 9) +#define SDHC_PRES_BWEN (1 << 10) +#define SDHC_PRES_BREN (1 << 11) +#define SDHC_PRES_RTR (1 << 12) +#define SDHC_PRES_CINST (1 << 16) +#define SDHC_PRES_CDPL (1 << 18) +#define SDHC_PRES_WPSPL (1 << 19) +#define SDHC_PRES_CLSL (1 << 23) +#define SDHC_PRES_DLSL_SHIFT 24 +#define SDHC_PRES_DLSL_MASK (0xffU << SDHC_PRES_DLSL_SHIFT) + #define SDHC_PROT_CTRL 0x28 #define SDHC_PROT_LED (1 << 0) #define SDHC_PROT_WIDTH_1BIT (0 << 1) @@ -254,8 +276,8 @@ imx_sdhci_read_2(device_t dev, struct sd wrk32 = RD4(sc, SDHC_VEND_SPEC); if (wrk32 & SDHC_VEND_FRC_SDCLK_ON) val32 |= SDHCI_CLOCK_INT_EN | SDHCI_CLOCK_CARD_EN; - wrk32 = RD4(sc, SDHCI_PRESENT_STATE); - if (wrk32 & 0x08) + wrk32 = RD4(sc, SDHC_PRES_STATE); + if (wrk32 & SDHC_PRES_SDSTB) val32 |= SDHCI_CLOCK_INT_STABLE; val32 |= sc->sdclockreg_freq_bits; return (val32); @@ -268,7 +290,9 @@ static uint32_t imx_sdhci_read_4(device_t dev, struct sdhci_slot *slot, bus_size_t off) { struct imx_sdhci_softc *sc = device_get_softc(dev); - uint32_t val32; + uint32_t val32, wrk32; + + val32 = RD4(sc, off); /* * The hardware leaves the base clock frequency out of the capabilities @@ -280,7 +304,6 @@ imx_sdhci_read_4(device_t dev, struct sd * doesn't yet handle (1.8v, suspend/resume, etc). */ if (off == SDHCI_CAPABILITIES) { - val32 = RD4(sc, off); val32 &= ~SDHCI_CAN_VDD_180; val32 &= ~SDHCI_CAN_DO_SUSPEND; val32 |= SDHCI_CAN_DO_8BITBUS; @@ -288,14 +311,30 @@ imx_sdhci_read_4(device_t dev, struct sd return (val32); } - val32 = RD4(sc, off); + /* + * The hardware moves bits around in the present state register to make + * room for all 8 data line state bits. To translate, mask out all the + * bits which are not in the same position in both registers (this also + * masks out some freescale-specific bits in locations defined as + * reserved by sdhci), then shift the data line and retune request bits + * down to their standard locations. + */ + if (off == SDHCI_PRESENT_STATE) { + wrk32 = val32; + val32 &= 0x000F0F07; + val32 |= (wrk32 >> 4) & SDHCI_STATE_DAT_MASK; + val32 |= (wrk32 >> 9) & SDHCI_RETUNE_REQUEST; + if (sc->force_card_present) + val32 |= SDHCI_CARD_PRESENT; + return (val32); + } /* * imx_sdhci_intr() can synthesize a DATA_END interrupt following a * command with an R1B response, mix it into the hardware status. */ if (off == SDHCI_INT_STATUS) { - val32 |= sc->r1bfix_intmask; + return (val32 | sc->r1bfix_intmask); } return val32; @@ -522,7 +561,7 @@ imx_sdhci_intr(void *arg) count = 0; /* XXX use a callout or something instead of busy-waiting. */ while (count < 250000 && - (RD4(sc, SDHCI_PRESENT_STATE) & SDHCI_DAT_ACTIVE)) { + (RD4(sc, SDHC_PRES_STATE) & SDHC_PRES_DLA)) { ++count; DELAY(1); } @@ -555,6 +594,7 @@ imx_sdhci_attach(device_t dev) { struct imx_sdhci_softc *sc = device_get_softc(dev); int rid, err; + phandle_t node; sc->dev = dev; @@ -621,6 +661,25 @@ imx_sdhci_attach(device_t dev) sdhci_init_slot(dev, &sc->slot, 0); + /* + * If the slot is flagged with the non-removable property, set our flag + * to always force the SDHCI_CARD_PRESENT bit on. + * + * XXX Workaround for gpio-based card detect... + * + * We don't have gpio support yet. If there's a cd-gpios property just + * force the SDHCI_CARD_PRESENT bit on for now. If there isn't really a + * card there it will fail to probe at the mmc layer and nothing bad + * happens except instantiating a /dev/mmcN device for an empty slot. + */ + node = ofw_bus_get_node(dev); + if (OF_hasprop(node, "non-removable")) + sc->force_card_present = true; + else if (OF_hasprop(node, "cd-gpios")) { + /* XXX put real gpio hookup here. */ + sc->force_card_present = true; + } + bus_generic_probe(dev); bus_generic_attach(dev); Modified: stable/10/sys/arm/freescale/vybrid/vf_anadig.c ============================================================================== --- stable/10/sys/arm/freescale/vybrid/vf_anadig.c Thu May 15 21:41:32 2014 (r266197) +++ stable/10/sys/arm/freescale/vybrid/vf_anadig.c Thu May 15 22:03:24 2014 (r266198) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ruslan Bukin + * Copyright (c) 2013-2014 Ruslan Bukin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -99,14 +99,19 @@ __FBSDID("$FreeBSD$"); #define CTRL_PLL_EN (1 << 13) #define EN_USB_CLKS (1 << 6) +#define PLL4_CTRL_DIV_SEL_S 0 +#define PLL4_CTRL_DIV_SEL_M 0x7f + struct anadig_softc { struct resource *res[1]; bus_space_tag_t bst; bus_space_handle_t bsh; }; +struct anadig_softc *anadig_sc; + static struct resource_spec anadig_spec[] = { - { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { SYS_RES_MEMORY, 0, RF_ACTIVE }, { -1, 0 } }; @@ -148,6 +153,28 @@ enable_pll(struct anadig_softc *sc, int return (0); } +uint32_t +pll4_configure_output(uint32_t mfi, uint32_t mfn, uint32_t mfd) +{ + struct anadig_softc *sc; + int reg; + + sc = anadig_sc; + + /* + * PLLout = Fsys * (MFI+(MFN/MFD)) + */ + + reg = READ4(sc, ANADIG_PLL4_CTRL); + reg &= ~(PLL4_CTRL_DIV_SEL_M << PLL4_CTRL_DIV_SEL_S); + reg |= (mfi << PLL4_CTRL_DIV_SEL_S); + WRITE4(sc, ANADIG_PLL4_CTRL, reg); + WRITE4(sc, ANADIG_PLL4_NUM, mfn); + WRITE4(sc, ANADIG_PLL4_DENOM, mfd); + + return (0); +} + static int anadig_attach(device_t dev) { @@ -165,11 +192,13 @@ anadig_attach(device_t dev) sc->bst = rman_get_bustag(sc->res[0]); sc->bsh = rman_get_bushandle(sc->res[0]); + anadig_sc = sc; + /* Enable USB PLLs */ enable_pll(sc, ANADIG_PLL3_CTRL); enable_pll(sc, ANADIG_PLL7_CTRL); - /* Enable other */ + /* Enable other PLLs */ enable_pll(sc, ANADIG_PLL1_CTRL); enable_pll(sc, ANADIG_PLL2_CTRL); enable_pll(sc, ANADIG_PLL4_CTRL); Modified: stable/10/sys/arm/freescale/vybrid/vf_common.h ============================================================================== --- stable/10/sys/arm/freescale/vybrid/vf_common.h Thu May 15 21:41:32 2014 (r266197) +++ stable/10/sys/arm/freescale/vybrid/vf_common.h Thu May 15 22:03:24 2014 (r266198) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ruslan Bukin + * Copyright (c) 2013-2014 Ruslan Bukin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -39,4 +39,5 @@ #define WRITE1(_sc, _reg, _val) \ bus_space_write_1(_sc->bst, _sc->bsh, _reg, _val) +uint32_t pll4_configure_output(uint32_t mfi, uint32_t mfn, uint32_t mfd); uint32_t tcon_bypass(void); Modified: stable/10/sys/arm/include/armreg.h ============================================================================== --- stable/10/sys/arm/include/armreg.h Thu May 15 21:41:32 2014 (r266197) +++ stable/10/sys/arm/include/armreg.h Thu May 15 22:03:24 2014 (r266198) @@ -403,6 +403,8 @@ #define FAULT_PERM_P 0x0f /* Permission -- Page */ #define FAULT_IMPRECISE 0x400 /* Imprecise exception (XSCALE) */ +#define FAULT_EXTERNAL 0x400 /* External abort (armv6+) */ +#define FAULT_WNR 0x800 /* Write-not-Read access (armv6+) */ /* * Address of the vector page, low and high versions. Modified: stable/10/sys/boot/fdt/dts/imx6.dtsi ============================================================================== --- stable/10/sys/boot/fdt/dts/imx6.dtsi Thu May 15 21:41:32 2014 (r266197) +++ stable/10/sys/boot/fdt/dts/imx6.dtsi Thu May 15 22:03:24 2014 (r266198) @@ -112,58 +112,75 @@ // status = "disabled"; // }; -// /* -// * GPIO modules moved up - to have it attached for -// * drivers which rely on GPIO -// */ -// gpio1: gpio@0209C000 { -// compatible = "fsl,imx51-gpio", "fsl,imx31-gpio"; -// reg = <0x0209C000 0x4000>; -// interrupt-parent = <&gic>; -// interrupts = <50 51 42 43 44 45 46 47 48 49>; -// /* TODO: use <> also */ -// gpio-controller; -// #gpio-cells = <2>; -// interrupt-controller; -// #interrupt-cells = <1>; -// status = "disabled"; -// }; -// -// gpio2: gpio@020A0000 { -// compatible = "fsl,imx51-gpio", "fsl,imx31-gpio"; -// reg = <0x020A0000 0x4000>; -// interrupt-parent = <&gic>; -// interrupts = <52 53>; -// gpio-controller; -// #gpio-cells = <2>; -// interrupt-controller; -// #interrupt-cells = <1>; -// status = "disabled"; -// }; -// -// gpio3: gpio@020A4000 { -// compatible = "fsl,imx51-gpio", "fsl,imx31-gpio"; -// reg = <0x020A4000 0x4000>; -// interrupt-parent = <&gic>; -// interrupts = <54 55>; -// gpio-controller; -// #gpio-cells = <2>; -// interrupt-controller; -// #interrupt-cells = <1>; -// status = "disabled"; -// }; -// -// gpio4: gpio@020A8000 { -// compatible = "fsl,imx51-gpio", "fsl,imx31-gpio"; -// reg = <0x020A8000 0x4000>; -// interrupt-parent = <&gic>; -// interrupts = <56 57>; -// gpio-controller; -// #gpio-cells = <2>; -// interrupt-controller; -// #interrupt-cells = <1>; -// status = "disabled"; -// }; + gpio1: gpio@0209c000 { + compatible = "fsl,imx6q-gpio", "fsl,imx35-gpio"; + reg = <0x0209c000 0x4000>; + interrupts = <0 66 0x04 0 67 0x04>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio2: gpio@020a0000 { + compatible = "fsl,imx6q-gpio", "fsl,imx35-gpio"; + reg = <0x020a0000 0x4000>; + interrupts = <0 68 0x04 0 69 0x04>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio3: gpio@020a4000 { + compatible = "fsl,imx6q-gpio", "fsl,imx35-gpio"; + reg = <0x020a4000 0x4000>; + interrupts = <0 70 0x04 0 71 0x04>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio4: gpio@020a8000 { + compatible = "fsl,imx6q-gpio", "fsl,imx35-gpio"; + reg = <0x020a8000 0x4000>; + interrupts = <0 72 0x04 0 73 0x04>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio5: gpio@020ac000 { + compatible = "fsl,imx6q-gpio", "fsl,imx35-gpio"; + reg = <0x020ac000 0x4000>; + interrupts = <0 74 0x04 0 75 0x04>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio6: gpio@020b0000 { + compatible = "fsl,imx6q-gpio", "fsl,imx35-gpio"; + reg = <0x020b0000 0x4000>; + interrupts = <0 76 0x04 0 77 0x04>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio7: gpio@020b4000 { + compatible = "fsl,imx6q-gpio", "fsl,imx35-gpio"; + reg = <0x020b4000 0x4000>; + interrupts = <0 78 0x04 0 79 0x04>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; uart1: serial@02020000 { compatible = "fsl,imx6q-uart"; @@ -287,6 +304,7 @@ reg = <0x02190000 0x4000>; interrupt-parent = <&gic>; interrupts = <54>; + cd-gpios = <&gpio1 2 0>; bus-width = <0x4>; status ="disabled"; }; @@ -296,6 +314,7 @@ reg = <0x02194000 0x4000>; interrupt-parent = <&gic>; interrupts = <55>; + non-removable; bus-width = <0x4>; status ="disabled"; }; @@ -305,6 +324,7 @@ reg = <0x02198000 0x4000>; interrupt-parent = <&gic>; interrupts = <56>; + cd-gpios = <&gpio3 9 0>; bus-width = <0x4>; status ="disabled"; }; Modified: stable/10/sys/boot/fdt/dts/wandboard-dual.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/wandboard-dual.dts Thu May 15 21:41:32 2014 (r266197) +++ stable/10/sys/boot/fdt/dts/wandboard-dual.dts Thu May 15 22:03:24 2014 (r266198) @@ -67,8 +67,8 @@ usb@02184200 { status = "okay"; }; usb@02184400 { status = "disabled"; }; usb@02184600 { status = "disabled"; }; - usdhc@02190000 { status = "disabled"; }; - usdhc@02194000 { status = "okay"; }; + usdhc@02190000 { status = "okay"; }; + usdhc@02194000 { status = "disabled"; }; usdhc@02198000 { status = "okay"; }; usdhc@0219c000 { status = "disabled"; }; }; Modified: stable/10/sys/boot/fdt/dts/wandboard-quad.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/wandboard-quad.dts Thu May 15 21:41:32 2014 (r266197) +++ stable/10/sys/boot/fdt/dts/wandboard-quad.dts Thu May 15 22:03:24 2014 (r266198) @@ -67,8 +67,8 @@ usb@02184200 { status = "okay"; }; usb@02184400 { status = "disabled"; }; usb@02184600 { status = "disabled"; }; - usdhc@02190000 { status = "disabled"; }; - usdhc@02194000 { status = "okay"; }; + usdhc@02190000 { status = "okay"; }; + usdhc@02194000 { status = "disabled"; }; usdhc@02198000 { status = "okay"; }; usdhc@0219c000 { status = "disabled"; }; }; Modified: stable/10/sys/boot/fdt/dts/wandboard-solo.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/wandboard-solo.dts Thu May 15 21:41:32 2014 (r266197) +++ stable/10/sys/boot/fdt/dts/wandboard-solo.dts Thu May 15 22:03:24 2014 (r266198) @@ -67,8 +67,8 @@ usb@02184200 { status = "okay"; }; usb@02184400 { status = "disabled"; }; usb@02184600 { status = "disabled"; }; - usdhc@02190000 { status = "disabled"; }; - usdhc@02194000 { status = "okay"; }; + usdhc@02190000 { status = "okay"; }; + usdhc@02194000 { status = "disabled"; }; usdhc@02198000 { status = "okay"; }; usdhc@0219c000 { status = "disabled"; }; }; Modified: stable/10/sys/dev/sdhci/sdhci.h ============================================================================== --- stable/10/sys/dev/sdhci/sdhci.h Thu May 15 21:41:32 2014 (r266197) +++ stable/10/sys/dev/sdhci/sdhci.h Thu May 15 22:03:24 2014 (r266198) @@ -104,6 +104,7 @@ #define SDHCI_CMD_INHIBIT 0x00000001 #define SDHCI_DAT_INHIBIT 0x00000002 #define SDHCI_DAT_ACTIVE 0x00000004 +#define SDHCI_RETUNE_REQUEST 0x00000008 #define SDHCI_DOING_WRITE 0x00000100 #define SDHCI_DOING_READ 0x00000200 #define SDHCI_SPACE_AVAILABLE 0x00000400 @@ -112,8 +113,8 @@ #define SDHCI_CARD_STABLE 0x00020000 #define SDHCI_CARD_PIN 0x00040000 #define SDHCI_WRITE_PROTECT 0x00080000 -#define SDHCI_STATE_DAT 0x00700000 -#define SDHCI_STATE_CMD 0x00800000 +#define SDHCI_STATE_DAT_MASK 0x00f00000 +#define SDHCI_STATE_CMD 0x01000000 #define SDHCI_HOST_CONTROL 0x28 #define SDHCI_CTRL_LED 0x01 From owner-svn-src-stable@FreeBSD.ORG Thu May 15 22:11:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC901C20; Thu, 15 May 2014 22:11:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8CD0296E; Thu, 15 May 2014 22:11:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FMBnA6036719; Thu, 15 May 2014 22:11:49 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FMBnKm036539; Thu, 15 May 2014 22:11:49 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405152211.s4FMBnKm036539@svn.freebsd.org> From: Ian Lepore Date: Thu, 15 May 2014 22:11:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266199 - in stable/10/sys/arm: arm include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 22:11:49 -0000 Author: ian Date: Thu May 15 22:11:48 2014 New Revision: 266199 URL: http://svnweb.freebsd.org/changeset/base/266199 Log: MFC r261917, r261918, r261919, r261920, r261921, r261922 Always clear L1 PTE descriptor when removing superpage on ARM Invalidate L1 PTE regardles of existance of the corresponding l2_bucket. Ensure proper TLB invalidation on superpage promotion and demotion on ARM Base pages within newly created superpage need to be invalidated so that new mapping is "visible" immediately after creation. Fix superpage promotion on ARM with respect to RO/RW and wired attributes Avoid redundant superpage promotion attempts on ARM Remove spurious assertion from pmap_extract_locked() on ARM Handle pmap_enter() on already promoted mappings for ARMv6/v7 Modified: stable/10/sys/arm/arm/pmap-v6.c stable/10/sys/arm/include/pmap.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/pmap-v6.c ============================================================================== --- stable/10/sys/arm/arm/pmap-v6.c Thu May 15 22:03:24 2014 (r266198) +++ stable/10/sys/arm/arm/pmap-v6.c Thu May 15 22:11:48 2014 (r266199) @@ -2924,10 +2924,21 @@ void pmap_enter(pmap_t pmap, vm_offset_t va, vm_prot_t access, vm_page_t m, vm_prot_t prot, boolean_t wired) { + struct l2_bucket *l2b; rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); pmap_enter_locked(pmap, va, access, m, prot, wired, M_WAITOK); + /* + * If both the l2b_occupancy and the reservation are fully + * populated, then attempt promotion. + */ + l2b = pmap_get_l2_bucket(pmap, va); + if ((l2b != NULL) && (l2b->l2b_occupancy == L2_PTE_NUM_TOTAL) && + sp_enabled && (m->flags & PG_FICTITIOUS) == 0 && + vm_reserv_level_iffullpop(m) == 0) + pmap_promote_section(pmap, va); + PMAP_UNLOCK(pmap); rw_wunlock(&pvh_global_lock); } @@ -2962,8 +2973,10 @@ pmap_enter_locked(pmap_t pmap, vm_offset } pl1pd = &pmap->pm_l1->l1_kva[L1_IDX(va)]; - if ((*pl1pd & L1_TYPE_MASK) == L1_S_PROTO) - panic("pmap_enter_locked: attempt pmap_enter_on 1MB page"); + if ((va < VM_MAXUSER_ADDRESS) && + (*pl1pd & L1_TYPE_MASK) == L1_S_PROTO) { + (void)pmap_demote_section(pmap, va); + } user = 0; /* @@ -3003,6 +3016,10 @@ do_l2b_alloc: } } + pl1pd = &pmap->pm_l1->l1_kva[L1_IDX(va)]; + if ((*pl1pd & L1_TYPE_MASK) == L1_S_PROTO) + panic("pmap_enter: attempt to enter on 1MB page, va: %#x", va); + ptep = &l2b->l2b_kva[l2pte_index(va)]; opte = *ptep; @@ -3153,14 +3170,6 @@ validate: if ((pmap != pmap_kernel()) && (pmap == &curproc->p_vmspace->vm_pmap)) cpu_icache_sync_range(va, PAGE_SIZE); - /* - * If both the l2b_occupancy and the reservation are fully - * populated, then attempt promotion. - */ - if ((l2b->l2b_occupancy == L2_PTE_NUM_TOTAL) && - sp_enabled && (m->flags & PG_FICTITIOUS) == 0 && - vm_reserv_level_iffullpop(m) == 0) - pmap_promote_section(pmap, va); } /* @@ -3327,10 +3336,6 @@ pmap_extract_locked(pmap_t pmap, vm_offs l1idx = L1_IDX(va); l1pd = pmap->pm_l1->l1_kva[l1idx]; if (l1pte_section_p(l1pd)) { - /* - * These should only happen for the kernel pmap. - */ - KASSERT(pmap == kernel_pmap, ("unexpected section")); /* XXX: what to do about the bits > 32 ? */ if (l1pd & L1_S_SUPERSEC) pa = (l1pd & L1_SUP_FRAME) | (va & L1_SUP_OFFSET); @@ -3702,13 +3707,14 @@ pmap_remove_section(pmap_t pmap, vm_offs KASSERT(l2b->l2b_occupancy == L2_PTE_NUM_TOTAL, ("pmap_remove_section: l2_bucket occupancy error")); pmap_free_l2_bucket(pmap, l2b, L2_PTE_NUM_TOTAL); - /* - * Now invalidate L1 slot as it was not invalidated in - * pmap_free_l2_bucket() due to L1_TYPE mismatch. - */ - *pl1pd = 0; - PTE_SYNC(pl1pd); } + /* Now invalidate L1 slot */ + *pl1pd = 0; + PTE_SYNC(pl1pd); + if (L1_S_EXECUTABLE(l1pd)) + cpu_tlb_flushID_SE(sva); + else + cpu_tlb_flushD_SE(sva); } /* @@ -3795,10 +3801,13 @@ pmap_promote_section(pmap_t pmap, vm_off * we just configure protections for the section mapping * that is going to be created. */ - if (!L2_S_WRITABLE(firstpte) && (first_pve->pv_flags & PVF_WRITE)) { - first_pve->pv_flags &= ~PVF_WRITE; + if ((first_pve->pv_flags & PVF_WRITE) != 0) { + if (!L2_S_WRITABLE(firstpte)) { + first_pve->pv_flags &= ~PVF_WRITE; + prot &= ~VM_PROT_WRITE; + } + } else prot &= ~VM_PROT_WRITE; - } if (!L2_S_EXECUTABLE(firstpte)) prot &= ~VM_PROT_EXECUTE; @@ -3843,6 +3852,12 @@ pmap_promote_section(pmap_t pmap, vm_off if (!L2_S_WRITABLE(oldpte) && (pve->pv_flags & PVF_WRITE)) pve->pv_flags &= ~PVF_WRITE; + if (pve->pv_flags != first_pve->pv_flags) { + pmap_section_p_failures++; + CTR2(KTR_PMAP, "pmap_promote_section: failure for " + "va %#x in pmap %p", va, pmap); + return; + } old_va -= PAGE_SIZE; pa -= PAGE_SIZE; @@ -3855,6 +3870,24 @@ pmap_promote_section(pmap_t pmap, vm_off * Map the superpage. */ pmap_map_section(pmap, first_va, l2pte_pa(firstpte), prot, TRUE); + /* + * Invalidate all possible TLB mappings for small + * pages within the newly created superpage. + * Rely on the first PTE's attributes since they + * have to be consistent across all of the base pages + * within the superpage. If page is not executable it + * is at least referenced. + * The fastest way to do that is to invalidate whole + * TLB at once instead of executing 256 CP15 TLB + * invalidations by single entry. TLBs usually maintain + * several dozen entries so loss of unrelated entries is + * still a less agresive approach. + */ + if (L2_S_EXECUTABLE(firstpte)) + cpu_tlb_flushID(); + else + cpu_tlb_flushD(); + pmap_section_promotions++; CTR2(KTR_PMAP, "pmap_promote_section: success for va %#x" " in pmap %p", first_va, pmap); @@ -3890,7 +3923,7 @@ pmap_demote_section(pmap_t pmap, vm_offs struct l2_bucket *l2b; struct pv_entry *l1pdpve; struct md_page *pvh; - pd_entry_t *pl1pd, l1pd; + pd_entry_t *pl1pd, l1pd, newl1pd; pt_entry_t *firstptep, newpte; vm_offset_t pa; vm_page_t m; @@ -3970,9 +4003,14 @@ pmap_demote_section(pmap_t pmap, vm_offs pmap_pv_demote_section(pmap, va, pa); /* Now fix-up L1 */ - l1pd = l2b->l2b_phys | L1_C_DOM(pmap->pm_domain) | L1_C_PROTO; - *pl1pd = l1pd; + newl1pd = l2b->l2b_phys | L1_C_DOM(pmap->pm_domain) | L1_C_PROTO; + *pl1pd = newl1pd; PTE_SYNC(pl1pd); + /* Invalidate old TLB mapping */ + if (L1_S_EXECUTABLE(l1pd)) + cpu_tlb_flushID_SE(va); + else if (L1_S_REFERENCED(l1pd)) + cpu_tlb_flushD_SE(va); pmap_section_demotions++; CTR2(KTR_PMAP, "pmap_demote_section: success for va %#x" Modified: stable/10/sys/arm/include/pmap.h ============================================================================== --- stable/10/sys/arm/include/pmap.h Thu May 15 22:03:24 2014 (r266198) +++ stable/10/sys/arm/include/pmap.h Thu May 15 22:11:48 2014 (r266199) @@ -527,6 +527,7 @@ extern int pmap_needs_pte_sync; #define L1_S_PROT_MASK (L1_S_PROT_W|L1_S_PROT_U) #define L1_S_REF (L1_S_AP(AP_REF)) /* Reference flag */ #define L1_S_WRITABLE(pd) (!((pd) & L1_S_PROT_W)) +#define L1_S_EXECUTABLE(pd) (!((pd) & L1_S_XN)) #define L1_S_REFERENCED(pd) ((pd) & L1_S_REF) #define L1_S_PROT(ku, pr) (((((ku) == PTE_KERNEL) ? 0 : L1_S_PROT_U) | \ From owner-svn-src-stable@FreeBSD.ORG Thu May 15 22:35:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E5FED7; Thu, 15 May 2014 22:35:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 794DB2B01; Thu, 15 May 2014 22:35:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FMZ7Cp045999; Thu, 15 May 2014 22:35:07 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FMZ5l0045983; Thu, 15 May 2014 22:35:05 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405152235.s4FMZ5l0045983@svn.freebsd.org> From: Ian Lepore Date: Thu, 15 May 2014 22:35:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266200 - in stable/10/sys: arm/freescale arm/freescale/imx boot/fdt/dts dev/fdt dev/mmc dev/sdhci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 22:35:07 -0000 Author: ian Date: Thu May 15 22:35:04 2014 New Revision: 266200 URL: http://svnweb.freebsd.org/changeset/base/266200 Log: MFC r261938, r261939, r261940, r261944, r261945, r261946, r261947, r261956, r261957, r261983, r261094, r261955, r261958, Add a driver to provide access to imx6 on-chip one-time-programmble data. Make it possible to access the ocotp registers before the ocotp device is attached, by establishing a temporary mapping of the registers when necessary. It turns out Freescale cleverly made the ocotp device compatible across several different families of SoCs, so move it to the freescale directory and prefix everything with fsl rather than imx6. Convert the imx6 sdhci "R1B fix" from a busy-loop in the interrupt handler to a callout. Increase the wait time for acquiring the SD bus from 10 to 250ms. If no compatible cards were found after probing the SD bus, say so. Add timeout logic to sdhci, separate from the timeouts done by the hardware. After a timeout, reset the controller using SDHCI_RESET_CMD|SDHCI_RESET_DATA rather than SDHCI_RESET_ALL; the latter turns off clocks and power, removing any possibility of recovering from the error. Add a helper routine to depth-search the device tree for a node with a matching 'compatible' property. Added: stable/10/sys/arm/freescale/fsl_ocotp.c - copied, changed from r261946, head/sys/arm/freescale/fsl_ocotp.c stable/10/sys/arm/freescale/fsl_ocotpreg.h - copied, changed from r261946, head/sys/arm/freescale/fsl_ocotpreg.h stable/10/sys/arm/freescale/fsl_ocotpvar.h - copied unchanged from r261946, head/sys/arm/freescale/fsl_ocotpvar.h Modified: stable/10/sys/arm/freescale/imx/files.imx6 stable/10/sys/arm/freescale/imx/imx_sdhci.c stable/10/sys/boot/fdt/dts/imx6.dtsi stable/10/sys/dev/fdt/fdt_common.c stable/10/sys/dev/fdt/fdt_common.h stable/10/sys/dev/mmc/mmc.c stable/10/sys/dev/sdhci/sdhci.c stable/10/sys/dev/sdhci/sdhci.h Directory Properties: stable/10/ (props changed) Copied and modified: stable/10/sys/arm/freescale/fsl_ocotp.c (from r261946, head/sys/arm/freescale/fsl_ocotp.c) ============================================================================== --- head/sys/arm/freescale/fsl_ocotp.c Sat Feb 15 21:21:57 2014 (r261946, copy source) +++ stable/10/sys/arm/freescale/fsl_ocotp.c Thu May 15 22:35:04 2014 (r266200) @@ -46,6 +46,48 @@ __FBSDID("$FreeBSD$"); #include #include +/* + * Find the physical address and size of the ocotp registers and devmap them, + * returning a pointer to the virtual address of the base. + * + * XXX This is temporary until we've worked out all the details of controlling + * the load order of devices. In an ideal world this device would be up and + * running before anything that needs it. When we're at a point to make that + * happen, this little block of code, and the few lines in fsl_ocotp_read_4() + * that refer to it can be deleted. + */ +#include +#include +#include +#include + +static uint32_t *ocotp_regs; +static vm_size_t ocotp_size; + +static void +fsl_ocotp_devmap(void) +{ + phandle_t child, root; + u_long base, size; + + if ((root = OF_finddevice("/")) == 0) + goto fatal; + if ((child = fdt_depth_search_compatible(root, "fsl,imx6q-ocotp", 0)) == 0) + goto fatal; + if (fdt_regsize(child, &base, &size) != 0) + goto fatal; + + ocotp_size = (vm_size_t)size; + + if ((ocotp_regs = pmap_mapdev((vm_offset_t)base, ocotp_size)) == NULL) + goto fatal; + + return; +fatal: + panic("cannot find/map the ocotp registers"); +} +/* XXX end of temporary code */ + struct ocotp_softc { device_t dev; struct resource *mem_res; @@ -56,23 +98,16 @@ static struct ocotp_softc *ocotp_sc; static inline uint32_t RD4(struct ocotp_softc *sc, bus_size_t off) { + return (bus_read_4(sc->mem_res, off)); } - static int ocotp_detach(device_t dev) { - struct ocotp_softc *sc; - sc = device_get_softc(dev); - - if (sc->mem_res != NULL) - bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->mem_res); - - ocotp_sc = NULL; - - return (0); + /* The ocotp registers are always accessible. */ + return (EBUSY); } static int @@ -95,6 +130,11 @@ ocotp_attach(device_t dev) } ocotp_sc = sc; + + /* We're done with the temporary mapping now. */ + if (ocotp_regs != NULL) + pmap_unmapdev((vm_offset_t)ocotp_regs, ocotp_size); + err = 0; out: @@ -111,11 +151,11 @@ ocotp_probe(device_t dev) if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (ofw_bus_is_compatible(dev, "fsl,fslq-ocotp") == 0) + if (ofw_bus_is_compatible(dev, "fsl,imx6q-ocotp") == 0) return (ENXIO); device_set_desc(dev, - "Freescale i.MX6 On-Chip One-Time-Programmable Memory"); + "Freescale On-Chip One-Time-Programmable Memory"); return (BUS_PROBE_DEFAULT); } @@ -124,13 +164,23 @@ uint32_t fsl_ocotp_read_4(bus_size_t off) { - if (ocotp_sc == NULL) - panic("fsl_ocotp_read_4: softc not set!"); - if (off > FSL_OCOTP_LAST_REG) panic("fsl_ocotp_read_4: offset out of range"); - return (RD4(ocotp_sc, off)); + /* If we have a softcontext use the regular bus_space read. */ + if (ocotp_sc != NULL) + return (RD4(ocotp_sc, off)); + + /* + * Otherwise establish a tempory device mapping if necessary, and read + * the device without any help from bus_space. + * + * XXX Eventually the code from there down can be deleted. + */ + if (ocotp_regs == NULL) + fsl_ocotp_devmap(); + + return (ocotp_regs[off / 4]); } static device_method_t ocotp_methods[] = { Copied and modified: stable/10/sys/arm/freescale/fsl_ocotpreg.h (from r261946, head/sys/arm/freescale/fsl_ocotpreg.h) ============================================================================== --- head/sys/arm/freescale/fsl_ocotpreg.h Sat Feb 15 21:21:57 2014 (r261946, copy source) +++ stable/10/sys/arm/freescale/fsl_ocotpreg.h Thu May 15 22:35:04 2014 (r266200) @@ -48,6 +48,13 @@ #define FSL_OCOTP_CFG1 0x420 #define FSL_OCOTP_CFG2 0x430 #define FSL_OCOTP_CFG3 0x440 +#define FSL_OCOTP_CFG3_SPEED_SHIFT 16 +#define FSL_OCOTP_CFG3_SPEED_MASK \ + (0x03 << FSL_OCOTP_CFG3_SPEED_SHIFT) +#define FSL_OCOTP_CFG3_SPEED_792MHZ 0 +#define FSL_OCOTP_CFG3_SPEED_852MHZ 1 +#define FSL_OCOTP_CFG3_SPEED_996MHZ 2 +#define FSL_OCOTP_CFG3_SPEED_1200MHZ 3 #define FSL_OCOTP_CFG4 0x450 #define FSL_OCOTP_CFG5 0x460 #define FSL_OCOTP_CFG6 0x470 Copied: stable/10/sys/arm/freescale/fsl_ocotpvar.h (from r261946, head/sys/arm/freescale/fsl_ocotpvar.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/freescale/fsl_ocotpvar.h Thu May 15 22:35:04 2014 (r266200, copy of r261946, head/sys/arm/freescale/fsl_ocotpvar.h) @@ -0,0 +1,34 @@ +/*- + * Copyright (c) 2014 Steven Lawrance + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +#ifndef FSL_OCOTPVAR_H +#define FSL_OCOTPVAR_H + +uint32_t fsl_ocotp_read_4(bus_size_t _offset); + +#endif Modified: stable/10/sys/arm/freescale/imx/files.imx6 ============================================================================== --- stable/10/sys/arm/freescale/imx/files.imx6 Thu May 15 22:11:48 2014 (r266199) +++ stable/10/sys/arm/freescale/imx/files.imx6 Thu May 15 22:35:04 2014 (r266200) @@ -17,6 +17,7 @@ kern/kern_clocksource.c standard arm/arm/gic.c standard arm/arm/pl310.c standard arm/freescale/imx/bus_space.c standard +arm/freescale/fsl_ocotp.c standard arm/freescale/imx/common.c standard arm/freescale/imx/imx6_anatop.c standard arm/freescale/imx/imx6_ccm.c standard Modified: stable/10/sys/arm/freescale/imx/imx_sdhci.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx_sdhci.c Thu May 15 22:11:48 2014 (r266199) +++ stable/10/sys/arm/freescale/imx/imx_sdhci.c Thu May 15 22:35:04 2014 (r266200) @@ -35,13 +35,18 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include +#include #include +#include #include #include +#include #include #include #include +#include #include #include @@ -65,6 +70,8 @@ struct imx_sdhci_softc { struct resource * irq_res; void * intr_cookie; struct sdhci_slot slot; + struct callout r1bfix_callout; + sbintime_t r1bfix_timeout_at; uint32_t baseclk_hz; uint32_t sdclockreg_freq_bits; uint32_t cmd_and_mode; @@ -130,6 +137,8 @@ struct imx_sdhci_softc { #define SDHC_PROT_CDTL (1 << 6) #define SDHC_PROT_CDSS (1 << 7) +#define SDHC_INT_STATUS 0x30 + #define SDHC_CLK_IPGEN (1 << 0) #define SDHC_CLK_HCKEN (1 << 1) #define SDHC_CLK_PEREN (1 << 2) @@ -147,6 +156,7 @@ static struct ofw_compat_data compat_dat };; static void imx_sdhc_set_clock(struct imx_sdhci_softc *sc, int enable); +static void imx_sdhci_r1bfix_func(void *arg); static inline uint32_t RD4(struct imx_sdhci_softc *sc, bus_size_t off) @@ -532,46 +542,107 @@ imx_sdhc_set_clock(struct imx_sdhci_soft RD4(sc, SDHC_VEND_SPEC) | SDHC_VEND_FRC_SDCLK_ON); } +static boolean_t +imx_sdhci_r1bfix_is_wait_done(struct imx_sdhci_softc *sc) +{ + uint32_t inhibit; + + mtx_assert(&sc->slot.mtx, MA_OWNED); + + /* + * Check the DAT0 line status using both the DLA (data line active) and + * CDIHB (data inhibit) bits in the present state register. In theory + * just DLA should do the trick, but in practice it takes both. If the + * DAT0 line is still being held and we're not yet beyond the timeout + * point, just schedule another callout to check again later. + */ + inhibit = RD4(sc, SDHC_PRES_STATE) & (SDHC_PRES_DLA | SDHC_PRES_CDIHB); + + if (inhibit && getsbinuptime() < sc->r1bfix_timeout_at) { + callout_reset_sbt(&sc->r1bfix_callout, SBT_1MS, 0, + imx_sdhci_r1bfix_func, sc, 0); + return (false); + } + + /* + * If we reach this point with the inhibit bits still set, we've got a + * timeout, synthesize a DATA_TIMEOUT interrupt. Otherwise the DAT0 + * line has been released, and we synthesize a DATA_END, and if the type + * of fix needed was on a command-without-data we also now add in the + * original INT_RESPONSE that we suppressed earlier. + */ + if (inhibit) + sc->r1bfix_intmask |= SDHCI_INT_DATA_TIMEOUT; + else { + sc->r1bfix_intmask |= SDHCI_INT_DATA_END; + if (sc->r1bfix_type == R1BFIX_NODATA) + sc->r1bfix_intmask |= SDHCI_INT_RESPONSE; + } + + sc->r1bfix_type = R1BFIX_NONE; + return (true); +} + +static void +imx_sdhci_r1bfix_func(void * arg) +{ + struct imx_sdhci_softc *sc = arg; + boolean_t r1bwait_done; + + mtx_lock(&sc->slot.mtx); + r1bwait_done = imx_sdhci_r1bfix_is_wait_done(sc); + mtx_unlock(&sc->slot.mtx); + if (r1bwait_done) + sdhci_generic_intr(&sc->slot); +} + static void imx_sdhci_intr(void *arg) { struct imx_sdhci_softc *sc = arg; uint32_t intmask; - intmask = RD4(sc, SDHCI_INT_STATUS); + mtx_lock(&sc->slot.mtx); /* * Manually check the DAT0 line for R1B response types that the - * controller fails to handle properly. + * controller fails to handle properly. The controller asserts the done + * interrupt while the card is still asserting busy with the DAT0 line. * - * To do the NODATA fix, when the RESPONSE (COMMAND_COMPLETE) interrupt - * occurs, we have to wait for the DAT0 line to be released, then - * synthesize a DATA_END (TRANSFER_COMPLETE) interrupt, which we do by - * storing SDHCI_INT_DATA_END into a variable that gets ORed into the - * return value when the SDHCI_INT_STATUS register is read. + * We check DAT0 immediately because most of the time, especially on a + * read, the card will actually be done by time we get here. If it's + * not, then the wait_done routine will schedule a callout to re-check + * periodically until it is done. In that case we clear the interrupt + * out of the hardware now so that we can present it later when the DAT0 + * line is released. * - * For the AC12 fix, when the DATA_END interrupt occurs we wait for the - * DAT0 line to be released, and the waiting is all the fix we need. - */ - if ((sc->r1bfix_type == R1BFIX_NODATA && - (intmask & SDHCI_INT_RESPONSE)) || - (sc->r1bfix_type == R1BFIX_AC12 && - (intmask & SDHCI_INT_DATA_END))) { - uint32_t count; - count = 0; - /* XXX use a callout or something instead of busy-waiting. */ - while (count < 250000 && - (RD4(sc, SDHC_PRES_STATE) & SDHC_PRES_DLA)) { - ++count; - DELAY(1); + * If we need to wait for the the DAT0 line to be released, we set up a + * timeout point 250ms in the future. This number comes from the SD + * spec, which allows a command to take that long. In the real world, + * cards tend to take 10-20ms for a long-running command such as a write + * or erase that spans two pages. + */ + switch (sc->r1bfix_type) { + case R1BFIX_NODATA: + intmask = RD4(sc, SDHC_INT_STATUS) & SDHCI_INT_RESPONSE; + break; + case R1BFIX_AC12: + intmask = RD4(sc, SDHC_INT_STATUS) & SDHCI_INT_DATA_END; + break; + default: + intmask = 0; + break; + } + if (intmask) { + sc->r1bfix_timeout_at = getsbinuptime() + 250 * SBT_1MS; + if (!imx_sdhci_r1bfix_is_wait_done(sc)) { + WR4(sc, SDHC_INT_STATUS, intmask); + bus_barrier(sc->mem_res, SDHC_INT_STATUS, 4, + BUS_SPACE_BARRIER_WRITE); } - if (count >= 250000) - sc->r1bfix_intmask = SDHCI_INT_DATA_TIMEOUT; - else if (sc->r1bfix_type == R1BFIX_NODATA) - sc->r1bfix_intmask = SDHCI_INT_DATA_END; - sc->r1bfix_type = R1BFIX_NONE; } + mtx_unlock(&sc->slot.mtx); sdhci_generic_intr(&sc->slot); } @@ -660,6 +731,7 @@ imx_sdhci_attach(device_t dev) } sdhci_init_slot(dev, &sc->slot, 0); + callout_init(&sc->r1bfix_callout, true); /* * If the slot is flagged with the non-removable property, set our flag @@ -670,7 +742,7 @@ imx_sdhci_attach(device_t dev) * We don't have gpio support yet. If there's a cd-gpios property just * force the SDHCI_CARD_PRESENT bit on for now. If there isn't really a * card there it will fail to probe at the mmc layer and nothing bad - * happens except instantiating a /dev/mmcN device for an empty slot. + * happens except instantiating an mmcN device for an empty slot. */ node = ofw_bus_get_node(dev); if (OF_hasprop(node, "non-removable")) Modified: stable/10/sys/boot/fdt/dts/imx6.dtsi ============================================================================== --- stable/10/sys/boot/fdt/dts/imx6.dtsi Thu May 15 22:11:48 2014 (r266199) +++ stable/10/sys/boot/fdt/dts/imx6.dtsi Thu May 15 22:35:04 2014 (r266200) @@ -337,6 +337,11 @@ bus-width = <0x4>; status ="disabled"; }; + + ocotp0: ocotp@021bc000 { + compatible = "fsl,imx6q-ocotp"; + reg = <0x021bc000 0x4000>; + } }; }; }; Modified: stable/10/sys/dev/fdt/fdt_common.c ============================================================================== --- stable/10/sys/dev/fdt/fdt_common.c Thu May 15 22:11:48 2014 (r266199) +++ stable/10/sys/dev/fdt/fdt_common.c Thu May 15 22:35:04 2014 (r266200) @@ -223,6 +223,27 @@ fdt_find_compatible(phandle_t start, con return (0); } +phandle_t +fdt_depth_search_compatible(phandle_t start, const char *compat, int strict) +{ + phandle_t child, node; + + /* + * Depth-search all descendants of 'start' node, and find first with + * matching 'compatible' property. + */ + for (node = OF_child(start); node != 0; node = OF_peer(node)) { + if (fdt_is_compatible(node, compat) && + (strict == 0 || fdt_is_compatible_strict(node, compat))) { + return (node); + } + child = fdt_depth_search_compatible(node, compat, strict); + if (child != 0) + return (child); + } + return (0); +} + int fdt_is_enabled(phandle_t node) { @@ -483,11 +504,23 @@ fdt_intr_to_rl(device_t dev, phandle_t n nintr = OF_getencprop_alloc(node, "interrupts", sizeof(*intr), (void **)&intr); if (nintr > 0) { - iparent = 0; - OF_searchencprop(node, "interrupt-parent", &iparent, - sizeof(iparent)); - OF_searchencprop(OF_xref_phandle(iparent), "#interrupt-cells", - &icells, sizeof(icells)); + if (OF_searchencprop(node, "interrupt-parent", &iparent, + sizeof(iparent)) == -1) { + device_printf(dev, "No interrupt-parent found, " + "assuming direct parent\n"); + iparent = OF_parent(node); + } + if (OF_searchencprop(OF_xref_phandle(iparent), + "#interrupt-cells", &icells, sizeof(icells)) == -1) { + device_printf(dev, "Missing #interrupt-cells property, " + "assuming <1>\n"); + icells = 1; + } + if (icells < 1 || icells > nintr) { + device_printf(dev, "Invalid #interrupt-cells property " + "value <%d>, assuming <1>\n", icells); + icells = 1; + } for (i = 0, k = 0; i < nintr; i += icells, k++) { intr[i] = ofw_bus_map_intr(dev, iparent, icells, &intr[i]); Modified: stable/10/sys/dev/fdt/fdt_common.h ============================================================================== --- stable/10/sys/dev/fdt/fdt_common.h Thu May 15 22:11:48 2014 (r266199) +++ stable/10/sys/dev/fdt/fdt_common.h Thu May 15 22:35:04 2014 (r266200) @@ -81,6 +81,7 @@ u_long fdt_data_get(void *, int); int fdt_data_to_res(pcell_t *, int, int, u_long *, u_long *); int fdt_data_verify(void *, int); phandle_t fdt_find_compatible(phandle_t, const char *, int); +phandle_t fdt_depth_search_compatible(phandle_t, const char *, int); int fdt_get_mem_regions(struct mem_region *, int *, uint32_t *); int fdt_get_reserved_regions(struct mem_region *, int *); int fdt_get_phyaddr(phandle_t, device_t, int *, void **); Modified: stable/10/sys/dev/mmc/mmc.c ============================================================================== --- stable/10/sys/dev/mmc/mmc.c Thu May 15 22:11:48 2014 (r266199) +++ stable/10/sys/dev/mmc/mmc.c Thu May 15 22:35:04 2014 (r266200) @@ -1572,6 +1572,7 @@ mmc_go_discovery(struct mmc_softc *sc) if (bootverbose || mmc_debug) device_printf(sc->dev, "Current OCR: 0x%08x\n", mmcbr_get_ocr(dev)); if (mmcbr_get_ocr(dev) == 0) { + device_printf(sc->dev, "No compatible cards found on bus\n"); mmc_delete_cards(sc); mmc_power_down(sc); return; Modified: stable/10/sys/dev/sdhci/sdhci.c ============================================================================== --- stable/10/sys/dev/sdhci/sdhci.c Thu May 15 22:11:48 2014 (r266199) +++ stable/10/sys/dev/sdhci/sdhci.c Thu May 15 22:35:04 2014 (r266200) @@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -609,6 +610,7 @@ sdhci_init_slot(device_t dev, struct sdh TASK_INIT(&slot->card_task, 0, sdhci_card_task, slot); callout_init(&slot->card_callout, 1); + callout_init_mtx(&slot->timeout_callout, &slot->mtx, 0); return (0); } @@ -623,6 +625,7 @@ sdhci_cleanup_slot(struct sdhci_slot *sl { device_t d; + callout_drain(&slot->timeout_callout); callout_drain(&slot->card_callout); taskqueue_drain(taskqueue_swi_giant, &slot->card_task); @@ -702,6 +705,32 @@ sdhci_generic_update_ios(device_t brdev, return (0); } +static void +sdhci_req_done(struct sdhci_slot *slot) +{ + struct mmc_request *req; + + if (slot->req != NULL && slot->curcmd != NULL) { + callout_stop(&slot->timeout_callout); + req = slot->req; + slot->req = NULL; + slot->curcmd = NULL; + req->done(req); + } +} + +static void +sdhci_timeout(void *arg) +{ + struct sdhci_slot *slot = arg; + + if (slot->curcmd != NULL) { + sdhci_reset(slot, SDHCI_RESET_CMD|SDHCI_RESET_DATA); + slot->curcmd->error = MMC_ERR_TIMEOUT; + sdhci_req_done(slot); + } +} + static void sdhci_set_transfer_mode(struct sdhci_slot *slot, struct mmc_data *data) @@ -727,7 +756,6 @@ sdhci_set_transfer_mode(struct sdhci_slo static void sdhci_start_command(struct sdhci_slot *slot, struct mmc_command *cmd) { - struct mmc_request *req = slot->req; int flags, timeout; uint32_t mask, state; @@ -740,9 +768,7 @@ sdhci_start_command(struct sdhci_slot *s if ((cmd->flags & MMC_RSP_136) && (cmd->flags & MMC_RSP_BUSY)) { slot_printf(slot, "Unsupported response type!\n"); cmd->error = MMC_ERR_FAILED; - slot->req = NULL; - slot->curcmd = NULL; - req->done(req); + sdhci_req_done(slot); return; } @@ -754,9 +780,7 @@ sdhci_start_command(struct sdhci_slot *s slot->power == 0 || slot->clock == 0) { cmd->error = MMC_ERR_FAILED; - slot->req = NULL; - slot->curcmd = NULL; - req->done(req); + sdhci_req_done(slot); return; } /* Always wait for free CMD bus. */ @@ -767,17 +791,24 @@ sdhci_start_command(struct sdhci_slot *s /* We shouldn't wait for DAT for stop commands. */ if (cmd == slot->req->stop) mask &= ~SDHCI_DAT_INHIBIT; - /* Wait for bus no more then 10 ms. */ - timeout = 10; + /* + * Wait for bus no more then 250 ms. Typically there will be no wait + * here at all, but when writing a crash dump we may be bypassing the + * host platform's interrupt handler, and in some cases that handler + * may be working around hardware quirks such as not respecting r1b + * busy indications. In those cases, this wait-loop serves the purpose + * of waiting for the prior command and data transfers to be done, and + * SD cards are allowed to take up to 250ms for write and erase ops. + * (It's usually more like 20-30ms in the real world.) + */ + timeout = 250; while (state & mask) { if (timeout == 0) { slot_printf(slot, "Controller never released " "inhibit bit(s).\n"); sdhci_dumpregs(slot); cmd->error = MMC_ERR_FAILED; - slot->req = NULL; - slot->curcmd = NULL; - req->done(req); + sdhci_req_done(slot); return; } timeout--; @@ -819,6 +850,8 @@ sdhci_start_command(struct sdhci_slot *s sdhci_set_transfer_mode(slot, cmd->data); /* Start command. */ WR2(slot, SDHCI_COMMAND_FLAGS, (cmd->opcode << 8) | (flags & 0xff)); + /* Start timeout callout. */ + callout_reset(&slot->timeout_callout, 2*hz, sdhci_timeout, slot); } static void @@ -1004,10 +1037,7 @@ sdhci_start(struct sdhci_slot *slot) sdhci_reset(slot, SDHCI_RESET_DATA); } - /* We must be done -- bad idea to do this while locked? */ - slot->req = NULL; - slot->curcmd = NULL; - req->done(req); + sdhci_req_done(slot); } int Modified: stable/10/sys/dev/sdhci/sdhci.h ============================================================================== --- stable/10/sys/dev/sdhci/sdhci.h Thu May 15 22:11:48 2014 (r266199) +++ stable/10/sys/dev/sdhci/sdhci.h Thu May 15 22:35:04 2014 (r266200) @@ -241,6 +241,7 @@ struct sdhci_slot { bus_addr_t paddr; /* DMA buffer address */ struct task card_task; /* Card presence check task */ struct callout card_callout; /* Card insert delay callout */ + struct callout timeout_callout;/* Card command/data response timeout */ struct mmc_host host; /* Host parameters */ struct mmc_request *req; /* Current request */ struct mmc_command *curcmd; /* Current command of current request */ From owner-svn-src-stable@FreeBSD.ORG Thu May 15 22:50:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D2A4A380; Thu, 15 May 2014 22:50:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BCFFF2BEB; Thu, 15 May 2014 22:50:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FMo8X0051318; Thu, 15 May 2014 22:50:08 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FMo6tG051305; Thu, 15 May 2014 22:50:06 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405152250.s4FMo6tG051305@svn.freebsd.org> From: Ian Lepore Date: Thu, 15 May 2014 22:50:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266201 - in stable/10/sys: arm/arm arm/conf arm/freescale/imx arm/freescale/vybrid arm/include boot/fdt/dts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 22:50:08 -0000 Author: ian Date: Thu May 15 22:50:06 2014 New Revision: 266201 URL: http://svnweb.freebsd.org/changeset/base/266201 Log: MFC r261982, r261987, r262123, r262244, r262278, r262280, r262353, r262354, r262355, r262419, Add Vybrid driver for Synchronous Audio Interface (SAI). Decrease SAI buffer size. Handle eDMA interrupt on running channel only. Give the physmem fdt helper routines static linkage since no global definition of them is provided anywhere. Add imx6 early printf support, wrapped in #if 0 because it's rarely needed. Add basic cpu frequency control and temperature monitoring to imx6_anatop. Add the FREEBSD_BOOT_LOADER option so that a loaded DTB passed in from ubldr will actually get used. Create a generic IMX6 kernel config, then fix it to have an ident line. Don't force imx6 bootverbose on anymore, it can be set from ubldr now. Added: stable/10/sys/arm/conf/IMX6 - copied, changed from r262354, head/sys/arm/conf/IMX6 stable/10/sys/arm/freescale/vybrid/vf_sai.c - copied, changed from r261982, head/sys/arm/freescale/vybrid/vf_sai.c Modified: stable/10/sys/arm/arm/machdep.c stable/10/sys/arm/conf/WANDBOARD.common stable/10/sys/arm/freescale/imx/imx6_anatop.c stable/10/sys/arm/freescale/imx/imx6_anatopreg.h stable/10/sys/arm/freescale/imx/imx6_anatopvar.h stable/10/sys/arm/freescale/imx/imx6_machdep.c stable/10/sys/arm/freescale/vybrid/files.vybrid stable/10/sys/arm/include/physmem.h stable/10/sys/boot/fdt/dts/imx6.dtsi stable/10/sys/boot/fdt/dts/vybrid.dtsi Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/machdep.c ============================================================================== --- stable/10/sys/arm/arm/machdep.c Thu May 15 22:35:04 2014 (r266200) +++ stable/10/sys/arm/arm/machdep.c Thu May 15 22:50:06 2014 (r266201) @@ -1167,7 +1167,6 @@ initarm(struct arm_boot_params *abp) (((uint32_t)(lastaddr) - KERNVIRTADDR) + PAGE_MASK) & ~PAGE_MASK, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); - /* Map L1 directory and allocated L2 page tables */ pmap_map_chunk(l1pagetable, kernel_l1pt.pv_va, kernel_l1pt.pv_pa, L1_TABLE_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_PAGETABLE); Copied and modified: stable/10/sys/arm/conf/IMX6 (from r262354, head/sys/arm/conf/IMX6) ============================================================================== --- head/sys/arm/conf/IMX6 Sun Feb 23 01:48:07 2014 (r262354, copy source) +++ stable/10/sys/arm/conf/IMX6 Thu May 15 22:50:06 2014 (r266201) @@ -17,6 +17,7 @@ # # $FreeBSD$ +ident IMX6 include "../freescale/imx/std.imx6" options HZ=250 # Scheduling quantum is 4 milliseconds. Modified: stable/10/sys/arm/conf/WANDBOARD.common ============================================================================== --- stable/10/sys/arm/conf/WANDBOARD.common Thu May 15 22:35:04 2014 (r266200) +++ stable/10/sys/arm/conf/WANDBOARD.common Thu May 15 22:50:06 2014 (r266201) @@ -153,3 +153,5 @@ device mmcsd # SDCard disk device device ffec # Freescale Fast Ethernet Controller +options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) + Modified: stable/10/sys/arm/freescale/imx/imx6_anatop.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx6_anatop.c Thu May 15 22:35:04 2014 (r266200) +++ stable/10/sys/arm/freescale/imx/imx6_anatop.c Thu May 15 22:50:06 2014 (r266201) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2013 Ian Lepore + * Copyright (c) 2014 Steven Lawrance * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,6 +30,8 @@ __FBSDID("$FreeBSD$"); /* * Analog PLL and power regulator driver for Freescale i.MX6 family of SoCs. + * Also, temperature montoring and cpu frequency control. It was Freescale who + * kitchen-sinked this device, not us. :) * * We don't really do anything with analog PLLs, but the registers for * controlling them belong to the same block as the power regulator registers. @@ -42,11 +45,19 @@ __FBSDID("$FreeBSD$"); * I have no idea where the "anatop" name comes from. It's in the standard DTS * source describing i.MX6 SoCs, and in the linux and u-boot code which comes * from Freescale, but it's not in the SoC manual. + * + * Note that temperature values throughout this code are handled in two types of + * units. Items with '_cnt' in the name use the hardware temperature count + * units (higher counts are lower temperatures). Items with '_val' in the name + * are deci-Celcius, which are converted to/from deci-Kelvins in the sysctl + * handlers (dK is the standard unit for temperature in sysctl). */ #include #include +#include #include +#include #include #include #include @@ -56,68 +67,410 @@ __FBSDID("$FreeBSD$"); #include +#include +#include #include #include +static struct resource_spec imx6_anatop_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { SYS_RES_IRQ, 0, RF_ACTIVE }, + { -1, 0 } +}; +#define MEMRES 0 +#define IRQRES 1 + struct imx6_anatop_softc { device_t dev; - struct resource *mem_res; + struct resource *res[2]; + uint32_t cpu_curhz; + uint32_t cpu_curmhz; + uint32_t cpu_minhz; + uint32_t cpu_maxhz; + uint32_t refosc_hz; + void *temp_intrhand; + uint32_t temp_high_val; + uint32_t temp_high_cnt; + uint32_t temp_last_cnt; + uint32_t temp_room_cnt; + struct callout temp_throttle_callout; + sbintime_t temp_throttle_delay; + uint32_t temp_throttle_reset_cnt; + uint32_t temp_throttle_trigger_cnt; + uint32_t temp_throttle_val; }; static struct imx6_anatop_softc *imx6_anatop_sc; +/* + * Table of CPU max frequencies. This is indexed by the max frequency value + * (0-3) from the ocotp CFG3 register. + */ +static uint32_t imx6_cpu_maxhz_tab[] = { + 792000000, 852000000, 996000000, 1200000000 +}; + +#define TZ_ZEROC 2732 /* deci-Kelvin <-> deci-Celcius offset. */ + uint32_t imx6_anatop_read_4(bus_size_t offset) { - return (bus_read_4(imx6_anatop_sc->mem_res, offset)); + KASSERT(imx6_anatop_sc != NULL, ("imx6_anatop_read_4 sc NULL")); + + return (bus_read_4(imx6_anatop_sc->res[MEMRES], offset)); } void imx6_anatop_write_4(bus_size_t offset, uint32_t value) { - bus_write_4(imx6_anatop_sc->mem_res, offset, value); + KASSERT(imx6_anatop_sc != NULL, ("imx6_anatop_write_4 sc NULL")); + + bus_write_4(imx6_anatop_sc->res[MEMRES], offset, value); +} + +static inline uint32_t +cpufreq_hz_from_div(struct imx6_anatop_softc *sc, uint32_t div) +{ + + return (sc->refosc_hz * (div / 2)); +} + +static inline uint32_t +cpufreq_hz_to_div(struct imx6_anatop_softc *sc, uint32_t cpu_hz) +{ + + return (cpu_hz / (sc->refosc_hz / 2)); +} + +static inline uint32_t +cpufreq_actual_hz(struct imx6_anatop_softc *sc, uint32_t cpu_hz) +{ + + return (cpufreq_hz_from_div(sc, cpufreq_hz_to_div(sc, cpu_hz))); +} + +static void +cpufreq_set_clock(struct imx6_anatop_softc * sc, uint32_t cpu_newhz) +{ + uint32_t div, timeout, wrk32; + const uint32_t mindiv = 54; + const uint32_t maxdiv = 108; + + /* + * Clip the requested frequency to the configured max, then clip the + * resulting divisor to the documented min/max values. + */ + cpu_newhz = min(cpu_newhz, sc->cpu_maxhz); + div = cpufreq_hz_to_div(sc, cpu_newhz); + if (div < mindiv) + div = mindiv; + else if (div > maxdiv) + div = maxdiv; + sc->cpu_curhz = cpufreq_hz_from_div(sc, div); + sc->cpu_curmhz = sc->cpu_curhz / 1000000; + + /* + * I can't find a documented procedure for changing the ARM PLL divisor, + * but some trial and error came up with this: + * - Set the bypass clock source to REF_CLK_24M (source #0). + * - Set the PLL into bypass mode; cpu should now be running at 24mhz. + * - Change the divisor. + * - Wait for the LOCK bit to come on; it takes ~50 loop iterations. + * - Turn off bypass mode; cpu should now be running at cpu_newhz. + */ + imx6_anatop_write_4(IMX6_ANALOG_CCM_PLL_ARM_CLR, + IMX6_ANALOG_CCM_PLL_ARM_CLK_SRC_MASK); + imx6_anatop_write_4(IMX6_ANALOG_CCM_PLL_ARM_SET, + IMX6_ANALOG_CCM_PLL_ARM_BYPASS); + + wrk32 = imx6_anatop_read_4(IMX6_ANALOG_CCM_PLL_ARM); + wrk32 &= ~IMX6_ANALOG_CCM_PLL_ARM_DIV_MASK; + wrk32 |= div; + imx6_anatop_write_4(IMX6_ANALOG_CCM_PLL_ARM, wrk32); + + timeout = 10000; + while ((imx6_anatop_read_4(IMX6_ANALOG_CCM_PLL_ARM) & + IMX6_ANALOG_CCM_PLL_ARM_LOCK) == 0) + if (--timeout == 0) + panic("imx6_set_cpu_clock(): PLL never locked"); + + imx6_anatop_write_4(IMX6_ANALOG_CCM_PLL_ARM_CLR, + IMX6_ANALOG_CCM_PLL_ARM_BYPASS); +} + +static void +cpufreq_initialize(struct imx6_anatop_softc *sc) +{ + uint32_t cfg3speed; + struct sysctl_ctx_list *ctx; + + ctx = device_get_sysctl_ctx(sc->dev); + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(device_get_sysctl_tree(sc->dev)), + OID_AUTO, "cpu_mhz", CTLFLAG_RD, &sc->cpu_curmhz, 0, + "CPU frequency in MHz"); + + /* + * XXX 24mhz shouldn't be hard-coded, should get this from imx6_ccm + * (even though in the real world it will always be 24mhz). Oh wait a + * sec, I never wrote imx6_ccm. + */ + sc->refosc_hz = 24000000; + + /* + * Get the maximum speed this cpu can be set to. The values in the + * OCOTP CFG3 register are not documented in the reference manual. + * The following info was in an archived email found via web search: + * - 2b'11: 1200000000Hz; + * - 2b'10: 996000000Hz; + * - 2b'01: 852000000Hz; -- i.MX6Q Only, exclusive with 996MHz. + * - 2b'00: 792000000Hz; + */ + cfg3speed = (fsl_ocotp_read_4(FSL_OCOTP_CFG3) & + FSL_OCOTP_CFG3_SPEED_MASK) >> FSL_OCOTP_CFG3_SPEED_SHIFT; + + sc->cpu_minhz = cpufreq_actual_hz(sc, imx6_cpu_maxhz_tab[0]); + sc->cpu_maxhz = cpufreq_actual_hz(sc, imx6_cpu_maxhz_tab[cfg3speed]); + + /* + * Set the CPU to maximum speed. + * + * We won't have thermal throttling until interrupts are enabled, but we + * want to run at full speed through all the device init stuff. This + * basically assumes that a single core can't overheat before interrupts + * are enabled; empirical testing shows that to be a safe assumption. + */ + cpufreq_set_clock(sc, sc->cpu_maxhz); + device_printf(sc->dev, "CPU frequency %uMHz\n", sc->cpu_curmhz); +} + +static inline uint32_t +temp_from_count(struct imx6_anatop_softc *sc, uint32_t count) +{ + + return (((sc->temp_high_val - (count - sc->temp_high_cnt) * + (sc->temp_high_val - 250) / + (sc->temp_room_cnt - sc->temp_high_cnt)))); +} + +static inline uint32_t +temp_to_count(struct imx6_anatop_softc *sc, uint32_t temp) +{ + + return ((sc->temp_room_cnt - sc->temp_high_cnt) * + (sc->temp_high_val - temp) / (sc->temp_high_val - 250) + + sc->temp_high_cnt); +} + +static void +temp_update_count(struct imx6_anatop_softc *sc) +{ + uint32_t val; + + val = imx6_anatop_read_4(IMX6_ANALOG_TEMPMON_TEMPSENSE0); + if (!(val & IMX6_ANALOG_TEMPMON_TEMPSENSE0_VALID)) + return; + sc->temp_last_cnt = + (val & IMX6_ANALOG_TEMPMON_TEMPSENSE0_TEMP_CNT_MASK) >> + IMX6_ANALOG_TEMPMON_TEMPSENSE0_TEMP_CNT_SHIFT; } static int -imx6_anatop_detach(device_t dev) +temp_sysctl_handler(SYSCTL_HANDLER_ARGS) { - struct imx6_anatop_softc *sc; + struct imx6_anatop_softc *sc = arg1; + uint32_t t; - sc = device_get_softc(dev); + temp_update_count(sc); - if (sc->mem_res != NULL) - bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->mem_res); + t = temp_from_count(sc, sc->temp_last_cnt) + TZ_ZEROC; - return (0); + return (sysctl_handle_int(oidp, &t, 0, req)); +} + +static int +temp_throttle_sysctl_handler(SYSCTL_HANDLER_ARGS) +{ + struct imx6_anatop_softc *sc = arg1; + int err; + uint32_t temp; + + temp = sc->temp_throttle_val + TZ_ZEROC; + err = sysctl_handle_int(oidp, &temp, 0, req); + if (temp < TZ_ZEROC) + return (ERANGE); + temp -= TZ_ZEROC; + if (err != 0 || req->newptr == NULL || temp == sc->temp_throttle_val) + return (err); + + /* Value changed, update counts in softc and hardware. */ + sc->temp_throttle_val = temp; + sc->temp_throttle_trigger_cnt = temp_to_count(sc, sc->temp_throttle_val); + sc->temp_throttle_reset_cnt = temp_to_count(sc, sc->temp_throttle_val - 100); + imx6_anatop_write_4(IMX6_ANALOG_TEMPMON_TEMPSENSE0_CLR, + IMX6_ANALOG_TEMPMON_TEMPSENSE0_ALARM_MASK); + imx6_anatop_write_4(IMX6_ANALOG_TEMPMON_TEMPSENSE0_SET, + (sc->temp_throttle_trigger_cnt << + IMX6_ANALOG_TEMPMON_TEMPSENSE0_ALARM_SHIFT)); + return (err); +} + +static void +tempmon_gofast(struct imx6_anatop_softc *sc) +{ + + if (sc->cpu_curhz < sc->cpu_maxhz) { + cpufreq_set_clock(sc, sc->cpu_maxhz); + } +} + +static void +tempmon_goslow(struct imx6_anatop_softc *sc) +{ + + if (sc->cpu_curhz > sc->cpu_minhz) { + cpufreq_set_clock(sc, sc->cpu_minhz); + } +} + +static int +tempmon_intr(void *arg) +{ + struct imx6_anatop_softc *sc = arg; + + /* + * XXX Note that this code doesn't currently run (for some mysterious + * reason we just never get an interrupt), so the real monitoring is + * done by tempmon_throttle_check(). + */ + tempmon_goslow(sc); + /* XXX Schedule callout to speed back up eventually. */ + return (FILTER_HANDLED); +} + +static void +tempmon_throttle_check(void *arg) +{ + struct imx6_anatop_softc *sc = arg; + + /* Lower counts are higher temperatures. */ + if (sc->temp_last_cnt < sc->temp_throttle_trigger_cnt) + tempmon_goslow(sc); + else if (sc->temp_last_cnt > (sc->temp_throttle_reset_cnt)) + tempmon_gofast(sc); + + callout_reset_sbt(&sc->temp_throttle_callout, sc->temp_throttle_delay, + 0, tempmon_throttle_check, sc, 0); + +} + +static void +initialize_tempmon(struct imx6_anatop_softc *sc) +{ + uint32_t cal; + struct sysctl_ctx_list *ctx; + + /* + * Fetch calibration data: a sensor count at room temperature (25C), + * a sensor count at a high temperature, and that temperature + */ + cal = fsl_ocotp_read_4(FSL_OCOTP_ANA1); + sc->temp_room_cnt = (cal & 0xFFF00000) >> 20; + sc->temp_high_cnt = (cal & 0x000FFF00) >> 8; + sc->temp_high_val = (cal & 0x000000FF) * 10; + + /* + * Throttle to a lower cpu freq at 10C below the "hot" temperature, and + * reset back to max cpu freq at 5C below the trigger. + */ + sc->temp_throttle_val = sc->temp_high_val - 100; + sc->temp_throttle_trigger_cnt = + temp_to_count(sc, sc->temp_throttle_val); + sc->temp_throttle_reset_cnt = + temp_to_count(sc, sc->temp_throttle_val - 50); + + /* + * Set the sensor to sample automatically at 16Hz (32.768KHz/0x800), set + * the throttle count, and begin making measurements. + */ + imx6_anatop_write_4(IMX6_ANALOG_TEMPMON_TEMPSENSE1, 0x0800); + imx6_anatop_write_4(IMX6_ANALOG_TEMPMON_TEMPSENSE0, + (sc->temp_throttle_trigger_cnt << + IMX6_ANALOG_TEMPMON_TEMPSENSE0_ALARM_SHIFT) | + IMX6_ANALOG_TEMPMON_TEMPSENSE0_MEASURE); + + /* + * XXX Note that the alarm-interrupt feature isn't working yet, so + * we'll use a callout handler to check at 10Hz. Make sure we have an + * initial temperature reading before starting up the callouts so we + * don't get a bogus reading of zero. + */ + while (sc->temp_last_cnt == 0) + temp_update_count(sc); + sc->temp_throttle_delay = 100 * SBT_1MS; + callout_init(&sc->temp_throttle_callout, 0); + callout_reset_sbt(&sc->temp_throttle_callout, sc->temp_throttle_delay, + 0, tempmon_throttle_check, sc, 0); + + ctx = device_get_sysctl_ctx(sc->dev); + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(device_get_sysctl_tree(sc->dev)), + OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD, sc, 0, + temp_sysctl_handler, "IK", "Current die temperature"); + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(device_get_sysctl_tree(sc->dev)), + OID_AUTO, "throttle_temperature", CTLTYPE_INT | CTLFLAG_RW, sc, + 0, temp_throttle_sysctl_handler, "IK", + "Throttle CPU when exceeding this temperature"); +} + +static int +imx6_anatop_detach(device_t dev) +{ + + return (EBUSY); } static int imx6_anatop_attach(device_t dev) { struct imx6_anatop_softc *sc; - int err, rid; + int err; sc = device_get_softc(dev); + sc->dev = dev; /* Allocate bus_space resources. */ - rid = 0; - sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, - RF_ACTIVE); - if (sc->mem_res == NULL) { - device_printf(dev, "Cannot allocate memory resources\n"); + if (bus_alloc_resources(dev, imx6_anatop_spec, sc->res)) { + device_printf(dev, "Cannot allocate resources\n"); err = ENXIO; goto out; } + err = bus_setup_intr(dev, sc->res[IRQRES], INTR_TYPE_MISC | INTR_MPSAFE, + tempmon_intr, NULL, sc, &sc->temp_intrhand); + if (err != 0) + goto out; + imx6_anatop_sc = sc; + + /* + * Other code seen on the net sets this SELFBIASOFF flag around the same + * time the temperature sensor is set up, although it's unclear how the + * two are related (if at all). + */ + imx6_anatop_write_4(IMX6_ANALOG_PMU_MISC0_SET, + IMX6_ANALOG_PMU_MISC0_SELFBIASOFF); + + cpufreq_initialize(sc); + initialize_tempmon(sc); + err = 0; out: - if (err != 0) - imx6_anatop_detach(dev); + if (err != 0) { + bus_release_resources(dev, imx6_anatop_spec, sc->res); + } return (err); } @@ -129,7 +482,7 @@ imx6_anatop_probe(device_t dev) if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (ofw_bus_is_compatible(dev, "fsl,imx6q-anatop") == 0) + if (ofw_bus_is_compatible(dev, "fsl,imx6q-anatop") == 0) return (ENXIO); device_set_desc(dev, "Freescale i.MX6 Analog PLLs and Power"); @@ -137,6 +490,16 @@ imx6_anatop_probe(device_t dev) return (BUS_PROBE_DEFAULT); } +uint32_t +imx6_get_cpu_clock() +{ + uint32_t div; + + div = imx6_anatop_read_4(IMX6_ANALOG_CCM_PLL_ARM) & + IMX6_ANALOG_CCM_PLL_ARM_DIV_MASK; + return (cpufreq_hz_from_div(imx6_anatop_sc, div)); +} + static device_method_t imx6_anatop_methods[] = { /* Device interface */ DEVMETHOD(device_probe, imx6_anatop_probe), Modified: stable/10/sys/arm/freescale/imx/imx6_anatopreg.h ============================================================================== --- stable/10/sys/arm/freescale/imx/imx6_anatopreg.h Thu May 15 22:35:04 2014 (r266200) +++ stable/10/sys/arm/freescale/imx/imx6_anatopreg.h Thu May 15 22:50:06 2014 (r266201) @@ -33,6 +33,10 @@ #define IMX6_ANALOG_CCM_PLL_ARM_SET 0x004 #define IMX6_ANALOG_CCM_PLL_ARM_CLR 0x008 #define IMX6_ANALOG_CCM_PLL_ARM_TOG 0x00C +#define IMX6_ANALOG_CCM_PLL_ARM_DIV_MASK 0x7F +#define IMX6_ANALOG_CCM_PLL_ARM_LOCK (1U << 31) +#define IMX6_ANALOG_CCM_PLL_ARM_BYPASS (1 << 16) +#define IMX6_ANALOG_CCM_PLL_ARM_CLK_SRC_MASK (0x03 << 16) #define IMX6_ANALOG_CCM_PLL_USB1 0x010 #define IMX6_ANALOG_CCM_PLL_USB1_SET 0x014 #define IMX6_ANALOG_CCM_PLL_USB1_CLR 0x018 @@ -81,6 +85,7 @@ #define IMX6_ANALOG_CCM_PFD_528_SET 0x104 #define IMX6_ANALOG_CCM_PFD_528_CLR 0x108 #define IMX6_ANALOG_CCM_PFD_528_TOG 0x10C + #define IMX6_ANALOG_PMU_REG_CORE 0x140 #define IMX6_ANALOG_PMU_REG2_TARG_SHIFT 18 #define IMX6_ANALOG_PMU_REG2_TARG_MASK \ @@ -92,14 +97,56 @@ #define IMX6_ANALOG_PMU_REG0_TARG_MASK \ (0x1f << IMX6_ANALOG_PMU_REG0_TARG_SHIFT) -#define IMX6_ANALOG_CCM_MISC0 0x150 -#define IMX6_ANALOG_CCM_MISC0_SET 0x154 -#define IMX6_ANALOG_CCM_MISC0_CLR 0x158 -#define IMX6_ANALOG_CCM_MISC0_TOG 0x15C -#define IMX6_ANALOG_CCM_MISC2 0x170 -#define IMX6_ANALOG_CCM_MISC2_SET 0x174 -#define IMX6_ANALOG_CCM_MISC2_CLR 0x178 -#define IMX6_ANALOG_CCM_MISC2_TOG 0x17C +#define IMX6_ANALOG_PMU_MISC0 0x150 +#define IMX6_ANALOG_PMU_MISC0_SET 0x154 +#define IMX6_ANALOG_PMU_MISC0_CLR 0x158 +#define IMX6_ANALOG_PMU_MISC0_TOG 0x15C +#define IMX6_ANALOG_PMU_MISC0_SELFBIASOFF (1 << 3) + +#define IMX6_ANALOG_PMU_MISC1 0x160 +#define IMX6_ANALOG_PMU_MISC1_SET 0x164 +#define IMX6_ANALOG_PMU_MISC1_CLR 0x168 +#define IMX6_ANALOG_PMU_MISC1_TOG 0x16C +#define IMX6_ANALOG_PMU_MISC1_IRQ_TEMPSENSE (1 << 29) + +#define IMX6_ANALOG_PMU_MISC2 0x170 +#define IMX6_ANALOG_PMU_MISC2_SET 0x174 +#define IMX6_ANALOG_PMU_MISC2_CLR 0x178 +#define IMX6_ANALOG_PMU_MISC2_TOG 0x17C + +/* + * Note that the ANALOG_CCM_MISCn registers are the same as the PMU_MISCn + * registers; some bits conceptually belong to the PMU and some to the CCM. + */ +#define IMX6_ANALOG_CCM_MISC0 IMX6_ANALOG_PMU_MISC0 +#define IMX6_ANALOG_CCM_MISC0_SET IMX6_ANALOG_PMU_MISC0_SET +#define IMX6_ANALOG_CCM_MISC0_CLR IMX6_ANALOG_PMU_MISC0_CLR +#define IMX6_ANALOG_CCM_MISC0_TOG IMX6_ANALOG_PMU_MISC0_TOG + +#define IMX6_ANALOG_CCM_MISC2 IMX6_ANALOG_PMU_MISC2 +#define IMX6_ANALOG_CCM_MISC2_SET IMX6_ANALOG_PMU_MISC2_SET +#define IMX6_ANALOG_CCM_MISC2_CLR IMX6_ANALOG_PMU_MISC2_CLR +#define IMX6_ANALOG_CCM_MISC2_TOG IMX6_ANALOG_PMU_MISC2_TOG + +#define IMX6_ANALOG_TEMPMON_TEMPSENSE0 0x180 +#define IMX6_ANALOG_TEMPMON_TEMPSENSE0_SET 0x184 +#define IMX6_ANALOG_TEMPMON_TEMPSENSE0_CLR 0x188 +#define IMX6_ANALOG_TEMPMON_TEMPSENSE0_TOG 0x18C +#define IMX6_ANALOG_TEMPMON_TEMPSENSE0_TOG 0x18C +#define IMX6_ANALOG_TEMPMON_TEMPSENSE0_ALARM_SHIFT 20 +#define IMX6_ANALOG_TEMPMON_TEMPSENSE0_ALARM_MASK \ + (0xfff << IMX6_ANALOG_TEMPMON_TEMPSENSE0_ALARM_SHIFT) +#define IMX6_ANALOG_TEMPMON_TEMPSENSE0_TEMP_CNT_SHIFT 8 +#define IMX6_ANALOG_TEMPMON_TEMPSENSE0_TEMP_CNT_MASK \ + (0xfff << IMX6_ANALOG_TEMPMON_TEMPSENSE0_TEMP_CNT_SHIFT) +#define IMX6_ANALOG_TEMPMON_TEMPSENSE0_VALID 0x4 +#define IMX6_ANALOG_TEMPMON_TEMPSENSE0_MEASURE 0x2 +#define IMX6_ANALOG_TEMPMON_TEMPSENSE0_POWER_DOWN 0x1 + +#define IMX6_ANALOG_TEMPMON_TEMPSENSE1 0x190 +#define IMX6_ANALOG_TEMPMON_TEMPSENSE1_SET 0x194 +#define IMX6_ANALOG_TEMPMON_TEMPSENSE1_CLR 0x198 +#define IMX6_ANALOG_TEMPMON_TEMPSENSE1_TOG 0x19C #define IMX6_ANALOG_USB1_VBUS_DETECT 0x1A0 #define IMX6_ANALOG_USB1_VBUS_DETECT_SET 0x1A4 Modified: stable/10/sys/arm/freescale/imx/imx6_anatopvar.h ============================================================================== --- stable/10/sys/arm/freescale/imx/imx6_anatopvar.h Thu May 15 22:35:04 2014 (r266200) +++ stable/10/sys/arm/freescale/imx/imx6_anatopvar.h Thu May 15 22:50:06 2014 (r266201) @@ -40,4 +40,6 @@ uint32_t imx6_anatop_read_4(bus_size_t _offset); void imx6_anatop_write_4(bus_size_t _offset, uint32_t _value); +uint32_t imx6_get_cpu_clock(void); + #endif Modified: stable/10/sys/arm/freescale/imx/imx6_machdep.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx6_machdep.c Thu May 15 22:35:04 2014 (r266200) +++ stable/10/sys/arm/freescale/imx/imx6_machdep.c Thu May 15 22:50:06 2014 (r266201) @@ -55,9 +55,6 @@ void initarm_early_init(void) { - /* XXX - Get rid of this stuff soon. */ - boothowto |= RB_VERBOSE|RB_MULTIPLE; - bootverbose = 1; } void @@ -190,3 +187,27 @@ u_int imx_soc_type() return (IMXSOC_6Q); } +/* + * Early putc routine for EARLY_PRINTF support. To use, add to kernel config: + * option SOCDEV_PA=0x02000000 + * option SOCDEV_VA=0x02000000 + * option EARLY_PRINTF + * Resist the temptation to change the #if 0 to #ifdef EARLY_PRINTF here. It + * makes sense now, but if multiple SOCs do that it will make early_putc another + * duplicate symbol to be eliminated on the path to a generic kernel. + */ +#if 0 +static void +imx6_early_putc(int c) +{ + volatile uint32_t * UART_STAT_REG = (uint32_t *)0x02020098; + volatile uint32_t * UART_TX_REG = (uint32_t *)0x02020040; + const uint32_t UART_TXRDY = (1 << 3); + + while ((*UART_STAT_REG & UART_TXRDY) == 0) + continue; + *UART_TX_REG = c; +} +early_putc_t *early_putc = imx6_early_putc; +#endif + Modified: stable/10/sys/arm/freescale/vybrid/files.vybrid ============================================================================== --- stable/10/sys/arm/freescale/vybrid/files.vybrid Thu May 15 22:35:04 2014 (r266200) +++ stable/10/sys/arm/freescale/vybrid/files.vybrid Thu May 15 22:50:06 2014 (r266201) @@ -29,4 +29,5 @@ arm/freescale/vybrid/vf_nfc.c optional arm/freescale/vybrid/vf_ehci.c optional ehci arm/freescale/vybrid/vf_gpio.c optional gpio arm/freescale/vybrid/vf_uart.c optional uart +arm/freescale/vybrid/vf_sai.c optional sound dev/ffec/if_ffec.c optional ffec Copied and modified: stable/10/sys/arm/freescale/vybrid/vf_sai.c (from r261982, head/sys/arm/freescale/vybrid/vf_sai.c) ============================================================================== --- head/sys/arm/freescale/vybrid/vf_sai.c Sun Feb 16 16:49:54 2014 (r261982, copy source) +++ stable/10/sys/arm/freescale/vybrid/vf_sai.c Thu May 15 22:50:06 2014 (r266201) @@ -396,7 +396,8 @@ sai_dma_intr(void *arg, int chn) if (sc->pos >= sc->dma_size) sc->pos -= sc->dma_size; - chn_intr(ch->channel); + if (ch->run) + chn_intr(ch->channel); return (0); } @@ -492,7 +493,7 @@ setup_dma(struct sc_pcminfo *scp) tcd->nbytes = 64; tcd->nmajor = 512; - tcd->smod = 18; /* dma_size range */ + tcd->smod = 17; /* dma_size range */ tcd->dmod = 0; tcd->esg = 0; tcd->soff = 0x4; @@ -523,6 +524,7 @@ saichan_trigger(kobj_t obj, void *data, #if 0 device_printf(scp->dev, "trigger start\n"); #endif + ch->run = 1; break; case PCMTRIG_STOP: @@ -530,6 +532,7 @@ saichan_trigger(kobj_t obj, void *data, #if 0 device_printf(scp->dev, "trigger stop or abort\n"); #endif + ch->run = 0; break; } @@ -720,7 +723,7 @@ sai_attach(device_t dev) scp->dev = dev; /* DMA */ - sc->dma_size = 262144; + sc->dma_size = 131072; /* * Must use dma_size boundary as modulo feature required. Modified: stable/10/sys/arm/include/physmem.h ============================================================================== --- stable/10/sys/arm/include/physmem.h Thu May 15 22:35:04 2014 (r266200) +++ stable/10/sys/arm/include/physmem.h Thu May 15 22:50:06 2014 (r266201) @@ -65,7 +65,7 @@ void arm_physmem_print_tables(void); #include -inline void +static inline void arm_physmem_hardware_regions(struct mem_region * mrptr, int mrcount) { while (mrcount--) { @@ -74,7 +74,7 @@ arm_physmem_hardware_regions(struct mem_ } } -inline void +static inline void arm_physmem_exclude_regions(struct mem_region * mrptr, int mrcount, uint32_t exflags) { Modified: stable/10/sys/boot/fdt/dts/imx6.dtsi ============================================================================== --- stable/10/sys/boot/fdt/dts/imx6.dtsi Thu May 15 22:35:04 2014 (r266200) +++ stable/10/sys/boot/fdt/dts/imx6.dtsi Thu May 15 22:50:06 2014 (r266201) @@ -97,6 +97,8 @@ anatop: anatop@020c8000 { compatible = "fsl,imx6q-anatop"; reg = <0x020c8000 0x1000>; + interrupt-parent = <&gic>; + interrupts = <49>; } gpt: timer@02098000 { Modified: stable/10/sys/boot/fdt/dts/vybrid.dtsi ============================================================================== --- stable/10/sys/boot/fdt/dts/vybrid.dtsi Thu May 15 22:35:04 2014 (r266200) +++ stable/10/sys/boot/fdt/dts/vybrid.dtsi Thu May 15 22:50:06 2014 (r266201) @@ -311,6 +311,9 @@ interrupt-parent = <&GIC>; status = "disabled"; edma-controller = <&edma1>; + edma-src-receive = < 8 >; + edma-src-transmit = < 9 >; + edma-mux-group = < 1 >; clock_names = "sai3", "cko1"; iomux_config = < 16 0x2 19 0x2 From owner-svn-src-stable@FreeBSD.ORG Thu May 15 22:51:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D86174FE; Thu, 15 May 2014 22:51:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C59062C04; Thu, 15 May 2014 22:51:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FMpEPG054091; Thu, 15 May 2014 22:51:14 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FMpE23054090; Thu, 15 May 2014 22:51:14 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405152251.s4FMpE23054090@svn.freebsd.org> From: Ian Lepore Date: Thu, 15 May 2014 22:51:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266202 - stable/10/usr.bin/dtc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 22:51:14 -0000 Author: ian Date: Thu May 15 22:51:14 2014 New Revision: 266202 URL: http://svnweb.freebsd.org/changeset/base/266202 Log: MFC r262394: Fix parsing multiple roots with whitespace between them. Modified: stable/10/usr.bin/dtc/fdt.cc Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/dtc/fdt.cc ============================================================================== --- stable/10/usr.bin/dtc/fdt.cc Thu May 15 22:50:06 2014 (r266201) +++ stable/10/usr.bin/dtc/fdt.cc Thu May 15 22:51:14 2014 (r266202) @@ -1054,6 +1054,7 @@ device_tree::parse_roots(input_buffer &i { valid = false; } + input.next_token(); } } From owner-svn-src-stable@FreeBSD.ORG Fri May 16 00:14:55 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B76E5645; Fri, 16 May 2014 00:14:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A14B821EC; Fri, 16 May 2014 00:14:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4G0Et42091671; Fri, 16 May 2014 00:14:55 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4G0Eo6v091643; Fri, 16 May 2014 00:14:50 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405160014.s4G0Eo6v091643@svn.freebsd.org> From: Ian Lepore Date: Fri, 16 May 2014 00:14:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266203 - in stable/10/sys: arm/arm arm/conf arm/freescale/imx arm/freescale/vybrid arm/include arm/mv/armadaxp arm/samsung/exynos arm/ti/omap4 boot/fdt/dts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 00:14:55 -0000 Author: ian Date: Fri May 16 00:14:50 2014 New Revision: 266203 URL: http://svnweb.freebsd.org/changeset/base/266203 Log: MFC r262409, r262411, r262413, r262420, r262426, r262427, r262440, r262456, r262482, r262483, r262531, Move the declaration for mpentry() into a header file instead of pasting it into a bunch of different .c files. If the L2 cache type is PIPT, pass a physical address for a flush. Actually set the proper bit to indicate TTB shared memory. Add a new cache maintenance function, idcache_inv_all, to the table, and implementations for each of the chips we support. Invalidate caches immediately upon entry to init_secondary(). Also set the Bufferable bit in the PDE entries of the secondary processor startup pagetables. Add the bits needed to run SMP on imx6. Invalidate the SCU cache tag ram on all 4 cores, not just 1-3. Minor tweaks to the imx GPT timer Vybrid enhancements... - Pin configuration is a complete iomux register now and includes drive strength, pull mode, mux mode, speed, etc. - Add i2c devices to the tree - Add IPG clock - Add support for Quartz Module. - Pin configuration is a complete iomux register now and includes drive strength, pull mode, mux mode, speed, etc. - Add i2c devices to the tree - Add IPG clock Added: stable/10/sys/arm/conf/QUARTZ - copied unchanged from r262456, head/sys/arm/conf/QUARTZ stable/10/sys/arm/freescale/imx/imx6_mp.c - copied, changed from r262427, head/sys/arm/freescale/imx/imx6_mp.c stable/10/sys/boot/fdt/dts/vybrid-quartz.dts - copied, changed from r262456, head/sys/boot/fdt/dts/vybrid-quartz.dts Modified: stable/10/sys/arm/arm/cpufunc.c stable/10/sys/arm/arm/cpufunc_asm_armv4.S stable/10/sys/arm/arm/cpufunc_asm_armv6.S stable/10/sys/arm/arm/cpufunc_asm_armv7.S stable/10/sys/arm/arm/locore.S stable/10/sys/arm/arm/machdep.c stable/10/sys/arm/arm/mp_machdep.c stable/10/sys/arm/freescale/imx/files.imx6 stable/10/sys/arm/freescale/imx/imx_gpt.c stable/10/sys/arm/freescale/imx/std.imx6 stable/10/sys/arm/freescale/vybrid/vf_ccm.c stable/10/sys/arm/freescale/vybrid/vf_iomuxc.c stable/10/sys/arm/include/cpufunc.h stable/10/sys/arm/include/smp.h stable/10/sys/arm/mv/armadaxp/armadaxp_mp.c stable/10/sys/arm/samsung/exynos/exynos5_mp.c stable/10/sys/arm/ti/omap4/omap4_mp.c stable/10/sys/boot/fdt/dts/vybrid-colibri-vf50.dts stable/10/sys/boot/fdt/dts/vybrid-cosmic.dts stable/10/sys/boot/fdt/dts/vybrid.dtsi Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/cpufunc.c ============================================================================== --- stable/10/sys/arm/arm/cpufunc.c Thu May 15 22:51:14 2014 (r266202) +++ stable/10/sys/arm/arm/cpufunc.c Fri May 16 00:14:50 2014 (r266203) @@ -146,6 +146,7 @@ struct cpu_functions arm7tdmi_cpufuncs = (void *)arm7tdmi_cache_flushID, /* dcache_inv_range */ (void *)cpufunc_nullop, /* dcache_wb_range */ + cpufunc_nullop, /* idcache_inv_all */ arm7tdmi_cache_flushID, /* idcache_wbinv_all */ (void *)arm7tdmi_cache_flushID, /* idcache_wbinv_range */ cpufunc_nullop, /* l2cache_wbinv_all */ @@ -208,6 +209,7 @@ struct cpu_functions arm8_cpufuncs = { /*XXX*/ (void *)arm8_cache_purgeID, /* dcache_inv_range */ (void *)arm8_cache_cleanID, /* dcache_wb_range */ + cpufunc_nullop, /* idcache_inv_all */ arm8_cache_purgeID, /* idcache_wbinv_all */ (void *)arm8_cache_purgeID, /* idcache_wbinv_range */ cpufunc_nullop, /* l2cache_wbinv_all */ @@ -269,6 +271,7 @@ struct cpu_functions arm9_cpufuncs = { arm9_dcache_inv_range, /* dcache_inv_range */ arm9_dcache_wb_range, /* dcache_wb_range */ + armv4_idcache_inv_all, /* idcache_inv_all */ arm9_idcache_wbinv_all, /* idcache_wbinv_all */ arm9_idcache_wbinv_range, /* idcache_wbinv_range */ cpufunc_nullop, /* l2cache_wbinv_all */ @@ -331,6 +334,7 @@ struct cpu_functions armv5_ec_cpufuncs = armv5_ec_dcache_inv_range, /* dcache_inv_range */ armv5_ec_dcache_wb_range, /* dcache_wb_range */ + armv4_idcache_inv_all, /* idcache_inv_all */ armv5_ec_idcache_wbinv_all, /* idcache_wbinv_all */ armv5_ec_idcache_wbinv_range, /* idcache_wbinv_range */ @@ -392,6 +396,7 @@ struct cpu_functions sheeva_cpufuncs = { sheeva_dcache_inv_range, /* dcache_inv_range */ sheeva_dcache_wb_range, /* dcache_wb_range */ + armv4_idcache_inv_all, /* idcache_inv_all */ armv5_ec_idcache_wbinv_all, /* idcache_wbinv_all */ sheeva_idcache_wbinv_range, /* idcache_wbinv_all */ @@ -454,6 +459,7 @@ struct cpu_functions arm10_cpufuncs = { arm10_dcache_inv_range, /* dcache_inv_range */ arm10_dcache_wb_range, /* dcache_wb_range */ + armv4_idcache_inv_all, /* idcache_inv_all */ arm10_idcache_wbinv_all, /* idcache_wbinv_all */ arm10_idcache_wbinv_range, /* idcache_wbinv_range */ cpufunc_nullop, /* l2cache_wbinv_all */ @@ -515,6 +521,7 @@ struct cpu_functions pj4bv7_cpufuncs = { armv7_dcache_inv_range, /* dcache_inv_range */ armv7_dcache_wb_range, /* dcache_wb_range */ + armv7_idcache_inv_all, /* idcache_inv_all */ armv7_idcache_wbinv_all, /* idcache_wbinv_all */ armv7_idcache_wbinv_range, /* idcache_wbinv_all */ @@ -577,6 +584,7 @@ struct cpu_functions sa110_cpufuncs = { /*XXX*/ sa1_cache_purgeD_rng, /* dcache_inv_range */ sa1_cache_cleanD_rng, /* dcache_wb_range */ + sa1_cache_flushID, /* idcache_inv_all */ sa1_cache_purgeID, /* idcache_wbinv_all */ sa1_cache_purgeID_rng, /* idcache_wbinv_range */ cpufunc_nullop, /* l2cache_wbinv_all */ @@ -638,6 +646,7 @@ struct cpu_functions sa11x0_cpufuncs = { /*XXX*/ sa1_cache_purgeD_rng, /* dcache_inv_range */ sa1_cache_cleanD_rng, /* dcache_wb_range */ + sa1_cache_flushID, /* idcache_inv_all */ sa1_cache_purgeID, /* idcache_wbinv_all */ sa1_cache_purgeID_rng, /* idcache_wbinv_range */ cpufunc_nullop, /* l2cache_wbinv_all */ @@ -699,6 +708,7 @@ struct cpu_functions ixp12x0_cpufuncs = /*XXX*/ sa1_cache_purgeD_rng, /* dcache_inv_range */ sa1_cache_cleanD_rng, /* dcache_wb_range */ + sa1_cache_flushID, /* idcache_inv_all */ sa1_cache_purgeID, /* idcache_wbinv_all */ sa1_cache_purgeID_rng, /* idcache_wbinv_range */ cpufunc_nullop, /* l2cache_wbinv_all */ @@ -763,6 +773,7 @@ struct cpu_functions xscale_cpufuncs = { xscale_cache_flushD_rng, /* dcache_inv_range */ xscale_cache_cleanD_rng, /* dcache_wb_range */ + xscale_cache_flushID, /* idcache_inv_all */ xscale_cache_purgeID, /* idcache_wbinv_all */ xscale_cache_purgeID_rng, /* idcache_wbinv_range */ cpufunc_nullop, /* l2cache_wbinv_all */ @@ -826,6 +837,7 @@ struct cpu_functions xscalec3_cpufuncs = xscale_cache_flushD_rng, /* dcache_inv_range */ xscalec3_cache_cleanD_rng, /* dcache_wb_range */ + xscale_cache_flushID, /* idcache_inv_all */ xscalec3_cache_purgeID, /* idcache_wbinv_all */ xscalec3_cache_purgeID_rng, /* idcache_wbinv_range */ xscalec3_l2cache_purge, /* l2cache_wbinv_all */ @@ -888,6 +900,7 @@ struct cpu_functions fa526_cpufuncs = { fa526_dcache_inv_range, /* dcache_inv_range */ fa526_dcache_wb_range, /* dcache_wb_range */ + armv4_idcache_inv_all, /* idcache_inv_all */ fa526_idcache_wbinv_all, /* idcache_wbinv_all */ fa526_idcache_wbinv_range, /* idcache_wbinv_range */ cpufunc_nullop, /* l2cache_wbinv_all */ @@ -949,6 +962,7 @@ struct cpu_functions arm1136_cpufuncs = armv6_dcache_inv_range, /* dcache_inv_range */ armv6_dcache_wb_range, /* dcache_wb_range */ + armv6_idcache_inv_all, /* idcache_inv_all */ arm11x6_idcache_wbinv_all, /* idcache_wbinv_all */ arm11x6_idcache_wbinv_range, /* idcache_wbinv_range */ @@ -1010,6 +1024,7 @@ struct cpu_functions arm1176_cpufuncs = armv6_dcache_inv_range, /* dcache_inv_range */ armv6_dcache_wb_range, /* dcache_wb_range */ + armv6_idcache_inv_all, /* idcache_inv_all */ arm11x6_idcache_wbinv_all, /* idcache_wbinv_all */ arm11x6_idcache_wbinv_range, /* idcache_wbinv_range */ @@ -1072,6 +1087,7 @@ struct cpu_functions cortexa_cpufuncs = armv7_dcache_inv_range, /* dcache_inv_range */ armv7_dcache_wb_range, /* dcache_wb_range */ + armv7_idcache_inv_all, /* idcache_inv_all */ armv7_idcache_wbinv_all, /* idcache_wbinv_all */ armv7_idcache_wbinv_range, /* idcache_wbinv_range */ Modified: stable/10/sys/arm/arm/cpufunc_asm_armv4.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_armv4.S Thu May 15 22:51:14 2014 (r266202) +++ stable/10/sys/arm/arm/cpufunc_asm_armv4.S Fri May 16 00:14:50 2014 (r266203) @@ -71,3 +71,9 @@ ENTRY(armv4_drain_writebuf) RET END(armv4_drain_writebuf) +ENTRY(armv4_idcache_inv_all) + mov r0, #0 + mcr p15, 0, r0, c7, c7, 0 /* invalidate all I+D cache */ + RET +END(armv4_drain_writebuf) + Modified: stable/10/sys/arm/arm/cpufunc_asm_armv6.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_armv6.S Thu May 15 22:51:14 2014 (r266202) +++ stable/10/sys/arm/arm/cpufunc_asm_armv6.S Fri May 16 00:14:50 2014 (r266203) @@ -148,3 +148,9 @@ ENTRY(armv6_dcache_wbinv_all) END(armv6_idcache_wbinv_all) END(armv6_dcache_wbinv_all) +ENTRY(armv6_idcache_inv_all) + mov r0, #0 + mcr p15, 0, r0, c7, c7, 0 /* invalidate all I+D cache */ + RET +END(armv6_idcache_inv_all) + Modified: stable/10/sys/arm/arm/cpufunc_asm_armv7.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_armv7.S Thu May 15 22:51:14 2014 (r266202) +++ stable/10/sys/arm/arm/cpufunc_asm_armv7.S Fri May 16 00:14:50 2014 (r266203) @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2010 Per Odlund * Copyright (C) 2011 MARVELL INTERNATIONAL LTD. * All rights reserved. * @@ -305,3 +306,40 @@ ENTRY(armv7_auxctrl) RET END(armv7_auxctrl) +ENTRY(armv7_idcache_inv_all) + mov r0, #0 + mcr p15, 2, r0, c0, c0, 0 @ set cache level to L1 + mrc p15, 1, r0, c0, c0, 0 @ read CCSIDR + + ubfx r2, r0, #13, #15 @ get num sets - 1 from CCSIDR + ubfx r3, r0, #3, #10 @ get numways - 1 from CCSIDR + clz r1, r3 @ number of bits to MSB of way + lsl r3, r3, r1 @ shift into position + mov ip, #1 @ + lsl ip, ip, r1 @ ip now contains the way decr + + ubfx r0, r0, #0, #3 @ get linesize from CCSIDR + add r0, r0, #4 @ apply bias + lsl r2, r2, r0 @ shift sets by log2(linesize) + add r3, r3, r2 @ merge numsets - 1 with numways - 1 + sub ip, ip, r2 @ subtract numsets - 1 from way decr + mov r1, #1 + lsl r1, r1, r0 @ r1 now contains the set decr + mov r2, ip @ r2 now contains set way decr + + /* r3 = ways/sets, r2 = way decr, r1 = set decr, r0 and ip are free */ +1: mcr p15, 0, r3, c7, c6, 2 @ invalidate line + movs r0, r3 @ get current way/set + beq 2f @ at 0 means we are done. + movs r0, r0, lsl #10 @ clear way bits leaving only set bits + subne r3, r3, r1 @ non-zero?, decrement set # + subeq r3, r3, r2 @ zero?, decrement way # and restore set count + b 1b + +2: dsb @ wait for stores to finish + mov r0, #0 @ and ... + mcr p15, 0, r0, c7, c5, 0 @ invalidate instruction+branch cache + isb @ instruction sync barrier + bx lr @ return +END(armv7_l1cache_inv_all) + Modified: stable/10/sys/arm/arm/locore.S ============================================================================== --- stable/10/sys/arm/arm/locore.S Thu May 15 22:51:14 2014 (r266202) +++ stable/10/sys/arm/arm/locore.S Fri May 16 00:14:50 2014 (r266203) @@ -425,7 +425,7 @@ Ltag: orr r0, r0, #PHYSADDR ldr r0, [r0] #if defined(SMP) - orr r0, r0, #0 /* Set TTB shared memory flag */ + orr r0, r0, #2 /* Set TTB shared memory flag */ #endif mcr p15, 0, r0, c2, c0, 0 /* Set TTB */ mcr p15, 0, r0, c8, c7, 0 /* Flush TLB */ Modified: stable/10/sys/arm/arm/machdep.c ============================================================================== --- stable/10/sys/arm/arm/machdep.c Thu May 15 22:51:14 2014 (r266202) +++ stable/10/sys/arm/arm/machdep.c Fri May 16 00:14:50 2014 (r266203) @@ -410,7 +410,11 @@ cpu_flush_dcache(void *ptr, size_t len) { cpu_dcache_wb_range((uintptr_t)ptr, len); +#ifdef ARM_L2_PIPT + cpu_l2cache_wb_range((uintptr_t)vtophys(ptr), len); +#else cpu_l2cache_wb_range((uintptr_t)ptr, len); +#endif } /* Get current clock frequency for the given cpu id. */ Modified: stable/10/sys/arm/arm/mp_machdep.c ============================================================================== --- stable/10/sys/arm/arm/mp_machdep.c Thu May 15 22:51:14 2014 (r266202) +++ stable/10/sys/arm/arm/mp_machdep.c Fri May 16 00:14:50 2014 (r266203) @@ -128,10 +128,10 @@ cpu_mp_start(void) bzero((void *)temp_pagetable_va, L1_TABLE_SIZE); for (addr = arm_physmem_kernaddr; addr <= addr_end; addr += L1_S_SIZE) { ((int *)(temp_pagetable_va))[addr >> L1_S_SHIFT] = - L1_TYPE_S|L1_SHARED|L1_S_C|L1_S_AP(AP_KRW)|L1_S_DOM(PMAP_DOMAIN_KERNEL)|addr; + L1_TYPE_S|L1_SHARED|L1_S_C|L1_S_B|L1_S_AP(AP_KRW)|L1_S_DOM(PMAP_DOMAIN_KERNEL)|addr; ((int *)(temp_pagetable_va))[(addr - arm_physmem_kernaddr + KERNVIRTADDR) >> L1_S_SHIFT] = - L1_TYPE_S|L1_SHARED|L1_S_C|L1_S_AP(AP_KRW)|L1_S_DOM(PMAP_DOMAIN_KERNEL)|addr; + L1_TYPE_S|L1_SHARED|L1_S_C|L1_S_B|L1_S_AP(AP_KRW)|L1_S_DOM(PMAP_DOMAIN_KERNEL)|addr; } #if defined(CPU_MV_PJ4B) @@ -173,6 +173,8 @@ init_secondary(int cpu) uint32_t loop_counter; int start = 0, end = 0; + cpu_idcache_inv_all(); + cpu_setup(NULL); setttb(pmap_pa); cpu_tlb_flushID(); Copied: stable/10/sys/arm/conf/QUARTZ (from r262456, head/sys/arm/conf/QUARTZ) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/conf/QUARTZ Fri May 16 00:14:50 2014 (r266203, copy of r262456, head/sys/arm/conf/QUARTZ) @@ -0,0 +1,26 @@ +# Kernel configuration for Device Solutions Quartz Module. +# +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +include "VYBRID.common" +ident QUARTZ + +#FDT +options FDT +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=vybrid-quartz.dts Modified: stable/10/sys/arm/freescale/imx/files.imx6 ============================================================================== --- stable/10/sys/arm/freescale/imx/files.imx6 Thu May 15 22:51:14 2014 (r266202) +++ stable/10/sys/arm/freescale/imx/files.imx6 Fri May 16 00:14:50 2014 (r266203) @@ -22,6 +22,7 @@ arm/freescale/imx/common.c standard arm/freescale/imx/imx6_anatop.c standard arm/freescale/imx/imx6_ccm.c standard arm/freescale/imx/imx6_machdep.c standard +arm/freescale/imx/imx6_mp.c optional smp arm/freescale/imx/imx6_pl310.c standard arm/freescale/imx/imx_machdep.c standard arm/freescale/imx/imx_gpt.c standard Copied and modified: stable/10/sys/arm/freescale/imx/imx6_mp.c (from r262427, head/sys/arm/freescale/imx/imx6_mp.c) ============================================================================== --- head/sys/arm/freescale/imx/imx6_mp.c Mon Feb 24 03:51:31 2014 (r262427, copy source) +++ stable/10/sys/arm/freescale/imx/imx6_mp.c Fri May 16 00:14:50 2014 (r266203) @@ -113,11 +113,11 @@ platform_mp_start_ap(void) panic("Couldn't map the system reset controller (SRC)\n"); /* - * Invalidate SCU cache tags. The 0x0000fff0 constant invalidates all - * ways on all cores 1-3 (leaving core 0 alone). Per the ARM docs, it's - * harmless to write to the bits for cores that are not present. + * Invalidate SCU cache tags. The 0x0000ffff constant invalidates all + * ways on all cores 0-3. Per the ARM docs, it's harmless to write to + * the bits for cores that are not present. */ - bus_space_write_4(fdtbus_bs_tag, scu, SCU_INV_TAGS_REG, 0x0000fff0); + bus_space_write_4(fdtbus_bs_tag, scu, SCU_INV_TAGS_REG, 0x0000ffff); /* * Erratum ARM/MP: 764369 (problems with cache maintenance). @@ -128,13 +128,17 @@ platform_mp_start_ap(void) bus_space_write_4(fdtbus_bs_tag, scu, SCU_DIAG_CONTROL, val | SCU_DIAG_DISABLE_MIGBIT); - /* Enable the SCU. */ + /* + * Enable the SCU, then clean the cache on this core. After these two + * operations the cache tag ram in the SCU is coherent with the contents + * of the cache on this core. The other cores aren't running yet so + * their caches can't contain valid data yet, but we've initialized + * their SCU tag ram above, so they will be coherent from startup. + */ val = bus_space_read_4(fdtbus_bs_tag, scu, SCU_CONTROL_REG); bus_space_write_4(fdtbus_bs_tag, scu, SCU_CONTROL_REG, val | SCU_CONTROL_ENABLE); - cpu_idcache_wbinv_all(); - cpu_l2cache_wbinv_all(); /* * For each AP core, set the entry point address and argument registers, Modified: stable/10/sys/arm/freescale/imx/imx_gpt.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx_gpt.c Thu May 15 22:51:14 2014 (r266202) +++ stable/10/sys/arm/freescale/imx/imx_gpt.c Fri May 16 00:14:50 2014 (r266203) @@ -75,7 +75,7 @@ static int imx_gpt_probe(device_t); static int imx_gpt_attach(device_t); static struct timecounter imx_gpt_timecounter = { - .tc_name = "i.MX GPT Timecounter", + .tc_name = "iMXGPT", .tc_get_timecount = imx_gpt_get_timecount, .tc_counter_mask = ~0u, .tc_frequency = 0, @@ -244,9 +244,9 @@ imx_gpt_attach(device_t dev) } /* Register as an eventtimer. */ - sc->et.et_name = "i.MXxxx GPT Eventtimer"; + sc->et.et_name = "iMXGPT"; sc->et.et_flags = ET_FLAGS_ONESHOT | ET_FLAGS_PERIODIC; - sc->et.et_quality = 1000; + sc->et.et_quality = 800; sc->et.et_frequency = sc->clkfreq; sc->et.et_min_period = (MIN_ET_PERIOD << 32) / sc->et.et_frequency; sc->et.et_max_period = (0xfffffffeLLU << 32) / sc->et.et_frequency; @@ -286,9 +286,9 @@ imx_gpt_timer_start(struct eventtimer *e /* Do not disturb, otherwise event will be lost */ spinlock_enter(); /* Set expected value */ - WRITE4(sc, IMX_GPT_OCR1, READ4(sc, IMX_GPT_CNT) + ticks); + WRITE4(sc, IMX_GPT_OCR3, READ4(sc, IMX_GPT_CNT) + ticks); /* Enable compare register 1 Interrupt */ - SET4(sc, IMX_GPT_IR, GPT_IR_OF1); + SET4(sc, IMX_GPT_IR, GPT_IR_OF3); /* Now everybody can relax */ spinlock_exit(); return (0); @@ -349,7 +349,7 @@ imx_gpt_intr(void *arg) WRITE4(sc, IMX_GPT_SR, status); /* Handle one-shot timer events. */ - if (status & GPT_IR_OF1) { + if (status & GPT_IR_OF3) { if (sc->et.et_active) { sc->et.et_event_cb(&sc->et, sc->et.et_arg); } Modified: stable/10/sys/arm/freescale/imx/std.imx6 ============================================================================== --- stable/10/sys/arm/freescale/imx/std.imx6 Thu May 15 22:51:14 2014 (r266202) +++ stable/10/sys/arm/freescale/imx/std.imx6 Fri May 16 00:14:50 2014 (r266203) @@ -10,5 +10,8 @@ options KERNPHYSADDR = 0x12000000 makeoptions KERNPHYSADDR = 0x12000000 options PHYSADDR = 0x10000000 +options IPI_IRQ_START=0 +options IPI_IRQ_END=15 + files "../freescale/imx/files.imx6" Modified: stable/10/sys/arm/freescale/vybrid/vf_ccm.c ============================================================================== --- stable/10/sys/arm/freescale/vybrid/vf_ccm.c Thu May 15 22:51:14 2014 (r266202) +++ stable/10/sys/arm/freescale/vybrid/vf_ccm.c Fri May 16 00:14:50 2014 (r266203) @@ -164,6 +164,18 @@ struct clk { uint32_t sel_val; }; +static struct clk ipg_clk = { + .reg = CCM_CACRR, + .enable_reg = 0, + .div_mask = IPG_CLK_DIV_MASK, + .div_shift = IPG_CLK_DIV_SHIFT, + .div_val = 1, /* Divide by 2 */ + .sel_reg = 0, + .sel_mask = 0, + .sel_shift = 0, + .sel_val = 0, +}; + /* PLL4 clock divider (before switching the clocks should be gated) 000 Divide by 1 (only if PLL frequency less than or equal to 650 MHz) @@ -310,6 +322,7 @@ struct clock_entry { }; static struct clock_entry clock_map[] = { + {"ipg", &ipg_clk}, {"pll4", &pll4_clk}, {"sai3", &sai3_clk}, {"cko1", &cko1_clk}, Modified: stable/10/sys/arm/freescale/vybrid/vf_iomuxc.c ============================================================================== --- stable/10/sys/arm/freescale/vybrid/vf_iomuxc.c Thu May 15 22:51:14 2014 (r266202) +++ stable/10/sys/arm/freescale/vybrid/vf_iomuxc.c Fri May 16 00:14:50 2014 (r266203) @@ -56,21 +56,42 @@ __FBSDID("$FreeBSD$"); #include #include -#define IBE (1 << 0) /* Input Buffer Enable Field */ -#define OBE (1 << 1) /* Output Buffer Enable Field. */ -#define PUE (1 << 2) /* Pull / Keep Select Field. */ -#define PKE (1 << 3) /* Pull / Keep Enable Field. */ -#define PUS_MASK (3 << 4) /* Pull Up / Down Config Field. */ -#define DSE_MASK (7 << 6) /* Drive Strength Field. */ -#define HYS (1 << 9) /* Hysteresis Enable Field */ - #define MUX_MODE_MASK 7 #define MUX_MODE_SHIFT 20 #define MUX_MODE_GPIO 0 #define MUX_MODE_VBUS_EN_OTG 2 -#define PUS_22_KOHM_PULL_UP (3 << 4) -#define DSE_25_OHM (6 << 6) +#define IBE (1 << 0) /* Input Buffer Enable Field */ +#define OBE (1 << 1) /* Output Buffer Enable Field. */ +#define PUE (1 << 2) /* Pull / Keep Select Field. */ +#define PKE (1 << 3) /* Pull / Keep Enable Field. */ +#define HYS (1 << 9) /* Hysteresis Enable Field */ +#define ODE (1 << 10) /* Open Drain Enable Field. */ +#define SRE (1 << 11) /* Slew Rate Field. */ + +#define SPEED_SHIFT 12 +#define SPEED_MASK 0x3 +#define SPEED_LOW 0 /* 50 MHz */ +#define SPEED_MEDIUM 0x1 /* 100 MHz */ +#define SPEED_HIGH 0x3 /* 200 MHz */ + +#define PUS_SHIFT 4 /* Pull Up / Down Config Field Shift */ +#define PUS_MASK 0x3 +#define PUS_100_KOHM_PULL_DOWN 0 +#define PUS_47_KOHM_PULL_UP 0x1 +#define PUS_100_KOHM_PULL_UP 0x2 +#define PUS_22_KOHM_PULL_UP 0x3 + +#define DSE_SHIFT 6 /* Drive Strength Field Shift */ +#define DSE_MASK 0x7 +#define DSE_DISABLED 0 /* Output driver disabled */ +#define DSE_150_OHM 0x1 +#define DSE_75_OHM 0x2 +#define DSE_50_OHM 0x3 +#define DSE_37_OHM 0x4 +#define DSE_30_OHM 0x5 +#define DSE_25_OHM 0x6 +#define DSE_20_OHM 0x7 #define MAX_MUX_LEN 1024 @@ -101,19 +122,6 @@ iomuxc_probe(device_t dev) } static int -configure_pad(struct iomuxc_softc *sc, int pad, int mux_mode) -{ - int reg; - - reg = READ4(sc, pad); - reg &= ~(MUX_MODE_MASK << MUX_MODE_SHIFT); - reg |= (mux_mode << MUX_MODE_SHIFT); - WRITE4(sc, pad, reg); - - return (0); -} - -static int pinmux_set(struct iomuxc_softc *sc) { phandle_t child, parent, root; @@ -121,7 +129,7 @@ pinmux_set(struct iomuxc_softc *sc) int len; int values; int pin; - int mux_mode; + int pin_cfg; int i; root = OF_finddevice("/"); @@ -146,12 +154,12 @@ pinmux_set(struct iomuxc_softc *sc) values = len / (sizeof(uint32_t)); for (i = 0; i < values; i += 2) { pin = fdt32_to_cpu(iomux_config[i]); - mux_mode = fdt32_to_cpu(iomux_config[i+1]); + pin_cfg = fdt32_to_cpu(iomux_config[i+1]); #if 0 - device_printf(sc->dev, "Set pin %d to ALT%d\n", - pin, mux_mode); + device_printf(sc->dev, "Set pin %d to 0x%08x\n", + pin, pin_cfg); #endif - configure_pad(sc, IOMUXC(pin), mux_mode); + WRITE4(sc, IOMUXC(pin), pin_cfg); } } @@ -169,7 +177,6 @@ static int iomuxc_attach(device_t dev) { struct iomuxc_softc *sc; - int reg; sc = device_get_softc(dev); sc->dev = dev; @@ -183,11 +190,6 @@ iomuxc_attach(device_t dev) sc->bst = rman_get_bustag(sc->tmr_res[0]); sc->bsh = rman_get_bushandle(sc->tmr_res[0]); - /* USB */ - configure_pad(sc, IOMUXC_PTA17, MUX_MODE_VBUS_EN_OTG); - reg = (PKE | PUE | PUS_22_KOHM_PULL_UP | DSE_25_OHM | OBE); - WRITE4(sc, IOMUXC_PTA7, reg); - pinmux_set(sc); return (0); Modified: stable/10/sys/arm/include/cpufunc.h ============================================================================== --- stable/10/sys/arm/include/cpufunc.h Thu May 15 22:51:14 2014 (r266202) +++ stable/10/sys/arm/include/cpufunc.h Fri May 16 00:14:50 2014 (r266203) @@ -104,6 +104,12 @@ struct cpu_functions { * * There are some rules that must be followed: * + * ID-cache Invalidate All: + * Unlike other functions, this one must never write back. + * It is used to intialize the MMU when it is in an unknown + * state (such as when it may have lines tagged as valid + * that belong to a previous set of mappings). + * * I-cache Synch (all or range): * The goal is to synchronize the instruction stream, * so you may beed to write-back dirty D-cache blocks @@ -138,6 +144,7 @@ struct cpu_functions { void (*cf_dcache_inv_range) (vm_offset_t, vm_size_t); void (*cf_dcache_wb_range) (vm_offset_t, vm_size_t); + void (*cf_idcache_inv_all) (void); void (*cf_idcache_wbinv_all) (void); void (*cf_idcache_wbinv_range) (vm_offset_t, vm_size_t); void (*cf_l2cache_wbinv_all) (void); @@ -238,6 +245,7 @@ void tlb_broadcast(int); #define cpu_dcache_inv_range(a, s) cpufuncs.cf_dcache_inv_range((a), (s)) #define cpu_dcache_wb_range(a, s) cpufuncs.cf_dcache_wb_range((a), (s)) +#define cpu_idcache_inv_all() cpufuncs.cf_idcache_inv_all() #define cpu_idcache_wbinv_all() cpufuncs.cf_idcache_wbinv_all() #define cpu_idcache_wbinv_range(a, s) cpufuncs.cf_idcache_wbinv_range((a), (s)) #define cpu_l2cache_wbinv_all() cpufuncs.cf_l2cache_wbinv_all() @@ -495,6 +503,7 @@ void armv6_dcache_wbinv_range (vm_offset void armv6_dcache_inv_range (vm_offset_t, vm_size_t); void armv6_dcache_wb_range (vm_offset_t, vm_size_t); +void armv6_idcache_inv_all (void); void armv6_idcache_wbinv_all (void); void armv6_idcache_wbinv_range (vm_offset_t, vm_size_t); @@ -503,6 +512,7 @@ void armv7_tlb_flushID (void); void armv7_tlb_flushID_SE (u_int); void armv7_icache_sync_range (vm_offset_t, vm_size_t); void armv7_idcache_wbinv_range (vm_offset_t, vm_size_t); +void armv7_idcache_inv_all (void); void armv7_dcache_wbinv_all (void); void armv7_idcache_wbinv_all (void); void armv7_dcache_wbinv_range (vm_offset_t, vm_size_t); @@ -587,6 +597,7 @@ void armv4_tlb_flushD (void); void armv4_tlb_flushD_SE (u_int va); void armv4_drain_writebuf (void); +void armv4_idcache_inv_all (void); #endif #if defined(CPU_IXP12X0) Modified: stable/10/sys/arm/include/smp.h ============================================================================== --- stable/10/sys/arm/include/smp.h Thu May 15 22:51:14 2014 (r266202) +++ stable/10/sys/arm/include/smp.h Fri May 16 00:14:50 2014 (r266203) @@ -15,6 +15,7 @@ #define IPI_TLB 7 void init_secondary(int cpu); +void mpentry(void); void ipi_all_but_self(u_int ipi); void ipi_cpu(int cpu, u_int ipi); Modified: stable/10/sys/arm/mv/armadaxp/armadaxp_mp.c ============================================================================== --- stable/10/sys/arm/mv/armadaxp/armadaxp_mp.c Thu May 15 22:51:14 2014 (r266202) +++ stable/10/sys/arm/mv/armadaxp/armadaxp_mp.c Fri May 16 00:14:50 2014 (r266203) @@ -96,7 +96,6 @@ platform_mp_init_secondary(void) { } -void mpentry(void); void mptramp(void); Modified: stable/10/sys/arm/samsung/exynos/exynos5_mp.c ============================================================================== --- stable/10/sys/arm/samsung/exynos/exynos5_mp.c Thu May 15 22:51:14 2014 (r266202) +++ stable/10/sys/arm/samsung/exynos/exynos5_mp.c Fri May 16 00:14:50 2014 (r266203) @@ -39,9 +39,6 @@ __FBSDID("$FreeBSD$"); #define EXYNOS_SYSRAM 0x02020000 -void mpentry(void); -void mptramp(void); - void platform_mp_init_secondary(void) { Modified: stable/10/sys/arm/ti/omap4/omap4_mp.c ============================================================================== --- stable/10/sys/arm/ti/omap4/omap4_mp.c Thu May 15 22:51:14 2014 (r266202) +++ stable/10/sys/arm/ti/omap4/omap4_mp.c Fri May 16 00:14:50 2014 (r266203) @@ -38,9 +38,6 @@ __FBSDID("$FreeBSD$"); #include #include -void mpentry(void); -void mptramp(void); - void platform_mp_init_secondary(void) { Modified: stable/10/sys/boot/fdt/dts/vybrid-colibri-vf50.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/vybrid-colibri-vf50.dts Thu May 15 22:51:14 2014 (r266202) +++ stable/10/sys/boot/fdt/dts/vybrid-colibri-vf50.dts Fri May 16 00:14:50 2014 (r266203) @@ -45,17 +45,26 @@ fec1: ethernet@400D1000 { status = "okay"; - iomux_config = < 54 0x1 55 0x1 - 56 0x1 57 0x1 - 58 0x1 59 0x1 - 60 0x1 61 0x1 - 62 0x1 0 0x1 >; + iomux_config = < 54 0x103192 + 55 0x103193 + 56 0x103191 + 57 0x103191 + 58 0x103191 + 59 0x103191 + 60 0x103192 + 61 0x103192 + 62 0x103192 + 0 0x103191 >; }; sai3: sai@40032000 { status = "okay"; }; + i2c0: i2c@40066000 { + status = "okay"; + }; + adc0: adc@4003B000 { status = "okay"; }; Modified: stable/10/sys/boot/fdt/dts/vybrid-cosmic.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/vybrid-cosmic.dts Thu May 15 22:51:14 2014 (r266202) +++ stable/10/sys/boot/fdt/dts/vybrid-cosmic.dts Fri May 16 00:14:50 2014 (r266203) @@ -45,11 +45,16 @@ fec1: ethernet@400D1000 { status = "okay"; - iomux_config = < 54 0x1 55 0x1 - 56 0x1 57 0x1 - 58 0x1 59 0x1 - 60 0x1 61 0x1 - 62 0x1 0 0x2 >; + iomux_config = < 54 0x103192 + 55 0x103193 + 56 0x103191 + 57 0x103191 + 58 0x103191 + 59 0x103191 + 60 0x103192 + 61 0x103192 + 62 0x103192 + 0 0x203191 >; }; esai: esai@40062000 { Copied and modified: stable/10/sys/boot/fdt/dts/vybrid-quartz.dts (from r262456, head/sys/boot/fdt/dts/vybrid-quartz.dts) ============================================================================== --- head/sys/boot/fdt/dts/vybrid-quartz.dts Mon Feb 24 19:32:15 2014 (r262456, copy source) +++ stable/10/sys/boot/fdt/dts/vybrid-quartz.dts Fri May 16 00:14:50 2014 (r266203) @@ -45,11 +45,16 @@ fec1: ethernet@400D1000 { status = "okay"; - iomux_config = < 54 0x1 55 0x1 - 56 0x1 57 0x1 - 58 0x1 59 0x1 - 60 0x1 61 0x1 - 62 0x1 0 0x2 >; + iomux_config = < 54 0x103192 + 55 0x103193 + 56 0x103191 + 57 0x103191 + 58 0x103191 + 59 0x103191 + 60 0x103192 + 61 0x103192 + 62 0x103192 + 0 0x203191 >; }; edma1: edma@40098000 { Modified: stable/10/sys/boot/fdt/dts/vybrid.dtsi ============================================================================== --- stable/10/sys/boot/fdt/dts/vybrid.dtsi Thu May 15 22:51:14 2014 (r266202) +++ stable/10/sys/boot/fdt/dts/vybrid.dtsi Fri May 16 00:14:50 2014 (r266203) @@ -205,9 +205,12 @@ clock-frequency = <50000000>; status = "disabled"; clock_names = "esdhc1"; - iomux_config = < 14 0x5 15 0x5 - 16 0x5 17 0x5 - 18 0x5 19 0x5 >; + iomux_config = < 14 0x500060 + 15 0x500060 + 16 0x500060 + 17 0x500060 + 18 0x500060 + 19 0x500060 >; }; serial0: serial@40027000 { @@ -237,6 +240,8 @@ < 0x40050800 0x100 >; /* phy */ interrupts = < 107 >; interrupt-parent = <&GIC>; + iomux_config = < 134 0x0001be + 7 0x200060 >; }; usb@400b4000 { @@ -246,6 +251,8 @@ < 0x40050C00 0x100 >; /* phy */ interrupts = < 108 >; interrupt-parent = <&GIC>; + iomux_config = < 134 0x0001be + 7 0x200060 >; }; fec0: ethernet@400D0000 { @@ -257,11 +264,15 @@ phy-disable-preamble; status = "disabled"; clock_names = "enet"; - iomux_config = < 45 0x1 46 0x1 - 47 0x1 48 0x1 - 49 0x1 50 0x1 - 51 0x1 52 0x1 - 53 0x1 >; + iomux_config = < 45 0x100061 + 46 0x100061 + 47 0x100061 + 48 0x100060 + 49 0x100060 + 50 0x100060 + 51 0x100060 + 52 0x100060 + 53 0x100060 >; }; fec1: ethernet@400D1000 { @@ -273,11 +284,15 @@ phy-disable-preamble; status = "disabled"; clock_names = "enet"; - iomux_config = < 54 0x1 55 0x1 - 56 0x1 57 0x1 - 58 0x1 59 0x1 - 60 0x1 61 0x1 - 62 0x1 >; + iomux_config = < 54 0x103192 + 55 0x103193 + 56 0x103191 + 57 0x103191 + 58 0x103191 + 59 0x103191 + 60 0x103192 + 61 0x103192 + 62 0x103192 >; }; sai0: sai@4002F000 { @@ -315,10 +330,10 @@ edma-src-transmit = < 9 >; edma-mux-group = < 1 >; clock_names = "sai3", "cko1"; - iomux_config = < 16 0x2 - 19 0x2 - 21 0x2 - 40 0x4 >; /* CKO1 */ + iomux_config = < 16 0x200060 + 19 0x200060 + 21 0x200060 + 40 0x400061 >; /* CKO1 */ }; esai: esai@40062000 { @@ -328,11 +343,16 @@ interrupt-parent = <&GIC>; status = "disabled"; clock_names = "esai"; - iomux_config = < 45 0x4 46 0x4 - 47 0x4 48 0x4 - 49 0x4 50 0x4 - 51 0x4 52 0x4 - 78 0x3 40 0x4>; + iomux_config = < 45 0x400061 + 46 0x400061 + 47 0x400061 + 48 0x400060 + 49 0x400060 + 50 0x400060 + 51 0x400060 + 52 0x400060 + 78 0x3038df + 40 0x400061 >; }; spi0: spi@4002C000 { @@ -341,9 +361,11 @@ interrupts = < 99 >; interrupt-parent = <&GIC>; status = "disabled"; - iomux_config = < 40 0x1 41 0x1 - 42 0x1 43 0x1 - 44 0x1 >; + iomux_config = < 40 0x100061 + 41 0x100061 + 42 0x100060 + 43 0x100060 + 44 0x100061 >; }; spi1: spi@4002D000 { @@ -370,6 +392,43 @@ status = "disabled"; }; + i2c0: i2c@40066000 { + compatible = "fsl,mvf600-i2c"; + reg = <0x40066000 0x1000>; + interrupts = < 103 >; + interrupt-parent = <&GIC>; + status = "disabled"; + clock_names = "ipg"; + iomux_config = < 36 0x2034d3 + 37 0x2034d3 + 207 0x1 + 208 0x1 >; + }; + + i2c1: i2c@40067000 { + compatible = "fsl,mvf600-i2c"; + reg = <0x40067000 0x1000>; + interrupts = < 104 >; + interrupt-parent = <&GIC>; + status = "disabled"; + }; + + i2c2: i2c@400E6000 { + compatible = "fsl,mvf600-i2c"; + reg = <0x400E6000 0x1000>; + interrupts = < 105 >; + interrupt-parent = <&GIC>; + status = "disabled"; + }; + + i2c3: i2c@400E7000 { + compatible = "fsl,mvf600-i2c"; + reg = <0x400E7000 0x1000>; + interrupts = < 106 >; + interrupt-parent = <&GIC>; + status = "disabled"; + }; + adc0: adc@4003B000 { compatible = "fsl,mvf600-adc"; reg = <0x4003B000 0x1000>; @@ -399,21 +458,35 @@ interrupt-parent = <&GIC>; status = "disabled"; clock_names = "dcu0"; - iomux_config = < 105 0x1 106 0x1 - 107 0x1 108 0x1 - 109 0x1 110 0x1 - 111 0x1 112 0x1 - 113 0x1 114 0x1 - 115 0x1 116 0x1 - 117 0x1 118 0x1 - 119 0x1 120 0x1 - 121 0x1 122 0x1 - 123 0x1 124 0x1 - 125 0x1 126 0x1 - 127 0x1 128 0x1 - 129 0x1 130 0x1 - 131 0x1 132 0x1 - 133 0x1 >; + iomux_config = < 105 0x100044 + 106 0x100044 + 107 0x100060 + 108 0x100060 + 109 0x100060 + 110 0x100060 + 111 0x100060 + 112 0x100060 + 113 0x100060 + 114 0x100060 + 115 0x100060 + 116 0x100060 + 117 0x100060 + 118 0x100060 + 119 0x100060 + 120 0x100060 + 121 0x100060 + 122 0x100060 + 123 0x100060 + 124 0x100060 + 125 0x100060 + 126 0x100060 + 127 0x100060 + 128 0x100060 + 129 0x100060 + 130 0x100060 + 131 0x100060 + 132 0x100060 + 133 0x100060 >; }; }; }; From owner-svn-src-stable@FreeBSD.ORG Fri May 16 01:30:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3483C389; Fri, 16 May 2014 01:30:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1ECA326D4; Fri, 16 May 2014 01:30:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4G1UVmA025664; Fri, 16 May 2014 01:30:31 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4G1UUl4025373; Fri, 16 May 2014 01:30:30 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405160130.s4G1UUl4025373@svn.freebsd.org> From: Ian Lepore Date: Fri, 16 May 2014 01:30:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266204 - in stable/10/sys: amd64/include arm/include i386/include ia64/include kern mips/include powerpc/include sparc64/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 01:30:32 -0000 Author: ian Date: Fri May 16 01:30:30 2014 New Revision: 266204 URL: http://svnweb.freebsd.org/changeset/base/266204 Log: MFC r257854 (discussed with alc@) As of r257209, all architectures have defined VM_KMEM_SIZE_SCALE. In other words, every architecture is now auto-sizing the kmem arena. This revision changes kmeminit() so that the definition of VM_KMEM_SIZE_SCALE becomes mandatory and the definition of VM_KMEM_SIZE becomes optional. Replace or eliminate all existing definitions of VM_KMEM_SIZE. With auto-sizing enabled, VM_KMEM_SIZE effectively became an alternate spelling for VM_KMEM_SIZE_MIN on most architectures. Use VM_KMEM_SIZE_MIN for clarity. Modified: stable/10/sys/amd64/include/vmparam.h stable/10/sys/arm/include/vmparam.h stable/10/sys/i386/include/vmparam.h stable/10/sys/ia64/include/vmparam.h stable/10/sys/kern/kern_malloc.c stable/10/sys/mips/include/vmparam.h stable/10/sys/powerpc/include/vmparam.h stable/10/sys/sparc64/include/vmparam.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/include/vmparam.h ============================================================================== --- stable/10/sys/amd64/include/vmparam.h Fri May 16 00:14:50 2014 (r266203) +++ stable/10/sys/amd64/include/vmparam.h Fri May 16 01:30:30 2014 (r266204) @@ -178,23 +178,16 @@ #define PHYS_TO_DMAP(x) ((x) | DMAP_MIN_ADDRESS) #define DMAP_TO_PHYS(x) ((x) & ~DMAP_MIN_ADDRESS) -/* virtual sizes (bytes) for various kernel submaps */ -#ifndef VM_KMEM_SIZE -#define VM_KMEM_SIZE (12 * 1024 * 1024) -#endif - /* - * How many physical pages per KVA page allocated. - * min(max(max(VM_KMEM_SIZE, Physical memory/VM_KMEM_SIZE_SCALE), - * VM_KMEM_SIZE_MIN), VM_KMEM_SIZE_MAX) - * is the total KVA space allocated for kmem_map. + * How many physical pages per kmem arena virtual page. */ #ifndef VM_KMEM_SIZE_SCALE #define VM_KMEM_SIZE_SCALE (1) #endif /* - * Ceiling on amount of kmem_map kva space. + * Optional ceiling (in bytes) on the size of the kmem arena: 60% of the + * kernel map. */ #ifndef VM_KMEM_SIZE_MAX #define VM_KMEM_SIZE_MAX ((VM_MAX_KERNEL_ADDRESS - \ Modified: stable/10/sys/arm/include/vmparam.h ============================================================================== --- stable/10/sys/arm/include/vmparam.h Fri May 16 00:14:50 2014 (r266203) +++ stable/10/sys/arm/include/vmparam.h Fri May 16 01:30:30 2014 (r266204) @@ -145,17 +145,22 @@ #define VM_MAX_KERNEL_ADDRESS (vm_max_kernel_address) /* - * Virtual size (bytes) for various kernel submaps. + * How many physical pages per kmem arena virtual page. */ -#ifndef VM_KMEM_SIZE -#define VM_KMEM_SIZE (12*1024*1024) -#endif #ifndef VM_KMEM_SIZE_SCALE -#define VM_KMEM_SIZE_SCALE (3) +#define VM_KMEM_SIZE_SCALE (3) +#endif + +/* + * Optional floor (in bytes) on the size of the kmem arena. + */ +#ifndef VM_KMEM_SIZE_MIN +#define VM_KMEM_SIZE_MIN (12 * 1024 * 1024) #endif /* - * Ceiling on the size of the kmem submap: 40% of the kernel map. + * Optional ceiling (in bytes) on the size of the kmem arena: 40% of the + * kernel map. */ #ifndef VM_KMEM_SIZE_MAX #define VM_KMEM_SIZE_MAX ((vm_max_kernel_address - \ Modified: stable/10/sys/i386/include/vmparam.h ============================================================================== --- stable/10/sys/i386/include/vmparam.h Fri May 16 00:14:50 2014 (r266203) +++ stable/10/sys/i386/include/vmparam.h Fri May 16 01:30:30 2014 (r266204) @@ -164,24 +164,23 @@ #define VM_MAX_ADDRESS VADDR(PTDPTDI, PTDPTDI) #define VM_MIN_ADDRESS ((vm_offset_t)0) -/* virtual sizes (bytes) for various kernel submaps */ -#ifndef VM_KMEM_SIZE -#define VM_KMEM_SIZE (12 * 1024 * 1024) -#endif - /* - * How many physical pages per KVA page allocated. - * min(max(max(VM_KMEM_SIZE, Physical memory/VM_KMEM_SIZE_SCALE), - * VM_KMEM_SIZE_MIN), VM_KMEM_SIZE_MAX) - * is the total KVA space allocated for kmem_map. + * How many physical pages per kmem arena virtual page. */ #ifndef VM_KMEM_SIZE_SCALE #define VM_KMEM_SIZE_SCALE (3) #endif /* - * Ceiling on the amount of kmem_map KVA space: 40% of the entire KVA space - * rounded to the nearest multiple of the superpage size. + * Optional floor (in bytes) on the size of the kmem arena. + */ +#ifndef VM_KMEM_SIZE_MIN +#define VM_KMEM_SIZE_MIN (12 * 1024 * 1024) +#endif + +/* + * Optional ceiling (in bytes) on the size of the kmem arena: 40% of the + * kernel map rounded to the nearest multiple of the superpage size. */ #ifndef VM_KMEM_SIZE_MAX #define VM_KMEM_SIZE_MAX (((((VM_MAX_KERNEL_ADDRESS - \ Modified: stable/10/sys/ia64/include/vmparam.h ============================================================================== --- stable/10/sys/ia64/include/vmparam.h Fri May 16 00:14:50 2014 (r266203) +++ stable/10/sys/ia64/include/vmparam.h Fri May 16 01:30:30 2014 (r266204) @@ -189,19 +189,11 @@ #define USRSTACK VM_MAXUSER_ADDRESS #define IA64_BACKINGSTORE (USRSTACK - (2 * MAXSSIZ) - PAGE_SIZE) -/* virtual sizes (bytes) for various kernel submaps */ -#ifndef VM_KMEM_SIZE -#define VM_KMEM_SIZE (12 * 1024 * 1024) -#endif - /* - * How many physical pages per KVA page allocated. - * min(max(max(VM_KMEM_SIZE, Physical memory/VM_KMEM_SIZE_SCALE), - * VM_KMEM_SIZE_MIN), VM_KMEM_SIZE_MAX) - * is the total KVA space allocated for kmem_map. + * How many physical pages per kmem arena virtual page. */ #ifndef VM_KMEM_SIZE_SCALE -#define VM_KMEM_SIZE_SCALE (4) /* XXX 8192 byte pages */ +#define VM_KMEM_SIZE_SCALE (4) #endif /* initial pagein size of beginning of executable file */ Modified: stable/10/sys/kern/kern_malloc.c ============================================================================== --- stable/10/sys/kern/kern_malloc.c Fri May 16 00:14:50 2014 (r266203) +++ stable/10/sys/kern/kern_malloc.c Fri May 16 01:30:30 2014 (r266204) @@ -684,41 +684,47 @@ kmem_reclaim(vmem_t *vm, int flags) pagedaemon_wakeup(); } +CTASSERT(VM_KMEM_SIZE_SCALE >= 1); + /* - * Initialize the kernel memory arena. + * Initialize the kernel memory (kmem) arena. */ void kmeminit(void) { u_long mem_size, tmp; - + /* - * Try to auto-tune the kernel memory size, so that it is - * more applicable for a wider range of machine sizes. The - * VM_KMEM_SIZE_MAX is dependent on the maximum KVA space - * available. + * Calculate the amount of kernel virtual address (KVA) space that is + * preallocated to the kmem arena. In order to support a wide range + * of machines, it is a function of the physical memory size, + * specifically, + * + * min(max(physical memory size / VM_KMEM_SIZE_SCALE, + * VM_KMEM_SIZE_MIN), VM_KMEM_SIZE_MAX) * - * Note that the kmem arena is also used by the zone allocator, - * so make sure that there is enough space. + * Every architecture must define an integral value for + * VM_KMEM_SIZE_SCALE. However, the definitions of VM_KMEM_SIZE_MIN + * and VM_KMEM_SIZE_MAX, which represent respectively the floor and + * ceiling on this preallocation, are optional. Typically, + * VM_KMEM_SIZE_MAX is itself a function of the available KVA space on + * a given architecture. */ - vm_kmem_size = VM_KMEM_SIZE; mem_size = cnt.v_page_count; -#if defined(VM_KMEM_SIZE_SCALE) vm_kmem_size_scale = VM_KMEM_SIZE_SCALE; -#endif TUNABLE_INT_FETCH("vm.kmem_size_scale", &vm_kmem_size_scale); - if (vm_kmem_size_scale > 0 && - (mem_size / vm_kmem_size_scale) > (vm_kmem_size / PAGE_SIZE)) - vm_kmem_size = (mem_size / vm_kmem_size_scale) * PAGE_SIZE; + if (vm_kmem_size_scale < 1) + vm_kmem_size_scale = VM_KMEM_SIZE_SCALE; + + vm_kmem_size = (mem_size / vm_kmem_size_scale) * PAGE_SIZE; #if defined(VM_KMEM_SIZE_MIN) vm_kmem_size_min = VM_KMEM_SIZE_MIN; #endif TUNABLE_ULONG_FETCH("vm.kmem_size_min", &vm_kmem_size_min); - if (vm_kmem_size_min > 0 && vm_kmem_size < vm_kmem_size_min) { + if (vm_kmem_size_min > 0 && vm_kmem_size < vm_kmem_size_min) vm_kmem_size = vm_kmem_size_min; - } #if defined(VM_KMEM_SIZE_MAX) vm_kmem_size_max = VM_KMEM_SIZE_MAX; @@ -727,15 +733,17 @@ kmeminit(void) if (vm_kmem_size_max > 0 && vm_kmem_size >= vm_kmem_size_max) vm_kmem_size = vm_kmem_size_max; - /* Allow final override from the kernel environment */ - TUNABLE_ULONG_FETCH("vm.kmem_size", &vm_kmem_size); - /* - * Limit kmem virtual size to twice the physical memory. - * This allows for kmem map sparseness, but limits the size - * to something sane. Be careful to not overflow the 32bit - * ints while doing the check or the adjustment. + * Alternatively, the amount of KVA space that is preallocated to the + * kmem arena can be set statically at compile-time or manually + * through the kernel environment. However, it is still limited to + * twice the physical memory size, which has been sufficient to handle + * the most severe cases of external fragmentation in the kmem arena. */ +#if defined(VM_KMEM_SIZE) + vm_kmem_size = VM_KMEM_SIZE; +#endif + TUNABLE_ULONG_FETCH("vm.kmem_size", &vm_kmem_size); if (vm_kmem_size / 2 / PAGE_SIZE > mem_size) vm_kmem_size = 2 * mem_size * PAGE_SIZE; Modified: stable/10/sys/mips/include/vmparam.h ============================================================================== --- stable/10/sys/mips/include/vmparam.h Fri May 16 00:14:50 2014 (r266203) +++ stable/10/sys/mips/include/vmparam.h Fri May 16 01:30:30 2014 (r266204) @@ -108,22 +108,23 @@ #define VM_NRESERVLEVEL 0 #endif -/* virtual sizes (bytes) for various kernel submaps */ -#ifndef VM_KMEM_SIZE -#define VM_KMEM_SIZE (12 * 1024 * 1024) -#endif - /* - * How many physical pages per KVA page allocated. - * min(max(VM_KMEM_SIZE, Physical memory/VM_KMEM_SIZE_SCALE), VM_KMEM_SIZE_MAX) - * is the total KVA space allocated for kmem_map. + * How many physical pages per kmem arena virtual page. */ #ifndef VM_KMEM_SIZE_SCALE #define VM_KMEM_SIZE_SCALE (3) #endif /* - * Ceiling on the amount of kmem_map KVA space: 40% of the entire KVA space. + * Optional floor (in bytes) on the size of the kmem arena. + */ +#ifndef VM_KMEM_SIZE_MIN +#define VM_KMEM_SIZE_MIN (12 * 1024 * 1024) +#endif + +/* + * Optional ceiling (in bytes) on the size of the kmem arena: 40% of the + * kernel map. */ #ifndef VM_KMEM_SIZE_MAX #define VM_KMEM_SIZE_MAX ((VM_MAX_KERNEL_ADDRESS - \ Modified: stable/10/sys/powerpc/include/vmparam.h ============================================================================== --- stable/10/sys/powerpc/include/vmparam.h Fri May 16 00:14:50 2014 (r266203) +++ stable/10/sys/powerpc/include/vmparam.h Fri May 16 01:30:30 2014 (r266204) @@ -172,21 +172,23 @@ struct pmap_physseg { #define SGROWSIZ (128UL*1024) /* amount to grow stack */ #endif -#ifndef VM_KMEM_SIZE -#define VM_KMEM_SIZE (12 * 1024 * 1024) +/* + * How many physical pages per kmem arena virtual page. + */ +#ifndef VM_KMEM_SIZE_SCALE +#define VM_KMEM_SIZE_SCALE (3) #endif /* - * How many physical pages per KVA page allocated. - * min(max(VM_KMEM_SIZE, Physical memory/VM_KMEM_SIZE_SCALE), VM_KMEM_SIZE_MAX) - * is the total KVA space allocated for kmem_map. + * Optional floor (in bytes) on the size of the kmem arena. */ -#ifndef VM_KMEM_SIZE_SCALE -#define VM_KMEM_SIZE_SCALE (3) +#ifndef VM_KMEM_SIZE_MIN +#define VM_KMEM_SIZE_MIN (12 * 1024 * 1024) #endif /* - * Ceiling on the amount of kmem_map KVA space: 40% of the entire KVA space. + * Optional ceiling (in bytes) on the size of the kmem arena: 40% of the + * usable KVA space. */ #ifndef VM_KMEM_SIZE_MAX #define VM_KMEM_SIZE_MAX ((VM_MAX_SAFE_KERNEL_ADDRESS - \ Modified: stable/10/sys/sparc64/include/vmparam.h ============================================================================== --- stable/10/sys/sparc64/include/vmparam.h Fri May 16 00:14:50 2014 (r266203) +++ stable/10/sys/sparc64/include/vmparam.h Fri May 16 01:30:30 2014 (r266204) @@ -198,24 +198,22 @@ #define USRSTACK (VM_MAX_USER_ADDRESS) /* - * Virtual size (bytes) for various kernel submaps. + * How many physical pages per kmem arena virtual page. */ -#ifndef VM_KMEM_SIZE -#define VM_KMEM_SIZE (16*1024*1024) +#ifndef VM_KMEM_SIZE_SCALE +#define VM_KMEM_SIZE_SCALE (tsb_kernel_ldd_phys == 0 ? 3 : 2) #endif /* - * How many physical pages per KVA page allocated. - * min(max(max(VM_KMEM_SIZE, Physical memory/VM_KMEM_SIZE_SCALE), - * VM_KMEM_SIZE_MIN), VM_KMEM_SIZE_MAX) - * is the total KVA space allocated for kmem_map. + * Optional floor (in bytes) on the size of the kmem arena. */ -#ifndef VM_KMEM_SIZE_SCALE -#define VM_KMEM_SIZE_SCALE (tsb_kernel_ldd_phys == 0 ? 3 : 2) +#ifndef VM_KMEM_SIZE_MIN +#define VM_KMEM_SIZE_MIN (16 * 1024 * 1024) #endif /* - * Ceiling on amount of kmem_map kva space. + * Optional ceiling (in bytes) on the size of the kmem arena: 60% of the + * kernel map. */ #ifndef VM_KMEM_SIZE_MAX #define VM_KMEM_SIZE_MAX ((VM_MAX_KERNEL_ADDRESS - \ From owner-svn-src-stable@FreeBSD.ORG Fri May 16 02:21:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 503F71A0; Fri, 16 May 2014 02:21:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 399AE2B0A; Fri, 16 May 2014 02:21:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4G2Lu4E048344; Fri, 16 May 2014 02:21:56 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4G2Lpqk048314; Fri, 16 May 2014 02:21:51 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405160221.s4G2Lpqk048314@svn.freebsd.org> From: Ian Lepore Date: Fri, 16 May 2014 02:21:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266207 - in stable/10/sys: arm/allwinner arm/arm arm/at91 arm/broadcom/bcm2835 arm/conf arm/freescale/imx arm/freescale/vybrid arm/include arm/lpc arm/mv arm/ti/am335x dev/aic7xxx/aicasm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 02:21:56 -0000 Author: ian Date: Fri May 16 02:21:51 2014 New Revision: 266207 URL: http://svnweb.freebsd.org/changeset/base/266207 Log: MFC r262534, r262548, r262549, r262552, r262568, r262581, r262583, r262584, r262585, r262587, r262696, r262712 Replace many pasted identical definitions of cpu_initclocks() with a common implementation in arm/machdep.c. aicasm: Don't complain about missing prototypes to ease bootstrap issues. Vybrid: Add driver for Inter-Integrated Circuit (I2C). imx6: Initialize the Low Power Mode bits to keep the ARM cores running during WFI. All our current ARM multi-core systems have all cores in one package with a shared L2 cache, reflect that in the common cpu_topo() routine. mpcore timer: Supply a DELAY() implementation via weak linkage, so that SoC-specific code can supply a better implementation. imx6: Add some rudimentary voltage control. Add an armv7 implementation of cpu_sleep(). Add __used attribute so that the DELAY implementation doesn't get optimized away as unreferenced, causing linker errors when trying to resolve the weak reference to the missing function. Added: stable/10/sys/arm/freescale/vybrid/vf_i2c.c - copied, changed from r262552, head/sys/arm/freescale/vybrid/vf_i2c.c Modified: stable/10/sys/arm/allwinner/timer.c stable/10/sys/arm/arm/cpufunc.c stable/10/sys/arm/arm/cpufunc_asm_armv7.S stable/10/sys/arm/arm/generic_timer.c stable/10/sys/arm/arm/machdep.c stable/10/sys/arm/arm/mp_machdep.c stable/10/sys/arm/arm/mpcore_timer.c stable/10/sys/arm/at91/uart_dev_at91usart.c stable/10/sys/arm/broadcom/bcm2835/bcm2835_systimer.c stable/10/sys/arm/conf/VYBRID.common stable/10/sys/arm/freescale/imx/imx6_anatop.c stable/10/sys/arm/freescale/imx/imx6_ccm.c stable/10/sys/arm/freescale/imx/imx6_ccmreg.h stable/10/sys/arm/freescale/imx/imx_gpt.c stable/10/sys/arm/freescale/vybrid/files.vybrid stable/10/sys/arm/include/cpufunc.h stable/10/sys/arm/include/machdep.h stable/10/sys/arm/lpc/lpc_timer.c stable/10/sys/arm/mv/timer.c stable/10/sys/arm/ti/am335x/am335x_dmtimer.c stable/10/sys/dev/aic7xxx/aicasm/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/allwinner/timer.c ============================================================================== --- stable/10/sys/arm/allwinner/timer.c Fri May 16 01:50:04 2014 (r266206) +++ stable/10/sys/arm/allwinner/timer.c Fri May 16 02:21:51 2014 (r266207) @@ -295,12 +295,6 @@ a10_timer_get_timerfreq(struct a10_timer return (sc->timer0_freq); } -void -cpu_initclocks(void) -{ - cpu_initclocks_bsp(); -} - static int a10_timer_hardclock(void *arg) { Modified: stable/10/sys/arm/arm/cpufunc.c ============================================================================== --- stable/10/sys/arm/arm/cpufunc.c Fri May 16 01:50:04 2014 (r266206) +++ stable/10/sys/arm/arm/cpufunc.c Fri May 16 02:21:51 2014 (r266207) @@ -1107,7 +1107,7 @@ struct cpu_functions cortexa_cpufuncs = cpufunc_nullop, /* flush_brnchtgt_C */ (void *)cpufunc_nullop, /* flush_brnchtgt_E */ - arm11_sleep, /* sleep */ + armv7_sleep, /* sleep */ /* Soft functions */ Modified: stable/10/sys/arm/arm/cpufunc_asm_armv7.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_armv7.S Fri May 16 01:50:04 2014 (r266206) +++ stable/10/sys/arm/arm/cpufunc_asm_armv7.S Fri May 16 02:21:51 2014 (r266207) @@ -343,3 +343,9 @@ ENTRY(armv7_idcache_inv_all) bx lr @ return END(armv7_l1cache_inv_all) +ENTRY_NP(armv7_sleep) + dsb + wfi + bx lr +END(armv7_sleep) + Modified: stable/10/sys/arm/arm/generic_timer.c ============================================================================== --- stable/10/sys/arm/arm/generic_timer.c Fri May 16 01:50:04 2014 (r266206) +++ stable/10/sys/arm/arm/generic_timer.c Fri May 16 02:21:51 2014 (r266207) @@ -332,16 +332,6 @@ static devclass_t arm_tmr_devclass; DRIVER_MODULE(timer, simplebus, arm_tmr_driver, arm_tmr_devclass, 0, 0); void -cpu_initclocks(void) -{ - - if (PCPU_GET(cpuid) == 0) - cpu_initclocks_bsp(); - else - cpu_initclocks_ap(); -} - -void DELAY(int usec) { int32_t counts, counts_per_usec; Modified: stable/10/sys/arm/arm/machdep.c ============================================================================== --- stable/10/sys/arm/arm/machdep.c Fri May 16 01:50:04 2014 (r266206) +++ stable/10/sys/arm/arm/machdep.c Fri May 16 02:21:51 2014 (r266207) @@ -456,6 +456,30 @@ cpu_idle_wakeup(int cpu) return (0); } +/* + * Most ARM platforms don't need to do anything special to init their clocks + * (they get intialized during normal device attachment), and by not defining a + * cpu_initclocks() function they get this generic one. Any platform that needs + * to do something special can just provide their own implementation, which will + * override this one due to the weak linkage. + */ +void +arm_generic_initclocks(void) +{ + +#ifndef NO_EVENTTIMERS +#ifdef SMP + if (PCPU_GET(cpuid) == 0) + cpu_initclocks_bsp(); + else + cpu_initclocks_ap(); +#else + cpu_initclocks_bsp(); +#endif +#endif +} +__weak_reference(arm_generic_initclocks, cpu_initclocks); + int fill_regs(struct thread *td, struct reg *regs) { Modified: stable/10/sys/arm/arm/mp_machdep.c ============================================================================== --- stable/10/sys/arm/arm/mp_machdep.c Fri May 16 01:50:04 2014 (r266206) +++ stable/10/sys/arm/arm/mp_machdep.c Fri May 16 02:21:51 2014 (r266207) @@ -371,7 +371,7 @@ struct cpu_group * cpu_topo(void) { - return (smp_topo_1level(CG_SHARE_L2, 1, 0)); + return (smp_topo_1level(CG_SHARE_L2, mp_ncpus, 0)); } void Modified: stable/10/sys/arm/arm/mpcore_timer.c ============================================================================== --- stable/10/sys/arm/arm/mpcore_timer.c Fri May 16 01:50:04 2014 (r266206) +++ stable/10/sys/arm/arm/mpcore_timer.c Fri May 16 02:21:51 2014 (r266207) @@ -129,12 +129,12 @@ uint32_t platform_arm_tmr_freq = 0; static timecounter_get_t arm_tmr_get_timecount; static struct timecounter arm_tmr_timecount = { - .tc_name = "ARM MPCore Timecounter", + .tc_name = "MPCore", .tc_get_timecount = arm_tmr_get_timecount, .tc_poll_pps = NULL, .tc_counter_mask = ~0u, .tc_frequency = 0, - .tc_quality = 1000, + .tc_quality = 800, }; /** @@ -254,7 +254,7 @@ arm_tmr_probe(device_t dev) if (!ofw_bus_is_compatible(dev, "arm,mpcore-timers")) return (ENXIO); - device_set_desc(dev, "ARM Generic MPCore Timers"); + device_set_desc(dev, "ARM MPCore Timers"); return (BUS_PROBE_DEFAULT); } @@ -327,7 +327,7 @@ arm_tmr_attach(device_t dev) return (ENXIO); } - sc->et.et_name = "ARM MPCore Eventtimer"; + sc->et.et_name = "MPCore"; sc->et.et_flags = ET_FLAGS_PERIODIC | ET_FLAGS_ONESHOT | ET_FLAGS_PERCPU; sc->et.et_quality = 1000; @@ -359,25 +359,6 @@ static devclass_t arm_tmr_devclass; DRIVER_MODULE(mp_tmr, simplebus, arm_tmr_driver, arm_tmr_devclass, 0, 0); /** - * cpu_initclocks - called by system to initialise the cpu clocks - * - * This is a boilerplat function, most of the setup has already been done - * when the driver was attached. Therefore this function must only be called - * after the driver is attached. - * - * RETURNS - * nothing - */ -void -cpu_initclocks(void) -{ - if (PCPU_GET(cpuid) == 0) - cpu_initclocks_bsp(); - else - cpu_initclocks_ap(); -} - -/** * DELAY - Delay for at least usec microseconds. * @usec: number of microseconds to delay by * @@ -388,8 +369,8 @@ cpu_initclocks(void) * RETURNS: * nothing */ -void -DELAY(int usec) +static void __used /* Must emit function code for the weak ref below. */ +arm_tmr_DELAY(int usec) { int32_t counts_per_usec; int32_t counts; @@ -427,3 +408,11 @@ DELAY(int usec) first = last; } } + +/* + * Supply a DELAY() implementation via weak linkage. A platform may want to use + * the mpcore per-cpu eventtimers but provide its own DELAY() routine, + * especially when the core frequency can change on the fly. + */ +__weak_reference(arm_tmr_DELAY, DELAY); + Modified: stable/10/sys/arm/at91/uart_dev_at91usart.c ============================================================================== --- stable/10/sys/arm/at91/uart_dev_at91usart.c Fri May 16 01:50:04 2014 (r266206) +++ stable/10/sys/arm/at91/uart_dev_at91usart.c Fri May 16 02:21:51 2014 (r266207) @@ -279,7 +279,7 @@ at91_usart_init(struct uart_bas *bas, in * we don't want to hang here forever if the hardware is in a bad state. */ if (!(RD4(bas, USART_CSR) & USART_CSR_TXRDY)) - DELAY(1000); + DELAY(10000); at91_usart_param(bas, baudrate, databits, stopbits, parity); Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_systimer.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_systimer.c Fri May 16 01:50:04 2014 (r266206) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_systimer.c Fri May 16 02:21:51 2014 (r266207) @@ -278,12 +278,6 @@ static devclass_t bcm_systimer_devclass; DRIVER_MODULE(bcm_systimer, simplebus, bcm_systimer_driver, bcm_systimer_devclass, 0, 0); void -cpu_initclocks(void) -{ - cpu_initclocks_bsp(); -} - -void DELAY(int usec) { int32_t counts; Modified: stable/10/sys/arm/conf/VYBRID.common ============================================================================== --- stable/10/sys/arm/conf/VYBRID.common Fri May 16 01:50:04 2014 (r266206) +++ stable/10/sys/arm/conf/VYBRID.common Fri May 16 02:21:51 2014 (r266207) @@ -124,8 +124,8 @@ device nand device uart # I2C (TWSI) -#device iic -#device iicbus +device iic +device iicbus # Ethernet device ether Modified: stable/10/sys/arm/freescale/imx/imx6_anatop.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx6_anatop.c Fri May 16 01:50:04 2014 (r266206) +++ stable/10/sys/arm/freescale/imx/imx6_anatop.c Fri May 16 02:21:51 2014 (r266207) @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -85,8 +86,11 @@ struct imx6_anatop_softc { struct resource *res[2]; uint32_t cpu_curhz; uint32_t cpu_curmhz; + uint32_t cpu_curmv; uint32_t cpu_minhz; + uint32_t cpu_minmv; uint32_t cpu_maxhz; + uint32_t cpu_maxmv; uint32_t refosc_hz; void *temp_intrhand; uint32_t temp_high_val; @@ -103,12 +107,15 @@ struct imx6_anatop_softc { static struct imx6_anatop_softc *imx6_anatop_sc; /* - * Table of CPU max frequencies. This is indexed by the max frequency value - * (0-3) from the ocotp CFG3 register. + * Tables of CPU max frequencies and corresponding voltages. This is indexed by + * the max frequency value (0-3) from the ocotp CFG3 register. */ static uint32_t imx6_cpu_maxhz_tab[] = { 792000000, 852000000, 996000000, 1200000000 }; +static uint32_t imx6_cpu_millivolt_tab[] = { + 1150, 1225, 1225, 1275 +}; #define TZ_ZEROC 2732 /* deci-Kelvin <-> deci-Celcius offset. */ @@ -130,6 +137,64 @@ imx6_anatop_write_4(bus_size_t offset, u bus_write_4(imx6_anatop_sc->res[MEMRES], offset, value); } +static void +vdd_set(struct imx6_anatop_softc *sc, int mv) +{ + int newtarg, oldtarg; + uint32_t delay, pmureg; + static boolean_t init_done = false; + + /* + * The datasheet says VDD_PU and VDD_SOC must be equal, and VDD_ARM + * can't be more than 50mV above or 200mV below them. For now to keep + * things simple we set all three to the same value. + */ + + pmureg = imx6_anatop_read_4(IMX6_ANALOG_PMU_REG_CORE); + oldtarg = pmureg & IMX6_ANALOG_PMU_REG0_TARG_MASK; + + /* Convert mV to target value. Clamp target to valid range. */ + if (mv < 725) + newtarg = 0x00; + else if (mv > 1450) + newtarg = 0x1F; + else + newtarg = (mv - 700) / 25; + + /* + * The first time through the 3 voltages might not be equal so use a + * long conservative delay. After that we need to delay 3uS for every + * 25mV step upward. No need to delay at all when lowering. + */ + if (init_done) { + if (newtarg == oldtarg) + return; + else if (newtarg > oldtarg) + delay = (newtarg - oldtarg) * 3; + else + delay = 0; + } else { + delay = 700 / 25 * 3; + init_done = true; + } + + /* + * Make the change and wait for it to take effect. + */ + pmureg &= ~(IMX6_ANALOG_PMU_REG0_TARG_MASK | + IMX6_ANALOG_PMU_REG1_TARG_MASK | + IMX6_ANALOG_PMU_REG2_TARG_MASK); + + pmureg |= newtarg << IMX6_ANALOG_PMU_REG0_TARG_SHIFT; + pmureg |= newtarg << IMX6_ANALOG_PMU_REG1_TARG_SHIFT; + pmureg |= newtarg << IMX6_ANALOG_PMU_REG2_TARG_SHIFT; + + imx6_anatop_write_4(IMX6_ANALOG_PMU_REG_CORE, pmureg); + DELAY(delay); + sc->cpu_curmv = newtarg * 25 + 700; + device_printf(sc->dev, "voltage set to %u\n", sc->cpu_curmv); +} + static inline uint32_t cpufreq_hz_from_div(struct imx6_anatop_softc *sc, uint32_t div) { @@ -231,7 +296,9 @@ cpufreq_initialize(struct imx6_anatop_so FSL_OCOTP_CFG3_SPEED_MASK) >> FSL_OCOTP_CFG3_SPEED_SHIFT; sc->cpu_minhz = cpufreq_actual_hz(sc, imx6_cpu_maxhz_tab[0]); + sc->cpu_minmv = imx6_cpu_millivolt_tab[0]; sc->cpu_maxhz = cpufreq_actual_hz(sc, imx6_cpu_maxhz_tab[cfg3speed]); + sc->cpu_maxmv = imx6_cpu_millivolt_tab[cfg3speed]; /* * Set the CPU to maximum speed. @@ -241,6 +308,7 @@ cpufreq_initialize(struct imx6_anatop_so * basically assumes that a single core can't overheat before interrupts * are enabled; empirical testing shows that to be a safe assumption. */ + vdd_set(sc, sc->cpu_maxmv); cpufreq_set_clock(sc, sc->cpu_maxhz); device_printf(sc->dev, "CPU frequency %uMHz\n", sc->cpu_curmhz); } @@ -321,6 +389,7 @@ tempmon_gofast(struct imx6_anatop_softc { if (sc->cpu_curhz < sc->cpu_maxhz) { + vdd_set(sc, sc->cpu_maxmv); cpufreq_set_clock(sc, sc->cpu_maxhz); } } @@ -331,6 +400,7 @@ tempmon_goslow(struct imx6_anatop_softc if (sc->cpu_curhz > sc->cpu_minhz) { cpufreq_set_clock(sc, sc->cpu_minhz); + vdd_set(sc, sc->cpu_minmv); } } @@ -451,6 +521,11 @@ imx6_anatop_attach(device_t dev) if (err != 0) goto out; + SYSCTL_ADD_UINT(device_get_sysctl_ctx(sc->dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(sc->dev)), + OID_AUTO, "cpu_voltage", CTLFLAG_RD, + &sc->cpu_curmv, 0, "Current CPU voltage in millivolts"); + imx6_anatop_sc = sc; /* Modified: stable/10/sys/arm/freescale/imx/imx6_ccm.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx6_ccm.c Fri May 16 01:50:04 2014 (r266206) +++ stable/10/sys/arm/freescale/imx/imx6_ccm.c Fri May 16 02:21:51 2014 (r266207) @@ -92,6 +92,7 @@ ccm_attach(device_t dev) { struct ccm_softc *sc; int err, rid; + uint32_t reg; sc = device_get_softc(dev); err = 0; @@ -107,6 +108,26 @@ ccm_attach(device_t dev) } ccm_sc = sc; + + /* + * Configure the Low Power Mode setting to leave the ARM core power on + * when a WFI instruction is executed. This lets the MPCore timers and + * GIC continue to run, which is helpful when the only thing that can + * wake you up is an MPCore Private Timer interrupt delivered via GIC. + * + * XXX Based on the docs, setting CCM_CGPR_INT_MEM_CLK_LPM shouldn't be + * required when the LPM bits are set to LPM_RUN. But experimentally + * I've experienced a fairly rare lockup when not setting it. I was + * unable to prove conclusively that the lockup was related to power + * management or that this definitively fixes it. Revisit this. + */ + reg = RD4(sc, CCM_CGPR); + reg |= CCM_CGPR_INT_MEM_CLK_LPM; + WR4(sc, CCM_CGPR, reg); + reg = RD4(sc, CCM_CLPCR); + reg = (reg & ~CCM_CLPCR_LPM_MASK) | CCM_CLPCR_LPM_RUN; + WR4(sc, CCM_CLPCR, reg); + err = 0; out: Modified: stable/10/sys/arm/freescale/imx/imx6_ccmreg.h ============================================================================== --- stable/10/sys/arm/freescale/imx/imx6_ccmreg.h Fri May 16 01:50:04 2014 (r266206) +++ stable/10/sys/arm/freescale/imx/imx6_ccmreg.h Fri May 16 02:21:51 2014 (r266207) @@ -29,13 +29,20 @@ #ifndef IMX6_CCMREG_H #define IMX6_CCMREG_H -#define CCM_CCGR1 0x06C -#define CCM_CCGR2 0x070 -#define CCM_CCGR3 0x074 -#define CCM_CCGR4 0x078 -#define CCM_CCGR5 0x07C -#define CCM_CCGR6 0x080 -#define CCM_CMEOR 0x088 +#define CCM_CLPCR 0x054 +#define CCM_CLPCR_LPM_MASK 0x03 +#define CCM_CLPCR_LPM_RUN 0x00 +#define CCM_CLPCR_LPM_WAIT 0x01 +#define CCM_CLPCR_LPM_STOP 0x02 +#define CCM_CGPR 0x064 +#define CCM_CGPR_INT_MEM_CLK_LPM (1 << 17) +#define CCM_CCGR1 0x06C +#define CCM_CCGR2 0x070 +#define CCM_CCGR3 0x074 +#define CCM_CCGR4 0x078 +#define CCM_CCGR5 0x07C +#define CCM_CCGR6 0x080 +#define CCM_CMEOR 0x088 #endif Modified: stable/10/sys/arm/freescale/imx/imx_gpt.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx_gpt.c Fri May 16 01:50:04 2014 (r266206) +++ stable/10/sys/arm/freescale/imx/imx_gpt.c Fri May 16 02:21:51 2014 (r266207) @@ -319,17 +319,6 @@ imx_gpt_get_timerfreq(struct imx_gpt_sof return (sc->clkfreq); } -void -cpu_initclocks(void) -{ - - if (imx_gpt_sc == NULL) { - panic("%s: i.MX GPT driver has not been initialized!", __func__); - } - - cpu_initclocks_bsp(); -} - static int imx_gpt_intr(void *arg) { Modified: stable/10/sys/arm/freescale/vybrid/files.vybrid ============================================================================== --- stable/10/sys/arm/freescale/vybrid/files.vybrid Fri May 16 01:50:04 2014 (r266206) +++ stable/10/sys/arm/freescale/vybrid/files.vybrid Fri May 16 02:21:51 2014 (r266207) @@ -23,6 +23,7 @@ arm/freescale/vybrid/vf_mscm.c standar arm/freescale/vybrid/vf_src.c standard arm/freescale/vybrid/vf_edma.c standard arm/freescale/vybrid/vf_dmamux.c standard +arm/freescale/vybrid/vf_i2c.c optional iicbus arm/freescale/vybrid/vf_tcon.c optional vt arm/freescale/vybrid/vf_dcu4.c optional vt arm/freescale/vybrid/vf_nfc.c optional nand Copied and modified: stable/10/sys/arm/freescale/vybrid/vf_i2c.c (from r262552, head/sys/arm/freescale/vybrid/vf_i2c.c) ============================================================================== --- head/sys/arm/freescale/vybrid/vf_i2c.c Thu Feb 27 09:59:15 2014 (r262552, copy source) +++ stable/10/sys/arm/freescale/vybrid/vf_i2c.c Fri May 16 02:21:51 2014 (r266207) @@ -104,11 +104,9 @@ struct i2c_softc { struct resource *res[2]; bus_space_tag_t bst; bus_space_handle_t bsh; - void *ih; device_t dev; device_t iicbus; struct mtx mutex; - int ibif; }; static struct resource_spec i2c_spec[] = { @@ -117,19 +115,6 @@ static struct resource_spec i2c_spec[] = { -1, 0 } }; -static void -i2c_intr(void *arg) -{ - struct i2c_softc *sc; - - sc = arg; - - if (READ1(sc, I2C_IBSR) & IBSR_IBIF) { - WRITE1(sc, I2C_IBSR, IBSR_IBIF); - sc->ibif = 1; - } -} - static int i2c_probe(device_t dev) { @@ -148,7 +133,6 @@ static int i2c_attach(device_t dev) { struct i2c_softc *sc; - int err; sc = device_get_softc(dev); sc->dev = dev; @@ -164,14 +148,6 @@ i2c_attach(device_t dev) sc->bst = rman_get_bustag(sc->res[0]); sc->bsh = rman_get_bushandle(sc->res[0]); - /* Setup interrupt handler */ - err = bus_setup_intr(dev, sc->res[1], INTR_TYPE_BIO | INTR_MPSAFE, - NULL, i2c_intr, sc, &sc->ih); - if (err) { - device_printf(dev, "Unable to alloc interrupt resource.\n"); - return (ENXIO); - } - WRITE1(sc, I2C_IBIC, IBIC_BIIE); sc->iicbus = device_add_child(dev, "iicbus", -1); @@ -194,8 +170,10 @@ wait_for_iif(struct i2c_softc *sc) retry = 1000; while (retry --) { - if (sc->ibif == 1) + if (READ1(sc, I2C_IBSR) & IBSR_IBIF) { + WRITE1(sc, I2C_IBSR, IBSR_IBIF); return (IIC_NOERR); + } DELAY(10); } @@ -227,8 +205,10 @@ wait_for_icf(struct i2c_softc *sc) retry = 1000; while (retry --) { if (READ1(sc, I2C_IBSR) & IBSR_TCF) { - if (sc->ibif == 1) + if (READ1(sc, I2C_IBSR) & IBSR_IBIF) { + WRITE1(sc, I2C_IBSR, IBSR_IBIF); return (IIC_NOERR); + } } DELAY(10); } @@ -265,8 +245,6 @@ i2c_repeated_start(device_t dev, u_char DELAY(10); - sc->ibif = 0; - /* Write target address - LSB is R/W bit */ WRITE1(sc, I2C_IBDR, slave); @@ -310,8 +288,6 @@ i2c_start(device_t dev, u_char slave, in reg |= (IBCR_TXRX); WRITE1(sc, I2C_IBCR, reg); - sc->ibif = 0; - /* Write target address - LSB is R/W bit */ WRITE1(sc, I2C_IBDR, slave); @@ -407,7 +383,6 @@ i2c_read(device_t dev, char *buf, int le WRITE1(sc, I2C_IBCR, IBCR_IBIE | IBCR_MSSL); /* dummy read */ - sc->ibif = 0; READ1(sc, I2C_IBDR); DELAY(1000); } @@ -430,7 +405,6 @@ i2c_read(device_t dev, char *buf, int le WRITE1(sc, I2C_IBCR, IBCR_IBIE | IBCR_NOACK); } - sc->ibif = 0; *buf++ = READ1(sc, I2C_IBDR); (*read)++; } @@ -453,7 +427,6 @@ i2c_write(device_t dev, const char *buf, mtx_lock(&sc->mutex); while (*sent < len) { - sc->ibif = 0; WRITE1(sc, I2C_IBDR, *buf++); Modified: stable/10/sys/arm/include/cpufunc.h ============================================================================== --- stable/10/sys/arm/include/cpufunc.h Fri May 16 01:50:04 2014 (r266206) +++ stable/10/sys/arm/include/cpufunc.h Fri May 16 02:21:51 2014 (r266207) @@ -523,6 +523,7 @@ void armv7_setup (char *string); void armv7_context_switch (void); void armv7_drain_writebuf (void); void armv7_sev (void); +void armv7_sleep (int unused); u_int armv7_auxctrl (u_int, u_int); void pj4bv7_setup (char *string); void pj4b_config (void); Modified: stable/10/sys/arm/include/machdep.h ============================================================================== --- stable/10/sys/arm/include/machdep.h Fri May 16 01:50:04 2014 (r266206) +++ stable/10/sys/arm/include/machdep.h Fri May 16 02:21:51 2014 (r266207) @@ -32,6 +32,7 @@ vm_offset_t freebsd_parse_boot_param(str vm_offset_t linux_parse_boot_param(struct arm_boot_params *abp); vm_offset_t fake_preload_metadata(struct arm_boot_params *abp); vm_offset_t parse_boot_param(struct arm_boot_params *abp); +void arm_generic_initclocks(void); /* * Initialization functions called by the common initarm() function in Modified: stable/10/sys/arm/lpc/lpc_timer.c ============================================================================== --- stable/10/sys/arm/lpc/lpc_timer.c Fri May 16 01:50:04 2014 (r266206) +++ stable/10/sys/arm/lpc/lpc_timer.c Fri May 16 02:21:51 2014 (r266207) @@ -280,12 +280,6 @@ lpc_get_timecount(struct timecounter *tc } void -cpu_initclocks(void) -{ - cpu_initclocks_bsp(); -} - -void DELAY(int usec) { uint32_t counter; Modified: stable/10/sys/arm/mv/timer.c ============================================================================== --- stable/10/sys/arm/mv/timer.c Fri May 16 01:50:04 2014 (r266206) +++ stable/10/sys/arm/mv/timer.c Fri May 16 02:21:51 2014 (r266207) @@ -224,13 +224,6 @@ mv_timer_get_timecount(struct timecounte } void -cpu_initclocks(void) -{ - - cpu_initclocks_bsp(); -} - -void DELAY(int usec) { uint32_t val, val_temp; Modified: stable/10/sys/arm/ti/am335x/am335x_dmtimer.c ============================================================================== --- stable/10/sys/arm/ti/am335x/am335x_dmtimer.c Fri May 16 01:50:04 2014 (r266206) +++ stable/10/sys/arm/ti/am335x/am335x_dmtimer.c Fri May 16 02:21:51 2014 (r266207) @@ -662,12 +662,6 @@ DRIVER_MODULE(am335x_dmtimer, simplebus, MODULE_DEPEND(am335x_dmtimer, am335x_prcm, 1, 1, 1); void -cpu_initclocks(void) -{ - cpu_initclocks_bsp(); -} - -void DELAY(int usec) { struct am335x_dmtimer_softc *sc; Modified: stable/10/sys/dev/aic7xxx/aicasm/Makefile ============================================================================== --- stable/10/sys/dev/aic7xxx/aicasm/Makefile Fri May 16 01:50:04 2014 (r266206) +++ stable/10/sys/dev/aic7xxx/aicasm/Makefile Fri May 16 02:21:51 2014 (r266207) @@ -39,3 +39,4 @@ LFLAGS+= -d .endif .include +CFLAGS+= -Wno-missing-prototypes From owner-svn-src-stable@FreeBSD.ORG Fri May 16 05:05:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 63952980; Fri, 16 May 2014 05:05:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5012627C4; Fri, 16 May 2014 05:05:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4G55sUo020651; Fri, 16 May 2014 05:05:54 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4G55sj9020650; Fri, 16 May 2014 05:05:54 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201405160505.s4G55sj9020650@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 16 May 2014 05:05:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266210 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 05:05:54 -0000 Author: yongari Date: Fri May 16 05:05:53 2014 New Revision: 266210 URL: http://svnweb.freebsd.org/changeset/base/266210 Log: MFC r265942: Fix checksum computation. Previously it didn't include carry. Modified: stable/10/sys/netinet/ip_input.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/ip_input.c ============================================================================== --- stable/10/sys/netinet/ip_input.c Fri May 16 03:18:09 2014 (r266209) +++ stable/10/sys/netinet/ip_input.c Fri May 16 05:05:53 2014 (r266210) @@ -1085,8 +1085,9 @@ found: * (and not in for{} loop), though it implies we are not going to * reassemble more than 64k fragments. */ - m->m_pkthdr.csum_data = - (m->m_pkthdr.csum_data & 0xffff) + (m->m_pkthdr.csum_data >> 16); + while (m->m_pkthdr.csum_data & 0xffff0000) + m->m_pkthdr.csum_data = (m->m_pkthdr.csum_data & 0xffff) + + (m->m_pkthdr.csum_data >> 16); #ifdef MAC mac_ipq_reassemble(fp, m); mac_ipq_destroy(fp); From owner-svn-src-stable@FreeBSD.ORG Fri May 16 05:06:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A54CABA; Fri, 16 May 2014 05:06:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4762127CF; Fri, 16 May 2014 05:06:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4G56l2L020842; Fri, 16 May 2014 05:06:47 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4G56lOi020841; Fri, 16 May 2014 05:06:47 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201405160506.s4G56lOi020841@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 16 May 2014 05:06:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266211 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 05:06:47 -0000 Author: yongari Date: Fri May 16 05:06:46 2014 New Revision: 266211 URL: http://svnweb.freebsd.org/changeset/base/266211 Log: MFC r265942: Fix checksum computation. Previously it didn't include carry. Modified: stable/9/sys/netinet/ip_input.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/ip_input.c ============================================================================== --- stable/9/sys/netinet/ip_input.c Fri May 16 05:05:53 2014 (r266210) +++ stable/9/sys/netinet/ip_input.c Fri May 16 05:06:46 2014 (r266211) @@ -1108,8 +1108,9 @@ found: * (and not in for{} loop), though it implies we are not going to * reassemble more than 64k fragments. */ - m->m_pkthdr.csum_data = - (m->m_pkthdr.csum_data & 0xffff) + (m->m_pkthdr.csum_data >> 16); + while (m->m_pkthdr.csum_data & 0xffff0000) + m->m_pkthdr.csum_data = (m->m_pkthdr.csum_data & 0xffff) + + (m->m_pkthdr.csum_data >> 16); #ifdef MAC mac_ipq_reassemble(fp, m); mac_ipq_destroy(fp); From owner-svn-src-stable@FreeBSD.ORG Fri May 16 05:10:17 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8655DCFE; Fri, 16 May 2014 05:10:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B82F2813; Fri, 16 May 2014 05:10:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4G5AHmt021591; Fri, 16 May 2014 05:10:17 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4G5AHdD021590; Fri, 16 May 2014 05:10:17 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201405160510.s4G5AHdD021590@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 16 May 2014 05:10:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266212 - stable/10/sys/dev/re X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 05:10:17 -0000 Author: yongari Date: Fri May 16 05:10:16 2014 New Revision: 266212 URL: http://svnweb.freebsd.org/changeset/base/266212 Log: MFC r265943: Disable TX IP/TCP/UDP checksum offloading for RTL8168C/RTL8168CP. Previously only TX IP checksum offloading was disabled but it's reported that TX checksum offloading for UDP datagrams with IP options also generates corrupted frames. Reporter's controller is RTL8168CP but I guess RTL8168C also have the same issue since it shall share the same core. Modified: stable/10/sys/dev/re/if_re.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/re/if_re.c ============================================================================== --- stable/10/sys/dev/re/if_re.c Fri May 16 05:06:46 2014 (r266211) +++ stable/10/sys/dev/re/if_re.c Fri May 16 05:10:16 2014 (r266212) @@ -1618,16 +1618,18 @@ re_attach(device_t dev) ifp->if_start = re_start; /* * RTL8168/8111C generates wrong IP checksummed frame if the - * packet has IP options so disable TX IP checksum offloading. + * packet has IP options so disable TX checksum offloading. */ if (sc->rl_hwrev->rl_rev == RL_HWREV_8168C || sc->rl_hwrev->rl_rev == RL_HWREV_8168C_SPIN2 || - sc->rl_hwrev->rl_rev == RL_HWREV_8168CP) - ifp->if_hwassist = CSUM_TCP | CSUM_UDP; - else + sc->rl_hwrev->rl_rev == RL_HWREV_8168CP) { + ifp->if_hwassist = 0; + ifp->if_capabilities = IFCAP_RXCSUM | IFCAP_TSO4; + } else { ifp->if_hwassist = CSUM_IP | CSUM_TCP | CSUM_UDP; + ifp->if_capabilities = IFCAP_HWCSUM | IFCAP_TSO4; + } ifp->if_hwassist |= CSUM_TSO; - ifp->if_capabilities = IFCAP_HWCSUM | IFCAP_TSO4; ifp->if_capenable = ifp->if_capabilities; ifp->if_init = re_init; IFQ_SET_MAXLEN(&ifp->if_snd, RL_IFQ_MAXLEN); @@ -3363,7 +3365,6 @@ re_ioctl(struct ifnet *ifp, u_long comma struct rl_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *) data; struct mii_data *mii; - uint32_t rev; int error = 0; switch (command) { @@ -3452,15 +3453,9 @@ re_ioctl(struct ifnet *ifp, u_long comma if ((mask & IFCAP_TXCSUM) != 0 && (ifp->if_capabilities & IFCAP_TXCSUM) != 0) { ifp->if_capenable ^= IFCAP_TXCSUM; - if ((ifp->if_capenable & IFCAP_TXCSUM) != 0) { - rev = sc->rl_hwrev->rl_rev; - if (rev == RL_HWREV_8168C || - rev == RL_HWREV_8168C_SPIN2 || - rev == RL_HWREV_8168CP) - ifp->if_hwassist |= CSUM_TCP | CSUM_UDP; - else - ifp->if_hwassist |= RE_CSUM_FEATURES; - } else + if ((ifp->if_capenable & IFCAP_TXCSUM) != 0) + ifp->if_hwassist |= RE_CSUM_FEATURES; + else ifp->if_hwassist &= ~RE_CSUM_FEATURES; reinit = 1; } From owner-svn-src-stable@FreeBSD.ORG Fri May 16 05:11:16 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5899FE2D; Fri, 16 May 2014 05:11:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C1142884; Fri, 16 May 2014 05:11:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4G5BG3p024427; Fri, 16 May 2014 05:11:16 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4G5BG7m024426; Fri, 16 May 2014 05:11:16 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201405160511.s4G5BG7m024426@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 16 May 2014 05:11:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266213 - stable/9/sys/dev/re X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 05:11:16 -0000 Author: yongari Date: Fri May 16 05:11:15 2014 New Revision: 266213 URL: http://svnweb.freebsd.org/changeset/base/266213 Log: MFC r265943: Disable TX IP/TCP/UDP checksum offloading for RTL8168C/RTL8168CP. Previously only TX IP checksum offloading was disabled but it's reported that TX checksum offloading for UDP datagrams with IP options also generates corrupted frames. Reporter's controller is RTL8168CP but I guess RTL8168C also have the same issue since it shall share the same core. Modified: stable/9/sys/dev/re/if_re.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/re/if_re.c ============================================================================== --- stable/9/sys/dev/re/if_re.c Fri May 16 05:10:16 2014 (r266212) +++ stable/9/sys/dev/re/if_re.c Fri May 16 05:11:15 2014 (r266213) @@ -1618,16 +1618,18 @@ re_attach(device_t dev) ifp->if_start = re_start; /* * RTL8168/8111C generates wrong IP checksummed frame if the - * packet has IP options so disable TX IP checksum offloading. + * packet has IP options so disable TX checksum offloading. */ if (sc->rl_hwrev->rl_rev == RL_HWREV_8168C || sc->rl_hwrev->rl_rev == RL_HWREV_8168C_SPIN2 || - sc->rl_hwrev->rl_rev == RL_HWREV_8168CP) - ifp->if_hwassist = CSUM_TCP | CSUM_UDP; - else + sc->rl_hwrev->rl_rev == RL_HWREV_8168CP) { + ifp->if_hwassist = 0; + ifp->if_capabilities = IFCAP_RXCSUM | IFCAP_TSO4; + } else { ifp->if_hwassist = CSUM_IP | CSUM_TCP | CSUM_UDP; + ifp->if_capabilities = IFCAP_HWCSUM | IFCAP_TSO4; + } ifp->if_hwassist |= CSUM_TSO; - ifp->if_capabilities = IFCAP_HWCSUM | IFCAP_TSO4; ifp->if_capenable = ifp->if_capabilities; ifp->if_init = re_init; IFQ_SET_MAXLEN(&ifp->if_snd, RL_IFQ_MAXLEN); @@ -3363,7 +3365,6 @@ re_ioctl(struct ifnet *ifp, u_long comma struct rl_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *) data; struct mii_data *mii; - uint32_t rev; int error = 0; switch (command) { @@ -3452,15 +3453,9 @@ re_ioctl(struct ifnet *ifp, u_long comma if ((mask & IFCAP_TXCSUM) != 0 && (ifp->if_capabilities & IFCAP_TXCSUM) != 0) { ifp->if_capenable ^= IFCAP_TXCSUM; - if ((ifp->if_capenable & IFCAP_TXCSUM) != 0) { - rev = sc->rl_hwrev->rl_rev; - if (rev == RL_HWREV_8168C || - rev == RL_HWREV_8168C_SPIN2 || - rev == RL_HWREV_8168CP) - ifp->if_hwassist |= CSUM_TCP | CSUM_UDP; - else - ifp->if_hwassist |= RE_CSUM_FEATURES; - } else + if ((ifp->if_capenable & IFCAP_TXCSUM) != 0) + ifp->if_hwassist |= RE_CSUM_FEATURES; + else ifp->if_hwassist &= ~RE_CSUM_FEATURES; reinit = 1; } From owner-svn-src-stable@FreeBSD.ORG Fri May 16 12:43:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0F4885A; Fri, 16 May 2014 12:43:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A727C2A76; Fri, 16 May 2014 12:43:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4GChlNn022144; Fri, 16 May 2014 12:43:47 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4GChjkb022131; Fri, 16 May 2014 12:43:45 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405161243.s4GChjkb022131@svn.freebsd.org> From: Ian Lepore Date: Fri, 16 May 2014 12:43:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266217 - in stable/10/sys: arm/at91 contrib/dts contrib/dts/arm dev/nand dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 12:43:47 -0000 Author: ian Date: Fri May 16 12:43:45 2014 New Revision: 266217 URL: http://svnweb.freebsd.org/changeset/base/266217 Log: MFC r262591, r262592, r262593, r262597, r262598, r262599, r262600, r262601, r262606 Initial import of Linux/Vendor DTS files for various embedded boards. Initial import of DTS files from Linux Correct initial import script New AT91 devices or fdt probe added to existing devices. Some of these are just stubs for testing the new dts. - nand - SDRAMC - shdwc - tcb - usb host and gadget Added: stable/10/sys/arm/at91/at91_sdramc.c - copied unchanged from r262598, head/sys/arm/at91/at91_sdramc.c stable/10/sys/arm/at91/at91_shdwc.c - copied unchanged from r262599, head/sys/arm/at91/at91_shdwc.c stable/10/sys/arm/at91/at91_tcb.c - copied unchanged from r262600, head/sys/arm/at91/at91_tcb.c stable/10/sys/contrib/dts/ - copied from r262591, head/sys/contrib/dts/ stable/10/sys/contrib/dts/arm/animeo_ip.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/animeo_ip.dts stable/10/sys/contrib/dts/arm/at91-ariag25.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/at91-ariag25.dts stable/10/sys/contrib/dts/arm/at91-cosino.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91-cosino.dtsi stable/10/sys/contrib/dts/arm/at91-cosino_mega2560.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/at91-cosino_mega2560.dts stable/10/sys/contrib/dts/arm/at91-foxg20.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/at91-foxg20.dts stable/10/sys/contrib/dts/arm/at91-qil_a9260.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/at91-qil_a9260.dts stable/10/sys/contrib/dts/arm/at91-sama5d3_xplained.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/at91-sama5d3_xplained.dts stable/10/sys/contrib/dts/arm/at91rm9200.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91rm9200.dtsi stable/10/sys/contrib/dts/arm/at91rm9200_pqfp.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91rm9200_pqfp.dtsi stable/10/sys/contrib/dts/arm/at91rm9200ek.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/at91rm9200ek.dts stable/10/sys/contrib/dts/arm/at91sam9260.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9260.dtsi stable/10/sys/contrib/dts/arm/at91sam9263.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9263.dtsi stable/10/sys/contrib/dts/arm/at91sam9263ek.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9263ek.dts stable/10/sys/contrib/dts/arm/at91sam9g15.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9g15.dtsi stable/10/sys/contrib/dts/arm/at91sam9g15ek.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9g15ek.dts stable/10/sys/contrib/dts/arm/at91sam9g20.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9g20.dtsi stable/10/sys/contrib/dts/arm/at91sam9g20ek.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9g20ek.dts stable/10/sys/contrib/dts/arm/at91sam9g20ek_2mmc.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9g20ek_2mmc.dts stable/10/sys/contrib/dts/arm/at91sam9g20ek_common.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9g20ek_common.dtsi stable/10/sys/contrib/dts/arm/at91sam9g25.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9g25.dtsi stable/10/sys/contrib/dts/arm/at91sam9g25ek.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9g25ek.dts stable/10/sys/contrib/dts/arm/at91sam9g35.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9g35.dtsi stable/10/sys/contrib/dts/arm/at91sam9g35ek.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9g35ek.dts stable/10/sys/contrib/dts/arm/at91sam9g45.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9g45.dtsi stable/10/sys/contrib/dts/arm/at91sam9m10g45ek.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9m10g45ek.dts stable/10/sys/contrib/dts/arm/at91sam9n12.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9n12.dtsi stable/10/sys/contrib/dts/arm/at91sam9n12ek.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9n12ek.dts stable/10/sys/contrib/dts/arm/at91sam9x25.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9x25.dtsi stable/10/sys/contrib/dts/arm/at91sam9x25ek.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9x25ek.dts stable/10/sys/contrib/dts/arm/at91sam9x35.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9x35.dtsi stable/10/sys/contrib/dts/arm/at91sam9x35ek.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9x35ek.dts stable/10/sys/contrib/dts/arm/at91sam9x5.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9x5.dtsi stable/10/sys/contrib/dts/arm/at91sam9x5_macb0.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9x5_macb0.dtsi stable/10/sys/contrib/dts/arm/at91sam9x5_macb1.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9x5_macb1.dtsi stable/10/sys/contrib/dts/arm/at91sam9x5_usart3.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9x5_usart3.dtsi stable/10/sys/contrib/dts/arm/at91sam9x5cm.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9x5cm.dtsi stable/10/sys/contrib/dts/arm/at91sam9x5ek.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9x5ek.dtsi stable/10/sys/contrib/dts/arm/ethernut5.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/ethernut5.dts stable/10/sys/contrib/dts/arm/evk-pro3.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/evk-pro3.dts stable/10/sys/contrib/dts/arm/ge863-pro3.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/ge863-pro3.dtsi stable/10/sys/contrib/dts/arm/kizbox.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/kizbox.dts stable/10/sys/contrib/dts/arm/mpa1600.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/mpa1600.dts stable/10/sys/contrib/dts/arm/pm9g45.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/pm9g45.dts stable/10/sys/contrib/dts/arm/sama5d3.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d3.dtsi stable/10/sys/contrib/dts/arm/sama5d31.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d31.dtsi stable/10/sys/contrib/dts/arm/sama5d31ek.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d31ek.dts stable/10/sys/contrib/dts/arm/sama5d33.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d33.dtsi stable/10/sys/contrib/dts/arm/sama5d33ek.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d33ek.dts stable/10/sys/contrib/dts/arm/sama5d34.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d34.dtsi stable/10/sys/contrib/dts/arm/sama5d34ek.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d34ek.dts stable/10/sys/contrib/dts/arm/sama5d35.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d35.dtsi stable/10/sys/contrib/dts/arm/sama5d35ek.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d35ek.dts stable/10/sys/contrib/dts/arm/sama5d36.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d36.dtsi stable/10/sys/contrib/dts/arm/sama5d36ek.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d36ek.dts stable/10/sys/contrib/dts/arm/sama5d3_can.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d3_can.dtsi stable/10/sys/contrib/dts/arm/sama5d3_emac.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d3_emac.dtsi stable/10/sys/contrib/dts/arm/sama5d3_gmac.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d3_gmac.dtsi stable/10/sys/contrib/dts/arm/sama5d3_lcd.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d3_lcd.dtsi stable/10/sys/contrib/dts/arm/sama5d3_mci2.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d3_mci2.dtsi stable/10/sys/contrib/dts/arm/sama5d3_tcb1.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d3_tcb1.dtsi stable/10/sys/contrib/dts/arm/sama5d3_uart.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d3_uart.dtsi stable/10/sys/contrib/dts/arm/sama5d3xcm.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d3xcm.dtsi stable/10/sys/contrib/dts/arm/sama5d3xdm.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d3xdm.dtsi stable/10/sys/contrib/dts/arm/sama5d3xmb.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d3xmb.dtsi stable/10/sys/contrib/dts/arm/tny_a9260.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/tny_a9260.dts stable/10/sys/contrib/dts/arm/tny_a9260_common.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/tny_a9260_common.dtsi stable/10/sys/contrib/dts/arm/tny_a9263.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/tny_a9263.dts stable/10/sys/contrib/dts/arm/tny_a9g20.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/tny_a9g20.dts stable/10/sys/contrib/dts/arm/usb_a9260.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/usb_a9260.dts stable/10/sys/contrib/dts/arm/usb_a9260_common.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/usb_a9260_common.dtsi stable/10/sys/contrib/dts/arm/usb_a9263.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/usb_a9263.dts stable/10/sys/contrib/dts/arm/usb_a9g20.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/usb_a9g20.dts stable/10/sys/contrib/dts/arm/usb_a9g20_common.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/usb_a9g20_common.dtsi stable/10/sys/contrib/dts/arm/usb_a9g20_lpw.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/usb_a9g20_lpw.dts stable/10/sys/dev/usb/controller/at91dci_fdt.c - copied unchanged from r262601, head/sys/dev/usb/controller/at91dci_fdt.c stable/10/sys/dev/usb/controller/ohci_fdt.c - copied unchanged from r262601, head/sys/dev/usb/controller/ohci_fdt.c Modified: stable/10/sys/contrib/dts/FreeBSD-upgrade stable/10/sys/dev/nand/nfc_at91.c Directory Properties: stable/10/ (props changed) Copied: stable/10/sys/arm/at91/at91_sdramc.c (from r262598, head/sys/arm/at91/at91_sdramc.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/at91/at91_sdramc.c Fri May 16 12:43:45 2014 (r266217, copy of r262598, head/sys/arm/at91/at91_sdramc.c) @@ -0,0 +1,105 @@ +/*- + * Copyright (c) 2014 Warner Losh. All rights reserved. + * + * 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 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 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. + */ + +#include "opt_platform.h" + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#ifdef FDT +#include +#include +#include +#endif + +struct sdramc_softc { + struct resource *mem_res; /* Memory resource */ + device_t sc_dev; +}; + +static int +at91_sdramc_probe(device_t dev) +{ +#ifdef FDT + if (!ofw_bus_is_compatible(dev, "atmel,at91sam9260-sdramc")) + return (ENXIO); +#endif + device_set_desc(dev, "SDRAMC"); + return (0); +} + +static int +at91_sdramc_attach(device_t dev) +{ + int rid, err = 0; + struct sdramc_softc *sc; + + sc = device_get_softc(dev); + sc->sc_dev = dev; + + rid = 0; + sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + + if (sc->mem_res == NULL) + panic("couldn't allocate register resources"); + + return (err); +} + +static device_method_t at91_sdramc_methods[] = { + DEVMETHOD(device_probe, at91_sdramc_probe), + DEVMETHOD(device_attach, at91_sdramc_attach), + DEVMETHOD_END +}; + +static driver_t at91_sdramc_driver = { + "at91_sdramc", + at91_sdramc_methods, + sizeof(struct sdramc_softc), +}; + +static devclass_t at91_sdramc_devclass; + +#ifdef FDT +DRIVER_MODULE(at91_sdramc, simplebus, at91_sdramc_driver, at91_sdramc_devclass, NULL, + NULL); +#else +DRIVER_MODULE(at91_sdramc, atmelarm, at91_sdramc_driver, at91_sdramc_devclass, NULL, + NULL); +#endif Copied: stable/10/sys/arm/at91/at91_shdwc.c (from r262599, head/sys/arm/at91/at91_shdwc.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/at91/at91_shdwc.c Fri May 16 12:43:45 2014 (r266217, copy of r262599, head/sys/arm/at91/at91_shdwc.c) @@ -0,0 +1,105 @@ +/*- + * Copyright (c) 2014 Warner Losh. All rights reserved. + * + * 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 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 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. + */ + +#include "opt_platform.h" + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#ifdef FDT +#include +#include +#include +#endif + +struct shdwc_softc { + struct resource *mem_res; /* Memory resource */ + device_t sc_dev; +}; + +static int +at91_shdwc_probe(device_t dev) +{ +#ifdef FDT + if (!ofw_bus_is_compatible(dev, "atmel,at91sam9260-shdwc")) + return (ENXIO); +#endif + device_set_desc(dev, "SHDWC"); + return (0); +} + +static int +at91_shdwc_attach(device_t dev) +{ + int rid, err = 0; + struct shdwc_softc *sc; + + sc = device_get_softc(dev); + sc->sc_dev = dev; + + rid = 0; + sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + + if (sc->mem_res == NULL) + panic("couldn't allocate register resources"); + + return (err); +} + +static device_method_t at91_shdwc_methods[] = { + DEVMETHOD(device_probe, at91_shdwc_probe), + DEVMETHOD(device_attach, at91_shdwc_attach), + DEVMETHOD_END +}; + +static driver_t at91_shdwc_driver = { + "at91_shdwc", + at91_shdwc_methods, + sizeof(struct shdwc_softc), +}; + +static devclass_t at91_shdwc_devclass; + +#ifdef FDT +DRIVER_MODULE(at91_shdwc, simplebus, at91_shdwc_driver, at91_shdwc_devclass, NULL, + NULL); +#else +DRIVER_MODULE(at91_shdwc, atmelarm, at91_shdwc_driver, at91_shdwc_devclass, NULL, + NULL); +#endif Copied: stable/10/sys/arm/at91/at91_tcb.c (from r262600, head/sys/arm/at91/at91_tcb.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/at91/at91_tcb.c Fri May 16 12:43:45 2014 (r266217, copy of r262600, head/sys/arm/at91/at91_tcb.c) @@ -0,0 +1,105 @@ +/*- + * Copyright (c) 2014 Warner Losh. All rights reserved. + * + * 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 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 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. + */ + +#include "opt_platform.h" + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#ifdef FDT +#include +#include +#include +#endif + +struct tcb_softc { + struct resource *mem_res; /* Memory resource */ + device_t sc_dev; +}; + +static int +at91_tcb_probe(device_t dev) +{ +#ifdef FDT + if (!ofw_bus_is_compatible(dev, "atmel,at91rm9200-tcb")) + return (ENXIO); +#endif + device_set_desc(dev, "TCB"); + return (0); +} + +static int +at91_tcb_attach(device_t dev) +{ + int rid, err = 0; + struct tcb_softc *sc; + + sc = device_get_softc(dev); + sc->sc_dev = dev; + + rid = 0; + sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + + if (sc->mem_res == NULL) + panic("couldn't allocate register resources"); + + return (err); +} + +static device_method_t at91_tcb_methods[] = { + DEVMETHOD(device_probe, at91_tcb_probe), + DEVMETHOD(device_attach, at91_tcb_attach), + DEVMETHOD_END +}; + +static driver_t at91_tcb_driver = { + "at91_tcb", + at91_tcb_methods, + sizeof(struct tcb_softc), +}; + +static devclass_t at91_tcb_devclass; + +#ifdef FDT +DRIVER_MODULE(at91_tcb, simplebus, at91_tcb_driver, at91_tcb_devclass, NULL, + NULL); +#else +DRIVER_MODULE(at91_tcb, atmelarm, at91_tcb_driver, at91_tcb_devclass, NULL, + NULL); +#endif Modified: stable/10/sys/contrib/dts/FreeBSD-upgrade ============================================================================== --- head/sys/contrib/dts/FreeBSD-upgrade Fri Feb 28 01:31:35 2014 (r262591) +++ stable/10/sys/contrib/dts/FreeBSD-upgrade Fri May 16 12:43:45 2014 (r266217) @@ -18,7 +18,7 @@ # # This script should take care of all that the first time... -s=svn+ssh://svn.freebsd.org/base/vendor/device-tree/ +s=svn+ssh://svn.freebsd.org/base/vendor/device-tree/dist/ args=$(grep -v ^# FreeBSD-list | sed -e"s=^=$s=") svn cp -m "Initial import of DTS files from Linux" ${args} svn+ssh://svn.freebsd.org/base/head/sys/contrib/dts/arm Copied: stable/10/sys/contrib/dts/arm/animeo_ip.dts (from r262592, head/sys/contrib/dts/arm/animeo_ip.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/contrib/dts/arm/animeo_ip.dts Fri May 16 12:43:45 2014 (r266217, copy of r262592, head/sys/contrib/dts/arm/animeo_ip.dts) @@ -0,0 +1,167 @@ +/* + * animeo_ip.dts - Device Tree file for Somfy Animeo IP Boards + * + * Copyright (C) 2011-2012 Jean-Christophe PLAGNIOL-VILLARD + * + * Licensed under GPLv2 only. + */ + +/dts-v1/; +#include "at91sam9260.dtsi" + +/ { + model = "Somfy Animeo IP"; + compatible = "somfy,animeo-ip", "atmel,at91sam9260", "atmel,at91sam9"; + + aliases { + serial0 = &usart1; + serial1 = &usart2; + serial2 = &usart0; + serial3 = &dbgu; + serial4 = &usart3; + serial5 = &uart0; + serial6 = &uart1; + }; + + chosen { + linux,stdout-path = &usart2; + }; + + memory { + reg = <0x20000000 0x4000000>; + }; + + clocks { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + main_clock: clock@0 { + compatible = "atmel,osc", "fixed-clock"; + clock-frequency = <18432000>; + }; + }; + + ahb { + apb { + usart0: serial@fffb0000 { + pinctrl-0 = <&pinctrl_usart0 &pinctrl_usart0_rts>; + linux,rs485-enabled-at-boot-time; + status = "okay"; + }; + + usart1: serial@fffb4000 { + pinctrl-0 = <&pinctrl_usart1 &pinctrl_usart1_rts>; + linux,rs485-enabled-at-boot-time; + status = "okay"; + }; + + usart2: serial@fffb8000 { + pinctrl-0 = <&pinctrl_usart2>; + status = "okay"; + }; + + macb0: ethernet@fffc4000 { + pinctrl-0 = <&pinctrl_macb_rmii &pinctrl_macb_rmii_mii>; + phy-mode = "mii"; + status = "okay"; + }; + + mmc0: mmc@fffa8000 { + pinctrl-0 = <&pinctrl_mmc0_clk + &pinctrl_mmc0_slot1_cmd_dat0 + &pinctrl_mmc0_slot1_dat1_3>; + status = "okay"; + + slot@1 { + reg = <1>; + bus-width = <4>; + }; + }; + + watchdog@fffffd40 { + status = "okay"; + }; + }; + + nand0: nand@40000000 { + nand-bus-width = <8>; + nand-ecc-mode = "soft"; + nand-on-flash-bbt; + status = "okay"; + + barebox@0 { + label = "barebox"; + reg = <0x0 0x58000>; + }; + + u_boot_env@58000 { + label = "u_boot_env"; + reg = <0x58000 0x8000>; + }; + + ubi@60000 { + label = "ubi"; + reg = <0x60000 0x1FA0000>; + }; + }; + + usb0: ohci@00500000 { + num-ports = <2>; + atmel,vbus-gpio = <&pioB 15 GPIO_ACTIVE_LOW>; + status = "okay"; + }; + }; + + leds { + compatible = "gpio-leds"; + + power_green { + label = "power_green"; + gpios = <&pioC 17 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "heartbeat"; + }; + + power_red { + label = "power_red"; + gpios = <&pioA 2 GPIO_ACTIVE_HIGH>; + }; + + tx_green { + label = "tx_green"; + gpios = <&pioC 19 GPIO_ACTIVE_HIGH>; + }; + + tx_red { + label = "tx_red"; + gpios = <&pioC 18 GPIO_ACTIVE_HIGH>; + }; + }; + + gpio_keys { + compatible = "gpio-keys"; + #address-cells = <1>; + #size-cells = <0>; + + keyswitch_in { + label = "keyswitch_in"; + gpios = <&pioB 1 GPIO_ACTIVE_HIGH>; + linux,code = <28>; + gpio-key,wakeup; + }; + + error_in { + label = "error_in"; + gpios = <&pioB 2 GPIO_ACTIVE_HIGH>; + linux,code = <29>; + gpio-key,wakeup; + }; + + btn { + label = "btn"; + gpios = <&pioC 23 GPIO_ACTIVE_HIGH>; + linux,code = <31>; + gpio-key,wakeup; + }; + }; +}; Copied: stable/10/sys/contrib/dts/arm/at91-ariag25.dts (from r262592, head/sys/contrib/dts/arm/at91-ariag25.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/contrib/dts/arm/at91-ariag25.dts Fri May 16 12:43:45 2014 (r266217, copy of r262592, head/sys/contrib/dts/arm/at91-ariag25.dts) @@ -0,0 +1,180 @@ +/* + * at91-ariag25.dts - Device Tree file for Acme Systems Aria G25 (AT91SAM9G25 based) + * + * Copyright (C) 2013 Douglas Gilbert , + * Robert Nelson + * + * Licensed under GPLv2 or later. + */ +/dts-v1/; +#include "at91sam9g25.dtsi" + +/ { + model = "Acme Systems Aria G25"; + compatible = "acme,ariag25", "atmel,at91sam9x5ek", + "atmel,at91sam9x5", "atmel,at91sam9"; + + aliases { + serial0 = &dbgu; + serial1 = &usart0; + serial2 = &usart1; + serial3 = &usart2; + serial4 = &usart3; + serial5 = &uart0; + serial6 = &uart1; + }; + + chosen { + bootargs = "console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait"; + }; + + memory { + /* 128 MB, change this for 256 MB revision */ + reg = <0x20000000 0x8000000>; + }; + + clocks { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + main_clock: clock@0 { + compatible = "atmel,osc", "fixed-clock"; + clock-frequency = <12000000>; + }; + }; + + ahb { + apb { + mmc0: mmc@f0008000 { + /* N.B. Aria has no SD card detect (CD), assumed present */ + + pinctrl-0 = < + &pinctrl_mmc0_slot0_clk_cmd_dat0 + &pinctrl_mmc0_slot0_dat1_3>; + status = "okay"; + slot@0 { + reg = <0>; + bus-width = <4>; + }; + }; + + i2c0: i2c@f8010000 { + status = "okay"; + }; + + i2c1: i2c@f8014000 { + status = "okay"; + }; + + /* TWD2+TCLK2 hidden behind ethernet, so no i2c2 */ + + usart0: serial@f801c000 { + pinctrl-0 = <&pinctrl_usart0 + &pinctrl_usart0_rts + &pinctrl_usart0_cts>; + status = "okay"; + }; + + usart1: serial@f8020000 { + pinctrl-0 = <&pinctrl_usart1 + /* &pinctrl_usart1_rts */ + /* &pinctrl_usart1_cts */ + >; + status = "okay"; + }; + + usart2: serial@f8024000 { + /* cannot activate RTS2+CTS2, clash with + * ethernet on PB0 and PB1 */ + pinctrl-0 = <&pinctrl_usart2>; + status = "okay"; + }; + + usart3: serial@f8028000 { + compatible = "atmel,at91sam9260-usart"; + reg = <0xf8028000 0x200>; + interrupts = <8 4 5>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usart3 + /* &pinctrl_usart3_rts */ + /* &pinctrl_usart3_cts */ + >; + status = "okay"; + }; + + macb0: ethernet@f802c000 { + phy-mode = "rmii"; + /* + * following can be overwritten by bootloader: + * for example u-boot 'ftd set' command + */ + local-mac-address = [00 00 00 00 00 00]; + status = "okay"; + }; + + /* + * UART0/1 pins are marked as GPIO on + * Aria documentation. + * Change to "okay" if you need additional serial ports + */ + uart0: serial@f8040000 { + status = "disabled"; + }; + + uart1: serial@f8044000 { + status = "disabled"; + }; + + adc0: adc@f804c000 { + status = "okay"; + atmel,adc-channels-used = <0xf>; + atmel,adc-num-channels = <4>; + }; + + dbgu: serial@fffff200 { + status = "okay"; + }; + + pinctrl@fffff400 { + w1_0 { + pinctrl_w1_0: w1_0-0 { + atmel,pins = <0 21 0x0 0x1>; /* PA21 PIO, pull-up */ + }; + }; + }; + + rtc@fffffeb0 { + status = "okay"; + }; + }; + + usb0: ohci@00600000 { + status = "okay"; + num-ports = <3>; + }; + + usb1: ehci@00700000 { + status = "okay"; + }; + }; + + leds { + compatible = "gpio-leds"; + + /* little green LED in middle of Aria G25 module */ + aria_led { + label = "aria_led"; + gpios = <&pioB 8 GPIO_ACTIVE_HIGH>; /* PB8 */ + linux,default-trigger = "heartbeat"; + }; + + }; + + onewire@0 { + compatible = "w1-gpio"; + gpios = <&pioA 21 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_w1_0>; + }; +}; Copied: stable/10/sys/contrib/dts/arm/at91-cosino.dtsi (from r262592, head/sys/contrib/dts/arm/at91-cosino.dtsi) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/contrib/dts/arm/at91-cosino.dtsi Fri May 16 12:43:45 2014 (r266217, copy of r262592, head/sys/contrib/dts/arm/at91-cosino.dtsi) @@ -0,0 +1,122 @@ +/* + * at91-cosino.dtsi - Device Tree file for Cosino core module + * + * Copyright (C) 2013 - Rodolfo Giometti + * HCE Engineering + * + * Derived from at91sam9x5ek.dtsi by: + * Copyright (C) 2012 Atmel, + * 2012 Nicolas Ferre + * + * Licensed under GPLv2 or later. + */ + +#include "at91sam9g35.dtsi" + +/ { + model = "HCE Cosino core module"; + compatible = "hce,cosino", "atmel,at91sam9x5", "atmel,at91sam9"; + + chosen { + bootargs = "console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait"; + }; + + memory { + reg = <0x20000000 0x8000000>; + }; + + clocks { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + main_clock: clock@0 { + compatible = "atmel,osc", "fixed-clock"; + clock-frequency = <12000000>; + }; + }; + + ahb { + apb { + mmc0: mmc@f0008000 { + pinctrl-0 = < + &pinctrl_board_mmc0 + &pinctrl_mmc0_slot0_clk_cmd_dat0 + &pinctrl_mmc0_slot0_dat1_3>; + status = "okay"; + slot@0 { + reg = <0>; + bus-width = <4>; + cd-gpios = <&pioD 15 GPIO_ACTIVE_HIGH>; + }; + }; + + dbgu: serial@fffff200 { + status = "okay"; + }; + + usart0: serial@f801c000 { + status = "okay"; + }; + + i2c0: i2c@f8010000 { + status = "okay"; + }; + + adc0: adc@f804c000 { + atmel,adc-clock-rate = <1000000>; + atmel,adc-ts-wires = <4>; + atmel,adc-ts-pressure-threshold = <10000>; + status = "okay"; + }; + + pinctrl@fffff400 { + mmc0 { + pinctrl_board_mmc0: mmc0-board { + atmel,pins = + ; /* PD15 gpio CD pin pull up and deglitch */ + }; + }; + }; + + watchdog@fffffe40 { + status = "okay"; + }; + }; + + nand0: nand@40000000 { + nand-bus-width = <8>; + nand-ecc-mode = "hw"; + atmel,has-pmecc; /* Enable PMECC */ + atmel,pmecc-cap = <4>; + atmel,pmecc-sector-size = <512>; + nand-on-flash-bbt; + status = "okay"; + + at91bootstrap@0 { + label = "at91bootstrap"; + reg = <0x0 0x40000>; + }; + + uboot@40000 { + label = "u-boot"; + reg = <0x40000 0x80000>; + }; + + ubootenv@c0000 { + label = "U-Boot Env"; + reg = <0xc0000 0x140000>; + }; + + kernel@200000 { + label = "kernel"; + reg = <0x200000 0x600000>; + }; + + rootfs@800000 { + label = "rootfs"; + reg = <0x800000 0x0f800000>; + }; + }; + }; +}; Copied: stable/10/sys/contrib/dts/arm/at91-cosino_mega2560.dts (from r262592, head/sys/contrib/dts/arm/at91-cosino_mega2560.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/contrib/dts/arm/at91-cosino_mega2560.dts Fri May 16 12:43:45 2014 (r266217, copy of r262592, head/sys/contrib/dts/arm/at91-cosino_mega2560.dts) @@ -0,0 +1,84 @@ +/* + * at91-cosino_mega2560.dts - Device Tree file for Cosino board with + * Mega 2560 extension + * + * Copyright (C) 2013 - Rodolfo Giometti + * HCE Engineering + * + * Derived from at91sam9g35ek.dts by: + * Copyright (C) 2012 Atmel, + * 2012 Nicolas Ferre + * + * Licensed under GPLv2 or later. + */ + +/dts-v1/; +#include "at91-cosino.dtsi" + +/ { + model = "HCE Cosino Mega 2560"; + compatible = "hce,cosino_mega2560", "atmel,at91sam9x5", "atmel,at91sam9"; + + ahb { + apb { + macb0: ethernet@f802c000 { + phy-mode = "rmii"; + status = "okay"; + }; + + adc0: adc@f804c000 { + atmel,adc-clock-rate = <1000000>; + atmel,adc-ts-wires = <4>; + atmel,adc-ts-pressure-threshold = <10000>; + status = "okay"; + }; + + + tsadcc: tsadcc@f804c000 { + status = "okay"; + }; + + rtc@fffffeb0 { + status = "okay"; + }; + + usart1: serial@f8020000 { + status = "okay"; + }; + + usart2: serial@f8024000 { + status = "okay"; + }; + + usb2: gadget@f803c000 { + atmel,vbus-gpio = <&pioB 16 GPIO_ACTIVE_HIGH>; + status = "okay"; + }; + + mmc1: mmc@f000c000 { + pinctrl-0 = < + &pinctrl_mmc1_slot0_clk_cmd_dat0 + &pinctrl_mmc1_slot0_dat1_3>; + status = "okay"; + slot@0 { + reg = <0>; + bus-width = <4>; + non-removable; + }; + }; + }; + + usb0: ohci@00600000 { + status = "okay"; + num-ports = <3>; + atmel,vbus-gpio = <0 /* &pioD 18 GPIO_ACTIVE_LOW */ + &pioD 19 GPIO_ACTIVE_LOW + &pioD 20 GPIO_ACTIVE_LOW + >; + }; + + usb1: ehci@00700000 { + status = "okay"; + }; + }; +}; Copied: stable/10/sys/contrib/dts/arm/at91-foxg20.dts (from r262592, head/sys/contrib/dts/arm/at91-foxg20.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/contrib/dts/arm/at91-foxg20.dts Fri May 16 12:43:45 2014 (r266217, copy of r262592, head/sys/contrib/dts/arm/at91-foxg20.dts) @@ -0,0 +1,157 @@ +/* + * at91-foxg20.dts - Device Tree file for Acme Systems FoxG20 board + * + * Based on DT files for at91sam9g20ek evaluation board (AT91SAM9G20 SoC) + * + * Copyright (C) 2013 Douglas Gilbert + * + * Licensed under GPLv2 or later. + */ +/dts-v1/; +#include "at91sam9g20.dtsi" + +/ { + model = "Acme Systems FoxG20"; + compatible = "acme,foxg20", "atmel,at91sam9g20", "atmel,at91sam9"; + + chosen { + bootargs = "console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait"; + }; + + memory { + reg = <0x20000000 0x4000000>; + }; + + clocks { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + main_clock: clock@0 { + compatible = "atmel,osc", "fixed-clock"; + clock-frequency = <18432000>; + }; + }; + + ahb { + apb { + usb1: gadget@fffa4000 { + atmel,vbus-gpio = <&pioC 6 GPIO_ACTIVE_HIGH>; + status = "okay"; + }; + + mmc0: mmc@fffa8000 { + pinctrl-0 = < + &pinctrl_mmc0_clk + &pinctrl_mmc0_slot1_cmd_dat0 + &pinctrl_mmc0_slot1_dat1_3>; + status = "okay"; + + slot@1 { + reg = <1>; + bus-width = <4>; + }; + }; + + usart0: serial@fffb0000 { + pinctrl-0 = + <&pinctrl_usart0 + &pinctrl_usart0_rts + &pinctrl_usart0_cts + >; + status = "okay"; + }; + + usart1: serial@fffb4000 { + status = "okay"; + }; + + usart2: serial@fffb8000 { + status = "okay"; + }; + + macb0: ethernet@fffc4000 { + phy-mode = "rmii"; + status = "okay"; + }; + + usart3: serial@fffd0000 { + status = "okay"; + }; + + uart0: serial@fffd4000 { + status = "okay"; + }; + + uart1: serial@fffd8000 { + status = "okay"; + }; + + dbgu: serial@fffff200 { + status = "okay"; + }; + + pinctrl@fffff400 { + board { + pinctrl_pck0_as_mck: pck0_as_mck { + atmel,pins = *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Fri May 16 14:28:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 591D7610; Fri, 16 May 2014 14:28:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42CB724B4; Fri, 16 May 2014 14:28:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4GESvRe069534; Fri, 16 May 2014 14:28:57 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4GESudO069528; Fri, 16 May 2014 14:28:56 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201405161428.s4GESudO069528@svn.freebsd.org> From: Luiz Otavio O Souza Date: Fri, 16 May 2014 14:28:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266220 - in stable/10: share/man/man4 sys/geom/uncompress sys/geom/uzip sys/modules/geom sys/modules/geom/geom_uncompress X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 14:28:57 -0000 Author: loos Date: Fri May 16 14:28:55 2014 New Revision: 266220 URL: http://svnweb.freebsd.org/changeset/base/266220 Log: MFC r260522, r260523, r261439, r261440, r261586, r264504, r264769, r265193, r265194, r265197 r260522: Add the manual page for geom_uncompress(4). r260523: Build the geom_uncompress(4) module by default. Fix geom_uncompress(4) module loading. Don't link zlib.c (which is a module itself) directly. r261439: Remove some unnecessary code. The offsets read from the first block are overwritten a few lines bellow. r261440: Fix a logic error. Because of this inflateReset() wasn't being called and the output buffer wasn't being cleared between the inflate() calls, producing zeroed output after the first inflate() call. This fixes the read of mkuzip(8) images with geom_uncompress(4). r261586: Fix the build with DEBUG enabled. Where possible, fix style(9) issues. r264504: Make sure not to do I/O for more than MAXPHYS bytes. Doing so can cause problems in our providers, such as a KASSERT in md(4). We can initiate I/O for more than MAXPHYS bytes if we've been given a BIO for MAXPHYS bytes, the blocks from which we're reading couldn't be compressed and we had compression in preceeding blocks resulting in misalignment of the blocks we're trying to read relative to the sector. We're forced to round up the I/O length to make it an multiple of the sector size. When we detect the condition, we'll reduce the block count and perform a "short" read. In g_uzip_done() we need to consider the original I/O length and stop early if we're about to deflate a block that we didn't read. By using bio_completed in the cloned BIO and not bio_length to check for this, we automatically and gracefully handle short reads that our providers may be doing on top of the short reads we may initiate ourselves. r264769: Keep geom_uncompress(4) in line with geom_uzip(4), bring in the r264504 fix. Make sure not to start I/O bigger than MAXPHYS bytes. r265193: Some style and whitespace fixes. Reduce the difference between geom_uzip(4) and geom_uncompress(4). Now, they produce an almost clean diff(1) output. Remove a duplicated variable from g_uncompress.c and an unnecessary header from g_uzip.c. r265194: Actually the FEATURE() macro is defined on sys/sysctl.h. r265197: Fix a leak in g_uzip_taste(). After retrieve all the block offsets from the uzip image, free the last data read. Added: stable/10/share/man/man4/geom_uncompress.4 - copied unchanged from r260522, head/share/man/man4/geom_uncompress.4 Modified: stable/10/share/man/man4/Makefile stable/10/sys/geom/uncompress/g_uncompress.c stable/10/sys/geom/uzip/g_uzip.c stable/10/sys/modules/geom/Makefile stable/10/sys/modules/geom/geom_uncompress/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Fri May 16 14:09:51 2014 (r266219) +++ stable/10/share/man/man4/Makefile Fri May 16 14:28:55 2014 (r266220) @@ -153,6 +153,7 @@ MAN= aac.4 \ geom_fox.4 \ geom_linux_lvm.4 \ geom_map.4 \ + geom_uncompress.4 \ geom_uzip.4 \ gif.4 \ gpib.4 \ Copied: stable/10/share/man/man4/geom_uncompress.4 (from r260522, head/share/man/man4/geom_uncompress.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man4/geom_uncompress.4 Fri May 16 14:28:55 2014 (r266220, copy of r260522, head/share/man/man4/geom_uncompress.4) @@ -0,0 +1,107 @@ +.\" Copyright (c) 2014, Luiz Otavio O Souza +.\" All rights reserved. +.\" +.\" 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. +.\" +.\" $FreeBSD$ +.\" +.Dd January 9, 2014 +.Dt GEOM_UNCOMPRESS 4 +.Os +.Sh NAME +.Nm geom_uncompress +.Nd "GEOM based compressed disk images" +.Sh SYNOPSIS +To compile this driver into the kernel, place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "options GEOM_UNCOMPRESS" +.Ed +.Pp +Alternatively, to load the driver as a module at boot time, place the +following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +geom_uncompress_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +framework provides support for compressed read only disk images. +This allows significant storage savings at the expense of a little CPU +time on each read. +Data written in the GEOM label area allows +.Nm +to detect compressed images which have been created with +.Xr mkulzma 8 +or +.Xr mkuzip 8 +and presented to the kernel as a logical disk device via +.Xr md 4 . +.Nm +creates a unique +.Pa md#.uncompress +device for each image. +.Pp +The +.Nm +device is subsequently used by the +.Fx +kernel to access the disk images. +The +.Nm +driver does not allow write operations to the underlying disk image. +To check which +.Xr md 4 +devices match a given +.Nm +device: +.Bd -literal -offset indent +# geom uncompress list +Geom name: md0.uncompress +Providers: +1. Name: md0.uncompress + Mediasize: 52428800 (50M) + Sectorsize: 512 + Mode: r1w0e0 +Consumers: +1. Name: md0 + Mediasize: 20864000 (20M) + Sectorsize: 512 + Mode: r1w0e0 +.Ed +.Sh SEE ALSO +.Xr GEOM 4 , +.Xr md 4 , +.Xr geom 8 , +.Xr mkulzma 8 , +.Xr mkuzip 8 +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An "Maxim Sobolev" Aq sobomax@FreeBSD.org +and +.An "Aleksandr Rybalko" Aq ray@FreeBSD.org . +This manual page was written by +.An "Luiz Otavio O Souza" Aq loos@FreeBSD.org . Modified: stable/10/sys/geom/uncompress/g_uncompress.c ============================================================================== --- stable/10/sys/geom/uncompress/g_uncompress.c Fri May 16 14:09:51 2014 (r266219) +++ stable/10/sys/geom/uncompress/g_uncompress.c Fri May 16 14:28:55 2014 (r266220) @@ -116,7 +116,7 @@ g_uncompress_softc_free(struct g_uncompr } if (sc->offsets != NULL) { free(sc->offsets, M_GEOM_UNCOMPRESS); - sc->offsets = 0; + sc->offsets = NULL; } switch (sc->type) { @@ -150,6 +150,7 @@ z_alloc(void *nil, u_int type, u_int siz void *ptr; ptr = malloc(type * size, M_GEOM_UNCOMPRESS, M_NOWAIT); + return (ptr); } @@ -169,7 +170,7 @@ g_uncompress_done(struct bio *bp) struct g_geom *gp; struct bio *bp2; uint32_t start_blk, i; - off_t pos, upos; + off_t iolen, pos, upos; size_t bsize; int err; @@ -210,24 +211,27 @@ g_uncompress_done(struct bio *bp) */ start_blk = bp2->bio_offset / sc->blksz; bsize = pp2->sectorsize; + iolen = bp->bio_completed; pos = sc->offsets[start_blk] % bsize; upos = 0; - DPRINTF(("%s: done: bio_length %lld bio_completed %lld start_blk %d, " - "pos %lld, upos %lld (%lld, %d, %d)\n", - gp->name, bp->bio_length, bp->bio_completed, start_blk, pos, upos, - bp2->bio_offset, sc->blksz, bsize)); + DPRINTF(("%s: done: bio_length %jd bio_completed %jd start_blk %d, " + "pos %jd, upos %jd (%jd, %d, %zu)\n", + gp->name, (intmax_t)bp->bio_length, (intmax_t)bp->bio_completed, + start_blk, (intmax_t)pos, (intmax_t)upos, + (intmax_t)bp2->bio_offset, sc->blksz, bsize)); for (i = start_blk; upos < bp2->bio_length; i++) { - off_t len, dlen, ulen, uoff; + off_t len, ulen, uoff; uoff = i == start_blk ? bp2->bio_offset % sc->blksz : 0; ulen = MIN(sc->blksz - uoff, bp2->bio_length - upos); - dlen = len = sc->offsets[i + 1] - sc->offsets[i]; + len = sc->offsets[i + 1] - sc->offsets[i]; - DPRINTF(("%s: done: inflate block %d, start %lld, end %lld " - "len %lld\n", - gp->name, i, sc->offsets[i], sc->offsets[i + 1], len)); + DPRINTF(( + "%s: done: inflate block %d, start %ju, end %ju len %jd\n", + gp->name, i, (uintmax_t)sc->offsets[i], + (uintmax_t)sc->offsets[i + 1], (intmax_t)len)); if (len == 0) { /* All zero block: no cache update */ @@ -236,12 +240,17 @@ g_uncompress_done(struct bio *bp) bp2->bio_completed += ulen; continue; } - + if (len > iolen) { + DPRINTF(("%s: done: early termination: len (%jd) > " + "iolen (%jd)\n", + gp->name, (intmax_t)len, (intmax_t)iolen)); + break; + } mtx_lock(&sc->last_mtx); #ifdef GEOM_UNCOMPRESS_DEBUG if (g_debugflags & 32) - hexdump(bp->bio_data + pos, dlen, 0, 0); + hexdump(bp->bio_data + pos, len, 0, 0); #endif switch (sc->type) { @@ -249,7 +258,7 @@ g_uncompress_done(struct bio *bp) sc->b->in = bp->bio_data + pos; sc->b->out = sc->last_buf; sc->b->in_pos = sc->b->out_pos = 0; - sc->b->in_size = dlen; + sc->b->in_size = len; sc->b->out_size = (size_t)-1; err = (xz_dec_run(sc->s, sc->b) != XZ_STREAM_END) ? @@ -258,13 +267,13 @@ g_uncompress_done(struct bio *bp) break; case GEOM_UZIP: sc->zs->next_in = bp->bio_data + pos; - sc->zs->avail_in = dlen; + sc->zs->avail_in = len; sc->zs->next_out = sc->last_buf; sc->zs->avail_out = sc->blksz; err = (inflate(sc->zs, Z_FINISH) != Z_STREAM_END) ? 1 : 0; - if ((err) && (inflateReset(sc->zs) != Z_OK)) + if ((err) || (inflateReset(sc->zs) != Z_OK)) printf("%s: UZIP decoder reset failed\n", gp->name); break; @@ -290,6 +299,7 @@ g_uncompress_done(struct bio *bp) mtx_unlock(&sc->last_mtx); pos += len; + iolen -= len; upos += ulen; bp2->bio_completed += ulen; } @@ -298,8 +308,9 @@ done: /* * Finish processing the request. */ - DPRINTF(("%s: done: (%d, %lld, %ld)\n", - gp->name, bp2->bio_error, bp2->bio_completed, bp2->bio_resid)); + DPRINTF(("%s: done: (%d, %jd, %ld)\n", + gp->name, bp2->bio_error, (intmax_t)bp2->bio_completed, + bp2->bio_resid)); free(bp->bio_data, M_GEOM_UNCOMPRESS); g_destroy_bio(bp); g_io_deliver(bp2, bp2->bio_error); @@ -316,12 +327,12 @@ g_uncompress_start(struct bio *bp) uint32_t start_blk, end_blk; size_t bsize; - pp = bp->bio_to; gp = pp->geom; - DPRINTF(("%s: start (%s) to %s off=%lld len=%lld\n", gp->name, - (bp->bio_cmd==BIO_READ) ? "BIO_READ" : "BIO_WRITE*", - pp->name, bp->bio_offset, bp->bio_length)); + DPRINTF(("%s: start (%d:%s) to %s off=%jd len=%jd\n", + gp->name, bp->bio_cmd, + (bp->bio_cmd == BIO_READ) ? "BIO_READ" : "NOTSUPPORTED", + pp->name, (intmax_t)bp->bio_offset, (intmax_t)bp->bio_length)); if (bp->bio_cmd != BIO_READ) { g_io_deliver(bp, EOPNOTSUPP); @@ -334,10 +345,8 @@ g_uncompress_start(struct bio *bp) start_blk = bp->bio_offset / sc->blksz; end_blk = howmany(bp->bio_offset + bp->bio_length, sc->blksz); - KASSERT(start_blk < sc->nblocks, - ("start_blk out of range")); - KASSERT(end_blk <= sc->nblocks, - ("end_blk out of range")); + KASSERT(start_blk < sc->nblocks, ("start_blk out of range")); + KASSERT(end_blk <= sc->nblocks, ("end_blk out of range")); sc->req_total++; if (start_blk + 1 == end_blk) { @@ -353,9 +362,9 @@ g_uncompress_start(struct bio *bp) sc->req_cached++; mtx_unlock(&sc->last_mtx); - DPRINTF(("%s: start: cached 0 + %lld, " - "%lld + 0 + %lld\n", - gp->name, bp->bio_length, uoff, bp->bio_length)); + DPRINTF(("%s: start: cached 0 + %jd, %jd + 0 + %jd\n", + gp->name, (intmax_t)bp->bio_length, (intmax_t)uoff, + (intmax_t)bp->bio_length)); bp->bio_completed = bp->bio_length; g_io_deliver(bp, 0); return; @@ -368,26 +377,31 @@ g_uncompress_start(struct bio *bp) g_io_deliver(bp, ENOMEM); return; } - DPRINTF(("%s: start (%d..%d), %s: %d + %llu, %s: %d + %llu\n", + DPRINTF(("%s: start (%d..%d), %s: %d + %jd, %s: %d + %jd\n", gp->name, start_blk, end_blk, - pp->name, pp->sectorsize, pp->mediasize, - pp2->name, pp2->sectorsize, pp2->mediasize)); - + pp->name, pp->sectorsize, (intmax_t)pp->mediasize, + pp2->name, pp2->sectorsize, (intmax_t)pp2->mediasize)); bsize = pp2->sectorsize; - bp2->bio_done = g_uncompress_done; - bp2->bio_offset = rounddown(sc->offsets[start_blk],bsize); - bp2->bio_length = roundup(sc->offsets[end_blk],bsize) - - bp2->bio_offset; - bp2->bio_data = malloc(bp2->bio_length, M_GEOM_UNCOMPRESS, M_NOWAIT); + bp2->bio_offset = rounddown(sc->offsets[start_blk], bsize); + while (1) { + bp2->bio_length = roundup(sc->offsets[end_blk], bsize) - + bp2->bio_offset; + if (bp2->bio_length < MAXPHYS) + break; - DPRINTF(("%s: start %lld + %lld -> %lld + %lld -> %lld + %lld\n", + end_blk--; + DPRINTF(( + "%s: bio_length (%jd) > MAXPHYS: lowering end_blk to %u\n", + gp->name, (intmax_t)bp2->bio_length, end_blk)); + } + DPRINTF(("%s: start %jd + %jd -> %ju + %ju -> %jd + %jd\n", gp->name, - bp->bio_offset, bp->bio_length, - sc->offsets[start_blk], - sc->offsets[end_blk] - sc->offsets[start_blk], - bp2->bio_offset, bp2->bio_length)); - + (intmax_t)bp->bio_offset, (intmax_t)bp->bio_length, + (uintmax_t)sc->offsets[start_blk], + (uintmax_t)sc->offsets[end_blk] - sc->offsets[start_blk], + (intmax_t)bp2->bio_offset, (intmax_t)bp2->bio_length)); + bp2->bio_data = malloc(bp2->bio_length, M_GEOM_UNCOMPRESS, M_NOWAIT); if (bp2->bio_data == NULL) { g_destroy_bio(bp2); g_io_deliver(bp, ENOMEM); @@ -403,8 +417,7 @@ g_uncompress_orphan(struct g_consumer *c { struct g_geom *gp; - g_trace(G_T_TOPOLOGY, "%s(%p/%s)", __func__, cp, - cp->provider->name); + g_trace(G_T_TOPOLOGY, "%s(%p/%s)", __func__, cp, cp->provider->name); g_topology_assert(); gp = cp->geom; @@ -451,7 +464,7 @@ g_uncompress_taste(struct g_class *mp, s struct g_provider *pp2; struct g_consumer *cp; struct g_geom *gp; - uint32_t i, total_offsets, offsets_read, type; + uint32_t i, total_offsets, type; uint8_t *buf; int error; @@ -484,17 +497,15 @@ g_uncompress_taste(struct g_class *mp, s * Read cloop header, look for CLOOP magic, perform * other validity checks. */ - DPRINTF(("%s: media sectorsize %u, mediasize %lld\n", - gp->name, pp->sectorsize, pp->mediasize)); - + DPRINTF(("%s: media sectorsize %u, mediasize %jd\n", + gp->name, pp->sectorsize, (intmax_t)pp->mediasize)); i = roundup(sizeof(struct cloop_header), pp->sectorsize); buf = g_read_data(cp, 0, i, NULL); if (buf == NULL) goto err; - header = (struct cloop_header *) buf; if (strncmp(header->magic, CLOOP_MAGIC_START, - sizeof(CLOOP_MAGIC_START) - 1) != 0) { + sizeof(CLOOP_MAGIC_START) - 1) != 0) { DPRINTF(("%s: no CLOOP magic\n", gp->name)); goto err; } @@ -546,25 +557,20 @@ g_uncompress_taste(struct g_class *mp, s gp->name, sc->nblocks); goto err; } - sc->offsets = malloc( - total_offsets * sizeof(uint64_t), M_GEOM_UNCOMPRESS, M_WAITOK); - offsets_read = MIN(total_offsets, - (pp->sectorsize - sizeof(*header)) / sizeof(uint64_t)); - for (i = 0; i < offsets_read; i++) - sc->offsets[i] = be64toh(((uint64_t *) (header + 1))[i]); - DPRINTF(("%s: %u offsets in the first sector\n", - gp->name, offsets_read)); - free(buf, M_GEOM); + i = roundup((sizeof(struct cloop_header) + - total_offsets * sizeof(uint64_t)),pp->sectorsize); + total_offsets * sizeof(uint64_t)), pp->sectorsize); buf = g_read_data(cp, 0, i, NULL); if (buf == NULL) goto err; + sc->offsets = malloc(total_offsets * sizeof(uint64_t), + M_GEOM_UNCOMPRESS, M_WAITOK); for (i = 0; i <= total_offsets; i++) { sc->offsets[i] = be64toh(((uint64_t *) (buf+sizeof(struct cloop_header)))[i]); } + free(buf, M_GEOM); DPRINTF(("%s: done reading offsets\n", gp->name)); mtx_init(&sc->last_mtx, "geom_uncompress cache", NULL, MTX_DEF); sc->last_blk = -1; @@ -599,15 +605,13 @@ g_uncompress_taste(struct g_class *mp, s pp2->stripeoffset = pp->stripeoffset; } g_error_provider(pp2, 0); - free(buf, M_GEOM); g_access(cp, -1, 0, 0); - DPRINTF(("%s: taste ok (%d, %lld), (%d, %d), %x\n", + DPRINTF(("%s: taste ok (%d, %jd), (%d, %d), %x\n", gp->name, - pp2->sectorsize, pp2->mediasize, + pp2->sectorsize, (intmax_t)pp2->mediasize, pp2->stripeoffset, pp2->stripesize, pp2->flags)); - printf("%s: %u x %u blocks\n", - gp->name, sc->nblocks, sc->blksz); + printf("%s: %u x %u blocks\n", gp->name, sc->nblocks, sc->blksz); return (gp); err: @@ -622,6 +626,7 @@ err: g_detach(cp); g_destroy_consumer(cp); g_destroy_geom(gp); + return (NULL); } @@ -648,6 +653,7 @@ g_uncompress_destroy_geom(struct gctl_re g_uncompress_softc_free(gp->softc, gp); gp->softc = NULL; g_wither_geom(gp, ENXIO); + return (0); } @@ -664,4 +670,4 @@ static struct g_class g_uncompress_class }; DECLARE_GEOM_CLASS(g_uncompress_class, g_uncompress); - +MODULE_DEPEND(g_uncompress, zlib, 1, 1, 1); Modified: stable/10/sys/geom/uzip/g_uzip.c ============================================================================== --- stable/10/sys/geom/uzip/g_uzip.c Fri May 16 14:09:51 2014 (r266219) +++ stable/10/sys/geom/uzip/g_uzip.c Fri May 16 14:28:55 2014 (r266220) @@ -35,8 +35,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include +#include #include #include @@ -45,19 +45,19 @@ FEATURE(geom_uzip, "GEOM uzip read-only #undef GEOM_UZIP_DEBUG #ifdef GEOM_UZIP_DEBUG -#define DPRINTF(a) printf a +#define DPRINTF(a) printf a #else -#define DPRINTF(a) +#define DPRINTF(a) #endif static MALLOC_DEFINE(M_GEOM_UZIP, "geom_uzip", "GEOM UZIP data structures"); -#define UZIP_CLASS_NAME "UZIP" +#define UZIP_CLASS_NAME "UZIP" /* * Maximum allowed valid block size (to prevent foot-shooting) */ -#define MAX_BLKSZ (MAXPHYS - MAXPHYS / 1000 - 12) +#define MAX_BLKSZ (MAXPHYS - MAXPHYS / 1000 - 12) /* * Integer values (block size, number of blocks, offsets) @@ -65,7 +65,7 @@ static MALLOC_DEFINE(M_GEOM_UZIP, "geom_ * and in native order in struct g_uzip_softc */ -#define CLOOP_MAGIC_LEN 128 +#define CLOOP_MAGIC_LEN 128 static char CLOOP_MAGIC_START[] = "#!/bin/sh\n"; struct cloop_header { @@ -89,12 +89,15 @@ struct g_uzip_softc { static void g_uzip_softc_free(struct g_uzip_softc *sc, struct g_geom *gp) { + if (gp != NULL) { printf("%s: %d requests, %d cached\n", gp->name, sc->req_total, sc->req_cached); } - if (sc->offsets != NULL) + if (sc->offsets != NULL) { free(sc->offsets, M_GEOM_UZIP); + sc->offsets = NULL; + } mtx_destroy(&sc->last_mtx); free(sc->last_buf, M_GEOM_UZIP); free(sc, M_GEOM_UZIP); @@ -106,12 +109,14 @@ z_alloc(void *nil, u_int type, u_int siz void *ptr; ptr = malloc(type * size, M_GEOM_UZIP, M_NOWAIT); - return ptr; + + return (ptr); } static void z_free(void *nil, void *ptr) { + free(ptr, M_GEOM_UZIP); } @@ -125,7 +130,7 @@ g_uzip_done(struct bio *bp) struct g_consumer *cp; struct g_geom *gp; struct g_uzip_softc *sc; - off_t pos, upos; + off_t iolen, pos, upos; uint32_t start_blk, i; size_t bsize; @@ -153,11 +158,13 @@ g_uzip_done(struct bio *bp) } start_blk = bp2->bio_offset / sc->blksz; bsize = pp2->sectorsize; + iolen = bp->bio_completed; pos = sc->offsets[start_blk] % bsize; upos = 0; - DPRINTF(("%s: done: start_blk %d, pos %lld, upos %lld (%lld, %d, %d)\n", - gp->name, start_blk, pos, upos, - bp2->bio_offset, sc->blksz, bsize)); + DPRINTF(("%s: done: start_blk %d, pos %jd, upos %jd, iolen %jd " + "(%jd, %d, %zd)\n", + gp->name, start_blk, (intmax_t)pos, (intmax_t)upos, + (intmax_t)iolen, (intmax_t)bp2->bio_offset, sc->blksz, bsize)); for (i = start_blk; upos < bp2->bio_length; i++) { off_t len, ulen, uoff; @@ -172,6 +179,12 @@ g_uzip_done(struct bio *bp) bp2->bio_completed += ulen; continue; } + if (len > iolen) { + DPRINTF(("%s: done: early termination: len (%jd) > " + "iolen (%jd)\n", + gp->name, (intmax_t)len, (intmax_t)iolen)); + break; + } zs.next_in = bp->bio_data + pos; zs.avail_in = len; zs.next_out = sc->last_buf; @@ -181,21 +194,22 @@ g_uzip_done(struct bio *bp) if (err != Z_STREAM_END) { sc->last_blk = -1; mtx_unlock(&sc->last_mtx); - DPRINTF(("%s: done: inflate failed (%lld + %lld -> %lld + %lld + %lld)\n", - gp->name, pos, len, uoff, upos, ulen)); + DPRINTF(("%s: done: inflate failed (%jd + %jd -> %jd + %jd + %jd)\n", + gp->name, (intmax_t)pos, (intmax_t)len, + (intmax_t)uoff, (intmax_t)upos, (intmax_t)ulen)); inflateEnd(&zs); bp2->bio_error = EIO; goto done; } sc->last_blk = i; - DPRINTF(("%s: done: inflated %lld + %lld -> %lld + %lld + %lld\n", - gp->name, - pos, len, - uoff, upos, ulen)); + DPRINTF(("%s: done: inflated %jd + %jd -> %jd + %jd + %jd\n", + gp->name, (intmax_t)pos, (intmax_t)len, (intmax_t)uoff, + (intmax_t)upos, (intmax_t)ulen)); memcpy(bp2->bio_data + upos, sc->last_buf + uoff, ulen); mtx_unlock(&sc->last_mtx); pos += len; + iolen -= len; upos += ulen; bp2->bio_completed += ulen; err = inflateReset(&zs); @@ -215,8 +229,9 @@ done: /* * Finish processing the request. */ - DPRINTF(("%s: done: (%d, %lld, %ld)\n", - gp->name, bp2->bio_error, bp2->bio_completed, bp2->bio_resid)); + DPRINTF(("%s: done: (%d, %jd, %ld)\n", + gp->name, bp2->bio_error, (intmax_t)bp2->bio_completed, + bp2->bio_resid)); free(bp->bio_data, M_GEOM_UZIP); g_destroy_bio(bp); g_io_deliver(bp2, bp2->bio_error); @@ -248,10 +263,8 @@ g_uzip_start(struct bio *bp) start_blk = bp->bio_offset / sc->blksz; end_blk = (bp->bio_offset + bp->bio_length + sc->blksz - 1) / sc->blksz; - KASSERT(start_blk < sc->nblocks, - ("start_blk out of range")); - KASSERT(end_blk <= sc->nblocks, - ("end_blk out of range")); + KASSERT(start_blk < sc->nblocks, ("start_blk out of range")); + KASSERT(end_blk <= sc->nblocks, ("end_blk out of range")); sc->req_total++; if (start_blk + 1 == end_blk) { @@ -267,8 +280,9 @@ g_uzip_start(struct bio *bp) sc->req_cached++; mtx_unlock(&sc->last_mtx); - DPRINTF(("%s: start: cached 0 + %lld, %lld + 0 + %lld\n", - gp->name, bp->bio_length, uoff, bp->bio_length)); + DPRINTF(("%s: start: cached 0 + %jd, %jd + 0 + %jd\n", + gp->name, (intmax_t)bp->bio_length, (intmax_t)uoff, + (intmax_t)bp->bio_length)); bp->bio_completed = bp->bio_length; g_io_deliver(bp, 0); return; @@ -282,19 +296,28 @@ g_uzip_start(struct bio *bp) return; } bp2->bio_done = g_uzip_done; - DPRINTF(("%s: start (%d..%d), %s: %d + %lld, %s: %d + %lld\n", + DPRINTF(("%s: start (%d..%d), %s: %d + %jd, %s: %d + %jd\n", gp->name, start_blk, end_blk, - pp->name, pp->sectorsize, pp->mediasize, - pp2->name, pp2->sectorsize, pp2->mediasize)); + pp->name, pp->sectorsize, (intmax_t)pp->mediasize, + pp2->name, pp2->sectorsize, (intmax_t)pp2->mediasize)); bsize = pp2->sectorsize; bp2->bio_offset = sc->offsets[start_blk] - sc->offsets[start_blk] % bsize; - bp2->bio_length = sc->offsets[end_blk] - bp2->bio_offset; - bp2->bio_length = (bp2->bio_length + bsize - 1) / bsize * bsize; - DPRINTF(("%s: start %lld + %lld -> %lld + %lld -> %lld + %lld\n", + while (1) { + bp2->bio_length = sc->offsets[end_blk] - bp2->bio_offset; + bp2->bio_length = (bp2->bio_length + bsize - 1) / bsize * bsize; + if (bp2->bio_length < MAXPHYS) + break; + + end_blk--; + DPRINTF(("%s: bio_length (%jd) > MAXPHYS: lowering end_blk " + "to %u\n", gp->name, (intmax_t)bp2->bio_length, end_blk)); + } + DPRINTF(("%s: start %jd + %jd -> %ju + %ju -> %jd + %jd\n", gp->name, - bp->bio_offset, bp->bio_length, - sc->offsets[start_blk], sc->offsets[end_blk] - sc->offsets[start_blk], - bp2->bio_offset, bp2->bio_length)); + (intmax_t)bp->bio_offset, (intmax_t)bp->bio_length, + (uintmax_t)sc->offsets[start_blk], + (uintmax_t)sc->offsets[end_blk] - sc->offsets[start_blk], + (intmax_t)bp2->bio_offset, (intmax_t)bp2->bio_length)); bp2->bio_data = malloc(bp2->bio_length, M_GEOM_UZIP, M_NOWAIT); if (bp2->bio_data == NULL) { g_destroy_bio(bp2); @@ -311,7 +334,7 @@ g_uzip_orphan(struct g_consumer *cp) { struct g_geom *gp; - g_trace(G_T_TOPOLOGY, "g_uzip_orphan(%p/%s)", cp, cp->provider->name); + g_trace(G_T_TOPOLOGY, "%s(%p/%s)", __func__, cp, cp->provider->name); g_topology_assert(); gp = cp->geom; @@ -331,7 +354,7 @@ g_uzip_access(struct g_provider *pp, int KASSERT (cp != NULL, ("g_uzip_access but no consumer")); if (cp->acw + dw > 0) - return EROFS; + return (EROFS); return (g_access(cp, dr, dw, de)); } @@ -342,7 +365,7 @@ g_uzip_spoiled(struct g_consumer *cp) struct g_geom *gp; gp = cp->geom; - g_trace(G_T_TOPOLOGY, "g_uzip_spoiled(%p/%s)", cp, gp->name); + g_trace(G_T_TOPOLOGY, "%s(%p/%s)", __func__, cp, gp->name); g_topology_assert(); g_uzip_softc_free(gp->softc, gp); @@ -362,7 +385,7 @@ g_uzip_taste(struct g_class *mp, struct struct g_provider *pp2; struct g_uzip_softc *sc; - g_trace(G_T_TOPOLOGY, "g_uzip_taste(%s,%s)", mp->name, pp->name); + g_trace(G_T_TOPOLOGY, "%s(%s,%s)", __func__, mp->name, pp->name); g_topology_assert(); /* Skip providers that are already open for writing. */ @@ -391,14 +414,14 @@ g_uzip_taste(struct g_class *mp, struct * Read cloop header, look for CLOOP magic, perform * other validity checks. */ - DPRINTF(("%s: media sectorsize %u, mediasize %lld\n", - gp->name, pp->sectorsize, pp->mediasize)); + DPRINTF(("%s: media sectorsize %u, mediasize %jd\n", + gp->name, pp->sectorsize, (intmax_t)pp->mediasize)); buf = g_read_data(cp, 0, pp->sectorsize, NULL); if (buf == NULL) goto err; header = (struct cloop_header *) buf; if (strncmp(header->magic, CLOOP_MAGIC_START, - sizeof(CLOOP_MAGIC_START) - 1) != 0) { + sizeof(CLOOP_MAGIC_START) - 1) != 0) { DPRINTF(("%s: no CLOOP magic\n", gp->name)); goto err; } @@ -427,7 +450,7 @@ g_uzip_taste(struct g_class *mp, struct if (sizeof(struct cloop_header) + total_offsets * sizeof(uint64_t) > pp->mediasize) { printf("%s: media too small for %u blocks\n", - gp->name, sc->nblocks); + gp->name, sc->nblocks); goto err; } sc->offsets = malloc( @@ -456,6 +479,7 @@ g_uzip_taste(struct g_class *mp, struct } offsets_read += nread; } + free(buf, M_GEOM); DPRINTF(("%s: done reading offsets\n", gp->name)); mtx_init(&sc->last_mtx, "geom_uzip cache", NULL, MTX_DEF); sc->last_blk = -1; @@ -467,17 +491,16 @@ g_uzip_taste(struct g_class *mp, struct pp2 = g_new_providerf(gp, "%s", gp->name); pp2->sectorsize = 512; pp2->mediasize = (off_t)sc->nblocks * sc->blksz; - pp2->stripesize = pp->stripesize; - pp2->stripeoffset = pp->stripeoffset; + pp2->stripesize = pp->stripesize; + pp2->stripeoffset = pp->stripeoffset; g_error_provider(pp2, 0); g_access(cp, -1, 0, 0); - DPRINTF(("%s: taste ok (%d, %lld), (%d, %d), %x\n", + DPRINTF(("%s: taste ok (%d, %jd), (%d, %d), %x\n", gp->name, - pp2->sectorsize, pp2->mediasize, + pp2->sectorsize, (intmax_t)pp2->mediasize, pp2->stripeoffset, pp2->stripesize, pp2->flags)); - printf("%s: %u x %u blocks\n", - gp->name, sc->nblocks, sc->blksz); + printf("%s: %u x %u blocks\n", gp->name, sc->nblocks, sc->blksz); return (gp); err: @@ -492,6 +515,7 @@ err: g_detach(cp); g_destroy_consumer(cp); g_destroy_geom(gp); + return (NULL); } @@ -500,7 +524,7 @@ g_uzip_destroy_geom(struct gctl_req *req { struct g_provider *pp; - g_trace(G_T_TOPOLOGY, "g_uzip_destroy_geom(%s, %s)", mp->name, gp->name); + g_trace(G_T_TOPOLOGY, "%s(%s, %s)", __func__, mp->name, gp->name); g_topology_assert(); if (gp->softc == NULL) { @@ -517,6 +541,7 @@ g_uzip_destroy_geom(struct gctl_req *req g_uzip_softc_free(gp->softc, gp); gp->softc = NULL; g_wither_geom(gp, ENXIO); + return (0); } Modified: stable/10/sys/modules/geom/Makefile ============================================================================== --- stable/10/sys/modules/geom/Makefile Fri May 16 14:09:51 2014 (r266219) +++ stable/10/sys/modules/geom/Makefile Fri May 16 14:28:55 2014 (r266220) @@ -24,6 +24,7 @@ SUBDIR= geom_bde \ geom_shsec \ geom_stripe \ geom_sunlabel \ + geom_uncompress \ geom_uzip \ geom_vinum \ geom_virstor \ Modified: stable/10/sys/modules/geom/geom_uncompress/Makefile ============================================================================== --- stable/10/sys/modules/geom/geom_uncompress/Makefile Fri May 16 14:09:51 2014 (r266219) +++ stable/10/sys/modules/geom/geom_uncompress/Makefile Fri May 16 14:28:55 2014 (r266220) @@ -7,11 +7,11 @@ ${.CURDIR}/../../../net KMOD= geom_uncompress -CFLAGS= -I${.CURDIR}/../../../geom/uncompress/ \ +CFLAGS+= -I${.CURDIR}/../../../geom/uncompress/ \ -I${.CURDIR}/../../../contrib/xz-embedded/freebsd \ -I${.CURDIR}/../../../contrib/xz-embedded/linux/lib/xz/ SRCS= g_uncompress.c xz_crc32.c xz_dec_bcj.c xz_dec_lzma2.c xz_dec_stream.c \ - xz_malloc.c zlib.c + xz_malloc.c SRCS+= xz.h xz_config.h xz_lzma2.h xz_malloc.h xz_private.h xz_stream.h zlib.h .include From owner-svn-src-stable@FreeBSD.ORG Fri May 16 15:34:23 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D2904F1E; Fri, 16 May 2014 15:34:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A63882B73; Fri, 16 May 2014 15:34:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4GFYNRs006874; Fri, 16 May 2014 15:34:23 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4GFYNGR006873; Fri, 16 May 2014 15:34:23 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405161534.s4GFYNGR006873@svn.freebsd.org> From: Ian Lepore Date: Fri, 16 May 2014 15:34:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266239 - stable/10/sys/boot/fdt/dts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 15:34:23 -0000 Author: ian Date: Fri May 16 15:34:23 2014 New Revision: 266239 URL: http://svnweb.freebsd.org/changeset/base/266239 Log: MFC 258547, 259122 Add clock frequency for rk3188 watchdog. Replace "clocks" to "clock-frequency". Add gpio config for usb1 in dts. Modified: stable/10/sys/boot/fdt/dts/rk3188.dtsi Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/fdt/dts/rk3188.dtsi ============================================================================== --- stable/10/sys/boot/fdt/dts/rk3188.dtsi Fri May 16 15:32:16 2014 (r266238) +++ stable/10/sys/boot/fdt/dts/rk3188.dtsi Fri May 16 15:34:23 2014 (r266239) @@ -80,7 +80,7 @@ compatible = "rockchip,rk3188-dw-apb-timer-osc"; reg = <0x20038000 0x20>; interrupts = <76>; - clocks = <24000000>; + clock-frequency = <24000000>; status = "disabled"; }; @@ -88,7 +88,7 @@ compatible = "rockchip,rk30xx-timer"; reg = <0x20038020 0x20>; interrupts = <77>; - clocks = <24000000>; + clock-frequency = <24000000>; status = "disabled"; }; @@ -96,7 +96,7 @@ compatible = "rockchip,rk30xx-timer"; reg = <0x20038060 0x20>; interrupts = <91>; - clocks = <24000000>; + clock-frequency = <24000000>; status = "disabled"; }; @@ -104,7 +104,7 @@ compatible = "rockchip,rk30xx-timer"; reg = <0x20038080 0x20>; interrupts = <92>; - clocks = <24000000>; + clock-frequency = <24000000>; status = "disabled"; }; @@ -112,13 +112,14 @@ compatible = "rockchip,rk30xx-timer"; reg = <0x200380a0 0x20>; interrupts = <96>; - clocks = <24000000>; + clock-frequency = <24000000>; status = "disabled"; }; watchdog@2004c000 { compatible = "rockchip,rk30xx-wdt"; reg = <0x2004c000 0x100>; + clock-frequency = < 66000000 >; }; gpio0: gpio@2000a000 { @@ -173,6 +174,7 @@ interrupt-parent = <&GIC>; #address-cells = <1>; #size-cells = <0>; + gpios = <&gpio0 3 2 2>; }; uart0: serial@10124000 { @@ -233,7 +235,7 @@ interrupts = <55>; #address-cells = <1>; #size-cells = <0>; - clocks = <24000000>; /* TODO: verify freq */ + clock-frequency = <24000000>; /* TODO: verify freq */ status = "disabled"; }; @@ -243,7 +245,7 @@ interrupts = <56>; #address-cells = <1>; #size-cells = <0>; - clocks = <24000000>; /* TODO: verify freq */ + clock-frequency = <24000000>; /* TODO: verify freq */ status = "disabled"; }; }; From owner-svn-src-stable@FreeBSD.ORG Fri May 16 15:39:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1C6DD15C; Fri, 16 May 2014 15:39:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 095342BC1; Fri, 16 May 2014 15:39:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4GFdB3u007531; Fri, 16 May 2014 15:39:11 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4GFdBZ6007530; Fri, 16 May 2014 15:39:11 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405161539.s4GFdBZ6007530@svn.freebsd.org> From: Ian Lepore Date: Fri, 16 May 2014 15:39:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266240 - stable/10/sys/boot/fdt/dts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 15:39:12 -0000 Author: ian Date: Fri May 16 15:39:11 2014 New Revision: 266240 URL: http://svnweb.freebsd.org/changeset/base/266240 Log: MFC 252439: Fix the led 'gpios' definition to match the documented binding Modified: stable/10/sys/boot/fdt/dts/rpi.dts Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/fdt/dts/rpi.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/rpi.dts Fri May 16 15:34:23 2014 (r266239) +++ stable/10/sys/boot/fdt/dts/rpi.dts Fri May 16 15:39:11 2014 (r266240) @@ -316,7 +316,7 @@ ok { label = "ok"; - gpios = <&gpio 16 1>; + gpios = <&gpio 16 2 0>; /* Don't change this - it configures * how the led driver determines if From owner-svn-src-stable@FreeBSD.ORG Fri May 16 15:46:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3E5C35B6; Fri, 16 May 2014 15:46:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F0492C97; Fri, 16 May 2014 15:46:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4GFkTtY013264; Fri, 16 May 2014 15:46:29 GMT (envelope-from ambrisko@svn.freebsd.org) Received: (from ambrisko@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4GFkTq7013260; Fri, 16 May 2014 15:46:29 GMT (envelope-from ambrisko@svn.freebsd.org) Message-Id: <201405161546.s4GFkTq7013260@svn.freebsd.org> From: Doug Ambrisko Date: Fri, 16 May 2014 15:46:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266242 - in stable/9: share/man/man4 sys/conf sys/dev/mrsas sys/modules sys/modules/mrsas X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 15:46:30 -0000 Author: ambrisko Date: Fri May 16 15:46:28 2014 New Revision: 266242 URL: http://svnweb.freebsd.org/changeset/base/266242 Log: MFC 265555/MFS 265922 dd mrsas(4) driver from LSI official support of newer MegaRAID SAS cards. LSI has been maintaining this driver outside of the FreeBSD tree. It overlaps support of ThunderBolt and Invader cards that mfi(4) supports. By default mfi(4) will attach to cards. If the tunable: hw.mfi.mrsas_enable=1 is set then mfi(4) will not probe and attach to these newer cards and allow mrsas(4) to attach. So by default this driver will not effect a FreeBSD system unless mfi(4) is removed from the kernel or the tunable is enabled. mrsas(4) attaches disks to the CAM layer so it depends on CAM and devices show up as /dev/daX. mfiutil(8) does not work with mrsas. The FreeBSD version of MegaCli and StorCli from LSI do work with mrsas. It appears that StorCli only works with mrsas. MegaCli appears to work with mfi(4) and mrsas(4). It would be good to add mfiutil(4) support to mrsas, emulations modes, kernel logging, device aliases to ease the transition between mfi(4) and mrsas(4). Style issues should be resolved by LSI when they get committers approved. The plan is get this driver in FreeBSD 9.3 to improve HW support. Thanks to LSI for developing, testing and working with FreeBSD to make this driver co-exist in FreeBSD. This improves the overall support of MegaRAID SAS. Submitted by: Kashyap Desai Sponsored by: LSI Added: stable/9/share/man/man4/mrsas.4 - copied unchanged from r265922, stable/10/share/man/man4/mrsas.4 stable/9/sys/dev/mrsas/ - copied from r265922, stable/10/sys/dev/mrsas/ stable/9/sys/modules/mrsas/ - copied from r265922, stable/10/sys/modules/mrsas/ Modified: stable/9/share/man/man4/Makefile stable/9/sys/conf/files stable/9/sys/modules/Makefile Directory Properties: stable/9/ (props changed) stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man4/ (props changed) stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/share/man/man4/Makefile ============================================================================== --- stable/9/share/man/man4/Makefile Fri May 16 15:41:55 2014 (r266241) +++ stable/9/share/man/man4/Makefile Fri May 16 15:46:28 2014 (r266242) @@ -249,6 +249,7 @@ MAN= aac.4 \ mpr.4 \ mps.4 \ mpt.4 \ + mrsas.4 \ msk.4 \ mtio.4 \ multicast.4 \ Copied: stable/9/share/man/man4/mrsas.4 (from r265922, stable/10/share/man/man4/mrsas.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/share/man/man4/mrsas.4 Fri May 16 15:46:28 2014 (r266242, copy of r265922, stable/10/share/man/man4/mrsas.4) @@ -0,0 +1,374 @@ +.\" Copyright (c) 2014 LSI Corp +.\" All rights reserved. +.\" Author: Kashyap Desai +.\" Support: freebsdraid@lsi.com +.\" +.\" 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. +.\" 3. Neither the name of the nor the names of its +.\" contributors may be used to endorse or promote products derived +.\" from this software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 +.\" COPYRIGHT HOLDER 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. + +.\" The views and conclusions contained in the software and documentation +.\" are those of the authors and should not be interpreted as representing +.\" official policies,either expressed or implied, of the FreeBSD Project +.\" +.\" $FreeBSD$ +.\" + + +.Dd Apr 12, 2013 +.Dt MRSAS 4 +.Os +.Sh NAME +.Nm mrsas +.Nd "LSI MegaRAID 6Gb/s and 12Gb/s SAS+SATA Raid controller driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device pci" +.Cd "device mrsas" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +mrsas_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver will detect LSI's next generation (6Gb/s and 12Gb/s) PCI Express +SAS/SATA RAID controllers. +See the +.Nm HARDWARE +section for the supported devices list. +A disk (virtual disk/physical disk) attached to the +.Nm +driver will be visible to the user through +.Xr camcontrol 8 as +.Pa /dev/da? +device nodes. +A simple management interface is also provided on a per-controller basis via the +.Pa /dev/mrsas? +device node. +.Pp +The +.Nm +name is derived from the phrase "MegaRAID SAS HBA", which is +substantially different than the old "MegaRAID" Driver +.Xr mfi 4 +which does not connect targets +to the +.Xr cam 4 +layer and thus requires a new driver which attaches targets to the +.Xr cam 4 +layer. Older MegaRAID controllers are supported by +.Xr mfi 4 +and will not work with +.Nm , +but both the +.Xr mfi 4 +and +.Nm +drivers can detect and manage the LSI MegaRAID SAS 2208/2308/3008/3108 series of +controllers. +.Pp +The +.Nm device.hints +option is provided to tune the +.Nm +driver's behavior for LSI MegaRAID SAS 2208/2308/3008/3108 controllers. +By default, the +.Xr mfi 4 +driver will detect these controllers. See the +.Nm PRIORITY +section to know more about driver priority for MR-Fusion devices. +.Pp +.Nm +will provide a priority of (-30) (between BUS_PROBE_DEFAULT and +BUS_PROBE_LOW_PRIORITY) at probe call for device id's 0x005B, 0x005D, and +0x005F so that +.Nm +does not take control of these devices without user intervention. +.Sh HARDWARE +The +.Nm +driver supports the following hardware: +.Pp +.Bl -bullet -compact +[ Thunderbolt 6Gbp/s MR controller ] +.It +LSI MegaRAID SAS 9265 +.It +LSI MegaRAID SAS 9266 +.It +LSI MegaRAID SAS 9267 +.It +LSI MegaRAID SAS 9270 +.It +LSI MegaRAID SAS 9271 +.It +LSI MegaRAID SAS 9272 +.It +LSI MegaRAID SAS 9285 +.It +LSI MegaRAID SAS 9286 +.It +DELL PERC H810 +.It +DELL PERC H710/P +.El +.Pp +.Bl -bullet -compact +[ Invader/Fury 12Gpb/s MR controller ] +.It +LSI MegaRAID SAS 9380 +.It +LSI MegaRAID SAS 9361 +.It +LSI MegaRAID SAS 9341 +.It +DELL PERC H830 +.It +DELL PERC H730/P +.It +DELL PERC H330 +.El +.Sh CONFIGURATION +To disable Online Controller Reset(OCR) for a specific +.Nm +driver instance, set the +following tunable value in +.Xr loader.conf 5 : +.Bd -literal -offset indent +dev.mrsas.X.disable_ocr=1 +.Ed +.Pp +where X is the adapter number. +.Pp +To change the IO timeout value for a specific +.Nm +driver instance, set the following tunable value in +.Xr loader.conf 5 : +.Bd -literal -offset indent +dev.mrsas.X.mrsas_io_timeout=NNNNNN +.Ed +.Pp +where NNNNNN is the timeout value in milli-seconds. +.Pp +To change the firmware fault check timer value for a specific +.Nm +driver instance, set the following tunable value in +.Xr loader.conf 5 : +.Bd -literal -offset indent +dev.mrsas.X.mrsas_fw_fault_check_delay=NN +.Ed +.Pp +where NN is the fault check delay value in seconds. +.Pp +The current number of active I/O commands is shown in the +dev.mrsas.X.fw_outstanding +.Xr sysctl 8 +variable. +.Sh DEBUGGING +To enable debugging prints from the +.Nm +driver, set the +.Bd -literal -offset indent +hw.mrsas.X.debug_level +.Ed +.Pp +variable, where X is the adapter number, either in +.Xr loader.conf 5 +or via +.Xr sysctl 8 . +The following bits have the described effects: +.Bl -tag -offset indent +.It 0x01 +Enable informational prints. +.It 0x02 +Enable tracing prints. +.It 0x04 +Enable prints for driver faults. +.It 0x08 +Enable prints for OCR and IO timeout. +.It 0x10 +Enable prints for AEN events. +.El +.Sh PRIORITY +The +.Nm +driver will always set a default (-30) priority in the pci subsystem for +selection of MR-Fusion cards. (It is between BUS_PROBE_DEFAULT and +BUS_PROBE_LOW_PRIORITY). MR-Fusion Controllers include all cards with the +Device IDs - +0x005B, +0x005D, +0x005F. +.Pp +The +.Xr mfi 4 +driver will set a priority of either BUS_PROBE_DEFAULT or +BUS_PROBE_LOW_PRIORITY (depending on the device.hint setting) in the pci +subsystem for selection of MR-Fusion cards. With the above design in place, the +.Xr mfi 4 +driver will attach to a MR-Fusion card given that it has a higher priority than +.Nm . +.Pp +Using /boot/device.hints (as mentioned below), the user can provide a preference +for the +.Nm +driver to detect a MR-Fusion card instead of the +.Xr mfi 4 +driver. +.Bd -ragged -offset indent +.Cd hw.mfi.mrsas_enable="1" +.Ed +.Pp +At boot time, the +.Xr mfi 4 +driver will get priority to detect MR-Fusion controllers by default. Before +changing this default driver selection policy, LSI advises users to understand +how the driver selection policy works. LSI's policy is to provide priority to +the +.Xr mfi 4 +driver to detect MR-Fusion cards, but allow for the ability to choose the +.Nm +driver to detect MR-Fusion cards. +.Pp +LSI recommends setting hw.mfi.mrsas_enable="0" for customers who are using the +older +.Xr mfi 4 +driver and do not want to switch to +.Nm . +For those customers who are using a MR-Fusion controller for the first time, LSI +recommends using the +.Nm +driver and setting hw.mfi.mrsas_enable="1". +.Pp +Changing the default behavior is well tested under most conditions, but +unexpected behavior may pop up if more complex and unrealistic operations are +executed by switching between the +.Xr mfi 4 and +.Nm +drivers for MR-Fusion. +Switching drivers is designed to happen only one time. Although multiple +switching is possible, it is not recommended. The user should decide from +.Nm Start of Day +which driver they want to use for the MR-Fusion card. +.Pp +The user may see different device names when switching from +.Xr mfi 4 +to +.Nm . +This behavior is +.Nm Functions As Designed +and the user needs to change the fstab +entry manually if they are doing any experiments with +.Xr mfi 4 +and +.Nm +interoperability. +.Sh FILES +.Bl -tag -width ".Pa /dev/mrsas?" -compact +.It /dev/da? +array/logical disk interface +.It /dev/mrsas? +management interface +.El +.Sh SEE ALSO +.Xr pci 4 , +.Xr mfi 4 , +.Xr cam 4 , +.Xr device.hints 5 , +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 10.0 . +.Bd -ragged +.Cd "mfi Driver:" +.Xr mfi 4 +is the old FreeBSD driver which started with support for Gen-1 Controllers and +was extended to support up to MR-Fusion (Device ID = 0x005B, 0x005D, 0x005F). +.Ed +.Bd -ragged +.Cd "mrsas Driver:" +.Nm +is the new driver reworked by LSI which supports Thunderbolt and onward +products. The SAS+SATA RAID controller with device id 0x005b is referred to as +the Thunderbolt controller throughout in this man page. +.Ed +.Bd -ragged +.Nm cam aware HBA drivers: +FreeBSD has a +.Xr cam 4 +layer which attaches storage devices and provides a common access mechanism to +storage controllers and attached devices. The +.Nm +driver is +.Xr cam 4 aware and devices associated with +.Nm +can be seen using +.Xr camcontrol 8 . +The +.Xr mfi 4 +driver does not understand the +.Xr cam 4 +layer and it directly associates storage disks to the block layer. +.Pp +.Nm Thunderbolt Controller: +This is the 6Gb/s MegaRAID HBA card which has device id 0x005B. +.Pp +.Nm Invader Controller: +This is 12Gb/s MegaRAID HBA card which has device id 0x005D. +.Pp +.Nm Fury Controller: +This is the 12Gb/s MegaRAID HBA card which has device id 0x005F. +.Ed +.Sh AUTHORS +The +.Nm +driver and this manual page were written by +.An Kashyap Desai Aq Kashyap.Desai@lsi.com . +.Sh TODO +The driver does not support big-endian architectures at this time. +.Pp +The driver does not support alias for device name (it is required when the user +switches between two drivers and does not want to edit /etc/fstab manually). +.Pp +The +.Nm +driver exposes devices as /dev/da?, whereas +.Xr mfi 4 +exposes deivces as /dev/mfid? +.Pp +.Nm +does not support the Linux Emulator interface. +.Pp +.Nm +will not work with +.Xr mfiutil 8 Modified: stable/9/sys/conf/files ============================================================================== --- stable/9/sys/conf/files Fri May 16 15:41:55 2014 (r266241) +++ stable/9/sys/conf/files Fri May 16 15:46:28 2014 (r266242) @@ -1571,6 +1571,10 @@ dev/mpt/mpt_debug.c optional mpt dev/mpt/mpt_pci.c optional mpt pci dev/mpt/mpt_raid.c optional mpt dev/mpt/mpt_user.c optional mpt +dev/mrsas/mrsas.c optional mrsas +dev/mrsas/mrsas_cam.c optional mrsas +dev/mrsas/mrsas_ioctl.c optional mrsas +dev/mrsas/mrsas_fp.c optional mrsas dev/msk/if_msk.c optional msk dev/mvs/mvs.c optional mvs dev/mvs/mvs_if.m optional mvs Modified: stable/9/sys/modules/Makefile ============================================================================== --- stable/9/sys/modules/Makefile Fri May 16 15:41:55 2014 (r266241) +++ stable/9/sys/modules/Makefile Fri May 16 15:46:28 2014 (r266242) @@ -213,6 +213,7 @@ SUBDIR= \ mps \ mpt \ mqueue \ + mrsas \ msdosfs \ msdosfs_iconv \ ${_mse} \ From owner-svn-src-stable@FreeBSD.ORG Fri May 16 15:48:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E4E2B71E; Fri, 16 May 2014 15:48:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D16F92CB0; Fri, 16 May 2014 15:48:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4GFmjPb013660; Fri, 16 May 2014 15:48:45 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4GFmjY0013656; Fri, 16 May 2014 15:48:45 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201405161548.s4GFmjY0013656@svn.freebsd.org> From: Christian Brueffer Date: Fri, 16 May 2014 15:48:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266243 - in stable/10: lib/libc/rpc sys/rpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 15:48:46 -0000 Author: brueffer Date: Fri May 16 15:48:45 2014 New Revision: 266243 URL: http://svnweb.freebsd.org/changeset/base/266243 Log: MFC: r265238, r265240 Properly free resources in case of error. CID: 1007032 Found with: Coverity Prevent(tm) Modified: stable/10/lib/libc/rpc/clnt_vc.c stable/10/sys/rpc/clnt_vc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/rpc/clnt_vc.c ============================================================================== --- stable/10/lib/libc/rpc/clnt_vc.c Fri May 16 15:46:28 2014 (r266242) +++ stable/10/lib/libc/rpc/clnt_vc.c Fri May 16 15:48:45 2014 (r266243) @@ -301,15 +301,13 @@ clnt_vc_create(fd, raddr, prog, vers, se return (cl); err: - if (cl) { - if (ct) { - if (ct->ct_addr.len) - mem_free(ct->ct_addr.buf, ct->ct_addr.len); - mem_free(ct, sizeof (struct ct_data)); - } - if (cl) - mem_free(cl, sizeof (CLIENT)); + if (ct) { + if (ct->ct_addr.len) + mem_free(ct->ct_addr.buf, ct->ct_addr.len); + mem_free(ct, sizeof (struct ct_data)); } + if (cl) + mem_free(cl, sizeof (CLIENT)); return ((CLIENT *)NULL); } Modified: stable/10/sys/rpc/clnt_vc.c ============================================================================== --- stable/10/sys/rpc/clnt_vc.c Fri May 16 15:46:28 2014 (r266242) +++ stable/10/sys/rpc/clnt_vc.c Fri May 16 15:48:45 2014 (r266243) @@ -270,14 +270,12 @@ clnt_vc_create( return (cl); err: - if (cl) { - if (ct) { - mtx_destroy(&ct->ct_lock); - mem_free(ct, sizeof (struct ct_data)); - } - if (cl) - mem_free(cl, sizeof (CLIENT)); + if (ct) { + mtx_destroy(&ct->ct_lock); + mem_free(ct, sizeof (struct ct_data)); } + if (cl) + mem_free(cl, sizeof (CLIENT)); return ((CLIENT *)NULL); } From owner-svn-src-stable@FreeBSD.ORG Fri May 16 15:51:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7BFE9BEE; Fri, 16 May 2014 15:51:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 692172D60; Fri, 16 May 2014 15:51:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4GFpctw018492; Fri, 16 May 2014 15:51:38 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4GFpccd018491; Fri, 16 May 2014 15:51:38 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201405161551.s4GFpccd018491@svn.freebsd.org> From: Christian Brueffer Date: Fri, 16 May 2014 15:51:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266245 - stable/9/lib/libc/rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 15:51:38 -0000 Author: brueffer Date: Fri May 16 15:51:37 2014 New Revision: 266245 URL: http://svnweb.freebsd.org/changeset/base/266245 Log: MFC: r265238 Properly free resources in case of error. CID: 1007032 Found with: Coverity Prevent(tm) Modified: stable/9/lib/libc/rpc/clnt_vc.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/rpc/clnt_vc.c ============================================================================== --- stable/9/lib/libc/rpc/clnt_vc.c Fri May 16 15:50:21 2014 (r266244) +++ stable/9/lib/libc/rpc/clnt_vc.c Fri May 16 15:51:37 2014 (r266245) @@ -301,15 +301,13 @@ clnt_vc_create(fd, raddr, prog, vers, se return (cl); err: - if (cl) { - if (ct) { - if (ct->ct_addr.len) - mem_free(ct->ct_addr.buf, ct->ct_addr.len); - mem_free(ct, sizeof (struct ct_data)); - } - if (cl) - mem_free(cl, sizeof (CLIENT)); + if (ct) { + if (ct->ct_addr.len) + mem_free(ct->ct_addr.buf, ct->ct_addr.len); + mem_free(ct, sizeof (struct ct_data)); } + if (cl) + mem_free(cl, sizeof (CLIENT)); return ((CLIENT *)NULL); } From owner-svn-src-stable@FreeBSD.ORG Fri May 16 15:53:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BFEFFEBE; Fri, 16 May 2014 15:53:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACCB52D94; Fri, 16 May 2014 15:53:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4GFrRc3019270; Fri, 16 May 2014 15:53:27 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4GFrR10019268; Fri, 16 May 2014 15:53:27 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201405161553.s4GFrR10019268@svn.freebsd.org> From: Christian Brueffer Date: Fri, 16 May 2014 15:53:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266247 - stable/9/sys/rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 15:53:27 -0000 Author: brueffer Date: Fri May 16 15:53:27 2014 New Revision: 266247 URL: http://svnweb.freebsd.org/changeset/base/266247 Log: MFC: r265240 Properly free resources in case of error. CID: 1007032 Found with: Coverity Prevent(tm) Modified: stable/9/sys/rpc/clnt_vc.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/rpc/clnt_vc.c ============================================================================== --- stable/9/sys/rpc/clnt_vc.c Fri May 16 15:53:14 2014 (r266246) +++ stable/9/sys/rpc/clnt_vc.c Fri May 16 15:53:27 2014 (r266247) @@ -270,14 +270,12 @@ clnt_vc_create( return (cl); err: - if (cl) { - if (ct) { - mtx_destroy(&ct->ct_lock); - mem_free(ct, sizeof (struct ct_data)); - } - if (cl) - mem_free(cl, sizeof (CLIENT)); + if (ct) { + mtx_destroy(&ct->ct_lock); + mem_free(ct, sizeof (struct ct_data)); } + if (cl) + mem_free(cl, sizeof (CLIENT)); return ((CLIENT *)NULL); } From owner-svn-src-stable@FreeBSD.ORG Fri May 16 15:56:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B39341F; Fri, 16 May 2014 15:56:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 37F8B2DC5; Fri, 16 May 2014 15:56:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4GFu8dx019918; Fri, 16 May 2014 15:56:08 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4GFu8rw019917; Fri, 16 May 2014 15:56:08 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201405161556.s4GFu8rw019917@svn.freebsd.org> From: Christian Brueffer Date: Fri, 16 May 2014 15:56:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r266250 - stable/8/lib/libc/rpc X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 15:56:08 -0000 Author: brueffer Date: Fri May 16 15:56:07 2014 New Revision: 266250 URL: http://svnweb.freebsd.org/changeset/base/266250 Log: MFC: r265238 Properly free resources in case of error. CID: 1007032 Found with: Coverity Prevent(tm) Modified: stable/8/lib/libc/rpc/clnt_vc.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/rpc/ (props changed) Modified: stable/8/lib/libc/rpc/clnt_vc.c ============================================================================== --- stable/8/lib/libc/rpc/clnt_vc.c Fri May 16 15:53:47 2014 (r266249) +++ stable/8/lib/libc/rpc/clnt_vc.c Fri May 16 15:56:07 2014 (r266250) @@ -302,15 +302,13 @@ clnt_vc_create(fd, raddr, prog, vers, se return (cl); err: - if (cl) { - if (ct) { - if (ct->ct_addr.len) - mem_free(ct->ct_addr.buf, ct->ct_addr.len); - mem_free(ct, sizeof (struct ct_data)); - } - if (cl) - mem_free(cl, sizeof (CLIENT)); + if (ct) { + if (ct->ct_addr.len) + mem_free(ct->ct_addr.buf, ct->ct_addr.len); + mem_free(ct, sizeof (struct ct_data)); } + if (cl) + mem_free(cl, sizeof (CLIENT)); return ((CLIENT *)NULL); } From owner-svn-src-stable@FreeBSD.ORG Fri May 16 15:56:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79B8262C; Fri, 16 May 2014 15:56:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49CDF2DD3; Fri, 16 May 2014 15:56:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4GFucPi020149; Fri, 16 May 2014 15:56:38 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4GFuZke020131; Fri, 16 May 2014 15:56:35 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405161556.s4GFuZke020131@svn.freebsd.org> From: Ian Lepore Date: Fri, 16 May 2014 15:56:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266251 - in stable/10: . share/mk sys/boot/fdt/dts sys/boot/fdt/dts/arm sys/boot/fdt/dts/mips sys/boot/fdt/dts/powerpc sys/conf sys/tools/fdt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 15:56:38 -0000 Author: ian Date: Fri May 16 15:56:34 2014 New Revision: 266251 URL: http://svnweb.freebsd.org/changeset/base/266251 Log: MFC 262614, 262625, 262626, 262627, 262682, 262714, 262725, 262736 Integrate device-tree upstream files into the build process: (1) Invoke cpp to bring in files via #include (although the old /include/ stuff is supported still). (2) bring in files from either vendor tree or freebsd-custom files when building. (3) move all dts* files from sys/boot/fdt/dts to sys/boot/fdt/dts/${MACHINE} as appropriate. (4) encode all the magic to do the build in sys/tools/fdt/make_dtb.sh so that the different places in the tree use the exact same logic. (5) switch back to gpl dtc by default. the bsdl one in the tree has significant issues not easily addressed by those unfamiliar with the code. Only try to build the static dtb when we're building a static dtb. Use proper include path for dtc as well as cpp. Fix syntax errors (missing ; other minor glitches) in existing dts files. Added: stable/10/sys/boot/fdt/dts/arm/ - copied from r262614, head/sys/boot/fdt/dts/arm/ stable/10/sys/boot/fdt/dts/mips/ - copied from r262614, head/sys/boot/fdt/dts/mips/ stable/10/sys/boot/fdt/dts/powerpc/ - copied from r262614, head/sys/boot/fdt/dts/powerpc/ stable/10/sys/tools/fdt/make_dtb.sh (contents, props changed) - copied, changed from r262614, head/sys/tools/fdt/make_dtb.sh Deleted: stable/10/sys/boot/fdt/dts/am335x-evm.dts stable/10/sys/boot/fdt/dts/am335x.dtsi stable/10/sys/boot/fdt/dts/bcm2835.dtsi stable/10/sys/boot/fdt/dts/beaglebone-black.dts stable/10/sys/boot/fdt/dts/beaglebone.dts stable/10/sys/boot/fdt/dts/beri-netfpga.dts stable/10/sys/boot/fdt/dts/beri-sim.dts stable/10/sys/boot/fdt/dts/beripad-de4.dts stable/10/sys/boot/fdt/dts/cubieboard.dts stable/10/sys/boot/fdt/dts/cubieboard2.dts stable/10/sys/boot/fdt/dts/db78100.dts stable/10/sys/boot/fdt/dts/db78460.dts stable/10/sys/boot/fdt/dts/db88f5182.dts stable/10/sys/boot/fdt/dts/db88f5281.dts stable/10/sys/boot/fdt/dts/db88f6281.dts stable/10/sys/boot/fdt/dts/digi-ccwmx53.dts stable/10/sys/boot/fdt/dts/dockstar.dts stable/10/sys/boot/fdt/dts/dreamplug-1001.dts stable/10/sys/boot/fdt/dts/dreamplug-1001N.dts stable/10/sys/boot/fdt/dts/ea3250.dts stable/10/sys/boot/fdt/dts/efikamx.dts stable/10/sys/boot/fdt/dts/exynos5250-arndale.dts stable/10/sys/boot/fdt/dts/exynos5250.dtsi stable/10/sys/boot/fdt/dts/imx51x.dtsi stable/10/sys/boot/fdt/dts/imx53-qsb.dts stable/10/sys/boot/fdt/dts/imx53x.dtsi stable/10/sys/boot/fdt/dts/imx6.dtsi stable/10/sys/boot/fdt/dts/mpc8555cds.dts stable/10/sys/boot/fdt/dts/mpc8572ds.dts stable/10/sys/boot/fdt/dts/p1020rdb.dts stable/10/sys/boot/fdt/dts/p2020ds.dts stable/10/sys/boot/fdt/dts/p2041rdb.dts stable/10/sys/boot/fdt/dts/p2041si.dtsi stable/10/sys/boot/fdt/dts/p3041ds.dts stable/10/sys/boot/fdt/dts/p3041si.dtsi stable/10/sys/boot/fdt/dts/p5020ds.dts stable/10/sys/boot/fdt/dts/p5020si.dtsi stable/10/sys/boot/fdt/dts/pandaboard.dts stable/10/sys/boot/fdt/dts/rk3188-radxa.dts stable/10/sys/boot/fdt/dts/rk3188.dtsi stable/10/sys/boot/fdt/dts/rpi.dts stable/10/sys/boot/fdt/dts/sheevaplug.dts stable/10/sys/boot/fdt/dts/tegra20-paz00.dts stable/10/sys/boot/fdt/dts/tegra20.dtsi stable/10/sys/boot/fdt/dts/trimslice.dts stable/10/sys/boot/fdt/dts/ts7800.dts stable/10/sys/boot/fdt/dts/versatilepb.dts stable/10/sys/boot/fdt/dts/vybrid-colibri-vf50.dts stable/10/sys/boot/fdt/dts/vybrid-cosmic.dts stable/10/sys/boot/fdt/dts/vybrid-quartz.dts stable/10/sys/boot/fdt/dts/vybrid.dtsi stable/10/sys/boot/fdt/dts/wandboard-dual.dts stable/10/sys/boot/fdt/dts/wandboard-quad.dts stable/10/sys/boot/fdt/dts/wandboard-solo.dts stable/10/sys/boot/fdt/dts/xlp-basic.dts stable/10/sys/boot/fdt/dts/zedboard.dts Modified: stable/10/Makefile.inc1 stable/10/share/mk/bsd.own.mk stable/10/sys/boot/fdt/dts/arm/beaglebone-black.dts stable/10/sys/boot/fdt/dts/arm/beaglebone.dts stable/10/sys/boot/fdt/dts/arm/imx53-qsb.dts stable/10/sys/boot/fdt/dts/arm/imx53x.dtsi stable/10/sys/boot/fdt/dts/arm/imx6.dtsi stable/10/sys/boot/fdt/dts/arm/rk3188.dtsi stable/10/sys/boot/fdt/dts/arm/rpi.dts stable/10/sys/boot/fdt/dts/mips/beri-netfpga.dts stable/10/sys/boot/fdt/dts/mips/beri-sim.dts stable/10/sys/boot/fdt/dts/mips/beripad-de4.dts stable/10/sys/conf/files Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Fri May 16 15:56:07 2014 (r266250) +++ stable/10/Makefile.inc1 Fri May 16 15:56:34 2014 (r266251) @@ -1266,7 +1266,7 @@ _dtrace_tools= cddl/usr.bin/sgsmsg cddl/ lib/libdwarf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge .endif -# Default to building the BSDL DTC, but build the GPL one if users explicitly +# Default to building the GPL DTC, but build the BSDL one if users explicitly # request it. _dtc= usr.bin/dtc .if ${MK_GPL_DTC} != "no" @@ -1849,7 +1849,7 @@ builddtb: echo "ERROR: FDT_DTS_FILE must be specified!"; \ exit 1; \ fi; \ - if [ ! -f ${.CURDIR}/sys/boot/fdt/dts/${FDT_DTS_FILE} ]; then \ + if [ ! -f ${.CURDIR}/sys/boot/fdt/dts/${MACHINE}/${FDT_DTS_FILE} ]; then \ echo "ERROR: Specified DTS file (${FDT_DTS_FILE}) does not \ exist!"; \ exit 1; \ @@ -1859,9 +1859,9 @@ builddtb: directory"; \ fi @PATH=${TMPPATH} \ - dtc -O dtb -o \ - ${DTBOUTPUTPATH}/`echo ${FDT_DTS_FILE} | cut -d. -f1`.dtb -b 0 \ - -p 1024 ${.CURDIR}/sys/boot/fdt/dts/${FDT_DTS_FILE} + ${.CURDIR}/sys/tools/fdt/make_dtb.sh ${.CURDIR}/sys \ + ${FDT_DTS_FILE} \ + ${DTBOUTPUTPATH}/`basename ${FDT_DTS_FILE} .dts` ############### Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Fri May 16 15:56:07 2014 (r266250) +++ stable/10/share/mk/bsd.own.mk Fri May 16 15:56:34 2014 (r266251) @@ -285,6 +285,7 @@ __DEFAULT_YES_OPTIONS = \ GNU \ GPIB \ GPIO \ + GPL_DTC \ GROFF \ HTML \ ICONV \ @@ -367,7 +368,6 @@ __DEFAULT_NO_OPTIONS = \ CLANG_EXTRAS \ CTF \ DEBUG_FILES \ - GPL_DTC \ HESIOD \ INSTALL_AS_USER \ LLDB \ Modified: stable/10/sys/boot/fdt/dts/arm/beaglebone-black.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/beaglebone-black.dts Fri Feb 28 18:29:09 2014 (r262614) +++ stable/10/sys/boot/fdt/dts/arm/beaglebone-black.dts Fri May 16 15:56:34 2014 (r266251) @@ -150,7 +150,7 @@ compatible = "ti,am335x-pmic"; reg = <0x24>; }; - } + }; }; leds { Modified: stable/10/sys/boot/fdt/dts/arm/beaglebone.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/beaglebone.dts Fri Feb 28 18:29:09 2014 (r262614) +++ stable/10/sys/boot/fdt/dts/arm/beaglebone.dts Fri May 16 15:56:34 2014 (r266251) @@ -135,7 +135,7 @@ compatible = "ti,am335x-pmic"; reg = <0x24>; }; - } + }; }; chosen { Modified: stable/10/sys/boot/fdt/dts/arm/imx53-qsb.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/imx53-qsb.dts Fri Feb 28 18:29:09 2014 (r262614) +++ stable/10/sys/boot/fdt/dts/arm/imx53-qsb.dts Fri May 16 15:56:34 2014 (r266251) @@ -105,7 +105,7 @@ ethernet@63fec000 { status = "okay"; phy-mode = "rmii"; - } + }; i2c@63fc4000 { status = "okay"; }; Modified: stable/10/sys/boot/fdt/dts/arm/imx53x.dtsi ============================================================================== --- head/sys/boot/fdt/dts/arm/imx53x.dtsi Fri Feb 28 18:29:09 2014 (r262614) +++ stable/10/sys/boot/fdt/dts/arm/imx53x.dtsi Fri May 16 15:56:34 2014 (r266251) @@ -95,7 +95,7 @@ #address-cells = <1>; #size-cells = <1>; interrupt-parent = <&tzic>; - ranges = <0x50000000 0x14000000>; + ranges; aips@50000000 { /* AIPS1 */ compatible = "fsl,aips-bus", "simple-bus"; Modified: stable/10/sys/boot/fdt/dts/arm/imx6.dtsi ============================================================================== --- head/sys/boot/fdt/dts/arm/imx6.dtsi Fri Feb 28 18:29:09 2014 (r262614) +++ stable/10/sys/boot/fdt/dts/arm/imx6.dtsi Fri May 16 15:56:34 2014 (r266251) @@ -99,7 +99,7 @@ reg = <0x020c8000 0x1000>; interrupt-parent = <&gic>; interrupts = <49>; - } + }; gpt: timer@02098000 { compatible = "fsl,imx6q-gpt", "fsl,imx51-gpt"; @@ -343,7 +343,7 @@ ocotp0: ocotp@021bc000 { compatible = "fsl,imx6q-ocotp"; reg = <0x021bc000 0x4000>; - } + }; }; }; }; Modified: stable/10/sys/boot/fdt/dts/arm/rk3188.dtsi ============================================================================== --- head/sys/boot/fdt/dts/arm/rk3188.dtsi Fri Feb 28 18:29:09 2014 (r262614) +++ stable/10/sys/boot/fdt/dts/arm/rk3188.dtsi Fri May 16 15:56:34 2014 (r266251) @@ -77,7 +77,6 @@ timer@20038000 { compatible = "rockchip,rk30xx-timer"; - compatible = "rockchip,rk3188-dw-apb-timer-osc"; reg = <0x20038000 0x20>; interrupts = <76>; clock-frequency = <24000000>; Modified: stable/10/sys/boot/fdt/dts/arm/rpi.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/rpi.dts Fri Feb 28 18:29:09 2014 (r262614) +++ stable/10/sys/boot/fdt/dts/arm/rpi.dts Fri May 16 15:56:34 2014 (r266251) @@ -28,13 +28,13 @@ /include/ "bcm2835.dtsi" -/memreserve/ 0x08000000 0x08000000; /* Set by VideoCore */ - / { model = "Raspberry Pi (BCM2835)"; compatible = "raspberrypi,model-a", "raspberrypi,model-b", "broadcom,bcm2835-vc", "broadcom,bcm2708-vc"; + memreserve = <0x08000000 0x08000000>; /* Set by VideoCore */ + memory { device_type = "memory"; reg = <0 0x8000000>; /* 128MB, Set by VideoCore */ Modified: stable/10/sys/boot/fdt/dts/mips/beri-netfpga.dts ============================================================================== --- head/sys/boot/fdt/dts/mips/beri-netfpga.dts Fri Feb 28 18:29:09 2014 (r262614) +++ stable/10/sys/boot/fdt/dts/mips/beri-netfpga.dts Fri May 16 15:56:34 2014 (r266251) @@ -66,7 +66,7 @@ device-type = "cpu"; compatible = "sri-cambridge,beri"; - reg = <0>; + reg = <0 1>; status = "okay"; }; @@ -75,7 +75,7 @@ device-type = "cpu"; compatible = "sri-cambridge,beri"; - reg = <1>; + reg = <1 1>; // XXX: should we need cached prefix? cpu-release-addr = <0xffffffff 0x800fffe0>; }; Modified: stable/10/sys/boot/fdt/dts/mips/beri-sim.dts ============================================================================== --- head/sys/boot/fdt/dts/mips/beri-sim.dts Fri Feb 28 18:29:09 2014 (r262614) +++ stable/10/sys/boot/fdt/dts/mips/beri-sim.dts Fri May 16 15:56:34 2014 (r266251) @@ -64,7 +64,7 @@ device-type = "cpu"; compatible = "sri-cambridge,beri"; - reg = <0>; + reg = <0 1>; status = "okay"; }; @@ -73,7 +73,7 @@ device-type = "cpu"; compatible = "sri-cambridge,beri"; - reg = <1>; + reg = <1 1>; // XXX: should we need cached prefix? cpu-release-addr = <0xffffffff 0x800fffe0>; }; Modified: stable/10/sys/boot/fdt/dts/mips/beripad-de4.dts ============================================================================== --- head/sys/boot/fdt/dts/mips/beripad-de4.dts Fri Feb 28 18:29:09 2014 (r262614) +++ stable/10/sys/boot/fdt/dts/mips/beripad-de4.dts Fri May 16 15:56:34 2014 (r266251) @@ -64,7 +64,7 @@ device-type = "cpu"; compatible = "sri-cambridge,beri"; - reg = <0>; + reg = <0 1>; status = "okay"; }; @@ -73,7 +73,7 @@ device-type = "cpu"; compatible = "sri-cambridge,beri"; - reg = <1>; + reg = <1 1>; // XXX: should we need cached prefix? cpu-release-addr = <0xffffffff 0x800fffe0>; }; Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Fri May 16 15:56:07 2014 (r266250) +++ stable/10/sys/conf/files Fri May 16 15:56:34 2014 (r266251) @@ -54,12 +54,13 @@ aic79xx_reg_print.o optional ahd pci ah # The 'fdt_dtb_file' target covers an actual DTB file name, which is derived # from the specified source (DTS) file: .dts -> .dtb # -fdt_dtb_file optional fdt \ - compile-with "if [ -f $S/boot/fdt/dts/${FDT_DTS_FILE} ]; then dtc -O dtb -o ${FDT_DTS_FILE:R}.dtb -b 0 -p 1024 $S/boot/fdt/dts/${FDT_DTS_FILE}; fi" \ +fdt_dtb_file optional fdt fdt_dtb_static \ + compile-with "sh $S/tools/fdt/make_dtb.sh $S ${FDT_DTS_FILE} ${.CURDIR}/${FDT_DTS_FILE:R}.dtb" \ no-obj no-implicit-rule before-depend \ clean "${FDT_DTS_FILE:R}.dtb" fdt_static_dtb.h optional fdt fdt_dtb_static \ - compile-with "sh $S/tools/fdt/make_dtbh.sh ${FDT_DTS_FILE} ." \ + compile-with "sh $S/tools/fdt/make_dtbh.sh ${FDT_DTS_FILE} ${.CURDIR}" \ + dependency "fdt_dtb_file" \ no-obj no-implicit-rule before-depend \ clean "fdt_static_dtb.h" feeder_eq_gen.h optional sound \ @@ -1406,7 +1407,7 @@ dev/fb/splash.c optional sc splash dev/fdt/fdt_common.c optional fdt dev/fdt/fdt_slicer.c optional fdt cfi | fdt nand dev/fdt/fdt_static_dtb.S optional fdt fdt_dtb_static \ - dependency "$S/boot/fdt/dts/${FDT_DTS_FILE}" + dependency "$S/boot/fdt/dts/${MACHINE}/${FDT_DTS_FILE}" dev/fdt/simplebus.c optional fdt dev/fe/if_fe.c optional fe dev/fe/if_fe_pccard.c optional fe pccard Copied and modified: stable/10/sys/tools/fdt/make_dtb.sh (from r262614, head/sys/tools/fdt/make_dtb.sh) ============================================================================== --- head/sys/tools/fdt/make_dtb.sh Fri Feb 28 18:29:09 2014 (r262614, copy source) +++ stable/10/sys/tools/fdt/make_dtb.sh Fri May 16 15:56:34 2014 (r266251) @@ -8,4 +8,4 @@ dts=$2 dtb=$3 cpp -x assembler-with-cpp -I $S/gnu/dts/include -I $S/boot/fdt/dts/${MACHINE} -I $S/gnu/dts/${MACHINE} -include $dts /dev/null | - dtc -O dtb -o $dtb -b 0 -p 1024 -i $S/boot/fdt/dts -i $S/gnu/dts/${MACHINE} + dtc -O dtb -o $dtb -b 0 -p 1024 -i $S/boot/fdt/dts/${MACHINE} -i $S/gnu/dts/${MACHINE} From owner-svn-src-stable@FreeBSD.ORG Fri May 16 15:57:21 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F01F4774; Fri, 16 May 2014 15:57:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DCFD42DDE; Fri, 16 May 2014 15:57:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4GFvKxM020291; Fri, 16 May 2014 15:57:20 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4GFvKGh020290; Fri, 16 May 2014 15:57:20 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201405161557.s4GFvKGh020290@svn.freebsd.org> From: Christian Brueffer Date: Fri, 16 May 2014 15:57:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r266252 - stable/8/sys/rpc X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 15:57:21 -0000 Author: brueffer Date: Fri May 16 15:57:20 2014 New Revision: 266252 URL: http://svnweb.freebsd.org/changeset/base/266252 Log: MFC: r265240 Properly free resources in case of error. CID: 1007032 Found with: Coverity Prevent(tm) Modified: stable/8/sys/rpc/clnt_vc.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/rpc/ (props changed) Modified: stable/8/sys/rpc/clnt_vc.c ============================================================================== --- stable/8/sys/rpc/clnt_vc.c Fri May 16 15:56:34 2014 (r266251) +++ stable/8/sys/rpc/clnt_vc.c Fri May 16 15:57:20 2014 (r266252) @@ -313,14 +313,12 @@ clnt_vc_create( return (cl); err: - if (cl) { - if (ct) { - mtx_destroy(&ct->ct_lock); - mem_free(ct, sizeof (struct ct_data)); - } - if (cl) - mem_free(cl, sizeof (CLIENT)); + if (ct) { + mtx_destroy(&ct->ct_lock); + mem_free(ct, sizeof (struct ct_data)); } + if (cl) + mem_free(cl, sizeof (CLIENT)); return ((CLIENT *)NULL); } From owner-svn-src-stable@FreeBSD.ORG Fri May 16 16:03:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6728FA5F; Fri, 16 May 2014 16:03:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52B852E91; Fri, 16 May 2014 16:03:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4GG3RCk026163; Fri, 16 May 2014 16:03:27 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4GG3Rbk026162; Fri, 16 May 2014 16:03:27 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201405161603.s4GG3Rbk026162@svn.freebsd.org> From: Christian Brueffer Date: Fri, 16 May 2014 16:03:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266253 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 16:03:27 -0000 Author: brueffer Date: Fri May 16 16:03:26 2014 New Revision: 266253 URL: http://svnweb.freebsd.org/changeset/base/266253 Log: MFC: r265583, r265716 First cleanup pass: new sentence -> new line, mdoc, typos and style. Fix two more typos. (1) Submitted by: Trond Endrestol (1) Modified: stable/10/share/man/man4/mrsas.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/mrsas.4 ============================================================================== --- stable/10/share/man/man4/mrsas.4 Fri May 16 15:57:20 2014 (r266252) +++ stable/10/share/man/man4/mrsas.4 Fri May 16 16:03:26 2014 (r266253) @@ -27,21 +27,19 @@ .\" 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. - +.\" .\" The views and conclusions contained in the software and documentation .\" are those of the authors and should not be interpreted as representing -.\" official policies,either expressed or implied, of the FreeBSD Project +.\" official policies, either expressed or implied, of the FreeBSD Project. .\" .\" $FreeBSD$ .\" - - -.Dd Apr 12, 2013 +.Dd May 8, 2014 .Dt MRSAS 4 .Os .Sh NAME .Nm mrsas -.Nd "LSI MegaRAID 6Gb/s and 12Gb/s SAS+SATA Raid controller driver" +.Nd "LSI MegaRAID 6Gb/s and 12Gb/s SAS+SATA RAID controller driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -68,7 +66,8 @@ section for the supported devices list. A disk (virtual disk/physical disk) attached to the .Nm driver will be visible to the user through -.Xr camcontrol 8 as +.Xr camcontrol 8 +as .Pa /dev/da? device nodes. A simple management interface is also provided on a per-controller basis via the @@ -85,7 +84,8 @@ to the .Xr cam 4 layer and thus requires a new driver which attaches targets to the .Xr cam 4 -layer. Older MegaRAID controllers are supported by +layer. +Older MegaRAID controllers are supported by .Xr mfi 4 and will not work with .Nm , @@ -97,19 +97,23 @@ drivers can detect and manage the LSI Me controllers. .Pp The -.Nm device.hints +.Xr device.hints 5 option is provided to tune the .Nm driver's behavior for LSI MegaRAID SAS 2208/2308/3008/3108 controllers. By default, the .Xr mfi 4 -driver will detect these controllers. See the +driver will detect these controllers. +See the .Nm PRIORITY section to know more about driver priority for MR-Fusion devices. .Pp .Nm -will provide a priority of (-30) (between BUS_PROBE_DEFAULT and -BUS_PROBE_LOW_PRIORITY) at probe call for device id's 0x005B, 0x005D, and +will provide a priority of (-30) (between +.Dv BUS_PROBE_DEFAULT +and +.Dv BUS_PROBE_LOW_PRIORITY ) +at probe call for device id's 0x005B, 0x005D, and 0x005F so that .Nm does not take control of these devices without user intervention. @@ -118,8 +122,8 @@ The .Nm driver supports the following hardware: .Pp +[ Thunderbolt 6Gb/s MR controller ] .Bl -bullet -compact -[ Thunderbolt 6Gbp/s MR controller ] .It LSI MegaRAID SAS 9265 .It @@ -142,8 +146,8 @@ DELL PERC H810 DELL PERC H710/P .El .Pp +[ Invader/Fury 12Gb/s MR controller ] .Bl -bullet -compact -[ Invader/Fury 12Gpb/s MR controller ] .It LSI MegaRAID SAS 9380 .It @@ -169,7 +173,7 @@ dev.mrsas.X.disable_ocr=1 .Pp where X is the adapter number. .Pp -To change the IO timeout value for a specific +To change the I/O timeout value for a specific .Nm driver instance, set the following tunable value in .Xr loader.conf 5 : @@ -190,17 +194,14 @@ dev.mrsas.X.mrsas_fw_fault_check_delay=N where NN is the fault check delay value in seconds. .Pp The current number of active I/O commands is shown in the -dev.mrsas.X.fw_outstanding +.Va dev.mrsas.X.fw_outstanding .Xr sysctl 8 variable. .Sh DEBUGGING To enable debugging prints from the .Nm driver, set the -.Bd -literal -offset indent -hw.mrsas.X.debug_level -.Ed -.Pp +.Va hw.mrsas.X.debug_level variable, where X is the adapter number, either in .Xr loader.conf 5 or via @@ -214,16 +215,20 @@ Enable tracing prints. .It 0x04 Enable prints for driver faults. .It 0x08 -Enable prints for OCR and IO timeout. +Enable prints for OCR and I/O timeout. .It 0x10 Enable prints for AEN events. .El .Sh PRIORITY The .Nm -driver will always set a default (-30) priority in the pci subsystem for -selection of MR-Fusion cards. (It is between BUS_PROBE_DEFAULT and -BUS_PROBE_LOW_PRIORITY). MR-Fusion Controllers include all cards with the +driver will always set a default (-30) priority in the PCI subsystem for +selection of MR-Fusion cards. +(It is between +.Dv BUS_PROBE_DEFAULT +and +.Dv BUS_PROBE_LOW_PRIORITY ) . +MR-Fusion Controllers include all cards with the Device IDs - 0x005B, 0x005D, @@ -231,14 +236,20 @@ Device IDs - .Pp The .Xr mfi 4 -driver will set a priority of either BUS_PROBE_DEFAULT or -BUS_PROBE_LOW_PRIORITY (depending on the device.hint setting) in the pci -subsystem for selection of MR-Fusion cards. With the above design in place, the +driver will set a priority of either +.Dv BUS_PROBE_DEFAULT +or +.Dv BUS_PROBE_LOW_PRIORITY +(depending on the device.hints setting) in the PCI +subsystem for selection of MR-Fusion cards. +With the above design in place, the .Xr mfi 4 driver will attach to a MR-Fusion card given that it has a higher priority than .Nm . .Pp -Using /boot/device.hints (as mentioned below), the user can provide a preference +Using +.Pa /boot/device.hints +(as mentioned below), the user can provide a preference for the .Nm driver to detect a MR-Fusion card instead of the @@ -250,9 +261,11 @@ driver. .Pp At boot time, the .Xr mfi 4 -driver will get priority to detect MR-Fusion controllers by default. Before +driver will get priority to detect MR-Fusion controllers by default. +Before changing this default driver selection policy, LSI advises users to understand -how the driver selection policy works. LSI's policy is to provide priority to +how the driver selection policy works. +LSI's policy is to provide priority to the .Xr mfi 4 driver to detect MR-Fusion cards, but allow for the ability to choose the @@ -272,11 +285,14 @@ driver and setting hw.mfi.mrsas_enable=" Changing the default behavior is well tested under most conditions, but unexpected behavior may pop up if more complex and unrealistic operations are executed by switching between the -.Xr mfi 4 and +.Xr mfi 4 +and .Nm drivers for MR-Fusion. -Switching drivers is designed to happen only one time. Although multiple -switching is possible, it is not recommended. The user should decide from +Switching drivers is designed to happen only one time. +Although multiple +switching is possible, it is not recommended. +The user should decide from .Nm Start of Day which driver they want to use for the MR-Fusion card. .Pp @@ -286,7 +302,8 @@ to .Nm . This behavior is .Nm Functions As Designed -and the user needs to change the fstab +and the user needs to change the +.Xr fstab 5 entry manually if they are doing any experiments with .Xr mfi 4 and @@ -294,43 +311,50 @@ and interoperability. .Sh FILES .Bl -tag -width ".Pa /dev/mrsas?" -compact -.It /dev/da? +.It Pa /dev/da? array/logical disk interface -.It /dev/mrsas? +.It Pa /dev/mrsas? management interface .El .Sh SEE ALSO -.Xr pci 4 , -.Xr mfi 4 , .Xr cam 4 , +.Xr mfi 4 , +.Xr pci 4 , .Xr device.hints 5 , +.Xt camcontrol 8 .Sh HISTORY The .Nm driver first appeared in -.Fx 10.0 . +.Fx 10.1 . .Bd -ragged .Cd "mfi Driver:" .Xr mfi 4 -is the old FreeBSD driver which started with support for Gen-1 Controllers and +is the old +.Fx +driver which started with support for Gen-1 Controllers and was extended to support up to MR-Fusion (Device ID = 0x005B, 0x005D, 0x005F). .Ed .Bd -ragged .Cd "mrsas Driver:" .Nm is the new driver reworked by LSI which supports Thunderbolt and onward -products. The SAS+SATA RAID controller with device id 0x005b is referred to as -the Thunderbolt controller throughout in this man page. +products. +The SAS+SATA RAID controller with device id 0x005b is referred to as +the Thunderbolt controller throughout this man page. .Ed .Bd -ragged .Nm cam aware HBA drivers: -FreeBSD has a +.Fx +has a .Xr cam 4 layer which attaches storage devices and provides a common access mechanism to -storage controllers and attached devices. The +storage controllers and attached devices. +The .Nm driver is -.Xr cam 4 aware and devices associated with +.Xr cam 4 +aware and devices associated with .Nm can be seen using .Xr camcontrol 8 . @@ -358,17 +382,22 @@ driver and this manual page were written The driver does not support big-endian architectures at this time. .Pp The driver does not support alias for device name (it is required when the user -switches between two drivers and does not want to edit /etc/fstab manually). +switches between two drivers and does not want to edit +.Pa /etc/fstab +manually). .Pp The .Nm -driver exposes devices as /dev/da?, whereas +driver exposes devices as +.Pa /dev/da? , +whereas .Xr mfi 4 -exposes deivces as /dev/mfid? +exposes devices as +.Pa /dev/mfid? . .Pp .Nm does not support the Linux Emulator interface. .Pp .Nm will not work with -.Xr mfiutil 8 +.Xr mfiutil 8 . From owner-svn-src-stable@FreeBSD.ORG Fri May 16 16:04:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7614ABD1; Fri, 16 May 2014 16:04:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61F1E2EA1; Fri, 16 May 2014 16:04:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4GG4XI9026392; Fri, 16 May 2014 16:04:33 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4GG4XJG026391; Fri, 16 May 2014 16:04:33 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201405161604.s4GG4XJG026391@svn.freebsd.org> From: Christian Brueffer Date: Fri, 16 May 2014 16:04:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266254 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 16:04:33 -0000 Author: brueffer Date: Fri May 16 16:04:32 2014 New Revision: 266254 URL: http://svnweb.freebsd.org/changeset/base/266254 Log: MFC: r265583, r265716 First cleanup pass: new sentence -> new line, mdoc, typos and style. Fix two more typos. (1) Submitted by: Trond Endrestol (1) Modified: stable/9/share/man/man4/mrsas.4 Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/mrsas.4 ============================================================================== --- stable/9/share/man/man4/mrsas.4 Fri May 16 16:03:26 2014 (r266253) +++ stable/9/share/man/man4/mrsas.4 Fri May 16 16:04:32 2014 (r266254) @@ -27,21 +27,19 @@ .\" 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. - +.\" .\" The views and conclusions contained in the software and documentation .\" are those of the authors and should not be interpreted as representing -.\" official policies,either expressed or implied, of the FreeBSD Project +.\" official policies, either expressed or implied, of the FreeBSD Project. .\" .\" $FreeBSD$ .\" - - -.Dd Apr 12, 2013 +.Dd May 8, 2014 .Dt MRSAS 4 .Os .Sh NAME .Nm mrsas -.Nd "LSI MegaRAID 6Gb/s and 12Gb/s SAS+SATA Raid controller driver" +.Nd "LSI MegaRAID 6Gb/s and 12Gb/s SAS+SATA RAID controller driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -68,7 +66,8 @@ section for the supported devices list. A disk (virtual disk/physical disk) attached to the .Nm driver will be visible to the user through -.Xr camcontrol 8 as +.Xr camcontrol 8 +as .Pa /dev/da? device nodes. A simple management interface is also provided on a per-controller basis via the @@ -85,7 +84,8 @@ to the .Xr cam 4 layer and thus requires a new driver which attaches targets to the .Xr cam 4 -layer. Older MegaRAID controllers are supported by +layer. +Older MegaRAID controllers are supported by .Xr mfi 4 and will not work with .Nm , @@ -97,19 +97,23 @@ drivers can detect and manage the LSI Me controllers. .Pp The -.Nm device.hints +.Xr device.hints 5 option is provided to tune the .Nm driver's behavior for LSI MegaRAID SAS 2208/2308/3008/3108 controllers. By default, the .Xr mfi 4 -driver will detect these controllers. See the +driver will detect these controllers. +See the .Nm PRIORITY section to know more about driver priority for MR-Fusion devices. .Pp .Nm -will provide a priority of (-30) (between BUS_PROBE_DEFAULT and -BUS_PROBE_LOW_PRIORITY) at probe call for device id's 0x005B, 0x005D, and +will provide a priority of (-30) (between +.Dv BUS_PROBE_DEFAULT +and +.Dv BUS_PROBE_LOW_PRIORITY ) +at probe call for device id's 0x005B, 0x005D, and 0x005F so that .Nm does not take control of these devices without user intervention. @@ -118,8 +122,8 @@ The .Nm driver supports the following hardware: .Pp +[ Thunderbolt 6Gb/s MR controller ] .Bl -bullet -compact -[ Thunderbolt 6Gbp/s MR controller ] .It LSI MegaRAID SAS 9265 .It @@ -142,8 +146,8 @@ DELL PERC H810 DELL PERC H710/P .El .Pp +[ Invader/Fury 12Gb/s MR controller ] .Bl -bullet -compact -[ Invader/Fury 12Gpb/s MR controller ] .It LSI MegaRAID SAS 9380 .It @@ -169,7 +173,7 @@ dev.mrsas.X.disable_ocr=1 .Pp where X is the adapter number. .Pp -To change the IO timeout value for a specific +To change the I/O timeout value for a specific .Nm driver instance, set the following tunable value in .Xr loader.conf 5 : @@ -190,17 +194,14 @@ dev.mrsas.X.mrsas_fw_fault_check_delay=N where NN is the fault check delay value in seconds. .Pp The current number of active I/O commands is shown in the -dev.mrsas.X.fw_outstanding +.Va dev.mrsas.X.fw_outstanding .Xr sysctl 8 variable. .Sh DEBUGGING To enable debugging prints from the .Nm driver, set the -.Bd -literal -offset indent -hw.mrsas.X.debug_level -.Ed -.Pp +.Va hw.mrsas.X.debug_level variable, where X is the adapter number, either in .Xr loader.conf 5 or via @@ -214,16 +215,20 @@ Enable tracing prints. .It 0x04 Enable prints for driver faults. .It 0x08 -Enable prints for OCR and IO timeout. +Enable prints for OCR and I/O timeout. .It 0x10 Enable prints for AEN events. .El .Sh PRIORITY The .Nm -driver will always set a default (-30) priority in the pci subsystem for -selection of MR-Fusion cards. (It is between BUS_PROBE_DEFAULT and -BUS_PROBE_LOW_PRIORITY). MR-Fusion Controllers include all cards with the +driver will always set a default (-30) priority in the PCI subsystem for +selection of MR-Fusion cards. +(It is between +.Dv BUS_PROBE_DEFAULT +and +.Dv BUS_PROBE_LOW_PRIORITY ) . +MR-Fusion Controllers include all cards with the Device IDs - 0x005B, 0x005D, @@ -231,14 +236,20 @@ Device IDs - .Pp The .Xr mfi 4 -driver will set a priority of either BUS_PROBE_DEFAULT or -BUS_PROBE_LOW_PRIORITY (depending on the device.hint setting) in the pci -subsystem for selection of MR-Fusion cards. With the above design in place, the +driver will set a priority of either +.Dv BUS_PROBE_DEFAULT +or +.Dv BUS_PROBE_LOW_PRIORITY +(depending on the device.hints setting) in the PCI +subsystem for selection of MR-Fusion cards. +With the above design in place, the .Xr mfi 4 driver will attach to a MR-Fusion card given that it has a higher priority than .Nm . .Pp -Using /boot/device.hints (as mentioned below), the user can provide a preference +Using +.Pa /boot/device.hints +(as mentioned below), the user can provide a preference for the .Nm driver to detect a MR-Fusion card instead of the @@ -250,9 +261,11 @@ driver. .Pp At boot time, the .Xr mfi 4 -driver will get priority to detect MR-Fusion controllers by default. Before +driver will get priority to detect MR-Fusion controllers by default. +Before changing this default driver selection policy, LSI advises users to understand -how the driver selection policy works. LSI's policy is to provide priority to +how the driver selection policy works. +LSI's policy is to provide priority to the .Xr mfi 4 driver to detect MR-Fusion cards, but allow for the ability to choose the @@ -272,11 +285,14 @@ driver and setting hw.mfi.mrsas_enable=" Changing the default behavior is well tested under most conditions, but unexpected behavior may pop up if more complex and unrealistic operations are executed by switching between the -.Xr mfi 4 and +.Xr mfi 4 +and .Nm drivers for MR-Fusion. -Switching drivers is designed to happen only one time. Although multiple -switching is possible, it is not recommended. The user should decide from +Switching drivers is designed to happen only one time. +Although multiple +switching is possible, it is not recommended. +The user should decide from .Nm Start of Day which driver they want to use for the MR-Fusion card. .Pp @@ -286,7 +302,8 @@ to .Nm . This behavior is .Nm Functions As Designed -and the user needs to change the fstab +and the user needs to change the +.Xr fstab 5 entry manually if they are doing any experiments with .Xr mfi 4 and @@ -294,43 +311,50 @@ and interoperability. .Sh FILES .Bl -tag -width ".Pa /dev/mrsas?" -compact -.It /dev/da? +.It Pa /dev/da? array/logical disk interface -.It /dev/mrsas? +.It Pa /dev/mrsas? management interface .El .Sh SEE ALSO -.Xr pci 4 , -.Xr mfi 4 , .Xr cam 4 , +.Xr mfi 4 , +.Xr pci 4 , .Xr device.hints 5 , +.Xt camcontrol 8 .Sh HISTORY The .Nm driver first appeared in -.Fx 10.0 . +.Fx 10.1 . .Bd -ragged .Cd "mfi Driver:" .Xr mfi 4 -is the old FreeBSD driver which started with support for Gen-1 Controllers and +is the old +.Fx +driver which started with support for Gen-1 Controllers and was extended to support up to MR-Fusion (Device ID = 0x005B, 0x005D, 0x005F). .Ed .Bd -ragged .Cd "mrsas Driver:" .Nm is the new driver reworked by LSI which supports Thunderbolt and onward -products. The SAS+SATA RAID controller with device id 0x005b is referred to as -the Thunderbolt controller throughout in this man page. +products. +The SAS+SATA RAID controller with device id 0x005b is referred to as +the Thunderbolt controller throughout this man page. .Ed .Bd -ragged .Nm cam aware HBA drivers: -FreeBSD has a +.Fx +has a .Xr cam 4 layer which attaches storage devices and provides a common access mechanism to -storage controllers and attached devices. The +storage controllers and attached devices. +The .Nm driver is -.Xr cam 4 aware and devices associated with +.Xr cam 4 +aware and devices associated with .Nm can be seen using .Xr camcontrol 8 . @@ -358,17 +382,22 @@ driver and this manual page were written The driver does not support big-endian architectures at this time. .Pp The driver does not support alias for device name (it is required when the user -switches between two drivers and does not want to edit /etc/fstab manually). +switches between two drivers and does not want to edit +.Pa /etc/fstab +manually). .Pp The .Nm -driver exposes devices as /dev/da?, whereas +driver exposes devices as +.Pa /dev/da? , +whereas .Xr mfi 4 -exposes deivces as /dev/mfid? +exposes devices as +.Pa /dev/mfid? . .Pp .Nm does not support the Linux Emulator interface. .Pp .Nm will not work with -.Xr mfiutil 8 +.Xr mfiutil 8 . From owner-svn-src-stable@FreeBSD.ORG Fri May 16 16:06:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5261D50; Fri, 16 May 2014 16:06:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91BD72EC6; Fri, 16 May 2014 16:06:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4GG6V1Z026812; Fri, 16 May 2014 16:06:31 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4GG6VRp026811; Fri, 16 May 2014 16:06:31 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201405161606.s4GG6VRp026811@svn.freebsd.org> From: Christian Brueffer Date: Fri, 16 May 2014 16:06:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266255 - stable/10/release/doc/en_US.ISO8859-1/hardware X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 16:06:31 -0000 Author: brueffer Date: Fri May 16 16:06:31 2014 New Revision: 266255 URL: http://svnweb.freebsd.org/changeset/base/266255 Log: MFC: r265585 Generate hardware notes for mrsas(4). Modified: stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Directory Properties: stable/10/ (props changed) Modified: stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Fri May 16 16:04:32 2014 (r266254) +++ stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Fri May 16 16:06:31 2014 (r266255) @@ -739,6 +739,8 @@ &hwlist.mpt; + &hwlist.mrsas; + &hwlist.mvs; &hwlist.ncr; From owner-svn-src-stable@FreeBSD.ORG Fri May 16 16:07:22 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5AB5FEA1; Fri, 16 May 2014 16:07:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 477C22EE2; Fri, 16 May 2014 16:07:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4GG7M2Q027006; Fri, 16 May 2014 16:07:22 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4GG7M2Q027005; Fri, 16 May 2014 16:07:22 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201405161607.s4GG7M2Q027005@svn.freebsd.org> From: Christian Brueffer Date: Fri, 16 May 2014 16:07:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266256 - stable/9/release/doc/en_US.ISO8859-1/hardware X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 16:07:22 -0000 Author: brueffer Date: Fri May 16 16:07:21 2014 New Revision: 266256 URL: http://svnweb.freebsd.org/changeset/base/266256 Log: MFC: r265585 Generate hardware notes for mrsas(4). Modified: stable/9/release/doc/en_US.ISO8859-1/hardware/article.xml Directory Properties: stable/9/release/doc/ (props changed) stable/9/release/doc/en_US.ISO8859-1/hardware/ (props changed) Modified: stable/9/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/hardware/article.xml Fri May 16 16:06:31 2014 (r266255) +++ stable/9/release/doc/en_US.ISO8859-1/hardware/article.xml Fri May 16 16:07:21 2014 (r266256) @@ -798,6 +798,8 @@ &hwlist.mpt; + &hwlist.mrsas; + &hwlist.mvs; &hwlist.ncr; From owner-svn-src-stable@FreeBSD.ORG Fri May 16 16:11:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F3DC10B; Fri, 16 May 2014 16:11:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C4542F75; Fri, 16 May 2014 16:11:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4GGBE0H031661; Fri, 16 May 2014 16:11:14 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4GGBEwN031660; Fri, 16 May 2014 16:11:14 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201405161611.s4GGBEwN031660@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 16 May 2014 16:11:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266257 - stable/10/sys/dev/usb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 16:11:14 -0000 Author: hselasky Date: Fri May 16 16:11:14 2014 New Revision: 266257 URL: http://svnweb.freebsd.org/changeset/base/266257 Log: MFC r265779: Fix for NULL pointer. Modified: stable/10/sys/dev/usb/usb_pf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/usb_pf.c ============================================================================== --- stable/10/sys/dev/usb/usb_pf.c Fri May 16 16:07:21 2014 (r266256) +++ stable/10/sys/dev/usb/usb_pf.c Fri May 16 16:11:14 2014 (r266257) @@ -394,7 +394,7 @@ usbpf_xfertap(struct usb_xfer *xfer, int bus = xfer->xroot->bus; /* sanity checks */ - if (bus->ifp == NULL) + if (bus->ifp == NULL || bus->ifp->if_bpf == NULL) return; if (!bpf_peers_present(bus->ifp->if_bpf)) return; From owner-svn-src-stable@FreeBSD.ORG Fri May 16 16:14:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8507B268; Fri, 16 May 2014 16:14:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71F322F93; Fri, 16 May 2014 16:14:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4GGEca1032993; Fri, 16 May 2014 16:14:38 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4GGEcKV032992; Fri, 16 May 2014 16:14:38 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201405161614.s4GGEcKV032992@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 16 May 2014 16:14:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266258 - stable/9/sys/dev/usb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 16:14:38 -0000 Author: hselasky Date: Fri May 16 16:14:37 2014 New Revision: 266258 URL: http://svnweb.freebsd.org/changeset/base/266258 Log: MFC r265779: Fix for NULL pointer. Modified: stable/9/sys/dev/usb/usb_pf.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/usb_pf.c ============================================================================== --- stable/9/sys/dev/usb/usb_pf.c Fri May 16 16:11:14 2014 (r266257) +++ stable/9/sys/dev/usb/usb_pf.c Fri May 16 16:14:37 2014 (r266258) @@ -261,7 +261,7 @@ usbpf_xfertap(struct usb_xfer *xfer, int /* sanity checks */ if (usb_no_pf != 0) return; - if (bus->ifp == NULL) + if (bus->ifp == NULL || bus->ifp->if_bpf == NULL) return; if (!bpf_peers_present(bus->ifp->if_bpf)) return; From owner-svn-src-stable@FreeBSD.ORG Fri May 16 16:16:19 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8182A3B3 for ; Fri, 16 May 2014 16:16:19 +0000 (UTC) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 495912FAA for ; Fri, 16 May 2014 16:16:18 +0000 (UTC) Received: from compute5.internal (compute5.nyi.mail.srv.osa [10.202.2.45]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id C2B1720C0F for ; Fri, 16 May 2014 12:16:16 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Fri, 16 May 2014 12:16:16 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.net; h= message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; s=mesmtp; bh=emI6XZSeQU+A8AS1fC9Un4lEa4Y=; b=PuQFoXGth1vEIsp5u0gvR6OqglUr l9bgu8PyTfMV443MPkv7foKMYkkmOaNyL8aE+kzAfeXsH9EdW5bG3avhdyvrUPbl VV6+01IMs+D5TotzXhg8TVrS3B/FP9H1BEhehDsZvwhZMT6CERz2ATEzXHhfziow a6Cga7ujqiOunP8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=emI6XZSeQU+A8AS1fC9Un4 lEa4Y=; b=hEcjdwZzCpEtm8SEvcrCmQCmFnoUkWoQCt45W2jsXyKU5WRRzjRf77 YhPPq8IJpTVerOEsGi++QLaSH5towfo8EJmnteOnz/9HevifLvt8hrYklts2dzVA gzGbW5m82GwpXTflPbbmquwGF1oIKq3Hqlsmul87TofeP/RrtrhOc= X-Sasl-enc: ptRewxzaD4gaDqs+rnoL6Ezexcj/nfI9f1po81HfmLzh 1400256976 Received: from [10.0.0.105] (unknown [184.69.5.158]) by mail.messagingengine.com (Postfix) with ESMTPA id 02789C007AB; Fri, 16 May 2014 12:16:15 -0400 (EDT) Message-ID: <537639CF.2080401@fastmail.net> Date: Fri, 16 May 2014 09:16:15 -0700 From: Bruce Simpson User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Doug Ambrisko , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r266242 - in stable/9: share/man/man4 sys/conf sys/dev/mrsas sys/modules sys/modules/mrsas References: <201405161546.s4GFkTq7013260@svn.freebsd.org> In-Reply-To: <201405161546.s4GFkTq7013260@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 16:16:19 -0000 On 16/05/2014 08:46, Doug Ambrisko wrote: > mrsas(4) attaches disks to the CAM layer so it depends on CAM and devices > show up as /dev/daX. mfiutil(8) does not work with mrsas. This is a big improvement. When using ZFS with mfi(4), mfiutil(8) can be used to create an "un-RAID" configuration by creating several stripes spanning single disks. The MegaRAID BIOS does not make the relevant options easily available. Having native CAM support for each disk will be a big help here. From owner-svn-src-stable@FreeBSD.ORG Fri May 16 16:17:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE20A4EA; Fri, 16 May 2014 16:17:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CAF4A2FB6; Fri, 16 May 2014 16:17:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4GGH6gl033408; Fri, 16 May 2014 16:17:06 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4GGH6kR033407; Fri, 16 May 2014 16:17:06 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201405161617.s4GGH6kR033407@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 16 May 2014 16:17:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r266259 - stable/8/sys/dev/usb X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 16:17:07 -0000 Author: hselasky Date: Fri May 16 16:17:06 2014 New Revision: 266259 URL: http://svnweb.freebsd.org/changeset/base/266259 Log: MFC r265779: Fix for NULL pointer. Modified: stable/8/sys/dev/usb/usb_pf.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/usb_pf.c ============================================================================== --- stable/8/sys/dev/usb/usb_pf.c Fri May 16 16:14:37 2014 (r266258) +++ stable/8/sys/dev/usb/usb_pf.c Fri May 16 16:17:06 2014 (r266259) @@ -261,7 +261,7 @@ usbpf_xfertap(struct usb_xfer *xfer, int /* sanity checks */ if (usb_no_pf != 0) return; - if (bus->ifp == NULL) + if (bus->ifp == NULL || bus->ifp->if_bpf == NULL) return; if (!bpf_peers_present(bus->ifp->if_bpf)) return; From owner-svn-src-stable@FreeBSD.ORG Fri May 16 16:37:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 99AD8E9B; Fri, 16 May 2014 16:37:27 +0000 (UTC) Received: from mail.ambrisko.com (mail.ambrisko.com [70.91.206.90]) by mx1.freebsd.org (Postfix) with ESMTP id 6636721AC; Fri, 16 May 2014 16:37:26 +0000 (UTC) X-Ambrisko-Me: Yes Received: from server2.ambrisko.com (HELO internal.ambrisko.com) ([192.168.1.2]) by ironport.ambrisko.com with ESMTP; 16 May 2014 09:42:30 -0700 Received: from ambrisko.com (localhost [127.0.0.1]) by internal.ambrisko.com (8.14.4/8.14.4) with ESMTP id s4GGbQBP031221; Fri, 16 May 2014 09:37:26 -0700 (PDT) (envelope-from ambrisko@ambrisko.com) Received: (from ambrisko@localhost) by ambrisko.com (8.14.4/8.14.4/Submit) id s4GGbPs4031219; Fri, 16 May 2014 09:37:25 -0700 (PDT) (envelope-from ambrisko) Date: Fri, 16 May 2014 09:37:25 -0700 From: Doug Ambrisko To: Bruce Simpson Subject: Re: svn commit: r266242 - in stable/9: share/man/man4 sys/conf sys/dev/mrsas sys/modules sys/modules/mrsas Message-ID: <20140516163725.GA24163@ambrisko.com> References: <201405161546.s4GFkTq7013260@svn.freebsd.org> <537639CF.2080401@fastmail.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <537639CF.2080401@fastmail.net> User-Agent: Mutt/1.4.2.3i Cc: Doug Ambrisko , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-9@FreeBSD.org, svn-src-stable@FreeBSD.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 16:37:27 -0000 On Fri, May 16, 2014 at 09:16:15AM -0700, Bruce Simpson wrote: | On 16/05/2014 08:46, Doug Ambrisko wrote: | > mrsas(4) attaches disks to the CAM layer so it depends on CAM and | > devices show up as /dev/daX. mfiutil(8) does not work with mrsas. | | This is a big improvement. When using ZFS with mfi(4), mfiutil(8) can be | used to create an "un-RAID" configuration by creating several stripes | spanning single disks. The MegaRAID BIOS does not make the relevant | options easily available. Having native CAM support for each disk will | be a big help here. Its not what you think. The mrsas(4) driver attaches the logical volumes or JBODs to CAM. Now what you would want to do, to achieve what you want is to create JBODs (not a RAID per drive) and then put each in your ZFS pool. With mfi(4) there was the cam passthrough option which gives you raw access to the disk underneath the RAID controller. So with mrsas(4) /dev/mfid0 becomes /dev/da0 for example. There is no equivalent of mfi(4)'s /dev/da0 with mrsas(4). It been reported that cam passthrough in mfi(4) has troubles with some configurations. This problem also happens with mfi(4)'s JBOD since it uses passthrough mode. It didn't happen with mrsas(4) in JBOD so mrsas(4) is better there. I can't repro. the mfi(4) passthrough issue. Newer RAID controllers should support JBODs so you don't have to create the one RAID per disk. I agree that this can be hard to setup via the BIOS. I haven't used storcli much. It works with mrsas(4) and is supposed to be better to use then MegaCLI. I think I've created JBODs with MegaCLi. I recall you have to enable the JBODs feature via MegaCli then you can create them. I have created RAID volumes and JBODs before at the same time on the same RAID contoller for testing. We hope to extend mfiutil(8)/mrsas(4) to work together. It would be nice for mrsas(4) to create the /dev/mfid aliases so people could easily switch between them if they are not used labels to access disks. This could help debug issues. Thanks, Doug A. From owner-svn-src-stable@FreeBSD.ORG Fri May 16 19:15:04 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4381BBE9; Fri, 16 May 2014 19:15:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F95C2F49; Fri, 16 May 2014 19:15:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4GJF4xL043817; Fri, 16 May 2014 19:15:04 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4GJF3DI043814; Fri, 16 May 2014 19:15:03 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201405161915.s4GJF3DI043814@svn.freebsd.org> From: Colin Percival Date: Fri, 16 May 2014 19:15:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266268 - in stable/9/sys: amd64/include dev/xen/xenpci i386/include X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 19:15:04 -0000 Author: cperciva Date: Fri May 16 19:15:03 2014 New Revision: 266268 URL: http://svnweb.freebsd.org/changeset/base/266268 Log: Change Xen event channel "last processed" values from per-CPU to global. In FreeBSD 9.x we only run this code on (virtual) CPU #0, so there is no need for these to be per-CPU values. Retain the values in the per-CPU data structure (when compiled with options XENHVM) for KBI compatibility. This is a direct commit to stable/9, since the relevant code has been substantially changed (in ways which cannot be easily MFCed) in HEAD and stable/10. Submitted by: royger (earlier version) Modified: stable/9/sys/amd64/include/pcpu.h stable/9/sys/dev/xen/xenpci/evtchn.c stable/9/sys/i386/include/pcpu.h Modified: stable/9/sys/amd64/include/pcpu.h ============================================================================== --- stable/9/sys/amd64/include/pcpu.h Fri May 16 18:44:23 2014 (r266267) +++ stable/9/sys/amd64/include/pcpu.h Fri May 16 19:15:03 2014 (r266268) @@ -43,6 +43,7 @@ #endif #ifdef XENHVM +/* This is now unused, but remains here for KBI compatibility reasons. */ #define PCPU_XEN_FIELDS \ ; \ unsigned int pc_last_processed_l1i; \ Modified: stable/9/sys/dev/xen/xenpci/evtchn.c ============================================================================== --- stable/9/sys/dev/xen/xenpci/evtchn.c Fri May 16 18:44:23 2014 (r266267) +++ stable/9/sys/dev/xen/xenpci/evtchn.c Fri May 16 19:15:03 2014 (r266268) @@ -68,6 +68,9 @@ static inline unsigned long __ffs(unsign #define is_valid_evtchn(x) ((x) != 0) #define evtchn_from_irq(x) (irq_evtchn[irq].evtchn) +static unsigned int last_processed_l1i; +static unsigned int last_processed_l2i; + static struct { struct mtx lock; driver_intr_t *handler; @@ -317,7 +320,6 @@ evtchn_interrupt(void *arg) int irq, handler_mpsafe; shared_info_t *s = HYPERVISOR_shared_info; vcpu_info_t *v = &s->vcpu_info[cpu]; - struct pcpu *pc = pcpu_find(cpu); unsigned long l1, l2; v->evtchn_upcall_pending = 0; @@ -331,8 +333,8 @@ evtchn_interrupt(void *arg) l1 = atomic_readandclear_long(&v->evtchn_pending_sel); - l1i = pc->pc_last_processed_l1i; - l2i = pc->pc_last_processed_l2i; + l1i = last_processed_l1i; + l2i = last_processed_l2i; while (l1 != 0) { @@ -392,8 +394,8 @@ evtchn_interrupt(void *arg) mtx_unlock(&irq_evtchn[irq].lock); /* if this is the final port processed, we'll pick up here+1 next time */ - pc->pc_last_processed_l1i = l1i; - pc->pc_last_processed_l2i = l2i; + last_processed_l1i = l1i; + last_processed_l2i = l2i; } while (l2i != LONG_BIT - 1); @@ -442,7 +444,7 @@ irq_resume(void) int xenpci_irq_init(device_t device, struct xenpci_softc *scp) { - int irq, cpu; + int irq; int error; mtx_init(&irq_alloc_lock, "xen-irq-lock", NULL, MTX_DEF); @@ -450,10 +452,8 @@ xenpci_irq_init(device_t device, struct for (irq = 0; irq < ARRAY_SIZE(irq_evtchn); irq++) mtx_init(&irq_evtchn[irq].lock, "irq-evtchn", NULL, MTX_DEF); - for (cpu = 0; cpu < mp_ncpus; cpu++) { - pcpu_find(cpu)->pc_last_processed_l1i = LONG_BIT - 1; - pcpu_find(cpu)->pc_last_processed_l2i = LONG_BIT - 1; - } + last_processed_l1i = LONG_BIT - 1; + last_processed_l2i = LONG_BIT - 1; error = BUS_SETUP_INTR(device_get_parent(device), device, scp->res_irq, INTR_MPSAFE|INTR_TYPE_MISC, NULL, evtchn_interrupt, Modified: stable/9/sys/i386/include/pcpu.h ============================================================================== --- stable/9/sys/i386/include/pcpu.h Fri May 16 18:44:23 2014 (r266267) +++ stable/9/sys/i386/include/pcpu.h Fri May 16 19:15:03 2014 (r266268) @@ -78,6 +78,7 @@ struct shadow_time_info { #elif defined(XENHVM) +/* This is now unused, but remains here for KBI compatibility reasons. */ #define PCPU_XEN_FIELDS \ ; \ unsigned int pc_last_processed_l1i; \ From owner-svn-src-stable@FreeBSD.ORG Fri May 16 19:28:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 41BE9E0C; Fri, 16 May 2014 19:28:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 234B72027; Fri, 16 May 2014 19:28:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4GJSOF8050227; Fri, 16 May 2014 19:28:24 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4GJSNBN050222; Fri, 16 May 2014 19:28:23 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201405161928.s4GJSNBN050222@svn.freebsd.org> From: Colin Percival Date: Fri, 16 May 2014 19:28:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266269 - in stable/9/sys: amd64/include i386/include modules modules/xenhvm xen X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 19:28:24 -0000 Author: cperciva Date: Fri May 16 19:28:22 2014 New Revision: 266269 URL: http://svnweb.freebsd.org/changeset/base/266269 Log: Add xenhvm.ko, which can be loaded along with a !XENHVM kernel in order to provide support for the Xen/HVM environment. This code is compiled with XENHVM defined; since this would result in the (no longer used) "last processed" values being included in PCPU data structures, an additional MODXENHVM define is used to exclude those. This allows KBI to be retained for both GENERIC and XENHVM kernel configurations (which are not KBI compatible with each other). This is a direct commit to stable/9, since stable/10 and HEAD have XENHVM merged into the GENERIC kernel configuration (but the changes in stable/10 and HEAD cannot be MFCed as-is). Discussed with: royger, gjb Relnotes: FreeBSD 9.3-RELEASE can run in Xen/HVM environments, including Amazon EC2, using GENERIC + xenhvm.ko. Added: stable/9/sys/modules/xenhvm/ stable/9/sys/modules/xenhvm/Makefile (contents, props changed) stable/9/sys/xen/xenhvm_mod.c (contents, props changed) Modified: stable/9/sys/amd64/include/pcpu.h stable/9/sys/i386/include/pcpu.h stable/9/sys/modules/Makefile Modified: stable/9/sys/amd64/include/pcpu.h ============================================================================== --- stable/9/sys/amd64/include/pcpu.h Fri May 16 19:15:03 2014 (r266268) +++ stable/9/sys/amd64/include/pcpu.h Fri May 16 19:28:22 2014 (r266269) @@ -42,7 +42,7 @@ #endif #endif -#ifdef XENHVM +#if defined(XENHVM) && !defined(MODXENHVM) /* This is now unused, but remains here for KBI compatibility reasons. */ #define PCPU_XEN_FIELDS \ ; \ Modified: stable/9/sys/i386/include/pcpu.h ============================================================================== --- stable/9/sys/i386/include/pcpu.h Fri May 16 19:15:03 2014 (r266268) +++ stable/9/sys/i386/include/pcpu.h Fri May 16 19:28:22 2014 (r266269) @@ -76,7 +76,7 @@ struct shadow_time_info { int pc_virq_to_irq[NR_VIRQS]; \ int pc_ipi_to_irq[NR_IPIS] -#elif defined(XENHVM) +#elif defined(XENHVM) && !defined(MODXENHVM) /* This is now unused, but remains here for KBI compatibility reasons. */ #define PCPU_XEN_FIELDS \ @@ -84,7 +84,7 @@ struct shadow_time_info { unsigned int pc_last_processed_l1i; \ unsigned int pc_last_processed_l2i -#else /* !XEN && !XENHVM */ +#else /* !XEN && (!XENHVM || MODXENHVM) */ #define PCPU_XEN_FIELDS Modified: stable/9/sys/modules/Makefile ============================================================================== --- stable/9/sys/modules/Makefile Fri May 16 19:15:03 2014 (r266268) +++ stable/9/sys/modules/Makefile Fri May 16 19:28:22 2014 (r266269) @@ -361,6 +361,7 @@ SUBDIR= \ ${_wpifw} \ ${_x86bios} \ ${_xe} \ + ${_xenhvm} \ xfs \ xl \ ${_zfs} \ @@ -368,6 +369,7 @@ SUBDIR= \ .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" _filemon= filemon +_xenhvm= xenhvm .endif .if ${MACHINE_CPUARCH} != "powerpc" && ${MACHINE_CPUARCH} != "arm" && \ Added: stable/9/sys/modules/xenhvm/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/sys/modules/xenhvm/Makefile Fri May 16 19:28:22 2014 (r266269) @@ -0,0 +1,21 @@ +# $FreeBSD$ + +KMOD= xenhvm + +DEVXENDIR= ${.CURDIR}/../../dev/xen/ +XENDIR= ${.CURDIR}/../../xen/ +.PATH: ${DEVXENDIR}/balloon ${DEVXENDIR}/blkfront ${DEVXENDIR}/blkback \ + ${DEVXENDIR}/control ${DEVXENDIR}/netback ${DEVXENDIR}/netfront \ + ${DEVXENDIR}/xenpci ${XENDIR}/ ${XENDIR}/evtchn \ + ${XENDIR}/xenbus ${XENDIR}/xenstore + +SRCS= xenhvm_mod.c \ + balloon.c blkfront.c blkback.c control.c netback.c netfront.c \ + xenpci.c evtchn.c gnttab.c features.c evtchn_dev.c \ + xenbus.c xenbusb.c xenbusb_front.c xenbusb_back.c \ + xenbus_if.c xenbus_if.h xenbusb_if.c xenbusb_if.h \ + xenstore.c xenstore_dev.c +MFILES= xen/xenbus/xenbus_if.m xen/xenbus/xenbusb_if.m +CFLAGS+= -DXENHVM -DMODXENHVM + +.include Added: stable/9/sys/xen/xenhvm_mod.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/sys/xen/xenhvm_mod.c Fri May 16 19:28:22 2014 (r266269) @@ -0,0 +1,32 @@ +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +static int +xenhvm_modevent(module_t mod, int type, void *arg) +{ + + switch (type) { + case MOD_LOAD: + if (inw(0x10) == 0x49d2) { + if (bootverbose) + printf("Xen detected: disabling emulated block and network devices\n"); + outw(0x10, 3); + } + return (0); + } + + return (EOPNOTSUPP); +} + +static moduledata_t xenhvm_mod = { + "xenhvm", + xenhvm_modevent, + 0 +}; + +DECLARE_MODULE(xenhvm, xenhvm_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); From owner-svn-src-stable@FreeBSD.ORG Fri May 16 21:56:35 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0CCEF0; Fri, 16 May 2014 21:56:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9B4B32D45; Fri, 16 May 2014 21:56:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4GLuZ5f041470; Fri, 16 May 2014 21:56:35 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4GLuXC5041458; Fri, 16 May 2014 21:56:33 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201405162156.s4GLuXC5041458@svn.freebsd.org> From: Sean Bruno Date: Fri, 16 May 2014 21:56:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266272 - in stable/10: sys/conf sys/kern sys/modules sys/modules/imgact_binmisc sys/sys usr.sbin usr.sbin/binmiscctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 21:56:35 -0000 Author: sbruno Date: Fri May 16 21:56:33 2014 New Revision: 266272 URL: http://svnweb.freebsd.org/changeset/base/266272 Log: MFC r264269, r264282, r264280, r264291, r264276, r264314 Merge sson's binmiscctl and image activator features to stable/10 Submitted by: sson@freebsd.org Added: stable/10/sys/kern/imgact_binmisc.c - copied, changed from r264269, head/sys/kern/imgact_binmisc.c stable/10/sys/modules/imgact_binmisc/ - copied from r264269, head/sys/modules/imgact_binmisc/ stable/10/sys/sys/imgact_binmisc.h - copied, changed from r264269, head/sys/sys/imgact_binmisc.h stable/10/usr.sbin/binmiscctl/ - copied from r264269, head/usr.sbin/binmiscctl/ Modified: stable/10/sys/conf/NOTES stable/10/sys/conf/files.amd64 stable/10/sys/conf/files.i386 stable/10/sys/conf/options.amd64 stable/10/sys/conf/options.i386 stable/10/sys/modules/Makefile stable/10/usr.sbin/Makefile stable/10/usr.sbin/binmiscctl/binmiscctl.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/NOTES ============================================================================== --- stable/10/sys/conf/NOTES Fri May 16 21:20:13 2014 (r266271) +++ stable/10/sys/conf/NOTES Fri May 16 21:56:33 2014 (r266272) @@ -2973,3 +2973,6 @@ options RANDOM_YARROW # Yarrow RNG ##options RANDOM_FORTUNA # Fortuna RNG - not yet implemented options RANDOM_DEBUG # Debugging messages options RANDOM_RWFILE # Read and write entropy cache + +# Module to enable execution of application via emulators like QEMU +options IMAGACT_BINMISC Modified: stable/10/sys/conf/files.amd64 ============================================================================== --- stable/10/sys/conf/files.amd64 Fri May 16 21:20:13 2014 (r266271) +++ stable/10/sys/conf/files.amd64 Fri May 16 21:56:33 2014 (r266272) @@ -450,6 +450,7 @@ dev/virtio/balloon/virtio_balloon.c opti dev/virtio/scsi/virtio_scsi.c optional virtio_scsi isa/syscons_isa.c optional sc isa/vga_isa.c optional vga +kern/imgact_binmisc.c optional imagact_binmisc kern/kern_clocksource.c standard kern/link_elf_obj.c standard # Modified: stable/10/sys/conf/files.i386 ============================================================================== --- stable/10/sys/conf/files.i386 Fri May 16 21:20:13 2014 (r266271) +++ stable/10/sys/conf/files.i386 Fri May 16 21:56:33 2014 (r266272) @@ -533,6 +533,7 @@ isa/syscons_isa.c optional sc isa/vga_isa.c optional vga kern/kern_clocksource.c standard kern/imgact_aout.c optional compat_aout +kern/imgact_binmisc.c optional imagact_binmisc kern/imgact_gzip.c optional gzip libkern/divdi3.c standard libkern/ffsl.c standard Modified: stable/10/sys/conf/options.amd64 ============================================================================== --- stable/10/sys/conf/options.amd64 Fri May 16 21:20:13 2014 (r266271) +++ stable/10/sys/conf/options.amd64 Fri May 16 21:56:33 2014 (r266272) @@ -21,6 +21,7 @@ COMPAT_FREEBSD32 opt_compat.h COMPAT_LINUX32 opt_compat.h #COMPAT_SVR4 opt_dontuse.h #DEBUG_SVR4 opt_svr4.h +IMAGACT_BINMISC opt_dontuse.h LINPROCFS opt_dontuse.h LINSYSFS opt_dontuse.h NDISAPI opt_dontuse.h Modified: stable/10/sys/conf/options.i386 ============================================================================== --- stable/10/sys/conf/options.i386 Fri May 16 21:20:13 2014 (r266271) +++ stable/10/sys/conf/options.i386 Fri May 16 21:56:33 2014 (r266272) @@ -26,6 +26,7 @@ IBCS2 opt_dontuse.h COMPAT_LINUX opt_dontuse.h COMPAT_SVR4 opt_dontuse.h DEBUG_SVR4 opt_svr4.h +IMAGACT_BINMISC opt_binmisc.h LINPROCFS opt_dontuse.h LINSYSFS opt_dontuse.h NDISAPI opt_dontuse.h Copied and modified: stable/10/sys/kern/imgact_binmisc.c (from r264269, head/sys/kern/imgact_binmisc.c) ============================================================================== --- head/sys/kern/imgact_binmisc.c Tue Apr 8 20:10:22 2014 (r264269, copy source) +++ stable/10/sys/kern/imgact_binmisc.c Fri May 16 21:56:33 2014 (r266272) @@ -182,7 +182,7 @@ imgact_binmisc_destroy_entry(imgact_binm { if (!ibe) return; - if (ibe->ibe_mask) + if (ibe->ibe_magic) free(ibe->ibe_magic, M_BINMISC); if (ibe->ibe_mask) free(ibe->ibe_mask, M_BINMISC); Modified: stable/10/sys/modules/Makefile ============================================================================== --- stable/10/sys/modules/Makefile Fri May 16 21:20:13 2014 (r266271) +++ stable/10/sys/modules/Makefile Fri May 16 21:56:33 2014 (r266272) @@ -151,6 +151,7 @@ SUBDIR= \ if_vlan \ ${_igb} \ ${_iir} \ + ${_imgact_binmisc} \ ${_io} \ ${_ipoib} \ ${_ipdivert} \ @@ -377,6 +378,7 @@ SUBDIR= \ .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" _filemon= filemon +_imgact_binmisc= imgact_binmisc _vmware= vmware .endif Copied and modified: stable/10/sys/sys/imgact_binmisc.h (from r264269, head/sys/sys/imgact_binmisc.h) ============================================================================== --- head/sys/sys/imgact_binmisc.h Tue Apr 8 20:10:22 2014 (r264269, copy source) +++ stable/10/sys/sys/imgact_binmisc.h Fri May 16 21:56:33 2014 (r266272) @@ -40,7 +40,7 @@ #define IBE_VERSION 1 /* struct ximgact_binmisc_entry version. */ #define IBE_NAME_MAX 32 /* Max size for entry name. */ #define IBE_MAGIC_MAX 256 /* Max size for header magic and mask. */ -#define IBE_ARG_LEN_MAX 256 /* Max space for optional interpreter command- +#define IBE_ARG_LEN_MAX 256 /* Max space for optional interpreter command- line argruments seperated by white space */ #define IBE_INTERP_LEN_MAX (MAXPATHLEN + IBE_ARG_LEN_MAX) #define IBE_MAX_ENTRIES 64 /* Max number of interpreter entries. */ @@ -70,7 +70,7 @@ typedef struct ximgact_binmisc_entry { /* * sysctl() command names. */ -#define IBE_SYSCTL_NAME "kern.binmisc" +#define IBE_SYSCTL_NAME "kern.binmisc" #define IBE_SYSCTL_NAME_ADD IBE_SYSCTL_NAME ".add" #define IBE_SYSCTL_NAME_REMOVE IBE_SYSCTL_NAME ".remove" @@ -82,7 +82,7 @@ typedef struct ximgact_binmisc_entry { #define KMOD_NAME "imgact_binmisc" /* - * Examples of manipulating he interpreter table using sysctlbyname(3): + * Examples of manipulating the interpreter table using sysctlbyname(3): * * #include * @@ -127,7 +127,7 @@ typedef struct ximgact_binmisc_entry { * xbe.xbe_version = IBE_VERSION; * strlcpy(xbe.xbe_name, "llvm_bc", IBE_NAME_MAX); * error = sysctlbyname(IBE_SYSCTL_NAME_DISABLE, NULL, NULL, &xbe, sizeof(xbe)); - * // OR sysctlbyname(IBE_SYSCTL_NAME_ENABLE", NULL, NULL, &xbe, sizeof(xbe)); + * // OR sysctlbyname(IBE_SYSCTL_NAME_ENABLE, NULL, NULL, &xbe, sizeof(xbe)); * // OR sysctlbyname(IBE_SYSCTL_NAME_REMOVE, NULL, NULL, &xbe, sizeof(xbe)); * * // Lookup image activator "llvm_bc" Modified: stable/10/usr.sbin/Makefile ============================================================================== --- stable/10/usr.sbin/Makefile Fri May 16 21:20:13 2014 (r266271) +++ stable/10/usr.sbin/Makefile Fri May 16 21:56:33 2014 (r266272) @@ -5,6 +5,7 @@ SUBDIR= adduser \ arp \ + binmiscctl \ bootparamd \ bsdconfig \ bsdinstall \ Modified: stable/10/usr.sbin/binmiscctl/binmiscctl.8 ============================================================================== --- head/usr.sbin/binmiscctl/binmiscctl.8 Tue Apr 8 20:10:22 2014 (r264269) +++ stable/10/usr.sbin/binmiscctl/binmiscctl.8 Fri May 16 21:56:33 2014 (r266272) @@ -27,8 +27,8 @@ .\" .\" Support for miscellaneous binary image activators .\" -.Dd May 14, 2013 -.Dt 8 +.Dd April 10, 2014 +.Dt BINMISCCTL 8 .Os .Sh NAME .Nm binmiscctl @@ -37,15 +37,15 @@ .Nm .Cm add .Ar name -.Cm --interpreter +.Cm --interpreter .Ar path -.Cm --magic +.Cm --magic .Ar magic .Cm --size .Ar size -.Op --mask Ar mask -.Op --offset Ar offset -.Op --set-enabled +.Op Cm --mask Ar mask +.Op Cm --offset Ar offset +.Op Cm --set-enabled .Nm .Cm remove .Ar name @@ -65,9 +65,11 @@ The .Nm utility is the management utility for configuring miscellaneous binaries image -activators in the kernel. It allows the adding, deleting, disabling, -enabling, and looking up interpreters. Also, all the interpreters can -be listed as well. +activators in the kernel. +It allows adding, deleting, disabling, +enabling, and looking up interpreters. +Also, all the interpreters can +be listed. .Pp The first argument on the command line indicates the operation to be performed. @@ -76,24 +78,25 @@ Operation must be one of the following: .It Xo .Cm add .Ar name -.Cm --interpreter +.Cm --interpreter .Ar path .Cm --magic .Ar magic .Cm --size .Ar size -.Op --mask Ar mask -.Op --offset Ar offset -.Op --set-enabled +.Op Cm --mask Ar mask +.Op Cm --offset Ar offset +.Op Cm --set-enabled .Xc -Add a new activator entry in the kernel. You must specify an +Add a new activator entry in the kernel. +You must specify a unique .Ar name, -interpreter path and its arguments +interpreter path and its arguments .Ar path, header .Ar magic -bytes that uniquely identifies a suitable binary for the activator, +bytes that uniquely identify a suitable binary for the activator, and the .Ar size of the @@ -103,27 +106,30 @@ in bytes. Optionally you may specify a .Ar mask to do a bitwise AND with the header bytes. - This effectively allows you to ignore fields in the binary header that -do not uniquely indentfy binary file's type. +do not uniquely indentify the binary file's type. .Pp An .Ar offset may be specified for the magic bytes using the -.Ar --offset -argument. By default the +.Cm --offset +option. +By default the .Ar offset is zero. .Pp -To set the activator entry enabled the -.Ar --set-enabled -option is used. The activator default state is disabled. +To enable the activator entry the +.Cm --set-enabled +option is used. +The activator default state is disabled. .Pp The interpreter .Ar path -may also arguments for the interpreter including +may also contain arguments for the interpreter including .Ar #a -which gets replaced by the old argv0 value in the interpreter string. +which gets replaced by the old +.Dv argv0 +value in the interpreter string. .It Cm remove Ar name Remove the activator entry identified with .Ar name . @@ -134,53 +140,57 @@ Disable the activator entry identified w Enable the activator entry identified with .Ar name . .It Cm lookup Ar name -Lookup and print out the activator entry identified with +Look up and print out the activator entry identified with .Ar name . .It Cm list Take a snapshot and print all the activator entries currently configured. .El .Sh EXAMPLES -.Dl binmiscctl add llvmbc --interpreter ''/usr/bin/lli --fake-argv0=#a'' ---magic ''BC\\xc0\\xde'' ---size 4 --set-enabled +.Bl +# binmiscctl add llvmbc --interpreter ''/usr/bin/lli --fake-argv0=#a'' \\ + --magic ''BC\\xc0\\xde'' --size 4 --set-enabled +.El .Pp -Add an image activator to run the the llvm interpreter (lli) on bitcode +Add an image activator to run the LLVM interpreter (lli) on bitcode compiled files. .Ar #a -gets replaced with the old argv0 value so that 'lli' can fake its argv0. +gets replaced with the old +.Dv argv0 +value so that 'lli' can fake its +.Dv argv0 . Set its state to enabled. .Pp -.Dl binmiscctl disable llvmbc +.Dl # binmiscctl disable llvmbc .Pp Set the state of the .Ar llvmbc image activator to disabled. .Pp -.Dl binmiscctl enable llvmbc +.Dl # binmiscctl enable llvmbc .Pp Set the state of the .Ar llvmbc image activator to enabled. .Pp -.Dl binmiscctl remove llvmbc +.Dl # binmiscctl remove llvmbc .Pp Delete the .Ar llvmbc image activator. .Pp -.Dl binmiscctl lookup llvmbc +.Dl # binmiscctl lookup llvmbc .Pp -Lookup and list the record for the +Look up and list the record for the .Ar llvmbc image activator. .Sh SEE ALSO +.Xr lli 1 , .Xr execve 2 -.Xr lli 1 .Sh HISTORY The .Cm binmiscctl command was added in -.Fx 10.0 . +.Fx 10.1 . It was developed to support the imgact_binmisc kernel module. .Sh AUTHORS Stacey D Son From owner-svn-src-stable@FreeBSD.ORG Fri May 16 22:55:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 100D1CFC; Fri, 16 May 2014 22:55:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0EC621C0; Fri, 16 May 2014 22:55:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4GMt1JV077647; Fri, 16 May 2014 22:55:01 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4GMt1GR077643; Fri, 16 May 2014 22:55:01 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405162255.s4GMt1GR077643@svn.freebsd.org> From: Ian Lepore Date: Fri, 16 May 2014 22:55:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266273 - in stable/10/sys: amd64/conf conf i386/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 22:55:02 -0000 Author: ian Date: Fri May 16 22:55:01 2014 New Revision: 266273 URL: http://svnweb.freebsd.org/changeset/base/266273 Log: MFC 264304: Really only allow IMGACT_BINMISC for amd64/i386 builds. Modified: stable/10/sys/amd64/conf/NOTES stable/10/sys/conf/NOTES stable/10/sys/i386/conf/NOTES Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/conf/NOTES ============================================================================== --- stable/10/sys/amd64/conf/NOTES Fri May 16 21:56:33 2014 (r266272) +++ stable/10/sys/amd64/conf/NOTES Fri May 16 22:55:01 2014 (r266273) @@ -650,3 +650,6 @@ device ndis # Linux-specific pseudo devices support device lindev + +# Module to enable execution of application via emulators like QEMU +options IMAGACT_BINMISC Modified: stable/10/sys/conf/NOTES ============================================================================== --- stable/10/sys/conf/NOTES Fri May 16 21:56:33 2014 (r266272) +++ stable/10/sys/conf/NOTES Fri May 16 22:55:01 2014 (r266273) @@ -2973,6 +2973,3 @@ options RANDOM_YARROW # Yarrow RNG ##options RANDOM_FORTUNA # Fortuna RNG - not yet implemented options RANDOM_DEBUG # Debugging messages options RANDOM_RWFILE # Read and write entropy cache - -# Module to enable execution of application via emulators like QEMU -options IMAGACT_BINMISC Modified: stable/10/sys/i386/conf/NOTES ============================================================================== --- stable/10/sys/i386/conf/NOTES Fri May 16 21:56:33 2014 (r266272) +++ stable/10/sys/i386/conf/NOTES Fri May 16 22:55:01 2014 (r266273) @@ -1060,3 +1060,6 @@ options VM_KMEM_SIZE_SCALE # asr old ioctls support, needed by raidutils options ASR_COMPAT + +# Module to enable execution of application via emulators like QEMU +options IMAGACT_BINMISC From owner-svn-src-stable@FreeBSD.ORG Fri May 16 23:27:20 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF42E270; Fri, 16 May 2014 23:27:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B80172417; Fri, 16 May 2014 23:27:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4GNRKKt096245; Fri, 16 May 2014 23:27:20 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4GNRIsh096230; Fri, 16 May 2014 23:27:18 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405162327.s4GNRIsh096230@svn.freebsd.org> From: Ian Lepore Date: Fri, 16 May 2014 23:27:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266274 - in stable/10: sbin/newfs_nandfs sys/arm/allwinner sys/arm/allwinner/a20 sys/arm/arm sys/arm/conf sys/arm/freescale/imx sys/arm/freescale/vybrid sys/arm/ti/omap4 sys/boot/fdt/d... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 23:27:20 -0000 Author: ian Date: Fri May 16 23:27:18 2014 New Revision: 266274 URL: http://svnweb.freebsd.org/changeset/base/266274 Log: MFC 262695, 262708, 262709, 262710, 262711, 262728, 262870, 262877, 262880, 262885, 262891, 262903, imx6: Add a tunable to set the number of active cores, enable SMP by default. ffec: Fix multicast filtering. Allwinner a10/a20... - Add gpio and clock bits for A10/A20's EMAC ethernet controller driver - EMAC gpio configuration - EMAC clock activation - Add Static Random Access Memory controller driver for A10/A20. A10/A20's SRAM is used by devices, such as CPU, EMAC, for extra fast memory or as cache. - Add EMAC 10/100 Ethernet controller driver for A10/A20. It is available mostly in A10 devices like Hackberry, Marsboard, Mele A1000, A2000, A100 HTPC, cubieboard1 and A20 device like cubieboard2. TX performance can be improved using both channels 0 and 1. RX performance is poor and needs improvement with the assistance of external DMA controller in case there - Add EMAC and SRAM controller entries to FDT. - Add EMAC device to kernel config files and enable EMAC, SRAM drivers. OMAP: When calculating the MPU freq, make sure not to overflow. Vybrid: - Add driver for Port control and interrupts (PORT). - Export panel info to DTS - Reset all the layers before setup first one - Enable display nandfs: Slight code reordering to make error branch last. Add option TMPFS to arm/conf/DEFAULTS, remove it from the few configs that have it individually. Concensus on freebsd-arm@ is that it should be included in all ARM kernels. Fix the arm sys_sigreturn(): its argument is a struct ucontext, not a struct sigframe containing the struct ucontext. Added: stable/10/sys/arm/allwinner/a10_gpio.h - copied unchanged from r262708, head/sys/arm/allwinner/a10_gpio.h stable/10/sys/arm/allwinner/a10_sramc.c - copied unchanged from r262709, head/sys/arm/allwinner/a10_sramc.c stable/10/sys/arm/allwinner/a10_sramc.h - copied unchanged from r262709, head/sys/arm/allwinner/a10_sramc.h stable/10/sys/arm/allwinner/if_emac.c - copied unchanged from r262710, head/sys/arm/allwinner/if_emac.c stable/10/sys/arm/allwinner/if_emacreg.h - copied unchanged from r262710, head/sys/arm/allwinner/if_emacreg.h stable/10/sys/arm/freescale/vybrid/vf_port.c - copied unchanged from r262885, head/sys/arm/freescale/vybrid/vf_port.c stable/10/sys/arm/freescale/vybrid/vf_port.h - copied unchanged from r262885, head/sys/arm/freescale/vybrid/vf_port.h Modified: stable/10/sbin/newfs_nandfs/newfs_nandfs.c stable/10/sys/arm/allwinner/a10_clk.c stable/10/sys/arm/allwinner/a10_clk.h stable/10/sys/arm/allwinner/a10_gpio.c stable/10/sys/arm/allwinner/a20/files.a20 stable/10/sys/arm/allwinner/files.a10 stable/10/sys/arm/arm/genassym.c stable/10/sys/arm/arm/locore.S stable/10/sys/arm/arm/machdep.c stable/10/sys/arm/conf/ARNDALE stable/10/sys/arm/conf/BEAGLEBONE stable/10/sys/arm/conf/CUBIEBOARD stable/10/sys/arm/conf/CUBIEBOARD2 stable/10/sys/arm/conf/DEFAULTS stable/10/sys/arm/conf/DIGI-CCWMX53 stable/10/sys/arm/conf/DOCKSTAR stable/10/sys/arm/conf/DREAMPLUG-1001 stable/10/sys/arm/conf/EFIKA_MX stable/10/sys/arm/conf/IMX53-QSB stable/10/sys/arm/conf/IMX6 stable/10/sys/arm/conf/VYBRID.common stable/10/sys/arm/conf/WANDBOARD.common stable/10/sys/arm/freescale/imx/imx6_mp.c stable/10/sys/arm/freescale/vybrid/files.vybrid stable/10/sys/arm/freescale/vybrid/vf_dcu4.c stable/10/sys/arm/freescale/vybrid/vf_gpio.c stable/10/sys/arm/ti/omap4/omap4_prcm_clks.c stable/10/sys/boot/fdt/dts/arm/cubieboard.dts stable/10/sys/boot/fdt/dts/arm/cubieboard2.dts stable/10/sys/boot/fdt/dts/arm/vybrid-quartz.dts stable/10/sys/boot/fdt/dts/arm/vybrid.dtsi stable/10/sys/dev/ffec/if_ffec.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/newfs_nandfs/newfs_nandfs.c ============================================================================== --- stable/10/sbin/newfs_nandfs/newfs_nandfs.c Fri May 16 22:55:01 2014 (r266273) +++ stable/10/sbin/newfs_nandfs/newfs_nandfs.c Fri May 16 23:27:18 2014 (r266274) @@ -988,10 +988,10 @@ calculate_geometry(int fd) /* Get storage erase unit size */ if (!is_nand) erasesize = NANDFS_DEF_ERASESIZE; - else if (ioctl(fd, NAND_IO_GET_CHIP_PARAM, &chip_params) == -1) - errx(1, "Cannot ioctl(NAND_IO_GET_CHIP_PARAM)"); - else + else if (ioctl(fd, NAND_IO_GET_CHIP_PARAM, &chip_params) != -1) erasesize = chip_params.page_size * chip_params.pages_per_block; + else + errx(1, "Cannot ioctl(NAND_IO_GET_CHIP_PARAM)"); debug("erasesize: %#jx", (uintmax_t)erasesize); Modified: stable/10/sys/arm/allwinner/a10_clk.c ============================================================================== --- stable/10/sys/arm/allwinner/a10_clk.c Fri May 16 22:55:01 2014 (r266273) +++ stable/10/sys/arm/allwinner/a10_clk.c Fri May 16 23:27:18 2014 (r266274) @@ -127,7 +127,7 @@ a10_clk_usb_activate(void) uint32_t reg_value; if (sc == NULL) - return ENXIO; + return (ENXIO); /* Gating AHB clock for USB */ reg_value = ccm_read_4(sc, CCM_AHB_GATING0); @@ -154,7 +154,7 @@ a10_clk_usb_deactivate(void) uint32_t reg_value; if (sc == NULL) - return ENXIO; + return (ENXIO); /* Disable clock for USB */ reg_value = ccm_read_4(sc, CCM_USB_CLK); @@ -173,3 +173,19 @@ a10_clk_usb_deactivate(void) return (0); } +int +a10_clk_emac_activate(void) { + struct a10_ccm_softc *sc = a10_ccm_sc; + uint32_t reg_value; + + if (sc == NULL) + return (ENXIO); + + /* Gating AHB clock for EMAC */ + reg_value = ccm_read_4(sc, CCM_AHB_GATING0); + reg_value |= CCM_AHB_GATING_EMAC; + ccm_write_4(sc, CCM_AHB_GATING0, reg_value); + + return (0); +} + Modified: stable/10/sys/arm/allwinner/a10_clk.h ============================================================================== --- stable/10/sys/arm/allwinner/a10_clk.h Fri May 16 22:55:01 2014 (r266273) +++ stable/10/sys/arm/allwinner/a10_clk.h Fri May 16 23:27:18 2014 (r266274) @@ -103,6 +103,7 @@ #define CCM_AHB_GATING_USB0 (1 << 0) #define CCM_AHB_GATING_EHCI0 (1 << 1) #define CCM_AHB_GATING_EHCI1 (1 << 3) +#define CCM_AHB_GATING_EMAC (1 << 17) #define CCM_USB_PHY (1 << 8) #define CCM_USB0_RESET (1 << 0) @@ -111,5 +112,6 @@ int a10_clk_usb_activate(void); int a10_clk_usb_deactivate(void); +int a10_clk_emac_activate(void); #endif /* _A10_CLK_H_ */ Modified: stable/10/sys/arm/allwinner/a10_gpio.c ============================================================================== --- stable/10/sys/arm/allwinner/a10_gpio.c Fri May 16 22:55:01 2014 (r266273) +++ stable/10/sys/arm/allwinner/a10_gpio.c Fri May 16 23:27:18 2014 (r266274) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include "gpio_if.h" +#include "a10_gpio.h" /* * A10 have 9 banks of gpio. @@ -102,6 +103,8 @@ struct a10_gpio_softc { #define A10_GPIO_GP_INT_STA 0x214 #define A10_GPIO_GP_INT_DEB 0x218 +static struct a10_gpio_softc *a10_gpio_sc; + #define A10_GPIO_WRITE(_sc, _off, _val) \ bus_space_write_4(_sc->sc_bst, _sc->sc_bsh, _off, _val) #define A10_GPIO_READ(_sc, _off) \ @@ -473,6 +476,9 @@ a10_gpio_attach(device_t dev) device_add_child(dev, "gpioc", device_get_unit(dev)); device_add_child(dev, "gpiobus", device_get_unit(dev)); + + a10_gpio_sc = sc; + return (bus_generic_attach(dev)); fail: @@ -518,3 +524,19 @@ static driver_t a10_gpio_driver = { }; DRIVER_MODULE(a10_gpio, simplebus, a10_gpio_driver, a10_gpio_devclass, 0, 0); + +int +a10_emac_gpio_config(uint32_t pin) +{ + struct a10_gpio_softc *sc = a10_gpio_sc; + + if (sc == NULL) + return (ENXIO); + + /* Configure pin mux settings for MII. */ + A10_GPIO_LOCK(sc); + a10_gpio_set_function(sc, pin, A10_GPIO_PULLDOWN); + A10_GPIO_UNLOCK(sc); + + return (0); +} Copied: stable/10/sys/arm/allwinner/a10_gpio.h (from r262708, head/sys/arm/allwinner/a10_gpio.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/allwinner/a10_gpio.h Fri May 16 23:27:18 2014 (r266274, copy of r262708, head/sys/arm/allwinner/a10_gpio.h) @@ -0,0 +1,34 @@ +/*- + * Copyright (c) 2013 Ganbold Tsagaankhuu + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +#ifndef _A10_GPIO_H_ +#define _A10_GPIO_H_ + +int a10_emac_gpio_config(uint32_t pin); + +#endif Copied: stable/10/sys/arm/allwinner/a10_sramc.c (from r262709, head/sys/arm/allwinner/a10_sramc.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/allwinner/a10_sramc.c Fri May 16 23:27:18 2014 (r266274, copy of r262709, head/sys/arm/allwinner/a10_sramc.c) @@ -0,0 +1,134 @@ +/*- + * Copyright (c) 2013 Ganbold Tsagaankhuu + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "a10_sramc.h" + +#define SRAM_CTL1_CFG 0x04 + +struct a10_sramc_softc { + struct resource *res; + bus_space_tag_t bst; + bus_space_handle_t bsh; +}; + +static struct a10_sramc_softc *a10_sramc_sc; + +#define sramc_read_4(sc, reg) \ + bus_space_read_4((sc)->bst, (sc)->bsh, (reg)) +#define sramc_write_4(sc, reg, val) \ + bus_space_write_4((sc)->bst, (sc)->bsh, (reg), (val)) + + +static int +a10_sramc_probe(device_t dev) +{ + + if (ofw_bus_is_compatible(dev, "allwinner,sun4i-sramc")) { + device_set_desc(dev, "Allwinner sramc module"); + return (BUS_PROBE_DEFAULT); + } + + return (ENXIO); +} + +static int +a10_sramc_attach(device_t dev) +{ + struct a10_sramc_softc *sc = device_get_softc(dev); + int rid = 0; + + sc->res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); + if (!sc->res) { + device_printf(dev, "could not allocate resource\n"); + return (ENXIO); + } + + sc->bst = rman_get_bustag(sc->res); + sc->bsh = rman_get_bushandle(sc->res); + + a10_sramc_sc = sc; + + return (0); +} + +static device_method_t a10_sramc_methods[] = { + DEVMETHOD(device_probe, a10_sramc_probe), + DEVMETHOD(device_attach, a10_sramc_attach), + { 0, 0 } +}; + +static driver_t a10_sramc_driver = { + "a10_sramc", + a10_sramc_methods, + sizeof(struct a10_sramc_softc), +}; + +static devclass_t a10_sramc_devclass; + +DRIVER_MODULE(a10_sramc, simplebus, a10_sramc_driver, a10_sramc_devclass, 0, 0); + +int +a10_map_to_emac(void) +{ + struct a10_sramc_softc *sc = a10_sramc_sc; + uint32_t reg_value; + + if (sc == NULL) + return (ENXIO); + + /* Map SRAM to EMAC, set bit 2 and 4. */ + reg_value = sramc_read_4(sc, SRAM_CTL1_CFG); + reg_value |= 0x5 << 2; + sramc_write_4(sc, SRAM_CTL1_CFG, reg_value); + + return (0); +} Copied: stable/10/sys/arm/allwinner/a10_sramc.h (from r262709, head/sys/arm/allwinner/a10_sramc.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/allwinner/a10_sramc.h Fri May 16 23:27:18 2014 (r266274, copy of r262709, head/sys/arm/allwinner/a10_sramc.h) @@ -0,0 +1,34 @@ +/*- + * Copyright (c) 2013 Ganbold Tsagaankhuu + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +#ifndef _A10_SRAMC_H_ +#define _A10_SRAMC_H_ + +int a10_map_to_emac(void); + +#endif Modified: stable/10/sys/arm/allwinner/a20/files.a20 ============================================================================== --- stable/10/sys/arm/allwinner/a20/files.a20 Fri May 16 22:55:01 2014 (r266273) +++ stable/10/sys/arm/allwinner/a20/files.a20 Fri May 16 23:27:18 2014 (r266274) @@ -12,8 +12,10 @@ arm/arm/gic.c standard arm/allwinner/a20/a20_cpu_cfg.c standard arm/allwinner/a10_clk.c standard +arm/allwinner/a10_sramc.c standard arm/allwinner/a10_gpio.c optional gpio arm/allwinner/a10_ehci.c optional ehci +arm/allwinner/if_emac.c optional emac arm/allwinner/a10_wdog.c standard arm/allwinner/timer.c standard arm/allwinner/bus_space.c standard Modified: stable/10/sys/arm/allwinner/files.a10 ============================================================================== --- stable/10/sys/arm/allwinner/files.a10 Fri May 16 22:55:01 2014 (r266273) +++ stable/10/sys/arm/allwinner/files.a10 Fri May 16 23:27:18 2014 (r266274) @@ -11,8 +11,10 @@ arm/arm/irq_dispatch.S standard arm/allwinner/a20/a20_cpu_cfg.c standard arm/allwinner/a10_clk.c standard +arm/allwinner/a10_sramc.c standard arm/allwinner/a10_gpio.c optional gpio arm/allwinner/a10_ehci.c optional ehci +arm/allwinner/if_emac.c optional emac arm/allwinner/a10_wdog.c standard arm/allwinner/timer.c standard arm/allwinner/aintc.c standard Copied: stable/10/sys/arm/allwinner/if_emac.c (from r262710, head/sys/arm/allwinner/if_emac.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/allwinner/if_emac.c Fri May 16 23:27:18 2014 (r266274, copy of r262710, head/sys/arm/allwinner/if_emac.c) @@ -0,0 +1,1152 @@ +/*- + * Copyright (c) 2013 Ganbold Tsagaankhuu + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +/* A10/A20 EMAC driver */ + +#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 + +#ifdef INET +#include +#include +#include +#include +#endif + +#include +#include + +#include +#include +#include + +#include +#include + +#include + +#include "miibus_if.h" + +#include "gpio_if.h" + +#include "a10_clk.h" +#include "a10_sramc.h" +#include "a10_gpio.h" + +struct emac_softc { + struct ifnet *emac_ifp; + device_t emac_dev; + device_t emac_miibus; + bus_space_handle_t emac_handle; + bus_space_tag_t emac_tag; + struct resource *emac_res; + struct resource *emac_irq; + void *emac_intrhand; + int emac_if_flags; + struct mtx emac_mtx; + struct callout emac_tick_ch; + int emac_watchdog_timer; + int emac_rx_process_limit; + int emac_link; +}; + +static int emac_probe(device_t); +static int emac_attach(device_t); +static int emac_detach(device_t); +static int emac_shutdown(device_t); +static int emac_suspend(device_t); +static int emac_resume(device_t); + +static void emac_sys_setup(void); +static void emac_reset(struct emac_softc *); + +static void emac_init_locked(struct emac_softc *); +static void emac_start_locked(struct ifnet *); +static void emac_init(void *); +static void emac_stop_locked(struct emac_softc *); +static void emac_intr(void *); +static int emac_ioctl(struct ifnet *, u_long, caddr_t); + +static void emac_rxeof(struct emac_softc *, int); +static void emac_txeof(struct emac_softc *); + +static int emac_miibus_readreg(device_t, int, int); +static int emac_miibus_writereg(device_t, int, int, int); +static void emac_miibus_statchg(device_t); + +static int emac_ifmedia_upd(struct ifnet *); +static void emac_ifmedia_sts(struct ifnet *, struct ifmediareq *); + +static int sysctl_int_range(SYSCTL_HANDLER_ARGS, int, int); +static int sysctl_hw_emac_proc_limit(SYSCTL_HANDLER_ARGS); + +#define EMAC_READ_REG(sc, reg) \ + bus_space_read_4(sc->emac_tag, sc->emac_handle, reg) +#define EMAC_WRITE_REG(sc, reg, val) \ + bus_space_write_4(sc->emac_tag, sc->emac_handle, reg, val) + +static void +emac_sys_setup(void) +{ + int i; + + a10_clk_emac_activate(); + + /* + * Configure pin mux settings for MII. + * Pins PA0 from PA17. + */ + for (i = 0; i <= 17; i++) + a10_emac_gpio_config(i); + /* Map sram */ + a10_map_to_emac(); +} + +static void +emac_get_hwaddr(struct emac_softc *sc, uint8_t *hwaddr) +{ + uint32_t val0, val1, rnd; + + /* + * Try to get MAC address from running hardware. + * If there is something non-zero there just use it. + * + * Otherwise set the address to a convenient locally assigned address, + * 'bsd' + random 24 low-order bits. 'b' is 0x62, which has the locally + * assigned bit set, and the broadcast/multicast bit clear. + */ + val0 = EMAC_READ_REG(sc, EMAC_MAC_A0); + val1 = EMAC_READ_REG(sc, EMAC_MAC_A1); + if ((val0 | val1) != 0 && (val0 | val1) != 0xffffff) { + hwaddr[0] = (val1 >> 16) & 0xff; + hwaddr[1] = (val1 >> 8) & 0xff; + hwaddr[2] = (val1 >> 0) & 0xff; + hwaddr[3] = (val0 >> 16) & 0xff; + hwaddr[4] = (val0 >> 8) & 0xff; + hwaddr[5] = (val0 >> 0) & 0xff; + } else { + rnd = arc4random() & 0x00ffffff; + hwaddr[0] = 'b'; + hwaddr[1] = 's'; + hwaddr[2] = 'd'; + hwaddr[3] = (rnd >> 16) & 0xff; + hwaddr[4] = (rnd >> 8) & 0xff; + hwaddr[5] = (rnd >> 0) & 0xff; + } + if (bootverbose) + printf("MAC address: %s\n", ether_sprintf(hwaddr)); +} + +static void +emac_set_rx_mode(struct emac_softc *sc) +{ + struct ifnet *ifp; + struct ifmultiaddr *ifma; + uint32_t h, hashes[2]; + uint32_t rcr = 0; + + EMAC_ASSERT_LOCKED(sc); + + ifp = sc->emac_ifp; + + rcr = EMAC_READ_REG(sc, EMAC_RX_CTL); + + /* Unicast packet and DA filtering */ + rcr |= EMAC_RX_UCAD; + rcr |= EMAC_RX_DAF; + + hashes[0] = 0; + hashes[1] = 0; + if (ifp->if_flags & IFF_ALLMULTI) { + hashes[0] = 0xffffffff; + hashes[1] = 0xffffffff; + } else { + if_maddr_rlock(ifp); + TAILQ_FOREACH(ifma, &sc->emac_ifp->if_multiaddrs, ifma_link) { + if (ifma->ifma_addr->sa_family != AF_LINK) + continue; + h = ether_crc32_be(LLADDR((struct sockaddr_dl *) + ifma->ifma_addr), ETHER_ADDR_LEN) >> 26; + hashes[h >> 5] |= 1 << (h & 0x1f); + } + if_maddr_runlock(ifp); + } + rcr |= EMAC_RX_MCO; + rcr |= EMAC_RX_MHF; + EMAC_WRITE_REG(sc, EMAC_RX_HASH0, hashes[0]); + EMAC_WRITE_REG(sc, EMAC_RX_HASH1, hashes[1]); + + if (ifp->if_flags & IFF_BROADCAST) { + rcr |= EMAC_RX_BCO; + rcr |= EMAC_RX_MCO; + } + + if (ifp->if_flags & IFF_PROMISC) + rcr |= EMAC_RX_PA; + else + rcr |= EMAC_RX_UCAD; + + EMAC_WRITE_REG(sc, EMAC_RX_CTL, rcr); +} + +static void +emac_reset(struct emac_softc *sc) +{ + + EMAC_WRITE_REG(sc, EMAC_CTL, 0); + DELAY(200); + EMAC_WRITE_REG(sc, EMAC_CTL, 1); + DELAY(200); +} + +static void +emac_txeof(struct emac_softc *sc) +{ + struct ifnet *ifp; + + EMAC_ASSERT_LOCKED(sc); + + ifp = sc->emac_ifp; + ifp->if_opackets++; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + + /* Unarm watchdog timer if no TX */ + sc->emac_watchdog_timer = 0; +} + +static void +emac_rxeof(struct emac_softc *sc, int count) +{ + struct ifnet *ifp; + struct mbuf *m, *m0; + uint32_t reg_val, rxcount; + int16_t len; + uint16_t status; + int good_packet, i; + + ifp = sc->emac_ifp; + for (; count > 0 && + (ifp->if_drv_flags & IFF_DRV_RUNNING) != 0; count--) { + /* + * Race warning: The first packet might arrive with + * the interrupts disabled, but the second will fix + */ + rxcount = EMAC_READ_REG(sc, EMAC_RX_FBC); + if (!rxcount) { + /* Had one stuck? */ + rxcount = EMAC_READ_REG(sc, EMAC_RX_FBC); + if (!rxcount) + return; + } + /* Check packet header */ + reg_val = EMAC_READ_REG(sc, EMAC_RX_IO_DATA); + if (reg_val != EMAC_PACKET_HEADER) { + /* Packet header is wrong */ + if (bootverbose) + if_printf(ifp, "wrong packet header\n"); + /* Disable RX */ + reg_val = EMAC_READ_REG(sc, EMAC_CTL); + reg_val &= ~EMAC_CTL_RX_EN; + EMAC_WRITE_REG(sc, EMAC_CTL, reg_val); + + /* Flush RX FIFO */ + reg_val = EMAC_READ_REG(sc, EMAC_RX_CTL); + reg_val |= EMAC_RX_FLUSH_FIFO; + EMAC_WRITE_REG(sc, EMAC_RX_CTL, reg_val); + for (i = 100; i > 0; i--) { + DELAY(100); + if ((EMAC_READ_REG(sc, EMAC_RX_CTL) & + EMAC_RX_FLUSH_FIFO) == 0) + break; + } + if (i == 0) { + device_printf(sc->emac_dev, + "flush FIFO timeout\n"); + /* Reinitialize controller */ + emac_init_locked(sc); + return; + } + /* Enable RX */ + reg_val = EMAC_READ_REG(sc, EMAC_CTL); + reg_val |= EMAC_CTL_RX_EN; + EMAC_WRITE_REG(sc, EMAC_CTL, reg_val); + + return; + } + + good_packet = 1; + + /* Get packet size and status */ + reg_val = EMAC_READ_REG(sc, EMAC_RX_IO_DATA); + len = reg_val & 0xffff; + status = (reg_val >> 16) & 0xffff; + + if (len < 64) { + good_packet = 0; + if (bootverbose) + if_printf(ifp, + "bad packet: len = %i status = %i\n", + len, status); + ifp->if_ierrors++; + } +#if 0 + if (status & (EMAC_CRCERR | EMAC_LENERR)) { + good_packet = 0; + ifp->if_ierrors++; + if (status & EMAC_CRCERR) + if_printf(ifp, "crc error\n"); + if (status & EMAC_LENERR) + if_printf(ifp, "length error\n"); + } +#endif + if (good_packet) { + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); + if (m == NULL) + return; + m->m_len = m->m_pkthdr.len = MCLBYTES; + + len -= ETHER_CRC_LEN; + + /* Copy entire frame to mbuf first. */ + bus_space_read_multi_4(sc->emac_tag, sc->emac_handle, + EMAC_RX_IO_DATA, mtod(m, uint32_t *), + roundup2(len, 4) / 4); + + m->m_pkthdr.rcvif = ifp; + m->m_len = m->m_pkthdr.len = len; + + /* + * Emac controller needs strict aligment, so to avoid + * copying over an entire frame to align, we allocate + * a new mbuf and copy ethernet header + IP header to + * the new mbuf. The new mbuf is prepended into the + * existing mbuf chain. + */ + if (m->m_len <= (MHLEN - ETHER_HDR_LEN)) { + bcopy(m->m_data, m->m_data + ETHER_HDR_LEN, + m->m_len); + m->m_data += ETHER_HDR_LEN; + } else if (m->m_len <= (MCLBYTES - ETHER_HDR_LEN) && + m->m_len > (MHLEN - ETHER_HDR_LEN)) { + MGETHDR(m0, M_NOWAIT, MT_DATA); + if (m0 != NULL) { + len = ETHER_HDR_LEN + + m->m_pkthdr.l2hlen; + bcopy(m->m_data, m0->m_data, len); + m->m_data += len; + m->m_len -= len; + m0->m_len = len; + M_MOVE_PKTHDR(m0, m); + m0->m_next = m; + m = m0; + } else { + ifp->if_ierrors++; + m_freem(m); + m = NULL; + continue; + } + } else if (m->m_len > EMAC_MAC_MAXF) { + ifp->if_ierrors++; + m_freem(m); + m = NULL; + continue; + } + ifp->if_ipackets++; + EMAC_UNLOCK(sc); + (*ifp->if_input)(ifp, m); + EMAC_LOCK(sc); + } + } +} + +static void +emac_watchdog(struct emac_softc *sc) +{ + struct ifnet *ifp; + + EMAC_ASSERT_LOCKED(sc); + + if (sc->emac_watchdog_timer == 0 || --sc->emac_watchdog_timer) + return; + + ifp = sc->emac_ifp; + + if (sc->emac_link == 0) { + if (bootverbose) + if_printf(sc->emac_ifp, "watchdog timeout " + "(missed link)\n"); + } else + if_printf(sc->emac_ifp, "watchdog timeout -- resetting\n"); + + ifp->if_oerrors++; + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + emac_init_locked(sc); + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + emac_start_locked(ifp); +} + +static void +emac_tick(void *arg) +{ + struct emac_softc *sc; + struct mii_data *mii; + + sc = (struct emac_softc *)arg; + mii = device_get_softc(sc->emac_miibus); + mii_tick(mii); + + emac_watchdog(sc); + callout_reset(&sc->emac_tick_ch, hz, emac_tick, sc); +} + +static void +emac_init(void *xcs) +{ + struct emac_softc *sc; + + sc = (struct emac_softc *)xcs; + EMAC_LOCK(sc); + emac_init_locked(sc); + EMAC_UNLOCK(sc); +} + +static void +emac_init_locked(struct emac_softc *sc) +{ + struct ifnet *ifp; + struct mii_data *mii; + uint32_t reg_val; + uint8_t *eaddr; + + EMAC_ASSERT_LOCKED(sc); + + ifp = sc->emac_ifp; + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + return; + + /* Flush RX FIFO */ + reg_val = EMAC_READ_REG(sc, EMAC_RX_CTL); + reg_val |= EMAC_RX_FLUSH_FIFO; + EMAC_WRITE_REG(sc, EMAC_RX_CTL, reg_val); + DELAY(1); + + /* Soft reset MAC */ + reg_val = EMAC_READ_REG(sc, EMAC_MAC_CTL0); + reg_val &= (~EMAC_MAC_CTL0_SOFT_RST); + EMAC_WRITE_REG(sc, EMAC_MAC_CTL0, reg_val); + + /* Set MII clock */ + reg_val = EMAC_READ_REG(sc, EMAC_MAC_MCFG); + reg_val &= (~(0xf << 2)); + reg_val |= (0xd << 2); + EMAC_WRITE_REG(sc, EMAC_MAC_MCFG, reg_val); + + /* Clear RX counter */ + EMAC_WRITE_REG(sc, EMAC_RX_FBC, 0); + + /* Disable all interrupt and clear interrupt status */ + EMAC_WRITE_REG(sc, EMAC_INT_CTL, 0); + reg_val = EMAC_READ_REG(sc, EMAC_INT_STA); + EMAC_WRITE_REG(sc, EMAC_INT_STA, reg_val); + DELAY(1); + + /* Set up TX */ + reg_val = EMAC_READ_REG(sc, EMAC_TX_MODE); + reg_val |= EMAC_TX_AB_M; + reg_val &= EMAC_TX_TM; + EMAC_WRITE_REG(sc, EMAC_TX_MODE, reg_val); + + /* Set up RX */ + reg_val = EMAC_READ_REG(sc, EMAC_RX_CTL); + reg_val |= EMAC_RX_SETUP; + reg_val &= EMAC_RX_TM; + EMAC_WRITE_REG(sc, EMAC_RX_CTL, reg_val); + + /* Set up MAC CTL0. */ + reg_val = EMAC_READ_REG(sc, EMAC_MAC_CTL0); + reg_val |= EMAC_MAC_CTL0_SETUP; + EMAC_WRITE_REG(sc, EMAC_MAC_CTL0, reg_val); + + /* Set up MAC CTL1. */ + reg_val = EMAC_READ_REG(sc, EMAC_MAC_CTL1); + reg_val |= EMAC_MAC_CTL1_SETUP; + EMAC_WRITE_REG(sc, EMAC_MAC_CTL1, reg_val); + + /* Set up IPGT */ + EMAC_WRITE_REG(sc, EMAC_MAC_IPGT, EMAC_MAC_IPGT_FD); + + /* Set up IPGR */ + EMAC_WRITE_REG(sc, EMAC_MAC_IPGR, EMAC_MAC_NBTB_IPG2 | + (EMAC_MAC_NBTB_IPG1 << 8)); + + /* Set up Collison window */ + EMAC_WRITE_REG(sc, EMAC_MAC_CLRT, EMAC_MAC_RM | (EMAC_MAC_CW << 8)); + + /* Set up Max Frame Length */ + EMAC_WRITE_REG(sc, EMAC_MAC_MAXF, EMAC_MAC_MFL); + + /* Setup ethernet address */ + eaddr = IF_LLADDR(ifp); + EMAC_WRITE_REG(sc, EMAC_MAC_A1, eaddr[0] << 16 | + eaddr[1] << 8 | eaddr[2]); + EMAC_WRITE_REG(sc, EMAC_MAC_A0, eaddr[3] << 16 | + eaddr[4] << 8 | eaddr[5]); + + /* Setup rx filter */ + emac_set_rx_mode(sc); + + /* Enable RX/TX0/RX Hlevel interrupt */ + reg_val = EMAC_READ_REG(sc, EMAC_INT_CTL); + reg_val |= EMAC_INT_EN; + EMAC_WRITE_REG(sc, EMAC_INT_CTL, reg_val); + + ifp->if_drv_flags |= IFF_DRV_RUNNING; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + + sc->emac_link = 0; + + /* Switch to the current media. */ + mii = device_get_softc(sc->emac_miibus); + mii_mediachg(mii); + + callout_reset(&sc->emac_tick_ch, hz, emac_tick, sc); +} + + +static void +emac_start(struct ifnet *ifp) +{ + struct emac_softc *sc; + + sc = ifp->if_softc; + EMAC_LOCK(sc); + emac_start_locked(ifp); + EMAC_UNLOCK(sc); +} + +static void +emac_start_locked(struct ifnet *ifp) +{ + struct emac_softc *sc; + struct mbuf *m, *m0; + uint32_t reg_val; + + sc = ifp->if_softc; + if (ifp->if_drv_flags & IFF_DRV_OACTIVE) + return; + if (sc->emac_link == 0) + return; + IFQ_DRV_DEQUEUE(&ifp->if_snd, m); + if (m == NULL) + return; + + /* Select channel */ + EMAC_WRITE_REG(sc, EMAC_TX_INS, 0); + + /* + * Emac controller wants 4 byte aligned TX buffers. + * We have to copy pretty much all the time. + */ + if (m->m_next != NULL || (mtod(m, uintptr_t) & 3) != 0) { + m0 = m_defrag(m, M_NOWAIT); + if (m0 == NULL) { + m_freem(m); + m = NULL; + return; + } + m = m0; + } + /* Write data */ + bus_space_write_multi_4(sc->emac_tag, sc->emac_handle, + EMAC_TX_IO_DATA, mtod(m, uint32_t *), + roundup2(m->m_len, 4) / 4); + + /* Send the data lengh. */ + EMAC_WRITE_REG(sc, EMAC_TX_PL0, m->m_len); + + /* Start translate from fifo to phy. */ + reg_val = EMAC_READ_REG(sc, EMAC_TX_CTL0); + reg_val |= 1; + EMAC_WRITE_REG(sc, EMAC_TX_CTL0, reg_val); + + /* Set timeout */ + sc->emac_watchdog_timer = 5; + + ifp->if_drv_flags |= IFF_DRV_OACTIVE; + BPF_MTAP(ifp, m); + m_freem(m); +} + +static void +emac_stop_locked(struct emac_softc *sc) +{ + struct ifnet *ifp; + uint32_t reg_val; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Fri May 16 23:49:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23BEA956; Fri, 16 May 2014 23:49:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F95C25CA; Fri, 16 May 2014 23:49:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4GNnevG008609; Fri, 16 May 2014 23:49:40 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4GNneLp008606; Fri, 16 May 2014 23:49:40 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405162349.s4GNneLp008606@svn.freebsd.org> From: Ian Lepore Date: Fri, 16 May 2014 23:49:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266275 - in stable/10/sys/arm: samsung/exynos ti X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 23:49:41 -0000 Author: ian Date: Fri May 16 23:49:40 2014 New Revision: 266275 URL: http://svnweb.freebsd.org/changeset/base/266275 Log: MFC 258211, 257775, 258096, Add mbox and pruss drivers to ti build. Use common bus_space-v6 instead of local copies. Deleted: stable/10/sys/arm/samsung/exynos/bus_space.c stable/10/sys/arm/ti/bus_space.c Modified: stable/10/sys/arm/samsung/exynos/exynos5_machdep.c stable/10/sys/arm/samsung/exynos/files.exynos5 stable/10/sys/arm/ti/files.ti Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/samsung/exynos/exynos5_machdep.c ============================================================================== --- stable/10/sys/arm/samsung/exynos/exynos5_machdep.c Fri May 16 23:27:18 2014 (r266274) +++ stable/10/sys/arm/samsung/exynos/exynos5_machdep.c Fri May 16 23:49:40 2014 (r266275) @@ -30,27 +30,25 @@ #include __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE +#define _ARM32_BUS_DMA_PRIVATE #include #include #include #include -#include +#include #include #include #include #include -#define DEVMAP_BOOTSTRAP_MAP_START 0xF0000000 - vm_offset_t initarm_lastaddr(void) { - return (DEVMAP_BOOTSTRAP_MAP_START); + return (arm_devmap_lastaddr()); } void @@ -62,35 +60,22 @@ initarm_early_init(void) void initarm_gpio_init(void) { + } void initarm_late_init(void) { + } -#define FDT_DEVMAP_MAX (1 + 2 + 1 + 1) /* FIXME */ -static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = { - { 0, 0, 0, 0, 0, } -}; - -/* - * Construct pmap_devmap[] with DT-derived config data. - */ int initarm_devmap_init(void) { - int i; - i = 0; - fdt_devmap[i].pd_va = 0xf2C00000; - fdt_devmap[i].pd_pa = 0x12C00000; - fdt_devmap[i].pd_size = 0x100000; - fdt_devmap[i].pd_prot = VM_PROT_READ | VM_PROT_WRITE; - fdt_devmap[i].pd_cache = PTE_NOCACHE; - i++; + /* UART */ + arm_devmap_add_entry(0x12C00000, 0x100000); - arm_devmap_register_table(&fdt_devmap[0]); return (0); } Modified: stable/10/sys/arm/samsung/exynos/files.exynos5 ============================================================================== --- stable/10/sys/arm/samsung/exynos/files.exynos5 Fri May 16 23:27:18 2014 (r266274) +++ stable/10/sys/arm/samsung/exynos/files.exynos5 Fri May 16 23:49:40 2014 (r266275) @@ -10,12 +10,12 @@ arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard arm/arm/irq_dispatch.S standard +arm/arm/bus_space-v6.c standard arm/arm/gic.c standard arm/arm/generic_timer.c standard arm/samsung/exynos/arch_timer.c standard arm/samsung/exynos/exynos5_mp.c optional smp -arm/samsung/exynos/bus_space.c standard arm/samsung/exynos/common.c standard arm/samsung/exynos/exynos5_machdep.c standard arm/samsung/exynos/uart.c optional uart Modified: stable/10/sys/arm/ti/files.ti ============================================================================== --- stable/10/sys/arm/ti/files.ti Fri May 16 23:27:18 2014 (r266274) +++ stable/10/sys/arm/ti/files.ti Fri May 16 23:49:40 2014 (r266275) @@ -2,6 +2,7 @@ kern/kern_clocksource.c standard +arm/arm/bus_space-v6.c standard arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard arm/arm/cpufunc_asm_armv5.S standard @@ -10,12 +11,14 @@ arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard arm/arm/irq_dispatch.S standard -arm/ti/bus_space.c standard arm/ti/common.c standard arm/ti/ti_cpuid.c standard arm/ti/ti_machdep.c standard arm/ti/ti_prcm.c standard arm/ti/ti_scm.c standard +dev/mbox/mbox_if.m standard +arm/ti/ti_mbox.c standard +arm/ti/ti_pruss.c standard arm/ti/ti_gpio.c optional gpio arm/ti/ti_i2c.c optional ti_i2c From owner-svn-src-stable@FreeBSD.ORG Sat May 17 00:53:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BEA4F8F7; Sat, 17 May 2014 00:53:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A6E7F2AD8; Sat, 17 May 2014 00:53:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4H0rFke050845; Sat, 17 May 2014 00:53:15 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4H0rD0f050831; Sat, 17 May 2014 00:53:13 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405170053.s4H0rD0f050831@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 00:53:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266277 - in stable/10/sys: arm/allwinner arm/allwinner/a20 arm/arm arm/at91 arm/broadcom/bcm2835 arm/conf arm/freescale/imx arm/include arm/mv arm/rockchip arm/samsung/exynos arm/tegra... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 00:53:15 -0000 Author: ian Date: Sat May 17 00:53:12 2014 New Revision: 266277 URL: http://svnweb.freebsd.org/changeset/base/266277 Log: MFC 257774, 256760, 262916, 262905, 262918, 262919, 262920, 262921, 262924, 262925, 262929, 262932, 262935, 262940, 262941, 262942, 262948, 262949, 262950 Strip arm/conf/DEFAULTS down to just items that are mandatory for running the architecture. Move all the files named foo/common.c to foo/foo_common.c Initial cut for DTS on the hl201 board. Add commented out dts for sam9260ek as well as early printf support. Make clock optional on uart nodes, then back it out ("I don't know what I was thinking, but it is lame.") Set the baud rate if it isn't 0 Make at91_soc_id() public. Properly round at91 resource on unmapping. Move AT91 AIC related stuff to own file. Fix another bug in multicast filtering. i.MX uses 6 bits from MSB in LE CRC32 for the hash value, not the lowest 6 bits in BE CRC32. Follow r262916 with one more config file that references a renamed common.c Remove bogus AT91 define that causes compile errors. Most of the defines for SAM9X are going away soonish anyway (once FDT works), but until then... Remove all dregs of a per-thread undefined-exception-mode stack. Rework the VFP code that handles demand-based save and restore of state. Always call vfp_discard() on thread death. When a thread begins life it doesn't own the VFP hardware state on any cpu. Make undefined exception entry MP-safe. Added: stable/10/sys/arm/allwinner/a10_common.c - copied unchanged from r262916, head/sys/arm/allwinner/a10_common.c stable/10/sys/arm/at91/at91_aic.c - copied unchanged from r262925, head/sys/arm/at91/at91_aic.c stable/10/sys/arm/broadcom/bcm2835/bcm2835_common.c - copied unchanged from r262916, head/sys/arm/broadcom/bcm2835/bcm2835_common.c stable/10/sys/arm/freescale/imx/imx_common.c - copied unchanged from r262916, head/sys/arm/freescale/imx/imx_common.c stable/10/sys/arm/mv/mv_common.c - copied unchanged from r262916, head/sys/arm/mv/mv_common.c stable/10/sys/arm/rockchip/rk30xx_common.c - copied unchanged from r262916, head/sys/arm/rockchip/rk30xx_common.c stable/10/sys/arm/samsung/exynos/exynos5_common.c - copied unchanged from r262916, head/sys/arm/samsung/exynos/exynos5_common.c stable/10/sys/arm/tegra/tegra2_common.c - copied unchanged from r262916, head/sys/arm/tegra/tegra2_common.c stable/10/sys/arm/ti/ti_common.c - copied unchanged from r262916, head/sys/arm/ti/ti_common.c stable/10/sys/arm/versatile/versatile_common.c - copied unchanged from r262916, head/sys/arm/versatile/versatile_common.c stable/10/sys/boot/fdt/dts/arm/hl201.dts - copied unchanged from r262918, head/sys/boot/fdt/dts/arm/hl201.dts Deleted: stable/10/sys/arm/allwinner/common.c stable/10/sys/arm/broadcom/bcm2835/bus_space.c stable/10/sys/arm/broadcom/bcm2835/common.c stable/10/sys/arm/freescale/imx/common.c stable/10/sys/arm/mv/common.c stable/10/sys/arm/rockchip/common.c stable/10/sys/arm/samsung/exynos/common.c stable/10/sys/arm/tegra/common.c stable/10/sys/arm/ti/common.c stable/10/sys/arm/versatile/common.c Modified: stable/10/sys/arm/allwinner/a20/files.a20 stable/10/sys/arm/allwinner/files.a10 stable/10/sys/arm/arm/exception.S stable/10/sys/arm/arm/genassym.c stable/10/sys/arm/arm/machdep.c stable/10/sys/arm/arm/swtch.S stable/10/sys/arm/arm/undefined.c stable/10/sys/arm/arm/vfp.c stable/10/sys/arm/arm/vm_machdep.c stable/10/sys/arm/at91/at91.c stable/10/sys/arm/at91/at91rm9200.c stable/10/sys/arm/at91/at91sam9g20.c stable/10/sys/arm/at91/at91sam9g20reg.h stable/10/sys/arm/at91/at91sam9x5.c stable/10/sys/arm/at91/files.at91 stable/10/sys/arm/broadcom/bcm2835/files.bcm2835 stable/10/sys/arm/conf/AC100 stable/10/sys/arm/conf/ARMADAXP stable/10/sys/arm/conf/ARNDALE stable/10/sys/arm/conf/ATMEL stable/10/sys/arm/conf/AVILA stable/10/sys/arm/conf/BEAGLEBONE stable/10/sys/arm/conf/BWCT stable/10/sys/arm/conf/CAMBRIA stable/10/sys/arm/conf/CNS11XXNAS stable/10/sys/arm/conf/CRB stable/10/sys/arm/conf/CUBIEBOARD stable/10/sys/arm/conf/CUBIEBOARD2 stable/10/sys/arm/conf/DB-78XXX stable/10/sys/arm/conf/DB-88F5XXX stable/10/sys/arm/conf/DB-88F6XXX stable/10/sys/arm/conf/DEFAULTS stable/10/sys/arm/conf/DIGI-CCWMX53 stable/10/sys/arm/conf/DOCKSTAR stable/10/sys/arm/conf/DREAMPLUG-1001 stable/10/sys/arm/conf/EA3250 stable/10/sys/arm/conf/EB9200 stable/10/sys/arm/conf/EFIKA_MX stable/10/sys/arm/conf/EP80219 stable/10/sys/arm/conf/ETHERNUT5 stable/10/sys/arm/conf/GUMSTIX stable/10/sys/arm/conf/HL200 stable/10/sys/arm/conf/HL201 stable/10/sys/arm/conf/IMX53-QSB stable/10/sys/arm/conf/IMX6 stable/10/sys/arm/conf/IQ31244 stable/10/sys/arm/conf/KB920X stable/10/sys/arm/conf/LN2410SBC stable/10/sys/arm/conf/NSLU stable/10/sys/arm/conf/PANDABOARD stable/10/sys/arm/conf/QILA9G20 stable/10/sys/arm/conf/RADXA stable/10/sys/arm/conf/RPI-B stable/10/sys/arm/conf/SAM9260EK stable/10/sys/arm/conf/SAM9G20EK stable/10/sys/arm/conf/SAM9X25EK stable/10/sys/arm/conf/SHEEVAPLUG stable/10/sys/arm/conf/SIMICS stable/10/sys/arm/conf/SN9G45 stable/10/sys/arm/conf/TS7800 stable/10/sys/arm/conf/VERSATILEPB stable/10/sys/arm/conf/VYBRID.common stable/10/sys/arm/conf/ZEDBOARD stable/10/sys/arm/freescale/imx/files.imx51 stable/10/sys/arm/freescale/imx/files.imx53 stable/10/sys/arm/freescale/imx/files.imx6 stable/10/sys/arm/include/param.h stable/10/sys/arm/include/pcb.h stable/10/sys/arm/include/pcpu.h stable/10/sys/arm/include/vfp.h stable/10/sys/arm/mv/files.mv stable/10/sys/arm/mv/mvreg.h stable/10/sys/arm/rockchip/files.rk30xx stable/10/sys/arm/samsung/exynos/files.exynos5 stable/10/sys/arm/tegra/files.tegra2 stable/10/sys/arm/ti/files.ti stable/10/sys/arm/versatile/files.versatile stable/10/sys/dev/ffec/if_ffec.c stable/10/sys/dev/uart/uart_bus_fdt.c Directory Properties: stable/10/ (props changed) Copied: stable/10/sys/arm/allwinner/a10_common.c (from r262916, head/sys/arm/allwinner/a10_common.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/allwinner/a10_common.c Sat May 17 00:53:12 2014 (r266277, copy of r262916, head/sys/arm/allwinner/a10_common.c) @@ -0,0 +1,69 @@ +/*- + * Copyright (c) 2012 Ganbold Tsagaankhuu + * All rights reserved. + * + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +struct fdt_fixup_entry fdt_fixup_table[] = { + { NULL, NULL } +}; + +static int +fdt_aintc_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, + int *pol) +{ + int offset; + + if (fdt_is_compatible(node, "allwinner,sun4i-ic")) + offset = 0; + else if (fdt_is_compatible(node, "arm,gic")) + offset = 32; + else + return (ENXIO); + + *interrupt = fdt32_to_cpu(intr[0]) + offset; + *trig = INTR_TRIGGER_CONFORM; + *pol = INTR_POLARITY_CONFORM; + + return (0); +} + +fdt_pic_decode_t fdt_pic_table[] = { + &fdt_aintc_decode_ic, + NULL +}; Modified: stable/10/sys/arm/allwinner/a20/files.a20 ============================================================================== --- stable/10/sys/arm/allwinner/a20/files.a20 Sat May 17 00:09:12 2014 (r266276) +++ stable/10/sys/arm/allwinner/a20/files.a20 Sat May 17 00:53:12 2014 (r266277) @@ -19,5 +19,5 @@ arm/allwinner/if_emac.c optional emac arm/allwinner/a10_wdog.c standard arm/allwinner/timer.c standard arm/allwinner/bus_space.c standard -arm/allwinner/common.c standard +arm/allwinner/a10_common.c standard arm/allwinner/a10_machdep.c standard Modified: stable/10/sys/arm/allwinner/files.a10 ============================================================================== --- stable/10/sys/arm/allwinner/files.a10 Sat May 17 00:09:12 2014 (r266276) +++ stable/10/sys/arm/allwinner/files.a10 Sat May 17 00:53:12 2014 (r266277) @@ -9,16 +9,16 @@ arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard arm/arm/irq_dispatch.S standard -arm/allwinner/a20/a20_cpu_cfg.c standard arm/allwinner/a10_clk.c standard -arm/allwinner/a10_sramc.c standard +arm/allwinner/a10_common.c standard arm/allwinner/a10_gpio.c optional gpio arm/allwinner/a10_ehci.c optional ehci -arm/allwinner/if_emac.c optional emac +arm/allwinner/a10_machdep.c standard +arm/allwinner/a10_sramc.c standard arm/allwinner/a10_wdog.c standard -arm/allwinner/timer.c standard +arm/allwinner/a20/a20_cpu_cfg.c standard arm/allwinner/aintc.c standard +arm/allwinner/if_emac.c optional emac +arm/allwinner/timer.c standard arm/allwinner/bus_space.c standard -arm/allwinner/common.c standard #arm/allwinner/console.c standard -arm/allwinner/a10_machdep.c standard Modified: stable/10/sys/arm/arm/exception.S ============================================================================== --- stable/10/sys/arm/arm/exception.S Sat May 17 00:09:12 2014 (r266276) +++ stable/10/sys/arm/arm/exception.S Sat May 17 00:53:12 2014 (r266277) @@ -218,46 +218,25 @@ END(exception_exit) * look like direct entry from the vector. */ ASENTRY_NP(undefined_entry) - stmfd sp!, {r0, r1} - ldr r0, Lundefined_handler_indirection - ldr r1, [sp], #0x0004 - str r1, [r0, #0x0000] - ldr r1, [sp], #0x0004 - str r1, [r0, #0x0004] - ldmia r0, {r0, r1, pc} - -Lundefined_handler_indirection: - .word Lundefined_handler_indirection_data + sub lr, lr, #0x00000004 /* Adjust the lr */ + PUSHFRAMEINSVC /* Push trap frame and switch */ + /* to SVC32 mode */ + ldr r1, Lundefined_handler_address + adr lr, exception_exit + mov r0, sp /* pass the stack pointer as r0 */ + ldr pc, [r1] END(undefined_entry) -/* - * assembly bounce code for calling the kernel - * undefined instruction handler. This uses - * a standard trap frame and is called in SVC mode. - */ - -ENTRY_NP(undefinedinstruction_bounce) - PUSHFRAMEINSVC +ASENTRY_NP(undefinedinstruction_bounce) + b undefinedinstruction +END(undefinedinstruction_bounce) - mov r0, sp - adr lr, exception_exit - b _C_LABEL(undefinedinstruction) +Lundefined_handler_address: + .word _C_LABEL(undefined_handler_address) .data - .align 0 - -/* - * Indirection data - * 2 words use for preserving r0 and r1 - * 3rd word contains the undefined handler address. - */ - -Lundefined_handler_indirection_data: - .word 0 - .word 0 - .global _C_LABEL(undefined_handler_address) _C_LABEL(undefined_handler_address): - .word _C_LABEL(undefinedinstruction_bounce) -END(undefinedinstruction_bounce) + .word undefinedinstruction_bounce + Modified: stable/10/sys/arm/arm/genassym.c ============================================================================== --- stable/10/sys/arm/arm/genassym.c Sat May 17 00:09:12 2014 (r266276) +++ stable/10/sys/arm/arm/genassym.c Sat May 17 00:53:12 2014 (r266277) @@ -60,7 +60,6 @@ ASSYM(PCB_NOALIGNFLT, PCB_NOALIGNFLT); ASSYM(PCB_ONFAULT, offsetof(struct pcb, pcb_onfault)); ASSYM(PCB_DACR, offsetof(struct pcb, pcb_dacr)); ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags)); -ASSYM(PCB_UND_SP, offsetof(struct pcb, un_32.pcb32_und_sp)); ASSYM(PCB_PAGEDIR, offsetof(struct pcb, pcb_pagedir)); ASSYM(PCB_L1VEC, offsetof(struct pcb, pcb_l1vec)); ASSYM(PCB_PL1VEC, offsetof(struct pcb, pcb_pl1vec)); @@ -119,9 +118,7 @@ ASSYM(ARM_RAS_END, ARM_RAS_END); #ifdef VFP ASSYM(PCB_VFPSTATE, offsetof(struct pcb, pcb_vfpstate)); -ASSYM(PCB_VFPCPU, offsetof(struct pcb, pcb_vfpcpu)); -ASSYM(PC_VFPCTHREAD, offsetof(struct pcpu, pc_vfpcthread)); ASSYM(PC_CPU, offsetof(struct pcpu, pc_cpu)); ASSYM(PC_CURPMAP, offsetof(struct pcpu, pc_curpmap)); Modified: stable/10/sys/arm/arm/machdep.c ============================================================================== --- stable/10/sys/arm/arm/machdep.c Sat May 17 00:09:12 2014 (r266276) +++ stable/10/sys/arm/arm/machdep.c Sat May 17 00:53:12 2014 (r266277) @@ -379,8 +379,6 @@ cpu_startup(void *dummy) bufinit(); vm_pager_bufferinit(); - pcb->un_32.pcb32_und_sp = (u_int)thread0.td_kstack + - USPACE_UNDEF_STACK_TOP; pcb->un_32.pcb32_sp = (u_int)thread0.td_kstack + USPACE_SVC_STACK_TOP; vector_page_setprot(VM_PROT_READ); @@ -995,6 +993,7 @@ init_proc0(vm_offset_t kstack) thread0.td_pcb = (struct pcb *) (thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1; thread0.td_pcb->pcb_flags = 0; + thread0.td_pcb->pcb_vfpcpu = -1; thread0.td_frame = &proc0_tf; pcpup->pc_curpcb = thread0.td_pcb; } Modified: stable/10/sys/arm/arm/swtch.S ============================================================================== --- stable/10/sys/arm/arm/swtch.S Sat May 17 00:09:12 2014 (r266276) +++ stable/10/sys/arm/arm/swtch.S Sat May 17 00:53:12 2014 (r266277) @@ -84,6 +84,8 @@ #include #include #include +#include + __FBSDID("$FreeBSD$"); #define DOMAIN_CLIENT 0x01 @@ -102,6 +104,10 @@ __FBSDID("$FreeBSD$"); ldr tmp, .Lcurpcpu #endif +#ifdef VFP + .fpu vfp /* allow VFP instructions */ +#endif + .Lcurpcpu: .word _C_LABEL(__pcpu) .word PCPU_SIZE @@ -118,20 +124,11 @@ ENTRY(cpu_throw) * r5 = newtd */ - GET_PCPU(r7, r9) - -#ifdef VFP - /* - * vfp_discard will clear pcpu->pc_vfpcthread, and modify - * and modify the control as needed. - */ - ldr r4, [r7, #(PC_VFPCTHREAD)] /* this thread using vfp? */ - cmp r0, r4 - bne 3f - bl _C_LABEL(vfp_discard) /* yes, shut down vfp */ -3: -#endif /* VFP */ +#ifdef VFP /* This thread is dying, disable */ + bl _C_LABEL(vfp_discard) /* VFP without preserving state. */ +#endif + GET_PCPU(r7, r9) ldr r7, [r5, #(TD_PCB)] /* r7 = new thread's PCB */ /* Switch to lwp0 context */ @@ -303,46 +300,19 @@ ENTRY(cpu_switch) /* Get the user structure for the new process in r9 */ ldr r9, [r1, #(TD_PCB)] - mrs r3, cpsr - /* - * We can do that, since - * PSR_SVC32_MODE|PSR_UND32_MODE == MSR_UND32_MODE - */ - orr r8, r3, #(PSR_UND32_MODE) - msr cpsr_c, r8 - - str sp, [r2, #(PCB_UND_SP)] - - msr cpsr_c, r3 /* Restore the old mode */ /* rem: r2 = old PCB */ /* rem: r9 = new PCB */ /* rem: interrupts are enabled */ #ifdef VFP - /* - * vfp_store will clear pcpu->pc_vfpcthread, save - * registers and state, and modify the control as needed. - * a future exception will bounce the backup settings in the fp unit. - * XXX vfp_store can't change r4 - */ - GET_PCPU(r7, r8) - ldr r8, [r7, #(PC_VFPCTHREAD)] - cmp r4, r8 /* old thread used vfp? */ - bne 1f /* no, don't save */ - cmp r1, r4 /* same thread ? */ - beq 1f /* yes, skip vfp store */ -#ifdef SMP - ldr r8, [r7, #(PC_CPU)] /* last used on this cpu? */ - ldr r3, [r2, #(PCB_VFPCPU)] - cmp r8, r3 /* last cpu to use these registers? */ - bne 1f /* no. these values are stale */ + fmrx r0, fpexc /* If the VFP is enabled */ + tst r0, #(VFPEXC_EN) /* the current thread has */ + movne r1, #1 /* used it, so go save */ + addne r0, r2, #(PCB_VFPSTATE) /* the state into the PCB */ + blne _C_LABEL(vfp_store) /* and disable the VFP. */ #endif - add r0, r2, #(PCB_VFPSTATE) - bl _C_LABEL(vfp_store) -1: -#endif /* VFP */ - /* r1 now free! */ + /* r0-r3 now free! */ /* Third phase : restore saved context */ @@ -438,10 +408,6 @@ ENTRY(cpu_switch) movne r0, #0 /* We *know* vector_page's VA is 0x0 */ movne lr, pc ldrne pc, [r10, #CF_TLB_FLUSHID_SE] - /* - * We can do that, since - * PSR_SVC32_MODE|PSR_UND32_MODE == MSR_UND32_MODE - */ .Lcs_context_switched: @@ -460,17 +426,6 @@ ENTRY(cpu_switch) /* rem: r9 = new PCB */ - mrs r3, cpsr - /* - * We can do that, since - * PSR_SVC32_MODE|PSR_UND32_MODE == MSR_UND32_MODE - */ - orr r2, r3, #(PSR_UND32_MODE) - msr cpsr_c, r2 - - ldr sp, [r9, #(PCB_UND_SP)] - - msr cpsr_c, r3 /* Restore the old mode */ /* Restore all the save registers */ #ifndef _ARM_ARCH_5E add r7, r9, #PCB_R8 @@ -520,26 +475,12 @@ ENTRY(savectx) add r2, r0, #(PCB_R8) stmia r2, {r8-r13} #ifdef VFP - /* - * vfp_store will clear pcpu->pc_vfpcthread, save - * registers and state, and modify the control as needed. - * a future exception will bounce the backup settings in the fp unit. - */ - GET_PCPU(r7, r4) - ldr r4, [r7, #(PC_VFPCTHREAD)] /* vfp thread */ - ldr r2, [r7, #(PC_CURTHREAD)] /* current thread */ - cmp r4, r2 - bne 1f -#ifdef SMP - ldr r2, [r7, #(PC_CPU)] /* last used on this cpu? */ - ldr r3, [r0, #(PCB_VFPCPU)] - cmp r2, r3 - bne 1f /* no. these values are stale */ + fmrx r2, fpexc /* If the VFP is enabled */ + tst r2, #(VFPEXC_EN) /* the current thread has */ + movne r1, #1 /* used it, so go save */ + addne r0, r0, #(PCB_VFPSTATE) /* the state into the PCB */ + blne _C_LABEL(vfp_store) /* and disable the VFP. */ #endif - add r0, r0, #(PCB_VFPSTATE) - bl _C_LABEL(vfp_store) -1: -#endif /* VFP */ add sp, sp, #4; ldmfd sp!, {r4-r7, pc} END(savectx) Modified: stable/10/sys/arm/arm/undefined.c ============================================================================== --- stable/10/sys/arm/arm/undefined.c Sat May 17 00:09:12 2014 (r266276) +++ stable/10/sys/arm/arm/undefined.c Sat May 17 00:53:12 2014 (r266277) @@ -183,7 +183,6 @@ undefinedinstruction(struct trapframe *f if (!(frame->tf_spsr & I32_bit)) enable_interrupts(I32_bit|F32_bit); - frame->tf_pc -= INSN_SIZE; PCPU_INC(cnt.v_trap); fault_pc = frame->tf_pc; Modified: stable/10/sys/arm/arm/vfp.c ============================================================================== --- stable/10/sys/arm/arm/vfp.c Sat May 17 00:09:12 2014 (r266276) +++ stable/10/sys/arm/arm/vfp.c Sat May 17 00:53:12 2014 (r266277) @@ -1,4 +1,5 @@ -/* +/*- + * Copyright (c) 2014 Ian Lepore * Copyright (c) 2012 Mark Tinguely * * All rights reserved. @@ -34,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -41,12 +43,8 @@ __FBSDID("$FreeBSD$"); #include /* function prototypes */ -unsigned int get_coprocessorACR(void); static int vfp_bounce(u_int, u_int, struct trapframe *, int); static void vfp_restore(struct vfp_state *); -void vfp_discard(void); -void vfp_store(struct vfp_state *); -void set_coprocessorACR(u_int); extern int vfp_exists; static struct undefined_handler vfp10_uh, vfp11_uh; @@ -64,7 +62,20 @@ static int is_d32; val; \ }) -u_int +/* + * Work around an issue with GCC where the asm it generates is not unified + * syntax and fails to assemble because it expects the ldcleq instruction in the + * form ldcl, not in the UAL form ldcl, and similar for stcleq. + */ +#ifdef __clang__ +#define LDCLNE "ldclne " +#define STCLNE "stclne " +#else +#define LDCLNE "ldcnel " +#define STCLNE "stcnel " +#endif + +static u_int get_coprocessorACR(void) { u_int val; @@ -72,7 +83,7 @@ get_coprocessorACR(void) return val; } -void +static void set_coprocessorACR(u_int val) { __asm __volatile("mcr p15, 0, %0, c1, c0, 2\n\t" @@ -136,147 +147,105 @@ SYSINIT(vfp, SI_SUB_CPU, SI_ORDER_ANY, v static int vfp_bounce(u_int addr, u_int insn, struct trapframe *frame, int code) { - u_int fpexc; + u_int cpu, fpexc; struct pcb *curpcb; - struct thread *vfptd; - int i; - if (!vfp_exists) - return 1; /* vfp does not exist */ - i = disable_interrupts(I32_bit|F32_bit); - fpexc = fmrx(VFPEXC); /* read the vfp exception reg */ - if (fpexc & VFPEXC_EN) { - vfptd = PCPU_GET(vfpcthread); - /* did the kernel call the vfp or exception that expect us - * to emulate the command. Newer hardware does not require - * emulation, so we don't emulate yet. - */ -#ifdef SMP - /* don't save if newer registers are on another processor */ - if (vfptd /* && (vfptd == curthread) */ && - (vfptd->td_pcb->pcb_vfpcpu == PCPU_GET(cpu))) -#else - /* someone did not save their registers, */ - if (vfptd /* && (vfptd == curthread) */) -#endif - vfp_store(&vfptd->td_pcb->pcb_vfpstate); + if ((code & FAULT_USER) == 0) + panic("undefined floating point instruction in supervisor mode"); - fpexc &= ~VFPEXC_EN; - fmxr(VFPEXC, fpexc); /* turn vfp hardware off */ - if (vfptd == curthread) { - /* kill the process - we do not handle emulation */ - restore_interrupts(i); - killproc(curthread->td_proc, "vfp emulation"); - return 1; - } - /* should not happen. someone did not save their context */ - printf("vfp_bounce: vfpcthread: %p curthread: %p\n", - vfptd, curthread); + critical_enter(); + + /* + * If the VFP is already on and we got an undefined instruction, then + * something tried to executate a truly invalid instruction that maps to + * the VFP. + */ + fpexc = fmrx(VFPEXC); + if (fpexc & VFPEXC_EN) { + /* kill the process - we do not handle emulation */ + critical_exit(); + killproc(curthread->td_proc, "vfp emulation"); + return 1; } - fpexc |= VFPEXC_EN; - fmxr(VFPEXC, fpexc); /* enable the vfp and repeat command */ - curpcb = curthread->td_pcb; - /* If we were the last process to use the VFP, the process did not - * use a VFP on another processor, then the registers in the VFP - * will still be ours and are current. Eventually, we will make the - * restore smarter. + + /* + * If the last time this thread used the VFP it was on this core, and + * the last thread to use the VFP on this core was this thread, then the + * VFP state is valid, otherwise restore this thread's state to the VFP. */ - vfp_restore(&curpcb->pcb_vfpstate); -#ifdef SMP - curpcb->pcb_vfpcpu = PCPU_GET(cpu); -#endif - PCPU_SET(vfpcthread, curthread); - restore_interrupts(i); - return 0; + fmxr(VFPEXC, fpexc | VFPEXC_EN); + curpcb = curthread->td_pcb; + cpu = PCPU_GET(cpu); + if (curpcb->pcb_vfpcpu != cpu || curthread != PCPU_GET(fpcurthread)) { + vfp_restore(&curpcb->pcb_vfpstate); + curpcb->pcb_vfpcpu = cpu; + PCPU_SET(fpcurthread, curthread); + } + + critical_exit(); + return (0); } -/* vfs_store is called from from a VFP command to restore the registers and - * turn on the VFP hardware. - * Eventually we will use the information that this process was the last - * to use the VFP hardware and bypass the restore, just turn on the hardware. +/* + * Restore the given state to the VFP hardware. */ static void vfp_restore(struct vfp_state *vfpsave) { u_int vfpscr = 0; - /* - * Work around an issue with GCC where the asm it generates is - * not unified syntax and fails to assemble because it expects - * the ldcleq instruction in the form ldcl, not in the UAL - * form ldcl, and similar for stcleq. - */ -#ifdef __clang__ -#define ldclne "ldclne" -#define stclne "stclne" -#else -#define ldclne "ldcnel" -#define stclne "stcnel" -#endif - if (vfpsave) { - __asm __volatile("ldc p10, c0, [%1], #128\n" /* d0-d15 */ + __asm __volatile("ldc p10, c0, [%1], #128\n" /* d0-d15 */ "cmp %2, #0\n" /* -D16 or -D32? */ - ldclne" p11, c0, [%1], #128\n" /* d16-d31 */ + LDCLNE "p11, c0, [%1], #128\n" /* d16-d31 */ "addeq %1, %1, #128\n" /* skip missing regs */ "ldr %0, [%1]\n" /* set old vfpscr */ "mcr p10, 7, %0, cr1, c0, 0\n" : "=&r" (vfpscr) : "r" (vfpsave), "r" (is_d32) : "cc"); - } } -/* vfs_store is called from switch to save the vfp hardware registers - * into the pcb before switching to another process. - * we already know that the new process is different from this old - * process and that this process last used the VFP registers. - * Below we check to see if the VFP has been enabled since the last - * register save. - * This routine will exit with the VFP turned off. The next VFP user - * will trap to restore its registers and turn on the VFP hardware. +/* + * If the VFP is on, save its current state and turn it off if requested to do + * so. If the VFP is not on, does not change the values at *vfpsave. Caller is + * responsible for preventing a context switch while this is running. */ void -vfp_store(struct vfp_state *vfpsave) +vfp_store(struct vfp_state *vfpsave, boolean_t disable_vfp) { - u_int tmp, vfpscr = 0; + u_int tmp, vfpscr; tmp = fmrx(VFPEXC); /* Is the vfp enabled? */ - if (vfpsave && (tmp & VFPEXC_EN)) { - __asm __volatile("stc p11, c0, [%1], #128\n" /* d0-d15 */ + if (tmp & VFPEXC_EN) { + __asm __volatile( + "stc p11, c0, [%1], #128\n" /* d0-d15 */ "cmp %2, #0\n" /* -D16 or -D32? */ - stclne" p11, c0, [%1], #128\n" /* d16-d31 */ + STCLNE "p11, c0, [%1], #128\n" /* d16-d31 */ "addeq %1, %1, #128\n" /* skip missing regs */ "mrc p10, 7, %0, cr1, c0, 0\n" /* fmxr(VFPSCR) */ "str %0, [%1]\n" /* save vfpscr */ : "=&r" (vfpscr) : "r" (vfpsave), "r" (is_d32) : "cc"); + if (disable_vfp) + fmxr(VFPEXC , tmp & ~VFPEXC_EN); } -#undef ldcleq -#undef stcleq - -#ifndef SMP - /* eventually we will use this information for UP also */ - PCPU_SET(vfpcthread, 0); -#endif - tmp &= ~VFPEXC_EN; /* disable the vfp hardware */ - fmxr(VFPEXC , tmp); } -/* discard the registers at cpu_thread_free() when fpcurthread == td. - * Turn off the VFP hardware. +/* + * The current thread is dying. If the state currently in the hardware belongs + * to the current thread, set fpcurthread to NULL to indicate that the VFP + * hardware state does not belong to any thread. If the VFP is on, turn it off. + * Called only from cpu_throw(), so we don't have to worry about a context + * switch here. */ void -vfp_discard() +vfp_discard(struct thread *td) { - u_int tmp = 0; + u_int tmp; + + if (PCPU_GET(fpcurthread) == td) + PCPU_SET(fpcurthread, NULL); - /* - * No need to protect the access to vfpcthread by disabling - * interrupts, since it's called from cpu_throw(), who is called - * with interrupts disabled. - */ - - PCPU_SET(vfpcthread, 0); /* permanent forget about reg */ tmp = fmrx(VFPEXC); - tmp &= ~VFPEXC_EN; /* turn off VFP hardware */ - fmxr(VFPEXC, tmp); + if (tmp & VFPEXC_EN) + fmxr(VFPEXC, tmp & ~VFPEXC_EN); } #endif Modified: stable/10/sys/arm/arm/vm_machdep.c ============================================================================== --- stable/10/sys/arm/arm/vm_machdep.c Sat May 17 00:09:12 2014 (r266276) +++ stable/10/sys/arm/arm/vm_machdep.c Sat May 17 00:53:12 2014 (r266277) @@ -144,9 +144,9 @@ cpu_fork(register struct thread *td1, re bcopy(td1->td_pcb, pcb2, sizeof(*pcb2)); mdp2 = &p2->p_md; bcopy(&td1->td_proc->p_md, mdp2, sizeof(*mdp2)); - pcb2->un_32.pcb32_und_sp = td2->td_kstack + USPACE_UNDEF_STACK_TOP; pcb2->un_32.pcb32_sp = td2->td_kstack + USPACE_SVC_STACK_TOP - sizeof(*pcb2); + pcb2->pcb_vfpcpu = -1; pmap_activate(td2); td2->td_frame = tf = (struct trapframe *)STACKALIGN( pcb2->un_32.pcb32_sp - sizeof(struct trapframe)); @@ -366,7 +366,6 @@ cpu_set_upcall(struct thread *td, struct tf->tf_spsr &= ~PSR_C_bit; tf->tf_r0 = 0; td->td_pcb->un_32.pcb32_sp = (u_int)sf; - td->td_pcb->un_32.pcb32_und_sp = td->td_kstack + USPACE_UNDEF_STACK_TOP; KASSERT((td->td_pcb->un_32.pcb32_sp & 7) == 0, ("cpu_set_upcall: Incorrect stack alignment")); Modified: stable/10/sys/arm/at91/at91.c ============================================================================== --- stable/10/sys/arm/at91/at91.c Sat May 17 00:09:12 2014 (r266276) +++ stable/10/sys/arm/at91/at91.c Sat May 17 00:53:12 2014 (r266277) @@ -24,6 +24,8 @@ * SUCH DAMAGE. */ +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); @@ -49,12 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include -static struct at91_softc *at91_softc; - -static void at91_eoi(void *); - -extern const struct arm_devmap_entry at91_devmap[]; - uint32_t at91_master_clock; static int @@ -84,8 +80,12 @@ at91_bs_unmap(void *t, bus_space_handle_ { vm_offset_t va, endva; + if (t == 0) + return; va = trunc_page((vm_offset_t)t); - endva = va + round_page(size); + if (va >= AT91_BASE && va <= AT91_BASE + 0xff00000) + return; + endva = round_page((vm_offset_t)t + size); /* Free the kernel virtual mapping. */ kva_free(va, endva - va); @@ -229,6 +229,12 @@ struct bus_space at91_bs_tag = { NULL, }; +#ifndef FDT + +static struct at91_softc *at91_softc; + +static void at91_eoi(void *); + static int at91_probe(device_t dev) { @@ -260,7 +266,6 @@ static int at91_attach(device_t dev) { struct at91_softc *sc = device_get_softc(dev); - int i; arm_post_filter = at91_eoi; @@ -290,29 +295,6 @@ at91_attach(device_t dev) 0xfffffffful) != 0) panic("at91_attach: failed to set up memory rman"); - /* - * Setup the interrupt table. - */ - if (soc_info.soc_data == NULL || soc_info.soc_data->soc_irq_prio == NULL) - panic("Interrupt priority table missing\n"); - for (i = 0; i < 32; i++) { - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SVR + - i * 4, i); - /* Priority. */ - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SMR + i * 4, - soc_info.soc_data->soc_irq_prio[i]); - if (i < 8) - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_EOICR, - 1); - } - - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SPU, 32); - /* No debug. */ - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_DCR, 0); - /* Disable and clear all interrupts. */ - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_IDCR, 0xffffffff); - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_ICCR, 0xffffffff); - /* * Add this device's children... */ @@ -472,42 +454,6 @@ at91_print_child(device_t dev, device_t return (retval); } -void -arm_mask_irq(uintptr_t nb) -{ - - bus_space_write_4(at91_softc->sc_st, - at91_softc->sc_aic_sh, IC_IDCR, 1 << nb); -} - -int -arm_get_next_irq(int last __unused) -{ - int status; - int irq; - - irq = bus_space_read_4(at91_softc->sc_st, - at91_softc->sc_aic_sh, IC_IVR); - status = bus_space_read_4(at91_softc->sc_st, - at91_softc->sc_aic_sh, IC_ISR); - if (status == 0) { - bus_space_write_4(at91_softc->sc_st, - at91_softc->sc_aic_sh, IC_EOICR, 1); - return (-1); - } - return (irq); -} - -void -arm_unmask_irq(uintptr_t nb) -{ - - bus_space_write_4(at91_softc->sc_st, - at91_softc->sc_aic_sh, IC_IECR, 1 << nb); - bus_space_write_4(at91_softc->sc_st, at91_softc->sc_aic_sh, - IC_EOICR, 0); -} - static void at91_eoi(void *unused) { @@ -584,3 +530,4 @@ static driver_t at91_driver = { static devclass_t at91_devclass; DRIVER_MODULE(atmelarm, nexus, at91_driver, at91_devclass, 0, 0); +#endif Copied: stable/10/sys/arm/at91/at91_aic.c (from r262925, head/sys/arm/at91/at91_aic.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/at91/at91_aic.c Sat May 17 00:53:12 2014 (r266277, copy of r262925, head/sys/arm/at91/at91_aic.c) @@ -0,0 +1,188 @@ +/*- + * Copyright (c) 2014 Warner Losh. All rights reserved. + * + * 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 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 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. + */ + +#include "opt_platform.h" + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include + +#ifdef FDT +#include +#include +#include +#endif + +static struct aic_softc { + struct resource *mem_res; /* Memory resource */ + void *intrhand; /* Interrupt handle */ + device_t sc_dev; +} *sc; + +static inline uint32_t +RD4(struct aic_softc *sc, bus_size_t off) +{ + + return (bus_read_4(sc->mem_res, off)); +} + +static inline void +WR4(struct aic_softc *sc, bus_size_t off, uint32_t val) +{ + + bus_write_4(sc->mem_res, off, val); +} + +void +arm_mask_irq(uintptr_t nb) +{ + + WR4(sc, IC_IDCR, 1 << nb); +} + +int +arm_get_next_irq(int last __unused) +{ + int status; + int irq; + + irq = RD4(sc, IC_IVR); + status = RD4(sc, IC_ISR); + if (status == 0) { + WR4(sc, IC_EOICR, 1); + return (-1); + } + return (irq); +} + +void +arm_unmask_irq(uintptr_t nb) +{ + + WR4(sc, IC_IECR, 1 << nb); + WR4(sc, IC_EOICR, 0); +} + +static int +at91_aic_probe(device_t dev) +{ +#ifdef FDT + if (!ofw_bus_is_compatible(dev, "atmel,at91rm9200-aic")) + return (ENXIO); +#endif + device_set_desc(dev, "AIC"); + return (0); +} + +static int +at91_aic_attach(device_t dev) +{ + int i, rid, err = 0; + + device_printf(dev, "Attach %d\n", bus_current_pass); + + sc = device_get_softc(dev); + sc->sc_dev = dev; + + rid = 0; + sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + + if (sc->mem_res == NULL) + panic("couldn't allocate register resources"); + + /* + * Setup the interrupt table. + */ + if (soc_info.soc_data == NULL || soc_info.soc_data->soc_irq_prio == NULL) + panic("Interrupt priority table missing\n"); + for (i = 0; i < 32; i++) { + WR4(sc, IC_SVR + i * 4, i); + /* Priority. */ + WR4(sc, IC_SMR + i * 4, soc_info.soc_data->soc_irq_prio[i]); + if (i < 8) + WR4(sc, IC_EOICR, 1); + } + + WR4(sc, IC_SPU, 32); + /* No debug. */ + WR4(sc, IC_DCR, 0); + /* Disable and clear all interrupts. */ + WR4(sc, IC_IDCR, 0xffffffff); + WR4(sc, IC_ICCR, 0xffffffff); + enable_interrupts(I32_bit | F32_bit); + + return (err); +} + +static void +at91_aic_new_pass(device_t dev) +{ + device_printf(dev, "Pass %d\n", bus_current_pass); +} + +static device_method_t at91_aic_methods[] = { + DEVMETHOD(device_probe, at91_aic_probe), + DEVMETHOD(device_attach, at91_aic_attach), + DEVMETHOD(bus_new_pass, at91_aic_new_pass), + DEVMETHOD_END +}; + +static driver_t at91_aic_driver = { + "at91_aic", + at91_aic_methods, + sizeof(struct aic_softc), +}; + +static devclass_t at91_aic_devclass; + +#ifdef FDT +DRIVER_MODULE(at91_aic, simplebus, at91_aic_driver, at91_aic_devclass, NULL, + NULL); +#else +DRIVER_MODULE(at91_aic, atmelarm, at91_aic_driver, at91_aic_devclass, NULL, + NULL); +#endif +/* not yet +EARLY_DRIVER_MODULE(at91_aic, simplebus, at91_aic_driver, at91_aic_devclass, + NULL, NULL, BUS_PASS_INTERRUPT); +*/ Modified: stable/10/sys/arm/at91/at91rm9200.c ============================================================================== --- stable/10/sys/arm/at91/at91rm9200.c Sat May 17 00:09:12 2014 (r266276) +++ stable/10/sys/arm/at91/at91rm9200.c Sat May 17 00:53:12 2014 (r266277) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat May 17 00:55:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AA62DA52; Sat, 17 May 2014 00:55:05 +0000 (UTC) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91D132AE7; Sat, 17 May 2014 00:55:05 +0000 (UTC) Received: from zeppelin.tachypleus.net (airbears2-136-152-142-26.AirBears2.Berkeley.EDU [136.152.142.26]) (authenticated bits=0) by d.mail.sonic.net (8.14.4/8.14.4) with ESMTP id s4H0eQ7c024826 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 16 May 2014 17:40:26 -0700 Message-ID: <5376AFFA.3010902@freebsd.org> Date: Fri, 16 May 2014 17:40:26 -0700 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r266273 - in stable/10/sys: amd64/conf conf i386/conf References: <201405162255.s4GMt1GR077643@svn.freebsd.org> In-Reply-To: <201405162255.s4GMt1GR077643@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-ID: C;FryD1lvd4xG4vFMaeQW9yA== M;wtir1lvd4xG4vFMaeQW9yA== X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 00:55:05 -0000 I missed the original commit of this, but why doesn't this code work on non-x86 systems? QEMU works perfectly fine on other architectures. -Nathan On 05/16/14 15:55, Ian Lepore wrote: > Author: ian > Date: Fri May 16 22:55:01 2014 > New Revision: 266273 > URL: http://svnweb.freebsd.org/changeset/base/266273 > > Log: > MFC 264304: Really only allow IMGACT_BINMISC for amd64/i386 builds. > > Modified: > stable/10/sys/amd64/conf/NOTES > stable/10/sys/conf/NOTES > stable/10/sys/i386/conf/NOTES > Directory Properties: > stable/10/ (props changed) > > Modified: stable/10/sys/amd64/conf/NOTES > ============================================================================== > --- stable/10/sys/amd64/conf/NOTES Fri May 16 21:56:33 2014 (r266272) > +++ stable/10/sys/amd64/conf/NOTES Fri May 16 22:55:01 2014 (r266273) > @@ -650,3 +650,6 @@ device ndis > > # Linux-specific pseudo devices support > device lindev > + > +# Module to enable execution of application via emulators like QEMU > +options IMAGACT_BINMISC > > Modified: stable/10/sys/conf/NOTES > ============================================================================== > --- stable/10/sys/conf/NOTES Fri May 16 21:56:33 2014 (r266272) > +++ stable/10/sys/conf/NOTES Fri May 16 22:55:01 2014 (r266273) > @@ -2973,6 +2973,3 @@ options RANDOM_YARROW # Yarrow RNG > ##options RANDOM_FORTUNA # Fortuna RNG - not yet implemented > options RANDOM_DEBUG # Debugging messages > options RANDOM_RWFILE # Read and write entropy cache > - > -# Module to enable execution of application via emulators like QEMU > -options IMAGACT_BINMISC > > Modified: stable/10/sys/i386/conf/NOTES > ============================================================================== > --- stable/10/sys/i386/conf/NOTES Fri May 16 21:56:33 2014 (r266272) > +++ stable/10/sys/i386/conf/NOTES Fri May 16 22:55:01 2014 (r266273) > @@ -1060,3 +1060,6 @@ options VM_KMEM_SIZE_SCALE > # asr old ioctls support, needed by raidutils > > options ASR_COMPAT > + > +# Module to enable execution of application via emulators like QEMU > +options IMAGACT_BINMISC > From owner-svn-src-stable@FreeBSD.ORG Sat May 17 01:00:01 2014 Return-Path: Delivered-To: svn-src-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C875BCB; Sat, 17 May 2014 01:00:01 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F5412B07; Sat, 17 May 2014 01:00:00 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1WlSye-000CNO-Jh; Sat, 17 May 2014 00:59:52 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id s4H0xovj039866; Fri, 16 May 2014 18:59:50 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX19S3Uh7qOC70gBMjlbLEgdg Subject: Re: svn commit: r266273 - in stable/10/sys: amd64/conf conf i386/conf From: Ian Lepore To: Nathan Whitehorn In-Reply-To: <5376AFFA.3010902@freebsd.org> References: <201405162255.s4GMt1GR077643@svn.freebsd.org> <5376AFFA.3010902@freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Fri, 16 May 2014 18:59:49 -0600 Message-ID: <1400288389.1152.1.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-10@FreeBSD.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 01:00:01 -0000 We need to ask Sean Bruno about that. I just noticed that this change hadn't been merged along with the others it was related to when it caused me a build error. -- Ian On Fri, 2014-05-16 at 17:40 -0700, Nathan Whitehorn wrote: > I missed the original commit of this, but why doesn't this code work on > non-x86 systems? QEMU works perfectly fine on other architectures. > -Nathan > > On 05/16/14 15:55, Ian Lepore wrote: > > Author: ian > > Date: Fri May 16 22:55:01 2014 > > New Revision: 266273 > > URL: http://svnweb.freebsd.org/changeset/base/266273 > > > > Log: > > MFC 264304: Really only allow IMGACT_BINMISC for amd64/i386 builds. > > > > Modified: > > stable/10/sys/amd64/conf/NOTES > > stable/10/sys/conf/NOTES > > stable/10/sys/i386/conf/NOTES > > Directory Properties: > > stable/10/ (props changed) > > > > Modified: stable/10/sys/amd64/conf/NOTES > > ============================================================================== > > --- stable/10/sys/amd64/conf/NOTES Fri May 16 21:56:33 2014 (r266272) > > +++ stable/10/sys/amd64/conf/NOTES Fri May 16 22:55:01 2014 (r266273) > > @@ -650,3 +650,6 @@ device ndis > > > > # Linux-specific pseudo devices support > > device lindev > > + > > +# Module to enable execution of application via emulators like QEMU > > +options IMAGACT_BINMISC > > > > Modified: stable/10/sys/conf/NOTES > > ============================================================================== > > --- stable/10/sys/conf/NOTES Fri May 16 21:56:33 2014 (r266272) > > +++ stable/10/sys/conf/NOTES Fri May 16 22:55:01 2014 (r266273) > > @@ -2973,6 +2973,3 @@ options RANDOM_YARROW # Yarrow RNG > > ##options RANDOM_FORTUNA # Fortuna RNG - not yet implemented > > options RANDOM_DEBUG # Debugging messages > > options RANDOM_RWFILE # Read and write entropy cache > > - > > -# Module to enable execution of application via emulators like QEMU > > -options IMAGACT_BINMISC > > > > Modified: stable/10/sys/i386/conf/NOTES > > ============================================================================== > > --- stable/10/sys/i386/conf/NOTES Fri May 16 21:56:33 2014 (r266272) > > +++ stable/10/sys/i386/conf/NOTES Fri May 16 22:55:01 2014 (r266273) > > @@ -1060,3 +1060,6 @@ options VM_KMEM_SIZE_SCALE > > # asr old ioctls support, needed by raidutils > > > > options ASR_COMPAT > > + > > +# Module to enable execution of application via emulators like QEMU > > +options IMAGACT_BINMISC > > > > From owner-svn-src-stable@FreeBSD.ORG Sat May 17 01:17:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A7123FB2; Sat, 17 May 2014 01:17:13 +0000 (UTC) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 857B92C6D; Sat, 17 May 2014 01:17:12 +0000 (UTC) Received: from [10.2.254.235] (unknown [137.122.78.9]) (using SSLv3 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 1494C194107; Sat, 17 May 2014 01:17:11 +0000 (UTC) Subject: Re: svn commit: r266273 - in stable/10/sys: amd64/conf conf i386/conf From: Sean Bruno Reply-To: sbruno@freebsd.org To: Ian Lepore In-Reply-To: <201405162255.s4GMt1GR077643@svn.freebsd.org> References: <201405162255.s4GMt1GR077643@svn.freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Fri, 16 May 2014 21:17:09 -0400 Message-ID: <1400289429.1535.0.camel@bruno> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 01:17:13 -0000 On Fri, 2014-05-16 at 22:55 +0000, Ian Lepore wrote: > Author: ian > Date: Fri May 16 22:55:01 2014 > New Revision: 266273 > URL: http://svnweb.freebsd.org/changeset/base/266273 > > Log: > MFC 264304: Really only allow IMGACT_BINMISC for amd64/i386 builds. Bah, thanks! sean From owner-svn-src-stable@FreeBSD.ORG Sat May 17 01:18:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 00FC0190; Sat, 17 May 2014 01:18:08 +0000 (UTC) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D1CEA2C75; Sat, 17 May 2014 01:18:07 +0000 (UTC) Received: from [10.2.254.235] (unknown [137.122.78.9]) (using SSLv3 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id D3900194107; Sat, 17 May 2014 01:18:06 +0000 (UTC) Subject: Re: svn commit: r266273 - in stable/10/sys: amd64/conf conf i386/conf From: Sean Bruno Reply-To: sbruno@freebsd.org To: Nathan Whitehorn In-Reply-To: <5376AFFA.3010902@freebsd.org> References: <201405162255.s4GMt1GR077643@svn.freebsd.org> <5376AFFA.3010902@freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Fri, 16 May 2014 21:18:06 -0400 Message-ID: <1400289486.1535.1.camel@bruno> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org, Ian Lepore X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 01:18:08 -0000 On Fri, 2014-05-16 at 17:40 -0700, Nathan Whitehorn wrote: > I missed the original commit of this, but why doesn't this code work on > non-x86 systems? QEMU works perfectly fine on other architectures. > -Nathan I am only supporting this on x86 systems, if there is someone who is using this actively on ${ARCH} then I see no reason to enable it there. sean From owner-svn-src-stable@FreeBSD.ORG Sat May 17 02:32:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 957FD98; Sat, 17 May 2014 02:32:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 812CC21E4; Sat, 17 May 2014 02:32:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4H2WmCZ011460; Sat, 17 May 2014 02:32:48 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4H2Wlxx011451; Sat, 17 May 2014 02:32:47 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201405170232.s4H2Wlxx011451@svn.freebsd.org> From: Bryan Drewery Date: Sat, 17 May 2014 02:32:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266279 - in stable/10: bin/ps rescue/rescue X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 02:32:48 -0000 Author: bdrewery Date: Sat May 17 02:32:47 2014 New Revision: 266279 URL: http://svnweb.freebsd.org/changeset/base/266279 Log: MFC r265229,r265239: Add -J to filter by matching jail IDs and names. Modified: stable/10/bin/ps/Makefile stable/10/bin/ps/ps.1 stable/10/bin/ps/ps.c stable/10/rescue/rescue/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/ps/Makefile ============================================================================== --- stable/10/bin/ps/Makefile Sat May 17 01:47:06 2014 (r266278) +++ stable/10/bin/ps/Makefile Sat May 17 02:32:47 2014 (r266279) @@ -11,7 +11,7 @@ SRCS= fmt.c keyword.c nlist.c print.c ps # on large systems. # CFLAGS+=-DLAZY_PS -DPADD= ${LIBM} ${LIBKVM} -LDADD= -lm -lkvm +DPADD= ${LIBM} ${LIBKVM} ${LIBJAIL} +LDADD= -lm -lkvm -ljail .include Modified: stable/10/bin/ps/ps.1 ============================================================================== --- stable/10/bin/ps/ps.1 Sat May 17 01:47:06 2014 (r266278) +++ stable/10/bin/ps/ps.1 Sat May 17 02:32:47 2014 (r266279) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd March 15, 2013 +.Dd May 2, 2014 .Dt PS 1 .Os .Sh NAME @@ -40,6 +40,7 @@ .Op Fl aCcdefHhjlmrSTuvwXxZ .Op Fl O Ar fmt | Fl o Ar fmt .Op Fl G Ar gid Ns Op , Ns Ar gid Ns Ar ... +.Op Fl J Ar jid Ns Op , Ns Ar jid Ns Ar ... .Op Fl M Ar core .Op Fl N Ar system .Op Fl p Ar pid Ns Op , Ns Ar pid Ns Ar ... @@ -62,7 +63,7 @@ will also display processes that do not .Pp A different set of processes can be selected for display by using any combination of the -.Fl a , G , p , T , t , +.Fl a , G , J , p , T , t , and .Fl U options. @@ -152,6 +153,20 @@ Print information associated with the fo .Cm user , pid , ppid , pgid , sid , jobc , state , tt , time , and .Cm command . +.It Fl J +Display information about processes which match the specified jail IDs. +This may be either the +.Cm jid +or +.Cm name +of the jail. +Use +.Fl J +.Sy 0 +to display only host processes. +This flag implies +.Fl x +by default. .It Fl L List the set of keywords available for the .Fl O Modified: stable/10/bin/ps/ps.c ============================================================================== --- stable/10/bin/ps/ps.c Sat May 17 01:47:06 2014 (r266278) +++ stable/10/bin/ps/ps.c Sat May 17 02:32:47 2014 (r266279) @@ -50,6 +50,7 @@ static char sccsid[] = "@(#)ps.c 8.4 (Be __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -62,6 +63,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -124,6 +126,7 @@ struct listinfo { const char *lname; union { gid_t *gids; + int *jids; pid_t *pids; dev_t *ttys; uid_t *uids; @@ -132,6 +135,7 @@ struct listinfo { }; static int addelem_gid(struct listinfo *, const char *); +static int addelem_jid(struct listinfo *, const char *); static int addelem_pid(struct listinfo *, const char *); static int addelem_tty(struct listinfo *, const char *); static int addelem_uid(struct listinfo *, const char *); @@ -163,12 +167,12 @@ static char vfmt[] = "pid,state,time,sl, "%cpu,%mem,command"; static char Zfmt[] = "label"; -#define PS_ARGS "AaCcde" OPT_LAZY_f "G:gHhjLlM:mN:O:o:p:rSTt:U:uvwXxZ" +#define PS_ARGS "AaCcde" OPT_LAZY_f "G:gHhjJ:LlM:mN:O:o:p:rSTt:U:uvwXxZ" int main(int argc, char *argv[]) { - struct listinfo gidlist, pgrplist, pidlist; + struct listinfo gidlist, jidlist, pgrplist, pidlist; struct listinfo ruidlist, sesslist, ttylist, uidlist; struct kinfo_proc *kp; KINFO *kinfo = NULL, *next_KINFO; @@ -208,6 +212,7 @@ main(int argc, char *argv[]) prtheader = showthreads = wflag = xkeep_implied = 0; xkeep = -1; /* Neither -x nor -X. */ init_list(&gidlist, addelem_gid, sizeof(gid_t), "group"); + init_list(&jidlist, addelem_jid, sizeof(int), "jail id"); init_list(&pgrplist, addelem_pid, sizeof(pid_t), "process group"); init_list(&pidlist, addelem_pid, sizeof(pid_t), "process id"); init_list(&ruidlist, addelem_uid, sizeof(uid_t), "ruser"); @@ -275,6 +280,11 @@ main(int argc, char *argv[]) case 'h': prtheader = ws.ws_row > 5 ? ws.ws_row : 22; break; + case 'J': + add_list(&jidlist, optarg); + xkeep_implied = 1; + nselectors++; + break; case 'j': parsefmt(jfmt, 0); _fmt = 1; @@ -538,6 +548,11 @@ main(int argc, char *argv[]) if (kp->ki_rgid == gidlist.l.gids[elem]) goto keepit; } + if (jidlist.count > 0) { + for (elem = 0; elem < jidlist.count; elem++) + if (kp->ki_jid == jidlist.l.jids[elem]) + goto keepit; + } if (pgrplist.count > 0) { for (elem = 0; elem < pgrplist.count; elem++) if (kp->ki_pgid == @@ -666,6 +681,7 @@ main(int argc, char *argv[]) } } free_list(&gidlist); + free_list(&jidlist); free_list(&pidlist); free_list(&pgrplist); free_list(&ruidlist); @@ -727,6 +743,30 @@ addelem_gid(struct listinfo *inf, const } static int +addelem_jid(struct listinfo *inf, const char *elem) +{ + int tempid; + + if (*elem == '\0') { + warnx("Invalid (zero-length) jail id"); + optfatal = 1; + return (0); /* Do not add this value. */ + } + + tempid = jail_getid(elem); + if (tempid < 0) { + warnx("Invalid %s: %s", inf->lname, elem); + optfatal = 1; + return (0); + } + + if (inf->count >= inf->maxcount) + expand_list(inf); + inf->l.jids[(inf->count)++] = tempid; + return (1); +} + +static int addelem_pid(struct listinfo *inf, const char *elem) { char *endp; @@ -1373,7 +1413,7 @@ usage(void) (void)fprintf(stderr, "%s\n%s\n%s\n%s\n", "usage: ps " SINGLE_OPTS " [-O fmt | -o fmt] [-G gid[,gid...]]", - " [-M core] [-N system]", + " [-J jid[,jid...]] [-M core] [-N system]", " [-p pid[,pid...]] [-t tty[,tty...]] [-U user[,user...]]", " ps [-L]"); exit(1); Modified: stable/10/rescue/rescue/Makefile ============================================================================== --- stable/10/rescue/rescue/Makefile Sat May 17 01:47:06 2014 (r266278) +++ stable/10/rescue/rescue/Makefile Sat May 17 02:32:47 2014 (r266279) @@ -52,7 +52,7 @@ CRUNCH_SRCDIRS+= bin CRUNCH_PROGS_bin= cat chflags chio chmod cp date dd df echo \ ed expr getfacl hostname kenv kill ln ls mkdir mv \ pkill ps pwd realpath rm rmdir setfacl sh stty sync test -CRUNCH_LIBS+= -lcrypt -ledit -lkvm -ll -ltermcap -lutil +CRUNCH_LIBS+= -lcrypt -ledit -ljail -lkvm -ll -ltermcap -lutil CRUNCH_BUILDTOOLS+= bin/sh # Additional options for specific programs @@ -123,7 +123,7 @@ CRUNCH_LIBS+= -lalias -lcam -lcurses -ld CRUNCH_LIBS+= -lipx .endif .if ${MK_ZFS} != "no" -CRUNCH_LIBS+= -lavl -ljail -lzfs_core -lzfs -lnvpair -lpthread -luutil -lumem +CRUNCH_LIBS+= -lavl -lzfs_core -lzfs -lnvpair -lpthread -luutil -lumem .endif CRUNCH_LIBS+= -lgeom -lbsdxml -lkiconv -lmd -lsbuf -lufs -lz From owner-svn-src-stable@FreeBSD.ORG Sat May 17 02:39:22 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89168287; Sat, 17 May 2014 02:39:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69DBB2226; Sat, 17 May 2014 02:39:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4H2dMib012336; Sat, 17 May 2014 02:39:22 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4H2dLCe012327; Sat, 17 May 2014 02:39:21 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201405170239.s4H2dLCe012327@svn.freebsd.org> From: Bryan Drewery Date: Sat, 17 May 2014 02:39:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266280 - in stable/10: contrib/top usr.bin/top X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 02:39:22 -0000 Author: bdrewery Date: Sat May 17 02:39:20 2014 New Revision: 266280 URL: http://svnweb.freebsd.org/changeset/base/266280 Log: MFC r265249,r265250,r265251: - Add -J command/flag to filter by jail name/jid. This will automatically display the JID as well (the -j command/flag). - Add a hint for 'u' and 'J' command that '+' displays all. - Add J command to help. Modified: stable/10/contrib/top/commands.c stable/10/contrib/top/machine.h stable/10/contrib/top/top.X stable/10/contrib/top/top.c stable/10/usr.bin/top/Makefile stable/10/usr.bin/top/machine.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/top/commands.c ============================================================================== --- stable/10/contrib/top/commands.c Sat May 17 02:32:47 2014 (r266279) +++ stable/10/contrib/top/commands.c Sat May 17 02:39:20 2014 (r266280) @@ -74,6 +74,7 @@ e - list errors generated by last H - toggle the displaying of threads\n\ i or I - toggle the displaying of idle processes\n\ j - toggle the displaying of jail ID\n\ +J - display processes for only one jail (+ selects all jails)\n\ k - kill processes; send a signal to a list of processes\n\ m - toggle the display between 'cpu' and 'io' modes\n\ n or # - change number of processes to display\n", stdout); Modified: stable/10/contrib/top/machine.h ============================================================================== --- stable/10/contrib/top/machine.h Sat May 17 02:32:47 2014 (r266279) +++ stable/10/contrib/top/machine.h Sat May 17 02:39:20 2014 (r266280) @@ -66,6 +66,7 @@ struct process_select int thread; /* show threads */ int uid; /* only this uid (unless uid == -1) */ int wcpu; /* show weighted cpu */ + int jid; /* only this jid (unless jid == -1) */ int jail; /* show jail ID */ int kidle; /* show per-CPU idle threads */ char *command; /* only this command (unless == NULL) */ Modified: stable/10/contrib/top/top.X ============================================================================== --- stable/10/contrib/top/top.X Sat May 17 02:32:47 2014 (r266279) +++ stable/10/contrib/top/top.X Sat May 17 02:39:20 2014 (r266280) @@ -20,6 +20,8 @@ top \- display and update information ab ] [ .BI \-s time ] [ +.BI \-J jail +] [ .BI \-U username ] [ .I number @@ -171,6 +173,21 @@ values are \*(lqcpu\*(rq, \*(lqsize\*(rq but may vary on different operating systems. Note that not all operating systems support this option. .TP +.BI \-J jail +Show only those processes owned by +.IR jail . +This may be either the +.B jid +or +.B name +of the jail. +Use +.B 0 +to limit to host processes. +Using this option implies the +.B \-j +flag. +.PP .BI \-U username Show only those processes owned by .IR username . @@ -315,6 +332,12 @@ Toggle the display of .IR jail (8) ID. .TP +.B J +Display only processes owned by a specific jail (prompt for jail). +If the jail specified is simply \*(lq+\*(rq, then processes belonging +to all jails and the host will be displayed. +This will also enable the display of JID. +.TP .B P Toggle the display of per-CPU statistics. .TP Modified: stable/10/contrib/top/top.c ============================================================================== --- stable/10/contrib/top/top.c Sat May 17 02:32:47 2014 (r266279) +++ stable/10/contrib/top/top.c Sat May 17 02:39:20 2014 (r266280) @@ -38,7 +38,9 @@ char *copyright = #include #include #include +#include #include +#include /* includes specific to top */ #include "display.h" /* interface to display package */ @@ -198,9 +200,9 @@ char *argv[]; fd_set readfds; #ifdef ORDER - static char command_chars[] = "\f qh?en#sdkriIutHmSCajzPo"; + static char command_chars[] = "\f qh?en#sdkriIutHmSCajzPJo"; #else - static char command_chars[] = "\f qh?en#sdkriIutHmSCajzP"; + static char command_chars[] = "\f qh?en#sdkriIutHmSCajzPJ"; #endif /* these defines enumerate the "strchr"s of the commands in command_chars */ #define CMD_redraw 0 @@ -228,8 +230,9 @@ char *argv[]; #define CMD_jidtog 21 #define CMD_kidletog 22 #define CMD_pcputog 23 +#define CMD_jail 24 #ifdef ORDER -#define CMD_order 24 +#define CMD_order 25 #endif /* set the buffer for stdout */ @@ -261,6 +264,7 @@ char *argv[]; ps.uid = -1; ps.thread = No; ps.wcpu = 1; + ps.jid = -1; ps.jail = No; ps.kidle = Yes; ps.command = NULL; @@ -288,7 +292,7 @@ char *argv[]; optind = 1; } - while ((i = getopt(ac, av, "CSIHPabijnquvzs:d:U:m:o:t")) != EOF) + while ((i = getopt(ac, av, "CSIHPabijJ:nquvzs:d:U:m:o:t")) != EOF) { switch(i) { @@ -413,6 +417,15 @@ char *argv[]; ps.jail = !ps.jail; break; + case 'J': /* display only jail's processes */ + if ((ps.jid = jail_getid(optarg)) == -1) + { + fprintf(stderr, "%s: unknown jail\n", optarg); + exit(1); + } + ps.jail = 1; + break; + case 'P': pcpu_stats = !pcpu_stats; break; @@ -425,7 +438,7 @@ char *argv[]; fprintf(stderr, "Top version %s\n" "Usage: %s [-abCHIijnPqStuvz] [-d count] [-m io | cpu] [-o field] [-s time]\n" -" [-U username] [number]\n", +" [-J jail] [-U username] [number]\n", version_string(), myname); exit(1); } @@ -994,7 +1007,7 @@ restart: case CMD_user: new_message(MT_standout, - "Username to show: "); + "Username to show (+ for all): "); if (readline(tempbuf2, sizeof(tempbuf2), No) > 0) { if (tempbuf2[0] == '+' && @@ -1085,6 +1098,44 @@ restart: reset_display(); putchar('\r'); break; + + case CMD_jail: + new_message(MT_standout, + "Jail to show (+ for all): "); + if (readline(tempbuf2, sizeof(tempbuf2), No) > 0) + { + if (tempbuf2[0] == '+' && + tempbuf2[1] == '\0') + { + ps.jid = -1; + } + else if ((i = jail_getid(tempbuf2)) == -1) + { + new_message(MT_standout, + " %s: unknown jail", tempbuf2); + no_command = Yes; + } + else + { + ps.jid = i; + } + if (ps.jail == 0) { + ps.jail = 1; + new_message(MT_standout | + MT_delayed, " Displaying jail " + "ID."); + header_text = + format_header(uname_field); + reset_display(); + } + putchar('\r'); + } + else + { + clear_message(); + } + break; + case CMD_kidletog: ps.kidle = !ps.kidle; new_message(MT_standout | MT_delayed, Modified: stable/10/usr.bin/top/Makefile ============================================================================== --- stable/10/usr.bin/top/Makefile Sat May 17 02:32:47 2014 (r266279) +++ stable/10/usr.bin/top/Makefile Sat May 17 02:39:20 2014 (r266280) @@ -21,8 +21,8 @@ WARNS?= 0 CFLAGS+= -D"Table_size=${TOP_TABLE_SIZE}" .endif -DPADD= ${LIBTERMCAP} ${LIBM} ${LIBKVM} -LDADD= -ltermcap -lm -lkvm +DPADD= ${LIBTERMCAP} ${LIBM} ${LIBKVM} ${LIBJAIL} +LDADD= -ltermcap -lm -lkvm -ljail CLEANFILES= sigdesc.h SIGCONV_AWK= ${.CURDIR}/../../contrib/top/sigconv.awk Modified: stable/10/usr.bin/top/machine.c ============================================================================== --- stable/10/usr.bin/top/machine.c Sat May 17 02:32:47 2014 (r266279) +++ stable/10/usr.bin/top/machine.c Sat May 17 02:39:20 2014 (r266280) @@ -668,6 +668,7 @@ get_process_info(struct system_info *si, /* these are copied out of sel for speed */ int show_idle; + int show_jid; int show_self; int show_system; int show_uid; @@ -710,6 +711,7 @@ get_process_info(struct system_info *si, /* set up flags which define what we are going to select */ show_idle = sel->idle; + show_jid = sel->jid != -1; show_self = sel->self == -1; show_system = sel->system; show_uid = sel->uid != -1; @@ -764,6 +766,10 @@ get_process_info(struct system_info *si, /* skip processes that aren't doing I/O */ continue; + if (show_jid && pp->ki_jid != sel->jid) + /* skip proc. that don't belong to the selected JID */ + continue; + if (show_uid && pp->ki_ruid != (uid_t)sel->uid) /* skip proc. that don't belong to the selected UID */ continue; From owner-svn-src-stable@FreeBSD.ORG Sat May 17 02:45:59 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C2B40759; Sat, 17 May 2014 02:45:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEFD422CB; Sat, 17 May 2014 02:45:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4H2jxjs018190; Sat, 17 May 2014 02:45:59 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4H2jxLw018189; Sat, 17 May 2014 02:45:59 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201405170245.s4H2jxLw018189@svn.freebsd.org> From: Bryan Drewery Date: Sat, 17 May 2014 02:45:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266282 - stable/10/usr.bin/top X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 02:45:59 -0000 Author: bdrewery Date: Sat May 17 02:45:59 2014 New Revision: 266282 URL: http://svnweb.freebsd.org/changeset/base/266282 Log: MFC r265267: Fix width/alignment of JID column. Make it support up to the maximum 7-wide JIDs. On a system using jails for common tasks the JID can quickly increase. Modified: stable/10/usr.bin/top/machine.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/top/machine.c ============================================================================== --- stable/10/usr.bin/top/machine.c Sat May 17 02:45:04 2014 (r266281) +++ stable/10/usr.bin/top/machine.c Sat May 17 02:45:59 2014 (r266282) @@ -67,6 +67,9 @@ static int namelength = TOP_USERNAME_LEN #else static int namelength = 8; #endif +/* TOP_JID_LEN based on max of 999999 */ +#define TOP_JID_LEN 7 +static int jidlength; static int cmdlengthdelta; /* Prototypes for top internals */ @@ -101,26 +104,26 @@ struct handle { */ static char io_header[] = - " PID%s %-*.*s VCSW IVCSW READ WRITE FAULT TOTAL PERCENT COMMAND"; + " PID%*s %-*.*s VCSW IVCSW READ WRITE FAULT TOTAL PERCENT COMMAND"; #define io_Proc_format \ - "%5d%s %-*.*s %6ld %6ld %6ld %6ld %6ld %6ld %6.2f%% %.*s" + "%5d%*s %-*.*s %6ld %6ld %6ld %6ld %6ld %6ld %6.2f%% %.*s" static char smp_header_thr[] = - " PID%s %-*.*s THR PRI NICE SIZE RES STATE C TIME %7s COMMAND"; + " PID%*s %-*.*s THR PRI NICE SIZE RES STATE C TIME %7s COMMAND"; static char smp_header[] = - " PID%s %-*.*s " "PRI NICE SIZE RES STATE C TIME %7s COMMAND"; + " PID%*s %-*.*s " "PRI NICE SIZE RES STATE C TIME %7s COMMAND"; #define smp_Proc_format \ - "%5d%s %-*.*s %s%3d %4s%7s %6s %-6.6s %2d%7s %6.2f%% %.*s" + "%5d%*s %-*.*s %s%3d %4s%7s %6s %-6.6s %2d%7s %6.2f%% %.*s" static char up_header_thr[] = - " PID%s %-*.*s THR PRI NICE SIZE RES STATE TIME %7s COMMAND"; + " PID%*s %-*.*s THR PRI NICE SIZE RES STATE TIME %7s COMMAND"; static char up_header[] = - " PID%s %-*.*s " "PRI NICE SIZE RES STATE TIME %7s COMMAND"; + " PID%*s %-*.*s " "PRI NICE SIZE RES STATE TIME %7s COMMAND"; #define up_Proc_format \ - "%5d%s %-*.*s %s%3d %4s%7s %6s %-6.6s%.0d%7s %6.2f%% %.*s" + "%5d%*s %-*.*s %s%3d %4s%7s %6s %-6.6s%.0d%7s %6.2f%% %.*s" /* process state names for the "STATE" column of the display */ @@ -393,6 +396,11 @@ format_header(char *uname_field) { static char Header[128]; const char *prehead; + + if (ps.jail) + jidlength = TOP_JID_LEN + 1; /* +1 for extra left space. */ + else + jidlength = 0; switch (displaymode) { case DISP_CPU: @@ -406,14 +414,14 @@ format_header(char *uname_field) (ps.thread ? smp_header : smp_header_thr) : (ps.thread ? up_header : up_header_thr); snprintf(Header, sizeof(Header), prehead, - ps.jail ? " JID" : "", + jidlength, ps.jail ? " JID" : "", namelength, namelength, uname_field, ps.wcpu ? "WCPU" : "CPU"); break; case DISP_IO: prehead = io_header; snprintf(Header, sizeof(Header), prehead, - ps.jail ? " JID" : "", + jidlength, ps.jail ? " JID" : "", namelength, namelength, uname_field); break; } @@ -806,7 +814,7 @@ format_next_process(caddr_t handle, char int cpu, state; struct rusage ru, *rup; long p_tot, s_tot; - char *proc_fmt, thr_buf[6], jid_buf[6]; + char *proc_fmt, thr_buf[6], jid_buf[TOP_JID_LEN + 1]; char *cmdbuf = NULL; char **args; const int cmdlen = 128; @@ -962,8 +970,8 @@ format_next_process(caddr_t handle, char if (ps.jail == 0) jid_buf[0] = '\0'; else - snprintf(jid_buf, sizeof(jid_buf), " %*d", - sizeof(jid_buf) - 3, pp->ki_jid); + snprintf(jid_buf, sizeof(jid_buf), "%*d", + jidlength - 1, pp->ki_jid); if (displaymode == DISP_IO) { oldp = get_old_proc(pp); @@ -984,7 +992,7 @@ format_next_process(caddr_t handle, char snprintf(fmt, sizeof(fmt), io_Proc_format, pp->ki_pid, - jid_buf, + jidlength, jid_buf, namelength, namelength, (*get_userid)(pp->ki_ruid), rup->ru_nvcsw, rup->ru_nivcsw, @@ -1019,7 +1027,7 @@ format_next_process(caddr_t handle, char snprintf(fmt, sizeof(fmt), proc_fmt, pp->ki_pid, - jid_buf, + jidlength, jid_buf, namelength, namelength, (*get_userid)(pp->ki_ruid), thr_buf, pp->ki_pri.pri_level - PZERO, From owner-svn-src-stable@FreeBSD.ORG Sat May 17 03:21:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 77A70364; Sat, 17 May 2014 03:21:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 638BA2679; Sat, 17 May 2014 03:21:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4H3Lpof043373; Sat, 17 May 2014 03:21:51 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4H3LoDs043367; Sat, 17 May 2014 03:21:50 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201405170321.s4H3LoDs043367@svn.freebsd.org> From: Bryan Drewery Date: Sat, 17 May 2014 03:21:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266286 - in stable/9: bin/ps rescue/rescue X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 03:21:51 -0000 Author: bdrewery Date: Sat May 17 03:21:50 2014 New Revision: 266286 URL: http://svnweb.freebsd.org/changeset/base/266286 Log: MFC r265229,r265239: Add -J to filter by matching jail IDs and names. Modified: stable/9/bin/ps/Makefile stable/9/bin/ps/ps.1 stable/9/bin/ps/ps.c stable/9/rescue/rescue/Makefile Directory Properties: stable/9/bin/ps/ (props changed) stable/9/rescue/ (props changed) stable/9/rescue/rescue/ (props changed) Modified: stable/9/bin/ps/Makefile ============================================================================== --- stable/9/bin/ps/Makefile Sat May 17 03:05:52 2014 (r266285) +++ stable/9/bin/ps/Makefile Sat May 17 03:21:50 2014 (r266286) @@ -11,7 +11,7 @@ SRCS= fmt.c keyword.c nlist.c print.c ps # on large systems. # CFLAGS+=-DLAZY_PS -DPADD= ${LIBM} ${LIBKVM} -LDADD= -lm -lkvm +DPADD= ${LIBM} ${LIBKVM} ${LIBJAIL} +LDADD= -lm -lkvm -ljail .include Modified: stable/9/bin/ps/ps.1 ============================================================================== --- stable/9/bin/ps/ps.1 Sat May 17 03:05:52 2014 (r266285) +++ stable/9/bin/ps/ps.1 Sat May 17 03:21:50 2014 (r266286) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd February 7, 2013 +.Dd May 2, 2014 .Dt PS 1 .Os .Sh NAME @@ -40,6 +40,7 @@ .Op Fl aCcdefHhjlmrSTuvwXxZ .Op Fl O Ar fmt | Fl o Ar fmt .Op Fl G Ar gid Ns Op , Ns Ar gid Ns Ar ... +.Op Fl J Ar jid Ns Op , Ns Ar jid Ns Ar ... .Op Fl M Ar core .Op Fl N Ar system .Op Fl p Ar pid Ns Op , Ns Ar pid Ns Ar ... @@ -62,7 +63,7 @@ will also display processes that do not .Pp A different set of processes can be selected for display by using any combination of the -.Fl a , G , p , T , t , +.Fl a , G , J , p , T , t , and .Fl U options. @@ -152,6 +153,20 @@ Print information associated with the fo .Cm user , pid , ppid , pgid , sid , jobc , state , tt , time , and .Cm command . +.It Fl J +Display information about processes which match the specified jail IDs. +This may be either the +.Cm jid +or +.Cm name +of the jail. +Use +.Fl J +.Sy 0 +to display only host processes. +This flag implies +.Fl x +by default. .It Fl L List the set of keywords available for the .Fl O Modified: stable/9/bin/ps/ps.c ============================================================================== --- stable/9/bin/ps/ps.c Sat May 17 03:05:52 2014 (r266285) +++ stable/9/bin/ps/ps.c Sat May 17 03:21:50 2014 (r266286) @@ -50,6 +50,7 @@ static char sccsid[] = "@(#)ps.c 8.4 (Be __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -62,6 +63,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -123,6 +125,7 @@ struct listinfo { const char *lname; union { gid_t *gids; + int *jids; pid_t *pids; dev_t *ttys; uid_t *uids; @@ -131,6 +134,7 @@ struct listinfo { }; static int addelem_gid(struct listinfo *, const char *); +static int addelem_jid(struct listinfo *, const char *); static int addelem_pid(struct listinfo *, const char *); static int addelem_tty(struct listinfo *, const char *); static int addelem_uid(struct listinfo *, const char *); @@ -161,12 +165,12 @@ static char vfmt[] = "pid,state,time,sl, "%cpu,%mem,command"; static char Zfmt[] = "label"; -#define PS_ARGS "AaCcde" OPT_LAZY_f "G:gHhjLlM:mN:O:o:p:rSTt:U:uvwXxZ" +#define PS_ARGS "AaCcde" OPT_LAZY_f "G:gHhjJ:LlM:mN:O:o:p:rSTt:U:uvwXxZ" int main(int argc, char *argv[]) { - struct listinfo gidlist, pgrplist, pidlist; + struct listinfo gidlist, jidlist, pgrplist, pidlist; struct listinfo ruidlist, sesslist, ttylist, uidlist; struct kinfo_proc *kp; KINFO *kinfo = NULL, *next_KINFO; @@ -204,6 +208,7 @@ main(int argc, char *argv[]) prtheader = showthreads = wflag = xkeep_implied = 0; xkeep = -1; /* Neither -x nor -X. */ init_list(&gidlist, addelem_gid, sizeof(gid_t), "group"); + init_list(&jidlist, addelem_jid, sizeof(int), "jail id"); init_list(&pgrplist, addelem_pid, sizeof(pid_t), "process group"); init_list(&pidlist, addelem_pid, sizeof(pid_t), "process id"); init_list(&ruidlist, addelem_uid, sizeof(uid_t), "ruser"); @@ -271,6 +276,11 @@ main(int argc, char *argv[]) case 'h': prtheader = ws.ws_row > 5 ? ws.ws_row : 22; break; + case 'J': + add_list(&jidlist, optarg); + xkeep_implied = 1; + nselectors++; + break; case 'j': parsefmt(jfmt, 0); _fmt = 1; @@ -534,6 +544,11 @@ main(int argc, char *argv[]) if (kp->ki_rgid == gidlist.l.gids[elem]) goto keepit; } + if (jidlist.count > 0) { + for (elem = 0; elem < jidlist.count; elem++) + if (kp->ki_jid == jidlist.l.jids[elem]) + goto keepit; + } if (pgrplist.count > 0) { for (elem = 0; elem < pgrplist.count; elem++) if (kp->ki_pgid == @@ -662,6 +677,7 @@ main(int argc, char *argv[]) } } free_list(&gidlist); + free_list(&jidlist); free_list(&pidlist); free_list(&pgrplist); free_list(&ruidlist); @@ -724,6 +740,30 @@ addelem_gid(struct listinfo *inf, const #define BSD_PID_MAX 99999 /* Copy of PID_MAX from sys/proc.h. */ static int +addelem_jid(struct listinfo *inf, const char *elem) +{ + int tempid; + + if (*elem == '\0') { + warnx("Invalid (zero-length) jail id"); + optfatal = 1; + return (0); /* Do not add this value. */ + } + + tempid = jail_getid(elem); + if (tempid < 0) { + warnx("Invalid %s: %s", inf->lname, elem); + optfatal = 1; + return (0); + } + + if (inf->count >= inf->maxcount) + expand_list(inf); + inf->l.jids[(inf->count)++] = tempid; + return (1); +} + +static int addelem_pid(struct listinfo *inf, const char *elem) { char *endp; @@ -1359,7 +1399,7 @@ usage(void) (void)fprintf(stderr, "%s\n%s\n%s\n%s\n", "usage: ps " SINGLE_OPTS " [-O fmt | -o fmt] [-G gid[,gid...]]", - " [-M core] [-N system]", + " [-J jid[,jid...]] [-M core] [-N system]", " [-p pid[,pid...]] [-t tty[,tty...]] [-U user[,user...]]", " ps [-L]"); exit(1); Modified: stable/9/rescue/rescue/Makefile ============================================================================== --- stable/9/rescue/rescue/Makefile Sat May 17 03:05:52 2014 (r266285) +++ stable/9/rescue/rescue/Makefile Sat May 17 03:21:50 2014 (r266286) @@ -52,7 +52,7 @@ CRUNCH_SRCDIRS+= bin CRUNCH_PROGS_bin= cat chflags chio chmod cp date dd df echo \ ed expr getfacl hostname kenv kill ln ls mkdir mv \ pkill ps pwd realpath rm rmdir setfacl sh stty sync test -CRUNCH_LIBS+= -lcrypt -ledit -lkvm -ll -ltermcap -lutil +CRUNCH_LIBS+= -lcrypt -ledit -ljail -lkvm -ll -ltermcap -lutil CRUNCH_BUILDTOOLS+= bin/sh # Additional options for specific programs @@ -123,7 +123,7 @@ CRUNCH_LIBS+= -lalias -lcam -lcurses -ld CRUNCH_LIBS+= -lipx .endif .if ${MK_ZFS} != "no" -CRUNCH_LIBS+= -lavl -ljail -lzfs_core -lzfs -lnvpair -lpthread -luutil -lumem +CRUNCH_LIBS+= -lavl -lzfs_core -lzfs -lnvpair -lpthread -luutil -lumem .endif CRUNCH_LIBS+= -lgeom -lbsdxml -ljail -lkiconv -lmd -lreadline -lsbuf -lufs -lz From owner-svn-src-stable@FreeBSD.ORG Sat May 17 03:23:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9295A4F4; Sat, 17 May 2014 03:23:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 733E0269D; Sat, 17 May 2014 03:23:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4H3NlNJ043763; Sat, 17 May 2014 03:23:47 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4H3Nk9t043757; Sat, 17 May 2014 03:23:46 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201405170323.s4H3Nk9t043757@svn.freebsd.org> From: Bryan Drewery Date: Sat, 17 May 2014 03:23:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266287 - in stable/9: contrib/top usr.bin/top X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 03:23:47 -0000 Author: bdrewery Date: Sat May 17 03:23:45 2014 New Revision: 266287 URL: http://svnweb.freebsd.org/changeset/base/266287 Log: MFC r265249,r265250,r265251: - Add -J command/flag to filter by jail name/jid. This will automatically display the JID as well (the -j command/flag). - Add a hint for 'u' and 'J' command that '+' displays all. - Add J command to help. Modified: stable/9/contrib/top/commands.c stable/9/contrib/top/machine.h stable/9/contrib/top/top.X stable/9/contrib/top/top.c stable/9/usr.bin/top/Makefile stable/9/usr.bin/top/machine.c Directory Properties: stable/9/contrib/top/ (props changed) stable/9/usr.bin/top/ (props changed) Modified: stable/9/contrib/top/commands.c ============================================================================== --- stable/9/contrib/top/commands.c Sat May 17 03:21:50 2014 (r266286) +++ stable/9/contrib/top/commands.c Sat May 17 03:23:45 2014 (r266287) @@ -74,6 +74,7 @@ e - list errors generated by last H - toggle the displaying of threads\n\ i or I - toggle the displaying of idle processes\n\ j - toggle the displaying of jail ID\n\ +J - display processes for only one jail (+ selects all jails)\n\ k - kill processes; send a signal to a list of processes\n\ m - toggle the display between 'cpu' and 'io' modes\n\ n or # - change number of processes to display\n", stdout); Modified: stable/9/contrib/top/machine.h ============================================================================== --- stable/9/contrib/top/machine.h Sat May 17 03:21:50 2014 (r266286) +++ stable/9/contrib/top/machine.h Sat May 17 03:23:45 2014 (r266287) @@ -66,6 +66,7 @@ struct process_select int thread; /* show threads */ int uid; /* only this uid (unless uid == -1) */ int wcpu; /* show weighted cpu */ + int jid; /* only this jid (unless jid == -1) */ int jail; /* show jail ID */ int kidle; /* show per-CPU idle threads */ char *command; /* only this command (unless == NULL) */ Modified: stable/9/contrib/top/top.X ============================================================================== --- stable/9/contrib/top/top.X Sat May 17 03:21:50 2014 (r266286) +++ stable/9/contrib/top/top.X Sat May 17 03:23:45 2014 (r266287) @@ -20,6 +20,8 @@ top \- display and update information ab ] [ .BI \-s time ] [ +.BI \-J jail +] [ .BI \-U username ] [ .I number @@ -171,6 +173,21 @@ values are \*(lqcpu\*(rq, \*(lqsize\*(rq but may vary on different operating systems. Note that not all operating systems support this option. .TP +.BI \-J jail +Show only those processes owned by +.IR jail . +This may be either the +.B jid +or +.B name +of the jail. +Use +.B 0 +to limit to host processes. +Using this option implies the +.B \-j +flag. +.PP .BI \-U username Show only those processes owned by .IR username . @@ -315,6 +332,12 @@ Toggle the display of .IR jail (8) ID. .TP +.B J +Display only processes owned by a specific jail (prompt for jail). +If the jail specified is simply \*(lq+\*(rq, then processes belonging +to all jails and the host will be displayed. +This will also enable the display of JID. +.TP .B P Toggle the display of per-CPU statistics. .TP Modified: stable/9/contrib/top/top.c ============================================================================== --- stable/9/contrib/top/top.c Sat May 17 03:21:50 2014 (r266286) +++ stable/9/contrib/top/top.c Sat May 17 03:23:45 2014 (r266287) @@ -38,7 +38,9 @@ char *copyright = #include #include #include +#include #include +#include /* includes specific to top */ #include "display.h" /* interface to display package */ @@ -198,9 +200,9 @@ char *argv[]; fd_set readfds; #ifdef ORDER - static char command_chars[] = "\f qh?en#sdkriIutHmSCajzPo"; + static char command_chars[] = "\f qh?en#sdkriIutHmSCajzPJo"; #else - static char command_chars[] = "\f qh?en#sdkriIutHmSCajzP"; + static char command_chars[] = "\f qh?en#sdkriIutHmSCajzPJ"; #endif /* these defines enumerate the "strchr"s of the commands in command_chars */ #define CMD_redraw 0 @@ -228,8 +230,9 @@ char *argv[]; #define CMD_jidtog 21 #define CMD_kidletog 22 #define CMD_pcputog 23 +#define CMD_jail 24 #ifdef ORDER -#define CMD_order 24 +#define CMD_order 25 #endif /* set the buffer for stdout */ @@ -261,6 +264,7 @@ char *argv[]; ps.uid = -1; ps.thread = No; ps.wcpu = 1; + ps.jid = -1; ps.jail = No; ps.kidle = Yes; ps.command = NULL; @@ -288,7 +292,7 @@ char *argv[]; optind = 1; } - while ((i = getopt(ac, av, "CSIHPabijnquvzs:d:U:m:o:t")) != EOF) + while ((i = getopt(ac, av, "CSIHPabijJ:nquvzs:d:U:m:o:t")) != EOF) { switch(i) { @@ -413,6 +417,15 @@ char *argv[]; ps.jail = !ps.jail; break; + case 'J': /* display only jail's processes */ + if ((ps.jid = jail_getid(optarg)) == -1) + { + fprintf(stderr, "%s: unknown jail\n", optarg); + exit(1); + } + ps.jail = 1; + break; + case 'P': pcpu_stats = !pcpu_stats; break; @@ -425,7 +438,7 @@ char *argv[]; fprintf(stderr, "Top version %s\n" "Usage: %s [-abCHIijnPqStuvz] [-d count] [-m io | cpu] [-o field] [-s time]\n" -" [-U username] [number]\n", +" [-J jail] [-U username] [number]\n", version_string(), myname); exit(1); } @@ -994,7 +1007,7 @@ restart: case CMD_user: new_message(MT_standout, - "Username to show: "); + "Username to show (+ for all): "); if (readline(tempbuf2, sizeof(tempbuf2), No) > 0) { if (tempbuf2[0] == '+' && @@ -1085,6 +1098,44 @@ restart: reset_display(); putchar('\r'); break; + + case CMD_jail: + new_message(MT_standout, + "Jail to show (+ for all): "); + if (readline(tempbuf2, sizeof(tempbuf2), No) > 0) + { + if (tempbuf2[0] == '+' && + tempbuf2[1] == '\0') + { + ps.jid = -1; + } + else if ((i = jail_getid(tempbuf2)) == -1) + { + new_message(MT_standout, + " %s: unknown jail", tempbuf2); + no_command = Yes; + } + else + { + ps.jid = i; + } + if (ps.jail == 0) { + ps.jail = 1; + new_message(MT_standout | + MT_delayed, " Displaying jail " + "ID."); + header_text = + format_header(uname_field); + reset_display(); + } + putchar('\r'); + } + else + { + clear_message(); + } + break; + case CMD_kidletog: ps.kidle = !ps.kidle; new_message(MT_standout | MT_delayed, Modified: stable/9/usr.bin/top/Makefile ============================================================================== --- stable/9/usr.bin/top/Makefile Sat May 17 03:21:50 2014 (r266286) +++ stable/9/usr.bin/top/Makefile Sat May 17 03:23:45 2014 (r266287) @@ -21,8 +21,8 @@ WARNS?= 0 CFLAGS+= -D"Table_size=${TOP_TABLE_SIZE}" .endif -DPADD= ${LIBTERMCAP} ${LIBM} ${LIBKVM} -LDADD= -ltermcap -lm -lkvm +DPADD= ${LIBTERMCAP} ${LIBM} ${LIBKVM} ${LIBJAIL} +LDADD= -ltermcap -lm -lkvm -ljail CLEANFILES= sigdesc.h SIGCONV_AWK= ${.CURDIR}/../../contrib/top/sigconv.awk Modified: stable/9/usr.bin/top/machine.c ============================================================================== --- stable/9/usr.bin/top/machine.c Sat May 17 03:21:50 2014 (r266286) +++ stable/9/usr.bin/top/machine.c Sat May 17 03:23:45 2014 (r266287) @@ -668,6 +668,7 @@ get_process_info(struct system_info *si, /* these are copied out of sel for speed */ int show_idle; + int show_jid; int show_self; int show_system; int show_uid; @@ -710,6 +711,7 @@ get_process_info(struct system_info *si, /* set up flags which define what we are going to select */ show_idle = sel->idle; + show_jid = sel->jid != -1; show_self = sel->self == -1; show_system = sel->system; show_uid = sel->uid != -1; @@ -764,6 +766,10 @@ get_process_info(struct system_info *si, /* skip processes that aren't doing I/O */ continue; + if (show_jid && pp->ki_jid != sel->jid) + /* skip proc. that don't belong to the selected JID */ + continue; + if (show_uid && pp->ki_ruid != (uid_t)sel->uid) /* skip proc. that don't belong to the selected UID */ continue; From owner-svn-src-stable@FreeBSD.ORG Sat May 17 03:27:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 174BC756; Sat, 17 May 2014 03:27:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0433426BB; Sat, 17 May 2014 03:27:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4H3RVsv044425; Sat, 17 May 2014 03:27:31 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4H3RV3X044424; Sat, 17 May 2014 03:27:31 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201405170327.s4H3RV3X044424@svn.freebsd.org> From: Bryan Drewery Date: Sat, 17 May 2014 03:27:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266288 - stable/9/usr.bin/top X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 03:27:32 -0000 Author: bdrewery Date: Sat May 17 03:27:31 2014 New Revision: 266288 URL: http://svnweb.freebsd.org/changeset/base/266288 Log: MFC r251630: Bump the CPU/WCPU column width by one so that it fits values from 100% up to 999.99% CPU. Modified: stable/9/usr.bin/top/machine.c Directory Properties: stable/9/usr.bin/top/ (props changed) Modified: stable/9/usr.bin/top/machine.c ============================================================================== --- stable/9/usr.bin/top/machine.c Sat May 17 03:23:45 2014 (r266287) +++ stable/9/usr.bin/top/machine.c Sat May 17 03:27:31 2014 (r266288) @@ -107,20 +107,20 @@ static char io_header[] = "%5d%s %-*.*s %6ld %6ld %6ld %6ld %6ld %6ld %6.2f%% %.*s" static char smp_header_thr[] = - " PID%s %-*.*s THR PRI NICE SIZE RES STATE C TIME %6s COMMAND"; + " PID%s %-*.*s THR PRI NICE SIZE RES STATE C TIME %7s COMMAND"; static char smp_header[] = - " PID%s %-*.*s " "PRI NICE SIZE RES STATE C TIME %6s COMMAND"; + " PID%s %-*.*s " "PRI NICE SIZE RES STATE C TIME %7s COMMAND"; #define smp_Proc_format \ - "%5d%s %-*.*s %s%3d %4s%7s %6s %-6.6s %2d%7s %5.2f%% %.*s" + "%5d%s %-*.*s %s%3d %4s%7s %6s %-6.6s %2d%7s %6.2f%% %.*s" static char up_header_thr[] = - " PID%s %-*.*s THR PRI NICE SIZE RES STATE TIME %6s COMMAND"; + " PID%s %-*.*s THR PRI NICE SIZE RES STATE TIME %7s COMMAND"; static char up_header[] = - " PID%s %-*.*s " "PRI NICE SIZE RES STATE TIME %6s COMMAND"; + " PID%s %-*.*s " "PRI NICE SIZE RES STATE TIME %7s COMMAND"; #define up_Proc_format \ - "%5d%s %-*.*s %s%3d %4s%7s %6s %-6.6s%.0d%7s %5.2f%% %.*s" + "%5d%s %-*.*s %s%3d %4s%7s %6s %-6.6s%.0d%7s %6.2f%% %.*s" /* process state names for the "STATE" column of the display */ From owner-svn-src-stable@FreeBSD.ORG Sat May 17 03:28:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A878F896; Sat, 17 May 2014 03:28:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9510C26C0; Sat, 17 May 2014 03:28:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4H3SRmf044627; Sat, 17 May 2014 03:28:27 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4H3SR7F044626; Sat, 17 May 2014 03:28:27 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201405170328.s4H3SR7F044626@svn.freebsd.org> From: Bryan Drewery Date: Sat, 17 May 2014 03:28:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266289 - stable/9/usr.bin/top X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 03:28:27 -0000 Author: bdrewery Date: Sat May 17 03:28:27 2014 New Revision: 266289 URL: http://svnweb.freebsd.org/changeset/base/266289 Log: MFC r265267: Fix width/alignment of JID column. Make it support up to the maximum 7-wide JIDs. On a system using jails for common tasks the JID can quickly increase. Modified: stable/9/usr.bin/top/machine.c Directory Properties: stable/9/usr.bin/top/ (props changed) Modified: stable/9/usr.bin/top/machine.c ============================================================================== --- stable/9/usr.bin/top/machine.c Sat May 17 03:27:31 2014 (r266288) +++ stable/9/usr.bin/top/machine.c Sat May 17 03:28:27 2014 (r266289) @@ -67,6 +67,9 @@ static int namelength = TOP_USERNAME_LEN #else static int namelength = 8; #endif +/* TOP_JID_LEN based on max of 999999 */ +#define TOP_JID_LEN 7 +static int jidlength; static int cmdlengthdelta; /* Prototypes for top internals */ @@ -101,26 +104,26 @@ struct handle { */ static char io_header[] = - " PID%s %-*.*s VCSW IVCSW READ WRITE FAULT TOTAL PERCENT COMMAND"; + " PID%*s %-*.*s VCSW IVCSW READ WRITE FAULT TOTAL PERCENT COMMAND"; #define io_Proc_format \ - "%5d%s %-*.*s %6ld %6ld %6ld %6ld %6ld %6ld %6.2f%% %.*s" + "%5d%*s %-*.*s %6ld %6ld %6ld %6ld %6ld %6ld %6.2f%% %.*s" static char smp_header_thr[] = - " PID%s %-*.*s THR PRI NICE SIZE RES STATE C TIME %7s COMMAND"; + " PID%*s %-*.*s THR PRI NICE SIZE RES STATE C TIME %7s COMMAND"; static char smp_header[] = - " PID%s %-*.*s " "PRI NICE SIZE RES STATE C TIME %7s COMMAND"; + " PID%*s %-*.*s " "PRI NICE SIZE RES STATE C TIME %7s COMMAND"; #define smp_Proc_format \ - "%5d%s %-*.*s %s%3d %4s%7s %6s %-6.6s %2d%7s %6.2f%% %.*s" + "%5d%*s %-*.*s %s%3d %4s%7s %6s %-6.6s %2d%7s %6.2f%% %.*s" static char up_header_thr[] = - " PID%s %-*.*s THR PRI NICE SIZE RES STATE TIME %7s COMMAND"; + " PID%*s %-*.*s THR PRI NICE SIZE RES STATE TIME %7s COMMAND"; static char up_header[] = - " PID%s %-*.*s " "PRI NICE SIZE RES STATE TIME %7s COMMAND"; + " PID%*s %-*.*s " "PRI NICE SIZE RES STATE TIME %7s COMMAND"; #define up_Proc_format \ - "%5d%s %-*.*s %s%3d %4s%7s %6s %-6.6s%.0d%7s %6.2f%% %.*s" + "%5d%*s %-*.*s %s%3d %4s%7s %6s %-6.6s%.0d%7s %6.2f%% %.*s" /* process state names for the "STATE" column of the display */ @@ -393,6 +396,11 @@ format_header(char *uname_field) { static char Header[128]; const char *prehead; + + if (ps.jail) + jidlength = TOP_JID_LEN + 1; /* +1 for extra left space. */ + else + jidlength = 0; switch (displaymode) { case DISP_CPU: @@ -406,14 +414,14 @@ format_header(char *uname_field) (ps.thread ? smp_header : smp_header_thr) : (ps.thread ? up_header : up_header_thr); snprintf(Header, sizeof(Header), prehead, - ps.jail ? " JID" : "", + jidlength, ps.jail ? " JID" : "", namelength, namelength, uname_field, ps.wcpu ? "WCPU" : "CPU"); break; case DISP_IO: prehead = io_header; snprintf(Header, sizeof(Header), prehead, - ps.jail ? " JID" : "", + jidlength, ps.jail ? " JID" : "", namelength, namelength, uname_field); break; } @@ -806,7 +814,7 @@ format_next_process(caddr_t handle, char int cpu, state; struct rusage ru, *rup; long p_tot, s_tot; - char *proc_fmt, thr_buf[6], jid_buf[6]; + char *proc_fmt, thr_buf[6], jid_buf[TOP_JID_LEN + 1]; char *cmdbuf = NULL; char **args; @@ -961,8 +969,8 @@ format_next_process(caddr_t handle, char if (ps.jail == 0) jid_buf[0] = '\0'; else - snprintf(jid_buf, sizeof(jid_buf), " %*d", - sizeof(jid_buf) - 3, pp->ki_jid); + snprintf(jid_buf, sizeof(jid_buf), "%*d", + jidlength - 1, pp->ki_jid); if (displaymode == DISP_IO) { oldp = get_old_proc(pp); @@ -983,7 +991,7 @@ format_next_process(caddr_t handle, char snprintf(fmt, sizeof(fmt), io_Proc_format, pp->ki_pid, - jid_buf, + jidlength, jid_buf, namelength, namelength, (*get_userid)(pp->ki_ruid), rup->ru_nvcsw, rup->ru_nivcsw, @@ -1018,7 +1026,7 @@ format_next_process(caddr_t handle, char snprintf(fmt, sizeof(fmt), proc_fmt, pp->ki_pid, - jid_buf, + jidlength, jid_buf, namelength, namelength, (*get_userid)(pp->ki_ruid), thr_buf, pp->ki_pri.pri_level - PZERO, From owner-svn-src-stable@FreeBSD.ORG Sat May 17 03:28:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A0B59D9; Sat, 17 May 2014 03:28:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54F9526C4; Sat, 17 May 2014 03:28:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4H3SjAP044720; Sat, 17 May 2014 03:28:45 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4H3SiWe044702; Sat, 17 May 2014 03:28:44 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201405170328.s4H3SiWe044702@svn.freebsd.org> From: Devin Teske Date: Sat, 17 May 2014 03:28:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266290 - in stable/10/usr.sbin/bsdconfig: dot examples networking/share share share/media share/packages X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 03:28:45 -0000 Author: dteske Date: Sat May 17 03:28:43 2014 New Revision: 266290 URL: http://svnweb.freebsd.org/changeset/base/266290 Log: MFC r264840: Implement GEOM based media device classification. Added: stable/10/usr.sbin/bsdconfig/share/geom.subr - copied unchanged from r264840, head/usr.sbin/bsdconfig/share/geom.subr Modified: stable/10/usr.sbin/bsdconfig/dot/dot stable/10/usr.sbin/bsdconfig/examples/browse_packages_ftp.sh stable/10/usr.sbin/bsdconfig/examples/browse_packages_http.sh stable/10/usr.sbin/bsdconfig/networking/share/device.subr stable/10/usr.sbin/bsdconfig/share/Makefile stable/10/usr.sbin/bsdconfig/share/common.subr stable/10/usr.sbin/bsdconfig/share/device.subr stable/10/usr.sbin/bsdconfig/share/media/cdrom.subr stable/10/usr.sbin/bsdconfig/share/media/common.subr stable/10/usr.sbin/bsdconfig/share/media/directory.subr stable/10/usr.sbin/bsdconfig/share/media/dos.subr stable/10/usr.sbin/bsdconfig/share/media/floppy.subr stable/10/usr.sbin/bsdconfig/share/media/ftp.subr stable/10/usr.sbin/bsdconfig/share/media/http.subr stable/10/usr.sbin/bsdconfig/share/media/nfs.subr stable/10/usr.sbin/bsdconfig/share/media/tcpip.subr stable/10/usr.sbin/bsdconfig/share/media/ufs.subr stable/10/usr.sbin/bsdconfig/share/media/usb.subr stable/10/usr.sbin/bsdconfig/share/packages/index.subr stable/10/usr.sbin/bsdconfig/share/packages/packages.subr stable/10/usr.sbin/bsdconfig/share/struct.subr Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdconfig/dot/dot ============================================================================== --- stable/10/usr.sbin/bsdconfig/dot/dot Sat May 17 03:28:27 2014 (r266289) +++ stable/10/usr.sbin/bsdconfig/dot/dot Sat May 17 03:28:43 2014 (r266290) @@ -29,7 +29,7 @@ ############################################################ INCLUDES # Prevent common.subr from auto initializing debugging (this is not an inter- -# active utility that requires debugging; also `-d' has been repurposed). +# active utility so does not require debugging; also `-d' has been repurposed). # DEBUG_SELF_INITIALIZE=NO Modified: stable/10/usr.sbin/bsdconfig/examples/browse_packages_ftp.sh ============================================================================== --- stable/10/usr.sbin/bsdconfig/examples/browse_packages_ftp.sh Sat May 17 03:28:27 2014 (r266289) +++ stable/10/usr.sbin/bsdconfig/examples/browse_packages_ftp.sh Sat May 17 03:28:43 2014 (r266290) @@ -18,7 +18,7 @@ if [ ! -e "$TMPDIR/packages/INDEX" ]; th mediaSetFTP mediaOpen f_show_info "Downloading packages/INDEX from\n %s" "$_ftpPath" - f_device_get media packages/INDEX > $TMPDIR/packages/INDEX + f_device_get device_media packages/INDEX > $TMPDIR/packages/INDEX fi _directoryPath=$TMPDIR mediaSetDirectory Modified: stable/10/usr.sbin/bsdconfig/examples/browse_packages_http.sh ============================================================================== --- stable/10/usr.sbin/bsdconfig/examples/browse_packages_http.sh Sat May 17 03:28:27 2014 (r266289) +++ stable/10/usr.sbin/bsdconfig/examples/browse_packages_http.sh Sat May 17 03:28:43 2014 (r266290) @@ -18,7 +18,7 @@ if [ ! -e "$TMPDIR/packages/INDEX" ]; th mediaSetHTTP mediaOpen f_show_info "Downloading packages/INDEX from\n %s" "$_httpPath" - f_device_get media packages/INDEX > $TMPDIR/packages/INDEX + f_device_get device_media packages/INDEX > $TMPDIR/packages/INDEX fi _directoryPath=$TMPDIR mediaSetDirectory Modified: stable/10/usr.sbin/bsdconfig/networking/share/device.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/networking/share/device.subr Sat May 17 03:28:27 2014 (r266289) +++ stable/10/usr.sbin/bsdconfig/networking/share/device.subr Sat May 17 03:28:43 2014 (r266290) @@ -75,10 +75,11 @@ f_dialog_menu_netdev() # # Get list of usable network interfaces # - local devs if iflist= # Calculated below + local dev devs if iflist= # Calculated below f_device_rescan_network f_device_find "" $DEVICE_TYPE_NETWORK devs - for if in $devs; do + for dev in $devs; do + f_struct "$dev" get name if || continue # Skip unsavory interfaces case "$if" in lo[0-9]*|ppp[0-9]*|sl[0-9]*|faith[0-9]*) continue ;; Modified: stable/10/usr.sbin/bsdconfig/share/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/Makefile Sat May 17 03:28:27 2014 (r266289) +++ stable/10/usr.sbin/bsdconfig/share/Makefile Sat May 17 03:28:43 2014 (r266290) @@ -5,7 +5,7 @@ NO_OBJ= SUBDIR= media packages FILESDIR= ${SHAREDIR}/bsdconfig -FILES= common.subr device.subr dialog.subr keymap.subr \ +FILES= common.subr device.subr dialog.subr geom.subr keymap.subr \ mustberoot.subr script.subr strings.subr struct.subr \ sysrc.subr variable.subr Modified: stable/10/usr.sbin/bsdconfig/share/common.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/common.subr Sat May 17 03:28:27 2014 (r266289) +++ stable/10/usr.sbin/bsdconfig/share/common.subr Sat May 17 03:28:43 2014 (r266290) @@ -153,7 +153,7 @@ f_debug_init() # Process stored command-line arguments # set -- $ARGV - local OPTIND flag + local OPTIND OPTARG flag f_dprintf "f_debug_init: ARGV=[%s] GETOPTS_STDARGS=[%s]" \ "$ARGV" "$GETOPTS_STDARGS" while getopts "$GETOPTS_STDARGS$GETOPTS_EXTRA$GETOPTS_ALLFLAGS" flag \ @@ -798,14 +798,30 @@ f_running_as_init() } # f_mounted $local_directory +# f_mounted -b $device # -# Return success if a filesystem is mounted on a particular directory. +# Return success if a filesystem is mounted on a particular directory. If `-b' +# is present, instead check that the block device (or a partition thereof) is +# mounted. # f_mounted() { - local dir="$1" - [ -d "$dir" ] || return $FAILURE - mount | grep -Eq " on $dir \([^)]+\)$" + local OPTIND OPTARG flag use_device= + while getopts b flag; do + case "$flag" in + b) use_device=1 ;; + esac + done + shift $(( $OPTIND - 1 )) + if [ "$use_device" ]; then + local device="$1" + mount | grep -Eq \ + "^$device([[:space:]]|p[0-9]|s[0-9]|\.nop|\.eli)" + else + [ -d "$dir" ] || return $FAILURE + mount | grep -Eq " on $dir \([^)]+\)$" + fi + # Return status is that of last grep(1) } # f_eval_catch [-de] [-k $var_to_set] $funcname $utility \ @@ -890,7 +906,7 @@ f_eval_catch() # # Process local function arguments # - local OPTIND __flag + local OPTIND OPTARG __flag while getopts "dek:" __flag > /dev/null; do case "$__flag" in d) __no_dialog=1 ;; Modified: stable/10/usr.sbin/bsdconfig/share/device.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/device.subr Sat May 17 03:28:27 2014 (r266289) +++ stable/10/usr.sbin/bsdconfig/share/device.subr Sat May 17 03:28:43 2014 (r266290) @@ -32,6 +32,7 @@ BSDCFG_SHARE="/usr/share/bsdconfig" . $BSDCFG_SHARE/common.subr || exit 1 f_dprintf "%s: loading includes..." device.subr f_include $BSDCFG_SHARE/dialog.subr +f_include $BSDCFG_SHARE/geom.subr f_include $BSDCFG_SHARE/strings.subr f_include $BSDCFG_SHARE/struct.subr @@ -40,42 +41,53 @@ f_include_lang $BSDCFG_LIBE/include/mess ############################################################ GLOBALS -DEVICES= -DEVICE_NAMES= -NDEVICES=0 +NDEVICES=0 # Set by f_device_register(), used by f_device_*() -# A "device" from sysinstall's point of view +# +# A "device" from legacy sysinstall's point of view (mostly) +# +# NB: Disk devices have their `private' property set to GEOM ident +# NB: USB devices have their `private' property set to USB disk device name +# f_struct_define DEVICE \ - name \ + capacity \ desc \ devname \ - type \ - capacity \ enabled \ - init \ - get \ - shutdown \ flags \ + get \ + init \ + name \ private \ + shutdown \ + type \ volume # Network devices have their `private' property set to this f_struct_define DEVICE_INFO \ - use_rtsol use_dhcp ipaddr ipv6addr netmask extras - -setvar DEVICE_TYPE_NONE 1 -setvar DEVICE_TYPE_DISK 2 -setvar DEVICE_TYPE_FLOPPY 3 -setvar DEVICE_TYPE_FTP 4 -setvar DEVICE_TYPE_NETWORK 5 -setvar DEVICE_TYPE_CDROM 6 -setvar DEVICE_TYPE_USB 7 -setvar DEVICE_TYPE_DOS 8 -setvar DEVICE_TYPE_UFS 9 -setvar DEVICE_TYPE_NFS 10 -setvar DEVICE_TYPE_ANY 11 -setvar DEVICE_TYPE_HTTP_PROXY 12 -setvar DEVICE_TYPE_HTTP 13 + extras \ + ipaddr \ + ipv6addr \ + netmask \ + use_dhcp \ + use_rtsol + +# +# Device types for f_device_register(), f_device_find(), et al. +# +setvar DEVICE_TYPE_ANY "any" # Any +setvar DEVICE_TYPE_NONE "NONE" # Unknown +setvar DEVICE_TYPE_DISK "DISK" # GEOM `DISK' +setvar DEVICE_TYPE_FLOPPY "FD" # GEOM `FD' +setvar DEVICE_TYPE_FTP "FTP" # Dynamic network device +setvar DEVICE_TYPE_NETWORK "NETWORK" # See f_device_get_all_network +setvar DEVICE_TYPE_CDROM "CDROM" # GEOM `DISK' +setvar DEVICE_TYPE_USB "USB" # GEOM `PART' +setvar DEVICE_TYPE_DOS "DOS" # GEOM `DISK' `PART' or `LABEL' +setvar DEVICE_TYPE_UFS "UFS" # GEOM `DISK' `PART' or `LABEL' +setvar DEVICE_TYPE_NFS "NFS" # Dynamic network device +setvar DEVICE_TYPE_HTTP_PROXY "HTTP_PROXY" # Dynamic network device +setvar DEVICE_TYPE_HTTP "HTTP" # Dynamic network device # Network devices have the following flags available setvar IF_ETHERNET 1 @@ -87,76 +99,70 @@ setvar IF_ACTIVE 4 # : ${DEVICE_SELF_SCAN_ALL=1} -############################################################ FUNCTIONS - -# f_device_try $name [$i [$var_path]] -# -# Test a particular device. If $i is given, then $name is expected to contain a -# single "%d" where $i will be inserted using printf. If $var_path is given, -# it is used as a variable name to provide the caller the device pathname. # -# Returns success if the device path exists and is a cdev. +# Device Catalog variables # -f_device_try() -{ - local name="$1" i="$2" var_path="$3" unit - if [ "$i" ]; then - f_sprintf unit "$name" "$i" - else - unit="$name" - fi - case "$unit" in - /dev/*) : good ;; # already qualified - *) unit="/dev/$unit" ;; - esac - [ "$var_path" ] && setvar "$var_path" "$unit" - f_dprintf "f_device_try: making sure %s is a device node" "$unit" - if [ -c "$unit" ]; then - f_dprintf "f_device_try: %s is a cdev [good]" "$unit" - return $SUCCESS - else - f_dprintf "f_device_try: %s is not a cdev [skip]" "$unit" - return $FAILURE - fi -} +DEVICE_CATALOG_APPEND_ONLY= # Used by f_device_catalog_set() +NCATALOG_DEVICES=0 # Used by f_device_catalog_*() and MAIN -# f_device_register $name $desc $devname $type $enabled $init_function \ -# $get_function $shutdown_function $private $capacity # -# Register a device. A `structure' (see struct.subr) is created with the name -# device_$name (so make sure $name contains only alpha-numeric characters or -# the underscore, `_'). The remaining arguments after $name correspond to the -# properties of the `DEVICE' structure-type (defined above). +# A ``catalog'' device is for mapping GEOM devices to media devices (for +# example, determining if a $GEOM_CLASS_DISK geom is $DEVICE_TYPE_CDROM or +# $DEVICE_TYPE_DISK) and also getting default descriptions for devices that +# either lack a GEOM provided description or lack a presence in GEOM) # -# If not already registered, the device is then appended to the DEVICES -# environment variable, a space-separated list of all registered devices. +f_struct_define CATALOG_DEVICE \ + desc \ + name \ + type + +############################################################ FUNCTIONS + +# f_device_register $var_to_set $name $desc $devname $type $enabled +# $init_function $get_function $shutdown_function +# $private $capacity +# +# Register a device. A `structure' (see struct.subr) is created and if +# $var_to_set is non-NULL, upon success holds the name of the struct created. +# The remaining positional arguments correspond to the properties of the +# `DEVICE' structure-type to be assigned (defined above). +# +# If not already registered (based on $name and $type), a new device is created +# and $NDEVICES is incremented. # f_device_register() { - local name="$1" desc="$2" devname="$3" type="$4" enabled="$5" - local init_func="$6" get_func="$7" shutdown_func="$8" private="$9" - local capacity="${10}" - - f_struct_new DEVICE "device_$name" || return $FAILURE - device_$name set name "$name" - device_$name set desc "$desc" - device_$name set devname "$devname" - device_$name set type "$type" - device_$name set enabled "$enabled" - device_$name set init "$init_func" - device_$name set get "$get_func" - device_$name set shutdown "$shutdown_func" - device_$name set private "$private" - device_$name set capacity "$capacity" - - # Scan our global register to see if it needs ammending - local dev found= - for dev in $DEVICES; do - [ "$dev" = "$name" ] || continue - found=1 && break - done - [ "$found" ] || DEVICES="$DEVICES $name" + local __var_to_set="$1" __name="$2" __desc="$3" __devname="$4" + local __type="$5" __enabled="$6" __init_func="$7" __get_func="$8" + local __shutdown_func="$9" __private="${10}" __capacity="${11}" + # Required parameter(s) + [ "$__name" ] || return $FAILURE + if [ "$__var_to_set" ]; then + setvar "$__var_to_set" "" || return $FAILURE + fi + + local __device + if f_device_find -1 "$__name" "$__type" __device; then + f_struct_free "$__device" + f_struct_new DEVICE "$__device" || return $FAILURE + else + __device=device_$(( NDEVICES + 1 )) + f_struct_new DEVICE "$__device" || return $FAILURE + NDEVICES=$(( $NDEVICES + 1 )) + fi + $__device set name "$__name" + $__device set desc "$__desc" + $__device set devname "$__devname" + $__device set type "$__type" + $__device set enabled "$__enabled" + $__device set init "$__init_func" + $__device set get "$__get_func" + $__device set shutdown "$__shutdown_func" + $__device set private "$__private" + $__device set capacity "$__capacity" + + [ "$__var_to_set" ] && setvar "$__var_to_set" "$__device" return $SUCCESS } @@ -166,18 +172,21 @@ f_device_register() # f_device_reset() { - local dev - for dev in $DEVICES; do - f_device_shutdown $dev + local n=1 + while [ $n -le $NDEVICES ]; do + f_device_shutdown device_$n + # # XXX This potentially leaks $dev->private if it's being # used to point to something dynamic, but you're not supposed # to call this routine at such times that some open instance # has its private member pointing somewhere anyway. # - f_struct_free device_$dev + f_struct_free device_$n + + n=$(( $n + 1 )) done - DEVICES= + NDEVICES=0 } # f_device_reset_network @@ -186,34 +195,45 @@ f_device_reset() # f_device_reset_network() { - local dev type private pruned_list= - for dev in $DEVICES; do - device_$dev get type type - if [ "$type" != "$DEVICE_TYPE_NETWORK" ]; then - pruned_list="$pruned_list $dev" - continue - fi + local n=1 device type private i + while [ $n -le $NDEVICES ]; do + device=device_$n + f_struct $device || continue + $device get type type + [ "$type" = "$DEVICE_TYPE_NETWORK" ] || continue # # Leave the device up (don't call shutdown routine) # # Network devices may have DEVICE_INFO private member - device_$dev get private private + $device get private private [ "$private" ] && f_struct_free "$private" - f_struct_free device_$dev + # Free the network device + f_struct_free $device + + # Fill the gap we just created + i=$n + while [ $i -lt $NDEVICES ]; do + f_struct_copy device_$(( $i + 1 )) device_$i + done + f_struct_free device_$NDEVICES + + # Finally decrement the number of devices + NDEVICES=$(( $NDEVICES - 1 )) + + n=$(( $n + 1 )) done - DEVICES="${pruned_list# }" } # f_device_get_all # -# Get all device information for devices we have attached. +# Get all device information for all devices. # f_device_get_all() { - local devname desc capacity + local devname type desc capacity f_dprintf "f_device_get_all: Probing devices..." f_dialog_info "$msg_probing_devices_please_wait_this_can_take_a_while" @@ -221,180 +241,16 @@ f_device_get_all() # First go for the network interfaces f_device_get_all_network - # Next, try to find all the types of devices one might use - # as a media source for content - # - - local dev type max n=0 - for dev in $DEVICE_NAMES; do - n=$(( $n + 1 )) - # Get the desc, type, and max (with debugging disabled) - # NOTE: Bypassing f_device_name_get() for efficiency - # ASIDE: This would be equivalent to the following: - # debug= f_device_name_get $dev desc - # debug= f_device_name_get $dev type - # debug= f_device_name_get $dev max - debug= f_getvar _device_desc$n desc - debug= f_getvar _device_type$n type - debug= f_getvar _device_max$n max - - local k=0 - while [ $k -lt ${max:-0} ]; do - i=$k k=$(( $k + 1 )) - devname="" - case "$type" in - $DEVICE_TYPE_CDROM) - f_device_try "$dev" "$i" devname || continue - f_device_capacity "$devname" capacity - f_device_register "${devname##*/}" "$desc" \ - "$devname" $DEVICE_TYPE_CDROM 1 \ - f_media_init_cdrom f_media_get_cdrom \ - f_media_shutdown_cdrom "" "$capacity" - f_dprintf "Found a CDROM device for %s" \ - "$devname" - ;; - $DEVICE_TYPE_FLOPPY) - f_device_try "$dev" "$i" devname || continue - f_device_capacity "$devname" capacity - f_device_register "${devname##*/}" "$desc" \ - "$devname" $DEVICE_TYPE_FLOPPY 1 \ - f_media_init_floppy \ - f_media_get_floppy \ - f_media_shutdown_floppy "" "$capacity" - f_dprintf "Found a floppy device for %s" \ - "$devname" - ;; - $DEVICE_TYPE_USB) - f_device_try "$dev" "$i" devname || continue - f_device_capacity "$devname" capacity - f_device_register "${devname##*/}" "$desc" \ - "$devname" $DEVICE_TYPE_USB 1 \ - f_media_init_usb f_media_get_usb \ - f_media_shutdown_usb "" "$capacity" - f_dprintf "Found a USB disk for %s" "$devname" - ;; - esac - done - done - - # Register ISO9660 providers as CDROM devices - for devname in /dev/iso9660/*; do - f_device_try "$devname" || continue - f_device_capacity "$devname" capacity - f_device_register "${devname##*/}" "ISO9660 file system" \ - "$devname" $DEVICE_TYPE_CDROM 1 \ - f_media_init_cdrom f_media_get_cdrom \ - f_media_shutdown_cdrom "" "$capacity" - f_dprintf "Found a CDROM device for %s" "$devname" - done - - # Scan for mdconfig(8)-created md(4) devices - local filename - for devname in /dev/md[0-9] /dev/md[0-9][0-9]; do - f_device_try "$devname" || continue - - # See if the md(4) device is a vnode type backed by a file - filename=$( sysctl kern.geom.conftxt | - awk -v devname="${devname##*/}" \ - ' - ( $2 == "MD" ) && \ - ( $3 == devname ) && \ - ( $(NF-2) == "vnode" ) && \ - ( $(NF-1) == "file" ) \ - { - print $NF - } - ' ) - case "$filename" in - *.iso) # Register the device as an ISO9660 provider - f_device_capacity "$devname" capacity - f_device_register "${devname##*/}" \ - "md(4) vnode file system" \ - "$devname" $DEVICE_TYPE_CDROM 1 \ - f_media_init_cdrom f_media_get_cdrom \ - f_media_shutdown_cdrom "" "$capacity" - f_dprintf "Found a CDROM device for %s" "$devname" - ;; - esac - done - - # Finally go get the disks and look for partitions to register - local diskname slices index type rest slice part - for diskname in $( sysctl -n kern.disks ); do - - case "$diskname" in - cd*) - # XXX Due to unknown reasons, kern.disks returns SCSI - # CDROM as a valid disk. This will prevent bsdconfig - # from presenting SCSI CDROMs as available disks in - # various menus. Why GEOM treats SCSI CDROM as a disk - # is beyond me and that should be investigated. - # For temporary workaround, ignore SCSI CDROM device. - # - continue ;; - esac - - # Try to create a list of partitions and their types, - # consisting of "N,typeN ..." (e.g., "1,0xa5 2,0x06"). - if ! slices=$( fdisk -p "$diskname" 2> /dev/null | - awk '( $1 == "p" ) { print $2","$3 }' ) - then - f_dprintf "Unable to open disk %s" "$diskname" - continue + # Next, go for the GEOM devices we might want to use as media + local geom geoms geom_name + debug= f_geom_find "" $GEOM_CLASS_DEV geoms + for geom in $geoms; do + if ! f_device_probe_geom $geom; then + debug= $geom get name geom_name + f_dprintf "WARNING! Unable to classify %s as %s" \ + "GEOM device $geom_name" "media source" fi - - # Try and find its description - f_device_desc "$diskname" $DEVICE_TYPE_DISK desc - - f_device_capacity "$diskname" capacity - f_device_register "$diskname" "$desc" \ - "/dev/$diskname" $DEVICE_TYPE_DISK 0 \ - "" "" "" "" "$capacity" - f_dprintf "Found a disk device named %s" "$diskname" - - # Look for existing partitions to register - for slice in $slices; do - index="${slice%%,*}" type="${slice#*,}" - slice=${diskname}s$index - case "$type" in - 0x01|0x04|0x06|0x0b|0x0c|0x0e|0xef) - # DOS partitions to add as "DOS media devices" - f_device_capacity "/dev/$slice" capacity - f_device_register "$slice" "" \ - "/dev/$slice" $DEVICE_TYPE_DOS 1 \ - f_media_init_dos f_media_get_dos \ - f_media_shutdown_dos "" "$capacity" - f_dprintf "Found a DOS partition %s" "$slice" - ;; - 0xa5) # FreeBSD partition - for part in $( - bsdlabel -r $slice 2> /dev/null | - awk -v slice="$slice" ' - ( $1 ~ /[abdefgh]:/ ) { - printf "%s%s\n", - slice, - substr($1,1,1) - }' - ); do - f_quietly dumpfs -m /dev/$part || - continue - f_device_capacity \ - "$/dev/$part" capacity - f_device_register \ - "$part" "" "/dev/$part" \ - $DEVICE_TYPE_UFS 1 \ - f_media_init_ufs \ - f_media_get_ufs \ - f_media_shutdown_ufs "" \ - "$capacity" - f_dprintf "Found a UFS partition %s" \ - "$part" - done # parts - ;; - esac - done # slices - - done # disks + done } # f_device_get_all_network @@ -403,7 +259,7 @@ f_device_get_all() # f_device_get_all_network() { - local devname desc flags + local devname desc device flags for devname in $( ifconfig -l ); do # Eliminate network devices that don't make sense case "$devname" in @@ -413,9 +269,9 @@ f_device_get_all_network() # Try and find its description f_device_desc "$devname" $DEVICE_TYPE_NETWORK desc - f_dprintf "Found a network device named %s" "$devname" - f_device_register $devname \ - "$desc" "$devname" $DEVICE_TYPE_NETWORK 1 \ + f_dprintf "Found network device named %s" "$devname" + debug= f_device_register device $devname "$desc" \ + "$devname" $DEVICE_TYPE_NETWORK 1 \ f_media_init_network "" f_media_shutdown_network "" -1 # Set flags based on media and status @@ -435,37 +291,532 @@ f_device_get_all_network() if (value ~ /^active/) _or(var, "IF_ACTIVE") } }' )" - device_$devname set flags $flags + $device set flags $flags done } -# f_device_name_get $type $name type|desc|max [$var_to_set] +# f_device_rescan +# +# Rescan all devices, after closing previous set - convenience function. # -# Fetch the device type (type), description (desc), or maximum number of -# devices to scan for (max) associated with device $name and $type. If $type is -# either NULL, missing, or set to $DEVICE_TYPE_ANY then only $name is used. +f_device_rescan() +{ + f_device_reset + f_geom_rescan + f_device_get_all +} + +# f_device_rescan_network +# +# Rescan all network devices, after closing previous set - for convenience. +# +f_device_rescan_network() +{ + f_device_reset_network + f_device_get_all_network +} + +# f_device_probe_geom $geom +# +# Probe a single GEOM device and if it can be classified as a media source, +# register it using f_device_register() with known type-specific arguments. +# +f_device_probe_geom() +{ + local geom="$1" + + f_struct "$geom" || return $FAILURE + + # geom associated variables + local geom_name geom_consumer provider_ref geom_provider= + local provider_geom provider_config provider_class= + local provider_config_type catalog_struct catalog_type + local disk_ident + + # gnop(8)/geli(8) associated variables (p for `parent device') + local p_devname p_geom p_consumer p_provider_ref p_provider + local p_provider_config p_provider_geom p_provider_class + + # md(4) associated variables + local config config_type config_file magic= + + # Temporarily disable debugging to keep debug output light + local old_debug="$debug" debug= + + # + # Get the GEOM name (for use below in device registration) + # + $geom get name devname || continue + + # + # Attempt to get the consumer, provider, provider config, and + # provider class for this geom (errors ignored). + # + # NB: Each GEOM in the `DEV' class should have one consumer. + # That consumer should have a reference to its provider. + # + $geom get consumer1 geom_consumer + f_struct "$geom_consumer" get provider_ref provider_ref && + f_geom_find_by id "$provider_ref" provider geom_provider + if f_struct "$geom_provider"; then + $geom_provider get config provider_config + f_geom_parent $geom_provider provider_geom && + f_geom_parent $provider_geom provider_class + fi + + # + # Get values for device registration (errors ignored) + # + f_struct "$provider_class" get name type + f_struct "$geom_provider" get mediasize capacity + f_struct "$provider_config" get descr desc + + # + # For gnop(8), geli(8), or combination thereof, change device type to + # that of the consumer + # + p_devname= p_geom= p_provider= p_provider_config= + case "$devname" in + *.nop.eli) p_devname="${devname%.nop.eli}" ;; + *.eli.nop) p_devname="${devname%.eli.nop}" ;; + *.eli) p_devname="${devname%.eli}" ;; + *.nop) p_devname="${devname%.nop}" ;; + esac + [ "$p_devname" ] && f_geom_find "$p_devname" $GEOM_CLASS_DEV p_geom + if [ "${p_geom:-$geom}" != "$geom" ]; then + f_struct "$p_geom" get consumer1 p_consumer + f_struct "$p_consumer" get provider_ref p_provider_ref && + f_geom_find_by id "$p_provider_ref" provider p_provider + if f_struct "$p_provider"; then + $p_provider get config p_provider_config + f_geom_parent $p_provider p_provider_geom && + f_geom_parent $p_provider_geom p_provider_class + fi + f_struct "$p_provider_class" get name type + fi + + # Look up geom device in device catalog for default description + f_device_catalog_get \ + $DEVICE_TYPE_ANY "${p_devname:-$devname}" catalog_struct + [ "$desc" ] || f_struct "catalog_device_$catalog_struct" get desc desc + + # Use device catalog entry for potential re-classification(s) + f_struct "catalog_device_$catalog_struct" get type catalog_type + + # Restore debugging for this next part (device registration) + debug="$old_debug" + + # + # Register the device + # + local retval device + case "$type" in + $GEOM_CLASS_DISK) + # First attempt to classify by device catalog (see MAIN) + case "$catalog_type" in + $DEVICE_TYPE_CDROM) + f_dprintf "Found CDROM device for disk %s" "$devname" + debug= f_device_register device "$devname" "$desc" \ + "/dev/$devname" $DEVICE_TYPE_CDROM 1 \ + f_media_init_cdrom f_media_get_cdrom \ + f_media_shutdown_cdrom "" "$capacity" && + return $SUCCESS + ;; + esac + + # Fall back to register label device as a disk and taste it + f_dprintf "Found disk device named %s" "$devname" + debug= f_struct "$p_provider_config" get \ + ident disk_ident || + debug= f_struct "$provider_config" get \ + ident disk_ident + debug= f_device_register device "$devname" "$desc" \ + "/dev/$devname" $DEVICE_TYPE_DISK 1 \ + "" "" "" "$disk_ident" "$capacity" + retval=$? + + # Detect ``dangerously dedicated'' filesystems (errors ignored) + f_device_probe_disk_fs device "$devname" "$capacity" && + retval=$SUCCESS + + return $retval + ;; + $GEOM_CLASS_FD) + f_dprintf "Found floppy device named %s" "$devname" + debug= f_device_register device "$devname" "$desc" \ + "/dev/$devname" $DEVICE_TYPE_FLOPPY 1 \ + f_media_init_floppy f_media_get_floppy \ + f_media_shutdown_floppy "" "$capacity" + return $? + ;; + $GEOM_CLASS_LABEL) + : fall through to below section # reduces indentation level + ;; + $GEOM_CLASS_MD) + f_dprintf "Found disk device named %s" "$devname" + debug= f_device_register device "$devname" "$desc" \ + "/dev/$devname" $DEVICE_TYPE_DISK 1 \ + "" "" "" "" "$capacity" + retval=$? + + # + # Attempt to get file(1) magic to potentially classify as + # alternate media type. If unable to get magic, fall back to + # md(4) characteristics (such as vnode filename). + # + [ -r "/dev/$devname" ] && + magic=$( file -bs "/dev/$devname" 2> /dev/null ) + if [ ! "$magic" ]; then + # Fall back to md(4) characteristics + if f_struct "$p_provider_config"; then + config="$p_provider_config" + else + config="$provider_config" + fi + debug= f_struct "$config" get type config_type + debug= f_struct "$config" get file config_file + + # Substitute magic for below based on type and file + case "$config_type=$config_file" in + vnode=*.iso) magic="ISO 9660" ;; + esac + fi + f_device_probe_disk_fs device \ + "$devname" "$capacity" "$magic" && + retval=$SUCCESS # Errors ignored + + return $retval + ;; + $GEOM_CLASS_PART) + if f_struct "$p_provider_config"; then + config="$p_provider_config" + else + config="$provider_config" + fi + debug= f_struct "$config" get type provider_config_type + f_device_probe_geom_part device \ + "$provider_config_type" "$devname" "$capacity" + retval=$? + device_type=$DEVICE_TYPE_NONE + [ $retval -eq $SUCCESS ] && + debug= f_struct "$device" get type device_type + + # Potentially re-classify as USB device + if [ "$device_type" = "$DEVICE_TYPE_UFS" -a \ + "$catalog_type" = "$DEVICE_TYPE_USB" ] + then + f_dprintf "Found USB device for partition %s" \ + "$devname" + debug= f_struct "$p_provider_geom" get \ + name disk_name || + debug= f_struct "$provider_geom" get \ + name disk_name + debug= f_device_register device "$devname" "$desc" \ + "/dev/$devname" $DEVICE_TYPE_USB 1 \ + f_media_init_usb f_media_get_usb \ + f_media_shutdown_usb "$disk_name" "$capacity" + retval=$? + fi + + return $retval + ;; + $GEOM_CLASS_RAID) + # Use the provider geom name as the description + if [ ! "$desc" ]; then + f_struct "$p_provider_geom" get name desc || + f_struct "$provider_geom" get name desc + fi + + f_dprintf "Found disk device named %s" "$devname" + debug= f_device_register device \ + "$devname" "${desc:-GEOM RAID device}" \ + "/dev/$devname" $DEVICE_TYPE_DISK 1 \ + "" "" "" "" "$capacity" + retval=$? + + # Detect ``dangerously dedicated'' filesystems + f_device_probe_disk_fs device "$devname" "$capacity" && + retval=$SUCCESS # Errors ignored + + return $retval + ;; + $GEOM_CLASS_ZFS_ZVOL) + f_dprintf "Found disk device named %s" "$devname" + debug= f_device_register device \ + "$devname" "${desc:-GEOM ZFS::ZVOL device}" \ + "/dev/$devname" $DEVICE_TYPE_DISK 1 \ + "" "" "" "" "$capacity" + retval=$? + + # Detect ``dangerously dedicated'' filesystems + f_device_probe_disk_fs device "$devname" "$capacity" && + retval=$SUCCESS # Errors ignored + + return $retval + ;; + *) + return $FAILURE # Unknown GEOM class + esac + + # + # Still here? Must be $GEOM_CLASS_LABEL + # + + local label_geom label_devname label_devgeom= label_devconsumer + local label_devprovider= label_devprovider_ref label_devprovider_config + local label_gpart_type + + if f_struct "$p_provider"; then + label_geom="$p_provider_geom" + else + label_geom="$provider_geom" + fi + + case "$devname" in + gpt/*|gptid/*) + # + # Attempt to get the partition type by getting the `config' + # member of the provider for our device (which is named in the + # parent geom of our current provider). + # + debug= f_struct "$label_geom" get name label_devname && + debug= f_geom_find "$label_devname" $GEOM_CLASS_DEV \ + label_devgeom + debug= f_struct "$label_devgeom" get \ + consumer1 label_devconsumer + debug= f_struct "$label_devconsumer" get \ + provider_ref label_devprovider_ref && + debug= f_geom_find_by id "$label_devprovider_ref" \ + provider label_devprovider + debug= f_struct "$label_devprovider" get \ + config label_devprovider_config + debug= f_struct "$label_devprovider_config" get \ + type label_gpart_type + + # + # Register device label based on partition type + # + f_device_probe_geom_part device \ + "$label_gpart_type" "$devname" "$capacity" + return $? + ;; + iso9660/*) + f_dprintf "Found CDROM device labeled %s" "$devname" + debug= f_device_register device \ + "$devname" "ISO9660 file system" \ + "/dev/$devname" $DEVICE_TYPE_CDROM 1 \ + f_media_init_cdrom f_media_get_cdrom \ + f_media_shutdown_cdrom "" "$capacity" + return $? + ;; + label/*) + # For generic labels, use provider geom name as real device + debug= f_struct "$label_geom" get name label_devname + + # Look up label geom device in device catalog for default desc + debug= f_device_catalog_get \ + $DEVICE_TYPE_ANY "$label_devname" catalog_struct + [ "$desc" ] || debug= f_struct \ + "catalog_device_$catalog_struct" get desc desc + + # Use device catalog entry for potential re-classification(s) + debug= f_struct "catalog_device_$catalog_struct" get \ + type catalog_type + + # First attempt to classify by device catalog (see MAIN) + case "$catalog_type" in + $DEVICE_TYPE_CDROM) + f_dprintf "Found CDROM device for disk %s" "$devname" + debug= f_device_register device "$devname" "$desc" \ + "/dev/$devname" $DEVICE_TYPE_CDROM 1 \ + f_media_init_cdrom f_media_get_cdrom \ + f_media_shutdown_cdrom "" "$capacity" && + return $SUCCESS + ;; + esac + + # Fall back to register label device as a disk and taste it + f_dprintf "Found disk device labeled %s" "$devname" + debug= f_device_register device \ + "$devname" "GEOM LABEL device" \ + "/dev/$devname" $DEVICE_TYPE_DISK 1 \ + "" "" "" "" "$capacity" + retval=$? + + # Detect ``dangerously dedicated'' filesystems (errors ignored) + f_device_probe_disk_fs device "$devname" "$capacity" && + retval=$SUCCESS + + return $retval + ;; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat May 17 03:49:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC24F9C; Sat, 17 May 2014 03:49:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C75F6285F; Sat, 17 May 2014 03:49:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4H3nUOK056919; Sat, 17 May 2014 03:49:30 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4H3nTZK056910; Sat, 17 May 2014 03:49:29 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201405170349.s4H3nTZK056910@svn.freebsd.org> From: Devin Teske Date: Sat, 17 May 2014 03:49:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266292 - in stable/9/usr.sbin/bsdconfig: dot examples networking/share share share/media share/packages X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 03:49:31 -0000 Author: dteske Date: Sat May 17 03:49:29 2014 New Revision: 266292 URL: http://svnweb.freebsd.org/changeset/base/266292 Log: MFC r264840: Implement GEOM based media device classification. Added: stable/9/usr.sbin/bsdconfig/share/geom.subr - copied unchanged from r264840, head/usr.sbin/bsdconfig/share/geom.subr Modified: stable/9/usr.sbin/bsdconfig/dot/dot stable/9/usr.sbin/bsdconfig/examples/browse_packages_ftp.sh stable/9/usr.sbin/bsdconfig/examples/browse_packages_http.sh stable/9/usr.sbin/bsdconfig/networking/share/device.subr stable/9/usr.sbin/bsdconfig/share/Makefile stable/9/usr.sbin/bsdconfig/share/common.subr stable/9/usr.sbin/bsdconfig/share/device.subr stable/9/usr.sbin/bsdconfig/share/media/cdrom.subr stable/9/usr.sbin/bsdconfig/share/media/common.subr stable/9/usr.sbin/bsdconfig/share/media/directory.subr stable/9/usr.sbin/bsdconfig/share/media/dos.subr stable/9/usr.sbin/bsdconfig/share/media/floppy.subr stable/9/usr.sbin/bsdconfig/share/media/ftp.subr stable/9/usr.sbin/bsdconfig/share/media/http.subr stable/9/usr.sbin/bsdconfig/share/media/nfs.subr stable/9/usr.sbin/bsdconfig/share/media/tcpip.subr stable/9/usr.sbin/bsdconfig/share/media/ufs.subr stable/9/usr.sbin/bsdconfig/share/media/usb.subr stable/9/usr.sbin/bsdconfig/share/packages/index.subr stable/9/usr.sbin/bsdconfig/share/packages/packages.subr stable/9/usr.sbin/bsdconfig/share/struct.subr Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/bsdconfig/ (props changed) Modified: stable/9/usr.sbin/bsdconfig/dot/dot ============================================================================== --- stable/9/usr.sbin/bsdconfig/dot/dot Sat May 17 03:39:56 2014 (r266291) +++ stable/9/usr.sbin/bsdconfig/dot/dot Sat May 17 03:49:29 2014 (r266292) @@ -29,7 +29,7 @@ ############################################################ INCLUDES # Prevent common.subr from auto initializing debugging (this is not an inter- -# active utility that requires debugging; also `-d' has been repurposed). +# active utility so does not require debugging; also `-d' has been repurposed). # DEBUG_SELF_INITIALIZE=NO Modified: stable/9/usr.sbin/bsdconfig/examples/browse_packages_ftp.sh ============================================================================== --- stable/9/usr.sbin/bsdconfig/examples/browse_packages_ftp.sh Sat May 17 03:39:56 2014 (r266291) +++ stable/9/usr.sbin/bsdconfig/examples/browse_packages_ftp.sh Sat May 17 03:49:29 2014 (r266292) @@ -18,7 +18,7 @@ if [ ! -e "$TMPDIR/packages/INDEX" ]; th mediaSetFTP mediaOpen f_show_info "Downloading packages/INDEX from\n %s" "$_ftpPath" - f_device_get media packages/INDEX > $TMPDIR/packages/INDEX + f_device_get device_media packages/INDEX > $TMPDIR/packages/INDEX fi _directoryPath=$TMPDIR mediaSetDirectory Modified: stable/9/usr.sbin/bsdconfig/examples/browse_packages_http.sh ============================================================================== --- stable/9/usr.sbin/bsdconfig/examples/browse_packages_http.sh Sat May 17 03:39:56 2014 (r266291) +++ stable/9/usr.sbin/bsdconfig/examples/browse_packages_http.sh Sat May 17 03:49:29 2014 (r266292) @@ -18,7 +18,7 @@ if [ ! -e "$TMPDIR/packages/INDEX" ]; th mediaSetHTTP mediaOpen f_show_info "Downloading packages/INDEX from\n %s" "$_httpPath" - f_device_get media packages/INDEX > $TMPDIR/packages/INDEX + f_device_get device_media packages/INDEX > $TMPDIR/packages/INDEX fi _directoryPath=$TMPDIR mediaSetDirectory Modified: stable/9/usr.sbin/bsdconfig/networking/share/device.subr ============================================================================== --- stable/9/usr.sbin/bsdconfig/networking/share/device.subr Sat May 17 03:39:56 2014 (r266291) +++ stable/9/usr.sbin/bsdconfig/networking/share/device.subr Sat May 17 03:49:29 2014 (r266292) @@ -75,10 +75,11 @@ f_dialog_menu_netdev() # # Get list of usable network interfaces # - local devs if iflist= # Calculated below + local dev devs if iflist= # Calculated below f_device_rescan_network f_device_find "" $DEVICE_TYPE_NETWORK devs - for if in $devs; do + for dev in $devs; do + f_struct "$dev" get name if || continue # Skip unsavory interfaces case "$if" in lo[0-9]*|ppp[0-9]*|sl[0-9]*|faith[0-9]*) continue ;; Modified: stable/9/usr.sbin/bsdconfig/share/Makefile ============================================================================== --- stable/9/usr.sbin/bsdconfig/share/Makefile Sat May 17 03:39:56 2014 (r266291) +++ stable/9/usr.sbin/bsdconfig/share/Makefile Sat May 17 03:49:29 2014 (r266292) @@ -5,7 +5,7 @@ NO_OBJ= SUBDIR= media packages FILESDIR= ${SHAREDIR}/bsdconfig -FILES= common.subr device.subr dialog.subr keymap.subr \ +FILES= common.subr device.subr dialog.subr geom.subr keymap.subr \ mustberoot.subr script.subr strings.subr struct.subr \ sysrc.subr variable.subr Modified: stable/9/usr.sbin/bsdconfig/share/common.subr ============================================================================== --- stable/9/usr.sbin/bsdconfig/share/common.subr Sat May 17 03:39:56 2014 (r266291) +++ stable/9/usr.sbin/bsdconfig/share/common.subr Sat May 17 03:49:29 2014 (r266292) @@ -146,7 +146,7 @@ f_debug_init() # Process stored command-line arguments # set -- $ARGV - local OPTIND flag + local OPTIND OPTARG flag f_dprintf "f_debug_init: ARGV=[%s] GETOPTS_STDARGS=[%s]" \ "$ARGV" "$GETOPTS_STDARGS" while getopts "$GETOPTS_STDARGS$GETOPTS_EXTRA$GETOPTS_ALLFLAGS" flag \ @@ -762,14 +762,30 @@ f_running_as_init() } # f_mounted $local_directory +# f_mounted -b $device # -# Return success if a filesystem is mounted on a particular directory. +# Return success if a filesystem is mounted on a particular directory. If `-b' +# is present, instead check that the block device (or a partition thereof) is +# mounted. # f_mounted() { - local dir="$1" - [ -d "$dir" ] || return $FAILURE - mount | grep -Eq " on $dir \([^)]+\)$" + local OPTIND OPTARG flag use_device= + while getopts b flag; do + case "$flag" in + b) use_device=1 ;; + esac + done + shift $(( $OPTIND - 1 )) + if [ "$use_device" ]; then + local device="$1" + mount | grep -Eq \ + "^$device([[:space:]]|p[0-9]|s[0-9]|\.nop|\.eli)" + else + [ -d "$dir" ] || return $FAILURE + mount | grep -Eq " on $dir \([^)]+\)$" + fi + # Return status is that of last grep(1) } # f_eval_catch [-de] [-k $var_to_set] $funcname $utility \ @@ -854,7 +870,7 @@ f_eval_catch() # # Process local function arguments # - local OPTIND __flag + local OPTIND OPTARG __flag while getopts "dek:" __flag > /dev/null; do case "$__flag" in d) __no_dialog=1 ;; Modified: stable/9/usr.sbin/bsdconfig/share/device.subr ============================================================================== --- stable/9/usr.sbin/bsdconfig/share/device.subr Sat May 17 03:39:56 2014 (r266291) +++ stable/9/usr.sbin/bsdconfig/share/device.subr Sat May 17 03:49:29 2014 (r266292) @@ -32,6 +32,7 @@ BSDCFG_SHARE="/usr/share/bsdconfig" . $BSDCFG_SHARE/common.subr || exit 1 f_dprintf "%s: loading includes..." device.subr f_include $BSDCFG_SHARE/dialog.subr +f_include $BSDCFG_SHARE/geom.subr f_include $BSDCFG_SHARE/strings.subr f_include $BSDCFG_SHARE/struct.subr @@ -40,42 +41,53 @@ f_include_lang $BSDCFG_LIBE/include/mess ############################################################ GLOBALS -DEVICES= -DEVICE_NAMES= -NDEVICES=0 +NDEVICES=0 # Set by f_device_register(), used by f_device_*() -# A "device" from sysinstall's point of view +# +# A "device" from legacy sysinstall's point of view (mostly) +# +# NB: Disk devices have their `private' property set to GEOM ident +# NB: USB devices have their `private' property set to USB disk device name +# f_struct_define DEVICE \ - name \ + capacity \ desc \ devname \ - type \ - capacity \ enabled \ - init \ - get \ - shutdown \ flags \ + get \ + init \ + name \ private \ + shutdown \ + type \ volume # Network devices have their `private' property set to this f_struct_define DEVICE_INFO \ - use_rtsol use_dhcp ipaddr ipv6addr netmask extras - -setvar DEVICE_TYPE_NONE 1 -setvar DEVICE_TYPE_DISK 2 -setvar DEVICE_TYPE_FLOPPY 3 -setvar DEVICE_TYPE_FTP 4 -setvar DEVICE_TYPE_NETWORK 5 -setvar DEVICE_TYPE_CDROM 6 -setvar DEVICE_TYPE_USB 7 -setvar DEVICE_TYPE_DOS 8 -setvar DEVICE_TYPE_UFS 9 -setvar DEVICE_TYPE_NFS 10 -setvar DEVICE_TYPE_ANY 11 -setvar DEVICE_TYPE_HTTP_PROXY 12 -setvar DEVICE_TYPE_HTTP 13 + extras \ + ipaddr \ + ipv6addr \ + netmask \ + use_dhcp \ + use_rtsol + +# +# Device types for f_device_register(), f_device_find(), et al. +# +setvar DEVICE_TYPE_ANY "any" # Any +setvar DEVICE_TYPE_NONE "NONE" # Unknown +setvar DEVICE_TYPE_DISK "DISK" # GEOM `DISK' +setvar DEVICE_TYPE_FLOPPY "FD" # GEOM `FD' +setvar DEVICE_TYPE_FTP "FTP" # Dynamic network device +setvar DEVICE_TYPE_NETWORK "NETWORK" # See f_device_get_all_network +setvar DEVICE_TYPE_CDROM "CDROM" # GEOM `DISK' +setvar DEVICE_TYPE_USB "USB" # GEOM `PART' +setvar DEVICE_TYPE_DOS "DOS" # GEOM `DISK' `PART' or `LABEL' +setvar DEVICE_TYPE_UFS "UFS" # GEOM `DISK' `PART' or `LABEL' +setvar DEVICE_TYPE_NFS "NFS" # Dynamic network device +setvar DEVICE_TYPE_HTTP_PROXY "HTTP_PROXY" # Dynamic network device +setvar DEVICE_TYPE_HTTP "HTTP" # Dynamic network device # Network devices have the following flags available setvar IF_ETHERNET 1 @@ -87,76 +99,70 @@ setvar IF_ACTIVE 4 # : ${DEVICE_SELF_SCAN_ALL=1} -############################################################ FUNCTIONS - -# f_device_try $name [$i [$var_path]] -# -# Test a particular device. If $i is given, then $name is expected to contain a -# single "%d" where $i will be inserted using printf. If $var_path is given, -# it is used as a variable name to provide the caller the device pathname. # -# Returns success if the device path exists and is a cdev. +# Device Catalog variables # -f_device_try() -{ - local name="$1" i="$2" var_path="$3" unit - if [ "$i" ]; then - f_sprintf unit "$name" "$i" - else - unit="$name" - fi - case "$unit" in - /dev/*) : good ;; # already qualified - *) unit="/dev/$unit" ;; - esac - [ "$var_path" ] && setvar "$var_path" "$unit" - f_dprintf "f_device_try: making sure %s is a device node" "$unit" - if [ -c "$unit" ]; then - f_dprintf "f_device_try: %s is a cdev [good]" "$unit" - return $SUCCESS - else - f_dprintf "f_device_try: %s is not a cdev [skip]" "$unit" - return $FAILURE - fi -} +DEVICE_CATALOG_APPEND_ONLY= # Used by f_device_catalog_set() +NCATALOG_DEVICES=0 # Used by f_device_catalog_*() and MAIN -# f_device_register $name $desc $devname $type $enabled $init_function \ -# $get_function $shutdown_function $private $capacity # -# Register a device. A `structure' (see struct.subr) is created with the name -# device_$name (so make sure $name contains only alpha-numeric characters or -# the underscore, `_'). The remaining arguments after $name correspond to the -# properties of the `DEVICE' structure-type (defined above). +# A ``catalog'' device is for mapping GEOM devices to media devices (for +# example, determining if a $GEOM_CLASS_DISK geom is $DEVICE_TYPE_CDROM or +# $DEVICE_TYPE_DISK) and also getting default descriptions for devices that +# either lack a GEOM provided description or lack a presence in GEOM) # -# If not already registered, the device is then appended to the DEVICES -# environment variable, a space-separated list of all registered devices. +f_struct_define CATALOG_DEVICE \ + desc \ + name \ + type + +############################################################ FUNCTIONS + +# f_device_register $var_to_set $name $desc $devname $type $enabled +# $init_function $get_function $shutdown_function +# $private $capacity +# +# Register a device. A `structure' (see struct.subr) is created and if +# $var_to_set is non-NULL, upon success holds the name of the struct created. +# The remaining positional arguments correspond to the properties of the +# `DEVICE' structure-type to be assigned (defined above). +# +# If not already registered (based on $name and $type), a new device is created +# and $NDEVICES is incremented. # f_device_register() { - local name="$1" desc="$2" devname="$3" type="$4" enabled="$5" - local init_func="$6" get_func="$7" shutdown_func="$8" private="$9" - local capacity="${10}" - - f_struct_new DEVICE "device_$name" || return $FAILURE - device_$name set name "$name" - device_$name set desc "$desc" - device_$name set devname "$devname" - device_$name set type "$type" - device_$name set enabled "$enabled" - device_$name set init "$init_func" - device_$name set get "$get_func" - device_$name set shutdown "$shutdown_func" - device_$name set private "$private" - device_$name set capacity "$capacity" - - # Scan our global register to see if it needs ammending - local dev found= - for dev in $DEVICES; do - [ "$dev" = "$name" ] || continue - found=1 && break - done - [ "$found" ] || DEVICES="$DEVICES $name" + local __var_to_set="$1" __name="$2" __desc="$3" __devname="$4" + local __type="$5" __enabled="$6" __init_func="$7" __get_func="$8" + local __shutdown_func="$9" __private="${10}" __capacity="${11}" + # Required parameter(s) + [ "$__name" ] || return $FAILURE + if [ "$__var_to_set" ]; then + setvar "$__var_to_set" "" || return $FAILURE + fi + + local __device + if f_device_find -1 "$__name" "$__type" __device; then + f_struct_free "$__device" + f_struct_new DEVICE "$__device" || return $FAILURE + else + __device=device_$(( NDEVICES + 1 )) + f_struct_new DEVICE "$__device" || return $FAILURE + NDEVICES=$(( $NDEVICES + 1 )) + fi + $__device set name "$__name" + $__device set desc "$__desc" + $__device set devname "$__devname" + $__device set type "$__type" + $__device set enabled "$__enabled" + $__device set init "$__init_func" + $__device set get "$__get_func" + $__device set shutdown "$__shutdown_func" + $__device set private "$__private" + $__device set capacity "$__capacity" + + [ "$__var_to_set" ] && setvar "$__var_to_set" "$__device" return $SUCCESS } @@ -166,18 +172,21 @@ f_device_register() # f_device_reset() { - local dev - for dev in $DEVICES; do - f_device_shutdown $dev + local n=1 + while [ $n -le $NDEVICES ]; do + f_device_shutdown device_$n + # # XXX This potentially leaks $dev->private if it's being # used to point to something dynamic, but you're not supposed # to call this routine at such times that some open instance # has its private member pointing somewhere anyway. # - f_struct_free device_$dev + f_struct_free device_$n + + n=$(( $n + 1 )) done - DEVICES= + NDEVICES=0 } # f_device_reset_network @@ -186,34 +195,45 @@ f_device_reset() # f_device_reset_network() { - local dev type private pruned_list= - for dev in $DEVICES; do - device_$dev get type type - if [ "$type" != "$DEVICE_TYPE_NETWORK" ]; then - pruned_list="$pruned_list $dev" - continue - fi + local n=1 device type private i + while [ $n -le $NDEVICES ]; do + device=device_$n + f_struct $device || continue + $device get type type + [ "$type" = "$DEVICE_TYPE_NETWORK" ] || continue # # Leave the device up (don't call shutdown routine) # # Network devices may have DEVICE_INFO private member - device_$dev get private private + $device get private private [ "$private" ] && f_struct_free "$private" - f_struct_free device_$dev + # Free the network device + f_struct_free $device + + # Fill the gap we just created + i=$n + while [ $i -lt $NDEVICES ]; do + f_struct_copy device_$(( $i + 1 )) device_$i + done + f_struct_free device_$NDEVICES + + # Finally decrement the number of devices + NDEVICES=$(( $NDEVICES - 1 )) + + n=$(( $n + 1 )) done - DEVICES="${pruned_list# }" } # f_device_get_all # -# Get all device information for devices we have attached. +# Get all device information for all devices. # f_device_get_all() { - local devname desc capacity + local devname type desc capacity f_dprintf "f_device_get_all: Probing devices..." f_dialog_info "$msg_probing_devices_please_wait_this_can_take_a_while" @@ -221,180 +241,16 @@ f_device_get_all() # First go for the network interfaces f_device_get_all_network - # Next, try to find all the types of devices one might use - # as a media source for content - # - - local dev type max n=0 - for dev in $DEVICE_NAMES; do - n=$(( $n + 1 )) - # Get the desc, type, and max (with debugging disabled) - # NOTE: Bypassing f_device_name_get() for efficiency - # ASIDE: This would be equivalent to the following: - # debug= f_device_name_get $dev desc - # debug= f_device_name_get $dev type - # debug= f_device_name_get $dev max - debug= f_getvar _device_desc$n desc - debug= f_getvar _device_type$n type - debug= f_getvar _device_max$n max - - local k=0 - while [ $k -lt ${max:-0} ]; do - i=$k k=$(( $k + 1 )) - devname="" - case "$type" in - $DEVICE_TYPE_CDROM) - f_device_try "$dev" "$i" devname || continue - f_device_capacity "$devname" capacity - f_device_register "${devname##*/}" "$desc" \ - "$devname" $DEVICE_TYPE_CDROM 1 \ - f_media_init_cdrom f_media_get_cdrom \ - f_media_shutdown_cdrom "" "$capacity" - f_dprintf "Found a CDROM device for %s" \ - "$devname" - ;; - $DEVICE_TYPE_FLOPPY) - f_device_try "$dev" "$i" devname || continue - f_device_capacity "$devname" capacity - f_device_register "${devname##*/}" "$desc" \ - "$devname" $DEVICE_TYPE_FLOPPY 1 \ - f_media_init_floppy \ - f_media_get_floppy \ - f_media_shutdown_floppy "" "$capacity" - f_dprintf "Found a floppy device for %s" \ - "$devname" - ;; - $DEVICE_TYPE_USB) - f_device_try "$dev" "$i" devname || continue - f_device_capacity "$devname" capacity - f_device_register "${devname##*/}" "$desc" \ - "$devname" $DEVICE_TYPE_USB 1 \ - f_media_init_usb f_media_get_usb \ - f_media_shutdown_usb "" "$capacity" - f_dprintf "Found a USB disk for %s" "$devname" - ;; - esac - done - done - - # Register ISO9660 providers as CDROM devices - for devname in /dev/iso9660/*; do - f_device_try "$devname" || continue - f_device_capacity "$devname" capacity - f_device_register "${devname##*/}" "ISO9660 file system" \ - "$devname" $DEVICE_TYPE_CDROM 1 \ - f_media_init_cdrom f_media_get_cdrom \ - f_media_shutdown_cdrom "" "$capacity" - f_dprintf "Found a CDROM device for %s" "$devname" - done - - # Scan for mdconfig(8)-created md(4) devices - local filename - for devname in /dev/md[0-9] /dev/md[0-9][0-9]; do - f_device_try "$devname" || continue - - # See if the md(4) device is a vnode type backed by a file - filename=$( sysctl kern.geom.conftxt | - awk -v devname="${devname##*/}" \ - ' - ( $2 == "MD" ) && \ - ( $3 == devname ) && \ - ( $(NF-2) == "vnode" ) && \ - ( $(NF-1) == "file" ) \ - { - print $NF - } - ' ) - case "$filename" in - *.iso) # Register the device as an ISO9660 provider - f_device_capacity "$devname" capacity - f_device_register "${devname##*/}" \ - "md(4) vnode file system" \ - "$devname" $DEVICE_TYPE_CDROM 1 \ - f_media_init_cdrom f_media_get_cdrom \ - f_media_shutdown_cdrom "" "$capacity" - f_dprintf "Found a CDROM device for %s" "$devname" - ;; - esac - done - - # Finally go get the disks and look for partitions to register - local diskname slices index type rest slice part - for diskname in $( sysctl -n kern.disks ); do - - case "$diskname" in - cd*) - # XXX Due to unknown reasons, kern.disks returns SCSI - # CDROM as a valid disk. This will prevent bsdconfig - # from presenting SCSI CDROMs as available disks in - # various menus. Why GEOM treats SCSI CDROM as a disk - # is beyond me and that should be investigated. - # For temporary workaround, ignore SCSI CDROM device. - # - continue ;; - esac - - # Try to create a list of partitions and their types, - # consisting of "N,typeN ..." (e.g., "1,0xa5 2,0x06"). - if ! slices=$( fdisk -p "$diskname" 2> /dev/null | - awk '( $1 == "p" ) { print $2","$3 }' ) - then - f_dprintf "Unable to open disk %s" "$diskname" - continue + # Next, go for the GEOM devices we might want to use as media + local geom geoms geom_name + debug= f_geom_find "" $GEOM_CLASS_DEV geoms + for geom in $geoms; do + if ! f_device_probe_geom $geom; then + debug= $geom get name geom_name + f_dprintf "WARNING! Unable to classify %s as %s" \ + "GEOM device $geom_name" "media source" fi - - # Try and find its description - f_device_desc "$diskname" $DEVICE_TYPE_DISK desc - - f_device_capacity "$diskname" capacity - f_device_register "$diskname" "$desc" \ - "/dev/$diskname" $DEVICE_TYPE_DISK 0 \ - "" "" "" "" "$capacity" - f_dprintf "Found a disk device named %s" "$diskname" - - # Look for existing partitions to register - for slice in $slices; do - index="${slice%%,*}" type="${slice#*,}" - slice=${diskname}s$index - case "$type" in - 0x01|0x04|0x06|0x0b|0x0c|0x0e|0xef) - # DOS partitions to add as "DOS media devices" - f_device_capacity "/dev/$slice" capacity - f_device_register "$slice" "" \ - "/dev/$slice" $DEVICE_TYPE_DOS 1 \ - f_media_init_dos f_media_get_dos \ - f_media_shutdown_dos "" "$capacity" - f_dprintf "Found a DOS partition %s" "$slice" - ;; - 0xa5) # FreeBSD partition - for part in $( - bsdlabel -r $slice 2> /dev/null | - awk -v slice="$slice" ' - ( $1 ~ /[abdefgh]:/ ) { - printf "%s%s\n", - slice, - substr($1,1,1) - }' - ); do - f_quietly dumpfs -m /dev/$part || - continue - f_device_capacity \ - "$/dev/$part" capacity - f_device_register \ - "$part" "" "/dev/$part" \ - $DEVICE_TYPE_UFS 1 \ - f_media_init_ufs \ - f_media_get_ufs \ - f_media_shutdown_ufs "" \ - "$capacity" - f_dprintf "Found a UFS partition %s" \ - "$part" - done # parts - ;; - esac - done # slices - - done # disks + done } # f_device_get_all_network @@ -403,7 +259,7 @@ f_device_get_all() # f_device_get_all_network() { - local devname desc flags + local devname desc device flags for devname in $( ifconfig -l ); do # Eliminate network devices that don't make sense case "$devname" in @@ -413,9 +269,9 @@ f_device_get_all_network() # Try and find its description f_device_desc "$devname" $DEVICE_TYPE_NETWORK desc - f_dprintf "Found a network device named %s" "$devname" - f_device_register $devname \ - "$desc" "$devname" $DEVICE_TYPE_NETWORK 1 \ + f_dprintf "Found network device named %s" "$devname" + debug= f_device_register device $devname "$desc" \ + "$devname" $DEVICE_TYPE_NETWORK 1 \ f_media_init_network "" f_media_shutdown_network "" -1 # Set flags based on media and status @@ -435,37 +291,532 @@ f_device_get_all_network() if (value ~ /^active/) _or(var, "IF_ACTIVE") } }' )" - device_$devname set flags $flags + $device set flags $flags done } -# f_device_name_get $type $name type|desc|max [$var_to_set] +# f_device_rescan +# +# Rescan all devices, after closing previous set - convenience function. # -# Fetch the device type (type), description (desc), or maximum number of -# devices to scan for (max) associated with device $name and $type. If $type is -# either NULL, missing, or set to $DEVICE_TYPE_ANY then only $name is used. +f_device_rescan() +{ + f_device_reset + f_geom_rescan + f_device_get_all +} + +# f_device_rescan_network +# +# Rescan all network devices, after closing previous set - for convenience. +# +f_device_rescan_network() +{ + f_device_reset_network + f_device_get_all_network +} + +# f_device_probe_geom $geom +# +# Probe a single GEOM device and if it can be classified as a media source, +# register it using f_device_register() with known type-specific arguments. +# +f_device_probe_geom() +{ + local geom="$1" + + f_struct "$geom" || return $FAILURE + + # geom associated variables + local geom_name geom_consumer provider_ref geom_provider= + local provider_geom provider_config provider_class= + local provider_config_type catalog_struct catalog_type + local disk_ident + + # gnop(8)/geli(8) associated variables (p for `parent device') + local p_devname p_geom p_consumer p_provider_ref p_provider + local p_provider_config p_provider_geom p_provider_class + + # md(4) associated variables + local config config_type config_file magic= + + # Temporarily disable debugging to keep debug output light + local old_debug="$debug" debug= + + # + # Get the GEOM name (for use below in device registration) + # + $geom get name devname || continue + + # + # Attempt to get the consumer, provider, provider config, and + # provider class for this geom (errors ignored). + # + # NB: Each GEOM in the `DEV' class should have one consumer. + # That consumer should have a reference to its provider. + # + $geom get consumer1 geom_consumer + f_struct "$geom_consumer" get provider_ref provider_ref && + f_geom_find_by id "$provider_ref" provider geom_provider + if f_struct "$geom_provider"; then + $geom_provider get config provider_config + f_geom_parent $geom_provider provider_geom && + f_geom_parent $provider_geom provider_class + fi + + # + # Get values for device registration (errors ignored) + # + f_struct "$provider_class" get name type + f_struct "$geom_provider" get mediasize capacity + f_struct "$provider_config" get descr desc + + # + # For gnop(8), geli(8), or combination thereof, change device type to + # that of the consumer + # + p_devname= p_geom= p_provider= p_provider_config= + case "$devname" in + *.nop.eli) p_devname="${devname%.nop.eli}" ;; + *.eli.nop) p_devname="${devname%.eli.nop}" ;; + *.eli) p_devname="${devname%.eli}" ;; + *.nop) p_devname="${devname%.nop}" ;; + esac + [ "$p_devname" ] && f_geom_find "$p_devname" $GEOM_CLASS_DEV p_geom + if [ "${p_geom:-$geom}" != "$geom" ]; then + f_struct "$p_geom" get consumer1 p_consumer + f_struct "$p_consumer" get provider_ref p_provider_ref && + f_geom_find_by id "$p_provider_ref" provider p_provider + if f_struct "$p_provider"; then + $p_provider get config p_provider_config + f_geom_parent $p_provider p_provider_geom && + f_geom_parent $p_provider_geom p_provider_class + fi + f_struct "$p_provider_class" get name type + fi + + # Look up geom device in device catalog for default description + f_device_catalog_get \ + $DEVICE_TYPE_ANY "${p_devname:-$devname}" catalog_struct + [ "$desc" ] || f_struct "catalog_device_$catalog_struct" get desc desc + + # Use device catalog entry for potential re-classification(s) + f_struct "catalog_device_$catalog_struct" get type catalog_type + + # Restore debugging for this next part (device registration) + debug="$old_debug" + + # + # Register the device + # + local retval device + case "$type" in + $GEOM_CLASS_DISK) + # First attempt to classify by device catalog (see MAIN) + case "$catalog_type" in + $DEVICE_TYPE_CDROM) + f_dprintf "Found CDROM device for disk %s" "$devname" + debug= f_device_register device "$devname" "$desc" \ + "/dev/$devname" $DEVICE_TYPE_CDROM 1 \ + f_media_init_cdrom f_media_get_cdrom \ + f_media_shutdown_cdrom "" "$capacity" && + return $SUCCESS + ;; + esac + + # Fall back to register label device as a disk and taste it + f_dprintf "Found disk device named %s" "$devname" + debug= f_struct "$p_provider_config" get \ + ident disk_ident || + debug= f_struct "$provider_config" get \ + ident disk_ident + debug= f_device_register device "$devname" "$desc" \ + "/dev/$devname" $DEVICE_TYPE_DISK 1 \ + "" "" "" "$disk_ident" "$capacity" + retval=$? + + # Detect ``dangerously dedicated'' filesystems (errors ignored) + f_device_probe_disk_fs device "$devname" "$capacity" && + retval=$SUCCESS + + return $retval + ;; + $GEOM_CLASS_FD) + f_dprintf "Found floppy device named %s" "$devname" + debug= f_device_register device "$devname" "$desc" \ + "/dev/$devname" $DEVICE_TYPE_FLOPPY 1 \ + f_media_init_floppy f_media_get_floppy \ + f_media_shutdown_floppy "" "$capacity" + return $? + ;; + $GEOM_CLASS_LABEL) + : fall through to below section # reduces indentation level + ;; + $GEOM_CLASS_MD) + f_dprintf "Found disk device named %s" "$devname" + debug= f_device_register device "$devname" "$desc" \ + "/dev/$devname" $DEVICE_TYPE_DISK 1 \ + "" "" "" "" "$capacity" + retval=$? + + # + # Attempt to get file(1) magic to potentially classify as + # alternate media type. If unable to get magic, fall back to + # md(4) characteristics (such as vnode filename). + # + [ -r "/dev/$devname" ] && + magic=$( file -bs "/dev/$devname" 2> /dev/null ) + if [ ! "$magic" ]; then + # Fall back to md(4) characteristics + if f_struct "$p_provider_config"; then + config="$p_provider_config" + else + config="$provider_config" + fi + debug= f_struct "$config" get type config_type + debug= f_struct "$config" get file config_file + + # Substitute magic for below based on type and file + case "$config_type=$config_file" in + vnode=*.iso) magic="ISO 9660" ;; + esac + fi + f_device_probe_disk_fs device \ + "$devname" "$capacity" "$magic" && + retval=$SUCCESS # Errors ignored + + return $retval + ;; + $GEOM_CLASS_PART) + if f_struct "$p_provider_config"; then + config="$p_provider_config" + else + config="$provider_config" + fi + debug= f_struct "$config" get type provider_config_type + f_device_probe_geom_part device \ + "$provider_config_type" "$devname" "$capacity" + retval=$? + device_type=$DEVICE_TYPE_NONE + [ $retval -eq $SUCCESS ] && + debug= f_struct "$device" get type device_type + + # Potentially re-classify as USB device + if [ "$device_type" = "$DEVICE_TYPE_UFS" -a \ + "$catalog_type" = "$DEVICE_TYPE_USB" ] + then + f_dprintf "Found USB device for partition %s" \ + "$devname" + debug= f_struct "$p_provider_geom" get \ + name disk_name || + debug= f_struct "$provider_geom" get \ + name disk_name + debug= f_device_register device "$devname" "$desc" \ + "/dev/$devname" $DEVICE_TYPE_USB 1 \ + f_media_init_usb f_media_get_usb \ + f_media_shutdown_usb "$disk_name" "$capacity" + retval=$? + fi + + return $retval + ;; + $GEOM_CLASS_RAID) + # Use the provider geom name as the description + if [ ! "$desc" ]; then + f_struct "$p_provider_geom" get name desc || + f_struct "$provider_geom" get name desc + fi + + f_dprintf "Found disk device named %s" "$devname" + debug= f_device_register device \ + "$devname" "${desc:-GEOM RAID device}" \ + "/dev/$devname" $DEVICE_TYPE_DISK 1 \ + "" "" "" "" "$capacity" + retval=$? + + # Detect ``dangerously dedicated'' filesystems + f_device_probe_disk_fs device "$devname" "$capacity" && + retval=$SUCCESS # Errors ignored + + return $retval + ;; + $GEOM_CLASS_ZFS_ZVOL) + f_dprintf "Found disk device named %s" "$devname" + debug= f_device_register device \ + "$devname" "${desc:-GEOM ZFS::ZVOL device}" \ + "/dev/$devname" $DEVICE_TYPE_DISK 1 \ + "" "" "" "" "$capacity" + retval=$? + + # Detect ``dangerously dedicated'' filesystems + f_device_probe_disk_fs device "$devname" "$capacity" && + retval=$SUCCESS # Errors ignored + + return $retval + ;; + *) + return $FAILURE # Unknown GEOM class + esac + + # + # Still here? Must be $GEOM_CLASS_LABEL + # + + local label_geom label_devname label_devgeom= label_devconsumer + local label_devprovider= label_devprovider_ref label_devprovider_config + local label_gpart_type + + if f_struct "$p_provider"; then + label_geom="$p_provider_geom" + else + label_geom="$provider_geom" + fi + + case "$devname" in + gpt/*|gptid/*) + # + # Attempt to get the partition type by getting the `config' + # member of the provider for our device (which is named in the + # parent geom of our current provider). + # + debug= f_struct "$label_geom" get name label_devname && + debug= f_geom_find "$label_devname" $GEOM_CLASS_DEV \ + label_devgeom + debug= f_struct "$label_devgeom" get \ + consumer1 label_devconsumer + debug= f_struct "$label_devconsumer" get \ + provider_ref label_devprovider_ref && + debug= f_geom_find_by id "$label_devprovider_ref" \ + provider label_devprovider + debug= f_struct "$label_devprovider" get \ + config label_devprovider_config + debug= f_struct "$label_devprovider_config" get \ + type label_gpart_type + + # + # Register device label based on partition type + # + f_device_probe_geom_part device \ + "$label_gpart_type" "$devname" "$capacity" + return $? + ;; + iso9660/*) + f_dprintf "Found CDROM device labeled %s" "$devname" + debug= f_device_register device \ + "$devname" "ISO9660 file system" \ + "/dev/$devname" $DEVICE_TYPE_CDROM 1 \ + f_media_init_cdrom f_media_get_cdrom \ + f_media_shutdown_cdrom "" "$capacity" + return $? + ;; + label/*) + # For generic labels, use provider geom name as real device + debug= f_struct "$label_geom" get name label_devname + + # Look up label geom device in device catalog for default desc + debug= f_device_catalog_get \ + $DEVICE_TYPE_ANY "$label_devname" catalog_struct + [ "$desc" ] || debug= f_struct \ + "catalog_device_$catalog_struct" get desc desc + + # Use device catalog entry for potential re-classification(s) + debug= f_struct "catalog_device_$catalog_struct" get \ + type catalog_type + + # First attempt to classify by device catalog (see MAIN) + case "$catalog_type" in + $DEVICE_TYPE_CDROM) + f_dprintf "Found CDROM device for disk %s" "$devname" + debug= f_device_register device "$devname" "$desc" \ + "/dev/$devname" $DEVICE_TYPE_CDROM 1 \ + f_media_init_cdrom f_media_get_cdrom \ + f_media_shutdown_cdrom "" "$capacity" && + return $SUCCESS + ;; + esac + + # Fall back to register label device as a disk and taste it + f_dprintf "Found disk device labeled %s" "$devname" + debug= f_device_register device \ + "$devname" "GEOM LABEL device" \ + "/dev/$devname" $DEVICE_TYPE_DISK 1 \ + "" "" "" "" "$capacity" + retval=$? + + # Detect ``dangerously dedicated'' filesystems (errors ignored) + f_device_probe_disk_fs device "$devname" "$capacity" && + retval=$SUCCESS + + return $retval + ;; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat May 17 03:59:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 844F5576; Sat, 17 May 2014 03:59:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 656C3291C; Sat, 17 May 2014 03:59:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4H3x2Yk062975; Sat, 17 May 2014 03:59:02 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4H3x2Gk062974; Sat, 17 May 2014 03:59:02 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201405170359.s4H3x2Gk062974@svn.freebsd.org> From: Devin Teske Date: Sat, 17 May 2014 03:59:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266294 - stable/10/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 03:59:02 -0000 Author: dteske Date: Sat May 17 03:59:01 2014 New Revision: 266294 URL: http://svnweb.freebsd.org/changeset/base/266294 Log: MFC r264841: Update zfsboot to coincide with MFC of r264840 adding GEOM support. Modified: stable/10/usr.sbin/bsdinstall/scripts/zfsboot Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/zfsboot Sat May 17 03:54:51 2014 (r266293) +++ stable/10/usr.sbin/bsdinstall/scripts/zfsboot Sat May 17 03:59:01 2014 (r266294) @@ -189,6 +189,7 @@ ZFS_CREATE_WITH_OPTIONS='zfs create %s " ZFS_SET='zfs set "%s" "%s"' ZFS_UNMOUNT='zfs unmount "%s"' ZPOOL_CREATE_WITH_OPTIONS='zpool create %s "%s" %s %s' +ZPOOL_DESTROY='zpool destroy "%s"' ZPOOL_EXPORT='zpool export "%s"' ZPOOL_IMPORT_WITH_OPTIONS='zpool import %s "%s"' ZPOOL_LABELCLEAR_F='zpool labelclear -f "%s"' @@ -286,7 +287,8 @@ dialog_menu_main() local usegeli="$msg_no" [ "$ZFSBOOT_GNOP_4K_FORCE_ALIGN" ] && force4k="$msg_yes" [ "$ZFSBOOT_GELI_ENCRYPTION" ] && usegeli="$msg_yes" - local disks n=$( set -- $ZFSBOOT_DISKS; echo $# ) + local disks n + f_count n $ZFSBOOT_DISKS { [ $n -eq 1 ] && disks=disk; } || disks=disks # grammar local menu_list=" '>>> $msg_install' '$msg_install_desc' @@ -451,8 +453,29 @@ dialog_menu_layout() # Get a list of probed disk devices local disks= - f_device_find "" $DEVICE_TYPE_DISK disks - f_dprintf "$funcname: disks=[%s]" "$disks" + debug= f_device_find "" $DEVICE_TYPE_DISK disks + + # Prune out mounted md(4) devices that may be part of the boot process + local disk name new_list= + for disk in $disks; do + debug= $disk get name name + case "$name" in + md[0-9]*) f_mounted -b "/dev/$name" && continue ;; + esac + new_list="$new_list $disk" + done + disks="${new_list# }" + + # Debugging + if [ "$debug" ]; then + local disk_names= + for disk in $disks; do + debug= $disk get name name + disk_names="$disk_names $name" + done + f_dprintf "$funcname: disks=[%s]" "${disk_names# }" + fi + if [ ! "$disks" ]; then f_dprintf "No disk(s) present to configure" f_show_err "$msg_no_disks_present_to_configure" @@ -460,14 +483,15 @@ dialog_menu_layout() fi # Lets sort the disks array to be more user friendly - disks=$( echo "$disks" | tr ' ' '\n' | sort | tr '\n' ' ' ) + f_device_sort_by name disks disks # # Operate in a loop so we can (if interactive) repeat if not enough # disks are selected to satisfy the chosen vdev type or user wants to # back-up to the previous menu. # - local vardisk ndisks onoff selections vdev_choice + local vardisk ndisks onoff selections vdev_choice breakout device + local valid_disks all_valid want_disks desc height width rows while :; do # # Confirm the vdev type that was selected @@ -495,7 +519,7 @@ dialog_menu_layout() fi # Determine the number of disks needed for this vdev type - local want_disks=0 + want_disks=0 case "$ZFSBOOT_VDEV_TYPE" in stripe) want_disks=1 ;; mirror) want_disks=2 ;; @@ -504,11 +528,14 @@ dialog_menu_layout() raidz3) want_disks=5 ;; esac + # # Warn the user if any scripted disks are invalid - local disk valid_disks= - local all_valid=${ZFSBOOT_DISKS:+1} # optimism + # + valid_disks= all_valid=${ZFSBOOT_DISKS:+1} # optimism for disk in $ZFSBOOT_DISKS; do - if f_struct device_$disk; then + if debug= f_device_find -1 \ + $disk $DEVICE_TYPE_DISK device + then valid_disks="$valid_disks $disk" continue fi @@ -532,7 +559,7 @@ dialog_menu_layout() # Short-circuit if we're running non-interactively # if ! f_interactive || [ ! "$ZFSBOOT_CONFIRM_LAYOUT" ]; then - ndisks=$( set -- $ZFSBOOT_DISKS; echo $# ) + f_count ndisks $ZFSBOOT_DISKS [ $ndisks -ge $want_disks ] && break # to success # Not enough disks selected @@ -551,29 +578,35 @@ dialog_menu_layout() # Confirm the disks that were selected # Loop until the user cancels or selects enough disks # - local breakout= + breakout= while :; do # Loop over list of available disks, resetting state - for disk in $disks; do unset _${disk}_status; done + for disk in $disks; do + f_isset _${disk}_status && _${disk}_status= + done # Loop over list of selected disks and create temporary # locals to map statuses onto up-to-date list of disks for disk in $ZFSBOOT_DISKS; do - local _${disk}_status=on + debug= f_device_find -1 \ + $disk $DEVICE_TYPE_DISK disk + f_isset _${disk}_status || + local _${disk}_status + _${disk}_status=on done # Create the checklist menu of discovered disk devices disk_check_list= for disk in $disks; do - local desc= - device_$disk get desc desc + desc= + $disk get name name + $disk get desc desc f_shell_escape "$desc" desc f_getvar _${disk}_status:-off onoff disk_check_list="$disk_check_list - $disk '$desc' $onoff" + $name '$desc' $onoff" done - local height width rows eval f_dialog_checklist_size height width rows \ \"\$title\" \"\$btitle\" \"\$prompt\" \ \"\$hline\" $disk_check_list @@ -597,7 +630,7 @@ dialog_menu_layout() f_dprintf "$funcname: ZFSBOOT_DISKS=[%s]" \ "$ZFSBOOT_DISKS" - ndisks=$( set -- $ZFSBOOT_DISKS; echo $# ) + f_count ndisks $ZFSBOOT_DISKS [ $ndisks -ge $want_disks ] && breakout=break && break @@ -917,6 +950,16 @@ zfs_create_boot() "$ZFSBOOT_BOOT_POOL_SIZE" "$bootsize" # + # Destroy the pool in-case this is our second time 'round (case of + # failure and installer presented ``Retry'' option to come back). + # + # NB: If we don't destroy the pool, later gpart(8) destroy commands + # that try to clear existing partitions (see zfs_create_diskpart()) + # will fail with a `Device Busy' error, leading to `GEOM exists'. + # + f_eval_catch -d $funcname zpool "$ZPOOL_DESTROY" "$zroot_name" + + # # Prepare the disks and build pool device list(s) # f_dprintf "$funcname: Preparing disk partitions for ZFS pool..." @@ -973,8 +1016,9 @@ zfs_create_boot() $BSDINSTALL_CHROOT || return $FAILURE # Create mirror across the boot partition on all disks - [ $( set -- $boot_vdevs; echo $# ) -gt 1 ] && - bootpool_vdevtype=mirror + local nvdevs + f_count nvdevs $boot_vdevs + [ $nvdevs -gt 1 ] && bootpool_vdevtype=mirror bootpool_options="-o altroot=$BSDINSTALL_CHROOT" bootpool_options="$bootpool_options -m \"/$bootpool_name\" -f" @@ -1229,15 +1273,16 @@ zfs_create_boot() # dialog_menu_diskinfo() { - local disk + local device disk # # Break from loop when user cancels disk selection # while :; do - disk=$( msg_cancel="$msg_back" f_device_menu \ + device=$( msg_cancel="$msg_back" f_device_menu \ "$DIALOG_TITLE" "$msg_select_a_disk_device" "" \ $DEVICE_TYPE_DISK 2>&1 ) || break + $device get name disk # Show gpart(8) `show' and camcontrol(8) `inquiry' data f_show_msg "$msg_detailed_disk_info" \ @@ -1309,7 +1354,10 @@ while :; do [ "$ZFSBOOT_BOOT_POOL" ] && minsize=$(( $minsize + $bootsize )) for disk in $ZFSBOOT_DISKS; do - device_$disk get capacity disksize || continue + debug= f_device_find -1 \ + $disk $DEVICE_TYPE_DISK device + $device get capacity disksize || continue + [ ${disksize:-0} -ge 0 ] || disksize=0 disksize=$(( $disksize - $minsize )) [ $disksize -lt $minsize ] && teeny_disks="$teeny_disks $disk" From owner-svn-src-stable@FreeBSD.ORG Sat May 17 04:00:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AA6216A2; Sat, 17 May 2014 04:00:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8BCD32921; Sat, 17 May 2014 04:00:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4H40IPk063393; Sat, 17 May 2014 04:00:18 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4H40Ieq063392; Sat, 17 May 2014 04:00:18 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201405170400.s4H40Ieq063392@svn.freebsd.org> From: Devin Teske Date: Sat, 17 May 2014 04:00:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266295 - stable/9/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 04:00:18 -0000 Author: dteske Date: Sat May 17 04:00:18 2014 New Revision: 266295 URL: http://svnweb.freebsd.org/changeset/base/266295 Log: MFC r264841: Update zfsboot to coincide with MFC of r264840 adding GEOM support. Modified: stable/9/usr.sbin/bsdinstall/scripts/zfsboot Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/bsdinstall/ (props changed) stable/9/usr.sbin/bsdinstall/scripts/ (props changed) Modified: stable/9/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- stable/9/usr.sbin/bsdinstall/scripts/zfsboot Sat May 17 03:59:01 2014 (r266294) +++ stable/9/usr.sbin/bsdinstall/scripts/zfsboot Sat May 17 04:00:18 2014 (r266295) @@ -189,6 +189,7 @@ ZFS_CREATE_WITH_OPTIONS='zfs create %s " ZFS_SET='zfs set "%s" "%s"' ZFS_UNMOUNT='zfs unmount "%s"' ZPOOL_CREATE_WITH_OPTIONS='zpool create %s "%s" %s %s' +ZPOOL_DESTROY='zpool destroy "%s"' ZPOOL_EXPORT='zpool export "%s"' ZPOOL_IMPORT_WITH_OPTIONS='zpool import %s "%s"' ZPOOL_LABELCLEAR_F='zpool labelclear -f "%s"' @@ -286,7 +287,8 @@ dialog_menu_main() local usegeli="$msg_no" [ "$ZFSBOOT_GNOP_4K_FORCE_ALIGN" ] && force4k="$msg_yes" [ "$ZFSBOOT_GELI_ENCRYPTION" ] && usegeli="$msg_yes" - local disks n=$( set -- $ZFSBOOT_DISKS; echo $# ) + local disks n + f_count n $ZFSBOOT_DISKS { [ $n -eq 1 ] && disks=disk; } || disks=disks # grammar local menu_list=" '>>> $msg_install' '$msg_install_desc' @@ -451,8 +453,29 @@ dialog_menu_layout() # Get a list of probed disk devices local disks= - f_device_find "" $DEVICE_TYPE_DISK disks - f_dprintf "$funcname: disks=[%s]" "$disks" + debug= f_device_find "" $DEVICE_TYPE_DISK disks + + # Prune out mounted md(4) devices that may be part of the boot process + local disk name new_list= + for disk in $disks; do + debug= $disk get name name + case "$name" in + md[0-9]*) f_mounted -b "/dev/$name" && continue ;; + esac + new_list="$new_list $disk" + done + disks="${new_list# }" + + # Debugging + if [ "$debug" ]; then + local disk_names= + for disk in $disks; do + debug= $disk get name name + disk_names="$disk_names $name" + done + f_dprintf "$funcname: disks=[%s]" "${disk_names# }" + fi + if [ ! "$disks" ]; then f_dprintf "No disk(s) present to configure" f_show_err "$msg_no_disks_present_to_configure" @@ -460,14 +483,15 @@ dialog_menu_layout() fi # Lets sort the disks array to be more user friendly - disks=$( echo "$disks" | tr ' ' '\n' | sort | tr '\n' ' ' ) + f_device_sort_by name disks disks # # Operate in a loop so we can (if interactive) repeat if not enough # disks are selected to satisfy the chosen vdev type or user wants to # back-up to the previous menu. # - local vardisk ndisks onoff selections vdev_choice + local vardisk ndisks onoff selections vdev_choice breakout device + local valid_disks all_valid want_disks desc height width rows while :; do # # Confirm the vdev type that was selected @@ -495,7 +519,7 @@ dialog_menu_layout() fi # Determine the number of disks needed for this vdev type - local want_disks=0 + want_disks=0 case "$ZFSBOOT_VDEV_TYPE" in stripe) want_disks=1 ;; mirror) want_disks=2 ;; @@ -504,11 +528,14 @@ dialog_menu_layout() raidz3) want_disks=5 ;; esac + # # Warn the user if any scripted disks are invalid - local disk valid_disks= - local all_valid=${ZFSBOOT_DISKS:+1} # optimism + # + valid_disks= all_valid=${ZFSBOOT_DISKS:+1} # optimism for disk in $ZFSBOOT_DISKS; do - if f_struct device_$disk; then + if debug= f_device_find -1 \ + $disk $DEVICE_TYPE_DISK device + then valid_disks="$valid_disks $disk" continue fi @@ -532,7 +559,7 @@ dialog_menu_layout() # Short-circuit if we're running non-interactively # if ! f_interactive || [ ! "$ZFSBOOT_CONFIRM_LAYOUT" ]; then - ndisks=$( set -- $ZFSBOOT_DISKS; echo $# ) + f_count ndisks $ZFSBOOT_DISKS [ $ndisks -ge $want_disks ] && break # to success # Not enough disks selected @@ -551,29 +578,35 @@ dialog_menu_layout() # Confirm the disks that were selected # Loop until the user cancels or selects enough disks # - local breakout= + breakout= while :; do # Loop over list of available disks, resetting state - for disk in $disks; do unset _${disk}_status; done + for disk in $disks; do + f_isset _${disk}_status && _${disk}_status= + done # Loop over list of selected disks and create temporary # locals to map statuses onto up-to-date list of disks for disk in $ZFSBOOT_DISKS; do - local _${disk}_status=on + debug= f_device_find -1 \ + $disk $DEVICE_TYPE_DISK disk + f_isset _${disk}_status || + local _${disk}_status + _${disk}_status=on done # Create the checklist menu of discovered disk devices disk_check_list= for disk in $disks; do - local desc= - device_$disk get desc desc + desc= + $disk get name name + $disk get desc desc f_shell_escape "$desc" desc f_getvar _${disk}_status:-off onoff disk_check_list="$disk_check_list - $disk '$desc' $onoff" + $name '$desc' $onoff" done - local height width rows eval f_dialog_checklist_size height width rows \ \"\$title\" \"\$btitle\" \"\$prompt\" \ \"\$hline\" $disk_check_list @@ -597,7 +630,7 @@ dialog_menu_layout() f_dprintf "$funcname: ZFSBOOT_DISKS=[%s]" \ "$ZFSBOOT_DISKS" - ndisks=$( set -- $ZFSBOOT_DISKS; echo $# ) + f_count ndisks $ZFSBOOT_DISKS [ $ndisks -ge $want_disks ] && breakout=break && break @@ -917,6 +950,16 @@ zfs_create_boot() "$ZFSBOOT_BOOT_POOL_SIZE" "$bootsize" # + # Destroy the pool in-case this is our second time 'round (case of + # failure and installer presented ``Retry'' option to come back). + # + # NB: If we don't destroy the pool, later gpart(8) destroy commands + # that try to clear existing partitions (see zfs_create_diskpart()) + # will fail with a `Device Busy' error, leading to `GEOM exists'. + # + f_eval_catch -d $funcname zpool "$ZPOOL_DESTROY" "$zroot_name" + + # # Prepare the disks and build pool device list(s) # f_dprintf "$funcname: Preparing disk partitions for ZFS pool..." @@ -973,8 +1016,9 @@ zfs_create_boot() $BSDINSTALL_CHROOT || return $FAILURE # Create mirror across the boot partition on all disks - [ $( set -- $boot_vdevs; echo $# ) -gt 1 ] && - bootpool_vdevtype=mirror + local nvdevs + f_count nvdevs $boot_vdevs + [ $nvdevs -gt 1 ] && bootpool_vdevtype=mirror bootpool_options="-o altroot=$BSDINSTALL_CHROOT" bootpool_options="$bootpool_options -m \"/$bootpool_name\" -f" @@ -1229,15 +1273,16 @@ zfs_create_boot() # dialog_menu_diskinfo() { - local disk + local device disk # # Break from loop when user cancels disk selection # while :; do - disk=$( msg_cancel="$msg_back" f_device_menu \ + device=$( msg_cancel="$msg_back" f_device_menu \ "$DIALOG_TITLE" "$msg_select_a_disk_device" "" \ $DEVICE_TYPE_DISK 2>&1 ) || break + $device get name disk # Show gpart(8) `show' and camcontrol(8) `inquiry' data f_show_msg "$msg_detailed_disk_info" \ @@ -1309,7 +1354,10 @@ while :; do [ "$ZFSBOOT_BOOT_POOL" ] && minsize=$(( $minsize + $bootsize )) for disk in $ZFSBOOT_DISKS; do - device_$disk get capacity disksize || continue + debug= f_device_find -1 \ + $disk $DEVICE_TYPE_DISK device + $device get capacity disksize || continue + [ ${disksize:-0} -ge 0 ] || disksize=0 disksize=$(( $disksize - $minsize )) [ $disksize -lt $minsize ] && teeny_disks="$teeny_disks $disk" From owner-svn-src-stable@FreeBSD.ORG Sat May 17 11:24:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20C99549; Sat, 17 May 2014 11:24:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D99127B7; Sat, 17 May 2014 11:24:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HBOTdw034729; Sat, 17 May 2014 11:24:29 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HBOTR0034728; Sat, 17 May 2014 11:24:29 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201405171124.s4HBOTR0034728@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 17 May 2014 11:24:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266299 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 11:24:30 -0000 Author: kib Date: Sat May 17 11:24:29 2014 New Revision: 266299 URL: http://svnweb.freebsd.org/changeset/base/266299 Log: MFC r265824: Print the entry address in addition to the object. Modified: stable/10/sys/vm/vm_map.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_map.c ============================================================================== --- stable/10/sys/vm/vm_map.c Sat May 17 04:49:29 2014 (r266298) +++ stable/10/sys/vm/vm_map.c Sat May 17 11:24:29 2014 (r266299) @@ -1949,7 +1949,8 @@ vm_map_protect(vm_map_t map, vm_offset_t * charged clipped mapping of the same object later. */ KASSERT(obj->charge == 0, - ("vm_map_protect: object %p overcharged\n", obj)); + ("vm_map_protect: object %p overcharged (entry %p)", + obj, current)); if (!swap_reserve(ptoa(obj->size))) { VM_OBJECT_WUNLOCK(obj); vm_map_unlock(map); From owner-svn-src-stable@FreeBSD.ORG Sat May 17 11:26:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B05C7687; Sat, 17 May 2014 11:26:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D44927C5; Sat, 17 May 2014 11:26:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HBQsJ5035101; Sat, 17 May 2014 11:26:54 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HBQseH035100; Sat, 17 May 2014 11:26:54 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201405171126.s4HBQseH035100@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 17 May 2014 11:26:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266300 - stable/9/sys/vm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 11:26:54 -0000 Author: kib Date: Sat May 17 11:26:54 2014 New Revision: 266300 URL: http://svnweb.freebsd.org/changeset/base/266300 Log: MFC r265824: Print the entry address in addition to the object. Modified: stable/9/sys/vm/vm_map.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/vm_map.c ============================================================================== --- stable/9/sys/vm/vm_map.c Sat May 17 11:24:29 2014 (r266299) +++ stable/9/sys/vm/vm_map.c Sat May 17 11:26:54 2014 (r266300) @@ -1967,7 +1967,8 @@ vm_map_protect(vm_map_t map, vm_offset_t * charged clipped mapping of the same object later. */ KASSERT(obj->charge == 0, - ("vm_map_protect: object %p overcharged\n", obj)); + ("vm_map_protect: object %p overcharged (entry %p)", + obj, current)); if (!swap_reserve(ptoa(obj->size))) { VM_OBJECT_UNLOCK(obj); vm_map_unlock(map); From owner-svn-src-stable@FreeBSD.ORG Sat May 17 11:29:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EAE34910; Sat, 17 May 2014 11:29:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D815B27D8; Sat, 17 May 2014 11:29:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HBTWl1035575; Sat, 17 May 2014 11:29:32 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HBTWNL035574; Sat, 17 May 2014 11:29:32 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201405171129.s4HBTWNL035574@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 17 May 2014 11:29:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266302 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 11:29:33 -0000 Author: kib Date: Sat May 17 11:29:32 2014 New Revision: 266302 URL: http://svnweb.freebsd.org/changeset/base/266302 Log: MFC r265825: When printing the map with the ddb 'show procvm' command, do not dump page queues for the backing objects. Modified: stable/10/sys/vm/vm_map.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_map.c ============================================================================== --- stable/10/sys/vm/vm_map.c Sat May 17 11:27:36 2014 (r266301) +++ stable/10/sys/vm/vm_map.c Sat May 17 11:29:32 2014 (r266302) @@ -4154,7 +4154,7 @@ vm_map_print(vm_map_t map) db_indent += 2; vm_object_print((db_expr_t)(intptr_t) entry->object.vm_object, - 1, 0, (char *)0); + 0, 0, (char *)0); db_indent -= 2; } } From owner-svn-src-stable@FreeBSD.ORG Sat May 17 11:36:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3BE7E65; Sat, 17 May 2014 11:36:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84EB42888; Sat, 17 May 2014 11:36:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HBaVvt041490; Sat, 17 May 2014 11:36:31 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HBaVxZ041489; Sat, 17 May 2014 11:36:31 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201405171136.s4HBaVxZ041489@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 17 May 2014 11:36:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266304 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 11:36:31 -0000 Author: kib Date: Sat May 17 11:36:31 2014 New Revision: 266304 URL: http://svnweb.freebsd.org/changeset/base/266304 Log: MFC r265843: For the upgrade case in vm_fault_copy_entry(), when the entry does not need COW and is writeable, do not create a new backing object for the entry. MFC r265887: Fix locking. Modified: stable/10/sys/vm/vm_fault.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_fault.c ============================================================================== --- stable/10/sys/vm/vm_fault.c Sat May 17 11:29:44 2014 (r266303) +++ stable/10/sys/vm/vm_fault.c Sat May 17 11:36:31 2014 (r266304) @@ -1236,38 +1236,48 @@ vm_fault_copy_entry(vm_map_t dst_map, vm #endif /* lint */ upgrade = src_entry == dst_entry; + access = prot = dst_entry->protection; src_object = src_entry->object.vm_object; src_pindex = OFF_TO_IDX(src_entry->offset); - /* - * Create the top-level object for the destination entry. (Doesn't - * actually shadow anything - we copy the pages directly.) - */ - dst_object = vm_object_allocate(OBJT_DEFAULT, - OFF_TO_IDX(dst_entry->end - dst_entry->start)); + if (upgrade && (dst_entry->eflags & MAP_ENTRY_NEEDS_COPY) == 0) { + dst_object = src_object; + vm_object_reference(dst_object); + } else { + /* + * Create the top-level object for the destination entry. (Doesn't + * actually shadow anything - we copy the pages directly.) + */ + dst_object = vm_object_allocate(OBJT_DEFAULT, + OFF_TO_IDX(dst_entry->end - dst_entry->start)); #if VM_NRESERVLEVEL > 0 - dst_object->flags |= OBJ_COLORED; - dst_object->pg_color = atop(dst_entry->start); + dst_object->flags |= OBJ_COLORED; + dst_object->pg_color = atop(dst_entry->start); #endif + } VM_OBJECT_WLOCK(dst_object); KASSERT(upgrade || dst_entry->object.vm_object == NULL, ("vm_fault_copy_entry: vm_object not NULL")); - dst_entry->object.vm_object = dst_object; - dst_entry->offset = 0; - dst_object->charge = dst_entry->end - dst_entry->start; + if (src_object != dst_object) { + dst_entry->object.vm_object = dst_object; + dst_entry->offset = 0; + dst_object->charge = dst_entry->end - dst_entry->start; + } if (fork_charge != NULL) { KASSERT(dst_entry->cred == NULL, ("vm_fault_copy_entry: leaked swp charge")); dst_object->cred = curthread->td_ucred; crhold(dst_object->cred); *fork_charge += dst_object->charge; - } else { + } else if (dst_object->cred == NULL) { + KASSERT(dst_entry->cred != NULL, ("no cred for entry %p", + dst_entry)); dst_object->cred = dst_entry->cred; dst_entry->cred = NULL; } - access = prot = dst_entry->protection; + /* * If not an upgrade, then enter the mappings in the pmap as * read and/or execute accesses. Otherwise, enter them as @@ -1293,26 +1303,14 @@ vm_fault_copy_entry(vm_map_t dst_map, vm for (vaddr = dst_entry->start, dst_pindex = 0; vaddr < dst_entry->end; vaddr += PAGE_SIZE, dst_pindex++) { - - /* - * Allocate a page in the destination object. - */ - do { - dst_m = vm_page_alloc(dst_object, dst_pindex, - VM_ALLOC_NORMAL); - if (dst_m == NULL) { - VM_OBJECT_WUNLOCK(dst_object); - VM_WAIT; - VM_OBJECT_WLOCK(dst_object); - } - } while (dst_m == NULL); - +again: /* * Find the page in the source object, and copy it in. * Because the source is wired down, the page will be * in memory. */ - VM_OBJECT_RLOCK(src_object); + if (src_object != dst_object) + VM_OBJECT_RLOCK(src_object); object = src_object; pindex = src_pindex + dst_pindex; while ((src_m = vm_page_lookup(object, pindex)) == NULL && @@ -1332,14 +1330,40 @@ vm_fault_copy_entry(vm_map_t dst_map, vm VM_OBJECT_RLOCK(backing_object); pindex += OFF_TO_IDX(object->backing_object_offset); - VM_OBJECT_RUNLOCK(object); + if (object != dst_object) + VM_OBJECT_RUNLOCK(object); object = backing_object; } KASSERT(src_m != NULL, ("vm_fault_copy_entry: page missing")); - pmap_copy_page(src_m, dst_m); - VM_OBJECT_RUNLOCK(object); - dst_m->valid = VM_PAGE_BITS_ALL; - dst_m->dirty = VM_PAGE_BITS_ALL; + + if (object != dst_object) { + /* + * Allocate a page in the destination object. + */ + do { + dst_m = vm_page_alloc(dst_object, + (src_object == dst_object ? src_pindex : + 0) + dst_pindex, VM_ALLOC_NORMAL); + if (dst_m == NULL) { + VM_OBJECT_WUNLOCK(dst_object); + VM_OBJECT_RUNLOCK(object); + VM_WAIT; + VM_OBJECT_WLOCK(dst_object); + goto again; + } + } while (dst_m == NULL); + pmap_copy_page(src_m, dst_m); + VM_OBJECT_RUNLOCK(object); + dst_m->valid = VM_PAGE_BITS_ALL; + dst_m->dirty = VM_PAGE_BITS_ALL; + } else { + dst_m = src_m; + if (vm_page_sleep_if_busy(dst_m, "fltupg")) + goto again; + vm_page_xbusy(dst_m); + KASSERT(dst_m->valid == VM_PAGE_BITS_ALL, + ("invalid dst page %p", dst_m)); + } VM_OBJECT_WUNLOCK(dst_object); /* @@ -1355,13 +1379,17 @@ vm_fault_copy_entry(vm_map_t dst_map, vm VM_OBJECT_WLOCK(dst_object); if (upgrade) { - vm_page_lock(src_m); - vm_page_unwire(src_m, 0); - vm_page_unlock(src_m); - - vm_page_lock(dst_m); - vm_page_wire(dst_m); - vm_page_unlock(dst_m); + if (src_m != dst_m) { + vm_page_lock(src_m); + vm_page_unwire(src_m, 0); + vm_page_unlock(src_m); + vm_page_lock(dst_m); + vm_page_wire(dst_m); + vm_page_unlock(dst_m); + } else { + KASSERT(dst_m->wire_count > 0, + ("dst_m %p is not wired", dst_m)); + } } else { vm_page_lock(dst_m); vm_page_activate(dst_m); From owner-svn-src-stable@FreeBSD.ORG Sat May 17 11:38:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5DECEFA8; Sat, 17 May 2014 11:38:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B645289B; Sat, 17 May 2014 11:38:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HBcRBI041770; Sat, 17 May 2014 11:38:27 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HBcRRw041769; Sat, 17 May 2014 11:38:27 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201405171138.s4HBcRRw041769@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 17 May 2014 11:38:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266305 - stable/10/lib/libc/gen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 11:38:27 -0000 Author: kib Date: Sat May 17 11:38:26 2014 New Revision: 266305 URL: http://svnweb.freebsd.org/changeset/base/266305 Log: MFC r265845: Style. Modified: stable/10/lib/libc/gen/sem_new.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/sem_new.c ============================================================================== --- stable/10/lib/libc/gen/sem_new.c Sat May 17 11:36:31 2014 (r266304) +++ stable/10/lib/libc/gen/sem_new.c Sat May 17 11:38:26 2014 (r266305) @@ -294,13 +294,13 @@ _sem_unlink(const char *name) return -1; } name++; - strcpy(path, SEM_PREFIX); if (strlcat(path, name, sizeof(path)) >= sizeof(path)) { errno = ENAMETOOLONG; return (-1); } - return unlink(path); + + return (unlink(path)); } int From owner-svn-src-stable@FreeBSD.ORG Sat May 17 11:43:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F389D193; Sat, 17 May 2014 11:43:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5CC62922; Sat, 17 May 2014 11:43:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HBhEoU047033; Sat, 17 May 2014 11:43:14 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HBhEAN047032; Sat, 17 May 2014 11:43:14 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201405171143.s4HBhEAN047032@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 17 May 2014 11:43:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266306 - stable/10/lib/libc/gen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 11:43:15 -0000 Author: kib Date: Sat May 17 11:43:14 2014 New Revision: 266306 URL: http://svnweb.freebsd.org/changeset/base/266306 Log: MFC r265847: Fix sem_unlink(3) to properly invalidate the semaphores name cache. PR: standards/189353 Modified: stable/10/lib/libc/gen/sem_new.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/sem_new.c ============================================================================== --- stable/10/lib/libc/gen/sem_new.c Sat May 17 11:38:26 2014 (r266305) +++ stable/10/lib/libc/gen/sem_new.c Sat May 17 11:43:14 2014 (r266306) @@ -66,6 +66,8 @@ __weak_reference(_sem_wait, sem_wait); struct sem_nameinfo { int open_count; char *name; + dev_t dev; + ino_t ino; sem_t *sem; LIST_ENTRY(sem_nameinfo) next; }; @@ -151,37 +153,46 @@ _sem_open(const char *name, int flags, . return (SEM_FAILED); } name++; - + strcpy(path, SEM_PREFIX); + if (strlcat(path, name, sizeof(path)) >= sizeof(path)) { + errno = ENAMETOOLONG; + return (SEM_FAILED); + } if (flags & ~(O_CREAT|O_EXCL)) { errno = EINVAL; return (SEM_FAILED); } - + if ((flags & O_CREAT) != 0) { + va_start(ap, flags); + mode = va_arg(ap, int); + value = va_arg(ap, int); + va_end(ap); + } + fd = -1; _pthread_once(&once, sem_module_init); _pthread_mutex_lock(&sem_llock); LIST_FOREACH(ni, &sem_list, next) { - if (strcmp(name, ni->name) == 0) { - if ((flags & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL)) { - _pthread_mutex_unlock(&sem_llock); - errno = EEXIST; - return (SEM_FAILED); - } else { - ni->open_count++; - sem = ni->sem; - _pthread_mutex_unlock(&sem_llock); - return (sem); + if (ni->name != NULL && strcmp(name, ni->name) == 0) { + fd = _open(path, flags | O_RDWR | O_CLOEXEC | + O_EXLOCK, mode); + if (fd == -1 || _fstat(fd, &sb) == -1) + goto error; + if ((flags & (O_CREAT | O_EXCL)) == (O_CREAT | + O_EXCL) || ni->dev != sb.st_dev || + ni->ino != sb.st_ino) { + ni->name = NULL; + ni = NULL; + break; } + ni->open_count++; + sem = ni->sem; + _pthread_mutex_unlock(&sem_llock); + _close(fd); + return (sem); } } - if (flags & O_CREAT) { - va_start(ap, flags); - mode = va_arg(ap, int); - value = va_arg(ap, int); - va_end(ap); - } - len = sizeof(*ni) + strlen(name) + 1; ni = (struct sem_nameinfo *)malloc(len); if (ni == NULL) { @@ -192,17 +203,11 @@ _sem_open(const char *name, int flags, . ni->name = (char *)(ni+1); strcpy(ni->name, name); - strcpy(path, SEM_PREFIX); - if (strlcat(path, name, sizeof(path)) >= sizeof(path)) { - errno = ENAMETOOLONG; - goto error; + if (fd == -1) { + fd = _open(path, flags | O_RDWR | O_CLOEXEC | O_EXLOCK, mode); + if (fd == -1 || _fstat(fd, &sb) == -1) + goto error; } - - fd = _open(path, flags|O_RDWR|O_CLOEXEC|O_EXLOCK, mode); - if (fd == -1) - goto error; - if (_fstat(fd, &sb)) - goto error; if (sb.st_size < sizeof(sem_t)) { sem_t tmp; @@ -228,6 +233,8 @@ _sem_open(const char *name, int flags, . } ni->open_count = 1; ni->sem = sem; + ni->dev = sb.st_dev; + ni->ino = sb.st_ino; LIST_INSERT_HEAD(&sem_list, ni, next); _close(fd); _pthread_mutex_unlock(&sem_llock); From owner-svn-src-stable@FreeBSD.ORG Sat May 17 12:47:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 144FA70F; Sat, 17 May 2014 12:47:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F17AF2E1B; Sat, 17 May 2014 12:47:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HClBmP083777; Sat, 17 May 2014 12:47:11 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HClBIX083776; Sat, 17 May 2014 12:47:11 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201405171247.s4HClBIX083776@svn.freebsd.org> From: Dimitry Andric Date: Sat, 17 May 2014 12:47:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266309 - in stable: 10/lib/clang 9/lib/clang X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 12:47:12 -0000 Author: dim Date: Sat May 17 12:47:11 2014 New Revision: 266309 URL: http://svnweb.freebsd.org/changeset/base/266309 Log: MFC r266053: Use the new -d option that was added to tblgen between llvm/clang 3.3 and 3.4 to generate dependency files for the '.inc.h' files generated from .td files, and .sinclude those dependency files in clang.build.mk. This will make future incremental builds of lib/clang and usr.bin/clang work correctly, whenever any of the .td files get modified. Note that this will not fix any problems with incremental builds from *before* this revision, since there will not yet be any generated dependency files. A quick workaround is to run the following: find /usr/obj -type f -name '*.inc.h' | xargs rm and then a regular incremental buildworld (e.g. with -DNO_CLEAN). Modified: stable/10/lib/clang/clang.build.mk Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/lib/clang/clang.build.mk Directory Properties: stable/9/lib/clang/ (props changed) Modified: stable/10/lib/clang/clang.build.mk ============================================================================== --- stable/10/lib/clang/clang.build.mk Sat May 17 12:33:27 2014 (r266308) +++ stable/10/lib/clang/clang.build.mk Sat May 17 12:47:11 2014 (r266309) @@ -39,17 +39,9 @@ CXXFLAGS+= -fno-exceptions -fno-rtti TBLGEN?= tblgen CLANG_TBLGEN?= clang-tblgen -Intrinsics.inc.h: ${LLVM_SRCS}/include/llvm/IR/Intrinsics.td \ - ${LLVM_SRCS}/include/llvm/IR/IntrinsicsARM.td \ - ${LLVM_SRCS}/include/llvm/IR/IntrinsicsHexagon.td \ - ${LLVM_SRCS}/include/llvm/IR/IntrinsicsMips.td \ - ${LLVM_SRCS}/include/llvm/IR/IntrinsicsNVVM.td \ - ${LLVM_SRCS}/include/llvm/IR/IntrinsicsPowerPC.td \ - ${LLVM_SRCS}/include/llvm/IR/IntrinsicsR600.td \ - ${LLVM_SRCS}/include/llvm/IR/IntrinsicsX86.td \ - ${LLVM_SRCS}/include/llvm/IR/IntrinsicsXCore.td - ${TBLGEN} -I ${LLVM_SRCS}/include \ - -gen-intrinsic -o ${.TARGET} \ +Intrinsics.inc.h: ${LLVM_SRCS}/include/llvm/IR/Intrinsics.td + ${TBLGEN} -gen-intrinsic \ + -I ${LLVM_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${LLVM_SRCS}/include/llvm/IR/Intrinsics.td .for arch in \ ARM/ARM Mips/Mips PowerPC/PPC Sparc/Sparc X86/X86 @@ -68,144 +60,167 @@ Intrinsics.inc.h: ${LLVM_SRCS}/include/l RegisterInfo/-gen-register-info \ SubtargetInfo/-gen-subtarget ${arch:T}Gen${hdr:H:C/$/.inc.h/}: ${LLVM_SRCS}/lib/Target/${arch:H}/${arch:T}.td - ${TBLGEN} -I ${LLVM_SRCS}/include -I ${LLVM_SRCS}/lib/Target/${arch:H} \ - ${hdr:T:C/,/ /g} -o ${.TARGET} \ + ${TBLGEN} ${hdr:T:C/,/ /g} \ + -I ${LLVM_SRCS}/include -I ${LLVM_SRCS}/lib/Target/${arch:H} \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${LLVM_SRCS}/lib/Target/${arch:H}/${arch:T}.td . endfor .endfor Attrs.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-classes -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-classes \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrDump.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-dump -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-dump \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrIdentifierArg.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-identifier-arg-list -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-identifier-arg-list \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrImpl.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-impl -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-impl \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrLateParsed.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-late-parsed-list -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-late-parsed-list \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrList.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-list -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-list \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrParsedAttrImpl.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-parsed-attr-impl -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-parsed-attr-impl \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrParsedAttrKinds.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-parsed-attr-kinds -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-parsed-attr-kinds \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrParsedAttrList.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-parsed-attr-list -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-parsed-attr-list \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrPCHRead.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-pch-read -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-pch-read \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrPCHWrite.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-pch-write -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-pch-write \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrSpellings.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-spelling-list -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-spelling-list \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrSpellingListIndex.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-spelling-index -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-spelling-index \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrTemplateInstantiate.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-template-instantiate -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-template-instantiate \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrTypeArg.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-type-arg-list -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-type-arg-list \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} CommentCommandInfo.inc.h: ${CLANG_SRCS}/include/clang/AST/CommentCommands.td - ${CLANG_TBLGEN} \ - -gen-clang-comment-command-info -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-comment-command-info \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} CommentCommandList.inc.h: ${CLANG_SRCS}/include/clang/AST/CommentCommands.td - ${CLANG_TBLGEN} \ - -gen-clang-comment-command-list -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-comment-command-list \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} CommentHTMLNamedCharacterReferences.inc.h: \ ${CLANG_SRCS}/include/clang/AST/CommentHTMLNamedCharacterReferences.td - ${CLANG_TBLGEN} \ - -gen-clang-comment-html-named-character-references -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-comment-html-named-character-references \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} CommentHTMLTags.inc.h: ${CLANG_SRCS}/include/clang/AST/CommentHTMLTags.td - ${CLANG_TBLGEN} \ - -gen-clang-comment-html-tags -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-comment-html-tags \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} CommentHTMLTagsProperties.inc.h: \ ${CLANG_SRCS}/include/clang/AST/CommentHTMLTags.td - ${CLANG_TBLGEN} \ - -gen-clang-comment-html-tags-properties -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-comment-html-tags-properties \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} CommentNodes.inc.h: ${CLANG_SRCS}/include/clang/Basic/CommentNodes.td - ${CLANG_TBLGEN} \ - -gen-clang-comment-nodes -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-comment-nodes \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} DeclNodes.inc.h: ${CLANG_SRCS}/include/clang/Basic/DeclNodes.td - ${CLANG_TBLGEN} \ - -gen-clang-decl-nodes -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-decl-nodes \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} StmtNodes.inc.h: ${CLANG_SRCS}/include/clang/Basic/StmtNodes.td - ${CLANG_TBLGEN} \ - -gen-clang-stmt-nodes -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-stmt-nodes \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} arm_neon.h: ${CLANG_SRCS}/include/clang/Basic/arm_neon.td - ${CLANG_TBLGEN} \ - -gen-arm-neon -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-arm-neon \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} arm_neon.inc.h: ${CLANG_SRCS}/include/clang/Basic/arm_neon.td - ${CLANG_TBLGEN} \ - -gen-arm-neon-sema -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-arm-neon-sema \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} DiagnosticGroups.inc.h: ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include/clang/Basic \ - -gen-clang-diag-groups -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-diag-groups \ + -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/\.h$/.d/} \ + -o ${.TARGET} ${.ALLSRC} DiagnosticIndexName.inc.h: ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include/clang/Basic \ - -gen-clang-diags-index-name -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-diags-index-name \ + -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/\.h$/.d/} \ + -o ${.TARGET} ${.ALLSRC} .for hdr in AST Analysis Comment Common Driver Frontend Lex Parse Sema Serialization Diagnostic${hdr}Kinds.inc.h: ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include/clang/Basic \ - -gen-clang-diags-defs -clang-component=${hdr} -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-diags-defs -clang-component=${hdr} \ + -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/\.h$/.d/} \ + -o ${.TARGET} ${.ALLSRC} .endfor Options.inc.h: ${CLANG_SRCS}/include/clang/Driver/Options.td - ${TBLGEN} -I ${LLVM_SRCS}/include -I ${CLANG_SRCS}/include/clang/Driver \ - -gen-opt-parser-defs -o ${.TARGET} ${.ALLSRC} + ${TBLGEN} -gen-opt-parser-defs \ + -I ${LLVM_SRCS}/include -I ${CLANG_SRCS}/include/clang/Driver \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} CC1AsOptions.inc.h: ${CLANG_SRCS}/include/clang/Driver/CC1AsOptions.td - ${TBLGEN} -I ${LLVM_SRCS}/include -I ${CLANG_SRCS}/include/clang/Driver \ - -gen-opt-parser-defs -o ${.TARGET} ${.ALLSRC} + ${TBLGEN} -gen-opt-parser-defs \ + -I ${LLVM_SRCS}/include -I ${CLANG_SRCS}/include/clang/Driver \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} Checkers.inc.h: ${CLANG_SRCS}/lib/StaticAnalyzer/Checkers/Checkers.td \ ${CLANG_SRCS}/include/clang/StaticAnalyzer/Checkers/CheckerBase.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-sa-checkers -o ${.TARGET} \ + ${CLANG_TBLGEN} -gen-clang-sa-checkers \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/lib/StaticAnalyzer/Checkers/Checkers.td +.for dep in ${TGHDRS:C/$/.inc.d/} +. sinclude "${dep}" +.endfor + SRCS+= ${TGHDRS:C/$/.inc.h/} DPADD+= ${TGHDRS:C/$/.inc.h/} -CLEANFILES+= ${TGHDRS:C/$/.inc.h/} +CLEANFILES+= ${TGHDRS:C/$/.inc.h/} ${TGHDRS:C/$/.inc.d/} From owner-svn-src-stable@FreeBSD.ORG Sat May 17 12:47:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B367C70E; Sat, 17 May 2014 12:47:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E8E72E1A; Sat, 17 May 2014 12:47:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HClBFw083767; Sat, 17 May 2014 12:47:11 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HClBCa083766; Sat, 17 May 2014 12:47:11 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201405171247.s4HClBCa083766@svn.freebsd.org> From: Dimitry Andric Date: Sat, 17 May 2014 12:47:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266309 - in stable: 10/lib/clang 9/lib/clang X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 12:47:11 -0000 Author: dim Date: Sat May 17 12:47:11 2014 New Revision: 266309 URL: http://svnweb.freebsd.org/changeset/base/266309 Log: MFC r266053: Use the new -d option that was added to tblgen between llvm/clang 3.3 and 3.4 to generate dependency files for the '.inc.h' files generated from .td files, and .sinclude those dependency files in clang.build.mk. This will make future incremental builds of lib/clang and usr.bin/clang work correctly, whenever any of the .td files get modified. Note that this will not fix any problems with incremental builds from *before* this revision, since there will not yet be any generated dependency files. A quick workaround is to run the following: find /usr/obj -type f -name '*.inc.h' | xargs rm and then a regular incremental buildworld (e.g. with -DNO_CLEAN). Modified: stable/9/lib/clang/clang.build.mk Directory Properties: stable/9/lib/clang/ (props changed) Changes in other areas also in this revision: Modified: stable/10/lib/clang/clang.build.mk Directory Properties: stable/10/ (props changed) Modified: stable/9/lib/clang/clang.build.mk ============================================================================== --- stable/9/lib/clang/clang.build.mk Sat May 17 12:33:27 2014 (r266308) +++ stable/9/lib/clang/clang.build.mk Sat May 17 12:47:11 2014 (r266309) @@ -39,17 +39,9 @@ CXXFLAGS+= -fno-exceptions -fno-rtti TBLGEN?= tblgen CLANG_TBLGEN?= clang-tblgen -Intrinsics.inc.h: ${LLVM_SRCS}/include/llvm/IR/Intrinsics.td \ - ${LLVM_SRCS}/include/llvm/IR/IntrinsicsARM.td \ - ${LLVM_SRCS}/include/llvm/IR/IntrinsicsHexagon.td \ - ${LLVM_SRCS}/include/llvm/IR/IntrinsicsMips.td \ - ${LLVM_SRCS}/include/llvm/IR/IntrinsicsNVVM.td \ - ${LLVM_SRCS}/include/llvm/IR/IntrinsicsPowerPC.td \ - ${LLVM_SRCS}/include/llvm/IR/IntrinsicsR600.td \ - ${LLVM_SRCS}/include/llvm/IR/IntrinsicsX86.td \ - ${LLVM_SRCS}/include/llvm/IR/IntrinsicsXCore.td - ${TBLGEN} -I ${LLVM_SRCS}/include \ - -gen-intrinsic -o ${.TARGET} \ +Intrinsics.inc.h: ${LLVM_SRCS}/include/llvm/IR/Intrinsics.td + ${TBLGEN} -gen-intrinsic \ + -I ${LLVM_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${LLVM_SRCS}/include/llvm/IR/Intrinsics.td .for arch in \ ARM/ARM Mips/Mips PowerPC/PPC Sparc/Sparc X86/X86 @@ -68,144 +60,167 @@ Intrinsics.inc.h: ${LLVM_SRCS}/include/l RegisterInfo/-gen-register-info \ SubtargetInfo/-gen-subtarget ${arch:T}Gen${hdr:H:C/$/.inc.h/}: ${LLVM_SRCS}/lib/Target/${arch:H}/${arch:T}.td - ${TBLGEN} -I ${LLVM_SRCS}/include -I ${LLVM_SRCS}/lib/Target/${arch:H} \ - ${hdr:T:C/,/ /g} -o ${.TARGET} \ + ${TBLGEN} ${hdr:T:C/,/ /g} \ + -I ${LLVM_SRCS}/include -I ${LLVM_SRCS}/lib/Target/${arch:H} \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${LLVM_SRCS}/lib/Target/${arch:H}/${arch:T}.td . endfor .endfor Attrs.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-classes -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-classes \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrDump.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-dump -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-dump \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrIdentifierArg.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-identifier-arg-list -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-identifier-arg-list \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrImpl.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-impl -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-impl \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrLateParsed.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-late-parsed-list -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-late-parsed-list \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrList.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-list -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-list \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrParsedAttrImpl.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-parsed-attr-impl -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-parsed-attr-impl \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrParsedAttrKinds.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-parsed-attr-kinds -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-parsed-attr-kinds \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrParsedAttrList.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-parsed-attr-list -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-parsed-attr-list \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrPCHRead.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-pch-read -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-pch-read \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrPCHWrite.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-pch-write -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-pch-write \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrSpellings.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-spelling-list -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-spelling-list \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrSpellingListIndex.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-spelling-index -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-spelling-index \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrTemplateInstantiate.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-template-instantiate -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-template-instantiate \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrTypeArg.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-type-arg-list -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-type-arg-list \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} CommentCommandInfo.inc.h: ${CLANG_SRCS}/include/clang/AST/CommentCommands.td - ${CLANG_TBLGEN} \ - -gen-clang-comment-command-info -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-comment-command-info \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} CommentCommandList.inc.h: ${CLANG_SRCS}/include/clang/AST/CommentCommands.td - ${CLANG_TBLGEN} \ - -gen-clang-comment-command-list -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-comment-command-list \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} CommentHTMLNamedCharacterReferences.inc.h: \ ${CLANG_SRCS}/include/clang/AST/CommentHTMLNamedCharacterReferences.td - ${CLANG_TBLGEN} \ - -gen-clang-comment-html-named-character-references -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-comment-html-named-character-references \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} CommentHTMLTags.inc.h: ${CLANG_SRCS}/include/clang/AST/CommentHTMLTags.td - ${CLANG_TBLGEN} \ - -gen-clang-comment-html-tags -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-comment-html-tags \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} CommentHTMLTagsProperties.inc.h: \ ${CLANG_SRCS}/include/clang/AST/CommentHTMLTags.td - ${CLANG_TBLGEN} \ - -gen-clang-comment-html-tags-properties -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-comment-html-tags-properties \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} CommentNodes.inc.h: ${CLANG_SRCS}/include/clang/Basic/CommentNodes.td - ${CLANG_TBLGEN} \ - -gen-clang-comment-nodes -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-comment-nodes \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} DeclNodes.inc.h: ${CLANG_SRCS}/include/clang/Basic/DeclNodes.td - ${CLANG_TBLGEN} \ - -gen-clang-decl-nodes -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-decl-nodes \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} StmtNodes.inc.h: ${CLANG_SRCS}/include/clang/Basic/StmtNodes.td - ${CLANG_TBLGEN} \ - -gen-clang-stmt-nodes -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-stmt-nodes \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} arm_neon.h: ${CLANG_SRCS}/include/clang/Basic/arm_neon.td - ${CLANG_TBLGEN} \ - -gen-arm-neon -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-arm-neon \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} arm_neon.inc.h: ${CLANG_SRCS}/include/clang/Basic/arm_neon.td - ${CLANG_TBLGEN} \ - -gen-arm-neon-sema -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-arm-neon-sema \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} DiagnosticGroups.inc.h: ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include/clang/Basic \ - -gen-clang-diag-groups -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-diag-groups \ + -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/\.h$/.d/} \ + -o ${.TARGET} ${.ALLSRC} DiagnosticIndexName.inc.h: ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include/clang/Basic \ - -gen-clang-diags-index-name -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-diags-index-name \ + -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/\.h$/.d/} \ + -o ${.TARGET} ${.ALLSRC} .for hdr in AST Analysis Comment Common Driver Frontend Lex Parse Sema Serialization Diagnostic${hdr}Kinds.inc.h: ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include/clang/Basic \ - -gen-clang-diags-defs -clang-component=${hdr} -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-diags-defs -clang-component=${hdr} \ + -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/\.h$/.d/} \ + -o ${.TARGET} ${.ALLSRC} .endfor Options.inc.h: ${CLANG_SRCS}/include/clang/Driver/Options.td - ${TBLGEN} -I ${LLVM_SRCS}/include -I ${CLANG_SRCS}/include/clang/Driver \ - -gen-opt-parser-defs -o ${.TARGET} ${.ALLSRC} + ${TBLGEN} -gen-opt-parser-defs \ + -I ${LLVM_SRCS}/include -I ${CLANG_SRCS}/include/clang/Driver \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} CC1AsOptions.inc.h: ${CLANG_SRCS}/include/clang/Driver/CC1AsOptions.td - ${TBLGEN} -I ${LLVM_SRCS}/include -I ${CLANG_SRCS}/include/clang/Driver \ - -gen-opt-parser-defs -o ${.TARGET} ${.ALLSRC} + ${TBLGEN} -gen-opt-parser-defs \ + -I ${LLVM_SRCS}/include -I ${CLANG_SRCS}/include/clang/Driver \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} Checkers.inc.h: ${CLANG_SRCS}/lib/StaticAnalyzer/Checkers/Checkers.td \ ${CLANG_SRCS}/include/clang/StaticAnalyzer/Checkers/CheckerBase.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-sa-checkers -o ${.TARGET} \ + ${CLANG_TBLGEN} -gen-clang-sa-checkers \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/lib/StaticAnalyzer/Checkers/Checkers.td +.for dep in ${TGHDRS:C/$/.inc.d/} +. sinclude "${dep}" +.endfor + SRCS+= ${TGHDRS:C/$/.inc.h/} DPADD+= ${TGHDRS:C/$/.inc.h/} -CLEANFILES+= ${TGHDRS:C/$/.inc.h/} +CLEANFILES+= ${TGHDRS:C/$/.inc.h/} ${TGHDRS:C/$/.inc.d/} From owner-svn-src-stable@FreeBSD.ORG Sat May 17 13:53:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 80636957; Sat, 17 May 2014 13:53:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6572D23BA; Sat, 17 May 2014 13:53:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HDrdJP026100; Sat, 17 May 2014 13:53:39 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HDrcOX026096; Sat, 17 May 2014 13:53:38 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405171353.s4HDrcOX026096@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 13:53:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266311 - in stable/10/sys: arm/allwinner arm/allwinner/a20 arm/arm arm/at91 arm/broadcom/bcm2835 arm/conf arm/econa arm/freescale/imx arm/freescale/vybrid arm/include arm/lpc arm/mv ar... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 13:53:39 -0000 Author: ian Date: Sat May 17 13:53:38 2014 New Revision: 266311 URL: http://svnweb.freebsd.org/changeset/base/266311 Log: MFC 262952, 262958, 262966, 262979, 262980, 262986, 262987, 262995, 262997, 263030, 263033, 263034, 263056, 263057, Remove all the redundant external declarations of exception vectors and runtime setting of the pointers that's scattered around various places. Remove all traces of support for ARM chips prior to the arm9 series. Make the default exception handler vectors point to where I thought they were already pointing: the default handlers (not a panic that says there is no default handler). Eliminate irq_dispatch.S. Move the data items it contained into arm/intr.c and the functionality it provided into arm/exception.S. Move the exception vector table (so-called "page0" data) into exception.S and eliminate vectors.S. Change the way the asm GET_CURTHREAD_PTR() macro is defined so that code using it doesn't have to have an "AST_LOCALS" macro somewhere in the file. Arrange for arm fork_trampoline() to return to userland via the standard swi_exit code in exception.S instead of having its own inline expansion of the DO_AST and PULLFRAME macros. Now that the PUSHFRAME and PULLFRAME macros are used only in the swi entry/exit code, they don't need to be macros. Except that didn't work and the whole change was reverted. Remove some unnecessary indirection and jump right to the handler functions. Use panic rather than printf to "handle" an arm26 address exception (should never happen on arm32). Remove the unreferenced DATA() macro. Remove #include from files that don't need it. Deleted: stable/10/sys/arm/arm/cpufunc_asm_arm7tdmi.S stable/10/sys/arm/arm/cpufunc_asm_arm8.S stable/10/sys/arm/arm/cpufunc_asm_ixp12x0.S stable/10/sys/arm/arm/cpufunc_asm_sa1.S stable/10/sys/arm/arm/cpufunc_asm_sa11x0.S stable/10/sys/arm/arm/irq_dispatch.S stable/10/sys/arm/arm/vectors.S stable/10/sys/arm/conf/SIMICS stable/10/sys/arm/sa11x0/ Modified: stable/10/sys/arm/allwinner/a20/files.a20 stable/10/sys/arm/allwinner/files.a10 stable/10/sys/arm/arm/copystr.S stable/10/sys/arm/arm/cpufunc.c stable/10/sys/arm/arm/elf_trampoline.c stable/10/sys/arm/arm/exception.S stable/10/sys/arm/arm/fiq.c stable/10/sys/arm/arm/fiq_subr.S stable/10/sys/arm/arm/fusu.S stable/10/sys/arm/arm/identcpu.c stable/10/sys/arm/arm/intr.c stable/10/sys/arm/arm/machdep.c stable/10/sys/arm/arm/pmap.c stable/10/sys/arm/arm/support.S stable/10/sys/arm/arm/swtch.S stable/10/sys/arm/arm/trap.c stable/10/sys/arm/at91/at91_machdep.c stable/10/sys/arm/at91/files.at91 stable/10/sys/arm/broadcom/bcm2835/files.bcm2835 stable/10/sys/arm/conf/NOTES stable/10/sys/arm/econa/econa_machdep.c stable/10/sys/arm/econa/files.econa stable/10/sys/arm/freescale/imx/files.imx51 stable/10/sys/arm/freescale/imx/files.imx53 stable/10/sys/arm/freescale/imx/files.imx6 stable/10/sys/arm/freescale/vybrid/files.vybrid stable/10/sys/arm/include/armreg.h stable/10/sys/arm/include/asmacros.h stable/10/sys/arm/include/cpuconf.h stable/10/sys/arm/include/cpufunc.h stable/10/sys/arm/include/md_var.h stable/10/sys/arm/include/param.h stable/10/sys/arm/include/pmap.h stable/10/sys/arm/include/sysarch.h stable/10/sys/arm/lpc/files.lpc stable/10/sys/arm/mv/files.mv stable/10/sys/arm/rockchip/files.rk30xx stable/10/sys/arm/s3c2xx0/files.s3c2xx0 stable/10/sys/arm/s3c2xx0/s3c24x0_machdep.c stable/10/sys/arm/samsung/exynos/files.exynos5 stable/10/sys/arm/tegra/files.tegra2 stable/10/sys/arm/ti/files.ti stable/10/sys/arm/versatile/files.versatile stable/10/sys/arm/xilinx/files.zynq7 stable/10/sys/arm/xscale/i80321/ep80219_machdep.c stable/10/sys/arm/xscale/i80321/files.i80219 stable/10/sys/arm/xscale/i80321/files.i80321 stable/10/sys/arm/xscale/i80321/iq31244_machdep.c stable/10/sys/arm/xscale/i8134x/crb_machdep.c stable/10/sys/arm/xscale/i8134x/files.i81342 stable/10/sys/arm/xscale/ixp425/avila_machdep.c stable/10/sys/arm/xscale/ixp425/files.ixp425 stable/10/sys/arm/xscale/pxa/files.pxa stable/10/sys/arm/xscale/pxa/pxa_machdep.c stable/10/sys/arm/xscale/pxa/pxareg.h stable/10/sys/conf/Makefile.arm stable/10/sys/conf/files.arm stable/10/sys/conf/options.arm Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/allwinner/a20/files.a20 ============================================================================== --- stable/10/sys/arm/allwinner/a20/files.a20 Sat May 17 13:45:03 2014 (r266310) +++ stable/10/sys/arm/allwinner/a20/files.a20 Sat May 17 13:53:38 2014 (r266311) @@ -7,7 +7,6 @@ arm/arm/cpufunc_asm_armv5.S standard arm/arm/cpufunc_asm_arm10.S standard arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard -arm/arm/irq_dispatch.S standard arm/arm/gic.c standard arm/allwinner/a20/a20_cpu_cfg.c standard Modified: stable/10/sys/arm/allwinner/files.a10 ============================================================================== --- stable/10/sys/arm/allwinner/files.a10 Sat May 17 13:45:03 2014 (r266310) +++ stable/10/sys/arm/allwinner/files.a10 Sat May 17 13:53:38 2014 (r266311) @@ -7,7 +7,6 @@ arm/arm/cpufunc_asm_armv5.S standard arm/arm/cpufunc_asm_arm10.S standard arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard -arm/arm/irq_dispatch.S standard arm/allwinner/a10_clk.c standard arm/allwinner/a10_common.c standard Modified: stable/10/sys/arm/arm/copystr.S ============================================================================== --- stable/10/sys/arm/arm/copystr.S Sat May 17 13:45:03 2014 (r266310) +++ stable/10/sys/arm/arm/copystr.S Sat May 17 13:53:38 2014 (r266311) @@ -42,7 +42,6 @@ #include "assym.s" #include #include -#include __FBSDID("$FreeBSD$"); #include Modified: stable/10/sys/arm/arm/cpufunc.c ============================================================================== --- stable/10/sys/arm/arm/cpufunc.c Sat May 17 13:45:03 2014 (r266310) +++ stable/10/sys/arm/arm/cpufunc.c Sat May 17 13:53:38 2014 (r266311) @@ -1,9 +1,6 @@ /* $NetBSD: cpufunc.c,v 1.65 2003/11/05 12:53:15 scw Exp $ */ /*- - * arm7tdmi support code Copyright (c) 2001 John Fremlin - * arm8 support code Copyright (c) 1997 ARM Limited - * arm8 support code Copyright (c) 1997 Causality Limited * arm9 support code Copyright (C) 2001 ARM Ltd * Copyright (c) 1997 Mark Brinicombe. * Copyright (c) 1997 Causality Limited @@ -112,131 +109,6 @@ u_int arm_cache_loc; int cpu_do_powersave; int ctrl; -#ifdef CPU_ARM7TDMI -struct cpu_functions arm7tdmi_cpufuncs = { - /* CPU functions */ - - cpufunc_id, /* id */ - cpufunc_nullop, /* cpwait */ - - /* MMU functions */ - - cpufunc_control, /* control */ - cpufunc_domains, /* domain */ - arm7tdmi_setttb, /* setttb */ - cpufunc_faultstatus, /* faultstatus */ - cpufunc_faultaddress, /* faultaddress */ - - /* TLB functions */ - - arm7tdmi_tlb_flushID, /* tlb_flushID */ - arm7tdmi_tlb_flushID_SE, /* tlb_flushID_SE */ - arm7tdmi_tlb_flushID, /* tlb_flushI */ - arm7tdmi_tlb_flushID_SE, /* tlb_flushI_SE */ - arm7tdmi_tlb_flushID, /* tlb_flushD */ - arm7tdmi_tlb_flushID_SE, /* tlb_flushD_SE */ - - /* Cache operations */ - - cpufunc_nullop, /* icache_sync_all */ - (void *)cpufunc_nullop, /* icache_sync_range */ - - arm7tdmi_cache_flushID, /* dcache_wbinv_all */ - (void *)arm7tdmi_cache_flushID, /* dcache_wbinv_range */ - (void *)arm7tdmi_cache_flushID, /* dcache_inv_range */ - (void *)cpufunc_nullop, /* dcache_wb_range */ - - cpufunc_nullop, /* idcache_inv_all */ - arm7tdmi_cache_flushID, /* idcache_wbinv_all */ - (void *)arm7tdmi_cache_flushID, /* idcache_wbinv_range */ - cpufunc_nullop, /* l2cache_wbinv_all */ - (void *)cpufunc_nullop, /* l2cache_wbinv_range */ - (void *)cpufunc_nullop, /* l2cache_inv_range */ - (void *)cpufunc_nullop, /* l2cache_wb_range */ - - /* Other functions */ - - cpufunc_nullop, /* flush_prefetchbuf */ - cpufunc_nullop, /* drain_writebuf */ - cpufunc_nullop, /* flush_brnchtgt_C */ - (void *)cpufunc_nullop, /* flush_brnchtgt_E */ - - (void *)cpufunc_nullop, /* sleep */ - - /* Soft functions */ - - late_abort_fixup, /* dataabt_fixup */ - cpufunc_null_fixup, /* prefetchabt_fixup */ - - arm7tdmi_context_switch, /* context_switch */ - - arm7tdmi_setup /* cpu setup */ - -}; -#endif /* CPU_ARM7TDMI */ - -#ifdef CPU_ARM8 -struct cpu_functions arm8_cpufuncs = { - /* CPU functions */ - - cpufunc_id, /* id */ - cpufunc_nullop, /* cpwait */ - - /* MMU functions */ - - cpufunc_control, /* control */ - cpufunc_domains, /* domain */ - arm8_setttb, /* setttb */ - cpufunc_faultstatus, /* faultstatus */ - cpufunc_faultaddress, /* faultaddress */ - - /* TLB functions */ - - arm8_tlb_flushID, /* tlb_flushID */ - arm8_tlb_flushID_SE, /* tlb_flushID_SE */ - arm8_tlb_flushID, /* tlb_flushI */ - arm8_tlb_flushID_SE, /* tlb_flushI_SE */ - arm8_tlb_flushID, /* tlb_flushD */ - arm8_tlb_flushID_SE, /* tlb_flushD_SE */ - - /* Cache operations */ - - cpufunc_nullop, /* icache_sync_all */ - (void *)cpufunc_nullop, /* icache_sync_range */ - - arm8_cache_purgeID, /* dcache_wbinv_all */ - (void *)arm8_cache_purgeID, /* dcache_wbinv_range */ -/*XXX*/ (void *)arm8_cache_purgeID, /* dcache_inv_range */ - (void *)arm8_cache_cleanID, /* dcache_wb_range */ - - cpufunc_nullop, /* idcache_inv_all */ - arm8_cache_purgeID, /* idcache_wbinv_all */ - (void *)arm8_cache_purgeID, /* idcache_wbinv_range */ - cpufunc_nullop, /* l2cache_wbinv_all */ - (void *)cpufunc_nullop, /* l2cache_wbinv_range */ - (void *)cpufunc_nullop, /* l2cache_inv_range */ - (void *)cpufunc_nullop, /* l2cache_wb_range */ - - /* Other functions */ - - cpufunc_nullop, /* flush_prefetchbuf */ - cpufunc_nullop, /* drain_writebuf */ - cpufunc_nullop, /* flush_brnchtgt_C */ - (void *)cpufunc_nullop, /* flush_brnchtgt_E */ - - (void *)cpufunc_nullop, /* sleep */ - - /* Soft functions */ - - cpufunc_null_fixup, /* dataabt_fixup */ - cpufunc_null_fixup, /* prefetchabt_fixup */ - - arm8_context_switch, /* context_switch */ - - arm8_setup /* cpu setup */ -}; -#endif /* CPU_ARM8 */ - #ifdef CPU_ARM9 struct cpu_functions arm9_cpufuncs = { /* CPU functions */ @@ -550,192 +422,6 @@ struct cpu_functions pj4bv7_cpufuncs = { }; #endif /* CPU_MV_PJ4B */ -#ifdef CPU_SA110 -struct cpu_functions sa110_cpufuncs = { - /* CPU functions */ - - cpufunc_id, /* id */ - cpufunc_nullop, /* cpwait */ - - /* MMU functions */ - - cpufunc_control, /* control */ - cpufunc_domains, /* domain */ - sa1_setttb, /* setttb */ - cpufunc_faultstatus, /* faultstatus */ - cpufunc_faultaddress, /* faultaddress */ - - /* TLB functions */ - - armv4_tlb_flushID, /* tlb_flushID */ - sa1_tlb_flushID_SE, /* tlb_flushID_SE */ - armv4_tlb_flushI, /* tlb_flushI */ - (void *)armv4_tlb_flushI, /* tlb_flushI_SE */ - armv4_tlb_flushD, /* tlb_flushD */ - armv4_tlb_flushD_SE, /* tlb_flushD_SE */ - - /* Cache operations */ - - sa1_cache_syncI, /* icache_sync_all */ - sa1_cache_syncI_rng, /* icache_sync_range */ - - sa1_cache_purgeD, /* dcache_wbinv_all */ - sa1_cache_purgeD_rng, /* dcache_wbinv_range */ -/*XXX*/ sa1_cache_purgeD_rng, /* dcache_inv_range */ - sa1_cache_cleanD_rng, /* dcache_wb_range */ - - sa1_cache_flushID, /* idcache_inv_all */ - sa1_cache_purgeID, /* idcache_wbinv_all */ - sa1_cache_purgeID_rng, /* idcache_wbinv_range */ - cpufunc_nullop, /* l2cache_wbinv_all */ - (void *)cpufunc_nullop, /* l2cache_wbinv_range */ - (void *)cpufunc_nullop, /* l2cache_inv_range */ - (void *)cpufunc_nullop, /* l2cache_wb_range */ - - /* Other functions */ - - cpufunc_nullop, /* flush_prefetchbuf */ - armv4_drain_writebuf, /* drain_writebuf */ - cpufunc_nullop, /* flush_brnchtgt_C */ - (void *)cpufunc_nullop, /* flush_brnchtgt_E */ - - (void *)cpufunc_nullop, /* sleep */ - - /* Soft functions */ - - cpufunc_null_fixup, /* dataabt_fixup */ - cpufunc_null_fixup, /* prefetchabt_fixup */ - - sa110_context_switch, /* context_switch */ - - sa110_setup /* cpu setup */ -}; -#endif /* CPU_SA110 */ - -#if defined(CPU_SA1100) || defined(CPU_SA1110) -struct cpu_functions sa11x0_cpufuncs = { - /* CPU functions */ - - cpufunc_id, /* id */ - cpufunc_nullop, /* cpwait */ - - /* MMU functions */ - - cpufunc_control, /* control */ - cpufunc_domains, /* domain */ - sa1_setttb, /* setttb */ - cpufunc_faultstatus, /* faultstatus */ - cpufunc_faultaddress, /* faultaddress */ - - /* TLB functions */ - - armv4_tlb_flushID, /* tlb_flushID */ - sa1_tlb_flushID_SE, /* tlb_flushID_SE */ - armv4_tlb_flushI, /* tlb_flushI */ - (void *)armv4_tlb_flushI, /* tlb_flushI_SE */ - armv4_tlb_flushD, /* tlb_flushD */ - armv4_tlb_flushD_SE, /* tlb_flushD_SE */ - - /* Cache operations */ - - sa1_cache_syncI, /* icache_sync_all */ - sa1_cache_syncI_rng, /* icache_sync_range */ - - sa1_cache_purgeD, /* dcache_wbinv_all */ - sa1_cache_purgeD_rng, /* dcache_wbinv_range */ -/*XXX*/ sa1_cache_purgeD_rng, /* dcache_inv_range */ - sa1_cache_cleanD_rng, /* dcache_wb_range */ - - sa1_cache_flushID, /* idcache_inv_all */ - sa1_cache_purgeID, /* idcache_wbinv_all */ - sa1_cache_purgeID_rng, /* idcache_wbinv_range */ - cpufunc_nullop, /* l2cache_wbinv_all */ - (void *)cpufunc_nullop, /* l2cache_wbinv_range */ - (void *)cpufunc_nullop, /* l2cache_inv_range */ - (void *)cpufunc_nullop, /* l2cache_wb_range */ - - /* Other functions */ - - sa11x0_drain_readbuf, /* flush_prefetchbuf */ - armv4_drain_writebuf, /* drain_writebuf */ - cpufunc_nullop, /* flush_brnchtgt_C */ - (void *)cpufunc_nullop, /* flush_brnchtgt_E */ - - sa11x0_cpu_sleep, /* sleep */ - - /* Soft functions */ - - cpufunc_null_fixup, /* dataabt_fixup */ - cpufunc_null_fixup, /* prefetchabt_fixup */ - - sa11x0_context_switch, /* context_switch */ - - sa11x0_setup /* cpu setup */ -}; -#endif /* CPU_SA1100 || CPU_SA1110 */ - -#ifdef CPU_IXP12X0 -struct cpu_functions ixp12x0_cpufuncs = { - /* CPU functions */ - - cpufunc_id, /* id */ - cpufunc_nullop, /* cpwait */ - - /* MMU functions */ - - cpufunc_control, /* control */ - cpufunc_domains, /* domain */ - sa1_setttb, /* setttb */ - cpufunc_faultstatus, /* faultstatus */ - cpufunc_faultaddress, /* faultaddress */ - - /* TLB functions */ - - armv4_tlb_flushID, /* tlb_flushID */ - sa1_tlb_flushID_SE, /* tlb_flushID_SE */ - armv4_tlb_flushI, /* tlb_flushI */ - (void *)armv4_tlb_flushI, /* tlb_flushI_SE */ - armv4_tlb_flushD, /* tlb_flushD */ - armv4_tlb_flushD_SE, /* tlb_flushD_SE */ - - /* Cache operations */ - - sa1_cache_syncI, /* icache_sync_all */ - sa1_cache_syncI_rng, /* icache_sync_range */ - - sa1_cache_purgeD, /* dcache_wbinv_all */ - sa1_cache_purgeD_rng, /* dcache_wbinv_range */ -/*XXX*/ sa1_cache_purgeD_rng, /* dcache_inv_range */ - sa1_cache_cleanD_rng, /* dcache_wb_range */ - - sa1_cache_flushID, /* idcache_inv_all */ - sa1_cache_purgeID, /* idcache_wbinv_all */ - sa1_cache_purgeID_rng, /* idcache_wbinv_range */ - cpufunc_nullop, /* l2cache_wbinv_all */ - (void *)cpufunc_nullop, /* l2cache_wbinv_range */ - (void *)cpufunc_nullop, /* l2cache_inv_range */ - (void *)cpufunc_nullop, /* l2cache_wb_range */ - - /* Other functions */ - - ixp12x0_drain_readbuf, /* flush_prefetchbuf */ - armv4_drain_writebuf, /* drain_writebuf */ - cpufunc_nullop, /* flush_brnchtgt_C */ - (void *)cpufunc_nullop, /* flush_brnchtgt_E */ - - (void *)cpufunc_nullop, /* sleep */ - - /* Soft functions */ - - cpufunc_null_fixup, /* dataabt_fixup */ - cpufunc_null_fixup, /* prefetchabt_fixup */ - - ixp12x0_context_switch, /* context_switch */ - - ixp12x0_setup /* cpu setup */ -}; -#endif /* CPU_IXP12X0 */ - #if defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ defined(CPU_XSCALE_80219) @@ -1128,7 +814,7 @@ struct cpu_functions cpufuncs; u_int cputype; u_int cpu_reset_needs_v4_MMU_disable; /* flag used in locore.s */ -#if defined(CPU_ARM7TDMI) || defined(CPU_ARM8) || defined(CPU_ARM9) || \ +#if defined(CPU_ARM9) || \ defined (CPU_ARM9E) || defined (CPU_ARM10) || defined (CPU_ARM1136) || \ defined(CPU_ARM1176) || defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ @@ -1247,61 +933,7 @@ get_cachetype_cp15() arm_dcache_align_mask = arm_dcache_align - 1; } } -#endif /* ARM7TDMI || ARM8 || ARM9 || XSCALE */ - -#if defined(CPU_SA110) || defined(CPU_SA1100) || defined(CPU_SA1110) || \ - defined(CPU_IXP12X0) -/* Cache information for CPUs without cache type registers. */ -struct cachetab { - u_int32_t ct_cpuid; - int ct_pcache_type; - int ct_pcache_unified; - int ct_pdcache_size; - int ct_pdcache_line_size; - int ct_pdcache_ways; - int ct_picache_size; - int ct_picache_line_size; - int ct_picache_ways; -}; - -struct cachetab cachetab[] = { - /* cpuid, cache type, u, dsiz, ls, wy, isiz, ls, wy */ - /* XXX is this type right for SA-1? */ - { CPU_ID_SA110, CPU_CT_CTYPE_WB1, 0, 16384, 32, 32, 16384, 32, 32 }, - { CPU_ID_SA1100, CPU_CT_CTYPE_WB1, 0, 8192, 32, 32, 16384, 32, 32 }, - { CPU_ID_SA1110, CPU_CT_CTYPE_WB1, 0, 8192, 32, 32, 16384, 32, 32 }, - { CPU_ID_IXP1200, CPU_CT_CTYPE_WB1, 0, 16384, 32, 32, 16384, 32, 32 }, /* XXX */ - { 0, 0, 0, 0, 0, 0, 0, 0} -}; - -static void get_cachetype_table(void); - -static void -get_cachetype_table() -{ - int i; - u_int32_t cpuid = cpufunc_id(); - - for (i = 0; cachetab[i].ct_cpuid != 0; i++) { - if (cachetab[i].ct_cpuid == (cpuid & CPU_ID_CPU_MASK)) { - arm_pcache_type = cachetab[i].ct_pcache_type; - arm_pcache_unified = cachetab[i].ct_pcache_unified; - arm_pdcache_size = cachetab[i].ct_pdcache_size; - arm_pdcache_line_size = - cachetab[i].ct_pdcache_line_size; - arm_pdcache_ways = cachetab[i].ct_pdcache_ways; - arm_picache_size = cachetab[i].ct_picache_size; - arm_picache_line_size = - cachetab[i].ct_picache_line_size; - arm_picache_ways = cachetab[i].ct_picache_ways; - } - } - arm_dcache_align = arm_pdcache_line_size; - - arm_dcache_align_mask = arm_dcache_align - 1; -} - -#endif /* SA110 || SA1100 || SA1111 || IXP12X0 */ +#endif /* ARM9 || XSCALE */ /* * Cannot panic here as we may not have a console yet ... @@ -1318,27 +950,6 @@ set_cpufuncs() * CPU type where we want to use it by default, then we set it. */ -#ifdef CPU_ARM7TDMI - if ((cputype & CPU_ID_IMPLEMENTOR_MASK) == CPU_ID_ARM_LTD && - CPU_ID_IS7(cputype) && - (cputype & CPU_ID_7ARCH_MASK) == CPU_ID_7ARCH_V4T) { - cpufuncs = arm7tdmi_cpufuncs; - cpu_reset_needs_v4_MMU_disable = 0; - get_cachetype_cp15(); - pmap_pte_init_generic(); - goto out; - } -#endif -#ifdef CPU_ARM8 - if ((cputype & CPU_ID_IMPLEMENTOR_MASK) == CPU_ID_ARM_LTD && - (cputype & 0x0000f000) == 0x00008000) { - cpufuncs = arm8_cpufuncs; - cpu_reset_needs_v4_MMU_disable = 0; /* XXX correct? */ - get_cachetype_cp15(); - pmap_pte_init_arm8(); - goto out; - } -#endif /* CPU_ARM8 */ #ifdef CPU_ARM9 if (((cputype & CPU_ID_IMPLEMENTOR_MASK) == CPU_ID_ARM_LTD || (cputype & CPU_ID_IMPLEMENTOR_MASK) == CPU_ID_TI) && @@ -1463,39 +1074,7 @@ set_cpufuncs() goto out; } #endif /* CPU_MV_PJ4B */ -#ifdef CPU_SA110 - if (cputype == CPU_ID_SA110) { - cpufuncs = sa110_cpufuncs; - cpu_reset_needs_v4_MMU_disable = 1; /* SA needs it */ - get_cachetype_table(); - pmap_pte_init_sa1(); - goto out; - } -#endif /* CPU_SA110 */ -#ifdef CPU_SA1100 - if (cputype == CPU_ID_SA1100) { - cpufuncs = sa11x0_cpufuncs; - cpu_reset_needs_v4_MMU_disable = 1; /* SA needs it */ - get_cachetype_table(); - pmap_pte_init_sa1(); - /* Use powersave on this CPU. */ - cpu_do_powersave = 1; - - goto out; - } -#endif /* CPU_SA1100 */ -#ifdef CPU_SA1110 - if (cputype == CPU_ID_SA1110) { - cpufuncs = sa11x0_cpufuncs; - cpu_reset_needs_v4_MMU_disable = 1; /* SA needs it */ - get_cachetype_table(); - pmap_pte_init_sa1(); - /* Use powersave on this CPU. */ - cpu_do_powersave = 1; - goto out; - } -#endif /* CPU_SA1110 */ #if defined(CPU_FA526) || defined(CPU_FA626TE) if (cputype == CPU_ID_FA526 || cputype == CPU_ID_FA626TE) { cpufuncs = fa526_cpufuncs; @@ -1509,15 +1088,7 @@ set_cpufuncs() goto out; } #endif /* CPU_FA526 || CPU_FA626TE */ -#ifdef CPU_IXP12X0 - if (cputype == CPU_ID_IXP1200) { - cpufuncs = ixp12x0_cpufuncs; - cpu_reset_needs_v4_MMU_disable = 1; - get_cachetype_table(); - pmap_pte_init_sa1(); - goto out; - } -#endif /* CPU_IXP12X0 */ + #ifdef CPU_XSCALE_80200 if (cputype == CPU_ID_80200) { int rev = cpufunc_id() & CPU_ID_REVISION_MASK; @@ -1626,8 +1197,6 @@ out: * * DEBUG_FAULT_CORRECTION - Print debugging information during the * correction of registers after a fault. - * ARM6_LATE_ABORT - ARM6 supports both early and late aborts - * when defined should use late aborts */ @@ -1642,344 +1211,12 @@ cpufunc_null_fixup(arg) return(ABORT_FIXUP_OK); } - -#if defined(CPU_ARM7TDMI) - -#ifdef DEBUG_FAULT_CORRECTION -#define DFC_PRINTF(x) printf x -#define DFC_DISASSEMBLE(x) disassemble(x) -#else -#define DFC_PRINTF(x) /* nothing */ -#define DFC_DISASSEMBLE(x) /* nothing */ -#endif - /* - * "Early" data abort fixup. - * - * For ARM2, ARM2as, ARM3 and ARM6 (in early-abort mode). Also used - * indirectly by ARM6 (in late-abort mode) and ARM7[TDMI]. - * - * In early aborts, we may have to fix up LDM, STM, LDC and STC. + * CPU Setup code */ -int -early_abort_fixup(arg) - void *arg; -{ - struct trapframe *frame = arg; - u_int fault_pc; - u_int fault_instruction; - int saved_lr = 0; - - if ((frame->tf_spsr & PSR_MODE) == PSR_SVC32_MODE) { - - /* Ok an abort in SVC mode */ - - /* - * Copy the SVC r14 into the usr r14 - The usr r14 is garbage - * as the fault happened in svc mode but we need it in the - * usr slot so we can treat the registers as an array of ints - * during fixing. - * NOTE: This PC is in the position but writeback is not - * allowed on r15. - * Doing it like this is more efficient than trapping this - * case in all possible locations in the following fixup code. - */ - - saved_lr = frame->tf_usr_lr; - frame->tf_usr_lr = frame->tf_svc_lr; - - /* - * Note the trapframe does not have the SVC r13 so a fault - * from an instruction with writeback to r13 in SVC mode is - * not allowed. This should not happen as the kstack is - * always valid. - */ - } - - /* Get fault address and status from the CPU */ - - fault_pc = frame->tf_pc; - fault_instruction = *((volatile unsigned int *)fault_pc); - - /* Decode the fault instruction and fix the registers as needed */ - - if ((fault_instruction & 0x0e000000) == 0x08000000) { - int base; - int loop; - int count; - int *registers = &frame->tf_r0; - - DFC_PRINTF(("LDM/STM\n")); - DFC_DISASSEMBLE(fault_pc); - if (fault_instruction & (1 << 21)) { - DFC_PRINTF(("This instruction must be corrected\n")); - base = (fault_instruction >> 16) & 0x0f; - if (base == 15) - return ABORT_FIXUP_FAILED; - /* Count registers transferred */ - count = 0; - for (loop = 0; loop < 16; ++loop) { - if (fault_instruction & (1<tf_r0; - - /* REGISTER CORRECTION IS REQUIRED FOR THESE INSTRUCTIONS */ - - DFC_DISASSEMBLE(fault_pc); - - /* Only need to fix registers if write back is turned on */ - - if ((fault_instruction & (1 << 21)) != 0) { - base = (fault_instruction >> 16) & 0x0f; - if (base == 13 && - (frame->tf_spsr & PSR_MODE) == PSR_SVC32_MODE) - return ABORT_FIXUP_FAILED; - if (base == 15) - return ABORT_FIXUP_FAILED; - - offset = (fault_instruction & 0xff) << 2; - DFC_PRINTF(("r%d=%08x\n", base, registers[base])); - if ((fault_instruction & (1 << 23)) != 0) - offset = -offset; - registers[base] += offset; - DFC_PRINTF(("r%d=%08x\n", base, registers[base])); - } - } else if ((fault_instruction & 0x0e000000) == 0x0c000000) - return ABORT_FIXUP_FAILED; - - if ((frame->tf_spsr & PSR_MODE) == PSR_SVC32_MODE) { - - /* Ok an abort in SVC mode */ - - /* - * Copy the SVC r14 into the usr r14 - The usr r14 is garbage - * as the fault happened in svc mode but we need it in the - * usr slot so we can treat the registers as an array of ints - * during fixing. - * NOTE: This PC is in the position but writeback is not - * allowed on r15. - * Doing it like this is more efficient than trapping this - * case in all possible locations in the prior fixup code. - */ - - frame->tf_svc_lr = frame->tf_usr_lr; - frame->tf_usr_lr = saved_lr; - - /* - * Note the trapframe does not have the SVC r13 so a fault - * from an instruction with writeback to r13 in SVC mode is - * not allowed. This should not happen as the kstack is - * always valid. - */ - } - - return(ABORT_FIXUP_OK); -} -#endif /* CPU_ARM2/250/3/6/7 */ - - -#if defined(CPU_ARM7TDMI) -/* - * "Late" (base updated) data abort fixup - * - * For ARM6 (in late-abort mode) and ARM7. - * - * In this model, all data-transfer instructions need fixing up. We defer - * LDM, STM, LDC and STC fixup to the early-abort handler. - */ -int -late_abort_fixup(arg) - void *arg; -{ - struct trapframe *frame = arg; - u_int fault_pc; - u_int fault_instruction; - int saved_lr = 0; - - if ((frame->tf_spsr & PSR_MODE) == PSR_SVC32_MODE) { - - /* Ok an abort in SVC mode */ - - /* - * Copy the SVC r14 into the usr r14 - The usr r14 is garbage - * as the fault happened in svc mode but we need it in the - * usr slot so we can treat the registers as an array of ints - * during fixing. - * NOTE: This PC is in the position but writeback is not - * allowed on r15. - * Doing it like this is more efficient than trapping this - * case in all possible locations in the following fixup code. - */ - - saved_lr = frame->tf_usr_lr; - frame->tf_usr_lr = frame->tf_svc_lr; - - /* - * Note the trapframe does not have the SVC r13 so a fault - * from an instruction with writeback to r13 in SVC mode is - * not allowed. This should not happen as the kstack is - * always valid. - */ - } - - /* Get fault address and status from the CPU */ - - fault_pc = frame->tf_pc; - fault_instruction = *((volatile unsigned int *)fault_pc); - - /* Decode the fault instruction and fix the registers as needed */ - - /* Was is a swap instruction ? */ - if ((fault_instruction & 0x0fb00ff0) == 0x01000090) { - DFC_DISASSEMBLE(fault_pc); - } else if ((fault_instruction & 0x0c000000) == 0x04000000) { - - /* Was is a ldr/str instruction */ - /* This is for late abort only */ - - int base; - int offset; - int *registers = &frame->tf_r0; - - DFC_DISASSEMBLE(fault_pc); - - /* This is for late abort only */ - - if ((fault_instruction & (1 << 24)) == 0 - || (fault_instruction & (1 << 21)) != 0) { - /* postindexed ldr/str with no writeback */ - - base = (fault_instruction >> 16) & 0x0f; - if (base == 13 && - (frame->tf_spsr & PSR_MODE) == PSR_SVC32_MODE) - return ABORT_FIXUP_FAILED; - if (base == 15) - return ABORT_FIXUP_FAILED; - DFC_PRINTF(("late abt fix: r%d=%08x : ", - base, registers[base])); - if ((fault_instruction & (1 << 25)) == 0) { - /* Immediate offset - easy */ - - offset = fault_instruction & 0xfff; - if ((fault_instruction & (1 << 23))) - offset = -offset; - registers[base] += offset; - DFC_PRINTF(("imm=%08x ", offset)); - } else { - /* offset is a shifted register */ - int shift; - - offset = fault_instruction & 0x0f; - if (offset == base) - return ABORT_FIXUP_FAILED; - - /* - * Register offset - hard we have to - * cope with shifts ! - */ - offset = registers[offset]; - - if ((fault_instruction & (1 << 4)) == 0) - /* shift with amount */ - shift = (fault_instruction >> 7) & 0x1f; - else { - /* shift with register */ - if ((fault_instruction & (1 << 7)) != 0) - /* undefined for now so bail out */ - return ABORT_FIXUP_FAILED; - shift = ((fault_instruction >> 8) & 0xf); - if (base == shift) - return ABORT_FIXUP_FAILED; - DFC_PRINTF(("shift reg=%d ", shift)); - shift = registers[shift]; - } - DFC_PRINTF(("shift=%08x ", shift)); - switch (((fault_instruction >> 5) & 0x3)) { - case 0 : /* Logical left */ - offset = (int)(((u_int)offset) << shift); - break; - case 1 : /* Logical Right */ - if (shift == 0) shift = 32; - offset = (int)(((u_int)offset) >> shift); - break; - case 2 : /* Arithmetic Right */ - if (shift == 0) shift = 32; - offset = (int)(((int)offset) >> shift); - break; - case 3 : /* Rotate right (rol or rxx) */ - return ABORT_FIXUP_FAILED; - break; - } - - DFC_PRINTF(("abt: fixed LDR/STR with " - "register offset\n")); - if ((fault_instruction & (1 << 23))) - offset = -offset; - DFC_PRINTF(("offset=%08x ", offset)); - registers[base] += offset; - } - DFC_PRINTF(("r%d=%08x\n", base, registers[base])); - } - } - - if ((frame->tf_spsr & PSR_MODE) == PSR_SVC32_MODE) { - - /* Ok an abort in SVC mode */ - - /* - * Copy the SVC r14 into the usr r14 - The usr r14 is garbage - * as the fault happened in svc mode but we need it in the - * usr slot so we can treat the registers as an array of ints - * during fixing. - * NOTE: This PC is in the position but writeback is not - * allowed on r15. - * Doing it like this is more efficient than trapping this - * case in all possible locations in the prior fixup code. - */ - - frame->tf_svc_lr = frame->tf_usr_lr; - frame->tf_usr_lr = saved_lr; - - /* - * Note the trapframe does not have the SVC r13 so a fault - * from an instruction with writeback to r13 in SVC mode is - * not allowed. This should not happen as the kstack is - * always valid. - */ - } - - /* - * Now let the early-abort fixup routine have a go, in case it - * was an LDM, STM, LDC or STC that faulted. - */ - - return early_abort_fixup(arg); -} -#endif /* CPU_ARM7TDMI */ - -/* - * CPU Setup code - */ - -#if defined(CPU_ARM7TDMI) || defined(CPU_ARM8) || defined (CPU_ARM9) || \ +#if defined (CPU_ARM9) || \ defined(CPU_ARM9E) || \ - defined(CPU_SA110) || defined(CPU_SA1100) || defined(CPU_SA1110) || \ defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342) || \ @@ -2029,148 +1266,7 @@ parse_cpu_options(args, optlist, cpuctrl } return(cpuctrl); } -#endif /* CPU_ARM7TDMI || CPU_ARM8 || CPU_SA110 || XSCALE*/ - -#if defined(CPU_ARM7TDMI) || defined(CPU_ARM8) -struct cpu_option arm678_options[] = { -#ifdef COMPAT_12 - { "nocache", IGN, BIC, CPU_CONTROL_IDC_ENABLE }, - { "nowritebuf", IGN, BIC, CPU_CONTROL_WBUF_ENABLE }, -#endif /* COMPAT_12 */ - { "cpu.cache", BIC, OR, CPU_CONTROL_IDC_ENABLE }, - { "cpu.nocache", OR, BIC, CPU_CONTROL_IDC_ENABLE }, - { "cpu.writebuf", BIC, OR, CPU_CONTROL_WBUF_ENABLE }, - { "cpu.nowritebuf", OR, BIC, CPU_CONTROL_WBUF_ENABLE }, - { NULL, IGN, IGN, 0 } -}; - -#endif /* CPU_ARM6 || CPU_ARM7 || CPU_ARM7TDMI || CPU_ARM8 */ - -#ifdef CPU_ARM7TDMI -struct cpu_option arm7tdmi_options[] = { - { "arm7.cache", BIC, OR, CPU_CONTROL_IDC_ENABLE }, - { "arm7.nocache", OR, BIC, CPU_CONTROL_IDC_ENABLE }, - { "arm7.writebuf", BIC, OR, CPU_CONTROL_WBUF_ENABLE }, - { "arm7.nowritebuf", OR, BIC, CPU_CONTROL_WBUF_ENABLE }, -#ifdef COMPAT_12 - { "fpaclk2", BIC, OR, CPU_CONTROL_CPCLK }, -#endif /* COMPAT_12 */ - { "arm700.fpaclk", BIC, OR, CPU_CONTROL_CPCLK }, - { NULL, IGN, IGN, 0 } -}; - -void -arm7tdmi_setup(args) - char *args; -{ - int cpuctrl; - - cpuctrl = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_32BP_ENABLE - | CPU_CONTROL_32BD_ENABLE | CPU_CONTROL_SYST_ENABLE - | CPU_CONTROL_IDC_ENABLE | CPU_CONTROL_WBUF_ENABLE; - - cpuctrl = parse_cpu_options(args, arm678_options, cpuctrl); - cpuctrl = parse_cpu_options(args, arm7tdmi_options, cpuctrl); - -#ifdef __ARMEB__ - cpuctrl |= CPU_CONTROL_BEND_ENABLE; -#endif - - /* Clear out the cache */ - cpu_idcache_wbinv_all(); - - /* Set the control register */ - ctrl = cpuctrl; - cpu_control(0xffffffff, cpuctrl); -} -#endif /* CPU_ARM7TDMI */ - -#ifdef CPU_ARM8 -struct cpu_option arm8_options[] = { - { "arm8.cache", BIC, OR, CPU_CONTROL_IDC_ENABLE }, - { "arm8.nocache", OR, BIC, CPU_CONTROL_IDC_ENABLE }, - { "arm8.writebuf", BIC, OR, CPU_CONTROL_WBUF_ENABLE }, - { "arm8.nowritebuf", OR, BIC, CPU_CONTROL_WBUF_ENABLE }, -#ifdef COMPAT_12 - { "branchpredict", BIC, OR, CPU_CONTROL_BPRD_ENABLE }, -#endif /* COMPAT_12 */ - { "cpu.branchpredict", BIC, OR, CPU_CONTROL_BPRD_ENABLE }, - { "arm8.branchpredict", BIC, OR, CPU_CONTROL_BPRD_ENABLE }, - { NULL, IGN, IGN, 0 } -}; - -void -arm8_setup(args) - char *args; -{ - int integer; - int cpuctrl, cpuctrlmask; - int clocktest; - int setclock = 0; - - cpuctrl = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_32BP_ENABLE - | CPU_CONTROL_32BD_ENABLE | CPU_CONTROL_SYST_ENABLE - | CPU_CONTROL_IDC_ENABLE | CPU_CONTROL_WBUF_ENABLE; - cpuctrlmask = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_32BP_ENABLE - | CPU_CONTROL_32BD_ENABLE | CPU_CONTROL_SYST_ENABLE - | CPU_CONTROL_IDC_ENABLE | CPU_CONTROL_WBUF_ENABLE - | CPU_CONTROL_BPRD_ENABLE | CPU_CONTROL_ROM_ENABLE - | CPU_CONTROL_BEND_ENABLE | CPU_CONTROL_AFLT_ENABLE; - -#ifndef ARM32_DISABLE_ALIGNMENT_FAULTS - cpuctrl |= CPU_CONTROL_AFLT_ENABLE; -#endif - - cpuctrl = parse_cpu_options(args, arm678_options, cpuctrl); - cpuctrl = parse_cpu_options(args, arm8_options, cpuctrl); - -#ifdef __ARMEB__ - cpuctrl |= CPU_CONTROL_BEND_ENABLE; -#endif - - /* Get clock configuration */ - clocktest = arm8_clock_config(0, 0) & 0x0f; - - /* Special ARM8 clock and test configuration */ - if (get_bootconf_option(args, "arm8.clock.reset", BOOTOPT_TYPE_BOOLEAN, &integer)) { - clocktest = 0; - setclock = 1; - } - if (get_bootconf_option(args, "arm8.clock.dynamic", BOOTOPT_TYPE_BOOLEAN, &integer)) { - if (integer) - clocktest |= 0x01; - else - clocktest &= ~(0x01); - setclock = 1; - } - if (get_bootconf_option(args, "arm8.clock.sync", BOOTOPT_TYPE_BOOLEAN, &integer)) { - if (integer) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat May 17 13:59:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87B1ADF6; Sat, 17 May 2014 13:59:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68B452404; Sat, 17 May 2014 13:59:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HDxDVF026994; Sat, 17 May 2014 13:59:13 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HDxB3A026980; Sat, 17 May 2014 13:59:11 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405171359.s4HDxB3A026980@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 13:59:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266312 - in stable/10/sys: amd64/amd64 arm/arm i386/i386 ia64/ia64 mips/mips powerpc/powerpc sparc64/sparc64 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 13:59:13 -0000 Author: ian Date: Sat May 17 13:59:11 2014 New Revision: 266312 URL: http://svnweb.freebsd.org/changeset/base/266312 Log: MFC 263036, 263059: delete advertising clause in licenses, renumber. Modified: stable/10/sys/amd64/amd64/uio_machdep.c stable/10/sys/arm/arm/sys_machdep.c stable/10/sys/arm/arm/uio_machdep.c stable/10/sys/i386/i386/uio_machdep.c stable/10/sys/ia64/ia64/uio_machdep.c stable/10/sys/mips/mips/uio_machdep.c stable/10/sys/powerpc/powerpc/uio_machdep.c stable/10/sys/sparc64/sparc64/uio_machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/uio_machdep.c ============================================================================== --- stable/10/sys/amd64/amd64/uio_machdep.c Sat May 17 13:53:38 2014 (r266311) +++ stable/10/sys/amd64/amd64/uio_machdep.c Sat May 17 13:59:11 2014 (r266312) @@ -16,7 +16,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/sys/arm/arm/sys_machdep.c ============================================================================== --- stable/10/sys/arm/arm/sys_machdep.c Sat May 17 13:53:38 2014 (r266311) +++ stable/10/sys/arm/arm/sys_machdep.c Sat May 17 13:59:11 2014 (r266312) @@ -10,11 +10,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/sys/arm/arm/uio_machdep.c ============================================================================== --- stable/10/sys/arm/arm/uio_machdep.c Sat May 17 13:53:38 2014 (r266311) +++ stable/10/sys/arm/arm/uio_machdep.c Sat May 17 13:59:11 2014 (r266312) @@ -16,11 +16,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/sys/i386/i386/uio_machdep.c ============================================================================== --- stable/10/sys/i386/i386/uio_machdep.c Sat May 17 13:53:38 2014 (r266311) +++ stable/10/sys/i386/i386/uio_machdep.c Sat May 17 13:59:11 2014 (r266312) @@ -16,7 +16,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/sys/ia64/ia64/uio_machdep.c ============================================================================== --- stable/10/sys/ia64/ia64/uio_machdep.c Sat May 17 13:53:38 2014 (r266311) +++ stable/10/sys/ia64/ia64/uio_machdep.c Sat May 17 13:59:11 2014 (r266312) @@ -16,7 +16,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/sys/mips/mips/uio_machdep.c ============================================================================== --- stable/10/sys/mips/mips/uio_machdep.c Sat May 17 13:53:38 2014 (r266311) +++ stable/10/sys/mips/mips/uio_machdep.c Sat May 17 13:59:11 2014 (r266312) @@ -16,7 +16,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/sys/powerpc/powerpc/uio_machdep.c ============================================================================== --- stable/10/sys/powerpc/powerpc/uio_machdep.c Sat May 17 13:53:38 2014 (r266311) +++ stable/10/sys/powerpc/powerpc/uio_machdep.c Sat May 17 13:59:11 2014 (r266312) @@ -16,7 +16,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: stable/10/sys/sparc64/sparc64/uio_machdep.c ============================================================================== --- stable/10/sys/sparc64/sparc64/uio_machdep.c Sat May 17 13:53:38 2014 (r266311) +++ stable/10/sys/sparc64/sparc64/uio_machdep.c Sat May 17 13:59:11 2014 (r266312) @@ -16,7 +16,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * From owner-svn-src-stable@FreeBSD.ORG Sat May 17 14:03:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1B64816A; Sat, 17 May 2014 14:03:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0814F24A2; Sat, 17 May 2014 14:03:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HE3kuh032562; Sat, 17 May 2014 14:03:46 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HE3kap032560; Sat, 17 May 2014 14:03:46 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405171403.s4HE3kap032560@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 14:03:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266313 - in stable/10: sys/arm/conf usr.bin/dtc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 14:03:47 -0000 Author: ian Date: Sat May 17 14:03:46 2014 New Revision: 266313 URL: http://svnweb.freebsd.org/changeset/base/266313 Log: MFC 263199, 263207 Fix error mesasge in dtc. Add tmpfs, mbr, and bsdlabel options back to wandboard kernel config. Modified: stable/10/sys/arm/conf/WANDBOARD.common stable/10/usr.bin/dtc/fdt.cc Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/WANDBOARD.common ============================================================================== --- stable/10/sys/arm/conf/WANDBOARD.common Sat May 17 13:59:11 2014 (r266312) +++ stable/10/sys/arm/conf/WANDBOARD.common Sat May 17 14:03:46 2014 (r266313) @@ -35,10 +35,13 @@ options NFSCL # New Network Filesyst #options NFSD # New Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL +options TMPFS # Efficient memory filesystem options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem #options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme options GEOM_PART_GPT # GUID Partition Tables. options GEOM_LABEL # Provides labelization options KTRACE # ktrace(1) support Modified: stable/10/usr.bin/dtc/fdt.cc ============================================================================== --- stable/10/usr.bin/dtc/fdt.cc Sat May 17 13:59:11 2014 (r266312) +++ stable/10/usr.bin/dtc/fdt.cc Sat May 17 14:03:46 2014 (r266313) @@ -1374,7 +1374,7 @@ device_tree::parse_dts(const char *fn, F (input.next_token(), input.consume_integer(len)))) { - input.parse_error("Expected /dts-v1/; version string"); + input.parse_error("Expected size on /memreserve/ node."); } input.next_token(); input.consume(';'); From owner-svn-src-stable@FreeBSD.ORG Sat May 17 14:22:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 069D1567; Sat, 17 May 2014 14:22:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E58962646; Sat, 17 May 2014 14:22:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HEMdX8044964; Sat, 17 May 2014 14:22:39 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HEMbNR044944; Sat, 17 May 2014 14:22:37 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405171422.s4HEMbNR044944@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 14:22:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266314 - in stable/10/lib: libc/arm libc/arm/aeabi msun/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 14:22:40 -0000 Author: ian Date: Sat May 17 14:22:37 2014 New Revision: 266314 URL: http://svnweb.freebsd.org/changeset/base/266314 Log: MFC 262989, 263210, 263230, 263231, 263239, 263242, 263243, Export _libc_arm_fpu_present as a private symbol to be used by other system libraries, for example libm. On armv6 access both the softfloat and, when available, the vfp to get and set the floating-point environment. Build fenv-vfp.c with the softfp float abi. Without this gcc generates an incorrect assembly file that doesn't allow for vfp instructions. Only build the vfp/softfp switching code on armv6 as we don't support vfp on anything earlier than this. This should fix the armeb and arm builds when using gcc. Add an optimised version of the float and double helper functions. Added: stable/10/lib/libc/arm/aeabi/aeabi_vfp.h - copied, changed from r263239, head/lib/libc/arm/aeabi/aeabi_vfp.h stable/10/lib/libc/arm/aeabi/aeabi_vfp_double.S - copied unchanged from r263239, head/lib/libc/arm/aeabi/aeabi_vfp_double.S stable/10/lib/libc/arm/aeabi/aeabi_vfp_float.S - copied unchanged from r263239, head/lib/libc/arm/aeabi/aeabi_vfp_float.S stable/10/lib/msun/arm/fenv-mangle.h - copied unchanged from r263210, head/lib/msun/arm/fenv-mangle.h stable/10/lib/msun/arm/fenv-softfp.c - copied unchanged from r263210, head/lib/msun/arm/fenv-softfp.c stable/10/lib/msun/arm/fenv-vfp.c - copied unchanged from r263210, head/lib/msun/arm/fenv-vfp.c Modified: stable/10/lib/libc/arm/Symbol.map stable/10/lib/libc/arm/aeabi/Makefile.inc stable/10/lib/libc/arm/aeabi/aeabi_double.c stable/10/lib/libc/arm/aeabi/aeabi_float.c stable/10/lib/msun/arm/Makefile.inc stable/10/lib/msun/arm/Symbol.map stable/10/lib/msun/arm/fenv.c stable/10/lib/msun/arm/fenv.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/arm/Symbol.map ============================================================================== --- stable/10/lib/libc/arm/Symbol.map Sat May 17 14:03:46 2014 (r266313) +++ stable/10/lib/libc/arm/Symbol.map Sat May 17 14:22:37 2014 (r266314) @@ -76,4 +76,6 @@ FBSDprivate_1.0 { __fixunsdfsi; __extendsfdf2; __truncdfsf2; + + _libc_arm_fpu_present; }; Modified: stable/10/lib/libc/arm/aeabi/Makefile.inc ============================================================================== --- stable/10/lib/libc/arm/aeabi/Makefile.inc Sat May 17 14:03:46 2014 (r266313) +++ stable/10/lib/libc/arm/aeabi/Makefile.inc Sat May 17 14:22:37 2014 (r266314) @@ -6,6 +6,10 @@ SRCS+= aeabi_atexit.c \ aeabi_double.c \ aeabi_float.c \ aeabi_unwind_cpp.c +.if ${MACHINE_ARCH:Marmv6*} +SRCS+= aeabi_vfp_double.S \ + aeabi_vfp_float.S +.endif # Add the aeabi_mem* functions. While they live in compiler-rt they call into # libc. This causes issues when other parts of libc call these functions. Modified: stable/10/lib/libc/arm/aeabi/aeabi_double.c ============================================================================== --- stable/10/lib/libc/arm/aeabi/aeabi_double.c Sat May 17 14:03:46 2014 (r266313) +++ stable/10/lib/libc/arm/aeabi/aeabi_double.c Sat May 17 14:22:37 2014 (r266314) @@ -32,70 +32,45 @@ __FBSDID("$FreeBSD$"); #include "milieu.h" #include "softfloat.h" +#include "aeabi_vfp.h" + +extern int _libc_arm_fpu_present; + flag __unorddf2(float64, float64); -int __aeabi_dcmpeq(float64 a, float64 b) -{ - return float64_eq(a, b); -} - -int __aeabi_dcmplt(float64 a, float64 b) -{ - return float64_lt(a, b); -} - -int __aeabi_dcmple(float64 a, float64 b) -{ - return float64_le(a, b); -} - -int __aeabi_dcmpge(float64 a, float64 b) -{ - return float64_le(b, a); -} - -int __aeabi_dcmpgt(float64 a, float64 b) -{ - return float64_lt(b, a); -} - -int __aeabi_dcmpun(float64 a, float64 b) -{ - return __unorddf2(a, b); -} - -int __aeabi_d2iz(float64 a) -{ - return float64_to_int32_round_to_zero(a); -} - -float32 __aeabi_d2f(float64 a) -{ - return float64_to_float32(a); -} - -float64 __aeabi_i2d(int a) -{ - return int32_to_float64(a); -} - -float64 __aeabi_dadd(float64 a, float64 b) -{ - return float64_add(a, b); -} - -float64 __aeabi_ddiv(float64 a, float64 b) -{ - return float64_div(a, b); -} - -float64 __aeabi_dmul(float64 a, float64 b) -{ - return float64_mul(a, b); -} - -float64 __aeabi_dsub(float64 a, float64 b) -{ - return float64_sub(a, b); -} +/* These are written in asm and are only called from this file */ +int __aeabi_dcmpeq_vfp(float64, float64); +int __aeabi_dcmplt_vfp(float64, float64); +int __aeabi_dcmple_vfp(float64, float64); +int __aeabi_dcmpgt_vfp(float64, float64); +int __aeabi_dcmpge_vfp(float64, float64); +int __aeabi_dcmpun_vfp(float64, float64); +int __aeabi_d2iz_vfp(float64); +float32 __aeabi_d2f_vfp(float64); +float64 __aeabi_i2d_vfp(int); +float64 __aeabi_dadd_vfp(float64, float64); +float64 __aeabi_ddiv_vfp(float64, float64); +float64 __aeabi_dmul_vfp(float64, float64); +float64 __aeabi_dsub_vfp(float64, float64); + +/* + * Depending on the target these will: + * On armv6 with a vfp call the above function, or + * Call the softfloat function in the 3rd argument. + */ +int AEABI_FUNC2(dcmpeq, float64, float64_eq) +int AEABI_FUNC2(dcmplt, float64, float64_lt) +int AEABI_FUNC2(dcmple, float64, float64_le) +int AEABI_FUNC2_REV(dcmpge, float64, float64_le) +int AEABI_FUNC2_REV(dcmpgt, float64, float64_lt) +int AEABI_FUNC2(dcmpun, float64, __unorddf2) + +int AEABI_FUNC(d2iz, float64, float64_to_int32_round_to_zero) +float32 AEABI_FUNC(d2f, float64, float64_to_float32) +float64 AEABI_FUNC(i2d, int, int32_to_float64) + +float64 AEABI_FUNC2(dadd, float64, float64_add) +float64 AEABI_FUNC2(ddiv, float64, float64_div) +float64 AEABI_FUNC2(dmul, float64, float64_mul) +float64 AEABI_FUNC2(dsub, float64, float64_sub) Modified: stable/10/lib/libc/arm/aeabi/aeabi_float.c ============================================================================== --- stable/10/lib/libc/arm/aeabi/aeabi_float.c Sat May 17 14:03:46 2014 (r266313) +++ stable/10/lib/libc/arm/aeabi/aeabi_float.c Sat May 17 14:22:37 2014 (r266314) @@ -32,70 +32,45 @@ __FBSDID("$FreeBSD$"); #include "milieu.h" #include "softfloat.h" +#include "aeabi_vfp.h" + +extern int _libc_arm_fpu_present; + flag __unordsf2(float32, float32); -int __aeabi_fcmpeq(float32 a, float32 b) -{ - return float32_eq(a, b); -} - -int __aeabi_fcmplt(float32 a, float32 b) -{ - return float32_lt(a, b); -} - -int __aeabi_fcmple(float32 a, float32 b) -{ - return float32_le(a, b); -} - -int __aeabi_fcmpge(float32 a, float32 b) -{ - return float32_le(b, a); -} - -int __aeabi_fcmpgt(float32 a, float32 b) -{ - return float32_lt(b, a); -} - -int __aeabi_fcmpun(float32 a, float32 b) -{ - return __unordsf2(a, b); -} - -int __aeabi_f2iz(float32 a) -{ - return float32_to_int32_round_to_zero(a); -} - -float32 __aeabi_f2d(float32 a) -{ - return float32_to_float64(a); -} - -float32 __aeabi_i2f(int a) -{ - return int32_to_float32(a); -} - -float32 __aeabi_fadd(float32 a, float32 b) -{ - return float32_add(a, b); -} - -float32 __aeabi_fdiv(float32 a, float32 b) -{ - return float32_div(a, b); -} - -float32 __aeabi_fmul(float32 a, float32 b) -{ - return float32_mul(a, b); -} - -float32 __aeabi_fsub(float32 a, float32 b) -{ - return float32_sub(a, b); -} +/* These are written in asm and are only called from this file */ +int __aeabi_fcmpeq_vfp(float32, float32); +int __aeabi_fcmplt_vfp(float32, float32); +int __aeabi_fcmple_vfp(float32, float32); +int __aeabi_fcmpgt_vfp(float32, float32); +int __aeabi_fcmpge_vfp(float32, float32); +int __aeabi_fcmpun_vfp(float32, float32); +int __aeabi_f2iz_vfp(float32); +float64 __aeabi_f2d_vfp(float32); +float32 __aeabi_i2f_vfp(int); +float32 __aeabi_fadd_vfp(float32, float32); +float32 __aeabi_fdiv_vfp(float32, float32); +float32 __aeabi_fmul_vfp(float32, float32); +float32 __aeabi_fsub_vfp(float32, float32); + +/* + * Depending on the target these will: + * On armv6 with a vfp call the above function, or + * Call the softfloat function in the 3rd argument. + */ +int AEABI_FUNC2(fcmpeq, float32, float32_eq) +int AEABI_FUNC2(fcmplt, float32, float32_lt) +int AEABI_FUNC2(fcmple, float32, float32_le) +int AEABI_FUNC2_REV(fcmpge, float32, float32_le) +int AEABI_FUNC2_REV(fcmpgt, float32, float32_lt) +int AEABI_FUNC2(fcmpun, float32, __unordsf2) + +int AEABI_FUNC(f2iz, float32, float32_to_int32_round_to_zero) +float64 AEABI_FUNC(f2d, float32, float32_to_float64) +float32 AEABI_FUNC(i2f, int, int32_to_float32) + +float32 AEABI_FUNC2(fadd, float32, float32_add) +float32 AEABI_FUNC2(fdiv, float32, float32_div) +float32 AEABI_FUNC2(fmul, float32, float32_mul) +float32 AEABI_FUNC2(fsub, float32, float32_sub) Copied and modified: stable/10/lib/libc/arm/aeabi/aeabi_vfp.h (from r263239, head/lib/libc/arm/aeabi/aeabi_vfp.h) ============================================================================== --- head/lib/libc/arm/aeabi/aeabi_vfp.h Sun Mar 16 13:16:30 2014 (r263239, copy source) +++ stable/10/lib/libc/arm/aeabi/aeabi_vfp.h Sat May 17 14:22:37 2014 (r266314) @@ -65,7 +65,7 @@ * C Helper macros */ -#if 1 && defined(__FreeBSD_ARCH_armv6__) || (defined(__ARM_ARCH) && __ARM_ARCH >= 6) +#if defined(__FreeBSD_ARCH_armv6__) || (defined(__ARM_ARCH) && __ARM_ARCH >= 6) /* * Generate a function that will either call into the VFP implementation, * or the soft float version for a given __aeabi_* helper. The function Copied: stable/10/lib/libc/arm/aeabi/aeabi_vfp_double.S (from r263239, head/lib/libc/arm/aeabi/aeabi_vfp_double.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/arm/aeabi/aeabi_vfp_double.S Sat May 17 14:22:37 2014 (r266314, copy of r263239, head/lib/libc/arm/aeabi/aeabi_vfp_double.S) @@ -0,0 +1,170 @@ +/* + * Copyright (C) 2013 Andrew Turner + * All rights reserved. + * + * 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. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "aeabi_vfp.h" + +.fpu vfp +.syntax unified + +/* int __aeabi_dcmpeq(double, double) */ +AEABI_ENTRY(dcmpeq) + LOAD_DREG(d0, r0, r1) + LOAD_DREG(d1, r2, r3) + vcmp.f64 d0, d1 + vmrs APSR_nzcv, fpscr + movne r0, #0 + moveq r0, #1 + RET +AEABI_END(dcmpeq) + +/* int __aeabi_dcmplt(double, double) */ +AEABI_ENTRY(dcmplt) + LOAD_DREG(d0, r0, r1) + LOAD_DREG(d1, r2, r3) + vcmp.f64 d0, d1 + vmrs APSR_nzcv, fpscr + movcs r0, #0 + movlt r0, #1 + RET +AEABI_END(dcmplt) + +/* int __aeabi_dcmple(double, double) */ +AEABI_ENTRY(dcmple) + LOAD_DREG(d0, r0, r1) + LOAD_DREG(d1, r2, r3) + vcmp.f64 d0, d1 + vmrs APSR_nzcv, fpscr + movhi r0, #0 + movls r0, #1 + RET +AEABI_END(dcmple) + +/* int __aeabi_dcmpge(double, double) */ +AEABI_ENTRY(dcmpge) + LOAD_DREG(d0, r0, r1) + LOAD_DREG(d1, r2, r3) + vcmp.f64 d0, d1 + vmrs APSR_nzcv, fpscr + movlt r0, #0 + movge r0, #1 + RET +AEABI_END(dcmpge) + +/* int __aeabi_dcmpgt(double, double) */ +AEABI_ENTRY(dcmpgt) + LOAD_DREG(d0, r0, r1) + LOAD_DREG(d1, r2, r3) + vcmp.f64 d0, d1 + vmrs APSR_nzcv, fpscr + movle r0, #0 + movgt r0, #1 + RET +AEABI_END(dcmpgt) + +/* int __aeabi_dcmpun(double, double) */ +AEABI_ENTRY(dcmpun) + LOAD_DREG(d0, r0, r1) + LOAD_DREG(d1, r2, r3) + vcmp.f64 d0, d1 + vmrs APSR_nzcv, fpscr + movvc r0, #0 + movvs r0, #1 + RET +AEABI_END(dcmpun) + +/* int __aeabi_d2iz(double) */ +AEABI_ENTRY(d2iz) + LOAD_DREG(d0, r0, r1) +#if 0 + /* + * This should be the correct instruction, but binutils incorrectly + * encodes it as the version that used FPSCR to determine the rounding. + * When binutils is fixed we can use this again. + */ + vcvt.s32.f64 s0, d0 +#else + ftosizd s0, d0 +#endif + vmov r0, s0 + RET +AEABI_END(d2iz) + +/* float __aeabi_d2f(double) */ +AEABI_ENTRY(d2f) + LOAD_DREG(d0, r0, r1) + vcvt.f32.f64 s0, d0 + UNLOAD_SREG(r0, s0) + RET +AEABI_END(d2f) + +/* double __aeabi_i2d(int) */ +AEABI_ENTRY(i2d) + vmov s0, r0 + vcvt.f64.s32 d0, s0 + UNLOAD_DREG(r0, r1, d0) + RET +AEABI_END(i2d) + +/* double __aeabi_dadd(double, double) */ +AEABI_ENTRY(dadd) + LOAD_DREG(d0, r0, r1) + LOAD_DREG(d1, r2, r3) + vadd.f64 d0, d0, d1 + UNLOAD_DREG(r0, r1, d0) + RET +AEABI_END(dadd) + +/* double __aeabi_ddiv(double, double) */ +AEABI_ENTRY(ddiv) + LOAD_DREG(d0, r0, r1) + LOAD_DREG(d1, r2, r3) + vdiv.f64 d0, d0, d1 + UNLOAD_DREG(r0, r1, d0) + RET +AEABI_END(ddiv) + +/* double __aeabi_dmul(double, double) */ +AEABI_ENTRY(dmul) + LOAD_DREG(d0, r0, r1) + LOAD_DREG(d1, r2, r3) + vmul.f64 d0, d0, d1 + UNLOAD_DREG(r0, r1, d0) + RET +AEABI_END(dmul) + +/* double __aeabi_dsub(double, double) */ +AEABI_ENTRY(dsub) + LOAD_DREG(d0, r0, r1) + LOAD_DREG(d1, r2, r3) + vsub.f64 d0, d0, d1 + UNLOAD_DREG(r0, r1, d0) + RET +AEABI_END(dsub) + Copied: stable/10/lib/libc/arm/aeabi/aeabi_vfp_float.S (from r263239, head/lib/libc/arm/aeabi/aeabi_vfp_float.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/arm/aeabi/aeabi_vfp_float.S Sat May 17 14:22:37 2014 (r266314, copy of r263239, head/lib/libc/arm/aeabi/aeabi_vfp_float.S) @@ -0,0 +1,160 @@ +/* + * Copyright (C) 2013 Andrew Turner + * All rights reserved. + * + * 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. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "aeabi_vfp.h" + +.fpu vfp +.syntax unified + +/* int __aeabi_fcmpeq(float, float) */ +AEABI_ENTRY(fcmpeq) + LOAD_SREGS(s0, s1, r0, r1) + vcmp.f32 s0, s1 + vmrs APSR_nzcv, fpscr + movne r0, #0 + moveq r0, #1 + RET +AEABI_END(fcmpeq) + +/* int __aeabi_fcmplt(float, float) */ +AEABI_ENTRY(fcmplt) + LOAD_SREGS(s0, s1, r0, r1) + vcmp.f32 s0, s1 + vmrs APSR_nzcv, fpscr + movcs r0, #0 + movlt r0, #1 + RET +AEABI_END(fcmplt) + +/* int __aeabi_fcmple(float, float) */ +AEABI_ENTRY(fcmple) + LOAD_SREGS(s0, s1, r0, r1) + vcmp.f32 s0, s1 + vmrs APSR_nzcv, fpscr + movhi r0, #0 + movls r0, #1 + RET +AEABI_END(fcmple) + +/* int __aeabi_fcmpge(float, float) */ +AEABI_ENTRY(fcmpge) + LOAD_SREGS(s0, s1, r0, r1) + vcmp.f32 s0, s1 + vmrs APSR_nzcv, fpscr + movlt r0, #0 + movge r0, #1 + RET +AEABI_END(fcmpge) + +/* int __aeabi_fcmpgt(float, float) */ +AEABI_ENTRY(fcmpgt) + LOAD_SREGS(s0, s1, r0, r1) + vcmp.f32 s0, s1 + vmrs APSR_nzcv, fpscr + movle r0, #0 + movgt r0, #1 + RET +AEABI_END(fcmpgt) + +/* int __aeabi_fcmpun(float, float) */ +AEABI_ENTRY(fcmpun) + LOAD_SREGS(s0, s1, r0, r1) + vcmp.f32 s0, s1 + vmrs APSR_nzcv, fpscr + movvc r0, #0 + movvs r0, #1 + RET +AEABI_END(fcmpun) + +/* int __aeabi_f2iz(float) */ +AEABI_ENTRY(f2iz) + LOAD_SREG(s0, r0) +#if 0 + /* + * This should be the correct instruction, but binutils incorrectly + * encodes it as the version that used FPSCR to determine the rounding. + * When binutils is fixed we can use this again. + */ + vcvt.s32.f32 s0, s0 +#else + ftosizs s0, s0 +#endif + vmov r0, s0 + RET +AEABI_END(f2iz) + +/* double __aeabi_f2d(float) */ +AEABI_ENTRY(f2d) + LOAD_SREG(s0, r0) + vcvt.f64.f32 d0, s0 + UNLOAD_DREG(r0, r1, d0) + RET +AEABI_END(f2d) + +/* float __aeabi_i2f(int) */ +AEABI_ENTRY(i2f) + vmov s0, r0 + vcvt.f32.s32 s0, s0 + UNLOAD_SREG(r0, s0) + RET +AEABI_END(i2f) + +/* float __aeabi_fadd(float, float) */ +AEABI_ENTRY(fadd) + LOAD_SREGS(s0, s1, r0, r1) + vadd.f32 s0, s0, s1 + UNLOAD_SREG(r0, s0) + RET +AEABI_END(fadd) + +/* float __aeabi_fmul(float, float) */ +AEABI_ENTRY(fdiv) + LOAD_SREGS(s0, s1, r0, r1) + vdiv.f32 s0, s0, s1 + UNLOAD_SREG(r0, s0) + RET +AEABI_END(fdiv) + +/* float __aeabi_fmul(float, float) */ +AEABI_ENTRY(fmul) + LOAD_SREGS(s0, s1, r0, r1) + vmul.f32 s0, s0, s1 + UNLOAD_SREG(r0, s0) + RET +AEABI_END(fmul) + +/* float __aeabi_fsub(float, float) */ +AEABI_ENTRY(fsub) + LOAD_SREGS(s0, s1, r0, r1) + vsub.f32 s0, s0, s1 + UNLOAD_SREG(r0, s0) + RET +AEABI_END(fsub) + Modified: stable/10/lib/msun/arm/Makefile.inc ============================================================================== --- stable/10/lib/msun/arm/Makefile.inc Sat May 17 14:03:46 2014 (r266313) +++ stable/10/lib/msun/arm/Makefile.inc Sat May 17 14:22:37 2014 (r266314) @@ -2,3 +2,11 @@ LDBL_PREC = 53 SYM_MAPS += ${.CURDIR}/arm/Symbol.map + +.if ${TARGET_ARCH} == "armv6" +ARCH_SRCS = fenv-softfp.c fenv-vfp.c +.endif + +CFLAGS.fenv-vfp.c= -mfloat-abi=softfp +CFLAGS+= ${CFLAGS.${.IMPSRC:T}} + Modified: stable/10/lib/msun/arm/Symbol.map ============================================================================== --- stable/10/lib/msun/arm/Symbol.map Sat May 17 14:03:46 2014 (r266313) +++ stable/10/lib/msun/arm/Symbol.map Sat May 17 14:22:37 2014 (r266314) @@ -15,4 +15,7 @@ FBSD_1.3 { fegetenv; feholdexcept; feupdateenv; + feenableexcept; + fedisableexcept; + fegetexcept; }; Copied: stable/10/lib/msun/arm/fenv-mangle.h (from r263210, head/lib/msun/arm/fenv-mangle.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/msun/arm/fenv-mangle.h Sat May 17 14:22:37 2014 (r266314, copy of r263210, head/lib/msun/arm/fenv-mangle.h) @@ -0,0 +1,53 @@ +/*- + * Copyright (c) 2013 Andrew Turner + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +#ifdef _FENV_MANGLE_H_ +#error Only include fenv-mangle.h once +#endif + +#define _FENV_MANGLE_H_ + +#ifndef FENV_MANGLE +#error FENV_MANGLE is undefined +#endif + +#define feclearexcept FENV_MANGLE(feclearexcept) +#define fegetexceptflag FENV_MANGLE(fegetexceptflag) +#define fesetexceptflag FENV_MANGLE(fesetexceptflag) +#define feraiseexcept FENV_MANGLE(feraiseexcept) +#define fetestexcept FENV_MANGLE(fetestexcept) +#define fegetround FENV_MANGLE(fegetround) +#define fesetround FENV_MANGLE(fesetround) +#define fegetenv FENV_MANGLE(fegetenv) +#define feholdexcept FENV_MANGLE(feholdexcept) +#define fesetenv FENV_MANGLE(fesetenv) +#define feupdateenv FENV_MANGLE(feupdateenv) +#define feenableexcept FENV_MANGLE(feenableexcept) +#define fedisableexcept FENV_MANGLE(fedisableexcept) +#define fegetexcept FENV_MANGLE(fegetexcept) + Copied: stable/10/lib/msun/arm/fenv-softfp.c (from r263210, head/lib/msun/arm/fenv-softfp.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/msun/arm/fenv-softfp.c Sat May 17 14:22:37 2014 (r266314, copy of r263210, head/lib/msun/arm/fenv-softfp.c) @@ -0,0 +1,32 @@ +/*- + * Copyright (c) 2013 Andrew Turner + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +#define FENV_MANGLE(x) __softfp_ ##x +#include "fenv-mangle.h" +#include "fenv.c" + Copied: stable/10/lib/msun/arm/fenv-vfp.c (from r263210, head/lib/msun/arm/fenv-vfp.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/msun/arm/fenv-vfp.c Sat May 17 14:22:37 2014 (r266314, copy of r263210, head/lib/msun/arm/fenv-vfp.c) @@ -0,0 +1,33 @@ +/*- + * Copyright (c) 2013 Andrew Turner + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +#define FENV_MANGLE(x) __vfp_ ##x +#include "fenv-mangle.h" +#define __ARM_PCS_VFP +#include "fenv.c" + Modified: stable/10/lib/msun/arm/fenv.c ============================================================================== --- stable/10/lib/msun/arm/fenv.c Sat May 17 14:03:46 2014 (r266313) +++ stable/10/lib/msun/arm/fenv.c Sat May 17 14:22:37 2014 (r266314) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2004 David Schultz + * Copyright (c) 2013 Andrew Turner * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,11 +30,34 @@ #define __fenv_static #include "fenv.h" +#if defined(__FreeBSD_ARCH_armv6__) || (defined(__ARM_ARCH) && __ARM_ARCH >= 6) +#define FENV_ARMv6 +#endif + +/* When SOFTFP_ABI is defined we are using the softfp ABI. */ +#if defined(__VFP_FP__) && !defined(__ARM_PCS_VFP) +#define SOFTFP_ABI +#endif + + +#ifndef FENV_MANGLE +/* + * Hopefully the system ID byte is immutable, so it's valid to use + * this as a default environment. + */ +const fenv_t __fe_dfl_env = 0; +#endif + + +/* If this is a non-mangled softfp version special processing is required */ +#if defined(FENV_MANGLE) || !defined(SOFTFP_ABI) || !defined(FENV_ARMv6) + /* * The following macros map between the softfloat emulator's flags and * the hardware's FPSR. The hardware this file was written for doesn't * have rounding control bits, so we stick those in the system ID byte. */ +#ifndef __ARM_PCS_VFP #define __set_env(env, flags, mask, rnd) env = ((flags) \ | (mask)<<_FPUSW_SHIFT \ | (rnd) << 24) @@ -42,17 +66,12 @@ & FE_ALL_EXCEPT) #define __env_round(env) (((env) >> 24) & _ROUND_MASK) #include "fenv-softfloat.h" +#endif #ifdef __GNUC_GNU_INLINE__ #error "This file must be compiled with C99 'inline' semantics" #endif -/* - * Hopefully the system ID byte is immutable, so it's valid to use - * this as a default environment. - */ -const fenv_t __fe_dfl_env = 0; - extern inline int feclearexcept(int __excepts); extern inline int fegetexceptflag(fexcept_t *__flagp, int __excepts); extern inline int fesetexceptflag(const fexcept_t *__flagp, int __excepts); @@ -64,3 +83,233 @@ extern inline int fegetenv(fenv_t *__env extern inline int feholdexcept(fenv_t *__envp); extern inline int fesetenv(const fenv_t *__envp); extern inline int feupdateenv(const fenv_t *__envp); +extern inline int feenableexcept(int __mask); +extern inline int fedisableexcept(int __mask); +extern inline int fegetexcept(void); + +#else /* !FENV_MANGLE && SOFTFP_ABI */ +/* Set by libc when the VFP unit is enabled */ +extern int _libc_arm_fpu_present; + +int __softfp_feclearexcept(int __excepts); +int __softfp_fegetexceptflag(fexcept_t *__flagp, int __excepts); +int __softfp_fesetexceptflag(const fexcept_t *__flagp, int __excepts); +int __softfp_feraiseexcept(int __excepts); +int __softfp_fetestexcept(int __excepts); +int __softfp_fegetround(void); +int __softfp_fesetround(int __round); +int __softfp_fegetenv(fenv_t *__envp); +int __softfp_feholdexcept(fenv_t *__envp); +int __softfp_fesetenv(const fenv_t *__envp); +int __softfp_feupdateenv(const fenv_t *__envp); +int __softfp_feenableexcept(int __mask); +int __softfp_fedisableexcept(int __mask); +int __softfp_fegetexcept(void); + +int __vfp_feclearexcept(int __excepts); +int __vfp_fegetexceptflag(fexcept_t *__flagp, int __excepts); +int __vfp_fesetexceptflag(const fexcept_t *__flagp, int __excepts); +int __vfp_feraiseexcept(int __excepts); +int __vfp_fetestexcept(int __excepts); +int __vfp_fegetround(void); +int __vfp_fesetround(int __round); +int __vfp_fegetenv(fenv_t *__envp); +int __vfp_feholdexcept(fenv_t *__envp); +int __vfp_fesetenv(const fenv_t *__envp); +int __vfp_feupdateenv(const fenv_t *__envp); +int __vfp_feenableexcept(int __mask); +int __vfp_fedisableexcept(int __mask); +int __vfp_fegetexcept(void); + +static int +__softfp_round_to_vfp(int round) +{ + + switch (round) { + case FE_TONEAREST: + default: + return VFP_FE_TONEAREST; + case FE_TOWARDZERO: + return VFP_FE_TOWARDZERO; + case FE_UPWARD: + return VFP_FE_UPWARD; + case FE_DOWNWARD: + return VFP_FE_DOWNWARD; + } +} + +static int +__softfp_round_from_vfp(int round) +{ + + switch (round) { + case VFP_FE_TONEAREST: + default: + return FE_TONEAREST; + case VFP_FE_TOWARDZERO: + return FE_TOWARDZERO; + case VFP_FE_UPWARD: + return FE_UPWARD; + case VFP_FE_DOWNWARD: + return FE_DOWNWARD; + } +} + +int feclearexcept(int __excepts) +{ + + if (_libc_arm_fpu_present) + __vfp_feclearexcept(__excepts); + __softfp_feclearexcept(__excepts); + + return (0); +} + +int fegetexceptflag(fexcept_t *__flagp, int __excepts) +{ + fexcept_t __vfp_flagp; + + __vfp_flagp = 0; + if (_libc_arm_fpu_present) + __vfp_fegetexceptflag(&__vfp_flagp, __excepts); + __softfp_fegetexceptflag(__flagp, __excepts); + + *__flagp |= __vfp_flagp; + + return (0); +} + +int fesetexceptflag(const fexcept_t *__flagp, int __excepts) +{ + + if (_libc_arm_fpu_present) + __vfp_fesetexceptflag(__flagp, __excepts); + __softfp_fesetexceptflag(__flagp, __excepts); + + return (0); +} + +int feraiseexcept(int __excepts) +{ + + if (_libc_arm_fpu_present) + __vfp_feraiseexcept(__excepts); + __softfp_feraiseexcept(__excepts); + + return (0); +} + +int fetestexcept(int __excepts) +{ + int __got_excepts; + + __got_excepts = 0; + if (_libc_arm_fpu_present) + __got_excepts = __vfp_fetestexcept(__excepts); + __got_excepts |= __softfp_fetestexcept(__excepts); + + return (__got_excepts); +} + +int fegetround(void) +{ + + if (_libc_arm_fpu_present) + return __softfp_round_from_vfp(__vfp_fegetround()); + return __softfp_fegetround(); +} + +int fesetround(int __round) +{ + + if (_libc_arm_fpu_present) + __vfp_fesetround(__softfp_round_to_vfp(__round)); + __softfp_fesetround(__round); + + return (0); +} + +int fegetenv(fenv_t *__envp) +{ + fenv_t __vfp_envp; + + __vfp_envp = 0; + if (_libc_arm_fpu_present) + __vfp_fegetenv(&__vfp_envp); + __softfp_fegetenv(__envp); + *__envp |= __vfp_envp; + + return (0); +} + +int feholdexcept(fenv_t *__envp) +{ + fenv_t __vfp_envp; + + __vfp_envp = 0; + if (_libc_arm_fpu_present) + __vfp_feholdexcept(&__vfp_envp); + __softfp_feholdexcept(__envp); + *__envp |= __vfp_envp; + + return (0); +} + +int fesetenv(const fenv_t *__envp) +{ + + if (_libc_arm_fpu_present) + __vfp_fesetenv(__envp); + __softfp_fesetenv(__envp); + + return (0); +} + +int feupdateenv(const fenv_t *__envp) +{ + + if (_libc_arm_fpu_present) + __vfp_feupdateenv(__envp); + __softfp_feupdateenv(__envp); + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat May 17 14:35:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 91D2B986; Sat, 17 May 2014 14:35:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F037275C; Sat, 17 May 2014 14:35:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HEZI35051311; Sat, 17 May 2014 14:35:18 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HEZIHp051310; Sat, 17 May 2014 14:35:18 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201405171435.s4HEZIHp051310@svn.freebsd.org> From: Alan Cox Date: Sat, 17 May 2014 14:35:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266315 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 14:35:18 -0000 Author: alc Date: Sat May 17 14:35:18 2014 New Revision: 266315 URL: http://svnweb.freebsd.org/changeset/base/266315 Log: MFC r265850 About 9% of the pmap_protect() calls being performed by vm_map_copy_entry() are unnecessary. Eliminate the unnecessary calls. Modified: stable/10/sys/vm/vm_map.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_map.c ============================================================================== --- stable/10/sys/vm/vm_map.c Sat May 17 14:22:37 2014 (r266314) +++ stable/10/sys/vm/vm_map.c Sat May 17 14:35:18 2014 (r266315) @@ -3023,7 +3023,8 @@ vm_map_copy_entry( * If the source entry is marked needs_copy, it is already * write-protected. */ - if ((src_entry->eflags & MAP_ENTRY_NEEDS_COPY) == 0) { + if ((src_entry->eflags & MAP_ENTRY_NEEDS_COPY) == 0 && + (src_entry->protection & VM_PROT_WRITE) != 0) { pmap_protect(src_map->pmap, src_entry->start, src_entry->end, From owner-svn-src-stable@FreeBSD.ORG Sat May 17 16:00:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE2DBA11; Sat, 17 May 2014 16:00:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9B13C2F7A; Sat, 17 May 2014 16:00:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HG0PB1041074; Sat, 17 May 2014 16:00:25 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HG0PvT041071; Sat, 17 May 2014 16:00:25 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201405171600.s4HG0PvT041071@svn.freebsd.org> From: Colin Percival Date: Sat, 17 May 2014 16:00:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266321 - stable/9/sys/xen/evtchn X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 16:00:25 -0000 Author: cperciva Date: Sat May 17 16:00:25 2014 New Revision: 266321 URL: http://svnweb.freebsd.org/changeset/base/266321 Log: MFC r228162: Use C99 initializers for members of evtchn_devsw. Submitted by: wolfskill Modified: stable/9/sys/xen/evtchn/evtchn_dev.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/xen/evtchn/evtchn_dev.c ============================================================================== --- stable/9/sys/xen/evtchn/evtchn_dev.c Sat May 17 15:26:08 2014 (r266320) +++ stable/9/sys/xen/evtchn/evtchn_dev.c Sat May 17 16:00:25 2014 (r266321) @@ -318,15 +318,14 @@ evtchn_close(struct cdev *dev, int flag, } static struct cdevsw evtchn_devsw = { - d_version: D_VERSION, - d_open: evtchn_open, - d_close: evtchn_close, - d_read: evtchn_read, - d_write: evtchn_write, - d_ioctl: evtchn_ioctl, - d_poll: evtchn_poll, - d_name: "evtchn", - d_flags: 0, + .d_version = D_VERSION, + .d_open = evtchn_open, + .d_close = evtchn_close, + .d_read = evtchn_read, + .d_write = evtchn_write, + .d_ioctl = evtchn_ioctl, + .d_poll = evtchn_poll, + .d_name = "evtchn", }; From owner-svn-src-stable@FreeBSD.ORG Sat May 17 16:10:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A4D9C0D; Sat, 17 May 2014 16:10:56 +0000 (UTC) Received: from i3mail.icecube.wisc.edu (i3mail.icecube.wisc.edu [128.104.255.23]) by mx1.freebsd.org (Postfix) with ESMTP id E0505204A; Sat, 17 May 2014 16:10:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by i3mail.icecube.wisc.edu (Postfix) with ESMTP id 57FE538069; Sat, 17 May 2014 11:10:49 -0500 (CDT) X-Virus-Scanned: amavisd-new at icecube.wisc.edu Received: from i3mail.icecube.wisc.edu ([127.0.0.1]) by localhost (i3mail.icecube.wisc.edu [127.0.0.1]) (amavisd-new, port 10030) with ESMTP id duck8PH81Bof; Sat, 17 May 2014 11:10:49 -0500 (CDT) Received: from comporellon.tachypleus.net (polaris.tachypleus.net [75.101.50.44]) by i3mail.icecube.wisc.edu (Postfix) with ESMTPSA id 9243338046; Sat, 17 May 2014 11:10:48 -0500 (CDT) Message-ID: <53778A07.7000003@freebsd.org> Date: Sat, 17 May 2014 09:10:47 -0700 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: sbruno@freebsd.org Subject: Re: svn commit: r266273 - in stable/10/sys: amd64/conf conf i386/conf References: <201405162255.s4GMt1GR077643@svn.freebsd.org> <5376AFFA.3010902@freebsd.org> <1400289486.1535.1.camel@bruno> In-Reply-To: <1400289486.1535.1.camel@bruno> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org, Ian Lepore X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 16:10:56 -0000 On 05/16/14 18:18, Sean Bruno wrote: > On Fri, 2014-05-16 at 17:40 -0700, Nathan Whitehorn wrote: >> I missed the original commit of this, but why doesn't this code work on >> non-x86 systems? QEMU works perfectly fine on other architectures. >> -Nathan > > I am only supporting this on x86 systems, if there is someone who is > using this actively on ${ARCH} then I see no reason to enable it there. > > sean > But why restrict it? Tier-2 systems basically mean "no guarantees" and that's fine. But there doesn't seem to be any reason to make code platform-specific that is not inherently so. -Nathan From owner-svn-src-stable@FreeBSD.ORG Sat May 17 16:22:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C700F1C1; Sat, 17 May 2014 16:22:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B418721B1; Sat, 17 May 2014 16:22:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HGMPCp018638; Sat, 17 May 2014 16:22:25 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HGMPaE018637; Sat, 17 May 2014 16:22:25 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201405171622.s4HGMPaE018637@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 17 May 2014 16:22:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266324 - stable/9/lib/libc/gen X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 16:22:25 -0000 Author: kib Date: Sat May 17 16:22:25 2014 New Revision: 266324 URL: http://svnweb.freebsd.org/changeset/base/266324 Log: MFC r265845: Style. Modified: stable/9/lib/libc/gen/sem_new.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/gen/sem_new.c ============================================================================== --- stable/9/lib/libc/gen/sem_new.c Sat May 17 16:12:50 2014 (r266323) +++ stable/9/lib/libc/gen/sem_new.c Sat May 17 16:22:25 2014 (r266324) @@ -300,13 +300,13 @@ _sem_unlink(const char *name) return -1; } name++; - strcpy(path, SEM_PREFIX); if (strlcat(path, name, sizeof(path)) >= sizeof(path)) { errno = ENAMETOOLONG; return (-1); } - return unlink(path); + + return (unlink(path)); } int From owner-svn-src-stable@FreeBSD.ORG Sat May 17 16:27:00 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3827382; Sat, 17 May 2014 16:26:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E065721E4; Sat, 17 May 2014 16:26:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HGQx4l019298; Sat, 17 May 2014 16:26:59 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HGQx2X019297; Sat, 17 May 2014 16:26:59 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201405171626.s4HGQx2X019297@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 17 May 2014 16:26:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266325 - stable/9/lib/libc/gen X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 16:27:00 -0000 Author: kib Date: Sat May 17 16:26:59 2014 New Revision: 266325 URL: http://svnweb.freebsd.org/changeset/base/266325 Log: MFC r246872 (by davidxu): Simplify code by using flag O_EXLOCK. Modified: stable/9/lib/libc/gen/sem_new.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/gen/sem_new.c ============================================================================== --- stable/9/lib/libc/gen/sem_new.c Sat May 17 16:22:25 2014 (r266324) +++ stable/9/lib/libc/gen/sem_new.c Sat May 17 16:26:59 2014 (r266325) @@ -198,15 +198,11 @@ _sem_open(const char *name, int flags, . goto error; } - fd = _open(path, flags|O_RDWR|O_CLOEXEC, mode); + fd = _open(path, flags|O_RDWR|O_CLOEXEC|O_EXLOCK, mode); if (fd == -1) goto error; - if (flock(fd, LOCK_EX) == -1) + if (_fstat(fd, &sb)) goto error; - if (_fstat(fd, &sb)) { - flock(fd, LOCK_UN); - goto error; - } if (sb.st_size < sizeof(sem_t)) { sem_t tmp; @@ -214,10 +210,8 @@ _sem_open(const char *name, int flags, . tmp._kern._has_waiters = 0; tmp._kern._count = value; tmp._kern._flags = USYNC_PROCESS_SHARED | SEM_NAMED; - if (_write(fd, &tmp, sizeof(tmp)) != sizeof(tmp)) { - flock(fd, LOCK_UN); + if (_write(fd, &tmp, sizeof(tmp)) != sizeof(tmp)) goto error; - } } flock(fd, LOCK_UN); sem = (sem_t *)mmap(NULL, sizeof(sem_t), PROT_READ|PROT_WRITE, From owner-svn-src-stable@FreeBSD.ORG Sat May 17 16:28:29 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A716D4C1; Sat, 17 May 2014 16:28:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9418221EE; Sat, 17 May 2014 16:28:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HGSTMr019535; Sat, 17 May 2014 16:28:29 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HGST4L019534; Sat, 17 May 2014 16:28:29 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201405171628.s4HGST4L019534@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 17 May 2014 16:28:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266326 - stable/9/lib/libc/gen X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 16:28:29 -0000 Author: kib Date: Sat May 17 16:28:29 2014 New Revision: 266326 URL: http://svnweb.freebsd.org/changeset/base/266326 Log: MFC r246894 (by davidxu): Make more code be protected by internal mutex. Modified: stable/9/lib/libc/gen/sem_new.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/gen/sem_new.c ============================================================================== --- stable/9/lib/libc/gen/sem_new.c Sat May 17 16:26:59 2014 (r266325) +++ stable/9/lib/libc/gen/sem_new.c Sat May 17 16:28:29 2014 (r266326) @@ -229,18 +229,18 @@ _sem_open(const char *name, int flags, . ni->open_count = 1; ni->sem = sem; LIST_INSERT_HEAD(&sem_list, ni, next); - _pthread_mutex_unlock(&sem_llock); _close(fd); + _pthread_mutex_unlock(&sem_llock); return (sem); error: errsave = errno; - _pthread_mutex_unlock(&sem_llock); if (fd != -1) _close(fd); if (sem != NULL) munmap(sem, sizeof(sem_t)); free(ni); + _pthread_mutex_unlock(&sem_llock); errno = errsave; return (SEM_FAILED); } From owner-svn-src-stable@FreeBSD.ORG Sat May 17 16:29:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 366AA5FE; Sat, 17 May 2014 16:29:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1773921F7; Sat, 17 May 2014 16:29:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HGTd8w019724; Sat, 17 May 2014 16:29:39 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HGTdEN019723; Sat, 17 May 2014 16:29:39 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201405171629.s4HGTdEN019723@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 17 May 2014 16:29:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266327 - stable/9/lib/libc/gen X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 16:29:40 -0000 Author: kib Date: Sat May 17 16:29:39 2014 New Revision: 266327 URL: http://svnweb.freebsd.org/changeset/base/266327 Log: MFC r265847: Fix sem_unlink(3) to properly invalidate the semaphores name cache. PR: standards/189353 Modified: stable/9/lib/libc/gen/sem_new.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/gen/sem_new.c ============================================================================== --- stable/9/lib/libc/gen/sem_new.c Sat May 17 16:28:29 2014 (r266326) +++ stable/9/lib/libc/gen/sem_new.c Sat May 17 16:29:39 2014 (r266327) @@ -66,6 +66,8 @@ __weak_reference(_sem_wait, sem_wait); struct sem_nameinfo { int open_count; char *name; + dev_t dev; + ino_t ino; sem_t *sem; LIST_ENTRY(sem_nameinfo) next; }; @@ -151,37 +153,46 @@ _sem_open(const char *name, int flags, . return (SEM_FAILED); } name++; - + strcpy(path, SEM_PREFIX); + if (strlcat(path, name, sizeof(path)) >= sizeof(path)) { + errno = ENAMETOOLONG; + return (SEM_FAILED); + } if (flags & ~(O_CREAT|O_EXCL)) { errno = EINVAL; return (SEM_FAILED); } - + if ((flags & O_CREAT) != 0) { + va_start(ap, flags); + mode = va_arg(ap, int); + value = va_arg(ap, int); + va_end(ap); + } + fd = -1; _pthread_once(&once, sem_module_init); _pthread_mutex_lock(&sem_llock); LIST_FOREACH(ni, &sem_list, next) { - if (strcmp(name, ni->name) == 0) { - if ((flags & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL)) { - _pthread_mutex_unlock(&sem_llock); - errno = EEXIST; - return (SEM_FAILED); - } else { - ni->open_count++; - sem = ni->sem; - _pthread_mutex_unlock(&sem_llock); - return (sem); + if (ni->name != NULL && strcmp(name, ni->name) == 0) { + fd = _open(path, flags | O_RDWR | O_CLOEXEC | + O_EXLOCK, mode); + if (fd == -1 || _fstat(fd, &sb) == -1) + goto error; + if ((flags & (O_CREAT | O_EXCL)) == (O_CREAT | + O_EXCL) || ni->dev != sb.st_dev || + ni->ino != sb.st_ino) { + ni->name = NULL; + ni = NULL; + break; } + ni->open_count++; + sem = ni->sem; + _pthread_mutex_unlock(&sem_llock); + _close(fd); + return (sem); } } - if (flags & O_CREAT) { - va_start(ap, flags); - mode = va_arg(ap, int); - value = va_arg(ap, int); - va_end(ap); - } - len = sizeof(*ni) + strlen(name) + 1; ni = (struct sem_nameinfo *)malloc(len); if (ni == NULL) { @@ -192,17 +203,11 @@ _sem_open(const char *name, int flags, . ni->name = (char *)(ni+1); strcpy(ni->name, name); - strcpy(path, SEM_PREFIX); - if (strlcat(path, name, sizeof(path)) >= sizeof(path)) { - errno = ENAMETOOLONG; - goto error; + if (fd == -1) { + fd = _open(path, flags | O_RDWR | O_CLOEXEC | O_EXLOCK, mode); + if (fd == -1 || _fstat(fd, &sb) == -1) + goto error; } - - fd = _open(path, flags|O_RDWR|O_CLOEXEC|O_EXLOCK, mode); - if (fd == -1) - goto error; - if (_fstat(fd, &sb)) - goto error; if (sb.st_size < sizeof(sem_t)) { sem_t tmp; @@ -228,6 +233,8 @@ _sem_open(const char *name, int flags, . } ni->open_count = 1; ni->sem = sem; + ni->dev = sb.st_dev; + ni->ino = sb.st_ino; LIST_INSERT_HEAD(&sem_list, ni, next); _close(fd); _pthread_mutex_unlock(&sem_llock); From owner-svn-src-stable@FreeBSD.ORG Sat May 17 16:46:17 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE90917E; Sat, 17 May 2014 16:46:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DACFC23AC; Sat, 17 May 2014 16:46:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HGkHMC032280; Sat, 17 May 2014 16:46:17 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HGkGjM032266; Sat, 17 May 2014 16:46:16 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405171646.s4HGkGjM032266@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 16:46:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266328 - stable/10/sys/arm/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 16:46:18 -0000 Author: ian Date: Sat May 17 16:46:15 2014 New Revision: 266328 URL: http://svnweb.freebsd.org/changeset/base/266328 Log: MFC 263245: Make all the comments '# ' and align to same column. Modified: stable/10/sys/arm/conf/AC100 stable/10/sys/arm/conf/ARMADAXP stable/10/sys/arm/conf/ARNDALE stable/10/sys/arm/conf/ATMEL stable/10/sys/arm/conf/AVILA stable/10/sys/arm/conf/BEAGLEBONE stable/10/sys/arm/conf/BWCT stable/10/sys/arm/conf/CAMBRIA stable/10/sys/arm/conf/CNS11XXNAS stable/10/sys/arm/conf/CRB stable/10/sys/arm/conf/CUBIEBOARD stable/10/sys/arm/conf/CUBIEBOARD2 stable/10/sys/arm/conf/DB-78XXX stable/10/sys/arm/conf/DB-88F5XXX stable/10/sys/arm/conf/DB-88F6XXX stable/10/sys/arm/conf/DIGI-CCWMX53 stable/10/sys/arm/conf/DOCKSTAR stable/10/sys/arm/conf/DREAMPLUG-1001 stable/10/sys/arm/conf/EA3250 stable/10/sys/arm/conf/EB9200 stable/10/sys/arm/conf/EFIKA_MX stable/10/sys/arm/conf/EP80219 stable/10/sys/arm/conf/ETHERNUT5 stable/10/sys/arm/conf/GUMSTIX stable/10/sys/arm/conf/HL200 stable/10/sys/arm/conf/HL201 stable/10/sys/arm/conf/IMX53-QSB stable/10/sys/arm/conf/IMX6 stable/10/sys/arm/conf/IQ31244 stable/10/sys/arm/conf/KB920X stable/10/sys/arm/conf/LN2410SBC stable/10/sys/arm/conf/NSLU stable/10/sys/arm/conf/PANDABOARD stable/10/sys/arm/conf/QILA9G20 stable/10/sys/arm/conf/RADXA stable/10/sys/arm/conf/RPI-B stable/10/sys/arm/conf/SAM9260EK stable/10/sys/arm/conf/SAM9G20EK stable/10/sys/arm/conf/SAM9X25EK stable/10/sys/arm/conf/SHEEVAPLUG stable/10/sys/arm/conf/SN9G45 stable/10/sys/arm/conf/TS7800 stable/10/sys/arm/conf/VERSATILEPB stable/10/sys/arm/conf/VYBRID.common stable/10/sys/arm/conf/WANDBOARD.common stable/10/sys/arm/conf/ZEDBOARD Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/AC100 ============================================================================== --- stable/10/sys/arm/conf/AC100 Sat May 17 16:29:39 2014 (r266327) +++ stable/10/sys/arm/conf/AC100 Sat May 17 16:46:15 2014 (r266328) @@ -9,32 +9,32 @@ include "../tegra/std.tegra2" makeoptions MODULES_OVERRIDE="" -makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions WERROR="-Werror" -#options SCHED_ULE #ULE scheduler -options SCHED_4BSD #4BSD scheduler -options INET #InterNETworking -#options INET6 #IPv6 communications protocols -options FFS #Berkeley Fast Filesystem -#options NFSCL #Network Filesystem Client -#options NFSLOCKD #Network Lock Manager -#options NFS_ROOT #NFS usable as /, requires NFSCLIENT +#options SCHED_ULE # ULE scheduler +options SCHED_4BSD # 4BSD scheduler +options INET # InterNETworking +#options INET6 # IPv6 communications protocols +options FFS # Berkeley Fast Filesystem +#options NFSCL # Network Filesystem Client +#options NFSLOCKD # Network Lock Manager +#options NFS_ROOT # NFS usable as /, requires NFSCLIENT #options BOOTP #options BOOTP_NFSROOT #options BOOTP_NFSV3 #options BOOTP_WIRED_TO=mge0 -options TMPFS #Efficient memory filesystem -options GEOM_PART_BSD #BSD partition scheme -options GEOM_PART_MBR #MBR partition scheme +options TMPFS # Efficient memory filesystem +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme options GEOM_PART_GPT options ROOTDEVNAME=\"ufs:/dev/da0p1\" -options SYSVSHM #SYSV-style shared memory -options SYSVMSG #SYSV-style message queues -options SYSVSEM #SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions options MUTEX_NOINLINE options RWLOCK_NOINLINE options NO_FFS_SNAPSHOT @@ -48,8 +48,8 @@ options VERBOSE_SYSINIT options DDB options GDB options DIAGNOSTIC -options INVARIANTS #Enable calls of extra sanity checking -options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +options INVARIANTS # Enable calls of extra sanity checking +options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS options KDB options KDB_TRACE #options KTR @@ -57,8 +57,8 @@ options KDB_TRACE #options KTR_ENTRIES=16384 #options KTR_MASK=(KTR_SPARE2) #options KTR_COMPILE=KTR_ALL -options WITNESS #Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +options WITNESS # Enable checks to detect deadlocks and cycles +options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options WITNESS_KDB options MUTEX_DEBUG Modified: stable/10/sys/arm/conf/ARMADAXP ============================================================================== --- stable/10/sys/arm/conf/ARMADAXP Sat May 17 16:29:39 2014 (r266327) +++ stable/10/sys/arm/conf/ARMADAXP Sat May 17 16:46:15 2014 (r266328) @@ -10,32 +10,32 @@ include "../mv/armadaxp/std.mv78x60" options SOC_MV_ARMADAXP makeoptions MODULES_OVERRIDE="" -makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions WERROR="-Werror" -#options SCHED_ULE #ULE scheduler -options SCHED_4BSD #4BSD scheduler -options INET #InterNETworking -options INET6 #IPv6 communications protocols -options FFS #Berkeley Fast Filesystem -options NFSCL #Network Filesystem Client -options NFSLOCKD #Network Lock Manager -options NFS_ROOT #NFS usable as /, requires NFSCLIENT +#options SCHED_ULE # ULE scheduler +options SCHED_4BSD # 4BSD scheduler +options INET # InterNETworking +options INET6 # IPv6 communications protocols +options FFS # Berkeley Fast Filesystem +options NFSCL # Network Filesystem Client +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCLIENT options BOOTP options BOOTP_NFSROOT options BOOTP_NFSV3 options BOOTP_WIRED_TO=mge0 -options TMPFS #Efficient memory filesystem -options GEOM_PART_BSD #BSD partition scheme -options GEOM_PART_MBR #MBR partition scheme +options TMPFS # Efficient memory filesystem +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme options GEOM_PART_GPT options ROOTDEVNAME=\"ufs:/dev/da0p1\" -options SYSVSHM #SYSV-style shared memory -options SYSVMSG #SYSV-style message queues -options SYSVSEM #SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions options MUTEX_NOINLINE options RWLOCK_NOINLINE options NO_FFS_SNAPSHOT @@ -50,8 +50,8 @@ options ALT_BREAK_TO_DEBUGGER options DDB options GDB #options DIAGNOSTIC -#options INVARIANTS #Enable calls of extra sanity checking -#options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +#options INVARIANTS # Enable calls of extra sanity checking +#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS options KDB options KDB_TRACE #options KTR @@ -59,8 +59,8 @@ options KDB_TRACE #options KTR_ENTRIES=16384 #options KTR_MASK=(KTR_SPARE2) #options KTR_COMPILE=KTR_ALL -#options WITNESS #Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +#options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options WITNESS_KDB # Pseudo devices Modified: stable/10/sys/arm/conf/ARNDALE ============================================================================== --- stable/10/sys/arm/conf/ARNDALE Sat May 17 16:29:39 2014 (r266327) +++ stable/10/sys/arm/conf/ARNDALE Sat May 17 16:46:15 2014 (r266328) @@ -24,55 +24,55 @@ include "../samsung/exynos/std.exynos5" makeoptions MODULES_OVERRIDE="" makeoptions WITHOUT_MODULES="ahc" -makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions WERROR="-Werror" -options HZ=100 ## -options SCHED_4BSD #4BSD scheduler -options INET #InterNETworking -options INET6 #IPv6 communications protocols -options GEOM_PART_BSD #BSD partition scheme -options GEOM_PART_MBR #MBR partition scheme -options TMPFS #Efficient memory filesystem -options FFS #Berkeley Fast Filesystem +options HZ=100 +options SCHED_4BSD # 4BSD scheduler +options INET # InterNETworking +options INET6 # IPv6 communications protocols +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme +options TMPFS # Efficient memory filesystem +options FFS # Berkeley Fast Filesystem options SOFTUPDATES -options UFS_ACL #Support for access control lists -options UFS_DIRHASH #Improve performance on big directories -options MSDOSFS #MSDOS Filesystem -options CD9660 #ISO 9660 Filesystem -options PROCFS #Process filesystem (requires PSEUDOFS) -options PSEUDOFS #Pseudo-filesystem framework -options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!] -options SCSI_DELAY=5000 #Delay (in ms) before probing SCSI +options UFS_ACL # Support for access control lists +options UFS_DIRHASH # Improve performance on big directories +options MSDOSFS # MSDOS Filesystem +options CD9660 # ISO 9660 Filesystem +options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework +options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE -options SYSVSHM #SYSV-style shared memory -options SYSVMSG #SYSV-style message queues -options SYSVSEM #SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions options KBD_INSTALL_CDEV options PREEMPTION options FREEBSD_BOOT_LOADER -options VFP # vfp/neon +options VFP # vfp/neon # Debugging -makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options BREAK_TO_DEBUGGER -#options VERBOSE_SYSINIT #Enable verbose sysinit messages +#options VERBOSE_SYSINIT # Enable verbose sysinit messages options KDB -options DDB #Enable the kernel debugger -options INVARIANTS #Enable calls of extra sanity checking -options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS #Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +options DDB # Enable the kernel debugger +options INVARIANTS # Enable calls of extra sanity checking +options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed options DIAGNOSTIC # NFS support -options NFSCL #Network Filesystem Client -options NFSLOCKD #Network Lock Manager -options NFS_ROOT #NFS usable as /, requires NFSCLIENT +options NFSCL # Network Filesystem Client +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCLIENT # Uncomment this for NFS root -#options NFS_ROOT #NFS usable as /, requires NFSCL +#options NFS_ROOT # NFS usable as /, requires NFSCL #options BOOTP_NFSROOT #options BOOTP_COMPAT #options BOOTP Modified: stable/10/sys/arm/conf/ATMEL ============================================================================== --- stable/10/sys/arm/conf/ATMEL Sat May 17 16:29:39 2014 (r266327) +++ stable/10/sys/arm/conf/ATMEL Sat May 17 16:46:15 2014 (r266328) @@ -48,13 +48,13 @@ options NFSCL # New Network Filesyste options NFSD # New Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL -options TMPFS #Efficient memory filesystem +options TMPFS # Efficient memory filesystem options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework -options GEOM_PART_BSD #BSD partition scheme -options GEOM_PART_MBR #MBR partition scheme +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme options GEOM_PART_GPT # GUID Partition Tables. options GEOM_LABEL # Provides labelization options COMPAT_FREEBSD5 # Compatible with FreeBSD5 @@ -109,73 +109,73 @@ options GDB # Support remote GDB. # The `bpf' device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! # Note that 'bpf' is required for DHCP. -device bpf # Berkeley packet filter +device bpf # Berkeley packet filter # Ethernet -device mii # Minimal MII support -device ate # Atmel AT91 Ethernet friver +device mii # Minimal MII support +device ate # Atmel AT91 Ethernet friver # I2C -device at91_twi # Atmel AT91 Two-wire Interface -device iic # I2C generic I/O device driver -device iicbus # I2C bus system -device pcf8563 # NXP PCF8563 clock/calendar +device at91_twi # Atmel AT91 Two-wire Interface +device iic # I2C generic I/O device driver +device iicbus # I2C bus system +device pcf8563 # NXP PCF8563 clock/calendar # MMC/SD -device at91_mci # Atmel AT91 Multimedia Card Interface +device at91_mci # Atmel AT91 Multimedia Card Interface options AT91_MCI_HAS_4WIRE -device mmc # MMC/SD bus -device mmcsd # MMC/SD memory card +device mmc # MMC/SD bus +device mmcsd # MMC/SD memory card # DataFlash -device at91_spi # Atmel AT91 Serial Peripheral Interface -device spibus # SPI bus -device at45d # Atmel AT45D -device geom_map # GEOM partition mapping +device at91_spi # Atmel AT91 Serial Peripheral Interface +device spibus # SPI bus +device at45d # Atmel AT45D +device geom_map # GEOM partition mapping # Pseudo devices. -device loop # Network loopback -device random # Entropy device -device ether # Ethernet support -device vlan # 802.1Q VLAN support -device tun # Packet tunnel. -device md # Memory "disks" -device gif # IPv6 and IPv4 tunneling -device faith # IPv6-to-IPv4 relaying (translation) -#device firmware # firmware assist module +device loop # Network loopback +device random # Entropy device +device ether # Ethernet support +device vlan # 802.1Q VLAN support +device tun # Packet tunnel. +device md # Memory "disks" +device gif # IPv6 and IPv4 tunneling +device faith # IPv6-to-IPv4 relaying (translation) +#device firmware # firmware assist module # SCSI peripherals -device scbus # SCSI bus (required for ATA/SCSI) -device ch # SCSI media changers -device da # Direct Access (disks) -device sa # Sequential Access (tape etc) -device cd # CD -device pass # Passthrough device (direct ATA/SCSI access) -device ses # Enclosure Services (SES and SAF-TE) -#device ctl # CAM Target Layer +device scbus # SCSI bus (required for ATA/SCSI) +device ch # SCSI media changers +device da # Direct Access (disks) +device sa # Sequential Access (tape etc) +device cd # CD +device pass # Passthrough device (direct ATA/SCSI access) +device ses # Enclosure Services (SES and SAF-TE) +#device ctl # CAM Target Layer # Serial (COM) ports -device uart # Multi-uart driver +device uart # Multi-uart driver options ALT_BREAK_TO_DEBUGGER # USB support -options USB_DEBUG # enable debug msgs -device ohci # OHCI USB interface -device usb # USB Bus (required) -device umass # Disks/Mass storage - Requires scbus and da +options USB_DEBUG # enable debug msgs +device ohci # OHCI USB interface +device usb # USB Bus (required) +device umass # Disks/Mass storage - Requires scbus and da # USB device (gadget) support -device at91_dci # Atmel's usb device -device usfs # emulate a flash -device cdce # emulate an ethernet -device usb_template # Control of the gadget +device at91_dci # Atmel's usb device +device usfs # emulate a flash +device cdce # emulate an ethernet +device usb_template # Control of the gadget # watchdog -device at91_wdt # Atmel AT91 Watchdog Timer +device at91_wdt # Atmel AT91 Watchdog Timer device at91_rtc device at91_ssc -#device at91_tc # missing? +#device at91_tc # missing? # NAND Flash - Reference design has Samsung 256MB but others possible device nand # NAND interface on CS3 Modified: stable/10/sys/arm/conf/AVILA ============================================================================== --- stable/10/sys/arm/conf/AVILA Sat May 17 16:29:39 2014 (r266327) +++ stable/10/sys/arm/conf/AVILA Sat May 17 16:46:15 2014 (r266328) @@ -25,10 +25,10 @@ include "../xscale/ixp425/std.ixp425" include "../xscale/ixp425/std.avila" options XSCALE_CACHE_READ_WRITE_ALLOCATE #To statically compile in device wiring instead of /boot/device.hints -hints "AVILA.hints" #Default places to look for devices. +hints "AVILA.hints" # Default places to look for devices. makeoptions MODULES_OVERRIDE="" -makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions CONF_CFLAGS=-mcpu=xscale #options HZ=1000 options HZ=100 @@ -37,23 +37,23 @@ options DEVICE_POLLING # Debugging for use in -current options KDB #options GDB -options DDB #Enable the kernel debugger -#options DEADLKRES #Enable the deadlock resolver -options INVARIANTS #Enable calls of extra sanity checking -options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS #Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +options DDB # Enable the kernel debugger +#options DEADLKRES # Enable the deadlock resolver +options INVARIANTS # Enable calls of extra sanity checking +options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC -options SCHED_4BSD #4BSD scheduler -options INET #InterNETworking -options GEOM_PART_BSD #BSD partition scheme -options GEOM_PART_MBR #MBR partition scheme -options TMPFS #Efficient memory filesystem -options FFS #Berkeley Fast Filesystem -options SOFTUPDATES #Enable FFS soft updates support -options NFSCL #New Network Filesystem Client -options NFS_ROOT #NFS usable as /, requires NFSCL +options SCHED_4BSD # 4BSD scheduler +options INET # InterNETworking +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme +options TMPFS # Efficient memory filesystem +options FFS # Berkeley Fast Filesystem +options SOFTUPDATES # Enable FFS soft updates support +options NFSCL # New Network Filesystem Client +options NFS_ROOT # NFS usable as /, requires NFSCL options BOOTP options BOOTP_NFSROOT options BOOTP_NFSV3 @@ -73,34 +73,34 @@ device hwpmc device pci device uart -device ixpwdog # watchdog timer -device cfi # flash support -device cfid # flash disk support -device geom_redboot # redboot fis parser +device ixpwdog # watchdog timer +device cfi # flash support +device cfid # flash disk support +device geom_redboot # redboot fis parser # I2C Bus device iicbus device iicbb device iic -device ixpiic # I2C bus glue -device ds1672 # DS1672 on I2C bus -device ad7418 # AD7418 on I2C bus +device ixpiic # I2C bus glue +device ds1672 # DS1672 on I2C bus +device ad7418 # AD7418 on I2C bus device avila_led device gpio device gpioled -device avila_gpio # GPIO pins on J8 +device avila_gpio # GPIO pins on J8 device ata -device avila_ata # Gateworks CF/IDE support +device avila_ata # Gateworks CF/IDE support -device npe # Network Processing Engine +device npe # Network Processing Engine device npe_fw device firmware -device qmgr # Q Manager (required by npe) -device mii # NB: required by npe +device qmgr # Q Manager (required by npe) +device mii # NB: required by npe device ether device bpf @@ -108,24 +108,24 @@ device loop device if_bridge device md -device random # Entropy device +device random # Entropy device # Wireless NIC cards -device wlan # 802.11 support +device wlan # 802.11 support options IEEE80211_DEBUG options IEEE80211_SUPPORT_TDMA options IEEE80211_SUPPORT_MESH -device wlan_wep # 802.11 WEP support -device wlan_ccmp # 802.11 CCMP support -device wlan_tkip # 802.11 TKIP support +device wlan_wep # 802.11 WEP support +device wlan_ccmp # 802.11 CCMP support +device wlan_tkip # 802.11 TKIP support device wlan_xauth -device ath # Atheros NICs -device ath_pci # Atheros pci/cardbus glue +device ath # Atheros NICs +device ath_pci # Atheros pci/cardbus glue options ATH_DEBUG options ATH_DIAGAPI #options ATH_TX99_DIAG -device ath_rate_sample # SampleRate tx rate control for ath +device ath_rate_sample # SampleRate tx rate control for ath #options AH_DEBUG #options AH_ASSERT @@ -149,9 +149,9 @@ device usb device ohci device ehci device umass -device scbus # SCSI bus (required for ATA/SCSI) -device da # Direct Access (disks) -device pass # Passthrough device (direct ATA/SCSI access) +device scbus # SCSI bus (required for ATA/SCSI) +device da # Direct Access (disks) +device pass # Passthrough device (direct ATA/SCSI access) #device ural #device zyd Modified: stable/10/sys/arm/conf/BEAGLEBONE ============================================================================== --- stable/10/sys/arm/conf/BEAGLEBONE Sat May 17 16:29:39 2014 (r266327) +++ stable/10/sys/arm/conf/BEAGLEBONE Sat May 17 16:46:15 2014 (r266328) @@ -27,42 +27,42 @@ include "../ti/am335x/std.beaglebone" makeoptions WITHOUT_MODULES="ahc" options HZ=100 -options SCHED_4BSD #4BSD scheduler -options INET #InterNETworking -options INET6 #IPv6 communications protocols -options FFS #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 -options GEOM_PART_BSD #BSD partition scheme -options GEOM_PART_MBR #MBR partition scheme -options TMPFS #Efficient memory filesystem -options MSDOSFS #MSDOS Filesystem -options CD9660 #ISO 9660 Filesystem -options PROCFS #Process filesystem (requires PSEUDOFS) -options PSEUDOFS #Pseudo-filesystem framework -options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!] -options SCSI_DELAY=5000 #Delay (in ms) before probing SCSI -options KTRACE #ktrace(1) support -options SYSVSHM #SYSV-style shared memory -options SYSVMSG #SYSV-style message queues -options SYSVSEM #SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +options SCHED_4BSD # 4BSD scheduler +options INET # InterNETworking +options INET6 # IPv6 communications protocols +options FFS # 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 +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme +options TMPFS # Efficient memory filesystem +options MSDOSFS # MSDOS Filesystem +options CD9660 # ISO 9660 Filesystem +options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework +options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +options KTRACE # ktrace(1) support +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev options PREEMPTION options FREEBSD_BOOT_LOADER options VFP # vfp/neon # Debugging -makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options BREAK_TO_DEBUGGER -#options VERBOSE_SYSINIT #Enable verbose sysinit messages +#options VERBOSE_SYSINIT # Enable verbose sysinit messages options KDB -options DDB #Enable the kernel debugger -options INVARIANTS #Enable calls of extra sanity checking -options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS #Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +options DDB # Enable the kernel debugger +options INVARIANTS # Enable calls of extra sanity checking +options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +options WITNESS # Enable checks to detect deadlocks and cycles +options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC # NFS support @@ -71,7 +71,7 @@ options NFSCL options NFSLOCKD # Uncomment this for NFS root -#options NFS_ROOT #NFS usable as /, requires NFSCL +#options NFS_ROOT # NFS usable as /, requires NFSCL #options BOOTP_NFSROOT #options BOOTP_COMPAT #options BOOTP @@ -129,7 +129,7 @@ device miibus device axe # ASIX Electronics USB Ethernet # Device mode support and USFS template -device usb_template # Control of the gadget +device usb_template # Control of the gadget device usfs # Flattened Device Tree Modified: stable/10/sys/arm/conf/BWCT ============================================================================== --- stable/10/sys/arm/conf/BWCT Sat May 17 16:29:39 2014 (r266327) +++ stable/10/sys/arm/conf/BWCT Sat May 17 16:46:15 2014 (r266328) @@ -27,42 +27,42 @@ include "../at91/std.bwct" hints "BWCT.hints" makeoptions MODULES_OVERRIDE="" -#makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +#makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options DDB options KDB options BREAK_TO_DEBUGGER options ALT_BREAK_TO_DEBUGGER -options SCHED_4BSD #4BSD scheduler -options INET #InterNETworking -#options INET6 #IPv6 communications protocols -options FFS #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 -#options MD_ROOT #MD is a potential root device +options SCHED_4BSD # 4BSD scheduler +options INET # InterNETworking +#options INET6 # IPv6 communications protocols +options FFS # 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 +#options MD_ROOT # MD is a potential root device #options MD_ROOT_SIZE=4096 # 4MB ram disk #options ROOTDEVNAME=\"ufs:md0\" #options ROOTDEVNAME=\"ufs:/dev/mmcsd0s1a\" -options NFSCL #New Network Filesystem Client -#options NFSD #New Network Filesystem Server -#options NFSLOCKD #Network Lock Manager -options NFS_ROOT #NFS usable as /, requires NFSCL +options NFSCL # New Network Filesystem Client +#options NFSD # New Network Filesystem Server +#options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL options BOOTP_NFSROOT options BOOTP -options GEOM_PART_BSD #BSD partition scheme -options GEOM_PART_MBR #MBR partition scheme -options TMPFS #Efficient memory filesystem -#options MSDOSFS #MSDOS Filesystem -#options CD9660 #ISO 9660 Filesystem -#options PROCFS #Process filesystem (requires PSEUDOFS) -options PSEUDOFS #Pseudo-filesystem framework -#options SCSI_DELAY=5000 #Delay (in ms) before probing SCSI -#options KTRACE #ktrace(1) support -options SYSVSHM #SYSV-style shared memory -options SYSVMSG #SYSV-style message queues -options SYSVSEM #SYSV-style semaphores +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme +options TMPFS # Efficient memory filesystem +#options MSDOSFS # MSDOS Filesystem +#options CD9660 # ISO 9660 Filesystem +#options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework +#options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +#options KTRACE # ktrace(1) support +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions #options NO_SYSCTL_DESCR options MUTEX_NOINLINE @@ -79,11 +79,11 @@ device mii device rlswitch # Debugging for use in -current -#options DEADLKRES #Enable the deadlock resolver -#options INVARIANTS #Enable calls of extra sanity checking -#options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS #Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +#options DEADLKRES # Enable the deadlock resolver +#options INVARIANTS # Enable calls of extra sanity checking +#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC device md @@ -96,17 +96,17 @@ device mmcsd # mmc/sd flash cards # iic device iic device iicbus -device ds1672 # DS1672 on I2C bus +device ds1672 # DS1672 on I2C bus #device iicsmb # smb over i2c bridge #device smbus # Bus support, required for smb below. #device smb # SPI bus device spibus -#device at45d # at45db642 and maybe others +#device at45d # at45db642 and maybe others -device bpf # Berkeley packet filter +device bpf # Berkeley packet filter #options USB_DEBUG #device ohci #device usb -#device umass # Disks/Mass storage - Requires scbus and da +#device umass # Disks/Mass storage - Requires scbus and da Modified: stable/10/sys/arm/conf/CAMBRIA ============================================================================== --- stable/10/sys/arm/conf/CAMBRIA Sat May 17 16:29:39 2014 (r266327) +++ stable/10/sys/arm/conf/CAMBRIA Sat May 17 16:46:15 2014 (r266328) @@ -27,7 +27,7 @@ options XSCALE_CACHE_READ_WRITE_ALLOCAT #To statically compile in device wiring instead of /boot/device.hints hints "CAMBRIA.hints" # Default places to look for devices. -makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions CONF_CFLAGS=-mcpu=xscale makeoptions MODULES_OVERRIDE="" #options HZ=1000 @@ -37,24 +37,24 @@ options DEVICE_POLLING # Debugging for use in -current options KDB #options GDB -options DDB #Enable the kernel debugger -#options DEADLKRES #Enable the deadlock resolver -options INVARIANTS #Enable calls of extra sanity checking -options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS #Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +options DDB # Enable the kernel debugger +#options DEADLKRES # Enable the deadlock resolver +options INVARIANTS # Enable calls of extra sanity checking +options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC -options SCHED_4BSD #4BSD scheduler +options SCHED_4BSD # 4BSD scheduler #options PREEMPTION -options INET #InterNETworking -options GEOM_PART_BSD #BSD partition scheme -options GEOM_PART_MBR #MBR partition scheme -options TMPFS #Efficient memory filesystem -options FFS #Berkeley Fast Filesystem -options SOFTUPDATES #Enable FFS soft updates support -options NFSCL #New Network Filesystem Client -options NFS_ROOT #NFS usable as /, requires NFSCL +options INET # InterNETworking +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme +options TMPFS # Efficient memory filesystem +options FFS # Berkeley Fast Filesystem +options SOFTUPDATES # Enable FFS soft updates support +options NFSCL # New Network Filesystem Client +options NFS_ROOT # NFS usable as /, requires NFSCL options BOOTP options BOOTP_NFSROOT options BOOTP_NFSV3 @@ -73,37 +73,37 @@ options VERBOSE_INIT_ARM device pci device uart -device ixpwdog # watchdog timer +device ixpwdog # watchdog timer -options IXP4XX_FLASH_SIZE=0x02000000 # stock 2358 comes w/ 32M -device cfi # flash support -device cfid # flash disk support -device geom_redboot # redboot fis parser +options IXP4XX_FLASH_SIZE=0x02000000 # stock 2358 comes w/ 32M +device cfi # flash support +device cfid # flash disk support +device geom_redboot # redboot fis parser # I2C Bus device iicbus device iicbb device iic -device ixpiic # I2C bus glue -device ds1672 # DS1672 on I2C bus -device ad7418 # AD7418 on I2C bus +device ixpiic # I2C bus glue +device ds1672 # DS1672 on I2C bus +device ad7418 # AD7418 on I2C bus -device cambria_fled # Font Panel LED on I2C bus -device cambria_led # 8-LED latch +device cambria_fled # Font Panel LED on I2C bus +device cambria_led # 8-LED latch device gpio device gpioled -device cambria_gpio # GPIO pins on J11 +device cambria_gpio # GPIO pins on J11 device ata -device avila_ata # Gateworks CF/IDE support +device avila_ata # Gateworks CF/IDE support -device npe # Network Processing Engine +device npe # Network Processing Engine device npe_fw device firmware -device qmgr # Q Manager (required by npe) -device mii # NB: required by npe +device qmgr # Q Manager (required by npe) +device mii # NB: required by npe device ether device bpf @@ -111,26 +111,26 @@ device loop device if_bridge device md -device random # Entropy device +device random # Entropy device # Wireless NIC cards -device wlan # 802.11 support +device wlan # 802.11 support options IEEE80211_DEBUG options IEEE80211_SUPPORT_TDMA options IEEE80211_SUPPORT_MESH -device wlan_wep # 802.11 WEP support -device wlan_ccmp # 802.11 CCMP support -device wlan_tkip # 802.11 TKIP support +device wlan_wep # 802.11 WEP support +device wlan_ccmp # 802.11 CCMP support +device wlan_tkip # 802.11 TKIP support device wlan_xauth -device ath # Atheros NICs -device ath_pci # Atheros pci/cardbus glue +device ath # Atheros NICs +device ath_pci # Atheros pci/cardbus glue options ATH_DEBUG options ATH_DIAGAPI options ATH_ENABLE_DFS options ATH_ENABLE_11N #options ATH_TX99_DIAG -device ath_rate_sample # SampleRate tx rate control for ath +device ath_rate_sample # SampleRate tx rate control for ath options AH_DEBUG options AH_PRIVATE_DIAG @@ -139,13 +139,13 @@ device ath_hal # NB: 2 USB 2.0 ports standard device usb -options USB_EHCI_BIG_ENDIAN_DESC # handle big-endian byte order +options USB_EHCI_BIG_ENDIAN_DESC # handle big-endian byte order #options USB_DEBUG device ehci device umass -device scbus # SCSI bus (required for ATA/SCSI) -device da # Direct Access (disks) -device pass # Passthrough device (direct ATA/SCSI access) +device scbus # SCSI bus (required for ATA/SCSI) +device da # Direct Access (disks) +device pass # Passthrough device (direct ATA/SCSI access) #device ural #device zyd Modified: stable/10/sys/arm/conf/CNS11XXNAS ============================================================================== --- stable/10/sys/arm/conf/CNS11XXNAS Sat May 17 16:29:39 2014 (r266327) +++ stable/10/sys/arm/conf/CNS11XXNAS Sat May 17 16:46:15 2014 (r266328) @@ -22,7 +22,7 @@ ident CNS11XXNAS #options PHYSADDR=0x10000000 #options KERNPHYSADDR=0x10200000 -#options KERNVIRTADDR=0xc0200000 # Used in ldscript.arm +#options KERNVIRTADDR=0xc0200000 # Used in ldscript.arm #options FLASHADDR=0x50000000 #options LOADERRAMADDR=0x00000000 @@ -30,61 +30,61 @@ include "../econa/std.econa" makeoptions MODULES_OVERRIDE="" -makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options HZ=100 options DEVICE_POLLING # Debugging for use in -current options KDB #options GDB -options DDB #Enable the kernel debugger -#options DEADLKRES #Enable the deadlock resolver -#options INVARIANTS #Enable calls of extra sanity checking -#options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS #Enable checks to detect deadlocks and cycles -##options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +options DDB # Enable the kernel debugger +#options DEADLKRES # Enable the deadlock resolver +#options INVARIANTS # Enable calls of extra sanity checking +#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS # Enable checks to detect deadlocks and cycles +##options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC #options COMPAT_FREEBSD5 #options COMPAT_FREEBSD6 -#options COMPAT_FREEBSD7 +#options COMPAT_FREEBSD7n -options SCHED_ULE #ULE scheduler -#options SCHED_4BSD #4BSD scheduler -options GEOM_PART_BSD #BSD partition scheme -options GEOM_PART_MBR #MBR partition scheme +options SCHED_ULE # ULE scheduler +#options SCHED_4BSD # 4BSD scheduler +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme options GEOM_PART_GPT # GUID Partition Tables. #options GEOM_PART_EBR #options GEOM_PART_EBR_COMPAT options GEOM_LABEL # Provides labelization -options INET #InterNETworking -options INET6 #IPv6 communications protocols -options FFS #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 -options NFSCL #New Network Filesystem Client -#options NFSD #New Network Filesystem Server -#options NFSLOCKD #Network Lock Manager -options NFS_ROOT #NFS usable as /, requires NFSCL -options TMPFS #Efficient memory filesystem -options MSDOSFS #MSDOS Filesystem -#options CD9660 #ISO 9660 Filesystem -#options PROCFS #Process filesystem (requires PSEUDOFS) -options PSEUDOFS #Pseudo-filesystem framework -options SCSI_DELAY=5000 #Delay (in ms) before probing SCSI -options KTRACE #ktrace(1) support -options SYSVSHM #SYSV-style shared memory -options SYSVMSG #SYSV-style message queues -options SYSVSEM #SYSV-style semaphores +options INET # InterNETworking +options INET6 # IPv6 communications protocols +options FFS # 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 +options NFSCL # New Network Filesystem Client +#options NFSD # New Network Filesystem Server +#options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL +options TMPFS # Efficient memory filesystem +options MSDOSFS # MSDOS Filesystem +#options CD9660 # ISO 9660 Filesystem +#options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +options KTRACE # ktrace(1) support +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions -options MUTEX_NOINLINE #Mutex inlines are space hogs -options RWLOCK_NOINLINE #rwlock inlines are space hogs -options SX_NOINLINE #sx inliens are space hogs +options MUTEX_NOINLINE # Mutex inlines are space hogs +options RWLOCK_NOINLINE # rwlock inlines are space hogs +options SX_NOINLINE # sx inliens are space hogs #options BOOTP #options BOOTP_NFSROOT #options BOOTP_NFSV3 @@ -96,14 +96,14 @@ device uart device firmware -device mii # Minimal mii routines +device mii # Minimal mii routines device ether device bpf device loop device md -device random # Entropy device +device random # Entropy device *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat May 17 16:57:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5E9C8480; Sat, 17 May 2014 16:57:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4AC97246A; Sat, 17 May 2014 16:57:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HGvIdx039701; Sat, 17 May 2014 16:57:18 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HGvIZZ039698; Sat, 17 May 2014 16:57:18 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405171657.s4HGvIZZ039698@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 16:57:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266329 - in stable/10/sys: amd64/conf i386/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 16:57:18 -0000 Author: ian Date: Sat May 17 16:57:17 2014 New Revision: 266329 URL: http://svnweb.freebsd.org/changeset/base/266329 Log: MFC 263246: Align all comments in config files on same column. Modified: stable/10/sys/amd64/conf/GENERIC stable/10/sys/i386/conf/GENERIC Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/conf/GENERIC ============================================================================== --- stable/10/sys/amd64/conf/GENERIC Sat May 17 16:46:15 2014 (r266328) +++ stable/10/sys/amd64/conf/GENERIC Sat May 17 16:57:17 2014 (r266329) @@ -71,7 +71,7 @@ options MAC # TrustedBSD MAC Framewor options KDTRACE_FRAME # Ensure frames are compiled in options KDTRACE_HOOKS # Kernel DTrace hooks options DDB_CTF # Kernel ELF linker loads CTF data -options INCLUDE_CONFIG_FILE # Include this file in kernel +options INCLUDE_CONFIG_FILE # Include this file in kernel # Debugging support. Always need this: options KDB # Enable kernel debugger support. @@ -92,255 +92,255 @@ device pci device fdc # ATA controllers -device ahci # AHCI-compatible SATA controllers -device ata # Legacy ATA/SATA controllers -options ATA_STATIC_ID # Static device numbering -device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA -device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA +device ahci # AHCI-compatible SATA controllers +device ata # Legacy ATA/SATA controllers +options ATA_STATIC_ID # Static device numbering +device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA +device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA # SCSI Controllers -device ahc # AHA2940 and onboard AIC7xxx devices +device ahc # AHA2940 and onboard AIC7xxx devices options AHC_REG_PRETTY_PRINT # Print register bitfields in debug # output. Adds ~128k to driver. -device ahd # AHA39320/29320 and onboard AIC79xx devices +device ahd # AHA39320/29320 and onboard AIC79xx devices options AHD_REG_PRETTY_PRINT # Print register bitfields in debug # output. Adds ~215k to driver. -device esp # AMD Am53C974 (Tekram DC-390(T)) -device hptiop # Highpoint RocketRaid 3xxx series -device isp # Qlogic family -#device ispfw # Firmware for QLogic HBAs- normally a module -device mpt # LSI-Logic MPT-Fusion -device mps # LSI-Logic MPT-Fusion 2 -device mpr # LSI-Logic MPT-Fusion 3 -#device ncr # NCR/Symbios Logic -device sym # NCR/Symbios Logic (newer chipsets + those of `ncr') -device trm # Tekram DC395U/UW/F DC315U adapters - -device adv # Advansys SCSI adapters -device adw # Advansys wide SCSI adapters -device aic # Adaptec 15[012]x SCSI adapters, AIC-6[23]60. -device bt # Buslogic/Mylex MultiMaster SCSI adapters -device isci # Intel C600 SAS controller +device esp # AMD Am53C974 (Tekram DC-390(T)) +device hptiop # Highpoint RocketRaid 3xxx series +device isp # Qlogic family +#device ispfw # Firmware for QLogic HBAs- normally a module +device mpt # LSI-Logic MPT-Fusion +device mps # LSI-Logic MPT-Fusion 2 +device mpr # LSI-Logic MPT-Fusion 3 +#device ncr # NCR/Symbios Logic +device sym # NCR/Symbios Logic (newer chipsets + those of `ncr') +device trm # Tekram DC395U/UW/F DC315U adapters + +device adv # Advansys SCSI adapters +device adw # Advansys wide SCSI adapters +device aic # Adaptec 15[012]x SCSI adapters, AIC-6[23]60. +device bt # Buslogic/Mylex MultiMaster SCSI adapters +device isci # Intel C600 SAS controller # ATA/SCSI peripherals -device scbus # SCSI bus (required for ATA/SCSI) -device ch # SCSI media changers -device da # Direct Access (disks) -device sa # Sequential Access (tape etc) -device cd # CD -device pass # Passthrough device (direct ATA/SCSI access) -device ses # Enclosure Services (SES and SAF-TE) -#device ctl # CAM Target Layer +device scbus # SCSI bus (required for ATA/SCSI) +device ch # SCSI media changers +device da # Direct Access (disks) +device sa # Sequential Access (tape etc) +device cd # CD +device pass # Passthrough device (direct ATA/SCSI access) +device ses # Enclosure Services (SES and SAF-TE) +#device ctl # CAM Target Layer # RAID controllers interfaced to the SCSI subsystem -device amr # AMI MegaRAID -device arcmsr # Areca SATA II RAID +device amr # AMI MegaRAID +device arcmsr # Areca SATA II RAID #XXX it is not 64-bit clean, -scottl -#device asr # DPT SmartRAID V, VI and Adaptec SCSI RAID -device ciss # Compaq Smart RAID 5* -device dpt # DPT Smartcache III, IV - See NOTES for options -device hptmv # Highpoint RocketRAID 182x -device hptnr # Highpoint DC7280, R750 -device hptrr # Highpoint RocketRAID 17xx, 22xx, 23xx, 25xx -device hpt27xx # Highpoint RocketRAID 27xx -device iir # Intel Integrated RAID -device ips # IBM (Adaptec) ServeRAID -device mly # Mylex AcceleRAID/eXtremeRAID -device twa # 3ware 9000 series PATA/SATA RAID -device tws # LSI 3ware 9750 SATA+SAS 6Gb/s RAID controller +#device asr # DPT SmartRAID V, VI and Adaptec SCSI RAID +device ciss # Compaq Smart RAID 5* +device dpt # DPT Smartcache III, IV - See NOTES for options +device hptmv # Highpoint RocketRAID 182x +device hptnr # Highpoint DC7280, R750 +device hptrr # Highpoint RocketRAID 17xx, 22xx, 23xx, 25xx +device hpt27xx # Highpoint RocketRAID 27xx +device iir # Intel Integrated RAID +device ips # IBM (Adaptec) ServeRAID +device mly # Mylex AcceleRAID/eXtremeRAID +device twa # 3ware 9000 series PATA/SATA RAID +device tws # LSI 3ware 9750 SATA+SAS 6Gb/s RAID controller # RAID controllers -device aac # Adaptec FSA RAID -device aacp # SCSI passthrough for aac (requires CAM) -device aacraid # Adaptec by PMC RAID -device ida # Compaq Smart RAID -device mfi # LSI MegaRAID SAS -device mlx # Mylex DAC960 family +device aac # Adaptec FSA RAID +device aacp # SCSI passthrough for aac (requires CAM) +device aacraid # Adaptec by PMC RAID +device ida # Compaq Smart RAID +device mfi # LSI MegaRAID SAS +device mlx # Mylex DAC960 family #XXX pointer/int warnings -#device pst # Promise Supertrak SX6000 -device twe # 3ware ATA RAID +#device pst # Promise Supertrak SX6000 +device twe # 3ware ATA RAID # atkbdc0 controls both the keyboard and the PS/2 mouse -device atkbdc # AT keyboard controller -device atkbd # AT keyboard -device psm # PS/2 mouse +device atkbdc # AT keyboard controller +device atkbd # AT keyboard +device psm # PS/2 mouse -device kbdmux # keyboard multiplexer +device kbdmux # keyboard multiplexer -device vga # VGA video card driver -options VESA # Add support for VESA BIOS Extensions (VBE) +device vga # VGA video card driver +options VESA # Add support for VESA BIOS Extensions (VBE) -device splash # Splash screen and screen saver support +device splash # Splash screen and screen saver support # syscons is the default console driver, resembling an SCO console device sc -options SC_PIXEL_MODE # add support for the raster text mode +options SC_PIXEL_MODE # add support for the raster text mode -device agp # support several AGP chipsets +device agp # support several AGP chipsets # PCCARD (PCMCIA) support # PCMCIA and cardbus bridge support -device cbb # cardbus (yenta) bridge -device pccard # PC Card (16-bit) bus -device cardbus # CardBus (32-bit) bus +device cbb # cardbus (yenta) bridge +device pccard # PC Card (16-bit) bus +device cardbus # CardBus (32-bit) bus # Serial (COM) ports -device uart # Generic UART driver +device uart # Generic UART driver # Parallel port device ppc -device ppbus # Parallel port bus (required) -device lpt # Printer -device ppi # Parallel port interface device -#device vpo # Requires scbus and da +device ppbus # Parallel port bus (required) +device lpt # Printer +device ppi # Parallel port interface device +#device vpo # Requires scbus and da -device puc # Multi I/O cards and multi-channel UARTs +device puc # Multi I/O cards and multi-channel UARTs # PCI Ethernet NICs. -device bxe # Broadcom NetXtreme II BCM5771X/BCM578XX 10GbE -device de # DEC/Intel DC21x4x (``Tulip'') -device em # Intel PRO/1000 Gigabit Ethernet Family -device igb # Intel PRO/1000 PCIE Server Gigabit Family -device ixgbe # Intel PRO/10GbE PCIE Ethernet Family -device le # AMD Am7900 LANCE and Am79C9xx PCnet -device ti # Alteon Networks Tigon I/II gigabit Ethernet -device txp # 3Com 3cR990 (``Typhoon'') -device vx # 3Com 3c590, 3c595 (``Vortex'') +device bxe # Broadcom NetXtreme II BCM5771X/BCM578XX 10GbE +device de # DEC/Intel DC21x4x (``Tulip'') +device em # Intel PRO/1000 Gigabit Ethernet Family +device igb # Intel PRO/1000 PCIE Server Gigabit Family +device ixgbe # Intel PRO/10GbE PCIE Ethernet Family +device le # AMD Am7900 LANCE and Am79C9xx PCnet +device ti # Alteon Networks Tigon I/II gigabit Ethernet +device txp # 3Com 3cR990 (``Typhoon'') +device vx # 3Com 3c590, 3c595 (``Vortex'') # PCI Ethernet NICs that use the common MII bus controller code. # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! -device miibus # MII bus support -device ae # Attansic/Atheros L2 FastEthernet -device age # Attansic/Atheros L1 Gigabit Ethernet -device alc # Atheros AR8131/AR8132 Ethernet -device ale # Atheros AR8121/AR8113/AR8114 Ethernet -device bce # Broadcom BCM5706/BCM5708 Gigabit Ethernet -device bfe # Broadcom BCM440x 10/100 Ethernet -device bge # Broadcom BCM570xx Gigabit Ethernet -device cas # Sun Cassini/Cassini+ and NS DP83065 Saturn -device dc # DEC/Intel 21143 and various workalikes -device et # Agere ET1310 10/100/Gigabit Ethernet -device fxp # Intel EtherExpress PRO/100B (82557, 82558) -device gem # Sun GEM/Sun ERI/Apple GMAC -device hme # Sun HME (Happy Meal Ethernet) -device jme # JMicron JMC250 Gigabit/JMC260 Fast Ethernet -device lge # Level 1 LXT1001 gigabit Ethernet -device msk # Marvell/SysKonnect Yukon II Gigabit Ethernet -device nfe # nVidia nForce MCP on-board Ethernet -device nge # NatSemi DP83820 gigabit Ethernet -#device nve # nVidia nForce MCP on-board Ethernet Networking -device pcn # AMD Am79C97x PCI 10/100 (precedence over 'le') -device re # RealTek 8139C+/8169/8169S/8110S -device rl # RealTek 8129/8139 -device sf # Adaptec AIC-6915 (``Starfire'') -device sge # Silicon Integrated Systems SiS190/191 -device sis # Silicon Integrated Systems SiS 900/SiS 7016 -device sk # SysKonnect SK-984x & SK-982x gigabit Ethernet -device ste # Sundance ST201 (D-Link DFE-550TX) -device stge # Sundance/Tamarack TC9021 gigabit Ethernet -device tl # Texas Instruments ThunderLAN -device tx # SMC EtherPower II (83c170 ``EPIC'') -device vge # VIA VT612x gigabit Ethernet -device vr # VIA Rhine, Rhine II -device wb # Winbond W89C840F -device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'') +device miibus # MII bus support +device ae # Attansic/Atheros L2 FastEthernet +device age # Attansic/Atheros L1 Gigabit Ethernet +device alc # Atheros AR8131/AR8132 Ethernet +device ale # Atheros AR8121/AR8113/AR8114 Ethernet +device bce # Broadcom BCM5706/BCM5708 Gigabit Ethernet +device bfe # Broadcom BCM440x 10/100 Ethernet +device bge # Broadcom BCM570xx Gigabit Ethernet +device cas # Sun Cassini/Cassini+ and NS DP83065 Saturn +device dc # DEC/Intel 21143 and various workalikes +device et # Agere ET1310 10/100/Gigabit Ethernet +device fxp # Intel EtherExpress PRO/100B (82557, 82558) +device gem # Sun GEM/Sun ERI/Apple GMAC +device hme # Sun HME (Happy Meal Ethernet) +device jme # JMicron JMC250 Gigabit/JMC260 Fast Ethernet +device lge # Level 1 LXT1001 gigabit Ethernet +device msk # Marvell/SysKonnect Yukon II Gigabit Ethernet +device nfe # nVidia nForce MCP on-board Ethernet +device nge # NatSemi DP83820 gigabit Ethernet +#device nve # nVidia nForce MCP on-board Ethernet Networking +device pcn # AMD Am79C97x PCI 10/100 (precedence over 'le') +device re # RealTek 8139C+/8169/8169S/8110S +device rl # RealTek 8129/8139 +device sf # Adaptec AIC-6915 (``Starfire'') +device sge # Silicon Integrated Systems SiS190/191 +device sis # Silicon Integrated Systems SiS 900/SiS 7016 +device sk # SysKonnect SK-984x & SK-982x gigabit Ethernet +device ste # Sundance ST201 (D-Link DFE-550TX) +device stge # Sundance/Tamarack TC9021 gigabit Ethernet +device tl # Texas Instruments ThunderLAN +device tx # SMC EtherPower II (83c170 ``EPIC'') +device vge # VIA VT612x gigabit Ethernet +device vr # VIA Rhine, Rhine II +device wb # Winbond W89C840F +device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'') # ISA Ethernet NICs. pccard NICs included. -device cs # Crystal Semiconductor CS89x0 NIC +device cs # Crystal Semiconductor CS89x0 NIC # 'device ed' requires 'device miibus' -device ed # NE[12]000, SMC Ultra, 3c503, DS8390 cards -device ex # Intel EtherExpress Pro/10 and Pro/10+ -device ep # Etherlink III based cards -device fe # Fujitsu MB8696x based cards -device sn # SMC's 9000 series of Ethernet chips -device xe # Xircom pccard Ethernet +device ed # NE[12]000, SMC Ultra, 3c503, DS8390 cards +device ex # Intel EtherExpress Pro/10 and Pro/10+ +device ep # Etherlink III based cards +device fe # Fujitsu MB8696x based cards +device sn # SMC's 9000 series of Ethernet chips +device xe # Xircom pccard Ethernet # Wireless NIC cards -device wlan # 802.11 support -options IEEE80211_DEBUG # enable debug msgs -options IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's +device wlan # 802.11 support +options IEEE80211_DEBUG # enable debug msgs +options IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's options IEEE80211_SUPPORT_MESH # enable 802.11s draft support -device wlan_wep # 802.11 WEP support -device wlan_ccmp # 802.11 CCMP support -device wlan_tkip # 802.11 TKIP support -device wlan_amrr # AMRR transmit rate control algorithm -device an # Aironet 4500/4800 802.11 wireless NICs. -device ath # Atheros NICs -device ath_pci # Atheros pci/cardbus glue -device ath_hal # pci/cardbus chip support +device wlan_wep # 802.11 WEP support +device wlan_ccmp # 802.11 CCMP support +device wlan_tkip # 802.11 TKIP support +device wlan_amrr # AMRR transmit rate control algorithm +device an # Aironet 4500/4800 802.11 wireless NICs. +device ath # Atheros NICs +device ath_pci # Atheros pci/cardbus glue +device ath_hal # pci/cardbus chip support options AH_SUPPORT_AR5416 # enable AR5416 tx/rx descriptors -options AH_AR5416_INTERRUPT_MITIGATION # AR5416 interrupt mitigation -options ATH_ENABLE_11N # Enable 802.11n support for AR5416 and later -device ath_rate_sample # SampleRate tx rate control for ath -#device bwi # Broadcom BCM430x/BCM431x wireless NICs. -#device bwn # Broadcom BCM43xx wireless NICs. -device ipw # Intel 2100 wireless NICs. -device iwi # Intel 2200BG/2225BG/2915ABG wireless NICs. -device iwn # Intel 4965/1000/5000/6000 wireless NICs. -device malo # Marvell Libertas wireless NICs. -device mwl # Marvell 88W8363 802.11n wireless NICs. -device ral # Ralink Technology RT2500 wireless NICs. -device wi # WaveLAN/Intersil/Symbol 802.11 wireless NICs. -device wpi # Intel 3945ABG wireless NICs. +options AH_AR5416_INTERRUPT_MITIGATION # AR5416 interrupt mitigation +options ATH_ENABLE_11N # Enable 802.11n support for AR5416 and later +device ath_rate_sample # SampleRate tx rate control for ath +#device bwi # Broadcom BCM430x/BCM431x wireless NICs. +#device bwn # Broadcom BCM43xx wireless NICs. +device ipw # Intel 2100 wireless NICs. +device iwi # Intel 2200BG/2225BG/2915ABG wireless NICs. +device iwn # Intel 4965/1000/5000/6000 wireless NICs. +device malo # Marvell Libertas wireless NICs. +device mwl # Marvell 88W8363 802.11n wireless NICs. +device ral # Ralink Technology RT2500 wireless NICs. +device wi # WaveLAN/Intersil/Symbol 802.11 wireless NICs. +device wpi # Intel 3945ABG wireless NICs. # Pseudo devices. -device loop # Network loopback -device random # Entropy device -device padlock_rng # VIA Padlock RNG -device rdrand_rng # Intel Bull Mountain RNG -device ether # Ethernet support -device vlan # 802.1Q VLAN support -device tun # Packet tunnel. -device md # Memory "disks" -device gif # IPv6 and IPv4 tunneling -device faith # IPv6-to-IPv4 relaying (translation) -device firmware # firmware assist module +device loop # Network loopback +device random # Entropy device +device padlock_rng # VIA Padlock RNG +device rdrand_rng # Intel Bull Mountain RNG +device ether # Ethernet support +device vlan # 802.1Q VLAN support +device tun # Packet tunnel. +device md # Memory "disks" +device gif # IPv6 and IPv4 tunneling +device faith # IPv6-to-IPv4 relaying (translation) +device firmware # firmware assist module # The `bpf' device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! # Note that 'bpf' is required for DHCP. -device bpf # Berkeley packet filter +device bpf # Berkeley packet filter # USB support -options USB_DEBUG # enable debug msgs -device uhci # UHCI PCI->USB interface -device ohci # OHCI PCI->USB interface -device ehci # EHCI PCI->USB interface (USB 2.0) -device xhci # XHCI PCI->USB interface (USB 3.0) -device usb # USB Bus (required) -device ukbd # Keyboard -device umass # Disks/Mass storage - Requires scbus and da +options USB_DEBUG # enable debug msgs +device uhci # UHCI PCI->USB interface +device ohci # OHCI PCI->USB interface +device ehci # EHCI PCI->USB interface (USB 2.0) +device xhci # XHCI PCI->USB interface (USB 3.0) +device usb # USB Bus (required) +device ukbd # Keyboard +device umass # Disks/Mass storage - Requires scbus and da # Sound support -device sound # Generic sound driver (required) -device snd_cmi # CMedia CMI8338/CMI8738 -device snd_csa # Crystal Semiconductor CS461x/428x -device snd_emu10kx # Creative SoundBlaster Live! and Audigy -device snd_es137x # Ensoniq AudioPCI ES137x -device snd_hda # Intel High Definition Audio -device snd_ich # Intel, NVidia and other ICH AC'97 Audio -device snd_via8233 # VIA VT8233x Audio +device sound # Generic sound driver (required) +device snd_cmi # CMedia CMI8338/CMI8738 +device snd_csa # Crystal Semiconductor CS461x/428x +device snd_emu10kx # Creative SoundBlaster Live! and Audigy +device snd_es137x # Ensoniq AudioPCI ES137x +device snd_hda # Intel High Definition Audio +device snd_ich # Intel, NVidia and other ICH AC'97 Audio +device snd_via8233 # VIA VT8233x Audio # MMC/SD -device mmc # MMC/SD bus -device mmcsd # MMC/SD memory card -device sdhci # Generic PCI SD Host Controller +device mmc # MMC/SD bus +device mmcsd # MMC/SD memory card +device sdhci # Generic PCI SD Host Controller # VirtIO support -device virtio # Generic VirtIO bus (required) -device virtio_pci # VirtIO PCI device -device vtnet # VirtIO Ethernet device -device virtio_blk # VirtIO Block device -device virtio_scsi # VirtIO SCSI device -device virtio_balloon # VirtIO Memory Balloon device +device virtio # Generic VirtIO bus (required) +device virtio_pci # VirtIO PCI device +device vtnet # VirtIO Ethernet device +device virtio_blk # VirtIO Block device +device virtio_scsi # VirtIO SCSI device +device virtio_balloon # VirtIO Memory Balloon device # HyperV drivers -device hyperv # HyperV drivers +device hyperv # HyperV drivers # Xen HVM Guest Optimizations # NOTE: XENHVM depends on xenpci. They must be added or removed together. -options XENHVM # Xen HVM kernel infrastructure -device xenpci # Xen HVM Hypervisor services driver +options XENHVM # Xen HVM kernel infrastructure +device xenpci # Xen HVM Hypervisor services driver # VMware support -device vmx # VMware VMXNET3 Ethernet +device vmx # VMware VMXNET3 Ethernet Modified: stable/10/sys/i386/conf/GENERIC ============================================================================== --- stable/10/sys/i386/conf/GENERIC Sat May 17 16:46:15 2014 (r266328) +++ stable/10/sys/i386/conf/GENERIC Sat May 17 16:57:17 2014 (r266329) @@ -71,7 +71,7 @@ options PROCDESC # Support for process options MAC # TrustedBSD MAC Framework options KDTRACE_HOOKS # Kernel DTrace hooks options DDB_CTF # Kernel ELF linker loads CTF data -options INCLUDE_CONFIG_FILE # Include this file in kernel +options INCLUDE_CONFIG_FILE # Include this file in kernel # Debugging support. Always need this: options KDB # Enable kernel debugger support. @@ -93,95 +93,95 @@ device pci device fdc # ATA controllers -device ahci # AHCI-compatible SATA controllers -device ata # Legacy ATA/SATA controllers -options ATA_STATIC_ID # Static device numbering -device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA -device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA +device ahci # AHCI-compatible SATA controllers +device ata # Legacy ATA/SATA controllers +options ATA_STATIC_ID # Static device numbering +device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA +device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA # SCSI Controllers -device ahb # EISA AHA1742 family -device ahc # AHA2940 and onboard AIC7xxx devices +device ahb # EISA AHA1742 family +device ahc # AHA2940 and onboard AIC7xxx devices options AHC_REG_PRETTY_PRINT # Print register bitfields in debug # output. Adds ~128k to driver. -device ahd # AHA39320/29320 and onboard AIC79xx devices +device ahd # AHA39320/29320 and onboard AIC79xx devices options AHD_REG_PRETTY_PRINT # Print register bitfields in debug # output. Adds ~215k to driver. -device esp # AMD Am53C974 (Tekram DC-390(T)) -device hptiop # Highpoint RocketRaid 3xxx series -device isp # Qlogic family -#device ispfw # Firmware for QLogic HBAs- normally a module -device mpt # LSI-Logic MPT-Fusion -device mps # LSI-Logic MPT-Fusion 2 -device mpr # LSI-Logic MPT-Fusion 3 -#device ncr # NCR/Symbios Logic -device sym # NCR/Symbios Logic (newer chipsets + those of `ncr') -device trm # Tekram DC395U/UW/F DC315U adapters - -device adv # Advansys SCSI adapters -device adw # Advansys wide SCSI adapters -device aha # Adaptec 154x SCSI adapters -device aic # Adaptec 15[012]x SCSI adapters, AIC-6[23]60. -device bt # Buslogic/Mylex MultiMaster SCSI adapters - -device ncv # NCR 53C500 -device nsp # Workbit Ninja SCSI-3 -device stg # TMC 18C30/18C50 -device isci # Intel C600 SAS controller +device esp # AMD Am53C974 (Tekram DC-390(T)) +device hptiop # Highpoint RocketRaid 3xxx series +device isp # Qlogic family +#device ispfw # Firmware for QLogic HBAs- normally a module +device mpt # LSI-Logic MPT-Fusion +device mps # LSI-Logic MPT-Fusion 2 +device mpr # LSI-Logic MPT-Fusion 3 +#device ncr # NCR/Symbios Logic +device sym # NCR/Symbios Logic (newer chipsets + those of `ncr') +device trm # Tekram DC395U/UW/F DC315U adapters + +device adv # Advansys SCSI adapters +device adw # Advansys wide SCSI adapters +device aha # Adaptec 154x SCSI adapters +device aic # Adaptec 15[012]x SCSI adapters, AIC-6[23]60. +device bt # Buslogic/Mylex MultiMaster SCSI adapters + +device ncv # NCR 53C500 +device nsp # Workbit Ninja SCSI-3 +device stg # TMC 18C30/18C50 +device isci # Intel C600 SAS controller # ATA/SCSI peripherals -device scbus # SCSI bus (required for ATA/SCSI) -device ch # SCSI media changers -device da # Direct Access (disks) -device sa # Sequential Access (tape etc) -device cd # CD -device pass # Passthrough device (direct ATA/SCSI access) -device ses # Enclosure Services (SES and SAF-TE) -#device ctl # CAM Target Layer +device scbus # SCSI bus (required for ATA/SCSI) +device ch # SCSI media changers +device da # Direct Access (disks) +device sa # Sequential Access (tape etc) +device cd # CD +device pass # Passthrough device (direct ATA/SCSI access) +device ses # Enclosure Services (SES and SAF-TE) +#device ctl # CAM Target Layer # RAID controllers interfaced to the SCSI subsystem -device amr # AMI MegaRAID -device arcmsr # Areca SATA II RAID -device asr # DPT SmartRAID V, VI and Adaptec SCSI RAID -device ciss # Compaq Smart RAID 5* -device dpt # DPT Smartcache III, IV - See NOTES for options -device hptmv # Highpoint RocketRAID 182x -device hptnr # Highpoint DC7280, R750 -device hptrr # Highpoint RocketRAID 17xx, 22xx, 23xx, 25xx -device hpt27xx # Highpoint RocketRAID 27xx -device iir # Intel Integrated RAID -device ips # IBM (Adaptec) ServeRAID -device mly # Mylex AcceleRAID/eXtremeRAID -device twa # 3ware 9000 series PATA/SATA RAID -device tws # LSI 3ware 9750 SATA+SAS 6Gb/s RAID controller +device amr # AMI MegaRAID +device arcmsr # Areca SATA II RAID +device asr # DPT SmartRAID V, VI and Adaptec SCSI RAID +device ciss # Compaq Smart RAID 5* +device dpt # DPT Smartcache III, IV - See NOTES for options +device hptmv # Highpoint RocketRAID 182x +device hptnr # Highpoint DC7280, R750 +device hptrr # Highpoint RocketRAID 17xx, 22xx, 23xx, 25xx +device hpt27xx # Highpoint RocketRAID 27xx +device iir # Intel Integrated RAID +device ips # IBM (Adaptec) ServeRAID +device mly # Mylex AcceleRAID/eXtremeRAID +device twa # 3ware 9000 series PATA/SATA RAID +device tws # LSI 3ware 9750 SATA+SAS 6Gb/s RAID controller # RAID controllers -device aac # Adaptec FSA RAID -device aacp # SCSI passthrough for aac (requires CAM) -device aacraid # Adaptec by PMC RAID -device ida # Compaq Smart RAID -device mfi # LSI MegaRAID SAS -device mlx # Mylex DAC960 family -device pst # Promise Supertrak SX6000 -device twe # 3ware ATA RAID +device aac # Adaptec FSA RAID +device aacp # SCSI passthrough for aac (requires CAM) +device aacraid # Adaptec by PMC RAID +device ida # Compaq Smart RAID +device mfi # LSI MegaRAID SAS +device mlx # Mylex DAC960 family +device pst # Promise Supertrak SX6000 +device twe # 3ware ATA RAID # atkbdc0 controls both the keyboard and the PS/2 mouse -device atkbdc # AT keyboard controller -device atkbd # AT keyboard -device psm # PS/2 mouse +device atkbdc # AT keyboard controller +device atkbd # AT keyboard +device psm # PS/2 mouse -device kbdmux # keyboard multiplexer +device kbdmux # keyboard multiplexer -device vga # VGA video card driver -options VESA # Add support for VESA BIOS Extensions (VBE) +device vga # VGA video card driver +options VESA # Add support for VESA BIOS Extensions (VBE) -device splash # Splash screen and screen saver support +device splash # Splash screen and screen saver support # syscons is the default console driver, resembling an SCO console device sc -options SC_PIXEL_MODE # add support for the raster text mode +options SC_PIXEL_MODE # add support for the raster text mode -device agp # support several AGP chipsets +device agp # support several AGP chipsets # Power management support (see NOTES for more options) #device apm @@ -190,170 +190,170 @@ device pmtimer # PCCARD (PCMCIA) support # PCMCIA and cardbus bridge support -device cbb # cardbus (yenta) bridge -device pccard # PC Card (16-bit) bus -device cardbus # CardBus (32-bit) bus +device cbb # cardbus (yenta) bridge +device pccard # PC Card (16-bit) bus +device cardbus # CardBus (32-bit) bus # Serial (COM) ports -device uart # Generic UART driver +device uart # Generic UART driver # Parallel port device ppc -device ppbus # Parallel port bus (required) -device lpt # Printer -device ppi # Parallel port interface device -#device vpo # Requires scbus and da +device ppbus # Parallel port bus (required) +device lpt # Printer +device ppi # Parallel port interface device +#device vpo # Requires scbus and da -device puc # Multi I/O cards and multi-channel UARTs +device puc # Multi I/O cards and multi-channel UARTs # PCI Ethernet NICs. -device bxe # Broadcom NetXtreme II BCM5771X/BCM578XX 10GbE -device de # DEC/Intel DC21x4x (``Tulip'') -device em # Intel PRO/1000 Gigabit Ethernet Family -device igb # Intel PRO/1000 PCIE Server Gigabit Family -device ixgb # Intel PRO/10GbE Ethernet Card -device le # AMD Am7900 LANCE and Am79C9xx PCnet -device ti # Alteon Networks Tigon I/II gigabit Ethernet -device txp # 3Com 3cR990 (``Typhoon'') -device vx # 3Com 3c590, 3c595 (``Vortex'') +device bxe # Broadcom NetXtreme II BCM5771X/BCM578XX 10GbE +device de # DEC/Intel DC21x4x (``Tulip'') +device em # Intel PRO/1000 Gigabit Ethernet Family +device igb # Intel PRO/1000 PCIE Server Gigabit Family +device ixgb # Intel PRO/10GbE Ethernet Card +device le # AMD Am7900 LANCE and Am79C9xx PCnet +device ti # Alteon Networks Tigon I/II gigabit Ethernet +device txp # 3Com 3cR990 (``Typhoon'') +device vx # 3Com 3c590, 3c595 (``Vortex'') # PCI Ethernet NICs that use the common MII bus controller code. # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! -device miibus # MII bus support -device ae # Attansic/Atheros L2 FastEthernet -device age # Attansic/Atheros L1 Gigabit Ethernet -device alc # Atheros AR8131/AR8132 Ethernet -device ale # Atheros AR8121/AR8113/AR8114 Ethernet -device bce # Broadcom BCM5706/BCM5708 Gigabit Ethernet -device bfe # Broadcom BCM440x 10/100 Ethernet -device bge # Broadcom BCM570xx Gigabit Ethernet -device cas # Sun Cassini/Cassini+ and NS DP83065 Saturn -device dc # DEC/Intel 21143 and various workalikes -device et # Agere ET1310 10/100/Gigabit Ethernet -device fxp # Intel EtherExpress PRO/100B (82557, 82558) -device gem # Sun GEM/Sun ERI/Apple GMAC -device hme # Sun HME (Happy Meal Ethernet) -device jme # JMicron JMC250 Gigabit/JMC260 Fast Ethernet -device lge # Level 1 LXT1001 gigabit Ethernet -device msk # Marvell/SysKonnect Yukon II Gigabit Ethernet -device nfe # nVidia nForce MCP on-board Ethernet -device nge # NatSemi DP83820 gigabit Ethernet -#device nve # nVidia nForce MCP on-board Ethernet Networking -device pcn # AMD Am79C97x PCI 10/100 (precedence over 'le') -device re # RealTek 8139C+/8169/8169S/8110S -device rl # RealTek 8129/8139 -device sf # Adaptec AIC-6915 (``Starfire'') -device sge # Silicon Integrated Systems SiS190/191 -device sis # Silicon Integrated Systems SiS 900/SiS 7016 -device sk # SysKonnect SK-984x & SK-982x gigabit Ethernet -device ste # Sundance ST201 (D-Link DFE-550TX) -device stge # Sundance/Tamarack TC9021 gigabit Ethernet -device tl # Texas Instruments ThunderLAN -device tx # SMC EtherPower II (83c170 ``EPIC'') -device vge # VIA VT612x gigabit Ethernet -device vr # VIA Rhine, Rhine II -device vte # DM&P Vortex86 RDC R6040 Fast Ethernet -device wb # Winbond W89C840F -device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'') +device miibus # MII bus support +device ae # Attansic/Atheros L2 FastEthernet +device age # Attansic/Atheros L1 Gigabit Ethernet +device alc # Atheros AR8131/AR8132 Ethernet +device ale # Atheros AR8121/AR8113/AR8114 Ethernet +device bce # Broadcom BCM5706/BCM5708 Gigabit Ethernet +device bfe # Broadcom BCM440x 10/100 Ethernet +device bge # Broadcom BCM570xx Gigabit Ethernet +device cas # Sun Cassini/Cassini+ and NS DP83065 Saturn +device dc # DEC/Intel 21143 and various workalikes +device et # Agere ET1310 10/100/Gigabit Ethernet +device fxp # Intel EtherExpress PRO/100B (82557, 82558) +device gem # Sun GEM/Sun ERI/Apple GMAC +device hme # Sun HME (Happy Meal Ethernet) +device jme # JMicron JMC250 Gigabit/JMC260 Fast Ethernet +device lge # Level 1 LXT1001 gigabit Ethernet +device msk # Marvell/SysKonnect Yukon II Gigabit Ethernet +device nfe # nVidia nForce MCP on-board Ethernet +device nge # NatSemi DP83820 gigabit Ethernet +#device nve # nVidia nForce MCP on-board Ethernet Networking +device pcn # AMD Am79C97x PCI 10/100 (precedence over 'le') +device re # RealTek 8139C+/8169/8169S/8110S +device rl # RealTek 8129/8139 +device sf # Adaptec AIC-6915 (``Starfire'') +device sge # Silicon Integrated Systems SiS190/191 +device sis # Silicon Integrated Systems SiS 900/SiS 7016 +device sk # SysKonnect SK-984x & SK-982x gigabit Ethernet +device ste # Sundance ST201 (D-Link DFE-550TX) +device stge # Sundance/Tamarack TC9021 gigabit Ethernet +device tl # Texas Instruments ThunderLAN +device tx # SMC EtherPower II (83c170 ``EPIC'') +device vge # VIA VT612x gigabit Ethernet +device vr # VIA Rhine, Rhine II +device vte # DM&P Vortex86 RDC R6040 Fast Ethernet +device wb # Winbond W89C840F +device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'') # ISA Ethernet NICs. pccard NICs included. -device cs # Crystal Semiconductor CS89x0 NIC +device cs # Crystal Semiconductor CS89x0 NIC # 'device ed' requires 'device miibus' -device ed # NE[12]000, SMC Ultra, 3c503, DS8390 cards -device ex # Intel EtherExpress Pro/10 and Pro/10+ -device ep # Etherlink III based cards -device fe # Fujitsu MB8696x based cards -device ie # EtherExpress 8/16, 3C507, StarLAN 10 etc. -device sn # SMC's 9000 series of Ethernet chips -device xe # Xircom pccard Ethernet +device ed # NE[12]000, SMC Ultra, 3c503, DS8390 cards +device ex # Intel EtherExpress Pro/10 and Pro/10+ +device ep # Etherlink III based cards +device fe # Fujitsu MB8696x based cards +device ie # EtherExpress 8/16, 3C507, StarLAN 10 etc. +device sn # SMC's 9000 series of Ethernet chips +device xe # Xircom pccard Ethernet # Wireless NIC cards -device wlan # 802.11 support -options IEEE80211_DEBUG # enable debug msgs -options IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's +device wlan # 802.11 support +options IEEE80211_DEBUG # enable debug msgs +options IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's options IEEE80211_SUPPORT_MESH # enable 802.11s draft support -device wlan_wep # 802.11 WEP support -device wlan_ccmp # 802.11 CCMP support -device wlan_tkip # 802.11 TKIP support -device wlan_amrr # AMRR transmit rate control algorithm -device an # Aironet 4500/4800 802.11 wireless NICs. -device ath # Atheros NICs -device ath_pci # Atheros pci/cardbus glue -device ath_hal # pci/cardbus chip support +device wlan_wep # 802.11 WEP support +device wlan_ccmp # 802.11 CCMP support +device wlan_tkip # 802.11 TKIP support +device wlan_amrr # AMRR transmit rate control algorithm +device an # Aironet 4500/4800 802.11 wireless NICs. +device ath # Atheros NICs +device ath_pci # Atheros pci/cardbus glue +device ath_hal # pci/cardbus chip support options AH_SUPPORT_AR5416 # enable AR5416 tx/rx descriptors -options AH_AR5416_INTERRUPT_MITIGATION # AR5416 interrupt mitigation -options ATH_ENABLE_11N # Enable 802.11n support for AR5416 and later -device ath_rate_sample # SampleRate tx rate control for ath -#device bwi # Broadcom BCM430x/BCM431x wireless NICs. -#device bwn # Broadcom BCM43xx wireless NICs. -device ipw # Intel 2100 wireless NICs. -device iwi # Intel 2200BG/2225BG/2915ABG wireless NICs. -device iwn # Intel 4965/1000/5000/6000 wireless NICs. -device malo # Marvell Libertas wireless NICs. -device mwl # Marvell 88W8363 802.11n wireless NICs. -device ral # Ralink Technology RT2500 wireless NICs. -device wi # WaveLAN/Intersil/Symbol 802.11 wireless NICs. -#device wl # Older non 802.11 Wavelan wireless NIC. -device wpi # Intel 3945ABG wireless NICs. +options AH_AR5416_INTERRUPT_MITIGATION # AR5416 interrupt mitigation +options ATH_ENABLE_11N # Enable 802.11n support for AR5416 and later +device ath_rate_sample # SampleRate tx rate control for ath +#device bwi # Broadcom BCM430x/BCM431x wireless NICs. +#device bwn # Broadcom BCM43xx wireless NICs. +device ipw # Intel 2100 wireless NICs. +device iwi # Intel 2200BG/2225BG/2915ABG wireless NICs. +device iwn # Intel 4965/1000/5000/6000 wireless NICs. +device malo # Marvell Libertas wireless NICs. +device mwl # Marvell 88W8363 802.11n wireless NICs. +device ral # Ralink Technology RT2500 wireless NICs. +device wi # WaveLAN/Intersil/Symbol 802.11 wireless NICs. +#device wl # Older non 802.11 Wavelan wireless NIC. +device wpi # Intel 3945ABG wireless NICs. # Pseudo devices. -device loop # Network loopback -device random # Entropy device -device padlock_rng # VIA Padlock RNG -device rdrand_rng # Intel Bull Mountain RNG -device ether # Ethernet support -device vlan # 802.1Q VLAN support -device tun # Packet tunnel. -device md # Memory "disks" -device gif # IPv6 and IPv4 tunneling -device faith # IPv6-to-IPv4 relaying (translation) -device firmware # firmware assist module +device loop # Network loopback +device random # Entropy device +device padlock_rng # VIA Padlock RNG +device rdrand_rng # Intel Bull Mountain RNG +device ether # Ethernet support +device vlan # 802.1Q VLAN support +device tun # Packet tunnel. +device md # Memory "disks" +device gif # IPv6 and IPv4 tunneling +device faith # IPv6-to-IPv4 relaying (translation) +device firmware # firmware assist module # The `bpf' device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! # Note that 'bpf' is required for DHCP. -device bpf # Berkeley packet filter +device bpf # Berkeley packet filter # USB support -options USB_DEBUG # enable debug msgs -device uhci # UHCI PCI->USB interface -device ohci # OHCI PCI->USB interface -device ehci # EHCI PCI->USB interface (USB 2.0) -device xhci # XHCI PCI->USB interface (USB 3.0) -device usb # USB Bus (required) -device ukbd # Keyboard -device umass # Disks/Mass storage - Requires scbus and da +options USB_DEBUG # enable debug msgs +device uhci # UHCI PCI->USB interface +device ohci # OHCI PCI->USB interface +device ehci # EHCI PCI->USB interface (USB 2.0) +device xhci # XHCI PCI->USB interface (USB 3.0) +device usb # USB Bus (required) +device ukbd # Keyboard +device umass # Disks/Mass storage - Requires scbus and da # Sound support -device sound # Generic sound driver (required) -device snd_cmi # CMedia CMI8338/CMI8738 -device snd_csa # Crystal Semiconductor CS461x/428x -device snd_emu10kx # Creative SoundBlaster Live! and Audigy -device snd_es137x # Ensoniq AudioPCI ES137x -device snd_hda # Intel High Definition Audio -device snd_ich # Intel, NVidia and other ICH AC'97 Audio -device snd_via8233 # VIA VT8233x Audio +device sound # Generic sound driver (required) +device snd_cmi # CMedia CMI8338/CMI8738 +device snd_csa # Crystal Semiconductor CS461x/428x +device snd_emu10kx # Creative SoundBlaster Live! and Audigy +device snd_es137x # Ensoniq AudioPCI ES137x +device snd_hda # Intel High Definition Audio +device snd_ich # Intel, NVidia and other ICH AC'97 Audio +device snd_via8233 # VIA VT8233x Audio # MMC/SD -device mmc # MMC/SD bus -device mmcsd # MMC/SD memory card -device sdhci # Generic PCI SD Host Controller +device mmc # MMC/SD bus +device mmcsd # MMC/SD memory card +device sdhci # Generic PCI SD Host Controller # VirtIO support -device virtio # Generic VirtIO bus (required) -device virtio_pci # VirtIO PCI device -device vtnet # VirtIO Ethernet device -device virtio_blk # VirtIO Block device -device virtio_scsi # VirtIO SCSI device -device virtio_balloon # VirtIO Memory Balloon device +device virtio # Generic VirtIO bus (required) +device virtio_pci # VirtIO PCI device +device vtnet # VirtIO Ethernet device +device virtio_blk # VirtIO Block device +device virtio_scsi # VirtIO SCSI device +device virtio_balloon # VirtIO Memory Balloon device # HyperV drivers -device hyperv # HyperV drivers +device hyperv # HyperV drivers # Xen HVM Guest Optimizations # NOTE: XENHVM depends on xenpci. They must be added or removed together. -options XENHVM # Xen HVM kernel infrastructure -device xenpci # Xen HVM Hypervisor services driver +options XENHVM # Xen HVM kernel infrastructure +device xenpci # Xen HVM Hypervisor services driver # VMware support -device vmx # VMware VMXNET3 Ethernet +device vmx # VMware VMXNET3 Ethernet From owner-svn-src-stable@FreeBSD.ORG Sat May 17 17:18:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 615E7EB8; Sat, 17 May 2014 17:18:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3462A2607; Sat, 17 May 2014 17:18:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HHIaT1053073; Sat, 17 May 2014 17:18:36 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HHIZSB053069; Sat, 17 May 2014 17:18:35 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405171718.s4HHIZSB053069@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 17:18:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266330 - in stable/10/sys: kern powerpc/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 17:18:36 -0000 Author: ian Date: Sat May 17 17:18:35 2014 New Revision: 266330 URL: http://svnweb.freebsd.org/changeset/base/266330 Log: MFC 261357, 261358, 261421: Enable SCHED_ULE for ppc book-e. Add driver for the ADT7460/ADT7467 fan controller found in later PowerBooks and iBooks. Modified: stable/10/sys/kern/sched_ule.c stable/10/sys/powerpc/conf/GENERIC stable/10/sys/powerpc/conf/MPC85XX Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/sched_ule.c ============================================================================== --- stable/10/sys/kern/sched_ule.c Sat May 17 16:57:17 2014 (r266329) +++ stable/10/sys/kern/sched_ule.c Sat May 17 17:18:35 2014 (r266330) @@ -77,10 +77,6 @@ dtrace_vtime_switch_func_t dtrace_vtime_ #include #include -#if defined(__powerpc__) && defined(BOOKE_E500) -#error "This architecture is not currently compatible with ULE" -#endif - #define KTR_ULE 0 #define TS_NAME_LEN (MAXCOMLEN + sizeof(" td ") + sizeof(__XSTRING(UINT_MAX))) Modified: stable/10/sys/powerpc/conf/GENERIC ============================================================================== --- stable/10/sys/powerpc/conf/GENERIC Sat May 17 16:57:17 2014 (r266329) +++ stable/10/sys/powerpc/conf/GENERIC Sat May 17 17:18:35 2014 (r266330) @@ -126,6 +126,11 @@ device scc device uart device uart_z8530 +# FireWire support +device firewire # FireWire bus code +device sbp # SCSI over FireWire (Requires scbus and da) +device fwe # Ethernet over FireWire (non-standard!) + # PCI Ethernet NICs that use the common MII bus controller code. device miibus # MII bus support device bge # Broadcom BCM570xx Gigabit Ethernet Modified: stable/10/sys/powerpc/conf/MPC85XX ============================================================================== --- stable/10/sys/powerpc/conf/MPC85XX Sat May 17 16:57:17 2014 (r266329) +++ stable/10/sys/powerpc/conf/MPC85XX Sat May 17 17:18:35 2014 (r266330) @@ -48,7 +48,9 @@ options NFSCL options NFSLOCKD options PROCFS options PSEUDOFS -options SCHED_4BSD +options SCHED_ULE +options CAPABILITIES +options CAPABILITY_MODE options SMP options SYSVMSG options SYSVSEM @@ -64,6 +66,7 @@ device cryptodev device da device ds1553 device em +device alc device ether device fxp device iic From owner-svn-src-stable@FreeBSD.ORG Sat May 17 17:34:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C815C270; Sat, 17 May 2014 17:34:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B34BE2779; Sat, 17 May 2014 17:34:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HHYnjN064686; Sat, 17 May 2014 17:34:49 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HHYchx064603; Sat, 17 May 2014 17:34:38 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405171734.s4HHYchx064603@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 17:34:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266331 - in stable/10/sys: amd64/conf arm/conf i386/conf ia64/conf mips/conf powerpc/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 17:34:49 -0000 Author: ian Date: Sat May 17 17:34:37 2014 New Revision: 266331 URL: http://svnweb.freebsd.org/changeset/base/266331 Log: MFC 263301 In kernel config files, it is supposed to be 'options' not 'options', per long standing (but recently not so strictly enforced) convention. Modified: stable/10/sys/amd64/conf/NOTES stable/10/sys/arm/conf/AC100 stable/10/sys/arm/conf/ARMADAXP stable/10/sys/arm/conf/ARNDALE stable/10/sys/arm/conf/ATMEL stable/10/sys/arm/conf/AVILA stable/10/sys/arm/conf/BEAGLEBONE stable/10/sys/arm/conf/BWCT stable/10/sys/arm/conf/CAMBRIA stable/10/sys/arm/conf/CNS11XXNAS stable/10/sys/arm/conf/COLIBRI-VF50 stable/10/sys/arm/conf/COSMIC stable/10/sys/arm/conf/CRB stable/10/sys/arm/conf/CUBIEBOARD stable/10/sys/arm/conf/CUBIEBOARD2 stable/10/sys/arm/conf/DB-78XXX stable/10/sys/arm/conf/DB-88F5XXX stable/10/sys/arm/conf/DB-88F6XXX stable/10/sys/arm/conf/DIGI-CCWMX53 stable/10/sys/arm/conf/DOCKSTAR stable/10/sys/arm/conf/DREAMPLUG-1001 stable/10/sys/arm/conf/EA3250 stable/10/sys/arm/conf/EB9200 stable/10/sys/arm/conf/EFIKA_MX stable/10/sys/arm/conf/EP80219 stable/10/sys/arm/conf/ETHERNUT5 stable/10/sys/arm/conf/GUMSTIX stable/10/sys/arm/conf/HL200 stable/10/sys/arm/conf/HL201 stable/10/sys/arm/conf/IMX53-QSB stable/10/sys/arm/conf/IMX6 stable/10/sys/arm/conf/IQ31244 stable/10/sys/arm/conf/KB920X stable/10/sys/arm/conf/LN2410SBC stable/10/sys/arm/conf/NSLU stable/10/sys/arm/conf/PANDABOARD stable/10/sys/arm/conf/QILA9G20 stable/10/sys/arm/conf/QUARTZ stable/10/sys/arm/conf/RADXA stable/10/sys/arm/conf/RPI-B stable/10/sys/arm/conf/SAM9260EK stable/10/sys/arm/conf/SAM9G20EK stable/10/sys/arm/conf/SAM9X25EK stable/10/sys/arm/conf/SHEEVAPLUG stable/10/sys/arm/conf/SN9G45 stable/10/sys/arm/conf/TS7800 stable/10/sys/arm/conf/VERSATILEPB stable/10/sys/arm/conf/VYBRID.common stable/10/sys/arm/conf/WANDBOARD.common stable/10/sys/arm/conf/ZEDBOARD stable/10/sys/i386/conf/NOTES stable/10/sys/i386/conf/XEN stable/10/sys/ia64/conf/GENERIC stable/10/sys/mips/conf/ALCHEMY stable/10/sys/mips/conf/AP121 stable/10/sys/mips/conf/AP91 stable/10/sys/mips/conf/AP93 stable/10/sys/mips/conf/AP94 stable/10/sys/mips/conf/AP96 stable/10/sys/mips/conf/AR71XX_BASE stable/10/sys/mips/conf/AR724X_BASE stable/10/sys/mips/conf/AR91XX_BASE stable/10/sys/mips/conf/AR933X_BASE stable/10/sys/mips/conf/AR934X_BASE stable/10/sys/mips/conf/CARAMBOLA2 stable/10/sys/mips/conf/ENH200 stable/10/sys/mips/conf/PB47 stable/10/sys/mips/conf/PB92 stable/10/sys/mips/conf/PICOSTATION_M2HP stable/10/sys/mips/conf/ROUTERSTATION stable/10/sys/mips/conf/ROUTERSTATION_MFS stable/10/sys/mips/conf/RSPRO stable/10/sys/mips/conf/RSPRO_MFS stable/10/sys/mips/conf/RSPRO_STANDALONE stable/10/sys/mips/conf/RT305X stable/10/sys/mips/conf/SENTRY5 stable/10/sys/mips/conf/SWARM64_SMP stable/10/sys/mips/conf/SWARM_SMP stable/10/sys/mips/conf/TP-WN1043ND stable/10/sys/mips/conf/WZR-300HP stable/10/sys/mips/conf/XLRN32 stable/10/sys/mips/conf/std.SWARM stable/10/sys/mips/conf/std.XLP stable/10/sys/powerpc/conf/GENERIC stable/10/sys/powerpc/conf/GENERIC64 stable/10/sys/powerpc/conf/MPC85XX stable/10/sys/powerpc/conf/NOTES Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/conf/NOTES ============================================================================== --- stable/10/sys/amd64/conf/NOTES Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/amd64/conf/NOTES Sat May 17 17:34:37 2014 (r266331) @@ -187,7 +187,7 @@ options VESA_DEBUG device dpms # DPMS suspend & resume via VESA BIOS # x86 real mode BIOS emulator, required by atkbdc/dpms/vesa -options X86BIOS +options X86BIOS # # Optional devices: @@ -442,7 +442,7 @@ device ips # # Intel C600 (Patsburg) integrated SAS controller device isci -options ISCI_LOGGING # enable debugging in isci HAL +options ISCI_LOGGING # enable debugging in isci HAL # # NVM Express (NVMe) support Modified: stable/10/sys/arm/conf/AC100 ============================================================================== --- stable/10/sys/arm/conf/AC100 Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/AC100 Sat May 17 17:34:37 2014 (r266331) @@ -25,7 +25,7 @@ options FFS # Berkeley Fast Filesyste #options BOOTP_NFSV3 #options BOOTP_WIRED_TO=mge0 -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme options GEOM_PART_GPT Modified: stable/10/sys/arm/conf/ARMADAXP ============================================================================== --- stable/10/sys/arm/conf/ARMADAXP Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/ARMADAXP Sat May 17 17:34:37 2014 (r266331) @@ -26,7 +26,7 @@ options BOOTP_NFSROOT options BOOTP_NFSV3 options BOOTP_WIRED_TO=mge0 -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme options GEOM_PART_GPT Modified: stable/10/sys/arm/conf/ARNDALE ============================================================================== --- stable/10/sys/arm/conf/ARNDALE Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/ARNDALE Sat May 17 17:34:37 2014 (r266331) @@ -27,49 +27,49 @@ makeoptions WITHOUT_MODULES="ahc" makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions WERROR="-Werror" -options HZ=100 -options SCHED_4BSD # 4BSD scheduler -options INET # InterNETworking -options INET6 # IPv6 communications protocols +options HZ=100 +options SCHED_4BSD # 4BSD scheduler +options INET # InterNETworking +options INET6 # IPv6 communications protocols options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem -options FFS # Berkeley Fast Filesystem -options SOFTUPDATES -options UFS_ACL # Support for access control lists -options UFS_DIRHASH # Improve performance on big directories -options MSDOSFS # MSDOS Filesystem -options CD9660 # ISO 9660 Filesystem -options PROCFS # Process filesystem (requires PSEUDOFS) -options PSEUDOFS # Pseudo-filesystem framework -options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] -options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI -options KTRACE -options SYSVSHM # SYSV-style shared memory -options SYSVMSG # SYSV-style message queues -options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions -options KBD_INSTALL_CDEV -options PREEMPTION -options FREEBSD_BOOT_LOADER +options TMPFS # Efficient memory filesystem +options FFS # Berkeley Fast Filesystem +options SOFTUPDATES +options UFS_ACL # Support for access control lists +options UFS_DIRHASH # Improve performance on big directories +options MSDOSFS # MSDOS Filesystem +options CD9660 # ISO 9660 Filesystem +options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework +options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +options KTRACE +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions +options KBD_INSTALL_CDEV +options PREEMPTION +options FREEBSD_BOOT_LOADER options VFP # vfp/neon # Debugging makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options BREAK_TO_DEBUGGER +options BREAK_TO_DEBUGGER #options VERBOSE_SYSINIT # Enable verbose sysinit messages -options KDB -options DDB # Enable the kernel debugger -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +options KDB +options DDB # Enable the kernel debugger +options INVARIANTS # Enable calls of extra sanity checking +options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS # Enable checks to detect deadlocks and cycles #options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -options DIAGNOSTIC +options DIAGNOSTIC # NFS support -options NFSCL # Network Filesystem Client -options NFSLOCKD # Network Lock Manager -options NFS_ROOT # NFS usable as /, requires NFSCLIENT +options NFSCL # Network Filesystem Client +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCLIENT # Uncomment this for NFS root #options NFS_ROOT # NFS usable as /, requires NFSCL @@ -83,7 +83,7 @@ device mmc # mmc/sd bus device mmcsd # mmc/sd flash cards device sdhci # generic sdhci -options ROOTDEVNAME=\"ufs:/dev/da0\" +options ROOTDEVNAME=\"ufs:/dev/da0\" #options SMP @@ -98,7 +98,7 @@ device gpio # USB support options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. device usb -options USB_DEBUG +options USB_DEBUG #options USB_REQ_DEBUG #options USB_VERBOSE #device musb @@ -134,6 +134,6 @@ device axe # ASIX Electronics USB Eth device bpf # Berkeley packet filter #FDT -options FDT -options FDT_DTB_STATIC +options FDT +options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=exynos5250-arndale.dts Modified: stable/10/sys/arm/conf/ATMEL ============================================================================== --- stable/10/sys/arm/conf/ATMEL Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/ATMEL Sat May 17 17:34:37 2014 (r266331) @@ -48,7 +48,7 @@ options NFSCL # New Network Filesyste options NFSD # New Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) Modified: stable/10/sys/arm/conf/AVILA ============================================================================== --- stable/10/sys/arm/conf/AVILA Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/AVILA Sat May 17 17:34:37 2014 (r266331) @@ -49,7 +49,7 @@ options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options NFSCL # New Network Filesystem Client Modified: stable/10/sys/arm/conf/BEAGLEBONE ============================================================================== --- stable/10/sys/arm/conf/BEAGLEBONE Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/BEAGLEBONE Sat May 17 17:34:37 2014 (r266331) @@ -36,7 +36,7 @@ options UFS_ACL # Support for access options UFS_DIRHASH # Improve performance on big directories options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) Modified: stable/10/sys/arm/conf/BWCT ============================================================================== --- stable/10/sys/arm/conf/BWCT Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/BWCT Sat May 17 17:34:37 2014 (r266331) @@ -53,7 +53,7 @@ options BOOTP options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem #options MSDOSFS # MSDOS Filesystem #options CD9660 # ISO 9660 Filesystem #options PROCFS # Process filesystem (requires PSEUDOFS) Modified: stable/10/sys/arm/conf/CAMBRIA ============================================================================== --- stable/10/sys/arm/conf/CAMBRIA Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/CAMBRIA Sat May 17 17:34:37 2014 (r266331) @@ -50,7 +50,7 @@ options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options NFSCL # New Network Filesystem Client Modified: stable/10/sys/arm/conf/CNS11XXNAS ============================================================================== --- stable/10/sys/arm/conf/CNS11XXNAS Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/CNS11XXNAS Sat May 17 17:34:37 2014 (r266331) @@ -71,7 +71,7 @@ options NFSCL # New Network Filesyste #options NFSD # New Network Filesystem Server #options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem options MSDOSFS # MSDOS Filesystem #options CD9660 # ISO 9660 Filesystem #options PROCFS # Process filesystem (requires PSEUDOFS) Modified: stable/10/sys/arm/conf/COLIBRI-VF50 ============================================================================== --- stable/10/sys/arm/conf/COLIBRI-VF50 Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/COLIBRI-VF50 Sat May 17 17:34:37 2014 (r266331) @@ -21,6 +21,6 @@ include "VYBRID.common" ident COLIBRI-VF50 #FDT -options FDT -options FDT_DTB_STATIC +options FDT +options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=vybrid-colibri-vf50.dts Modified: stable/10/sys/arm/conf/COSMIC ============================================================================== --- stable/10/sys/arm/conf/COSMIC Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/COSMIC Sat May 17 17:34:37 2014 (r266331) @@ -21,6 +21,6 @@ include "VYBRID.common" ident COSMIC #FDT -options FDT -options FDT_DTB_STATIC +options FDT +options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=vybrid-cosmic.dts Modified: stable/10/sys/arm/conf/CRB ============================================================================== --- stable/10/sys/arm/conf/CRB Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/CRB Sat May 17 17:34:37 2014 (r266331) @@ -47,7 +47,7 @@ options NFS_ROOT # NFS usable as /, re #options MSDOSFS # MSDOS Filesystem options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem options CD9660 # ISO 9660 Filesystem #options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework Modified: stable/10/sys/arm/conf/CUBIEBOARD ============================================================================== --- stable/10/sys/arm/conf/CUBIEBOARD Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/CUBIEBOARD Sat May 17 17:34:37 2014 (r266331) @@ -31,7 +31,7 @@ options INET # InterNETworking options INET6 # IPv6 communications protocols options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists @@ -82,7 +82,7 @@ options WITNESS_SKIPSPIN # Don't run wi #device mmcsd # mmc/sd flash cards # Boot device is 2nd slice on MMC/SD card -options ROOTDEVNAME=\"ufs:/dev/da0s2\" +options ROOTDEVNAME=\"ufs:/dev/da0s2\" # ATA controllers #device ahci # AHCI-compatible SATA controllers @@ -134,7 +134,7 @@ device emac device miibus # Flattened Device Tree -options FDT -options FDT_DTB_STATIC +options FDT +options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=cubieboard.dts Modified: stable/10/sys/arm/conf/CUBIEBOARD2 ============================================================================== --- stable/10/sys/arm/conf/CUBIEBOARD2 Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/CUBIEBOARD2 Sat May 17 17:34:37 2014 (r266331) @@ -31,7 +31,7 @@ options INET # InterNETworking options INET6 # IPv6 communications protocols options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists Modified: stable/10/sys/arm/conf/DB-78XXX ============================================================================== --- stable/10/sys/arm/conf/DB-78XXX Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/DB-78XXX Sat May 17 17:34:37 2014 (r266331) @@ -18,7 +18,7 @@ options INET # InterNETworking options INET6 # IPv6 communications protocols options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem options FFS # Berkeley Fast Filesystem options NANDFS # NAND Filesystem options NFSCL # New Network Filesystem Client Modified: stable/10/sys/arm/conf/DB-88F5XXX ============================================================================== --- stable/10/sys/arm/conf/DB-88F5XXX Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/DB-88F5XXX Sat May 17 17:34:37 2014 (r266331) @@ -18,7 +18,7 @@ options INET # InterNETworking options INET6 # IPv6 communications protocols options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem options FFS # Berkeley Fast Filesystem options NFSCL # New Network Filesystem Client options NFSLOCKD # Network Lock Manager Modified: stable/10/sys/arm/conf/DB-88F6XXX ============================================================================== --- stable/10/sys/arm/conf/DB-88F6XXX Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/DB-88F6XXX Sat May 17 17:34:37 2014 (r266331) @@ -18,7 +18,7 @@ options INET # InterNETworking options INET6 # IPv6 communications protocols options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem options FFS # Berkeley Fast Filesystem options NANDFS # NAND Filesystem options NFSCL # New Network Filesystem Client Modified: stable/10/sys/arm/conf/DIGI-CCWMX53 ============================================================================== --- stable/10/sys/arm/conf/DIGI-CCWMX53 Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/DIGI-CCWMX53 Sat May 17 17:34:37 2014 (r266331) @@ -41,7 +41,7 @@ options NFSCL # New Network Filesyste #options NFSD # New Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem #options PROCFS # Process filesystem (requires PSEUDOFS) Modified: stable/10/sys/arm/conf/DOCKSTAR ============================================================================== --- stable/10/sys/arm/conf/DOCKSTAR Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/DOCKSTAR Sat May 17 17:34:37 2014 (r266331) @@ -34,7 +34,7 @@ options INET6 # IPv6 communications p options SOFTUPDATES options CD9660 # ISO 9660 filesystem options FFS # Berkeley Fast Filesystem -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem options MSDOSFS # MS DOS File System (FAT, FAT32) options NULLFS # NULL filesystem options SYSVSHM # SYSV-style shared memory Modified: stable/10/sys/arm/conf/DREAMPLUG-1001 ============================================================================== --- stable/10/sys/arm/conf/DREAMPLUG-1001 Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/DREAMPLUG-1001 Sat May 17 17:34:37 2014 (r266331) @@ -35,7 +35,7 @@ options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking options INET6 # IPv6 communications protocols options SOFTUPDATES -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem options CD9660 # ISO 9660 filesystem options FFS # Berkeley Fast Filesystem options MSDOSFS # MS DOS File System (FAT, FAT32) Modified: stable/10/sys/arm/conf/EA3250 ============================================================================== --- stable/10/sys/arm/conf/EA3250 Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/EA3250 Sat May 17 17:34:37 2014 (r266331) @@ -22,7 +22,7 @@ options NFSLOCKD # Network Lock Manage options NFS_ROOT # NFS usable as /, requires NFSCLIENT options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem options MSDOSFS options BOOTP options BOOTP_NFSROOT Modified: stable/10/sys/arm/conf/EB9200 ============================================================================== --- stable/10/sys/arm/conf/EB9200 Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/EB9200 Sat May 17 17:34:37 2014 (r266331) @@ -43,7 +43,7 @@ options BOOTP options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem #options MSDOSFS # MSDOS Filesystem #options CD9660 # ISO 9660 Filesystem #options PROCFS # Process filesystem (requires PSEUDOFS) Modified: stable/10/sys/arm/conf/EFIKA_MX ============================================================================== --- stable/10/sys/arm/conf/EFIKA_MX Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/EFIKA_MX Sat May 17 17:34:37 2014 (r266331) @@ -41,7 +41,7 @@ options NFSCL # New Network Filesyste #options NFSD # New Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem #options PROCFS # Process filesystem (requires PSEUDOFS) Modified: stable/10/sys/arm/conf/EP80219 ============================================================================== --- stable/10/sys/arm/conf/EP80219 Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/EP80219 Sat May 17 17:34:37 2014 (r266331) @@ -43,7 +43,7 @@ options NFSCL # New Network Filesyste options NFSD # New Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem #options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem #options PROCFS # Process filesystem (requires PSEUDOFS) Modified: stable/10/sys/arm/conf/ETHERNUT5 ============================================================================== --- stable/10/sys/arm/conf/ETHERNUT5 Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/ETHERNUT5 Sat May 17 17:34:37 2014 (r266331) @@ -43,7 +43,7 @@ options NFSLOCKD # Network Lock Manage options NFS_ROOT # NFS usable as /, requires NFSCL options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem #options MSDOSFS # MSDOS Filesystem #options CD9660 # ISO 9660 Filesystem #options PROCFS # Process filesystem (requires PSEUDOFS) Modified: stable/10/sys/arm/conf/GUMSTIX ============================================================================== --- stable/10/sys/arm/conf/GUMSTIX Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/GUMSTIX Sat May 17 17:34:37 2014 (r266331) @@ -49,7 +49,7 @@ options NFSCL # New Network Filesyste options NFS_ROOT # NFS usable as /, requires NFSCL options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem #options MSDOSFS # MSDOS Filesystem #options CD9660 # ISO 9660 Filesystem #options PROCFS # Process filesystem (requires PSEUDOFS) Modified: stable/10/sys/arm/conf/HL200 ============================================================================== --- stable/10/sys/arm/conf/HL200 Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/HL200 Sat May 17 17:34:37 2014 (r266331) @@ -51,7 +51,7 @@ options BOOTP_COMPAT options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem #options MSDOSFS # MSDOS Filesystem #options CD9660 # ISO 9660 Filesystem #options PROCFS # Process filesystem (requires PSEUDOFS) Modified: stable/10/sys/arm/conf/HL201 ============================================================================== --- stable/10/sys/arm/conf/HL201 Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/HL201 Sat May 17 17:34:37 2014 (r266331) @@ -54,7 +54,7 @@ options ALT_BREAK_TO_DEBUGGER options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem #options MSDOSFS # MSDOS Filesystem #options CD9660 # ISO 9660 Filesystem #options PROCFS # Process filesystem (requires PSEUDOFS) Modified: stable/10/sys/arm/conf/IMX53-QSB ============================================================================== --- stable/10/sys/arm/conf/IMX53-QSB Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/IMX53-QSB Sat May 17 17:34:37 2014 (r266331) @@ -40,7 +40,7 @@ options NFSCL # New Network Filesyste #options NFSD # New Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem #options PROCFS # Process filesystem (requires PSEUDOFS) Modified: stable/10/sys/arm/conf/IMX6 ============================================================================== --- stable/10/sys/arm/conf/IMX6 Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/IMX6 Sat May 17 17:34:37 2014 (r266331) @@ -36,7 +36,7 @@ options NFSCL # New Network Filesyst #options NFSD # New Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem #options PROCFS # Process filesystem (requires PSEUDOFS) Modified: stable/10/sys/arm/conf/IQ31244 ============================================================================== --- stable/10/sys/arm/conf/IQ31244 Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/IQ31244 Sat May 17 17:34:37 2014 (r266331) @@ -46,7 +46,7 @@ options NFSLOCKD # Network Lock Manage options NFS_ROOT # NFS usable as /, requires NFSCL options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem #options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem #options PROCFS # Process filesystem (requires PSEUDOFS) Modified: stable/10/sys/arm/conf/KB920X ============================================================================== --- stable/10/sys/arm/conf/KB920X Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/KB920X Sat May 17 17:34:37 2014 (r266331) @@ -49,7 +49,7 @@ options NFSCL # New Network Filesyste options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem #options MSDOSFS # MSDOS Filesystem #options CD9660 # ISO 9660 Filesystem #options PROCFS # Process filesystem (requires PSEUDOFS) Modified: stable/10/sys/arm/conf/LN2410SBC ============================================================================== --- stable/10/sys/arm/conf/LN2410SBC Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/LN2410SBC Sat May 17 17:34:37 2014 (r266331) @@ -49,7 +49,7 @@ options ROOTDEVNAME=\"ufs:da0s1\" options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem options PSEUDOFS # Pseudo-filesystem framework #options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support Modified: stable/10/sys/arm/conf/NSLU ============================================================================== --- stable/10/sys/arm/conf/NSLU Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/NSLU Sat May 17 17:34:37 2014 (r266331) @@ -63,7 +63,7 @@ options NFSLOCKD # Network Lock Manage options NFS_ROOT # NFS usable as /, requires NFSCL options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem #options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem #options PROCFS # Process filesystem (requires PSEUDOFS) Modified: stable/10/sys/arm/conf/PANDABOARD ============================================================================== --- stable/10/sys/arm/conf/PANDABOARD Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/PANDABOARD Sat May 17 17:34:37 2014 (r266331) @@ -56,7 +56,7 @@ options NFS_ROOT # NFS usable as /, re #options BOOTP_WIRED_TO=ue0 options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem options MSDOSFS # MSDOS Filesystem #options CD9660 # ISO 9660 Filesystem #options PROCFS # Process filesystem (requires PSEUDOFS) Modified: stable/10/sys/arm/conf/QILA9G20 ============================================================================== --- stable/10/sys/arm/conf/QILA9G20 Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/QILA9G20 Sat May 17 17:34:37 2014 (r266331) @@ -55,7 +55,7 @@ options ALT_BREAK_TO_DEBUGGER options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem #options MSDOSFS # MSDOS Filesystem #options CD9660 # ISO 9660 Filesystem #options PROCFS # Process filesystem (requires PSEUDOFS) Modified: stable/10/sys/arm/conf/QUARTZ ============================================================================== --- stable/10/sys/arm/conf/QUARTZ Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/QUARTZ Sat May 17 17:34:37 2014 (r266331) @@ -21,6 +21,6 @@ include "VYBRID.common" ident QUARTZ #FDT -options FDT -options FDT_DTB_STATIC +options FDT +options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=vybrid-quartz.dts Modified: stable/10/sys/arm/conf/RADXA ============================================================================== --- stable/10/sys/arm/conf/RADXA Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/RADXA Sat May 17 17:34:37 2014 (r266331) @@ -25,44 +25,44 @@ include "../rockchip/std.rk30xx" makeoptions MODULES_OVERRIDE="" makeoptions WITHOUT_MODULES="ahc" -options HZ=100 -options SCHED_4BSD # 4BSD scheduler -options INET # InterNETworking -options INET6 # IPv6 communications protocols -options FFS # 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 +options HZ=100 +options SCHED_4BSD # 4BSD scheduler +options INET # InterNETworking +options INET6 # IPv6 communications protocols +options FFS # 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 options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem -options MSDOSFS # MSDOS Filesystem -options CD9660 # ISO 9660 Filesystem -options PROCFS # Process filesystem (requires PSEUDOFS) -options PSEUDOFS # Pseudo-filesystem framework -options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] -options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI -options KTRACE # ktrace(1) support -options SYSVSHM # SYSV-style shared memory -options SYSVMSG # SYSV-style message queues -options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions -options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options PREEMPTION -options FREEBSD_BOOT_LOADER -options VFP # vfp/neon +options TMPFS # Efficient memory filesystem +options MSDOSFS # MSDOS Filesystem +options CD9660 # ISO 9660 Filesystem +options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework +options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +options KTRACE # ktrace(1) support +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions +options KBD_INSTALL_CDEV # install a CDEV entry in /dev +options PREEMPTION +options FREEBSD_BOOT_LOADER +options VFP # vfp/neon # Debugging makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options BREAK_TO_DEBUGGER +options BREAK_TO_DEBUGGER #options VERBOSE_SYSINIT # Enable verbose sysinit messages -options KDB -options DDB # Enable the kernel debugger +options KDB +options DDB # Enable the kernel debugger #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -options DIAGNOSTIC +options WITNESS # Enable checks to detect deadlocks and cycles +options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +options DIAGNOSTIC # NFS support #options NFSCL @@ -74,7 +74,7 @@ options DIAGNOSTIC #device mmcsd # mmc/sd flash cards # Boot device is 2nd slice on MMC/SD card -options ROOTDEVNAME=\"ufs:/dev/da0s2\" +options ROOTDEVNAME=\"ufs:/dev/da0s2\" # Console and misc device uart @@ -98,7 +98,7 @@ device pass # USB support options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. device usb -options USB_DEBUG +options USB_DEBUG #options USB_REQ_DEBUG #options USB_VERBOSE device dwcotg # DWC OTG controller @@ -117,7 +117,7 @@ device miibus device udav # Flattened Device Tree -options FDT -options FDT_DTB_STATIC +options FDT +options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=rk3188-radxa.dts Modified: stable/10/sys/arm/conf/RPI-B ============================================================================== --- stable/10/sys/arm/conf/RPI-B Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/RPI-B Sat May 17 17:34:37 2014 (r266331) @@ -27,14 +27,14 @@ options HZ=100 options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking options INET6 # IPv6 communications protocols -options SCTP # Stream Control Transmission Protocol +options SCTP # Stream Control Transmission Protocol options FFS # 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 options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem options MSDOSFS # MSDOS Filesystem device snp Modified: stable/10/sys/arm/conf/SAM9260EK ============================================================================== --- stable/10/sys/arm/conf/SAM9260EK Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/SAM9260EK Sat May 17 17:34:37 2014 (r266331) @@ -43,7 +43,7 @@ options NFSCL # New Network Filesyste #options NFSD # New Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem #options MSDOSFS # MSDOS Filesystem #options CD9660 # ISO 9660 Filesystem #options PROCFS # Process filesystem (requires PSEUDOFS) Modified: stable/10/sys/arm/conf/SAM9G20EK ============================================================================== --- stable/10/sys/arm/conf/SAM9G20EK Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/SAM9G20EK Sat May 17 17:34:37 2014 (r266331) @@ -34,7 +34,7 @@ options INET # InterNETworking #options INET6 # IPv6 communications protocols options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem options FFS # Berkeley Fast Filesystem #options SOFTUPDATES # Enable FFS soft updates support #options UFS_ACL # Support for access control lists Modified: stable/10/sys/arm/conf/SAM9X25EK ============================================================================== --- stable/10/sys/arm/conf/SAM9X25EK Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/SAM9X25EK Sat May 17 17:34:37 2014 (r266331) @@ -35,7 +35,7 @@ options INET # InterNETworking #options INET6 # IPv6 communications protocols options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem options FFS # Berkeley Fast Filesystem #options SOFTUPDATES # Enable FFS soft updates support #options UFS_ACL # Support for access control lists Modified: stable/10/sys/arm/conf/SHEEVAPLUG ============================================================================== --- stable/10/sys/arm/conf/SHEEVAPLUG Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/SHEEVAPLUG Sat May 17 17:34:37 2014 (r266331) @@ -18,7 +18,7 @@ options INET # InterNETworking options INET6 # IPv6 communications protocols options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem options FFS # Berkeley Fast Filesystem options NANDFS # NAND Filesystem options NFSCL # New Network Filesystem Client Modified: stable/10/sys/arm/conf/SN9G45 ============================================================================== --- stable/10/sys/arm/conf/SN9G45 Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/SN9G45 Sat May 17 17:34:37 2014 (r266331) @@ -54,7 +54,7 @@ options ALT_BREAK_TO_DEBUGGER options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem #options MSDOSFS # MSDOS Filesystem #options CD9660 # ISO 9660 Filesystem #options PROCFS # Process filesystem (requires PSEUDOFS) Modified: stable/10/sys/arm/conf/TS7800 ============================================================================== --- stable/10/sys/arm/conf/TS7800 Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/TS7800 Sat May 17 17:34:37 2014 (r266331) @@ -28,7 +28,7 @@ options BOOTP_WIRED_TO=mge0 options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues Modified: stable/10/sys/arm/conf/VERSATILEPB ============================================================================== --- stable/10/sys/arm/conf/VERSATILEPB Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/VERSATILEPB Sat May 17 17:34:37 2014 (r266331) @@ -29,8 +29,8 @@ makeoptions KERNVIRTADDR=0xc0100000 options KERNPHYSADDR=0x00100000 makeoptions KERNPHYSADDR=0x00100000 options PHYSADDR=0x00000000 -options FREEBSD_BOOT_LOADER -options LINUX_BOOT_ABI +options FREEBSD_BOOT_LOADER +options LINUX_BOOT_ABI makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options HZ=100 @@ -45,7 +45,7 @@ device snp options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem options PSEUDOFS # Pseudo-filesystem framework options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI Modified: stable/10/sys/arm/conf/VYBRID.common ============================================================================== --- stable/10/sys/arm/conf/VYBRID.common Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/VYBRID.common Sat May 17 17:34:37 2014 (r266331) @@ -25,32 +25,32 @@ makeoptions WITHOUT_MODULES="ahc" makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions WERROR="-Werror" -options HZ=100 -options SCHED_4BSD # 4BSD scheduler -options INET # InterNETworking -options INET6 # IPv6 communications protocols -options FFS # Berkeley Fast Filesystem -options SOFTUPDATES -options UFS_ACL # Support for access control lists -options UFS_DIRHASH # Improve performance on big directories +options HZ=100 +options SCHED_4BSD # 4BSD scheduler +options INET # InterNETworking +options INET6 # IPv6 communications protocols +options FFS # Berkeley Fast Filesystem +options SOFTUPDATES +options UFS_ACL # Support for access control lists +options UFS_DIRHASH # Improve performance on big directories options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem -options MSDOSFS # MSDOS Filesystem -options CD9660 # ISO 9660 Filesystem -options PROCFS # Process filesystem (requires PSEUDOFS) -options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # Efficient memory filesystem +options MSDOSFS # MSDOS Filesystem +options CD9660 # ISO 9660 Filesystem +options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework #options NANDFS # NAND Filesystem -options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] -options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI -options KTRACE -options SYSVSHM # SYSV-style shared memory -options SYSVMSG # SYSV-style message queues -options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions -options KBD_INSTALL_CDEV -options PREEMPTION -options FREEBSD_BOOT_LOADER +options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +options KTRACE +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions +options KBD_INSTALL_CDEV +options PREEMPTION +options FREEBSD_BOOT_LOADER options MUTEX_NOINLINE options RWLOCK_NOINLINE options NO_FFS_SNAPSHOT @@ -59,10 +59,10 @@ options VFP # vfp/neon # Debugging makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options BREAK_TO_DEBUGGER +options BREAK_TO_DEBUGGER #options VERBOSE_SYSINIT # Enable verbose sysinit messages -options KDB -options DDB # Enable the kernel debugger +options KDB +options DDB # Enable the kernel debugger #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS # Enable checks to detect deadlocks and cycles @@ -70,9 +70,9 @@ options DDB # Enable the kernel debug #options DIAGNOSTIC # NFS support -options NFSCL # Network Filesystem Client -options NFSLOCKD # Network Lock Manager -options NFS_ROOT # NFS usable as /, requires NFSCLIENT +options NFSCL # Network Filesystem Client +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCLIENT # Uncomment this for NFS root #options NFS_ROOT # NFS usable as /, requires NFSCL @@ -86,9 +86,9 @@ device mmc # mmc/sd bus device mmcsd # mmc/sd flash cards device sdhci # generic sdhci -#options ROOTDEVNAME=\"nfs:10.5.0.1:/tftpboot/cosmic\" -#options ROOTDEVNAME=\"nandfs:/dev/gnand0s.root\" -options ROOTDEVNAME=\"ufs:/dev/da0\" +#options ROOTDEVNAME=\"nfs:10.5.0.1:/tftpboot/cosmic\" +#options ROOTDEVNAME=\"nandfs:/dev/gnand0s.root\" +options ROOTDEVNAME=\"ufs:/dev/da0\" #options SMP @@ -103,7 +103,7 @@ device gpio # USB support options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. device usb -options USB_DEBUG +options USB_DEBUG #options USB_REQ_DEBUG #options USB_VERBOSE #device musb @@ -143,6 +143,6 @@ device sound # Framebuffer device vt device kbdmux -options SC_DFLT_FONT # compile font in +options SC_DFLT_FONT # compile font in makeoptions SC_DFLT_FONT=cp437 device ukbd Modified: stable/10/sys/arm/conf/WANDBOARD.common ============================================================================== --- stable/10/sys/arm/conf/WANDBOARD.common Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/WANDBOARD.common Sat May 17 17:34:37 2014 (r266331) @@ -35,7 +35,7 @@ options NFSCL # New Network Filesyst #options NFSD # New Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem #options PROCFS # Process filesystem (requires PSEUDOFS) Modified: stable/10/sys/arm/conf/ZEDBOARD ============================================================================== --- stable/10/sys/arm/conf/ZEDBOARD Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/arm/conf/ZEDBOARD Sat May 17 17:34:37 2014 (r266331) @@ -43,7 +43,7 @@ options NFSCL # Network Filesystem Cl options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options TMPFS # Efficient memory filesystem options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) @@ -54,7 +54,7 @@ options SYSVSHM # SYSV-style shared m options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions -options FREEBSD_BOOT_LOADER +options FREEBSD_BOOT_LOADER options VFP # vfp/neon # Debugging Modified: stable/10/sys/i386/conf/NOTES ============================================================================== --- stable/10/sys/i386/conf/NOTES Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/i386/conf/NOTES Sat May 17 17:34:37 2014 (r266331) @@ -381,7 +381,7 @@ options VESA_DEBUG device dpms # DPMS suspend & resume via VESA BIOS # x86 real mode BIOS emulator, required by atkbdc/dpms/vesa -options X86BIOS +options X86BIOS # # The Numeric Processing eXtension driver. This is non-optional. @@ -758,7 +758,7 @@ device ips # # Intel C600 (Patsburg) integrated SAS controller device isci -options ISCI_LOGGING # enable debugging in isci HAL +options ISCI_LOGGING # enable debugging in isci HAL # # NVM Express (NVMe) support Modified: stable/10/sys/i386/conf/XEN ============================================================================== --- stable/10/sys/i386/conf/XEN Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/i386/conf/XEN Sat May 17 17:34:37 2014 (r266331) @@ -83,8 +83,8 @@ device gif # IPv6 and IPv4 tunneling device faith # IPv6-to-IPv4 relaying (translation) # Wireless cards -options IEEE80211_SUPPORT_MESH -options AH_SUPPORT_AR5416 +options IEEE80211_SUPPORT_MESH +options AH_SUPPORT_AR5416 # The `bpf' device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! Modified: stable/10/sys/ia64/conf/GENERIC ============================================================================== --- stable/10/sys/ia64/conf/GENERIC Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/ia64/conf/GENERIC Sat May 17 17:34:37 2014 (r266331) @@ -177,11 +177,11 @@ device uvscom # USB serial support for # Wireless NIC cards. # The wlan(4) module assumes this, so just define it so it # at least correctly loads. -options IEEE80211_SUPPORT_MESH +options IEEE80211_SUPPORT_MESH # The ath(4) and ath_hal(4) code requires this. The module currently # builds everything including AR5416 (and later 11n NIC) support. -options AH_SUPPORT_AR5416 +options AH_SUPPORT_AR5416 # Various (pseudo) devices device ether # Ethernet support Modified: stable/10/sys/mips/conf/ALCHEMY ============================================================================== --- stable/10/sys/mips/conf/ALCHEMY Sat May 17 17:18:35 2014 (r266330) +++ stable/10/sys/mips/conf/ALCHEMY Sat May 17 17:34:37 2014 (r266331) @@ -28,15 +28,15 @@ include "../alchemy/std.alchemy" makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols -options DDB -options KDB +options DDB +options KDB -options SCHED_4BSD #4BSD scheduler -options INET #InterNETworking -options NFSCL #Network Filesystem Client -options NFS_ROOT #NFS usable as /, requires NFSCL -options PSEUDOFS #Pseudo-filesystem framework -# options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +options SCHED_4BSD #4BSD scheduler +options INET #InterNETworking +options NFSCL #Network Filesystem Client +options NFS_ROOT #NFS usable as /, requires NFSCL +options PSEUDOFS #Pseudo-filesystem framework +# options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions options BOOTP options BOOTP_NFSROOT @@ -48,15 +48,15 @@ options BOOTP_COMPAT # options SOFTUPDATES #Enable FFS soft updates support # options UFS_ACL #Support for access control lists # options UFS_DIRHASH #Improve performance on big directories -options ROOTDEVNAME=\"nfs:10.0.0.1:/mnt/bsd\" +options ROOTDEVNAME=\"nfs:10.0.0.1:/mnt/bsd\" # Debugging for use in -current #options DEADLKRES #Enable the deadlock resolver -options INVARIANTS #Enable calls of extra sanity checking -options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS #Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +options INVARIANTS #Enable calls of extra sanity checking +options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS #Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed device loop device ether *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat May 17 17:54:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C9DFA6D8; Sat, 17 May 2014 17:54:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B441B28F1; Sat, 17 May 2014 17:54:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HHsevr076690; Sat, 17 May 2014 17:54:40 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HHscdm076669; Sat, 17 May 2014 17:54:38 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405171754.s4HHscdm076669@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 17:54:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266332 - in stable/10/sys: arm/arm arm/conf arm/samsung/exynos boot/fdt/dts/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 17:54:40 -0000 Author: ian Date: Sat May 17 17:54:38 2014 New Revision: 266332 URL: http://svnweb.freebsd.org/changeset/base/266332 Log: MFC 263250, 263251, 263424, 263425, 263426, 263427, 263430, 263431 Use the same cache terminology as the ARM docs in comments. No functional changes. Use armv7 TLB flush code, not arm11, for cortex-a processors. Exynos/ Arndale... - Disable debugging by default. - Add display-related and clk devices to the tree - Prevent resources intersection with EHCI driver - Add display-related and clk devices to the tree - Prevent resources intersection with EHCI driver - Add driver for Display Controller. - Add support for Samsung Chromebook (ARM Cortex A15 machine). - Rename mct and ehci drivers files to match common naming. Added: stable/10/sys/arm/conf/CHROMEBOOK - copied unchanged from r263427, head/sys/arm/conf/CHROMEBOOK stable/10/sys/arm/samsung/exynos/exynos5_common.h - copied unchanged from r263426, head/sys/arm/samsung/exynos/exynos5_common.h stable/10/sys/arm/samsung/exynos/exynos5_ehci.c - copied unchanged from r263431, head/sys/arm/samsung/exynos/exynos5_ehci.c stable/10/sys/arm/samsung/exynos/exynos5_fimd.c - copied, changed from r263426, head/sys/arm/samsung/exynos/exynos5_fimd.c stable/10/sys/arm/samsung/exynos/exynos5_mct.c - copied unchanged from r263431, head/sys/arm/samsung/exynos/exynos5_mct.c stable/10/sys/boot/fdt/dts/arm/exynos5250-chromebook.dts - copied unchanged from r263427, head/sys/boot/fdt/dts/arm/exynos5250-chromebook.dts Deleted: stable/10/sys/arm/samsung/exynos/arch_timer.c stable/10/sys/arm/samsung/exynos/ehci_exynos5.c Modified: stable/10/sys/arm/arm/cpufunc.c stable/10/sys/arm/arm/cpufunc_asm_armv7.S stable/10/sys/arm/conf/ARNDALE stable/10/sys/arm/samsung/exynos/files.exynos5 stable/10/sys/boot/fdt/dts/arm/exynos5250.dtsi Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/cpufunc.c ============================================================================== --- stable/10/sys/arm/arm/cpufunc.c Sat May 17 17:34:37 2014 (r266331) +++ stable/10/sys/arm/arm/cpufunc.c Sat May 17 17:54:38 2014 (r266332) @@ -754,14 +754,18 @@ struct cpu_functions cortexa_cpufuncs = cpufunc_faultstatus, /* Faultstatus */ cpufunc_faultaddress, /* Faultaddress */ - /* TLB functions */ + /* + * TLB functions. ARMv7 does all TLB ops based on a unified TLB model + * whether the hardware implements separate I+D or not, so we use the + * same 'ID' functions for all 3 variations. + */ armv7_tlb_flushID, /* tlb_flushID */ armv7_tlb_flushID_SE, /* tlb_flushID_SE */ - arm11_tlb_flushI, /* tlb_flushI */ - arm11_tlb_flushI_SE, /* tlb_flushI_SE */ - arm11_tlb_flushD, /* tlb_flushD */ - arm11_tlb_flushD_SE, /* tlb_flushD_SE */ + armv7_tlb_flushID, /* tlb_flushI */ + armv7_tlb_flushID_SE, /* tlb_flushI_SE */ + armv7_tlb_flushID, /* tlb_flushD */ + armv7_tlb_flushID_SE, /* tlb_flushD_SE */ /* Cache operations */ Modified: stable/10/sys/arm/arm/cpufunc_asm_armv7.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_armv7.S Sat May 17 17:34:37 2014 (r266331) +++ stable/10/sys/arm/arm/cpufunc_asm_armv7.S Sat May 17 17:54:38 2014 (r266332) @@ -84,10 +84,10 @@ END(armv7_setttb) ENTRY(armv7_tlb_flushID) dsb #ifdef SMP - mcr p15, 0, r0, c8, c3, 0 /* flush I+D tlb */ - mcr p15, 0, r0, c7, c1, 6 /* flush BTB */ + mcr p15, 0, r0, c8, c3, 0 /* flush Unified TLB all entries Inner Shareable */ + mcr p15, 0, r0, c7, c1, 6 /* flush BTB Inner Shareable */ #else - mcr p15, 0, r0, c8, c7, 0 /* flush I+D tlb */ + mcr p15, 0, r0, c8, c7, 0 /* flush Unified TLB all entries */ mcr p15, 0, r0, c7, c5, 6 /* flush BTB */ #endif dsb @@ -99,10 +99,10 @@ ENTRY(armv7_tlb_flushID_SE) ldr r1, .Lpage_mask bic r0, r0, r1 #ifdef SMP - mcr p15, 0, r0, c8, c3, 3 /* flush D tlb single entry Inner Shareable*/ + mcr p15, 0, r0, c8, c3, 3 /* flush Unified TLB single entry Inner Shareable */ mcr p15, 0, r0, c7, c1, 6 /* flush BTB Inner Shareable */ #else - mcr p15, 0, r0, c8, c7, 1 /* flush D tlb single entry */ + mcr p15, 0, r0, c8, c7, 1 /* flush Unified TLB single entry */ mcr p15, 0, r0, c7, c5, 6 /* flush BTB */ #endif dsb Modified: stable/10/sys/arm/conf/ARNDALE ============================================================================== --- stable/10/sys/arm/conf/ARNDALE Sat May 17 17:34:37 2014 (r266331) +++ stable/10/sys/arm/conf/ARNDALE Sat May 17 17:54:38 2014 (r266332) @@ -60,11 +60,11 @@ options BREAK_TO_DEBUGGER #options VERBOSE_SYSINIT # Enable verbose sysinit messages options KDB options DDB # Enable the kernel debugger -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options INVARIANTS # Enable calls of extra sanity checking +#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS # Enable checks to detect deadlocks and cycles #options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -options DIAGNOSTIC +#options DIAGNOSTIC # NFS support options NFSCL # Network Filesystem Client Copied: stable/10/sys/arm/conf/CHROMEBOOK (from r263427, head/sys/arm/conf/CHROMEBOOK) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/conf/CHROMEBOOK Sat May 17 17:54:38 2014 (r266332, copy of r263427, head/sys/arm/conf/CHROMEBOOK) @@ -0,0 +1,146 @@ +# Kernel configuration for Samsung Chromebook (Exynos5 Dual machine). +# +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +ident CHROMEBOOK + +include "../samsung/exynos/std.exynos5" + +makeoptions MODULES_OVERRIDE="" +makeoptions WITHOUT_MODULES="ahc" + +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +makeoptions WERROR="-Werror" + +options HZ=100 +options SCHED_4BSD # 4BSD scheduler +options INET # InterNETworking +options INET6 # IPv6 communications protocols +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme +options TMPFS # Efficient memory filesystem +options FFS # Berkeley Fast Filesystem +options SOFTUPDATES +options UFS_ACL # Support for access control lists +options UFS_DIRHASH # Improve performance on big directories +options MSDOSFS # MSDOS Filesystem +options CD9660 # ISO 9660 Filesystem +options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework +options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +options KTRACE +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions +options KBD_INSTALL_CDEV +options PREEMPTION +options FREEBSD_BOOT_LOADER +options VFP # vfp/neon + +# Debugging +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +options BREAK_TO_DEBUGGER +#options VERBOSE_SYSINIT # Enable verbose sysinit messages +options KDB +options DDB # Enable the kernel debugger +#options INVARIANTS # Enable calls of extra sanity checking +#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options DIAGNOSTIC + +# NFS support +options NFSCL # Network Filesystem Client +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCLIENT + +# Uncomment this for NFS root +#options NFS_ROOT # NFS usable as /, requires NFSCL +#options BOOTP_NFSROOT +#options BOOTP_COMPAT +#options BOOTP +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=cpsw0 + +device mmc # mmc/sd bus +device mmcsd # mmc/sd flash cards +device sdhci # generic sdhci + +options ROOTDEVNAME=\"ufs:/dev/da0\" + +#options SMP + +# Pseudo devices + +device loop +device random +device pty +device md +device gpio + +# USB support +options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. +device usb +options USB_DEBUG +#options USB_REQ_DEBUG +#options USB_VERBOSE +#device musb +device ehci +#device ohci + +device umass +device scbus # SCSI bus (required for SCSI) +device da # Direct Access (disks) +device pass + +# SATA +#device ata +#device atadisk +#device mvs + +# Serial ports +device uart + +# Framebuffer +device vt +device kbdmux +options SC_DFLT_FONT # compile font in +makeoptions SC_DFLT_FONT=cp437 +device ukbd + +# I2C (TWSI) +#device iic +#device iicbus + +# Ethernet +device ether +device mii +device smsc +device smscphy + +# USB ethernet support, requires miibus +device miibus +device axe # ASIX Electronics USB Ethernet +device bpf # Berkeley packet filter + +#FDT +options FDT +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=exynos5250-chromebook.dts Copied: stable/10/sys/arm/samsung/exynos/exynos5_common.h (from r263426, head/sys/arm/samsung/exynos/exynos5_common.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/samsung/exynos/exynos5_common.h Sat May 17 17:54:38 2014 (r266332, copy of r263426, head/sys/arm/samsung/exynos/exynos5_common.h) @@ -0,0 +1,40 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +#define READ4(_sc, _reg) \ + bus_space_read_4(_sc->bst, _sc->bsh, _reg) +#define WRITE4(_sc, _reg, _val) \ + bus_space_write_4(_sc->bst, _sc->bsh, _reg, _val) +#define READ2(_sc, _reg) \ + bus_space_read_2(_sc->bst, _sc->bsh, _reg) +#define WRITE2(_sc, _reg, _val) \ + bus_space_write_2(_sc->bst, _sc->bsh, _reg, _val) +#define READ1(_sc, _reg) \ + bus_space_read_1(_sc->bst, _sc->bsh, _reg) +#define WRITE1(_sc, _reg, _val) \ + bus_space_write_1(_sc->bst, _sc->bsh, _reg, _val) Copied: stable/10/sys/arm/samsung/exynos/exynos5_ehci.c (from r263431, head/sys/arm/samsung/exynos/exynos5_ehci.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/samsung/exynos/exynos5_ehci.c Sat May 17 17:54:38 2014 (r266332, copy of r263431, head/sys/arm/samsung/exynos/exynos5_ehci.c) @@ -0,0 +1,370 @@ +/*- + * Copyright (c) 2013 Ruslan Bukin + * All rights reserved. + * + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_bus.h" + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include "opt_platform.h" + +/* GPIO control */ +#define GPIO_CON(x, v) ((v) << ((x) * 4)) +#define GPIO_MASK 0xf +#define GPIO_OUTPUT 1 +#define GPIO_INPUT 0 +#define GPX3CON 0x0 +#define GPX3DAT 0x4 +#define PIN_USB 5 + +/* PWR control */ +#define EXYNOS5_PWR_USBHOST_PHY 0x708 +#define PHY_POWER_ON 1 +#define PHY_POWER_OFF 0 + +/* SYSREG */ +#define EXYNOS5_SYSREG_USB2_PHY 0x0 +#define USB2_MODE_HOST 0x1 + +/* USB HOST */ +#define HOST_CTRL_CLK_24MHZ (5 << 16) +#define HOST_CTRL_CLK_MASK (7 << 16) +#define HOST_CTRL_SIDDQ (1 << 6) +#define HOST_CTRL_SLEEP (1 << 5) +#define HOST_CTRL_SUSPEND (1 << 4) +#define HOST_CTRL_RESET_LINK (1 << 1) +#define HOST_CTRL_RESET_PHY (1 << 0) +#define HOST_CTRL_RESET_PHY_ALL (1U << 31) + +/* Forward declarations */ +static int exynos_ehci_attach(device_t dev); +static int exynos_ehci_detach(device_t dev); +static int exynos_ehci_probe(device_t dev); + +struct exynos_ehci_softc { + ehci_softc_t base; + struct resource *res[6]; + bus_space_tag_t host_bst; + bus_space_tag_t pwr_bst; + bus_space_tag_t sysreg_bst; + bus_space_tag_t gpio_bst; + bus_space_handle_t host_bsh; + bus_space_handle_t pwr_bsh; + bus_space_handle_t sysreg_bsh; + bus_space_handle_t gpio_bsh; + +}; + +static struct resource_spec exynos_ehci_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { SYS_RES_MEMORY, 1, RF_ACTIVE }, + { SYS_RES_MEMORY, 2, RF_ACTIVE }, + { SYS_RES_MEMORY, 3, RF_ACTIVE }, + { SYS_RES_MEMORY, 4, RF_ACTIVE }, + { SYS_RES_IRQ, 0, RF_ACTIVE }, + { -1, 0 } +}; + +static device_method_t ehci_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, exynos_ehci_probe), + DEVMETHOD(device_attach, exynos_ehci_attach), + DEVMETHOD(device_detach, exynos_ehci_detach), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + + /* Bus interface */ + DEVMETHOD(bus_print_child, bus_generic_print_child), + + { 0, 0 } +}; + +/* kobj_class definition */ +static driver_t ehci_driver = { + "ehci", + ehci_methods, + sizeof(ehci_softc_t) +}; + +static devclass_t ehci_devclass; + +DRIVER_MODULE(ehci, simplebus, ehci_driver, ehci_devclass, 0, 0); +MODULE_DEPEND(ehci, usb, 1, 1, 1); + +/* + * Public methods + */ +static int +exynos_ehci_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_is_compatible(dev, "exynos,usb-ehci") == 0) + return (ENXIO); + + device_set_desc(dev, "Exynos integrated USB controller"); + return (BUS_PROBE_DEFAULT); +} + +static int +gpio_ctrl(struct exynos_ehci_softc *esc, int dir, int power) +{ + int reg; + + /* Power control */ + reg = bus_space_read_4(esc->gpio_bst, esc->gpio_bsh, GPX3DAT); + reg &= ~(1 << PIN_USB); + reg |= (power << PIN_USB); + bus_space_write_4(esc->gpio_bst, esc->gpio_bsh, GPX3DAT, reg); + + /* Input/Output control */ + reg = bus_space_read_4(esc->gpio_bst, esc->gpio_bsh, GPX3CON); + reg &= ~GPIO_CON(PIN_USB, GPIO_MASK); + reg |= GPIO_CON(PIN_USB, dir); + bus_space_write_4(esc->gpio_bst, esc->gpio_bsh, GPX3CON, reg); + + return (0); +} + +static int +phy_init(struct exynos_ehci_softc *esc) +{ + int reg; + + gpio_ctrl(esc, GPIO_INPUT, 1); + + /* set USB HOST mode */ + bus_space_write_4(esc->sysreg_bst, esc->sysreg_bsh, + EXYNOS5_SYSREG_USB2_PHY, USB2_MODE_HOST); + + /* Power ON phy */ + bus_space_write_4(esc->pwr_bst, esc->pwr_bsh, + EXYNOS5_PWR_USBHOST_PHY, PHY_POWER_ON); + + reg = bus_space_read_4(esc->host_bst, esc->host_bsh, 0x0); + reg &= ~(HOST_CTRL_CLK_MASK | + HOST_CTRL_RESET_PHY | + HOST_CTRL_RESET_PHY_ALL | + HOST_CTRL_SIDDQ | + HOST_CTRL_SUSPEND | + HOST_CTRL_SLEEP); + + reg |= (HOST_CTRL_CLK_24MHZ | + HOST_CTRL_RESET_LINK); + bus_space_write_4(esc->host_bst, esc->host_bsh, 0x0, reg); + + DELAY(10); + + reg = bus_space_read_4(esc->host_bst, esc->host_bsh, 0x0); + reg &= ~(HOST_CTRL_RESET_LINK); + bus_space_write_4(esc->host_bst, esc->host_bsh, 0x0, reg); + + gpio_ctrl(esc, GPIO_OUTPUT, 1); + + return (0); +} + +static int +exynos_ehci_attach(device_t dev) +{ + struct exynos_ehci_softc *esc; + ehci_softc_t *sc; + bus_space_handle_t bsh; + int err; + + esc = device_get_softc(dev); + sc = &esc->base; + sc->sc_bus.parent = dev; + sc->sc_bus.devices = sc->sc_devices; + sc->sc_bus.devices_max = EHCI_MAX_DEVICES; + + if (bus_alloc_resources(dev, exynos_ehci_spec, esc->res)) { + device_printf(dev, "could not allocate resources\n"); + return (ENXIO); + } + + /* EHCI registers */ + sc->sc_io_tag = rman_get_bustag(esc->res[0]); + bsh = rman_get_bushandle(esc->res[0]); + sc->sc_io_size = rman_get_size(esc->res[0]); + + /* EHCI HOST ctrl registers */ + esc->host_bst = rman_get_bustag(esc->res[1]); + esc->host_bsh = rman_get_bushandle(esc->res[1]); + + /* PWR registers */ + esc->pwr_bst = rman_get_bustag(esc->res[2]); + esc->pwr_bsh = rman_get_bushandle(esc->res[2]); + + /* SYSREG */ + esc->sysreg_bst = rman_get_bustag(esc->res[3]); + esc->sysreg_bsh = rman_get_bushandle(esc->res[3]); + + /* GPIO */ + esc->gpio_bst = rman_get_bustag(esc->res[4]); + esc->gpio_bsh = rman_get_bushandle(esc->res[4]); + + /* get all DMA memory */ + if (usb_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(dev), + &ehci_iterate_hw_softc)) + return (ENXIO); + + /* + * Set handle to USB related registers subregion used by + * generic EHCI driver. + */ + err = bus_space_subregion(sc->sc_io_tag, bsh, 0x0, + sc->sc_io_size, &sc->sc_io_hdl); + if (err != 0) + return (ENXIO); + + phy_init(esc); + + /* Setup interrupt handler */ + err = bus_setup_intr(dev, esc->res[5], INTR_TYPE_BIO | INTR_MPSAFE, + NULL, (driver_intr_t *)ehci_interrupt, sc, + &sc->sc_intr_hdl); + if (err) { + device_printf(dev, "Could not setup irq, " + "%d\n", err); + return (1); + } + + /* Add USB device */ + sc->sc_bus.bdev = device_add_child(dev, "usbus", -1); + if (!sc->sc_bus.bdev) { + device_printf(dev, "Could not add USB device\n"); + err = bus_teardown_intr(dev, esc->res[5], + sc->sc_intr_hdl); + if (err) + device_printf(dev, "Could not tear down irq," + " %d\n", err); + return (1); + } + device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus); + + strlcpy(sc->sc_vendor, "Samsung", sizeof(sc->sc_vendor)); + + err = ehci_init(sc); + if (!err) { + sc->sc_flags |= EHCI_SCFLG_DONEINIT; + err = device_probe_and_attach(sc->sc_bus.bdev); + } else { + device_printf(dev, "USB init failed err=%d\n", err); + + device_delete_child(dev, sc->sc_bus.bdev); + sc->sc_bus.bdev = NULL; + + err = bus_teardown_intr(dev, esc->res[5], + sc->sc_intr_hdl); + if (err) + device_printf(dev, "Could not tear down irq," + " %d\n", err); + return (1); + } + return (0); +} + +static int +exynos_ehci_detach(device_t dev) +{ + struct exynos_ehci_softc *esc; + ehci_softc_t *sc; + int err; + + esc = device_get_softc(dev); + sc = &esc->base; + + if (sc->sc_flags & EHCI_SCFLG_DONEINIT) + return (0); + + /* + * only call ehci_detach() after ehci_init() + */ + if (sc->sc_flags & EHCI_SCFLG_DONEINIT) { + ehci_detach(sc); + sc->sc_flags &= ~EHCI_SCFLG_DONEINIT; + } + + /* + * Disable interrupts that might have been switched on in + * ehci_init. + */ + if (sc->sc_io_tag && sc->sc_io_hdl) + bus_space_write_4(sc->sc_io_tag, sc->sc_io_hdl, + EHCI_USBINTR, 0); + + if (esc->res[5] && sc->sc_intr_hdl) { + err = bus_teardown_intr(dev, esc->res[5], + sc->sc_intr_hdl); + if (err) { + device_printf(dev, "Could not tear down irq," + " %d\n", err); + return (err); + } + sc->sc_intr_hdl = NULL; + } + + if (sc->sc_bus.bdev) { + device_delete_child(dev, sc->sc_bus.bdev); + sc->sc_bus.bdev = NULL; + } + + /* During module unload there are lots of children leftover */ + device_delete_children(dev); + + bus_release_resources(dev, exynos_ehci_spec, esc->res); + + return (0); +} Copied and modified: stable/10/sys/arm/samsung/exynos/exynos5_fimd.c (from r263426, head/sys/arm/samsung/exynos/exynos5_fimd.c) ============================================================================== --- head/sys/arm/samsung/exynos/exynos5_fimd.c Thu Mar 20 17:07:14 2014 (r263426, copy source) +++ stable/10/sys/arm/samsung/exynos/exynos5_fimd.c Sat May 17 17:54:38 2014 (r266332) @@ -256,12 +256,10 @@ fimd_init(struct fimd_softc *sc) reg = panel->ivclk | panel->fixvclk; DWRITE4(sc,VIDCON1,reg); - printf("print to VIDCON0\n"); reg = (VIDCON0_ENVID | VIDCON0_ENVID_F); reg |= (panel->clkval_f << CLKVAL_F_OFFSET); WRITE4(sc,VIDCON0,reg); - printf("print to VIDCON0 2nd\n"); reg = (panel->v_pulse_width << VSYNC_PULSE_WIDTH_OFFSET); reg |= (panel->v_front_porch << V_FRONT_PORCH_OFFSET); reg |= (panel->v_back_porch << V_BACK_PORCH_OFFSET); @@ -276,10 +274,6 @@ fimd_init(struct fimd_softc *sc) reg |= ((panel->height - 1) << LINEVAL_OFFSET); DWRITE4(sc,VIDTCON2,reg); - printf("set pbase\n"); - printf("vbase is 0x%08x\n", sc->sc_info.fb_vbase); - printf("pbase is 0x%08x\n", sc->sc_info.fb_pbase); - WRITE4(sc,VIDW00ADD0B0, sc->sc_info.fb_pbase); WRITE4(sc,VIDW00ADD1B0, sc->sc_info.fb_pbase + sc->sc_info.fb_size); WRITE4(sc,VIDW00ADD2, panel->width * 2); Copied: stable/10/sys/arm/samsung/exynos/exynos5_mct.c (from r263431, head/sys/arm/samsung/exynos/exynos5_mct.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/samsung/exynos/exynos5_mct.c Sat May 17 17:54:38 2014 (r266332, copy of r263431, head/sys/arm/samsung/exynos/exynos5_mct.c) @@ -0,0 +1,139 @@ +/*- + * Copyright (c) 2013 Ruslan Bukin + * All rights reserved. + * + * 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. + */ + +/* + * This module just enables Exynos MCT, so ARMv7 Generic Timer will works + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +#define MCT_CTRL_START (1 << 8) +#define MCT_CTRL (0x240) +#define MCT_WRITE_STAT (0x24C) + +struct arm_tmr_softc { + struct resource *tmr_res[1]; + bus_space_tag_t bst; + bus_space_handle_t bsh; +}; + +static struct resource_spec arm_tmr_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, /* Timer registers */ + { -1, 0 } +}; + +static int +arm_tmr_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_is_compatible(dev, "exynos,mct")) + return (ENXIO); + + device_set_desc(dev, "Exynos MPCore Timer"); + return (BUS_PROBE_DEFAULT); +} + +static int +arm_tmr_attach(device_t dev) +{ + struct arm_tmr_softc *sc; + int reg, i; + int mask; + + sc = device_get_softc(dev); + + if (bus_alloc_resources(dev, arm_tmr_spec, sc->tmr_res)) { + device_printf(dev, "could not allocate resources\n"); + return (ENXIO); + } + + /* Timer interface */ + sc->bst = rman_get_bustag(sc->tmr_res[0]); + sc->bsh = rman_get_bushandle(sc->tmr_res[0]); + + reg = bus_space_read_4(sc->bst, sc->bsh, MCT_CTRL); + reg |= MCT_CTRL_START; + bus_space_write_4(sc->bst, sc->bsh, MCT_CTRL, reg); + + mask = (1 << 16); + + /* Wait 10 times until written value is applied */ + for (i = 0; i < 10; i++) { + reg = bus_space_read_4(sc->bst, sc->bsh, MCT_WRITE_STAT); + if (reg & mask) { + bus_space_write_4(sc->bst, sc->bsh, + MCT_WRITE_STAT, mask); + return (0); + } + cpufunc_nullop(); + } + + /* NOTREACHED */ + + panic("Can't enable timer\n"); +} + +static device_method_t arm_tmr_methods[] = { + DEVMETHOD(device_probe, arm_tmr_probe), + DEVMETHOD(device_attach, arm_tmr_attach), + { 0, 0 } +}; + +static driver_t arm_tmr_driver = { + "mct", + arm_tmr_methods, + sizeof(struct arm_tmr_softc), +}; + +static devclass_t arm_tmr_devclass; + +DRIVER_MODULE(mct, simplebus, arm_tmr_driver, arm_tmr_devclass, 0, 0); Modified: stable/10/sys/arm/samsung/exynos/files.exynos5 ============================================================================== --- stable/10/sys/arm/samsung/exynos/files.exynos5 Sat May 17 17:34:37 2014 (r266331) +++ stable/10/sys/arm/samsung/exynos/files.exynos5 Sat May 17 17:54:38 2014 (r266332) @@ -13,11 +13,12 @@ arm/arm/bus_space-v6.c standard arm/arm/gic.c standard arm/arm/generic_timer.c standard -arm/samsung/exynos/arch_timer.c standard +arm/samsung/exynos/exynos5_mct.c standard arm/samsung/exynos/exynos5_mp.c optional smp arm/samsung/exynos/exynos5_common.c standard arm/samsung/exynos/exynos5_machdep.c standard arm/samsung/exynos/uart.c optional uart -arm/samsung/exynos/ehci_exynos5.c optional ehci +arm/samsung/exynos/exynos5_ehci.c optional ehci +arm/samsung/exynos/exynos5_fimd.c optional vt #dev/sdhci/sdhci_fdt.c optional sdhci Copied: stable/10/sys/boot/fdt/dts/arm/exynos5250-chromebook.dts (from r263427, head/sys/boot/fdt/dts/arm/exynos5250-chromebook.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/fdt/dts/arm/exynos5250-chromebook.dts Sat May 17 17:54:38 2014 (r266332, copy of r263427, head/sys/boot/fdt/dts/arm/exynos5250-chromebook.dts) @@ -0,0 +1,59 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +/dts-v1/; + +/include/ "exynos5250.dtsi" + +/ { + model = "Samsung Chromebook"; + + memory { + device_type = "memory"; + reg = < 0x40000000 0x80000000 >; /* 2G */ + }; + + SOC: Exynos5@0 { + + fimd0: fimd@14400000 { + status = "okay"; + + panel-size = < 1366 768 >; + panel-hsync = < 80 32 48 >; + panel-vsync = < 14 5 3 >; + panel-clk-div = < 17 >; + panel-backlight-pin = < 25 >; + }; + + }; + + chosen { + stdin = &serial2; + stdout = &serial2; + }; +}; Modified: stable/10/sys/boot/fdt/dts/arm/exynos5250.dtsi ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/exynos5250.dtsi Sat May 17 17:34:37 2014 (r266331) +++ stable/10/sys/boot/fdt/dts/arm/exynos5250.dtsi Sat May 17 17:54:38 2014 (r266332) @@ -32,7 +32,16 @@ #size-cells = <1>; interrupt-parent = <&GIC>; - Exynos5@0 { + aliases { + soc = &SOC; + serial0 = &serial0; + serial1 = &serial1; + clk0 = &clk0; + dp0 = &dp0; + fimd0 = &fimd0; + }; + + SOC: Exynos5@0 { #address-cells = <1>; #size-cells = <1>; compatible = "simple-bus"; @@ -48,6 +57,11 @@ #interrupt-cells = <1>; }; + clk0: clk@10010000 { + compatible = "exynos,clk"; + reg = < 0x10020000 0x20000 >; + }; + mct { compatible = "exynos,mct"; reg = < 0x101C0000 0x1000 >; @@ -72,8 +86,8 @@ reg = <0x12110000 0x1000>, /* EHCI */ <0x12130000 0x1000>, /* EHCI host ctrl */ <0x10040000 0x1000>, /* Power */ - <0x10050000 0x1000>, /* Sysreg */ - <0x11400000 0x1000>; /* GPIO left */ + <0x10050230 0x10>, /* Sysreg */ + <0x11400C60 0x10>; /* GPIO left */ interrupts = < 103 >; interrupt-parent = <&GIC>; }; @@ -153,5 +167,21 @@ current-speed = <115200>; }; + fimd0: fimd@14400000 { + compatible = "exynos,fimd"; + status = "disabled"; + reg = < 0x14400000 0x10000 >, /* fimd */ + < 0x14420000 0x10000 >, /* disp */ + < 0x10050000 0x220 >; /* sysreg */ + interrupt-parent = <&GIC>; + }; + + dp0: dp@145B0000 { + compatible = "exynos,dp"; + status = "disabled"; + reg = < 0x145B0000 0x10000 >, + < 0x10040720 0x10 >; /* PHY */ + interrupt-parent = <&GIC>; + }; }; }; From owner-svn-src-stable@FreeBSD.ORG Sat May 17 18:53:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C70F2B7E; Sat, 17 May 2014 18:53:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B00B32D81; Sat, 17 May 2014 18:53:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HIriT3014146; Sat, 17 May 2014 18:53:44 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HIrbG7014102; Sat, 17 May 2014 18:53:37 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405171853.s4HIrbG7014102@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 18:53:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266337 - in stable/10: contrib/llvm/patches lib/libc/arm/gen sys/arm/allwinner sys/arm/allwinner/a20 sys/arm/conf sys/arm/include sys/arm/rockchip sys/boot/fdt/dts/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 18:53:44 -0000 Author: ian Date: Sat May 17 18:53:36 2014 New Revision: 266337 URL: http://svnweb.freebsd.org/changeset/base/266337 Log: MFC 263631, 263637, 263664, 263676, 263679, 263698, 263711, Implement __flt_rounds for ARMv6 hard-float. The fpscr register stores the current rounding mode used by the VFP unit. Simplify how we build MACHINE_ARCH. There are 3 options that may be set however only arm, armeb, armv6, and soon armv6hf will be used. Add the llvm/clang patch for r263619. Reorder the pmap macros so "ARM_MMU_V6 + ARM_MMU_V7" is first. As they are identical this allows us to build for both v6 and v7 together. Add code for enabling second CPU core for A20 SoC. Enable SMP on Cubieboard2. Switch to freebsd.org emal address in copyright. Added: stable/10/contrib/llvm/patches/patch-r263619-clang-r201662-arm-gnueabihf.diff - copied unchanged from r263664, head/contrib/llvm/patches/patch-r263619-clang-r201662-arm-gnueabihf.diff stable/10/sys/arm/allwinner/a20/a20_mp.c - copied unchanged from r263698, head/sys/arm/allwinner/a20/a20_mp.c Modified: stable/10/lib/libc/arm/gen/flt_rounds.c stable/10/sys/arm/allwinner/a10_clk.c stable/10/sys/arm/allwinner/a10_clk.h stable/10/sys/arm/allwinner/a10_common.c stable/10/sys/arm/allwinner/a10_ehci.c stable/10/sys/arm/allwinner/a10_gpio.c stable/10/sys/arm/allwinner/a10_gpio.h stable/10/sys/arm/allwinner/a10_machdep.c stable/10/sys/arm/allwinner/a10_sramc.c stable/10/sys/arm/allwinner/a10_sramc.h stable/10/sys/arm/allwinner/a20/a20_cpu_cfg.c stable/10/sys/arm/allwinner/a20/a20_cpu_cfg.h stable/10/sys/arm/allwinner/a20/files.a20 stable/10/sys/arm/allwinner/aintc.c stable/10/sys/arm/allwinner/console.c stable/10/sys/arm/allwinner/if_emac.c stable/10/sys/arm/allwinner/if_emacreg.h stable/10/sys/arm/allwinner/timer.c stable/10/sys/arm/conf/CUBIEBOARD2 stable/10/sys/arm/include/param.h stable/10/sys/arm/include/pmap.h stable/10/sys/arm/rockchip/rk30xx_common.c stable/10/sys/arm/rockchip/rk30xx_gpio.c stable/10/sys/arm/rockchip/rk30xx_grf.c stable/10/sys/arm/rockchip/rk30xx_grf.h stable/10/sys/arm/rockchip/rk30xx_machdep.c stable/10/sys/arm/rockchip/rk30xx_pmu.c stable/10/sys/arm/rockchip/rk30xx_pmu.h stable/10/sys/arm/rockchip/rk30xx_wdog.c stable/10/sys/arm/rockchip/rk30xx_wdog.h stable/10/sys/boot/fdt/dts/arm/cubieboard.dts stable/10/sys/boot/fdt/dts/arm/cubieboard2.dts stable/10/sys/boot/fdt/dts/arm/rk3188-radxa.dts stable/10/sys/boot/fdt/dts/arm/rk3188.dtsi Directory Properties: stable/10/ (props changed) Copied: stable/10/contrib/llvm/patches/patch-r263619-clang-r201662-arm-gnueabihf.diff (from r263664, head/contrib/llvm/patches/patch-r263619-clang-r201662-arm-gnueabihf.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/llvm/patches/patch-r263619-clang-r201662-arm-gnueabihf.diff Sat May 17 18:53:36 2014 (r266337, copy of r263664, head/contrib/llvm/patches/patch-r263619-clang-r201662-arm-gnueabihf.diff) @@ -0,0 +1,81 @@ +Index: tools/clang/lib/Driver/ToolChains.cpp +=================================================================== +--- tools/clang/lib/Driver/ToolChains.cpp ++++ tools/clang/lib/Driver/ToolChains.cpp +@@ -2034,6 +2034,7 @@ + bool FreeBSD::UseSjLjExceptions() const { + // FreeBSD uses SjLj exceptions on ARM oabi. + switch (getTriple().getEnvironment()) { ++ case llvm::Triple::GNUEABIHF: + case llvm::Triple::GNUEABI: + case llvm::Triple::EABI: + return false; +Index: tools/clang/lib/Driver/Tools.cpp +=================================================================== +--- tools/clang/lib/Driver/Tools.cpp ++++ tools/clang/lib/Driver/Tools.cpp +@@ -737,8 +737,15 @@ + } + + case llvm::Triple::FreeBSD: +- // FreeBSD defaults to soft float +- FloatABI = "soft"; ++ switch(Triple.getEnvironment()) { ++ case llvm::Triple::GNUEABIHF: ++ FloatABI = "hard"; ++ break; ++ default: ++ // FreeBSD defaults to soft float ++ FloatABI = "soft"; ++ break; ++ } + break; + + default: +@@ -5776,8 +5783,18 @@ + } + } else if (getToolChain().getArch() == llvm::Triple::arm || + getToolChain().getArch() == llvm::Triple::thumb) { +- CmdArgs.push_back("-mfpu=softvfp"); ++ const Driver &D = getToolChain().getDriver(); ++ llvm::Triple Triple = getToolChain().getTriple(); ++ StringRef FloatABI = getARMFloatABI(D, Args, Triple); ++ ++ if (FloatABI == "hard") { ++ CmdArgs.push_back("-mfpu=vfp"); ++ } else { ++ CmdArgs.push_back("-mfpu=softvfp"); ++ } ++ + switch(getToolChain().getTriple().getEnvironment()) { ++ case llvm::Triple::GNUEABIHF: + case llvm::Triple::GNUEABI: + case llvm::Triple::EABI: + CmdArgs.push_back("-meabi=5"); +Index: tools/clang/test/Driver/freebsd.c +=================================================================== +--- tools/clang/test/Driver/freebsd.c ++++ tools/clang/test/Driver/freebsd.c +@@ -101,13 +101,22 @@ + // RUN: | FileCheck --check-prefix=CHECK-ARM %s + // CHECK-ARM: clang{{.*}}" "-cc1"{{.*}}" "-fsjlj-exceptions" + // CHECK-ARM: as{{.*}}" "-mfpu=softvfp"{{.*}}"-matpcs" ++// CHECK-ARM-EABI-NOT: as{{.*}}" "-mfpu=vfp" + + // RUN: %clang %s -### -target arm-gnueabi-freebsd10.0 2>&1 \ + // RUN: | FileCheck --check-prefix=CHECK-ARM-EABI %s + // CHECK-ARM-EABI-NOT: clang{{.*}}" "-cc1"{{.*}}" "-fsjlj-exceptions" + // CHECK-ARM-EABI: as{{.*}}" "-mfpu=softvfp" "-meabi=5" ++// CHECK-ARM-EABI-NOT: as{{.*}}" "-mfpu=vfp" + // CHECK-ARM-EABI-NOT: as{{.*}}" "-matpcs" + ++// RUN: %clang %s -### -o %t.o -target arm-gnueabihf-freebsd10.0 -no-integrated-as 2>&1 \ ++// RUN: | FileCheck --check-prefix=CHECK-ARM-EABIHF %s ++// CHECK-ARM-EABIHF-NOT: clang{{.*}}" "-cc1"{{.*}}" "-fsjlj-exceptions" ++// CHECK-ARM-EABIHF: as{{.*}}" "-mfpu=vfp" "-meabi=5" ++// CHECK-ARM-EABIHF-NOT: as{{.*}}" "-mfpu=softvfp" ++// CHECK-ARM-EABIHF-NOT: as{{.*}}" "-matpcs" ++ + // RUN: %clang -target x86_64-pc-freebsd8 %s -### -flto -o %t.o 2>&1 \ + // RUN: | FileCheck --check-prefix=CHECK-LTO %s + // CHECK-LTO: ld{{.*}}" "-plugin{{.*}}LLVMgold.so Modified: stable/10/lib/libc/arm/gen/flt_rounds.c ============================================================================== --- stable/10/lib/libc/arm/gen/flt_rounds.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/lib/libc/arm/gen/flt_rounds.c Sat May 17 18:53:36 2014 (r266337) @@ -30,20 +30,32 @@ __FBSDID("$FreeBSD$"); #include #include +#ifndef __ARM_PCS_VFP #include "softfloat-for-gcc.h" #include "milieu.h" #include "softfloat.h" +#endif int __flt_rounds(void) { + int mode; -#ifndef ARM_HARD_FLOAT +#ifndef __ARM_PCS_VFP /* * Translate our rounding modes to the unnamed * manifest constants required by C99 et. al. */ - switch (__softfloat_float_rounding_mode) { + mode = __softfloat_float_rounding_mode; +#else /* __ARM_PCS_VFP */ + /* + * Read the floating-point status and control register + */ + __asm __volatile("vmrs %0, fpscr" : "=&r"(mode)); + mode &= _ROUND_MASK; +#endif /* __ARM_PCS_VFP */ + + switch (mode) { case FE_TOWARDZERO: return (0); case FE_TONEAREST: @@ -54,12 +66,4 @@ __flt_rounds(void) return (3); } return (-1); -#else /* ARM_HARD_FLOAT */ - /* - * Apparently, the rounding mode is specified as part of the - * instruction format on ARM, so the dynamic rounding mode is - * indeterminate. Some FPUs may differ. - */ - return (-1); -#endif /* ARM_HARD_FLOAT */ } Modified: stable/10/sys/arm/allwinner/a10_clk.c ============================================================================== --- stable/10/sys/arm/allwinner/a10_clk.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/a10_clk.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu + * Copyright (c) 2013 Ganbold Tsagaankhuu * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/allwinner/a10_clk.h ============================================================================== --- stable/10/sys/arm/allwinner/a10_clk.h Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/a10_clk.h Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu + * Copyright (c) 2013 Ganbold Tsagaankhuu * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/allwinner/a10_common.c ============================================================================== --- stable/10/sys/arm/allwinner/a10_common.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/a10_common.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Ganbold Tsagaankhuu + * Copyright (c) 2012 Ganbold Tsagaankhuu * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/allwinner/a10_ehci.c ============================================================================== --- stable/10/sys/arm/allwinner/a10_ehci.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/a10_ehci.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Ganbold Tsagaankhuu + * Copyright (c) 2012 Ganbold Tsagaankhuu * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/allwinner/a10_gpio.c ============================================================================== --- stable/10/sys/arm/allwinner/a10_gpio.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/a10_gpio.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu + * Copyright (c) 2013 Ganbold Tsagaankhuu * Copyright (c) 2012 Oleksandr Tymoshenko * Copyright (c) 2012 Luiz Otavio O Souza. * All rights reserved. Modified: stable/10/sys/arm/allwinner/a10_gpio.h ============================================================================== --- stable/10/sys/arm/allwinner/a10_gpio.h Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/a10_gpio.h Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu + * Copyright (c) 2013 Ganbold Tsagaankhuu * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/allwinner/a10_machdep.c ============================================================================== --- stable/10/sys/arm/allwinner/a10_machdep.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/a10_machdep.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Ganbold Tsagaankhuu + * Copyright (c) 2012 Ganbold Tsagaankhuu * All rights reserved. * * This code is derived from software written for Brini by Mark Brinicombe Modified: stable/10/sys/arm/allwinner/a10_sramc.c ============================================================================== --- stable/10/sys/arm/allwinner/a10_sramc.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/a10_sramc.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu + * Copyright (c) 2013 Ganbold Tsagaankhuu * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/allwinner/a10_sramc.h ============================================================================== --- stable/10/sys/arm/allwinner/a10_sramc.h Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/a10_sramc.h Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu + * Copyright (c) 2013 Ganbold Tsagaankhuu * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/allwinner/a20/a20_cpu_cfg.c ============================================================================== --- stable/10/sys/arm/allwinner/a20/a20_cpu_cfg.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/a20/a20_cpu_cfg.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu + * Copyright (c) 2013 Ganbold Tsagaankhuu * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/allwinner/a20/a20_cpu_cfg.h ============================================================================== --- stable/10/sys/arm/allwinner/a20/a20_cpu_cfg.h Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/a20/a20_cpu_cfg.h Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu + * Copyright (c) 2013 Ganbold Tsagaankhuu * All rights reserved. * * Redistribution and use in source and binary forms, with or without Copied: stable/10/sys/arm/allwinner/a20/a20_mp.c (from r263698, head/sys/arm/allwinner/a20/a20_mp.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/allwinner/a20/a20_mp.c Sat May 17 18:53:36 2014 (r266337, copy of r263698, head/sys/arm/allwinner/a20/a20_mp.c) @@ -0,0 +1,158 @@ +/*- + * Copyright (c) 2014 Ganbold Tsagaankhuu + * All rights reserved. + * + * 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 ``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 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. + */ + +#include +__FBSDID("$FreeBSD$"); +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#define CPUCFG_BASE 0x01c25c00 +#define CPUCFG_SIZE 0x400 + +#define CPU0_RST_CTL 0x40 +#define CPU0_CTL 0x44 +#define CPU0_STATUS 0x48 +#define CPU1_RST_CTL 0x80 +#define CPU1_CTL 0x84 +#define CPU1_STATUS 0x88 +#define CPUCFG_GENCTL 0x184 +#define CPUCFG_P_REG0 0x1a4 +#define CPU1_PWR_CLAMP 0x1b0 +#define CPU1_PWROFF_REG 0x1b4 +#define CPUCFG_DBGCTL0 0x1e0 +#define CPUCFG_DBGCTL1 0x1e4 + +void +platform_mp_init_secondary(void) +{ + + gic_init_secondary(); +} + +void +platform_mp_setmaxid(void) +{ + int ncpu; + + if (mp_ncpus != 0) + return; + + /* Read current CP15 Cache Size ID Register */ + __asm __volatile("mrc p15, 1, %0, c9, c0, 2" : "=r" (ncpu)); + ncpu = ((ncpu >> 24) & 0x3) + 1; + + mp_ncpus = ncpu; + mp_maxid = ncpu - 1; +} + +int +platform_mp_probe(void) +{ + + if (mp_ncpus == 0) + platform_mp_setmaxid(); + + return (mp_ncpus > 1); +} + +void +platform_mp_start_ap(void) +{ + bus_space_handle_t cpucfg; + + uint32_t val; + + if (bus_space_map(fdtbus_bs_tag, CPUCFG_BASE, CPUCFG_SIZE, 0, + &cpucfg) != 0) + panic("Couldn't map the CPUCFG\n"); + + cpu_idcache_wbinv_all(); + cpu_l2cache_wbinv_all(); + + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPUCFG_P_REG0, + pmap_kextract((vm_offset_t)mpentry)); + + /* + * Assert nCOREPORESET low and set L1RSTDISABLE low. + * Ensure DBGPWRDUP is set to LOW to prevent any external + * debug access to the processor. + */ + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_RST_CTL, 0); + + /* Set L1RSTDISABLE low */ + val = bus_space_read_4(fdtbus_bs_tag, cpucfg, CPUCFG_GENCTL); + val &= ~(1 << 1); + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPUCFG_GENCTL, val); + + /* Set DBGPWRDUP low */ + val = bus_space_read_4(fdtbus_bs_tag, cpucfg, CPUCFG_DBGCTL1); + val &= ~(1 << 1); + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPUCFG_DBGCTL1, val); + + /* Release power clamp */ + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWR_CLAMP, 0xff); + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWR_CLAMP, 0x7f); + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWR_CLAMP, 0x3f); + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWR_CLAMP, 0x1f); + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWR_CLAMP, 0x0f); + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWR_CLAMP, 0x07); + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWR_CLAMP, 0x03); + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWR_CLAMP, 0x01); + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWR_CLAMP, 0x00); + DELAY(10000); + + /* Clear power-off gating */ + val = bus_space_read_4(fdtbus_bs_tag, cpucfg, CPU1_PWROFF_REG); + val &= ~(1 << 0); + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWROFF_REG, val); + DELAY(1000); + + /* De-assert cpu core reset */ + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_RST_CTL, 3); + + /* Assert DBGPWRDUP signal */ + val = bus_space_read_4(fdtbus_bs_tag, cpucfg, CPUCFG_DBGCTL1); + val |= (1 << 1); + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPUCFG_DBGCTL1, val); + + armv7_sev(); + bus_space_unmap(fdtbus_bs_tag, cpucfg, CPUCFG_SIZE); +} + +void +platform_ipi_send(cpuset_t cpus, u_int ipi) +{ + + pic_ipi_send(cpus, ipi); +} Modified: stable/10/sys/arm/allwinner/a20/files.a20 ============================================================================== --- stable/10/sys/arm/allwinner/a20/files.a20 Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/a20/files.a20 Sat May 17 18:53:36 2014 (r266337) @@ -20,3 +20,4 @@ arm/allwinner/timer.c standard arm/allwinner/bus_space.c standard arm/allwinner/a10_common.c standard arm/allwinner/a10_machdep.c standard +arm/allwinner/a20/a20_mp.c optional smp Modified: stable/10/sys/arm/allwinner/aintc.c ============================================================================== --- stable/10/sys/arm/allwinner/aintc.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/aintc.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Ganbold Tsagaankhuu + * Copyright (c) 2012 Ganbold Tsagaankhuu * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/allwinner/console.c ============================================================================== --- stable/10/sys/arm/allwinner/console.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/console.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Ganbold Tsagaankhuu + * Copyright (c) 2012 Ganbold Tsagaankhuu * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/allwinner/if_emac.c ============================================================================== --- stable/10/sys/arm/allwinner/if_emac.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/if_emac.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu + * Copyright (c) 2013 Ganbold Tsagaankhuu * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/allwinner/if_emacreg.h ============================================================================== --- stable/10/sys/arm/allwinner/if_emacreg.h Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/if_emacreg.h Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013 Ganbold Tsagaankhuu + * Copyright (C) 2013 Ganbold Tsagaankhuu * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/allwinner/timer.c ============================================================================== --- stable/10/sys/arm/allwinner/timer.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/timer.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Ganbold Tsagaankhuu + * Copyright (c) 2012 Ganbold Tsagaankhuu * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/conf/CUBIEBOARD2 ============================================================================== --- stable/10/sys/arm/conf/CUBIEBOARD2 Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/conf/CUBIEBOARD2 Sat May 17 18:53:36 2014 (r266337) @@ -138,3 +138,4 @@ options FDT options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=cubieboard2.dts +options SMP # Enable multiple cores Modified: stable/10/sys/arm/include/param.h ============================================================================== --- stable/10/sys/arm/include/param.h Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/include/param.h Sat May 17 18:53:36 2014 (r266337) @@ -52,23 +52,29 @@ #define __PCI_REROUTE_INTERRUPT -#ifndef MACHINE -#define MACHINE "arm" -#endif -#ifndef MACHINE_ARCH #if defined(__FreeBSD_ARCH_armv6__) || (defined(__ARM_ARCH) && __ARM_ARCH >= 6) -#ifdef __ARMEB__ -#define MACHINE_ARCH "armv6eb" +#define _V6_SUFFIX "v6" #else -#define MACHINE_ARCH "armv6" +#define _V6_SUFFIX "" #endif + +#ifdef __ARM_PCS_VFP +#define _HF_SUFFIX "hf" #else +#define _HF_SUFFIX "" +#endif + #ifdef __ARMEB__ -#define MACHINE_ARCH "armeb" +#define _EB_SUFFIX "eb" #else -#define MACHINE_ARCH "arm" +#define _EB_SUFFIX "" #endif + +#ifndef MACHINE +#define MACHINE "arm" #endif +#ifndef MACHINE_ARCH +#define MACHINE_ARCH "arm" _V6_SUFFIX _HF_SUFFIX _EB_SUFFIX #endif #if defined(SMP) || defined(KLD_MODULE) Modified: stable/10/sys/arm/include/pmap.h ============================================================================== --- stable/10/sys/arm/include/pmap.h Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/include/pmap.h Sat May 17 18:53:36 2014 (r266337) @@ -341,47 +341,7 @@ extern int pmap_needs_pte_sync; #define L2_AP(x) (L2_AP0(x) | L2_AP1(x) | L2_AP2(x) | L2_AP3(x)) #endif -#if ARM_NMMUS > 1 -/* More than one MMU class configured; use variables. */ -#define L2_S_PROT_U pte_l2_s_prot_u -#define L2_S_PROT_W pte_l2_s_prot_w -#define L2_S_PROT_MASK pte_l2_s_prot_mask - -#define L1_S_CACHE_MASK pte_l1_s_cache_mask -#define L2_L_CACHE_MASK pte_l2_l_cache_mask -#define L2_S_CACHE_MASK pte_l2_s_cache_mask - -#define L1_S_PROTO pte_l1_s_proto -#define L1_C_PROTO pte_l1_c_proto -#define L2_S_PROTO pte_l2_s_proto - -#elif ARM_MMU_GENERIC != 0 -#define L2_S_PROT_U L2_S_PROT_U_generic -#define L2_S_PROT_W L2_S_PROT_W_generic -#define L2_S_PROT_MASK L2_S_PROT_MASK_generic - -#define L1_S_CACHE_MASK L1_S_CACHE_MASK_generic -#define L2_L_CACHE_MASK L2_L_CACHE_MASK_generic -#define L2_S_CACHE_MASK L2_S_CACHE_MASK_generic - -#define L1_S_PROTO L1_S_PROTO_generic -#define L1_C_PROTO L1_C_PROTO_generic -#define L2_S_PROTO L2_S_PROTO_generic - -#elif ARM_MMU_XSCALE == 1 -#define L2_S_PROT_U L2_S_PROT_U_xscale -#define L2_S_PROT_W L2_S_PROT_W_xscale -#define L2_S_PROT_MASK L2_S_PROT_MASK_xscale - -#define L1_S_CACHE_MASK L1_S_CACHE_MASK_xscale -#define L2_L_CACHE_MASK L2_L_CACHE_MASK_xscale -#define L2_S_CACHE_MASK L2_S_CACHE_MASK_xscale - -#define L1_S_PROTO L1_S_PROTO_xscale -#define L1_C_PROTO L1_C_PROTO_xscale -#define L2_S_PROTO L2_S_PROTO_xscale - -#elif (ARM_MMU_V6 + ARM_MMU_V7) != 0 +#if (ARM_MMU_V6 + ARM_MMU_V7) != 0 /* * AP[2:1] access permissions model: * @@ -486,6 +446,47 @@ extern int pmap_needs_pte_sync; #define ARM_L2S_NRML_IWB_OWB (L2_C|L2_B|L2_SHARED) #define ARM_L2S_NRML_IWBA_OWBA (L2_S_TEX(1)|L2_C|L2_B|L2_SHARED) #endif /* SMP */ + +#elif ARM_NMMUS > 1 +/* More than one MMU class configured; use variables. */ +#define L2_S_PROT_U pte_l2_s_prot_u +#define L2_S_PROT_W pte_l2_s_prot_w +#define L2_S_PROT_MASK pte_l2_s_prot_mask + +#define L1_S_CACHE_MASK pte_l1_s_cache_mask +#define L2_L_CACHE_MASK pte_l2_l_cache_mask +#define L2_S_CACHE_MASK pte_l2_s_cache_mask + +#define L1_S_PROTO pte_l1_s_proto +#define L1_C_PROTO pte_l1_c_proto +#define L2_S_PROTO pte_l2_s_proto + +#elif ARM_MMU_GENERIC != 0 +#define L2_S_PROT_U L2_S_PROT_U_generic +#define L2_S_PROT_W L2_S_PROT_W_generic +#define L2_S_PROT_MASK L2_S_PROT_MASK_generic + +#define L1_S_CACHE_MASK L1_S_CACHE_MASK_generic +#define L2_L_CACHE_MASK L2_L_CACHE_MASK_generic +#define L2_S_CACHE_MASK L2_S_CACHE_MASK_generic + +#define L1_S_PROTO L1_S_PROTO_generic +#define L1_C_PROTO L1_C_PROTO_generic +#define L2_S_PROTO L2_S_PROTO_generic + +#elif ARM_MMU_XSCALE == 1 +#define L2_S_PROT_U L2_S_PROT_U_xscale +#define L2_S_PROT_W L2_S_PROT_W_xscale +#define L2_S_PROT_MASK L2_S_PROT_MASK_xscale + +#define L1_S_CACHE_MASK L1_S_CACHE_MASK_xscale +#define L2_L_CACHE_MASK L2_L_CACHE_MASK_xscale +#define L2_S_CACHE_MASK L2_S_CACHE_MASK_xscale + +#define L1_S_PROTO L1_S_PROTO_xscale +#define L1_C_PROTO L1_C_PROTO_xscale +#define L2_S_PROTO L2_S_PROTO_xscale + #endif /* ARM_NMMUS > 1 */ #if defined(CPU_XSCALE_81342) || ARM_ARCH_6 || ARM_ARCH_7A Modified: stable/10/sys/arm/rockchip/rk30xx_common.c ============================================================================== --- stable/10/sys/arm/rockchip/rk30xx_common.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/rockchip/rk30xx_common.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu + * Copyright (c) 2013 Ganbold Tsagaankhuu * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/rockchip/rk30xx_gpio.c ============================================================================== --- stable/10/sys/arm/rockchip/rk30xx_gpio.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/rockchip/rk30xx_gpio.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu + * Copyright (c) 2013 Ganbold Tsagaankhuu * Copyright (c) 2012 Oleksandr Tymoshenko * Copyright (c) 2012 Luiz Otavio O Souza. * All rights reserved. Modified: stable/10/sys/arm/rockchip/rk30xx_grf.c ============================================================================== --- stable/10/sys/arm/rockchip/rk30xx_grf.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/rockchip/rk30xx_grf.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu + * Copyright (c) 2013 Ganbold Tsagaankhuu * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/rockchip/rk30xx_grf.h ============================================================================== --- stable/10/sys/arm/rockchip/rk30xx_grf.h Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/rockchip/rk30xx_grf.h Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu + * Copyright (c) 2013 Ganbold Tsagaankhuu * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/rockchip/rk30xx_machdep.c ============================================================================== --- stable/10/sys/arm/rockchip/rk30xx_machdep.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/rockchip/rk30xx_machdep.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu + * Copyright (c) 2013 Ganbold Tsagaankhuu * All rights reserved. * * This code is derived from software written for Brini by Mark Brinicombe Modified: stable/10/sys/arm/rockchip/rk30xx_pmu.c ============================================================================== --- stable/10/sys/arm/rockchip/rk30xx_pmu.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/rockchip/rk30xx_pmu.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu + * Copyright (c) 2013 Ganbold Tsagaankhuu * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/rockchip/rk30xx_pmu.h ============================================================================== --- stable/10/sys/arm/rockchip/rk30xx_pmu.h Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/rockchip/rk30xx_pmu.h Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu + * Copyright (c) 2013 Ganbold Tsagaankhuu * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/rockchip/rk30xx_wdog.c ============================================================================== --- stable/10/sys/arm/rockchip/rk30xx_wdog.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/rockchip/rk30xx_wdog.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu + * Copyright (c) 2013 Ganbold Tsagaankhuu * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/rockchip/rk30xx_wdog.h ============================================================================== --- stable/10/sys/arm/rockchip/rk30xx_wdog.h Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/rockchip/rk30xx_wdog.h Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu + * Copyright (c) 2013 Ganbold Tsagaankhuu * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/boot/fdt/dts/arm/cubieboard.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/cubieboard.dts Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/boot/fdt/dts/arm/cubieboard.dts Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Ganbold Tsagaankhuu + * Copyright (c) 2012 Ganbold Tsagaankhuu * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/boot/fdt/dts/arm/cubieboard2.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/cubieboard2.dts Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/boot/fdt/dts/arm/cubieboard2.dts Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu + * Copyright (c) 2013 Ganbold Tsagaankhuu * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/boot/fdt/dts/arm/rk3188-radxa.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/rk3188-radxa.dts Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/boot/fdt/dts/arm/rk3188-radxa.dts Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu + * Copyright (c) 2013 Ganbold Tsagaankhuu * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/boot/fdt/dts/arm/rk3188.dtsi ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/rk3188.dtsi Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/boot/fdt/dts/arm/rk3188.dtsi Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu + * Copyright (c) 2013 Ganbold Tsagaankhuu * All rights reserved. * * Redistribution and use in source and binary forms, with or without From owner-svn-src-stable@FreeBSD.ORG Sat May 17 19:06:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D21EEC0; Sat, 17 May 2014 19:06:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6659D2E76; Sat, 17 May 2014 19:06:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HJ6mmB020883; Sat, 17 May 2014 19:06:48 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HJ6kxE020872; Sat, 17 May 2014 19:06:46 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201405171906.s4HJ6kxE020872@svn.freebsd.org> From: Luiz Otavio O Souza Date: Sat, 17 May 2014 19:06:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266338 - in stable/10: share/man/man4/man4.arm sys/arm/conf sys/arm/ti sys/arm/ti/am335x sys/boot/fdt/dts/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 19:06:48 -0000 Author: loos Date: Sat May 17 19:06:46 2014 New Revision: 266338 URL: http://svnweb.freebsd.org/changeset/base/266338 Log: Adds the ADC driver for TI AM3xxx SoC family. The ADC has a 12bit resolution and its raw output can be read via sysctl(8) interface. The driver allows the setup of ADC clock, samples average and open delay (the number of clock cycles to wait before start the conversion). The TSC_ADC module is set in the general purpose mode (no touchscreen support). Tested on Beaglebone-black. Written based on AM335x TRM. Added: stable/10/share/man/man4/man4.arm/ti_adc.4 - copied unchanged from r263693, head/share/man/man4/man4.arm/ti_adc.4 stable/10/sys/arm/ti/ti_adc.c - copied unchanged from r263693, head/sys/arm/ti/ti_adc.c stable/10/sys/arm/ti/ti_adcreg.h - copied unchanged from r263693, head/sys/arm/ti/ti_adcreg.h stable/10/sys/arm/ti/ti_adcvar.h - copied unchanged from r263693, head/sys/arm/ti/ti_adcvar.h Modified: stable/10/share/man/man4/man4.arm/Makefile stable/10/sys/arm/conf/BEAGLEBONE stable/10/sys/arm/ti/am335x/am335x_prcm.c stable/10/sys/arm/ti/files.ti stable/10/sys/arm/ti/ti_prcm.h stable/10/sys/boot/fdt/dts/arm/am335x.dtsi Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/man4.arm/Makefile ============================================================================== --- stable/10/share/man/man4/man4.arm/Makefile Sat May 17 18:53:36 2014 (r266337) +++ stable/10/share/man/man4/man4.arm/Makefile Sat May 17 19:06:46 2014 (r266338) @@ -1,6 +1,9 @@ # $FreeBSD$ -MAN= mge.4 npe.4 devcfg.4 +MAN= devcfg.4 \ + mge.4 \ + npe.4 \ + ti_adc.4 MLINKS= mge.4 if_mge.4 MLINKS+=npe.4 if_npe.4 Copied: stable/10/share/man/man4/man4.arm/ti_adc.4 (from r263693, head/share/man/man4/man4.arm/ti_adc.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man4/man4.arm/ti_adc.4 Sat May 17 19:06:46 2014 (r266338, copy of r263693, head/share/man/man4/man4.arm/ti_adc.4) @@ -0,0 +1,119 @@ +.\" +.\" Copyright (c) 2014 Luiz Otavio O Souza +.\" All rights reserved. +.\" +.\" 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 ``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 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. +.\" +.\" $FreeBSD$ +.\" +.Dd March 21, 2014 +.Dt TI_ADC 4 +.Os +.Sh NAME +.Nm ti_adc +.Nd TI AM3XXX analog to digital converter driver +.Sh SYNOPSIS +.Cd "device ti_adc" +.Sh DESCRIPTION +The +.Nm +driver provides access to the AIN (analog inputs) on am3xxx SoCs. +.Pp +It provides raw readings of the converted values for each analog inputs. +.Pp +The access to +.Nm +data is made via the +.Xr sysctl 8 +interface: +.Bd -literal +dev.ti_adc.0.%desc: TI ADC controller +dev.ti_adc.0.%driver: ti_adc +dev.ti_adc.0.%pnpinfo: name=adc@44E0D000 compat=ti,adc +dev.ti_adc.0.%parent: simplebus0 +dev.ti_adc.0.clockdiv: 2400 +dev.ti_adc.0.ain.0.enable: 0 +dev.ti_adc.0.ain.0.open_delay: 0 +dev.ti_adc.0.ain.0.samples_avg: 0 +dev.ti_adc.0.ain.0.input: 0 +dev.ti_adc.0.ain.1.enable: 0 +dev.ti_adc.0.ain.1.open_delay: 0 +dev.ti_adc.0.ain.1.samples_avg: 0 +dev.ti_adc.0.ain.1.input: 0 +dev.ti_adc.0.ain.2.enable: 0 +dev.ti_adc.0.ain.2.open_delay: 0 +dev.ti_adc.0.ain.2.samples_avg: 0 +dev.ti_adc.0.ain.2.input: 0 +dev.ti_adc.0.ain.3.enable: 0 +dev.ti_adc.0.ain.3.open_delay: 0 +dev.ti_adc.0.ain.3.samples_avg: 0 +dev.ti_adc.0.ain.3.input: 0 +dev.ti_adc.0.ain.4.enable: 0 +dev.ti_adc.0.ain.4.open_delay: 0 +dev.ti_adc.0.ain.4.samples_avg: 0 +dev.ti_adc.0.ain.4.input: 0 +dev.ti_adc.0.ain.5.enable: 0 +dev.ti_adc.0.ain.5.open_delay: 0 +dev.ti_adc.0.ain.5.samples_avg: 0 +dev.ti_adc.0.ain.5.input: 0 +dev.ti_adc.0.ain.6.enable: 1 +dev.ti_adc.0.ain.6.open_delay: 0 +dev.ti_adc.0.ain.6.samples_avg: 4 +dev.ti_adc.0.ain.6.input: 2308 +.Ed +.Pp +Global settings: +.Bl -tag -width ".Va dev.ti_adc.0.clockdiv" +.It Va dev.ti_adc.0.clockdiv +Sets the ADC clock prescaler. +The minimum value is 10 and the maximum is 65535. +The ADC clock is based on CLK_M_OSC (24Mhz) / clockdiv. +This gives a maximum of ~2.4Mhz for the ADC clock and ~10Khz for the default +setting (clockdiv = 2400). +.El +.Pp +Settings per input: +.Bl -tag -width ".Va dev.ti_adc.0.ain.%d.samples_avg" +.It Va dev.ti_adc.0.ain.%d.enable +Enable the conversion for the input. +Each input should be individually enabled before it can be used. +When all the inputs are disabled, the ADC is turned off. +.It Va dev.ti_adc.0.ain.%d.open_delay +Sets the number of ADC clock cycles to wait after applying the input +configuration and before start the ADC conversion. +.It Va dev.ti_adc.0.ain.%d.samples_avg +Sets the number of samples average used on each input, it can be set to 0 +(no samples average), 2, 4, 8, or 16. +.It Va dev.ti_adc.0.ain.%d.input +Is the converted raw value of the voltage applied on the analog input. +It is made of a 12 bit value (0 ~ 4095). +.El +.Sh SEE ALSO +.Xr sysctl 8 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 11.0 . +.Sh AUTHORS +.An -nosplit +The driver and this manual page was written by +.An Luiz Otavio O Souza Aq loos@FreeBSD.org Modified: stable/10/sys/arm/conf/BEAGLEBONE ============================================================================== --- stable/10/sys/arm/conf/BEAGLEBONE Sat May 17 18:53:36 2014 (r266337) +++ stable/10/sys/arm/conf/BEAGLEBONE Sat May 17 19:06:46 2014 (r266338) @@ -105,6 +105,9 @@ device am335x_pmic # AM335x Power Mana device gpio device gpioled +# ADC support +device ti_adc + # USB support device usb options USB_HOST_ALIGN=64 # Cacheline size is 64 on AM335x. Modified: stable/10/sys/arm/ti/am335x/am335x_prcm.c ============================================================================== --- stable/10/sys/arm/ti/am335x/am335x_prcm.c Sat May 17 18:53:36 2014 (r266337) +++ stable/10/sys/arm/ti/am335x/am335x_prcm.c Sat May 17 19:06:46 2014 (r266338) @@ -107,6 +107,7 @@ __FBSDID("$FreeBSD$"); #define CM_WKUP_CM_CLKDCOLDO_DPLL_PER (CM_WKUP + 0x07C) #define CM_WKUP_CM_CLKMODE_DPLL_DISP (CM_WKUP + 0x098) #define CM_WKUP_I2C0_CLKCTRL (CM_WKUP + 0x0B8) +#define CM_WKUP_ADC_TSC_CLKCTRL (CM_WKUP + 0x0BC) #define CM_DPLL 0x500 #define CLKSEL_TIMER7_CLK (CM_DPLL + 0x004) @@ -260,6 +261,9 @@ struct ti_clock_dev ti_clk_devmap[] = { AM335X_GENERIC_CLOCK_DEV(I2C1_CLK), AM335X_GENERIC_CLOCK_DEV(I2C2_CLK), + /* TSC_ADC */ + AM335X_GENERIC_CLOCK_DEV(TSC_ADC_CLK), + /* EDMA */ AM335X_GENERIC_CLOCK_DEV(EDMA_TPCC_CLK), AM335X_GENERIC_CLOCK_DEV(EDMA_TPTC0_CLK), @@ -337,6 +341,9 @@ static struct am335x_clk_details g_am335 _CLK_DETAIL(I2C1_CLK, CM_PER_I2C1_CLKCTRL, 0), _CLK_DETAIL(I2C2_CLK, CM_PER_I2C2_CLKCTRL, 0), + /* TSC_ADC module */ + _CLK_DETAIL(TSC_ADC_CLK, CM_WKUP_ADC_TSC_CLKCTRL, 0), + /* EDMA modules */ _CLK_DETAIL(EDMA_TPCC_CLK, CM_PER_TPCC_CLKCTRL, 0), _CLK_DETAIL(EDMA_TPTC0_CLK, CM_PER_TPTC0_CLKCTRL, 0), Modified: stable/10/sys/arm/ti/files.ti ============================================================================== --- stable/10/sys/arm/ti/files.ti Sat May 17 18:53:36 2014 (r266337) +++ stable/10/sys/arm/ti/files.ti Sat May 17 19:06:46 2014 (r266338) @@ -19,6 +19,7 @@ dev/mbox/mbox_if.m standard arm/ti/ti_mbox.c standard arm/ti/ti_pruss.c standard +arm/ti/ti_adc.c optional ti_adc arm/ti/ti_gpio.c optional gpio arm/ti/ti_i2c.c optional ti_i2c Copied: stable/10/sys/arm/ti/ti_adc.c (from r263693, head/sys/arm/ti/ti_adc.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/ti/ti_adc.c Sat May 17 19:06:46 2014 (r266338, copy of r263693, head/sys/arm/ti/ti_adc.c) @@ -0,0 +1,593 @@ +/*- + * Copyright 2014 Luiz Otavio O Souza + * All rights reserved. + * + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include +#include +#include + +/* Define our 7 steps, one for each input channel. */ +static struct ti_adc_input ti_adc_inputs[TI_ADC_NPINS] = { + { .stepconfig = ADC_STEPCFG1, .stepdelay = ADC_STEPDLY1 }, + { .stepconfig = ADC_STEPCFG2, .stepdelay = ADC_STEPDLY2 }, + { .stepconfig = ADC_STEPCFG3, .stepdelay = ADC_STEPDLY3 }, + { .stepconfig = ADC_STEPCFG4, .stepdelay = ADC_STEPDLY4 }, + { .stepconfig = ADC_STEPCFG5, .stepdelay = ADC_STEPDLY5 }, + { .stepconfig = ADC_STEPCFG6, .stepdelay = ADC_STEPDLY6 }, + { .stepconfig = ADC_STEPCFG7, .stepdelay = ADC_STEPDLY7 }, +}; + +static int ti_adc_samples[5] = { 0, 2, 4, 8, 16 }; + +static void +ti_adc_enable(struct ti_adc_softc *sc) +{ + + TI_ADC_LOCK_ASSERT(sc); + + if (sc->sc_last_state == 1) + return; + + /* Enable the FIFO0 threshold and the end of sequence interrupt. */ + ADC_WRITE4(sc, ADC_IRQENABLE_SET, + ADC_IRQ_FIFO0_THRES | ADC_IRQ_END_OF_SEQ); + + /* Enable the ADC. Run thru enabled steps, start the conversions. */ + ADC_WRITE4(sc, ADC_CTRL, ADC_READ4(sc, ADC_CTRL) | ADC_CTRL_ENABLE); + + sc->sc_last_state = 1; +} + +static void +ti_adc_disable(struct ti_adc_softc *sc) +{ + int count; + uint32_t data; + + TI_ADC_LOCK_ASSERT(sc); + + if (sc->sc_last_state == 0) + return; + + /* Disable all the enabled steps. */ + ADC_WRITE4(sc, ADC_STEPENABLE, 0); + + /* Disable the ADC. */ + ADC_WRITE4(sc, ADC_CTRL, ADC_READ4(sc, ADC_CTRL) & ~ADC_CTRL_ENABLE); + + /* Disable the FIFO0 threshold and the end of sequence interrupt. */ + ADC_WRITE4(sc, ADC_IRQENABLE_CLR, + ADC_IRQ_FIFO0_THRES | ADC_IRQ_END_OF_SEQ); + + /* ACK any pending interrupt. */ + ADC_WRITE4(sc, ADC_IRQSTATUS, ADC_READ4(sc, ADC_IRQSTATUS)); + + /* Drain the FIFO data. */ + count = ADC_READ4(sc, ADC_FIFO0COUNT) & ADC_FIFO_COUNT_MSK; + while (count > 0) { + data = ADC_READ4(sc, ADC_FIFO0DATA); + count = ADC_READ4(sc, ADC_FIFO0COUNT) & ADC_FIFO_COUNT_MSK; + } + + sc->sc_last_state = 0; +} + +static int +ti_adc_setup(struct ti_adc_softc *sc) +{ + int ain; + uint32_t enabled; + + TI_ADC_LOCK_ASSERT(sc); + + /* Check for enabled inputs. */ + enabled = 0; + for (ain = 0; ain < TI_ADC_NPINS; ain++) { + if (ti_adc_inputs[ain].enable) + enabled |= (1U << (ain + 1)); + } + + /* Set the ADC global status. */ + if (enabled != 0) { + ti_adc_enable(sc); + /* Update the enabled steps. */ + if (enabled != ADC_READ4(sc, ADC_STEPENABLE)) + ADC_WRITE4(sc, ADC_STEPENABLE, enabled); + } else + ti_adc_disable(sc); + + return (0); +} + +static void +ti_adc_input_setup(struct ti_adc_softc *sc, int32_t ain) +{ + struct ti_adc_input *input; + uint32_t reg, val; + + TI_ADC_LOCK_ASSERT(sc); + + input = &ti_adc_inputs[ain]; + reg = input->stepconfig; + val = ADC_READ4(sc, reg); + + /* Set single ended operation. */ + val &= ~ADC_STEP_DIFF_CNTRL; + + /* Set the negative voltage reference. */ + val &= ~ADC_STEP_RFM_MSK; + val |= ADC_STEP_RFM_VREFN << ADC_STEP_RFM_SHIFT; + + /* Set the positive voltage reference. */ + val &= ~ADC_STEP_RFP_MSK; + val |= ADC_STEP_RFP_VREFP << ADC_STEP_RFP_SHIFT; + + /* Set the samples average. */ + val &= ~ADC_STEP_AVG_MSK; + val |= input->samples << ADC_STEP_AVG_SHIFT; + + /* Select the desired input. */ + val &= ~ADC_STEP_INP_MSK; + val |= ain << ADC_STEP_INP_SHIFT; + + /* Set the ADC to one-shot mode. */ + val &= ~ADC_STEP_MODE_MSK; + + ADC_WRITE4(sc, reg, val); +} + +static void +ti_adc_reset(struct ti_adc_softc *sc) +{ + int ain; + + TI_ADC_LOCK_ASSERT(sc); + + /* Disable all the inputs. */ + for (ain = 0; ain < TI_ADC_NPINS; ain++) + ti_adc_inputs[ain].enable = 0; +} + +static int +ti_adc_clockdiv_proc(SYSCTL_HANDLER_ARGS) +{ + int error, reg; + struct ti_adc_softc *sc; + + sc = (struct ti_adc_softc *)arg1; + + TI_ADC_LOCK(sc); + reg = (int)ADC_READ4(sc, ADC_CLKDIV) + 1; + TI_ADC_UNLOCK(sc); + + error = sysctl_handle_int(oidp, ®, sizeof(reg), req); + if (error != 0 || req->newptr == NULL) + return (error); + + /* + * The actual written value is the prescaler setting - 1. + * Enforce a minimum value of 10 (i.e. 9) which limits the maximum + * ADC clock to ~2.4Mhz (CLK_M_OSC / 10). + */ + reg--; + if (reg < 9) + reg = 9; + if (reg > USHRT_MAX) + reg = USHRT_MAX; + + TI_ADC_LOCK(sc); + /* Disable the ADC. */ + ti_adc_disable(sc); + /* Update the ADC prescaler setting. */ + ADC_WRITE4(sc, ADC_CLKDIV, reg); + /* Enable the ADC again. */ + ti_adc_setup(sc); + TI_ADC_UNLOCK(sc); + + return (0); +} + +static int +ti_adc_enable_proc(SYSCTL_HANDLER_ARGS) +{ + int error; + int32_t enable; + struct ti_adc_softc *sc; + struct ti_adc_input *input; + + input = (struct ti_adc_input *)arg1; + sc = input->sc; + + enable = input->enable; + error = sysctl_handle_int(oidp, &enable, sizeof(enable), + req); + if (error != 0 || req->newptr == NULL) + return (error); + + if (enable) + enable = 1; + + TI_ADC_LOCK(sc); + /* Setup the ADC as needed. */ + if (input->enable != enable) { + input->enable = enable; + ti_adc_setup(sc); + if (input->enable == 0) + input->value = 0; + } + TI_ADC_UNLOCK(sc); + + return (0); +} + +static int +ti_adc_open_delay_proc(SYSCTL_HANDLER_ARGS) +{ + int error, reg; + struct ti_adc_softc *sc; + struct ti_adc_input *input; + + input = (struct ti_adc_input *)arg1; + sc = input->sc; + + TI_ADC_LOCK(sc); + reg = (int)ADC_READ4(sc, input->stepdelay) & ADC_STEP_OPEN_DELAY; + TI_ADC_UNLOCK(sc); + + error = sysctl_handle_int(oidp, ®, sizeof(reg), req); + if (error != 0 || req->newptr == NULL) + return (error); + + if (reg < 0) + reg = 0; + + TI_ADC_LOCK(sc); + ADC_WRITE4(sc, input->stepdelay, reg & ADC_STEP_OPEN_DELAY); + TI_ADC_UNLOCK(sc); + + return (0); +} + +static int +ti_adc_samples_avg_proc(SYSCTL_HANDLER_ARGS) +{ + int error, samples, i; + struct ti_adc_softc *sc; + struct ti_adc_input *input; + + input = (struct ti_adc_input *)arg1; + sc = input->sc; + + if (input->samples > nitems(ti_adc_samples)) + input->samples = nitems(ti_adc_samples); + samples = ti_adc_samples[input->samples]; + + error = sysctl_handle_int(oidp, &samples, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + + TI_ADC_LOCK(sc); + if (samples != ti_adc_samples[input->samples]) { + input->samples = 0; + for (i = 0; i < nitems(ti_adc_samples); i++) + if (samples >= ti_adc_samples[i]) + input->samples = i; + ti_adc_input_setup(sc, input->input); + } + TI_ADC_UNLOCK(sc); + + return (error); +} + +static void +ti_adc_read_data(struct ti_adc_softc *sc) +{ + int count, ain; + struct ti_adc_input *input; + uint32_t data; + + TI_ADC_LOCK_ASSERT(sc); + + /* Read the available data. */ + count = ADC_READ4(sc, ADC_FIFO0COUNT) & ADC_FIFO_COUNT_MSK; + while (count > 0) { + data = ADC_READ4(sc, ADC_FIFO0DATA); + ain = (data & ADC_FIFO_STEP_ID_MSK) >> ADC_FIFO_STEP_ID_SHIFT; + input = &ti_adc_inputs[ain]; + if (input->enable == 0) + input->value = 0; + else + input->value = (int32_t)(data & ADC_FIFO_DATA_MSK); + count = ADC_READ4(sc, ADC_FIFO0COUNT) & ADC_FIFO_COUNT_MSK; + } +} + +static void +ti_adc_intr(void *arg) +{ + struct ti_adc_softc *sc; + uint32_t status; + + sc = (struct ti_adc_softc *)arg; + + status = ADC_READ4(sc, ADC_IRQSTATUS); + if (status == 0) + return; + if (status & ~(ADC_IRQ_FIFO0_THRES | ADC_IRQ_END_OF_SEQ)) + device_printf(sc->sc_dev, "stray interrupt: %#x\n", status); + + TI_ADC_LOCK(sc); + /* ACK the interrupt. */ + ADC_WRITE4(sc, ADC_IRQSTATUS, status); + + /* Read the available data. */ + if (status & ADC_IRQ_FIFO0_THRES) + ti_adc_read_data(sc); + + /* Start the next conversion ? */ + if (status & ADC_IRQ_END_OF_SEQ) + ti_adc_setup(sc); + TI_ADC_UNLOCK(sc); +} + +static void +ti_adc_sysctl_init(struct ti_adc_softc *sc) +{ + char pinbuf[3]; + struct sysctl_ctx_list *ctx; + struct sysctl_oid *tree_node, *inp_node, *inpN_node; + struct sysctl_oid_list *tree, *inp_tree, *inpN_tree; + int ain; + + /* + * Add per-pin sysctl tree/handlers. + */ + ctx = device_get_sysctl_ctx(sc->sc_dev); + tree_node = device_get_sysctl_tree(sc->sc_dev); + tree = SYSCTL_CHILDREN(tree_node); + SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "clockdiv", + CTLFLAG_RW | CTLTYPE_UINT, sc, 0, + ti_adc_clockdiv_proc, "IU", "ADC clock prescaler"); + inp_node = SYSCTL_ADD_NODE(ctx, tree, OID_AUTO, "ain", + CTLFLAG_RD, NULL, "ADC inputs"); + inp_tree = SYSCTL_CHILDREN(inp_node); + + for (ain = 0; ain < TI_ADC_NPINS; ain++) { + + snprintf(pinbuf, sizeof(pinbuf), "%d", ain); + inpN_node = SYSCTL_ADD_NODE(ctx, inp_tree, OID_AUTO, pinbuf, + CTLFLAG_RD, NULL, "ADC input"); + inpN_tree = SYSCTL_CHILDREN(inpN_node); + + SYSCTL_ADD_PROC(ctx, inpN_tree, OID_AUTO, "enable", + CTLFLAG_RW | CTLTYPE_UINT, &ti_adc_inputs[ain], 0, + ti_adc_enable_proc, "IU", "Enable ADC input"); + SYSCTL_ADD_PROC(ctx, inpN_tree, OID_AUTO, "open_delay", + CTLFLAG_RW | CTLTYPE_UINT, &ti_adc_inputs[ain], 0, + ti_adc_open_delay_proc, "IU", "ADC open delay"); + SYSCTL_ADD_PROC(ctx, inpN_tree, OID_AUTO, "samples_avg", + CTLFLAG_RW | CTLTYPE_UINT, &ti_adc_inputs[ain], 0, + ti_adc_samples_avg_proc, "IU", "ADC samples average"); + SYSCTL_ADD_INT(ctx, inpN_tree, OID_AUTO, "input", + CTLFLAG_RD, &ti_adc_inputs[ain].value, 0, + "Converted raw value for the ADC input"); + } +} + +static void +ti_adc_inputs_init(struct ti_adc_softc *sc) +{ + int ain; + struct ti_adc_input *input; + + TI_ADC_LOCK(sc); + for (ain = 0; ain < TI_ADC_NPINS; ain++) { + input = &ti_adc_inputs[ain]; + input->sc = sc; + input->input = ain; + input->value = 0; + input->enable = 0; + input->samples = 0; + ti_adc_input_setup(sc, ain); + } + TI_ADC_UNLOCK(sc); +} + +static void +ti_adc_idlestep_init(struct ti_adc_softc *sc) +{ + uint32_t val; + + val = ADC_READ4(sc, ADC_IDLECONFIG); + + /* Set single ended operation. */ + val &= ~ADC_STEP_DIFF_CNTRL; + + /* Set the negative voltage reference. */ + val &= ~ADC_STEP_RFM_MSK; + val |= ADC_STEP_RFM_VREFN << ADC_STEP_RFM_SHIFT; + + /* Set the positive voltage reference. */ + val &= ~ADC_STEP_RFP_MSK; + val |= ADC_STEP_RFP_VREFP << ADC_STEP_RFP_SHIFT; + + /* Connect the input to VREFN. */ + val &= ~ADC_STEP_INP_MSK; + val |= ADC_STEP_IN_VREFN << ADC_STEP_INP_SHIFT; + + ADC_WRITE4(sc, ADC_IDLECONFIG, val); +} + +static int +ti_adc_probe(device_t dev) +{ + + if (!ofw_bus_is_compatible(dev, "ti,adc")) + return (ENXIO); + device_set_desc(dev, "TI ADC controller"); + + return (BUS_PROBE_DEFAULT); +} + +static int +ti_adc_attach(device_t dev) +{ + int err, rid; + struct ti_adc_softc *sc; + uint32_t reg, rev; + + sc = device_get_softc(dev); + sc->sc_dev = dev; + + rid = 0; + sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + if (!sc->sc_mem_res) { + device_printf(dev, "cannot allocate memory window\n"); + return (ENXIO); + } + + rid = 0; + sc->sc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, + RF_ACTIVE); + if (!sc->sc_irq_res) { + bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); + device_printf(dev, "cannot allocate interrupt\n"); + return (ENXIO); + } + + if (bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_MISC | INTR_MPSAFE, + NULL, ti_adc_intr, sc, &sc->sc_intrhand) != 0) { + bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sc_irq_res); + bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); + device_printf(dev, "Unable to setup the irq handler.\n"); + return (ENXIO); + } + + /* Activate the ADC_TSC module. */ + err = ti_prcm_clk_enable(TSC_ADC_CLK); + if (err) + return (err); + + /* Check the ADC revision. */ + rev = ADC_READ4(sc, ADC_REVISION); + device_printf(dev, + "scheme: %#x func: %#x rtl: %d rev: %d.%d custom rev: %d\n", + (rev & ADC_REV_SCHEME_MSK) >> ADC_REV_SCHEME_SHIFT, + (rev & ADC_REV_FUNC_MSK) >> ADC_REV_FUNC_SHIFT, + (rev & ADC_REV_RTL_MSK) >> ADC_REV_RTL_SHIFT, + (rev & ADC_REV_MAJOR_MSK) >> ADC_REV_MAJOR_SHIFT, + rev & ADC_REV_MINOR_MSK, + (rev & ADC_REV_CUSTOM_MSK) >> ADC_REV_CUSTOM_SHIFT); + + /* + * Disable the step write protect and make it store the step ID for + * the captured data on FIFO. + */ + reg = ADC_READ4(sc, ADC_CTRL); + ADC_WRITE4(sc, ADC_CTRL, reg | ADC_CTRL_STEP_WP | ADC_CTRL_STEP_ID); + + /* + * Set the ADC prescaler to 2400 (yes, the actual value written here + * is 2400 - 1). + * This sets the ADC clock to ~10Khz (CLK_M_OSC / 2400). + */ + ADC_WRITE4(sc, ADC_CLKDIV, 2399); + + TI_ADC_LOCK_INIT(sc); + + ti_adc_idlestep_init(sc); + ti_adc_inputs_init(sc); + ti_adc_sysctl_init(sc); + + return (0); +} + +static int +ti_adc_detach(device_t dev) +{ + struct ti_adc_softc *sc; + + sc = device_get_softc(dev); + + /* Turn off the ADC. */ + TI_ADC_LOCK(sc); + ti_adc_reset(sc); + ti_adc_setup(sc); + TI_ADC_UNLOCK(sc); + + TI_ADC_LOCK_DESTROY(sc); + + if (sc->sc_intrhand) + bus_teardown_intr(dev, sc->sc_irq_res, sc->sc_intrhand); + if (sc->sc_irq_res) + bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sc_irq_res); + if (sc->sc_mem_res) + bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); + + return (bus_generic_detach(dev)); +} + +static device_method_t ti_adc_methods[] = { + DEVMETHOD(device_probe, ti_adc_probe), + DEVMETHOD(device_attach, ti_adc_attach), + DEVMETHOD(device_detach, ti_adc_detach), + + DEVMETHOD_END +}; + +static driver_t ti_adc_driver = { + "ti_adc", + ti_adc_methods, + sizeof(struct ti_adc_softc), +}; + +static devclass_t ti_adc_devclass; + +DRIVER_MODULE(ti_adc, simplebus, ti_adc_driver, ti_adc_devclass, 0, 0); +MODULE_VERSION(ti_adc, 1); +MODULE_DEPEND(ti_adc, simplebus, 1, 1, 1); Copied: stable/10/sys/arm/ti/ti_adcreg.h (from r263693, head/sys/arm/ti/ti_adcreg.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/ti/ti_adcreg.h Sat May 17 19:06:46 2014 (r266338, copy of r263693, head/sys/arm/ti/ti_adcreg.h) @@ -0,0 +1,118 @@ +/*- + * Copyright 2014 Luiz Otavio O Souza + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +#ifndef _TI_ADCREG_H_ +#define _TI_ADCREG_H_ + +#define ADC_REVISION 0x000 +#define ADC_REV_SCHEME_MSK 0xc0000000 +#define ADC_REV_SCHEME_SHIFT 30 +#define ADC_REV_FUNC_MSK 0x0fff0000 +#define ADC_REV_FUNC_SHIFT 16 +#define ADC_REV_RTL_MSK 0x0000f800 +#define ADC_REV_RTL_SHIFT 11 +#define ADC_REV_MAJOR_MSK 0x00000700 +#define ADC_REV_MAJOR_SHIFT 8 +#define ADC_REV_CUSTOM_MSK 0x000000c0 +#define ADC_REV_CUSTOM_SHIFT 6 +#define ADC_REV_MINOR_MSK 0x0000003f +#define ADC_SYSCFG 0x010 +#define ADC_SYSCFG_IDLE_MSK 0x000000c0 +#define ADC_SYSCFG_IDLE_SHIFT 2 +#define ADC_IRQSTATUS_RAW 0x024 +#define ADC_IRQSTATUS 0x028 +#define ADC_IRQENABLE_SET 0x02c +#define ADC_IRQENABLE_CLR 0x030 +#define ADC_IRQ_HW_PEN_SYNC (1 << 10) +#define ADC_IRQ_PEN_UP (1 << 9) +#define ADC_IRQ_OUT_RANGE (1 << 8) +#define ADC_IRQ_FIFO1_UNDR (1 << 7) +#define ADC_IRQ_FIFO1_OVERR (1 << 6) +#define ADC_IRQ_FIFO1_THRES (1 << 5) +#define ADC_IRQ_FIFO0_UNDR (1 << 4) +#define ADC_IRQ_FIFO0_OVERR (1 << 3) +#define ADC_IRQ_FIFO0_THRES (1 << 2) +#define ADC_IRQ_END_OF_SEQ (1 << 1) +#define ADC_IRQ_HW_PEN_ASYNC (1 << 0) +#define ADC_CTRL 0x040 +#define ADC_CTRL_STEP_WP (1 << 2) +#define ADC_CTRL_STEP_ID (1 << 1) +#define ADC_CTRL_ENABLE (1 << 0) +#define ADC_STAT 0x044 +#define ADC_CLKDIV 0x04c +#define ADC_STEPENABLE 0x054 +#define ADC_IDLECONFIG 0x058 +#define ADC_STEPCFG1 0x064 +#define ADC_STEPDLY1 0x068 +#define ADC_STEPCFG2 0x06c +#define ADC_STEPDLY2 0x070 +#define ADC_STEPCFG3 0x074 +#define ADC_STEPDLY3 0x078 +#define ADC_STEPCFG4 0x07c +#define ADC_STEPDLY4 0x080 +#define ADC_STEPCFG5 0x084 +#define ADC_STEPDLY5 0x088 +#define ADC_STEPCFG6 0x08c +#define ADC_STEPDLY6 0x090 +#define ADC_STEPCFG7 0x094 +#define ADC_STEPDLY7 0x098 +#define ADC_STEP_DIFF_CNTRL (1 << 25) +#define ADC_STEP_RFM_MSK 0x01800000 +#define ADC_STEP_RFM_SHIFT 23 +#define ADC_STEP_RFM_VSSA 0 +#define ADC_STEP_RFM_XNUR 1 +#define ADC_STEP_RFM_YNLR 2 +#define ADC_STEP_RFM_VREFN 3 +#define ADC_STEP_INP_MSK 0x00780000 +#define ADC_STEP_INP_SHIFT 19 +#define ADC_STEP_INM_MSK 0x00078000 +#define ADC_STEP_INM_SHIFT 15 +#define ADC_STEP_IN_VREFN 8 +#define ADC_STEP_RFP_MSK 0x00007000 +#define ADC_STEP_RFP_SHIFT 12 +#define ADC_STEP_RFP_VDDA 0 +#define ADC_STEP_RFP_XPUL 1 +#define ADC_STEP_RFP_YPLL 2 +#define ADC_STEP_RFP_VREFP 3 +#define ADC_STEP_RFP_INTREF 4 +#define ADC_STEP_AVG_MSK 0x0000001c +#define ADC_STEP_AVG_SHIFT 2 +#define ADC_STEP_MODE_MSK 0x00000003 +#define ADC_STEP_MODE_ONESHOT 0x00000000 +#define ADC_STEP_MODE_CONTINUOUS 0x00000001 +#define ADC_STEP_SAMPLE_DELAY 0xff000000 +#define ADC_STEP_OPEN_DELAY 0x0003ffff +#define ADC_FIFO0COUNT 0x0e4 +#define ADC_FIFO0THRESHOLD 0x0e8 +#define ADC_FIFO0DATA 0x100 +#define ADC_FIFO_COUNT_MSK 0x0000007f +#define ADC_FIFO_STEP_ID_MSK 0x000f0000 +#define ADC_FIFO_STEP_ID_SHIFT 16 +#define ADC_FIFO_DATA_MSK 0x00000fff + +#endif /* _TI_ADCREG_H_ */ Copied: stable/10/sys/arm/ti/ti_adcvar.h (from r263693, head/sys/arm/ti/ti_adcvar.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/ti/ti_adcvar.h Sat May 17 19:06:46 2014 (r266338, copy of r263693, head/sys/arm/ti/ti_adcvar.h) @@ -0,0 +1,69 @@ +/*- + * Copyright 2014 Luiz Otavio O Souza + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +#ifndef _TI_ADCVAR_H_ +#define _TI_ADCVAR_H_ + +#define TI_ADC_NPINS 7 + +#define ADC_READ4(_sc, reg) bus_read_4((_sc)->sc_mem_res, reg) +#define ADC_WRITE4(_sc, reg, value) \ + bus_write_4((_sc)->sc_mem_res, reg, value) + +struct ti_adc_softc { + device_t sc_dev; + int sc_last_state; + struct mtx sc_mtx; + struct resource *sc_mem_res; + struct resource *sc_irq_res; + void *sc_intrhand; +}; + +struct ti_adc_input { + int32_t enable; /* input enabled */ + int32_t samples; /* samples average */ + int32_t input; /* input number */ + int32_t value; /* raw converted value */ + uint32_t stepconfig; /* step config register */ + uint32_t stepdelay; /* step delay register */ + struct ti_adc_softc *sc; /* pointer to adc softc */ +}; + +#define TI_ADC_LOCK(_sc) \ + mtx_lock(&(_sc)->sc_mtx) +#define TI_ADC_UNLOCK(_sc) \ + mtx_unlock(&(_sc)->sc_mtx) +#define TI_ADC_LOCK_INIT(_sc) \ + mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->sc_dev), \ + "ti_adc", MTX_DEF) +#define TI_ADC_LOCK_DESTROY(_sc) \ + mtx_destroy(&_sc->sc_mtx); +#define TI_ADC_LOCK_ASSERT(_sc) \ + mtx_assert(&(_sc)->sc_mtx, MA_OWNED) + +#endif /* _TI_ADCVAR_H_ */ Modified: stable/10/sys/arm/ti/ti_prcm.h ============================================================================== --- stable/10/sys/arm/ti/ti_prcm.h Sat May 17 18:53:36 2014 (r266337) +++ stable/10/sys/arm/ti/ti_prcm.h Sat May 17 19:06:46 2014 (r266338) @@ -162,6 +162,8 @@ typedef enum { PRUSS_CLK = 1700, + TSC_ADC_CLK = 1800, + INVALID_CLK_IDENT } clk_ident_t; Modified: stable/10/sys/boot/fdt/dts/arm/am335x.dtsi ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/am335x.dtsi Sat May 17 18:53:36 2014 (r266337) +++ stable/10/sys/boot/fdt/dts/arm/am335x.dtsi Sat May 17 19:06:46 2014 (r266338) @@ -75,6 +75,13 @@ interrupt-parent = <&AINTC>; }; + adc0: adc@44E0D000 { + compatible = "ti,adc"; + reg = <0x44E0D000 0x2000>; + interrupts = < 16 >; + interrupt-parent = <&AINTC>; + }; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat May 17 19:11:10 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EAE2120E; Sat, 17 May 2014 19:11:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D48562F16; Sat, 17 May 2014 19:11:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HJBAAG023214; Sat, 17 May 2014 19:11:10 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HJB96t023197; Sat, 17 May 2014 19:11:09 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201405171911.s4HJB96t023197@svn.freebsd.org> From: John Baldwin Date: Sat, 17 May 2014 19:11:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266339 - in stable/10: sys/amd64/amd64 sys/amd64/include sys/amd64/vmm sys/amd64/vmm/amd sys/amd64/vmm/intel sys/amd64/vmm/io usr.sbin/bhyvectl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 19:11:11 -0000 Author: jhb Date: Sat May 17 19:11:08 2014 New Revision: 266339 URL: http://svnweb.freebsd.org/changeset/base/266339 Log: MFC 259641,259863,259924,259937,259961,259978,260380,260383,260410,260466, 260531,260532,260550,260619,261170,261453,261621,263280,263290,264516: Add support for local APIC hardware-assist. - Restructure vlapic access and register handling to support hardware-assist for the local APIC. - Use the 'Virtual Interrupt Delivery' and 'Posted Interrupt Processing' feature of Intel VT-x if supported by hardware. - Add an API to rendezvous all active vcpus in a virtual machine and use it to support level triggered interrupts with VT-x 'Virtual Interrupt Delivery'. - Use a cheaper IPI handler than IPI_AST for nested page table shootdowns and avoid doing unnecessary nested TLB invalidations. Reviewed by: neel Added: stable/10/sys/amd64/vmm/io/vlapic_priv.h - copied, changed from r259863, head/sys/amd64/vmm/io/vlapic_priv.h Modified: stable/10/sys/amd64/amd64/pmap.c stable/10/sys/amd64/include/pmap.h stable/10/sys/amd64/include/vmm.h stable/10/sys/amd64/vmm/amd/amdv.c stable/10/sys/amd64/vmm/intel/ept.c stable/10/sys/amd64/vmm/intel/ept.h stable/10/sys/amd64/vmm/intel/vmcs.c stable/10/sys/amd64/vmm/intel/vmcs.h stable/10/sys/amd64/vmm/intel/vmx.c stable/10/sys/amd64/vmm/intel/vmx.h stable/10/sys/amd64/vmm/intel/vmx_controls.h stable/10/sys/amd64/vmm/intel/vmx_genassym.c stable/10/sys/amd64/vmm/intel/vmx_support.S stable/10/sys/amd64/vmm/io/vioapic.c stable/10/sys/amd64/vmm/io/vlapic.c stable/10/sys/amd64/vmm/io/vlapic.h stable/10/sys/amd64/vmm/vmm.c stable/10/sys/amd64/vmm/vmm_ipi.c stable/10/sys/amd64/vmm/vmm_ipi.h stable/10/sys/amd64/vmm/vmm_lapic.c stable/10/sys/amd64/vmm/vmm_lapic.h stable/10/sys/amd64/vmm/vmm_stat.c stable/10/sys/amd64/vmm/vmm_stat.h stable/10/usr.sbin/bhyvectl/bhyvectl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/pmap.c ============================================================================== --- stable/10/sys/amd64/amd64/pmap.c Sat May 17 19:06:46 2014 (r266338) +++ stable/10/sys/amd64/amd64/pmap.c Sat May 17 19:11:08 2014 (r266339) @@ -1304,6 +1304,7 @@ pmap_invalidate_page_pcid(pmap_t pmap, v static __inline void pmap_invalidate_ept(pmap_t pmap) { + int ipinum; sched_pin(); KASSERT(!CPU_ISSET(curcpu, &pmap->pm_active), @@ -1328,11 +1329,9 @@ pmap_invalidate_ept(pmap_t pmap) /* * Force the vcpu to exit and trap back into the hypervisor. - * - * XXX this is not optimal because IPI_AST builds a trapframe - * whereas all we need is an 'eoi' followed by 'iret'. */ - ipi_selected(pmap->pm_active, IPI_AST); + ipinum = pmap->pm_flags & PMAP_NESTED_IPIMASK; + ipi_selected(pmap->pm_active, ipinum); sched_unpin(); } Modified: stable/10/sys/amd64/include/pmap.h ============================================================================== --- stable/10/sys/amd64/include/pmap.h Sat May 17 19:06:46 2014 (r266338) +++ stable/10/sys/amd64/include/pmap.h Sat May 17 19:11:08 2014 (r266339) @@ -312,9 +312,10 @@ struct pmap { }; /* flags */ -#define PMAP_PDE_SUPERPAGE (1 << 0) /* supports 2MB superpages */ -#define PMAP_EMULATE_AD_BITS (1 << 1) /* needs A/D bits emulation */ -#define PMAP_SUPPORTS_EXEC_ONLY (1 << 2) /* execute only mappings ok */ +#define PMAP_NESTED_IPIMASK 0xff +#define PMAP_PDE_SUPERPAGE (1 << 8) /* supports 2MB superpages */ +#define PMAP_EMULATE_AD_BITS (1 << 9) /* needs A/D bits emulation */ +#define PMAP_SUPPORTS_EXEC_ONLY (1 << 10) /* execute only mappings ok */ typedef struct pmap *pmap_t; Modified: stable/10/sys/amd64/include/vmm.h ============================================================================== --- stable/10/sys/amd64/include/vmm.h Sat May 17 19:06:46 2014 (r266338) +++ stable/10/sys/amd64/include/vmm.h Sat May 17 19:11:08 2014 (r266339) @@ -47,12 +47,12 @@ struct pmap; enum x2apic_state; -typedef int (*vmm_init_func_t)(void); +typedef int (*vmm_init_func_t)(int ipinum); typedef int (*vmm_cleanup_func_t)(void); typedef void (*vmm_resume_func_t)(void); typedef void * (*vmi_init_func_t)(struct vm *vm, struct pmap *pmap); typedef int (*vmi_run_func_t)(void *vmi, int vcpu, register_t rip, - struct pmap *pmap); + struct pmap *pmap, void *rendezvous_cookie); typedef void (*vmi_cleanup_func_t)(void *vmi); typedef int (*vmi_get_register_t)(void *vmi, int vcpu, int num, uint64_t *retval); @@ -69,6 +69,8 @@ typedef int (*vmi_get_cap_t)(void *vmi, typedef int (*vmi_set_cap_t)(void *vmi, int vcpu, int num, int val); typedef struct vmspace * (*vmi_vmspace_alloc)(vm_offset_t min, vm_offset_t max); typedef void (*vmi_vmspace_free)(struct vmspace *vmspace); +typedef struct vlapic * (*vmi_vlapic_init)(void *vmi, int vcpu); +typedef void (*vmi_vlapic_cleanup)(void *vmi, struct vlapic *vlapic); struct vmm_ops { vmm_init_func_t init; /* module wide initialization */ @@ -87,6 +89,8 @@ struct vmm_ops { vmi_set_cap_t vmsetcap; vmi_vmspace_alloc vmspace_alloc; vmi_vmspace_free vmspace_free; + vmi_vlapic_init vlapic_init; + vmi_vlapic_cleanup vlapic_cleanup; }; extern struct vmm_ops vmm_ops_intel; @@ -132,6 +136,31 @@ cpuset_t vm_active_cpus(struct vm *vm); struct vm_exit *vm_exitinfo(struct vm *vm, int vcpuid); /* + * Rendezvous all vcpus specified in 'dest' and execute 'func(arg)'. + * The rendezvous 'func(arg)' is not allowed to do anything that will + * cause the thread to be put to sleep. + * + * If the rendezvous is being initiated from a vcpu context then the + * 'vcpuid' must refer to that vcpu, otherwise it should be set to -1. + * + * The caller cannot hold any locks when initiating the rendezvous. + * + * The implementation of this API may cause vcpus other than those specified + * by 'dest' to be stalled. The caller should not rely on any vcpus making + * forward progress when the rendezvous is in progress. + */ +typedef void (*vm_rendezvous_func_t)(struct vm *vm, int vcpuid, void *arg); +void vm_smp_rendezvous(struct vm *vm, int vcpuid, cpuset_t dest, + vm_rendezvous_func_t func, void *arg); + +static __inline int +vcpu_rendezvous_pending(void *rendezvous_cookie) +{ + + return (*(uintptr_t *)rendezvous_cookie != 0); +} + +/* * Return 1 if device indicated by bus/slot/func is supposed to be a * pci passthrough device. * @@ -158,7 +187,7 @@ vcpu_is_running(struct vm *vm, int vcpu, } void *vcpu_stats(struct vm *vm, int vcpu); -void vcpu_notify_event(struct vm *vm, int vcpuid); +void vcpu_notify_event(struct vm *vm, int vcpuid, bool lapic_intr); struct vmspace *vm_get_vmspace(struct vm *vm); int vm_assign_pptdev(struct vm *vm, int bus, int slot, int func); int vm_unassign_pptdev(struct vm *vm, int bus, int slot, int func); @@ -267,6 +296,8 @@ enum vm_exitcode { VM_EXITCODE_INST_EMUL, VM_EXITCODE_SPINUP_AP, VM_EXITCODE_SPINDOWN_CPU, + VM_EXITCODE_RENDEZVOUS, + VM_EXITCODE_IOAPIC_EOI, VM_EXITCODE_MAX }; @@ -323,6 +354,9 @@ struct vm_exit { struct { uint64_t rflags; } hlt; + struct { + int vector; + } ioapic_eoi; } u; }; Modified: stable/10/sys/amd64/vmm/amd/amdv.c ============================================================================== --- stable/10/sys/amd64/vmm/amd/amdv.c Sat May 17 19:06:46 2014 (r266338) +++ stable/10/sys/amd64/vmm/amd/amdv.c Sat May 17 19:11:08 2014 (r266339) @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); #include "io/iommu.h" static int -amdv_init(void) +amdv_init(int ipinum) { printf("amdv_init: not implemented\n"); @@ -67,7 +67,7 @@ amdv_vminit(struct vm *vm, struct pmap * } static int -amdv_vmrun(void *arg, int vcpu, register_t rip, struct pmap *pmap) +amdv_vmrun(void *arg, int vcpu, register_t rip, struct pmap *pmap, void *cookie) { printf("amdv_vmrun: not implemented\n"); @@ -155,6 +155,20 @@ amdv_vmspace_free(struct vmspace *vmspac return; } +static struct vlapic * +amdv_vlapic_init(void *arg, int vcpuid) +{ + + panic("amdv_vlapic_init: not implmented"); +} + +static void +amdv_vlapic_cleanup(void *arg, struct vlapic *vlapic) +{ + + panic("amdv_vlapic_cleanup: not implemented"); +} + struct vmm_ops vmm_ops_amd = { amdv_init, amdv_cleanup, @@ -171,6 +185,8 @@ struct vmm_ops vmm_ops_amd = { amdv_setcap, amdv_vmspace_alloc, amdv_vmspace_free, + amdv_vlapic_init, + amdv_vlapic_cleanup, }; static int Modified: stable/10/sys/amd64/vmm/intel/ept.c ============================================================================== --- stable/10/sys/amd64/vmm/intel/ept.c Sat May 17 19:06:46 2014 (r266338) +++ stable/10/sys/amd64/vmm/intel/ept.c Sat May 17 19:11:08 2014 (r266339) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include "vmx_cpufunc.h" +#include "vmm_ipi.h" #include "vmx_msr.h" #include "ept.h" @@ -76,7 +77,7 @@ SYSCTL_INT(_hw_vmm_ept, OID_AUTO, pmap_f &ept_pmap_flags, 0, NULL); int -ept_init(void) +ept_init(int ipinum) { int use_hw_ad_bits, use_superpages, use_exec_only; uint64_t cap; @@ -98,6 +99,8 @@ ept_init(void) !INVEPT_ALL_TYPES_SUPPORTED(cap)) return (EINVAL); + ept_pmap_flags = ipinum & PMAP_NESTED_IPIMASK; + use_superpages = 1; TUNABLE_INT_FETCH("hw.vmm.ept.use_superpages", &use_superpages); if (use_superpages && EPT_PDE_SUPERPAGE(cap)) Modified: stable/10/sys/amd64/vmm/intel/ept.h ============================================================================== --- stable/10/sys/amd64/vmm/intel/ept.h Sat May 17 19:06:46 2014 (r266338) +++ stable/10/sys/amd64/vmm/intel/ept.h Sat May 17 19:11:08 2014 (r266339) @@ -31,7 +31,7 @@ struct vmx; -int ept_init(void); +int ept_init(int ipinum); void ept_invalidate_mappings(u_long eptp); struct vmspace *ept_vmspace_alloc(vm_offset_t min, vm_offset_t max); void ept_vmspace_free(struct vmspace *vmspace); Modified: stable/10/sys/amd64/vmm/intel/vmcs.c ============================================================================== --- stable/10/sys/amd64/vmm/intel/vmcs.c Sat May 17 19:06:46 2014 (r266338) +++ stable/10/sys/amd64/vmm/intel/vmcs.c Sat May 17 19:11:08 2014 (r266339) @@ -315,11 +315,7 @@ done: } int -vmcs_set_defaults(struct vmcs *vmcs, - u_long host_rip, u_long host_rsp, uint64_t eptp, - uint32_t pinbased_ctls, uint32_t procbased_ctls, - uint32_t procbased_ctls2, uint32_t exit_ctls, - uint32_t entry_ctls, u_long msr_bitmap, uint16_t vpid) +vmcs_init(struct vmcs *vmcs) { int error, codesel, datasel, tsssel; u_long cr0, cr4, efer; @@ -335,22 +331,6 @@ vmcs_set_defaults(struct vmcs *vmcs, */ VMPTRLD(vmcs); - /* - * Load the VMX controls - */ - if ((error = vmwrite(VMCS_PIN_BASED_CTLS, pinbased_ctls)) != 0) - goto done; - if ((error = vmwrite(VMCS_PRI_PROC_BASED_CTLS, procbased_ctls)) != 0) - goto done; - if ((error = vmwrite(VMCS_SEC_PROC_BASED_CTLS, procbased_ctls2)) != 0) - goto done; - if ((error = vmwrite(VMCS_EXIT_CTLS, exit_ctls)) != 0) - goto done; - if ((error = vmwrite(VMCS_ENTRY_CTLS, entry_ctls)) != 0) - goto done; - - /* Guest state */ - /* Initialize guest IA32_PAT MSR with the default value */ pat = PAT_VALUE(0, PAT_WRITE_BACK) | PAT_VALUE(1, PAT_WRITE_THROUGH) | @@ -422,23 +402,7 @@ vmcs_set_defaults(struct vmcs *vmcs, goto done; /* instruction pointer */ - if ((error = vmwrite(VMCS_HOST_RIP, host_rip)) != 0) - goto done; - - /* stack pointer */ - if ((error = vmwrite(VMCS_HOST_RSP, host_rsp)) != 0) - goto done; - - /* eptp */ - if ((error = vmwrite(VMCS_EPTP, eptp)) != 0) - goto done; - - /* vpid */ - if ((error = vmwrite(VMCS_VPID, vpid)) != 0) - goto done; - - /* msr bitmap */ - if ((error = vmwrite(VMCS_MSR_BITMAP, msr_bitmap)) != 0) + if ((error = vmwrite(VMCS_HOST_RIP, (u_long)vmx_exit_guest)) != 0) goto done; /* exception bitmap */ @@ -509,7 +473,7 @@ DB_SHOW_COMMAND(vmcs, db_show_vmcs) switch (exit & 0x8000ffff) { case EXIT_REASON_EXCEPTION: case EXIT_REASON_EXT_INTR: - val = vmcs_read(VMCS_EXIT_INTERRUPTION_INFO); + val = vmcs_read(VMCS_EXIT_INTR_INFO); db_printf("Interrupt Type: "); switch (val >> 8 & 0x7) { case 0: @@ -531,7 +495,7 @@ DB_SHOW_COMMAND(vmcs, db_show_vmcs) db_printf(" Vector: %lu", val & 0xff); if (val & 0x800) db_printf(" Error Code: %lx", - vmcs_read(VMCS_EXIT_INTERRUPTION_ERROR)); + vmcs_read(VMCS_EXIT_INTR_ERRCODE)); db_printf("\n"); break; case EXIT_REASON_EPT_FAULT: Modified: stable/10/sys/amd64/vmm/intel/vmcs.h ============================================================================== --- stable/10/sys/amd64/vmm/intel/vmcs.h Sat May 17 19:06:46 2014 (r266338) +++ stable/10/sys/amd64/vmm/intel/vmcs.h Sat May 17 19:11:08 2014 (r266339) @@ -46,12 +46,7 @@ struct msr_entry { }; int vmcs_set_msr_save(struct vmcs *vmcs, u_long g_area, u_int g_count); -int vmcs_set_defaults(struct vmcs *vmcs, u_long host_rip, u_long host_rsp, - uint64_t eptp, - uint32_t pinbased_ctls, uint32_t procbased_ctls, - uint32_t procbased_ctls2, uint32_t exit_ctls, - uint32_t entry_ctls, u_long msr_bitmap, - uint16_t vpid); +int vmcs_init(struct vmcs *vmcs); int vmcs_getreg(struct vmcs *vmcs, int running, int ident, uint64_t *rv); int vmcs_setreg(struct vmcs *vmcs, int running, int ident, uint64_t val); int vmcs_getdesc(struct vmcs *vmcs, int ident, @@ -102,6 +97,7 @@ vmcs_write(uint32_t encoding, uint64_t v /* 16-bit control fields */ #define VMCS_VPID 0x00000000 +#define VMCS_PIR_VECTOR 0x00000002 /* 16-bit guest-state fields */ #define VMCS_GUEST_ES_SELECTOR 0x00000800 @@ -112,6 +108,7 @@ vmcs_write(uint32_t encoding, uint64_t v #define VMCS_GUEST_GS_SELECTOR 0x0000080A #define VMCS_GUEST_LDTR_SELECTOR 0x0000080C #define VMCS_GUEST_TR_SELECTOR 0x0000080E +#define VMCS_GUEST_INTR_STATUS 0x00000810 /* 16-bit host-state fields */ #define VMCS_HOST_ES_SELECTOR 0x00000C00 @@ -133,7 +130,13 @@ vmcs_write(uint32_t encoding, uint64_t v #define VMCS_TSC_OFFSET 0x00002010 #define VMCS_VIRTUAL_APIC 0x00002012 #define VMCS_APIC_ACCESS 0x00002014 +#define VMCS_PIR_DESC 0x00002016 #define VMCS_EPTP 0x0000201A +#define VMCS_EOI_EXIT0 0x0000201C +#define VMCS_EOI_EXIT1 0x0000201E +#define VMCS_EOI_EXIT2 0x00002020 +#define VMCS_EOI_EXIT3 0x00002022 +#define VMCS_EOI_EXIT(vector) (VMCS_EOI_EXIT0 + ((vector) / 64) * 2) /* 64-bit read-only fields */ #define VMCS_GUEST_PHYSICAL_ADDRESS 0x00002400 @@ -177,8 +180,8 @@ vmcs_write(uint32_t encoding, uint64_t v /* 32-bit read-only data fields */ #define VMCS_INSTRUCTION_ERROR 0x00004400 #define VMCS_EXIT_REASON 0x00004402 -#define VMCS_EXIT_INTERRUPTION_INFO 0x00004404 -#define VMCS_EXIT_INTERRUPTION_ERROR 0x00004406 +#define VMCS_EXIT_INTR_INFO 0x00004404 +#define VMCS_EXIT_INTR_ERRCODE 0x00004406 #define VMCS_IDT_VECTORING_INFO 0x00004408 #define VMCS_IDT_VECTORING_ERROR 0x0000440A #define VMCS_EXIT_INSTRUCTION_LENGTH 0x0000440C @@ -315,7 +318,8 @@ vmcs_write(uint32_t encoding, uint64_t v #define EXIT_REASON_PAUSE 40 #define EXIT_REASON_MCE 41 #define EXIT_REASON_TPR 43 -#define EXIT_REASON_APIC 44 +#define EXIT_REASON_APIC_ACCESS 44 +#define EXIT_REASON_VIRTUALIZED_EOI 45 #define EXIT_REASON_GDTR_IDTR 46 #define EXIT_REASON_LDTR_TR 47 #define EXIT_REASON_EPT_FAULT 48 @@ -326,13 +330,15 @@ vmcs_write(uint32_t encoding, uint64_t v #define EXIT_REASON_INVVPID 53 #define EXIT_REASON_WBINVD 54 #define EXIT_REASON_XSETBV 55 +#define EXIT_REASON_APIC_WRITE 56 /* * VMCS interrupt information fields */ -#define VMCS_INTERRUPTION_INFO_VALID (1U << 31) -#define VMCS_INTERRUPTION_INFO_HW_INTR (0 << 8) -#define VMCS_INTERRUPTION_INFO_NMI (2 << 8) +#define VMCS_INTR_INFO_VALID (1U << 31) +#define VMCS_INTR_INFO_TYPE(info) (((info) >> 8) & 0x7) +#define VMCS_INTR_INFO_HW_INTR (0 << 8) +#define VMCS_INTR_INFO_NMI (2 << 8) /* * VMCS IDT-Vectoring information fields @@ -365,4 +371,15 @@ vmcs_write(uint32_t encoding, uint64_t v #define EPT_VIOLATION_GLA_VALID (1UL << 7) #define EPT_VIOLATION_XLAT_VALID (1UL << 8) +/* + * Exit qualification for APIC-access VM exit + */ +#define APIC_ACCESS_OFFSET(qual) ((qual) & 0xFFF) +#define APIC_ACCESS_TYPE(qual) (((qual) >> 12) & 0xF) + +/* + * Exit qualification for APIC-write VM exit + */ +#define APIC_WRITE_OFFSET(qual) ((qual) & 0xFFF) + #endif Modified: stable/10/sys/amd64/vmm/intel/vmx.c ============================================================================== --- stable/10/sys/amd64/vmm/intel/vmx.c Sat May 17 19:06:46 2014 (r266338) +++ stable/10/sys/amd64/vmm/intel/vmx.c Sat May 17 19:11:08 2014 (r266339) @@ -45,15 +45,18 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include #include "vmm_host.h" -#include "vmm_lapic.h" +#include "vmm_ipi.h" #include "vmm_msr.h" #include "vmm_ktr.h" #include "vmm_stat.h" +#include "vlapic.h" +#include "vlapic_priv.h" #include "vmx_msr.h" #include "ept.h" @@ -92,6 +95,7 @@ __FBSDID("$FreeBSD$"); #define VM_EXIT_CTLS_ONE_SETTING \ (VM_EXIT_CTLS_ONE_SETTING_NO_PAT | \ + VM_EXIT_ACKNOWLEDGE_INTERRUPT | \ VM_EXIT_SAVE_PAT | \ VM_EXIT_LOAD_PAT) #define VM_EXIT_CTLS_ZERO_SETTING VM_EXIT_SAVE_DEBUG_CONTROLS @@ -112,7 +116,8 @@ __FBSDID("$FreeBSD$"); #define HANDLED 1 #define UNHANDLED 0 -MALLOC_DEFINE(M_VMX, "vmx", "vmx"); +static MALLOC_DEFINE(M_VMX, "vmx", "vmx"); +static MALLOC_DEFINE(M_VLAPIC, "vlapic", "vlapic"); SYSCTL_DECL(_hw_vmm); SYSCTL_NODE(_hw_vmm, OID_AUTO, vmx, CTLFLAG_RW, NULL, NULL); @@ -164,12 +169,33 @@ static int cap_pause_exit; static int cap_unrestricted_guest; static int cap_monitor_trap; static int cap_invpcid; - + +static int virtual_interrupt_delivery; +SYSCTL_INT(_hw_vmm_vmx, OID_AUTO, virtual_interrupt_delivery, CTLFLAG_RD, + &virtual_interrupt_delivery, 0, "APICv virtual interrupt delivery support"); + +static int posted_interrupts; +SYSCTL_INT(_hw_vmm_vmx, OID_AUTO, posted_interrupts, CTLFLAG_RD, + &posted_interrupts, 0, "APICv posted interrupt support"); + +static int pirvec; +SYSCTL_INT(_hw_vmm_vmx, OID_AUTO, posted_interrupt_vector, CTLFLAG_RD, + &pirvec, 0, "APICv posted interrupt vector"); + static struct unrhdr *vpid_unr; static u_int vpid_alloc_failed; SYSCTL_UINT(_hw_vmm_vmx, OID_AUTO, vpid_alloc_failed, CTLFLAG_RD, &vpid_alloc_failed, 0, NULL); +/* + * Use the last page below 4GB as the APIC access address. This address is + * occupied by the boot firmware so it is guaranteed that it will not conflict + * with a page in system memory. + */ +#define APIC_ACCESS_ADDRESS 0xFFFFF000 + +static void vmx_inject_pir(struct vlapic *vlapic); + #ifdef KTR static const char * exit_reason_to_str(int reason) @@ -259,8 +285,8 @@ exit_reason_to_str(int reason) return "mce"; case EXIT_REASON_TPR: return "tpr"; - case EXIT_REASON_APIC: - return "apic"; + case EXIT_REASON_APIC_ACCESS: + return "apic-access"; case EXIT_REASON_GDTR_IDTR: return "gdtridtr"; case EXIT_REASON_LDTR_TR: @@ -281,6 +307,8 @@ exit_reason_to_str(int reason) return "wbinvd"; case EXIT_REASON_XSETBV: return "xsetbv"; + case EXIT_REASON_APIC_WRITE: + return "apic-write"; default: snprintf(reasonbuf, sizeof(reasonbuf), "%d", reason); return (reasonbuf); @@ -424,6 +452,9 @@ vmx_disable(void *arg __unused) static int vmx_cleanup(void) { + + if (pirvec != 0) + vmm_ipi_free(pirvec); if (vpid_unr != NULL) { delete_unrhdr(vpid_unr); @@ -457,11 +488,11 @@ vmx_restore(void) } static int -vmx_init(void) +vmx_init(int ipinum) { - int error; + int error, use_tpr_shadow; uint64_t fixed0, fixed1, feature_control; - uint32_t tmp; + uint32_t tmp, procbased2_vid_bits; /* CPUID.1:ECX[bit 5] must be 1 for processor to support VMX */ if (!(cpu_feature2 & CPUID2_VMX)) { @@ -595,9 +626,58 @@ vmx_init(void) MSR_VMX_PROCBASED_CTLS2, PROCBASED2_ENABLE_INVPCID, 0, &tmp) == 0); + /* + * Check support for virtual interrupt delivery. + */ + procbased2_vid_bits = (PROCBASED2_VIRTUALIZE_APIC_ACCESSES | + PROCBASED2_VIRTUALIZE_X2APIC_MODE | + PROCBASED2_APIC_REGISTER_VIRTUALIZATION | + PROCBASED2_VIRTUAL_INTERRUPT_DELIVERY); + + use_tpr_shadow = (vmx_set_ctlreg(MSR_VMX_PROCBASED_CTLS, + MSR_VMX_TRUE_PROCBASED_CTLS, PROCBASED_USE_TPR_SHADOW, 0, + &tmp) == 0); + + error = vmx_set_ctlreg(MSR_VMX_PROCBASED_CTLS2, MSR_VMX_PROCBASED_CTLS2, + procbased2_vid_bits, 0, &tmp); + if (error == 0 && use_tpr_shadow) { + virtual_interrupt_delivery = 1; + TUNABLE_INT_FETCH("hw.vmm.vmx.use_apic_vid", + &virtual_interrupt_delivery); + } + + if (virtual_interrupt_delivery) { + procbased_ctls |= PROCBASED_USE_TPR_SHADOW; + procbased_ctls2 |= procbased2_vid_bits; + procbased_ctls2 &= ~PROCBASED2_VIRTUALIZE_X2APIC_MODE; + + /* + * Check for Posted Interrupts only if Virtual Interrupt + * Delivery is enabled. + */ + error = vmx_set_ctlreg(MSR_VMX_PINBASED_CTLS, + MSR_VMX_TRUE_PINBASED_CTLS, PINBASED_POSTED_INTERRUPT, 0, + &tmp); + if (error == 0) { + pirvec = vmm_ipi_alloc(); + if (pirvec == 0) { + if (bootverbose) { + printf("vmx_init: unable to allocate " + "posted interrupt vector\n"); + } + } else { + posted_interrupts = 1; + TUNABLE_INT_FETCH("hw.vmm.vmx.use_apic_pir", + &posted_interrupts); + } + } + } + + if (posted_interrupts) + pinbased_ctls |= PINBASED_POSTED_INTERRUPT; /* Initialize EPT */ - error = ept_init(); + error = ept_init(ipinum); if (error) { printf("vmx_init: ept initialization failed (%d)\n", error); return (error); @@ -638,6 +718,31 @@ vmx_init(void) return (0); } +static void +vmx_trigger_hostintr(int vector) +{ + uintptr_t func; + struct gate_descriptor *gd; + + gd = &idt[vector]; + + KASSERT(vector >= 32 && vector <= 255, ("vmx_trigger_hostintr: " + "invalid vector %d", vector)); + KASSERT(gd->gd_p == 1, ("gate descriptor for vector %d not present", + vector)); + KASSERT(gd->gd_type == SDT_SYSIGT, ("gate descriptor for vector %d " + "has invalid type %d", vector, gd->gd_type)); + KASSERT(gd->gd_dpl == SEL_KPL, ("gate descriptor for vector %d " + "has invalid dpl %d", vector, gd->gd_dpl)); + KASSERT(gd->gd_selector == GSEL(GCODE_SEL, SEL_KPL), ("gate descriptor " + "for vector %d has invalid selector %d", vector, gd->gd_selector)); + KASSERT(gd->gd_ist == 0, ("gate descriptor for vector %d has invalid " + "IST %d", vector, gd->gd_ist)); + + func = ((long)gd->gd_hioffset << 16 | gd->gd_looffset); + vmx_call_isr(func); +} + static int vmx_setup_cr_shadow(int which, struct vmcs *vmcs, uint32_t initial) { @@ -676,6 +781,7 @@ vmx_vminit(struct vm *vm, pmap_t pmap) uint16_t vpid[VM_MAXCPU]; int i, error, guest_msr_count; struct vmx *vmx; + struct vmcs *vmcs; vmx = malloc(sizeof(struct vmx), M_VMX, M_WAITOK | M_ZERO); if ((uintptr_t)vmx & PAGE_MASK) { @@ -740,27 +846,52 @@ vmx_vminit(struct vm *vm, pmap_t pmap) vpid_alloc(vpid, VM_MAXCPU); + if (virtual_interrupt_delivery) { + error = vm_map_mmio(vm, DEFAULT_APIC_BASE, PAGE_SIZE, + APIC_ACCESS_ADDRESS); + /* XXX this should really return an error to the caller */ + KASSERT(error == 0, ("vm_map_mmio(apicbase) error %d", error)); + } + for (i = 0; i < VM_MAXCPU; i++) { - vmx->vmcs[i].identifier = vmx_revision(); - error = vmclear(&vmx->vmcs[i]); + vmcs = &vmx->vmcs[i]; + vmcs->identifier = vmx_revision(); + error = vmclear(vmcs); if (error != 0) { panic("vmx_vminit: vmclear error %d on vcpu %d\n", error, i); } - error = vmcs_set_defaults(&vmx->vmcs[i], - (u_long)vmx_exit_guest, - (u_long)&vmx->ctx[i], - vmx->eptp, - pinbased_ctls, - procbased_ctls, - procbased_ctls2, - exit_ctls, entry_ctls, - vtophys(vmx->msr_bitmap), - vpid[i]); + error = vmcs_init(vmcs); + KASSERT(error == 0, ("vmcs_init error %d", error)); - if (error != 0) - panic("vmx_vminit: vmcs_set_defaults error %d", error); + VMPTRLD(vmcs); + error = 0; + error += vmwrite(VMCS_HOST_RSP, (u_long)&vmx->ctx[i]); + error += vmwrite(VMCS_EPTP, vmx->eptp); + error += vmwrite(VMCS_PIN_BASED_CTLS, pinbased_ctls); + error += vmwrite(VMCS_PRI_PROC_BASED_CTLS, procbased_ctls); + error += vmwrite(VMCS_SEC_PROC_BASED_CTLS, procbased_ctls2); + error += vmwrite(VMCS_EXIT_CTLS, exit_ctls); + error += vmwrite(VMCS_ENTRY_CTLS, entry_ctls); + error += vmwrite(VMCS_MSR_BITMAP, vtophys(vmx->msr_bitmap)); + error += vmwrite(VMCS_VPID, vpid[i]); + if (virtual_interrupt_delivery) { + error += vmwrite(VMCS_APIC_ACCESS, APIC_ACCESS_ADDRESS); + error += vmwrite(VMCS_VIRTUAL_APIC, + vtophys(&vmx->apic_page[i])); + error += vmwrite(VMCS_EOI_EXIT0, 0); + error += vmwrite(VMCS_EOI_EXIT1, 0); + error += vmwrite(VMCS_EOI_EXIT2, 0); + error += vmwrite(VMCS_EOI_EXIT3, 0); + } + if (posted_interrupts) { + error += vmwrite(VMCS_PIR_VECTOR, pirvec); + error += vmwrite(VMCS_PIR_DESC, + vtophys(&vmx->pir_desc[i])); + } + VMCLEAR(vmcs); + KASSERT(error == 0, ("vmx_vminit: error customizing the vmcs")); vmx->cap[i].set = 0; vmx->cap[i].proc_ctls = procbased_ctls; @@ -771,9 +902,8 @@ vmx_vminit(struct vm *vm, pmap_t pmap) msr_save_area_init(vmx->guest_msrs[i], &guest_msr_count); - error = vmcs_set_msr_save(&vmx->vmcs[i], - vtophys(vmx->guest_msrs[i]), - guest_msr_count); + error = vmcs_set_msr_save(vmcs, vtophys(vmx->guest_msrs[i]), + guest_msr_count); if (error != 0) panic("vmcs_set_msr_save error %d", error); @@ -783,16 +913,15 @@ vmx_vminit(struct vm *vm, pmap_t pmap) * CR0 - 0x60000010 * CR4 - 0 */ - error = vmx_setup_cr0_shadow(&vmx->vmcs[i], 0x60000010); + error = vmx_setup_cr0_shadow(vmcs, 0x60000010); if (error != 0) panic("vmx_setup_cr0_shadow %d", error); - error = vmx_setup_cr4_shadow(&vmx->vmcs[i], 0); + error = vmx_setup_cr4_shadow(vmcs, 0); if (error != 0) panic("vmx_setup_cr4_shadow %d", error); vmx->ctx[i].pmap = pmap; - vmx->ctx[i].eptp = vmx->eptp; } return (vmx); @@ -840,20 +969,20 @@ vmx_astpending_trace(struct vmx *vmx, in #endif } +static VMM_STAT_INTEL(VCPU_INVVPID_SAVED, "Number of vpid invalidations saved"); + static void -vmx_set_pcpu_defaults(struct vmx *vmx, int vcpu) +vmx_set_pcpu_defaults(struct vmx *vmx, int vcpu, pmap_t pmap) { - int lastcpu; struct vmxstate *vmxstate; - struct invvpid_desc invvpid_desc = { 0 }; + struct invvpid_desc invvpid_desc; vmxstate = &vmx->state[vcpu]; - lastcpu = vmxstate->lastcpu; - vmxstate->lastcpu = curcpu; - - if (lastcpu == curcpu) + if (vmxstate->lastcpu == curcpu) return; + vmxstate->lastcpu = curcpu; + vmm_stat_incr(vmx->vm, vcpu, VCPU_MIGRATIONS, 1); vmcs_write(VMCS_HOST_TR_BASE, vmm_get_host_trbase()); @@ -876,8 +1005,20 @@ vmx_set_pcpu_defaults(struct vmx *vmx, i * for "all" EP4TAs. */ if (vmxstate->vpid != 0) { - invvpid_desc.vpid = vmxstate->vpid; - invvpid(INVVPID_TYPE_SINGLE_CONTEXT, invvpid_desc); + if (pmap->pm_eptgen == vmx->eptgen[curcpu]) { + invvpid_desc._res1 = 0; + invvpid_desc._res2 = 0; + invvpid_desc.vpid = vmxstate->vpid; + invvpid(INVVPID_TYPE_SINGLE_CONTEXT, invvpid_desc); + } else { + /* + * The invvpid can be skipped if an invept is going to + * be performed before entering the guest. The invept + * will invalidate combined mappings tagged with + * 'vmx->eptp' for all vpids. + */ + vmm_stat_incr(vmx->vm, vcpu, VCPU_INVVPID_SAVED, 1); + } } } @@ -935,7 +1076,7 @@ vmx_inject_nmi(struct vmx *vmx, int vcpu * Inject the virtual NMI. The vector must be the NMI IDT entry * or the VMCS entry check will fail. */ - info = VMCS_INTERRUPTION_INFO_NMI | VMCS_INTERRUPTION_INFO_VALID; + info = VMCS_INTR_INFO_NMI | VMCS_INTR_INFO_VALID; info |= IDT_NMI; vmcs_write(VMCS_ENTRY_INTR_INFO, info); @@ -957,7 +1098,7 @@ nmiblocked: } static void -vmx_inject_interrupts(struct vmx *vmx, int vcpu) +vmx_inject_interrupts(struct vmx *vmx, int vcpu, struct vlapic *vlapic) { int vector; uint64_t info, rflags, interruptibility; @@ -973,7 +1114,7 @@ vmx_inject_interrupts(struct vmx *vmx, i * because of a pending AST. */ info = vmcs_read(VMCS_ENTRY_INTR_INFO); - if (info & VMCS_INTERRUPTION_INFO_VALID) + if (info & VMCS_INTR_INFO_VALID) return; /* @@ -982,9 +1123,13 @@ vmx_inject_interrupts(struct vmx *vmx, i if (vmx_inject_nmi(vmx, vcpu)) return; + if (virtual_interrupt_delivery) { + vmx_inject_pir(vlapic); + return; + } + /* Ask the local apic for a vector to inject */ - vector = lapic_pending_intr(vmx->vm, vcpu); - if (vector < 0) + if (!vlapic_pending_intr(vlapic, &vector)) return; if (vector < 32 || vector > 255) @@ -1000,12 +1145,12 @@ vmx_inject_interrupts(struct vmx *vmx, i goto cantinject; /* Inject the interrupt */ - info = VMCS_INTERRUPTION_INFO_HW_INTR | VMCS_INTERRUPTION_INFO_VALID; + info = VMCS_INTR_INFO_HW_INTR | VMCS_INTR_INFO_VALID; info |= vector; vmcs_write(VMCS_ENTRY_INTR_INFO, info); /* Update the Local APIC ISR */ - lapic_intr_accepted(vmx->vm, vcpu, vector); + vlapic_intr_accepted(vlapic, vector); VCPU_CTR1(vmx->vm, vcpu, "Injecting hwintr at vector %d", vector); @@ -1175,11 +1320,141 @@ ept_emulation_fault(uint64_t ept_qual) } static int +vmx_handle_apic_write(struct vlapic *vlapic, uint64_t qual) +{ + int error, handled, offset; + bool retu; + + if (!virtual_interrupt_delivery) + return (UNHANDLED); + + handled = 1; + offset = APIC_WRITE_OFFSET(qual); + switch (offset) { + case APIC_OFFSET_ID: + vlapic_id_write_handler(vlapic); + break; + case APIC_OFFSET_LDR: + vlapic_ldr_write_handler(vlapic); + break; + case APIC_OFFSET_DFR: + vlapic_dfr_write_handler(vlapic); + break; + case APIC_OFFSET_SVR: + vlapic_svr_write_handler(vlapic); + break; + case APIC_OFFSET_ESR: + vlapic_esr_write_handler(vlapic); + break; + case APIC_OFFSET_ICR_LOW: + retu = false; + error = vlapic_icrlo_write_handler(vlapic, &retu); + if (error != 0 || retu) + handled = 0; + break; + case APIC_OFFSET_CMCI_LVT: + case APIC_OFFSET_TIMER_LVT ... APIC_OFFSET_ERROR_LVT: + vlapic_lvt_write_handler(vlapic, offset); + break; + case APIC_OFFSET_TIMER_ICR: + vlapic_icrtmr_write_handler(vlapic); + break; + case APIC_OFFSET_TIMER_DCR: + vlapic_dcr_write_handler(vlapic); + break; + default: + handled = 0; + break; + } + return (handled); +} + +static bool +apic_access_fault(uint64_t gpa) +{ + + if (virtual_interrupt_delivery && + (gpa >= DEFAULT_APIC_BASE && gpa < DEFAULT_APIC_BASE + PAGE_SIZE)) + return (true); + else + return (false); +} + +static int +vmx_handle_apic_access(struct vmx *vmx, int vcpuid, struct vm_exit *vmexit) +{ + uint64_t qual; + int access_type, offset, allowed; + + if (!virtual_interrupt_delivery) + return (UNHANDLED); + + qual = vmexit->u.vmx.exit_qualification; + access_type = APIC_ACCESS_TYPE(qual); + offset = APIC_ACCESS_OFFSET(qual); + + allowed = 0; + if (access_type == 0) { + /* + * Read data access to the following registers is expected. + */ + switch (offset) { + case APIC_OFFSET_APR: + case APIC_OFFSET_PPR: + case APIC_OFFSET_RRR: + case APIC_OFFSET_CMCI_LVT: + case APIC_OFFSET_TIMER_CCR: + allowed = 1; + break; + default: + break; + } + } else if (access_type == 1) { + /* + * Write data access to the following registers is expected. + */ + switch (offset) { + case APIC_OFFSET_VER: + case APIC_OFFSET_APR: + case APIC_OFFSET_PPR: + case APIC_OFFSET_RRR: + case APIC_OFFSET_ISR0 ... APIC_OFFSET_ISR7: + case APIC_OFFSET_TMR0 ... APIC_OFFSET_TMR7: + case APIC_OFFSET_IRR0 ... APIC_OFFSET_IRR7: + case APIC_OFFSET_CMCI_LVT: + case APIC_OFFSET_TIMER_CCR: + allowed = 1; + break; + default: + break; + } + } + + if (allowed) { + vmexit->exitcode = VM_EXITCODE_INST_EMUL; + vmexit->u.inst_emul.gpa = DEFAULT_APIC_BASE + offset; + vmexit->u.inst_emul.gla = VIE_INVALID_GLA; + vmexit->u.inst_emul.cr3 = vmcs_guest_cr3(); + } + + /* + * Regardless of whether the APIC-access is allowed this handler + * always returns UNHANDLED: + * - if the access is allowed then it is handled by emulating the + * instruction that caused the VM-exit (outside the critical section) + * - if the access is not allowed then it will be converted to an + * exitcode of VM_EXITCODE_VMX and will be dealt with in userland. + */ + return (UNHANDLED); +} + +static int vmx_exit_process(struct vmx *vmx, int vcpu, struct vm_exit *vmexit) { int error, handled; struct vmxctx *vmxctx; - uint32_t eax, ecx, edx, idtvec_info, idtvec_err, reason; + struct vlapic *vlapic; + uint32_t eax, ecx, edx, idtvec_info, idtvec_err, intr_info, reason; uint64_t qual, gpa; bool retu; @@ -1203,7 +1478,7 @@ vmx_exit_process(struct vmx *vmx, int vc switch (reason) { case EXIT_REASON_EPT_FAULT: case EXIT_REASON_EPT_MISCONFIG: - case EXIT_REASON_APIC: + case EXIT_REASON_APIC_ACCESS: case EXIT_REASON_TASK_SWITCH: case EXIT_REASON_EXCEPTION: idtvec_info = vmcs_idt_vectoring_info(); @@ -1290,6 +1565,11 @@ vmx_exit_process(struct vmx *vmx, int vc * host interrupt handler in the VM's softc. We will inject * this virtual interrupt during the subsequent VM enter. */ + intr_info = vmcs_read(VMCS_EXIT_INTR_INFO); + KASSERT((intr_info & VMCS_INTR_INFO_VALID) != 0 && + VMCS_INTR_INFO_TYPE(intr_info) == 0, + ("VM exit interruption info invalid: %#x", intr_info)); + vmx_trigger_hostintr(intr_info & 0xff); /* * This is special. We want to treat this as an 'handled' @@ -1318,24 +1598,42 @@ vmx_exit_process(struct vmx *vmx, int vc handled = vmx_handle_cpuid(vmx->vm, vcpu, vmxctx); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat May 17 19:16:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AEFDA37B; Sat, 17 May 2014 19:16:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BC1A2F3B; Sat, 17 May 2014 19:16:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HJGjiR027350; Sat, 17 May 2014 19:16:45 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HJGjGg027349; Sat, 17 May 2014 19:16:45 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201405171916.s4HJGjGg027349@svn.freebsd.org> From: Luiz Otavio O Souza Date: Sat, 17 May 2014 19:16:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266340 - stable/10/sys/boot/fdt/dts/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 19:16:45 -0000 Author: loos Date: Sat May 17 19:16:45 2014 New Revision: 266340 URL: http://svnweb.freebsd.org/changeset/base/266340 Log: MFC r265013 Revert r258678. Make the led gpio-specifier match again the #gpio-cells settings from the GPIO controller, which i had broken in r258678. Restore the active-low flag. Modified: stable/10/sys/boot/fdt/dts/arm/rpi.dts Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/fdt/dts/arm/rpi.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/rpi.dts Sat May 17 19:11:08 2014 (r266339) +++ stable/10/sys/boot/fdt/dts/arm/rpi.dts Sat May 17 19:16:45 2014 (r266340) @@ -316,7 +316,7 @@ ok { label = "ok"; - gpios = <&gpio 16 2 0>; + gpios = <&gpio 16 1>; /* Don't change this - it configures * how the led driver determines if From owner-svn-src-stable@FreeBSD.ORG Sat May 17 19:37:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 40814802; Sat, 17 May 2014 19:37:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2944E20A8; Sat, 17 May 2014 19:37:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HJb8Uf039560; Sat, 17 May 2014 19:37:08 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HJb5HD039538; Sat, 17 May 2014 19:37:05 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405171937.s4HJb5HD039538@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 19:37:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266341 - in stable/10/sys: arm/arm arm/conf arm/include arm/samsung/exynos boot/fdt/dts/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 19:37:08 -0000 Author: ian Date: Sat May 17 19:37:04 2014 New Revision: 266341 URL: http://svnweb.freebsd.org/changeset/base/266341 Log: MFC 263910, 263913, 263914, 263933, 263934, 263935, 263936, 263981, 263982, Add more flags for the fpexc register from the ARM1176JZF-S Manual Initialise fpscr to a sane value when we create the pcb. This sets NaNs to be the default NaN and for denormalised numbers to be flushed to zero. VFP fixes/cleanups for ARM11: * Save the required VFP registers on context switch. If the exception bit is set we need to save and restore the FPINST register, and if the fp2v bit is also set we need to save and restore FPINST2. * Move saving and restoring the floating point control registers to C. * Clear the fpexc exception and fp2v flags on a floating-point exception. * Signal a SIGFPE if the fpexc exception flag is set on an undefined instruction. This is how the ARM core signals to software there is a floating-point exception. Add Cortex-A15 cpu id revisions. Exynos/Arndale... - Merge SoC-common parts - Enable iicbus device - Directly call kmem_alloc_contig to allocate framebuffer memory and pass VM_MEMATTR_UNCACHEABLE (no-cache, no-buffer). This fixes screen refreshing problem when data is updated too slowly. - Add support for keyboard used in Samsung Chromebook (ARM machine) Support covers device drivers for: - Interrupt Combiner - gpio/pad, External Interrupts Controller (pad) - I2C Interface - Chrome Embedded Controller - Chrome Keyboard - Use new gpio dev class in EHCI driver - Expand device tree information - Release i2c bus on detach. Added: stable/10/sys/arm/conf/CHROMEBOOK.hints - copied unchanged from r263936, head/sys/arm/conf/CHROMEBOOK.hints stable/10/sys/arm/conf/EXYNOS5250.common - copied unchanged from r263935, head/sys/arm/conf/EXYNOS5250.common stable/10/sys/arm/samsung/exynos/chrome_ec.c - copied, changed from r263936, head/sys/arm/samsung/exynos/chrome_ec.c stable/10/sys/arm/samsung/exynos/chrome_ec.h - copied unchanged from r263936, head/sys/arm/samsung/exynos/chrome_ec.h stable/10/sys/arm/samsung/exynos/chrome_kb.c - copied unchanged from r263936, head/sys/arm/samsung/exynos/chrome_kb.c stable/10/sys/arm/samsung/exynos/chrome_kb.h - copied unchanged from r263936, head/sys/arm/samsung/exynos/chrome_kb.h stable/10/sys/arm/samsung/exynos/exynos5_combiner.c - copied unchanged from r263936, head/sys/arm/samsung/exynos/exynos5_combiner.c stable/10/sys/arm/samsung/exynos/exynos5_combiner.h - copied unchanged from r263936, head/sys/arm/samsung/exynos/exynos5_combiner.h stable/10/sys/arm/samsung/exynos/exynos5_i2c.c - copied unchanged from r263936, head/sys/arm/samsung/exynos/exynos5_i2c.c stable/10/sys/arm/samsung/exynos/exynos5_pad.c - copied unchanged from r263936, head/sys/arm/samsung/exynos/exynos5_pad.c stable/10/sys/arm/samsung/exynos/exynos5_pad.h - copied unchanged from r263936, head/sys/arm/samsung/exynos/exynos5_pad.h Modified: stable/10/sys/arm/arm/cpufunc.c stable/10/sys/arm/arm/identcpu.c stable/10/sys/arm/arm/machdep.c stable/10/sys/arm/arm/vfp.c stable/10/sys/arm/arm/vm_machdep.c stable/10/sys/arm/conf/ARNDALE stable/10/sys/arm/conf/CHROMEBOOK stable/10/sys/arm/include/armreg.h stable/10/sys/arm/include/fp.h stable/10/sys/arm/include/vfp.h stable/10/sys/arm/samsung/exynos/exynos5_ehci.c stable/10/sys/arm/samsung/exynos/exynos5_fimd.c stable/10/sys/arm/samsung/exynos/files.exynos5 stable/10/sys/boot/fdt/dts/arm/exynos5250-arndale.dts stable/10/sys/boot/fdt/dts/arm/exynos5250-chromebook.dts stable/10/sys/boot/fdt/dts/arm/exynos5250.dtsi Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/cpufunc.c ============================================================================== --- stable/10/sys/arm/arm/cpufunc.c Sat May 17 19:16:45 2014 (r266340) +++ stable/10/sys/arm/arm/cpufunc.c Sat May 17 19:37:04 2014 (r266341) @@ -1055,7 +1055,10 @@ set_cpufuncs() cputype == CPU_ID_CORTEXA9R1 || cputype == CPU_ID_CORTEXA9R2 || cputype == CPU_ID_CORTEXA9R3 || - cputype == CPU_ID_CORTEXA15 || + cputype == CPU_ID_CORTEXA15R0 || + cputype == CPU_ID_CORTEXA15R1 || + cputype == CPU_ID_CORTEXA15R2 || + cputype == CPU_ID_CORTEXA15R3 || cputype == CPU_ID_KRAIT ) { cpufuncs = cortexa_cpufuncs; cpu_reset_needs_v4_MMU_disable = 1; /* V4 or higher */ Modified: stable/10/sys/arm/arm/identcpu.c ============================================================================== --- stable/10/sys/arm/arm/identcpu.c Sat May 17 19:16:45 2014 (r266340) +++ stable/10/sys/arm/arm/identcpu.c Sat May 17 19:37:04 2014 (r266341) @@ -183,7 +183,13 @@ const struct cpuidtab cpuids[] = { generic_steppings }, { CPU_ID_CORTEXA9R3, CPU_CLASS_CORTEXA, "Cortex A9-r3", generic_steppings }, - { CPU_ID_CORTEXA15, CPU_CLASS_CORTEXA, "Cortex A15", + { CPU_ID_CORTEXA15R0, CPU_CLASS_CORTEXA, "Cortex A15-r0", + generic_steppings }, + { CPU_ID_CORTEXA15R1, CPU_CLASS_CORTEXA, "Cortex A15-r1", + generic_steppings }, + { CPU_ID_CORTEXA15R2, CPU_CLASS_CORTEXA, "Cortex A15-r2", + generic_steppings }, + { CPU_ID_CORTEXA15R3, CPU_CLASS_CORTEXA, "Cortex A15-r3", generic_steppings }, { CPU_ID_KRAIT, CPU_CLASS_KRAIT, "Krait", generic_steppings }, Modified: stable/10/sys/arm/arm/machdep.c ============================================================================== --- stable/10/sys/arm/arm/machdep.c Sat May 17 19:16:45 2014 (r266340) +++ stable/10/sys/arm/arm/machdep.c Sat May 17 19:37:04 2014 (r266341) @@ -101,6 +101,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -990,6 +991,7 @@ init_proc0(vm_offset_t kstack) (thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1; thread0.td_pcb->pcb_flags = 0; thread0.td_pcb->pcb_vfpcpu = -1; + thread0.td_pcb->pcb_vfpstate.fpscr = VFPSCR_DN | VFPSCR_FZ; thread0.td_frame = &proc0_tf; pcpup->pc_curpcb = thread0.td_pcb; } Modified: stable/10/sys/arm/arm/vfp.c ============================================================================== --- stable/10/sys/arm/arm/vfp.c Sat May 17 19:16:45 2014 (r266340) +++ stable/10/sys/arm/arm/vfp.c Sat May 17 19:37:04 2014 (r266341) @@ -149,6 +149,7 @@ vfp_bounce(u_int addr, u_int insn, struc { u_int cpu, fpexc; struct pcb *curpcb; + ksiginfo_t ksi; if ((code & FAULT_USER) == 0) panic("undefined floating point instruction in supervisor mode"); @@ -162,9 +163,27 @@ vfp_bounce(u_int addr, u_int insn, struc */ fpexc = fmrx(VFPEXC); if (fpexc & VFPEXC_EN) { + /* Clear any exceptions */ + fmxr(VFPEXC, fpexc & ~(VFPEXC_EX | VFPEXC_FP2V)); + /* kill the process - we do not handle emulation */ critical_exit(); - killproc(curthread->td_proc, "vfp emulation"); + + if (fpexc & VFPEXC_EX) { + /* We have an exception, signal a SIGFPE */ + ksiginfo_init_trap(&ksi); + ksi.ksi_signo = SIGFPE; + if (fpexc & VFPEXC_UFC) + ksi.ksi_code = FPE_FLTUND; + else if (fpexc & VFPEXC_OFC) + ksi.ksi_code = FPE_FLTOVF; + else if (fpexc & VFPEXC_IOC) + ksi.ksi_code = FPE_FLTINV; + ksi.ksi_addr = (void *)addr; + trapsignal(curthread, &ksi); + return 0; + } + return 1; } @@ -192,15 +211,24 @@ vfp_bounce(u_int addr, u_int insn, struc static void vfp_restore(struct vfp_state *vfpsave) { - u_int vfpscr = 0; + uint32_t fpexc; + + /* On VFPv2 we may need to restore FPINST and FPINST2 */ + fpexc = vfpsave->fpexec; + if (fpexc & VFPEXC_EX) { + fmxr(VFPINST, vfpsave->fpinst); + if (fpexc & VFPEXC_FP2V) + fmxr(VFPINST2, vfpsave->fpinst2); + } + fmxr(VFPSCR, vfpsave->fpscr); - __asm __volatile("ldc p10, c0, [%1], #128\n" /* d0-d15 */ - "cmp %2, #0\n" /* -D16 or -D32? */ - LDCLNE "p11, c0, [%1], #128\n" /* d16-d31 */ - "addeq %1, %1, #128\n" /* skip missing regs */ - "ldr %0, [%1]\n" /* set old vfpscr */ - "mcr p10, 7, %0, cr1, c0, 0\n" - : "=&r" (vfpscr) : "r" (vfpsave), "r" (is_d32) : "cc"); + __asm __volatile("ldc p10, c0, [%0], #128\n" /* d0-d15 */ + "cmp %1, #0\n" /* -D16 or -D32? */ + LDCLNE "p11, c0, [%0], #128\n" /* d16-d31 */ + "addeq %0, %0, #128\n" /* skip missing regs */ + : : "r" (vfpsave), "r" (is_d32) : "cc"); + + fmxr(VFPEXC, fpexc); } /* @@ -211,20 +239,30 @@ vfp_restore(struct vfp_state *vfpsave) void vfp_store(struct vfp_state *vfpsave, boolean_t disable_vfp) { - u_int tmp, vfpscr; + uint32_t fpexc; + + fpexc = fmrx(VFPEXC); /* Is the vfp enabled? */ + if (fpexc & VFPEXC_EN) { + vfpsave->fpexec = fpexc; + vfpsave->fpscr = fmrx(VFPSCR); + + /* On VFPv2 we may need to save FPINST and FPINST2 */ + if (fpexc & VFPEXC_EX) { + vfpsave->fpinst = fmrx(VFPINST); + if (fpexc & VFPEXC_FP2V) + vfpsave->fpinst2 = fmrx(VFPINST2); + fpexc &= ~VFPEXC_EX; + } - tmp = fmrx(VFPEXC); /* Is the vfp enabled? */ - if (tmp & VFPEXC_EN) { __asm __volatile( - "stc p11, c0, [%1], #128\n" /* d0-d15 */ - "cmp %2, #0\n" /* -D16 or -D32? */ - STCLNE "p11, c0, [%1], #128\n" /* d16-d31 */ - "addeq %1, %1, #128\n" /* skip missing regs */ - "mrc p10, 7, %0, cr1, c0, 0\n" /* fmxr(VFPSCR) */ - "str %0, [%1]\n" /* save vfpscr */ - : "=&r" (vfpscr) : "r" (vfpsave), "r" (is_d32) : "cc"); + "stc p11, c0, [%0], #128\n" /* d0-d15 */ + "cmp %1, #0\n" /* -D16 or -D32? */ + STCLNE "p11, c0, [%0], #128\n" /* d16-d31 */ + "addeq %0, %0, #128\n" /* skip missing regs */ + : : "r" (vfpsave), "r" (is_d32) : "cc"); + if (disable_vfp) - fmxr(VFPEXC , tmp & ~VFPEXC_EN); + fmxr(VFPEXC , fpexc & ~VFPEXC_EN); } } Modified: stable/10/sys/arm/arm/vm_machdep.c ============================================================================== --- stable/10/sys/arm/arm/vm_machdep.c Sat May 17 19:16:45 2014 (r266340) +++ stable/10/sys/arm/arm/vm_machdep.c Sat May 17 19:37:04 2014 (r266341) @@ -74,6 +74,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include /* * struct switchframe and trapframe must both be a multiple of 8 @@ -147,6 +148,7 @@ cpu_fork(register struct thread *td1, re pcb2->un_32.pcb32_sp = td2->td_kstack + USPACE_SVC_STACK_TOP - sizeof(*pcb2); pcb2->pcb_vfpcpu = -1; + pcb2->pcb_vfpstate.fpscr = VFPSCR_DN | VFPSCR_FZ; pmap_activate(td2); td2->td_frame = tf = (struct trapframe *)STACKALIGN( pcb2->un_32.pcb32_sp - sizeof(struct trapframe)); Modified: stable/10/sys/arm/conf/ARNDALE ============================================================================== --- stable/10/sys/arm/conf/ARNDALE Sat May 17 19:16:45 2014 (r266340) +++ stable/10/sys/arm/conf/ARNDALE Sat May 17 19:37:04 2014 (r266341) @@ -17,122 +17,9 @@ # # $FreeBSD$ +include "EXYNOS5250.common" ident ARNDALE -include "../samsung/exynos/std.exynos5" - -makeoptions MODULES_OVERRIDE="" -makeoptions WITHOUT_MODULES="ahc" - -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -makeoptions WERROR="-Werror" - -options HZ=100 -options SCHED_4BSD # 4BSD scheduler -options INET # InterNETworking -options INET6 # IPv6 communications protocols -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem -options FFS # Berkeley Fast Filesystem -options SOFTUPDATES -options UFS_ACL # Support for access control lists -options UFS_DIRHASH # Improve performance on big directories -options MSDOSFS # MSDOS Filesystem -options CD9660 # ISO 9660 Filesystem -options PROCFS # Process filesystem (requires PSEUDOFS) -options PSEUDOFS # Pseudo-filesystem framework -options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] -options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI -options KTRACE -options SYSVSHM # SYSV-style shared memory -options SYSVMSG # SYSV-style message queues -options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions -options KBD_INSTALL_CDEV -options PREEMPTION -options FREEBSD_BOOT_LOADER -options VFP # vfp/neon - -# Debugging -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options BREAK_TO_DEBUGGER -#options VERBOSE_SYSINIT # Enable verbose sysinit messages -options KDB -options DDB # Enable the kernel debugger -#options INVARIANTS # Enable calls of extra sanity checking -#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS # Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options DIAGNOSTIC - -# NFS support -options NFSCL # Network Filesystem Client -options NFSLOCKD # Network Lock Manager -options NFS_ROOT # NFS usable as /, requires NFSCLIENT - -# Uncomment this for NFS root -#options NFS_ROOT # NFS usable as /, requires NFSCL -#options BOOTP_NFSROOT -#options BOOTP_COMPAT -#options BOOTP -#options BOOTP_NFSV3 -#options BOOTP_WIRED_TO=cpsw0 - -device mmc # mmc/sd bus -device mmcsd # mmc/sd flash cards -device sdhci # generic sdhci - -options ROOTDEVNAME=\"ufs:/dev/da0\" - -#options SMP - -# Pseudo devices - -device loop -device random -device pty -device md -device gpio - -# USB support -options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. -device usb -options USB_DEBUG -#options USB_REQ_DEBUG -#options USB_VERBOSE -#device musb -device ehci -#device ohci - -device umass -device scbus # SCSI bus (required for SCSI) -device da # Direct Access (disks) -device pass - -# SATA -#device ata -#device atadisk -#device mvs - -# Serial ports -device uart - -# I2C (TWSI) -#device iic -#device iicbus - -# Ethernet -device ether -device mii -device smsc -device smscphy - -# USB ethernet support, requires miibus -device miibus -device axe # ASIX Electronics USB Ethernet -device bpf # Berkeley packet filter - #FDT options FDT options FDT_DTB_STATIC Modified: stable/10/sys/arm/conf/CHROMEBOOK ============================================================================== --- stable/10/sys/arm/conf/CHROMEBOOK Sat May 17 19:16:45 2014 (r266340) +++ stable/10/sys/arm/conf/CHROMEBOOK Sat May 17 19:37:04 2014 (r266341) @@ -17,106 +17,13 @@ # # $FreeBSD$ +include "EXYNOS5250.common" ident CHROMEBOOK -include "../samsung/exynos/std.exynos5" +hints "CHROMEBOOK.hints" -makeoptions MODULES_OVERRIDE="" -makeoptions WITHOUT_MODULES="ahc" - -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -makeoptions WERROR="-Werror" - -options HZ=100 -options SCHED_4BSD # 4BSD scheduler -options INET # InterNETworking -options INET6 # IPv6 communications protocols -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem -options FFS # Berkeley Fast Filesystem -options SOFTUPDATES -options UFS_ACL # Support for access control lists -options UFS_DIRHASH # Improve performance on big directories -options MSDOSFS # MSDOS Filesystem -options CD9660 # ISO 9660 Filesystem -options PROCFS # Process filesystem (requires PSEUDOFS) -options PSEUDOFS # Pseudo-filesystem framework -options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] -options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI -options KTRACE -options SYSVSHM # SYSV-style shared memory -options SYSVMSG # SYSV-style message queues -options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions -options KBD_INSTALL_CDEV -options PREEMPTION -options FREEBSD_BOOT_LOADER -options VFP # vfp/neon - -# Debugging -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options BREAK_TO_DEBUGGER -#options VERBOSE_SYSINIT # Enable verbose sysinit messages -options KDB -options DDB # Enable the kernel debugger -#options INVARIANTS # Enable calls of extra sanity checking -#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS # Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options DIAGNOSTIC - -# NFS support -options NFSCL # Network Filesystem Client -options NFSLOCKD # Network Lock Manager -options NFS_ROOT # NFS usable as /, requires NFSCLIENT - -# Uncomment this for NFS root -#options NFS_ROOT # NFS usable as /, requires NFSCL -#options BOOTP_NFSROOT -#options BOOTP_COMPAT -#options BOOTP -#options BOOTP_NFSV3 -#options BOOTP_WIRED_TO=cpsw0 - -device mmc # mmc/sd bus -device mmcsd # mmc/sd flash cards -device sdhci # generic sdhci - -options ROOTDEVNAME=\"ufs:/dev/da0\" - -#options SMP - -# Pseudo devices - -device loop -device random -device pty -device md -device gpio - -# USB support -options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. -device usb -options USB_DEBUG -#options USB_REQ_DEBUG -#options USB_VERBOSE -#device musb -device ehci -#device ohci - -device umass -device scbus # SCSI bus (required for SCSI) -device da # Direct Access (disks) -device pass - -# SATA -#device ata -#device atadisk -#device mvs - -# Serial ports -device uart +device chrome_ec # Chrome Embedded Controller +device chrome_kb # Chrome Keyboard # Framebuffer device vt @@ -125,21 +32,6 @@ options SC_DFLT_FONT # compile font in makeoptions SC_DFLT_FONT=cp437 device ukbd -# I2C (TWSI) -#device iic -#device iicbus - -# Ethernet -device ether -device mii -device smsc -device smscphy - -# USB ethernet support, requires miibus -device miibus -device axe # ASIX Electronics USB Ethernet -device bpf # Berkeley packet filter - #FDT options FDT options FDT_DTB_STATIC Copied: stable/10/sys/arm/conf/CHROMEBOOK.hints (from r263936, head/sys/arm/conf/CHROMEBOOK.hints) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/conf/CHROMEBOOK.hints Sat May 17 19:37:04 2014 (r266341, copy of r263936, head/sys/arm/conf/CHROMEBOOK.hints) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +# Chrome Embedded Controller +hint.chrome_ec.0.at="iicbus0" +hint.chrome_ec.0.addr=0x1e Copied: stable/10/sys/arm/conf/EXYNOS5250.common (from r263935, head/sys/arm/conf/EXYNOS5250.common) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/conf/EXYNOS5250.common Sat May 17 19:37:04 2014 (r266341, copy of r263935, head/sys/arm/conf/EXYNOS5250.common) @@ -0,0 +1,132 @@ +# Kernel configuration for Samsung Exynos 5250 boards. +# +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +include "../samsung/exynos/std.exynos5" + +makeoptions MODULES_OVERRIDE="" +makeoptions WITHOUT_MODULES="ahc" + +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +makeoptions WERROR="-Werror" + +options HZ=100 +options SCHED_4BSD # 4BSD scheduler +options INET # InterNETworking +options INET6 # IPv6 communications protocols +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme +options TMPFS # Efficient memory filesystem +options FFS # Berkeley Fast Filesystem +options SOFTUPDATES +options UFS_ACL # Support for access control lists +options UFS_DIRHASH # Improve performance on big directories +options MSDOSFS # MSDOS Filesystem +options CD9660 # ISO 9660 Filesystem +options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework +options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +options KTRACE +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions +options KBD_INSTALL_CDEV +options PREEMPTION +options FREEBSD_BOOT_LOADER +options VFP # vfp/neon + +# Debugging +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +options BREAK_TO_DEBUGGER +#options VERBOSE_SYSINIT # Enable verbose sysinit messages +options KDB +options DDB # Enable the kernel debugger +#options INVARIANTS # Enable calls of extra sanity checking +#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options DIAGNOSTIC + +# NFS support +options NFSCL # Network Filesystem Client +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCLIENT + +# Uncomment this for NFS root +#options NFS_ROOT # NFS usable as /, requires NFSCL +#options BOOTP_NFSROOT +#options BOOTP_COMPAT +#options BOOTP +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=ue0 + +device mmc # mmc/sd bus +device mmcsd # mmc/sd flash cards +device sdhci # generic sdhci + +options ROOTDEVNAME=\"ufs:/dev/da0\" + +#options SMP + +# Pseudo devices + +device loop +device random +device pty +device md +device gpio + +# USB support +options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. +device usb +options USB_DEBUG +#options USB_REQ_DEBUG +#options USB_VERBOSE +#device musb +device ehci +#device ohci + +device umass +device scbus # SCSI bus (required for SCSI) +device da # Direct Access (disks) +device pass + +# SATA +#device ata +#device atadisk +#device mvs + +# Serial ports +device uart + +# I2C (TWSI) +device iic +device iicbus + +# Ethernet +device ether +device mii +device smsc +device smscphy + +# USB ethernet support, requires miibus +device miibus +device axe # ASIX Electronics USB Ethernet +device bpf # Berkeley packet filter Modified: stable/10/sys/arm/include/armreg.h ============================================================================== --- stable/10/sys/arm/include/armreg.h Sat May 17 19:16:45 2014 (r266340) +++ stable/10/sys/arm/include/armreg.h Sat May 17 19:37:04 2014 (r266341) @@ -122,7 +122,10 @@ #define CPU_ID_CORTEXA9R1 0x411fc090 #define CPU_ID_CORTEXA9R2 0x412fc090 #define CPU_ID_CORTEXA9R3 0x413fc090 -#define CPU_ID_CORTEXA15 0x410fc0f0 +#define CPU_ID_CORTEXA15R0 0x410fc0f0 +#define CPU_ID_CORTEXA15R1 0x411fc0f0 +#define CPU_ID_CORTEXA15R2 0x412fc0f0 +#define CPU_ID_CORTEXA15R3 0x413fc0f0 #define CPU_ID_KRAIT 0x510f06f0 /* Snapdragon S4 Pro/APQ8064 */ #define CPU_ID_TI925T 0x54029250 #define CPU_ID_MV88FR131 0x56251310 /* Marvell Feroceon 88FR131 Core */ Modified: stable/10/sys/arm/include/fp.h ============================================================================== --- stable/10/sys/arm/include/fp.h Sat May 17 19:16:45 2014 (r266340) +++ stable/10/sys/arm/include/fp.h Sat May 17 19:37:04 2014 (r266341) @@ -69,6 +69,9 @@ typedef struct fp_extended_precision fp_ struct vfp_state { u_int64_t reg[32]; u_int32_t fpscr; + u_int32_t fpexec; + u_int32_t fpinst; + u_int32_t fpinst2; }; /* Modified: stable/10/sys/arm/include/vfp.h ============================================================================== --- stable/10/sys/arm/include/vfp.h Sat May 17 19:16:45 2014 (r266340) +++ stable/10/sys/arm/include/vfp.h Sat May 17 19:37:04 2014 (r266341) @@ -92,6 +92,11 @@ /* VFPEXC */ #define VFPEXC_EX (0x80000000) /* exception v1 v2 */ #define VFPEXC_EN (0x40000000) /* vfp enable */ +#define VFPEXC_FP2V (0x10000000) /* FPINST2 valid */ +#define VFPEXC_INV (0x00000080) /* Input exception */ +#define VFPEXC_UFC (0x00000008) /* Underflow exception */ +#define VFPEXC_OFC (0x00000004) /* Overflow exception */ +#define VFPEXC_IOC (0x00000001) /* Invlaid operation */ /* version 3 registers */ /* VMVFR0 */ Copied and modified: stable/10/sys/arm/samsung/exynos/chrome_ec.c (from r263936, head/sys/arm/samsung/exynos/chrome_ec.c) ============================================================================== --- head/sys/arm/samsung/exynos/chrome_ec.c Sun Mar 30 15:22:36 2014 (r263936, copy source) +++ stable/10/sys/arm/samsung/exynos/chrome_ec.c Sat May 17 19:37:04 2014 (r266341) @@ -234,9 +234,22 @@ ec_attach(device_t dev) return (0); } +static int +ec_detach(device_t dev) +{ + struct ec_softc *sc; + + sc = device_get_softc(dev); + + bus_release(sc); + + return (0); +} + static device_method_t ec_methods[] = { DEVMETHOD(device_probe, ec_probe), DEVMETHOD(device_attach, ec_attach), + DEVMETHOD(device_detach, ec_detach), { 0, 0 } }; Copied: stable/10/sys/arm/samsung/exynos/chrome_ec.h (from r263936, head/sys/arm/samsung/exynos/chrome_ec.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/samsung/exynos/chrome_ec.h Sat May 17 19:37:04 2014 (r266341, copy of r263936, head/sys/arm/samsung/exynos/chrome_ec.h) @@ -0,0 +1,36 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +#define EC_CMD_HELLO 0x01 +#define EC_CMD_GET_VERSION 0x02 +#define EC_CMD_MKBP_STATE 0x60 +#define EC_CMD_VERSION0 0xdc + +int ec_command(uint8_t cmd, uint8_t *dout, uint8_t dout_len, + uint8_t *dinp, uint8_t dinp_len); +int ec_hello(void); Copied: stable/10/sys/arm/samsung/exynos/chrome_kb.c (from r263936, head/sys/arm/samsung/exynos/chrome_kb.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/samsung/exynos/chrome_kb.c Sat May 17 19:37:04 2014 (r266341, copy of r263936, head/sys/arm/samsung/exynos/chrome_kb.c) @@ -0,0 +1,792 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * All rights reserved. + * + * 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. + */ + +/* + * Samsung Chromebook Keyboard + */ + +#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 "gpio_if.h" + +#include +#include + +#include +#include + +#define CKB_LOCK() mtx_lock(&Giant) +#define CKB_UNLOCK() mtx_unlock(&Giant) + +#ifdef INVARIANTS +/* + * Assert that the lock is held in all contexts + * where the code can be executed. + */ +#define CKB_LOCK_ASSERT() mtx_assert(&Giant, MA_OWNED) +/* + * Assert that the lock is held in the contexts + * where it really has to be so. + */ +#define CKB_CTX_LOCK_ASSERT() \ + do { \ + if (!kdb_active && panicstr == NULL) \ + mtx_assert(&Giant, MA_OWNED); \ + } while (0) +#else +#define CKB_LOCK_ASSERT() (void)0 +#define CKB_CTX_LOCK_ASSERT() (void)0 +#endif + +/* + * Define a stub keyboard driver in case one hasn't been + * compiled into the kernel + */ +#include +#include +#include + +#define CKB_NFKEY 12 +#define CKB_FLAG_COMPOSE 0x1 +#define CKB_FLAG_POLLING 0x2 +#define KBD_DRIVER_NAME "ckbd" + +/* TODO: take interrupt from DTS */ +#define KB_GPIO_INT 146 + +struct ckb_softc { + keyboard_t sc_kbd; + keymap_t sc_keymap; + accentmap_t sc_accmap; + fkeytab_t sc_fkeymap[CKB_NFKEY]; + + struct resource* sc_mem_res; + struct resource* sc_irq_res; + void* sc_intr_hl; + + int sc_mode; /* input mode (K_XLATE,K_RAW,K_CODE) */ + int sc_state; /* shift/lock key state */ + int sc_accents; /* accent key index (> 0) */ + int sc_flags; /* flags */ + + struct callout sc_repeat_callout; + int sc_repeat_key; + int sc_repeating; + + int flag; + int rows; + int cols; + device_t dev; + struct thread *sc_poll_thread; + + uint8_t *scan_local; + uint8_t *scan; +}; + +/* prototypes */ +static void ckb_set_leds(struct ckb_softc *, uint8_t); +static int ckb_set_typematic(keyboard_t *, int); +static uint32_t ckb_read_char(keyboard_t *, int); +static void ckb_clear_state(keyboard_t *); +static int ckb_ioctl(keyboard_t *, u_long, caddr_t); +static int ckb_enable(keyboard_t *); +static int ckb_disable(keyboard_t *); + +static void +ckb_repeat(void *arg) +{ + struct ckb_softc *sc; + + sc = arg; + + if (KBD_IS_ACTIVE(&sc->sc_kbd) && KBD_IS_BUSY(&sc->sc_kbd)) { + if (sc->sc_repeat_key != -1) { + sc->sc_repeating = 1; + sc->sc_kbd.kb_callback.kc_func(&sc->sc_kbd, + KBDIO_KEYINPUT, sc->sc_kbd.kb_callback.kc_arg); + } + } +} + +/* detect a keyboard, not used */ +static int +ckb__probe(int unit, void *arg, int flags) +{ + + return (ENXIO); +} + +/* reset and initialize the device, not used */ +static int +ckb_init(int unit, keyboard_t **kbdp, void *arg, int flags) +{ + + return (ENXIO); +} + +/* test the interface to the device, not used */ +static int +ckb_test_if(keyboard_t *kbd) +{ + + return (0); +} + +/* finish using this keyboard, not used */ +static int +ckb_term(keyboard_t *kbd) +{ + + return (ENXIO); +} + +/* keyboard interrupt routine, not used */ +static int +ckb_intr(keyboard_t *kbd, void *arg) +{ + + return (0); +} + +/* lock the access to the keyboard, not used */ +static int +ckb_lock(keyboard_t *kbd, int lock) +{ + + return (1); +} + +/* clear the internal state of the keyboard */ +static void +ckb_clear_state(keyboard_t *kbd) +{ + struct ckb_softc *sc; + + sc = kbd->kb_data; + + CKB_CTX_LOCK_ASSERT(); + + sc->sc_flags &= ~(CKB_FLAG_COMPOSE | CKB_FLAG_POLLING); + sc->sc_state &= LOCK_MASK; /* preserve locking key state */ + sc->sc_accents = 0; +} + +/* save the internal state, not used */ +static int +ckb_get_state(keyboard_t *kbd, void *buf, size_t len) +{ + + return (len == 0) ? 1 : -1; +} + +/* set the internal state, not used */ +static int +ckb_set_state(keyboard_t *kbd, void *buf, size_t len) +{ + + return (EINVAL); +} + + +/* check if data is waiting */ +static int +ckb_check(keyboard_t *kbd) +{ + struct ckb_softc *sc; + int i; + + sc = kbd->kb_data; + + CKB_CTX_LOCK_ASSERT(); + + if (!KBD_IS_ACTIVE(kbd)) + return (0); + + if (sc->sc_flags & CKB_FLAG_POLLING) { + return (1); + }; + + for (i = 0; i < sc->cols; i++) + if (sc->scan_local[i] != sc->scan[i]) { + return (1); + }; + + if (sc->sc_repeating) + return (1); + + return (0); +} + +/* check if char is waiting */ +static int +ckb_check_char_locked(keyboard_t *kbd) +{ + CKB_CTX_LOCK_ASSERT(); + + if (!KBD_IS_ACTIVE(kbd)) + return (0); + + return (ckb_check(kbd)); +} + +static int +ckb_check_char(keyboard_t *kbd) +{ + int result; + + CKB_LOCK(); + result = ckb_check_char_locked(kbd); + CKB_UNLOCK(); + + return (result); +} + +/* read one byte from the keyboard if it's allowed */ +/* Currently unused. */ +static int +ckb_read(keyboard_t *kbd, int wait) +{ + CKB_CTX_LOCK_ASSERT(); + + if (!KBD_IS_ACTIVE(kbd)) + return (-1); + + printf("Implement ME: %s\n", __func__); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat May 17 19:45:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C40D9D45; Sat, 17 May 2014 19:45:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B097A214C; Sat, 17 May 2014 19:45:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HJje2w045601; Sat, 17 May 2014 19:45:40 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HJje8L045600; Sat, 17 May 2014 19:45:40 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201405171945.s4HJje8L045600@svn.freebsd.org> From: Glen Barber Date: Sat, 17 May 2014 19:45:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266343 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 19:45:40 -0000 Author: gjb Date: Sat May 17 19:45:40 2014 New Revision: 266343 URL: http://svnweb.freebsd.org/changeset/base/266343 Log: Document r266165, power management bug with Intel Turbo Boost. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat May 17 19:45:23 2014 (r266342) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat May 17 19:45:40 2014 (r266343) @@ -154,6 +154,11 @@ &man.mrsas.4;. + A kernel bug that inhibited proper + functionality of the dev.cpu.0.freq + &man.sysctl.8; on &intel; processors with Turbo + Boost ™ enabled has been fixed. + Virtualization support From owner-svn-src-stable@FreeBSD.ORG Sat May 17 19:45:58 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C917CF61; Sat, 17 May 2014 19:45:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEAA0214F; Sat, 17 May 2014 19:45:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HJjw1g045715; Sat, 17 May 2014 19:45:58 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HJjw0B045714; Sat, 17 May 2014 19:45:58 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201405171945.s4HJjw0B045714@svn.freebsd.org> From: Glen Barber Date: Sat, 17 May 2014 19:45:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266345 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 19:45:58 -0000 Author: gjb Date: Sat May 17 19:45:58 2014 New Revision: 266345 URL: http://svnweb.freebsd.org/changeset/base/266345 Log: Document r266269, xenhvm.ko. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat May 17 19:45:55 2014 (r266344) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat May 17 19:45:58 2014 (r266345) @@ -291,6 +291,9 @@ &man.sysctl.8; on &intel; processors with Turbo Boost ™ enabled has been fixed. + Support for &man.xen.4; + hardware-assisted virtualization, XENHVM, + has been reworked as a loadable module. Boot Loader Changes From owner-svn-src-stable@FreeBSD.ORG Sat May 17 19:45:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 37763E6C; Sat, 17 May 2014 19:45:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 24085214E; Sat, 17 May 2014 19:45:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HJjuSb045676; Sat, 17 May 2014 19:45:56 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HJjuJE045675; Sat, 17 May 2014 19:45:56 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201405171945.s4HJjuJE045675@svn.freebsd.org> From: Glen Barber Date: Sat, 17 May 2014 19:45:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266344 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 19:45:56 -0000 Author: gjb Date: Sat May 17 19:45:55 2014 New Revision: 266344 URL: http://svnweb.freebsd.org/changeset/base/266344 Log: Document r266167, power management bug with Intel Turbo Boost. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat May 17 19:45:40 2014 (r266343) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat May 17 19:45:55 2014 (r266344) @@ -286,6 +286,12 @@ providing support for LSI Fusion-MPT 3 12Gb SCSI/SATA controllers. + A kernel bug that inhibited proper + functionality of the dev.cpu.0.freq + &man.sysctl.8; on &intel; processors with Turbo + Boost ™ enabled has been fixed. + + Boot Loader Changes From owner-svn-src-stable@FreeBSD.ORG Sat May 17 19:59:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EFB62508; Sat, 17 May 2014 19:59:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBF6B222C; Sat, 17 May 2014 19:59:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HJxkl8052397; Sat, 17 May 2014 19:59:46 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HJxkwP052396; Sat, 17 May 2014 19:59:46 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201405171959.s4HJxkwP052396@svn.freebsd.org> From: Glen Barber Date: Sat, 17 May 2014 19:59:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266346 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 19:59:47 -0000 Author: gjb Date: Sat May 17 19:59:46 2014 New Revision: 266346 URL: http://svnweb.freebsd.org/changeset/base/266346 Log: Reword r266269 text, based on feedback from cperciva. Mention the kld module name. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat May 17 19:45:58 2014 (r266345) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat May 17 19:59:46 2014 (r266346) @@ -293,7 +293,8 @@ Support for &man.xen.4; hardware-assisted virtualization, XENHVM, - has been reworked as a loadable module. + is now available as a loadable module, + xenhvm.ko. Boot Loader Changes From owner-svn-src-stable@FreeBSD.ORG Sat May 17 20:10:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7B9B8858; Sat, 17 May 2014 20:10:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 662FE2303; Sat, 17 May 2014 20:10:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HKAEN7059236; Sat, 17 May 2014 20:10:14 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HKACvq059227; Sat, 17 May 2014 20:10:12 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405172010.s4HKACvq059227@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 20:10:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266347 - in stable/10: share/man/man9 sys/arm/arm sys/arm/ti/omap4 sys/kern sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 20:10:14 -0000 Author: ian Date: Sat May 17 20:10:12 2014 New Revision: 266347 URL: http://svnweb.freebsd.org/changeset/base/266347 Log: MFC 264019, 264041, 264048, 264049, 264050, 264051 Add support for event timers whose clock frequency can change while running. Apparently all ARM configs build kern_et.c, but only a few of them also build kern_clocksource.c, un-break the build by not referencing functions in kern_clocksource if NO_EVENTTIMERS is defined. Add variable-frequency support to the arm mpcore eventtimer driver. mpcore_timer: Disable the timer and clear any pending bit, then setup the new counter register values, then restart the timer. Also re-nest the parens properly for casting the result of converting time and frequency to a count. Added: stable/10/sys/arm/arm/mpcore_timervar.h - copied, changed from r264050, head/sys/arm/arm/mpcore_timervar.h Modified: stable/10/share/man/man9/eventtimers.9 stable/10/sys/arm/arm/mpcore_timer.c stable/10/sys/arm/ti/omap4/omap4_prcm_clks.c stable/10/sys/kern/kern_clocksource.c stable/10/sys/kern/kern_et.c stable/10/sys/sys/systm.h stable/10/sys/sys/timeet.h Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man9/eventtimers.9 ============================================================================== --- stable/10/share/man/man9/eventtimers.9 Sat May 17 19:59:46 2014 (r266346) +++ stable/10/share/man/man9/eventtimers.9 Sat May 17 20:10:12 2014 (r266347) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 25, 2013 +.Dd April 2, 2014 .Dt EVENTTIMERS 9 .Os .Sh NAME @@ -68,6 +68,8 @@ struct eventtimer { .Fn et_register "struct eventtimer *et" .Ft int .Fn et_deregister "struct eventtimer *et" +.Ft void +.Fn et_change_frequency "struct eventtimer *et" "uint64_t newfreq" .Fn ET_LOCK .Fn ET_UNLOCK .Ft struct eventtimer * @@ -176,6 +178,21 @@ methods control timers associated with t .Pp Driver may deregister its functionality by calling .Fn et_deregister . +.Pp +If the frequency of the clock hardware can change while it is +running (for example, during power-saving modes), the driver must call +.Fn et_change_frequency +on each change. +If the given event timer is the active timer, +.Fn et_change_frequency +stops the timer on all CPUs, updates +.Va et->frequency , +then restarts the timer on all CPUs so that all +current events are rescheduled using the new frequency. +If the given timer is not currently active, +.Fn et_change_frequency +simply updates +.Va et->frequency . .Sh CONSUMER API .Fn et_find allows consumer to find available event timer, optionally matching specific Modified: stable/10/sys/arm/arm/mpcore_timer.c ============================================================================== --- stable/10/sys/arm/arm/mpcore_timer.c Sat May 17 19:59:46 2014 (r266346) +++ stable/10/sys/arm/arm/mpcore_timer.c Sat May 17 20:10:12 2014 (r266347) @@ -30,16 +30,16 @@ */ /** - * The ARM Cortex-A9 core can support a global timer plus a private and - * watchdog timer per core. This driver reserves memory and interrupt - * resources for accessing both timer register sets, these resources are - * stored globally and used to setup the timecount and eventtimer. + * The ARM Cortex-A9 core can support a global timer plus a private and + * watchdog timer per core. This driver reserves memory and interrupt + * resources for accessing both timer register sets, these resources are + * stored globally and used to setup the timecount and eventtimer. * - * The timecount timer uses the global 64-bit counter, whereas the - * per-CPU eventtimer uses the private 32-bit counters. + * The timecount timer uses the global 64-bit counter, whereas the + * per-CPU eventtimer uses the private 32-bit counters. * * - * REF: ARM Cortex-A9 MPCore, Technical Reference Manual (rev. r2p2) + * REF: ARM Cortex-A9 MPCore, Technical Reference Manual (rev. r2p2) */ #include @@ -67,6 +67,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + /* Private (per-CPU) timer register map */ #define PRV_TIMER_LOAD 0x0000 #define PRV_TIMER_COUNT 0x0004 @@ -100,7 +102,7 @@ struct arm_tmr_softc { bus_space_tag_t gbl_bst; bus_space_handle_t prv_bsh; bus_space_handle_t gbl_bsh; - uint32_t clkfreq; + uint64_t clkfreq; struct eventtimer et; }; @@ -114,7 +116,7 @@ static struct resource_spec arm_tmr_spec static struct arm_tmr_softc *arm_tmr_sc = NULL; -uint32_t platform_arm_tmr_freq = 0; +static uint64_t platform_arm_tmr_freq = 0; #define tmr_prv_read_4(reg) \ bus_space_read_4(arm_tmr_sc->prv_bst, arm_tmr_sc->prv_bsh, reg) @@ -173,6 +175,9 @@ arm_tmr_start(struct eventtimer *et, sbi uint32_t load, count; uint32_t ctrl; + tmr_prv_write_4(PRV_TIMER_CTRL, 0); + tmr_prv_write_4(PRV_TIMER_INTR, PRV_TIMER_INTR_EVENT); + ctrl = PRV_TIMER_CTRL_IRQ_ENABLE | PRV_TIMER_CTRL_TIMER_ENABLE; if (period != 0) { @@ -182,14 +187,14 @@ arm_tmr_start(struct eventtimer *et, sbi load = 0; if (first != 0) - count = ((uint32_t)et->et_frequency * first) >> 32; + count = (uint32_t)((et->et_frequency * first) >> 32); else count = load; tmr_prv_write_4(PRV_TIMER_LOAD, load); tmr_prv_write_4(PRV_TIMER_COUNT, count); - tmr_prv_write_4(PRV_TIMER_CTRL, ctrl); + return (0); } @@ -206,6 +211,7 @@ static int arm_tmr_stop(struct eventtimer *et) { tmr_prv_write_4(PRV_TIMER_CTRL, 0); + tmr_prv_write_4(PRV_TIMER_INTR, PRV_TIMER_INTR_EVENT); return (0); } @@ -275,24 +281,29 @@ arm_tmr_attach(device_t dev) phandle_t node; pcell_t clock; void *ihl; + boolean_t fixed_freq; if (arm_tmr_sc) return (ENXIO); - if (platform_arm_tmr_freq != 0) - sc->clkfreq = platform_arm_tmr_freq; - else { - /* Get the base clock frequency */ - node = ofw_bus_get_node(dev); - if ((OF_getprop(node, "clock-frequency", &clock, - sizeof(clock))) <= 0) { - device_printf(dev, "missing clock-frequency attribute in FDT\n"); - return (ENXIO); + if (platform_arm_tmr_freq == ARM_TMR_FREQUENCY_VARIES) { + fixed_freq = false; + } else { + fixed_freq = true; + if (platform_arm_tmr_freq != 0) { + sc->clkfreq = platform_arm_tmr_freq; + } else { + /* Get the base clock frequency */ + node = ofw_bus_get_node(dev); + if ((OF_getencprop(node, "clock-frequency", &clock, + sizeof(clock))) <= 0) { + device_printf(dev, "missing clock-frequency " + "attribute in FDT\n"); + return (ENXIO); + } } - sc->clkfreq = fdt32_to_cpu(clock); } - if (bus_alloc_resources(dev, arm_tmr_spec, sc->tmr_res)) { device_printf(dev, "could not allocate resources\n"); return (ENXIO); @@ -312,14 +323,6 @@ arm_tmr_attach(device_t dev) tmr_prv_write_4(PRV_TIMER_CTRL, 0x00000000); tmr_gbl_write_4(GBL_TIMER_CTRL, 0x00000000); - /* Setup and enable the global timer to use as the timecounter */ - tmr_gbl_write_4(GBL_TIMER_CTRL, (0x00 << GBL_TIMER_CTR_PRESCALER_SHIFT) | - GBL_TIMER_CTRL_TIMER_ENABLE); - - arm_tmr_timecount.tc_frequency = sc->clkfreq; - tc_init(&arm_tmr_timecount); - - /* Setup and enable the timer */ if (bus_setup_intr(dev, sc->tmr_res[3], INTR_TYPE_CLK, arm_tmr_intr, NULL, sc, &ihl) != 0) { bus_release_resources(dev, arm_tmr_spec, sc->tmr_res); @@ -327,13 +330,35 @@ arm_tmr_attach(device_t dev) return (ENXIO); } + /* + * If the clock is fixed-frequency, setup and enable the global timer to + * use as the timecounter. If it's variable frequency it won't work as + * a timecounter. We also can't use it for DELAY(), so hopefully the + * platform provides its own implementation. If it doesn't, ours will + * get used, but since the frequency isn't set, it will only use the + * bogus loop counter. + */ + if (fixed_freq) { + tmr_gbl_write_4(GBL_TIMER_CTRL, GBL_TIMER_CTRL_TIMER_ENABLE); + arm_tmr_timecount.tc_frequency = sc->clkfreq; + tc_init(&arm_tmr_timecount); + } + + /* + * Setup and register the eventtimer. Most event timers set their min + * and max period values to some value calculated from the clock + * frequency. We might not know yet what our runtime clock frequency + * will be, so we just use some safe values. A max of 2 seconds ensures + * that even if our base clock frequency is 2GHz (meaning a 4GHz CPU), + * we won't overflow our 32-bit timer count register. A min of 20 + * nanoseconds is pretty much completely arbitrary. + */ sc->et.et_name = "MPCore"; sc->et.et_flags = ET_FLAGS_PERIODIC | ET_FLAGS_ONESHOT | ET_FLAGS_PERCPU; sc->et.et_quality = 1000; - sc->et.et_frequency = sc->clkfreq; - sc->et.et_min_period = (0x00000002LLU << 32) / sc->et.et_frequency; - sc->et.et_max_period = (0xfffffffeLLU << 32) / sc->et.et_frequency; + sc->et.et_min_period = 20 * SBT_1NS; + sc->et.et_max_period = 2 * SBT_1S; sc->et.et_start = arm_tmr_start; sc->et.et_stop = arm_tmr_stop; sc->et.et_priv = sc; @@ -358,6 +383,31 @@ static devclass_t arm_tmr_devclass; DRIVER_MODULE(mp_tmr, simplebus, arm_tmr_driver, arm_tmr_devclass, 0, 0); +/* + * Handle a change in clock frequency. The mpcore timer runs at half the CPU + * frequency. When the CPU frequency changes due to power-saving or thermal + * managment, the platform-specific code that causes the frequency change calls + * this routine to inform the clock driver, and we in turn inform the event + * timer system, which actually updates the value in et->frequency for us and + * reschedules the current event(s) in a way that's atomic with respect to + * start/stop/intr code that may be running on various CPUs at the time of the + * call. + * + * This routine can also be called by a platform's early init code. If the + * value passed is ARM_TMR_FREQUENCY_VARIES, that will cause the attach() code + * to register as an eventtimer, but not a timecounter. If the value passed in + * is any other non-zero value it is used as the fixed frequency for the timer. + */ +void +arm_tmr_change_frequency(uint64_t newfreq) +{ + + if (arm_tmr_sc == NULL) + platform_arm_tmr_freq = newfreq; + else + et_change_frequency(&arm_tmr_sc->et, newfreq); +} + /** * DELAY - Delay for at least usec microseconds. * @usec: number of microseconds to delay by @@ -377,7 +427,7 @@ arm_tmr_DELAY(int usec) uint32_t first, last; /* Check the timers are setup, if not just use a for loop for the meantime */ - if (arm_tmr_sc == NULL) { + if (arm_tmr_sc == NULL || arm_tmr_timecount.tc_frequency == 0) { for (; usec > 0; usec--) for (counts = 200; counts > 0; counts--) cpufunc_nullop(); /* Prevent gcc from optimizing Copied and modified: stable/10/sys/arm/arm/mpcore_timervar.h (from r264050, head/sys/arm/arm/mpcore_timervar.h) ============================================================================== --- head/sys/arm/arm/mpcore_timervar.h Wed Apr 2 18:43:56 2014 (r264050, copy source) +++ stable/10/sys/arm/arm/mpcore_timervar.h Sat May 17 20:10:12 2014 (r266347) @@ -42,6 +42,6 @@ * Inform the mpcore timer driver of a new clock frequency. This can be called * both before and after the mpcore timer driver attaches. */ -void arm_tmr_change_frequency(uint64_t newfreq); +void arm_tmr_change_frequency(uint64_t newfreq); #endif Modified: stable/10/sys/arm/ti/omap4/omap4_prcm_clks.c ============================================================================== --- stable/10/sys/arm/ti/omap4/omap4_prcm_clks.c Sat May 17 19:59:46 2014 (r266346) +++ stable/10/sys/arm/ti/omap4/omap4_prcm_clks.c Sat May 17 20:10:12 2014 (r266347) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -85,7 +86,6 @@ __FBSDID("$FreeBSD$"); * OMAP4 devices are different from the previous OMAP3 devices in that there * is no longer a separate functional and interface clock for each module, * instead there is typically an interface clock that spans many modules. - * */ #define FREQ_96MHZ 96000000 @@ -1404,7 +1404,7 @@ omap4_prcm_attach(device_t dev) omap4_prcm_sc = sc; ti_cpu_reset = omap4_prcm_reset; omap4_clk_get_arm_fclk_freq(NULL, &freq); - platform_arm_tmr_freq = freq / 2; + arm_tmr_change_frequency(freq / 2); return (0); } Modified: stable/10/sys/kern/kern_clocksource.c ============================================================================== --- stable/10/sys/kern/kern_clocksource.c Sat May 17 19:59:46 2014 (r266346) +++ stable/10/sys/kern/kern_clocksource.c Sat May 17 20:10:12 2014 (r266347) @@ -800,6 +800,25 @@ cpu_activeclock(void) spinlock_exit(); } +/* + * Change the frequency of the given timer. This changes et->et_frequency and + * if et is the active timer it reconfigures the timer on all CPUs. This is + * intended to be a private interface for the use of et_change_frequency() only. + */ +void +cpu_et_frequency(struct eventtimer *et, uint64_t newfreq) +{ + + ET_LOCK(); + if (et == timer) { + configtimer(0); + et->et_frequency = newfreq; + configtimer(1); + } else + et->et_frequency = newfreq; + ET_UNLOCK(); +} + #ifdef KDTRACE_HOOKS void clocksource_cyc_set(const struct bintime *bt) Modified: stable/10/sys/kern/kern_et.c ============================================================================== --- stable/10/sys/kern/kern_et.c Sat May 17 19:59:46 2014 (r266346) +++ stable/10/sys/kern/kern_et.c Sat May 17 20:10:12 2014 (r266347) @@ -34,6 +34,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include "opt_timer.h" + SLIST_HEAD(et_eventtimers_list, eventtimer); static struct et_eventtimers_list eventtimers = SLIST_HEAD_INITIALIZER(et_eventtimers); @@ -113,6 +115,20 @@ et_deregister(struct eventtimer *et) } /* + * Change the frequency of the given timer. If it is the active timer, + * reconfigure it on all CPUs (reschedules all current events based on the new + * timer frequency). + */ +void +et_change_frequency(struct eventtimer *et, uint64_t newfreq) +{ + +#ifndef NO_EVENTTIMERS + cpu_et_frequency(et, newfreq); +#endif +} + +/* * Find free event timer hardware with specified parameters. */ struct eventtimer * Modified: stable/10/sys/sys/systm.h ============================================================================== --- stable/10/sys/sys/systm.h Sat May 17 19:59:46 2014 (r266346) +++ stable/10/sys/sys/systm.h Sat May 17 20:10:12 2014 (r266347) @@ -168,6 +168,7 @@ struct ucred; struct uio; struct _jmp_buf; struct trapframe; +struct eventtimer; int setjmp(struct _jmp_buf *) __returns_twice; void longjmp(struct _jmp_buf *, int) __dead2; @@ -286,6 +287,7 @@ void cpu_stopprofclock(void); sbintime_t cpu_idleclock(void); void cpu_activeclock(void); void cpu_new_callout(int cpu, sbintime_t bt, sbintime_t bt_opt); +void cpu_et_frequency(struct eventtimer *et, uint64_t newfreq); extern int cpu_can_deep_sleep; extern int cpu_disable_deep_sleep; Modified: stable/10/sys/sys/timeet.h ============================================================================== --- stable/10/sys/sys/timeet.h Sat May 17 19:59:46 2014 (r266346) +++ stable/10/sys/sys/timeet.h Sat May 17 20:10:12 2014 (r266347) @@ -89,6 +89,7 @@ extern struct mtx et_eventtimers_mtx; /* Driver API */ int et_register(struct eventtimer *et); int et_deregister(struct eventtimer *et); +void et_change_frequency(struct eventtimer *et, uint64_t newfreq); /* Consumer API */ struct eventtimer *et_find(const char *name, int check, int want); int et_init(struct eventtimer *et, et_event_cb_t *event, From owner-svn-src-stable@FreeBSD.ORG Sat May 17 20:22:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D6E0D67; Sat, 17 May 2014 20:22:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 894C92433; Sat, 17 May 2014 20:22:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HKMOH0070900; Sat, 17 May 2014 20:22:24 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HKMNgh070891; Sat, 17 May 2014 20:22:23 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405172022.s4HKMNgh070891@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 20:22:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266348 - in stable/10/sys: arm/freescale/imx boot/fdt/dts/arm conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 20:22:24 -0000 Author: ian Date: Sat May 17 20:22:22 2014 New Revision: 266348 URL: http://svnweb.freebsd.org/changeset/base/266348 Log: MFC 264054, 264056 Switch imx6 to using the mpcore per-cpu event timers, but continue to use the GPT timer, which is fixed-frequency, as a timecounter. Change NO_EVENTTIMERS from an arm-specific to an MI option, so that it can be used in MI code. Modified: stable/10/sys/arm/freescale/imx/files.imx6 stable/10/sys/arm/freescale/imx/imx6_anatop.c stable/10/sys/arm/freescale/imx/imx6_machdep.c stable/10/sys/boot/fdt/dts/arm/imx6.dtsi stable/10/sys/conf/options stable/10/sys/conf/options.arm Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/freescale/imx/files.imx6 ============================================================================== --- stable/10/sys/arm/freescale/imx/files.imx6 Sat May 17 20:10:12 2014 (r266347) +++ stable/10/sys/arm/freescale/imx/files.imx6 Sat May 17 20:22:22 2014 (r266348) @@ -16,6 +16,7 @@ kern/kern_clocksource.c standard arm/arm/gic.c standard arm/arm/pl310.c standard arm/freescale/imx/bus_space.c standard +arm/arm/mpcore_timer.c standard arm/freescale/fsl_ocotp.c standard arm/freescale/imx/imx6_anatop.c standard arm/freescale/imx/imx_common.c standard Modified: stable/10/sys/arm/freescale/imx/imx6_anatop.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx6_anatop.c Sat May 17 20:10:12 2014 (r266347) +++ stable/10/sys/arm/freescale/imx/imx6_anatop.c Sat May 17 20:22:22 2014 (r266348) @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -263,6 +264,8 @@ cpufreq_set_clock(struct imx6_anatop_sof imx6_anatop_write_4(IMX6_ANALOG_CCM_PLL_ARM_CLR, IMX6_ANALOG_CCM_PLL_ARM_BYPASS); + + arm_tmr_change_frequency(sc->cpu_curhz / 2); } static void Modified: stable/10/sys/arm/freescale/imx/imx6_machdep.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx6_machdep.c Sat May 17 20:10:12 2014 (r266347) +++ stable/10/sys/arm/freescale/imx/imx6_machdep.c Sat May 17 20:22:22 2014 (r266348) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -55,6 +56,8 @@ void initarm_early_init(void) { + /* Inform the MPCore timer driver that its clock is variable. */ + arm_tmr_change_frequency(ARM_TMR_FREQUENCY_VARIES); } void Modified: stable/10/sys/boot/fdt/dts/arm/imx6.dtsi ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/imx6.dtsi Sat May 17 20:10:12 2014 (r266347) +++ stable/10/sys/boot/fdt/dts/arm/imx6.dtsi Sat May 17 20:22:22 2014 (r266348) @@ -71,6 +71,14 @@ 0x00a00100 0x00000100>; }; + mp_tmr0@00a00200 { + compatible = "arm,mpcore-timers"; + reg = <0x00a00200 0x100 + 0x00a00600 0x100>; + interrupts = <27 29>; + interrupt-parent = <&gic>; + }; + l2-cache@00a02000 { compatible = "arm,pl310-cache", "arm,pl310"; reg = <0xa02000 0x1000>; Modified: stable/10/sys/conf/options ============================================================================== --- stable/10/sys/conf/options Sat May 17 20:10:12 2014 (r266347) +++ stable/10/sys/conf/options Sat May 17 20:22:22 2014 (r266348) @@ -158,6 +158,7 @@ NEW_PCIB opt_global.h NO_ADAPTIVE_MUTEXES opt_adaptive_mutexes.h NO_ADAPTIVE_RWLOCKS NO_ADAPTIVE_SX +NO_EVENTTIMERS opt_timer.h NO_SYSCTL_DESCR opt_global.h NSWBUF_MIN opt_swap.h MBUF_PACKET_ZONE_DISABLE opt_global.h Modified: stable/10/sys/conf/options.arm ============================================================================== --- stable/10/sys/conf/options.arm Sat May 17 20:10:12 2014 (r266347) +++ stable/10/sys/conf/options.arm Sat May 17 20:22:22 2014 (r266348) @@ -31,7 +31,6 @@ KERNPHYSADDR opt_global.h KERNVIRTADDR opt_global.h LINUX_BOOT_ABI opt_global.h LOADERRAMADDR opt_global.h -NO_EVENTTIMERS opt_timer.h PHYSADDR opt_global.h SOCDEV_PA opt_global.h SOCDEV_VA opt_global.h From owner-svn-src-stable@FreeBSD.ORG Sat May 17 20:52:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C37B4941; Sat, 17 May 2014 20:52:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE7D52657; Sat, 17 May 2014 20:52:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HKqBv9089574; Sat, 17 May 2014 20:52:11 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HKqAbe089568; Sat, 17 May 2014 20:52:10 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405172052.s4HKqAbe089568@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 20:52:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266352 - in stable/10/sys: arm/arm arm/freescale/imx arm/samsung/exynos boot/fdt/dts/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 20:52:11 -0000 Author: ian Date: Sat May 17 20:52:10 2014 New Revision: 266352 URL: http://svnweb.freebsd.org/changeset/base/266352 Log: MFC 264052, 264057, 264065, 264094, 264103, 264120 Actually save the mpcore clock frequency retrieved from fdt data. imx6.. - Don't call sdhci_init_slot() until after handling the FDT properties related to detecting card presence. - Flag several sysctl variables as tunables. - Rework the cpu frequency management code for imx6 to add "operating points" and min/max frequency controls. generic timer... - Setup both secure and non-secure timer IRQs. We don't know our ARM security state, so one of them will operate. - Don't set frequency, since it's unpossible in non-secure state. Only rely on DTS clock-frequency value or get clock from timer. Modified: stable/10/sys/arm/arm/generic_timer.c stable/10/sys/arm/arm/mpcore_timer.c stable/10/sys/arm/freescale/imx/imx6_anatop.c stable/10/sys/arm/freescale/imx/imx_sdhci.c stable/10/sys/arm/samsung/exynos/chrome_kb.c stable/10/sys/boot/fdt/dts/arm/exynos5250.dtsi Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/generic_timer.c ============================================================================== --- stable/10/sys/arm/arm/generic_timer.c Sat May 17 20:39:39 2014 (r266351) +++ stable/10/sys/arm/arm/generic_timer.c Sat May 17 20:52:10 2014 (r266352) @@ -73,16 +73,23 @@ __FBSDID("$FreeBSD$"); #define GT_CNTKCTL_PL0VCTEN (1 << 1) /* PL0 CNTVCT and CNTFRQ access */ #define GT_CNTKCTL_PL0PCTEN (1 << 0) /* PL0 CNTPCT and CNTFRQ access */ -#define GT_CNTPSIRQ 29 - struct arm_tmr_softc { - struct resource *irq_res; + struct resource *res[4]; + void *ihl[4]; uint32_t clkfreq; struct eventtimer et; }; static struct arm_tmr_softc *arm_tmr_sc = NULL; +static struct resource_spec timer_spec[] = { + { SYS_RES_IRQ, 0, RF_ACTIVE }, /* Secure */ + { SYS_RES_IRQ, 1, RF_ACTIVE }, /* Non-secure */ + { SYS_RES_IRQ, 2, RF_ACTIVE }, /* Virt */ + { SYS_RES_IRQ, 3, RF_ACTIVE }, /* Hyp */ + { -1, 0 } +}; + static timecounter_get_t arm_tmr_get_timecount; static struct timecounter arm_tmr_timecount = { @@ -261,9 +268,8 @@ arm_tmr_attach(device_t dev) struct arm_tmr_softc *sc; phandle_t node; pcell_t clock; - void *ihl; - int rid; int error; + int i; sc = device_get_softc(dev); if (arm_tmr_sc) @@ -272,29 +278,37 @@ arm_tmr_attach(device_t dev) /* Get the base clock frequency */ node = ofw_bus_get_node(dev); error = OF_getprop(node, "clock-frequency", &clock, sizeof(clock)); - if (error <= 0) { - device_printf(dev, "missing clock-frequency " - "attribute in FDT\n"); + if (error > 0) { + sc->clkfreq = fdt32_to_cpu(clock); + } + + if (sc->clkfreq == 0) { + /* Try to get clock frequency from timer */ + sc->clkfreq = get_freq(); + } + + if (sc->clkfreq == 0) { + device_printf(dev, "No clock frequency specified\n"); return (ENXIO); } - sc->clkfreq = fdt32_to_cpu(clock); - rid = 0; - sc->irq_res = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, - GT_CNTPSIRQ, GT_CNTPSIRQ, - 1, RF_SHAREABLE | RF_ACTIVE); + if (bus_alloc_resources(dev, timer_spec, sc->res)) { + device_printf(dev, "could not allocate resources\n"); + return (ENXIO); + }; arm_tmr_sc = sc; - /* Setup and enable the timer */ - if (bus_setup_intr(dev, sc->irq_res, INTR_TYPE_CLK, arm_tmr_intr, - NULL, sc, &ihl) != 0) { - bus_release_resource(dev, SYS_RES_IRQ, rid, sc->irq_res); - device_printf(dev, "Unable to setup the CLK irq handler.\n"); - return (ENXIO); + /* Setup secure and non-secure IRQs handler */ + for (i = 0; i < 2; i++) { + error = bus_setup_intr(dev, sc->res[i], INTR_TYPE_CLK, + arm_tmr_intr, NULL, sc, &sc->ihl[i]); + if (error) { + device_printf(dev, "Unable to alloc int resource.\n"); + return (ENXIO); + } } - set_freq(sc->clkfreq); disable_user_access(); arm_tmr_timecount.tc_frequency = sc->clkfreq; Modified: stable/10/sys/arm/arm/mpcore_timer.c ============================================================================== --- stable/10/sys/arm/arm/mpcore_timer.c Sat May 17 20:39:39 2014 (r266351) +++ stable/10/sys/arm/arm/mpcore_timer.c Sat May 17 20:52:10 2014 (r266352) @@ -301,6 +301,7 @@ arm_tmr_attach(device_t dev) "attribute in FDT\n"); return (ENXIO); } + sc->clkfreq = clock; } } Modified: stable/10/sys/arm/freescale/imx/imx6_anatop.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx6_anatop.c Sat May 17 20:39:39 2014 (r266351) +++ stable/10/sys/arm/freescale/imx/imx6_anatop.c Sat May 17 20:52:10 2014 (r266352) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -74,6 +75,8 @@ __FBSDID("$FreeBSD$"); #include #include +static SYSCTL_NODE(_hw, OID_AUTO, imx6, CTLFLAG_RW, NULL, "i.MX6 container"); + static struct resource_spec imx6_anatop_spec[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, { SYS_RES_IRQ, 0, RF_ACTIVE }, @@ -85,14 +88,15 @@ static struct resource_spec imx6_anatop_ struct imx6_anatop_softc { device_t dev; struct resource *res[2]; - uint32_t cpu_curhz; uint32_t cpu_curmhz; uint32_t cpu_curmv; - uint32_t cpu_minhz; + uint32_t cpu_minmhz; uint32_t cpu_minmv; - uint32_t cpu_maxhz; + uint32_t cpu_maxmhz; uint32_t cpu_maxmv; - uint32_t refosc_hz; + uint32_t cpu_maxmhz_hw; + boolean_t cpu_overclock_enable; + uint32_t refosc_mhz; void *temp_intrhand; uint32_t temp_high_val; uint32_t temp_high_cnt; @@ -108,16 +112,27 @@ struct imx6_anatop_softc { static struct imx6_anatop_softc *imx6_anatop_sc; /* - * Tables of CPU max frequencies and corresponding voltages. This is indexed by - * the max frequency value (0-3) from the ocotp CFG3 register. + * Table of "operating points". + * These are combinations of frequency and voltage blessed by Freescale. */ -static uint32_t imx6_cpu_maxhz_tab[] = { - 792000000, 852000000, 996000000, 1200000000 -}; -static uint32_t imx6_cpu_millivolt_tab[] = { - 1150, 1225, 1225, 1275 +static struct oppt { + uint32_t mhz; + uint32_t mv; +} imx6_oppt_table[] = { +/* { 396, 925}, XXX: need functional ccm code for this speed */ + { 792, 1150}, + { 852, 1225}, + { 996, 1225}, + {1200, 1275}, }; +/* + * Table of CPU max frequencies. This is used to translate the max frequency + * value (0-3) from the ocotp CFG3 register into a mhz value that can be looked + * up in the operating points table. + */ +static uint32_t imx6_ocotp_mhz_tab[] = {792, 852, 996, 1200}; + #define TZ_ZEROC 2732 /* deci-Kelvin <-> deci-Celcius offset. */ uint32_t @@ -193,49 +208,58 @@ vdd_set(struct imx6_anatop_softc *sc, in imx6_anatop_write_4(IMX6_ANALOG_PMU_REG_CORE, pmureg); DELAY(delay); sc->cpu_curmv = newtarg * 25 + 700; - device_printf(sc->dev, "voltage set to %u\n", sc->cpu_curmv); } static inline uint32_t -cpufreq_hz_from_div(struct imx6_anatop_softc *sc, uint32_t div) +cpufreq_mhz_from_div(struct imx6_anatop_softc *sc, uint32_t div) { - return (sc->refosc_hz * (div / 2)); + return (sc->refosc_mhz * (div / 2)); } static inline uint32_t -cpufreq_hz_to_div(struct imx6_anatop_softc *sc, uint32_t cpu_hz) +cpufreq_mhz_to_div(struct imx6_anatop_softc *sc, uint32_t cpu_mhz) { - return (cpu_hz / (sc->refosc_hz / 2)); + return (cpu_mhz / (sc->refosc_mhz / 2)); } static inline uint32_t -cpufreq_actual_hz(struct imx6_anatop_softc *sc, uint32_t cpu_hz) +cpufreq_actual_mhz(struct imx6_anatop_softc *sc, uint32_t cpu_mhz) +{ + + return (cpufreq_mhz_from_div(sc, cpufreq_mhz_to_div(sc, cpu_mhz))); +} + +static struct oppt * +cpufreq_nearest_oppt(struct imx6_anatop_softc *sc, uint32_t cpu_newmhz) { + int d, diff, i, nearest; - return (cpufreq_hz_from_div(sc, cpufreq_hz_to_div(sc, cpu_hz))); + if (cpu_newmhz > sc->cpu_maxmhz_hw && !sc->cpu_overclock_enable) + cpu_newmhz = sc->cpu_maxmhz_hw; + + diff = INT_MAX; + nearest = 0; + for (i = 0; i < nitems(imx6_oppt_table); ++i) { + d = abs((int)cpu_newmhz - (int)imx6_oppt_table[i].mhz); + if (diff > d) { + diff = d; + nearest = i; + } + } + return (&imx6_oppt_table[nearest]); } static void -cpufreq_set_clock(struct imx6_anatop_softc * sc, uint32_t cpu_newhz) +cpufreq_set_clock(struct imx6_anatop_softc * sc, struct oppt *op) { - uint32_t div, timeout, wrk32; - const uint32_t mindiv = 54; - const uint32_t maxdiv = 108; - - /* - * Clip the requested frequency to the configured max, then clip the - * resulting divisor to the documented min/max values. - */ - cpu_newhz = min(cpu_newhz, sc->cpu_maxhz); - div = cpufreq_hz_to_div(sc, cpu_newhz); - if (div < mindiv) - div = mindiv; - else if (div > maxdiv) - div = maxdiv; - sc->cpu_curhz = cpufreq_hz_from_div(sc, div); - sc->cpu_curmhz = sc->cpu_curhz / 1000000; + uint32_t timeout, wrk32; + + /* If increasing the frequency, we must first increase the voltage. */ + if (op->mhz > sc->cpu_curmhz) { + vdd_set(sc, op->mv); + } /* * I can't find a documented procedure for changing the ARM PLL divisor, @@ -244,7 +268,7 @@ cpufreq_set_clock(struct imx6_anatop_sof * - Set the PLL into bypass mode; cpu should now be running at 24mhz. * - Change the divisor. * - Wait for the LOCK bit to come on; it takes ~50 loop iterations. - * - Turn off bypass mode; cpu should now be running at cpu_newhz. + * - Turn off bypass mode; cpu should now be running at the new speed. */ imx6_anatop_write_4(IMX6_ANALOG_CCM_PLL_ARM_CLR, IMX6_ANALOG_CCM_PLL_ARM_CLK_SRC_MASK); @@ -253,7 +277,7 @@ cpufreq_set_clock(struct imx6_anatop_sof wrk32 = imx6_anatop_read_4(IMX6_ANALOG_CCM_PLL_ARM); wrk32 &= ~IMX6_ANALOG_CCM_PLL_ARM_DIV_MASK; - wrk32 |= div; + wrk32 |= cpufreq_mhz_to_div(sc, op->mhz); imx6_anatop_write_4(IMX6_ANALOG_CCM_PLL_ARM, wrk32); timeout = 10000; @@ -265,26 +289,114 @@ cpufreq_set_clock(struct imx6_anatop_sof imx6_anatop_write_4(IMX6_ANALOG_CCM_PLL_ARM_CLR, IMX6_ANALOG_CCM_PLL_ARM_BYPASS); - arm_tmr_change_frequency(sc->cpu_curhz / 2); + /* If lowering the frequency, it is now safe to lower the voltage. */ + if (op->mhz < sc->cpu_curmhz) + vdd_set(sc, op->mv); + sc->cpu_curmhz = op->mhz; + + /* Tell the mpcore timer that its frequency has changed. */ + arm_tmr_change_frequency( + cpufreq_actual_mhz(sc, sc->cpu_curmhz) * 1000000 / 2); +} + +static int +cpufreq_sysctl_minmhz(SYSCTL_HANDLER_ARGS) +{ + struct imx6_anatop_softc *sc; + struct oppt * op; + uint32_t temp; + int err; + + sc = arg1; + + temp = sc->cpu_minmhz; + err = sysctl_handle_int(oidp, &temp, 0, req); + if (err != 0 || req->newptr == NULL) + return (err); + + op = cpufreq_nearest_oppt(sc, temp); + if (op->mhz > sc->cpu_maxmhz) + return (ERANGE); + else if (op->mhz == sc->cpu_minmhz) + return (0); + + /* + * Value changed, update softc. If the new min is higher than the + * current speed, raise the current speed to match. + */ + sc->cpu_minmhz = op->mhz; + if (sc->cpu_minmhz > sc->cpu_curmhz) { + cpufreq_set_clock(sc, op); + } + return (err); +} + +static int +cpufreq_sysctl_maxmhz(SYSCTL_HANDLER_ARGS) +{ + struct imx6_anatop_softc *sc; + struct oppt * op; + uint32_t temp; + int err; + + sc = arg1; + + temp = sc->cpu_maxmhz; + err = sysctl_handle_int(oidp, &temp, 0, req); + if (err != 0 || req->newptr == NULL) + return (err); + + op = cpufreq_nearest_oppt(sc, temp); + if (op->mhz < sc->cpu_minmhz) + return (ERANGE); + else if (op->mhz == sc->cpu_maxmhz) + return (0); + + /* + * Value changed, update softc and hardware. The hardware update is + * unconditional. We always try to run at max speed, so any change of + * the max means we need to change the current speed too, regardless of + * whether it is higher or lower than the old max. + */ + sc->cpu_maxmhz = op->mhz; + cpufreq_set_clock(sc, op); + + return (err); } static void cpufreq_initialize(struct imx6_anatop_softc *sc) { uint32_t cfg3speed; - struct sysctl_ctx_list *ctx; + struct oppt * op; - ctx = device_get_sysctl_ctx(sc->dev); - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(device_get_sysctl_tree(sc->dev)), + SYSCTL_ADD_INT(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx6), OID_AUTO, "cpu_mhz", CTLFLAG_RD, &sc->cpu_curmhz, 0, - "CPU frequency in MHz"); + "CPU frequency"); + + SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx6), + OID_AUTO, "cpu_minmhz", CTLTYPE_INT | CTLFLAG_RWTUN, sc, 0, + cpufreq_sysctl_minmhz, "IU", "Minimum CPU frequency"); + + SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx6), + OID_AUTO, "cpu_maxmhz", CTLTYPE_INT | CTLFLAG_RWTUN, sc, 0, + cpufreq_sysctl_maxmhz, "IU", "Maximum CPU frequency"); + + SYSCTL_ADD_INT(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx6), + OID_AUTO, "cpu_maxmhz_hw", CTLFLAG_RD, &sc->cpu_maxmhz_hw, 0, + "Maximum CPU frequency allowed by hardware"); + + SYSCTL_ADD_INT(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx6), + OID_AUTO, "cpu_overclock_enable", CTLFLAG_RWTUN, + &sc->cpu_overclock_enable, 0, + "Allow setting CPU frequency higher than cpu_maxmhz_hw"); /* * XXX 24mhz shouldn't be hard-coded, should get this from imx6_ccm * (even though in the real world it will always be 24mhz). Oh wait a * sec, I never wrote imx6_ccm. */ - sc->refosc_hz = 24000000; + sc->refosc_mhz = 24; /* * Get the maximum speed this cpu can be set to. The values in the @@ -294,14 +406,25 @@ cpufreq_initialize(struct imx6_anatop_so * - 2b'10: 996000000Hz; * - 2b'01: 852000000Hz; -- i.MX6Q Only, exclusive with 996MHz. * - 2b'00: 792000000Hz; + * The default hardware max speed can be overridden by a tunable. */ cfg3speed = (fsl_ocotp_read_4(FSL_OCOTP_CFG3) & FSL_OCOTP_CFG3_SPEED_MASK) >> FSL_OCOTP_CFG3_SPEED_SHIFT; + sc->cpu_maxmhz_hw = imx6_ocotp_mhz_tab[cfg3speed]; + sc->cpu_maxmhz = sc->cpu_maxmhz_hw; + + TUNABLE_INT_FETCH("hw.imx6.cpu_overclock_enable", + &sc->cpu_overclock_enable); - sc->cpu_minhz = cpufreq_actual_hz(sc, imx6_cpu_maxhz_tab[0]); - sc->cpu_minmv = imx6_cpu_millivolt_tab[0]; - sc->cpu_maxhz = cpufreq_actual_hz(sc, imx6_cpu_maxhz_tab[cfg3speed]); - sc->cpu_maxmv = imx6_cpu_millivolt_tab[cfg3speed]; + TUNABLE_INT_FETCH("hw.imx6.cpu_minmhz", &sc->cpu_minmhz); + op = cpufreq_nearest_oppt(sc, sc->cpu_minmhz); + sc->cpu_minmhz = op->mhz; + sc->cpu_minmv = op->mv; + + TUNABLE_INT_FETCH("hw.imx6.cpu_maxmhz", &sc->cpu_maxmhz); + op = cpufreq_nearest_oppt(sc, sc->cpu_maxmhz); + sc->cpu_maxmhz = op->mhz; + sc->cpu_maxmv = op->mv; /* * Set the CPU to maximum speed. @@ -311,9 +434,7 @@ cpufreq_initialize(struct imx6_anatop_so * basically assumes that a single core can't overheat before interrupts * are enabled; empirical testing shows that to be a safe assumption. */ - vdd_set(sc, sc->cpu_maxmv); - cpufreq_set_clock(sc, sc->cpu_maxhz); - device_printf(sc->dev, "CPU frequency %uMHz\n", sc->cpu_curmhz); + cpufreq_set_clock(sc, op); } static inline uint32_t @@ -391,9 +512,8 @@ static void tempmon_gofast(struct imx6_anatop_softc *sc) { - if (sc->cpu_curhz < sc->cpu_maxhz) { - vdd_set(sc, sc->cpu_maxmv); - cpufreq_set_clock(sc, sc->cpu_maxhz); + if (sc->cpu_curmhz < sc->cpu_maxmhz) { + cpufreq_set_clock(sc, cpufreq_nearest_oppt(sc, sc->cpu_maxmhz)); } } @@ -401,9 +521,8 @@ static void tempmon_goslow(struct imx6_anatop_softc *sc) { - if (sc->cpu_curhz > sc->cpu_minhz) { - cpufreq_set_clock(sc, sc->cpu_minhz); - vdd_set(sc, sc->cpu_minmv); + if (sc->cpu_curmhz > sc->cpu_minmhz) { + cpufreq_set_clock(sc, cpufreq_nearest_oppt(sc, sc->cpu_minmhz)); } } @@ -542,6 +661,10 @@ imx6_anatop_attach(device_t dev) cpufreq_initialize(sc); initialize_tempmon(sc); + if (bootverbose) { + device_printf(sc->dev, "CPU %uMHz @ %umV\n", sc->cpu_curmhz, + sc->cpu_curmv); + } err = 0; out: @@ -575,7 +698,7 @@ imx6_get_cpu_clock() div = imx6_anatop_read_4(IMX6_ANALOG_CCM_PLL_ARM) & IMX6_ANALOG_CCM_PLL_ARM_DIV_MASK; - return (cpufreq_hz_from_div(imx6_anatop_sc, div)); + return (cpufreq_mhz_from_div(imx6_anatop_sc, div)); } static device_method_t imx6_anatop_methods[] = { Modified: stable/10/sys/arm/freescale/imx/imx_sdhci.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx_sdhci.c Sat May 17 20:39:39 2014 (r266351) +++ stable/10/sys/arm/freescale/imx/imx_sdhci.c Sat May 17 20:52:10 2014 (r266352) @@ -730,9 +730,6 @@ imx_sdhci_attach(device_t dev) sc->baseclk_hz = imx51_get_clock(IMX51CLK_PERCLK_ROOT); } - sdhci_init_slot(dev, &sc->slot, 0); - callout_init(&sc->r1bfix_callout, true); - /* * If the slot is flagged with the non-removable property, set our flag * to always force the SDHCI_CARD_PRESENT bit on. @@ -752,6 +749,9 @@ imx_sdhci_attach(device_t dev) sc->force_card_present = true; } + callout_init(&sc->r1bfix_callout, true); + sdhci_init_slot(dev, &sc->slot, 0); + bus_generic_probe(dev); bus_generic_attach(dev); Modified: stable/10/sys/arm/samsung/exynos/chrome_kb.c ============================================================================== --- stable/10/sys/arm/samsung/exynos/chrome_kb.c Sat May 17 20:39:39 2014 (r266351) +++ stable/10/sys/arm/samsung/exynos/chrome_kb.c Sat May 17 20:52:10 2014 (r266352) @@ -138,7 +138,6 @@ struct ckb_softc { }; /* prototypes */ -static void ckb_set_leds(struct ckb_softc *, uint8_t); static int ckb_set_typematic(keyboard_t *, int); static uint32_t ckb_read_char(keyboard_t *, int); static void ckb_clear_state(keyboard_t *); Modified: stable/10/sys/boot/fdt/dts/arm/exynos5250.dtsi ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/exynos5250.dtsi Sat May 17 20:39:39 2014 (r266351) +++ stable/10/sys/boot/fdt/dts/arm/exynos5250.dtsi Sat May 17 20:52:10 2014 (r266352) @@ -81,6 +81,8 @@ generic_timer { compatible = "arm,armv7-timer"; clock-frequency = <24000000>; + interrupts = < 29 30 27 26 >; + interrupt-parent = <&GIC>; }; pwm { From owner-svn-src-stable@FreeBSD.ORG Sat May 17 21:07:55 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D2C80EE6; Sat, 17 May 2014 21:07:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE8632730; Sat, 17 May 2014 21:07:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HL7tTL096837; Sat, 17 May 2014 21:07:55 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HL7tHk096834; Sat, 17 May 2014 21:07:55 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405172107.s4HL7tHk096834@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 21:07:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266353 - in stable/10/sys/arm: arm include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 21:07:55 -0000 Author: ian Date: Sat May 17 21:07:54 2014 New Revision: 266353 URL: http://svnweb.freebsd.org/changeset/base/266353 Log: MFC 264128, 264129, 264130, 264135, Fix TTB set operation for armv7. Perform sychronization (by "isb" barrier) after TTB is set. Fix TLB maintenance issues for armv6 and armv7. - Add cpu_cpwait to comply with the convention. - Add missing TLB invalidations, especially in pmap_kenter & pmap_kremove with distinguishing between D and ID pages. - Modify pmap init/bootstrap invalidations to ID, just to be safe. - Fix TLB-inv and PTE_SYNC ordering. Allocate per-cpu resources for doing pmap_zero_page() and pmap_copy_page(). This is performance enhancement rather than bugfix. We don't support any ARM systems with an ISA bus and don't need a freelist of memory to support ISA addressing limitations. Modified: stable/10/sys/arm/arm/cpufunc_asm_armv7.S stable/10/sys/arm/arm/pmap-v6.c stable/10/sys/arm/include/vmparam.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/cpufunc_asm_armv7.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_armv7.S Sat May 17 20:52:10 2014 (r266352) +++ stable/10/sys/arm/arm/cpufunc_asm_armv7.S Sat May 17 21:07:54 2014 (r266353) @@ -71,6 +71,7 @@ ENTRY(armv7_setttb) orr r0, r0, #PT_ATTR mcr p15, 0, r0, c2, c0, 0 /* Translation Table Base Register 0 (TTBR0) */ + isb #ifdef SMP mcr p15, 0, r0, c8, c3, 0 /* invalidate I+D TLBs Inner Shareable*/ #else @@ -273,6 +274,7 @@ ENTRY(armv7_context_switch) orr r0, r0, #PT_ATTR mcr p15, 0, r0, c2, c0, 0 /* set the new TTB */ + isb #ifdef SMP mcr p15, 0, r0, c8, c3, 0 /* and flush the I+D tlbs Inner Sharable */ #else Modified: stable/10/sys/arm/arm/pmap-v6.c ============================================================================== --- stable/10/sys/arm/arm/pmap-v6.c Sat May 17 20:52:10 2014 (r266352) +++ stable/10/sys/arm/arm/pmap-v6.c Sat May 17 21:07:54 2014 (r266353) @@ -265,9 +265,18 @@ vm_offset_t vm_max_kernel_address; struct pmap kernel_pmap_store; -static pt_entry_t *csrc_pte, *cdst_pte; -static vm_offset_t csrcp, cdstp; -static struct mtx cmtx; +/* + * Resources for quickly copying and zeroing pages using virtual address space + * and page table entries that are pre-allocated per-CPU by pmap_init(). + */ +struct czpages { + struct mtx lock; + pt_entry_t *srcptep; + pt_entry_t *dstptep; + vm_offset_t srcva; + vm_offset_t dstva; +}; +static struct czpages cpu_czpages[MAXCPU]; static void pmap_init_l1(struct l1_ttable *, pd_entry_t *); /* @@ -1047,6 +1056,7 @@ small_mappings: cpu_tlb_flushID_SE(pv->pv_va); else if (PTE_BEEN_REFD(opte)) cpu_tlb_flushD_SE(pv->pv_va); + cpu_cpwait(); } PMAP_UNLOCK(pmap); @@ -1134,8 +1144,8 @@ vector_page_setprot(int prot) *ptep |= L2_S_REF; pmap_set_prot(ptep, prot|VM_PROT_EXECUTE, 0); - - cpu_tlb_flushD_SE(vector_page); + PTE_SYNC(ptep); + cpu_tlb_flushID_SE(vector_page); cpu_cpwait(); } @@ -1643,8 +1653,8 @@ pmap_postinit(void) pte = (pte & ~L2_S_CACHE_MASK) | pte_l2_s_cache_mode_pt; *ptep = pte; PTE_SYNC(ptep); - cpu_tlb_flushD_SE(va); - + cpu_tlb_flushID_SE(va); + cpu_cpwait(); va += PAGE_SIZE; } pmap_init_l1(l1, pl1pt); @@ -1802,13 +1812,14 @@ pmap_bootstrap(vm_offset_t firstaddr, st struct l1_ttable *l1 = &static_l1; struct l2_dtable *l2; struct l2_bucket *l2b; + struct czpages *czp; pd_entry_t pde; pd_entry_t *kernel_l1pt = (pd_entry_t *)l1pt->pv_va; pt_entry_t *ptep; vm_paddr_t pa; vm_offset_t va; vm_size_t size; - int l1idx, l2idx, l2next = 0; + int i, l1idx, l2idx, l2next = 0; PDEBUG(1, printf("firstaddr = %08x, lastaddr = %08x\n", firstaddr, vm_max_kernel_address)); @@ -1920,13 +1931,16 @@ pmap_bootstrap(vm_offset_t firstaddr, st /* * Reserve some special page table entries/VA space for temporary - * mapping of pages. + * mapping of pages that are being copied or zeroed. */ + for (czp = cpu_czpages, i = 0; i < MAXCPU; ++i, ++czp) { + mtx_init(&czp->lock, "czpages", NULL, MTX_DEF); + pmap_alloc_specials(&virtual_avail, 1, &czp->srcva, &czp->srcptep); + pmap_set_pt_cache_mode(kernel_l1pt, (vm_offset_t)czp->srcptep); + pmap_alloc_specials(&virtual_avail, 1, &czp->dstva, &czp->dstptep); + pmap_set_pt_cache_mode(kernel_l1pt, (vm_offset_t)czp->dstptep); + } - pmap_alloc_specials(&virtual_avail, 1, &csrcp, &csrc_pte); - pmap_set_pt_cache_mode(kernel_l1pt, (vm_offset_t)csrc_pte); - pmap_alloc_specials(&virtual_avail, 1, &cdstp, &cdst_pte); - pmap_set_pt_cache_mode(kernel_l1pt, (vm_offset_t)cdst_pte); size = ((vm_max_kernel_address - pmap_curmaxkvaddr) + L1_S_OFFSET) / L1_S_SIZE; pmap_alloc_specials(&virtual_avail, @@ -1948,11 +1962,12 @@ pmap_bootstrap(vm_offset_t firstaddr, st pmap_init_l1(l1, kernel_l1pt); cpu_dcache_wbinv_all(); cpu_l2cache_wbinv_all(); + cpu_tlb_flushID(); + cpu_cpwait(); virtual_avail = round_page(virtual_avail); virtual_end = vm_max_kernel_address; kernel_vm_end = pmap_curmaxkvaddr; - mtx_init(&cmtx, "TMP mappings mtx", NULL, MTX_DEF); pmap_set_pcb_pagedir(kernel_pmap, thread0.td_pcb); } @@ -2034,6 +2049,8 @@ pmap_grow_map(vm_offset_t va, pt_entry_t *ptep = L2_S_PROTO | pa | cache_mode | L2_S_REF; pmap_set_prot(ptep, VM_PROT_READ | VM_PROT_WRITE, 0); PTE_SYNC(ptep); + cpu_tlb_flushD_SE(va); + cpu_cpwait(); return (0); } @@ -2348,6 +2365,8 @@ pmap_kenter_section(vm_offset_t va, vm_o l1->l1_kva[L1_IDX(va)] = pd; PTE_SYNC(&l1->l1_kva[L1_IDX(va)]); } + cpu_tlb_flushID_SE(va); + cpu_cpwait(); } /* @@ -2387,13 +2406,6 @@ pmap_kenter_internal(vm_offset_t va, vm_ ptep = &l2b->l2b_kva[l2pte_index(va)]; opte = *ptep; - if (l2pte_valid(opte)) { - cpu_tlb_flushD_SE(va); - cpu_cpwait(); - } else { - if (opte == 0) - l2b->l2b_occupancy++; - } if (flags & KENTER_CACHE) { *ptep = L2_S_PROTO | pa | pte_l2_s_cache_mode | L2_S_REF; @@ -2405,10 +2417,19 @@ pmap_kenter_internal(vm_offset_t va, vm_ 0); } + PTE_SYNC(ptep); + if (l2pte_valid(opte)) { + if (L2_S_EXECUTABLE(opte) || L2_S_EXECUTABLE(*ptep)) + cpu_tlb_flushID_SE(va); + else + cpu_tlb_flushD_SE(va); + } else { + if (opte == 0) + l2b->l2b_occupancy++; + } + PDEBUG(1, printf("pmap_kenter: pte = %08x, opte = %08x, npte = %08x\n", (uint32_t) ptep, opte, *ptep)); - PTE_SYNC(ptep); - cpu_cpwait(); } void @@ -2474,10 +2495,13 @@ pmap_kremove(vm_offset_t va) opte = *ptep; if (l2pte_valid(opte)) { va = va & ~PAGE_MASK; - cpu_tlb_flushD_SE(va); - cpu_cpwait(); *ptep = 0; PTE_SYNC(ptep); + if (L2_S_EXECUTABLE(opte)) + cpu_tlb_flushID_SE(va); + else + cpu_tlb_flushD_SE(va); + cpu_cpwait(); } } @@ -2710,6 +2734,7 @@ small_mappings: cpu_tlb_flushID(); else cpu_tlb_flushD(); + cpu_cpwait(); } vm_page_aflag_clear(m, PGA_WRITEABLE); rw_wunlock(&pvh_global_lock); @@ -2763,6 +2788,7 @@ pmap_change_attr(vm_offset_t sva, vm_siz pmap_l2cache_wbinv_range(tmpva, pte & L2_S_FRAME, PAGE_SIZE); *ptep = pte; cpu_tlb_flushID_SE(tmpva); + cpu_cpwait(); dprintf("%s: for va:%x ptep:%x pte:%x\n", __func__, tmpva, (uint32_t)ptep, pte); @@ -2900,6 +2926,7 @@ pmap_protect(pmap_t pmap, vm_offset_t sv else if (is_refd) cpu_tlb_flushD(); + cpu_cpwait(); } rw_wunlock(&pvh_global_lock); @@ -3166,6 +3193,7 @@ validate: cpu_tlb_flushID_SE(va); else if (is_refd) cpu_tlb_flushD_SE(va); + cpu_cpwait(); } if ((pmap != pmap_kernel()) && (pmap == &curproc->p_vmspace->vm_pmap)) @@ -3715,6 +3743,7 @@ pmap_remove_section(pmap_t pmap, vm_offs cpu_tlb_flushID_SE(sva); else cpu_tlb_flushD_SE(sva); + cpu_cpwait(); } /* @@ -3887,6 +3916,7 @@ pmap_promote_section(pmap_t pmap, vm_off cpu_tlb_flushID(); else cpu_tlb_flushD(); + cpu_cpwait(); pmap_section_promotions++; CTR2(KTR_PMAP, "pmap_promote_section: success for va %#x" @@ -4011,6 +4041,7 @@ pmap_demote_section(pmap_t pmap, vm_offs cpu_tlb_flushID_SE(va); else if (L1_S_REFERENCED(l1pd)) cpu_tlb_flushD_SE(va); + cpu_cpwait(); pmap_section_demotions++; CTR2(KTR_PMAP, "pmap_demote_section: success for va %#x" @@ -4382,6 +4413,8 @@ pmap_remove(pmap_t pmap, vm_offset_t sva } } + *ptep = 0; + PTE_SYNC(ptep); if (pmap_is_current(pmap)) { total++; if (total < PMAP_REMOVE_CLEAN_LIST_SIZE) { @@ -4392,8 +4425,6 @@ pmap_remove(pmap_t pmap, vm_offset_t sva } else if (total == PMAP_REMOVE_CLEAN_LIST_SIZE) flushall = 1; } - *ptep = 0; - PTE_SYNC(ptep); sva += PAGE_SIZE; ptep++; @@ -4406,6 +4437,8 @@ pmap_remove(pmap_t pmap, vm_offset_t sva rw_wunlock(&pvh_global_lock); if (flushall) cpu_tlb_flushID(); + cpu_cpwait(); + PMAP_UNLOCK(pmap); } @@ -4420,39 +4453,42 @@ pmap_remove(pmap_t pmap, vm_offset_t sva static void pmap_zero_page_gen(vm_page_t m, int off, int size) { + struct czpages *czp; + + KASSERT(TAILQ_EMPTY(&m->md.pv_list), + ("pmap_zero_page_gen: page has mappings")); vm_paddr_t phys = VM_PAGE_TO_PHYS(m); - if (!TAILQ_EMPTY(&m->md.pv_list)) - panic("pmap_zero_page: page has mappings"); - mtx_lock(&cmtx); + sched_pin(); + czp = &cpu_czpages[PCPU_GET(cpuid)]; + mtx_lock(&czp->lock); + /* - * Hook in the page, zero it, invalidate the TLB as needed. - * - * Note the temporary zero-page mapping must be a non-cached page in - * order to work without corruption when write-allocate is enabled. + * Hook in the page, zero it. */ - *cdst_pte = L2_S_PROTO | phys | pte_l2_s_cache_mode | L2_S_REF; - pmap_set_prot(cdst_pte, VM_PROT_WRITE, 0); - PTE_SYNC(cdst_pte); - cpu_tlb_flushD_SE(cdstp); + *czp->dstptep = L2_S_PROTO | phys | pte_l2_s_cache_mode | L2_S_REF; + pmap_set_prot(czp->dstptep, VM_PROT_WRITE, 0); + PTE_SYNC(czp->dstptep); + cpu_tlb_flushD_SE(czp->dstva); cpu_cpwait(); + if (off || size != PAGE_SIZE) - bzero((void *)(cdstp + off), size); + bzero((void *)(czp->dstva + off), size); else - bzero_page(cdstp); + bzero_page(czp->dstva); /* - * Although aliasing is not possible if we use - * cdstp temporary mappings with memory that - * will be mapped later as non-cached or with write-through - * caches we might end up overwriting it when calling wbinv_all - * So make sure caches are clean after copy operation + * Although aliasing is not possible, if we use temporary mappings with + * memory that will be mapped later as non-cached or with write-through + * caches, we might end up overwriting it when calling wbinv_all. So + * make sure caches are clean after the operation. */ - cpu_idcache_wbinv_range(cdstp, size); - pmap_l2cache_wbinv_range(cdstp, phys, size); + cpu_idcache_wbinv_range(czp->dstva, size); + pmap_l2cache_wbinv_range(czp->dstva, phys, size); - mtx_unlock(&cmtx); + mtx_unlock(&czp->lock); + sched_unpin(); } /* @@ -4510,45 +4546,39 @@ pmap_zero_page_idle(vm_page_t m) void pmap_copy_page_generic(vm_paddr_t src, vm_paddr_t dst) { - /* - * Hold the source page's lock for the duration of the copy - * so that no other mappings can be created while we have a - * potentially aliased mapping. - * Map the pages into the page hook points, copy them, and purge - * the cache for the appropriate page. Invalidate the TLB - * as required. - */ - mtx_lock(&cmtx); - - /* For ARMv6 using System bit is deprecated and mapping with AP - * bits set to 0x0 makes page not accessible. csrc_pte is mapped - * read/write until proper mapping defines are created for ARMv6. - */ - *csrc_pte = L2_S_PROTO | src | pte_l2_s_cache_mode | L2_S_REF; - pmap_set_prot(csrc_pte, VM_PROT_READ, 0); - PTE_SYNC(csrc_pte); - - *cdst_pte = L2_S_PROTO | dst | pte_l2_s_cache_mode | L2_S_REF; - pmap_set_prot(cdst_pte, VM_PROT_READ | VM_PROT_WRITE, 0); - PTE_SYNC(cdst_pte); + struct czpages *czp; - cpu_tlb_flushD_SE(csrcp); - cpu_tlb_flushD_SE(cdstp); + sched_pin(); + czp = &cpu_czpages[PCPU_GET(cpuid)]; + mtx_lock(&czp->lock); + + /* + * Map the pages into the page hook points, copy them, and purge the + * cache for the appropriate page. + */ + *czp->srcptep = L2_S_PROTO | src | pte_l2_s_cache_mode | L2_S_REF; + pmap_set_prot(czp->srcptep, VM_PROT_READ, 0); + PTE_SYNC(czp->srcptep); + cpu_tlb_flushD_SE(czp->srcva); + *czp->dstptep = L2_S_PROTO | dst | pte_l2_s_cache_mode | L2_S_REF; + pmap_set_prot(czp->dstptep, VM_PROT_READ | VM_PROT_WRITE, 0); + PTE_SYNC(czp->dstptep); + cpu_tlb_flushD_SE(czp->dstva); cpu_cpwait(); + bcopy_page(czp->srcva, czp->dstva); + /* - * Although aliasing is not possible if we use - * cdstp temporary mappings with memory that - * will be mapped later as non-cached or with write-through - * caches we might end up overwriting it when calling wbinv_all - * So make sure caches are clean after copy operation + * Although aliasing is not possible, if we use temporary mappings with + * memory that will be mapped later as non-cached or with write-through + * caches, we might end up overwriting it when calling wbinv_all. So + * make sure caches are clean after the operation. */ - bcopy_page(csrcp, cdstp); + cpu_idcache_wbinv_range(czp->dstva, PAGE_SIZE); + pmap_l2cache_wbinv_range(czp->dstva, dst, PAGE_SIZE); - cpu_idcache_wbinv_range(cdstp, PAGE_SIZE); - pmap_l2cache_wbinv_range(cdstp, dst, PAGE_SIZE); - - mtx_unlock(&cmtx); + mtx_unlock(&czp->lock); + sched_unpin(); } int unmapped_buf_allowed = 1; @@ -4560,8 +4590,12 @@ pmap_copy_pages(vm_page_t ma[], vm_offse vm_page_t a_pg, b_pg; vm_offset_t a_pg_offset, b_pg_offset; int cnt; + struct czpages *czp; + + sched_pin(); + czp = &cpu_czpages[PCPU_GET(cpuid)]; + mtx_lock(&czp->lock); - mtx_lock(&cmtx); while (xfersize > 0) { a_pg = ma[a_offset >> PAGE_SHIFT]; a_pg_offset = a_offset & PAGE_MASK; @@ -4569,27 +4603,29 @@ pmap_copy_pages(vm_page_t ma[], vm_offse b_pg = mb[b_offset >> PAGE_SHIFT]; b_pg_offset = b_offset & PAGE_MASK; cnt = min(cnt, PAGE_SIZE - b_pg_offset); - *csrc_pte = L2_S_PROTO | VM_PAGE_TO_PHYS(a_pg) | + *czp->srcptep = L2_S_PROTO | VM_PAGE_TO_PHYS(a_pg) | pte_l2_s_cache_mode | L2_S_REF; - pmap_set_prot(csrc_pte, VM_PROT_READ, 0); - PTE_SYNC(csrc_pte); - *cdst_pte = L2_S_PROTO | VM_PAGE_TO_PHYS(b_pg) | + pmap_set_prot(czp->srcptep, VM_PROT_READ, 0); + PTE_SYNC(czp->srcptep); + cpu_tlb_flushD_SE(czp->srcva); + *czp->dstptep = L2_S_PROTO | VM_PAGE_TO_PHYS(b_pg) | pte_l2_s_cache_mode | L2_S_REF; - pmap_set_prot(cdst_pte, VM_PROT_READ | VM_PROT_WRITE, 0); - PTE_SYNC(cdst_pte); - cpu_tlb_flushD_SE(csrcp); - cpu_tlb_flushD_SE(cdstp); + pmap_set_prot(czp->dstptep, VM_PROT_READ | VM_PROT_WRITE, 0); + PTE_SYNC(czp->dstptep); + cpu_tlb_flushD_SE(czp->dstva); cpu_cpwait(); - bcopy((char *)csrcp + a_pg_offset, (char *)cdstp + b_pg_offset, + bcopy((char *)czp->srcva + a_pg_offset, (char *)czp->dstva + b_pg_offset, cnt); - cpu_idcache_wbinv_range(cdstp + b_pg_offset, cnt); - pmap_l2cache_wbinv_range(cdstp + b_pg_offset, + cpu_idcache_wbinv_range(czp->dstva + b_pg_offset, cnt); + pmap_l2cache_wbinv_range(czp->dstva + b_pg_offset, VM_PAGE_TO_PHYS(b_pg) + b_pg_offset, cnt); xfersize -= cnt; a_offset += cnt; b_offset += cnt; } - mtx_unlock(&cmtx); + + mtx_unlock(&czp->lock); + sched_unpin(); } void @@ -4922,6 +4958,7 @@ pmap_advise(pmap_t pmap, vm_offset_t sva cpu_tlb_flushID_SE(sva); else if (PTE_BEEN_REFD(opte)) cpu_tlb_flushD_SE(sva); + cpu_cpwait(); } } } Modified: stable/10/sys/arm/include/vmparam.h ============================================================================== --- stable/10/sys/arm/include/vmparam.h Sat May 17 20:52:10 2014 (r266352) +++ stable/10/sys/arm/include/vmparam.h Sat May 17 21:07:54 2014 (r266353) @@ -93,15 +93,10 @@ #define VM_FREEPOOL_DIRECT 0 /* - * we support 2 free lists: - * - * - DEFAULT for all systems - * - ISADMA for the ISA DMA range on Sharks only + * We need just one free list: DEFAULT. */ - -#define VM_NFREELIST 2 +#define VM_NFREELIST 1 #define VM_FREELIST_DEFAULT 0 -#define VM_FREELIST_ISADMA 1 /* * The largest allocation size is 1MB. From owner-svn-src-stable@FreeBSD.ORG Sat May 17 21:18:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4EC75263; Sat, 17 May 2014 21:18:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 21D7227EA; Sat, 17 May 2014 21:18:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HLI92e003326; Sat, 17 May 2014 21:18:09 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HLI8MX003322; Sat, 17 May 2014 21:18:08 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405172118.s4HLI8MX003322@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 21:18:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266355 - stable/10/sys/arm/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 21:18:09 -0000 Author: ian Date: Sat May 17 21:18:08 2014 New Revision: 266355 URL: http://svnweb.freebsd.org/changeset/base/266355 Log: MFC 264137: Switch wandboards over to the common IMX6 kernel config, which has SMP enabled. Also switch IMX6 to use SCHED_ULE. Modified: stable/10/sys/arm/conf/IMX6 stable/10/sys/arm/conf/WANDBOARD-DUAL stable/10/sys/arm/conf/WANDBOARD-QUAD stable/10/sys/arm/conf/WANDBOARD-SOLO Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/IMX6 ============================================================================== --- stable/10/sys/arm/conf/IMX6 Sat May 17 21:10:03 2014 (r266354) +++ stable/10/sys/arm/conf/IMX6 Sat May 17 21:18:08 2014 (r266355) @@ -1,4 +1,4 @@ -# Kernel configuration for Wandboard +# Kernel configuration for Freescale i.MX6 systems. # # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: @@ -20,8 +20,8 @@ ident IMX6 include "../freescale/imx/std.imx6" -options HZ=250 # Scheduling quantum is 4 milliseconds. -options SCHED_4BSD # 4BSD scheduler +options HZ=500 # Scheduling quantum is 2 milliseconds. +options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols Modified: stable/10/sys/arm/conf/WANDBOARD-DUAL ============================================================================== --- stable/10/sys/arm/conf/WANDBOARD-DUAL Sat May 17 21:10:03 2014 (r266354) +++ stable/10/sys/arm/conf/WANDBOARD-DUAL Sat May 17 21:18:08 2014 (r266355) @@ -17,7 +17,7 @@ # # $FreeBSD$ -include "WANDBOARD.common" +include "IMX6" ident WANDBOARD-DUAL # Flattened Device Tree Modified: stable/10/sys/arm/conf/WANDBOARD-QUAD ============================================================================== --- stable/10/sys/arm/conf/WANDBOARD-QUAD Sat May 17 21:10:03 2014 (r266354) +++ stable/10/sys/arm/conf/WANDBOARD-QUAD Sat May 17 21:18:08 2014 (r266355) @@ -17,7 +17,7 @@ # # $FreeBSD$ -include "WANDBOARD.common" +include "IMX6" ident WANDBOARD-QUAD # Flattened Device Tree Modified: stable/10/sys/arm/conf/WANDBOARD-SOLO ============================================================================== --- stable/10/sys/arm/conf/WANDBOARD-SOLO Sat May 17 21:10:03 2014 (r266354) +++ stable/10/sys/arm/conf/WANDBOARD-SOLO Sat May 17 21:18:08 2014 (r266355) @@ -17,7 +17,7 @@ # # $FreeBSD$ -include "WANDBOARD.common" +include "IMX6" ident WANDBOARD-SOLO # Flattened Device Tree From owner-svn-src-stable@FreeBSD.ORG Sat May 17 21:19:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF6A13A6; Sat, 17 May 2014 21:19:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC3C027FA; Sat, 17 May 2014 21:19:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HLJi02003552; Sat, 17 May 2014 21:19:44 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HLJi1a003551; Sat, 17 May 2014 21:19:44 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405172119.s4HLJi1a003551@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 21:19:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266356 - stable/10/sys/arm/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 21:19:45 -0000 Author: ian Date: Sat May 17 21:19:44 2014 New Revision: 266356 URL: http://svnweb.freebsd.org/changeset/base/266356 Log: MFC 264137: Switch wandboards over to the common IMX6 kernel config, which has SMP enabled. Also switch IMX6 to use SCHED_ULE. Modified: stable/10/sys/arm/conf/PANDABOARD Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/PANDABOARD ============================================================================== --- stable/10/sys/arm/conf/PANDABOARD Sat May 17 21:18:08 2014 (r266355) +++ stable/10/sys/arm/conf/PANDABOARD Sat May 17 21:19:44 2014 (r266356) @@ -145,3 +145,4 @@ options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=pandaboard.dts options VFP # vfp/neon +options SMP # Enable multiple cores From owner-svn-src-stable@FreeBSD.ORG Sat May 17 21:23:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 85D345DA; Sat, 17 May 2014 21:23:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72D0F2890; Sat, 17 May 2014 21:23:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HLNlh8009150; Sat, 17 May 2014 21:23:47 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HLNll8009149; Sat, 17 May 2014 21:23:47 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405172123.s4HLNll8009149@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 21:23:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266357 - stable/10/sys/arm/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 21:23:47 -0000 Author: ian Date: Sat May 17 21:23:46 2014 New Revision: 266357 URL: http://svnweb.freebsd.org/changeset/base/266357 Log: MFC 264183: Add a couple more required TLB flushes. Modified: stable/10/sys/arm/arm/pmap-v6.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/pmap-v6.c ============================================================================== --- stable/10/sys/arm/arm/pmap-v6.c Sat May 17 21:19:44 2014 (r266356) +++ stable/10/sys/arm/arm/pmap-v6.c Sat May 17 21:23:46 2014 (r266357) @@ -853,6 +853,8 @@ pmap_free_l2_bucket(pmap_t pmap, struct if (l1pd == (L1_C_DOM(pmap->pm_domain) | L1_TYPE_C)) { *pl1pd = 0; PTE_SYNC(pl1pd); + cpu_tlb_flushD_SE((vm_offset_t)ptep); + cpu_cpwait(); } /* @@ -2147,6 +2149,8 @@ pmap_grow_l2_bucket(pmap_t pmap, vm_offs L1_C_PROTO; PTE_SYNC(pl1pd); } + cpu_tlb_flushID_SE(va); + cpu_cpwait(); return (l2b); } @@ -2427,6 +2431,7 @@ pmap_kenter_internal(vm_offset_t va, vm_ if (opte == 0) l2b->l2b_occupancy++; } + cpu_cpwait(); PDEBUG(1, printf("pmap_kenter: pte = %08x, opte = %08x, npte = %08x\n", (uint32_t) ptep, opte, *ptep)); @@ -4958,10 +4963,10 @@ pmap_advise(pmap_t pmap, vm_offset_t sva cpu_tlb_flushID_SE(sva); else if (PTE_BEEN_REFD(opte)) cpu_tlb_flushD_SE(sva); - cpu_cpwait(); } } } + cpu_cpwait(); rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } From owner-svn-src-stable@FreeBSD.ORG Sat May 17 21:26:34 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1C0CF724; Sat, 17 May 2014 21:26:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08E2C28A4; Sat, 17 May 2014 21:26:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HLQXWh009551; Sat, 17 May 2014 21:26:33 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HLQXfG009550; Sat, 17 May 2014 21:26:33 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405172126.s4HLQXfG009550@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 21:26:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266358 - stable/10/sys/arm/samsung/exynos X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 21:26:34 -0000 Author: ian Date: Sat May 17 21:26:33 2014 New Revision: 266358 URL: http://svnweb.freebsd.org/changeset/base/266358 Log: MFC 264150: Exynos: Correct the end address of the video frame buffer. Modified: stable/10/sys/arm/samsung/exynos/exynos5_fimd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/samsung/exynos/exynos5_fimd.c ============================================================================== --- stable/10/sys/arm/samsung/exynos/exynos5_fimd.c Sat May 17 21:23:46 2014 (r266357) +++ stable/10/sys/arm/samsung/exynos/exynos5_fimd.c Sat May 17 21:26:33 2014 (r266358) @@ -278,9 +278,11 @@ fimd_init(struct fimd_softc *sc) reg |= ((panel->height - 1) << LINEVAL_OFFSET); DWRITE4(sc,VIDTCON2,reg); - WRITE4(sc,VIDW00ADD0B0, sc->sc_info.fb_pbase); - WRITE4(sc,VIDW00ADD1B0, sc->sc_info.fb_pbase + sc->sc_info.fb_size); - WRITE4(sc,VIDW00ADD2, panel->width * 2); + reg = sc->sc_info.fb_pbase; + WRITE4(sc, VIDW00ADD0B0, reg); + reg += (sc->sc_info.fb_stride * (sc->sc_info.fb_height + 1)); + WRITE4(sc, VIDW00ADD1B0, reg); + WRITE4(sc, VIDW00ADD2, sc->sc_info.fb_stride); reg = ((panel->width - 1) << OSD_RIGHTBOTX_F_OFFSET); reg |= ((panel->height - 1) << OSD_RIGHTBOTY_F_OFFSET); From owner-svn-src-stable@FreeBSD.ORG Sat May 17 21:28:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6BFE2858; Sat, 17 May 2014 21:28:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3EE8028AB; Sat, 17 May 2014 21:28:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HLSoF7009873; Sat, 17 May 2014 21:28:50 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HLSnMS009870; Sat, 17 May 2014 21:28:49 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405172128.s4HLSnMS009870@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 21:28:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266359 - stable/10/sys/arm/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 21:28:50 -0000 Author: ian Date: Sat May 17 21:28:49 2014 New Revision: 266359 URL: http://svnweb.freebsd.org/changeset/base/266359 Log: MFC 264160: Remove code under PMAP_CACHE_VIVT, not compiled on armv6. Modified: stable/10/sys/arm/arm/cpufunc_asm_arm11.S stable/10/sys/arm/arm/cpufunc_asm_arm11x6.S stable/10/sys/arm/arm/cpufunc_asm_armv6.S Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/cpufunc_asm_arm11.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_arm11.S Sat May 17 21:26:33 2014 (r266358) +++ stable/10/sys/arm/arm/cpufunc_asm_arm11.S Sat May 17 21:28:49 2014 (r266359) @@ -44,12 +44,6 @@ __FBSDID("$FreeBSD$"); * addresses that are about to change. */ ENTRY(arm11_setttb) -#ifdef PMAP_CACHE_VIVT - stmfd sp!, {r0, lr} - bl _C_LABEL(armv5_idcache_wbinv_all) - ldmfd sp!, {r0, lr} -#endif - mcr p15, 0, r0, c2, c0, 0 /* load new TTB */ mcr p15, 0, r0, c8, c7, 0 /* invalidate I+D TLBs */ Modified: stable/10/sys/arm/arm/cpufunc_asm_arm11x6.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_arm11x6.S Sat May 17 21:26:33 2014 (r266358) +++ stable/10/sys/arm/arm/cpufunc_asm_arm11x6.S Sat May 17 21:28:49 2014 (r266359) @@ -114,12 +114,7 @@ __FBSDID("$FreeBSD$"); #endif ENTRY(arm11x6_setttb) -#ifdef PMAP_CACHE_VIVT - Flush_D_cache(r1) - Invalidate_I_cache(r1, r2) -#else mov r1, #0 -#endif mcr p15, 0, r0, c2, c0, 0 /* load new TTB */ mcr p15, 0, r1, c8, c7, 0 /* invalidate I+D TLBs */ mcr p15, 0, r1, c7, c10, 4 /* drain write buffer */ Modified: stable/10/sys/arm/arm/cpufunc_asm_armv6.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_armv6.S Sat May 17 21:26:33 2014 (r266358) +++ stable/10/sys/arm/arm/cpufunc_asm_armv6.S Sat May 17 21:28:49 2014 (r266359) @@ -49,10 +49,6 @@ * addresses that are about to change. */ ENTRY(armv6_setttb) -#ifdef PMAP_CACHE_VIVT - mcr p15, 0, r0, c7, c5, 0 /* Flush I cache */ - mcr p15, 0, r0, c7, c14, 0 /* clean and invalidate D cache */ -#endif mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ mcr p15, 0, r0, c2, c0, 0 /* load new TTB */ From owner-svn-src-stable@FreeBSD.ORG Sat May 17 21:31:59 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 803A1B96; Sat, 17 May 2014 21:31:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52B74294B; Sat, 17 May 2014 21:31:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HLVxP8015333; Sat, 17 May 2014 21:31:59 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HLVwgu015327; Sat, 17 May 2014 21:31:58 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405172131.s4HLVwgu015327@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 21:31:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266360 - in stable/10/sys: arm/freescale/imx dev/ata/chipsets dev/vt/hw/fb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 21:31:59 -0000 Author: ian Date: Sat May 17 21:31:58 2014 New Revision: 266360 URL: http://svnweb.freebsd.org/changeset/base/266360 Log: MFC 264180, 264181, 264182: Follow files.imx51 and add vt support for imx53. Add fsl,imx53 compatible string. Need to include machine/fdt.h in vt_early_fb.c Modified: stable/10/sys/arm/freescale/imx/files.imx53 stable/10/sys/dev/ata/chipsets/ata-fsl.c stable/10/sys/dev/vt/hw/fb/vt_early_fb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/freescale/imx/files.imx53 ============================================================================== --- stable/10/sys/arm/freescale/imx/files.imx53 Sat May 17 21:28:49 2014 (r266359) +++ stable/10/sys/arm/freescale/imx/files.imx53 Sat May 17 21:31:58 2014 (r266360) @@ -48,6 +48,8 @@ arm/freescale/imx/i2c.c optional fslii # IPU - Image Processing Unit (frame buffer also) arm/freescale/imx/imx51_ipuv3.c optional sc +arm/freescale/imx/imx51_ipuv3_fbd.c optional vt +dev/vt/hw/fb/vt_early_fb.c optional vt # Fast Ethernet Controller dev/ffec/if_ffec.c optional ffec Modified: stable/10/sys/dev/ata/chipsets/ata-fsl.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-fsl.c Sat May 17 21:28:49 2014 (r266359) +++ stable/10/sys/dev/ata/chipsets/ata-fsl.c Sat May 17 21:31:58 2014 (r266360) @@ -72,7 +72,8 @@ imx_ata_probe(device_t dev) if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (!ofw_bus_is_compatible(dev, "fsl,imx51-ata")) + if (!ofw_bus_is_compatible(dev, "fsl,imx51-ata") && + !ofw_bus_is_compatible(dev, "fsl,imx53-ata")) return (ENXIO); ctrl = device_get_softc(dev); Modified: stable/10/sys/dev/vt/hw/fb/vt_early_fb.c ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_early_fb.c Sat May 17 21:28:49 2014 (r266359) +++ stable/10/sys/dev/vt/hw/fb/vt_early_fb.c Sat May 17 21:31:58 2014 (r266360) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #endif #include From owner-svn-src-stable@FreeBSD.ORG Sat May 17 21:35:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E66CBDC4; Sat, 17 May 2014 21:35:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D35202966; Sat, 17 May 2014 21:35:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HLZQrE016020; Sat, 17 May 2014 21:35:26 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HLZQBO016019; Sat, 17 May 2014 21:35:26 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405172135.s4HLZQBO016019@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 21:35:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266361 - stable/10/contrib/compiler-rt/lib X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 21:35:27 -0000 Author: ian Date: Sat May 17 21:35:26 2014 New Revision: 266361 URL: http://svnweb.freebsd.org/changeset/base/266361 Log: MFC 264190: Mark __fixdfdi/__aeabi_d2lz with COMPILER_RT_ABI so it uses the correct calling convention for __aeabi_* functions. Modified: stable/10/contrib/compiler-rt/lib/fixdfdi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/compiler-rt/lib/fixdfdi.c ============================================================================== --- stable/10/contrib/compiler-rt/lib/fixdfdi.c Sat May 17 21:31:58 2014 (r266360) +++ stable/10/contrib/compiler-rt/lib/fixdfdi.c Sat May 17 21:35:26 2014 (r266361) @@ -25,7 +25,7 @@ ARM_EABI_FNALIAS(d2lz, fixdfdi) -di_int +COMPILER_RT_ABI di_int __fixdfdi(double a) { double_bits fb; From owner-svn-src-stable@FreeBSD.ORG Sat May 17 21:39:07 2014 Return-Path: Delivered-To: svn-src-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BEA49A1; Sat, 17 May 2014 21:39:07 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92A782998; Sat, 17 May 2014 21:39:06 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1WlmJt-0003k3-8t; Sat, 17 May 2014 21:39:05 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id s4HLd2Z2040941; Sat, 17 May 2014 15:39:02 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18p/hK2x2f4saUhunfN5Q32 Subject: Re: svn commit: r266356 - stable/10/sys/arm/conf From: Ian Lepore To: src-committers@FreeBSD.org In-Reply-To: <201405172119.s4HLJi1a003551@svn.freebsd.org> References: <201405172119.s4HLJi1a003551@svn.freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Sat, 17 May 2014 15:39:01 -0600 Message-ID: <1400362741.1152.8.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-stable-10@FreeBSD.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 21:39:07 -0000 On Sat, 2014-05-17 at 21:19 +0000, Ian Lepore wrote: > Author: ian > Date: Sat May 17 21:19:44 2014 > New Revision: 266356 > URL: http://svnweb.freebsd.org/changeset/base/266356 > > Log: > MFC 264137: Switch wandboards over to the common IMX6 kernel config, which > has SMP enabled. Also switch IMX6 to use SCHED_ULE. > > Modified: > stable/10/sys/arm/conf/PANDABOARD > Directory Properties: > stable/10/ (props changed) > > Modified: stable/10/sys/arm/conf/PANDABOARD > ============================================================================== > --- stable/10/sys/arm/conf/PANDABOARD Sat May 17 21:18:08 2014 (r266355) > +++ stable/10/sys/arm/conf/PANDABOARD Sat May 17 21:19:44 2014 (r266356) > @@ -145,3 +145,4 @@ options FDT_DTB_STATIC > makeoptions FDT_DTS_FILE=pandaboard.dts > > options VFP # vfp/neon > +options SMP # Enable multiple cores > Ooops, paste-o. This should have read "Enable SMP on PANDABOARD". -- Ian From owner-svn-src-stable@FreeBSD.ORG Sat May 17 21:46:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3844564; Sat, 17 May 2014 21:46:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5BB92A4A; Sat, 17 May 2014 21:46:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HLkQR5022696; Sat, 17 May 2014 21:46:26 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HLkQAH022692; Sat, 17 May 2014 21:46:26 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405172146.s4HLkQAH022692@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 21:46:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266362 - in stable/10/sys: arm/include boot/fdt/dts/arm dev/uart X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 21:46:27 -0000 Author: ian Date: Sat May 17 21:46:25 2014 New Revision: 266362 URL: http://svnweb.freebsd.org/changeset/base/266362 Log: MFC 264203, 264204, 264206, 264218: Tell VM we now have ARM platforms with physically discontiguous memory. Define the full 1024M of ram on the imx51 and imx53 boards. Use a more professional uart device description. Modified: stable/10/sys/arm/include/vmparam.h stable/10/sys/boot/fdt/dts/arm/digi-ccwmx53.dts stable/10/sys/boot/fdt/dts/arm/imx53-qsb.dts stable/10/sys/dev/uart/uart_dev_imx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/include/vmparam.h ============================================================================== --- stable/10/sys/arm/include/vmparam.h Sat May 17 21:35:26 2014 (r266361) +++ stable/10/sys/arm/include/vmparam.h Sat May 17 21:46:25 2014 (r266362) @@ -77,9 +77,9 @@ #define VM_PHYSSEG_MAX 32 /* - * The physical address space is densely populated. + * The physical address space may be sparsely populated on some ARM systems. */ -#define VM_PHYSSEG_DENSE +#define VM_PHYSSEG_SPARSE /* * Create two free page pools. Since the ARM kernel virtual address Modified: stable/10/sys/boot/fdt/dts/arm/digi-ccwmx53.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/digi-ccwmx53.dts Sat May 17 21:35:26 2014 (r266361) +++ stable/10/sys/boot/fdt/dts/arm/digi-ccwmx53.dts Sat May 17 21:46:25 2014 (r266362) @@ -41,7 +41,8 @@ memory { /* RAM 512M */ - reg = <0x70000000 0x20000000>; + reg = <0x70000000 0x10000000 + 0xB0000000 0x10000000>; }; localbus@18000000 { Modified: stable/10/sys/boot/fdt/dts/arm/imx53-qsb.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/imx53-qsb.dts Sat May 17 21:35:26 2014 (r266361) +++ stable/10/sys/boot/fdt/dts/arm/imx53-qsb.dts Sat May 17 21:46:25 2014 (r266362) @@ -41,8 +41,9 @@ compatible = "fsl,imx53-qsb", "fsl,imx53"; memory { - /* RAM 512M */ - reg = <0x70000000 0x20000000>; + /* RAM is 2 banks of 512M each. */ + reg = <0x70000000 0x20000000 + 0xb0000000 0x20000000>; }; localbus@18000000 { Modified: stable/10/sys/dev/uart/uart_dev_imx.c ============================================================================== --- stable/10/sys/dev/uart/uart_dev_imx.c Sat May 17 21:35:26 2014 (r266361) +++ stable/10/sys/dev/uart/uart_dev_imx.c Sat May 17 21:46:25 2014 (r266362) @@ -352,7 +352,7 @@ imx_uart_bus_probe(struct uart_softc *sc sc->sc_rxfifosz = 1; sc->sc_txfifosz = 1; - device_set_desc(sc->sc_dev, "imx_uart"); + device_set_desc(sc->sc_dev, "Freescale i.MX UART"); return (0); } From owner-svn-src-stable@FreeBSD.ORG Sat May 17 21:53:35 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2597E737; Sat, 17 May 2014 21:53:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 125A72AF8; Sat, 17 May 2014 21:53:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HLrY7L028251; Sat, 17 May 2014 21:53:34 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HLrYun028249; Sat, 17 May 2014 21:53:34 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405172153.s4HLrYun028249@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 21:53:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266363 - in stable/10/sys/arm: cavium conf econa X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 21:53:35 -0000 Author: ian Date: Sat May 17 21:53:34 2014 New Revision: 266363 URL: http://svnweb.freebsd.org/changeset/base/266363 Log: MFC 264219: Move sys/arm/econa to sys/arm/cavium/cns11xx. Added: stable/10/sys/arm/cavium/ - copied from r264219, head/sys/arm/cavium/ Deleted: stable/10/sys/arm/econa/ Modified: stable/10/sys/arm/conf/CNS11XXNAS stable/10/sys/arm/conf/NOTES Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/CNS11XXNAS ============================================================================== --- stable/10/sys/arm/conf/CNS11XXNAS Sat May 17 21:46:25 2014 (r266362) +++ stable/10/sys/arm/conf/CNS11XXNAS Sat May 17 21:53:34 2014 (r266363) @@ -26,7 +26,7 @@ ident CNS11XXNAS #options FLASHADDR=0x50000000 #options LOADERRAMADDR=0x00000000 -include "../econa/std.econa" +include "../cavium/cns11xx/std.econa" makeoptions MODULES_OVERRIDE="" Modified: stable/10/sys/arm/conf/NOTES ============================================================================== --- stable/10/sys/arm/conf/NOTES Sat May 17 21:46:25 2014 (r266362) +++ stable/10/sys/arm/conf/NOTES Sat May 17 21:53:34 2014 (r266363) @@ -13,7 +13,7 @@ cpu CPU_XSCALE_IXP435 cpu CPU_XSCALE_PXA2X0 files "../at91/files.at91" -files "../econa/files.econa" +files "../cavium/cns11xx/files.econa" files "../mv/files.mv" files "../mv/discovery/files.db78xxx" files "../mv/kirkwood/files.kirkwood" From owner-svn-src-stable@FreeBSD.ORG Sat May 17 21:55:00 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D553B85F; Sat, 17 May 2014 21:55:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C13502AFC; Sat, 17 May 2014 21:55:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HLt0T7028527; Sat, 17 May 2014 21:55:00 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HLt0VM028523; Sat, 17 May 2014 21:55:00 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405172155.s4HLt0VM028523@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 21:55:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266364 - in stable/10/sys/boot/fdt/dts: arm powerpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 21:55:00 -0000 Author: ian Date: Sat May 17 21:55:00 2014 New Revision: 266364 URL: http://svnweb.freebsd.org/changeset/base/266364 Log: MFC 264230: Move dts files accidentally placed in arm dir to powerpc dir. Added: stable/10/sys/boot/fdt/dts/powerpc/p1020rdb.dts - copied unchanged from r264230, head/sys/boot/fdt/dts/powerpc/p1020rdb.dts stable/10/sys/boot/fdt/dts/powerpc/p2020ds.dts - copied unchanged from r264230, head/sys/boot/fdt/dts/powerpc/p2020ds.dts stable/10/sys/boot/fdt/dts/powerpc/p2041si.dtsi - copied unchanged from r264230, head/sys/boot/fdt/dts/powerpc/p2041si.dtsi stable/10/sys/boot/fdt/dts/powerpc/p3041si.dtsi - copied unchanged from r264230, head/sys/boot/fdt/dts/powerpc/p3041si.dtsi stable/10/sys/boot/fdt/dts/powerpc/p5020si.dtsi - copied unchanged from r264230, head/sys/boot/fdt/dts/powerpc/p5020si.dtsi Deleted: stable/10/sys/boot/fdt/dts/arm/p1020rdb.dts stable/10/sys/boot/fdt/dts/arm/p2020ds.dts stable/10/sys/boot/fdt/dts/arm/p2041si.dtsi stable/10/sys/boot/fdt/dts/arm/p3041si.dtsi stable/10/sys/boot/fdt/dts/arm/p5020si.dtsi Modified: Directory Properties: stable/10/ (props changed) Copied: stable/10/sys/boot/fdt/dts/powerpc/p1020rdb.dts (from r264230, head/sys/boot/fdt/dts/powerpc/p1020rdb.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/fdt/dts/powerpc/p1020rdb.dts Sat May 17 21:55:00 2014 (r266364, copy of r264230, head/sys/boot/fdt/dts/powerpc/p1020rdb.dts) @@ -0,0 +1,627 @@ +/* + * P1020 RDB Device Tree Source + * + * Copyright 2009 Freescale Semiconductor Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of Freescale Semiconductor nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * + * ALTERNATIVELY, this software may be distributed under the terms of the + * GNU General Public License ("GPL") as published by the Free Software + * Foundation, either version 2 of that License or (at your option) any + * later version. + * + * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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. + */ +/* $FreeBSD$ */ + +/dts-v1/; + +/ { + model = "fsl,P1020"; + compatible = "fsl,P1020RDB"; + #address-cells = <2>; + #size-cells = <2>; + + aliases { + serial0 = &serial0; + serial1 = &serial1; + ethernet0 = &enet0; + ethernet1 = &enet1; + ethernet2 = &enet2; + pci0 = &pci0; + pci1 = &pci1; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + PowerPC,P1020@0 { + device_type = "cpu"; + reg = <0x0>; + next-level-cache = <&L2>; + }; + + PowerPC,P1020@1 { + device_type = "cpu"; + reg = <0x1>; + next-level-cache = <&L2>; + }; + }; + + memory { + device_type = "memory"; + }; + + localbus@ffe05000 { + #address-cells = <2>; + #size-cells = <1>; + compatible = "fsl,p1020-elbc", "fsl,elbc", "simple-bus"; + reg = <0 0xffe05000 0 0x1000>; + interrupts = <19 2>; + interrupt-parent = <&mpic>; + + /* NOR, NAND Flashes and Vitesse 5 port L2 switch */ + ranges = <0x0 0x0 0x0 0xef000000 0x01000000 + 0x1 0x0 0x0 0xffa00000 0x00040000 + 0x2 0x0 0x0 0xffb00000 0x00020000>; + + nor@0,0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "cfi-flash"; + reg = <0x0 0x0 0x1000000>; + bank-width = <2>; + device-width = <1>; + + partition@0 { + /* This location must not be altered */ + /* 256KB for Vitesse 7385 Switch firmware */ + reg = <0x0 0x00040000>; + label = "NOR (RO) Vitesse-7385 Firmware"; + read-only; + }; + + partition@40000 { + /* 256KB for DTB Image */ + reg = <0x00040000 0x00040000>; + label = "NOR (RO) DTB Image"; + read-only; + }; + + partition@80000 { + /* 3.5 MB for Linux Kernel Image */ + reg = <0x00080000 0x00380000>; + label = "NOR (RO) Linux Kernel Image"; + read-only; + }; + + partition@400000 { + /* 11MB for JFFS2 based Root file System */ + reg = <0x00400000 0x00b00000>; + label = "NOR (RW) JFFS2 Root File System"; + }; + + partition@f00000 { + /* This location must not be altered */ + /* 512KB for u-boot Bootloader Image */ + /* 512KB for u-boot Environment Variables */ + reg = <0x00f00000 0x00100000>; + label = "NOR (RO) U-Boot Image"; + read-only; + }; + }; + + nand@1,0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "fsl,p1020-fcm-nand", + "fsl,elbc-fcm-nand"; + reg = <0x1 0x0 0x40000>; + + partition@0 { + /* This location must not be altered */ + /* 1MB for u-boot Bootloader Image */ + reg = <0x0 0x00100000>; + label = "NAND (RO) U-Boot Image"; + read-only; + }; + + partition@100000 { + /* 1MB for DTB Image */ + reg = <0x00100000 0x00100000>; + label = "NAND (RO) DTB Image"; + read-only; + }; + + partition@200000 { + /* 4MB for Linux Kernel Image */ + reg = <0x00200000 0x00400000>; + label = "NAND (RO) Linux Kernel Image"; + read-only; + }; + + partition@600000 { + /* 4MB for Compressed Root file System Image */ + reg = <0x00600000 0x00400000>; + label = "NAND (RO) Compressed RFS Image"; + read-only; + }; + + partition@a00000 { + /* 7MB for JFFS2 based Root file System */ + reg = <0x00a00000 0x00700000>; + label = "NAND (RW) JFFS2 Root File System"; + }; + + partition@1100000 { + /* 15MB for JFFS2 based Root file System */ + reg = <0x01100000 0x00f00000>; + label = "NAND (RW) Writable User area"; + }; + }; + + L2switch@2,0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "vitesse-7385"; + reg = <0x2 0x0 0x20000>; + }; + + }; + + soc@ffe00000 { + #address-cells = <1>; + #size-cells = <1>; + device_type = "soc"; + compatible = "fsl,p1020-immr", "simple-bus"; + ranges = <0x0 0x0 0xffe00000 0x100000>; + bus-frequency = <0>; // Filled out by uboot. + + ecm-law@0 { + compatible = "fsl,ecm-law"; + reg = <0x0 0x1000>; + fsl,num-laws = <12>; + }; + + ecm@1000 { + compatible = "fsl,p1020-ecm", "fsl,ecm"; + reg = <0x1000 0x1000>; + interrupts = <16 2>; + interrupt-parent = <&mpic>; + }; + + memory-controller@2000 { + compatible = "fsl,p1020-memory-controller"; + reg = <0x2000 0x1000>; + interrupt-parent = <&mpic>; + interrupts = <16 2>; + }; + + i2c@3000 { + #address-cells = <1>; + #size-cells = <0>; + cell-index = <0>; + compatible = "fsl-i2c"; + reg = <0x3000 0x100>; + interrupts = <43 2>; + interrupt-parent = <&mpic>; + dfsrr; + rtc@68 { + compatible = "dallas,ds1339"; + reg = <0x68>; + }; + }; + + i2c@3100 { + #address-cells = <1>; + #size-cells = <0>; + cell-index = <1>; + compatible = "fsl-i2c"; + reg = <0x3100 0x100>; + interrupts = <43 2>; + interrupt-parent = <&mpic>; + dfsrr; + }; + + serial0: serial@4500 { + cell-index = <0>; + device_type = "serial"; + compatible = "ns16550"; + reg = <0x4500 0x100>; + clock-frequency = <0>; + interrupts = <42 2>; + interrupt-parent = <&mpic>; + }; + + serial1: serial@4600 { + cell-index = <1>; + device_type = "serial"; + compatible = "ns16550"; + reg = <0x4600 0x100>; + clock-frequency = <0>; + interrupts = <42 2>; + interrupt-parent = <&mpic>; + }; + + spi@7000 { + cell-index = <0>; + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl,espi"; + reg = <0x7000 0x1000>; + interrupts = <59 0x2>; + interrupt-parent = <&mpic>; + mode = "cpu"; + + fsl_m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "fsl,espi-flash"; + reg = <0>; + linux,modalias = "fsl_m25p80"; + modal = "s25sl128b"; + spi-max-frequency = <50000000>; + mode = <0>; + + partition@0 { + /* 512KB for u-boot Bootloader Image */ + reg = <0x0 0x00080000>; + label = "SPI (RO) U-Boot Image"; + read-only; + }; + + partition@80000 { + /* 512KB for DTB Image */ + reg = <0x00080000 0x00080000>; + label = "SPI (RO) DTB Image"; + read-only; + }; + + partition@100000 { + /* 4MB for Linux Kernel Image */ + reg = <0x00100000 0x00400000>; + label = "SPI (RO) Linux Kernel Image"; + read-only; + }; + + partition@500000 { + /* 4MB for Compressed RFS Image */ + reg = <0x00500000 0x00400000>; + label = "SPI (RO) Compressed RFS Image"; + read-only; + }; + + partition@900000 { + /* 7MB for JFFS2 based RFS */ + reg = <0x00900000 0x00700000>; + label = "SPI (RW) JFFS2 RFS"; + }; + }; + }; + + gpio: gpio-controller@f000 { + #gpio-cells = <2>; + compatible = "fsl,mpc8572-gpio"; + reg = <0xf000 0x100>; + interrupts = <47 0x2>; + interrupt-parent = <&mpic>; + gpio-controller; + }; + + L2: l2-cache-controller@20000 { + compatible = "fsl,p1020-l2-cache-controller"; + reg = <0x20000 0x1000>; + cache-line-size = <32>; // 32 bytes + cache-size = <0x40000>; // L2,256K + interrupt-parent = <&mpic>; + interrupts = <16 2>; + }; + + dma@21300 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "fsl,eloplus-dma"; + reg = <0x21300 0x4>; + ranges = <0x0 0x21100 0x200>; + cell-index = <0>; + dma-channel@0 { + compatible = "fsl,eloplus-dma-channel"; + reg = <0x0 0x80>; + cell-index = <0>; + interrupt-parent = <&mpic>; + interrupts = <20 2>; + }; + dma-channel@80 { + compatible = "fsl,eloplus-dma-channel"; + reg = <0x80 0x80>; + cell-index = <1>; + interrupt-parent = <&mpic>; + interrupts = <21 2>; + }; + dma-channel@100 { + compatible = "fsl,eloplus-dma-channel"; + reg = <0x100 0x80>; + cell-index = <2>; + interrupt-parent = <&mpic>; + interrupts = <22 2>; + }; + dma-channel@180 { + compatible = "fsl,eloplus-dma-channel"; + reg = <0x180 0x80>; + cell-index = <3>; + interrupt-parent = <&mpic>; + interrupts = <23 2>; + }; + }; + + mdio@24000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl,etsec2-mdio"; + reg = <0x24000 0x1000 0xb0030 0x4>; + + phy0: ethernet-phy@0 { + interrupt-parent = <&mpic>; + interrupts = <3 1>; + reg = <0x0>; + }; + + phy1: ethernet-phy@1 { + interrupt-parent = <&mpic>; + interrupts = <2 1>; + reg = <0x1>; + }; + }; + + mdio@25000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl,etsec2-tbi"; + reg = <0x25000 0x1000 0xb1030 0x4>; + + tbi0: tbi-phy@11 { + reg = <0x11>; + device_type = "tbi-phy"; + }; + }; + + enet0: ethernet@b0000 { + #address-cells = <1>; + #size-cells = <1>; + device_type = "network"; + model = "eTSEC"; + compatible = "fsl,etsec2"; + fsl,num_rx_queues = <0x8>; + fsl,num_tx_queues = <0x8>; + local-mac-address = [ 00 00 00 00 00 00 ]; + interrupt-parent = <&mpic>; + fixed-link = <1 1 1000 0 0>; + phy-connection-type = "rgmii-id"; + + queue-group@0 { + #address-cells = <1>; + #size-cells = <1>; + reg = <0xb0000 0x1000>; + interrupts = <29 2 30 2 34 2>; + }; + + queue-group@1 { + #address-cells = <1>; + #size-cells = <1>; + reg = <0xb4000 0x1000>; + interrupts = <17 2 18 2 24 2>; + }; + }; + + enet1: ethernet@b1000 { + #address-cells = <1>; + #size-cells = <1>; + device_type = "network"; + model = "eTSEC"; + compatible = "fsl,etsec2"; + fsl,num_rx_queues = <0x8>; + fsl,num_tx_queues = <0x8>; + local-mac-address = [ 00 00 00 00 00 00 ]; + interrupt-parent = <&mpic>; + phy-handle = <&phy0>; + tbi-handle = <&tbi0>; + phy-connection-type = "sgmii"; + + queue-group@0 { + #address-cells = <1>; + #size-cells = <1>; + reg = <0xb1000 0x1000>; + interrupts = <35 2 36 2 40 2>; + }; + + queue-group@1 { + #address-cells = <1>; + #size-cells = <1>; + reg = <0xb5000 0x1000>; + interrupts = <51 2 52 2 67 2>; + }; + }; + + enet2: ethernet@b2000 { + #address-cells = <1>; + #size-cells = <1>; + device_type = "network"; + model = "eTSEC"; + compatible = "fsl,etsec2"; + fsl,num_rx_queues = <0x8>; + fsl,num_tx_queues = <0x8>; + local-mac-address = [ 00 00 00 00 00 00 ]; + interrupt-parent = <&mpic>; + phy-handle = <&phy1>; + phy-connection-type = "rgmii-id"; + + queue-group@0 { + #address-cells = <1>; + #size-cells = <1>; + reg = <0xb2000 0x1000>; + interrupts = <31 2 32 2 33 2>; + }; + + queue-group@1 { + #address-cells = <1>; + #size-cells = <1>; + reg = <0xb6000 0x1000>; + interrupts = <25 2 26 2 27 2>; + }; + }; + + usb@22000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl-usb2-dr"; + reg = <0x22000 0x1000>; + interrupt-parent = <&mpic>; + interrupts = <28 0x2>; + phy_type = "ulpi"; + }; + + /* USB2 is shared with localbus, so it must be disabled + by default. We can't put 'status = "disabled";' here + since U-Boot doesn't clear the status property when + it enables USB2. OTOH, U-Boot does create a new node + when there isn't any. So, just comment it out. + usb@23000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl-usb2-dr"; + reg = <0x23000 0x1000>; + interrupt-parent = <&mpic>; + interrupts = <46 0x2>; + phy_type = "ulpi"; + }; + */ + + sdhci@2e000 { + compatible = "fsl,p1020-esdhc", "fsl,esdhc"; + reg = <0x2e000 0x1000>; + interrupts = <72 0x2>; + interrupt-parent = <&mpic>; + /* Filled in by U-Boot */ + clock-frequency = <0>; + }; + + crypto@30000 { + compatible = "fsl,sec3.1", "fsl,sec3.0", "fsl,sec2.4", + "fsl,sec2.2", "fsl,sec2.1", "fsl,sec2.0"; + reg = <0x30000 0x10000>; + interrupts = <45 2 58 2>; + interrupt-parent = <&mpic>; + fsl,num-channels = <4>; + fsl,channel-fifo-len = <24>; + fsl,exec-units-mask = <0xbfe>; + fsl,descriptor-types-mask = <0x3ab0ebf>; + }; + + mpic: pic@40000 { + interrupt-controller; + #address-cells = <0>; + #interrupt-cells = <2>; + reg = <0x40000 0x40000>; + compatible = "chrp,open-pic"; + device_type = "open-pic"; + }; + + msi@41600 { + compatible = "fsl,p1020-msi", "fsl,mpic-msi"; + reg = <0x41600 0x80>; + msi-available-ranges = <0 0x100>; + interrupts = < + 0xe0 0 + 0xe1 0 + 0xe2 0 + 0xe3 0 + 0xe4 0 + 0xe5 0 + 0xe6 0 + 0xe7 0>; + interrupt-parent = <&mpic>; + }; + + global-utilities@e0000 { //global utilities block + compatible = "fsl,p1020-guts"; + reg = <0xe0000 0x1000>; + fsl,has-rstcr; + }; + }; + + pci0: pcie@ffe09000 { + compatible = "fsl,mpc8548-pcie"; + device_type = "pci"; + #interrupt-cells = <1>; + #size-cells = <2>; + #address-cells = <3>; + reg = <0 0xffe09000 0 0x1000>; + bus-range = <0 255>; + ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000 + 0x1000000 0x0 0x00000000 0 0xffc30000 0x0 0x10000>; + clock-frequency = <33333333>; + interrupt-parent = <&mpic>; + interrupts = <16 2>; + pcie@0 { + reg = <0x0 0x0 0x0 0x0 0x0>; + #size-cells = <2>; + #address-cells = <3>; + device_type = "pci"; + ranges = <0x2000000 0x0 0xa0000000 + 0x2000000 0x0 0xa0000000 + 0x0 0x20000000 + + 0x1000000 0x0 0x0 + 0x1000000 0x0 0x0 + 0x0 0x100000>; + }; + }; + + pci1: pcie@ffe0a000 { + compatible = "fsl,mpc8548-pcie"; + device_type = "pci"; + #interrupt-cells = <1>; + #size-cells = <2>; + #address-cells = <3>; + reg = <0 0xffe0a000 0 0x1000>; + bus-range = <0 255>; + ranges = <0x2000000 0x0 0xc0000000 0 0xc0000000 0x0 0x20000000 + 0x1000000 0x0 0x00000000 0 0xffc20000 0x0 0x10000>; + clock-frequency = <33333333>; + interrupt-parent = <&mpic>; + interrupts = <16 2>; + pcie@0 { + reg = <0x0 0x0 0x0 0x0 0x0>; + #size-cells = <2>; + #address-cells = <3>; + device_type = "pci"; + ranges = <0x2000000 0x0 0xc0000000 + 0x2000000 0x0 0xc0000000 + 0x0 0x20000000 + + 0x1000000 0x0 0x0 + 0x1000000 0x0 0x0 + 0x0 0x100000>; + }; + }; +}; Copied: stable/10/sys/boot/fdt/dts/powerpc/p2020ds.dts (from r264230, head/sys/boot/fdt/dts/powerpc/p2020ds.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/fdt/dts/powerpc/p2020ds.dts Sat May 17 21:55:00 2014 (r266364, copy of r264230, head/sys/boot/fdt/dts/powerpc/p2020ds.dts) @@ -0,0 +1,754 @@ +/* + * P2020 DS Device Tree Source + * + * Copyright 2009 Freescale Semiconductor Inc. + * + * Neither the name of Freescale Semiconductor, Inc nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Freescale hereby publishes it under the following licenses: + * + * BSD License + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. + * + * GNU General Public License, version 2 + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + * + * You may select the license of your choice. + *------------------------------------------------------------------ + */ +/* $FreeBSD$ */ + +/dts-v1/; +/ { + model = "fsl,P2020"; + compatible = "fsl,P2020DS"; + #address-cells = <2>; + #size-cells = <2>; + + aliases { + ethernet0 = &enet0; + ethernet1 = &enet1; + ethernet2 = &enet2; + serial0 = &serial0; + serial1 = &serial1; + pci0 = &pci0; + pci1 = &pci1; + pci2 = &pci2; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + PowerPC,P2020@0 { + device_type = "cpu"; + reg = <0x0>; + next-level-cache = <&L2>; + }; + + PowerPC,P2020@1 { + device_type = "cpu"; + reg = <0x1>; + next-level-cache = <&L2>; + }; + }; + + memory { + device_type = "memory"; + }; + + localbus@ffe05000 { + #address-cells = <2>; + #size-cells = <1>; + compatible = "fsl,elbc", "simple-bus"; + reg = <0 0xffe05000 0 0x1000>; + interrupts = <19 2>; + interrupt-parent = <&mpic>; + + ranges = <0x0 0x0 0x0 0xe8000000 0x08000000 + 0x1 0x0 0x0 0xe0000000 0x08000000 + 0x2 0x0 0x0 0xffa00000 0x00040000 + 0x3 0x0 0x0 0xffdf0000 0x00008000 + 0x4 0x0 0x0 0xffa40000 0x00040000 + 0x5 0x0 0x0 0xffa80000 0x00040000 + 0x6 0x0 0x0 0xffac0000 0x00040000>; + + nor@0,0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "cfi-flash"; + reg = <0x0 0x0 0x8000000>; + bank-width = <2>; + device-width = <1>; + + ramdisk@0 { + reg = <0x0 0x03000000>; + read-only; + }; + + diagnostic@3000000 { + reg = <0x03000000 0x00e00000>; + read-only; + }; + + dink@3e00000 { + reg = <0x03e00000 0x00200000>; + read-only; + }; + + kernel@4000000 { + reg = <0x04000000 0x00400000>; + read-only; + }; + + jffs2@4400000 { + reg = <0x04400000 0x03b00000>; + }; + + dtb@7f00000 { + reg = <0x07f00000 0x00080000>; + read-only; + }; + + u-boot@7f80000 { + reg = <0x07f80000 0x00080000>; + read-only; + }; + }; + + nand@2,0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "fsl,elbc-fcm-nand"; + reg = <0x2 0x0 0x40000>; + + u-boot@0 { + reg = <0x0 0x02000000>; + read-only; + }; + + jffs2@2000000 { + reg = <0x02000000 0x10000000>; + }; + + ramdisk@12000000 { + reg = <0x12000000 0x08000000>; + read-only; + }; + + kernel@1a000000 { + reg = <0x1a000000 0x04000000>; + }; + + dtb@1e000000 { + reg = <0x1e000000 0x01000000>; + read-only; + }; + + empty@1f000000 { + reg = <0x1f000000 0x21000000>; + }; + }; + + nand@4,0 { + compatible = "fsl,elbc-fcm-nand"; + reg = <0x4 0x0 0x40000>; + }; + + nand@5,0 { + compatible = "fsl,elbc-fcm-nand"; + reg = <0x5 0x0 0x40000>; + }; + + nand@6,0 { + compatible = "fsl,elbc-fcm-nand"; + reg = <0x6 0x0 0x40000>; + }; + }; + + soc@ffe00000 { + #address-cells = <1>; + #size-cells = <1>; + device_type = "soc"; + compatible = "fsl,p2020-immr", "simple-bus"; + ranges = <0x0 0 0xffe00000 0x100000>; + bus-frequency = <0>; // Filled out by uboot. + + ecm-law@0 { + compatible = "fsl,ecm-law"; + reg = <0x0 0x1000>; + fsl,num-laws = <12>; + }; + + ecm@1000 { + compatible = "fsl,p2020-ecm", "fsl,ecm"; + reg = <0x1000 0x1000>; + interrupts = <17 2>; + interrupt-parent = <&mpic>; + }; + + memory-controller@2000 { + compatible = "fsl,p2020-memory-controller"; + reg = <0x2000 0x1000>; + interrupt-parent = <&mpic>; + interrupts = <18 2>; + }; + + i2c@3000 { + #address-cells = <1>; + #size-cells = <0>; + cell-index = <0>; + compatible = "fsl-i2c"; + reg = <0x3000 0x100>; + interrupts = <43 2>; + interrupt-parent = <&mpic>; + dfsrr; + }; + + i2c@3100 { + #address-cells = <1>; + #size-cells = <0>; + cell-index = <1>; + compatible = "fsl-i2c"; + reg = <0x3100 0x100>; + interrupts = <43 2>; + interrupt-parent = <&mpic>; + dfsrr; + }; + + serial0: serial@4500 { + cell-index = <0>; + device_type = "serial"; + compatible = "ns16550"; + reg = <0x4500 0x100>; + clock-frequency = <0>; + interrupts = <42 2>; + interrupt-parent = <&mpic>; + }; + + serial1: serial@4600 { + cell-index = <1>; + device_type = "serial"; + compatible = "ns16550"; + reg = <0x4600 0x100>; + clock-frequency = <0>; + interrupts = <42 2>; + interrupt-parent = <&mpic>; + }; + + spi@7000 { + compatible = "fsl,espi"; + reg = <0x7000 0x1000>; + interrupts = <59 0x2>; + interrupt-parent = <&mpic>; + }; + + dma@c300 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "fsl,eloplus-dma"; + reg = <0xc300 0x4>; + ranges = <0x0 0xc100 0x200>; + cell-index = <1>; + dma-channel@0 { + compatible = "fsl,eloplus-dma-channel"; + reg = <0x0 0x80>; + cell-index = <0>; + interrupt-parent = <&mpic>; + interrupts = <76 2>; + }; + dma-channel@80 { + compatible = "fsl,eloplus-dma-channel"; + reg = <0x80 0x80>; + cell-index = <1>; + interrupt-parent = <&mpic>; + interrupts = <77 2>; + }; + dma-channel@100 { + compatible = "fsl,eloplus-dma-channel"; + reg = <0x100 0x80>; + cell-index = <2>; + interrupt-parent = <&mpic>; + interrupts = <78 2>; + }; + dma-channel@180 { + compatible = "fsl,eloplus-dma-channel"; + reg = <0x180 0x80>; + cell-index = <3>; + interrupt-parent = <&mpic>; + interrupts = <79 2>; + }; + }; + + gpio: gpio-controller@f000 { + #gpio-cells = <2>; + compatible = "fsl,mpc8572-gpio"; + reg = <0xf000 0x100>; + interrupts = <47 0x2>; + interrupt-parent = <&mpic>; + gpio-controller; + }; + + L2: l2-cache-controller@20000 { + compatible = "fsl,p2020-l2-cache-controller"; + reg = <0x20000 0x1000>; + cache-line-size = <32>; // 32 bytes + cache-size = <0x80000>; // L2, 512k + interrupt-parent = <&mpic>; + interrupts = <16 2>; + }; + + dma@21300 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "fsl,eloplus-dma"; + reg = <0x21300 0x4>; + ranges = <0x0 0x21100 0x200>; + cell-index = <0>; + dma-channel@0 { + compatible = "fsl,eloplus-dma-channel"; + reg = <0x0 0x80>; + cell-index = <0>; + interrupt-parent = <&mpic>; + interrupts = <20 2>; + }; + dma-channel@80 { + compatible = "fsl,eloplus-dma-channel"; + reg = <0x80 0x80>; + cell-index = <1>; + interrupt-parent = <&mpic>; + interrupts = <21 2>; + }; + dma-channel@100 { + compatible = "fsl,eloplus-dma-channel"; + reg = <0x100 0x80>; + cell-index = <2>; + interrupt-parent = <&mpic>; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat May 17 22:00:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76A879E1; Sat, 17 May 2014 22:00:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61F522B1C; Sat, 17 May 2014 22:00:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HM0Ci5032286; Sat, 17 May 2014 22:00:12 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HM0ALV032275; Sat, 17 May 2014 22:00:10 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405172200.s4HM0ALV032275@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 22:00:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266365 - in stable/10/sys: arm/conf arm/freescale/imx boot/fdt/dts/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 22:00:12 -0000 Author: ian Date: Sat May 17 22:00:10 2014 New Revision: 266365 URL: http://svnweb.freebsd.org/changeset/base/266365 Log: MFC 264251: Updates to i.MX53: * Define support for the SDHCI driver, although it doesn't work yet * Fix the memory mappings for IPU Modified: stable/10/sys/arm/conf/DIGI-CCWMX53 stable/10/sys/arm/freescale/imx/files.imx53 stable/10/sys/arm/freescale/imx/imx51_ipuv3.c stable/10/sys/arm/freescale/imx/imx51_ipuv3_fbd.c stable/10/sys/arm/freescale/imx/imx51_ipuv3reg.h stable/10/sys/boot/fdt/dts/arm/digi-ccwmx53.dts stable/10/sys/boot/fdt/dts/arm/imx53-qsb.dts stable/10/sys/boot/fdt/dts/arm/imx53x.dtsi Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/DIGI-CCWMX53 ============================================================================== --- stable/10/sys/arm/conf/DIGI-CCWMX53 Sat May 17 21:55:00 2014 (r266364) +++ stable/10/sys/arm/conf/DIGI-CCWMX53 Sat May 17 22:00:10 2014 (r266365) @@ -169,6 +169,12 @@ device wlan_ccmp # 802.11 CCMP support device wlan_tkip # 802.11 TKIP support device wlan_amrr # AMRR transmit rate control algorithm +# MMC +#device sdhci # SD controller +#device mmc # SD/MMC protocol +#device mmcsd # SDCard disk device + + # Flattened Device Tree options FDT options FDT_DTB_STATIC @@ -177,6 +183,7 @@ makeoptions FDT_DTS_FILE=digi-ccwmx5 # NOTE: serial console will be disabled if syscons enabled # Uncomment following lines for framebuffer/syscons support #device sc +#device vt #device kbdmux #options SC_DFLT_FONT # compile font in #makeoptions SC_DFLT_FONT=cp437 Modified: stable/10/sys/arm/freescale/imx/files.imx53 ============================================================================== --- stable/10/sys/arm/freescale/imx/files.imx53 Sat May 17 21:55:00 2014 (r266364) +++ stable/10/sys/arm/freescale/imx/files.imx53 Sat May 17 22:00:10 2014 (r266365) @@ -36,6 +36,9 @@ arm/freescale/imx/imx51_ccm.c standard # i.MX5xx PATA controller dev/ata/chipsets/ata-fsl.c optional imxata +# SDHCI/MMC +arm/freescale/imx/imx_sdhci.c optional sdhci + # USB OH3 controller (1 OTG, 3 EHCI) arm/freescale/imx/imx_nop_usbphy.c optional ehci dev/usb/controller/ehci_imx.c optional ehci Modified: stable/10/sys/arm/freescale/imx/imx51_ipuv3.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx51_ipuv3.c Sat May 17 21:55:00 2014 (r266364) +++ stable/10/sys/arm/freescale/imx/imx51_ipuv3.c Sat May 17 22:00:10 2014 (r266365) @@ -260,7 +260,7 @@ ipu3_fb_probe(device_t dev) if (!ofw_bus_is_compatible(dev, "fsl,ipu3")) return (ENXIO); - device_set_desc(dev, "i.MX515 Image Processing Unit (FB)"); + device_set_desc(dev, "i.MX5x Image Processing Unit v3 (FB)"); error = sc_probe_unit(device_get_unit(dev), device_get_flags(dev) | SC_AUTODETECT_KBD); @@ -277,15 +277,19 @@ ipu3_fb_attach(device_t dev) struct ipu3sc_softc *sc = device_get_softc(dev); bus_space_tag_t iot; bus_space_handle_t ioh; + phandle_t node; + pcell_t reg; int err; + uintptr_t base; if (ipu3sc_softc) return (ENXIO); ipu3sc_softc = sc; - device_printf(dev, "\tclock gate status is %d\n", - imx51_get_clk_gating(IMX51CLK_IPU_HSP_CLK_ROOT)); + if (bootverbose) + device_printf(dev, "clock gate status is %d\n", + imx51_get_clk_gating(IMX51CLK_IPU_HSP_CLK_ROOT)); sc->dev = dev; @@ -300,58 +304,71 @@ ipu3_fb_attach(device_t dev) sc = device_get_softc(dev); sc->iot = iot = fdtbus_bs_tag; - device_printf(sc->dev, ": i.MX51 IPUV3 controller\n"); - + /* + * Retrieve the device address based on the start address in the + * DTS. The DTS for i.MX51 specifies 0x5e000000 as the first register + * address, so we just subtract IPU_CM_BASE to get the offset at which + * the IPU device was memory mapped. + * On i.MX53, the offset is 0. + */ + node = ofw_bus_get_node(dev); + if ((OF_getprop(node, "reg", ®, sizeof(reg))) <= 0) + base = 0; + else + base = fdt32_to_cpu(reg) - IPU_CM_BASE(0); /* map controller registers */ - err = bus_space_map(iot, IPU_CM_BASE, IPU_CM_SIZE, 0, &ioh); + err = bus_space_map(iot, IPU_CM_BASE(base), IPU_CM_SIZE, 0, &ioh); if (err) goto fail_retarn_cm; sc->cm_ioh = ioh; /* map Display Multi FIFO Controller registers */ - err = bus_space_map(iot, IPU_DMFC_BASE, IPU_DMFC_SIZE, 0, &ioh); + err = bus_space_map(iot, IPU_DMFC_BASE(base), IPU_DMFC_SIZE, 0, &ioh); if (err) goto fail_retarn_dmfc; sc->dmfc_ioh = ioh; /* map Display Interface 0 registers */ - err = bus_space_map(iot, IPU_DI0_BASE, IPU_DI0_SIZE, 0, &ioh); + err = bus_space_map(iot, IPU_DI0_BASE(base), IPU_DI0_SIZE, 0, &ioh); if (err) goto fail_retarn_di0; sc->di0_ioh = ioh; /* map Display Interface 1 registers */ - err = bus_space_map(iot, IPU_DI1_BASE, IPU_DI0_SIZE, 0, &ioh); + err = bus_space_map(iot, IPU_DI1_BASE(base), IPU_DI0_SIZE, 0, &ioh); if (err) goto fail_retarn_di1; sc->di1_ioh = ioh; /* map Display Processor registers */ - err = bus_space_map(iot, IPU_DP_BASE, IPU_DP_SIZE, 0, &ioh); + err = bus_space_map(iot, IPU_DP_BASE(base), IPU_DP_SIZE, 0, &ioh); if (err) goto fail_retarn_dp; sc->dp_ioh = ioh; /* map Display Controller registers */ - err = bus_space_map(iot, IPU_DC_BASE, IPU_DC_SIZE, 0, &ioh); + err = bus_space_map(iot, IPU_DC_BASE(base), IPU_DC_SIZE, 0, &ioh); if (err) goto fail_retarn_dc; sc->dc_ioh = ioh; /* map Image DMA Controller registers */ - err = bus_space_map(iot, IPU_IDMAC_BASE, IPU_IDMAC_SIZE, 0, &ioh); + err = bus_space_map(iot, IPU_IDMAC_BASE(base), IPU_IDMAC_SIZE, 0, + &ioh); if (err) goto fail_retarn_idmac; sc->idmac_ioh = ioh; /* map CPMEM registers */ - err = bus_space_map(iot, IPU_CPMEM_BASE, IPU_CPMEM_SIZE, 0, &ioh); + err = bus_space_map(iot, IPU_CPMEM_BASE(base), IPU_CPMEM_SIZE, 0, + &ioh); if (err) goto fail_retarn_cpmem; sc->cpmem_ioh = ioh; /* map DCTEMPL registers */ - err = bus_space_map(iot, IPU_DCTMPL_BASE, IPU_DCTMPL_SIZE, 0, &ioh); + err = bus_space_map(iot, IPU_DCTMPL_BASE(base), IPU_DCTMPL_SIZE, 0, + &ioh); if (err) goto fail_retarn_dctmpl; sc->dctmpl_ioh = ioh; Modified: stable/10/sys/arm/freescale/imx/imx51_ipuv3_fbd.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx51_ipuv3_fbd.c Sat May 17 21:55:00 2014 (r266364) +++ stable/10/sys/arm/freescale/imx/imx51_ipuv3_fbd.c Sat May 17 22:00:10 2014 (r266365) @@ -190,7 +190,7 @@ ipu3_fb_probe(device_t dev) if (!ofw_bus_is_compatible(dev, "fsl,ipu3")) return (ENXIO); - device_set_desc(dev, "i.MX515 Image Processing Unit (FB)"); + device_set_desc(dev, "i.MX5x Image Processing Unit v3 (FB)"); return (BUS_PROBE_DEFAULT); } @@ -201,70 +201,87 @@ ipu3_fb_attach(device_t dev) struct ipu3sc_softc *sc = device_get_softc(dev); bus_space_tag_t iot; bus_space_handle_t ioh; - int err; + phandle_t node; + pcell_t reg; + int err; + uintptr_t base; ipu3sc_softc = sc; - device_printf(dev, "\tclock gate status is %d\n", - imx51_get_clk_gating(IMX51CLK_IPU_HSP_CLK_ROOT)); + if (bootverbose) + device_printf(dev, "clock gate status is %d\n", + imx51_get_clk_gating(IMX51CLK_IPU_HSP_CLK_ROOT)); sc->dev = dev; sc = device_get_softc(dev); sc->iot = iot = fdtbus_bs_tag; - device_printf(sc->dev, ": i.MX51 IPUV3 controller\n"); - + /* + * Retrieve the device address based on the start address in the + * DTS. The DTS for i.MX51 specifies 0x5e000000 as the first register + * address, so we just subtract IPU_CM_BASE to get the offset at which + * the IPU device was memory mapped. + * On i.MX53, the offset is 0. + */ + node = ofw_bus_get_node(dev); + if ((OF_getprop(node, "reg", ®, sizeof(reg))) <= 0) + base = 0; + else + base = fdt32_to_cpu(reg) - IPU_CM_BASE(0); /* map controller registers */ - err = bus_space_map(iot, IPU_CM_BASE, IPU_CM_SIZE, 0, &ioh); + err = bus_space_map(iot, IPU_CM_BASE(base), IPU_CM_SIZE, 0, &ioh); if (err) goto fail_retarn_cm; sc->cm_ioh = ioh; /* map Display Multi FIFO Controller registers */ - err = bus_space_map(iot, IPU_DMFC_BASE, IPU_DMFC_SIZE, 0, &ioh); + err = bus_space_map(iot, IPU_DMFC_BASE(base), IPU_DMFC_SIZE, 0, &ioh); if (err) goto fail_retarn_dmfc; sc->dmfc_ioh = ioh; /* map Display Interface 0 registers */ - err = bus_space_map(iot, IPU_DI0_BASE, IPU_DI0_SIZE, 0, &ioh); + err = bus_space_map(iot, IPU_DI0_BASE(base), IPU_DI0_SIZE, 0, &ioh); if (err) goto fail_retarn_di0; sc->di0_ioh = ioh; /* map Display Interface 1 registers */ - err = bus_space_map(iot, IPU_DI1_BASE, IPU_DI0_SIZE, 0, &ioh); + err = bus_space_map(iot, IPU_DI1_BASE(base), IPU_DI0_SIZE, 0, &ioh); if (err) goto fail_retarn_di1; sc->di1_ioh = ioh; /* map Display Processor registers */ - err = bus_space_map(iot, IPU_DP_BASE, IPU_DP_SIZE, 0, &ioh); + err = bus_space_map(iot, IPU_DP_BASE(base), IPU_DP_SIZE, 0, &ioh); if (err) goto fail_retarn_dp; sc->dp_ioh = ioh; /* map Display Controller registers */ - err = bus_space_map(iot, IPU_DC_BASE, IPU_DC_SIZE, 0, &ioh); + err = bus_space_map(iot, IPU_DC_BASE(base), IPU_DC_SIZE, 0, &ioh); if (err) goto fail_retarn_dc; sc->dc_ioh = ioh; /* map Image DMA Controller registers */ - err = bus_space_map(iot, IPU_IDMAC_BASE, IPU_IDMAC_SIZE, 0, &ioh); + err = bus_space_map(iot, IPU_IDMAC_BASE(base), IPU_IDMAC_SIZE, 0, + &ioh); if (err) goto fail_retarn_idmac; sc->idmac_ioh = ioh; /* map CPMEM registers */ - err = bus_space_map(iot, IPU_CPMEM_BASE, IPU_CPMEM_SIZE, 0, &ioh); + err = bus_space_map(iot, IPU_CPMEM_BASE(base), IPU_CPMEM_SIZE, 0, + &ioh); if (err) goto fail_retarn_cpmem; sc->cpmem_ioh = ioh; /* map DCTEMPL registers */ - err = bus_space_map(iot, IPU_DCTMPL_BASE, IPU_DCTMPL_SIZE, 0, &ioh); + err = bus_space_map(iot, IPU_DCTMPL_BASE(base), IPU_DCTMPL_SIZE, 0, + &ioh); if (err) goto fail_retarn_dctmpl; sc->dctmpl_ioh = ioh; Modified: stable/10/sys/arm/freescale/imx/imx51_ipuv3reg.h ============================================================================== --- stable/10/sys/arm/freescale/imx/imx51_ipuv3reg.h Sat May 17 21:55:00 2014 (r266364) +++ stable/10/sys/arm/freescale/imx/imx51_ipuv3reg.h Sat May 17 22:00:10 2014 (r266365) @@ -877,43 +877,46 @@ #define GPU_BASE 0x30000000 #define GPU_SIZE 0x10000000 -/* Image Prossasing Unit */ -#define IPU_BASE 0x40000000 -#define IPU_CM_BASE (IPU_BASE + 0x1e000000) -#define IPU_CM_SIZE 0x8000 -#define IPU_IDMAC_BASE (IPU_BASE + 0x1e008000) -#define IPU_IDMAC_SIZE 0x8000 -#define IPU_DP_BASE (IPU_BASE + 0x1e018000) -#define IPU_DP_SIZE 0x8000 -#define IPU_IC_BASE (IPU_BASE + 0x1e020000) -#define IPU_IC_SIZE 0x8000 -#define IPU_IRT_BASE (IPU_BASE + 0x1e028000) -#define IPU_IRT_SIZE 0x8000 -#define IPU_CSI0_BASE (IPU_BASE + 0x1e030000) -#define IPU_CSI0_SIZE 0x8000 -#define IPU_CSI1_BASE (IPU_BASE + 0x1e038000) -#define IPU_CSI1_SIZE 0x8000 -#define IPU_DI0_BASE (IPU_BASE + 0x1e040000) -#define IPU_DI0_SIZE 0x8000 -#define IPU_DI1_BASE (IPU_BASE + 0x1e048000) -#define IPU_DI1_SIZE 0x8000 -#define IPU_SMFC_BASE (IPU_BASE + 0x1e050000) -#define IPU_SMFC_SIZE 0x8000 -#define IPU_DC_BASE (IPU_BASE + 0x1e058000) -#define IPU_DC_SIZE 0x8000 -#define IPU_DMFC_BASE (IPU_BASE + 0x1e060000) -#define IPU_DMFC_SIZE 0x8000 -#define IPU_VDI_BASE (IPU_BASE + 0x1e068000) -#define IPU_VDI_SIZE 0x8000 -#define IPU_CPMEM_BASE (IPU_BASE + 0x1f000000) -#define IPU_CPMEM_SIZE 0x20000 -#define IPU_LUT_BASE (IPU_BASE + 0x1f020000) -#define IPU_LUT_SIZE 0x20000 -#define IPU_SRM_BASE (IPU_BASE + 0x1f040000) -#define IPU_SRM_SIZE 0x20000 -#define IPU_TPM_BASE (IPU_BASE + 0x1f060000) -#define IPU_TPM_SIZE 0x20000 -#define IPU_DCTMPL_BASE (IPU_BASE + 0x1f080000) -#define IPU_DCTMPL_SIZE 0x20000 +/* + * Image Processing Unit + * + * All addresses are relative to the base SoC address. + */ +#define IPU_CM_BASE(_base) ((_base) + 0x1e000000) +#define IPU_CM_SIZE 0x8000 +#define IPU_IDMAC_BASE(_base) ((_base) + 0x1e008000) +#define IPU_IDMAC_SIZE 0x8000 +#define IPU_DP_BASE(_base) ((_base) + 0x1e018000) +#define IPU_DP_SIZE 0x8000 +#define IPU_IC_BASE(_base) ((_base) + 0x1e020000) +#define IPU_IC_SIZE 0x8000 +#define IPU_IRT_BASE(_base) ((_base) + 0x1e028000) +#define IPU_IRT_SIZE 0x8000 +#define IPU_CSI0_BASE(_base) ((_base) + 0x1e030000) +#define IPU_CSI0_SIZE 0x8000 +#define IPU_CSI1_BASE(_base) ((_base) + 0x1e038000) +#define IPU_CSI1_SIZE 0x8000 +#define IPU_DI0_BASE(_base) ((_base) + 0x1e040000) +#define IPU_DI0_SIZE 0x8000 +#define IPU_DI1_BASE(_base) ((_base) + 0x1e048000) +#define IPU_DI1_SIZE 0x8000 +#define IPU_SMFC_BASE(_base) ((_base) + 0x1e050000) +#define IPU_SMFC_SIZE 0x8000 +#define IPU_DC_BASE(_base) ((_base) + 0x1e058000) +#define IPU_DC_SIZE 0x8000 +#define IPU_DMFC_BASE(_base) ((_base) + 0x1e060000) +#define IPU_DMFC_SIZE 0x8000 +#define IPU_VDI_BASE(_base) ((_base) + 0x1e068000) +#define IPU_VDI_SIZE 0x8000 +#define IPU_CPMEM_BASE(_base) ((_base) + 0x1f000000) +#define IPU_CPMEM_SIZE 0x20000 +#define IPU_LUT_BASE(_base) ((_base) + 0x1f020000) +#define IPU_LUT_SIZE 0x20000 +#define IPU_SRM_BASE(_base) ((_base) + 0x1f040000) +#define IPU_SRM_SIZE 0x20000 +#define IPU_TPM_BASE(_base) ((_base) + 0x1f060000) +#define IPU_TPM_SIZE 0x20000 +#define IPU_DCTMPL_BASE(_base) ((_base) + 0x1f080000) +#define IPU_DCTMPL_SIZE 0x20000 #endif /* _ARM_IMX_IMX51_IPUV3REG_H */ Modified: stable/10/sys/boot/fdt/dts/arm/digi-ccwmx53.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/digi-ccwmx53.dts Sat May 17 21:55:00 2014 (r266364) +++ stable/10/sys/boot/fdt/dts/arm/digi-ccwmx53.dts Sat May 17 22:00:10 2014 (r266365) @@ -46,7 +46,7 @@ }; localbus@18000000 { - ipu3@18000000 { + ipu3@1E000000 { status = "okay"; }; }; Modified: stable/10/sys/boot/fdt/dts/arm/imx53-qsb.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/imx53-qsb.dts Sat May 17 21:55:00 2014 (r266364) +++ stable/10/sys/boot/fdt/dts/arm/imx53-qsb.dts Sat May 17 22:00:10 2014 (r266365) @@ -47,7 +47,7 @@ }; localbus@18000000 { - ipu3@18000000 { + ipu3@1E000000 { status = "okay"; }; }; Modified: stable/10/sys/boot/fdt/dts/arm/imx53x.dtsi ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/imx53x.dtsi Sat May 17 21:55:00 2014 (r266364) +++ stable/10/sys/boot/fdt/dts/arm/imx53x.dtsi Sat May 17 22:00:10 2014 (r266365) @@ -657,27 +657,27 @@ ranges; - vga: ipu3@18000000 { + vga: ipu3@1E000000 { compatible = "fsl,ipu3"; reg = < - 0x18000000 0x08000 /* CM */ - 0x18008000 0x08000 /* IDMAC */ - 0x18018000 0x08000 /* DP */ - 0x18020000 0x08000 /* IC */ - 0x18028000 0x08000 /* IRT */ - 0x18030000 0x08000 /* CSI0 */ - 0x18038000 0x08000 /* CSI1 */ - 0x18040000 0x08000 /* DI0 */ - 0x18048000 0x08000 /* DI1 */ - 0x18050000 0x08000 /* SMFC */ - 0x18058000 0x08000 /* DC */ - 0x18060000 0x08000 /* DMFC */ - 0x18068000 0x08000 /* VDI */ - 0x19000000 0x20000 /* CPMEM */ - 0x19020000 0x20000 /* LUT */ - 0x19040000 0x20000 /* SRM */ - 0x19060000 0x20000 /* TPM */ - 0x19080000 0x20000 /* DCTMPL */ + 0x1E000000 0x08000 /* CM */ + 0x1E008000 0x08000 /* IDMAC */ + 0x1E018000 0x08000 /* DP */ + 0x1E020000 0x08000 /* IC */ + 0x1E028000 0x08000 /* IRT */ + 0x1E030000 0x08000 /* CSI0 */ + 0x1E038000 0x08000 /* CSI1 */ + 0x1E040000 0x08000 /* DI0 */ + 0x1E048000 0x08000 /* DI1 */ + 0x1E050000 0x08000 /* SMFC */ + 0x1E058000 0x08000 /* DC */ + 0x1E060000 0x08000 /* DMFC */ + 0x1E068000 0x08000 /* VDI */ + 0x1F000000 0x20000 /* CPMEM */ + 0x1F020000 0x20000 /* LUT */ + 0x1F040000 0x20000 /* SRM */ + 0x1F060000 0x20000 /* TPM */ + 0x1F080000 0x20000 /* DCTMPL */ >; interrupt-parent = <&tzic>; interrupts = < From owner-svn-src-stable@FreeBSD.ORG Sat May 17 22:01:17 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C54B8B13; Sat, 17 May 2014 22:01:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B26FE2B27; Sat, 17 May 2014 22:01:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HM1H8T034274; Sat, 17 May 2014 22:01:17 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HM1Ha3034273; Sat, 17 May 2014 22:01:17 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405172201.s4HM1Ha3034273@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 22:01:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266366 - stable/10/sys/dev/ata X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 22:01:17 -0000 Author: ian Date: Sat May 17 22:01:17 2014 New Revision: 266366 URL: http://svnweb.freebsd.org/changeset/base/266366 Log: MFC 264389: Fix the style of ata_interrupt_locked(). Modified: stable/10/sys/dev/ata/ata-all.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ata/ata-all.c ============================================================================== --- stable/10/sys/dev/ata/ata-all.c Sat May 17 22:00:10 2014 (r266365) +++ stable/10/sys/dev/ata/ata-all.c Sat May 17 22:01:17 2014 (r266366) @@ -360,24 +360,23 @@ ata_interrupt(void *data) static void ata_interrupt_locked(void *data) { - struct ata_channel *ch = (struct ata_channel *)data; - struct ata_request *request; + struct ata_channel *ch = (struct ata_channel *)data; + struct ata_request *request; - do { /* ignore interrupt if its not for us */ if (ch->hw.status && !ch->hw.status(ch->dev)) - break; + return; /* do we have a running request */ if (!(request = ch->running)) - break; + return; ATA_DEBUG_RQ(request, "interrupt"); /* safetycheck for the right state */ if (ch->state == ATA_IDLE) { - device_printf(request->dev, "interrupt on idle channel ignored\n"); - break; + device_printf(request->dev, "interrupt on idle channel ignored\n"); + return; } /* @@ -385,13 +384,12 @@ ata_interrupt_locked(void *data) * if it finishes immediately otherwise wait for next interrupt */ if (ch->hw.end_transaction(request) == ATA_OP_FINISHED) { - ch->running = NULL; - if (ch->state == ATA_ACTIVE) - ch->state = ATA_IDLE; - ata_cam_end_transaction(ch->dev, request); - return; + ch->running = NULL; + if (ch->state == ATA_ACTIVE) + ch->state = ATA_IDLE; + ata_cam_end_transaction(ch->dev, request); + return; } - } while (0); } static void From owner-svn-src-stable@FreeBSD.ORG Sat May 17 22:02:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6416DC64; Sat, 17 May 2014 22:02:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50C4D2B99; Sat, 17 May 2014 22:02:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HM2RDx034506; Sat, 17 May 2014 22:02:27 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HM2Qic034501; Sat, 17 May 2014 22:02:26 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405172202.s4HM2Qic034501@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 22:02:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266367 - stable/10/sys/boot/fdt/dts/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 22:02:27 -0000 Author: ian Date: Sat May 17 22:02:26 2014 New Revision: 266367 URL: http://svnweb.freebsd.org/changeset/base/266367 Log: MFC 264428: Improve the i.MX53 / Digi DTS: * Fix the IPU address. * Fix the PATA definition. * Add another I2C. * Add more UARTs. * Add SATA. Modified: stable/10/sys/boot/fdt/dts/arm/digi-ccwmx53.dts stable/10/sys/boot/fdt/dts/arm/imx53x.dtsi Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/fdt/dts/arm/digi-ccwmx53.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/digi-ccwmx53.dts Sat May 17 22:01:17 2014 (r266366) +++ stable/10/sys/boot/fdt/dts/arm/digi-ccwmx53.dts Sat May 17 22:02:26 2014 (r266367) @@ -45,7 +45,10 @@ 0xB0000000 0x10000000>; }; - localbus@18000000 { + localbus@10000000 { + sata@10000000 { + status = "okay"; + }; ipu3@1E000000 { status = "okay"; }; @@ -69,13 +72,19 @@ timer@53fa0000 { status = "okay"; }; - /* UART1, console */ console: serial@53fbc000 { status = "okay"; clock-frequency = <0>; /* won't load w/o this */ }; - + serial@53fc0000 { + status = "okay"; + clock-frequency = <0>; /* won't load w/o this */ + }; + serial@53ff0000 { + status = "okay"; + clock-frequency = <0>; /* won't load w/o this */ + }; clock@53fd4000 { status = "okay"; }; @@ -100,6 +109,14 @@ wdog@53f98000 { status = "okay"; }; + i2c@53fec000 { + status = "okay"; + rtc@68 { + compatible = "dialog,ds9052"; + reg = <0x48>; + interrupts = <0x1 0x1 0 0>; + }; + }; }; aips@60000000 { ethernet@63fec000 { @@ -118,6 +135,9 @@ ide@63fe0000 { status = "okay"; }; + serial@63f90000 { + status = "okay"; + }; }; }; Modified: stable/10/sys/boot/fdt/dts/arm/imx53x.dtsi ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/imx53x.dtsi Sat May 17 22:01:17 2014 (r266366) +++ stable/10/sys/boot/fdt/dts/arm/imx53x.dtsi Sat May 17 22:02:26 2014 (r266367) @@ -282,7 +282,13 @@ /* 50028000 0x4000 SPDIF */ /* 91 SPDIF */ - /* 50030000 0x4000 PATA (PORT UDMA) irq70 */ + pata@50030000 { + compatible = "fsl,imx53-ata"; + reg = <0x50030000 0x4000>; + interrupt-parent = <&tzic>; + interrupts = <70>; + status = "disabled"; + }; /* 50034000 0x4000 SLM */ /* 50038000 0x4000 HSI2C */ @@ -444,7 +450,7 @@ status = "disabled"; }; - /* 53FC0000 0x4000 UART 4 */ + /* 53FF0000 0x4000 UART 4 */ uart4: serial@53ff0000 { compatible = "fsl,imx53-uart", "fsl,imx-uart"; reg = <0x53ff0000 0x4000>; @@ -469,17 +475,16 @@ interrupts = <73 74>; status = "disabled"; }; - - /* 53FE8000 0x4000 PATA (PORT PIO) */ - /* 70 PATA Parallel ATA host controller interrupt */ - ide@53fe8000 { - compatible = "fsl,imx53-ata"; - reg = <0x83fe0000 0x4000>; + i2c@53fec000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl,imx53-i2c", "fsl,imx1-i2c", + "fsl,imx-i2c"; + reg = <0x53fec000 0x4000>; interrupt-parent = <&tzic>; - interrupts = <70>; + interrupts = <64>; status = "disabled"; }; - }; aips@60000000 { /* AIPS2 */ @@ -489,7 +494,7 @@ interrupt-parent = <&tzic>; ranges; - /* 53FC0000 0x4000 UART 5 */ + /* 63F90000 0x4000 UART 5 */ uart5: serial@63f90000 { compatible = "fsl,imx53-uart", "fsl,imx-uart"; reg = <0x63f90000 0x4000>; @@ -650,13 +655,20 @@ }; }; - localbus@18000000 { + localbus@10000000 { compatible = "simple-bus"; #address-cells = <1>; #size-cells = <1>; - ranges; + sata@10000000 { + compatible = "fsl,imx53-ata"; + reg = <0x10000000 0x4000>; + interrupt-parent = <&tzic>; + interrupts = <28>; + status = "disabled"; + }; + vga: ipu3@1E000000 { compatible = "fsl,ipu3"; reg = < From owner-svn-src-stable@FreeBSD.ORG Sat May 17 22:03:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF7D5DA0; Sat, 17 May 2014 22:03:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CCA662BA2; Sat, 17 May 2014 22:03:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HM3iAp034752; Sat, 17 May 2014 22:03:44 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HM3iwZ034751; Sat, 17 May 2014 22:03:44 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405172203.s4HM3iwZ034751@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 22:03:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266368 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 22:03:45 -0000 Author: ian Date: Sat May 17 22:03:44 2014 New Revision: 266368 URL: http://svnweb.freebsd.org/changeset/base/266368 Log: MFC 264694: Fix a comment typo; conversion tables are for leap years. Modified: stable/10/sys/kern/subr_fattime.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/subr_fattime.c ============================================================================== --- stable/10/sys/kern/subr_fattime.c Sat May 17 22:02:26 2014 (r266367) +++ stable/10/sys/kern/subr_fattime.c Sat May 17 22:03:44 2014 (r266368) @@ -51,7 +51,7 @@ * The 'utc' argument determines if the resulting FATTIME timestamp * should be on the UTC or local timezone calendar. * - * The conversion functions below cut time into four-year leap-second + * The conversion functions below cut time into four-year leap-year * cycles rather than single years and uses table lookups inside those * cycles to get the months and years sorted out. * From owner-svn-src-stable@FreeBSD.ORG Sat May 17 22:05:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3BD88EDD; Sat, 17 May 2014 22:05:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2942B2BAB; Sat, 17 May 2014 22:05:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HM5WWI035110; Sat, 17 May 2014 22:05:32 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HM5WTL035108; Sat, 17 May 2014 22:05:32 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405172205.s4HM5WTL035108@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 22:05:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266369 - stable/10/sys/arm/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 22:05:32 -0000 Author: ian Date: Sat May 17 22:05:31 2014 New Revision: 266369 URL: http://svnweb.freebsd.org/changeset/base/266369 Log: MFC 264702: Remove uncessary armv6 cache and TLB maintenance ops. Modified: stable/10/sys/arm/arm/pmap-v6.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/pmap-v6.c ============================================================================== --- stable/10/sys/arm/arm/pmap-v6.c Sat May 17 22:03:44 2014 (r266368) +++ stable/10/sys/arm/arm/pmap-v6.c Sat May 17 22:05:31 2014 (r266369) @@ -1988,8 +1988,6 @@ pmap_release(pmap_t pmap) { struct pcb *pcb; - cpu_idcache_wbinv_all(); - cpu_l2cache_wbinv_all(); cpu_tlb_flushID(); cpu_cpwait(); if (vector_page < KERNBASE) { @@ -2175,14 +2173,6 @@ pmap_growkernel(vm_offset_t addr) for (; pmap_curmaxkvaddr < addr; pmap_curmaxkvaddr += L1_S_SIZE) pmap_grow_l2_bucket(kpmap, pmap_curmaxkvaddr); - /* - * flush out the cache, expensive but growkernel will happen so - * rarely - */ - cpu_dcache_wbinv_all(); - cpu_l2cache_wbinv_all(); - cpu_tlb_flushD(); - cpu_cpwait(); kernel_vm_end = pmap_curmaxkvaddr; } From owner-svn-src-stable@FreeBSD.ORG Sat May 17 22:19:19 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E88C323A; Sat, 17 May 2014 22:19:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B992F2C89; Sat, 17 May 2014 22:19:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HMJIcw041974; Sat, 17 May 2014 22:19:18 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HMJHAu041966; Sat, 17 May 2014 22:19:17 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405172219.s4HMJHAu041966@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 22:19:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266370 - stable/10/lib/libc/arm/gen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 22:19:19 -0000 Author: ian Date: Sat May 17 22:19:16 2014 New Revision: 266370 URL: http://svnweb.freebsd.org/changeset/base/266370 Log: MFC 264696, 264721, Add the deprecated fp{get,set}* functions, a few ports use them. Rename the fp{get,set}* files so they no longer conflict with the softfloat version of these files. Added: stable/10/lib/libc/arm/gen/fpgetmask_vfp.c - copied unchanged from r264721, head/lib/libc/arm/gen/fpgetmask_vfp.c stable/10/lib/libc/arm/gen/fpgetround_vfp.c - copied unchanged from r264721, head/lib/libc/arm/gen/fpgetround_vfp.c stable/10/lib/libc/arm/gen/fpgetsticky_vfp.c - copied unchanged from r264721, head/lib/libc/arm/gen/fpgetsticky_vfp.c stable/10/lib/libc/arm/gen/fpsetmask_vfp.c - copied unchanged from r264721, head/lib/libc/arm/gen/fpsetmask_vfp.c stable/10/lib/libc/arm/gen/fpsetround_vfp.c - copied unchanged from r264721, head/lib/libc/arm/gen/fpsetround_vfp.c stable/10/lib/libc/arm/gen/fpsetsticky_vfp.c - copied unchanged from r264721, head/lib/libc/arm/gen/fpsetsticky_vfp.c Modified: stable/10/lib/libc/arm/gen/Makefile.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/arm/gen/Makefile.inc ============================================================================== --- stable/10/lib/libc/arm/gen/Makefile.inc Sat May 17 22:05:31 2014 (r266369) +++ stable/10/lib/libc/arm/gen/Makefile.inc Sat May 17 22:19:16 2014 (r266370) @@ -9,3 +9,8 @@ SRCS+= _ctx_start.S _setjmp.S _set_tp.c .if ${MK_ARM_EABI} == "no" SRCS+= divsi3.S .endif + +.if ${MACHINE_ARCH} == "armv6hf" +SRCS+= fpgetmask_vfp.c fpgetround_vfp.c fpgetsticky_vfp.c fpsetmask_vfp.c \ + fpsetround_vfp.c fpsetsticky_vfp.c +.endif Copied: stable/10/lib/libc/arm/gen/fpgetmask_vfp.c (from r264721, head/lib/libc/arm/gen/fpgetmask_vfp.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/arm/gen/fpgetmask_vfp.c Sat May 17 22:19:16 2014 (r266370, copy of r264721, head/lib/libc/arm/gen/fpgetmask_vfp.c) @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2014 Andrew Turner + * All rights reserved. + * + * 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. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#ifdef __weak_alias +__weak_alias(fpgetmask,_fpgetmask) +#endif + +#define FP_X_MASK (FP_X_INV | FP_X_DZ | FP_X_OFL | FP_X_UFL | FP_X_IMP) + +fp_except_t +fpgetmask(void) +{ + fp_except mask; + + __asm __volatile("vmrs %0, fpscr" : "=&r"(mask)); + + return ((mask >> 8) & FP_X_MASK); +} + Copied: stable/10/lib/libc/arm/gen/fpgetround_vfp.c (from r264721, head/lib/libc/arm/gen/fpgetround_vfp.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/arm/gen/fpgetround_vfp.c Sat May 17 22:19:16 2014 (r266370, copy of r264721, head/lib/libc/arm/gen/fpgetround_vfp.c) @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2014 Andrew Turner + * All rights reserved. + * + * 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. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#ifdef __weak_alias +__weak_alias(fpgetround,_fpgetround) +#endif + +fp_rnd_t +fpgetround(void) +{ + uint32_t fpscr; + + __asm __volatile("vmrs %0, fpscr" : "=&r"(fpscr)); + + return ((fpscr >> 22) & 3); +} + Copied: stable/10/lib/libc/arm/gen/fpgetsticky_vfp.c (from r264721, head/lib/libc/arm/gen/fpgetsticky_vfp.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/arm/gen/fpgetsticky_vfp.c Sat May 17 22:19:16 2014 (r266370, copy of r264721, head/lib/libc/arm/gen/fpgetsticky_vfp.c) @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2014 Andrew Turner + * All rights reserved. + * + * 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. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#ifdef __weak_alias +__weak_alias(fpgetsticky,_fpgetsticky) +#endif + +#define FP_X_MASK (FP_X_INV | FP_X_DZ | FP_X_OFL | FP_X_UFL | FP_X_IMP) + +fp_except +fpgetsticky(void) +{ + fp_except old; + + __asm __volatile("vmrs %0, fpscr" : "=&r"(old)); + + return (old & FP_X_MASK); +} + Copied: stable/10/lib/libc/arm/gen/fpsetmask_vfp.c (from r264721, head/lib/libc/arm/gen/fpsetmask_vfp.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/arm/gen/fpsetmask_vfp.c Sat May 17 22:19:16 2014 (r266370, copy of r264721, head/lib/libc/arm/gen/fpsetmask_vfp.c) @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2014 Andrew Turner + * All rights reserved. + * + * 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. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#ifdef __weak_alias +__weak_alias(fpsetmask,_fpsetmask) +#endif + +#define FP_X_MASK (FP_X_INV | FP_X_DZ | FP_X_OFL | FP_X_UFL | FP_X_IMP) + +fp_except_t +fpsetmask(fp_except_t mask) +{ + fp_except old, new; + + __asm __volatile("vmrs %0, fpscr" : "=&r"(old)); + mask = (mask & FP_X_MASK) << 8; + new = (old & ~(FP_X_MASK << 8)) | mask; + __asm __volatile("vmsr fpscr, %0" : : "r"(old)); + + return ((old >> 8) & FP_X_MASK); +} + Copied: stable/10/lib/libc/arm/gen/fpsetround_vfp.c (from r264721, head/lib/libc/arm/gen/fpsetround_vfp.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/arm/gen/fpsetround_vfp.c Sat May 17 22:19:16 2014 (r266370, copy of r264721, head/lib/libc/arm/gen/fpsetround_vfp.c) @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2014 Andrew Turner + * All rights reserved. + * + * 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. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#ifdef __weak_alias +__weak_alias(fpsetround,_fpsetround) +#endif + +fp_rnd_t +fpsetround(fp_rnd_t rnd_dir) +{ + uint32_t old, new; + + __asm __volatile("vmrs %0, fpscr" : "=&r"(old)); + new = old & ~(3 << 22); + new |= rnd_dir << 22; + __asm __volatile("vmsr fpscr, %0" : : "r"(new)); + + return ((old >> 22) & 3); +} + Copied: stable/10/lib/libc/arm/gen/fpsetsticky_vfp.c (from r264721, head/lib/libc/arm/gen/fpsetsticky_vfp.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/arm/gen/fpsetsticky_vfp.c Sat May 17 22:19:16 2014 (r266370, copy of r264721, head/lib/libc/arm/gen/fpsetsticky_vfp.c) @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2014 Andrew Turner + * All rights reserved. + * + * 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. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#ifdef __weak_alias +__weak_alias(fpsetsticky,_fpsetsticky) +#endif + +#define FP_X_MASK (FP_X_INV | FP_X_DZ | FP_X_OFL | FP_X_UFL | FP_X_IMP) + +fp_except +fpsetsticky(fp_except except) +{ + fp_except old, new; + + __asm __volatile("vmrs %0, fpscr" : "=&r"(old)); + new = old & ~(FP_X_MASK); + new &= ~except; + __asm __volatile("vmsr fpscr, %0" : : "r"(new)); + + return (old & except); +} + From owner-svn-src-stable@FreeBSD.ORG Sat May 17 22:29:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C873693; Sat, 17 May 2014 22:29:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D6E82D82; Sat, 17 May 2014 22:29:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HMTQtE047947; Sat, 17 May 2014 22:29:26 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HMTOfc047935; Sat, 17 May 2014 22:29:24 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405172229.s4HMTOfc047935@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 22:29:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266371 - in stable/10/sys: arm/freescale/imx dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 22:29:26 -0000 Author: ian Date: Sat May 17 22:29:24 2014 New Revision: 266371 URL: http://svnweb.freebsd.org/changeset/base/266371 Log: MFC 264977: Stop calling imx51_ccm_foo() clock functions from imx6 code. Instead define a few imx_ccm_foo() functions that are implemented by the imx51 or imx6 ccm code. Added: stable/10/sys/arm/freescale/imx/imx_ccmvar.h - copied unchanged from r264977, head/sys/arm/freescale/imx/imx_ccmvar.h Modified: stable/10/sys/arm/freescale/imx/imx51_ccm.c stable/10/sys/arm/freescale/imx/imx6_ccm.c stable/10/sys/arm/freescale/imx/imx6_usbphy.c stable/10/sys/arm/freescale/imx/imx_gpt.c stable/10/sys/arm/freescale/imx/imx_machdep.h stable/10/sys/arm/freescale/imx/imx_nop_usbphy.c stable/10/sys/arm/freescale/imx/imx_sdhci.c stable/10/sys/dev/usb/controller/ehci_imx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/freescale/imx/imx51_ccm.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx51_ccm.c Sat May 17 22:19:16 2014 (r266370) +++ stable/10/sys/arm/freescale/imx/imx51_ccm.c Sat May 17 22:29:24 2014 (r266371) @@ -83,6 +83,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #define IMXCCMDEBUG @@ -552,3 +553,30 @@ imx_ccm_usbphy_enable(device_t dev) } } +uint32_t +imx_ccm_ipg_hz(void) +{ + + return (imx51_get_clock(IMX51CLK_IPG_CLK_ROOT)); +} + +uint32_t +imx_ccm_sdhci_hz(void) +{ + + return (imx51_get_clock(IMX51CLK_ESDHC1_CLK_ROOT)); +} + +uint32_t +imx_ccm_perclk_hz(void) +{ + + return (imx51_get_clock(IMX51CLK_PERCLK_ROOT)); +} + +uint32_t +imx_ccm_uart_hz(void) +{ + + return (imx51_get_clock(IMX51CLK_UART_CLK_ROOT)); +} Modified: stable/10/sys/arm/freescale/imx/imx6_ccm.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx6_ccm.c Sat May 17 22:19:16 2014 (r266370) +++ stable/10/sys/arm/freescale/imx/imx6_ccm.c Sat May 17 22:29:24 2014 (r266371) @@ -45,13 +45,15 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include +#include +#include - -/* XXX temp kludge for imx51_get_clock. */ -#include -#include +#ifndef CCGR_CLK_MODE_ALWAYS +#define CCGR_CLK_MODE_OFF 0 +#define CCGR_CLK_MODE_RUNMODE 1 +#define CCGR_CLK_MODE_ALWAYS 3 +#endif struct ccm_softc { device_t dev; @@ -208,24 +210,32 @@ imx_ccm_usbphy_enable(device_t _phydev) #endif } +uint32_t +imx_ccm_ipg_hz(void) +{ + return (66000000); +} +uint32_t +imx_ccm_perclk_hz(void) +{ + return (66000000); +} -// XXX Fix this. This has to be here for other code to link, -// but it doesn't have to return anything useful for imx6 right now. -u_int -imx51_get_clock(enum imx51_clock clk) -{ - switch (clk) - { - case IMX51CLK_IPG_CLK_ROOT: - return 66000000; - default: - printf("imx51_get_clock() on imx6 doesn't know about clock %d\n", clk); - break; - } - return 0; +uint32_t +imx_ccm_sdhci_hz(void) +{ + + return (200000000); +} + +uint32_t +imx_ccm_uart_hz(void) +{ + + return (80000000); } static device_method_t ccm_methods[] = { Modified: stable/10/sys/arm/freescale/imx/imx6_usbphy.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx6_usbphy.c Sat May 17 22:19:16 2014 (r266370) +++ stable/10/sys/arm/freescale/imx/imx6_usbphy.c Sat May 17 22:29:24 2014 (r266371) @@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$"); #include -#include +#include #include #include Copied: stable/10/sys/arm/freescale/imx/imx_ccmvar.h (from r264977, head/sys/arm/freescale/imx/imx_ccmvar.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/freescale/imx/imx_ccmvar.h Sat May 17 22:29:24 2014 (r266371, copy of r264977, head/sys/arm/freescale/imx/imx_ccmvar.h) @@ -0,0 +1,54 @@ +/*- + * Copyright (c) 2014 Ian Lepore + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +#ifndef IMX_CCMVAR_H +#define IMX_CCMVAR_H + +/* + * We need a clock management system that works across unrelated SoCs and + * devices. For now, to keep imx development moving, define some barebones + * functionality that can be shared within the imx family by having each SoC + * implement functions with a common name. + * + * The usb enable functions are best-effort. They turn on the usb otg, host, + * and phy clocks in a SoC-specific manner, but it may take a lot more than that + * to make usb work on a given board. In particular, it can require specific + * pinmux setup of gpio pins connected to external phy parts, voltage regulators + * and overcurrent detectors, and so on. On such boards, u-boot or other early + * board setup code has to handle those things. + */ + +uint32_t imx_ccm_ipg_hz(void); +uint32_t imx_ccm_perclk_hz(void); +uint32_t imx_ccm_sdhci_hz(void); +uint32_t imx_ccm_uart_hz(void); + +void imx_ccm_usb_enable(device_t _usbdev); +void imx_ccm_usbphy_enable(device_t _phydev); + +#endif Modified: stable/10/sys/arm/freescale/imx/imx_gpt.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx_gpt.c Sat May 17 22:19:16 2014 (r266370) +++ stable/10/sys/arm/freescale/imx/imx_gpt.c Sat May 17 22:29:24 2014 (r266371) @@ -54,7 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #define WRITE4(_sc, _r, _v) \ bus_space_write_4((_sc)->sc_iot, (_sc)->sc_ioh, (_r), (_v)) @@ -164,10 +164,10 @@ imx_gpt_attach(device_t dev) basefreq = 32768; break; case GPT_CR_CLKSRC_IPG: - basefreq = imx51_get_clock(IMX51CLK_IPG_CLK_ROOT); + basefreq = imx_ccm_ipg_hz(); break; case GPT_CR_CLKSRC_IPG_HIGH: - basefreq = imx51_get_clock(IMX51CLK_IPG_CLK_ROOT) * 2; + basefreq = imx_ccm_ipg_hz() * 2; break; case GPT_CR_CLKSRC_24M: ctlreg |= GPT_CR_24MEN; Modified: stable/10/sys/arm/freescale/imx/imx_machdep.h ============================================================================== --- stable/10/sys/arm/freescale/imx/imx_machdep.h Sat May 17 22:19:16 2014 (r266370) +++ stable/10/sys/arm/freescale/imx/imx_machdep.h Sat May 17 22:29:24 2014 (r266371) @@ -56,21 +56,5 @@ void imx_wdog_cpu_reset(vm_offset_t _wdc u_int imx_soc_type(void); u_int imx_soc_family(void); -/* - * We need a clock management system that works across unrelated SoCs and - * devices. For now, to keep imx development moving, define some barebones - * functionality that can be shared within the imx family by having each SoC - * implement functions with a common name. - * - * The usb enable functions are best-effort. They turn on the usb otg, host, - * and phy clocks in a SoC-specific manner, but it may take a lot more than that - * to make usb work on a given board. In particular, it can require specific - * pinmux setup of gpio pins connected to external phy parts, voltage regulators - * and overcurrent detectors, and so on. On such boards, u-boot or other early - * board setup code has to handle those things. - */ -void imx_ccm_usb_enable(device_t _usbdev); -void imx_ccm_usbphy_enable(device_t _phydev); - #endif Modified: stable/10/sys/arm/freescale/imx/imx_nop_usbphy.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx_nop_usbphy.c Sat May 17 22:19:16 2014 (r266370) +++ stable/10/sys/arm/freescale/imx/imx_nop_usbphy.c Sat May 17 22:29:24 2014 (r266371) @@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$"); #include -#include +#include /* * Table of supported FDT compat strings. Modified: stable/10/sys/arm/freescale/imx/imx_sdhci.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx_sdhci.c Sat May 17 22:19:16 2014 (r266370) +++ stable/10/sys/arm/freescale/imx/imx_sdhci.c Sat May 17 22:29:24 2014 (r266371) @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include #include @@ -723,12 +723,7 @@ imx_sdhci_attach(device_t dev) */ WR4(sc, SDHC_WTMK_LVL, 0x08800880); - /* XXX get imx6 clock frequency from CCM */ - if (sc->hwtype == HWTYPE_USDHC) { - sc->baseclk_hz = 200000000; - } else if (sc->hwtype == HWTYPE_ESDHC) { - sc->baseclk_hz = imx51_get_clock(IMX51CLK_PERCLK_ROOT); - } + sc->baseclk_hz = imx_ccm_sdhci_hz(); /* * If the slot is flagged with the non-removable property, set our flag Modified: stable/10/sys/dev/usb/controller/ehci_imx.c ============================================================================== --- stable/10/sys/dev/usb/controller/ehci_imx.c Sat May 17 22:19:16 2014 (r266370) +++ stable/10/sys/dev/usb/controller/ehci_imx.c Sat May 17 22:29:24 2014 (r266371) @@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include "opt_platform.h" From owner-svn-src-stable@FreeBSD.ORG Sat May 17 22:31:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0FE4C7C7; Sat, 17 May 2014 22:31:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E50CA2D8D; Sat, 17 May 2014 22:31:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HMVeB3052971; Sat, 17 May 2014 22:31:40 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HMVecR052969; Sat, 17 May 2014 22:31:40 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405172231.s4HMVecR052969@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 22:31:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266372 - stable/10/sys/dev/uart X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 22:31:41 -0000 Author: ian Date: Sat May 17 22:31:40 2014 New Revision: 266372 URL: http://svnweb.freebsd.org/changeset/base/266372 Log: MFC 264981, 264983, 264985: The freescale imx uart driver works for the whole i.MX family, so rename the header file to not have "5xx" in the name. Flesh out imx_uart_init() so that we're not relying on u-boot to init the hardware (meaning uarts other than the console will work). Reword a comment block a bit. Added: stable/10/sys/dev/uart/uart_dev_imx.h - copied unchanged from r264981, head/sys/dev/uart/uart_dev_imx.h Deleted: stable/10/sys/dev/uart/uart_dev_imx5xx.h Modified: stable/10/sys/dev/uart/uart_dev_imx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/uart/uart_dev_imx.c ============================================================================== --- stable/10/sys/dev/uart/uart_dev_imx.c Sat May 17 22:29:24 2014 (r266371) +++ stable/10/sys/dev/uart/uart_dev_imx.c Sat May 17 22:31:40 2014 (r266372) @@ -43,10 +43,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include "uart_if.h" -#include +#include -#include "uart_if.h" /* * Low-level UART interface. */ @@ -66,6 +67,22 @@ static struct uart_ops uart_imx_uart_ops .getc = imx_uart_getc, }; +#if 0 /* Handy when debugging. */ +static void +dumpregs(struct uart_bas *bas, const char * msg) +{ + + if (!bootverbose) + return; + printf("%s bsh 0x%08lx UCR1 0x%08x UCR2 0x%08x " + "UCR3 0x%08x UCR4 0x%08x USR1 0x%08x USR2 0x%08x\n", + msg, bas->bsh, + GETREG(bas, REG(UCR1)), GETREG(bas, REG(UCR2)), + GETREG(bas, REG(UCR3)), GETREG(bas, REG(UCR4)), + GETREG(bas, REG(USR1)), GETREG(bas, REG(USR2))); +} +#endif + static int imx_uart_probe(struct uart_bas *bas) { @@ -77,7 +94,60 @@ static void imx_uart_init(struct uart_bas *bas, int baudrate, int databits, int stopbits, int parity) { + uint32_t baseclk, reg; + /* Enable the device and the RX/TX channels. */ + SET(bas, REG(UCR1), FLD(UCR1, UARTEN)); + SET(bas, REG(UCR2), FLD(UCR2, RXEN) | FLD(UCR2, TXEN)); + + if (databits == 7) + DIS(bas, UCR2, WS); + else + ENA(bas, UCR2, WS); + + if (stopbits == 2) + ENA(bas, UCR2, STPB); + else + DIS(bas, UCR2, STPB); + + switch (parity) { + case UART_PARITY_ODD: + DIS(bas, UCR2, PROE); + ENA(bas, UCR2, PREN); + break; + case UART_PARITY_EVEN: + ENA(bas, UCR2, PROE); + ENA(bas, UCR2, PREN); + break; + case UART_PARITY_MARK: + case UART_PARITY_SPACE: + /* FALLTHROUGH: Hardware doesn't support mark/space. */ + case UART_PARITY_NONE: + default: + DIS(bas, UCR2, PREN); + break; + } + + /* + * The hardware has an extremely flexible baud clock: it allows setting + * both the numerator and denominator of the divider, as well as a + * separate pre-divider. We simplify the problem of coming up with a + * workable pair of numbers by assuming a pre-divider and numerator of + * one because our base clock is so fast we can reach virtually any + * reasonable speed with a simple divisor. The numerator value actually + * includes the 16x over-sampling (so a value of 16 means divide by 1); + * the register value is the numerator-1, so we have a hard-coded 15. + * Note that a quirk of the hardware requires that both UBIR and UBMR be + * set back to back in order for the change to take effect. + */ + if (baudrate > 0) { + baseclk = imx_ccm_uart_hz(); + reg = GETREG(bas, REG(UFCR)); + reg = (reg & ~IMXUART_UFCR_RFDIV_MASK) | IMXUART_UFCR_RFDIV_DIV1; + SETREG(bas, REG(UFCR), reg); + SETREG(bas, REG(UBIR), 15); + SETREG(bas, REG(UBMR), (baseclk / baudrate) - 1); + } } static void @@ -218,6 +288,8 @@ imx_uart_bus_attach(struct uart_softc *s DIS(bas, UCR3, RI); DIS(bas, UCR3, DCD); DIS(bas, UCR3, DTRDEN); + ENA(bas, UCR2, IRTS); + ENA(bas, UCR3, RXDMUXSEL); /* ACK all interrupts */ SETREG(bas, REG(USR1), 0xffff); Copied: stable/10/sys/dev/uart/uart_dev_imx.h (from r264981, head/sys/dev/uart/uart_dev_imx.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/uart/uart_dev_imx.h Sat May 17 22:31:40 2014 (r266372, copy of r264981, head/sys/dev/uart/uart_dev_imx.h) @@ -0,0 +1,222 @@ +/*- + * Copyright (c) 2012 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Oleksandr Rybalko under sponsorship + * from the FreeBSD Foundation. + * + * 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. + * + * $FreeBSD$ + */ + +#ifndef _UART_DEV_IMX5XX_H +#define _UART_DEV_IMX5XX_H + +#define IMXUART_URXD_REG 0x0000 /* UART Receiver Register */ +#define IMXUART_URXD_CHARRDY (1 << 15) +#define IMXUART_URXD_ERR (1 << 14) +#define IMXUART_URXD_OVRRUN (1 << 13) +#define IMXUART_URXD_FRMERR (1 << 12) +#define IMXUART_URXD_BRK (1 << 11) +#define IMXUART_URXD_PRERR (1 << 10) +#define IMXUART_URXD_RX_DATA_MASK 0xff + +#define IMXUART_UTXD_REG 0x0040 /* UART Transmitter Register */ +#define IMXUART_UTXD_TX_DATA_MASK 0xff + +#define IMXUART_UCR1_REG 0x0080 /* UART Control Register 1 */ +#define IMXUART_UCR1_ADEN (1 << 15) +#define IMXUART_UCR1_ADBR (1 << 14) +#define IMXUART_UCR1_TRDYEN (1 << 13) +#define IMXUART_UCR1_IDEN (1 << 12) +#define IMXUART_UCR1_ICD_MASK (3 << 10) +#define IMXUART_UCR1_ICD_IDLE4 (0 << 10) +#define IMXUART_UCR1_ICD_IDLE8 (1 << 10) +#define IMXUART_UCR1_ICD_IDLE16 (2 << 10) +#define IMXUART_UCR1_ICD_IDLE32 (3 << 10) +#define IMXUART_UCR1_RRDYEN (1 << 9) +#define IMXUART_UCR1_RXDMAEN (1 << 8) +#define IMXUART_UCR1_IREN (1 << 7) +#define IMXUART_UCR1_TXMPTYEN (1 << 6) +#define IMXUART_UCR1_RTSDEN (1 << 5) +#define IMXUART_UCR1_SNDBRK (1 << 4) +#define IMXUART_UCR1_TXDMAEN (1 << 3) +#define IMXUART_UCR1_ATDMAEN (1 << 2) +#define IMXUART_UCR1_DOZE (1 << 1) +#define IMXUART_UCR1_UARTEN (1 << 0) + +#define IMXUART_UCR2_REG 0x0084 /* UART Control Register 2 */ +#define IMXUART_UCR2_ESCI (1 << 15) +#define IMXUART_UCR2_IRTS (1 << 14) +#define IMXUART_UCR2_CTSC (1 << 13) +#define IMXUART_UCR2_CTS (1 << 12) +#define IMXUART_UCR2_ESCEN (1 << 11) +#define IMXUART_UCR2_RTEC_MASK (3 << 9) +#define IMXUART_UCR2_RTEC_REDGE (0 << 9) +#define IMXUART_UCR2_RTEC_FEDGE (1 << 9) +#define IMXUART_UCR2_RTEC_EDGE (2 << 9) +#define IMXUART_UCR2_PREN (1 << 8) +#define IMXUART_UCR2_PROE (1 << 7) +#define IMXUART_UCR2_STPB (1 << 6) +#define IMXUART_UCR2_WS (1 << 5) +#define IMXUART_UCR2_RTSEN (1 << 4) +#define IMXUART_UCR2_ATEN (1 << 3) +#define IMXUART_UCR2_TXEN (1 << 2) +#define IMXUART_UCR2_RXEN (1 << 1) +#define IMXUART_UCR2_N_SRST (1 << 0) + +#define IMXUART_UCR3_REG 0x0088 /* UART Control Register 3 */ +#define IMXUART_UCR3_DPEC_MASK (3 << 14) +#define IMXUART_UCR3_DPEC_REDGE (0 << 14) +#define IMXUART_UCR3_DPEC_FEDGE (1 << 14) +#define IMXUART_UCR3_DPEC_EDGE (2 << 14) +#define IMXUART_UCR3_DTREN (1 << 13) +#define IMXUART_UCR3_PARERREN (1 << 12) +#define IMXUART_UCR3_FRAERREN (1 << 11) +#define IMXUART_UCR3_DSR (1 << 10) +#define IMXUART_UCR3_DCD (1 << 9) +#define IMXUART_UCR3_RI (1 << 8) +#define IMXUART_UCR3_ADNIMP (1 << 7) +#define IMXUART_UCR3_RXDSEN (1 << 6) +#define IMXUART_UCR3_AIRINTEN (1 << 5) +#define IMXUART_UCR3_AWAKEN (1 << 4) +#define IMXUART_UCR3_DTRDEN (1 << 3) +#define IMXUART_UCR3_RXDMUXSEL (1 << 2) +#define IMXUART_UCR3_INVT (1 << 1) +#define IMXUART_UCR3_ACIEN (1 << 0) + +#define IMXUART_UCR4_REG 0x008c /* UART Control Register 4 */ +#define IMXUART_UCR4_CTSTL_MASK (0x3f << 10) +#define IMXUART_UCR4_CTSTL_SHIFT 10 +#define IMXUART_UCR4_INVR (1 << 9) +#define IMXUART_UCR4_ENIRI (1 << 8) +#define IMXUART_UCR4_WKEN (1 << 7) +#define IMXUART_UCR4_IDDMAEN (1 << 6) +#define IMXUART_UCR4_IRSC (1 << 5) +#define IMXUART_UCR4_LPBYP (1 << 4) +#define IMXUART_UCR4_TCEN (1 << 3) +#define IMXUART_UCR4_BKEN (1 << 2) +#define IMXUART_UCR4_OREN (1 << 1) +#define IMXUART_UCR4_DREN (1 << 0) + +#define IMXUART_UFCR_REG 0x0090 /* UART FIFO Control Register */ +#define IMXUART_UFCR_TXTL_MASK (0x3f << 10) +#define IMXUART_UFCR_TXTL_SHIFT 10 +#define IMXUART_UFCR_RFDIV_MASK (0x07 << 7) +#define IMXUART_UFCR_RFDIV_SHIFT 7 +#define IMXUART_UFCR_RFDIV_SHIFT 7 +#define IMXUART_UFCR_RFDIV_DIV6 (0 << 7) +#define IMXUART_UFCR_RFDIV_DIV5 (1 << 7) +#define IMXUART_UFCR_RFDIV_DIV4 (2 << 7) +#define IMXUART_UFCR_RFDIV_DIV3 (3 << 7) +#define IMXUART_UFCR_RFDIV_DIV2 (4 << 7) +#define IMXUART_UFCR_RFDIV_DIV1 (5 << 7) +#define IMXUART_UFCR_RFDIV_DIV7 (6 << 7) +#define IMXUART_UFCR_DCEDTE (1 << 6) +#define IMXUART_UFCR_RXTL_MASK 0x0000003f +#define IMXUART_UFCR_RXTL_SHIFT 0 + +#define IMXUART_USR1_REG 0x0094 /* UART Status Register 1 */ +#define IMXUART_USR1_PARITYERR (1 << 15) +#define IMXUART_USR1_RTSS (1 << 14) +#define IMXUART_USR1_TRDY (1 << 13) +#define IMXUART_USR1_RTSD (1 << 12) +#define IMXUART_USR1_ESCF (1 << 11) +#define IMXUART_USR1_FRAMERR (1 << 10) +#define IMXUART_USR1_RRDY (1 << 9) +#define IMXUART_USR1_AGTIM (1 << 8) +#define IMXUART_USR1_DTRD (1 << 7) +#define IMXUART_USR1_RXDS (1 << 6) +#define IMXUART_USR1_AIRINT (1 << 5) +#define IMXUART_USR1_AWAKE (1 << 4) +/* 6040 5008 XXX */ + +#define IMXUART_USR2_REG 0x0098 /* UART Status Register 2 */ +#define IMXUART_USR2_ADET (1 << 15) +#define IMXUART_USR2_TXFE (1 << 14) +#define IMXUART_USR2_DTRF (1 << 13) +#define IMXUART_USR2_IDLE (1 << 12) +#define IMXUART_USR2_ACST (1 << 11) +#define IMXUART_USR2_RIDELT (1 << 10) +#define IMXUART_USR2_RIIN (1 << 9) +#define IMXUART_USR2_IRINT (1 << 8) +#define IMXUART_USR2_WAKE (1 << 7) +#define IMXUART_USR2_DCDDELT (1 << 6) +#define IMXUART_USR2_DCDIN (1 << 5) +#define IMXUART_USR2_RTSF (1 << 4) +#define IMXUART_USR2_TXDC (1 << 3) +#define IMXUART_USR2_BRCD (1 << 2) +#define IMXUART_USR2_ORE (1 << 1) +#define IMXUART_USR2_RDR (1 << 0) + +#define IMXUART_UESC_REG 0x009c /* UART Escape Character Register */ +#define IMXUART_UESC_ESC_CHAR_MASK 0x000000ff + +#define IMXUART_UTIM_REG 0x00a0 /* UART Escape Timer Register */ +#define IMXUART_UTIM_TIM_MASK 0x00000fff + +#define IMXUART_UBIR_REG 0x00a4 /* UART BRM Incremental Register */ +#define IMXUART_UBIR_INC_MASK 0x0000ffff + +#define IMXUART_UBMR_REG 0x00a8 /* UART BRM Modulator Register */ +#define IMXUART_UBMR_MOD_MASK 0x0000ffff + +#define IMXUART_UBRC_REG 0x00ac /* UART Baud Rate Count Register */ +#define IMXUART_UBRC_BCNT_MASK 0x0000ffff + +#define IMXUART_ONEMS_REG 0x00b0 /* UART One Millisecond Register */ +#define IMXUART_ONEMS_ONEMS_MASK 0x00ffffff + +#define IMXUART_UTS_REG 0x00b4 /* UART Test Register */ +#define IMXUART_UTS_FRCPERR (1 << 13) +#define IMXUART_UTS_LOOP (1 << 12) +#define IMXUART_UTS_DBGEN (1 << 11) +#define IMXUART_UTS_LOOPIR (1 << 10) +#define IMXUART_UTS_RXDBG (1 << 9) +#define IMXUART_UTS_TXEMPTY (1 << 6) +#define IMXUART_UTS_RXEMPTY (1 << 5) +#define IMXUART_UTS_TXFULL (1 << 4) +#define IMXUART_UTS_RXFULL (1 << 3) +#define IMXUART_UTS_SOFTRST (1 << 0) + +#define REG(_r) IMXUART_ ## _r ## _REG +#define FLD(_r, _v) IMXUART_ ## _r ## _ ## _v + +#define GETREG(bas, reg) \ + bus_space_read_4((bas)->bst, (bas)->bsh, (reg)) +#define SETREG(bas, reg, value) \ + bus_space_write_4((bas)->bst, (bas)->bsh, (reg), (value)) + +#define CLR(_bas, _r, _b) \ + SETREG((_bas), (_r), GETREG((_bas), (_r)) & ~(_b)) +#define SET(_bas, _r, _b) \ + SETREG((_bas), (_r), GETREG((_bas), (_r)) | (_b)) +#define IS_SET(_bas, _r, _b) \ + ((GETREG((_bas), (_r)) & (_b)) ? 1 : 0) + +#define ENA(_bas, _r, _b) SET((_bas), REG(_r), FLD(_r, _b)) +#define DIS(_bas, _r, _b) CLR((_bas), REG(_r), FLD(_r, _b)) +#define IS(_bas, _r, _b) IS_SET((_bas), REG(_r), FLD(_r, _b)) + + +#endif /* _UART_DEV_IMX5XX_H */ From owner-svn-src-stable@FreeBSD.ORG Sat May 17 22:50:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E19B3B14; Sat, 17 May 2014 22:50:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C25832F4A; Sat, 17 May 2014 22:50:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HMoHNq060050; Sat, 17 May 2014 22:50:17 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HMoGKq060042; Sat, 17 May 2014 22:50:16 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405172250.s4HMoGKq060042@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 22:50:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266373 - in stable/10/sys/arm: arm include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 22:50:18 -0000 Author: ian Date: Sat May 17 22:50:16 2014 New Revision: 266373 URL: http://svnweb.freebsd.org/changeset/base/266373 Log: MFC 264990, 264994, 265020, 265025: Call cpu_icache_sync_range() rather than sync_all since we know the range and flushing the entire icache is needlessly expensive. Provide a proper armv7 implementation of icache_sync_all rather than using armv7_idcache_wbinv_all, because wbinv_all doesn't broadcast the operation to other cores. In elf_cpu_load_file() use icache_sync_all() and explain why it's needed (and why other sync operations aren't). Remove cpu_idcache_wbinv_all() from kdb_cpu_trap(), it's no longer needed. Explain why wbinv_all is SMP-safe when dumping, and add a missing l2 cache flush. (Either it was missing here, or it isn't needed in the minidump case. Adding it here seems like the safer path to consistancy.) Modified: stable/10/sys/arm/arm/cpufunc.c stable/10/sys/arm/arm/cpufunc_asm_armv7.S stable/10/sys/arm/arm/dump_machdep.c stable/10/sys/arm/arm/elf_machdep.c stable/10/sys/arm/include/cpufunc.h stable/10/sys/arm/include/kdb.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/cpufunc.c ============================================================================== --- stable/10/sys/arm/arm/cpufunc.c Sat May 17 22:31:40 2014 (r266372) +++ stable/10/sys/arm/arm/cpufunc.c Sat May 17 22:50:16 2014 (r266373) @@ -769,7 +769,7 @@ struct cpu_functions cortexa_cpufuncs = /* Cache operations */ - armv7_idcache_wbinv_all, /* icache_sync_all */ + armv7_icache_sync_all, /* icache_sync_all */ armv7_icache_sync_range, /* icache_sync_range */ armv7_dcache_wbinv_all, /* dcache_wbinv_all */ Modified: stable/10/sys/arm/arm/cpufunc_asm_armv7.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_armv7.S Sat May 17 22:31:40 2014 (r266372) +++ stable/10/sys/arm/arm/cpufunc_asm_armv7.S Sat May 17 22:50:16 2014 (r266373) @@ -250,6 +250,13 @@ ENTRY(armv7_idcache_wbinv_range) RET END(armv7_idcache_wbinv_range) +ENTRY_NP(armv7_icache_sync_all) + mcr p15, 0, r0, c7, c1, 0 /* Invalidate all I cache to PoU Inner Shareable */ + isb /* instruction synchronization barrier */ + dsb /* data synchronization barrier */ + RET +END(armv7_icache_sync_all) + ENTRY_NP(armv7_icache_sync_range) ldr ip, .Larmv7_line_size .Larmv7_sync_next: Modified: stable/10/sys/arm/arm/dump_machdep.c ============================================================================== --- stable/10/sys/arm/arm/dump_machdep.c Sat May 17 22:31:40 2014 (r266372) +++ stable/10/sys/arm/arm/dump_machdep.c Sat May 17 22:50:16 2014 (r266373) @@ -174,8 +174,14 @@ cb_dumpdata(struct md_pa *mdp, int seqnr printf(" chunk %d: %dMB (%d pages)", seqnr, pgs * PAGE_SIZE / ( 1024*1024), pgs); - /* Make sure we write coherent datas. */ + /* + * Make sure we write coherent data. Note that in the SMP case this + * only operates on the L1 cache of the current CPU, but all other CPUs + * have already been stopped, and their flush/invalidate was done as + * part of stopping. + */ cpu_idcache_wbinv_all(); + cpu_l2cache_wbinv_all(); #ifdef __XSCALE__ xscale_cache_clean_minidata(); #endif Modified: stable/10/sys/arm/arm/elf_machdep.c ============================================================================== --- stable/10/sys/arm/arm/elf_machdep.c Sat May 17 22:31:40 2014 (r266372) +++ stable/10/sys/arm/arm/elf_machdep.c Sat May 17 22:50:16 2014 (r266373) @@ -220,9 +220,19 @@ int elf_cpu_load_file(linker_file_t lf __unused) { - cpu_idcache_wbinv_all(); - cpu_l2cache_wbinv_all(); - cpu_tlb_flushID(); + /* + * The pmap code does not do an icache sync upon establishing executable + * mappings in the kernel pmap. It's an optimization based on the fact + * that kernel memory allocations always have EXECUTABLE protection even + * when the memory isn't going to hold executable code. The only time + * kernel memory holding instructions does need a sync is after loading + * a kernel module, and that's when this function gets called. Normal + * data cache maintenance has already been done by the IO code, and TLB + * maintenance has been done by the pmap code, so all we have to do here + * is invalidate the instruction cache (which also invalidates the + * branch predictor cache on platforms that have one). + */ + cpu_icache_sync_all(); return (0); } Modified: stable/10/sys/arm/include/cpufunc.h ============================================================================== --- stable/10/sys/arm/include/cpufunc.h Sat May 17 22:31:40 2014 (r266372) +++ stable/10/sys/arm/include/cpufunc.h Sat May 17 22:50:16 2014 (r266373) @@ -411,6 +411,7 @@ void armv6_idcache_wbinv_range (vm_offse void armv7_setttb (u_int); void armv7_tlb_flushID (void); void armv7_tlb_flushID_SE (u_int); +void armv7_icache_sync_all (); void armv7_icache_sync_range (vm_offset_t, vm_size_t); void armv7_idcache_wbinv_range (vm_offset_t, vm_size_t); void armv7_idcache_inv_all (void); Modified: stable/10/sys/arm/include/kdb.h ============================================================================== --- stable/10/sys/arm/include/kdb.h Sat May 17 22:31:40 2014 (r266372) +++ stable/10/sys/arm/include/kdb.h Sat May 17 22:50:16 2014 (r266373) @@ -49,14 +49,12 @@ static __inline void kdb_cpu_sync_icache(unsigned char *addr, size_t size) { - cpu_icache_sync_all(); + cpu_icache_sync_range((vm_offset_t)addr, size); } static __inline void kdb_cpu_trap(int type, int code) { - - cpu_idcache_wbinv_all(); } #endif /* _MACHINE_KDB_H_ */ From owner-svn-src-stable@FreeBSD.ORG Sat May 17 23:03:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A8329CE1; Sat, 17 May 2014 23:03:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 946E52015; Sat, 17 May 2014 23:03:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HN35cF071167; Sat, 17 May 2014 23:03:05 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HN349n071160; Sat, 17 May 2014 23:03:04 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405172303.s4HN349n071160@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 23:03:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266374 - in stable/10/sys/arm: arm include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 23:03:05 -0000 Author: ian Date: Sat May 17 23:03:04 2014 New Revision: 266374 URL: http://svnweb.freebsd.org/changeset/base/266374 Log: MFC 265023, 265024, 265036: There is no difference between IPI_STOP and IPI_STOP_HARD on ARM, so map them both to the same interrupt number like other arches do. Flush and invalidate caches on each CPU as part of handling IPI_STOP. Don't use multiprocessing-extensions instruction on processors that don't support SMP. Modified: stable/10/sys/arm/arm/cpufunc_asm_armv7.S stable/10/sys/arm/arm/minidump_machdep.c stable/10/sys/arm/arm/mp_machdep.c stable/10/sys/arm/include/smp.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/cpufunc_asm_armv7.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_armv7.S Sat May 17 22:50:16 2014 (r266373) +++ stable/10/sys/arm/arm/cpufunc_asm_armv7.S Sat May 17 23:03:04 2014 (r266374) @@ -251,7 +251,11 @@ ENTRY(armv7_idcache_wbinv_range) END(armv7_idcache_wbinv_range) ENTRY_NP(armv7_icache_sync_all) +#ifdef SMP mcr p15, 0, r0, c7, c1, 0 /* Invalidate all I cache to PoU Inner Shareable */ +#else + mcr p15, 0, r0, c7, c5, 0 /* Invalidate all I cache to PoU (ICIALLU) */ +#endif isb /* instruction synchronization barrier */ dsb /* data synchronization barrier */ RET Modified: stable/10/sys/arm/arm/minidump_machdep.c ============================================================================== --- stable/10/sys/arm/arm/minidump_machdep.c Sat May 17 22:50:16 2014 (r266373) +++ stable/10/sys/arm/arm/minidump_machdep.c Sat May 17 23:03:04 2014 (r266374) @@ -210,7 +210,15 @@ minidumpsys(struct dumperinfo *di) int i, k, bit, error; char *addr; - /* Flush cache */ + /* + * Flush caches. Note that in the SMP case this operates only on the + * current CPU's L1 cache. Before we reach this point, code in either + * the system shutdown or kernel debugger has called stop_cpus() to stop + * all cores other than this one. Part of the ARM handling of + * stop_cpus() is to call wbinv_all() on that core's local L1 cache. So + * by time we get to here, all that remains is to flush the L1 for the + * current CPU, then the L2. + */ cpu_idcache_wbinv_all(); cpu_l2cache_wbinv_all(); Modified: stable/10/sys/arm/arm/mp_machdep.c ============================================================================== --- stable/10/sys/arm/arm/mp_machdep.c Sat May 17 22:50:16 2014 (r266373) +++ stable/10/sys/arm/arm/mp_machdep.c Sat May 17 23:03:04 2014 (r266374) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -278,7 +279,6 @@ ipi_handler(void *arg) break; case IPI_STOP: - case IPI_STOP_HARD: /* * IPI_STOP_HARD is mapped to IPI_STOP so it is not * necessary to add it in the switch. @@ -287,6 +287,19 @@ ipi_handler(void *arg) savectx(&stoppcbs[cpu]); + /* + * CPUs are stopped when entering the debugger and at + * system shutdown, both events which can precede a + * panic dump. For the dump to be correct, all caches + * must be flushed and invalidated, but on ARM there's + * no way to broadcast a wbinv_all to other cores. + * Instead, we have each core do the local wbinv_all as + * part of stopping the core. The core requesting the + * stop will do the l2 cache flush after all other cores + * have done their l1 flushes and stopped. + */ + cpu_idcache_wbinv_all(); + /* Indicate we are stopped */ CPU_SET_ATOMIC(cpu, &stopped_cpus); Modified: stable/10/sys/arm/include/smp.h ============================================================================== --- stable/10/sys/arm/include/smp.h Sat May 17 22:50:16 2014 (r266373) +++ stable/10/sys/arm/include/smp.h Sat May 17 23:03:04 2014 (r266374) @@ -10,7 +10,7 @@ #define IPI_PREEMPT 2 #define IPI_RENDEZVOUS 3 #define IPI_STOP 4 -#define IPI_STOP_HARD 5 +#define IPI_STOP_HARD 4 #define IPI_HARDCLOCK 6 #define IPI_TLB 7 From owner-svn-src-stable@FreeBSD.ORG Sat May 17 23:07:28 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A2FB6E52; Sat, 17 May 2014 23:07:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83CF12045; Sat, 17 May 2014 23:07:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HN7R03071942; Sat, 17 May 2014 23:07:27 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HN7RpQ071936; Sat, 17 May 2014 23:07:27 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405172307.s4HN7RpQ071936@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 23:07:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266375 - in stable/10/sys/arm: arm freescale/imx include ti/omap4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 23:07:28 -0000 Author: ian Date: Sat May 17 23:07:26 2014 New Revision: 266375 URL: http://svnweb.freebsd.org/changeset/base/266375 Log: MFC 265035: Move duplicated code to print l2 config into the common code. Modified: stable/10/sys/arm/arm/pl310.c stable/10/sys/arm/freescale/imx/imx6_pl310.c stable/10/sys/arm/include/pl310.h stable/10/sys/arm/ti/omap4/omap4_l2cache.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/pl310.c ============================================================================== --- stable/10/sys/arm/arm/pl310.c Sat May 17 23:03:04 2014 (r266374) +++ stable/10/sys/arm/arm/pl310.c Sat May 17 23:07:26 2014 (r266375) @@ -84,6 +84,47 @@ static uint32_t g_ways_assoc; static struct pl310_softc *pl310_softc; +void +pl310_print_config(struct pl310_softc *sc) +{ + uint32_t aux, prefetch; + const char *dis = "disabled"; + const char *ena = "enabled"; + + aux = pl310_read4(sc, PL310_AUX_CTRL); + prefetch = pl310_read4(sc, PL310_PREFETCH_CTRL); + + device_printf(sc->sc_dev, "Early BRESP response: %s\n", + (aux & AUX_CTRL_EARLY_BRESP) ? ena : dis); + device_printf(sc->sc_dev, "Instruction prefetch: %s\n", + (aux & AUX_CTRL_INSTR_PREFETCH) ? ena : dis); + device_printf(sc->sc_dev, "Data prefetch: %s\n", + (aux & AUX_CTRL_DATA_PREFETCH) ? ena : dis); + device_printf(sc->sc_dev, "Non-secure interrupt control: %s\n", + (aux & AUX_CTRL_NS_INT_CTRL) ? ena : dis); + device_printf(sc->sc_dev, "Non-secure lockdown: %s\n", + (aux & AUX_CTRL_NS_LOCKDOWN) ? ena : dis); + device_printf(sc->sc_dev, "Share override: %s\n", + (aux & AUX_CTRL_SHARE_OVERRIDE) ? ena : dis); + + device_printf(sc->sc_dev, "Double linefill: %s\n", + (prefetch & PREFETCH_CTRL_DL) ? ena : dis); + device_printf(sc->sc_dev, "Instruction prefetch: %s\n", + (prefetch & PREFETCH_CTRL_INSTR_PREFETCH) ? ena : dis); + device_printf(sc->sc_dev, "Data prefetch: %s\n", + (prefetch & PREFETCH_CTRL_DATA_PREFETCH) ? ena : dis); + device_printf(sc->sc_dev, "Double linefill on WRAP request: %s\n", + (prefetch & PREFETCH_CTRL_DL_ON_WRAP) ? ena : dis); + device_printf(sc->sc_dev, "Prefetch drop: %s\n", + (prefetch & PREFETCH_CTRL_PREFETCH_DROP) ? ena : dis); + device_printf(sc->sc_dev, "Incr double Linefill: %s\n", + (prefetch & PREFETCH_CTRL_INCR_DL) ? ena : dis); + device_printf(sc->sc_dev, "Not same ID on exclusive sequence: %s\n", + (prefetch & PREFETCH_CTRL_NOTSAMEID) ? ena : dis); + device_printf(sc->sc_dev, "Prefetch offset: %d\n", + (prefetch & PREFETCH_CTRL_OFFSET_MASK)); +} + static int pl310_filter(void *arg) { @@ -351,6 +392,8 @@ pl310_attach(device_t dev) /* Enable the L2 cache if disabled */ platform_pl310_write_ctrl(sc, CTRL_ENABLED); device_printf(dev, "L2 Cache enabled\n"); + if (bootverbose) + pl310_print_config(sc); } if (!sc->sc_enabled && (ctrl_value & CTRL_ENABLED)) { Modified: stable/10/sys/arm/freescale/imx/imx6_pl310.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx6_pl310.c Sat May 17 23:03:04 2014 (r266374) +++ stable/10/sys/arm/freescale/imx/imx6_pl310.c Sat May 17 23:07:26 2014 (r266375) @@ -44,42 +44,6 @@ __FBSDID("$FreeBSD$"); void platform_pl310_init(struct pl310_softc *sc) { - uint32_t aux, prefetch; - - aux = pl310_read4(sc, PL310_AUX_CTRL); - prefetch = pl310_read4(sc, PL310_PREFETCH_CTRL); - - if (bootverbose) { - device_printf(sc->sc_dev, "Early BRESP response: %s\n", - (aux & AUX_CTRL_EARLY_BRESP) ? "enabled" : "disabled"); - device_printf(sc->sc_dev, "Instruction prefetch: %s\n", - (aux & AUX_CTRL_INSTR_PREFETCH) ? "enabled" : "disabled"); - device_printf(sc->sc_dev, "Data prefetch: %s\n", - (aux & AUX_CTRL_DATA_PREFETCH) ? "enabled" : "disabled"); - device_printf(sc->sc_dev, "Non-secure interrupt control: %s\n", - (aux & AUX_CTRL_NS_INT_CTRL) ? "enabled" : "disabled"); - device_printf(sc->sc_dev, "Non-secure lockdown: %s\n", - (aux & AUX_CTRL_NS_LOCKDOWN) ? "enabled" : "disabled"); - device_printf(sc->sc_dev, "Share override: %s\n", - (aux & AUX_CTRL_SHARE_OVERRIDE) ? "enabled" : "disabled"); - - device_printf(sc->sc_dev, "Double linefil: %s\n", - (prefetch & PREFETCH_CTRL_DL) ? "enabled" : "disabled"); - device_printf(sc->sc_dev, "Instruction prefetch: %s\n", - (prefetch & PREFETCH_CTRL_INSTR_PREFETCH) ? "enabled" : "disabled"); - device_printf(sc->sc_dev, "Data prefetch: %s\n", - (prefetch & PREFETCH_CTRL_DATA_PREFETCH) ? "enabled" : "disabled"); - device_printf(sc->sc_dev, "Double linefill on WRAP request: %s\n", - (prefetch & PREFETCH_CTRL_DL_ON_WRAP) ? "enabled" : "disabled"); - device_printf(sc->sc_dev, "Prefetch drop: %s\n", - (prefetch & PREFETCH_CTRL_PREFETCH_DROP) ? "enabled" : "disabled"); - device_printf(sc->sc_dev, "Incr double Linefill: %s\n", - (prefetch & PREFETCH_CTRL_INCR_DL) ? "enabled" : "disabled"); - device_printf(sc->sc_dev, "Not same ID on exclusive sequence: %s\n", - (prefetch & PREFETCH_CTRL_NOTSAMEID) ? "enabled" : "disabled"); - device_printf(sc->sc_dev, "Prefetch offset: %d\n", - (prefetch & PREFETCH_CTRL_OFFSET_MASK)); - } } void Modified: stable/10/sys/arm/include/pl310.h ============================================================================== --- stable/10/sys/arm/include/pl310.h Sat May 17 23:03:04 2014 (r266374) +++ stable/10/sys/arm/include/pl310.h Sat May 17 23:07:26 2014 (r266375) @@ -161,6 +161,8 @@ pl310_write4(struct pl310_softc *sc, bus bus_write_4(sc->sc_mem_res, off, val); } +void pl310_print_config(struct pl310_softc *sc); + void platform_pl310_init(struct pl310_softc *); void platform_pl310_write_ctrl(struct pl310_softc *, uint32_t); void platform_pl310_write_debug(struct pl310_softc *, uint32_t); Modified: stable/10/sys/arm/ti/omap4/omap4_l2cache.c ============================================================================== --- stable/10/sys/arm/ti/omap4/omap4_l2cache.c Sat May 17 23:03:04 2014 (r266374) +++ stable/10/sys/arm/ti/omap4/omap4_l2cache.c Sat May 17 23:07:26 2014 (r266375) @@ -45,38 +45,6 @@ platform_pl310_init(struct pl310_softc * aux = pl310_read4(sc, PL310_AUX_CTRL); prefetch = pl310_read4(sc, PL310_PREFETCH_CTRL); - if (bootverbose) { - device_printf(sc->sc_dev, "Early BRESP response: %s\n", - (aux & AUX_CTRL_EARLY_BRESP) ? "enabled" : "disabled"); - device_printf(sc->sc_dev, "Instruction prefetch: %s\n", - (aux & AUX_CTRL_INSTR_PREFETCH) ? "enabled" : "disabled"); - device_printf(sc->sc_dev, "Data prefetch: %s\n", - (aux & AUX_CTRL_DATA_PREFETCH) ? "enabled" : "disabled"); - device_printf(sc->sc_dev, "Non-secure interrupt control: %s\n", - (aux & AUX_CTRL_NS_INT_CTRL) ? "enabled" : "disabled"); - device_printf(sc->sc_dev, "Non-secure lockdown: %s\n", - (aux & AUX_CTRL_NS_LOCKDOWN) ? "enabled" : "disabled"); - device_printf(sc->sc_dev, "Share override: %s\n", - (aux & AUX_CTRL_SHARE_OVERRIDE) ? "enabled" : "disabled"); - - device_printf(sc->sc_dev, "Double linefil: %s\n", - (prefetch & PREFETCH_CTRL_DL) ? "enabled" : "disabled"); - device_printf(sc->sc_dev, "Instruction prefetch: %s\n", - (prefetch & PREFETCH_CTRL_INSTR_PREFETCH) ? "enabled" : "disabled"); - device_printf(sc->sc_dev, "Data prefetch: %s\n", - (prefetch & PREFETCH_CTRL_DATA_PREFETCH) ? "enabled" : "disabled"); - device_printf(sc->sc_dev, "Double linefill on WRAP request: %s\n", - (prefetch & PREFETCH_CTRL_DL_ON_WRAP) ? "enabled" : "disabled"); - device_printf(sc->sc_dev, "Prefetch drop: %s\n", - (prefetch & PREFETCH_CTRL_PREFETCH_DROP) ? "enabled" : "disabled"); - device_printf(sc->sc_dev, "Incr double Linefill: %s\n", - (prefetch & PREFETCH_CTRL_INCR_DL) ? "enabled" : "disabled"); - device_printf(sc->sc_dev, "Not same ID on exclusive sequence: %s\n", - (prefetch & PREFETCH_CTRL_NOTSAMEID) ? "enabled" : "disabled"); - device_printf(sc->sc_dev, "Prefetch offset: %d\n", - (prefetch & PREFETCH_CTRL_OFFSET_MASK)); - } - /* * Disable instruction prefetch */ From owner-svn-src-stable@FreeBSD.ORG Sat May 17 23:16:19 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BDCF9FD9; Sat, 17 May 2014 23:16:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9130F20EA; Sat, 17 May 2014 23:16:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HNGJrD077924; Sat, 17 May 2014 23:16:19 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HNGIZs077920; Sat, 17 May 2014 23:16:18 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405172316.s4HNGIZs077920@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 23:16:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266376 - stable/10/sys/boot/fdt/dts/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 23:16:19 -0000 Author: ian Date: Sat May 17 23:16:18 2014 New Revision: 266376 URL: http://svnweb.freebsd.org/changeset/base/266376 Log: MFC 265038: Move common device tree informations to separate dtsi files for A10 and A20 SoC. Change cubieboard1 and cubieboard2 dts files accordingly. Added: stable/10/sys/boot/fdt/dts/arm/sun4i-a10.dtsi - copied unchanged from r265038, head/sys/boot/fdt/dts/arm/sun4i-a10.dtsi stable/10/sys/boot/fdt/dts/arm/sun7i-a20.dtsi - copied unchanged from r265038, head/sys/boot/fdt/dts/arm/sun7i-a20.dtsi Modified: stable/10/sys/boot/fdt/dts/arm/cubieboard.dts stable/10/sys/boot/fdt/dts/arm/cubieboard2.dts Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/fdt/dts/arm/cubieboard.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/cubieboard.dts Sat May 17 23:07:26 2014 (r266375) +++ stable/10/sys/boot/fdt/dts/arm/cubieboard.dts Sat May 17 23:16:18 2014 (r266376) @@ -28,13 +28,10 @@ /dts-v1/; +/include/ "sun4i-a10.dtsi" + / { model = "Cubietech Cubieboard"; - compatible = "cubietech,a10-cubieboard", "allwinner,sun4i-a10"; - #address-cells = <1>; - #size-cells = <1>; - - interrupt-parent = <&AINTC>; memory { device_type = "memory"; @@ -47,96 +44,21 @@ }; SOC: a10 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "simple-bus"; - ranges; - bus-frequency = <0>; - - AINTC: interrupt-controller@01c20400 { - compatible = "allwinner,sun4i-ic"; - interrupt-controller; - #address-cells = <0>; - #interrupt-cells = <1>; - reg = < 0x01c20400 0x400 >; - }; - - sramc@01c00000 { - compatible = "allwinner,sun4i-sramc"; - #address-cells = <1>; - #size-cells = <1>; - reg = < 0x01c00000 0x1000 >; - }; - - ccm@01c20000 { - compatible = "allwinner,sun4i-ccm"; - #address-cells = <1>; - #size-cells = <1>; - reg = < 0x01c20000 0x400 >; - }; - - timer@01c20c00 { - compatible = "allwinner,sun4i-timer"; - reg = <0x01c20c00 0x90>; - interrupts = < 22 >; - interrupt-parent = <&AINTC>; - clock-frequency = < 24000000 >; - }; - - watchdog@01c20c90 { - compatible = "allwinner,sun4i-wdt"; - reg = <0x01c20c90 0x08>; - }; - - - GPIO: gpio@01c20800 { - #gpio-cells = <3>; - compatible = "allwinner,sun4i-gpio"; - gpio-controller; - reg =< 0x01c20800 0x400 >; - interrupts = < 28 >; - interrupt-parent = <&AINTC>; - }; usb1: usb@01c14000 { - compatible = "allwinner,usb-ehci", "usb-ehci"; - reg = <0x01c14000 0x1000>; - interrupts = < 39 >; - interrupt-parent = <&AINTC>; + status = "okay"; }; usb2: usb@01c1c000 { - compatible = "allwinner,usb-ehci", "usb-ehci"; - reg = <0x01c1c000 0x1000>; - interrupts = < 40 >; - interrupt-parent = <&AINTC>; - }; - - sata@01c18000 { - compatible = "allwinner,ahci"; - reg = <0x01c18000 0x1000>; - interrupts = <56>; - interrupt-parent = <&AINTC>; + status = "okay"; }; UART0: serial@01c28000 { status = "okay"; - compatible = "ns16550"; - reg = <0x01c28000 0x400>; - reg-shift = <2>; - interrupts = <1>; - interrupt-parent = <&AINTC>; - current-speed = <115200>; - clock-frequency = < 24000000 >; - busy-detect = <1>; - broken-txfifo = <1>; }; emac@01c0b000 { - compatible = "allwinner,sun4i-emac"; - reg = <0x01c0b000 0x1000>; - interrupts = <55>; - interrupt-parent = <&AINTC>; + status = "okay"; }; }; Modified: stable/10/sys/boot/fdt/dts/arm/cubieboard2.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/cubieboard2.dts Sat May 17 23:07:26 2014 (r266375) +++ stable/10/sys/boot/fdt/dts/arm/cubieboard2.dts Sat May 17 23:16:18 2014 (r266376) @@ -28,13 +28,10 @@ /dts-v1/; +/include/ "sun7i-a20.dtsi" + / { model = "Cubietech Cubieboard2"; - compatible = "cubietech,a20-cubieboard", "allwinner,sun7i-a20"; - #address-cells = <1>; - #size-cells = <1>; - - interrupt-parent = <&GIC>; memory { device_type = "memory"; @@ -47,102 +44,21 @@ }; SOC: a20 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "simple-bus"; - ranges; - bus-frequency = <0>; - - GIC: interrupt-controller@01c81000 { - compatible = "arm,gic"; - reg = <0x01c81000 0x1000>, /* Distributor Registers */ - <0x01c82000 0x0100>; /* CPU Interface Registers */ - interrupt-controller; - #interrupt-cells = <1>; - }; - - sramc@01c00000 { - compatible = "allwinner,sun4i-sramc"; - #address-cells = <1>; - #size-cells = <1>; - reg = < 0x01c00000 0x1000 >; - }; - - cpu-cfg@01c25c00 { - compatible = "allwinner,sun7i-cpu-cfg"; - #address-cells = <1>; - #size-cells = <1>; - reg = < 0x01c25c00 0x400 >; - }; - - ccm@01c20000 { - compatible = "allwinner,sun4i-ccm"; - #address-cells = <1>; - #size-cells = <1>; - reg = < 0x01c20000 0x400 >; - }; - - timer@01c20c00 { - compatible = "allwinner,sun7i-timer"; - reg = <0x01c20c00 0x90>; - interrupts = < 22 >; - interrupt-parent = <&GIC>; - clock-frequency = < 24000000 >; - }; - - watchdog@01c20c90 { - compatible = "allwinner,sun4i-wdt"; - reg = <0x01c20c90 0x10>; - }; - - GPIO: gpio@01c20800 { - #gpio-cells = <3>; - compatible = "allwinner,sun4i-gpio"; - gpio-controller; - reg =< 0x01c20800 0x400 >; - interrupts = < 28 >; - interrupt-parent = <&GIC>; - }; usb1: usb@01c14000 { - compatible = "allwinner,usb-ehci", "usb-ehci"; - reg = <0x01c14000 0x1000>; - interrupts = < 39 >; - interrupt-parent = <&GIC>; + status = "okay"; }; usb2: usb@01c1c000 { - compatible = "allwinner,usb-ehci", "usb-ehci"; - reg = <0x01c1c000 0x1000>; - interrupts = < 40 >; - interrupt-parent = <&GIC>; - }; - - sata@01c18000 { - compatible = "allwinner,ahci"; - reg = <0x01c18000 0x1000>; - interrupts = <56>; - interrupt-parent = <&GIC>; + status = "okay"; }; UART0: serial@01c28000 { status = "okay"; - compatible = "ns16550"; - reg = <0x01c28000 0x400>; - reg-shift = <2>; - interrupts = <1>; - interrupt-parent = <&GIC>; - current-speed = <115200>; - clock-frequency = < 24000000 >; - busy-detect = <1>; - broken-txfifo = <1>; }; emac@01c0b000 { - compatible = "allwinner,sun4i-emac"; - reg = <0x01c0b000 0x1000>; - interrupts = <55>; - interrupt-parent = <&GIC>; + status = "okay"; }; }; Copied: stable/10/sys/boot/fdt/dts/arm/sun4i-a10.dtsi (from r265038, head/sys/boot/fdt/dts/arm/sun4i-a10.dtsi) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/fdt/dts/arm/sun4i-a10.dtsi Sat May 17 23:16:18 2014 (r266376, copy of r265038, head/sys/boot/fdt/dts/arm/sun4i-a10.dtsi) @@ -0,0 +1,133 @@ +/*- + * Copyright (c) 2014 Ganbold Tsagaankhuu + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +/ { + compatible = "allwinner,sun4i-a10"; + #address-cells = <1>; + #size-cells = <1>; + + interrupt-parent = <&AINTC>; + + aliases { + soc = &SOC; + }; + + SOC: a10 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "simple-bus"; + ranges; + bus-frequency = <0>; + + AINTC: interrupt-controller@01c20400 { + compatible = "allwinner,sun4i-ic"; + interrupt-controller; + #address-cells = <0>; + #interrupt-cells = <1>; + reg = < 0x01c20400 0x400 >; + }; + + sramc@01c00000 { + compatible = "allwinner,sun4i-sramc"; + #address-cells = <1>; + #size-cells = <1>; + reg = < 0x01c00000 0x1000 >; + }; + + ccm@01c20000 { + compatible = "allwinner,sun4i-ccm"; + #address-cells = <1>; + #size-cells = <1>; + reg = < 0x01c20000 0x400 >; + }; + + timer@01c20c00 { + compatible = "allwinner,sun4i-timer"; + reg = <0x01c20c00 0x90>; + interrupts = < 22 >; + interrupt-parent = <&AINTC>; + clock-frequency = < 24000000 >; + }; + + watchdog@01c20c90 { + compatible = "allwinner,sun4i-wdt"; + reg = <0x01c20c90 0x08>; + }; + + + GPIO: gpio@01c20800 { + #gpio-cells = <3>; + compatible = "allwinner,sun4i-gpio"; + gpio-controller; + reg =< 0x01c20800 0x400 >; + interrupts = < 28 >; + interrupt-parent = <&AINTC>; + }; + + usb1: usb@01c14000 { + compatible = "allwinner,usb-ehci", "usb-ehci"; + reg = <0x01c14000 0x1000>; + interrupts = < 39 >; + interrupt-parent = <&AINTC>; + }; + + usb2: usb@01c1c000 { + compatible = "allwinner,usb-ehci", "usb-ehci"; + reg = <0x01c1c000 0x1000>; + interrupts = < 40 >; + interrupt-parent = <&AINTC>; + }; + + sata@01c18000 { + compatible = "allwinner,ahci"; + reg = <0x01c18000 0x1000>; + interrupts = <56>; + interrupt-parent = <&AINTC>; + }; + + UART0: serial@01c28000 { + compatible = "ns16550"; + reg = <0x01c28000 0x400>; + reg-shift = <2>; + interrupts = <1>; + interrupt-parent = <&AINTC>; + current-speed = <115200>; + clock-frequency = < 24000000 >; + busy-detect = <1>; + broken-txfifo = <1>; + }; + + emac@01c0b000 { + compatible = "allwinner,sun4i-emac"; + reg = <0x01c0b000 0x1000>; + interrupts = <55>; + interrupt-parent = <&AINTC>; + }; + }; +}; + Copied: stable/10/sys/boot/fdt/dts/arm/sun7i-a20.dtsi (from r265038, head/sys/boot/fdt/dts/arm/sun7i-a20.dtsi) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/fdt/dts/arm/sun7i-a20.dtsi Sat May 17 23:16:18 2014 (r266376, copy of r265038, head/sys/boot/fdt/dts/arm/sun7i-a20.dtsi) @@ -0,0 +1,139 @@ +/*- + * Copyright (c) 2014 Ganbold Tsagaankhuu + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +/ { + compatible = "allwinner,sun7i-a20"; + #address-cells = <1>; + #size-cells = <1>; + + interrupt-parent = <&GIC>; + + aliases { + soc = &SOC; + }; + + SOC: a20 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "simple-bus"; + ranges; + bus-frequency = <0>; + + GIC: interrupt-controller@01c81000 { + compatible = "arm,gic"; + reg = <0x01c81000 0x1000>, /* Distributor Registers */ + <0x01c82000 0x0100>; /* CPU Interface Registers */ + interrupt-controller; + #interrupt-cells = <1>; + }; + + sramc@01c00000 { + compatible = "allwinner,sun4i-sramc"; + #address-cells = <1>; + #size-cells = <1>; + reg = < 0x01c00000 0x1000 >; + }; + + cpu-cfg@01c25c00 { + compatible = "allwinner,sun7i-cpu-cfg"; + #address-cells = <1>; + #size-cells = <1>; + reg = < 0x01c25c00 0x400 >; + }; + + ccm@01c20000 { + compatible = "allwinner,sun4i-ccm"; + #address-cells = <1>; + #size-cells = <1>; + reg = < 0x01c20000 0x400 >; + }; + + timer@01c20c00 { + compatible = "allwinner,sun7i-timer"; + reg = <0x01c20c00 0x90>; + interrupts = < 22 >; + interrupt-parent = <&GIC>; + clock-frequency = < 24000000 >; + }; + + watchdog@01c20c90 { + compatible = "allwinner,sun4i-wdt"; + reg = <0x01c20c90 0x10>; + }; + + GPIO: gpio@01c20800 { + #gpio-cells = <3>; + compatible = "allwinner,sun4i-gpio"; + gpio-controller; + reg =< 0x01c20800 0x400 >; + interrupts = < 28 >; + interrupt-parent = <&GIC>; + }; + + usb1: usb@01c14000 { + compatible = "allwinner,usb-ehci", "usb-ehci"; + reg = <0x01c14000 0x1000>; + interrupts = < 39 >; + interrupt-parent = <&GIC>; + }; + + usb2: usb@01c1c000 { + compatible = "allwinner,usb-ehci", "usb-ehci"; + reg = <0x01c1c000 0x1000>; + interrupts = < 40 >; + interrupt-parent = <&GIC>; + }; + + sata@01c18000 { + compatible = "allwinner,ahci"; + reg = <0x01c18000 0x1000>; + interrupts = <56>; + interrupt-parent = <&GIC>; + }; + + UART0: serial@01c28000 { + compatible = "ns16550"; + reg = <0x01c28000 0x400>; + reg-shift = <2>; + interrupts = <1>; + interrupt-parent = <&GIC>; + current-speed = <115200>; + clock-frequency = < 24000000 >; + busy-detect = <1>; + broken-txfifo = <1>; + }; + + emac@01c0b000 { + compatible = "allwinner,sun4i-emac"; + reg = <0x01c0b000 0x1000>; + interrupts = <55>; + interrupt-parent = <&GIC>; + }; + }; +}; + From owner-svn-src-stable@FreeBSD.ORG Sat May 17 23:20:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A521227; Sat, 17 May 2014 23:20:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB49120FA; Sat, 17 May 2014 23:20:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HNKTxt079118; Sat, 17 May 2014 23:20:29 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HNKTjS079117; Sat, 17 May 2014 23:20:29 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405172320.s4HNKTjS079117@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 23:20:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266377 - stable/10/lib/libc/arm/gen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 23:20:30 -0000 Author: ian Date: Sat May 17 23:20:29 2014 New Revision: 266377 URL: http://svnweb.freebsd.org/changeset/base/266377 Log: MFC 265059: Set the new floating point exception mask correctly. Modified: stable/10/lib/libc/arm/gen/fpsetmask_vfp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/arm/gen/fpsetmask_vfp.c ============================================================================== --- stable/10/lib/libc/arm/gen/fpsetmask_vfp.c Sat May 17 23:16:18 2014 (r266376) +++ stable/10/lib/libc/arm/gen/fpsetmask_vfp.c Sat May 17 23:20:29 2014 (r266377) @@ -45,7 +45,7 @@ fpsetmask(fp_except_t mask) __asm __volatile("vmrs %0, fpscr" : "=&r"(old)); mask = (mask & FP_X_MASK) << 8; new = (old & ~(FP_X_MASK << 8)) | mask; - __asm __volatile("vmsr fpscr, %0" : : "r"(old)); + __asm __volatile("vmsr fpscr, %0" : : "r"(new)); return ((old >> 8) & FP_X_MASK); } From owner-svn-src-stable@FreeBSD.ORG Sat May 17 23:21:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1B06367; Sat, 17 May 2014 23:21:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE64E2173; Sat, 17 May 2014 23:21:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HNLr2h080483; Sat, 17 May 2014 23:21:53 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HNLr5T080482; Sat, 17 May 2014 23:21:53 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405172321.s4HNLr5T080482@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 23:21:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266378 - stable/10/sys/arm/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 23:21:54 -0000 Author: ian Date: Sat May 17 23:21:53 2014 New Revision: 266378 URL: http://svnweb.freebsd.org/changeset/base/266378 Log: MFC 265111: Make a declaration into a proper function prototype. Modified: stable/10/sys/arm/include/cpufunc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/include/cpufunc.h ============================================================================== --- stable/10/sys/arm/include/cpufunc.h Sat May 17 23:20:29 2014 (r266377) +++ stable/10/sys/arm/include/cpufunc.h Sat May 17 23:21:53 2014 (r266378) @@ -411,7 +411,7 @@ void armv6_idcache_wbinv_range (vm_offse void armv7_setttb (u_int); void armv7_tlb_flushID (void); void armv7_tlb_flushID_SE (u_int); -void armv7_icache_sync_all (); +void armv7_icache_sync_all (void); void armv7_icache_sync_range (vm_offset_t, vm_size_t); void armv7_idcache_wbinv_range (vm_offset_t, vm_size_t); void armv7_idcache_inv_all (void); From owner-svn-src-stable@FreeBSD.ORG Sat May 17 23:25:22 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 945354AA; Sat, 17 May 2014 23:25:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76B46218B; Sat, 17 May 2014 23:25:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HNPMrF083851; Sat, 17 May 2014 23:25:22 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HNPLhd083844; Sat, 17 May 2014 23:25:21 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405172325.s4HNPLhd083844@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 23:25:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266379 - in stable/10/sys/arm: conf xilinx X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 23:25:22 -0000 Author: ian Date: Sat May 17 23:25:20 2014 New Revision: 266379 URL: http://svnweb.freebsd.org/changeset/base/266379 Log: MFC 265099, 265148, 265690: Add SMP support for Zedboard. Use edge-triggered interrupts rather than polling loops to avoid missing transitions of the INIT_B line. Also, release the mutex during uiomove(). Convert the Zynq SoC support to the new routines for static device mapping. Added: stable/10/sys/arm/xilinx/zy7_mp.c - copied unchanged from r265099, head/sys/arm/xilinx/zy7_mp.c Modified: stable/10/sys/arm/conf/ZEDBOARD stable/10/sys/arm/xilinx/files.zynq7 stable/10/sys/arm/xilinx/std.zynq7 stable/10/sys/arm/xilinx/zy7_devcfg.c stable/10/sys/arm/xilinx/zy7_machdep.c stable/10/sys/arm/xilinx/zy7_reg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/ZEDBOARD ============================================================================== --- stable/10/sys/arm/conf/ZEDBOARD Sat May 17 23:21:53 2014 (r266378) +++ stable/10/sys/arm/conf/ZEDBOARD Sat May 17 23:25:20 2014 (r266379) @@ -56,6 +56,7 @@ options SYSVSEM # SYSV-style semaphor options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions options FREEBSD_BOOT_LOADER options VFP # vfp/neon +options SMP # Symmetric MultiProcessor Kernel # Debugging makeoptions DEBUG=-g Modified: stable/10/sys/arm/xilinx/files.zynq7 ============================================================================== --- stable/10/sys/arm/xilinx/files.zynq7 Sat May 17 23:21:53 2014 (r266378) +++ stable/10/sys/arm/xilinx/files.zynq7 Sat May 17 23:25:20 2014 (r266379) @@ -21,6 +21,7 @@ arm/xilinx/zy7_l2cache.c standard arm/xilinx/zy7_bus_space.c standard arm/xilinx/zy7_slcr.c standard arm/xilinx/zy7_devcfg.c standard +arm/xilinx/zy7_mp.c optional smp dev/cadence/if_cgem.c optional if_cgem dev/sdhci/sdhci_fdt.c optional sdhci Modified: stable/10/sys/arm/xilinx/std.zynq7 ============================================================================== --- stable/10/sys/arm/xilinx/std.zynq7 Sat May 17 23:21:53 2014 (r266378) +++ stable/10/sys/arm/xilinx/std.zynq7 Sat May 17 23:25:20 2014 (r266379) @@ -20,3 +20,5 @@ makeoptions KERNVIRTADDR=0xc0100000 options ARM_L2_PIPT +options IPI_IRQ_START=0 +options IPI_IRQ_END=15 Modified: stable/10/sys/arm/xilinx/zy7_devcfg.c ============================================================================== --- stable/10/sys/arm/xilinx/zy7_devcfg.c Sat May 17 23:21:53 2014 (r266378) +++ stable/10/sys/arm/xilinx/zy7_devcfg.c Sat May 17 23:25:20 2014 (r266379) @@ -267,24 +267,35 @@ zy7_devcfg_reset_pl(struct zy7_devcfg_so devcfg_ctl = RD4(sc, ZY7_DEVCFG_CTRL); + /* Clear sticky bits and set up INIT signal positive edge interrupt. */ + WR4(sc, ZY7_DEVCFG_INT_STATUS, ZY7_DEVCFG_INT_ALL); + WR4(sc, ZY7_DEVCFG_INT_MASK, ~ZY7_DEVCFG_INT_PCFG_INIT_PE); + /* Deassert PROG_B (active low). */ devcfg_ctl |= ZY7_DEVCFG_CTRL_PCFG_PROG_B; WR4(sc, ZY7_DEVCFG_CTRL, devcfg_ctl); - /* Wait for INIT_B deasserted (active low). */ - tries = 0; - while ((RD4(sc, ZY7_DEVCFG_STATUS) & - ZY7_DEVCFG_STATUS_PCFG_INIT) == 0) { - if (++tries >= 100) - return (EIO); - DELAY(5); + /* + * Wait for INIT to assert. If it is already asserted, we may not get + * an edge interrupt so cancel it and continue. + */ + if ((RD4(sc, ZY7_DEVCFG_STATUS) & + ZY7_DEVCFG_STATUS_PCFG_INIT) != 0) { + /* Already asserted. Cancel interrupt. */ + WR4(sc, ZY7_DEVCFG_INT_MASK, ~0); + } + else { + /* Wait for positive edge interrupt. */ + err = mtx_sleep(sc, &sc->sc_mtx, PCATCH, "zy7i1", hz); + if (err != 0) + return (err); } - - /* Reassert PROG_B. */ + + /* Reassert PROG_B (active low). */ devcfg_ctl &= ~ZY7_DEVCFG_CTRL_PCFG_PROG_B; WR4(sc, ZY7_DEVCFG_CTRL, devcfg_ctl); - /* Wait for INIT_B asserted. */ + /* Wait for INIT deasserted. This happens almost instantly. */ tries = 0; while ((RD4(sc, ZY7_DEVCFG_STATUS) & ZY7_DEVCFG_STATUS_PCFG_INIT) != 0) { @@ -293,7 +304,7 @@ zy7_devcfg_reset_pl(struct zy7_devcfg_so DELAY(5); } - /* Clear sticky bits and set up INIT_B positive edge interrupt. */ + /* Clear sticky bits and set up INIT positive edge interrupt. */ WR4(sc, ZY7_DEVCFG_INT_STATUS, ZY7_DEVCFG_INT_ALL); WR4(sc, ZY7_DEVCFG_INT_MASK, ~ZY7_DEVCFG_INT_PCFG_INIT_PE); @@ -301,11 +312,11 @@ zy7_devcfg_reset_pl(struct zy7_devcfg_so devcfg_ctl |= ZY7_DEVCFG_CTRL_PCFG_PROG_B; WR4(sc, ZY7_DEVCFG_CTRL, devcfg_ctl); - /* Wait for INIT_B deasserted indicating FPGA internal initialization - * is complete. This takes much longer than the previous waits for - * INIT_B transition (on the order of 700us). + /* + * Wait for INIT asserted indicating FPGA internal initialization + * is complete. */ - err = mtx_sleep(sc, &sc->sc_mtx, PCATCH, "zy7in", hz); + err = mtx_sleep(sc, &sc->sc_mtx, PCATCH, "zy7i2", hz); if (err != 0) return (err); @@ -404,7 +415,9 @@ zy7_devcfg_write(struct cdev *dev, struc /* uiomove the data from user buffer to our dma map. */ segsz = MIN(PAGE_SIZE, uio->uio_resid); + DEVCFG_SC_UNLOCK(sc); err = uiomove(dma_mem, segsz, uio); + DEVCFG_SC_LOCK(sc); if (err != 0) break; Modified: stable/10/sys/arm/xilinx/zy7_machdep.c ============================================================================== --- stable/10/sys/arm/xilinx/zy7_machdep.c Sat May 17 23:21:53 2014 (r266378) +++ stable/10/sys/arm/xilinx/zy7_machdep.c Sat May 17 23:25:20 2014 (r266379) @@ -60,7 +60,7 @@ vm_offset_t initarm_lastaddr(void) { - return (ZYNQ7_PSIO_VBASE); + return (arm_devmap_lastaddr()); } void @@ -79,39 +79,18 @@ initarm_late_init(void) { } -#define FDT_DEVMAP_SIZE 3 -static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_SIZE]; - /* - * Construct pmap_devmap[] with DT-derived config data. + * Set up static device mappings. Not strictly necessary -- simplebus will + * dynamically establish mappings as needed -- but doing it this way gets us + * nice efficient 1MB section mappings. */ int initarm_devmap_init(void) { - int i = 0; - fdt_devmap[i].pd_va = ZYNQ7_PSIO_VBASE; - fdt_devmap[i].pd_pa = ZYNQ7_PSIO_HWBASE; - fdt_devmap[i].pd_size = ZYNQ7_PSIO_SIZE; - fdt_devmap[i].pd_prot = VM_PROT_READ | VM_PROT_WRITE; - fdt_devmap[i].pd_cache = PTE_DEVICE; - i++; - - fdt_devmap[i].pd_va = ZYNQ7_PSCTL_VBASE; - fdt_devmap[i].pd_pa = ZYNQ7_PSCTL_HWBASE; - fdt_devmap[i].pd_size = ZYNQ7_PSCTL_SIZE; - fdt_devmap[i].pd_prot = VM_PROT_READ | VM_PROT_WRITE; - fdt_devmap[i].pd_cache = PTE_DEVICE; - i++; - - /* end of table */ - fdt_devmap[i].pd_va = 0; - fdt_devmap[i].pd_pa = 0; - fdt_devmap[i].pd_size = 0; - fdt_devmap[i].pd_prot = 0; - fdt_devmap[i].pd_cache = 0; + arm_devmap_add_entry(ZYNQ7_PSIO_HWBASE, ZYNQ7_PSIO_SIZE); + arm_devmap_add_entry(ZYNQ7_PSCTL_HWBASE, ZYNQ7_PSCTL_SIZE); - arm_devmap_register_table(&fdt_devmap[0]); return (0); } Copied: stable/10/sys/arm/xilinx/zy7_mp.c (from r265099, head/sys/arm/xilinx/zy7_mp.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/xilinx/zy7_mp.c Sat May 17 23:25:20 2014 (r266379, copy of r265099, head/sys/arm/xilinx/zy7_mp.c) @@ -0,0 +1,99 @@ +/*- + * Copyright (c) 2013 Thomas Skibo. All rights reserved. + * + * 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 ``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 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. + */ + +#include +__FBSDID("$FreeBSD$"); +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#define ZYNQ7_CPU1_ENTRY 0xfffffff0 + +void +platform_mp_init_secondary(void) +{ + + gic_init_secondary(); +} + +void +platform_mp_setmaxid(void) +{ + + mp_maxid = 1; +} + +int +platform_mp_probe(void) +{ + + mp_ncpus = 2; + return (1); +} + +void +platform_mp_start_ap(void) +{ + bus_space_handle_t ocm_handle; + + /* Map in magic location to give entry address to CPU1. */ + if (bus_space_map(fdtbus_bs_tag, ZYNQ7_CPU1_ENTRY, 4, + 0, &ocm_handle) != 0) + panic("platform_mp_start_ap: Couldn't map OCM\n"); + + /* Write start address for CPU1. */ + bus_space_write_4(fdtbus_bs_tag, ocm_handle, 0, + pmap_kextract((vm_offset_t)mpentry)); + + /* + * The SCU is enabled by the BOOTROM but I think the second CPU doesn't + * turn on filtering until after the wake-up below. I think that's why + * things don't work if I don't put these cache ops here. Also, the + * magic location, 0xfffffff0, isn't in the SCU's filtering range so it + * needs a write-back too. + */ + cpu_idcache_wbinv_all(); + cpu_l2cache_wbinv_all(); + + /* Wake up CPU1. */ + armv7_sev(); + + bus_space_unmap(fdtbus_bs_tag, ocm_handle, 4); +} + +void +platform_ipi_send(cpuset_t cpus, u_int ipi) +{ + + pic_ipi_send(cpus, ipi); +} Modified: stable/10/sys/arm/xilinx/zy7_reg.h ============================================================================== --- stable/10/sys/arm/xilinx/zy7_reg.h Sat May 17 23:21:53 2014 (r266378) +++ stable/10/sys/arm/xilinx/zy7_reg.h Sat May 17 23:25:20 2014 (r266379) @@ -44,16 +44,13 @@ #define ZYNQ7_PLGP1_SIZE 0x40000000 /* I/O Peripheral registers. */ -#define ZYNQ7_PSIO_VBASE 0xE0000000 #define ZYNQ7_PSIO_HWBASE 0xE0000000 #define ZYNQ7_PSIO_SIZE 0x00300000 /* UART0 and UART1 */ -#define ZYNQ7_UART0_VBASE (ZYNQ7_PSIO_VBASE) #define ZYNQ7_UART0_HWBASE (ZYNQ7_PSIO_HWBASE) #define ZYNQ7_UART0_SIZE 0x1000 -#define ZYNQ7_UART1_VBASE (ZYNQ7_PSIO_VBASE+0x1000) #define ZYNQ7_UART1_HWBASE (ZYNQ7_PSIO_HWBASE+0x1000) #define ZYNQ7_UART1_SIZE 0x1000 @@ -63,15 +60,12 @@ #define ZYNQ7_SMC_SIZE 0x05000000 /* SLCR, PS system, and CPU private registers combined in this region. */ -#define ZYNQ7_PSCTL_VBASE 0xF8000000 #define ZYNQ7_PSCTL_HWBASE 0xF8000000 #define ZYNQ7_PSCTL_SIZE 0x01000000 -#define ZYNQ7_SLCR_VBASE (ZYNQ7_PSCTL_VBASE) #define ZYNQ7_SLCR_HWBASE (ZYNQ7_PSCTL_HWBASE) #define ZYNQ7_SLCR_SIZE 0x1000 -#define ZYNQ7_DEVCFG_VBASE (ZYNQ7_PSCTL_VBASE+0x7000) #define ZYNQ7_DEVCFG_HWBASE (ZYNQ7_PSCTL_HWBASE+0x7000) #define ZYNQ7_DEVCFG_SIZE 0x1000 From owner-svn-src-stable@FreeBSD.ORG Sat May 17 23:27:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB1715DD; Sat, 17 May 2014 23:27:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7DE992197; Sat, 17 May 2014 23:27:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HNR2QC084085; Sat, 17 May 2014 23:27:02 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HNR2wq084084; Sat, 17 May 2014 23:27:02 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405172327.s4HNR2wq084084@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 23:27:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266380 - stable/10/sys/arm/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 23:27:02 -0000 Author: ian Date: Sat May 17 23:27:02 2014 New Revision: 266380 URL: http://svnweb.freebsd.org/changeset/base/266380 Log: MFC 265156: Remove WANDBOARD.common, it was replaced by IMX6. Deleted: stable/10/sys/arm/conf/WANDBOARD.common Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Sat May 17 23:29:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E586B7A8; Sat, 17 May 2014 23:29:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D26FE21AB; Sat, 17 May 2014 23:29:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HNTjVh084418; Sat, 17 May 2014 23:29:45 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HNTjiv084417; Sat, 17 May 2014 23:29:45 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405172329.s4HNTjiv084417@svn.freebsd.org> From: Ian Lepore Date: Sat, 17 May 2014 23:29:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266381 - stable/10/sys/arm/rockchip X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 23:29:46 -0000 Author: ian Date: Sat May 17 23:29:45 2014 New Revision: 266381 URL: http://svnweb.freebsd.org/changeset/base/266381 Log: MFC 265207: Use arm_devmap_add_entry() to setup static device mapping. Modified: stable/10/sys/arm/rockchip/rk30xx_machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/rockchip/rk30xx_machdep.c ============================================================================== --- stable/10/sys/arm/rockchip/rk30xx_machdep.c Sat May 17 23:27:02 2014 (r266380) +++ stable/10/sys/arm/rockchip/rk30xx_machdep.c Sat May 17 23:29:45 2014 (r266381) @@ -49,14 +49,11 @@ __FBSDID("$FreeBSD$"); #include -/* Start of address space used for bootstrap map */ -#define DEVMAP_BOOTSTRAP_MAP_START 0xF0000000 - vm_offset_t initarm_lastaddr(void) { - return (DEVMAP_BOOTSTRAP_MAP_START); + return (arm_devmap_lastaddr()); } void @@ -79,27 +76,14 @@ initarm_late_init(void) CPU_CONTROL_DC_ENABLE|CPU_CONTROL_IC_ENABLE); } -#define FDT_DEVMAP_MAX (1 + 2 + 1 + 1) -static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = { - { 0, 0, 0, 0, 0, } -}; - /* - * Construct pmap_devmap[] with DT-derived config data. + * Set up static device mappings. */ int initarm_devmap_init(void) { - int i = 0; - - fdt_devmap[i].pd_va = 0xF0000000; - fdt_devmap[i].pd_pa = 0x20000000; - fdt_devmap[i].pd_size = 0x100000; - fdt_devmap[i].pd_prot = VM_PROT_READ | VM_PROT_WRITE; - fdt_devmap[i].pd_cache = PTE_DEVICE; - i++; - arm_devmap_register_table(&fdt_devmap[0]); + arm_devmap_add_entry(0x20000000, 0x00100000); return (0); } From owner-svn-src-stable@FreeBSD.ORG Sun May 18 00:15:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 621DAE18; Sun, 18 May 2014 00:15:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4EAA424F3; Sun, 18 May 2014 00:15:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4I0FnBo014961; Sun, 18 May 2014 00:15:49 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4I0FmRf014958; Sun, 18 May 2014 00:15:48 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405180015.s4I0FmRf014958@svn.freebsd.org> From: Ian Lepore Date: Sun, 18 May 2014 00:15:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266382 - in stable/10/sys: boot/fdt/dts/arm dev/sdhci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 May 2014 00:15:49 -0000 Author: ian Date: Sun May 18 00:15:48 2014 New Revision: 266382 URL: http://svnweb.freebsd.org/changeset/base/266382 Log: MFC 265208: Honor the max-frequency property if it appears in the fdt data. Modified: stable/10/sys/boot/fdt/dts/arm/exynos5250.dtsi stable/10/sys/boot/fdt/dts/arm/zedboard.dts stable/10/sys/dev/sdhci/sdhci_fdt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/fdt/dts/arm/exynos5250.dtsi ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/exynos5250.dtsi Sat May 17 23:29:45 2014 (r266381) +++ stable/10/sys/boot/fdt/dts/arm/exynos5250.dtsi Sun May 18 00:15:48 2014 (r266382) @@ -126,7 +126,7 @@ reg = <0x12200000 0x1000>; interrupts = <107>; interrupt-parent = <&GIC>; - clock-frequency = <24000000>; /* TODO: verify freq */ + max-frequency = <24000000>; /* TODO: verify freq */ }; sdhci@12210000 { @@ -134,7 +134,7 @@ reg = <0x12210000 0x1000>; interrupts = <108>; interrupt-parent = <&GIC>; - clock-frequency = <24000000>; + max-frequency = <24000000>; }; sdhci@12220000 { @@ -142,7 +142,7 @@ reg = <0x12220000 0x1000>; interrupts = <109>; interrupt-parent = <&GIC>; - clock-frequency = <24000000>; + max-frequency = <24000000>; }; sdhci@12230000 { @@ -150,7 +150,7 @@ reg = <0x12230000 0x1000>; interrupts = <110>; interrupt-parent = <&GIC>; - clock-frequency = <24000000>; + max-frequency = <24000000>; }; serial0: serial@12C00000 { Modified: stable/10/sys/boot/fdt/dts/arm/zedboard.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/zedboard.dts Sat May 17 23:29:45 2014 (r266381) +++ stable/10/sys/boot/fdt/dts/arm/zedboard.dts Sun May 18 00:15:48 2014 (r266382) @@ -183,7 +183,7 @@ reg = <0x100000 0x1000>; interrupts = <56>; interrupt-parent = <&GIC>; - clock-frequency = <50000000>; + max-frequency = <50000000>; }; // QSPI Modified: stable/10/sys/dev/sdhci/sdhci_fdt.c ============================================================================== --- stable/10/sys/dev/sdhci/sdhci_fdt.c Sat May 17 23:29:45 2014 (r266381) +++ stable/10/sys/dev/sdhci/sdhci_fdt.c Sun May 18 00:15:48 2014 (r266382) @@ -66,6 +66,7 @@ struct sdhci_fdt_softc { device_t dev; /* Controller device */ u_int quirks; /* Chip specific quirks */ u_int caps; /* If we override SDHCI_CAPABILITIES */ + uint32_t max_clk; /* Max possible freq */ struct resource *irq_res; /* IRQ resource */ void *intrhand; /* Interrupt handle */ @@ -156,6 +157,7 @@ sdhci_fdt_probe(device_t dev) sc->quirks = 0; sc->num_slots = 1; + sc->max_clk = 0; if (!ofw_bus_status_okay(dev)) return (ENXIO); @@ -170,11 +172,14 @@ sdhci_fdt_probe(device_t dev) node = ofw_bus_get_node(dev); - /* Allow dts to patch quirks and slots. */ - if ((OF_getprop(node, "quirks", &cid, sizeof(cid))) > 0) - sc->quirks = fdt32_to_cpu(cid); - if ((OF_getprop(node, "num-slots", &cid, sizeof(cid))) > 0) - sc->num_slots = fdt32_to_cpu(cid); + /* Allow dts to patch quirks, slots, and max-frequency. */ + if ((OF_getencprop(node, "quirks", &cid, sizeof(cid))) > 0) + sc->quirks = cid; + if ((OF_getencprop(node, "num-slots", &cid, sizeof(cid))) > 0) + sc->num_slots = cid; + if ((OF_getencprop(node, "max-frequency", &cid, sizeof(cid))) > 0) + sc->max_clk = cid; + return (0); } @@ -214,6 +219,7 @@ sdhci_fdt_attach(device_t dev) slot->quirks = sc->quirks; slot->caps = sc->caps; + slot->max_clk = sc->max_clk; if (sdhci_init_slot(dev, slot, i) != 0) continue; From owner-svn-src-stable@FreeBSD.ORG Sun May 18 00:21:19 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31FDEFA9; Sun, 18 May 2014 00:21:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E8D32575; Sun, 18 May 2014 00:21:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4I0LIfJ016305; Sun, 18 May 2014 00:21:18 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4I0LExE016278; Sun, 18 May 2014 00:21:14 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405180021.s4I0LExE016278@svn.freebsd.org> From: Ian Lepore Date: Sun, 18 May 2014 00:21:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266383 - in stable/10: . sys/arm/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 May 2014 00:21:19 -0000 Author: ian Date: Sun May 18 00:21:14 2014 New Revision: 266383 URL: http://svnweb.freebsd.org/changeset/base/266383 Log: MFC 265155, 265254: Omit from the universe build all config files tagged with #NO_UNIVERSE. Add FDT to the VYBRID kernel. Added: stable/10/sys/arm/conf/VYBRID - copied, changed from r265155, head/sys/arm/conf/VYBRID Deleted: stable/10/sys/arm/conf/VYBRID.common Modified: stable/10/Makefile stable/10/sys/arm/conf/ARNDALE stable/10/sys/arm/conf/BWCT stable/10/sys/arm/conf/COLIBRI-VF50 stable/10/sys/arm/conf/COSMIC stable/10/sys/arm/conf/EB9200 stable/10/sys/arm/conf/ETHERNUT5 stable/10/sys/arm/conf/HL200 stable/10/sys/arm/conf/HL201 stable/10/sys/arm/conf/KB920X stable/10/sys/arm/conf/NSLU stable/10/sys/arm/conf/QILA9G20 stable/10/sys/arm/conf/QUARTZ stable/10/sys/arm/conf/SAM9260EK stable/10/sys/arm/conf/SAM9X25EK stable/10/sys/arm/conf/SN9G45 stable/10/sys/arm/conf/WANDBOARD-DUAL stable/10/sys/arm/conf/WANDBOARD-QUAD stable/10/sys/arm/conf/WANDBOARD-SOLO Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile ============================================================================== --- stable/10/Makefile Sun May 18 00:15:48 2014 (r266382) +++ stable/10/Makefile Sun May 18 00:21:14 2014 (r266383) @@ -473,9 +473,15 @@ universe_kernels: universe_kernconfs .if !defined(TARGET) TARGET!= uname -m .endif +.if defined(MAKE_ALL_KERNELS) +_THINNER=cat +.else +_THINNER=xargs grep -L "^.NO_UNIVERSE" +.endif KERNCONFS!= cd ${KERNSRCDIR}/${TARGET}/conf && \ find [A-Z0-9]*[A-Z0-9] -type f -maxdepth 0 \ - ! -name DEFAULTS ! -name NOTES + ! -name DEFAULTS ! -name NOTES | \ + ${_THINNER} universe_kernconfs: .for kernel in ${KERNCONFS} TARGET_ARCH_${kernel}!= cd ${KERNSRCDIR}/${TARGET}/conf && \ Modified: stable/10/sys/arm/conf/ARNDALE ============================================================================== --- stable/10/sys/arm/conf/ARNDALE Sun May 18 00:15:48 2014 (r266382) +++ stable/10/sys/arm/conf/ARNDALE Sun May 18 00:21:14 2014 (r266383) @@ -17,6 +17,8 @@ # # $FreeBSD$ +#NO_UNIVERSE + include "EXYNOS5250.common" ident ARNDALE Modified: stable/10/sys/arm/conf/BWCT ============================================================================== --- stable/10/sys/arm/conf/BWCT Sun May 18 00:15:48 2014 (r266382) +++ stable/10/sys/arm/conf/BWCT Sun May 18 00:21:14 2014 (r266383) @@ -17,6 +17,8 @@ # # $FreeBSD$ +#NO_UNIVERSE + ident BWCT options VERBOSE_INIT_ARM Modified: stable/10/sys/arm/conf/COLIBRI-VF50 ============================================================================== --- stable/10/sys/arm/conf/COLIBRI-VF50 Sun May 18 00:15:48 2014 (r266382) +++ stable/10/sys/arm/conf/COLIBRI-VF50 Sun May 18 00:21:14 2014 (r266383) @@ -17,7 +17,9 @@ # # $FreeBSD$ -include "VYBRID.common" +#NO_UNIVERSE + +include "VYBRID" ident COLIBRI-VF50 #FDT Modified: stable/10/sys/arm/conf/COSMIC ============================================================================== --- stable/10/sys/arm/conf/COSMIC Sun May 18 00:15:48 2014 (r266382) +++ stable/10/sys/arm/conf/COSMIC Sun May 18 00:21:14 2014 (r266383) @@ -17,7 +17,9 @@ # # $FreeBSD$ -include "VYBRID.common" +#NO_UNIVERSE + +include "VYBRID" ident COSMIC #FDT Modified: stable/10/sys/arm/conf/EB9200 ============================================================================== --- stable/10/sys/arm/conf/EB9200 Sun May 18 00:15:48 2014 (r266382) +++ stable/10/sys/arm/conf/EB9200 Sun May 18 00:21:14 2014 (r266383) @@ -12,6 +12,8 @@ # # $FreeBSD$ +#NO_UNIVERSE + ident EB9200 include "../at91/std.eb9200" Modified: stable/10/sys/arm/conf/ETHERNUT5 ============================================================================== --- stable/10/sys/arm/conf/ETHERNUT5 Sun May 18 00:15:48 2014 (r266382) +++ stable/10/sys/arm/conf/ETHERNUT5 Sun May 18 00:21:14 2014 (r266383) @@ -17,6 +17,8 @@ # # $FreeBSD$ +#NO_UNIVERSE + ident ETHERNUT5 include "../at91/std.ethernut5" Modified: stable/10/sys/arm/conf/HL200 ============================================================================== --- stable/10/sys/arm/conf/HL200 Sun May 18 00:15:48 2014 (r266382) +++ stable/10/sys/arm/conf/HL200 Sun May 18 00:21:14 2014 (r266383) @@ -17,6 +17,8 @@ # # $FreeBSD$ +#NO_UNIVERSE + ident HL200 include "../at91/std.hl200" Modified: stable/10/sys/arm/conf/HL201 ============================================================================== --- stable/10/sys/arm/conf/HL201 Sun May 18 00:15:48 2014 (r266382) +++ stable/10/sys/arm/conf/HL201 Sun May 18 00:21:14 2014 (r266383) @@ -17,6 +17,8 @@ # # $FreeBSD$ +#NO_UNIVERSE + ident HL201 include "../at91/std.hl201" Modified: stable/10/sys/arm/conf/KB920X ============================================================================== --- stable/10/sys/arm/conf/KB920X Sun May 18 00:15:48 2014 (r266382) +++ stable/10/sys/arm/conf/KB920X Sun May 18 00:21:14 2014 (r266383) @@ -18,6 +18,8 @@ # # $FreeBSD$ +#NO_UNIVERSE + ident KB920X include "../at91/std.kb920x" Modified: stable/10/sys/arm/conf/NSLU ============================================================================== --- stable/10/sys/arm/conf/NSLU Sun May 18 00:15:48 2014 (r266382) +++ stable/10/sys/arm/conf/NSLU Sun May 18 00:21:14 2014 (r266383) @@ -17,6 +17,8 @@ # # $FreeBSD$ +#NO_UNIVERSE + ident NSLU # XXX What is defined in std.avila does not exactly match the following: Modified: stable/10/sys/arm/conf/QILA9G20 ============================================================================== --- stable/10/sys/arm/conf/QILA9G20 Sun May 18 00:15:48 2014 (r266382) +++ stable/10/sys/arm/conf/QILA9G20 Sun May 18 00:21:14 2014 (r266383) @@ -18,6 +18,8 @@ # # $FreeBSD$ +#NO_UNIVERSE + ident QILA9G20 include "../at91/std.qila9g20" Modified: stable/10/sys/arm/conf/QUARTZ ============================================================================== --- stable/10/sys/arm/conf/QUARTZ Sun May 18 00:15:48 2014 (r266382) +++ stable/10/sys/arm/conf/QUARTZ Sun May 18 00:21:14 2014 (r266383) @@ -17,7 +17,9 @@ # # $FreeBSD$ -include "VYBRID.common" +#NO_UNIVERSE + +include "VYBRID" ident QUARTZ #FDT Modified: stable/10/sys/arm/conf/SAM9260EK ============================================================================== --- stable/10/sys/arm/conf/SAM9260EK Sun May 18 00:15:48 2014 (r266382) +++ stable/10/sys/arm/conf/SAM9260EK Sun May 18 00:21:14 2014 (r266383) @@ -17,6 +17,8 @@ # # $FreeBSD$ +#NO_UNIVERSE + ident SAM9260EK include "../at91/std.sam9260ek" Modified: stable/10/sys/arm/conf/SAM9X25EK ============================================================================== --- stable/10/sys/arm/conf/SAM9X25EK Sun May 18 00:15:48 2014 (r266382) +++ stable/10/sys/arm/conf/SAM9X25EK Sun May 18 00:21:14 2014 (r266383) @@ -17,7 +17,8 @@ # # $FreeBSD$ -# NOUNIVERSE: disable building in make universe +#NO_UNIVERSE + ident SAM9X25EK include "../at91/std.sam9x25ek" Modified: stable/10/sys/arm/conf/SN9G45 ============================================================================== --- stable/10/sys/arm/conf/SN9G45 Sun May 18 00:15:48 2014 (r266382) +++ stable/10/sys/arm/conf/SN9G45 Sun May 18 00:21:14 2014 (r266383) @@ -17,6 +17,8 @@ # # $FreeBSD$ +#NO_UNIVERSE + ident SN9G45 include "../at91/std.sn9g45" Copied and modified: stable/10/sys/arm/conf/VYBRID (from r265155, head/sys/arm/conf/VYBRID) ============================================================================== --- head/sys/arm/conf/VYBRID Wed Apr 30 18:02:10 2014 (r265155, copy source) +++ stable/10/sys/arm/conf/VYBRID Sun May 18 00:21:14 2014 (r266383) @@ -147,3 +147,5 @@ device kbdmux options SC_DFLT_FONT # compile font in makeoptions SC_DFLT_FONT=cp437 device ukbd + +options FDT Modified: stable/10/sys/arm/conf/WANDBOARD-DUAL ============================================================================== --- stable/10/sys/arm/conf/WANDBOARD-DUAL Sun May 18 00:15:48 2014 (r266382) +++ stable/10/sys/arm/conf/WANDBOARD-DUAL Sun May 18 00:21:14 2014 (r266383) @@ -17,6 +17,8 @@ # # $FreeBSD$ +#NO_UNIVERSE + include "IMX6" ident WANDBOARD-DUAL Modified: stable/10/sys/arm/conf/WANDBOARD-QUAD ============================================================================== --- stable/10/sys/arm/conf/WANDBOARD-QUAD Sun May 18 00:15:48 2014 (r266382) +++ stable/10/sys/arm/conf/WANDBOARD-QUAD Sun May 18 00:21:14 2014 (r266383) @@ -17,6 +17,8 @@ # # $FreeBSD$ +#NO_UNIVERSE + include "IMX6" ident WANDBOARD-QUAD Modified: stable/10/sys/arm/conf/WANDBOARD-SOLO ============================================================================== --- stable/10/sys/arm/conf/WANDBOARD-SOLO Sun May 18 00:15:48 2014 (r266382) +++ stable/10/sys/arm/conf/WANDBOARD-SOLO Sun May 18 00:21:14 2014 (r266383) @@ -17,6 +17,8 @@ # # $FreeBSD$ +#NO_UNIVERSE + include "IMX6" ident WANDBOARD-SOLO From owner-svn-src-stable@FreeBSD.ORG Sun May 18 00:26:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 57EA71A9; Sun, 18 May 2014 00:26:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A8DD25A5; Sun, 18 May 2014 00:26:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4I0QhTK021024; Sun, 18 May 2014 00:26:43 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4I0Qgis021019; Sun, 18 May 2014 00:26:42 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405180026.s4I0Qgis021019@svn.freebsd.org> From: Ian Lepore Date: Sun, 18 May 2014 00:26:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266384 - in stable/10/sys/arm: arm freescale/imx include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 May 2014 00:26:43 -0000 Author: ian Date: Sun May 18 00:26:42 2014 New Revision: 266384 URL: http://svnweb.freebsd.org/changeset/base/266384 Log: MFC 265440, 265441, 265444, 265445, 265446, 265447: Move the pl310.enabled tunable to hw.pl310.enabled. Clean up a few minor style(9) nits. Use DEVMETHOD_END. Break out the code that figures out the L2 cache geometry to its own routine, so that it can be called from multiple places in upcoming changes. Call platform_pl310_init() before enabling the controller, and handle the case where the controller is already enabled. Add defines for the bits in the PL310 debug control register. Add a public routine to set the L2 cache ram latencies. This can be called by platform init routines to fine-tune cache performance. Enable PL310 power-saving modes and tune the cache ram latencies for imx6. Modified: stable/10/sys/arm/arm/pl310.c stable/10/sys/arm/freescale/imx/imx6_pl310.c stable/10/sys/arm/include/pl310.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/pl310.c ============================================================================== --- stable/10/sys/arm/arm/pl310.c Sun May 18 00:21:14 2014 (r266383) +++ stable/10/sys/arm/arm/pl310.c Sun May 18 00:26:42 2014 (r266384) @@ -71,7 +71,7 @@ __FBSDID("$FreeBSD$"); } while(0); static int pl310_enabled = 1; -TUNABLE_INT("pl310.enabled", &pl310_enabled); +TUNABLE_INT("hw.pl310.enabled", &pl310_enabled); static uint32_t g_l2cache_way_mask; @@ -125,6 +125,35 @@ pl310_print_config(struct pl310_softc *s (prefetch & PREFETCH_CTRL_OFFSET_MASK)); } +void +pl310_set_ram_latency(struct pl310_softc *sc, uint32_t which_reg, + uint32_t read, uint32_t write, uint32_t setup) +{ + uint32_t v; + + KASSERT(which_reg == PL310_TAG_RAM_CTRL || + which_reg == PL310_DATA_RAM_CTRL, + ("bad pl310 ram latency register address")); + + v = pl310_read4(sc, which_reg); + if (setup != 0) { + KASSERT(setup <= 8, ("bad pl310 setup latency: %d", setup)); + v &= ~RAM_CTRL_SETUP_MASK; + v |= (setup - 1) << RAM_CTRL_SETUP_SHIFT; + } + if (read != 0) { + KASSERT(read <= 8, ("bad pl310 read latency: %d", read)); + v &= ~RAM_CTRL_READ_MASK; + v |= (read - 1) << RAM_CTRL_READ_SHIFT; + } + if (write != 0) { + KASSERT(write <= 8, ("bad pl310 write latency: %d", write)); + v &= ~RAM_CTRL_WRITE_MASK; + v |= (write - 1) << RAM_CTRL_WRITE_SHIFT; + } + pl310_write4(sc, which_reg, v); +} + static int pl310_filter(void *arg) { @@ -149,7 +178,8 @@ static __inline void pl310_wait_background_op(uint32_t off, uint32_t mask) { - while (pl310_read4(pl310_softc, off) & mask); + while (pl310_read4(pl310_softc, off) & mask) + continue; } @@ -167,6 +197,7 @@ pl310_wait_background_op(uint32_t off, u static __inline void pl310_cache_sync(void) { + if ((pl310_softc == NULL) || !pl310_softc->sc_enabled) return; @@ -318,6 +349,23 @@ pl310_inv_range(vm_paddr_t start, vm_siz PL310_UNLOCK(pl310_softc); } +static void +pl310_set_way_sizes(struct pl310_softc *sc) +{ + uint32_t aux_value; + + aux_value = pl310_read4(sc, PL310_AUX_CTRL); + g_way_size = (aux_value & AUX_CTRL_WAY_SIZE_MASK) >> + AUX_CTRL_WAY_SIZE_SHIFT; + g_way_size = 1 << (g_way_size + 13); + if (aux_value & (1 << AUX_CTRL_ASSOCIATIVITY_SHIFT)) + g_ways_assoc = 16; + else + g_ways_assoc = 8; + g_l2cache_way_mask = (1 << g_ways_assoc) - 1; + g_l2cache_size = g_way_size * g_ways_assoc; +} + static int pl310_probe(device_t dev) { @@ -335,12 +383,11 @@ static int pl310_attach(device_t dev) { struct pl310_softc *sc = device_get_softc(dev); - int rid = 0; - uint32_t aux_value; - uint32_t ctrl_value; - uint32_t cache_id; + int rid; + uint32_t cache_id, debug_ctrl; sc->sc_dev = dev; + rid = 0; sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (sc->sc_mem_res == NULL) @@ -356,7 +403,6 @@ pl310_attach(device_t dev) pl310_softc = sc; mtx_init(&sc->sc_mtx, "pl310lock", NULL, MTX_SPIN); - sc->sc_enabled = pl310_enabled; /* activate the interrupt */ bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_MISC | INTR_MPSAFE, @@ -368,39 +414,49 @@ pl310_attach(device_t dev) device_printf(dev, "Part number: 0x%x, release: 0x%x\n", (cache_id >> CACHE_ID_PARTNUM_SHIFT) & CACHE_ID_PARTNUM_MASK, (cache_id >> CACHE_ID_RELEASE_SHIFT) & CACHE_ID_RELEASE_MASK); - aux_value = pl310_read4(sc, PL310_AUX_CTRL); - g_way_size = (aux_value & AUX_CTRL_WAY_SIZE_MASK) >> - AUX_CTRL_WAY_SIZE_SHIFT; - g_way_size = 1 << (g_way_size + 13); - if (aux_value & (1 << AUX_CTRL_ASSOCIATIVITY_SHIFT)) - g_ways_assoc = 16; - else - g_ways_assoc = 8; - g_l2cache_way_mask = (1 << g_ways_assoc) - 1; - g_l2cache_size = g_way_size * g_ways_assoc; - /* Print the information */ - device_printf(dev, "L2 Cache: %uKB/%dB %d ways\n", (g_l2cache_size / 1024), - g_l2cache_line_size, g_ways_assoc); - ctrl_value = pl310_read4(sc, PL310_CTRL); + /* + * If L2 cache is already enabled then something has violated the rules, + * because caches are supposed to be off at kernel entry. The cache + * must be disabled to write the configuration registers without + * triggering an access error (SLVERR), but there's no documented safe + * procedure for disabling the L2 cache in the manual. So we'll try to + * invent one: + * - Use the debug register to force write-through mode and prevent + * linefills (allocation of new lines on read); now anything we do + * will not cause new data to come into the L2 cache. + * - Writeback and invalidate the current contents. + * - Disable the controller. + * - Restore the original debug settings. + */ + if (pl310_read4(sc, PL310_CTRL) & CTRL_ENABLED) { + device_printf(dev, "Warning: L2 Cache should not already be " + "active; trying to de-activate and re-initialize...\n"); + sc->sc_enabled = 1; + debug_ctrl = pl310_read4(sc, PL310_DEBUG_CTRL); + platform_pl310_write_debug(sc, debug_ctrl | + DEBUG_CTRL_DISABLE_WRITEBACK | DEBUG_CTRL_DISABLE_LINEFILL); + pl310_set_way_sizes(sc); + pl310_wbinv_all(); + platform_pl310_write_ctrl(sc, CTRL_DISABLED); + platform_pl310_write_debug(sc, debug_ctrl); + } + sc->sc_enabled = pl310_enabled; - if (sc->sc_enabled && !(ctrl_value & CTRL_ENABLED)) { - /* invalidate current content */ + if (sc->sc_enabled) { + platform_pl310_init(sc); + pl310_set_way_sizes(sc); /* platform init might change these */ pl310_write4(pl310_softc, PL310_INV_WAY, 0xffff); pl310_wait_background_op(PL310_INV_WAY, 0xffff); - - /* Enable the L2 cache if disabled */ platform_pl310_write_ctrl(sc, CTRL_ENABLED); - device_printf(dev, "L2 Cache enabled\n"); + device_printf(dev, "L2 Cache enabled: %uKB/%dB %d ways\n", + (g_l2cache_size / 1024), g_l2cache_line_size, g_ways_assoc); if (bootverbose) pl310_print_config(sc); - } - - if (!sc->sc_enabled && (ctrl_value & CTRL_ENABLED)) { + } else { /* - * Set counters so when cache event happens - * we'll get interrupt and be warned that something - * is off + * Set counters so when cache event happens we'll get interrupt + * and be warned that something is off. */ /* Cache Line Eviction for Counter 0 */ @@ -410,12 +466,6 @@ pl310_attach(device_t dev) pl310_write4(sc, PL310_EVENT_COUNTER1_CONF, EVENT_COUNTER_CONF_INCR | EVENT_COUNTER_CONF_DRREQ); - /* Temporary switch on for final flush*/ - sc->sc_enabled = 1; - pl310_wbinv_all(); - sc->sc_enabled = 0; - platform_pl310_write_ctrl(sc, CTRL_DISABLED); - /* Enable and clear pending interrupts */ pl310_write4(sc, PL310_INTR_CLEAR, INTR_MASK_ECNTR); pl310_write4(sc, PL310_INTR_MASK, INTR_MASK_ALL); @@ -429,11 +479,6 @@ pl310_attach(device_t dev) device_printf(dev, "L2 Cache disabled\n"); } - if (sc->sc_enabled) - platform_pl310_init(sc); - - pl310_wbinv_all(); - /* Set the l2 functions in the set of cpufuncs */ cpufuncs.cf_l2cache_wbinv_all = pl310_wbinv_all; cpufuncs.cf_l2cache_wbinv_range = pl310_wbinv_range; @@ -446,7 +491,7 @@ pl310_attach(device_t dev) static device_method_t pl310_methods[] = { DEVMETHOD(device_probe, pl310_probe), DEVMETHOD(device_attach, pl310_attach), - {0, 0}, + DEVMETHOD_END }; static driver_t pl310_driver = { Modified: stable/10/sys/arm/freescale/imx/imx6_pl310.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx6_pl310.c Sun May 18 00:21:14 2014 (r266383) +++ stable/10/sys/arm/freescale/imx/imx6_pl310.c Sun May 18 00:26:42 2014 (r266384) @@ -44,6 +44,19 @@ __FBSDID("$FreeBSD$"); void platform_pl310_init(struct pl310_softc *sc) { + uint32_t reg; + + /* + * Enable power saving modes: + * - Dynamic Gating stops the clock when the controller is idle. + * - Standby stops the clock when the cores are in WFI mode. + */ + reg = pl310_read4(sc, PL310_POWER_CTRL); + reg |= POWER_CTRL_ENABLE_GATING | POWER_CTRL_ENABLE_STANDBY; + pl310_write4(sc, PL310_POWER_CTRL, reg); + + pl310_set_ram_latency(sc, PL310_TAG_RAM_CTRL, 4, 2, 3); + pl310_set_ram_latency(sc, PL310_DATA_RAM_CTRL, 4, 2, 3); } void Modified: stable/10/sys/arm/include/pl310.h ============================================================================== --- stable/10/sys/arm/include/pl310.h Sun May 18 00:21:14 2014 (r266383) +++ stable/10/sys/arm/include/pl310.h Sun May 18 00:26:42 2014 (r266384) @@ -62,6 +62,14 @@ #define AUX_CTRL_DATA_PREFETCH (1 << 28) #define AUX_CTRL_INSTR_PREFETCH (1 << 29) #define AUX_CTRL_EARLY_BRESP (1 << 30) +#define PL310_TAG_RAM_CTRL 0x108 +#define PL310_DATA_RAM_CTRL 0x10C +#define RAM_CTRL_WRITE_SHIFT 8 +#define RAM_CTRL_WRITE_MASK (0x7 << 8) +#define RAM_CTRL_READ_SHIFT 4 +#define RAM_CTRL_READ_MASK (0x7 << 4) +#define RAM_CTRL_SETUP_SHIFT 0 +#define RAM_CTRL_SETUP_MASK (0x7 << 0) #define PL310_EVENT_COUNTER_CTRL 0x200 #define EVENT_COUNTER_CTRL_ENABLED (1 << 0) #define EVENT_COUNTER_CTRL_C0_RESET (1 << 1) @@ -113,6 +121,9 @@ #define PL310_ADDR_FILTER_STAR 0xC00 #define PL310_ADDR_FILTER_END 0xC04 #define PL310_DEBUG_CTRL 0xF40 +#define DEBUG_CTRL_DISABLE_LINEFILL (1 << 0) +#define DEBUG_CTRL_DISABLE_WRITEBACK (1 << 1) +#define DEBUG_CTRL_SPNIDEN (1 << 2) #define PL310_PREFETCH_CTRL 0xF60 #define PREFETCH_CTRL_OFFSET_MASK (0x1f) #define PREFETCH_CTRL_NOTSAMEID (1 << 21) @@ -123,6 +134,8 @@ #define PREFETCH_CTRL_INSTR_PREFETCH (1 << 29) #define PREFETCH_CTRL_DL (1 << 30) #define PL310_POWER_CTRL 0xF60 +#define POWER_CTRL_ENABLE_GATING (1 << 0) +#define POWER_CTRL_ENABLE_STANDBY (1 << 1) struct pl310_softc { device_t sc_dev; @@ -162,6 +175,8 @@ pl310_write4(struct pl310_softc *sc, bus } void pl310_print_config(struct pl310_softc *sc); +void pl310_set_ram_latency(struct pl310_softc *sc, uint32_t which_reg, + uint32_t read, uint32_t write, uint32_t setup); void platform_pl310_init(struct pl310_softc *); void platform_pl310_write_ctrl(struct pl310_softc *, uint32_t); From owner-svn-src-stable@FreeBSD.ORG Sun May 18 00:30:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 826BD2EA; Sun, 18 May 2014 00:30:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6342E25B5; Sun, 18 May 2014 00:30:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4I0U5W7021529; Sun, 18 May 2014 00:30:05 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4I0U403021524; Sun, 18 May 2014 00:30:04 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405180030.s4I0U403021524@svn.freebsd.org> From: Ian Lepore Date: Sun, 18 May 2014 00:30:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266385 - in stable/10/sys/arm: arm mv/armadaxp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 May 2014 00:30:05 -0000 Author: ian Date: Sun May 18 00:30:04 2014 New Revision: 266385 URL: http://svnweb.freebsd.org/changeset/base/266385 Log: MFC 265694, 265705, 265784: Move the mptramp code which is specific to the Marvell ArmadaXP SoC out of the common locore.S file and into the mv/armadaxp directory. Consolidate all the AP core startup stuff under a single #ifdef SMP block Call idcache_inv_all from the AP core entry code before turning on the MMU. Also, enable instruction and branch caches, which should be safe now that they're properly initialized/invalidated first. Added: stable/10/sys/arm/mv/armadaxp/mptramp.S - copied unchanged from r265694, head/sys/arm/mv/armadaxp/mptramp.S Modified: stable/10/sys/arm/arm/cpufunc_asm_armv7.S stable/10/sys/arm/arm/locore.S stable/10/sys/arm/mv/armadaxp/files.armadaxp Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/cpufunc_asm_armv7.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_armv7.S Sun May 18 00:26:42 2014 (r266384) +++ stable/10/sys/arm/arm/cpufunc_asm_armv7.S Sun May 18 00:30:04 2014 (r266385) @@ -319,6 +319,10 @@ ENTRY(armv7_auxctrl) RET END(armv7_auxctrl) +/* + * Invalidate all I+D+branch cache. Used by startup code, which counts + * on the fact that only r0-r3,ip are modified and no stack space is used. + */ ENTRY(armv7_idcache_inv_all) mov r0, #0 mcr p15, 2, r0, c0, c0, 0 @ set cache level to L1 Modified: stable/10/sys/arm/arm/locore.S ============================================================================== --- stable/10/sys/arm/arm/locore.S Sun May 18 00:26:42 2014 (r266384) +++ stable/10/sys/arm/arm/locore.S Sun May 18 00:30:04 2014 (r266385) @@ -308,11 +308,6 @@ Lreal_start: Lend: .word _edata -#ifdef SMP -Lstartup_pagetable_secondary: - .word temp_pagetable -#endif - .Lstart: .word _edata .word _ebss @@ -320,10 +315,6 @@ Lstartup_pagetable_secondary: .Lvirt_done: .word virt_done -#if defined(SMP) -.Lmpvirt_done: - .word mpvirt_done -#endif .Lmainreturned: .asciz "main() returned" @@ -349,104 +340,59 @@ pagetable: .word _C_LABEL(cpufuncs) #if defined(SMP) -Lsramaddr: - .word 0xffff0080 - -#if 0 -#define AP_DEBUG(tmp) \ - mrc p15, 0, r1, c0, c0, 5; \ - ldr r0, Lsramaddr; \ - add r0, r1, lsl #2; \ - mov r1, tmp; \ - str r1, [r0], #0x0000; -#else -#define AP_DEBUG(tmp) -#endif - - -ASENTRY_NP(mptramp) - mov r0, #0 - mcr p15, 0, r0, c7, c7, 0 - - AP_DEBUG(#1) - - mrs r3, cpsr - bic r3, r3, #(PSR_MODE) - orr r3, r3, #(PSR_SVC32_MODE) - msr cpsr_fsxc, r3 - - mrc p15, 0, r0, c0, c0, 5 - and r0, #0x0f /* Get CPU ID */ - /* Read boot address for CPU */ - mov r1, #0x100 - mul r2, r0, r1 - ldr r1, Lpmureg - add r0, r2, r1 - ldr r1, [r0], #0x00 - - mov pc, r1 - -Lpmureg: - .word 0xd0022124 -END(mptramp) +.Lmpvirt_done: + .word mpvirt_done +Lstartup_pagetable_secondary: + .word temp_pagetable ASENTRY_NP(mpentry) - AP_DEBUG(#2) - /* Make sure interrupts are disabled. */ mrs r7, cpsr orr r7, r7, #(I32_bit|F32_bit) msr cpsr_c, r7 - - adr r7, Ltag - bic r7, r7, #0xf0000000 - orr r7, r7, #PHYSADDR - - /* Disable MMU for a while */ + /* Disable MMU. It should be disabled already, but make sure. */ mrc p15, 0, r2, c1, c0, 0 bic r2, r2, #(CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_DC_ENABLE |\ CPU_CONTROL_WBUF_ENABLE) bic r2, r2, #(CPU_CONTROL_IC_ENABLE) bic r2, r2, #(CPU_CONTROL_BPRD_ENABLE) mcr p15, 0, r2, c1, c0, 0 - nop nop nop + CPWAIT(r0) - AP_DEBUG(#3) +#if defined(ARM_MMU_V6) + bl armv6_idcache_inv_all /* Modifies r0 only */ +#elif defined(ARM_MMU_V7) + bl armv7_idcache_inv_all /* Modifies r0-r3, ip */ +#endif -Ltag: ldr r0, Lstartup_pagetable_secondary bic r0, r0, #0xf0000000 orr r0, r0, #PHYSADDR ldr r0, [r0] -#if defined(SMP) orr r0, r0, #2 /* Set TTB shared memory flag */ -#endif mcr p15, 0, r0, c2, c0, 0 /* Set TTB */ mcr p15, 0, r0, c8, c7, 0 /* Flush TLB */ -#if defined(CPU_ARM1136) || defined(CPU_ARM1176) || defined(CPU_MV_PJ4B) || defined(CPU_CORTEXA) || defined(CPU_KRAIT) mov r0, #0 mcr p15, 0, r0, c13, c0, 1 /* Set ASID to 0 */ -#endif - - AP_DEBUG(#4) /* Set the Domain Access register. Very important! */ mov r0, #((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT) mcr p15, 0, r0, c3, c0, 0 /* Enable MMU */ mrc p15, 0, r0, c1, c0, 0 -#if defined(CPU_ARM1136) || defined(CPU_ARM1176) || defined(CPU_MV_PJ4B) || defined(CPU_CORTEXA) || defined(CPU_KRAIT) orr r0, r0, #CPU_CONTROL_V6_EXTPAGE orr r0, r0, #CPU_CONTROL_AF_ENABLE -#endif - orr r0, r0, #(CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_DC_ENABLE) + orr r0, r0, #(CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_DC_ENABLE |\ + CPU_CONTROL_WBUF_ENABLE) + orr r0, r0, #(CPU_CONTROL_IC_ENABLE) + orr r0, r0, #(CPU_CONTROL_BPRD_ENABLE) mcr p15, 0, r0, c1, c0, 0 nop nop @@ -473,7 +419,7 @@ mpvirt_done: /* NOTREACHED */ .Lmpreturned: - .asciz "main() returned" + .asciz "init_secondary() returned" .align 0 END(mpentry) #endif Modified: stable/10/sys/arm/mv/armadaxp/files.armadaxp ============================================================================== --- stable/10/sys/arm/mv/armadaxp/files.armadaxp Sun May 18 00:26:42 2014 (r266384) +++ stable/10/sys/arm/mv/armadaxp/files.armadaxp Sun May 18 00:30:04 2014 (r266385) @@ -4,3 +4,5 @@ arm/mv/armadaxp/armadaxp.c standard arm/mv/mpic.c standard arm/mv/rtc.c standard arm/mv/armadaxp/armadaxp_mp.c optional smp +arm/mv/armadaxp/mptramp.S optional smp + Copied: stable/10/sys/arm/mv/armadaxp/mptramp.S (from r265694, head/sys/arm/mv/armadaxp/mptramp.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/mv/armadaxp/mptramp.S Sun May 18 00:30:04 2014 (r266385, copy of r265694, head/sys/arm/mv/armadaxp/mptramp.S) @@ -0,0 +1,56 @@ +/*- + * Copyright 2011 Semihalf + * All rights reserved. + * + * 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. + */ + +#include +#include + +__FBSDID("$FreeBSD$"); + +ASENTRY_NP(mptramp) + mov r0, #0 + mcr p15, 0, r0, c7, c7, 0 + + mrs r3, cpsr + bic r3, r3, #(PSR_MODE) + orr r3, r3, #(PSR_SVC32_MODE) + msr cpsr_fsxc, r3 + + mrc p15, 0, r0, c0, c0, 5 + and r0, #0x0f /* Get CPU ID */ + + /* Read boot address for CPU */ + mov r1, #0x100 + mul r2, r0, r1 + ldr r1, Lpmureg + add r0, r2, r1 + ldr r1, [r0], #0x00 + + mov pc, r1 + +Lpmureg: + .word 0xd0022124 +END(mptramp) + From owner-svn-src-stable@FreeBSD.ORG Sun May 18 00:32:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1FF96420; Sun, 18 May 2014 00:32:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0AD3A262C; Sun, 18 May 2014 00:32:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4I0WcqJ026486; Sun, 18 May 2014 00:32:38 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4I0WZMe026474; Sun, 18 May 2014 00:32:35 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405180032.s4I0WZMe026474@svn.freebsd.org> From: Ian Lepore Date: Sun, 18 May 2014 00:32:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266386 - in stable/10/sys/arm: at91 cavium/cns11xx mv mv/orion s3c2xx0 xscale/i80321 xscale/i8134x xscale/ixp425 xscale/pxa X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 May 2014 00:32:38 -0000 Author: ian Date: Sun May 18 00:32:35 2014 New Revision: 266386 URL: http://svnweb.freebsd.org/changeset/base/266386 Log: MFC 265852: Map device memory using PTE_DEVICE rather than PTE_NOCACHE. Modified: stable/10/sys/arm/at91/at91_machdep.c stable/10/sys/arm/cavium/cns11xx/econa_machdep.c stable/10/sys/arm/mv/mv_localbus.c stable/10/sys/arm/mv/mv_machdep.c stable/10/sys/arm/mv/mv_pci.c stable/10/sys/arm/mv/orion/db88f5xxx.c stable/10/sys/arm/s3c2xx0/s3c24x0_machdep.c stable/10/sys/arm/xscale/i80321/ep80219_machdep.c stable/10/sys/arm/xscale/i80321/iq31244_machdep.c stable/10/sys/arm/xscale/i8134x/crb_machdep.c stable/10/sys/arm/xscale/ixp425/avila_machdep.c stable/10/sys/arm/xscale/pxa/pxa_machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/at91/at91_machdep.c ============================================================================== --- stable/10/sys/arm/at91/at91_machdep.c Sun May 18 00:30:04 2014 (r266385) +++ stable/10/sys/arm/at91/at91_machdep.c Sun May 18 00:32:35 2014 (r266386) @@ -126,7 +126,7 @@ const struct arm_devmap_entry at91_devma 0xfff00000, 0x00100000, VM_PROT_READ|VM_PROT_WRITE, - PTE_NOCACHE, + PTE_DEVICE, }, /* There's a notion that we should do the rest of these lazily. */ /* @@ -150,7 +150,7 @@ const struct arm_devmap_entry at91_devma AT91RM92_OHCI_BASE, 0x00100000, VM_PROT_READ|VM_PROT_WRITE, - PTE_NOCACHE, + PTE_DEVICE, }, { /* CompactFlash controller. Portion of EBI CS4 1MB */ @@ -158,7 +158,7 @@ const struct arm_devmap_entry at91_devma AT91RM92_CF_BASE, 0x00100000, VM_PROT_READ|VM_PROT_WRITE, - PTE_NOCACHE, + PTE_DEVICE, }, /* * The next two should be good for the 9260, 9261 and 9G20 since @@ -170,7 +170,7 @@ const struct arm_devmap_entry at91_devma AT91SAM9G20_OHCI_BASE, 0x00100000, VM_PROT_READ|VM_PROT_WRITE, - PTE_NOCACHE, + PTE_DEVICE, }, { /* EBI CS3 256MB */ @@ -178,7 +178,7 @@ const struct arm_devmap_entry at91_devma AT91SAM9G20_NAND_BASE, AT91SAM9G20_NAND_SIZE, VM_PROT_READ|VM_PROT_WRITE, - PTE_NOCACHE, + PTE_DEVICE, }, /* * The next should be good for the 9G45. @@ -189,7 +189,7 @@ const struct arm_devmap_entry at91_devma AT91SAM9G45_OHCI_BASE, 0x00100000, VM_PROT_READ|VM_PROT_WRITE, - PTE_NOCACHE, + PTE_DEVICE, }, { 0, 0, 0, 0, 0, } }; Modified: stable/10/sys/arm/cavium/cns11xx/econa_machdep.c ============================================================================== --- stable/10/sys/arm/cavium/cns11xx/econa_machdep.c Sun May 18 00:30:04 2014 (r266385) +++ stable/10/sys/arm/cavium/cns11xx/econa_machdep.c Sun May 18 00:32:35 2014 (r266386) @@ -112,7 +112,7 @@ static const struct arm_devmap_entry eco ECONA_SDRAM_BASE, /*physical*/ ECONA_SDRAM_SIZE, /*size*/ VM_PROT_READ|VM_PROT_WRITE, - PTE_NOCACHE, + PTE_DEVICE, }, /* * Map the on-board devices VA == PA so that we can access them @@ -127,7 +127,7 @@ static const struct arm_devmap_entry eco ECONA_IO_BASE, /*physical*/ ECONA_IO_SIZE, /*size*/ VM_PROT_READ|VM_PROT_WRITE, - PTE_NOCACHE, + PTE_DEVICE, }, { /* @@ -137,7 +137,7 @@ static const struct arm_devmap_entry eco ECONA_OHCI_PBASE, /*physical*/ ECONA_USB_SIZE, /*size*/ VM_PROT_READ|VM_PROT_WRITE, - PTE_NOCACHE, + PTE_DEVICE, }, { /* @@ -147,7 +147,7 @@ static const struct arm_devmap_entry eco ECONA_CFI_PBASE, /*physical*/ ECONA_CFI_SIZE, VM_PROT_READ|VM_PROT_WRITE, - PTE_NOCACHE, + PTE_DEVICE, }, { 0, Modified: stable/10/sys/arm/mv/mv_localbus.c ============================================================================== --- stable/10/sys/arm/mv/mv_localbus.c Sun May 18 00:30:04 2014 (r266385) +++ stable/10/sys/arm/mv/mv_localbus.c Sun May 18 00:32:35 2014 (r266386) @@ -477,7 +477,7 @@ fdt_localbus_devmap(phandle_t dt_node, s fdt_devmap[j].pd_pa = offset; fdt_devmap[j].pd_size = size; fdt_devmap[j].pd_prot = VM_PROT_READ | VM_PROT_WRITE; - fdt_devmap[j].pd_cache = PTE_NOCACHE; + fdt_devmap[j].pd_cache = PTE_DEVICE; /* Copy data to structure used by localbus driver */ localbus_banks[bank].va = fdt_devmap[j].pd_va; Modified: stable/10/sys/arm/mv/mv_machdep.c ============================================================================== --- stable/10/sys/arm/mv/mv_machdep.c Sun May 18 00:30:04 2014 (r266385) +++ stable/10/sys/arm/mv/mv_machdep.c Sun May 18 00:32:35 2014 (r266386) @@ -284,7 +284,7 @@ moveon: map->pd_pa = base; map->pd_size = size; map->pd_prot = VM_PROT_READ | VM_PROT_WRITE; - map->pd_cache = PTE_NOCACHE; + map->pd_cache = PTE_DEVICE; return (0); out: @@ -350,7 +350,7 @@ initarm_devmap_init(void) fdt_devmap[i].pd_pa = fdt_immr_pa; fdt_devmap[i].pd_size = fdt_immr_size; fdt_devmap[i].pd_prot = VM_PROT_READ | VM_PROT_WRITE; - fdt_devmap[i].pd_cache = PTE_NOCACHE; + fdt_devmap[i].pd_cache = PTE_DEVICE; i++; /* Modified: stable/10/sys/arm/mv/mv_pci.c ============================================================================== --- stable/10/sys/arm/mv/mv_pci.c Sun May 18 00:30:04 2014 (r266385) +++ stable/10/sys/arm/mv/mv_pci.c Sun May 18 00:32:35 2014 (r266386) @@ -235,14 +235,14 @@ mv_pci_devmap(phandle_t node, struct arm devmap->pd_pa = io_space.base_parent; devmap->pd_size = io_space.len; devmap->pd_prot = VM_PROT_READ | VM_PROT_WRITE; - devmap->pd_cache = PTE_NOCACHE; + devmap->pd_cache = PTE_DEVICE; devmap++; devmap->pd_va = (mem_va ? mem_va : mem_space.base_parent); devmap->pd_pa = mem_space.base_parent; devmap->pd_size = mem_space.len; devmap->pd_prot = VM_PROT_READ | VM_PROT_WRITE; - devmap->pd_cache = PTE_NOCACHE; + devmap->pd_cache = PTE_DEVICE; return (0); } Modified: stable/10/sys/arm/mv/orion/db88f5xxx.c ============================================================================== --- stable/10/sys/arm/mv/orion/db88f5xxx.c Sun May 18 00:30:04 2014 (r266385) +++ stable/10/sys/arm/mv/orion/db88f5xxx.c Sun May 18 00:32:35 2014 (r266386) @@ -84,42 +84,42 @@ const struct pmap_devmap pmap_devmap[] = MV_PHYS_BASE, MV_SIZE, VM_PROT_READ | VM_PROT_WRITE, - PTE_NOCACHE, + PTE_DEVICE, }, { /* PCIE I/O */ MV_PCIE_IO_BASE, MV_PCIE_IO_PHYS_BASE, MV_PCIE_IO_SIZE, VM_PROT_READ | VM_PROT_WRITE, - PTE_NOCACHE, + PTE_DEVICE, }, { /* PCIE Memory */ MV_PCIE_MEM_BASE, MV_PCIE_MEM_PHYS_BASE, MV_PCIE_MEM_SIZE, VM_PROT_READ | VM_PROT_WRITE, - PTE_NOCACHE, + PTE_DEVICE, }, { /* PCI I/O */ MV_PCI_IO_BASE, MV_PCI_IO_PHYS_BASE, MV_PCI_IO_SIZE, VM_PROT_READ | VM_PROT_WRITE, - PTE_NOCACHE, + PTE_DEVICE, }, { /* PCI Memory */ MV_PCI_MEM_BASE, MV_PCI_MEM_PHYS_BASE, MV_PCI_MEM_SIZE, VM_PROT_READ | VM_PROT_WRITE, - PTE_NOCACHE, + PTE_DEVICE, }, { /* 7-seg LED */ MV_DEV_CS0_BASE, MV_DEV_CS0_PHYS_BASE, MV_DEV_CS0_SIZE, VM_PROT_READ | VM_PROT_WRITE, - PTE_NOCACHE, + PTE_DEVICE, }, { 0, 0, 0, 0, 0, } }; Modified: stable/10/sys/arm/s3c2xx0/s3c24x0_machdep.c ============================================================================== --- stable/10/sys/arm/s3c2xx0/s3c24x0_machdep.c Sun May 18 00:30:04 2014 (r266385) +++ stable/10/sys/arm/s3c2xx0/s3c24x0_machdep.c Sun May 18 00:32:35 2014 (r266386) @@ -130,42 +130,42 @@ static const struct arm_devmap_entry s3c _A(S3C24X0_CLKMAN_PA_BASE), _S(S3C24X0_CLKMAN_SIZE), VM_PROT_READ|VM_PROT_WRITE, - PTE_NOCACHE, + PTE_DEVICE, }, { _A(S3C24X0_GPIO_BASE), _A(S3C24X0_GPIO_PA_BASE), _S(S3C2410_GPIO_SIZE), VM_PROT_READ|VM_PROT_WRITE, - PTE_NOCACHE, + PTE_DEVICE, }, { _A(S3C24X0_INTCTL_BASE), _A(S3C24X0_INTCTL_PA_BASE), _S(S3C24X0_INTCTL_SIZE), VM_PROT_READ|VM_PROT_WRITE, - PTE_NOCACHE, + PTE_DEVICE, }, { _A(S3C24X0_TIMER_BASE), _A(S3C24X0_TIMER_PA_BASE), _S(S3C24X0_TIMER_SIZE), VM_PROT_READ|VM_PROT_WRITE, - PTE_NOCACHE, + PTE_DEVICE, }, { _A(S3C24X0_UART0_BASE), _A(S3C24X0_UART0_PA_BASE), _S(S3C24X0_UART_PA_BASE(3) - S3C24X0_UART0_PA_BASE), VM_PROT_READ|VM_PROT_WRITE, - PTE_NOCACHE, + PTE_DEVICE, }, { _A(S3C24X0_WDT_BASE), _A(S3C24X0_WDT_PA_BASE), _S(S3C24X0_WDT_SIZE), VM_PROT_READ|VM_PROT_WRITE, - PTE_NOCACHE, + PTE_DEVICE, }, { 0, Modified: stable/10/sys/arm/xscale/i80321/ep80219_machdep.c ============================================================================== --- stable/10/sys/arm/xscale/i80321/ep80219_machdep.c Sun May 18 00:30:04 2014 (r266385) +++ stable/10/sys/arm/xscale/i80321/ep80219_machdep.c Sun May 18 00:32:35 2014 (r266386) @@ -130,21 +130,21 @@ static const struct arm_devmap_entry ep8 IQ80321_OBIO_BASE, IQ80321_OBIO_SIZE, VM_PROT_READ|VM_PROT_WRITE, - PTE_NOCACHE, + PTE_DEVICE, }, { IQ80321_IOW_VBASE, VERDE_OUT_XLATE_IO_WIN0_BASE, VERDE_OUT_XLATE_IO_WIN_SIZE, VM_PROT_READ|VM_PROT_WRITE, - PTE_NOCACHE, + PTE_DEVICE, }, { IQ80321_80321_VBASE, VERDE_PMMR_BASE, VERDE_PMMR_SIZE, VM_PROT_READ|VM_PROT_WRITE, - PTE_NOCACHE, + PTE_DEVICE, }, { 0, Modified: stable/10/sys/arm/xscale/i80321/iq31244_machdep.c ============================================================================== --- stable/10/sys/arm/xscale/i80321/iq31244_machdep.c Sun May 18 00:30:04 2014 (r266385) +++ stable/10/sys/arm/xscale/i80321/iq31244_machdep.c Sun May 18 00:32:35 2014 (r266386) @@ -128,14 +128,14 @@ static const struct arm_devmap_entry iq8 IQ80321_OBIO_BASE, IQ80321_OBIO_SIZE, VM_PROT_READ|VM_PROT_WRITE, - PTE_NOCACHE, + PTE_DEVICE, }, { IQ80321_IOW_VBASE, VERDE_OUT_XLATE_IO_WIN0_BASE, VERDE_OUT_XLATE_IO_WIN_SIZE, VM_PROT_READ|VM_PROT_WRITE, - PTE_NOCACHE, + PTE_DEVICE, }, { @@ -143,7 +143,7 @@ static const struct arm_devmap_entry iq8 VERDE_PMMR_BASE, VERDE_PMMR_SIZE, VM_PROT_READ|VM_PROT_WRITE, - PTE_NOCACHE, + PTE_DEVICE, }, { 0, Modified: stable/10/sys/arm/xscale/i8134x/crb_machdep.c ============================================================================== --- stable/10/sys/arm/xscale/i8134x/crb_machdep.c Sun May 18 00:30:04 2014 (r266385) +++ stable/10/sys/arm/xscale/i8134x/crb_machdep.c Sun May 18 00:32:35 2014 (r266386) @@ -124,7 +124,7 @@ static const struct arm_devmap_entry iq8 IOP34X_HWADDR, IOP34X_SIZE, VM_PROT_READ|VM_PROT_WRITE, - PTE_NOCACHE, + PTE_DEVICE, }, { /* @@ -135,14 +135,14 @@ static const struct arm_devmap_entry iq8 IOP34X_PCIX_OIOBAR &~ (0x100000 - 1), 0x100000, VM_PROT_READ|VM_PROT_WRITE, - PTE_NOCACHE, + PTE_DEVICE, }, { IOP34X_PCE1_VADDR, IOP34X_PCE1, IOP34X_PCE1_SIZE, VM_PROT_READ|VM_PROT_WRITE, - PTE_NOCACHE, + PTE_DEVICE, }, { 0, Modified: stable/10/sys/arm/xscale/ixp425/avila_machdep.c ============================================================================== --- stable/10/sys/arm/xscale/ixp425/avila_machdep.c Sun May 18 00:30:04 2014 (r266385) +++ stable/10/sys/arm/xscale/ixp425/avila_machdep.c Sun May 18 00:32:35 2014 (r266386) @@ -118,31 +118,31 @@ struct pv_addr minidataclean; static const struct arm_devmap_entry ixp425_devmap[] = { /* Physical/Virtual address for I/O space */ { IXP425_IO_VBASE, IXP425_IO_HWBASE, IXP425_IO_SIZE, - VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, + VM_PROT_READ|VM_PROT_WRITE, PTE_DEVICE, }, /* Expansion Bus */ { IXP425_EXP_VBASE, IXP425_EXP_HWBASE, IXP425_EXP_SIZE, - VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, + VM_PROT_READ|VM_PROT_WRITE, PTE_DEVICE, }, /* CFI Flash on the Expansion Bus */ { IXP425_EXP_BUS_CS0_VBASE, IXP425_EXP_BUS_CS0_HWBASE, - IXP425_EXP_BUS_CS0_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, + IXP425_EXP_BUS_CS0_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_DEVICE, }, /* IXP425 PCI Configuration */ { IXP425_PCI_VBASE, IXP425_PCI_HWBASE, IXP425_PCI_SIZE, - VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, + VM_PROT_READ|VM_PROT_WRITE, PTE_DEVICE, }, /* SDRAM Controller */ { IXP425_MCU_VBASE, IXP425_MCU_HWBASE, IXP425_MCU_SIZE, - VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, + VM_PROT_READ|VM_PROT_WRITE, PTE_DEVICE, }, /* PCI Memory Space */ { IXP425_PCI_MEM_VBASE, IXP425_PCI_MEM_HWBASE, IXP425_PCI_MEM_SIZE, - VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, + VM_PROT_READ|VM_PROT_WRITE, PTE_DEVICE, }, /* Q-Mgr Memory Space */ { IXP425_QMGR_VBASE, IXP425_QMGR_HWBASE, IXP425_QMGR_SIZE, - VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, + VM_PROT_READ|VM_PROT_WRITE, PTE_DEVICE, }, { 0 }, }; @@ -151,45 +151,45 @@ static const struct arm_devmap_entry ixp static const struct arm_devmap_entry ixp435_devmap[] = { /* Physical/Virtual address for I/O space */ { IXP425_IO_VBASE, IXP425_IO_HWBASE, IXP425_IO_SIZE, - VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, + VM_PROT_READ|VM_PROT_WRITE, PTE_DEVICE, }, { IXP425_EXP_VBASE, IXP425_EXP_HWBASE, IXP425_EXP_SIZE, - VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, + VM_PROT_READ|VM_PROT_WRITE, PTE_DEVICE, }, /* IXP425 PCI Configuration */ { IXP425_PCI_VBASE, IXP425_PCI_HWBASE, IXP425_PCI_SIZE, - VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, + VM_PROT_READ|VM_PROT_WRITE, PTE_DEVICE, }, /* DDRII Controller NB: mapped same place as IXP425 */ { IXP425_MCU_VBASE, IXP435_MCU_HWBASE, IXP425_MCU_SIZE, - VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, + VM_PROT_READ|VM_PROT_WRITE, PTE_DEVICE, }, /* PCI Memory Space */ { IXP425_PCI_MEM_VBASE, IXP425_PCI_MEM_HWBASE, IXP425_PCI_MEM_SIZE, - VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, + VM_PROT_READ|VM_PROT_WRITE, PTE_DEVICE, }, /* Q-Mgr Memory Space */ { IXP425_QMGR_VBASE, IXP425_QMGR_HWBASE, IXP425_QMGR_SIZE, - VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, + VM_PROT_READ|VM_PROT_WRITE, PTE_DEVICE, }, /* CFI Flash on the Expansion Bus */ { IXP425_EXP_BUS_CS0_VBASE, IXP425_EXP_BUS_CS0_HWBASE, - IXP425_EXP_BUS_CS0_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, + IXP425_EXP_BUS_CS0_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_DEVICE, }, /* USB1 Memory Space */ { IXP435_USB1_VBASE, IXP435_USB1_HWBASE, IXP435_USB1_SIZE, - VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, + VM_PROT_READ|VM_PROT_WRITE, PTE_DEVICE, }, /* USB2 Memory Space */ { IXP435_USB2_VBASE, IXP435_USB2_HWBASE, IXP435_USB2_SIZE, - VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, + VM_PROT_READ|VM_PROT_WRITE, PTE_DEVICE, }, /* GPS Memory Space */ { CAMBRIA_GPS_VBASE, CAMBRIA_GPS_HWBASE, CAMBRIA_GPS_SIZE, - VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, + VM_PROT_READ|VM_PROT_WRITE, PTE_DEVICE, }, /* RS485 Memory Space */ { CAMBRIA_RS485_VBASE, CAMBRIA_RS485_HWBASE, CAMBRIA_RS485_SIZE, - VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, + VM_PROT_READ|VM_PROT_WRITE, PTE_DEVICE, }, { 0 } }; Modified: stable/10/sys/arm/xscale/pxa/pxa_machdep.c ============================================================================== --- stable/10/sys/arm/xscale/pxa/pxa_machdep.c Sun May 18 00:30:04 2014 (r266385) +++ stable/10/sys/arm/xscale/pxa/pxa_machdep.c Sun May 18 00:32:35 2014 (r266386) @@ -129,7 +129,7 @@ static const struct arm_devmap_entry pxa PXA2X0_PERIPH_START, PXA250_PERIPH_END - PXA2X0_PERIPH_START, VM_PROT_READ|VM_PROT_WRITE, - PTE_NOCACHE, + PTE_DEVICE, }, { 0, 0, 0, 0, 0, } }; From owner-svn-src-stable@FreeBSD.ORG Sun May 18 00:55:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 88726906; Sun, 18 May 2014 00:55:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6922828AD; Sun, 18 May 2014 00:55:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4I0tRea039316; Sun, 18 May 2014 00:55:27 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4I0tQx6039311; Sun, 18 May 2014 00:55:26 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405180055.s4I0tQx6039311@svn.freebsd.org> From: Ian Lepore Date: Sun, 18 May 2014 00:55:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266387 - in stable/10/sys/arm: arm include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 May 2014 00:55:27 -0000 Author: ian Date: Sun May 18 00:55:26 2014 New Revision: 266387 URL: http://svnweb.freebsd.org/changeset/base/266387 Log: MFC 265861, 265870: Make the hardware memory and instruction barrier functions work on armv4 and armv5 as well. Add cpu_l2cache_drain_writebuf(), use it to implement generic_bs_barrier(). Modified: stable/10/sys/arm/arm/bus_space_generic.c stable/10/sys/arm/arm/cpufunc.c stable/10/sys/arm/arm/pl310.c stable/10/sys/arm/include/atomic.h stable/10/sys/arm/include/cpufunc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/bus_space_generic.c ============================================================================== --- stable/10/sys/arm/arm/bus_space_generic.c Sun May 18 00:32:35 2014 (r266386) +++ stable/10/sys/arm/arm/bus_space_generic.c Sun May 18 00:55:26 2014 (r266387) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include /* Prototypes for all the bus_space structure functions */ @@ -110,5 +111,16 @@ generic_bs_barrier(void *t, bus_space_ha bus_size_t len, int flags) { - /* Nothing to do. */ + /* + * dsb() will drain the L1 write buffer and establish a memory access + * barrier point on platforms where that has meaning. On a write we + * also need to drain the L2 write buffer, because most on-chip memory + * mapped devices are downstream of the L2 cache. Note that this needs + * to be done even for memory mapped as Device type, because while + * Device memory is not cached, writes to it are still buffered. + */ + dsb(); + if (flags & BUS_SPACE_BARRIER_WRITE) { + cpu_l2cache_drain_writebuf(); + } } Modified: stable/10/sys/arm/arm/cpufunc.c ============================================================================== --- stable/10/sys/arm/arm/cpufunc.c Sun May 18 00:32:35 2014 (r266386) +++ stable/10/sys/arm/arm/cpufunc.c Sun May 18 00:55:26 2014 (r266387) @@ -150,6 +150,7 @@ struct cpu_functions arm9_cpufuncs = { (void *)cpufunc_nullop, /* l2cache_wbinv_range */ (void *)cpufunc_nullop, /* l2cache_inv_range */ (void *)cpufunc_nullop, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_drain_writebuf */ /* Other functions */ @@ -214,6 +215,7 @@ struct cpu_functions armv5_ec_cpufuncs = (void *)cpufunc_nullop, /* l2cache_wbinv_range */ (void *)cpufunc_nullop, /* l2cache_inv_range */ (void *)cpufunc_nullop, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_drain_writebuf */ /* Other functions */ @@ -276,6 +278,7 @@ struct cpu_functions sheeva_cpufuncs = { sheeva_l2cache_wbinv_range, /* l2cache_wbinv_range */ sheeva_l2cache_inv_range, /* l2cache_inv_range */ sheeva_l2cache_wb_range, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_drain_writebuf */ /* Other functions */ @@ -338,6 +341,7 @@ struct cpu_functions arm10_cpufuncs = { (void *)cpufunc_nullop, /* l2cache_wbinv_range */ (void *)cpufunc_nullop, /* l2cache_inv_range */ (void *)cpufunc_nullop, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_drain_writebuf */ /* Other functions */ @@ -401,6 +405,7 @@ struct cpu_functions pj4bv7_cpufuncs = { (void *)cpufunc_nullop, /* l2cache_wbinv_range */ (void *)cpufunc_nullop, /* l2cache_inv_range */ (void *)cpufunc_nullop, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_drain_writebuf */ /* Other functions */ @@ -466,6 +471,7 @@ struct cpu_functions xscale_cpufuncs = { (void *)cpufunc_nullop, /* l2cache_wbinv_range */ (void *)cpufunc_nullop, /* l2cache_inv_range */ (void *)cpufunc_nullop, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_drain_writebuf */ /* Other functions */ @@ -530,6 +536,7 @@ struct cpu_functions xscalec3_cpufuncs = xscalec3_l2cache_purge_rng, /* l2cache_wbinv_range */ xscalec3_l2cache_flush_rng, /* l2cache_inv_range */ xscalec3_l2cache_clean_rng, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_drain_writebuf */ /* Other functions */ @@ -593,6 +600,7 @@ struct cpu_functions fa526_cpufuncs = { (void *)cpufunc_nullop, /* l2cache_wbinv_range */ (void *)cpufunc_nullop, /* l2cache_inv_range */ (void *)cpufunc_nullop, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_drain_writebuf */ /* Other functions */ @@ -656,6 +664,7 @@ struct cpu_functions arm1136_cpufuncs = (void *)cpufunc_nullop, /* l2cache_wbinv_range */ (void *)cpufunc_nullop, /* l2cache_inv_range */ (void *)cpufunc_nullop, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_drain_writebuf */ /* Other functions */ @@ -718,6 +727,7 @@ struct cpu_functions arm1176_cpufuncs = (void *)cpufunc_nullop, /* l2cache_wbinv_range */ (void *)cpufunc_nullop, /* l2cache_inv_range */ (void *)cpufunc_nullop, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_drain_writebuf */ /* Other functions */ @@ -789,6 +799,7 @@ struct cpu_functions cortexa_cpufuncs = (void *)cpufunc_nullop, /* l2cache_wbinv_range */ (void *)cpufunc_nullop, /* l2cache_inv_range */ (void *)cpufunc_nullop, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_drain_writebuf */ /* Other functions */ Modified: stable/10/sys/arm/arm/pl310.c ============================================================================== --- stable/10/sys/arm/arm/pl310.c Sun May 18 00:32:35 2014 (r266386) +++ stable/10/sys/arm/arm/pl310.c Sun May 18 00:55:26 2014 (r266387) @@ -350,6 +350,18 @@ pl310_inv_range(vm_paddr_t start, vm_siz } static void +pl310_drain_writebuf(void) +{ + + if ((pl310_softc == NULL) || !pl310_softc->sc_enabled) + return; + + PL310_LOCK(pl310_softc); + pl310_cache_sync(); + PL310_UNLOCK(pl310_softc); +} + +static void pl310_set_way_sizes(struct pl310_softc *sc) { uint32_t aux_value; @@ -484,6 +496,7 @@ pl310_attach(device_t dev) cpufuncs.cf_l2cache_wbinv_range = pl310_wbinv_range; cpufuncs.cf_l2cache_inv_range = pl310_inv_range; cpufuncs.cf_l2cache_wb_range = pl310_wb_range; + cpufuncs.cf_l2cache_drain_writebuf = pl310_drain_writebuf; return (0); } Modified: stable/10/sys/arm/include/atomic.h ============================================================================== --- stable/10/sys/arm/include/atomic.h Sun May 18 00:32:35 2014 (r266386) +++ stable/10/sys/arm/include/atomic.h Sun May 18 00:55:26 2014 (r266387) @@ -58,9 +58,9 @@ #define dsb() __asm __volatile("mcr p15, 0, %0, c7, c10, 4" : : "r" (0) : "memory") #define dmb() __asm __volatile("mcr p15, 0, %0, c7, c10, 5" : : "r" (0) : "memory") #else -#define isb() -#define dsb() -#define dmb() +#define isb() __asm __volatile("mcr p15, 0, %0, c7, c5, 4" : : "r" (0) : "memory") +#define dsb() __asm __volatile("mcr p15, 0, %0, c7, c10, 4" : : "r" (0) : "memory") +#define dmb() dsb() #endif #define mb() dmb() Modified: stable/10/sys/arm/include/cpufunc.h ============================================================================== --- stable/10/sys/arm/include/cpufunc.h Sun May 18 00:32:35 2014 (r266386) +++ stable/10/sys/arm/include/cpufunc.h Sun May 18 00:55:26 2014 (r266387) @@ -151,6 +151,7 @@ struct cpu_functions { void (*cf_l2cache_wbinv_range) (vm_offset_t, vm_size_t); void (*cf_l2cache_inv_range) (vm_offset_t, vm_size_t); void (*cf_l2cache_wb_range) (vm_offset_t, vm_size_t); + void (*cf_l2cache_drain_writebuf) (void); /* Other functions */ @@ -252,6 +253,7 @@ void tlb_broadcast(int); #define cpu_l2cache_wb_range(a, s) cpufuncs.cf_l2cache_wb_range((a), (s)) #define cpu_l2cache_inv_range(a, s) cpufuncs.cf_l2cache_inv_range((a), (s)) #define cpu_l2cache_wbinv_range(a, s) cpufuncs.cf_l2cache_wbinv_range((a), (s)) +#define cpu_l2cache_drain_writebuf() cpufuncs.cf_l2cache_drain_writebuf() #define cpu_flush_prefetchbuf() cpufuncs.cf_flush_prefetchbuf() #define cpu_drain_writebuf() cpufuncs.cf_drain_writebuf() From owner-svn-src-stable@FreeBSD.ORG Sun May 18 01:18:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3C495CCD; Sun, 18 May 2014 01:18:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 296632A29; Sun, 18 May 2014 01:18:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4I1Ig3P052379; Sun, 18 May 2014 01:18:42 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4I1Ig7O052378; Sun, 18 May 2014 01:18:42 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405180118.s4I1Ig7O052378@svn.freebsd.org> From: Ian Lepore Date: Sun, 18 May 2014 01:18:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266388 - stable/10/sys/arm/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 May 2014 01:18:43 -0000 Author: ian Date: Sun May 18 01:18:42 2014 New Revision: 266388 URL: http://svnweb.freebsd.org/changeset/base/266388 Log: MFC 265913, 265914: Interrupts need to be disabled on entry to cpu_sleep() for ARM. Given that and the need to be in a critical section when switching to idleclock mode for event timers, use spinlock_enter()/exit() to achieve both needs. Clean up some style nits. Modified: stable/10/sys/arm/arm/machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/machdep.c ============================================================================== --- stable/10/sys/arm/arm/machdep.c Sun May 18 00:55:26 2014 (r266387) +++ stable/10/sys/arm/arm/machdep.c Sun May 18 01:18:42 2014 (r266388) @@ -424,24 +424,20 @@ void cpu_idle(int busy) { - CTR2(KTR_SPARE2, "cpu_idle(%d) at %d", - busy, curcpu); + CTR2(KTR_SPARE2, "cpu_idle(%d) at %d", busy, curcpu); + spinlock_enter(); #ifndef NO_EVENTTIMERS - if (!busy) { - critical_enter(); + if (!busy) cpu_idleclock(); - } #endif if (!sched_runnable()) cpu_sleep(0); #ifndef NO_EVENTTIMERS - if (!busy) { + if (!busy) cpu_activeclock(); - critical_exit(); - } #endif - CTR2(KTR_SPARE2, "cpu_idle(%d) at %d done", - busy, curcpu); + spinlock_exit(); + CTR2(KTR_SPARE2, "cpu_idle(%d) at %d done", busy, curcpu); } int From owner-svn-src-stable@FreeBSD.ORG Sun May 18 01:20:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 65884E4B; Sun, 18 May 2014 01:20:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39E7E2A37; Sun, 18 May 2014 01:20:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4I1KqDQ056948; Sun, 18 May 2014 01:20:52 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4I1KqtF056947; Sun, 18 May 2014 01:20:52 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405180120.s4I1KqtF056947@svn.freebsd.org> From: Ian Lepore Date: Sun, 18 May 2014 01:20:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266389 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 May 2014 01:20:52 -0000 Author: ian Date: Sun May 18 01:20:51 2014 New Revision: 266389 URL: http://svnweb.freebsd.org/changeset/base/266389 Log: MFC 265915: Build modules in parallel. This is a record-only merge, because the actual change got merged by accident several days ago along with some other MFC I did. Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Sun May 18 04:33:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 195466B5; Sun, 18 May 2014 04:33:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7ECB2795; Sun, 18 May 2014 04:33:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4I4XPGW074571; Sun, 18 May 2014 04:33:25 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4I4XPXI074567; Sun, 18 May 2014 04:33:25 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201405180433.s4I4XPXI074567@svn.freebsd.org> From: John Baldwin Date: Sun, 18 May 2014 04:33:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266393 - in stable/10: sys/amd64/include sys/amd64/vmm usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 May 2014 04:33:26 -0000 Author: jhb Date: Sun May 18 04:33:24 2014 New Revision: 266393 URL: http://svnweb.freebsd.org/changeset/base/266393 Log: MFC 259737, 262646: Fix a couple of issues with vcpu state: - Add a parameter to 'vcpu_set_state()' to enforce that the vcpu is in the IDLE state before the requested state transition. This guarantees that there is exactly one ioctl() operating on a vcpu at any point in time and prevents unintended state transitions. - Fix a race between VMRUN() and vcpu_notify_event() due to 'vcpu->hostcpu' being updated outside of the vcpu_lock(). Modified: stable/10/sys/amd64/include/vmm.h stable/10/sys/amd64/vmm/vmm.c stable/10/sys/amd64/vmm/vmm_dev.c stable/10/usr.sbin/bhyve/bhyverun.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/include/vmm.h ============================================================================== --- stable/10/sys/amd64/include/vmm.h Sun May 18 04:21:12 2014 (r266392) +++ stable/10/sys/amd64/include/vmm.h Sun May 18 04:33:24 2014 (r266393) @@ -177,7 +177,8 @@ enum vcpu_state { VCPU_SLEEPING, }; -int vcpu_set_state(struct vm *vm, int vcpu, enum vcpu_state state); +int vcpu_set_state(struct vm *vm, int vcpu, enum vcpu_state state, + bool from_idle); enum vcpu_state vcpu_get_state(struct vm *vm, int vcpu, int *hostcpu); static int __inline Modified: stable/10/sys/amd64/vmm/vmm.c ============================================================================== --- stable/10/sys/amd64/vmm/vmm.c Sun May 18 04:21:12 2014 (r266392) +++ stable/10/sys/amd64/vmm/vmm.c Sun May 18 04:33:24 2014 (r266393) @@ -837,13 +837,35 @@ save_guest_fpustate(struct vcpu *vcpu) static VMM_STAT(VCPU_IDLE_TICKS, "number of ticks vcpu was idle"); static int -vcpu_set_state_locked(struct vcpu *vcpu, enum vcpu_state newstate) +vcpu_set_state_locked(struct vcpu *vcpu, enum vcpu_state newstate, + bool from_idle) { int error; vcpu_assert_locked(vcpu); /* + * State transitions from the vmmdev_ioctl() must always begin from + * the VCPU_IDLE state. This guarantees that there is only a single + * ioctl() operating on a vcpu at any point. + */ + if (from_idle) { + while (vcpu->state != VCPU_IDLE) + msleep_spin(&vcpu->state, &vcpu->mtx, "vmstat", hz); + } else { + KASSERT(vcpu->state != VCPU_IDLE, ("invalid transition from " + "vcpu idle state")); + } + + if (vcpu->state == VCPU_RUNNING) { + KASSERT(vcpu->hostcpu == curcpu, ("curcpu %d and hostcpu %d " + "mismatch for running vcpu", curcpu, vcpu->hostcpu)); + } else { + KASSERT(vcpu->hostcpu == NOCPU, ("Invalid hostcpu %d for a " + "vcpu that is not running", vcpu->hostcpu)); + } + + /* * The following state transitions are allowed: * IDLE -> FROZEN -> IDLE * FROZEN -> RUNNING -> FROZEN @@ -863,12 +885,19 @@ vcpu_set_state_locked(struct vcpu *vcpu, break; } - if (error == 0) - vcpu->state = newstate; + if (error) + return (EBUSY); + + vcpu->state = newstate; + if (newstate == VCPU_RUNNING) + vcpu->hostcpu = curcpu; else - error = EBUSY; + vcpu->hostcpu = NOCPU; - return (error); + if (newstate == VCPU_IDLE) + wakeup(&vcpu->state); + + return (0); } static void @@ -876,7 +905,7 @@ vcpu_require_state(struct vm *vm, int vc { int error; - if ((error = vcpu_set_state(vm, vcpuid, newstate)) != 0) + if ((error = vcpu_set_state(vm, vcpuid, newstate, false)) != 0) panic("Error %d setting state to %d\n", error, newstate); } @@ -885,7 +914,7 @@ vcpu_require_state_locked(struct vcpu *v { int error; - if ((error = vcpu_set_state_locked(vcpu, newstate)) != 0) + if ((error = vcpu_set_state_locked(vcpu, newstate, false)) != 0) panic("Error %d setting state to %d", error, newstate); } @@ -1131,9 +1160,7 @@ restart: restore_guest_fpustate(vcpu); vcpu_require_state(vm, vcpuid, VCPU_RUNNING); - vcpu->hostcpu = curcpu; error = VMRUN(vm->cookie, vcpuid, rip, pmap, &vm->rendezvous_func); - vcpu->hostcpu = NOCPU; vcpu_require_state(vm, vcpuid, VCPU_FROZEN); save_guest_fpustate(vcpu); @@ -1343,7 +1370,8 @@ vm_iommu_domain(struct vm *vm) } int -vcpu_set_state(struct vm *vm, int vcpuid, enum vcpu_state newstate) +vcpu_set_state(struct vm *vm, int vcpuid, enum vcpu_state newstate, + bool from_idle) { int error; struct vcpu *vcpu; @@ -1354,7 +1382,7 @@ vcpu_set_state(struct vm *vm, int vcpuid vcpu = &vm->vcpu[vcpuid]; vcpu_lock(vcpu); - error = vcpu_set_state_locked(vcpu, newstate); + error = vcpu_set_state_locked(vcpu, newstate, from_idle); vcpu_unlock(vcpu); return (error); @@ -1475,19 +1503,28 @@ vcpu_notify_event(struct vm *vm, int vcp vcpu_lock(vcpu); hostcpu = vcpu->hostcpu; - if (hostcpu == NOCPU) { - if (vcpu->state == VCPU_SLEEPING) - wakeup_one(vcpu); - } else { - if (vcpu->state != VCPU_RUNNING) - panic("invalid vcpu state %d", vcpu->state); + if (vcpu->state == VCPU_RUNNING) { + KASSERT(hostcpu != NOCPU, ("vcpu running on invalid hostcpu")); if (hostcpu != curcpu) { - if (lapic_intr) + if (lapic_intr) { vlapic_post_intr(vcpu->vlapic, hostcpu, vmm_ipinum); - else + } else { ipi_cpu(hostcpu, vmm_ipinum); + } + } else { + /* + * If the 'vcpu' is running on 'curcpu' then it must + * be sending a notification to itself (e.g. SELF_IPI). + * The pending event will be picked up when the vcpu + * transitions back to guest context. + */ } + } else { + KASSERT(hostcpu == NOCPU, ("vcpu state %d not consistent " + "with hostcpu %d", vcpu->state, hostcpu)); + if (vcpu->state == VCPU_SLEEPING) + wakeup_one(vcpu); } vcpu_unlock(vcpu); } Modified: stable/10/sys/amd64/vmm/vmm_dev.c ============================================================================== --- stable/10/sys/amd64/vmm/vmm_dev.c Sun May 18 04:21:12 2014 (r266392) +++ stable/10/sys/amd64/vmm/vmm_dev.c Sun May 18 04:33:24 2014 (r266393) @@ -197,7 +197,7 @@ vmmdev_ioctl(struct cdev *cdev, u_long c goto done; } - error = vcpu_set_state(sc->vm, vcpu, VCPU_FROZEN); + error = vcpu_set_state(sc->vm, vcpu, VCPU_FROZEN, true); if (error) goto done; @@ -214,14 +214,14 @@ vmmdev_ioctl(struct cdev *cdev, u_long c */ error = 0; for (vcpu = 0; vcpu < VM_MAXCPU; vcpu++) { - error = vcpu_set_state(sc->vm, vcpu, VCPU_FROZEN); + error = vcpu_set_state(sc->vm, vcpu, VCPU_FROZEN, true); if (error) break; } if (error) { while (--vcpu >= 0) - vcpu_set_state(sc->vm, vcpu, VCPU_IDLE); + vcpu_set_state(sc->vm, vcpu, VCPU_IDLE, false); goto done; } @@ -387,10 +387,10 @@ vmmdev_ioctl(struct cdev *cdev, u_long c } if (state_changed == 1) { - vcpu_set_state(sc->vm, vcpu, VCPU_IDLE); + vcpu_set_state(sc->vm, vcpu, VCPU_IDLE, false); } else if (state_changed == 2) { for (vcpu = 0; vcpu < VM_MAXCPU; vcpu++) - vcpu_set_state(sc->vm, vcpu, VCPU_IDLE); + vcpu_set_state(sc->vm, vcpu, VCPU_IDLE, false); } done: Modified: stable/10/usr.sbin/bhyve/bhyverun.c ============================================================================== --- stable/10/usr.sbin/bhyve/bhyverun.c Sun May 18 04:21:12 2014 (r266392) +++ stable/10/usr.sbin/bhyve/bhyverun.c Sun May 18 04:33:24 2014 (r266393) @@ -493,19 +493,8 @@ vm_loop(struct vmctx *ctx, int vcpu, uin while (1) { error = vm_run(ctx, vcpu, rip, &vmexit[vcpu]); - if (error != 0) { - /* - * It is possible that 'vmmctl' or some other process - * has transitioned the vcpu to CANNOT_RUN state right - * before we tried to transition it to RUNNING. - * - * This is expected to be temporary so just retry. - */ - if (errno == EBUSY) - continue; - else - break; - } + if (error != 0) + break; prevcpu = vcpu; From owner-svn-src-stable@FreeBSD.ORG Sun May 18 13:05:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 41121958; Sun, 18 May 2014 13:05:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 21A832892; Sun, 18 May 2014 13:05:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4ID59T1085566; Sun, 18 May 2014 13:05:09 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4ID58Y8085559; Sun, 18 May 2014 13:05:08 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405181305.s4ID58Y8085559@svn.freebsd.org> From: Ian Lepore Date: Sun, 18 May 2014 13:05:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266397 - in stable/10/sys: arm/conf arm/rockchip boot/fdt/dts/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 May 2014 13:05:09 -0000 Author: ian Date: Sun May 18 13:05:07 2014 New Revision: 266397 URL: http://svnweb.freebsd.org/changeset/base/266397 Log: MFC 265624, 265739: Fix interrupt parent property in dts, add SMP support. Added: stable/10/sys/arm/rockchip/rk30xx_mp.c - copied unchanged from r265739, head/sys/arm/rockchip/rk30xx_mp.c Modified: stable/10/sys/arm/conf/RADXA stable/10/sys/arm/rockchip/files.rk30xx stable/10/sys/arm/rockchip/rk30xx_machdep.c stable/10/sys/boot/fdt/dts/arm/rk3188.dtsi Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/RADXA ============================================================================== --- stable/10/sys/arm/conf/RADXA Sun May 18 09:29:00 2014 (r266396) +++ stable/10/sys/arm/conf/RADXA Sun May 18 13:05:07 2014 (r266397) @@ -121,3 +121,4 @@ options FDT options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=rk3188-radxa.dts +options SMP # Enable multiple cores Modified: stable/10/sys/arm/rockchip/files.rk30xx ============================================================================== --- stable/10/sys/arm/rockchip/files.rk30xx Sun May 18 09:29:00 2014 (r266396) +++ stable/10/sys/arm/rockchip/files.rk30xx Sun May 18 13:05:07 2014 (r266397) @@ -19,3 +19,4 @@ arm/rockchip/rk30xx_grf.c standard arm/rockchip/rk30xx_wdog.c standard arm/rockchip/rk30xx_gpio.c optional gpio dev/usb/controller/dwc_otg_fdt.c optional dwcotg +arm/rockchip/rk30xx_mp.c optional smp Modified: stable/10/sys/arm/rockchip/rk30xx_machdep.c ============================================================================== --- stable/10/sys/arm/rockchip/rk30xx_machdep.c Sun May 18 09:29:00 2014 (r266396) +++ stable/10/sys/arm/rockchip/rk30xx_machdep.c Sun May 18 13:05:07 2014 (r266397) @@ -83,6 +83,7 @@ int initarm_devmap_init(void) { + arm_devmap_add_entry(0x10000000, 0x00200000); arm_devmap_add_entry(0x20000000, 0x00100000); return (0); Copied: stable/10/sys/arm/rockchip/rk30xx_mp.c (from r265739, head/sys/arm/rockchip/rk30xx_mp.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/rockchip/rk30xx_mp.c Sun May 18 13:05:07 2014 (r266397, copy of r265739, head/sys/arm/rockchip/rk30xx_mp.c) @@ -0,0 +1,192 @@ +/*- + * Copyright (c) 2014 Ganbold Tsagaankhuu + * All rights reserved. + * + * 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 ``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 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. + */ + +#include +__FBSDID("$FreeBSD$"); +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#define SCU_PHYSBASE 0x1013c000 +#define SCU_SIZE 0x100 + +#define SCU_CONTROL_REG 0x00 +#define SCU_CONTROL_ENABLE (1 << 0) +#define SCU_STANDBY_EN (1 << 5) +#define SCU_CONFIG_REG 0x04 +#define SCU_CONFIG_REG_NCPU_MASK 0x03 +#define SCU_CPUPOWER_REG 0x08 +#define SCU_INV_TAGS_REG 0x0c + +#define SCU_FILTER_START_REG 0x10 +#define SCU_FILTER_END_REG 0x14 +#define SCU_SECURE_ACCESS_REG 0x18 +#define SCU_NONSECURE_ACCESS_REG 0x1c + +#define IMEM_PHYSBASE 0x10080000 +#define IMEM_SIZE 0x20 + +#define PMU_PHYSBASE 0x20004000 +#define PMU_SIZE 0x100 +#define PMU_PWRDN_CON 0x08 +#define PMU_PWRDN_SCU (1 << 4) + +extern char *mpentry_addr; +static void rk30xx_boot2(void); + +static void +rk30xx_boot2(void) +{ + + __asm __volatile( + "ldr pc, 1f\n" + ".globl mpentry_addr\n" + "mpentry_addr:\n" + "1: .space 4\n"); +} + +void +platform_mp_init_secondary(void) +{ + + gic_init_secondary(); +} + +void +platform_mp_setmaxid(void) +{ + bus_space_handle_t scu; + int ncpu; + uint32_t val; + + if (mp_ncpus != 0) + return; + + if (bus_space_map(fdtbus_bs_tag, SCU_PHYSBASE, SCU_SIZE, 0, &scu) != 0) + panic("Could not map the SCU"); + + val = bus_space_read_4(fdtbus_bs_tag, scu, SCU_CONFIG_REG); + ncpu = (val & SCU_CONFIG_REG_NCPU_MASK) + 1; + bus_space_unmap(fdtbus_bs_tag, scu, SCU_SIZE); + + mp_ncpus = ncpu; + mp_maxid = ncpu - 1; +} + +int +platform_mp_probe(void) +{ + + if (mp_ncpus == 0) + platform_mp_setmaxid(); + + return (mp_ncpus > 1); +} + +void +platform_mp_start_ap(void) +{ + bus_space_handle_t scu; + bus_space_handle_t imem; + bus_space_handle_t pmu; + uint32_t val; + int i; + + if (bus_space_map(fdtbus_bs_tag, SCU_PHYSBASE, SCU_SIZE, 0, &scu) != 0) + panic("Could not map the SCU"); + if (bus_space_map(fdtbus_bs_tag, IMEM_PHYSBASE, + IMEM_SIZE, 0, &imem) != 0) + panic("Could not map the IMEM"); + if (bus_space_map(fdtbus_bs_tag, PMU_PHYSBASE, PMU_SIZE, 0, &pmu) != 0) + panic("Could not map the PMU"); + + /* + * Invalidate SCU cache tags. The 0x0000ffff constant invalidates all + * ways on all cores 0-3. Per the ARM docs, it's harmless to write to + * the bits for cores that are not present. + */ + bus_space_write_4(fdtbus_bs_tag, scu, SCU_INV_TAGS_REG, 0x0000ffff); + + /* Make sure all cores except the first are off */ + val = bus_space_read_4(fdtbus_bs_tag, pmu, PMU_PWRDN_CON); + for (i = 1; i < mp_ncpus; i++) + val |= 1 << i; + bus_space_write_4(fdtbus_bs_tag, pmu, PMU_PWRDN_CON, val); + + /* Enable SCU power domain */ + val = bus_space_read_4(fdtbus_bs_tag, pmu, PMU_PWRDN_CON); + val &= ~PMU_PWRDN_SCU; + bus_space_write_4(fdtbus_bs_tag, pmu, PMU_PWRDN_CON, val); + + /* Enable SCU */ + val = bus_space_read_4(fdtbus_bs_tag, scu, SCU_CONTROL_REG); + bus_space_write_4(fdtbus_bs_tag, scu, SCU_CONTROL_REG, + val | SCU_CONTROL_ENABLE); + + /* + * Cores will execute the code which resides at the start of + * the on-chip bootram/sram after power-on. This sram region + * should be reserved and the trampoline code that directs + * the core to the real startup code in ram should be copied + * into this sram region. + * + * First set boot function for the sram code. + */ + mpentry_addr = (char *)pmap_kextract((vm_offset_t)mpentry); + + /* Copy trampoline to sram, that runs during startup of the core */ + bus_space_write_region_4(fdtbus_bs_tag, imem, 0, + (uint32_t *)&rk30xx_boot2, 8); + + cpu_idcache_wbinv_all(); + cpu_l2cache_wbinv_all(); + + /* Start all cores */ + val = bus_space_read_4(fdtbus_bs_tag, pmu, PMU_PWRDN_CON); + for (i = 1; i < mp_ncpus; i++) + val &= ~(1 << i); + bus_space_write_4(fdtbus_bs_tag, pmu, PMU_PWRDN_CON, val); + + armv7_sev(); + + bus_space_unmap(fdtbus_bs_tag, scu, SCU_SIZE); + bus_space_unmap(fdtbus_bs_tag, imem, IMEM_SIZE); + bus_space_unmap(fdtbus_bs_tag, pmu, PMU_SIZE); +} + +void +platform_ipi_send(cpuset_t cpus, u_int ipi) +{ + + pic_ipi_send(cpus, ipi); +} Modified: stable/10/sys/boot/fdt/dts/arm/rk3188.dtsi ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/rk3188.dtsi Sun May 18 09:29:00 2014 (r266396) +++ stable/10/sys/boot/fdt/dts/arm/rk3188.dtsi Sun May 18 13:05:07 2014 (r266397) @@ -31,6 +31,8 @@ #address-cells = <1>; #size-cells = <1>; + interrupt-parent = <&GIC>; + aliases { soc = &SOC; }; From owner-svn-src-stable@FreeBSD.ORG Sun May 18 14:18:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 15FFFB08; Sun, 18 May 2014 14:18:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02B8A2DB6; Sun, 18 May 2014 14:18:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4IEINvh031603; Sun, 18 May 2014 14:18:23 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4IEINVJ031602; Sun, 18 May 2014 14:18:23 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201405181418.s4IEINVJ031602@svn.freebsd.org> From: John Baldwin Date: Sun, 18 May 2014 14:18:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266398 - stable/9/sys/contrib/pf/net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 May 2014 14:18:24 -0000 Author: jhb Date: Sun May 18 14:18:23 2014 New Revision: 266398 URL: http://svnweb.freebsd.org/changeset/base/266398 Log: MFC 260377: When pf_get_translation() fails, it should leave *sn pointer pristine, otherwise we will panic in pf_test_rule(). PR: amd64/189741 Tested by: Nick Rogers Modified: stable/9/sys/contrib/pf/net/pf_lb.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/contrib/pf/net/pf_lb.c ============================================================================== --- stable/9/sys/contrib/pf/net/pf_lb.c Sun May 18 13:05:07 2014 (r266397) +++ stable/9/sys/contrib/pf/net/pf_lb.c Sun May 18 14:18:23 2014 (r266398) @@ -788,6 +788,7 @@ pf_get_translation(struct pf_pdesc *pd, pool_put(&pf_state_key_pl, *skp); #endif *skw = *sks = *nkp = *skp = NULL; + *sn = NULL; return (NULL); } } From owner-svn-src-stable@FreeBSD.ORG Sun May 18 15:28:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E59B9B1; Sun, 18 May 2014 15:28:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 212752280; Sun, 18 May 2014 15:28:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4IFSQ9R077487; Sun, 18 May 2014 15:28:26 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4IFSPmY077485; Sun, 18 May 2014 15:28:25 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201405181528.s4IFSPmY077485@svn.freebsd.org> From: John Baldwin Date: Sun, 18 May 2014 15:28:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266400 - stable/10/usr.sbin/mfiutil X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 May 2014 15:28:26 -0000 Author: jhb Date: Sun May 18 15:28:25 2014 New Revision: 266400 URL: http://svnweb.freebsd.org/changeset/base/266400 Log: MFC 264765,264766: - Don't claim the adapter is idle if it is clearing a drive. - Fix an off by one error when checking for the stop event. This resulted in not showing the most recent event by default. - When the stop even is hit, break out of the outer loop to stop fetching more events. Modified: stable/10/usr.sbin/mfiutil/mfi_evt.c stable/10/usr.sbin/mfiutil/mfi_show.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/mfiutil/mfi_evt.c ============================================================================== --- stable/10/usr.sbin/mfiutil/mfi_evt.c Sun May 18 14:25:19 2014 (r266399) +++ stable/10/usr.sbin/mfiutil/mfi_evt.c Sun May 18 15:28:25 2014 (r266400) @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -534,6 +535,7 @@ show_events(int ac, char **av) struct mfi_evt_log_state info; struct mfi_evt_list *list; union mfi_evt filter; + bool first; long val; char *cp; ssize_t size; @@ -640,7 +642,9 @@ show_events(int ac, char **av) close(fd); return (ENOMEM); } - for (seq = start;;) { + first = true; + seq = start; + for (;;) { if (mfi_get_events(fd, list, num_events, filter, seq, &status) < 0) { error = errno; @@ -650,8 +654,6 @@ show_events(int ac, char **av) return (error); } if (status == MFI_STAT_NOT_FOUND) { - if (seq == start) - warnx("No matching events found"); break; } if (status != MFI_STAT_OK) { @@ -669,13 +671,14 @@ show_events(int ac, char **av) * the case that our stop point is earlier in * the buffer than our start point. */ - if (list->event[i].seq >= stop) { + if (list->event[i].seq > stop) { if (start <= stop) - break; + goto finish; else if (list->event[i].seq < start) - break; + goto finish; } mfi_decode_evt(fd, &list->event[i], verbose); + first = false; } /* @@ -686,6 +689,9 @@ show_events(int ac, char **av) seq = list->event[list->count - 1].seq + 1; } +finish: + if (first) + warnx("No matching events found"); free(list); close(fd); Modified: stable/10/usr.sbin/mfiutil/mfi_show.c ============================================================================== --- stable/10/usr.sbin/mfiutil/mfi_show.c Sun May 18 14:25:19 2014 (r266399) +++ stable/10/usr.sbin/mfiutil/mfi_show.c Sun May 18 15:28:25 2014 (r266400) @@ -766,7 +766,7 @@ show_progress(int ac, char **av __unused printf("drive %s ", mfi_drive_name(NULL, device_id, MFI_DNAME_DEVICE_ID|MFI_DNAME_HONOR_OPTS)); mfi_display_progress("Clear", &pinfo.prog_info.clear); - + busy = 1; } } From owner-svn-src-stable@FreeBSD.ORG Sun May 18 15:29:01 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 214B9ADE; Sun, 18 May 2014 15:29:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E85482284; Sun, 18 May 2014 15:29:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4IFT037077620; Sun, 18 May 2014 15:29:00 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4IFT0KD077615; Sun, 18 May 2014 15:29:00 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201405181529.s4IFT0KD077615@svn.freebsd.org> From: John Baldwin Date: Sun, 18 May 2014 15:29:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266401 - stable/9/usr.sbin/mfiutil X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 May 2014 15:29:01 -0000 Author: jhb Date: Sun May 18 15:29:00 2014 New Revision: 266401 URL: http://svnweb.freebsd.org/changeset/base/266401 Log: MFC 264765,264766: - Don't claim the adapter is idle if it is clearing a drive. - Fix an off by one error when checking for the stop event. This resulted in not showing the most recent event by default. - When the stop even is hit, break out of the outer loop to stop fetching more events. Modified: stable/9/usr.sbin/mfiutil/mfi_evt.c stable/9/usr.sbin/mfiutil/mfi_show.c Directory Properties: stable/9/usr.sbin/mfiutil/ (props changed) Modified: stable/9/usr.sbin/mfiutil/mfi_evt.c ============================================================================== --- stable/9/usr.sbin/mfiutil/mfi_evt.c Sun May 18 15:28:25 2014 (r266400) +++ stable/9/usr.sbin/mfiutil/mfi_evt.c Sun May 18 15:29:00 2014 (r266401) @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -534,6 +535,7 @@ show_events(int ac, char **av) struct mfi_evt_log_state info; struct mfi_evt_list *list; union mfi_evt filter; + bool first; long val; char *cp; ssize_t size; @@ -640,7 +642,9 @@ show_events(int ac, char **av) close(fd); return (ENOMEM); } - for (seq = start;;) { + first = true; + seq = start; + for (;;) { if (mfi_get_events(fd, list, num_events, filter, seq, &status) < 0) { error = errno; @@ -650,8 +654,6 @@ show_events(int ac, char **av) return (error); } if (status == MFI_STAT_NOT_FOUND) { - if (seq == start) - warnx("No matching events found"); break; } if (status != MFI_STAT_OK) { @@ -669,13 +671,14 @@ show_events(int ac, char **av) * the case that our stop point is earlier in * the buffer than our start point. */ - if (list->event[i].seq >= stop) { + if (list->event[i].seq > stop) { if (start <= stop) - break; + goto finish; else if (list->event[i].seq < start) - break; + goto finish; } mfi_decode_evt(fd, &list->event[i], verbose); + first = false; } /* @@ -686,6 +689,9 @@ show_events(int ac, char **av) seq = list->event[list->count - 1].seq + 1; } +finish: + if (first) + warnx("No matching events found"); free(list); close(fd); Modified: stable/9/usr.sbin/mfiutil/mfi_show.c ============================================================================== --- stable/9/usr.sbin/mfiutil/mfi_show.c Sun May 18 15:28:25 2014 (r266400) +++ stable/9/usr.sbin/mfiutil/mfi_show.c Sun May 18 15:29:00 2014 (r266401) @@ -796,7 +796,7 @@ show_progress(int ac, char **av __unused printf("drive %s ", mfi_drive_name(NULL, device_id, MFI_DNAME_DEVICE_ID|MFI_DNAME_HONOR_OPTS)); mfi_display_progress("Clear", &pinfo.prog_info.clear); - + busy = 1; } } From owner-svn-src-stable@FreeBSD.ORG Sun May 18 15:31:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 45F4CC2C; Sun, 18 May 2014 15:31:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1910D2308; Sun, 18 May 2014 15:31:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4IFV2TU079451; Sun, 18 May 2014 15:31:02 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4IFV26X079450; Sun, 18 May 2014 15:31:02 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201405181531.s4IFV26X079450@svn.freebsd.org> From: John Baldwin Date: Sun, 18 May 2014 15:31:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r266402 - stable/8/usr.sbin/mfiutil X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 May 2014 15:31:03 -0000 Author: jhb Date: Sun May 18 15:31:02 2014 New Revision: 266402 URL: http://svnweb.freebsd.org/changeset/base/266402 Log: MFC 264766: - Fix an off by one error when checking for the stop event. This resulted in not showing the most recent event by default. - When the stop even is hit, break out of the outer loop to stop fetching more events. Modified: stable/8/usr.sbin/mfiutil/mfi_evt.c Directory Properties: stable/8/usr.sbin/mfiutil/ (props changed) Modified: stable/8/usr.sbin/mfiutil/mfi_evt.c ============================================================================== --- stable/8/usr.sbin/mfiutil/mfi_evt.c Sun May 18 15:29:00 2014 (r266401) +++ stable/8/usr.sbin/mfiutil/mfi_evt.c Sun May 18 15:31:02 2014 (r266402) @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -534,6 +535,7 @@ show_events(int ac, char **av) struct mfi_evt_log_state info; struct mfi_evt_list *list; union mfi_evt filter; + bool first; long val; char *cp; ssize_t size; @@ -640,7 +642,9 @@ show_events(int ac, char **av) close(fd); return (ENOMEM); } - for (seq = start;;) { + first = true; + seq = start; + for (;;) { if (mfi_get_events(fd, list, num_events, filter, seq, &status) < 0) { error = errno; @@ -650,8 +654,6 @@ show_events(int ac, char **av) return (error); } if (status == MFI_STAT_NOT_FOUND) { - if (seq == start) - warnx("No matching events found"); break; } if (status != MFI_STAT_OK) { @@ -669,13 +671,14 @@ show_events(int ac, char **av) * the case that our stop point is earlier in * the buffer than our start point. */ - if (list->event[i].seq >= stop) { + if (list->event[i].seq > stop) { if (start <= stop) - break; + goto finish; else if (list->event[i].seq < start) - break; + goto finish; } mfi_decode_evt(fd, &list->event[i], verbose); + first = false; } /* @@ -686,6 +689,9 @@ show_events(int ac, char **av) seq = list->event[list->count - 1].seq + 1; } +finish: + if (first) + warnx("No matching events found"); free(list); close(fd); From owner-svn-src-stable@FreeBSD.ORG Sun May 18 16:02:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8C5D7AAE; Sun, 18 May 2014 16:02:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 797BB2583; Sun, 18 May 2014 16:02:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4IG2vDM002652; Sun, 18 May 2014 16:02:57 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4IG2vVN002651; Sun, 18 May 2014 16:02:57 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405181602.s4IG2vVN002651@svn.freebsd.org> From: Ian Lepore Date: Sun, 18 May 2014 16:02:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266404 - stable/10/sys/arm/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 May 2014 16:02:57 -0000 Author: ian Date: Sun May 18 16:02:56 2014 New Revision: 266404 URL: http://svnweb.freebsd.org/changeset/base/266404 Log: MFC 256941: make sure the frame is indeed in the kernel memory. Modified: stable/10/sys/arm/arm/stack_machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/stack_machdep.c ============================================================================== --- stable/10/sys/arm/arm/stack_machdep.c Sun May 18 15:31:53 2014 (r266403) +++ stable/10/sys/arm/arm/stack_machdep.c Sun May 18 16:02:56 2014 (r266404) @@ -43,13 +43,16 @@ __FBSDID("$FreeBSD$"); * APCS where it lays out the stack incorrectly. Because of this we disable * this when building for ARM EABI or when building with clang. */ + +extern vm_offset_t kernel_vm_end; + static void stack_capture(struct stack *st, u_int32_t *frame) { #if !defined(__ARM_EABI__) && !defined(__clang__) vm_offset_t callpc; - while (INKERNEL(frame)) { + while (INKERNEL(frame) && (vm_offset_t)frame < kernel_vm_end) { callpc = frame[FR_SCP]; if (stack_put(st, callpc) == -1) break; From owner-svn-src-stable@FreeBSD.ORG Sun May 18 16:03:35 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E573BDC; Sun, 18 May 2014 16:03:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B6742588; Sun, 18 May 2014 16:03:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4IG3ZTx002834; Sun, 18 May 2014 16:03:35 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4IG3Z6B002833; Sun, 18 May 2014 16:03:35 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405181603.s4IG3Z6B002833@svn.freebsd.org> From: Ian Lepore Date: Sun, 18 May 2014 16:03:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266405 - stable/10/sys/arm/allwinner X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 May 2014 16:03:35 -0000 Author: ian Date: Sun May 18 16:03:34 2014 New Revision: 266405 URL: http://svnweb.freebsd.org/changeset/base/266405 Log: MFC 256873: Make watchdog function conform watchdog(9): Modified: stable/10/sys/arm/allwinner/a10_wdog.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/allwinner/a10_wdog.c ============================================================================== --- stable/10/sys/arm/allwinner/a10_wdog.c Sun May 18 16:02:56 2014 (r266404) +++ stable/10/sys/arm/allwinner/a10_wdog.c Sun May 18 16:03:34 2014 (r266405) @@ -153,6 +153,18 @@ a10wd_watchdog_fn(void *private, u_int c (wd_intervals[i].value << WDOG_MODE_INTVL_SHIFT) | WDOG_MODE_EN | WDOG_MODE_RST_EN); WRITE(sc, WDOG_CTRL, WDOG_CTRL_RESTART); + *error = 0; + } + else { + /* + * Can't arm + * disable watchdog as watchdog(9) requires + */ + device_printf(sc->dev, + "Can't arm, timeout is more than 16 sec\n"); + mtx_unlock(&sc->mtx); + WRITE(sc, WDOG_MODE, 0); + return; } } else From owner-svn-src-stable@FreeBSD.ORG Sun May 18 16:07:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 255E3D58; Sun, 18 May 2014 16:07:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 122CA25B7; Sun, 18 May 2014 16:07:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4IG7ZP5003663; Sun, 18 May 2014 16:07:35 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4IG7Zdc003661; Sun, 18 May 2014 16:07:35 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405181607.s4IG7Zdc003661@svn.freebsd.org> From: Ian Lepore Date: Sun, 18 May 2014 16:07:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266406 - stable/10/sys/arm/xscale/ixp425 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 May 2014 16:07:36 -0000 Author: ian Date: Sun May 18 16:07:35 2014 New Revision: 266406 URL: http://svnweb.freebsd.org/changeset/base/266406 Log: MFC 256942, 256943: - Fix a typo. - Use bus_dmamap_unload(), it is not optional. - The new allocator won't return coherent memory for any size > PAGE_SIZE, so don't assume we have coherent memory, and explicitely use bus_dmamap_sync(). Modified: stable/10/sys/arm/xscale/ixp425/if_npe.c stable/10/sys/arm/xscale/ixp425/ixp425_mem.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/xscale/ixp425/if_npe.c ============================================================================== --- stable/10/sys/arm/xscale/ixp425/if_npe.c Sun May 18 16:03:34 2014 (r266405) +++ stable/10/sys/arm/xscale/ixp425/if_npe.c Sun May 18 16:07:35 2014 (r266406) @@ -508,7 +508,6 @@ npe_dma_setup(struct npe_softc *sc, stru dma->name, error); return error; } - /* XXX COHERENT for now */ if (bus_dmamem_alloc(dma->buf_tag, (void **)&dma->hwbuf, BUS_DMA_NOWAIT | BUS_DMA_ZERO | BUS_DMA_COHERENT, &dma->buf_map) != 0) { @@ -1074,6 +1073,7 @@ npe_rxbuf_init(struct npe_softc *sc, str m->m_pkthdr.len = m->m_len = 1536; /* backload payload and align ip hdr */ m->m_data = m->m_ext.ext_buf + (m->m_ext.ext_size - (1536+ETHER_ALIGN)); + bus_dmamap_unload(dma->mtag, npe->ix_map); error = bus_dmamap_load_mbuf_sg(dma->mtag, npe->ix_map, m, segs, &nseg, 0); if (error != 0) { @@ -1086,6 +1086,8 @@ npe_rxbuf_init(struct npe_softc *sc, str /* NB: buffer length is shifted in word */ hw->ix_ne[0].len = htobe32(segs[0].ds_len << 16); hw->ix_ne[0].next = 0; + bus_dmamap_sync(dma->buf_tag, dma->buf_map, + BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); npe->ix_m = m; /* Flush the memory in the mbuf */ bus_dmamap_sync(dma->mtag, npe->ix_map, BUS_DMASYNC_PREREAD); @@ -1111,6 +1113,8 @@ npe_rxdone(int qid, void *arg) struct npebuf *npe = P2V(NPE_QM_Q_ADDR(entry), dma); struct mbuf *m; + bus_dmamap_sync(dma->buf_tag, dma->buf_map, + BUS_DMASYNC_POSTREAD); DPRINTF(sc, "%s: entry 0x%x neaddr 0x%x ne_len 0x%x\n", __func__, entry, npe->ix_neaddr, npe->ix_hw->ix_ne[0].len); /* @@ -1131,7 +1135,6 @@ npe_rxdone(int qid, void *arg) bus_dmamap_sync(dma->mtag, npe->ix_map, BUS_DMASYNC_POSTREAD); - /* XXX flush hw buffer; works now 'cuz coherent */ /* set m_len etc. per rx frame size */ mrx->m_len = be32toh(hw->ix_ne[0].len) & 0xffff; mrx->m_pkthdr.len = mrx->m_len; @@ -1314,6 +1317,7 @@ npestart_locked(struct ifnet *ifp) return; } npe = sc->tx_free; + bus_dmamap_unload(dma->mtag, npe->ix_map); error = bus_dmamap_load_mbuf_sg(dma->mtag, npe->ix_map, m, segs, &nseg, 0); if (error == EFBIG) { @@ -1356,7 +1360,8 @@ npestart_locked(struct ifnet *ifp) next += sizeof(hw->ix_ne[0]); } hw->ix_ne[i-1].next = 0; /* zero last in chain */ - /* XXX flush descriptor instead of using uncached memory */ + bus_dmamap_sync(dma->buf_tag, dma->buf_map, + BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); DPRINTF(sc, "%s: qwrite(%u, 0x%x) ne_data %x ne_len 0x%x\n", __func__, sc->tx_qid, npe->ix_neaddr, Modified: stable/10/sys/arm/xscale/ixp425/ixp425_mem.c ============================================================================== --- stable/10/sys/arm/xscale/ixp425/ixp425_mem.c Sun May 18 16:03:34 2014 (r266405) +++ stable/10/sys/arm/xscale/ixp425/ixp425_mem.c Sun May 18 16:07:35 2014 (r266406) @@ -76,7 +76,7 @@ ixp425_sdram_size(void) size = sdram_other[MCU_SDR_CONFIG_MCONF(sdr_config)]; if (size == 0) { - printf("** SDR_CONFIG retuns unknown value, using 32M\n"); + printf("** SDR_CONFIG returns unknown value, using 32M\n"); size = 32 * 1024 * 1024; } From owner-svn-src-stable@FreeBSD.ORG Sun May 18 16:17:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E5159326; Sun, 18 May 2014 16:17:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D23962675; Sun, 18 May 2014 16:17:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4IGHDiD010312; Sun, 18 May 2014 16:17:13 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4IGHDbl010311; Sun, 18 May 2014 16:17:13 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405181617.s4IGHDbl010311@svn.freebsd.org> From: Ian Lepore Date: Sun, 18 May 2014 16:17:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266408 - stable/10/sys/arm/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 May 2014 16:17:14 -0000 Author: ian Date: Sun May 18 16:17:13 2014 New Revision: 266408 URL: http://svnweb.freebsd.org/changeset/base/266408 Log: MFC 257189: Fix an itt instruction. We need to execute both the mov and b instructions when building for Thumb. Modified: stable/10/sys/arm/include/atomic.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/include/atomic.h ============================================================================== --- stable/10/sys/arm/include/atomic.h Sun May 18 16:08:11 2014 (r266407) +++ stable/10/sys/arm/include/atomic.h Sun May 18 16:17:13 2014 (r266408) @@ -198,7 +198,7 @@ atomic_cmpset_32(volatile u_int32_t *p, __asm __volatile("1: ldrex %0, [%1]\n" "cmp %0, %2\n" - "it ne\n" + "itt ne\n" "movne %0, #0\n" "bne 2f\n" "strex %0, %3, [%1]\n" From owner-svn-src-stable@FreeBSD.ORG Sun May 18 16:39:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8CCC2833; Sun, 18 May 2014 16:39:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79F4D27D6; Sun, 18 May 2014 16:39:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4IGdmkh023736; Sun, 18 May 2014 16:39:48 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4IGdmRB023735; Sun, 18 May 2014 16:39:48 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405181639.s4IGdmRB023735@svn.freebsd.org> From: Ian Lepore Date: Sun, 18 May 2014 16:39:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266409 - stable/10/sys/arm/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 May 2014 16:39:48 -0000 Author: ian Date: Sun May 18 16:39:47 2014 New Revision: 266409 URL: http://svnweb.freebsd.org/changeset/base/266409 Log: MFC 257231: Make sure the PCB is aligned on 8 bytes, we may use ldrd/strd to access it, which may have strong alignment requirements. Modified: stable/10/sys/arm/include/pcb.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/include/pcb.h ============================================================================== --- stable/10/sys/arm/include/pcb.h Sun May 18 16:17:13 2014 (r266408) +++ stable/10/sys/arm/include/pcb.h Sun May 18 16:39:47 2014 (r266409) @@ -80,7 +80,11 @@ struct pcb { struct pcb_arm32 un_32; struct vfp_state pcb_vfpstate; /* VP/NEON state */ u_int pcb_vfpcpu; /* VP/NEON last cpu */ -}; +} __aligned(8); /* + * We need the PCB to be aligned on 8 bytes, as we may + * access it using ldrd/strd, and some CPUs require it + * to by aligned on 8 bytes. + */ /* * No additional data for core dumps. From owner-svn-src-stable@FreeBSD.ORG Sun May 18 16:43:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF74E97F; Sun, 18 May 2014 16:43:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC9EF285E; Sun, 18 May 2014 16:43:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4IGhlVn029056; Sun, 18 May 2014 16:43:47 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4IGhlGq029055; Sun, 18 May 2014 16:43:47 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405181643.s4IGhlGq029055@svn.freebsd.org> From: Ian Lepore Date: Sun, 18 May 2014 16:43:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266410 - stable/10/lib/csu/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 May 2014 16:43:47 -0000 Author: ian Date: Sun May 18 16:43:47 2014 New Revision: 266410 URL: http://svnweb.freebsd.org/changeset/base/266410 Log: MFC 257233: Use size of the MACHINE_ARCH string instead of sizeof(uint32_t). Modified: stable/10/lib/csu/arm/crt1.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/csu/arm/crt1.c ============================================================================== --- stable/10/lib/csu/arm/crt1.c Sun May 18 16:39:47 2014 (r266409) +++ stable/10/lib/csu/arm/crt1.c Sun May 18 16:43:47 2014 (r266410) @@ -123,7 +123,7 @@ static const struct { char desc[sizeof(MACHINE_ARCH)]; } archtag __attribute__ ((section (NOTE_SECTION), aligned(4))) __used = { .namesz = sizeof(NOTE_FREEBSD_VENDOR), - .descsz = sizeof(int32_t), + .descsz = sizeof(MACHINE_ARCH), .type = ARCH_NOTETYPE, .name = NOTE_FREEBSD_VENDOR, .desc = MACHINE_ARCH From owner-svn-src-stable@FreeBSD.ORG Sun May 18 17:46:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26914793; Sun, 18 May 2014 17:46:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 124E62C88; Sun, 18 May 2014 17:46:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4IHkmxq068424; Sun, 18 May 2014 17:46:48 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4IHkmS0068423; Sun, 18 May 2014 17:46:48 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405181746.s4IHkmS0068423@svn.freebsd.org> From: Ian Lepore Date: Sun, 18 May 2014 17:46:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266412 - stable/10/sys/arm/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 May 2014 17:46:49 -0000 Author: ian Date: Sun May 18 17:46:48 2014 New Revision: 266412 URL: http://svnweb.freebsd.org/changeset/base/266412 Log: MFC 258287: Implement pmap_align_superpage(). Modified: stable/10/sys/arm/arm/pmap-v6.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/pmap-v6.c ============================================================================== --- stable/10/sys/arm/arm/pmap-v6.c Sun May 18 17:14:08 2014 (r266411) +++ stable/10/sys/arm/arm/pmap-v6.c Sun May 18 17:46:48 2014 (r266412) @@ -5089,6 +5089,20 @@ void pmap_align_superpage(vm_object_t object, vm_ooffset_t offset, vm_offset_t *addr, vm_size_t size) { + vm_offset_t superpage_offset; + + if (size < NBPDR) + return; + if (object != NULL && (object->flags & OBJ_COLORED) != 0) + offset += ptoa(object->pg_color); + superpage_offset = offset & PDRMASK; + if (size - ((NBPDR - superpage_offset) & PDRMASK) < NBPDR || + (*addr & PDRMASK) == superpage_offset) + return; + if ((*addr & PDRMASK) < superpage_offset) + *addr = (*addr & ~PDRMASK) + superpage_offset; + else + *addr = ((*addr + PDRMASK) & ~PDRMASK) + superpage_offset; } /* From owner-svn-src-stable@FreeBSD.ORG Sun May 18 19:28:16 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38AF9434; Sun, 18 May 2014 19:28:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 256DC246D; Sun, 18 May 2014 19:28:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4IJSGmo034587; Sun, 18 May 2014 19:28:16 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4IJSF0j034586; Sun, 18 May 2014 19:28:15 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405181928.s4IJSF0j034586@svn.freebsd.org> From: Ian Lepore Date: Sun, 18 May 2014 19:28:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266414 - stable/10/contrib/binutils/gas/config X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 May 2014 19:28:16 -0000 Author: ian Date: Sun May 18 19:28:15 2014 New Revision: 266414 URL: http://svnweb.freebsd.org/changeset/base/266414 Log: MFC r256790: Fix the VCVT instruction. It must round towards zero when converting from a floating-point to an integer value. This was not the case causing issues when printing certain values. Modified: stable/10/contrib/binutils/gas/config/tc-arm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/binutils/gas/config/tc-arm.c ============================================================================== --- stable/10/contrib/binutils/gas/config/tc-arm.c Sun May 18 17:58:33 2014 (r266413) +++ stable/10/contrib/binutils/gas/config/tc-arm.c Sun May 18 19:28:15 2014 (r266414) @@ -12660,14 +12660,14 @@ do_vfp_nsyn_cvt (enum neon_shape rs, int /* Conversions without bitshift. */ const char *enc[] = { - "ftosis", - "ftouis", + "ftosizs", + "ftouizs", "fsitos", "fuitos", "fcvtsd", "fcvtds", - "ftosid", - "ftouid", + "ftosizd", + "ftouizd", "fsitod", "fuitod" }; From owner-svn-src-stable@FreeBSD.ORG Mon May 19 04:53:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7B7AF14; Mon, 19 May 2014 04:53:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C49032E82; Mon, 19 May 2014 04:53:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4J4rhO4007579; Mon, 19 May 2014 04:53:43 GMT (envelope-from truckman@svn.freebsd.org) Received: (from truckman@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4J4rhxr007578; Mon, 19 May 2014 04:53:43 GMT (envelope-from truckman@svn.freebsd.org) Message-Id: <201405190453.s4J4rhxr007578@svn.freebsd.org> From: Don Lewis Date: Mon, 19 May 2014 04:53:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266427 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2014 04:53:43 -0000 Author: truckman Date: Mon May 19 04:53:43 2014 New Revision: 266427 URL: http://svnweb.freebsd.org/changeset/base/266427 Log: Nuke a couple of unnecessary assigments. Nothing uses the values of rstart and rend after this point. Modified: stable/10/sys/kern/subr_rman.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/subr_rman.c ============================================================================== --- stable/10/sys/kern/subr_rman.c Mon May 19 04:44:27 2014 (r266426) +++ stable/10/sys/kern/subr_rman.c Mon May 19 04:53:43 2014 (r266427) @@ -607,8 +607,6 @@ rman_reserve_resource_bound(struct rman break; if ((s->r_flags & flags) != flags) continue; - rstart = ulmax(s->r_start, start); - rend = ulmin(s->r_end, ulmax(start + count - 1, end)); if (s->r_start >= start && s->r_end <= end && (s->r_end - s->r_start + 1) == count && (s->r_start & amask) == 0 && From owner-svn-src-stable@FreeBSD.ORG Mon May 19 04:55:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 36F4CD1; Mon, 19 May 2014 04:55:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23F3B2E88; Mon, 19 May 2014 04:55:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4J4tsKn008011; Mon, 19 May 2014 04:55:54 GMT (envelope-from truckman@svn.freebsd.org) Received: (from truckman@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4J4tsec008010; Mon, 19 May 2014 04:55:54 GMT (envelope-from truckman@svn.freebsd.org) Message-Id: <201405190455.s4J4tsec008010@svn.freebsd.org> From: Don Lewis Date: Mon, 19 May 2014 04:55:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266428 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2014 04:55:54 -0000 Author: truckman Date: Mon May 19 04:55:53 2014 New Revision: 266428 URL: http://svnweb.freebsd.org/changeset/base/266428 Log: Be even more paranoid about overflow. Requested by: ache Modified: stable/10/sys/kern/subr_rman.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/subr_rman.c ============================================================================== --- stable/10/sys/kern/subr_rman.c Mon May 19 04:53:43 2014 (r266427) +++ stable/10/sys/kern/subr_rman.c Mon May 19 04:55:53 2014 (r266428) @@ -466,8 +466,8 @@ rman_reserve_resource_bound(struct rman } amask = (1ul << RF_ALIGNMENT(flags)) - 1; - if (start + amask < start) { - DPRINTF(("start+amask wrapped around\n")); + if (start > ULONG_MAX - amask) { + DPRINTF(("start+amask would wrap around\n")); goto out; } @@ -487,8 +487,8 @@ rman_reserve_resource_bound(struct rman s->r_start, end)); break; } - if (s->r_start + amask < s->r_start) { - DPRINTF(("s->r_start (%#lx) + amask (%#lx) wrapped\n", + if (s->r_start > ULONG_MAX - amask) { + DPRINTF(("s->r_start (%#lx) + amask (%#lx) too large\n", s->r_start, amask)); break; } From owner-svn-src-stable@FreeBSD.ORG Mon May 19 07:45:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79957E4; Mon, 19 May 2014 07:45:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66A3E2AAE; Mon, 19 May 2014 07:45:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4J7jl4l016509; Mon, 19 May 2014 07:45:47 GMT (envelope-from truckman@svn.freebsd.org) Received: (from truckman@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4J7jlTE016508; Mon, 19 May 2014 07:45:47 GMT (envelope-from truckman@svn.freebsd.org) Message-Id: <201405190745.s4J7jlTE016508@svn.freebsd.org> From: Don Lewis Date: Mon, 19 May 2014 07:45:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266430 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2014 07:45:47 -0000 Author: truckman Date: Mon May 19 07:45:46 2014 New Revision: 266430 URL: http://svnweb.freebsd.org/changeset/base/266430 Log: Nuke a couple of unnecessary assigments. Nothing uses the values of rstart and rend after this point. Modified: stable/9/sys/kern/subr_rman.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/subr_rman.c ============================================================================== --- stable/9/sys/kern/subr_rman.c Mon May 19 05:05:03 2014 (r266429) +++ stable/9/sys/kern/subr_rman.c Mon May 19 07:45:46 2014 (r266430) @@ -602,8 +602,6 @@ rman_reserve_resource_bound(struct rman break; if ((s->r_flags & flags) != flags) continue; - rstart = ulmax(s->r_start, start); - rend = ulmin(s->r_end, ulmax(start + count - 1, end)); if (s->r_start >= start && s->r_end <= end && (s->r_end - s->r_start + 1) == count && (s->r_start & amask) == 0 && From owner-svn-src-stable@FreeBSD.ORG Mon May 19 07:46:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C8236212; Mon, 19 May 2014 07:46:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B4FA92AB3; Mon, 19 May 2014 07:46:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4J7k3ht016657; Mon, 19 May 2014 07:46:03 GMT (envelope-from truckman@svn.freebsd.org) Received: (from truckman@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4J7k3lG016656; Mon, 19 May 2014 07:46:03 GMT (envelope-from truckman@svn.freebsd.org) Message-Id: <201405190746.s4J7k3lG016656@svn.freebsd.org> From: Don Lewis Date: Mon, 19 May 2014 07:46:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r266431 - stable/8/sys/kern X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2014 07:46:03 -0000 Author: truckman Date: Mon May 19 07:46:03 2014 New Revision: 266431 URL: http://svnweb.freebsd.org/changeset/base/266431 Log: Nuke a couple of unnecessary assigments. Nothing uses the values of rstart and rend after this point. Modified: stable/8/sys/kern/subr_rman.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) Modified: stable/8/sys/kern/subr_rman.c ============================================================================== --- stable/8/sys/kern/subr_rman.c Mon May 19 07:45:46 2014 (r266430) +++ stable/8/sys/kern/subr_rman.c Mon May 19 07:46:03 2014 (r266431) @@ -602,8 +602,6 @@ rman_reserve_resource_bound(struct rman break; if ((s->r_flags & flags) != flags) continue; - rstart = ulmax(s->r_start, start); - rend = ulmin(s->r_end, ulmax(start + count - 1, end)); if (s->r_start >= start && s->r_end <= end && (s->r_end - s->r_start + 1) == count && (s->r_start & amask) == 0 && From owner-svn-src-stable@FreeBSD.ORG Mon May 19 07:49:10 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F33546A; Mon, 19 May 2014 07:49:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F10152AE3; Mon, 19 May 2014 07:49:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4J7n9qx017319; Mon, 19 May 2014 07:49:09 GMT (envelope-from truckman@svn.freebsd.org) Received: (from truckman@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4J7n97u017318; Mon, 19 May 2014 07:49:09 GMT (envelope-from truckman@svn.freebsd.org) Message-Id: <201405190749.s4J7n97u017318@svn.freebsd.org> From: Don Lewis Date: Mon, 19 May 2014 07:49:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r266432 - stable/8/sys/kern X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2014 07:49:10 -0000 Author: truckman Date: Mon May 19 07:49:09 2014 New Revision: 266432 URL: http://svnweb.freebsd.org/changeset/base/266432 Log: MFC r265931 Be even more paranoid about overflow. Requested by: ache Modified: stable/8/sys/kern/subr_rman.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) Modified: stable/8/sys/kern/subr_rman.c ============================================================================== --- stable/8/sys/kern/subr_rman.c Mon May 19 07:46:03 2014 (r266431) +++ stable/8/sys/kern/subr_rman.c Mon May 19 07:49:09 2014 (r266432) @@ -461,8 +461,8 @@ rman_reserve_resource_bound(struct rman } amask = (1ul << RF_ALIGNMENT(flags)) - 1; - if (start + amask < start) { - DPRINTF(("start+amask wrapped around\n")); + if (start > ULONG_MAX - amask) { + DPRINTF(("start+amask would wrap around\n")); goto out; } @@ -482,8 +482,8 @@ rman_reserve_resource_bound(struct rman s->r_start, end)); break; } - if (s->r_start + amask < s->r_start) { - DPRINTF(("s->r_start (%#lx) + amask (%#lx) wrapped\n", + if (s->r_start > ULONG_MAX - amask) { + DPRINTF(("s->r_start (%#lx) + amask (%#lx) too large\n", s->r_start, amask)); break; } From owner-svn-src-stable@FreeBSD.ORG Mon May 19 07:49:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 91B2C585; Mon, 19 May 2014 07:49:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F81B2AE5; Mon, 19 May 2014 07:49:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4J7nDSx017525; Mon, 19 May 2014 07:49:13 GMT (envelope-from truckman@svn.freebsd.org) Received: (from truckman@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4J7nD9E017524; Mon, 19 May 2014 07:49:13 GMT (envelope-from truckman@svn.freebsd.org) Message-Id: <201405190749.s4J7nD9E017524@svn.freebsd.org> From: Don Lewis Date: Mon, 19 May 2014 07:49:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266433 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2014 07:49:13 -0000 Author: truckman Date: Mon May 19 07:49:13 2014 New Revision: 266433 URL: http://svnweb.freebsd.org/changeset/base/266433 Log: MFC r265931 Be even more paranoid about overflow. Requested by: ache Modified: stable/9/sys/kern/subr_rman.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/subr_rman.c ============================================================================== --- stable/9/sys/kern/subr_rman.c Mon May 19 07:49:09 2014 (r266432) +++ stable/9/sys/kern/subr_rman.c Mon May 19 07:49:13 2014 (r266433) @@ -461,8 +461,8 @@ rman_reserve_resource_bound(struct rman } amask = (1ul << RF_ALIGNMENT(flags)) - 1; - if (start + amask < start) { - DPRINTF(("start+amask wrapped around\n")); + if (start > ULONG_MAX - amask) { + DPRINTF(("start+amask would wrap around\n")); goto out; } @@ -482,8 +482,8 @@ rman_reserve_resource_bound(struct rman s->r_start, end)); break; } - if (s->r_start + amask < s->r_start) { - DPRINTF(("s->r_start (%#lx) + amask (%#lx) wrapped\n", + if (s->r_start > ULONG_MAX - amask) { + DPRINTF(("s->r_start (%#lx) + amask (%#lx) too large\n", s->r_start, amask)); break; } From owner-svn-src-stable@FreeBSD.ORG Mon May 19 07:51:22 2014 Return-Path: Delivered-To: svn-src-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 80B9DBF7; Mon, 19 May 2014 07:51:22 +0000 (UTC) Received: from gw.catspoiler.org (gw.catspoiler.org [75.1.14.242]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6268C2B97; Mon, 19 May 2014 07:51:18 +0000 (UTC) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id s4J7p9tW097211; Mon, 19 May 2014 00:51:13 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <201405190751.s4J7p9tW097211@gw.catspoiler.org> Date: Mon, 19 May 2014 00:51:09 -0700 (PDT) From: Don Lewis Subject: Re: svn commit: r266431 - stable/8/sys/kern To: src-committers@FreeBSD.org In-Reply-To: <201405190746.s4J7k3lG016656@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-stable-8@FreeBSD.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2014 07:51:22 -0000 On 19 May, To: src-committers@freebsd.org wrote: > Author: truckman > Date: Mon May 19 07:46:03 2014 > New Revision: 266431 > URL: http://svnweb.freebsd.org/changeset/base/266431 > > Log: MFC r265923 > Nuke a couple of unnecessary assigments. Nothing uses the values of rstart > and rend after this point. > > Modified: > stable/8/sys/kern/subr_rman.c > Directory Properties: > stable/8/sys/ (props changed) > stable/8/sys/kern/ (props changed) > > Modified: stable/8/sys/kern/subr_rman.c > ============================================================================== > --- stable/8/sys/kern/subr_rman.c Mon May 19 07:45:46 2014 (r266430) > +++ stable/8/sys/kern/subr_rman.c Mon May 19 07:46:03 2014 (r266431) > @@ -602,8 +602,6 @@ rman_reserve_resource_bound(struct rman > break; > if ((s->r_flags & flags) != flags) > continue; > - rstart = ulmax(s->r_start, start); > - rend = ulmin(s->r_end, ulmax(start + count - 1, end)); > if (s->r_start >= start && s->r_end <= end > && (s->r_end - s->r_start + 1) == count && > (s->r_start & amask) == 0 && > From owner-svn-src-stable@FreeBSD.ORG Mon May 19 07:53:49 2014 Return-Path: Delivered-To: svn-src-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AFAC2ECB; Mon, 19 May 2014 07:53:49 +0000 (UTC) Received: from gw.catspoiler.org (gw.catspoiler.org [75.1.14.242]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F7032BC3; Mon, 19 May 2014 07:53:46 +0000 (UTC) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id s4J7oxhS097208; Mon, 19 May 2014 00:51:03 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <201405190751.s4J7oxhS097208@gw.catspoiler.org> Date: Mon, 19 May 2014 00:50:59 -0700 (PDT) From: Don Lewis Subject: Re: svn commit: r266430 - stable/9/sys/kern To: src-committers@FreeBSD.org In-Reply-To: <201405190745.s4J7jlTE016508@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-stable-9@FreeBSD.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2014 07:53:49 -0000 On 19 May, To: src-committers@freebsd.org wrote: > Author: truckman > Date: Mon May 19 07:45:46 2014 > New Revision: 266430 > URL: http://svnweb.freebsd.org/changeset/base/266430 > > Log: MFC r265923 > Nuke a couple of unnecessary assigments. Nothing uses the values of rstart > and rend after this point. > Modified: > stable/9/sys/kern/subr_rman.c > Directory Properties: > stable/9/sys/ (props changed) > > Modified: stable/9/sys/kern/subr_rman.c > ============================================================================== > --- stable/9/sys/kern/subr_rman.c Mon May 19 05:05:03 2014 (r266429) > +++ stable/9/sys/kern/subr_rman.c Mon May 19 07:45:46 2014 (r266430) > @@ -602,8 +602,6 @@ rman_reserve_resource_bound(struct rman > break; > if ((s->r_flags & flags) != flags) > continue; > - rstart = ulmax(s->r_start, start); > - rend = ulmin(s->r_end, ulmax(start + count - 1, end)); > if (s->r_start >= start && s->r_end <= end > && (s->r_end - s->r_start + 1) == count && > (s->r_start & amask) == 0 && > From owner-svn-src-stable@FreeBSD.ORG Mon May 19 08:07:14 2014 Return-Path: Delivered-To: svn-src-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C1895E8; Mon, 19 May 2014 08:07:14 +0000 (UTC) Received: from gw.catspoiler.org (gw.catspoiler.org [75.1.14.242]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E1F52D89; Mon, 19 May 2014 08:07:14 +0000 (UTC) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id s4J874oP097251; Mon, 19 May 2014 01:07:08 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <201405190807.s4J874oP097251@gw.catspoiler.org> Date: Mon, 19 May 2014 01:07:04 -0700 (PDT) From: Don Lewis Subject: Re: svn commit: r266427 - stable/10/sys/kern To: src-committers@FreeBSD.org In-Reply-To: <201405190453.s4J4rhxr007578@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-stable-10@FreeBSD.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2014 08:07:14 -0000 On 19 May, To: src-committers@freebsd.org wrote: > Author: truckman > Date: Mon May 19 04:53:43 2014 > New Revision: 266427 > URL: http://svnweb.freebsd.org/changeset/base/266427 > > Log: MFC r265923 > Nuke a couple of unnecessary assigments. Nothing uses the values of rstart > and rend after this point. > > Modified: > stable/10/sys/kern/subr_rman.c > Directory Properties: > stable/10/ (props changed) > > Modified: stable/10/sys/kern/subr_rman.c > ============================================================================== > --- stable/10/sys/kern/subr_rman.c Mon May 19 04:44:27 2014 (r266426) > +++ stable/10/sys/kern/subr_rman.c Mon May 19 04:53:43 2014 (r266427) > @@ -607,8 +607,6 @@ rman_reserve_resource_bound(struct rman > break; > if ((s->r_flags & flags) != flags) > continue; > - rstart = ulmax(s->r_start, start); > - rend = ulmin(s->r_end, ulmax(start + count - 1, end)); > if (s->r_start >= start && s->r_end <= end > && (s->r_end - s->r_start + 1) == count && > (s->r_start & amask) == 0 && > From owner-svn-src-stable@FreeBSD.ORG Mon May 19 08:08:00 2014 Return-Path: Delivered-To: svn-src-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 797FB71D; Mon, 19 May 2014 08:08:00 +0000 (UTC) Received: from gw.catspoiler.org (gw.catspoiler.org [75.1.14.242]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A8252D91; Mon, 19 May 2014 08:08:00 +0000 (UTC) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id s4J87oGY097257; Mon, 19 May 2014 01:07:54 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <201405190807.s4J87oGY097257@gw.catspoiler.org> Date: Mon, 19 May 2014 01:07:50 -0700 (PDT) From: Don Lewis Subject: Re: svn commit: r266428 - stable/10/sys/kern To: src-committers@FreeBSD.org In-Reply-To: <201405190455.s4J4tsec008010@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-stable-10@FreeBSD.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2014 08:08:00 -0000 On 19 May, To: src-committers@freebsd.org wrote: > Author: truckman > Date: Mon May 19 04:55:53 2014 > New Revision: 266428 > URL: http://svnweb.freebsd.org/changeset/base/266428 > > Log: MFC r265931 > Be even more paranoid about overflow. > > Requested by: ache > > Modified: > stable/10/sys/kern/subr_rman.c > Directory Properties: > stable/10/ (props changed) > > Modified: stable/10/sys/kern/subr_rman.c > ============================================================================== > --- stable/10/sys/kern/subr_rman.c Mon May 19 04:53:43 2014 (r266427) > +++ stable/10/sys/kern/subr_rman.c Mon May 19 04:55:53 2014 (r266428) > @@ -466,8 +466,8 @@ rman_reserve_resource_bound(struct rman > } > > amask = (1ul << RF_ALIGNMENT(flags)) - 1; > - if (start + amask < start) { > - DPRINTF(("start+amask wrapped around\n")); > + if (start > ULONG_MAX - amask) { > + DPRINTF(("start+amask would wrap around\n")); > goto out; > } > > @@ -487,8 +487,8 @@ rman_reserve_resource_bound(struct rman > s->r_start, end)); > break; > } > - if (s->r_start + amask < s->r_start) { > - DPRINTF(("s->r_start (%#lx) + amask (%#lx) wrapped\n", > + if (s->r_start > ULONG_MAX - amask) { > + DPRINTF(("s->r_start (%#lx) + amask (%#lx) too large\n", > s->r_start, amask)); > break; > } > From owner-svn-src-stable@FreeBSD.ORG Mon May 19 09:26:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A32BBB; Mon, 19 May 2014 09:26:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46C5F243B; Mon, 19 May 2014 09:26:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4J9QX8t082694; Mon, 19 May 2014 09:26:33 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4J9QXqR082693; Mon, 19 May 2014 09:26:33 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201405190926.s4J9QXqR082693@svn.freebsd.org> From: Marius Strobl Date: Mon, 19 May 2014 09:26:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266434 - stable/9/sys/dev/uart X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2014 09:26:33 -0000 Author: marius Date: Mon May 19 09:26:32 2014 New Revision: 266434 URL: http://svnweb.freebsd.org/changeset/base/266434 Log: MFC: r253654 Set the device description after we call uart_probe(). In uart_probe() we call device-specific probe functions, which can (and typically will) set the device description based on low-level device probe information. In the end we never actually used the device description that we so carefully maintained in the PCI match table. By setting the device description after we call uart_probe(), we'll print the more user- friendly description by default. Modified: stable/9/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/uart/uart_bus_pci.c ============================================================================== --- stable/9/sys/dev/uart/uart_bus_pci.c Mon May 19 07:49:13 2014 (r266433) +++ stable/9/sys/dev/uart/uart_bus_pci.c Mon May 19 09:26:32 2014 (r266434) @@ -164,6 +164,7 @@ uart_pci_probe(device_t dev) { struct uart_softc *sc; const struct pci_id *id; + int result; sc = device_get_softc(dev); @@ -176,9 +177,14 @@ uart_pci_probe(device_t dev) return (ENXIO); match: + result = uart_bus_probe(dev, 0, id->rclk, id->rid, 0); + /* Bail out on error. */ + if (result > 0) + return (result); + /* Set/override the device description. */ if (id->desc) device_set_desc(dev, id->desc); - return (uart_bus_probe(dev, 0, id->rclk, id->rid, 0)); + return (result); } DRIVER_MODULE(uart, pci, uart_pci_driver, uart_devclass, NULL, NULL); From owner-svn-src-stable@FreeBSD.ORG Mon May 19 09:26:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5FD431D1; Mon, 19 May 2014 09:26:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A358243F; Mon, 19 May 2014 09:26:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4J9Qaw2082744; Mon, 19 May 2014 09:26:36 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4J9QaYv082743; Mon, 19 May 2014 09:26:36 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201405190926.s4J9QaYv082743@svn.freebsd.org> From: Marius Strobl Date: Mon, 19 May 2014 09:26:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r266435 - stable/8/sys/dev/uart X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2014 09:26:36 -0000 Author: marius Date: Mon May 19 09:26:35 2014 New Revision: 266435 URL: http://svnweb.freebsd.org/changeset/base/266435 Log: MFC: r253654 Set the device description after we call uart_probe(). In uart_probe() we call device-specific probe functions, which can (and typically will) set the device description based on low-level device probe information. In the end we never actually used the device description that we so carefully maintained in the PCI match table. By setting the device description after we call uart_probe(), we'll print the more user- friendly description by default. Modified: stable/8/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/uart/ (props changed) Modified: stable/8/sys/dev/uart/uart_bus_pci.c ============================================================================== --- stable/8/sys/dev/uart/uart_bus_pci.c Mon May 19 09:26:32 2014 (r266434) +++ stable/8/sys/dev/uart/uart_bus_pci.c Mon May 19 09:26:35 2014 (r266435) @@ -164,6 +164,7 @@ uart_pci_probe(device_t dev) { struct uart_softc *sc; const struct pci_id *id; + int result; sc = device_get_softc(dev); @@ -176,9 +177,14 @@ uart_pci_probe(device_t dev) return (ENXIO); match: + result = uart_bus_probe(dev, 0, id->rclk, id->rid, 0); + /* Bail out on error. */ + if (result > 0) + return (result); + /* Set/override the device description. */ if (id->desc) device_set_desc(dev, id->desc); - return (uart_bus_probe(dev, 0, id->rclk, id->rid, 0)); + return (result); } DRIVER_MODULE(uart, pci, uart_pci_driver, uart_devclass, NULL, NULL); From owner-svn-src-stable@FreeBSD.ORG Mon May 19 09:30:00 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F37C362; Mon, 19 May 2014 09:30:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C3FB246B; Mon, 19 May 2014 09:30:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4J9U0h8083348; Mon, 19 May 2014 09:30:00 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4J9U07Y083342; Mon, 19 May 2014 09:30:00 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201405190930.s4J9U07Y083342@svn.freebsd.org> From: Marius Strobl Date: Mon, 19 May 2014 09:30:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266436 - stable/10/sys/dev/uart X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2014 09:30:00 -0000 Author: marius Date: Mon May 19 09:29:59 2014 New Revision: 266436 URL: http://svnweb.freebsd.org/changeset/base/266436 Log: MFC: r257808 Add new AMT serial port PCI ID on Intel Lynx Point chipset Modified: stable/10/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/uart/uart_bus_pci.c ============================================================================== --- stable/10/sys/dev/uart/uart_bus_pci.c Mon May 19 09:26:35 2014 (r266435) +++ stable/10/sys/dev/uart/uart_bus_pci.c Mon May 19 09:29:59 2014 (r266436) @@ -125,6 +125,7 @@ static const struct pci_id pci_ns8250_id { 0x8086, 0x8812, 0xffff, 0, "Intel EG20T Serial Port 1", 0x10 }, { 0x8086, 0x8813, 0xffff, 0, "Intel EG20T Serial Port 2", 0x10 }, { 0x8086, 0x8814, 0xffff, 0, "Intel EG20T Serial Port 3", 0x10 }, +{ 0x8086, 0x8c3d, 0xffff, 0, "Intel Lynx Point KT Controller", 0x10 }, { 0x9710, 0x9820, 0x1000, 1, "NetMos NM9820 Serial Port", 0x10 }, { 0x9710, 0x9835, 0x1000, 1, "NetMos NM9835 Serial Port", 0x10 }, { 0x9710, 0x9865, 0xa000, 0x1000, "NetMos NM9865 Serial Port", 0x10 }, From owner-svn-src-stable@FreeBSD.ORG Mon May 19 09:30:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8F9E448E; Mon, 19 May 2014 09:30:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7CBF52470; Mon, 19 May 2014 09:30:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4J9U5Fw083484; Mon, 19 May 2014 09:30:05 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4J9U5An083483; Mon, 19 May 2014 09:30:05 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201405190930.s4J9U5An083483@svn.freebsd.org> From: Marius Strobl Date: Mon, 19 May 2014 09:30:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266437 - stable/9/sys/dev/uart X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2014 09:30:05 -0000 Author: marius Date: Mon May 19 09:30:05 2014 New Revision: 266437 URL: http://svnweb.freebsd.org/changeset/base/266437 Log: MFC: r257808 Add new AMT serial port PCI ID on Intel Lynx Point chipset Modified: stable/9/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/uart/uart_bus_pci.c ============================================================================== --- stable/9/sys/dev/uart/uart_bus_pci.c Mon May 19 09:29:59 2014 (r266436) +++ stable/9/sys/dev/uart/uart_bus_pci.c Mon May 19 09:30:05 2014 (r266437) @@ -124,6 +124,7 @@ static const struct pci_id pci_ns8250_id { 0x8086, 0x8812, 0xffff, 0, "Intel EG20T Serial Port 1", 0x10 }, { 0x8086, 0x8813, 0xffff, 0, "Intel EG20T Serial Port 2", 0x10 }, { 0x8086, 0x8814, 0xffff, 0, "Intel EG20T Serial Port 3", 0x10 }, +{ 0x8086, 0x8c3d, 0xffff, 0, "Intel Lynx Point KT Controller", 0x10 }, { 0x9710, 0x9820, 0x1000, 1, "NetMos NM9820 Serial Port", 0x10 }, { 0x9710, 0x9835, 0x1000, 1, "NetMos NM9835 Serial Port", 0x10 }, { 0x9710, 0x9865, 0xa000, 0x1000, "NetMos NM9865 Serial Port", 0x10 }, From owner-svn-src-stable@FreeBSD.ORG Mon May 19 09:30:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 25AC75B7; Mon, 19 May 2014 09:30:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 129692474; Mon, 19 May 2014 09:30:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4J9U8Fc083532; Mon, 19 May 2014 09:30:08 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4J9U8BE083531; Mon, 19 May 2014 09:30:08 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201405190930.s4J9U8BE083531@svn.freebsd.org> From: Marius Strobl Date: Mon, 19 May 2014 09:30:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r266438 - stable/8/sys/dev/uart X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2014 09:30:09 -0000 Author: marius Date: Mon May 19 09:30:08 2014 New Revision: 266438 URL: http://svnweb.freebsd.org/changeset/base/266438 Log: MFC: r257808 Add new AMT serial port PCI ID on Intel Lynx Point chipset Modified: stable/8/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/uart/ (props changed) Modified: stable/8/sys/dev/uart/uart_bus_pci.c ============================================================================== --- stable/8/sys/dev/uart/uart_bus_pci.c Mon May 19 09:30:05 2014 (r266437) +++ stable/8/sys/dev/uart/uart_bus_pci.c Mon May 19 09:30:08 2014 (r266438) @@ -124,6 +124,7 @@ static const struct pci_id pci_ns8250_id { 0x8086, 0x8812, 0xffff, 0, "Intel EG20T Serial Port 1", 0x10 }, { 0x8086, 0x8813, 0xffff, 0, "Intel EG20T Serial Port 2", 0x10 }, { 0x8086, 0x8814, 0xffff, 0, "Intel EG20T Serial Port 3", 0x10 }, +{ 0x8086, 0x8c3d, 0xffff, 0, "Intel Lynx Point KT Controller", 0x10 }, { 0x9710, 0x9820, 0x1000, 1, "NetMos NM9820 Serial Port", 0x10 }, { 0x9710, 0x9835, 0x1000, 1, "NetMos NM9835 Serial Port", 0x10 }, { 0x9710, 0x9865, 0xa000, 0x1000, "NetMos NM9865 Serial Port", 0x10 }, From owner-svn-src-stable@FreeBSD.ORG Mon May 19 09:31:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 269FB7F2; Mon, 19 May 2014 09:31:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1227C2513; Mon, 19 May 2014 09:31:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4J9VkYg087720; Mon, 19 May 2014 09:31:46 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4J9Vkns087719; Mon, 19 May 2014 09:31:46 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201405190931.s4J9Vkns087719@svn.freebsd.org> From: Marius Strobl Date: Mon, 19 May 2014 09:31:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266439 - stable/9/sys/dev/uart X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2014 09:31:47 -0000 Author: marius Date: Mon May 19 09:31:46 2014 New Revision: 266439 URL: http://svnweb.freebsd.org/changeset/base/266439 Log: MFC: r259838 Add another HP iLO serial (console) port, found on Itanium servers. Modified: stable/9/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/uart/uart_bus_pci.c ============================================================================== --- stable/9/sys/dev/uart/uart_bus_pci.c Mon May 19 09:30:08 2014 (r266438) +++ stable/9/sys/dev/uart/uart_bus_pci.c Mon May 19 09:31:46 2014 (r266439) @@ -82,6 +82,7 @@ static const struct pci_id pci_ns8250_id 0x10 }, { 0x103c, 0x1048, 0x103c, 0x1301, "HP Diva RMP3", 0x14 }, { 0x103c, 0x1290, 0xffff, 0, "HP Auxiliary Diva Serial Port", 0x18 }, +{ 0x103c, 0x3301, 0xffff, 0, "HP iLO serial port", 0x10 }, { 0x11c1, 0x0480, 0xffff, 0, "Agere Systems Venus Modem (V90, 56KFlex)", 0x14 }, { 0x115d, 0x0103, 0xffff, 0, "Xircom Cardbus Ethernet + 56k Modem", 0x10 }, { 0x1282, 0x6585, 0xffff, 0, "Davicom 56PDV PCI Modem", 0x10 }, From owner-svn-src-stable@FreeBSD.ORG Mon May 19 09:31:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 170307F8; Mon, 19 May 2014 09:31:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 03F322515; Mon, 19 May 2014 09:31:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4J9VngU088517; Mon, 19 May 2014 09:31:49 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4J9VnTm088515; Mon, 19 May 2014 09:31:49 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201405190931.s4J9VnTm088515@svn.freebsd.org> From: Marius Strobl Date: Mon, 19 May 2014 09:31:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r266440 - stable/8/sys/dev/uart X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2014 09:31:50 -0000 Author: marius Date: Mon May 19 09:31:49 2014 New Revision: 266440 URL: http://svnweb.freebsd.org/changeset/base/266440 Log: MFC: r259838 Add another HP iLO serial (console) port, found on Itanium servers. Modified: stable/8/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/uart/ (props changed) Modified: stable/8/sys/dev/uart/uart_bus_pci.c ============================================================================== --- stable/8/sys/dev/uart/uart_bus_pci.c Mon May 19 09:31:46 2014 (r266439) +++ stable/8/sys/dev/uart/uart_bus_pci.c Mon May 19 09:31:49 2014 (r266440) @@ -82,6 +82,7 @@ static const struct pci_id pci_ns8250_id 0x10 }, { 0x103c, 0x1048, 0x103c, 0x1301, "HP Diva RMP3", 0x14 }, { 0x103c, 0x1290, 0xffff, 0, "HP Auxiliary Diva Serial Port", 0x18 }, +{ 0x103c, 0x3301, 0xffff, 0, "HP iLO serial port", 0x10 }, { 0x11c1, 0x0480, 0xffff, 0, "Agere Systems Venus Modem (V90, 56KFlex)", 0x14 }, { 0x115d, 0x0103, 0xffff, 0, "Xircom Cardbus Ethernet + 56k Modem", 0x10 }, { 0x1282, 0x6585, 0xffff, 0, "Davicom 56PDV PCI Modem", 0x10 }, From owner-svn-src-stable@FreeBSD.ORG Mon May 19 10:08:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1AAF85CB; Mon, 19 May 2014 10:08:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 072BF2819; Mon, 19 May 2014 10:08:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4JA85xH009259; Mon, 19 May 2014 10:08:05 GMT (envelope-from thomas@svn.freebsd.org) Received: (from thomas@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4JA8511009258; Mon, 19 May 2014 10:08:05 GMT (envelope-from thomas@svn.freebsd.org) Message-Id: <201405191008.s4JA8511009258@svn.freebsd.org> From: Thomas Quinot Date: Mon, 19 May 2014 10:08:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266441 - stable/10/tools/tools/nanobsd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2014 10:08:06 -0000 Author: thomas Date: Mon May 19 10:08:05 2014 New Revision: 266441 URL: http://svnweb.freebsd.org/changeset/base/266441 Log: MFC rev. 265926: (NANO_CONFIG): New variable containing path of config file, so that the configuration can reference additional files relative to its own location. (NANO_MODULES): If set to "default", install all built modules. Reviewed by: imp Modified: stable/10/tools/tools/nanobsd/nanobsd.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/tools/nanobsd/nanobsd.sh ============================================================================== --- stable/10/tools/tools/nanobsd/nanobsd.sh Mon May 19 09:31:49 2014 (r266440) +++ stable/10/tools/tools/nanobsd/nanobsd.sh Mon May 19 10:08:05 2014 (r266441) @@ -79,7 +79,8 @@ CONF_WORLD=' ' # Kernel config file to use NANO_KERNEL=GENERIC -# Kernel modules to build; default is none +# Kernel modules to install. If empty, no modules are installed. +# Use "default" to install all built modules. NANO_MODULES= # Customize commands. @@ -321,13 +322,19 @@ install_kernel ( ) ( kernconf=${NANO_KERNEL} fi + # Install all built modules if NANO_MODULES=default, + # else install only listed modules (none if NANO_MODULES is empty). + if [ "${NANO_MODULES}" != "default" ]; then + modules_override_arg="MODULES_OVERRIDE='${NANO_MODULES}'" + fi + cd ${NANO_SRC} eval "TARGET_ARCH=${NANO_ARCH} ${NANO_MAKE} installkernel \ DESTDIR='${NANO_WORLDDIR}' \ SRCCONF='${SRCCONF}' \ __MAKE_CONF='${NANO_MAKE_CONF_INSTALL}' \ ${kernconfdir_arg} KERNCONF=${kernconf} \ - MODULES_OVERRIDE='${NANO_MODULES}'" + ${modules_override_arg}" ) > ${NANO_OBJ}/_.ik 2>&1 ) @@ -925,6 +932,10 @@ do shift ;; -c) + # Make config file path available to the config file + # itself so that it can access additional files relative + # to its own location. + NANO_CONFIG=$2 . "$2" shift shift From owner-svn-src-stable@FreeBSD.ORG Mon May 19 11:17:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3117CE9; Mon, 19 May 2014 11:17:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A5FCE2002; Mon, 19 May 2014 11:17:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4JBHiAC053495; Mon, 19 May 2014 11:17:44 GMT (envelope-from thomas@svn.freebsd.org) Received: (from thomas@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4JBHiGU053494; Mon, 19 May 2014 11:17:44 GMT (envelope-from thomas@svn.freebsd.org) Message-Id: <201405191117.s4JBHiGU053494@svn.freebsd.org> From: Thomas Quinot Date: Mon, 19 May 2014 11:17:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266442 - stable/9/tools/tools/nanobsd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2014 11:17:44 -0000 Author: thomas Date: Mon May 19 11:17:44 2014 New Revision: 266442 URL: http://svnweb.freebsd.org/changeset/base/266442 Log: MFC rev. 265926: (NANO_CONFIG): New variable containing path of config file, so that the configuration can reference additional files relative to its own location. (NANO_MODULES): If set to "default", install all built modules. Also update mergeinfo for past MFC of rev. 265260. Reviewed by: imp Modified: stable/9/tools/tools/nanobsd/nanobsd.sh Directory Properties: stable/9/ (props changed) stable/9/tools/ (props changed) stable/9/tools/tools/ (props changed) stable/9/tools/tools/nanobsd/ (props changed) Modified: stable/9/tools/tools/nanobsd/nanobsd.sh ============================================================================== --- stable/9/tools/tools/nanobsd/nanobsd.sh Mon May 19 10:08:05 2014 (r266441) +++ stable/9/tools/tools/nanobsd/nanobsd.sh Mon May 19 11:17:44 2014 (r266442) @@ -75,7 +75,8 @@ CONF_WORLD=' ' # Kernel config file to use NANO_KERNEL=GENERIC -# Kernel modules to build; default is none +# Kernel modules to install. If empty, no modules are installed. +# Use "default" to install all built modules. NANO_MODULES= # Customize commands. @@ -286,12 +287,18 @@ install_kernel ( ) ( kernconf=${NANO_KERNEL} fi + # Install all built modules if NANO_MODULES=default, + # else install only listed modules (none if NANO_MODULES is empty). + if [ "${NANO_MODULES}" != "default" ]; then + modules_override_arg="MODULES_OVERRIDE='${NANO_MODULES}'" + fi + cd ${NANO_SRC} eval "TARGET_ARCH=${NANO_ARCH} ${NANO_MAKE} installkernel \ DESTDIR='${NANO_WORLDDIR}' \ __MAKE_CONF='${NANO_MAKE_CONF_INSTALL}' \ ${kernconfdir_arg} KERNCONF=${kernconf} \ - MODULES_OVERRIDE='${NANO_MODULES}'" + ${modules_override_arg}" ) > ${NANO_OBJ}/_.ik 2>&1 ) @@ -810,6 +817,10 @@ do shift ;; -c) + # Make config file path available to the config file + # itself so that it can access additional files relative + # to its own location. + NANO_CONFIG=$2 . "$2" shift shift From owner-svn-src-stable@FreeBSD.ORG Mon May 19 16:15:28 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A5A852F; Mon, 19 May 2014 16:15:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 673FF2B16; Mon, 19 May 2014 16:15:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4JGFS4i050029; Mon, 19 May 2014 16:15:28 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4JGFS9c050027; Mon, 19 May 2014 16:15:28 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201405191615.s4JGFS9c050027@svn.freebsd.org> From: Rick Macklem Date: Mon, 19 May 2014 16:15:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266447 - stable/9/sys/fs/nfsserver X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2014 16:15:28 -0000 Author: rmacklem Date: Mon May 19 16:15:27 2014 New Revision: 266447 URL: http://svnweb.freebsd.org/changeset/base/266447 Log: MFC: r227809 This patch enables the new/default NFS server's use of shared vnode locking for read, readdir, readlink, getattr and access. It is hoped that this will improve server performance for these operations, since they will no longer be serialized for a given file/vnode. PR: 167048 Modified: stable/9/sys/fs/nfsserver/nfs_nfsdport.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/9/sys/fs/nfsserver/nfs_nfsdport.c Mon May 19 16:13:40 2014 (r266446) +++ stable/9/sys/fs/nfsserver/nfs_nfsdport.c Mon May 19 16:15:27 2014 (r266447) @@ -2693,7 +2693,7 @@ nfsvno_fhtovp(struct mount *mp, fhandle_ if (VFS_NEEDSGIANT(mp)) error = ESTALE; else - error = VFS_FHTOVP(mp, &fhp->fh_fid, LK_EXCLUSIVE, vpp); + error = VFS_FHTOVP(mp, &fhp->fh_fid, lktype, vpp); if (error != 0) /* Make sure the server replies ESTALE to the client. */ error = ESTALE; @@ -2714,14 +2714,6 @@ nfsvno_fhtovp(struct mount *mp, fhandle_ exp->nes_secflavors[i] = secflavors[i]; } } - if (error == 0 && lktype == LK_SHARED) - /* - * It would be much better to pass lktype to VFS_FHTOVP(), - * but this will have to do until VFS_FHTOVP() has a lock - * type argument like VFS_VGET(). - */ - NFSVOPLOCK(*vpp, LK_DOWNGRADE | LK_RETRY); - NFSEXITCODE(error); return (error); } From owner-svn-src-stable@FreeBSD.ORG Mon May 19 19:49:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87A489F1; Mon, 19 May 2014 19:49:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 748F12052; Mon, 19 May 2014 19:49:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4JJn76Y087312; Mon, 19 May 2014 19:49:07 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4JJn79Q087310; Mon, 19 May 2014 19:49:07 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201405191949.s4JJn79Q087310@svn.freebsd.org> From: Mark Johnston Date: Mon, 19 May 2014 19:49:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266452 - stable/10/sys/dev/hwpmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2014 19:49:07 -0000 Author: markj Date: Mon May 19 19:49:06 2014 New Revision: 266452 URL: http://svnweb.freebsd.org/changeset/base/266452 Log: MFC r266195: Remove some prototypes for undefined functions. Modified: stable/10/sys/dev/hwpmc/hwpmc_core.h stable/10/sys/dev/hwpmc/hwpmc_uncore.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hwpmc/hwpmc_core.h ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_core.h Mon May 19 19:34:44 2014 (r266451) +++ stable/10/sys/dev/hwpmc/hwpmc_core.h Mon May 19 19:49:06 2014 (r266452) @@ -178,8 +178,6 @@ struct pmc_md_iap_pmc { int pmc_core_initialize(struct pmc_mdep *_md, int _maxcpu); void pmc_core_finalize(struct pmc_mdep *_md); -void pmc_core_mark_started(int _cpu, int _pmc); - int pmc_iaf_initialize(struct pmc_mdep *_md, int _maxcpu, int _npmc, int _width); void pmc_iaf_finalize(struct pmc_mdep *_md); Modified: stable/10/sys/dev/hwpmc/hwpmc_uncore.h ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_uncore.h Mon May 19 19:34:44 2014 (r266451) +++ stable/10/sys/dev/hwpmc/hwpmc_uncore.h Mon May 19 19:49:06 2014 (r266452) @@ -115,8 +115,6 @@ struct pmc_md_ucp_pmc { int pmc_uncore_initialize(struct pmc_mdep *_md, int _maxcpu); void pmc_uncore_finalize(struct pmc_mdep *_md); -void pmc_uncore_mark_started(int _cpu, int _pmc); - int pmc_ucf_initialize(struct pmc_mdep *_md, int _maxcpu, int _npmc, int _width); void pmc_ucf_finalize(struct pmc_mdep *_md); From owner-svn-src-stable@FreeBSD.ORG Mon May 19 19:54:22 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 59A59B8A; Mon, 19 May 2014 19:54:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 469F820F8; Mon, 19 May 2014 19:54:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4JJsM1A092708; Mon, 19 May 2014 19:54:22 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4JJsLsJ092706; Mon, 19 May 2014 19:54:21 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201405191954.s4JJsLsJ092706@svn.freebsd.org> From: Mark Johnston Date: Mon, 19 May 2014 19:54:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266453 - stable/9/sys/dev/hwpmc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2014 19:54:22 -0000 Author: markj Date: Mon May 19 19:54:21 2014 New Revision: 266453 URL: http://svnweb.freebsd.org/changeset/base/266453 Log: MFC r266195: Remove some prototypes for undefined functions. Modified: stable/9/sys/dev/hwpmc/hwpmc_core.h stable/9/sys/dev/hwpmc/hwpmc_uncore.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/hwpmc/hwpmc_core.h ============================================================================== --- stable/9/sys/dev/hwpmc/hwpmc_core.h Mon May 19 19:49:06 2014 (r266452) +++ stable/9/sys/dev/hwpmc/hwpmc_core.h Mon May 19 19:54:21 2014 (r266453) @@ -178,8 +178,6 @@ struct pmc_md_iap_pmc { int pmc_core_initialize(struct pmc_mdep *_md, int _maxcpu); void pmc_core_finalize(struct pmc_mdep *_md); -void pmc_core_mark_started(int _cpu, int _pmc); - int pmc_iaf_initialize(struct pmc_mdep *_md, int _maxcpu, int _npmc, int _width); void pmc_iaf_finalize(struct pmc_mdep *_md); Modified: stable/9/sys/dev/hwpmc/hwpmc_uncore.h ============================================================================== --- stable/9/sys/dev/hwpmc/hwpmc_uncore.h Mon May 19 19:49:06 2014 (r266452) +++ stable/9/sys/dev/hwpmc/hwpmc_uncore.h Mon May 19 19:54:21 2014 (r266453) @@ -115,8 +115,6 @@ struct pmc_md_ucp_pmc { int pmc_uncore_initialize(struct pmc_mdep *_md, int _maxcpu); void pmc_uncore_finalize(struct pmc_mdep *_md); -void pmc_uncore_mark_started(int _cpu, int _pmc); - int pmc_ucf_initialize(struct pmc_mdep *_md, int _maxcpu, int _npmc, int _width); void pmc_ucf_finalize(struct pmc_mdep *_md); From owner-svn-src-stable@FreeBSD.ORG Tue May 20 00:57:01 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0041D351; Tue, 20 May 2014 00:57:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0E6B29F5; Tue, 20 May 2014 00:57:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4K0v0Lb082571; Tue, 20 May 2014 00:57:00 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4K0v0XV082570; Tue, 20 May 2014 00:57:00 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201405200057.s4K0v0XV082570@svn.freebsd.org> From: Xin LI Date: Tue, 20 May 2014 00:57:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266457 - stable/10/contrib/ntp/ntpd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 May 2014 00:57:01 -0000 Author: delphij Date: Tue May 20 00:57:00 2014 New Revision: 266457 URL: http://svnweb.freebsd.org/changeset/base/266457 Log: MFC r265465: Don't reply monlist request when it's not enabled. Modified: stable/10/contrib/ntp/ntpd/ntp_request.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/ntp/ntpd/ntp_request.c ============================================================================== --- stable/10/contrib/ntp/ntpd/ntp_request.c Mon May 19 21:55:47 2014 (r266456) +++ stable/10/contrib/ntp/ntpd/ntp_request.c Tue May 20 00:57:00 2014 (r266457) @@ -1920,7 +1920,6 @@ mon_getlist_0( printf("wants monitor 0 list\n"); #endif if (!mon_enabled) { - req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA); return; } im = (struct info_monitor *)prepare_pkt(srcadr, inter, inpkt, @@ -1965,7 +1964,6 @@ mon_getlist_1( extern int mon_enabled; if (!mon_enabled) { - req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA); return; } im = (struct info_monitor_1 *)prepare_pkt(srcadr, inter, inpkt, From owner-svn-src-stable@FreeBSD.ORG Tue May 20 00:57:29 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1F46247C; Tue, 20 May 2014 00:57:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C33929FA; Tue, 20 May 2014 00:57:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4K0vSpH082679; Tue, 20 May 2014 00:57:28 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4K0vSmU082678; Tue, 20 May 2014 00:57:28 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201405200057.s4K0vSmU082678@svn.freebsd.org> From: Xin LI Date: Tue, 20 May 2014 00:57:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266458 - stable/9/contrib/ntp/ntpd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 May 2014 00:57:29 -0000 Author: delphij Date: Tue May 20 00:57:28 2014 New Revision: 266458 URL: http://svnweb.freebsd.org/changeset/base/266458 Log: MFC r265465: Don't reply monlist request when it's not enabled. Modified: stable/9/contrib/ntp/ntpd/ntp_request.c Directory Properties: stable/9/contrib/ntp/ (props changed) Modified: stable/9/contrib/ntp/ntpd/ntp_request.c ============================================================================== --- stable/9/contrib/ntp/ntpd/ntp_request.c Tue May 20 00:57:00 2014 (r266457) +++ stable/9/contrib/ntp/ntpd/ntp_request.c Tue May 20 00:57:28 2014 (r266458) @@ -1920,7 +1920,6 @@ mon_getlist_0( printf("wants monitor 0 list\n"); #endif if (!mon_enabled) { - req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA); return; } im = (struct info_monitor *)prepare_pkt(srcadr, inter, inpkt, @@ -1965,7 +1964,6 @@ mon_getlist_1( extern int mon_enabled; if (!mon_enabled) { - req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA); return; } im = (struct info_monitor_1 *)prepare_pkt(srcadr, inter, inpkt, From owner-svn-src-stable@FreeBSD.ORG Tue May 20 00:57:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 56C145AA; Tue, 20 May 2014 00:57:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43A5029FD; Tue, 20 May 2014 00:57:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4K0vsso082773; Tue, 20 May 2014 00:57:54 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4K0vsnJ082772; Tue, 20 May 2014 00:57:54 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201405200057.s4K0vsnJ082772@svn.freebsd.org> From: Xin LI Date: Tue, 20 May 2014 00:57:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r266459 - stable/8/contrib/ntp/ntpd X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 May 2014 00:57:54 -0000 Author: delphij Date: Tue May 20 00:57:53 2014 New Revision: 266459 URL: http://svnweb.freebsd.org/changeset/base/266459 Log: MFC r265465: Don't reply monlist request when it's not enabled. Modified: stable/8/contrib/ntp/ntpd/ntp_request.c Directory Properties: stable/8/contrib/ntp/ (props changed) Modified: stable/8/contrib/ntp/ntpd/ntp_request.c ============================================================================== --- stable/8/contrib/ntp/ntpd/ntp_request.c Tue May 20 00:57:28 2014 (r266458) +++ stable/8/contrib/ntp/ntpd/ntp_request.c Tue May 20 00:57:53 2014 (r266459) @@ -1902,7 +1902,6 @@ mon_getlist_0( printf("wants monitor 0 list\n"); #endif if (!mon_enabled) { - req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA); return; } im = (struct info_monitor *)prepare_pkt(srcadr, inter, inpkt, @@ -1947,7 +1946,6 @@ mon_getlist_1( extern int mon_enabled; if (!mon_enabled) { - req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA); return; } im = (struct info_monitor_1 *)prepare_pkt(srcadr, inter, inpkt, From owner-svn-src-stable@FreeBSD.ORG Tue May 20 01:17:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26B19883; Tue, 20 May 2014 01:17:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 13BC52B7D; Tue, 20 May 2014 01:17:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4K1Hqft095320; Tue, 20 May 2014 01:17:52 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4K1Hq3m095319; Tue, 20 May 2014 01:17:52 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201405200117.s4K1Hq3m095319@svn.freebsd.org> From: Glen Barber Date: Tue, 20 May 2014 01:17:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266460 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 May 2014 01:17:53 -0000 Author: gjb Date: Tue May 20 01:17:52 2014 New Revision: 266460 URL: http://svnweb.freebsd.org/changeset/base/266460 Log: Document r266279 and r266280, '-J' flag to ps(1), and corresponding top(1) change. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 20 00:57:53 2014 (r266459) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 20 01:17:52 2014 (r266460) @@ -229,6 +229,17 @@ -b, which outputs the existing buses and their parents. + The &man.ps.1; utility has been + updated to include the -J flag, used to + filter output by matching &man.jail.8; IDs and names. + Additionally, argument 0 can be used to + -J to only list processes running on the + host system. + + The &man.top.1; utility has been updated + to filter by &man.jail.8; ID or name, in followup to the + &man.ps.1; change in r265229. + <filename>/etc/rc.d</filename> Scripts From owner-svn-src-stable@FreeBSD.ORG Tue May 20 01:18:00 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 11F8B9AA; Tue, 20 May 2014 01:18:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F2C1E2B7E; Tue, 20 May 2014 01:17:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4K1HxHH095368; Tue, 20 May 2014 01:17:59 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4K1HxrZ095367; Tue, 20 May 2014 01:17:59 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201405200117.s4K1HxrZ095367@svn.freebsd.org> From: Glen Barber Date: Tue, 20 May 2014 01:17:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266461 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 May 2014 01:18:00 -0000 Author: gjb Date: Tue May 20 01:17:59 2014 New Revision: 266461 URL: http://svnweb.freebsd.org/changeset/base/266461 Log: Document r266286 and r266287, '-J' flag to ps(1), and corresponding top(1) change. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 20 01:17:52 2014 (r266460) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 20 01:17:59 2014 (r266461) @@ -601,6 +601,17 @@ -noignore_readdir_race now also exists, and is the default behavior. + The &man.ps.1; utility has been updated + to include the -J flag, used to filter + output by matching &man.jail.8; IDs and names. Additionally, + argument 0 can be used to + -J to only list processes running on the + host system. + + The &man.top.1; utility has been updated + to filter by &man.jail.8; ID or name, in followup to the + &man.ps.1; change in r265229. + &man.periodic.8; Scripts From owner-svn-src-stable@FreeBSD.ORG Tue May 20 21:05:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 586BD505; Tue, 20 May 2014 21:05:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 439752303; Tue, 20 May 2014 21:05:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4KL5bqj090084; Tue, 20 May 2014 21:05:37 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4KL5bLt090083; Tue, 20 May 2014 21:05:37 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201405202105.s4KL5bLt090083@svn.freebsd.org> From: John Baldwin Date: Tue, 20 May 2014 21:05:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266477 - stable/10/sys/amd64/vmm/io X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 May 2014 21:05:37 -0000 Author: jhb Date: Tue May 20 21:05:36 2014 New Revision: 266477 URL: http://svnweb.freebsd.org/changeset/base/266477 Log: MFC 260237: Fix a bug in the HPET emulation where a timer interrupt could be lost when the guest disables the HPET. The HPET timer interrupt is triggered from the callout handler associated with the timer. It is possible for the callout handler to be delayed before it gets a chance to execute. If the guest disables the HPET during this window then the handler never gets a chance to execute and the timer interrupt is lost. This is now fixed by injecting a timer interrupt into the guest if the callout time is detected to be in the past when the HPET is disabled. Modified: stable/10/sys/amd64/vmm/io/vhpet.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/vmm/io/vhpet.c ============================================================================== --- stable/10/sys/amd64/vmm/io/vhpet.c Tue May 20 20:30:28 2014 (r266476) +++ stable/10/sys/amd64/vmm/io/vhpet.c Tue May 20 21:05:36 2014 (r266477) @@ -77,8 +77,8 @@ struct vhpet { uint64_t config; /* Configuration */ uint64_t isr; /* Interrupt Status */ - uint32_t counter; /* HPET Counter */ - sbintime_t counter_sbt; + uint32_t countbase; /* HPET counter base value */ + sbintime_t countbase_sbt; /* uptime corresponding to base value */ struct { uint64_t cap_config; /* Configuration */ @@ -86,6 +86,7 @@ struct vhpet { uint32_t compval; /* Comparator */ uint32_t comprate; struct callout callout; + sbintime_t callout_sbt; /* time when counter==compval */ struct vhpet_callout_arg arg; } timer[VHPET_NUM_TIMERS]; }; @@ -93,6 +94,9 @@ struct vhpet { #define VHPET_LOCK(vhp) mtx_lock(&((vhp)->mtx)) #define VHPET_UNLOCK(vhp) mtx_unlock(&((vhp)->mtx)) +static void vhpet_start_timer(struct vhpet *vhpet, int n, uint32_t counter, + sbintime_t now); + static uint64_t vhpet_capabilities(void) { @@ -164,30 +168,28 @@ vhpet_timer_ioapic_pin(struct vhpet *vhp } static uint32_t -vhpet_counter(struct vhpet *vhpet, bool latch) +vhpet_counter(struct vhpet *vhpet, sbintime_t *nowptr) { uint32_t val; - sbintime_t cur_sbt, delta_sbt; + sbintime_t now, delta; - val = vhpet->counter; + val = vhpet->countbase; if (vhpet_counter_enabled(vhpet)) { - cur_sbt = sbinuptime(); - delta_sbt = cur_sbt - vhpet->counter_sbt; - KASSERT(delta_sbt >= 0, - ("vhpet counter went backwards: %#lx to %#lx", - vhpet->counter_sbt, cur_sbt)); - val += delta_sbt / vhpet->freq_sbt; - + now = sbinuptime(); + delta = now - vhpet->countbase_sbt; + KASSERT(delta >= 0, ("vhpet_counter: uptime went backwards: " + "%#lx to %#lx", vhpet->countbase_sbt, now)); + val += delta / vhpet->freq_sbt; + if (nowptr != NULL) + *nowptr = now; + } else { /* - * Keep track of the last value of the main counter that - * was read by the guest. + * The sbinuptime corresponding to the 'countbase' is + * meaningless when the counter is disabled. Make sure + * that the the caller doesn't want to use it. */ - if (latch) { - vhpet->counter = val; - vhpet->counter_sbt = cur_sbt; - } + KASSERT(nowptr == NULL, ("vhpet_counter: nowptr must be NULL")); } - return (val); } @@ -305,7 +307,7 @@ vhpet_handler(void *a) { int n; uint32_t counter; - sbintime_t sbt; + sbintime_t now; struct vhpet *vhpet; struct callout *callout; struct vhpet_callout_arg *arg; @@ -330,14 +332,8 @@ vhpet_handler(void *a) if (!vhpet_counter_enabled(vhpet)) panic("vhpet(%p) callout with counter disabled", vhpet); - counter = vhpet_counter(vhpet, false); - - /* Update the accumulator for periodic timers */ - if (vhpet->timer[n].comprate != 0) - vhpet_adjust_compval(vhpet, n, counter); - - sbt = (vhpet->timer[n].compval - counter) * vhpet->freq_sbt; - callout_reset_sbt(callout, sbt, 0, vhpet_handler, arg, 0); + counter = vhpet_counter(vhpet, &now); + vhpet_start_timer(vhpet, n, counter, now); vhpet_timer_interrupt(vhpet, n); done: VHPET_UNLOCK(vhpet); @@ -345,45 +341,47 @@ done: } static void -vhpet_stop_timer(struct vhpet *vhpet, int n) +vhpet_stop_timer(struct vhpet *vhpet, int n, sbintime_t now) { + VM_CTR1(vhpet->vm, "hpet t%d stopped", n); callout_stop(&vhpet->timer[n].callout); - vhpet_timer_clear_isr(vhpet, n); + + /* + * If the callout was scheduled to expire in the past but hasn't + * had a chance to execute yet then trigger the timer interrupt + * here. Failing to do so will result in a missed timer interrupt + * in the guest. This is especially bad in one-shot mode because + * the next interrupt has to wait for the counter to wrap around. + */ + if (vhpet->timer[n].callout_sbt < now) { + VM_CTR1(vhpet->vm, "hpet t%d interrupt triggered after " + "stopping timer", n); + vhpet_timer_interrupt(vhpet, n); + } } static void -vhpet_start_timer(struct vhpet *vhpet, int n) +vhpet_start_timer(struct vhpet *vhpet, int n, uint32_t counter, sbintime_t now) { - uint32_t counter, delta, delta2; - sbintime_t sbt; - - counter = vhpet_counter(vhpet, false); + sbintime_t delta, precision; if (vhpet->timer[n].comprate != 0) vhpet_adjust_compval(vhpet, n, counter); - - delta = vhpet->timer[n].compval - counter; - - /* - * In one-shot mode the guest will typically read the main counter - * before programming the comparator. We can use this heuristic to - * figure out whether the expiration time is in the past. If this - * is the case we schedule the callout to fire immediately. - */ - if (!vhpet_periodic_timer(vhpet, n)) { - delta2 = vhpet->timer[n].compval - vhpet->counter; - if (delta > delta2) { - VM_CTR3(vhpet->vm, "hpet t%d comparator value is in " - "the past: %u/%u/%u", counter, - vhpet->timer[n].compval, vhpet->counter); - delta = 0; - } + else { + /* + * In one-shot mode it is the guest's responsibility to make + * sure that the comparator value is not in the "past". The + * hardware doesn't have any belt-and-suspenders to deal with + * this so we don't either. + */ } - sbt = delta * vhpet->freq_sbt; - callout_reset_sbt(&vhpet->timer[n].callout, sbt, 0, vhpet_handler, - &vhpet->timer[n].arg, 0); + delta = (vhpet->timer[n].compval - counter) * vhpet->freq_sbt; + precision = delta >> tc_precexp; + vhpet->timer[n].callout_sbt = now + delta; + callout_reset_sbt(&vhpet->timer[n].callout, vhpet->timer[n].callout_sbt, + precision, vhpet_handler, &vhpet->timer[n].arg, C_ABSOLUTE); } static void @@ -391,18 +389,25 @@ vhpet_start_counting(struct vhpet *vhpet { int i; - vhpet->counter_sbt = sbinuptime(); - for (i = 0; i < VHPET_NUM_TIMERS; i++) - vhpet_start_timer(vhpet, i); + vhpet->countbase_sbt = sbinuptime(); + for (i = 0; i < VHPET_NUM_TIMERS; i++) { + /* + * Restart the timers based on the value of the main counter + * when it stopped counting. + */ + vhpet_start_timer(vhpet, i, vhpet->countbase, + vhpet->countbase_sbt); + } } static void -vhpet_stop_counting(struct vhpet *vhpet) +vhpet_stop_counting(struct vhpet *vhpet, uint32_t counter, sbintime_t now) { int i; + vhpet->countbase = counter; for (i = 0; i < VHPET_NUM_TIMERS; i++) - vhpet_stop_timer(vhpet, i); + vhpet_stop_timer(vhpet, i, now); } static __inline void @@ -496,7 +501,8 @@ vhpet_mmio_write(void *vm, int vcpuid, u { struct vhpet *vhpet; uint64_t data, mask, oldval, val64; - uint32_t isr_clear_mask, old_compval, old_comprate; + uint32_t isr_clear_mask, old_compval, old_comprate, counter; + sbintime_t now, *nowptr; int i, offset; vhpet = vm_hpet(vm); @@ -532,6 +538,14 @@ vhpet_mmio_write(void *vm, int vcpuid, u } if (offset == HPET_CONFIG || offset == HPET_CONFIG + 4) { + /* + * Get the most recent value of the counter before updating + * the 'config' register. If the HPET is going to be disabled + * then we need to update 'countbase' with the value right + * before it is disabled. + */ + nowptr = vhpet_counter_enabled(vhpet) ? &now : NULL; + counter = vhpet_counter(vhpet, nowptr); oldval = vhpet->config; update_register(&vhpet->config, data, mask); if ((oldval ^ vhpet->config) & HPET_CNF_ENABLE) { @@ -539,7 +553,7 @@ vhpet_mmio_write(void *vm, int vcpuid, u vhpet_start_counting(vhpet); VM_CTR0(vhpet->vm, "hpet enabled"); } else { - vhpet_stop_counting(vhpet); + vhpet_stop_counting(vhpet, counter, now); VM_CTR0(vhpet->vm, "hpet disabled"); } } @@ -559,9 +573,9 @@ vhpet_mmio_write(void *vm, int vcpuid, u if (offset == HPET_MAIN_COUNTER || offset == HPET_MAIN_COUNTER + 4) { /* Zero-extend the counter to 64-bits before updating it */ - val64 = vhpet->counter; + val64 = vhpet_counter(vhpet, NULL); update_register(&val64, data, mask); - vhpet->counter = val64; + vhpet->countbase = val64; if (vhpet_counter_enabled(vhpet)) vhpet_start_counting(vhpet); goto done; @@ -604,8 +618,11 @@ vhpet_mmio_write(void *vm, int vcpuid, u if (vhpet->timer[i].compval != old_compval || vhpet->timer[i].comprate != old_comprate) { - if (vhpet_counter_enabled(vhpet)) - vhpet_start_timer(vhpet, i); + if (vhpet_counter_enabled(vhpet)) { + counter = vhpet_counter(vhpet, &now); + vhpet_start_timer(vhpet, i, counter, + now); + } } break; } @@ -666,7 +683,7 @@ vhpet_mmio_read(void *vm, int vcpuid, ui } if (offset == HPET_MAIN_COUNTER || offset == HPET_MAIN_COUNTER + 4) { - data = vhpet_counter(vhpet, true); + data = vhpet_counter(vhpet, NULL); goto done; } From owner-svn-src-stable@FreeBSD.ORG Tue May 20 21:15:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E55A5B8A; Tue, 20 May 2014 21:15:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D15502414; Tue, 20 May 2014 21:15:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4KLFmWZ095003; Tue, 20 May 2014 21:15:48 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4KLFm7S095002; Tue, 20 May 2014 21:15:48 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201405202115.s4KLFm7S095002@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 20 May 2014 21:15:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266478 - stable/10/gnu/usr.bin/groff/tmac X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 May 2014 21:15:50 -0000 Author: pluknet Date: Tue May 20 21:15:47 2014 New Revision: 266478 URL: http://svnweb.freebsd.org/changeset/base/266478 Log: Add FreeBSD version 11.0. This is a direct commit to stable/10. Modified: stable/10/gnu/usr.bin/groff/tmac/mdoc.local Modified: stable/10/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- stable/10/gnu/usr.bin/groff/tmac/mdoc.local Tue May 20 21:05:36 2014 (r266477) +++ stable/10/gnu/usr.bin/groff/tmac/mdoc.local Tue May 20 21:15:47 2014 (r266478) @@ -60,6 +60,7 @@ .ds doc-operating-system-FreeBSD-9.3 9.3 .ds doc-operating-system-FreeBSD-10.0 10.0 .ds doc-operating-system-FreeBSD-10.1 10.1 +.ds doc-operating-system-FreeBSD-11.0 11.0 .ds doc-operating-system-NetBSD-7.0 7.0 . .\" Definitions not (yet) in doc-syms From owner-svn-src-stable@FreeBSD.ORG Wed May 21 06:29:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 40F0D20C; Wed, 21 May 2014 06:29:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D3312F8A; Wed, 21 May 2014 06:29:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4L6Trcm031710; Wed, 21 May 2014 06:29:53 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4L6TqhV031708; Wed, 21 May 2014 06:29:52 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201405210629.s4L6TqhV031708@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 21 May 2014 06:29:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266485 - in stable/10/sys: dev/sound/usb modules/sound/driver/uaudio X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 May 2014 06:29:53 -0000 Author: hselasky Date: Wed May 21 06:29:52 2014 New Revision: 266485 URL: http://svnweb.freebsd.org/changeset/base/266485 Log: MFC r266006 and r266011: Fix unload of USB audio kernel module. Modified: stable/10/sys/dev/sound/usb/uaudio.c stable/10/sys/modules/sound/driver/uaudio/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/10/sys/dev/sound/usb/uaudio.c Wed May 21 06:23:52 2014 (r266484) +++ stable/10/sys/dev/sound/usb/uaudio.c Wed May 21 06:29:52 2014 (r266485) @@ -5917,7 +5917,7 @@ uaudio_hid_detach(struct uaudio_softc *s usbd_transfer_unsetup(sc->sc_hid.xfer, UAUDIO_HID_N_TRANSFER); } -DRIVER_MODULE(uaudio, uhub, uaudio_driver, uaudio_devclass, NULL, 0); +DRIVER_MODULE_ORDERED(uaudio, uhub, uaudio_driver, uaudio_devclass, NULL, 0, SI_ORDER_ANY); MODULE_DEPEND(uaudio, usb, 1, 1, 1); MODULE_DEPEND(uaudio, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER); MODULE_VERSION(uaudio, 1); Modified: stable/10/sys/modules/sound/driver/uaudio/Makefile ============================================================================== --- stable/10/sys/modules/sound/driver/uaudio/Makefile Wed May 21 06:23:52 2014 (r266484) +++ stable/10/sys/modules/sound/driver/uaudio/Makefile Wed May 21 06:29:52 2014 (r266485) @@ -7,6 +7,6 @@ S= ${.CURDIR}/../../../.. KMOD= snd_uaudio SRCS= bus_if.h device_if.h usb_if.h vnode_if.h SRCS+= opt_usb.h opt_bus.h feeder_if.h channel_if.h usbdevs.h -SRCS+= uaudio.c uaudio_pcm.c +SRCS+= uaudio_pcm.c uaudio.c .include From owner-svn-src-stable@FreeBSD.ORG Wed May 21 06:31:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BCA39399; Wed, 21 May 2014 06:31:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8CD92010; Wed, 21 May 2014 06:31:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4L6Vj5V034299; Wed, 21 May 2014 06:31:45 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4L6VjAZ034296; Wed, 21 May 2014 06:31:45 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201405210631.s4L6VjAZ034296@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 21 May 2014 06:31:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266486 - in stable/9/sys: dev/sound/usb modules/sound/driver/uaudio X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 May 2014 06:31:45 -0000 Author: hselasky Date: Wed May 21 06:31:44 2014 New Revision: 266486 URL: http://svnweb.freebsd.org/changeset/base/266486 Log: MFC r266006 and r266011: Fix unload of USB audio kernel module. Modified: stable/9/sys/dev/sound/usb/uaudio.c stable/9/sys/modules/sound/driver/uaudio/Makefile Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/9/sys/dev/sound/usb/uaudio.c Wed May 21 06:29:52 2014 (r266485) +++ stable/9/sys/dev/sound/usb/uaudio.c Wed May 21 06:31:44 2014 (r266486) @@ -5917,7 +5917,7 @@ uaudio_hid_detach(struct uaudio_softc *s usbd_transfer_unsetup(sc->sc_hid.xfer, UAUDIO_HID_N_TRANSFER); } -DRIVER_MODULE(uaudio, uhub, uaudio_driver, uaudio_devclass, NULL, 0); +DRIVER_MODULE_ORDERED(uaudio, uhub, uaudio_driver, uaudio_devclass, NULL, 0, SI_ORDER_ANY); MODULE_DEPEND(uaudio, usb, 1, 1, 1); MODULE_DEPEND(uaudio, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER); MODULE_VERSION(uaudio, 1); Modified: stable/9/sys/modules/sound/driver/uaudio/Makefile ============================================================================== --- stable/9/sys/modules/sound/driver/uaudio/Makefile Wed May 21 06:29:52 2014 (r266485) +++ stable/9/sys/modules/sound/driver/uaudio/Makefile Wed May 21 06:31:44 2014 (r266486) @@ -7,6 +7,6 @@ S= ${.CURDIR}/../../../.. KMOD= snd_uaudio SRCS= bus_if.h device_if.h usb_if.h vnode_if.h SRCS+= opt_usb.h opt_bus.h feeder_if.h channel_if.h usbdevs.h -SRCS+= uaudio.c uaudio_pcm.c +SRCS+= uaudio_pcm.c uaudio.c .include From owner-svn-src-stable@FreeBSD.ORG Wed May 21 06:33:22 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 72CC8536; Wed, 21 May 2014 06:33:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5EE6A2028; Wed, 21 May 2014 06:33:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4L6XMAn035347; Wed, 21 May 2014 06:33:22 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4L6XM6O035345; Wed, 21 May 2014 06:33:22 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201405210633.s4L6XM6O035345@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 21 May 2014 06:33:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r266487 - in stable/8/sys: dev/sound/usb modules/sound/driver/uaudio X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 May 2014 06:33:22 -0000 Author: hselasky Date: Wed May 21 06:33:21 2014 New Revision: 266487 URL: http://svnweb.freebsd.org/changeset/base/266487 Log: MFC r266006 and r266011: Fix unload of USB audio kernel module. Modified: stable/8/sys/dev/sound/usb/uaudio.c stable/8/sys/modules/sound/driver/uaudio/Makefile Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/usb/ (props changed) stable/8/sys/modules/ (props changed) Modified: stable/8/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/8/sys/dev/sound/usb/uaudio.c Wed May 21 06:31:44 2014 (r266486) +++ stable/8/sys/dev/sound/usb/uaudio.c Wed May 21 06:33:21 2014 (r266487) @@ -5917,7 +5917,7 @@ uaudio_hid_detach(struct uaudio_softc *s usbd_transfer_unsetup(sc->sc_hid.xfer, UAUDIO_HID_N_TRANSFER); } -DRIVER_MODULE(uaudio, uhub, uaudio_driver, uaudio_devclass, NULL, 0); +DRIVER_MODULE_ORDERED(uaudio, uhub, uaudio_driver, uaudio_devclass, NULL, 0, SI_ORDER_ANY); MODULE_DEPEND(uaudio, usb, 1, 1, 1); MODULE_DEPEND(uaudio, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER); MODULE_VERSION(uaudio, 1); Modified: stable/8/sys/modules/sound/driver/uaudio/Makefile ============================================================================== --- stable/8/sys/modules/sound/driver/uaudio/Makefile Wed May 21 06:31:44 2014 (r266486) +++ stable/8/sys/modules/sound/driver/uaudio/Makefile Wed May 21 06:33:21 2014 (r266487) @@ -7,6 +7,6 @@ S= ${.CURDIR}/../../../.. KMOD= snd_uaudio SRCS= bus_if.h device_if.h usb_if.h vnode_if.h SRCS+= opt_usb.h opt_bus.h feeder_if.h channel_if.h usbdevs.h -SRCS+= uaudio.c uaudio_pcm.c +SRCS+= uaudio_pcm.c uaudio.c .include From owner-svn-src-stable@FreeBSD.ORG Wed May 21 07:21:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F17BDD35; Wed, 21 May 2014 07:21:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE6992555; Wed, 21 May 2014 07:21:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4L7Laqm056260; Wed, 21 May 2014 07:21:36 GMT (envelope-from thomas@svn.freebsd.org) Received: (from thomas@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4L7LaKd056259; Wed, 21 May 2014 07:21:36 GMT (envelope-from thomas@svn.freebsd.org) Message-Id: <201405210721.s4L7LaKd056259@svn.freebsd.org> From: Thomas Quinot Date: Wed, 21 May 2014 07:21:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266488 - stable/10/bin/dd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 May 2014 07:21:37 -0000 Author: thomas Date: Wed May 21 07:21:36 2014 New Revision: 266488 URL: http://svnweb.freebsd.org/changeset/base/266488 Log: MFC rev. 265593: (dd_out): Fix handling of all-zeroes block at end of input with conv=sparse. PR: bin/189174 PR: bin/189284 Reviewed by: kib Modified: stable/10/bin/dd/dd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/dd/dd.c ============================================================================== --- stable/10/bin/dd/dd.c Wed May 21 06:33:21 2014 (r266487) +++ stable/10/bin/dd/dd.c Wed May 21 07:21:36 2014 (r266488) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -76,6 +77,7 @@ STAT st; /* statistics */ void (*cfunc)(void); /* conversion function */ uintmax_t cpy_cnt; /* # of blocks to copy */ static off_t pending = 0; /* pending seek if sparse */ +static off_t last_sp = 0; /* size of last added sparse block */ u_int ddflags = 0; /* conversion options */ size_t cbsz; /* conversion block size */ uintmax_t files_cnt = 1; /* # of files to copy */ @@ -173,6 +175,8 @@ setup(void) } else if ((in.db = malloc(MAX(in.dbsz, cbsz) + cbsz)) == NULL || (out.db = malloc(out.dbsz + cbsz)) == NULL) err(1, "output buffer"); + + /* dbp is the first free position in each buffer. */ in.dbp = in.db; out.dbp = out.db; @@ -434,8 +438,15 @@ dd_out(int force) * we play games with the buffer size, and it's usually a partial write. */ outp = out.db; + + /* + * If force, first try to write all pending data, else try to write + * just one block. Subsequently always write data one full block at + * a time at most. + */ for (n = force ? out.dbcnt : out.dbsz;; n = out.dbsz) { - for (cnt = n;; cnt -= nw) { + cnt = n; + do { sparse = 0; if (ddflags & C_SPARSE) { sparse = 1; /* Is buffer sparse? */ @@ -447,18 +458,24 @@ dd_out(int force) } if (sparse && !force) { pending += cnt; + last_sp = cnt; nw = cnt; } else { if (pending != 0) { - if (force) - pending--; + /* If forced to write, and we have no + * data left, we need to write the last + * sparse block explicitly. + */ + if (force && cnt == 0) { + pending -= last_sp; + assert(outp == out.db); + memset(outp, 0, cnt); + } if (lseek(out.fd, pending, SEEK_CUR) == -1) err(2, "%s: seek error creating sparse file", out.name); - if (force) - write(out.fd, outp, 1); - pending = 0; + pending = last_sp = 0; } if (cnt) nw = write(out.fd, outp, cnt); @@ -473,27 +490,29 @@ dd_out(int force) err(1, "%s", out.name); nw = 0; } + outp += nw; st.bytes += nw; - if ((size_t)nw == n) { - if (n != out.dbsz) - ++st.out_part; - else - ++st.out_full; - break; - } - ++st.out_part; - if ((size_t)nw == cnt) - break; - if (out.flags & ISTAPE) - errx(1, "%s: short write on tape device", - out.name); - if (out.flags & ISCHR && !warned) { - warned = 1; - warnx("%s: short write on character device", - out.name); + + if ((size_t)nw == n && n == out.dbsz) + ++st.out_full; + else + ++st.out_part; + + if ((size_t) nw != cnt) { + if (out.flags & ISTAPE) + errx(1, "%s: short write on tape device", + out.name); + if (out.flags & ISCHR && !warned) { + warned = 1; + warnx("%s: short write on character device", + out.name); + } } - } + + cnt -= nw; + } while (cnt != 0); + if ((out.dbcnt -= n) < out.dbsz) break; } From owner-svn-src-stable@FreeBSD.ORG Wed May 21 07:42:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4168694; Wed, 21 May 2014 07:42:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A13022797; Wed, 21 May 2014 07:42:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4L7ggct065171; Wed, 21 May 2014 07:42:42 GMT (envelope-from thomas@svn.freebsd.org) Received: (from thomas@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4L7ggJZ065170; Wed, 21 May 2014 07:42:42 GMT (envelope-from thomas@svn.freebsd.org) Message-Id: <201405210742.s4L7ggJZ065170@svn.freebsd.org> From: Thomas Quinot Date: Wed, 21 May 2014 07:42:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266489 - stable/9/bin/dd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 May 2014 07:42:42 -0000 Author: thomas Date: Wed May 21 07:42:42 2014 New Revision: 266489 URL: http://svnweb.freebsd.org/changeset/base/266489 Log: MFC rev. 265593: (dd_out): Fix handling of all-zeroes block at end of input with conv=sparse. PR: bin/189174 PR: bin/189284 Reviewed by: kib Modified: stable/9/bin/dd/dd.c Directory Properties: stable/9/ (props changed) stable/9/bin/ (props changed) stable/9/bin/dd/ (props changed) Modified: stable/9/bin/dd/dd.c ============================================================================== --- stable/9/bin/dd/dd.c Wed May 21 07:21:36 2014 (r266488) +++ stable/9/bin/dd/dd.c Wed May 21 07:42:42 2014 (r266489) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -76,6 +77,7 @@ STAT st; /* statistics */ void (*cfunc)(void); /* conversion function */ uintmax_t cpy_cnt; /* # of blocks to copy */ static off_t pending = 0; /* pending seek if sparse */ +static off_t last_sp = 0; /* size of last added sparse block */ u_int ddflags = 0; /* conversion options */ size_t cbsz; /* conversion block size */ uintmax_t files_cnt = 1; /* # of files to copy */ @@ -173,6 +175,8 @@ setup(void) } else if ((in.db = malloc(MAX(in.dbsz, cbsz) + cbsz)) == NULL || (out.db = malloc(out.dbsz + cbsz)) == NULL) err(1, "output buffer"); + + /* dbp is the first free position in each buffer. */ in.dbp = in.db; out.dbp = out.db; @@ -434,8 +438,15 @@ dd_out(int force) * we play games with the buffer size, and it's usually a partial write. */ outp = out.db; + + /* + * If force, first try to write all pending data, else try to write + * just one block. Subsequently always write data one full block at + * a time at most. + */ for (n = force ? out.dbcnt : out.dbsz;; n = out.dbsz) { - for (cnt = n;; cnt -= nw) { + cnt = n; + do { sparse = 0; if (ddflags & C_SPARSE) { sparse = 1; /* Is buffer sparse? */ @@ -447,18 +458,24 @@ dd_out(int force) } if (sparse && !force) { pending += cnt; + last_sp = cnt; nw = cnt; } else { if (pending != 0) { - if (force) - pending--; + /* If forced to write, and we have no + * data left, we need to write the last + * sparse block explicitly. + */ + if (force && cnt == 0) { + pending -= last_sp; + assert(outp == out.db); + memset(outp, 0, cnt); + } if (lseek(out.fd, pending, SEEK_CUR) == -1) err(2, "%s: seek error creating sparse file", out.name); - if (force) - write(out.fd, outp, 1); - pending = 0; + pending = last_sp = 0; } if (cnt) nw = write(out.fd, outp, cnt); @@ -473,27 +490,29 @@ dd_out(int force) err(1, "%s", out.name); nw = 0; } + outp += nw; st.bytes += nw; - if ((size_t)nw == n) { - if (n != out.dbsz) - ++st.out_part; - else - ++st.out_full; - break; - } - ++st.out_part; - if ((size_t)nw == cnt) - break; - if (out.flags & ISTAPE) - errx(1, "%s: short write on tape device", - out.name); - if (out.flags & ISCHR && !warned) { - warned = 1; - warnx("%s: short write on character device", - out.name); + + if ((size_t)nw == n && n == out.dbsz) + ++st.out_full; + else + ++st.out_part; + + if ((size_t) nw != cnt) { + if (out.flags & ISTAPE) + errx(1, "%s: short write on tape device", + out.name); + if (out.flags & ISCHR && !warned) { + warned = 1; + warnx("%s: short write on character device", + out.name); + } } - } + + cnt -= nw; + } while (cnt != 0); + if ((out.dbcnt -= n) < out.dbsz) break; } From owner-svn-src-stable@FreeBSD.ORG Wed May 21 09:19:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4BD1C262; Wed, 21 May 2014 09:19:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38582227E; Wed, 21 May 2014 09:19:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4L9J6SZ006445; Wed, 21 May 2014 09:19:06 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4L9J5lB006443; Wed, 21 May 2014 09:19:05 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201405210919.s4L9J5lB006443@svn.freebsd.org> From: Peter Holm Date: Wed, 21 May 2014 09:19:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266492 - in stable/10: lib/libc/sys sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 May 2014 09:19:06 -0000 Author: pho Date: Wed May 21 09:19:05 2014 New Revision: 266492 URL: http://svnweb.freebsd.org/changeset/base/266492 Log: MFC r265534: msync(2) must return ENOMEM and not EINVAL when the address is outside the allowed range or when one or more pages are not mapped. This according to The Open Group Base Specifications Issue 7. Sponsored by: EMC / Isilon storage division Modified: stable/10/lib/libc/sys/msync.2 stable/10/sys/vm/vm_mmap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/msync.2 ============================================================================== --- stable/10/lib/libc/sys/msync.2 Wed May 21 08:19:04 2014 (r266491) +++ stable/10/lib/libc/sys/msync.2 Wed May 21 09:19:05 2014 (r266492) @@ -87,11 +87,13 @@ The .Fa addr argument is not a multiple of the hardware page size. -.It Bq Er EINVAL -The +.It Bq Er ENOMEM +The addresses in the range starting at +.Fa addr +and continuing for .Fa len -argument -is too large or negative. +bytes are outside the range allowed for the address space of a +process or specify one or more pages that are not mapped. .It Bq Er EINVAL The .Fa flags @@ -99,7 +101,7 @@ argument was both MS_ASYNC and MS_INVALIDATE. Only one of these flags is allowed. .It Bq Er EIO - An error occurred while writing at least one of the pages in +An error occurred while writing at least one of the pages in the specified region. .El .Sh SEE ALSO Modified: stable/10/sys/vm/vm_mmap.c ============================================================================== --- stable/10/sys/vm/vm_mmap.c Wed May 21 08:19:04 2014 (r266491) +++ stable/10/sys/vm/vm_mmap.c Wed May 21 09:19:05 2014 (r266492) @@ -556,7 +556,7 @@ sys_msync(td, uap) case KERN_SUCCESS: return (0); case KERN_INVALID_ADDRESS: - return (EINVAL); /* Sun returns ENOMEM? */ + return (ENOMEM); case KERN_INVALID_ARGUMENT: return (EBUSY); case KERN_FAILURE: From owner-svn-src-stable@FreeBSD.ORG Wed May 21 15:17:23 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3CE41FF3; Wed, 21 May 2014 15:17:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0FE8E2065; Wed, 21 May 2014 15:17:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4LFHM9i059929; Wed, 21 May 2014 15:17:22 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4LFHMsV059927; Wed, 21 May 2014 15:17:22 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201405211517.s4LFHMsV059927@svn.freebsd.org> From: Peter Holm Date: Wed, 21 May 2014 15:17:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266498 - in stable/9: lib/libc/sys sys/vm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 May 2014 15:17:23 -0000 Author: pho Date: Wed May 21 15:17:22 2014 New Revision: 266498 URL: http://svnweb.freebsd.org/changeset/base/266498 Log: MFC r265534: msync(2) must return ENOMEM and not EINVAL when the address is outside the allowed range or when one or more pages are not mapped. This according to The Open Group Base Specifications Issue 7. Sponsored by: EMC / Isilon storage division Modified: stable/9/lib/libc/sys/msync.2 stable/9/sys/vm/vm_mmap.c Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/lib/libc/sys/msync.2 ============================================================================== --- stable/9/lib/libc/sys/msync.2 Wed May 21 13:36:04 2014 (r266497) +++ stable/9/lib/libc/sys/msync.2 Wed May 21 15:17:22 2014 (r266498) @@ -87,11 +87,13 @@ The .Fa addr argument is not a multiple of the hardware page size. -.It Bq Er EINVAL -The +.It Bq Er ENOMEM +The addresses in the range starting at +.Fa addr +and continuing for .Fa len -argument -is too large or negative. +bytes are outside the range allowed for the address space of a +process or specify one or more pages that are not mapped. .It Bq Er EINVAL The .Fa flags @@ -99,7 +101,7 @@ argument was both MS_ASYNC and MS_INVALIDATE. Only one of these flags is allowed. .It Bq Er EIO - An error occurred while writing at least one of the pages in +An error occurred while writing at least one of the pages in the specified region. .El .Sh SEE ALSO Modified: stable/9/sys/vm/vm_mmap.c ============================================================================== --- stable/9/sys/vm/vm_mmap.c Wed May 21 13:36:04 2014 (r266497) +++ stable/9/sys/vm/vm_mmap.c Wed May 21 15:17:22 2014 (r266498) @@ -540,7 +540,7 @@ sys_msync(td, uap) case KERN_SUCCESS: return (0); case KERN_INVALID_ADDRESS: - return (EINVAL); /* Sun returns ENOMEM? */ + return (ENOMEM); case KERN_INVALID_ARGUMENT: return (EBUSY); case KERN_FAILURE: From owner-svn-src-stable@FreeBSD.ORG Wed May 21 17:02:22 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A307ACE; Wed, 21 May 2014 17:02:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55A392A46; Wed, 21 May 2014 17:02:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4LH2MZp006858; Wed, 21 May 2014 17:02:22 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4LH2Lpt006855; Wed, 21 May 2014 17:02:21 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201405211702.s4LH2Lpt006855@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 21 May 2014 17:02:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266507 - stable/9/sys/net80211 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 May 2014 17:02:22 -0000 Author: hselasky Date: Wed May 21 17:02:21 2014 New Revision: 266507 URL: http://svnweb.freebsd.org/changeset/base/266507 Log: MFC r253639: Add ieee80211_add_{qos,wpa,rsn}() functions since they are needed by an OpenBSD driver that is being ported to FreeBSD. Modified: stable/9/sys/net80211/ieee80211.h stable/9/sys/net80211/ieee80211_output.c stable/9/sys/net80211/ieee80211_proto.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/net80211/ieee80211.h ============================================================================== --- stable/9/sys/net80211/ieee80211.h Wed May 21 16:53:06 2014 (r266506) +++ stable/9/sys/net80211/ieee80211.h Wed May 21 17:02:21 2014 (r266507) @@ -701,6 +701,7 @@ enum { IEEE80211_ELEMID_IBSSDFS = 41, IEEE80211_ELEMID_ERP = 42, IEEE80211_ELEMID_HTCAP = 45, + IEEE80211_ELEMID_QOS = 46, IEEE80211_ELEMID_RSN = 48, IEEE80211_ELEMID_XRATES = 50, IEEE80211_ELEMID_HTINFO = 61, Modified: stable/9/sys/net80211/ieee80211_output.c ============================================================================== --- stable/9/sys/net80211/ieee80211_output.c Wed May 21 16:53:06 2014 (r266506) +++ stable/9/sys/net80211/ieee80211_output.c Wed May 21 17:02:21 2014 (r266507) @@ -1704,6 +1704,40 @@ ieee80211_add_countryie(uint8_t *frm, st return add_appie(frm, ic->ic_countryie); } +uint8_t * +ieee80211_add_wpa(uint8_t *frm, const struct ieee80211vap *vap) +{ + if (vap->iv_flags & IEEE80211_F_WPA1 && vap->iv_wpa_ie != NULL) + return (add_ie(frm, vap->iv_wpa_ie)); + else { + /* XXX else complain? */ + return (frm); + } +} + +uint8_t * +ieee80211_add_rsn(uint8_t *frm, const struct ieee80211vap *vap) +{ + if (vap->iv_flags & IEEE80211_F_WPA2 && vap->iv_rsn_ie != NULL) + return (add_ie(frm, vap->iv_rsn_ie)); + else { + /* XXX else complain? */ + return (frm); + } +} + +uint8_t * +ieee80211_add_qos(uint8_t *frm, const struct ieee80211_node *ni) +{ + if (ni->ni_flags & IEEE80211_NODE_QOS) { + *frm++ = IEEE80211_ELEMID_QOS; + *frm++ = 1; + *frm++ = 0; + } + + return (frm); +} + /* * Send a probe request frame with the specified ssid * and any optional information element data. @@ -1771,17 +1805,9 @@ ieee80211_send_probereq(struct ieee80211 frm = ieee80211_add_ssid(frm, ssid, ssidlen); rs = ieee80211_get_suprates(ic, ic->ic_curchan); frm = ieee80211_add_rates(frm, rs); - if (vap->iv_flags & IEEE80211_F_WPA2) { - if (vap->iv_rsn_ie != NULL) - frm = add_ie(frm, vap->iv_rsn_ie); - /* XXX else complain? */ - } + frm = ieee80211_add_rsn(frm, vap); frm = ieee80211_add_xrates(frm, rs); - if (vap->iv_flags & IEEE80211_F_WPA1) { - if (vap->iv_wpa_ie != NULL) - frm = add_ie(frm, vap->iv_wpa_ie); - /* XXX else complain? */ - } + frm = ieee80211_add_wpa(frm, vap); if (vap->iv_appie_probereq != NULL) frm = add_appie(frm, vap->iv_appie_probereq); m->m_pkthdr.len = m->m_len = frm - mtod(m, uint8_t *); @@ -2044,11 +2070,7 @@ ieee80211_send_mgmt(struct ieee80211_nod frm = ieee80211_add_ssid(frm, ni->ni_essid, ni->ni_esslen); frm = ieee80211_add_rates(frm, &ni->ni_rates); - if (vap->iv_flags & IEEE80211_F_WPA2) { - if (vap->iv_rsn_ie != NULL) - frm = add_ie(frm, vap->iv_rsn_ie); - /* XXX else complain? */ - } + frm = ieee80211_add_rsn(frm, vap); frm = ieee80211_add_xrates(frm, &ni->ni_rates); if (capinfo & IEEE80211_CAPINFO_SPECTRUM_MGMT) { frm = ieee80211_add_powercapability(frm, @@ -2059,11 +2081,7 @@ ieee80211_send_mgmt(struct ieee80211_nod ni->ni_ies.htcap_ie != NULL && ni->ni_ies.htcap_ie[0] == IEEE80211_ELEMID_HTCAP) frm = ieee80211_add_htcap(frm, ni); - if (vap->iv_flags & IEEE80211_F_WPA1) { - if (vap->iv_wpa_ie != NULL) - frm = add_ie(frm, vap->iv_wpa_ie); - /* XXX else complain */ - } + frm = ieee80211_add_wpa(frm, vap); if ((ic->ic_flags & IEEE80211_F_WME) && ni->ni_ies.wme_ie != NULL) frm = ieee80211_add_wme_info(frm, &ic->ic_wme); @@ -2322,11 +2340,7 @@ ieee80211_alloc_proberesp(struct ieee802 if (IEEE80211_IS_CHAN_ANYG(bss->ni_chan)) frm = ieee80211_add_erp(frm, ic); frm = ieee80211_add_xrates(frm, rs); - if (vap->iv_flags & IEEE80211_F_WPA2) { - if (vap->iv_rsn_ie != NULL) - frm = add_ie(frm, vap->iv_rsn_ie); - /* XXX else complain? */ - } + frm = ieee80211_add_rsn(frm, vap); /* * NB: legacy 11b clients do not get certain ie's. * The caller identifies such clients by passing @@ -2338,11 +2352,7 @@ ieee80211_alloc_proberesp(struct ieee802 frm = ieee80211_add_htcap(frm, bss); frm = ieee80211_add_htinfo(frm, bss); } - if (vap->iv_flags & IEEE80211_F_WPA1) { - if (vap->iv_wpa_ie != NULL) - frm = add_ie(frm, vap->iv_wpa_ie); - /* XXX else complain? */ - } + frm = ieee80211_add_wpa(frm, vap); if (vap->iv_flags & IEEE80211_F_WME) frm = ieee80211_add_wme_param(frm, &ic->ic_wme); if (IEEE80211_IS_CHAN_HT(bss->ni_chan) && @@ -2625,21 +2635,13 @@ ieee80211_beacon_construct(struct mbuf * frm = ieee80211_add_erp(frm, ic); } frm = ieee80211_add_xrates(frm, rs); - if (vap->iv_flags & IEEE80211_F_WPA2) { - if (vap->iv_rsn_ie != NULL) - frm = add_ie(frm, vap->iv_rsn_ie); - /* XXX else complain */ - } + frm = ieee80211_add_rsn(frm, vap); if (IEEE80211_IS_CHAN_HT(ni->ni_chan)) { frm = ieee80211_add_htcap(frm, ni); bo->bo_htinfo = frm; frm = ieee80211_add_htinfo(frm, ni); } - if (vap->iv_flags & IEEE80211_F_WPA1) { - if (vap->iv_wpa_ie != NULL) - frm = add_ie(frm, vap->iv_wpa_ie); - /* XXX else complain */ - } + frm = ieee80211_add_wpa(frm, vap); if (vap->iv_flags & IEEE80211_F_WME) { bo->bo_wme = frm; frm = ieee80211_add_wme_param(frm, &ic->ic_wme); Modified: stable/9/sys/net80211/ieee80211_proto.h ============================================================================== --- stable/9/sys/net80211/ieee80211_proto.h Wed May 21 16:53:06 2014 (r266506) +++ stable/9/sys/net80211/ieee80211_proto.h Wed May 21 17:02:21 2014 (r266507) @@ -134,6 +134,9 @@ struct mbuf *ieee80211_alloc_cts(struct uint8_t *ieee80211_add_rates(uint8_t *, const struct ieee80211_rateset *); uint8_t *ieee80211_add_xrates(uint8_t *, const struct ieee80211_rateset *); +uint8_t *ieee80211_add_wpa(uint8_t *, const struct ieee80211vap *); +uint8_t *ieee80211_add_rsn(uint8_t *, const struct ieee80211vap *); +uint8_t *ieee80211_add_qos(uint8_t *, const struct ieee80211_node *); uint16_t ieee80211_getcapinfo(struct ieee80211vap *, struct ieee80211_channel *); From owner-svn-src-stable@FreeBSD.ORG Wed May 21 18:58:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38F2C1E3; Wed, 21 May 2014 18:58:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2597624B1; Wed, 21 May 2014 18:58:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4LIwWSY055879; Wed, 21 May 2014 18:58:32 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4LIwVIM055878; Wed, 21 May 2014 18:58:32 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201405211858.s4LIwVIM055878@svn.freebsd.org> From: Glen Barber Date: Wed, 21 May 2014 18:58:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266516 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 May 2014 18:58:32 -0000 Author: gjb Date: Wed May 21 18:58:31 2014 New Revision: 266516 URL: http://svnweb.freebsd.org/changeset/base/266516 Log: Fix a typo. Submitted by: Hilko Meyer Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 21 18:02:19 2014 (r266515) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 21 18:58:31 2014 (r266516) @@ -122,7 +122,7 @@ &man.sysctl.8; has been re-enabled. On multi-CPU machines with enough RAM, this can easily double &man.zfs.8; performance or reduce CPU usage in half. It was originally disabled due to - memory and KVA exhastion problem reports, + memory and KVA exhaustion problem reports, which should be resolved due to several change in the VM subsystem. From owner-svn-src-stable@FreeBSD.ORG Thu May 22 00:39:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 64433FA0; Thu, 22 May 2014 00:39:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F7F521BE; Thu, 22 May 2014 00:39:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4M0doCT004746; Thu, 22 May 2014 00:39:50 GMT (envelope-from truckman@svn.freebsd.org) Received: (from truckman@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4M0do3k004745; Thu, 22 May 2014 00:39:50 GMT (envelope-from truckman@svn.freebsd.org) Message-Id: <201405220039.s4M0do3k004745@svn.freebsd.org> From: Don Lewis Date: Thu, 22 May 2014 00:39:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266521 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 May 2014 00:39:50 -0000 Author: truckman Date: Thu May 22 00:39:49 2014 New Revision: 266521 URL: http://svnweb.freebsd.org/changeset/base/266521 Log: MFC r266426 Slightly restructure the final loop in rman_reserve_resource_bound(). Replace with the existing loop termination test with a similar condition from the nested "if" that may terminate the loop a bit sooner, but still not too early. This condition can then be removed from the nested "if". Relocate an operator to be style(9) compliant. Modified: stable/10/sys/kern/subr_rman.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/subr_rman.c ============================================================================== --- stable/10/sys/kern/subr_rman.c Thu May 22 00:01:31 2014 (r266520) +++ stable/10/sys/kern/subr_rman.c Thu May 22 00:39:49 2014 (r266521) @@ -602,13 +602,10 @@ rman_reserve_resource_bound(struct rman if ((flags & (RF_SHAREABLE | RF_TIMESHARE)) == 0) goto out; - for (s = r; s; s = TAILQ_NEXT(s, r_link)) { - if (s->r_start > end) - break; - if ((s->r_flags & flags) != flags) - continue; - if (s->r_start >= start && s->r_end <= end - && (s->r_end - s->r_start + 1) == count && + for (s = r; s && s->r_end <= end; s = TAILQ_NEXT(s, r_link)) { + if ((s->r_flags & flags) == flags && + s->r_start >= start && + (s->r_end - s->r_start + 1) == count && (s->r_start & amask) == 0 && ((s->r_start ^ s->r_end) & bmask) == 0) { rv = int_alloc_resource(M_NOWAIT); From owner-svn-src-stable@FreeBSD.ORG Thu May 22 00:44:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE4E235B; Thu, 22 May 2014 00:44:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB29F2242; Thu, 22 May 2014 00:44:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4M0iEuO008367; Thu, 22 May 2014 00:44:14 GMT (envelope-from truckman@svn.freebsd.org) Received: (from truckman@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4M0iEQQ008366; Thu, 22 May 2014 00:44:14 GMT (envelope-from truckman@svn.freebsd.org) Message-Id: <201405220044.s4M0iEQQ008366@svn.freebsd.org> From: Don Lewis Date: Thu, 22 May 2014 00:44:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266522 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 May 2014 00:44:14 -0000 Author: truckman Date: Thu May 22 00:44:14 2014 New Revision: 266522 URL: http://svnweb.freebsd.org/changeset/base/266522 Log: MFC r266426 Slightly restructure the final loop in rman_reserve_resource_bound(). Replace with the existing loop termination test with a similar condition from the nested "if" that may terminate the loop a bit sooner, but still not too early. This condition can then be removed from the nested "if". Relocate an operator to be style(9) compliant. Modified: stable/9/sys/kern/subr_rman.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/subr_rman.c ============================================================================== --- stable/9/sys/kern/subr_rman.c Thu May 22 00:39:49 2014 (r266521) +++ stable/9/sys/kern/subr_rman.c Thu May 22 00:44:14 2014 (r266522) @@ -597,13 +597,10 @@ rman_reserve_resource_bound(struct rman if ((flags & (RF_SHAREABLE | RF_TIMESHARE)) == 0) goto out; - for (s = r; s; s = TAILQ_NEXT(s, r_link)) { - if (s->r_start > end) - break; - if ((s->r_flags & flags) != flags) - continue; - if (s->r_start >= start && s->r_end <= end - && (s->r_end - s->r_start + 1) == count && + for (s = r; s && s->r_end <= end; s = TAILQ_NEXT(s, r_link)) { + if ((s->r_flags & flags) == flags && + s->r_start >= start && + (s->r_end - s->r_start + 1) == count && (s->r_start & amask) == 0 && ((s->r_start ^ s->r_end) & bmask) == 0) { rv = int_alloc_resource(M_NOWAIT); From owner-svn-src-stable@FreeBSD.ORG Thu May 22 00:46:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BD74C4A0; Thu, 22 May 2014 00:46:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA2C9224E; Thu, 22 May 2014 00:46:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4M0k37o008698; Thu, 22 May 2014 00:46:03 GMT (envelope-from truckman@svn.freebsd.org) Received: (from truckman@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4M0k334008697; Thu, 22 May 2014 00:46:03 GMT (envelope-from truckman@svn.freebsd.org) Message-Id: <201405220046.s4M0k334008697@svn.freebsd.org> From: Don Lewis Date: Thu, 22 May 2014 00:46:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r266523 - stable/8/sys/kern X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 May 2014 00:46:03 -0000 Author: truckman Date: Thu May 22 00:46:03 2014 New Revision: 266523 URL: http://svnweb.freebsd.org/changeset/base/266523 Log: MFC r266426 Slightly restructure the final loop in rman_reserve_resource_bound(). Replace with the existing loop termination test with a similar condition from the nested "if" that may terminate the loop a bit sooner, but still not too early. This condition can then be removed from the nested "if". Relocate an operator to be style(9) compliant. Modified: stable/8/sys/kern/subr_rman.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) Modified: stable/8/sys/kern/subr_rman.c ============================================================================== --- stable/8/sys/kern/subr_rman.c Thu May 22 00:44:14 2014 (r266522) +++ stable/8/sys/kern/subr_rman.c Thu May 22 00:46:03 2014 (r266523) @@ -597,13 +597,10 @@ rman_reserve_resource_bound(struct rman if ((flags & (RF_SHAREABLE | RF_TIMESHARE)) == 0) goto out; - for (s = r; s; s = TAILQ_NEXT(s, r_link)) { - if (s->r_start > end) - break; - if ((s->r_flags & flags) != flags) - continue; - if (s->r_start >= start && s->r_end <= end - && (s->r_end - s->r_start + 1) == count && + for (s = r; s && s->r_end <= end; s = TAILQ_NEXT(s, r_link)) { + if ((s->r_flags & flags) == flags && + s->r_start >= start && + (s->r_end - s->r_start + 1) == count && (s->r_start & amask) == 0 && ((s->r_start ^ s->r_end) & bmask) == 0) { rv = int_alloc_resource(M_NOWAIT); From owner-svn-src-stable@FreeBSD.ORG Thu May 22 05:20:21 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2901BDF; Thu, 22 May 2014 05:20:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFDBA26AE; Thu, 22 May 2014 05:20:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4M5KLhW029374; Thu, 22 May 2014 05:20:21 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4M5KLR1029372; Thu, 22 May 2014 05:20:21 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201405220520.s4M5KLR1029372@svn.freebsd.org> From: Justin Hibbits Date: Thu, 22 May 2014 05:20:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266532 - stable/10/sys/powerpc/aim X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 May 2014 05:20:22 -0000 Author: jhibbits Date: Thu May 22 05:20:21 2014 New Revision: 266532 URL: http://svnweb.freebsd.org/changeset/base/266532 Log: MFC r266116,r266136 A page mask size is 12-bits, not 11. Modified: stable/10/sys/powerpc/aim/trap_subr32.S stable/10/sys/powerpc/aim/trap_subr64.S Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/powerpc/aim/trap_subr32.S ============================================================================== --- stable/10/sys/powerpc/aim/trap_subr32.S Thu May 22 05:04:40 2014 (r266531) +++ stable/10/sys/powerpc/aim/trap_subr32.S Thu May 22 05:20:21 2014 (r266532) @@ -677,7 +677,7 @@ disitrap: mtcr %r31 bt 17,realtrap /* branch is user mode */ mfsprg1 %r31 /* get old SP */ - clrrwi %r31,%r31,11 /* Round SP down to nearest page */ + clrrwi %r31,%r31,12 /* Round SP down to nearest page */ sub. %r30,%r31,%r30 /* SP - DAR */ bge 1f neg %r30,%r30 /* modulo value */ Modified: stable/10/sys/powerpc/aim/trap_subr64.S ============================================================================== --- stable/10/sys/powerpc/aim/trap_subr64.S Thu May 22 05:04:40 2014 (r266531) +++ stable/10/sys/powerpc/aim/trap_subr64.S Thu May 22 05:20:21 2014 (r266532) @@ -585,7 +585,7 @@ disitrap: mtcr %r31 bt 17,realtrap /* branch is user mode */ mfsprg1 %r31 /* get old SP */ - clrrdi %r31,%r31,11 /* Round SP down to nearest page */ + clrrdi %r31,%r31,12 /* Round SP down to nearest page */ sub. %r30,%r31,%r30 /* SP - DAR */ bge 1f neg %r30,%r30 /* modulo value */ From owner-svn-src-stable@FreeBSD.ORG Thu May 22 16:34:01 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B40B9E15; Thu, 22 May 2014 16:34:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A013223D2; Thu, 22 May 2014 16:34:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4MGY1XU041498; Thu, 22 May 2014 16:34:01 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4MGY0Wl041491; Thu, 22 May 2014 16:34:00 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201405221634.s4MGY0Wl041491@svn.freebsd.org> From: "Kenneth D. Merry" Date: Thu, 22 May 2014 16:34:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266548 - in stable/10/sys/dev: mpr mps X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 May 2014 16:34:01 -0000 Author: ken Date: Thu May 22 16:34:00 2014 New Revision: 266548 URL: http://svnweb.freebsd.org/changeset/base/266548 Log: MFC mpr(4) changes: r265484, r265485, r265709 and r265712 ------------------------------------------------------------------------ r265484 | ken | 2014-05-06 23:11:16 -0600 (Tue, 06 May 2014) | 5 lines Remove some debugging code. Submitted by: Steve McConnell ------------------------------------------------------------------------ ------------------------------------------------------------------------ r265485 | ken | 2014-05-06 23:14:48 -0600 (Tue, 06 May 2014) | 9 lines Hold the SIM lock when calling xpt_create_path() and xpt_action() in mprsas_SSU_to_SATA_devices(). This fixes an assertion on shutdown with INVARIANTS enabled with SATA drives present on an IR firmware controller. Reviewed by: Steve McConnell . ------------------------------------------------------------------------ ------------------------------------------------------------------------ r265709 | ken | 2014-05-08 14:28:22 -0600 (Thu, 08 May 2014) | 15 lines Fix TLR (Transport Layer Retry) support in the mps(4) and mpr(4) drivers. TLR is necessary for reliable communication with SAS tape drives. This was broken by change 246713 in the mps(4) driver. It changed the cm_data field for SCSI I/O requests to point to the CCB instead of the data buffer. So, instead, look at the CCB's data pointer to determine whether or not we're talking to a tape drive. Also, take the residual into account to make sure that we don't go off the end of the request. Sponsored by: Spectra Logic Corporation ------------------------------------------------------------------------ ------------------------------------------------------------------------ r265712 | ken | 2014-05-08 14:46:46 -0600 (Thu, 08 May 2014) | 10 lines Add #ifdefs in the mpr(4) driver so that versions of stable/9 that have implemented the PIM_NOSCAN rescan functionality will have it enabled. This is a no-op for head. Reviewed by: slm Sponsored by: Spectra Logic Corporation ------------------------------------------------------------------------ Sponsored by: Spectra Logic, Avago Modified: stable/10/sys/dev/mpr/mpr.c stable/10/sys/dev/mpr/mpr_sas.c stable/10/sys/dev/mpr/mpr_sas_lsi.c stable/10/sys/dev/mps/mps_sas.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mpr/mpr.c ============================================================================== --- stable/10/sys/dev/mpr/mpr.c Thu May 22 16:30:32 2014 (r266547) +++ stable/10/sys/dev/mpr/mpr.c Thu May 22 16:34:00 2014 (r266548) @@ -2182,8 +2182,6 @@ mpr_add_chain(struct mpr_command *cm, in * code other than 0. */ if (cm->cm_flags & MPR_CM_FLAGS_SGE_SIMPLE) { -//SLM-test -printf("Trying to add a chain element to an MPI SGL\n"); mpr_dprint(sc, MPR_ERROR, "A chain element cannot be added to " "an MPI SGL.\n"); return(ENOBUFS); Modified: stable/10/sys/dev/mpr/mpr_sas.c ============================================================================== --- stable/10/sys/dev/mpr/mpr_sas.c Thu May 22 16:30:32 2014 (r266547) +++ stable/10/sys/dev/mpr/mpr_sas.c Thu May 22 16:34:00 2014 (r266548) @@ -183,7 +183,8 @@ mprsas_startup_increment(struct mprsas_s /* just starting, freeze the simq */ mpr_dprint(sassc->sc, MPR_INIT, "%s freezing simq\n", __func__); -#if __FreeBSD_version >= 1000039 +#if (__FreeBSD_version >= 1000039) || \ + ((__FreeBSD_version < 1000000) && (__FreeBSD_version >= 902502)) xpt_hold_boot(); #endif xpt_freeze_simq(sassc->sim, 1); @@ -217,7 +218,8 @@ mprsas_startup_decrement(struct mprsas_s "%s releasing simq\n", __func__); sassc->flags &= ~MPRSAS_IN_STARTUP; xpt_release_simq(sassc->sim, 1); -#if __FreeBSD_version >= 1000039 +#if (__FreeBSD_version >= 1000039) || \ + ((__FreeBSD_version < 1000000) && (__FreeBSD_version >= 902502)) xpt_release_boot(); #else mprsas_rescan_target(sassc->sc, NULL); @@ -974,7 +976,8 @@ mprsas_action(struct cam_sim *sim, union cpi->version_num = 1; cpi->hba_inquiry = PI_SDTR_ABLE|PI_TAG_ABLE|PI_WIDE_16; cpi->target_sprt = 0; -#if __FreeBSD_version >= 1000039 +#if (__FreeBSD_version >= 1000039) || \ + ((__FreeBSD_version < 1000000) && (__FreeBSD_version >= 902502)) cpi->hba_misc = PIM_NOBUSRESET | PIM_UNMAPPED | PIM_NOSCAN; #else cpi->hba_misc = PIM_NOBUSRESET | PIM_UNMAPPED; @@ -2355,8 +2358,9 @@ mprsas_scsiio_complete(struct mpr_softc (csio->cdb_io.cdb_bytes[1] & SI_EVPD) && (csio->cdb_io.cdb_bytes[2] == SVPD_SUPPORTED_PAGE_LIST) && ((csio->ccb_h.flags & CAM_DATA_MASK) == CAM_DATA_VADDR) && - (csio->data_ptr != NULL) && (((uint8_t *)cm->cm_data)[0] == - T_SEQUENTIAL) && (sc->control_TLR) && + (csio->data_ptr != NULL) && + ((csio->data_ptr[0] & 0x1f) == T_SEQUENTIAL) && + (sc->control_TLR) && (sc->mapping_table[csio->ccb_h.target_id].device_info & MPI2_SAS_DEVICE_INFO_SSP_TARGET)) { vpd_list = (struct scsi_vpd_supported_page_list *) @@ -2367,6 +2371,7 @@ mprsas_scsiio_complete(struct mpr_softc TLR_on = (u8)MPI2_SCSIIO_CONTROL_TLR_ON; alloc_len = ((u16)csio->cdb_io.cdb_bytes[3] << 8) + csio->cdb_io.cdb_bytes[4]; + alloc_len -= csio->resid; for (i = 0; i < MIN(vpd_list->length, alloc_len); i++) { if (vpd_list->list[i] == 0x90) { *TLR_bits = TLR_on; Modified: stable/10/sys/dev/mpr/mpr_sas_lsi.c ============================================================================== --- stable/10/sys/dev/mpr/mpr_sas_lsi.c Thu May 22 16:30:32 2014 (r266547) +++ stable/10/sys/dev/mpr/mpr_sas_lsi.c Thu May 22 16:34:00 2014 (r266548) @@ -801,7 +801,8 @@ mprsas_add_device(struct mpr_softc *sc, "and connector name (%4s)\n", targ->encl_level, targ->connector_name); } -#if __FreeBSD_version < 1000039 +#if ((__FreeBSD_version >= 1000000) && (__FreeBSD_version < 1000039)) || \ + (__FreeBSD_version < 902502) if ((sassc->flags & MPRSAS_IN_STARTUP) == 0) #endif mprsas_rescan_target(sc, targ); @@ -992,7 +993,8 @@ mprsas_volume_add(struct mpr_softc *sc, free(lun, M_MPR); } SLIST_INIT(&targ->luns); -#if __FreeBSD_version < 1000039 +#if ((__FreeBSD_version >= 1000000) && (__FreeBSD_version < 1000039)) || \ + (__FreeBSD_version < 902502) if ((sassc->flags & MPRSAS_IN_STARTUP) == 0) #endif mprsas_rescan_target(sc, targ); @@ -1026,6 +1028,8 @@ mprsas_SSU_to_SATA_devices(struct mpr_so char path_str[64]; struct timeval cur_time, start_time; + mpr_lock(sc); + /* * For each LUN of each target, issue a StartStopUnit command to stop * the device. @@ -1041,6 +1045,7 @@ mprsas_SSU_to_SATA_devices(struct mpr_so SLIST_FOREACH(lun, &target->luns, lun_link) { ccb = xpt_alloc_ccb_nowait(); if (ccb == NULL) { + mpr_unlock(sc); mpr_dprint(sc, MPR_FAULT, "Unable to alloc " "CCB to stop unit.\n"); return; @@ -1057,6 +1062,7 @@ mprsas_SSU_to_SATA_devices(struct mpr_so mpr_dprint(sc, MPR_FAULT, "Unable to " "create LUN path to stop unit.\n"); xpt_free_ccb(ccb); + mpr_unlock(sc); return; } xpt_path_string(ccb->ccb_h.path, path_str, @@ -1092,6 +1098,8 @@ mprsas_SSU_to_SATA_devices(struct mpr_so } } + mpr_unlock(sc); + /* * Wait until all of the SSU commands have completed or time has * expired (60 seconds). pause for 100ms each time through. If any Modified: stable/10/sys/dev/mps/mps_sas.c ============================================================================== --- stable/10/sys/dev/mps/mps_sas.c Thu May 22 16:30:32 2014 (r266547) +++ stable/10/sys/dev/mps/mps_sas.c Thu May 22 16:34:00 2014 (r266548) @@ -2316,8 +2316,9 @@ mpssas_scsiio_complete(struct mps_softc (csio->cdb_io.cdb_bytes[1] & SI_EVPD) && (csio->cdb_io.cdb_bytes[2] == SVPD_SUPPORTED_PAGE_LIST) && ((csio->ccb_h.flags & CAM_DATA_MASK) == CAM_DATA_VADDR) && - (csio->data_ptr != NULL) && (((uint8_t *)cm->cm_data)[0] == - T_SEQUENTIAL) && (sc->control_TLR) && + (csio->data_ptr != NULL) && + ((csio->data_ptr[0] & 0x1f) == T_SEQUENTIAL) && + (sc->control_TLR) && (sc->mapping_table[csio->ccb_h.target_id].device_info & MPI2_SAS_DEVICE_INFO_SSP_TARGET)) { vpd_list = (struct scsi_vpd_supported_page_list *) @@ -2328,6 +2329,7 @@ mpssas_scsiio_complete(struct mps_softc TLR_on = (u8)MPI2_SCSIIO_CONTROL_TLR_ON; alloc_len = ((u16)csio->cdb_io.cdb_bytes[3] << 8) + csio->cdb_io.cdb_bytes[4]; + alloc_len -= csio->resid; for (i = 0; i < MIN(vpd_list->length, alloc_len); i++) { if (vpd_list->list[i] == 0x90) { *TLR_bits = TLR_on; From owner-svn-src-stable@FreeBSD.ORG Thu May 22 16:36:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 740E0F52; Thu, 22 May 2014 16:36:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6015223E1; Thu, 22 May 2014 16:36:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4MGa2gj041825; Thu, 22 May 2014 16:36:02 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4MGa1q1041817; Thu, 22 May 2014 16:36:01 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201405221636.s4MGa1q1041817@svn.freebsd.org> From: "Kenneth D. Merry" Date: Thu, 22 May 2014 16:36:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266549 - in stable/9/sys/dev: mpr mps X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 May 2014 16:36:02 -0000 Author: ken Date: Thu May 22 16:36:01 2014 New Revision: 266549 URL: http://svnweb.freebsd.org/changeset/base/266549 Log: MFC mpr(4) changes: r265484, r265485, r265709 and r265712 ------------------------------------------------------------------------ r265484 | ken | 2014-05-06 23:11:16 -0600 (Tue, 06 May 2014) | 5 lines Remove some debugging code. Submitted by: Steve McConnell ------------------------------------------------------------------------ ------------------------------------------------------------------------ r265485 | ken | 2014-05-06 23:14:48 -0600 (Tue, 06 May 2014) | 9 lines Hold the SIM lock when calling xpt_create_path() and xpt_action() in mprsas_SSU_to_SATA_devices(). This fixes an assertion on shutdown with INVARIANTS enabled with SATA drives present on an IR firmware controller. Reviewed by: Steve McConnell . ------------------------------------------------------------------------ ------------------------------------------------------------------------ r265709 | ken | 2014-05-08 14:28:22 -0600 (Thu, 08 May 2014) | 15 lines Fix TLR (Transport Layer Retry) support in the mps(4) and mpr(4) drivers. TLR is necessary for reliable communication with SAS tape drives. This was broken by change 246713 in the mps(4) driver. It changed the cm_data field for SCSI I/O requests to point to the CCB instead of the data buffer. So, instead, look at the CCB's data pointer to determine whether or not we're talking to a tape drive. Also, take the residual into account to make sure that we don't go off the end of the request. Sponsored by: Spectra Logic Corporation ------------------------------------------------------------------------ ------------------------------------------------------------------------ r265712 | ken | 2014-05-08 14:46:46 -0600 (Thu, 08 May 2014) | 10 lines Add #ifdefs in the mpr(4) driver so that versions of stable/9 that have implemented the PIM_NOSCAN rescan functionality will have it enabled. This is a no-op for head. Reviewed by: slm Sponsored by: Spectra Logic Corporation ------------------------------------------------------------------------ Sponsored by: Spectra Logic, Avago Modified: stable/9/sys/dev/mpr/mpr.c stable/9/sys/dev/mpr/mpr_sas.c stable/9/sys/dev/mpr/mpr_sas_lsi.c stable/9/sys/dev/mps/mps_sas.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/mpr/mpr.c ============================================================================== --- stable/9/sys/dev/mpr/mpr.c Thu May 22 16:34:00 2014 (r266548) +++ stable/9/sys/dev/mpr/mpr.c Thu May 22 16:36:01 2014 (r266549) @@ -2182,8 +2182,6 @@ mpr_add_chain(struct mpr_command *cm, in * code other than 0. */ if (cm->cm_flags & MPR_CM_FLAGS_SGE_SIMPLE) { -//SLM-test -printf("Trying to add a chain element to an MPI SGL\n"); mpr_dprint(sc, MPR_ERROR, "A chain element cannot be added to " "an MPI SGL.\n"); return(ENOBUFS); Modified: stable/9/sys/dev/mpr/mpr_sas.c ============================================================================== --- stable/9/sys/dev/mpr/mpr_sas.c Thu May 22 16:34:00 2014 (r266548) +++ stable/9/sys/dev/mpr/mpr_sas.c Thu May 22 16:36:01 2014 (r266549) @@ -183,7 +183,8 @@ mprsas_startup_increment(struct mprsas_s /* just starting, freeze the simq */ mpr_dprint(sassc->sc, MPR_INIT, "%s freezing simq\n", __func__); -#if __FreeBSD_version >= 1000039 +#if (__FreeBSD_version >= 1000039) || \ + ((__FreeBSD_version < 1000000) && (__FreeBSD_version >= 902502)) xpt_hold_boot(); #endif xpt_freeze_simq(sassc->sim, 1); @@ -217,7 +218,8 @@ mprsas_startup_decrement(struct mprsas_s "%s releasing simq\n", __func__); sassc->flags &= ~MPRSAS_IN_STARTUP; xpt_release_simq(sassc->sim, 1); -#if __FreeBSD_version >= 1000039 +#if (__FreeBSD_version >= 1000039) || \ + ((__FreeBSD_version < 1000000) && (__FreeBSD_version >= 902502)) xpt_release_boot(); #else mprsas_rescan_target(sassc->sc, NULL); @@ -974,7 +976,8 @@ mprsas_action(struct cam_sim *sim, union cpi->version_num = 1; cpi->hba_inquiry = PI_SDTR_ABLE|PI_TAG_ABLE|PI_WIDE_16; cpi->target_sprt = 0; -#if __FreeBSD_version >= 1000039 +#if (__FreeBSD_version >= 1000039) || \ + ((__FreeBSD_version < 1000000) && (__FreeBSD_version >= 902502)) cpi->hba_misc = PIM_NOBUSRESET | PIM_UNMAPPED | PIM_NOSCAN; #else cpi->hba_misc = PIM_NOBUSRESET | PIM_UNMAPPED; @@ -2355,8 +2358,9 @@ mprsas_scsiio_complete(struct mpr_softc (csio->cdb_io.cdb_bytes[1] & SI_EVPD) && (csio->cdb_io.cdb_bytes[2] == SVPD_SUPPORTED_PAGE_LIST) && ((csio->ccb_h.flags & CAM_DATA_MASK) == CAM_DATA_VADDR) && - (csio->data_ptr != NULL) && (((uint8_t *)cm->cm_data)[0] == - T_SEQUENTIAL) && (sc->control_TLR) && + (csio->data_ptr != NULL) && + ((csio->data_ptr[0] & 0x1f) == T_SEQUENTIAL) && + (sc->control_TLR) && (sc->mapping_table[csio->ccb_h.target_id].device_info & MPI2_SAS_DEVICE_INFO_SSP_TARGET)) { vpd_list = (struct scsi_vpd_supported_page_list *) @@ -2367,6 +2371,7 @@ mprsas_scsiio_complete(struct mpr_softc TLR_on = (u8)MPI2_SCSIIO_CONTROL_TLR_ON; alloc_len = ((u16)csio->cdb_io.cdb_bytes[3] << 8) + csio->cdb_io.cdb_bytes[4]; + alloc_len -= csio->resid; for (i = 0; i < MIN(vpd_list->length, alloc_len); i++) { if (vpd_list->list[i] == 0x90) { *TLR_bits = TLR_on; Modified: stable/9/sys/dev/mpr/mpr_sas_lsi.c ============================================================================== --- stable/9/sys/dev/mpr/mpr_sas_lsi.c Thu May 22 16:34:00 2014 (r266548) +++ stable/9/sys/dev/mpr/mpr_sas_lsi.c Thu May 22 16:36:01 2014 (r266549) @@ -801,7 +801,8 @@ mprsas_add_device(struct mpr_softc *sc, "and connector name (%4s)\n", targ->encl_level, targ->connector_name); } -#if __FreeBSD_version < 1000039 +#if ((__FreeBSD_version >= 1000000) && (__FreeBSD_version < 1000039)) || \ + (__FreeBSD_version < 902502) if ((sassc->flags & MPRSAS_IN_STARTUP) == 0) #endif mprsas_rescan_target(sc, targ); @@ -992,7 +993,8 @@ mprsas_volume_add(struct mpr_softc *sc, free(lun, M_MPR); } SLIST_INIT(&targ->luns); -#if __FreeBSD_version < 1000039 +#if ((__FreeBSD_version >= 1000000) && (__FreeBSD_version < 1000039)) || \ + (__FreeBSD_version < 902502) if ((sassc->flags & MPRSAS_IN_STARTUP) == 0) #endif mprsas_rescan_target(sc, targ); @@ -1026,6 +1028,8 @@ mprsas_SSU_to_SATA_devices(struct mpr_so char path_str[64]; struct timeval cur_time, start_time; + mpr_lock(sc); + /* * For each LUN of each target, issue a StartStopUnit command to stop * the device. @@ -1041,6 +1045,7 @@ mprsas_SSU_to_SATA_devices(struct mpr_so SLIST_FOREACH(lun, &target->luns, lun_link) { ccb = xpt_alloc_ccb_nowait(); if (ccb == NULL) { + mpr_unlock(sc); mpr_dprint(sc, MPR_FAULT, "Unable to alloc " "CCB to stop unit.\n"); return; @@ -1057,6 +1062,7 @@ mprsas_SSU_to_SATA_devices(struct mpr_so mpr_dprint(sc, MPR_FAULT, "Unable to " "create LUN path to stop unit.\n"); xpt_free_ccb(ccb); + mpr_unlock(sc); return; } xpt_path_string(ccb->ccb_h.path, path_str, @@ -1092,6 +1098,8 @@ mprsas_SSU_to_SATA_devices(struct mpr_so } } + mpr_unlock(sc); + /* * Wait until all of the SSU commands have completed or time has * expired (60 seconds). pause for 100ms each time through. If any Modified: stable/9/sys/dev/mps/mps_sas.c ============================================================================== --- stable/9/sys/dev/mps/mps_sas.c Thu May 22 16:34:00 2014 (r266548) +++ stable/9/sys/dev/mps/mps_sas.c Thu May 22 16:36:01 2014 (r266549) @@ -2305,8 +2305,9 @@ mpssas_scsiio_complete(struct mps_softc (csio->cdb_io.cdb_bytes[1] & SI_EVPD) && (csio->cdb_io.cdb_bytes[2] == SVPD_SUPPORTED_PAGE_LIST) && ((csio->ccb_h.flags & CAM_DATA_MASK) == CAM_DATA_VADDR) && - (csio->data_ptr != NULL) && (((uint8_t *)cm->cm_data)[0] == - T_SEQUENTIAL) && (sc->control_TLR) && + (csio->data_ptr != NULL) && + ((csio->data_ptr[0] & 0x1f) == T_SEQUENTIAL) && + (sc->control_TLR) && (sc->mapping_table[csio->ccb_h.target_id].device_info & MPI2_SAS_DEVICE_INFO_SSP_TARGET)) { vpd_list = (struct scsi_vpd_supported_page_list *) @@ -2317,6 +2318,7 @@ mpssas_scsiio_complete(struct mps_softc TLR_on = (u8)MPI2_SCSIIO_CONTROL_TLR_ON; alloc_len = ((u16)csio->cdb_io.cdb_bytes[3] << 8) + csio->cdb_io.cdb_bytes[4]; + alloc_len -= csio->resid; for (i = 0; i < MIN(vpd_list->length, alloc_len); i++) { if (vpd_list->list[i] == 0x90) { *TLR_bits = TLR_on; From owner-svn-src-stable@FreeBSD.ORG Thu May 22 20:55:58 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1B0D169; Thu, 22 May 2014 20:55:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE3C12A99; Thu, 22 May 2014 20:55:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4MKtvdB079616; Thu, 22 May 2014 20:55:57 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4MKtvrh079615; Thu, 22 May 2014 20:55:57 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201405222055.s4MKtvrh079615@svn.freebsd.org> From: Gavin Atkinson Date: Thu, 22 May 2014 20:55:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266557 - stable/10/contrib/tzcode/stdtime X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 May 2014 20:55:58 -0000 Author: gavin Date: Thu May 22 20:55:57 2014 New Revision: 266557 URL: http://svnweb.freebsd.org/changeset/base/266557 Log: Merge r266111 from head: Fix typo. Note that although this file is under contrib, it has diverged sufficiently from upstream (including a full whitespace commit and large portions rewritten) that this change does not move us further from the upstream. PR: docs/186608 Submitted by: Jamie Landeg-Jones Modified: stable/10/contrib/tzcode/stdtime/ctime.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/tzcode/stdtime/ctime.3 ============================================================================== --- stable/10/contrib/tzcode/stdtime/ctime.3 Thu May 22 20:24:30 2014 (r266556) +++ stable/10/contrib/tzcode/stdtime/ctime.3 Thu May 22 20:55:57 2014 (r266557) @@ -342,7 +342,7 @@ Except for and the .Fn \&_r variants of the other functions, -these functions leaves their result in an internal static object and return +these functions leave their result in an internal static object and return a pointer to that object. Subsequent calls to these function will modify the same object. From owner-svn-src-stable@FreeBSD.ORG Thu May 22 20:59:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EE482E7; Thu, 22 May 2014 20:59:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 296DF2AC3; Thu, 22 May 2014 20:59:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4MKxdwh080565; Thu, 22 May 2014 20:59:39 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4MKxdjg080563; Thu, 22 May 2014 20:59:39 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201405222059.s4MKxdjg080563@svn.freebsd.org> From: Gavin Atkinson Date: Thu, 22 May 2014 20:59:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266558 - stable/9/contrib/tzcode/stdtime X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 May 2014 20:59:39 -0000 Author: gavin Date: Thu May 22 20:59:38 2014 New Revision: 266558 URL: http://svnweb.freebsd.org/changeset/base/266558 Log: Merge r266111 from head: Fix typo. Note that although this file is under contrib, it has diverged sufficiently from upstream (including a full whitespace commit and large portions rewritten) that this change does not move us further from the upstream. PR: docs/186608 Submitted by: Jamie Landeg-Jones Modified: stable/9/contrib/tzcode/stdtime/ctime.3 Directory Properties: stable/9/contrib/tzcode/stdtime/ (props changed) Modified: stable/9/contrib/tzcode/stdtime/ctime.3 ============================================================================== --- stable/9/contrib/tzcode/stdtime/ctime.3 Thu May 22 20:55:57 2014 (r266557) +++ stable/9/contrib/tzcode/stdtime/ctime.3 Thu May 22 20:59:38 2014 (r266558) @@ -342,7 +342,7 @@ Except for and the .Fn \&_r variants of the other functions, -these functions leaves their result in an internal static object and return +these functions leave their result in an internal static object and return a pointer to that object. Subsequent calls to these function will modify the same object. From owner-svn-src-stable@FreeBSD.ORG Thu May 22 21:08:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 817BB74A; Thu, 22 May 2014 21:08:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DFCB2BBA; Thu, 22 May 2014 21:08:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4ML8XHY086490; Thu, 22 May 2014 21:08:33 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4ML8XM7086489; Thu, 22 May 2014 21:08:33 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201405222108.s4ML8XM7086489@svn.freebsd.org> From: Gavin Atkinson Date: Thu, 22 May 2014 21:08:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266559 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 May 2014 21:08:33 -0000 Author: gavin Date: Thu May 22 21:08:32 2014 New Revision: 266559 URL: http://svnweb.freebsd.org/changeset/base/266559 Log: Merge r266261 from head: USB endpoints are almost always single-digits, fix the path in the man page to be clearer. PR: docs/175560 Submitted by: Andreas Gustafsson Modified: stable/10/share/man/man4/ugen.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/ugen.4 ============================================================================== --- stable/10/share/man/man4/ugen.4 Thu May 22 20:59:38 2014 (r266558) +++ stable/10/share/man/man4/ugen.4 Thu May 22 21:08:32 2014 (r266559) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 22, 2012 +.Dd May 16, 2014 .Dt UGEN 4 .Os .Sh NAME @@ -292,10 +292,10 @@ and should be set to .Dv USB_CURRENT_ALT_INDEX . .Sh FILES -.Bl -tag -width ".Pa /dev/ugen Ns Ar N Ns Pa \&. Ns Ar EE" -compact -.It Pa /dev/ugen Ns Ar N Ns Pa \&. Ns Ar EE +.Bl -tag -width ".Pa /dev/ugen Ns Ar N Ns Pa \&. Ns Ar E" -compact +.It Pa /dev/ugen Ns Ar N Ns Pa \&. Ns Ar E Endpoint -.Ar EE +.Ar E of device .Ar N . .El From owner-svn-src-stable@FreeBSD.ORG Thu May 22 21:10:16 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BD577890; Thu, 22 May 2014 21:10:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA3612BC8; Thu, 22 May 2014 21:10:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4MLAG1b087107; Thu, 22 May 2014 21:10:16 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4MLAGrV087106; Thu, 22 May 2014 21:10:16 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201405222110.s4MLAGrV087106@svn.freebsd.org> From: Gavin Atkinson Date: Thu, 22 May 2014 21:10:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266560 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 May 2014 21:10:16 -0000 Author: gavin Date: Thu May 22 21:10:16 2014 New Revision: 266560 URL: http://svnweb.freebsd.org/changeset/base/266560 Log: Merge r266261 from head: USB endpoints are almost always single-digits, fix the path in the man page to be clearer. PR: docs/175560 Submitted by: Andreas Gustafsson Modified: stable/9/share/man/man4/ugen.4 Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/ugen.4 ============================================================================== --- stable/9/share/man/man4/ugen.4 Thu May 22 21:08:32 2014 (r266559) +++ stable/9/share/man/man4/ugen.4 Thu May 22 21:10:16 2014 (r266560) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 22, 2012 +.Dd May 16, 2014 .Dt UGEN 4 .Os .Sh NAME @@ -292,10 +292,10 @@ and should be set to .Dv USB_CURRENT_ALT_INDEX . .Sh FILES -.Bl -tag -width ".Pa /dev/ugen Ns Ar N Ns Pa \&. Ns Ar EE" -compact -.It Pa /dev/ugen Ns Ar N Ns Pa \&. Ns Ar EE +.Bl -tag -width ".Pa /dev/ugen Ns Ar N Ns Pa \&. Ns Ar E" -compact +.It Pa /dev/ugen Ns Ar N Ns Pa \&. Ns Ar E Endpoint -.Ar EE +.Ar E of device .Ar N . .El From owner-svn-src-stable@FreeBSD.ORG Thu May 22 22:06:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29396C82; Thu, 22 May 2014 22:06:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15DF3208F; Thu, 22 May 2014 22:06:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4MM6pSE020561; Thu, 22 May 2014 22:06:51 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4MM6p7e020560; Thu, 22 May 2014 22:06:51 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201405222206.s4MM6p7e020560@svn.freebsd.org> From: Devin Teske Date: Thu, 22 May 2014 22:06:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266561 - stable/9/usr.sbin/bsdconfig/share/media X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 May 2014 22:06:52 -0000 Author: dteske Date: Thu May 22 22:06:51 2014 New Revision: 266561 URL: http://svnweb.freebsd.org/changeset/base/266561 Log: MFC r266297: Update example portion of comment to coincide with r264840 Modified: stable/9/usr.sbin/bsdconfig/share/media/common.subr Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/bsdconfig/ (props changed) Modified: stable/9/usr.sbin/bsdconfig/share/media/common.subr ============================================================================== --- stable/9/usr.sbin/bsdconfig/share/media/common.subr Thu May 22 21:10:16 2014 (r266560) +++ stable/9/usr.sbin/bsdconfig/share/media/common.subr Thu May 22 22:06:51 2014 (r266561) @@ -44,7 +44,8 @@ MOUNTPOINT=/dist # # Media probe values to use for `f_media_get_TYPE media $file $PROBE' or -# `f_device_get media $file $PROBE' (where $PROBE is one of the below values). +# `f_device_get device_media $file $PROBE' (where $PROBE is one of the below +# values). # PROBE_EXIST=1 PROBE_SIZE=2 From owner-svn-src-stable@FreeBSD.ORG Thu May 22 22:10:17 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81DB3FD6; Thu, 22 May 2014 22:10:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E81520B7; Thu, 22 May 2014 22:10:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4MMAHll021683; Thu, 22 May 2014 22:10:17 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4MMAHcB021682; Thu, 22 May 2014 22:10:17 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201405222210.s4MMAHcB021682@svn.freebsd.org> From: Devin Teske Date: Thu, 22 May 2014 22:10:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266562 - stable/10/usr.sbin/bsdconfig/share/media X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 May 2014 22:10:17 -0000 Author: dteske Date: Thu May 22 22:10:16 2014 New Revision: 266562 URL: http://svnweb.freebsd.org/changeset/base/266562 Log: MFC r266297: Update example portion of comment to coincide with r264840 Modified: stable/10/usr.sbin/bsdconfig/share/media/common.subr Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdconfig/share/media/common.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/media/common.subr Thu May 22 22:06:51 2014 (r266561) +++ stable/10/usr.sbin/bsdconfig/share/media/common.subr Thu May 22 22:10:16 2014 (r266562) @@ -44,7 +44,8 @@ MOUNTPOINT=/dist # # Media probe values to use for `f_media_get_TYPE media $file $PROBE' or -# `f_device_get media $file $PROBE' (where $PROBE is one of the below values). +# `f_device_get device_media $file $PROBE' (where $PROBE is one of the below +# values). # PROBE_EXIST=1 PROBE_SIZE=2 From owner-svn-src-stable@FreeBSD.ORG Thu May 22 23:14:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D85C87B; Thu, 22 May 2014 23:14:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A58E25BD; Thu, 22 May 2014 23:14:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4MNEfYk057357; Thu, 22 May 2014 23:14:41 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4MNEfYE057356; Thu, 22 May 2014 23:14:41 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201405222314.s4MNEfYE057356@svn.freebsd.org> From: Glen Barber Date: Thu, 22 May 2014 23:14:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266563 - stable/9/lib/clang X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 May 2014 23:14:41 -0000 Author: gjb Date: Thu May 22 23:14:40 2014 New Revision: 266563 URL: http://svnweb.freebsd.org/changeset/base/266563 Log: Update clang target triple for FreeBSD 9.3-PRERELEASE. This is a direct commit to stable/9. Sponsored by: The FreeBSD Foundation Modified: stable/9/lib/clang/clang.build.mk Modified: stable/9/lib/clang/clang.build.mk ============================================================================== --- stable/9/lib/clang/clang.build.mk Thu May 22 22:10:16 2014 (r266562) +++ stable/9/lib/clang/clang.build.mk Thu May 22 23:14:40 2014 (r266563) @@ -27,8 +27,8 @@ TARGET_ABI= gnueabi TARGET_ABI= unknown .endif -TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd9.2 -BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/}-unknown-freebsd9.2 +TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd9.3 +BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/}-unknown-freebsd9.3 CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${TARGET_TRIPLE}\" \ -DLLVM_HOST_TRIPLE=\"${BUILD_TRIPLE}\" \ -DDEFAULT_SYSROOT=\"${TOOLS_PREFIX}\" From owner-svn-src-stable@FreeBSD.ORG Fri May 23 05:35:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 36717236; Fri, 23 May 2014 05:35:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 09A442338; Fri, 23 May 2014 05:35:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4N5Zhqx028218; Fri, 23 May 2014 05:35:43 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4N5ZhIO028216; Fri, 23 May 2014 05:35:43 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201405230535.s4N5ZhIO028216@svn.freebsd.org> From: Peter Holm Date: Fri, 23 May 2014 05:35:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r266574 - in stable/8: lib/libc/sys sys/vm X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2014 05:35:44 -0000 Author: pho Date: Fri May 23 05:35:43 2014 New Revision: 266574 URL: http://svnweb.freebsd.org/changeset/base/266574 Log: MFC r265534: msync(2) must return ENOMEM and not EINVAL when the address is outside the allowed range or when one or more pages are not mapped. This according to The Open Group Base Specifications Issue 7. Sponsored by: EMC / Isilon storage division Modified: stable/8/lib/libc/sys/msync.2 stable/8/sys/vm/vm_mmap.c Directory Properties: stable/8/ (props changed) stable/8/lib/ (props changed) stable/8/lib/libc/ (props changed) stable/8/lib/libc/sys/ (props changed) stable/8/sys/ (props changed) stable/8/sys/vm/ (props changed) Modified: stable/8/lib/libc/sys/msync.2 ============================================================================== --- stable/8/lib/libc/sys/msync.2 Fri May 23 05:15:17 2014 (r266573) +++ stable/8/lib/libc/sys/msync.2 Fri May 23 05:35:43 2014 (r266574) @@ -87,11 +87,13 @@ The .Fa addr argument is not a multiple of the hardware page size. -.It Bq Er EINVAL -The +.It Bq Er ENOMEM +The addresses in the range starting at +.Fa addr +and continuing for .Fa len -argument -is too large or negative. +bytes are outside the range allowed for the address space of a +process or specify one or more pages that are not mapped. .It Bq Er EINVAL The .Fa flags @@ -99,7 +101,7 @@ argument was both MS_ASYNC and MS_INVALIDATE. Only one of these flags is allowed. .It Bq Er EIO - An error occurred while writing at least one of the pages in +An error occurred while writing at least one of the pages in the specified region. .El .Sh SEE ALSO Modified: stable/8/sys/vm/vm_mmap.c ============================================================================== --- stable/8/sys/vm/vm_mmap.c Fri May 23 05:15:17 2014 (r266573) +++ stable/8/sys/vm/vm_mmap.c Fri May 23 05:35:43 2014 (r266574) @@ -497,7 +497,7 @@ msync(td, uap) case KERN_SUCCESS: return (0); case KERN_INVALID_ADDRESS: - return (EINVAL); /* Sun returns ENOMEM? */ + return (ENOMEM); case KERN_INVALID_ARGUMENT: return (EBUSY); case KERN_FAILURE: From owner-svn-src-stable@FreeBSD.ORG Fri May 23 06:20:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 273CEDDE; Fri, 23 May 2014 06:20:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12F342663; Fri, 23 May 2014 06:20:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4N6KQUY047216; Fri, 23 May 2014 06:20:26 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4N6KQa3047214; Fri, 23 May 2014 06:20:26 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201405230620.s4N6KQa3047214@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 23 May 2014 06:20:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266575 - in stable/10/sys/dev/usb: . controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2014 06:20:26 -0000 Author: hselasky Date: Fri May 23 06:20:25 2014 New Revision: 266575 URL: http://svnweb.freebsd.org/changeset/base/266575 Log: MFC r265358, r265427, r265777, r265783, r265806, r265872, r266012 and r266394: - Multiple DWC OTG host mode related fixes, improvements and optimisations. - Add full support for ISOCHRONOUS transfers to the DWC OTG driver. - Use the interrupt filter to handle basic USB FIFO interrupts. - Fixed unbalanced unlock in case of "dwc_otg_init_fifo()" failure. - Add common spinlock to the USB bus structure. Modified: stable/10/sys/dev/usb/controller/dwc_otg.c stable/10/sys/dev/usb/controller/dwc_otg.h stable/10/sys/dev/usb/controller/dwc_otg_atmelarm.c stable/10/sys/dev/usb/controller/dwc_otg_fdt.c stable/10/sys/dev/usb/controller/dwc_otgreg.h stable/10/sys/dev/usb/controller/usb_controller.c stable/10/sys/dev/usb/usb_bus.h stable/10/sys/dev/usb/usb_core.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/dwc_otg.c ============================================================================== --- stable/10/sys/dev/usb/controller/dwc_otg.c Fri May 23 05:35:43 2014 (r266574) +++ stable/10/sys/dev/usb/controller/dwc_otg.c Fri May 23 06:20:25 2014 (r266575) @@ -89,19 +89,22 @@ ((struct dwc_otg_softc *)(((uint8_t *)(bus)) - \ ((uint8_t *)&(((struct dwc_otg_softc *)0)->sc_bus)))) -#define DWC_OTG_PC2SC(pc) \ - DWC_OTG_BUS2SC(USB_DMATAG_TO_XROOT((pc)->tag_parent)->bus) +#define DWC_OTG_PC2UDEV(pc) \ + (USB_DMATAG_TO_XROOT((pc)->tag_parent)->udev) #define DWC_OTG_MSK_GINT_ENABLED \ - (GINTSTS_ENUMDONE | \ - GINTSTS_USBRST | \ - GINTSTS_USBSUSP | \ - GINTSTS_IEPINT | \ - GINTSTS_RXFLVL | \ - GINTSTS_SESSREQINT | \ + (GINTMSK_ENUMDONEMSK | \ + GINTMSK_USBRSTMSK | \ + GINTMSK_USBSUSPMSK | \ + GINTMSK_IEPINTMSK | \ + GINTMSK_SESSREQINTMSK | \ GINTMSK_OTGINTMSK | \ - GINTMSK_HCHINTMSK | \ - GINTSTS_PRTINT) + GINTMSK_PRTINTMSK) + +#define DWC_OTG_MSK_GINT_THREAD_IRQ \ + (GINTSTS_USBRST | GINTSTS_ENUMDONE | GINTSTS_PRTINT | \ + GINTSTS_WKUPINT | GINTSTS_USBSUSP | GINTMSK_OTGINTMSK | \ + GINTSTS_SESSREQINT) static int dwc_otg_use_hsic; @@ -138,8 +141,9 @@ static dwc_otg_cmd_t dwc_otg_host_data_r static void dwc_otg_device_done(struct usb_xfer *, usb_error_t); static void dwc_otg_do_poll(struct usb_bus *); static void dwc_otg_standard_done(struct usb_xfer *); -static void dwc_otg_root_intr(struct dwc_otg_softc *sc); -static void dwc_otg_interrupt_poll(struct dwc_otg_softc *sc); +static void dwc_otg_root_intr(struct dwc_otg_softc *); +static void dwc_otg_interrupt_poll(struct dwc_otg_softc *); +static void dwc_otg_host_channel_disable(struct dwc_otg_softc *, uint8_t); /* * Here is a configuration that the chip supports. @@ -179,59 +183,81 @@ dwc_otg_init_fifo(struct dwc_otg_softc * fifo_size = sc->sc_fifo_size; - fifo_regs = 4 * (sc->sc_dev_ep_max + sc->sc_dev_in_ep_max); + /* + * NOTE: Reserved fixed size area at end of RAM, which must + * not be allocated to the FIFOs: + */ + fifo_regs = 4 * 16; - if (fifo_size >= fifo_regs) - fifo_size -= fifo_regs; - else - fifo_size = 0; + if (fifo_size < fifo_regs) { + DPRINTF("Too little FIFO\n"); + return (EINVAL); + } + + /* subtract FIFO regs from total once */ + fifo_size -= fifo_regs; /* split equally for IN and OUT */ fifo_size /= 2; - DWC_OTG_WRITE_4(sc, DOTG_GRXFSIZ, fifo_size / 4); - - /* align to 4-bytes */ + /* align to 4 bytes boundary */ fifo_size &= ~3; + /* set global receive FIFO size */ + DWC_OTG_WRITE_4(sc, DOTG_GRXFSIZ, fifo_size / 4); + tx_start = fifo_size; - if (fifo_size < 0x40) { + if (fifo_size < 64) { DPRINTFN(-1, "Not enough data space for EP0 FIFO.\n"); - USB_BUS_UNLOCK(&sc->sc_bus); return (EINVAL); } + /* disable any leftover host channels */ + for (x = 0; x != sc->sc_host_ch_max; x++) { + if (sc->sc_chan_state[x].wait_sof == 0) + continue; + dwc_otg_host_channel_disable(sc, x); + } + if (mode == DWC_MODE_HOST) { /* reset active endpoints */ sc->sc_active_rx_ep = 0; + /* split equally for periodic and non-periodic */ fifo_size /= 2; + /* align to 4 bytes boundary */ + fifo_size &= ~3; + DWC_OTG_WRITE_4(sc, DOTG_GNPTXFSIZ, ((fifo_size / 4) << 16) | (tx_start / 4)); tx_start += fifo_size; + for (x = 0; x != sc->sc_host_ch_max; x++) { + /* disable all host interrupts */ + DWC_OTG_WRITE_4(sc, DOTG_HCINTMSK(x), 0); + } + DWC_OTG_WRITE_4(sc, DOTG_HPTXFSIZ, ((fifo_size / 4) << 16) | (tx_start / 4)); - for (x = 0; x != sc->sc_host_ch_max; x++) { - /* enable interrupts */ - DWC_OTG_WRITE_4(sc, DOTG_HCINTMSK(x), - HCINT_STALL | HCINT_BBLERR | - HCINT_XACTERR | - HCINT_NAK | HCINT_ACK | HCINT_NYET | - HCINT_CHHLTD | HCINT_FRMOVRUN | - HCINT_DATATGLERR); - } + /* reset host channel state */ + memset(sc->sc_chan_state, 0, sizeof(sc->sc_chan_state)); + + /* reset FIFO TX levels */ + sc->sc_tx_cur_p_level = 0; + sc->sc_tx_cur_np_level = 0; + + /* store maximum periodic and non-periodic FIFO TX size */ + sc->sc_tx_max_size = fifo_size; - /* enable host channel interrupts */ - DWC_OTG_WRITE_4(sc, DOTG_HAINTMSK, - (1U << sc->sc_host_ch_max) - 1U); + /* disable all host channel interrupts */ + DWC_OTG_WRITE_4(sc, DOTG_HAINTMSK, 0); } if (mode == DWC_MODE_DEVICE) { @@ -309,11 +335,58 @@ dwc_otg_init_fifo(struct dwc_otg_softc * } else { /* reset active endpoints */ sc->sc_active_rx_ep = 0; + + /* reset periodic and non-periodic FIFO TX size */ + sc->sc_tx_max_size = fifo_size; + + /* reset host channel state */ + memset(sc->sc_chan_state, 0, sizeof(sc->sc_chan_state)); + + /* reset FIFO TX levels */ + sc->sc_tx_cur_p_level = 0; + sc->sc_tx_cur_np_level = 0; } return (0); } static void +dwc_otg_update_host_frame_interval(struct dwc_otg_softc *sc) +{ + + /* + * Disabled until further. Assuming that the register is already + * programmed correctly by the boot loader. + */ +#if 0 + uint32_t temp; + + /* setup HOST frame interval register, based on existing value */ + temp = DWC_OTG_READ_4(sc, DOTG_HFIR) & HFIR_FRINT_MASK; + if (temp >= 10000) + temp /= 1000; + else + temp /= 125; + + /* figure out nearest X-tal value */ + if (temp >= 54) + temp = 60; /* MHz */ + else if (temp >= 39) + temp = 48; /* MHz */ + else + temp = 30; /* MHz */ + + if (sc->sc_flags.status_high_speed) + temp *= 125; + else + temp *= 1000; + + DPRINTF("HFIR=0x%08x\n", temp); + + DWC_OTG_WRITE_4(sc, DOTG_HFIR, temp); +#endif +} + +static void dwc_otg_clocks_on(struct dwc_otg_softc *sc) { if (sc->sc_flags.clocks_off && @@ -376,9 +449,11 @@ dwc_otg_pull_down(struct dwc_otg_softc * static void dwc_otg_enable_sof_irq(struct dwc_otg_softc *sc) { - if (sc->sc_irq_mask & GINTSTS_SOF) + /* In device mode we don't use the SOF interrupt */ + if (sc->sc_flags.status_device_mode != 0 || + (sc->sc_irq_mask & GINTMSK_SOFMSK) != 0) return; - sc->sc_irq_mask |= GINTSTS_SOF; + sc->sc_irq_mask |= GINTMSK_SOFMSK; DWC_OTG_WRITE_4(sc, DOTG_GINTMSK, sc->sc_irq_mask); } @@ -395,8 +470,8 @@ dwc_otg_resume_irq(struct dwc_otg_softc * Disable resume interrupt and enable suspend * interrupt: */ - sc->sc_irq_mask &= ~GINTSTS_WKUPINT; - sc->sc_irq_mask |= GINTSTS_USBSUSP; + sc->sc_irq_mask &= ~GINTMSK_WKUPINTMSK; + sc->sc_irq_mask |= GINTMSK_USBSUSPMSK; DWC_OTG_WRITE_4(sc, DOTG_GINTMSK, sc->sc_irq_mask); } @@ -418,8 +493,8 @@ dwc_otg_suspend_irq(struct dwc_otg_softc * Disable suspend interrupt and enable resume * interrupt: */ - sc->sc_irq_mask &= ~GINTSTS_USBSUSP; - sc->sc_irq_mask |= GINTSTS_WKUPINT; + sc->sc_irq_mask &= ~GINTMSK_USBSUSPMSK; + sc->sc_irq_mask |= GINTMSK_WKUPINTMSK; DWC_OTG_WRITE_4(sc, DOTG_GINTMSK, sc->sc_irq_mask); } @@ -493,9 +568,11 @@ dwc_otg_common_rx_ack(struct dwc_otg_sof { DPRINTFN(5, "RX status clear\n"); - /* enable RX FIFO level interrupt */ - sc->sc_irq_mask |= GINTSTS_RXFLVL; - DWC_OTG_WRITE_4(sc, DOTG_GINTMSK, sc->sc_irq_mask); + if (sc->sc_flags.status_device_mode != 0) { + /* enable RX FIFO level interrupt */ + sc->sc_irq_mask |= GINTMSK_RXFLVLMSK; + DWC_OTG_WRITE_4(sc, DOTG_GINTMSK, sc->sc_irq_mask); + } /* clear cached status */ sc->sc_last_rx_status = 0; @@ -506,6 +583,7 @@ dwc_otg_clear_hcint(struct dwc_otg_softc { uint32_t hcint; + /* clear all pending interrupts */ hcint = DWC_OTG_READ_4(sc, DOTG_HCINT(x)); DWC_OTG_WRITE_4(sc, DOTG_HCINT(x), hcint); @@ -514,96 +592,61 @@ dwc_otg_clear_hcint(struct dwc_otg_softc } static uint8_t -dwc_otg_host_channel_wait(struct dwc_otg_td *td) -{ - struct dwc_otg_softc *sc; - uint8_t x; - - x = td->channel; - - DPRINTF("CH=%d\n", x); - - /* get pointer to softc */ - sc = DWC_OTG_PC2SC(td->pc); - - if (sc->sc_chan_state[x].wait_sof == 0) { - dwc_otg_clear_hcint(sc, x); - return (1); /* done */ - } - - if (x == 0) - return (0); /* wait */ - - /* find new disabled channel */ - for (x = 1; x != sc->sc_host_ch_max; x++) { - - if (sc->sc_chan_state[x].allocated) - continue; - if (sc->sc_chan_state[x].wait_sof != 0) - continue; - - sc->sc_chan_state[td->channel].allocated = 0; - sc->sc_chan_state[x].allocated = 1; - - if (sc->sc_chan_state[td->channel].suspended) { - sc->sc_chan_state[td->channel].suspended = 0; - sc->sc_chan_state[x].suspended = 1; - } - - /* clear interrupts */ - dwc_otg_clear_hcint(sc, x); - - DPRINTF("CH=%d HCCHAR=0x%08x " - "HCSPLT=0x%08x\n", x, td->hcchar, td->hcsplt); - - /* ack any pending messages */ - if (sc->sc_last_rx_status != 0 && - GRXSTSRD_CHNUM_GET(sc->sc_last_rx_status) == td->channel) { - /* get rid of message */ - dwc_otg_common_rx_ack(sc); - } - - /* move active channel */ - sc->sc_active_rx_ep &= ~(1 << td->channel); - sc->sc_active_rx_ep |= (1 << x); - - /* set channel */ - td->channel = x; - - return (1); /* new channel allocated */ - } - return (0); /* wait */ -} - -static uint8_t -dwc_otg_host_channel_alloc(struct dwc_otg_td *td) +dwc_otg_host_channel_alloc(struct dwc_otg_softc *sc, struct dwc_otg_td *td, uint8_t which, uint8_t is_out) { - struct dwc_otg_softc *sc; + uint32_t tx_p_size; + uint32_t tx_np_size; uint8_t x; - uint8_t max_channel; - if (td->channel < DWC_OTG_MAX_CHANNELS) + if (td->channel[which] < DWC_OTG_MAX_CHANNELS) return (0); /* already allocated */ - /* get pointer to softc */ - sc = DWC_OTG_PC2SC(td->pc); - - if ((td->hcchar & HCCHAR_EPNUM_MASK) == 0) { - max_channel = 1; - x = 0; + /* check if device is suspended */ + if (DWC_OTG_PC2UDEV(td->pc)->flags.self_suspended != 0) + return (1); /* busy - cannot transfer data */ + + /* compute needed TX FIFO size */ + if (is_out != 0) { + if (td->ep_type == UE_INTERRUPT || + td->ep_type == UE_ISOCHRONOUS) { + tx_p_size = td->max_packet_size; + tx_np_size = 0; + if (td->hcsplt != 0 && tx_p_size > HCSPLT_XACTLEN_BURST) + tx_p_size = HCSPLT_XACTLEN_BURST; + if ((sc->sc_tx_cur_p_level + tx_p_size) > sc->sc_tx_max_size) { + DPRINTF("Too little FIFO space\n"); + return (1); /* too little FIFO */ + } + } else { + tx_p_size = 0; + tx_np_size = td->max_packet_size; + if (td->hcsplt != 0 && tx_np_size > HCSPLT_XACTLEN_BURST) + tx_np_size = HCSPLT_XACTLEN_BURST; + if ((sc->sc_tx_cur_np_level + tx_np_size) > sc->sc_tx_max_size) { + DPRINTF("Too little FIFO space\n"); + return (1); /* too little FIFO */ + } + } } else { - max_channel = sc->sc_host_ch_max; - x = 1; + /* not a TX transaction */ + tx_p_size = 0; + tx_np_size = 0; } - for (; x != max_channel; x++) { - - if (sc->sc_chan_state[x].allocated) + for (x = 0; x != sc->sc_host_ch_max; x++) { + if (sc->sc_chan_state[x].allocated != 0) continue; + /* check if channel is still enabled */ if (sc->sc_chan_state[x].wait_sof != 0) continue; sc->sc_chan_state[x].allocated = 1; + sc->sc_chan_state[x].tx_p_size = tx_p_size; + sc->sc_chan_state[x].tx_np_size = tx_np_size; + + /* keep track of used TX FIFO, if any */ + sc->sc_tx_cur_p_level += tx_p_size; + sc->sc_tx_cur_np_level += tx_np_size; /* clear interrupts */ dwc_otg_clear_hcint(sc, x); @@ -615,53 +658,44 @@ dwc_otg_host_channel_alloc(struct dwc_ot sc->sc_active_rx_ep |= (1 << x); /* set channel */ - td->channel = x; + td->channel[which] = x; return (0); /* allocated */ } + /* wait a bit */ + dwc_otg_enable_sof_irq(sc); return (1); /* busy */ } static void -dwc_otg_host_channel_disable(struct dwc_otg_softc *sc, uint8_t x) -{ - uint32_t hcchar; - if (sc->sc_chan_state[x].wait_sof != 0) - return; - hcchar = DWC_OTG_READ_4(sc, DOTG_HCCHAR(x)); - if (hcchar & (HCCHAR_CHENA | HCCHAR_CHDIS)) { - /* disable channel */ - DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(x), - HCCHAR_CHENA | HCCHAR_CHDIS); - /* don't re-use channel until next SOF is transmitted */ - sc->sc_chan_state[x].wait_sof = 2; - /* enable SOF interrupt */ - dwc_otg_enable_sof_irq(sc); - } -} - -static void -dwc_otg_host_channel_free(struct dwc_otg_td *td) +dwc_otg_host_channel_free(struct dwc_otg_softc *sc, struct dwc_otg_td *td, uint8_t which) { - struct dwc_otg_softc *sc; uint8_t x; - if (td->channel >= DWC_OTG_MAX_CHANNELS) + if (td->channel[which] >= DWC_OTG_MAX_CHANNELS) return; /* already freed */ /* free channel */ - x = td->channel; - td->channel = DWC_OTG_MAX_CHANNELS; + x = td->channel[which]; + td->channel[which] = DWC_OTG_MAX_CHANNELS; DPRINTF("CH=%d\n", x); - /* get pointer to softc */ - sc = DWC_OTG_PC2SC(td->pc); - - dwc_otg_host_channel_disable(sc, x); + /* + * We need to let programmed host channels run till complete + * else the host channel will stop functioning. Assume that + * after a fixed given amount of time the host channel is no + * longer doing any USB traffic: + */ + if (td->ep_type == UE_ISOCHRONOUS || td->ep_type == UE_INTERRUPT) { + /* double buffered */ + sc->sc_chan_state[x].wait_sof = DWC_OTG_SLOT_IDLE_MAX; + } else { + /* single buffered */ + sc->sc_chan_state[x].wait_sof = DWC_OTG_SLOT_IDLE_MIN; + } sc->sc_chan_state[x].allocated = 0; - sc->sc_chan_state[x].suspended = 0; /* ack any pending messages */ if (sc->sc_last_rx_status != 0 && @@ -674,136 +708,131 @@ dwc_otg_host_channel_free(struct dwc_otg } static uint8_t -dwc_otg_host_setup_tx(struct dwc_otg_td *td) +dwc_otg_host_setup_tx(struct dwc_otg_softc *sc, struct dwc_otg_td *td) { struct usb_device_request req __aligned(4); - struct dwc_otg_softc *sc; uint32_t hcint; uint32_t hcchar; + uint8_t delta; - if (dwc_otg_host_channel_alloc(td)) - return (1); /* busy */ - - /* get pointer to softc */ - sc = DWC_OTG_PC2SC(td->pc); + if (td->channel[0] < DWC_OTG_MAX_CHANNELS) { + hcint = sc->sc_chan_state[td->channel[0]].hcint; - hcint = sc->sc_chan_state[td->channel].hcint; - - DPRINTF("CH=%d ST=%d HCINT=0x%08x HCCHAR=0x%08x HCTSIZ=0x%08x\n", - td->channel, td->state, hcint, - DWC_OTG_READ_4(sc, DOTG_HCCHAR(td->channel)), - DWC_OTG_READ_4(sc, DOTG_HCTSIZ(td->channel))); + DPRINTF("CH=%d ST=%d HCINT=0x%08x HCCHAR=0x%08x HCTSIZ=0x%08x\n", + td->channel[0], td->state, hcint, + DWC_OTG_READ_4(sc, DOTG_HCCHAR(td->channel[0])), + DWC_OTG_READ_4(sc, DOTG_HCTSIZ(td->channel[0]))); + } else { + hcint = 0; + goto check_state; + } if (hcint & (HCINT_RETRY | HCINT_ACK | HCINT_NYET)) { /* give success bits priority over failure bits */ } else if (hcint & HCINT_STALL) { - DPRINTF("CH=%d STALL\n", td->channel); + DPRINTF("CH=%d STALL\n", td->channel[0]); td->error_stall = 1; td->error_any = 1; - return (0); /* complete */ + goto complete; } else if (hcint & HCINT_ERRORS) { - DPRINTF("CH=%d ERROR\n", td->channel); + DPRINTF("CH=%d ERROR\n", td->channel[0]); td->errcnt++; if (td->hcsplt != 0 || td->errcnt >= 3) { td->error_any = 1; - return (0); /* complete */ + goto complete; } } - /* channel must be disabled before we can complete the transfer */ - if (hcint & (HCINT_ERRORS | HCINT_RETRY | HCINT_ACK | HCINT_NYET)) { - - dwc_otg_host_channel_disable(sc, td->channel); - if (!(hcint & HCINT_ERRORS)) td->errcnt = 0; } +check_state: switch (td->state) { case DWC_CHAN_ST_START: goto send_pkt; case DWC_CHAN_ST_WAIT_ANE: if (hcint & (HCINT_RETRY | HCINT_ERRORS)) { - if (!dwc_otg_host_channel_wait(td)) - break; - td->did_nak = 1; + td->did_nak++; + td->tt_scheduled = 0; goto send_pkt; - } - if (hcint & (HCINT_ACK | HCINT_NYET)) { - if (!dwc_otg_host_channel_wait(td)) - break; + } else if (hcint & (HCINT_ACK | HCINT_NYET)) { td->offset += td->tx_bytes; td->remainder -= td->tx_bytes; td->toggle = 1; - return (0); /* complete */ + td->tt_scheduled = 0; + goto complete; } break; + case DWC_CHAN_ST_WAIT_S_ANE: if (hcint & (HCINT_RETRY | HCINT_ERRORS)) { - if (!dwc_otg_host_channel_wait(td)) - break; - td->did_nak = 1; + td->did_nak++; + td->tt_scheduled = 0; goto send_pkt; - } - if (hcint & (HCINT_ACK | HCINT_NYET)) { - if (!dwc_otg_host_channel_wait(td)) - break; + } else if (hcint & (HCINT_ACK | HCINT_NYET)) { goto send_cpkt; } break; + case DWC_CHAN_ST_WAIT_C_ANE: if (hcint & HCINT_NYET) { - if (!dwc_otg_host_channel_wait(td)) - break; goto send_cpkt; - } - if (hcint & (HCINT_RETRY | HCINT_ERRORS)) { - if (!dwc_otg_host_channel_wait(td)) - break; - td->did_nak = 1; + } else if (hcint & (HCINT_RETRY | HCINT_ERRORS)) { + td->did_nak++; + td->tt_scheduled = 0; goto send_pkt; - } - if (hcint & HCINT_ACK) { - if (!dwc_otg_host_channel_wait(td)) - break; + } else if (hcint & HCINT_ACK) { td->offset += td->tx_bytes; td->remainder -= td->tx_bytes; td->toggle = 1; - return (0); /* complete */ + goto complete; } break; - case DWC_CHAN_ST_TX_PKT_SYNC: - goto send_pkt_sync; + + case DWC_CHAN_ST_WAIT_C_PKT: + goto send_cpkt; + default: break; } - return (1); /* busy */ + goto busy; send_pkt: + /* free existing channel, if any */ + dwc_otg_host_channel_free(sc, td, 0); + if (sizeof(req) != td->remainder) { td->error_any = 1; - return (0); /* complete */ + goto complete; } -send_pkt_sync: if (td->hcsplt != 0) { - uint32_t count; - - count = DWC_OTG_READ_4(sc, DOTG_HFNUM) & 7; - /* check for not first microframe */ - if (count != 0) { - /* enable SOF interrupt */ - dwc_otg_enable_sof_irq(sc); - /* set state */ - td->state = DWC_CHAN_ST_TX_PKT_SYNC; - dwc_otg_host_channel_free(td); - return (1); /* busy */ + delta = td->tt_start_slot - sc->sc_last_frame_num - 1; + if (td->tt_scheduled == 0 || delta < DWC_OTG_TT_SLOT_MAX) { + td->state = DWC_CHAN_ST_START; + goto busy; + } + delta = sc->sc_last_frame_num - td->tt_start_slot; + if (delta > 5) { + /* missed it */ + td->tt_scheduled = 0; + td->state = DWC_CHAN_ST_START; + goto busy; } + } + /* allocate a new channel */ + if (dwc_otg_host_channel_alloc(sc, td, 0, 1)) { + td->state = DWC_CHAN_ST_START; + goto busy; + } + + if (td->hcsplt != 0) { td->hcsplt &= ~HCSPLT_COMPSPLT; td->state = DWC_CHAN_ST_WAIT_S_ANE; } else { @@ -812,57 +841,83 @@ send_pkt_sync: usbd_copy_out(td->pc, 0, &req, sizeof(req)); - DWC_OTG_WRITE_4(sc, DOTG_HCTSIZ(td->channel), + DWC_OTG_WRITE_4(sc, DOTG_HCTSIZ(td->channel[0]), (sizeof(req) << HCTSIZ_XFERSIZE_SHIFT) | (1 << HCTSIZ_PKTCNT_SHIFT) | (HCTSIZ_PID_SETUP << HCTSIZ_PID_SHIFT)); - DWC_OTG_WRITE_4(sc, DOTG_HCSPLT(td->channel), td->hcsplt); + DWC_OTG_WRITE_4(sc, DOTG_HCSPLT(td->channel[0]), td->hcsplt); hcchar = td->hcchar; - hcchar &= ~HCCHAR_EPDIR_IN; + hcchar &= ~(HCCHAR_EPDIR_IN | HCCHAR_EPTYPE_MASK); + hcchar |= UE_CONTROL << HCCHAR_EPTYPE_SHIFT; /* must enable channel before writing data to FIFO */ - DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel), hcchar); + DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel[0]), hcchar); /* transfer data into FIFO */ bus_space_write_region_4(sc->sc_io_tag, sc->sc_io_hdl, - DOTG_DFIFO(td->channel), (uint32_t *)&req, sizeof(req) / 4); + DOTG_DFIFO(td->channel[0]), (uint32_t *)&req, sizeof(req) / 4); /* store number of bytes transmitted */ td->tx_bytes = sizeof(req); - - return (1); /* busy */ + goto busy; send_cpkt: + /* free existing channel, if any */ + dwc_otg_host_channel_free(sc, td, 0); + + delta = td->tt_complete_slot - sc->sc_last_frame_num - 1; + if (td->tt_scheduled == 0 || delta < DWC_OTG_TT_SLOT_MAX) { + td->state = DWC_CHAN_ST_WAIT_C_PKT; + goto busy; + } + delta = sc->sc_last_frame_num - td->tt_start_slot; + if (delta > DWC_OTG_TT_SLOT_MAX) { + /* we missed the service interval */ + if (td->ep_type != UE_ISOCHRONOUS) + td->error_any = 1; + goto complete; + } + /* allocate a new channel */ + if (dwc_otg_host_channel_alloc(sc, td, 0, 0)) { + td->state = DWC_CHAN_ST_WAIT_C_PKT; + goto busy; + } + + /* wait until next slot before trying again */ + td->tt_complete_slot++; + td->hcsplt |= HCSPLT_COMPSPLT; td->state = DWC_CHAN_ST_WAIT_C_ANE; - DWC_OTG_WRITE_4(sc, DOTG_HCTSIZ(td->channel), + DWC_OTG_WRITE_4(sc, DOTG_HCTSIZ(td->channel[0]), (HCTSIZ_PID_SETUP << HCTSIZ_PID_SHIFT)); - DWC_OTG_WRITE_4(sc, DOTG_HCSPLT(td->channel), td->hcsplt); + DWC_OTG_WRITE_4(sc, DOTG_HCSPLT(td->channel[0]), td->hcsplt); hcchar = td->hcchar; - hcchar &= ~HCCHAR_EPDIR_IN; + hcchar &= ~(HCCHAR_EPDIR_IN | HCCHAR_EPTYPE_MASK); + hcchar |= UE_CONTROL << HCCHAR_EPTYPE_SHIFT; /* must enable channel before writing data to FIFO */ - DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel), hcchar); + DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel[0]), hcchar); +busy: return (1); /* busy */ + +complete: + dwc_otg_host_channel_free(sc, td, 0); + return (0); /* complete */ } static uint8_t -dwc_otg_setup_rx(struct dwc_otg_td *td) +dwc_otg_setup_rx(struct dwc_otg_softc *sc, struct dwc_otg_td *td) { - struct dwc_otg_softc *sc; struct usb_device_request req __aligned(4); uint32_t temp; uint16_t count; - /* get pointer to softc */ - sc = DWC_OTG_PC2SC(td->pc); - /* check endpoint status */ if (sc->sc_last_rx_status == 0) @@ -984,39 +1039,42 @@ not_complete: } static uint8_t -dwc_otg_host_rate_check(struct dwc_otg_td *td) +dwc_otg_host_rate_check_interrupt(struct dwc_otg_softc *sc, struct dwc_otg_td *td) { - struct dwc_otg_softc *sc; - uint8_t ep_type; + uint8_t delta; - /* get pointer to softc */ - sc = DWC_OTG_PC2SC(td->pc); + delta = sc->sc_tmr_val - td->tmr_val; + if (delta >= 128) + return (1); /* busy */ - ep_type = ((td->hcchar & - HCCHAR_EPTYPE_MASK) >> HCCHAR_EPTYPE_SHIFT); + td->tmr_val = sc->sc_tmr_val + td->tmr_res; - if (sc->sc_chan_state[td->channel].suspended) - goto busy; + /* set toggle, if any */ + if (td->set_toggle) { + td->set_toggle = 0; + td->toggle = 1; + } + return (0); +} - if (ep_type == UE_ISOCHRONOUS) { - if (td->tmr_val & 1) - td->hcchar |= HCCHAR_ODDFRM; - else - td->hcchar &= ~HCCHAR_ODDFRM; - td->tmr_val += td->tmr_res; - } else if (ep_type == UE_INTERRUPT) { - uint8_t delta; +static uint8_t +dwc_otg_host_rate_check(struct dwc_otg_softc *sc, struct dwc_otg_td *td) +{ + if (td->ep_type == UE_ISOCHRONOUS) { + /* non TT isochronous traffic */ + if ((td->tmr_val != 0) || + (sc->sc_last_frame_num & (td->tmr_res - 1))) { + goto busy; + } + td->tmr_val = 1; /* executed */ + td->toggle = 0; - delta = sc->sc_tmr_val - td->tmr_val; - if (delta >= 128) + } else if (td->ep_type == UE_INTERRUPT) { + if (!td->tt_scheduled) goto busy; - td->tmr_val = sc->sc_tmr_val + td->tmr_res; - } else if (td->did_nak != 0) { + td->tt_scheduled = 0; + } else if (td->did_nak >= DWC_OTG_NAK_MAX) { goto busy; - } - - if (ep_type == UE_ISOCHRONOUS) { - td->toggle = 0; } else if (td->set_toggle) { td->set_toggle = 0; td->toggle = 1; @@ -1027,29 +1085,27 @@ busy: } static uint8_t -dwc_otg_host_data_rx(struct dwc_otg_td *td) +dwc_otg_host_data_rx(struct dwc_otg_softc *sc, struct dwc_otg_td *td) { - struct dwc_otg_softc *sc; uint32_t hcint; uint32_t hcchar; uint32_t count; - uint8_t ep_type; - - if (dwc_otg_host_channel_alloc(td)) - return (1); /* busy */ - - /* get pointer to softc */ - sc = DWC_OTG_PC2SC(td->pc); + uint8_t delta; + uint8_t channel; - ep_type = ((td->hcchar & - HCCHAR_EPTYPE_MASK) >> HCCHAR_EPTYPE_SHIFT); + channel = td->channel[td->tt_channel_tog]; - hcint = sc->sc_chan_state[td->channel].hcint; + if (channel < DWC_OTG_MAX_CHANNELS) { + hcint = sc->sc_chan_state[channel].hcint; - DPRINTF("CH=%d ST=%d HCINT=0x%08x HCCHAR=0x%08x HCTSIZ=0x%08x\n", - td->channel, td->state, hcint, - DWC_OTG_READ_4(sc, DOTG_HCCHAR(td->channel)), - DWC_OTG_READ_4(sc, DOTG_HCTSIZ(td->channel))); + DPRINTF("CH=%d ST=%d HCINT=0x%08x HCCHAR=0x%08x HCTSIZ=0x%08x\n", + channel, td->state, hcint, + DWC_OTG_READ_4(sc, DOTG_HCCHAR(channel)), + DWC_OTG_READ_4(sc, DOTG_HCTSIZ(channel))); + } else { + hcint = 0; + goto check_state; + } /* check interrupt bits */ @@ -1057,35 +1113,26 @@ dwc_otg_host_data_rx(struct dwc_otg_td * HCINT_ACK | HCINT_NYET)) { /* give success bits priority over failure bits */ } else if (hcint & HCINT_STALL) { - DPRINTF("CH=%d STALL\n", td->channel); + DPRINTF("CH=%d STALL\n", channel); td->error_stall = 1; td->error_any = 1; - return (0); /* complete */ + goto complete; } else if (hcint & HCINT_ERRORS) { - DPRINTF("CH=%d ERROR\n", td->channel); + DPRINTF("CH=%d ERROR\n", channel); td->errcnt++; if (td->hcsplt != 0 || td->errcnt >= 3) { - td->error_any = 1; - return (0); /* complete */ + if (td->ep_type != UE_ISOCHRONOUS) { + td->error_any = 1; + goto complete; + } } } - /* channel must be disabled before we can complete the transfer */ - - if (hcint & (HCINT_ERRORS | HCINT_RETRY | - HCINT_ACK | HCINT_NYET)) { - - dwc_otg_host_channel_disable(sc, td->channel); - - if (!(hcint & HCINT_ERRORS)) - td->errcnt = 0; - } - /* check endpoint status */ if (sc->sc_last_rx_status == 0) goto check_state; - if (GRXSTSRD_CHNUM_GET(sc->sc_last_rx_status) != td->channel) + if (GRXSTSRD_CHNUM_GET(sc->sc_last_rx_status) != channel) goto check_state; switch (sc->sc_last_rx_status & GRXSTSRD_PKTSTS_MASK) { @@ -1103,25 +1150,42 @@ dwc_otg_host_data_rx(struct dwc_otg_td * break; } - td->toggle ^= 1; - /* get the packet byte count */ count = GRXSTSRD_BCNT_GET(sc->sc_last_rx_status); - /* verify the packet byte count */ - if (count != td->max_packet_size) { - if (count < td->max_packet_size) { - /* we have a short packet */ - td->short_pkt = 1; - td->got_short = 1; + /* check for isochronous transfer or high-speed bandwidth endpoint */ + if (td->ep_type == UE_ISOCHRONOUS || td->max_packet_count > 1) { + if ((sc->sc_last_rx_status & GRXSTSRD_DPID_MASK) != GRXSTSRD_DPID_DATA0) { + td->tt_xactpos = HCSPLT_XACTPOS_MIDDLE; } else { - /* invalid USB packet */ - td->error_any = 1; + td->tt_xactpos = HCSPLT_XACTPOS_BEGIN; + + /* verify the packet byte count */ + if (count < td->max_packet_size) { + /* we have a short packet */ + td->short_pkt = 1; + td->got_short = 1; + } + } + td->toggle = 0; + } else { + /* verify the packet byte count */ + if (count != td->max_packet_size) { + if (count < td->max_packet_size) { + /* we have a short packet */ + td->short_pkt = 1; + td->got_short = 1; + } else { + /* invalid USB packet */ + td->error_any = 1; - /* release FIFO */ - dwc_otg_common_rx_ack(sc); - return (0); /* we are complete */ + /* release FIFO */ + dwc_otg_common_rx_ack(sc); + goto complete; + } } + td->toggle ^= 1; + td->tt_scheduled = 0; } /* verify the packet byte count */ @@ -1131,7 +1195,7 @@ dwc_otg_host_data_rx(struct dwc_otg_td * /* release FIFO */ dwc_otg_common_rx_ack(sc); - return (0); /* we are complete */ + goto complete; } usbd_copy_in(td->pc, td->offset, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Fri May 23 06:28:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A188E22F; Fri, 23 May 2014 06:28:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8DFCE271D; Fri, 23 May 2014 06:28:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4N6SV7O050967; Fri, 23 May 2014 06:28:31 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4N6SVUq050966; Fri, 23 May 2014 06:28:31 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201405230628.s4N6SVUq050966@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 23 May 2014 06:28:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266576 - stable/10/sys/modules/sound/sound X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2014 06:28:31 -0000 Author: hselasky Date: Fri May 23 06:28:31 2014 New Revision: 266576 URL: http://svnweb.freebsd.org/changeset/base/266576 Log: MFC r265359 and r265780: Remove ISA load dependency for the kernel sound driver module for ARM and MIPS. Modified: stable/10/sys/modules/sound/sound/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/modules/sound/sound/Makefile ============================================================================== --- stable/10/sys/modules/sound/sound/Makefile Fri May 23 06:20:25 2014 (r266575) +++ stable/10/sys/modules/sound/sound/Makefile Fri May 23 06:28:31 2014 (r266576) @@ -44,7 +44,8 @@ CLEANFILES+= feeder_eq_gen.h feeder_rate EXPORT_SYMS= YES # XXX evaluate -.if ${MACHINE_CPUARCH} == "sparc64" || ${MACHINE_CPUARCH} == "powerpc" +.if ${MACHINE_CPUARCH} != "i386" && ${MACHINE_CPUARCH} != "amd64" && \ + ${MACHINE_CPUARCH} != "ia64" && ${MACHINE_CPUARCH} != "pc98" # Create an empty opt_isa.h in order to keep kmod.mk from linking in an # existing one from KERNBUILDDIR which possibly has DEV_ISA defined so # sound.ko is always built without isadma support. From owner-svn-src-stable@FreeBSD.ORG Fri May 23 06:35:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66B9D507; Fri, 23 May 2014 06:35:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5240627D6; Fri, 23 May 2014 06:35:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4N6Zk6p055008; Fri, 23 May 2014 06:35:46 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4N6ZjEO055006; Fri, 23 May 2014 06:35:45 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201405230635.s4N6ZjEO055006@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 23 May 2014 06:35:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266577 - stable/10/sys/dev/usb/wlan X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2014 06:35:46 -0000 Author: hselasky Date: Fri May 23 06:35:45 2014 New Revision: 266577 URL: http://svnweb.freebsd.org/changeset/base/266577 Log: MFC r266466, r266471, r266484, r266505, r266535 and r266542: Fix multiple issues in the RSU driver. Modified: stable/10/sys/dev/usb/wlan/if_rsu.c stable/10/sys/dev/usb/wlan/if_rsureg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_rsu.c Fri May 23 06:28:31 2014 (r266576) +++ stable/10/sys/dev/usb/wlan/if_rsu.c Fri May 23 06:35:45 2014 (r266577) @@ -127,7 +127,10 @@ static const STRUCT_USB_HOST_ID rsu_devs static device_probe_t rsu_match; static device_attach_t rsu_attach; static device_detach_t rsu_detach; -static usb_callback_t rsu_bulk_tx_callback; +static usb_callback_t rsu_bulk_tx_callback_0; +static usb_callback_t rsu_bulk_tx_callback_1; +static usb_callback_t rsu_bulk_tx_callback_2; +static usb_callback_t rsu_bulk_tx_callback_3; static usb_callback_t rsu_bulk_rx_callback; static usb_error_t rsu_do_request(struct rsu_softc *, struct usb_device_request *, void *); @@ -186,7 +189,6 @@ static int rsu_raw_xmit(struct ieee80211 const struct ieee80211_bpf_params *); static void rsu_init(void *); static void rsu_init_locked(struct rsu_softc *); -static void rsu_watchdog(void *); static int rsu_tx_start(struct rsu_softc *, struct ieee80211_node *, struct mbuf *, struct rsu_data *); static void rsu_start(struct ifnet *); @@ -194,6 +196,7 @@ static void rsu_start_locked(struct ifne static int rsu_ioctl(struct ifnet *, u_long, caddr_t); static void rsu_stop(struct ifnet *, int); static void rsu_stop_locked(struct ifnet *, int); +static void rsu_ms_delay(struct rsu_softc *); static device_method_t rsu_methods[] = { DEVMETHOD(device_probe, rsu_match), @@ -239,7 +242,7 @@ static const struct usb_config rsu_confi .pipe_bof = 1, .force_short_xfer = 1 }, - .callback = rsu_bulk_tx_callback, + .callback = rsu_bulk_tx_callback_0, .timeout = RSU_TX_TIMEOUT }, [RSU_BULK_TX_BK] = { @@ -252,7 +255,7 @@ static const struct usb_config rsu_confi .pipe_bof = 1, .force_short_xfer = 1 }, - .callback = rsu_bulk_tx_callback, + .callback = rsu_bulk_tx_callback_1, .timeout = RSU_TX_TIMEOUT }, [RSU_BULK_TX_VI] = { @@ -265,7 +268,7 @@ static const struct usb_config rsu_confi .pipe_bof = 1, .force_short_xfer = 1 }, - .callback = rsu_bulk_tx_callback, + .callback = rsu_bulk_tx_callback_2, .timeout = RSU_TX_TIMEOUT }, [RSU_BULK_TX_VO] = { @@ -278,7 +281,7 @@ static const struct usb_config rsu_confi .pipe_bof = 1, .force_short_xfer = 1 }, - .callback = rsu_bulk_tx_callback, + .callback = rsu_bulk_tx_callback_3, .timeout = RSU_TX_TIMEOUT }, }; @@ -314,7 +317,20 @@ rsu_attach(device_t self) MTX_DEF); TIMEOUT_TASK_INIT(taskqueue_thread, &sc->calib_task, 0, rsu_calib_task, sc); - callout_init(&sc->sc_watchdog_ch, 0); + + /* Allocate Tx/Rx buffers. */ + error = rsu_alloc_rx_list(sc); + if (error != 0) { + device_printf(sc->sc_dev, "could not allocate Rx buffers\n"); + goto fail_usb; + } + + error = rsu_alloc_tx_list(sc); + if (error != 0) { + device_printf(sc->sc_dev, "could not allocate Tx buffers\n"); + rsu_free_rx_list(sc); + goto fail_usb; + } iface_index = 0; error = usbd_transfer_setup(uaa->device, &iface_index, sc->sc_xfer, @@ -422,13 +438,10 @@ rsu_detach(device_t self) struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic = ifp->if_l2com; - if (!device_is_attached(self)) - return (0); rsu_stop(ifp, 1); usbd_transfer_unsetup(sc->sc_xfer, RSU_N_TRANSFER); ieee80211_ifdetach(ic); - callout_drain(&sc->sc_watchdog_ch); taskqueue_drain_timeout(taskqueue_thread, &sc->calib_task); /* Free Tx/Rx buffers. */ @@ -453,7 +466,7 @@ rsu_do_request(struct rsu_softc *sc, str while (ntries--) { err = usbd_do_request_flags(sc->sc_udev, &sc->sc_mtx, req, data, 0, NULL, 250 /* ms */); - if (err == 0 || !device_is_attached(sc->sc_dev)) + if (err == 0 || err == USB_ERR_NOT_CONFIGURED) break; DPRINTFN(1, "Control request failed, %s (retrying)\n", usbd_errstr(err)); @@ -598,9 +611,12 @@ rsu_alloc_tx_list(struct rsu_softc *sc) if (error != 0) return (error); - STAILQ_INIT(&sc->sc_tx_active); STAILQ_INIT(&sc->sc_tx_inactive); - STAILQ_INIT(&sc->sc_tx_pending); + + for (i = 0; i != RSU_MAX_TX_EP; i++) { + STAILQ_INIT(&sc->sc_tx_active[i]); + STAILQ_INIT(&sc->sc_tx_pending[i]); + } for (i = 0; i < RSU_TX_LIST_COUNT; i++) { STAILQ_INSERT_HEAD(&sc->sc_tx_inactive, &sc->sc_tx[i], next); @@ -612,12 +628,26 @@ rsu_alloc_tx_list(struct rsu_softc *sc) static void rsu_free_tx_list(struct rsu_softc *sc) { + int i; + + /* prevent further allocations from TX list(s) */ + STAILQ_INIT(&sc->sc_tx_inactive); + + for (i = 0; i != RSU_MAX_TX_EP; i++) { + STAILQ_INIT(&sc->sc_tx_active[i]); + STAILQ_INIT(&sc->sc_tx_pending[i]); + } + rsu_free_list(sc, sc->sc_tx, RSU_TX_LIST_COUNT); } static void rsu_free_rx_list(struct rsu_softc *sc) { + /* prevent further allocations from RX list(s) */ + STAILQ_INIT(&sc->sc_rx_inactive); + STAILQ_INIT(&sc->sc_rx_active); + rsu_free_list(sc, sc->sc_rx, RSU_RX_LIST_COUNT); } @@ -757,11 +787,11 @@ rsu_fw_iocmd(struct rsu_softc *sc, uint3 int ntries; rsu_write_4(sc, R92S_IOCMD_CTRL, iocmd); - DELAY(100); + rsu_ms_delay(sc); for (ntries = 0; ntries < 50; ntries++) { if (rsu_read_4(sc, R92S_IOCMD_CTRL) == 0) return (0); - DELAY(10); + rsu_ms_delay(sc); } return (ETIMEDOUT); } @@ -781,7 +811,7 @@ rsu_efuse_read_1(struct rsu_softc *sc, u reg = rsu_read_4(sc, R92S_EFUSE_CTRL); if (reg & R92S_EFUSE_CTRL_VALID) return (MS(reg, R92S_EFUSE_CTRL_DATA)); - DELAY(5); + rsu_ms_delay(sc); } device_printf(sc->sc_dev, "could not read efuse byte at address 0x%x\n", addr); @@ -805,7 +835,7 @@ rsu_read_rom(struct rsu_softc *sc) /* Turn on 2.5V to prevent eFuse leakage. */ reg = rsu_read_1(sc, R92S_EFUSE_TEST + 3); rsu_write_1(sc, R92S_EFUSE_TEST + 3, reg | 0x80); - DELAY(1000); + rsu_ms_delay(sc); rsu_write_1(sc, R92S_EFUSE_TEST + 3, reg & ~0x80); /* Read full ROM image. */ @@ -843,10 +873,12 @@ rsu_read_rom(struct rsu_softc *sc) static int rsu_fw_cmd(struct rsu_softc *sc, uint8_t code, void *buf, int len) { + const uint8_t which = RSU_BULK_TX_VO - RSU_BULK_TX_BE; struct rsu_data *data; struct r92s_tx_desc *txd; struct r92s_fw_cmd_hdr *cmd; - int cmdsz, xferlen; + int cmdsz; + int xferlen; data = rsu_getbuf(sc); if (data == NULL) @@ -879,8 +911,8 @@ rsu_fw_cmd(struct rsu_softc *sc, uint8_t DPRINTFN(2, "Tx cmd code=0x%x len=0x%x\n", code, cmdsz); data->buflen = xferlen; - STAILQ_INSERT_TAIL(&sc->sc_tx_pending, data, next); - usbd_transfer_start(sc->sc_xfer[RSU_BULK_TX_VO]); + STAILQ_INSERT_TAIL(&sc->sc_tx_pending[which], data, next); + usbd_transfer_start(sc->sc_xfer[which + RSU_BULK_TX_BE]); return (0); } @@ -1589,13 +1621,13 @@ rsu_txeof(struct usb_xfer *xfer, struct ieee80211_free_node(data->ni); data->ni = NULL; } - sc->sc_tx_timer = 0; ifp->if_opackets++; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; } static void -rsu_bulk_tx_callback(struct usb_xfer *xfer, usb_error_t error) +rsu_bulk_tx_callback_sub(struct usb_xfer *xfer, usb_error_t error, + uint8_t which) { struct rsu_softc *sc = usbd_xfer_softc(xfer); struct ifnet *ifp = sc->sc_ifp; @@ -1605,37 +1637,36 @@ rsu_bulk_tx_callback(struct usb_xfer *xf switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: - data = STAILQ_FIRST(&sc->sc_tx_active); + data = STAILQ_FIRST(&sc->sc_tx_active[which]); if (data == NULL) goto tr_setup; DPRINTF("transfer done %p\n", data); - STAILQ_REMOVE_HEAD(&sc->sc_tx_active, next); + STAILQ_REMOVE_HEAD(&sc->sc_tx_active[which], next); rsu_txeof(xfer, data); STAILQ_INSERT_TAIL(&sc->sc_tx_inactive, data, next); /* FALLTHROUGH */ case USB_ST_SETUP: tr_setup: - data = STAILQ_FIRST(&sc->sc_tx_pending); + data = STAILQ_FIRST(&sc->sc_tx_pending[which]); if (data == NULL) { DPRINTF("empty pending queue sc %p\n", sc); return; } - STAILQ_REMOVE_HEAD(&sc->sc_tx_pending, next); - STAILQ_INSERT_TAIL(&sc->sc_tx_active, data, next); + STAILQ_REMOVE_HEAD(&sc->sc_tx_pending[which], next); + STAILQ_INSERT_TAIL(&sc->sc_tx_active[which], data, next); usbd_xfer_set_frame_data(xfer, 0, data->buf, data->buflen); DPRINTF("submitting transfer %p\n", data); usbd_transfer_submit(xfer); - rsu_start_locked(ifp); break; default: - data = STAILQ_FIRST(&sc->sc_tx_active); - if (data == NULL) - goto tr_setup; - if (data->ni != NULL) { - ieee80211_free_node(data->ni); - data->ni = NULL; - ifp->if_oerrors++; + data = STAILQ_FIRST(&sc->sc_tx_active[which]); + if (data != NULL) { + STAILQ_REMOVE_HEAD(&sc->sc_tx_active[which], next); + rsu_txeof(xfer, data); + STAILQ_INSERT_TAIL(&sc->sc_tx_inactive, data, next); } + ifp->if_oerrors++; + if (error != USB_ERR_CANCELLED) { usbd_xfer_set_stall(xfer); goto tr_setup; @@ -1644,6 +1675,30 @@ tr_setup: } } +static void +rsu_bulk_tx_callback_0(struct usb_xfer *xfer, usb_error_t error) +{ + rsu_bulk_tx_callback_sub(xfer, error, 0); +} + +static void +rsu_bulk_tx_callback_1(struct usb_xfer *xfer, usb_error_t error) +{ + rsu_bulk_tx_callback_sub(xfer, error, 1); +} + +static void +rsu_bulk_tx_callback_2(struct usb_xfer *xfer, usb_error_t error) +{ + rsu_bulk_tx_callback_sub(xfer, error, 2); +} + +static void +rsu_bulk_tx_callback_3(struct usb_xfer *xfer, usb_error_t error) +{ + rsu_bulk_tx_callback_sub(xfer, error, 3); +} + static int rsu_tx_start(struct rsu_softc *sc, struct ieee80211_node *ni, struct mbuf *m0, struct rsu_data *data) @@ -1654,15 +1709,11 @@ rsu_tx_start(struct rsu_softc *sc, struc struct ieee80211_frame *wh; struct ieee80211_key *k = NULL; struct r92s_tx_desc *txd; - struct usb_xfer *xfer; - uint8_t type, tid = 0; - int hasqos, xferlen; - struct usb_xfer *rsu_pipes[4] = { - sc->sc_xfer[RSU_BULK_TX_BE], - sc->sc_xfer[RSU_BULK_TX_BK], - sc->sc_xfer[RSU_BULK_TX_VI], - sc->sc_xfer[RSU_BULK_TX_VO] - }; + uint8_t type; + uint8_t tid = 0; + uint8_t which; + int hasqos; + int xferlen; RSU_ASSERT_LOCKED(sc); @@ -1683,12 +1734,12 @@ rsu_tx_start(struct rsu_softc *sc, struc switch (type) { case IEEE80211_FC0_TYPE_CTL: case IEEE80211_FC0_TYPE_MGT: - xfer = sc->sc_xfer[RSU_BULK_TX_VO]; + which = RSU_BULK_TX_VO - RSU_BULK_TX_BE; break; default: - KASSERT(M_WME_GETAC(m0) < 4, - ("unsupported WME pipe %d", M_WME_GETAC(m0))); - xfer = rsu_pipes[M_WME_GETAC(m0)]; + which = M_WME_GETAC(m0); + KASSERT(which < RSU_MAX_TX_EP, + ("unsupported WME pipe %d", which)); break; } hasqos = 0; @@ -1750,9 +1801,10 @@ rsu_tx_start(struct rsu_softc *sc, struc data->buflen = xferlen; data->ni = ni; data->m = m0; - STAILQ_INSERT_TAIL(&sc->sc_tx_pending, data, next); - usbd_transfer_start(xfer); + STAILQ_INSERT_TAIL(&sc->sc_tx_pending[which], data, next); + /* start transfer, if any */ + usbd_transfer_start(sc->sc_xfer[which + RSU_BULK_TX_BE]); return (0); } @@ -1774,8 +1826,8 @@ rsu_start_locked(struct ifnet *ifp) { struct rsu_softc *sc = ifp->if_softc; struct ieee80211_node *ni; - struct mbuf *m; struct rsu_data *bf; + struct mbuf *m; RSU_ASSERT_LOCKED(sc); @@ -1783,39 +1835,19 @@ rsu_start_locked(struct ifnet *ifp) IFQ_DRV_DEQUEUE(&ifp->if_snd, m); if (m == NULL) break; - bf = rsu_getbuf(sc); - if (bf == NULL) { - IFQ_DRV_PREPEND(&ifp->if_snd, m); - break; - } ni = (struct ieee80211_node *)m->m_pkthdr.rcvif; m->m_pkthdr.rcvif = NULL; - if (rsu_tx_start(sc, ni, m, bf) != 0) { + bf = rsu_getbuf(sc); + if (bf == NULL) { + ifp->if_iqdrops++; + m_freem(m); + ieee80211_free_node(ni); + } else if (rsu_tx_start(sc, ni, m, bf) != 0) { ifp->if_oerrors++; STAILQ_INSERT_HEAD(&sc->sc_tx_inactive, bf, next); ieee80211_free_node(ni); - break; - } - sc->sc_tx_timer = 5; - callout_reset(&sc->sc_watchdog_ch, hz, rsu_watchdog, sc); - } -} - -static void -rsu_watchdog(void *arg) -{ - struct rsu_softc *sc = arg; - struct ifnet *ifp = sc->sc_ifp; - - if (sc->sc_tx_timer > 0) { - if (--sc->sc_tx_timer == 0) { - device_printf(sc->sc_dev, "device timeout\n"); - /* rsu_init(ifp); XXX needs a process context! */ - ifp->if_oerrors++; - return; } - callout_reset(&sc->sc_watchdog_ch, hz, rsu_watchdog, sc); } } @@ -1947,7 +1979,7 @@ rsu_power_on_bcut(struct rsu_softc *sc) /* Prevent eFuse leakage. */ rsu_write_1(sc, 0x37, 0xb0); - usb_pause_mtx(&sc->sc_mtx, 10); + usb_pause_mtx(&sc->sc_mtx, hz / 100); rsu_write_1(sc, 0x37, 0x30); /* Switch the control path to hardware. */ @@ -1958,7 +1990,7 @@ rsu_power_on_bcut(struct rsu_softc *sc) } rsu_write_1(sc, R92S_SYS_FUNC_EN + 1, rsu_read_1(sc, R92S_SYS_FUNC_EN + 1) & ~0x8c); - DELAY(1000); + rsu_ms_delay(sc); rsu_write_1(sc, R92S_SPS0_CTRL + 1, 0x53); rsu_write_1(sc, R92S_SPS0_CTRL + 0, 0x57); @@ -1991,11 +2023,11 @@ rsu_power_on_bcut(struct rsu_softc *sc) /* Enable AFE PLL macro block. */ reg = rsu_read_1(sc, R92S_AFE_PLL_CTRL); rsu_write_1(sc, R92S_AFE_PLL_CTRL, reg | 0x11); - DELAY(500); + rsu_ms_delay(sc); rsu_write_1(sc, R92S_AFE_PLL_CTRL, reg | 0x51); - DELAY(500); + rsu_ms_delay(sc); rsu_write_1(sc, R92S_AFE_PLL_CTRL, reg | 0x11); - DELAY(500); + rsu_ms_delay(sc); /* Attach AFE PLL to MACTOP/BB. */ rsu_write_1(sc, R92S_SYS_ISO_CTRL, @@ -2042,14 +2074,14 @@ rsu_power_on_bcut(struct rsu_softc *sc) if ((reg & (R92S_TCR_IMEM_CHK_RPT | R92S_TCR_EMEM_CHK_RPT)) == (R92S_TCR_IMEM_CHK_RPT | R92S_TCR_EMEM_CHK_RPT)) break; - DELAY(5); + rsu_ms_delay(sc); } if (ntries == 20) { DPRINTF("TxDMA is not ready\n"); /* Reset TxDMA. */ reg = rsu_read_1(sc, R92S_CR); rsu_write_1(sc, R92S_CR, reg & ~R92S_CR_TXDMA_EN); - DELAY(2); + rsu_ms_delay(sc); rsu_write_1(sc, R92S_CR, reg | R92S_CR_TXDMA_EN); } } @@ -2059,7 +2091,7 @@ rsu_power_off(struct rsu_softc *sc) { /* Turn RF off. */ rsu_write_1(sc, R92S_RF_CTRL, 0x00); - usb_pause_mtx(&sc->sc_mtx, 5); + usb_pause_mtx(&sc->sc_mtx, hz / 200); /* Turn MAC off. */ /* Switch control path. */ @@ -2087,6 +2119,7 @@ rsu_power_off(struct rsu_softc *sc) static int rsu_fw_loadsection(struct rsu_softc *sc, const uint8_t *buf, int len) { + const uint8_t which = RSU_BULK_TX_VO - RSU_BULK_TX_BE; struct rsu_data *data; struct r92s_tx_desc *txd; int mlen; @@ -2107,12 +2140,11 @@ rsu_fw_loadsection(struct rsu_softc *sc, memcpy(&txd[1], buf, mlen); data->buflen = sizeof(*txd) + mlen; DPRINTF("starting transfer %p\n", data); - STAILQ_INSERT_TAIL(&sc->sc_tx_pending, data, next); + STAILQ_INSERT_TAIL(&sc->sc_tx_pending[which], data, next); buf += mlen; len -= mlen; } - usbd_transfer_start(sc->sc_xfer[RSU_BULK_TX_VO]); - + usbd_transfer_start(sc->sc_xfer[RSU_BULK_TX_BE + which]); return (0); } @@ -2182,15 +2214,14 @@ rsu_load_firmware(struct rsu_softc *sc) goto fail; } /* Wait for load to complete. */ - for (ntries = 0; ntries < 10; ntries++) { - usb_pause_mtx(&sc->sc_mtx, 10); + for (ntries = 0; ntries != 50; ntries++) { + usb_pause_mtx(&sc->sc_mtx, hz / 100); reg = rsu_read_2(sc, R92S_TCR); if (reg & R92S_TCR_IMEM_CODE_DONE) break; } - if (ntries == 10 || !(reg & R92S_TCR_IMEM_CHK_RPT)) { - device_printf(sc->sc_dev, "timeout waiting for %s transfer\n", - "IMEM"); + if (ntries == 50) { + device_printf(sc->sc_dev, "timeout waiting for IMEM transfer\n"); error = ETIMEDOUT; goto fail; } @@ -2203,15 +2234,14 @@ rsu_load_firmware(struct rsu_softc *sc) goto fail; } /* Wait for load to complete. */ - for (ntries = 0; ntries < 10; ntries++) { - usb_pause_mtx(&sc->sc_mtx, 10); + for (ntries = 0; ntries != 50; ntries++) { + usb_pause_mtx(&sc->sc_mtx, hz / 100); reg = rsu_read_2(sc, R92S_TCR); if (reg & R92S_TCR_EMEM_CODE_DONE) break; } - if (ntries == 10 || !(reg & R92S_TCR_EMEM_CHK_RPT)) { - device_printf(sc->sc_dev, "timeout waiting for %s transfer\n", - "EMEM"); + if (ntries == 50) { + device_printf(sc->sc_dev, "timeout waiting for EMEM transfer\n"); error = ETIMEDOUT; goto fail; } @@ -2236,7 +2266,7 @@ rsu_load_firmware(struct rsu_softc *sc) for (ntries = 0; ntries < 100; ntries++) { if (rsu_read_2(sc, R92S_TCR) & R92S_TCR_IMEM_RDY) break; - DELAY(1000); + rsu_ms_delay(sc); } if (ntries == 100) { device_printf(sc->sc_dev, @@ -2249,7 +2279,7 @@ rsu_load_firmware(struct rsu_softc *sc) dmem = __DECONST(struct r92s_fw_priv *, &hdr->priv); memset(dmem, 0, sizeof(*dmem)); dmem->hci_sel = R92S_HCI_SEL_USB | R92S_HCI_SEL_8172; - dmem->nendpoints = sc->npipes; + dmem->nendpoints = 0; dmem->rf_config = 0x12; /* 1T2R */ dmem->vcs_type = R92S_VCS_TYPE_AUTO; dmem->vcs_mode = R92S_VCS_MODE_RTS_CTS; @@ -2268,7 +2298,7 @@ rsu_load_firmware(struct rsu_softc *sc) for (ntries = 0; ntries < 100; ntries++) { if (rsu_read_2(sc, R92S_TCR) & R92S_TCR_DMEM_CODE_DONE) break; - DELAY(1000); + rsu_ms_delay(sc); } if (ntries == 100) { device_printf(sc->sc_dev, "timeout waiting for %s transfer\n", @@ -2280,7 +2310,7 @@ rsu_load_firmware(struct rsu_softc *sc) for (ntries = 0; ntries < 60; ntries++) { if (!(rsu_read_2(sc, R92S_TCR) & R92S_TCR_FWRDY)) break; - DELAY(1000); + rsu_ms_delay(sc); } if (ntries == 60) { device_printf(sc->sc_dev, @@ -2326,7 +2356,6 @@ rsu_raw_xmit(struct ieee80211_node *ni, return (EIO); } RSU_UNLOCK(sc); - sc->sc_tx_timer = 5; return (0); } @@ -2347,22 +2376,11 @@ rsu_init_locked(struct rsu_softc *sc) struct ifnet *ifp = sc->sc_ifp; struct r92s_set_pwr_mode cmd; int error; + int i; /* Init host async commands ring. */ sc->cmdq.cur = sc->cmdq.next = sc->cmdq.queued = 0; - /* Allocate Tx/Rx buffers. */ - error = rsu_alloc_rx_list(sc); - if (error != 0) { - device_printf(sc->sc_dev, "could not allocate Rx buffers\n"); - return; - } - error = rsu_alloc_tx_list(sc); - if (error != 0) { - device_printf(sc->sc_dev, "could not allocate Tx buffers\n"); - rsu_free_rx_list(sc); - return; - } /* Power on adapter. */ if (sc->cut == 1) rsu_power_on_acut(sc); @@ -2401,8 +2419,8 @@ rsu_init_locked(struct rsu_softc *sc) rsu_write_region_1(sc, R92S_MACID, IF_LLADDR(ifp), IEEE80211_ADDR_LEN); - /* NB: it really takes that long for firmware to boot. */ - usb_pause_mtx(&sc->sc_mtx, 1500); + /* It really takes 1.5 seconds for the firmware to boot: */ + usb_pause_mtx(&sc->sc_mtx, (3 * hz) / 2); DPRINTF("setting MAC address to %s\n", ether_sprintf(IF_LLADDR(ifp))); error = rsu_fw_cmd(sc, R92S_CMD_SET_MAC_ADDRESS, IF_LLADDR(ifp), @@ -2447,14 +2465,11 @@ rsu_init_locked(struct rsu_softc *sc) /* We're ready to go. */ ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; ifp->if_drv_flags |= IFF_DRV_RUNNING; - - callout_reset(&sc->sc_watchdog_ch, hz, rsu_watchdog, sc); - return; fail: - rsu_free_rx_list(sc); - rsu_free_tx_list(sc); - return; + /* Need to stop all failed transfers, if any */ + for (i = 0; i != RSU_N_TRANSFER; i++) + usbd_transfer_stop(sc->sc_xfer[i]); } static void @@ -2474,7 +2489,6 @@ rsu_stop_locked(struct ifnet *ifp, int d int i; ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); - callout_stop(&sc->sc_watchdog_ch); sc->sc_calibrating = 0; taskqueue_cancel_timeout(taskqueue_thread, &sc->calib_task, NULL); @@ -2485,3 +2499,8 @@ rsu_stop_locked(struct ifnet *ifp, int d usbd_transfer_stop(sc->sc_xfer[i]); } +static void +rsu_ms_delay(struct rsu_softc *sc) +{ + usb_pause_mtx(&sc->sc_mtx, hz / 1000); +} Modified: stable/10/sys/dev/usb/wlan/if_rsureg.h ============================================================================== --- stable/10/sys/dev/usb/wlan/if_rsureg.h Fri May 23 06:28:31 2014 (r266576) +++ stable/10/sys/dev/usb/wlan/if_rsureg.h Fri May 23 06:35:45 2014 (r266577) @@ -1,4 +1,3 @@ - /*- * Copyright (c) 2010 Damien Bergamini * @@ -18,9 +17,6 @@ * $FreeBSD$ */ -/* Maximum number of pipes is 11. */ -#define R92S_MAX_EP 11 - /* USB Requests. */ #define R92S_REQ_REGS 0x05 @@ -519,7 +515,7 @@ struct r92s_rx_stat { uint32_t rxdw4; uint32_t rxdw5; -} __packed __attribute__((aligned(4))); +} __packed __aligned(4); /* Rx PHY descriptor. */ struct r92s_rx_phystat { @@ -531,7 +527,7 @@ struct r92s_rx_phystat { uint32_t phydw5; uint32_t phydw6; uint32_t phydw7; -} __packed __attribute__((aligned(4))); +} __packed __aligned(4); /* Rx PHY CCK descriptor. */ struct r92s_rx_cck { @@ -595,18 +591,14 @@ struct r92s_tx_desc { uint16_t txbufsize; uint16_t reserved1; -} __packed __attribute__((aligned(4))); +} __packed __aligned(4); /* * Driver definitions. */ #define RSU_RX_LIST_COUNT 1 -#ifdef __OpenBSD__ -#define RSU_TX_LIST_COUNT (8 + 1) /* NB: +1 for FW commands. */ -#else #define RSU_TX_LIST_COUNT 32 -#endif #define RSU_HOST_CMD_RING_COUNT 32 @@ -735,6 +727,8 @@ struct rsu_vap { #define RSU_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx) #define RSU_ASSERT_LOCKED(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED) +#define RSU_MAX_TX_EP 4 + struct rsu_softc { struct ifnet *sc_ifp; device_t sc_dev; @@ -743,15 +737,11 @@ struct rsu_softc { enum ieee80211_state, int); struct usbd_interface *sc_iface; struct timeout_task calib_task; - struct callout sc_watchdog_ch; - struct usbd_pipe *pipe[R92S_MAX_EP]; - int npipes; const uint8_t *qid2idx; struct mtx sc_mtx; u_int cut; int scan_pass; - int sc_tx_timer; struct rsu_host_cmd_ring cmdq; struct rsu_data sc_rx[RSU_RX_LIST_COUNT]; struct rsu_data sc_tx[RSU_TX_LIST_COUNT]; @@ -764,9 +754,9 @@ struct rsu_softc { STAILQ_HEAD(, rsu_data) sc_rx_active; STAILQ_HEAD(, rsu_data) sc_rx_inactive; - STAILQ_HEAD(, rsu_data) sc_tx_active; + STAILQ_HEAD(, rsu_data) sc_tx_active[RSU_MAX_TX_EP]; STAILQ_HEAD(, rsu_data) sc_tx_inactive; - STAILQ_HEAD(, rsu_data) sc_tx_pending; + STAILQ_HEAD(, rsu_data) sc_tx_pending[RSU_MAX_TX_EP]; union { struct rsu_rx_radiotap_header th; From owner-svn-src-stable@FreeBSD.ORG Fri May 23 06:47:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D4F27D0; Fri, 23 May 2014 06:47:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA8AB28B3; Fri, 23 May 2014 06:47:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4N6lmdN059600; Fri, 23 May 2014 06:47:48 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4N6llK2059593; Fri, 23 May 2014 06:47:47 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201405230647.s4N6llK2059593@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 23 May 2014 06:47:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266578 - in stable/10: share/man/man4 sys/conf sys/contrib/dev/urtwn sys/dev/usb sys/dev/usb/wlan sys/modules/usb/urtwnfw sys/modules/usb/urtwnfw/urtwnrtl8188eu X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2014 06:47:49 -0000 Author: hselasky Date: Fri May 23 06:47:47 2014 New Revision: 266578 URL: http://svnweb.freebsd.org/changeset/base/266578 Log: MFC r257543, r264912, r264972, r264982 and r266472: - Add preliminary support for the Realtek RTL8188EUS and RTL8188ETV chipsets. - Add device ID for 'Sanoxy 802.11N' USB - Initialize rssi variable. - Fix gcc build, initialize off variable. - The DELAY() should not be used in USB drivers. - The usb_pause_mtx() function takes ticks and not milliseconds as last argument. Added: stable/10/sys/contrib/dev/urtwn/urtwn-rtl8188eufw.fw.uu - copied unchanged from r264912, head/sys/contrib/dev/urtwn/urtwn-rtl8188eufw.fw.uu stable/10/sys/modules/usb/urtwnfw/urtwnrtl8188eu/ - copied from r264912, head/sys/modules/usb/urtwnfw/urtwnrtl8188eu/ Modified: stable/10/share/man/man4/urtwn.4 stable/10/share/man/man4/urtwnfw.4 stable/10/sys/conf/files stable/10/sys/dev/usb/usbdevs stable/10/sys/dev/usb/wlan/if_urtwn.c stable/10/sys/dev/usb/wlan/if_urtwnreg.h stable/10/sys/modules/usb/urtwnfw/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/urtwn.4 ============================================================================== --- stable/10/share/man/man4/urtwn.4 Fri May 23 06:35:45 2014 (r266577) +++ stable/10/share/man/man4/urtwn.4 Fri May 23 06:47:47 2014 (r266578) @@ -19,7 +19,7 @@ .Os .Sh NAME .Nm urtwn -.Nd Realtek RTL8188CU/RTL8192CU USB IEEE 802.11b/g/n wireless network device +.Nd Realtek RTL8188CU/RTL8188EU/RTL8192CU USB IEEE 802.11b/g/n wireless network device .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -50,11 +50,11 @@ legal.realtek.license_ack=1 The .Nm driver supports USB 2.0 wireless network devices based on Realtek -RTL8188CUS, RTL8188CE-VAU, RTL8188RU and RTL8192CU chipsets. +RTL8188CUS, RTL8188CE-VAU, RTL8188EUS, RTL8188RU and RTL8192CU chipsets. .Pp -The RTL8188CUS is a highly integrated 802.11n adapter that combines -a MAC, a 1T1R capable baseband and an RF in a single chip. -It operates in the 2GHz spectrum only. +The RTL8188CUS and RTL8188EUS are highly integrated 802.11n adapter that +combine a MAC, a 1T1R capable baseband and an RF in a single chip. +They operate in the 2GHz spectrum only. The RTL8188RU is a high-power variant of the RTL8188CUS. The RTL8188CE-VAU is a PCI Express Mini Card adapter that attaches to the USB interface. @@ -93,6 +93,8 @@ IEEE 802.11b/g/n wireless network adapte .It Netgear WNA1000M .It Realtek RTL8192CU .It Realtek RTL8188CUS +.It TP-LINK TL-WN723N v3 +.It TP-LINK TL-WN725N v2 .El .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): Modified: stable/10/share/man/man4/urtwnfw.4 ============================================================================== --- stable/10/share/man/man4/urtwnfw.4 Fri May 23 06:35:45 2014 (r266577) +++ stable/10/share/man/man4/urtwnfw.4 Fri May 23 06:47:47 2014 (r266578) @@ -22,7 +22,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 31, 2013 +.Dd April 25, 2014 .Dt URTWNFW 4 .Os .Sh NAME @@ -42,6 +42,7 @@ of the following: .Bd -ragged -offset indent .Cd "device urtwn-rtl8192cfwT" .Cd "device urtwn-rtl8192cfwU" +.Cd "device urtwn-rtl8188eufw" .Ed .Pp Alternatively, to load the driver as a @@ -50,10 +51,11 @@ module at boot time, place the following .Bd -literal -offset indent urtwn-rtl8192cfwT_load="YES" urtwn-rtl8192cfwU_load="YES" +urtwn-rtl8188eufw_load="YES" .Ed .Sh DESCRIPTION This module provides access to firmware sets for the -Realtek RTL8188CUS, RTL8188CE-VAU, RTL8188RU and RTL8192CU +Realtek RTL8188CUS, RTL8188CE-VAU, RTL8188EUS, RTL8188RU and RTL8192CU chip based USB WiFi adapters. It may be statically linked into the kernel, or loaded as a module. Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Fri May 23 06:35:45 2014 (r266577) +++ stable/10/sys/conf/files Fri May 23 06:47:47 2014 (r266578) @@ -2421,6 +2421,20 @@ dev/usb/wlan/if_upgt.c optional upgt dev/usb/wlan/if_ural.c optional ural dev/usb/wlan/if_urtw.c optional urtw dev/usb/wlan/if_urtwn.c optional urtwn +urtwn-rtl8188eufw.c optional urtwn-rtl8188eufw | urtwnfw \ + compile-with "${AWK} -f $S/tools/fw_stub.awk urtwn-rtl8188eufw.fw:urtwn-rtl8188eufw:111 -murtwn-rtl8188eufw -c${.TARGET}" \ + no-implicit-rule before-depend local \ + clean "urtwn-rtl8188eufw.c" +urtwn-rtl8188eufw.fwo optional urtwn-rtl8188eufw | urtwnfw \ + dependency "urtwn-rtl8188eufw.fw" \ + compile-with "${NORMAL_FWO}" \ + no-implicit-rule \ + clean "urtwn-rtl8188eufw.fwo" +urtwn-rtl8188eufw.fw optional urtwn-rtl8188eufw | urtwnfw \ + dependency "$S/contrib/dev/urtwn/urtwn-rtl8188eufw.fw.uu" \ + compile-with "${NORMAL_FW}" \ + no-obj no-implicit-rule \ + clean "urtwn-rtl8188eufw.fw" urtwn-rtl8192cfwT.c optional urtwn-rtl8192cfwT | urtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk urtwn-rtl8192cfwT.fw:urtwn-rtl8192cfwT:111 -murtwn-rtl8192cfwT -c${.TARGET}" \ no-implicit-rule before-depend local \ Copied: stable/10/sys/contrib/dev/urtwn/urtwn-rtl8188eufw.fw.uu (from r264912, head/sys/contrib/dev/urtwn/urtwn-rtl8188eufw.fw.uu) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/contrib/dev/urtwn/urtwn-rtl8188eufw.fw.uu Fri May 23 06:47:47 2014 (r266578, copy of r264912, head/sys/contrib/dev/urtwn/urtwn-rtl8188eufw.fw.uu) @@ -0,0 +1,312 @@ +begin 644 urtwn-rtl8188eufw.fw.uu +MX8@0``L``0`!(1$G,#8``"T'```````````````````"14X````````````` +M````````P6\````````````````````````````````````````````````` +M````````````H>8````````"5O<````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````,*O@/XR$D($A=`+==`(JN#"C.6*)&?UBN6,-'GUC-*,["2)^.:\`P)T +M_\.5@;1``$#.>01X@!;F"'`+PJ_F,.$#1!CVTJ\(V>WJB]`BY0S_(R2!^`\( +M"+\$!'\`>('F,.3R`.4,PY]0(`4,=(@E#/CF_::!".:N#+X#`G3_S?CH;6#@ +M".;`X(#VY0S3GT`GY0PDB?CFK@R^`P)T__T8YLWXY8%M8`;0X/88@/7E#"2( +MR/85#(#3Y0PC)('X?P3"K^8PX`,0X@Q_`##A!S#C!'\(5/14?,;2KU2`0@(BF@70#8`;_"';_W_M_!.1X@/8(]@C?^GB!=C"01=YT`9/`X.23P.!#B0%U +MBF!UC'G2C-*O(@/OTY0#0`-__R)T@2\O^.8@Y?3"K^9$,/;2KZX,[L.?4"$. +M=(@N^.;Y".88O@,"=/_][6E@"0GG&1GW"0F`\Q86@-KNTY]`!`6!!8'NTY]` +M(G2(+O@(YOGNM0P"J8$8!@;F_>UI8`D9&><)"?<9@/,>@-GO)(CXY@3X[R\$ +MD$7>D_8([R^3]G\`(N_3E`-``W__(N\C)('XYC#E],*OYE2,]M*OY0RU!PIT +MB"_XYO6!`D)-4"YTB2_XYK\#`G3__1CF^72(+_C[YOSI;&`(J`7G]AT9@/2H +M`Z8%'^4,M0?C?P`B=(DO^.;]&(8!#W2(+_BF`0B&!.4,M0<"K('M;&`(#0FH +M!>;W@/3E#+4'WHF!?P`B[].4`T`#?_\B[R,D@?C"K^8PY04PX`+2Y-+BQM*O +M?P`PX@$/`D),C_#D__[E#",D@/C"J3#W#7\(YF`++?9@,%`N@`23H_CDDZ-``_:``?((W_2`*>23H_A4!R0,R,,SQ%0/1"#(@T`$]%:``4;V +MW^2`"P$"!`@0($"`D$71Y'X!DV"\H_]4/S#E"50?_N23HV`!#L]4P"7@8*A` +MN.23H_KDDZ/XY).CR,6"R,K%@\KPH\C%@LC*Q8/*W^G>YX"^`$&""0!!@@H` +M08(7`%GB7"1>75^AP.#`\,"#P(+`T'70`,``P`'``L`#P`3`!<`&P`>0`<1T +MYO!T1:/PT35TY@20`<3P=$6C\-`'T`;0!=`$T`/0`M`!T`#0T-""T(/0\-#@ +M,I``5.!5-?4YH^!5-O4ZH^!5-_4[H^!5./4\K3E_5!(R'JTZ?U42,AZM.W]6 +M$C(>K3Q_5Q(R'E.1[R+`X,#PP(/`@L#0==``P`#``<`"P`/`!,`%P`;`!Y`! +MQ'1O\'1&H_`2;'CE03#D!'\"D2?E03#F`Q)LU>5#,.`#$E'"Y4,PX0,230SE +M0S#B`Q),P>5#,.,#$FSBY4,PY`,2;03E0S#E`Q)M,^5#,.8"\0_E1##A`Q)1 +M?W1O!)`!Q/!T1J/PT`?0!M`%T`30`]`"T`'0`-#0T(+0@]#PT.`RD(#>X+0! +M$Y"!)^!@#9"!*^!4_O!4!W`"\2HBD($?X)"!*3#@!>#_`G2/X/]]`=,0KP'# +MP-"0@A/M\)"!*N"0@A3PD($DX/[$$Q-4`S#@`P)(H.[$$Q,35`$PX`,"2*"0 +M@A3@_F]P`P)(H.]P`P)(%R3^<`,"2%`D_F!1)/QP`P)(BR3\8`,"2*#NM`X# +M$DE>D((4X'`%?P$229.0@A3@M`8#$DDTD((4X+0$#Y""$^#_8`42]D`6`"`:`1^@&@D((4X+0.!Q&EOP$" +M,5Z0@A3@M`8",320@A3@M`P'$:6_`0(1^I""%.!D!'!<$G+U[V0!<%0QOH!0 +MD((4X+0.!Q&EOP$",5Z0@A3@M`8",320@A3@M`P'$:6_`0(1^I""%.!P!'\! +M,9.0@A3@M`0:$G.[@!60@A3@M`P.D($EX/\3$U0_,.`",;'0T)*O(M&K[V0! +M8`B0`;AT`?"`/9"!).#_$Q,35!\PX`B0`;AT`O"`*._$5`\PX`B0`;AT!/"` +M&9"!*>#3E`1`")`!N'0(\(`(D`&XY/!_`2*0`;ET`O!_`"*0@-[@9`%P,9"! +M)>!4_?"0!2)T;_!_`?$-OP$2D($DX$2`\)"!*G0.\)"!(_`BD`&Y=`'PD`&X +M!/`BD($EX)`&!"#@#.!$0/"0@2IT!/"`#N!4?_"0@2IT#/"0@2/PD`4BY/`B +MD($EX,,3(.`(D($J=`SP@!Z0!@3@1$#PX$2`\)"!*G0$\)`%)^!$@/"0@2-T +M!/"0!2+D\"*0@A7O\!)499""%>!@!9`%(N3PD($J=`3PD($C\"(QXY"!*G0( +M\)"!(_`BD`4B=/_P\3J0`3=T`O#]?P-15S'CY)"!*O"0@2/P(I`%(G3_\/$Z +MD(6[$B#:S/``P'^,?@@2+J*0A;L2(-H````4?W!^#A(NHI"!^1(@V@````#D +M_?\251Q_?'X($BU<[$2`_)""!1(@SI""!1)$V9"%NQ(@SG]\?@@2+J*0`0!T +M/_"CX%3]\)`%4^!$(/`BD`$T=$#P_>3_=#TO^.9-_O9T,"_U@N0T`?6#[O`B +MTQ"O`D($?X/\PX&V0@0@1_@_R#@`F'GD('+=#'P[Q,35#\PX`M13I"! +MR^!$"/"`!GU`Y/^1)I"!'^#]$Q,35!\PX`>0@/"C=`+P?7C_45=] +M`G\#45>0!@K@1`?PD($RH^"0!5CPD(#>X+0!%9"!)>!4^_"0@2K@(.(.?0%_ +M!`)'/9"!)>!$!/`BD($?X/\PX`B0@2/@9`)@.I"!)^!P!.\PX`J0@2K@9`)@ +M*+&#D($EX!,3$U0?,.`4D($MX/^CX&]P"O'-D1R0@2[@%/"0`>;@!/`BD($? +MX##@!I"!(70!\)"!)^!@19"!)>#_$Q,35!\PX!*0`3O@,.0+D1R0@2W@%)`% +M<_"0@@OD=?`!$D2IPY""#."4@)"""^!D@)2`0`N0`9C@5/[PX$0!\!)U^-'6 +MD($_X##@#.3U':/Q^Y`!5W0%\)`!ON`$\"*0@-[@9`%@`L$CD($GX'`"P2.0 +M@2;@Q%0/9`%P(I`&J^"0@2[PD`:JX)"!+?"CX/]P")"!+>#^_X``D($N[_"0 +M@27@1`3PY)"!,/"0@3*CX)`%6/"0`5?D\)`!/'0"\)"!*^!4_?!4[_"0@2;@ +M_\14#R3]4`*`#Y"!'^`PX`42;?*``Q)NR9"!)>`3$Q-4'S#@#I"!+>#_H^"U +M!P3QS9$BD($?X,,3(.`'D($EX$0$\"+1J^]P`M$\(I"!)^!D`7!FD($FX%0/ +M8%&0@2K@<`/_,9.0@2K@9`Q@`Q)F)I`!6^3PD`$\=`3PT:OO9`%@..3U'9"! +M.N##$U1_]1[D^_U_6'X!$E`%D`%;=`7PD`:2=`'PD($DX$0(\"*0@2K@<`=] +M`7\$$D<](I`$&N#T8`-_`"*0!!O@5`=D!W\!8`)_`"(24&"0@2W@%)`%<_!] +M`G\"45>0@4+@,.`MD(#>X+0!)I""%^`$\."T"@N0@43@!/#DD((7\)"!1.#_ +MD(%#X+4'!>2C\/$+(N3_CU.0!!W@8!F0!2+@]59T__#Q.K\!`Q)T^Y`%(N56 +M\(`#$G3[D`0?="#P?P$BY)""#_"C\)`%^.!P#Z/@<`NCX'`'H^!P`W\!(M.0 +M@A#@E.B0@@_@E`-`"I`!P.!$(/!_`")_,GX`$C*JD((/Y'7P`1)$J8"_=!\M +M]8+D-/SU@^!4/_#O8!UT(2WU@N0T_/6#X$00\'0?+?6"Y#3\]8/@1(#P(G0A +M+?6"Y#3\]8/@5._P=!\M]8+D-/SU@^!$0/`B[Q20!7/PD`$_=!#P_7\#=$4O +M^.9-_O9T."_U@N0T`?6#[O`BX$0"\.3U'9"!.>#U'N3[_7]4?@&.&8\:Y1Y4 +M!\0S5."%&8.%&H+PY1U4!\0S5.#_Y1X3$Q-4'T^C\.M4!\0S5.#_Y1T3$Q-4 +M'T^%&H*%&8.CH_"]`0R%&H*.@Z.CHW0#\"*%&H*%&8.CHZ-T`?`BY)"!3?"0 +M@2?@8%B0@-[@9`%P4)"!303PY)"!+O"0@1_@,.`5D($CX+0"!>20@4WP,7/O +M<`20@4WPD(%-X&`DD($KX$00\.3U'9"!+Q)/^Y`!5W0%\)"!*N`@X@=]`7\$ +M$D<](N20@4SPD($GX'`"(7*0@-[@9`%@`B%RD($FX/_$5`]@(B3^8`,$<"&0 +M@2[@%/#@_V`&D($PX&`1[W`(D($MX*/P@`"0@4QT`?"0@1_@,.`5D($CX+0" +M!>20@4SP,7/O<`20@4SPD(%,X&!#D($KX$00\)"!,.!@`[0!">3U'9"!,."` +M#>3U'9"!,.!U\`.D)/[_D($OX"\23_R0`5=T!?"0@2K@(.('?0%_!!)'/2*0 +M!4/@?P`PYP)_`2*0@2?@<`>0@1_@,.`1D($?X##@!S%SOP$%05L23CPBTQ"O +M`199`% +M(N3P(I"!'^#_,.`]D($CX'X`M`("?@&0@2+@?0"T!`)]`>U.<"/OPQ,PX`(A +MGE%%D($CX+0(!N3]?PR`"9"!(^!P!OU_!!)'/2*0@1[@M`$/D($CX&0"8`=] +M`7\"$D<]D($GX&0"8!20@2;@5`]@#!).J^]P!OU_#!)'/2*0@1_@_S#@/Y"! +M(^!^`+0"`GX!D($BX'T`M`0"?0'M3G`E[\,3,.`"(9X2=*R0@2/@M`P&Y/U_ +M"(`*D($CX+0$!N3]_Q)'/2+3$*\!P\#0D('+$D4?$A^D_Y"!'O"_`1*0@ +MT-"2KR+3$*\!P\#0D($BX)""%O!O<`*!!.\48#X48&(4<`)AN!1P`F'?)`1@ +M`H$$D((6X/^T!`2108$$[[0"!)%0@020@A;@_[0#!)%4@03O9`%@`H$$D4.! +M!)""%N#_M`0$D?.!!.^T`@216($$D((6X/^T`P21Z($$[W!]D2N`>9""%N"T +M!`42=&"`;9""%N"T`021(8!BD((6X+0#!1)T<8!6D((6X'!0D1^`3)""%N#_ +MM`0%$G1,@#_OM`$$D32`-^^T`@21WX`OD((6X'`ID3*`)9""%N#_M`,%$G1[ +M@!COM`$$D0N`$.^T`@2Q!H`(D((6X'`"D0G0T)*O(I$KD`4B=&_PD`4GX%2_ +M\)"!(G0$\"*1*Q))W9"!(G0"\"*0@2)T`?`BD2N0!2)T__"0@2)T`_`BD?.0 +M!2?@5+_PY)"!(O`BD5B`[Y'H@.N199`%(N3PD($B!/`BTQ"O`!$ +M`O"0`0!T__"0!K=T"?"0!K1TAO!_?'X($BU<[%1__)""`1(@SI""`1)$V9"% +MNQ(@SG]\?@@2+J*0A;L2(-K,P`#`?XQ^"!(NHI"%NQ(@V@#``!1_<'X.$BZB +MD('Y$B#:``,^8.3]_[$42(,[0!=`'$F#UT-"2KR*0@<@211_O$D4H57$`57H!58," +M58L#590$59P@5:0A5:TC5;4D5;XE5<#^D($DX%3]3O#O5`_$5/#_ +MD($FX%0/3_"0``02'[V0@2GPT<:0`;ET`?"0`;CPD($GX)`!NO"0@2G@D`&[ +M\)"!)N!4#Y`!OO`BD('+$D4?$G*SD($GX/\23#Z0@2?@8!F0@5),.$#$F]YY4DPX@+QI>5),.,#$F^-Y4HPX`,2;\GE +M2C#D`Q)P(N5+,.$"47CE2S#@`C'_Y4LPXP+QX.5,,.$%?P,21"?E3##D`Q). +MQ.5,,.4#$G`XY4PPY@,2<,YT]P20`<3P=%:C\-`'T`;0!=`$T`/0`M`!T`#0 +MT-""T(/0\-#@,I"!)^!@-)`&DN`PX"/D]1V0@3K@PQ-4?_4>Y/O]?UA^`1$% +MD`%;=`7PD`:2=`'P(I"!).!4]_`21RHB(A(?I)"!,?`BD`'(Y/"C\*/P>P%Z +M@7E1?__^$BLGOP$)D(%1X&0#8`,B`:ODD(%6\)"!5N#_PY0"0`(!YL-T_I__ +MY)0`_GL!>H%Y4A(K)^]D`7!WD(%2X/]4P/Y@!>]4#'`6D(%2X/]4,&!G[U0# +M8&*0@5-T`?"`!>20@5/PD(%3X)"!4G`6X/_N$Q-4/Y"!5/#O5`P3$U0_H_"` +M#>#^5#"0@53P[E0#H_"0@53@9#!P5*/@9`)P3I``]>!40)"!5_#@<$&C=`+P +M@!"0@5AT`?"`")"!5N`$\`$1D`'$=.GP=%>C\)"!6."0`K3A_4P(R'G4]$.3U/G4_!W5``I`!,.4]\*/E/O"CY3_PH^5` +M\")U10YU1@%#1A!U1P-U2&*0`3CE1?"CY4;PH^5'\*/E2/`BD`$PY/"C\*/P +MH_"0`3CPH_"C\*/P_7]0$C(>Y/U_41(R'N3]?U(2,A[D_7]3`C(>D`$T=/_P +MH_"C\*/PD`$\\*/PH_"C\/U_5!(R'GW_?U42,AY]_W]6$C(>??]_5P(R'I`` +M@.!$@/U_@!(R'I#]`.!4O_`25^E1=Q(R=U')45Y_`1)#%9"!070"\/\20Q60 +M@4'@!/!_`Q)#%9"!0>`$\#$!43^0`(#@1$#]?X`2,AYU(/]1:%'Y47_D_P)# +MGE%B46]1IW%/48I1E9"!1>!4_O"C=`/PH_#DH_"C\"+D]4TBY)"`WO`B=>@# +M=:B$(N20@-CPH_`BD`&4X$0!\"*0`>1T"_"C=`'P(I"!/^!4_O#DH_`BD(%" +MX%3^\%1_\*-T"O#DH_`BD($?X%3^\%3]\%3[\%3W\%3O\%3?\.2C\*/PH_"C +M=`SP(I`!`>!$!/"0`9QT?O"C=)+PHW2@\*-T)/"0`9MT2?"0`9ITX/"0`9GD +M\)`!F`3P(N20@5'PH_"0`9C@?P`PY`)_`>]D`6`^PY"!4N"4B)"!4>"4$T`( +MD`'!X$00\"*0@5'D=?`!$D2I?Q1^`!(RJM.0@5+@E#*0@5'@E`!`N9`!QN`P +MX[(BY)"!)_"C\)"!)N!4#_!4\/"0@23@5/WP5/?P5._PD($M=`'PH_"0@23@ +M5/OPH^!4^_#DD($P\)"!+W0'\)"!,N3PHW0"\.20@2OPD($DX%3^\)"!*70, +M\)"!).!4W_"0@2IT#/"0@23@5+_P5'_PH^!4_O!4_?!4]_"0@302(-H````` +MD(`\X+0!")"!,729\(`2D(`\X)"!,;0#!720\(`#=$#PD($X=`'PHW0%\*/@ +M5`%$*/"C=`7PY*/PH^!4_?!4^_!4]_!4[_!4W_!4O_#DH_`BY)"!6?"0@5G@ +M9`'P)"20`<3P=%RC\)"!*N#_D($IX&]@`Q)'*M$(OP$"D5^Q\A(RGK\!`K%G +M$D)-@,K3$*\!P\#0D($DX##@))"!'^#_,.`:PQ,PX`>Q^[\!$H`*D($CX/]@ +M`[0(!I&6@`*1IM#0DJ\BTQ"O`7@!/`BL?.0``C@5._]?P@2,A[D_X]0Y)"!6O"C\)`!">!_`##G`G\![V50 +M8#[#D(%;X)2(D(%:X)030`B0`<#@1!#P(I"!6N1U\`$21*E_%'X`$C*JTY"! +M6^"4,I"!6N"4`$"YD`'&X##@LB*0@3'@_7^3$C(>D($HX&`2D`$OX##G!700 +M\(`&D`$O=)#PD``(X$00_7\($C(>?P&1RI``D.!$`?U_D!(R'G\4?@`",JK3 +M$*\!P\#0$BVGY/52$C*>[V!S8U(!Y5(D9Y`!Q/!T7:/PD`"(X/50]5%4#V#? +MY5`PX`L@Y`,2*<534>Z`/^50,.$6(.4.$A&][W`#0U$@D`$&Y/!34?V`).50 +M,.(+(.8#$F<&4U'[@!3E4##C#R#G"1)A;N]P`T-1@%-1]ZU1?X@2,AZ`A]#0 +MDJ\B(I``D.`@X/DBD($BX&0"?P%@`G\`(G\"D(%!X/[OPYY0&.\EX"2!^.8P +MY`N0`;AT"/"C\'\`(@^`WG\!(I`"A^!@")`!N'0!\(`7D`*&X"#A")`!N'0$ +M\(`(D`&XY/!_`2*0`;ET"/!_`"+D^_K]?P$21$Z0@;WO\&#PT7&`[-,0KP'# +MP-"0`!U\`20`=`210K@D(&_\'43`744@745OW46`7L!>H%YP!(K[9"" +M">!U\`20`=$210K@D('!\)""">!U\`20`=(210K@D('"\)""">!U\`20`=,2 +M10K@D('#\)""">!U\`20`?`210K@D('$\)""">!U\`20`?$210K@D('%\)"" +M">!U\`20`?(210K@D('&\)""">!U\`20`?,210K@D(''\)"!ON#_D(()X/YT +M`:@&"(`"PS/8_/1?D(&^\)""">#_=`&H!PB``L,SV/R0`<$253^0@@G@!/#@5`/PP8*0`<#@1`+PT-"2KR+D^_K]?P$21$Z0@=#O\&#P +M$FP9@.N0@=3O\*/M\*,2(-H`````Y)"!XO!_)'X($BU#_Y/S] +M_G@7$B"[J`2I!:H&JP>0@=X21-GM5'_][%2`_!)$S.Q$@/R0@=X2(,Z0@=H2 +M1-GL5'_\D(6[$B#.?R1^"!(NHI"!U.!U\`BD)&+U@N0TA_6#X/ZCX/_`!L`' +MD('>$D39D(6[$B#.T`?0!A(NHI"!VA)$V>Q$@/R0A;L2(,Y_)'X($BZBD('4 +MX'`$?R"`"9"!U."T`19_*'X($BU<>`@2(*CO5`'_Y)"!XN_PD('BX)"!U&`. +MX'7P"*0D9O6"Y#2'@`S@=?`(I"1D]8+D-(?U@^#^H^#_$BU<[50/_>3\D('6 +M$B#.D('6`D39D('C[_"K!9"!Z1(@V@````"O`^3\_?YX%!(@NZ@$J06J!JL' +MD('E$D39[50/_>3\$D3,[%0/_)"!Z1(@SI"!X^!U\`BD)&#U@N0TA_6#X/ZC +MX/_`!L`'D('I$D39D(6[$B#.T`?0!@(NHM,0KP'#P-`27[;0T)*O(G@0=`'R +MD`()X'@`\@AT(/(8XO\PX`4(XB2`\N_#$Y#]$/!X`>(D`/6"Y#3\]8/@>`/R +M9`1@#>+_9`A@!^]D#&`"8=[D>`+R>`/B_QCBPY]0+>+]&.(MD(%:\.#_)`#U +M@N0T_/6#X/YT!"WX[O+OM/\&D/T0X`3P>`+B!/*`R7@$XG@2\O]X!>)X$?)X +M!N)X$_)X!^)X%/)X".)X,_)X">)X-/)X"N)X-?)X"^)X-O)X#.)X-_)X#>)X +M./)X#N)X.?)X#^)X.O+D>!7R[R3X8'4D_&!L)`A@`F'`>!'BM`$%$BG%8<5X +M$>*T`@42$;UAQ7@1XK0#!/$&8<5X$>*T$!=X%.+^&.+][?]X%N[R_@CO\O\2 +M,JIAQ7@1XK01%W@4XOX8XOWM_W@6[O+^"._R_Q(R!F'%>!'B]&`"8<48\F'% +M>!5T`?)X$>)D!V`"8:IX-.+_Y/S]_G@($B"[P`2I!:H&JP=X,^+_Y/S]_M`` +M$D3,P`3`!<`&P`=X->+_Y/S]_G@0$B"[T`/0`M`!T``21,QX&!)$_G@5XG`" +M89,8XO\8XOTQ7W@<$D3^>#CB_^3\_?YX"!(@N\`$J06J!JL'>#?B_^3\_?[0 +M`!)$S,`$P`7`!L`'>#GB_^3\_?YX$!(@N]`#T`+0`=``$D3,>"`21/YX(!)$ +MY1(@FW@<$D3Q$D2_P`3`!<`&P`=X&!)$Y7@@$D3Q$D2_T`/0`M`!T``21,QX +M&!)$_G@8$D3ED('Y$B#.>!/B_0CB_Q)5'(`;>!/B_PCB_7@1XOMX%>*0@;SP +M<>&`!7@0=`+R>!#B_\.4`E`0[V`*>`+B_QCB+_(AD'\!(G\`(JP'[:T$>"3R +M[0CRZ[0$!W@G=`'R@`[K>">T!05T`O*``W0$\M-X)>*4_QCBE`!08^1X)O)X +M)^+_&.+^PY]``J%_=#,N^.)X*/*0@;S@8"UT-R[XXG@R\N[_>"7B+_\8XC0` +MCX+U@^!X*?)X,N+_]/YX*>)>_ACB_>]=3O)X)`CB_PCB+_]X*.+]$C(>>";B +M!/*`H=-X)>*4_QCBE`=0:>1X)O)X)^+_&.+^PY]``J%_=#,N^.)X*/*0@;S@ +M8"UX)N+__1CB+?T8XC0`C8+U@^!X*?)T-R_XXG@R\N+_]/YX*>)>_ACB_>]= +M3O)X*.+_>";B_1CB+?T8XC0`C8+U@^_P>";B!/*`FY"!O.!@#W@DXOX(XO\2 +M+5QX+A)$_N1X)O)X)^+_&.+^PY]0770S+OCB>"CRD(&\X&`K>"X21.5X)N+[ +M=?`(I/GX$B"H>"GO\G0W*_CB>#+RXO[T7_]X*.+][EU/\G@HXO]X)N+]PW0# +MG?WDE`#\>_YT*BWY=(`\^N\2'^KB!/*`F'@J$D3ED(6[$B#.>"3B_@CB_Q(N +MHB(BD('+$D4?D``!$A^]__X2'Z3]PQ,PX!*0@4#B0@_PH^WPK0.L`N20@?7PH_"0`<1T.?!T9J/P[%0__)`!0.WP +MK@3NH_"0@>W@)(%@-"3:8!PD/'!!D('NX,0S,S-4@)"!\O"C=&GPHW2`\(`L +MD('NX%0!D('R\*-TI?"C=`'P@!B0@>[@Q%00D('R\*-T?_"C=!#P@`-_`"*0 +M@?/@D`$&\)"!\N!@#I`!0O"0@?'@D`%#\(`-D`%#Y/"0@?+@D`%"\)"!].#_ +MD`%"X%__D('RX&]@[G0Y!)`!Q/!T9J/PD`%#Y/!_`2+DD(%J\)"'7^"0@6GP +MY)"!=O"0@6;PD(%FX/_#E$!0%71Y+_6"Y#2!]8-T__"0@6;@!/"`X>20@6;P +MD(%IX/^0@6;@_L.?0`,":!)TWR[YY#2&=1,!]12)%746"GL!>H%Y6Q(K[9"! +M7.#_$B\G[P20@7;PD(%;X/^CX/T2,>KO),B0@7CP=?`(I/"0@5S@5`^0@7?P +MY)"!9?"0@6?PD(%GX/_#E`105Y"!=^#^J`<(@`+#$]C\(.`^D(%GX"7@_Y"! +M>.`O)'GYY#2!^GL!P`/``9"!9>!U\`*D)%WY=($U\(L3]12)%746`M`!T`,2 +M*^V0@67@!/"0@6?@!/"`GY"!=N#_D(%FX"_P`F=`Y)"!:O"0@6K@PY1`0`)! +MK^#_)'GU@N0T@?6#X)"!;/#@_E3PQ%0/_9"!:_#N5`_^H_!T>B_U@N0T@?6# +MX)"!;?#\[O[L^^O_D(%R[O"C[_#M$D4H:(L`:,(!:7,":J`#:8X$::\%::\& +M::\'::\(:C,):FD*``!JKY"!:N#])'SU@N0T@?6#X/YT>RWU@N0T@?6#X/WM +M_Y"!=.[P_*/O\)"!;>#_$B^6D(%H=`+P0:"0@6K@)'SU@N0T@?6#X/_D_/W^ +M>`@2(+NH!*D%J@:K!Y"!:N`D>_6"Y#2!]8/@_^3\_?X21,S`!,`%P`;`!Y"! +M:N`D??6"Y#2!]8/@_^3\_?YX$!(@N]`#T`+0`=``$D3,P`3`!<`&P`>0@6K@ +M)'[U@N0T@?6#X/_D_/W^>!@2(+O0`]`"T`'0`!)$S)"!;A(@SI"!;A)$V9"% +MEA(@SI"!_6"Y#2!]8/@^^3_ +M$C#'@!F0@6W@_9"!:N`D>_6"Y#2!]8/@^^3_$C!JD(%H=`'P0:"0@6AT`O"0 +M@6K@)'SU@N0T@?6#X/_D_/W^>`@2(+NH!*D%J@:K!Y"!:N`D>_6"Y#2!]8/@ +M_^3\_?X21,S`!,`%P`;`!Y"!;.#_Y/S]_G@0$B"[T`/0`M`!T``21,R0@6X2 +M(,Z0@6O@)/O_P`>0@6X21-F0@?D2(,Z0@6W@_=`'$E4<@&V0@6AT`?"0@6K@ +M)'OYY#2!=1,!]12)%746`7O^>H!Y,Q(K[9"!;>#_D(%LX/WDD(&\\'L$@#20 +M@6AT!/"0@6K@)'OYY#2!=1,!]12)%746!'O^>H!Y,Q(K[9"!;>#_D(%LX/WD +MD(&\\'L&$F/AD(%HX"0"_Y"!:N`O\`$7(I`"">#]$A^D_J\%[2Z0@#WPD``! +M$A^]_^TOD(`^\)```A(?O?_M+Y"`/_"0``,2'[W_[2^0@$#PD``$$A^]_ZX% +M[2^0@$'P(I```A(?O?\PX"82'Z20@3CPD``!$A^]D($Y\.]4_O^CX%0!3_"0 +M``,2'[V0@3OP(I"!.'0!\*-T!?"CX%0!1"CPHW0%\"(2'Z20@3[PD($^X)`! +MY_`B$A^DD(%*\)```1(?O9"!2_`BTQ"O`[PH^_PY*/PH_"0@?W@ +M_J/@]8*.@^!@+<.0@@#@E.B0@?_@E`-`"Y`!P.!$@/!_`(`5D('_Y'7P`1)$ +MJ7\*?@`2,JJ`Q7\!T-"2KR+3$*\!P\#0D('1$D4?D((*X/\$\)```>\2'_Q_ +MKWX!<6#O8#J0@=$211:+$XH4B160``X2'[TD`O46>P%Z`7F@$BOMD('1$D46 +MD``.$A^]D`&N\*-T__"0`P%QMG\![V`6D(#8 +MX`3PX'\`M`H"?P'O8`7DD(#8\-#0DJ\BCPTBCPXB(I`!-.!5/?5!H^!5/O5" +MH^!5/_5#H^!50/5$D`$TY4'PH^5"\*/E0_"CY43P(I`!/.!51?5)H^!51O5* +MH^!51_5+H^!52/5,D`$\Y4GPH^5*\*/E2_"CY4SP4Y'?(I"!'^`PX`7DH_"C +M\"*0@-[@9`%P&9"!)^!@$Y`!5^3PD`$\=`(23_20`5=T!?`BD(#>X&0!<":0 +M@2?@8""0`5?D\)`!/'0"\)"!).!4^_"0@2O@5/WP5`=P`Q)'*B*0@-[@M`$4 +MD($GX&`.D($FX%0/9`)@`H`#T7\BD`0=X'`3D(`^X/_D_;%ICDZ/3Y`$'W0@ +M\"+3$*\!P\#0D((.[?"0@@WO\.3]_/$W?`"M!Y""#>"0!"7PD((.X&`.=`\O +M]8+D-/SU@^!$@/"O!70(+_6"Y#3\]8/D\'0)+_6"Y#3\]8/@5/#P="$M]8+D +M-/SU@^!4]_"N!*\%T-"2KR*/3O%+OP$8D(!`X/]]`;%IK0>L!J].$D^"D`0? +M="#P(I`&J>"0@4SPX/U4P'`)D($KX%3^\(!R[3#F2Y"!)^!D`G`JD($DX/_# +M$R#@"9"!*^!$`?"`*)"!)N!4#V0!<"V0@2O@1`3P?P&QTH`@D($KX$0!\)"! +M)N!4#V0"8`2Q3X`+T7^`!Y"!*^!4_O"0@4S@D($K,.<1$D_QD`%7=`7PD($D +MX$0$\"+@5/WP(I`!7^3PD`$\=`CPY/4=D($ZX,,35'_U'N3[_7]0@2O@5/[PD(%,X)"!*S#G$1)/\9`!5W0% +M\)"!).!$!/`BX%3]\"+D_N_#$_WO,.`"?H"0_1#M\*\&(M,0KP'#P-"0!!W@ +M8!J0!2+@5)!@!Y`!P.!$"/"0`<;@,.'D?P"``G\!T-"2KR*0@2?@8`,2<^&0 +M@3_@,.`#$DG=(I"!)^!@-9`&DN`PX23D]1V0@3K@PQ-4?_4>Y/O]?UQ^`1)0 +M!9`!7W0%\)`&DG0"\"*0@23@5._P$D_PD($D,.`&X$0!\(`$ +MX%3^\)"!3>`PYA&0`2_@,.<$Y/"`!I`!+W2`\)"!).`PX!J0@3+D\*-T!_"0 +M@3*CX)`%6/"0!.S@5-WP(I`$[.!$(O`BD(%*X&`/Y/"0!5/@1`'PD`7]X`3P +M(I"!).#_Q!,35`,PX"?O5+_PD`3@X)"!)3#@!N!$`?"`$.!4_O"0`;ET`?"0 +M`;AT!/`21RKD_Y"!1>`PX$B0@4G@_6!!=`%^`*@'"(`%PS/.,\[8^?^0!.#@ +M^^];8`;DD(%)\"*0@4?@TYU0$)`!QW00\!&^D(%%X%3^\"(23PN0@4G@!/`B +MD(`\X&0"8`>0!I#@1`'P(I"!).#_Q!,3$U0!,.`L[U1_\)`$X."0@24PX0;@ +M1`+P@`_@5/WPD`&Y=`'PD`&X!/"0@2?@8`,21RI_`0%NP^Z4`4`*#>T3D/T0 +M\.0O_R+#[I0!0"20_1'@;7`:D`$7X+4%#9`!Y'1W\)#]$>3P@`;M!)#]$?#D +M+_\BY)"!3O"C\*/PD`"#X)"!3O"0`(/@_I"!3N#_M08!(L.0@5#@E&20@4_@ +ME`!`#9`!P.!$0/"0@4[@_R*0@4_D=?`!$D2I@,)T12_XYO[M]%[^]G0X+_6" +MY#0!]8/N\"+3$*\!P\#0D((2[?"0@A'O\-.4!U!PX/]T`:@'"(`"PS/8_/3_ +MD`!'X%_]?T<2,AZ0@A'@_W0!J`<(@`+#,]C\_Y``1N!/_7]&$C(>D((2X&`8 +MD((1X/]T`:@'"(`"PS/8_/^0`$7@3X`7D((1X/]T`:@'"(`"PS/8_/3_D`!% +MX%_]?T6`?I""$>`D^/#@)`3_=`&H!PB``L,SV/ST_Y``0^!?_7]#$C(>D((1 +MX/]T`:@'"(`"PS/8_/^0`$/@3_U_0Q(R'I""$N!@'9""$>`D!/]T`:@'"(`" +MPS/8_/^0`$+@3_U_0H`"C\)"!)>!$"/`B$DZK[V0!8`B0`;AT`?"`9Y"! +M*^#_5`-@")`!N'0"\(!6D($IX/[DPYY0")`!N'0$\(!$[S#B")`!N'0(\(`X +MD($KX##D")`!N'00\(`ID($EX!,35#\@X`B0`;AT(/"`%I"!/N!@")`!N'2` +M\(`(D`&XY/!_`2*0`;ET!/!_`"+O8$*0@-[@9`%P.I"!)>!4_O"0!2)T#_"0 +M!@3@5+_PY/\23PV_`1*0@23@1$#PD($J=`;PD($C\"*0`;ET`?"0`;AT"/`B +MD`4B=&_PD`4GX%2_\)"!*G0"\)"!(_`B$E1ED($J=`SPD($C\"*0@23@_Q,3 +M5#\PX!'O5/OPD($KX%3]\%0'<$*`/9"!,.`$\)"!*^!4[_"0@3#@_[0!`H`$ +M[[0"!I`%6.`$\)"!..#_D($PX-.?0`^0@-[@M`$+D($EX%3[\"(21RHB(I`% +M*^!_`##G`G\!(I`%(G3_\)`%)^!$0/"0@2)T`_`BD`4GX$1`\!))W9"!(G0" +M\"(22>.0@2)T`O`BD`4B=&_PD`4GX%2_\)"!(G0$\"*N!Q)1<[\!$I"!(^!D +M`F`*KP9]`1)'/7\!(G\`(I`!5^!@2.3PD`$\=`+PD($DX/\3$U0_,.`,[U3[ +M\)"!*^!4_?`BD($PX`3PD($KX%3O\)"!..#_D($PX-.?0`Z0@-[@M`$'D($E +MX%3[\"*0@#_@_WT!$FUICE2/5:U5K%2O4Q)/@J]5KE20!(#@5`_]K`=T$2SU +M@N0T_/6#X$0!\'01+/6"Y#3\]8/@5/OPK`=T%BSU@N0T_/6#X$3Z\'05+/6" +MY#3\]8/@1!_PK`=T!BSU@N0T_/6#X$0/\)`$4^3PD`12\)`$473_\)`$4'3] +M\'04+/6"Y#3\]8/@5,!-_704+_6"Y#3\]8/M\"*K!ZH&[2O[Y#KZPY"`V^"; +MD(#:X)I0$Z/@)`'_D(#:X#0`_L/KG_OJGOKJD/T1\*\#=``O]8+D-/OU@^#_ +M(A(?I/]4`?Z0@4+@5/Y.\._#$S#@"I```1(?O9"!0_`BD(%%X##@+9"!2.`$ +L\.#_D(%&X+4''I`&DN!4''`+$D\+D(%)X`3P@`:0!I)T'/#DD(%(\"(`NXX` +` +end Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Fri May 23 06:35:45 2014 (r266577) +++ stable/10/sys/dev/usb/usbdevs Fri May 23 06:47:47 2014 (r266578) @@ -3677,6 +3677,7 @@ product RATOC REXUSB60F 0xb020 USB seri /* Green House and CompUSA OEM this part */ product REALTEK DUMMY 0x0000 Dummy product product REALTEK USB20CRW 0x0158 USB20CRW Card Reader +product REALTEK RTL8188ETV 0x0179 RTL8188ETV product REALTEK RTL8188CTV 0x018a RTL8188CTV product REALTEK USBKR100 0x8150 USBKR100 USB Ethernet product REALTEK RTL8188CE_0 0x8170 RTL8188CE Modified: stable/10/sys/dev/usb/wlan/if_urtwn.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_urtwn.c Fri May 23 06:35:45 2014 (r266577) +++ stable/10/sys/dev/usb/wlan/if_urtwn.c Fri May 23 06:47:47 2014 (r266578) @@ -2,6 +2,7 @@ /*- * Copyright (c) 2010 Damien Bergamini + * Copyright (c) 2014 Kevin Lo * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -20,7 +21,7 @@ __FBSDID("$FreeBSD$"); /* - * Driver for Realtek RTL8188CE-VAU/RTL8188CUS/RTL8188RU/RTL8192CU. + * Driver for Realtek RTL8188CE-VAU/RTL8188CUS/RTL8188EU/RTL8188RU/RTL8192CU. */ #include @@ -87,11 +88,13 @@ SYSCTL_INT(_hw_usb_urtwn, OID_AUTO, debu /* various supported device vendors/products */ static const STRUCT_USB_HOST_ID urtwn_devs[] = { #define URTWN_DEV(v,p) { USB_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p) } +#define URTWN_RTL8188E_DEV(v,p) \ + { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, URTWN_RTL8188E) } +#define URTWN_RTL8188E 1 URTWN_DEV(ABOCOM, RTL8188CU_1), URTWN_DEV(ABOCOM, RTL8188CU_2), URTWN_DEV(ABOCOM, RTL8192CU), URTWN_DEV(ASUS, RTL8192CU), - URTWN_DEV(ASUS, USBN10NANO), URTWN_DEV(AZUREWAVE, RTL8188CE_1), URTWN_DEV(AZUREWAVE, RTL8188CE_2), URTWN_DEV(AZUREWAVE, RTL8188CU), @@ -139,12 +142,17 @@ static const STRUCT_USB_HOST_ID urtwn_de URTWN_DEV(REALTEK, RTL8191CU), URTWN_DEV(REALTEK, RTL8192CE), URTWN_DEV(REALTEK, RTL8192CU), + URTWN_DEV(REALTEK, RTL8188CU_0), URTWN_DEV(SITECOMEU, RTL8188CU_1), URTWN_DEV(SITECOMEU, RTL8188CU_2), URTWN_DEV(SITECOMEU, RTL8192CU), URTWN_DEV(TRENDNET, RTL8188CU), URTWN_DEV(TRENDNET, RTL8192CU), URTWN_DEV(ZYXEL, RTL8192CU), + /* URTWN_RTL8188E */ + URTWN_RTL8188E_DEV(REALTEK, RTL8188ETV), + URTWN_RTL8188E_DEV(REALTEK, RTL8188EU), +#undef URTWN_RTL8188E_DEV #undef URTWN_DEV }; @@ -189,15 +197,19 @@ static uint16_t urtwn_read_2(struct urt static uint32_t urtwn_read_4(struct urtwn_softc *, uint16_t); static int urtwn_fw_cmd(struct urtwn_softc *, uint8_t, const void *, int); -static void urtwn_rf_write(struct urtwn_softc *, int, uint8_t, - uint32_t); +static void urtwn_r92c_rf_write(struct urtwn_softc *, int, + uint8_t, uint32_t); +static void urtwn_r88e_rf_write(struct urtwn_softc *, int, + uint8_t, uint32_t); static uint32_t urtwn_rf_read(struct urtwn_softc *, int, uint8_t); static int urtwn_llt_write(struct urtwn_softc *, uint32_t, uint32_t); static uint8_t urtwn_efuse_read_1(struct urtwn_softc *, uint16_t); static void urtwn_efuse_read(struct urtwn_softc *); +static void urtwn_efuse_switch_power(struct urtwn_softc *); static int urtwn_read_chipid(struct urtwn_softc *); static void urtwn_read_rom(struct urtwn_softc *); +static void urtwn_r88e_read_rom(struct urtwn_softc *); static int urtwn_ra_init(struct urtwn_softc *); static void urtwn_tsf_sync_enable(struct urtwn_softc *); static void urtwn_set_led(struct urtwn_softc *, int, int); @@ -206,6 +218,7 @@ static int urtwn_newstate(struct ieee80 static void urtwn_watchdog(void *); static void urtwn_update_avgrssi(struct urtwn_softc *, int, int8_t); static int8_t urtwn_get_rssi(struct urtwn_softc *, int, void *); +static int8_t urtwn_r88e_get_rssi(struct urtwn_softc *, int, void *); static int urtwn_tx_start(struct urtwn_softc *, struct ieee80211_node *, struct mbuf *, struct urtwn_data *); @@ -213,13 +226,16 @@ static void urtwn_start(struct ifnet *) static void urtwn_start_locked(struct ifnet *, struct urtwn_softc *); static int urtwn_ioctl(struct ifnet *, u_long, caddr_t); -static int urtwn_power_on(struct urtwn_softc *); +static int urtwn_r92c_power_on(struct urtwn_softc *); +static int urtwn_r88e_power_on(struct urtwn_softc *); static int urtwn_llt_init(struct urtwn_softc *); static void urtwn_fw_reset(struct urtwn_softc *); +static void urtwn_r88e_fw_reset(struct urtwn_softc *); static int urtwn_fw_loadpage(struct urtwn_softc *, int, const uint8_t *, int); static int urtwn_load_firmware(struct urtwn_softc *); -static int urtwn_dma_init(struct urtwn_softc *); +static int urtwn_r92c_dma_init(struct urtwn_softc *); +static int urtwn_r88e_dma_init(struct urtwn_softc *); static void urtwn_mac_init(struct urtwn_softc *); static void urtwn_bb_init(struct urtwn_softc *); static void urtwn_rf_init(struct urtwn_softc *); @@ -232,6 +248,9 @@ static void urtwn_write_txpower(struct static void urtwn_get_txpower(struct urtwn_softc *, int, struct ieee80211_channel *, struct ieee80211_channel *, uint16_t[]); +static void urtwn_r88e_get_txpower(struct urtwn_softc *, int, + struct ieee80211_channel *, + struct ieee80211_channel *, uint16_t[]); static void urtwn_set_txpower(struct urtwn_softc *, struct ieee80211_channel *, struct ieee80211_channel *); @@ -251,6 +270,7 @@ static void urtwn_stop_locked(struct if static void urtwn_abort_xfers(struct urtwn_softc *); static int urtwn_raw_xmit(struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *); +static void urtwn_ms_delay(struct urtwn_softc *); /* Aliases. */ #define urtwn_bb_write urtwn_write_4 @@ -350,6 +370,8 @@ urtwn_attach(device_t self) device_set_usb_desc(self); sc->sc_udev = uaa->device; sc->sc_dev = self; + if (USB_GET_DRIVER_INFO(uaa) == URTWN_RTL8188E) + sc->chip |= URTWN_CHIP_88E; mtx_init(&sc->sc_mtx, device_get_nameunit(self), MTX_NETWORK_LOCK, MTX_DEF); @@ -381,10 +403,15 @@ urtwn_attach(device_t self) sc->ntxchains = 1; sc->nrxchains = 1; } - urtwn_read_rom(sc); + + if (sc->chip & URTWN_CHIP_88E) + urtwn_r88e_read_rom(sc); + else + urtwn_read_rom(sc); device_printf(sc->sc_dev, "MAC/BB RTL%s, RF 6052 %dT%dR\n", (sc->chip & URTWN_CHIP_92C) ? "8192CU" : + (sc->chip & URTWN_CHIP_88E) ? "8188EU" : (sc->board_type == R92C_BOARD_TYPE_HIGHPA) ? "8188RU" : (sc->board_type == R92C_BOARD_TYPE_MINICARD) ? "8188CE-VAU" : "8188CUS", sc->ntxchains, sc->nrxchains); @@ -636,7 +663,10 @@ urtwn_rx_frame(struct urtwn_softc *sc, u /* Get RSSI from PHY status descriptor if present. */ if (infosz != 0 && (rxdw0 & R92C_RXDW0_PHYST)) { - rssi = urtwn_get_rssi(sc, rate, &stat[1]); + if (sc->chip & URTWN_CHIP_88E) + rssi = urtwn_r88e_get_rssi(sc, rate, &stat[1]); + else + rssi = urtwn_get_rssi(sc, rate, &stat[1]); /* Update our average RSSI. */ urtwn_update_avgrssi(sc, rate, rssi); /* @@ -1030,7 +1060,7 @@ urtwn_fw_cmd(struct urtwn_softc *sc, uin for (ntries = 0; ntries < 100; ntries++) { if (!(urtwn_read_1(sc, R92C_HMETFR) & (1 << sc->fwcur))) break; - DELAY(1); + urtwn_ms_delay(sc); } if (ntries == 100) { device_printf(sc->sc_dev, @@ -1054,14 +1084,31 @@ urtwn_fw_cmd(struct urtwn_softc *sc, uin return (0); } -static void +static __inline void urtwn_rf_write(struct urtwn_softc *sc, int chain, uint8_t addr, uint32_t val) { + + sc->sc_rf_write(sc, chain, addr, val); +} + +static void +urtwn_r92c_rf_write(struct urtwn_softc *sc, int chain, uint8_t addr, + uint32_t val) +{ urtwn_bb_write(sc, R92C_LSSI_PARAM(chain), SM(R92C_LSSI_PARAM_ADDR, addr) | SM(R92C_LSSI_PARAM_DATA, val)); } +static void +urtwn_r88e_rf_write(struct urtwn_softc *sc, int chain, uint8_t addr, +uint32_t val) +{ + urtwn_bb_write(sc, R92C_LSSI_PARAM(chain), + SM(R88E_LSSI_PARAM_ADDR, addr) | + SM(R92C_LSSI_PARAM_DATA, val)); +} + static uint32_t urtwn_rf_read(struct urtwn_softc *sc, int chain, uint8_t addr) { @@ -1073,16 +1120,16 @@ urtwn_rf_read(struct urtwn_softc *sc, in urtwn_bb_write(sc, R92C_HSSI_PARAM2(0), reg[0] & ~R92C_HSSI_PARAM2_READ_EDGE); - DELAY(1000); + urtwn_ms_delay(sc); urtwn_bb_write(sc, R92C_HSSI_PARAM2(chain), RW(reg[chain], R92C_HSSI_PARAM2_READ_ADDR, addr) | R92C_HSSI_PARAM2_READ_EDGE); - DELAY(1000); + urtwn_ms_delay(sc); urtwn_bb_write(sc, R92C_HSSI_PARAM2(0), reg[0] | R92C_HSSI_PARAM2_READ_EDGE); - DELAY(1000); + urtwn_ms_delay(sc); if (urtwn_bb_read(sc, R92C_HSSI_PARAM1(chain)) & R92C_HSSI_PARAM1_PI) val = urtwn_bb_read(sc, R92C_HSPI_READBACK(chain)); @@ -1105,7 +1152,7 @@ urtwn_llt_write(struct urtwn_softc *sc, if (MS(urtwn_read_4(sc, R92C_LLT_INIT), R92C_LLT_INIT_OP) == R92C_LLT_INIT_OP_NO_ACTIVE) return (0); - DELAY(5); + urtwn_ms_delay(sc); } return (ETIMEDOUT); } @@ -1125,7 +1172,7 @@ urtwn_efuse_read_1(struct urtwn_softc *s reg = urtwn_read_4(sc, R92C_EFUSE_CTRL); if (reg & R92C_EFUSE_CTRL_VALID) return (MS(reg, R92C_EFUSE_CTRL_DATA)); - DELAY(5); + urtwn_ms_delay(sc); } device_printf(sc->sc_dev, "could not read efuse byte at address 0x%x\n", addr); @@ -1141,22 +1188,8 @@ urtwn_efuse_read(struct urtwn_softc *sc) uint8_t off, msk; int i; - reg = urtwn_read_2(sc, R92C_SYS_ISO_CTRL); - if (!(reg & R92C_SYS_ISO_CTRL_PWC_EV12V)) { - urtwn_write_2(sc, R92C_SYS_ISO_CTRL, - reg | R92C_SYS_ISO_CTRL_PWC_EV12V); - } - reg = urtwn_read_2(sc, R92C_SYS_FUNC_EN); - if (!(reg & R92C_SYS_FUNC_EN_ELDR)) { - urtwn_write_2(sc, R92C_SYS_FUNC_EN, - reg | R92C_SYS_FUNC_EN_ELDR); - } - reg = urtwn_read_2(sc, R92C_SYS_CLKR); - if ((reg & (R92C_SYS_CLKR_LOADER_EN | R92C_SYS_CLKR_ANA8M)) != - (R92C_SYS_CLKR_LOADER_EN | R92C_SYS_CLKR_ANA8M)) { - urtwn_write_2(sc, R92C_SYS_CLKR, - reg | R92C_SYS_CLKR_LOADER_EN | R92C_SYS_CLKR_ANA8M); - } + urtwn_efuse_switch_power(sc); + memset(&sc->rom, 0xff, sizeof(sc->rom)); while (addr < 512) { reg = urtwn_efuse_read_1(sc, addr); @@ -1186,12 +1219,37 @@ urtwn_efuse_read(struct urtwn_softc *sc) } #endif } +static void +urtwn_efuse_switch_power(struct urtwn_softc *sc) +{ + uint32_t reg; + + reg = urtwn_read_2(sc, R92C_SYS_ISO_CTRL); + if (!(reg & R92C_SYS_ISO_CTRL_PWC_EV12V)) { + urtwn_write_2(sc, R92C_SYS_ISO_CTRL, + reg | R92C_SYS_ISO_CTRL_PWC_EV12V); + } + reg = urtwn_read_2(sc, R92C_SYS_FUNC_EN); + if (!(reg & R92C_SYS_FUNC_EN_ELDR)) { + urtwn_write_2(sc, R92C_SYS_FUNC_EN, + reg | R92C_SYS_FUNC_EN_ELDR); + } + reg = urtwn_read_2(sc, R92C_SYS_CLKR); + if ((reg & (R92C_SYS_CLKR_LOADER_EN | R92C_SYS_CLKR_ANA8M)) != + (R92C_SYS_CLKR_LOADER_EN | R92C_SYS_CLKR_ANA8M)) { + urtwn_write_2(sc, R92C_SYS_CLKR, + reg | R92C_SYS_CLKR_LOADER_EN | R92C_SYS_CLKR_ANA8M); + } +} static int urtwn_read_chipid(struct urtwn_softc *sc) { uint32_t reg; + if (sc->chip & URTWN_CHIP_88E) + return (0); + reg = urtwn_read_4(sc, R92C_SYS_CFG); if (reg & R92C_SYS_CFG_TRP_VAUX_EN) return (EIO); @@ -1228,8 +1286,70 @@ urtwn_read_rom(struct urtwn_softc *sc) sc->regulatory = MS(rom->rf_opt1, R92C_ROM_RF1_REGULATORY); DPRINTF("regulatory type=%d\n", sc->regulatory); - IEEE80211_ADDR_COPY(sc->sc_bssid, rom->macaddr); + + sc->sc_rf_write = urtwn_r92c_rf_write; + sc->sc_power_on = urtwn_r92c_power_on; + sc->sc_dma_init = urtwn_r92c_dma_init; +} + +static void +urtwn_r88e_read_rom(struct urtwn_softc *sc) +{ + uint8_t *rom = sc->r88e_rom; + uint16_t addr = 0; + uint32_t reg; + uint8_t off, msk, tmp; + int i; + + off = 0; + urtwn_efuse_switch_power(sc); + + /* Read full ROM image. */ + memset(&sc->r88e_rom, 0xff, sizeof(sc->r88e_rom)); + while (addr < 1024) { + reg = urtwn_efuse_read_1(sc, addr); + if (reg == 0xff) + break; + addr++; + if ((reg & 0x1f) == 0x0f) { + tmp = (reg & 0xe0) >> 5; + reg = urtwn_efuse_read_1(sc, addr); + if ((reg & 0x0f) != 0x0f) + off = ((reg & 0xf0) >> 1) | tmp; + addr++; + } else + off = reg >> 4; + msk = reg & 0xf; + for (i = 0; i < 4; i++) { + if (msk & (1 << i)) + continue; + rom[off * 8 + i * 2 + 0] = + urtwn_efuse_read_1(sc, addr); + addr++; + rom[off * 8 + i * 2 + 1] = + urtwn_efuse_read_1(sc, addr); + addr++; + } + } + + addr = 0x10; + for (i = 0; i < 6; i++) + sc->cck_tx_pwr[i] = sc->r88e_rom[addr++]; + for (i = 0; i < 5; i++) + sc->ht40_tx_pwr[i] = sc->r88e_rom[addr++]; + sc->bw20_tx_pwr_diff = (sc->r88e_rom[addr] & 0xf0) >> 4; + if (sc->bw20_tx_pwr_diff & 0x08) + sc->bw20_tx_pwr_diff |= 0xf0; + sc->ofdm_tx_pwr_diff = (sc->r88e_rom[addr] & 0xf); + if (sc->ofdm_tx_pwr_diff & 0x08) + sc->ofdm_tx_pwr_diff |= 0xf0; + sc->regulatory = MS(sc->r88e_rom[0xc1], R92C_ROM_RF1_REGULATORY); + IEEE80211_ADDR_COPY(sc->sc_bssid, &sc->r88e_rom[0xd7]); + + sc->sc_rf_write = urtwn_r88e_rf_write; + sc->sc_power_on = urtwn_r88e_power_on; + sc->sc_dma_init = urtwn_r88e_dma_init; } /* @@ -1347,13 +1467,26 @@ static void urtwn_set_led(struct urtwn_softc *sc, int led, int on) { uint8_t reg; - + if (led == URTWN_LED_LINK) { - reg = urtwn_read_1(sc, R92C_LEDCFG0) & 0x70; - if (!on) - reg |= R92C_LEDCFG0_DIS; - urtwn_write_1(sc, R92C_LEDCFG0, reg); - sc->ledlink = on; /* Save LED state. */ + if (sc->chip & URTWN_CHIP_88E) { + reg = urtwn_read_1(sc, R92C_LEDCFG2) & 0xf0; + urtwn_write_1(sc, R92C_LEDCFG2, reg | 0x60); + if (!on) { + reg = urtwn_read_1(sc, R92C_LEDCFG2) & 0x90; + urtwn_write_1(sc, R92C_LEDCFG2, + reg | R92C_LEDCFG0_DIS); + urtwn_write_1(sc, R92C_MAC_PINMUX_CFG, + urtwn_read_1(sc, R92C_MAC_PINMUX_CFG) & + 0xfe); + } + } else { + reg = urtwn_read_1(sc, R92C_LEDCFG0) & 0x70; + if (!on) + reg |= R92C_LEDCFG0_DIS; + urtwn_write_1(sc, R92C_LEDCFG0, reg); + } + sc->ledlink = on; /* Save LED state. */ } } @@ -1419,11 +1552,12 @@ urtwn_newstate(struct ieee80211vap *vap, reg = RW(reg, R92C_OFDM0_AGCCORE1_GAIN, 0x20); urtwn_bb_write(sc, R92C_OFDM0_AGCCORE1(0), reg); - reg = urtwn_bb_read(sc, R92C_OFDM0_AGCCORE1(1)); - reg = RW(reg, R92C_OFDM0_AGCCORE1_GAIN, 0x20); - urtwn_bb_write(sc, R92C_OFDM0_AGCCORE1(1), reg); + if (!(sc->chip & URTWN_CHIP_88E)) { + reg = urtwn_bb_read(sc, R92C_OFDM0_AGCCORE1(1)); + reg = RW(reg, R92C_OFDM0_AGCCORE1_GAIN, 0x20); + urtwn_bb_write(sc, R92C_OFDM0_AGCCORE1(1), reg); + } } - /* Make link LED blink during scan. */ urtwn_set_led(sc, URTWN_LED_LINK, !sc->ledlink); @@ -1439,10 +1573,11 @@ urtwn_newstate(struct ieee80211vap *vap, reg = RW(reg, R92C_OFDM0_AGCCORE1_GAIN, 0x32); urtwn_bb_write(sc, R92C_OFDM0_AGCCORE1(0), reg); - reg = urtwn_bb_read(sc, R92C_OFDM0_AGCCORE1(1)); - reg = RW(reg, R92C_OFDM0_AGCCORE1_GAIN, 0x32); - urtwn_bb_write(sc, R92C_OFDM0_AGCCORE1(1), reg); - + if (!(sc->chip & URTWN_CHIP_88E)) { + reg = urtwn_bb_read(sc, R92C_OFDM0_AGCCORE1(1)); + reg = RW(reg, R92C_OFDM0_AGCCORE1_GAIN, 0x32); + urtwn_bb_write(sc, R92C_OFDM0_AGCCORE1(1), reg); + } urtwn_set_chan(sc, ic->ic_curchan, NULL); break; case IEEE80211_S_RUN: @@ -1495,7 +1630,11 @@ urtwn_newstate(struct ieee80211vap *vap, urtwn_write_1(sc, R92C_T2T_SIFS + 1, 10); /* Intialize rate adaptation. */ - urtwn_ra_init(sc); + if (sc->chip & URTWN_CHIP_88E) + ni->ni_txrate = + ni->ni_rates.rs_rates[ni->ni_rates.rs_nrates-1]; + else + urtwn_ra_init(sc); /* Turn link LED on. */ urtwn_set_led(sc, URTWN_LED_LINK, 1); @@ -1541,19 +1680,21 @@ urtwn_update_avgrssi(struct urtwn_softc pwdb = 100; else pwdb = 100 + rssi; - if (rate <= 3) { - /* CCK gain is smaller than OFDM/MCS gain. */ - pwdb += 6; - if (pwdb > 100) - pwdb = 100; - if (pwdb <= 14) - pwdb -= 4; - else if (pwdb <= 26) - pwdb -= 8; - else if (pwdb <= 34) - pwdb -= 6; - else if (pwdb <= 42) - pwdb -= 2; + if (!(sc->chip & URTWN_CHIP_88E)) { + if (rate <= 3) { + /* CCK gain is smaller than OFDM/MCS gain. */ + pwdb += 6; + if (pwdb > 100) + pwdb = 100; + if (pwdb <= 14) + pwdb -= 4; + else if (pwdb <= 26) + pwdb -= 8; + else if (pwdb <= 34) + pwdb -= 6; + else if (pwdb <= 42) + pwdb -= 2; + } } if (sc->avg_pwdb == -1) /* Init. */ sc->avg_pwdb = pwdb; @@ -1590,6 +1731,58 @@ urtwn_get_rssi(struct urtwn_softc *sc, i return (rssi); } +static int8_t +urtwn_r88e_get_rssi(struct urtwn_softc *sc, int rate, void *physt) +{ + struct r92c_rx_phystat *phy; + struct r88e_rx_cck *cck; + uint8_t cck_agc_rpt, lna_idx, vga_idx; + int8_t rssi; + + rssi = 0; + if (rate <= 3) { + cck = (struct r88e_rx_cck *)physt; + cck_agc_rpt = cck->agc_rpt; + lna_idx = (cck_agc_rpt & 0xe0) >> 5; + vga_idx = cck_agc_rpt & 0x1f; + switch (lna_idx) { + case 7: + if (vga_idx <= 27) + rssi = -100 + 2* (27 - vga_idx); + else + rssi = -100; + break; + case 6: + rssi = -48 + 2 * (2 - vga_idx); + break; + case 5: + rssi = -42 + 2 * (7 - vga_idx); + break; + case 4: + rssi = -36 + 2 * (7 - vga_idx); + break; + case 3: + rssi = -24 + 2 * (7 - vga_idx); + break; + case 2: + rssi = -12 + 2 * (5 - vga_idx); + break; + case 1: + rssi = 8 - (2 * vga_idx); + break; + case 0: + rssi = 14 - (2 * vga_idx); + break; + } + rssi += 6; + } else { /* OFDM/HT. */ + phy = (struct r92c_rx_phystat *)physt; + rssi = ((le32toh(phy->phydw1) >> 1) & 0x7f) - 110; + } + return (rssi); +} + + static int urtwn_tx_start(struct urtwn_softc *sc, struct ieee80211_node *ni, struct mbuf *m0, struct urtwn_data *data) @@ -1617,6 +1810,8 @@ urtwn_tx_start(struct urtwn_softc *sc, s * Software crypto. */ wh = mtod(m0, struct ieee80211_frame *); + type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; + if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { k = ieee80211_crypto_encap(ni, m0); if (k == NULL) { @@ -1631,7 +1826,7 @@ urtwn_tx_start(struct urtwn_softc *sc, s wh = mtod(m0, struct ieee80211_frame *); } - switch (wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) { + switch (type) { case IEEE80211_FC0_TYPE_CTL: case IEEE80211_FC0_TYPE_MGT: xfer = sc->sc_xfer[URTWN_BULK_TX_VO]; @@ -1655,20 +1850,24 @@ urtwn_tx_start(struct urtwn_softc *sc, s R92C_TXDW0_OWN | R92C_TXDW0_FSG | R92C_TXDW0_LSG); if (IEEE80211_IS_MULTICAST(wh->i_addr1)) txd->txdw0 |= htole32(R92C_TXDW0_BMCAST); - - type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; if (!IEEE80211_IS_MULTICAST(wh->i_addr1) && type == IEEE80211_FC0_TYPE_DATA) { if (ic->ic_curmode == IEEE80211_MODE_11B) raid = R92C_RAID_11B; else raid = R92C_RAID_11BG; - txd->txdw1 |= htole32( - SM(R92C_TXDW1_MACID, URTWN_MACID_BSS) | - SM(R92C_TXDW1_QSEL, R92C_TXDW1_QSEL_BE) | - SM(R92C_TXDW1_RAID, raid) | - R92C_TXDW1_AGGBK); - + if (sc->chip & URTWN_CHIP_88E) { + txd->txdw1 |= htole32( + SM(R88E_TXDW1_MACID, URTWN_MACID_BSS) | *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Fri May 23 09:29:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BFE6B345; Fri, 23 May 2014 09:29:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 929F42621; Fri, 23 May 2014 09:29:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4N9T5Uh033853; Fri, 23 May 2014 09:29:05 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4N9T5UN033850; Fri, 23 May 2014 09:29:05 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201405230929.s4N9T5UN033850@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 23 May 2014 09:29:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266582 - in stable/10/sys: kern sys vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2014 09:29:05 -0000 Author: kib Date: Fri May 23 09:29:04 2014 New Revision: 266582 URL: http://svnweb.freebsd.org/changeset/base/266582 Log: MFC r266464: In execve(2), postpone the free of old vmspace until the threads are resumed and exited. Modified: stable/10/sys/kern/kern_exec.c stable/10/sys/sys/proc.h stable/10/sys/vm/vm_map.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_exec.c ============================================================================== --- stable/10/sys/kern/kern_exec.c Fri May 23 08:46:28 2014 (r266581) +++ stable/10/sys/kern/kern_exec.c Fri May 23 09:29:04 2014 (r266582) @@ -283,6 +283,7 @@ kern_execve(td, args, mac_p) struct mac *mac_p; { struct proc *p = td->td_proc; + struct vmspace *oldvmspace; int error; AUDIT_ARG_ARGV(args->begin_argv, args->argc, @@ -299,6 +300,8 @@ kern_execve(td, args, mac_p) PROC_UNLOCK(p); } + KASSERT((td->td_pflags & TDP_EXECVMSPC) == 0, ("nested execve")); + oldvmspace = td->td_proc->p_vmspace; error = do_execve(td, args, mac_p); if (p->p_flag & P_HADTHREADS) { @@ -313,6 +316,12 @@ kern_execve(td, args, mac_p) thread_single_end(); PROC_UNLOCK(p); } + if ((td->td_pflags & TDP_EXECVMSPC) != 0) { + KASSERT(td->td_proc->p_vmspace != oldvmspace, + ("oldvmspace still used")); + vmspace_free(oldvmspace); + td->td_pflags &= ~TDP_EXECVMSPC; + } return (error); } Modified: stable/10/sys/sys/proc.h ============================================================================== --- stable/10/sys/sys/proc.h Fri May 23 08:46:28 2014 (r266581) +++ stable/10/sys/sys/proc.h Fri May 23 09:29:04 2014 (r266582) @@ -425,6 +425,7 @@ do { \ #define TDP_NERRNO 0x08000000 /* Last errno is already in td_errno */ #define TDP_UIOHELD 0x10000000 /* Current uio has pages held in td_ma */ #define TDP_DEVMEMIO 0x20000000 /* Accessing memory for /dev/mem */ +#define TDP_EXECVMSPC 0x40000000 /* Execve destroyed old vmspace */ /* * Reasons that the current thread can not be run yet. Modified: stable/10/sys/vm/vm_map.c ============================================================================== --- stable/10/sys/vm/vm_map.c Fri May 23 08:46:28 2014 (r266581) +++ stable/10/sys/vm/vm_map.c Fri May 23 09:29:04 2014 (r266582) @@ -3751,6 +3751,8 @@ vmspace_exec(struct proc *p, vm_offset_t struct vmspace *oldvmspace = p->p_vmspace; struct vmspace *newvmspace; + KASSERT((curthread->td_pflags & TDP_EXECVMSPC) == 0, + ("vmspace_exec recursed")); newvmspace = vmspace_alloc(minuser, maxuser, NULL); if (newvmspace == NULL) return (ENOMEM); @@ -3767,7 +3769,7 @@ vmspace_exec(struct proc *p, vm_offset_t PROC_VMSPACE_UNLOCK(p); if (p == curthread->td_proc) pmap_activate(curthread); - vmspace_free(oldvmspace); + curthread->td_pflags |= TDP_EXECVMSPC; return (0); } From owner-svn-src-stable@FreeBSD.ORG Fri May 23 09:48:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81037979; Fri, 23 May 2014 09:48:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61FB927CB; Fri, 23 May 2014 09:48:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4N9mhTf042543; Fri, 23 May 2014 09:48:43 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4N9mgbx042540; Fri, 23 May 2014 09:48:42 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201405230948.s4N9mgbx042540@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 23 May 2014 09:48:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r266583 - in stable/8/sys: kern sys vm X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2014 09:48:43 -0000 Author: kib Date: Fri May 23 09:48:42 2014 New Revision: 266583 URL: http://svnweb.freebsd.org/changeset/base/266583 Log: MFC r266464: In execve(2), postpone the free of old vmspace until the threads are resumed and exited. Modified: stable/8/sys/kern/kern_exec.c stable/8/sys/sys/proc.h stable/8/sys/vm/vm_map.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) stable/8/sys/sys/ (props changed) stable/8/sys/vm/ (props changed) Modified: stable/8/sys/kern/kern_exec.c ============================================================================== --- stable/8/sys/kern/kern_exec.c Fri May 23 09:29:04 2014 (r266582) +++ stable/8/sys/kern/kern_exec.c Fri May 23 09:48:42 2014 (r266583) @@ -278,6 +278,7 @@ kern_execve(td, args, mac_p) struct mac *mac_p; { struct proc *p = td->td_proc; + struct vmspace *oldvmspace; int error; AUDIT_ARG_ARGV(args->begin_argv, args->argc, @@ -294,6 +295,8 @@ kern_execve(td, args, mac_p) PROC_UNLOCK(p); } + KASSERT((td->td_pflags & TDP_EXECVMSPC) == 0, ("nested execve")); + oldvmspace = td->td_proc->p_vmspace; error = do_execve(td, args, mac_p); if (p->p_flag & P_HADTHREADS) { @@ -308,6 +311,12 @@ kern_execve(td, args, mac_p) thread_single_end(); PROC_UNLOCK(p); } + if ((td->td_pflags & TDP_EXECVMSPC) != 0) { + KASSERT(td->td_proc->p_vmspace != oldvmspace, + ("oldvmspace still used")); + vmspace_free(oldvmspace); + td->td_pflags &= ~TDP_EXECVMSPC; + } return (error); } Modified: stable/8/sys/sys/proc.h ============================================================================== --- stable/8/sys/sys/proc.h Fri May 23 09:29:04 2014 (r266582) +++ stable/8/sys/sys/proc.h Fri May 23 09:48:42 2014 (r266583) @@ -414,6 +414,7 @@ do { \ #define TDP_AUDITREC 0x01000000 /* Audit record pending on thread */ #define TDP_RESETSPUR 0x04000000 /* Reset spurious page fault history. */ #define TDP_NERRNO 0x08000000 /* Last errno is already in td_errno */ +#define TDP_EXECVMSPC 0x40000000 /* Execve destroyed old vmspace */ /* * Reasons that the current thread can not be run yet. Modified: stable/8/sys/vm/vm_map.c ============================================================================== --- stable/8/sys/vm/vm_map.c Fri May 23 09:29:04 2014 (r266582) +++ stable/8/sys/vm/vm_map.c Fri May 23 09:48:42 2014 (r266583) @@ -3521,6 +3521,8 @@ vmspace_exec(struct proc *p, vm_offset_t struct vmspace *oldvmspace = p->p_vmspace; struct vmspace *newvmspace; + KASSERT((curthread->td_pflags & TDP_EXECVMSPC) == 0, + ("vmspace_exec recursed")); newvmspace = vmspace_alloc(minuser, maxuser); if (newvmspace == NULL) return (ENOMEM); @@ -3537,7 +3539,7 @@ vmspace_exec(struct proc *p, vm_offset_t PROC_VMSPACE_UNLOCK(p); if (p == curthread->td_proc) pmap_activate(curthread); - vmspace_free(oldvmspace); + curthread->td_pflags |= TDP_EXECVMSPC; return (0); } From owner-svn-src-stable@FreeBSD.ORG Fri May 23 11:56:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F739D7B; Fri, 23 May 2014 11:56:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 731D123CB; Fri, 23 May 2014 11:56:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4NBuXdY000449; Fri, 23 May 2014 11:56:33 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4NBuWeE000446; Fri, 23 May 2014 11:56:32 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201405231156.s4NBuWeE000446@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 23 May 2014 11:56:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266585 - in stable/9/sys: kern sys vm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2014 11:56:33 -0000 Author: kib Date: Fri May 23 11:56:32 2014 New Revision: 266585 URL: http://svnweb.freebsd.org/changeset/base/266585 Log: MFC r266464: In execve(2), postpone the free of old vmspace until the threads are resumed and exited. Approved by: re (marius) Modified: stable/9/sys/kern/kern_exec.c stable/9/sys/sys/proc.h stable/9/sys/vm/vm_map.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/kern/kern_exec.c ============================================================================== --- stable/9/sys/kern/kern_exec.c Fri May 23 11:22:44 2014 (r266584) +++ stable/9/sys/kern/kern_exec.c Fri May 23 11:56:32 2014 (r266585) @@ -282,6 +282,7 @@ kern_execve(td, args, mac_p) struct mac *mac_p; { struct proc *p = td->td_proc; + struct vmspace *oldvmspace; int error; AUDIT_ARG_ARGV(args->begin_argv, args->argc, @@ -298,6 +299,8 @@ kern_execve(td, args, mac_p) PROC_UNLOCK(p); } + KASSERT((td->td_pflags & TDP_EXECVMSPC) == 0, ("nested execve")); + oldvmspace = td->td_proc->p_vmspace; error = do_execve(td, args, mac_p); if (p->p_flag & P_HADTHREADS) { @@ -312,6 +315,12 @@ kern_execve(td, args, mac_p) thread_single_end(); PROC_UNLOCK(p); } + if ((td->td_pflags & TDP_EXECVMSPC) != 0) { + KASSERT(td->td_proc->p_vmspace != oldvmspace, + ("oldvmspace still used")); + vmspace_free(oldvmspace); + td->td_pflags &= ~TDP_EXECVMSPC; + } return (error); } Modified: stable/9/sys/sys/proc.h ============================================================================== --- stable/9/sys/sys/proc.h Fri May 23 11:22:44 2014 (r266584) +++ stable/9/sys/sys/proc.h Fri May 23 11:56:32 2014 (r266585) @@ -426,6 +426,7 @@ do { \ #define TDP_NERRNO 0x08000000 /* Last errno is already in td_errno */ #define TDP_UIOHELD 0x10000000 /* Current uio has pages held in td_ma */ #define TDP_DEVMEMIO 0x20000000 /* Accessing memory for /dev/mem */ +#define TDP_EXECVMSPC 0x40000000 /* Execve destroyed old vmspace */ /* * Reasons that the current thread can not be run yet. Modified: stable/9/sys/vm/vm_map.c ============================================================================== --- stable/9/sys/vm/vm_map.c Fri May 23 11:22:44 2014 (r266584) +++ stable/9/sys/vm/vm_map.c Fri May 23 11:56:32 2014 (r266585) @@ -3752,6 +3752,8 @@ vmspace_exec(struct proc *p, vm_offset_t struct vmspace *oldvmspace = p->p_vmspace; struct vmspace *newvmspace; + KASSERT((curthread->td_pflags & TDP_EXECVMSPC) == 0, + ("vmspace_exec recursed")); newvmspace = vmspace_alloc(minuser, maxuser); if (newvmspace == NULL) return (ENOMEM); @@ -3768,7 +3770,7 @@ vmspace_exec(struct proc *p, vm_offset_t PROC_VMSPACE_UNLOCK(p); if (p == curthread->td_proc) pmap_activate(curthread); - vmspace_free(oldvmspace); + curthread->td_pflags |= TDP_EXECVMSPC; return (0); } From owner-svn-src-stable@FreeBSD.ORG Fri May 23 16:46:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 69A959B9; Fri, 23 May 2014 16:46:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4AA212FED; Fri, 23 May 2014 16:46:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4NGkpVI033940; Fri, 23 May 2014 16:46:51 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4NGkpHk033939; Fri, 23 May 2014 16:46:51 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201405231646.s4NGkpHk033939@svn.freebsd.org> From: Alan Cox Date: Fri, 23 May 2014 16:46:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266589 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2014 16:46:51 -0000 Author: alc Date: Fri May 23 16:46:50 2014 New Revision: 266589 URL: http://svnweb.freebsd.org/changeset/base/266589 Log: MFC r265886, r265948 With the new-and-improved vm_fault_copy_entry() (r265843), we can always avoid soft page faults when adding write access to user wired entries in vm_map_protect(). Previously, we only avoided the soft page fault when the underlying pages were copy-on-write. In other words, we avoided the pages faults that might sleep on page allocation, but not the trivial page faults to update the physical map. On a fork allow read-only wired pages to be copy-on-write shared between the parent and child processes. Previously, we copied these pages even though they are read only. However, the reason for copying them is historical and no longer exists. In recent times, vm_map_protect() has developed the ability to copy pages when write access is added to wired copy-on-write pages. So, in this case, copy-on-write sharing of wired pages is not to be feared. It is not going to lead to copy-on-write faults on wired memory. Modified: stable/10/sys/vm/vm_map.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_map.c ============================================================================== --- stable/10/sys/vm/vm_map.c Fri May 23 16:22:36 2014 (r266588) +++ stable/10/sys/vm/vm_map.c Fri May 23 16:46:50 2014 (r266589) @@ -1978,10 +1978,17 @@ vm_map_protect(vm_map_t map, vm_offset_t else current->protection = new_prot; - if ((current->eflags & (MAP_ENTRY_COW | MAP_ENTRY_USER_WIRED)) - == (MAP_ENTRY_COW | MAP_ENTRY_USER_WIRED) && + /* + * For user wired map entries, the normal lazy evaluation of + * write access upgrades through soft page faults is + * undesirable. Instead, immediately copy any pages that are + * copy-on-write and enable write access in the physical map. + */ + if ((current->eflags & MAP_ENTRY_USER_WIRED) != 0 && (current->protection & VM_PROT_WRITE) != 0 && (old_prot & VM_PROT_WRITE) == 0) { + KASSERT(old_prot != VM_PROT_NONE, + ("vm_map_protect: inaccessible wired map entry")); vm_fault_copy_entry(map, map, current, current, NULL); } @@ -3017,8 +3024,8 @@ vm_map_copy_entry( if ((dst_entry->eflags|src_entry->eflags) & MAP_ENTRY_IS_SUB_MAP) return; - if (src_entry->wired_count == 0) { - + if (src_entry->wired_count == 0 || + (src_entry->protection & VM_PROT_WRITE) == 0) { /* * If the source entry is marked needs_copy, it is already * write-protected. @@ -3109,9 +3116,9 @@ vm_map_copy_entry( dst_entry->end - dst_entry->start, src_entry->start); } else { /* - * Of course, wired down pages can't be set copy-on-write. - * Cause wired pages to be copied into the new map by - * simulating faults (the new pages are pageable) + * We don't want to make writeable wired pages copy-on-write. + * Immediately copy these pages into the new map by simulating + * page faults. The new pages are pageable. */ vm_fault_copy_entry(dst_map, src_map, dst_entry, src_entry, fork_charge); From owner-svn-src-stable@FreeBSD.ORG Fri May 23 17:46:00 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DAC8A7E0; Fri, 23 May 2014 17:46:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7ECC2576; Fri, 23 May 2014 17:46:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4NHk0TN062035; Fri, 23 May 2014 17:46:00 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4NHk0iJ062034; Fri, 23 May 2014 17:46:00 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201405231746.s4NHk0iJ062034@svn.freebsd.org> From: Ed Maste Date: Fri, 23 May 2014 17:46:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266590 - stable/10/usr.sbin/pmcstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2014 17:46:01 -0000 Author: emaste Date: Fri May 23 17:46:00 2014 New Revision: 266590 URL: http://svnweb.freebsd.org/changeset/base/266590 Log: MFC r266208: Speed up pmcstat by improving string hash In one case generating callgraph output from a 24MB system-wide sampling data file took 17.4 seconds on average. Profiling showed pmcstat spending a lot of time in strcmp, due to hash collisions. Replacing the XOR-only hash with FNV-1a reduces the run time for my test by 40%. Modified: stable/10/usr.sbin/pmcstat/pmcstat_log.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pmcstat/pmcstat_log.c ============================================================================== --- stable/10/usr.sbin/pmcstat/pmcstat_log.c Fri May 23 16:46:50 2014 (r266589) +++ stable/10/usr.sbin/pmcstat/pmcstat_log.c Fri May 23 17:46:00 2014 (r266590) @@ -307,10 +307,10 @@ pmcstat_stats_reset(int reset_global) static int pmcstat_string_compute_hash(const char *s) { - int hash; + unsigned hash; - for (hash = 0; *s; s++) - hash ^= *s; + for (hash = 2166136261; *s; s++) + hash = (hash ^ *s) * 16777619; return (hash & PMCSTAT_HASH_MASK); } From owner-svn-src-stable@FreeBSD.ORG Fri May 23 17:47:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2287F9DC; Fri, 23 May 2014 17:47:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E74FB2592; Fri, 23 May 2014 17:47:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4NHlnGS062313; Fri, 23 May 2014 17:47:49 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4NHlnKr062310; Fri, 23 May 2014 17:47:49 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201405231747.s4NHlnKr062310@svn.freebsd.org> From: Alan Cox Date: Fri, 23 May 2014 17:47:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266591 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2014 17:47:50 -0000 Author: alc Date: Fri May 23 17:47:49 2014 New Revision: 266591 URL: http://svnweb.freebsd.org/changeset/base/266591 Log: MFC r259107 Eliminate a redundant parameter to vm_radix_replace(). Improve the wording of the comment describing vm_radix_replace(). Modified: stable/10/sys/vm/vm_page.c stable/10/sys/vm/vm_radix.c stable/10/sys/vm/vm_radix.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_page.c ============================================================================== --- stable/10/sys/vm/vm_page.c Fri May 23 17:46:00 2014 (r266590) +++ stable/10/sys/vm/vm_page.c Fri May 23 17:47:49 2014 (r266591) @@ -1200,7 +1200,7 @@ vm_page_replace(vm_page_t mnew, vm_objec mnew->object = object; mnew->pindex = pindex; - mold = vm_radix_replace(&object->rtree, mnew, pindex); + mold = vm_radix_replace(&object->rtree, mnew); KASSERT(mold->queue == PQ_NONE, ("vm_page_replace: mold is on a paging queue")); Modified: stable/10/sys/vm/vm_radix.c ============================================================================== --- stable/10/sys/vm/vm_radix.c Fri May 23 17:46:00 2014 (r266590) +++ stable/10/sys/vm/vm_radix.c Fri May 23 17:47:49 2014 (r266591) @@ -788,20 +788,18 @@ vm_radix_reclaim_allnodes(struct vm_radi } /* - * Replace an existing page into the trie with another one. - * Panics if the replacing page is not present or if the new page has an - * invalid key. + * Replace an existing page in the trie with another one. + * Panics if there is not an old page in the trie at the new page's index. */ vm_page_t -vm_radix_replace(struct vm_radix *rtree, vm_page_t newpage, vm_pindex_t index) +vm_radix_replace(struct vm_radix *rtree, vm_page_t newpage) { struct vm_radix_node *rnode; vm_page_t m; + vm_pindex_t index; int slot; - KASSERT(newpage->pindex == index, ("%s: newpage index invalid", - __func__)); - + index = newpage->pindex; rnode = vm_radix_getroot(rtree); if (rnode == NULL) panic("%s: replacing page on an empty trie", __func__); Modified: stable/10/sys/vm/vm_radix.h ============================================================================== --- stable/10/sys/vm/vm_radix.h Fri May 23 17:46:00 2014 (r266590) +++ stable/10/sys/vm/vm_radix.h Fri May 23 17:47:49 2014 (r266591) @@ -43,8 +43,7 @@ vm_page_t vm_radix_lookup_ge(struct vm_r vm_page_t vm_radix_lookup_le(struct vm_radix *rtree, vm_pindex_t index); void vm_radix_reclaim_allnodes(struct vm_radix *rtree); void vm_radix_remove(struct vm_radix *rtree, vm_pindex_t index); -vm_page_t vm_radix_replace(struct vm_radix *rtree, vm_page_t newpage, - vm_pindex_t index); +vm_page_t vm_radix_replace(struct vm_radix *rtree, vm_page_t newpage); #endif /* _KERNEL */ #endif /* !_VM_RADIX_H_ */ From owner-svn-src-stable@FreeBSD.ORG Fri May 23 19:06:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 80161AFD; Fri, 23 May 2014 19:06:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CF3B2CD4; Fri, 23 May 2014 19:06:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4NJ6aQB098553; Fri, 23 May 2014 19:06:36 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4NJ6a9Z098552; Fri, 23 May 2014 19:06:36 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201405231906.s4NJ6a9Z098552@svn.freebsd.org> From: John Baldwin Date: Fri, 23 May 2014 19:06:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266592 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2014 19:06:36 -0000 Author: jhb Date: Fri May 23 19:06:35 2014 New Revision: 266592 URL: http://svnweb.freebsd.org/changeset/base/266592 Log: MFC 260469: Fix issue with the virtio descriptor region being truncated if it was above 4GB. Modified: stable/10/usr.sbin/bhyve/virtio.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/virtio.c ============================================================================== --- stable/10/usr.sbin/bhyve/virtio.c Fri May 23 17:47:49 2014 (r266591) +++ stable/10/usr.sbin/bhyve/virtio.c Fri May 23 19:06:35 2014 (r266592) @@ -160,7 +160,7 @@ vi_vq_init(struct virtio_softc *vs, uint vq = &vs->vs_queues[vs->vs_curq]; vq->vq_pfn = pfn; - phys = pfn << VRING_PFN; + phys = (uint64_t)pfn << VRING_PFN; size = vring_size(vq->vq_qsize); base = paddr_guest2host(vs->vs_pi->pi_vmctx, phys, size); From owner-svn-src-stable@FreeBSD.ORG Fri May 23 19:39:59 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 990E826C; Fri, 23 May 2014 19:39:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79FD72F3A; Fri, 23 May 2014 19:39:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4NJdxrY012662; Fri, 23 May 2014 19:39:59 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4NJdwxt012656; Fri, 23 May 2014 19:39:58 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201405231939.s4NJdwxt012656@svn.freebsd.org> From: John Baldwin Date: Fri, 23 May 2014 19:39:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266593 - in stable/10/sys/amd64/vmm: . intel X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2014 19:39:59 -0000 Author: jhb Date: Fri May 23 19:39:58 2014 New Revision: 266593 URL: http://svnweb.freebsd.org/changeset/base/266593 Log: MFC 260802,260836,260863,261001,261074,261617: Various fixes for NMI and interrupt injection. - If a VM-exit happens during an NMI injection then clear the "NMI Blocking" bit in the Guest Interruptibility-state VMCS field. - If the guest exits due to a fault while it is executing IRET then restore the state of "Virtual NMI blocking" in the guest's interruptibility-state field before resuming the guest. - Inject a pending NMI only if NMI_BLOCKING, MOVSS_BLOCKING, STI_BLOCKING are all clear. If any of these bits are set then enable "NMI window exiting" and inject the NMI in the VM-exit handler. - Handle a VM-exit due to a NMI properly by vectoring to the host's NMI handler via a software interrupt. - Set "Interrupt Window Exiting" in the case where there is a vector to be injected into the vcpu but the VM-entry interruption information field already has the valid bit set. - For VM-exits due to an NMI, handle the NMI with interrupts disabled in addition to "blocking by NMI" already established by the VM-exit. Modified: stable/10/sys/amd64/vmm/intel/vmcs.h stable/10/sys/amd64/vmm/intel/vmx.c stable/10/sys/amd64/vmm/vmm_stat.c stable/10/sys/amd64/vmm/vmm_stat.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/vmm/intel/vmcs.h ============================================================================== --- stable/10/sys/amd64/vmm/intel/vmcs.h Fri May 23 19:06:35 2014 (r266592) +++ stable/10/sys/amd64/vmm/intel/vmcs.h Fri May 23 19:39:58 2014 (r266593) @@ -333,12 +333,18 @@ vmcs_write(uint32_t encoding, uint64_t v #define EXIT_REASON_APIC_WRITE 56 /* + * NMI unblocking due to IRET. + * + * Applies to VM-exits due to hardware exception or EPT fault. + */ +#define EXIT_QUAL_NMIUDTI (1 << 12) +/* * VMCS interrupt information fields */ -#define VMCS_INTR_INFO_VALID (1U << 31) -#define VMCS_INTR_INFO_TYPE(info) (((info) >> 8) & 0x7) -#define VMCS_INTR_INFO_HW_INTR (0 << 8) -#define VMCS_INTR_INFO_NMI (2 << 8) +#define VMCS_INTR_VALID (1U << 31) +#define VMCS_INTR_T_MASK 0x700 /* Interruption-info type */ +#define VMCS_INTR_T_HWINTR (0 << 8) +#define VMCS_INTR_T_NMI (2 << 8) /* * VMCS IDT-Vectoring information fields Modified: stable/10/sys/amd64/vmm/intel/vmx.c ============================================================================== --- stable/10/sys/amd64/vmm/intel/vmx.c Fri May 23 19:06:35 2014 (r266592) +++ stable/10/sys/amd64/vmm/intel/vmx.c Fri May 23 19:39:58 2014 (r266593) @@ -147,21 +147,6 @@ SYSCTL_INT(_hw_vmm_vmx, OID_AUTO, initia &vmx_initialized, 0, "Intel VMX initialized"); /* - * Virtual NMI blocking conditions. - * - * Some processor implementations also require NMI to be blocked if - * the STI_BLOCKING bit is set. It is possible to detect this at runtime - * based on the (exit_reason,exit_qual) tuple being set to - * (EXIT_REASON_INVAL_VMCS, EXIT_QUAL_NMI_WHILE_STI_BLOCKING). - * - * We take the easy way out and also include STI_BLOCKING as one of the - * gating items for vNMI injection. - */ -static uint64_t nmi_blocking_bits = VMCS_INTERRUPTIBILITY_MOVSS_BLOCKING | - VMCS_INTERRUPTIBILITY_NMI_BLOCKING | - VMCS_INTERRUPTIBILITY_STI_BLOCKING; - -/* * Optional capabilities */ static int cap_halt_exit; @@ -1031,121 +1016,168 @@ static void __inline vmx_set_int_window_exiting(struct vmx *vmx, int vcpu) { - vmx->cap[vcpu].proc_ctls |= PROCBASED_INT_WINDOW_EXITING; - vmcs_write(VMCS_PRI_PROC_BASED_CTLS, vmx->cap[vcpu].proc_ctls); + if ((vmx->cap[vcpu].proc_ctls & PROCBASED_INT_WINDOW_EXITING) == 0) { + vmx->cap[vcpu].proc_ctls |= PROCBASED_INT_WINDOW_EXITING; + vmcs_write(VMCS_PRI_PROC_BASED_CTLS, vmx->cap[vcpu].proc_ctls); + VCPU_CTR0(vmx->vm, vcpu, "Enabling interrupt window exiting"); + } } static void __inline vmx_clear_int_window_exiting(struct vmx *vmx, int vcpu) { + KASSERT((vmx->cap[vcpu].proc_ctls & PROCBASED_INT_WINDOW_EXITING) != 0, + ("intr_window_exiting not set: %#x", vmx->cap[vcpu].proc_ctls)); vmx->cap[vcpu].proc_ctls &= ~PROCBASED_INT_WINDOW_EXITING; vmcs_write(VMCS_PRI_PROC_BASED_CTLS, vmx->cap[vcpu].proc_ctls); + VCPU_CTR0(vmx->vm, vcpu, "Disabling interrupt window exiting"); } static void __inline vmx_set_nmi_window_exiting(struct vmx *vmx, int vcpu) { - vmx->cap[vcpu].proc_ctls |= PROCBASED_NMI_WINDOW_EXITING; - vmcs_write(VMCS_PRI_PROC_BASED_CTLS, vmx->cap[vcpu].proc_ctls); + if ((vmx->cap[vcpu].proc_ctls & PROCBASED_NMI_WINDOW_EXITING) == 0) { + vmx->cap[vcpu].proc_ctls |= PROCBASED_NMI_WINDOW_EXITING; + vmcs_write(VMCS_PRI_PROC_BASED_CTLS, vmx->cap[vcpu].proc_ctls); + VCPU_CTR0(vmx->vm, vcpu, "Enabling NMI window exiting"); + } } static void __inline vmx_clear_nmi_window_exiting(struct vmx *vmx, int vcpu) { + KASSERT((vmx->cap[vcpu].proc_ctls & PROCBASED_NMI_WINDOW_EXITING) != 0, + ("nmi_window_exiting not set %#x", vmx->cap[vcpu].proc_ctls)); vmx->cap[vcpu].proc_ctls &= ~PROCBASED_NMI_WINDOW_EXITING; vmcs_write(VMCS_PRI_PROC_BASED_CTLS, vmx->cap[vcpu].proc_ctls); + VCPU_CTR0(vmx->vm, vcpu, "Disabling NMI window exiting"); } -static int +#define NMI_BLOCKING (VMCS_INTERRUPTIBILITY_NMI_BLOCKING | \ + VMCS_INTERRUPTIBILITY_MOVSS_BLOCKING) +#define HWINTR_BLOCKING (VMCS_INTERRUPTIBILITY_STI_BLOCKING | \ + VMCS_INTERRUPTIBILITY_MOVSS_BLOCKING) + +static void vmx_inject_nmi(struct vmx *vmx, int vcpu) { - uint64_t info, interruptibility; + uint32_t gi, info; - /* Bail out if no NMI requested */ - if (!vm_nmi_pending(vmx->vm, vcpu)) - return (0); + gi = vmcs_read(VMCS_GUEST_INTERRUPTIBILITY); + KASSERT((gi & NMI_BLOCKING) == 0, ("vmx_inject_nmi: invalid guest " + "interruptibility-state %#x", gi)); - interruptibility = vmcs_read(VMCS_GUEST_INTERRUPTIBILITY); - if (interruptibility & nmi_blocking_bits) - goto nmiblocked; + info = vmcs_read(VMCS_ENTRY_INTR_INFO); + KASSERT((info & VMCS_INTR_VALID) == 0, ("vmx_inject_nmi: invalid " + "VM-entry interruption information %#x", info)); /* * Inject the virtual NMI. The vector must be the NMI IDT entry * or the VMCS entry check will fail. */ - info = VMCS_INTR_INFO_NMI | VMCS_INTR_INFO_VALID; - info |= IDT_NMI; + info = IDT_NMI | VMCS_INTR_T_NMI | VMCS_INTR_VALID; vmcs_write(VMCS_ENTRY_INTR_INFO, info); VCPU_CTR0(vmx->vm, vcpu, "Injecting vNMI"); /* Clear the request */ vm_nmi_clear(vmx->vm, vcpu); - return (1); - -nmiblocked: - /* - * Set the NMI Window Exiting execution control so we can inject - * the virtual NMI as soon as blocking condition goes away. - */ - vmx_set_nmi_window_exiting(vmx, vcpu); - - VCPU_CTR0(vmx->vm, vcpu, "Enabling NMI window exiting"); - return (1); } static void vmx_inject_interrupts(struct vmx *vmx, int vcpu, struct vlapic *vlapic) { - int vector; - uint64_t info, rflags, interruptibility; + int vector, need_nmi_exiting; + uint64_t rflags; + uint32_t gi, info; - const int HWINTR_BLOCKED = VMCS_INTERRUPTIBILITY_STI_BLOCKING | - VMCS_INTERRUPTIBILITY_MOVSS_BLOCKING; - - /* - * If there is already an interrupt pending then just return. - * - * This could happen if an interrupt was injected on a prior - * VM entry but the actual entry into guest mode was aborted - * because of a pending AST. - */ - info = vmcs_read(VMCS_ENTRY_INTR_INFO); - if (info & VMCS_INTR_INFO_VALID) - return; + if (vm_nmi_pending(vmx->vm, vcpu)) { + /* + * If there are no conditions blocking NMI injection then + * inject it directly here otherwise enable "NMI window + * exiting" to inject it as soon as we can. + * + * We also check for STI_BLOCKING because some implementations + * don't allow NMI injection in this case. If we are running + * on a processor that doesn't have this restriction it will + * immediately exit and the NMI will be injected in the + * "NMI window exiting" handler. + */ + need_nmi_exiting = 1; + gi = vmcs_read(VMCS_GUEST_INTERRUPTIBILITY); + if ((gi & (HWINTR_BLOCKING | NMI_BLOCKING)) == 0) { + info = vmcs_read(VMCS_ENTRY_INTR_INFO); + if ((info & VMCS_INTR_VALID) == 0) { + vmx_inject_nmi(vmx, vcpu); + need_nmi_exiting = 0; + } else { + VCPU_CTR1(vmx->vm, vcpu, "Cannot inject NMI " + "due to VM-entry intr info %#x", info); + } + } else { + VCPU_CTR1(vmx->vm, vcpu, "Cannot inject NMI due to " + "Guest Interruptibility-state %#x", gi); + } - /* - * NMI injection has priority so deal with those first - */ - if (vmx_inject_nmi(vmx, vcpu)) - return; + if (need_nmi_exiting) + vmx_set_nmi_window_exiting(vmx, vcpu); + } if (virtual_interrupt_delivery) { vmx_inject_pir(vlapic); return; } + /* + * If interrupt-window exiting is already in effect then don't bother + * checking for pending interrupts. This is just an optimization and + * not needed for correctness. + */ + if ((vmx->cap[vcpu].proc_ctls & PROCBASED_INT_WINDOW_EXITING) != 0) { + VCPU_CTR0(vmx->vm, vcpu, "Skip interrupt injection due to " + "pending int_window_exiting"); + return; + } + /* Ask the local apic for a vector to inject */ if (!vlapic_pending_intr(vlapic, &vector)) return; - if (vector < 32 || vector > 255) - panic("vmx_inject_interrupts: invalid vector %d\n", vector); + KASSERT(vector >= 32 && vector <= 255, ("invalid vector %d", vector)); /* Check RFLAGS.IF and the interruptibility state of the guest */ rflags = vmcs_read(VMCS_GUEST_RFLAGS); - if ((rflags & PSL_I) == 0) + if ((rflags & PSL_I) == 0) { + VCPU_CTR2(vmx->vm, vcpu, "Cannot inject vector %d due to " + "rflags %#lx", vector, rflags); goto cantinject; + } - interruptibility = vmcs_read(VMCS_GUEST_INTERRUPTIBILITY); - if (interruptibility & HWINTR_BLOCKED) + gi = vmcs_read(VMCS_GUEST_INTERRUPTIBILITY); + if (gi & HWINTR_BLOCKING) { + VCPU_CTR2(vmx->vm, vcpu, "Cannot inject vector %d due to " + "Guest Interruptibility-state %#x", vector, gi); goto cantinject; + } + + info = vmcs_read(VMCS_ENTRY_INTR_INFO); + if (info & VMCS_INTR_VALID) { + /* + * This is expected and could happen for multiple reasons: + * - A vectoring VM-entry was aborted due to astpending + * - A VM-exit happened during event injection. + * - An NMI was injected above or after "NMI window exiting" + */ + VCPU_CTR2(vmx->vm, vcpu, "Cannot inject vector %d due to " + "VM-entry intr info %#x", vector, info); + goto cantinject; + } /* Inject the interrupt */ - info = VMCS_INTR_INFO_HW_INTR | VMCS_INTR_INFO_VALID; + info = VMCS_INTR_T_HWINTR | VMCS_INTR_VALID; info |= vector; vmcs_write(VMCS_ENTRY_INTR_INFO, info); @@ -1162,8 +1194,37 @@ cantinject: * the interrupt as soon as blocking condition goes away. */ vmx_set_int_window_exiting(vmx, vcpu); +} + +/* + * If the Virtual NMIs execution control is '1' then the logical processor + * tracks virtual-NMI blocking in the Guest Interruptibility-state field of + * the VMCS. An IRET instruction in VMX non-root operation will remove any + * virtual-NMI blocking. + * + * This unblocking occurs even if the IRET causes a fault. In this case the + * hypervisor needs to restore virtual-NMI blocking before resuming the guest. + */ +static void +vmx_restore_nmi_blocking(struct vmx *vmx, int vcpuid) +{ + uint32_t gi; + + VCPU_CTR0(vmx->vm, vcpuid, "Restore Virtual-NMI blocking"); + gi = vmcs_read(VMCS_GUEST_INTERRUPTIBILITY); + gi |= VMCS_INTERRUPTIBILITY_NMI_BLOCKING; + vmcs_write(VMCS_GUEST_INTERRUPTIBILITY, gi); +} + +static void +vmx_clear_nmi_blocking(struct vmx *vmx, int vcpuid) +{ + uint32_t gi; - VCPU_CTR0(vmx->vm, vcpu, "Enabling interrupt window exiting"); + VCPU_CTR0(vmx->vm, vcpuid, "Clear Virtual-NMI blocking"); + gi = vmcs_read(VMCS_GUEST_INTERRUPTIBILITY); + gi &= ~VMCS_INTERRUPTIBILITY_NMI_BLOCKING; + vmcs_write(VMCS_GUEST_INTERRUPTIBILITY, gi); } static int @@ -1458,6 +1519,9 @@ vmx_exit_process(struct vmx *vmx, int vc uint64_t qual, gpa; bool retu; + CTASSERT((PINBASED_CTLS_ONE_SETTING & PINBASED_VIRTUAL_NMI) != 0); + CTASSERT((PINBASED_CTLS_ONE_SETTING & PINBASED_NMI_EXITING) != 0); + handled = 0; vmxctx = &vmx->ctx[vcpu]; @@ -1490,9 +1554,20 @@ vmx_exit_process(struct vmx *vmx, int vc vmcs_write(VMCS_ENTRY_EXCEPTION_ERROR, idtvec_err); } + /* + * If 'virtual NMIs' are being used and the VM-exit + * happened while injecting an NMI during the previous + * VM-entry, then clear "blocking by NMI" in the Guest + * Interruptibility-state. + */ + if ((idtvec_info & VMCS_INTR_T_MASK) == + VMCS_INTR_T_NMI) { + vmx_clear_nmi_blocking(vmx, vcpu); + } vmcs_write(VMCS_ENTRY_INST_LENGTH, vmexit->inst_length); } default: + idtvec_info = 0; break; } @@ -1553,7 +1628,6 @@ vmx_exit_process(struct vmx *vmx, int vc case EXIT_REASON_INTR_WINDOW: vmm_stat_incr(vmx->vm, vcpu, VMEXIT_INTR_WINDOW, 1); vmx_clear_int_window_exiting(vmx, vcpu); - VCPU_CTR0(vmx->vm, vcpu, "Disabling interrupt window exiting"); return (1); case EXIT_REASON_EXT_INTR: /* @@ -1566,8 +1640,8 @@ vmx_exit_process(struct vmx *vmx, int vc * this virtual interrupt during the subsequent VM enter. */ intr_info = vmcs_read(VMCS_EXIT_INTR_INFO); - KASSERT((intr_info & VMCS_INTR_INFO_VALID) != 0 && - VMCS_INTR_INFO_TYPE(intr_info) == 0, + KASSERT((intr_info & VMCS_INTR_VALID) != 0 && + (intr_info & VMCS_INTR_T_MASK) == VMCS_INTR_T_HWINTR, ("VM exit interruption info invalid: %#x", intr_info)); vmx_trigger_hostintr(intr_info & 0xff); @@ -1579,9 +1653,10 @@ vmx_exit_process(struct vmx *vmx, int vc return (1); case EXIT_REASON_NMI_WINDOW: /* Exit to allow the pending virtual NMI to be injected */ - vmm_stat_incr(vmx->vm, vcpu, VMEXIT_NMI_WINDOW, 1); + if (vm_nmi_pending(vmx->vm, vcpu)) + vmx_inject_nmi(vmx, vcpu); vmx_clear_nmi_window_exiting(vmx, vcpu); - VCPU_CTR0(vmx->vm, vcpu, "Disabling NMI window exiting"); + vmm_stat_incr(vmx->vm, vcpu, VMEXIT_NMI_WINDOW, 1); return (1); case EXIT_REASON_INOUT: vmm_stat_incr(vmx->vm, vcpu, VMEXIT_INOUT, 1); @@ -1597,6 +1672,31 @@ vmx_exit_process(struct vmx *vmx, int vc vmm_stat_incr(vmx->vm, vcpu, VMEXIT_CPUID, 1); handled = vmx_handle_cpuid(vmx->vm, vcpu, vmxctx); break; + case EXIT_REASON_EXCEPTION: + vmm_stat_incr(vmx->vm, vcpu, VMEXIT_EXCEPTION, 1); + intr_info = vmcs_read(VMCS_EXIT_INTR_INFO); + KASSERT((intr_info & VMCS_INTR_VALID) != 0, + ("VM exit interruption info invalid: %#x", intr_info)); + + /* + * If Virtual NMIs control is 1 and the VM-exit is due to a + * fault encountered during the execution of IRET then we must + * restore the state of "virtual-NMI blocking" before resuming + * the guest. + * + * See "Resuming Guest Software after Handling an Exception". + */ + if ((idtvec_info & VMCS_IDT_VEC_VALID) == 0 && + (intr_info & 0xff) != IDT_DF && + (intr_info & EXIT_QUAL_NMIUDTI) != 0) + vmx_restore_nmi_blocking(vmx, vcpu); + + /* + * The NMI has already been handled in vmx_exit_handle_nmi(). + */ + if ((intr_info & VMCS_INTR_T_MASK) == VMCS_INTR_T_NMI) + return (1); + break; case EXIT_REASON_EPT_FAULT: /* * If 'gpa' lies within the address space allocated to @@ -1616,6 +1716,17 @@ vmx_exit_process(struct vmx *vmx, int vc vmexit->u.inst_emul.cr3 = vmcs_guest_cr3(); vmm_stat_incr(vmx->vm, vcpu, VMEXIT_INST_EMUL, 1); } + /* + * If Virtual NMIs control is 1 and the VM-exit is due to an + * EPT fault during the execution of IRET then we must restore + * the state of "virtual-NMI blocking" before resuming. + * + * See description of "NMI unblocking due to IRET" in + * "Exit Qualification for EPT Violations". + */ + if ((idtvec_info & VMCS_IDT_VEC_VALID) == 0 && + (qual & EXIT_QUAL_NMIUDTI) != 0) + vmx_restore_nmi_blocking(vmx, vcpu); break; case EXIT_REASON_VIRTUALIZED_EOI: vmexit->exitcode = VM_EXITCODE_IOAPIC_EOI; @@ -1661,6 +1772,8 @@ vmx_exit_process(struct vmx *vmx, int vc */ vmexit->exitcode = VM_EXITCODE_VMX; vmexit->u.vmx.status = VM_SUCCESS; + vmexit->u.vmx.inst_type = 0; + vmexit->u.vmx.inst_error = 0; } else { /* * The exitcode and collateral have been populated. @@ -1724,6 +1837,36 @@ vmx_exit_inst_error(struct vmxctx *vmxct return (UNHANDLED); } +/* + * If the NMI-exiting VM execution control is set to '1' then an NMI in + * non-root operation causes a VM-exit. NMI blocking is in effect so it is + * sufficient to simply vector to the NMI handler via a software interrupt. + * However, this must be done before maskable interrupts are enabled + * otherwise the "iret" issued by an interrupt handler will incorrectly + * clear NMI blocking. + */ +static __inline void +vmx_exit_handle_nmi(struct vmx *vmx, int vcpuid, struct vm_exit *vmexit) +{ + uint32_t intr_info; + + KASSERT((read_rflags() & PSL_I) == 0, ("interrupts enabled")); + + if (vmexit->u.vmx.exit_reason != EXIT_REASON_EXCEPTION) + return; + + intr_info = vmcs_read(VMCS_EXIT_INTR_INFO); + KASSERT((intr_info & VMCS_INTR_VALID) != 0, + ("VM exit interruption info invalid: %#x", intr_info)); + + if ((intr_info & VMCS_INTR_T_MASK) == VMCS_INTR_T_NMI) { + KASSERT((intr_info & 0xff) == IDT_NMI, ("VM exit due " + "to NMI has invalid vector: %#x", intr_info)); + VCPU_CTR0(vmx->vm, vcpuid, "Vectoring to NMI handler"); + __asm __volatile("int $2"); + } +} + static int vmx_run(void *arg, int vcpu, register_t startrip, pmap_t pmap, void *rendezvous_cookie) @@ -1799,8 +1942,6 @@ vmx_run(void *arg, int vcpu, register_t vmx_run_trace(vmx, vcpu); rc = vmx_enter_guest(vmxctx, vmx, launched); - enable_intr(); - /* Collect some information for VM exit processing */ vmexit->rip = rip = vmcs_guest_rip(); vmexit->inst_length = vmexit_instruction_length(); @@ -1808,12 +1949,14 @@ vmx_run(void *arg, int vcpu, register_t vmexit->u.vmx.exit_qualification = vmcs_exit_qualification(); if (rc == VMX_GUEST_VMEXIT) { - launched = 1; + vmx_exit_handle_nmi(vmx, vcpu, vmexit); + enable_intr(); handled = vmx_exit_process(vmx, vcpu, vmexit); } else { + enable_intr(); handled = vmx_exit_inst_error(vmxctx, rc, vmexit); } - + launched = 1; vmx_exit_trace(vmx, vcpu, rip, exit_reason, handled); } while (handled); @@ -2053,11 +2196,11 @@ vmx_inject(void *arg, int vcpu, int type if (error) return (error); - if (info & VMCS_INTR_INFO_VALID) + if (info & VMCS_INTR_VALID) return (EAGAIN); info = vector | (type_map[type] << 8) | (code_valid ? 1 << 11 : 0); - info |= VMCS_INTR_INFO_VALID; + info |= VMCS_INTR_VALID; error = vmcs_setreg(vmcs, 0, VMCS_IDENT(VMCS_ENTRY_INTR_INFO), info); if (error != 0) return (error); Modified: stable/10/sys/amd64/vmm/vmm_stat.c ============================================================================== --- stable/10/sys/amd64/vmm/vmm_stat.c Fri May 23 19:06:35 2014 (r266592) +++ stable/10/sys/amd64/vmm/vmm_stat.c Fri May 23 19:39:58 2014 (r266593) @@ -152,3 +152,4 @@ VMM_STAT(VMEXIT_UNKNOWN, "number of vm e VMM_STAT(VMEXIT_ASTPENDING, "number of times astpending at exit"); VMM_STAT(VMEXIT_USERSPACE, "number of vm exits handled in userspace"); VMM_STAT(VMEXIT_RENDEZVOUS, "number of times rendezvous pending at exit"); +VMM_STAT(VMEXIT_EXCEPTION, "number of vm exits due to exceptions"); Modified: stable/10/sys/amd64/vmm/vmm_stat.h ============================================================================== --- stable/10/sys/amd64/vmm/vmm_stat.h Fri May 23 19:06:35 2014 (r266592) +++ stable/10/sys/amd64/vmm/vmm_stat.h Fri May 23 19:39:58 2014 (r266593) @@ -122,4 +122,5 @@ VMM_STAT_DECLARE(VMEXIT_UNKNOWN); VMM_STAT_DECLARE(VMEXIT_ASTPENDING); VMM_STAT_DECLARE(VMEXIT_USERSPACE); VMM_STAT_DECLARE(VMEXIT_RENDEZVOUS); +VMM_STAT_DECLARE(VMEXIT_EXCEPTION); #endif From owner-svn-src-stable@FreeBSD.ORG Fri May 23 19:43:21 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B60233D7; Fri, 23 May 2014 19:43:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96BDB2FBD; Fri, 23 May 2014 19:43:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4NJhL14016179; Fri, 23 May 2014 19:43:21 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4NJhL0M016176; Fri, 23 May 2014 19:43:21 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201405231943.s4NJhL0M016176@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Fri, 23 May 2014 19:43:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266594 - in stable/10/sys: dev/drm2/radeon modules/drm2/radeonkms X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2014 19:43:21 -0000 Author: dumbbell Date: Fri May 23 19:43:20 2014 New Revision: 266594 URL: http://svnweb.freebsd.org/changeset/base/266594 Log: drm/radeon: Add 32bit ioctls support This allows to run 32bit applications on a 64bit host. This was tested successfully with Wine (emulators/i386-wine-devel) and StarCraft II. Submitted by: Jan Kokemüller Modified: stable/10/sys/dev/drm2/radeon/radeon_drv.c stable/10/sys/dev/drm2/radeon/radeon_ioc32.c stable/10/sys/modules/drm2/radeonkms/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/drm2/radeon/radeon_drv.c ============================================================================== --- stable/10/sys/dev/drm2/radeon/radeon_drv.c Fri May 23 19:39:58 2014 (r266593) +++ stable/10/sys/dev/drm2/radeon/radeon_drv.c Fri May 23 19:43:20 2014 (r266594) @@ -85,6 +85,10 @@ extern int radeon_get_crtc_scanoutpos(st int *vpos, int *hpos); extern struct drm_ioctl_desc radeon_ioctls_kms[]; extern int radeon_max_kms_ioctl; +#ifdef COMPAT_FREEBSD32 +extern struct drm_ioctl_desc radeon_compat_ioctls[]; +extern int radeon_num_compat_ioctls; +#endif #ifdef DUMBBELL_WIP int radeon_mmap(struct file *filp, struct vm_area_struct *vma); #endif /* DUMBBELL_WIP */ @@ -466,6 +470,10 @@ radeon_attach(device_t kdev) if (radeon_modeset == 1) { kms_driver.driver_features |= DRIVER_MODESET; kms_driver.max_ioctl = radeon_max_kms_ioctl; +#ifdef COMPAT_FREEBSD32 + kms_driver.compat_ioctls = radeon_compat_ioctls; + kms_driver.compat_ioctls_nr = &radeon_num_compat_ioctls; +#endif radeon_register_atpx_handler(); } dev->driver = &kms_driver; Modified: stable/10/sys/dev/drm2/radeon/radeon_ioc32.c ============================================================================== --- stable/10/sys/dev/drm2/radeon/radeon_ioc32.c Fri May 23 19:39:58 2014 (r266593) +++ stable/10/sys/dev/drm2/radeon/radeon_ioc32.c Fri May 23 19:43:20 2014 (r266594) @@ -31,10 +31,13 @@ #include __FBSDID("$FreeBSD$"); -#include +#include "opt_compat.h" -#include -#include +#ifdef COMPAT_FREEBSD32 + +#include +#include +#include #include "radeon_drv.h" typedef struct drm_radeon_init32 { @@ -60,42 +63,37 @@ typedef struct drm_radeon_init32 { u32 gart_textures_offset; } drm_radeon_init32_t; -static int compat_radeon_cp_init(struct file *file, unsigned int cmd, - unsigned long arg) +static int compat_radeon_cp_init(struct drm_device *dev, void *arg, + struct drm_file *file_priv) { - drm_radeon_init32_t init32; - drm_radeon_init_t __user *init; + drm_radeon_init32_t *init32; + drm_radeon_init_t __user init; - if (copy_from_user(&init32, (void __user *)arg, sizeof(init32))) - return -EFAULT; + init32 = arg; - init = compat_alloc_user_space(sizeof(*init)); - if (!access_ok(VERIFY_WRITE, init, sizeof(*init)) - || __put_user(init32.func, &init->func) - || __put_user(init32.sarea_priv_offset, &init->sarea_priv_offset) - || __put_user(init32.is_pci, &init->is_pci) - || __put_user(init32.cp_mode, &init->cp_mode) - || __put_user(init32.gart_size, &init->gart_size) - || __put_user(init32.ring_size, &init->ring_size) - || __put_user(init32.usec_timeout, &init->usec_timeout) - || __put_user(init32.fb_bpp, &init->fb_bpp) - || __put_user(init32.front_offset, &init->front_offset) - || __put_user(init32.front_pitch, &init->front_pitch) - || __put_user(init32.back_offset, &init->back_offset) - || __put_user(init32.back_pitch, &init->back_pitch) - || __put_user(init32.depth_bpp, &init->depth_bpp) - || __put_user(init32.depth_offset, &init->depth_offset) - || __put_user(init32.depth_pitch, &init->depth_pitch) - || __put_user(init32.fb_offset, &init->fb_offset) - || __put_user(init32.mmio_offset, &init->mmio_offset) - || __put_user(init32.ring_offset, &init->ring_offset) - || __put_user(init32.ring_rptr_offset, &init->ring_rptr_offset) - || __put_user(init32.buffers_offset, &init->buffers_offset) - || __put_user(init32.gart_textures_offset, - &init->gart_textures_offset)) - return -EFAULT; + init.func = init32->func; + init.sarea_priv_offset = (unsigned long)init32->sarea_priv_offset; + init.is_pci = init32->is_pci; + init.cp_mode = init32->cp_mode; + init.gart_size = init32->gart_size; + init.ring_size = init32->ring_size; + init.usec_timeout = init32->usec_timeout; + init.fb_bpp = init32->fb_bpp; + init.front_offset = init32->front_offset; + init.front_pitch = init32->front_pitch; + init.back_offset = init32->back_offset; + init.back_pitch = init32->back_pitch; + init.depth_bpp = init32->depth_bpp; + init.depth_offset = init32->depth_offset; + init.depth_pitch = init32->depth_pitch; + init.fb_offset = (unsigned long)init32->fb_offset; + init.mmio_offset = (unsigned long)init32->mmio_offset; + init.ring_offset = (unsigned long)init32->ring_offset; + init.ring_rptr_offset = (unsigned long)init32->ring_rptr_offset; + init.buffers_offset = (unsigned long)init32->buffers_offset; + init.gart_textures_offset = (unsigned long)init32->gart_textures_offset; - return drm_ioctl(file, DRM_IOCTL_RADEON_CP_INIT, (unsigned long)init); + return radeon_cp_init(dev, &init, file_priv); } typedef struct drm_radeon_clear32 { @@ -107,50 +105,37 @@ typedef struct drm_radeon_clear32 { u32 depth_boxes; } drm_radeon_clear32_t; -static int compat_radeon_cp_clear(struct file *file, unsigned int cmd, - unsigned long arg) +static int compat_radeon_cp_clear(struct drm_device *dev, void *arg, + struct drm_file *file_priv) { - drm_radeon_clear32_t clr32; - drm_radeon_clear_t __user *clr; + drm_radeon_clear32_t *clr32; + drm_radeon_clear_t __user clr; - if (copy_from_user(&clr32, (void __user *)arg, sizeof(clr32))) - return -EFAULT; + clr32 = arg; - clr = compat_alloc_user_space(sizeof(*clr)); - if (!access_ok(VERIFY_WRITE, clr, sizeof(*clr)) - || __put_user(clr32.flags, &clr->flags) - || __put_user(clr32.clear_color, &clr->clear_color) - || __put_user(clr32.clear_depth, &clr->clear_depth) - || __put_user(clr32.color_mask, &clr->color_mask) - || __put_user(clr32.depth_mask, &clr->depth_mask) - || __put_user((void __user *)(unsigned long)clr32.depth_boxes, - &clr->depth_boxes)) - return -EFAULT; + clr.flags = clr32->flags; + clr.clear_color = clr32->clear_color; + clr.clear_depth = clr32->clear_depth; + clr.color_mask = clr32->color_mask; + clr.depth_mask = clr32->depth_mask; + clr.depth_boxes = (drm_radeon_clear_rect_t *)(unsigned long)clr32->depth_boxes; - return drm_ioctl(file, DRM_IOCTL_RADEON_CLEAR, (unsigned long)clr); + return radeon_ioctls[DRM_IOCTL_RADEON_CLEAR].func(dev, &clr, file_priv); } typedef struct drm_radeon_stipple32 { u32 mask; } drm_radeon_stipple32_t; -static int compat_radeon_cp_stipple(struct file *file, unsigned int cmd, - unsigned long arg) +static int compat_radeon_cp_stipple(struct drm_device *dev, void *arg, + struct drm_file *file_priv) { drm_radeon_stipple32_t __user *argp = (void __user *)arg; - drm_radeon_stipple_t __user *request; - u32 mask; + drm_radeon_stipple_t __user request; - if (get_user(mask, &argp->mask)) - return -EFAULT; + request.mask = (unsigned int *)(unsigned long)argp->mask; - request = compat_alloc_user_space(sizeof(*request)); - if (!access_ok(VERIFY_WRITE, request, sizeof(*request)) - || __put_user((unsigned int __user *)(unsigned long)mask, - &request->mask)) - return -EFAULT; - - return drm_ioctl(file, DRM_IOCTL_RADEON_STIPPLE, (unsigned long)request); + return radeon_ioctls[DRM_IOCTL_RADEON_STIPPLE].func(dev, &request, file_priv); } typedef struct drm_radeon_tex_image32 { @@ -168,43 +153,32 @@ typedef struct drm_radeon_texture32 { u32 image; } drm_radeon_texture32_t; -static int compat_radeon_cp_texture(struct file *file, unsigned int cmd, - unsigned long arg) +static int compat_radeon_cp_texture(struct drm_device *dev, void *arg, + struct drm_file *file_priv) { - drm_radeon_texture32_t req32; - drm_radeon_texture_t __user *request; - drm_radeon_tex_image32_t img32; - drm_radeon_tex_image_t __user *image; - - if (copy_from_user(&req32, (void __user *)arg, sizeof(req32))) - return -EFAULT; - if (req32.image == 0) + drm_radeon_texture32_t *req32; + drm_radeon_texture_t __user request; + drm_radeon_tex_image32_t *img32; + drm_radeon_tex_image_t __user image; + + req32 = arg; + if (req32->image == 0) return -EINVAL; - if (copy_from_user(&img32, (void __user *)(unsigned long)req32.image, - sizeof(img32))) - return -EFAULT; - - request = compat_alloc_user_space(sizeof(*request) + sizeof(*image)); - if (!access_ok(VERIFY_WRITE, request, - sizeof(*request) + sizeof(*image))) - return -EFAULT; - image = (drm_radeon_tex_image_t __user *) (request + 1); - - if (__put_user(req32.offset, &request->offset) - || __put_user(req32.pitch, &request->pitch) - || __put_user(req32.format, &request->format) - || __put_user(req32.width, &request->width) - || __put_user(req32.height, &request->height) - || __put_user(image, &request->image) - || __put_user(img32.x, &image->x) - || __put_user(img32.y, &image->y) - || __put_user(img32.width, &image->width) - || __put_user(img32.height, &image->height) - || __put_user((const void __user *)(unsigned long)img32.data, - &image->data)) - return -EFAULT; + img32 = (drm_radeon_tex_image32_t *)(unsigned long)req32->image; - return drm_ioctl(file, DRM_IOCTL_RADEON_TEXTURE, (unsigned long)request); + request.offset = req32->offset; + request.pitch = req32->pitch; + request.format = req32->format; + request.width = req32->width; + request.height = req32->height; + request.image = ℑ + image.x = img32->x; + image.y = img32->y; + image.width = img32->width; + image.height = img32->height; + image.data = (void *)(unsigned long)img32->data; + + return radeon_ioctls[DRM_IOCTL_RADEON_TEXTURE].func(dev, &request, file_priv); } typedef struct drm_radeon_vertex2_32 { @@ -216,28 +190,22 @@ typedef struct drm_radeon_vertex2_32 { u32 prim; } drm_radeon_vertex2_32_t; -static int compat_radeon_cp_vertex2(struct file *file, unsigned int cmd, - unsigned long arg) +static int compat_radeon_cp_vertex2(struct drm_device *dev, void *arg, + struct drm_file *file_priv) { - drm_radeon_vertex2_32_t req32; - drm_radeon_vertex2_t __user *request; + drm_radeon_vertex2_32_t *req32; + drm_radeon_vertex2_t __user request; - if (copy_from_user(&req32, (void __user *)arg, sizeof(req32))) - return -EFAULT; + req32 = arg; - request = compat_alloc_user_space(sizeof(*request)); - if (!access_ok(VERIFY_WRITE, request, sizeof(*request)) - || __put_user(req32.idx, &request->idx) - || __put_user(req32.discard, &request->discard) - || __put_user(req32.nr_states, &request->nr_states) - || __put_user((void __user *)(unsigned long)req32.state, - &request->state) - || __put_user(req32.nr_prims, &request->nr_prims) - || __put_user((void __user *)(unsigned long)req32.prim, - &request->prim)) - return -EFAULT; + request.idx = req32->idx; + request.discard = req32->discard; + request.nr_states = req32->nr_states; + request.state = (drm_radeon_state_t *)(unsigned long)req32->state; + request.nr_prims = req32->nr_prims; + request.prim = (drm_radeon_prim_t *)(unsigned long)req32->prim; - return drm_ioctl(file, DRM_IOCTL_RADEON_VERTEX2, (unsigned long)request); + return radeon_ioctls[DRM_IOCTL_RADEON_VERTEX2].func(dev, &request, file_priv); } typedef struct drm_radeon_cmd_buffer32 { @@ -247,26 +215,20 @@ typedef struct drm_radeon_cmd_buffer32 { u32 boxes; } drm_radeon_cmd_buffer32_t; -static int compat_radeon_cp_cmdbuf(struct file *file, unsigned int cmd, - unsigned long arg) +static int compat_radeon_cp_cmdbuf(struct drm_device *dev, void *arg, + struct drm_file *file_priv) { - drm_radeon_cmd_buffer32_t req32; - drm_radeon_cmd_buffer_t __user *request; + drm_radeon_cmd_buffer32_t *req32; + drm_radeon_cmd_buffer_t __user request; - if (copy_from_user(&req32, (void __user *)arg, sizeof(req32))) - return -EFAULT; + req32 = arg; - request = compat_alloc_user_space(sizeof(*request)); - if (!access_ok(VERIFY_WRITE, request, sizeof(*request)) - || __put_user(req32.bufsz, &request->bufsz) - || __put_user((void __user *)(unsigned long)req32.buf, - &request->buf) - || __put_user(req32.nbox, &request->nbox) - || __put_user((void __user *)(unsigned long)req32.boxes, - &request->boxes)) - return -EFAULT; + request.bufsz = req32->bufsz; + request.buf = (char *)(unsigned long)req32->buf; + request.nbox = req32->nbox; + request.boxes = (struct drm_clip_rect *)(unsigned long)req32->boxes; - return drm_ioctl(file, DRM_IOCTL_RADEON_CMDBUF, (unsigned long)request); + return radeon_ioctls[DRM_IOCTL_RADEON_CMDBUF].func(dev, &request, file_priv); } typedef struct drm_radeon_getparam32 { @@ -274,23 +236,18 @@ typedef struct drm_radeon_getparam32 { u32 value; } drm_radeon_getparam32_t; -static int compat_radeon_cp_getparam(struct file *file, unsigned int cmd, - unsigned long arg) +static int compat_radeon_cp_getparam(struct drm_device *dev, void *arg, + struct drm_file *file_priv) { - drm_radeon_getparam32_t req32; - drm_radeon_getparam_t __user *request; + drm_radeon_getparam32_t *req32; + drm_radeon_getparam_t __user request; - if (copy_from_user(&req32, (void __user *)arg, sizeof(req32))) - return -EFAULT; + req32 = arg; - request = compat_alloc_user_space(sizeof(*request)); - if (!access_ok(VERIFY_WRITE, request, sizeof(*request)) - || __put_user(req32.param, &request->param) - || __put_user((void __user *)(unsigned long)req32.value, - &request->value)) - return -EFAULT; + request.param = req32->param; + request.value = (void *)(unsigned long)req32->value; - return drm_ioctl(file, DRM_IOCTL_RADEON_GETPARAM, (unsigned long)request); + return radeon_ioctls[DRM_IOCTL_RADEON_GETPARAM].func(dev, &request, file_priv); } typedef struct drm_radeon_mem_alloc32 { @@ -300,129 +257,71 @@ typedef struct drm_radeon_mem_alloc32 { u32 region_offset; /* offset from start of fb or GART */ } drm_radeon_mem_alloc32_t; -static int compat_radeon_mem_alloc(struct file *file, unsigned int cmd, - unsigned long arg) +static int compat_radeon_mem_alloc(struct drm_device *dev, void *arg, + struct drm_file *file_priv) { - drm_radeon_mem_alloc32_t req32; - drm_radeon_mem_alloc_t __user *request; + drm_radeon_mem_alloc32_t *req32; + drm_radeon_mem_alloc_t __user request; - if (copy_from_user(&req32, (void __user *)arg, sizeof(req32))) - return -EFAULT; + req32 = arg; - request = compat_alloc_user_space(sizeof(*request)); - if (!access_ok(VERIFY_WRITE, request, sizeof(*request)) - || __put_user(req32.region, &request->region) - || __put_user(req32.alignment, &request->alignment) - || __put_user(req32.size, &request->size) - || __put_user((int __user *)(unsigned long)req32.region_offset, - &request->region_offset)) - return -EFAULT; + request.region = req32->region; + request.alignment = req32->alignment; + request.size = req32->size; + request.region_offset = (int *)(unsigned long)req32->region_offset; - return drm_ioctl(file, DRM_IOCTL_RADEON_ALLOC, (unsigned long)request); + return radeon_mem_alloc(dev, &request, file_priv); } typedef struct drm_radeon_irq_emit32 { u32 irq_seq; } drm_radeon_irq_emit32_t; -static int compat_radeon_irq_emit(struct file *file, unsigned int cmd, - unsigned long arg) +static int compat_radeon_irq_emit(struct drm_device *dev, void *arg, + struct drm_file *file_priv) { - drm_radeon_irq_emit32_t req32; - drm_radeon_irq_emit_t __user *request; + drm_radeon_irq_emit32_t *req32; + drm_radeon_irq_emit_t __user request; - if (copy_from_user(&req32, (void __user *)arg, sizeof(req32))) - return -EFAULT; + req32 = arg; - request = compat_alloc_user_space(sizeof(*request)); - if (!access_ok(VERIFY_WRITE, request, sizeof(*request)) - || __put_user((int __user *)(unsigned long)req32.irq_seq, - &request->irq_seq)) - return -EFAULT; + request.irq_seq = (int *)(unsigned long)req32->irq_seq; - return drm_ioctl(file, DRM_IOCTL_RADEON_IRQ_EMIT, (unsigned long)request); + return radeon_irq_emit(dev, &request, file_priv); } /* The two 64-bit arches where alignof(u64)==4 in 32-bit code */ -#if defined (CONFIG_X86_64) || defined(CONFIG_IA64) typedef struct drm_radeon_setparam32 { int param; u64 value; } __attribute__((packed)) drm_radeon_setparam32_t; -static int compat_radeon_cp_setparam(struct file *file, unsigned int cmd, - unsigned long arg) +static int compat_radeon_cp_setparam(struct drm_device *dev, void *arg, + struct drm_file *file_priv) { - drm_radeon_setparam32_t req32; - drm_radeon_setparam_t __user *request; - - if (copy_from_user(&req32, (void __user *) arg, sizeof(req32))) - return -EFAULT; + drm_radeon_setparam32_t *req32; + drm_radeon_setparam_t __user request; - request = compat_alloc_user_space(sizeof(*request)); - if (!access_ok(VERIFY_WRITE, request, sizeof(*request)) - || __put_user(req32.param, &request->param) - || __put_user((void __user *)(unsigned long)req32.value, - &request->value)) - return -EFAULT; + req32 = arg; - return drm_ioctl(file, DRM_IOCTL_RADEON_SETPARAM, (unsigned long) request); -} -#else -#define compat_radeon_cp_setparam NULL -#endif /* X86_64 || IA64 */ - -static drm_ioctl_compat_t *radeon_compat_ioctls[] = { - [DRM_RADEON_CP_INIT] = compat_radeon_cp_init, - [DRM_RADEON_CLEAR] = compat_radeon_cp_clear, - [DRM_RADEON_STIPPLE] = compat_radeon_cp_stipple, - [DRM_RADEON_TEXTURE] = compat_radeon_cp_texture, - [DRM_RADEON_VERTEX2] = compat_radeon_cp_vertex2, - [DRM_RADEON_CMDBUF] = compat_radeon_cp_cmdbuf, - [DRM_RADEON_GETPARAM] = compat_radeon_cp_getparam, - [DRM_RADEON_SETPARAM] = compat_radeon_cp_setparam, - [DRM_RADEON_ALLOC] = compat_radeon_mem_alloc, - [DRM_RADEON_IRQ_EMIT] = compat_radeon_irq_emit, + request.param = req32->param; + request.value = req32->value; + + return radeon_ioctls[DRM_IOCTL_RADEON_SETPARAM].func(dev, &request, file_priv); +} + +struct drm_ioctl_desc radeon_compat_ioctls[] = { + DRM_IOCTL_DEF(DRM_RADEON_CP_INIT, compat_radeon_cp_init, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), + DRM_IOCTL_DEF(DRM_RADEON_CLEAR, compat_radeon_cp_clear, DRM_AUTH), + DRM_IOCTL_DEF(DRM_RADEON_STIPPLE, compat_radeon_cp_stipple, DRM_AUTH), + DRM_IOCTL_DEF(DRM_RADEON_TEXTURE, compat_radeon_cp_texture, DRM_AUTH), + DRM_IOCTL_DEF(DRM_RADEON_VERTEX2, compat_radeon_cp_vertex2, DRM_AUTH), + DRM_IOCTL_DEF(DRM_RADEON_CMDBUF, compat_radeon_cp_cmdbuf, DRM_AUTH), + DRM_IOCTL_DEF(DRM_RADEON_GETPARAM, compat_radeon_cp_getparam, DRM_AUTH), + DRM_IOCTL_DEF(DRM_RADEON_SETPARAM, compat_radeon_cp_setparam, DRM_AUTH), + DRM_IOCTL_DEF(DRM_RADEON_ALLOC, compat_radeon_mem_alloc, DRM_AUTH), + DRM_IOCTL_DEF(DRM_RADEON_IRQ_EMIT, compat_radeon_irq_emit, DRM_AUTH) }; +int radeon_num_compat_ioctls = DRM_ARRAY_SIZE(radeon_compat_ioctls); -/** - * Called whenever a 32-bit process running under a 64-bit kernel - * performs an ioctl on /dev/dri/card. - * - * \param filp file pointer. - * \param cmd command. - * \param arg user argument. - * \return zero on success or negative number on failure. - */ -long radeon_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) -{ - unsigned int nr = DRM_IOCTL_NR(cmd); - drm_ioctl_compat_t *fn = NULL; - int ret; - - if (nr < DRM_COMMAND_BASE) - return drm_compat_ioctl(filp, cmd, arg); - - if (nr < DRM_COMMAND_BASE + DRM_ARRAY_SIZE(radeon_compat_ioctls)) - fn = radeon_compat_ioctls[nr - DRM_COMMAND_BASE]; - - if (fn != NULL) - ret = (*fn) (filp, cmd, arg); - else - ret = drm_ioctl(filp, cmd, arg); - - return ret; -} - -long radeon_kms_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) -{ - unsigned int nr = DRM_IOCTL_NR(cmd); - int ret; - - if (nr < DRM_COMMAND_BASE) - return drm_compat_ioctl(filp, cmd, arg); - - ret = drm_ioctl(filp, cmd, arg); - - return ret; -} +#endif Modified: stable/10/sys/modules/drm2/radeonkms/Makefile ============================================================================== --- stable/10/sys/modules/drm2/radeonkms/Makefile Fri May 23 19:39:58 2014 (r266593) +++ stable/10/sys/modules/drm2/radeonkms/Makefile Fri May 23 19:43:20 2014 (r266594) @@ -88,7 +88,10 @@ SRCS += \ si.c \ si_blit_shaders.c -#radeon_ioc32.c +.if ${MACHINE_CPUARCH} == "amd64" +SRCS += radeon_ioc32.c +.endif + #radeon_prime.c #--radeon_trace_points.c From owner-svn-src-stable@FreeBSD.ORG Sat May 24 09:50:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17CC2137; Sat, 24 May 2014 09:50:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 04AEF2C6E; Sat, 24 May 2014 09:50:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4O9oAFu098166; Sat, 24 May 2014 09:50:10 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4O9oAX7098165; Sat, 24 May 2014 09:50:10 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201405240950.s4O9oAX7098165@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 24 May 2014 09:50:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266607 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 May 2014 09:50:11 -0000 Author: kib Date: Sat May 24 09:50:10 2014 New Revision: 266607 URL: http://svnweb.freebsd.org/changeset/base/266607 Log: MFC r266491: Remove redundand loop. Modified: stable/10/sys/vm/vm_fault.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_fault.c ============================================================================== --- stable/10/sys/vm/vm_fault.c Sat May 24 09:29:23 2014 (r266606) +++ stable/10/sys/vm/vm_fault.c Sat May 24 09:50:10 2014 (r266607) @@ -1340,18 +1340,16 @@ again: /* * Allocate a page in the destination object. */ - do { - dst_m = vm_page_alloc(dst_object, - (src_object == dst_object ? src_pindex : - 0) + dst_pindex, VM_ALLOC_NORMAL); - if (dst_m == NULL) { - VM_OBJECT_WUNLOCK(dst_object); - VM_OBJECT_RUNLOCK(object); - VM_WAIT; - VM_OBJECT_WLOCK(dst_object); - goto again; - } - } while (dst_m == NULL); + dst_m = vm_page_alloc(dst_object, (src_object == + dst_object ? src_pindex : 0) + dst_pindex, + VM_ALLOC_NORMAL); + if (dst_m == NULL) { + VM_OBJECT_WUNLOCK(dst_object); + VM_OBJECT_RUNLOCK(object); + VM_WAIT; + VM_OBJECT_WLOCK(dst_object); + goto again; + } pmap_copy_page(src_m, dst_m); VM_OBJECT_RUNLOCK(object); dst_m->valid = VM_PAGE_BITS_ALL; From owner-svn-src-stable@FreeBSD.ORG Sat May 24 10:20:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 784554B3; Sat, 24 May 2014 10:20:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 647C32E75; Sat, 24 May 2014 10:20:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4OAKv41011718; Sat, 24 May 2014 10:20:57 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4OAKvq4011717; Sat, 24 May 2014 10:20:57 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405241020.s4OAKvq4011717@svn.freebsd.org> From: Alexander Motin Date: Sat, 24 May 2014 10:20:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266608 - stable/10/sys/geom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 May 2014 10:20:57 -0000 Author: mav Date: Sat May 24 10:20:56 2014 New Revision: 266608 URL: http://svnweb.freebsd.org/changeset/base/266608 Log: MFC r266319: Make GEOM DISK to account also BIO_FLUSH operations. Modified: stable/10/sys/geom/geom_disk.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/geom_disk.c ============================================================================== --- stable/10/sys/geom/geom_disk.c Sat May 24 09:50:10 2014 (r266607) +++ stable/10/sys/geom/geom_disk.c Sat May 24 10:20:56 2014 (r266608) @@ -243,7 +243,7 @@ g_disk_done(struct bio *bp) if (bp2->bio_error == 0) bp2->bio_error = bp->bio_error; bp2->bio_completed += bp->bio_completed; - if ((bp->bio_cmd & (BIO_READ|BIO_WRITE|BIO_DELETE)) != 0) + if ((bp->bio_cmd & (BIO_READ|BIO_WRITE|BIO_DELETE|BIO_FLUSH)) != 0) devstat_end_transaction_bio_bt(sc->dp->d_devstat, bp, &now); bp2->bio_inbed++; if (bp2->bio_children == bp2->bio_inbed) { @@ -264,7 +264,7 @@ g_disk_done_single(struct bio *bp) bp->bio_completed = bp->bio_length - bp->bio_resid; bp->bio_done = (void *)bp->bio_to; bp->bio_to = LIST_FIRST(&bp->bio_disk->d_geom->provider); - if ((bp->bio_cmd & (BIO_READ|BIO_WRITE|BIO_DELETE)) != 0) { + if ((bp->bio_cmd & (BIO_READ|BIO_WRITE|BIO_DELETE|BIO_FLUSH)) != 0) { binuptime(&now); sc = bp->bio_to->private; mtx_lock(&sc->done_mtx); @@ -441,6 +441,9 @@ g_disk_start(struct bio *bp) bp->bio_disk = dp; bp->bio_to = (void *)bp->bio_done; bp->bio_done = g_disk_done_single; + mtx_lock(&sc->start_mtx); + devstat_start_transaction_bio(dp->d_devstat, bp); + mtx_unlock(&sc->start_mtx); g_disk_lock_giant(dp); dp->d_strategy(bp); g_disk_unlock_giant(dp); From owner-svn-src-stable@FreeBSD.ORG Sat May 24 10:37:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D8EF904; Sat, 24 May 2014 10:37:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A0582FCC; Sat, 24 May 2014 10:37:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4OAbuXA019687; Sat, 24 May 2014 10:37:56 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4OAbuBp019685; Sat, 24 May 2014 10:37:56 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405241037.s4OAbuBp019685@svn.freebsd.org> From: Alexander Motin Date: Sat, 24 May 2014 10:37:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266610 - stable/10/usr.sbin/gstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 May 2014 10:37:57 -0000 Author: mav Date: Sat May 24 10:37:56 2014 New Revision: 266610 URL: http://svnweb.freebsd.org/changeset/base/266610 Log: MFC r266320: Add -o option to gstat to display "other" operatins (e.g. BIO_FLUSH). Modified: stable/10/usr.sbin/gstat/gstat.8 stable/10/usr.sbin/gstat/gstat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/gstat/gstat.8 ============================================================================== --- stable/10/usr.sbin/gstat/gstat.8 Sat May 24 10:23:06 2014 (r266609) +++ stable/10/usr.sbin/gstat/gstat.8 Sat May 24 10:37:56 2014 (r266610) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 12, 2009 +.Dd May 17, 2014 .Dt GSTAT 8 .Os .Sh NAME @@ -32,7 +32,7 @@ .Nd print statistics about GEOM disks .Sh SYNOPSIS .Nm -.Op Fl abcd +.Op Fl abcdo .Op Fl f Ar filter .Op Fl I Ar interval .Sh DESCRIPTION @@ -69,6 +69,9 @@ Only devices with the names matching will be displayed. The format of the regular expression is described in .Xr re_format 7 . +.It Fl o +Enable display of statistics for other operations +.Pq Dv BIO_FLUSH . .It Fl I Ar interval Refresh the .Nm Modified: stable/10/usr.sbin/gstat/gstat.c ============================================================================== --- stable/10/usr.sbin/gstat/gstat.c Sat May 24 10:23:06 2014 (r266609) +++ stable/10/usr.sbin/gstat/gstat.c Sat May 24 10:37:56 2014 (r266610) @@ -51,7 +51,7 @@ #include #include -static int flag_a, flag_b, flag_c, flag_d; +static int flag_a, flag_b, flag_c, flag_d, flag_o; static int flag_I = 1000000; #define PRINTMSG(...) do { \ @@ -88,7 +88,7 @@ main(int argc, char **argv) char *p; char f_s[100], pf_s[100], tmp_f_s[100]; const char *line; - long double ld[11]; + long double ld[13]; uint64_t u64; EditLine *el; History *hist; @@ -104,7 +104,7 @@ main(int argc, char **argv) flag_b = 1; f_s[0] = '\0'; - while ((i = getopt(argc, argv, "adcf:I:b")) != -1) { + while ((i = getopt(argc, argv, "abdcf:oI:")) != -1) { switch (i) { case 'a': flag_a = 1; @@ -126,6 +126,9 @@ main(int argc, char **argv) "Invalid filter - see re_format(7)"); strncpy(f_s, optarg, sizeof(f_s)); break; + case 'o': + flag_o = 1; + break; case 'I': p = NULL; i = strtoul(optarg, &p, 0); @@ -229,6 +232,8 @@ main(int argc, char **argv) PRINTMSG(" w/s kBps ms/w "); if (flag_d) PRINTMSG(" d/s kBps ms/d "); + if (flag_o) + PRINTMSG(" o/s ms/o "); PRINTMSG("%%busy Name\n"); for (;;) { gsp = geom_stats_snapshot_next(sp); @@ -279,9 +284,14 @@ main(int argc, char **argv) DSM_MS_PER_TRANSACTION_WRITE, &ld[6], DSM_BUSY_PCT, &ld[7], + DSM_TRANSFERS_PER_SECOND_FREE, &ld[8], DSM_MB_PER_SECOND_FREE, &ld[9], DSM_MS_PER_TRANSACTION_FREE, &ld[10], + + DSM_TRANSFERS_PER_SECOND_OTHER, &ld[11], + DSM_MS_PER_TRANSACTION_OTHER, &ld[12], + DSM_NONE); if (flag_a && ld[7] < 0.1) { @@ -313,6 +323,14 @@ main(int argc, char **argv) PRINTMSG(" %6.1f", (double)ld[10]); } + if (flag_o) { + PRINTMSG(" %6.0f", (double)ld[11]); + if (ld[12] > 1e3) + PRINTMSG(" %6.0f", (double)ld[12]); + else + PRINTMSG(" %6.1f", (double)ld[12]); + } + if (ld[7] > 80) i = 3; else if (ld[7] > 50) From owner-svn-src-stable@FreeBSD.ORG Sat May 24 10:41:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A15FB44; Sat, 24 May 2014 10:41:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D16F8204E; Sat, 24 May 2014 10:41:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4OAfcJ7022476; Sat, 24 May 2014 10:41:38 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4OAfcLm022472; Sat, 24 May 2014 10:41:38 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405241041.s4OAfcLm022472@svn.freebsd.org> From: Alexander Motin Date: Sat, 24 May 2014 10:41:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266611 - in stable/10/cddl/contrib/opensolaris: cmd/zpool lib/libzfs/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 May 2014 10:41:39 -0000 Author: mav Date: Sat May 24 10:41:37 2014 New Revision: 266611 URL: http://svnweb.freebsd.org/changeset/base/266611 Log: MFC r265821: Comment out some pointless device open/close around reading device IDs. FreeBSD ZFS port unlike OpenSolaris does not use device IDs, and does not implement respective devid_*() fuctions. It is pointless to open devices just to close them back immediately. Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c Sat May 24 10:37:56 2014 (r266610) +++ stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c Sat May 24 10:41:37 2014 (r266611) @@ -512,6 +512,7 @@ make_leaf_vdev(const char *arg, uint64_t verify(nvlist_add_uint64(vdev, ZPOOL_CONFIG_WHOLE_DISK, (uint64_t)wholedisk) == 0); +#ifdef have_devid /* * For a whole disk, defer getting its devid until after labeling it. */ @@ -546,6 +547,7 @@ make_leaf_vdev(const char *arg, uint64_t (void) close(fd); } +#endif return (vdev); } Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Sat May 24 10:37:56 2014 (r266610) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Sat May 24 10:41:37 2014 (r266611) @@ -94,6 +94,7 @@ typedef struct pool_list { static char * get_devid(const char *path) { +#ifdef have_devid int fd; ddi_devid_t devid; char *minor, *ret; @@ -113,6 +114,9 @@ get_devid(const char *path) (void) close(fd); return (ret); +#else + return (NULL); +#endif } Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Sat May 24 10:37:56 2014 (r266610) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Sat May 24 10:41:37 2014 (r266611) @@ -3324,6 +3324,7 @@ devid_to_path(char *devid_str) static char * path_to_devid(const char *path) { +#ifdef have_devid int fd; ddi_devid_t devid; char *minor, *ret; @@ -3343,6 +3344,9 @@ path_to_devid(const char *path) (void) close(fd); return (ret); +#else + return (NULL); +#endif } /* From owner-svn-src-stable@FreeBSD.ORG Sat May 24 10:44:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9C836C84; Sat, 24 May 2014 10:44:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87A90205C; Sat, 24 May 2014 10:44:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4OAifeC023727; Sat, 24 May 2014 10:44:41 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4OAieRM023722; Sat, 24 May 2014 10:44:40 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405241044.s4OAieRM023722@svn.freebsd.org> From: Alexander Motin Date: Sat, 24 May 2014 10:44:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266612 - in stable/10/cddl: compat/opensolaris/include compat/opensolaris/misc lib/libzfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 May 2014 10:44:41 -0000 Author: mav Date: Sat May 24 10:44:40 2014 New Revision: 266612 URL: http://svnweb.freebsd.org/changeset/base/266612 Log: MFC r265689: Import adapted OpenSolaris' thread pool API implementation. The thread pool is used by libzfs to implement parallel disk scanning. Without this change our dummy wrapper made `zpool import ZZZ` command to scan all disks sequentially from the single thread when searching for pools. This change makes it use two threads per CPU, same as in OpenSolaris. On system with 200 HDDs this change reduces ZFS pool import time from 35 to 22 seconds. Added: stable/10/cddl/compat/opensolaris/misc/thread_pool.c - copied unchanged from r265689, head/cddl/compat/opensolaris/misc/thread_pool.c stable/10/cddl/compat/opensolaris/misc/thread_pool_impl.h - copied unchanged from r265689, head/cddl/compat/opensolaris/misc/thread_pool_impl.h Modified: stable/10/cddl/compat/opensolaris/include/thread_pool.h stable/10/cddl/lib/libzfs/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/compat/opensolaris/include/thread_pool.h ============================================================================== --- stable/10/cddl/compat/opensolaris/include/thread_pool.h Sat May 24 10:41:37 2014 (r266611) +++ stable/10/cddl/compat/opensolaris/include/thread_pool.h Sat May 24 10:44:40 2014 (r266612) @@ -1,39 +1,78 @@ -/*- - * Copyright (c) 2010 Pawel Jakub Dawidek - * All rights reserved. +/* + * CDDL HEADER START * - * 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. + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * - * THIS SOFTWARE IS PROVIDED BY THE AUTHORS 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 AUTHORS 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. + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* * $FreeBSD$ */ -#ifndef _OPENSOLARIS_THREAD_POOL_H_ -#define _OPENSOLARIS_THREAD_POOL_H_ +#ifndef _THREAD_POOL_H_ +#define _THREAD_POOL_H_ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct tpool tpool_t; /* opaque thread pool descriptor */ + +#if defined(__STDC__) + +extern tpool_t *tpool_create(uint_t min_threads, uint_t max_threads, + uint_t linger, pthread_attr_t *attr); +extern int tpool_dispatch(tpool_t *tpool, + void (*func)(void *), void *arg); +extern void tpool_destroy(tpool_t *tpool); +extern void tpool_abandon(tpool_t *tpool); +extern void tpool_wait(tpool_t *tpool); +extern void tpool_suspend(tpool_t *tpool); +extern int tpool_suspended(tpool_t *tpool); +extern void tpool_resume(tpool_t *tpool); +extern int tpool_member(tpool_t *tpool); + +#else /* Non ANSI */ + +extern tpool_t *tpool_create(); +extern int tpool_dispatch(); +extern void tpool_destroy(); +extern void tpool_abandon(); +extern void tpool_wait(); +extern void tpool_suspend(); +extern int tpool_suspended(); +extern void tpool_resume(); +extern int tpool_member(); -typedef int tpool_t; +#endif /* __STDC__ */ -#define tpool_create(a, b, c, d) (0) -#define tpool_dispatch(pool, func, arg) func(arg) -#define tpool_wait(pool) do { } while (0) -#define tpool_destroy(pool) do { } while (0) +#ifdef __cplusplus +} +#endif -#endif /* !_OPENSOLARIS_THREAD_POOL_H_ */ +#endif /* _THREAD_POOL_H_ */ Copied: stable/10/cddl/compat/opensolaris/misc/thread_pool.c (from r265689, head/cddl/compat/opensolaris/misc/thread_pool.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/cddl/compat/opensolaris/misc/thread_pool.c Sat May 24 10:44:40 2014 (r266612, copy of r265689, head/cddl/compat/opensolaris/misc/thread_pool.c) @@ -0,0 +1,430 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#include +__FBSDID("$FreeBSD$"); + +#pragma ident "%Z%%M% %I% %E% SMI" + +#include +#include +#include +#include "thread_pool_impl.h" + +typedef void (*_Voidfp)(void*); /* pointer to extern "C" function */ + +static void +delete_pool(tpool_t *tpool) +{ + tpool_job_t *job; + + /* + * There should be no pending jobs, but just in case... + */ + for (job = tpool->tp_head; job != NULL; job = tpool->tp_head) { + tpool->tp_head = job->tpj_next; + free(job); + } + (void) pthread_attr_destroy(&tpool->tp_attr); + free(tpool); +} + +/* + * Worker thread is terminating. + */ +static void +worker_cleanup(void *arg) +{ + tpool_t *tpool = arg; + + if (--tpool->tp_current == 0 && + (tpool->tp_flags & (TP_DESTROY | TP_ABANDON))) { + if (tpool->tp_flags & TP_ABANDON) { + pthread_mutex_unlock(&tpool->tp_mutex); + delete_pool(tpool); + return; + } + if (tpool->tp_flags & TP_DESTROY) + (void) pthread_cond_broadcast(&tpool->tp_busycv); + } + pthread_mutex_unlock(&tpool->tp_mutex); +} + +static void +notify_waiters(tpool_t *tpool) +{ + if (tpool->tp_head == NULL && tpool->tp_active == NULL) { + tpool->tp_flags &= ~TP_WAIT; + (void) pthread_cond_broadcast(&tpool->tp_waitcv); + } +} + +/* + * Called by a worker thread on return from a tpool_dispatch()d job. + */ +static void +job_cleanup(void *arg) +{ + tpool_t *tpool = arg; + pthread_t my_tid = pthread_self(); + tpool_active_t *activep; + tpool_active_t **activepp; + + pthread_mutex_lock(&tpool->tp_mutex); + /* CSTYLED */ + for (activepp = &tpool->tp_active;; activepp = &activep->tpa_next) { + activep = *activepp; + if (activep->tpa_tid == my_tid) { + *activepp = activep->tpa_next; + break; + } + } + if (tpool->tp_flags & TP_WAIT) + notify_waiters(tpool); +} + +static void * +tpool_worker(void *arg) +{ + tpool_t *tpool = (tpool_t *)arg; + int elapsed; + tpool_job_t *job; + void (*func)(void *); + tpool_active_t active; + sigset_t maskset; + + pthread_mutex_lock(&tpool->tp_mutex); + pthread_cleanup_push(worker_cleanup, tpool); + + /* + * This is the worker's main loop. + * It will only be left if a timeout or an error has occured. + */ + active.tpa_tid = pthread_self(); + for (;;) { + elapsed = 0; + tpool->tp_idle++; + if (tpool->tp_flags & TP_WAIT) + notify_waiters(tpool); + while ((tpool->tp_head == NULL || + (tpool->tp_flags & TP_SUSPEND)) && + !(tpool->tp_flags & (TP_DESTROY | TP_ABANDON))) { + if (tpool->tp_current <= tpool->tp_minimum || + tpool->tp_linger == 0) { + (void) pthread_cond_wait(&tpool->tp_workcv, + &tpool->tp_mutex); + } else { + struct timespec timeout; + + clock_gettime(CLOCK_MONOTONIC, &timeout); + timeout.tv_sec += tpool->tp_linger; + if (pthread_cond_timedwait(&tpool->tp_workcv, + &tpool->tp_mutex, &timeout) != 0) { + elapsed = 1; + break; + } + } + } + tpool->tp_idle--; + if (tpool->tp_flags & TP_DESTROY) + break; + if (tpool->tp_flags & TP_ABANDON) { + /* can't abandon a suspended pool */ + if (tpool->tp_flags & TP_SUSPEND) { + tpool->tp_flags &= ~TP_SUSPEND; + (void) pthread_cond_broadcast(&tpool->tp_workcv); + } + if (tpool->tp_head == NULL) + break; + } + if ((job = tpool->tp_head) != NULL && + !(tpool->tp_flags & TP_SUSPEND)) { + elapsed = 0; + func = job->tpj_func; + arg = job->tpj_arg; + tpool->tp_head = job->tpj_next; + if (job == tpool->tp_tail) + tpool->tp_tail = NULL; + tpool->tp_njobs--; + active.tpa_next = tpool->tp_active; + tpool->tp_active = &active; + pthread_mutex_unlock(&tpool->tp_mutex); + pthread_cleanup_push(job_cleanup, tpool); + free(job); + /* + * Call the specified function. + */ + func(arg); + /* + * We don't know what this thread has been doing, + * so we reset its signal mask and cancellation + * state back to the initial values. + */ + sigfillset(&maskset); + (void) pthread_sigmask(SIG_SETMASK, &maskset, NULL); + (void) pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, + NULL); + (void) pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, + NULL); + pthread_cleanup_pop(1); + } + if (elapsed && tpool->tp_current > tpool->tp_minimum) { + /* + * We timed out and there is no work to be done + * and the number of workers exceeds the minimum. + * Exit now to reduce the size of the pool. + */ + break; + } + } + pthread_cleanup_pop(1); + return (arg); +} + +/* + * Create a worker thread, with all signals blocked. + */ +static int +create_worker(tpool_t *tpool) +{ + sigset_t maskset, oset; + pthread_t thread; + int error; + + sigfillset(&maskset); + (void) pthread_sigmask(SIG_SETMASK, &maskset, &oset); + error = pthread_create(&thread, &tpool->tp_attr, tpool_worker, tpool); + (void) pthread_sigmask(SIG_SETMASK, &oset, NULL); + return (error); +} + +tpool_t * +tpool_create(uint_t min_threads, uint_t max_threads, uint_t linger, + pthread_attr_t *attr) +{ + tpool_t *tpool; + int error; + + if (min_threads > max_threads || max_threads < 1) { + errno = EINVAL; + return (NULL); + } + + tpool = malloc(sizeof (*tpool)); + if (tpool == NULL) { + errno = ENOMEM; + return (NULL); + } + bzero(tpool, sizeof(*tpool)); + (void) pthread_mutex_init(&tpool->tp_mutex, NULL); + (void) pthread_cond_init(&tpool->tp_busycv, NULL); + (void) pthread_cond_init(&tpool->tp_workcv, NULL); + (void) pthread_cond_init(&tpool->tp_waitcv, NULL); + tpool->tp_minimum = min_threads; + tpool->tp_maximum = max_threads; + tpool->tp_linger = linger; + + /* make all pool threads be detached daemon threads */ + (void) pthread_attr_init(&tpool->tp_attr); + (void) pthread_attr_setdetachstate(&tpool->tp_attr, + PTHREAD_CREATE_DETACHED); + + return (tpool); +} + +/* + * Dispatch a work request to the thread pool. + * If there are idle workers, awaken one. + * Else, if the maximum number of workers has + * not been reached, spawn a new worker thread. + * Else just return with the job added to the queue. + */ +int +tpool_dispatch(tpool_t *tpool, void (*func)(void *), void *arg) +{ + tpool_job_t *job; + + if ((job = malloc(sizeof (*job))) == NULL) + return (-1); + bzero(job, sizeof(*job)); + job->tpj_next = NULL; + job->tpj_func = func; + job->tpj_arg = arg; + + pthread_mutex_lock(&tpool->tp_mutex); + + if (tpool->tp_head == NULL) + tpool->tp_head = job; + else + tpool->tp_tail->tpj_next = job; + tpool->tp_tail = job; + tpool->tp_njobs++; + + if (!(tpool->tp_flags & TP_SUSPEND)) { + if (tpool->tp_idle > 0) + (void) pthread_cond_signal(&tpool->tp_workcv); + else if (tpool->tp_current < tpool->tp_maximum && + create_worker(tpool) == 0) + tpool->tp_current++; + } + + pthread_mutex_unlock(&tpool->tp_mutex); + return (0); +} + +/* + * Assumes: by the time tpool_destroy() is called no one will use this + * thread pool in any way and no one will try to dispatch entries to it. + * Calling tpool_destroy() from a job in the pool will cause deadlock. + */ +void +tpool_destroy(tpool_t *tpool) +{ + tpool_active_t *activep; + + pthread_mutex_lock(&tpool->tp_mutex); + pthread_cleanup_push((_Voidfp)pthread_mutex_unlock, &tpool->tp_mutex); + + /* mark the pool as being destroyed; wakeup idle workers */ + tpool->tp_flags |= TP_DESTROY; + tpool->tp_flags &= ~TP_SUSPEND; + (void) pthread_cond_broadcast(&tpool->tp_workcv); + + /* cancel all active workers */ + for (activep = tpool->tp_active; activep; activep = activep->tpa_next) + (void) pthread_cancel(activep->tpa_tid); + + /* wait for all active workers to finish */ + while (tpool->tp_active != NULL) { + tpool->tp_flags |= TP_WAIT; + (void) pthread_cond_wait(&tpool->tp_waitcv, &tpool->tp_mutex); + } + + /* the last worker to terminate will wake us up */ + while (tpool->tp_current != 0) + (void) pthread_cond_wait(&tpool->tp_busycv, &tpool->tp_mutex); + + pthread_cleanup_pop(1); /* pthread_mutex_unlock(&tpool->tp_mutex); */ + delete_pool(tpool); +} + +/* + * Like tpool_destroy(), but don't cancel workers or wait for them to finish. + * The last worker to terminate will delete the pool. + */ +void +tpool_abandon(tpool_t *tpool) +{ + + pthread_mutex_lock(&tpool->tp_mutex); + if (tpool->tp_current == 0) { + /* no workers, just delete the pool */ + pthread_mutex_unlock(&tpool->tp_mutex); + delete_pool(tpool); + } else { + /* wake up all workers, last one will delete the pool */ + tpool->tp_flags |= TP_ABANDON; + tpool->tp_flags &= ~TP_SUSPEND; + (void) pthread_cond_broadcast(&tpool->tp_workcv); + pthread_mutex_unlock(&tpool->tp_mutex); + } +} + +/* + * Wait for all jobs to complete. + * Calling tpool_wait() from a job in the pool will cause deadlock. + */ +void +tpool_wait(tpool_t *tpool) +{ + + pthread_mutex_lock(&tpool->tp_mutex); + pthread_cleanup_push((_Voidfp)pthread_mutex_unlock, &tpool->tp_mutex); + while (tpool->tp_head != NULL || tpool->tp_active != NULL) { + tpool->tp_flags |= TP_WAIT; + (void) pthread_cond_wait(&tpool->tp_waitcv, &tpool->tp_mutex); + } + pthread_cleanup_pop(1); /* pthread_mutex_unlock(&tpool->tp_mutex); */ +} + +void +tpool_suspend(tpool_t *tpool) +{ + + pthread_mutex_lock(&tpool->tp_mutex); + tpool->tp_flags |= TP_SUSPEND; + pthread_mutex_unlock(&tpool->tp_mutex); +} + +int +tpool_suspended(tpool_t *tpool) +{ + int suspended; + + pthread_mutex_lock(&tpool->tp_mutex); + suspended = (tpool->tp_flags & TP_SUSPEND) != 0; + pthread_mutex_unlock(&tpool->tp_mutex); + + return (suspended); +} + +void +tpool_resume(tpool_t *tpool) +{ + int excess; + + pthread_mutex_lock(&tpool->tp_mutex); + if (!(tpool->tp_flags & TP_SUSPEND)) { + pthread_mutex_unlock(&tpool->tp_mutex); + return; + } + tpool->tp_flags &= ~TP_SUSPEND; + (void) pthread_cond_broadcast(&tpool->tp_workcv); + excess = tpool->tp_njobs - tpool->tp_idle; + while (excess-- > 0 && tpool->tp_current < tpool->tp_maximum) { + if (create_worker(tpool) != 0) + break; /* pthread_create() failed */ + tpool->tp_current++; + } + pthread_mutex_unlock(&tpool->tp_mutex); +} + +int +tpool_member(tpool_t *tpool) +{ + pthread_t my_tid = pthread_self(); + tpool_active_t *activep; + + pthread_mutex_lock(&tpool->tp_mutex); + for (activep = tpool->tp_active; activep; activep = activep->tpa_next) { + if (activep->tpa_tid == my_tid) { + pthread_mutex_unlock(&tpool->tp_mutex); + return (1); + } + } + pthread_mutex_unlock(&tpool->tp_mutex); + return (0); +} Copied: stable/10/cddl/compat/opensolaris/misc/thread_pool_impl.h (from r265689, head/cddl/compat/opensolaris/misc/thread_pool_impl.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/cddl/compat/opensolaris/misc/thread_pool_impl.h Sat May 24 10:44:40 2014 (r266612, copy of r265689, head/cddl/compat/opensolaris/misc/thread_pool_impl.h) @@ -0,0 +1,99 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* + * $FreeBSD$ + */ + +#ifndef _THREAD_POOL_IMPL_H +#define _THREAD_POOL_IMPL_H + +#pragma ident "%Z%%M% %I% %E% SMI" + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Thread pool implementation definitions. + * See for interface declarations. + */ + +/* + * FIFO queued job + */ +typedef struct tpool_job tpool_job_t; +struct tpool_job { + tpool_job_t *tpj_next; /* list of jobs */ + void (*tpj_func)(void *); /* function to call */ + void *tpj_arg; /* its argument */ +}; + +/* + * List of active threads, linked through their stacks. + */ +typedef struct tpool_active tpool_active_t; +struct tpool_active { + tpool_active_t *tpa_next; /* list of active threads */ + pthread_t tpa_tid; /* active thread id */ +}; + +/* + * The thread pool. + */ +struct tpool { + tpool_t *tp_forw; /* circular list of all thread pools */ + tpool_t *tp_back; + mutex_t tp_mutex; /* protects the pool data */ + cond_t tp_busycv; /* synchronization in tpool_dispatch */ + cond_t tp_workcv; /* synchronization with workers */ + cond_t tp_waitcv; /* synchronization in tpool_wait() */ + tpool_active_t *tp_active; /* threads performing work */ + tpool_job_t *tp_head; /* FIFO job queue */ + tpool_job_t *tp_tail; + pthread_attr_t tp_attr; /* attributes of the workers */ + int tp_flags; /* see below */ + uint_t tp_linger; /* seconds before idle workers exit */ + int tp_njobs; /* number of jobs in job queue */ + int tp_minimum; /* minimum number of worker threads */ + int tp_maximum; /* maximum number of worker threads */ + int tp_current; /* current number of worker threads */ + int tp_idle; /* number of idle workers */ +}; + +/* tp_flags */ +#define TP_WAIT 0x01 /* waiting in tpool_wait() */ +#define TP_SUSPEND 0x02 /* pool is being suspended */ +#define TP_DESTROY 0x04 /* pool is being destroyed */ +#define TP_ABANDON 0x08 /* pool is abandoned (auto-destroy) */ + +#ifdef __cplusplus +} +#endif + +#endif /* _THREAD_POOL_IMPL_H */ Modified: stable/10/cddl/lib/libzfs/Makefile ============================================================================== --- stable/10/cddl/lib/libzfs/Makefile Sat May 24 10:41:37 2014 (r266611) +++ stable/10/cddl/lib/libzfs/Makefile Sat May 24 10:44:40 2014 (r266612) @@ -14,6 +14,7 @@ SRCS= deviceid.c \ fsshare.c \ mkdirp.c \ mnttab.c \ + thread_pool.c \ zmount.c \ zone.c From owner-svn-src-stable@FreeBSD.ORG Sat May 24 22:50:59 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 752519F4; Sat, 24 May 2014 22:50:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 622C92506; Sat, 24 May 2014 22:50:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4OMoxAN056872; Sat, 24 May 2014 22:50:59 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4OMoxfI056871; Sat, 24 May 2014 22:50:59 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201405242250.s4OMoxfI056871@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sat, 24 May 2014 22:50:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266632 - stable/10/lib/libfetch X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 May 2014 22:50:59 -0000 Author: des Date: Sat May 24 22:50:58 2014 New Revision: 266632 URL: http://svnweb.freebsd.org/changeset/base/266632 Log: MFH (r266291): look for root certs in /usr/local first Modified: stable/10/lib/libfetch/common.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libfetch/common.c ============================================================================== --- stable/10/lib/libfetch/common.c Sat May 24 22:46:00 2014 (r266631) +++ stable/10/lib/libfetch/common.c Sat May 24 22:50:58 2014 (r266632) @@ -688,6 +688,8 @@ fetch_ssl_setup_transport_layer(SSL_CTX /* * Configure peer verification based on environment. */ +#define LOCAL_CERT_FILE "/usr/local/etc/ssl/cert.pem" +#define BASE_CERT_FILE "/etc/ssl/cert.pem" static int fetch_ssl_setup_peer_verification(SSL_CTX *ctx, int verbose) { @@ -696,8 +698,12 @@ fetch_ssl_setup_peer_verification(SSL_CT const char *ca_cert_file, *ca_cert_path, *crl_file; if (getenv("SSL_NO_VERIFY_PEER") == NULL) { - ca_cert_file = getenv("SSL_CA_CERT_FILE") != NULL ? - getenv("SSL_CA_CERT_FILE") : "/etc/ssl/cert.pem"; + ca_cert_file = getenv("SSL_CA_CERT_FILE"); + if (ca_cert_file == NULL && + access(LOCAL_CERT_FILE, R_OK) == 0) + ca_cert_file = LOCAL_CERT_FILE; + if (ca_cert_file == NULL) + ca_cert_file = BASE_CERT_FILE; ca_cert_path = getenv("SSL_CA_CERT_PATH"); if (verbose) { fetch_info("Peer verification enabled"); From owner-svn-src-stable@FreeBSD.ORG Sun May 25 00:57:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B2D6651B; Sun, 25 May 2014 00:57:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9FF0F2CCD; Sun, 25 May 2014 00:57:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4P0v7jg011888; Sun, 25 May 2014 00:57:07 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4P0v7SK011887; Sun, 25 May 2014 00:57:07 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201405250057.s4P0v7SK011887@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 25 May 2014 00:57:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266640 - stable/10/libexec/rtld-elf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 May 2014 00:57:07 -0000 Author: kib Date: Sun May 25 00:57:07 2014 New Revision: 266640 URL: http://svnweb.freebsd.org/changeset/base/266640 Log: MFC r266411: Fix LD_LIBMAP. Modified: stable/10/libexec/rtld-elf/libmap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/libexec/rtld-elf/libmap.c ============================================================================== --- stable/10/libexec/rtld-elf/libmap.c Sun May 25 00:13:29 2014 (r266639) +++ stable/10/libexec/rtld-elf/libmap.c Sun May 25 00:57:07 2014 (r266640) @@ -80,7 +80,7 @@ lm_init(char *libmap_override) if (libmap_override) { /* - * Do some character replacement to make $LIBMAP look + * Do some character replacement to make $LDLIBMAP look * like a text file, then parse it. */ libmap_override = xstrdup(libmap_override); @@ -94,8 +94,8 @@ lm_init(char *libmap_override) break; } } - lmc_parse(p, strlen(p)); - free(p); + lmc_parse(libmap_override, p - libmap_override); + free(libmap_override); } return (lm_count == 0); From owner-svn-src-stable@FreeBSD.ORG Sun May 25 16:20:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8EF522FB; Sun, 25 May 2014 16:20:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F8A12C56; Sun, 25 May 2014 16:20:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4PGKs2D038540; Sun, 25 May 2014 16:20:54 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4PGKr0C038537; Sun, 25 May 2014 16:20:53 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201405251620.s4PGKr0C038537@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 25 May 2014 16:20:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266654 - stable/9/lib/libfetch X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 May 2014 16:20:54 -0000 Author: des Date: Sun May 25 16:20:53 2014 New Revision: 266654 URL: http://svnweb.freebsd.org/changeset/base/266654 Log: MFH (r260904): fix format string MFH (r261230,r261263): fix issues with buffering / stalling MFH (r261284): bump copyright dates MFH (r266291): look for root certs in /usr/local first Approved by: re (gjb) Modified: stable/9/lib/libfetch/common.c stable/9/lib/libfetch/common.h stable/9/lib/libfetch/http.c Directory Properties: stable/9/lib/libfetch/ (props changed) Modified: stable/9/lib/libfetch/common.c ============================================================================== --- stable/9/lib/libfetch/common.c Sun May 25 16:17:41 2014 (r266653) +++ stable/9/lib/libfetch/common.c Sun May 25 16:20:53 2014 (r266654) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1998-2011 Dag-Erling Smørgrav + * Copyright (c) 1998-2014 Dag-Erling Smørgrav * Copyright (c) 2013 Michael Gmelin * All rights reserved. * @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -641,7 +642,7 @@ fetch_ssl_verify_hname(X509 *cert, const struct addrinfo *ip; STACK_OF(GENERAL_NAME) *altnames; X509_NAME *subject; - int ret; + int ret; ret = 0; ip = fetch_ssl_get_numeric_addrinfo(host, strlen(host)); @@ -679,7 +680,7 @@ fetch_ssl_setup_transport_layer(SSL_CTX if (getenv("SSL_NO_TLS1") != NULL) ssl_ctx_options |= SSL_OP_NO_TLSv1; if (verbose) - fetch_info("SSL options: %x", ssl_ctx_options); + fetch_info("SSL options: %lx", ssl_ctx_options); SSL_CTX_set_options(ctx, ssl_ctx_options); } @@ -687,6 +688,8 @@ fetch_ssl_setup_transport_layer(SSL_CTX /* * Configure peer verification based on environment. */ +#define LOCAL_CERT_FILE "/usr/local/etc/ssl/cert.pem" +#define BASE_CERT_FILE "/etc/ssl/cert.pem" static int fetch_ssl_setup_peer_verification(SSL_CTX *ctx, int verbose) { @@ -695,8 +698,12 @@ fetch_ssl_setup_peer_verification(SSL_CT const char *ca_cert_file, *ca_cert_path, *crl_file; if (getenv("SSL_NO_VERIFY_PEER") == NULL) { - ca_cert_file = getenv("SSL_CA_CERT_FILE") != NULL ? - getenv("SSL_CA_CERT_FILE") : "/etc/ssl/cert.pem"; + ca_cert_file = getenv("SSL_CA_CERT_FILE"); + if (ca_cert_file == NULL && + access(LOCAL_CERT_FILE, R_OK) == 0) + ca_cert_file = LOCAL_CERT_FILE; + if (ca_cert_file == NULL) + ca_cert_file = BASE_CERT_FILE; ca_cert_path = getenv("SSL_CA_CERT_PATH"); if (verbose) { fetch_info("Peer verification enabled"); @@ -913,33 +920,6 @@ fetch_ssl_read(SSL *ssl, char *buf, size } #endif -/* - * Cache some data that was read from a socket but cannot be immediately - * returned because of an interrupted system call. - */ -static int -fetch_cache_data(conn_t *conn, char *src, size_t nbytes) -{ - char *tmp; - - if (conn->cache.size < nbytes) { - tmp = realloc(conn->cache.buf, nbytes); - if (tmp == NULL) { - fetch_syserr(); - return (-1); - } - conn->cache.buf = tmp; - conn->cache.size = nbytes; - } - - memcpy(conn->cache.buf, src, nbytes); - conn->cache.len = nbytes; - conn->cache.pos = 0; - - return (0); -} - - static ssize_t fetch_socket_read(int sd, char *buf, size_t len) { @@ -962,46 +942,31 @@ ssize_t fetch_read(conn_t *conn, char *buf, size_t len) { struct timeval now, timeout, delta; - fd_set readfds; - ssize_t rlen, total; - char *start; + struct pollfd pfd; + ssize_t rlen; + int deltams; if (fetchTimeout > 0) { gettimeofday(&timeout, NULL); timeout.tv_sec += fetchTimeout; } - total = 0; - start = buf; - - if (conn->cache.len > 0) { - /* - * The last invocation of fetch_read was interrupted by a - * signal after some data had been read from the socket. Copy - * the cached data into the supplied buffer before trying to - * read from the socket again. - */ - total = (conn->cache.len < len) ? conn->cache.len : len; - memcpy(buf, conn->cache.buf, total); - - conn->cache.len -= total; - conn->cache.pos += total; - len -= total; - buf += total; - } + deltams = INFTIM; + memset(&pfd, 0, sizeof pfd); + pfd.fd = conn->sd; + pfd.events = POLLIN | POLLERR; - while (len > 0) { + for (;;) { /* * The socket is non-blocking. Instead of the canonical - * select() -> read(), we do the following: + * poll() -> read(), we do the following: * * 1) call read() or SSL_read(). - * 2) if an error occurred, return -1. - * 3) if we received data but we still expect more, - * update our counters and loop. + * 2) if we received some data, return it. + * 3) if an error occurred, return -1. * 4) if read() or SSL_read() signaled EOF, return. * 5) if we did not receive any data but we're not at EOF, - * call select(). + * call poll(). * * In the SSL case, this is necessary because if we * receive a close notification, we have to call @@ -1017,46 +982,34 @@ fetch_read(conn_t *conn, char *buf, size else #endif rlen = fetch_socket_read(conn->sd, buf, len); - if (rlen == 0) { + if (rlen >= 0) { break; - } else if (rlen > 0) { - len -= rlen; - buf += rlen; - total += rlen; - continue; } else if (rlen == FETCH_READ_ERROR) { - if (errno == EINTR) - fetch_cache_data(conn, start, total); + fetch_syserr(); return (-1); } // assert(rlen == FETCH_READ_WAIT); - FD_ZERO(&readfds); - while (!FD_ISSET(conn->sd, &readfds)) { - FD_SET(conn->sd, &readfds); - if (fetchTimeout > 0) { - gettimeofday(&now, NULL); - if (!timercmp(&timeout, &now, >)) { - errno = ETIMEDOUT; - fetch_syserr(); - return (-1); - } - timersub(&timeout, &now, &delta); - } - errno = 0; - if (select(conn->sd + 1, &readfds, NULL, NULL, - fetchTimeout > 0 ? &delta : NULL) < 0) { - if (errno == EINTR) { - if (fetchRestartCalls) - continue; - /* Save anything that was read. */ - fetch_cache_data(conn, start, total); - } + if (fetchTimeout > 0) { + gettimeofday(&now, NULL); + if (!timercmp(&timeout, &now, >)) { + errno = ETIMEDOUT; fetch_syserr(); return (-1); } + timersub(&timeout, &now, &delta); + deltams = delta.tv_sec * 1000 + + delta.tv_usec / 1000;; + } + errno = 0; + pfd.revents = 0; + if (poll(&pfd, 1, deltams) < 0) { + if (errno == EINTR && fetchRestartCalls) + continue; + fetch_syserr(); + return (-1); } } - return (total); + return (rlen); } @@ -1130,35 +1083,33 @@ ssize_t fetch_writev(conn_t *conn, struct iovec *iov, int iovcnt) { struct timeval now, timeout, delta; - fd_set writefds; + struct pollfd pfd; ssize_t wlen, total; - int r; + int deltams; + memset(&pfd, 0, sizeof pfd); if (fetchTimeout) { - FD_ZERO(&writefds); + pfd.fd = conn->sd; + pfd.events = POLLOUT | POLLERR; gettimeofday(&timeout, NULL); timeout.tv_sec += fetchTimeout; } total = 0; while (iovcnt > 0) { - while (fetchTimeout && !FD_ISSET(conn->sd, &writefds)) { - FD_SET(conn->sd, &writefds); + while (fetchTimeout && pfd.revents == 0) { gettimeofday(&now, NULL); - delta.tv_sec = timeout.tv_sec - now.tv_sec; - delta.tv_usec = timeout.tv_usec - now.tv_usec; - if (delta.tv_usec < 0) { - delta.tv_usec += 1000000; - delta.tv_sec--; - } - if (delta.tv_sec < 0) { + if (!timercmp(&timeout, &now, >)) { errno = ETIMEDOUT; fetch_syserr(); return (-1); } + timersub(&timeout, &now, &delta); + deltams = delta.tv_sec * 1000 + + delta.tv_usec / 1000; errno = 0; - r = select(conn->sd + 1, NULL, &writefds, NULL, &delta); - if (r == -1) { + pfd.revents = 0; + if (poll(&pfd, 1, deltams) < 0) { if (errno == EINTR && fetchRestartCalls) continue; return (-1); @@ -1250,7 +1201,6 @@ fetch_close(conn_t *conn) } #endif ret = close(conn->sd); - free(conn->cache.buf); free(conn->buf); free(conn); return (ret); Modified: stable/9/lib/libfetch/common.h ============================================================================== --- stable/9/lib/libfetch/common.h Sun May 25 16:17:41 2014 (r266653) +++ stable/9/lib/libfetch/common.h Sun May 25 16:20:53 2014 (r266654) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1998-2011 Dag-Erling Smørgrav + * Copyright (c) 1998-2014 Dag-Erling Smørgrav * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -52,13 +52,6 @@ struct fetchconn { size_t bufsize; /* buffer size */ size_t buflen; /* length of buffer contents */ int err; /* last protocol reply code */ - struct { /* data cached after an interrupted - read */ - char *buf; - size_t size; - size_t pos; - size_t len; - } cache; #ifdef WITH_SSL SSL *ssl; /* SSL handle */ SSL_CTX *ssl_ctx; /* SSL context */ Modified: stable/9/lib/libfetch/http.c ============================================================================== --- stable/9/lib/libfetch/http.c Sun May 25 16:17:41 2014 (r266653) +++ stable/9/lib/libfetch/http.c Sun May 25 16:20:53 2014 (r266654) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2000-2013 Dag-Erling Smørgrav + * Copyright (c) 2000-2014 Dag-Erling Smørgrav * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -204,10 +204,11 @@ http_growbuf(struct httpio *io, size_t l /* * Fill the input buffer, do chunk decoding on the fly */ -static int +static ssize_t http_fillbuf(struct httpio *io, size_t len) { ssize_t nbytes; + char ch; if (io->error) return (-1); @@ -229,7 +230,7 @@ http_fillbuf(struct httpio *io, size_t l if (io->chunksize == 0) { switch (http_new_chunk(io)) { case -1: - io->error = 1; + io->error = EPROTO; return (-1); case 0: io->eof = 1; @@ -249,10 +250,8 @@ http_fillbuf(struct httpio *io, size_t l io->chunksize -= io->buflen; if (io->chunksize == 0) { - char endl[2]; - - if (fetch_read(io->conn, endl, 2) != 2 || - endl[0] != '\r' || endl[1] != '\n') + if (fetch_read(io->conn, &ch, 1) != 1 || ch != '\r' || + fetch_read(io->conn, &ch, 1) != 1 || ch != '\n') return (-1); } @@ -268,31 +267,30 @@ static int http_readfn(void *v, char *buf, int len) { struct httpio *io = (struct httpio *)v; - int l, pos; + int rlen; if (io->error) return (-1); if (io->eof) return (0); - for (pos = 0; len > 0; pos += l, len -= l) { - /* empty buffer */ - if (!io->buf || io->bufpos == io->buflen) - if (http_fillbuf(io, len) < 1) - break; - l = io->buflen - io->bufpos; - if (len < l) - l = len; - memcpy(buf + pos, io->buf + io->bufpos, l); - io->bufpos += l; + /* empty buffer */ + if (!io->buf || io->bufpos == io->buflen) { + if ((rlen = http_fillbuf(io, len)) < 0) { + if ((errno = io->error) == EINTR) + io->error = 0; + return (-1); + } else if (rlen == 0) { + return (0); + } } - if (!pos && io->error) { - if (io->error == EINTR) - io->error = 0; - return (-1); - } - return (pos); + rlen = io->buflen - io->bufpos; + if (len < rlen) + rlen = len; + memcpy(buf, io->buf + io->bufpos, rlen); + io->bufpos += rlen; + return (rlen); } /* From owner-svn-src-stable@FreeBSD.ORG Sun May 25 16:21:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 463E742F; Sun, 25 May 2014 16:21:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26B582C5C; Sun, 25 May 2014 16:21:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4PGLDt1038777; Sun, 25 May 2014 16:21:13 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4PGLCOH038775; Sun, 25 May 2014 16:21:12 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201405251621.s4PGLCOH038775@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 25 May 2014 16:21:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266655 - stable/9/usr.bin/fetch X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 May 2014 16:21:13 -0000 Author: des Date: Sun May 25 16:21:12 2014 New Revision: 266655 URL: http://svnweb.freebsd.org/changeset/base/266655 Log: MFH (r241737): staticize option variables MFH (r253804): credit Michael Gmelin for SSL code MFH (r251262): fix inode check for file change detection MFH (r261233): bump copyright dates MFH (r261234): increase minimum buffer size Approved by: re (gjb) Modified: stable/9/usr.bin/fetch/fetch.1 stable/9/usr.bin/fetch/fetch.c Directory Properties: stable/9/usr.bin/fetch/ (props changed) Modified: stable/9/usr.bin/fetch/fetch.1 ============================================================================== --- stable/9/usr.bin/fetch/fetch.1 Sun May 25 16:20:53 2014 (r266654) +++ stable/9/usr.bin/fetch/fetch.1 Sun May 25 16:21:12 2014 (r266655) @@ -1,5 +1,6 @@ .\"- -.\" Copyright (c) 2000-2011 Dag-Erling Smørgrav +.\" Copyright (c) 2000-2014 Dag-Erling Smørgrav +.\" Copyright (c) 2013 Michael Gmelin .\" All rights reserved. .\" Portions Copyright (c) 1999 Massachusetts Institute of Technology; used .\" by permission. @@ -29,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 30, 2013 +.Dd January 28, 2014 .Dt FETCH 1 .Os .Sh NAME @@ -117,7 +118,7 @@ Automatically retry the transfer upon so Allow SSL version 2 when negotiating the connection. .It Fl B Ar bytes , Fl -buffer-size= Ns Ar bytes Specify the read buffer size in bytes. -The default is 4096 bytes. +The default is 16,384 bytes. Attempts to set a buffer size lower than this will be silently ignored. The number of reads actually performed is reported at verbosity level Modified: stable/9/usr.bin/fetch/fetch.c ============================================================================== --- stable/9/usr.bin/fetch/fetch.c Sun May 25 16:20:53 2014 (r266654) +++ stable/9/usr.bin/fetch/fetch.c Sun May 25 16:21:12 2014 (r266655) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2000-2011 Dag-Erling Smørgrav + * Copyright (c) 2000-2014 Dag-Erling Smørgrav * Copyright (c) 2013 Michael Gmelin * All rights reserved. * @@ -49,51 +49,51 @@ __FBSDID("$FreeBSD$"); #include -#define MINBUFSIZE 4096 +#define MINBUFSIZE 16384 #define TIMEOUT 120 /* Option flags */ -int A_flag; /* -A: do not follow 302 redirects */ -int a_flag; /* -a: auto retry */ -off_t B_size; /* -B: buffer size */ -int b_flag; /*! -b: workaround TCP bug */ -char *c_dirname; /* -c: remote directory */ -int d_flag; /* -d: direct connection */ -int F_flag; /* -F: restart without checking mtime */ -char *f_filename; /* -f: file to fetch */ -char *h_hostname; /* -h: host to fetch from */ -int i_flag; /* -i: specify input file for mtime comparison */ -char *i_filename; /* name of input file */ -int l_flag; /* -l: link rather than copy file: URLs */ -int m_flag; /* -[Mm]: mirror mode */ -char *N_filename; /* -N: netrc file name */ -int n_flag; /* -n: do not preserve modification time */ -int o_flag; /* -o: specify output file */ -int o_directory; /* output file is a directory */ -char *o_filename; /* name of output file */ -int o_stdout; /* output file is stdout */ -int once_flag; /* -1: stop at first successful file */ -int p_flag; /* -[Pp]: use passive FTP */ -int R_flag; /* -R: don't delete partially transferred files */ -int r_flag; /* -r: restart previously interrupted transfer */ -off_t S_size; /* -S: require size to match */ -int s_flag; /* -s: show size, don't fetch */ -long T_secs; /* -T: transfer timeout in seconds */ -int t_flag; /*! -t: workaround TCP bug */ -int U_flag; /* -U: do not use high ports */ -int v_level = 1; /* -v: verbosity level */ -int v_tty; /* stdout is a tty */ -pid_t pgrp; /* our process group */ -long w_secs; /* -w: retry delay */ -int family = PF_UNSPEC; /* -[46]: address family to use */ - -int sigalrm; /* SIGALRM received */ -int siginfo; /* SIGINFO received */ -int sigint; /* SIGINT received */ - -long ftp_timeout = TIMEOUT; /* default timeout for FTP transfers */ -long http_timeout = TIMEOUT; /* default timeout for HTTP transfers */ -char *buf; /* transfer buffer */ +static int A_flag; /* -A: do not follow 302 redirects */ +static int a_flag; /* -a: auto retry */ +static off_t B_size; /* -B: buffer size */ +static int b_flag; /*! -b: workaround TCP bug */ +static char *c_dirname; /* -c: remote directory */ +static int d_flag; /* -d: direct connection */ +static int F_flag; /* -F: restart without checking mtime */ +static char *f_filename; /* -f: file to fetch */ +static char *h_hostname; /* -h: host to fetch from */ +static int i_flag; /* -i: specify file for mtime comparison */ +static char *i_filename; /* name of input file */ +static int l_flag; /* -l: link rather than copy file: URLs */ +static int m_flag; /* -[Mm]: mirror mode */ +static char *N_filename; /* -N: netrc file name */ +static int n_flag; /* -n: do not preserve modification time */ +static int o_flag; /* -o: specify output file */ +static int o_directory; /* output file is a directory */ +static char *o_filename; /* name of output file */ +static int o_stdout; /* output file is stdout */ +static int once_flag; /* -1: stop at first successful file */ +static int p_flag; /* -[Pp]: use passive FTP */ +static int R_flag; /* -R: don't delete partial files */ +static int r_flag; /* -r: restart previous transfer */ +static off_t S_size; /* -S: require size to match */ +static int s_flag; /* -s: show size, don't fetch */ +static long T_secs; /* -T: transfer timeout in seconds */ +static int t_flag; /*! -t: workaround TCP bug */ +static int U_flag; /* -U: do not use high ports */ +static int v_level = 1; /* -v: verbosity level */ +static int v_tty; /* stdout is a tty */ +static pid_t pgrp; /* our process group */ +static long w_secs; /* -w: retry delay */ +static int family = PF_UNSPEC; /* -[46]: address family to use */ + +static int sigalrm; /* SIGALRM received */ +static int siginfo; /* SIGINFO received */ +static int sigint; /* SIGINT received */ + +static long ftp_timeout = TIMEOUT; /* default timeout for FTP transfers */ +static long http_timeout = TIMEOUT;/* default timeout for HTTP transfers */ +static char *buf; /* transfer buffer */ enum options { @@ -109,7 +109,7 @@ enum options OPTION_SSL_CLIENT_KEY_FILE, OPTION_SSL_CRL_FILE, OPTION_SSL_NO_SSL3, - OPTION_SSL_NO_TLS1, + OPTION_SSL_NO_TLS1, OPTION_SSL_NO_VERIFY_HOSTNAME, OPTION_SSL_NO_VERIFY_PEER }; @@ -147,7 +147,7 @@ static struct option longopts[] = { "passive-portrange-default", no_argument, NULL, 'T' }, { "verbose", no_argument, NULL, 'v' }, { "retry-delay", required_argument, NULL, 'w' }, - + /* options without a single character equivalent */ { "bind-address", required_argument, NULL, OPTION_BIND_ADDRESS }, { "no-passive", no_argument, NULL, OPTION_NO_FTP_PASSIVE_MODE }, @@ -639,7 +639,7 @@ fetch(char *URL, const char *path) goto failure; } if (nsb.st_dev != sb.st_dev || - nsb.st_ino != nsb.st_ino || + nsb.st_ino != sb.st_ino || nsb.st_size != sb.st_size) { warnx("%s: file has changed", URL); fclose(of); @@ -716,6 +716,7 @@ fetch(char *URL, const char *path) sigalrm = siginfo = sigint = 0; /* suck in the data */ + setvbuf(f, NULL, _IOFBF, B_size); signal(SIGINFO, sig_handler); while (!sigint) { if (us.size != -1 && us.size - count < B_size && From owner-svn-src-stable@FreeBSD.ORG Sun May 25 17:00:23 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D017AF41; Sun, 25 May 2014 17:00:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A31242F2B; Sun, 25 May 2014 17:00:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4PH0NNN054563; Sun, 25 May 2014 17:00:23 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4PH0N03054473; Sun, 25 May 2014 17:00:23 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201405251700.s4PH0N03054473@svn.freebsd.org> From: Glen Barber Date: Sun, 25 May 2014 17:00:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266658 - stable/10/release/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 May 2014 17:00:23 -0000 Author: gjb Date: Sun May 25 17:00:22 2014 New Revision: 266658 URL: http://svnweb.freebsd.org/changeset/base/266658 Log: MFC r266553, r266554: r266553: Add forward-compatibility glue with pkg-1.3: - Use ASSUME_ALWAYS_YES=YES instead of ASSUME_ALWAYS_YES=1 since pkg-1.3 expects "yes" or "true" values. - Before exporting PKG_ABI, strip extra characters from what is parsed from 'pkg -vv'. This causes problems further down when creating the packages directory for inclusion on the dvd1.iso. Previously PKG_ABI would be 'freebsd:9:x86:64', but now is '"freebsd:9:x86:64";' in pkg-1.3. r266554: Disable the main FreeBSD pkg(7) repositories in the dvd repository configuration to avoid fetching from upstream in case there may be conflicts. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/scripts/FreeBSD_install_cdrom.conf stable/10/release/scripts/pkg-stage.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/release/scripts/FreeBSD_install_cdrom.conf ============================================================================== --- stable/10/release/scripts/FreeBSD_install_cdrom.conf Sun May 25 16:48:12 2014 (r266657) +++ stable/10/release/scripts/FreeBSD_install_cdrom.conf Sun May 25 17:00:22 2014 (r266658) @@ -10,3 +10,7 @@ FreeBSD_install_cdrom: { enabled: yes } +FreeBSD: { + enabled: no +} + Modified: stable/10/release/scripts/pkg-stage.sh ============================================================================== --- stable/10/release/scripts/pkg-stage.sh Sun May 25 16:48:12 2014 (r266657) +++ stable/10/release/scripts/pkg-stage.sh Sun May 25 17:00:22 2014 (r266658) @@ -5,7 +5,7 @@ set -e -export ASSUME_ALWAYS_YES=1 +export ASSUME_ALWAYS_YES="YES" export PKG_DBDIR="/tmp/pkg" export PERMISSIVE="YES" export REPO_AUTOUPDATE="NO" @@ -40,7 +40,10 @@ if [ ! -x /usr/local/sbin/pkg ]; then /usr/bin/make -C /usr/ports/ports-mgmt/pkg install clean fi -export PKG_ABI=$(pkg -vv | grep ^ABI | awk '{print $3}') +PKG_ABI=$(pkg -vv | grep ^ABI | awk '{print $3}') +PKG_ABI="${PKG_ABI%\";}" +PKG_ABI="${PKG_ABI#\"}" +export PKG_ABI export PKG_CACHEDIR="dvd/packages/${PKG_ABI}" /bin/mkdir -p ${PKG_CACHEDIR} From owner-svn-src-stable@FreeBSD.ORG Sun May 25 17:02:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 609A612C; Sun, 25 May 2014 17:02:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D0302FAA; Sun, 25 May 2014 17:02:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4PH2f8p057582; Sun, 25 May 2014 17:02:41 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4PH2fwx057581; Sun, 25 May 2014 17:02:41 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201405251702.s4PH2fwx057581@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 25 May 2014 17:02:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266659 - stable/9/libexec/rtld-elf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 May 2014 17:02:41 -0000 Author: kib Date: Sun May 25 17:02:40 2014 New Revision: 266659 URL: http://svnweb.freebsd.org/changeset/base/266659 Log: MFC r266411: Fix LD_LIBMAP. Approved by: re (gjb) Modified: stable/9/libexec/rtld-elf/libmap.c Directory Properties: stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/libmap.c ============================================================================== --- stable/9/libexec/rtld-elf/libmap.c Sun May 25 17:00:22 2014 (r266658) +++ stable/9/libexec/rtld-elf/libmap.c Sun May 25 17:02:40 2014 (r266659) @@ -80,7 +80,7 @@ lm_init(char *libmap_override) if (libmap_override) { /* - * Do some character replacement to make $LIBMAP look + * Do some character replacement to make $LDLIBMAP look * like a text file, then parse it. */ libmap_override = xstrdup(libmap_override); @@ -94,8 +94,8 @@ lm_init(char *libmap_override) break; } } - lmc_parse(p, strlen(p)); - free(p); + lmc_parse(libmap_override, p - libmap_override); + free(libmap_override); } return (lm_count == 0); From owner-svn-src-stable@FreeBSD.ORG Sun May 25 17:52:35 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3D04E69; Sun, 25 May 2014 17:52:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 905D52342; Sun, 25 May 2014 17:52:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4PHqZGA080201; Sun, 25 May 2014 17:52:35 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4PHqZeX080199; Sun, 25 May 2014 17:52:35 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201405251752.s4PHqZeX080199@svn.freebsd.org> From: Warren Block Date: Sun, 25 May 2014 17:52:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266660 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 May 2014 17:52:35 -0000 Author: wblock (doc committer) Date: Sun May 25 17:52:34 2014 New Revision: 266660 URL: http://svnweb.freebsd.org/changeset/base/266660 Log: MFC r265798, r265815, r266091 Add a man page for the new vt.4 device. Added: stable/10/share/man/man4/vt.4 - copied, changed from r265798, head/share/man/man4/vt.4 Modified: stable/10/share/man/man4/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Sun May 25 17:02:40 2014 (r266659) +++ stable/10/share/man/man4/Makefile Sun May 25 17:52:34 2014 (r266660) @@ -561,6 +561,7 @@ MAN= aac.4 \ ${_vmx.4} \ vpo.4 \ vr.4 \ + vt.4 \ vte.4 \ ${_vtnet.4} \ ${_vxge.4} \ Copied and modified: stable/10/share/man/man4/vt.4 (from r265798, head/share/man/man4/vt.4) ============================================================================== --- head/share/man/man4/vt.4 Sat May 10 03:24:45 2014 (r265798, copy source) +++ stable/10/share/man/man4/vt.4 Sun May 25 17:52:34 2014 (r266660) @@ -25,7 +25,7 @@ .\" $FreeBSD$ .\" .Dd May 9, 2014 -.Dt VIRTUAL TERMINALS 4 +.Dt "VIRTUAL TERMINALS" 4 .Os .Sh NAME .Nm vt From owner-svn-src-stable@FreeBSD.ORG Sun May 25 18:07:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9C9C3782; Sun, 25 May 2014 18:07:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FBB02433; Sun, 25 May 2014 18:07:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4PI7OpF086057; Sun, 25 May 2014 18:07:24 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4PI7OdZ086055; Sun, 25 May 2014 18:07:24 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201405251807.s4PI7OdZ086055@svn.freebsd.org> From: Glen Barber Date: Sun, 25 May 2014 18:07:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266665 - stable/9/release/scripts X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 May 2014 18:07:26 -0000 Author: gjb Date: Sun May 25 18:07:23 2014 New Revision: 266665 URL: http://svnweb.freebsd.org/changeset/base/266665 Log: MFC r266553, r266554: r266553: Add forward-compatibility glue with pkg-1.3: - Use ASSUME_ALWAYS_YES=YES instead of ASSUME_ALWAYS_YES=1 since pkg-1.3 expects "yes" or "true" values. - Before exporting PKG_ABI, strip extra characters from what is parsed from 'pkg -vv'. This causes problems further down when creating the packages directory for inclusion on the dvd1.iso. Previously PKG_ABI would be 'freebsd:9:x86:64', but now is '"freebsd:9:x86:64";' in pkg-1.3. r266554: Disable the main FreeBSD pkg(7) repositories in the dvd repository configuration to avoid fetching from upstream in case there may be conflicts. Approved by: re (marius) Sponsored by: The FreeBSD Foundation Modified: stable/9/release/scripts/FreeBSD_install_cdrom.conf stable/9/release/scripts/pkg-stage.sh Directory Properties: stable/9/release/ (props changed) Modified: stable/9/release/scripts/FreeBSD_install_cdrom.conf ============================================================================== --- stable/9/release/scripts/FreeBSD_install_cdrom.conf Sun May 25 18:06:32 2014 (r266664) +++ stable/9/release/scripts/FreeBSD_install_cdrom.conf Sun May 25 18:07:23 2014 (r266665) @@ -10,3 +10,7 @@ FreeBSD_install_cdrom: { enabled: yes } +FreeBSD: { + enabled: no +} + Modified: stable/9/release/scripts/pkg-stage.sh ============================================================================== --- stable/9/release/scripts/pkg-stage.sh Sun May 25 18:06:32 2014 (r266664) +++ stable/9/release/scripts/pkg-stage.sh Sun May 25 18:07:23 2014 (r266665) @@ -5,7 +5,7 @@ set -e -export ASSUME_ALWAYS_YES=1 +export ASSUME_ALWAYS_YES="YES" export PKG_DBDIR="/tmp/pkg" export PERMISSIVE="YES" export REPO_AUTOUPDATE="NO" @@ -40,7 +40,10 @@ if [ ! -x /usr/local/sbin/pkg ]; then /usr/bin/make -C /usr/ports/ports-mgmt/pkg install clean fi -export PKG_ABI=$(pkg -vv | grep ^ABI | awk '{print $3}') +PKG_ABI=$(pkg -vv | grep ^ABI | awk '{print $3}') +PKG_ABI="${PKG_ABI%\";}" +PKG_ABI="${PKG_ABI#\"}" +export PKG_ABI export PKG_CACHEDIR="dvd/packages/${PKG_ABI}" /bin/mkdir -p ${PKG_CACHEDIR} From owner-svn-src-stable@FreeBSD.ORG Sun May 25 18:15:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 85B7BA97; Sun, 25 May 2014 18:15:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 582FB2516; Sun, 25 May 2014 18:15:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4PIFcxV090571; Sun, 25 May 2014 18:15:38 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4PIFcYr090570; Sun, 25 May 2014 18:15:38 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201405251815.s4PIFcYr090570@svn.freebsd.org> From: Hans Petter Selasky Date: Sun, 25 May 2014 18:15:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266666 - stable/9/sys/dev/usb/controller X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 May 2014 18:15:38 -0000 Author: hselasky Date: Sun May 25 18:15:37 2014 New Revision: 266666 URL: http://svnweb.freebsd.org/changeset/base/266666 Log: MFC r266541: - Fix a bug where the TLBPC value was forced to being odd for IN direction isochronous transfers. - Remove setting of fields which does not belong to the respective TRBs. These fields are currently set as zero and this is more a cosmetic change. Approved by: re Modified: stable/9/sys/dev/usb/controller/xhci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/9/sys/dev/usb/controller/xhci.c Sun May 25 18:07:23 2014 (r266665) +++ stable/9/sys/dev/usb/controller/xhci.c Sun May 25 18:15:37 2014 (r266666) @@ -1815,31 +1815,25 @@ restart: XHCI_TRB_3_ISO_SIA_BIT; } if (temp->direction == UE_DIR_IN) - dword |= XHCI_TRB_3_DIR_IN | XHCI_TRB_3_ISP_BIT; + dword |= XHCI_TRB_3_ISP_BIT; break; case XHCI_TRB_TYPE_DATA_STAGE: dword = XHCI_TRB_3_CHAIN_BIT | XHCI_TRB_3_CYCLE_BIT | - XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_DATA_STAGE) | - XHCI_TRB_3_TBC_SET(temp->tbc) | - XHCI_TRB_3_TLBPC_SET(temp->tlbpc); + XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_DATA_STAGE); if (temp->direction == UE_DIR_IN) dword |= XHCI_TRB_3_DIR_IN | XHCI_TRB_3_ISP_BIT; break; case XHCI_TRB_TYPE_STATUS_STAGE: dword = XHCI_TRB_3_CHAIN_BIT | XHCI_TRB_3_CYCLE_BIT | - XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_STATUS_STAGE) | - XHCI_TRB_3_TBC_SET(temp->tbc) | - XHCI_TRB_3_TLBPC_SET(temp->tlbpc); + XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_STATUS_STAGE); if (temp->direction == UE_DIR_IN) dword |= XHCI_TRB_3_DIR_IN; break; default: /* XHCI_TRB_TYPE_NORMAL */ dword = XHCI_TRB_3_CHAIN_BIT | XHCI_TRB_3_CYCLE_BIT | - XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_NORMAL) | - XHCI_TRB_3_TBC_SET(temp->tbc) | - XHCI_TRB_3_TLBPC_SET(temp->tlbpc); + XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_NORMAL); if (temp->direction == UE_DIR_IN) - dword |= XHCI_TRB_3_DIR_IN | XHCI_TRB_3_ISP_BIT; + dword |= XHCI_TRB_3_ISP_BIT; break; } td->td_trb[x].dwTrb3 = htole32(dword); From owner-svn-src-stable@FreeBSD.ORG Sun May 25 18:19:58 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D801C8E; Sun, 25 May 2014 18:19:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DD812541; Sun, 25 May 2014 18:19:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4PIJw8e091160; Sun, 25 May 2014 18:19:58 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4PIJvnJ091155; Sun, 25 May 2014 18:19:57 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201405251819.s4PIJvnJ091155@svn.freebsd.org> From: Mark Johnston Date: Sun, 25 May 2014 18:19:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266667 - in stable/10: cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering cddl/contrib/opensolaris/lib/libdtrace/common sys/cddl/compat/opensolaris/sys sys/cddl/contrib/open... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 May 2014 18:19:58 -0000 Author: markj Date: Sun May 25 18:19:57 2014 New Revision: 266667 URL: http://svnweb.freebsd.org/changeset/base/266667 Log: MFC r262329: Define the KM_NORMALPRI flag for kmem_alloc(), as it is used in some upstream DTrace code. MFC r262330: 1452 DTrace buffer autoscaling should be less violent illumos/illumos-gate@6fb4854bed54ce82bd8610896b64ddebcd4af706 Modified: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.resize1.d stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.resize2.d stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_options.c stable/10/sys/cddl/compat/opensolaris/sys/kmem.h stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.resize1.d ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.resize1.d Sun May 25 18:15:37 2014 (r266666) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.resize1.d Sun May 25 18:19:57 2014 (r266667) @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * ASSERTION: * Checks that setting "bufresize" to "auto" will cause buffer @@ -34,14 +32,8 @@ * SECTION: Buffers and Buffering/Buffer Resizing Policy; * Options and Tunables/bufsize; * Options and Tunables/bufresize - * - * NOTES: - * We use the undocumented "preallocate" option to make sure dtrace(1M) - * has enough space in its heap to allocate a buffer as large as the - * kernel's trace buffer. */ -#pragma D option preallocate=100t #pragma D option bufresize=auto #pragma D option bufsize=100t Modified: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.resize2.d ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.resize2.d Sun May 25 18:15:37 2014 (r266666) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.resize2.d Sun May 25 18:19:57 2014 (r266667) @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * ASSERTION: * Checks that setting "bufresize" to "auto" will cause buffer @@ -34,14 +32,8 @@ * SECTION: Buffers and Buffering/Buffer Resizing Policy; * Options and Tunables/aggsize; * Options and Tunables/bufresize - * - * NOTES: - * We use the undocumented "preallocate" option to make sure dtrace(1M) - * has enough space in its heap to allocate a buffer as large as the - * kernel's trace buffer. */ -#pragma D option preallocate=100t #pragma D option bufresize=auto #pragma D option aggsize=100t Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_options.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_options.c Sun May 25 18:15:37 2014 (r266666) +++ stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_options.c Sun May 25 18:19:57 2014 (r266667) @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Copyright (c) 2012 by Delphix. All rights reserved. */ @@ -906,30 +904,6 @@ dt_options_load(dtrace_hdl_t *dtp) return (0); } -/*ARGSUSED*/ -static int -dt_opt_preallocate(dtrace_hdl_t *dtp, const char *arg, uintptr_t option) -{ - dtrace_optval_t size; - void *p; - - if (arg == NULL || dt_optval_parse(arg, &size) != 0) - return (dt_set_errno(dtp, EDT_BADOPTVAL)); - - if (size > SIZE_MAX) - size = SIZE_MAX; - - if ((p = dt_zalloc(dtp, size)) == NULL) { - do { - size /= 2; - } while ((p = dt_zalloc(dtp, size)) == NULL); - } - - dt_free(dtp, p); - - return (0); -} - typedef struct dt_option { const char *o_name; int (*o_func)(dtrace_hdl_t *, const char *, uintptr_t); @@ -968,7 +942,6 @@ static const dt_option_t _dtrace_ctoptio { "linktype", dt_opt_linktype }, { "nolibs", dt_opt_cflags, DTRACE_C_NOLIBS }, { "pgmax", dt_opt_pgmax }, - { "preallocate", dt_opt_preallocate }, { "pspec", dt_opt_cflags, DTRACE_C_PSPEC }, { "setenv", dt_opt_setenv, 1 }, { "stdc", dt_opt_stdc }, Modified: stable/10/sys/cddl/compat/opensolaris/sys/kmem.h ============================================================================== --- stable/10/sys/cddl/compat/opensolaris/sys/kmem.h Sun May 25 18:15:37 2014 (r266666) +++ stable/10/sys/cddl/compat/opensolaris/sys/kmem.h Sun May 25 18:19:57 2014 (r266667) @@ -47,6 +47,7 @@ MALLOC_DECLARE(M_SOLARIS); #define KM_PUSHPAGE M_WAITOK #define KM_NOSLEEP M_NOWAIT #define KM_NODEBUG M_NODUMP +#define KM_NORMALPRI 0 #define KMC_NODEBUG UMA_ZONE_NODUMP #define KMC_NOTOUCH 0 Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sun May 25 18:15:37 2014 (r266666) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sun May 25 18:19:57 2014 (r266667) @@ -10809,17 +10809,20 @@ dtrace_buffer_activate(dtrace_state_t *s static int dtrace_buffer_alloc(dtrace_buffer_t *bufs, size_t size, int flags, - processorid_t cpu) + processorid_t cpu, int *factor) { #if defined(sun) cpu_t *cp; #endif dtrace_buffer_t *buf; + int allocated = 0, desired = 0; #if defined(sun) ASSERT(MUTEX_HELD(&cpu_lock)); ASSERT(MUTEX_HELD(&dtrace_lock)); + *factor = 1; + if (size > dtrace_nonroot_maxsize && !PRIV_POLICY_CHOICE(CRED(), PRIV_ALL, B_FALSE)) return (EFBIG); @@ -10843,7 +10846,8 @@ dtrace_buffer_alloc(dtrace_buffer_t *buf ASSERT(buf->dtb_xamot == NULL); - if ((buf->dtb_tomax = kmem_zalloc(size, KM_NOSLEEP)) == NULL) + if ((buf->dtb_tomax = kmem_zalloc(size, + KM_NOSLEEP | KM_NORMALPRI)) == NULL) goto err; buf->dtb_size = size; @@ -10854,7 +10858,8 @@ dtrace_buffer_alloc(dtrace_buffer_t *buf if (flags & DTRACEBUF_NOSWITCH) continue; - if ((buf->dtb_xamot = kmem_zalloc(size, KM_NOSLEEP)) == NULL) + if ((buf->dtb_xamot = kmem_zalloc(size, + KM_NOSLEEP | KM_NORMALPRI)) == NULL) goto err; } while ((cp = cp->cpu_next) != cpu_list); @@ -10868,27 +10873,29 @@ err: continue; buf = &bufs[cp->cpu_id]; + desired += 2; if (buf->dtb_xamot != NULL) { ASSERT(buf->dtb_tomax != NULL); ASSERT(buf->dtb_size == size); kmem_free(buf->dtb_xamot, size); + allocated++; } if (buf->dtb_tomax != NULL) { ASSERT(buf->dtb_size == size); kmem_free(buf->dtb_tomax, size); + allocated++; } buf->dtb_tomax = NULL; buf->dtb_xamot = NULL; buf->dtb_size = 0; } while ((cp = cp->cpu_next) != cpu_list); - - return (ENOMEM); #else int i; + *factor = 1; #if defined(__amd64__) || defined(__mips__) || defined(__powerpc__) /* * FreeBSD isn't good at limiting the amount of memory we @@ -10896,7 +10903,7 @@ err: * to do something that might well end in tears at bedtime. */ if (size > physmem * PAGE_SIZE / (128 * (mp_maxid + 1))) - return(ENOMEM); + return (ENOMEM); #endif ASSERT(MUTEX_HELD(&dtrace_lock)); @@ -10918,7 +10925,8 @@ err: ASSERT(buf->dtb_xamot == NULL); - if ((buf->dtb_tomax = kmem_zalloc(size, KM_NOSLEEP)) == NULL) + if ((buf->dtb_tomax = kmem_zalloc(size, + KM_NOSLEEP | KM_NORMALPRI)) == NULL) goto err; buf->dtb_size = size; @@ -10929,7 +10937,8 @@ err: if (flags & DTRACEBUF_NOSWITCH) continue; - if ((buf->dtb_xamot = kmem_zalloc(size, KM_NOSLEEP)) == NULL) + if ((buf->dtb_xamot = kmem_zalloc(size, + KM_NOSLEEP | KM_NORMALPRI)) == NULL) goto err; } @@ -10945,16 +10954,19 @@ err: continue; buf = &bufs[i]; + desired += 2; if (buf->dtb_xamot != NULL) { ASSERT(buf->dtb_tomax != NULL); ASSERT(buf->dtb_size == size); kmem_free(buf->dtb_xamot, size); + allocated++; } if (buf->dtb_tomax != NULL) { ASSERT(buf->dtb_size == size); kmem_free(buf->dtb_tomax, size); + allocated++; } buf->dtb_tomax = NULL; @@ -10962,9 +10974,10 @@ err: buf->dtb_size = 0; } +#endif + *factor = desired / (allocated > 0 ? allocated : 1); return (ENOMEM); -#endif } /* @@ -12917,7 +12930,7 @@ dtrace_dstate_init(dtrace_dstate_t *dsta if (size < (min = dstate->dtds_chunksize + sizeof (dtrace_dynhash_t))) size = min; - if ((base = kmem_zalloc(size, KM_NOSLEEP)) == NULL) + if ((base = kmem_zalloc(size, KM_NOSLEEP | KM_NORMALPRI)) == NULL) return (ENOMEM); dstate->dtds_size = size; @@ -13369,7 +13382,7 @@ dtrace_state_buffer(dtrace_state_t *stat { dtrace_optval_t *opt = state->dts_options, size; processorid_t cpu = 0;; - int flags = 0, rval; + int flags = 0, rval, factor, divisor = 1; ASSERT(MUTEX_HELD(&dtrace_lock)); ASSERT(MUTEX_HELD(&cpu_lock)); @@ -13399,7 +13412,7 @@ dtrace_state_buffer(dtrace_state_t *stat flags |= DTRACEBUF_INACTIVE; } - for (size = opt[which]; size >= sizeof (uint64_t); size >>= 1) { + for (size = opt[which]; size >= sizeof (uint64_t); size /= divisor) { /* * The size must be 8-byte aligned. If the size is not 8-byte * aligned, drop it down by the difference. @@ -13417,7 +13430,7 @@ dtrace_state_buffer(dtrace_state_t *stat return (E2BIG); } - rval = dtrace_buffer_alloc(buf, size, flags, cpu); + rval = dtrace_buffer_alloc(buf, size, flags, cpu, &factor); if (rval != ENOMEM) { opt[which] = size; @@ -13426,6 +13439,9 @@ dtrace_state_buffer(dtrace_state_t *stat if (opt[DTRACEOPT_BUFRESIZE] == DTRACEOPT_BUFRESIZE_MANUAL) return (rval); + + for (divisor = 2; divisor < factor; divisor <<= 1) + continue; } return (ENOMEM); @@ -13527,7 +13543,8 @@ dtrace_state_go(dtrace_state_t *state, p goto out; } - spec = kmem_zalloc(nspec * sizeof (dtrace_speculation_t), KM_NOSLEEP); + spec = kmem_zalloc(nspec * sizeof (dtrace_speculation_t), + KM_NOSLEEP | KM_NORMALPRI); if (spec == NULL) { rval = ENOMEM; @@ -13538,7 +13555,8 @@ dtrace_state_go(dtrace_state_t *state, p state->dts_nspeculations = (int)nspec; for (i = 0; i < nspec; i++) { - if ((buf = kmem_zalloc(bufsize, KM_NOSLEEP)) == NULL) { + if ((buf = kmem_zalloc(bufsize, + KM_NOSLEEP | KM_NORMALPRI)) == NULL) { rval = ENOMEM; goto err; } From owner-svn-src-stable@FreeBSD.ORG Sun May 25 18:20:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B222E23; Sun, 25 May 2014 18:20:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4795D2552; Sun, 25 May 2014 18:20:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4PIKpFo091789; Sun, 25 May 2014 18:20:51 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4PIKokh091742; Sun, 25 May 2014 18:20:50 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201405251820.s4PIKokh091742@svn.freebsd.org> From: Warren Block Date: Sun, 25 May 2014 18:20:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266668 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 May 2014 18:20:51 -0000 Author: wblock (doc committer) Date: Sun May 25 18:20:50 2014 New Revision: 266668 URL: http://svnweb.freebsd.org/changeset/base/266668 Log: MFC r265798, r265815, r266091 Add a man page for the new vt.4 device. Approved by: re@ (gjb) Added: stable/9/share/man/man4/vt.4 - copied, changed from r265798, head/share/man/man4/vt.4 Modified: stable/9/share/man/man4/Makefile Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/Makefile ============================================================================== --- stable/9/share/man/man4/Makefile Sun May 25 18:19:57 2014 (r266667) +++ stable/9/share/man/man4/Makefile Sun May 25 18:20:50 2014 (r266668) @@ -529,6 +529,7 @@ MAN= aac.4 \ vlan.4 \ vpo.4 \ vr.4 \ + vt.4 \ vte.4 \ ${_vtnet.4} \ ${_vxge.4} \ Copied and modified: stable/9/share/man/man4/vt.4 (from r265798, head/share/man/man4/vt.4) ============================================================================== --- head/share/man/man4/vt.4 Sat May 10 03:24:45 2014 (r265798, copy source) +++ stable/9/share/man/man4/vt.4 Sun May 25 18:20:50 2014 (r266668) @@ -25,7 +25,7 @@ .\" $FreeBSD$ .\" .Dd May 9, 2014 -.Dt VIRTUAL TERMINALS 4 +.Dt "VIRTUAL TERMINALS" 4 .Os .Sh NAME .Nm vt From owner-svn-src-stable@FreeBSD.ORG Sun May 25 18:24:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EFAB1F89; Sun, 25 May 2014 18:24:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C23C325E0; Sun, 25 May 2014 18:24:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4PIOesE094948; Sun, 25 May 2014 18:24:40 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4PIOejH094947; Sun, 25 May 2014 18:24:40 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201405251824.s4PIOejH094947@svn.freebsd.org> From: Hans Petter Selasky Date: Sun, 25 May 2014 18:24:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266669 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 May 2014 18:24:41 -0000 Author: hselasky Date: Sun May 25 18:24:40 2014 New Revision: 266669 URL: http://svnweb.freebsd.org/changeset/base/266669 Log: MFC r266541: - Fix a bug where the TLBPC value was forced to being odd for IN direction isochronous transfers. - Remove setting of fields which does not belong to the respective TRBs. These fields are currently set as zero and this is more a cosmetic change. Modified: stable/10/sys/dev/usb/controller/xhci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci.c Sun May 25 18:20:50 2014 (r266668) +++ stable/10/sys/dev/usb/controller/xhci.c Sun May 25 18:24:40 2014 (r266669) @@ -1849,31 +1849,25 @@ restart: XHCI_TRB_3_ISO_SIA_BIT; } if (temp->direction == UE_DIR_IN) - dword |= XHCI_TRB_3_DIR_IN | XHCI_TRB_3_ISP_BIT; + dword |= XHCI_TRB_3_ISP_BIT; break; case XHCI_TRB_TYPE_DATA_STAGE: dword = XHCI_TRB_3_CHAIN_BIT | XHCI_TRB_3_CYCLE_BIT | - XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_DATA_STAGE) | - XHCI_TRB_3_TBC_SET(temp->tbc) | - XHCI_TRB_3_TLBPC_SET(temp->tlbpc); + XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_DATA_STAGE); if (temp->direction == UE_DIR_IN) dword |= XHCI_TRB_3_DIR_IN | XHCI_TRB_3_ISP_BIT; break; case XHCI_TRB_TYPE_STATUS_STAGE: dword = XHCI_TRB_3_CHAIN_BIT | XHCI_TRB_3_CYCLE_BIT | - XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_STATUS_STAGE) | - XHCI_TRB_3_TBC_SET(temp->tbc) | - XHCI_TRB_3_TLBPC_SET(temp->tlbpc); + XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_STATUS_STAGE); if (temp->direction == UE_DIR_IN) dword |= XHCI_TRB_3_DIR_IN; break; default: /* XHCI_TRB_TYPE_NORMAL */ dword = XHCI_TRB_3_CHAIN_BIT | XHCI_TRB_3_CYCLE_BIT | - XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_NORMAL) | - XHCI_TRB_3_TBC_SET(temp->tbc) | - XHCI_TRB_3_TLBPC_SET(temp->tlbpc); + XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_NORMAL); if (temp->direction == UE_DIR_IN) - dword |= XHCI_TRB_3_DIR_IN | XHCI_TRB_3_ISP_BIT; + dword |= XHCI_TRB_3_ISP_BIT; break; } td->td_trb[x].dwTrb3 = htole32(dword); From owner-svn-src-stable@FreeBSD.ORG Sun May 25 18:26:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A2CE914C; Sun, 25 May 2014 18:26:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75DA625ED; Sun, 25 May 2014 18:26:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4PIQiXP095337; Sun, 25 May 2014 18:26:44 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4PIQi72095336; Sun, 25 May 2014 18:26:44 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201405251826.s4PIQi72095336@svn.freebsd.org> From: Hans Petter Selasky Date: Sun, 25 May 2014 18:26:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r266670 - stable/8/sys/dev/usb/controller X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 May 2014 18:26:44 -0000 Author: hselasky Date: Sun May 25 18:26:43 2014 New Revision: 266670 URL: http://svnweb.freebsd.org/changeset/base/266670 Log: MFC r266541: - Fix a bug where the TLBPC value was forced to being odd for IN direction isochronous transfers. - Remove setting of fields which does not belong to the respective TRBs. These fields are currently set as zero and this is more a cosmetic change. Modified: stable/8/sys/dev/usb/controller/xhci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/8/sys/dev/usb/controller/xhci.c Sun May 25 18:24:40 2014 (r266669) +++ stable/8/sys/dev/usb/controller/xhci.c Sun May 25 18:26:43 2014 (r266670) @@ -1815,31 +1815,25 @@ restart: XHCI_TRB_3_ISO_SIA_BIT; } if (temp->direction == UE_DIR_IN) - dword |= XHCI_TRB_3_DIR_IN | XHCI_TRB_3_ISP_BIT; + dword |= XHCI_TRB_3_ISP_BIT; break; case XHCI_TRB_TYPE_DATA_STAGE: dword = XHCI_TRB_3_CHAIN_BIT | XHCI_TRB_3_CYCLE_BIT | - XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_DATA_STAGE) | - XHCI_TRB_3_TBC_SET(temp->tbc) | - XHCI_TRB_3_TLBPC_SET(temp->tlbpc); + XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_DATA_STAGE); if (temp->direction == UE_DIR_IN) dword |= XHCI_TRB_3_DIR_IN | XHCI_TRB_3_ISP_BIT; break; case XHCI_TRB_TYPE_STATUS_STAGE: dword = XHCI_TRB_3_CHAIN_BIT | XHCI_TRB_3_CYCLE_BIT | - XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_STATUS_STAGE) | - XHCI_TRB_3_TBC_SET(temp->tbc) | - XHCI_TRB_3_TLBPC_SET(temp->tlbpc); + XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_STATUS_STAGE); if (temp->direction == UE_DIR_IN) dword |= XHCI_TRB_3_DIR_IN; break; default: /* XHCI_TRB_TYPE_NORMAL */ dword = XHCI_TRB_3_CHAIN_BIT | XHCI_TRB_3_CYCLE_BIT | - XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_NORMAL) | - XHCI_TRB_3_TBC_SET(temp->tbc) | - XHCI_TRB_3_TLBPC_SET(temp->tlbpc); + XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_NORMAL); if (temp->direction == UE_DIR_IN) - dword |= XHCI_TRB_3_DIR_IN | XHCI_TRB_3_ISP_BIT; + dword |= XHCI_TRB_3_ISP_BIT; break; } td->td_trb[x].dwTrb3 = htole32(dword); From owner-svn-src-stable@FreeBSD.ORG Mon May 26 01:37:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 75C5DDFA; Mon, 26 May 2014 01:37:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6171F25F6; Mon, 26 May 2014 01:37:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4Q1biYE087755; Mon, 26 May 2014 01:37:44 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4Q1bh0Q087752; Mon, 26 May 2014 01:37:43 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201405260137.s4Q1bh0Q087752@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 26 May 2014 01:37:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266676 - in stable/10/sys/powerpc: powerpc ps3 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 01:37:44 -0000 Author: nwhitehorn Date: Mon May 26 01:37:43 2014 New Revision: 266676 URL: http://svnweb.freebsd.org/changeset/base/266676 Log: MFC r265900: Repair some races in IPI handling: 1. Make sure IPI mask is set before sending the IPI 2. Operate atomically on PS3 PIC outstanding interrupt list 3. Make sure IPIs are EOI'ed before, not after, processing. Without this, a second IPI could be sent partway through processing the first one, get erroneously acknowledge by the EOI to the first, and be lost. In particular in the case of smp_rendezvous(), this can be fatal. In combination, this makes the PS3 boot SMP again. It probably also fixes some latent bugs elsewhere. Modified: stable/10/sys/powerpc/powerpc/intr_machdep.c stable/10/sys/powerpc/powerpc/mp_machdep.c stable/10/sys/powerpc/ps3/ps3pic.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/powerpc/powerpc/intr_machdep.c ============================================================================== --- stable/10/sys/powerpc/powerpc/intr_machdep.c Sun May 25 19:28:34 2014 (r266675) +++ stable/10/sys/powerpc/powerpc/intr_machdep.c Mon May 26 01:37:43 2014 (r266676) @@ -103,6 +103,7 @@ struct powerpc_intr { enum intr_trigger trig; enum intr_polarity pol; int fwcode; + int ipi; }; struct pic { @@ -203,6 +204,8 @@ intr_lookup(u_int irq) i->irq = irq; i->pic = NULL; i->vector = -1; + i->fwcode = 0; + i->ipi = 0; #ifdef SMP i->cpu = all_cpus; @@ -415,6 +418,15 @@ powerpc_enable_intr(void) printf("unable to setup IPI handler\n"); return (error); } + + /* + * Some subterfuge: disable late EOI and mark this + * as an IPI to the dispatch layer. + */ + i = intr_lookup(MAP_IRQ(piclist[n].node, + piclist[n].irqs)); + i->event->ie_post_filter = NULL; + i->ipi = 1; } } #endif @@ -568,6 +580,13 @@ powerpc_dispatch_intr(u_int vector, stru ie = i->event; KASSERT(ie != NULL, ("%s: interrupt without an event", __func__)); + /* + * IPIs are magical and need to be EOI'ed before filtering. + * This prevents races in IPI handling. + */ + if (i->ipi) + PIC_EOI(i->pic, i->intline); + if (intr_event_handle(ie, tf) != 0) { goto stray; } Modified: stable/10/sys/powerpc/powerpc/mp_machdep.c ============================================================================== --- stable/10/sys/powerpc/powerpc/mp_machdep.c Sun May 25 19:28:34 2014 (r266675) +++ stable/10/sys/powerpc/powerpc/mp_machdep.c Mon May 26 01:37:43 2014 (r266676) @@ -336,6 +336,7 @@ ipi_send(struct pcpu *pc, int ipi) pc, pc->pc_cpuid, ipi); atomic_set_32(&pc->pc_ipimask, (1 << ipi)); + powerpc_sync(); PIC_IPI(root_pic, pc->pc_cpuid); CTR1(KTR_SMP, "%s: sent", __func__); Modified: stable/10/sys/powerpc/ps3/ps3pic.c ============================================================================== --- stable/10/sys/powerpc/ps3/ps3pic.c Sun May 25 19:28:34 2014 (r266675) +++ stable/10/sys/powerpc/ps3/ps3pic.c Mon May 26 01:37:43 2014 (r266676) @@ -166,12 +166,13 @@ ps3pic_dispatch(device_t dev, struct tra sc = device_get_softc(dev); if (PCPU_GET(cpuid) == 0) { - bitmap = sc->bitmap_thread0[0]; + bitmap = atomic_readandclear_64(&sc->bitmap_thread0[0]); mask = sc->mask_thread0[0]; } else { - bitmap = sc->bitmap_thread1[0]; + bitmap = atomic_readandclear_64(&sc->bitmap_thread1[0]); mask = sc->mask_thread1[0]; } + powerpc_sync(); while ((irq = ffsl(bitmap & mask) - 1) != -1) { bitmap &= ~(1UL << irq); From owner-svn-src-stable@FreeBSD.ORG Mon May 26 07:02:04 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3DEE977D; Mon, 26 May 2014 07:02:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2AC122EC1; Mon, 26 May 2014 07:02:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4Q723Ac035267; Mon, 26 May 2014 07:02:03 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4Q7233C035266; Mon, 26 May 2014 07:02:03 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201405260702.s4Q7233C035266@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 26 May 2014 07:02:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266678 - stable/10/sys/netpfil/ipfw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 07:02:04 -0000 Author: ae Date: Mon May 26 07:02:03 2014 New Revision: 266678 URL: http://svnweb.freebsd.org/changeset/base/266678 Log: MFC r266399: Since ipfw nat configures all options in one step, we should set all bits in the mask when calling LibAliasSetMode() to properly clear unneeded options. PR: 189655 Modified: stable/10/sys/netpfil/ipfw/ip_fw_nat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netpfil/ipfw/ip_fw_nat.c ============================================================================== --- stable/10/sys/netpfil/ipfw/ip_fw_nat.c Mon May 26 02:19:50 2014 (r266677) +++ stable/10/sys/netpfil/ipfw/ip_fw_nat.c Mon May 26 07:02:03 2014 (r266678) @@ -441,7 +441,7 @@ ipfw_nat_cfg(struct sockopt *sopt) ptr->ip = cfg->ip; ptr->redir_cnt = cfg->redir_cnt; ptr->mode = cfg->mode; - LibAliasSetMode(ptr->lib, cfg->mode, cfg->mode); + LibAliasSetMode(ptr->lib, cfg->mode, ~0); LibAliasSetAddress(ptr->lib, ptr->ip); memcpy(ptr->if_name, cfg->if_name, IF_NAMESIZE); From owner-svn-src-stable@FreeBSD.ORG Mon May 26 07:04:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD51C9A5; Mon, 26 May 2014 07:04:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9AA432ED1; Mon, 26 May 2014 07:04:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4Q74UBG035784; Mon, 26 May 2014 07:04:30 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4Q74UEm035783; Mon, 26 May 2014 07:04:30 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201405260704.s4Q74UEm035783@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 26 May 2014 07:04:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266679 - stable/10/sys/geom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 07:04:30 -0000 Author: ae Date: Mon May 26 07:04:30 2014 New Revision: 266679 URL: http://svnweb.freebsd.org/changeset/base/266679 Log: MFC r266445: Add a topology trace to the g_spoil_event. Modified: stable/10/sys/geom/geom_subr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/geom_subr.c ============================================================================== --- stable/10/sys/geom/geom_subr.c Mon May 26 07:02:03 2014 (r266678) +++ stable/10/sys/geom/geom_subr.c Mon May 26 07:04:30 2014 (r266679) @@ -1064,6 +1064,8 @@ g_spoil_event(void *arg, int flag) return; pp = arg; G_VALID_PROVIDER(pp); + g_trace(G_T_TOPOLOGY, "%s %p(%s:%s:%s)", __func__, pp, + pp->geom->class->name, pp->geom->name, pp->name); for (cp = LIST_FIRST(&pp->consumers); cp != NULL; cp = cp2) { cp2 = LIST_NEXT(cp, consumers); if ((cp->flags & G_CF_SPOILED) == 0) From owner-svn-src-stable@FreeBSD.ORG Mon May 26 08:22:35 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0ADBB1D1; Mon, 26 May 2014 08:22:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB9A025F3; Mon, 26 May 2014 08:22:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4Q8MYUs071455; Mon, 26 May 2014 08:22:34 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4Q8MYkD071454; Mon, 26 May 2014 08:22:34 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201405260822.s4Q8MYkD071454@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 26 May 2014 08:22:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266680 - stable/9/sys/netpfil/ipfw X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 08:22:35 -0000 Author: ae Date: Mon May 26 08:22:34 2014 New Revision: 266680 URL: http://svnweb.freebsd.org/changeset/base/266680 Log: MFC r266399: Since ipfw nat configures all options in one step, we should set all bits in the mask when calling LibAliasSetMode() to properly clear unneeded options. PR: 189655 Approved by: re (marius) Modified: stable/9/sys/netpfil/ipfw/ip_fw_nat.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/netpfil/ (props changed) Modified: stable/9/sys/netpfil/ipfw/ip_fw_nat.c ============================================================================== --- stable/9/sys/netpfil/ipfw/ip_fw_nat.c Mon May 26 07:04:30 2014 (r266679) +++ stable/9/sys/netpfil/ipfw/ip_fw_nat.c Mon May 26 08:22:34 2014 (r266680) @@ -442,7 +442,7 @@ ipfw_nat_cfg(struct sockopt *sopt) ptr->ip = cfg->ip; ptr->redir_cnt = cfg->redir_cnt; ptr->mode = cfg->mode; - LibAliasSetMode(ptr->lib, cfg->mode, cfg->mode); + LibAliasSetMode(ptr->lib, cfg->mode, ~0); LibAliasSetAddress(ptr->lib, ptr->ip); memcpy(ptr->if_name, cfg->if_name, IF_NAMESIZE); From owner-svn-src-stable@FreeBSD.ORG Mon May 26 11:16:29 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7257B8A6; Mon, 26 May 2014 11:16:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5EA512745; Mon, 26 May 2014 11:16:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4QBGTgG049778; Mon, 26 May 2014 11:16:29 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4QBGTbS049777; Mon, 26 May 2014 11:16:29 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201405261116.s4QBGTbS049777@svn.freebsd.org> From: Christian Brueffer Date: Mon, 26 May 2014 11:16:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266686 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 11:16:29 -0000 Author: brueffer Date: Mon May 26 11:16:28 2014 New Revision: 266686 URL: http://svnweb.freebsd.org/changeset/base/266686 Log: Catch up supported hardware obmitted in r265269, now that this branch has support for it. Modified: stable/10/share/man/man4/urtwn.4 Modified: stable/10/share/man/man4/urtwn.4 ============================================================================== --- stable/10/share/man/man4/urtwn.4 Mon May 26 09:56:09 2014 (r266685) +++ stable/10/share/man/man4/urtwn.4 Mon May 26 11:16:28 2014 (r266686) @@ -82,7 +82,7 @@ firmware license .Sh HARDWARE The .Nm -driver supports Realtek RTL8188CUS, RTL8188CE-VAU, RTL8188RU and RTL8192CU based USB +driver supports Realtek RTL8188CU/RTL8188EU/RTL8192CU based USB IEEE 802.11b/g/n wireless network adapters, including: .Pp .Bl -tag -width Ds -offset indent -compact From owner-svn-src-stable@FreeBSD.ORG Mon May 26 15:28:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 560D97B4; Mon, 26 May 2014 15:28:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DDFD2E14; Mon, 26 May 2014 15:28:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4QFSlAf091432; Mon, 26 May 2014 15:28:47 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4QFSTZH091115; Mon, 26 May 2014 15:28:29 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201405261528.s4QFSTZH091115@svn.freebsd.org> From: Gregory Neil Shapiro Date: Mon, 26 May 2014 15:28:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266692 - in stable/10/contrib/sendmail: . cf cf/cf cf/domain cf/feature cf/hack cf/m4 cf/mailer cf/ostype cf/sh contrib doc/op editmap include/libmilter include/libsmdb include/sendmai... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 15:28:47 -0000 Author: gshapiro Date: Mon May 26 15:28:28 2014 New Revision: 266692 URL: http://svnweb.freebsd.org/changeset/base/266692 Log: MFC: Merge sendmail 8.14.9 to HEAD Modified: stable/10/contrib/sendmail/CACerts stable/10/contrib/sendmail/FAQ stable/10/contrib/sendmail/INSTALL stable/10/contrib/sendmail/KNOWNBUGS stable/10/contrib/sendmail/LICENSE stable/10/contrib/sendmail/Makefile stable/10/contrib/sendmail/PGPKEYS stable/10/contrib/sendmail/README stable/10/contrib/sendmail/RELEASE_NOTES stable/10/contrib/sendmail/cf/README stable/10/contrib/sendmail/cf/cf/Makefile stable/10/contrib/sendmail/cf/cf/README stable/10/contrib/sendmail/cf/cf/chez.cs.mc stable/10/contrib/sendmail/cf/cf/clientproto.mc stable/10/contrib/sendmail/cf/cf/cs-hpux10.mc stable/10/contrib/sendmail/cf/cf/cs-hpux9.mc stable/10/contrib/sendmail/cf/cf/cs-osf1.mc stable/10/contrib/sendmail/cf/cf/cs-solaris2.mc stable/10/contrib/sendmail/cf/cf/cs-sunos4.1.mc stable/10/contrib/sendmail/cf/cf/cs-ultrix4.mc stable/10/contrib/sendmail/cf/cf/cyrusproto.mc stable/10/contrib/sendmail/cf/cf/generic-bsd4.4.mc stable/10/contrib/sendmail/cf/cf/generic-hpux10.mc stable/10/contrib/sendmail/cf/cf/generic-hpux9.mc stable/10/contrib/sendmail/cf/cf/generic-linux.mc stable/10/contrib/sendmail/cf/cf/generic-mpeix.mc stable/10/contrib/sendmail/cf/cf/generic-nextstep3.3.mc stable/10/contrib/sendmail/cf/cf/generic-osf1.mc stable/10/contrib/sendmail/cf/cf/generic-solaris.mc stable/10/contrib/sendmail/cf/cf/generic-sunos4.1.mc stable/10/contrib/sendmail/cf/cf/generic-ultrix4.mc stable/10/contrib/sendmail/cf/cf/huginn.cs.mc stable/10/contrib/sendmail/cf/cf/knecht.mc stable/10/contrib/sendmail/cf/cf/mail.cs.mc stable/10/contrib/sendmail/cf/cf/mail.eecs.mc stable/10/contrib/sendmail/cf/cf/mailspool.cs.mc stable/10/contrib/sendmail/cf/cf/python.cs.mc stable/10/contrib/sendmail/cf/cf/s2k-osf1.mc stable/10/contrib/sendmail/cf/cf/s2k-ultrix4.mc stable/10/contrib/sendmail/cf/cf/submit.cf stable/10/contrib/sendmail/cf/cf/submit.mc stable/10/contrib/sendmail/cf/cf/tcpproto.mc stable/10/contrib/sendmail/cf/cf/ucbarpa.mc stable/10/contrib/sendmail/cf/cf/ucbvax.mc stable/10/contrib/sendmail/cf/cf/uucpproto.mc stable/10/contrib/sendmail/cf/cf/vangogh.cs.mc stable/10/contrib/sendmail/cf/domain/Berkeley.EDU.m4 stable/10/contrib/sendmail/cf/domain/CS.Berkeley.EDU.m4 stable/10/contrib/sendmail/cf/domain/EECS.Berkeley.EDU.m4 stable/10/contrib/sendmail/cf/domain/S2K.Berkeley.EDU.m4 stable/10/contrib/sendmail/cf/domain/berkeley-only.m4 stable/10/contrib/sendmail/cf/domain/generic.m4 stable/10/contrib/sendmail/cf/feature/accept_unqualified_senders.m4 stable/10/contrib/sendmail/cf/feature/accept_unresolvable_domains.m4 stable/10/contrib/sendmail/cf/feature/access_db.m4 stable/10/contrib/sendmail/cf/feature/allmasquerade.m4 stable/10/contrib/sendmail/cf/feature/always_add_domain.m4 stable/10/contrib/sendmail/cf/feature/authinfo.m4 stable/10/contrib/sendmail/cf/feature/badmx.m4 stable/10/contrib/sendmail/cf/feature/bestmx_is_local.m4 stable/10/contrib/sendmail/cf/feature/bitdomain.m4 stable/10/contrib/sendmail/cf/feature/blacklist_recipients.m4 stable/10/contrib/sendmail/cf/feature/block_bad_helo.m4 stable/10/contrib/sendmail/cf/feature/compat_check.m4 stable/10/contrib/sendmail/cf/feature/conncontrol.m4 stable/10/contrib/sendmail/cf/feature/delay_checks.m4 stable/10/contrib/sendmail/cf/feature/dnsbl.m4 stable/10/contrib/sendmail/cf/feature/domaintable.m4 stable/10/contrib/sendmail/cf/feature/enhdnsbl.m4 stable/10/contrib/sendmail/cf/feature/generics_entire_domain.m4 stable/10/contrib/sendmail/cf/feature/genericstable.m4 stable/10/contrib/sendmail/cf/feature/greet_pause.m4 stable/10/contrib/sendmail/cf/feature/ldap_routing.m4 stable/10/contrib/sendmail/cf/feature/limited_masquerade.m4 stable/10/contrib/sendmail/cf/feature/local_lmtp.m4 stable/10/contrib/sendmail/cf/feature/local_no_masquerade.m4 stable/10/contrib/sendmail/cf/feature/local_procmail.m4 stable/10/contrib/sendmail/cf/feature/lookupdotdomain.m4 stable/10/contrib/sendmail/cf/feature/loose_relay_check.m4 stable/10/contrib/sendmail/cf/feature/mailertable.m4 stable/10/contrib/sendmail/cf/feature/masquerade_entire_domain.m4 stable/10/contrib/sendmail/cf/feature/masquerade_envelope.m4 stable/10/contrib/sendmail/cf/feature/msp.m4 stable/10/contrib/sendmail/cf/feature/mtamark.m4 stable/10/contrib/sendmail/cf/feature/no_default_msa.m4 stable/10/contrib/sendmail/cf/feature/nocanonify.m4 stable/10/contrib/sendmail/cf/feature/notsticky.m4 stable/10/contrib/sendmail/cf/feature/nouucp.m4 stable/10/contrib/sendmail/cf/feature/nullclient.m4 stable/10/contrib/sendmail/cf/feature/preserve_local_plus_detail.m4 stable/10/contrib/sendmail/cf/feature/preserve_luser_host.m4 stable/10/contrib/sendmail/cf/feature/promiscuous_relay.m4 stable/10/contrib/sendmail/cf/feature/queuegroup.m4 stable/10/contrib/sendmail/cf/feature/ratecontrol.m4 stable/10/contrib/sendmail/cf/feature/redirect.m4 stable/10/contrib/sendmail/cf/feature/relay_based_on_MX.m4 stable/10/contrib/sendmail/cf/feature/relay_entire_domain.m4 stable/10/contrib/sendmail/cf/feature/relay_hosts_only.m4 stable/10/contrib/sendmail/cf/feature/relay_local_from.m4 stable/10/contrib/sendmail/cf/feature/relay_mail_from.m4 stable/10/contrib/sendmail/cf/feature/require_rdns.m4 stable/10/contrib/sendmail/cf/feature/smrsh.m4 stable/10/contrib/sendmail/cf/feature/stickyhost.m4 stable/10/contrib/sendmail/cf/feature/use_client_ptr.m4 stable/10/contrib/sendmail/cf/feature/use_ct_file.m4 stable/10/contrib/sendmail/cf/feature/use_cw_file.m4 stable/10/contrib/sendmail/cf/feature/uucpdomain.m4 stable/10/contrib/sendmail/cf/feature/virtuser_entire_domain.m4 stable/10/contrib/sendmail/cf/feature/virtusertable.m4 stable/10/contrib/sendmail/cf/hack/cssubdomain.m4 stable/10/contrib/sendmail/cf/m4/cf.m4 stable/10/contrib/sendmail/cf/m4/cfhead.m4 stable/10/contrib/sendmail/cf/m4/proto.m4 stable/10/contrib/sendmail/cf/m4/version.m4 stable/10/contrib/sendmail/cf/mailer/cyrus.m4 stable/10/contrib/sendmail/cf/mailer/cyrusv2.m4 stable/10/contrib/sendmail/cf/mailer/fax.m4 stable/10/contrib/sendmail/cf/mailer/local.m4 stable/10/contrib/sendmail/cf/mailer/mail11.m4 stable/10/contrib/sendmail/cf/mailer/phquery.m4 stable/10/contrib/sendmail/cf/mailer/pop.m4 stable/10/contrib/sendmail/cf/mailer/procmail.m4 stable/10/contrib/sendmail/cf/mailer/qpage.m4 stable/10/contrib/sendmail/cf/mailer/smtp.m4 stable/10/contrib/sendmail/cf/mailer/usenet.m4 stable/10/contrib/sendmail/cf/mailer/uucp.m4 stable/10/contrib/sendmail/cf/ostype/a-ux.m4 stable/10/contrib/sendmail/cf/ostype/aix3.m4 stable/10/contrib/sendmail/cf/ostype/aix4.m4 stable/10/contrib/sendmail/cf/ostype/aix5.m4 stable/10/contrib/sendmail/cf/ostype/altos.m4 stable/10/contrib/sendmail/cf/ostype/amdahl-uts.m4 stable/10/contrib/sendmail/cf/ostype/bsd4.3.m4 stable/10/contrib/sendmail/cf/ostype/bsd4.4.m4 stable/10/contrib/sendmail/cf/ostype/bsdi.m4 stable/10/contrib/sendmail/cf/ostype/bsdi1.0.m4 stable/10/contrib/sendmail/cf/ostype/bsdi2.0.m4 stable/10/contrib/sendmail/cf/ostype/darwin.m4 stable/10/contrib/sendmail/cf/ostype/dgux.m4 stable/10/contrib/sendmail/cf/ostype/domainos.m4 stable/10/contrib/sendmail/cf/ostype/dragonfly.m4 stable/10/contrib/sendmail/cf/ostype/dynix3.2.m4 stable/10/contrib/sendmail/cf/ostype/freebsd4.m4 stable/10/contrib/sendmail/cf/ostype/freebsd5.m4 stable/10/contrib/sendmail/cf/ostype/freebsd6.m4 stable/10/contrib/sendmail/cf/ostype/gnu.m4 stable/10/contrib/sendmail/cf/ostype/hpux10.m4 stable/10/contrib/sendmail/cf/ostype/hpux11.m4 stable/10/contrib/sendmail/cf/ostype/hpux9.m4 stable/10/contrib/sendmail/cf/ostype/irix4.m4 stable/10/contrib/sendmail/cf/ostype/irix5.m4 stable/10/contrib/sendmail/cf/ostype/irix6.m4 stable/10/contrib/sendmail/cf/ostype/isc4.1.m4 stable/10/contrib/sendmail/cf/ostype/linux.m4 stable/10/contrib/sendmail/cf/ostype/maxion.m4 stable/10/contrib/sendmail/cf/ostype/mklinux.m4 stable/10/contrib/sendmail/cf/ostype/mpeix.m4 stable/10/contrib/sendmail/cf/ostype/nextstep.m4 stable/10/contrib/sendmail/cf/ostype/openbsd.m4 stable/10/contrib/sendmail/cf/ostype/osf1.m4 stable/10/contrib/sendmail/cf/ostype/powerux.m4 stable/10/contrib/sendmail/cf/ostype/ptx2.m4 stable/10/contrib/sendmail/cf/ostype/qnx.m4 stable/10/contrib/sendmail/cf/ostype/riscos4.5.m4 stable/10/contrib/sendmail/cf/ostype/sco-uw-2.1.m4 stable/10/contrib/sendmail/cf/ostype/sco3.2.m4 stable/10/contrib/sendmail/cf/ostype/sinix.m4 stable/10/contrib/sendmail/cf/ostype/solaris11.m4 stable/10/contrib/sendmail/cf/ostype/solaris2.m4 stable/10/contrib/sendmail/cf/ostype/solaris2.ml.m4 stable/10/contrib/sendmail/cf/ostype/solaris2.pre5.m4 stable/10/contrib/sendmail/cf/ostype/solaris8.m4 stable/10/contrib/sendmail/cf/ostype/sunos3.5.m4 stable/10/contrib/sendmail/cf/ostype/sunos4.1.m4 stable/10/contrib/sendmail/cf/ostype/svr4.m4 stable/10/contrib/sendmail/cf/ostype/ultrix4.m4 stable/10/contrib/sendmail/cf/ostype/unicos.m4 stable/10/contrib/sendmail/cf/ostype/unicosmk.m4 stable/10/contrib/sendmail/cf/ostype/unicosmp.m4 stable/10/contrib/sendmail/cf/ostype/unixware7.m4 stable/10/contrib/sendmail/cf/ostype/unknown.m4 stable/10/contrib/sendmail/cf/ostype/uxpds.m4 stable/10/contrib/sendmail/cf/sendmail.schema stable/10/contrib/sendmail/cf/sh/makeinfo.sh stable/10/contrib/sendmail/contrib/README stable/10/contrib/sendmail/contrib/bsdi.mc stable/10/contrib/sendmail/contrib/buildvirtuser stable/10/contrib/sendmail/contrib/cidrexpand stable/10/contrib/sendmail/contrib/dnsblaccess.m4 stable/10/contrib/sendmail/contrib/link_hash.sh stable/10/contrib/sendmail/contrib/qtool.8 stable/10/contrib/sendmail/contrib/qtool.pl stable/10/contrib/sendmail/contrib/smcontrol.pl stable/10/contrib/sendmail/contrib/socketmapClient.pl stable/10/contrib/sendmail/contrib/socketmapServer.pl stable/10/contrib/sendmail/doc/op/Makefile stable/10/contrib/sendmail/doc/op/README stable/10/contrib/sendmail/doc/op/op.me stable/10/contrib/sendmail/editmap/Makefile stable/10/contrib/sendmail/editmap/Makefile.m4 stable/10/contrib/sendmail/editmap/editmap.8 stable/10/contrib/sendmail/editmap/editmap.c stable/10/contrib/sendmail/include/libmilter/mfapi.h stable/10/contrib/sendmail/include/libmilter/mfdef.h stable/10/contrib/sendmail/include/libmilter/milter.h stable/10/contrib/sendmail/include/libsmdb/smdb.h stable/10/contrib/sendmail/include/sendmail/mailstats.h stable/10/contrib/sendmail/include/sendmail/pathnames.h stable/10/contrib/sendmail/include/sendmail/sendmail.h stable/10/contrib/sendmail/include/sm/assert.h stable/10/contrib/sendmail/include/sm/bdb.h stable/10/contrib/sendmail/include/sm/bitops.h stable/10/contrib/sendmail/include/sm/cdefs.h stable/10/contrib/sendmail/include/sm/cf.h stable/10/contrib/sendmail/include/sm/clock.h stable/10/contrib/sendmail/include/sm/conf.h stable/10/contrib/sendmail/include/sm/config.h stable/10/contrib/sendmail/include/sm/debug.h stable/10/contrib/sendmail/include/sm/errstring.h stable/10/contrib/sendmail/include/sm/exc.h stable/10/contrib/sendmail/include/sm/fdset.h stable/10/contrib/sendmail/include/sm/gen.h stable/10/contrib/sendmail/include/sm/heap.h stable/10/contrib/sendmail/include/sm/io.h stable/10/contrib/sendmail/include/sm/ldap.h stable/10/contrib/sendmail/include/sm/limits.h stable/10/contrib/sendmail/include/sm/mbdb.h stable/10/contrib/sendmail/include/sm/misc.h stable/10/contrib/sendmail/include/sm/os/sm_os_aix.h stable/10/contrib/sendmail/include/sm/os/sm_os_dragonfly.h stable/10/contrib/sendmail/include/sm/os/sm_os_freebsd.h stable/10/contrib/sendmail/include/sm/os/sm_os_hp.h stable/10/contrib/sendmail/include/sm/os/sm_os_irix.h stable/10/contrib/sendmail/include/sm/os/sm_os_linux.h stable/10/contrib/sendmail/include/sm/os/sm_os_mpeix.h stable/10/contrib/sendmail/include/sm/os/sm_os_next.h stable/10/contrib/sendmail/include/sm/os/sm_os_openbsd.h stable/10/contrib/sendmail/include/sm/os/sm_os_openunix.h stable/10/contrib/sendmail/include/sm/os/sm_os_osf1.h stable/10/contrib/sendmail/include/sm/os/sm_os_qnx.h stable/10/contrib/sendmail/include/sm/os/sm_os_sunos.h stable/10/contrib/sendmail/include/sm/os/sm_os_ultrix.h stable/10/contrib/sendmail/include/sm/os/sm_os_unicos.h stable/10/contrib/sendmail/include/sm/os/sm_os_unicosmk.h stable/10/contrib/sendmail/include/sm/os/sm_os_unicosmp.h stable/10/contrib/sendmail/include/sm/os/sm_os_unixware.h stable/10/contrib/sendmail/include/sm/path.h stable/10/contrib/sendmail/include/sm/rpool.h stable/10/contrib/sendmail/include/sm/sem.h stable/10/contrib/sendmail/include/sm/setjmp.h stable/10/contrib/sendmail/include/sm/shm.h stable/10/contrib/sendmail/include/sm/signal.h stable/10/contrib/sendmail/include/sm/string.h stable/10/contrib/sendmail/include/sm/sysexits.h stable/10/contrib/sendmail/include/sm/tailq.h stable/10/contrib/sendmail/include/sm/test.h stable/10/contrib/sendmail/include/sm/time.h stable/10/contrib/sendmail/include/sm/types.h stable/10/contrib/sendmail/include/sm/varargs.h stable/10/contrib/sendmail/include/sm/xtrap.h stable/10/contrib/sendmail/libmilter/Makefile stable/10/contrib/sendmail/libmilter/Makefile.m4 stable/10/contrib/sendmail/libmilter/README stable/10/contrib/sendmail/libmilter/comm.c stable/10/contrib/sendmail/libmilter/docs/api.html stable/10/contrib/sendmail/libmilter/docs/design.html stable/10/contrib/sendmail/libmilter/docs/index.html stable/10/contrib/sendmail/libmilter/docs/installation.html stable/10/contrib/sendmail/libmilter/docs/other.html stable/10/contrib/sendmail/libmilter/docs/overview.html stable/10/contrib/sendmail/libmilter/docs/sample.html stable/10/contrib/sendmail/libmilter/docs/smfi_addheader.html stable/10/contrib/sendmail/libmilter/docs/smfi_addrcpt.html stable/10/contrib/sendmail/libmilter/docs/smfi_addrcpt_par.html stable/10/contrib/sendmail/libmilter/docs/smfi_chgfrom.html stable/10/contrib/sendmail/libmilter/docs/smfi_chgheader.html stable/10/contrib/sendmail/libmilter/docs/smfi_delrcpt.html stable/10/contrib/sendmail/libmilter/docs/smfi_getpriv.html stable/10/contrib/sendmail/libmilter/docs/smfi_getsymval.html stable/10/contrib/sendmail/libmilter/docs/smfi_insheader.html stable/10/contrib/sendmail/libmilter/docs/smfi_main.html stable/10/contrib/sendmail/libmilter/docs/smfi_opensocket.html stable/10/contrib/sendmail/libmilter/docs/smfi_progress.html stable/10/contrib/sendmail/libmilter/docs/smfi_quarantine.html stable/10/contrib/sendmail/libmilter/docs/smfi_register.html stable/10/contrib/sendmail/libmilter/docs/smfi_replacebody.html stable/10/contrib/sendmail/libmilter/docs/smfi_setbacklog.html stable/10/contrib/sendmail/libmilter/docs/smfi_setconn.html stable/10/contrib/sendmail/libmilter/docs/smfi_setdbg.html stable/10/contrib/sendmail/libmilter/docs/smfi_setmlreply.html stable/10/contrib/sendmail/libmilter/docs/smfi_setpriv.html stable/10/contrib/sendmail/libmilter/docs/smfi_setreply.html stable/10/contrib/sendmail/libmilter/docs/smfi_setsymlist.html stable/10/contrib/sendmail/libmilter/docs/smfi_settimeout.html stable/10/contrib/sendmail/libmilter/docs/smfi_stop.html stable/10/contrib/sendmail/libmilter/docs/smfi_version.html stable/10/contrib/sendmail/libmilter/docs/xxfi_abort.html stable/10/contrib/sendmail/libmilter/docs/xxfi_body.html stable/10/contrib/sendmail/libmilter/docs/xxfi_close.html stable/10/contrib/sendmail/libmilter/docs/xxfi_connect.html stable/10/contrib/sendmail/libmilter/docs/xxfi_data.html stable/10/contrib/sendmail/libmilter/docs/xxfi_envfrom.html stable/10/contrib/sendmail/libmilter/docs/xxfi_envrcpt.html stable/10/contrib/sendmail/libmilter/docs/xxfi_eoh.html stable/10/contrib/sendmail/libmilter/docs/xxfi_eom.html stable/10/contrib/sendmail/libmilter/docs/xxfi_header.html stable/10/contrib/sendmail/libmilter/docs/xxfi_helo.html stable/10/contrib/sendmail/libmilter/docs/xxfi_negotiate.html stable/10/contrib/sendmail/libmilter/docs/xxfi_unknown.html stable/10/contrib/sendmail/libmilter/engine.c stable/10/contrib/sendmail/libmilter/example.c stable/10/contrib/sendmail/libmilter/handler.c stable/10/contrib/sendmail/libmilter/libmilter.h stable/10/contrib/sendmail/libmilter/listener.c stable/10/contrib/sendmail/libmilter/main.c stable/10/contrib/sendmail/libmilter/monitor.c stable/10/contrib/sendmail/libmilter/signal.c stable/10/contrib/sendmail/libmilter/sm_gethost.c stable/10/contrib/sendmail/libmilter/smfi.c stable/10/contrib/sendmail/libmilter/worker.c stable/10/contrib/sendmail/libsm/Makefile stable/10/contrib/sendmail/libsm/Makefile.m4 stable/10/contrib/sendmail/libsm/README stable/10/contrib/sendmail/libsm/assert.c stable/10/contrib/sendmail/libsm/assert.html stable/10/contrib/sendmail/libsm/b-strcmp.c stable/10/contrib/sendmail/libsm/b-strl.c stable/10/contrib/sendmail/libsm/cdefs.html stable/10/contrib/sendmail/libsm/cf.c stable/10/contrib/sendmail/libsm/clock.c stable/10/contrib/sendmail/libsm/clrerr.c stable/10/contrib/sendmail/libsm/config.c stable/10/contrib/sendmail/libsm/debug.c stable/10/contrib/sendmail/libsm/debug.html stable/10/contrib/sendmail/libsm/errstring.c stable/10/contrib/sendmail/libsm/exc.c stable/10/contrib/sendmail/libsm/exc.html stable/10/contrib/sendmail/libsm/fclose.c stable/10/contrib/sendmail/libsm/feof.c stable/10/contrib/sendmail/libsm/ferror.c stable/10/contrib/sendmail/libsm/fflush.c stable/10/contrib/sendmail/libsm/fget.c stable/10/contrib/sendmail/libsm/findfp.c stable/10/contrib/sendmail/libsm/flags.c stable/10/contrib/sendmail/libsm/fopen.c stable/10/contrib/sendmail/libsm/fpos.c stable/10/contrib/sendmail/libsm/fprintf.c stable/10/contrib/sendmail/libsm/fpurge.c stable/10/contrib/sendmail/libsm/fput.c stable/10/contrib/sendmail/libsm/fread.c stable/10/contrib/sendmail/libsm/fscanf.c stable/10/contrib/sendmail/libsm/fseek.c stable/10/contrib/sendmail/libsm/fvwrite.c stable/10/contrib/sendmail/libsm/fvwrite.h stable/10/contrib/sendmail/libsm/fwalk.c stable/10/contrib/sendmail/libsm/fwrite.c stable/10/contrib/sendmail/libsm/gen.html stable/10/contrib/sendmail/libsm/get.c stable/10/contrib/sendmail/libsm/glue.h stable/10/contrib/sendmail/libsm/heap.c stable/10/contrib/sendmail/libsm/heap.html stable/10/contrib/sendmail/libsm/index.html stable/10/contrib/sendmail/libsm/inet6_ntop.c stable/10/contrib/sendmail/libsm/io.html stable/10/contrib/sendmail/libsm/ldap.c stable/10/contrib/sendmail/libsm/local.h stable/10/contrib/sendmail/libsm/makebuf.c stable/10/contrib/sendmail/libsm/match.c stable/10/contrib/sendmail/libsm/mbdb.c stable/10/contrib/sendmail/libsm/memstat.c stable/10/contrib/sendmail/libsm/mpeix.c stable/10/contrib/sendmail/libsm/niprop.c stable/10/contrib/sendmail/libsm/path.c stable/10/contrib/sendmail/libsm/put.c stable/10/contrib/sendmail/libsm/refill.c stable/10/contrib/sendmail/libsm/rewind.c stable/10/contrib/sendmail/libsm/rpool.c stable/10/contrib/sendmail/libsm/rpool.html stable/10/contrib/sendmail/libsm/sem.c stable/10/contrib/sendmail/libsm/setvbuf.c stable/10/contrib/sendmail/libsm/shm.c stable/10/contrib/sendmail/libsm/signal.c stable/10/contrib/sendmail/libsm/smstdio.c stable/10/contrib/sendmail/libsm/snprintf.c stable/10/contrib/sendmail/libsm/sscanf.c stable/10/contrib/sendmail/libsm/stdio.c stable/10/contrib/sendmail/libsm/strcasecmp.c stable/10/contrib/sendmail/libsm/strdup.c stable/10/contrib/sendmail/libsm/strerror.c stable/10/contrib/sendmail/libsm/strexit.c stable/10/contrib/sendmail/libsm/string.c stable/10/contrib/sendmail/libsm/stringf.c stable/10/contrib/sendmail/libsm/strio.c stable/10/contrib/sendmail/libsm/strl.c stable/10/contrib/sendmail/libsm/strrevcmp.c stable/10/contrib/sendmail/libsm/strto.c stable/10/contrib/sendmail/libsm/syslogio.c stable/10/contrib/sendmail/libsm/t-cf.c stable/10/contrib/sendmail/libsm/t-event.c stable/10/contrib/sendmail/libsm/t-exc.c stable/10/contrib/sendmail/libsm/t-fget.c stable/10/contrib/sendmail/libsm/t-float.c stable/10/contrib/sendmail/libsm/t-fopen.c stable/10/contrib/sendmail/libsm/t-heap.c stable/10/contrib/sendmail/libsm/t-inet6_ntop.c stable/10/contrib/sendmail/libsm/t-match.c stable/10/contrib/sendmail/libsm/t-memstat.c stable/10/contrib/sendmail/libsm/t-path.c stable/10/contrib/sendmail/libsm/t-qic.c stable/10/contrib/sendmail/libsm/t-rpool.c stable/10/contrib/sendmail/libsm/t-scanf.c stable/10/contrib/sendmail/libsm/t-sem.c stable/10/contrib/sendmail/libsm/t-shm.c stable/10/contrib/sendmail/libsm/t-smstdio.c stable/10/contrib/sendmail/libsm/t-string.c stable/10/contrib/sendmail/libsm/t-strio.c stable/10/contrib/sendmail/libsm/t-strl.c stable/10/contrib/sendmail/libsm/t-strrevcmp.c stable/10/contrib/sendmail/libsm/t-types.c stable/10/contrib/sendmail/libsm/test.c stable/10/contrib/sendmail/libsm/ungetc.c stable/10/contrib/sendmail/libsm/util.c stable/10/contrib/sendmail/libsm/vasprintf.c stable/10/contrib/sendmail/libsm/vfprintf.c stable/10/contrib/sendmail/libsm/vfscanf.c stable/10/contrib/sendmail/libsm/vprintf.c stable/10/contrib/sendmail/libsm/vsnprintf.c stable/10/contrib/sendmail/libsm/wbuf.c stable/10/contrib/sendmail/libsm/wsetup.c stable/10/contrib/sendmail/libsm/xtrap.c stable/10/contrib/sendmail/libsmdb/Makefile stable/10/contrib/sendmail/libsmdb/Makefile.m4 stable/10/contrib/sendmail/libsmdb/smdb.c stable/10/contrib/sendmail/libsmdb/smdb1.c stable/10/contrib/sendmail/libsmdb/smdb2.c stable/10/contrib/sendmail/libsmdb/smndbm.c stable/10/contrib/sendmail/libsmutil/Makefile stable/10/contrib/sendmail/libsmutil/Makefile.m4 stable/10/contrib/sendmail/libsmutil/cf.c stable/10/contrib/sendmail/libsmutil/debug.c stable/10/contrib/sendmail/libsmutil/err.c stable/10/contrib/sendmail/libsmutil/lockfile.c stable/10/contrib/sendmail/libsmutil/safefile.c stable/10/contrib/sendmail/libsmutil/snprintf.c stable/10/contrib/sendmail/mail.local/Makefile stable/10/contrib/sendmail/mail.local/Makefile.m4 stable/10/contrib/sendmail/mail.local/README stable/10/contrib/sendmail/mail.local/mail.local.8 stable/10/contrib/sendmail/mail.local/mail.local.c stable/10/contrib/sendmail/mailstats/Makefile stable/10/contrib/sendmail/mailstats/Makefile.m4 stable/10/contrib/sendmail/mailstats/mailstats.8 stable/10/contrib/sendmail/mailstats/mailstats.c stable/10/contrib/sendmail/makemap/Makefile stable/10/contrib/sendmail/makemap/Makefile.m4 stable/10/contrib/sendmail/makemap/makemap.8 stable/10/contrib/sendmail/makemap/makemap.c stable/10/contrib/sendmail/praliases/Makefile stable/10/contrib/sendmail/praliases/Makefile.m4 stable/10/contrib/sendmail/praliases/praliases.8 stable/10/contrib/sendmail/praliases/praliases.c stable/10/contrib/sendmail/rmail/Makefile stable/10/contrib/sendmail/rmail/Makefile.m4 stable/10/contrib/sendmail/rmail/rmail.8 stable/10/contrib/sendmail/rmail/rmail.c stable/10/contrib/sendmail/smrsh/Makefile stable/10/contrib/sendmail/smrsh/Makefile.m4 stable/10/contrib/sendmail/smrsh/README stable/10/contrib/sendmail/smrsh/smrsh.8 stable/10/contrib/sendmail/smrsh/smrsh.c stable/10/contrib/sendmail/src/Makefile stable/10/contrib/sendmail/src/Makefile.m4 stable/10/contrib/sendmail/src/README stable/10/contrib/sendmail/src/SECURITY stable/10/contrib/sendmail/src/TRACEFLAGS stable/10/contrib/sendmail/src/TUNING stable/10/contrib/sendmail/src/alias.c stable/10/contrib/sendmail/src/aliases stable/10/contrib/sendmail/src/aliases.5 stable/10/contrib/sendmail/src/arpadate.c stable/10/contrib/sendmail/src/bf.c stable/10/contrib/sendmail/src/bf.h stable/10/contrib/sendmail/src/collect.c stable/10/contrib/sendmail/src/conf.c stable/10/contrib/sendmail/src/conf.h stable/10/contrib/sendmail/src/control.c stable/10/contrib/sendmail/src/convtime.c stable/10/contrib/sendmail/src/daemon.c stable/10/contrib/sendmail/src/daemon.h stable/10/contrib/sendmail/src/deliver.c stable/10/contrib/sendmail/src/domain.c stable/10/contrib/sendmail/src/envelope.c stable/10/contrib/sendmail/src/err.c stable/10/contrib/sendmail/src/headers.c stable/10/contrib/sendmail/src/helpfile stable/10/contrib/sendmail/src/macro.c stable/10/contrib/sendmail/src/mailq.1 stable/10/contrib/sendmail/src/main.c stable/10/contrib/sendmail/src/map.c stable/10/contrib/sendmail/src/map.h stable/10/contrib/sendmail/src/mci.c stable/10/contrib/sendmail/src/milter.c stable/10/contrib/sendmail/src/mime.c stable/10/contrib/sendmail/src/newaliases.1 stable/10/contrib/sendmail/src/parseaddr.c stable/10/contrib/sendmail/src/queue.c stable/10/contrib/sendmail/src/ratectrl.c stable/10/contrib/sendmail/src/readcf.c stable/10/contrib/sendmail/src/recipient.c stable/10/contrib/sendmail/src/sasl.c stable/10/contrib/sendmail/src/savemail.c stable/10/contrib/sendmail/src/sendmail.8 stable/10/contrib/sendmail/src/sendmail.h stable/10/contrib/sendmail/src/sfsasl.c stable/10/contrib/sendmail/src/sfsasl.h stable/10/contrib/sendmail/src/shmticklib.c stable/10/contrib/sendmail/src/sm_resolve.c stable/10/contrib/sendmail/src/sm_resolve.h stable/10/contrib/sendmail/src/srvrsmtp.c stable/10/contrib/sendmail/src/stab.c stable/10/contrib/sendmail/src/stats.c stable/10/contrib/sendmail/src/statusd_shm.h stable/10/contrib/sendmail/src/sysexits.c stable/10/contrib/sendmail/src/timers.c stable/10/contrib/sendmail/src/timers.h stable/10/contrib/sendmail/src/tls.c stable/10/contrib/sendmail/src/trace.c stable/10/contrib/sendmail/src/udb.c stable/10/contrib/sendmail/src/usersmtp.c stable/10/contrib/sendmail/src/util.c stable/10/contrib/sendmail/src/version.c stable/10/contrib/sendmail/test/Makefile stable/10/contrib/sendmail/test/Makefile.m4 stable/10/contrib/sendmail/test/README stable/10/contrib/sendmail/test/Results stable/10/contrib/sendmail/test/t_dropgid.c stable/10/contrib/sendmail/test/t_exclopen.c stable/10/contrib/sendmail/test/t_pathconf.c stable/10/contrib/sendmail/test/t_seteuid.c stable/10/contrib/sendmail/test/t_setgid.c stable/10/contrib/sendmail/test/t_setreuid.c stable/10/contrib/sendmail/test/t_setuid.c stable/10/contrib/sendmail/test/t_snprintf.c stable/10/contrib/sendmail/vacation/Makefile stable/10/contrib/sendmail/vacation/Makefile.m4 stable/10/contrib/sendmail/vacation/vacation.1 stable/10/contrib/sendmail/vacation/vacation.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/sendmail/CACerts ============================================================================== --- stable/10/contrib/sendmail/CACerts Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/CACerts Mon May 26 15:28:28 2014 (r266692) @@ -1,4 +1,4 @@ -# $Id: CACerts,v 8.6 2013/01/18 15:14:17 ca Exp $ +# $Id: CACerts,v 8.6 2013-01-18 15:14:17 ca Exp $ # This file contains some CA certificates that are used to sign the # certificates of mail servers of members of the sendmail consortium # who may reply to questions etc sent to sendmail.org. Modified: stable/10/contrib/sendmail/FAQ ============================================================================== --- stable/10/contrib/sendmail/FAQ Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/FAQ Mon May 26 15:28:28 2014 (r266692) @@ -5,4 +5,4 @@ A plain-text version of the questions on the answers, is posted to comp.mail.sendmail on the 10th and 25th of each month. -$Revision: 8.24 $, Last updated $Date: 1999/02/07 03:21:03 $ +$Revision: 8.24 $, Last updated $Date: 1999-02-07 03:21:03 $ Modified: stable/10/contrib/sendmail/INSTALL ============================================================================== --- stable/10/contrib/sendmail/INSTALL Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/INSTALL Mon May 26 15:28:28 2014 (r266692) @@ -43,4 +43,4 @@ sendmail/SECURITY for more installation in case you are now using a different (and thereby incompatible) version of Berkeley DB. -$Revision: 8.16 $, Last updated $Date: 2007/10/03 21:00:28 $ +$Revision: 8.16 $, Last updated $Date: 2007-10-03 21:00:28 $ Modified: stable/10/contrib/sendmail/KNOWNBUGS ============================================================================== --- stable/10/contrib/sendmail/KNOWNBUGS Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/KNOWNBUGS Mon May 26 15:28:28 2014 (r266692) @@ -266,4 +266,4 @@ Kresolve sequence dnsmx canon be used if set instead of LOCAL_RELAY ($R). This will be fixed in a future version. -$Revision: 8.61 $, Last updated $Date: 2011/04/07 17:48:23 $ +$Revision: 8.61 $, Last updated $Date: 2011-04-07 17:48:23 $ Modified: stable/10/contrib/sendmail/LICENSE ============================================================================== --- stable/10/contrib/sendmail/LICENSE Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/LICENSE Mon May 26 15:28:28 2014 (r266692) @@ -35,7 +35,7 @@ each of the following conditions is met: forth as paragraph 6 below, in the documentation and/or other materials provided with the distribution. For the purposes of binary distribution the "Copyright Notice" refers to the following language: - "Copyright (c) 1998-2013 Proofpoint, Inc. All rights reserved." + "Copyright (c) 1998-2014 Proofpoint, Inc. All rights reserved." 4. Neither the name of Proofpoint, Inc. nor the University of California nor names of their contributors may be used to endorse or promote @@ -78,4 +78,4 @@ each of the following conditions is met: (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -$Revision: 8.22 $, Last updated $Date: 2013/11/23 04:37:36 $, Document 139848.1 +$Revision: 8.23 $, Last updated $Date: 2014-01-26 20:10:01 $, Document 139848.1 Modified: stable/10/contrib/sendmail/Makefile ============================================================================== --- stable/10/contrib/sendmail/Makefile Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/Makefile Mon May 26 15:28:28 2014 (r266692) @@ -1,4 +1,4 @@ -# $Id: Makefile.dist,v 8.15 2001/08/23 20:44:39 ca Exp $ +# $Id: Makefile.dist,v 8.15 2001-08-23 20:44:39 ca Exp $ SHELL= /bin/sh SUBDIRS= libsm libsmutil libsmdb sendmail editmap mail.local \ Modified: stable/10/contrib/sendmail/PGPKEYS ============================================================================== --- stable/10/contrib/sendmail/PGPKEYS Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/PGPKEYS Mon May 26 15:28:28 2014 (r266692) @@ -2613,4 +2613,4 @@ DnF3FZZEzV7oqPwC2jzv/1dD6GFhtgy0cnyoPGUJ =nES8 -----END PGP PUBLIC KEY BLOCK----- -$Revision: 8.46 $, Last updated $Date: 2014/01/18 00:20:24 $ +$Revision: 8.46 $, Last updated $Date: 2014-01-18 00:20:24 $ Modified: stable/10/contrib/sendmail/README ============================================================================== --- stable/10/contrib/sendmail/README Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/README Mon May 26 15:28:28 2014 (r266692) @@ -465,4 +465,4 @@ sendmail Source for the sendmail program test Some test scripts (currently only for compilation aids). vacation Source for the vacation program. NOT PART OF SENDMAIL! -$Revision: 8.96 $, Last updated $Date: 2013/11/22 20:51:01 $ +$Revision: 8.96 $, Last updated $Date: 2013-11-22 20:51:01 $ Modified: stable/10/contrib/sendmail/RELEASE_NOTES ============================================================================== --- stable/10/contrib/sendmail/RELEASE_NOTES Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/RELEASE_NOTES Mon May 26 15:28:28 2014 (r266692) @@ -1,11 +1,20 @@ SENDMAIL RELEASE NOTES - $Id: RELEASE_NOTES,v 8.2043 2014/01/23 20:27:19 ca Exp $ This listing shows the version of the sendmail binary, the version of the sendmail configuration files, the date of release, and a summary of the changes in that release. +8.14.9/8.14.9 2014/05/21 + SECURITY: Properly set the close-on-exec flag for file descriptors + (except stdin, stdout, and stderr) before executing mailers. + Fix a misformed comment in conf.c: "/*" within comment + which may cause a compilation error on some systems. + Problem reported by John Beck of Oracle. + DEVTOOLS: Fix regression in auto-detection of libraries when only + shared libraries are available. Problem reported by + Bryan Costales. + 8.14.8/8.14.8 2014/01/26 Properly initialize all OpenSSL algorithms for versions before OpenSSL 0.9.8o. Without this SHA2 algorithms may not Modified: stable/10/contrib/sendmail/cf/README ============================================================================== --- stable/10/contrib/sendmail/cf/README Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/README Mon May 26 15:28:28 2014 (r266692) @@ -4704,4 +4704,4 @@ M4 DIVERSIONS 8 DNS based blacklists 9 special local rulesets (1 and 2) -$Revision: 8.730 $, Last updated $Date: 2014/01/16 15:55:51 $ +$Revision: 8.730 $, Last updated $Date: 2014-01-16 15:55:51 $ Modified: stable/10/contrib/sendmail/cf/cf/Makefile ============================================================================== --- stable/10/contrib/sendmail/cf/cf/Makefile Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/Makefile Mon May 26 15:28:28 2014 (r266692) @@ -1,7 +1,7 @@ # # Makefile for configuration files. # -# $Id: Makefile,v 8.60 2005/06/14 02:16:34 gshapiro Exp $ +# $Id: Makefile,v 8.60 2005-06-14 02:16:34 gshapiro Exp $ # # Modified: stable/10/contrib/sendmail/cf/cf/README ============================================================================== --- stable/10/contrib/sendmail/cf/cf/README Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/README Mon May 26 15:28:28 2014 (r266692) @@ -31,4 +31,4 @@ The name of the source file for "submit. For more details see Makefile. -$Revision: 1.2 $, Last updated $Date: 2002/02/22 00:33:54 $ +$Revision: 1.2 $, Last updated $Date: 2002-02-22 00:33:54 $ Modified: stable/10/contrib/sendmail/cf/cf/chez.cs.mc ============================================================================== --- stable/10/contrib/sendmail/cf/cf/chez.cs.mc Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/chez.cs.mc Mon May 26 15:28:28 2014 (r266692) @@ -24,7 +24,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: chez.cs.mc,v 8.15 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: chez.cs.mc,v 8.15 2013-11-22 20:51:08 ca Exp $') OSTYPE(bsd4.4)dnl DOMAIN(CS.Berkeley.EDU)dnl define(`LOCAL_RELAY', vangogh.CS.Berkeley.EDU)dnl Modified: stable/10/contrib/sendmail/cf/cf/clientproto.mc ============================================================================== --- stable/10/contrib/sendmail/cf/cf/clientproto.mc Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/clientproto.mc Mon May 26 15:28:28 2014 (r266692) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: clientproto.mc,v 8.17 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: clientproto.mc,v 8.17 2013-11-22 20:51:08 ca Exp $') OSTYPE(unknown) FEATURE(nullclient, mailhost.$m) Modified: stable/10/contrib/sendmail/cf/cf/cs-hpux10.mc ============================================================================== --- stable/10/contrib/sendmail/cf/cf/cs-hpux10.mc Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/cs-hpux10.mc Mon May 26 15:28:28 2014 (r266692) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: cs-hpux10.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: cs-hpux10.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') OSTYPE(hpux10)dnl DOMAIN(CS.Berkeley.EDU)dnl define(`MAIL_HUB', mailspool.CS.Berkeley.EDU)dnl Modified: stable/10/contrib/sendmail/cf/cf/cs-hpux9.mc ============================================================================== --- stable/10/contrib/sendmail/cf/cf/cs-hpux9.mc Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/cs-hpux9.mc Mon May 26 15:28:28 2014 (r266692) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: cs-hpux9.mc,v 8.15 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: cs-hpux9.mc,v 8.15 2013-11-22 20:51:08 ca Exp $') OSTYPE(hpux9)dnl DOMAIN(CS.Berkeley.EDU)dnl define(`MAIL_HUB', mailspool.CS.Berkeley.EDU)dnl Modified: stable/10/contrib/sendmail/cf/cf/cs-osf1.mc ============================================================================== --- stable/10/contrib/sendmail/cf/cf/cs-osf1.mc Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/cs-osf1.mc Mon May 26 15:28:28 2014 (r266692) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: cs-osf1.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: cs-osf1.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') OSTYPE(osf1)dnl DOMAIN(CS.Berkeley.EDU)dnl MAILER(local)dnl Modified: stable/10/contrib/sendmail/cf/cf/cs-solaris2.mc ============================================================================== --- stable/10/contrib/sendmail/cf/cf/cs-solaris2.mc Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/cs-solaris2.mc Mon May 26 15:28:28 2014 (r266692) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: cs-solaris2.mc,v 8.13 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: cs-solaris2.mc,v 8.13 2013-11-22 20:51:08 ca Exp $') OSTYPE(solaris2)dnl DOMAIN(CS.Berkeley.EDU)dnl MAILER(local)dnl Modified: stable/10/contrib/sendmail/cf/cf/cs-sunos4.1.mc ============================================================================== --- stable/10/contrib/sendmail/cf/cf/cs-sunos4.1.mc Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/cs-sunos4.1.mc Mon May 26 15:28:28 2014 (r266692) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: cs-sunos4.1.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: cs-sunos4.1.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') OSTYPE(sunos4.1)dnl DOMAIN(CS.Berkeley.EDU)dnl MAILER(local)dnl Modified: stable/10/contrib/sendmail/cf/cf/cs-ultrix4.mc ============================================================================== --- stable/10/contrib/sendmail/cf/cf/cs-ultrix4.mc Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/cs-ultrix4.mc Mon May 26 15:28:28 2014 (r266692) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: cs-ultrix4.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: cs-ultrix4.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') OSTYPE(ultrix4)dnl DOMAIN(CS.Berkeley.EDU)dnl MAILER(local)dnl Modified: stable/10/contrib/sendmail/cf/cf/cyrusproto.mc ============================================================================== --- stable/10/contrib/sendmail/cf/cf/cyrusproto.mc Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/cyrusproto.mc Mon May 26 15:28:28 2014 (r266692) @@ -27,7 +27,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: cyrusproto.mc,v 8.7 1999/09/07 14:57:10 ca Exp $') +VERSIONID(`$Id: cyrusproto.mc,v 8.7 1999-09-07 14:57:10 ca Exp $') define(`confBIND_OPTS',`-DNSRCH -DEFNAMES') define(`confLOCAL_MAILER', `cyrus') FEATURE(`nocanonify') Modified: stable/10/contrib/sendmail/cf/cf/generic-bsd4.4.mc ============================================================================== --- stable/10/contrib/sendmail/cf/cf/generic-bsd4.4.mc Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/generic-bsd4.4.mc Mon May 26 15:28:28 2014 (r266692) @@ -21,7 +21,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-bsd4.4.mc,v 8.11 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-bsd4.4.mc,v 8.11 2013-11-22 20:51:08 ca Exp $') OSTYPE(bsd4.4)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/10/contrib/sendmail/cf/cf/generic-hpux10.mc ============================================================================== --- stable/10/contrib/sendmail/cf/cf/generic-hpux10.mc Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/generic-hpux10.mc Mon May 26 15:28:28 2014 (r266692) @@ -20,7 +20,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-hpux10.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-hpux10.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') OSTYPE(hpux10)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/10/contrib/sendmail/cf/cf/generic-hpux9.mc ============================================================================== --- stable/10/contrib/sendmail/cf/cf/generic-hpux9.mc Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/generic-hpux9.mc Mon May 26 15:28:28 2014 (r266692) @@ -20,7 +20,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-hpux9.mc,v 8.12 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-hpux9.mc,v 8.12 2013-11-22 20:51:08 ca Exp $') OSTYPE(hpux9)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/10/contrib/sendmail/cf/cf/generic-linux.mc ============================================================================== --- stable/10/contrib/sendmail/cf/cf/generic-linux.mc Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/generic-linux.mc Mon May 26 15:28:28 2014 (r266692) @@ -20,7 +20,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-linux.mc,v 8.2 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-linux.mc,v 8.2 2013-11-22 20:51:08 ca Exp $') OSTYPE(linux)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/10/contrib/sendmail/cf/cf/generic-mpeix.mc ============================================================================== --- stable/10/contrib/sendmail/cf/cf/generic-mpeix.mc Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/generic-mpeix.mc Mon May 26 15:28:28 2014 (r266692) @@ -17,7 +17,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-mpeix.mc,v 8.2 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-mpeix.mc,v 8.2 2013-11-22 20:51:08 ca Exp $') OSTYPE(mpeix)dnl DOMAIN(generic)dnl define(`confFORWARD_PATH', `$z/.forward')dnl Modified: stable/10/contrib/sendmail/cf/cf/generic-nextstep3.3.mc ============================================================================== --- stable/10/contrib/sendmail/cf/cf/generic-nextstep3.3.mc Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/generic-nextstep3.3.mc Mon May 26 15:28:28 2014 (r266692) @@ -20,7 +20,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-nextstep3.3.mc,v 8.11 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-nextstep3.3.mc,v 8.11 2013-11-22 20:51:08 ca Exp $') OSTYPE(nextstep)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/10/contrib/sendmail/cf/cf/generic-osf1.mc ============================================================================== --- stable/10/contrib/sendmail/cf/cf/generic-osf1.mc Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/generic-osf1.mc Mon May 26 15:28:28 2014 (r266692) @@ -20,7 +20,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-osf1.mc,v 8.12 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-osf1.mc,v 8.12 2013-11-22 20:51:08 ca Exp $') OSTYPE(osf1)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/10/contrib/sendmail/cf/cf/generic-solaris.mc ============================================================================== --- stable/10/contrib/sendmail/cf/cf/generic-solaris.mc Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/generic-solaris.mc Mon May 26 15:28:28 2014 (r266692) @@ -22,7 +22,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-solaris.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-solaris.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') OSTYPE(solaris2)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/10/contrib/sendmail/cf/cf/generic-sunos4.1.mc ============================================================================== --- stable/10/contrib/sendmail/cf/cf/generic-sunos4.1.mc Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/generic-sunos4.1.mc Mon May 26 15:28:28 2014 (r266692) @@ -20,7 +20,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-sunos4.1.mc,v 8.12 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-sunos4.1.mc,v 8.12 2013-11-22 20:51:08 ca Exp $') OSTYPE(sunos4.1)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/10/contrib/sendmail/cf/cf/generic-ultrix4.mc ============================================================================== --- stable/10/contrib/sendmail/cf/cf/generic-ultrix4.mc Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/generic-ultrix4.mc Mon May 26 15:28:28 2014 (r266692) @@ -20,7 +20,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-ultrix4.mc,v 8.12 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-ultrix4.mc,v 8.12 2013-11-22 20:51:08 ca Exp $') OSTYPE(ultrix4)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/10/contrib/sendmail/cf/cf/huginn.cs.mc ============================================================================== --- stable/10/contrib/sendmail/cf/cf/huginn.cs.mc Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/huginn.cs.mc Mon May 26 15:28:28 2014 (r266692) @@ -22,7 +22,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: huginn.cs.mc,v 8.16 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: huginn.cs.mc,v 8.16 2013-11-22 20:51:08 ca Exp $') OSTYPE(hpux9)dnl DOMAIN(CS.Berkeley.EDU)dnl MASQUERADE_AS(CS.Berkeley.EDU)dnl Modified: stable/10/contrib/sendmail/cf/cf/knecht.mc ============================================================================== --- stable/10/contrib/sendmail/cf/cf/knecht.mc Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/knecht.mc Mon May 26 15:28:28 2014 (r266692) @@ -19,7 +19,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: knecht.mc,v 8.63 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: knecht.mc,v 8.63 2013-11-22 20:51:08 ca Exp $') OSTYPE(bsd4.4) DOMAIN(generic) Modified: stable/10/contrib/sendmail/cf/cf/mail.cs.mc ============================================================================== --- stable/10/contrib/sendmail/cf/cf/mail.cs.mc Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/mail.cs.mc Mon May 26 15:28:28 2014 (r266692) @@ -22,7 +22,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: mail.cs.mc,v 8.19 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: mail.cs.mc,v 8.19 2013-11-22 20:51:08 ca Exp $') OSTYPE(ultrix4)dnl DOMAIN(Berkeley.EDU)dnl MASQUERADE_AS(CS.Berkeley.EDU)dnl Modified: stable/10/contrib/sendmail/cf/cf/mail.eecs.mc ============================================================================== --- stable/10/contrib/sendmail/cf/cf/mail.eecs.mc Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/mail.eecs.mc Mon May 26 15:28:28 2014 (r266692) @@ -22,7 +22,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: mail.eecs.mc,v 8.19 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: mail.eecs.mc,v 8.19 2013-11-22 20:51:08 ca Exp $') OSTYPE(ultrix4)dnl DOMAIN(EECS.Berkeley.EDU)dnl MASQUERADE_AS(EECS.Berkeley.EDU)dnl Modified: stable/10/contrib/sendmail/cf/cf/mailspool.cs.mc ============================================================================== --- stable/10/contrib/sendmail/cf/cf/mailspool.cs.mc Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/mailspool.cs.mc Mon May 26 15:28:28 2014 (r266692) @@ -24,7 +24,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: mailspool.cs.mc,v 8.13 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: mailspool.cs.mc,v 8.13 2013-11-22 20:51:08 ca Exp $') OSTYPE(sunos4.1)dnl DOMAIN(CS.Berkeley.EDU)dnl MAILER(local)dnl Modified: stable/10/contrib/sendmail/cf/cf/python.cs.mc ============================================================================== --- stable/10/contrib/sendmail/cf/cf/python.cs.mc Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/python.cs.mc Mon May 26 15:28:28 2014 (r266692) @@ -24,7 +24,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: python.cs.mc,v 8.13 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: python.cs.mc,v 8.13 2013-11-22 20:51:08 ca Exp $') OSTYPE(bsd4.4)dnl DOMAIN(CS.Berkeley.EDU)dnl define(`LOCAL_RELAY', vangogh.CS.Berkeley.EDU)dnl Modified: stable/10/contrib/sendmail/cf/cf/s2k-osf1.mc ============================================================================== --- stable/10/contrib/sendmail/cf/cf/s2k-osf1.mc Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/s2k-osf1.mc Mon May 26 15:28:28 2014 (r266692) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: s2k-osf1.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: s2k-osf1.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') OSTYPE(osf1)dnl DOMAIN(S2K.Berkeley.EDU)dnl MAILER(local)dnl Modified: stable/10/contrib/sendmail/cf/cf/s2k-ultrix4.mc ============================================================================== --- stable/10/contrib/sendmail/cf/cf/s2k-ultrix4.mc Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/s2k-ultrix4.mc Mon May 26 15:28:28 2014 (r266692) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: s2k-ultrix4.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: s2k-ultrix4.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') OSTYPE(ultrix4)dnl DOMAIN(S2K.Berkeley.EDU)dnl MAILER(local)dnl Modified: stable/10/contrib/sendmail/cf/cf/submit.cf ============================================================================== --- stable/10/contrib/sendmail/cf/cf/submit.cf Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/submit.cf Mon May 26 15:28:28 2014 (r266692) @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@lab.smi.sendmail.com on Thu Jan 23 12:29:13 PST 2014 -##### in /home/ca/sm8-rel/sm-8.14.8/OpenSource/sendmail-8.14.8/cf/cf +##### built by ca@lab.smi.sendmail.com on Tue May 20 12:12:52 PDT 2014 +##### in /home/ca/sm8.git/sendmail/OpenSource/sendmail-8.14.9/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -27,15 +27,15 @@ ###################################################################### ###################################################################### -##### $Id: cfhead.m4,v 8.122 2013/11/22 20:51:13 ca Exp $ ##### -##### $Id: cf.m4,v 8.33 2013/11/22 20:51:13 ca Exp $ ##### -##### $Id: submit.mc,v 8.15 2013/11/22 20:51:08 ca Exp $ ##### -##### $Id: msp.m4,v 1.34 2013/11/22 20:51:11 ca Exp $ ##### +##### $Id: cfhead.m4,v 8.122 2013-11-22 20:51:13 ca Exp $ ##### +##### $Id: cf.m4,v 8.33 2013-11-22 20:51:13 ca Exp $ ##### +##### $Id: submit.mc,v 8.15 2013-11-22 20:51:08 ca Exp $ ##### +##### $Id: msp.m4,v 1.34 2013-11-22 20:51:11 ca Exp $ ##### -##### $Id: no_default_msa.m4,v 8.3 2013/11/22 20:51:11 ca Exp $ ##### +##### $Id: no_default_msa.m4,v 8.3 2013-11-22 20:51:11 ca Exp $ ##### -##### $Id: proto.m4,v 8.762 2013/11/22 20:51:13 ca Exp $ ##### +##### $Id: proto.m4,v 8.762 2013-11-22 20:51:13 ca Exp $ ##### # level 10 config file format V10/Berkeley @@ -114,7 +114,7 @@ D{MTAHost}[127.0.0.1] # Configuration version number -DZ8.14.8/Submit +DZ8.14.9/Submit ############### @@ -1299,7 +1299,7 @@ R$* $#relay $@ ${MTAHost} $: $1 < @ $j ### Local and Program Mailer specification ### ################################################## -##### $Id: local.m4,v 8.60 2013/11/22 20:51:14 ca Exp $ ##### +##### $Id: local.m4,v 8.60 2013-11-22 20:51:14 ca Exp $ ##### # # Envelope sender rewriting @@ -1351,7 +1351,7 @@ Mprog, P=[IPC], F=lmDFMuXk5, S=EnvFromL ### SMTP Mailer specification ### ##################################### -##### $Id: smtp.m4,v 8.66 2013/11/22 20:51:14 ca Exp $ ##### +##### $Id: smtp.m4,v 8.66 2013-11-22 20:51:14 ca Exp $ ##### # # common sender and masquerading recipient rewriting @@ -1457,7 +1457,7 @@ Mrelay, P=[IPC], F=mDFMuXa8k, S=EnvFrom # # # # divert(0)dnl -# VERSIONID(`$Id: submit.mc,v 8.15 2013/11/22 20:51:08 ca Exp $') +# VERSIONID(`$Id: submit.mc,v 8.15 2013-11-22 20:51:08 ca Exp $') # define(`confCF_VERSION', `Submit')dnl # define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from complaining # define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet Modified: stable/10/contrib/sendmail/cf/cf/submit.mc ============================================================================== --- stable/10/contrib/sendmail/cf/cf/submit.mc Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/submit.mc Mon May 26 15:28:28 2014 (r266692) @@ -15,7 +15,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: submit.mc,v 8.15 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: submit.mc,v 8.15 2013-11-22 20:51:08 ca Exp $') define(`confCF_VERSION', `Submit')dnl define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from complaining define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet Modified: stable/10/contrib/sendmail/cf/cf/tcpproto.mc ============================================================================== --- stable/10/contrib/sendmail/cf/cf/tcpproto.mc Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/tcpproto.mc Mon May 26 15:28:28 2014 (r266692) @@ -26,7 +26,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: tcpproto.mc,v 8.15 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: tcpproto.mc,v 8.15 2013-11-22 20:51:08 ca Exp $') OSTYPE(`unknown') FEATURE(`nouucp', `reject') MAILER(`local') Modified: stable/10/contrib/sendmail/cf/cf/ucbarpa.mc ============================================================================== --- stable/10/contrib/sendmail/cf/cf/ucbarpa.mc Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/ucbarpa.mc Mon May 26 15:28:28 2014 (r266692) @@ -21,7 +21,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: ucbarpa.mc,v 8.13 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: ucbarpa.mc,v 8.13 2013-11-22 20:51:08 ca Exp $') DOMAIN(CS.Berkeley.EDU)dnl OSTYPE(bsd4.4)dnl MAILER(local)dnl Modified: stable/10/contrib/sendmail/cf/cf/ucbvax.mc ============================================================================== --- stable/10/contrib/sendmail/cf/cf/ucbvax.mc Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/ucbvax.mc Mon May 26 15:28:28 2014 (r266692) @@ -22,7 +22,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: ucbvax.mc,v 8.15 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: ucbvax.mc,v 8.15 2013-11-22 20:51:08 ca Exp $') OSTYPE(bsd4.3) DOMAIN(CS.Berkeley.EDU) MASQUERADE_AS(CS.Berkeley.EDU) Modified: stable/10/contrib/sendmail/cf/cf/uucpproto.mc ============================================================================== --- stable/10/contrib/sendmail/cf/cf/uucpproto.mc Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/uucpproto.mc Mon May 26 15:28:28 2014 (r266692) @@ -26,7 +26,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: uucpproto.mc,v 8.16 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: uucpproto.mc,v 8.16 2013-11-22 20:51:08 ca Exp $') OSTYPE(unknown) FEATURE(promiscuous_relay)dnl FEATURE(accept_unresolvable_domains)dnl Modified: stable/10/contrib/sendmail/cf/cf/vangogh.cs.mc ============================================================================== --- stable/10/contrib/sendmail/cf/cf/vangogh.cs.mc Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/cf/vangogh.cs.mc Mon May 26 15:28:28 2014 (r266692) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: vangogh.cs.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: vangogh.cs.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') DOMAIN(CS.Berkeley.EDU)dnl OSTYPE(bsd4.4)dnl MAILER(local)dnl Modified: stable/10/contrib/sendmail/cf/domain/Berkeley.EDU.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/domain/Berkeley.EDU.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/domain/Berkeley.EDU.m4 Mon May 26 15:28:28 2014 (r266692) @@ -12,7 +12,7 @@ divert(-1) # # divert(0) -VERSIONID(`$Id: Berkeley.EDU.m4,v 8.18 2013/11/22 20:51:10 ca Exp $') +VERSIONID(`$Id: Berkeley.EDU.m4,v 8.18 2013-11-22 20:51:10 ca Exp $') DOMAIN(berkeley-only)dnl define(`BITNET_RELAY', `bitnet-relay.Berkeley.EDU')dnl define(`UUCP_RELAY', `uucp-relay.Berkeley.EDU')dnl Modified: stable/10/contrib/sendmail/cf/domain/CS.Berkeley.EDU.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/domain/CS.Berkeley.EDU.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/domain/CS.Berkeley.EDU.m4 Mon May 26 15:28:28 2014 (r266692) @@ -12,7 +12,7 @@ divert(-1) # # divert(0) -VERSIONID(`$Id: CS.Berkeley.EDU.m4,v 8.11 2013/11/22 20:51:10 ca Exp $') +VERSIONID(`$Id: CS.Berkeley.EDU.m4,v 8.11 2013-11-22 20:51:10 ca Exp $') DOMAIN(Berkeley.EDU)dnl HACK(cssubdomain)dnl define(`confUSERDB_SPEC', Modified: stable/10/contrib/sendmail/cf/domain/EECS.Berkeley.EDU.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/domain/EECS.Berkeley.EDU.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/domain/EECS.Berkeley.EDU.m4 Mon May 26 15:28:28 2014 (r266692) @@ -12,6 +12,6 @@ divert(-1) # # divert(0) -VERSIONID(`$Id: EECS.Berkeley.EDU.m4,v 8.11 2013/11/22 20:51:10 ca Exp $') +VERSIONID(`$Id: EECS.Berkeley.EDU.m4,v 8.11 2013-11-22 20:51:10 ca Exp $') DOMAIN(Berkeley.EDU)dnl MASQUERADE_AS(EECS.Berkeley.EDU)dnl Modified: stable/10/contrib/sendmail/cf/domain/S2K.Berkeley.EDU.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/domain/S2K.Berkeley.EDU.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/domain/S2K.Berkeley.EDU.m4 Mon May 26 15:28:28 2014 (r266692) @@ -12,6 +12,6 @@ divert(-1) # # divert(0) -VERSIONID(`$Id: S2K.Berkeley.EDU.m4,v 8.11 2013/11/22 20:51:10 ca Exp $') +VERSIONID(`$Id: S2K.Berkeley.EDU.m4,v 8.11 2013-11-22 20:51:10 ca Exp $') DOMAIN(CS.Berkeley.EDU)dnl MASQUERADE_AS(postgres.Berkeley.EDU)dnl Modified: stable/10/contrib/sendmail/cf/domain/berkeley-only.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/domain/berkeley-only.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/domain/berkeley-only.m4 Mon May 26 15:28:28 2014 (r266692) @@ -12,7 +12,7 @@ divert(-1) # # divert(0) -VERSIONID(`$Id: unspecified-domain.m4,v 8.11 2013/11/22 20:51:10 ca Exp $') +VERSIONID(`$Id: unspecified-domain.m4,v 8.11 2013-11-22 20:51:10 ca Exp $') errprint(`*** ERROR: You are trying to use the Berkeley sample configuration') errprint(` files outside of the Computer Science Division at Berkeley.') errprint(` The configuration (.mc) files must be customized to reference') Modified: stable/10/contrib/sendmail/cf/domain/generic.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/domain/generic.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/domain/generic.m4 Mon May 26 15:28:28 2014 (r266692) @@ -20,7 +20,7 @@ divert(-1) # files. # divert(0) -VERSIONID(`$Id: generic.m4,v 8.16 2013/11/22 20:51:10 ca Exp $') +VERSIONID(`$Id: generic.m4,v 8.16 2013-11-22 20:51:10 ca Exp $') define(`confFORWARD_PATH', `$z/.forward.$w+$h:$z/.forward+$h:$z/.forward.$w:$z/.forward')dnl define(`confMAX_HEADERS_LENGTH', `32768')dnl FEATURE(`redirect')dnl Modified: stable/10/contrib/sendmail/cf/feature/accept_unqualified_senders.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/accept_unqualified_senders.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/accept_unqualified_senders.m4 Mon May 26 15:28:28 2014 (r266692) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: accept_unqualified_senders.m4,v 8.7 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: accept_unqualified_senders.m4,v 8.7 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_ACCEPT_UNQUALIFIED_SENDERS_', 1) Modified: stable/10/contrib/sendmail/cf/feature/accept_unresolvable_domains.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/accept_unresolvable_domains.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/accept_unresolvable_domains.m4 Mon May 26 15:28:28 2014 (r266692) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: accept_unresolvable_domains.m4,v 8.11 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: accept_unresolvable_domains.m4,v 8.11 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_ACCEPT_UNRESOLVABLE_DOMAINS_', 1) Modified: stable/10/contrib/sendmail/cf/feature/access_db.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/access_db.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/access_db.m4 Mon May 26 15:28:28 2014 (r266692) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: access_db.m4,v 8.28 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: access_db.m4,v 8.28 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_ACCESS_TABLE_', `') Modified: stable/10/contrib/sendmail/cf/feature/allmasquerade.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/allmasquerade.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/allmasquerade.m4 Mon May 26 15:28:28 2014 (r266692) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: allmasquerade.m4,v 8.14 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: allmasquerade.m4,v 8.14 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_MAILER_local_', Modified: stable/10/contrib/sendmail/cf/feature/always_add_domain.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/always_add_domain.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/always_add_domain.m4 Mon May 26 15:28:28 2014 (r266692) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: always_add_domain.m4,v 8.12 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: always_add_domain.m4,v 8.12 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_MAILER_local_', Modified: stable/10/contrib/sendmail/cf/feature/authinfo.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/authinfo.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/authinfo.m4 Mon May 26 15:28:28 2014 (r266692) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: authinfo.m4,v 1.10 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: authinfo.m4,v 1.10 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_AUTHINFO_TABLE_', `') Modified: stable/10/contrib/sendmail/cf/feature/badmx.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/badmx.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/badmx.m4 Mon May 26 15:28:28 2014 (r266692) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: badmx.m4,v 1.2 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: badmx.m4,v 1.2 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_BADMX_CHK_', 1) Modified: stable/10/contrib/sendmail/cf/feature/bestmx_is_local.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/bestmx_is_local.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/bestmx_is_local.m4 Mon May 26 15:28:28 2014 (r266692) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: bestmx_is_local.m4,v 8.27 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: bestmx_is_local.m4,v 8.27 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_BESTMX_IS_LOCAL_', _ARG_) Modified: stable/10/contrib/sendmail/cf/feature/bitdomain.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/bitdomain.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/bitdomain.m4 Mon May 26 15:28:28 2014 (r266692) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: bitdomain.m4,v 8.31 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: bitdomain.m4,v 8.31 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_BITDOMAIN_TABLE_', `') Modified: stable/10/contrib/sendmail/cf/feature/blacklist_recipients.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/blacklist_recipients.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/blacklist_recipients.m4 Mon May 26 15:28:28 2014 (r266692) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: blacklist_recipients.m4,v 8.14 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: blacklist_recipients.m4,v 8.14 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_ACCESS_TABLE_', Modified: stable/10/contrib/sendmail/cf/feature/block_bad_helo.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/block_bad_helo.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/block_bad_helo.m4 Mon May 26 15:28:28 2014 (r266692) @@ -10,7 +10,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: block_bad_helo.m4,v 1.2 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: block_bad_helo.m4,v 1.2 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_BLOCK_BAD_HELO_', `')dnl Modified: stable/10/contrib/sendmail/cf/feature/compat_check.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/compat_check.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/compat_check.m4 Mon May 26 15:28:28 2014 (r266692) @@ -9,7 +9,7 @@ divert(-1) # # divert(0) -VERSIONID(`$Id: compat_check.m4,v 1.5 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: compat_check.m4,v 1.5 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_ACCESS_TABLE_', `', `errprint(`FEATURE(`compat_check') requires FEATURE(`access_db') Modified: stable/10/contrib/sendmail/cf/feature/conncontrol.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/conncontrol.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/conncontrol.m4 Mon May 26 15:28:28 2014 (r266692) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: conncontrol.m4,v 1.5 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: conncontrol.m4,v 1.5 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_ACCESS_TABLE_', ` Modified: stable/10/contrib/sendmail/cf/feature/delay_checks.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/delay_checks.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/delay_checks.m4 Mon May 26 15:28:28 2014 (r266692) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: delay_checks.m4,v 8.9 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: delay_checks.m4,v 8.9 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_DELAY_CHECKS_', 1) Modified: stable/10/contrib/sendmail/cf/feature/dnsbl.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/dnsbl.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/dnsbl.m4 Mon May 26 15:28:28 2014 (r266692) @@ -12,7 +12,7 @@ divert(-1) ifdef(`DNSBL_MAP', `', `define(`DNSBL_MAP', `dns -R A')') divert(0) ifdef(`_DNSBL_R_',`dnl',`dnl -VERSIONID(`$Id: dnsbl.m4,v 8.34 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: dnsbl.m4,v 8.34 2013-11-22 20:51:11 ca Exp $') define(`_DNSBL_R_',`') ifelse(defn(`_ARG_'), `', `errprint(`*** ERROR: missing argument for FEATURE(`dnsbl')')') Modified: stable/10/contrib/sendmail/cf/feature/domaintable.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/domaintable.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/domaintable.m4 Mon May 26 15:28:28 2014 (r266692) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: domaintable.m4,v 8.25 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: domaintable.m4,v 8.25 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_DOMAIN_TABLE_', `') Modified: stable/10/contrib/sendmail/cf/feature/enhdnsbl.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/enhdnsbl.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/enhdnsbl.m4 Mon May 26 15:28:28 2014 (r266692) @@ -13,7 +13,7 @@ ifelse(defn(`_ARG_'), `', `errprint(`*** ERROR: missing argument for FEATURE(`enhdnsbl')')') divert(0) ifdef(`_EDNSBL_R_',`dnl',`dnl -VERSIONID(`$Id: enhdnsbl.m4,v 1.13 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: enhdnsbl.m4,v 1.13 2013-11-22 20:51:11 ca Exp $') LOCAL_CONFIG define(`_EDNSBL_R_',`')dnl # map for enhanced DNS based blacklist lookups Modified: stable/10/contrib/sendmail/cf/feature/generics_entire_domain.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/generics_entire_domain.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/generics_entire_domain.m4 Mon May 26 15:28:28 2014 (r266692) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: generics_entire_domain.m4,v 8.2 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: generics_entire_domain.m4,v 8.2 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_GENERICS_ENTIRE_DOMAIN_', 1) Modified: stable/10/contrib/sendmail/cf/feature/genericstable.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/genericstable.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/genericstable.m4 Mon May 26 15:28:28 2014 (r266692) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: genericstable.m4,v 8.24 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: genericstable.m4,v 8.24 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_GENERICS_TABLE_', `') Modified: stable/10/contrib/sendmail/cf/feature/greet_pause.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/greet_pause.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/greet_pause.m4 Mon May 26 15:28:28 2014 (r266692) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: greet_pause.m4,v 1.5 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: greet_pause.m4,v 1.5 2013-11-22 20:51:11 ca Exp $') divert(-1) ifelse(len(X`'_ARG_),`1',`ifdef(`_ACCESS_TABLE_', `', Modified: stable/10/contrib/sendmail/cf/feature/ldap_routing.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/ldap_routing.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/ldap_routing.m4 Mon May 26 15:28:28 2014 (r266692) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: ldap_routing.m4,v 8.21 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: ldap_routing.m4,v 8.21 2013-11-22 20:51:11 ca Exp $') divert(-1) # Check first two arguments. If they aren't set, may need to warn in proto.m4 Modified: stable/10/contrib/sendmail/cf/feature/limited_masquerade.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/limited_masquerade.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/limited_masquerade.m4 Mon May 26 15:28:28 2014 (r266692) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: limited_masquerade.m4,v 8.10 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: limited_masquerade.m4,v 8.10 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_LIMITED_MASQUERADE_', 1) Modified: stable/10/contrib/sendmail/cf/feature/local_lmtp.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/local_lmtp.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/local_lmtp.m4 Mon May 26 15:28:28 2014 (r266692) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: local_lmtp.m4,v 8.18 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: local_lmtp.m4,v 8.18 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_MAILER_local_', Modified: stable/10/contrib/sendmail/cf/feature/local_no_masquerade.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/local_no_masquerade.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/local_no_masquerade.m4 Mon May 26 15:28:28 2014 (r266692) @@ -9,7 +9,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: local_no_masquerade.m4,v 1.3 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: local_no_masquerade.m4,v 1.3 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_MAILER_local_', Modified: stable/10/contrib/sendmail/cf/feature/local_procmail.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/local_procmail.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/local_procmail.m4 Mon May 26 15:28:28 2014 (r266692) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: local_procmail.m4,v 8.23 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: local_procmail.m4,v 8.23 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_MAILER_local_', Modified: stable/10/contrib/sendmail/cf/feature/lookupdotdomain.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/lookupdotdomain.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/lookupdotdomain.m4 Mon May 26 15:28:28 2014 (r266692) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: lookupdotdomain.m4,v 1.2 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: lookupdotdomain.m4,v 1.2 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_ACCESS_TABLE_', Modified: stable/10/contrib/sendmail/cf/feature/loose_relay_check.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/loose_relay_check.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/loose_relay_check.m4 Mon May 26 15:28:28 2014 (r266692) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: loose_relay_check.m4,v 8.7 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: loose_relay_check.m4,v 8.7 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_LOOSE_RELAY_CHECK_', 1) Modified: stable/10/contrib/sendmail/cf/feature/mailertable.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/mailertable.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/mailertable.m4 Mon May 26 15:28:28 2014 (r266692) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: mailertable.m4,v 8.26 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: mailertable.m4,v 8.26 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_MAILER_TABLE_', `') Modified: stable/10/contrib/sendmail/cf/feature/masquerade_entire_domain.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/masquerade_entire_domain.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/masquerade_entire_domain.m4 Mon May 26 15:28:28 2014 (r266692) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: masquerade_entire_domain.m4,v 8.10 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: masquerade_entire_domain.m4,v 8.10 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_MASQUERADE_ENTIRE_DOMAIN_', 1) Modified: stable/10/contrib/sendmail/cf/feature/masquerade_envelope.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/masquerade_envelope.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/masquerade_envelope.m4 Mon May 26 15:28:28 2014 (r266692) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: masquerade_envelope.m4,v 8.10 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: masquerade_envelope.m4,v 8.10 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_MASQUERADE_ENVELOPE_', 1) Modified: stable/10/contrib/sendmail/cf/feature/msp.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/msp.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/msp.m4 Mon May 26 15:28:28 2014 (r266692) @@ -10,7 +10,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: msp.m4,v 1.34 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: msp.m4,v 1.34 2013-11-22 20:51:11 ca Exp $') divert(-1) undefine(`ALIAS_FILE') define(`confDELIVERY_MODE', `i') Modified: stable/10/contrib/sendmail/cf/feature/mtamark.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/mtamark.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/mtamark.m4 Mon May 26 15:28:28 2014 (r266692) @@ -11,7 +11,7 @@ divert(-1) divert(0) ifdef(`_MTAMARK_R',`dnl',`dnl -VERSIONID(`$Id: mtamark.m4,v 1.3 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: mtamark.m4,v 1.3 2013-11-22 20:51:11 ca Exp $') LOCAL_CONFIG define(`_MTAMARK_R',`')dnl # map for MTA mark Modified: stable/10/contrib/sendmail/cf/feature/no_default_msa.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/no_default_msa.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/no_default_msa.m4 Mon May 26 15:28:28 2014 (r266692) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: no_default_msa.m4,v 8.3 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: no_default_msa.m4,v 8.3 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_NO_MSA_', `1') Modified: stable/10/contrib/sendmail/cf/feature/nocanonify.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/nocanonify.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/nocanonify.m4 Mon May 26 15:28:28 2014 (r266692) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: nocanonify.m4,v 8.13 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: nocanonify.m4,v 8.13 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_NO_CANONIFY_', 1) Modified: stable/10/contrib/sendmail/cf/feature/notsticky.m4 ============================================================================== --- stable/10/contrib/sendmail/cf/feature/notsticky.m4 Mon May 26 15:08:39 2014 (r266691) +++ stable/10/contrib/sendmail/cf/feature/notsticky.m4 Mon May 26 15:28:28 2014 (r266692) @@ -13,7 +13,7 @@ divert(-1) # *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Mon May 26 15:30:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7BFB29AB; Mon, 26 May 2014 15:30:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 635282EA2; Mon, 26 May 2014 15:30:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4QFUkEx093939; Mon, 26 May 2014 15:30:46 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4QFUSoo092006; Mon, 26 May 2014 15:30:28 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201405261530.s4QFUSoo092006@svn.freebsd.org> From: Gregory Neil Shapiro Date: Mon, 26 May 2014 15:30:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r266693 - in stable/8/contrib/sendmail: . cf cf/cf cf/domain cf/feature cf/hack cf/m4 cf/mailer cf/ostype cf/sh contrib doc/op editmap include/libmilter include/libsmdb include/sendmail... X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 15:30:46 -0000 Author: gshapiro Date: Mon May 26 15:30:27 2014 New Revision: 266693 URL: http://svnweb.freebsd.org/changeset/base/266693 Log: MFC: Merge sendmail 8.14.9 to HEAD Modified: stable/8/contrib/sendmail/CACerts stable/8/contrib/sendmail/FAQ stable/8/contrib/sendmail/INSTALL stable/8/contrib/sendmail/KNOWNBUGS stable/8/contrib/sendmail/LICENSE stable/8/contrib/sendmail/Makefile stable/8/contrib/sendmail/PGPKEYS stable/8/contrib/sendmail/README stable/8/contrib/sendmail/RELEASE_NOTES stable/8/contrib/sendmail/cf/README stable/8/contrib/sendmail/cf/cf/Makefile stable/8/contrib/sendmail/cf/cf/README stable/8/contrib/sendmail/cf/cf/chez.cs.mc stable/8/contrib/sendmail/cf/cf/clientproto.mc stable/8/contrib/sendmail/cf/cf/cs-hpux10.mc stable/8/contrib/sendmail/cf/cf/cs-hpux9.mc stable/8/contrib/sendmail/cf/cf/cs-osf1.mc stable/8/contrib/sendmail/cf/cf/cs-solaris2.mc stable/8/contrib/sendmail/cf/cf/cs-sunos4.1.mc stable/8/contrib/sendmail/cf/cf/cs-ultrix4.mc stable/8/contrib/sendmail/cf/cf/cyrusproto.mc stable/8/contrib/sendmail/cf/cf/generic-bsd4.4.mc stable/8/contrib/sendmail/cf/cf/generic-hpux10.mc stable/8/contrib/sendmail/cf/cf/generic-hpux9.mc stable/8/contrib/sendmail/cf/cf/generic-linux.mc stable/8/contrib/sendmail/cf/cf/generic-mpeix.mc stable/8/contrib/sendmail/cf/cf/generic-nextstep3.3.mc stable/8/contrib/sendmail/cf/cf/generic-osf1.mc stable/8/contrib/sendmail/cf/cf/generic-solaris.mc stable/8/contrib/sendmail/cf/cf/generic-sunos4.1.mc stable/8/contrib/sendmail/cf/cf/generic-ultrix4.mc stable/8/contrib/sendmail/cf/cf/huginn.cs.mc stable/8/contrib/sendmail/cf/cf/knecht.mc stable/8/contrib/sendmail/cf/cf/mail.cs.mc stable/8/contrib/sendmail/cf/cf/mail.eecs.mc stable/8/contrib/sendmail/cf/cf/mailspool.cs.mc stable/8/contrib/sendmail/cf/cf/python.cs.mc stable/8/contrib/sendmail/cf/cf/s2k-osf1.mc stable/8/contrib/sendmail/cf/cf/s2k-ultrix4.mc stable/8/contrib/sendmail/cf/cf/submit.cf stable/8/contrib/sendmail/cf/cf/submit.mc stable/8/contrib/sendmail/cf/cf/tcpproto.mc stable/8/contrib/sendmail/cf/cf/ucbarpa.mc stable/8/contrib/sendmail/cf/cf/ucbvax.mc stable/8/contrib/sendmail/cf/cf/uucpproto.mc stable/8/contrib/sendmail/cf/cf/vangogh.cs.mc stable/8/contrib/sendmail/cf/domain/Berkeley.EDU.m4 stable/8/contrib/sendmail/cf/domain/CS.Berkeley.EDU.m4 stable/8/contrib/sendmail/cf/domain/EECS.Berkeley.EDU.m4 stable/8/contrib/sendmail/cf/domain/S2K.Berkeley.EDU.m4 stable/8/contrib/sendmail/cf/domain/berkeley-only.m4 stable/8/contrib/sendmail/cf/domain/generic.m4 stable/8/contrib/sendmail/cf/feature/accept_unqualified_senders.m4 stable/8/contrib/sendmail/cf/feature/accept_unresolvable_domains.m4 stable/8/contrib/sendmail/cf/feature/access_db.m4 stable/8/contrib/sendmail/cf/feature/allmasquerade.m4 stable/8/contrib/sendmail/cf/feature/always_add_domain.m4 stable/8/contrib/sendmail/cf/feature/authinfo.m4 stable/8/contrib/sendmail/cf/feature/badmx.m4 stable/8/contrib/sendmail/cf/feature/bestmx_is_local.m4 stable/8/contrib/sendmail/cf/feature/bitdomain.m4 stable/8/contrib/sendmail/cf/feature/blacklist_recipients.m4 stable/8/contrib/sendmail/cf/feature/block_bad_helo.m4 stable/8/contrib/sendmail/cf/feature/compat_check.m4 stable/8/contrib/sendmail/cf/feature/conncontrol.m4 stable/8/contrib/sendmail/cf/feature/delay_checks.m4 stable/8/contrib/sendmail/cf/feature/dnsbl.m4 stable/8/contrib/sendmail/cf/feature/domaintable.m4 stable/8/contrib/sendmail/cf/feature/enhdnsbl.m4 stable/8/contrib/sendmail/cf/feature/generics_entire_domain.m4 stable/8/contrib/sendmail/cf/feature/genericstable.m4 stable/8/contrib/sendmail/cf/feature/greet_pause.m4 stable/8/contrib/sendmail/cf/feature/ldap_routing.m4 stable/8/contrib/sendmail/cf/feature/limited_masquerade.m4 stable/8/contrib/sendmail/cf/feature/local_lmtp.m4 stable/8/contrib/sendmail/cf/feature/local_no_masquerade.m4 stable/8/contrib/sendmail/cf/feature/local_procmail.m4 stable/8/contrib/sendmail/cf/feature/lookupdotdomain.m4 stable/8/contrib/sendmail/cf/feature/loose_relay_check.m4 stable/8/contrib/sendmail/cf/feature/mailertable.m4 stable/8/contrib/sendmail/cf/feature/masquerade_entire_domain.m4 stable/8/contrib/sendmail/cf/feature/masquerade_envelope.m4 stable/8/contrib/sendmail/cf/feature/msp.m4 stable/8/contrib/sendmail/cf/feature/mtamark.m4 stable/8/contrib/sendmail/cf/feature/no_default_msa.m4 stable/8/contrib/sendmail/cf/feature/nocanonify.m4 stable/8/contrib/sendmail/cf/feature/notsticky.m4 stable/8/contrib/sendmail/cf/feature/nouucp.m4 stable/8/contrib/sendmail/cf/feature/nullclient.m4 stable/8/contrib/sendmail/cf/feature/preserve_local_plus_detail.m4 stable/8/contrib/sendmail/cf/feature/preserve_luser_host.m4 stable/8/contrib/sendmail/cf/feature/promiscuous_relay.m4 stable/8/contrib/sendmail/cf/feature/queuegroup.m4 stable/8/contrib/sendmail/cf/feature/ratecontrol.m4 stable/8/contrib/sendmail/cf/feature/redirect.m4 stable/8/contrib/sendmail/cf/feature/relay_based_on_MX.m4 stable/8/contrib/sendmail/cf/feature/relay_entire_domain.m4 stable/8/contrib/sendmail/cf/feature/relay_hosts_only.m4 stable/8/contrib/sendmail/cf/feature/relay_local_from.m4 stable/8/contrib/sendmail/cf/feature/relay_mail_from.m4 stable/8/contrib/sendmail/cf/feature/require_rdns.m4 stable/8/contrib/sendmail/cf/feature/smrsh.m4 stable/8/contrib/sendmail/cf/feature/stickyhost.m4 stable/8/contrib/sendmail/cf/feature/use_client_ptr.m4 stable/8/contrib/sendmail/cf/feature/use_ct_file.m4 stable/8/contrib/sendmail/cf/feature/use_cw_file.m4 stable/8/contrib/sendmail/cf/feature/uucpdomain.m4 stable/8/contrib/sendmail/cf/feature/virtuser_entire_domain.m4 stable/8/contrib/sendmail/cf/feature/virtusertable.m4 stable/8/contrib/sendmail/cf/hack/cssubdomain.m4 stable/8/contrib/sendmail/cf/m4/cf.m4 stable/8/contrib/sendmail/cf/m4/cfhead.m4 stable/8/contrib/sendmail/cf/m4/proto.m4 stable/8/contrib/sendmail/cf/m4/version.m4 stable/8/contrib/sendmail/cf/mailer/cyrus.m4 stable/8/contrib/sendmail/cf/mailer/cyrusv2.m4 stable/8/contrib/sendmail/cf/mailer/fax.m4 stable/8/contrib/sendmail/cf/mailer/local.m4 stable/8/contrib/sendmail/cf/mailer/mail11.m4 stable/8/contrib/sendmail/cf/mailer/phquery.m4 stable/8/contrib/sendmail/cf/mailer/pop.m4 stable/8/contrib/sendmail/cf/mailer/procmail.m4 stable/8/contrib/sendmail/cf/mailer/qpage.m4 stable/8/contrib/sendmail/cf/mailer/smtp.m4 stable/8/contrib/sendmail/cf/mailer/usenet.m4 stable/8/contrib/sendmail/cf/mailer/uucp.m4 stable/8/contrib/sendmail/cf/ostype/a-ux.m4 stable/8/contrib/sendmail/cf/ostype/aix3.m4 stable/8/contrib/sendmail/cf/ostype/aix4.m4 stable/8/contrib/sendmail/cf/ostype/aix5.m4 stable/8/contrib/sendmail/cf/ostype/altos.m4 stable/8/contrib/sendmail/cf/ostype/amdahl-uts.m4 stable/8/contrib/sendmail/cf/ostype/bsd4.3.m4 stable/8/contrib/sendmail/cf/ostype/bsd4.4.m4 stable/8/contrib/sendmail/cf/ostype/bsdi.m4 stable/8/contrib/sendmail/cf/ostype/bsdi1.0.m4 stable/8/contrib/sendmail/cf/ostype/bsdi2.0.m4 stable/8/contrib/sendmail/cf/ostype/darwin.m4 stable/8/contrib/sendmail/cf/ostype/dgux.m4 stable/8/contrib/sendmail/cf/ostype/domainos.m4 stable/8/contrib/sendmail/cf/ostype/dragonfly.m4 stable/8/contrib/sendmail/cf/ostype/dynix3.2.m4 stable/8/contrib/sendmail/cf/ostype/freebsd4.m4 stable/8/contrib/sendmail/cf/ostype/freebsd5.m4 stable/8/contrib/sendmail/cf/ostype/freebsd6.m4 stable/8/contrib/sendmail/cf/ostype/gnu.m4 stable/8/contrib/sendmail/cf/ostype/hpux10.m4 stable/8/contrib/sendmail/cf/ostype/hpux11.m4 stable/8/contrib/sendmail/cf/ostype/hpux9.m4 stable/8/contrib/sendmail/cf/ostype/irix4.m4 stable/8/contrib/sendmail/cf/ostype/irix5.m4 stable/8/contrib/sendmail/cf/ostype/irix6.m4 stable/8/contrib/sendmail/cf/ostype/isc4.1.m4 stable/8/contrib/sendmail/cf/ostype/linux.m4 stable/8/contrib/sendmail/cf/ostype/maxion.m4 stable/8/contrib/sendmail/cf/ostype/mklinux.m4 stable/8/contrib/sendmail/cf/ostype/mpeix.m4 stable/8/contrib/sendmail/cf/ostype/nextstep.m4 stable/8/contrib/sendmail/cf/ostype/openbsd.m4 stable/8/contrib/sendmail/cf/ostype/osf1.m4 stable/8/contrib/sendmail/cf/ostype/powerux.m4 stable/8/contrib/sendmail/cf/ostype/ptx2.m4 stable/8/contrib/sendmail/cf/ostype/qnx.m4 stable/8/contrib/sendmail/cf/ostype/riscos4.5.m4 stable/8/contrib/sendmail/cf/ostype/sco-uw-2.1.m4 stable/8/contrib/sendmail/cf/ostype/sco3.2.m4 stable/8/contrib/sendmail/cf/ostype/sinix.m4 stable/8/contrib/sendmail/cf/ostype/solaris11.m4 stable/8/contrib/sendmail/cf/ostype/solaris2.m4 stable/8/contrib/sendmail/cf/ostype/solaris2.ml.m4 stable/8/contrib/sendmail/cf/ostype/solaris2.pre5.m4 stable/8/contrib/sendmail/cf/ostype/solaris8.m4 stable/8/contrib/sendmail/cf/ostype/sunos3.5.m4 stable/8/contrib/sendmail/cf/ostype/sunos4.1.m4 stable/8/contrib/sendmail/cf/ostype/svr4.m4 stable/8/contrib/sendmail/cf/ostype/ultrix4.m4 stable/8/contrib/sendmail/cf/ostype/unicos.m4 stable/8/contrib/sendmail/cf/ostype/unicosmk.m4 stable/8/contrib/sendmail/cf/ostype/unicosmp.m4 stable/8/contrib/sendmail/cf/ostype/unixware7.m4 stable/8/contrib/sendmail/cf/ostype/unknown.m4 stable/8/contrib/sendmail/cf/ostype/uxpds.m4 stable/8/contrib/sendmail/cf/sendmail.schema stable/8/contrib/sendmail/cf/sh/makeinfo.sh stable/8/contrib/sendmail/contrib/README stable/8/contrib/sendmail/contrib/bsdi.mc stable/8/contrib/sendmail/contrib/buildvirtuser stable/8/contrib/sendmail/contrib/cidrexpand stable/8/contrib/sendmail/contrib/dnsblaccess.m4 stable/8/contrib/sendmail/contrib/link_hash.sh stable/8/contrib/sendmail/contrib/qtool.8 stable/8/contrib/sendmail/contrib/qtool.pl stable/8/contrib/sendmail/contrib/smcontrol.pl stable/8/contrib/sendmail/contrib/socketmapClient.pl stable/8/contrib/sendmail/contrib/socketmapServer.pl stable/8/contrib/sendmail/doc/op/Makefile stable/8/contrib/sendmail/doc/op/README stable/8/contrib/sendmail/doc/op/op.me stable/8/contrib/sendmail/editmap/Makefile stable/8/contrib/sendmail/editmap/Makefile.m4 stable/8/contrib/sendmail/editmap/editmap.8 stable/8/contrib/sendmail/editmap/editmap.c stable/8/contrib/sendmail/include/libmilter/mfapi.h stable/8/contrib/sendmail/include/libmilter/mfdef.h stable/8/contrib/sendmail/include/libmilter/milter.h stable/8/contrib/sendmail/include/libsmdb/smdb.h stable/8/contrib/sendmail/include/sendmail/mailstats.h stable/8/contrib/sendmail/include/sendmail/pathnames.h stable/8/contrib/sendmail/include/sendmail/sendmail.h stable/8/contrib/sendmail/include/sm/assert.h stable/8/contrib/sendmail/include/sm/bdb.h stable/8/contrib/sendmail/include/sm/bitops.h stable/8/contrib/sendmail/include/sm/cdefs.h stable/8/contrib/sendmail/include/sm/cf.h stable/8/contrib/sendmail/include/sm/clock.h stable/8/contrib/sendmail/include/sm/conf.h stable/8/contrib/sendmail/include/sm/config.h stable/8/contrib/sendmail/include/sm/debug.h stable/8/contrib/sendmail/include/sm/errstring.h stable/8/contrib/sendmail/include/sm/exc.h stable/8/contrib/sendmail/include/sm/fdset.h stable/8/contrib/sendmail/include/sm/gen.h stable/8/contrib/sendmail/include/sm/heap.h stable/8/contrib/sendmail/include/sm/io.h stable/8/contrib/sendmail/include/sm/ldap.h stable/8/contrib/sendmail/include/sm/limits.h stable/8/contrib/sendmail/include/sm/mbdb.h stable/8/contrib/sendmail/include/sm/misc.h stable/8/contrib/sendmail/include/sm/os/sm_os_aix.h stable/8/contrib/sendmail/include/sm/os/sm_os_dragonfly.h stable/8/contrib/sendmail/include/sm/os/sm_os_freebsd.h stable/8/contrib/sendmail/include/sm/os/sm_os_hp.h stable/8/contrib/sendmail/include/sm/os/sm_os_irix.h stable/8/contrib/sendmail/include/sm/os/sm_os_linux.h stable/8/contrib/sendmail/include/sm/os/sm_os_mpeix.h stable/8/contrib/sendmail/include/sm/os/sm_os_next.h stable/8/contrib/sendmail/include/sm/os/sm_os_openbsd.h stable/8/contrib/sendmail/include/sm/os/sm_os_openunix.h stable/8/contrib/sendmail/include/sm/os/sm_os_osf1.h stable/8/contrib/sendmail/include/sm/os/sm_os_qnx.h stable/8/contrib/sendmail/include/sm/os/sm_os_sunos.h stable/8/contrib/sendmail/include/sm/os/sm_os_ultrix.h stable/8/contrib/sendmail/include/sm/os/sm_os_unicos.h stable/8/contrib/sendmail/include/sm/os/sm_os_unicosmk.h stable/8/contrib/sendmail/include/sm/os/sm_os_unicosmp.h stable/8/contrib/sendmail/include/sm/os/sm_os_unixware.h stable/8/contrib/sendmail/include/sm/path.h stable/8/contrib/sendmail/include/sm/rpool.h stable/8/contrib/sendmail/include/sm/sem.h stable/8/contrib/sendmail/include/sm/setjmp.h stable/8/contrib/sendmail/include/sm/shm.h stable/8/contrib/sendmail/include/sm/signal.h stable/8/contrib/sendmail/include/sm/string.h stable/8/contrib/sendmail/include/sm/sysexits.h stable/8/contrib/sendmail/include/sm/tailq.h stable/8/contrib/sendmail/include/sm/test.h stable/8/contrib/sendmail/include/sm/time.h stable/8/contrib/sendmail/include/sm/types.h stable/8/contrib/sendmail/include/sm/varargs.h stable/8/contrib/sendmail/include/sm/xtrap.h stable/8/contrib/sendmail/libmilter/Makefile stable/8/contrib/sendmail/libmilter/Makefile.m4 stable/8/contrib/sendmail/libmilter/README stable/8/contrib/sendmail/libmilter/comm.c stable/8/contrib/sendmail/libmilter/docs/api.html stable/8/contrib/sendmail/libmilter/docs/design.html stable/8/contrib/sendmail/libmilter/docs/index.html stable/8/contrib/sendmail/libmilter/docs/installation.html stable/8/contrib/sendmail/libmilter/docs/other.html stable/8/contrib/sendmail/libmilter/docs/overview.html stable/8/contrib/sendmail/libmilter/docs/sample.html stable/8/contrib/sendmail/libmilter/docs/smfi_addheader.html stable/8/contrib/sendmail/libmilter/docs/smfi_addrcpt.html stable/8/contrib/sendmail/libmilter/docs/smfi_addrcpt_par.html stable/8/contrib/sendmail/libmilter/docs/smfi_chgfrom.html stable/8/contrib/sendmail/libmilter/docs/smfi_chgheader.html stable/8/contrib/sendmail/libmilter/docs/smfi_delrcpt.html stable/8/contrib/sendmail/libmilter/docs/smfi_getpriv.html stable/8/contrib/sendmail/libmilter/docs/smfi_getsymval.html stable/8/contrib/sendmail/libmilter/docs/smfi_insheader.html stable/8/contrib/sendmail/libmilter/docs/smfi_main.html stable/8/contrib/sendmail/libmilter/docs/smfi_opensocket.html stable/8/contrib/sendmail/libmilter/docs/smfi_progress.html stable/8/contrib/sendmail/libmilter/docs/smfi_quarantine.html stable/8/contrib/sendmail/libmilter/docs/smfi_register.html stable/8/contrib/sendmail/libmilter/docs/smfi_replacebody.html stable/8/contrib/sendmail/libmilter/docs/smfi_setbacklog.html stable/8/contrib/sendmail/libmilter/docs/smfi_setconn.html stable/8/contrib/sendmail/libmilter/docs/smfi_setdbg.html stable/8/contrib/sendmail/libmilter/docs/smfi_setmlreply.html stable/8/contrib/sendmail/libmilter/docs/smfi_setpriv.html stable/8/contrib/sendmail/libmilter/docs/smfi_setreply.html stable/8/contrib/sendmail/libmilter/docs/smfi_setsymlist.html stable/8/contrib/sendmail/libmilter/docs/smfi_settimeout.html stable/8/contrib/sendmail/libmilter/docs/smfi_stop.html stable/8/contrib/sendmail/libmilter/docs/smfi_version.html stable/8/contrib/sendmail/libmilter/docs/xxfi_abort.html stable/8/contrib/sendmail/libmilter/docs/xxfi_body.html stable/8/contrib/sendmail/libmilter/docs/xxfi_close.html stable/8/contrib/sendmail/libmilter/docs/xxfi_connect.html stable/8/contrib/sendmail/libmilter/docs/xxfi_data.html stable/8/contrib/sendmail/libmilter/docs/xxfi_envfrom.html stable/8/contrib/sendmail/libmilter/docs/xxfi_envrcpt.html stable/8/contrib/sendmail/libmilter/docs/xxfi_eoh.html stable/8/contrib/sendmail/libmilter/docs/xxfi_eom.html stable/8/contrib/sendmail/libmilter/docs/xxfi_header.html stable/8/contrib/sendmail/libmilter/docs/xxfi_helo.html stable/8/contrib/sendmail/libmilter/docs/xxfi_negotiate.html stable/8/contrib/sendmail/libmilter/docs/xxfi_unknown.html stable/8/contrib/sendmail/libmilter/engine.c stable/8/contrib/sendmail/libmilter/example.c stable/8/contrib/sendmail/libmilter/handler.c stable/8/contrib/sendmail/libmilter/libmilter.h stable/8/contrib/sendmail/libmilter/listener.c stable/8/contrib/sendmail/libmilter/main.c stable/8/contrib/sendmail/libmilter/monitor.c stable/8/contrib/sendmail/libmilter/signal.c stable/8/contrib/sendmail/libmilter/sm_gethost.c stable/8/contrib/sendmail/libmilter/smfi.c stable/8/contrib/sendmail/libmilter/worker.c stable/8/contrib/sendmail/libsm/Makefile stable/8/contrib/sendmail/libsm/Makefile.m4 stable/8/contrib/sendmail/libsm/README stable/8/contrib/sendmail/libsm/assert.c stable/8/contrib/sendmail/libsm/assert.html stable/8/contrib/sendmail/libsm/b-strcmp.c stable/8/contrib/sendmail/libsm/b-strl.c stable/8/contrib/sendmail/libsm/cdefs.html stable/8/contrib/sendmail/libsm/cf.c stable/8/contrib/sendmail/libsm/clock.c stable/8/contrib/sendmail/libsm/clrerr.c stable/8/contrib/sendmail/libsm/config.c stable/8/contrib/sendmail/libsm/debug.c stable/8/contrib/sendmail/libsm/debug.html stable/8/contrib/sendmail/libsm/errstring.c stable/8/contrib/sendmail/libsm/exc.c stable/8/contrib/sendmail/libsm/exc.html stable/8/contrib/sendmail/libsm/fclose.c stable/8/contrib/sendmail/libsm/feof.c stable/8/contrib/sendmail/libsm/ferror.c stable/8/contrib/sendmail/libsm/fflush.c stable/8/contrib/sendmail/libsm/fget.c stable/8/contrib/sendmail/libsm/findfp.c stable/8/contrib/sendmail/libsm/flags.c stable/8/contrib/sendmail/libsm/fopen.c stable/8/contrib/sendmail/libsm/fpos.c stable/8/contrib/sendmail/libsm/fprintf.c stable/8/contrib/sendmail/libsm/fpurge.c stable/8/contrib/sendmail/libsm/fput.c stable/8/contrib/sendmail/libsm/fread.c stable/8/contrib/sendmail/libsm/fscanf.c stable/8/contrib/sendmail/libsm/fseek.c stable/8/contrib/sendmail/libsm/fvwrite.c stable/8/contrib/sendmail/libsm/fvwrite.h stable/8/contrib/sendmail/libsm/fwalk.c stable/8/contrib/sendmail/libsm/fwrite.c stable/8/contrib/sendmail/libsm/gen.html stable/8/contrib/sendmail/libsm/get.c stable/8/contrib/sendmail/libsm/glue.h stable/8/contrib/sendmail/libsm/heap.c stable/8/contrib/sendmail/libsm/heap.html stable/8/contrib/sendmail/libsm/index.html stable/8/contrib/sendmail/libsm/inet6_ntop.c stable/8/contrib/sendmail/libsm/io.html stable/8/contrib/sendmail/libsm/ldap.c stable/8/contrib/sendmail/libsm/local.h stable/8/contrib/sendmail/libsm/makebuf.c stable/8/contrib/sendmail/libsm/match.c stable/8/contrib/sendmail/libsm/mbdb.c stable/8/contrib/sendmail/libsm/memstat.c stable/8/contrib/sendmail/libsm/mpeix.c stable/8/contrib/sendmail/libsm/niprop.c stable/8/contrib/sendmail/libsm/path.c stable/8/contrib/sendmail/libsm/put.c stable/8/contrib/sendmail/libsm/refill.c stable/8/contrib/sendmail/libsm/rewind.c stable/8/contrib/sendmail/libsm/rpool.c stable/8/contrib/sendmail/libsm/rpool.html stable/8/contrib/sendmail/libsm/sem.c stable/8/contrib/sendmail/libsm/setvbuf.c stable/8/contrib/sendmail/libsm/shm.c stable/8/contrib/sendmail/libsm/signal.c stable/8/contrib/sendmail/libsm/smstdio.c stable/8/contrib/sendmail/libsm/snprintf.c stable/8/contrib/sendmail/libsm/sscanf.c stable/8/contrib/sendmail/libsm/stdio.c stable/8/contrib/sendmail/libsm/strcasecmp.c stable/8/contrib/sendmail/libsm/strdup.c stable/8/contrib/sendmail/libsm/strerror.c stable/8/contrib/sendmail/libsm/strexit.c stable/8/contrib/sendmail/libsm/string.c stable/8/contrib/sendmail/libsm/stringf.c stable/8/contrib/sendmail/libsm/strio.c stable/8/contrib/sendmail/libsm/strl.c stable/8/contrib/sendmail/libsm/strrevcmp.c stable/8/contrib/sendmail/libsm/strto.c stable/8/contrib/sendmail/libsm/syslogio.c stable/8/contrib/sendmail/libsm/t-cf.c stable/8/contrib/sendmail/libsm/t-event.c stable/8/contrib/sendmail/libsm/t-exc.c stable/8/contrib/sendmail/libsm/t-fget.c stable/8/contrib/sendmail/libsm/t-float.c stable/8/contrib/sendmail/libsm/t-fopen.c stable/8/contrib/sendmail/libsm/t-heap.c stable/8/contrib/sendmail/libsm/t-inet6_ntop.c stable/8/contrib/sendmail/libsm/t-match.c stable/8/contrib/sendmail/libsm/t-memstat.c stable/8/contrib/sendmail/libsm/t-path.c stable/8/contrib/sendmail/libsm/t-qic.c stable/8/contrib/sendmail/libsm/t-rpool.c stable/8/contrib/sendmail/libsm/t-scanf.c stable/8/contrib/sendmail/libsm/t-sem.c stable/8/contrib/sendmail/libsm/t-shm.c stable/8/contrib/sendmail/libsm/t-smstdio.c stable/8/contrib/sendmail/libsm/t-string.c stable/8/contrib/sendmail/libsm/t-strio.c stable/8/contrib/sendmail/libsm/t-strl.c stable/8/contrib/sendmail/libsm/t-strrevcmp.c stable/8/contrib/sendmail/libsm/t-types.c stable/8/contrib/sendmail/libsm/test.c stable/8/contrib/sendmail/libsm/ungetc.c stable/8/contrib/sendmail/libsm/util.c stable/8/contrib/sendmail/libsm/vasprintf.c stable/8/contrib/sendmail/libsm/vfprintf.c stable/8/contrib/sendmail/libsm/vfscanf.c stable/8/contrib/sendmail/libsm/vprintf.c stable/8/contrib/sendmail/libsm/vsnprintf.c stable/8/contrib/sendmail/libsm/wbuf.c stable/8/contrib/sendmail/libsm/wsetup.c stable/8/contrib/sendmail/libsm/xtrap.c stable/8/contrib/sendmail/libsmdb/Makefile stable/8/contrib/sendmail/libsmdb/Makefile.m4 stable/8/contrib/sendmail/libsmdb/smdb.c stable/8/contrib/sendmail/libsmdb/smdb1.c stable/8/contrib/sendmail/libsmdb/smdb2.c stable/8/contrib/sendmail/libsmdb/smndbm.c stable/8/contrib/sendmail/libsmutil/Makefile stable/8/contrib/sendmail/libsmutil/Makefile.m4 stable/8/contrib/sendmail/libsmutil/cf.c stable/8/contrib/sendmail/libsmutil/debug.c stable/8/contrib/sendmail/libsmutil/err.c stable/8/contrib/sendmail/libsmutil/lockfile.c stable/8/contrib/sendmail/libsmutil/safefile.c stable/8/contrib/sendmail/libsmutil/snprintf.c stable/8/contrib/sendmail/mail.local/Makefile stable/8/contrib/sendmail/mail.local/Makefile.m4 stable/8/contrib/sendmail/mail.local/README stable/8/contrib/sendmail/mail.local/mail.local.8 stable/8/contrib/sendmail/mail.local/mail.local.c stable/8/contrib/sendmail/mailstats/Makefile stable/8/contrib/sendmail/mailstats/Makefile.m4 stable/8/contrib/sendmail/mailstats/mailstats.8 stable/8/contrib/sendmail/mailstats/mailstats.c stable/8/contrib/sendmail/makemap/Makefile stable/8/contrib/sendmail/makemap/Makefile.m4 stable/8/contrib/sendmail/makemap/makemap.8 stable/8/contrib/sendmail/makemap/makemap.c stable/8/contrib/sendmail/praliases/Makefile stable/8/contrib/sendmail/praliases/Makefile.m4 stable/8/contrib/sendmail/praliases/praliases.8 stable/8/contrib/sendmail/praliases/praliases.c stable/8/contrib/sendmail/rmail/Makefile stable/8/contrib/sendmail/rmail/Makefile.m4 stable/8/contrib/sendmail/rmail/rmail.8 stable/8/contrib/sendmail/rmail/rmail.c stable/8/contrib/sendmail/smrsh/Makefile stable/8/contrib/sendmail/smrsh/Makefile.m4 stable/8/contrib/sendmail/smrsh/README stable/8/contrib/sendmail/smrsh/smrsh.8 stable/8/contrib/sendmail/smrsh/smrsh.c stable/8/contrib/sendmail/src/Makefile stable/8/contrib/sendmail/src/Makefile.m4 stable/8/contrib/sendmail/src/README stable/8/contrib/sendmail/src/SECURITY stable/8/contrib/sendmail/src/TRACEFLAGS stable/8/contrib/sendmail/src/TUNING stable/8/contrib/sendmail/src/alias.c stable/8/contrib/sendmail/src/aliases stable/8/contrib/sendmail/src/aliases.5 stable/8/contrib/sendmail/src/arpadate.c stable/8/contrib/sendmail/src/bf.c stable/8/contrib/sendmail/src/bf.h stable/8/contrib/sendmail/src/collect.c stable/8/contrib/sendmail/src/conf.c stable/8/contrib/sendmail/src/conf.h stable/8/contrib/sendmail/src/control.c stable/8/contrib/sendmail/src/convtime.c stable/8/contrib/sendmail/src/daemon.c stable/8/contrib/sendmail/src/daemon.h stable/8/contrib/sendmail/src/deliver.c stable/8/contrib/sendmail/src/domain.c stable/8/contrib/sendmail/src/envelope.c stable/8/contrib/sendmail/src/err.c stable/8/contrib/sendmail/src/headers.c stable/8/contrib/sendmail/src/helpfile stable/8/contrib/sendmail/src/macro.c stable/8/contrib/sendmail/src/mailq.1 stable/8/contrib/sendmail/src/main.c stable/8/contrib/sendmail/src/map.c stable/8/contrib/sendmail/src/map.h stable/8/contrib/sendmail/src/mci.c stable/8/contrib/sendmail/src/milter.c stable/8/contrib/sendmail/src/mime.c stable/8/contrib/sendmail/src/newaliases.1 stable/8/contrib/sendmail/src/parseaddr.c stable/8/contrib/sendmail/src/queue.c stable/8/contrib/sendmail/src/ratectrl.c stable/8/contrib/sendmail/src/readcf.c stable/8/contrib/sendmail/src/recipient.c stable/8/contrib/sendmail/src/sasl.c stable/8/contrib/sendmail/src/savemail.c stable/8/contrib/sendmail/src/sendmail.8 stable/8/contrib/sendmail/src/sendmail.h stable/8/contrib/sendmail/src/sfsasl.c stable/8/contrib/sendmail/src/sfsasl.h stable/8/contrib/sendmail/src/shmticklib.c stable/8/contrib/sendmail/src/sm_resolve.c stable/8/contrib/sendmail/src/sm_resolve.h stable/8/contrib/sendmail/src/srvrsmtp.c stable/8/contrib/sendmail/src/stab.c stable/8/contrib/sendmail/src/stats.c stable/8/contrib/sendmail/src/statusd_shm.h stable/8/contrib/sendmail/src/sysexits.c stable/8/contrib/sendmail/src/timers.c stable/8/contrib/sendmail/src/timers.h stable/8/contrib/sendmail/src/tls.c stable/8/contrib/sendmail/src/trace.c stable/8/contrib/sendmail/src/udb.c stable/8/contrib/sendmail/src/usersmtp.c stable/8/contrib/sendmail/src/util.c stable/8/contrib/sendmail/src/version.c stable/8/contrib/sendmail/test/Makefile stable/8/contrib/sendmail/test/Makefile.m4 stable/8/contrib/sendmail/test/README stable/8/contrib/sendmail/test/Results stable/8/contrib/sendmail/test/t_dropgid.c stable/8/contrib/sendmail/test/t_exclopen.c stable/8/contrib/sendmail/test/t_pathconf.c stable/8/contrib/sendmail/test/t_seteuid.c stable/8/contrib/sendmail/test/t_setgid.c stable/8/contrib/sendmail/test/t_setreuid.c stable/8/contrib/sendmail/test/t_setuid.c stable/8/contrib/sendmail/test/t_snprintf.c stable/8/contrib/sendmail/vacation/Makefile stable/8/contrib/sendmail/vacation/Makefile.m4 stable/8/contrib/sendmail/vacation/vacation.1 stable/8/contrib/sendmail/vacation/vacation.c Directory Properties: stable/8/contrib/sendmail/ (props changed) Modified: stable/8/contrib/sendmail/CACerts ============================================================================== --- stable/8/contrib/sendmail/CACerts Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/CACerts Mon May 26 15:30:27 2014 (r266693) @@ -1,4 +1,4 @@ -# $Id: CACerts,v 8.6 2013/01/18 15:14:17 ca Exp $ +# $Id: CACerts,v 8.6 2013-01-18 15:14:17 ca Exp $ # This file contains some CA certificates that are used to sign the # certificates of mail servers of members of the sendmail consortium # who may reply to questions etc sent to sendmail.org. Modified: stable/8/contrib/sendmail/FAQ ============================================================================== --- stable/8/contrib/sendmail/FAQ Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/FAQ Mon May 26 15:30:27 2014 (r266693) @@ -5,4 +5,4 @@ A plain-text version of the questions on the answers, is posted to comp.mail.sendmail on the 10th and 25th of each month. -$Revision: 8.24 $, Last updated $Date: 1999/02/07 03:21:03 $ +$Revision: 8.24 $, Last updated $Date: 1999-02-07 03:21:03 $ Modified: stable/8/contrib/sendmail/INSTALL ============================================================================== --- stable/8/contrib/sendmail/INSTALL Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/INSTALL Mon May 26 15:30:27 2014 (r266693) @@ -43,4 +43,4 @@ sendmail/SECURITY for more installation in case you are now using a different (and thereby incompatible) version of Berkeley DB. -$Revision: 8.16 $, Last updated $Date: 2007/10/03 21:00:28 $ +$Revision: 8.16 $, Last updated $Date: 2007-10-03 21:00:28 $ Modified: stable/8/contrib/sendmail/KNOWNBUGS ============================================================================== --- stable/8/contrib/sendmail/KNOWNBUGS Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/KNOWNBUGS Mon May 26 15:30:27 2014 (r266693) @@ -266,4 +266,4 @@ Kresolve sequence dnsmx canon be used if set instead of LOCAL_RELAY ($R). This will be fixed in a future version. -$Revision: 8.61 $, Last updated $Date: 2011/04/07 17:48:23 $ +$Revision: 8.61 $, Last updated $Date: 2011-04-07 17:48:23 $ Modified: stable/8/contrib/sendmail/LICENSE ============================================================================== --- stable/8/contrib/sendmail/LICENSE Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/LICENSE Mon May 26 15:30:27 2014 (r266693) @@ -35,7 +35,7 @@ each of the following conditions is met: forth as paragraph 6 below, in the documentation and/or other materials provided with the distribution. For the purposes of binary distribution the "Copyright Notice" refers to the following language: - "Copyright (c) 1998-2013 Proofpoint, Inc. All rights reserved." + "Copyright (c) 1998-2014 Proofpoint, Inc. All rights reserved." 4. Neither the name of Proofpoint, Inc. nor the University of California nor names of their contributors may be used to endorse or promote @@ -78,4 +78,4 @@ each of the following conditions is met: (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -$Revision: 8.22 $, Last updated $Date: 2013/11/23 04:37:36 $, Document 139848.1 +$Revision: 8.23 $, Last updated $Date: 2014-01-26 20:10:01 $, Document 139848.1 Modified: stable/8/contrib/sendmail/Makefile ============================================================================== --- stable/8/contrib/sendmail/Makefile Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/Makefile Mon May 26 15:30:27 2014 (r266693) @@ -1,4 +1,4 @@ -# $Id: Makefile.dist,v 8.15 2001/08/23 20:44:39 ca Exp $ +# $Id: Makefile.dist,v 8.15 2001-08-23 20:44:39 ca Exp $ SHELL= /bin/sh SUBDIRS= libsm libsmutil libsmdb sendmail editmap mail.local \ Modified: stable/8/contrib/sendmail/PGPKEYS ============================================================================== --- stable/8/contrib/sendmail/PGPKEYS Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/PGPKEYS Mon May 26 15:30:27 2014 (r266693) @@ -2613,4 +2613,4 @@ DnF3FZZEzV7oqPwC2jzv/1dD6GFhtgy0cnyoPGUJ =nES8 -----END PGP PUBLIC KEY BLOCK----- -$Revision: 8.46 $, Last updated $Date: 2014/01/18 00:20:24 $ +$Revision: 8.46 $, Last updated $Date: 2014-01-18 00:20:24 $ Modified: stable/8/contrib/sendmail/README ============================================================================== --- stable/8/contrib/sendmail/README Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/README Mon May 26 15:30:27 2014 (r266693) @@ -465,4 +465,4 @@ sendmail Source for the sendmail program test Some test scripts (currently only for compilation aids). vacation Source for the vacation program. NOT PART OF SENDMAIL! -$Revision: 8.96 $, Last updated $Date: 2013/11/22 20:51:01 $ +$Revision: 8.96 $, Last updated $Date: 2013-11-22 20:51:01 $ Modified: stable/8/contrib/sendmail/RELEASE_NOTES ============================================================================== --- stable/8/contrib/sendmail/RELEASE_NOTES Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/RELEASE_NOTES Mon May 26 15:30:27 2014 (r266693) @@ -1,11 +1,20 @@ SENDMAIL RELEASE NOTES - $Id: RELEASE_NOTES,v 8.2043 2014/01/23 20:27:19 ca Exp $ This listing shows the version of the sendmail binary, the version of the sendmail configuration files, the date of release, and a summary of the changes in that release. +8.14.9/8.14.9 2014/05/21 + SECURITY: Properly set the close-on-exec flag for file descriptors + (except stdin, stdout, and stderr) before executing mailers. + Fix a misformed comment in conf.c: "/*" within comment + which may cause a compilation error on some systems. + Problem reported by John Beck of Oracle. + DEVTOOLS: Fix regression in auto-detection of libraries when only + shared libraries are available. Problem reported by + Bryan Costales. + 8.14.8/8.14.8 2014/01/26 Properly initialize all OpenSSL algorithms for versions before OpenSSL 0.9.8o. Without this SHA2 algorithms may not Modified: stable/8/contrib/sendmail/cf/README ============================================================================== --- stable/8/contrib/sendmail/cf/README Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/README Mon May 26 15:30:27 2014 (r266693) @@ -4704,4 +4704,4 @@ M4 DIVERSIONS 8 DNS based blacklists 9 special local rulesets (1 and 2) -$Revision: 8.730 $, Last updated $Date: 2014/01/16 15:55:51 $ +$Revision: 8.730 $, Last updated $Date: 2014-01-16 15:55:51 $ Modified: stable/8/contrib/sendmail/cf/cf/Makefile ============================================================================== --- stable/8/contrib/sendmail/cf/cf/Makefile Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/Makefile Mon May 26 15:30:27 2014 (r266693) @@ -1,7 +1,7 @@ # # Makefile for configuration files. # -# $Id: Makefile,v 8.60 2005/06/14 02:16:34 gshapiro Exp $ +# $Id: Makefile,v 8.60 2005-06-14 02:16:34 gshapiro Exp $ # # Modified: stable/8/contrib/sendmail/cf/cf/README ============================================================================== --- stable/8/contrib/sendmail/cf/cf/README Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/README Mon May 26 15:30:27 2014 (r266693) @@ -31,4 +31,4 @@ The name of the source file for "submit. For more details see Makefile. -$Revision: 1.2 $, Last updated $Date: 2002/02/22 00:33:54 $ +$Revision: 1.2 $, Last updated $Date: 2002-02-22 00:33:54 $ Modified: stable/8/contrib/sendmail/cf/cf/chez.cs.mc ============================================================================== --- stable/8/contrib/sendmail/cf/cf/chez.cs.mc Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/chez.cs.mc Mon May 26 15:30:27 2014 (r266693) @@ -24,7 +24,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: chez.cs.mc,v 8.15 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: chez.cs.mc,v 8.15 2013-11-22 20:51:08 ca Exp $') OSTYPE(bsd4.4)dnl DOMAIN(CS.Berkeley.EDU)dnl define(`LOCAL_RELAY', vangogh.CS.Berkeley.EDU)dnl Modified: stable/8/contrib/sendmail/cf/cf/clientproto.mc ============================================================================== --- stable/8/contrib/sendmail/cf/cf/clientproto.mc Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/clientproto.mc Mon May 26 15:30:27 2014 (r266693) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: clientproto.mc,v 8.17 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: clientproto.mc,v 8.17 2013-11-22 20:51:08 ca Exp $') OSTYPE(unknown) FEATURE(nullclient, mailhost.$m) Modified: stable/8/contrib/sendmail/cf/cf/cs-hpux10.mc ============================================================================== --- stable/8/contrib/sendmail/cf/cf/cs-hpux10.mc Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/cs-hpux10.mc Mon May 26 15:30:27 2014 (r266693) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: cs-hpux10.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: cs-hpux10.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') OSTYPE(hpux10)dnl DOMAIN(CS.Berkeley.EDU)dnl define(`MAIL_HUB', mailspool.CS.Berkeley.EDU)dnl Modified: stable/8/contrib/sendmail/cf/cf/cs-hpux9.mc ============================================================================== --- stable/8/contrib/sendmail/cf/cf/cs-hpux9.mc Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/cs-hpux9.mc Mon May 26 15:30:27 2014 (r266693) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: cs-hpux9.mc,v 8.15 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: cs-hpux9.mc,v 8.15 2013-11-22 20:51:08 ca Exp $') OSTYPE(hpux9)dnl DOMAIN(CS.Berkeley.EDU)dnl define(`MAIL_HUB', mailspool.CS.Berkeley.EDU)dnl Modified: stable/8/contrib/sendmail/cf/cf/cs-osf1.mc ============================================================================== --- stable/8/contrib/sendmail/cf/cf/cs-osf1.mc Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/cs-osf1.mc Mon May 26 15:30:27 2014 (r266693) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: cs-osf1.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: cs-osf1.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') OSTYPE(osf1)dnl DOMAIN(CS.Berkeley.EDU)dnl MAILER(local)dnl Modified: stable/8/contrib/sendmail/cf/cf/cs-solaris2.mc ============================================================================== --- stable/8/contrib/sendmail/cf/cf/cs-solaris2.mc Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/cs-solaris2.mc Mon May 26 15:30:27 2014 (r266693) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: cs-solaris2.mc,v 8.13 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: cs-solaris2.mc,v 8.13 2013-11-22 20:51:08 ca Exp $') OSTYPE(solaris2)dnl DOMAIN(CS.Berkeley.EDU)dnl MAILER(local)dnl Modified: stable/8/contrib/sendmail/cf/cf/cs-sunos4.1.mc ============================================================================== --- stable/8/contrib/sendmail/cf/cf/cs-sunos4.1.mc Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/cs-sunos4.1.mc Mon May 26 15:30:27 2014 (r266693) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: cs-sunos4.1.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: cs-sunos4.1.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') OSTYPE(sunos4.1)dnl DOMAIN(CS.Berkeley.EDU)dnl MAILER(local)dnl Modified: stable/8/contrib/sendmail/cf/cf/cs-ultrix4.mc ============================================================================== --- stable/8/contrib/sendmail/cf/cf/cs-ultrix4.mc Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/cs-ultrix4.mc Mon May 26 15:30:27 2014 (r266693) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: cs-ultrix4.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: cs-ultrix4.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') OSTYPE(ultrix4)dnl DOMAIN(CS.Berkeley.EDU)dnl MAILER(local)dnl Modified: stable/8/contrib/sendmail/cf/cf/cyrusproto.mc ============================================================================== --- stable/8/contrib/sendmail/cf/cf/cyrusproto.mc Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/cyrusproto.mc Mon May 26 15:30:27 2014 (r266693) @@ -27,7 +27,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: cyrusproto.mc,v 8.7 1999/09/07 14:57:10 ca Exp $') +VERSIONID(`$Id: cyrusproto.mc,v 8.7 1999-09-07 14:57:10 ca Exp $') define(`confBIND_OPTS',`-DNSRCH -DEFNAMES') define(`confLOCAL_MAILER', `cyrus') FEATURE(`nocanonify') Modified: stable/8/contrib/sendmail/cf/cf/generic-bsd4.4.mc ============================================================================== --- stable/8/contrib/sendmail/cf/cf/generic-bsd4.4.mc Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/generic-bsd4.4.mc Mon May 26 15:30:27 2014 (r266693) @@ -21,7 +21,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-bsd4.4.mc,v 8.11 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-bsd4.4.mc,v 8.11 2013-11-22 20:51:08 ca Exp $') OSTYPE(bsd4.4)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/8/contrib/sendmail/cf/cf/generic-hpux10.mc ============================================================================== --- stable/8/contrib/sendmail/cf/cf/generic-hpux10.mc Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/generic-hpux10.mc Mon May 26 15:30:27 2014 (r266693) @@ -20,7 +20,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-hpux10.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-hpux10.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') OSTYPE(hpux10)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/8/contrib/sendmail/cf/cf/generic-hpux9.mc ============================================================================== --- stable/8/contrib/sendmail/cf/cf/generic-hpux9.mc Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/generic-hpux9.mc Mon May 26 15:30:27 2014 (r266693) @@ -20,7 +20,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-hpux9.mc,v 8.12 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-hpux9.mc,v 8.12 2013-11-22 20:51:08 ca Exp $') OSTYPE(hpux9)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/8/contrib/sendmail/cf/cf/generic-linux.mc ============================================================================== --- stable/8/contrib/sendmail/cf/cf/generic-linux.mc Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/generic-linux.mc Mon May 26 15:30:27 2014 (r266693) @@ -20,7 +20,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-linux.mc,v 8.2 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-linux.mc,v 8.2 2013-11-22 20:51:08 ca Exp $') OSTYPE(linux)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/8/contrib/sendmail/cf/cf/generic-mpeix.mc ============================================================================== --- stable/8/contrib/sendmail/cf/cf/generic-mpeix.mc Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/generic-mpeix.mc Mon May 26 15:30:27 2014 (r266693) @@ -17,7 +17,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-mpeix.mc,v 8.2 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-mpeix.mc,v 8.2 2013-11-22 20:51:08 ca Exp $') OSTYPE(mpeix)dnl DOMAIN(generic)dnl define(`confFORWARD_PATH', `$z/.forward')dnl Modified: stable/8/contrib/sendmail/cf/cf/generic-nextstep3.3.mc ============================================================================== --- stable/8/contrib/sendmail/cf/cf/generic-nextstep3.3.mc Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/generic-nextstep3.3.mc Mon May 26 15:30:27 2014 (r266693) @@ -20,7 +20,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-nextstep3.3.mc,v 8.11 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-nextstep3.3.mc,v 8.11 2013-11-22 20:51:08 ca Exp $') OSTYPE(nextstep)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/8/contrib/sendmail/cf/cf/generic-osf1.mc ============================================================================== --- stable/8/contrib/sendmail/cf/cf/generic-osf1.mc Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/generic-osf1.mc Mon May 26 15:30:27 2014 (r266693) @@ -20,7 +20,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-osf1.mc,v 8.12 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-osf1.mc,v 8.12 2013-11-22 20:51:08 ca Exp $') OSTYPE(osf1)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/8/contrib/sendmail/cf/cf/generic-solaris.mc ============================================================================== --- stable/8/contrib/sendmail/cf/cf/generic-solaris.mc Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/generic-solaris.mc Mon May 26 15:30:27 2014 (r266693) @@ -22,7 +22,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-solaris.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-solaris.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') OSTYPE(solaris2)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/8/contrib/sendmail/cf/cf/generic-sunos4.1.mc ============================================================================== --- stable/8/contrib/sendmail/cf/cf/generic-sunos4.1.mc Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/generic-sunos4.1.mc Mon May 26 15:30:27 2014 (r266693) @@ -20,7 +20,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-sunos4.1.mc,v 8.12 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-sunos4.1.mc,v 8.12 2013-11-22 20:51:08 ca Exp $') OSTYPE(sunos4.1)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/8/contrib/sendmail/cf/cf/generic-ultrix4.mc ============================================================================== --- stable/8/contrib/sendmail/cf/cf/generic-ultrix4.mc Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/generic-ultrix4.mc Mon May 26 15:30:27 2014 (r266693) @@ -20,7 +20,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-ultrix4.mc,v 8.12 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-ultrix4.mc,v 8.12 2013-11-22 20:51:08 ca Exp $') OSTYPE(ultrix4)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/8/contrib/sendmail/cf/cf/huginn.cs.mc ============================================================================== --- stable/8/contrib/sendmail/cf/cf/huginn.cs.mc Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/huginn.cs.mc Mon May 26 15:30:27 2014 (r266693) @@ -22,7 +22,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: huginn.cs.mc,v 8.16 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: huginn.cs.mc,v 8.16 2013-11-22 20:51:08 ca Exp $') OSTYPE(hpux9)dnl DOMAIN(CS.Berkeley.EDU)dnl MASQUERADE_AS(CS.Berkeley.EDU)dnl Modified: stable/8/contrib/sendmail/cf/cf/knecht.mc ============================================================================== --- stable/8/contrib/sendmail/cf/cf/knecht.mc Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/knecht.mc Mon May 26 15:30:27 2014 (r266693) @@ -19,7 +19,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: knecht.mc,v 8.63 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: knecht.mc,v 8.63 2013-11-22 20:51:08 ca Exp $') OSTYPE(bsd4.4) DOMAIN(generic) Modified: stable/8/contrib/sendmail/cf/cf/mail.cs.mc ============================================================================== --- stable/8/contrib/sendmail/cf/cf/mail.cs.mc Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/mail.cs.mc Mon May 26 15:30:27 2014 (r266693) @@ -22,7 +22,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: mail.cs.mc,v 8.19 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: mail.cs.mc,v 8.19 2013-11-22 20:51:08 ca Exp $') OSTYPE(ultrix4)dnl DOMAIN(Berkeley.EDU)dnl MASQUERADE_AS(CS.Berkeley.EDU)dnl Modified: stable/8/contrib/sendmail/cf/cf/mail.eecs.mc ============================================================================== --- stable/8/contrib/sendmail/cf/cf/mail.eecs.mc Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/mail.eecs.mc Mon May 26 15:30:27 2014 (r266693) @@ -22,7 +22,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: mail.eecs.mc,v 8.19 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: mail.eecs.mc,v 8.19 2013-11-22 20:51:08 ca Exp $') OSTYPE(ultrix4)dnl DOMAIN(EECS.Berkeley.EDU)dnl MASQUERADE_AS(EECS.Berkeley.EDU)dnl Modified: stable/8/contrib/sendmail/cf/cf/mailspool.cs.mc ============================================================================== --- stable/8/contrib/sendmail/cf/cf/mailspool.cs.mc Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/mailspool.cs.mc Mon May 26 15:30:27 2014 (r266693) @@ -24,7 +24,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: mailspool.cs.mc,v 8.13 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: mailspool.cs.mc,v 8.13 2013-11-22 20:51:08 ca Exp $') OSTYPE(sunos4.1)dnl DOMAIN(CS.Berkeley.EDU)dnl MAILER(local)dnl Modified: stable/8/contrib/sendmail/cf/cf/python.cs.mc ============================================================================== --- stable/8/contrib/sendmail/cf/cf/python.cs.mc Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/python.cs.mc Mon May 26 15:30:27 2014 (r266693) @@ -24,7 +24,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: python.cs.mc,v 8.13 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: python.cs.mc,v 8.13 2013-11-22 20:51:08 ca Exp $') OSTYPE(bsd4.4)dnl DOMAIN(CS.Berkeley.EDU)dnl define(`LOCAL_RELAY', vangogh.CS.Berkeley.EDU)dnl Modified: stable/8/contrib/sendmail/cf/cf/s2k-osf1.mc ============================================================================== --- stable/8/contrib/sendmail/cf/cf/s2k-osf1.mc Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/s2k-osf1.mc Mon May 26 15:30:27 2014 (r266693) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: s2k-osf1.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: s2k-osf1.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') OSTYPE(osf1)dnl DOMAIN(S2K.Berkeley.EDU)dnl MAILER(local)dnl Modified: stable/8/contrib/sendmail/cf/cf/s2k-ultrix4.mc ============================================================================== --- stable/8/contrib/sendmail/cf/cf/s2k-ultrix4.mc Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/s2k-ultrix4.mc Mon May 26 15:30:27 2014 (r266693) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: s2k-ultrix4.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: s2k-ultrix4.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') OSTYPE(ultrix4)dnl DOMAIN(S2K.Berkeley.EDU)dnl MAILER(local)dnl Modified: stable/8/contrib/sendmail/cf/cf/submit.cf ============================================================================== --- stable/8/contrib/sendmail/cf/cf/submit.cf Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/submit.cf Mon May 26 15:30:27 2014 (r266693) @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@lab.smi.sendmail.com on Thu Jan 23 12:29:13 PST 2014 -##### in /home/ca/sm8-rel/sm-8.14.8/OpenSource/sendmail-8.14.8/cf/cf +##### built by ca@lab.smi.sendmail.com on Tue May 20 12:12:52 PDT 2014 +##### in /home/ca/sm8.git/sendmail/OpenSource/sendmail-8.14.9/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -27,15 +27,15 @@ ###################################################################### ###################################################################### -##### $Id: cfhead.m4,v 8.122 2013/11/22 20:51:13 ca Exp $ ##### -##### $Id: cf.m4,v 8.33 2013/11/22 20:51:13 ca Exp $ ##### -##### $Id: submit.mc,v 8.15 2013/11/22 20:51:08 ca Exp $ ##### -##### $Id: msp.m4,v 1.34 2013/11/22 20:51:11 ca Exp $ ##### +##### $Id: cfhead.m4,v 8.122 2013-11-22 20:51:13 ca Exp $ ##### +##### $Id: cf.m4,v 8.33 2013-11-22 20:51:13 ca Exp $ ##### +##### $Id: submit.mc,v 8.15 2013-11-22 20:51:08 ca Exp $ ##### +##### $Id: msp.m4,v 1.34 2013-11-22 20:51:11 ca Exp $ ##### -##### $Id: no_default_msa.m4,v 8.3 2013/11/22 20:51:11 ca Exp $ ##### +##### $Id: no_default_msa.m4,v 8.3 2013-11-22 20:51:11 ca Exp $ ##### -##### $Id: proto.m4,v 8.762 2013/11/22 20:51:13 ca Exp $ ##### +##### $Id: proto.m4,v 8.762 2013-11-22 20:51:13 ca Exp $ ##### # level 10 config file format V10/Berkeley @@ -114,7 +114,7 @@ D{MTAHost}[127.0.0.1] # Configuration version number -DZ8.14.8/Submit +DZ8.14.9/Submit ############### @@ -1299,7 +1299,7 @@ R$* $#relay $@ ${MTAHost} $: $1 < @ $j ### Local and Program Mailer specification ### ################################################## -##### $Id: local.m4,v 8.60 2013/11/22 20:51:14 ca Exp $ ##### +##### $Id: local.m4,v 8.60 2013-11-22 20:51:14 ca Exp $ ##### # # Envelope sender rewriting @@ -1351,7 +1351,7 @@ Mprog, P=[IPC], F=lmDFMuXk5, S=EnvFromL ### SMTP Mailer specification ### ##################################### -##### $Id: smtp.m4,v 8.66 2013/11/22 20:51:14 ca Exp $ ##### +##### $Id: smtp.m4,v 8.66 2013-11-22 20:51:14 ca Exp $ ##### # # common sender and masquerading recipient rewriting @@ -1457,7 +1457,7 @@ Mrelay, P=[IPC], F=mDFMuXa8k, S=EnvFrom # # # # divert(0)dnl -# VERSIONID(`$Id: submit.mc,v 8.15 2013/11/22 20:51:08 ca Exp $') +# VERSIONID(`$Id: submit.mc,v 8.15 2013-11-22 20:51:08 ca Exp $') # define(`confCF_VERSION', `Submit')dnl # define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from complaining # define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet Modified: stable/8/contrib/sendmail/cf/cf/submit.mc ============================================================================== --- stable/8/contrib/sendmail/cf/cf/submit.mc Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/submit.mc Mon May 26 15:30:27 2014 (r266693) @@ -15,7 +15,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: submit.mc,v 8.15 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: submit.mc,v 8.15 2013-11-22 20:51:08 ca Exp $') define(`confCF_VERSION', `Submit')dnl define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from complaining define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet Modified: stable/8/contrib/sendmail/cf/cf/tcpproto.mc ============================================================================== --- stable/8/contrib/sendmail/cf/cf/tcpproto.mc Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/tcpproto.mc Mon May 26 15:30:27 2014 (r266693) @@ -26,7 +26,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: tcpproto.mc,v 8.15 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: tcpproto.mc,v 8.15 2013-11-22 20:51:08 ca Exp $') OSTYPE(`unknown') FEATURE(`nouucp', `reject') MAILER(`local') Modified: stable/8/contrib/sendmail/cf/cf/ucbarpa.mc ============================================================================== --- stable/8/contrib/sendmail/cf/cf/ucbarpa.mc Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/ucbarpa.mc Mon May 26 15:30:27 2014 (r266693) @@ -21,7 +21,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: ucbarpa.mc,v 8.13 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: ucbarpa.mc,v 8.13 2013-11-22 20:51:08 ca Exp $') DOMAIN(CS.Berkeley.EDU)dnl OSTYPE(bsd4.4)dnl MAILER(local)dnl Modified: stable/8/contrib/sendmail/cf/cf/ucbvax.mc ============================================================================== --- stable/8/contrib/sendmail/cf/cf/ucbvax.mc Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/ucbvax.mc Mon May 26 15:30:27 2014 (r266693) @@ -22,7 +22,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: ucbvax.mc,v 8.15 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: ucbvax.mc,v 8.15 2013-11-22 20:51:08 ca Exp $') OSTYPE(bsd4.3) DOMAIN(CS.Berkeley.EDU) MASQUERADE_AS(CS.Berkeley.EDU) Modified: stable/8/contrib/sendmail/cf/cf/uucpproto.mc ============================================================================== --- stable/8/contrib/sendmail/cf/cf/uucpproto.mc Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/uucpproto.mc Mon May 26 15:30:27 2014 (r266693) @@ -26,7 +26,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: uucpproto.mc,v 8.16 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: uucpproto.mc,v 8.16 2013-11-22 20:51:08 ca Exp $') OSTYPE(unknown) FEATURE(promiscuous_relay)dnl FEATURE(accept_unresolvable_domains)dnl Modified: stable/8/contrib/sendmail/cf/cf/vangogh.cs.mc ============================================================================== --- stable/8/contrib/sendmail/cf/cf/vangogh.cs.mc Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/cf/vangogh.cs.mc Mon May 26 15:30:27 2014 (r266693) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: vangogh.cs.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: vangogh.cs.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') DOMAIN(CS.Berkeley.EDU)dnl OSTYPE(bsd4.4)dnl MAILER(local)dnl Modified: stable/8/contrib/sendmail/cf/domain/Berkeley.EDU.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/domain/Berkeley.EDU.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/domain/Berkeley.EDU.m4 Mon May 26 15:30:27 2014 (r266693) @@ -12,7 +12,7 @@ divert(-1) # # divert(0) -VERSIONID(`$Id: Berkeley.EDU.m4,v 8.18 2013/11/22 20:51:10 ca Exp $') +VERSIONID(`$Id: Berkeley.EDU.m4,v 8.18 2013-11-22 20:51:10 ca Exp $') DOMAIN(berkeley-only)dnl define(`BITNET_RELAY', `bitnet-relay.Berkeley.EDU')dnl define(`UUCP_RELAY', `uucp-relay.Berkeley.EDU')dnl Modified: stable/8/contrib/sendmail/cf/domain/CS.Berkeley.EDU.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/domain/CS.Berkeley.EDU.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/domain/CS.Berkeley.EDU.m4 Mon May 26 15:30:27 2014 (r266693) @@ -12,7 +12,7 @@ divert(-1) # # divert(0) -VERSIONID(`$Id: CS.Berkeley.EDU.m4,v 8.11 2013/11/22 20:51:10 ca Exp $') +VERSIONID(`$Id: CS.Berkeley.EDU.m4,v 8.11 2013-11-22 20:51:10 ca Exp $') DOMAIN(Berkeley.EDU)dnl HACK(cssubdomain)dnl define(`confUSERDB_SPEC', Modified: stable/8/contrib/sendmail/cf/domain/EECS.Berkeley.EDU.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/domain/EECS.Berkeley.EDU.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/domain/EECS.Berkeley.EDU.m4 Mon May 26 15:30:27 2014 (r266693) @@ -12,6 +12,6 @@ divert(-1) # # divert(0) -VERSIONID(`$Id: EECS.Berkeley.EDU.m4,v 8.11 2013/11/22 20:51:10 ca Exp $') +VERSIONID(`$Id: EECS.Berkeley.EDU.m4,v 8.11 2013-11-22 20:51:10 ca Exp $') DOMAIN(Berkeley.EDU)dnl MASQUERADE_AS(EECS.Berkeley.EDU)dnl Modified: stable/8/contrib/sendmail/cf/domain/S2K.Berkeley.EDU.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/domain/S2K.Berkeley.EDU.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/domain/S2K.Berkeley.EDU.m4 Mon May 26 15:30:27 2014 (r266693) @@ -12,6 +12,6 @@ divert(-1) # # divert(0) -VERSIONID(`$Id: S2K.Berkeley.EDU.m4,v 8.11 2013/11/22 20:51:10 ca Exp $') +VERSIONID(`$Id: S2K.Berkeley.EDU.m4,v 8.11 2013-11-22 20:51:10 ca Exp $') DOMAIN(CS.Berkeley.EDU)dnl MASQUERADE_AS(postgres.Berkeley.EDU)dnl Modified: stable/8/contrib/sendmail/cf/domain/berkeley-only.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/domain/berkeley-only.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/domain/berkeley-only.m4 Mon May 26 15:30:27 2014 (r266693) @@ -12,7 +12,7 @@ divert(-1) # # divert(0) -VERSIONID(`$Id: unspecified-domain.m4,v 8.11 2013/11/22 20:51:10 ca Exp $') +VERSIONID(`$Id: unspecified-domain.m4,v 8.11 2013-11-22 20:51:10 ca Exp $') errprint(`*** ERROR: You are trying to use the Berkeley sample configuration') errprint(` files outside of the Computer Science Division at Berkeley.') errprint(` The configuration (.mc) files must be customized to reference') Modified: stable/8/contrib/sendmail/cf/domain/generic.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/domain/generic.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/domain/generic.m4 Mon May 26 15:30:27 2014 (r266693) @@ -20,7 +20,7 @@ divert(-1) # files. # divert(0) -VERSIONID(`$Id: generic.m4,v 8.16 2013/11/22 20:51:10 ca Exp $') +VERSIONID(`$Id: generic.m4,v 8.16 2013-11-22 20:51:10 ca Exp $') define(`confFORWARD_PATH', `$z/.forward.$w+$h:$z/.forward+$h:$z/.forward.$w:$z/.forward')dnl define(`confMAX_HEADERS_LENGTH', `32768')dnl FEATURE(`redirect')dnl Modified: stable/8/contrib/sendmail/cf/feature/accept_unqualified_senders.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/accept_unqualified_senders.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/accept_unqualified_senders.m4 Mon May 26 15:30:27 2014 (r266693) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: accept_unqualified_senders.m4,v 8.7 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: accept_unqualified_senders.m4,v 8.7 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_ACCEPT_UNQUALIFIED_SENDERS_', 1) Modified: stable/8/contrib/sendmail/cf/feature/accept_unresolvable_domains.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/accept_unresolvable_domains.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/accept_unresolvable_domains.m4 Mon May 26 15:30:27 2014 (r266693) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: accept_unresolvable_domains.m4,v 8.11 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: accept_unresolvable_domains.m4,v 8.11 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_ACCEPT_UNRESOLVABLE_DOMAINS_', 1) Modified: stable/8/contrib/sendmail/cf/feature/access_db.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/access_db.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/access_db.m4 Mon May 26 15:30:27 2014 (r266693) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: access_db.m4,v 8.28 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: access_db.m4,v 8.28 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_ACCESS_TABLE_', `') Modified: stable/8/contrib/sendmail/cf/feature/allmasquerade.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/allmasquerade.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/allmasquerade.m4 Mon May 26 15:30:27 2014 (r266693) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: allmasquerade.m4,v 8.14 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: allmasquerade.m4,v 8.14 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_MAILER_local_', Modified: stable/8/contrib/sendmail/cf/feature/always_add_domain.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/always_add_domain.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/always_add_domain.m4 Mon May 26 15:30:27 2014 (r266693) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: always_add_domain.m4,v 8.12 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: always_add_domain.m4,v 8.12 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_MAILER_local_', Modified: stable/8/contrib/sendmail/cf/feature/authinfo.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/authinfo.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/authinfo.m4 Mon May 26 15:30:27 2014 (r266693) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: authinfo.m4,v 1.10 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: authinfo.m4,v 1.10 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_AUTHINFO_TABLE_', `') Modified: stable/8/contrib/sendmail/cf/feature/badmx.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/badmx.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/badmx.m4 Mon May 26 15:30:27 2014 (r266693) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: badmx.m4,v 1.2 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: badmx.m4,v 1.2 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_BADMX_CHK_', 1) Modified: stable/8/contrib/sendmail/cf/feature/bestmx_is_local.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/bestmx_is_local.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/bestmx_is_local.m4 Mon May 26 15:30:27 2014 (r266693) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: bestmx_is_local.m4,v 8.27 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: bestmx_is_local.m4,v 8.27 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_BESTMX_IS_LOCAL_', _ARG_) Modified: stable/8/contrib/sendmail/cf/feature/bitdomain.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/bitdomain.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/bitdomain.m4 Mon May 26 15:30:27 2014 (r266693) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: bitdomain.m4,v 8.31 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: bitdomain.m4,v 8.31 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_BITDOMAIN_TABLE_', `') Modified: stable/8/contrib/sendmail/cf/feature/blacklist_recipients.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/blacklist_recipients.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/blacklist_recipients.m4 Mon May 26 15:30:27 2014 (r266693) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: blacklist_recipients.m4,v 8.14 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: blacklist_recipients.m4,v 8.14 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_ACCESS_TABLE_', Modified: stable/8/contrib/sendmail/cf/feature/block_bad_helo.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/block_bad_helo.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/block_bad_helo.m4 Mon May 26 15:30:27 2014 (r266693) @@ -10,7 +10,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: block_bad_helo.m4,v 1.2 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: block_bad_helo.m4,v 1.2 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_BLOCK_BAD_HELO_', `')dnl Modified: stable/8/contrib/sendmail/cf/feature/compat_check.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/compat_check.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/compat_check.m4 Mon May 26 15:30:27 2014 (r266693) @@ -9,7 +9,7 @@ divert(-1) # # divert(0) -VERSIONID(`$Id: compat_check.m4,v 1.5 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: compat_check.m4,v 1.5 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_ACCESS_TABLE_', `', `errprint(`FEATURE(`compat_check') requires FEATURE(`access_db') Modified: stable/8/contrib/sendmail/cf/feature/conncontrol.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/conncontrol.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/conncontrol.m4 Mon May 26 15:30:27 2014 (r266693) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: conncontrol.m4,v 1.5 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: conncontrol.m4,v 1.5 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_ACCESS_TABLE_', ` Modified: stable/8/contrib/sendmail/cf/feature/delay_checks.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/delay_checks.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/delay_checks.m4 Mon May 26 15:30:27 2014 (r266693) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: delay_checks.m4,v 8.9 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: delay_checks.m4,v 8.9 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_DELAY_CHECKS_', 1) Modified: stable/8/contrib/sendmail/cf/feature/dnsbl.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/dnsbl.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/dnsbl.m4 Mon May 26 15:30:27 2014 (r266693) @@ -12,7 +12,7 @@ divert(-1) ifdef(`DNSBL_MAP', `', `define(`DNSBL_MAP', `dns -R A')') divert(0) ifdef(`_DNSBL_R_',`dnl',`dnl -VERSIONID(`$Id: dnsbl.m4,v 8.34 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: dnsbl.m4,v 8.34 2013-11-22 20:51:11 ca Exp $') define(`_DNSBL_R_',`') ifelse(defn(`_ARG_'), `', `errprint(`*** ERROR: missing argument for FEATURE(`dnsbl')')') Modified: stable/8/contrib/sendmail/cf/feature/domaintable.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/domaintable.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/domaintable.m4 Mon May 26 15:30:27 2014 (r266693) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: domaintable.m4,v 8.25 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: domaintable.m4,v 8.25 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_DOMAIN_TABLE_', `') Modified: stable/8/contrib/sendmail/cf/feature/enhdnsbl.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/enhdnsbl.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/enhdnsbl.m4 Mon May 26 15:30:27 2014 (r266693) @@ -13,7 +13,7 @@ ifelse(defn(`_ARG_'), `', `errprint(`*** ERROR: missing argument for FEATURE(`enhdnsbl')')') divert(0) ifdef(`_EDNSBL_R_',`dnl',`dnl -VERSIONID(`$Id: enhdnsbl.m4,v 1.13 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: enhdnsbl.m4,v 1.13 2013-11-22 20:51:11 ca Exp $') LOCAL_CONFIG define(`_EDNSBL_R_',`')dnl # map for enhanced DNS based blacklist lookups Modified: stable/8/contrib/sendmail/cf/feature/generics_entire_domain.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/generics_entire_domain.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/generics_entire_domain.m4 Mon May 26 15:30:27 2014 (r266693) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: generics_entire_domain.m4,v 8.2 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: generics_entire_domain.m4,v 8.2 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_GENERICS_ENTIRE_DOMAIN_', 1) Modified: stable/8/contrib/sendmail/cf/feature/genericstable.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/genericstable.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/genericstable.m4 Mon May 26 15:30:27 2014 (r266693) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: genericstable.m4,v 8.24 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: genericstable.m4,v 8.24 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_GENERICS_TABLE_', `') Modified: stable/8/contrib/sendmail/cf/feature/greet_pause.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/greet_pause.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/greet_pause.m4 Mon May 26 15:30:27 2014 (r266693) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: greet_pause.m4,v 1.5 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: greet_pause.m4,v 1.5 2013-11-22 20:51:11 ca Exp $') divert(-1) ifelse(len(X`'_ARG_),`1',`ifdef(`_ACCESS_TABLE_', `', Modified: stable/8/contrib/sendmail/cf/feature/ldap_routing.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/ldap_routing.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/ldap_routing.m4 Mon May 26 15:30:27 2014 (r266693) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: ldap_routing.m4,v 8.21 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: ldap_routing.m4,v 8.21 2013-11-22 20:51:11 ca Exp $') divert(-1) # Check first two arguments. If they aren't set, may need to warn in proto.m4 Modified: stable/8/contrib/sendmail/cf/feature/limited_masquerade.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/limited_masquerade.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/limited_masquerade.m4 Mon May 26 15:30:27 2014 (r266693) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: limited_masquerade.m4,v 8.10 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: limited_masquerade.m4,v 8.10 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_LIMITED_MASQUERADE_', 1) Modified: stable/8/contrib/sendmail/cf/feature/local_lmtp.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/local_lmtp.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/local_lmtp.m4 Mon May 26 15:30:27 2014 (r266693) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: local_lmtp.m4,v 8.18 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: local_lmtp.m4,v 8.18 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_MAILER_local_', Modified: stable/8/contrib/sendmail/cf/feature/local_no_masquerade.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/local_no_masquerade.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/local_no_masquerade.m4 Mon May 26 15:30:27 2014 (r266693) @@ -9,7 +9,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: local_no_masquerade.m4,v 1.3 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: local_no_masquerade.m4,v 1.3 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_MAILER_local_', Modified: stable/8/contrib/sendmail/cf/feature/local_procmail.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/local_procmail.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/local_procmail.m4 Mon May 26 15:30:27 2014 (r266693) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: local_procmail.m4,v 8.23 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: local_procmail.m4,v 8.23 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_MAILER_local_', Modified: stable/8/contrib/sendmail/cf/feature/lookupdotdomain.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/lookupdotdomain.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/lookupdotdomain.m4 Mon May 26 15:30:27 2014 (r266693) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: lookupdotdomain.m4,v 1.2 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: lookupdotdomain.m4,v 1.2 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_ACCESS_TABLE_', Modified: stable/8/contrib/sendmail/cf/feature/loose_relay_check.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/loose_relay_check.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/loose_relay_check.m4 Mon May 26 15:30:27 2014 (r266693) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: loose_relay_check.m4,v 8.7 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: loose_relay_check.m4,v 8.7 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_LOOSE_RELAY_CHECK_', 1) Modified: stable/8/contrib/sendmail/cf/feature/mailertable.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/mailertable.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/mailertable.m4 Mon May 26 15:30:27 2014 (r266693) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: mailertable.m4,v 8.26 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: mailertable.m4,v 8.26 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_MAILER_TABLE_', `') Modified: stable/8/contrib/sendmail/cf/feature/masquerade_entire_domain.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/masquerade_entire_domain.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/masquerade_entire_domain.m4 Mon May 26 15:30:27 2014 (r266693) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: masquerade_entire_domain.m4,v 8.10 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: masquerade_entire_domain.m4,v 8.10 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_MASQUERADE_ENTIRE_DOMAIN_', 1) Modified: stable/8/contrib/sendmail/cf/feature/masquerade_envelope.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/masquerade_envelope.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/masquerade_envelope.m4 Mon May 26 15:30:27 2014 (r266693) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: masquerade_envelope.m4,v 8.10 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: masquerade_envelope.m4,v 8.10 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_MASQUERADE_ENVELOPE_', 1) Modified: stable/8/contrib/sendmail/cf/feature/msp.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/msp.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/msp.m4 Mon May 26 15:30:27 2014 (r266693) @@ -10,7 +10,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: msp.m4,v 1.34 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: msp.m4,v 1.34 2013-11-22 20:51:11 ca Exp $') divert(-1) undefine(`ALIAS_FILE') define(`confDELIVERY_MODE', `i') Modified: stable/8/contrib/sendmail/cf/feature/mtamark.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/mtamark.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/mtamark.m4 Mon May 26 15:30:27 2014 (r266693) @@ -11,7 +11,7 @@ divert(-1) divert(0) ifdef(`_MTAMARK_R',`dnl',`dnl -VERSIONID(`$Id: mtamark.m4,v 1.3 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: mtamark.m4,v 1.3 2013-11-22 20:51:11 ca Exp $') LOCAL_CONFIG define(`_MTAMARK_R',`')dnl # map for MTA mark Modified: stable/8/contrib/sendmail/cf/feature/no_default_msa.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/no_default_msa.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/no_default_msa.m4 Mon May 26 15:30:27 2014 (r266693) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: no_default_msa.m4,v 8.3 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: no_default_msa.m4,v 8.3 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_NO_MSA_', `1') Modified: stable/8/contrib/sendmail/cf/feature/nocanonify.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/nocanonify.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/nocanonify.m4 Mon May 26 15:30:27 2014 (r266693) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: nocanonify.m4,v 8.13 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: nocanonify.m4,v 8.13 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_NO_CANONIFY_', 1) Modified: stable/8/contrib/sendmail/cf/feature/notsticky.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/notsticky.m4 Mon May 26 15:28:28 2014 (r266692) +++ stable/8/contrib/sendmail/cf/feature/notsticky.m4 Mon May 26 15:30:27 2014 (r266693) @@ -13,7 +13,7 @@ divert(-1) # *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Mon May 26 15:31:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46D2CE35; Mon, 26 May 2014 15:31:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E3972EC8; Mon, 26 May 2014 15:31:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4QFVjf9095918; Mon, 26 May 2014 15:31:45 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4QFVR2L095247; Mon, 26 May 2014 15:31:27 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201405261531.s4QFVR2L095247@svn.freebsd.org> From: Gregory Neil Shapiro Date: Mon, 26 May 2014 15:31:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r266694 - in stable/7/contrib/sendmail: . cf cf/cf cf/domain cf/feature cf/hack cf/m4 cf/mailer cf/ostype cf/sh contrib doc/op editmap include/libmilter include/libsmdb include/sendmail... X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 15:31:45 -0000 Author: gshapiro Date: Mon May 26 15:31:26 2014 New Revision: 266694 URL: http://svnweb.freebsd.org/changeset/base/266694 Log: MFC: Merge sendmail 8.14.9 to HEAD Modified: stable/7/contrib/sendmail/CACerts stable/7/contrib/sendmail/FAQ stable/7/contrib/sendmail/INSTALL stable/7/contrib/sendmail/KNOWNBUGS stable/7/contrib/sendmail/LICENSE stable/7/contrib/sendmail/Makefile stable/7/contrib/sendmail/PGPKEYS stable/7/contrib/sendmail/README stable/7/contrib/sendmail/RELEASE_NOTES stable/7/contrib/sendmail/cf/README stable/7/contrib/sendmail/cf/cf/Makefile stable/7/contrib/sendmail/cf/cf/README stable/7/contrib/sendmail/cf/cf/chez.cs.mc stable/7/contrib/sendmail/cf/cf/clientproto.mc stable/7/contrib/sendmail/cf/cf/cs-hpux10.mc stable/7/contrib/sendmail/cf/cf/cs-hpux9.mc stable/7/contrib/sendmail/cf/cf/cs-osf1.mc stable/7/contrib/sendmail/cf/cf/cs-solaris2.mc stable/7/contrib/sendmail/cf/cf/cs-sunos4.1.mc stable/7/contrib/sendmail/cf/cf/cs-ultrix4.mc stable/7/contrib/sendmail/cf/cf/cyrusproto.mc stable/7/contrib/sendmail/cf/cf/generic-bsd4.4.mc stable/7/contrib/sendmail/cf/cf/generic-hpux10.mc stable/7/contrib/sendmail/cf/cf/generic-hpux9.mc stable/7/contrib/sendmail/cf/cf/generic-linux.mc stable/7/contrib/sendmail/cf/cf/generic-mpeix.mc stable/7/contrib/sendmail/cf/cf/generic-nextstep3.3.mc stable/7/contrib/sendmail/cf/cf/generic-osf1.mc stable/7/contrib/sendmail/cf/cf/generic-solaris.mc stable/7/contrib/sendmail/cf/cf/generic-sunos4.1.mc stable/7/contrib/sendmail/cf/cf/generic-ultrix4.mc stable/7/contrib/sendmail/cf/cf/huginn.cs.mc stable/7/contrib/sendmail/cf/cf/knecht.mc stable/7/contrib/sendmail/cf/cf/mail.cs.mc stable/7/contrib/sendmail/cf/cf/mail.eecs.mc stable/7/contrib/sendmail/cf/cf/mailspool.cs.mc stable/7/contrib/sendmail/cf/cf/python.cs.mc stable/7/contrib/sendmail/cf/cf/s2k-osf1.mc stable/7/contrib/sendmail/cf/cf/s2k-ultrix4.mc stable/7/contrib/sendmail/cf/cf/submit.cf stable/7/contrib/sendmail/cf/cf/submit.mc stable/7/contrib/sendmail/cf/cf/tcpproto.mc stable/7/contrib/sendmail/cf/cf/ucbarpa.mc stable/7/contrib/sendmail/cf/cf/ucbvax.mc stable/7/contrib/sendmail/cf/cf/uucpproto.mc stable/7/contrib/sendmail/cf/cf/vangogh.cs.mc stable/7/contrib/sendmail/cf/domain/Berkeley.EDU.m4 stable/7/contrib/sendmail/cf/domain/CS.Berkeley.EDU.m4 stable/7/contrib/sendmail/cf/domain/EECS.Berkeley.EDU.m4 stable/7/contrib/sendmail/cf/domain/S2K.Berkeley.EDU.m4 stable/7/contrib/sendmail/cf/domain/berkeley-only.m4 stable/7/contrib/sendmail/cf/domain/generic.m4 stable/7/contrib/sendmail/cf/feature/accept_unqualified_senders.m4 stable/7/contrib/sendmail/cf/feature/accept_unresolvable_domains.m4 stable/7/contrib/sendmail/cf/feature/access_db.m4 stable/7/contrib/sendmail/cf/feature/allmasquerade.m4 stable/7/contrib/sendmail/cf/feature/always_add_domain.m4 stable/7/contrib/sendmail/cf/feature/authinfo.m4 stable/7/contrib/sendmail/cf/feature/badmx.m4 stable/7/contrib/sendmail/cf/feature/bestmx_is_local.m4 stable/7/contrib/sendmail/cf/feature/bitdomain.m4 stable/7/contrib/sendmail/cf/feature/blacklist_recipients.m4 stable/7/contrib/sendmail/cf/feature/block_bad_helo.m4 stable/7/contrib/sendmail/cf/feature/compat_check.m4 stable/7/contrib/sendmail/cf/feature/conncontrol.m4 stable/7/contrib/sendmail/cf/feature/delay_checks.m4 stable/7/contrib/sendmail/cf/feature/dnsbl.m4 stable/7/contrib/sendmail/cf/feature/domaintable.m4 stable/7/contrib/sendmail/cf/feature/enhdnsbl.m4 stable/7/contrib/sendmail/cf/feature/generics_entire_domain.m4 stable/7/contrib/sendmail/cf/feature/genericstable.m4 stable/7/contrib/sendmail/cf/feature/greet_pause.m4 stable/7/contrib/sendmail/cf/feature/ldap_routing.m4 stable/7/contrib/sendmail/cf/feature/limited_masquerade.m4 stable/7/contrib/sendmail/cf/feature/local_lmtp.m4 stable/7/contrib/sendmail/cf/feature/local_no_masquerade.m4 stable/7/contrib/sendmail/cf/feature/local_procmail.m4 stable/7/contrib/sendmail/cf/feature/lookupdotdomain.m4 stable/7/contrib/sendmail/cf/feature/loose_relay_check.m4 stable/7/contrib/sendmail/cf/feature/mailertable.m4 stable/7/contrib/sendmail/cf/feature/masquerade_entire_domain.m4 stable/7/contrib/sendmail/cf/feature/masquerade_envelope.m4 stable/7/contrib/sendmail/cf/feature/msp.m4 stable/7/contrib/sendmail/cf/feature/mtamark.m4 stable/7/contrib/sendmail/cf/feature/no_default_msa.m4 stable/7/contrib/sendmail/cf/feature/nocanonify.m4 stable/7/contrib/sendmail/cf/feature/notsticky.m4 stable/7/contrib/sendmail/cf/feature/nouucp.m4 stable/7/contrib/sendmail/cf/feature/nullclient.m4 stable/7/contrib/sendmail/cf/feature/preserve_local_plus_detail.m4 stable/7/contrib/sendmail/cf/feature/preserve_luser_host.m4 stable/7/contrib/sendmail/cf/feature/promiscuous_relay.m4 stable/7/contrib/sendmail/cf/feature/queuegroup.m4 stable/7/contrib/sendmail/cf/feature/ratecontrol.m4 stable/7/contrib/sendmail/cf/feature/redirect.m4 stable/7/contrib/sendmail/cf/feature/relay_based_on_MX.m4 stable/7/contrib/sendmail/cf/feature/relay_entire_domain.m4 stable/7/contrib/sendmail/cf/feature/relay_hosts_only.m4 stable/7/contrib/sendmail/cf/feature/relay_local_from.m4 stable/7/contrib/sendmail/cf/feature/relay_mail_from.m4 stable/7/contrib/sendmail/cf/feature/require_rdns.m4 stable/7/contrib/sendmail/cf/feature/smrsh.m4 stable/7/contrib/sendmail/cf/feature/stickyhost.m4 stable/7/contrib/sendmail/cf/feature/use_client_ptr.m4 stable/7/contrib/sendmail/cf/feature/use_ct_file.m4 stable/7/contrib/sendmail/cf/feature/use_cw_file.m4 stable/7/contrib/sendmail/cf/feature/uucpdomain.m4 stable/7/contrib/sendmail/cf/feature/virtuser_entire_domain.m4 stable/7/contrib/sendmail/cf/feature/virtusertable.m4 stable/7/contrib/sendmail/cf/hack/cssubdomain.m4 stable/7/contrib/sendmail/cf/m4/cf.m4 stable/7/contrib/sendmail/cf/m4/cfhead.m4 stable/7/contrib/sendmail/cf/m4/proto.m4 stable/7/contrib/sendmail/cf/m4/version.m4 stable/7/contrib/sendmail/cf/mailer/cyrus.m4 stable/7/contrib/sendmail/cf/mailer/cyrusv2.m4 stable/7/contrib/sendmail/cf/mailer/fax.m4 stable/7/contrib/sendmail/cf/mailer/local.m4 stable/7/contrib/sendmail/cf/mailer/mail11.m4 stable/7/contrib/sendmail/cf/mailer/phquery.m4 stable/7/contrib/sendmail/cf/mailer/pop.m4 stable/7/contrib/sendmail/cf/mailer/procmail.m4 stable/7/contrib/sendmail/cf/mailer/qpage.m4 stable/7/contrib/sendmail/cf/mailer/smtp.m4 stable/7/contrib/sendmail/cf/mailer/usenet.m4 stable/7/contrib/sendmail/cf/mailer/uucp.m4 stable/7/contrib/sendmail/cf/ostype/a-ux.m4 stable/7/contrib/sendmail/cf/ostype/aix3.m4 stable/7/contrib/sendmail/cf/ostype/aix4.m4 stable/7/contrib/sendmail/cf/ostype/aix5.m4 stable/7/contrib/sendmail/cf/ostype/altos.m4 stable/7/contrib/sendmail/cf/ostype/amdahl-uts.m4 stable/7/contrib/sendmail/cf/ostype/bsd4.3.m4 stable/7/contrib/sendmail/cf/ostype/bsd4.4.m4 stable/7/contrib/sendmail/cf/ostype/bsdi.m4 stable/7/contrib/sendmail/cf/ostype/bsdi1.0.m4 stable/7/contrib/sendmail/cf/ostype/bsdi2.0.m4 stable/7/contrib/sendmail/cf/ostype/darwin.m4 stable/7/contrib/sendmail/cf/ostype/dgux.m4 stable/7/contrib/sendmail/cf/ostype/domainos.m4 stable/7/contrib/sendmail/cf/ostype/dragonfly.m4 stable/7/contrib/sendmail/cf/ostype/dynix3.2.m4 stable/7/contrib/sendmail/cf/ostype/freebsd4.m4 stable/7/contrib/sendmail/cf/ostype/freebsd5.m4 stable/7/contrib/sendmail/cf/ostype/freebsd6.m4 stable/7/contrib/sendmail/cf/ostype/gnu.m4 stable/7/contrib/sendmail/cf/ostype/hpux10.m4 stable/7/contrib/sendmail/cf/ostype/hpux11.m4 stable/7/contrib/sendmail/cf/ostype/hpux9.m4 stable/7/contrib/sendmail/cf/ostype/irix4.m4 stable/7/contrib/sendmail/cf/ostype/irix5.m4 stable/7/contrib/sendmail/cf/ostype/irix6.m4 stable/7/contrib/sendmail/cf/ostype/isc4.1.m4 stable/7/contrib/sendmail/cf/ostype/linux.m4 stable/7/contrib/sendmail/cf/ostype/maxion.m4 stable/7/contrib/sendmail/cf/ostype/mklinux.m4 stable/7/contrib/sendmail/cf/ostype/mpeix.m4 stable/7/contrib/sendmail/cf/ostype/nextstep.m4 stable/7/contrib/sendmail/cf/ostype/openbsd.m4 stable/7/contrib/sendmail/cf/ostype/osf1.m4 stable/7/contrib/sendmail/cf/ostype/powerux.m4 stable/7/contrib/sendmail/cf/ostype/ptx2.m4 stable/7/contrib/sendmail/cf/ostype/qnx.m4 stable/7/contrib/sendmail/cf/ostype/riscos4.5.m4 stable/7/contrib/sendmail/cf/ostype/sco-uw-2.1.m4 stable/7/contrib/sendmail/cf/ostype/sco3.2.m4 stable/7/contrib/sendmail/cf/ostype/sinix.m4 stable/7/contrib/sendmail/cf/ostype/solaris11.m4 stable/7/contrib/sendmail/cf/ostype/solaris2.m4 stable/7/contrib/sendmail/cf/ostype/solaris2.ml.m4 stable/7/contrib/sendmail/cf/ostype/solaris2.pre5.m4 stable/7/contrib/sendmail/cf/ostype/solaris8.m4 stable/7/contrib/sendmail/cf/ostype/sunos3.5.m4 stable/7/contrib/sendmail/cf/ostype/sunos4.1.m4 stable/7/contrib/sendmail/cf/ostype/svr4.m4 stable/7/contrib/sendmail/cf/ostype/ultrix4.m4 stable/7/contrib/sendmail/cf/ostype/unicos.m4 stable/7/contrib/sendmail/cf/ostype/unicosmk.m4 stable/7/contrib/sendmail/cf/ostype/unicosmp.m4 stable/7/contrib/sendmail/cf/ostype/unixware7.m4 stable/7/contrib/sendmail/cf/ostype/unknown.m4 stable/7/contrib/sendmail/cf/ostype/uxpds.m4 stable/7/contrib/sendmail/cf/sendmail.schema stable/7/contrib/sendmail/cf/sh/makeinfo.sh stable/7/contrib/sendmail/contrib/README stable/7/contrib/sendmail/contrib/bsdi.mc stable/7/contrib/sendmail/contrib/buildvirtuser stable/7/contrib/sendmail/contrib/cidrexpand stable/7/contrib/sendmail/contrib/dnsblaccess.m4 stable/7/contrib/sendmail/contrib/link_hash.sh stable/7/contrib/sendmail/contrib/qtool.8 stable/7/contrib/sendmail/contrib/qtool.pl stable/7/contrib/sendmail/contrib/smcontrol.pl stable/7/contrib/sendmail/contrib/socketmapClient.pl stable/7/contrib/sendmail/contrib/socketmapServer.pl stable/7/contrib/sendmail/doc/op/Makefile stable/7/contrib/sendmail/doc/op/README stable/7/contrib/sendmail/doc/op/op.me stable/7/contrib/sendmail/editmap/Makefile stable/7/contrib/sendmail/editmap/Makefile.m4 stable/7/contrib/sendmail/editmap/editmap.8 stable/7/contrib/sendmail/editmap/editmap.c stable/7/contrib/sendmail/include/libmilter/mfapi.h stable/7/contrib/sendmail/include/libmilter/mfdef.h stable/7/contrib/sendmail/include/libmilter/milter.h stable/7/contrib/sendmail/include/libsmdb/smdb.h stable/7/contrib/sendmail/include/sendmail/mailstats.h stable/7/contrib/sendmail/include/sendmail/pathnames.h stable/7/contrib/sendmail/include/sendmail/sendmail.h stable/7/contrib/sendmail/include/sm/assert.h stable/7/contrib/sendmail/include/sm/bdb.h stable/7/contrib/sendmail/include/sm/bitops.h stable/7/contrib/sendmail/include/sm/cdefs.h stable/7/contrib/sendmail/include/sm/cf.h stable/7/contrib/sendmail/include/sm/clock.h stable/7/contrib/sendmail/include/sm/conf.h stable/7/contrib/sendmail/include/sm/config.h stable/7/contrib/sendmail/include/sm/debug.h stable/7/contrib/sendmail/include/sm/errstring.h stable/7/contrib/sendmail/include/sm/exc.h stable/7/contrib/sendmail/include/sm/fdset.h stable/7/contrib/sendmail/include/sm/gen.h stable/7/contrib/sendmail/include/sm/heap.h stable/7/contrib/sendmail/include/sm/io.h stable/7/contrib/sendmail/include/sm/ldap.h stable/7/contrib/sendmail/include/sm/limits.h stable/7/contrib/sendmail/include/sm/mbdb.h stable/7/contrib/sendmail/include/sm/misc.h stable/7/contrib/sendmail/include/sm/os/sm_os_aix.h stable/7/contrib/sendmail/include/sm/os/sm_os_dragonfly.h stable/7/contrib/sendmail/include/sm/os/sm_os_freebsd.h stable/7/contrib/sendmail/include/sm/os/sm_os_hp.h stable/7/contrib/sendmail/include/sm/os/sm_os_irix.h stable/7/contrib/sendmail/include/sm/os/sm_os_linux.h stable/7/contrib/sendmail/include/sm/os/sm_os_mpeix.h stable/7/contrib/sendmail/include/sm/os/sm_os_next.h stable/7/contrib/sendmail/include/sm/os/sm_os_openbsd.h stable/7/contrib/sendmail/include/sm/os/sm_os_openunix.h stable/7/contrib/sendmail/include/sm/os/sm_os_osf1.h stable/7/contrib/sendmail/include/sm/os/sm_os_qnx.h stable/7/contrib/sendmail/include/sm/os/sm_os_sunos.h stable/7/contrib/sendmail/include/sm/os/sm_os_ultrix.h stable/7/contrib/sendmail/include/sm/os/sm_os_unicos.h stable/7/contrib/sendmail/include/sm/os/sm_os_unicosmk.h stable/7/contrib/sendmail/include/sm/os/sm_os_unicosmp.h stable/7/contrib/sendmail/include/sm/os/sm_os_unixware.h stable/7/contrib/sendmail/include/sm/path.h stable/7/contrib/sendmail/include/sm/rpool.h stable/7/contrib/sendmail/include/sm/sem.h stable/7/contrib/sendmail/include/sm/setjmp.h stable/7/contrib/sendmail/include/sm/shm.h stable/7/contrib/sendmail/include/sm/signal.h stable/7/contrib/sendmail/include/sm/string.h stable/7/contrib/sendmail/include/sm/sysexits.h stable/7/contrib/sendmail/include/sm/tailq.h stable/7/contrib/sendmail/include/sm/test.h stable/7/contrib/sendmail/include/sm/time.h stable/7/contrib/sendmail/include/sm/types.h stable/7/contrib/sendmail/include/sm/varargs.h stable/7/contrib/sendmail/include/sm/xtrap.h stable/7/contrib/sendmail/libmilter/Makefile stable/7/contrib/sendmail/libmilter/Makefile.m4 stable/7/contrib/sendmail/libmilter/README stable/7/contrib/sendmail/libmilter/comm.c stable/7/contrib/sendmail/libmilter/docs/api.html stable/7/contrib/sendmail/libmilter/docs/design.html stable/7/contrib/sendmail/libmilter/docs/index.html stable/7/contrib/sendmail/libmilter/docs/installation.html stable/7/contrib/sendmail/libmilter/docs/other.html stable/7/contrib/sendmail/libmilter/docs/overview.html stable/7/contrib/sendmail/libmilter/docs/sample.html stable/7/contrib/sendmail/libmilter/docs/smfi_addheader.html stable/7/contrib/sendmail/libmilter/docs/smfi_addrcpt.html stable/7/contrib/sendmail/libmilter/docs/smfi_addrcpt_par.html stable/7/contrib/sendmail/libmilter/docs/smfi_chgfrom.html stable/7/contrib/sendmail/libmilter/docs/smfi_chgheader.html stable/7/contrib/sendmail/libmilter/docs/smfi_delrcpt.html stable/7/contrib/sendmail/libmilter/docs/smfi_getpriv.html stable/7/contrib/sendmail/libmilter/docs/smfi_getsymval.html stable/7/contrib/sendmail/libmilter/docs/smfi_insheader.html stable/7/contrib/sendmail/libmilter/docs/smfi_main.html stable/7/contrib/sendmail/libmilter/docs/smfi_opensocket.html stable/7/contrib/sendmail/libmilter/docs/smfi_progress.html stable/7/contrib/sendmail/libmilter/docs/smfi_quarantine.html stable/7/contrib/sendmail/libmilter/docs/smfi_register.html stable/7/contrib/sendmail/libmilter/docs/smfi_replacebody.html stable/7/contrib/sendmail/libmilter/docs/smfi_setbacklog.html stable/7/contrib/sendmail/libmilter/docs/smfi_setconn.html stable/7/contrib/sendmail/libmilter/docs/smfi_setdbg.html stable/7/contrib/sendmail/libmilter/docs/smfi_setmlreply.html stable/7/contrib/sendmail/libmilter/docs/smfi_setpriv.html stable/7/contrib/sendmail/libmilter/docs/smfi_setreply.html stable/7/contrib/sendmail/libmilter/docs/smfi_setsymlist.html stable/7/contrib/sendmail/libmilter/docs/smfi_settimeout.html stable/7/contrib/sendmail/libmilter/docs/smfi_stop.html stable/7/contrib/sendmail/libmilter/docs/smfi_version.html stable/7/contrib/sendmail/libmilter/docs/xxfi_abort.html stable/7/contrib/sendmail/libmilter/docs/xxfi_body.html stable/7/contrib/sendmail/libmilter/docs/xxfi_close.html stable/7/contrib/sendmail/libmilter/docs/xxfi_connect.html stable/7/contrib/sendmail/libmilter/docs/xxfi_data.html stable/7/contrib/sendmail/libmilter/docs/xxfi_envfrom.html stable/7/contrib/sendmail/libmilter/docs/xxfi_envrcpt.html stable/7/contrib/sendmail/libmilter/docs/xxfi_eoh.html stable/7/contrib/sendmail/libmilter/docs/xxfi_eom.html stable/7/contrib/sendmail/libmilter/docs/xxfi_header.html stable/7/contrib/sendmail/libmilter/docs/xxfi_helo.html stable/7/contrib/sendmail/libmilter/docs/xxfi_negotiate.html stable/7/contrib/sendmail/libmilter/docs/xxfi_unknown.html stable/7/contrib/sendmail/libmilter/engine.c stable/7/contrib/sendmail/libmilter/example.c stable/7/contrib/sendmail/libmilter/handler.c stable/7/contrib/sendmail/libmilter/libmilter.h stable/7/contrib/sendmail/libmilter/listener.c stable/7/contrib/sendmail/libmilter/main.c stable/7/contrib/sendmail/libmilter/monitor.c stable/7/contrib/sendmail/libmilter/signal.c stable/7/contrib/sendmail/libmilter/sm_gethost.c stable/7/contrib/sendmail/libmilter/smfi.c stable/7/contrib/sendmail/libmilter/worker.c stable/7/contrib/sendmail/libsm/Makefile stable/7/contrib/sendmail/libsm/Makefile.m4 stable/7/contrib/sendmail/libsm/README stable/7/contrib/sendmail/libsm/assert.c stable/7/contrib/sendmail/libsm/assert.html stable/7/contrib/sendmail/libsm/b-strcmp.c stable/7/contrib/sendmail/libsm/b-strl.c stable/7/contrib/sendmail/libsm/cdefs.html stable/7/contrib/sendmail/libsm/cf.c stable/7/contrib/sendmail/libsm/clock.c stable/7/contrib/sendmail/libsm/clrerr.c stable/7/contrib/sendmail/libsm/config.c stable/7/contrib/sendmail/libsm/debug.c stable/7/contrib/sendmail/libsm/debug.html stable/7/contrib/sendmail/libsm/errstring.c stable/7/contrib/sendmail/libsm/exc.c stable/7/contrib/sendmail/libsm/exc.html stable/7/contrib/sendmail/libsm/fclose.c stable/7/contrib/sendmail/libsm/feof.c stable/7/contrib/sendmail/libsm/ferror.c stable/7/contrib/sendmail/libsm/fflush.c stable/7/contrib/sendmail/libsm/fget.c stable/7/contrib/sendmail/libsm/findfp.c stable/7/contrib/sendmail/libsm/flags.c stable/7/contrib/sendmail/libsm/fopen.c stable/7/contrib/sendmail/libsm/fpos.c stable/7/contrib/sendmail/libsm/fprintf.c stable/7/contrib/sendmail/libsm/fpurge.c stable/7/contrib/sendmail/libsm/fput.c stable/7/contrib/sendmail/libsm/fread.c stable/7/contrib/sendmail/libsm/fscanf.c stable/7/contrib/sendmail/libsm/fseek.c stable/7/contrib/sendmail/libsm/fvwrite.c stable/7/contrib/sendmail/libsm/fvwrite.h stable/7/contrib/sendmail/libsm/fwalk.c stable/7/contrib/sendmail/libsm/fwrite.c stable/7/contrib/sendmail/libsm/gen.html stable/7/contrib/sendmail/libsm/get.c stable/7/contrib/sendmail/libsm/glue.h stable/7/contrib/sendmail/libsm/heap.c stable/7/contrib/sendmail/libsm/heap.html stable/7/contrib/sendmail/libsm/index.html stable/7/contrib/sendmail/libsm/inet6_ntop.c stable/7/contrib/sendmail/libsm/io.html stable/7/contrib/sendmail/libsm/ldap.c stable/7/contrib/sendmail/libsm/local.h stable/7/contrib/sendmail/libsm/makebuf.c stable/7/contrib/sendmail/libsm/match.c stable/7/contrib/sendmail/libsm/mbdb.c stable/7/contrib/sendmail/libsm/memstat.c stable/7/contrib/sendmail/libsm/mpeix.c stable/7/contrib/sendmail/libsm/niprop.c stable/7/contrib/sendmail/libsm/path.c stable/7/contrib/sendmail/libsm/put.c stable/7/contrib/sendmail/libsm/refill.c stable/7/contrib/sendmail/libsm/rewind.c stable/7/contrib/sendmail/libsm/rpool.c stable/7/contrib/sendmail/libsm/rpool.html stable/7/contrib/sendmail/libsm/sem.c stable/7/contrib/sendmail/libsm/setvbuf.c stable/7/contrib/sendmail/libsm/shm.c stable/7/contrib/sendmail/libsm/signal.c stable/7/contrib/sendmail/libsm/smstdio.c stable/7/contrib/sendmail/libsm/snprintf.c stable/7/contrib/sendmail/libsm/sscanf.c stable/7/contrib/sendmail/libsm/stdio.c stable/7/contrib/sendmail/libsm/strcasecmp.c stable/7/contrib/sendmail/libsm/strdup.c stable/7/contrib/sendmail/libsm/strerror.c stable/7/contrib/sendmail/libsm/strexit.c stable/7/contrib/sendmail/libsm/string.c stable/7/contrib/sendmail/libsm/stringf.c stable/7/contrib/sendmail/libsm/strio.c stable/7/contrib/sendmail/libsm/strl.c stable/7/contrib/sendmail/libsm/strrevcmp.c stable/7/contrib/sendmail/libsm/strto.c stable/7/contrib/sendmail/libsm/syslogio.c stable/7/contrib/sendmail/libsm/t-cf.c stable/7/contrib/sendmail/libsm/t-event.c stable/7/contrib/sendmail/libsm/t-exc.c stable/7/contrib/sendmail/libsm/t-fget.c stable/7/contrib/sendmail/libsm/t-float.c stable/7/contrib/sendmail/libsm/t-fopen.c stable/7/contrib/sendmail/libsm/t-heap.c stable/7/contrib/sendmail/libsm/t-inet6_ntop.c stable/7/contrib/sendmail/libsm/t-match.c stable/7/contrib/sendmail/libsm/t-memstat.c stable/7/contrib/sendmail/libsm/t-path.c stable/7/contrib/sendmail/libsm/t-qic.c stable/7/contrib/sendmail/libsm/t-rpool.c stable/7/contrib/sendmail/libsm/t-scanf.c stable/7/contrib/sendmail/libsm/t-sem.c stable/7/contrib/sendmail/libsm/t-shm.c stable/7/contrib/sendmail/libsm/t-smstdio.c stable/7/contrib/sendmail/libsm/t-string.c stable/7/contrib/sendmail/libsm/t-strio.c stable/7/contrib/sendmail/libsm/t-strl.c stable/7/contrib/sendmail/libsm/t-strrevcmp.c stable/7/contrib/sendmail/libsm/t-types.c stable/7/contrib/sendmail/libsm/test.c stable/7/contrib/sendmail/libsm/ungetc.c stable/7/contrib/sendmail/libsm/util.c stable/7/contrib/sendmail/libsm/vasprintf.c stable/7/contrib/sendmail/libsm/vfprintf.c stable/7/contrib/sendmail/libsm/vfscanf.c stable/7/contrib/sendmail/libsm/vprintf.c stable/7/contrib/sendmail/libsm/vsnprintf.c stable/7/contrib/sendmail/libsm/wbuf.c stable/7/contrib/sendmail/libsm/wsetup.c stable/7/contrib/sendmail/libsm/xtrap.c stable/7/contrib/sendmail/libsmdb/Makefile stable/7/contrib/sendmail/libsmdb/Makefile.m4 stable/7/contrib/sendmail/libsmdb/smdb.c stable/7/contrib/sendmail/libsmdb/smdb1.c stable/7/contrib/sendmail/libsmdb/smdb2.c stable/7/contrib/sendmail/libsmdb/smndbm.c stable/7/contrib/sendmail/libsmutil/Makefile stable/7/contrib/sendmail/libsmutil/Makefile.m4 stable/7/contrib/sendmail/libsmutil/cf.c stable/7/contrib/sendmail/libsmutil/debug.c stable/7/contrib/sendmail/libsmutil/err.c stable/7/contrib/sendmail/libsmutil/lockfile.c stable/7/contrib/sendmail/libsmutil/safefile.c stable/7/contrib/sendmail/libsmutil/snprintf.c stable/7/contrib/sendmail/mail.local/Makefile stable/7/contrib/sendmail/mail.local/Makefile.m4 stable/7/contrib/sendmail/mail.local/README stable/7/contrib/sendmail/mail.local/mail.local.8 stable/7/contrib/sendmail/mail.local/mail.local.c stable/7/contrib/sendmail/mailstats/Makefile stable/7/contrib/sendmail/mailstats/Makefile.m4 stable/7/contrib/sendmail/mailstats/mailstats.8 stable/7/contrib/sendmail/mailstats/mailstats.c stable/7/contrib/sendmail/makemap/Makefile stable/7/contrib/sendmail/makemap/Makefile.m4 stable/7/contrib/sendmail/makemap/makemap.8 stable/7/contrib/sendmail/makemap/makemap.c stable/7/contrib/sendmail/praliases/Makefile stable/7/contrib/sendmail/praliases/Makefile.m4 stable/7/contrib/sendmail/praliases/praliases.8 stable/7/contrib/sendmail/praliases/praliases.c stable/7/contrib/sendmail/rmail/Makefile stable/7/contrib/sendmail/rmail/Makefile.m4 stable/7/contrib/sendmail/rmail/rmail.8 stable/7/contrib/sendmail/rmail/rmail.c stable/7/contrib/sendmail/smrsh/Makefile stable/7/contrib/sendmail/smrsh/Makefile.m4 stable/7/contrib/sendmail/smrsh/README stable/7/contrib/sendmail/smrsh/smrsh.8 stable/7/contrib/sendmail/smrsh/smrsh.c stable/7/contrib/sendmail/src/Makefile stable/7/contrib/sendmail/src/Makefile.m4 stable/7/contrib/sendmail/src/README stable/7/contrib/sendmail/src/SECURITY stable/7/contrib/sendmail/src/TRACEFLAGS stable/7/contrib/sendmail/src/TUNING stable/7/contrib/sendmail/src/alias.c stable/7/contrib/sendmail/src/aliases stable/7/contrib/sendmail/src/aliases.5 stable/7/contrib/sendmail/src/arpadate.c stable/7/contrib/sendmail/src/bf.c stable/7/contrib/sendmail/src/bf.h stable/7/contrib/sendmail/src/collect.c stable/7/contrib/sendmail/src/conf.c stable/7/contrib/sendmail/src/conf.h stable/7/contrib/sendmail/src/control.c stable/7/contrib/sendmail/src/convtime.c stable/7/contrib/sendmail/src/daemon.c stable/7/contrib/sendmail/src/daemon.h stable/7/contrib/sendmail/src/deliver.c stable/7/contrib/sendmail/src/domain.c stable/7/contrib/sendmail/src/envelope.c stable/7/contrib/sendmail/src/err.c stable/7/contrib/sendmail/src/headers.c stable/7/contrib/sendmail/src/helpfile stable/7/contrib/sendmail/src/macro.c stable/7/contrib/sendmail/src/mailq.1 stable/7/contrib/sendmail/src/main.c stable/7/contrib/sendmail/src/map.c stable/7/contrib/sendmail/src/map.h stable/7/contrib/sendmail/src/mci.c stable/7/contrib/sendmail/src/milter.c stable/7/contrib/sendmail/src/mime.c stable/7/contrib/sendmail/src/newaliases.1 stable/7/contrib/sendmail/src/parseaddr.c stable/7/contrib/sendmail/src/queue.c stable/7/contrib/sendmail/src/ratectrl.c stable/7/contrib/sendmail/src/readcf.c stable/7/contrib/sendmail/src/recipient.c stable/7/contrib/sendmail/src/sasl.c stable/7/contrib/sendmail/src/savemail.c stable/7/contrib/sendmail/src/sendmail.8 stable/7/contrib/sendmail/src/sendmail.h stable/7/contrib/sendmail/src/sfsasl.c stable/7/contrib/sendmail/src/sfsasl.h stable/7/contrib/sendmail/src/shmticklib.c stable/7/contrib/sendmail/src/sm_resolve.c stable/7/contrib/sendmail/src/sm_resolve.h stable/7/contrib/sendmail/src/srvrsmtp.c stable/7/contrib/sendmail/src/stab.c stable/7/contrib/sendmail/src/stats.c stable/7/contrib/sendmail/src/statusd_shm.h stable/7/contrib/sendmail/src/sysexits.c stable/7/contrib/sendmail/src/timers.c stable/7/contrib/sendmail/src/timers.h stable/7/contrib/sendmail/src/tls.c stable/7/contrib/sendmail/src/trace.c stable/7/contrib/sendmail/src/udb.c stable/7/contrib/sendmail/src/usersmtp.c stable/7/contrib/sendmail/src/util.c stable/7/contrib/sendmail/src/version.c stable/7/contrib/sendmail/test/Makefile stable/7/contrib/sendmail/test/Makefile.m4 stable/7/contrib/sendmail/test/README stable/7/contrib/sendmail/test/Results stable/7/contrib/sendmail/test/t_dropgid.c stable/7/contrib/sendmail/test/t_exclopen.c stable/7/contrib/sendmail/test/t_pathconf.c stable/7/contrib/sendmail/test/t_seteuid.c stable/7/contrib/sendmail/test/t_setgid.c stable/7/contrib/sendmail/test/t_setreuid.c stable/7/contrib/sendmail/test/t_setuid.c stable/7/contrib/sendmail/test/t_snprintf.c stable/7/contrib/sendmail/vacation/Makefile stable/7/contrib/sendmail/vacation/Makefile.m4 stable/7/contrib/sendmail/vacation/vacation.1 stable/7/contrib/sendmail/vacation/vacation.c Directory Properties: stable/7/contrib/sendmail/ (props changed) Modified: stable/7/contrib/sendmail/CACerts ============================================================================== --- stable/7/contrib/sendmail/CACerts Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/CACerts Mon May 26 15:31:26 2014 (r266694) @@ -1,4 +1,4 @@ -# $Id: CACerts,v 8.6 2013/01/18 15:14:17 ca Exp $ +# $Id: CACerts,v 8.6 2013-01-18 15:14:17 ca Exp $ # This file contains some CA certificates that are used to sign the # certificates of mail servers of members of the sendmail consortium # who may reply to questions etc sent to sendmail.org. Modified: stable/7/contrib/sendmail/FAQ ============================================================================== --- stable/7/contrib/sendmail/FAQ Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/FAQ Mon May 26 15:31:26 2014 (r266694) @@ -5,4 +5,4 @@ A plain-text version of the questions on the answers, is posted to comp.mail.sendmail on the 10th and 25th of each month. -$Revision: 8.24 $, Last updated $Date: 1999/02/07 03:21:03 $ +$Revision: 8.24 $, Last updated $Date: 1999-02-07 03:21:03 $ Modified: stable/7/contrib/sendmail/INSTALL ============================================================================== --- stable/7/contrib/sendmail/INSTALL Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/INSTALL Mon May 26 15:31:26 2014 (r266694) @@ -43,4 +43,4 @@ sendmail/SECURITY for more installation in case you are now using a different (and thereby incompatible) version of Berkeley DB. -$Revision: 8.16 $, Last updated $Date: 2007/10/03 21:00:28 $ +$Revision: 8.16 $, Last updated $Date: 2007-10-03 21:00:28 $ Modified: stable/7/contrib/sendmail/KNOWNBUGS ============================================================================== --- stable/7/contrib/sendmail/KNOWNBUGS Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/KNOWNBUGS Mon May 26 15:31:26 2014 (r266694) @@ -266,4 +266,4 @@ Kresolve sequence dnsmx canon be used if set instead of LOCAL_RELAY ($R). This will be fixed in a future version. -$Revision: 8.61 $, Last updated $Date: 2011/04/07 17:48:23 $ +$Revision: 8.61 $, Last updated $Date: 2011-04-07 17:48:23 $ Modified: stable/7/contrib/sendmail/LICENSE ============================================================================== --- stable/7/contrib/sendmail/LICENSE Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/LICENSE Mon May 26 15:31:26 2014 (r266694) @@ -35,7 +35,7 @@ each of the following conditions is met: forth as paragraph 6 below, in the documentation and/or other materials provided with the distribution. For the purposes of binary distribution the "Copyright Notice" refers to the following language: - "Copyright (c) 1998-2013 Proofpoint, Inc. All rights reserved." + "Copyright (c) 1998-2014 Proofpoint, Inc. All rights reserved." 4. Neither the name of Proofpoint, Inc. nor the University of California nor names of their contributors may be used to endorse or promote @@ -78,4 +78,4 @@ each of the following conditions is met: (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -$Revision: 8.22 $, Last updated $Date: 2013/11/23 04:37:36 $, Document 139848.1 +$Revision: 8.23 $, Last updated $Date: 2014-01-26 20:10:01 $, Document 139848.1 Modified: stable/7/contrib/sendmail/Makefile ============================================================================== --- stable/7/contrib/sendmail/Makefile Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/Makefile Mon May 26 15:31:26 2014 (r266694) @@ -1,4 +1,4 @@ -# $Id: Makefile.dist,v 8.15 2001/08/23 20:44:39 ca Exp $ +# $Id: Makefile.dist,v 8.15 2001-08-23 20:44:39 ca Exp $ SHELL= /bin/sh SUBDIRS= libsm libsmutil libsmdb sendmail editmap mail.local \ Modified: stable/7/contrib/sendmail/PGPKEYS ============================================================================== --- stable/7/contrib/sendmail/PGPKEYS Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/PGPKEYS Mon May 26 15:31:26 2014 (r266694) @@ -2613,4 +2613,4 @@ DnF3FZZEzV7oqPwC2jzv/1dD6GFhtgy0cnyoPGUJ =nES8 -----END PGP PUBLIC KEY BLOCK----- -$Revision: 8.46 $, Last updated $Date: 2014/01/18 00:20:24 $ +$Revision: 8.46 $, Last updated $Date: 2014-01-18 00:20:24 $ Modified: stable/7/contrib/sendmail/README ============================================================================== --- stable/7/contrib/sendmail/README Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/README Mon May 26 15:31:26 2014 (r266694) @@ -465,4 +465,4 @@ sendmail Source for the sendmail program test Some test scripts (currently only for compilation aids). vacation Source for the vacation program. NOT PART OF SENDMAIL! -$Revision: 8.96 $, Last updated $Date: 2013/11/22 20:51:01 $ +$Revision: 8.96 $, Last updated $Date: 2013-11-22 20:51:01 $ Modified: stable/7/contrib/sendmail/RELEASE_NOTES ============================================================================== --- stable/7/contrib/sendmail/RELEASE_NOTES Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/RELEASE_NOTES Mon May 26 15:31:26 2014 (r266694) @@ -1,11 +1,20 @@ SENDMAIL RELEASE NOTES - $Id: RELEASE_NOTES,v 8.2043 2014/01/23 20:27:19 ca Exp $ This listing shows the version of the sendmail binary, the version of the sendmail configuration files, the date of release, and a summary of the changes in that release. +8.14.9/8.14.9 2014/05/21 + SECURITY: Properly set the close-on-exec flag for file descriptors + (except stdin, stdout, and stderr) before executing mailers. + Fix a misformed comment in conf.c: "/*" within comment + which may cause a compilation error on some systems. + Problem reported by John Beck of Oracle. + DEVTOOLS: Fix regression in auto-detection of libraries when only + shared libraries are available. Problem reported by + Bryan Costales. + 8.14.8/8.14.8 2014/01/26 Properly initialize all OpenSSL algorithms for versions before OpenSSL 0.9.8o. Without this SHA2 algorithms may not Modified: stable/7/contrib/sendmail/cf/README ============================================================================== --- stable/7/contrib/sendmail/cf/README Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/README Mon May 26 15:31:26 2014 (r266694) @@ -4704,4 +4704,4 @@ M4 DIVERSIONS 8 DNS based blacklists 9 special local rulesets (1 and 2) -$Revision: 8.730 $, Last updated $Date: 2014/01/16 15:55:51 $ +$Revision: 8.730 $, Last updated $Date: 2014-01-16 15:55:51 $ Modified: stable/7/contrib/sendmail/cf/cf/Makefile ============================================================================== --- stable/7/contrib/sendmail/cf/cf/Makefile Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/Makefile Mon May 26 15:31:26 2014 (r266694) @@ -1,7 +1,7 @@ # # Makefile for configuration files. # -# $Id: Makefile,v 8.60 2005/06/14 02:16:34 gshapiro Exp $ +# $Id: Makefile,v 8.60 2005-06-14 02:16:34 gshapiro Exp $ # # Modified: stable/7/contrib/sendmail/cf/cf/README ============================================================================== --- stable/7/contrib/sendmail/cf/cf/README Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/README Mon May 26 15:31:26 2014 (r266694) @@ -31,4 +31,4 @@ The name of the source file for "submit. For more details see Makefile. -$Revision: 1.2 $, Last updated $Date: 2002/02/22 00:33:54 $ +$Revision: 1.2 $, Last updated $Date: 2002-02-22 00:33:54 $ Modified: stable/7/contrib/sendmail/cf/cf/chez.cs.mc ============================================================================== --- stable/7/contrib/sendmail/cf/cf/chez.cs.mc Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/chez.cs.mc Mon May 26 15:31:26 2014 (r266694) @@ -24,7 +24,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: chez.cs.mc,v 8.15 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: chez.cs.mc,v 8.15 2013-11-22 20:51:08 ca Exp $') OSTYPE(bsd4.4)dnl DOMAIN(CS.Berkeley.EDU)dnl define(`LOCAL_RELAY', vangogh.CS.Berkeley.EDU)dnl Modified: stable/7/contrib/sendmail/cf/cf/clientproto.mc ============================================================================== --- stable/7/contrib/sendmail/cf/cf/clientproto.mc Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/clientproto.mc Mon May 26 15:31:26 2014 (r266694) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: clientproto.mc,v 8.17 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: clientproto.mc,v 8.17 2013-11-22 20:51:08 ca Exp $') OSTYPE(unknown) FEATURE(nullclient, mailhost.$m) Modified: stable/7/contrib/sendmail/cf/cf/cs-hpux10.mc ============================================================================== --- stable/7/contrib/sendmail/cf/cf/cs-hpux10.mc Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/cs-hpux10.mc Mon May 26 15:31:26 2014 (r266694) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: cs-hpux10.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: cs-hpux10.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') OSTYPE(hpux10)dnl DOMAIN(CS.Berkeley.EDU)dnl define(`MAIL_HUB', mailspool.CS.Berkeley.EDU)dnl Modified: stable/7/contrib/sendmail/cf/cf/cs-hpux9.mc ============================================================================== --- stable/7/contrib/sendmail/cf/cf/cs-hpux9.mc Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/cs-hpux9.mc Mon May 26 15:31:26 2014 (r266694) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: cs-hpux9.mc,v 8.15 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: cs-hpux9.mc,v 8.15 2013-11-22 20:51:08 ca Exp $') OSTYPE(hpux9)dnl DOMAIN(CS.Berkeley.EDU)dnl define(`MAIL_HUB', mailspool.CS.Berkeley.EDU)dnl Modified: stable/7/contrib/sendmail/cf/cf/cs-osf1.mc ============================================================================== --- stable/7/contrib/sendmail/cf/cf/cs-osf1.mc Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/cs-osf1.mc Mon May 26 15:31:26 2014 (r266694) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: cs-osf1.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: cs-osf1.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') OSTYPE(osf1)dnl DOMAIN(CS.Berkeley.EDU)dnl MAILER(local)dnl Modified: stable/7/contrib/sendmail/cf/cf/cs-solaris2.mc ============================================================================== --- stable/7/contrib/sendmail/cf/cf/cs-solaris2.mc Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/cs-solaris2.mc Mon May 26 15:31:26 2014 (r266694) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: cs-solaris2.mc,v 8.13 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: cs-solaris2.mc,v 8.13 2013-11-22 20:51:08 ca Exp $') OSTYPE(solaris2)dnl DOMAIN(CS.Berkeley.EDU)dnl MAILER(local)dnl Modified: stable/7/contrib/sendmail/cf/cf/cs-sunos4.1.mc ============================================================================== --- stable/7/contrib/sendmail/cf/cf/cs-sunos4.1.mc Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/cs-sunos4.1.mc Mon May 26 15:31:26 2014 (r266694) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: cs-sunos4.1.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: cs-sunos4.1.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') OSTYPE(sunos4.1)dnl DOMAIN(CS.Berkeley.EDU)dnl MAILER(local)dnl Modified: stable/7/contrib/sendmail/cf/cf/cs-ultrix4.mc ============================================================================== --- stable/7/contrib/sendmail/cf/cf/cs-ultrix4.mc Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/cs-ultrix4.mc Mon May 26 15:31:26 2014 (r266694) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: cs-ultrix4.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: cs-ultrix4.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') OSTYPE(ultrix4)dnl DOMAIN(CS.Berkeley.EDU)dnl MAILER(local)dnl Modified: stable/7/contrib/sendmail/cf/cf/cyrusproto.mc ============================================================================== --- stable/7/contrib/sendmail/cf/cf/cyrusproto.mc Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/cyrusproto.mc Mon May 26 15:31:26 2014 (r266694) @@ -27,7 +27,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: cyrusproto.mc,v 8.7 1999/09/07 14:57:10 ca Exp $') +VERSIONID(`$Id: cyrusproto.mc,v 8.7 1999-09-07 14:57:10 ca Exp $') define(`confBIND_OPTS',`-DNSRCH -DEFNAMES') define(`confLOCAL_MAILER', `cyrus') FEATURE(`nocanonify') Modified: stable/7/contrib/sendmail/cf/cf/generic-bsd4.4.mc ============================================================================== --- stable/7/contrib/sendmail/cf/cf/generic-bsd4.4.mc Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/generic-bsd4.4.mc Mon May 26 15:31:26 2014 (r266694) @@ -21,7 +21,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-bsd4.4.mc,v 8.11 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-bsd4.4.mc,v 8.11 2013-11-22 20:51:08 ca Exp $') OSTYPE(bsd4.4)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/7/contrib/sendmail/cf/cf/generic-hpux10.mc ============================================================================== --- stable/7/contrib/sendmail/cf/cf/generic-hpux10.mc Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/generic-hpux10.mc Mon May 26 15:31:26 2014 (r266694) @@ -20,7 +20,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-hpux10.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-hpux10.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') OSTYPE(hpux10)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/7/contrib/sendmail/cf/cf/generic-hpux9.mc ============================================================================== --- stable/7/contrib/sendmail/cf/cf/generic-hpux9.mc Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/generic-hpux9.mc Mon May 26 15:31:26 2014 (r266694) @@ -20,7 +20,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-hpux9.mc,v 8.12 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-hpux9.mc,v 8.12 2013-11-22 20:51:08 ca Exp $') OSTYPE(hpux9)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/7/contrib/sendmail/cf/cf/generic-linux.mc ============================================================================== --- stable/7/contrib/sendmail/cf/cf/generic-linux.mc Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/generic-linux.mc Mon May 26 15:31:26 2014 (r266694) @@ -20,7 +20,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-linux.mc,v 8.2 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-linux.mc,v 8.2 2013-11-22 20:51:08 ca Exp $') OSTYPE(linux)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/7/contrib/sendmail/cf/cf/generic-mpeix.mc ============================================================================== --- stable/7/contrib/sendmail/cf/cf/generic-mpeix.mc Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/generic-mpeix.mc Mon May 26 15:31:26 2014 (r266694) @@ -17,7 +17,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-mpeix.mc,v 8.2 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-mpeix.mc,v 8.2 2013-11-22 20:51:08 ca Exp $') OSTYPE(mpeix)dnl DOMAIN(generic)dnl define(`confFORWARD_PATH', `$z/.forward')dnl Modified: stable/7/contrib/sendmail/cf/cf/generic-nextstep3.3.mc ============================================================================== --- stable/7/contrib/sendmail/cf/cf/generic-nextstep3.3.mc Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/generic-nextstep3.3.mc Mon May 26 15:31:26 2014 (r266694) @@ -20,7 +20,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-nextstep3.3.mc,v 8.11 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-nextstep3.3.mc,v 8.11 2013-11-22 20:51:08 ca Exp $') OSTYPE(nextstep)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/7/contrib/sendmail/cf/cf/generic-osf1.mc ============================================================================== --- stable/7/contrib/sendmail/cf/cf/generic-osf1.mc Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/generic-osf1.mc Mon May 26 15:31:26 2014 (r266694) @@ -20,7 +20,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-osf1.mc,v 8.12 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-osf1.mc,v 8.12 2013-11-22 20:51:08 ca Exp $') OSTYPE(osf1)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/7/contrib/sendmail/cf/cf/generic-solaris.mc ============================================================================== --- stable/7/contrib/sendmail/cf/cf/generic-solaris.mc Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/generic-solaris.mc Mon May 26 15:31:26 2014 (r266694) @@ -22,7 +22,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-solaris.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-solaris.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') OSTYPE(solaris2)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/7/contrib/sendmail/cf/cf/generic-sunos4.1.mc ============================================================================== --- stable/7/contrib/sendmail/cf/cf/generic-sunos4.1.mc Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/generic-sunos4.1.mc Mon May 26 15:31:26 2014 (r266694) @@ -20,7 +20,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-sunos4.1.mc,v 8.12 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-sunos4.1.mc,v 8.12 2013-11-22 20:51:08 ca Exp $') OSTYPE(sunos4.1)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/7/contrib/sendmail/cf/cf/generic-ultrix4.mc ============================================================================== --- stable/7/contrib/sendmail/cf/cf/generic-ultrix4.mc Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/generic-ultrix4.mc Mon May 26 15:31:26 2014 (r266694) @@ -20,7 +20,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-ultrix4.mc,v 8.12 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-ultrix4.mc,v 8.12 2013-11-22 20:51:08 ca Exp $') OSTYPE(ultrix4)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/7/contrib/sendmail/cf/cf/huginn.cs.mc ============================================================================== --- stable/7/contrib/sendmail/cf/cf/huginn.cs.mc Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/huginn.cs.mc Mon May 26 15:31:26 2014 (r266694) @@ -22,7 +22,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: huginn.cs.mc,v 8.16 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: huginn.cs.mc,v 8.16 2013-11-22 20:51:08 ca Exp $') OSTYPE(hpux9)dnl DOMAIN(CS.Berkeley.EDU)dnl MASQUERADE_AS(CS.Berkeley.EDU)dnl Modified: stable/7/contrib/sendmail/cf/cf/knecht.mc ============================================================================== --- stable/7/contrib/sendmail/cf/cf/knecht.mc Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/knecht.mc Mon May 26 15:31:26 2014 (r266694) @@ -19,7 +19,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: knecht.mc,v 8.63 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: knecht.mc,v 8.63 2013-11-22 20:51:08 ca Exp $') OSTYPE(bsd4.4) DOMAIN(generic) Modified: stable/7/contrib/sendmail/cf/cf/mail.cs.mc ============================================================================== --- stable/7/contrib/sendmail/cf/cf/mail.cs.mc Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/mail.cs.mc Mon May 26 15:31:26 2014 (r266694) @@ -22,7 +22,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: mail.cs.mc,v 8.19 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: mail.cs.mc,v 8.19 2013-11-22 20:51:08 ca Exp $') OSTYPE(ultrix4)dnl DOMAIN(Berkeley.EDU)dnl MASQUERADE_AS(CS.Berkeley.EDU)dnl Modified: stable/7/contrib/sendmail/cf/cf/mail.eecs.mc ============================================================================== --- stable/7/contrib/sendmail/cf/cf/mail.eecs.mc Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/mail.eecs.mc Mon May 26 15:31:26 2014 (r266694) @@ -22,7 +22,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: mail.eecs.mc,v 8.19 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: mail.eecs.mc,v 8.19 2013-11-22 20:51:08 ca Exp $') OSTYPE(ultrix4)dnl DOMAIN(EECS.Berkeley.EDU)dnl MASQUERADE_AS(EECS.Berkeley.EDU)dnl Modified: stable/7/contrib/sendmail/cf/cf/mailspool.cs.mc ============================================================================== --- stable/7/contrib/sendmail/cf/cf/mailspool.cs.mc Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/mailspool.cs.mc Mon May 26 15:31:26 2014 (r266694) @@ -24,7 +24,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: mailspool.cs.mc,v 8.13 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: mailspool.cs.mc,v 8.13 2013-11-22 20:51:08 ca Exp $') OSTYPE(sunos4.1)dnl DOMAIN(CS.Berkeley.EDU)dnl MAILER(local)dnl Modified: stable/7/contrib/sendmail/cf/cf/python.cs.mc ============================================================================== --- stable/7/contrib/sendmail/cf/cf/python.cs.mc Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/python.cs.mc Mon May 26 15:31:26 2014 (r266694) @@ -24,7 +24,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: python.cs.mc,v 8.13 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: python.cs.mc,v 8.13 2013-11-22 20:51:08 ca Exp $') OSTYPE(bsd4.4)dnl DOMAIN(CS.Berkeley.EDU)dnl define(`LOCAL_RELAY', vangogh.CS.Berkeley.EDU)dnl Modified: stable/7/contrib/sendmail/cf/cf/s2k-osf1.mc ============================================================================== --- stable/7/contrib/sendmail/cf/cf/s2k-osf1.mc Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/s2k-osf1.mc Mon May 26 15:31:26 2014 (r266694) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: s2k-osf1.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: s2k-osf1.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') OSTYPE(osf1)dnl DOMAIN(S2K.Berkeley.EDU)dnl MAILER(local)dnl Modified: stable/7/contrib/sendmail/cf/cf/s2k-ultrix4.mc ============================================================================== --- stable/7/contrib/sendmail/cf/cf/s2k-ultrix4.mc Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/s2k-ultrix4.mc Mon May 26 15:31:26 2014 (r266694) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: s2k-ultrix4.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: s2k-ultrix4.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') OSTYPE(ultrix4)dnl DOMAIN(S2K.Berkeley.EDU)dnl MAILER(local)dnl Modified: stable/7/contrib/sendmail/cf/cf/submit.cf ============================================================================== --- stable/7/contrib/sendmail/cf/cf/submit.cf Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/submit.cf Mon May 26 15:31:26 2014 (r266694) @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@lab.smi.sendmail.com on Thu Jan 23 12:29:13 PST 2014 -##### in /home/ca/sm8-rel/sm-8.14.8/OpenSource/sendmail-8.14.8/cf/cf +##### built by ca@lab.smi.sendmail.com on Tue May 20 12:12:52 PDT 2014 +##### in /home/ca/sm8.git/sendmail/OpenSource/sendmail-8.14.9/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -27,15 +27,15 @@ ###################################################################### ###################################################################### -##### $Id: cfhead.m4,v 8.122 2013/11/22 20:51:13 ca Exp $ ##### -##### $Id: cf.m4,v 8.33 2013/11/22 20:51:13 ca Exp $ ##### -##### $Id: submit.mc,v 8.15 2013/11/22 20:51:08 ca Exp $ ##### -##### $Id: msp.m4,v 1.34 2013/11/22 20:51:11 ca Exp $ ##### +##### $Id: cfhead.m4,v 8.122 2013-11-22 20:51:13 ca Exp $ ##### +##### $Id: cf.m4,v 8.33 2013-11-22 20:51:13 ca Exp $ ##### +##### $Id: submit.mc,v 8.15 2013-11-22 20:51:08 ca Exp $ ##### +##### $Id: msp.m4,v 1.34 2013-11-22 20:51:11 ca Exp $ ##### -##### $Id: no_default_msa.m4,v 8.3 2013/11/22 20:51:11 ca Exp $ ##### +##### $Id: no_default_msa.m4,v 8.3 2013-11-22 20:51:11 ca Exp $ ##### -##### $Id: proto.m4,v 8.762 2013/11/22 20:51:13 ca Exp $ ##### +##### $Id: proto.m4,v 8.762 2013-11-22 20:51:13 ca Exp $ ##### # level 10 config file format V10/Berkeley @@ -114,7 +114,7 @@ D{MTAHost}[127.0.0.1] # Configuration version number -DZ8.14.8/Submit +DZ8.14.9/Submit ############### @@ -1299,7 +1299,7 @@ R$* $#relay $@ ${MTAHost} $: $1 < @ $j ### Local and Program Mailer specification ### ################################################## -##### $Id: local.m4,v 8.60 2013/11/22 20:51:14 ca Exp $ ##### +##### $Id: local.m4,v 8.60 2013-11-22 20:51:14 ca Exp $ ##### # # Envelope sender rewriting @@ -1351,7 +1351,7 @@ Mprog, P=[IPC], F=lmDFMuXk5, S=EnvFromL ### SMTP Mailer specification ### ##################################### -##### $Id: smtp.m4,v 8.66 2013/11/22 20:51:14 ca Exp $ ##### +##### $Id: smtp.m4,v 8.66 2013-11-22 20:51:14 ca Exp $ ##### # # common sender and masquerading recipient rewriting @@ -1457,7 +1457,7 @@ Mrelay, P=[IPC], F=mDFMuXa8k, S=EnvFrom # # # # divert(0)dnl -# VERSIONID(`$Id: submit.mc,v 8.15 2013/11/22 20:51:08 ca Exp $') +# VERSIONID(`$Id: submit.mc,v 8.15 2013-11-22 20:51:08 ca Exp $') # define(`confCF_VERSION', `Submit')dnl # define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from complaining # define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet Modified: stable/7/contrib/sendmail/cf/cf/submit.mc ============================================================================== --- stable/7/contrib/sendmail/cf/cf/submit.mc Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/submit.mc Mon May 26 15:31:26 2014 (r266694) @@ -15,7 +15,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: submit.mc,v 8.15 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: submit.mc,v 8.15 2013-11-22 20:51:08 ca Exp $') define(`confCF_VERSION', `Submit')dnl define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from complaining define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet Modified: stable/7/contrib/sendmail/cf/cf/tcpproto.mc ============================================================================== --- stable/7/contrib/sendmail/cf/cf/tcpproto.mc Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/tcpproto.mc Mon May 26 15:31:26 2014 (r266694) @@ -26,7 +26,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: tcpproto.mc,v 8.15 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: tcpproto.mc,v 8.15 2013-11-22 20:51:08 ca Exp $') OSTYPE(`unknown') FEATURE(`nouucp', `reject') MAILER(`local') Modified: stable/7/contrib/sendmail/cf/cf/ucbarpa.mc ============================================================================== --- stable/7/contrib/sendmail/cf/cf/ucbarpa.mc Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/ucbarpa.mc Mon May 26 15:31:26 2014 (r266694) @@ -21,7 +21,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: ucbarpa.mc,v 8.13 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: ucbarpa.mc,v 8.13 2013-11-22 20:51:08 ca Exp $') DOMAIN(CS.Berkeley.EDU)dnl OSTYPE(bsd4.4)dnl MAILER(local)dnl Modified: stable/7/contrib/sendmail/cf/cf/ucbvax.mc ============================================================================== --- stable/7/contrib/sendmail/cf/cf/ucbvax.mc Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/ucbvax.mc Mon May 26 15:31:26 2014 (r266694) @@ -22,7 +22,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: ucbvax.mc,v 8.15 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: ucbvax.mc,v 8.15 2013-11-22 20:51:08 ca Exp $') OSTYPE(bsd4.3) DOMAIN(CS.Berkeley.EDU) MASQUERADE_AS(CS.Berkeley.EDU) Modified: stable/7/contrib/sendmail/cf/cf/uucpproto.mc ============================================================================== --- stable/7/contrib/sendmail/cf/cf/uucpproto.mc Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/uucpproto.mc Mon May 26 15:31:26 2014 (r266694) @@ -26,7 +26,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: uucpproto.mc,v 8.16 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: uucpproto.mc,v 8.16 2013-11-22 20:51:08 ca Exp $') OSTYPE(unknown) FEATURE(promiscuous_relay)dnl FEATURE(accept_unresolvable_domains)dnl Modified: stable/7/contrib/sendmail/cf/cf/vangogh.cs.mc ============================================================================== --- stable/7/contrib/sendmail/cf/cf/vangogh.cs.mc Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/cf/vangogh.cs.mc Mon May 26 15:31:26 2014 (r266694) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: vangogh.cs.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: vangogh.cs.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') DOMAIN(CS.Berkeley.EDU)dnl OSTYPE(bsd4.4)dnl MAILER(local)dnl Modified: stable/7/contrib/sendmail/cf/domain/Berkeley.EDU.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/domain/Berkeley.EDU.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/domain/Berkeley.EDU.m4 Mon May 26 15:31:26 2014 (r266694) @@ -12,7 +12,7 @@ divert(-1) # # divert(0) -VERSIONID(`$Id: Berkeley.EDU.m4,v 8.18 2013/11/22 20:51:10 ca Exp $') +VERSIONID(`$Id: Berkeley.EDU.m4,v 8.18 2013-11-22 20:51:10 ca Exp $') DOMAIN(berkeley-only)dnl define(`BITNET_RELAY', `bitnet-relay.Berkeley.EDU')dnl define(`UUCP_RELAY', `uucp-relay.Berkeley.EDU')dnl Modified: stable/7/contrib/sendmail/cf/domain/CS.Berkeley.EDU.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/domain/CS.Berkeley.EDU.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/domain/CS.Berkeley.EDU.m4 Mon May 26 15:31:26 2014 (r266694) @@ -12,7 +12,7 @@ divert(-1) # # divert(0) -VERSIONID(`$Id: CS.Berkeley.EDU.m4,v 8.11 2013/11/22 20:51:10 ca Exp $') +VERSIONID(`$Id: CS.Berkeley.EDU.m4,v 8.11 2013-11-22 20:51:10 ca Exp $') DOMAIN(Berkeley.EDU)dnl HACK(cssubdomain)dnl define(`confUSERDB_SPEC', Modified: stable/7/contrib/sendmail/cf/domain/EECS.Berkeley.EDU.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/domain/EECS.Berkeley.EDU.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/domain/EECS.Berkeley.EDU.m4 Mon May 26 15:31:26 2014 (r266694) @@ -12,6 +12,6 @@ divert(-1) # # divert(0) -VERSIONID(`$Id: EECS.Berkeley.EDU.m4,v 8.11 2013/11/22 20:51:10 ca Exp $') +VERSIONID(`$Id: EECS.Berkeley.EDU.m4,v 8.11 2013-11-22 20:51:10 ca Exp $') DOMAIN(Berkeley.EDU)dnl MASQUERADE_AS(EECS.Berkeley.EDU)dnl Modified: stable/7/contrib/sendmail/cf/domain/S2K.Berkeley.EDU.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/domain/S2K.Berkeley.EDU.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/domain/S2K.Berkeley.EDU.m4 Mon May 26 15:31:26 2014 (r266694) @@ -12,6 +12,6 @@ divert(-1) # # divert(0) -VERSIONID(`$Id: S2K.Berkeley.EDU.m4,v 8.11 2013/11/22 20:51:10 ca Exp $') +VERSIONID(`$Id: S2K.Berkeley.EDU.m4,v 8.11 2013-11-22 20:51:10 ca Exp $') DOMAIN(CS.Berkeley.EDU)dnl MASQUERADE_AS(postgres.Berkeley.EDU)dnl Modified: stable/7/contrib/sendmail/cf/domain/berkeley-only.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/domain/berkeley-only.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/domain/berkeley-only.m4 Mon May 26 15:31:26 2014 (r266694) @@ -12,7 +12,7 @@ divert(-1) # # divert(0) -VERSIONID(`$Id: unspecified-domain.m4,v 8.11 2013/11/22 20:51:10 ca Exp $') +VERSIONID(`$Id: unspecified-domain.m4,v 8.11 2013-11-22 20:51:10 ca Exp $') errprint(`*** ERROR: You are trying to use the Berkeley sample configuration') errprint(` files outside of the Computer Science Division at Berkeley.') errprint(` The configuration (.mc) files must be customized to reference') Modified: stable/7/contrib/sendmail/cf/domain/generic.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/domain/generic.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/domain/generic.m4 Mon May 26 15:31:26 2014 (r266694) @@ -20,7 +20,7 @@ divert(-1) # files. # divert(0) -VERSIONID(`$Id: generic.m4,v 8.16 2013/11/22 20:51:10 ca Exp $') +VERSIONID(`$Id: generic.m4,v 8.16 2013-11-22 20:51:10 ca Exp $') define(`confFORWARD_PATH', `$z/.forward.$w+$h:$z/.forward+$h:$z/.forward.$w:$z/.forward')dnl define(`confMAX_HEADERS_LENGTH', `32768')dnl FEATURE(`redirect')dnl Modified: stable/7/contrib/sendmail/cf/feature/accept_unqualified_senders.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/accept_unqualified_senders.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/accept_unqualified_senders.m4 Mon May 26 15:31:26 2014 (r266694) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: accept_unqualified_senders.m4,v 8.7 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: accept_unqualified_senders.m4,v 8.7 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_ACCEPT_UNQUALIFIED_SENDERS_', 1) Modified: stable/7/contrib/sendmail/cf/feature/accept_unresolvable_domains.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/accept_unresolvable_domains.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/accept_unresolvable_domains.m4 Mon May 26 15:31:26 2014 (r266694) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: accept_unresolvable_domains.m4,v 8.11 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: accept_unresolvable_domains.m4,v 8.11 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_ACCEPT_UNRESOLVABLE_DOMAINS_', 1) Modified: stable/7/contrib/sendmail/cf/feature/access_db.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/access_db.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/access_db.m4 Mon May 26 15:31:26 2014 (r266694) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: access_db.m4,v 8.28 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: access_db.m4,v 8.28 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_ACCESS_TABLE_', `') Modified: stable/7/contrib/sendmail/cf/feature/allmasquerade.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/allmasquerade.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/allmasquerade.m4 Mon May 26 15:31:26 2014 (r266694) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: allmasquerade.m4,v 8.14 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: allmasquerade.m4,v 8.14 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_MAILER_local_', Modified: stable/7/contrib/sendmail/cf/feature/always_add_domain.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/always_add_domain.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/always_add_domain.m4 Mon May 26 15:31:26 2014 (r266694) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: always_add_domain.m4,v 8.12 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: always_add_domain.m4,v 8.12 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_MAILER_local_', Modified: stable/7/contrib/sendmail/cf/feature/authinfo.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/authinfo.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/authinfo.m4 Mon May 26 15:31:26 2014 (r266694) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: authinfo.m4,v 1.10 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: authinfo.m4,v 1.10 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_AUTHINFO_TABLE_', `') Modified: stable/7/contrib/sendmail/cf/feature/badmx.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/badmx.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/badmx.m4 Mon May 26 15:31:26 2014 (r266694) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: badmx.m4,v 1.2 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: badmx.m4,v 1.2 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_BADMX_CHK_', 1) Modified: stable/7/contrib/sendmail/cf/feature/bestmx_is_local.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/bestmx_is_local.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/bestmx_is_local.m4 Mon May 26 15:31:26 2014 (r266694) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: bestmx_is_local.m4,v 8.27 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: bestmx_is_local.m4,v 8.27 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_BESTMX_IS_LOCAL_', _ARG_) Modified: stable/7/contrib/sendmail/cf/feature/bitdomain.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/bitdomain.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/bitdomain.m4 Mon May 26 15:31:26 2014 (r266694) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: bitdomain.m4,v 8.31 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: bitdomain.m4,v 8.31 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_BITDOMAIN_TABLE_', `') Modified: stable/7/contrib/sendmail/cf/feature/blacklist_recipients.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/blacklist_recipients.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/blacklist_recipients.m4 Mon May 26 15:31:26 2014 (r266694) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: blacklist_recipients.m4,v 8.14 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: blacklist_recipients.m4,v 8.14 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_ACCESS_TABLE_', Modified: stable/7/contrib/sendmail/cf/feature/block_bad_helo.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/block_bad_helo.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/block_bad_helo.m4 Mon May 26 15:31:26 2014 (r266694) @@ -10,7 +10,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: block_bad_helo.m4,v 1.2 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: block_bad_helo.m4,v 1.2 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_BLOCK_BAD_HELO_', `')dnl Modified: stable/7/contrib/sendmail/cf/feature/compat_check.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/compat_check.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/compat_check.m4 Mon May 26 15:31:26 2014 (r266694) @@ -9,7 +9,7 @@ divert(-1) # # divert(0) -VERSIONID(`$Id: compat_check.m4,v 1.5 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: compat_check.m4,v 1.5 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_ACCESS_TABLE_', `', `errprint(`FEATURE(`compat_check') requires FEATURE(`access_db') Modified: stable/7/contrib/sendmail/cf/feature/conncontrol.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/conncontrol.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/conncontrol.m4 Mon May 26 15:31:26 2014 (r266694) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: conncontrol.m4,v 1.5 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: conncontrol.m4,v 1.5 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_ACCESS_TABLE_', ` Modified: stable/7/contrib/sendmail/cf/feature/delay_checks.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/delay_checks.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/delay_checks.m4 Mon May 26 15:31:26 2014 (r266694) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: delay_checks.m4,v 8.9 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: delay_checks.m4,v 8.9 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_DELAY_CHECKS_', 1) Modified: stable/7/contrib/sendmail/cf/feature/dnsbl.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/dnsbl.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/dnsbl.m4 Mon May 26 15:31:26 2014 (r266694) @@ -12,7 +12,7 @@ divert(-1) ifdef(`DNSBL_MAP', `', `define(`DNSBL_MAP', `dns -R A')') divert(0) ifdef(`_DNSBL_R_',`dnl',`dnl -VERSIONID(`$Id: dnsbl.m4,v 8.34 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: dnsbl.m4,v 8.34 2013-11-22 20:51:11 ca Exp $') define(`_DNSBL_R_',`') ifelse(defn(`_ARG_'), `', `errprint(`*** ERROR: missing argument for FEATURE(`dnsbl')')') Modified: stable/7/contrib/sendmail/cf/feature/domaintable.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/domaintable.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/domaintable.m4 Mon May 26 15:31:26 2014 (r266694) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: domaintable.m4,v 8.25 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: domaintable.m4,v 8.25 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_DOMAIN_TABLE_', `') Modified: stable/7/contrib/sendmail/cf/feature/enhdnsbl.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/enhdnsbl.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/enhdnsbl.m4 Mon May 26 15:31:26 2014 (r266694) @@ -13,7 +13,7 @@ ifelse(defn(`_ARG_'), `', `errprint(`*** ERROR: missing argument for FEATURE(`enhdnsbl')')') divert(0) ifdef(`_EDNSBL_R_',`dnl',`dnl -VERSIONID(`$Id: enhdnsbl.m4,v 1.13 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: enhdnsbl.m4,v 1.13 2013-11-22 20:51:11 ca Exp $') LOCAL_CONFIG define(`_EDNSBL_R_',`')dnl # map for enhanced DNS based blacklist lookups Modified: stable/7/contrib/sendmail/cf/feature/generics_entire_domain.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/generics_entire_domain.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/generics_entire_domain.m4 Mon May 26 15:31:26 2014 (r266694) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: generics_entire_domain.m4,v 8.2 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: generics_entire_domain.m4,v 8.2 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_GENERICS_ENTIRE_DOMAIN_', 1) Modified: stable/7/contrib/sendmail/cf/feature/genericstable.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/genericstable.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/genericstable.m4 Mon May 26 15:31:26 2014 (r266694) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: genericstable.m4,v 8.24 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: genericstable.m4,v 8.24 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_GENERICS_TABLE_', `') Modified: stable/7/contrib/sendmail/cf/feature/greet_pause.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/greet_pause.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/greet_pause.m4 Mon May 26 15:31:26 2014 (r266694) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: greet_pause.m4,v 1.5 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: greet_pause.m4,v 1.5 2013-11-22 20:51:11 ca Exp $') divert(-1) ifelse(len(X`'_ARG_),`1',`ifdef(`_ACCESS_TABLE_', `', Modified: stable/7/contrib/sendmail/cf/feature/ldap_routing.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/ldap_routing.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/ldap_routing.m4 Mon May 26 15:31:26 2014 (r266694) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: ldap_routing.m4,v 8.21 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: ldap_routing.m4,v 8.21 2013-11-22 20:51:11 ca Exp $') divert(-1) # Check first two arguments. If they aren't set, may need to warn in proto.m4 Modified: stable/7/contrib/sendmail/cf/feature/limited_masquerade.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/limited_masquerade.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/limited_masquerade.m4 Mon May 26 15:31:26 2014 (r266694) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: limited_masquerade.m4,v 8.10 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: limited_masquerade.m4,v 8.10 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_LIMITED_MASQUERADE_', 1) Modified: stable/7/contrib/sendmail/cf/feature/local_lmtp.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/local_lmtp.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/local_lmtp.m4 Mon May 26 15:31:26 2014 (r266694) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: local_lmtp.m4,v 8.18 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: local_lmtp.m4,v 8.18 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_MAILER_local_', Modified: stable/7/contrib/sendmail/cf/feature/local_no_masquerade.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/local_no_masquerade.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/local_no_masquerade.m4 Mon May 26 15:31:26 2014 (r266694) @@ -9,7 +9,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: local_no_masquerade.m4,v 1.3 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: local_no_masquerade.m4,v 1.3 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_MAILER_local_', Modified: stable/7/contrib/sendmail/cf/feature/local_procmail.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/local_procmail.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/local_procmail.m4 Mon May 26 15:31:26 2014 (r266694) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: local_procmail.m4,v 8.23 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: local_procmail.m4,v 8.23 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_MAILER_local_', Modified: stable/7/contrib/sendmail/cf/feature/lookupdotdomain.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/lookupdotdomain.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/lookupdotdomain.m4 Mon May 26 15:31:26 2014 (r266694) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: lookupdotdomain.m4,v 1.2 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: lookupdotdomain.m4,v 1.2 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_ACCESS_TABLE_', Modified: stable/7/contrib/sendmail/cf/feature/loose_relay_check.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/loose_relay_check.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/loose_relay_check.m4 Mon May 26 15:31:26 2014 (r266694) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: loose_relay_check.m4,v 8.7 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: loose_relay_check.m4,v 8.7 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_LOOSE_RELAY_CHECK_', 1) Modified: stable/7/contrib/sendmail/cf/feature/mailertable.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/mailertable.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/mailertable.m4 Mon May 26 15:31:26 2014 (r266694) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: mailertable.m4,v 8.26 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: mailertable.m4,v 8.26 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_MAILER_TABLE_', `') Modified: stable/7/contrib/sendmail/cf/feature/masquerade_entire_domain.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/masquerade_entire_domain.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/masquerade_entire_domain.m4 Mon May 26 15:31:26 2014 (r266694) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: masquerade_entire_domain.m4,v 8.10 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: masquerade_entire_domain.m4,v 8.10 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_MASQUERADE_ENTIRE_DOMAIN_', 1) Modified: stable/7/contrib/sendmail/cf/feature/masquerade_envelope.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/masquerade_envelope.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/masquerade_envelope.m4 Mon May 26 15:31:26 2014 (r266694) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: masquerade_envelope.m4,v 8.10 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: masquerade_envelope.m4,v 8.10 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_MASQUERADE_ENVELOPE_', 1) Modified: stable/7/contrib/sendmail/cf/feature/msp.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/msp.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/msp.m4 Mon May 26 15:31:26 2014 (r266694) @@ -10,7 +10,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: msp.m4,v 1.34 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: msp.m4,v 1.34 2013-11-22 20:51:11 ca Exp $') divert(-1) undefine(`ALIAS_FILE') define(`confDELIVERY_MODE', `i') Modified: stable/7/contrib/sendmail/cf/feature/mtamark.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/mtamark.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/mtamark.m4 Mon May 26 15:31:26 2014 (r266694) @@ -11,7 +11,7 @@ divert(-1) divert(0) ifdef(`_MTAMARK_R',`dnl',`dnl -VERSIONID(`$Id: mtamark.m4,v 1.3 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: mtamark.m4,v 1.3 2013-11-22 20:51:11 ca Exp $') LOCAL_CONFIG define(`_MTAMARK_R',`')dnl # map for MTA mark Modified: stable/7/contrib/sendmail/cf/feature/no_default_msa.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/no_default_msa.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/no_default_msa.m4 Mon May 26 15:31:26 2014 (r266694) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: no_default_msa.m4,v 8.3 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: no_default_msa.m4,v 8.3 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_NO_MSA_', `1') Modified: stable/7/contrib/sendmail/cf/feature/nocanonify.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/nocanonify.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/nocanonify.m4 Mon May 26 15:31:26 2014 (r266694) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: nocanonify.m4,v 8.13 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: nocanonify.m4,v 8.13 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_NO_CANONIFY_', 1) Modified: stable/7/contrib/sendmail/cf/feature/notsticky.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/notsticky.m4 Mon May 26 15:30:27 2014 (r266693) +++ stable/7/contrib/sendmail/cf/feature/notsticky.m4 Mon May 26 15:31:26 2014 (r266694) @@ -13,7 +13,7 @@ divert(-1) # *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Mon May 26 15:35:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF569855; Mon, 26 May 2014 15:35:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBF082F5A; Mon, 26 May 2014 15:35:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4QFZBlP099260; Mon, 26 May 2014 15:35:11 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4QFZB2b099259; Mon, 26 May 2014 15:35:11 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201405261535.s4QFZB2b099259@svn.freebsd.org> From: Gregory Neil Shapiro Date: Mon, 26 May 2014 15:35:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266695 - stable/10/contrib/sendmail X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 15:35:11 -0000 Author: gshapiro Date: Mon May 26 15:35:11 2014 New Revision: 266695 URL: http://svnweb.freebsd.org/changeset/base/266695 Log: MFC: Update for sendmail 8.14.9 import Modified: stable/10/contrib/sendmail/FREEBSD-upgrade Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/sendmail/FREEBSD-upgrade ============================================================================== --- stable/10/contrib/sendmail/FREEBSD-upgrade Mon May 26 15:31:26 2014 (r266694) +++ stable/10/contrib/sendmail/FREEBSD-upgrade Mon May 26 15:35:11 2014 (r266695) @@ -1,6 +1,6 @@ $FreeBSD$ -sendmail 8.14.8 +sendmail 8.14.9 originals can be found at: ftp://ftp.sendmail.org/pub/sendmail/ For the import of sendmail, the following directories were renamed: @@ -97,4 +97,4 @@ infrastructure in FreeBSD: usr.sbin/mailwrapper/Makefile gshapiro@FreeBSD.org -26-January-2014 +21-May-2014 From owner-svn-src-stable@FreeBSD.ORG Mon May 26 15:36:23 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 51882A7E; Mon, 26 May 2014 15:36:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DC932F83; Mon, 26 May 2014 15:36:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4QFaNWl099640; Mon, 26 May 2014 15:36:23 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4QFaNGc099638; Mon, 26 May 2014 15:36:23 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201405261536.s4QFaNGc099638@svn.freebsd.org> From: Gregory Neil Shapiro Date: Mon, 26 May 2014 15:36:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r266696 - stable/8/contrib/sendmail X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 15:36:23 -0000 Author: gshapiro Date: Mon May 26 15:36:22 2014 New Revision: 266696 URL: http://svnweb.freebsd.org/changeset/base/266696 Log: MFC: Update for sendmail 8.14.9 import Modified: stable/8/contrib/sendmail/FREEBSD-upgrade Directory Properties: stable/8/contrib/sendmail/ (props changed) Modified: stable/8/contrib/sendmail/FREEBSD-upgrade ============================================================================== --- stable/8/contrib/sendmail/FREEBSD-upgrade Mon May 26 15:35:11 2014 (r266695) +++ stable/8/contrib/sendmail/FREEBSD-upgrade Mon May 26 15:36:22 2014 (r266696) @@ -1,6 +1,6 @@ $FreeBSD$ -sendmail 8.14.8 +sendmail 8.14.9 originals can be found at: ftp://ftp.sendmail.org/pub/sendmail/ For the import of sendmail, the following directories were renamed: @@ -97,4 +97,4 @@ infrastructure in FreeBSD: usr.sbin/mailwrapper/Makefile gshapiro@FreeBSD.org -26-January-2014 +21-May-2014 From owner-svn-src-stable@FreeBSD.ORG Mon May 26 15:36:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B95CAC88; Mon, 26 May 2014 15:36:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A5BF02F8C; Mon, 26 May 2014 15:36:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4QFavEQ099926; Mon, 26 May 2014 15:36:57 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4QFavDJ099925; Mon, 26 May 2014 15:36:57 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201405261536.s4QFavDJ099925@svn.freebsd.org> From: Gregory Neil Shapiro Date: Mon, 26 May 2014 15:36:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r266697 - stable/7/contrib/sendmail X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 15:36:57 -0000 Author: gshapiro Date: Mon May 26 15:36:57 2014 New Revision: 266697 URL: http://svnweb.freebsd.org/changeset/base/266697 Log: MFC: Update for sendmail 8.14.9 import Modified: stable/7/contrib/sendmail/FREEBSD-upgrade Directory Properties: stable/7/contrib/sendmail/ (props changed) Modified: stable/7/contrib/sendmail/FREEBSD-upgrade ============================================================================== --- stable/7/contrib/sendmail/FREEBSD-upgrade Mon May 26 15:36:22 2014 (r266696) +++ stable/7/contrib/sendmail/FREEBSD-upgrade Mon May 26 15:36:57 2014 (r266697) @@ -1,6 +1,6 @@ $FreeBSD$ -sendmail 8.14.8 +sendmail 8.14.9 originals can be found at: ftp://ftp.sendmail.org/pub/sendmail/ For the import of sendmail, the following directories were renamed: @@ -97,4 +97,4 @@ infrastructure in FreeBSD: usr.sbin/mailwrapper/Makefile gshapiro@FreeBSD.org -26-January-2014 +21-May-2014 From owner-svn-src-stable@FreeBSD.ORG Mon May 26 15:42:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3C9D3D4; Mon, 26 May 2014 15:42:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28EE52079; Mon, 26 May 2014 15:42:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4QFgeJR004970; Mon, 26 May 2014 15:42:40 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4QFgd5g004963; Mon, 26 May 2014 15:42:39 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201405261542.s4QFgd5g004963@svn.freebsd.org> From: Gregory Neil Shapiro Date: Mon, 26 May 2014 15:42:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266698 - stable/10/etc/sendmail X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 15:42:40 -0000 Author: gshapiro Date: Mon May 26 15:42:39 2014 New Revision: 266698 URL: http://svnweb.freebsd.org/changeset/base/266698 Log: MFC: Minor changes to force commit these files so new freebsd*.cf files are built to use the new sendmail-8.14.9/cf tree. Modified: stable/10/etc/sendmail/freebsd.mc stable/10/etc/sendmail/freebsd.submit.mc Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/sendmail/freebsd.mc ============================================================================== --- stable/10/etc/sendmail/freebsd.mc Mon May 26 15:36:57 2014 (r266697) +++ stable/10/etc/sendmail/freebsd.mc Mon May 26 15:42:39 2014 (r266698) @@ -33,7 +33,6 @@ divert(-1) # SUCH DAMAGE. # - # # This is a generic configuration file for FreeBSD 6.X and later systems. # If you want to customize it, copy it to a name appropriate for your Modified: stable/10/etc/sendmail/freebsd.submit.mc ============================================================================== --- stable/10/etc/sendmail/freebsd.submit.mc Mon May 26 15:36:57 2014 (r266697) +++ stable/10/etc/sendmail/freebsd.submit.mc Mon May 26 15:42:39 2014 (r266698) @@ -9,7 +9,6 @@ divert(-1) # # - # # This is the FreeBSD configuration for a set-group-ID sm-msp sendmail # that acts as a initial mail submission program. From owner-svn-src-stable@FreeBSD.ORG Mon May 26 15:46:20 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20F022D9; Mon, 26 May 2014 15:46:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D78020A9; Mon, 26 May 2014 15:46:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4QFkJVt006086; Mon, 26 May 2014 15:46:19 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4QFkJM2006083; Mon, 26 May 2014 15:46:19 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201405261546.s4QFkJM2006083@svn.freebsd.org> From: Gregory Neil Shapiro Date: Mon, 26 May 2014 15:46:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r266699 - stable/8/etc/sendmail X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 15:46:20 -0000 Author: gshapiro Date: Mon May 26 15:46:19 2014 New Revision: 266699 URL: http://svnweb.freebsd.org/changeset/base/266699 Log: MFC: Minor changes to force commit these files so new freebsd*.cf files are built to use the new sendmail-8.14.9/cf tree. Modified: stable/8/etc/sendmail/freebsd.mc stable/8/etc/sendmail/freebsd.submit.mc Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/sendmail/freebsd.mc ============================================================================== --- stable/8/etc/sendmail/freebsd.mc Mon May 26 15:42:39 2014 (r266698) +++ stable/8/etc/sendmail/freebsd.mc Mon May 26 15:46:19 2014 (r266699) @@ -33,7 +33,6 @@ divert(-1) # SUCH DAMAGE. # - # # This is a generic configuration file for FreeBSD 6.X and later systems. # If you want to customize it, copy it to a name appropriate for your Modified: stable/8/etc/sendmail/freebsd.submit.mc ============================================================================== --- stable/8/etc/sendmail/freebsd.submit.mc Mon May 26 15:42:39 2014 (r266698) +++ stable/8/etc/sendmail/freebsd.submit.mc Mon May 26 15:46:19 2014 (r266699) @@ -9,7 +9,6 @@ divert(-1) # # - # # This is the FreeBSD configuration for a set-group-ID sm-msp sendmail # that acts as a initial mail submission program. From owner-svn-src-stable@FreeBSD.ORG Mon May 26 15:47:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AA87F49B; Mon, 26 May 2014 15:47:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96D9220C0; Mon, 26 May 2014 15:47:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4QFlRBD006434; Mon, 26 May 2014 15:47:27 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4QFlRWm006431; Mon, 26 May 2014 15:47:27 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201405261547.s4QFlRWm006431@svn.freebsd.org> From: Gregory Neil Shapiro Date: Mon, 26 May 2014 15:47:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r266700 - stable/7/etc/sendmail X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 15:47:27 -0000 Author: gshapiro Date: Mon May 26 15:47:26 2014 New Revision: 266700 URL: http://svnweb.freebsd.org/changeset/base/266700 Log: MFC: Minor changes to force commit these files so new freebsd*.cf files are built to use the new sendmail-8.14.9/cf tree. Modified: stable/7/etc/sendmail/freebsd.mc stable/7/etc/sendmail/freebsd.submit.mc Directory Properties: stable/7/etc/ (props changed) Modified: stable/7/etc/sendmail/freebsd.mc ============================================================================== --- stable/7/etc/sendmail/freebsd.mc Mon May 26 15:46:19 2014 (r266699) +++ stable/7/etc/sendmail/freebsd.mc Mon May 26 15:47:26 2014 (r266700) @@ -33,7 +33,6 @@ divert(-1) # SUCH DAMAGE. # - # # This is a generic configuration file for FreeBSD 6.X and later systems. # If you want to customize it, copy it to a name appropriate for your Modified: stable/7/etc/sendmail/freebsd.submit.mc ============================================================================== --- stable/7/etc/sendmail/freebsd.submit.mc Mon May 26 15:46:19 2014 (r266699) +++ stable/7/etc/sendmail/freebsd.submit.mc Mon May 26 15:47:26 2014 (r266700) @@ -9,7 +9,6 @@ divert(-1) # # - # # This is the FreeBSD configuration for a set-group-ID sm-msp sendmail # that acts as a initial mail submission program. From owner-svn-src-stable@FreeBSD.ORG Mon May 26 15:53:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67E41B8C; Mon, 26 May 2014 15:53:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A5BB21A7; Mon, 26 May 2014 15:53:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4QFrPYB011204; Mon, 26 May 2014 15:53:25 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4QFrPHY011203; Mon, 26 May 2014 15:53:25 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201405261553.s4QFrPHY011203@svn.freebsd.org> From: Gregory Neil Shapiro Date: Mon, 26 May 2014 15:53:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266701 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 15:53:25 -0000 Author: gshapiro Date: Mon May 26 15:53:24 2014 New Revision: 266701 URL: http://svnweb.freebsd.org/changeset/base/266701 Log: Note merge for sendmail 8.14.9. Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 26 15:47:26 2014 (r266700) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 26 15:53:24 2014 (r266701) @@ -254,6 +254,9 @@ OpenSSH has been updated to version 6.6p1. + Sendmail + has been updated to 8.14.9. + From owner-svn-src-stable@FreeBSD.ORG Mon May 26 16:00:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 09211452; Mon, 26 May 2014 16:00:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E96252255; Mon, 26 May 2014 16:00:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4QG0ZNq014333; Mon, 26 May 2014 16:00:35 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4QG0Za2014332; Mon, 26 May 2014 16:00:35 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201405261600.s4QG0Za2014332@svn.freebsd.org> From: Gregory Neil Shapiro Date: Mon, 26 May 2014 16:00:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r266703 - stable/8/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 16:00:36 -0000 Author: gshapiro Date: Mon May 26 16:00:35 2014 New Revision: 266703 URL: http://svnweb.freebsd.org/changeset/base/266703 Log: Note merge for sendmail 8.14.9. Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 26 15:54:31 2014 (r266702) +++ stable/8/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 26 16:00:35 2014 (r266703) @@ -1191,8 +1191,8 @@ OpenSSL has been updated to version 0.9.8q. - sendmail has - been updated to version 8.14.8. + sendmail has + been updated to version 8.14.9. The timezone database has been updated to the tzdata2010o From owner-svn-src-stable@FreeBSD.ORG Mon May 26 16:01:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39FCC588; Mon, 26 May 2014 16:01:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2664C22DB; Mon, 26 May 2014 16:01:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4QG1k50016854; Mon, 26 May 2014 16:01:46 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4QG1kO8016852; Mon, 26 May 2014 16:01:46 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201405261601.s4QG1kO8016852@svn.freebsd.org> From: Gregory Neil Shapiro Date: Mon, 26 May 2014 16:01:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r266704 - stable/7/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 16:01:46 -0000 Author: gshapiro Date: Mon May 26 16:01:45 2014 New Revision: 266704 URL: http://svnweb.freebsd.org/changeset/base/266704 Log: Note merge for sendmail 8.14.9. Modified: stable/7/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/7/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/7/release/doc/en_US.ISO8859-1/relnotes/article.sgml Mon May 26 16:00:35 2014 (r266703) +++ stable/7/release/doc/en_US.ISO8859-1/relnotes/article.sgml Mon May 26 16:01:45 2014 (r266704) @@ -660,8 +660,8 @@ OpenSSL has been updated to version 0.9.8q. - sendmail has - been updated to version 8.14.8. + sendmail has + been updated to version 8.14.9. The &man.tcsh.1; program has been updated to version 6.17.00. From owner-svn-src-stable@FreeBSD.ORG Mon May 26 20:10:19 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8AA7269F; Mon, 26 May 2014 20:10:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7230D26B7; Mon, 26 May 2014 20:10:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4QKAJFr043006; Mon, 26 May 2014 20:10:19 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4QKA1pu042429; Mon, 26 May 2014 20:10:01 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201405262010.s4QKA1pu042429@svn.freebsd.org> From: Gregory Neil Shapiro Date: Mon, 26 May 2014 20:10:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266711 - in stable/9/contrib/sendmail: . cf cf/cf cf/domain cf/feature cf/hack cf/m4 cf/mailer cf/ostype cf/sh contrib doc/op editmap include/libmilter include/libsmdb include/sendmail... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 20:10:19 -0000 Author: gshapiro Date: Mon May 26 20:10:00 2014 New Revision: 266711 URL: http://svnweb.freebsd.org/changeset/base/266711 Log: MFC: Merge sendmail 8.14.9 Approved by: re (delphij) Modified: stable/9/contrib/sendmail/CACerts stable/9/contrib/sendmail/FAQ stable/9/contrib/sendmail/INSTALL stable/9/contrib/sendmail/KNOWNBUGS stable/9/contrib/sendmail/LICENSE stable/9/contrib/sendmail/Makefile stable/9/contrib/sendmail/PGPKEYS stable/9/contrib/sendmail/README stable/9/contrib/sendmail/RELEASE_NOTES stable/9/contrib/sendmail/cf/README stable/9/contrib/sendmail/cf/cf/Makefile stable/9/contrib/sendmail/cf/cf/README stable/9/contrib/sendmail/cf/cf/chez.cs.mc stable/9/contrib/sendmail/cf/cf/clientproto.mc stable/9/contrib/sendmail/cf/cf/cs-hpux10.mc stable/9/contrib/sendmail/cf/cf/cs-hpux9.mc stable/9/contrib/sendmail/cf/cf/cs-osf1.mc stable/9/contrib/sendmail/cf/cf/cs-solaris2.mc stable/9/contrib/sendmail/cf/cf/cs-sunos4.1.mc stable/9/contrib/sendmail/cf/cf/cs-ultrix4.mc stable/9/contrib/sendmail/cf/cf/cyrusproto.mc stable/9/contrib/sendmail/cf/cf/generic-bsd4.4.mc stable/9/contrib/sendmail/cf/cf/generic-hpux10.mc stable/9/contrib/sendmail/cf/cf/generic-hpux9.mc stable/9/contrib/sendmail/cf/cf/generic-linux.mc stable/9/contrib/sendmail/cf/cf/generic-mpeix.mc stable/9/contrib/sendmail/cf/cf/generic-nextstep3.3.mc stable/9/contrib/sendmail/cf/cf/generic-osf1.mc stable/9/contrib/sendmail/cf/cf/generic-solaris.mc stable/9/contrib/sendmail/cf/cf/generic-sunos4.1.mc stable/9/contrib/sendmail/cf/cf/generic-ultrix4.mc stable/9/contrib/sendmail/cf/cf/huginn.cs.mc stable/9/contrib/sendmail/cf/cf/knecht.mc stable/9/contrib/sendmail/cf/cf/mail.cs.mc stable/9/contrib/sendmail/cf/cf/mail.eecs.mc stable/9/contrib/sendmail/cf/cf/mailspool.cs.mc stable/9/contrib/sendmail/cf/cf/python.cs.mc stable/9/contrib/sendmail/cf/cf/s2k-osf1.mc stable/9/contrib/sendmail/cf/cf/s2k-ultrix4.mc stable/9/contrib/sendmail/cf/cf/submit.cf stable/9/contrib/sendmail/cf/cf/submit.mc stable/9/contrib/sendmail/cf/cf/tcpproto.mc stable/9/contrib/sendmail/cf/cf/ucbarpa.mc stable/9/contrib/sendmail/cf/cf/ucbvax.mc stable/9/contrib/sendmail/cf/cf/uucpproto.mc stable/9/contrib/sendmail/cf/cf/vangogh.cs.mc stable/9/contrib/sendmail/cf/domain/Berkeley.EDU.m4 stable/9/contrib/sendmail/cf/domain/CS.Berkeley.EDU.m4 stable/9/contrib/sendmail/cf/domain/EECS.Berkeley.EDU.m4 stable/9/contrib/sendmail/cf/domain/S2K.Berkeley.EDU.m4 stable/9/contrib/sendmail/cf/domain/berkeley-only.m4 stable/9/contrib/sendmail/cf/domain/generic.m4 stable/9/contrib/sendmail/cf/feature/accept_unqualified_senders.m4 stable/9/contrib/sendmail/cf/feature/accept_unresolvable_domains.m4 stable/9/contrib/sendmail/cf/feature/access_db.m4 stable/9/contrib/sendmail/cf/feature/allmasquerade.m4 stable/9/contrib/sendmail/cf/feature/always_add_domain.m4 stable/9/contrib/sendmail/cf/feature/authinfo.m4 stable/9/contrib/sendmail/cf/feature/badmx.m4 stable/9/contrib/sendmail/cf/feature/bestmx_is_local.m4 stable/9/contrib/sendmail/cf/feature/bitdomain.m4 stable/9/contrib/sendmail/cf/feature/blacklist_recipients.m4 stable/9/contrib/sendmail/cf/feature/block_bad_helo.m4 stable/9/contrib/sendmail/cf/feature/compat_check.m4 stable/9/contrib/sendmail/cf/feature/conncontrol.m4 stable/9/contrib/sendmail/cf/feature/delay_checks.m4 stable/9/contrib/sendmail/cf/feature/dnsbl.m4 stable/9/contrib/sendmail/cf/feature/domaintable.m4 stable/9/contrib/sendmail/cf/feature/enhdnsbl.m4 stable/9/contrib/sendmail/cf/feature/generics_entire_domain.m4 stable/9/contrib/sendmail/cf/feature/genericstable.m4 stable/9/contrib/sendmail/cf/feature/greet_pause.m4 stable/9/contrib/sendmail/cf/feature/ldap_routing.m4 stable/9/contrib/sendmail/cf/feature/limited_masquerade.m4 stable/9/contrib/sendmail/cf/feature/local_lmtp.m4 stable/9/contrib/sendmail/cf/feature/local_no_masquerade.m4 stable/9/contrib/sendmail/cf/feature/local_procmail.m4 stable/9/contrib/sendmail/cf/feature/lookupdotdomain.m4 stable/9/contrib/sendmail/cf/feature/loose_relay_check.m4 stable/9/contrib/sendmail/cf/feature/mailertable.m4 stable/9/contrib/sendmail/cf/feature/masquerade_entire_domain.m4 stable/9/contrib/sendmail/cf/feature/masquerade_envelope.m4 stable/9/contrib/sendmail/cf/feature/msp.m4 stable/9/contrib/sendmail/cf/feature/mtamark.m4 stable/9/contrib/sendmail/cf/feature/no_default_msa.m4 stable/9/contrib/sendmail/cf/feature/nocanonify.m4 stable/9/contrib/sendmail/cf/feature/notsticky.m4 stable/9/contrib/sendmail/cf/feature/nouucp.m4 stable/9/contrib/sendmail/cf/feature/nullclient.m4 stable/9/contrib/sendmail/cf/feature/preserve_local_plus_detail.m4 stable/9/contrib/sendmail/cf/feature/preserve_luser_host.m4 stable/9/contrib/sendmail/cf/feature/promiscuous_relay.m4 stable/9/contrib/sendmail/cf/feature/queuegroup.m4 stable/9/contrib/sendmail/cf/feature/ratecontrol.m4 stable/9/contrib/sendmail/cf/feature/redirect.m4 stable/9/contrib/sendmail/cf/feature/relay_based_on_MX.m4 stable/9/contrib/sendmail/cf/feature/relay_entire_domain.m4 stable/9/contrib/sendmail/cf/feature/relay_hosts_only.m4 stable/9/contrib/sendmail/cf/feature/relay_local_from.m4 stable/9/contrib/sendmail/cf/feature/relay_mail_from.m4 stable/9/contrib/sendmail/cf/feature/require_rdns.m4 stable/9/contrib/sendmail/cf/feature/smrsh.m4 stable/9/contrib/sendmail/cf/feature/stickyhost.m4 stable/9/contrib/sendmail/cf/feature/use_client_ptr.m4 stable/9/contrib/sendmail/cf/feature/use_ct_file.m4 stable/9/contrib/sendmail/cf/feature/use_cw_file.m4 stable/9/contrib/sendmail/cf/feature/uucpdomain.m4 stable/9/contrib/sendmail/cf/feature/virtuser_entire_domain.m4 stable/9/contrib/sendmail/cf/feature/virtusertable.m4 stable/9/contrib/sendmail/cf/hack/cssubdomain.m4 stable/9/contrib/sendmail/cf/m4/cf.m4 stable/9/contrib/sendmail/cf/m4/cfhead.m4 stable/9/contrib/sendmail/cf/m4/proto.m4 stable/9/contrib/sendmail/cf/m4/version.m4 stable/9/contrib/sendmail/cf/mailer/cyrus.m4 stable/9/contrib/sendmail/cf/mailer/cyrusv2.m4 stable/9/contrib/sendmail/cf/mailer/fax.m4 stable/9/contrib/sendmail/cf/mailer/local.m4 stable/9/contrib/sendmail/cf/mailer/mail11.m4 stable/9/contrib/sendmail/cf/mailer/phquery.m4 stable/9/contrib/sendmail/cf/mailer/pop.m4 stable/9/contrib/sendmail/cf/mailer/procmail.m4 stable/9/contrib/sendmail/cf/mailer/qpage.m4 stable/9/contrib/sendmail/cf/mailer/smtp.m4 stable/9/contrib/sendmail/cf/mailer/usenet.m4 stable/9/contrib/sendmail/cf/mailer/uucp.m4 stable/9/contrib/sendmail/cf/ostype/a-ux.m4 stable/9/contrib/sendmail/cf/ostype/aix3.m4 stable/9/contrib/sendmail/cf/ostype/aix4.m4 stable/9/contrib/sendmail/cf/ostype/aix5.m4 stable/9/contrib/sendmail/cf/ostype/altos.m4 stable/9/contrib/sendmail/cf/ostype/amdahl-uts.m4 stable/9/contrib/sendmail/cf/ostype/bsd4.3.m4 stable/9/contrib/sendmail/cf/ostype/bsd4.4.m4 stable/9/contrib/sendmail/cf/ostype/bsdi.m4 stable/9/contrib/sendmail/cf/ostype/bsdi1.0.m4 stable/9/contrib/sendmail/cf/ostype/bsdi2.0.m4 stable/9/contrib/sendmail/cf/ostype/darwin.m4 stable/9/contrib/sendmail/cf/ostype/dgux.m4 stable/9/contrib/sendmail/cf/ostype/domainos.m4 stable/9/contrib/sendmail/cf/ostype/dragonfly.m4 stable/9/contrib/sendmail/cf/ostype/dynix3.2.m4 stable/9/contrib/sendmail/cf/ostype/freebsd4.m4 stable/9/contrib/sendmail/cf/ostype/freebsd5.m4 stable/9/contrib/sendmail/cf/ostype/freebsd6.m4 stable/9/contrib/sendmail/cf/ostype/gnu.m4 stable/9/contrib/sendmail/cf/ostype/hpux10.m4 stable/9/contrib/sendmail/cf/ostype/hpux11.m4 stable/9/contrib/sendmail/cf/ostype/hpux9.m4 stable/9/contrib/sendmail/cf/ostype/irix4.m4 stable/9/contrib/sendmail/cf/ostype/irix5.m4 stable/9/contrib/sendmail/cf/ostype/irix6.m4 stable/9/contrib/sendmail/cf/ostype/isc4.1.m4 stable/9/contrib/sendmail/cf/ostype/linux.m4 stable/9/contrib/sendmail/cf/ostype/maxion.m4 stable/9/contrib/sendmail/cf/ostype/mklinux.m4 stable/9/contrib/sendmail/cf/ostype/mpeix.m4 stable/9/contrib/sendmail/cf/ostype/nextstep.m4 stable/9/contrib/sendmail/cf/ostype/openbsd.m4 stable/9/contrib/sendmail/cf/ostype/osf1.m4 stable/9/contrib/sendmail/cf/ostype/powerux.m4 stable/9/contrib/sendmail/cf/ostype/ptx2.m4 stable/9/contrib/sendmail/cf/ostype/qnx.m4 stable/9/contrib/sendmail/cf/ostype/riscos4.5.m4 stable/9/contrib/sendmail/cf/ostype/sco-uw-2.1.m4 stable/9/contrib/sendmail/cf/ostype/sco3.2.m4 stable/9/contrib/sendmail/cf/ostype/sinix.m4 stable/9/contrib/sendmail/cf/ostype/solaris11.m4 stable/9/contrib/sendmail/cf/ostype/solaris2.m4 stable/9/contrib/sendmail/cf/ostype/solaris2.ml.m4 stable/9/contrib/sendmail/cf/ostype/solaris2.pre5.m4 stable/9/contrib/sendmail/cf/ostype/solaris8.m4 stable/9/contrib/sendmail/cf/ostype/sunos3.5.m4 stable/9/contrib/sendmail/cf/ostype/sunos4.1.m4 stable/9/contrib/sendmail/cf/ostype/svr4.m4 stable/9/contrib/sendmail/cf/ostype/ultrix4.m4 stable/9/contrib/sendmail/cf/ostype/unicos.m4 stable/9/contrib/sendmail/cf/ostype/unicosmk.m4 stable/9/contrib/sendmail/cf/ostype/unicosmp.m4 stable/9/contrib/sendmail/cf/ostype/unixware7.m4 stable/9/contrib/sendmail/cf/ostype/unknown.m4 stable/9/contrib/sendmail/cf/ostype/uxpds.m4 stable/9/contrib/sendmail/cf/sendmail.schema stable/9/contrib/sendmail/cf/sh/makeinfo.sh stable/9/contrib/sendmail/contrib/README stable/9/contrib/sendmail/contrib/bsdi.mc stable/9/contrib/sendmail/contrib/buildvirtuser stable/9/contrib/sendmail/contrib/cidrexpand stable/9/contrib/sendmail/contrib/dnsblaccess.m4 stable/9/contrib/sendmail/contrib/link_hash.sh stable/9/contrib/sendmail/contrib/qtool.8 stable/9/contrib/sendmail/contrib/qtool.pl stable/9/contrib/sendmail/contrib/smcontrol.pl stable/9/contrib/sendmail/contrib/socketmapClient.pl stable/9/contrib/sendmail/contrib/socketmapServer.pl stable/9/contrib/sendmail/doc/op/Makefile stable/9/contrib/sendmail/doc/op/README stable/9/contrib/sendmail/doc/op/op.me stable/9/contrib/sendmail/editmap/Makefile stable/9/contrib/sendmail/editmap/Makefile.m4 stable/9/contrib/sendmail/editmap/editmap.8 stable/9/contrib/sendmail/editmap/editmap.c stable/9/contrib/sendmail/include/libmilter/mfapi.h stable/9/contrib/sendmail/include/libmilter/mfdef.h stable/9/contrib/sendmail/include/libmilter/milter.h stable/9/contrib/sendmail/include/libsmdb/smdb.h stable/9/contrib/sendmail/include/sendmail/mailstats.h stable/9/contrib/sendmail/include/sendmail/pathnames.h stable/9/contrib/sendmail/include/sendmail/sendmail.h stable/9/contrib/sendmail/include/sm/assert.h stable/9/contrib/sendmail/include/sm/bdb.h stable/9/contrib/sendmail/include/sm/bitops.h stable/9/contrib/sendmail/include/sm/cdefs.h stable/9/contrib/sendmail/include/sm/cf.h stable/9/contrib/sendmail/include/sm/clock.h stable/9/contrib/sendmail/include/sm/conf.h stable/9/contrib/sendmail/include/sm/config.h stable/9/contrib/sendmail/include/sm/debug.h stable/9/contrib/sendmail/include/sm/errstring.h stable/9/contrib/sendmail/include/sm/exc.h stable/9/contrib/sendmail/include/sm/fdset.h stable/9/contrib/sendmail/include/sm/gen.h stable/9/contrib/sendmail/include/sm/heap.h stable/9/contrib/sendmail/include/sm/io.h stable/9/contrib/sendmail/include/sm/ldap.h stable/9/contrib/sendmail/include/sm/limits.h stable/9/contrib/sendmail/include/sm/mbdb.h stable/9/contrib/sendmail/include/sm/misc.h stable/9/contrib/sendmail/include/sm/os/sm_os_aix.h stable/9/contrib/sendmail/include/sm/os/sm_os_dragonfly.h stable/9/contrib/sendmail/include/sm/os/sm_os_freebsd.h stable/9/contrib/sendmail/include/sm/os/sm_os_hp.h stable/9/contrib/sendmail/include/sm/os/sm_os_irix.h stable/9/contrib/sendmail/include/sm/os/sm_os_linux.h stable/9/contrib/sendmail/include/sm/os/sm_os_mpeix.h stable/9/contrib/sendmail/include/sm/os/sm_os_next.h stable/9/contrib/sendmail/include/sm/os/sm_os_openbsd.h stable/9/contrib/sendmail/include/sm/os/sm_os_openunix.h stable/9/contrib/sendmail/include/sm/os/sm_os_osf1.h stable/9/contrib/sendmail/include/sm/os/sm_os_qnx.h stable/9/contrib/sendmail/include/sm/os/sm_os_sunos.h stable/9/contrib/sendmail/include/sm/os/sm_os_ultrix.h stable/9/contrib/sendmail/include/sm/os/sm_os_unicos.h stable/9/contrib/sendmail/include/sm/os/sm_os_unicosmk.h stable/9/contrib/sendmail/include/sm/os/sm_os_unicosmp.h stable/9/contrib/sendmail/include/sm/os/sm_os_unixware.h stable/9/contrib/sendmail/include/sm/path.h stable/9/contrib/sendmail/include/sm/rpool.h stable/9/contrib/sendmail/include/sm/sem.h stable/9/contrib/sendmail/include/sm/setjmp.h stable/9/contrib/sendmail/include/sm/shm.h stable/9/contrib/sendmail/include/sm/signal.h stable/9/contrib/sendmail/include/sm/string.h stable/9/contrib/sendmail/include/sm/sysexits.h stable/9/contrib/sendmail/include/sm/tailq.h stable/9/contrib/sendmail/include/sm/test.h stable/9/contrib/sendmail/include/sm/time.h stable/9/contrib/sendmail/include/sm/types.h stable/9/contrib/sendmail/include/sm/varargs.h stable/9/contrib/sendmail/include/sm/xtrap.h stable/9/contrib/sendmail/libmilter/Makefile stable/9/contrib/sendmail/libmilter/Makefile.m4 stable/9/contrib/sendmail/libmilter/README stable/9/contrib/sendmail/libmilter/comm.c stable/9/contrib/sendmail/libmilter/docs/api.html stable/9/contrib/sendmail/libmilter/docs/design.html stable/9/contrib/sendmail/libmilter/docs/index.html stable/9/contrib/sendmail/libmilter/docs/installation.html stable/9/contrib/sendmail/libmilter/docs/other.html stable/9/contrib/sendmail/libmilter/docs/overview.html stable/9/contrib/sendmail/libmilter/docs/sample.html stable/9/contrib/sendmail/libmilter/docs/smfi_addheader.html stable/9/contrib/sendmail/libmilter/docs/smfi_addrcpt.html stable/9/contrib/sendmail/libmilter/docs/smfi_addrcpt_par.html stable/9/contrib/sendmail/libmilter/docs/smfi_chgfrom.html stable/9/contrib/sendmail/libmilter/docs/smfi_chgheader.html stable/9/contrib/sendmail/libmilter/docs/smfi_delrcpt.html stable/9/contrib/sendmail/libmilter/docs/smfi_getpriv.html stable/9/contrib/sendmail/libmilter/docs/smfi_getsymval.html stable/9/contrib/sendmail/libmilter/docs/smfi_insheader.html stable/9/contrib/sendmail/libmilter/docs/smfi_main.html stable/9/contrib/sendmail/libmilter/docs/smfi_opensocket.html stable/9/contrib/sendmail/libmilter/docs/smfi_progress.html stable/9/contrib/sendmail/libmilter/docs/smfi_quarantine.html stable/9/contrib/sendmail/libmilter/docs/smfi_register.html stable/9/contrib/sendmail/libmilter/docs/smfi_replacebody.html stable/9/contrib/sendmail/libmilter/docs/smfi_setbacklog.html stable/9/contrib/sendmail/libmilter/docs/smfi_setconn.html stable/9/contrib/sendmail/libmilter/docs/smfi_setdbg.html stable/9/contrib/sendmail/libmilter/docs/smfi_setmlreply.html stable/9/contrib/sendmail/libmilter/docs/smfi_setpriv.html stable/9/contrib/sendmail/libmilter/docs/smfi_setreply.html stable/9/contrib/sendmail/libmilter/docs/smfi_setsymlist.html stable/9/contrib/sendmail/libmilter/docs/smfi_settimeout.html stable/9/contrib/sendmail/libmilter/docs/smfi_stop.html stable/9/contrib/sendmail/libmilter/docs/smfi_version.html stable/9/contrib/sendmail/libmilter/docs/xxfi_abort.html stable/9/contrib/sendmail/libmilter/docs/xxfi_body.html stable/9/contrib/sendmail/libmilter/docs/xxfi_close.html stable/9/contrib/sendmail/libmilter/docs/xxfi_connect.html stable/9/contrib/sendmail/libmilter/docs/xxfi_data.html stable/9/contrib/sendmail/libmilter/docs/xxfi_envfrom.html stable/9/contrib/sendmail/libmilter/docs/xxfi_envrcpt.html stable/9/contrib/sendmail/libmilter/docs/xxfi_eoh.html stable/9/contrib/sendmail/libmilter/docs/xxfi_eom.html stable/9/contrib/sendmail/libmilter/docs/xxfi_header.html stable/9/contrib/sendmail/libmilter/docs/xxfi_helo.html stable/9/contrib/sendmail/libmilter/docs/xxfi_negotiate.html stable/9/contrib/sendmail/libmilter/docs/xxfi_unknown.html stable/9/contrib/sendmail/libmilter/engine.c stable/9/contrib/sendmail/libmilter/example.c stable/9/contrib/sendmail/libmilter/handler.c stable/9/contrib/sendmail/libmilter/libmilter.h stable/9/contrib/sendmail/libmilter/listener.c stable/9/contrib/sendmail/libmilter/main.c stable/9/contrib/sendmail/libmilter/monitor.c stable/9/contrib/sendmail/libmilter/signal.c stable/9/contrib/sendmail/libmilter/sm_gethost.c stable/9/contrib/sendmail/libmilter/smfi.c stable/9/contrib/sendmail/libmilter/worker.c stable/9/contrib/sendmail/libsm/Makefile stable/9/contrib/sendmail/libsm/Makefile.m4 stable/9/contrib/sendmail/libsm/README stable/9/contrib/sendmail/libsm/assert.c stable/9/contrib/sendmail/libsm/assert.html stable/9/contrib/sendmail/libsm/b-strcmp.c stable/9/contrib/sendmail/libsm/b-strl.c stable/9/contrib/sendmail/libsm/cdefs.html stable/9/contrib/sendmail/libsm/cf.c stable/9/contrib/sendmail/libsm/clock.c stable/9/contrib/sendmail/libsm/clrerr.c stable/9/contrib/sendmail/libsm/config.c stable/9/contrib/sendmail/libsm/debug.c stable/9/contrib/sendmail/libsm/debug.html stable/9/contrib/sendmail/libsm/errstring.c stable/9/contrib/sendmail/libsm/exc.c stable/9/contrib/sendmail/libsm/exc.html stable/9/contrib/sendmail/libsm/fclose.c stable/9/contrib/sendmail/libsm/feof.c stable/9/contrib/sendmail/libsm/ferror.c stable/9/contrib/sendmail/libsm/fflush.c stable/9/contrib/sendmail/libsm/fget.c stable/9/contrib/sendmail/libsm/findfp.c stable/9/contrib/sendmail/libsm/flags.c stable/9/contrib/sendmail/libsm/fopen.c stable/9/contrib/sendmail/libsm/fpos.c stable/9/contrib/sendmail/libsm/fprintf.c stable/9/contrib/sendmail/libsm/fpurge.c stable/9/contrib/sendmail/libsm/fput.c stable/9/contrib/sendmail/libsm/fread.c stable/9/contrib/sendmail/libsm/fscanf.c stable/9/contrib/sendmail/libsm/fseek.c stable/9/contrib/sendmail/libsm/fvwrite.c stable/9/contrib/sendmail/libsm/fvwrite.h stable/9/contrib/sendmail/libsm/fwalk.c stable/9/contrib/sendmail/libsm/fwrite.c stable/9/contrib/sendmail/libsm/gen.html stable/9/contrib/sendmail/libsm/get.c stable/9/contrib/sendmail/libsm/glue.h stable/9/contrib/sendmail/libsm/heap.c stable/9/contrib/sendmail/libsm/heap.html stable/9/contrib/sendmail/libsm/index.html stable/9/contrib/sendmail/libsm/inet6_ntop.c stable/9/contrib/sendmail/libsm/io.html stable/9/contrib/sendmail/libsm/ldap.c stable/9/contrib/sendmail/libsm/local.h stable/9/contrib/sendmail/libsm/makebuf.c stable/9/contrib/sendmail/libsm/match.c stable/9/contrib/sendmail/libsm/mbdb.c stable/9/contrib/sendmail/libsm/memstat.c stable/9/contrib/sendmail/libsm/mpeix.c stable/9/contrib/sendmail/libsm/niprop.c stable/9/contrib/sendmail/libsm/path.c stable/9/contrib/sendmail/libsm/put.c stable/9/contrib/sendmail/libsm/refill.c stable/9/contrib/sendmail/libsm/rewind.c stable/9/contrib/sendmail/libsm/rpool.c stable/9/contrib/sendmail/libsm/rpool.html stable/9/contrib/sendmail/libsm/sem.c stable/9/contrib/sendmail/libsm/setvbuf.c stable/9/contrib/sendmail/libsm/shm.c stable/9/contrib/sendmail/libsm/signal.c stable/9/contrib/sendmail/libsm/smstdio.c stable/9/contrib/sendmail/libsm/snprintf.c stable/9/contrib/sendmail/libsm/sscanf.c stable/9/contrib/sendmail/libsm/stdio.c stable/9/contrib/sendmail/libsm/strcasecmp.c stable/9/contrib/sendmail/libsm/strdup.c stable/9/contrib/sendmail/libsm/strerror.c stable/9/contrib/sendmail/libsm/strexit.c stable/9/contrib/sendmail/libsm/string.c stable/9/contrib/sendmail/libsm/stringf.c stable/9/contrib/sendmail/libsm/strio.c stable/9/contrib/sendmail/libsm/strl.c stable/9/contrib/sendmail/libsm/strrevcmp.c stable/9/contrib/sendmail/libsm/strto.c stable/9/contrib/sendmail/libsm/syslogio.c stable/9/contrib/sendmail/libsm/t-cf.c stable/9/contrib/sendmail/libsm/t-event.c stable/9/contrib/sendmail/libsm/t-exc.c stable/9/contrib/sendmail/libsm/t-fget.c stable/9/contrib/sendmail/libsm/t-float.c stable/9/contrib/sendmail/libsm/t-fopen.c stable/9/contrib/sendmail/libsm/t-heap.c stable/9/contrib/sendmail/libsm/t-inet6_ntop.c stable/9/contrib/sendmail/libsm/t-match.c stable/9/contrib/sendmail/libsm/t-memstat.c stable/9/contrib/sendmail/libsm/t-path.c stable/9/contrib/sendmail/libsm/t-qic.c stable/9/contrib/sendmail/libsm/t-rpool.c stable/9/contrib/sendmail/libsm/t-scanf.c stable/9/contrib/sendmail/libsm/t-sem.c stable/9/contrib/sendmail/libsm/t-shm.c stable/9/contrib/sendmail/libsm/t-smstdio.c stable/9/contrib/sendmail/libsm/t-string.c stable/9/contrib/sendmail/libsm/t-strio.c stable/9/contrib/sendmail/libsm/t-strl.c stable/9/contrib/sendmail/libsm/t-strrevcmp.c stable/9/contrib/sendmail/libsm/t-types.c stable/9/contrib/sendmail/libsm/test.c stable/9/contrib/sendmail/libsm/ungetc.c stable/9/contrib/sendmail/libsm/util.c stable/9/contrib/sendmail/libsm/vasprintf.c stable/9/contrib/sendmail/libsm/vfprintf.c stable/9/contrib/sendmail/libsm/vfscanf.c stable/9/contrib/sendmail/libsm/vprintf.c stable/9/contrib/sendmail/libsm/vsnprintf.c stable/9/contrib/sendmail/libsm/wbuf.c stable/9/contrib/sendmail/libsm/wsetup.c stable/9/contrib/sendmail/libsm/xtrap.c stable/9/contrib/sendmail/libsmdb/Makefile stable/9/contrib/sendmail/libsmdb/Makefile.m4 stable/9/contrib/sendmail/libsmdb/smdb.c stable/9/contrib/sendmail/libsmdb/smdb1.c stable/9/contrib/sendmail/libsmdb/smdb2.c stable/9/contrib/sendmail/libsmdb/smndbm.c stable/9/contrib/sendmail/libsmutil/Makefile stable/9/contrib/sendmail/libsmutil/Makefile.m4 stable/9/contrib/sendmail/libsmutil/cf.c stable/9/contrib/sendmail/libsmutil/debug.c stable/9/contrib/sendmail/libsmutil/err.c stable/9/contrib/sendmail/libsmutil/lockfile.c stable/9/contrib/sendmail/libsmutil/safefile.c stable/9/contrib/sendmail/libsmutil/snprintf.c stable/9/contrib/sendmail/mail.local/Makefile stable/9/contrib/sendmail/mail.local/Makefile.m4 stable/9/contrib/sendmail/mail.local/README stable/9/contrib/sendmail/mail.local/mail.local.8 stable/9/contrib/sendmail/mail.local/mail.local.c stable/9/contrib/sendmail/mailstats/Makefile stable/9/contrib/sendmail/mailstats/Makefile.m4 stable/9/contrib/sendmail/mailstats/mailstats.8 stable/9/contrib/sendmail/mailstats/mailstats.c stable/9/contrib/sendmail/makemap/Makefile stable/9/contrib/sendmail/makemap/Makefile.m4 stable/9/contrib/sendmail/makemap/makemap.8 stable/9/contrib/sendmail/makemap/makemap.c stable/9/contrib/sendmail/praliases/Makefile stable/9/contrib/sendmail/praliases/Makefile.m4 stable/9/contrib/sendmail/praliases/praliases.8 stable/9/contrib/sendmail/praliases/praliases.c stable/9/contrib/sendmail/rmail/Makefile stable/9/contrib/sendmail/rmail/Makefile.m4 stable/9/contrib/sendmail/rmail/rmail.8 stable/9/contrib/sendmail/rmail/rmail.c stable/9/contrib/sendmail/smrsh/Makefile stable/9/contrib/sendmail/smrsh/Makefile.m4 stable/9/contrib/sendmail/smrsh/README stable/9/contrib/sendmail/smrsh/smrsh.8 stable/9/contrib/sendmail/smrsh/smrsh.c stable/9/contrib/sendmail/src/Makefile stable/9/contrib/sendmail/src/Makefile.m4 stable/9/contrib/sendmail/src/README stable/9/contrib/sendmail/src/SECURITY stable/9/contrib/sendmail/src/TRACEFLAGS stable/9/contrib/sendmail/src/TUNING stable/9/contrib/sendmail/src/alias.c stable/9/contrib/sendmail/src/aliases stable/9/contrib/sendmail/src/aliases.5 stable/9/contrib/sendmail/src/arpadate.c stable/9/contrib/sendmail/src/bf.c stable/9/contrib/sendmail/src/bf.h stable/9/contrib/sendmail/src/collect.c stable/9/contrib/sendmail/src/conf.c stable/9/contrib/sendmail/src/conf.h stable/9/contrib/sendmail/src/control.c stable/9/contrib/sendmail/src/convtime.c stable/9/contrib/sendmail/src/daemon.c stable/9/contrib/sendmail/src/daemon.h stable/9/contrib/sendmail/src/deliver.c stable/9/contrib/sendmail/src/domain.c stable/9/contrib/sendmail/src/envelope.c stable/9/contrib/sendmail/src/err.c stable/9/contrib/sendmail/src/headers.c stable/9/contrib/sendmail/src/helpfile stable/9/contrib/sendmail/src/macro.c stable/9/contrib/sendmail/src/mailq.1 stable/9/contrib/sendmail/src/main.c stable/9/contrib/sendmail/src/map.c stable/9/contrib/sendmail/src/map.h stable/9/contrib/sendmail/src/mci.c stable/9/contrib/sendmail/src/milter.c stable/9/contrib/sendmail/src/mime.c stable/9/contrib/sendmail/src/newaliases.1 stable/9/contrib/sendmail/src/parseaddr.c stable/9/contrib/sendmail/src/queue.c stable/9/contrib/sendmail/src/ratectrl.c stable/9/contrib/sendmail/src/readcf.c stable/9/contrib/sendmail/src/recipient.c stable/9/contrib/sendmail/src/sasl.c stable/9/contrib/sendmail/src/savemail.c stable/9/contrib/sendmail/src/sendmail.8 stable/9/contrib/sendmail/src/sendmail.h stable/9/contrib/sendmail/src/sfsasl.c stable/9/contrib/sendmail/src/sfsasl.h stable/9/contrib/sendmail/src/shmticklib.c stable/9/contrib/sendmail/src/sm_resolve.c stable/9/contrib/sendmail/src/sm_resolve.h stable/9/contrib/sendmail/src/srvrsmtp.c stable/9/contrib/sendmail/src/stab.c stable/9/contrib/sendmail/src/stats.c stable/9/contrib/sendmail/src/statusd_shm.h stable/9/contrib/sendmail/src/sysexits.c stable/9/contrib/sendmail/src/timers.c stable/9/contrib/sendmail/src/timers.h stable/9/contrib/sendmail/src/tls.c stable/9/contrib/sendmail/src/trace.c stable/9/contrib/sendmail/src/udb.c stable/9/contrib/sendmail/src/usersmtp.c stable/9/contrib/sendmail/src/util.c stable/9/contrib/sendmail/src/version.c stable/9/contrib/sendmail/test/Makefile stable/9/contrib/sendmail/test/Makefile.m4 stable/9/contrib/sendmail/test/README stable/9/contrib/sendmail/test/Results stable/9/contrib/sendmail/test/t_dropgid.c stable/9/contrib/sendmail/test/t_exclopen.c stable/9/contrib/sendmail/test/t_pathconf.c stable/9/contrib/sendmail/test/t_seteuid.c stable/9/contrib/sendmail/test/t_setgid.c stable/9/contrib/sendmail/test/t_setreuid.c stable/9/contrib/sendmail/test/t_setuid.c stable/9/contrib/sendmail/test/t_snprintf.c stable/9/contrib/sendmail/vacation/Makefile stable/9/contrib/sendmail/vacation/Makefile.m4 stable/9/contrib/sendmail/vacation/vacation.1 stable/9/contrib/sendmail/vacation/vacation.c Directory Properties: stable/9/contrib/sendmail/ (props changed) Modified: stable/9/contrib/sendmail/CACerts ============================================================================== --- stable/9/contrib/sendmail/CACerts Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/CACerts Mon May 26 20:10:00 2014 (r266711) @@ -1,4 +1,4 @@ -# $Id: CACerts,v 8.6 2013/01/18 15:14:17 ca Exp $ +# $Id: CACerts,v 8.6 2013-01-18 15:14:17 ca Exp $ # This file contains some CA certificates that are used to sign the # certificates of mail servers of members of the sendmail consortium # who may reply to questions etc sent to sendmail.org. Modified: stable/9/contrib/sendmail/FAQ ============================================================================== --- stable/9/contrib/sendmail/FAQ Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/FAQ Mon May 26 20:10:00 2014 (r266711) @@ -5,4 +5,4 @@ A plain-text version of the questions on the answers, is posted to comp.mail.sendmail on the 10th and 25th of each month. -$Revision: 8.24 $, Last updated $Date: 1999/02/07 03:21:03 $ +$Revision: 8.24 $, Last updated $Date: 1999-02-07 03:21:03 $ Modified: stable/9/contrib/sendmail/INSTALL ============================================================================== --- stable/9/contrib/sendmail/INSTALL Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/INSTALL Mon May 26 20:10:00 2014 (r266711) @@ -43,4 +43,4 @@ sendmail/SECURITY for more installation in case you are now using a different (and thereby incompatible) version of Berkeley DB. -$Revision: 8.16 $, Last updated $Date: 2007/10/03 21:00:28 $ +$Revision: 8.16 $, Last updated $Date: 2007-10-03 21:00:28 $ Modified: stable/9/contrib/sendmail/KNOWNBUGS ============================================================================== --- stable/9/contrib/sendmail/KNOWNBUGS Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/KNOWNBUGS Mon May 26 20:10:00 2014 (r266711) @@ -266,4 +266,4 @@ Kresolve sequence dnsmx canon be used if set instead of LOCAL_RELAY ($R). This will be fixed in a future version. -$Revision: 8.61 $, Last updated $Date: 2011/04/07 17:48:23 $ +$Revision: 8.61 $, Last updated $Date: 2011-04-07 17:48:23 $ Modified: stable/9/contrib/sendmail/LICENSE ============================================================================== --- stable/9/contrib/sendmail/LICENSE Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/LICENSE Mon May 26 20:10:00 2014 (r266711) @@ -35,7 +35,7 @@ each of the following conditions is met: forth as paragraph 6 below, in the documentation and/or other materials provided with the distribution. For the purposes of binary distribution the "Copyright Notice" refers to the following language: - "Copyright (c) 1998-2013 Proofpoint, Inc. All rights reserved." + "Copyright (c) 1998-2014 Proofpoint, Inc. All rights reserved." 4. Neither the name of Proofpoint, Inc. nor the University of California nor names of their contributors may be used to endorse or promote @@ -78,4 +78,4 @@ each of the following conditions is met: (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -$Revision: 8.22 $, Last updated $Date: 2013/11/23 04:37:36 $, Document 139848.1 +$Revision: 8.23 $, Last updated $Date: 2014-01-26 20:10:01 $, Document 139848.1 Modified: stable/9/contrib/sendmail/Makefile ============================================================================== --- stable/9/contrib/sendmail/Makefile Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/Makefile Mon May 26 20:10:00 2014 (r266711) @@ -1,4 +1,4 @@ -# $Id: Makefile.dist,v 8.15 2001/08/23 20:44:39 ca Exp $ +# $Id: Makefile.dist,v 8.15 2001-08-23 20:44:39 ca Exp $ SHELL= /bin/sh SUBDIRS= libsm libsmutil libsmdb sendmail editmap mail.local \ Modified: stable/9/contrib/sendmail/PGPKEYS ============================================================================== --- stable/9/contrib/sendmail/PGPKEYS Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/PGPKEYS Mon May 26 20:10:00 2014 (r266711) @@ -2613,4 +2613,4 @@ DnF3FZZEzV7oqPwC2jzv/1dD6GFhtgy0cnyoPGUJ =nES8 -----END PGP PUBLIC KEY BLOCK----- -$Revision: 8.46 $, Last updated $Date: 2014/01/18 00:20:24 $ +$Revision: 8.46 $, Last updated $Date: 2014-01-18 00:20:24 $ Modified: stable/9/contrib/sendmail/README ============================================================================== --- stable/9/contrib/sendmail/README Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/README Mon May 26 20:10:00 2014 (r266711) @@ -465,4 +465,4 @@ sendmail Source for the sendmail program test Some test scripts (currently only for compilation aids). vacation Source for the vacation program. NOT PART OF SENDMAIL! -$Revision: 8.96 $, Last updated $Date: 2013/11/22 20:51:01 $ +$Revision: 8.96 $, Last updated $Date: 2013-11-22 20:51:01 $ Modified: stable/9/contrib/sendmail/RELEASE_NOTES ============================================================================== --- stable/9/contrib/sendmail/RELEASE_NOTES Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/RELEASE_NOTES Mon May 26 20:10:00 2014 (r266711) @@ -1,11 +1,20 @@ SENDMAIL RELEASE NOTES - $Id: RELEASE_NOTES,v 8.2043 2014/01/23 20:27:19 ca Exp $ This listing shows the version of the sendmail binary, the version of the sendmail configuration files, the date of release, and a summary of the changes in that release. +8.14.9/8.14.9 2014/05/21 + SECURITY: Properly set the close-on-exec flag for file descriptors + (except stdin, stdout, and stderr) before executing mailers. + Fix a misformed comment in conf.c: "/*" within comment + which may cause a compilation error on some systems. + Problem reported by John Beck of Oracle. + DEVTOOLS: Fix regression in auto-detection of libraries when only + shared libraries are available. Problem reported by + Bryan Costales. + 8.14.8/8.14.8 2014/01/26 Properly initialize all OpenSSL algorithms for versions before OpenSSL 0.9.8o. Without this SHA2 algorithms may not Modified: stable/9/contrib/sendmail/cf/README ============================================================================== --- stable/9/contrib/sendmail/cf/README Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/README Mon May 26 20:10:00 2014 (r266711) @@ -4704,4 +4704,4 @@ M4 DIVERSIONS 8 DNS based blacklists 9 special local rulesets (1 and 2) -$Revision: 8.730 $, Last updated $Date: 2014/01/16 15:55:51 $ +$Revision: 8.730 $, Last updated $Date: 2014-01-16 15:55:51 $ Modified: stable/9/contrib/sendmail/cf/cf/Makefile ============================================================================== --- stable/9/contrib/sendmail/cf/cf/Makefile Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/Makefile Mon May 26 20:10:00 2014 (r266711) @@ -1,7 +1,7 @@ # # Makefile for configuration files. # -# $Id: Makefile,v 8.60 2005/06/14 02:16:34 gshapiro Exp $ +# $Id: Makefile,v 8.60 2005-06-14 02:16:34 gshapiro Exp $ # # Modified: stable/9/contrib/sendmail/cf/cf/README ============================================================================== --- stable/9/contrib/sendmail/cf/cf/README Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/README Mon May 26 20:10:00 2014 (r266711) @@ -31,4 +31,4 @@ The name of the source file for "submit. For more details see Makefile. -$Revision: 1.2 $, Last updated $Date: 2002/02/22 00:33:54 $ +$Revision: 1.2 $, Last updated $Date: 2002-02-22 00:33:54 $ Modified: stable/9/contrib/sendmail/cf/cf/chez.cs.mc ============================================================================== --- stable/9/contrib/sendmail/cf/cf/chez.cs.mc Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/chez.cs.mc Mon May 26 20:10:00 2014 (r266711) @@ -24,7 +24,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: chez.cs.mc,v 8.15 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: chez.cs.mc,v 8.15 2013-11-22 20:51:08 ca Exp $') OSTYPE(bsd4.4)dnl DOMAIN(CS.Berkeley.EDU)dnl define(`LOCAL_RELAY', vangogh.CS.Berkeley.EDU)dnl Modified: stable/9/contrib/sendmail/cf/cf/clientproto.mc ============================================================================== --- stable/9/contrib/sendmail/cf/cf/clientproto.mc Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/clientproto.mc Mon May 26 20:10:00 2014 (r266711) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: clientproto.mc,v 8.17 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: clientproto.mc,v 8.17 2013-11-22 20:51:08 ca Exp $') OSTYPE(unknown) FEATURE(nullclient, mailhost.$m) Modified: stable/9/contrib/sendmail/cf/cf/cs-hpux10.mc ============================================================================== --- stable/9/contrib/sendmail/cf/cf/cs-hpux10.mc Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/cs-hpux10.mc Mon May 26 20:10:00 2014 (r266711) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: cs-hpux10.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: cs-hpux10.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') OSTYPE(hpux10)dnl DOMAIN(CS.Berkeley.EDU)dnl define(`MAIL_HUB', mailspool.CS.Berkeley.EDU)dnl Modified: stable/9/contrib/sendmail/cf/cf/cs-hpux9.mc ============================================================================== --- stable/9/contrib/sendmail/cf/cf/cs-hpux9.mc Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/cs-hpux9.mc Mon May 26 20:10:00 2014 (r266711) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: cs-hpux9.mc,v 8.15 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: cs-hpux9.mc,v 8.15 2013-11-22 20:51:08 ca Exp $') OSTYPE(hpux9)dnl DOMAIN(CS.Berkeley.EDU)dnl define(`MAIL_HUB', mailspool.CS.Berkeley.EDU)dnl Modified: stable/9/contrib/sendmail/cf/cf/cs-osf1.mc ============================================================================== --- stable/9/contrib/sendmail/cf/cf/cs-osf1.mc Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/cs-osf1.mc Mon May 26 20:10:00 2014 (r266711) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: cs-osf1.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: cs-osf1.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') OSTYPE(osf1)dnl DOMAIN(CS.Berkeley.EDU)dnl MAILER(local)dnl Modified: stable/9/contrib/sendmail/cf/cf/cs-solaris2.mc ============================================================================== --- stable/9/contrib/sendmail/cf/cf/cs-solaris2.mc Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/cs-solaris2.mc Mon May 26 20:10:00 2014 (r266711) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: cs-solaris2.mc,v 8.13 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: cs-solaris2.mc,v 8.13 2013-11-22 20:51:08 ca Exp $') OSTYPE(solaris2)dnl DOMAIN(CS.Berkeley.EDU)dnl MAILER(local)dnl Modified: stable/9/contrib/sendmail/cf/cf/cs-sunos4.1.mc ============================================================================== --- stable/9/contrib/sendmail/cf/cf/cs-sunos4.1.mc Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/cs-sunos4.1.mc Mon May 26 20:10:00 2014 (r266711) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: cs-sunos4.1.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: cs-sunos4.1.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') OSTYPE(sunos4.1)dnl DOMAIN(CS.Berkeley.EDU)dnl MAILER(local)dnl Modified: stable/9/contrib/sendmail/cf/cf/cs-ultrix4.mc ============================================================================== --- stable/9/contrib/sendmail/cf/cf/cs-ultrix4.mc Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/cs-ultrix4.mc Mon May 26 20:10:00 2014 (r266711) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: cs-ultrix4.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: cs-ultrix4.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') OSTYPE(ultrix4)dnl DOMAIN(CS.Berkeley.EDU)dnl MAILER(local)dnl Modified: stable/9/contrib/sendmail/cf/cf/cyrusproto.mc ============================================================================== --- stable/9/contrib/sendmail/cf/cf/cyrusproto.mc Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/cyrusproto.mc Mon May 26 20:10:00 2014 (r266711) @@ -27,7 +27,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: cyrusproto.mc,v 8.7 1999/09/07 14:57:10 ca Exp $') +VERSIONID(`$Id: cyrusproto.mc,v 8.7 1999-09-07 14:57:10 ca Exp $') define(`confBIND_OPTS',`-DNSRCH -DEFNAMES') define(`confLOCAL_MAILER', `cyrus') FEATURE(`nocanonify') Modified: stable/9/contrib/sendmail/cf/cf/generic-bsd4.4.mc ============================================================================== --- stable/9/contrib/sendmail/cf/cf/generic-bsd4.4.mc Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/generic-bsd4.4.mc Mon May 26 20:10:00 2014 (r266711) @@ -21,7 +21,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-bsd4.4.mc,v 8.11 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-bsd4.4.mc,v 8.11 2013-11-22 20:51:08 ca Exp $') OSTYPE(bsd4.4)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/9/contrib/sendmail/cf/cf/generic-hpux10.mc ============================================================================== --- stable/9/contrib/sendmail/cf/cf/generic-hpux10.mc Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/generic-hpux10.mc Mon May 26 20:10:00 2014 (r266711) @@ -20,7 +20,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-hpux10.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-hpux10.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') OSTYPE(hpux10)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/9/contrib/sendmail/cf/cf/generic-hpux9.mc ============================================================================== --- stable/9/contrib/sendmail/cf/cf/generic-hpux9.mc Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/generic-hpux9.mc Mon May 26 20:10:00 2014 (r266711) @@ -20,7 +20,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-hpux9.mc,v 8.12 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-hpux9.mc,v 8.12 2013-11-22 20:51:08 ca Exp $') OSTYPE(hpux9)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/9/contrib/sendmail/cf/cf/generic-linux.mc ============================================================================== --- stable/9/contrib/sendmail/cf/cf/generic-linux.mc Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/generic-linux.mc Mon May 26 20:10:00 2014 (r266711) @@ -20,7 +20,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-linux.mc,v 8.2 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-linux.mc,v 8.2 2013-11-22 20:51:08 ca Exp $') OSTYPE(linux)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/9/contrib/sendmail/cf/cf/generic-mpeix.mc ============================================================================== --- stable/9/contrib/sendmail/cf/cf/generic-mpeix.mc Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/generic-mpeix.mc Mon May 26 20:10:00 2014 (r266711) @@ -17,7 +17,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-mpeix.mc,v 8.2 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-mpeix.mc,v 8.2 2013-11-22 20:51:08 ca Exp $') OSTYPE(mpeix)dnl DOMAIN(generic)dnl define(`confFORWARD_PATH', `$z/.forward')dnl Modified: stable/9/contrib/sendmail/cf/cf/generic-nextstep3.3.mc ============================================================================== --- stable/9/contrib/sendmail/cf/cf/generic-nextstep3.3.mc Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/generic-nextstep3.3.mc Mon May 26 20:10:00 2014 (r266711) @@ -20,7 +20,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-nextstep3.3.mc,v 8.11 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-nextstep3.3.mc,v 8.11 2013-11-22 20:51:08 ca Exp $') OSTYPE(nextstep)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/9/contrib/sendmail/cf/cf/generic-osf1.mc ============================================================================== --- stable/9/contrib/sendmail/cf/cf/generic-osf1.mc Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/generic-osf1.mc Mon May 26 20:10:00 2014 (r266711) @@ -20,7 +20,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-osf1.mc,v 8.12 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-osf1.mc,v 8.12 2013-11-22 20:51:08 ca Exp $') OSTYPE(osf1)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/9/contrib/sendmail/cf/cf/generic-solaris.mc ============================================================================== --- stable/9/contrib/sendmail/cf/cf/generic-solaris.mc Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/generic-solaris.mc Mon May 26 20:10:00 2014 (r266711) @@ -22,7 +22,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-solaris.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-solaris.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') OSTYPE(solaris2)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/9/contrib/sendmail/cf/cf/generic-sunos4.1.mc ============================================================================== --- stable/9/contrib/sendmail/cf/cf/generic-sunos4.1.mc Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/generic-sunos4.1.mc Mon May 26 20:10:00 2014 (r266711) @@ -20,7 +20,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-sunos4.1.mc,v 8.12 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-sunos4.1.mc,v 8.12 2013-11-22 20:51:08 ca Exp $') OSTYPE(sunos4.1)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/9/contrib/sendmail/cf/cf/generic-ultrix4.mc ============================================================================== --- stable/9/contrib/sendmail/cf/cf/generic-ultrix4.mc Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/generic-ultrix4.mc Mon May 26 20:10:00 2014 (r266711) @@ -20,7 +20,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: generic-ultrix4.mc,v 8.12 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: generic-ultrix4.mc,v 8.12 2013-11-22 20:51:08 ca Exp $') OSTYPE(ultrix4)dnl DOMAIN(generic)dnl MAILER(local)dnl Modified: stable/9/contrib/sendmail/cf/cf/huginn.cs.mc ============================================================================== --- stable/9/contrib/sendmail/cf/cf/huginn.cs.mc Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/huginn.cs.mc Mon May 26 20:10:00 2014 (r266711) @@ -22,7 +22,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: huginn.cs.mc,v 8.16 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: huginn.cs.mc,v 8.16 2013-11-22 20:51:08 ca Exp $') OSTYPE(hpux9)dnl DOMAIN(CS.Berkeley.EDU)dnl MASQUERADE_AS(CS.Berkeley.EDU)dnl Modified: stable/9/contrib/sendmail/cf/cf/knecht.mc ============================================================================== --- stable/9/contrib/sendmail/cf/cf/knecht.mc Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/knecht.mc Mon May 26 20:10:00 2014 (r266711) @@ -19,7 +19,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: knecht.mc,v 8.63 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: knecht.mc,v 8.63 2013-11-22 20:51:08 ca Exp $') OSTYPE(bsd4.4) DOMAIN(generic) Modified: stable/9/contrib/sendmail/cf/cf/mail.cs.mc ============================================================================== --- stable/9/contrib/sendmail/cf/cf/mail.cs.mc Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/mail.cs.mc Mon May 26 20:10:00 2014 (r266711) @@ -22,7 +22,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: mail.cs.mc,v 8.19 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: mail.cs.mc,v 8.19 2013-11-22 20:51:08 ca Exp $') OSTYPE(ultrix4)dnl DOMAIN(Berkeley.EDU)dnl MASQUERADE_AS(CS.Berkeley.EDU)dnl Modified: stable/9/contrib/sendmail/cf/cf/mail.eecs.mc ============================================================================== --- stable/9/contrib/sendmail/cf/cf/mail.eecs.mc Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/mail.eecs.mc Mon May 26 20:10:00 2014 (r266711) @@ -22,7 +22,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: mail.eecs.mc,v 8.19 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: mail.eecs.mc,v 8.19 2013-11-22 20:51:08 ca Exp $') OSTYPE(ultrix4)dnl DOMAIN(EECS.Berkeley.EDU)dnl MASQUERADE_AS(EECS.Berkeley.EDU)dnl Modified: stable/9/contrib/sendmail/cf/cf/mailspool.cs.mc ============================================================================== --- stable/9/contrib/sendmail/cf/cf/mailspool.cs.mc Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/mailspool.cs.mc Mon May 26 20:10:00 2014 (r266711) @@ -24,7 +24,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: mailspool.cs.mc,v 8.13 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: mailspool.cs.mc,v 8.13 2013-11-22 20:51:08 ca Exp $') OSTYPE(sunos4.1)dnl DOMAIN(CS.Berkeley.EDU)dnl MAILER(local)dnl Modified: stable/9/contrib/sendmail/cf/cf/python.cs.mc ============================================================================== --- stable/9/contrib/sendmail/cf/cf/python.cs.mc Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/python.cs.mc Mon May 26 20:10:00 2014 (r266711) @@ -24,7 +24,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: python.cs.mc,v 8.13 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: python.cs.mc,v 8.13 2013-11-22 20:51:08 ca Exp $') OSTYPE(bsd4.4)dnl DOMAIN(CS.Berkeley.EDU)dnl define(`LOCAL_RELAY', vangogh.CS.Berkeley.EDU)dnl Modified: stable/9/contrib/sendmail/cf/cf/s2k-osf1.mc ============================================================================== --- stable/9/contrib/sendmail/cf/cf/s2k-osf1.mc Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/s2k-osf1.mc Mon May 26 20:10:00 2014 (r266711) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: s2k-osf1.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: s2k-osf1.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') OSTYPE(osf1)dnl DOMAIN(S2K.Berkeley.EDU)dnl MAILER(local)dnl Modified: stable/9/contrib/sendmail/cf/cf/s2k-ultrix4.mc ============================================================================== --- stable/9/contrib/sendmail/cf/cf/s2k-ultrix4.mc Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/s2k-ultrix4.mc Mon May 26 20:10:00 2014 (r266711) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: s2k-ultrix4.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: s2k-ultrix4.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') OSTYPE(ultrix4)dnl DOMAIN(S2K.Berkeley.EDU)dnl MAILER(local)dnl Modified: stable/9/contrib/sendmail/cf/cf/submit.cf ============================================================================== --- stable/9/contrib/sendmail/cf/cf/submit.cf Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/submit.cf Mon May 26 20:10:00 2014 (r266711) @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@lab.smi.sendmail.com on Thu Jan 23 12:29:13 PST 2014 -##### in /home/ca/sm8-rel/sm-8.14.8/OpenSource/sendmail-8.14.8/cf/cf +##### built by ca@lab.smi.sendmail.com on Tue May 20 12:12:52 PDT 2014 +##### in /home/ca/sm8.git/sendmail/OpenSource/sendmail-8.14.9/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -27,15 +27,15 @@ ###################################################################### ###################################################################### -##### $Id: cfhead.m4,v 8.122 2013/11/22 20:51:13 ca Exp $ ##### -##### $Id: cf.m4,v 8.33 2013/11/22 20:51:13 ca Exp $ ##### -##### $Id: submit.mc,v 8.15 2013/11/22 20:51:08 ca Exp $ ##### -##### $Id: msp.m4,v 1.34 2013/11/22 20:51:11 ca Exp $ ##### +##### $Id: cfhead.m4,v 8.122 2013-11-22 20:51:13 ca Exp $ ##### +##### $Id: cf.m4,v 8.33 2013-11-22 20:51:13 ca Exp $ ##### +##### $Id: submit.mc,v 8.15 2013-11-22 20:51:08 ca Exp $ ##### +##### $Id: msp.m4,v 1.34 2013-11-22 20:51:11 ca Exp $ ##### -##### $Id: no_default_msa.m4,v 8.3 2013/11/22 20:51:11 ca Exp $ ##### +##### $Id: no_default_msa.m4,v 8.3 2013-11-22 20:51:11 ca Exp $ ##### -##### $Id: proto.m4,v 8.762 2013/11/22 20:51:13 ca Exp $ ##### +##### $Id: proto.m4,v 8.762 2013-11-22 20:51:13 ca Exp $ ##### # level 10 config file format V10/Berkeley @@ -114,7 +114,7 @@ D{MTAHost}[127.0.0.1] # Configuration version number -DZ8.14.8/Submit +DZ8.14.9/Submit ############### @@ -1299,7 +1299,7 @@ R$* $#relay $@ ${MTAHost} $: $1 < @ $j ### Local and Program Mailer specification ### ################################################## -##### $Id: local.m4,v 8.60 2013/11/22 20:51:14 ca Exp $ ##### +##### $Id: local.m4,v 8.60 2013-11-22 20:51:14 ca Exp $ ##### # # Envelope sender rewriting @@ -1351,7 +1351,7 @@ Mprog, P=[IPC], F=lmDFMuXk5, S=EnvFromL ### SMTP Mailer specification ### ##################################### -##### $Id: smtp.m4,v 8.66 2013/11/22 20:51:14 ca Exp $ ##### +##### $Id: smtp.m4,v 8.66 2013-11-22 20:51:14 ca Exp $ ##### # # common sender and masquerading recipient rewriting @@ -1457,7 +1457,7 @@ Mrelay, P=[IPC], F=mDFMuXa8k, S=EnvFrom # # # # divert(0)dnl -# VERSIONID(`$Id: submit.mc,v 8.15 2013/11/22 20:51:08 ca Exp $') +# VERSIONID(`$Id: submit.mc,v 8.15 2013-11-22 20:51:08 ca Exp $') # define(`confCF_VERSION', `Submit')dnl # define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from complaining # define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet Modified: stable/9/contrib/sendmail/cf/cf/submit.mc ============================================================================== --- stable/9/contrib/sendmail/cf/cf/submit.mc Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/submit.mc Mon May 26 20:10:00 2014 (r266711) @@ -15,7 +15,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: submit.mc,v 8.15 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: submit.mc,v 8.15 2013-11-22 20:51:08 ca Exp $') define(`confCF_VERSION', `Submit')dnl define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from complaining define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet Modified: stable/9/contrib/sendmail/cf/cf/tcpproto.mc ============================================================================== --- stable/9/contrib/sendmail/cf/cf/tcpproto.mc Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/tcpproto.mc Mon May 26 20:10:00 2014 (r266711) @@ -26,7 +26,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: tcpproto.mc,v 8.15 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: tcpproto.mc,v 8.15 2013-11-22 20:51:08 ca Exp $') OSTYPE(`unknown') FEATURE(`nouucp', `reject') MAILER(`local') Modified: stable/9/contrib/sendmail/cf/cf/ucbarpa.mc ============================================================================== --- stable/9/contrib/sendmail/cf/cf/ucbarpa.mc Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/ucbarpa.mc Mon May 26 20:10:00 2014 (r266711) @@ -21,7 +21,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: ucbarpa.mc,v 8.13 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: ucbarpa.mc,v 8.13 2013-11-22 20:51:08 ca Exp $') DOMAIN(CS.Berkeley.EDU)dnl OSTYPE(bsd4.4)dnl MAILER(local)dnl Modified: stable/9/contrib/sendmail/cf/cf/ucbvax.mc ============================================================================== --- stable/9/contrib/sendmail/cf/cf/ucbvax.mc Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/ucbvax.mc Mon May 26 20:10:00 2014 (r266711) @@ -22,7 +22,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: ucbvax.mc,v 8.15 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: ucbvax.mc,v 8.15 2013-11-22 20:51:08 ca Exp $') OSTYPE(bsd4.3) DOMAIN(CS.Berkeley.EDU) MASQUERADE_AS(CS.Berkeley.EDU) Modified: stable/9/contrib/sendmail/cf/cf/uucpproto.mc ============================================================================== --- stable/9/contrib/sendmail/cf/cf/uucpproto.mc Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/uucpproto.mc Mon May 26 20:10:00 2014 (r266711) @@ -26,7 +26,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: uucpproto.mc,v 8.16 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: uucpproto.mc,v 8.16 2013-11-22 20:51:08 ca Exp $') OSTYPE(unknown) FEATURE(promiscuous_relay)dnl FEATURE(accept_unresolvable_domains)dnl Modified: stable/9/contrib/sendmail/cf/cf/vangogh.cs.mc ============================================================================== --- stable/9/contrib/sendmail/cf/cf/vangogh.cs.mc Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/cf/vangogh.cs.mc Mon May 26 20:10:00 2014 (r266711) @@ -23,7 +23,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: vangogh.cs.mc,v 8.14 2013/11/22 20:51:08 ca Exp $') +VERSIONID(`$Id: vangogh.cs.mc,v 8.14 2013-11-22 20:51:08 ca Exp $') DOMAIN(CS.Berkeley.EDU)dnl OSTYPE(bsd4.4)dnl MAILER(local)dnl Modified: stable/9/contrib/sendmail/cf/domain/Berkeley.EDU.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/domain/Berkeley.EDU.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/domain/Berkeley.EDU.m4 Mon May 26 20:10:00 2014 (r266711) @@ -12,7 +12,7 @@ divert(-1) # # divert(0) -VERSIONID(`$Id: Berkeley.EDU.m4,v 8.18 2013/11/22 20:51:10 ca Exp $') +VERSIONID(`$Id: Berkeley.EDU.m4,v 8.18 2013-11-22 20:51:10 ca Exp $') DOMAIN(berkeley-only)dnl define(`BITNET_RELAY', `bitnet-relay.Berkeley.EDU')dnl define(`UUCP_RELAY', `uucp-relay.Berkeley.EDU')dnl Modified: stable/9/contrib/sendmail/cf/domain/CS.Berkeley.EDU.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/domain/CS.Berkeley.EDU.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/domain/CS.Berkeley.EDU.m4 Mon May 26 20:10:00 2014 (r266711) @@ -12,7 +12,7 @@ divert(-1) # # divert(0) -VERSIONID(`$Id: CS.Berkeley.EDU.m4,v 8.11 2013/11/22 20:51:10 ca Exp $') +VERSIONID(`$Id: CS.Berkeley.EDU.m4,v 8.11 2013-11-22 20:51:10 ca Exp $') DOMAIN(Berkeley.EDU)dnl HACK(cssubdomain)dnl define(`confUSERDB_SPEC', Modified: stable/9/contrib/sendmail/cf/domain/EECS.Berkeley.EDU.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/domain/EECS.Berkeley.EDU.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/domain/EECS.Berkeley.EDU.m4 Mon May 26 20:10:00 2014 (r266711) @@ -12,6 +12,6 @@ divert(-1) # # divert(0) -VERSIONID(`$Id: EECS.Berkeley.EDU.m4,v 8.11 2013/11/22 20:51:10 ca Exp $') +VERSIONID(`$Id: EECS.Berkeley.EDU.m4,v 8.11 2013-11-22 20:51:10 ca Exp $') DOMAIN(Berkeley.EDU)dnl MASQUERADE_AS(EECS.Berkeley.EDU)dnl Modified: stable/9/contrib/sendmail/cf/domain/S2K.Berkeley.EDU.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/domain/S2K.Berkeley.EDU.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/domain/S2K.Berkeley.EDU.m4 Mon May 26 20:10:00 2014 (r266711) @@ -12,6 +12,6 @@ divert(-1) # # divert(0) -VERSIONID(`$Id: S2K.Berkeley.EDU.m4,v 8.11 2013/11/22 20:51:10 ca Exp $') +VERSIONID(`$Id: S2K.Berkeley.EDU.m4,v 8.11 2013-11-22 20:51:10 ca Exp $') DOMAIN(CS.Berkeley.EDU)dnl MASQUERADE_AS(postgres.Berkeley.EDU)dnl Modified: stable/9/contrib/sendmail/cf/domain/berkeley-only.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/domain/berkeley-only.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/domain/berkeley-only.m4 Mon May 26 20:10:00 2014 (r266711) @@ -12,7 +12,7 @@ divert(-1) # # divert(0) -VERSIONID(`$Id: unspecified-domain.m4,v 8.11 2013/11/22 20:51:10 ca Exp $') +VERSIONID(`$Id: unspecified-domain.m4,v 8.11 2013-11-22 20:51:10 ca Exp $') errprint(`*** ERROR: You are trying to use the Berkeley sample configuration') errprint(` files outside of the Computer Science Division at Berkeley.') errprint(` The configuration (.mc) files must be customized to reference') Modified: stable/9/contrib/sendmail/cf/domain/generic.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/domain/generic.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/domain/generic.m4 Mon May 26 20:10:00 2014 (r266711) @@ -20,7 +20,7 @@ divert(-1) # files. # divert(0) -VERSIONID(`$Id: generic.m4,v 8.16 2013/11/22 20:51:10 ca Exp $') +VERSIONID(`$Id: generic.m4,v 8.16 2013-11-22 20:51:10 ca Exp $') define(`confFORWARD_PATH', `$z/.forward.$w+$h:$z/.forward+$h:$z/.forward.$w:$z/.forward')dnl define(`confMAX_HEADERS_LENGTH', `32768')dnl FEATURE(`redirect')dnl Modified: stable/9/contrib/sendmail/cf/feature/accept_unqualified_senders.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/accept_unqualified_senders.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/accept_unqualified_senders.m4 Mon May 26 20:10:00 2014 (r266711) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: accept_unqualified_senders.m4,v 8.7 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: accept_unqualified_senders.m4,v 8.7 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_ACCEPT_UNQUALIFIED_SENDERS_', 1) Modified: stable/9/contrib/sendmail/cf/feature/accept_unresolvable_domains.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/accept_unresolvable_domains.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/accept_unresolvable_domains.m4 Mon May 26 20:10:00 2014 (r266711) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: accept_unresolvable_domains.m4,v 8.11 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: accept_unresolvable_domains.m4,v 8.11 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_ACCEPT_UNRESOLVABLE_DOMAINS_', 1) Modified: stable/9/contrib/sendmail/cf/feature/access_db.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/access_db.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/access_db.m4 Mon May 26 20:10:00 2014 (r266711) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: access_db.m4,v 8.28 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: access_db.m4,v 8.28 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_ACCESS_TABLE_', `') Modified: stable/9/contrib/sendmail/cf/feature/allmasquerade.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/allmasquerade.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/allmasquerade.m4 Mon May 26 20:10:00 2014 (r266711) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: allmasquerade.m4,v 8.14 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: allmasquerade.m4,v 8.14 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_MAILER_local_', Modified: stable/9/contrib/sendmail/cf/feature/always_add_domain.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/always_add_domain.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/always_add_domain.m4 Mon May 26 20:10:00 2014 (r266711) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: always_add_domain.m4,v 8.12 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: always_add_domain.m4,v 8.12 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_MAILER_local_', Modified: stable/9/contrib/sendmail/cf/feature/authinfo.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/authinfo.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/authinfo.m4 Mon May 26 20:10:00 2014 (r266711) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: authinfo.m4,v 1.10 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: authinfo.m4,v 1.10 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_AUTHINFO_TABLE_', `') Modified: stable/9/contrib/sendmail/cf/feature/badmx.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/badmx.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/badmx.m4 Mon May 26 20:10:00 2014 (r266711) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: badmx.m4,v 1.2 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: badmx.m4,v 1.2 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_BADMX_CHK_', 1) Modified: stable/9/contrib/sendmail/cf/feature/bestmx_is_local.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/bestmx_is_local.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/bestmx_is_local.m4 Mon May 26 20:10:00 2014 (r266711) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: bestmx_is_local.m4,v 8.27 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: bestmx_is_local.m4,v 8.27 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_BESTMX_IS_LOCAL_', _ARG_) Modified: stable/9/contrib/sendmail/cf/feature/bitdomain.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/bitdomain.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/bitdomain.m4 Mon May 26 20:10:00 2014 (r266711) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: bitdomain.m4,v 8.31 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: bitdomain.m4,v 8.31 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_BITDOMAIN_TABLE_', `') Modified: stable/9/contrib/sendmail/cf/feature/blacklist_recipients.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/blacklist_recipients.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/blacklist_recipients.m4 Mon May 26 20:10:00 2014 (r266711) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: blacklist_recipients.m4,v 8.14 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: blacklist_recipients.m4,v 8.14 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_ACCESS_TABLE_', Modified: stable/9/contrib/sendmail/cf/feature/block_bad_helo.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/block_bad_helo.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/block_bad_helo.m4 Mon May 26 20:10:00 2014 (r266711) @@ -10,7 +10,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: block_bad_helo.m4,v 1.2 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: block_bad_helo.m4,v 1.2 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_BLOCK_BAD_HELO_', `')dnl Modified: stable/9/contrib/sendmail/cf/feature/compat_check.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/compat_check.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/compat_check.m4 Mon May 26 20:10:00 2014 (r266711) @@ -9,7 +9,7 @@ divert(-1) # # divert(0) -VERSIONID(`$Id: compat_check.m4,v 1.5 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: compat_check.m4,v 1.5 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_ACCESS_TABLE_', `', `errprint(`FEATURE(`compat_check') requires FEATURE(`access_db') Modified: stable/9/contrib/sendmail/cf/feature/conncontrol.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/conncontrol.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/conncontrol.m4 Mon May 26 20:10:00 2014 (r266711) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: conncontrol.m4,v 1.5 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: conncontrol.m4,v 1.5 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_ACCESS_TABLE_', ` Modified: stable/9/contrib/sendmail/cf/feature/delay_checks.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/delay_checks.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/delay_checks.m4 Mon May 26 20:10:00 2014 (r266711) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: delay_checks.m4,v 8.9 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: delay_checks.m4,v 8.9 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_DELAY_CHECKS_', 1) Modified: stable/9/contrib/sendmail/cf/feature/dnsbl.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/dnsbl.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/dnsbl.m4 Mon May 26 20:10:00 2014 (r266711) @@ -12,7 +12,7 @@ divert(-1) ifdef(`DNSBL_MAP', `', `define(`DNSBL_MAP', `dns -R A')') divert(0) ifdef(`_DNSBL_R_',`dnl',`dnl -VERSIONID(`$Id: dnsbl.m4,v 8.34 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: dnsbl.m4,v 8.34 2013-11-22 20:51:11 ca Exp $') define(`_DNSBL_R_',`') ifelse(defn(`_ARG_'), `', `errprint(`*** ERROR: missing argument for FEATURE(`dnsbl')')') Modified: stable/9/contrib/sendmail/cf/feature/domaintable.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/domaintable.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/domaintable.m4 Mon May 26 20:10:00 2014 (r266711) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: domaintable.m4,v 8.25 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: domaintable.m4,v 8.25 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_DOMAIN_TABLE_', `') Modified: stable/9/contrib/sendmail/cf/feature/enhdnsbl.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/enhdnsbl.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/enhdnsbl.m4 Mon May 26 20:10:00 2014 (r266711) @@ -13,7 +13,7 @@ ifelse(defn(`_ARG_'), `', `errprint(`*** ERROR: missing argument for FEATURE(`enhdnsbl')')') divert(0) ifdef(`_EDNSBL_R_',`dnl',`dnl -VERSIONID(`$Id: enhdnsbl.m4,v 1.13 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: enhdnsbl.m4,v 1.13 2013-11-22 20:51:11 ca Exp $') LOCAL_CONFIG define(`_EDNSBL_R_',`')dnl # map for enhanced DNS based blacklist lookups Modified: stable/9/contrib/sendmail/cf/feature/generics_entire_domain.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/generics_entire_domain.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/generics_entire_domain.m4 Mon May 26 20:10:00 2014 (r266711) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: generics_entire_domain.m4,v 8.2 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: generics_entire_domain.m4,v 8.2 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_GENERICS_ENTIRE_DOMAIN_', 1) Modified: stable/9/contrib/sendmail/cf/feature/genericstable.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/genericstable.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/genericstable.m4 Mon May 26 20:10:00 2014 (r266711) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: genericstable.m4,v 8.24 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: genericstable.m4,v 8.24 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_GENERICS_TABLE_', `') Modified: stable/9/contrib/sendmail/cf/feature/greet_pause.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/greet_pause.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/greet_pause.m4 Mon May 26 20:10:00 2014 (r266711) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: greet_pause.m4,v 1.5 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: greet_pause.m4,v 1.5 2013-11-22 20:51:11 ca Exp $') divert(-1) ifelse(len(X`'_ARG_),`1',`ifdef(`_ACCESS_TABLE_', `', Modified: stable/9/contrib/sendmail/cf/feature/ldap_routing.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/ldap_routing.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/ldap_routing.m4 Mon May 26 20:10:00 2014 (r266711) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: ldap_routing.m4,v 8.21 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: ldap_routing.m4,v 8.21 2013-11-22 20:51:11 ca Exp $') divert(-1) # Check first two arguments. If they aren't set, may need to warn in proto.m4 Modified: stable/9/contrib/sendmail/cf/feature/limited_masquerade.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/limited_masquerade.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/limited_masquerade.m4 Mon May 26 20:10:00 2014 (r266711) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: limited_masquerade.m4,v 8.10 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: limited_masquerade.m4,v 8.10 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_LIMITED_MASQUERADE_', 1) Modified: stable/9/contrib/sendmail/cf/feature/local_lmtp.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/local_lmtp.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/local_lmtp.m4 Mon May 26 20:10:00 2014 (r266711) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: local_lmtp.m4,v 8.18 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: local_lmtp.m4,v 8.18 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_MAILER_local_', Modified: stable/9/contrib/sendmail/cf/feature/local_no_masquerade.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/local_no_masquerade.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/local_no_masquerade.m4 Mon May 26 20:10:00 2014 (r266711) @@ -9,7 +9,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: local_no_masquerade.m4,v 1.3 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: local_no_masquerade.m4,v 1.3 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_MAILER_local_', Modified: stable/9/contrib/sendmail/cf/feature/local_procmail.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/local_procmail.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/local_procmail.m4 Mon May 26 20:10:00 2014 (r266711) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: local_procmail.m4,v 8.23 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: local_procmail.m4,v 8.23 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_MAILER_local_', Modified: stable/9/contrib/sendmail/cf/feature/lookupdotdomain.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/lookupdotdomain.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/lookupdotdomain.m4 Mon May 26 20:10:00 2014 (r266711) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: lookupdotdomain.m4,v 1.2 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: lookupdotdomain.m4,v 1.2 2013-11-22 20:51:11 ca Exp $') divert(-1) ifdef(`_ACCESS_TABLE_', Modified: stable/9/contrib/sendmail/cf/feature/loose_relay_check.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/loose_relay_check.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/loose_relay_check.m4 Mon May 26 20:10:00 2014 (r266711) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: loose_relay_check.m4,v 8.7 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: loose_relay_check.m4,v 8.7 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_LOOSE_RELAY_CHECK_', 1) Modified: stable/9/contrib/sendmail/cf/feature/mailertable.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/mailertable.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/mailertable.m4 Mon May 26 20:10:00 2014 (r266711) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: mailertable.m4,v 8.26 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: mailertable.m4,v 8.26 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_MAILER_TABLE_', `') Modified: stable/9/contrib/sendmail/cf/feature/masquerade_entire_domain.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/masquerade_entire_domain.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/masquerade_entire_domain.m4 Mon May 26 20:10:00 2014 (r266711) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: masquerade_entire_domain.m4,v 8.10 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: masquerade_entire_domain.m4,v 8.10 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_MASQUERADE_ENTIRE_DOMAIN_', 1) Modified: stable/9/contrib/sendmail/cf/feature/masquerade_envelope.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/masquerade_envelope.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/masquerade_envelope.m4 Mon May 26 20:10:00 2014 (r266711) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: masquerade_envelope.m4,v 8.10 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: masquerade_envelope.m4,v 8.10 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_MASQUERADE_ENVELOPE_', 1) Modified: stable/9/contrib/sendmail/cf/feature/msp.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/msp.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/msp.m4 Mon May 26 20:10:00 2014 (r266711) @@ -10,7 +10,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: msp.m4,v 1.34 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: msp.m4,v 1.34 2013-11-22 20:51:11 ca Exp $') divert(-1) undefine(`ALIAS_FILE') define(`confDELIVERY_MODE', `i') Modified: stable/9/contrib/sendmail/cf/feature/mtamark.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/mtamark.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/mtamark.m4 Mon May 26 20:10:00 2014 (r266711) @@ -11,7 +11,7 @@ divert(-1) divert(0) ifdef(`_MTAMARK_R',`dnl',`dnl -VERSIONID(`$Id: mtamark.m4,v 1.3 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: mtamark.m4,v 1.3 2013-11-22 20:51:11 ca Exp $') LOCAL_CONFIG define(`_MTAMARK_R',`')dnl # map for MTA mark Modified: stable/9/contrib/sendmail/cf/feature/no_default_msa.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/no_default_msa.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/no_default_msa.m4 Mon May 26 20:10:00 2014 (r266711) @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: no_default_msa.m4,v 8.3 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: no_default_msa.m4,v 8.3 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_NO_MSA_', `1') Modified: stable/9/contrib/sendmail/cf/feature/nocanonify.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/nocanonify.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/nocanonify.m4 Mon May 26 20:10:00 2014 (r266711) @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: nocanonify.m4,v 8.13 2013/11/22 20:51:11 ca Exp $') +VERSIONID(`$Id: nocanonify.m4,v 8.13 2013-11-22 20:51:11 ca Exp $') divert(-1) define(`_NO_CANONIFY_', 1) Modified: stable/9/contrib/sendmail/cf/feature/notsticky.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/feature/notsticky.m4 Mon May 26 19:17:53 2014 (r266710) +++ stable/9/contrib/sendmail/cf/feature/notsticky.m4 Mon May 26 20:10:00 2014 (r266711) @@ -13,7 +13,7 @@ divert(-1) # *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Mon May 26 20:11:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0FF97EA; Mon, 26 May 2014 20:11:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97E4026C7; Mon, 26 May 2014 20:11:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4QKBVP7044212; Mon, 26 May 2014 20:11:31 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4QKBVda044211; Mon, 26 May 2014 20:11:31 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201405262011.s4QKBVda044211@svn.freebsd.org> From: Gregory Neil Shapiro Date: Mon, 26 May 2014 20:11:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266712 - stable/9/contrib/sendmail X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 20:11:31 -0000 Author: gshapiro Date: Mon May 26 20:11:31 2014 New Revision: 266712 URL: http://svnweb.freebsd.org/changeset/base/266712 Log: MFC: Update for sendmail 8.14.9 import Approved by: re (delphij) Modified: stable/9/contrib/sendmail/FREEBSD-upgrade Directory Properties: stable/9/contrib/sendmail/ (props changed) Modified: stable/9/contrib/sendmail/FREEBSD-upgrade ============================================================================== --- stable/9/contrib/sendmail/FREEBSD-upgrade Mon May 26 20:10:00 2014 (r266711) +++ stable/9/contrib/sendmail/FREEBSD-upgrade Mon May 26 20:11:31 2014 (r266712) @@ -1,6 +1,6 @@ $FreeBSD$ -sendmail 8.14.8 +sendmail 8.14.9 originals can be found at: ftp://ftp.sendmail.org/pub/sendmail/ For the import of sendmail, the following directories were renamed: @@ -97,4 +97,4 @@ infrastructure in FreeBSD: usr.sbin/mailwrapper/Makefile gshapiro@FreeBSD.org -26-January-2014 +21-May-2014 From owner-svn-src-stable@FreeBSD.ORG Mon May 26 20:13:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42E9F94C; Mon, 26 May 2014 20:13:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F5062742; Mon, 26 May 2014 20:13:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4QKDEi8046275; Mon, 26 May 2014 20:13:14 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4QKDDb2046273; Mon, 26 May 2014 20:13:13 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201405262013.s4QKDDb2046273@svn.freebsd.org> From: Gregory Neil Shapiro Date: Mon, 26 May 2014 20:13:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266713 - stable/9/etc/sendmail X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 20:13:14 -0000 Author: gshapiro Date: Mon May 26 20:13:13 2014 New Revision: 266713 URL: http://svnweb.freebsd.org/changeset/base/266713 Log: MFC: Minor changes to force commit these files so new freebsd*.cf files are built to use the new sendmail-8.14.9/cf tree. Approved by: re (delphij) Modified: stable/9/etc/sendmail/freebsd.mc stable/9/etc/sendmail/freebsd.submit.mc Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/sendmail/freebsd.mc ============================================================================== --- stable/9/etc/sendmail/freebsd.mc Mon May 26 20:11:31 2014 (r266712) +++ stable/9/etc/sendmail/freebsd.mc Mon May 26 20:13:13 2014 (r266713) @@ -33,7 +33,6 @@ divert(-1) # SUCH DAMAGE. # - # # This is a generic configuration file for FreeBSD 6.X and later systems. # If you want to customize it, copy it to a name appropriate for your Modified: stable/9/etc/sendmail/freebsd.submit.mc ============================================================================== --- stable/9/etc/sendmail/freebsd.submit.mc Mon May 26 20:11:31 2014 (r266712) +++ stable/9/etc/sendmail/freebsd.submit.mc Mon May 26 20:13:13 2014 (r266713) @@ -9,7 +9,6 @@ divert(-1) # # - # # This is the FreeBSD configuration for a set-group-ID sm-msp sendmail # that acts as a initial mail submission program. From owner-svn-src-stable@FreeBSD.ORG Mon May 26 20:14:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B8E5A90; Mon, 26 May 2014 20:14:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87C8D274F; Mon, 26 May 2014 20:14:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4QKEaRO046545; Mon, 26 May 2014 20:14:36 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4QKEa0B046544; Mon, 26 May 2014 20:14:36 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201405262014.s4QKEa0B046544@svn.freebsd.org> From: Gregory Neil Shapiro Date: Mon, 26 May 2014 20:14:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266714 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 20:14:36 -0000 Author: gshapiro Date: Mon May 26 20:14:36 2014 New Revision: 266714 URL: http://svnweb.freebsd.org/changeset/base/266714 Log: Note merge for sendmail 8.14.9. Approved by: re (delphij) Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 26 20:13:13 2014 (r266713) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon May 26 20:14:36 2014 (r266714) @@ -639,8 +639,8 @@ The &man.readline.3; library has been updated to version 1.104. - Sendmail has - been updated to version 8.14.8. + Sendmail has + been updated to version 8.14.9. BIND has been updated to version 9.9.5. From owner-svn-src-stable@FreeBSD.ORG Mon May 26 20:45:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A2B395C; Mon, 26 May 2014 20:45:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4204529D1; Mon, 26 May 2014 20:45:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4QKjobl060975; Mon, 26 May 2014 20:45:50 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4QKjioj060945; Mon, 26 May 2014 20:45:44 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201405262045.s4QKjioj060945@svn.freebsd.org> From: Dimitry Andric Date: Mon, 26 May 2014 20:45:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266715 - in stable/10: . contrib/llvm/include/llvm/IR contrib/llvm/include/llvm/MC contrib/llvm/lib/Analysis contrib/llvm/lib/CodeGen/AsmPrinter contrib/llvm/lib/CodeGen/SelectionDAG c... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 20:45:50 -0000 Author: dim Date: Mon May 26 20:45:44 2014 New Revision: 266715 URL: http://svnweb.freebsd.org/changeset/base/266715 Log: MFC r265925: Upgrade our copy of llvm/clang to 3.4.1 release. This release contains mostly fixes, for the following upstream bugs: http://llvm.org/PR16365 http://llvm.org/PR17473 http://llvm.org/PR18000 http://llvm.org/PR18068 http://llvm.org/PR18102 http://llvm.org/PR18165 http://llvm.org/PR18260 http://llvm.org/PR18290 http://llvm.org/PR18316 http://llvm.org/PR18460 http://llvm.org/PR18473 http://llvm.org/PR18515 http://llvm.org/PR18526 http://llvm.org/PR18600 http://llvm.org/PR18762 http://llvm.org/PR18773 http://llvm.org/PR18860 http://llvm.org/PR18994 http://llvm.org/PR19007 http://llvm.org/PR19010 http://llvm.org/PR19033 http://llvm.org/PR19059 http://llvm.org/PR19144 http://llvm.org/PR19326 Deleted: stable/10/contrib/llvm/patches/patch-r262809-clang-r203007-destructor-calling-conv.diff Modified: stable/10/ObsoleteFiles.inc stable/10/UPDATING stable/10/contrib/llvm/include/llvm/IR/IntrinsicsX86.td stable/10/contrib/llvm/include/llvm/MC/MCAsmInfo.h stable/10/contrib/llvm/lib/Analysis/BasicAliasAnalysis.cpp stable/10/contrib/llvm/lib/Analysis/IVUsers.cpp stable/10/contrib/llvm/lib/Analysis/ScalarEvolution.cpp stable/10/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp stable/10/contrib/llvm/lib/MC/MCAsmInfo.cpp stable/10/contrib/llvm/lib/MC/MCAsmInfoCOFF.cpp stable/10/contrib/llvm/lib/MC/MCAsmInfoDarwin.cpp stable/10/contrib/llvm/lib/MC/MCDwarf.cpp stable/10/contrib/llvm/lib/MC/MCParser/AsmParser.cpp stable/10/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp stable/10/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.td stable/10/contrib/llvm/lib/Target/AArch64/AArch64TargetObjectFile.cpp stable/10/contrib/llvm/lib/Target/AArch64/AArch64TargetObjectFile.h stable/10/contrib/llvm/lib/Target/ARM/A15SDOptimizer.cpp stable/10/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp stable/10/contrib/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp stable/10/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp stable/10/contrib/llvm/lib/Target/ARM/ARMInstrNEON.td stable/10/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp stable/10/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.h stable/10/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp stable/10/contrib/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp stable/10/contrib/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp stable/10/contrib/llvm/lib/Target/PowerPC/PPCFastISel.cpp stable/10/contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp stable/10/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp stable/10/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp stable/10/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.td stable/10/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.td stable/10/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.h stable/10/contrib/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp stable/10/contrib/llvm/lib/Target/R600/AMDGPUISelLowering.cpp stable/10/contrib/llvm/lib/Target/R600/AMDGPUInstructions.td stable/10/contrib/llvm/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp stable/10/contrib/llvm/lib/Target/R600/R600ControlFlowFinalizer.cpp stable/10/contrib/llvm/lib/Target/R600/R600InstrInfo.cpp stable/10/contrib/llvm/lib/Target/R600/R600Instructions.td stable/10/contrib/llvm/lib/Target/R600/SIFixSGPRCopies.cpp stable/10/contrib/llvm/lib/Target/R600/SIInsertWaits.cpp stable/10/contrib/llvm/lib/Target/R600/SIInstrInfo.td stable/10/contrib/llvm/lib/Target/R600/SIInstructions.td stable/10/contrib/llvm/lib/Target/R600/SIIntrinsics.td stable/10/contrib/llvm/lib/Target/R600/SILowerControlFlow.cpp stable/10/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp stable/10/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c stable/10/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp stable/10/contrib/llvm/lib/Target/X86/X86AsmPrinter.cpp stable/10/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp stable/10/contrib/llvm/lib/Target/X86/X86InstrCompiler.td stable/10/contrib/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp stable/10/contrib/llvm/lib/Transforms/Scalar/LoopRerollPass.cpp stable/10/contrib/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp stable/10/contrib/llvm/lib/Transforms/Utils/LCSSA.cpp stable/10/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp stable/10/contrib/llvm/tools/clang/include/clang/Driver/Driver.h stable/10/contrib/llvm/tools/clang/include/clang/Driver/ToolChain.h stable/10/contrib/llvm/tools/clang/lib/AST/ASTDumper.cpp stable/10/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp stable/10/contrib/llvm/tools/clang/lib/AST/StmtPrinter.cpp stable/10/contrib/llvm/tools/clang/lib/Analysis/Consumed.cpp stable/10/contrib/llvm/tools/clang/lib/Basic/Targets.cpp stable/10/contrib/llvm/tools/clang/lib/Basic/Version.cpp stable/10/contrib/llvm/tools/clang/lib/Driver/Driver.cpp stable/10/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp stable/10/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp stable/10/contrib/llvm/tools/clang/lib/Driver/ToolChains.h stable/10/contrib/llvm/tools/clang/lib/Driver/Tools.cpp stable/10/contrib/llvm/tools/clang/lib/Sema/SemaExprCXX.cpp stable/10/etc/mtree/BSD.include.dist stable/10/lib/clang/include/Makefile stable/10/lib/clang/include/clang/Basic/Version.inc stable/10/lib/clang/include/llvm/Config/config.h stable/10/lib/clang/include/llvm/Config/llvm-config.h stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Mon May 26 20:14:36 2014 (r266714) +++ stable/10/ObsoleteFiles.inc Mon May 26 20:45:44 2014 (r266715) @@ -38,6 +38,43 @@ # xargs -n1 | sort | uniq -d; # done +# 20140512: new clang import which bumps version from 3.4 to 3.4.1. +OLD_FILES+=usr/include/clang/3.4/__wmmintrin_aes.h +OLD_FILES+=usr/include/clang/3.4/__wmmintrin_pclmul.h +OLD_FILES+=usr/include/clang/3.4/altivec.h +OLD_FILES+=usr/include/clang/3.4/ammintrin.h +OLD_FILES+=usr/include/clang/3.4/avx2intrin.h +OLD_FILES+=usr/include/clang/3.4/avxintrin.h +OLD_FILES+=usr/include/clang/3.4/bmi2intrin.h +OLD_FILES+=usr/include/clang/3.4/bmiintrin.h +OLD_FILES+=usr/include/clang/3.4/cpuid.h +OLD_FILES+=usr/include/clang/3.4/emmintrin.h +OLD_FILES+=usr/include/clang/3.4/f16cintrin.h +OLD_FILES+=usr/include/clang/3.4/fma4intrin.h +OLD_FILES+=usr/include/clang/3.4/fmaintrin.h +OLD_FILES+=usr/include/clang/3.4/immintrin.h +OLD_FILES+=usr/include/clang/3.4/lzcntintrin.h +OLD_FILES+=usr/include/clang/3.4/mm3dnow.h +OLD_FILES+=usr/include/clang/3.4/mm_malloc.h +OLD_FILES+=usr/include/clang/3.4/mmintrin.h +OLD_FILES+=usr/include/clang/3.4/module.map +OLD_FILES+=usr/include/clang/3.4/nmmintrin.h +OLD_FILES+=usr/include/clang/3.4/pmmintrin.h +OLD_FILES+=usr/include/clang/3.4/popcntintrin.h +OLD_FILES+=usr/include/clang/3.4/prfchwintrin.h +OLD_FILES+=usr/include/clang/3.4/rdseedintrin.h +OLD_FILES+=usr/include/clang/3.4/rtmintrin.h +OLD_FILES+=usr/include/clang/3.4/shaintrin.h +OLD_FILES+=usr/include/clang/3.4/smmintrin.h +OLD_FILES+=usr/include/clang/3.4/tbmintrin.h +OLD_FILES+=usr/include/clang/3.4/tmmintrin.h +OLD_FILES+=usr/include/clang/3.4/wmmintrin.h +OLD_FILES+=usr/include/clang/3.4/x86intrin.h +OLD_FILES+=usr/include/clang/3.4/xmmintrin.h +OLD_FILES+=usr/include/clang/3.4/xopintrin.h +OLD_FILES+=usr/include/clang/3.4/arm_neon.h +OLD_FILES+=usr/include/clang/3.4/module.map +OLD_DIRS+=usr/include/clang/3.4 # 20140321: new clang import which bumps version from 3.3 to 3.4. OLD_FILES+=usr/bin/llvm-prof OLD_FILES+=usr/bin/llvm-ranlib Modified: stable/10/UPDATING ============================================================================== --- stable/10/UPDATING Mon May 26 20:14:36 2014 (r266714) +++ stable/10/UPDATING Mon May 26 20:45:44 2014 (r266715) @@ -16,6 +16,9 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20140512: + Clang and llvm have been upgraded to 3.4.1 release. + 20140321: Clang and llvm have been upgraded to 3.4 release. Modified: stable/10/contrib/llvm/include/llvm/IR/IntrinsicsX86.td ============================================================================== --- stable/10/contrib/llvm/include/llvm/IR/IntrinsicsX86.td Mon May 26 20:14:36 2014 (r266714) +++ stable/10/contrib/llvm/include/llvm/IR/IntrinsicsX86.td Mon May 26 20:45:44 2014 (r266715) @@ -1758,68 +1758,68 @@ let TargetPrefix = "x86" in { // All in def int_x86_avx2_gather_d_pd : GCCBuiltin<"__builtin_ia32_gatherd_pd">, Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v2f64_ty, llvm_i8_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx2_gather_d_pd_256 : GCCBuiltin<"__builtin_ia32_gatherd_pd256">, Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v4f64_ty, llvm_i8_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx2_gather_q_pd : GCCBuiltin<"__builtin_ia32_gatherq_pd">, Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_ptr_ty, llvm_v2i64_ty, llvm_v2f64_ty, llvm_i8_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx2_gather_q_pd_256 : GCCBuiltin<"__builtin_ia32_gatherq_pd256">, Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_ptr_ty, llvm_v4i64_ty, llvm_v4f64_ty, llvm_i8_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx2_gather_d_ps : GCCBuiltin<"__builtin_ia32_gatherd_ps">, Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx2_gather_d_ps_256 : GCCBuiltin<"__builtin_ia32_gatherd_ps256">, Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_ptr_ty, llvm_v8i32_ty, llvm_v8f32_ty, llvm_i8_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx2_gather_q_ps : GCCBuiltin<"__builtin_ia32_gatherq_ps">, Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_ptr_ty, llvm_v2i64_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx2_gather_q_ps_256 : GCCBuiltin<"__builtin_ia32_gatherq_ps256">, Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_ptr_ty, llvm_v4i64_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx2_gather_d_q : GCCBuiltin<"__builtin_ia32_gatherd_q">, Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v2i64_ty, llvm_i8_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx2_gather_d_q_256 : GCCBuiltin<"__builtin_ia32_gatherd_q256">, Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v4i64_ty, llvm_i8_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx2_gather_q_q : GCCBuiltin<"__builtin_ia32_gatherq_q">, Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_ptr_ty, llvm_v2i64_ty, llvm_v2i64_ty, llvm_i8_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx2_gather_q_q_256 : GCCBuiltin<"__builtin_ia32_gatherq_q256">, Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, llvm_ptr_ty, llvm_v4i64_ty, llvm_v4i64_ty, llvm_i8_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx2_gather_d_d : GCCBuiltin<"__builtin_ia32_gatherd_d">, Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx2_gather_d_d_256 : GCCBuiltin<"__builtin_ia32_gatherd_d256">, Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, llvm_ptr_ty, llvm_v8i32_ty, llvm_v8i32_ty, llvm_i8_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx2_gather_q_d : GCCBuiltin<"__builtin_ia32_gatherq_d">, Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_ptr_ty, llvm_v2i64_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx2_gather_q_d_256 : GCCBuiltin<"__builtin_ia32_gatherq_d256">, Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_ptr_ty, llvm_v4i64_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; } // Misc. @@ -2909,28 +2909,28 @@ let TargetPrefix = "x86" in { def int_x86_avx512_gather_dpd_mask_512 : GCCBuiltin<"__builtin_ia32_mask_gatherdpd512">, Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, llvm_i8_ty, llvm_v8i32_ty, llvm_ptr_ty, llvm_i32_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx512_gather_dps_mask_512 : GCCBuiltin<"__builtin_ia32_mask_gatherdps512">, Intrinsic<[llvm_v16f32_ty], [llvm_v16f32_ty, llvm_i16_ty, llvm_v16i32_ty, llvm_ptr_ty, llvm_i32_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx512_gather_qpd_mask_512 : GCCBuiltin<"__builtin_ia32_mask_gatherqpd512">, Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, llvm_i8_ty, llvm_v8i64_ty, llvm_ptr_ty, llvm_i32_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx512_gather_qps_mask_512 : GCCBuiltin<"__builtin_ia32_mask_gatherqps512">, Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_i8_ty, llvm_v8i64_ty, llvm_ptr_ty, llvm_i32_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx512_gather_dpd_512 : GCCBuiltin<"__builtin_ia32_gatherdpd512">, Intrinsic<[llvm_v8f64_ty], [llvm_v8i32_ty, llvm_ptr_ty, llvm_i32_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx512_gather_dps_512 : GCCBuiltin<"__builtin_ia32_gatherdps512">, Intrinsic<[llvm_v16f32_ty], [llvm_v16i32_ty, llvm_ptr_ty, llvm_i32_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx512_gather_qpd_512 : GCCBuiltin<"__builtin_ia32_gatherqpd512">, Intrinsic<[llvm_v8f64_ty], [llvm_v8i64_ty, llvm_ptr_ty, llvm_i32_ty], @@ -2938,12 +2938,12 @@ let TargetPrefix = "x86" in { def int_x86_avx512_gather_qps_512 : GCCBuiltin<"__builtin_ia32_gatherqps512">, Intrinsic<[llvm_v8f32_ty], [llvm_v8i64_ty, llvm_ptr_ty, llvm_i32_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx512_gather_dpq_mask_512 : GCCBuiltin<"__builtin_ia32_mask_gatherdpq512">, Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, llvm_i8_ty, llvm_v8i32_ty, llvm_ptr_ty, llvm_i32_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx512_gather_dpi_mask_512 : GCCBuiltin<"__builtin_ia32_mask_gatherdpi512">, Intrinsic<[llvm_v16i32_ty], [llvm_v16i32_ty, llvm_i16_ty, llvm_v16i32_ty, llvm_ptr_ty, llvm_i32_ty], @@ -2955,7 +2955,7 @@ let TargetPrefix = "x86" in { def int_x86_avx512_gather_qpi_mask_512 : GCCBuiltin<"__builtin_ia32_mask_gatherqpi512">, Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, llvm_i8_ty, llvm_v8i64_ty, llvm_ptr_ty, llvm_i32_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx512_gather_dpq_512 : GCCBuiltin<"__builtin_ia32_gatherdpq512">, Intrinsic<[llvm_v8i64_ty], [llvm_v8i32_ty, llvm_ptr_ty, Modified: stable/10/contrib/llvm/include/llvm/MC/MCAsmInfo.h ============================================================================== --- stable/10/contrib/llvm/include/llvm/MC/MCAsmInfo.h Mon May 26 20:14:36 2014 (r266714) +++ stable/10/contrib/llvm/include/llvm/MC/MCAsmInfo.h Mon May 26 20:45:44 2014 (r266715) @@ -266,13 +266,16 @@ namespace llvm { /// global as being a weak undefined symbol. const char *WeakRefDirective; // Defaults to NULL. - /// WeakDefDirective - This directive, if non-null, is used to declare a - /// global as being a weak defined symbol. - const char *WeakDefDirective; // Defaults to NULL. - - /// LinkOnceDirective - This directive, if non-null is used to declare a - /// global as being a weak defined symbol. This is used on cygwin/mingw. - const char *LinkOnceDirective; // Defaults to NULL. + /// True if we have a directive to declare a global as being a weak + /// defined symbol. + bool HasWeakDefDirective; // Defaults to false. + + /// True if we have a directive to declare a global as being a weak + /// defined symbol that can be hidden (unexported). + bool HasWeakDefCanBeHiddenDirective; // Defaults to false. + + /// True if we have a .linkonce directive. This is used on cygwin/mingw. + bool HasLinkOnceDirective; // Defaults to false. /// HiddenVisibilityAttr - This attribute, if not MCSA_Invalid, is used to /// declare a symbol as having hidden visibility. @@ -303,6 +306,10 @@ namespace llvm { /// uses relocations for references to other .debug_* sections. bool DwarfUsesRelocationsAcrossSections; + /// DwarfFDESymbolsUseAbsDiff - true if DWARF FDE symbol reference + /// relocations should be replaced by an absolute difference. + bool DwarfFDESymbolsUseAbsDiff; + /// DwarfRegNumForCFI - True if dwarf register numbers are printed /// instead of symbolic register names in .cfi_* directives. bool DwarfRegNumForCFI; // Defaults to false; @@ -497,8 +504,11 @@ namespace llvm { bool hasIdentDirective() const { return HasIdentDirective; } bool hasNoDeadStrip() const { return HasNoDeadStrip; } const char *getWeakRefDirective() const { return WeakRefDirective; } - const char *getWeakDefDirective() const { return WeakDefDirective; } - const char *getLinkOnceDirective() const { return LinkOnceDirective; } + bool hasWeakDefDirective() const { return HasWeakDefDirective; } + bool hasWeakDefCanBeHiddenDirective() const { + return HasWeakDefCanBeHiddenDirective; + } + bool hasLinkOnceDirective() const { return HasLinkOnceDirective; } MCSymbolAttr getHiddenVisibilityAttr() const { return HiddenVisibilityAttr;} MCSymbolAttr getHiddenDeclarationVisibilityAttr() const { @@ -528,6 +538,9 @@ namespace llvm { bool doesDwarfUseRelocationsAcrossSections() const { return DwarfUsesRelocationsAcrossSections; } + bool doDwarfFDESymbolsUseAbsDiff() const { + return DwarfFDESymbolsUseAbsDiff; + } bool useDwarfRegNumForCFI() const { return DwarfRegNumForCFI; } Modified: stable/10/contrib/llvm/lib/Analysis/BasicAliasAnalysis.cpp ============================================================================== --- stable/10/contrib/llvm/lib/Analysis/BasicAliasAnalysis.cpp Mon May 26 20:14:36 2014 (r266714) +++ stable/10/contrib/llvm/lib/Analysis/BasicAliasAnalysis.cpp Mon May 26 20:45:44 2014 (r266715) @@ -18,7 +18,10 @@ #include "llvm/ADT/SmallVector.h" #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Analysis/CaptureTracking.h" +#include "llvm/Analysis/CFG.h" +#include "llvm/Analysis/Dominators.h" #include "llvm/Analysis/InstructionSimplify.h" +#include "llvm/Analysis/LoopInfo.h" #include "llvm/Analysis/MemoryBuiltins.h" #include "llvm/Analysis/ValueTracking.h" #include "llvm/IR/Constants.h" @@ -38,6 +41,12 @@ #include using namespace llvm; +/// Cutoff after which to stop analysing a set of phi nodes potentially involved +/// in a cycle. Because we are analysing 'through' phi nodes we need to be +/// careful with value equivalence. We use reachability to make sure a value +/// cannot be involved in a cycle. +const unsigned MaxNumPhiBBsValueReachabilityCheck = 20; + //===----------------------------------------------------------------------===// // Useful predicates //===----------------------------------------------------------------------===// @@ -403,42 +412,6 @@ DecomposeGEPExpression(const Value *V, i return V; } -/// GetIndexDifference - Dest and Src are the variable indices from two -/// decomposed GetElementPtr instructions GEP1 and GEP2 which have common base -/// pointers. Subtract the GEP2 indices from GEP1 to find the symbolic -/// difference between the two pointers. -static void GetIndexDifference(SmallVectorImpl &Dest, - const SmallVectorImpl &Src) { - if (Src.empty()) return; - - for (unsigned i = 0, e = Src.size(); i != e; ++i) { - const Value *V = Src[i].V; - ExtensionKind Extension = Src[i].Extension; - int64_t Scale = Src[i].Scale; - - // Find V in Dest. This is N^2, but pointer indices almost never have more - // than a few variable indexes. - for (unsigned j = 0, e = Dest.size(); j != e; ++j) { - if (Dest[j].V != V || Dest[j].Extension != Extension) continue; - - // If we found it, subtract off Scale V's from the entry in Dest. If it - // goes to zero, remove the entry. - if (Dest[j].Scale != Scale) - Dest[j].Scale -= Scale; - else - Dest.erase(Dest.begin()+j); - Scale = 0; - break; - } - - // If we didn't consume this entry, add it to the end of the Dest list. - if (Scale) { - VariableGEPIndex Entry = { V, Extension, -Scale }; - Dest.push_back(Entry); - } - } -} - //===----------------------------------------------------------------------===// // BasicAliasAnalysis Pass //===----------------------------------------------------------------------===// @@ -492,6 +465,7 @@ namespace { // SmallDenseMap if it ever grows larger. // FIXME: This should really be shrink_to_inline_capacity_and_clear(). AliasCache.shrink_and_clear(); + VisitedPhiBBs.clear(); return Alias; } @@ -532,9 +506,39 @@ namespace { typedef SmallDenseMap AliasCacheTy; AliasCacheTy AliasCache; + /// \brief Track phi nodes we have visited. When interpret "Value" pointer + /// equality as value equality we need to make sure that the "Value" is not + /// part of a cycle. Otherwise, two uses could come from different + /// "iterations" of a cycle and see different values for the same "Value" + /// pointer. + /// The following example shows the problem: + /// %p = phi(%alloca1, %addr2) + /// %l = load %ptr + /// %addr1 = gep, %alloca2, 0, %l + /// %addr2 = gep %alloca2, 0, (%l + 1) + /// alias(%p, %addr1) -> MayAlias ! + /// store %l, ... + SmallPtrSet VisitedPhiBBs; + // Visited - Track instructions visited by pointsToConstantMemory. SmallPtrSet Visited; + /// \brief Check whether two Values can be considered equivalent. + /// + /// In addition to pointer equivalence of \p V1 and \p V2 this checks + /// whether they can not be part of a cycle in the value graph by looking at + /// all visited phi nodes an making sure that the phis cannot reach the + /// value. We have to do this because we are looking through phi nodes (That + /// is we say noalias(V, phi(VA, VB)) if noalias(V, VA) and noalias(V, VB). + bool isValueEqualInPotentialCycles(const Value *V1, const Value *V2); + + /// \brief Dest and Src are the variable indices from two decomposed + /// GetElementPtr instructions GEP1 and GEP2 which have common base + /// pointers. Subtract the GEP2 indices from GEP1 to find the symbolic + /// difference between the two pointers. + void GetIndexDifference(SmallVectorImpl &Dest, + const SmallVectorImpl &Src); + // aliasGEP - Provide a bunch of ad-hoc rules to disambiguate a GEP // instruction against another. AliasResult aliasGEP(const GEPOperator *V1, uint64_t V1Size, @@ -1005,7 +1009,15 @@ BasicAliasAnalysis::aliasGEP(const GEPOp return NoAlias; } } else { - if (V1Size != UnknownSize) { + // We have the situation where: + // + + + // | BaseOffset | + // ---------------->| + // |-->V1Size |-------> V2Size + // GEP1 V2 + // We need to know that V2Size is not unknown, otherwise we might have + // stripped a gep with negative index ('gep , -1, ...). + if (V1Size != UnknownSize && V2Size != UnknownSize) { if (-(uint64_t)GEP1BaseOffset < V1Size) return PartialAlias; return NoAlias; @@ -1094,6 +1106,10 @@ BasicAliasAnalysis::aliasPHI(const PHINo const MDNode *PNTBAAInfo, const Value *V2, uint64_t V2Size, const MDNode *V2TBAAInfo) { + // Track phi nodes we have visited. We use this information when we determine + // value equivalence. + VisitedPhiBBs.insert(PN->getParent()); + // If the values are PHIs in the same block, we can do a more precise // as well as efficient check: just check for aliases between the values // on corresponding edges. @@ -1187,7 +1203,13 @@ BasicAliasAnalysis::aliasCheck(const Val V2 = V2->stripPointerCasts(); // Are we checking for alias of the same value? - if (V1 == V2) return MustAlias; + // Because we look 'through' phi nodes we could look at "Value" pointers from + // different iterations. We must therefore make sure that this is not the + // case. The function isValueEqualInPotentialCycles ensures that this cannot + // happen by looking at the visited phi nodes and making sure they cannot + // reach the value. + if (isValueEqualInPotentialCycles(V1, V2)) + return MustAlias; if (!V1->getType()->isPointerTy() || !V2->getType()->isPointerTy()) return NoAlias; // Scalars cannot alias each other @@ -1307,3 +1329,71 @@ BasicAliasAnalysis::aliasCheck(const Val Location(V2, V2Size, V2TBAAInfo)); return AliasCache[Locs] = Result; } + +bool BasicAliasAnalysis::isValueEqualInPotentialCycles(const Value *V, + const Value *V2) { + if (V != V2) + return false; + + const Instruction *Inst = dyn_cast(V); + if (!Inst) + return true; + + if (VisitedPhiBBs.size() > MaxNumPhiBBsValueReachabilityCheck) + return false; + + // Use dominance or loop info if available. + DominatorTree *DT = getAnalysisIfAvailable(); + LoopInfo *LI = getAnalysisIfAvailable(); + + // Make sure that the visited phis cannot reach the Value. This ensures that + // the Values cannot come from different iterations of a potential cycle the + // phi nodes could be involved in. + for (SmallPtrSet::iterator PI = VisitedPhiBBs.begin(), + PE = VisitedPhiBBs.end(); + PI != PE; ++PI) + if (isPotentiallyReachable((*PI)->begin(), Inst, DT, LI)) + return false; + + return true; +} + +/// GetIndexDifference - Dest and Src are the variable indices from two +/// decomposed GetElementPtr instructions GEP1 and GEP2 which have common base +/// pointers. Subtract the GEP2 indices from GEP1 to find the symbolic +/// difference between the two pointers. +void BasicAliasAnalysis::GetIndexDifference( + SmallVectorImpl &Dest, + const SmallVectorImpl &Src) { + if (Src.empty()) + return; + + for (unsigned i = 0, e = Src.size(); i != e; ++i) { + const Value *V = Src[i].V; + ExtensionKind Extension = Src[i].Extension; + int64_t Scale = Src[i].Scale; + + // Find V in Dest. This is N^2, but pointer indices almost never have more + // than a few variable indexes. + for (unsigned j = 0, e = Dest.size(); j != e; ++j) { + if (!isValueEqualInPotentialCycles(Dest[j].V, V) || + Dest[j].Extension != Extension) + continue; + + // If we found it, subtract off Scale V's from the entry in Dest. If it + // goes to zero, remove the entry. + if (Dest[j].Scale != Scale) + Dest[j].Scale -= Scale; + else + Dest.erase(Dest.begin() + j); + Scale = 0; + break; + } + + // If we didn't consume this entry, add it to the end of the Dest list. + if (Scale) { + VariableGEPIndex Entry = { V, Extension, -Scale }; + Dest.push_back(Entry); + } + } +} Modified: stable/10/contrib/llvm/lib/Analysis/IVUsers.cpp ============================================================================== --- stable/10/contrib/llvm/lib/Analysis/IVUsers.cpp Mon May 26 20:14:36 2014 (r266714) +++ stable/10/contrib/llvm/lib/Analysis/IVUsers.cpp Mon May 26 20:45:44 2014 (r266715) @@ -187,15 +187,34 @@ bool IVUsers::AddUsersImpl(Instruction * if (AddUserToIVUsers) { // Okay, we found a user that we cannot reduce. - IVUses.push_back(new IVStrideUse(this, User, I)); - IVStrideUse &NewUse = IVUses.back(); + IVStrideUse &NewUse = AddUser(User, I); // Autodetect the post-inc loop set, populating NewUse.PostIncLoops. // The regular return value here is discarded; instead of recording // it, we just recompute it when we need it. + const SCEV *OriginalISE = ISE; ISE = TransformForPostIncUse(NormalizeAutodetect, ISE, User, I, NewUse.PostIncLoops, *SE, *DT); + + // PostIncNormalization effectively simplifies the expression under + // pre-increment assumptions. Those assumptions (no wrapping) might not + // hold for the post-inc value. Catch such cases by making sure the + // transformation is invertible. + if (OriginalISE != ISE) { + const SCEV *DenormalizedISE = + TransformForPostIncUse(Denormalize, ISE, User, I, + NewUse.PostIncLoops, *SE, *DT); + + // If we normalized the expression, but denormalization doesn't give the + // original one, discard this user. + if (OriginalISE != DenormalizedISE) { + DEBUG(dbgs() << " DISCARDING (NORMALIZATION ISN'T INVERTIBLE): " + << *ISE << '\n'); + IVUses.pop_back(); + return false; + } + } DEBUG(if (SE->getSCEV(I) != ISE) dbgs() << " NORMALIZED TO: " << *ISE << '\n'); } Modified: stable/10/contrib/llvm/lib/Analysis/ScalarEvolution.cpp ============================================================================== --- stable/10/contrib/llvm/lib/Analysis/ScalarEvolution.cpp Mon May 26 20:14:36 2014 (r266714) +++ stable/10/contrib/llvm/lib/Analysis/ScalarEvolution.cpp Mon May 26 20:45:44 2014 (r266715) @@ -6218,7 +6218,7 @@ bool ScalarEvolution::isImpliedCond(ICmp // LHS' type is checked for above. if (getTypeSizeInBits(LHS->getType()) > getTypeSizeInBits(FoundLHS->getType())) { - if (CmpInst::isSigned(Pred)) { + if (CmpInst::isSigned(FoundPred)) { FoundLHS = getSignExtendExpr(FoundLHS, LHS->getType()); FoundRHS = getSignExtendExpr(FoundRHS, LHS->getType()); } else { Modified: stable/10/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp ============================================================================== --- stable/10/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Mon May 26 20:14:36 2014 (r266714) +++ stable/10/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Mon May 26 20:45:44 2014 (r266715) @@ -223,13 +223,14 @@ void AsmPrinter::EmitLinkage(const Globa case GlobalValue::WeakAnyLinkage: case GlobalValue::WeakODRLinkage: case GlobalValue::LinkerPrivateWeakLinkage: - if (MAI->getWeakDefDirective() != 0) { + if (MAI->hasWeakDefDirective()) { // .globl _foo OutStreamer.EmitSymbolAttribute(GVSym, MCSA_Global); bool CanBeHidden = false; - if (Linkage == GlobalValue::LinkOnceODRLinkage) { + if (Linkage == GlobalValue::LinkOnceODRLinkage && + MAI->hasWeakDefCanBeHiddenDirective()) { if (GV->hasUnnamedAddr()) { CanBeHidden = true; } else { @@ -244,7 +245,7 @@ void AsmPrinter::EmitLinkage(const Globa OutStreamer.EmitSymbolAttribute(GVSym, MCSA_WeakDefinition); else OutStreamer.EmitSymbolAttribute(GVSym, MCSA_WeakDefAutoPrivate); - } else if (MAI->getLinkOnceDirective() != 0) { + } else if (MAI->hasLinkOnceDirective()) { // .globl _foo OutStreamer.EmitSymbolAttribute(GVSym, MCSA_Global); //NOTE: linkonce is handled by the section the symbol was assigned to. Modified: stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp ============================================================================== --- stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Mon May 26 20:14:36 2014 (r266714) +++ stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Mon May 26 20:45:44 2014 (r266715) @@ -8547,7 +8547,10 @@ struct MemOpLink { // base ptr. struct ConsecutiveMemoryChainSorter { bool operator()(MemOpLink LHS, MemOpLink RHS) { - return LHS.OffsetFromBase < RHS.OffsetFromBase; + return + LHS.OffsetFromBase < RHS.OffsetFromBase || + (LHS.OffsetFromBase == RHS.OffsetFromBase && + LHS.SequenceNum > RHS.SequenceNum); } }; Modified: stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp ============================================================================== --- stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp Mon May 26 20:14:36 2014 (r266714) +++ stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp Mon May 26 20:45:44 2014 (r266715) @@ -210,6 +210,7 @@ SDValue VectorLegalizer::LegalizeOp(SDVa case ISD::SRL: case ISD::ROTL: case ISD::ROTR: + case ISD::BSWAP: case ISD::CTLZ: case ISD::CTTZ: case ISD::CTLZ_ZERO_UNDEF: Modified: stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp ============================================================================== --- stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp Mon May 26 20:14:36 2014 (r266714) +++ stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp Mon May 26 20:45:44 2014 (r266715) @@ -219,8 +219,11 @@ void ScheduleDAGSDNodes::ClusterNeighbor DenseMap O2SMap; // Map from offset to SDNode. bool Cluster = false; SDNode *Base = Node; + // This algorithm requires a reasonably low use count before finding a match + // to avoid uselessly blowing up compile time in large blocks. + unsigned UseCount = 0; for (SDNode::use_iterator I = Chain->use_begin(), E = Chain->use_end(); - I != E; ++I) { + I != E && UseCount < 100; ++I, ++UseCount) { SDNode *User = *I; if (User == Node || !Visited.insert(User)) continue; @@ -237,6 +240,8 @@ void ScheduleDAGSDNodes::ClusterNeighbor if (Offset2 < Offset1) Base = User; Cluster = true; + // Reset UseCount to allow more matches. + UseCount = 0; } if (!Cluster) Modified: stable/10/contrib/llvm/lib/MC/MCAsmInfo.cpp ============================================================================== --- stable/10/contrib/llvm/lib/MC/MCAsmInfo.cpp Mon May 26 20:14:36 2014 (r266714) +++ stable/10/contrib/llvm/lib/MC/MCAsmInfo.cpp Mon May 26 20:45:44 2014 (r266715) @@ -76,8 +76,9 @@ MCAsmInfo::MCAsmInfo() { HasIdentDirective = false; HasNoDeadStrip = false; WeakRefDirective = 0; - WeakDefDirective = 0; - LinkOnceDirective = 0; + HasWeakDefDirective = false; + HasWeakDefCanBeHiddenDirective = false; + HasLinkOnceDirective = false; HiddenVisibilityAttr = MCSA_Hidden; HiddenDeclarationVisibilityAttr = MCSA_Hidden; ProtectedVisibilityAttr = MCSA_Protected; @@ -85,6 +86,7 @@ MCAsmInfo::MCAsmInfo() { SupportsDebugInformation = false; ExceptionsType = ExceptionHandling::None; DwarfUsesRelocationsAcrossSections = true; + DwarfFDESymbolsUseAbsDiff = false; DwarfRegNumForCFI = false; HasMicrosoftFastStdCallMangling = false; NeedsDwarfSectionOffsetDirective = false; Modified: stable/10/contrib/llvm/lib/MC/MCAsmInfoCOFF.cpp ============================================================================== --- stable/10/contrib/llvm/lib/MC/MCAsmInfoCOFF.cpp Mon May 26 20:14:36 2014 (r266714) +++ stable/10/contrib/llvm/lib/MC/MCAsmInfoCOFF.cpp Mon May 26 20:45:44 2014 (r266715) @@ -27,7 +27,7 @@ MCAsmInfoCOFF::MCAsmInfoCOFF() { HasSingleParameterDotFile = false; PrivateGlobalPrefix = "L"; // Prefix for private global symbols WeakRefDirective = "\t.weak\t"; - LinkOnceDirective = "\t.linkonce discard\n"; + HasLinkOnceDirective = true; // Doesn't support visibility: HiddenVisibilityAttr = HiddenDeclarationVisibilityAttr = MCSA_Invalid; Modified: stable/10/contrib/llvm/lib/MC/MCAsmInfoDarwin.cpp ============================================================================== --- stable/10/contrib/llvm/lib/MC/MCAsmInfoDarwin.cpp Mon May 26 20:14:36 2014 (r266714) +++ stable/10/contrib/llvm/lib/MC/MCAsmInfoDarwin.cpp Mon May 26 20:45:44 2014 (r266715) @@ -36,7 +36,8 @@ MCAsmInfoDarwin::MCAsmInfoDarwin() { InlineAsmEnd = " InlineAsm End"; // Directives: - WeakDefDirective = "\t.weak_definition "; + HasWeakDefDirective = true; + HasWeakDefCanBeHiddenDirective = true; WeakRefDirective = "\t.weak_reference "; ZeroDirective = "\t.space\t"; // ".space N" emits N zeros. HasMachoZeroFillDirective = true; // Uses .zerofill Modified: stable/10/contrib/llvm/lib/MC/MCDwarf.cpp ============================================================================== --- stable/10/contrib/llvm/lib/MC/MCDwarf.cpp Mon May 26 20:14:36 2014 (r266714) +++ stable/10/contrib/llvm/lib/MC/MCDwarf.cpp Mon May 26 20:45:44 2014 (r266715) @@ -839,8 +839,9 @@ static unsigned getSizeForEncoding(MCStr } } -static void EmitSymbol(MCStreamer &streamer, const MCSymbol &symbol, - unsigned symbolEncoding, const char *comment = 0) { +static void EmitFDESymbol(MCStreamer &streamer, const MCSymbol &symbol, + unsigned symbolEncoding, bool isEH, + const char *comment = 0) { MCContext &context = streamer.getContext(); const MCAsmInfo *asmInfo = context.getAsmInfo(); const MCExpr *v = asmInfo->getExprForFDESymbol(&symbol, @@ -848,7 +849,10 @@ static void EmitSymbol(MCStreamer &strea streamer); unsigned size = getSizeForEncoding(streamer, symbolEncoding); if (streamer.isVerboseAsm() && comment) streamer.AddComment(comment); - streamer.EmitAbsValue(v, size); + if (asmInfo->doDwarfFDESymbolsUseAbsDiff() && isEH) + streamer.EmitAbsValue(v, size); + else + streamer.EmitValue(v, size); } static void EmitPersonality(MCStreamer &streamer, const MCSymbol &symbol, @@ -1347,7 +1351,7 @@ MCSymbol *FrameEmitterImpl::EmitFDE(MCSt unsigned PCEncoding = IsEH ? MOFI->getFDEEncoding(UsingCFI) : (unsigned)dwarf::DW_EH_PE_absptr; unsigned PCSize = getSizeForEncoding(streamer, PCEncoding); - EmitSymbol(streamer, *frame.Begin, PCEncoding, "FDE initial location"); + EmitFDESymbol(streamer, *frame.Begin, PCEncoding, IsEH, "FDE initial location"); // PC Range const MCExpr *Range = MakeStartMinusEndExpr(streamer, *frame.Begin, @@ -1367,8 +1371,8 @@ MCSymbol *FrameEmitterImpl::EmitFDE(MCSt // Augmentation Data if (frame.Lsda) - EmitSymbol(streamer, *frame.Lsda, frame.LsdaEncoding, - "Language Specific Data Area"); + EmitFDESymbol(streamer, *frame.Lsda, frame.LsdaEncoding, true, + "Language Specific Data Area"); } // Call Frame Instructions Modified: stable/10/contrib/llvm/lib/MC/MCParser/AsmParser.cpp ============================================================================== --- stable/10/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Mon May 26 20:14:36 2014 (r266714) +++ stable/10/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Mon May 26 20:45:44 2014 (r266715) @@ -4297,6 +4297,10 @@ bool AsmParser::parseMSInlineAsm( break; } case AOK_DotOperator: + // Insert the dot if the user omitted it. + OS.flush(); + if (AsmStringIR.at(AsmStringIR.size() - 1) != '.') + OS << '.'; OS << (*I).Val; break; } Modified: stable/10/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp ============================================================================== --- stable/10/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp Mon May 26 20:14:36 2014 (r266714) +++ stable/10/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp Mon May 26 20:45:44 2014 (r266715) @@ -31,12 +31,8 @@ using namespace llvm; static TargetLoweringObjectFile *createTLOF(AArch64TargetMachine &TM) { const AArch64Subtarget *Subtarget = &TM.getSubtarget(); - - if (Subtarget->isTargetLinux()) - return new AArch64LinuxTargetObjectFile(); - if (Subtarget->isTargetELF()) - return new TargetLoweringObjectFileELF(); - llvm_unreachable("unknown subtarget type"); + assert (Subtarget->isTargetELF() && "unknown subtarget type"); + return new AArch64ElfTargetObjectFile(); } AArch64TargetLowering::AArch64TargetLowering(AArch64TargetMachine &TM) @@ -2782,7 +2778,7 @@ AArch64TargetLowering::LowerSETCC(SDValu SDValue AArch64TargetLowering::LowerVACOPY(SDValue Op, SelectionDAG &DAG) const { const Value *DestSV = cast(Op.getOperand(3))->getValue(); - const Value *SrcSV = cast(Op.getOperand(3))->getValue(); + const Value *SrcSV = cast(Op.getOperand(4))->getValue(); // We have to make sure we copy the entire structure: 8+8+8+4+4 = 32 bytes // rather than just 8. Modified: stable/10/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.td ============================================================================== --- stable/10/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.td Mon May 26 20:14:36 2014 (r266714) +++ stable/10/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.td Mon May 26 20:45:44 2014 (r266715) @@ -2587,6 +2587,7 @@ class A64I_SRexs_impl size, bits pat, itin> { let mayStore = 1; let PostEncoderMethod = "fixLoadStoreExclusive<1,0>"; + let Constraints = "@earlyclobber $Rs"; } multiclass A64I_SRex opcode, string prefix> { Modified: stable/10/contrib/llvm/lib/Target/AArch64/AArch64TargetObjectFile.cpp ============================================================================== --- stable/10/contrib/llvm/lib/Target/AArch64/AArch64TargetObjectFile.cpp Mon May 26 20:14:36 2014 (r266714) +++ stable/10/contrib/llvm/lib/Target/AArch64/AArch64TargetObjectFile.cpp Mon May 26 20:45:44 2014 (r266715) @@ -22,3 +22,10 @@ AArch64LinuxTargetObjectFile::Initialize TargetLoweringObjectFileELF::Initialize(Ctx, TM); InitializeELF(TM.Options.UseInitArray); } + +void +AArch64ElfTargetObjectFile::Initialize(MCContext &Ctx, + const TargetMachine &TM) { + TargetLoweringObjectFileELF::Initialize(Ctx, TM); + InitializeELF(TM.Options.UseInitArray); +} Modified: stable/10/contrib/llvm/lib/Target/AArch64/AArch64TargetObjectFile.h ============================================================================== --- stable/10/contrib/llvm/lib/Target/AArch64/AArch64TargetObjectFile.h Mon May 26 20:14:36 2014 (r266714) +++ stable/10/contrib/llvm/lib/Target/AArch64/AArch64TargetObjectFile.h Mon May 26 20:45:44 2014 (r266715) @@ -20,8 +20,12 @@ namespace llvm { - /// AArch64LinuxTargetObjectFile - This implementation is used for linux - /// AArch64. + /// AArch64ElfTargetObjectFile - This implementation is used for ELF + /// AArch64 targets. + class AArch64ElfTargetObjectFile : public TargetLoweringObjectFileELF { + virtual void Initialize(MCContext &Ctx, const TargetMachine &TM); + }; + class AArch64LinuxTargetObjectFile : public TargetLoweringObjectFileELF { virtual void Initialize(MCContext &Ctx, const TargetMachine &TM); }; Modified: stable/10/contrib/llvm/lib/Target/ARM/A15SDOptimizer.cpp ============================================================================== --- stable/10/contrib/llvm/lib/Target/ARM/A15SDOptimizer.cpp Mon May 26 20:14:36 2014 (r266714) +++ stable/10/contrib/llvm/lib/Target/ARM/A15SDOptimizer.cpp Mon May 26 20:45:44 2014 (r266715) @@ -418,7 +418,8 @@ SmallVector A15SDOptimizer: if (!MO.isReg() || !MO.isUse()) continue; if (!usesRegClass(MO, &ARM::DPRRegClass) && - !usesRegClass(MO, &ARM::QPRRegClass)) + !usesRegClass(MO, &ARM::QPRRegClass) && + !usesRegClass(MO, &ARM::DPairRegClass)) // Treat DPair as QPR continue; Defs.push_back(MO.getReg()); @@ -538,7 +539,10 @@ A15SDOptimizer::optimizeAllLanesPattern( InsertPt++; unsigned Out; - if (MRI->getRegClass(Reg)->hasSuperClassEq(&ARM::QPRRegClass)) { + // DPair has the same length as QPR and also has two DPRs as subreg. + // Treat DPair as QPR. + if (MRI->getRegClass(Reg)->hasSuperClassEq(&ARM::QPRRegClass) || + MRI->getRegClass(Reg)->hasSuperClassEq(&ARM::DPairRegClass)) { unsigned DSub0 = createExtractSubreg(MBB, InsertPt, DL, Reg, ARM::dsub_0, &ARM::DPRRegClass); unsigned DSub1 = createExtractSubreg(MBB, InsertPt, DL, Reg, @@ -571,7 +575,9 @@ A15SDOptimizer::optimizeAllLanesPattern( default: llvm_unreachable("Unknown preferred lane!"); } - bool UsesQPR = usesRegClass(MI->getOperand(0), &ARM::QPRRegClass); + // Treat DPair as QPR + bool UsesQPR = usesRegClass(MI->getOperand(0), &ARM::QPRRegClass) || + usesRegClass(MI->getOperand(0), &ARM::DPairRegClass); Out = createImplicitDef(MBB, InsertPt, DL); Out = createInsertSubreg(MBB, InsertPt, DL, Out, PrefLane, Reg); Modified: stable/10/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp ============================================================================== --- stable/10/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp Mon May 26 20:14:36 2014 (r266714) +++ stable/10/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp Mon May 26 20:45:44 2014 (r266715) @@ -3684,6 +3684,7 @@ ARMBaseInstrInfo::getOperandLatency(cons case ARM::VLD3d16Pseudo: case ARM::VLD3d32Pseudo: case ARM::VLD1d64TPseudo: + case ARM::VLD1d64TPseudoWB_fixed: case ARM::VLD3d8Pseudo_UPD: case ARM::VLD3d16Pseudo_UPD: case ARM::VLD3d32Pseudo_UPD: @@ -3700,6 +3701,7 @@ ARMBaseInstrInfo::getOperandLatency(cons case ARM::VLD4d16Pseudo: case ARM::VLD4d32Pseudo: case ARM::VLD1d64QPseudo: + case ARM::VLD1d64QPseudoWB_fixed: case ARM::VLD4d8Pseudo_UPD: case ARM::VLD4d16Pseudo_UPD: case ARM::VLD4d32Pseudo_UPD: Modified: stable/10/contrib/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp ============================================================================== --- stable/10/contrib/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp Mon May 26 20:14:36 2014 (r266714) +++ stable/10/contrib/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp Mon May 26 20:45:44 2014 (r266715) @@ -136,7 +136,9 @@ static const NEONLdStTableEntry NEONLdSt { ARM::VLD1LNq8Pseudo_UPD, ARM::VLD1LNd8_UPD, true, true, true, EvenDblSpc, 1, 8 ,true}, { ARM::VLD1d64QPseudo, ARM::VLD1d64Q, true, false, false, SingleSpc, 4, 1 ,false}, +{ ARM::VLD1d64QPseudoWB_fixed, ARM::VLD1d64Qwb_fixed, true, true, false, SingleSpc, 4, 1 ,false}, { ARM::VLD1d64TPseudo, ARM::VLD1d64T, true, false, false, SingleSpc, 3, 1 ,false}, +{ ARM::VLD1d64TPseudoWB_fixed, ARM::VLD1d64Twb_fixed, true, true, false, SingleSpc, 3, 1 ,false}, { ARM::VLD2LNd16Pseudo, ARM::VLD2LNd16, true, false, false, SingleSpc, 2, 4 ,true}, { ARM::VLD2LNd16Pseudo_UPD, ARM::VLD2LNd16_UPD, true, true, true, SingleSpc, 2, 4 ,true}, @@ -1071,6 +1073,7 @@ bool ARMExpandPseudo::ExpandMI(MachineBa case ARM::VLD3d16Pseudo: case ARM::VLD3d32Pseudo: case ARM::VLD1d64TPseudo: + case ARM::VLD1d64TPseudoWB_fixed: case ARM::VLD3d8Pseudo_UPD: case ARM::VLD3d16Pseudo_UPD: case ARM::VLD3d32Pseudo_UPD: @@ -1087,6 +1090,7 @@ bool ARMExpandPseudo::ExpandMI(MachineBa case ARM::VLD4d16Pseudo: case ARM::VLD4d32Pseudo: case ARM::VLD1d64QPseudo: + case ARM::VLD1d64QPseudoWB_fixed: case ARM::VLD4d8Pseudo_UPD: case ARM::VLD4d16Pseudo_UPD: case ARM::VLD4d32Pseudo_UPD: Modified: stable/10/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp ============================================================================== --- stable/10/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Mon May 26 20:14:36 2014 (r266714) +++ stable/10/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Mon May 26 20:45:44 2014 (r266715) @@ -1673,9 +1673,61 @@ SDValue ARMDAGToDAGISel::GetVLDSTAlign(S return CurDAG->getTargetConstant(Alignment, MVT::i32); } +static bool isVLDfixed(unsigned Opc) +{ + switch (Opc) { + default: return false; + case ARM::VLD1d8wb_fixed : return true; + case ARM::VLD1d16wb_fixed : return true; + case ARM::VLD1d64Qwb_fixed : return true; + case ARM::VLD1d32wb_fixed : return true; + case ARM::VLD1d64wb_fixed : return true; + case ARM::VLD1d64TPseudoWB_fixed : return true; + case ARM::VLD1d64QPseudoWB_fixed : return true; + case ARM::VLD1q8wb_fixed : return true; + case ARM::VLD1q16wb_fixed : return true; + case ARM::VLD1q32wb_fixed : return true; + case ARM::VLD1q64wb_fixed : return true; + case ARM::VLD2d8wb_fixed : return true; + case ARM::VLD2d16wb_fixed : return true; + case ARM::VLD2d32wb_fixed : return true; + case ARM::VLD2q8PseudoWB_fixed : return true; + case ARM::VLD2q16PseudoWB_fixed : return true; + case ARM::VLD2q32PseudoWB_fixed : return true; + case ARM::VLD2DUPd8wb_fixed : return true; + case ARM::VLD2DUPd16wb_fixed : return true; + case ARM::VLD2DUPd32wb_fixed : return true; + } +} + +static bool isVSTfixed(unsigned Opc) +{ + switch (Opc) { + default: return false; + case ARM::VST1d8wb_fixed : return true; + case ARM::VST1d16wb_fixed : return true; + case ARM::VST1d32wb_fixed : return true; + case ARM::VST1d64wb_fixed : return true; + case ARM::VST1q8wb_fixed : return true; + case ARM::VST1q16wb_fixed : return true; + case ARM::VST1q32wb_fixed : return true; + case ARM::VST1q64wb_fixed : return true; + case ARM::VST1d64TPseudoWB_fixed : return true; + case ARM::VST1d64QPseudoWB_fixed : return true; + case ARM::VST2d8wb_fixed : return true; + case ARM::VST2d16wb_fixed : return true; + case ARM::VST2d32wb_fixed : return true; + case ARM::VST2q8PseudoWB_fixed : return true; + case ARM::VST2q16PseudoWB_fixed : return true; + case ARM::VST2q32PseudoWB_fixed : return true; + } +} + // Get the register stride update opcode of a VLD/VST instruction that // is otherwise equivalent to the given fixed stride updating instruction. static unsigned getVLDSTRegisterUpdateOpcode(unsigned Opc) { + assert((isVLDfixed(Opc) || isVSTfixed(Opc)) + && "Incorrect fixed stride updating instruction."); switch (Opc) { default: break; case ARM::VLD1d8wb_fixed: return ARM::VLD1d8wb_register; @@ -1686,6 +1738,10 @@ static unsigned getVLDSTRegisterUpdateOp case ARM::VLD1q16wb_fixed: return ARM::VLD1q16wb_register; case ARM::VLD1q32wb_fixed: return ARM::VLD1q32wb_register; case ARM::VLD1q64wb_fixed: return ARM::VLD1q64wb_register; + case ARM::VLD1d64Twb_fixed: return ARM::VLD1d64Twb_register; + case ARM::VLD1d64Qwb_fixed: return ARM::VLD1d64Qwb_register; + case ARM::VLD1d64TPseudoWB_fixed: return ARM::VLD1d64TPseudoWB_register; + case ARM::VLD1d64QPseudoWB_fixed: return ARM::VLD1d64QPseudoWB_register; case ARM::VST1d8wb_fixed: return ARM::VST1d8wb_register; case ARM::VST1d16wb_fixed: return ARM::VST1d16wb_register; @@ -1785,11 +1841,11 @@ SDNode *ARMDAGToDAGISel::SelectVLD(SDNod SDValue Inc = N->getOperand(AddrOpIdx + 1); // FIXME: VLD1/VLD2 fixed increment doesn't need Reg0. Remove the reg0 // case entirely when the rest are updated to that form, too. - if ((NumVecs == 1 || NumVecs == 2) && !isa(Inc.getNode())) + if ((NumVecs <= 2) && !isa(Inc.getNode())) Opc = getVLDSTRegisterUpdateOpcode(Opc); - // We use a VLD1 for v1i64 even if the pseudo says vld2/3/4, so + // FIXME: We use a VLD1 for v1i64 even if the pseudo says vld2/3/4, so // check for that explicitly too. Horribly hacky, but temporary. - if ((NumVecs != 1 && NumVecs != 2 && Opc != ARM::VLD1q64wb_fixed) || + if ((NumVecs > 2 && !isVLDfixed(Opc)) || !isa(Inc.getNode())) Ops.push_back(isa(Inc.getNode()) ? Reg0 : Inc); } @@ -1937,11 +1993,12 @@ SDNode *ARMDAGToDAGISel::SelectVST(SDNod // case entirely when the rest are updated to that form, too. if (NumVecs <= 2 && !isa(Inc.getNode())) Opc = getVLDSTRegisterUpdateOpcode(Opc); - // We use a VST1 for v1i64 even if the pseudo says vld2/3/4, so + // FIXME: We use a VST1 for v1i64 even if the pseudo says vld2/3/4, so // check for that explicitly too. Horribly hacky, but temporary. - if ((NumVecs > 2 && Opc != ARM::VST1q64wb_fixed) || - !isa(Inc.getNode())) - Ops.push_back(isa(Inc.getNode()) ? Reg0 : Inc); + if (!isa(Inc.getNode())) + Ops.push_back(Inc); + else if (NumVecs > 2 && !isVSTfixed(Opc)) + Ops.push_back(Reg0); } Ops.push_back(SrcReg); Ops.push_back(Pred); @@ -2834,7 +2891,7 @@ SDNode *ARMDAGToDAGISel::Select(SDNode * static const uint16_t DOpcodes[] = { ARM::VLD3d8Pseudo_UPD, ARM::VLD3d16Pseudo_UPD, ARM::VLD3d32Pseudo_UPD, - ARM::VLD1q64wb_fixed}; + ARM::VLD1d64TPseudoWB_fixed}; static const uint16_t QOpcodes0[] = { ARM::VLD3q8Pseudo_UPD, ARM::VLD3q16Pseudo_UPD, ARM::VLD3q32Pseudo_UPD }; @@ -2848,7 +2905,7 @@ SDNode *ARMDAGToDAGISel::Select(SDNode * static const uint16_t DOpcodes[] = { ARM::VLD4d8Pseudo_UPD, ARM::VLD4d16Pseudo_UPD, ARM::VLD4d32Pseudo_UPD, - ARM::VLD1q64wb_fixed}; + ARM::VLD1d64QPseudoWB_fixed}; static const uint16_t QOpcodes0[] = { ARM::VLD4q8Pseudo_UPD, ARM::VLD4q16Pseudo_UPD, ARM::VLD4q32Pseudo_UPD }; Modified: stable/10/contrib/llvm/lib/Target/ARM/ARMInstrNEON.td ============================================================================== --- stable/10/contrib/llvm/lib/Target/ARM/ARMInstrNEON.td Mon May 26 20:14:36 2014 (r266714) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Mon May 26 21:09:35 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2AB51BF; Mon, 26 May 2014 21:09:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1773A2B7C; Mon, 26 May 2014 21:09:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4QL9YFm070768; Mon, 26 May 2014 21:09:34 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4QL9Y67070767; Mon, 26 May 2014 21:09:34 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201405262109.s4QL9Y67070767@svn.freebsd.org> From: Warren Block Date: Mon, 26 May 2014 21:09:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266716 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 21:09:35 -0000 Author: wblock (doc committer) Date: Mon May 26 21:09:34 2014 New Revision: 266716 URL: http://svnweb.freebsd.org/changeset/base/266716 Log: Remove vt.4.gz from ObsoleteFiles.inc that happily removes our shiny new vt.4 man page. It was in there from the removal of pcvt eight years ago. Approved by: emaste MFC after: 3 days Modified: stable/10/ObsoleteFiles.inc Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Mon May 26 20:45:44 2014 (r266715) +++ stable/10/ObsoleteFiles.inc Mon May 26 21:09:34 2014 (r266716) @@ -2747,7 +2747,6 @@ OLD_DIRS+=usr/share/misc/pcvtfonts OLD_FILES+=usr/share/misc/keycap.pcvt OLD_FILES+=usr/share/man/man8/ispcvt.8.gz OLD_FILES+=usr/share/man/man5/keycap.5.gz -OLD_FILES+=usr/share/man/man4/vt.4.gz OLD_FILES+=usr/share/man/man4/pcvt.4.gz OLD_FILES+=usr/share/man/man3/kgetstr.3.gz OLD_FILES+=usr/share/man/man3/kgetnum.3.gz From owner-svn-src-stable@FreeBSD.ORG Mon May 26 22:27:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A76F6BB; Mon, 26 May 2014 22:27:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 273C12160; Mon, 26 May 2014 22:27:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4QMRFIq006967; Mon, 26 May 2014 22:27:15 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4QMRFXD006966; Mon, 26 May 2014 22:27:15 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405262227.s4QMRFXD006966@svn.freebsd.org> From: Ian Lepore Date: Mon, 26 May 2014 22:27:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266717 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 22:27:15 -0000 Author: ian Date: Mon May 26 22:27:14 2014 New Revision: 266717 URL: http://svnweb.freebsd.org/changeset/base/266717 Log: MFC 263949, 265063: Add library dependencies for a couple bootstrap libs to fix build failures for high -jN values when building with gcc. Modified: stable/10/Makefile.inc1 Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Mon May 26 21:09:34 2014 (r266716) +++ stable/10/Makefile.inc1 Mon May 26 22:27:14 2014 (r266717) @@ -1500,6 +1500,10 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 lib/libutil ${_lib_libypclnt} lib/libz lib/msun \ ${_secure_lib_libcrypto} ${_lib_libldns} \ ${_secure_lib_libssh} ${_secure_lib_libssl} +.if ${MK_GNUCXX} != no +_prebuild_libs+= gnu/lib/libstdc++ gnu/lib/libsupc++ +gnu/lib/libstdc++__L: lib/msun__L +.endif .if defined(WITH_ATF) || ${MK_TESTS} != "no" .if !defined(WITH_ATF) From owner-svn-src-stable@FreeBSD.ORG Mon May 26 22:54:16 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C0CFB26; Mon, 26 May 2014 22:54:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D2C0236E; Mon, 26 May 2014 22:54:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4QMsGtC019440; Mon, 26 May 2014 22:54:16 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4QMsFJx019434; Mon, 26 May 2014 22:54:15 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201405262254.s4QMsFJx019434@svn.freebsd.org> From: Steven Hartland Date: Mon, 26 May 2014 22:54:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266718 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 22:54:16 -0000 Author: smh Date: Mon May 26 22:54:15 2014 New Revision: 266718 URL: http://svnweb.freebsd.org/changeset/base/266718 Log: MFC r264879 Fix jailed raw sockets not setting the correct source address by calling in_pcbladdr instead of prison_get_ip4. Sponsored by: Multiplay Modified: stable/10/sys/netinet/in_pcb.c stable/10/sys/netinet/in_pcb.h stable/10/sys/netinet/raw_ip.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/in_pcb.c ============================================================================== --- stable/10/sys/netinet/in_pcb.c Mon May 26 22:27:14 2014 (r266717) +++ stable/10/sys/netinet/in_pcb.c Mon May 26 22:54:15 2014 (r266718) @@ -694,7 +694,7 @@ in_pcbconnect(struct inpcb *inp, struct * Do proper source address selection on an unbound socket in case * of connect. Take jails into account as well. */ -static int +int in_pcbladdr(struct inpcb *inp, struct in_addr *faddr, struct in_addr *laddr, struct ucred *cred) { Modified: stable/10/sys/netinet/in_pcb.h ============================================================================== --- stable/10/sys/netinet/in_pcb.h Mon May 26 22:27:14 2014 (r266717) +++ stable/10/sys/netinet/in_pcb.h Mon May 26 22:54:15 2014 (r266718) @@ -636,6 +636,8 @@ void in_pcbdrop(struct inpcb *); void in_pcbfree(struct inpcb *); int in_pcbinshash(struct inpcb *); int in_pcbinshash_nopcbgroup(struct inpcb *); +int in_pcbladdr(struct inpcb *, struct in_addr *, struct in_addr *, + struct ucred *); struct inpcb * in_pcblookup_local(struct inpcbinfo *, struct in_addr, u_short, int, struct ucred *); Modified: stable/10/sys/netinet/raw_ip.c ============================================================================== --- stable/10/sys/netinet/raw_ip.c Mon May 26 22:27:14 2014 (r266717) +++ stable/10/sys/netinet/raw_ip.c Mon May 26 22:54:15 2014 (r266718) @@ -453,26 +453,26 @@ rip_output(struct mbuf *m, struct socket ip->ip_p = inp->inp_ip_p; ip->ip_len = htons(m->m_pkthdr.len); ip->ip_src = inp->inp_laddr; + ip->ip_dst.s_addr = dst; if (jailed(inp->inp_cred)) { /* * prison_local_ip4() would be good enough but would * let a source of INADDR_ANY pass, which we do not - * want to see from jails. We do not go through the - * pain of in_pcbladdr() for raw sockets. + * want to see from jails. */ - if (ip->ip_src.s_addr == INADDR_ANY) - error = prison_get_ip4(inp->inp_cred, - &ip->ip_src); - else + if (ip->ip_src.s_addr == INADDR_ANY) { + error = in_pcbladdr(inp, &ip->ip_dst, &ip->ip_src, + inp->inp_cred); + } else { error = prison_local_ip4(inp->inp_cred, &ip->ip_src); + } if (error != 0) { INP_RUNLOCK(inp); m_freem(m); return (error); } } - ip->ip_dst.s_addr = dst; ip->ip_ttl = inp->inp_ip_ttl; } else { if (m->m_pkthdr.len > IP_MAXPACKET) { From owner-svn-src-stable@FreeBSD.ORG Mon May 26 23:44:10 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E3D7B59D; Mon, 26 May 2014 23:44:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFC822728; Mon, 26 May 2014 23:44:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4QNi931041635; Mon, 26 May 2014 23:44:09 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4QNi9j2041633; Mon, 26 May 2014 23:44:09 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201405262344.s4QNi9j2041633@svn.freebsd.org> From: Steven Hartland Date: Mon, 26 May 2014 23:44:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266719 - stable/10/usr.bin/truss X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 23:44:10 -0000 Author: smh Date: Mon May 26 23:44:09 2014 New Revision: 266719 URL: http://svnweb.freebsd.org/changeset/base/266719 Log: MFC r264881 Add Linux socket call decoding to truss Sponsored by: Multiplay Modified: stable/10/usr.bin/truss/syscall.h stable/10/usr.bin/truss/syscalls.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/truss/syscall.h ============================================================================== --- stable/10/usr.bin/truss/syscall.h Mon May 26 22:54:15 2014 (r266718) +++ stable/10/usr.bin/truss/syscall.h Mon May 26 23:44:09 2014 (r266719) @@ -40,7 +40,8 @@ enum Argtype { None = 1, Hex, Octal, Int Fd_set, Sigaction, Fcntl, Mprot, Mmapflags, Whence, Readlinkres, Umtx, Sigset, Sigprocmask, Kevent, Sockdomain, Socktype, Open, Fcntlflag, Rusage, BinString, Shutdown, Resource, Rlimit, Timeval2, - Pathconf, Rforkflags, ExitStatus, Waitoptions, Idtype, Procctl }; + Pathconf, Rforkflags, ExitStatus, Waitoptions, Idtype, Procctl, + LinuxSockArgs }; #define ARG_MASK 0xff #define OUT 0x100 @@ -64,6 +65,47 @@ struct syscall { struct syscall *get_syscall(const char*); char *print_arg(struct syscall_args *, unsigned long*, long, struct trussinfo *); + +/* + * Linux Socket defines + */ +#define LINUX_SOCKET 1 +#define LINUX_BIND 2 +#define LINUX_CONNECT 3 +#define LINUX_LISTEN 4 +#define LINUX_ACCEPT 5 +#define LINUX_GETSOCKNAME 6 +#define LINUX_GETPEERNAME 7 +#define LINUX_SOCKETPAIR 8 +#define LINUX_SEND 9 +#define LINUX_RECV 10 +#define LINUX_SENDTO 11 +#define LINUX_RECVFROM 12 +#define LINUX_SHUTDOWN 13 +#define LINUX_SETSOCKOPT 14 +#define LINUX_GETSOCKOPT 15 +#define LINUX_SENDMSG 16 +#define LINUX_RECVMSG 17 + +#define PAD_(t) (sizeof(register_t) <= sizeof(t) ? \ + 0 : sizeof(register_t) - sizeof(t)) + +#if BYTE_ORDER == LITTLE_ENDIAN +#define PADL_(t) 0 +#define PADR_(t) PAD_(t) +#else +#define PADL_(t) PAD_(t) +#define PADR_(t) 0 +#endif + +typedef int l_int; +typedef uint32_t l_ulong; + +struct linux_socketcall_args { + char what_l_[PADL_(l_int)]; l_int what; char what_r_[PADR_(l_int)]; + char args_l_[PADL_(l_ulong)]; l_ulong args; char args_r_[PADR_(l_ulong)]; +}; + void print_syscall(struct trussinfo *, const char *, int, char **); void print_syscall_ret(struct trussinfo *, const char *, int, char **, int, long, struct syscall *); Modified: stable/10/usr.bin/truss/syscalls.c ============================================================================== --- stable/10/usr.bin/truss/syscalls.c Mon May 26 22:54:15 2014 (r266718) +++ stable/10/usr.bin/truss/syscalls.c Mon May 26 23:44:09 2014 (r266719) @@ -100,6 +100,10 @@ static struct syscall syscalls[] = { .args = { { Rforkflags, 0 } } }, { .name = "getegid", .ret_type = 1, .nargs = 0 }, { .name = "geteuid", .ret_type = 1, .nargs = 0 }, + { .name = "linux_readlink", .ret_type = 1, .nargs = 3, + .args = { { Name, 0 } , { Name | OUT, 1 }, { Int, 2 }}}, + { .name = "linux_socketcall", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 } , { LinuxSockArgs, 1 }}}, { .name = "getgid", .ret_type = 1, .nargs = 0 }, { .name = "getpid", .ret_type = 1, .nargs = 0 }, { .name = "getpgid", .ret_type = 1, .nargs = 1, @@ -117,6 +121,8 @@ static struct syscall syscalls[] = { .args = { { Int, 0 }, { Int, 1 }, { Whence, 2 } } }, { .name = "mmap", .ret_type = 2, .nargs = 6, .args = { { Ptr, 0 }, { Int, 1 }, { Mprot, 2 }, { Mmapflags, 3 }, { Int, 4 }, { Quad, 5 + QUAD_ALIGN } } }, + { .name = "linux_mkdir", .ret_type = 1, .nargs = 2, + .args = { { Name | IN, 0} , {Int, 1}}}, { .name = "mprotect", .ret_type = 1, .nargs = 3, .args = { { Ptr, 0 }, { Int, 1 }, { Mprot, 2 } } }, { .name = "open", .ret_type = 1, .nargs = 3, @@ -141,6 +147,8 @@ static struct syscall syscalls[] = { .args = { { Name, 0 }, { Octal, 1 } } }, { .name = "chown", .ret_type = 0, .nargs = 3, .args = { { Name, 0 }, { Int, 1 }, { Int, 2 } } }, + { .name = "linux_stat64", .ret_type = 1, .nargs = 3, + .args = { { Name | IN, 0 }, { Ptr | OUT, 1 }, { Ptr | IN, 1 }}}, { .name = "mount", .ret_type = 0, .nargs = 4, .args = { { Name, 0 }, { Name, 1 }, { Int, 2 }, { Ptr, 3 } } }, { .name = "umount", .ret_type = 0, .nargs = 2, @@ -153,6 +161,8 @@ static struct syscall syscalls[] = { .args = { { Name | IN, 0 }, { Stat | OUT, 1 } } }, { .name = "linux_newstat", .ret_type = 1, .nargs = 2, .args = { { Name | IN, 0 }, { Ptr | OUT, 1 } } }, + { .name = "linux_access", .ret_type = 1, .nargs = 2, + .args = { { Name, 0 }, { Int, 1 }}}, { .name = "linux_newfstat", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Ptr | OUT, 1 } } }, { .name = "write", .ret_type = 1, .nargs = 3, @@ -776,6 +786,76 @@ print_arg(struct syscall_args *sc, unsig asprintf(&tmp, "0x%lx", args[sc->offset]); break; } + case LinuxSockArgs: + { + struct linux_socketcall_args largs; + if (get_struct(pid, (void *)args[sc->offset], (void *)&largs, + sizeof(largs)) == -1) { + err(1, "get_struct %p", (void *)args[sc->offset]); + } + const char *what; + char buf[30]; + + switch (largs.what) { + case LINUX_SOCKET: + what = "LINUX_SOCKET"; + break; + case LINUX_BIND: + what = "LINUX_BIND"; + break; + case LINUX_CONNECT: + what = "LINUX_CONNECT"; + break; + case LINUX_LISTEN: + what = "LINUX_LISTEN"; + break; + case LINUX_ACCEPT: + what = "LINUX_ACCEPT"; + break; + case LINUX_GETSOCKNAME: + what = "LINUX_GETSOCKNAME"; + break; + case LINUX_GETPEERNAME: + what = "LINUX_GETPEERNAME"; + break; + case LINUX_SOCKETPAIR: + what = "LINUX_SOCKETPAIR"; + break; + case LINUX_SEND: + what = "LINUX_SEND"; + break; + case LINUX_RECV: + what = "LINUX_RECV"; + break; + case LINUX_SENDTO: + what = "LINUX_SENDTO"; + break; + case LINUX_RECVFROM: + what = "LINUX_RECVFROM"; + break; + case LINUX_SHUTDOWN: + what = "LINUX_SHUTDOWN"; + break; + case LINUX_SETSOCKOPT: + what = "LINUX_SETSOCKOPT"; + break; + case LINUX_GETSOCKOPT: + what = "LINUX_GETSOCKOPT"; + break; + case LINUX_SENDMSG: + what = "LINUX_SENDMSG"; + break; + case LINUX_RECVMSG: + what = "LINUX_RECVMSG"; + break; + default: + sprintf(buf, "%d", largs.what); + what = buf; + break; + } + asprintf(&tmp, "(0x%lx)%s, 0x%lx", args[sc->offset], what, (long unsigned int)largs.args); + break; + } case Pollfd: { /* * XXX: A Pollfd argument expects the /next/ syscall argument From owner-svn-src-stable@FreeBSD.ORG Mon May 26 23:47:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE2EC6EF; Mon, 26 May 2014 23:47:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80A63273D; Mon, 26 May 2014 23:47:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4QNlvMa042153; Mon, 26 May 2014 23:47:57 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4QNlvBL042152; Mon, 26 May 2014 23:47:57 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201405262347.s4QNlvBL042152@svn.freebsd.org> From: Steven Hartland Date: Mon, 26 May 2014 23:47:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266720 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 23:47:57 -0000 Author: smh Date: Mon May 26 23:47:57 2014 New Revision: 266720 URL: http://svnweb.freebsd.org/changeset/base/266720 Log: MFC r264885 Eliminate duplicate checks in vdev_geom_io_intr error handling Sponsored by: Multiplay Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Mon May 26 23:44:09 2014 (r266719) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Mon May 26 23:47:57 2014 (r266720) @@ -717,35 +717,39 @@ vdev_geom_io_intr(struct bio *bp) zio->io_error = bp->bio_error; if (zio->io_error == 0 && bp->bio_resid != 0) zio->io_error = EIO; - if (bp->bio_cmd == BIO_FLUSH && bp->bio_error == ENOTSUP) { - /* - * If we get ENOTSUP, we know that no future - * attempts will ever succeed. In this case we - * set a persistent bit so that we don't bother - * with the ioctl in the future. - */ - vd->vdev_nowritecache = B_TRUE; - } - if (bp->bio_cmd == BIO_DELETE && bp->bio_error == ENOTSUP) { - /* - * If we get ENOTSUP, we know that no future - * attempts will ever succeed. In this case we - * set a persistent bit so that we don't bother - * with the ioctl in the future. - */ - vd->vdev_notrim = B_TRUE; - } - if (zio->io_error == ENXIO && !vd->vdev_remove_wanted) { + + switch(zio->io_error) { + case ENOTSUP: /* - * If provider's error is set we assume it is being - * removed. + * If we get ENOTSUP for BIO_FLUSH or BIO_DELETE we know + * that future attempts will never succeed. In this case + * we set a persistent flag so that we don't bother with + * requests in the future. */ - if (bp->bio_to->error != 0) { - vd->vdev_remove_wanted = B_TRUE; - spa_async_request(zio->io_spa, SPA_ASYNC_REMOVE); - } else if (!vd->vdev_delayed_close) { - vd->vdev_delayed_close = B_TRUE; + switch(bp->bio_cmd) { + case BIO_FLUSH: + vd->vdev_nowritecache = B_TRUE; + break; + case BIO_DELETE: + vd->vdev_notrim = B_TRUE; + break; + } + break; + case ENXIO: + if (!vd->vdev_remove_wanted) { + /* + * If provider's error is set we assume it is being + * removed. + */ + if (bp->bio_to->error != 0) { + vd->vdev_remove_wanted = B_TRUE; + spa_async_request(zio->io_spa, + SPA_ASYNC_REMOVE); + } else if (!vd->vdev_delayed_close) { + vd->vdev_delayed_close = B_TRUE; + } } + break; } g_destroy_bio(bp); zio_interrupt(zio); From owner-svn-src-stable@FreeBSD.ORG Tue May 27 01:58:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 09AFD92A; Tue, 27 May 2014 01:58:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA96B2007; Tue, 27 May 2014 01:58:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4R1w5jh099252; Tue, 27 May 2014 01:58:05 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4R1w5AW099251; Tue, 27 May 2014 01:58:05 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201405270158.s4R1w5AW099251@svn.freebsd.org> From: Kevin Lo Date: Tue, 27 May 2014 01:58:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266722 - stable/10/sys/dev/usb/wlan X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 May 2014 01:58:06 -0000 Author: kevlo Date: Tue May 27 01:58:05 2014 New Revision: 266722 URL: http://svnweb.freebsd.org/changeset/base/266722 Log: MFC 266721: Remove r264317 by accident. Spotted by: Kuan-Chung Chiu Modified: stable/10/sys/dev/usb/wlan/if_urtwn.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/wlan/if_urtwn.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_urtwn.c Tue May 27 01:47:23 2014 (r266721) +++ stable/10/sys/dev/usb/wlan/if_urtwn.c Tue May 27 01:58:05 2014 (r266722) @@ -95,6 +95,7 @@ static const STRUCT_USB_HOST_ID urtwn_de URTWN_DEV(ABOCOM, RTL8188CU_2), URTWN_DEV(ABOCOM, RTL8192CU), URTWN_DEV(ASUS, RTL8192CU), + URTWN_DEV(ASUS, USBN10NANO), URTWN_DEV(AZUREWAVE, RTL8188CE_1), URTWN_DEV(AZUREWAVE, RTL8188CE_2), URTWN_DEV(AZUREWAVE, RTL8188CU), From owner-svn-src-stable@FreeBSD.ORG Tue May 27 14:55:10 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 799B9E28; Tue, 27 May 2014 14:55:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66A48229D; Tue, 27 May 2014 14:55:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4REtAc4053198; Tue, 27 May 2014 14:55:10 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4REtAth053195; Tue, 27 May 2014 14:55:10 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201405271455.s4REtAth053195@svn.freebsd.org> From: Marius Strobl Date: Tue, 27 May 2014 14:55:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266749 - stable/10/sys/geom/eli X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 May 2014 14:55:10 -0000 Author: marius Date: Tue May 27 14:55:09 2014 New Revision: 266749 URL: http://svnweb.freebsd.org/changeset/base/266749 Log: MFC: r259428 Clear content of keyfiles loaded by the loader after processing them. MFC: r259429 Clear some more places with potentially sensitive data. Modified: stable/10/sys/geom/eli/g_eli.c stable/10/sys/geom/eli/g_eli_crypto.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/eli/g_eli.c ============================================================================== --- stable/10/sys/geom/eli/g_eli.c Tue May 27 14:54:20 2014 (r266748) +++ stable/10/sys/geom/eli/g_eli.c Tue May 27 14:55:09 2014 (r266749) @@ -990,6 +990,7 @@ g_eli_keyfiles_load(struct hmac_ctx *ctx G_ELI_DEBUG(1, "Loaded keyfile %s for %s (type: %s).", file, provider, name); g_eli_crypto_hmac_update(ctx, data, size); + bzero(data, size); } } Modified: stable/10/sys/geom/eli/g_eli_crypto.c ============================================================================== --- stable/10/sys/geom/eli/g_eli_crypto.c Tue May 27 14:54:20 2014 (r266748) +++ stable/10/sys/geom/eli/g_eli_crypto.c Tue May 27 14:55:09 2014 (r266749) @@ -289,10 +289,12 @@ g_eli_crypto_hmac_final(struct hmac_ctx bzero(ctx, sizeof(*ctx)); SHA512_Update(&lctx, digest, sizeof(digest)); SHA512_Final(digest, &lctx); + bzero(&lctx, sizeof(lctx)); /* mdsize == 0 means "Give me the whole hash!" */ if (mdsize == 0) mdsize = SHA512_MDLEN; bcopy(digest, md, mdsize); + bzero(digest, sizeof(digest)); } void From owner-svn-src-stable@FreeBSD.ORG Tue May 27 15:30:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A749D8E3; Tue, 27 May 2014 15:30:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93D7925C9; Tue, 27 May 2014 15:30:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4RFU7CL067936; Tue, 27 May 2014 15:30:07 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4RFU7xk067933; Tue, 27 May 2014 15:30:07 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201405271530.s4RFU7xk067933@svn.freebsd.org> From: Marius Strobl Date: Tue, 27 May 2014 15:30:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266750 - stable/9/sys/geom/eli X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 May 2014 15:30:07 -0000 Author: marius Date: Tue May 27 15:30:06 2014 New Revision: 266750 URL: http://svnweb.freebsd.org/changeset/base/266750 Log: MFC: r259428 Clear content of keyfiles loaded by the loader after processing them. MFC: r259429 Clear some more places with potentially sensitive data. Approved by: re (gjb) Modified: stable/9/sys/geom/eli/g_eli.c stable/9/sys/geom/eli/g_eli_crypto.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/eli/g_eli.c ============================================================================== --- stable/9/sys/geom/eli/g_eli.c Tue May 27 14:55:09 2014 (r266749) +++ stable/9/sys/geom/eli/g_eli.c Tue May 27 15:30:06 2014 (r266750) @@ -984,6 +984,7 @@ g_eli_keyfiles_load(struct hmac_ctx *ctx G_ELI_DEBUG(1, "Loaded keyfile %s for %s (type: %s).", file, provider, name); g_eli_crypto_hmac_update(ctx, data, size); + bzero(data, size); } } Modified: stable/9/sys/geom/eli/g_eli_crypto.c ============================================================================== --- stable/9/sys/geom/eli/g_eli_crypto.c Tue May 27 14:55:09 2014 (r266749) +++ stable/9/sys/geom/eli/g_eli_crypto.c Tue May 27 15:30:06 2014 (r266750) @@ -289,10 +289,12 @@ g_eli_crypto_hmac_final(struct hmac_ctx bzero(ctx, sizeof(*ctx)); SHA512_Update(&lctx, digest, sizeof(digest)); SHA512_Final(digest, &lctx); + bzero(&lctx, sizeof(lctx)); /* mdsize == 0 means "Give me the whole hash!" */ if (mdsize == 0) mdsize = SHA512_MDLEN; bcopy(digest, md, mdsize); + bzero(digest, sizeof(digest)); } void From owner-svn-src-stable@FreeBSD.ORG Tue May 27 15:30:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5ED2A4F; Tue, 27 May 2014 15:30:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A148125D7; Tue, 27 May 2014 15:30:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4RFUPZ1068383; Tue, 27 May 2014 15:30:25 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4RFUOKU068374; Tue, 27 May 2014 15:30:24 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405271530.s4RFUOKU068374@svn.freebsd.org> From: Ian Lepore Date: Tue, 27 May 2014 15:30:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266751 - in stable/10/sys: arm/conf arm/ti arm/ti/omap4 boot/fdt/dts/arm dev/sdhci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 May 2014 15:30:25 -0000 Author: ian Date: Tue May 27 15:30:24 2014 New Revision: 266751 URL: http://svnweb.freebsd.org/changeset/base/266751 Log: MFC r264096, r264097, r264099 r264100, r264101, r264102, r264119: Fixes to the ti_sdhci and sdhci drivers (fix clock divisor calcs). Use the ti_sdhci driver instead of ti_mmchs for Pandaboard. Modified: stable/10/sys/arm/conf/PANDABOARD stable/10/sys/arm/ti/omap4/files.omap4 stable/10/sys/arm/ti/ti_sdhci.c stable/10/sys/boot/fdt/dts/arm/beaglebone-black.dts stable/10/sys/boot/fdt/dts/arm/pandaboard.dts stable/10/sys/dev/sdhci/sdhci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/PANDABOARD ============================================================================== --- stable/10/sys/arm/conf/PANDABOARD Tue May 27 15:30:06 2014 (r266750) +++ stable/10/sys/arm/conf/PANDABOARD Tue May 27 15:30:24 2014 (r266751) @@ -76,6 +76,7 @@ options PREEMPTION # MMC/SD/SDIO Card slot support device mmc # mmc/sd bus device mmcsd # mmc/sd flash cards +device sdhci # mmc/sd host controller # I2C support device iicbus Modified: stable/10/sys/arm/ti/omap4/files.omap4 ============================================================================== --- stable/10/sys/arm/ti/omap4/files.omap4 Tue May 27 15:30:06 2014 (r266750) +++ stable/10/sys/arm/ti/omap4/files.omap4 Tue May 27 15:30:24 2014 (r266751) @@ -6,7 +6,8 @@ arm/ti/ti_smc.S standard arm/ti/usb/omap_ehci.c optional usb ehci arm/ti/ti_sdma.c optional ti_sdma -arm/ti/ti_mmchs.c optional mmc +arm/ti/ti_sdhci.c optional sdhci +#arm/ti/ti_mmchs.c optional mmc arm/ti/omap4/omap4_l2cache.c optional pl310 arm/ti/omap4/omap4_prcm_clks.c standard Modified: stable/10/sys/arm/ti/ti_sdhci.c ============================================================================== --- stable/10/sys/arm/ti/ti_sdhci.c Tue May 27 15:30:06 2014 (r266750) +++ stable/10/sys/arm/ti/ti_sdhci.c Tue May 27 15:30:24 2014 (r266751) @@ -72,6 +72,8 @@ struct ti_sdhci_softc { uint32_t wp_gpio_pin; uint32_t cmd_and_mode; uint32_t sdhci_clkdiv; + boolean_t disable_highspeed; + boolean_t force_card_present; }; /* @@ -105,9 +107,13 @@ static struct ofw_compat_data compat_dat #define MMCHS_SYSCONFIG 0x010 #define MMCHS_SYSCONFIG_RESET (1 << 1) #define MMCHS_SYSSTATUS 0x014 +#define MMCHS_SYSSTATUS_RESETDONE (1 << 0) #define MMCHS_CON 0x02C #define MMCHS_CON_DW8 (1 << 5) #define MMCHS_CON_DVAL_8_4MS (3 << 9) +#define MMCHS_SYSCTL 0x12C +#define MMCHS_SYSCTL_CLKD_MASK 0x3FF +#define MMCHS_SYSCTL_CLKD_SHIFT 6 #define MMCHS_SD_CAPA 0x140 #define MMCHS_SD_CAPA_VS18 (1 << 26) #define MMCHS_SD_CAPA_VS30 (1 << 25) @@ -161,19 +167,22 @@ ti_sdhci_read_2(device_t dev, struct sdh * but doesn't split them into low:high fields. Instead they're a * single number in the range 0..1023 and the number is exactly the * clock divisor (with 0 and 1 both meaning divide by 1). The SDHCI - * driver code expects a v2.0 divisor (value N is power of two in the - * range 0..128 and clock is divided by 2N). The shifting and masking + * driver code expects a v2.0 or v3.0 divisor. The shifting and masking * here extracts the MMCHS representation from the hardware word, cleans - * those bits out, applies the 2N adjustment, and plugs that into the - * bit positions for the 2.0 divisor in the returned register value. The - * ti_sdhci_write_2() routine performs the opposite transformation when - * the SDHCI driver writes to the register. + * those bits out, applies the 2N adjustment, and plugs the result into + * the bit positions for the 2.0 or 3.0 divisor in the returned register + * value. The ti_sdhci_write_2() routine performs the opposite + * transformation when the SDHCI driver writes to the register. */ if (off == SDHCI_CLOCK_CONTROL) { val32 = RD4(sc, SDHCI_CLOCK_CONTROL); - clkdiv = (val32 >> SDHCI_DIVIDER_HI_SHIFT) & 0xff; - val32 &= ~(0xff << SDHCI_DIVIDER_HI_SHIFT); - val32 |= (clkdiv / 2) << SDHCI_DIVIDER_SHIFT; + clkdiv = ((val32 >> MMCHS_SYSCTL_CLKD_SHIFT) & + MMCHS_SYSCTL_CLKD_MASK) / 2; + val32 &= ~(MMCHS_SYSCTL_CLKD_MASK << MMCHS_SYSCTL_CLKD_SHIFT); + val32 |= (clkdiv & SDHCI_DIVIDER_MASK) << SDHCI_DIVIDER_SHIFT; + if (slot->version >= SDHCI_SPEC_300) + val32 |= ((clkdiv >> SDHCI_DIVIDER_MASK_LEN) & + SDHCI_DIVIDER_HI_MASK) << SDHCI_DIVIDER_HI_SHIFT; return (val32 & 0xffff); } @@ -193,8 +202,24 @@ static uint32_t ti_sdhci_read_4(device_t dev, struct sdhci_slot *slot, bus_size_t off) { struct ti_sdhci_softc *sc = device_get_softc(dev); + uint32_t val32; + + val32 = RD4(sc, off); + + /* + * If we need to disallow highspeed mode due to the OMAP4 erratum, strip + * that flag from the returned capabilities. + */ + if (off == SDHCI_CAPABILITIES && sc->disable_highspeed) + val32 &= ~SDHCI_CAN_DO_HISPD; + + /* + * Force the card-present state if necessary. + */ + if (off == SDHCI_PRESENT_STATE && sc->force_card_present) + val32 |= SDHCI_CARD_PRESENT; - return (RD4(sc, off)); + return (val32); } static void @@ -228,15 +253,23 @@ ti_sdhci_write_2(device_t dev, struct sd uint32_t clkdiv, val32; /* - * Translate between the hardware and SDHCI 2.0 representations of the - * clock divisor. See the comments in ti_sdhci_read_2() for details. + * Translate between the hardware and SDHCI 2.0 or 3.0 representations + * of the clock divisor. See the comments in ti_sdhci_read_2() for + * details. */ if (off == SDHCI_CLOCK_CONTROL) { clkdiv = (val >> SDHCI_DIVIDER_SHIFT) & SDHCI_DIVIDER_MASK; + if (slot->version >= SDHCI_SPEC_300) + clkdiv |= ((val >> SDHCI_DIVIDER_HI_SHIFT) & + SDHCI_DIVIDER_HI_MASK) << SDHCI_DIVIDER_MASK_LEN; + clkdiv *= 2; + if (clkdiv > MMCHS_SYSCTL_CLKD_MASK) + clkdiv = MMCHS_SYSCTL_CLKD_MASK; val32 = RD4(sc, SDHCI_CLOCK_CONTROL); val32 &= 0xffff0000; - val32 |= val & ~(SDHCI_DIVIDER_MASK << SDHCI_DIVIDER_SHIFT); - val32 |= (clkdiv * 2) << SDHCI_DIVIDER_HI_SHIFT; + val32 |= val & ~(MMCHS_SYSCTL_CLKD_MASK << + MMCHS_SYSCTL_CLKD_SHIFT); + val32 |= clkdiv << MMCHS_SYSCTL_CLKD_SHIFT; WR4(sc, SDHCI_CLOCK_CONTROL, val32); return; } @@ -358,7 +391,7 @@ ti_sdhci_hw_init(device_t dev) /* Issue a softreset to the controller */ ti_mmchs_write_4(sc, MMCHS_SYSCONFIG, MMCHS_SYSCONFIG_RESET); timeout = 1000; - while ((ti_mmchs_read_4(sc, MMCHS_SYSSTATUS) & MMCHS_SYSCONFIG_RESET)) { + while (!(ti_mmchs_read_4(sc, MMCHS_SYSSTATUS) & MMCHS_SYSSTATUS_RESETDONE)) { if (--timeout == 0) { device_printf(dev, "Error: Controller reset operation timed out\n"); break; @@ -458,12 +491,14 @@ ti_sdhci_attach(device_t dev) /* * Set the offset from the device's memory start to the MMCHS registers. + * Also for OMAP4 disable high speed mode due to erratum ID i626. */ if (ti_chip() == CHIP_OMAP_3) sc->mmchs_reg_off = OMAP3_MMCHS_REG_OFFSET; - else if (ti_chip() == CHIP_OMAP_4) + else if (ti_chip() == CHIP_OMAP_4) { sc->mmchs_reg_off = OMAP4_MMCHS_REG_OFFSET; - else if (ti_chip() == CHIP_AM335X) + sc->disable_highspeed = true; + } else if (ti_chip() == CHIP_AM335X) sc->mmchs_reg_off = AM335X_MMCHS_REG_OFFSET; else panic("Unknown OMAP device\n"); @@ -560,6 +595,14 @@ ti_sdhci_attach(device_t dev) } } + /* + * If the slot is flagged with the non-removable property, set our flag + * to always force the SDHCI_CARD_PRESENT bit on. + */ + node = ofw_bus_get_node(dev); + if (OF_hasprop(node, "non-removable")) + sc->force_card_present = true; + bus_generic_probe(dev); bus_generic_attach(dev); Modified: stable/10/sys/boot/fdt/dts/arm/beaglebone-black.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/beaglebone-black.dts Tue May 27 15:30:06 2014 (r266750) +++ stable/10/sys/boot/fdt/dts/arm/beaglebone-black.dts Tue May 27 15:30:24 2014 (r266751) @@ -142,6 +142,7 @@ mmchs1@481D8000 { bus-width = <8>; status = "okay"; + non-removable; }; Modified: stable/10/sys/boot/fdt/dts/arm/pandaboard.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/pandaboard.dts Tue May 27 15:30:06 2014 (r266750) +++ stable/10/sys/boot/fdt/dts/arm/pandaboard.dts Tue May 27 15:30:24 2014 (r266751) @@ -174,6 +174,7 @@ interrupts = <115>; interrupt-parent = <&GIC>; mmchs-device-id = <1>; + non-removable; /* XXX need real solution */ }; }; Modified: stable/10/sys/dev/sdhci/sdhci.c ============================================================================== --- stable/10/sys/dev/sdhci/sdhci.c Tue May 27 15:30:06 2014 (r266750) +++ stable/10/sys/dev/sdhci/sdhci.c Tue May 27 15:30:24 2014 (r266751) @@ -235,7 +235,8 @@ sdhci_set_clock(struct sdhci_slot *slot, slot->clock = clock; /* Turn off the clock. */ - WR2(slot, SDHCI_CLOCK_CONTROL, 0); + clk = RD2(slot, SDHCI_CLOCK_CONTROL); + WR2(slot, SDHCI_CLOCK_CONTROL, clk & ~SDHCI_CLOCK_CARD_EN); /* If no clock requested - left it so. */ if (clock == 0) return; From owner-svn-src-stable@FreeBSD.ORG Tue May 27 16:17:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3BB4BAB3; Tue, 27 May 2014 16:17:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27BF62A9A; Tue, 27 May 2014 16:17:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4RGHQLH090470; Tue, 27 May 2014 16:17:26 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4RGHPN3090463; Tue, 27 May 2014 16:17:25 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405271617.s4RGHPN3090463@svn.freebsd.org> From: Ian Lepore Date: Tue, 27 May 2014 16:17:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266755 - in stable/10/sys/arm: arm include ti X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 May 2014 16:17:26 -0000 Author: ian Date: Tue May 27 16:17:25 2014 New Revision: 266755 URL: http://svnweb.freebsd.org/changeset/base/266755 Log: MFC 266621: Eliminte spurious interrupts caused by ARM weak memory ordering. Modified: stable/10/sys/arm/arm/gic.c stable/10/sys/arm/arm/intr.c stable/10/sys/arm/include/intr.h stable/10/sys/arm/ti/aintc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/gic.c ============================================================================== --- stable/10/sys/arm/arm/gic.c Tue May 27 16:13:01 2014 (r266754) +++ stable/10/sys/arm/arm/gic.c Tue May 27 16:17:25 2014 (r266755) @@ -83,6 +83,8 @@ __FBSDID("$FreeBSD$"); #define GICC_ABPR 0x001C /* v1 ICCABPR */ #define GICC_IIDR 0x00FC /* v1 ICCIIDR*/ +#define GIC_LAST_IPI 15 /* Irqs 0-15 are IPIs. */ + /* First bit is a polarity bit (0 - low, 1 - high) */ #define GICD_ICFGR_POL_LOW (0 << 0) #define GICD_ICFGR_POL_HIGH (1 << 0) @@ -268,6 +270,8 @@ gic_post_filter(void *arg) { uintptr_t irq = (uintptr_t) arg; + if (irq > GIC_LAST_IPI) + arm_irq_memory_barrier(irq); gic_c_write_4(GICC_EOIR, irq); } @@ -284,13 +288,13 @@ arm_get_next_irq(int last_irq) * have this information later. */ - if ((active_irq & 0x3ff) < 16) + if ((active_irq & 0x3ff) <= GIC_LAST_IPI) gic_c_write_4(GICC_EOIR, active_irq); active_irq &= 0x3FF; if (active_irq == 0x3FF) { if (last_irq == -1) - printf("Spurious interrupt detected [0x%08x]\n", active_irq); + printf("Spurious interrupt detected\n"); return -1; } @@ -309,6 +313,8 @@ void arm_unmask_irq(uintptr_t nb) { + if (nb > GIC_LAST_IPI) + arm_irq_memory_barrier(nb); gic_d_write_4(GICD_ISENABLER(nb >> 5), (1UL << (nb & 0x1F))); } Modified: stable/10/sys/arm/arm/intr.c ============================================================================== --- stable/10/sys/arm/arm/intr.c Tue May 27 16:13:01 2014 (r266754) +++ stable/10/sys/arm/arm/intr.c Tue May 27 16:17:25 2014 (r266755) @@ -149,3 +149,67 @@ arm_irq_handler(struct trapframe *frame) } } } + +/* + * arm_irq_memory_barrier() + * + * Ensure all writes to device memory have reached devices before proceeding. + * + * This is intended to be called from the post-filter and post-thread routines + * of an interrupt controller implementation. A peripheral device driver should + * use bus_space_barrier() if it needs to ensure a write has reached the + * hardware for some reason other than clearing interrupt conditions. + * + * The need for this function arises from the ARM weak memory ordering model. + * Writes to locations mapped with the Device attribute bypass any caches, but + * are buffered. Multiple writes to the same device will be observed by that + * device in the order issued by the cpu. Writes to different devices may + * appear at those devices in a different order than issued by the cpu. That + * is, if the cpu writes to device A then device B, the write to device B could + * complete before the write to device A. + * + * Consider a typical device interrupt handler which services the interrupt and + * writes to a device status-acknowledge register to clear the interrupt before + * returning. That write is posted to the L2 controller which "immediately" + * places it in a store buffer and automatically drains that buffer. This can + * be less immediate than you'd think... There may be no free slots in the store + * buffers, so an existing buffer has to be drained first to make room. The + * target bus may be busy with other traffic (such as DMA for various devices), + * delaying the drain of the store buffer for some indeterminate time. While + * all this delay is happening, execution proceeds on the CPU, unwinding its way + * out of the interrupt call stack to the point where the interrupt driver code + * is ready to EOI and unmask the interrupt. The interrupt controller may be + * accessed via a faster bus than the hardware whose handler just ran; the write + * to unmask and EOI the interrupt may complete quickly while the device write + * to ack and clear the interrupt source is still lingering in a store buffer + * waiting for access to a slower bus. With the interrupt unmasked at the + * interrupt controller but still active at the device, as soon as interrupts + * are enabled on the core the device re-interrupts immediately: now you've got + * a spurious interrupt on your hands. + * + * The right way to fix this problem is for every device driver to use the + * proper bus_space_barrier() calls in its interrupt handler. For ARM a single + * barrier call at the end of the handler would work. This would have to be + * done to every driver in the system, not just arm-specific drivers. + * + * Another potential fix is to map all device memory as Strongly-Ordered rather + * than Device memory, which takes the store buffers out of the picture. This + * has a pretty big impact on overall system performance, because each strongly + * ordered memory access causes all L2 store buffers to be drained. + * + * A compromise solution is to have the interrupt controller implementation call + * this function to establish a barrier between writes to the interrupt-source + * device and writes to the interrupt controller device. + * + * This takes the interrupt number as an argument, and currently doesn't use it. + * The plan is that maybe some day there is a way to flag certain interrupts as + * "memory barrier safe" and we can avoid this overhead with them. + */ +void +arm_irq_memory_barrier(uintptr_t irq) +{ + + dsb(); + cpu_l2cache_drain_writebuf(); +} + Modified: stable/10/sys/arm/include/intr.h ============================================================================== --- stable/10/sys/arm/include/intr.h Tue May 27 16:13:01 2014 (r266754) +++ stable/10/sys/arm/include/intr.h Tue May 27 16:17:25 2014 (r266755) @@ -79,6 +79,8 @@ extern void (*arm_post_filter)(void *); extern int (*arm_config_irq)(int irq, enum intr_trigger trig, enum intr_polarity pol); +void arm_irq_memory_barrier(uintptr_t); + void gic_init_secondary(void); #endif /* _MACHINE_INTR_H */ Modified: stable/10/sys/arm/ti/aintc.c ============================================================================== --- stable/10/sys/arm/ti/aintc.c Tue May 27 16:13:01 2014 (r266754) +++ stable/10/sys/arm/ti/aintc.c Tue May 27 16:17:25 2014 (r266755) @@ -180,5 +180,7 @@ arm_mask_irq(uintptr_t nb) void arm_unmask_irq(uintptr_t nb) { + + arm_irq_memory_barrier(nb); aintc_write_4(INTC_MIR_CLEAR(nb >> 5), (1UL << (nb & 0x1F))); } From owner-svn-src-stable@FreeBSD.ORG Tue May 27 18:22:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 92264A58; Tue, 27 May 2014 18:22:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6584E2678; Tue, 27 May 2014 18:22:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4RIMrau049082; Tue, 27 May 2014 18:22:53 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4RIMrhl049080; Tue, 27 May 2014 18:22:53 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201405271822.s4RIMrhl049080@svn.freebsd.org> From: Xin LI Date: Tue, 27 May 2014 18:22:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266758 - in stable/10: . cddl/lib/libzfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 May 2014 18:22:53 -0000 Author: delphij Date: Tue May 27 18:22:52 2014 New Revision: 266758 URL: http://svnweb.freebsd.org/changeset/base/266758 Log: MFC r266520: Explicitly link libzfs against libavl as it is done in OpenSolaris (4543:12bb2876a62e). Without this, some third party applications may break because the lack of AVL related symbols. FreeBSD base system are not affected because the FreeBSD ZFS command line tools were all linked against libavl and thus hide the underlying issue. PR: bin/183081 Modified: stable/10/Makefile.inc1 stable/10/cddl/lib/libzfs/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Tue May 27 18:18:41 2014 (r266757) +++ stable/10/Makefile.inc1 Tue May 27 18:22:52 2014 (r266758) @@ -1496,6 +1496,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 lib/libopie lib/libpam ${_lib_libthr} \ lib/libradius lib/libsbuf lib/libtacplus \ ${_cddl_lib_libumem} ${_cddl_lib_libnvpair} \ + ${_cddl_lib_libavl} \ ${_cddl_lib_libzfs_core} \ lib/libutil ${_lib_libypclnt} lib/libz lib/msun \ ${_secure_lib_libcrypto} ${_lib_libldns} \ @@ -1534,6 +1535,7 @@ lib/libopie__L lib/libtacplus__L: lib/li .if ${MK_CDDL} != "no" _cddl_lib_libumem= cddl/lib/libumem _cddl_lib_libnvpair= cddl/lib/libnvpair +_cddl_lib_libavl= cddl/lib/libavl _cddl_lib_libzfs_core= cddl/lib/libzfs_core _cddl_lib= cddl/lib cddl/lib/libzfs_core__L: cddl/lib/libnvpair__L Modified: stable/10/cddl/lib/libzfs/Makefile ============================================================================== --- stable/10/cddl/lib/libzfs/Makefile Tue May 27 18:18:41 2014 (r266757) +++ stable/10/cddl/lib/libzfs/Makefile Tue May 27 18:22:52 2014 (r266758) @@ -7,8 +7,8 @@ LIB= zfs DPADD= ${LIBMD} ${LIBPTHREAD} ${LIBUMEM} ${LIBUTIL} ${LIBM} ${LIBNVPAIR} \ - ${LIBZFS_CORE} -LDADD= -lmd -lpthread -lumem -lutil -lm -lnvpair -lzfs_core + ${LIBAVL} ${LIBZFS_CORE} +LDADD= -lmd -lpthread -lumem -lutil -lm -lnvpair -lavl -lzfs_core SRCS= deviceid.c \ fsshare.c \ From owner-svn-src-stable@FreeBSD.ORG Tue May 27 18:27:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9271F55; Tue, 27 May 2014 18:27:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D16E426BF; Tue, 27 May 2014 18:27:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4RIRu8c050187; Tue, 27 May 2014 18:27:56 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4RIRp8A050156; Tue, 27 May 2014 18:27:51 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201405271827.s4RIRp8A050156@svn.freebsd.org> From: Dimitry Andric Date: Tue, 27 May 2014 18:27:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266759 - in stable/9: . contrib/llvm/include/llvm/IR contrib/llvm/include/llvm/MC contrib/llvm/lib/Analysis contrib/llvm/lib/CodeGen/AsmPrinter contrib/llvm/lib/CodeGen/SelectionDAG co... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 May 2014 18:27:57 -0000 Author: dim Date: Tue May 27 18:27:51 2014 New Revision: 266759 URL: http://svnweb.freebsd.org/changeset/base/266759 Log: MFC r265925: Upgrade our copy of llvm/clang to 3.4.1 release. This release contains mostly fixes, for the following upstream bugs: http://llvm.org/PR16365 http://llvm.org/PR17473 http://llvm.org/PR18000 http://llvm.org/PR18068 http://llvm.org/PR18102 http://llvm.org/PR18165 http://llvm.org/PR18260 http://llvm.org/PR18290 http://llvm.org/PR18316 http://llvm.org/PR18460 http://llvm.org/PR18473 http://llvm.org/PR18515 http://llvm.org/PR18526 http://llvm.org/PR18600 http://llvm.org/PR18762 http://llvm.org/PR18773 http://llvm.org/PR18860 http://llvm.org/PR18994 http://llvm.org/PR19007 http://llvm.org/PR19010 http://llvm.org/PR19033 http://llvm.org/PR19059 http://llvm.org/PR19144 http://llvm.org/PR19326 Approved by: re (kib) Deleted: stable/9/contrib/llvm/patches/patch-r262809-clang-r203007-destructor-calling-conv.diff Modified: stable/9/ObsoleteFiles.inc (contents, props changed) stable/9/UPDATING (contents, props changed) stable/9/contrib/llvm/include/llvm/IR/IntrinsicsX86.td stable/9/contrib/llvm/include/llvm/MC/MCAsmInfo.h stable/9/contrib/llvm/lib/Analysis/BasicAliasAnalysis.cpp stable/9/contrib/llvm/lib/Analysis/IVUsers.cpp stable/9/contrib/llvm/lib/Analysis/ScalarEvolution.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp stable/9/contrib/llvm/lib/MC/MCAsmInfo.cpp stable/9/contrib/llvm/lib/MC/MCAsmInfoCOFF.cpp stable/9/contrib/llvm/lib/MC/MCAsmInfoDarwin.cpp stable/9/contrib/llvm/lib/MC/MCDwarf.cpp stable/9/contrib/llvm/lib/MC/MCParser/AsmParser.cpp stable/9/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp stable/9/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.td stable/9/contrib/llvm/lib/Target/AArch64/AArch64TargetObjectFile.cpp stable/9/contrib/llvm/lib/Target/AArch64/AArch64TargetObjectFile.h stable/9/contrib/llvm/lib/Target/ARM/A15SDOptimizer.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMInstrNEON.td stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.h stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCFastISel.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.h stable/9/contrib/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp stable/9/contrib/llvm/lib/Target/R600/AMDGPUISelLowering.cpp stable/9/contrib/llvm/lib/Target/R600/AMDGPUInstructions.td stable/9/contrib/llvm/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp stable/9/contrib/llvm/lib/Target/R600/R600ControlFlowFinalizer.cpp stable/9/contrib/llvm/lib/Target/R600/R600InstrInfo.cpp stable/9/contrib/llvm/lib/Target/R600/R600Instructions.td stable/9/contrib/llvm/lib/Target/R600/SIFixSGPRCopies.cpp stable/9/contrib/llvm/lib/Target/R600/SIInsertWaits.cpp stable/9/contrib/llvm/lib/Target/R600/SIInstrInfo.td stable/9/contrib/llvm/lib/Target/R600/SIInstructions.td stable/9/contrib/llvm/lib/Target/R600/SIIntrinsics.td stable/9/contrib/llvm/lib/Target/R600/SILowerControlFlow.cpp stable/9/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp stable/9/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp stable/9/contrib/llvm/lib/Target/X86/X86AsmPrinter.cpp stable/9/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp stable/9/contrib/llvm/lib/Target/X86/X86InstrCompiler.td stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/LoopRerollPass.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp stable/9/contrib/llvm/lib/Transforms/Utils/LCSSA.cpp stable/9/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp stable/9/contrib/llvm/tools/clang/include/clang/Driver/Driver.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/ToolChain.h stable/9/contrib/llvm/tools/clang/lib/AST/ASTDumper.cpp stable/9/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp stable/9/contrib/llvm/tools/clang/lib/AST/StmtPrinter.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/Consumed.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/Targets.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/Version.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/Driver.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/ToolChains.h stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaExprCXX.cpp stable/9/etc/mtree/BSD.include.dist stable/9/lib/clang/include/Makefile stable/9/lib/clang/include/clang/Basic/Version.inc stable/9/lib/clang/include/llvm/Config/config.h stable/9/lib/clang/include/llvm/Config/llvm-config.h stable/9/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/9/contrib/ (props changed) stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) stable/9/etc/ (props changed) stable/9/lib/clang/ (props changed) stable/9/tools/build/ (props changed) Modified: stable/9/ObsoleteFiles.inc ============================================================================== --- stable/9/ObsoleteFiles.inc Tue May 27 18:22:52 2014 (r266758) +++ stable/9/ObsoleteFiles.inc Tue May 27 18:27:51 2014 (r266759) @@ -38,6 +38,43 @@ # xargs -n1 | sort | uniq -d; # done +# 20140512: new clang import which bumps version from 3.4 to 3.4.1. +OLD_FILES+=usr/include/clang/3.4/__wmmintrin_aes.h +OLD_FILES+=usr/include/clang/3.4/__wmmintrin_pclmul.h +OLD_FILES+=usr/include/clang/3.4/altivec.h +OLD_FILES+=usr/include/clang/3.4/ammintrin.h +OLD_FILES+=usr/include/clang/3.4/avx2intrin.h +OLD_FILES+=usr/include/clang/3.4/avxintrin.h +OLD_FILES+=usr/include/clang/3.4/bmi2intrin.h +OLD_FILES+=usr/include/clang/3.4/bmiintrin.h +OLD_FILES+=usr/include/clang/3.4/cpuid.h +OLD_FILES+=usr/include/clang/3.4/emmintrin.h +OLD_FILES+=usr/include/clang/3.4/f16cintrin.h +OLD_FILES+=usr/include/clang/3.4/fma4intrin.h +OLD_FILES+=usr/include/clang/3.4/fmaintrin.h +OLD_FILES+=usr/include/clang/3.4/immintrin.h +OLD_FILES+=usr/include/clang/3.4/lzcntintrin.h +OLD_FILES+=usr/include/clang/3.4/mm3dnow.h +OLD_FILES+=usr/include/clang/3.4/mm_malloc.h +OLD_FILES+=usr/include/clang/3.4/mmintrin.h +OLD_FILES+=usr/include/clang/3.4/module.map +OLD_FILES+=usr/include/clang/3.4/nmmintrin.h +OLD_FILES+=usr/include/clang/3.4/pmmintrin.h +OLD_FILES+=usr/include/clang/3.4/popcntintrin.h +OLD_FILES+=usr/include/clang/3.4/prfchwintrin.h +OLD_FILES+=usr/include/clang/3.4/rdseedintrin.h +OLD_FILES+=usr/include/clang/3.4/rtmintrin.h +OLD_FILES+=usr/include/clang/3.4/shaintrin.h +OLD_FILES+=usr/include/clang/3.4/smmintrin.h +OLD_FILES+=usr/include/clang/3.4/tbmintrin.h +OLD_FILES+=usr/include/clang/3.4/tmmintrin.h +OLD_FILES+=usr/include/clang/3.4/wmmintrin.h +OLD_FILES+=usr/include/clang/3.4/x86intrin.h +OLD_FILES+=usr/include/clang/3.4/xmmintrin.h +OLD_FILES+=usr/include/clang/3.4/xopintrin.h +OLD_FILES+=usr/include/clang/3.4/arm_neon.h +OLD_FILES+=usr/include/clang/3.4/module.map +OLD_DIRS+=usr/include/clang/3.4 # 20140321: new clang import which bumps version from 3.3 to 3.4. OLD_FILES+=usr/bin/llvm-prof OLD_FILES+=usr/bin/llvm-ranlib Modified: stable/9/UPDATING ============================================================================== --- stable/9/UPDATING Tue May 27 18:22:52 2014 (r266758) +++ stable/9/UPDATING Tue May 27 18:27:51 2014 (r266759) @@ -11,6 +11,9 @@ handbook: Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. +20140512: + Clang and llvm have been upgraded to 3.4.1 release. + 20140321: Clang and llvm have been upgraded to 3.4 release. Modified: stable/9/contrib/llvm/include/llvm/IR/IntrinsicsX86.td ============================================================================== --- stable/9/contrib/llvm/include/llvm/IR/IntrinsicsX86.td Tue May 27 18:22:52 2014 (r266758) +++ stable/9/contrib/llvm/include/llvm/IR/IntrinsicsX86.td Tue May 27 18:27:51 2014 (r266759) @@ -1758,68 +1758,68 @@ let TargetPrefix = "x86" in { // All in def int_x86_avx2_gather_d_pd : GCCBuiltin<"__builtin_ia32_gatherd_pd">, Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v2f64_ty, llvm_i8_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx2_gather_d_pd_256 : GCCBuiltin<"__builtin_ia32_gatherd_pd256">, Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v4f64_ty, llvm_i8_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx2_gather_q_pd : GCCBuiltin<"__builtin_ia32_gatherq_pd">, Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_ptr_ty, llvm_v2i64_ty, llvm_v2f64_ty, llvm_i8_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx2_gather_q_pd_256 : GCCBuiltin<"__builtin_ia32_gatherq_pd256">, Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_ptr_ty, llvm_v4i64_ty, llvm_v4f64_ty, llvm_i8_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx2_gather_d_ps : GCCBuiltin<"__builtin_ia32_gatherd_ps">, Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx2_gather_d_ps_256 : GCCBuiltin<"__builtin_ia32_gatherd_ps256">, Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_ptr_ty, llvm_v8i32_ty, llvm_v8f32_ty, llvm_i8_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx2_gather_q_ps : GCCBuiltin<"__builtin_ia32_gatherq_ps">, Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_ptr_ty, llvm_v2i64_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx2_gather_q_ps_256 : GCCBuiltin<"__builtin_ia32_gatherq_ps256">, Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_ptr_ty, llvm_v4i64_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx2_gather_d_q : GCCBuiltin<"__builtin_ia32_gatherd_q">, Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v2i64_ty, llvm_i8_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx2_gather_d_q_256 : GCCBuiltin<"__builtin_ia32_gatherd_q256">, Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v4i64_ty, llvm_i8_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx2_gather_q_q : GCCBuiltin<"__builtin_ia32_gatherq_q">, Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_ptr_ty, llvm_v2i64_ty, llvm_v2i64_ty, llvm_i8_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx2_gather_q_q_256 : GCCBuiltin<"__builtin_ia32_gatherq_q256">, Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, llvm_ptr_ty, llvm_v4i64_ty, llvm_v4i64_ty, llvm_i8_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx2_gather_d_d : GCCBuiltin<"__builtin_ia32_gatherd_d">, Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx2_gather_d_d_256 : GCCBuiltin<"__builtin_ia32_gatherd_d256">, Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, llvm_ptr_ty, llvm_v8i32_ty, llvm_v8i32_ty, llvm_i8_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx2_gather_q_d : GCCBuiltin<"__builtin_ia32_gatherq_d">, Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_ptr_ty, llvm_v2i64_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx2_gather_q_d_256 : GCCBuiltin<"__builtin_ia32_gatherq_d256">, Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_ptr_ty, llvm_v4i64_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; } // Misc. @@ -2909,28 +2909,28 @@ let TargetPrefix = "x86" in { def int_x86_avx512_gather_dpd_mask_512 : GCCBuiltin<"__builtin_ia32_mask_gatherdpd512">, Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, llvm_i8_ty, llvm_v8i32_ty, llvm_ptr_ty, llvm_i32_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx512_gather_dps_mask_512 : GCCBuiltin<"__builtin_ia32_mask_gatherdps512">, Intrinsic<[llvm_v16f32_ty], [llvm_v16f32_ty, llvm_i16_ty, llvm_v16i32_ty, llvm_ptr_ty, llvm_i32_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx512_gather_qpd_mask_512 : GCCBuiltin<"__builtin_ia32_mask_gatherqpd512">, Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, llvm_i8_ty, llvm_v8i64_ty, llvm_ptr_ty, llvm_i32_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx512_gather_qps_mask_512 : GCCBuiltin<"__builtin_ia32_mask_gatherqps512">, Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_i8_ty, llvm_v8i64_ty, llvm_ptr_ty, llvm_i32_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx512_gather_dpd_512 : GCCBuiltin<"__builtin_ia32_gatherdpd512">, Intrinsic<[llvm_v8f64_ty], [llvm_v8i32_ty, llvm_ptr_ty, llvm_i32_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx512_gather_dps_512 : GCCBuiltin<"__builtin_ia32_gatherdps512">, Intrinsic<[llvm_v16f32_ty], [llvm_v16i32_ty, llvm_ptr_ty, llvm_i32_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx512_gather_qpd_512 : GCCBuiltin<"__builtin_ia32_gatherqpd512">, Intrinsic<[llvm_v8f64_ty], [llvm_v8i64_ty, llvm_ptr_ty, llvm_i32_ty], @@ -2938,12 +2938,12 @@ let TargetPrefix = "x86" in { def int_x86_avx512_gather_qps_512 : GCCBuiltin<"__builtin_ia32_gatherqps512">, Intrinsic<[llvm_v8f32_ty], [llvm_v8i64_ty, llvm_ptr_ty, llvm_i32_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx512_gather_dpq_mask_512 : GCCBuiltin<"__builtin_ia32_mask_gatherdpq512">, Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, llvm_i8_ty, llvm_v8i32_ty, llvm_ptr_ty, llvm_i32_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx512_gather_dpi_mask_512 : GCCBuiltin<"__builtin_ia32_mask_gatherdpi512">, Intrinsic<[llvm_v16i32_ty], [llvm_v16i32_ty, llvm_i16_ty, llvm_v16i32_ty, llvm_ptr_ty, llvm_i32_ty], @@ -2955,7 +2955,7 @@ let TargetPrefix = "x86" in { def int_x86_avx512_gather_qpi_mask_512 : GCCBuiltin<"__builtin_ia32_mask_gatherqpi512">, Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, llvm_i8_ty, llvm_v8i64_ty, llvm_ptr_ty, llvm_i32_ty], - [IntrReadMem]>; + [IntrReadArgMem]>; def int_x86_avx512_gather_dpq_512 : GCCBuiltin<"__builtin_ia32_gatherdpq512">, Intrinsic<[llvm_v8i64_ty], [llvm_v8i32_ty, llvm_ptr_ty, Modified: stable/9/contrib/llvm/include/llvm/MC/MCAsmInfo.h ============================================================================== --- stable/9/contrib/llvm/include/llvm/MC/MCAsmInfo.h Tue May 27 18:22:52 2014 (r266758) +++ stable/9/contrib/llvm/include/llvm/MC/MCAsmInfo.h Tue May 27 18:27:51 2014 (r266759) @@ -266,13 +266,16 @@ namespace llvm { /// global as being a weak undefined symbol. const char *WeakRefDirective; // Defaults to NULL. - /// WeakDefDirective - This directive, if non-null, is used to declare a - /// global as being a weak defined symbol. - const char *WeakDefDirective; // Defaults to NULL. - - /// LinkOnceDirective - This directive, if non-null is used to declare a - /// global as being a weak defined symbol. This is used on cygwin/mingw. - const char *LinkOnceDirective; // Defaults to NULL. + /// True if we have a directive to declare a global as being a weak + /// defined symbol. + bool HasWeakDefDirective; // Defaults to false. + + /// True if we have a directive to declare a global as being a weak + /// defined symbol that can be hidden (unexported). + bool HasWeakDefCanBeHiddenDirective; // Defaults to false. + + /// True if we have a .linkonce directive. This is used on cygwin/mingw. + bool HasLinkOnceDirective; // Defaults to false. /// HiddenVisibilityAttr - This attribute, if not MCSA_Invalid, is used to /// declare a symbol as having hidden visibility. @@ -303,6 +306,10 @@ namespace llvm { /// uses relocations for references to other .debug_* sections. bool DwarfUsesRelocationsAcrossSections; + /// DwarfFDESymbolsUseAbsDiff - true if DWARF FDE symbol reference + /// relocations should be replaced by an absolute difference. + bool DwarfFDESymbolsUseAbsDiff; + /// DwarfRegNumForCFI - True if dwarf register numbers are printed /// instead of symbolic register names in .cfi_* directives. bool DwarfRegNumForCFI; // Defaults to false; @@ -497,8 +504,11 @@ namespace llvm { bool hasIdentDirective() const { return HasIdentDirective; } bool hasNoDeadStrip() const { return HasNoDeadStrip; } const char *getWeakRefDirective() const { return WeakRefDirective; } - const char *getWeakDefDirective() const { return WeakDefDirective; } - const char *getLinkOnceDirective() const { return LinkOnceDirective; } + bool hasWeakDefDirective() const { return HasWeakDefDirective; } + bool hasWeakDefCanBeHiddenDirective() const { + return HasWeakDefCanBeHiddenDirective; + } + bool hasLinkOnceDirective() const { return HasLinkOnceDirective; } MCSymbolAttr getHiddenVisibilityAttr() const { return HiddenVisibilityAttr;} MCSymbolAttr getHiddenDeclarationVisibilityAttr() const { @@ -528,6 +538,9 @@ namespace llvm { bool doesDwarfUseRelocationsAcrossSections() const { return DwarfUsesRelocationsAcrossSections; } + bool doDwarfFDESymbolsUseAbsDiff() const { + return DwarfFDESymbolsUseAbsDiff; + } bool useDwarfRegNumForCFI() const { return DwarfRegNumForCFI; } Modified: stable/9/contrib/llvm/lib/Analysis/BasicAliasAnalysis.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Analysis/BasicAliasAnalysis.cpp Tue May 27 18:22:52 2014 (r266758) +++ stable/9/contrib/llvm/lib/Analysis/BasicAliasAnalysis.cpp Tue May 27 18:27:51 2014 (r266759) @@ -18,7 +18,10 @@ #include "llvm/ADT/SmallVector.h" #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Analysis/CaptureTracking.h" +#include "llvm/Analysis/CFG.h" +#include "llvm/Analysis/Dominators.h" #include "llvm/Analysis/InstructionSimplify.h" +#include "llvm/Analysis/LoopInfo.h" #include "llvm/Analysis/MemoryBuiltins.h" #include "llvm/Analysis/ValueTracking.h" #include "llvm/IR/Constants.h" @@ -38,6 +41,12 @@ #include using namespace llvm; +/// Cutoff after which to stop analysing a set of phi nodes potentially involved +/// in a cycle. Because we are analysing 'through' phi nodes we need to be +/// careful with value equivalence. We use reachability to make sure a value +/// cannot be involved in a cycle. +const unsigned MaxNumPhiBBsValueReachabilityCheck = 20; + //===----------------------------------------------------------------------===// // Useful predicates //===----------------------------------------------------------------------===// @@ -403,42 +412,6 @@ DecomposeGEPExpression(const Value *V, i return V; } -/// GetIndexDifference - Dest and Src are the variable indices from two -/// decomposed GetElementPtr instructions GEP1 and GEP2 which have common base -/// pointers. Subtract the GEP2 indices from GEP1 to find the symbolic -/// difference between the two pointers. -static void GetIndexDifference(SmallVectorImpl &Dest, - const SmallVectorImpl &Src) { - if (Src.empty()) return; - - for (unsigned i = 0, e = Src.size(); i != e; ++i) { - const Value *V = Src[i].V; - ExtensionKind Extension = Src[i].Extension; - int64_t Scale = Src[i].Scale; - - // Find V in Dest. This is N^2, but pointer indices almost never have more - // than a few variable indexes. - for (unsigned j = 0, e = Dest.size(); j != e; ++j) { - if (Dest[j].V != V || Dest[j].Extension != Extension) continue; - - // If we found it, subtract off Scale V's from the entry in Dest. If it - // goes to zero, remove the entry. - if (Dest[j].Scale != Scale) - Dest[j].Scale -= Scale; - else - Dest.erase(Dest.begin()+j); - Scale = 0; - break; - } - - // If we didn't consume this entry, add it to the end of the Dest list. - if (Scale) { - VariableGEPIndex Entry = { V, Extension, -Scale }; - Dest.push_back(Entry); - } - } -} - //===----------------------------------------------------------------------===// // BasicAliasAnalysis Pass //===----------------------------------------------------------------------===// @@ -492,6 +465,7 @@ namespace { // SmallDenseMap if it ever grows larger. // FIXME: This should really be shrink_to_inline_capacity_and_clear(). AliasCache.shrink_and_clear(); + VisitedPhiBBs.clear(); return Alias; } @@ -532,9 +506,39 @@ namespace { typedef SmallDenseMap AliasCacheTy; AliasCacheTy AliasCache; + /// \brief Track phi nodes we have visited. When interpret "Value" pointer + /// equality as value equality we need to make sure that the "Value" is not + /// part of a cycle. Otherwise, two uses could come from different + /// "iterations" of a cycle and see different values for the same "Value" + /// pointer. + /// The following example shows the problem: + /// %p = phi(%alloca1, %addr2) + /// %l = load %ptr + /// %addr1 = gep, %alloca2, 0, %l + /// %addr2 = gep %alloca2, 0, (%l + 1) + /// alias(%p, %addr1) -> MayAlias ! + /// store %l, ... + SmallPtrSet VisitedPhiBBs; + // Visited - Track instructions visited by pointsToConstantMemory. SmallPtrSet Visited; + /// \brief Check whether two Values can be considered equivalent. + /// + /// In addition to pointer equivalence of \p V1 and \p V2 this checks + /// whether they can not be part of a cycle in the value graph by looking at + /// all visited phi nodes an making sure that the phis cannot reach the + /// value. We have to do this because we are looking through phi nodes (That + /// is we say noalias(V, phi(VA, VB)) if noalias(V, VA) and noalias(V, VB). + bool isValueEqualInPotentialCycles(const Value *V1, const Value *V2); + + /// \brief Dest and Src are the variable indices from two decomposed + /// GetElementPtr instructions GEP1 and GEP2 which have common base + /// pointers. Subtract the GEP2 indices from GEP1 to find the symbolic + /// difference between the two pointers. + void GetIndexDifference(SmallVectorImpl &Dest, + const SmallVectorImpl &Src); + // aliasGEP - Provide a bunch of ad-hoc rules to disambiguate a GEP // instruction against another. AliasResult aliasGEP(const GEPOperator *V1, uint64_t V1Size, @@ -1005,7 +1009,15 @@ BasicAliasAnalysis::aliasGEP(const GEPOp return NoAlias; } } else { - if (V1Size != UnknownSize) { + // We have the situation where: + // + + + // | BaseOffset | + // ---------------->| + // |-->V1Size |-------> V2Size + // GEP1 V2 + // We need to know that V2Size is not unknown, otherwise we might have + // stripped a gep with negative index ('gep , -1, ...). + if (V1Size != UnknownSize && V2Size != UnknownSize) { if (-(uint64_t)GEP1BaseOffset < V1Size) return PartialAlias; return NoAlias; @@ -1094,6 +1106,10 @@ BasicAliasAnalysis::aliasPHI(const PHINo const MDNode *PNTBAAInfo, const Value *V2, uint64_t V2Size, const MDNode *V2TBAAInfo) { + // Track phi nodes we have visited. We use this information when we determine + // value equivalence. + VisitedPhiBBs.insert(PN->getParent()); + // If the values are PHIs in the same block, we can do a more precise // as well as efficient check: just check for aliases between the values // on corresponding edges. @@ -1187,7 +1203,13 @@ BasicAliasAnalysis::aliasCheck(const Val V2 = V2->stripPointerCasts(); // Are we checking for alias of the same value? - if (V1 == V2) return MustAlias; + // Because we look 'through' phi nodes we could look at "Value" pointers from + // different iterations. We must therefore make sure that this is not the + // case. The function isValueEqualInPotentialCycles ensures that this cannot + // happen by looking at the visited phi nodes and making sure they cannot + // reach the value. + if (isValueEqualInPotentialCycles(V1, V2)) + return MustAlias; if (!V1->getType()->isPointerTy() || !V2->getType()->isPointerTy()) return NoAlias; // Scalars cannot alias each other @@ -1307,3 +1329,71 @@ BasicAliasAnalysis::aliasCheck(const Val Location(V2, V2Size, V2TBAAInfo)); return AliasCache[Locs] = Result; } + +bool BasicAliasAnalysis::isValueEqualInPotentialCycles(const Value *V, + const Value *V2) { + if (V != V2) + return false; + + const Instruction *Inst = dyn_cast(V); + if (!Inst) + return true; + + if (VisitedPhiBBs.size() > MaxNumPhiBBsValueReachabilityCheck) + return false; + + // Use dominance or loop info if available. + DominatorTree *DT = getAnalysisIfAvailable(); + LoopInfo *LI = getAnalysisIfAvailable(); + + // Make sure that the visited phis cannot reach the Value. This ensures that + // the Values cannot come from different iterations of a potential cycle the + // phi nodes could be involved in. + for (SmallPtrSet::iterator PI = VisitedPhiBBs.begin(), + PE = VisitedPhiBBs.end(); + PI != PE; ++PI) + if (isPotentiallyReachable((*PI)->begin(), Inst, DT, LI)) + return false; + + return true; +} + +/// GetIndexDifference - Dest and Src are the variable indices from two +/// decomposed GetElementPtr instructions GEP1 and GEP2 which have common base +/// pointers. Subtract the GEP2 indices from GEP1 to find the symbolic +/// difference between the two pointers. +void BasicAliasAnalysis::GetIndexDifference( + SmallVectorImpl &Dest, + const SmallVectorImpl &Src) { + if (Src.empty()) + return; + + for (unsigned i = 0, e = Src.size(); i != e; ++i) { + const Value *V = Src[i].V; + ExtensionKind Extension = Src[i].Extension; + int64_t Scale = Src[i].Scale; + + // Find V in Dest. This is N^2, but pointer indices almost never have more + // than a few variable indexes. + for (unsigned j = 0, e = Dest.size(); j != e; ++j) { + if (!isValueEqualInPotentialCycles(Dest[j].V, V) || + Dest[j].Extension != Extension) + continue; + + // If we found it, subtract off Scale V's from the entry in Dest. If it + // goes to zero, remove the entry. + if (Dest[j].Scale != Scale) + Dest[j].Scale -= Scale; + else + Dest.erase(Dest.begin() + j); + Scale = 0; + break; + } + + // If we didn't consume this entry, add it to the end of the Dest list. + if (Scale) { + VariableGEPIndex Entry = { V, Extension, -Scale }; + Dest.push_back(Entry); + } + } +} Modified: stable/9/contrib/llvm/lib/Analysis/IVUsers.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Analysis/IVUsers.cpp Tue May 27 18:22:52 2014 (r266758) +++ stable/9/contrib/llvm/lib/Analysis/IVUsers.cpp Tue May 27 18:27:51 2014 (r266759) @@ -187,15 +187,34 @@ bool IVUsers::AddUsersImpl(Instruction * if (AddUserToIVUsers) { // Okay, we found a user that we cannot reduce. - IVUses.push_back(new IVStrideUse(this, User, I)); - IVStrideUse &NewUse = IVUses.back(); + IVStrideUse &NewUse = AddUser(User, I); // Autodetect the post-inc loop set, populating NewUse.PostIncLoops. // The regular return value here is discarded; instead of recording // it, we just recompute it when we need it. + const SCEV *OriginalISE = ISE; ISE = TransformForPostIncUse(NormalizeAutodetect, ISE, User, I, NewUse.PostIncLoops, *SE, *DT); + + // PostIncNormalization effectively simplifies the expression under + // pre-increment assumptions. Those assumptions (no wrapping) might not + // hold for the post-inc value. Catch such cases by making sure the + // transformation is invertible. + if (OriginalISE != ISE) { + const SCEV *DenormalizedISE = + TransformForPostIncUse(Denormalize, ISE, User, I, + NewUse.PostIncLoops, *SE, *DT); + + // If we normalized the expression, but denormalization doesn't give the + // original one, discard this user. + if (OriginalISE != DenormalizedISE) { + DEBUG(dbgs() << " DISCARDING (NORMALIZATION ISN'T INVERTIBLE): " + << *ISE << '\n'); + IVUses.pop_back(); + return false; + } + } DEBUG(if (SE->getSCEV(I) != ISE) dbgs() << " NORMALIZED TO: " << *ISE << '\n'); } Modified: stable/9/contrib/llvm/lib/Analysis/ScalarEvolution.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Analysis/ScalarEvolution.cpp Tue May 27 18:22:52 2014 (r266758) +++ stable/9/contrib/llvm/lib/Analysis/ScalarEvolution.cpp Tue May 27 18:27:51 2014 (r266759) @@ -6218,7 +6218,7 @@ bool ScalarEvolution::isImpliedCond(ICmp // LHS' type is checked for above. if (getTypeSizeInBits(LHS->getType()) > getTypeSizeInBits(FoundLHS->getType())) { - if (CmpInst::isSigned(Pred)) { + if (CmpInst::isSigned(FoundPred)) { FoundLHS = getSignExtendExpr(FoundLHS, LHS->getType()); FoundRHS = getSignExtendExpr(FoundRHS, LHS->getType()); } else { Modified: stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp ============================================================================== --- stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Tue May 27 18:22:52 2014 (r266758) +++ stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Tue May 27 18:27:51 2014 (r266759) @@ -223,13 +223,14 @@ void AsmPrinter::EmitLinkage(const Globa case GlobalValue::WeakAnyLinkage: case GlobalValue::WeakODRLinkage: case GlobalValue::LinkerPrivateWeakLinkage: - if (MAI->getWeakDefDirective() != 0) { + if (MAI->hasWeakDefDirective()) { // .globl _foo OutStreamer.EmitSymbolAttribute(GVSym, MCSA_Global); bool CanBeHidden = false; - if (Linkage == GlobalValue::LinkOnceODRLinkage) { + if (Linkage == GlobalValue::LinkOnceODRLinkage && + MAI->hasWeakDefCanBeHiddenDirective()) { if (GV->hasUnnamedAddr()) { CanBeHidden = true; } else { @@ -244,7 +245,7 @@ void AsmPrinter::EmitLinkage(const Globa OutStreamer.EmitSymbolAttribute(GVSym, MCSA_WeakDefinition); else OutStreamer.EmitSymbolAttribute(GVSym, MCSA_WeakDefAutoPrivate); - } else if (MAI->getLinkOnceDirective() != 0) { + } else if (MAI->hasLinkOnceDirective()) { // .globl _foo OutStreamer.EmitSymbolAttribute(GVSym, MCSA_Global); //NOTE: linkonce is handled by the section the symbol was assigned to. Modified: stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp ============================================================================== --- stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Tue May 27 18:22:52 2014 (r266758) +++ stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Tue May 27 18:27:51 2014 (r266759) @@ -8547,7 +8547,10 @@ struct MemOpLink { // base ptr. struct ConsecutiveMemoryChainSorter { bool operator()(MemOpLink LHS, MemOpLink RHS) { - return LHS.OffsetFromBase < RHS.OffsetFromBase; + return + LHS.OffsetFromBase < RHS.OffsetFromBase || + (LHS.OffsetFromBase == RHS.OffsetFromBase && + LHS.SequenceNum > RHS.SequenceNum); } }; Modified: stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp ============================================================================== --- stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp Tue May 27 18:22:52 2014 (r266758) +++ stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp Tue May 27 18:27:51 2014 (r266759) @@ -210,6 +210,7 @@ SDValue VectorLegalizer::LegalizeOp(SDVa case ISD::SRL: case ISD::ROTL: case ISD::ROTR: + case ISD::BSWAP: case ISD::CTLZ: case ISD::CTTZ: case ISD::CTLZ_ZERO_UNDEF: Modified: stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp ============================================================================== --- stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp Tue May 27 18:22:52 2014 (r266758) +++ stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp Tue May 27 18:27:51 2014 (r266759) @@ -219,8 +219,11 @@ void ScheduleDAGSDNodes::ClusterNeighbor DenseMap O2SMap; // Map from offset to SDNode. bool Cluster = false; SDNode *Base = Node; + // This algorithm requires a reasonably low use count before finding a match + // to avoid uselessly blowing up compile time in large blocks. + unsigned UseCount = 0; for (SDNode::use_iterator I = Chain->use_begin(), E = Chain->use_end(); - I != E; ++I) { + I != E && UseCount < 100; ++I, ++UseCount) { SDNode *User = *I; if (User == Node || !Visited.insert(User)) continue; @@ -237,6 +240,8 @@ void ScheduleDAGSDNodes::ClusterNeighbor if (Offset2 < Offset1) Base = User; Cluster = true; + // Reset UseCount to allow more matches. + UseCount = 0; } if (!Cluster) Modified: stable/9/contrib/llvm/lib/MC/MCAsmInfo.cpp ============================================================================== --- stable/9/contrib/llvm/lib/MC/MCAsmInfo.cpp Tue May 27 18:22:52 2014 (r266758) +++ stable/9/contrib/llvm/lib/MC/MCAsmInfo.cpp Tue May 27 18:27:51 2014 (r266759) @@ -76,8 +76,9 @@ MCAsmInfo::MCAsmInfo() { HasIdentDirective = false; HasNoDeadStrip = false; WeakRefDirective = 0; - WeakDefDirective = 0; - LinkOnceDirective = 0; + HasWeakDefDirective = false; + HasWeakDefCanBeHiddenDirective = false; + HasLinkOnceDirective = false; HiddenVisibilityAttr = MCSA_Hidden; HiddenDeclarationVisibilityAttr = MCSA_Hidden; ProtectedVisibilityAttr = MCSA_Protected; @@ -85,6 +86,7 @@ MCAsmInfo::MCAsmInfo() { SupportsDebugInformation = false; ExceptionsType = ExceptionHandling::None; DwarfUsesRelocationsAcrossSections = true; + DwarfFDESymbolsUseAbsDiff = false; DwarfRegNumForCFI = false; HasMicrosoftFastStdCallMangling = false; NeedsDwarfSectionOffsetDirective = false; Modified: stable/9/contrib/llvm/lib/MC/MCAsmInfoCOFF.cpp ============================================================================== --- stable/9/contrib/llvm/lib/MC/MCAsmInfoCOFF.cpp Tue May 27 18:22:52 2014 (r266758) +++ stable/9/contrib/llvm/lib/MC/MCAsmInfoCOFF.cpp Tue May 27 18:27:51 2014 (r266759) @@ -27,7 +27,7 @@ MCAsmInfoCOFF::MCAsmInfoCOFF() { HasSingleParameterDotFile = false; PrivateGlobalPrefix = "L"; // Prefix for private global symbols WeakRefDirective = "\t.weak\t"; - LinkOnceDirective = "\t.linkonce discard\n"; + HasLinkOnceDirective = true; // Doesn't support visibility: HiddenVisibilityAttr = HiddenDeclarationVisibilityAttr = MCSA_Invalid; Modified: stable/9/contrib/llvm/lib/MC/MCAsmInfoDarwin.cpp ============================================================================== --- stable/9/contrib/llvm/lib/MC/MCAsmInfoDarwin.cpp Tue May 27 18:22:52 2014 (r266758) +++ stable/9/contrib/llvm/lib/MC/MCAsmInfoDarwin.cpp Tue May 27 18:27:51 2014 (r266759) @@ -36,7 +36,8 @@ MCAsmInfoDarwin::MCAsmInfoDarwin() { InlineAsmEnd = " InlineAsm End"; // Directives: - WeakDefDirective = "\t.weak_definition "; + HasWeakDefDirective = true; + HasWeakDefCanBeHiddenDirective = true; WeakRefDirective = "\t.weak_reference "; ZeroDirective = "\t.space\t"; // ".space N" emits N zeros. HasMachoZeroFillDirective = true; // Uses .zerofill Modified: stable/9/contrib/llvm/lib/MC/MCDwarf.cpp ============================================================================== --- stable/9/contrib/llvm/lib/MC/MCDwarf.cpp Tue May 27 18:22:52 2014 (r266758) +++ stable/9/contrib/llvm/lib/MC/MCDwarf.cpp Tue May 27 18:27:51 2014 (r266759) @@ -839,8 +839,9 @@ static unsigned getSizeForEncoding(MCStr } } -static void EmitSymbol(MCStreamer &streamer, const MCSymbol &symbol, - unsigned symbolEncoding, const char *comment = 0) { +static void EmitFDESymbol(MCStreamer &streamer, const MCSymbol &symbol, + unsigned symbolEncoding, bool isEH, + const char *comment = 0) { MCContext &context = streamer.getContext(); const MCAsmInfo *asmInfo = context.getAsmInfo(); const MCExpr *v = asmInfo->getExprForFDESymbol(&symbol, @@ -848,7 +849,10 @@ static void EmitSymbol(MCStreamer &strea streamer); unsigned size = getSizeForEncoding(streamer, symbolEncoding); if (streamer.isVerboseAsm() && comment) streamer.AddComment(comment); - streamer.EmitAbsValue(v, size); + if (asmInfo->doDwarfFDESymbolsUseAbsDiff() && isEH) + streamer.EmitAbsValue(v, size); + else + streamer.EmitValue(v, size); } static void EmitPersonality(MCStreamer &streamer, const MCSymbol &symbol, @@ -1347,7 +1351,7 @@ MCSymbol *FrameEmitterImpl::EmitFDE(MCSt unsigned PCEncoding = IsEH ? MOFI->getFDEEncoding(UsingCFI) : (unsigned)dwarf::DW_EH_PE_absptr; unsigned PCSize = getSizeForEncoding(streamer, PCEncoding); - EmitSymbol(streamer, *frame.Begin, PCEncoding, "FDE initial location"); + EmitFDESymbol(streamer, *frame.Begin, PCEncoding, IsEH, "FDE initial location"); // PC Range const MCExpr *Range = MakeStartMinusEndExpr(streamer, *frame.Begin, @@ -1367,8 +1371,8 @@ MCSymbol *FrameEmitterImpl::EmitFDE(MCSt // Augmentation Data if (frame.Lsda) - EmitSymbol(streamer, *frame.Lsda, frame.LsdaEncoding, - "Language Specific Data Area"); + EmitFDESymbol(streamer, *frame.Lsda, frame.LsdaEncoding, true, + "Language Specific Data Area"); } // Call Frame Instructions Modified: stable/9/contrib/llvm/lib/MC/MCParser/AsmParser.cpp ============================================================================== --- stable/9/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Tue May 27 18:22:52 2014 (r266758) +++ stable/9/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Tue May 27 18:27:51 2014 (r266759) @@ -4297,6 +4297,10 @@ bool AsmParser::parseMSInlineAsm( break; } case AOK_DotOperator: + // Insert the dot if the user omitted it. + OS.flush(); + if (AsmStringIR.at(AsmStringIR.size() - 1) != '.') + OS << '.'; OS << (*I).Val; break; } Modified: stable/9/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp Tue May 27 18:22:52 2014 (r266758) +++ stable/9/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp Tue May 27 18:27:51 2014 (r266759) @@ -31,12 +31,8 @@ using namespace llvm; static TargetLoweringObjectFile *createTLOF(AArch64TargetMachine &TM) { const AArch64Subtarget *Subtarget = &TM.getSubtarget(); - - if (Subtarget->isTargetLinux()) - return new AArch64LinuxTargetObjectFile(); - if (Subtarget->isTargetELF()) - return new TargetLoweringObjectFileELF(); - llvm_unreachable("unknown subtarget type"); + assert (Subtarget->isTargetELF() && "unknown subtarget type"); + return new AArch64ElfTargetObjectFile(); } AArch64TargetLowering::AArch64TargetLowering(AArch64TargetMachine &TM) @@ -2782,7 +2778,7 @@ AArch64TargetLowering::LowerSETCC(SDValu SDValue AArch64TargetLowering::LowerVACOPY(SDValue Op, SelectionDAG &DAG) const { const Value *DestSV = cast(Op.getOperand(3))->getValue(); - const Value *SrcSV = cast(Op.getOperand(3))->getValue(); + const Value *SrcSV = cast(Op.getOperand(4))->getValue(); // We have to make sure we copy the entire structure: 8+8+8+4+4 = 32 bytes // rather than just 8. Modified: stable/9/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.td ============================================================================== --- stable/9/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.td Tue May 27 18:22:52 2014 (r266758) +++ stable/9/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.td Tue May 27 18:27:51 2014 (r266759) @@ -2587,6 +2587,7 @@ class A64I_SRexs_impl size, bits pat, itin> { let mayStore = 1; let PostEncoderMethod = "fixLoadStoreExclusive<1,0>"; + let Constraints = "@earlyclobber $Rs"; } multiclass A64I_SRex opcode, string prefix> { Modified: stable/9/contrib/llvm/lib/Target/AArch64/AArch64TargetObjectFile.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Target/AArch64/AArch64TargetObjectFile.cpp Tue May 27 18:22:52 2014 (r266758) +++ stable/9/contrib/llvm/lib/Target/AArch64/AArch64TargetObjectFile.cpp Tue May 27 18:27:51 2014 (r266759) @@ -22,3 +22,10 @@ AArch64LinuxTargetObjectFile::Initialize TargetLoweringObjectFileELF::Initialize(Ctx, TM); InitializeELF(TM.Options.UseInitArray); } + +void +AArch64ElfTargetObjectFile::Initialize(MCContext &Ctx, + const TargetMachine &TM) { + TargetLoweringObjectFileELF::Initialize(Ctx, TM); + InitializeELF(TM.Options.UseInitArray); +} Modified: stable/9/contrib/llvm/lib/Target/AArch64/AArch64TargetObjectFile.h ============================================================================== --- stable/9/contrib/llvm/lib/Target/AArch64/AArch64TargetObjectFile.h Tue May 27 18:22:52 2014 (r266758) +++ stable/9/contrib/llvm/lib/Target/AArch64/AArch64TargetObjectFile.h Tue May 27 18:27:51 2014 (r266759) @@ -20,8 +20,12 @@ namespace llvm { - /// AArch64LinuxTargetObjectFile - This implementation is used for linux - /// AArch64. + /// AArch64ElfTargetObjectFile - This implementation is used for ELF + /// AArch64 targets. + class AArch64ElfTargetObjectFile : public TargetLoweringObjectFileELF { + virtual void Initialize(MCContext &Ctx, const TargetMachine &TM); + }; + class AArch64LinuxTargetObjectFile : public TargetLoweringObjectFileELF { virtual void Initialize(MCContext &Ctx, const TargetMachine &TM); }; Modified: stable/9/contrib/llvm/lib/Target/ARM/A15SDOptimizer.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Target/ARM/A15SDOptimizer.cpp Tue May 27 18:22:52 2014 (r266758) +++ stable/9/contrib/llvm/lib/Target/ARM/A15SDOptimizer.cpp Tue May 27 18:27:51 2014 (r266759) @@ -418,7 +418,8 @@ SmallVector A15SDOptimizer: if (!MO.isReg() || !MO.isUse()) continue; if (!usesRegClass(MO, &ARM::DPRRegClass) && - !usesRegClass(MO, &ARM::QPRRegClass)) + !usesRegClass(MO, &ARM::QPRRegClass) && + !usesRegClass(MO, &ARM::DPairRegClass)) // Treat DPair as QPR continue; Defs.push_back(MO.getReg()); @@ -538,7 +539,10 @@ A15SDOptimizer::optimizeAllLanesPattern( InsertPt++; unsigned Out; - if (MRI->getRegClass(Reg)->hasSuperClassEq(&ARM::QPRRegClass)) { + // DPair has the same length as QPR and also has two DPRs as subreg. + // Treat DPair as QPR. + if (MRI->getRegClass(Reg)->hasSuperClassEq(&ARM::QPRRegClass) || + MRI->getRegClass(Reg)->hasSuperClassEq(&ARM::DPairRegClass)) { unsigned DSub0 = createExtractSubreg(MBB, InsertPt, DL, Reg, ARM::dsub_0, &ARM::DPRRegClass); unsigned DSub1 = createExtractSubreg(MBB, InsertPt, DL, Reg, @@ -571,7 +575,9 @@ A15SDOptimizer::optimizeAllLanesPattern( default: llvm_unreachable("Unknown preferred lane!"); } - bool UsesQPR = usesRegClass(MI->getOperand(0), &ARM::QPRRegClass); + // Treat DPair as QPR + bool UsesQPR = usesRegClass(MI->getOperand(0), &ARM::QPRRegClass) || + usesRegClass(MI->getOperand(0), &ARM::DPairRegClass); Out = createImplicitDef(MBB, InsertPt, DL); Out = createInsertSubreg(MBB, InsertPt, DL, Out, PrefLane, Reg); Modified: stable/9/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp Tue May 27 18:22:52 2014 (r266758) +++ stable/9/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp Tue May 27 18:27:51 2014 (r266759) @@ -3684,6 +3684,7 @@ ARMBaseInstrInfo::getOperandLatency(cons case ARM::VLD3d16Pseudo: case ARM::VLD3d32Pseudo: case ARM::VLD1d64TPseudo: + case ARM::VLD1d64TPseudoWB_fixed: case ARM::VLD3d8Pseudo_UPD: case ARM::VLD3d16Pseudo_UPD: case ARM::VLD3d32Pseudo_UPD: @@ -3700,6 +3701,7 @@ ARMBaseInstrInfo::getOperandLatency(cons case ARM::VLD4d16Pseudo: case ARM::VLD4d32Pseudo: case ARM::VLD1d64QPseudo: + case ARM::VLD1d64QPseudoWB_fixed: case ARM::VLD4d8Pseudo_UPD: case ARM::VLD4d16Pseudo_UPD: case ARM::VLD4d32Pseudo_UPD: Modified: stable/9/contrib/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp Tue May 27 18:22:52 2014 (r266758) +++ stable/9/contrib/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp Tue May 27 18:27:51 2014 (r266759) @@ -136,7 +136,9 @@ static const NEONLdStTableEntry NEONLdSt { ARM::VLD1LNq8Pseudo_UPD, ARM::VLD1LNd8_UPD, true, true, true, EvenDblSpc, 1, 8 ,true}, { ARM::VLD1d64QPseudo, ARM::VLD1d64Q, true, false, false, SingleSpc, 4, 1 ,false}, +{ ARM::VLD1d64QPseudoWB_fixed, ARM::VLD1d64Qwb_fixed, true, true, false, SingleSpc, 4, 1 ,false}, { ARM::VLD1d64TPseudo, ARM::VLD1d64T, true, false, false, SingleSpc, 3, 1 ,false}, +{ ARM::VLD1d64TPseudoWB_fixed, ARM::VLD1d64Twb_fixed, true, true, false, SingleSpc, 3, 1 ,false}, { ARM::VLD2LNd16Pseudo, ARM::VLD2LNd16, true, false, false, SingleSpc, 2, 4 ,true}, { ARM::VLD2LNd16Pseudo_UPD, ARM::VLD2LNd16_UPD, true, true, true, SingleSpc, 2, 4 ,true}, @@ -1071,6 +1073,7 @@ bool ARMExpandPseudo::ExpandMI(MachineBa case ARM::VLD3d16Pseudo: case ARM::VLD3d32Pseudo: case ARM::VLD1d64TPseudo: + case ARM::VLD1d64TPseudoWB_fixed: case ARM::VLD3d8Pseudo_UPD: case ARM::VLD3d16Pseudo_UPD: case ARM::VLD3d32Pseudo_UPD: @@ -1087,6 +1090,7 @@ bool ARMExpandPseudo::ExpandMI(MachineBa case ARM::VLD4d16Pseudo: case ARM::VLD4d32Pseudo: case ARM::VLD1d64QPseudo: + case ARM::VLD1d64QPseudoWB_fixed: case ARM::VLD4d8Pseudo_UPD: case ARM::VLD4d16Pseudo_UPD: case ARM::VLD4d32Pseudo_UPD: Modified: stable/9/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Tue May 27 18:22:52 2014 (r266758) +++ stable/9/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Tue May 27 18:27:51 2014 (r266759) @@ -1673,9 +1673,61 @@ SDValue ARMDAGToDAGISel::GetVLDSTAlign(S return CurDAG->getTargetConstant(Alignment, MVT::i32); } +static bool isVLDfixed(unsigned Opc) +{ + switch (Opc) { + default: return false; + case ARM::VLD1d8wb_fixed : return true; + case ARM::VLD1d16wb_fixed : return true; + case ARM::VLD1d64Qwb_fixed : return true; + case ARM::VLD1d32wb_fixed : return true; + case ARM::VLD1d64wb_fixed : return true; + case ARM::VLD1d64TPseudoWB_fixed : return true; + case ARM::VLD1d64QPseudoWB_fixed : return true; + case ARM::VLD1q8wb_fixed : return true; + case ARM::VLD1q16wb_fixed : return true; + case ARM::VLD1q32wb_fixed : return true; + case ARM::VLD1q64wb_fixed : return true; + case ARM::VLD2d8wb_fixed : return true; + case ARM::VLD2d16wb_fixed : return true; + case ARM::VLD2d32wb_fixed : return true; + case ARM::VLD2q8PseudoWB_fixed : return true; + case ARM::VLD2q16PseudoWB_fixed : return true; + case ARM::VLD2q32PseudoWB_fixed : return true; + case ARM::VLD2DUPd8wb_fixed : return true; + case ARM::VLD2DUPd16wb_fixed : return true; + case ARM::VLD2DUPd32wb_fixed : return true; + } +} + +static bool isVSTfixed(unsigned Opc) +{ + switch (Opc) { + default: return false; + case ARM::VST1d8wb_fixed : return true; + case ARM::VST1d16wb_fixed : return true; + case ARM::VST1d32wb_fixed : return true; + case ARM::VST1d64wb_fixed : return true; + case ARM::VST1q8wb_fixed : return true; + case ARM::VST1q16wb_fixed : return true; + case ARM::VST1q32wb_fixed : return true; + case ARM::VST1q64wb_fixed : return true; + case ARM::VST1d64TPseudoWB_fixed : return true; + case ARM::VST1d64QPseudoWB_fixed : return true; + case ARM::VST2d8wb_fixed : return true; + case ARM::VST2d16wb_fixed : return true; + case ARM::VST2d32wb_fixed : return true; + case ARM::VST2q8PseudoWB_fixed : return true; + case ARM::VST2q16PseudoWB_fixed : return true; + case ARM::VST2q32PseudoWB_fixed : return true; + } +} + // Get the register stride update opcode of a VLD/VST instruction that // is otherwise equivalent to the given fixed stride updating instruction. static unsigned getVLDSTRegisterUpdateOpcode(unsigned Opc) { + assert((isVLDfixed(Opc) || isVSTfixed(Opc)) + && "Incorrect fixed stride updating instruction."); switch (Opc) { default: break; case ARM::VLD1d8wb_fixed: return ARM::VLD1d8wb_register; @@ -1686,6 +1738,10 @@ static unsigned getVLDSTRegisterUpdateOp case ARM::VLD1q16wb_fixed: return ARM::VLD1q16wb_register; case ARM::VLD1q32wb_fixed: return ARM::VLD1q32wb_register; case ARM::VLD1q64wb_fixed: return ARM::VLD1q64wb_register; + case ARM::VLD1d64Twb_fixed: return ARM::VLD1d64Twb_register; + case ARM::VLD1d64Qwb_fixed: return ARM::VLD1d64Qwb_register; + case ARM::VLD1d64TPseudoWB_fixed: return ARM::VLD1d64TPseudoWB_register; + case ARM::VLD1d64QPseudoWB_fixed: return ARM::VLD1d64QPseudoWB_register; case ARM::VST1d8wb_fixed: return ARM::VST1d8wb_register; case ARM::VST1d16wb_fixed: return ARM::VST1d16wb_register; @@ -1785,11 +1841,11 @@ SDNode *ARMDAGToDAGISel::SelectVLD(SDNod SDValue Inc = N->getOperand(AddrOpIdx + 1); // FIXME: VLD1/VLD2 fixed increment doesn't need Reg0. Remove the reg0 // case entirely when the rest are updated to that form, too. - if ((NumVecs == 1 || NumVecs == 2) && !isa(Inc.getNode())) + if ((NumVecs <= 2) && !isa(Inc.getNode())) Opc = getVLDSTRegisterUpdateOpcode(Opc); - // We use a VLD1 for v1i64 even if the pseudo says vld2/3/4, so + // FIXME: We use a VLD1 for v1i64 even if the pseudo says vld2/3/4, so // check for that explicitly too. Horribly hacky, but temporary. - if ((NumVecs != 1 && NumVecs != 2 && Opc != ARM::VLD1q64wb_fixed) || + if ((NumVecs > 2 && !isVLDfixed(Opc)) || !isa(Inc.getNode())) Ops.push_back(isa(Inc.getNode()) ? Reg0 : Inc); } @@ -1937,11 +1993,12 @@ SDNode *ARMDAGToDAGISel::SelectVST(SDNod // case entirely when the rest are updated to that form, too. if (NumVecs <= 2 && !isa(Inc.getNode())) Opc = getVLDSTRegisterUpdateOpcode(Opc); - // We use a VST1 for v1i64 even if the pseudo says vld2/3/4, so + // FIXME: We use a VST1 for v1i64 even if the pseudo says vld2/3/4, so // check for that explicitly too. Horribly hacky, but temporary. - if ((NumVecs > 2 && Opc != ARM::VST1q64wb_fixed) || - !isa(Inc.getNode())) - Ops.push_back(isa(Inc.getNode()) ? Reg0 : Inc); + if (!isa(Inc.getNode())) + Ops.push_back(Inc); + else if (NumVecs > 2 && !isVSTfixed(Opc)) + Ops.push_back(Reg0); } Ops.push_back(SrcReg); Ops.push_back(Pred); @@ -2834,7 +2891,7 @@ SDNode *ARMDAGToDAGISel::Select(SDNode * static const uint16_t DOpcodes[] = { ARM::VLD3d8Pseudo_UPD, ARM::VLD3d16Pseudo_UPD, ARM::VLD3d32Pseudo_UPD, - ARM::VLD1q64wb_fixed}; + ARM::VLD1d64TPseudoWB_fixed}; static const uint16_t QOpcodes0[] = { ARM::VLD3q8Pseudo_UPD, ARM::VLD3q16Pseudo_UPD, ARM::VLD3q32Pseudo_UPD }; @@ -2848,7 +2905,7 @@ SDNode *ARMDAGToDAGISel::Select(SDNode * static const uint16_t DOpcodes[] = { ARM::VLD4d8Pseudo_UPD, ARM::VLD4d16Pseudo_UPD, ARM::VLD4d32Pseudo_UPD, - ARM::VLD1q64wb_fixed}; + ARM::VLD1d64QPseudoWB_fixed}; static const uint16_t QOpcodes0[] = { ARM::VLD4q8Pseudo_UPD, ARM::VLD4q16Pseudo_UPD, ARM::VLD4q32Pseudo_UPD }; Modified: stable/9/contrib/llvm/lib/Target/ARM/ARMInstrNEON.td ============================================================================== --- stable/9/contrib/llvm/lib/Target/ARM/ARMInstrNEON.td Tue May 27 18:22:52 2014 (r266758) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Tue May 27 18:45:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 34485C16; Tue, 27 May 2014 18:45:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07B7D28BC; Tue, 27 May 2014 18:45:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4RIj2mw059449; Tue, 27 May 2014 18:45:02 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4RIj2ts059445; Tue, 27 May 2014 18:45:02 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201405271845.s4RIj2ts059445@svn.freebsd.org> From: Xin LI Date: Tue, 27 May 2014 18:45:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r266761 - in stable/8: . cddl/lib/libzfs X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 May 2014 18:45:03 -0000 Author: delphij Date: Tue May 27 18:45:02 2014 New Revision: 266761 URL: http://svnweb.freebsd.org/changeset/base/266761 Log: MFC r266520: Explicitly link libzfs against libavl as it is done in OpenSolaris (4543:12bb2876a62e). Without this, some third party applications may break because the lack of AVL related symbols. FreeBSD base system are not affected because the FreeBSD ZFS command line tools were all linked against libavl and thus hide the underlying issue. PR: bin/183081 Modified: stable/8/Makefile.inc1 (contents, props changed) stable/8/cddl/lib/libzfs/Makefile Directory Properties: stable/8/cddl/lib/ (props changed) Modified: stable/8/Makefile.inc1 ============================================================================== --- stable/8/Makefile.inc1 Tue May 27 18:39:13 2014 (r266760) +++ stable/8/Makefile.inc1 Tue May 27 18:45:02 2014 (r266761) @@ -1140,6 +1140,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 lib/libopie lib/libpam ${_lib_libthr} \ lib/libradius lib/libsbuf lib/libtacplus \ ${_cddl_lib_libumem} ${_cddl_lib_libnvpair} \ + ${_cddl_lib_libavl} \ ${_cddl_lib_libzfs_core} \ lib/libutil ${_lib_libypclnt} lib/libz lib/msun \ ${_secure_lib_libcrypto} ${_secure_lib_libssh} \ @@ -1156,6 +1157,7 @@ lib/libopie__L lib/libtacplus__L: lib/li .if ${MK_CDDL} != "no" _cddl_lib_libumem= cddl/lib/libumem _cddl_lib_libnvpair= cddl/lib/libnvpair +_cddl_lib_libavl= cddl/lib/libavl _cddl_lib_libzfs_core= cddl/lib/libzfs_core _cddl_lib= cddl/lib cddl/lib/libzfs_core__L: cddl/lib/libnvpair__L Modified: stable/8/cddl/lib/libzfs/Makefile ============================================================================== --- stable/8/cddl/lib/libzfs/Makefile Tue May 27 18:39:13 2014 (r266760) +++ stable/8/cddl/lib/libzfs/Makefile Tue May 27 18:45:02 2014 (r266761) @@ -7,8 +7,8 @@ LIB= zfs DPADD= ${LIBMD} ${LIBPTHREAD} ${LIBUMEM} ${LIBUTIL} ${LIBM} ${LIBNVPAIR} \ - ${LIBZFS_CORE} -LDADD= -lmd -lpthread -lumem -lutil -lm -lnvpair -lzfs_core + ${LIBAVL} ${LIBZFS_CORE} +LDADD= -lmd -lpthread -lumem -lutil -lm -lnvpair -lavl -lzfs_core SRCS= deviceid.c \ fsshare.c \ From owner-svn-src-stable@FreeBSD.ORG Tue May 27 18:54:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 75360F4A; Tue, 27 May 2014 18:54:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4848829C3; Tue, 27 May 2014 18:54:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4RIskmI063718; Tue, 27 May 2014 18:54:46 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4RIsj8c063713; Tue, 27 May 2014 18:54:45 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201405271854.s4RIsj8c063713@svn.freebsd.org> From: Xin LI Date: Tue, 27 May 2014 18:54:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266762 - in stable/9: . cddl/lib/libzfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 May 2014 18:54:46 -0000 Author: delphij Date: Tue May 27 18:54:45 2014 New Revision: 266762 URL: http://svnweb.freebsd.org/changeset/base/266762 Log: MFC r266520: Explicitly link libzfs against libavl as it is done in OpenSolaris (4543:12bb2876a62e). Without this, some third party applications may break because the lack of AVL related symbols. FreeBSD base system are not affected because the FreeBSD ZFS command line tools were all linked against libavl and thus hide the underlying issue. PR: bin/183081 Approved by: re (gjb) Modified: stable/9/Makefile.inc1 (contents, props changed) stable/9/cddl/lib/libzfs/Makefile Directory Properties: stable/9/cddl/lib/ (props changed) Modified: stable/9/Makefile.inc1 ============================================================================== --- stable/9/Makefile.inc1 Tue May 27 18:45:02 2014 (r266761) +++ stable/9/Makefile.inc1 Tue May 27 18:54:45 2014 (r266762) @@ -1359,6 +1359,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 lib/libopie lib/libpam ${_lib_libthr} \ lib/libradius lib/libsbuf lib/libtacplus \ ${_cddl_lib_libumem} ${_cddl_lib_libnvpair} \ + ${_cddl_lib_libavl} \ ${_cddl_lib_libzfs_core} \ lib/libutil ${_lib_libypclnt} lib/libz lib/msun \ ${_secure_lib_libcrypto} ${_lib_libldns} \ @@ -1379,6 +1380,7 @@ lib/libopie__L lib/libtacplus__L: lib/li .if ${MK_CDDL} != "no" _cddl_lib_libumem= cddl/lib/libumem _cddl_lib_libnvpair= cddl/lib/libnvpair +_cddl_lib_libavl= cddl/lib/libavl _cddl_lib_libzfs_core= cddl/lib/libzfs_core _cddl_lib= cddl/lib cddl/lib/libzfs_core__L: cddl/lib/libnvpair__L Modified: stable/9/cddl/lib/libzfs/Makefile ============================================================================== --- stable/9/cddl/lib/libzfs/Makefile Tue May 27 18:45:02 2014 (r266761) +++ stable/9/cddl/lib/libzfs/Makefile Tue May 27 18:54:45 2014 (r266762) @@ -7,8 +7,8 @@ LIB= zfs DPADD= ${LIBMD} ${LIBPTHREAD} ${LIBUMEM} ${LIBUTIL} ${LIBM} ${LIBNVPAIR} \ - ${LIBZFS_CORE} -LDADD= -lmd -lpthread -lumem -lutil -lm -lnvpair -lzfs_core + ${LIBAVL} ${LIBZFS_CORE} +LDADD= -lmd -lpthread -lumem -lutil -lm -lnvpair -lavl -lzfs_core SRCS= deviceid.c \ fsshare.c \ From owner-svn-src-stable@FreeBSD.ORG Tue May 27 19:37:19 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B1CC20C; Tue, 27 May 2014 19:37:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 784332DBC; Tue, 27 May 2014 19:37:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4RJbJ8v082940; Tue, 27 May 2014 19:37:19 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4RJbJki082939; Tue, 27 May 2014 19:37:19 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201405271937.s4RJbJki082939@svn.freebsd.org> From: Warren Block Date: Tue, 27 May 2014 19:37:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266769 - stable/9 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 May 2014 19:37:19 -0000 Author: wblock (doc committer) Date: Tue May 27 19:37:18 2014 New Revision: 266769 URL: http://svnweb.freebsd.org/changeset/base/266769 Log: MFC r266547 Don't delete our new vt(4) man page. Approved by: re@ (delphij) Modified: stable/9/ObsoleteFiles.inc (contents, props changed) Directory Properties: stable/9/ (props changed) Modified: stable/9/ObsoleteFiles.inc ============================================================================== --- stable/9/ObsoleteFiles.inc Tue May 27 19:15:01 2014 (r266768) +++ stable/9/ObsoleteFiles.inc Tue May 27 19:37:18 2014 (r266769) @@ -2156,7 +2156,6 @@ OLD_DIRS+=usr/share/misc/pcvtfonts OLD_FILES+=usr/share/misc/keycap.pcvt OLD_FILES+=usr/share/man/man8/ispcvt.8.gz OLD_FILES+=usr/share/man/man5/keycap.5.gz -OLD_FILES+=usr/share/man/man4/vt.4.gz OLD_FILES+=usr/share/man/man4/pcvt.4.gz OLD_FILES+=usr/share/man/man3/kgetstr.3.gz OLD_FILES+=usr/share/man/man3/kgetnum.3.gz From owner-svn-src-stable@FreeBSD.ORG Wed May 28 06:38:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D395B5BE; Wed, 28 May 2014 06:38:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0D3C2178; Wed, 28 May 2014 06:38:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4S6cgrn081268; Wed, 28 May 2014 06:38:42 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4S6cgvl081267; Wed, 28 May 2014 06:38:42 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201405280638.s4S6cgvl081267@svn.freebsd.org> From: Dimitry Andric Date: Wed, 28 May 2014 06:38:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266789 - stable/10/contrib/llvm/tools/clang/lib/Headers X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 May 2014 06:38:42 -0000 Author: dim Date: Wed May 28 06:38:42 2014 New Revision: 266789 URL: http://svnweb.freebsd.org/changeset/base/266789 Log: MFC r266674: Pull in r209489 from upstream clang trunk (by Akira Hatanaka): Fix a bug in xmmintrin.h. The last step of _mm_cvtps_pi16 should use _mm_packs_pi32, which is a function that reads two __m64 values and packs four 32-bit values into four 16-bit values. Modified: stable/10/contrib/llvm/tools/clang/lib/Headers/xmmintrin.h Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/llvm/tools/clang/lib/Headers/xmmintrin.h ============================================================================== --- stable/10/contrib/llvm/tools/clang/lib/Headers/xmmintrin.h Wed May 28 06:17:34 2014 (r266788) +++ stable/10/contrib/llvm/tools/clang/lib/Headers/xmmintrin.h Wed May 28 06:38:42 2014 (r266789) @@ -903,7 +903,7 @@ _mm_cvtps_pi16(__m128 __a) __a = _mm_movehl_ps(__a, __a); __c = _mm_cvtps_pi32(__a); - return _mm_packs_pi16(__b, __c); + return _mm_packs_pi32(__b, __c); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__)) From owner-svn-src-stable@FreeBSD.ORG Wed May 28 09:06:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 000168C8; Wed, 28 May 2014 09:06:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E05002E81; Wed, 28 May 2014 09:06:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4S96bAi047839; Wed, 28 May 2014 09:06:37 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4S96bkD047834; Wed, 28 May 2014 09:06:37 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201405280906.s4S96bkD047834@svn.freebsd.org> From: Marius Strobl Date: Wed, 28 May 2014 09:06:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266794 - in stable/10/sys/dev/hyperv: netvsc storvsc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 May 2014 09:06:38 -0000 Author: marius Date: Wed May 28 09:06:36 2014 New Revision: 266794 URL: http://svnweb.freebsd.org/changeset/base/266794 Log: MFC: r264177 Make some unwise casts. On i386 these casts wind up being safe. Rather than disturb the API, go with these casts to shut gcc up. Modified: stable/10/sys/dev/hyperv/netvsc/hv_net_vsc.c stable/10/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c stable/10/sys/dev/hyperv/netvsc/hv_rndis_filter.c stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hyperv/netvsc/hv_net_vsc.c ============================================================================== --- stable/10/sys/dev/hyperv/netvsc/hv_net_vsc.c Wed May 28 09:01:35 2014 (r266793) +++ stable/10/sys/dev/hyperv/netvsc/hv_net_vsc.c Wed May 28 09:06:36 2014 (r266794) @@ -24,6 +24,8 @@ * 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. + * + * $FreeBSD$ */ /** @@ -179,7 +181,7 @@ hv_nv_init_rx_buffer_with_net_vsp(struct /* Send the gpadl notification request */ ret = hv_vmbus_channel_send_packet(device->channel, init_pkt, - sizeof(nvsp_msg), (uint64_t)init_pkt, + sizeof(nvsp_msg), (uint64_t)(uintptr_t)init_pkt, HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, HV_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); if (ret != 0) { @@ -277,7 +279,7 @@ hv_nv_init_send_buffer_with_net_vsp(stru /* Send the gpadl notification request */ ret = hv_vmbus_channel_send_packet(device->channel, init_pkt, - sizeof(nvsp_msg), (uint64_t)init_pkt, + sizeof(nvsp_msg), (uint64_t)(uintptr_t)init_pkt, HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, HV_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); if (ret != 0) { @@ -331,7 +333,7 @@ hv_nv_destroy_rx_buffer(netvsc_dev *net_ ret = hv_vmbus_channel_send_packet(net_dev->dev->channel, revoke_pkt, sizeof(nvsp_msg), - (uint64_t)revoke_pkt, + (uint64_t)(uintptr_t)revoke_pkt, HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, 0); /* @@ -399,7 +401,7 @@ hv_nv_destroy_send_buffer(netvsc_dev *ne ret = hv_vmbus_channel_send_packet(net_dev->dev->channel, revoke_pkt, sizeof(nvsp_msg), - (uint64_t)revoke_pkt, + (uint64_t)(uintptr_t)revoke_pkt, HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, 0); /* * If we failed here, we might as well return and have a leak @@ -461,7 +463,7 @@ hv_nv_negotiate_nvsp_protocol(struct hv_ /* Send the init request */ ret = hv_vmbus_channel_send_packet(device->channel, init_pkt, - sizeof(nvsp_msg), (uint64_t)init_pkt, + sizeof(nvsp_msg), (uint64_t)(uintptr_t)init_pkt, HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, HV_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); if (ret != 0) @@ -505,7 +507,7 @@ hv_nv_send_ndis_config(struct hv_device /* Send the configuration packet */ ret = hv_vmbus_channel_send_packet(device->channel, init_pkt, - sizeof(nvsp_msg), (uint64_t)init_pkt, + sizeof(nvsp_msg), (uint64_t)(uintptr_t)init_pkt, HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, 0); if (ret != 0) return (-EINVAL); @@ -577,7 +579,7 @@ hv_nv_connect_to_vsp(struct hv_device *d /* Send the init request */ ret = hv_vmbus_channel_send_packet(device->channel, init_pkt, - sizeof(nvsp_msg), (uint64_t)init_pkt, + sizeof(nvsp_msg), (uint64_t)(uintptr_t)init_pkt, HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, 0); if (ret != 0) { goto cleanup; @@ -827,10 +829,10 @@ hv_nv_on_send(struct hv_device *device, if (pkt->page_buf_count) { ret = hv_vmbus_channel_send_packet_pagebuffer(device->channel, pkt->page_buffers, pkt->page_buf_count, - &send_msg, sizeof(nvsp_msg), (uint64_t)pkt); + &send_msg, sizeof(nvsp_msg), (uint64_t)(uintptr_t)pkt); } else { ret = hv_vmbus_channel_send_packet(device->channel, - &send_msg, sizeof(nvsp_msg), (uint64_t)pkt, + &send_msg, sizeof(nvsp_msg), (uint64_t)(uintptr_t)pkt, HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, HV_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); } Modified: stable/10/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- stable/10/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Wed May 28 09:01:35 2014 (r266793) +++ stable/10/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Wed May 28 09:06:36 2014 (r266794) @@ -344,7 +344,7 @@ netvsc_xmit_completion(void *context) struct mbuf *mb; uint8_t *buf; - mb = (struct mbuf *)packet->compl.send.send_completion_tid; + mb = (struct mbuf *)(uintptr_t)packet->compl.send.send_completion_tid; buf = ((uint8_t *)packet) - HV_NV_PACKET_OFFSET_IN_BUF; free(buf, M_DEVBUF); @@ -494,7 +494,7 @@ retry_send: /* Set the completion routine */ packet->compl.send.on_send_completion = netvsc_xmit_completion; packet->compl.send.send_completion_context = packet; - packet->compl.send.send_completion_tid = (uint64_t)m_head; + packet->compl.send.send_completion_tid = (uint64_t)(uintptr_t)m_head; /* Removed critical_enter(), does not appear necessary */ ret = hv_rf_on_send(device_ctx, packet); @@ -682,7 +682,7 @@ netvsc_recv(struct hv_device *device_ctx */ for (i=0; i < packet->page_buf_count; i++) { /* Shift virtual page number to form virtual page address */ - uint8_t *vaddr = (uint8_t *) + uint8_t *vaddr = (uint8_t *)(uintptr_t) (packet->page_buffers[i].pfn << PAGE_SHIFT); hv_m_append(m_new, packet->page_buffers[i].length, Modified: stable/10/sys/dev/hyperv/netvsc/hv_rndis_filter.c ============================================================================== --- stable/10/sys/dev/hyperv/netvsc/hv_rndis_filter.c Wed May 28 09:01:35 2014 (r266793) +++ stable/10/sys/dev/hyperv/netvsc/hv_rndis_filter.c Wed May 28 09:06:36 2014 (r266794) @@ -26,6 +26,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include @@ -334,7 +337,7 @@ hv_rf_on_receive(struct hv_device *devic return (EINVAL); /* Shift virtual page number to form virtual page address */ - rndis_hdr = (rndis_msg *)(pkt->page_buffers[0].pfn << PAGE_SHIFT); + rndis_hdr = (rndis_msg *)(uintptr_t)(pkt->page_buffers[0].pfn << PAGE_SHIFT); rndis_hdr = (void *)((unsigned long)rndis_hdr + pkt->page_buffers[0].offset); Modified: stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c ============================================================================== --- stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Wed May 28 09:01:35 2014 (r266793) +++ stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Wed May 28 09:06:36 2014 (r266794) @@ -296,7 +296,7 @@ hv_storvsc_channel_init(struct hv_device dev->channel, vstor_packet, sizeof(struct vstor_packet), - (uint64_t)request, + (uint64_t)(uintptr_t)request, HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, HV_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); @@ -330,7 +330,7 @@ hv_storvsc_channel_init(struct hv_device dev->channel, vstor_packet, sizeof(struct vstor_packet), - (uint64_t)request, + (uint64_t)(uintptr_t)request, HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, HV_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); @@ -361,7 +361,7 @@ hv_storvsc_channel_init(struct hv_device dev->channel, vstor_packet, sizeof(struct vstor_packet), - (uint64_t)request, + (uint64_t)(uintptr_t)request, HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, HV_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); @@ -389,7 +389,7 @@ hv_storvsc_channel_init(struct hv_device dev->channel, vstor_packet, sizeof(struct vstor_packet), - (uint64_t)request, + (uint64_t)(uintptr_t)request, HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, HV_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); @@ -482,7 +482,7 @@ hv_storvsc_host_reset(struct hv_device * ret = hv_vmbus_channel_send_packet(dev->channel, vstor_packet, sizeof(struct vstor_packet), - (uint64_t)&sc->hs_reset_req, + (uint64_t)(uintptr_t)&sc->hs_reset_req, HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, HV_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); @@ -547,14 +547,14 @@ hv_storvsc_io_request(struct hv_device * &request->data_buf, vstor_packet, sizeof(struct vstor_packet), - (uint64_t)request); + (uint64_t)(uintptr_t)request); } else { ret = hv_vmbus_channel_send_packet( device->channel, vstor_packet, sizeof(struct vstor_packet), - (uint64_t)request, + (uint64_t)(uintptr_t)request, HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, HV_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); } @@ -634,7 +634,7 @@ hv_storvsc_on_channel_callback(void *con &request_id); while ((ret == 0) && (bytes_recvd > 0)) { - request = (struct hv_storvsc_request *)request_id; + request = (struct hv_storvsc_request *)(uintptr_t)request_id; KASSERT(request, ("request")); if ((request == &sc->hs_init_req) || From owner-svn-src-stable@FreeBSD.ORG Wed May 28 15:02:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74F32431; Wed, 28 May 2014 15:02:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61CBC206F; Wed, 28 May 2014 15:02:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4SF2hqm009711; Wed, 28 May 2014 15:02:43 GMT (envelope-from marck@svn.freebsd.org) Received: (from marck@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4SF2hli009710; Wed, 28 May 2014 15:02:43 GMT (envelope-from marck@svn.freebsd.org) Message-Id: <201405281502.s4SF2hli009710@svn.freebsd.org> From: Dmitry Morozovsky Date: Wed, 28 May 2014 15:02:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266809 - stable/10/sbin/geom/class/part X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 May 2014 15:02:43 -0000 Author: marck (doc committer) Date: Wed May 28 15:02:42 2014 New Revision: 266809 URL: http://svnweb.freebsd.org/changeset/base/266809 Log: MFC: r266483 Document VMware-related filesystems additions. Reviewed by: jmg Modified: stable/10/sbin/geom/class/part/gpart.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/geom/class/part/gpart.8 ============================================================================== --- stable/10/sbin/geom/class/part/gpart.8 Wed May 28 14:26:46 2014 (r266808) +++ stable/10/sbin/geom/class/part/gpart.8 Wed May 28 15:02:42 2014 (r266809) @@ -657,6 +657,30 @@ A partition that contains a NTFS or exFA The scheme-specific type is .Qq Li "!7" for MBR. +.It Cm vmware-vmfs +A partition that contains a VMware File System (VMFS). +The scheme-specific types are +.Qq Li "!251" +for MBR and +.Qq Li "!aa31e02a-400f-11db-9590-000c2911d1b8" +for GPT. +.It Cm vmware-vmkdiag +A partition that contains a VMware diagostic filesystem. +The scheme-specific types are +.Qq Li "!252" +for MBR and +.Qq Li "!9d275380-40ad-11db-bf97-000c2911d1b8" +for GPT. +.It Cm vmware-reserved +A VMware reserved partition. +The scheme-specific type is +.Qq Li "!9198effc-31c0-11db-8f-78-000c2911d1b8" +for GPT. +.It Cm vmware-vsanhdr +A partition claimed by VMware VSAN. +The scheme-specific type is +.Qq Li "!381cfccc-7288-11e0-92ee-000c2911d0b2" +for GPT. .El .Sh ATTRIBUTES The scheme-specific attributes for EBR: From owner-svn-src-stable@FreeBSD.ORG Wed May 28 15:19:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 657E5C20; Wed, 28 May 2014 15:19:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 528AD21F4; Wed, 28 May 2014 15:19:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4SFJkxJ015471; Wed, 28 May 2014 15:19:46 GMT (envelope-from marck@svn.freebsd.org) Received: (from marck@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4SFJkQR015470; Wed, 28 May 2014 15:19:46 GMT (envelope-from marck@svn.freebsd.org) Message-Id: <201405281519.s4SFJkQR015470@svn.freebsd.org> From: Dmitry Morozovsky Date: Wed, 28 May 2014 15:19:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266810 - stable/9/sbin/geom/class/part X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 May 2014 15:19:46 -0000 Author: marck (doc committer) Date: Wed May 28 15:19:45 2014 New Revision: 266810 URL: http://svnweb.freebsd.org/changeset/base/266810 Log: MFC: r266483 Document VMware-related filesystems additions. Reviewed by: jmg Approved by: re (glebius) Modified: stable/9/sbin/geom/class/part/gpart.8 Directory Properties: stable/9/sbin/geom/class/part/ (props changed) Modified: stable/9/sbin/geom/class/part/gpart.8 ============================================================================== --- stable/9/sbin/geom/class/part/gpart.8 Wed May 28 15:02:42 2014 (r266809) +++ stable/9/sbin/geom/class/part/gpart.8 Wed May 28 15:19:45 2014 (r266810) @@ -657,6 +657,30 @@ A partition that contains a NTFS or exFA The scheme-specific type is .Qq Li "!7" for MBR. +.It Cm vmware-vmfs +A partition that contains a VMware File System (VMFS). +The scheme-specific types are +.Qq Li "!251" +for MBR and +.Qq Li "!aa31e02a-400f-11db-9590-000c2911d1b8" +for GPT. +.It Cm vmware-vmkdiag +A partition that contains a VMware diagostic filesystem. +The scheme-specific types are +.Qq Li "!252" +for MBR and +.Qq Li "!9d275380-40ad-11db-bf97-000c2911d1b8" +for GPT. +.It Cm vmware-reserved +A VMware reserved partition. +The scheme-specific type is +.Qq Li "!9198effc-31c0-11db-8f-78-000c2911d1b8" +for GPT. +.It Cm vmware-vsanhdr +A partition claimed by VMware VSAN. +The scheme-specific type is +.Qq Li "!381cfccc-7288-11e0-92ee-000c2911d0b2" +for GPT. .El .Sh ATTRIBUTES The scheme-specific attributes for EBR: From owner-svn-src-stable@FreeBSD.ORG Wed May 28 15:24:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7B9CC3; Wed, 28 May 2014 15:24:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4A9122BC; Wed, 28 May 2014 15:24:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4SFOUr3019394; Wed, 28 May 2014 15:24:30 GMT (envelope-from marck@svn.freebsd.org) Received: (from marck@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4SFOUjA019393; Wed, 28 May 2014 15:24:30 GMT (envelope-from marck@svn.freebsd.org) Message-Id: <201405281524.s4SFOUjA019393@svn.freebsd.org> From: Dmitry Morozovsky Date: Wed, 28 May 2014 15:24:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r266811 - stable/8/sbin/geom/class/part X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 May 2014 15:24:30 -0000 Author: marck (doc committer) Date: Wed May 28 15:24:30 2014 New Revision: 266811 URL: http://svnweb.freebsd.org/changeset/base/266811 Log: MFC r266483: Document VMware-related filesystems additions. Modified: stable/8/sbin/geom/class/part/gpart.8 Directory Properties: stable/8/sbin/geom/class/part/ (props changed) Modified: stable/8/sbin/geom/class/part/gpart.8 ============================================================================== --- stable/8/sbin/geom/class/part/gpart.8 Wed May 28 15:19:45 2014 (r266810) +++ stable/8/sbin/geom/class/part/gpart.8 Wed May 28 15:24:30 2014 (r266811) @@ -659,6 +659,30 @@ A partition that contains Logical Disk M The scheme-specific type is .Qq Li "!5808c8aa-7e8f-42e0-85d2-e1e90434cfb3" for GPT. +.It Cm vmware-vmfs +A partition that contains a VMware File System (VMFS). +The scheme-specific types are +.Qq Li "!251" +for MBR and +.Qq Li "!aa31e02a-400f-11db-9590-000c2911d1b8" +for GPT. +.It Cm vmware-vmkdiag +A partition that contains a VMware diagostic filesystem. +The scheme-specific types are +.Qq Li "!252" +for MBR and +.Qq Li "!9d275380-40ad-11db-bf97-000c2911d1b8" +for GPT. +.It Cm vmware-reserved +A VMware reserved partition. +The scheme-specific type is +.Qq Li "!9198effc-31c0-11db-8f-78-000c2911d1b8" +for GPT. +.It Cm vmware-vsanhdr +A partition claimed by VMware VSAN. +The scheme-specific type is +.Qq Li "!381cfccc-7288-11e0-92ee-000c2911d0b2" +for GPT. .El .Sh ATTRIBUTES The scheme-specific attributes for EBR: From owner-svn-src-stable@FreeBSD.ORG Wed May 28 17:44:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E07CC447; Wed, 28 May 2014 17:44:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD79720FA; Wed, 28 May 2014 17:44:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4SHibho081069; Wed, 28 May 2014 17:44:37 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4SHibns081068; Wed, 28 May 2014 17:44:37 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201405281744.s4SHibns081068@svn.freebsd.org> From: Dimitry Andric Date: Wed, 28 May 2014 17:44:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266815 - stable/9/contrib/llvm/tools/clang/lib/Headers X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 May 2014 17:44:38 -0000 Author: dim Date: Wed May 28 17:44:37 2014 New Revision: 266815 URL: http://svnweb.freebsd.org/changeset/base/266815 Log: MFC r266674: Pull in r209489 from upstream clang trunk (by Akira Hatanaka): Fix a bug in xmmintrin.h. The last step of _mm_cvtps_pi16 should use _mm_packs_pi32, which is a function that reads two __m64 values and packs four 32-bit values into four 16-bit values. Approved by: re (glebius) Modified: stable/9/contrib/llvm/tools/clang/lib/Headers/xmmintrin.h Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) Modified: stable/9/contrib/llvm/tools/clang/lib/Headers/xmmintrin.h ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/Headers/xmmintrin.h Wed May 28 16:57:17 2014 (r266814) +++ stable/9/contrib/llvm/tools/clang/lib/Headers/xmmintrin.h Wed May 28 17:44:37 2014 (r266815) @@ -903,7 +903,7 @@ _mm_cvtps_pi16(__m128 __a) __a = _mm_movehl_ps(__a, __a); __c = _mm_cvtps_pi32(__a); - return _mm_packs_pi16(__b, __c); + return _mm_packs_pi32(__b, __c); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__)) From owner-svn-src-stable@FreeBSD.ORG Wed May 28 18:51:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 619458D5; Wed, 28 May 2014 18:51:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E93F26F9; Wed, 28 May 2014 18:51:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4SIpoim011447; Wed, 28 May 2014 18:51:50 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4SIpoP2011446; Wed, 28 May 2014 18:51:50 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201405281851.s4SIpoP2011446@svn.freebsd.org> From: Xin LI Date: Wed, 28 May 2014 18:51:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266816 - stable/10/secure/lib/libcrypt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 May 2014 18:51:50 -0000 Author: delphij Date: Wed May 28 18:51:49 2014 New Revision: 266816 URL: http://svnweb.freebsd.org/changeset/base/266816 Log: MFC r265995: Switch using the new $2b$ format by default, when bcrypt is used. Relnotes: default Blowfish crypt(3) format have been changed to $2b$. Modified: stable/10/secure/lib/libcrypt/crypt-blowfish.c Directory Properties: stable/10/ (props changed) Modified: stable/10/secure/lib/libcrypt/crypt-blowfish.c ============================================================================== --- stable/10/secure/lib/libcrypt/crypt-blowfish.c Wed May 28 17:44:37 2014 (r266815) +++ stable/10/secure/lib/libcrypt/crypt-blowfish.c Wed May 28 18:51:49 2014 (r266816) @@ -149,7 +149,7 @@ crypt_blowfish(const char *key, const ch char arounds[3]; /* Defaults */ - minr = 'a'; + minr = 'b'; logr = BCRYPT_MINLOGROUNDS; rounds = 1U << logr; From owner-svn-src-stable@FreeBSD.ORG Wed May 28 18:53:10 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A42D3AA3; Wed, 28 May 2014 18:53:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 913CB2757; Wed, 28 May 2014 18:53:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4SIrATI011692; Wed, 28 May 2014 18:53:10 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4SIrANl011691; Wed, 28 May 2014 18:53:10 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201405281853.s4SIrANl011691@svn.freebsd.org> From: Xin LI Date: Wed, 28 May 2014 18:53:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r266817 - stable/8/secure/lib/libcrypt X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 May 2014 18:53:10 -0000 Author: delphij Date: Wed May 28 18:53:10 2014 New Revision: 266817 URL: http://svnweb.freebsd.org/changeset/base/266817 Log: MFC r265995: Switch using the new $2b$ format by default, when bcrypt is used. Relnotes: default Blowfish crypt(3) format have been changed to $2b$. Modified: stable/8/secure/lib/libcrypt/crypt-blowfish.c Directory Properties: stable/8/secure/lib/libcrypt/ (props changed) Modified: stable/8/secure/lib/libcrypt/crypt-blowfish.c ============================================================================== --- stable/8/secure/lib/libcrypt/crypt-blowfish.c Wed May 28 18:51:49 2014 (r266816) +++ stable/8/secure/lib/libcrypt/crypt-blowfish.c Wed May 28 18:53:10 2014 (r266817) @@ -150,7 +150,7 @@ crypt_blowfish(const char *key, const ch char arounds[3]; /* Defaults */ - minr = 'a'; + minr = 'b'; logr = BCRYPT_MINLOGROUNDS; rounds = 1U << logr; From owner-svn-src-stable@FreeBSD.ORG Wed May 28 19:05:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 688572EB; Wed, 28 May 2014 19:05:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 553632948; Wed, 28 May 2014 19:05:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4SJ5lL5016622; Wed, 28 May 2014 19:05:47 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4SJ5lfs016621; Wed, 28 May 2014 19:05:47 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201405281905.s4SJ5lfs016621@svn.freebsd.org> From: Xin LI Date: Wed, 28 May 2014 19:05:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266818 - stable/9/secure/lib/libcrypt X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 May 2014 19:05:47 -0000 Author: delphij Date: Wed May 28 19:05:46 2014 New Revision: 266818 URL: http://svnweb.freebsd.org/changeset/base/266818 Log: MFC r265995: Switch using the new $2b$ format by default, when bcrypt is used. Relnotes: default Blowfish crypt(3) format have been changed to $2b$. Approved by: re (gjb) Modified: stable/9/secure/lib/libcrypt/crypt-blowfish.c Directory Properties: stable/9/secure/lib/libcrypt/ (props changed) Modified: stable/9/secure/lib/libcrypt/crypt-blowfish.c ============================================================================== --- stable/9/secure/lib/libcrypt/crypt-blowfish.c Wed May 28 18:53:10 2014 (r266817) +++ stable/9/secure/lib/libcrypt/crypt-blowfish.c Wed May 28 19:05:46 2014 (r266818) @@ -150,7 +150,7 @@ crypt_blowfish(const char *key, const ch char arounds[3]; /* Defaults */ - minr = 'a'; + minr = 'b'; logr = BCRYPT_MINLOGROUNDS; rounds = 1U << logr; From owner-svn-src-stable@FreeBSD.ORG Thu May 29 02:55:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 098A537A; Thu, 29 May 2014 02:55:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9790206B; Thu, 29 May 2014 02:55:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4T2t8YR022611; Thu, 29 May 2014 02:55:08 GMT (envelope-from cy@svn.freebsd.org) Received: (from cy@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4T2t73P022605; Thu, 29 May 2014 02:55:07 GMT (envelope-from cy@svn.freebsd.org) Message-Id: <201405290255.s4T2t73P022605@svn.freebsd.org> From: Cy Schubert Date: Thu, 29 May 2014 02:55:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266829 - stable/10/sys/contrib/ipfilter/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 May 2014 02:55:09 -0000 Author: cy Date: Thu May 29 02:55:07 2014 New Revision: 266829 URL: http://svnweb.freebsd.org/changeset/base/266829 Log: MFC r264235: Implement the final missing sysctls by moving ipf_auth_softc_t from ip_auth.c to ip_auth.h. ip_frag_soft_t moves from ip_frag.c to ip_frag.h. mlfk_ipl.c creates sysctl MIBs that reference control blocks that are dynamically created when IP Filter is loaded. This necessitated creating them on-the-fly rather than statically at compile time. Approved by: glebius (mentor) Modified: stable/10/sys/contrib/ipfilter/netinet/ip_auth.c stable/10/sys/contrib/ipfilter/netinet/ip_auth.h stable/10/sys/contrib/ipfilter/netinet/ip_frag.c stable/10/sys/contrib/ipfilter/netinet/ip_frag.h stable/10/sys/contrib/ipfilter/netinet/mlfk_ipl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/contrib/ipfilter/netinet/ip_auth.c ============================================================================== --- stable/10/sys/contrib/ipfilter/netinet/ip_auth.c Thu May 29 02:26:12 2014 (r266828) +++ stable/10/sys/contrib/ipfilter/netinet/ip_auth.c Thu May 29 02:55:07 2014 (r266829) @@ -131,33 +131,6 @@ static const char rcsid[] = "@(#)$FreeBS #endif - -typedef struct ipf_auth_softc_s { -#if SOLARIS && defined(_KERNEL) - kcondvar_t ipf_auth_wait; -#endif /* SOLARIS */ -#if defined(linux) && defined(_KERNEL) - wait_queue_head_t ipf_auth_next_linux; -#endif - ipfrwlock_t ipf_authlk; - ipfmutex_t ipf_auth_mx; - int ipf_auth_size; - int ipf_auth_used; - int ipf_auth_replies; - int ipf_auth_defaultage; - int ipf_auth_lock; - ipf_authstat_t ipf_auth_stats; - frauth_t *ipf_auth; - mb_t **ipf_auth_pkts; - int ipf_auth_start; - int ipf_auth_end; - int ipf_auth_next; - frauthent_t *ipf_auth_entries; - frentry_t *ipf_auth_ip; - frentry_t *ipf_auth_rules; -} ipf_auth_softc_t; - - static void ipf_auth_deref __P((frauthent_t **)); static void ipf_auth_deref_unlocked __P((ipf_auth_softc_t *, frauthent_t **)); static int ipf_auth_geniter __P((ipf_main_softc_t *, ipftoken_t *, Modified: stable/10/sys/contrib/ipfilter/netinet/ip_auth.h ============================================================================== --- stable/10/sys/contrib/ipfilter/netinet/ip_auth.h Thu May 29 02:26:12 2014 (r266828) +++ stable/10/sys/contrib/ipfilter/netinet/ip_auth.h Thu May 29 02:55:07 2014 (r266829) @@ -49,6 +49,24 @@ typedef struct ipf_authstat { frauthent_t *fas_faelist; } ipf_authstat_t; +typedef struct ipf_auth_softc_s { + ipfrwlock_t ipf_authlk; + ipfmutex_t ipf_auth_mx; + int ipf_auth_size; + int ipf_auth_used; + int ipf_auth_replies; + int ipf_auth_defaultage; + int ipf_auth_lock; + ipf_authstat_t ipf_auth_stats; + frauth_t *ipf_auth; + mb_t **ipf_auth_pkts; + int ipf_auth_start; + int ipf_auth_end; + int ipf_auth_next; + frauthent_t *ipf_auth_entries; + frentry_t *ipf_auth_ip; + frentry_t *ipf_auth_rules; +} ipf_auth_softc_t; extern frentry_t *ipf_auth_check __P((fr_info_t *, u_32_t *)); extern void ipf_auth_expire __P((ipf_main_softc_t *)); Modified: stable/10/sys/contrib/ipfilter/netinet/ip_frag.c ============================================================================== --- stable/10/sys/contrib/ipfilter/netinet/ip_frag.c Thu May 29 02:26:12 2014 (r266828) +++ stable/10/sys/contrib/ipfilter/netinet/ip_frag.c Thu May 29 02:55:07 2014 (r266829) @@ -91,27 +91,6 @@ static const char rcsid[] = "@(#)$FreeBS #endif -typedef struct ipf_frag_softc_s { - ipfrwlock_t ipfr_ipidfrag; - ipfrwlock_t ipfr_frag; - ipfrwlock_t ipfr_natfrag; - int ipfr_size; - int ipfr_ttl; - int ipfr_lock; - int ipfr_inited; - ipfr_t *ipfr_list; - ipfr_t **ipfr_tail; - ipfr_t *ipfr_natlist; - ipfr_t **ipfr_nattail; - ipfr_t *ipfr_ipidlist; - ipfr_t **ipfr_ipidtail; - ipfr_t **ipfr_heads; - ipfr_t **ipfr_nattab; - ipfr_t **ipfr_ipidtab; - ipfrstat_t ipfr_stats; -} ipf_frag_softc_t; - - #ifdef USE_MUTEXES static ipfr_t *ipfr_frag_new __P((ipf_main_softc_t *, ipf_frag_softc_t *, fr_info_t *, u_32_t, ipfr_t **, Modified: stable/10/sys/contrib/ipfilter/netinet/ip_frag.h ============================================================================== --- stable/10/sys/contrib/ipfilter/netinet/ip_frag.h Thu May 29 02:26:12 2014 (r266828) +++ stable/10/sys/contrib/ipfilter/netinet/ip_frag.h Thu May 29 02:55:07 2014 (r266829) @@ -70,6 +70,26 @@ typedef struct ipfrstat { struct ipfr **ifs_nattab; } ipfrstat_t; +typedef struct ipf_frag_softc_s { + ipfrwlock_t ipfr_ipidfrag; + ipfrwlock_t ipfr_frag; + ipfrwlock_t ipfr_natfrag; + int ipfr_size; + int ipfr_ttl; + int ipfr_lock; + int ipfr_inited; + ipfr_t *ipfr_list; + ipfr_t **ipfr_tail; + ipfr_t *ipfr_natlist; + ipfr_t **ipfr_nattail; + ipfr_t *ipfr_ipidlist; + ipfr_t **ipfr_ipidtail; + ipfr_t **ipfr_heads; + ipfr_t **ipfr_nattab; + ipfr_t **ipfr_ipidtab; + ipfrstat_t ipfr_stats; +} ipf_frag_softc_t; + #define IPFR_CMPSZ (offsetof(ipfr_t, ipfr_pass) - \ offsetof(ipfr_t, ipfr_ifp)) Modified: stable/10/sys/contrib/ipfilter/netinet/mlfk_ipl.c ============================================================================== --- stable/10/sys/contrib/ipfilter/netinet/mlfk_ipl.c Thu May 29 02:26:12 2014 (r266828) +++ stable/10/sys/contrib/ipfilter/netinet/mlfk_ipl.c Thu May 29 02:55:07 2014 (r266829) @@ -44,6 +44,8 @@ static dev_t ipf_devs[IPL_LOGSIZE]; static int sysctl_ipf_int ( SYSCTL_HANDLER_ARGS ); static int ipf_modload(void); static int ipf_modunload(void); +static int ipf_fbsd_sysctl_create(ipf_main_softc_t*); +static int ipf_fbsd_sysctl_destroy(ipf_main_softc_t*); #if (__FreeBSD_version >= 500024) # if (__FreeBSD_version >= 502116) @@ -70,59 +72,36 @@ SYSCTL_DECL(_net_inet); #define SYSCTL_IPF(parent, nbr, name, access, ptr, val, descr) \ SYSCTL_OID(parent, nbr, name, CTLTYPE_INT|access, \ ptr, val, sysctl_ipf_int, "I", descr); +#define SYSCTL_DYN_IPF(parent, nbr, name, access,ptr, val, descr) \ + SYSCTL_ADD_OID(&ipf_clist, SYSCTL_STATIC_CHILDREN(parent), nbr, name, \ + CTLFLAG_DYN|CTLTYPE_INT|access, ptr, val, sysctl_ipf_int, "I", descr) +static struct sysctl_ctx_list ipf_clist; #define CTLFLAG_OFF 0x00800000 /* IPFilter must be disabled */ #define CTLFLAG_RWO (CTLFLAG_RW|CTLFLAG_OFF) SYSCTL_NODE(_net_inet, OID_AUTO, ipf, CTLFLAG_RW, 0, "IPF"); -SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_flags, CTLFLAG_RW, &ipfmain.ipf_flags, 0, ""); -SYSCTL_IPF(_net_inet_ipf, OID_AUTO, ipf_pass, CTLFLAG_RW, &ipfmain.ipf_pass, 0, ""); -SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_active, CTLFLAG_RD, &ipfmain.ipf_active, 0, ""); +SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_flags, CTLFLAG_RW, &ipfmain.ipf_flags, 0, "IPF flags"); +SYSCTL_IPF(_net_inet_ipf, OID_AUTO, ipf_pass, CTLFLAG_RW, &ipfmain.ipf_pass, 0, "default pass/block"); +SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_active, CTLFLAG_RD, &ipfmain.ipf_active, 0, "IPF is active"); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_tcpidletimeout, CTLFLAG_RWO, - &ipfmain.ipf_tcpidletimeout, 0, ""); + &ipfmain.ipf_tcpidletimeout, 0, "TCP idle timeout in seconds"); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_tcphalfclosed, CTLFLAG_RWO, - &ipfmain.ipf_tcphalfclosed, 0, ""); + &ipfmain.ipf_tcphalfclosed, 0, "timeout for half closed TCP sessions"); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_tcpclosewait, CTLFLAG_RWO, - &ipfmain.ipf_tcpclosewait, 0, ""); + &ipfmain.ipf_tcpclosewait, 0, "timeout for TCP sessions in closewait status"); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_tcplastack, CTLFLAG_RWO, - &ipfmain.ipf_tcplastack, 0, ""); + &ipfmain.ipf_tcplastack, 0, "timeout for TCP sessions in last ack status"); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_tcptimeout, CTLFLAG_RWO, &ipfmain.ipf_tcptimeout, 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_tcpclosed, CTLFLAG_RWO, &ipfmain.ipf_tcpclosed, 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_udptimeout, CTLFLAG_RWO, - &ipfmain.ipf_udptimeout, 0, ""); + &ipfmain.ipf_udptimeout, 0, "UDP timeout"); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_udpacktimeout, CTLFLAG_RWO, &ipfmain.ipf_udpacktimeout, 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_icmptimeout, CTLFLAG_RWO, - &ipfmain.ipf_icmptimeout, 0, ""); -#if 0 -/* this needs to be resolved at compile time */ -SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_defnatage, CTLFLAG_RWO, - &((ipf_nat_softc_t *)ipfmain.ipf_nat_soft)->ipf_nat_defage, 0, ""); -SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_ipfrttl, CTLFLAG_RW, - &ipf_ipfrttl, 0, ""); -#endif -SYSCTL_IPF(_net_inet_ipf, OID_AUTO, ipf_running, CTLFLAG_RD, - &ipfmain.ipf_running, 0, ""); -#if 0 -SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_statesize, CTLFLAG_RWO, - &ipfmain.ipf_state_soft)->ipf_state_size, 0, ""); -SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_statemax, CTLFLAG_RWO, - &(ipfmain.ipf_state_soft)->ipf_state_max, 0, ""); -SYSCTL_IPF(_net_inet_ipf, OID_AUTO, ipf_nattable_sz, CTLFLAG_RWO, - &(ipfmain.ipf_nat_soft)->ipf_nat_table_sz, 0, ""); -SYSCTL_IPF(_net_inet_ipf, OID_AUTO, ipf_natrules_sz, CTLFLAG_RWO, - &(ipfmain.ipf_nat_soft)->ipf_nat_maprules_sz, 0, ""); -SYSCTL_IPF(_net_inet_ipf, OID_AUTO, ipf_rdrrules_sz, CTLFLAG_RWO, - &(ipfmain.ipf_nat_soft)->ipf_nat_rdrrules_sz, 0, ""); -SYSCTL_IPF(_net_inet_ipf, OID_AUTO, ipf_hostmap_sz, CTLFLAG_RWO, - &(ipfmain.ipf_nat_soft)->ipf_nat_hostmap_sz, 0, ""); -SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_authsize, CTLFLAG_RWO, - &ipf_auth_size, 0, ""); -SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_authused, CTLFLAG_RD, - &ipf_auth_used, 0, ""); -SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_defaultauthage, CTLFLAG_RW, - &ipf_auth_defaultage, 0, ""); -#endif + &ipfmain.ipf_icmptimeout, 0, "ICMP timeout"); +SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_running, CTLFLAG_RD, + &ipfmain.ipf_running, 0, "IPF is running"); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_chksrc, CTLFLAG_RW, &ipfmain.ipf_chksrc, 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_minttl, CTLFLAG_RW, &ipfmain.ipf_minttl, 0, ""); @@ -177,7 +156,6 @@ static struct cdevsw ipf_cdevsw = { static char *ipf_devfiles[] = { IPL_NAME, IPNAT_NAME, IPSTATE_NAME, IPAUTH_NAME, IPSYNC_NAME, IPSCAN_NAME, IPLOOKUP_NAME, NULL }; - static int ipfilter_modevent(module_t mod, int type, void *unused) { @@ -212,6 +190,9 @@ ipf_modload() if (ipf_create_all(&ipfmain) == NULL) return EIO; + if (ipf_fbsd_sysctl_create(&ipfmain) != 0) + return EIO; + error = ipfattach(&ipfmain); if (error) return error; @@ -268,6 +249,9 @@ ipf_modunload() if (ipfmain.ipf_refcnt) return EBUSY; + if (ipf_fbsd_sysctl_destroy(&ipfmain) != 0) + return EIO; + error = ipf_pfil_unhook(); if (error != 0) return error; @@ -277,6 +261,7 @@ ipf_modunload() if (error != 0) return error; + ipf_fbsd_sysctl_destroy(&ipfmain); ipf_destroy_all(&ipfmain); ipf_unload_all(); } else @@ -526,3 +511,58 @@ static int ipfwrite(dev, uio) return ipf_sync_write(&ipfmain, uio); return ENXIO; } + +static int +ipf_fbsd_sysctl_create(main_softc) + ipf_main_softc_t *main_softc; +{ + ipf_nat_softc_t *nat_softc; + ipf_state_softc_t *state_softc; + ipf_auth_softc_t *auth_softc; + ipf_frag_softc_t *frag_softc; + + nat_softc = main_softc->ipf_nat_soft; + state_softc = main_softc->ipf_state_soft; + auth_softc = main_softc->ipf_auth_soft; + frag_softc = main_softc->ipf_frag_soft; + + sysctl_ctx_init(&ipf_clist); + + SYSCTL_DYN_IPF(_net_inet_ipf, OID_AUTO, "fr_defnatage", CTLFLAG_RWO, + &nat_softc->ipf_nat_defage, 0, ""); + SYSCTL_DYN_IPF(_net_inet_ipf, OID_AUTO, "fr_statesize", CTLFLAG_RWO, + &state_softc->ipf_state_size, 0, ""); + SYSCTL_DYN_IPF(_net_inet_ipf, OID_AUTO, "fr_statemax", CTLFLAG_RWO, + &state_softc->ipf_state_max, 0, ""); + SYSCTL_DYN_IPF(_net_inet_ipf, OID_AUTO, "ipf_nattable_max", CTLFLAG_RWO, + &nat_softc->ipf_nat_table_max, 0, ""); + SYSCTL_DYN_IPF(_net_inet_ipf, OID_AUTO, "ipf_nattable_sz", CTLFLAG_RWO, + &nat_softc->ipf_nat_table_sz, 0, ""); + SYSCTL_DYN_IPF(_net_inet_ipf, OID_AUTO, "ipf_natrules_sz", CTLFLAG_RWO, + &nat_softc->ipf_nat_maprules_sz, 0, ""); + SYSCTL_DYN_IPF(_net_inet_ipf, OID_AUTO, "ipf_rdrrules_sz", CTLFLAG_RWO, + &nat_softc->ipf_nat_rdrrules_sz, 0, ""); + SYSCTL_DYN_IPF(_net_inet_ipf, OID_AUTO, "ipf_hostmap_sz", CTLFLAG_RWO, + &nat_softc->ipf_nat_hostmap_sz, 0, ""); + SYSCTL_DYN_IPF(_net_inet_ipf, OID_AUTO, "fr_authsize", CTLFLAG_RWO, + &auth_softc->ipf_auth_size, 0, ""); + SYSCTL_DYN_IPF(_net_inet_ipf, OID_AUTO, "fr_authused", CTLFLAG_RD, + &auth_softc->ipf_auth_used, 0, ""); + SYSCTL_DYN_IPF(_net_inet_ipf, OID_AUTO, "fr_defaultauthage", CTLFLAG_RW, + &auth_softc->ipf_auth_defaultage, 0, ""); + SYSCTL_DYN_IPF(_net_inet_ipf, OID_AUTO, "fr_ipfrttl", CTLFLAG_RW, + &frag_softc->ipfr_ttl, 0, ""); + return 0; +} + +static int +ipf_fbsd_sysctl_destroy(main_softc) + ipf_main_softc_t *main_softc; +{ + if (sysctl_ctx_free(&ipf_clist)) { + printf("sysctl_ctx_free failed"); + return(ENOTEMPTY); + } + return 0; +} + From owner-svn-src-stable@FreeBSD.ORG Thu May 29 15:46:58 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7BB7168C; Thu, 29 May 2014 15:46:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 690DD2786; Thu, 29 May 2014 15:46:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4TFkwrI071274; Thu, 29 May 2014 15:46:58 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4TFkw2D071273; Thu, 29 May 2014 15:46:58 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201405291546.s4TFkw2D071273@svn.freebsd.org> From: Glen Barber Date: Thu, 29 May 2014 15:46:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266844 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 May 2014 15:46:58 -0000 Author: gjb Date: Thu May 29 15:46:57 2014 New Revision: 266844 URL: http://svnweb.freebsd.org/changeset/base/266844 Log: Document r266818, default Blowfish crypt(3) format have been changed to $2b$. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 29 15:43:51 2014 (r266843) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 29 15:46:57 2014 (r266844) @@ -612,6 +612,10 @@ to filter by &man.jail.8; ID or name, in followup to the &man.ps.1; change in r265229. + The Blowfish &man.crypt.3; default + format has been changed to + $2b$. + &man.periodic.8; Scripts From owner-svn-src-stable@FreeBSD.ORG Fri May 30 00:12:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE3B9A69; Fri, 30 May 2014 00:12:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9AC992735; Fri, 30 May 2014 00:12:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4U0CPO9005112; Fri, 30 May 2014 00:12:25 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4U0CP8g005111; Fri, 30 May 2014 00:12:25 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201405300012.s4U0CP8g005111@svn.freebsd.org> From: Glen Barber Date: Fri, 30 May 2014 00:12:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266864 - stable/9/sys/conf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 May 2014 00:12:25 -0000 Author: gjb Date: Fri May 30 00:12:25 2014 New Revision: 266864 URL: http://svnweb.freebsd.org/changeset/base/266864 Log: Update stable/9 to -BETA1 for the first batch of 9.3-RELEASE builds. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/sys/conf/newvers.sh Modified: stable/9/sys/conf/newvers.sh ============================================================================== --- stable/9/sys/conf/newvers.sh Thu May 29 22:34:04 2014 (r266863) +++ stable/9/sys/conf/newvers.sh Fri May 30 00:12:25 2014 (r266864) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="9.3" -BRANCH="PRERELEASE" +BRANCH="BETA1" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-stable@FreeBSD.ORG Fri May 30 14:58:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60C23D44; Fri, 30 May 2014 14:58:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CF9D2E6F; Fri, 30 May 2014 14:58:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4UEw7bX004734; Fri, 30 May 2014 14:58:07 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4UEw71D004733; Fri, 30 May 2014 14:58:07 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201405301458.s4UEw71D004733@svn.freebsd.org> From: "George V. Neville-Neil" Date: Fri, 30 May 2014 14:58:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266888 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 May 2014 14:58:07 -0000 Author: gnn Date: Fri May 30 14:58:06 2014 New Revision: 266888 URL: http://svnweb.freebsd.org/changeset/base/266888 Log: MFC: 266171, 266174 Extend the size of the function or symbol that can be annotated. Update the amount of data we can collect for hwpmc(4) by default to work with modern processors and available memory. Modified: stable/10/sys/sys/pmc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/pmc.h ============================================================================== --- stable/10/sys/sys/pmc.h Fri May 30 14:30:52 2014 (r266887) +++ stable/10/sys/sys/pmc.h Fri May 30 14:58:06 2014 (r266888) @@ -597,12 +597,12 @@ struct pmc_op_getdyneventinfo { #include -#define PMC_HASH_SIZE 16 -#define PMC_MTXPOOL_SIZE 32 +#define PMC_HASH_SIZE 1024 +#define PMC_MTXPOOL_SIZE 2048 #define PMC_LOG_BUFFER_SIZE 4 -#define PMC_NLOGBUFFERS 64 -#define PMC_NSAMPLES 512 -#define PMC_CALLCHAIN_DEPTH 8 +#define PMC_NLOGBUFFERS 1024 +#define PMC_NSAMPLES 1024 +#define PMC_CALLCHAIN_DEPTH 16 #define PMC_SYSCTL_NAME_PREFIX "kern." PMC_MODULE_NAME "." From owner-svn-src-stable@FreeBSD.ORG Fri May 30 15:00:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D571AFFC; Fri, 30 May 2014 15:00:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1C6B2F0A; Fri, 30 May 2014 15:00:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4UF0otU008003; Fri, 30 May 2014 15:00:50 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4UF0oh3008002; Fri, 30 May 2014 15:00:50 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201405301500.s4UF0oh3008002@svn.freebsd.org> From: "George V. Neville-Neil" Date: Fri, 30 May 2014 15:00:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266889 - stable/10/usr.sbin/pmcannotate X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 May 2014 15:00:50 -0000 Author: gnn Date: Fri May 30 15:00:50 2014 New Revision: 266889 URL: http://svnweb.freebsd.org/changeset/base/266889 Log: MFC: 266166 Extend the size of the function or symbol that can be annotated. Modified: stable/10/usr.sbin/pmcannotate/pmcannotate.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pmcannotate/pmcannotate.c ============================================================================== --- stable/10/usr.sbin/pmcannotate/pmcannotate.c Fri May 30 14:58:06 2014 (r266888) +++ stable/10/usr.sbin/pmcannotate/pmcannotate.c Fri May 30 15:00:50 2014 (r266889) @@ -41,8 +41,8 @@ __FBSDID("$FreeBSD$"); #include -#define FNBUFF 161 -#define LNBUFF 161 +#define FNBUFF 512 +#define LNBUFF 512 #define TMPPATH "/tmp/pmcannotate.XXXXXX" From owner-svn-src-stable@FreeBSD.ORG Fri May 30 15:02:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A77B1E0; Fri, 30 May 2014 15:02:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 165522F24; Fri, 30 May 2014 15:02:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4UF2TvO008696; Fri, 30 May 2014 15:02:29 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4UF2Tm2008692; Fri, 30 May 2014 15:02:29 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201405301502.s4UF2Tm2008692@svn.freebsd.org> From: "George V. Neville-Neil" Date: Fri, 30 May 2014 15:02:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266890 - stable/10/usr.sbin/pmcstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 May 2014 15:02:30 -0000 Author: gnn Date: Fri May 30 15:02:29 2014 New Revision: 266890 URL: http://svnweb.freebsd.org/changeset/base/266890 Log: MFC: 266209 Add a command line argument (-l) to end event collection after some number of seconds. The number of seconds may be a fraction. Submitted by: Julien Charbon Relnotes: yes Modified: stable/10/usr.sbin/pmcstat/pmcstat.8 stable/10/usr.sbin/pmcstat/pmcstat.c stable/10/usr.sbin/pmcstat/pmcstat.h Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pmcstat/pmcstat.8 ============================================================================== --- stable/10/usr.sbin/pmcstat/pmcstat.8 Fri May 30 15:00:50 2014 (r266889) +++ stable/10/usr.sbin/pmcstat/pmcstat.8 Fri May 30 15:02:29 2014 (r266890) @@ -52,6 +52,7 @@ .Op Fl f Ar pluginopt .Op Fl g .Op Fl k Ar kerneldir +.Op Fl l Ar secs .Op Fl m Ar pathname .Op Fl n Ar rate .Op Fl o Ar outputfile @@ -274,6 +275,13 @@ This directory specifies where should look for the kernel and its modules. The default is .Pa /boot/kernel . +.It Fl l Ar secs +Set system-wide performance measurement duration for +.Ar secs +seconds. +The argument +.Ar secs +may be a fractional value. .It Fl m Ar pathname Print the sampled PCs with the name, the start and ending addresses of the function within they live. Modified: stable/10/usr.sbin/pmcstat/pmcstat.c ============================================================================== --- stable/10/usr.sbin/pmcstat/pmcstat.c Fri May 30 15:00:50 2014 (r266889) +++ stable/10/usr.sbin/pmcstat/pmcstat.c Fri May 30 15:02:29 2014 (r266890) @@ -509,6 +509,7 @@ pmcstat_show_usage(void) "\t -f spec\t pass \"spec\" to as plugin option\n" "\t -g\t\t produce gprof(1) compatible profiles\n" "\t -k dir\t\t set the path to the kernel\n" + "\t -l secs\t set duration time\n" "\t -m file\t print sampled PCs to \"file\"\n" "\t -n rate\t set sampling rate\n" "\t -o file\t send print output to \"file\"\n" @@ -551,6 +552,7 @@ main(int argc, char **argv) { cpuset_t cpumask; double interval; + double duration; int hcpu, option, npmc, ncpu; int c, check_driver_stats, current_sampling_count; int do_callchain, do_descendants, do_logproccsw, do_logprocexit; @@ -600,6 +602,7 @@ main(int argc, char **argv) args.pa_toptty = 0; args.pa_topcolor = 0; args.pa_mergepmc = 0; + args.pa_duration = 0.0; STAILQ_INIT(&args.pa_events); SLIST_INIT(&args.pa_targets); bzero(&ds_start, sizeof(ds_start)); @@ -618,7 +621,7 @@ main(int argc, char **argv) CPU_SET(hcpu, &cpumask); while ((option = getopt(argc, argv, - "CD:EF:G:M:NO:P:R:S:TWa:c:df:gk:m:n:o:p:qr:s:t:vw:z:")) != -1) + "CD:EF:G:M:NO:P:R:S:TWa:c:df:gk:l:m:n:o:p:qr:s:t:vw:z:")) != -1) switch (option) { case 'a': /* Annotate + callgraph */ args.pa_flags |= FLAG_DO_ANNOTATE; @@ -692,6 +695,15 @@ main(int argc, char **argv) args.pa_flags |= FLAG_HAS_KERNELPATH; break; + case 'l': /* time duration in seconds */ + duration = strtod(optarg, &end); + if (*end != '\0' || duration <= 0) + errx(EX_USAGE, "ERROR: Illegal duration time " + "value \"%s\".", optarg); + args.pa_flags |= FLAG_HAS_DURATION; + args.pa_duration = duration; + break; + case 'm': args.pa_flags |= FLAG_DO_ANNOTATE; args.pa_plugin = PMCSTAT_PL_ANNOTATE; @@ -922,6 +934,12 @@ main(int argc, char **argv) errx(EX_USAGE, "ERROR: options -O and -R are mutually exclusive."); + /* disallow -T and -l together */ + if ((args.pa_flags & FLAG_HAS_DURATION) && + (args.pa_flags & FLAG_DO_TOP)) + errx(EX_USAGE, "ERROR: options -T and -l are mutually " + "exclusive."); + /* -m option is allowed with -R only. */ if (args.pa_flags & FLAG_DO_ANNOTATE && args.pa_inputpath == NULL) errx(EX_USAGE, "ERROR: option %s requires an input file", @@ -1279,6 +1297,20 @@ main(int argc, char **argv) "ERROR: Cannot register kevent for timer"); } + /* + * Setup a duration timer if we have sampling mode PMCs and + * a duration time is set + */ + if ((args.pa_flags & FLAG_HAS_SAMPLING_PMCS) && + (args.pa_flags & FLAG_HAS_DURATION)) { + EV_SET(&kev, 0, EVFILT_TIMER, EV_ADD, 0, + args.pa_duration * 1000, NULL); + + if (kevent(pmcstat_kq, &kev, 1, NULL, 0, NULL) < 0) + err(EX_OSERR, "ERROR: Cannot register kevent for " + "time duration"); + } + /* attach PMCs to the target process, starting it if specified */ if (args.pa_flags & FLAG_HAS_COMMANDLINE) pmcstat_create_process(); @@ -1355,7 +1387,7 @@ main(int argc, char **argv) /* * loop till either the target process (if any) exits, or we - * are killed by a SIGINT. + * are killed by a SIGINT or we reached the time duration. */ runstate = PMCSTAT_RUNNING; do_print = do_read = 0; @@ -1422,7 +1454,13 @@ main(int argc, char **argv) break; - case EVFILT_TIMER: /* print out counting PMCs */ + case EVFILT_TIMER: + /* time duration reached, exit */ + if (args.pa_flags & FLAG_HAS_DURATION) { + runstate = PMCSTAT_FINISHED; + break; + } + /* print out counting PMCs */ if ((args.pa_flags & FLAG_DO_TOP) && pmc_flush_logfile() == 0) do_read = 1; Modified: stable/10/usr.sbin/pmcstat/pmcstat.h ============================================================================== --- stable/10/usr.sbin/pmcstat/pmcstat.h Fri May 30 15:00:50 2014 (r266889) +++ stable/10/usr.sbin/pmcstat/pmcstat.h Fri May 30 15:02:29 2014 (r266890) @@ -54,6 +54,7 @@ #define FLAG_DO_TOP 0x00010000 /* -T */ #define FLAG_DO_ANALYSIS 0x00020000 /* -g or -G or -m or -T */ #define FLAGS_HAS_CPUMASK 0x00040000 /* -c */ +#define FLAG_HAS_DURATION 0x00080000 /* -l secs */ #define DEFAULT_SAMPLE_COUNT 65536 #define DEFAULT_WAIT_INTERVAL 5.0 @@ -149,6 +150,7 @@ struct pmcstat_args { int pa_toptty; /* output to tty or file */ int pa_topcolor; /* terminal support color */ int pa_mergepmc; /* merge PMC with same name */ + double pa_duration; /* time duration */ int pa_argc; char **pa_argv; STAILQ_HEAD(, pmcstat_ev) pa_events; From owner-svn-src-stable@FreeBSD.ORG Sat May 31 00:40:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E3F9AF; Sat, 31 May 2014 00:40:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68CE42016; Sat, 31 May 2014 00:40:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4V0eFWI074465; Sat, 31 May 2014 00:40:15 GMT (envelope-from hiren@svn.freebsd.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4V0eEhx074454; Sat, 31 May 2014 00:40:14 GMT (envelope-from hiren@svn.freebsd.org) Message-Id: <201405310040.s4V0eEhx074454@svn.freebsd.org> From: Hiren Panchasara Date: Sat, 31 May 2014 00:40:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266911 - in stable/10: lib/libpmc sys/dev/hwpmc sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 May 2014 00:40:15 -0000 Author: hiren Date: Sat May 31 00:40:13 2014 New Revision: 266911 URL: http://svnweb.freebsd.org/changeset/base/266911 Log: MFC r263446 Update hwpmc to support core events for Atom Silvermont microarchitecture. (Model 0x4D as per Intel document 330061-001 01/2014) Added: stable/10/lib/libpmc/pmc.atomsilvermont.3 - copied unchanged from r263446, head/lib/libpmc/pmc.atomsilvermont.3 Modified: stable/10/lib/libpmc/Makefile stable/10/lib/libpmc/libpmc.c stable/10/lib/libpmc/pmc.atom.3 stable/10/sys/dev/hwpmc/hwpmc_core.c stable/10/sys/dev/hwpmc/hwpmc_intel.c stable/10/sys/dev/hwpmc/pmc_events.h stable/10/sys/sys/pmc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libpmc/Makefile ============================================================================== --- stable/10/lib/libpmc/Makefile Fri May 30 23:37:31 2014 (r266910) +++ stable/10/lib/libpmc/Makefile Sat May 31 00:40:13 2014 (r266911) @@ -24,6 +24,7 @@ MAN+= pmc.soft.3 # PMC-dependent manual pages MAN+= pmc.atom.3 +MAN+= pmc.atomsilvermont.3 MAN+= pmc.core.3 MAN+= pmc.core2.3 MAN+= pmc.corei7.3 Modified: stable/10/lib/libpmc/libpmc.c ============================================================================== --- stable/10/lib/libpmc/libpmc.c Fri May 30 23:37:31 2014 (r266910) +++ stable/10/lib/libpmc/libpmc.c Sat May 31 00:40:13 2014 (r266911) @@ -169,6 +169,11 @@ static const struct pmc_event_descr atom __PMC_EV_ALIAS_ATOM() }; +static const struct pmc_event_descr atom_silvermont_event_table[] = +{ + __PMC_EV_ALIAS_ATOM_SILVERMONT() +}; + static const struct pmc_event_descr core_event_table[] = { __PMC_EV_ALIAS_CORE() @@ -246,6 +251,7 @@ static const struct pmc_event_descr west } PMC_MDEP_TABLE(atom, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); +PMC_MDEP_TABLE(atom_silvermont, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(core, IAP, PMC_CLASS_SOFT, PMC_CLASS_TSC); PMC_MDEP_TABLE(core2, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(corei7, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); @@ -288,6 +294,7 @@ static const struct pmc_class_descr NAME #if defined(__i386__) || defined(__amd64__) PMC_CLASS_TABLE_DESC(iaf, IAF, iaf, iaf); PMC_CLASS_TABLE_DESC(atom, IAP, atom, iap); +PMC_CLASS_TABLE_DESC(atom_silvermont, IAP, atom_silvermont, iap); PMC_CLASS_TABLE_DESC(core, IAP, core, iap); PMC_CLASS_TABLE_DESC(core2, IAP, core2, iap); PMC_CLASS_TABLE_DESC(corei7, IAP, corei7, iap); @@ -597,6 +604,8 @@ static struct pmc_event_alias core2_alia #define atom_aliases core2_aliases #define atom_aliases_without_iaf core2_aliases_without_iaf +#define atom_silvermont_aliases core2_aliases +#define atom_silvermont_aliases_without_iaf core2_aliases_without_iaf #define corei7_aliases core2_aliases #define corei7_aliases_without_iaf core2_aliases_without_iaf #define haswell_aliases core2_aliases @@ -842,6 +851,7 @@ iap_allocate_pmc(enum pmc_event pe, char if (n != 1) return (-1); } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_ATOM || + cpu_info.pm_cputype == PMC_CPU_INTEL_ATOM_SILVERMONT || cpu_info.pm_cputype == PMC_CPU_INTEL_CORE2 || cpu_info.pm_cputype == PMC_CPU_INTEL_CORE2EXTREME) { if (KWPREFIXMATCH(p, IAP_KW_SNOOPRESPONSE "=")) { @@ -2733,6 +2743,10 @@ pmc_event_names_of_class(enum pmc_class ev = atom_event_table; count = PMC_EVENT_TABLE_SIZE(atom); break; + case PMC_CPU_INTEL_ATOM_SILVERMONT: + ev = atom_silvermont_event_table; + count = PMC_EVENT_TABLE_SIZE(atom_silvermont); + break; case PMC_CPU_INTEL_CORE: ev = core_event_table; count = PMC_EVENT_TABLE_SIZE(core); @@ -3049,6 +3063,9 @@ pmc_init(void) case PMC_CPU_INTEL_ATOM: PMC_MDEP_INIT_INTEL_V2(atom); break; + case PMC_CPU_INTEL_ATOM_SILVERMONT: + PMC_MDEP_INIT_INTEL_V2(atom_silvermont); + break; case PMC_CPU_INTEL_CORE: PMC_MDEP_INIT(core); pmc_class_table[n] = &core_class_table_descr; @@ -3202,6 +3219,11 @@ _pmc_name_of_event(enum pmc_event pe, en ev = atom_event_table; evfence = atom_event_table + PMC_EVENT_TABLE_SIZE(atom); break; + case PMC_CPU_INTEL_ATOM_SILVERMONT: + ev = atom_silvermont_event_table; + evfence = atom_silvermont_event_table + + PMC_EVENT_TABLE_SIZE(atom_silvermont); + break; case PMC_CPU_INTEL_CORE: ev = core_event_table; evfence = core_event_table + PMC_EVENT_TABLE_SIZE(core); Modified: stable/10/lib/libpmc/pmc.atom.3 ============================================================================== --- stable/10/lib/libpmc/pmc.atom.3 Fri May 30 23:37:31 2014 (r266910) +++ stable/10/lib/libpmc/pmc.atom.3 Sat May 31 00:40:13 2014 (r266911) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 12, 2008 +.Dd March 20, 2014 .Dt PMC.ATOM 3 .Os .Sh NAME @@ -1168,6 +1168,7 @@ and the underlying hardware events used .El .Sh SEE ALSO .Xr pmc 3 , +.Xr pmc.atomsilvermont 3 , .Xr pmc.core 3 , .Xr pmc.core2 3 , .Xr pmc.iaf 3 , Copied: stable/10/lib/libpmc/pmc.atomsilvermont.3 (from r263446, head/lib/libpmc/pmc.atomsilvermont.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libpmc/pmc.atomsilvermont.3 Sat May 31 00:40:13 2014 (r266911, copy of r263446, head/lib/libpmc/pmc.atomsilvermont.3) @@ -0,0 +1,535 @@ +.\" Copyright (c) 2014 Hiren Panchasara +.\" All rights reserved. +.\" +.\" 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. +.\" +.\" $FreeBSD$ +.\" +.Dd March 20, 2014 +.Dt PMC.ATOMSILVERMONT 3 +.Os +.Sh NAME +.Nm pmc.atomsilvermont +.Nd measurement events for +.Tn Intel +.Tn Atom Silvermont +family CPUs +.Sh LIBRARY +.Lb libpmc +.Sh SYNOPSIS +.In pmc.h +.Sh DESCRIPTION +.Tn Intel +.Tn Atom Silvermont +CPUs contain PMCs conforming to version 3 of the +.Tn Intel +performance measurement architecture. +These CPUs contains two classes of PMCs: +.Bl -tag -width "Li PMC_CLASS_IAP" +.It Li PMC_CLASS_IAF +Fixed-function counters that count only one hardware event per counter. +.It Li PMC_CLASS_IAP +Programmable counters that may be configured to count one of a defined +set of hardware events. +.El +.Pp +The number of PMCs available in each class and their widths need to be +determined at run time by calling +.Xr pmc_cpuinfo 3 . +.Pp +Intel Atom Silvermont PMCs are documented in +.Rs +.%B "Intel 64 and IA-32 Intel(R) Architecture Software Developer's Manual" +.%T "Combined Volumes" +.%N "Order Number 325462-050US" +.%D February 2014 +.%Q "Intel Corporation" +.Re +.Ss ATOM SILVERMONT FIXED FUNCTION PMCS +These PMCs and their supported events are documented in +.Xr pmc.iaf 3 . +.Ss ATOM SILVERMONT PROGRAMMABLE PMCS +The programmable PMCs support the following capabilities: +.Bl -column "PMC_CAP_INTERRUPT" "Support" +.It Em Capability Ta Em Support +.It PMC_CAP_CASCADE Ta \&No +.It PMC_CAP_EDGE Ta Yes +.It PMC_CAP_INTERRUPT Ta Yes +.It PMC_CAP_INVERT Ta Yes +.It PMC_CAP_READ Ta Yes +.It PMC_CAP_PRECISE Ta \&No +.It PMC_CAP_SYSTEM Ta Yes +.It PMC_CAP_TAGGING Ta \&No +.It PMC_CAP_THRESHOLD Ta Yes +.It PMC_CAP_USER Ta Yes +.It PMC_CAP_WRITE Ta Yes +.El +.Ss Event Qualifiers +Event specifiers for these PMCs support the following common +qualifiers: +.Bl -tag -width indent +.It Li any +Count matching events seen on any logical processor in a package. +.It Li cmask= Ns Ar value +Configure the PMC to increment only if the number of configured +events measured in a cycle is greater than or equal to +.Ar value . +.It Li edge +Configure the PMC to count the number of de-asserted to asserted +transitions of the conditions expressed by the other qualifiers. +If specified, the counter will increment only once whenever a +condition becomes true, irrespective of the number of clocks during +which the condition remains true. +.It Li inv +Invert the sense of comparison when the +.Dq Li cmask +qualifier is present, making the counter increment when the number of +events per cycle is less than the value specified by the +.Dq Li cmask +qualifier. +.It Li os +Configure the PMC to count events happening at processor privilege +level 0. +.It Li usr +Configure the PMC to count events occurring at privilege levels 1, 2 +or 3. +.El +.Pp +If neither of the +.Dq Li os +or +.Dq Li usr +qualifiers are specified, the default is to enable both. +.Pp +Events that require core-specificity to be specified use a +additional qualifier +.Dq Li core= Ns Ar core , +where argument +.Ar core +is one of: +.Bl -tag -width indent +.It Li all +Measure event conditions on all cores. +.It Li this +Measure event conditions on this core. +.El +.Pp +The default is +.Dq Li this . +.Pp +Events that require an agent qualifier to be specified use an +additional qualifier +.Dq Li agent= Ns agent , +where argument +.Ar agent +is one of: +.Bl -tag -width indent +.It Li this +Measure events associated with this bus agent. +.It Li any +Measure events caused by any bus agent. +.El +.Pp +The default is +.Dq Li this . +.Pp +Events that require a hardware prefetch qualifier to be specified use an +additional qualifier +.Dq Li prefetch= Ns Ar prefetch , +where argument +.Ar prefetch +is one of: +.Bl -tag -width "exclude" +.It Li both +Include all prefetches. +.It Li only +Only count hardware prefetches. +.It Li exclude +Exclude hardware prefetches. +.El +.Pp +The default is +.Dq Li both . +.Pp +Events that require a cache coherence qualifier to be specified use an +additional qualifier +.Dq Li cachestate= Ns Ar state , +where argument +.Ar state +contains one or more of the following letters: +.Bl -tag -width indent +.It Li e +Count cache lines in the exclusive state. +.It Li i +Count cache lines in the invalid state. +.It Li m +Count cache lines in the modified state. +.It Li s +Count cache lines in the shared state. +.El +.Pp +The default is +.Dq Li eims . +.Pp +Events that require a snoop response qualifier to be specified use an +additional qualifier +.Dq Li snoopresponse= Ns Ar response , +where argument +.Ar response +comprises of the following keywords separated by +.Dq + +signs: +.Bl -tag -width indent +.It Li clean +Measure CLEAN responses. +.It Li hit +Measure HIT responses. +.It Li hitm +Measure HITM responses. +.El +.Pp +The default is to measure all the above responses. +.Pp +Events that require a snoop type qualifier use an additional qualifier +.Dq Li snooptype= Ns Ar type , +where argument +.Ar type +comprises the one of the following keywords: +.Bl -tag -width indent +.It Li cmp2i +Measure CMP2I snoops. +.It Li cmp2s +Measure CMP2S snoops. +.El +.Pp +The default is to measure both snoops. +.Ss Event Specifiers (Programmable PMCs) +Atom Silvermont programmable PMCs support the following events: +.Bl -tag -width indent +.It Li REHABQ.LD_BLOCK_ST_FORWARD +.Pq Event 03H , Umask 01H +The number of retired loads that were +prohibited from receiving forwarded data from the store +because of address mismatch. +.It Li REHABQ.LD_BLOCK_STD_NOTREADY +.Pq Event 03H , Umask 02H +The cases where a forward was technically possible, +but did not occur because the store data was not available +at the right time. +.It Li REHABQ.ST_SPLITS +.Pq Event 03H , Umask 04H +The number of retire stores that experienced. +cache line boundary splits. +.It Li REHABQ.LD_SPLITS +.Pq Event 03H , Umask 08H +The number of retire loads that experienced. +cache line boundary splits. +.It Li REHABQ.LOCK +.Pq Event 03H , Umask 10H +The number of retired memory operations with lock semantics. +These are either implicit locked instructions such as the +XCHG instruction or instructions with an explicit LOCK +prefix (0xF0). +.It Li REHABQ.STA_FULL +.Pq Event 03H , Umask 20H +The number of retired stores that are delayed +because there is not a store address buffer available. +.It Li REHABQ.ANY_LD +.Pq Event 03H , Umask 40H +The number of load uops reissued from Rehabq. +.It Li REHABQ.ANY_ST +.Pq Event 03H , Umask 80H +The number of store uops reissued from Rehabq. +.It Li MEM_UOPS_RETIRED.L1_MISS_LOADS +.Pq Event 04H , Umask 01H +The number of load ops retired that miss in L1 +Data cache. Note that prefetch misses will not be counted. +.It Li MEM_UOPS_RETIRED.L2_HIT_LOADS +.Pq Event 04H , Umask 02H +The number of load micro-ops retired that hit L2. +.It Li MEM_UOPS_RETIRED.L2_MISS_LOADS +.Pq Event 04H , Umask 04H +The number of load micro-ops retired that missed L2. +.It Li MEM_UOPS_RETIRED.DTLB_MISS_LOADS +.Pq Event 04H , Umask 08H +The number of load ops retired that had DTLB miss. +.It Li MEM_UOPS_RETIRED.UTLB_MISS +.Pq Event 04H , Umask 10H +The number of load ops retired that had UTLB miss. +.It Li MEM_UOPS_RETIRED.HITM +.Pq Event 04H , Umask 20H +The number of load ops retired that got data +from the other core or from the other module. +.It Li MEM_UOPS_RETIRED.ALL_LOADS +.Pq Event 04H , Umask 40H +The number of load ops retired. +.It Li MEM_UOP_RETIRED.ALL_STORES +.Pq Event 04H , Umask 80H +The number of store ops retired. +.It Li PAGE_WALKS.D_SIDE_CYCLES +.Pq Event 05H , Umask 01H +Every cycle when a D-side (walks due to a load) page walk +is in progress. Page walk duration divided by +number of page walks is the average duration of page-walks. +Edge trigger bit must be cleared. Set Edge to count the number +of page walks. +.It Li PAGE_WALKS.I_SIDE_CYCLES +.Pq Event 05H , Umask 02H +Every cycle when a I-side (walks due to an instruction fetch) +page walk is in progress. Page walk duration divided by number +of page walks is the average duration of page-walks. +.It Li PAGE_WALKS.WALKS +.Pq Event 05H , Umask 03H +The number of times a data (D) page walk or an instruction (I) +page walk is completed or started. Since a page walk implies a +TLB miss, the number of TLB misses can be counted by counting +the number of pagewalks. +.It Li LONGEST_LAT_CACHE.MISS +.Pq Event 2EH , Umask 41H +the total number of L2 cache references and +The number of L2 cache misses respectively. +L3 is not supported in Silvermont microarchitecture. +.It Li LONGEST_LAT_CACHE.REFERENCE +.Pq Event 2EH , Umask 4FH +The number of requests originating from the core that +references a cache line in the L2 cache. +L3 is not supported in Silvermont microarchitecture. +.It Li L2_REJECT_XQ.ALL +.Pq Event 30H , Umask 00H +The number of demand and prefetch +transactions that the L2 XQ rejects due to a full or near full +condition which likely indicates back pressure from the IDI link. +The XQ may reject transactions from the L2Q (non-cacheable +requests), BBS (L2 misses) and WOB (L2 write-back victims) +.It Li CORE_REJECT_L2Q.ALL +.Pq Event 31H , Umask 00H +The number of demand and L1 prefetcher +requests rejected by the L2Q due to a full or nearly full +condition which likely indicates back pressure from L2Q. +It also counts requests that would have gone directly to +the XQ, but are rejected due to a full or nearly full condition, +indicating back pressure from the IDI link. The L2Q may also +reject transactions from a core to insure fairness between +cores, or to delay a core's dirty eviction when the address +conflicts incoming external snoops. (Note that L2 prefetcher +requests that are dropped are not counted by this event.). +.It Li CPU_CLK_UNHALTED.CORE_P +.Pq Event 3CH , Umask 00H +The number of core cycles while the core is not in a halt +state. The core enters the halt state when it is running +the HLT instruction. In mobile systems the core frequency +may change from time to time. For this reason this event +may have a changing ratio with regards to time. +.It Li CPU_CLK_UNHALTED.REF_P +.Pq Event 3CH , Umask 01H +The number of reference cycles that the core is not in a halt +state. The core enters the halt state when it is running +the HLT instruction. +In mobile systems the core frequency may change from time. +This event is not affected by core frequency changes but counts +as if the core is running at the maximum frequency all the time. +.It Li ICACHE.HIT +.Pq Event 80H , Umask 01H +The number of instruction fetches from the instruction cache. +.It Li ICACHE.MISSES +.Pq Event 80H , Umask 02H +The number of instruction fetches that miss the +Instruction cache or produce memory requests. This includes +uncacheable fetches. An instruction fetch miss is counted only +once and not once for every cycle it is outstanding. +.It Li ICACHE.ACCESSES +.Pq Event 80H , Umask 03H +The number of instruction fetches, including uncacheable fetches. +.It Li NIP_STALL.ICACHE_MISS +.Pq Event B6H , Umask 04H +The number of cycles the NIP stalls because of an icache miss. +This is a cumulative count of cycles the NIP stalled for all +icache misses. +.It Li OFFCORE_RESPONSE_0 +.Pq Event B7H , Umask 01H +Requires MSR_OFFCORE_RESP0 to specify request type and response. +.It Li OFFCORE_RESPONSE_1 +.Pq Event B7H , Umask 02H +Requires MSR_OFFCORE_RESP to specify request type and response. +.It Li INST_RETIRED.ANY_P +.Pq Event C0H , Umask 00H +The number of instructions that retire execution. For instructions +that consist of multiple micro-ops, this event counts the +retirement of the last micro-op of the instruction. The counter +continues counting during hardware interrupts, traps, and inside +interrupt handlers. +.It Li UOPS_RETIRED.MS +.Pq Event C2H , Umask 01H +The number of micro-ops retired that were supplied from MSROM. +.It Li UOPS_RETIRED.ALL +.Pq Event C2H , Umask 10H +The number of micro-ops retired. +.It Li MACHINE_CLEARS.SMC +.Pq Event C3H , Umask 01H +The number of times that a program writes to a code section. +Self-modifying code causes a severe penalty in all Intel +architecture processors. +.It Li MACHINE_CLEARS.MEMORY_ORDERING +.Pq Event C3H , Umask 02H +The number of times that pipeline was cleared due to memory +ordering issues. +.It Li MACHINE_CLEARS.FP_ASSIST +.Pq Event C3H , Umask 04H +The number of times that pipeline stalled due to FP operations +needing assists. +.It Li MACHINE_CLEARS.ALL +.Pq Event C3H , Umask 08H +The number of times that pipeline stalled due to due to any causes +(including SMC, MO, FP assist, etc). +.It Li BR_INST_RETIRED.ALL_BRANCHES +.Pq Event C4H , Umask 00H +The number of branch instructions retired. +.It Li BR_INST_RETIRED.JCC +.Pq Event C4H , Umask 7EH +The number of branch instructions retired that were conditional +jumps. +.It Li BR_INST_RETIRED.FAR_BRANCH +.Pq Event C4H , Umask BFH +The number of far branch instructions retired. +.It Li BR_INST_RETIRED.NON_RETURN_IND +.Pq Event C4H , Umask EBH +The number of branch instructions retired that were near indirect +call or near indirect jmp. +.It Li BR_INST_RETIRED.RETURN +.Pq Event C4H , Umask F7H +The number of near RET branch instructions retired. +.It Li BR_INST_RETIRED.CALL +.Pq Event C4H , Umask F9H +The number of near CALL branch instructions retired. +.It Li BR_INST_RETIRED.IND_CALL +.Pq Event C4H , Umask FBH +The number of near indirect CALL branch instructions retired. +.It Li BR_INST_RETIRED.REL_CALL +.Pq Event C4H , Umask FDH +The number of near relative CALL branch instructions retired. +.It Li BR_INST_RETIRED.TAKEN_JCC +.Pq Event C4H , Umask FEH +The number of branch instructions retired that were conditional +jumps and predicted taken. +.It Li BR_MISP_RETIRED.ALL_BRANCHES +.Pq Event C5H , Umask 00H +The number of mispredicted branch instructions retired. +.It Li BR_MISP_RETIRED.JCC +.Pq Event C5H , Umask 7EH +The number of mispredicted branch instructions retired that were +conditional jumps. +.It Li BR_MISP_RETIRED.FAR +.Pq Event C5H , Umask BFH +The number of mispredicted far branch instructions retired. +.It Li BR_MISP_RETIRED.NON_RETURN_IND +.Pq Event C5H , Umask EBH +The number of mispredicted branch instructions retired that were +near indirect call or near indirect jmp. +.It Li BR_MISP_RETIRED.RETURN +.Pq Event C5H , Umask F7H +The number of mispredicted near RET branch instructions retired. +.It Li BR_MISP_RETIRED.CALL +.Pq Event C5H , Umask F9H +The number of mispredicted near CALL branch instructions retired. +.It Li BR_MISP_RETIRED.IND_CALL +.Pq Event C5H , Umask FBH +The number of mispredicted near indirect CALL branch instructions +retired. +.It Li BR_MISP_RETIRED.REL_CALL +.Pq Event C5H , Umask FDH +The number of mispredicted near relative CALL branch instructions +retired. +.It Li BR_MISP_RETIRED.TAKEN_JCC +.Pq Event C5H , Umask FEH +The number of mispredicted branch instructions retired that were +conditional jumps and predicted taken. +.It Li NO_ALLOC_CYCLES.ROB_FULL +.Pq Event CAH , Umask 01H +The number of cycles when no uops are allocated and the ROB is full +(less than 2 entries available). +.It Li NO_ALLOC_CYCLES.RAT_STALL +.Pq Event CAH , Umask 20H +The number of cycles when no uops are allocated and a RATstall is +asserted. +.It Li NO_ALLOC_CYCLES.ALL +.Pq Event CAH , Umask 3FH +The number of cycles when the front-end does not provide any +instructions to be allocated for any reason. +.It Li NO_ALLOC_CYCLES.NOT_DELIVERED +.Pq Event CAH , Umask 50H +The number of cycles when the front-end does not provide any +instructions to be allocated but the back end is not stalled. +.It Li RS_FULL_STALL.MEC +.Pq Event CBH , Umask 01H +The number of cycles the allocation pipe line stalled due to +the RS for the MEC cluster is full. +.It Li RS_FULL_STALL.ALL +.Pq Event CBH , Umask 1FH +The number of cycles that the allocation pipe line stalled due +to any one of the RS is full. +.It Li CYCLES_DIV_BUSY.ANY +.Pq Event CDH , Umask 01H +The number of cycles the divider is busy. +.It Li BACLEARS.ALL +.Pq Event E6H , Umask 01H +The number of baclears for any type of branch. +.It Li BACLEARS.RETURN +.Pq Event E6H , Umask 08H +The number of baclears for return branches. +.It Li BACLEARS.COND +.Pq Event E6H , Umask 10H +The number of baclears for conditional branches. +.It Li MS_DECODED.MS_ENTRY +.Pq Event E7H , Umask 01H) +The number of times the MSROM starts a flow of UOPS. +.El +.Sh SEE ALSO +.Xr pmc 3 , +.Xr pmc.atom 3 , +.Xr pmc.core 3 , +.Xr pmc.core2 3 , +.Xr pmc.iaf 3 , +.Xr pmc.k7 3 , +.Xr pmc.k8 3 , +.Xr pmc.p4 3 , +.Xr pmc.p5 3 , +.Xr pmc.p6 3 , +.Xr pmc.soft 3 , +.Xr pmc.tsc 3 , +.Xr pmc_cpuinfo 3 , +.Xr pmclog 3 , +.Xr hwpmc 4 +.Sh HISTORY +The +.Nm pmc +library first appeared in +.Fx 6.0 . +.Sh AUTHORS +The +.Lb libpmc +library was written by +.An "Joseph Koshy" +.Aq jkoshy@FreeBSD.org . +The support for the Atom Silvermont +microarchitecture was written by +.An "Hiren Panchasara" +.Aq hiren@FreeBSD.org . Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_core.c Fri May 30 23:37:31 2014 (r266910) +++ stable/10/sys/dev/hwpmc/hwpmc_core.c Sat May 31 00:40:13 2014 (r266911) @@ -245,7 +245,8 @@ iaf_allocate_pmc(int cpu, int ri, struct validflags = IAF_MASK; - if (core_cputype != PMC_CPU_INTEL_ATOM) + if (core_cputype != PMC_CPU_INTEL_ATOM && + core_cputype != PMC_CPU_INTEL_ATOM_SILVERMONT) validflags &= ~IAF_ANY; if ((flags & ~validflags) != 0) @@ -434,7 +435,8 @@ iaf_stop_pmc(int cpu, int ri) fc = (IAF_MASK << (ri * 4)); - if (core_cputype != PMC_CPU_INTEL_ATOM) + if (core_cputype != PMC_CPU_INTEL_ATOM && + core_cputype != PMC_CPU_INTEL_ATOM_SILVERMONT) fc &= ~IAF_ANY; iafc->pc_iafctrl &= ~fc; @@ -566,7 +568,8 @@ struct iap_event_descr { #define IAP_F_SBX (1 << 8) /* CPU: Sandy Bridge Xeon */ #define IAP_F_IBX (1 << 9) /* CPU: Ivy Bridge Xeon */ #define IAP_F_HW (1 << 10) /* CPU: Haswell */ -#define IAP_F_FM (1 << 11) /* Fixed mask */ +#define IAP_F_CAS (1 << 11) /* CPU: Atom Silvermont */ +#define IAP_F_FM (1 << 12) /* Fixed mask */ #define IAP_F_ALLCPUSCORE2 \ (IAP_F_CC | IAP_F_CC2 | IAP_F_CC2E | IAP_F_CA) @@ -607,28 +610,38 @@ static struct iap_event_descr iap_events IAPDESCR(03H_00H, 0x03, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(03H_01H, 0x03, 0x01, IAP_F_FM | IAP_F_I7O | IAP_F_SB | - IAP_F_SBX), + IAP_F_SBX | IAP_F_CAS), IAPDESCR(03H_02H, 0x03, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), - IAPDESCR(03H_04H, 0x03, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O), + IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | + IAP_F_CAS), + IAPDESCR(03H_04H, 0x03, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O | + IAP_F_CAS), IAPDESCR(03H_08H, 0x03, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB | - IAP_F_SBX), + IAP_F_SBX | IAP_F_CAS), IAPDESCR(03H_10H, 0x03, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB | - IAP_F_SBX), - IAPDESCR(03H_20H, 0x03, 0x20, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - - IAPDESCR(04H_00H, 0x04, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(04H_01H, 0x04, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O), - IAPDESCR(04H_02H, 0x04, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + IAP_F_SBX | IAP_F_CAS), + IAPDESCR(03H_20H, 0x03, 0x20, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_CAS), + IAPDESCR(03H_40H, 0x03, 0x40, IAP_F_CAS), + IAPDESCR(03H_80H, 0x03, 0x80, IAP_F_CAS), + + IAPDESCR(04H_00H, 0x04, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CAS), + IAPDESCR(04H_01H, 0x04, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O | + IAP_F_CAS), + IAPDESCR(04H_02H, 0x04, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_CAS), + IAPDESCR(04H_04H, 0x04, 0x04, IAP_F_CAS), IAPDESCR(04H_07H, 0x04, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(04H_08H, 0x04, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + IAPDESCR(04H_08H, 0x04, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_CAS), + IAPDESCR(04H_10H, 0x04, 0x10, IAP_F_CAS), + IAPDESCR(04H_20H, 0x04, 0x20, IAP_F_CAS), + IAPDESCR(04H_40H, 0x04, 0x40, IAP_F_CAS), + IAPDESCR(04H_80H, 0x04, 0x80, IAP_F_CAS), IAPDESCR(05H_00H, 0x05, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(05H_01H, 0x05, 0x01, IAP_F_FM | IAP_F_I7O | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS), IAPDESCR(05H_02H, 0x05, 0x02, IAP_F_FM | IAP_F_I7O | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), - IAPDESCR(05H_03H, 0x05, 0x03, IAP_F_FM | IAP_F_I7O), + IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS), + IAPDESCR(05H_03H, 0x05, 0x03, IAP_F_FM | IAP_F_I7O | IAP_F_CAS), IAPDESCR(06H_00H, 0x06, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2 | IAP_F_CC2E | IAP_F_CA), @@ -864,12 +877,16 @@ static struct iap_event_descr iap_events IAPDESCR(2EH_01H, 0x2E, 0x01, IAP_F_FM | IAP_F_WM), IAPDESCR(2EH_02H, 0x2E, 0x02, IAP_F_FM | IAP_F_WM), IAPDESCR(2EH_41H, 0x2E, 0x41, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | - IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | + IAP_F_CAS), IAPDESCR(2EH_4FH, 0x2E, 0x4F, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | - IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | + IAP_F_CAS), IAPDESCR(30H, 0x30, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), + IAPDESCR(30H_00H, 0x30, 0x00, IAP_F_CAS), + IAPDESCR(31H_00H, 0x31, 0x00, IAP_F_CAS), IAPDESCR(32H, 0x32, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, IAP_F_CC), IAPDESCR(32H, 0x32, IAP_M_CORE, IAP_F_CA | IAP_F_CC2), @@ -880,10 +897,10 @@ static struct iap_event_descr iap_events IAPDESCR(3CH_00H, 0x3C, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | - IAP_F_HW), + IAP_F_HW | IAP_F_CAS), IAPDESCR(3CH_01H, 0x3C, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | - IAP_F_HW), + IAP_F_HW | IAP_F_CAS), IAPDESCR(3CH_02H, 0x3C, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(3DH_01H, 0x3D, 0x01, IAP_F_FM | IAP_F_I7O), @@ -1100,11 +1117,12 @@ static struct iap_event_descr iap_events IAPDESCR(7FH, 0x7F, IAP_M_CORE, IAP_F_CA | IAP_F_CC2), IAPDESCR(80H_00H, 0x80, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(80H_01H, 0x80, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(80H_01H, 0x80, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_CAS), IAPDESCR(80H_02H, 0x80, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_I7 | - IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | + IAP_F_CAS), IAPDESCR(80H_03H, 0x80, 0x03, IAP_F_FM | IAP_F_CA | IAP_F_I7 | - IAP_F_WM), + IAP_F_WM | IAP_F_CAS), IAPDESCR(80H_04H, 0x80, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(81H_00H, 0x81, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), @@ -1332,9 +1350,11 @@ static struct iap_event_descr iap_events IAPDESCR(B4H_04H, 0xB4, 0x04, IAP_F_FM | IAP_F_WM), IAPDESCR(B6H_01H, 0xB6, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_SBX), + IAPDESCR(B6H_04H, 0xB6, 0x04, IAP_F_CAS), IAPDESCR(B7H_01H, 0xB7, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS), + IAPDESCR(B7H_02H, 0xB7, 0x02, IAP_F_CAS), IAPDESCR(B8H_01H, 0xB8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(B8H_02H, 0xB8, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -1363,7 +1383,8 @@ static struct iap_event_descr iap_events IAPDESCR(BFH_05H, 0xBF, 0x05, IAP_F_FM | IAP_F_SB | IAP_F_SBX), IAPDESCR(C0H_00H, 0xC0, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | - IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | + IAP_F_CAS), IAPDESCR(C0H_01H, 0xC0, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), @@ -1388,7 +1409,7 @@ static struct iap_event_descr iap_events IAPDESCR(C2H_00H, 0xC2, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(C2H_01H, 0xC2, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX | IAP_F_HW), + IAP_F_IBX | IAP_F_HW | IAP_F_CAS), IAPDESCR(C2H_02H, 0xC2, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), @@ -1397,23 +1418,24 @@ static struct iap_event_descr iap_events IAPDESCR(C2H_07H, 0xC2, 0x07, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C2H_08H, 0xC2, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C2H_0FH, 0xC2, 0x0F, IAP_F_FM | IAP_F_CC2), - IAPDESCR(C2H_10H, 0xC2, 0x10, IAP_F_FM | IAP_F_CA), + IAPDESCR(C2H_10H, 0xC2, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CAS), IAPDESCR(C3H_00H, 0xC3, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(C3H_01H, 0xC3, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM), + IAP_F_I7 | IAP_F_WM | IAP_F_CAS), IAPDESCR(C3H_02H, 0xC3, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS), IAPDESCR(C3H_04H, 0xC3, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX | IAP_F_HW), + IAP_F_IBX | IAP_F_HW | IAP_F_CAS), + IAPDESCR(C3H_08H, 0xC3, 0x08, IAP_F_CAS), IAPDESCR(C3H_10H, 0xC3, 0x10, IAP_F_FM | IAP_F_I7O), IAPDESCR(C3H_20H, 0xC3, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), IAPDESCR(C4H_00H, 0xC4, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX | IAP_F_HW), + IAP_F_IBX | IAP_F_HW | IAP_F_CAS), IAPDESCR(C4H_01H, 0xC4, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), @@ -1433,10 +1455,18 @@ static struct iap_event_descr iap_events IAP_F_SBX | IAP_F_IBX | IAP_F_HW), IAPDESCR(C4H_40H, 0xC4, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAPDESCR(C4H_7EH, 0xC4, 0x7E, IAP_F_CAS), + IAPDESCR(C4H_BFH, 0xC4, 0xBF, IAP_F_CAS), + IAPDESCR(C4H_EBH, 0xC4, 0xEB, IAP_F_CAS), + IAPDESCR(C4H_F7H, 0xC4, 0xF7, IAP_F_CAS), + IAPDESCR(C4H_F9H, 0xC4, 0xF9, IAP_F_CAS), + IAPDESCR(C4H_FBH, 0xC4, 0xFB, IAP_F_CAS), + IAPDESCR(C4H_FDH, 0xC4, 0xFD, IAP_F_CAS), + IAPDESCR(C4H_FEH, 0xC4, 0xFE, IAP_F_CAS), IAPDESCR(C5H_00H, 0xC5, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX | IAP_F_HW), + IAP_F_IBX | IAP_F_HW | IAP_F_CAS), IAPDESCR(C5H_01H, 0xC5, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), IAPDESCR(C5H_02H, 0xC5, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | @@ -1447,6 +1477,14 @@ static struct iap_event_descr iap_events IAP_F_SBX | IAP_F_IBX), IAPDESCR(C5H_20H, 0xC5, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAPDESCR(C5H_7EH, 0xC5, 0x7E, IAP_F_CAS), + IAPDESCR(C5H_BFH, 0xC5, 0xBF, IAP_F_CAS), + IAPDESCR(C5H_EBH, 0xC5, 0xEB, IAP_F_CAS), + IAPDESCR(C5H_F7H, 0xC5, 0xF7, IAP_F_CAS), + IAPDESCR(C5H_F9H, 0xC5, 0xF9, IAP_F_CAS), + IAPDESCR(C5H_FBH, 0xC5, 0xFB, IAP_F_CAS), + IAPDESCR(C5H_FDH, 0xC5, 0xFD, IAP_F_CAS), + IAPDESCR(C5H_FEH, 0xC5, 0xFE, IAP_F_CAS), IAPDESCR(C6H_00H, 0xC6, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(C6H_01H, 0xC6, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2), @@ -1471,7 +1509,7 @@ static struct iap_event_descr iap_events IAPDESCR(C9H_00H, 0xC9, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(CAH_00H, 0xCA, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(CAH_01H, 0xCA, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + IAPDESCR(CAH_01H, 0xCA, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_CAS), IAPDESCR(CAH_02H, 0xCA, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), IAPDESCR(CAH_04H, 0xCA, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | @@ -1482,9 +1520,12 @@ static struct iap_event_descr iap_events IAP_F_SBX | IAP_F_IBX | IAP_F_HW), IAPDESCR(CAH_1EH, 0xCA, 0x1E, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAPDESCR(CAH_20H, 0xCA, 0x20, IAP_F_CAS), + IAPDESCR(CAH_3FH, 0xCA, 0x3F, IAP_F_CAS), + IAPDESCR(CAH_50H, 0xCA, 0x50, IAP_F_CAS), IAPDESCR(CBH_01H, 0xCB, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM), + IAP_F_I7 | IAP_F_WM | IAP_F_CAS), IAPDESCR(CBH_02H, 0xCB, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM), IAPDESCR(CBH_04H, 0xCB, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | @@ -1493,6 +1534,7 @@ static struct iap_event_descr iap_events IAP_F_I7 | IAP_F_WM), IAPDESCR(CBH_10H, 0xCB, 0x10, IAP_F_FM | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM), + IAPDESCR(CBH_1FH, 0xCB, 0x1F, IAP_F_CAS), IAPDESCR(CBH_40H, 0xCB, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(CBH_80H, 0xCB, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -1507,7 +1549,7 @@ static struct iap_event_descr iap_events IAPDESCR(CDH_00H, 0xCD, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(CDH_01H, 0xCD, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS), IAPDESCR(CDH_02H, 0xCD, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), @@ -1622,10 +1664,14 @@ static struct iap_event_descr iap_events IAPDESCR(E6H_00H, 0xE6, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), IAPDESCR(E6H_01H, 0xE6, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | - IAP_F_WM | IAP_F_SBX), + IAP_F_WM | IAP_F_SBX | IAP_F_CAS), IAPDESCR(E6H_02H, 0xE6, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(E6H_08H, 0xE6, 0x08, IAP_F_CAS), + IAPDESCR(E6H_10H, 0xE6, 0x10, IAP_F_CAS), IAPDESCR(E6H_1FH, 0xE6, 0x1F, IAP_F_FM | IAP_F_IBX | IAP_F_HW), + IAPDESCR(E7H_01H, 0xE7, 0x01, IAP_F_CAS), + IAPDESCR(E8H_01H, 0xE8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(E8H_02H, 0xE8, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(E8H_03H, 0xE8, 0x03, IAP_F_FM | IAP_F_I7O), @@ -2005,6 +2051,9 @@ iap_allocate_pmc(int cpu, int ri, struct case PMC_CPU_INTEL_ATOM: cpuflag = IAP_F_CA; break; + case PMC_CPU_INTEL_ATOM_SILVERMONT: + cpuflag = IAP_F_CAS; + break; case PMC_CPU_INTEL_CORE: cpuflag = IAP_F_CC; break; @@ -2119,6 +2168,7 @@ iap_allocate_pmc(int cpu, int ri, struct * Only Atom and SandyBridge CPUs support the 'ANY' qualifier. */ if (core_cputype == PMC_CPU_INTEL_ATOM || + core_cputype == PMC_CPU_INTEL_ATOM_SILVERMONT || core_cputype == PMC_CPU_INTEL_SANDYBRIDGE || core_cputype == PMC_CPU_INTEL_SANDYBRIDGE_XEON) evsel |= (config & IAP_ANY); Modified: stable/10/sys/dev/hwpmc/hwpmc_intel.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_intel.c Fri May 30 23:37:31 2014 (r266910) +++ stable/10/sys/dev/hwpmc/hwpmc_intel.c Sat May 31 00:40:13 2014 (r266911) @@ -168,6 +168,10 @@ pmc_intel_initialize(void) cputype = PMC_CPU_INTEL_HASWELL; nclasses = 5; break; + case 0x4D: /* Per Intel document 330061-001 01/2014. */ + cputype = PMC_CPU_INTEL_ATOM_SILVERMONT; + nclasses = 3; + break; } break; #if defined(__i386__) || defined(__amd64__) @@ -200,6 +204,7 @@ pmc_intel_initialize(void) * Intel Core, Core 2 and Atom processors. */ case PMC_CPU_INTEL_ATOM: + case PMC_CPU_INTEL_ATOM_SILVERMONT: case PMC_CPU_INTEL_CORE: case PMC_CPU_INTEL_CORE2: case PMC_CPU_INTEL_CORE2EXTREME: @@ -288,6 +293,7 @@ pmc_intel_finalize(struct pmc_mdep *md) switch (md->pmd_cputype) { #if defined(__i386__) || defined(__amd64__) case PMC_CPU_INTEL_ATOM: + case PMC_CPU_INTEL_ATOM_SILVERMONT: case PMC_CPU_INTEL_CORE: case PMC_CPU_INTEL_CORE2: case PMC_CPU_INTEL_CORE2EXTREME: Modified: stable/10/sys/dev/hwpmc/pmc_events.h ============================================================================== --- stable/10/sys/dev/hwpmc/pmc_events.h Fri May 30 23:37:31 2014 (r266910) +++ stable/10/sys/dev/hwpmc/pmc_events.h Sat May 31 00:40:13 2014 (r266911) @@ -484,11 +484,18 @@ __PMC_EV(IAP, EVENT_03H_04H) \ __PMC_EV(IAP, EVENT_03H_08H) \ __PMC_EV(IAP, EVENT_03H_10H) \ __PMC_EV(IAP, EVENT_03H_20H) \ +__PMC_EV(IAP, EVENT_03H_40H) \ +__PMC_EV(IAP, EVENT_03H_80H) \ __PMC_EV(IAP, EVENT_04H_00H) \ __PMC_EV(IAP, EVENT_04H_01H) \ __PMC_EV(IAP, EVENT_04H_02H) \ +__PMC_EV(IAP, EVENT_04H_04H) \ __PMC_EV(IAP, EVENT_04H_07H) \ __PMC_EV(IAP, EVENT_04H_08H) \ +__PMC_EV(IAP, EVENT_04H_10H) \ +__PMC_EV(IAP, EVENT_04H_20H) \ +__PMC_EV(IAP, EVENT_04H_40H) \ +__PMC_EV(IAP, EVENT_04H_80H) \ __PMC_EV(IAP, EVENT_05H_00H) \ __PMC_EV(IAP, EVENT_05H_01H) \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat May 31 05:59:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67ECC646; Sat, 31 May 2014 05:59:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 541992820; Sat, 31 May 2014 05:59:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4V5xuE5017493; Sat, 31 May 2014 05:59:56 GMT (envelope-from dchagin@svn.freebsd.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4V5xuKZ017492; Sat, 31 May 2014 05:59:56 GMT (envelope-from dchagin@svn.freebsd.org) Message-Id: <201405310559.s4V5xuKZ017492@svn.freebsd.org> From: Dmitry Chagin Date: Sat, 31 May 2014 05:59:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266918 - stable/10/sys/compat/linux X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 May 2014 05:59:56 -0000 Author: dchagin Date: Sat May 31 05:59:55 2014 New Revision: 266918 URL: http://svnweb.freebsd.org/changeset/base/266918 Log: MFC r266782: In r218101 I have not changed properly the futex syscall definition. Some Linux futex ops atomically verifies that the futex address uaddr (uval) contains the value val. Comparing signed uval and unsigned val may lead to an unexpected result, mostly to a deadlock. So copyin uaddr to an unsigned int to compare the parameters correctly. While here change ktr records to print parameters in more readable format. Modified: stable/10/sys/compat/linux/linux_futex.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/linux/linux_futex.c ============================================================================== --- stable/10/sys/compat/linux/linux_futex.c Sat May 31 05:16:12 2014 (r266917) +++ stable/10/sys/compat/linux/linux_futex.c Sat May 31 05:59:55 2014 (r266918) @@ -680,12 +680,12 @@ futex_atomic_op(struct thread *td, int e int linux_sys_futex(struct thread *td, struct linux_sys_futex_args *args) { - int clockrt, nrwake, op_ret, ret, val; + int clockrt, nrwake, op_ret, ret; struct linux_emuldata *em; struct waiting_proc *wp; struct futex *f, *f2; int error; - uint32_t flags; + uint32_t flags, val; LIN_SDT_PROBE2(futex, linux_sys_futex, entry, td, args); @@ -722,7 +722,7 @@ linux_sys_futex(struct thread *td, struc case LINUX_FUTEX_WAIT_BITSET: LIN_SDT_PROBE3(futex, linux_sys_futex, debug_wait, args->uaddr, args->val, args->val3); - LINUX_CTR3(sys_futex, "WAIT uaddr %p val %d val3 %d", + LINUX_CTR3(sys_futex, "WAIT uaddr %p val 0x%x bitset 0x%x", args->uaddr, args->val, args->val3); error = futex_get(args->uaddr, &wp, &f, @@ -747,9 +747,9 @@ linux_sys_futex(struct thread *td, struc LIN_SDT_PROBE4(futex, linux_sys_futex, debug_wait_value_neq, args->uaddr, args->val, val, args->val3); - LINUX_CTR4(sys_futex, - "WAIT uaddr %p val %d != uval %d val3 %d", - args->uaddr, args->val, val, args->val3); + LINUX_CTR3(sys_futex, + "WAIT uaddr %p val 0x%x != uval 0x%x", + args->uaddr, args->val, val); futex_put(f, wp); LIN_SDT_PROBE1(futex, linux_sys_futex, return, @@ -767,7 +767,7 @@ linux_sys_futex(struct thread *td, struc case LINUX_FUTEX_WAKE_BITSET: LIN_SDT_PROBE3(futex, linux_sys_futex, debug_wake, args->uaddr, args->val, args->val3); - LINUX_CTR3(sys_futex, "WAKE uaddr %p val % d val3 %d", + LINUX_CTR3(sys_futex, "WAKE uaddr %p nrwake 0x%x bitset 0x%x", args->uaddr, args->val, args->val3); error = futex_get(args->uaddr, NULL, &f, @@ -792,9 +792,9 @@ linux_sys_futex(struct thread *td, struc args->uaddr, args->val, args->val3, args->uaddr2, args->timeout); LINUX_CTR5(sys_futex, "CMP_REQUEUE uaddr %p " - "val %d val3 %d uaddr2 %p val2 %d", + "nrwake 0x%x uval 0x%x uaddr2 %p nrequeue 0x%x", args->uaddr, args->val, args->val3, args->uaddr2, - (int)(unsigned long)args->timeout); + args->timeout); /* * Linux allows this, we would not, it is an incorrect @@ -843,7 +843,7 @@ linux_sys_futex(struct thread *td, struc if (val != args->val3) { LIN_SDT_PROBE2(futex, linux_sys_futex, debug_cmp_requeue_value_neq, args->val, val); - LINUX_CTR2(sys_futex, "CMP_REQUEUE val %d != uval %d", + LINUX_CTR2(sys_futex, "CMP_REQUEUE val 0x%x != uval 0x%x", args->val, val); futex_put(f2, NULL); futex_put(f, NULL); @@ -862,9 +862,9 @@ linux_sys_futex(struct thread *td, struc LIN_SDT_PROBE5(futex, linux_sys_futex, debug_wake_op, args->uaddr, args->op, args->val, args->uaddr2, args->val3); LINUX_CTR5(sys_futex, "WAKE_OP " - "uaddr %p op %d val %x uaddr2 %p val3 %x", - args->uaddr, args->op, args->val, - args->uaddr2, args->val3); + "uaddr %p nrwake 0x%x uaddr2 %p op 0x%x nrwake2 0x%x", + args->uaddr, args->val, args->uaddr2, args->val3, + args->timeout); error = futex_get(args->uaddr, NULL, &f, flags); if (error) { @@ -887,6 +887,9 @@ linux_sys_futex(struct thread *td, struc */ op_ret = futex_atomic_op(td, args->val3, args->uaddr2); + LINUX_CTR2(sys_futex, "WAKE_OP atomic_op uaddr %p ret 0x%x", + args->uaddr, op_ret); + if (op_ret < 0) { /* XXX: We don't handle the EFAULT yet. */ if (op_ret != -EFAULT) { From owner-svn-src-stable@FreeBSD.ORG Sat May 31 11:08:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5511CA75; Sat, 31 May 2014 11:08:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3573A2EED; Sat, 31 May 2014 11:08:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4VB8OEw055986; Sat, 31 May 2014 11:08:24 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4VB8MTZ055975; Sat, 31 May 2014 11:08:22 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201405311108.s4VB8MTZ055975@svn.freebsd.org> From: Christian Brueffer Date: Sat, 31 May 2014 11:08:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266921 - in stable/10/sys/dev: firewire my nfe siba sis sk tx usb/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 May 2014 11:08:24 -0000 Author: brueffer Date: Sat May 31 11:08:22 2014 New Revision: 266921 URL: http://svnweb.freebsd.org/changeset/base/266921 Log: MFC: r266270 Remove some unused variables. Modified: stable/10/sys/dev/firewire/sbp.c stable/10/sys/dev/my/if_my.c stable/10/sys/dev/nfe/if_nfe.c stable/10/sys/dev/siba/siba_core.c stable/10/sys/dev/sis/if_sis.c stable/10/sys/dev/sk/if_sk.c stable/10/sys/dev/tx/if_tx.c stable/10/sys/dev/usb/net/if_axge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/firewire/sbp.c ============================================================================== --- stable/10/sys/dev/firewire/sbp.c Sat May 31 11:07:30 2014 (r266920) +++ stable/10/sys/dev/firewire/sbp.c Sat May 31 11:08:22 2014 (r266921) @@ -2745,7 +2745,6 @@ sbp_dequeue_ocb(struct sbp_dev *sdev, st struct sbp_ocb *ocb; struct sbp_ocb *next; int s = splfw(), order = 0; - int flags; SBP_DEBUG(1) device_printf(sdev->target->sbp->fd.dev, @@ -2759,7 +2758,6 @@ END_DEBUG SBP_LOCK(sdev->target->sbp); for (ocb = STAILQ_FIRST(&sdev->ocbs); ocb != NULL; ocb = next) { next = STAILQ_NEXT(ocb, ocb); - flags = ocb->flags; if (OCB_MATCH(ocb, sbp_status)) { /* found */ STAILQ_REMOVE(&sdev->ocbs, ocb, sbp_ocb, ocb); Modified: stable/10/sys/dev/my/if_my.c ============================================================================== --- stable/10/sys/dev/my/if_my.c Sat May 31 11:07:30 2014 (r266920) +++ stable/10/sys/dev/my/if_my.c Sat May 31 11:08:22 2014 (r266921) @@ -657,10 +657,8 @@ static void my_setmode_mii(struct my_softc * sc, int media) { u_int16_t bmcr; - struct ifnet *ifp; MY_LOCK_ASSERT(sc); - ifp = sc->my_ifp; /* * If an autoneg session is in progress, stop it. */ Modified: stable/10/sys/dev/nfe/if_nfe.c ============================================================================== --- stable/10/sys/dev/nfe/if_nfe.c Sat May 31 11:07:30 2014 (r266920) +++ stable/10/sys/dev/nfe/if_nfe.c Sat May 31 11:08:22 2014 (r266921) @@ -1375,15 +1375,12 @@ nfe_free_rx_ring(struct nfe_softc *sc, s { struct nfe_rx_data *data; void *desc; - int i, descsize; + int i; - if (sc->nfe_flags & NFE_40BIT_ADDR) { + if (sc->nfe_flags & NFE_40BIT_ADDR) desc = ring->desc64; - descsize = sizeof (struct nfe_desc64); - } else { + else desc = ring->desc32; - descsize = sizeof (struct nfe_desc32); - } for (i = 0; i < NFE_RX_RING_COUNT; i++) { data = &ring->data[i]; Modified: stable/10/sys/dev/siba/siba_core.c ============================================================================== --- stable/10/sys/dev/siba/siba_core.c Sat May 31 11:07:30 2014 (r266920) +++ stable/10/sys/dev/siba/siba_core.c Sat May 31 11:08:22 2014 (r266921) @@ -1739,12 +1739,10 @@ static void siba_pcicore_init(struct siba_pci *spc) { struct siba_dev_softc *sd = spc->spc_dev; - struct siba_softc *siba; if (sd == NULL) return; - siba = sd->sd_bus; if (!siba_dev_isup_sub(sd)) siba_dev_up_sub(sd, 0); Modified: stable/10/sys/dev/sis/if_sis.c ============================================================================== --- stable/10/sys/dev/sis/if_sis.c Sat May 31 11:07:30 2014 (r266920) +++ stable/10/sys/dev/sis/if_sis.c Sat May 31 11:08:22 2014 (r266921) @@ -1616,11 +1616,9 @@ sis_tick(void *xsc) { struct sis_softc *sc; struct mii_data *mii; - struct ifnet *ifp; sc = xsc; SIS_LOCK_ASSERT(sc); - ifp = sc->sis_ifp; mii = device_get_softc(sc->sis_miibus); mii_tick(mii); Modified: stable/10/sys/dev/sk/if_sk.c ============================================================================== --- stable/10/sys/dev/sk/if_sk.c Sat May 31 11:07:30 2014 (r266920) +++ stable/10/sys/dev/sk/if_sk.c Sat May 31 11:08:22 2014 (r266921) @@ -2876,13 +2876,11 @@ static void sk_txeof(sc_if) struct sk_if_softc *sc_if; { - struct sk_softc *sc; struct sk_txdesc *txd; struct sk_tx_desc *cur_tx; struct ifnet *ifp; u_int32_t idx, sk_ctl; - sc = sc_if->sk_softc; ifp = sc_if->sk_ifp; txd = STAILQ_FIRST(&sc_if->sk_cdata.sk_txbusyq); Modified: stable/10/sys/dev/tx/if_tx.c ============================================================================== --- stable/10/sys/dev/tx/if_tx.c Sat May 31 11:07:30 2014 (r266920) +++ stable/10/sys/dev/tx/if_tx.c Sat May 31 11:08:22 2014 (r266921) @@ -1150,12 +1150,10 @@ epic_ifmedia_sts(struct ifnet *ifp, stru { epic_softc_t *sc; struct mii_data *mii; - struct ifmedia *ifm; sc = ifp->if_softc; mii = device_get_softc(sc->miibus); EPIC_LOCK(sc); - ifm = &mii->mii_media; /* Nothing should be selected if interface is down. */ if ((ifp->if_flags & IFF_UP) == 0) { Modified: stable/10/sys/dev/usb/net/if_axge.c ============================================================================== --- stable/10/sys/dev/usb/net/if_axge.c Sat May 31 11:07:30 2014 (r266920) +++ stable/10/sys/dev/usb/net/if_axge.c Sat May 31 11:08:22 2014 (r266921) @@ -910,7 +910,6 @@ axge_ioctl(struct ifnet *ifp, u_long cmd static int axge_rx_frame(struct usb_ether *ue, struct usb_page_cache *pc, int actlen) { - struct axge_softc *sc; struct axge_csum_hdr csum_hdr; int error, len, pos; int pkt_cnt; @@ -918,7 +917,6 @@ axge_rx_frame(struct usb_ether *ue, stru uint16_t hdr_off; uint16_t pktlen; - sc = uether_getsc(ue); pos = 0; len = 0; error = 0; From owner-svn-src-stable@FreeBSD.ORG Sun Jun 1 18:41:34 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C2EE222; Sun, 1 Jun 2014 18:41:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1EA7D2587; Sun, 1 Jun 2014 18:41:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s51IfX5o014660; Sun, 1 Jun 2014 18:41:33 GMT (envelope-from bjk@svn.freebsd.org) Received: (from bjk@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s51IfXFR014659; Sun, 1 Jun 2014 18:41:33 GMT (envelope-from bjk@svn.freebsd.org) Message-Id: <201406011841.s51IfXFR014659@svn.freebsd.org> From: Benjamin Kaduk Date: Sun, 1 Jun 2014 18:41:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266952 - stable/10/lib/libc/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jun 2014 18:41:34 -0000 Author: bjk (doc committer) Date: Sun Jun 1 18:41:33 2014 New Revision: 266952 URL: http://svnweb.freebsd.org/changeset/base/266952 Log: MFC r266285,266866: ------------------------------------------------------------------------ r266285 | bjk | 2014-05-16 23:05:52 -0400 (Fri, 16 May 2014) | 9 lines Correct documentation of the limit on how much memory can be mlock()ed vm.max_wired is a system-wide limit, not per-process. Reword the section to make this more clear. PR: docs/189214 Submitted by: Lawrence Chen (original text) Approved by: hrs (mentor) ------------------------------------------------------------------------ r266866 | bjk | 2014-05-29 22:16:28 -0400 (Thu, 29 May 2014) | 5 lines Minor mdoc fix Submitted by: hrs Approved by: hrs (mentor, implicit) ------------------------------------------------------------------------ PR: docs/189214 Approved by: hrs (mentor) Modified: stable/10/lib/libc/sys/mlock.2 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/mlock.2 ============================================================================== --- stable/10/lib/libc/sys/mlock.2 Sun Jun 1 18:16:01 2014 (r266951) +++ stable/10/lib/libc/sys/mlock.2 Sun Jun 1 18:41:33 2014 (r266952) @@ -28,7 +28,7 @@ .\" @(#)mlock.2 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd March 18, 2013 +.Dd May 17, 2014 .Dt MLOCK 2 .Os .Sh NAME @@ -91,14 +91,21 @@ Locked mappings are not inherited by the .Pp Since physical memory is a potentially scarce resource, processes are limited in how much they can lock down. -A single process can +The amount of memory that a single process can .Fn mlock -the minimum of -a system-wide ``wired pages'' limit +is limited by both the per-process +.Dv RLIMIT_MEMLOCK +resource limit and the +system-wide +.Dq wired pages +limit +.Va vm.max_wired . .Va vm.max_wired -and the per-process -.Li RLIMIT_MEMLOCK -resource limit. +applies to the system as a whole, so the amount available to a single +process at any given time is the difference between +.Va vm.max_wired +and +.Va vm.stats.vm.v_wire_count . .Pp If .Va security.bsd.unprivileged_mlock From owner-svn-src-stable@FreeBSD.ORG Sun Jun 1 18:52:22 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A4889E8; Sun, 1 Jun 2014 18:52:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 566E4266A; Sun, 1 Jun 2014 18:52:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s51IqMTL019367; Sun, 1 Jun 2014 18:52:22 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s51IqMif019366; Sun, 1 Jun 2014 18:52:22 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201406011852.s51IqMif019366@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 1 Jun 2014 18:52:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266953 - stable/10/usr.sbin/mergemaster X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jun 2014 18:52:22 -0000 Author: jilles Date: Sun Jun 1 18:52:21 2014 New Revision: 266953 URL: http://svnweb.freebsd.org/changeset/base/266953 Log: MFC r264480: mergemaster: Avoid "/var/tmp/temproot disappeared" if there is nothing to compare. Because of the change to find in SVN r253886, the entire temproot would be deleted if it became empty, leading to a confusing message "*** FATAL ERROR: The temproot directory ${TEMPROOT} has disappeared!" Note that mergemaster does not do anything useful in this situation anyway (e.g. put IGNORE_FILES="/etc/group /etc/master.passwd" in /etc/mergemaster.rc and run mergemaster -p). As noted in that commit, add -mindepth 1. PR: bin/188485 Submitted by: David Boyd Modified: stable/10/usr.sbin/mergemaster/mergemaster.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/10/usr.sbin/mergemaster/mergemaster.sh Sun Jun 1 18:41:33 2014 (r266952) +++ stable/10/usr.sbin/mergemaster/mergemaster.sh Sun Jun 1 18:52:21 2014 (r266953) @@ -708,7 +708,7 @@ case "${RERUN}" in # and to make the actual comparison faster. find ${TEMPROOT}/usr -type l -delete 2>/dev/null find ${TEMPROOT} -type f -size 0 -delete 2>/dev/null - find -d ${TEMPROOT} -type d -empty -delete 2>/dev/null + find -d ${TEMPROOT} -type d -empty -mindepth 1 -delete 2>/dev/null # Build the mtree database in a temporary location. case "${PRE_WORLD}" in From owner-svn-src-stable@FreeBSD.ORG Mon Jun 2 05:01:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EFB23263; Mon, 2 Jun 2014 05:01:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC3932829; Mon, 2 Jun 2014 05:01:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s52518xR090037; Mon, 2 Jun 2014 05:01:08 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s52518J6090036; Mon, 2 Jun 2014 05:01:08 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201406020501.s52518J6090036@svn.freebsd.org> From: Navdeep Parhar Date: Mon, 2 Jun 2014 05:01:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266965 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jun 2014 05:01:09 -0000 Author: np Date: Mon Jun 2 05:01:08 2014 New Revision: 266965 URL: http://svnweb.freebsd.org/changeset/base/266965 Log: MFC r266908: cxgbe(4): Fix a NULL dereference when the very first call to get_scatter_segment() in get_fl_payload() fails. While here, fix the code to adjust fl_bufs_used when a failure occurs for any other scatter segment. Modified: stable/10/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_sge.c Mon Jun 2 03:27:33 2014 (r266964) +++ stable/10/sys/dev/cxgbe/t4_sge.c Mon Jun 2 05:01:08 2014 (r266965) @@ -1565,6 +1565,7 @@ get_fl_payload(struct adapter *sc, struc nbuf = 0; len = G_RSPD_LEN(len_newbuf); if (__predict_false(fl->m0 != NULL)) { + M_ASSERTPKTHDR(fl->m0); MPASS(len == fl->m0->m_pkthdr.len); MPASS(fl->remaining < len); @@ -1588,6 +1589,8 @@ get_fl_payload(struct adapter *sc, struc */ m0 = get_scatter_segment(sc, fl, len, M_PKTHDR); + if (m0 == NULL) + goto done; len -= m0->m_len; pnext = &m0->m_next; while (len > 0) { @@ -1599,7 +1602,8 @@ get_segment: fl->m0 = m0; fl->pnext = pnext; fl->remaining = len; - return (NULL); + m0 = NULL; + goto done; } *pnext = m; pnext = &m->m_next; @@ -1608,7 +1612,7 @@ get_segment: *pnext = NULL; if (fl->rx_offset == 0) nbuf++; - +done: (*fl_bufs_used) += nbuf; return (m0); } From owner-svn-src-stable@FreeBSD.ORG Mon Jun 2 10:14:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C2ECCD81; Mon, 2 Jun 2014 10:14:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF56A2171; Mon, 2 Jun 2014 10:14:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s52AE3Rx033481; Mon, 2 Jun 2014 10:14:03 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s52AE3DY033480; Mon, 2 Jun 2014 10:14:03 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201406021014.s52AE3DY033480@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 2 Jun 2014 10:14:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266970 - stable/10/sys/geom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jun 2014 10:14:03 -0000 Author: ae Date: Mon Jun 2 10:14:03 2014 New Revision: 266970 URL: http://svnweb.freebsd.org/changeset/base/266970 Log: MFC r266444: We have two functions from where a geom orphan method could be called: g_orphan_register and g_resize_provider_event. Both are called from the event queue. Also we have GEOM_DEV class, which does deferred destroy for its consumers via g_dev_destroy (also called from the event queue). So it is possible, that for some consumers an orphan method will be called twice. This triggers panic in g_dev_orphan. Check that consumer isn't already orphaned before call orphan method. Modified: stable/10/sys/geom/geom_event.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/geom_event.c ============================================================================== --- stable/10/sys/geom/geom_event.c Mon Jun 2 07:08:34 2014 (r266969) +++ stable/10/sys/geom/geom_event.c Mon Jun 2 10:14:03 2014 (r266970) @@ -206,6 +206,14 @@ g_orphan_register(struct g_provider *pp) KASSERT(cp->geom->orphan != NULL, ("geom %s has no orphan, class %s", cp->geom->name, cp->geom->class->name)); + /* + * XXX: g_dev_orphan method does deferred destroying + * and it is possible, that other event could already + * call the orphan method. Check consumer's flags to + * do not schedule it twice. + */ + if (cp->flags & G_CF_ORPHAN) + continue; cp->flags |= G_CF_ORPHAN; cp->geom->orphan(cp); } From owner-svn-src-stable@FreeBSD.ORG Mon Jun 2 13:07:28 2014 Return-Path: Delivered-To: svn-src-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA2827E3; Mon, 2 Jun 2014 13:07:28 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD39C22EF; Mon, 2 Jun 2014 13:07:28 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1WrRxR-000Orv-Eg; Mon, 02 Jun 2014 13:07:21 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id s52D7InY001135; Mon, 2 Jun 2014 07:07:18 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18yAVbJVIROk9JN3uJf/yu3 Subject: Re: svn commit: r266970 - stable/10/sys/geom From: Ian Lepore To: "Andrey V. Elsukov" In-Reply-To: <201406021014.s52AE3DY033480@svn.freebsd.org> References: <201406021014.s52AE3DY033480@svn.freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Mon, 02 Jun 2014 07:07:18 -0600 Message-ID: <1401714438.20883.83.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-10@FreeBSD.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jun 2014 13:07:29 -0000 On Mon, 2014-06-02 at 10:14 +0000, Andrey V. Elsukov wrote: > Author: ae > Date: Mon Jun 2 10:14:03 2014 > New Revision: 266970 > URL: http://svnweb.freebsd.org/changeset/base/266970 > > Log: > MFC r266444: > We have two functions from where a geom orphan method could be called: > g_orphan_register and g_resize_provider_event. Both are called from the > event queue. Also we have GEOM_DEV class, which does deferred destroy > for its consumers via g_dev_destroy (also called from the event queue). > So it is possible, that for some consumers an orphan method will be > called twice. This triggers panic in g_dev_orphan. > Check that consumer isn't already orphaned before call orphan method. > > Modified: > stable/10/sys/geom/geom_event.c > Directory Properties: > stable/10/ (props changed) > > Modified: stable/10/sys/geom/geom_event.c > ============================================================================== > --- stable/10/sys/geom/geom_event.c Mon Jun 2 07:08:34 2014 (r266969) > +++ stable/10/sys/geom/geom_event.c Mon Jun 2 10:14:03 2014 (r266970) > @@ -206,6 +206,14 @@ g_orphan_register(struct g_provider *pp) > KASSERT(cp->geom->orphan != NULL, > ("geom %s has no orphan, class %s", > cp->geom->name, cp->geom->class->name)); > + /* > + * XXX: g_dev_orphan method does deferred destroying > + * and it is possible, that other event could already > + * call the orphan method. Check consumer's flags to > + * do not schedule it twice. > + */ > + if (cp->flags & G_CF_ORPHAN) > + continue; > cp->flags |= G_CF_ORPHAN; > cp->geom->orphan(cp); > } > Why is this comment flagged with XXX? Doesn't that generally mean that more action or further analysis in the future is required? Nothing about the comment itself indicates that there's more work to do. -- Ian From owner-svn-src-stable@FreeBSD.ORG Mon Jun 2 13:23:46 2014 Return-Path: Delivered-To: svn-src-stable@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [8.8.178.116]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8A7FD76; Mon, 2 Jun 2014 13:23:46 +0000 (UTC) Received: from butcher-nb.yandex.net (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) by mx2.freebsd.org (Postfix) with ESMTP id 3821F2E83; Mon, 2 Jun 2014 13:23:44 +0000 (UTC) Message-ID: <538C7AC3.7030405@FreeBSD.org> Date: Mon, 02 Jun 2014 17:23:15 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Ian Lepore Subject: Re: svn commit: r266970 - stable/10/sys/geom References: <201406021014.s52AE3DY033480@svn.freebsd.org> <1401714438.20883.83.camel@revolution.hippie.lan> In-Reply-To: <1401714438.20883.83.camel@revolution.hippie.lan> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-10@FreeBSD.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jun 2014 13:23:46 -0000 On 02.06.2014 17:07, Ian Lepore wrote: >> ============================================================================== >> --- stable/10/sys/geom/geom_event.c Mon Jun 2 07:08:34 2014 (r266969) >> +++ stable/10/sys/geom/geom_event.c Mon Jun 2 10:14:03 2014 (r266970) >> @@ -206,6 +206,14 @@ g_orphan_register(struct g_provider *pp) >> KASSERT(cp->geom->orphan != NULL, >> ("geom %s has no orphan, class %s", >> cp->geom->name, cp->geom->class->name)); >> + /* >> + * XXX: g_dev_orphan method does deferred destroying >> + * and it is possible, that other event could already >> + * call the orphan method. Check consumer's flags to >> + * do not schedule it twice. >> + */ >> + if (cp->flags & G_CF_ORPHAN) >> + continue; >> cp->flags |= G_CF_ORPHAN; >> cp->geom->orphan(cp); >> } >> > > Why is this comment flagged with XXX? Doesn't that generally mean that > more action or further analysis in the future is required? Nothing > about the comment itself indicates that there's more work to do. I suspect that there are some another places, where similar problem can occurs. It needs more attention. I just did fix for the easy reproducible panic. -- WBR, Andrey V. Elsukov From owner-svn-src-stable@FreeBSD.ORG Mon Jun 2 17:34:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 86CCC888; Mon, 2 Jun 2014 17:34:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74EF4201C; Mon, 2 Jun 2014 17:34:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s52HY9VJ030837; Mon, 2 Jun 2014 17:34:09 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s52HY9fX030836; Mon, 2 Jun 2014 17:34:09 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201406021734.s52HY9fX030836@svn.freebsd.org> From: Navdeep Parhar Date: Mon, 2 Jun 2014 17:34:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266973 - stable/9/sys/dev/cxgbe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jun 2014 17:34:09 -0000 Author: np Date: Mon Jun 2 17:34:08 2014 New Revision: 266973 URL: http://svnweb.freebsd.org/changeset/base/266973 Log: MFC r266908: cxgbe(4): Fix a NULL dereference when the very first call to get_scatter_segment() in get_fl_payload() fails. While here, fix the code to adjust fl_bufs_used when a failure occurs for any other scatter segment. Approved by: re (glebius) Modified: stable/9/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_sge.c Mon Jun 2 15:05:25 2014 (r266972) +++ stable/9/sys/dev/cxgbe/t4_sge.c Mon Jun 2 17:34:08 2014 (r266973) @@ -1536,6 +1536,7 @@ get_fl_payload(struct adapter *sc, struc nbuf = 0; len = G_RSPD_LEN(len_newbuf); if (__predict_false(fl->m0 != NULL)) { + M_ASSERTPKTHDR(fl->m0); MPASS(len == fl->m0->m_pkthdr.len); MPASS(fl->remaining < len); @@ -1559,6 +1560,8 @@ get_fl_payload(struct adapter *sc, struc */ m0 = get_scatter_segment(sc, fl, len, M_PKTHDR); + if (m0 == NULL) + goto done; len -= m0->m_len; pnext = &m0->m_next; while (len > 0) { @@ -1570,7 +1573,8 @@ get_segment: fl->m0 = m0; fl->pnext = pnext; fl->remaining = len; - return (NULL); + m0 = NULL; + goto done; } *pnext = m; pnext = &m->m_next; @@ -1579,7 +1583,7 @@ get_segment: *pnext = NULL; if (fl->rx_offset == 0) nbuf++; - +done: (*fl_bufs_used) += nbuf; return (m0); } From owner-svn-src-stable@FreeBSD.ORG Mon Jun 2 19:28:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 182D5169; Mon, 2 Jun 2014 19:28:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 048C82B27; Mon, 2 Jun 2014 19:28:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s52JSB3Z081036; Mon, 2 Jun 2014 19:28:11 GMT (envelope-from dchagin@svn.freebsd.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s52JSBHG081035; Mon, 2 Jun 2014 19:28:11 GMT (envelope-from dchagin@svn.freebsd.org) Message-Id: <201406021928.s52JSBHG081035@svn.freebsd.org> From: Dmitry Chagin Date: Mon, 2 Jun 2014 19:28:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266980 - stable/9/sys/compat/linux X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jun 2014 19:28:12 -0000 Author: dchagin Date: Mon Jun 2 19:28:11 2014 New Revision: 266980 URL: http://svnweb.freebsd.org/changeset/base/266980 Log: MFC r266782: In r218101 I have not changed properly the futex syscall definition. Some Linux futex ops atomically verifies that the futex address uaddr (uval) contains the value val. Comparing signed uval and unsigned val may lead to an unexpected result, mostly to a deadlock. So copyin uaddr to an unsigned int to compare the parameters correctly. While here change ktr records to print parameters in more readable format. Approved by: re (glebius) Modified: stable/9/sys/compat/linux/linux_futex.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/compat/linux/linux_futex.c ============================================================================== --- stable/9/sys/compat/linux/linux_futex.c Mon Jun 2 18:54:45 2014 (r266979) +++ stable/9/sys/compat/linux/linux_futex.c Mon Jun 2 19:28:11 2014 (r266980) @@ -680,12 +680,12 @@ futex_atomic_op(struct thread *td, int e int linux_sys_futex(struct thread *td, struct linux_sys_futex_args *args) { - int clockrt, nrwake, op_ret, ret, val; + int clockrt, nrwake, op_ret, ret; struct linux_emuldata *em; struct waiting_proc *wp; struct futex *f, *f2; int error; - uint32_t flags; + uint32_t flags, val; LIN_SDT_PROBE2(futex, linux_sys_futex, entry, td, args); @@ -722,7 +722,7 @@ linux_sys_futex(struct thread *td, struc case LINUX_FUTEX_WAIT_BITSET: LIN_SDT_PROBE3(futex, linux_sys_futex, debug_wait, args->uaddr, args->val, args->val3); - LINUX_CTR3(sys_futex, "WAIT uaddr %p val %d val3 %d", + LINUX_CTR3(sys_futex, "WAIT uaddr %p val 0x%x bitset 0x%x", args->uaddr, args->val, args->val3); error = futex_get(args->uaddr, &wp, &f, @@ -747,9 +747,9 @@ linux_sys_futex(struct thread *td, struc LIN_SDT_PROBE4(futex, linux_sys_futex, debug_wait_value_neq, args->uaddr, args->val, val, args->val3); - LINUX_CTR4(sys_futex, - "WAIT uaddr %p val %d != uval %d val3 %d", - args->uaddr, args->val, val, args->val3); + LINUX_CTR3(sys_futex, + "WAIT uaddr %p val 0x%x != uval 0x%x", + args->uaddr, args->val, val); futex_put(f, wp); LIN_SDT_PROBE1(futex, linux_sys_futex, return, @@ -767,7 +767,7 @@ linux_sys_futex(struct thread *td, struc case LINUX_FUTEX_WAKE_BITSET: LIN_SDT_PROBE3(futex, linux_sys_futex, debug_wake, args->uaddr, args->val, args->val3); - LINUX_CTR3(sys_futex, "WAKE uaddr %p val % d val3 %d", + LINUX_CTR3(sys_futex, "WAKE uaddr %p nrwake 0x%x bitset 0x%x", args->uaddr, args->val, args->val3); error = futex_get(args->uaddr, NULL, &f, @@ -792,9 +792,9 @@ linux_sys_futex(struct thread *td, struc args->uaddr, args->val, args->val3, args->uaddr2, args->timeout); LINUX_CTR5(sys_futex, "CMP_REQUEUE uaddr %p " - "val %d val3 %d uaddr2 %p val2 %d", + "nrwake 0x%x uval 0x%x uaddr2 %p nrequeue 0x%x", args->uaddr, args->val, args->val3, args->uaddr2, - (int)(unsigned long)args->timeout); + args->timeout); /* * Linux allows this, we would not, it is an incorrect @@ -843,7 +843,7 @@ linux_sys_futex(struct thread *td, struc if (val != args->val3) { LIN_SDT_PROBE2(futex, linux_sys_futex, debug_cmp_requeue_value_neq, args->val, val); - LINUX_CTR2(sys_futex, "CMP_REQUEUE val %d != uval %d", + LINUX_CTR2(sys_futex, "CMP_REQUEUE val 0x%x != uval 0x%x", args->val, val); futex_put(f2, NULL); futex_put(f, NULL); @@ -862,9 +862,9 @@ linux_sys_futex(struct thread *td, struc LIN_SDT_PROBE5(futex, linux_sys_futex, debug_wake_op, args->uaddr, args->op, args->val, args->uaddr2, args->val3); LINUX_CTR5(sys_futex, "WAKE_OP " - "uaddr %p op %d val %x uaddr2 %p val3 %x", - args->uaddr, args->op, args->val, - args->uaddr2, args->val3); + "uaddr %p nrwake 0x%x uaddr2 %p op 0x%x nrwake2 0x%x", + args->uaddr, args->val, args->uaddr2, args->val3, + args->timeout); error = futex_get(args->uaddr, NULL, &f, flags); if (error) { @@ -887,6 +887,9 @@ linux_sys_futex(struct thread *td, struc */ op_ret = futex_atomic_op(td, args->val3, args->uaddr2); + LINUX_CTR2(sys_futex, "WAKE_OP atomic_op uaddr %p ret 0x%x", + args->uaddr, op_ret); + if (op_ret < 0) { /* XXX: We don't handle the EFAULT yet. */ if (op_ret != -EFAULT) { From owner-svn-src-stable@FreeBSD.ORG Mon Jun 2 20:23:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8C988462; Mon, 2 Jun 2014 20:23:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60EA120CE; Mon, 2 Jun 2014 20:23:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s52KNg12007184; Mon, 2 Jun 2014 20:23:42 GMT (envelope-from bjk@svn.freebsd.org) Received: (from bjk@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s52KNg87007183; Mon, 2 Jun 2014 20:23:42 GMT (envelope-from bjk@svn.freebsd.org) Message-Id: <201406022023.s52KNg87007183@svn.freebsd.org> From: Benjamin Kaduk Date: Mon, 2 Jun 2014 20:23:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266982 - stable/9/lib/libc/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jun 2014 20:23:42 -0000 Author: bjk (doc committer) Date: Mon Jun 2 20:23:41 2014 New Revision: 266982 URL: http://svnweb.freebsd.org/changeset/base/266982 Log: MFC r266285,266866: ------------------------------------------------------------------------ r266285 | bjk | 2014-05-16 23:05:52 -0400 (Fri, 16 May 2014) | 9 lines Correct documentation of the limit on how much memory can be mlock()ed vm.max_wired is a system-wide limit, not per-process. Reword the section to make this more clear. PR: docs/189214 Submitted by: Lawrence Chen (original text) Approved by: hrs (mentor) ------------------------------------------------------------------------ r266866 | bjk | 2014-05-29 22:16:28 -0400 (Thu, 29 May 2014) | 5 lines Minor mdoc fix Submitted by: hrs Approved by: hrs (mentor, implicit) ------------------------------------------------------------------------ PR: 189214 Approved by: re (gjb), hrs (mentor) Modified: stable/9/lib/libc/sys/mlock.2 Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) Modified: stable/9/lib/libc/sys/mlock.2 ============================================================================== --- stable/9/lib/libc/sys/mlock.2 Mon Jun 2 19:53:53 2014 (r266981) +++ stable/9/lib/libc/sys/mlock.2 Mon Jun 2 20:23:41 2014 (r266982) @@ -28,7 +28,7 @@ .\" @(#)mlock.2 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd March 18, 2013 +.Dd May 17, 2014 .Dt MLOCK 2 .Os .Sh NAME @@ -91,14 +91,21 @@ Locked mappings are not inherited by the .Pp Since physical memory is a potentially scarce resource, processes are limited in how much they can lock down. -A single process can +The amount of memory that a single process can .Fn mlock -the minimum of -a system-wide ``wired pages'' limit +is limited by both the per-process +.Dv RLIMIT_MEMLOCK +resource limit and the +system-wide +.Dq wired pages +limit +.Va vm.max_wired . .Va vm.max_wired -and the per-process -.Li RLIMIT_MEMLOCK -resource limit. +applies to the system as a whole, so the amount available to a single +process at any given time is the difference between +.Va vm.max_wired +and +.Va vm.stats.vm.v_wire_count . .Pp If .Va security.bsd.unprivileged_mlock From owner-svn-src-stable@FreeBSD.ORG Tue Jun 3 01:39:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CC5A348A; Tue, 3 Jun 2014 01:39:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B88952AA5; Tue, 3 Jun 2014 01:39:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s531dugU048269; Tue, 3 Jun 2014 01:39:56 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s531duHV048265; Tue, 3 Jun 2014 01:39:56 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201406030139.s531duHV048265@svn.freebsd.org> From: Kevin Lo Date: Tue, 3 Jun 2014 01:39:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266991 - in stable/10/sys/dev/usb: . net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jun 2014 01:39:57 -0000 Author: kevlo Date: Tue Jun 3 01:39:55 2014 New Revision: 266991 URL: http://svnweb.freebsd.org/changeset/base/266991 Log: MFC r266490, r266738: - Configure Rx bulk - Announce flow control capability to PHY drivers - Improve performance by fixing incorrect Rx/Tx handling - Rename definition of AXGE_* to reflect reality - Add new USB IDs Modified: stable/10/sys/dev/usb/net/if_axge.c stable/10/sys/dev/usb/net/if_axgereg.h stable/10/sys/dev/usb/usbdevs Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/net/if_axge.c ============================================================================== --- stable/10/sys/dev/usb/net/if_axge.c Tue Jun 3 01:30:32 2014 (r266990) +++ stable/10/sys/dev/usb/net/if_axge.c Tue Jun 3 01:39:55 2014 (r266991) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Kevin Lo + * Copyright (c) 2013-2014 Kevin Lo * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -66,17 +66,22 @@ static const STRUCT_USB_HOST_ID axge_dev #define AXGE_DEV(v,p) { USB_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p) } AXGE_DEV(ASIX, AX88178A), AXGE_DEV(ASIX, AX88179), - /* AXGE_DEV(SITECOMEU, LN032), */ + AXGE_DEV(DLINK, DUB1312), + AXGE_DEV(SITECOMEU, LN032), #undef AXGE_DEV }; static const struct { - unsigned char ctrl, timer_l, timer_h, size, ifg; -} AX88179_BULKIN_SIZE[] = { - {7, 0x4f, 0, 0x12, 0xff}, - {7, 0x20, 3, 0x16, 0xff}, - {7, 0xae, 7, 0x18, 0xff}, - {7, 0xcc, 0x4c, 0x18, 8}, + uint8_t ctrl; + uint8_t timer_l; + uint8_t timer_h; + uint8_t size; + uint8_t ifg; +} axge_bulk_size[] = { + { 7, 0x4f, 0x00, 0x12, 0xff }, + { 7, 0x20, 0x03, 0x16, 0xff }, + { 7, 0xae, 0x07, 0x18, 0xff }, + { 7, 0xcc, 0x4c, 0x18, 0x08 } }; /* prototypes */ @@ -104,10 +109,11 @@ static int axge_read_mem(struct axge_sof uint16_t, void *, int); static void axge_write_mem(struct axge_softc *, uint8_t, uint16_t, uint16_t, void *, int); +static uint8_t axge_read_cmd_1(struct axge_softc *, uint8_t, uint16_t); static uint16_t axge_read_cmd_2(struct axge_softc *, uint8_t, uint16_t, uint16_t); static void axge_write_cmd_1(struct axge_softc *, uint8_t, uint16_t, - uint16_t, uint8_t); + uint8_t); static void axge_write_cmd_2(struct axge_softc *, uint8_t, uint16_t, uint16_t, uint16_t); static void axge_chip_init(struct axge_softc *); @@ -119,7 +125,7 @@ static void axge_ifmedia_sts(struct ifne static int axge_ioctl(struct ifnet *, u_long, caddr_t); static int axge_rx_frame(struct usb_ether *, struct usb_page_cache *, int); static int axge_rxeof(struct usb_ether *, struct usb_page_cache *, - unsigned int, unsigned int, struct axge_csum_hdr *); + unsigned int, unsigned int, uint32_t); static void axge_csum_cfg(struct usb_ether *); #define AXGE_CSUM_FEATURES (CSUM_IP | CSUM_TCP | CSUM_UDP) @@ -138,7 +144,7 @@ static const struct usb_config axge_conf .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, .frames = 16, - .bufsize = 16 * (MCLBYTES + 16), + .bufsize = 16 * MCLBYTES, .flags = {.pipe_bof = 1,.force_short_xfer = 1,}, .callback = axge_bulk_write_callback, .timeout = 10000, /* 10 seconds */ @@ -233,6 +239,15 @@ axge_write_mem(struct axge_softc *sc, ui } } +static uint8_t +axge_read_cmd_1(struct axge_softc *sc, uint8_t cmd, uint16_t reg) +{ + uint8_t val; + + axge_read_mem(sc, cmd, 1, reg, &val, 1); + return (val); +} + static uint16_t axge_read_cmd_2(struct axge_softc *sc, uint8_t cmd, uint16_t index, uint16_t reg) @@ -244,10 +259,9 @@ axge_read_cmd_2(struct axge_softc *sc, u } static void -axge_write_cmd_1(struct axge_softc *sc, uint8_t cmd, uint16_t index, - uint16_t reg, uint8_t val) +axge_write_cmd_1(struct axge_softc *sc, uint8_t cmd, uint16_t reg, uint8_t val) { - axge_write_mem(sc, cmd, index, reg, &val, 1); + axge_write_mem(sc, cmd, 1, reg, &val, 1); } static void @@ -307,6 +321,7 @@ axge_miibus_statchg(device_t dev) struct axge_softc *sc; struct mii_data *mii; struct ifnet *ifp; + uint8_t link_status, tmp[5]; uint16_t val; int locked; @@ -339,26 +354,41 @@ axge_miibus_statchg(device_t dev) if ((sc->sc_flags & AXGE_FLAG_LINK) == 0) goto done; + link_status = axge_read_cmd_1(sc, AXGE_ACCESS_MAC, AXGE_PLSR); + val = 0; if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) != 0) { - val |= AXGE_MEDIUM_FULL_DUPLEX; + val |= MSR_FD; if ((IFM_OPTIONS(mii->mii_media_active) & IFM_ETH_TXPAUSE) != 0) - val |= AXGE_MEDIUM_TXFLOW_CTRLEN; + val |= MSR_TFC; if ((IFM_OPTIONS(mii->mii_media_active) & IFM_ETH_RXPAUSE) != 0) - val |= AXGE_MEDIUM_RXFLOW_CTRLEN; + val |= MSR_RFC; } - val |= AXGE_MEDIUM_RECEIVE_EN | AXGE_MEDIUM_ALWAYS_ONE; + val |= MSR_RE; switch (IFM_SUBTYPE(mii->mii_media_active)) { case IFM_1000_T: - val |= AXGE_MEDIUM_GIGAMODE; + val |= MSR_GM | MSR_EN_125MHZ; + if (link_status & PLSR_USB_SS) + memcpy(tmp, &axge_bulk_size[0], 5); + else if (link_status & PLSR_USB_HS) + memcpy(tmp, &axge_bulk_size[1], 5); + else + memcpy(tmp, &axge_bulk_size[3], 5); + break; case IFM_100_TX: - val |= AXGE_MEDIUM_PS; + val |= MSR_PS; + if (link_status & (PLSR_USB_SS | PLSR_USB_HS)) + memcpy(tmp, &axge_bulk_size[2], 5); + else + memcpy(tmp, &axge_bulk_size[3], 5); + break; case IFM_10_T: - /* Doesn't need to be handled. */ + memcpy(tmp, &axge_bulk_size[3], 5); break; } - axge_write_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_MEDIUM_STATUS_MODE, val); - + /* Rx bulk configuration. */ + axge_write_mem(sc, AXGE_ACCESS_MAC, 5, AXGE_RX_BULKIN_QCTRL, tmp, 5); + axge_write_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_MSR, val); done: if (!locked) AXGE_UNLOCK(sc); @@ -368,11 +398,10 @@ static void axge_chip_init(struct axge_softc *sc) { /* Power up ethernet PHY. */ - axge_write_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_PHYPWR_RSTCTL, 0); - axge_write_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_PHYPWR_RSTCTL, - AXGE_PHYPWR_RSTCTL_IPRL); + axge_write_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_EPPRCR, 0); + axge_write_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_EPPRCR, EPPRCR_IPRL); uether_pause(&sc->sc_ue, hz / 4); - axge_write_cmd_1(sc, AXGE_ACCESS_MAC, 1, AXGE_CLK_SELECT, + axge_write_cmd_1(sc, AXGE_ACCESS_MAC, AXGE_CLK_SELECT, AXGE_CLK_SELECT_ACS | AXGE_CLK_SELECT_BCS); uether_pause(&sc->sc_ue, hz / 10); } @@ -401,17 +430,13 @@ static void axge_attach_post(struct usb_ether *ue) { struct axge_softc *sc; - uint8_t tmp[5]; sc = uether_getsc(ue); sc->sc_phyno = 3; /* Initialize controller and get station address. */ axge_chip_init(sc); - - memcpy(tmp, &AX88179_BULKIN_SIZE[0], 5); - axge_read_mem(sc, AXGE_ACCESS_MAC, 5, AXGE_RX_BULKIN_QCTRL, tmp, 5); - axge_read_mem(sc, AXGE_ACCESS_MAC, ETHER_ADDR_LEN, AXGE_NODE_ID, + axge_read_mem(sc, AXGE_ACCESS_MAC, ETHER_ADDR_LEN, AXGE_NIDR, ue->ue_eaddr, ETHER_ADDR_LEN); } @@ -439,7 +464,7 @@ axge_attach_post_sub(struct usb_ether *u mtx_lock(&Giant); error = mii_attach(ue->ue_dev, &ue->ue_miibus, ifp, uether_ifmedia_upd, ue->ue_methods->ue_mii_sts, - BMSR_DEFCAPMASK, sc->sc_phyno, MII_OFFSET_ANY, 0); + BMSR_DEFCAPMASK, sc->sc_phyno, MII_OFFSET_ANY, MIIF_DOPAUSE); mtx_unlock(&Giant); return (error); @@ -580,7 +605,8 @@ axge_bulk_read_callback(struct usb_xfer switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: pc = usbd_xfer_get_frame(xfer, 0); - axge_rx_frame(ue, pc, actlen); + if (axge_rx_frame(ue, pc, actlen) != 0) + goto tr_setup; /* FALLTHROUGH */ case USB_ST_SETUP: @@ -608,9 +634,7 @@ axge_bulk_write_callback(struct usb_xfer struct usb_page_cache *pc; struct mbuf *m; uint32_t txhdr; - uint32_t txhdr2; - int nframes; - int frm_len; + int nframes, pos; sc = usbd_xfer_softc(xfer); ifp = uether_getifp(&sc->sc_ue); @@ -637,26 +661,18 @@ tr_setup: break; usbd_xfer_set_frame_offset(xfer, nframes * MCLBYTES, nframes); - frm_len = 0; + pos = 0; pc = usbd_xfer_get_frame(xfer, nframes); - - txhdr = m->m_pkthdr.len; - txhdr = htole32(txhdr); + txhdr = htole32(m->m_pkthdr.len); usbd_copy_in(pc, 0, &txhdr, sizeof(txhdr)); - frm_len += sizeof(txhdr); - - txhdr2 = 0; - if ((m->m_pkthdr.len + sizeof(txhdr) + sizeof(txhdr2)) % - usbd_xfer_max_framelen(xfer) == 0) { - txhdr2 |= 0x80008000; - } - txhdr2 = htole32(txhdr2); - usbd_copy_in(pc, frm_len, &txhdr2, sizeof(txhdr2)); - frm_len += sizeof(txhdr2); - - /* Next copy in the actual packet. */ - usbd_m_copy_in(pc, frm_len, m, 0, m->m_pkthdr.len); - frm_len += m->m_pkthdr.len; + txhdr = 0; + txhdr = htole32(txhdr); + usbd_copy_in(pc, 4, &txhdr, sizeof(txhdr)); + pos += 8; + usbd_m_copy_in(pc, pos, m, 0, m->m_pkthdr.len); + pos += m->m_pkthdr.len; + if ((pos % usbd_xfer_max_framelen(xfer)) == 0) + txhdr |= 0x80008000; /* * XXX @@ -678,7 +694,7 @@ tr_setup: m_freem(m); /* Set frame length. */ - usbd_xfer_set_frame_len(xfer, nframes, frm_len); + usbd_xfer_set_frame_len(xfer, nframes, pos); } if (nframes != 0) { usbd_xfer_set_frames(xfer, nframes); @@ -733,13 +749,13 @@ axge_setmulti(struct usb_ether *ue) h = 0; AXGE_LOCK_ASSERT(sc, MA_OWNED); - rxmode = axge_read_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_RX_CTL); + rxmode = axge_read_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_RCR); if (ifp->if_flags & (IFF_ALLMULTI | IFF_PROMISC)) { - rxmode |= AXGE_RX_CTL_AMALL; - axge_write_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_RX_CTL, rxmode); + rxmode |= RCR_AMALL; + axge_write_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_RCR, rxmode); return; } - rxmode &= ~AXGE_RX_CTL_AMALL; + rxmode &= ~RCR_AMALL; if_maddr_rlock(ifp); TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { @@ -751,9 +767,8 @@ axge_setmulti(struct usb_ether *ue) } if_maddr_runlock(ifp); - axge_write_mem(sc, AXGE_ACCESS_MAC, 8, AXGE_MULTI_FILTER_ARRY, - (void *)&hashtbl, 8); - axge_write_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_RX_CTL, rxmode); + axge_write_mem(sc, AXGE_ACCESS_MAC, 8, AXGE_MFA, (void *)&hashtbl, 8); + axge_write_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_RCR, rxmode); } static void @@ -765,14 +780,14 @@ axge_setpromisc(struct usb_ether *ue) sc = uether_getsc(ue); ifp = uether_getifp(ue); - rxmode = axge_read_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_RX_CTL); + rxmode = axge_read_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_RCR); if (ifp->if_flags & IFF_PROMISC) - rxmode |= AXGE_RX_CTL_PRO; + rxmode |= RCR_PRO; else - rxmode &= ~AXGE_RX_CTL_PRO; + rxmode &= ~RCR_PRO; - axge_write_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_RX_CTL, rxmode); + axge_write_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_RCR, rxmode); axge_setmulti(ue); } @@ -811,27 +826,31 @@ axge_init(struct usb_ether *ue) axge_reset(sc); /* Set MAC address. */ - axge_write_mem(sc, AXGE_ACCESS_MAC, ETHER_ADDR_LEN, AXGE_NODE_ID, + axge_write_mem(sc, AXGE_ACCESS_MAC, ETHER_ADDR_LEN, AXGE_NIDR, IF_LLADDR(ifp), ETHER_ADDR_LEN); - axge_write_cmd_1(sc, AXGE_ACCESS_MAC, 1, AXGE_PAUSE_WATERLVL_LOW, 0x34); - axge_write_cmd_1(sc, AXGE_ACCESS_MAC, 1, AXGE_PAUSE_WATERLVL_HIGH, - 0x52); + axge_write_cmd_1(sc, AXGE_ACCESS_MAC, AXGE_PWLLR, 0x34); + axge_write_cmd_1(sc, AXGE_ACCESS_MAC, AXGE_PWLHR, 0x52); /* Configure TX/RX checksum offloading. */ axge_csum_cfg(ue); /* Configure RX settings. */ - rxmode = (AXGE_RX_CTL_IPE | AXGE_RX_CTL_AM | AXGE_RX_CTL_START); + rxmode = (RCR_AM | RCR_SO | RCR_DROP_CRCE); + if ((ifp->if_capenable & IFCAP_RXCSUM) != 0) + rxmode |= RCR_IPE; /* If we want promiscuous mode, set the allframes bit. */ if (ifp->if_flags & IFF_PROMISC) - rxmode |= AXGE_RX_CTL_PRO; + rxmode |= RCR_PRO; if (ifp->if_flags & IFF_BROADCAST) - rxmode |= AXGE_RX_CTL_AB; + rxmode |= RCR_AB; - axge_write_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_RX_CTL, rxmode); + axge_write_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_RCR, rxmode); + + axge_write_cmd_1(sc, AXGE_ACCESS_MAC, AXGE_MMSR, + MMSR_PME_TYPE | MMSR_PME_POL | MMSR_RWMP); /* Load the multicast filter. */ axge_setmulti(ue); @@ -910,38 +929,39 @@ axge_ioctl(struct ifnet *ifp, u_long cmd static int axge_rx_frame(struct usb_ether *ue, struct usb_page_cache *pc, int actlen) { - struct axge_csum_hdr csum_hdr; - int error, len, pos; + int error, pos; int pkt_cnt; - uint32_t rxhdr; + uint32_t rxhdr, pkt_hdr; uint16_t hdr_off; - uint16_t pktlen; + uint16_t len, pktlen; pos = 0; len = 0; error = 0; usbd_copy_out(pc, actlen - sizeof(rxhdr), &rxhdr, sizeof(rxhdr)); - actlen -= sizeof(rxhdr); rxhdr = le32toh(rxhdr); pkt_cnt = (uint16_t)rxhdr; hdr_off = (uint16_t)(rxhdr >> 16); - usbd_copy_out(pc, pos + hdr_off, &csum_hdr, sizeof(csum_hdr)); - csum_hdr.len = le16toh(csum_hdr.len); - csum_hdr.cstatus = le16toh(csum_hdr.cstatus); + usbd_copy_out(pc, hdr_off, &pkt_hdr, sizeof(pkt_hdr)); - while (pkt_cnt--) { - if (actlen <= sizeof(csum_hdr) + sizeof(struct ether_header)) { + while (pkt_cnt > 0) { + if ((int)(sizeof(pkt_hdr)) > actlen) { error = EINVAL; break; } - pktlen = AXGE_CSUM_RXBYTES(csum_hdr.len); - - if (pkt_cnt == 0) - /* Skip the 2-byte IP alignment header. */ - axge_rxeof(ue, pc, 2, pktlen - 2, &csum_hdr); + pkt_hdr = le32toh(pkt_hdr); + pktlen = (pkt_hdr >> 16) & 0x1fff; + if ((pkt_hdr & AXGE_RXHDR_CRC_ERR) || + (pkt_hdr & AXGE_RXHDR_DROP_ERR)) + ue->ue_ifp->if_ierrors++; + axge_rxeof(ue, pc, pos + 2, pktlen - 6, pkt_hdr); + len = (pktlen + 7) & ~7; + pos += len; + pkt_hdr++; + pkt_cnt--; } if (error != 0) @@ -951,7 +971,7 @@ axge_rx_frame(struct usb_ether *ue, stru static int axge_rxeof(struct usb_ether *ue, struct usb_page_cache *pc, - unsigned int offset, unsigned int len, struct axge_csum_hdr *csum_hdr) + unsigned int offset, unsigned int len, uint32_t pkt_hdr) { struct ifnet *ifp; struct mbuf *m; @@ -976,20 +996,15 @@ axge_rxeof(struct usb_ether *ue, struct m->m_pkthdr.rcvif = ifp; m->m_pkthdr.len = m->m_len = len; - if (csum_hdr != NULL && - csum_hdr->cstatus & AXGE_CSUM_HDR_L3_TYPE_IPV4) { - if ((csum_hdr->cstatus & (AXGE_CSUM_HDR_L4_CSUM_ERR | - AXGE_RXHDR_L4CSUM_ERR)) == 0) { - m->m_pkthdr.csum_flags |= CSUM_IP_CHECKED | - CSUM_IP_VALID; - if ((csum_hdr->cstatus & AXGE_CSUM_HDR_L4_TYPE_MASK) == - AXGE_CSUM_HDR_L4_TYPE_TCP || - (csum_hdr->cstatus & AXGE_CSUM_HDR_L4_TYPE_MASK) == - AXGE_CSUM_HDR_L4_TYPE_UDP) { - m->m_pkthdr.csum_flags |= - CSUM_DATA_VALID | CSUM_PSEUDO_HDR; - m->m_pkthdr.csum_data = 0xffff; - } + if ((pkt_hdr & (AXGE_RXHDR_L4CSUM_ERR | AXGE_RXHDR_L3CSUM_ERR)) == 0) { + m->m_pkthdr.csum_flags |= CSUM_IP_CHECKED | CSUM_IP_VALID; + if ((pkt_hdr & AXGE_RXHDR_L4_TYPE_MASK) == + AXGE_RXHDR_L4_TYPE_TCP || + (pkt_hdr & AXGE_RXHDR_L4_TYPE_MASK) == + AXGE_RXHDR_L4_TYPE_UDP) { + m->m_pkthdr.csum_flags |= CSUM_DATA_VALID | + CSUM_PSEUDO_HDR; + m->m_pkthdr.csum_data = 0xffff; } } @@ -1010,12 +1025,11 @@ axge_csum_cfg(struct usb_ether *ue) csum = 0; if ((ifp->if_capenable & IFCAP_TXCSUM) != 0) - csum |= AXGE_TXCOE_IP | AXGE_TXCOE_TCP | AXGE_TXCOE_UDP; - axge_write_cmd_1(sc, AXGE_ACCESS_MAC, 1, AXGE_TXCOE_CTL, csum); + csum |= CTCR_IP | CTCR_TCP | CTCR_UDP; + axge_write_cmd_1(sc, AXGE_ACCESS_MAC, AXGE_CTCR, csum); csum = 0; if ((ifp->if_capenable & IFCAP_RXCSUM) != 0) - csum |= AXGE_RXCOE_IP | AXGE_RXCOE_TCP | AXGE_RXCOE_UDP | - AXGE_RXCOE_ICMP | AXGE_RXCOE_IGMP; - axge_write_cmd_1(sc, AXGE_ACCESS_MAC, 1, AXGE_RXCOE_CTL, csum); + csum |= CRCR_IP | CRCR_TCP | CRCR_UDP; + axge_write_cmd_1(sc, AXGE_ACCESS_MAC, AXGE_CRCR, csum); } Modified: stable/10/sys/dev/usb/net/if_axgereg.h ============================================================================== --- stable/10/sys/dev/usb/net/if_axgereg.h Tue Jun 3 01:30:32 2014 (r266990) +++ stable/10/sys/dev/usb/net/if_axgereg.h Tue Jun 3 01:39:55 2014 (r266991) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Kevin Lo + * Copyright (c) 2013-2014 Kevin Lo * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,13 +26,6 @@ * $FreeBSD$ */ -#define AX88179_PHY_ID 0x03 -#define AXGE_MCAST_FILTER_SIZE 8 -#define AXGE_MAXGE_MCAST 64 -#define AXGE_EEPROM_LEN 0x40 -#define AXGE_RX_CHECKSUM 1 -#define AXGE_TX_CHECKSUM 2 - #define AXGE_ACCESS_MAC 0x01 #define AXGE_ACCESS_PHY 0x02 #define AXGE_ACCESS_WAKEUP 0x03 @@ -43,74 +36,73 @@ #define AXGE_WRITE_EFUSE_DIS 0x0A #define AXGE_ACCESS_MFAB 0x10 -#define AXGE_LINK_STATUS 0x02 -#define AXGE_LINK_STATUS_USB_FS 0x01 -#define AXGE_LINK_STATUS_USB_HS 0x02 -#define AXGE_LINK_STATUS_USB_SS 0x04 - -#define AXGE_SROM_ADDR 0x07 -#define AXGE_SROM_DATA_LOW 0x08 -#define AXGE_SROM_DATA_HIGH 0x09 -#define AXGE_SROM_CMD 0x0a -#define AXGE_SROM_CMD_RD 0x04 /* EEprom read command */ -#define AXGE_SROM_CMD_WR 0x08 /* EEprom write command */ -#define AXGE_SROM_CMD_BUSY 0x10 /* EEprom access module busy */ - -#define AXGE_RX_CTL 0x0b -#define AXGE_RX_CTL_DROPCRCERR 0x0100 /* Drop CRC error packet */ -#define AXGE_RX_CTL_IPE 0x0200 /* 4-byte IP header alignment */ -#define AXGE_RX_CTL_TXPADCRC 0x0400 /* Csum value in rx header 3 */ -#define AXGE_RX_CTL_START 0x0080 /* Ethernet MAC start */ -#define AXGE_RX_CTL_AP 0x0020 /* Accept physical address from - multicast array */ -#define AXGE_RX_CTL_AM 0x0010 -#define AXGE_RX_CTL_AB 0x0008 -#define AXGE_RX_CTL_HA8B 0x0004 -#define AXGE_RX_CTL_AMALL 0x0002 /* Accept all multicast frames */ -#define AXGE_RX_CTL_PRO 0x0001 /* Promiscuous Mode */ -#define AXGE_RX_CTL_STOP 0x0000 /* Stop MAC */ - -#define AXGE_NODE_ID 0x10 -#define AXGE_MULTI_FILTER_ARRY 0x16 - -#define AXGE_MEDIUM_STATUS_MODE 0x22 -#define AXGE_MEDIUM_GIGAMODE 0x0001 -#define AXGE_MEDIUM_FULL_DUPLEX 0x0002 -#define AXGE_MEDIUM_ALWAYS_ONE 0x0004 -#define AXGE_MEDIUM_EN_125MHZ 0x0008 -#define AXGE_MEDIUM_RXFLOW_CTRLEN 0x0010 -#define AXGE_MEDIUM_TXFLOW_CTRLEN 0x0020 -#define AXGE_MEDIUM_RECEIVE_EN 0x0100 -#define AXGE_MEDIUM_PS 0x0200 -#define AXGE_MEDIUM_JUMBO_EN 0x8040 - -#define AXGE_MONITOR_MODE 0x24 -#define AXGE_MONITOR_MODE_RWLC 0x02 -#define AXGE_MONITOR_MODE_RWMP 0x04 -#define AXGE_MONITOR_MODE_RWWF 0x08 -#define AXGE_MONITOR_MODE_RW_FLAG 0x10 -#define AXGE_MONITOR_MODE_PMEPOL 0x20 -#define AXGE_MONITOR_MODE_PMETYPE 0x40 - -#define AXGE_GPIO_CTRL 0x25 -#define AXGE_GPIO_CTRL_GPIO3EN 0x80 -#define AXGE_GPIO_CTRL_GPIO2EN 0x40 -#define AXGE_GPIO_CTRL_GPIO1EN 0x20 - -#define AXGE_PHYPWR_RSTCTL 0x26 -#define AXGE_PHYPWR_RSTCTL_BZ 0x0010 -#define AXGE_PHYPWR_RSTCTL_IPRL 0x0020 -#define AXGE_PHYPWR_RSTCTL_AUTODETACH 0x1000 +/* Physical link status register */ +#define AXGE_PLSR 0x02 +#define PLSR_USB_FS 0x01 +#define PLSR_USB_HS 0x02 +#define PLSR_USB_SS 0x04 + +/* EEPROM address register */ +#define AXGE_EAR 0x07 + +/* EEPROM data low register */ +#define AXGE_EDLR 0x08 + +/* EEPROM data high register */ +#define AXGE_EDHR 0x09 + +/* EEPROM command register */ +#define AXGE_ECR 0x0a + +/* Rx control register */ +#define AXGE_RCR 0x0b +#define RCR_STOP 0x0000 +#define RCR_PRO 0x0001 +#define RCR_AMALL 0x0002 +#define RCR_AB 0x0008 +#define RCR_AM 0x0010 +#define RCR_AP 0x0020 +#define RCR_SO 0x0080 +#define RCR_DROP_CRCE 0x0100 +#define RCR_IPE 0x0200 +#define RCR_TX_CRC_PAD 0x0400 + +/* Node id register */ +#define AXGE_NIDR 0x10 + +/* Multicast filter array */ +#define AXGE_MFA 0x16 + +/* Medium status register */ +#define AXGE_MSR 0x22 +#define MSR_GM 0x0001 +#define MSR_FD 0x0002 +#define MSR_EN_125MHZ 0x0008 +#define MSR_RFC 0x0010 +#define MSR_TFC 0x0020 +#define MSR_RE 0x0100 +#define MSR_PS 0x0200 + +/* Monitor mode status register */ +#define AXGE_MMSR 0x24 +#define MMSR_RWLC 0x02 +#define MMSR_RWMP 0x04 +#define MMSR_RWWF 0x08 +#define MMSR_RW_FLAG 0x10 +#define MMSR_PME_POL 0x20 +#define MMSR_PME_TYPE 0x40 +#define MMSR_PME_IND 0x80 + +/* GPIO control/status register */ +#define AXGE_GPIOCR 0x25 + +/* Ethernet PHY power & reset control register */ +#define AXGE_EPPRCR 0x26 +#define EPPRCR_BZ 0x0010 +#define EPPRCR_IPRL 0x0020 +#define EPPRCR_AUTODETACH 0x1000 #define AXGE_RX_BULKIN_QCTRL 0x2e -#define AXGE_RX_BULKIN_QCTRL_TIME 0x01 -#define AXGE_RX_BULKIN_QCTRL_IFG 0x02 -#define AXGE_RX_BULKIN_QCTRL_SIZE 0x04 - -#define AXGE_RX_BULKIN_QTIMR_LOW 0x2f -#define AXGE_RX_BULKIN_QTIMR_HIGH 0x30 -#define AXGE_RX_BULKIN_QSIZE 0x31 -#define AXGE_RX_BULKIN_QIFG 0x32 #define AXGE_CLK_SELECT 0x33 #define AXGE_CLK_SELECT_BCS 0x01 @@ -118,75 +110,44 @@ #define AXGE_CLK_SELECT_ACSREQ 0x10 #define AXGE_CLK_SELECT_ULR 0x08 -#define AXGE_RXCOE_CTL 0x34 -#define AXGE_RXCOE_IP 0x01 -#define AXGE_RXCOE_TCP 0x02 -#define AXGE_RXCOE_UDP 0x04 -#define AXGE_RXCOE_ICMP 0x08 -#define AXGE_RXCOE_IGMP 0x10 -#define AXGE_RXCOE_TCPV6 0x20 -#define AXGE_RXCOE_UDPV6 0x40 -#define AXGE_RXCOE_ICMV6 0x80 - -#define AXGE_TXCOE_CTL 0x35 -#define AXGE_TXCOE_IP 0x01 -#define AXGE_TXCOE_TCP 0x02 -#define AXGE_TXCOE_UDP 0x04 -#define AXGE_TXCOE_ICMP 0x08 -#define AXGE_TXCOE_IGMP 0x10 -#define AXGE_TXCOE_TCPV6 0x20 -#define AXGE_TXCOE_UDPV6 0x40 -#define AXGE_TXCOE_ICMV6 0x80 +/* COE Rx control register */ +#define AXGE_CRCR 0x34 +#define CRCR_IP 0x01 +#define CRCR_TCP 0x02 +#define CRCR_UDP 0x04 +#define CRCR_ICMP 0x08 +#define CRCR_IGMP 0x10 +#define CRCR_TCPV6 0x20 +#define CRCR_UDPV6 0x40 +#define CRCR_ICMPV6 0x80 + +/* COE Tx control register */ +#define AXGE_CTCR 0x35 +#define CTCR_IP 0x01 +#define CTCR_TCP 0x02 +#define CTCR_UDP 0x04 +#define CTCR_ICMP 0x08 +#define CTCR_IGMP 0x10 +#define CTCR_TCPV6 0x20 +#define CTCR_UDPV6 0x40 +#define CTCR_ICMPV6 0x80 -#define AXGE_PAUSE_WATERLVL_HIGH 0x54 -#define AXGE_PAUSE_WATERLVL_LOW 0x55 +/* Pause water level high register */ +#define AXGE_PWLHR 0x54 -#define AXGE_EEP_EFUSE_CORRECT 0x00 -#define AX88179_EEPROM_MAGIC 0x17900b95 +/* Pause water level low register */ +#define AXGE_PWLLR 0x55 #define AXGE_CONFIG_IDX 0 /* config number 1 */ #define AXGE_IFACE_IDX 0 -#define AXGE_RXHDR_CRC_ERR 0x80000000 -#define AXGE_RXHDR_L4_ERR (1 << 8) -#define AXGE_RXHDR_L3_ERR (1 << 9) - -#define AXGE_RXHDR_L4_TYPE_ICMP 2 -#define AXGE_RXHDR_L4_TYPE_IGMP 3 -#define AXGE_RXHDR_L4_TYPE_TCMPV6 5 - -#define AXGE_RXHDR_L3_TYPE_IP 1 -#define AXGE_RXHDR_L3_TYPE_IPV6 2 - #define AXGE_RXHDR_L4_TYPE_MASK 0x1c +#define AXGE_RXHDR_L4CSUM_ERR 1 +#define AXGE_RXHDR_L3CSUM_ERR 2 #define AXGE_RXHDR_L4_TYPE_UDP 4 #define AXGE_RXHDR_L4_TYPE_TCP 16 -#define AXGE_RXHDR_L3CSUM_ERR 2 -#define AXGE_RXHDR_L4CSUM_ERR 1 -#define AXGE_RXHDR_CRC_ERR 0x80000000 -#define AXGE_RXHDR_DROP_ERR 0x40000000 - -struct axge_csum_hdr { - uint16_t cstatus; -#define AXGE_CSUM_HDR_L4_CSUM_ERR 0x0001 -#define AXGE_CSUM_HDR_L3_CSUM_ERR 0x0002 -#define AXGE_CSUM_HDR_L4_TYPE_UDP 0x0004 -#define AXGE_CSUM_HDR_L4_TYPE_ICMP 0x0008 -#define AXGE_CSUM_HDR_L4_TYPE_IGMP 0x000C -#define AXGE_CSUM_HDR_L4_TYPE_TCP 0x0010 -#define AXGE_CSUM_HDR_L4_TYPE_TCPV6 0x0014 -#define AXGE_CSUM_HDR_L4_TYPE_MASK 0x001C -#define AXGE_CSUM_HDR_L3_TYPE_IPV4 0x0020 -#define AXGE_CSUM_HDR_L3_TYPE_IPV6 0x0040 -#define AXGE_CSUM_HDR_VLAN_MASK 0x0700 - uint16_t len; -#define AXGE_CSUM_HDR_LEN_MASK 0x1FFF -#define AXGE_CSUM_HDR_CRC_ERR 0x2000 -#define AXGE_CSUM_HDR_MII_ERR 0x4000 -#define AXGE_CSUM_HDR_DROP 0x8000 -} __packed; - -#define AXGE_CSUM_RXBYTES(x) ((x) & AXGE_CSUM_HDR_LEN_MASK) +#define AXGE_RXHDR_CRC_ERR 0x20000000 +#define AXGE_RXHDR_DROP_ERR 0x80000000 #define GET_MII(sc) uether_getmii(&(sc)->sc_ue) Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Tue Jun 3 01:30:32 2014 (r266990) +++ stable/10/sys/dev/usb/usbdevs Tue Jun 3 01:39:55 2014 (r266991) @@ -1615,6 +1615,7 @@ product DLINK DSB650TX 0x4002 10/100 Et product DLINK DSB650TX_PNA 0x4003 1/10/100 Ethernet product DLINK DSB650TX3 0x400b 10/100 Ethernet product DLINK DSB650TX2 0x4102 10/100 Ethernet +product DLINK DUB1312 0x4a00 10/100/1000 Ethernet product DLINK DSB650 0xabc1 10/100 Ethernet product DLINK DUBH7 0xf103 DUB-H7 USB 2.0 7-Port Hub product DLINK DWR510_CD 0xa805 DWR-510 CD-ROM Mode @@ -4092,6 +4093,7 @@ product SITECOMEU RT3072_6 0x004d RT3072 product SITECOMEU RTL8188CU_1 0x0052 RTL8188CU product SITECOMEU RTL8188CU_2 0x005c RTL8188CU product SITECOMEU RTL8192CU 0x0061 RTL8192CU +product SITECOMEU LN032 0x0072 LN-032 product SITECOMEU LN028 0x061c LN-028 product SITECOMEU WL113 0x9071 WL-113 product SITECOMEU ZD1211B 0x9075 ZD1211B From owner-svn-src-stable@FreeBSD.ORG Tue Jun 3 04:29:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9FB27BD4; Tue, 3 Jun 2014 04:29:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 811C42832; Tue, 3 Jun 2014 04:29:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s534TQO9027336; Tue, 3 Jun 2014 04:29:26 GMT (envelope-from dchagin@svn.freebsd.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s534TQ7N027335; Tue, 3 Jun 2014 04:29:26 GMT (envelope-from dchagin@svn.freebsd.org) Message-Id: <201406030429.s534TQ7N027335@svn.freebsd.org> From: Dmitry Chagin Date: Tue, 3 Jun 2014 04:29:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266998 - stable/10/sys/compat/linux X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jun 2014 04:29:26 -0000 Author: dchagin Date: Tue Jun 3 04:29:26 2014 New Revision: 266998 URL: http://svnweb.freebsd.org/changeset/base/266998 Log: MFC r266924: Glibc was switched to the FUTEX_WAIT_BITSET op and CLOCK_REALTIME flag has been added instead of FUTEX_WAIT to replace the FUTEX_WAIT logic which needs to do gettimeofday() calls before the futex syscall to convert the absolute timeout to a relative timeout. Before this the CLOCK_MONOTONIC used by the FUTEX_WAIT_BITSET op. When the FUTEX_CLOCK_REALTIME is specified the timeout is an absolute time, not a relative time. Rework futex_wait to handle this. On the side fix the futex leak in error case and remove useless parentheses. Properly calculate the timeout for the CLOCK_MONOTONIC case. Tested by: Hans Petter Selasky Modified: stable/10/sys/compat/linux/linux_futex.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/linux/linux_futex.c ============================================================================== --- stable/10/sys/compat/linux/linux_futex.c Tue Jun 3 04:29:10 2014 (r266997) +++ stable/10/sys/compat/linux/linux_futex.c Tue Jun 3 04:29:26 2014 (r266998) @@ -129,9 +129,7 @@ LIN_SDT_PROBE_DEFINE3(futex, futex_reque "struct waiting_proc *", "uint32_t"); LIN_SDT_PROBE_DEFINE1(futex, futex_requeue, return, "int"); LIN_SDT_PROBE_DEFINE4(futex, futex_wait, entry, "struct futex *", - "struct waiting_proc **", "struct l_timespec *", "uint32_t"); -LIN_SDT_PROBE_DEFINE1(futex, futex_wait, copyin_error, "int"); -LIN_SDT_PROBE_DEFINE1(futex, futex_wait, itimerfix_error, "int"); + "struct waiting_proc **", "int", "uint32_t"); LIN_SDT_PROBE_DEFINE1(futex, futex_wait, sleep_error, "int"); LIN_SDT_PROBE_DEFINE1(futex, futex_wait, return, "int"); LIN_SDT_PROBE_DEFINE3(futex, futex_atomic_op, entry, "struct thread *", @@ -145,6 +143,7 @@ LIN_SDT_PROBE_DEFINE1(futex, futex_atomi LIN_SDT_PROBE_DEFINE2(futex, linux_sys_futex, entry, "struct thread *", "struct linux_sys_futex_args *"); LIN_SDT_PROBE_DEFINE0(futex, linux_sys_futex, unimplemented_clockswitch); +LIN_SDT_PROBE_DEFINE1(futex, linux_sys_futex, itimerfix_error, "int"); LIN_SDT_PROBE_DEFINE1(futex, linux_sys_futex, copyin_error, "int"); LIN_SDT_PROBE_DEFINE0(futex, linux_sys_futex, invalid_cmp_requeue_use); LIN_SDT_PROBE_DEFINE3(futex, linux_sys_futex, debug_wait, "uint32_t *", @@ -555,15 +554,12 @@ futex_requeue(struct futex *f, int n, st } static int -futex_wait(struct futex *f, struct waiting_proc *wp, struct l_timespec *ts, +futex_wait(struct futex *f, struct waiting_proc *wp, int timeout_hz, uint32_t bitset) { - struct l_timespec timeout; - struct timeval tv; - int timeout_hz; int error; - LIN_SDT_PROBE4(futex, futex_wait, entry, f, wp, ts, bitset); + LIN_SDT_PROBE4(futex, futex_wait, entry, f, wp, timeout_hz, bitset); if (bitset == 0) { LIN_SDT_PROBE1(futex, futex_wait, return, EINVAL); @@ -571,30 +567,9 @@ futex_wait(struct futex *f, struct waiti } f->f_bitset = bitset; - - if (ts != NULL) { - error = copyin(ts, &timeout, sizeof(timeout)); - if (error) { - LIN_SDT_PROBE1(futex, futex_wait, copyin_error, error); - LIN_SDT_PROBE1(futex, futex_wait, return, error); - return (error); - } - TIMESPEC_TO_TIMEVAL(&tv, &timeout); - error = itimerfix(&tv); - if (error) { - LIN_SDT_PROBE1(futex, futex_wait, itimerfix_error, - error); - LIN_SDT_PROBE1(futex, futex_wait, return, error); - return (error); - } - timeout_hz = tvtohz(&tv); - } else - timeout_hz = 0; - error = futex_sleep(f, wp, timeout_hz); - if (error) { + if (error) LIN_SDT_PROBE1(futex, futex_wait, sleep_error, error); - } if (error == EWOULDBLOCK) error = ETIMEDOUT; @@ -684,6 +659,9 @@ linux_sys_futex(struct thread *td, struc struct linux_emuldata *em; struct waiting_proc *wp; struct futex *f, *f2; + struct l_timespec timeout; + struct timeval utv, ctv; + int timeout_hz; int error; uint32_t flags, val; @@ -757,7 +735,38 @@ linux_sys_futex(struct thread *td, struc return (EWOULDBLOCK); } - error = futex_wait(f, wp, args->timeout, args->val3); + if (args->timeout != NULL) { + error = copyin(args->timeout, &timeout, sizeof(timeout)); + if (error) { + LIN_SDT_PROBE1(futex, linux_sys_futex, copyin_error, + error); + LIN_SDT_PROBE1(futex, linux_sys_futex, return, error); + futex_put(f, wp); + return (error); + } + TIMESPEC_TO_TIMEVAL(&utv, &timeout); + error = itimerfix(&utv); + if (error) { + LIN_SDT_PROBE1(futex, linux_sys_futex, itimerfix_error, + error); + LIN_SDT_PROBE1(futex, linux_sys_futex, return, error); + futex_put(f, wp); + return (error); + } + if (clockrt) { + microtime(&ctv); + timevalsub(&utv, &ctv); + } else if (args->op == LINUX_FUTEX_WAIT_BITSET) { + microuptime(&ctv); + timevalsub(&utv, &ctv); + } + if (utv.tv_sec < 0) + timevalclear(&utv); + timeout_hz = tvtohz(&utv); + } else + timeout_hz = 0; + + error = futex_wait(f, wp, timeout_hz, args->val3); break; case LINUX_FUTEX_WAKE: From owner-svn-src-stable@FreeBSD.ORG Tue Jun 3 04:31:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 34A4FD18; Tue, 3 Jun 2014 04:31:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 218A328B1; Tue, 3 Jun 2014 04:31:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s534ViL7030773; Tue, 3 Jun 2014 04:31:44 GMT (envelope-from dchagin@svn.freebsd.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s534Vh4m030769; Tue, 3 Jun 2014 04:31:43 GMT (envelope-from dchagin@svn.freebsd.org) Message-Id: <201406030431.s534Vh4m030769@svn.freebsd.org> From: Dmitry Chagin Date: Tue, 3 Jun 2014 04:31:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266999 - in stable/10/sys: amd64/linux32 i386/linux kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jun 2014 04:31:44 -0000 Author: dchagin Date: Tue Jun 3 04:31:42 2014 New Revision: 266999 URL: http://svnweb.freebsd.org/changeset/base/266999 Log: MFC r266925: To allow to run the interpreter itself add a new ELF branding type. Allow Linux ABI to run ELF interpreter. Modified: stable/10/sys/amd64/linux32/linux32_sysvec.c stable/10/sys/i386/linux/linux_sysvec.c stable/10/sys/kern/imgact_elf.c stable/10/sys/sys/imgact_elf.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- stable/10/sys/amd64/linux32/linux32_sysvec.c Tue Jun 3 04:29:26 2014 (r266998) +++ stable/10/sys/amd64/linux32/linux32_sysvec.c Tue Jun 3 04:31:42 2014 (r266999) @@ -1083,7 +1083,7 @@ static Elf32_Brandinfo linux_brand = { .sysvec = &elf_linux_sysvec, .interp_newpath = NULL, .brand_note = &linux32_brandnote, - .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE + .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE | BI_CAN_EXEC_INTERP }; static Elf32_Brandinfo linux_glibc2brand = { @@ -1095,7 +1095,7 @@ static Elf32_Brandinfo linux_glibc2brand .sysvec = &elf_linux_sysvec, .interp_newpath = NULL, .brand_note = &linux32_brandnote, - .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE + .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE | BI_CAN_EXEC_INTERP }; Elf32_Brandinfo *linux_brandlist[] = { Modified: stable/10/sys/i386/linux/linux_sysvec.c ============================================================================== --- stable/10/sys/i386/linux/linux_sysvec.c Tue Jun 3 04:29:26 2014 (r266998) +++ stable/10/sys/i386/linux/linux_sysvec.c Tue Jun 3 04:31:42 2014 (r266999) @@ -1058,7 +1058,7 @@ static Elf32_Brandinfo linux_brand = { .sysvec = &elf_linux_sysvec, .interp_newpath = NULL, .brand_note = &linux_brandnote, - .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE + .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE | BI_CAN_EXEC_INTERP }; static Elf32_Brandinfo linux_glibc2brand = { @@ -1070,7 +1070,7 @@ static Elf32_Brandinfo linux_glibc2brand .sysvec = &elf_linux_sysvec, .interp_newpath = NULL, .brand_note = &linux_brandnote, - .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE + .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE | BI_CAN_EXEC_INTERP }; Elf32_Brandinfo *linux_brandlist[] = { Modified: stable/10/sys/kern/imgact_elf.c ============================================================================== --- stable/10/sys/kern/imgact_elf.c Tue Jun 3 04:29:26 2014 (r266998) +++ stable/10/sys/kern/imgact_elf.c Tue Jun 3 04:31:42 2014 (r266999) @@ -261,6 +261,8 @@ __elfN(get_brandinfo)(struct image_param { const Elf_Ehdr *hdr = (const Elf_Ehdr *)imgp->image_header; Elf_Brandinfo *bi; + const char *fname_name, *interp_brand_name; + int fname_len, interp_len; boolean_t ret; int i; @@ -311,6 +313,33 @@ __elfN(get_brandinfo)(struct image_param } } + /* Some ABI allows to run the interpreter itself. */ + for (i = 0; i < MAX_BRANDS; i++) { + bi = elf_brand_list[i]; + if (bi == NULL || bi->flags & BI_BRAND_NOTE_MANDATORY) + continue; + if (hdr->e_machine != bi->machine || + (bi->flags & BI_CAN_EXEC_INTERP) == 0) + continue; + /* + * Compare the interpreter name not the path to allow run it + * from everywhere. + */ + interp_brand_name = strrchr(bi->interp_path, '/'); + if (interp_brand_name == NULL) + interp_brand_name = bi->interp_path; + interp_len = strlen(interp_brand_name); + fname_name = strrchr(imgp->args->fname, '/'); + if (fname_name == NULL) + fname_name = imgp->args->fname; + fname_len = strlen(fname_name); + if (fname_len < interp_len) + continue; + ret = strncmp(fname_name, interp_brand_name, interp_len); + if (ret == 0) + return (bi); + } + /* Lacking a recognized interpreter, try the default brand */ for (i = 0; i < MAX_BRANDS; i++) { bi = elf_brand_list[i]; Modified: stable/10/sys/sys/imgact_elf.h ============================================================================== --- stable/10/sys/sys/imgact_elf.h Tue Jun 3 04:29:26 2014 (r266998) +++ stable/10/sys/sys/imgact_elf.h Tue Jun 3 04:31:42 2014 (r266999) @@ -77,6 +77,7 @@ typedef struct { #define BI_CAN_EXEC_DYN 0x0001 #define BI_BRAND_NOTE 0x0002 /* May have note.ABI-tag section. */ #define BI_BRAND_NOTE_MANDATORY 0x0004 /* Must have note.ABI-tag section. */ +#define BI_CAN_EXEC_INTERP 0x0008 /* Allow to run interpreter itself. */ } __ElfN(Brandinfo); __ElfType(Auxargs); From owner-svn-src-stable@FreeBSD.ORG Tue Jun 3 06:48:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD6ECF62; Tue, 3 Jun 2014 06:48:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7FA1823BD; Tue, 3 Jun 2014 06:48:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s536mai0090918; Tue, 3 Jun 2014 06:48:36 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s536mZ6K090915; Tue, 3 Jun 2014 06:48:35 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406030648.s536mZ6K090915@svn.freebsd.org> From: Alexander Motin Date: Tue, 3 Jun 2014 06:48:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267002 - in stable/10: sys/dev/pci usr.sbin/pciconf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jun 2014 06:48:36 -0000 Author: mav Date: Tue Jun 3 06:48:35 2014 New Revision: 267002 URL: http://svnweb.freebsd.org/changeset/base/267002 Log: MFC r266468: Add IOMMU PCI subclass, found on Tyan S8236 motherboard. Submitted by: Dmitry Luhtionov Modified: stable/10/sys/dev/pci/pci.c stable/10/sys/dev/pci/pcireg.h stable/10/usr.sbin/pciconf/pciconf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/pci/pci.c ============================================================================== --- stable/10/sys/dev/pci/pci.c Tue Jun 3 05:19:10 2014 (r267001) +++ stable/10/sys/dev/pci/pci.c Tue Jun 3 06:48:35 2014 (r267002) @@ -3782,6 +3782,7 @@ static const struct {PCIC_BASEPERIPH, PCIS_BASEPERIPH_RTC, 1, "realtime clock"}, {PCIC_BASEPERIPH, PCIS_BASEPERIPH_PCIHOT, 1, "PCI hot-plug controller"}, {PCIC_BASEPERIPH, PCIS_BASEPERIPH_SDHC, 1, "SD host controller"}, + {PCIC_BASEPERIPH, PCIS_BASEPERIPH_IOMMU, 1, "IOMMU"}, {PCIC_INPUTDEV, -1, 1, "input device"}, {PCIC_INPUTDEV, PCIS_INPUTDEV_KEYBOARD, 1, "keyboard"}, {PCIC_INPUTDEV, PCIS_INPUTDEV_DIGITIZER,1, "digitizer"}, Modified: stable/10/sys/dev/pci/pcireg.h ============================================================================== --- stable/10/sys/dev/pci/pcireg.h Tue Jun 3 05:19:10 2014 (r267001) +++ stable/10/sys/dev/pci/pcireg.h Tue Jun 3 06:48:35 2014 (r267002) @@ -361,6 +361,7 @@ #define PCIS_BASEPERIPH_RTC 0x03 #define PCIS_BASEPERIPH_PCIHOT 0x04 #define PCIS_BASEPERIPH_SDHC 0x05 +#define PCIS_BASEPERIPH_IOMMU 0x06 #define PCIS_BASEPERIPH_OTHER 0x80 #define PCIC_INPUTDEV 0x09 Modified: stable/10/usr.sbin/pciconf/pciconf.c ============================================================================== --- stable/10/usr.sbin/pciconf/pciconf.c Tue Jun 3 05:19:10 2014 (r267001) +++ stable/10/usr.sbin/pciconf/pciconf.c Tue Jun 3 06:48:35 2014 (r267002) @@ -466,6 +466,7 @@ static struct {PCIC_BASEPERIPH, PCIS_BASEPERIPH_RTC, "realtime clock"}, {PCIC_BASEPERIPH, PCIS_BASEPERIPH_PCIHOT, "PCI hot-plug controller"}, {PCIC_BASEPERIPH, PCIS_BASEPERIPH_SDHC, "SD host controller"}, + {PCIC_BASEPERIPH, PCIS_BASEPERIPH_IOMMU, "IOMMU"}, {PCIC_INPUTDEV, -1, "input device"}, {PCIC_INPUTDEV, PCIS_INPUTDEV_KEYBOARD, "keyboard"}, {PCIC_INPUTDEV, PCIS_INPUTDEV_DIGITIZER,"digitizer"}, From owner-svn-src-stable@FreeBSD.ORG Tue Jun 3 08:08:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38A6D2A3; Tue, 3 Jun 2014 08:08:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1837B2A77; Tue, 3 Jun 2014 08:08:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5388CAL026880; Tue, 3 Jun 2014 08:08:12 GMT (envelope-from dchagin@svn.freebsd.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5388Cun026879; Tue, 3 Jun 2014 08:08:12 GMT (envelope-from dchagin@svn.freebsd.org) Message-Id: <201406030808.s5388Cun026879@svn.freebsd.org> From: Dmitry Chagin Date: Tue, 3 Jun 2014 08:08:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267006 - stable/9/sys/compat/linux X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jun 2014 08:08:13 -0000 Author: dchagin Date: Tue Jun 3 08:08:12 2014 New Revision: 267006 URL: http://svnweb.freebsd.org/changeset/base/267006 Log: MFC r266924: Glibc was switched to the FUTEX_WAIT_BITSET op and CLOCK_REALTIME flag has been added instead of FUTEX_WAIT to replace the FUTEX_WAIT logic which needs to do gettimeofday() calls before the futex syscall to convert the absolute timeout to a relative timeout. Before this the CLOCK_MONOTONIC used by the FUTEX_WAIT_BITSET op. When the FUTEX_CLOCK_REALTIME is specified the timeout is an absolute time, not a relative time. Rework futex_wait to handle this. On the side fix the futex leak in error case and remove useless parentheses. Properly calculate the timeout for the CLOCK_MONOTONIC case. Tested by: Hans Petter Selasky Approved by: re (glebius) Modified: stable/9/sys/compat/linux/linux_futex.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/compat/linux/linux_futex.c ============================================================================== --- stable/9/sys/compat/linux/linux_futex.c Tue Jun 3 07:42:51 2014 (r267005) +++ stable/9/sys/compat/linux/linux_futex.c Tue Jun 3 08:08:12 2014 (r267006) @@ -129,9 +129,7 @@ LIN_SDT_PROBE_DEFINE3(futex, futex_reque "struct waiting_proc *", "uint32_t"); LIN_SDT_PROBE_DEFINE1(futex, futex_requeue, return, "int"); LIN_SDT_PROBE_DEFINE4(futex, futex_wait, entry, "struct futex *", - "struct waiting_proc **", "struct l_timespec *", "uint32_t"); -LIN_SDT_PROBE_DEFINE1(futex, futex_wait, copyin_error, "int"); -LIN_SDT_PROBE_DEFINE1(futex, futex_wait, itimerfix_error, "int"); + "struct waiting_proc **", "int", "uint32_t"); LIN_SDT_PROBE_DEFINE1(futex, futex_wait, sleep_error, "int"); LIN_SDT_PROBE_DEFINE1(futex, futex_wait, return, "int"); LIN_SDT_PROBE_DEFINE3(futex, futex_atomic_op, entry, "struct thread *", @@ -145,6 +143,7 @@ LIN_SDT_PROBE_DEFINE1(futex, futex_atomi LIN_SDT_PROBE_DEFINE2(futex, linux_sys_futex, entry, "struct thread *", "struct linux_sys_futex_args *"); LIN_SDT_PROBE_DEFINE0(futex, linux_sys_futex, unimplemented_clockswitch); +LIN_SDT_PROBE_DEFINE1(futex, linux_sys_futex, itimerfix_error, "int"); LIN_SDT_PROBE_DEFINE1(futex, linux_sys_futex, copyin_error, "int"); LIN_SDT_PROBE_DEFINE0(futex, linux_sys_futex, invalid_cmp_requeue_use); LIN_SDT_PROBE_DEFINE3(futex, linux_sys_futex, debug_wait, "uint32_t *", @@ -555,15 +554,12 @@ futex_requeue(struct futex *f, int n, st } static int -futex_wait(struct futex *f, struct waiting_proc *wp, struct l_timespec *ts, +futex_wait(struct futex *f, struct waiting_proc *wp, int timeout_hz, uint32_t bitset) { - struct l_timespec timeout; - struct timeval tv; - int timeout_hz; int error; - LIN_SDT_PROBE4(futex, futex_wait, entry, f, wp, ts, bitset); + LIN_SDT_PROBE4(futex, futex_wait, entry, f, wp, timeout_hz, bitset); if (bitset == 0) { LIN_SDT_PROBE1(futex, futex_wait, return, EINVAL); @@ -571,30 +567,9 @@ futex_wait(struct futex *f, struct waiti } f->f_bitset = bitset; - - if (ts != NULL) { - error = copyin(ts, &timeout, sizeof(timeout)); - if (error) { - LIN_SDT_PROBE1(futex, futex_wait, copyin_error, error); - LIN_SDT_PROBE1(futex, futex_wait, return, error); - return (error); - } - TIMESPEC_TO_TIMEVAL(&tv, &timeout); - error = itimerfix(&tv); - if (error) { - LIN_SDT_PROBE1(futex, futex_wait, itimerfix_error, - error); - LIN_SDT_PROBE1(futex, futex_wait, return, error); - return (error); - } - timeout_hz = tvtohz(&tv); - } else - timeout_hz = 0; - error = futex_sleep(f, wp, timeout_hz); - if (error) { + if (error) LIN_SDT_PROBE1(futex, futex_wait, sleep_error, error); - } if (error == EWOULDBLOCK) error = ETIMEDOUT; @@ -684,6 +659,9 @@ linux_sys_futex(struct thread *td, struc struct linux_emuldata *em; struct waiting_proc *wp; struct futex *f, *f2; + struct l_timespec timeout; + struct timeval utv, ctv; + int timeout_hz; int error; uint32_t flags, val; @@ -757,7 +735,38 @@ linux_sys_futex(struct thread *td, struc return (EWOULDBLOCK); } - error = futex_wait(f, wp, args->timeout, args->val3); + if (args->timeout != NULL) { + error = copyin(args->timeout, &timeout, sizeof(timeout)); + if (error) { + LIN_SDT_PROBE1(futex, linux_sys_futex, copyin_error, + error); + LIN_SDT_PROBE1(futex, linux_sys_futex, return, error); + futex_put(f, wp); + return (error); + } + TIMESPEC_TO_TIMEVAL(&utv, &timeout); + error = itimerfix(&utv); + if (error) { + LIN_SDT_PROBE1(futex, linux_sys_futex, itimerfix_error, + error); + LIN_SDT_PROBE1(futex, linux_sys_futex, return, error); + futex_put(f, wp); + return (error); + } + if (clockrt) { + microtime(&ctv); + timevalsub(&utv, &ctv); + } else if (args->op == LINUX_FUTEX_WAIT_BITSET) { + microuptime(&ctv); + timevalsub(&utv, &ctv); + } + if (utv.tv_sec < 0) + timevalclear(&utv); + timeout_hz = tvtohz(&utv); + } else + timeout_hz = 0; + + error = futex_wait(f, wp, timeout_hz, args->val3); break; case LINUX_FUTEX_WAKE: From owner-svn-src-stable@FreeBSD.ORG Tue Jun 3 14:50:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9C942AEB; Tue, 3 Jun 2014 14:50:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 899EB237A; Tue, 3 Jun 2014 14:50:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s53EopUK010920; Tue, 3 Jun 2014 14:50:51 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s53Eoptr010919; Tue, 3 Jun 2014 14:50:51 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201406031450.s53Eoptr010919@svn.freebsd.org> From: Craig Rodrigues Date: Tue, 3 Jun 2014 14:50:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267010 - stable/10/sys/boot/forth X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jun 2014 14:50:51 -0000 Author: rodrigc Date: Tue Jun 3 14:50:51 2014 New Revision: 267010 URL: http://svnweb.freebsd.org/changeset/base/267010 Log: MFC r266938: Allow customization of the brand displayed in the boot menu. If the user specifies in /boot/loader.conf: loader_brand="mycustom-brand" Then "mycustom-brand" will be executed instead of "fbsd-logo". Submitted by: alfred Obtained from: FreeNAS Modified: stable/10/sys/boot/forth/brand.4th Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/forth/brand.4th ============================================================================== --- stable/10/sys/boot/forth/brand.4th Tue Jun 3 14:46:50 2014 (r267009) +++ stable/10/sys/boot/forth/brand.4th Tue Jun 3 14:50:51 2014 (r267010) @@ -56,6 +56,8 @@ variable brandY \ NAME DESCRIPTION \ fbsd FreeBSD logo \ +\ NOTE: Setting `loader_brand' to the value of an existing function +\ (such as "mycustom-brand") will cause that symbol to be executed. \ NOTE: Setting `loader_brand' to an undefined value (such as "none") will \ prevent any brand from being drawn. \ @@ -87,5 +89,14 @@ variable brandY 2drop exit then + \ if it refers to a raw symbol then run that function + sfind if + brandX @ brandY @ + 2 roll + execute + else + drop + then + 2drop ; From owner-svn-src-stable@FreeBSD.ORG Tue Jun 3 19:02:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CB470E91; Tue, 3 Jun 2014 19:02:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B51482B5F; Tue, 3 Jun 2014 19:02:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s53J2IqO027237; Tue, 3 Jun 2014 19:02:18 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s53J2IH5027236; Tue, 3 Jun 2014 19:02:18 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201406031902.s53J2IH5027236@svn.freebsd.org> From: Xin LI Date: Tue, 3 Jun 2014 19:02:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267014 - stable/10/contrib/openpam/lib/libpam X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jun 2014 19:02:19 -0000 Author: delphij Date: Tue Jun 3 19:02:18 2014 New Revision: 267014 URL: http://svnweb.freebsd.org/changeset/base/267014 Log: Fix incorrect error handling in PAM policy parser. [SA-14:13] Modified: stable/10/contrib/openpam/lib/libpam/openpam_configure.c Modified: stable/10/contrib/openpam/lib/libpam/openpam_configure.c ============================================================================== --- stable/10/contrib/openpam/lib/libpam/openpam_configure.c Tue Jun 3 19:01:38 2014 (r267013) +++ stable/10/contrib/openpam/lib/libpam/openpam_configure.c Tue Jun 3 19:02:18 2014 (r267014) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2001-2003 Networks Associates Technology, Inc. - * Copyright (c) 2004-2012 Dag-Erling Smørgrav + * Copyright (c) 2004-2014 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -193,6 +193,7 @@ openpam_parse_chain(pam_handle_t *pamh, openpam_log(PAM_LOG_ERROR, "%s(%d): missing or invalid facility", filename, lineno); + errno = EINVAL; goto fail; } if (facility != fclt && facility != PAM_FACILITY_ANY) { @@ -208,18 +209,28 @@ openpam_parse_chain(pam_handle_t *pamh, openpam_log(PAM_LOG_ERROR, "%s(%d): missing or invalid service name", filename, lineno); + errno = EINVAL; goto fail; } if (wordv[i] != NULL) { openpam_log(PAM_LOG_ERROR, "%s(%d): garbage at end of line", filename, lineno); + errno = EINVAL; goto fail; } ret = openpam_load_chain(pamh, servicename, fclt); FREEV(wordc, wordv); - if (ret < 0) + if (ret < 0) { + /* + * Bogus errno, but this ensures that the + * outer loop does not just ignore the + * error and keep searching. + */ + if (errno == ENOENT) + errno = EINVAL; goto fail; + } continue; } @@ -229,6 +240,7 @@ openpam_parse_chain(pam_handle_t *pamh, openpam_log(PAM_LOG_ERROR, "%s(%d): missing or invalid control flag", filename, lineno); + errno = EINVAL; goto fail; } @@ -238,6 +250,7 @@ openpam_parse_chain(pam_handle_t *pamh, openpam_log(PAM_LOG_ERROR, "%s(%d): missing or invalid module name", filename, lineno); + errno = EINVAL; goto fail; } @@ -247,8 +260,11 @@ openpam_parse_chain(pam_handle_t *pamh, this->flag = ctlf; /* load module */ - if ((this->module = openpam_load_module(modulename)) == NULL) + if ((this->module = openpam_load_module(modulename)) == NULL) { + if (errno == ENOENT) + errno = ENOEXEC; goto fail; + } /* * The remaining items in wordv are the module's @@ -281,7 +297,11 @@ openpam_parse_chain(pam_handle_t *pamh, * The loop ended because openpam_readword() returned NULL, which * can happen for four different reasons: an I/O error (ferror(f) * is true), a memory allocation failure (ferror(f) is false, - * errno is non-zero) + * feof(f) is false, errno is non-zero), the file ended with an + * unterminated quote or backslash escape (ferror(f) is false, + * feof(f) is true, errno is non-zero), or the end of the file was + * reached without error (ferror(f) is false, feof(f) is true, + * errno is zero). */ if (ferror(f) || errno != 0) goto syserr; @@ -402,6 +422,9 @@ openpam_load_chain(pam_handle_t *pamh, } ret = openpam_load_file(pamh, service, facility, filename, style); + /* success */ + if (ret > 0) + RETURNN(ret); /* the file exists, but an error occurred */ if (ret == -1 && errno != ENOENT) RETURNN(ret); @@ -411,7 +434,8 @@ openpam_load_chain(pam_handle_t *pamh, } /* no hit */ - RETURNN(0); + errno = ENOENT; + RETURNN(-1); } /* @@ -432,8 +456,10 @@ openpam_configure(pam_handle_t *pamh, openpam_log(PAM_LOG_ERROR, "invalid service name"); RETURNC(PAM_SYSTEM_ERR); } - if (openpam_load_chain(pamh, service, PAM_FACILITY_ANY) < 0) - goto load_err; + if (openpam_load_chain(pamh, service, PAM_FACILITY_ANY) < 0) { + if (errno != ENOENT) + goto load_err; + } for (fclt = 0; fclt < PAM_NUM_FACILITIES; ++fclt) { if (pamh->chains[fclt] != NULL) continue; From owner-svn-src-stable@FreeBSD.ORG Tue Jun 3 19:02:34 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0A83FC3; Tue, 3 Jun 2014 19:02:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9237C2B66; Tue, 3 Jun 2014 19:02:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s53J2Y1P027327; Tue, 3 Jun 2014 19:02:34 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s53J2Y39027325; Tue, 3 Jun 2014 19:02:34 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201406031902.s53J2Y39027325@svn.freebsd.org> From: Xin LI Date: Tue, 3 Jun 2014 19:02:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267015 - in stable/9: contrib/openpam/lib/libpam sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jun 2014 19:02:34 -0000 Author: delphij Date: Tue Jun 3 19:02:33 2014 New Revision: 267015 URL: http://svnweb.freebsd.org/changeset/base/267015 Log: Fix ktrace kernel memory disclosure. [SA-14:12] Fix incorrect error handling in PAM policy parser. [SA-14:13] Approved by: re (glebius) Modified: stable/9/contrib/openpam/lib/libpam/openpam_configure.c stable/9/sys/kern/kern_ktrace.c Modified: stable/9/contrib/openpam/lib/libpam/openpam_configure.c ============================================================================== --- stable/9/contrib/openpam/lib/libpam/openpam_configure.c Tue Jun 3 19:02:18 2014 (r267014) +++ stable/9/contrib/openpam/lib/libpam/openpam_configure.c Tue Jun 3 19:02:33 2014 (r267015) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2001-2003 Networks Associates Technology, Inc. - * Copyright (c) 2004-2012 Dag-Erling Smørgrav + * Copyright (c) 2004-2014 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -193,6 +193,7 @@ openpam_parse_chain(pam_handle_t *pamh, openpam_log(PAM_LOG_ERROR, "%s(%d): missing or invalid facility", filename, lineno); + errno = EINVAL; goto fail; } if (facility != fclt && facility != PAM_FACILITY_ANY) { @@ -208,18 +209,28 @@ openpam_parse_chain(pam_handle_t *pamh, openpam_log(PAM_LOG_ERROR, "%s(%d): missing or invalid service name", filename, lineno); + errno = EINVAL; goto fail; } if (wordv[i] != NULL) { openpam_log(PAM_LOG_ERROR, "%s(%d): garbage at end of line", filename, lineno); + errno = EINVAL; goto fail; } ret = openpam_load_chain(pamh, servicename, fclt); FREEV(wordc, wordv); - if (ret < 0) + if (ret < 0) { + /* + * Bogus errno, but this ensures that the + * outer loop does not just ignore the + * error and keep searching. + */ + if (errno == ENOENT) + errno = EINVAL; goto fail; + } continue; } @@ -229,6 +240,7 @@ openpam_parse_chain(pam_handle_t *pamh, openpam_log(PAM_LOG_ERROR, "%s(%d): missing or invalid control flag", filename, lineno); + errno = EINVAL; goto fail; } @@ -238,6 +250,7 @@ openpam_parse_chain(pam_handle_t *pamh, openpam_log(PAM_LOG_ERROR, "%s(%d): missing or invalid module name", filename, lineno); + errno = EINVAL; goto fail; } @@ -247,8 +260,11 @@ openpam_parse_chain(pam_handle_t *pamh, this->flag = ctlf; /* load module */ - if ((this->module = openpam_load_module(modulename)) == NULL) + if ((this->module = openpam_load_module(modulename)) == NULL) { + if (errno == ENOENT) + errno = ENOEXEC; goto fail; + } /* * The remaining items in wordv are the module's @@ -281,7 +297,11 @@ openpam_parse_chain(pam_handle_t *pamh, * The loop ended because openpam_readword() returned NULL, which * can happen for four different reasons: an I/O error (ferror(f) * is true), a memory allocation failure (ferror(f) is false, - * errno is non-zero) + * feof(f) is false, errno is non-zero), the file ended with an + * unterminated quote or backslash escape (ferror(f) is false, + * feof(f) is true, errno is non-zero), or the end of the file was + * reached without error (ferror(f) is false, feof(f) is true, + * errno is zero). */ if (ferror(f) || errno != 0) goto syserr; @@ -402,6 +422,9 @@ openpam_load_chain(pam_handle_t *pamh, } ret = openpam_load_file(pamh, service, facility, filename, style); + /* success */ + if (ret > 0) + RETURNN(ret); /* the file exists, but an error occurred */ if (ret == -1 && errno != ENOENT) RETURNN(ret); @@ -411,7 +434,8 @@ openpam_load_chain(pam_handle_t *pamh, } /* no hit */ - RETURNN(0); + errno = ENOENT; + RETURNN(-1); } /* @@ -432,8 +456,10 @@ openpam_configure(pam_handle_t *pamh, openpam_log(PAM_LOG_ERROR, "invalid service name"); RETURNC(PAM_SYSTEM_ERR); } - if (openpam_load_chain(pamh, service, PAM_FACILITY_ANY) < 0) - goto load_err; + if (openpam_load_chain(pamh, service, PAM_FACILITY_ANY) < 0) { + if (errno != ENOENT) + goto load_err; + } for (fclt = 0; fclt < PAM_NUM_FACILITIES; ++fclt) { if (pamh->chains[fclt] != NULL) continue; Modified: stable/9/sys/kern/kern_ktrace.c ============================================================================== --- stable/9/sys/kern/kern_ktrace.c Tue Jun 3 19:02:18 2014 (r267014) +++ stable/9/sys/kern/kern_ktrace.c Tue Jun 3 19:02:33 2014 (r267015) @@ -119,6 +119,7 @@ static int data_lengths[] = { 0, /* KTR_SYSCTL */ sizeof(struct ktr_proc_ctor), /* KTR_PROCCTOR */ 0, /* KTR_PROCDTOR */ + 0, /* unused */ sizeof(struct ktr_fault), /* KTR_FAULT */ sizeof(struct ktr_faultend), /* KTR_FAULTEND */ }; From owner-svn-src-stable@FreeBSD.ORG Tue Jun 3 19:02:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C787516A; Tue, 3 Jun 2014 19:02:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B20012B69; Tue, 3 Jun 2014 19:02:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s53J2gkw027395; Tue, 3 Jun 2014 19:02:42 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s53J2g0L027394; Tue, 3 Jun 2014 19:02:42 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201406031902.s53J2g0L027394@svn.freebsd.org> From: Xin LI Date: Tue, 3 Jun 2014 19:02:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r267016 - stable/8/sys/kern X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jun 2014 19:02:42 -0000 Author: delphij Date: Tue Jun 3 19:02:42 2014 New Revision: 267016 URL: http://svnweb.freebsd.org/changeset/base/267016 Log: Fix ktrace memory disclosure. [SA-14:12] Modified: stable/8/sys/kern/kern_ktrace.c Modified: stable/8/sys/kern/kern_ktrace.c ============================================================================== --- stable/8/sys/kern/kern_ktrace.c Tue Jun 3 19:02:33 2014 (r267015) +++ stable/8/sys/kern/kern_ktrace.c Tue Jun 3 19:02:42 2014 (r267016) @@ -117,6 +117,7 @@ static int data_lengths[] = { 0, /* KTR_SYSCTL */ sizeof(struct ktr_proc_ctor), /* KTR_PROCCTOR */ 0, /* KTR_PROCDTOR */ + 0, /* unused */ sizeof(struct ktr_fault), /* KTR_FAULT */ sizeof(struct ktr_faultend), /* KTR_FAULTEND */ }; From owner-svn-src-stable@FreeBSD.ORG Tue Jun 3 19:06:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87A618EA; Tue, 3 Jun 2014 19:06:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74B9A2BBA; Tue, 3 Jun 2014 19:06:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s53J6mm1028460; Tue, 3 Jun 2014 19:06:48 GMT (envelope-from cy@svn.freebsd.org) Received: (from cy@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s53J6mxx028458; Tue, 3 Jun 2014 19:06:48 GMT (envelope-from cy@svn.freebsd.org) Message-Id: <201406031906.s53J6mxx028458@svn.freebsd.org> From: Cy Schubert Date: Tue, 3 Jun 2014 19:06:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267020 - stable/10/sys/contrib/ipfilter/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jun 2014 19:06:48 -0000 Author: cy Date: Tue Jun 3 19:06:47 2014 New Revision: 267020 URL: http://svnweb.freebsd.org/changeset/base/267020 Log: MFC r266605. Move mutex creation from ipf_log_soft_init() to ipf_log_soft_create() to be consistent with mutex destruction in ipf_log_soft_destroy(). As a result mutex destruction in ipf_log_soft_fini() is redundant. Approved by: glebius (mentor) Modified: stable/10/sys/contrib/ipfilter/netinet/ip_log.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/contrib/ipfilter/netinet/ip_log.c ============================================================================== --- stable/10/sys/contrib/ipfilter/netinet/ip_log.c Tue Jun 3 19:03:23 2014 (r267019) +++ stable/10/sys/contrib/ipfilter/netinet/ip_log.c Tue Jun 3 19:06:47 2014 (r267020) @@ -214,6 +214,7 @@ ipf_log_soft_create(softc) ipf_main_softc_t *softc; { ipf_log_softc_t *softl; + int i; KMALLOC(softl, ipf_log_softc_t *); if (softl == NULL) @@ -234,6 +235,10 @@ ipf_log_soft_create(softc) return NULL; } + for (i = IPL_LOGMAX; i >= 0; i--) { + MUTEX_INIT(&softl->ipl_mutex[i], "ipf log mutex"); + } + softl->ipl_suppress = 1; softl->ipl_logall = 0; softl->ipl_log_init = 0; @@ -267,13 +272,6 @@ ipf_log_soft_init(softc, arg) softl->iplog_ss[i].read_waiter = 0; softl->iplog_ss[i].state = 0; # endif -# if defined(linux) && defined(_KERNEL) - init_waitqueue_head(softl->iplh_linux + i); -# endif -# if SOLARIS && defined(_KERNEL) - cv_init(&softl->ipl_wait[i], NULL, CV_DRIVER, NULL); -# endif - MUTEX_INIT(&softl->ipl_mutex[i], "ipf log mutex"); } @@ -324,7 +322,7 @@ ipf_log_soft_fini(softc, arg) # endif MUTEX_ENTER(&softl->ipl_mutex[i]); } - MUTEX_DESTROY(&softl->ipl_mutex[i]); + MUTEX_EXIT(&softl->ipl_mutex[i]); } return 0; From owner-svn-src-stable@FreeBSD.ORG Tue Jun 3 19:25:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B46E8ED; Tue, 3 Jun 2014 19:25:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B6122DA3; Tue, 3 Jun 2014 19:25:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s53JPdTB037651; Tue, 3 Jun 2014 19:25:39 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s53JPdOg037650; Tue, 3 Jun 2014 19:25:39 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201406031925.s53JPdOg037650@svn.freebsd.org> From: Christian Brueffer Date: Tue, 3 Jun 2014 19:25:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267022 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jun 2014 19:25:39 -0000 Author: brueffer Date: Tue Jun 3 19:25:39 2014 New Revision: 267022 URL: http://svnweb.freebsd.org/changeset/base/267022 Log: MFC: r266709 Language cleanup. Reviewed by: mav, bcr, wblock Modified: stable/10/share/man/man4/attimer.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/attimer.4 ============================================================================== --- stable/10/share/man/man4/attimer.4 Tue Jun 3 19:24:53 2014 (r267021) +++ stable/10/share/man/man4/attimer.4 Tue Jun 3 19:25:39 2014 (r267022) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 14, 2010 +.Dd May 26, 2014 .Dt ATTIMER 4 .Os .Sh NAME @@ -37,38 +37,48 @@ The following tunables are settable from .Xr loader 8 : .Bl -ohang .It Va hint.attimer. Ns Ar X Ns Va .clock -controls event timers functionality support. Setting to 0, disables it. -Default value is 1. +controls support for the event timer functionality. +Setting this value to +.Dv 0 +disables it. +The default value is +.Dv 1 . .It Va hint.attimer. Ns Ar X Ns Va .timecounter -controls time counter functionality support. Setting to 0, disables it. -Default value is 1. +controls support for the time counter functionality. +Setting this value to +.Dv 0 +disables it. +The default value is +.Dv 1 . .It Va hw.i8254.freq -allows to override default counter frequency. -The same value is also available in run-time via +allows overriding the default counter frequency. +The same value is also available at run-time via the .Va machdep.i8254_freq sysctl. .El .Sh DESCRIPTION This driver uses i8254 Programmable Interval Timer (AT Timer) hardware -to supply kernel with one time counter and one event timer, and generate -sound tones for system speaker. +to supply the kernel with one timecounter and one event timer, and to generate +sound tones for the system speaker. This hardware includes three channels. -Each channel includes 16bit counter, counting down with known, +Each channel includes a 16 bit counter which decreases with a known, platform-dependent frequency. Counters can operate in several different modes, including periodic and one-shot. -Output of each channel has platform-defined wiring: one channel is wired +The output of each channel has platform-defined wiring: one channel is wired to the interrupt controller and may be used as event timer, one channel is -wired to speaker and used to generate sound tones, and one timer is reserved +wired to the speaker and used to generate sound tones, and one timer is reserved for platform purposes. .Pp -Driver uses single hardware channel to provide both time counter and event +The +.Nm +driver uses a single hardware channel to provide both time counter and event timer functionality. -To make it possible, respective counter must be running in periodic more. -As result, one-shot event timer mode supported only when time counter +To make this possible, the respective counter must be running in periodic mode. +As a result, the one-shot event timer mode is supported only when time counter functionality is disabled. .Pp -Event timer provided by the driver is irrelevant to CPU power states. +The event timer provided by the driver is irrelevant to CPU power states. .Sh SEE ALSO .Xr apic 4 , .Xr atrtc 4 , From owner-svn-src-stable@FreeBSD.ORG Tue Jun 3 19:45:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C075997E; Tue, 3 Jun 2014 19:45:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A25E222B8; Tue, 3 Jun 2014 19:45:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s53Jj843047083; Tue, 3 Jun 2014 19:45:08 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s53Jj8GI047082; Tue, 3 Jun 2014 19:45:08 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201406031945.s53Jj8GI047082@svn.freebsd.org> From: Christian Brueffer Date: Tue, 3 Jun 2014 19:45:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267023 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jun 2014 19:45:08 -0000 Author: brueffer Date: Tue Jun 3 19:45:08 2014 New Revision: 267023 URL: http://svnweb.freebsd.org/changeset/base/267023 Log: MFC: r266709 Language cleanup. Reviewed by: mav, bcr, wblock Approved by: re (gjb) Modified: stable/9/share/man/man4/attimer.4 Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/attimer.4 ============================================================================== --- stable/9/share/man/man4/attimer.4 Tue Jun 3 19:25:39 2014 (r267022) +++ stable/9/share/man/man4/attimer.4 Tue Jun 3 19:45:08 2014 (r267023) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 14, 2010 +.Dd May 26, 2014 .Dt ATTIMER 4 .Os .Sh NAME @@ -37,38 +37,48 @@ The following tunables are settable from .Xr loader 8 : .Bl -ohang .It Va hint.attimer. Ns Ar X Ns Va .clock -controls event timers functionality support. Setting to 0, disables it. -Default value is 1. +controls support for the event timer functionality. +Setting this value to +.Dv 0 +disables it. +The default value is +.Dv 1 . .It Va hint.attimer. Ns Ar X Ns Va .timecounter -controls time counter functionality support. Setting to 0, disables it. -Default value is 1. +controls support for the time counter functionality. +Setting this value to +.Dv 0 +disables it. +The default value is +.Dv 1 . .It Va hw.i8254.freq -allows to override default counter frequency. -The same value is also available in run-time via +allows overriding the default counter frequency. +The same value is also available at run-time via the .Va machdep.i8254_freq sysctl. .El .Sh DESCRIPTION This driver uses i8254 Programmable Interval Timer (AT Timer) hardware -to supply kernel with one time counter and one event timer, and generate -sound tones for system speaker. +to supply the kernel with one timecounter and one event timer, and to generate +sound tones for the system speaker. This hardware includes three channels. -Each channel includes 16bit counter, counting down with known, +Each channel includes a 16 bit counter which decreases with a known, platform-dependent frequency. Counters can operate in several different modes, including periodic and one-shot. -Output of each channel has platform-defined wiring: one channel is wired +The output of each channel has platform-defined wiring: one channel is wired to the interrupt controller and may be used as event timer, one channel is -wired to speaker and used to generate sound tones, and one timer is reserved +wired to the speaker and used to generate sound tones, and one timer is reserved for platform purposes. .Pp -Driver uses single hardware channel to provide both time counter and event +The +.Nm +driver uses a single hardware channel to provide both time counter and event timer functionality. -To make it possible, respective counter must be running in periodic more. -As result, one-shot event timer mode supported only when time counter +To make this possible, the respective counter must be running in periodic mode. +As a result, the one-shot event timer mode is supported only when time counter functionality is disabled. .Pp -Event timer provided by the driver is irrelevant to CPU power states. +The event timer provided by the driver is irrelevant to CPU power states. .Sh SEE ALSO .Xr apic 4 , .Xr atrtc 4 , From owner-svn-src-stable@FreeBSD.ORG Wed Jun 4 03:03:35 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 161C0B9A; Wed, 4 Jun 2014 03:03:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02EED2877; Wed, 4 Jun 2014 03:03:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5433YEf094980; Wed, 4 Jun 2014 03:03:34 GMT (envelope-from lwhsu@svn.freebsd.org) Received: (from lwhsu@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5433YHn094979; Wed, 4 Jun 2014 03:03:34 GMT (envelope-from lwhsu@svn.freebsd.org) Message-Id: <201406040303.s5433YHn094979@svn.freebsd.org> From: Li-Wen Hsu Date: Wed, 4 Jun 2014 03:03:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267036 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 03:03:35 -0000 Author: lwhsu (ports committer) Date: Wed Jun 4 03:03:34 2014 New Revision: 267036 URL: http://svnweb.freebsd.org/changeset/base/267036 Log: MFC r266335: Add axge(4) to LINT Approved by: kevlo Modified: stable/10/sys/conf/NOTES Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/NOTES ============================================================================== --- stable/10/sys/conf/NOTES Wed Jun 4 03:02:49 2014 (r267035) +++ stable/10/sys/conf/NOTES Wed Jun 4 03:03:34 2014 (r267036) @@ -2695,6 +2695,8 @@ device aue # ASIX Electronics AX88172 USB 2.0 ethernet driver. Used in the # LinkSys USB200M and various other adapters. device axe +# ASIX Electronics AX88178A/AX88179 USB 2.0/3.0 gigabit ethernet driver. +device axge # # Devices which communicate using Ethernet over USB, particularly From owner-svn-src-stable@FreeBSD.ORG Wed Jun 4 06:15:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4CDF4549; Wed, 4 Jun 2014 06:15:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38B67279A; Wed, 4 Jun 2014 06:15:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s546Fk1i004398; Wed, 4 Jun 2014 06:15:46 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s546FknI004397; Wed, 4 Jun 2014 06:15:46 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201406040615.s546FknI004397@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 4 Jun 2014 06:15:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267039 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 06:15:46 -0000 Author: hselasky Date: Wed Jun 4 06:15:45 2014 New Revision: 267039 URL: http://svnweb.freebsd.org/changeset/base/267039 Log: MFC r266833: Add some more spinlocks to protect the state of the USB transfer queue. Rename some functions to indicate locking requirements. Modified: stable/10/sys/dev/usb/controller/dwc_otg.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/dwc_otg.c ============================================================================== --- stable/10/sys/dev/usb/controller/dwc_otg.c Wed Jun 4 05:04:15 2014 (r267038) +++ stable/10/sys/dev/usb/controller/dwc_otg.c Wed Jun 4 06:15:45 2014 (r267039) @@ -142,7 +142,7 @@ static void dwc_otg_device_done(struct u static void dwc_otg_do_poll(struct usb_bus *); static void dwc_otg_standard_done(struct usb_xfer *); static void dwc_otg_root_intr(struct dwc_otg_softc *); -static void dwc_otg_interrupt_poll(struct dwc_otg_softc *); +static void dwc_otg_interrupt_poll_locked(struct dwc_otg_softc *); static void dwc_otg_host_channel_disable(struct dwc_otg_softc *, uint8_t); /* @@ -2245,7 +2245,7 @@ done: } static uint8_t -dwc_otg_xfer_do_complete(struct dwc_otg_softc *sc, struct usb_xfer *xfer) +dwc_otg_xfer_do_complete_locked(struct dwc_otg_softc *sc, struct usb_xfer *xfer) { struct dwc_otg_td *td; @@ -2349,7 +2349,7 @@ dwc_otg_host_channel_disable(struct dwc_ } static uint8_t -dwc_otg_update_host_transfer_schedule(struct dwc_otg_softc *sc) +dwc_otg_update_host_transfer_schedule_locked(struct dwc_otg_softc *sc) { TAILQ_HEAD(, usb_xfer) head; struct usb_xfer *xfer; @@ -2519,7 +2519,7 @@ dwc_otg_update_host_transfer_schedule(st } static void -dwc_otg_interrupt_poll(struct dwc_otg_softc *sc) +dwc_otg_interrupt_poll_locked(struct dwc_otg_softc *sc) { struct usb_xfer *xfer; uint32_t temp; @@ -2620,19 +2620,19 @@ repeat: if (sc->sc_flags.status_device_mode == 0 && sc->sc_xfer_complete == 0) { /* update host transfer schedule, so that new transfers can be issued */ - if (dwc_otg_update_host_transfer_schedule(sc)) + if (dwc_otg_update_host_transfer_schedule_locked(sc)) goto repeat; } } static void -dwc_otg_interrupt_complete(struct dwc_otg_softc *sc) +dwc_otg_interrupt_complete_locked(struct dwc_otg_softc *sc) { struct usb_xfer *xfer; repeat: /* scan for completion events */ TAILQ_FOREACH(xfer, &sc->sc_bus.intr_q.head, wait_entry) { - if (dwc_otg_xfer_do_complete(sc, xfer)) + if (dwc_otg_xfer_do_complete_locked(sc, xfer)) goto repeat; } } @@ -2672,6 +2672,8 @@ dwc_otg_filter_interrupt(void *arg) int retval = FILTER_HANDLED; uint32_t status; + USB_BUS_SPIN_LOCK(&sc->sc_bus); + /* read and clear interrupt status */ status = DWC_OTG_READ_4(sc, DOTG_GINTSTS); @@ -2696,10 +2698,8 @@ dwc_otg_filter_interrupt(void *arg) } } - USB_BUS_SPIN_LOCK(&sc->sc_bus); - /* poll FIFOs, if any */ - dwc_otg_interrupt_poll(sc); + dwc_otg_interrupt_poll_locked(sc); if (sc->sc_xfer_complete != 0) retval = FILTER_SCHEDULE_THREAD; @@ -2896,15 +2896,14 @@ dwc_otg_interrupt(void *arg) sc->sc_xfer_complete = 0; /* complete FIFOs, if any */ - dwc_otg_interrupt_complete(sc); + dwc_otg_interrupt_complete_locked(sc); if (sc->sc_flags.status_device_mode == 0) { /* update host transfer schedule, so that new transfers can be issued */ - if (dwc_otg_update_host_transfer_schedule(sc)) - dwc_otg_interrupt_poll(sc); + if (dwc_otg_update_host_transfer_schedule_locked(sc)) + dwc_otg_interrupt_poll_locked(sc); } } - USB_BUS_SPIN_UNLOCK(&sc->sc_bus); USB_BUS_UNLOCK(&sc->sc_bus); } @@ -3269,12 +3268,13 @@ dwc_otg_start_standard_chain(struct usb_ * endpoint interrupts. Else wait for SOF interrupt in host * mode. */ + USB_BUS_SPIN_LOCK(&sc->sc_bus); + if (sc->sc_flags.status_device_mode != 0) { dwc_otg_xfer_do_fifo(sc, xfer); - if (dwc_otg_xfer_do_complete(sc, xfer)) - return; + if (dwc_otg_xfer_do_complete_locked(sc, xfer)) + goto done; } - USB_BUS_SPIN_LOCK(&sc->sc_bus); /* put transfer on interrupt queue */ usbd_transfer_enqueue(&xfer->xroot->bus->intr_q, xfer); @@ -3451,6 +3451,8 @@ dwc_otg_device_done(struct usb_xfer *xfe DPRINTFN(9, "xfer=%p, endpoint=%p, error=%d\n", xfer, xfer->endpoint, error); + USB_BUS_SPIN_LOCK(&sc->sc_bus); + if (xfer->flags_int.usb_mode == USB_MODE_DEVICE) { /* Interrupts are cleared by the interrupt handler */ } else { @@ -3465,6 +3467,8 @@ dwc_otg_device_done(struct usb_xfer *xfe } /* dequeue transfer and start next transfer */ usbd_transfer_done(xfer, error); + + USB_BUS_SPIN_UNLOCK(&sc->sc_bus); } static void @@ -3492,6 +3496,8 @@ dwc_otg_set_stall(struct usb_device *ude sc = DWC_OTG_BUS2SC(udev->bus); + USB_BUS_SPIN_LOCK(&sc->sc_bus); + /* get endpoint address */ ep_no = ep->edesc->bEndpointAddress; @@ -3520,14 +3526,15 @@ dwc_otg_set_stall(struct usb_device *ude /* dump data */ dwc_otg_common_rx_ack(sc); /* poll interrupt */ - dwc_otg_interrupt_poll(sc); - dwc_otg_interrupt_complete(sc); + dwc_otg_interrupt_poll_locked(sc); + dwc_otg_interrupt_complete_locked(sc); } } + USB_BUS_SPIN_UNLOCK(&sc->sc_bus); } static void -dwc_otg_clear_stall_sub(struct dwc_otg_softc *sc, uint32_t mps, +dwc_otg_clear_stall_sub_locked(struct dwc_otg_softc *sc, uint32_t mps, uint8_t ep_no, uint8_t ep_type, uint8_t ep_dir) { uint32_t reg; @@ -3585,8 +3592,8 @@ dwc_otg_clear_stall_sub(struct dwc_otg_s } /* poll interrupt */ - dwc_otg_interrupt_poll(sc); - dwc_otg_interrupt_complete(sc); + dwc_otg_interrupt_poll_locked(sc); + dwc_otg_interrupt_complete_locked(sc); } static void @@ -3607,15 +3614,19 @@ dwc_otg_clear_stall(struct usb_device *u /* get softc */ sc = DWC_OTG_BUS2SC(udev->bus); + USB_BUS_SPIN_LOCK(&sc->sc_bus); + /* get endpoint descriptor */ ed = ep->edesc; /* reset endpoint */ - dwc_otg_clear_stall_sub(sc, + dwc_otg_clear_stall_sub_locked(sc, UGETW(ed->wMaxPacketSize), (ed->bEndpointAddress & UE_ADDR), (ed->bmAttributes & UE_XFERTYPE), (ed->bEndpointAddress & (UE_DIR_IN | UE_DIR_OUT))); + + USB_BUS_SPIN_UNLOCK(&sc->sc_bus); } static void @@ -3886,12 +3897,12 @@ dwc_otg_do_poll(struct usb_bus *bus) USB_BUS_LOCK(&sc->sc_bus); USB_BUS_SPIN_LOCK(&sc->sc_bus); - dwc_otg_interrupt_poll(sc); - dwc_otg_interrupt_complete(sc); + dwc_otg_interrupt_poll_locked(sc); + dwc_otg_interrupt_complete_locked(sc); if (sc->sc_flags.status_device_mode == 0) { /* update host transfer schedule, so that new transfers can be issued */ - if (dwc_otg_update_host_transfer_schedule(sc)) - dwc_otg_interrupt_poll(sc); + if (dwc_otg_update_host_transfer_schedule_locked(sc)) + dwc_otg_interrupt_poll_locked(sc); } USB_BUS_SPIN_UNLOCK(&sc->sc_bus); USB_BUS_UNLOCK(&sc->sc_bus); From owner-svn-src-stable@FreeBSD.ORG Wed Jun 4 06:21:55 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94642894; Wed, 4 Jun 2014 06:21:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 67997285E; Wed, 4 Jun 2014 06:21:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s546Lt8m008335; Wed, 4 Jun 2014 06:21:55 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s546LtSA008332; Wed, 4 Jun 2014 06:21:55 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201406040621.s546LtSA008332@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 4 Jun 2014 06:21:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267040 - stable/10/sys/powerpc/powerpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 06:21:55 -0000 Author: nwhitehorn Date: Wed Jun 4 06:21:54 2014 New Revision: 267040 URL: http://svnweb.freebsd.org/changeset/base/267040 Log: MFC r266778: Repair nested signal handling on PowerPC. The signal trampoline code was not allocating space for the parameter save area in the stack frame. If the compiler chose to save the argument to the signal handler on the stack, it would overwrite the first 32 bits of the sigaction struct with it, corrupting it for a subsequent invocation. PR: powerpc/183040 Modified: stable/10/sys/powerpc/powerpc/sigcode32.S stable/10/sys/powerpc/powerpc/sigcode64.S Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/powerpc/powerpc/sigcode32.S ============================================================================== --- stable/10/sys/powerpc/powerpc/sigcode32.S Wed Jun 4 06:15:45 2014 (r267039) +++ stable/10/sys/powerpc/powerpc/sigcode32.S Wed Jun 4 06:21:54 2014 (r267040) @@ -45,9 +45,9 @@ */ .globl CNAME(sigcode32),CNAME(szsigcode32) CNAME(sigcode32): - addi 1,1,-16 /* reserved space for callee */ + addi 1,1,-20 /* reserved space for callee */ blrl - addi 3,1,16+SF_UC /* restore sp, and get &frame->sf_uc */ + addi 3,1,20+SF_UC /* restore sp, and get &frame->sf_uc */ li 0,SYS_sigreturn sc /* sigreturn(scp) */ li 0,SYS_exit Modified: stable/10/sys/powerpc/powerpc/sigcode64.S ============================================================================== --- stable/10/sys/powerpc/powerpc/sigcode64.S Wed Jun 4 06:15:45 2014 (r267039) +++ stable/10/sys/powerpc/powerpc/sigcode64.S Wed Jun 4 06:21:54 2014 (r267040) @@ -45,7 +45,7 @@ */ .globl CNAME(sigcode64),CNAME(szsigcode64) CNAME(sigcode64): - addi 1,1,-48 /* reserved space for callee */ + addi 1,1,-112 /* reserved space for callee */ mflr 2 /* resolve function descriptor */ ld 0,0(2) ld 2,8(2) @@ -53,7 +53,7 @@ CNAME(sigcode64): blrl - addi 3,1,48+SF_UC /* restore sp, and get &frame->sf_uc */ + addi 3,1,112+SF_UC /* restore sp, and get &frame->sf_uc */ li 0,SYS_sigreturn sc /* sigreturn(scp) */ li 0,SYS_exit From owner-svn-src-stable@FreeBSD.ORG Wed Jun 4 09:44:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 277F9C4A; Wed, 4 Jun 2014 09:44:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 13F872BC7; Wed, 4 Jun 2014 09:44:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s549i5Xn098706; Wed, 4 Jun 2014 09:44:05 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s549i5NA098705; Wed, 4 Jun 2014 09:44:05 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201406040944.s549i5NA098705@svn.freebsd.org> From: Marius Strobl Date: Wed, 4 Jun 2014 09:44:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267042 - stable/10/sys/dev/drm2/radeon X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 09:44:06 -0000 Author: marius Date: Wed Jun 4 09:44:05 2014 New Revision: 267042 URL: http://svnweb.freebsd.org/changeset/base/267042 Log: MFC: r266792 Fix DMA handling in radeon_dummy_page_init(): - Based on actual usage and on what Linux does, dummy_page.addr should contain the physical bus address of the dummy page rather than its virtual one. As a side-effect, correcting this bug fixes compilation with PAE support enabled by getting rid of an inappropriate cast. - Also based on actual usage of dummy_page.addr, theoretically Radeon devices could do a maximum of 44-bit DMA. In reality, though, it is more likely that they only support 32-bit DMA, at least that is what radeon_gart_table_ram_alloc() sets up for, too. However, passing ~0 to drm_pci_alloc() as maxaddr parameter translates to 64-bit DMA on amd64/64-bit machines. Thus, use BUS_SPACE_MAXSIZE_32BIT instead, which the existing 32-bit DMA limits within the drm2 code spelled as 0xFFFFFFFF should also be changed to. Reviewed by: dumbbell Sponsored by: Bally Wulff Games & Entertainment GmbH Modified: stable/10/sys/dev/drm2/radeon/radeon_device.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/drm2/radeon/radeon_device.c ============================================================================== --- stable/10/sys/dev/drm2/radeon/radeon_device.c Wed Jun 4 09:18:13 2014 (r267041) +++ stable/10/sys/dev/drm2/radeon/radeon_device.c Wed Jun 4 09:44:05 2014 (r267042) @@ -548,10 +548,10 @@ int radeon_dummy_page_init(struct radeon if (rdev->dummy_page.dmah) return 0; rdev->dummy_page.dmah = drm_pci_alloc(rdev->ddev, - PAGE_SIZE, PAGE_SIZE, ~0); + PAGE_SIZE, PAGE_SIZE, BUS_SPACE_MAXSIZE_32BIT); if (rdev->dummy_page.dmah == NULL) return -ENOMEM; - rdev->dummy_page.addr = (dma_addr_t)rdev->dummy_page.dmah->vaddr; + rdev->dummy_page.addr = rdev->dummy_page.dmah->busaddr; return 0; } From owner-svn-src-stable@FreeBSD.ORG Wed Jun 4 09:54:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D518F78; Wed, 4 Jun 2014 09:54:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 101192CCC; Wed, 4 Jun 2014 09:54:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s549s15I003096; Wed, 4 Jun 2014 09:54:01 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s549s1c2003095; Wed, 4 Jun 2014 09:54:01 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201406040954.s549s1c2003095@svn.freebsd.org> From: Marius Strobl Date: Wed, 4 Jun 2014 09:54:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267043 - stable/10/sys/dev/sound/pci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 09:54:02 -0000 Author: marius Date: Wed Jun 4 09:54:01 2014 New Revision: 267043 URL: http://svnweb.freebsd.org/changeset/base/267043 Log: MFC: r266793, r266799, r266808 - Fix compilation with PAE support enabled by merging r233362 and, thus, doing away with the unnecessary uint8_t pointer casting. physical addresses. - Nuke the unused softc of emujoy(4). - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. Sponsored by: Bally Wulff Games & Entertainment GmbH Modified: stable/10/sys/dev/sound/pci/emu10k1.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/pci/emu10k1.c ============================================================================== --- stable/10/sys/dev/sound/pci/emu10k1.c Wed Jun 4 09:44:05 2014 (r267042) +++ stable/10/sys/dev/sound/pci/emu10k1.c Wed Jun 4 09:54:01 2014 (r267043) @@ -1378,7 +1378,7 @@ emu_memalloc(struct sc_info *sc, u_int32 ofs = 0; for (idx = start; idx < start + blksz; idx++) { mem->bmap[idx >> 3] |= 1 << (idx & 7); - tmp = (u_int32_t)(u_long)((u_int8_t *)blk->buf_addr + ofs); + tmp = (uint32_t)(blk->buf_addr + ofs); #ifdef EMUDEBUG printf("pte[%d] -> %x phys, %x virt\n", idx, tmp, ((u_int32_t)buf) + ofs); @@ -2182,7 +2182,7 @@ static device_method_t emu_methods[] = { DEVMETHOD(device_attach, emu_pci_attach), DEVMETHOD(device_detach, emu_pci_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t emu_driver = { @@ -2191,7 +2191,7 @@ static driver_t emu_driver = { PCM_SOFTC_SIZE, }; -DRIVER_MODULE(snd_emu10k1, pci, emu_driver, pcm_devclass, 0, 0); +DRIVER_MODULE(snd_emu10k1, pci, emu_driver, pcm_devclass, NULL, NULL); MODULE_DEPEND(snd_emu10k1, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER); MODULE_VERSION(snd_emu10k1, 1); MODULE_DEPEND(snd_emu10k1, midi, 1, 1, 1); @@ -2220,12 +2220,14 @@ emujoy_pci_probe(device_t dev) static int emujoy_pci_attach(device_t dev) { + return 0; } static int emujoy_pci_detach(device_t dev) { + return 0; } @@ -2234,16 +2236,15 @@ static device_method_t emujoy_methods[] DEVMETHOD(device_attach, emujoy_pci_attach), DEVMETHOD(device_detach, emujoy_pci_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t emujoy_driver = { "emujoy", emujoy_methods, - 8, + 1 /* no softc */ }; static devclass_t emujoy_devclass; -DRIVER_MODULE(emujoy, pci, emujoy_driver, emujoy_devclass, 0, 0); - +DRIVER_MODULE(emujoy, pci, emujoy_driver, emujoy_devclass, NULL, NULL); From owner-svn-src-stable@FreeBSD.ORG Wed Jun 4 10:33:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66633E37; Wed, 4 Jun 2014 10:33:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52E802077; Wed, 4 Jun 2014 10:33:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s54AXVfc021701; Wed, 4 Jun 2014 10:33:31 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s54AXVP1021700; Wed, 4 Jun 2014 10:33:31 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201406041033.s54AXVP1021700@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 4 Jun 2014 10:33:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267045 - stable/10/usr.sbin/usbdump X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 10:33:31 -0000 Author: hselasky Date: Wed Jun 4 10:33:30 2014 New Revision: 267045 URL: http://svnweb.freebsd.org/changeset/base/267045 Log: MFC r266798 and r266803: Fix for big-endian architectures. Modified: stable/10/usr.sbin/usbdump/usbdump.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/usbdump/usbdump.c ============================================================================== --- stable/10/usr.sbin/usbdump/usbdump.c Wed Jun 4 10:29:01 2014 (r267044) +++ stable/10/usr.sbin/usbdump/usbdump.c Wed Jun 4 10:33:30 2014 (r267045) @@ -472,7 +472,6 @@ print_apacket(const struct header_32 *hd */ up->up_totlen = le32toh(up->up_totlen); up->up_busunit = le32toh(up->up_busunit); - up->up_address = le32toh(up->up_address); up->up_flags = le32toh(up->up_flags); up->up_status = le32toh(up->up_status); up->up_error = le32toh(up->up_error); From owner-svn-src-stable@FreeBSD.ORG Wed Jun 4 10:36:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29D0A390; Wed, 4 Jun 2014 10:36:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 163DB20B8; Wed, 4 Jun 2014 10:36:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s54Aa2qk022343; Wed, 4 Jun 2014 10:36:02 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s54Aa2xn022342; Wed, 4 Jun 2014 10:36:02 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201406041036.s54Aa2xn022342@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 4 Jun 2014 10:36:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r267046 - stable/8/usr.sbin/usbdump X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 10:36:03 -0000 Author: hselasky Date: Wed Jun 4 10:36:02 2014 New Revision: 267046 URL: http://svnweb.freebsd.org/changeset/base/267046 Log: MFC r266798 and r266803: Fix for big-endian architectures. Modified: stable/8/usr.sbin/usbdump/usbdump.c (contents, props changed) Directory Properties: stable/8/usr.sbin/ (props changed) stable/8/usr.sbin/usbdump/ (props changed) Modified: stable/8/usr.sbin/usbdump/usbdump.c ============================================================================== --- stable/8/usr.sbin/usbdump/usbdump.c Wed Jun 4 10:33:30 2014 (r267045) +++ stable/8/usr.sbin/usbdump/usbdump.c Wed Jun 4 10:36:02 2014 (r267046) @@ -473,7 +473,6 @@ print_apacket(const struct header_32 *hd */ up->up_totlen = le32toh(up->up_totlen); up->up_busunit = le32toh(up->up_busunit); - up->up_address = le32toh(up->up_address); up->up_flags = le32toh(up->up_flags); up->up_status = le32toh(up->up_status); up->up_error = le32toh(up->up_error); From owner-svn-src-stable@FreeBSD.ORG Wed Jun 4 10:40:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 100565E8; Wed, 4 Jun 2014 10:40:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F066E20F8; Wed, 4 Jun 2014 10:40:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s54AehgQ025104; Wed, 4 Jun 2014 10:40:43 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s54AehEl025103; Wed, 4 Jun 2014 10:40:43 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201406041040.s54AehEl025103@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 4 Jun 2014 10:40:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267047 - stable/10/lib/libusb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 10:40:44 -0000 Author: hselasky Date: Wed Jun 4 10:40:43 2014 New Revision: 267047 URL: http://svnweb.freebsd.org/changeset/base/267047 Log: MFC r266664: Add empty LIBUSB_CALL macro, to be compatible to the libusb 1.0-API from sourceforge. PR: usb/190204 Modified: stable/10/lib/libusb/libusb.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libusb/libusb.h ============================================================================== --- stable/10/lib/libusb/libusb.h Wed Jun 4 10:36:02 2014 (r267046) +++ stable/10/lib/libusb/libusb.h Wed Jun 4 10:40:43 2014 (r267047) @@ -33,6 +33,8 @@ #include #endif +#define LIBUSB_CALL + #ifdef __cplusplus extern "C" { #endif From owner-svn-src-stable@FreeBSD.ORG Wed Jun 4 10:42:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A130785; Wed, 4 Jun 2014 10:42:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 170162197; Wed, 4 Jun 2014 10:42:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s54Ag49i026219; Wed, 4 Jun 2014 10:42:04 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s54Ag4qe026218; Wed, 4 Jun 2014 10:42:04 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201406041042.s54Ag4qe026218@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 4 Jun 2014 10:42:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r267048 - stable/8/lib/libusb X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 10:42:05 -0000 Author: hselasky Date: Wed Jun 4 10:42:04 2014 New Revision: 267048 URL: http://svnweb.freebsd.org/changeset/base/267048 Log: MFC r266664: Add empty LIBUSB_CALL macro, to be compatible to the libusb 1.0-API from sourceforge. PR: usb/190204 Modified: stable/8/lib/libusb/libusb.h Directory Properties: stable/8/lib/ (props changed) stable/8/lib/libusb/ (props changed) Modified: stable/8/lib/libusb/libusb.h ============================================================================== --- stable/8/lib/libusb/libusb.h Wed Jun 4 10:40:43 2014 (r267047) +++ stable/8/lib/libusb/libusb.h Wed Jun 4 10:42:04 2014 (r267048) @@ -30,6 +30,8 @@ #include #include +#define LIBUSB_CALL + #ifdef __cplusplus extern "C" { #endif From owner-svn-src-stable@FreeBSD.ORG Wed Jun 4 11:06:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A53D379E; Wed, 4 Jun 2014 11:06:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91E3F23FF; Wed, 4 Jun 2014 11:06:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s54B6c5O036265; Wed, 4 Jun 2014 11:06:38 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s54B6cxQ036264; Wed, 4 Jun 2014 11:06:38 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201406041106.s54B6cxQ036264@svn.freebsd.org> From: Marius Strobl Date: Wed, 4 Jun 2014 11:06:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267049 - stable/10/sys/i386/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 11:06:38 -0000 Author: marius Date: Wed Jun 4 11:06:38 2014 New Revision: 267049 URL: http://svnweb.freebsd.org/changeset/base/267049 Log: MFC: r266820 (partial) - Shrink the list of excluded modules to what actually still doesn't build as of r267043. - Some style cleanups. Modified: stable/10/sys/i386/conf/XEN Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/i386/conf/XEN ============================================================================== --- stable/10/sys/i386/conf/XEN Wed Jun 4 10:42:04 2014 (r267048) +++ stable/10/sys/i386/conf/XEN Wed Jun 4 11:06:38 2014 (r267049) @@ -6,12 +6,13 @@ cpu I686_CPU ident XEN -makeoptions DEBUG=-gdwarf-2 # Build kernel with gdb(1) debug symbols -makeoptions WITHOUT_MODULES="aha ahb amd ctl cxgb dpt drm drm2 hptnr hptmv ida malo mpr mps mwl nve rdma sound sym trm xfs" +makeoptions DEBUG=-g + +# The following modules don't build with PAE and XEN enabled. +makeoptions WITHOUT_MODULES="ctl cxgb dpt drm drm2 hptmv ida malo mwl rdma" options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption -#options SCHED_4BSD options INET # InterNETworking options INET6 # IPv6 communications protocols @@ -65,7 +66,6 @@ options MCLSHIFT=12 options SMP # Symmetric MultiProcessor Kernel device apic # I/O APIC - #device atkbdc # AT keyboard controller #device atkbd # AT keyboard device psm # PS/2 mouse @@ -90,4 +90,3 @@ options AH_SUPPORT_AR5416 # Be aware of the administrative consequences of enabling this! # Note that 'bpf' is required for DHCP. device bpf # Berkeley packet filter - From owner-svn-src-stable@FreeBSD.ORG Wed Jun 4 12:03:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA9C7276; Wed, 4 Jun 2014 12:03:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6BE32A07; Wed, 4 Jun 2014 12:03:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s54C3pPl063474; Wed, 4 Jun 2014 12:03:51 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s54C3p5e063473; Wed, 4 Jun 2014 12:03:51 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201406041203.s54C3p5e063473@svn.freebsd.org> From: Marius Strobl Date: Wed, 4 Jun 2014 12:03:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267050 - stable/10/sys/i386/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 12:03:52 -0000 Author: marius Date: Wed Jun 4 12:03:51 2014 New Revision: 267050 URL: http://svnweb.freebsd.org/changeset/base/267050 Log: MFC: r266821 (partial) - Actually, modules are built correctly when compiled along the kernel as they then pick up an opt_global.h from KERNBUILDDIR having PAE defined. Thus, build all modules by default except those which still really are defective as of r267043. - Minor style cleanup. Modified: stable/10/sys/i386/conf/PAE Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/i386/conf/PAE ============================================================================== --- stable/10/sys/i386/conf/PAE Wed Jun 4 11:06:38 2014 (r267049) +++ stable/10/sys/i386/conf/PAE Wed Jun 4 12:03:51 2014 (r267050) @@ -10,9 +10,8 @@ ident PAE-GENERIC # To make a PAE kernel, the next option is needed options PAE # Physical Address Extensions Kernel -# Don't build modules with this kernel config, since they are not built with -# the correct options headers. -makeoptions NO_MODULES=yes +# The following modules don't build with PAE enabled. +makeoptions WITHOUT_MODULES="ctl dpt hptmv ida malo mwl" # force isp firmware to fully loaded device ispfw @@ -23,7 +22,6 @@ device ispfw # address properly may cause data corruption when used in a machine with more # than 4 gigabytes of memory. - nodevice ahb nodevice sym nodevice trm From owner-svn-src-stable@FreeBSD.ORG Wed Jun 4 12:24:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B3FC9C1; Wed, 4 Jun 2014 12:24:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 572B72BEC; Wed, 4 Jun 2014 12:24:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s54COsZV073806; Wed, 4 Jun 2014 12:24:54 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s54COsEY073805; Wed, 4 Jun 2014 12:24:54 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406041224.s54COsEY073805@svn.freebsd.org> From: Alexander Motin Date: Wed, 4 Jun 2014 12:24:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r267052 - stable/7/sys/cam X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 12:24:54 -0000 Author: mav Date: Wed Jun 4 12:24:53 2014 New Revision: 267052 URL: http://svnweb.freebsd.org/changeset/base/267052 Log: MFC r237398: In camisr() clear CAM_SIM_ON_DONEQ flag after camisr_runqueue() purged SIM done queue. Clearing it before caused extra SIM queueing in some cases. It was invisible during normal operation, but during USB device unplug and respective SIM destruction it could keep pointer on SIM without having counted reference and as result crash the system by use afer free. PR: usb/168743 Modified: stable/7/sys/cam/cam_xpt.c Directory Properties: stable/7/ (props changed) stable/7/sys/ (props changed) Modified: stable/7/sys/cam/cam_xpt.c ============================================================================== --- stable/7/sys/cam/cam_xpt.c Wed Jun 4 12:05:47 2014 (r267051) +++ stable/7/sys/cam/cam_xpt.c Wed Jun 4 12:24:53 2014 (r267052) @@ -7227,8 +7227,8 @@ camisr(void *dummy) while ((sim = TAILQ_FIRST(&queue)) != NULL) { TAILQ_REMOVE(&queue, sim, links); CAM_SIM_LOCK(sim); - sim->flags &= ~CAM_SIM_ON_DONEQ; camisr_runqueue(&sim->sim_doneq); + sim->flags &= ~CAM_SIM_ON_DONEQ; CAM_SIM_UNLOCK(sim); } } From owner-svn-src-stable@FreeBSD.ORG Wed Jun 4 12:26:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A015BAA; Wed, 4 Jun 2014 12:26:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65EA42C1C; Wed, 4 Jun 2014 12:26:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s54CQsVa074268; Wed, 4 Jun 2014 12:26:54 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s54CQsaJ074267; Wed, 4 Jun 2014 12:26:54 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201406041226.s54CQsaJ074267@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 4 Jun 2014 12:26:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267053 - stable/9/usr.sbin/usbdump X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 12:26:54 -0000 Author: hselasky Date: Wed Jun 4 12:26:53 2014 New Revision: 267053 URL: http://svnweb.freebsd.org/changeset/base/267053 Log: MFC r266798 and r266803: Fix for big-endian architectures. Approved by: re, marius @ Modified: stable/9/usr.sbin/usbdump/usbdump.c Directory Properties: stable/9/usr.sbin/usbdump/ (props changed) Modified: stable/9/usr.sbin/usbdump/usbdump.c ============================================================================== --- stable/9/usr.sbin/usbdump/usbdump.c Wed Jun 4 12:24:53 2014 (r267052) +++ stable/9/usr.sbin/usbdump/usbdump.c Wed Jun 4 12:26:53 2014 (r267053) @@ -473,7 +473,6 @@ print_apacket(const struct header_32 *hd */ up->up_totlen = le32toh(up->up_totlen); up->up_busunit = le32toh(up->up_busunit); - up->up_address = le32toh(up->up_address); up->up_flags = le32toh(up->up_flags); up->up_status = le32toh(up->up_status); up->up_error = le32toh(up->up_error); From owner-svn-src-stable@FreeBSD.ORG Wed Jun 4 13:42:19 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9F24942; Wed, 4 Jun 2014 13:42:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5E54243F; Wed, 4 Jun 2014 13:42:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s54DgJ3w012035; Wed, 4 Jun 2014 13:42:19 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s54DgJIN012034; Wed, 4 Jun 2014 13:42:19 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201406041342.s54DgJIN012034@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 4 Jun 2014 13:42:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267055 - stable/9/lib/libusb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 13:42:20 -0000 Author: hselasky Date: Wed Jun 4 13:42:19 2014 New Revision: 267055 URL: http://svnweb.freebsd.org/changeset/base/267055 Log: MFC r266664: Add empty LIBUSB_CALL macro, to be compatible to the libusb 1.0-API from sourceforge. PR: usb/190204 Approved by: re, gjb @ Modified: stable/9/lib/libusb/libusb.h Directory Properties: stable/9/lib/libusb/ (props changed) Modified: stable/9/lib/libusb/libusb.h ============================================================================== --- stable/9/lib/libusb/libusb.h Wed Jun 4 13:12:07 2014 (r267054) +++ stable/9/lib/libusb/libusb.h Wed Jun 4 13:42:19 2014 (r267055) @@ -30,6 +30,8 @@ #include #include +#define LIBUSB_CALL + #ifdef __cplusplus extern "C" { #endif From owner-svn-src-stable@FreeBSD.ORG Wed Jun 4 14:58:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E3AB874; Wed, 4 Jun 2014 14:58:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A7952B8B; Wed, 4 Jun 2014 14:58:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s54Ewq5f045131; Wed, 4 Jun 2014 14:58:52 GMT (envelope-from roberto@svn.freebsd.org) Received: (from roberto@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s54Ewqkr045130; Wed, 4 Jun 2014 14:58:52 GMT (envelope-from roberto@svn.freebsd.org) Message-Id: <201406041458.s54Ewqkr045130@svn.freebsd.org> From: Ollivier Robert Date: Wed, 4 Jun 2014 14:58:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267056 - stable/10/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 14:58:52 -0000 Author: roberto Date: Wed Jun 4 14:58:51 2014 New Revision: 267056 URL: http://svnweb.freebsd.org/changeset/base/267056 Log: MFC r266107,r266108,r266109: Here is a patch for the bsdinstall root-on-zfs stuff that adds optional encryption for swap, and optional gmirror for swap (which can be combined) Updates to the datasets created by zfsboot. Set compress=lz4 for the entire pool, removing it from the individual datasets Remove exec=no from /usr/src, breaks the test suite. Fix the "disks" variable reuse. It starts off being used to track the grammar for the number of disks (singular vs plural) and then it is reused as the list of available disks. Replace the variable with disks_grammar and move 'disk' and 'disks' to msg_ vars so they can be translated in the future. Submitted by: Allan Jude Reviewed by: roberto Sponsored by: ScaleEngine Inc. Modified: stable/10/usr.sbin/bsdinstall/scripts/zfsboot Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/zfsboot Wed Jun 4 13:42:19 2014 (r267055) +++ stable/10/usr.sbin/bsdinstall/scripts/zfsboot Wed Jun 4 14:58:51 2014 (r267056) @@ -108,6 +108,16 @@ f_include $BSDCFG_SHARE/variable.subr : ${ZFSBOOT_SWAP_SIZE:=2g} # +# Should we use geli(8) to encrypt the swap? +# +: ${ZFSBOOT_SWAP_ENCRYPTION=} + +# +# Should we use gmirror(8) to mirror the swap? +# +: ${ZFSBOOT_SWAP_MIRROR=} + +# # Default ZFS datasets for root zpool # # NOTE: Requires /tmp, /var/tmp, /$ZFSBOOT_BOOTFS_NAME/$ZFSBOOT_BOOTFS_NAME @@ -121,7 +131,7 @@ f_isset ZFSBOOT_DATASETS || ZFSBOOT_DATA /$ZFSBOOT_BEROOT_NAME/$ZFSBOOT_BOOTFS_NAME mountpoint=/ # Compress /tmp, allow exec but not setuid - /tmp mountpoint=/tmp,compression=lz4,exec=on,setuid=off + /tmp mountpoint=/tmp,exec=on,setuid=off # Don't mount /usr so that 'base' files go to the BEROOT /usr mountpoint=/usr,canmount=off @@ -130,17 +140,17 @@ f_isset ZFSBOOT_DATASETS || ZFSBOOT_DATA /usr/home # NB: /home is a symlink to /usr/home # Ports tree - /usr/ports compression=lz4,setuid=off + /usr/ports setuid=off # Source tree (compressed) - /usr/src compression=lz4,exec=off,setuid=off + /usr/src # Create /var and friends /var mountpoint=/var - /var/crash compression=lz4,exec=off,setuid=off - /var/log compression=lz4,exec=off,setuid=off - /var/mail compression=lz4,atime=on - /var/tmp compression=lz4,exec=on,setuid=off + /var/crash exec=off,setuid=off + /var/log exec=off,setuid=off + /var/mail atime=on + /var/tmp setuid=off " # END-QUOTE # @@ -184,6 +194,7 @@ MOUNT_TYPE='mount -t %s "%s" "%s"' PRINTF_CONF="printf '%s=\"%%s\"\\\n' %s >> \"%s\"" PRINTF_FSTAB='printf "$FSTAB_FMT" "%s" "%s" "%s" "%s" "%s" "%s" >> "%s"' SHELL_TRUNCATE=':> "%s"' +SWAP_GMIRROR_LABEL='gmirror label swap %s' UMOUNT='umount "%s"' ZFS_CREATE_WITH_OPTIONS='zfs create %s "%s"' ZFS_SET='zfs set "%s" "%s"' @@ -209,6 +220,8 @@ msg_configure_options="Configure Options msg_detailed_disk_info="gpart(8) show %s:\n%s\n\ncamcontrol(8) inquiry %s:\n%s\n\n\ncamcontrol(8) identify %s:\n%s\n" msg_disk_info="Disk Info" msg_disk_info_help="Get detailed information on disk device(s)" +msg_disk_singular="disk" +msg_disk_plural="disks" msg_encrypt_disks="Encrypt Disks?" msg_encrypt_disks_help="Use geli(8) to encrypt all data partitions" msg_error="Error" @@ -263,6 +276,10 @@ msg_select_a_disk_device="Select a disk msg_select_virtual_device_type="Select Virtual Device type:" msg_stripe_desc="Stripe - No Redundancy" msg_stripe_help="[1+ Disks] Striping provides maximum storage but no redundancy" +msg_swap_encrypt="Encrypt Swap?" +msg_swap_encrypt_help="Encrypt swap partitions with temporary keys, discarded on reboot" +msg_swap_mirror="Mirror Swap?" +msg_swap_mirror_help="Mirror swap partitions for redundancy, breaks crash dumps" msg_swap_size="Swap Size" msg_swap_size_help="Customize how much swap space is allocated to each selected disk" msg_these_disks_are_too_small="These disks are too small given the amount of requested\nswap (%s) and/or geli(8) (%s) partitions, which would\ntake 50%% or more of each of the following selected disk\ndevices (not recommended):\n\n %s\n\nRecommend changing partition size(s) and/or selecting a\ndifferent set of devices." @@ -285,15 +302,20 @@ dialog_menu_main() local prompt="$msg_configure_options" local force4k="$msg_no" local usegeli="$msg_no" + local swapgeli="$msg_no" + local swapmirror="$msg_no" [ "$ZFSBOOT_GNOP_4K_FORCE_ALIGN" ] && force4k="$msg_yes" [ "$ZFSBOOT_GELI_ENCRYPTION" ] && usegeli="$msg_yes" - local disks n + [ "$ZFSBOOT_SWAP_ENCRYPTION" ] && swapgeli="$msg_yes" + [ "$ZFSBOOT_SWAP_MIRROR" ] && swapmirror="$msg_yes" + local disks n disks_grammar f_count n $ZFSBOOT_DISKS - { [ $n -eq 1 ] && disks=disk; } || disks=disks # grammar + { [ $n -eq 1 ] && disks_grammar=$msg_disk_singular; } || + disks_grammar=$msg_disk_plural # grammar local menu_list=" '>>> $msg_install' '$msg_install_desc' '$msg_install_help' - 'T $msg_pool_type_disks' '$ZFSBOOT_VDEV_TYPE: $n $disks' + 'T $msg_pool_type_disks' '$ZFSBOOT_VDEV_TYPE: $n $disks_grammar' '$msg_pool_type_disks_help' '- $msg_rescan_devices' '*' '$msg_rescan_devices_help' @@ -309,6 +331,10 @@ dialog_menu_main() '$msg_partition_scheme_help' 'S $msg_swap_size' '$ZFSBOOT_SWAP_SIZE' '$msg_swap_size_help' + 'M $msg_swap_mirror' '$swapmirror' + '$msg_swap_mirror_help' + 'W $msg_swap_encrypt' '$swapgeli' + '$msg_swap_encrypt_help' " # END-QUOTE local defaultitem= # Calculated below local hline="$hline_alnum_arrows_punc_tab_enter" @@ -747,14 +773,14 @@ zfs_create_diskpart() return $FAILURE # NB: zpool will use the `zfs#' GPT labels - bootpart=p2 targetpart=p2 + bootpart=p2 swappart=p2 targetpart=p2 [ ${swapsize:-0} -gt 0 ] && targetpart=p3 # # Prepare boot pool if enabled (e.g., for geli(8)) # if [ "$ZFSBOOT_BOOT_POOL" ]; then - bootpart=p2 targetpart=p3 + bootpart=p2 swappart=p3 targetpart=p3 [ ${swapsize:-0} -gt 0 ] && targetpart=p4 f_eval_catch $funcname gpart \ "$GPART_ADD_LABEL_WITH_SIZE" boot$index \ @@ -781,12 +807,7 @@ zfs_create_diskpart() return $FAILURE # Pedantically nuke any old labels on the swap f_eval_catch -d $funcname zpool "$ZPOOL_LABELCLEAR_F" \ - /dev/gpt/swap$index - # Update fstab(5) - f_eval_catch $funcname printf "$PRINTF_FSTAB" \ - /dev/gpt/swap$index none swap sw 0 0 \ - $BSDINSTALL_TMPETC/fstab || - return $FAILURE + /dev/$disk$swappart fi # @@ -827,7 +848,7 @@ zfs_create_diskpart() return $FAILURE # NB: zpool will use s1a (no labels) - bootpart=s1a targetpart=s1d mbrindex=4 + bootpart=s1a swappart=s1b targetpart=s1d mbrindex=4 # # Always prepare a boot pool on MBR @@ -858,11 +879,6 @@ zfs_create_diskpart() # Pedantically nuke any old labels on the swap f_eval_catch -d $funcname zpool "$ZPOOL_LABELCLEAR_F" \ /dev/${disk}s1b - # Update fstab(5) - f_eval_catch $funcname printf "$PRINTF_FSTAB" \ - /dev/${disk}s1b none swap sw 0 0 \ - $BSDINSTALL_TMPETC/fstab || - return $FAILURE fi # @@ -879,6 +895,33 @@ zfs_create_diskpart() esac # $ZFSBOOT_PARTITION_SCHEME + # Update fstab(5) + if [ "$isswapmirror" ]; then + # This is not the first disk in the mirror, do nothing + elif [ "$ZFSBOOT_SWAP_ENCRYPTION" -a "$ZFSBOOT_SWAP_MIRROR" ]; then + f_eval_catch $funcname printf "$PRINTF_FSTAB" \ + /dev/mirror/swap.eli none swap sw 0 0 \ + $BSDINSTALL_TMPETC/fstab || + return $FAILURE + isswapmirror=1 + elif [ "$ZFSBOOT_SWAP_MIRROR" ]; then + f_eval_catch $funcname printf "$PRINTF_FSTAB" \ + /dev/mirror/swap none swap sw 0 0 \ + $BSDINSTALL_TMPETC/fstab || + return $FAILURE + isswapmirror=1 + elif [ "$ZFSBOOT_SWAP_ENCRYPTION" ]; then + f_eval_catch $funcname printf "$PRINTF_FSTAB" \ + /dev/$disk${swappart}.eli none swap sw 0 0 \ + $BSDINSTALL_TMPETC/fstab || + return $FAILURE + else + f_eval_catch $funcname printf "$PRINTF_FSTAB" \ + /dev/$disk$swappart none swap sw 0 0 \ + $BSDINSTALL_TMPETC/fstab || + return $FAILURE + fi + return $SUCCESS } @@ -893,10 +936,12 @@ zfs_create_boot() local zroot_name="$1" local zroot_vdevtype="$2" local zroot_vdevs= # Calculated below + local swap_devs= # Calculated below local boot_vdevs= # Used for geli(8) and/or MBR layouts shift 2 # poolname vdev_type local disks="$*" disk - local bootpart targetpart # Set by zfs_create_diskpart() below + local isswapmirror + local bootpart targetpart swappart # Set by zfs_create_diskpart() below # # Pedantic checks; should never be seen @@ -968,7 +1013,8 @@ zfs_create_boot() local n=0 for disk in $disks; do zfs_create_diskpart $disk $n || return $FAILURE - # Now $bootpart and $targetpart are set (suffix for $disk) + # Now $bootpart, $targetpart, and $swappart are set (suffix + # for $disk) # Forced 4k alignment support using Geom NOP (see gnop(8)) if [ "$ZFSBOOT_GNOP_4K_FORCE_ALIGN" ]; then @@ -1087,13 +1133,24 @@ zfs_create_boot() return $FAILURE f_eval_catch -d $funcname umount "$UMOUNT" /mnt # tmpfs fi + # + # Create the gmirror(8) GEOMS for swap + # + if [ "$ZFSBOOT_SWAP_MIRROR" ]; then + for disk in $disks; do + swap_devs="$swap_devs $disk$swappart" + done + f_eval_catch $funcname gmirror "$SWAP_GMIRROR_LABEL" \ + "$swap_devs" || return $FAILURE + fi # # Create the ZFS root pool with desired type and disk devices # f_dprintf "$funcname: Creating root pool..." f_eval_catch $funcname zpool "$ZPOOL_CREATE_WITH_OPTIONS" \ - "-o altroot=$BSDINSTALL_CHROOT -m none -f" \ + "-o altroot=$BSDINSTALL_CHROOT -O compress=lz4 + -m none -f" \ "$zroot_name" "$zroot_vdevtype" "$zroot_vdevs" || return $FAILURE @@ -1212,6 +1269,14 @@ zfs_create_boot() $BSDINSTALL_TMPETC/rc.conf.zfs || return $FAILURE f_eval_catch $funcname echo "$ECHO_APPEND" 'zfs_load=\"YES\"' \ $BSDINSTALL_TMPBOOT/loader.conf.zfs || return $FAILURE + f_eval_catch $funcname echo "$ECHO_APPEND" \ + 'kern.geom.label.gptid.enable=\"0\"' \ + $BSDINSTALL_TMPBOOT/loader.conf.zfs || return $FAILURE + + if [ "$ZFSBOOT_SWAP_MIRROR" ]; then + f_eval_catch $funcname echo "$ECHO_APPEND" 'geom_mirror_load=\"YES\"' \ + $BSDINSTALL_TMPBOOT/loader.conf.gmirror || return $FAILURE + fi # We're all done unless we should go on for boot pool [ "$ZFSBOOT_BOOT_POOL" ] || return $SUCCESS @@ -1445,6 +1510,22 @@ while :; do "$ZFSBOOT_SWAP_SIZE" && ZFSBOOT_SWAP_SIZE="${input:-0}" ;; + ?" $msg_swap_mirror") + # Toggle the variable referenced both by the menu and later + if [ "$ZFSBOOT_SWAP_MIRROR" ]; then + ZFSBOOT_SWAP_MIRROR= + else + ZFSBOOT_SWAP_MIRROR=1 + fi + ;; + ?" $msg_swap_encrypt") + # Toggle the variable referenced both by the menu and later + if [ "$ZFSBOOT_SWAP_ENCRYPTION" ]; then + ZFSBOOT_SWAP_ENCRYPTION= + else + ZFSBOOT_SWAP_ENCRYPTION=1 + fi + ;; esac done From owner-svn-src-stable@FreeBSD.ORG Wed Jun 4 15:04:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A4F02C13; Wed, 4 Jun 2014 15:04:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 778BE2C59; Wed, 4 Jun 2014 15:04:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s54F4bJK049302; Wed, 4 Jun 2014 15:04:37 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s54F4bJu049301; Wed, 4 Jun 2014 15:04:37 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201406041504.s54F4bJu049301@svn.freebsd.org> From: Marius Strobl Date: Wed, 4 Jun 2014 15:04:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267057 - stable/9/sys/dev/drm2/radeon X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 15:04:37 -0000 Author: marius Date: Wed Jun 4 15:04:36 2014 New Revision: 267057 URL: http://svnweb.freebsd.org/changeset/base/267057 Log: MFC: r266792 Fix DMA handling in radeon_dummy_page_init(): - Based on actual usage and on what Linux does, dummy_page.addr should contain the physical bus address of the dummy page rather than its virtual one. As a side-effect, correcting this bug fixes compilation with PAE support enabled by getting rid of an inappropriate cast. - Also based on actual usage of dummy_page.addr, theoretically Radeon devices could do a maximum of 44-bit DMA. In reality, though, it is more likely that they only support 32-bit DMA, at least that is what radeon_gart_table_ram_alloc() sets up for, too. However, passing ~0 to drm_pci_alloc() as maxaddr parameter translates to 64-bit DMA on amd64/64-bit machines. Thus, use BUS_SPACE_MAXSIZE_32BIT instead, which the existing 32-bit DMA limits within the drm2 code spelled as 0xFFFFFFFF should also be changed to. Reviewed by: dumbbell Approved by: re (gjb) Sponsored by: Bally Wulff Games & Entertainment GmbH Modified: stable/9/sys/dev/drm2/radeon/radeon_device.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/drm2/radeon/radeon_device.c ============================================================================== --- stable/9/sys/dev/drm2/radeon/radeon_device.c Wed Jun 4 14:58:51 2014 (r267056) +++ stable/9/sys/dev/drm2/radeon/radeon_device.c Wed Jun 4 15:04:36 2014 (r267057) @@ -548,10 +548,10 @@ int radeon_dummy_page_init(struct radeon if (rdev->dummy_page.dmah) return 0; rdev->dummy_page.dmah = drm_pci_alloc(rdev->ddev, - PAGE_SIZE, PAGE_SIZE, ~0); + PAGE_SIZE, PAGE_SIZE, BUS_SPACE_MAXSIZE_32BIT); if (rdev->dummy_page.dmah == NULL) return -ENOMEM; - rdev->dummy_page.addr = (dma_addr_t)rdev->dummy_page.dmah->vaddr; + rdev->dummy_page.addr = rdev->dummy_page.dmah->busaddr; return 0; } From owner-svn-src-stable@FreeBSD.ORG Wed Jun 4 15:05:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D9A5AD55; Wed, 4 Jun 2014 15:05:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC2382C64; Wed, 4 Jun 2014 15:05:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s54F5OHe049532; Wed, 4 Jun 2014 15:05:24 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s54F5Owr049531; Wed, 4 Jun 2014 15:05:24 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201406041505.s54F5Owr049531@svn.freebsd.org> From: Marius Strobl Date: Wed, 4 Jun 2014 15:05:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267058 - stable/9/sys/dev/sound/pci X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 15:05:25 -0000 Author: marius Date: Wed Jun 4 15:05:24 2014 New Revision: 267058 URL: http://svnweb.freebsd.org/changeset/base/267058 Log: MFC: r266793, r266799, r266808 - Fix compilation with PAE support enabled by merging r233362 and, thus, doing away with the unnecessary uint8_t pointer casting. physical addresses. - Nuke the unused softc of emujoy(4). - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. Sponsored by: Bally Wulff Games & Entertainment GmbH Approved by: re (gjb) Modified: stable/9/sys/dev/sound/pci/emu10k1.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/pci/emu10k1.c ============================================================================== --- stable/9/sys/dev/sound/pci/emu10k1.c Wed Jun 4 15:04:36 2014 (r267057) +++ stable/9/sys/dev/sound/pci/emu10k1.c Wed Jun 4 15:05:24 2014 (r267058) @@ -1378,7 +1378,7 @@ emu_memalloc(struct sc_info *sc, u_int32 ofs = 0; for (idx = start; idx < start + blksz; idx++) { mem->bmap[idx >> 3] |= 1 << (idx & 7); - tmp = (u_int32_t)(u_long)((u_int8_t *)blk->buf_addr + ofs); + tmp = (uint32_t)(blk->buf_addr + ofs); #ifdef EMUDEBUG printf("pte[%d] -> %x phys, %x virt\n", idx, tmp, ((u_int32_t)buf) + ofs); @@ -2182,7 +2182,7 @@ static device_method_t emu_methods[] = { DEVMETHOD(device_attach, emu_pci_attach), DEVMETHOD(device_detach, emu_pci_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t emu_driver = { @@ -2191,7 +2191,7 @@ static driver_t emu_driver = { PCM_SOFTC_SIZE, }; -DRIVER_MODULE(snd_emu10k1, pci, emu_driver, pcm_devclass, 0, 0); +DRIVER_MODULE(snd_emu10k1, pci, emu_driver, pcm_devclass, NULL, NULL); MODULE_DEPEND(snd_emu10k1, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER); MODULE_VERSION(snd_emu10k1, 1); MODULE_DEPEND(snd_emu10k1, midi, 1, 1, 1); @@ -2220,12 +2220,14 @@ emujoy_pci_probe(device_t dev) static int emujoy_pci_attach(device_t dev) { + return 0; } static int emujoy_pci_detach(device_t dev) { + return 0; } @@ -2234,16 +2236,15 @@ static device_method_t emujoy_methods[] DEVMETHOD(device_attach, emujoy_pci_attach), DEVMETHOD(device_detach, emujoy_pci_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t emujoy_driver = { "emujoy", emujoy_methods, - 8, + 1 /* no softc */ }; static devclass_t emujoy_devclass; -DRIVER_MODULE(emujoy, pci, emujoy_driver, emujoy_devclass, 0, 0); - +DRIVER_MODULE(emujoy, pci, emujoy_driver, emujoy_devclass, NULL, NULL); From owner-svn-src-stable@FreeBSD.ORG Wed Jun 4 15:18:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CFC1344C; Wed, 4 Jun 2014 15:18:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BCD7C2DA7; Wed, 4 Jun 2014 15:18:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s54FIkiS054753; Wed, 4 Jun 2014 15:18:46 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s54FIkpB054752; Wed, 4 Jun 2014 15:18:46 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201406041518.s54FIkpB054752@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 4 Jun 2014 15:18:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267059 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 15:18:46 -0000 Author: kib Date: Wed Jun 4 15:18:46 2014 New Revision: 267059 URL: http://svnweb.freebsd.org/changeset/base/267059 Log: MFC r266780: Remove the assert which can be triggered by the userspace. Modified: stable/10/sys/vm/vm_map.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_map.c ============================================================================== --- stable/10/sys/vm/vm_map.c Wed Jun 4 15:05:24 2014 (r267058) +++ stable/10/sys/vm/vm_map.c Wed Jun 4 15:18:46 2014 (r267059) @@ -1986,11 +1986,8 @@ vm_map_protect(vm_map_t map, vm_offset_t */ if ((current->eflags & MAP_ENTRY_USER_WIRED) != 0 && (current->protection & VM_PROT_WRITE) != 0 && - (old_prot & VM_PROT_WRITE) == 0) { - KASSERT(old_prot != VM_PROT_NONE, - ("vm_map_protect: inaccessible wired map entry")); + (old_prot & VM_PROT_WRITE) == 0) vm_fault_copy_entry(map, map, current, current, NULL); - } /* * When restricting access, update the physical map. Worry From owner-svn-src-stable@FreeBSD.ORG Wed Jun 4 15:31:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D336CC80; Wed, 4 Jun 2014 15:31:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFA432F44; Wed, 4 Jun 2014 15:31:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s54FVvei062786; Wed, 4 Jun 2014 15:31:57 GMT (envelope-from roberto@svn.freebsd.org) Received: (from roberto@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s54FVvxc062785; Wed, 4 Jun 2014 15:31:57 GMT (envelope-from roberto@svn.freebsd.org) Message-Id: <201406041531.s54FVvxc062785@svn.freebsd.org> From: Ollivier Robert Date: Wed, 4 Jun 2014 15:31:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267061 - stable/10/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 15:31:58 -0000 Author: roberto Date: Wed Jun 4 15:31:57 2014 New Revision: 267061 URL: http://svnweb.freebsd.org/changeset/base/267061 Log: Fix syntax error thrown at the point of creating the root pool, caused by an embedded newline appearing within the options string surrounded by double-quotes. Rework the logic that goes into setting dataset options on the root pool dataset while we're here -- added two new variables (which can be altered via scripting) ZFSBOOT_POOL_CREATE_OPTIONS and also ZFSBOOT_BOOT_POOL_CREATE_OPTIONS for setting pool/dataset attributes at the time of pool creation. The former is for setting options on the root pool (zroot) and the latter is for setting options on the optional separate boot pool (bootpool) implicitly enabled when using either GELI or MBR. The default value for the root pool variable (ZFSBOOT_POOL_CREATE_OPTIONS) is "-O compress=lz4 -O atime=off" and the default value for separate boot pool variable (ZFSBOOT_BOOT_POOL_CREATE_OPTIONS) is NULL (no additional options for the separate boot pool dataset). Reviewed by: allanjude Modified: stable/10/usr.sbin/bsdinstall/scripts/zfsboot Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/zfsboot Wed Jun 4 15:30:49 2014 (r267060) +++ stable/10/usr.sbin/bsdinstall/scripts/zfsboot Wed Jun 4 15:31:57 2014 (r267061) @@ -45,6 +45,11 @@ f_include $BSDCFG_SHARE/variable.subr : ${ZFSBOOT_POOL_NAME:=zroot} # +# Default options to use when creating zroot pool +# +: ${ZFSBOOT_POOL_CREATE_OPTIONS:=-O compress=lz4 -O atime=off} + +# # Default name for the boot environment parent dataset # : ${ZFSBOOT_BEROOT_NAME:=ROOT} @@ -82,6 +87,11 @@ f_include $BSDCFG_SHARE/variable.subr : ${ZFSBOOT_BOOT_POOL=} # +# Options to use when creating separate boot pool (if any) +# +: ${ZFSBOOT_BOOT_POOL_CREATE_OPTIONS:=} + +# # Default name for boot pool when enabled (e.g., geli(8) or MBR) # : ${ZFSBOOT_BOOT_POOL_NAME:=bootpool} @@ -942,6 +952,7 @@ zfs_create_boot() local disks="$*" disk local isswapmirror local bootpart targetpart swappart # Set by zfs_create_diskpart() below + local create_options # # Pedantic checks; should never be seen @@ -1066,7 +1077,9 @@ zfs_create_boot() f_count nvdevs $boot_vdevs [ $nvdevs -gt 1 ] && bootpool_vdevtype=mirror + create_options="$ZFSBOOT_BOOT_POOL_CREATE_OPTIONS" bootpool_options="-o altroot=$BSDINSTALL_CHROOT" + bootpool_options="$bootpool_options $create_options" bootpool_options="$bootpool_options -m \"/$bootpool_name\" -f" f_eval_catch $funcname zpool "$ZPOOL_CREATE_WITH_OPTIONS" \ "$bootpool_options" "$bootpool_name" \ @@ -1148,19 +1161,11 @@ zfs_create_boot() # Create the ZFS root pool with desired type and disk devices # f_dprintf "$funcname: Creating root pool..." + create_options="$ZFSBOOT_POOL_CREATE_OPTIONS" f_eval_catch $funcname zpool "$ZPOOL_CREATE_WITH_OPTIONS" \ - "-o altroot=$BSDINSTALL_CHROOT -O compress=lz4 - -m none -f" \ - "$zroot_name" "$zroot_vdevtype" "$zroot_vdevs" || - return $FAILURE - - # Customize the zroot a bit... - local option - f_dprintf "$funcname: Setting miscellaneous options on root pool..." - for option in atime=off; do - f_eval_catch $funcname zfs "$ZFS_SET" $option "$zroot_name" || - return $FAILURE - done + "-o altroot=$BSDINSTALL_CHROOT $create_options -m none -f" \ + "$zroot_name" "$zroot_vdevtype" "$zroot_vdevs" || + return $FAILURE # # Create ZFS dataset layout within the new root pool From owner-svn-src-stable@FreeBSD.ORG Wed Jun 4 17:50:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0CDE6BD3; Wed, 4 Jun 2014 17:50:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD7AD2DA5; Wed, 4 Jun 2014 17:50:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s54HolTb025709; Wed, 4 Jun 2014 17:50:47 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s54Holrx025708; Wed, 4 Jun 2014 17:50:47 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406041750.s54Holrx025708@svn.freebsd.org> From: John Baldwin Date: Wed, 4 Jun 2014 17:50:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267068 - stable/10/sys/x86/xen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 17:50:48 -0000 Author: jhb Date: Wed Jun 4 17:50:47 2014 New Revision: 267068 URL: http://svnweb.freebsd.org/changeset/base/267068 Log: MFC 263772: Fix build without SMP. PR: 187854 Modified: stable/10/sys/x86/xen/hvm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/xen/hvm.c ============================================================================== --- stable/10/sys/x86/xen/hvm.c Wed Jun 4 17:17:30 2014 (r267067) +++ stable/10/sys/x86/xen/hvm.c Wed Jun 4 17:50:47 2014 (r267068) @@ -71,9 +71,9 @@ static driver_filter_t xen_ipi_bitmap_ha static driver_filter_t xen_cpustop_handler; static driver_filter_t xen_cpususpend_handler; static driver_filter_t xen_cpustophard_handler; -#endif static void xen_ipi_vectored(u_int vector, int dest); static void xen_hvm_cpu_resume(void); +#endif static void xen_hvm_cpu_init(void); /*---------------------------- Extern Declarations ---------------------------*/ @@ -106,11 +106,13 @@ struct xen_ipi_handler /*-------------------------------- Global Data -------------------------------*/ enum xen_domain_type xen_domain_type = XEN_NATIVE; +#ifdef SMP struct cpu_ops xen_hvm_cpu_ops = { .ipi_vectored = lapic_ipi_vectored, .cpu_init = xen_hvm_cpu_init, .cpu_resume = xen_hvm_cpu_resume }; +#endif static MALLOC_DEFINE(M_XENHVM, "xen_hvm", "Xen HVM PV Support"); @@ -526,7 +528,9 @@ xen_hvm_init(enum xen_hvm_init_type init return; setup_xen_features(); +#ifdef SMP cpu_ops = xen_hvm_cpu_ops; +#endif vm_guest = VM_GUEST_XEN; break; case XEN_HVM_INIT_RESUME: From owner-svn-src-stable@FreeBSD.ORG Wed Jun 4 17:57:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B60DBA; Wed, 4 Jun 2014 17:57:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38A9C2E16; Wed, 4 Jun 2014 17:57:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s54HvnJD028935; Wed, 4 Jun 2014 17:57:49 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s54Hvm4L028931; Wed, 4 Jun 2014 17:57:48 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406041757.s54Hvm4L028931@svn.freebsd.org> From: John Baldwin Date: Wed, 4 Jun 2014 17:57:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267070 - in stable/10/sys/amd64/vmm: . io X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 17:57:49 -0000 Author: jhb Date: Wed Jun 4 17:57:48 2014 New Revision: 267070 URL: http://svnweb.freebsd.org/changeset/base/267070 Log: MFC 260972: There is no need to initialize the IOMMU if no passthru devices have been configured for bhyve to use. Modified: stable/10/sys/amd64/vmm/io/iommu.c stable/10/sys/amd64/vmm/io/ppt.c stable/10/sys/amd64/vmm/io/ppt.h stable/10/sys/amd64/vmm/vmm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/vmm/io/iommu.c ============================================================================== --- stable/10/sys/amd64/vmm/io/iommu.c Wed Jun 4 17:56:57 2014 (r267069) +++ stable/10/sys/amd64/vmm/io/iommu.c Wed Jun 4 17:57:48 2014 (r267070) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -43,7 +44,13 @@ __FBSDID("$FreeBSD$"); #include "vmm_mem.h" #include "iommu.h" -static boolean_t iommu_avail; +SYSCTL_DECL(_hw_vmm); +SYSCTL_NODE(_hw_vmm, OID_AUTO, iommu, CTLFLAG_RW, 0, "bhyve iommu parameters"); + +static int iommu_avail; +SYSCTL_INT(_hw_vmm_iommu, OID_AUTO, initialized, CTLFLAG_RD, &iommu_avail, + 0, "bhyve iommu initialized?"); + static struct iommu_ops *ops; static void *host_domain; @@ -160,7 +167,7 @@ iommu_init(void) if (error) return; - iommu_avail = TRUE; + iommu_avail = 1; /* * Create a domain for the devices owned by the host Modified: stable/10/sys/amd64/vmm/io/ppt.c ============================================================================== --- stable/10/sys/amd64/vmm/io/ppt.c Wed Jun 4 17:56:57 2014 (r267069) +++ stable/10/sys/amd64/vmm/io/ppt.c Wed Jun 4 17:57:48 2014 (r267070) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -100,7 +101,12 @@ static struct pptdev { } msix; } pptdevs[64]; +SYSCTL_DECL(_hw_vmm); +SYSCTL_NODE(_hw_vmm, OID_AUTO, ppt, CTLFLAG_RW, 0, "bhyve passthru devices"); + static int num_pptdevs; +SYSCTL_INT(_hw_vmm_ppt, OID_AUTO, devices, CTLFLAG_RD, &num_pptdevs, 0, + "number of pci passthru devices"); static int ppt_probe(device_t dev) @@ -282,7 +288,14 @@ ppt_teardown_msix(struct pptdev *ppt) } int -ppt_num_devices(struct vm *vm) +ppt_avail_devices(void) +{ + + return (num_pptdevs); +} + +int +ppt_assigned_devices(struct vm *vm) { int i, num; Modified: stable/10/sys/amd64/vmm/io/ppt.h ============================================================================== --- stable/10/sys/amd64/vmm/io/ppt.h Wed Jun 4 17:56:57 2014 (r267069) +++ stable/10/sys/amd64/vmm/io/ppt.h Wed Jun 4 17:57:48 2014 (r267070) @@ -36,10 +36,16 @@ int ppt_setup_msi(struct vm *vm, int vcp uint64_t addr, uint64_t msg, int numvec); int ppt_setup_msix(struct vm *vm, int vcpu, int bus, int slot, int func, int idx, uint64_t addr, uint64_t msg, uint32_t vector_control); -int ppt_num_devices(struct vm *vm); +int ppt_assigned_devices(struct vm *vm); boolean_t ppt_is_mmio(struct vm *vm, vm_paddr_t gpa); /* + * Returns the number of devices sequestered by the ppt driver for assignment + * to virtual machines. + */ +int ppt_avail_devices(void); + +/* * The following functions should never be called directly. * Use 'vm_assign_pptdev()' and 'vm_unassign_pptdev()' instead. */ Modified: stable/10/sys/amd64/vmm/vmm.c ============================================================================== --- stable/10/sys/amd64/vmm/vmm.c Wed Jun 4 17:56:57 2014 (r267069) +++ stable/10/sys/amd64/vmm/vmm.c Wed Jun 4 17:57:48 2014 (r267070) @@ -266,7 +266,8 @@ vmm_handler(module_t mod, int what, void switch (what) { case MOD_LOAD: vmmdev_init(); - iommu_init(); + if (ppt_avail_devices() > 0) + iommu_init(); error = vmm_init(); if (error == 0) vmm_initialized = 1; @@ -604,7 +605,7 @@ vm_unassign_pptdev(struct vm *vm, int bu if (error) return (error); - if (ppt_num_devices(vm) == 0) { + if (ppt_assigned_devices(vm) == 0) { vm_iommu_unmap(vm); vm_gpa_unwire(vm); } @@ -624,7 +625,7 @@ vm_assign_pptdev(struct vm *vm, int bus, * * We need to do this before the first pci passthru device is attached. */ - if (ppt_num_devices(vm) == 0) { + if (ppt_assigned_devices(vm) == 0) { KASSERT(vm->iommu == NULL, ("vm_assign_pptdev: iommu must be NULL")); maxaddr = vmm_mem_maxaddr(); From owner-svn-src-stable@FreeBSD.ORG Wed Jun 4 18:08:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0CC7384E; Wed, 4 Jun 2014 18:08:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EEB1C2F3F; Wed, 4 Jun 2014 18:08:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s54I8852034127; Wed, 4 Jun 2014 18:08:08 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s54I88qm034126; Wed, 4 Jun 2014 18:08:08 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406041808.s54I88qm034126@svn.freebsd.org> From: John Baldwin Date: Wed, 4 Jun 2014 18:08:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267071 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 18:08:09 -0000 Author: jhb Date: Wed Jun 4 18:08:08 2014 New Revision: 267071 URL: http://svnweb.freebsd.org/changeset/base/267071 Log: MFC 260999: Increase the block-layer backend maximum number of requests to match the AHCI command queue depth. Modified: stable/10/usr.sbin/bhyve/block_if.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/block_if.c ============================================================================== --- stable/10/usr.sbin/bhyve/block_if.c Wed Jun 4 17:57:48 2014 (r267070) +++ stable/10/usr.sbin/bhyve/block_if.c Wed Jun 4 18:08:08 2014 (r267071) @@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$"); #define BLOCKIF_SIG 0xb109b109 -#define BLOCKIF_MAXREQ 16 +#define BLOCKIF_MAXREQ 32 enum blockop { BOP_READ, From owner-svn-src-stable@FreeBSD.ORG Wed Jun 4 18:21:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9889ED6A; Wed, 4 Jun 2014 18:21:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86728207B; Wed, 4 Jun 2014 18:21:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s54ILXmR042542; Wed, 4 Jun 2014 18:21:33 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s54ILXna042541; Wed, 4 Jun 2014 18:21:33 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406041821.s54ILXna042541@svn.freebsd.org> From: John Baldwin Date: Wed, 4 Jun 2014 18:21:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267074 - stable/10/sys/dev/aac X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 18:21:33 -0000 Author: jhb Date: Wed Jun 4 18:21:33 2014 New Revision: 267074 URL: http://svnweb.freebsd.org/changeset/base/267074 Log: MFC 266281: Clear the data buffer length field when freeing a command structure so that it doesn't leak through when the command structure is reused for a user command without a data buffer. PR: 189668 Modified: stable/10/sys/dev/aac/aac.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/aac/aac.c ============================================================================== --- stable/10/sys/dev/aac/aac.c Wed Jun 4 18:19:10 2014 (r267073) +++ stable/10/sys/dev/aac/aac.c Wed Jun 4 18:21:33 2014 (r267074) @@ -1408,6 +1408,7 @@ aac_release_command(struct aac_command * fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); /* (re)initialize the command/FIB */ + cm->cm_datalen = 0; cm->cm_sgtable = NULL; cm->cm_flags = 0; cm->cm_complete = NULL; From owner-svn-src-stable@FreeBSD.ORG Wed Jun 4 18:22:34 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3311EFD; Wed, 4 Jun 2014 18:22:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C111D2107; Wed, 4 Jun 2014 18:22:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s54IMYTP042781; Wed, 4 Jun 2014 18:22:34 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s54IMYka042780; Wed, 4 Jun 2014 18:22:34 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406041822.s54IMYka042780@svn.freebsd.org> From: John Baldwin Date: Wed, 4 Jun 2014 18:22:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r267075 - stable/8/sys/dev/aac X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 18:22:34 -0000 Author: jhb Date: Wed Jun 4 18:22:34 2014 New Revision: 267075 URL: http://svnweb.freebsd.org/changeset/base/267075 Log: MFC 266281: Clear the data buffer length field when freeing a command structure so that it doesn't leak through when the command structure is reused for a user command without a data buffer. PR: 189668 Modified: stable/8/sys/dev/aac/aac.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/aac/ (props changed) Modified: stable/8/sys/dev/aac/aac.c ============================================================================== --- stable/8/sys/dev/aac/aac.c Wed Jun 4 18:21:33 2014 (r267074) +++ stable/8/sys/dev/aac/aac.c Wed Jun 4 18:22:34 2014 (r267075) @@ -1398,6 +1398,7 @@ aac_release_command(struct aac_command * fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); /* (re)initialize the command/FIB */ + cm->cm_datalen = 0; cm->cm_sgtable = NULL; cm->cm_flags = 0; cm->cm_complete = NULL; From owner-svn-src-stable@FreeBSD.ORG Wed Jun 4 18:32:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7753C1D1; Wed, 4 Jun 2014 18:32:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 653AA21DA; Wed, 4 Jun 2014 18:32:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s54IWgbi047303; Wed, 4 Jun 2014 18:32:42 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s54IWgwG047302; Wed, 4 Jun 2014 18:32:42 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406041832.s54IWgwG047302@svn.freebsd.org> From: John Baldwin Date: Wed, 4 Jun 2014 18:32:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267076 - stable/9/sys/dev/aac X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 18:32:42 -0000 Author: jhb Date: Wed Jun 4 18:32:41 2014 New Revision: 267076 URL: http://svnweb.freebsd.org/changeset/base/267076 Log: MFC 266281: Clear the data buffer length field when freeing a command structure so that it doesn't leak through when the command structure is reused for a user command without a data buffer. PR: 189668 Approved by: re (delphij) Modified: stable/9/sys/dev/aac/aac.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/aac/aac.c ============================================================================== --- stable/9/sys/dev/aac/aac.c Wed Jun 4 18:22:34 2014 (r267075) +++ stable/9/sys/dev/aac/aac.c Wed Jun 4 18:32:41 2014 (r267076) @@ -1408,6 +1408,7 @@ aac_release_command(struct aac_command * fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); /* (re)initialize the command/FIB */ + cm->cm_datalen = 0; cm->cm_sgtable = NULL; cm->cm_flags = 0; cm->cm_complete = NULL; From owner-svn-src-stable@FreeBSD.ORG Wed Jun 4 18:58:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE3B4A03; Wed, 4 Jun 2014 18:58:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBC862412; Wed, 4 Jun 2014 18:58:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s54IwWcZ057178; Wed, 4 Jun 2014 18:58:32 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s54IwWVh057177; Wed, 4 Jun 2014 18:58:32 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406041858.s54IwWVh057177@svn.freebsd.org> From: Alexander Motin Date: Wed, 4 Jun 2014 18:58:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267077 - stable/9/sys/x86/x86 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 18:58:33 -0000 Author: mav Date: Wed Jun 4 18:58:32 2014 New Revision: 267077 URL: http://svnweb.freebsd.org/changeset/base/267077 Log: MFC r239133 (by jimharris): During TSC synchronization test, use rdtsc() rather than rdtsc32(), to protect against 32-bit TSC overflow while the sync test is running. On dual-socket Xeon E5-2600 (SNB) systems with up to 32 threads, there is non-trivial chance (2-3%) that TSC synchronization test fails due to 32-bit TSC overflow while the synchronization test is running. Approved by: re (delphij) Modified: stable/9/sys/x86/x86/tsc.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/x86/x86/tsc.c ============================================================================== --- stable/9/sys/x86/x86/tsc.c Wed Jun 4 18:32:41 2014 (r267076) +++ stable/9/sys/x86/x86/tsc.c Wed Jun 4 18:58:32 2014 (r267077) @@ -373,11 +373,11 @@ init_TSC(void) static void \ tsc_read_##x(void *arg) \ { \ - uint32_t *tsc = arg; \ + uint64_t *tsc = arg; \ u_int cpu = PCPU_GET(cpuid); \ \ __asm __volatile("cpuid" : : : "eax", "ebx", "ecx", "edx"); \ - tsc[cpu * 3 + x] = rdtsc32(); \ + tsc[cpu * 3 + x] = rdtsc(); \ } TSC_READ(0) TSC_READ(1) @@ -389,8 +389,8 @@ TSC_READ(2) static void comp_smp_tsc(void *arg) { - uint32_t *tsc; - int32_t d1, d2; + uint64_t *tsc; + int64_t d1, d2; u_int cpu = PCPU_GET(cpuid); u_int i, j, size; @@ -454,7 +454,7 @@ adj_smp_tsc(void *arg) static int test_tsc(void) { - uint32_t *data, *tsc; + uint64_t *data, *tsc; u_int i, size, adj; if ((!smp_tsc && !tsc_is_invariant) || vm_guest) From owner-svn-src-stable@FreeBSD.ORG Wed Jun 4 21:17:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F099F94E; Wed, 4 Jun 2014 21:17:23 +0000 (UTC) Received: from smtp.digiware.nl (smtp.digiware.nl [31.223.170.169]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADCC825D2; Wed, 4 Jun 2014 21:17:22 +0000 (UTC) Received: from rack1.digiware.nl (unknown [127.0.0.1]) by smtp.digiware.nl (Postfix) with ESMTP id 280CC1534D1; Wed, 4 Jun 2014 23:17:13 +0200 (CEST) X-Virus-Scanned: amavisd-new at digiware.nl Received: from smtp.digiware.nl ([127.0.0.1]) by rack1.digiware.nl (rack1.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QYM9FXS0Q5Qx; Wed, 4 Jun 2014 23:17:11 +0200 (CEST) Received: from [192.168.10.9] (vaio [192.168.10.9]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.digiware.nl (Postfix) with ESMTPSA id 4163E153434; Wed, 4 Jun 2014 23:17:11 +0200 (CEST) Message-ID: <538F8CDE.3010302@digiware.nl> Date: Wed, 04 Jun 2014 23:17:18 +0200 From: Willem Jan Withagen User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: John Baldwin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r267071 - stable/10/usr.sbin/bhyve References: <201406041808.s54I88qm034126@svn.freebsd.org> In-Reply-To: <201406041808.s54I88qm034126@svn.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 21:17:24 -0000 On 4-6-2014 20:08, John Baldwin wrote: > Author: jhb > Date: Wed Jun 4 18:08:08 2014 > New Revision: 267071 > URL: http://svnweb.freebsd.org/changeset/base/267071 > > Log: > MFC 260999: > Increase the block-layer backend maximum number of requests to match > the AHCI command queue depth. > > Modified: > stable/10/usr.sbin/bhyve/block_if.c > Directory Properties: > stable/10/ (props changed) > > Modified: stable/10/usr.sbin/bhyve/block_if.c > ============================================================================== > --- stable/10/usr.sbin/bhyve/block_if.c Wed Jun 4 17:57:48 2014 (r267070) > +++ stable/10/usr.sbin/bhyve/block_if.c Wed Jun 4 18:08:08 2014 (r267071) > @@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$"); > > #define BLOCKIF_SIG 0xb109b109 > > -#define BLOCKIF_MAXREQ 16 > +#define BLOCKIF_MAXREQ 32 > > enum blockop { > BOP_READ, I once asked Peter about this, because of the trouble I had when running the bhyve_svm branch. This is not perse a good enhancement.... I've had a combination of HEAD and bhyve where running Linux and AMD would regularly generate timeouts for FPDMA for slots > 16.... After building the most recent bhyve_svm with patch set to get to a more recent almost-head-snapshot I ran some test, and did not run into these timeouts. So can very well be that fixes in HEAD got ride off the timeout. But then again I would say: thread with caution. --WjW From owner-svn-src-stable@FreeBSD.ORG Thu Jun 5 00:40:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94606CF9; Thu, 5 Jun 2014 00:40:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 814B8269D; Thu, 5 Jun 2014 00:40:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s550em2I014275; Thu, 5 Jun 2014 00:40:48 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s550empA014274; Thu, 5 Jun 2014 00:40:48 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201406050040.s550empA014274@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 5 Jun 2014 00:40:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267083 - stable/10/sys/amd64/amd64 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2014 00:40:48 -0000 Author: kib Date: Thu Jun 5 00:40:48 2014 New Revision: 267083 URL: http://svnweb.freebsd.org/changeset/base/267083 Log: MFC r266846: When usermode loaded non-default segment selector into the %gs, correctly prepare KGSBASE msr to restore the user descriptor base on the last swapgs during return to usermode. Modified: stable/10/sys/amd64/amd64/exception.S Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/exception.S ============================================================================== --- stable/10/sys/amd64/amd64/exception.S Thu Jun 5 00:38:32 2014 (r267082) +++ stable/10/sys/amd64/amd64/exception.S Thu Jun 5 00:40:48 2014 (r267083) @@ -722,21 +722,38 @@ ld_fsbase: pushfq cli movl $MSR_GSBASE,%ecx + /* Save current kernel %gs base into %r12d:%r13d */ rdmsr + movl %eax,%r12d + movl %edx,%r13d .globl ld_gs ld_gs: movw %si,%gs + /* Save user %gs base into %r14d:%r15d */ + rdmsr + movl %eax,%r14d + movl %edx,%r15d + /* Restore kernel %gs base */ + movl %r12d,%eax + movl %r13d,%edx wrmsr popfq + /* + * Restore user %gs base, either from PCB if used for TLS, or + * from the previously saved msr read. + */ + movl $MSR_KGSBASE,%ecx cmpw $KUG32SEL,%si jne 1f - movl $MSR_KGSBASE,%ecx movl PCB_GSBASE(%r8),%eax movl PCB_GSBASE+4(%r8),%edx + jmp ld_gsbase +1: + movl %r14d,%eax + movl %r15d,%edx .globl ld_gsbase ld_gsbase: - wrmsr -1: + wrmsr /* May trap if non-canonical, but only for TLS. */ .globl ld_es ld_es: movw TF_ES(%rsp),%es From owner-svn-src-stable@FreeBSD.ORG Thu Jun 5 00:43:34 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B444E73; Thu, 5 Jun 2014 00:43:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C4B42729; Thu, 5 Jun 2014 00:43:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s550hYA0015394; Thu, 5 Jun 2014 00:43:34 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s550hXDC015388; Thu, 5 Jun 2014 00:43:33 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201406050043.s550hXDC015388@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 5 Jun 2014 00:43:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267084 - stable/10/sys/dev/mfi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2014 00:43:34 -0000 Author: kib Date: Thu Jun 5 00:43:32 2014 New Revision: 267084 URL: http://svnweb.freebsd.org/changeset/base/267084 Log: MFC r266848: Add support for the unmapped i/o to mfi(4). Modified: stable/10/sys/dev/mfi/mfi.c stable/10/sys/dev/mfi/mfi_cam.c stable/10/sys/dev/mfi/mfi_disk.c stable/10/sys/dev/mfi/mfi_syspd.c stable/10/sys/dev/mfi/mfivar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mfi/mfi.c ============================================================================== --- stable/10/sys/dev/mfi/mfi.c Thu Jun 5 00:40:48 2014 (r267083) +++ stable/10/sys/dev/mfi/mfi.c Thu Jun 5 00:43:32 2014 (r267084) @@ -2122,6 +2122,8 @@ mfi_build_cdb(int readop, uint8_t byte2, return cdb_len; } +extern char *unmapped_buf; + static struct mfi_command * mfi_build_syspdio(struct mfi_softc *sc, struct bio *bio) { @@ -2145,11 +2147,11 @@ mfi_build_syspdio(struct mfi_softc *sc, pass->header.cmd = MFI_CMD_PD_SCSI_IO; switch (bio->bio_cmd & 0x03) { case BIO_READ: - flags = MFI_CMD_DATAIN; + flags = MFI_CMD_DATAIN | MFI_CMD_BIO; readop = 1; break; case BIO_WRITE: - flags = MFI_CMD_DATAOUT; + flags = MFI_CMD_DATAOUT | MFI_CMD_BIO; readop = 0; break; default: @@ -2174,7 +2176,7 @@ mfi_build_syspdio(struct mfi_softc *sc, pass->sense_addr_hi = (uint32_t)((uint64_t)cm->cm_sense_busaddr >> 32); cm->cm_complete = mfi_bio_complete; cm->cm_private = bio; - cm->cm_data = bio->bio_data; + cm->cm_data = unmapped_buf; cm->cm_len = bio->bio_bcount; cm->cm_sg = &pass->sgl; cm->cm_total_frame_size = MFI_PASS_FRAME_SIZE; @@ -2205,11 +2207,11 @@ mfi_build_ldio(struct mfi_softc *sc, str switch (bio->bio_cmd & 0x03) { case BIO_READ: io->header.cmd = MFI_CMD_LD_READ; - flags = MFI_CMD_DATAIN; + flags = MFI_CMD_DATAIN | MFI_CMD_BIO; break; case BIO_WRITE: io->header.cmd = MFI_CMD_LD_WRITE; - flags = MFI_CMD_DATAOUT; + flags = MFI_CMD_DATAOUT | MFI_CMD_BIO; break; default: /* TODO: what about BIO_DELETE??? */ @@ -2230,7 +2232,7 @@ mfi_build_ldio(struct mfi_softc *sc, str io->lba_lo = bio->bio_pblkno & 0xffffffff; cm->cm_complete = mfi_bio_complete; cm->cm_private = bio; - cm->cm_data = bio->bio_data; + cm->cm_data = unmapped_buf; cm->cm_len = bio->bio_bcount; cm->cm_sg = &io->sgl; cm->cm_total_frame_size = MFI_IO_FRAME_SIZE; @@ -2316,6 +2318,10 @@ mfi_mapcmd(struct mfi_softc *sc, struct error = bus_dmamap_load_ccb(sc->mfi_buffer_dmat, cm->cm_dmamap, cm->cm_data, mfi_data_cb, cm, polled); + else if (cm->cm_flags & MFI_CMD_BIO) + error = bus_dmamap_load_bio(sc->mfi_buffer_dmat, + cm->cm_dmamap, cm->cm_private, mfi_data_cb, cm, + polled); else error = bus_dmamap_load(sc->mfi_buffer_dmat, cm->cm_dmamap, cm->cm_data, cm->cm_len, Modified: stable/10/sys/dev/mfi/mfi_cam.c ============================================================================== --- stable/10/sys/dev/mfi/mfi_cam.c Thu Jun 5 00:40:48 2014 (r267083) +++ stable/10/sys/dev/mfi/mfi_cam.c Thu Jun 5 00:43:32 2014 (r267084) @@ -218,7 +218,7 @@ mfip_cam_action(struct cam_sim *sim, uni cpi->version_num = 1; cpi->hba_inquiry = PI_TAG_ABLE; cpi->target_sprt = 0; - cpi->hba_misc = PIM_NOBUSRESET|PIM_SEQSCAN; + cpi->hba_misc = PIM_NOBUSRESET | PIM_SEQSCAN | PIM_UNMAPPED; cpi->hba_eng_cnt = 0; cpi->max_target = MFI_SCSI_MAX_TARGETS; cpi->max_lun = MFI_SCSI_MAX_LUNS; Modified: stable/10/sys/dev/mfi/mfi_disk.c ============================================================================== --- stable/10/sys/dev/mfi/mfi_disk.c Thu Jun 5 00:40:48 2014 (r267083) +++ stable/10/sys/dev/mfi/mfi_disk.c Thu Jun 5 00:43:32 2014 (r267084) @@ -169,6 +169,7 @@ mfi_disk_attach(device_t dev) sc->ld_disk->d_fwheads = 64; sc->ld_disk->d_fwsectors = 32; } + sc->ld_disk->d_flags = DISKFLAG_UNMAPPED_BIO; disk_create(sc->ld_disk, DISK_VERSION); return (0); Modified: stable/10/sys/dev/mfi/mfi_syspd.c ============================================================================== --- stable/10/sys/dev/mfi/mfi_syspd.c Thu Jun 5 00:40:48 2014 (r267083) +++ stable/10/sys/dev/mfi/mfi_syspd.c Thu Jun 5 00:43:32 2014 (r267084) @@ -143,6 +143,7 @@ mfi_syspd_attach(device_t dev) sc->pd_disk->d_fwheads = 64; sc->pd_disk->d_fwsectors = 32; } + sc->pd_disk->d_flags = DISKFLAG_UNMAPPED_BIO; disk_create(sc->pd_disk, DISK_VERSION); device_printf(dev, " SYSPD volume attached\n"); Modified: stable/10/sys/dev/mfi/mfivar.h ============================================================================== --- stable/10/sys/dev/mfi/mfivar.h Thu Jun 5 00:40:48 2014 (r267083) +++ stable/10/sys/dev/mfi/mfivar.h Thu Jun 5 00:43:32 2014 (r267084) @@ -104,10 +104,11 @@ struct mfi_command { #define MFI_CMD_POLLED (1<<4) #define MFI_CMD_SCSI (1<<5) #define MFI_CMD_CCB (1<<6) -#define MFI_CMD_TBOLT (1<<7) -#define MFI_ON_MFIQ_FREE (1<<8) -#define MFI_ON_MFIQ_READY (1<<9) -#define MFI_ON_MFIQ_BUSY (1<<10) +#define MFI_CMD_BIO (1<<7) +#define MFI_CMD_TBOLT (1<<8) +#define MFI_ON_MFIQ_FREE (1<<9) +#define MFI_ON_MFIQ_READY (1<<10) +#define MFI_ON_MFIQ_BUSY (1<<11) #define MFI_ON_MFIQ_MASK (MFI_ON_MFIQ_FREE | MFI_ON_MFIQ_READY| \ MFI_ON_MFIQ_BUSY) #define MFI_CMD_FLAGS_FMT "\20" \ @@ -117,10 +118,11 @@ struct mfi_command { "\4COMPLETED" \ "\5POLLED" \ "\6SCSI" \ - "\7TBOLT" \ - "\10Q_FREE" \ - "\11Q_READY" \ - "\12Q_BUSY" + "\7BIO" \ + "\10TBOLT" \ + "\11Q_FREE" \ + "\12Q_READY" \ + "\13Q_BUSY" uint8_t retry_for_fw_reset; void (* cm_complete)(struct mfi_command *cm); void *cm_private; From owner-svn-src-stable@FreeBSD.ORG Thu Jun 5 00:50:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 09C265EC; Thu, 5 Jun 2014 00:50:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EAF64281B; Thu, 5 Jun 2014 00:50:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s550otvn017580; Thu, 5 Jun 2014 00:50:55 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s550otsq017579; Thu, 5 Jun 2014 00:50:55 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201406050050.s550otsq017579@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 5 Jun 2014 00:50:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r267085 - stable/8/sys/amd64/amd64 X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2014 00:50:56 -0000 Author: kib Date: Thu Jun 5 00:50:55 2014 New Revision: 267085 URL: http://svnweb.freebsd.org/changeset/base/267085 Log: MFC r266846: When usermode loaded non-default segment selector into the %gs, correctly prepare KGSBASE msr to restore the user descriptor base on the last swapgs during return to usermode. Modified: stable/8/sys/amd64/amd64/exception.S Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/ (props changed) Modified: stable/8/sys/amd64/amd64/exception.S ============================================================================== --- stable/8/sys/amd64/amd64/exception.S Thu Jun 5 00:43:32 2014 (r267084) +++ stable/8/sys/amd64/amd64/exception.S Thu Jun 5 00:50:55 2014 (r267085) @@ -718,21 +718,38 @@ ld_fsbase: pushfq cli movl $MSR_GSBASE,%ecx + /* Save current kernel %gs base into %r12d:%r13d */ rdmsr + movl %eax,%r12d + movl %edx,%r13d .globl ld_gs ld_gs: movw %si,%gs + /* Save user %gs base into %r14d:%r15d */ + rdmsr + movl %eax,%r14d + movl %edx,%r15d + /* Restore kernel %gs base */ + movl %r12d,%eax + movl %r13d,%edx wrmsr popfq + /* + * Restore user %gs base, either from PCB if used for TLS, or + * from the previously saved msr read. + */ + movl $MSR_KGSBASE,%ecx cmpw $KUG32SEL,%si jne 1f - movl $MSR_KGSBASE,%ecx movl PCB_GSBASE(%r8),%eax movl PCB_GSBASE+4(%r8),%edx + jmp ld_gsbase +1: + movl %r14d,%eax + movl %r15d,%edx .globl ld_gsbase ld_gsbase: - wrmsr -1: + wrmsr /* May trap if non-canonical, but only for TLS. */ .globl ld_es ld_es: movw TF_ES(%rsp),%es From owner-svn-src-stable@FreeBSD.ORG Thu Jun 5 01:00:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A847598B; Thu, 5 Jun 2014 01:00:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 955F82880; Thu, 5 Jun 2014 01:00:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5510R5K021664; Thu, 5 Jun 2014 01:00:27 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5510RJ7021663; Thu, 5 Jun 2014 01:00:27 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201406050100.s5510RJ7021663@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 5 Jun 2014 01:00:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267086 - stable/9/sys/amd64/amd64 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2014 01:00:27 -0000 Author: kib Date: Thu Jun 5 01:00:27 2014 New Revision: 267086 URL: http://svnweb.freebsd.org/changeset/base/267086 Log: MFC r266846: When usermode loaded non-default segment selector into the %gs, correctly prepare KGSBASE msr to restore the user descriptor base on the last swapgs during return to usermode. Approved by: re (gjb) Modified: stable/9/sys/amd64/amd64/exception.S Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/exception.S ============================================================================== --- stable/9/sys/amd64/amd64/exception.S Thu Jun 5 00:50:55 2014 (r267085) +++ stable/9/sys/amd64/amd64/exception.S Thu Jun 5 01:00:27 2014 (r267086) @@ -722,21 +722,38 @@ ld_fsbase: pushfq cli movl $MSR_GSBASE,%ecx + /* Save current kernel %gs base into %r12d:%r13d */ rdmsr + movl %eax,%r12d + movl %edx,%r13d .globl ld_gs ld_gs: movw %si,%gs + /* Save user %gs base into %r14d:%r15d */ + rdmsr + movl %eax,%r14d + movl %edx,%r15d + /* Restore kernel %gs base */ + movl %r12d,%eax + movl %r13d,%edx wrmsr popfq + /* + * Restore user %gs base, either from PCB if used for TLS, or + * from the previously saved msr read. + */ + movl $MSR_KGSBASE,%ecx cmpw $KUG32SEL,%si jne 1f - movl $MSR_KGSBASE,%ecx movl PCB_GSBASE(%r8),%eax movl PCB_GSBASE+4(%r8),%edx + jmp ld_gsbase +1: + movl %r14d,%eax + movl %r15d,%edx .globl ld_gsbase ld_gsbase: - wrmsr -1: + wrmsr /* May trap if non-canonical, but only for TLS. */ .globl ld_es ld_es: movw TF_ES(%rsp),%es From owner-svn-src-stable@FreeBSD.ORG Thu Jun 5 01:20:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 49B621E4; Thu, 5 Jun 2014 01:20:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 36A5C2A56; Thu, 5 Jun 2014 01:20:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s551KQqS030754; Thu, 5 Jun 2014 01:20:26 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s551KQQ5030753; Thu, 5 Jun 2014 01:20:26 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201406050120.s551KQQ5030753@svn.freebsd.org> From: Warren Block Date: Thu, 5 Jun 2014 01:20:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267087 - stable/10/share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2014 01:20:26 -0000 Author: wblock (doc committer) Date: Thu Jun 5 01:20:25 2014 New Revision: 267087 URL: http://svnweb.freebsd.org/changeset/base/267087 Log: MFC r266828: Correct the description of characters allowed. Based on pw_checkname in usr.sbin/pw/pw_user.c. Modified version of patch submitted by venture37. Modified: stable/10/share/man/man5/passwd.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man5/passwd.5 ============================================================================== --- stable/10/share/man/man5/passwd.5 Thu Jun 5 01:00:27 2014 (r267086) +++ stable/10/share/man/man5/passwd.5 Thu Jun 5 01:20:25 2014 (r267087) @@ -129,19 +129,29 @@ Routines that manipulate these files will often return only one of the multiple entries, and that one by random selection. .Pp -The login name must never begin with a hyphen -.Pq Ql - ; -also, it is strongly -suggested that neither upper-case characters or dots -.Pq Ql \&. -be part -of the name, as this tends to confuse mailers. +The login name must not begin with a hyphen +.Pq Ql \&- , +and cannot contain 8-bit characters, tabs or spaces, or any of these +symbols: +.Ql \&,:+&#%^\&(\&)!@~*?<>=|\e\\&/" . +The dollar symbol +.Pq Ql \&$ +is allowed only as the last character for use with Samba. No field may contain a colon .Pq Ql \&: as this has been used historically to separate the fields in the user database. .Pp +Case is significant. +Login names +.Ql Lrrr +and +.Ql lrrr +represent different users. +Be aware of this when interoperating with systems that do not have +case-sensitive login names. +.Pp In the .Nm master.passwd file, From owner-svn-src-stable@FreeBSD.ORG Thu Jun 5 01:52:21 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0926BE1F; Thu, 5 Jun 2014 01:52:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA9B52D44; Thu, 5 Jun 2014 01:52:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s551qKBM047883; Thu, 5 Jun 2014 01:52:20 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s551qKsk047882; Thu, 5 Jun 2014 01:52:20 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201406050152.s551qKsk047882@svn.freebsd.org> From: Warren Block Date: Thu, 5 Jun 2014 01:52:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267088 - stable/9/share/man/man5 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2014 01:52:21 -0000 Author: wblock (doc committer) Date: Thu Jun 5 01:52:20 2014 New Revision: 267088 URL: http://svnweb.freebsd.org/changeset/base/267088 Log: MFC r266828: Correct the description of characters allowed. Based on pw_checkname in usr.sbin/pw/pw_user.c. Modified version of patch submitted by venture37. Approved by: re (gjb) Modified: stable/9/share/man/man5/passwd.5 Directory Properties: stable/9/share/man/man5/ (props changed) Modified: stable/9/share/man/man5/passwd.5 ============================================================================== --- stable/9/share/man/man5/passwd.5 Thu Jun 5 01:20:25 2014 (r267087) +++ stable/9/share/man/man5/passwd.5 Thu Jun 5 01:52:20 2014 (r267088) @@ -129,19 +129,29 @@ Routines that manipulate these files will often return only one of the multiple entries, and that one by random selection. .Pp -The login name must never begin with a hyphen -.Pq Ql - ; -also, it is strongly -suggested that neither upper-case characters or dots -.Pq Ql \&. -be part -of the name, as this tends to confuse mailers. +The login name must not begin with a hyphen +.Pq Ql \&- , +and cannot contain 8-bit characters, tabs or spaces, or any of these +symbols: +.Ql \&,:+&#%^\&(\&)!@~*?<>=|\e\\&/" . +The dollar symbol +.Pq Ql \&$ +is allowed only as the last character for use with Samba. No field may contain a colon .Pq Ql \&: as this has been used historically to separate the fields in the user database. .Pp +Case is significant. +Login names +.Ql Lrrr +and +.Ql lrrr +represent different users. +Be aware of this when interoperating with systems that do not have +case-sensitive login names. +.Pp In the .Nm master.passwd file, From owner-svn-src-stable@FreeBSD.ORG Thu Jun 5 05:36:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 446C3B82; Thu, 5 Jun 2014 05:36:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 269A62F52; Thu, 5 Jun 2014 05:36:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s555auWF048816; Thu, 5 Jun 2014 05:36:56 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s555ausR048815; Thu, 5 Jun 2014 05:36:56 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406050536.s555ausR048815@svn.freebsd.org> From: Alexander Motin Date: Thu, 5 Jun 2014 05:36:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267093 - stable/10/sys/netgraph X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2014 05:36:56 -0000 Author: mav Date: Thu Jun 5 05:36:55 2014 New Revision: 267093 URL: http://svnweb.freebsd.org/changeset/base/267093 Log: MFC r266538: Make ng_mppc to not disable the node in case of multiple packet loss. Quite often it can be just packet reorder, and killing link in such case is inconvenient. Add few sysctl's to control that behavior. PR: kern/182212 Submitted by: Eugene Grosbein Modified: stable/10/sys/netgraph/ng_mppc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netgraph/ng_mppc.c ============================================================================== --- stable/10/sys/netgraph/ng_mppc.c Thu Jun 5 03:46:46 2014 (r267092) +++ stable/10/sys/netgraph/ng_mppc.c Thu Jun 5 05:36:55 2014 (r267093) @@ -55,6 +55,7 @@ #include #include #include +#include #include #include @@ -107,6 +108,23 @@ static MALLOC_DEFINE(M_NETGRAPH_MPPC, "n */ #define MPPE_MAX_REKEY 1000 +SYSCTL_NODE(_net_graph, OID_AUTO, mppe, CTLFLAG_RW, 0, "MPPE"); + +static int mppe_block_on_max_rekey = 0; +TUNABLE_INT("net.graph.mppe.block_on_max_rekey", &mppe_block_on_max_rekey); +SYSCTL_INT(_net_graph_mppe, OID_AUTO, block_on_max_rekey, CTLFLAG_RW, + &mppe_block_on_max_rekey, 0, "Block node on max MPPE key re-calculations"); + +static int mppe_log_max_rekey = 1; +TUNABLE_INT("net.graph.mppe.log_max_rekey", &mppe_log_max_rekey); +SYSCTL_INT(_net_graph_mppe, OID_AUTO, log_max_rekey, CTLFLAG_RW, + &mppe_log_max_rekey, 0, "Log max MPPE key re-calculations event"); + +static int mppe_max_rekey = MPPE_MAX_REKEY; +TUNABLE_INT("net.graph.mppe.max_rekey", &mppe_max_rekey); +SYSCTL_INT(_net_graph_mppe, OID_AUTO, max_rekey, CTLFLAG_RW, + &mppe_max_rekey, 0, "Maximum number of MPPE key re-calculations"); + /* MPPC packet header bits */ #define MPPC_FLAG_FLUSHED 0x8000 /* xmitter reset state */ #define MPPC_FLAG_RESTART 0x4000 /* compress history restart */ @@ -646,12 +664,23 @@ ng_mppc_decompress(node_p node, struct m /* How many times are we going to have to re-key? */ rekey = ((d->cfg.bits & MPPE_STATELESS) != 0) ? numLost : (numLost / (MPPE_UPDATE_MASK + 1)); - if (rekey > MPPE_MAX_REKEY) { - log(LOG_ERR, "%s: too many (%d) packets" - " dropped, disabling node %p!", - __func__, numLost, node); + if (rekey > mppe_max_rekey) { + if (mppe_block_on_max_rekey) { + if (mppe_log_max_rekey) { + log(LOG_ERR, "%s: too many (%d) packets" + " dropped, disabling node %p!\n", + __func__, numLost, node); + } priv->recv.cfg.enable = 0; goto failed; + } else { + if (mppe_log_max_rekey) { + log(LOG_ERR, "%s: %d packets" + " dropped, node %p\n", + __func__, numLost, node); + } + goto failed; + } } /* Re-key as necessary to catch up to peer */ From owner-svn-src-stable@FreeBSD.ORG Thu Jun 5 05:58:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89330152; Thu, 5 Jun 2014 05:58:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6ADA92102; Thu, 5 Jun 2014 05:58:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s555wt0E057620; Thu, 5 Jun 2014 05:58:55 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s555wtZu057619; Thu, 5 Jun 2014 05:58:55 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406050558.s555wtZu057619@svn.freebsd.org> From: Alexander Motin Date: Thu, 5 Jun 2014 05:58:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267094 - stable/9/sys/netgraph X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2014 05:58:56 -0000 Author: mav Date: Thu Jun 5 05:58:54 2014 New Revision: 267094 URL: http://svnweb.freebsd.org/changeset/base/267094 Log: MFC r266538: Make ng_mppc to not disable the node in case of multiple packet loss. Quite often it can be just packet reorder, and killing link in such case is inconvenient. Add few sysctl's to control that behavior. PR: kern/182212 Submitted by: Eugene Grosbein Approved by: re (glebius) Modified: stable/9/sys/netgraph/ng_mppc.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/netgraph/ng_mppc.c ============================================================================== --- stable/9/sys/netgraph/ng_mppc.c Thu Jun 5 05:36:55 2014 (r267093) +++ stable/9/sys/netgraph/ng_mppc.c Thu Jun 5 05:58:54 2014 (r267094) @@ -55,6 +55,7 @@ #include #include #include +#include #include #include @@ -107,6 +108,23 @@ static MALLOC_DEFINE(M_NETGRAPH_MPPC, "n */ #define MPPE_MAX_REKEY 1000 +SYSCTL_NODE(_net_graph, OID_AUTO, mppe, CTLFLAG_RW, 0, "MPPE"); + +static int mppe_block_on_max_rekey = 0; +TUNABLE_INT("net.graph.mppe.block_on_max_rekey", &mppe_block_on_max_rekey); +SYSCTL_INT(_net_graph_mppe, OID_AUTO, block_on_max_rekey, CTLFLAG_RW, + &mppe_block_on_max_rekey, 0, "Block node on max MPPE key re-calculations"); + +static int mppe_log_max_rekey = 1; +TUNABLE_INT("net.graph.mppe.log_max_rekey", &mppe_log_max_rekey); +SYSCTL_INT(_net_graph_mppe, OID_AUTO, log_max_rekey, CTLFLAG_RW, + &mppe_log_max_rekey, 0, "Log max MPPE key re-calculations event"); + +static int mppe_max_rekey = MPPE_MAX_REKEY; +TUNABLE_INT("net.graph.mppe.max_rekey", &mppe_max_rekey); +SYSCTL_INT(_net_graph_mppe, OID_AUTO, max_rekey, CTLFLAG_RW, + &mppe_max_rekey, 0, "Maximum number of MPPE key re-calculations"); + /* MPPC packet header bits */ #define MPPC_FLAG_FLUSHED 0x8000 /* xmitter reset state */ #define MPPC_FLAG_RESTART 0x4000 /* compress history restart */ @@ -646,12 +664,23 @@ ng_mppc_decompress(node_p node, struct m /* How many times are we going to have to re-key? */ rekey = ((d->cfg.bits & MPPE_STATELESS) != 0) ? numLost : (numLost / (MPPE_UPDATE_MASK + 1)); - if (rekey > MPPE_MAX_REKEY) { - log(LOG_ERR, "%s: too many (%d) packets" - " dropped, disabling node %p!", - __func__, numLost, node); + if (rekey > mppe_max_rekey) { + if (mppe_block_on_max_rekey) { + if (mppe_log_max_rekey) { + log(LOG_ERR, "%s: too many (%d) packets" + " dropped, disabling node %p!\n", + __func__, numLost, node); + } priv->recv.cfg.enable = 0; goto failed; + } else { + if (mppe_log_max_rekey) { + log(LOG_ERR, "%s: %d packets" + " dropped, node %p\n", + __func__, numLost, node); + } + goto failed; + } } /* Re-key as necessary to catch up to peer */ From owner-svn-src-stable@FreeBSD.ORG Thu Jun 5 06:00:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D74C131F; Thu, 5 Jun 2014 06:00:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B906C2118; Thu, 5 Jun 2014 06:00:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s55608ln058081; Thu, 5 Jun 2014 06:00:08 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s55608go058080; Thu, 5 Jun 2014 06:00:08 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406050600.s55608go058080@svn.freebsd.org> From: Alexander Motin Date: Thu, 5 Jun 2014 06:00:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r267095 - stable/8/sys/netgraph X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2014 06:00:09 -0000 Author: mav Date: Thu Jun 5 06:00:08 2014 New Revision: 267095 URL: http://svnweb.freebsd.org/changeset/base/267095 Log: MFC r266538: Make ng_mppc to not disable the node in case of multiple packet loss. Quite often it can be just packet reorder, and killing link in such case is inconvenient. Add few sysctl's to control that behavior. PR: kern/182212 Submitted by: Eugene Grosbein Modified: stable/8/sys/netgraph/ng_mppc.c Directory Properties: stable/8/ (props changed) stable/8/sys/ (props changed) stable/8/sys/netgraph/ (props changed) Modified: stable/8/sys/netgraph/ng_mppc.c ============================================================================== --- stable/8/sys/netgraph/ng_mppc.c Thu Jun 5 05:58:54 2014 (r267094) +++ stable/8/sys/netgraph/ng_mppc.c Thu Jun 5 06:00:08 2014 (r267095) @@ -55,6 +55,7 @@ #include #include #include +#include #include #include @@ -107,6 +108,23 @@ MALLOC_DEFINE(M_NETGRAPH_MPPC, "netgraph */ #define MPPE_MAX_REKEY 1000 +SYSCTL_NODE(_net_graph, OID_AUTO, mppe, CTLFLAG_RW, 0, "MPPE"); + +static int mppe_block_on_max_rekey = 0; +TUNABLE_INT("net.graph.mppe.block_on_max_rekey", &mppe_block_on_max_rekey); +SYSCTL_INT(_net_graph_mppe, OID_AUTO, block_on_max_rekey, CTLFLAG_RW, + &mppe_block_on_max_rekey, 0, "Block node on max MPPE key re-calculations"); + +static int mppe_log_max_rekey = 1; +TUNABLE_INT("net.graph.mppe.log_max_rekey", &mppe_log_max_rekey); +SYSCTL_INT(_net_graph_mppe, OID_AUTO, log_max_rekey, CTLFLAG_RW, + &mppe_log_max_rekey, 0, "Log max MPPE key re-calculations event"); + +static int mppe_max_rekey = MPPE_MAX_REKEY; +TUNABLE_INT("net.graph.mppe.max_rekey", &mppe_max_rekey); +SYSCTL_INT(_net_graph_mppe, OID_AUTO, max_rekey, CTLFLAG_RW, + &mppe_max_rekey, 0, "Maximum number of MPPE key re-calculations"); + /* MPPC packet header bits */ #define MPPC_FLAG_FLUSHED 0x8000 /* xmitter reset state */ #define MPPC_FLAG_RESTART 0x4000 /* compress history restart */ @@ -651,12 +669,23 @@ ng_mppc_decompress(node_p node, struct m /* How many times are we going to have to re-key? */ rekey = ((d->cfg.bits & MPPE_STATELESS) != 0) ? numLost : (numLost / (MPPE_UPDATE_MASK + 1)); - if (rekey > MPPE_MAX_REKEY) { - log(LOG_ERR, "%s: too many (%d) packets" - " dropped, disabling node %p!", - __func__, numLost, node); + if (rekey > mppe_max_rekey) { + if (mppe_block_on_max_rekey) { + if (mppe_log_max_rekey) { + log(LOG_ERR, "%s: too many (%d) packets" + " dropped, disabling node %p!\n", + __func__, numLost, node); + } priv->recv.cfg.enable = 0; goto failed; + } else { + if (mppe_log_max_rekey) { + log(LOG_ERR, "%s: %d packets" + " dropped, node %p\n", + __func__, numLost, node); + } + goto failed; + } } /* Re-key as necessary to catch up to peer */ From owner-svn-src-stable@FreeBSD.ORG Thu Jun 5 11:48:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0077631; Thu, 5 Jun 2014 11:48:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 90F982EE8; Thu, 5 Jun 2014 11:48:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s55BmaZA016721; Thu, 5 Jun 2014 11:48:36 GMT (envelope-from marck@svn.freebsd.org) Received: (from marck@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s55Bma0q016720; Thu, 5 Jun 2014 11:48:36 GMT (envelope-from marck@svn.freebsd.org) Message-Id: <201406051148.s55Bma0q016720@svn.freebsd.org> From: Dmitry Morozovsky Date: Thu, 5 Jun 2014 11:48:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267100 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2014 11:48:36 -0000 Author: marck (doc committer) Date: Thu Jun 5 11:48:36 2014 New Revision: 267100 URL: http://svnweb.freebsd.org/changeset/base/267100 Log: MFC r266859: Change examples to have master skew above 0 to have ability to overwrite this from the slave (for example, when master is failing on disk IO and could not be logged into or execute cronjob). Commented out examples changed too to simplify future merging. Idea by: kaa@zvuki.ru Discussed with: glebius Modified: stable/10/share/man/man4/carp.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/carp.4 ============================================================================== --- stable/10/share/man/man4/carp.4 Thu Jun 5 09:27:42 2014 (r267099) +++ stable/10/share/man/man4/carp.4 Thu Jun 5 11:48:36 2014 (r267100) @@ -210,17 +210,18 @@ Enable it on both hosts A and B: .Pp Assume that host A is the preferred master and we are running the 192.168.1.0/24 prefix on em0 and 192.168.2.0/24 on em1. -This is the setup for host A: +This is the setup for host A (advskew is above 0 so it could be overwritten +in the emergency situation from the other host): .Bd -literal -offset indent -ifconfig em0 vhid 1 pass mekmitasdigoat 192.168.1.1/24 -ifconfig em1 vhid 2 pass mekmitasdigoat 192.168.2.1/24 +ifconfig em0 vhid 1 advskew 100 pass mekmitasdigoat 192.168.1.1/24 +ifconfig em1 vhid 2 advskew 100 pass mekmitasdigoat 192.168.2.1/24 .Ed .Pp The setup for host B is identical, but it has a higher .Cm advskew : .Bd -literal -offset indent -ifconfig em0 vhid 1 advskew 100 pass mekmitasdigoat 192.168.1.1/24 -ifconfig em1 vhid 2 advskew 100 pass mekmitasdigoat 192.168.2.1/24 +ifconfig em0 vhid 1 advskew 200 pass mekmitasdigoat 192.168.1.1/24 +ifconfig em1 vhid 2 advskew 200 pass mekmitasdigoat 192.168.2.1/24 .Ed .Pp When one of the physical interfaces of host A fails, @@ -246,9 +247,9 @@ preempt host A on both interfaces instea .\"out slightly less frequently. .\".Bd -literal -offset indent .\"ifconfig carp0 create -.\"ifconfig carp0 vhid 1 pass mekmitasdigoat 192.168.1.10/24 +.\"ifconfig carp0 vhid 1 advskew 100 pass mekmitasdigoat 192.168.1.10/24 .\"ifconfig carp1 create -.\"ifconfig carp1 vhid 2 advskew 100 pass mekmitasdigoat 192.168.1.10/24 +.\"ifconfig carp1 vhid 2 advskew 200 pass mekmitasdigoat 192.168.1.10/24 .\".Ed .\".Pp .\"The configuration for host B is identical, except the @@ -256,9 +257,9 @@ preempt host A on both interfaces instea .\"is on virtual host 1 rather than virtual host 2. .\".Bd -literal -offset indent .\"ifconfig carp0 create -.\"ifconfig carp0 vhid 1 advskew 100 pass mekmitasdigoat 192.168.1.10/24 +.\"ifconfig carp0 vhid 1 advskew 200 pass mekmitasdigoat 192.168.1.10/24 .\"ifconfig carp1 create -.\"ifconfig carp1 vhid 2 pass mekmitasdigoat 192.168.1.10/24 +.\"ifconfig carp1 vhid 2 advskew 100 pass mekmitasdigoat 192.168.1.10/24 .\".Ed .\".Pp .\"Finally, the ARP balancing feature must be enabled on both hosts: From owner-svn-src-stable@FreeBSD.ORG Thu Jun 5 12:27:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3B5222D; Thu, 5 Jun 2014 12:27:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B08F0247E; Thu, 5 Jun 2014 12:27:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s55CRETC034466; Thu, 5 Jun 2014 12:27:14 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s55CREjf034465; Thu, 5 Jun 2014 12:27:14 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201406051227.s55CREjf034465@svn.freebsd.org> From: Marius Strobl Date: Thu, 5 Jun 2014 12:27:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267101 - stable/9/sys/i386/include/xen X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2014 12:27:14 -0000 Author: marius Date: Thu Jun 5 12:27:14 2014 New Revision: 267101 URL: http://svnweb.freebsd.org/changeset/base/267101 Log: MFC: r255781 Fix compilation of the i386 PAE kernel config. For stable/9, this also fixes the compilation of xenhvm.ko in the latter case. Approved by: re (delphij) Modified: stable/9/sys/i386/include/xen/xenvar.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/i386/include/xen/xenvar.h ============================================================================== --- stable/9/sys/i386/include/xen/xenvar.h Thu Jun 5 11:48:36 2014 (r267100) +++ stable/9/sys/i386/include/xen/xenvar.h Thu Jun 5 12:27:14 2014 (r267101) @@ -106,9 +106,7 @@ void xen_destroy_contiguous_region(void #elif defined(XENHVM) -#if !defined(PAE) #define vtomach(va) pmap_kextract((vm_offset_t) (va)) -#endif #define PFNTOMFN(pa) (pa) #define MFNTOPFN(ma) (ma) From owner-svn-src-stable@FreeBSD.ORG Thu Jun 5 12:32:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 768EA726; Thu, 5 Jun 2014 12:32:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5768A2589; Thu, 5 Jun 2014 12:32:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s55CWeni038462; Thu, 5 Jun 2014 12:32:40 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s55CWd0Z038457; Thu, 5 Jun 2014 12:32:39 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201406051232.s55CWd0Z038457@svn.freebsd.org> From: Xin LI Date: Thu, 5 Jun 2014 12:32:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r267103 - in stable: 10/crypto/openssl/ssl 8/crypto/openssl/ssl X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2014 12:32:40 -0000 Author: delphij Date: Thu Jun 5 12:32:38 2014 New Revision: 267103 URL: http://svnweb.freebsd.org/changeset/base/267103 Log: Fix OpenSSL multiple vulnerabilities. Security: CVE-2014-0195, CVE-2014-0221, CVE-2014-0224, CVE-2014-3470 Security: SA-14:14.openssl Modified: stable/8/crypto/openssl/ssl/d1_both.c stable/8/crypto/openssl/ssl/s3_clnt.c stable/8/crypto/openssl/ssl/s3_pkt.c stable/8/crypto/openssl/ssl/s3_srvr.c stable/8/crypto/openssl/ssl/ssl3.h Changes in other areas also in this revision: Modified: stable/10/crypto/openssl/ssl/d1_both.c stable/10/crypto/openssl/ssl/s3_clnt.c stable/10/crypto/openssl/ssl/s3_pkt.c stable/10/crypto/openssl/ssl/s3_srvr.c stable/10/crypto/openssl/ssl/ssl3.h Modified: stable/8/crypto/openssl/ssl/d1_both.c ============================================================================== --- stable/8/crypto/openssl/ssl/d1_both.c Thu Jun 5 12:32:16 2014 (r267102) +++ stable/8/crypto/openssl/ssl/d1_both.c Thu Jun 5 12:32:38 2014 (r267103) @@ -620,7 +620,16 @@ dtls1_reassemble_fragment(SSL *s, struct frag->msg_header.frag_off = 0; } else + { frag = (hm_fragment*) item->data; + if (frag->msg_header.msg_len != msg_hdr->msg_len) + { + item = NULL; + frag = NULL; + goto err; + } + } + /* If message is already reassembled, this must be a * retransmit and can be dropped. @@ -777,6 +786,7 @@ dtls1_get_message_fragment(SSL *s, int s int i,al; struct hm_header_st msg_hdr; + redo: /* see if we have the required fragment already */ if ((frag_len = dtls1_retrieve_buffered_fragment(s,max,ok)) || *ok) { @@ -835,8 +845,7 @@ dtls1_get_message_fragment(SSL *s, int s s->msg_callback_arg); s->init_num = 0; - return dtls1_get_message_fragment(s, st1, stn, - max, ok); + goto redo; } else /* Incorrectly formated Hello request */ { Modified: stable/8/crypto/openssl/ssl/s3_clnt.c ============================================================================== --- stable/8/crypto/openssl/ssl/s3_clnt.c Thu Jun 5 12:32:16 2014 (r267102) +++ stable/8/crypto/openssl/ssl/s3_clnt.c Thu Jun 5 12:32:38 2014 (r267103) @@ -491,6 +491,7 @@ int ssl3_connect(SSL *s) case SSL3_ST_CR_FINISHED_A: case SSL3_ST_CR_FINISHED_B: + s->s3->flags |= SSL3_FLAGS_CCS_OK; ret=ssl3_get_finished(s,SSL3_ST_CR_FINISHED_A, SSL3_ST_CR_FINISHED_B); if (ret <= 0) goto end; @@ -777,6 +778,7 @@ int ssl3_get_server_hello(SSL *s) SSLerr(SSL_F_SSL3_GET_SERVER_HELLO,SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT); goto f_err; } + s->s3->flags |= SSL3_FLAGS_CCS_OK; s->hit=1; } else /* a miss or crap from the other end */ @@ -2170,6 +2172,13 @@ int ssl3_send_client_key_exchange(SSL *s int ecdh_clnt_cert = 0; int field_size = 0; + if (s->session->sess_cert == NULL) + { + ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_UNEXPECTED_MESSAGE); + SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,SSL_R_UNEXPECTED_MESSAGE); + goto err; + } + /* Did we send out the client's * ECDH share for use in premaster * computation as part of client certificate? Modified: stable/8/crypto/openssl/ssl/s3_pkt.c ============================================================================== --- stable/8/crypto/openssl/ssl/s3_pkt.c Thu Jun 5 12:32:16 2014 (r267102) +++ stable/8/crypto/openssl/ssl/s3_pkt.c Thu Jun 5 12:32:38 2014 (r267103) @@ -1147,6 +1147,15 @@ start: goto f_err; } + if (!(s->s3->flags & SSL3_FLAGS_CCS_OK)) + { + al=SSL_AD_UNEXPECTED_MESSAGE; + SSLerr(SSL_F_SSL3_READ_BYTES,SSL_R_CCS_RECEIVED_EARLY); + goto f_err; + } + + s->s3->flags &= ~SSL3_FLAGS_CCS_OK; + rr->length=0; if (s->msg_callback) @@ -1278,7 +1287,7 @@ int ssl3_do_change_cipher_spec(SSL *s) if (s->s3->tmp.key_block == NULL) { - if (s->session == NULL) + if (s->session == NULL || s->session->master_key_length == 0) { /* might happen if dtls1_read_bytes() calls this */ SSLerr(SSL_F_SSL3_DO_CHANGE_CIPHER_SPEC,SSL_R_CCS_RECEIVED_EARLY); Modified: stable/8/crypto/openssl/ssl/s3_srvr.c ============================================================================== --- stable/8/crypto/openssl/ssl/s3_srvr.c Thu Jun 5 12:32:16 2014 (r267102) +++ stable/8/crypto/openssl/ssl/s3_srvr.c Thu Jun 5 12:32:38 2014 (r267103) @@ -523,6 +523,7 @@ int ssl3_accept(SSL *s) case SSL3_ST_SR_CERT_VRFY_A: case SSL3_ST_SR_CERT_VRFY_B: + s->s3->flags |= SSL3_FLAGS_CCS_OK; /* we should decide if we expected this one */ ret=ssl3_get_cert_verify(s); if (ret <= 0) goto end; @@ -533,6 +534,7 @@ int ssl3_accept(SSL *s) case SSL3_ST_SR_FINISHED_A: case SSL3_ST_SR_FINISHED_B: + s->s3->flags |= SSL3_FLAGS_CCS_OK; ret=ssl3_get_finished(s,SSL3_ST_SR_FINISHED_A, SSL3_ST_SR_FINISHED_B); if (ret <= 0) goto end; Modified: stable/8/crypto/openssl/ssl/ssl3.h ============================================================================== --- stable/8/crypto/openssl/ssl/ssl3.h Thu Jun 5 12:32:16 2014 (r267102) +++ stable/8/crypto/openssl/ssl/ssl3.h Thu Jun 5 12:32:38 2014 (r267103) @@ -344,6 +344,7 @@ typedef struct ssl3_buffer_st * effected, but we can't prevent that. */ #define SSL3_FLAGS_SGC_RESTART_DONE 0x0040 +#define SSL3_FLAGS_CCS_OK 0x0080 typedef struct ssl3_state_st { From owner-svn-src-stable@FreeBSD.ORG Thu Jun 5 12:32:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0748727; Thu, 5 Jun 2014 12:32:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82E3E258A; Thu, 5 Jun 2014 12:32:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s55CWfIv038472; Thu, 5 Jun 2014 12:32:41 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s55CWeA0038467; Thu, 5 Jun 2014 12:32:40 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201406051232.s55CWeA0038467@svn.freebsd.org> From: Xin LI Date: Thu, 5 Jun 2014 12:32:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267103 - in stable: 10/crypto/openssl/ssl 8/crypto/openssl/ssl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2014 12:32:41 -0000 Author: delphij Date: Thu Jun 5 12:32:38 2014 New Revision: 267103 URL: http://svnweb.freebsd.org/changeset/base/267103 Log: Fix OpenSSL multiple vulnerabilities. Security: CVE-2014-0195, CVE-2014-0221, CVE-2014-0224, CVE-2014-3470 Security: SA-14:14.openssl Modified: stable/10/crypto/openssl/ssl/d1_both.c stable/10/crypto/openssl/ssl/s3_clnt.c stable/10/crypto/openssl/ssl/s3_pkt.c stable/10/crypto/openssl/ssl/s3_srvr.c stable/10/crypto/openssl/ssl/ssl3.h Changes in other areas also in this revision: Modified: stable/8/crypto/openssl/ssl/d1_both.c stable/8/crypto/openssl/ssl/s3_clnt.c stable/8/crypto/openssl/ssl/s3_pkt.c stable/8/crypto/openssl/ssl/s3_srvr.c stable/8/crypto/openssl/ssl/ssl3.h Modified: stable/10/crypto/openssl/ssl/d1_both.c ============================================================================== --- stable/10/crypto/openssl/ssl/d1_both.c Thu Jun 5 12:32:16 2014 (r267102) +++ stable/10/crypto/openssl/ssl/d1_both.c Thu Jun 5 12:32:38 2014 (r267103) @@ -627,7 +627,16 @@ dtls1_reassemble_fragment(SSL *s, struct frag->msg_header.frag_off = 0; } else + { frag = (hm_fragment*) item->data; + if (frag->msg_header.msg_len != msg_hdr->msg_len) + { + item = NULL; + frag = NULL; + goto err; + } + } + /* If message is already reassembled, this must be a * retransmit and can be dropped. @@ -784,6 +793,7 @@ dtls1_get_message_fragment(SSL *s, int s int i,al; struct hm_header_st msg_hdr; + redo: /* see if we have the required fragment already */ if ((frag_len = dtls1_retrieve_buffered_fragment(s,max,ok)) || *ok) { @@ -842,8 +852,7 @@ dtls1_get_message_fragment(SSL *s, int s s->msg_callback_arg); s->init_num = 0; - return dtls1_get_message_fragment(s, st1, stn, - max, ok); + goto redo; } else /* Incorrectly formated Hello request */ { Modified: stable/10/crypto/openssl/ssl/s3_clnt.c ============================================================================== --- stable/10/crypto/openssl/ssl/s3_clnt.c Thu Jun 5 12:32:16 2014 (r267102) +++ stable/10/crypto/openssl/ssl/s3_clnt.c Thu Jun 5 12:32:38 2014 (r267103) @@ -559,6 +559,7 @@ int ssl3_connect(SSL *s) case SSL3_ST_CR_FINISHED_A: case SSL3_ST_CR_FINISHED_B: + s->s3->flags |= SSL3_FLAGS_CCS_OK; ret=ssl3_get_finished(s,SSL3_ST_CR_FINISHED_A, SSL3_ST_CR_FINISHED_B); if (ret <= 0) goto end; @@ -915,6 +916,7 @@ int ssl3_get_server_hello(SSL *s) SSLerr(SSL_F_SSL3_GET_SERVER_HELLO,SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT); goto f_err; } + s->s3->flags |= SSL3_FLAGS_CCS_OK; s->hit=1; } else /* a miss or crap from the other end */ @@ -2510,6 +2512,13 @@ int ssl3_send_client_key_exchange(SSL *s int ecdh_clnt_cert = 0; int field_size = 0; + if (s->session->sess_cert == NULL) + { + ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_UNEXPECTED_MESSAGE); + SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,SSL_R_UNEXPECTED_MESSAGE); + goto err; + } + /* Did we send out the client's * ECDH share for use in premaster * computation as part of client certificate? Modified: stable/10/crypto/openssl/ssl/s3_pkt.c ============================================================================== --- stable/10/crypto/openssl/ssl/s3_pkt.c Thu Jun 5 12:32:16 2014 (r267102) +++ stable/10/crypto/openssl/ssl/s3_pkt.c Thu Jun 5 12:32:38 2014 (r267103) @@ -1301,6 +1301,15 @@ start: goto f_err; } + if (!(s->s3->flags & SSL3_FLAGS_CCS_OK)) + { + al=SSL_AD_UNEXPECTED_MESSAGE; + SSLerr(SSL_F_SSL3_READ_BYTES,SSL_R_CCS_RECEIVED_EARLY); + goto f_err; + } + + s->s3->flags &= ~SSL3_FLAGS_CCS_OK; + rr->length=0; if (s->msg_callback) @@ -1435,7 +1444,7 @@ int ssl3_do_change_cipher_spec(SSL *s) if (s->s3->tmp.key_block == NULL) { - if (s->session == NULL) + if (s->session == NULL || s->session->master_key_length == 0) { /* might happen if dtls1_read_bytes() calls this */ SSLerr(SSL_F_SSL3_DO_CHANGE_CIPHER_SPEC,SSL_R_CCS_RECEIVED_EARLY); Modified: stable/10/crypto/openssl/ssl/s3_srvr.c ============================================================================== --- stable/10/crypto/openssl/ssl/s3_srvr.c Thu Jun 5 12:32:16 2014 (r267102) +++ stable/10/crypto/openssl/ssl/s3_srvr.c Thu Jun 5 12:32:38 2014 (r267103) @@ -673,6 +673,7 @@ int ssl3_accept(SSL *s) case SSL3_ST_SR_CERT_VRFY_A: case SSL3_ST_SR_CERT_VRFY_B: + s->s3->flags |= SSL3_FLAGS_CCS_OK; /* we should decide if we expected this one */ ret=ssl3_get_cert_verify(s); if (ret <= 0) goto end; @@ -700,6 +701,7 @@ int ssl3_accept(SSL *s) case SSL3_ST_SR_FINISHED_A: case SSL3_ST_SR_FINISHED_B: + s->s3->flags |= SSL3_FLAGS_CCS_OK; ret=ssl3_get_finished(s,SSL3_ST_SR_FINISHED_A, SSL3_ST_SR_FINISHED_B); if (ret <= 0) goto end; @@ -770,7 +772,10 @@ int ssl3_accept(SSL *s) s->s3->tmp.next_state=SSL3_ST_SR_FINISHED_A; #else if (s->s3->next_proto_neg_seen) + { + s->s3->flags |= SSL3_FLAGS_CCS_OK; s->s3->tmp.next_state=SSL3_ST_SR_NEXT_PROTO_A; + } else s->s3->tmp.next_state=SSL3_ST_SR_FINISHED_A; #endif Modified: stable/10/crypto/openssl/ssl/ssl3.h ============================================================================== --- stable/10/crypto/openssl/ssl/ssl3.h Thu Jun 5 12:32:16 2014 (r267102) +++ stable/10/crypto/openssl/ssl/ssl3.h Thu Jun 5 12:32:38 2014 (r267103) @@ -399,6 +399,7 @@ typedef struct ssl3_buffer_st * effected, but we can't prevent that. */ #define SSL3_FLAGS_SGC_RESTART_DONE 0x0040 +#define SSL3_FLAGS_CCS_OK 0x0080 #ifndef OPENSSL_NO_SSL_INTERN From owner-svn-src-stable@FreeBSD.ORG Thu Jun 5 12:53:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B143391; Thu, 5 Jun 2014 12:53:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C63228F8; Thu, 5 Jun 2014 12:53:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s55Cr7UN047453; Thu, 5 Jun 2014 12:53:07 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s55Cr6Pl047448; Thu, 5 Jun 2014 12:53:06 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201406051253.s55Cr6Pl047448@svn.freebsd.org> From: Xin LI Date: Thu, 5 Jun 2014 12:53:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267106 - stable/9/crypto/openssl/ssl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2014 12:53:07 -0000 Author: delphij Date: Thu Jun 5 12:53:06 2014 New Revision: 267106 URL: http://svnweb.freebsd.org/changeset/base/267106 Log: Fix OpenSSL multiple vulnerabilities. Security: CVE-2014-0195, CVE-2014-0221, CVE-2014-0224, CVE-2014-3470 Security: SA-14:14.openssl Approved by: re (jpaetzel) Modified: stable/9/crypto/openssl/ssl/d1_both.c stable/9/crypto/openssl/ssl/s3_clnt.c stable/9/crypto/openssl/ssl/s3_pkt.c stable/9/crypto/openssl/ssl/s3_srvr.c stable/9/crypto/openssl/ssl/ssl3.h Modified: stable/9/crypto/openssl/ssl/d1_both.c ============================================================================== --- stable/9/crypto/openssl/ssl/d1_both.c Thu Jun 5 12:51:12 2014 (r267105) +++ stable/9/crypto/openssl/ssl/d1_both.c Thu Jun 5 12:53:06 2014 (r267106) @@ -620,7 +620,16 @@ dtls1_reassemble_fragment(SSL *s, struct frag->msg_header.frag_off = 0; } else + { frag = (hm_fragment*) item->data; + if (frag->msg_header.msg_len != msg_hdr->msg_len) + { + item = NULL; + frag = NULL; + goto err; + } + } + /* If message is already reassembled, this must be a * retransmit and can be dropped. @@ -777,6 +786,7 @@ dtls1_get_message_fragment(SSL *s, int s int i,al; struct hm_header_st msg_hdr; + redo: /* see if we have the required fragment already */ if ((frag_len = dtls1_retrieve_buffered_fragment(s,max,ok)) || *ok) { @@ -835,8 +845,7 @@ dtls1_get_message_fragment(SSL *s, int s s->msg_callback_arg); s->init_num = 0; - return dtls1_get_message_fragment(s, st1, stn, - max, ok); + goto redo; } else /* Incorrectly formated Hello request */ { Modified: stable/9/crypto/openssl/ssl/s3_clnt.c ============================================================================== --- stable/9/crypto/openssl/ssl/s3_clnt.c Thu Jun 5 12:51:12 2014 (r267105) +++ stable/9/crypto/openssl/ssl/s3_clnt.c Thu Jun 5 12:53:06 2014 (r267106) @@ -491,6 +491,7 @@ int ssl3_connect(SSL *s) case SSL3_ST_CR_FINISHED_A: case SSL3_ST_CR_FINISHED_B: + s->s3->flags |= SSL3_FLAGS_CCS_OK; ret=ssl3_get_finished(s,SSL3_ST_CR_FINISHED_A, SSL3_ST_CR_FINISHED_B); if (ret <= 0) goto end; @@ -777,6 +778,7 @@ int ssl3_get_server_hello(SSL *s) SSLerr(SSL_F_SSL3_GET_SERVER_HELLO,SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT); goto f_err; } + s->s3->flags |= SSL3_FLAGS_CCS_OK; s->hit=1; } else /* a miss or crap from the other end */ @@ -2170,6 +2172,13 @@ int ssl3_send_client_key_exchange(SSL *s int ecdh_clnt_cert = 0; int field_size = 0; + if (s->session->sess_cert == NULL) + { + ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_UNEXPECTED_MESSAGE); + SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,SSL_R_UNEXPECTED_MESSAGE); + goto err; + } + /* Did we send out the client's * ECDH share for use in premaster * computation as part of client certificate? Modified: stable/9/crypto/openssl/ssl/s3_pkt.c ============================================================================== --- stable/9/crypto/openssl/ssl/s3_pkt.c Thu Jun 5 12:51:12 2014 (r267105) +++ stable/9/crypto/openssl/ssl/s3_pkt.c Thu Jun 5 12:53:06 2014 (r267106) @@ -1147,6 +1147,15 @@ start: goto f_err; } + if (!(s->s3->flags & SSL3_FLAGS_CCS_OK)) + { + al=SSL_AD_UNEXPECTED_MESSAGE; + SSLerr(SSL_F_SSL3_READ_BYTES,SSL_R_CCS_RECEIVED_EARLY); + goto f_err; + } + + s->s3->flags &= ~SSL3_FLAGS_CCS_OK; + rr->length=0; if (s->msg_callback) @@ -1278,7 +1287,7 @@ int ssl3_do_change_cipher_spec(SSL *s) if (s->s3->tmp.key_block == NULL) { - if (s->session == NULL) + if (s->session == NULL || s->session->master_key_length == 0) { /* might happen if dtls1_read_bytes() calls this */ SSLerr(SSL_F_SSL3_DO_CHANGE_CIPHER_SPEC,SSL_R_CCS_RECEIVED_EARLY); Modified: stable/9/crypto/openssl/ssl/s3_srvr.c ============================================================================== --- stable/9/crypto/openssl/ssl/s3_srvr.c Thu Jun 5 12:51:12 2014 (r267105) +++ stable/9/crypto/openssl/ssl/s3_srvr.c Thu Jun 5 12:53:06 2014 (r267106) @@ -523,6 +523,7 @@ int ssl3_accept(SSL *s) case SSL3_ST_SR_CERT_VRFY_A: case SSL3_ST_SR_CERT_VRFY_B: + s->s3->flags |= SSL3_FLAGS_CCS_OK; /* we should decide if we expected this one */ ret=ssl3_get_cert_verify(s); if (ret <= 0) goto end; @@ -533,6 +534,7 @@ int ssl3_accept(SSL *s) case SSL3_ST_SR_FINISHED_A: case SSL3_ST_SR_FINISHED_B: + s->s3->flags |= SSL3_FLAGS_CCS_OK; ret=ssl3_get_finished(s,SSL3_ST_SR_FINISHED_A, SSL3_ST_SR_FINISHED_B); if (ret <= 0) goto end; Modified: stable/9/crypto/openssl/ssl/ssl3.h ============================================================================== --- stable/9/crypto/openssl/ssl/ssl3.h Thu Jun 5 12:51:12 2014 (r267105) +++ stable/9/crypto/openssl/ssl/ssl3.h Thu Jun 5 12:53:06 2014 (r267106) @@ -344,6 +344,7 @@ typedef struct ssl3_buffer_st * effected, but we can't prevent that. */ #define SSL3_FLAGS_SGC_RESTART_DONE 0x0040 +#define SSL3_FLAGS_CCS_OK 0x0080 typedef struct ssl3_state_st { From owner-svn-src-stable@FreeBSD.ORG Thu Jun 5 13:08:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F17F0CA9; Thu, 5 Jun 2014 13:08:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE3292A61; Thu, 5 Jun 2014 13:08:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s55D88d6053473; Thu, 5 Jun 2014 13:08:08 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s55D88mM053472; Thu, 5 Jun 2014 13:08:08 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201406051308.s55D88mM053472@svn.freebsd.org> From: Marius Strobl Date: Thu, 5 Jun 2014 13:08:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267107 - stable/10/sys/i386/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2014 13:08:09 -0000 Author: marius Date: Thu Jun 5 13:08:08 2014 New Revision: 267107 URL: http://svnweb.freebsd.org/changeset/base/267107 Log: Fix mismerge in r267049 and put makeoptions DEBUG=-gdwarf-2 instead of DEBUG=-g back. Still, the original comment should be restored in head and then be MFCed along with r263749. Modified: stable/10/sys/i386/conf/XEN Modified: stable/10/sys/i386/conf/XEN ============================================================================== --- stable/10/sys/i386/conf/XEN Thu Jun 5 12:53:06 2014 (r267106) +++ stable/10/sys/i386/conf/XEN Thu Jun 5 13:08:08 2014 (r267107) @@ -6,7 +6,7 @@ cpu I686_CPU ident XEN -makeoptions DEBUG=-g +makeoptions DEBUG=-gdwarf-2 # Build kernel with gdb(1) debug symbols # The following modules don't build with PAE and XEN enabled. makeoptions WITHOUT_MODULES="ctl cxgb dpt drm drm2 hptmv ida malo mwl rdma" From owner-svn-src-stable@FreeBSD.ORG Thu Jun 5 13:24:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4BF93795; Thu, 5 Jun 2014 13:24:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E7E22D55; Thu, 5 Jun 2014 13:24:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s55DOCRD062063; Thu, 5 Jun 2014 13:24:12 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s55DOCOn062062; Thu, 5 Jun 2014 13:24:12 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201406051324.s55DOCOn062062@svn.freebsd.org> From: Marius Strobl Date: Thu, 5 Jun 2014 13:24:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r267108 - stable/8/sys/dev/sound/pci X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2014 13:24:13 -0000 Author: marius Date: Thu Jun 5 13:24:12 2014 New Revision: 267108 URL: http://svnweb.freebsd.org/changeset/base/267108 Log: MFC: r266793, r266799, r266808 - Fix compilation with PAE support enabled by merging r233362 and, thus, doing away with the unnecessary uint8_t pointer casting. physical addresses. - Nuke the unused softc of emujoy(4). - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. Sponsored by: Bally Wulff Games & Entertainment GmbH Modified: stable/8/sys/dev/sound/pci/emu10k1.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/pci/ (props changed) Modified: stable/8/sys/dev/sound/pci/emu10k1.c ============================================================================== --- stable/8/sys/dev/sound/pci/emu10k1.c Thu Jun 5 13:08:08 2014 (r267107) +++ stable/8/sys/dev/sound/pci/emu10k1.c Thu Jun 5 13:24:12 2014 (r267108) @@ -1378,7 +1378,7 @@ emu_memalloc(struct sc_info *sc, u_int32 ofs = 0; for (idx = start; idx < start + blksz; idx++) { mem->bmap[idx >> 3] |= 1 << (idx & 7); - tmp = (u_int32_t)(u_long)((u_int8_t *)blk->buf_addr + ofs); + tmp = (uint32_t)(blk->buf_addr + ofs); #ifdef EMUDEBUG printf("pte[%d] -> %x phys, %x virt\n", idx, tmp, ((u_int32_t)buf) + ofs); @@ -2186,7 +2186,7 @@ static device_method_t emu_methods[] = { DEVMETHOD(device_attach, emu_pci_attach), DEVMETHOD(device_detach, emu_pci_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t emu_driver = { @@ -2195,7 +2195,7 @@ static driver_t emu_driver = { PCM_SOFTC_SIZE, }; -DRIVER_MODULE(snd_emu10k1, pci, emu_driver, pcm_devclass, 0, 0); +DRIVER_MODULE(snd_emu10k1, pci, emu_driver, pcm_devclass, NULL, NULL); MODULE_DEPEND(snd_emu10k1, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER); MODULE_VERSION(snd_emu10k1, 1); MODULE_DEPEND(snd_emu10k1, midi, 1, 1, 1); @@ -2224,12 +2224,14 @@ emujoy_pci_probe(device_t dev) static int emujoy_pci_attach(device_t dev) { + return 0; } static int emujoy_pci_detach(device_t dev) { + return 0; } @@ -2238,16 +2240,15 @@ static device_method_t emujoy_methods[] DEVMETHOD(device_attach, emujoy_pci_attach), DEVMETHOD(device_detach, emujoy_pci_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t emujoy_driver = { "emujoy", emujoy_methods, - 8, + 1 /* no softc */ }; static devclass_t emujoy_devclass; -DRIVER_MODULE(emujoy, pci, emujoy_driver, emujoy_devclass, 0, 0); - +DRIVER_MODULE(emujoy, pci, emujoy_driver, emujoy_devclass, NULL, NULL); From owner-svn-src-stable@FreeBSD.ORG Thu Jun 5 15:16:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0BD6AC48; Thu, 5 Jun 2014 15:16:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC83028A7; Thu, 5 Jun 2014 15:16:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s55FGiVg019333; Thu, 5 Jun 2014 15:16:44 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s55FGiRL019332; Thu, 5 Jun 2014 15:16:44 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201406051516.s55FGiRL019332@svn.freebsd.org> From: Hajimu UMEMOTO Date: Thu, 5 Jun 2014 15:16:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267111 - stable/10/lib/libcrypt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2014 15:16:45 -0000 Author: ume Date: Thu Jun 5 15:16:44 2014 New Revision: 267111 URL: http://svnweb.freebsd.org/changeset/base/267111 Log: MFH r266813: Don't break the legacy applications which set just 2 bytes to salt. Modified: stable/10/lib/libcrypt/crypt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libcrypt/crypt.c ============================================================================== --- stable/10/lib/libcrypt/crypt.c Thu Jun 5 14:19:32 2014 (r267110) +++ stable/10/lib/libcrypt/crypt.c Thu Jun 5 15:16:44 2014 (r267111) @@ -104,12 +104,16 @@ char * crypt(const char *passwd, const char *salt) { const struct crypt_format *cf; +#ifdef HAS_DES + int len; +#endif for (cf = crypt_formats; cf->name != NULL; ++cf) if (cf->magic != NULL && strstr(salt, cf->magic) == salt) return (cf->func(passwd, salt)); #ifdef HAS_DES - if (strlen(salt) == 13 && strspn(salt, DES_SALT_ALPHABET) == 13) + len = strlen(salt); + if ((len == 13 || len == 2) && strspn(salt, DES_SALT_ALPHABET) == len) return (crypt_des(passwd, salt)); #endif return (crypt_format->func(passwd, salt)); From owner-svn-src-stable@FreeBSD.ORG Thu Jun 5 15:18:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67821E71; Thu, 5 Jun 2014 15:18:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5405C28BE; Thu, 5 Jun 2014 15:18:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s55FIoAQ019793; Thu, 5 Jun 2014 15:18:50 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s55FIoap019792; Thu, 5 Jun 2014 15:18:50 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201406051518.s55FIoap019792@svn.freebsd.org> From: Ed Maste Date: Thu, 5 Jun 2014 15:18:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267112 - stable/9/sys/net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2014 15:18:50 -0000 Author: emaste Date: Thu Jun 5 15:18:49 2014 New Revision: 267112 URL: http://svnweb.freebsd.org/changeset/base/267112 Log: MFC r240938, r240942: Avoid INVARIANTS panic destroying an in-use tap(4) The requirement (implied by the KASSERT in tap_destroy) that the tap is closed isn't valid; destroy_dev will block in devdrn while other threads are in d_* functions. Note: if_tun had the same issue, addressed in SVN revisions r186391, r186483 and r186497. The use of the condvar there appears to be redundant with the functionality provided by destroy_dev. PR: 172075 Approved by: re Modified: stable/9/sys/net/if_tap.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/net/ (props changed) Modified: stable/9/sys/net/if_tap.c ============================================================================== --- stable/9/sys/net/if_tap.c Thu Jun 5 15:16:44 2014 (r267111) +++ stable/9/sys/net/if_tap.c Thu Jun 5 15:18:49 2014 (r267112) @@ -213,14 +213,10 @@ tap_destroy(struct tap_softc *tp) { struct ifnet *ifp = tp->tap_ifp; - /* Unlocked read. */ - KASSERT(!(tp->tap_flags & TAP_OPEN), - ("%s flags is out of sync", ifp->if_xname)); - CURVNET_SET(ifp->if_vnet); + destroy_dev(tp->tap_dev); seldrain(&tp->tap_rsel); knlist_destroy(&tp->tap_rsel.si_note); - destroy_dev(tp->tap_dev); ether_ifdetach(ifp); if_free_type(ifp, IFT_ETHER); From owner-svn-src-stable@FreeBSD.ORG Thu Jun 5 15:21:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42F3F24B; Thu, 5 Jun 2014 15:21:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 148BB296F; Thu, 5 Jun 2014 15:21:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s55FLPHl021723; Thu, 5 Jun 2014 15:21:25 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s55FLPk4021718; Thu, 5 Jun 2014 15:21:25 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201406051521.s55FLPk4021718@svn.freebsd.org> From: Bryan Drewery Date: Thu, 5 Jun 2014 15:21:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267113 - in stable/10: etc etc/mtree usr.sbin/newsyslog X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2014 15:21:26 -0000 Author: bdrewery Date: Thu Jun 5 15:21:25 2014 New Revision: 267113 URL: http://svnweb.freebsd.org/changeset/base/267113 Log: MFC r266463: - Include /etc/newsyslog.conf.d/* and /usr/local/etc/newsyslog.conf.d/* by default for newsyslog(8). Modified: stable/10/etc/mtree/BSD.root.dist stable/10/etc/newsyslog.conf stable/10/usr.sbin/newsyslog/newsyslog.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.root.dist ============================================================================== --- stable/10/etc/mtree/BSD.root.dist Thu Jun 5 15:18:49 2014 (r267112) +++ stable/10/etc/mtree/BSD.root.dist Thu Jun 5 15:21:25 2014 (r267113) @@ -38,6 +38,8 @@ .. mtree .. + newsyslog.conf.d + .. ntp mode=0700 .. pam.d Modified: stable/10/etc/newsyslog.conf ============================================================================== --- stable/10/etc/newsyslog.conf Thu Jun 5 15:18:49 2014 (r267112) +++ stable/10/etc/newsyslog.conf Thu Jun 5 15:21:25 2014 (r267113) @@ -38,3 +38,6 @@ /var/log/utx.log 644 3 * @01T05 B /var/log/weekly.log 640 5 * $W6D0 JN /var/log/xferlog 600 7 100 * JC + + /etc/newsyslog.conf.d/* + /usr/local/etc/newsyslog.conf.d/* Modified: stable/10/usr.sbin/newsyslog/newsyslog.8 ============================================================================== --- stable/10/usr.sbin/newsyslog/newsyslog.8 Thu Jun 5 15:18:49 2014 (r267112) +++ stable/10/usr.sbin/newsyslog/newsyslog.8 Thu Jun 5 15:21:25 2014 (r267113) @@ -17,7 +17,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd January 31, 2011 +.Dd May 19, 2014 .Dt NEWSYSLOG 8 .Os .Sh NAME @@ -261,10 +261,16 @@ If additional command line arguments are will only examine log files that match those arguments; otherwise, it will examine all files listed in the configuration file. .Sh FILES -.Bl -tag -width /etc/newsyslog.confxxxx -compact +.Bl -tag -width /usr/local/etc/newsyslog.conf.d -compact .It Pa /etc/newsyslog.conf .Nm configuration file +.It Pa /etc/newsyslog.conf.d +Each file in this directory will be included by the default +.Pa newsyslog.conf . +.It Pa /usr/local/etc/newsyslog.conf.d +Each file in this directory will be included by the default +.Pa newsyslog.conf . .El .Sh COMPATIBILITY Previous versions of the From owner-svn-src-stable@FreeBSD.ORG Thu Jun 5 15:33:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0CA479C1; Thu, 5 Jun 2014 15:33:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D27FB2AE7; Thu, 5 Jun 2014 15:33:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s55FXAMa028360; Thu, 5 Jun 2014 15:33:10 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s55FXApo028355; Thu, 5 Jun 2014 15:33:10 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201406051533.s55FXApo028355@svn.freebsd.org> From: Bryan Drewery Date: Thu, 5 Jun 2014 15:33:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267114 - in stable/9: etc etc/mtree usr.sbin/newsyslog X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2014 15:33:11 -0000 Author: bdrewery Date: Thu Jun 5 15:33:09 2014 New Revision: 267114 URL: http://svnweb.freebsd.org/changeset/base/267114 Log: MFC r266463: - Include /etc/newsyslog.conf.d/* and /usr/local/etc/newsyslog.conf.d/* by default for newsyslog(8). Relnotes: yes Approved by: re (gjb) Modified: stable/9/etc/mtree/BSD.root.dist stable/9/etc/newsyslog.conf stable/9/usr.sbin/newsyslog/newsyslog.8 Directory Properties: stable/9/etc/ (props changed) stable/9/etc/mtree/ (props changed) stable/9/usr.sbin/newsyslog/ (props changed) Modified: stable/9/etc/mtree/BSD.root.dist ============================================================================== --- stable/9/etc/mtree/BSD.root.dist Thu Jun 5 15:21:25 2014 (r267113) +++ stable/9/etc/mtree/BSD.root.dist Thu Jun 5 15:33:09 2014 (r267114) @@ -38,6 +38,8 @@ .. mtree .. + newsyslog.conf.d + .. ntp mode=0700 .. pam.d Modified: stable/9/etc/newsyslog.conf ============================================================================== --- stable/9/etc/newsyslog.conf Thu Jun 5 15:21:25 2014 (r267113) +++ stable/9/etc/newsyslog.conf Thu Jun 5 15:33:09 2014 (r267114) @@ -36,3 +36,6 @@ /var/log/utx.log 644 3 * @01T05 B /var/log/weekly.log 640 5 * $W6D0 JN /var/log/xferlog 600 7 100 * JC + + /etc/newsyslog.conf.d/* + /usr/local/etc/newsyslog.conf.d/* Modified: stable/9/usr.sbin/newsyslog/newsyslog.8 ============================================================================== --- stable/9/usr.sbin/newsyslog/newsyslog.8 Thu Jun 5 15:21:25 2014 (r267113) +++ stable/9/usr.sbin/newsyslog/newsyslog.8 Thu Jun 5 15:33:09 2014 (r267114) @@ -17,7 +17,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd January 31, 2011 +.Dd May 19, 2014 .Dt NEWSYSLOG 8 .Os .Sh NAME @@ -261,10 +261,16 @@ If additional command line arguments are will only examine log files that match those arguments; otherwise, it will examine all files listed in the configuration file. .Sh FILES -.Bl -tag -width /etc/newsyslog.confxxxx -compact +.Bl -tag -width /usr/local/etc/newsyslog.conf.d -compact .It Pa /etc/newsyslog.conf .Nm configuration file +.It Pa /etc/newsyslog.conf.d +Each file in this directory will be included by the default +.Pa newsyslog.conf . +.It Pa /usr/local/etc/newsyslog.conf.d +Each file in this directory will be included by the default +.Pa newsyslog.conf . .El .Sh COMPATIBILITY Previous versions of the From owner-svn-src-stable@FreeBSD.ORG Thu Jun 5 15:34:19 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 14039B15 for ; Thu, 5 Jun 2014 15:34:19 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED7A72AF7 for ; Thu, 5 Jun 2014 15:34:18 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s55FYIul085394 for ; Thu, 5 Jun 2014 15:34:18 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s55FYIqs085387 for svn-src-stable@freebsd.org; Thu, 5 Jun 2014 15:34:18 GMT (envelope-from bdrewery) Received: (qmail 19312 invoked from network); 5 Jun 2014 10:34:16 -0500 Received: from unknown (HELO blah) (freebsd@shatow.net@67.182.131.225) by sweb.xzibition.com with ESMTPA; 5 Jun 2014 10:34:16 -0500 Message-ID: <53908DFA.2050206@FreeBSD.org> Date: Thu, 05 Jun 2014 10:34:18 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r267113 - in stable/10: etc etc/mtree usr.sbin/newsyslog References: <201406051521.s55FLPk4021718@svn.freebsd.org> In-Reply-To: <201406051521.s55FLPk4021718@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: re@FreeBSD.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2014 15:34:19 -0000 On 6/5/14, 10:21 AM, Bryan Drewery wrote: > Author: bdrewery > Date: Thu Jun 5 15:21:25 2014 > New Revision: 267113 > URL: http://svnweb.freebsd.org/changeset/base/267113 > > Log: > MFC r266463: > > - Include /etc/newsyslog.conf.d/* and /usr/local/etc/newsyslog.conf.d/* by > default for newsyslog(8). Relnotes: yes I'll update my mfc script to copy that in. -- Regards, Bryan Drewery From owner-svn-src-stable@FreeBSD.ORG Thu Jun 5 15:39:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19B75E51; Thu, 5 Jun 2014 15:39:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E08462B4A; Thu, 5 Jun 2014 15:39:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s55FdtH5029243; Thu, 5 Jun 2014 15:39:55 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s55Fdt2n029234; Thu, 5 Jun 2014 15:39:55 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201406051539.s55Fdt2n029234@svn.freebsd.org> From: Bryan Drewery Date: Thu, 5 Jun 2014 15:39:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r267115 - in stable/8: etc etc/mtree usr.sbin/newsyslog X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2014 15:39:56 -0000 Author: bdrewery Date: Thu Jun 5 15:39:54 2014 New Revision: 267115 URL: http://svnweb.freebsd.org/changeset/base/267115 Log: MFC r266463: - Include /etc/newsyslog.conf.d/* and /usr/local/etc/newsyslog.conf.d/* by default for newsyslog(8). Modified: stable/8/etc/mtree/BSD.root.dist stable/8/etc/newsyslog.conf stable/8/usr.sbin/newsyslog/newsyslog.8 Directory Properties: stable/8/etc/ (props changed) stable/8/usr.sbin/newsyslog/ (props changed) Modified: stable/8/etc/mtree/BSD.root.dist ============================================================================== --- stable/8/etc/mtree/BSD.root.dist Thu Jun 5 15:33:09 2014 (r267114) +++ stable/8/etc/mtree/BSD.root.dist Thu Jun 5 15:39:54 2014 (r267115) @@ -38,6 +38,8 @@ .. mtree .. + newsyslog.conf.d + .. ntp mode=0700 .. pam.d Modified: stable/8/etc/newsyslog.conf ============================================================================== --- stable/8/etc/newsyslog.conf Thu Jun 5 15:33:09 2014 (r267114) +++ stable/8/etc/newsyslog.conf Thu Jun 5 15:39:54 2014 (r267115) @@ -36,3 +36,6 @@ /var/log/weekly.log 640 5 1 $W6D0 JN /var/log/wtmp 644 3 * @01T05 B /var/log/xferlog 600 7 100 * JC + + /etc/newsyslog.conf.d/* + /usr/local/etc/newsyslog.conf.d/* Modified: stable/8/usr.sbin/newsyslog/newsyslog.8 ============================================================================== --- stable/8/usr.sbin/newsyslog/newsyslog.8 Thu Jun 5 15:33:09 2014 (r267114) +++ stable/8/usr.sbin/newsyslog/newsyslog.8 Thu Jun 5 15:39:54 2014 (r267115) @@ -17,7 +17,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd January 31, 2011 +.Dd May 19, 2014 .Dt NEWSYSLOG 8 .Os .Sh NAME @@ -262,10 +262,16 @@ If additional command line arguments are will only examine log files that match those arguments; otherwise, it will examine all files listed in the configuration file. .Sh FILES -.Bl -tag -width /etc/newsyslog.confxxxx -compact +.Bl -tag -width /usr/local/etc/newsyslog.conf.d -compact .It Pa /etc/newsyslog.conf .Nm configuration file +.It Pa /etc/newsyslog.conf.d +Each file in this directory will be included by the default +.Pa newsyslog.conf . +.It Pa /usr/local/etc/newsyslog.conf.d +Each file in this directory will be included by the default +.Pa newsyslog.conf . .El .Sh COMPATIBILITY Previous versions of the From owner-svn-src-stable@FreeBSD.ORG Thu Jun 5 15:39:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9503DE52; Thu, 5 Jun 2014 15:39:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 810D42B4B; Thu, 5 Jun 2014 15:39:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s55Fdvkl029284; Thu, 5 Jun 2014 15:39:57 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s55FdvmU029282; Thu, 5 Jun 2014 15:39:57 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201406051539.s55FdvmU029282@svn.freebsd.org> From: Hajimu UMEMOTO Date: Thu, 5 Jun 2014 15:39:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267116 - stable/9/lib/libcrypt X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2014 15:39:57 -0000 Author: ume Date: Thu Jun 5 15:39:57 2014 New Revision: 267116 URL: http://svnweb.freebsd.org/changeset/base/267116 Log: MFH r266813: Don't break the legacy applications which set just 2 bytes to salt. Approved by: re (gjb) Modified: stable/9/lib/libcrypt/crypt.c Directory Properties: stable/9/lib/libcrypt/ (props changed) Modified: stable/9/lib/libcrypt/crypt.c ============================================================================== --- stable/9/lib/libcrypt/crypt.c Thu Jun 5 15:39:54 2014 (r267115) +++ stable/9/lib/libcrypt/crypt.c Thu Jun 5 15:39:57 2014 (r267116) @@ -104,12 +104,16 @@ char * crypt(const char *passwd, const char *salt) { const struct crypt_format *cf; +#ifdef HAS_DES + int len; +#endif for (cf = crypt_formats; cf->name != NULL; ++cf) if (cf->magic != NULL && strstr(salt, cf->magic) == salt) return (cf->func(passwd, salt)); #ifdef HAS_DES - if (strlen(salt) == 13 && strspn(salt, DES_SALT_ALPHABET) == 13) + len = strlen(salt); + if ((len == 13 || len == 2) && strspn(salt, DES_SALT_ALPHABET) == len) return (crypt_des(passwd, salt)); #endif return (crypt_format->func(passwd, salt)); From owner-svn-src-stable@FreeBSD.ORG Thu Jun 5 23:56:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD1DAD1D; Thu, 5 Jun 2014 23:56:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B94182981; Thu, 5 Jun 2014 23:56:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s55Nu6Yl062972; Thu, 5 Jun 2014 23:56:06 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s55Nu6Iu062971; Thu, 5 Jun 2014 23:56:06 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406052356.s55Nu6Iu062971@svn.freebsd.org> From: Glen Barber Date: Thu, 5 Jun 2014 23:56:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267135 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2014 23:56:06 -0000 Author: gjb Date: Thu Jun 5 23:56:06 2014 New Revision: 267135 URL: http://svnweb.freebsd.org/changeset/base/267135 Log: Document r267113, newsyslog.conf(5) includes in conf.d. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 5 23:53:47 2014 (r267134) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 5 23:56:06 2014 (r267135) @@ -240,6 +240,12 @@ to filter by &man.jail.8; ID or name, in followup to the &man.ps.1; change in r265229. + The default &man.newsyslog.conf.5; now + includes files in the + /etc/newsyslog.conf.d/ and + /usr/local/etc/newsyslog.conf.d/ + directories by default for &man.newsyslog.8;. + <filename>/etc/rc.d</filename> Scripts From owner-svn-src-stable@FreeBSD.ORG Thu Jun 5 23:58:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 695DDED6; Thu, 5 Jun 2014 23:58:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 553EA29A0; Thu, 5 Jun 2014 23:58:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s55NwWaa063348; Thu, 5 Jun 2014 23:58:32 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s55NwW1F063347; Thu, 5 Jun 2014 23:58:32 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406052358.s55NwW1F063347@svn.freebsd.org> From: Glen Barber Date: Thu, 5 Jun 2014 23:58:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267136 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2014 23:58:32 -0000 Author: gjb Date: Thu Jun 5 23:58:31 2014 New Revision: 267136 URL: http://svnweb.freebsd.org/changeset/base/267136 Log: Document r267114, newsyslog.conf(5) includes in conf.d. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 5 23:56:06 2014 (r267135) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 5 23:58:31 2014 (r267136) @@ -616,6 +616,12 @@ format has been changed to $2b$. + The default &man.newsyslog.conf.5; now + includes files in the + /etc/newsyslog.conf.d/ and + /usr/local/etc/newsyslog.conf.d/ + directories by default for &man.newsyslog.8;. + &man.periodic.8; Scripts From owner-svn-src-stable@FreeBSD.ORG Fri Jun 6 00:12:22 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 387BC302; Fri, 6 Jun 2014 00:12:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A6FC2B13; Fri, 6 Jun 2014 00:12:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s560CLSW072756; Fri, 6 Jun 2014 00:12:21 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s560CLP7072754; Fri, 6 Jun 2014 00:12:21 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406060012.s560CLP7072754@svn.freebsd.org> From: Glen Barber Date: Fri, 6 Jun 2014 00:12:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267137 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jun 2014 00:12:22 -0000 Author: gjb Date: Fri Jun 6 00:12:21 2014 New Revision: 267137 URL: http://svnweb.freebsd.org/changeset/base/267137 Log: Document the following security advisories: - FreeBSD-SA-14:08.tcp - FreeBSD-SA-14:11.sendmail - FreeBSD-SA-14:12.ktrace - FreeBSD-SA-14:13.pam - FreeBSD-SA-14:14.openssl Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 5 23:58:31 2014 (r267136) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Jun 6 00:12:21 2014 (r267137) @@ -140,6 +140,45 @@ 8 April 2014 ECDSA side channel leak + + + FreeBSD-SA-14:08.tcp + 30 April 2014 + TCP reassembly vulnerability + + + + FreeBSD-SA-14:11.sendmail + 26 May 2014 + Sendmail + improper close-on-exec flag handling + + + + FreeBSD-SA-14:12.ktrace + 3 June 2014 + &man.ktrace.1; kernel memory + disclosure + + + + FreeBSD-SA-14:13.pam + 3 June 2014 + Incorrect error handling in PAM policy + parser + + + + FreeBSD-SA-14:14.openssl + 5 June 2014 + Incorrect error handling in PAM policy + parser + From owner-svn-src-stable@FreeBSD.ORG Fri Jun 6 00:13:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 86E7E44C; Fri, 6 Jun 2014 00:13:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58CE42B1F; Fri, 6 Jun 2014 00:13:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s560DdeA073022; Fri, 6 Jun 2014 00:13:39 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s560DdSq073021; Fri, 6 Jun 2014 00:13:39 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201406060013.s560DdSq073021@svn.freebsd.org> From: Xin LI Date: Fri, 6 Jun 2014 00:13:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267138 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jun 2014 00:13:39 -0000 Author: delphij Date: Fri Jun 6 00:13:38 2014 New Revision: 267138 URL: http://svnweb.freebsd.org/changeset/base/267138 Log: MFC r266915: MFV 266913+266914: 3897 zfs filesystem and snapshot limits (fix leak) 4901 zfs filesystem/snapshot limit leaks Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Fri Jun 6 00:12:21 2014 (r267137) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Fri Jun 6 00:13:38 2014 (r267138) @@ -489,7 +489,7 @@ dsl_dir_init_fs_ss_count(dsl_dir_t *dd, zap_attribute_t *za; dsl_dataset_t *ds; - ASSERT(spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_FS_SS_LIMIT)); + ASSERT(spa_feature_is_active(dp->dp_spa, SPA_FEATURE_FS_SS_LIMIT)); ASSERT(dsl_pool_config_held(dp)); ASSERT(dmu_tx_is_syncing(tx)); @@ -549,6 +549,7 @@ dsl_dir_init_fs_ss_count(dsl_dir_t *dd, if (za->za_name[0] != '%') my_ss_cnt++; } + zap_cursor_fini(zc); dsl_dataset_rele(ds, FTAG); @@ -1717,7 +1718,7 @@ dsl_dir_rename_check(void *arg, dmu_tx_t } if (dmu_tx_is_syncing(tx)) { - if (spa_feature_is_enabled(dp->dp_spa, + if (spa_feature_is_active(dp->dp_spa, SPA_FEATURE_FS_SS_LIMIT)) { /* * Although this is the check function and we don't @@ -1745,8 +1746,11 @@ dsl_dir_rename_check(void *arg, dmu_tx_t err = zap_lookup(os, dd->dd_object, DD_FIELD_FILESYSTEM_COUNT, sizeof (fs_cnt), 1, &fs_cnt); - if (err != ENOENT && err != 0) + if (err != ENOENT && err != 0) { + dsl_dir_rele(newparent, FTAG); + dsl_dir_rele(dd, FTAG); return (err); + } /* * have to add 1 for the filesystem itself that we're @@ -1757,8 +1761,11 @@ dsl_dir_rename_check(void *arg, dmu_tx_t err = zap_lookup(os, dd->dd_object, DD_FIELD_SNAPSHOT_COUNT, sizeof (ss_cnt), 1, &ss_cnt); - if (err != ENOENT && err != 0) + if (err != ENOENT && err != 0) { + dsl_dir_rele(newparent, FTAG); + dsl_dir_rele(dd, FTAG); return (err); + } } /* no rename into our descendant */ @@ -1809,7 +1816,7 @@ dsl_dir_rename_sync(void *arg, dmu_tx_t * We already made sure the dd counts were initialized in the * check function. */ - if (spa_feature_is_enabled(dp->dp_spa, + if (spa_feature_is_active(dp->dp_spa, SPA_FEATURE_FS_SS_LIMIT)) { VERIFY0(zap_lookup(os, dd->dd_object, DD_FIELD_FILESYSTEM_COUNT, sizeof (fs_cnt), 1, From owner-svn-src-stable@FreeBSD.ORG Fri Jun 6 00:15:55 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8518A5CB; Fri, 6 Jun 2014 00:15:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5750A2B37; Fri, 6 Jun 2014 00:15:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s560FtjD073425; Fri, 6 Jun 2014 00:15:55 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s560FtBG073424; Fri, 6 Jun 2014 00:15:55 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201406060015.s560FtBG073424@svn.freebsd.org> From: Xin LI Date: Fri, 6 Jun 2014 00:15:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267139 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jun 2014 00:15:55 -0000 Author: delphij Date: Fri Jun 6 00:15:54 2014 New Revision: 267139 URL: http://svnweb.freebsd.org/changeset/base/267139 Log: MFC r266915: MFV 266913+266914: 3897 zfs filesystem and snapshot limits (fix leak) 4901 zfs filesystem/snapshot limit leaks Approved by: re (gjb) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Fri Jun 6 00:13:38 2014 (r267138) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Fri Jun 6 00:15:54 2014 (r267139) @@ -489,7 +489,7 @@ dsl_dir_init_fs_ss_count(dsl_dir_t *dd, zap_attribute_t *za; dsl_dataset_t *ds; - ASSERT(spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_FS_SS_LIMIT)); + ASSERT(spa_feature_is_active(dp->dp_spa, SPA_FEATURE_FS_SS_LIMIT)); ASSERT(dsl_pool_config_held(dp)); ASSERT(dmu_tx_is_syncing(tx)); @@ -549,6 +549,7 @@ dsl_dir_init_fs_ss_count(dsl_dir_t *dd, if (za->za_name[0] != '%') my_ss_cnt++; } + zap_cursor_fini(zc); dsl_dataset_rele(ds, FTAG); @@ -1717,7 +1718,7 @@ dsl_dir_rename_check(void *arg, dmu_tx_t } if (dmu_tx_is_syncing(tx)) { - if (spa_feature_is_enabled(dp->dp_spa, + if (spa_feature_is_active(dp->dp_spa, SPA_FEATURE_FS_SS_LIMIT)) { /* * Although this is the check function and we don't @@ -1745,8 +1746,11 @@ dsl_dir_rename_check(void *arg, dmu_tx_t err = zap_lookup(os, dd->dd_object, DD_FIELD_FILESYSTEM_COUNT, sizeof (fs_cnt), 1, &fs_cnt); - if (err != ENOENT && err != 0) + if (err != ENOENT && err != 0) { + dsl_dir_rele(newparent, FTAG); + dsl_dir_rele(dd, FTAG); return (err); + } /* * have to add 1 for the filesystem itself that we're @@ -1757,8 +1761,11 @@ dsl_dir_rename_check(void *arg, dmu_tx_t err = zap_lookup(os, dd->dd_object, DD_FIELD_SNAPSHOT_COUNT, sizeof (ss_cnt), 1, &ss_cnt); - if (err != ENOENT && err != 0) + if (err != ENOENT && err != 0) { + dsl_dir_rele(newparent, FTAG); + dsl_dir_rele(dd, FTAG); return (err); + } } /* no rename into our descendant */ @@ -1809,7 +1816,7 @@ dsl_dir_rename_sync(void *arg, dmu_tx_t * We already made sure the dd counts were initialized in the * check function. */ - if (spa_feature_is_enabled(dp->dp_spa, + if (spa_feature_is_active(dp->dp_spa, SPA_FEATURE_FS_SS_LIMIT)) { VERIFY0(zap_lookup(os, dd->dd_object, DD_FIELD_FILESYSTEM_COUNT, sizeof (fs_cnt), 1, From owner-svn-src-stable@FreeBSD.ORG Fri Jun 6 00:20:55 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 72857878; Fri, 6 Jun 2014 00:20:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5FAD62BD3; Fri, 6 Jun 2014 00:20:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s560Ktln076826; Fri, 6 Jun 2014 00:20:55 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s560KtDY076825; Fri, 6 Jun 2014 00:20:55 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406060020.s560KtDY076825@svn.freebsd.org> From: Glen Barber Date: Fri, 6 Jun 2014 00:20:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267140 - stable/9/sys/conf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jun 2014 00:20:55 -0000 Author: gjb Date: Fri Jun 6 00:20:54 2014 New Revision: 267140 URL: http://svnweb.freebsd.org/changeset/base/267140 Log: Update stable/9 to -BETA2 as part of the 9.3-RELEASE cycle. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/sys/conf/newvers.sh Modified: stable/9/sys/conf/newvers.sh ============================================================================== --- stable/9/sys/conf/newvers.sh Fri Jun 6 00:15:54 2014 (r267139) +++ stable/9/sys/conf/newvers.sh Fri Jun 6 00:20:54 2014 (r267140) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="9.3" -BRANCH="BETA1" +BRANCH="BETA2" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-stable@FreeBSD.ORG Fri Jun 6 01:35:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A9B0DF; Fri, 6 Jun 2014 01:35:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 770DC21E0; Fri, 6 Jun 2014 01:35:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s561ZrNL009784; Fri, 6 Jun 2014 01:35:53 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s561Zr2q009783; Fri, 6 Jun 2014 01:35:53 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201406060135.s561Zr2q009783@svn.freebsd.org> From: Ed Maste Date: Fri, 6 Jun 2014 01:35:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267143 - stable/10/usr.sbin/pmcstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jun 2014 01:35:53 -0000 Author: emaste Date: Fri Jun 6 01:35:52 2014 New Revision: 267143 URL: http://svnweb.freebsd.org/changeset/base/267143 Log: MFC r266903: Update default callchain depth to 16 to match kernel Modified: stable/10/usr.sbin/pmcstat/pmcstat.h Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pmcstat/pmcstat.h ============================================================================== --- stable/10/usr.sbin/pmcstat/pmcstat.h Fri Jun 6 00:24:04 2014 (r267142) +++ stable/10/usr.sbin/pmcstat/pmcstat.h Fri Jun 6 01:35:52 2014 (r267143) @@ -61,7 +61,7 @@ #define DEFAULT_DISPLAY_HEIGHT 256 /* file virtual height */ #define DEFAULT_DISPLAY_WIDTH 1024 /* file virtual width */ #define DEFAULT_BUFFER_SIZE 4096 -#define DEFAULT_CALLGRAPH_DEPTH 4 +#define DEFAULT_CALLGRAPH_DEPTH 16 #define PRINT_HEADER_PREFIX "# " #define READPIPEFD 0 From owner-svn-src-stable@FreeBSD.ORG Fri Jun 6 12:37:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1430BB0E; Fri, 6 Jun 2014 12:37:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0032D2B72; Fri, 6 Jun 2014 12:37:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s56Cbu2h012132; Fri, 6 Jun 2014 12:37:56 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s56CbuAr012129; Fri, 6 Jun 2014 12:37:56 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201406061237.s56CbuAr012129@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Fri, 6 Jun 2014 12:37:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267156 - stable/10/sys/geom/part X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jun 2014 12:37:57 -0000 Author: ae Date: Fri Jun 6 12:37:56 2014 New Revision: 267156 URL: http://svnweb.freebsd.org/changeset/base/267156 Log: MFC r266880: Use g_conf_printf_escaped() to escape symbols, which can break an XML tree. Modified: stable/10/sys/geom/part/g_part_apm.c stable/10/sys/geom/part/g_part_gpt.c stable/10/sys/geom/part/g_part_pc98.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/part/g_part_apm.c ============================================================================== --- stable/10/sys/geom/part/g_part_apm.c Fri Jun 6 12:06:40 2014 (r267155) +++ stable/10/sys/geom/part/g_part_apm.c Fri Jun 6 12:37:56 2014 (r267156) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "g_part_if.h" @@ -310,10 +311,14 @@ g_part_apm_dumpconf(struct g_part_table /* confxml: partition entry information */ strncpy(u.name, entry->ent.ent_name, APM_ENT_NAMELEN); u.name[APM_ENT_NAMELEN] = '\0'; - sbuf_printf(sb, "%s\n", indent, u.name); + sbuf_printf(sb, "%s\n"); strncpy(u.type, entry->ent.ent_type, APM_ENT_TYPELEN); u.type[APM_ENT_TYPELEN] = '\0'; - sbuf_printf(sb, "%s%s\n", indent, u.type); + sbuf_printf(sb, "%s", indent); + g_conf_printf_escaped(sb, "%s", u.type); + sbuf_printf(sb, "\n"); } else { /* confxml: scheme information */ } Modified: stable/10/sys/geom/part/g_part_gpt.c ============================================================================== --- stable/10/sys/geom/part/g_part_gpt.c Fri Jun 6 12:06:40 2014 (r267155) +++ stable/10/sys/geom/part/g_part_gpt.c Fri Jun 6 12:37:56 2014 (r267156) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "g_part_if.h" @@ -1230,16 +1231,16 @@ g_gpt_printf_utf16(struct sbuf *sb, uint /* Write the Unicode character in UTF-8 */ if (ch < 0x80) - sbuf_printf(sb, "%c", ch); + g_conf_printf_escaped(sb, "%c", ch); else if (ch < 0x800) - sbuf_printf(sb, "%c%c", 0xc0 | (ch >> 6), + g_conf_printf_escaped(sb, "%c%c", 0xc0 | (ch >> 6), 0x80 | (ch & 0x3f)); else if (ch < 0x10000) - sbuf_printf(sb, "%c%c%c", 0xe0 | (ch >> 12), + g_conf_printf_escaped(sb, "%c%c%c", 0xe0 | (ch >> 12), 0x80 | ((ch >> 6) & 0x3f), 0x80 | (ch & 0x3f)); else if (ch < 0x200000) - sbuf_printf(sb, "%c%c%c%c", 0xf0 | (ch >> 18), - 0x80 | ((ch >> 12) & 0x3f), + g_conf_printf_escaped(sb, "%c%c%c%c", 0xf0 | + (ch >> 18), 0x80 | ((ch >> 12) & 0x3f), 0x80 | ((ch >> 6) & 0x3f), 0x80 | (ch & 0x3f)); } } Modified: stable/10/sys/geom/part/g_part_pc98.c ============================================================================== --- stable/10/sys/geom/part/g_part_pc98.c Fri Jun 6 12:06:40 2014 (r267155) +++ stable/10/sys/geom/part/g_part_pc98.c Fri Jun 6 12:37:56 2014 (r267156) @@ -300,7 +300,9 @@ g_part_pc98_dumpconf(struct g_part_table sbuf_printf(sb, " xs PC98 xt %u sn %s", type, name); } else { /* confxml: partition entry information */ - sbuf_printf(sb, "%s\n", indent, name); + sbuf_printf(sb, "%s\n"); if (entry->ent.dp_mid & PC98_MID_BOOTABLE) sbuf_printf(sb, "%sbootable\n", indent); From owner-svn-src-stable@FreeBSD.ORG Fri Jun 6 12:45:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A534CDF3; Fri, 6 Jun 2014 12:45:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9161D2C2F; Fri, 6 Jun 2014 12:45:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s56CjCxX016184; Fri, 6 Jun 2014 12:45:12 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s56CjCDD016181; Fri, 6 Jun 2014 12:45:12 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201406061245.s56CjCDD016181@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Fri, 6 Jun 2014 12:45:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267157 - stable/9/sys/geom/part X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jun 2014 12:45:12 -0000 Author: ae Date: Fri Jun 6 12:45:11 2014 New Revision: 267157 URL: http://svnweb.freebsd.org/changeset/base/267157 Log: MFC r266880: Use g_conf_printf_escaped() to escape symbols, which can break an XML tree. Approved by: re (gjb) Modified: stable/9/sys/geom/part/g_part_apm.c stable/9/sys/geom/part/g_part_gpt.c stable/9/sys/geom/part/g_part_pc98.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/part/g_part_apm.c ============================================================================== --- stable/9/sys/geom/part/g_part_apm.c Fri Jun 6 12:37:56 2014 (r267156) +++ stable/9/sys/geom/part/g_part_apm.c Fri Jun 6 12:45:11 2014 (r267157) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "g_part_if.h" @@ -311,10 +312,14 @@ g_part_apm_dumpconf(struct g_part_table /* confxml: partition entry information */ strncpy(u.name, entry->ent.ent_name, APM_ENT_NAMELEN); u.name[APM_ENT_NAMELEN] = '\0'; - sbuf_printf(sb, "%s\n", indent, u.name); + sbuf_printf(sb, "%s\n"); strncpy(u.type, entry->ent.ent_type, APM_ENT_TYPELEN); u.type[APM_ENT_TYPELEN] = '\0'; - sbuf_printf(sb, "%s%s\n", indent, u.type); + sbuf_printf(sb, "%s", indent); + g_conf_printf_escaped(sb, "%s", u.type); + sbuf_printf(sb, "\n"); } else { /* confxml: scheme information */ } Modified: stable/9/sys/geom/part/g_part_gpt.c ============================================================================== --- stable/9/sys/geom/part/g_part_gpt.c Fri Jun 6 12:37:56 2014 (r267156) +++ stable/9/sys/geom/part/g_part_gpt.c Fri Jun 6 12:45:11 2014 (r267157) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "g_part_if.h" @@ -1217,16 +1218,16 @@ g_gpt_printf_utf16(struct sbuf *sb, uint /* Write the Unicode character in UTF-8 */ if (ch < 0x80) - sbuf_printf(sb, "%c", ch); + g_conf_printf_escaped(sb, "%c", ch); else if (ch < 0x800) - sbuf_printf(sb, "%c%c", 0xc0 | (ch >> 6), + g_conf_printf_escaped(sb, "%c%c", 0xc0 | (ch >> 6), 0x80 | (ch & 0x3f)); else if (ch < 0x10000) - sbuf_printf(sb, "%c%c%c", 0xe0 | (ch >> 12), + g_conf_printf_escaped(sb, "%c%c%c", 0xe0 | (ch >> 12), 0x80 | ((ch >> 6) & 0x3f), 0x80 | (ch & 0x3f)); else if (ch < 0x200000) - sbuf_printf(sb, "%c%c%c%c", 0xf0 | (ch >> 18), - 0x80 | ((ch >> 12) & 0x3f), + g_conf_printf_escaped(sb, "%c%c%c%c", 0xf0 | + (ch >> 18), 0x80 | ((ch >> 12) & 0x3f), 0x80 | ((ch >> 6) & 0x3f), 0x80 | (ch & 0x3f)); } } Modified: stable/9/sys/geom/part/g_part_pc98.c ============================================================================== --- stable/9/sys/geom/part/g_part_pc98.c Fri Jun 6 12:37:56 2014 (r267156) +++ stable/9/sys/geom/part/g_part_pc98.c Fri Jun 6 12:45:11 2014 (r267157) @@ -300,7 +300,9 @@ g_part_pc98_dumpconf(struct g_part_table sbuf_printf(sb, " xs PC98 xt %u sn %s", type, name); } else { /* confxml: partition entry information */ - sbuf_printf(sb, "%s\n", indent, name); + sbuf_printf(sb, "%s\n"); if (entry->ent.dp_mid & PC98_MID_BOOTABLE) sbuf_printf(sb, "%sbootable\n", indent); From owner-svn-src-stable@FreeBSD.ORG Fri Jun 6 12:52:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 614742BE; Fri, 6 Jun 2014 12:52:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12AF82D13; Fri, 6 Jun 2014 12:52:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s56CqiLV020291; Fri, 6 Jun 2014 12:52:44 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s56Cqi6W020290; Fri, 6 Jun 2014 12:52:44 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406061252.s56Cqi6W020290@svn.freebsd.org> From: Glen Barber Date: Fri, 6 Jun 2014 12:52:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267158 - stable/9/share/man/man7 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jun 2014 12:52:45 -0000 Author: gjb Date: Fri Jun 6 12:52:44 2014 New Revision: 267158 URL: http://svnweb.freebsd.org/changeset/base/267158 Log: MFC r247791 (eadler): Modernize portions of the ports(7) manual page to reflect pkg(8). Approved by: re (kib) Sponsored by: The FreeBSD Foundation Modified: stable/9/share/man/man7/ports.7 Directory Properties: stable/9/share/man/man7/ (props changed) Modified: stable/9/share/man/man7/ports.7 ============================================================================== --- stable/9/share/man/man7/ports.7 Fri Jun 6 12:45:11 2014 (r267157) +++ stable/9/share/man/man7/ports.7 Fri Jun 6 12:52:44 2014 (r267158) @@ -490,27 +490,17 @@ single file .Bl -tag -width ".Pa /usr/ports/Mk/bsd.port.mk" -compact .It Pa /usr/ports The default ports directory -.No ( Fx -and -.Ox ) . -.It Pa /usr/pkgsrc -The default ports directory -.Pq Nx . .It Pa /usr/ports/Mk/bsd.port.mk The big Kahuna. .El .Sh SEE ALSO .Xr make 1 , -.Xr pkg_add 1 , -.Xr pkg_create 1 , -.Xr pkg_delete 1 , -.Xr pkg_info 1 , -.Xr pkg_version 1 +.Xr pkg 8 , +.Xr portsnap 8 .Pp The following are part of the ports collection: .Pp .Xr portaudit 1 , -.Xr portcheckout 1 , .Xr portlint 1 .Rs .%B "The FreeBSD Handbook" From owner-svn-src-stable@FreeBSD.ORG Fri Jun 6 13:37:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD920D0; Fri, 6 Jun 2014 13:37:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B018921B4; Fri, 6 Jun 2014 13:37:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s56DbeGM040948; Fri, 6 Jun 2014 13:37:40 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s56Dbet4040947; Fri, 6 Jun 2014 13:37:40 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201406061337.s56Dbet4040947@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 6 Jun 2014 13:37:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267161 - stable/10/lib/libc/stdlib X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jun 2014 13:37:41 -0000 Author: jilles Date: Fri Jun 6 13:37:40 2014 New Revision: 267161 URL: http://svnweb.freebsd.org/changeset/base/267161 Log: MFC r264417: realpath(): Properly fail "." or ".." components after non-directories. If realpath() is called on pathnames like "/dev/null/." or "/dev/null/..", it should fail with [ENOTDIR]. Pathnames like "/dev/null/" already failed as they should. Also, put the check for non-directories after lstatting the previous component instead of when the empty component (consecutive or trailing slashes) is detected, saving an lstat() call and some lines of code. PR: 82980 Modified: stable/10/lib/libc/stdlib/realpath.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdlib/realpath.c ============================================================================== --- stable/10/lib/libc/stdlib/realpath.c Fri Jun 6 13:36:52 2014 (r267160) +++ stable/10/lib/libc/stdlib/realpath.c Fri Jun 6 13:37:40 2014 (r267161) @@ -132,26 +132,7 @@ realpath(const char * __restrict path, c resolved[resolved_len] = '\0'; } if (next_token[0] == '\0') { - /* - * Handle consequential slashes. The path - * before slash shall point to a directory. - * - * Only the trailing slashes are not covered - * by other checks in the loop, but we verify - * the prefix for any (rare) "//" or "/\0" - * occurrence to not implement lookahead. - */ - if (lstat(resolved, &sb) != 0) { - if (m) - free(resolved); - return (NULL); - } - if (!S_ISDIR(sb.st_mode)) { - if (m) - free(resolved); - errno = ENOTDIR; - return (NULL); - } + /* Handle consequential slashes. */ continue; } else if (strcmp(next_token, ".") == 0) @@ -236,6 +217,11 @@ realpath(const char * __restrict path, c } } left_len = strlcpy(left, symlink, sizeof(left)); + } else if (!S_ISDIR(sb.st_mode) && p != NULL) { + if (m) + free(resolved); + errno = ENOTDIR; + return (NULL); } } From owner-svn-src-stable@FreeBSD.ORG Fri Jun 6 17:42:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B6D33A2; Fri, 6 Jun 2014 17:42:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CDF42BED; Fri, 6 Jun 2014 17:42:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s56HgurI056439; Fri, 6 Jun 2014 17:42:56 GMT (envelope-from asomers@svn.freebsd.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s56HgtxI056436; Fri, 6 Jun 2014 17:42:55 GMT (envelope-from asomers@svn.freebsd.org) Message-Id: <201406061742.s56HgtxI056436@svn.freebsd.org> From: Alan Somers Date: Fri, 6 Jun 2014 17:42:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267175 - in stable/10: sys/netinet tests/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jun 2014 17:42:56 -0000 Author: asomers Date: Fri Jun 6 17:42:55 2014 New Revision: 267175 URL: http://svnweb.freebsd.org/changeset/base/267175 Log: MFC r263779 Correct ARP update handling when the routes for network interfaces are restricted to a single FIB in a multifib system. Restricting an interface's routes to the FIB to which it is assigned (by setting net.add_addr_allfibs=0) causes ARP updates to fail with "arpresolve: can't allocate llinfo for x.x.x.x". This is due to the ARP update code hard coding it's lookup for existing routing entries to FIB 0. sys/netinet/in.c: When dealing with RTM_ADD (add route) requests for an interface, use the interface's assigned FIB instead of the default (FIB 0). sys/netinet/if_ether.c: In arpresolve(), enhance error message generated when an lla_lookup() fails so that the interface causing the error is visible in logs. tests/sys/netinet/fibs_test.sh Clear ATF expected error. Modified: stable/10/sys/netinet/if_ether.c stable/10/sys/netinet/in.c stable/10/tests/sys/netinet/fibs_test.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/if_ether.c ============================================================================== --- stable/10/sys/netinet/if_ether.c Fri Jun 6 17:38:37 2014 (r267174) +++ stable/10/sys/netinet/if_ether.c Fri Jun 6 17:42:55 2014 (r267175) @@ -338,8 +338,8 @@ retry: if (la == NULL) { if (flags & LLE_CREATE) log(LOG_DEBUG, - "arpresolve: can't allocate llinfo for %s\n", - inet_ntoa(SIN(dst)->sin_addr)); + "arpresolve: can't allocate llinfo for %s on %s\n", + inet_ntoa(SIN(dst)->sin_addr), ifp->if_xname); m_freem(m); return (EINVAL); } Modified: stable/10/sys/netinet/in.c ============================================================================== --- stable/10/sys/netinet/in.c Fri Jun 6 17:38:37 2014 (r267174) +++ stable/10/sys/netinet/in.c Fri Jun 6 17:42:55 2014 (r267175) @@ -1303,8 +1303,9 @@ in_lltable_rtcheck(struct ifnet *ifp, u_ KASSERT(l3addr->sa_family == AF_INET, ("sin_family %d", l3addr->sa_family)); - /* XXX rtalloc1 should take a const param */ - rt = rtalloc1(__DECONST(struct sockaddr *, l3addr), 0, 0); + /* XXX rtalloc1_fib should take a const param */ + rt = rtalloc1_fib(__DECONST(struct sockaddr *, l3addr), 0, 0, + ifp->if_fib); if (rt == NULL) return (EINVAL); Modified: stable/10/tests/sys/netinet/fibs_test.sh ============================================================================== --- stable/10/tests/sys/netinet/fibs_test.sh Fri Jun 6 17:38:37 2014 (r267174) +++ stable/10/tests/sys/netinet/fibs_test.sh Fri Jun 6 17:42:55 2014 (r267175) @@ -55,7 +55,6 @@ arpresolve_checks_interface_fib_head() } arpresolve_checks_interface_fib_body() { - atf_expect_fail "kern/167947 arpresolve checks only the default FIB for the interface route" # Configure the TAP interfaces to use a RFC5737 nonrouteable addresses # and a non-default fib ADDR0="192.0.2.2" From owner-svn-src-stable@FreeBSD.ORG Fri Jun 6 20:35:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 163B9FC7; Fri, 6 Jun 2014 20:35:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00CA12BF3; Fri, 6 Jun 2014 20:35:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s56KZfiL037568; Fri, 6 Jun 2014 20:35:41 GMT (envelope-from asomers@svn.freebsd.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s56KZeDJ037562; Fri, 6 Jun 2014 20:35:40 GMT (envelope-from asomers@svn.freebsd.org) Message-Id: <201406062035.s56KZeDJ037562@svn.freebsd.org> From: Alan Somers Date: Fri, 6 Jun 2014 20:35:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267186 - in stable/10: sys/net sys/netinet tests/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jun 2014 20:35:42 -0000 Author: asomers Date: Fri Jun 6 20:35:40 2014 New Revision: 267186 URL: http://svnweb.freebsd.org/changeset/base/267186 Log: MFC changes relating to running multiple interfaces on different fibs but with addresses on the same subnet. MFC r266860 Fix unintended KBI change from r264905. Add _fib versions of ifa_ifwithnet() and ifa_ifwithdstaddr() The legacy functions will call the _fib() versions with RT_ALL_FIBS, preserving legacy behavior. sys/net/if_var.h sys/net/if.c Add legacy-compatible functions as described above. Ensure legacy behavior when RT_ALL_FIBS is passed as fibnum. sys/netinet/in_pcb.c sys/netinet/ip_output.c sys/netinet/ip_options.c sys/net/route.c sys/net/rtsock.c sys/netinet6/nd6.c Call with _fib() functions if we must use a specific fib, or the legacy functions otherwise. tests/sys/netinet/fibs_test.sh tests/sys/netinet/udp_dontroute.c Improve the udp_dontroute test. The bug that this test exercises is that ifa_ifwithnet() will return the wrong address, if multiple interfaces have addresses on the same subnet but with different fibs. The previous version of the test only considered one possible failure mode: that ifa_ifwithnet_fib() might fail to find any suitable address at all. The new version also checks whether ifa_ifwithnet_fib() finds the correct address by checking where the ARP request goes. MFC r264917 Style fixes, mostly trailing whitespace elimination. No functional change. MFC r264905 Fix subnet and default routes on different FIBs on the same subnet. These two bugs are closely related. The root cause is that ifa_ifwithnet does not consider FIBs when searching for an interface address. sys/net/if_var.h sys/net/if.c Add a fib argument to ifa_ifwithnet and ifa_ifwithdstadddr. Those functions will only return an address whose interface fib equals the argument. sys/net/route.c Update calls to ifa_ifwithnet and ifa_ifwithdstaddr with fib arguments. sys/netinet/in.c Update in_addprefix to consider the interface fib when adding prefixes. This will prevent it from not adding a subnet route when one already exists on a different fib. sys/net/rtsock.c sys/netinet/in_pcb.c sys/netinet/ip_output.c sys/netinet/ip_options.c sys/netinet6/nd6.c Add RT_DEFAULT_FIB arguments to ifa_ifwithdstaddr and ifa_ifwithnet. In some cases it there wasn't a clear specific fib number to use. In others, I was unable to test those functions so I chose RT_DEFAULT_FIB to minimize divergence from current behavior. I will fix some of the latter changes along with PR kern/187553. tests/sys/netinet/fibs_test.sh tests/sys/netinet/udp_dontroute.c tests/sys/netinet/Makefile Revert r263738. The udp_dontroute test was right all along. However, bugs kern/187550 and kern/187553 cancelled each other out when it came to this test. Because of kern/187553, ifa_ifwithnet searched the default fib instead of the requested one, but because of kern/187550, there was an applicable subnet route on the default fib. The new test added in r263738 doesn't work right, however. I can verify with dtrace that ifa_ifwithnet returned the wrong address before I applied this commit, but route(8) miraculously found the correct interface to use anyway. I don't know how. Clear expected failure messages for kern/187550 and kern/187552. MFC r263738 tests/sys/netinet/Makefile tests/sys/netinet/fibs.sh Replace fibs:udp_dontroute with fibs:src_addr_selection_by_subnet. The original test was poorly written; it was actually testing kern/167947 instead of the desired kern/187553. The root cause of the bug is that ifa_ifwithnet did not have a fib argument. The new test more directly targets that behavior. tests/sys/netinet/udp_dontroute.c Delete the auxilliary binary used by the old test Modified: stable/10/sys/net/if.c stable/10/sys/net/if_var.h stable/10/sys/net/route.c stable/10/sys/netinet/in.c stable/10/tests/sys/netinet/fibs_test.sh stable/10/tests/sys/netinet/udp_dontroute.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/if.c ============================================================================== --- stable/10/sys/net/if.c Fri Jun 6 20:01:45 2014 (r267185) +++ stable/10/sys/net/if.c Fri Jun 6 20:35:40 2014 (r267186) @@ -1607,7 +1607,7 @@ done: */ /*ARGSUSED*/ struct ifaddr * -ifa_ifwithdstaddr(struct sockaddr *addr) +ifa_ifwithdstaddr_fib(struct sockaddr *addr, int fibnum) { struct ifnet *ifp; struct ifaddr *ifa; @@ -1616,6 +1616,8 @@ ifa_ifwithdstaddr(struct sockaddr *addr) TAILQ_FOREACH(ifp, &V_ifnet, if_link) { if ((ifp->if_flags & IFF_POINTOPOINT) == 0) continue; + if ((fibnum != RT_ALL_FIBS) && (ifp->if_fib != fibnum)) + continue; IF_ADDR_RLOCK(ifp); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { if (ifa->ifa_addr->sa_family != addr->sa_family) @@ -1635,12 +1637,19 @@ done: return (ifa); } +struct ifaddr * +ifa_ifwithdstaddr(struct sockaddr *addr) +{ + + return (ifa_ifwithdstaddr_fib(addr, RT_ALL_FIBS)); +} + /* * Find an interface on a specific network. If many, choice * is most specific found. */ struct ifaddr * -ifa_ifwithnet(struct sockaddr *addr, int ignore_ptp) +ifa_ifwithnet_fib(struct sockaddr *addr, int ignore_ptp, int fibnum) { struct ifnet *ifp; struct ifaddr *ifa; @@ -1660,12 +1669,14 @@ ifa_ifwithnet(struct sockaddr *addr, int /* * Scan though each interface, looking for ones that have addresses - * in this address family. Maintain a reference on ifa_maybe once - * we find one, as we release the IF_ADDR_RLOCK() that kept it stable - * when we move onto the next interface. + * in this address family and the requested fib. Maintain a reference + * on ifa_maybe once we find one, as we release the IF_ADDR_RLOCK() that + * kept it stable when we move onto the next interface. */ IFNET_RLOCK_NOSLEEP(); TAILQ_FOREACH(ifp, &V_ifnet, if_link) { + if ((fibnum != RT_ALL_FIBS) && (ifp->if_fib != fibnum)) + continue; IF_ADDR_RLOCK(ifp); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { char *cp, *cp2, *cp3; @@ -1749,6 +1760,13 @@ done: return (ifa); } +struct ifaddr * +ifa_ifwithnet(struct sockaddr *addr, int ignore_ptp) +{ + + return (ifa_ifwithnet_fib(addr, ignore_ptp, RT_ALL_FIBS)); +} + /* * Find an interface address specific to an interface best matching * a given address. Modified: stable/10/sys/net/if_var.h ============================================================================== --- stable/10/sys/net/if_var.h Fri Jun 6 20:01:45 2014 (r267185) +++ stable/10/sys/net/if_var.h Fri Jun 6 20:35:40 2014 (r267186) @@ -941,7 +941,9 @@ struct ifaddr *ifa_ifwithaddr(struct soc int ifa_ifwithaddr_check(struct sockaddr *); struct ifaddr *ifa_ifwithbroadaddr(struct sockaddr *); struct ifaddr *ifa_ifwithdstaddr(struct sockaddr *); +struct ifaddr *ifa_ifwithdstaddr_fib(struct sockaddr *, int); struct ifaddr *ifa_ifwithnet(struct sockaddr *, int); +struct ifaddr *ifa_ifwithnet_fib(struct sockaddr *, int, int); struct ifaddr *ifa_ifwithroute(int, struct sockaddr *, struct sockaddr *); struct ifaddr *ifa_ifwithroute_fib(int, struct sockaddr *, struct sockaddr *, u_int); struct ifaddr *ifaof_ifpforaddr(struct sockaddr *, struct ifnet *); Modified: stable/10/sys/net/route.c ============================================================================== --- stable/10/sys/net/route.c Fri Jun 6 20:01:45 2014 (r267185) +++ stable/10/sys/net/route.c Fri Jun 6 20:35:40 2014 (r267186) @@ -589,7 +589,7 @@ rtredirect_fib(struct sockaddr *dst, } /* verify the gateway is directly reachable */ - if ((ifa = ifa_ifwithnet(gateway, 0)) == NULL) { + if ((ifa = ifa_ifwithnet_fib(gateway, 0, fibnum)) == NULL) { error = ENETUNREACH; goto out; } @@ -746,7 +746,7 @@ ifa_ifwithroute_fib(int flags, struct so */ ifa = NULL; if (flags & RTF_HOST) - ifa = ifa_ifwithdstaddr(dst); + ifa = ifa_ifwithdstaddr_fib(dst, fibnum); if (ifa == NULL) ifa = ifa_ifwithaddr(gateway); } else { @@ -755,10 +755,10 @@ ifa_ifwithroute_fib(int flags, struct so * or host, the gateway may still be on the * other end of a pt to pt link. */ - ifa = ifa_ifwithdstaddr(gateway); + ifa = ifa_ifwithdstaddr_fib(gateway, fibnum); } if (ifa == NULL) - ifa = ifa_ifwithnet(gateway, 0); + ifa = ifa_ifwithnet_fib(gateway, 0, fibnum); if (ifa == NULL) { struct rtentry *rt = rtalloc1_fib(gateway, 0, RTF_RNH_LOCKED, fibnum); if (rt == NULL) @@ -872,7 +872,7 @@ rt_getifa_fib(struct rt_addrinfo *info, */ if (info->rti_ifp == NULL && ifpaddr != NULL && ifpaddr->sa_family == AF_LINK && - (ifa = ifa_ifwithnet(ifpaddr, 0)) != NULL) { + (ifa = ifa_ifwithnet_fib(ifpaddr, 0, fibnum)) != NULL) { info->rti_ifp = ifa->ifa_ifp; ifa_free(ifa); } Modified: stable/10/sys/netinet/in.c ============================================================================== --- stable/10/sys/netinet/in.c Fri Jun 6 20:01:45 2014 (r267185) +++ stable/10/sys/netinet/in.c Fri Jun 6 20:35:40 2014 (r267186) @@ -908,7 +908,7 @@ in_addprefix(struct in_ifaddr *target, i { struct in_ifaddr *ia; struct in_addr prefix, mask, p, m; - int error, fibnum; + int error; if ((flags & RTF_HOST) != 0) { prefix = target->ia_dstaddr.sin_addr; @@ -919,9 +919,8 @@ in_addprefix(struct in_ifaddr *target, i prefix.s_addr &= mask.s_addr; } - fibnum = rt_add_addr_allfibs ? RT_ALL_FIBS : target->ia_ifp->if_fib; - IN_IFADDR_RLOCK(); + /* Look for an existing address with the same prefix, mask, and fib */ TAILQ_FOREACH(ia, &V_in_ifaddrhead, ia_link) { if (rtinitflags(ia)) { p = ia->ia_dstaddr.sin_addr; @@ -937,6 +936,8 @@ in_addprefix(struct in_ifaddr *target, i mask.s_addr != m.s_addr) continue; } + if (target->ia_ifp->if_fib != ia->ia_ifp->if_fib) + continue; /* * If we got a matching prefix route inserted by other @@ -955,6 +956,10 @@ in_addprefix(struct in_ifaddr *target, i IN_IFADDR_RUNLOCK(); return (EEXIST); } else { + int fibnum; + + fibnum = rt_add_addr_allfibs ? RT_ALL_FIBS : + target->ia_ifp->if_fib; rt_addrmsg(RTM_ADD, &target->ia_ifa, fibnum); IN_IFADDR_RUNLOCK(); return (0); Modified: stable/10/tests/sys/netinet/fibs_test.sh ============================================================================== --- stable/10/tests/sys/netinet/fibs_test.sh Fri Jun 6 20:01:45 2014 (r267185) +++ stable/10/tests/sys/netinet/fibs_test.sh Fri Jun 6 20:35:40 2014 (r267186) @@ -176,7 +176,6 @@ default_route_with_multiple_fibs_on_same default_route_with_multiple_fibs_on_same_subnet_body() { - atf_expect_fail "kern/187552 default route uses the wrong interface when multiple interfaces have the same subnet but different fibs" # Configure the TAP interfaces to use a RFC5737 nonrouteable addresses # and a non-default fib ADDR0="192.0.2.2" @@ -226,7 +225,6 @@ subnet_route_with_multiple_fibs_on_same_ subnet_route_with_multiple_fibs_on_same_subnet_body() { - atf_expect_fail "kern/187550 Multiple interfaces on different FIBs but the same subnet don't all have a subnet route" # Configure the TAP interfaces to use a RFC5737 nonrouteable addresses # and a non-default fib ADDR0="192.0.2.2" @@ -258,6 +256,15 @@ subnet_route_with_multiple_fibs_on_same_ # SO_DONTROUTE set that are sent on non-default FIBs. # This bug was discovered with "setfib 1 netperf -t UDP_STREAM -H some_host" # Regression test for kern/187553 +# +# The root cause was that ifa_ifwithnet() did not have a fib argument. It +# would return an address from an interface on any FIB that had a subnet route +# for the destination. If more than one were available, it would choose the +# most specific. This is most easily tested by creating a FIB without a +# default route, then trying to send a UDP packet with SO_DONTROUTE set to an +# address which is not routable on that FIB. Absent the fix for this bug, +# in_pcbladdr would choose an interface on any FIB with a default route. With +# the fix, you will get EUNREACH or ENETUNREACH. atf_test_case udp_dontroute cleanup udp_dontroute_head() { @@ -271,25 +278,38 @@ udp_dontroute_body() atf_expect_fail "kern/187553 Source address selection for UDP packets with SO_DONTROUTE uses the default FIB" # Configure the TAP interface to use an RFC5737 nonrouteable address # and a non-default fib - ADDR="192.0.2.2" + ADDR0="192.0.2.2" + ADDR1="192.0.2.3" SUBNET="192.0.2.0" MASK="24" # Use a different IP on the same subnet as the target TARGET="192.0.2.100" + SRCDIR=`atf_get_srcdir` # Check system configuration if [ 0 != `sysctl -n net.add_addr_allfibs` ]; then atf_skip "This test requires net.add_addr_allfibs=0" fi - get_fibs 1 + get_fibs 2 - # Configure a TAP interface - setup_tap ${FIB0} ${ADDR} ${MASK} + # Configure the TAP interfaces + setup_tap ${FIB0} ${ADDR0} ${MASK} + TARGET_TAP=${TAP} + setup_tap ${FIB1} ${ADDR1} ${MASK} # Send a UDP packet with SO_DONTROUTE. In the failure case, it will - # return ENETUNREACH - SRCDIR=`atf_get_srcdir` - atf_check -o ignore setfib ${FIB0} ${SRCDIR}/udp_dontroute ${TARGET} + # return ENETUNREACH, or send the packet to the wrong tap + atf_check -o ignore setfib ${FIB0} \ + ${SRCDIR}/udp_dontroute ${TARGET} /dev/${TARGET_TAP} + cleanup_tap + + # Repeat, but this time target the other tap + setup_tap ${FIB0} ${ADDR0} ${MASK} + setup_tap ${FIB1} ${ADDR1} ${MASK} + TARGET_TAP=${TAP} + + atf_check -o ignore setfib ${FIB1} \ + ${SRCDIR}/udp_dontroute ${TARGET} /dev/${TARGET_TAP} } udp_dontroute_cleanup() @@ -367,4 +387,5 @@ cleanup_tap() for TAPD in `cat "tap_devices_to_cleanup"`; do ifconfig ${TAPD} destroy done + rm "tap_devices_to_cleanup" } Modified: stable/10/tests/sys/netinet/udp_dontroute.c ============================================================================== --- stable/10/tests/sys/netinet/udp_dontroute.c Fri Jun 6 20:01:45 2014 (r267185) +++ stable/10/tests/sys/netinet/udp_dontroute.c Fri Jun 6 20:35:40 2014 (r267186) @@ -39,9 +39,11 @@ #include #include +#include #include #include #include +#include /* * Sends a single UDP packet to the provided address, with SO_DONTROUTE set @@ -51,23 +53,31 @@ int main(int argc, char **argv) { struct sockaddr_in dst; - int s; + int s, t; int opt; int ret; - const char* buf = "Hello, World!"; + ssize_t len; + const char* sendbuf = "Hello, World!"; + const size_t buflen = 80; + char recvbuf[buflen]; - if (argc != 2) { - fprintf(stderr, "Usage: %s ip_address\n", argv[0]); + if (argc != 3) { + fprintf(stderr, "Usage: %s ip_address tapdev\n", argv[0]); exit(2); } + + t = open(argv[2], O_RDWR | O_NONBLOCK); + if (t < 0) + err(EXIT_FAILURE, "open"); + s = socket(PF_INET, SOCK_DGRAM, 0); if (s < 0) - err(errno, "socket"); + err(EXIT_FAILURE, "socket"); opt = 1; ret = setsockopt(s, SOL_SOCKET, SO_DONTROUTE, &opt, sizeof(opt)); if (ret == -1) - err(errno, "setsockopt(SO_DONTROUTE)"); + err(EXIT_FAILURE, "setsockopt(SO_DONTROUTE)"); dst.sin_len = sizeof(dst); dst.sin_family = AF_INET; @@ -77,10 +87,25 @@ main(int argc, char **argv) fprintf(stderr, "Invalid address: %s\n", argv[1]); exit(2); } - ret = sendto(s, buf, strlen(buf), 0, (struct sockaddr*)&dst, + ret = sendto(s, sendbuf, strlen(sendbuf), 0, (struct sockaddr*)&dst, dst.sin_len); if (ret == -1) - err(errno, "sendto"); + err(EXIT_FAILURE, "sendto"); + + /* Verify that the packet went to the desired tap device */ + len = read(t, recvbuf, buflen); + if (len == 0) + errx(EXIT_FAILURE, "read returned EOF"); + else if (len < 0 && errno == EAGAIN) + errx(EXIT_FAILURE, "Did not receive any packets"); + else if (len < 0) + err(EXIT_FAILURE, "read"); + + /* + * If read returned anything at all, consider it a success. The packet + * should be an Ethernet frame containing an ARP request for + * ip_address. We won't bother to decode it + */ return (0); } From owner-svn-src-stable@FreeBSD.ORG Fri Jun 6 21:45:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B9F2C637; Fri, 6 Jun 2014 21:45:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A5A8622C0; Fri, 6 Jun 2014 21:45:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s56LjFO2073881; Fri, 6 Jun 2014 21:45:15 GMT (envelope-from asomers@svn.freebsd.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s56LjEKQ073872; Fri, 6 Jun 2014 21:45:14 GMT (envelope-from asomers@svn.freebsd.org) Message-Id: <201406062145.s56LjEKQ073872@svn.freebsd.org> From: Alan Somers Date: Fri, 6 Jun 2014 21:45:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267193 - in stable/10: sys/net sys/netinet tests/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jun 2014 21:45:15 -0000 Author: asomers Date: Fri Jun 6 21:45:14 2014 New Revision: 267193 URL: http://svnweb.freebsd.org/changeset/base/267193 Log: MFC r264887 Fix host and network routes for new interfaces when net.add_addr_allfibs=0 sys/net/route.c In rtinit1, use the interface fib instead of the process fib. The latter wasn't very useful because ifconfig(8) is usually invoked with the default process fib. Changing ifconfig(8) to use setfib(2) would be redundant, because it already sets the interface fib. tests/sys/netinet/fibs_test.sh Clear the expected ATF failure sys/net/if.c Pass the interface fib in calls to rtrequest1_fib and rtalloc1_fib sys/netinet/in.c sys/net/if_var.h Add a fibnum argument to ifa_switch_loopback_route, a subroutine of in_scrubprefix. Pass it the interface fib. Modified: stable/10/sys/net/if.c stable/10/sys/net/route.c stable/10/sys/netinet/in.c stable/10/tests/sys/netinet/fibs_test.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/if.c ============================================================================== --- stable/10/sys/net/if.c Fri Jun 6 21:39:16 2014 (r267192) +++ stable/10/sys/net/if.c Fri Jun 6 21:45:14 2014 (r267193) @@ -1458,7 +1458,7 @@ ifa_add_loopback_route(struct ifaddr *if info.rti_flags = ifa->ifa_flags | RTF_HOST | RTF_STATIC; info.rti_info[RTAX_DST] = ia; info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)&null_sdl; - error = rtrequest1_fib(RTM_ADD, &info, &rt, 0); + error = rtrequest1_fib(RTM_ADD, &info, &rt, ifa->ifa_ifp->if_fib); if (error == 0 && rt != NULL) { RT_LOCK(rt); @@ -1490,7 +1490,7 @@ ifa_del_loopback_route(struct ifaddr *if info.rti_flags = ifa->ifa_flags | RTF_HOST | RTF_STATIC; info.rti_info[RTAX_DST] = ia; info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)&null_sdl; - error = rtrequest1_fib(RTM_DELETE, &info, NULL, 0); + error = rtrequest1_fib(RTM_DELETE, &info, NULL, ifa->ifa_ifp->if_fib); if (error != 0) log(LOG_DEBUG, "%s: deletion failed: %u\n", __func__, error); Modified: stable/10/sys/net/route.c ============================================================================== --- stable/10/sys/net/route.c Fri Jun 6 21:39:16 2014 (r267192) +++ stable/10/sys/net/route.c Fri Jun 6 21:45:14 2014 (r267193) @@ -1543,7 +1543,7 @@ rtinit1(struct ifaddr *ifa, int cmd, int } if (fibnum == RT_ALL_FIBS) { if (rt_add_addr_allfibs == 0 && cmd == (int)RTM_ADD) { - startfib = endfib = curthread->td_proc->p_fibnum; + startfib = endfib = ifa->ifa_ifp->if_fib; } else { startfib = 0; endfib = rt_numfibs - 1; Modified: stable/10/sys/netinet/in.c ============================================================================== --- stable/10/sys/netinet/in.c Fri Jun 6 21:39:16 2014 (r267192) +++ stable/10/sys/netinet/in.c Fri Jun 6 21:45:14 2014 (r267193) @@ -1007,10 +1007,12 @@ in_scrubprefix(struct in_ifaddr *target, (target->ia_flags & IFA_RTSELF)) { struct route ia_ro; int freeit = 0; + int fib; bzero(&ia_ro, sizeof(ia_ro)); *((struct sockaddr_in *)(&ia_ro.ro_dst)) = target->ia_addr; - rtalloc_ign_fib(&ia_ro, 0, 0); + fib = target->ia_ifa.ifa_ifp->if_fib; + rtalloc_ign_fib(&ia_ro, 0, fib); if ((ia_ro.ro_rt != NULL) && (ia_ro.ro_rt->rt_ifp != NULL) && (ia_ro.ro_rt->rt_ifp == V_loif)) { RT_LOCK(ia_ro.ro_rt); Modified: stable/10/tests/sys/netinet/fibs_test.sh ============================================================================== --- stable/10/tests/sys/netinet/fibs_test.sh Fri Jun 6 21:39:16 2014 (r267192) +++ stable/10/tests/sys/netinet/fibs_test.sh Fri Jun 6 21:45:14 2014 (r267193) @@ -116,7 +116,6 @@ loopback_and_network_routes_on_nondefaul loopback_and_network_routes_on_nondefault_fib_body() { - atf_expect_fail "kern/187549 Host and network routes for a new interface appear in the wrong FIB" # Configure the TAP interface to use an RFC5737 nonrouteable address # and a non-default fib ADDR="192.0.2.2" From owner-svn-src-stable@FreeBSD.ORG Fri Jun 6 22:14:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5458CE9; Fri, 6 Jun 2014 22:14:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34635257C; Fri, 6 Jun 2014 22:14:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s56MEQWx088187; Fri, 6 Jun 2014 22:14:26 GMT (envelope-from asomers@svn.freebsd.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s56MEPDl088184; Fri, 6 Jun 2014 22:14:25 GMT (envelope-from asomers@svn.freebsd.org) Message-Id: <201406062214.s56MEPDl088184@svn.freebsd.org> From: Alan Somers Date: Fri, 6 Jun 2014 22:14:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267195 - in stable/10: sys/netinet tests/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jun 2014 22:14:26 -0000 Author: asomers Date: Fri Jun 6 22:14:25 2014 New Revision: 267195 URL: http://svnweb.freebsd.org/changeset/base/267195 Log: MFC changes related to PR kern/189089. Unlike CURRENT, stable/10 does not panic when you attempt to remove the IP address. But it still fails to remove the address. MFC r265094 Add regression test for PR kern/189088. MFC r265092 Fix a panic when removing an IP address from an interface, if the same address exists on another interface. The panic was introduced by change 264887, which changed the fibnum parameter in the call to rtalloc1_fib() in ifa_switch_loopback_route() from RT_DEFAULT_FIB to RT_ALL_FIBS. The solution is to use the interface fib in that call. For the majority of users, that will be equivalent to the legacy behavior. Modified: stable/10/sys/netinet/in.c stable/10/tests/sys/netinet/fibs_test.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/in.c ============================================================================== --- stable/10/sys/netinet/in.c Fri Jun 6 21:58:27 2014 (r267194) +++ stable/10/sys/netinet/in.c Fri Jun 6 22:14:25 2014 (r267195) @@ -987,11 +987,9 @@ in_scrubprefix(struct in_ifaddr *target, { struct in_ifaddr *ia; struct in_addr prefix, mask, p, m; - int error = 0, fibnum; + int error = 0; struct sockaddr_in prefix0, mask0; - fibnum = rt_add_addr_allfibs ? RT_ALL_FIBS : target->ia_ifp->if_fib; - /* * Remove the loopback route to the interface address. * The "useloopback" setting is not consulted because if the @@ -1046,6 +1044,10 @@ in_scrubprefix(struct in_ifaddr *target, } if ((target->ia_flags & IFA_ROUTE) == 0) { + int fibnum; + + fibnum = rt_add_addr_allfibs ? RT_ALL_FIBS : + target->ia_ifp->if_fib; rt_addrmsg(RTM_DELETE, &target->ia_ifa, fibnum); return (0); } Modified: stable/10/tests/sys/netinet/fibs_test.sh ============================================================================== --- stable/10/tests/sys/netinet/fibs_test.sh Fri Jun 6 21:58:27 2014 (r267194) +++ stable/10/tests/sys/netinet/fibs_test.sh Fri Jun 6 22:14:25 2014 (r267195) @@ -213,6 +213,98 @@ default_route_with_multiple_fibs_on_same } +# Regression test for PR kern/189089 +# Create two tap interfaces and assign them both the same IP address but with +# different netmasks, and both on the default FIB. Then remove one's IP +# address. Hopefully the machine won't panic. +atf_test_case same_ip_multiple_ifaces_fib0 cleanup +same_ip_multiple_ifaces_fib0_head() +{ + atf_set "descr" "Can remove an IP alias from an interface when the same IP is also assigned to another interface." + atf_set "require.user" "root" + atf_set "require.config" "fibs" +} +same_ip_multiple_ifaces_fib0_body() +{ + ADDR="192.0.2.2" + MASK0="24" + MASK1="32" + + # Unlike most of the tests in this file, this is applicable regardless + # of net.add_addr_allfibs + + # Setup the interfaces, then remove one alias. It should not panic. + setup_tap 0 ${ADDR} ${MASK0} + TAP0=${TAP} + setup_tap 0 ${ADDR} ${MASK1} + TAP1=${TAP} + ifconfig ${TAP1} -alias ${ADDR} + + # Do it again, in the opposite order. It should not panic. + setup_tap 0 ${ADDR} ${MASK0} + TAP0=${TAP} + setup_tap 0 ${ADDR} ${MASK1} + TAP1=${TAP} + ifconfig ${TAP0} -alias ${ADDR} +} +same_ip_multiple_ifaces_fib0_cleanup() +{ + cleanup_tap +} + +# Regression test for PR kern/189088 +# Test that removing an IP address works even if the same IP is assigned to a +# different interface, on a different FIB. Tests the same code that whose +# panic was regressed by same_ip_multiple_ifaces_fib0. +# Create two tap interfaces and assign them both the same IP address but with +# different netmasks, and on different FIBs. Then remove one's IP +# address. Hopefully the machine won't panic. Also, the IP's hostroute should +# dissappear from the correct fib. +atf_test_case same_ip_multiple_ifaces cleanup +same_ip_multiple_ifaces_head() +{ + atf_set "descr" "Can remove an IP alias from an interface when the same IP is also assigned to another interface, on non-default FIBs." + atf_set "require.user" "root" + atf_set "require.config" "fibs" +} +same_ip_multiple_ifaces_body() +{ + atf_expect_fail "kern/189088 Assigning the same IP to multiple interfaces in different FIBs creates a host route for only one" + ADDR="192.0.2.2" + MASK0="24" + MASK1="32" + + # Unlike most of the tests in this file, this is applicable regardless + # of net.add_addr_allfibs + get_fibs 2 + + # Setup the interfaces, then remove one alias. It should not panic. + setup_tap ${FIB0} ${ADDR} ${MASK0} + TAP0=${TAP} + setup_tap ${FIB1} ${ADDR} ${MASK1} + TAP1=${TAP} + ifconfig ${TAP1} -alias ${ADDR} + atf_check -o not-match:"^${ADDR}[[:space:]]" \ + setfib ${FIB1} netstat -rn -f inet + + # Do it again, in the opposite order. It should not panic. + setup_tap ${FIB0} ${ADDR} ${MASK0} + TAP0=${TAP} + setup_tap ${FIB1} ${ADDR} ${MASK1} + TAP1=${TAP} + ifconfig ${TAP0} -alias ${ADDR} + atf_check -o not-match:"^${ADDR}[[:space:]]" \ + setfib ${FIB0} netstat -rn -f inet +} +same_ip_multiple_ifaces_cleanup() +{ + # Due to PR kern/189088, we must destroy the interfaces in LIFO order + # in order for the routes to be correctly cleaned up. + for TAPD in `tail -r "tap_devices_to_cleanup"`; do + ifconfig ${TAPD} destroy + done +} + # Regression test for kern/187550 atf_test_case subnet_route_with_multiple_fibs_on_same_subnet cleanup subnet_route_with_multiple_fibs_on_same_subnet_head() @@ -322,6 +414,8 @@ atf_init_test_cases() atf_add_test_case arpresolve_checks_interface_fib atf_add_test_case loopback_and_network_routes_on_nondefault_fib atf_add_test_case default_route_with_multiple_fibs_on_same_subnet + atf_add_test_case same_ip_multiple_ifaces_fib0 + atf_add_test_case same_ip_multiple_ifaces atf_add_test_case subnet_route_with_multiple_fibs_on_same_subnet atf_add_test_case udp_dontroute } From owner-svn-src-stable@FreeBSD.ORG Sat Jun 7 02:45:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7B7FC1CD; Sat, 7 Jun 2014 02:45:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 680752DFB; Sat, 7 Jun 2014 02:45:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s572jPtk020847; Sat, 7 Jun 2014 02:45:25 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s572jONL020842; Sat, 7 Jun 2014 02:45:24 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201406070245.s572jONL020842@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 7 Jun 2014 02:45:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267200 - in stable/10: lib/libthr/thread libexec/rtld-elf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jun 2014 02:45:25 -0000 Author: kib Date: Sat Jun 7 02:45:24 2014 New Revision: 267200 URL: http://svnweb.freebsd.org/changeset/base/267200 Log: MFC r266609: Change the _rtld_atfork() to lock the bind lock in write mode. Modified: stable/10/lib/libthr/thread/thr_fork.c stable/10/lib/libthr/thread/thr_rtld.c stable/10/libexec/rtld-elf/rtld_lock.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libthr/thread/thr_fork.c ============================================================================== --- stable/10/lib/libthr/thread/thr_fork.c Sat Jun 7 02:38:13 2014 (r267199) +++ stable/10/lib/libthr/thread/thr_fork.c Sat Jun 7 02:45:24 2014 (r267200) @@ -57,6 +57,7 @@ * */ +#include #include "namespace.h" #include #include @@ -174,8 +175,15 @@ _fork(void) was_threaded = 0; } - /* Fork a new process: */ - if ((ret = __sys_fork()) == 0) { + /* + * Fork a new process. + * There is no easy way to pre-resolve the __sys_fork symbol + * without performing the fork. Use the syscall(2) + * indirection, the syscall symbol is resolved in + * _thr_rtld_init() with side-effect free call. + */ + ret = syscall(SYS_fork); + if (ret == 0) { /* Child process */ errsave = errno; curthread->cancel_pending = 0; @@ -250,6 +258,5 @@ _fork(void) } errno = errsave; - /* Return the process ID: */ return (ret); } Modified: stable/10/lib/libthr/thread/thr_rtld.c ============================================================================== --- stable/10/lib/libthr/thread/thr_rtld.c Sat Jun 7 02:38:13 2014 (r267199) +++ stable/10/lib/libthr/thread/thr_rtld.c Sat Jun 7 02:45:24 2014 (r267200) @@ -32,10 +32,12 @@ */ #include #include +#include #include #include #include +#include "libc_private.h" #include "rtld_lock.h" #include "thr_private.h" @@ -207,7 +209,24 @@ _thr_rtld_init(void) li.thread_set_flag = _thr_rtld_set_flag; li.thread_clr_flag = _thr_rtld_clr_flag; li.at_fork = NULL; - + + /* + * Preresolve the symbols needed for the fork interposer. We + * call _rtld_atfork_pre() and _rtld_atfork_post() with NULL + * argument to indicate that no actual locking inside the + * functions should happen. Neither rtld compat locks nor + * libthr rtld locks cannot work there: + * - compat locks do not handle the case of two locks taken + * in write mode (the signal mask for the thread is corrupted); + * - libthr locks would work, but locked rtld_bind_lock prevents + * symbol resolution for _rtld_atfork_post. + */ + _rtld_atfork_pre(NULL); + _rtld_atfork_post(NULL); + _malloc_prefork(); + _malloc_postfork(); + syscall(SYS_getpid); + /* mask signals, also force to resolve __sys_sigprocmask PLT */ _thr_signal_block(curthread); _rtld_thread_init(&li); Modified: stable/10/libexec/rtld-elf/rtld_lock.c ============================================================================== --- stable/10/libexec/rtld-elf/rtld_lock.c Sat Jun 7 02:38:13 2014 (r267199) +++ stable/10/libexec/rtld-elf/rtld_lock.c Sat Jun 7 02:45:24 2014 (r267200) @@ -365,8 +365,19 @@ _rtld_atfork_pre(int *locks) { RtldLockState ls[2]; + if (locks == NULL) + return; + + /* + * Warning: this does not work with the rtld compat locks + * above, since the thread signal mask is corrupted (set to + * all signals blocked) if two locks are taken in write mode. + * The caller of the _rtld_atfork_pre() must provide the + * working implementation of the locks, and libthr locks are + * fine. + */ wlock_acquire(rtld_phdr_lock, &ls[0]); - rlock_acquire(rtld_bind_lock, &ls[1]); + wlock_acquire(rtld_bind_lock, &ls[1]); /* XXXKIB: I am really sorry for this. */ locks[0] = ls[1].lockstate; @@ -378,6 +389,9 @@ _rtld_atfork_post(int *locks) { RtldLockState ls[2]; + if (locks == NULL) + return; + bzero(ls, sizeof(ls)); ls[0].lockstate = locks[2]; ls[1].lockstate = locks[0]; From owner-svn-src-stable@FreeBSD.ORG Sat Jun 7 02:49:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EFAF7457; Sat, 7 Jun 2014 02:49:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD0D72E28; Sat, 7 Jun 2014 02:49:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s572ndnJ021747; Sat, 7 Jun 2014 02:49:39 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s572ndXK021746; Sat, 7 Jun 2014 02:49:39 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201406070249.s572ndXK021746@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 7 Jun 2014 02:49:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267201 - stable/10/usr.bin/yes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jun 2014 02:49:40 -0000 Author: kib Date: Sat Jun 7 02:49:39 2014 New Revision: 267201 URL: http://svnweb.freebsd.org/changeset/base/267201 Log: MFC r267067: Cross-reference jot(1) and seq(1). MFC r267098 (by pluknet): mdoc: drop the trailing dot from the xref list. Modified: stable/10/usr.bin/yes/yes.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/yes/yes.1 ============================================================================== --- stable/10/usr.bin/yes/yes.1 Sat Jun 7 02:45:24 2014 (r267200) +++ stable/10/usr.bin/yes/yes.1 Sat Jun 7 02:49:39 2014 (r267201) @@ -28,7 +28,7 @@ .\" @(#)yes.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd June 6, 1993 +.Dd June 4, 2014 .Dt YES 1 .Os .Sh NAME @@ -45,6 +45,9 @@ utility outputs or, by default, .Dq y , forever. +.Sh SEE ALSO +.Xr jot 1 , +.Xr seq 1 .Sh HISTORY The .Nm From owner-svn-src-stable@FreeBSD.ORG Sat Jun 7 03:39:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D246DAD; Sat, 7 Jun 2014 03:39:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BEAEE231F; Sat, 7 Jun 2014 03:39:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s573dCYU046899; Sat, 7 Jun 2014 03:39:12 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s573dCbm046898; Sat, 7 Jun 2014 03:39:12 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201406070339.s573dCbm046898@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 7 Jun 2014 03:39:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267203 - stable/9/usr.bin/yes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jun 2014 03:39:12 -0000 Author: kib Date: Sat Jun 7 03:39:12 2014 New Revision: 267203 URL: http://svnweb.freebsd.org/changeset/base/267203 Log: MFC r267067: Cross-reference jot(1) and seq(1). MFC r267098 (by pluknet): mdoc: drop the trailing dot from the xref list. Approved by: re (gjb) Modified: stable/9/usr.bin/yes/yes.1 Directory Properties: stable/9/usr.bin/yes/ (props changed) Modified: stable/9/usr.bin/yes/yes.1 ============================================================================== --- stable/9/usr.bin/yes/yes.1 Sat Jun 7 02:55:53 2014 (r267202) +++ stable/9/usr.bin/yes/yes.1 Sat Jun 7 03:39:12 2014 (r267203) @@ -28,7 +28,7 @@ .\" @(#)yes.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd June 6, 1993 +.Dd June 4, 2014 .Dt YES 1 .Os .Sh NAME @@ -45,6 +45,9 @@ utility outputs or, by default, .Dq y , forever. +.Sh SEE ALSO +.Xr jot 1 , +.Xr seq 1 .Sh HISTORY The .Nm From owner-svn-src-stable@FreeBSD.ORG Sat Jun 7 15:23:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D89C493 for ; Sat, 7 Jun 2014 15:23:56 +0000 (UTC) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DB292648 for ; Sat, 7 Jun 2014 15:23:56 +0000 (UTC) Received: by mail-pb0-f50.google.com with SMTP id ma3so3683836pbc.37 for ; Sat, 07 Jun 2014 08:23:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:content-type:mime-version:subject :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=jFkkYFpCt67BFwJKcKE6NO5wppbXwEws9aN+P5SbLiQ=; b=HBasD+lNV1ecp2CVSI9Et5v4A8DFOz+IDoPswuSuTZ9BFczD6aqah+mAxEFBLBmn7b 8iuTDePPCcaQND4ZC3djZxg9CTZ/pdP7ttJ4qerawvoQiF0BfEOYWJ9rpILOCVdkohAj gW9jZ25tFXMxAVxFwOuJzLWSoEo08Oh7QsglTAFFCuiAq3xkTzQgmP5Q2DHaoDeKa9td w3SojJGNdh/frvegBPg5xl9xgHlm3txsvpmF1Cwn7wP9U5Vr5eF9BFRDcO0NMWSMiS8f V+zJ82ZIYCDA4Ct8zqfH1cRVzv46h33dfWErcqYMLCOXEXv3vxhwlrQjntUjtA6Im2AZ 5qyw== X-Gm-Message-State: ALoCoQkN51k1tx5xKuxVqWwUtfFkmx5vifaTXDOVYKQOPgJYwEVCG/p8lnlVKK6qh854VLtaFWT4 X-Received: by 10.68.254.5 with SMTP id ae5mr12643083pbd.83.1402154629833; Sat, 07 Jun 2014 08:23:49 -0700 (PDT) Received: from lgmac-cvenus.corp.netflix.com (dc1-prod.netflix.com. [69.53.236.251]) by mx.google.com with ESMTPSA id au4sm49827153pbc.10.2014.06.07.08.23.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 07 Jun 2014 08:23:49 -0700 (PDT) Sender: Warner Losh From: Warner Losh X-Google-Original-From: Warner Losh Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) Subject: Re: svn commit: r267107 - stable/10/sys/i386/conf In-Reply-To: <201406051308.s55D88mM053472@svn.freebsd.org> Date: Sat, 7 Jun 2014 09:23:47 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <652C13FA-F367-4884-BF65-2692E7614F93@gmail.com> References: <201406051308.s55D88mM053472@svn.freebsd.org> To: Marius Strobl X-Mailer: Apple Mail (2.1878.2) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jun 2014 15:23:56 -0000 Why? There should be no -gdwarf-2 in the tree, that was a workaround = that has since been obsoleted by (a) -g automatically changes to this in = the makefile system and (b) the default was reverted back to dwarf 2. = This wasn=92t a mismerge, but an intentional fix. Warner On Jun 5, 2014, at 7:08 AM, Marius Strobl wrote: > Author: marius > Date: Thu Jun 5 13:08:08 2014 > New Revision: 267107 > URL: http://svnweb.freebsd.org/changeset/base/267107 >=20 > Log: > Fix mismerge in r267049 and put makeoptions DEBUG=3D-gdwarf-2 instead = of > DEBUG=3D-g back. > Still, the original comment should be restored in head and then be = MFCed > along with r263749. >=20 > Modified: > stable/10/sys/i386/conf/XEN >=20 > Modified: stable/10/sys/i386/conf/XEN > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- stable/10/sys/i386/conf/XEN Thu Jun 5 12:53:06 2014 = (r267106) > +++ stable/10/sys/i386/conf/XEN Thu Jun 5 13:08:08 2014 = (r267107) > @@ -6,7 +6,7 @@ > cpu I686_CPU > ident XEN >=20 > -makeoptions DEBUG=3D-g > +makeoptions DEBUG=3D-gdwarf-2 # Build kernel with = gdb(1) debug symbols >=20 > # The following modules don't build with PAE and XEN enabled. > makeoptions WITHOUT_MODULES=3D"ctl cxgb dpt drm drm2 hptmv ida malo = mwl rdma" >=20 From owner-svn-src-stable@FreeBSD.ORG Sat Jun 7 19:12:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E57A4871; Sat, 7 Jun 2014 19:12:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0FEF293D; Sat, 7 Jun 2014 19:12:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s57JChdj077047; Sat, 7 Jun 2014 19:12:43 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s57JChFl077046; Sat, 7 Jun 2014 19:12:43 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201406071912.s57JChFl077046@svn.freebsd.org> From: Christian Brueffer Date: Sat, 7 Jun 2014 19:12:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267214 - stable/10/usr.sbin/bsnmpd/modules/snmp_hast X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jun 2014 19:12:44 -0000 Author: brueffer Date: Sat Jun 7 19:12:43 2014 New Revision: 267214 URL: http://svnweb.freebsd.org/changeset/base/267214 Log: MFC: r266931 Grammar cleanup; sort SEE ALSO. Modified: stable/10/usr.sbin/bsnmpd/modules/snmp_hast/snmp_hast.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsnmpd/modules/snmp_hast/snmp_hast.3 ============================================================================== --- stable/10/usr.sbin/bsnmpd/modules/snmp_hast/snmp_hast.3 Sat Jun 7 17:12:26 2014 (r267213) +++ stable/10/usr.sbin/bsnmpd/modules/snmp_hast/snmp_hast.3 Sat Jun 7 19:12:43 2014 (r267214) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 9, 2013 +.Dd May 31, 2014 .Dt SNMP_HAST 3 .Os .Sh NAME @@ -40,11 +40,12 @@ The module implements a private BEGEMOT-HAST-MIB, which allows management of HAST resources. .Pp -The module uses +The module uses the .Xr hastd 8 control socket to communicate with the daemon. +The .Va hastConfigFile -variable can be used to specify the location of +variable can be used to specify the location of the .Xr hast.conf 5 file to find the address of the control connection. .Sh FILES @@ -62,8 +63,8 @@ configuration file. .Sh SEE ALSO .Xr bsnmpd 1 , .Xr gensnmptree 1 , +.Xr snmpmod 3 , .Xr hastctl 8 , -.Xr hastd 8 , -.Xr snmpmod 3 +.Xr hastd 8 .Sh AUTHORS .An Mikolaj Golub Aq trociny@FreeBSD.org From owner-svn-src-stable@FreeBSD.ORG Sat Jun 7 21:48:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 80B9C16B; Sat, 7 Jun 2014 21:48:46 +0000 (UTC) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "alchemy.franken.de", Issuer "alchemy.franken.de" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 139652573; Sat, 7 Jun 2014 21:48:45 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.8/8.14.8/ALCHEMY.FRANKEN.DE) with ESMTP id s57LmZe1030702 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 7 Jun 2014 23:48:35 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.8/8.14.8/Submit) id s57LmZXY030701; Sat, 7 Jun 2014 23:48:35 +0200 (CEST) (envelope-from marius) Date: Sat, 7 Jun 2014 23:48:35 +0200 From: Marius Strobl To: Warner Losh Subject: Re: svn commit: r267107 - stable/10/sys/i386/conf Message-ID: <20140607214835.GH679@alchemy.franken.de> References: <201406051308.s55D88mM053472@svn.freebsd.org> <652C13FA-F367-4884-BF65-2692E7614F93@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <652C13FA-F367-4884-BF65-2692E7614F93@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (alchemy.franken.de [0.0.0.0]); Sat, 07 Jun 2014 23:48:36 +0200 (CEST) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jun 2014 21:48:46 -0000 On Sat, Jun 07, 2014 at 09:23:47AM -0600, Warner Losh wrote: > Why? There should be no -gdwarf-2 in the tree, that was a workaround that has since been obsoleted by (a) -g automatically changes to this in the makefile system and (b) the default was reverted back to dwarf 2. This wasn?t a mismerge, but an intentional fix. Because despite what you say, -gdwarf-2 actually still is in stable/9 and stable/10 as of now: marius@alchemy:/home/marius/co > grep -l -- -gdwarf-2 {9,10}/src/sys/*/conf/* 9/src/sys/amd64/conf/GENERIC 9/src/sys/i386/conf/GENERIC 9/src/sys/i386/conf/XEN 9/src/sys/sparc64/conf/GENERIC 10/src/sys/amd64/conf/GENERIC 10/src/sys/i386/conf/GENERIC 10/src/sys/i386/conf/XEN 10/src/sys/sparc64/conf/GENERIC And also because replacing -gdwarf-2 with -g just wasn't part of r266820, doing the former when MFCing that revision as r267049 simply was a mismerge on my part. Apart from these I'm fully aware that -gdwarf-2 was/is only transient, but we're just not fully back to -g, yet. Marius From owner-svn-src-stable@FreeBSD.ORG Sun Jun 8 06:35:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 10FFBBCA; Sun, 8 Jun 2014 06:35:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F16FB286A; Sun, 8 Jun 2014 06:35:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s586Z8gb083651; Sun, 8 Jun 2014 06:35:08 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s586Z8sj083650; Sun, 8 Jun 2014 06:35:08 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201406080635.s586Z8sj083650@svn.freebsd.org> From: Christian Brueffer Date: Sun, 8 Jun 2014 06:35:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267219 - stable/9/usr.sbin/bsnmpd/modules/snmp_hast X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jun 2014 06:35:09 -0000 Author: brueffer Date: Sun Jun 8 06:35:08 2014 New Revision: 267219 URL: http://svnweb.freebsd.org/changeset/base/267219 Log: MFC: r266931 Grammar cleanup; sort SEE ALSO. Approved by: re (gjb) Modified: stable/9/usr.sbin/bsnmpd/modules/snmp_hast/snmp_hast.3 Directory Properties: stable/9/usr.sbin/bsnmpd/ (props changed) Modified: stable/9/usr.sbin/bsnmpd/modules/snmp_hast/snmp_hast.3 ============================================================================== --- stable/9/usr.sbin/bsnmpd/modules/snmp_hast/snmp_hast.3 Sat Jun 7 23:08:06 2014 (r267218) +++ stable/9/usr.sbin/bsnmpd/modules/snmp_hast/snmp_hast.3 Sun Jun 8 06:35:08 2014 (r267219) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 9, 2013 +.Dd May 31, 2014 .Dt SNMP_HAST 3 .Os .Sh NAME @@ -40,11 +40,12 @@ The module implements a private BEGEMOT-HAST-MIB, which allows management of HAST resources. .Pp -The module uses +The module uses the .Xr hastd 8 control socket to communicate with the daemon. +The .Va hastConfigFile -variable can be used to specify the location of +variable can be used to specify the location of the .Xr hast.conf 5 file to find the address of the control connection. .Sh FILES @@ -62,8 +63,8 @@ configuration file. .Sh SEE ALSO .Xr bsnmpd 1 , .Xr gensnmptree 1 , +.Xr snmpmod 3 , .Xr hastctl 8 , -.Xr hastd 8 , -.Xr snmpmod 3 +.Xr hastd 8 .Sh AUTHORS .An Mikolaj Golub Aq trociny@FreeBSD.org From owner-svn-src-stable@FreeBSD.ORG Sun Jun 8 14:02:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D415925; Sun, 8 Jun 2014 14:02:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 273E52823; Sun, 8 Jun 2014 14:02:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s58E2QqI091070; Sun, 8 Jun 2014 14:02:26 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s58E2QHr091069; Sun, 8 Jun 2014 14:02:26 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201406081402.s58E2QHr091069@svn.freebsd.org> From: Ed Maste Date: Sun, 8 Jun 2014 14:02:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267231 - stable/10/sys/dev/vt/font X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jun 2014 14:02:26 -0000 Author: emaste Date: Sun Jun 8 14:02:25 2014 New Revision: 267231 URL: http://svnweb.freebsd.org/changeset/base/267231 Log: MFC r267078, r267079: Update vt(4) console font author's email address Remove extra copy of old email address. Modified: stable/10/sys/dev/vt/font/vt_font_default.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/font/vt_font_default.c ============================================================================== --- stable/10/sys/dev/vt/font/vt_font_default.c Sun Jun 8 11:27:21 2014 (r267230) +++ stable/10/sys/dev/vt/font/vt_font_default.c Sun Jun 8 14:02:25 2014 (r267231) @@ -1,6 +1,5 @@ /*- - * Copyright (c) 2011 Dimitar Toshkov Zhekov - * All rights reserved. + * Copyright (c) 2011 Dimitar Toshkov Zhekov. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,7 +22,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Please contribute any changes back to . + * Please contribute any changes back to . */ #include From owner-svn-src-stable@FreeBSD.ORG Sun Jun 8 17:50:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 525C6D99; Sun, 8 Jun 2014 17:50:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 324B429B8; Sun, 8 Jun 2014 17:50:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s58Ho9Cn019165; Sun, 8 Jun 2014 17:50:09 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s58Ho7BO019155; Sun, 8 Jun 2014 17:50:08 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201406081750.s58Ho7BO019155@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 8 Jun 2014 17:50:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267236 - in stable/10: . etc/etc.amd64 etc/etc.i386 include lib/libc/gen libexec/getty X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jun 2014 17:50:09 -0000 Author: nwhitehorn Date: Sun Jun 8 17:50:07 2014 New Revision: 267236 URL: http://svnweb.freebsd.org/changeset/base/267236 Log: MFC r260913,266895: Add a new flag to /etc/ttys: onifconsole. This is equivalent to "on" if the device is an active kernel console and "off" otherwise. This is designed to allow serial-booting x86 systems to provide a login prompt on the serial line by default without providing one on all systems by default. Set this flag on x86 systems for ttyu0. Comments and suggestions by: grehan, dteske, jilles Modified: stable/10/UPDATING stable/10/etc/etc.amd64/ttys stable/10/etc/etc.i386/ttys stable/10/include/ttyent.h stable/10/lib/libc/gen/getttyent.c stable/10/libexec/getty/ttys.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/UPDATING ============================================================================== --- stable/10/UPDATING Sun Jun 8 17:43:19 2014 (r267235) +++ stable/10/UPDATING Sun Jun 8 17:50:07 2014 (r267236) @@ -16,6 +16,13 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20140608: + On i386 and amd64 systems, the onifconsole flag is now set by default + in /etc/ttys for ttyu0. This causes ttyu0 to be automatically enabled + as a login TTY if it is set in the bootloader as an active kernel + console. No changes in behavior should result otherwise. To revert to + the previous behavior, set ttyu0 to "off" in /etc/ttys. + 20140512: Clang and llvm have been upgraded to 3.4.1 release. Modified: stable/10/etc/etc.amd64/ttys ============================================================================== --- stable/10/etc/etc.amd64/ttys Sun Jun 8 17:43:19 2014 (r267235) +++ stable/10/etc/etc.amd64/ttys Sun Jun 8 17:50:07 2014 (r267236) @@ -41,7 +41,7 @@ ttyv7 "/usr/libexec/getty Pc" xterm on ttyv8 "/usr/local/bin/xdm -nodaemon" xterm off secure # Serial terminals # The 'dialup' keyword identifies dialin lines to login, fingerd etc. -ttyu0 "/usr/libexec/getty std.9600" dialup off secure +ttyu0 "/usr/libexec/getty std.9600" vt100 onifconsole secure ttyu1 "/usr/libexec/getty std.9600" dialup off secure ttyu2 "/usr/libexec/getty std.9600" dialup off secure ttyu3 "/usr/libexec/getty std.9600" dialup off secure Modified: stable/10/etc/etc.i386/ttys ============================================================================== --- stable/10/etc/etc.i386/ttys Sun Jun 8 17:43:19 2014 (r267235) +++ stable/10/etc/etc.i386/ttys Sun Jun 8 17:50:07 2014 (r267236) @@ -41,7 +41,7 @@ ttyv7 "/usr/libexec/getty Pc" xterm on ttyv8 "/usr/local/bin/xdm -nodaemon" xterm off secure # Serial terminals # The 'dialup' keyword identifies dialin lines to login, fingerd etc. -ttyu0 "/usr/libexec/getty std.9600" dialup off secure +ttyu0 "/usr/libexec/getty std.9600" vt100 onifconsole secure ttyu1 "/usr/libexec/getty std.9600" dialup off secure ttyu2 "/usr/libexec/getty std.9600" dialup off secure ttyu3 "/usr/libexec/getty std.9600" dialup off secure Modified: stable/10/include/ttyent.h ============================================================================== --- stable/10/include/ttyent.h Sun Jun 8 17:43:19 2014 (r267235) +++ stable/10/include/ttyent.h Sun Jun 8 17:50:07 2014 (r267236) @@ -37,6 +37,7 @@ #define _TTYS_OFF "off" #define _TTYS_ON "on" +#define _TTYS_ONIFCONSOLE "onifconsole" #define _TTYS_SECURE "secure" #define _TTYS_INSECURE "insecure" #define _TTYS_WINDOW "window" Modified: stable/10/lib/libc/gen/getttyent.c ============================================================================== --- stable/10/lib/libc/gen/getttyent.c Sun Jun 8 17:43:19 2014 (r267235) +++ stable/10/lib/libc/gen/getttyent.c Sun Jun 8 17:50:07 2014 (r267236) @@ -39,6 +39,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include + static char zapchar; static FILE *tf; static size_t lbsize; @@ -64,6 +67,36 @@ getttynam(const char *tty) return (t); } +static int +auto_tty_status(const char *ty_name) +{ + size_t len; + char *buf, *cons, *nextcons; + + /* Check if this is an enabled kernel console line */ + buf = NULL; + if (sysctlbyname("kern.console", NULL, &len, NULL, 0) == -1) + return (0); /* Errors mean don't enable */ + buf = malloc(len); + if (sysctlbyname("kern.console", buf, &len, NULL, 0) == -1) + goto done; + + if ((cons = strchr(buf, '/')) == NULL) + goto done; + *cons = '\0'; + nextcons = buf; + while ((cons = strsep(&nextcons, ",")) != NULL && strlen(cons) != 0) { + if (strcmp(cons, ty_name) == 0) { + free(buf); + return (TTY_ON); + } + } + +done: + free(buf); + return (0); +} + struct ttyent * getttyent(void) { @@ -126,6 +159,8 @@ getttyent(void) tty.ty_status &= ~TTY_ON; else if (scmp(_TTYS_ON)) tty.ty_status |= TTY_ON; + else if (scmp(_TTYS_ONIFCONSOLE)) + tty.ty_status |= auto_tty_status(tty.ty_name); else if (scmp(_TTYS_SECURE)) tty.ty_status |= TTY_SECURE; else if (scmp(_TTYS_INSECURE)) Modified: stable/10/libexec/getty/ttys.5 ============================================================================== --- stable/10/libexec/getty/ttys.5 Sun Jun 8 17:43:19 2014 (r267235) +++ stable/10/libexec/getty/ttys.5 Sun Jun 8 17:50:07 2014 (r267236) @@ -98,8 +98,11 @@ ttys as a group. .Pp As flag values, the strings ``on'' and ``off'' specify that .Xr init 8 -should (should not) execute the command given in the second field, -while ``secure'' (if ``on'' is also specified) allows users with a +should (should not) execute the command given in the second field. +``onifconsole'' will cause this line to be enabled if and only if it is +an active kernel console device (it is equivalent to ``on'' in this +case). +The flag ``secure'' (if the console is enabled) allows users with a uid of 0 to login on this line. The flag ``dialin'' indicates that a tty entry describes a dialin From owner-svn-src-stable@FreeBSD.ORG Sun Jun 8 20:39:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D4CA26B; Sun, 8 Jun 2014 20:39:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 882CA26DC; Sun, 8 Jun 2014 20:39:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s58KddKW021708; Sun, 8 Jun 2014 20:39:39 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s58Kdd3d021706; Sun, 8 Jun 2014 20:39:39 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201406082039.s58Kdd3d021706@svn.freebsd.org> From: Hans Petter Selasky Date: Sun, 8 Jun 2014 20:39:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267242 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jun 2014 20:39:39 -0000 Author: hselasky Date: Sun Jun 8 20:39:39 2014 New Revision: 267242 URL: http://svnweb.freebsd.org/changeset/base/267242 Log: MFC r267044, r267120, r267210 and r267211: Multiple fixes for FULL and LOW speed USB transfers going through the DWC OTG as split transactions. INTERRUPT transfers should have a higher chance of success after this series of patches and the chance of data loss should be reduced. Modified: stable/10/sys/dev/usb/controller/dwc_otg.c stable/10/sys/dev/usb/controller/dwc_otg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/dwc_otg.c ============================================================================== --- stable/10/sys/dev/usb/controller/dwc_otg.c Sun Jun 8 20:20:08 2014 (r267241) +++ stable/10/sys/dev/usb/controller/dwc_otg.c Sun Jun 8 20:39:39 2014 (r267242) @@ -98,6 +98,8 @@ GINTMSK_USBSUSPMSK | \ GINTMSK_IEPINTMSK | \ GINTMSK_SESSREQINTMSK | \ + GINTMSK_RXFLVLMSK | \ + GINTMSK_HCHINTMSK | \ GINTMSK_OTGINTMSK | \ GINTMSK_PRTINTMSK) @@ -239,7 +241,8 @@ dwc_otg_init_fifo(struct dwc_otg_softc * for (x = 0; x != sc->sc_host_ch_max; x++) { /* disable all host interrupts */ - DWC_OTG_WRITE_4(sc, DOTG_HCINTMSK(x), 0); + DWC_OTG_WRITE_4(sc, DOTG_HCINTMSK(x), + HCINT_DEFAULT_MASK); } DWC_OTG_WRITE_4(sc, DOTG_HPTXFSIZ, @@ -256,8 +259,9 @@ dwc_otg_init_fifo(struct dwc_otg_softc * /* store maximum periodic and non-periodic FIFO TX size */ sc->sc_tx_max_size = fifo_size; - /* disable all host channel interrupts */ - DWC_OTG_WRITE_4(sc, DOTG_HAINTMSK, 0); + /* enable all host channel interrupts */ + DWC_OTG_WRITE_4(sc, DOTG_HAINTMSK, + (1U << sc->sc_host_ch_max) - 1U); } if (mode == DWC_MODE_DEVICE) { @@ -568,11 +572,9 @@ dwc_otg_common_rx_ack(struct dwc_otg_sof { DPRINTFN(5, "RX status clear\n"); - if (sc->sc_flags.status_device_mode != 0) { - /* enable RX FIFO level interrupt */ - sc->sc_irq_mask |= GINTMSK_RXFLVLMSK; - DWC_OTG_WRITE_4(sc, DOTG_GINTMSK, sc->sc_irq_mask); - } + /* enable RX FIFO level interrupt */ + sc->sc_irq_mask |= GINTMSK_RXFLVLMSK; + DWC_OTG_WRITE_4(sc, DOTG_GINTMSK, sc->sc_irq_mask); /* clear cached status */ sc->sc_last_rx_status = 0; @@ -592,13 +594,13 @@ dwc_otg_clear_hcint(struct dwc_otg_softc } static uint8_t -dwc_otg_host_channel_alloc(struct dwc_otg_softc *sc, struct dwc_otg_td *td, uint8_t which, uint8_t is_out) +dwc_otg_host_channel_alloc(struct dwc_otg_softc *sc, struct dwc_otg_td *td, uint8_t is_out) { uint32_t tx_p_size; uint32_t tx_np_size; uint8_t x; - if (td->channel[which] < DWC_OTG_MAX_CHANNELS) + if (td->channel < DWC_OTG_MAX_CHANNELS) return (0); /* already allocated */ /* check if device is suspended */ @@ -607,8 +609,7 @@ dwc_otg_host_channel_alloc(struct dwc_ot /* compute needed TX FIFO size */ if (is_out != 0) { - if (td->ep_type == UE_INTERRUPT || - td->ep_type == UE_ISOCHRONOUS) { + if (td->ep_type == UE_ISOCHRONOUS) { tx_p_size = td->max_packet_size; tx_np_size = 0; if (td->hcsplt != 0 && tx_p_size > HCSPLT_XACTLEN_BURST) @@ -658,7 +659,7 @@ dwc_otg_host_channel_alloc(struct dwc_ot sc->sc_active_rx_ep |= (1 << x); /* set channel */ - td->channel[which] = x; + td->channel = x; return (0); /* allocated */ } @@ -668,16 +669,16 @@ dwc_otg_host_channel_alloc(struct dwc_ot } static void -dwc_otg_host_channel_free(struct dwc_otg_softc *sc, struct dwc_otg_td *td, uint8_t which) +dwc_otg_host_channel_free(struct dwc_otg_softc *sc, struct dwc_otg_td *td) { uint8_t x; - if (td->channel[which] >= DWC_OTG_MAX_CHANNELS) + if (td->channel >= DWC_OTG_MAX_CHANNELS) return; /* already freed */ /* free channel */ - x = td->channel[which]; - td->channel[which] = DWC_OTG_MAX_CHANNELS; + x = td->channel; + td->channel = DWC_OTG_MAX_CHANNELS; DPRINTF("CH=%d\n", x); @@ -687,7 +688,7 @@ dwc_otg_host_channel_free(struct dwc_otg * after a fixed given amount of time the host channel is no * longer doing any USB traffic: */ - if (td->ep_type == UE_ISOCHRONOUS || td->ep_type == UE_INTERRUPT) { + if (td->ep_type == UE_ISOCHRONOUS) { /* double buffered */ sc->sc_chan_state[x].wait_sof = DWC_OTG_SLOT_IDLE_MAX; } else { @@ -707,6 +708,18 @@ dwc_otg_host_channel_free(struct dwc_otg sc->sc_active_rx_ep &= ~(1 << x); } +static void +dwc_otg_host_dump_rx(struct dwc_otg_softc *sc, struct dwc_otg_td *td) +{ + /* dump any pending messages */ + if (sc->sc_last_rx_status != 0) { + if (td->channel < DWC_OTG_MAX_CHANNELS && + td->channel == GRXSTSRD_CHNUM_GET(sc->sc_last_rx_status)) { + dwc_otg_common_rx_ack(sc); + } + } +} + static uint8_t dwc_otg_host_setup_tx(struct dwc_otg_softc *sc, struct dwc_otg_td *td) { @@ -715,13 +728,15 @@ dwc_otg_host_setup_tx(struct dwc_otg_sof uint32_t hcchar; uint8_t delta; - if (td->channel[0] < DWC_OTG_MAX_CHANNELS) { - hcint = sc->sc_chan_state[td->channel[0]].hcint; + dwc_otg_host_dump_rx(sc, td); + + if (td->channel < DWC_OTG_MAX_CHANNELS) { + hcint = sc->sc_chan_state[td->channel].hcint; DPRINTF("CH=%d ST=%d HCINT=0x%08x HCCHAR=0x%08x HCTSIZ=0x%08x\n", - td->channel[0], td->state, hcint, - DWC_OTG_READ_4(sc, DOTG_HCCHAR(td->channel[0])), - DWC_OTG_READ_4(sc, DOTG_HCTSIZ(td->channel[0]))); + td->channel, td->state, hcint, + DWC_OTG_READ_4(sc, DOTG_HCCHAR(td->channel)), + DWC_OTG_READ_4(sc, DOTG_HCTSIZ(td->channel))); } else { hcint = 0; goto check_state; @@ -731,12 +746,12 @@ dwc_otg_host_setup_tx(struct dwc_otg_sof HCINT_ACK | HCINT_NYET)) { /* give success bits priority over failure bits */ } else if (hcint & HCINT_STALL) { - DPRINTF("CH=%d STALL\n", td->channel[0]); + DPRINTF("CH=%d STALL\n", td->channel); td->error_stall = 1; td->error_any = 1; goto complete; } else if (hcint & HCINT_ERRORS) { - DPRINTF("CH=%d ERROR\n", td->channel[0]); + DPRINTF("CH=%d ERROR\n", td->channel); td->errcnt++; if (td->hcsplt != 0 || td->errcnt >= 3) { td->error_any = 1; @@ -804,7 +819,7 @@ check_state: send_pkt: /* free existing channel, if any */ - dwc_otg_host_channel_free(sc, td, 0); + dwc_otg_host_channel_free(sc, td); if (sizeof(req) != td->remainder) { td->error_any = 1; @@ -827,7 +842,7 @@ send_pkt: } /* allocate a new channel */ - if (dwc_otg_host_channel_alloc(sc, td, 0, 1)) { + if (dwc_otg_host_channel_alloc(sc, td, 1)) { td->state = DWC_CHAN_ST_START; goto busy; } @@ -841,23 +856,26 @@ send_pkt: usbd_copy_out(td->pc, 0, &req, sizeof(req)); - DWC_OTG_WRITE_4(sc, DOTG_HCTSIZ(td->channel[0]), + DWC_OTG_WRITE_4(sc, DOTG_HCTSIZ(td->channel), (sizeof(req) << HCTSIZ_XFERSIZE_SHIFT) | (1 << HCTSIZ_PKTCNT_SHIFT) | (HCTSIZ_PID_SETUP << HCTSIZ_PID_SHIFT)); - DWC_OTG_WRITE_4(sc, DOTG_HCSPLT(td->channel[0]), td->hcsplt); + DWC_OTG_WRITE_4(sc, DOTG_HCSPLT(td->channel), td->hcsplt); hcchar = td->hcchar; hcchar &= ~(HCCHAR_EPDIR_IN | HCCHAR_EPTYPE_MASK); hcchar |= UE_CONTROL << HCCHAR_EPTYPE_SHIFT; /* must enable channel before writing data to FIFO */ - DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel[0]), hcchar); + DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel), hcchar); /* transfer data into FIFO */ bus_space_write_region_4(sc->sc_io_tag, sc->sc_io_hdl, - DOTG_DFIFO(td->channel[0]), (uint32_t *)&req, sizeof(req) / 4); + DOTG_DFIFO(td->channel), (uint32_t *)&req, sizeof(req) / 4); + + /* wait until next slot before trying complete split */ + td->tt_complete_slot = sc->sc_last_frame_num + 1; /* store number of bytes transmitted */ td->tx_bytes = sizeof(req); @@ -865,7 +883,7 @@ send_pkt: send_cpkt: /* free existing channel, if any */ - dwc_otg_host_channel_free(sc, td, 0); + dwc_otg_host_channel_free(sc, td); delta = td->tt_complete_slot - sc->sc_last_frame_num - 1; if (td->tt_scheduled == 0 || delta < DWC_OTG_TT_SLOT_MAX) { @@ -880,34 +898,34 @@ send_cpkt: goto complete; } /* allocate a new channel */ - if (dwc_otg_host_channel_alloc(sc, td, 0, 0)) { + if (dwc_otg_host_channel_alloc(sc, td, 0)) { td->state = DWC_CHAN_ST_WAIT_C_PKT; goto busy; } - /* wait until next slot before trying again */ - td->tt_complete_slot++; + /* wait until next slot before trying complete split */ + td->tt_complete_slot = sc->sc_last_frame_num + 1; td->hcsplt |= HCSPLT_COMPSPLT; td->state = DWC_CHAN_ST_WAIT_C_ANE; - DWC_OTG_WRITE_4(sc, DOTG_HCTSIZ(td->channel[0]), + DWC_OTG_WRITE_4(sc, DOTG_HCTSIZ(td->channel), (HCTSIZ_PID_SETUP << HCTSIZ_PID_SHIFT)); - DWC_OTG_WRITE_4(sc, DOTG_HCSPLT(td->channel[0]), td->hcsplt); + DWC_OTG_WRITE_4(sc, DOTG_HCSPLT(td->channel), td->hcsplt); hcchar = td->hcchar; hcchar &= ~(HCCHAR_EPDIR_IN | HCCHAR_EPTYPE_MASK); hcchar |= UE_CONTROL << HCCHAR_EPTYPE_SHIFT; /* must enable channel before writing data to FIFO */ - DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel[0]), hcchar); + DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel), hcchar); busy: return (1); /* busy */ complete: - dwc_otg_host_channel_free(sc, td, 0); + dwc_otg_host_channel_free(sc, td); return (0); /* complete */ } @@ -1085,55 +1103,21 @@ busy: } static uint8_t -dwc_otg_host_data_rx(struct dwc_otg_softc *sc, struct dwc_otg_td *td) +dwc_otg_host_data_rx_sub(struct dwc_otg_softc *sc, struct dwc_otg_td *td) { - uint32_t hcint; - uint32_t hcchar; uint32_t count; - uint8_t delta; uint8_t channel; - channel = td->channel[td->tt_channel_tog]; - - if (channel < DWC_OTG_MAX_CHANNELS) { - hcint = sc->sc_chan_state[channel].hcint; - - DPRINTF("CH=%d ST=%d HCINT=0x%08x HCCHAR=0x%08x HCTSIZ=0x%08x\n", - channel, td->state, hcint, - DWC_OTG_READ_4(sc, DOTG_HCCHAR(channel)), - DWC_OTG_READ_4(sc, DOTG_HCTSIZ(channel))); - } else { - hcint = 0; - goto check_state; - } - - /* check interrupt bits */ - - if (hcint & (HCINT_RETRY | - HCINT_ACK | HCINT_NYET)) { - /* give success bits priority over failure bits */ - } else if (hcint & HCINT_STALL) { - DPRINTF("CH=%d STALL\n", channel); - td->error_stall = 1; - td->error_any = 1; - goto complete; - } else if (hcint & HCINT_ERRORS) { - DPRINTF("CH=%d ERROR\n", channel); - td->errcnt++; - if (td->hcsplt != 0 || td->errcnt >= 3) { - if (td->ep_type != UE_ISOCHRONOUS) { - td->error_any = 1; - goto complete; - } - } - } - /* check endpoint status */ if (sc->sc_last_rx_status == 0) - goto check_state; + goto busy; + + channel = td->channel; + if (channel >= DWC_OTG_MAX_CHANNELS) + goto busy; if (GRXSTSRD_CHNUM_GET(sc->sc_last_rx_status) != channel) - goto check_state; + goto busy; switch (sc->sc_last_rx_status & GRXSTSRD_PKTSTS_MASK) { case GRXSTSRH_IN_DATA: @@ -1141,7 +1125,7 @@ dwc_otg_host_data_rx(struct dwc_otg_soft DPRINTF("DATA ST=%d STATUS=0x%08x\n", (int)td->state, (int)sc->sc_last_rx_status); - if (hcint & HCINT_SOFTWARE_ONLY) { + if (sc->sc_chan_state[channel].hcint & HCINT_SOFTWARE_ONLY) { /* * When using SPLIT transactions on interrupt * endpoints, sometimes data occurs twice. @@ -1203,21 +1187,71 @@ dwc_otg_host_data_rx(struct dwc_otg_soft td->remainder -= count; td->offset += count; - hcint |= HCINT_SOFTWARE_ONLY; - sc->sc_chan_state[channel].hcint = hcint; + sc->sc_chan_state[channel].hcint |= HCINT_SOFTWARE_ONLY; break; - default: break; } /* release FIFO */ dwc_otg_common_rx_ack(sc); +busy: + return (0); +complete: + return (1); +} -check_state: - if (hcint & (HCINT_ERRORS | HCINT_RETRY | - HCINT_ACK | HCINT_NYET)) { - if (!(hcint & HCINT_ERRORS)) - td->errcnt = 0; +static uint8_t +dwc_otg_host_data_rx(struct dwc_otg_softc *sc, struct dwc_otg_td *td) +{ + uint32_t hcint; + uint32_t hcchar; + uint8_t delta; + uint8_t channel; + + channel = td->channel; + + if (channel < DWC_OTG_MAX_CHANNELS) { + hcint = sc->sc_chan_state[channel].hcint; + + DPRINTF("CH=%d ST=%d HCINT=0x%08x HCCHAR=0x%08x HCTSIZ=0x%08x\n", + channel, td->state, hcint, + DWC_OTG_READ_4(sc, DOTG_HCCHAR(channel)), + DWC_OTG_READ_4(sc, DOTG_HCTSIZ(channel))); + + /* check interrupt bits */ + if (hcint & (HCINT_RETRY | + HCINT_ACK | HCINT_NYET)) { + /* give success bits priority over failure bits */ + } else if (hcint & HCINT_STALL) { + DPRINTF("CH=%d STALL\n", channel); + td->error_stall = 1; + td->error_any = 1; + goto complete; + } else if (hcint & HCINT_ERRORS) { + DPRINTF("CH=%d ERROR\n", channel); + td->errcnt++; + if (td->hcsplt != 0 || td->errcnt >= 3) { + if (td->ep_type != UE_ISOCHRONOUS) { + td->error_any = 1; + goto complete; + } + } + } + + /* check channels for data, if any */ + if (dwc_otg_host_data_rx_sub(sc, td)) + goto complete; + + /* refresh interrupt status */ + hcint = sc->sc_chan_state[channel].hcint; + + if (hcint & (HCINT_ERRORS | HCINT_RETRY | + HCINT_ACK | HCINT_NYET)) { + if (!(hcint & HCINT_ERRORS)) + td->errcnt = 0; + } + } else { + hcint = 0; } switch (td->state) { @@ -1229,6 +1263,22 @@ check_state: case DWC_CHAN_ST_WAIT_ANE: if (hcint & (HCINT_RETRY | HCINT_ERRORS)) { + if (td->ep_type == UE_INTERRUPT) { + /* + * The USB specification does not + * mandate a particular data toggle + * value for USB INTERRUPT + * transfers. Switch the data toggle + * value to receive the packet + * correctly: + */ + if (hcint & HCINT_DATATGLERR) { + DPRINTF("Retrying packet due to " + "data toggle error\n"); + td->toggle ^= 1; + goto receive_pkt; + } + } td->did_nak++; td->tt_scheduled = 0; if (td->hcsplt != 0) @@ -1306,7 +1356,7 @@ check_state: receive_pkt: /* free existing channel, if any */ - dwc_otg_host_channel_free(sc, td, td->tt_channel_tog); + dwc_otg_host_channel_free(sc, td); if (td->hcsplt != 0) { delta = td->tt_complete_slot - sc->sc_last_frame_num - 1; @@ -1316,9 +1366,10 @@ receive_pkt: } delta = sc->sc_last_frame_num - td->tt_start_slot; if (delta > DWC_OTG_TT_SLOT_MAX) { - /* we missed the service interval */ - if (td->ep_type != UE_ISOCHRONOUS) + if (td->ep_type != UE_ISOCHRONOUS) { + /* we missed the service interval */ td->error_any = 1; + } goto complete; } /* complete split */ @@ -1330,12 +1381,12 @@ receive_pkt: } /* allocate a new channel */ - if (dwc_otg_host_channel_alloc(sc, td, td->tt_channel_tog, 0)) { + if (dwc_otg_host_channel_alloc(sc, td, 0)) { td->state = DWC_CHAN_ST_WAIT_C_PKT; goto busy; } - channel = td->channel[td->tt_channel_tog]; + channel = td->channel; /* set toggle, if any */ if (td->set_toggle) { @@ -1357,46 +1408,23 @@ receive_pkt: hcchar = td->hcchar; hcchar |= HCCHAR_EPDIR_IN; - /* check if other channel is allocated */ - if (td->channel[td->tt_channel_tog ^ 1] < DWC_OTG_MAX_CHANNELS) { - /* second - receive after next SOF event */ - if ((sc->sc_last_frame_num & 1) != 0) - hcchar |= HCCHAR_ODDFRM; - else - hcchar &= ~HCCHAR_ODDFRM; - - /* other channel is next */ - td->tt_channel_tog ^= 1; - td->tt_complete_slot++; + /* receive complete split ASAP */ + if ((sc->sc_last_frame_num & 1) != 0) + hcchar |= HCCHAR_ODDFRM; + else + hcchar &= ~HCCHAR_ODDFRM; - /* must enable channel before data can be received */ - DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(channel), hcchar); - } else { - /* first - receive after second next SOF event */ - if ((sc->sc_last_frame_num & 1) == 0) - hcchar |= HCCHAR_ODDFRM; - else - hcchar &= ~HCCHAR_ODDFRM; + /* must enable channel before data can be received */ + DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(channel), hcchar); - /* must enable channel before data can be received */ - DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(channel), hcchar); + /* wait until next slot before trying complete split */ + td->tt_complete_slot = sc->sc_last_frame_num + 1; - if (td->hcsplt != 0) { - if (td->ep_type == UE_ISOCHRONOUS || td->ep_type == UE_INTERRUPT) { - /* allocate a second channel */ - td->tt_channel_tog ^= 1; - goto receive_pkt; - } else { - td->tt_complete_slot++; - } - } - } goto busy; receive_spkt: /* free existing channel(s), if any */ - dwc_otg_host_channel_free(sc, td, 0); - dwc_otg_host_channel_free(sc, td, 1); + dwc_otg_host_channel_free(sc, td); delta = td->tt_start_slot - sc->sc_last_frame_num - 1; if (td->tt_scheduled == 0 || delta < DWC_OTG_TT_SLOT_MAX) { @@ -1412,19 +1440,16 @@ receive_spkt: } /* allocate a new channel */ - if (dwc_otg_host_channel_alloc(sc, td, 0, 0)) { + if (dwc_otg_host_channel_alloc(sc, td, 0)) { td->state = DWC_CHAN_ST_START; goto busy; } - channel = td->channel[0]; + channel = td->channel; td->hcsplt &= ~HCSPLT_COMPSPLT; td->state = DWC_CHAN_ST_WAIT_S_ANE; - /* reset channel toggle */ - td->tt_channel_tog = 0; - /* receive one packet */ DWC_OTG_WRITE_4(sc, DOTG_HCTSIZ(channel), (HCTSIZ_PID_DATA0 << HCTSIZ_PID_SHIFT)); @@ -1440,14 +1465,16 @@ receive_spkt: hcchar = td->hcchar; hcchar |= HCCHAR_EPDIR_IN; + /* wait until next slot before trying complete split */ + td->tt_complete_slot = sc->sc_last_frame_num + 1; + /* must enable channel before data can be received */ DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(channel), hcchar); busy: return (1); /* busy */ complete: - dwc_otg_host_channel_free(sc, td, 0); - dwc_otg_host_channel_free(sc, td, 1); + dwc_otg_host_channel_free(sc, td); return (0); /* complete */ } @@ -1569,7 +1596,9 @@ dwc_otg_host_data_tx(struct dwc_otg_soft uint8_t delta; uint8_t channel; - channel = td->channel[td->tt_channel_tog]; + dwc_otg_host_dump_rx(sc, td); + + channel = td->channel; if (channel < DWC_OTG_MAX_CHANNELS) { hcint = sc->sc_chan_state[channel].hcint; @@ -1578,36 +1607,34 @@ dwc_otg_host_data_tx(struct dwc_otg_soft channel, td->state, hcint, DWC_OTG_READ_4(sc, DOTG_HCCHAR(channel)), DWC_OTG_READ_4(sc, DOTG_HCTSIZ(channel))); - } else { - hcint = 0; - goto check_state; - } - if (hcint & (HCINT_RETRY | - HCINT_ACK | HCINT_NYET)) { - /* give success bits priority over failure bits */ - } else if (hcint & HCINT_STALL) { - DPRINTF("CH=%d STALL\n", channel); - td->error_stall = 1; - td->error_any = 1; - goto complete; - } else if (hcint & HCINT_ERRORS) { - DPRINTF("CH=%d ERROR\n", channel); - td->errcnt++; - if (td->hcsplt != 0 || td->errcnt >= 3) { + if (hcint & (HCINT_RETRY | + HCINT_ACK | HCINT_NYET)) { + /* give success bits priority over failure bits */ + } else if (hcint & HCINT_STALL) { + DPRINTF("CH=%d STALL\n", channel); + td->error_stall = 1; td->error_any = 1; goto complete; + } else if (hcint & HCINT_ERRORS) { + DPRINTF("CH=%d ERROR\n", channel); + td->errcnt++; + if (td->hcsplt != 0 || td->errcnt >= 3) { + td->error_any = 1; + goto complete; + } } - } - if (hcint & (HCINT_ERRORS | HCINT_RETRY | - HCINT_ACK | HCINT_NYET)) { + if (hcint & (HCINT_ERRORS | HCINT_RETRY | + HCINT_ACK | HCINT_NYET)) { - if (!(hcint & HCINT_ERRORS)) - td->errcnt = 0; + if (!(hcint & HCINT_ERRORS)) + td->errcnt = 0; + } + } else { + hcint = 0; } -check_state: switch (td->state) { case DWC_CHAN_ST_START: goto send_pkt; @@ -1694,16 +1721,16 @@ check_state: td->tt_xactpos++; /* free existing channel, if any */ - dwc_otg_host_channel_free(sc, td, td->tt_channel_tog); + dwc_otg_host_channel_free(sc, td); td->state = DWC_CHAN_ST_TX_PKT_ISOC; /* FALLTHROUGH */ case DWC_CHAN_ST_TX_PKT_ISOC: - if (dwc_otg_host_channel_alloc(sc, td, 0, 1)) + if (dwc_otg_host_channel_alloc(sc, td, 1)) break; - channel = td->channel[0]; + channel = td->channel; goto send_isoc_pkt; default: break; @@ -1712,8 +1739,7 @@ check_state: send_pkt: /* free existing channel(s), if any */ - dwc_otg_host_channel_free(sc, td, 0); - dwc_otg_host_channel_free(sc, td, 1); + dwc_otg_host_channel_free(sc, td); if (td->hcsplt != 0) { delta = td->tt_start_slot - sc->sc_last_frame_num - 1; @@ -1734,12 +1760,12 @@ send_pkt: } /* allocate a new channel */ - if (dwc_otg_host_channel_alloc(sc, td, 0, 1)) { + if (dwc_otg_host_channel_alloc(sc, td, 1)) { td->state = DWC_CHAN_ST_START; goto busy; } - channel = td->channel[0]; + channel = td->channel; /* set toggle, if any */ if (td->set_toggle) { @@ -1757,7 +1783,7 @@ send_isoc_pkt: count = td->remainder; if (count > HCSPLT_XACTLEN_BURST) { DPRINTF("TT overflow\n"); - td->error = 1; + td->error_any = 1; goto complete; } /* Update transaction position */ @@ -1883,7 +1909,7 @@ send_isoc_pkt: send_cpkt: /* free existing channel, if any */ - dwc_otg_host_channel_free(sc, td, td->tt_channel_tog); + dwc_otg_host_channel_free(sc, td); delta = td->tt_complete_slot - sc->sc_last_frame_num - 1; if (td->tt_scheduled == 0 || delta < DWC_OTG_TT_SLOT_MAX) { @@ -1899,12 +1925,12 @@ send_cpkt: } /* allocate a new channel */ - if (dwc_otg_host_channel_alloc(sc, td, td->tt_channel_tog, 0)) { + if (dwc_otg_host_channel_alloc(sc, td, 0)) { td->state = DWC_CHAN_ST_WAIT_C_PKT; goto busy; } - channel = td->channel[td->tt_channel_tog]; + channel = td->channel; td->hcsplt |= HCSPLT_COMPSPLT; td->state = DWC_CHAN_ST_WAIT_C_ANE; @@ -1917,48 +1943,22 @@ send_cpkt: hcchar = td->hcchar; hcchar &= ~HCCHAR_EPDIR_IN; - /* check if other channel is allocated */ - if (td->channel[td->tt_channel_tog ^ 1] < DWC_OTG_MAX_CHANNELS) { - /* second - receive after next SOF event */ - if ((sc->sc_last_frame_num & 1) != 0) - hcchar |= HCCHAR_ODDFRM; - else - hcchar &= ~HCCHAR_ODDFRM; - - /* other channel is next */ - td->tt_channel_tog ^= 1; - /* wait until next slot before trying again */ - td->tt_complete_slot++; - - /* must enable channel before data can be received */ - DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(channel), hcchar); - } else { - /* first - receive after second next SOF event */ - if ((sc->sc_last_frame_num & 1) == 0) - hcchar |= HCCHAR_ODDFRM; - else - hcchar &= ~HCCHAR_ODDFRM; + /* receive complete split ASAP */ + if ((sc->sc_last_frame_num & 1) != 0) + hcchar |= HCCHAR_ODDFRM; + else + hcchar &= ~HCCHAR_ODDFRM; - /* must enable channel before data can be received */ - DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(channel), hcchar); + /* must enable channel before data can be received */ + DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(channel), hcchar); - if (td->hcsplt != 0) { - if (td->ep_type == UE_ISOCHRONOUS || td->ep_type == UE_INTERRUPT) { - /* allocate a second channel */ - td->tt_channel_tog ^= 1; - goto send_cpkt; - } else { - /* wait until next slot before trying again */ - td->tt_complete_slot++; - } - } - } + /* wait until next slot before trying complete split */ + td->tt_complete_slot = sc->sc_last_frame_num + 1; busy: return (1); /* busy */ complete: - dwc_otg_host_channel_free(sc, td, 0); - dwc_otg_host_channel_free(sc, td, 1); + dwc_otg_host_channel_free(sc, td); return (0); /* complete */ } @@ -2348,6 +2348,14 @@ dwc_otg_host_channel_disable(struct dwc_ sc->sc_chan_state[x].tx_np_size = 0; } +static uint16_t +dwc_otg_compute_isoc_rx_tt_slot(struct dwc_otg_tt_info *pinfo) +{ + if (pinfo->slot_index < DWC_OTG_TT_SLOT_MAX) + pinfo->slot_index++; + return (pinfo->slot_index); +} + static uint8_t dwc_otg_update_host_transfer_schedule_locked(struct dwc_otg_softc *sc) { @@ -2356,6 +2364,7 @@ dwc_otg_update_host_transfer_schedule_lo struct usb_xfer *xfer_next; struct dwc_otg_td *td; uint16_t temp; + uint16_t slot; uint8_t x; temp = DWC_OTG_READ_4(sc, DOTG_HFNUM) & DWC_OTG_FRAME_MASK; @@ -2377,11 +2386,53 @@ dwc_otg_update_host_transfer_schedule_lo } if ((temp & 7) == 0) { + + /* reset the schedule */ + memset(sc->sc_tt_info, 0, sizeof(sc->sc_tt_info)); + TAILQ_FOREACH_SAFE(xfer, &sc->sc_bus.intr_q.head, wait_entry, xfer_next) { td = xfer->td_transfer_cache; if (td == NULL || td->ep_type != UE_ISOCHRONOUS) continue; + /* check for IN direction */ + if ((td->hcchar & HCCHAR_EPDIR_IN) != 0) + continue; + + /* execute more frames */ + td->tmr_val = 0; + + sc->sc_needsof = 1; + + if (td->hcsplt == 0 || td->tt_scheduled != 0) + continue; + + /* compute slot */ + slot = dwc_otg_compute_isoc_rx_tt_slot( + sc->sc_tt_info + td->tt_index); + if (slot > 3) { + /* + * Not enough time to get complete + * split executed. + */ + continue; + } + /* Delayed start */ + td->tt_start_slot = temp + slot; + td->tt_scheduled = 1; + TAILQ_REMOVE(&sc->sc_bus.intr_q.head, xfer, wait_entry); + TAILQ_INSERT_TAIL(&head, xfer, wait_entry); + } + + TAILQ_FOREACH_SAFE(xfer, &sc->sc_bus.intr_q.head, wait_entry, xfer_next) { + td = xfer->td_transfer_cache; + if (td == NULL || td->ep_type != UE_ISOCHRONOUS) + continue; + + /* check for OUT direction */ + if ((td->hcchar & HCCHAR_EPDIR_IN) == 0) + continue; + /* execute more frames */ td->tmr_val = 0; @@ -2391,8 +2442,7 @@ dwc_otg_update_host_transfer_schedule_lo continue; /* Start ASAP */ - td->tt_start_slot = temp + 0; - td->tt_complete_slot = temp + 2; + td->tt_start_slot = temp; td->tt_scheduled = 1; TAILQ_REMOVE(&sc->sc_bus.intr_q.head, xfer, wait_entry); TAILQ_INSERT_TAIL(&head, xfer, wait_entry); @@ -2418,8 +2468,7 @@ dwc_otg_update_host_transfer_schedule_lo } /* start ASAP */ - td->tt_start_slot = temp + 0; - td->tt_complete_slot = temp + 2; + td->tt_start_slot = temp; sc->sc_needsof = 1; td->tt_scheduled = 1; TAILQ_REMOVE(&sc->sc_bus.intr_q.head, xfer, wait_entry); @@ -2440,8 +2489,7 @@ dwc_otg_update_host_transfer_schedule_lo continue; /* start ASAP */ - td->tt_start_slot = temp + 0; - td->tt_complete_slot = temp + 1; + td->tt_start_slot = temp; td->tt_scheduled = 1; TAILQ_REMOVE(&sc->sc_bus.intr_q.head, xfer, wait_entry); TAILQ_INSERT_TAIL(&head, xfer, wait_entry); @@ -2462,8 +2510,7 @@ dwc_otg_update_host_transfer_schedule_lo continue; /* start ASAP */ - td->tt_start_slot = temp + 0; - td->tt_complete_slot = temp + 1; + td->tt_start_slot = temp; td->tt_scheduled = 1; TAILQ_REMOVE(&sc->sc_bus.intr_q.head, xfer, wait_entry); TAILQ_INSERT_TAIL(&head, xfer, wait_entry); @@ -2739,8 +2786,6 @@ dwc_otg_interrupt(void *arg) /* Disable SOF interrupt */ sc->sc_irq_mask &= ~GINTMSK_SOFMSK; - /* Enable RX frame interrupt */ - sc->sc_irq_mask |= GINTMSK_RXFLVLMSK; DWC_OTG_WRITE_4(sc, DOTG_GINTMSK, sc->sc_irq_mask); /* complete root HUB interrupt endpoint */ @@ -2781,7 +2826,7 @@ dwc_otg_interrupt(void *arg) * suspend and RX frame interrupt: */ sc->sc_irq_mask &= ~(GINTMSK_WKUPINTMSK | GINTMSK_SOFMSK); - sc->sc_irq_mask |= (GINTMSK_USBSUSPMSK | GINTMSK_RXFLVLMSK); + sc->sc_irq_mask |= GINTMSK_USBSUSPMSK; DWC_OTG_WRITE_4(sc, DOTG_GINTMSK, sc->sc_irq_mask); /* complete root HUB interrupt endpoint */ @@ -2852,10 +2897,6 @@ dwc_otg_interrupt(void *arg) /* complete root HUB interrupt endpoint */ dwc_otg_root_intr(sc); - /* disable RX FIFO level interrupt */ - sc->sc_irq_mask &= ~GINTMSK_RXFLVLMSK; - DWC_OTG_WRITE_4(sc, DOTG_GINTMSK, sc->sc_irq_mask); - /* update host frame interval */ dwc_otg_update_host_frame_interval(sc); } @@ -2935,12 +2976,10 @@ dwc_otg_setup_standard_chain_sub(struct td->set_toggle = 0; td->got_short = 0; td->did_nak = 0; - td->channel[0] = DWC_OTG_MAX_CHANNELS; - td->channel[1] = DWC_OTG_MAX_CHANNELS; + td->channel = DWC_OTG_MAX_CHANNELS; td->state = 0; td->errcnt = 0; td->tt_scheduled = 0; - td->tt_channel_tog = 0; td->tt_xactpos = HCSPLT_XACTPOS_BEGIN; } @@ -3156,9 +3195,21 @@ dwc_otg_setup_standard_chain(struct usb_ (xfer->max_packet_size << HCCHAR_MPS_SHIFT) | HCCHAR_CHENA; - /* XXX stability hack - possible HW issue */ - if (td->ep_type == UE_CONTROL) - hcchar |= (UE_BULK << HCCHAR_EPTYPE_SHIFT); + /* + * We are not always able to meet the timing + * requirements of the USB interrupt endpoint's + * complete split token, when doing transfers going + * via a transaction translator. Use the CONTROL + * transfer type instead of the INTERRUPT transfer + * type in general, as a means to workaround + * that. This trick should work for both FULL and LOW + * speed USB traffic going through a TT. For non-TT + * traffic it works aswell. The reason for using + * CONTROL type instead of BULK is that some TTs might + * reject LOW speed BULK traffic. + */ + if (td->ep_type == UE_INTERRUPT) + hcchar |= (UE_CONTROL << HCCHAR_EPTYPE_SHIFT); else hcchar |= (td->ep_type << HCCHAR_EPTYPE_SHIFT); @@ -3199,13 +3250,12 @@ dwc_otg_setup_standard_chain(struct usb_ break; case USB_SPEED_HIGH: hcsplt = 0; - if (td->ep_type == UE_ISOCHRONOUS || - td->ep_type == UE_INTERRUPT) { - hcchar |= ((xfer->max_packet_count & 3) - << HCCHAR_MC_SHIFT); - } if (td->ep_type == UE_INTERRUPT) { uint32_t ival; +#if 0 + hcchar |= ((xfer->max_packet_count & 3) + << HCCHAR_MC_SHIFT); +#endif ival = xfer->interval / DWC_OTG_HOST_TIMER_RATE; if (ival == 0) ival = 1; @@ -3214,6 +3264,8 @@ dwc_otg_setup_standard_chain(struct usb_ td->tmr_val = sc->sc_tmr_val + ival; td->tmr_res = ival; } else if (td->ep_type == UE_ISOCHRONOUS) { + hcchar |= ((xfer->max_packet_count & 3) + << HCCHAR_MC_SHIFT); td->tmr_val = 0; td->tmr_res = 1 << usbd_xfer_get_fps_shift(xfer); } else { @@ -3458,12 +3510,9 @@ dwc_otg_device_done(struct usb_xfer *xfe } else { struct dwc_otg_td *td; - td = xfer->td_transfer_first; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sun Jun 8 21:21:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 73026EA0; Sun, 8 Jun 2014 21:21:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DF5C2A47; Sun, 8 Jun 2014 21:21:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s58LLuAa048991; Sun, 8 Jun 2014 21:21:56 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s58LLtIX048976; Sun, 8 Jun 2014 21:21:55 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201406082121.s58LLtIX048976@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 8 Jun 2014 21:21:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267243 - in stable/9: . etc/etc.amd64 etc/etc.i386 include lib/libc/gen libexec/getty X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jun 2014 21:21:56 -0000 Author: nwhitehorn Date: Sun Jun 8 21:21:54 2014 New Revision: 267243 URL: http://svnweb.freebsd.org/changeset/base/267243 Log: MFC r260913,266895: Add a new flag to /etc/ttys: onifconsole. This is equivalent to "on" if the device is an active kernel console and "off" otherwise. This is designed to allow serial-booting x86 systems to provide a login prompt on the serial line by default without providing one on all systems by default. Set this flag on x86 systems for ttyu0. Comments and suggestions by: grehan, dteske, jilles Approved by: re (gjb) Relnotes: yes Modified: stable/9/UPDATING stable/9/etc/etc.amd64/ttys stable/9/etc/etc.i386/ttys stable/9/include/ttyent.h stable/9/lib/libc/gen/getttyent.c stable/9/libexec/getty/ttys.5 Directory Properties: stable/9/ (props changed) stable/9/etc/ (props changed) stable/9/include/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libc/ (props changed) stable/9/libexec/getty/ (props changed) Modified: stable/9/UPDATING ============================================================================== --- stable/9/UPDATING Sun Jun 8 20:39:39 2014 (r267242) +++ stable/9/UPDATING Sun Jun 8 21:21:54 2014 (r267243) @@ -11,6 +11,13 @@ handbook: Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. +20140608: + On i386 and amd64 systems, the onifconsole flag is now set by default + in /etc/ttys for ttyu0. This causes ttyu0 to be automatically enabled + as a login TTY if it is set in the bootloader as an active kernel + console. No changes in behavior should result otherwise. To revert to + the previous behavior, set ttyu0 to "off" in /etc/ttys. + 20140512: Clang and llvm have been upgraded to 3.4.1 release. Modified: stable/9/etc/etc.amd64/ttys ============================================================================== --- stable/9/etc/etc.amd64/ttys Sun Jun 8 20:39:39 2014 (r267242) +++ stable/9/etc/etc.amd64/ttys Sun Jun 8 21:21:54 2014 (r267243) @@ -41,7 +41,7 @@ ttyv7 "/usr/libexec/getty Pc" xterm on ttyv8 "/usr/local/bin/xdm -nodaemon" xterm off secure # Serial terminals # The 'dialup' keyword identifies dialin lines to login, fingerd etc. -ttyu0 "/usr/libexec/getty std.9600" dialup off secure +ttyu0 "/usr/libexec/getty std.9600" vt100 onifconsole secure ttyu1 "/usr/libexec/getty std.9600" dialup off secure ttyu2 "/usr/libexec/getty std.9600" dialup off secure ttyu3 "/usr/libexec/getty std.9600" dialup off secure Modified: stable/9/etc/etc.i386/ttys ============================================================================== --- stable/9/etc/etc.i386/ttys Sun Jun 8 20:39:39 2014 (r267242) +++ stable/9/etc/etc.i386/ttys Sun Jun 8 21:21:54 2014 (r267243) @@ -41,7 +41,7 @@ ttyv7 "/usr/libexec/getty Pc" xterm on ttyv8 "/usr/local/bin/xdm -nodaemon" xterm off secure # Serial terminals # The 'dialup' keyword identifies dialin lines to login, fingerd etc. -ttyu0 "/usr/libexec/getty std.9600" dialup off secure +ttyu0 "/usr/libexec/getty std.9600" vt100 onifconsole secure ttyu1 "/usr/libexec/getty std.9600" dialup off secure ttyu2 "/usr/libexec/getty std.9600" dialup off secure ttyu3 "/usr/libexec/getty std.9600" dialup off secure Modified: stable/9/include/ttyent.h ============================================================================== --- stable/9/include/ttyent.h Sun Jun 8 20:39:39 2014 (r267242) +++ stable/9/include/ttyent.h Sun Jun 8 21:21:54 2014 (r267243) @@ -37,6 +37,7 @@ #define _TTYS_OFF "off" #define _TTYS_ON "on" +#define _TTYS_ONIFCONSOLE "onifconsole" #define _TTYS_SECURE "secure" #define _TTYS_INSECURE "insecure" #define _TTYS_WINDOW "window" Modified: stable/9/lib/libc/gen/getttyent.c ============================================================================== --- stable/9/lib/libc/gen/getttyent.c Sun Jun 8 20:39:39 2014 (r267242) +++ stable/9/lib/libc/gen/getttyent.c Sun Jun 8 21:21:54 2014 (r267243) @@ -39,6 +39,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include + static char zapchar; static FILE *tf; static size_t lbsize; @@ -64,6 +67,36 @@ getttynam(const char *tty) return (t); } +static int +auto_tty_status(const char *ty_name) +{ + size_t len; + char *buf, *cons, *nextcons; + + /* Check if this is an enabled kernel console line */ + buf = NULL; + if (sysctlbyname("kern.console", NULL, &len, NULL, 0) == -1) + return (0); /* Errors mean don't enable */ + buf = malloc(len); + if (sysctlbyname("kern.console", buf, &len, NULL, 0) == -1) + goto done; + + if ((cons = strchr(buf, '/')) == NULL) + goto done; + *cons = '\0'; + nextcons = buf; + while ((cons = strsep(&nextcons, ",")) != NULL && strlen(cons) != 0) { + if (strcmp(cons, ty_name) == 0) { + free(buf); + return (TTY_ON); + } + } + +done: + free(buf); + return (0); +} + struct ttyent * getttyent(void) { @@ -126,6 +159,8 @@ getttyent(void) tty.ty_status &= ~TTY_ON; else if (scmp(_TTYS_ON)) tty.ty_status |= TTY_ON; + else if (scmp(_TTYS_ONIFCONSOLE)) + tty.ty_status |= auto_tty_status(tty.ty_name); else if (scmp(_TTYS_SECURE)) tty.ty_status |= TTY_SECURE; else if (scmp(_TTYS_INSECURE)) Modified: stable/9/libexec/getty/ttys.5 ============================================================================== --- stable/9/libexec/getty/ttys.5 Sun Jun 8 20:39:39 2014 (r267242) +++ stable/9/libexec/getty/ttys.5 Sun Jun 8 21:21:54 2014 (r267243) @@ -102,8 +102,11 @@ ttys as a group. .Pp As flag values, the strings ``on'' and ``off'' specify that .Xr init 8 -should (should not) execute the command given in the second field, -while ``secure'' (if ``on'' is also specified) allows users with a +should (should not) execute the command given in the second field. +``onifconsole'' will cause this line to be enabled if and only if it is +an active kernel console device (it is equivalent to ``on'' in this +case). +The flag ``secure'' (if the console is enabled) allows users with a uid of 0 to login on this line. The flag ``dialin'' indicates that a tty entry describes a dialin From owner-svn-src-stable@FreeBSD.ORG Sun Jun 8 23:22:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E536963F; Sun, 8 Jun 2014 23:22:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D265622DB; Sun, 8 Jun 2014 23:22:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s58NMPhg018318; Sun, 8 Jun 2014 23:22:25 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s58NMPOd018317; Sun, 8 Jun 2014 23:22:25 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201406082322.s58NMPOd018317@svn.freebsd.org> From: Navdeep Parhar Date: Sun, 8 Jun 2014 23:22:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267244 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jun 2014 23:22:26 -0000 Author: np Date: Sun Jun 8 23:22:25 2014 New Revision: 267244 URL: http://svnweb.freebsd.org/changeset/base/267244 Log: MFC r267082: cxgbe(4): Properly account for the freelist buffers used when returning early from service_iq due to a budget restriction. This fixes a potential rx hang when using INTx. Modified: stable/10/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_sge.c Sun Jun 8 21:21:54 2014 (r267243) +++ stable/10/sys/dev/cxgbe/t4_sge.c Sun Jun 8 23:22:25 2014 (r267244) @@ -1361,8 +1361,15 @@ service_iq(struct sge_iq *iq, int budget } #endif - if (budget) + if (budget) { + if (fl_bufs_used) { + FL_LOCK(fl); + fl->needed += fl_bufs_used; + refill_fl(sc, fl, 32); + FL_UNLOCK(fl); + } return (EINPROGRESS); + } } } From owner-svn-src-stable@FreeBSD.ORG Mon Jun 9 01:24:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89CC6AEA; Mon, 9 Jun 2014 01:24:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 770E92AFE; Mon, 9 Jun 2014 01:24:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s591OsTA078652; Mon, 9 Jun 2014 01:24:54 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s591Ospj078651; Mon, 9 Jun 2014 01:24:54 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406090124.s591Ospj078651@svn.freebsd.org> From: Glen Barber Date: Mon, 9 Jun 2014 01:24:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267246 - stable/10/share/man/man7 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 01:24:54 -0000 Author: gjb Date: Mon Jun 9 01:24:53 2014 New Revision: 267246 URL: http://svnweb.freebsd.org/changeset/base/267246 Log: MFC r267160: Dereference portaudit(1), as it is now deprecated and its functionality exists in pkg-audit(8). Sponsored by: The FreeBSD Foundation Modified: stable/10/share/man/man7/ports.7 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man7/ports.7 ============================================================================== --- stable/10/share/man/man7/ports.7 Mon Jun 9 00:15:16 2014 (r267245) +++ stable/10/share/man/man7/ports.7 Mon Jun 9 01:24:53 2014 (r267246) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 18, 2012 +.Dd June 6, 2014 .Dt PORTS 7 .Os .Sh NAME @@ -458,7 +458,7 @@ If defined, only operate on a port if it If defined, only operate on a port if it can be installed 100% automatically. .It Va DISABLE_VULNERABILITIES If defined, disable check for security vulnerabilities using -.Xr portaudit 1 Pq Pa ports/ports-mgmt/portaudit +.Xr pkg-audit 8 when installing new ports. .It Va NO_IGNORE If defined, allow installation of ports marked as @@ -500,7 +500,7 @@ The big Kahuna. .Pp The following are part of the ports collection: .Pp -.Xr portaudit 1 , +.Xr pkg 7 , .Xr portlint 1 .Rs .%B "The FreeBSD Handbook" From owner-svn-src-stable@FreeBSD.ORG Mon Jun 9 01:39:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 585B8CB6; Mon, 9 Jun 2014 01:39:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 45FE42BB2; Mon, 9 Jun 2014 01:39:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s591dmpe083744; Mon, 9 Jun 2014 01:39:48 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s591dmL1083743; Mon, 9 Jun 2014 01:39:48 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201406090139.s591dmL1083743@svn.freebsd.org> From: Navdeep Parhar Date: Mon, 9 Jun 2014 01:39:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267247 - stable/9/sys/dev/cxgbe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 01:39:48 -0000 Author: np Date: Mon Jun 9 01:39:47 2014 New Revision: 267247 URL: http://svnweb.freebsd.org/changeset/base/267247 Log: MFC r267082: cxgbe(4): Properly account for the freelist buffers used when returning early from service_iq due to a budget restriction. This fixes a potential rx hang when using INTx. Approved by: re@ (gjb) Modified: stable/9/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_sge.c Mon Jun 9 01:24:53 2014 (r267246) +++ stable/9/sys/dev/cxgbe/t4_sge.c Mon Jun 9 01:39:47 2014 (r267247) @@ -1334,8 +1334,15 @@ service_iq(struct sge_iq *iq, int budget V_SEINTARM(V_QINTR_TIMER_IDX(X_TIMERREG_UPDATE_CIDX))); ndescs = 0; - if (budget) + if (budget) { + if (fl_bufs_used) { + FL_LOCK(fl); + fl->needed += fl_bufs_used; + refill_fl(sc, fl, 32); + FL_UNLOCK(fl); + } return (EINPROGRESS); + } } } From owner-svn-src-stable@FreeBSD.ORG Mon Jun 9 02:26:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78795641; Mon, 9 Jun 2014 02:26:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 658DC2EF1; Mon, 9 Jun 2014 02:26:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s592Qg5S006128; Mon, 9 Jun 2014 02:26:42 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s592Qgju006127; Mon, 9 Jun 2014 02:26:42 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406090226.s592Qgju006127@svn.freebsd.org> From: Glen Barber Date: Mon, 9 Jun 2014 02:26:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267249 - stable/9/share/man/man7 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 02:26:42 -0000 Author: gjb Date: Mon Jun 9 02:26:41 2014 New Revision: 267249 URL: http://svnweb.freebsd.org/changeset/base/267249 Log: MFC r267160: Dereference portaudit(1), as it is now deprecated and its functionality exists in pkg-audit(8). Approved by: re (kib) Sponsored by: The FreeBSD Foundation Modified: stable/9/share/man/man7/ports.7 Directory Properties: stable/9/share/man/man7/ (props changed) Modified: stable/9/share/man/man7/ports.7 ============================================================================== --- stable/9/share/man/man7/ports.7 Mon Jun 9 01:54:00 2014 (r267248) +++ stable/9/share/man/man7/ports.7 Mon Jun 9 02:26:41 2014 (r267249) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 18, 2012 +.Dd June 6, 2014 .Dt PORTS 7 .Os .Sh NAME @@ -458,7 +458,7 @@ If defined, only operate on a port if it If defined, only operate on a port if it can be installed 100% automatically. .It Va DISABLE_VULNERABILITIES If defined, disable check for security vulnerabilities using -.Xr portaudit 1 Pq Pa ports/ports-mgmt/portaudit +.Xr pkg-audit 8 when installing new ports. .It Va NO_IGNORE If defined, allow installation of ports marked as @@ -500,7 +500,7 @@ The big Kahuna. .Pp The following are part of the ports collection: .Pp -.Xr portaudit 1 , +.Xr pkg 7 , .Xr portlint 1 .Rs .%B "The FreeBSD Handbook" From owner-svn-src-stable@FreeBSD.ORG Mon Jun 9 02:30:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B81037AE; Mon, 9 Jun 2014 02:30:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A56AF2F0C; Mon, 9 Jun 2014 02:30:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s592UvTG009435; Mon, 9 Jun 2014 02:30:57 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s592Uv52009434; Mon, 9 Jun 2014 02:30:57 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406090230.s592Uv52009434@svn.freebsd.org> From: Glen Barber Date: Mon, 9 Jun 2014 02:30:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267250 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 02:30:57 -0000 Author: gjb Date: Mon Jun 9 02:30:57 2014 New Revision: 267250 URL: http://svnweb.freebsd.org/changeset/base/267250 Log: Document r267236, ttys 'onifconsole' Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jun 9 02:26:41 2014 (r267249) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jun 9 02:30:57 2014 (r267250) @@ -246,6 +246,12 @@ /usr/local/etc/newsyslog.conf.d/ directories by default for &man.newsyslog.8;. + A new flag, onifconsole has + been added to /etc/ttys. This allows the + system to provide a login prompt via serial console if the + device is an active kernel console, otherwise it is equivalent + to off. + <filename>/etc/rc.d</filename> Scripts From owner-svn-src-stable@FreeBSD.ORG Mon Jun 9 02:33:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B32E18F9; Mon, 9 Jun 2014 02:33:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A01702F8C; Mon, 9 Jun 2014 02:33:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s592XdRH010259; Mon, 9 Jun 2014 02:33:39 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s592XdRW010258; Mon, 9 Jun 2014 02:33:39 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406090233.s592XdRW010258@svn.freebsd.org> From: Glen Barber Date: Mon, 9 Jun 2014 02:33:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267251 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 02:33:39 -0000 Author: gjb Date: Mon Jun 9 02:33:39 2014 New Revision: 267251 URL: http://svnweb.freebsd.org/changeset/base/267251 Log: Document r267243, ttys 'onifconsole' Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jun 9 02:30:57 2014 (r267250) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jun 9 02:33:39 2014 (r267251) @@ -661,6 +661,12 @@ /usr/local/etc/newsyslog.conf.d/ directories by default for &man.newsyslog.8;. + A new flag, onifconsole + has been added to /etc/ttys. This allows + the system to provide a login prompt via serial console if the + device is an active kernel console, otherwise it is equivalent + to off. + &man.periodic.8; Scripts From owner-svn-src-stable@FreeBSD.ORG Mon Jun 9 05:56:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CAFBA952; Mon, 9 Jun 2014 05:56:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7BEB2E55; Mon, 9 Jun 2014 05:56:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s595uIix004361; Mon, 9 Jun 2014 05:56:18 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s595uINw004360; Mon, 9 Jun 2014 05:56:18 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201406090556.s595uINw004360@svn.freebsd.org> From: Christian Brueffer Date: Mon, 9 Jun 2014 05:56:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267257 - stable/10/release/doc/en_US.ISO8859-1/hardware X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 05:56:18 -0000 Author: brueffer Date: Mon Jun 9 05:56:18 2014 New Revision: 267257 URL: http://svnweb.freebsd.org/changeset/base/267257 Log: MFC: r267184 Add vte(4) to the hardware notes. Modified: stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Directory Properties: stable/10/ (props changed) Modified: stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Mon Jun 9 05:50:57 2014 (r267256) +++ stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Mon Jun 9 05:56:18 2014 (r267257) @@ -946,6 +946,8 @@ &hwlist.vr; + &hwlist.vte; + &hwlist.vx; &hwlist.vxge; From owner-svn-src-stable@FreeBSD.ORG Mon Jun 9 06:00:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 311ABAC5; Mon, 9 Jun 2014 06:00:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19DDA2E7A; Mon, 9 Jun 2014 06:00:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5960ebg005252; Mon, 9 Jun 2014 06:00:40 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5960SRn005175; Mon, 9 Jun 2014 06:00:28 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201406090600.s5960SRn005175@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 9 Jun 2014 06:00:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267258 - in stable/10: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto/bn crypto/openssl/crypto/cms ... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 06:00:40 -0000 Author: jkim Date: Mon Jun 9 06:00:28 2014 New Revision: 267258 URL: http://svnweb.freebsd.org/changeset/base/267258 Log: MFC: r267256 Merge OpenSSL 1.0.1h. Approved by: so (delphij) Added: stable/10/crypto/openssl/ssl/heartbeat_test.c - copied unchanged from r267256, head/crypto/openssl/ssl/heartbeat_test.c Modified: stable/10/crypto/openssl/ACKNOWLEDGMENTS stable/10/crypto/openssl/CHANGES stable/10/crypto/openssl/Makefile stable/10/crypto/openssl/NEWS stable/10/crypto/openssl/README stable/10/crypto/openssl/apps/enc.c stable/10/crypto/openssl/apps/ocsp.c stable/10/crypto/openssl/apps/req.c stable/10/crypto/openssl/apps/s_cb.c stable/10/crypto/openssl/apps/s_socket.c stable/10/crypto/openssl/apps/smime.c stable/10/crypto/openssl/crypto/asn1/a_strnid.c stable/10/crypto/openssl/crypto/bio/bss_dgram.c stable/10/crypto/openssl/crypto/bn/bn_mont.c stable/10/crypto/openssl/crypto/cms/cms_env.c stable/10/crypto/openssl/crypto/cms/cms_sd.c stable/10/crypto/openssl/crypto/cms/cms_smime.c stable/10/crypto/openssl/crypto/dso/dso_dlfcn.c stable/10/crypto/openssl/crypto/ec/ec_ameth.c stable/10/crypto/openssl/crypto/ec/ec_asn1.c stable/10/crypto/openssl/crypto/ec/ec_lcl.h stable/10/crypto/openssl/crypto/evp/bio_b64.c stable/10/crypto/openssl/crypto/evp/encode.c stable/10/crypto/openssl/crypto/opensslv.h stable/10/crypto/openssl/crypto/pkcs12/p12_crt.c stable/10/crypto/openssl/crypto/pkcs12/p12_kiss.c stable/10/crypto/openssl/crypto/pkcs7/pk7_doit.c stable/10/crypto/openssl/crypto/pkcs7/pkcs7.h stable/10/crypto/openssl/crypto/pkcs7/pkcs7err.c stable/10/crypto/openssl/crypto/rsa/rsa_ameth.c stable/10/crypto/openssl/crypto/srp/srp_vfy.c stable/10/crypto/openssl/crypto/ts/ts_rsp_verify.c stable/10/crypto/openssl/crypto/x509v3/v3_purp.c stable/10/crypto/openssl/doc/apps/cms.pod stable/10/crypto/openssl/doc/apps/enc.pod stable/10/crypto/openssl/doc/apps/s_server.pod stable/10/crypto/openssl/doc/apps/smime.pod stable/10/crypto/openssl/doc/apps/verify.pod stable/10/crypto/openssl/doc/apps/version.pod stable/10/crypto/openssl/doc/apps/x509v3_config.pod stable/10/crypto/openssl/doc/crypto/CMS_decrypt.pod stable/10/crypto/openssl/doc/crypto/CONF_modules_free.pod stable/10/crypto/openssl/doc/crypto/CONF_modules_load_file.pod stable/10/crypto/openssl/doc/crypto/OPENSSL_config.pod stable/10/crypto/openssl/doc/crypto/X509_NAME_ENTRY_get_object.pod stable/10/crypto/openssl/doc/crypto/X509_STORE_CTX_get_ex_new_index.pod stable/10/crypto/openssl/doc/fingerprints.txt stable/10/crypto/openssl/doc/ssl/SSL_CTX_set_msg_callback.pod stable/10/crypto/openssl/doc/ssl/SSL_CTX_set_options.pod stable/10/crypto/openssl/doc/ssl/SSL_get_peer_cert_chain.pod stable/10/crypto/openssl/engines/ccgost/gost_ameth.c stable/10/crypto/openssl/ssl/Makefile stable/10/crypto/openssl/ssl/d1_both.c stable/10/crypto/openssl/ssl/d1_lib.c stable/10/crypto/openssl/ssl/d1_pkt.c stable/10/crypto/openssl/ssl/d1_srvr.c stable/10/crypto/openssl/ssl/s3_pkt.c stable/10/crypto/openssl/ssl/s3_srvr.c stable/10/crypto/openssl/ssl/ssl.h stable/10/crypto/openssl/ssl/ssl3.h stable/10/crypto/openssl/ssl/ssl_asn1.c stable/10/crypto/openssl/ssl/ssl_err.c stable/10/crypto/openssl/ssl/ssl_lib.c stable/10/crypto/openssl/ssl/t1_enc.c stable/10/crypto/openssl/ssl/t1_lib.c stable/10/secure/lib/libcrypto/Makefile.inc stable/10/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 stable/10/secure/lib/libcrypto/man/ASN1_STRING_length.3 stable/10/secure/lib/libcrypto/man/ASN1_STRING_new.3 stable/10/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 stable/10/secure/lib/libcrypto/man/ASN1_generate_nconf.3 stable/10/secure/lib/libcrypto/man/BIO_ctrl.3 stable/10/secure/lib/libcrypto/man/BIO_f_base64.3 stable/10/secure/lib/libcrypto/man/BIO_f_buffer.3 stable/10/secure/lib/libcrypto/man/BIO_f_cipher.3 stable/10/secure/lib/libcrypto/man/BIO_f_md.3 stable/10/secure/lib/libcrypto/man/BIO_f_null.3 stable/10/secure/lib/libcrypto/man/BIO_f_ssl.3 stable/10/secure/lib/libcrypto/man/BIO_find_type.3 stable/10/secure/lib/libcrypto/man/BIO_new.3 stable/10/secure/lib/libcrypto/man/BIO_new_CMS.3 stable/10/secure/lib/libcrypto/man/BIO_push.3 stable/10/secure/lib/libcrypto/man/BIO_read.3 stable/10/secure/lib/libcrypto/man/BIO_s_accept.3 stable/10/secure/lib/libcrypto/man/BIO_s_bio.3 stable/10/secure/lib/libcrypto/man/BIO_s_connect.3 stable/10/secure/lib/libcrypto/man/BIO_s_fd.3 stable/10/secure/lib/libcrypto/man/BIO_s_file.3 stable/10/secure/lib/libcrypto/man/BIO_s_mem.3 stable/10/secure/lib/libcrypto/man/BIO_s_null.3 stable/10/secure/lib/libcrypto/man/BIO_s_socket.3 stable/10/secure/lib/libcrypto/man/BIO_set_callback.3 stable/10/secure/lib/libcrypto/man/BIO_should_retry.3 stable/10/secure/lib/libcrypto/man/BN_BLINDING_new.3 stable/10/secure/lib/libcrypto/man/BN_CTX_new.3 stable/10/secure/lib/libcrypto/man/BN_CTX_start.3 stable/10/secure/lib/libcrypto/man/BN_add.3 stable/10/secure/lib/libcrypto/man/BN_add_word.3 stable/10/secure/lib/libcrypto/man/BN_bn2bin.3 stable/10/secure/lib/libcrypto/man/BN_cmp.3 stable/10/secure/lib/libcrypto/man/BN_copy.3 stable/10/secure/lib/libcrypto/man/BN_generate_prime.3 stable/10/secure/lib/libcrypto/man/BN_mod_inverse.3 stable/10/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 stable/10/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 stable/10/secure/lib/libcrypto/man/BN_new.3 stable/10/secure/lib/libcrypto/man/BN_num_bytes.3 stable/10/secure/lib/libcrypto/man/BN_rand.3 stable/10/secure/lib/libcrypto/man/BN_set_bit.3 stable/10/secure/lib/libcrypto/man/BN_swap.3 stable/10/secure/lib/libcrypto/man/BN_zero.3 stable/10/secure/lib/libcrypto/man/CMS_add0_cert.3 stable/10/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 stable/10/secure/lib/libcrypto/man/CMS_compress.3 stable/10/secure/lib/libcrypto/man/CMS_decrypt.3 stable/10/secure/lib/libcrypto/man/CMS_encrypt.3 stable/10/secure/lib/libcrypto/man/CMS_final.3 stable/10/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 stable/10/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 stable/10/secure/lib/libcrypto/man/CMS_get0_type.3 stable/10/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 stable/10/secure/lib/libcrypto/man/CMS_sign.3 stable/10/secure/lib/libcrypto/man/CMS_sign_add1_signer.3 stable/10/secure/lib/libcrypto/man/CMS_sign_receipt.3 stable/10/secure/lib/libcrypto/man/CMS_uncompress.3 stable/10/secure/lib/libcrypto/man/CMS_verify.3 stable/10/secure/lib/libcrypto/man/CMS_verify_receipt.3 stable/10/secure/lib/libcrypto/man/CONF_modules_free.3 stable/10/secure/lib/libcrypto/man/CONF_modules_load_file.3 stable/10/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 stable/10/secure/lib/libcrypto/man/DH_generate_key.3 stable/10/secure/lib/libcrypto/man/DH_generate_parameters.3 stable/10/secure/lib/libcrypto/man/DH_get_ex_new_index.3 stable/10/secure/lib/libcrypto/man/DH_new.3 stable/10/secure/lib/libcrypto/man/DH_set_method.3 stable/10/secure/lib/libcrypto/man/DH_size.3 stable/10/secure/lib/libcrypto/man/DSA_SIG_new.3 stable/10/secure/lib/libcrypto/man/DSA_do_sign.3 stable/10/secure/lib/libcrypto/man/DSA_dup_DH.3 stable/10/secure/lib/libcrypto/man/DSA_generate_key.3 stable/10/secure/lib/libcrypto/man/DSA_generate_parameters.3 stable/10/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 stable/10/secure/lib/libcrypto/man/DSA_new.3 stable/10/secure/lib/libcrypto/man/DSA_set_method.3 stable/10/secure/lib/libcrypto/man/DSA_sign.3 stable/10/secure/lib/libcrypto/man/DSA_size.3 stable/10/secure/lib/libcrypto/man/ERR_GET_LIB.3 stable/10/secure/lib/libcrypto/man/ERR_clear_error.3 stable/10/secure/lib/libcrypto/man/ERR_error_string.3 stable/10/secure/lib/libcrypto/man/ERR_get_error.3 stable/10/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 stable/10/secure/lib/libcrypto/man/ERR_load_strings.3 stable/10/secure/lib/libcrypto/man/ERR_print_errors.3 stable/10/secure/lib/libcrypto/man/ERR_put_error.3 stable/10/secure/lib/libcrypto/man/ERR_remove_state.3 stable/10/secure/lib/libcrypto/man/ERR_set_mark.3 stable/10/secure/lib/libcrypto/man/EVP_BytesToKey.3 stable/10/secure/lib/libcrypto/man/EVP_DigestInit.3 stable/10/secure/lib/libcrypto/man/EVP_DigestSignInit.3 stable/10/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 stable/10/secure/lib/libcrypto/man/EVP_EncryptInit.3 stable/10/secure/lib/libcrypto/man/EVP_OpenInit.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_derive.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_new.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_sign.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_verify.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 stable/10/secure/lib/libcrypto/man/EVP_SealInit.3 stable/10/secure/lib/libcrypto/man/EVP_SignInit.3 stable/10/secure/lib/libcrypto/man/EVP_VerifyInit.3 stable/10/secure/lib/libcrypto/man/OBJ_nid2obj.3 stable/10/secure/lib/libcrypto/man/OPENSSL_Applink.3 stable/10/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 stable/10/secure/lib/libcrypto/man/OPENSSL_config.3 stable/10/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 stable/10/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 stable/10/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 stable/10/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 stable/10/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 stable/10/secure/lib/libcrypto/man/PKCS12_create.3 stable/10/secure/lib/libcrypto/man/PKCS12_parse.3 stable/10/secure/lib/libcrypto/man/PKCS7_decrypt.3 stable/10/secure/lib/libcrypto/man/PKCS7_encrypt.3 stable/10/secure/lib/libcrypto/man/PKCS7_sign.3 stable/10/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 stable/10/secure/lib/libcrypto/man/PKCS7_verify.3 stable/10/secure/lib/libcrypto/man/RAND_add.3 stable/10/secure/lib/libcrypto/man/RAND_bytes.3 stable/10/secure/lib/libcrypto/man/RAND_cleanup.3 stable/10/secure/lib/libcrypto/man/RAND_egd.3 stable/10/secure/lib/libcrypto/man/RAND_load_file.3 stable/10/secure/lib/libcrypto/man/RAND_set_rand_method.3 stable/10/secure/lib/libcrypto/man/RSA_blinding_on.3 stable/10/secure/lib/libcrypto/man/RSA_check_key.3 stable/10/secure/lib/libcrypto/man/RSA_generate_key.3 stable/10/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 stable/10/secure/lib/libcrypto/man/RSA_new.3 stable/10/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 stable/10/secure/lib/libcrypto/man/RSA_print.3 stable/10/secure/lib/libcrypto/man/RSA_private_encrypt.3 stable/10/secure/lib/libcrypto/man/RSA_public_encrypt.3 stable/10/secure/lib/libcrypto/man/RSA_set_method.3 stable/10/secure/lib/libcrypto/man/RSA_sign.3 stable/10/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 stable/10/secure/lib/libcrypto/man/RSA_size.3 stable/10/secure/lib/libcrypto/man/SMIME_read_CMS.3 stable/10/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 stable/10/secure/lib/libcrypto/man/SMIME_write_CMS.3 stable/10/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 stable/10/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 stable/10/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 stable/10/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 stable/10/secure/lib/libcrypto/man/X509_NAME_print_ex.3 stable/10/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 stable/10/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 stable/10/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 stable/10/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 stable/10/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 stable/10/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 stable/10/secure/lib/libcrypto/man/X509_new.3 stable/10/secure/lib/libcrypto/man/X509_verify_cert.3 stable/10/secure/lib/libcrypto/man/bio.3 stable/10/secure/lib/libcrypto/man/blowfish.3 stable/10/secure/lib/libcrypto/man/bn.3 stable/10/secure/lib/libcrypto/man/bn_internal.3 stable/10/secure/lib/libcrypto/man/buffer.3 stable/10/secure/lib/libcrypto/man/crypto.3 stable/10/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 stable/10/secure/lib/libcrypto/man/d2i_DHparams.3 stable/10/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 stable/10/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 stable/10/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 stable/10/secure/lib/libcrypto/man/d2i_X509.3 stable/10/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 stable/10/secure/lib/libcrypto/man/d2i_X509_CRL.3 stable/10/secure/lib/libcrypto/man/d2i_X509_NAME.3 stable/10/secure/lib/libcrypto/man/d2i_X509_REQ.3 stable/10/secure/lib/libcrypto/man/d2i_X509_SIG.3 stable/10/secure/lib/libcrypto/man/des.3 stable/10/secure/lib/libcrypto/man/dh.3 stable/10/secure/lib/libcrypto/man/dsa.3 stable/10/secure/lib/libcrypto/man/ecdsa.3 stable/10/secure/lib/libcrypto/man/engine.3 stable/10/secure/lib/libcrypto/man/err.3 stable/10/secure/lib/libcrypto/man/evp.3 stable/10/secure/lib/libcrypto/man/hmac.3 stable/10/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 stable/10/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 stable/10/secure/lib/libcrypto/man/lh_stats.3 stable/10/secure/lib/libcrypto/man/lhash.3 stable/10/secure/lib/libcrypto/man/md5.3 stable/10/secure/lib/libcrypto/man/mdc2.3 stable/10/secure/lib/libcrypto/man/pem.3 stable/10/secure/lib/libcrypto/man/rand.3 stable/10/secure/lib/libcrypto/man/rc4.3 stable/10/secure/lib/libcrypto/man/ripemd.3 stable/10/secure/lib/libcrypto/man/rsa.3 stable/10/secure/lib/libcrypto/man/sha.3 stable/10/secure/lib/libcrypto/man/threads.3 stable/10/secure/lib/libcrypto/man/ui.3 stable/10/secure/lib/libcrypto/man/ui_compat.3 stable/10/secure/lib/libcrypto/man/x509.3 stable/10/secure/lib/libssl/man/SSL_CIPHER_get_name.3 stable/10/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 stable/10/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 stable/10/secure/lib/libssl/man/SSL_CTX_add_session.3 stable/10/secure/lib/libssl/man/SSL_CTX_ctrl.3 stable/10/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 stable/10/secure/lib/libssl/man/SSL_CTX_free.3 stable/10/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 stable/10/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 stable/10/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 stable/10/secure/lib/libssl/man/SSL_CTX_new.3 stable/10/secure/lib/libssl/man/SSL_CTX_sess_number.3 stable/10/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 stable/10/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 stable/10/secure/lib/libssl/man/SSL_CTX_sessions.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_mode.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_options.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_timeout.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_verify.3 stable/10/secure/lib/libssl/man/SSL_CTX_use_certificate.3 stable/10/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 stable/10/secure/lib/libssl/man/SSL_SESSION_free.3 stable/10/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 stable/10/secure/lib/libssl/man/SSL_SESSION_get_time.3 stable/10/secure/lib/libssl/man/SSL_accept.3 stable/10/secure/lib/libssl/man/SSL_alert_type_string.3 stable/10/secure/lib/libssl/man/SSL_clear.3 stable/10/secure/lib/libssl/man/SSL_connect.3 stable/10/secure/lib/libssl/man/SSL_do_handshake.3 stable/10/secure/lib/libssl/man/SSL_free.3 stable/10/secure/lib/libssl/man/SSL_get_SSL_CTX.3 stable/10/secure/lib/libssl/man/SSL_get_ciphers.3 stable/10/secure/lib/libssl/man/SSL_get_client_CA_list.3 stable/10/secure/lib/libssl/man/SSL_get_current_cipher.3 stable/10/secure/lib/libssl/man/SSL_get_default_timeout.3 stable/10/secure/lib/libssl/man/SSL_get_error.3 stable/10/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 stable/10/secure/lib/libssl/man/SSL_get_ex_new_index.3 stable/10/secure/lib/libssl/man/SSL_get_fd.3 stable/10/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 stable/10/secure/lib/libssl/man/SSL_get_peer_certificate.3 stable/10/secure/lib/libssl/man/SSL_get_psk_identity.3 stable/10/secure/lib/libssl/man/SSL_get_rbio.3 stable/10/secure/lib/libssl/man/SSL_get_session.3 stable/10/secure/lib/libssl/man/SSL_get_verify_result.3 stable/10/secure/lib/libssl/man/SSL_get_version.3 stable/10/secure/lib/libssl/man/SSL_library_init.3 stable/10/secure/lib/libssl/man/SSL_load_client_CA_file.3 stable/10/secure/lib/libssl/man/SSL_new.3 stable/10/secure/lib/libssl/man/SSL_pending.3 stable/10/secure/lib/libssl/man/SSL_read.3 stable/10/secure/lib/libssl/man/SSL_rstate_string.3 stable/10/secure/lib/libssl/man/SSL_session_reused.3 stable/10/secure/lib/libssl/man/SSL_set_bio.3 stable/10/secure/lib/libssl/man/SSL_set_connect_state.3 stable/10/secure/lib/libssl/man/SSL_set_fd.3 stable/10/secure/lib/libssl/man/SSL_set_session.3 stable/10/secure/lib/libssl/man/SSL_set_shutdown.3 stable/10/secure/lib/libssl/man/SSL_set_verify_result.3 stable/10/secure/lib/libssl/man/SSL_shutdown.3 stable/10/secure/lib/libssl/man/SSL_state_string.3 stable/10/secure/lib/libssl/man/SSL_want.3 stable/10/secure/lib/libssl/man/SSL_write.3 stable/10/secure/lib/libssl/man/d2i_SSL_SESSION.3 stable/10/secure/lib/libssl/man/ssl.3 stable/10/secure/usr.bin/openssl/man/CA.pl.1 stable/10/secure/usr.bin/openssl/man/asn1parse.1 stable/10/secure/usr.bin/openssl/man/ca.1 stable/10/secure/usr.bin/openssl/man/ciphers.1 stable/10/secure/usr.bin/openssl/man/cms.1 stable/10/secure/usr.bin/openssl/man/crl.1 stable/10/secure/usr.bin/openssl/man/crl2pkcs7.1 stable/10/secure/usr.bin/openssl/man/dgst.1 stable/10/secure/usr.bin/openssl/man/dhparam.1 stable/10/secure/usr.bin/openssl/man/dsa.1 stable/10/secure/usr.bin/openssl/man/dsaparam.1 stable/10/secure/usr.bin/openssl/man/ec.1 stable/10/secure/usr.bin/openssl/man/ecparam.1 stable/10/secure/usr.bin/openssl/man/enc.1 stable/10/secure/usr.bin/openssl/man/errstr.1 stable/10/secure/usr.bin/openssl/man/gendsa.1 stable/10/secure/usr.bin/openssl/man/genpkey.1 stable/10/secure/usr.bin/openssl/man/genrsa.1 stable/10/secure/usr.bin/openssl/man/nseq.1 stable/10/secure/usr.bin/openssl/man/ocsp.1 stable/10/secure/usr.bin/openssl/man/openssl.1 stable/10/secure/usr.bin/openssl/man/passwd.1 stable/10/secure/usr.bin/openssl/man/pkcs12.1 stable/10/secure/usr.bin/openssl/man/pkcs7.1 stable/10/secure/usr.bin/openssl/man/pkcs8.1 stable/10/secure/usr.bin/openssl/man/pkey.1 stable/10/secure/usr.bin/openssl/man/pkeyparam.1 stable/10/secure/usr.bin/openssl/man/pkeyutl.1 stable/10/secure/usr.bin/openssl/man/rand.1 stable/10/secure/usr.bin/openssl/man/req.1 stable/10/secure/usr.bin/openssl/man/rsa.1 stable/10/secure/usr.bin/openssl/man/rsautl.1 stable/10/secure/usr.bin/openssl/man/s_client.1 stable/10/secure/usr.bin/openssl/man/s_server.1 stable/10/secure/usr.bin/openssl/man/s_time.1 stable/10/secure/usr.bin/openssl/man/sess_id.1 stable/10/secure/usr.bin/openssl/man/smime.1 stable/10/secure/usr.bin/openssl/man/speed.1 stable/10/secure/usr.bin/openssl/man/spkac.1 stable/10/secure/usr.bin/openssl/man/ts.1 stable/10/secure/usr.bin/openssl/man/tsget.1 stable/10/secure/usr.bin/openssl/man/verify.1 stable/10/secure/usr.bin/openssl/man/version.1 stable/10/secure/usr.bin/openssl/man/x509.1 stable/10/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/crypto/openssl/ACKNOWLEDGMENTS ============================================================================== --- stable/10/crypto/openssl/ACKNOWLEDGMENTS Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/ACKNOWLEDGMENTS Mon Jun 9 06:00:28 2014 (r267258) @@ -10,13 +10,18 @@ OpenSSL project. We would like to identify and thank the following such sponsors for their past or current significant support of the OpenSSL project: +Major support: + + Qualys http://www.qualys.com/ + Very significant support: - OpenGear: www.opengear.com + OpenGear: http://www.opengear.com/ Significant support: - PSW Group: www.psw.net + PSW Group: http://www.psw.net/ + Acano Ltd. http://acano.com/ Please note that we ask permission to identify sponsors and that some sponsors we consider eligible for inclusion here have requested to remain anonymous. Modified: stable/10/crypto/openssl/CHANGES ============================================================================== --- stable/10/crypto/openssl/CHANGES Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/CHANGES Mon Jun 9 06:00:28 2014 (r267258) @@ -2,6 +2,50 @@ OpenSSL CHANGES _______________ + Changes between 1.0.1g and 1.0.1h [5 Jun 2014] + + *) Fix for SSL/TLS MITM flaw. An attacker using a carefully crafted + handshake can force the use of weak keying material in OpenSSL + SSL/TLS clients and servers. + + Thanks to KIKUCHI Masashi (Lepidum Co. Ltd.) for discovering and + researching this issue. (CVE-2014-0224) + [KIKUCHI Masashi, Steve Henson] + + *) Fix DTLS recursion flaw. By sending an invalid DTLS handshake to an + OpenSSL DTLS client the code can be made to recurse eventually crashing + in a DoS attack. + + Thanks to Imre Rad (Search-Lab Ltd.) for discovering this issue. + (CVE-2014-0221) + [Imre Rad, Steve Henson] + + *) Fix DTLS invalid fragment vulnerability. A buffer overrun attack can + be triggered by sending invalid DTLS fragments to an OpenSSL DTLS + client or server. This is potentially exploitable to run arbitrary + code on a vulnerable client or server. + + Thanks to Jüri Aedla for reporting this issue. (CVE-2014-0195) + [Jüri Aedla, Steve Henson] + + *) Fix bug in TLS code where clients enable anonymous ECDH ciphersuites + are subject to a denial of service attack. + + Thanks to Felix Gröbert and Ivan Fratric at Google for discovering + this issue. (CVE-2014-3470) + [Felix Gröbert, Ivan Fratric, Steve Henson] + + *) Harmonize version and its documentation. -f flag is used to display + compilation flags. + [mancha ] + + *) Fix eckey_priv_encode so it immediately returns an error upon a failure + in i2d_ECPrivateKey. + [mancha ] + + *) Fix some double frees. These are not thought to be exploitable. + [mancha ] + Changes between 1.0.1f and 1.0.1g [7 Apr 2014] *) A missing bounds check in the handling of the TLS heartbeat extension Modified: stable/10/crypto/openssl/Makefile ============================================================================== --- stable/10/crypto/openssl/Makefile Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/Makefile Mon Jun 9 06:00:28 2014 (r267258) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.1g +VERSION=1.0.1h MAJOR=1 MINOR=0.1 SHLIB_VERSION_NUMBER=1.0.0 Modified: stable/10/crypto/openssl/NEWS ============================================================================== --- stable/10/crypto/openssl/NEWS Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/NEWS Mon Jun 9 06:00:28 2014 (r267258) @@ -5,6 +5,14 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.1g and OpenSSL 1.0.1h [5 Jun 2014] + + o Fix for CVE-2014-0224 + o Fix for CVE-2014-0221 + o Fix for CVE-2014-0195 + o Fix for CVE-2014-3470 + o Fix for CVE-2010-5298 + Major changes between OpenSSL 1.0.1f and OpenSSL 1.0.1g [7 Apr 2014] o Fix for CVE-2014-0160 Modified: stable/10/crypto/openssl/README ============================================================================== --- stable/10/crypto/openssl/README Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/README Mon Jun 9 06:00:28 2014 (r267258) @@ -1,5 +1,5 @@ - OpenSSL 1.0.1g 7 Apr 2014 + OpenSSL 1.0.1h 5 Jun 2014 Copyright (c) 1998-2011 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: stable/10/crypto/openssl/apps/enc.c ============================================================================== --- stable/10/crypto/openssl/apps/enc.c Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/apps/enc.c Mon Jun 9 06:00:28 2014 (r267258) @@ -331,6 +331,12 @@ bad: setup_engine(bio_err, engine, 0); #endif + if (cipher && EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AEAD_CIPHER) + { + BIO_printf(bio_err, "AEAD ciphers not supported by the enc utility\n"); + goto end; + } + if (md && (dgst=EVP_get_digestbyname(md)) == NULL) { BIO_printf(bio_err,"%s is an unsupported message digest type\n",md); Modified: stable/10/crypto/openssl/apps/ocsp.c ============================================================================== --- stable/10/crypto/openssl/apps/ocsp.c Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/apps/ocsp.c Mon Jun 9 06:00:28 2014 (r267258) @@ -127,6 +127,7 @@ int MAIN(int argc, char **argv) ENGINE *e = NULL; char **args; char *host = NULL, *port = NULL, *path = "/"; + char *thost = NULL, *tport = NULL, *tpath = NULL; char *reqin = NULL, *respin = NULL; char *reqout = NULL, *respout = NULL; char *signfile = NULL, *keyfile = NULL; @@ -204,6 +205,12 @@ int MAIN(int argc, char **argv) } else if (!strcmp(*args, "-url")) { + if (thost) + OPENSSL_free(thost); + if (tport) + OPENSSL_free(tport); + if (tpath) + OPENSSL_free(tpath); if (args[1]) { args++; @@ -212,6 +219,9 @@ int MAIN(int argc, char **argv) BIO_printf(bio_err, "Error parsing URL\n"); badarg = 1; } + thost = host; + tport = port; + tpath = path; } else badarg = 1; } @@ -920,12 +930,12 @@ end: sk_X509_pop_free(verify_other, X509_free); sk_CONF_VALUE_pop_free(headers, X509V3_conf_free); - if (use_ssl != -1) - { - OPENSSL_free(host); - OPENSSL_free(port); - OPENSSL_free(path); - } + if (thost) + OPENSSL_free(thost); + if (tport) + OPENSSL_free(tport); + if (tpath) + OPENSSL_free(tpath); OPENSSL_EXIT(ret); } Modified: stable/10/crypto/openssl/apps/req.c ============================================================================== --- stable/10/crypto/openssl/apps/req.c Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/apps/req.c Mon Jun 9 06:00:28 2014 (r267258) @@ -1489,7 +1489,13 @@ start: #ifdef CHARSET_EBCDIC ebcdic2ascii(buf, buf, i); #endif - if(!req_check_len(i, n_min, n_max)) goto start; + if(!req_check_len(i, n_min, n_max)) + { + if (batch || value) + return 0; + goto start; + } + if (!X509_NAME_add_entry_by_NID(n,nid, chtype, (unsigned char *) buf, -1,-1,mval)) goto err; ret=1; @@ -1548,7 +1554,12 @@ start: #ifdef CHARSET_EBCDIC ebcdic2ascii(buf, buf, i); #endif - if(!req_check_len(i, n_min, n_max)) goto start; + if(!req_check_len(i, n_min, n_max)) + { + if (batch || value) + return 0; + goto start; + } if(!X509_REQ_add1_attr_by_NID(req, nid, chtype, (unsigned char *)buf, -1)) { Modified: stable/10/crypto/openssl/apps/s_cb.c ============================================================================== --- stable/10/crypto/openssl/apps/s_cb.c Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/apps/s_cb.c Mon Jun 9 06:00:28 2014 (r267258) @@ -747,6 +747,10 @@ void MS_CALLBACK tlsext_cb(SSL *s, int c break; #endif + case TLSEXT_TYPE_padding: + extname = "TLS padding"; + break; + default: extname = "unknown"; break; Modified: stable/10/crypto/openssl/apps/s_socket.c ============================================================================== --- stable/10/crypto/openssl/apps/s_socket.c Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/apps/s_socket.c Mon Jun 9 06:00:28 2014 (r267258) @@ -274,7 +274,7 @@ static int init_client_ip(int *sock, uns { i=0; i=setsockopt(s,SOL_SOCKET,SO_KEEPALIVE,(char *)&i,sizeof(i)); - if (i < 0) { perror("keepalive"); return(0); } + if (i < 0) { closesocket(s); perror("keepalive"); return(0); } } #endif @@ -450,6 +450,7 @@ redoit: if ((*host=(char *)OPENSSL_malloc(strlen(h1->h_name)+1)) == NULL) { perror("OPENSSL_malloc"); + closesocket(ret); return(0); } BUF_strlcpy(*host,h1->h_name,strlen(h1->h_name)+1); @@ -458,11 +459,13 @@ redoit: if (h2 == NULL) { BIO_printf(bio_err,"gethostbyname failure\n"); + closesocket(ret); return(0); } if (h2->h_addrtype != AF_INET) { BIO_printf(bio_err,"gethostbyname addr is not AF_INET\n"); + closesocket(ret); return(0); } } Modified: stable/10/crypto/openssl/apps/smime.c ============================================================================== --- stable/10/crypto/openssl/apps/smime.c Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/apps/smime.c Mon Jun 9 06:00:28 2014 (r267258) @@ -541,8 +541,8 @@ int MAIN(int argc, char **argv) { if (!cipher) { -#ifndef OPENSSL_NO_RC2 - cipher = EVP_rc2_40_cbc(); +#ifndef OPENSSL_NO_DES + cipher = EVP_des_ede3_cbc(); #else BIO_printf(bio_err, "No cipher selected\n"); goto end; Modified: stable/10/crypto/openssl/crypto/asn1/a_strnid.c ============================================================================== --- stable/10/crypto/openssl/crypto/asn1/a_strnid.c Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/crypto/asn1/a_strnid.c Mon Jun 9 06:00:28 2014 (r267258) @@ -74,7 +74,7 @@ static int sk_table_cmp(const ASN1_STRIN * certain software (e.g. Netscape) has problems with them. */ -static unsigned long global_mask = 0xFFFFFFFFL; +static unsigned long global_mask = B_ASN1_UTF8STRING; void ASN1_STRING_set_default_mask(unsigned long mask) { Modified: stable/10/crypto/openssl/crypto/bio/bss_dgram.c ============================================================================== --- stable/10/crypto/openssl/crypto/bio/bss_dgram.c Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/crypto/bio/bss_dgram.c Mon Jun 9 06:00:28 2014 (r267258) @@ -1333,7 +1333,7 @@ static long dgram_sctp_ctrl(BIO *b, int bio_dgram_sctp_data *data = NULL; socklen_t sockopt_len = 0; struct sctp_authkeyid authkeyid; - struct sctp_authkey *authkey; + struct sctp_authkey *authkey = NULL; data = (bio_dgram_sctp_data *)b->ptr; @@ -1388,6 +1388,11 @@ static long dgram_sctp_ctrl(BIO *b, int /* Add new key */ sockopt_len = sizeof(struct sctp_authkey) + 64 * sizeof(uint8_t); authkey = OPENSSL_malloc(sockopt_len); + if (authkey == NULL) + { + ret = -1; + break; + } memset(authkey, 0x00, sockopt_len); authkey->sca_keynumber = authkeyid.scact_keynumber + 1; #ifndef __FreeBSD__ @@ -1399,6 +1404,8 @@ static long dgram_sctp_ctrl(BIO *b, int memcpy(&authkey->sca_key[0], ptr, 64 * sizeof(uint8_t)); ret = setsockopt(b->num, IPPROTO_SCTP, SCTP_AUTH_KEY, authkey, sockopt_len); + OPENSSL_free(authkey); + authkey = NULL; if (ret < 0) break; /* Reset active key */ Modified: stable/10/crypto/openssl/crypto/bn/bn_mont.c ============================================================================== --- stable/10/crypto/openssl/crypto/bn/bn_mont.c Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/crypto/bn/bn_mont.c Mon Jun 9 06:00:28 2014 (r267258) @@ -478,32 +478,38 @@ BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CT BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, int lock, const BIGNUM *mod, BN_CTX *ctx) { - int got_write_lock = 0; BN_MONT_CTX *ret; CRYPTO_r_lock(lock); - if (!*pmont) + ret = *pmont; + CRYPTO_r_unlock(lock); + if (ret) + return ret; + + /* We don't want to serialise globally while doing our lazy-init math in + * BN_MONT_CTX_set. That punishes threads that are doing independent + * things. Instead, punish the case where more than one thread tries to + * lazy-init the same 'pmont', by having each do the lazy-init math work + * independently and only use the one from the thread that wins the race + * (the losers throw away the work they've done). */ + ret = BN_MONT_CTX_new(); + if (!ret) + return NULL; + if (!BN_MONT_CTX_set(ret, mod, ctx)) { - CRYPTO_r_unlock(lock); - CRYPTO_w_lock(lock); - got_write_lock = 1; + BN_MONT_CTX_free(ret); + return NULL; + } - if (!*pmont) - { - ret = BN_MONT_CTX_new(); - if (ret && !BN_MONT_CTX_set(ret, mod, ctx)) - BN_MONT_CTX_free(ret); - else - *pmont = ret; - } + /* The locked compare-and-set, after the local work is done. */ + CRYPTO_w_lock(lock); + if (*pmont) + { + BN_MONT_CTX_free(ret); + ret = *pmont; } - - ret = *pmont; - - if (got_write_lock) - CRYPTO_w_unlock(lock); else - CRYPTO_r_unlock(lock); - + *pmont = ret; + CRYPTO_w_unlock(lock); return ret; } Modified: stable/10/crypto/openssl/crypto/cms/cms_env.c ============================================================================== --- stable/10/crypto/openssl/crypto/cms/cms_env.c Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/crypto/cms/cms_env.c Mon Jun 9 06:00:28 2014 (r267258) @@ -185,6 +185,8 @@ CMS_RecipientInfo *CMS_add1_recipient_ce if (flags & CMS_USE_KEYID) { ktri->version = 2; + if (env->version < 2) + env->version = 2; type = CMS_RECIPINFO_KEYIDENTIFIER; } else Modified: stable/10/crypto/openssl/crypto/cms/cms_sd.c ============================================================================== --- stable/10/crypto/openssl/crypto/cms/cms_sd.c Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/crypto/cms/cms_sd.c Mon Jun 9 06:00:28 2014 (r267258) @@ -158,8 +158,8 @@ static void cms_sd_set_version(CMS_Signe if (sd->version < 3) sd->version = 3; } - else - sd->version = 1; + else if (si->version < 1) + si->version = 1; } if (sd->version < 1) Modified: stable/10/crypto/openssl/crypto/cms/cms_smime.c ============================================================================== --- stable/10/crypto/openssl/crypto/cms/cms_smime.c Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/crypto/cms/cms_smime.c Mon Jun 9 06:00:28 2014 (r267258) @@ -611,7 +611,7 @@ int CMS_decrypt_set1_pkey(CMS_ContentInf STACK_OF(CMS_RecipientInfo) *ris; CMS_RecipientInfo *ri; int i, r; - int debug = 0; + int debug = 0, ri_match = 0; ris = CMS_get0_RecipientInfos(cms); if (ris) debug = cms->d.envelopedData->encryptedContentInfo->debug; @@ -620,6 +620,7 @@ int CMS_decrypt_set1_pkey(CMS_ContentInf ri = sk_CMS_RecipientInfo_value(ris, i); if (CMS_RecipientInfo_type(ri) != CMS_RECIPINFO_TRANS) continue; + ri_match = 1; /* If we have a cert try matching RecipientInfo * otherwise try them all. */ @@ -655,7 +656,7 @@ int CMS_decrypt_set1_pkey(CMS_ContentInf } } /* If no cert and not debugging always return success */ - if (!cert && !debug) + if (ri_match && !cert && !debug) { ERR_clear_error(); return 1; Modified: stable/10/crypto/openssl/crypto/dso/dso_dlfcn.c ============================================================================== --- stable/10/crypto/openssl/crypto/dso/dso_dlfcn.c Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/crypto/dso/dso_dlfcn.c Mon Jun 9 06:00:28 2014 (r267258) @@ -464,7 +464,7 @@ static int dlfcn_pathbyaddr(void *addr,c return len; } - ERR_add_error_data(4, "dlfcn_pathbyaddr(): ", dlerror()); + ERR_add_error_data(2, "dlfcn_pathbyaddr(): ", dlerror()); #endif return -1; } Modified: stable/10/crypto/openssl/crypto/ec/ec_ameth.c ============================================================================== --- stable/10/crypto/openssl/crypto/ec/ec_ameth.c Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/crypto/ec/ec_ameth.c Mon Jun 9 06:00:28 2014 (r267258) @@ -352,6 +352,7 @@ static int eckey_priv_encode(PKCS8_PRIV_ EC_KEY_set_enc_flags(ec_key, old_flags); OPENSSL_free(ep); ECerr(EC_F_ECKEY_PRIV_ENCODE, ERR_R_EC_LIB); + return 0; } /* restore old encoding flags */ EC_KEY_set_enc_flags(ec_key, old_flags); Modified: stable/10/crypto/openssl/crypto/ec/ec_asn1.c ============================================================================== --- stable/10/crypto/openssl/crypto/ec/ec_asn1.c Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/crypto/ec/ec_asn1.c Mon Jun 9 06:00:28 2014 (r267258) @@ -1435,8 +1435,11 @@ int i2o_ECPublicKey(EC_KEY *a, unsigned *out, buf_len, NULL)) { ECerr(EC_F_I2O_ECPUBLICKEY, ERR_R_EC_LIB); - OPENSSL_free(*out); - *out = NULL; + if (new_buffer) + { + OPENSSL_free(*out); + *out = NULL; + } return 0; } if (!new_buffer) Modified: stable/10/crypto/openssl/crypto/ec/ec_lcl.h ============================================================================== --- stable/10/crypto/openssl/crypto/ec/ec_lcl.h Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/crypto/ec/ec_lcl.h Mon Jun 9 06:00:28 2014 (r267258) @@ -404,7 +404,7 @@ int ec_GF2m_simple_mul(const EC_GROUP *g int ec_GF2m_precompute_mult(EC_GROUP *group, BN_CTX *ctx); int ec_GF2m_have_precompute_mult(const EC_GROUP *group); -#ifndef OPENSSL_EC_NISTP_64_GCC_128 +#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128 /* method functions in ecp_nistp224.c */ int ec_GFp_nistp224_group_init(EC_GROUP *group); int ec_GFp_nistp224_group_set_curve(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *n, BN_CTX *); Modified: stable/10/crypto/openssl/crypto/evp/bio_b64.c ============================================================================== --- stable/10/crypto/openssl/crypto/evp/bio_b64.c Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/crypto/evp/bio_b64.c Mon Jun 9 06:00:28 2014 (r267258) @@ -226,6 +226,7 @@ static int b64_read(BIO *b, char *out, i else if (ctx->start) { q=p=(unsigned char *)ctx->tmp; + num = 0; for (j=0; j v) { rv=-1; goto end; } ret+=(v-eof); } else Modified: stable/10/crypto/openssl/crypto/opensslv.h ============================================================================== --- stable/10/crypto/openssl/crypto/opensslv.h Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/crypto/opensslv.h Mon Jun 9 06:00:28 2014 (r267258) @@ -25,11 +25,11 @@ * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ -#define OPENSSL_VERSION_NUMBER 0x1000107fL +#define OPENSSL_VERSION_NUMBER 0x1000108fL #ifdef OPENSSL_FIPS -#define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1g-fips 7 Apr 2014" +#define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1h-fips 5 Jun 2014" #else -#define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1g-freebsd 7 Apr 2014" +#define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1h-freebsd 5 Jun 2014" #endif #define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT Modified: stable/10/crypto/openssl/crypto/pkcs12/p12_crt.c ============================================================================== --- stable/10/crypto/openssl/crypto/pkcs12/p12_crt.c Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/crypto/pkcs12/p12_crt.c Mon Jun 9 06:00:28 2014 (r267258) @@ -96,7 +96,11 @@ PKCS12 *PKCS12_create(char *pass, char * nid_cert = NID_pbe_WithSHA1And3_Key_TripleDES_CBC; else #endif +#ifdef OPENSSL_NO_RC2 + nid_cert = NID_pbe_WithSHA1And3_Key_TripleDES_CBC; +#else nid_cert = NID_pbe_WithSHA1And40BitRC2_CBC; +#endif } if (!nid_key) nid_key = NID_pbe_WithSHA1And3_Key_TripleDES_CBC; @@ -286,7 +290,11 @@ int PKCS12_add_safe(STACK_OF(PKCS7) **ps free_safes = 0; if (nid_safe == 0) +#ifdef OPENSSL_NO_RC2 + nid_safe = NID_pbe_WithSHA1And3_Key_TripleDES_CBC; +#else nid_safe = NID_pbe_WithSHA1And40BitRC2_CBC; +#endif if (nid_safe == -1) p7 = PKCS12_pack_p7data(bags); Modified: stable/10/crypto/openssl/crypto/pkcs12/p12_kiss.c ============================================================================== --- stable/10/crypto/openssl/crypto/pkcs12/p12_kiss.c Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/crypto/pkcs12/p12_kiss.c Mon Jun 9 06:00:28 2014 (r267258) @@ -269,7 +269,7 @@ static int parse_bag(PKCS12_SAFEBAG *bag int len, r; unsigned char *data; len = ASN1_STRING_to_UTF8(&data, fname); - if(len > 0) { + if(len >= 0) { r = X509_alias_set1(x509, data, len); OPENSSL_free(data); if (!r) Modified: stable/10/crypto/openssl/crypto/pkcs7/pk7_doit.c ============================================================================== --- stable/10/crypto/openssl/crypto/pkcs7/pk7_doit.c Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/crypto/pkcs7/pk7_doit.c Mon Jun 9 06:00:28 2014 (r267258) @@ -440,6 +440,11 @@ BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKE { case NID_pkcs7_signed: data_body=PKCS7_get_octet_string(p7->d.sign->contents); + if (!PKCS7_is_detached(p7) && data_body == NULL) + { + PKCS7err(PKCS7_F_PKCS7_DATADECODE,PKCS7_R_INVALID_SIGNED_DATA_TYPE); + goto err; + } md_sk=p7->d.sign->md_algs; break; case NID_pkcs7_signedAndEnveloped: @@ -928,6 +933,7 @@ int PKCS7_SIGNER_INFO_sign(PKCS7_SIGNER_ if (EVP_DigestSignUpdate(&mctx,abuf,alen) <= 0) goto err; OPENSSL_free(abuf); + abuf = NULL; if (EVP_DigestSignFinal(&mctx, NULL, &siglen) <= 0) goto err; abuf = OPENSSL_malloc(siglen); Modified: stable/10/crypto/openssl/crypto/pkcs7/pkcs7.h ============================================================================== --- stable/10/crypto/openssl/crypto/pkcs7/pkcs7.h Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/crypto/pkcs7/pkcs7.h Mon Jun 9 06:00:28 2014 (r267258) @@ -453,6 +453,7 @@ void ERR_load_PKCS7_strings(void); #define PKCS7_R_ERROR_SETTING_CIPHER 121 #define PKCS7_R_INVALID_MIME_TYPE 131 #define PKCS7_R_INVALID_NULL_POINTER 143 +#define PKCS7_R_INVALID_SIGNED_DATA_TYPE 155 #define PKCS7_R_MIME_NO_CONTENT_TYPE 132 #define PKCS7_R_MIME_PARSE_ERROR 133 #define PKCS7_R_MIME_SIG_PARSE_ERROR 134 Modified: stable/10/crypto/openssl/crypto/pkcs7/pkcs7err.c ============================================================================== --- stable/10/crypto/openssl/crypto/pkcs7/pkcs7err.c Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/crypto/pkcs7/pkcs7err.c Mon Jun 9 06:00:28 2014 (r267258) @@ -1,6 +1,6 @@ /* crypto/pkcs7/pkcs7err.c */ /* ==================================================================== - * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. + * Copyright (c) 1999-2014 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -130,6 +130,7 @@ static ERR_STRING_DATA PKCS7_str_reasons {ERR_REASON(PKCS7_R_ERROR_SETTING_CIPHER),"error setting cipher"}, {ERR_REASON(PKCS7_R_INVALID_MIME_TYPE) ,"invalid mime type"}, {ERR_REASON(PKCS7_R_INVALID_NULL_POINTER),"invalid null pointer"}, +{ERR_REASON(PKCS7_R_INVALID_SIGNED_DATA_TYPE),"invalid signed data type"}, {ERR_REASON(PKCS7_R_MIME_NO_CONTENT_TYPE),"mime no content type"}, {ERR_REASON(PKCS7_R_MIME_PARSE_ERROR) ,"mime parse error"}, {ERR_REASON(PKCS7_R_MIME_SIG_PARSE_ERROR),"mime sig parse error"}, Modified: stable/10/crypto/openssl/crypto/rsa/rsa_ameth.c ============================================================================== --- stable/10/crypto/openssl/crypto/rsa/rsa_ameth.c Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/crypto/rsa/rsa_ameth.c Mon Jun 9 06:00:28 2014 (r267258) @@ -358,7 +358,7 @@ static int rsa_pss_param_print(BIO *bp, if (i2a_ASN1_INTEGER(bp, pss->saltLength) <= 0) goto err; } - else if (BIO_puts(bp, "0x14 (default)") <= 0) + else if (BIO_puts(bp, "14 (default)") <= 0) goto err; BIO_puts(bp, "\n"); Modified: stable/10/crypto/openssl/crypto/srp/srp_vfy.c ============================================================================== --- stable/10/crypto/openssl/crypto/srp/srp_vfy.c Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/crypto/srp/srp_vfy.c Mon Jun 9 06:00:28 2014 (r267258) @@ -93,6 +93,9 @@ static int t_fromb64(unsigned char *a, c else a[i] = loc - b64table; ++i; } + /* if nothing valid to process we have a zero length response */ + if (i == 0) + return 0; size = i; i = size - 1; j = size; Modified: stable/10/crypto/openssl/crypto/ts/ts_rsp_verify.c ============================================================================== --- stable/10/crypto/openssl/crypto/ts/ts_rsp_verify.c Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/crypto/ts/ts_rsp_verify.c Mon Jun 9 06:00:28 2014 (r267258) @@ -629,6 +629,7 @@ static int TS_compute_imprint(BIO *data, X509_ALGOR_free(*md_alg); OPENSSL_free(*imprint); *imprint_len = 0; + *imprint = NULL; return 0; } Modified: stable/10/crypto/openssl/crypto/x509v3/v3_purp.c ============================================================================== --- stable/10/crypto/openssl/crypto/x509v3/v3_purp.c Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/crypto/x509v3/v3_purp.c Mon Jun 9 06:00:28 2014 (r267258) @@ -389,8 +389,8 @@ static void x509v3_cache_extensions(X509 /* Handle proxy certificates */ if((pci=X509_get_ext_d2i(x, NID_proxyCertInfo, NULL, NULL))) { if (x->ex_flags & EXFLAG_CA - || X509_get_ext_by_NID(x, NID_subject_alt_name, 0) >= 0 - || X509_get_ext_by_NID(x, NID_issuer_alt_name, 0) >= 0) { + || X509_get_ext_by_NID(x, NID_subject_alt_name, -1) >= 0 + || X509_get_ext_by_NID(x, NID_issuer_alt_name, -1) >= 0) { x->ex_flags |= EXFLAG_INVALID; } if (pci->pcPathLengthConstraint) { @@ -670,7 +670,7 @@ static int check_purpose_timestamp_sign( return 0; /* Extended Key Usage MUST be critical */ - i_ext = X509_get_ext_by_NID((X509 *) x, NID_ext_key_usage, 0); + i_ext = X509_get_ext_by_NID((X509 *) x, NID_ext_key_usage, -1); if (i_ext >= 0) { X509_EXTENSION *ext = X509_get_ext((X509 *) x, i_ext); Modified: stable/10/crypto/openssl/doc/apps/cms.pod ============================================================================== --- stable/10/crypto/openssl/doc/apps/cms.pod Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/doc/apps/cms.pod Mon Jun 9 06:00:28 2014 (r267258) @@ -90,6 +90,11 @@ decrypt mail using the supplied certific encrypted mail message in MIME format for the input file. The decrypted mail is written to the output file. +=item B<-debug_decrypt> + +this option sets the B flag. This option should be used +with caution: see the notes section below. + =item B<-sign> sign mail using the supplied certificate and private key. Input file is @@ -446,6 +451,16 @@ Streaming is always used for the B<-sign since the content is no longer part of the CMS structure the encoding remains DER. +If the B<-decrypt> option is used without a recipient certificate then an +attempt is made to locate the recipient by trying each potential recipient +in turn using the supplied private key. To thwart the MMA attack +(Bleichenbacher's attack on PKCS #1 v1.5 RSA padding) all recipients are +tried whether they succeed or not and if no recipients match the message +is "decrypted" using a random key which will typically output garbage. +The B<-debug_decrypt> option can be used to disable the MMA attack protection +and return an error if no recipient can be found: this option should be used +with caution. For a fuller description see L). + =head1 EXIT CODES =over 4 Modified: stable/10/crypto/openssl/doc/apps/enc.pod ============================================================================== --- stable/10/crypto/openssl/doc/apps/enc.pod Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/doc/apps/enc.pod Mon Jun 9 06:00:28 2014 (r267258) @@ -215,6 +215,10 @@ unsupported options (for example B program does not support authenticated encryption modes +like CCM and GCM. The utility does not store or retrieve the +authentication tag. + base64 Base 64 Modified: stable/10/crypto/openssl/doc/apps/s_server.pod ============================================================================== --- stable/10/crypto/openssl/doc/apps/s_server.pod Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/doc/apps/s_server.pod Mon Jun 9 06:00:28 2014 (r267258) @@ -44,6 +44,7 @@ B B [B<-no_ssl3>] [B<-no_tls1>] [B<-no_dhe>] +[B<-no_ecdhe>] [B<-bugs>] [B<-hack>] [B<-www>] @@ -131,6 +132,11 @@ a static set of parameters hard coded in if this option is set then no DH parameters will be loaded effectively disabling the ephemeral DH cipher suites. +=item B<-no_ecdhe> + +if this option is set then no ECDH parameters will be loaded effectively +disabling the ephemeral ECDH cipher suites. + =item B<-no_tmp_rsa> certain export cipher suites sometimes use a temporary RSA key, this option Modified: stable/10/crypto/openssl/doc/apps/smime.pod ============================================================================== --- stable/10/crypto/openssl/doc/apps/smime.pod Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/doc/apps/smime.pod Mon Jun 9 06:00:28 2014 (r267258) @@ -159,7 +159,7 @@ EVP_get_cipherbyname() function) can als example B<-aes_128_cbc>. See L|enc(1)> for list of ciphers supported by your version of OpenSSL. -If not specified 40 bit RC2 is used. Only used with B<-encrypt>. +If not specified triple DES is used. Only used with B<-encrypt>. =item B<-nointern> Modified: stable/10/crypto/openssl/doc/apps/verify.pod ============================================================================== --- stable/10/crypto/openssl/doc/apps/verify.pod Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/doc/apps/verify.pod Mon Jun 9 06:00:28 2014 (r267258) @@ -25,6 +25,7 @@ B B [B<-untrusted file>] [B<-help>] [B<-issuer_checks>] +[B<-attime timestamp>] [B<-verbose>] [B<->] [certificates] @@ -80,6 +81,12 @@ rejected. The presence of rejection mess anything is wrong; during the normal verification process, several rejections may take place. +=item B<-attime timestamp> + +Perform validation checks using time specified by B and not +current system time. B is the number of seconds since +01.01.1970 (UNIX time). + =item B<-policy arg> Enable policy processing and add B to the user-initial-policy-set (see @@ -386,7 +393,7 @@ an application specific error. Unused. =head1 BUGS -Although the issuer checks are a considerably improvement over the old technique they still +Although the issuer checks are a considerable improvement over the old technique they still suffer from limitations in the underlying X509_LOOKUP API. One consequence of this is that trusted certificates with matching subject name must either appear in a file (as specified by the B<-CAfile> option) or a directory (as specified by B<-CApath>. If they occur in both then only Modified: stable/10/crypto/openssl/doc/apps/version.pod ============================================================================== --- stable/10/crypto/openssl/doc/apps/version.pod Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/doc/apps/version.pod Mon Jun 9 06:00:28 2014 (r267258) @@ -13,6 +13,7 @@ B [B<-o>] [B<-f>] [B<-p>] +[B<-d>] =head1 DESCRIPTION @@ -38,7 +39,7 @@ the date the current version of OpenSSL option information: various options set when the library was built. -=item B<-c> +=item B<-f> compilation flags. Modified: stable/10/crypto/openssl/doc/apps/x509v3_config.pod ============================================================================== --- stable/10/crypto/openssl/doc/apps/x509v3_config.pod Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/doc/apps/x509v3_config.pod Mon Jun 9 06:00:28 2014 (r267258) @@ -301,7 +301,7 @@ Example: O=Organisation CN=Some Name - + =head2 Certificate Policies. This is a I extension. All the fields of this extension can be set by @@ -390,7 +390,7 @@ Examples: nameConstraints=permitted;email:.somedomain.com nameConstraints=excluded;email:.com -issuingDistributionPoint = idp_section + =head2 OCSP No Check Modified: stable/10/crypto/openssl/doc/crypto/CMS_decrypt.pod ============================================================================== --- stable/10/crypto/openssl/doc/crypto/CMS_decrypt.pod Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/doc/crypto/CMS_decrypt.pod Mon Jun 9 06:00:28 2014 (r267258) @@ -27,7 +27,21 @@ function or errors about unknown algorit Although the recipients certificate is not needed to decrypt the data it is needed to locate the appropriate (of possible several) recipients in the CMS -structure. If B is set to NULL all possible recipients are tried. +structure. + +If B is set to NULL all possible recipients are tried. This case however +is problematic. To thwart the MMA attack (Bleichenbacher's attack on +PKCS #1 v1.5 RSA padding) all recipients are tried whether they succeed or +not. If no recipient succeeds then a random symmetric key is used to decrypt +the content: this will typically output garbage and may (but is not guaranteed +to) ultimately return a padding error only. If CMS_decrypt() just returned an +error when all recipient encrypted keys failed to decrypt an attacker could +use this in a timing attack. If the special flag B is set +then the above behaviour is modified and an error B returned if no +recipient encrypted key can be decrypted B generating a random +content encryption key. Applications should use this flag with +B especially in automated gateways as it can leave them +open to attack. It is possible to determine the correct recipient key by other means (for example looking them up in a database) and setting them in the CMS structure Modified: stable/10/crypto/openssl/doc/crypto/CONF_modules_free.pod ============================================================================== --- stable/10/crypto/openssl/doc/crypto/CONF_modules_free.pod Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/doc/crypto/CONF_modules_free.pod Mon Jun 9 06:00:28 2014 (r267258) @@ -37,7 +37,7 @@ None of the functions return a value. =head1 SEE ALSO L, L, -L +L =head1 HISTORY Modified: stable/10/crypto/openssl/doc/crypto/CONF_modules_load_file.pod ============================================================================== --- stable/10/crypto/openssl/doc/crypto/CONF_modules_load_file.pod Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/doc/crypto/CONF_modules_load_file.pod Mon Jun 9 06:00:28 2014 (r267258) @@ -51,7 +51,7 @@ return value of the failing module (this =head1 SEE ALSO L, L, -L, L +L, L =head1 HISTORY Modified: stable/10/crypto/openssl/doc/crypto/OPENSSL_config.pod ============================================================================== --- stable/10/crypto/openssl/doc/crypto/OPENSSL_config.pod Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/doc/crypto/OPENSSL_config.pod Mon Jun 9 06:00:28 2014 (r267258) @@ -73,7 +73,7 @@ Neither OPENSSL_config() nor OPENSSL_no_ =head1 SEE ALSO L, L, -L +L =head1 HISTORY Modified: stable/10/crypto/openssl/doc/crypto/X509_NAME_ENTRY_get_object.pod ============================================================================== --- stable/10/crypto/openssl/doc/crypto/X509_NAME_ENTRY_get_object.pod Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/doc/crypto/X509_NAME_ENTRY_get_object.pod Mon Jun 9 06:00:28 2014 (r267258) @@ -65,7 +65,7 @@ set first so the relevant field informat =head1 SEE ALSO L, L, -L +L =head1 HISTORY Modified: stable/10/crypto/openssl/doc/crypto/X509_STORE_CTX_get_ex_new_index.pod ============================================================================== --- stable/10/crypto/openssl/doc/crypto/X509_STORE_CTX_get_ex_new_index.pod Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/doc/crypto/X509_STORE_CTX_get_ex_new_index.pod Mon Jun 9 06:00:28 2014 (r267258) @@ -15,7 +15,7 @@ X509_STORE_CTX_get_ex_new_index, X509_ST int X509_STORE_CTX_set_ex_data(X509_STORE_CTX *d, int idx, void *arg); - char *X509_STORE_CTX_get_ex_data(X509_STORE_CTX *d, int idx); + void *X509_STORE_CTX_get_ex_data(X509_STORE_CTX *d, int idx); =head1 DESCRIPTION Modified: stable/10/crypto/openssl/doc/fingerprints.txt ============================================================================== --- stable/10/crypto/openssl/doc/fingerprints.txt Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/doc/fingerprints.txt Mon Jun 9 06:00:28 2014 (r267258) @@ -21,6 +21,13 @@ pub 2048R/F295C759 1998-12-13 Key fingerprint = D0 5D 8C 61 6E 27 E6 60 41 EC B1 B8 D5 7E E5 97 uid Dr S N Henson +pub 4096R/FA40E9E2 2005-03-19 + Key fingerprint = 6260 5AA4 334A F9F0 DDE5 D349 D357 7507 FA40 E9E2 +uid Dr Stephen Henson +uid Dr Stephen Henson +uid Dr Stephen N Henson +sub 4096R/8811F530 2005-03-19 + pub 1024R/49A563D9 1997-02-24 Key fingerprint = 7B 79 19 FA 71 6B 87 25 0E 77 21 E5 52 D9 83 BF uid Mark Cox Modified: stable/10/crypto/openssl/doc/ssl/SSL_CTX_set_msg_callback.pod ============================================================================== --- stable/10/crypto/openssl/doc/ssl/SSL_CTX_set_msg_callback.pod Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/doc/ssl/SSL_CTX_set_msg_callback.pod Mon Jun 9 06:00:28 2014 (r267258) @@ -11,8 +11,8 @@ SSL_CTX_set_msg_callback, SSL_CTX_set_ms void SSL_CTX_set_msg_callback(SSL_CTX *ctx, void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg)); void SSL_CTX_set_msg_callback_arg(SSL_CTX *ctx, void *arg); - void SSL_set_msg_callback(SSL_CTX *ctx, void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg)); - void SSL_set_msg_callback_arg(SSL_CTX *ctx, void *arg); + void SSL_set_msg_callback(SSL *ssl, void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg)); + void SSL_set_msg_callback_arg(SSL *ssl, void *arg); =head1 DESCRIPTION Modified: stable/10/crypto/openssl/doc/ssl/SSL_CTX_set_options.pod ============================================================================== --- stable/10/crypto/openssl/doc/ssl/SSL_CTX_set_options.pod Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/doc/ssl/SSL_CTX_set_options.pod Mon Jun 9 06:00:28 2014 (r267258) @@ -112,6 +112,12 @@ vulnerability affecting CBC ciphers, whi broken SSL implementations. This option has no effect for connections using other ciphers. +=item SSL_OP_TLSEXT_PADDING + +Adds a padding extension to ensure the ClientHello size is never between +256 and 511 bytes in length. This is needed as a workaround for some +implementations. + =item SSL_OP_ALL All of the above bug workarounds. Modified: stable/10/crypto/openssl/doc/ssl/SSL_get_peer_cert_chain.pod ============================================================================== --- stable/10/crypto/openssl/doc/ssl/SSL_get_peer_cert_chain.pod Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/doc/ssl/SSL_get_peer_cert_chain.pod Mon Jun 9 06:00:28 2014 (r267258) @@ -8,11 +8,11 @@ SSL_get_peer_cert_chain - get the X509 c #include - STACKOF(X509) *SSL_get_peer_cert_chain(const SSL *ssl); + STACK_OF(X509) *SSL_get_peer_cert_chain(const SSL *ssl); =head1 DESCRIPTION -SSL_get_peer_cert_chain() returns a pointer to STACKOF(X509) certificates +SSL_get_peer_cert_chain() returns a pointer to STACK_OF(X509) certificates forming the certificate chain of the peer. If called on the client side, the stack also contains the peer's certificate; if called on the server side, the peer's certificate must be obtained separately using @@ -24,7 +24,7 @@ If the peer did not present a certificat The peer certificate chain is not necessarily available after reusing a session, in which case a NULL pointer is returned. -The reference count of the STACKOF(X509) object is not incremented. +The reference count of the STACK_OF(X509) object is not incremented. If the corresponding session is freed, the pointer must not be used any longer. @@ -39,7 +39,7 @@ The following return values can occur: No certificate was presented by the peer or no connection was established or the certificate chain is no longer available when a session is reused. -=item Pointer to a STACKOF(X509) +=item Pointer to a STACK_OF(X509) The return value points to the certificate chain presented by the peer. Modified: stable/10/crypto/openssl/engines/ccgost/gost_ameth.c ============================================================================== --- stable/10/crypto/openssl/engines/ccgost/gost_ameth.c Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/engines/ccgost/gost_ameth.c Mon Jun 9 06:00:28 2014 (r267258) @@ -269,7 +269,7 @@ static int pkey_ctrl_gost(EVP_PKEY *pkey case ASN1_PKEY_CTRL_CMS_ENVELOPE: if (arg1 == 0) { - X509_ALGOR *alg; + X509_ALGOR *alg = NULL; ASN1_STRING * params = encode_gost_algor_params(pkey); if (!params) { Modified: stable/10/crypto/openssl/ssl/Makefile ============================================================================== --- stable/10/crypto/openssl/ssl/Makefile Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/ssl/Makefile Mon Jun 9 06:00:28 2014 (r267258) @@ -15,7 +15,7 @@ KRB5_INCLUDES= CFLAGS= $(INCLUDES) $(CFLAG) GENERAL=Makefile README ssl-lib.com install.com -TEST=ssltest.c +TEST=ssltest.c heartbeat_test.c APPS= LIB=$(TOP)/libssl.a Modified: stable/10/crypto/openssl/ssl/d1_both.c ============================================================================== --- stable/10/crypto/openssl/ssl/d1_both.c Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/ssl/d1_both.c Mon Jun 9 06:00:28 2014 (r267258) @@ -683,8 +683,8 @@ dtls1_reassemble_fragment(SSL *s, struct item = pitem_new(seq64be, frag); if (item == NULL) { - goto err; i = -1; + goto err; } pqueue_insert(s->d1->buffered_messages, item); Modified: stable/10/crypto/openssl/ssl/d1_lib.c ============================================================================== --- stable/10/crypto/openssl/ssl/d1_lib.c Mon Jun 9 05:56:18 2014 (r267257) +++ stable/10/crypto/openssl/ssl/d1_lib.c Mon Jun 9 06:00:28 2014 (r267258) @@ -176,9 +176,12 @@ static void dtls1_clear_queues(SSL *s) while ( (item = pqueue_pop(s->d1->buffered_app_data.q)) != NULL) { - frag = (hm_fragment *)item->data; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Mon Jun 9 06:03:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 056AEC33; Mon, 9 Jun 2014 06:03:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1FC12F02; Mon, 9 Jun 2014 06:03:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5963ifi008889; Mon, 9 Jun 2014 06:03:44 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5963ddf008840; Mon, 9 Jun 2014 06:03:39 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201406090603.s5963ddf008840@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 9 Jun 2014 06:03:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r267259 - in stable/8: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/asn1 crypto/openssl/crypto/bn crypto/openssl/crypto/cms crypto/openssl/crypto/ec cr... X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 06:03:45 -0000 Author: jkim Date: Mon Jun 9 06:03:38 2014 New Revision: 267259 URL: http://svnweb.freebsd.org/changeset/base/267259 Log: Merge OpenSSL 0.9.8za. Approved by: so (delphij) Modified: stable/8/crypto/openssl/ACKNOWLEDGMENTS stable/8/crypto/openssl/CHANGES stable/8/crypto/openssl/Configure stable/8/crypto/openssl/FAQ stable/8/crypto/openssl/Makefile stable/8/crypto/openssl/Makefile.org stable/8/crypto/openssl/NEWS stable/8/crypto/openssl/README stable/8/crypto/openssl/apps/apps.c stable/8/crypto/openssl/apps/ocsp.c stable/8/crypto/openssl/apps/req.c stable/8/crypto/openssl/apps/s_cb.c stable/8/crypto/openssl/apps/smime.c stable/8/crypto/openssl/crypto/asn1/a_int.c stable/8/crypto/openssl/crypto/asn1/a_strnid.c stable/8/crypto/openssl/crypto/asn1/t_pkey.c stable/8/crypto/openssl/crypto/bn/bn_mont.c stable/8/crypto/openssl/crypto/cms/cms_cd.c stable/8/crypto/openssl/crypto/cms/cms_env.c stable/8/crypto/openssl/crypto/cms/cms_lib.c stable/8/crypto/openssl/crypto/cms/cms_sd.c stable/8/crypto/openssl/crypto/cms/cms_smime.c stable/8/crypto/openssl/crypto/ec/ec_lib.c stable/8/crypto/openssl/crypto/engine/eng_all.c stable/8/crypto/openssl/crypto/engine/engine.h stable/8/crypto/openssl/crypto/err/err_all.c stable/8/crypto/openssl/crypto/err/openssl.ec stable/8/crypto/openssl/crypto/evp/bio_b64.c stable/8/crypto/openssl/crypto/evp/encode.c stable/8/crypto/openssl/crypto/opensslv.h stable/8/crypto/openssl/crypto/pkcs12/p12_crt.c stable/8/crypto/openssl/crypto/pkcs12/p12_kiss.c stable/8/crypto/openssl/crypto/x86cpuid.pl stable/8/crypto/openssl/demos/x509/mkreq.c stable/8/crypto/openssl/doc/apps/smime.pod stable/8/crypto/openssl/doc/apps/verify.pod stable/8/crypto/openssl/doc/crypto/CONF_modules_free.pod stable/8/crypto/openssl/doc/crypto/CONF_modules_load_file.pod stable/8/crypto/openssl/doc/crypto/ERR_get_error.pod stable/8/crypto/openssl/doc/crypto/OPENSSL_config.pod stable/8/crypto/openssl/doc/crypto/X509_NAME_ENTRY_get_object.pod stable/8/crypto/openssl/doc/crypto/ecdsa.pod stable/8/crypto/openssl/doc/fingerprints.txt stable/8/crypto/openssl/doc/ssl/SSL_COMP_add_compression_method.pod stable/8/crypto/openssl/doc/ssl/SSL_CTX_add_session.pod stable/8/crypto/openssl/doc/ssl/SSL_CTX_load_verify_locations.pod stable/8/crypto/openssl/doc/ssl/SSL_CTX_set_client_CA_list.pod stable/8/crypto/openssl/doc/ssl/SSL_CTX_set_msg_callback.pod stable/8/crypto/openssl/doc/ssl/SSL_CTX_set_options.pod stable/8/crypto/openssl/doc/ssl/SSL_CTX_set_session_id_context.pod stable/8/crypto/openssl/doc/ssl/SSL_CTX_set_ssl_version.pod stable/8/crypto/openssl/doc/ssl/SSL_accept.pod stable/8/crypto/openssl/doc/ssl/SSL_clear.pod stable/8/crypto/openssl/doc/ssl/SSL_connect.pod stable/8/crypto/openssl/doc/ssl/SSL_do_handshake.pod stable/8/crypto/openssl/doc/ssl/SSL_read.pod stable/8/crypto/openssl/doc/ssl/SSL_session_reused.pod stable/8/crypto/openssl/doc/ssl/SSL_set_fd.pod stable/8/crypto/openssl/doc/ssl/SSL_set_session.pod stable/8/crypto/openssl/doc/ssl/SSL_set_shutdown.pod stable/8/crypto/openssl/doc/ssl/SSL_shutdown.pod stable/8/crypto/openssl/doc/ssl/SSL_write.pod stable/8/crypto/openssl/openssl.spec stable/8/crypto/openssl/ssl/d1_both.c stable/8/crypto/openssl/ssl/d1_lib.c stable/8/crypto/openssl/ssl/d1_pkt.c stable/8/crypto/openssl/ssl/d1_srvr.c stable/8/crypto/openssl/ssl/s23_clnt.c stable/8/crypto/openssl/ssl/s3_cbc.c stable/8/crypto/openssl/ssl/s3_clnt.c stable/8/crypto/openssl/ssl/s3_enc.c stable/8/crypto/openssl/ssl/s3_lib.c stable/8/crypto/openssl/ssl/s3_pkt.c stable/8/crypto/openssl/ssl/s3_srvr.c stable/8/crypto/openssl/ssl/ssl.h stable/8/crypto/openssl/ssl/ssl3.h stable/8/crypto/openssl/ssl/ssl_err.c stable/8/crypto/openssl/ssl/ssl_lib.c stable/8/crypto/openssl/ssl/ssl_stat.c stable/8/crypto/openssl/ssl/ssltest.c stable/8/crypto/openssl/ssl/t1_enc.c stable/8/crypto/openssl/ssl/t1_lib.c stable/8/crypto/openssl/ssl/tls1.h stable/8/crypto/openssl/test/Makefile stable/8/crypto/openssl/test/cms-test.pl stable/8/crypto/openssl/test/testssl stable/8/crypto/openssl/util/libeay.num stable/8/crypto/openssl/util/pl/VC-32.pl stable/8/secure/lib/libcrypto/Makefile.inc stable/8/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 stable/8/secure/lib/libcrypto/man/ASN1_STRING_length.3 stable/8/secure/lib/libcrypto/man/ASN1_STRING_new.3 stable/8/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 stable/8/secure/lib/libcrypto/man/ASN1_generate_nconf.3 stable/8/secure/lib/libcrypto/man/BIO_ctrl.3 stable/8/secure/lib/libcrypto/man/BIO_f_base64.3 stable/8/secure/lib/libcrypto/man/BIO_f_buffer.3 stable/8/secure/lib/libcrypto/man/BIO_f_cipher.3 stable/8/secure/lib/libcrypto/man/BIO_f_md.3 stable/8/secure/lib/libcrypto/man/BIO_f_null.3 stable/8/secure/lib/libcrypto/man/BIO_f_ssl.3 stable/8/secure/lib/libcrypto/man/BIO_find_type.3 stable/8/secure/lib/libcrypto/man/BIO_new.3 stable/8/secure/lib/libcrypto/man/BIO_push.3 stable/8/secure/lib/libcrypto/man/BIO_read.3 stable/8/secure/lib/libcrypto/man/BIO_s_accept.3 stable/8/secure/lib/libcrypto/man/BIO_s_bio.3 stable/8/secure/lib/libcrypto/man/BIO_s_connect.3 stable/8/secure/lib/libcrypto/man/BIO_s_fd.3 stable/8/secure/lib/libcrypto/man/BIO_s_file.3 stable/8/secure/lib/libcrypto/man/BIO_s_mem.3 stable/8/secure/lib/libcrypto/man/BIO_s_null.3 stable/8/secure/lib/libcrypto/man/BIO_s_socket.3 stable/8/secure/lib/libcrypto/man/BIO_set_callback.3 stable/8/secure/lib/libcrypto/man/BIO_should_retry.3 stable/8/secure/lib/libcrypto/man/BN_BLINDING_new.3 stable/8/secure/lib/libcrypto/man/BN_CTX_new.3 stable/8/secure/lib/libcrypto/man/BN_CTX_start.3 stable/8/secure/lib/libcrypto/man/BN_add.3 stable/8/secure/lib/libcrypto/man/BN_add_word.3 stable/8/secure/lib/libcrypto/man/BN_bn2bin.3 stable/8/secure/lib/libcrypto/man/BN_cmp.3 stable/8/secure/lib/libcrypto/man/BN_copy.3 stable/8/secure/lib/libcrypto/man/BN_generate_prime.3 stable/8/secure/lib/libcrypto/man/BN_mod_inverse.3 stable/8/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 stable/8/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 stable/8/secure/lib/libcrypto/man/BN_new.3 stable/8/secure/lib/libcrypto/man/BN_num_bytes.3 stable/8/secure/lib/libcrypto/man/BN_rand.3 stable/8/secure/lib/libcrypto/man/BN_set_bit.3 stable/8/secure/lib/libcrypto/man/BN_swap.3 stable/8/secure/lib/libcrypto/man/BN_zero.3 stable/8/secure/lib/libcrypto/man/CONF_modules_free.3 stable/8/secure/lib/libcrypto/man/CONF_modules_load_file.3 stable/8/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 stable/8/secure/lib/libcrypto/man/DH_generate_key.3 stable/8/secure/lib/libcrypto/man/DH_generate_parameters.3 stable/8/secure/lib/libcrypto/man/DH_get_ex_new_index.3 stable/8/secure/lib/libcrypto/man/DH_new.3 stable/8/secure/lib/libcrypto/man/DH_set_method.3 stable/8/secure/lib/libcrypto/man/DH_size.3 stable/8/secure/lib/libcrypto/man/DSA_SIG_new.3 stable/8/secure/lib/libcrypto/man/DSA_do_sign.3 stable/8/secure/lib/libcrypto/man/DSA_dup_DH.3 stable/8/secure/lib/libcrypto/man/DSA_generate_key.3 stable/8/secure/lib/libcrypto/man/DSA_generate_parameters.3 stable/8/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 stable/8/secure/lib/libcrypto/man/DSA_new.3 stable/8/secure/lib/libcrypto/man/DSA_set_method.3 stable/8/secure/lib/libcrypto/man/DSA_sign.3 stable/8/secure/lib/libcrypto/man/DSA_size.3 stable/8/secure/lib/libcrypto/man/ERR_GET_LIB.3 stable/8/secure/lib/libcrypto/man/ERR_clear_error.3 stable/8/secure/lib/libcrypto/man/ERR_error_string.3 stable/8/secure/lib/libcrypto/man/ERR_get_error.3 stable/8/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 stable/8/secure/lib/libcrypto/man/ERR_load_strings.3 stable/8/secure/lib/libcrypto/man/ERR_print_errors.3 stable/8/secure/lib/libcrypto/man/ERR_put_error.3 stable/8/secure/lib/libcrypto/man/ERR_remove_state.3 stable/8/secure/lib/libcrypto/man/ERR_set_mark.3 stable/8/secure/lib/libcrypto/man/EVP_BytesToKey.3 stable/8/secure/lib/libcrypto/man/EVP_DigestInit.3 stable/8/secure/lib/libcrypto/man/EVP_EncryptInit.3 stable/8/secure/lib/libcrypto/man/EVP_OpenInit.3 stable/8/secure/lib/libcrypto/man/EVP_PKEY_new.3 stable/8/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 stable/8/secure/lib/libcrypto/man/EVP_SealInit.3 stable/8/secure/lib/libcrypto/man/EVP_SignInit.3 stable/8/secure/lib/libcrypto/man/EVP_VerifyInit.3 stable/8/secure/lib/libcrypto/man/OBJ_nid2obj.3 stable/8/secure/lib/libcrypto/man/OPENSSL_Applink.3 stable/8/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 stable/8/secure/lib/libcrypto/man/OPENSSL_config.3 stable/8/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 stable/8/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 stable/8/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 stable/8/secure/lib/libcrypto/man/PKCS12_create.3 stable/8/secure/lib/libcrypto/man/PKCS12_parse.3 stable/8/secure/lib/libcrypto/man/PKCS7_decrypt.3 stable/8/secure/lib/libcrypto/man/PKCS7_encrypt.3 stable/8/secure/lib/libcrypto/man/PKCS7_sign.3 stable/8/secure/lib/libcrypto/man/PKCS7_verify.3 stable/8/secure/lib/libcrypto/man/RAND_add.3 stable/8/secure/lib/libcrypto/man/RAND_bytes.3 stable/8/secure/lib/libcrypto/man/RAND_cleanup.3 stable/8/secure/lib/libcrypto/man/RAND_egd.3 stable/8/secure/lib/libcrypto/man/RAND_load_file.3 stable/8/secure/lib/libcrypto/man/RAND_set_rand_method.3 stable/8/secure/lib/libcrypto/man/RSA_blinding_on.3 stable/8/secure/lib/libcrypto/man/RSA_check_key.3 stable/8/secure/lib/libcrypto/man/RSA_generate_key.3 stable/8/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 stable/8/secure/lib/libcrypto/man/RSA_new.3 stable/8/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 stable/8/secure/lib/libcrypto/man/RSA_print.3 stable/8/secure/lib/libcrypto/man/RSA_private_encrypt.3 stable/8/secure/lib/libcrypto/man/RSA_public_encrypt.3 stable/8/secure/lib/libcrypto/man/RSA_set_method.3 stable/8/secure/lib/libcrypto/man/RSA_sign.3 stable/8/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 stable/8/secure/lib/libcrypto/man/RSA_size.3 stable/8/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 stable/8/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 stable/8/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 stable/8/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 stable/8/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 stable/8/secure/lib/libcrypto/man/X509_NAME_print_ex.3 stable/8/secure/lib/libcrypto/man/X509_new.3 stable/8/secure/lib/libcrypto/man/bio.3 stable/8/secure/lib/libcrypto/man/blowfish.3 stable/8/secure/lib/libcrypto/man/bn.3 stable/8/secure/lib/libcrypto/man/bn_internal.3 stable/8/secure/lib/libcrypto/man/buffer.3 stable/8/secure/lib/libcrypto/man/crypto.3 stable/8/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 stable/8/secure/lib/libcrypto/man/d2i_DHparams.3 stable/8/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 stable/8/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 stable/8/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 stable/8/secure/lib/libcrypto/man/d2i_X509.3 stable/8/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 stable/8/secure/lib/libcrypto/man/d2i_X509_CRL.3 stable/8/secure/lib/libcrypto/man/d2i_X509_NAME.3 stable/8/secure/lib/libcrypto/man/d2i_X509_REQ.3 stable/8/secure/lib/libcrypto/man/d2i_X509_SIG.3 stable/8/secure/lib/libcrypto/man/des.3 stable/8/secure/lib/libcrypto/man/dh.3 stable/8/secure/lib/libcrypto/man/dsa.3 stable/8/secure/lib/libcrypto/man/ecdsa.3 stable/8/secure/lib/libcrypto/man/engine.3 stable/8/secure/lib/libcrypto/man/err.3 stable/8/secure/lib/libcrypto/man/evp.3 stable/8/secure/lib/libcrypto/man/hmac.3 stable/8/secure/lib/libcrypto/man/lh_stats.3 stable/8/secure/lib/libcrypto/man/lhash.3 stable/8/secure/lib/libcrypto/man/md5.3 stable/8/secure/lib/libcrypto/man/mdc2.3 stable/8/secure/lib/libcrypto/man/pem.3 stable/8/secure/lib/libcrypto/man/rand.3 stable/8/secure/lib/libcrypto/man/rc4.3 stable/8/secure/lib/libcrypto/man/ripemd.3 stable/8/secure/lib/libcrypto/man/rsa.3 stable/8/secure/lib/libcrypto/man/sha.3 stable/8/secure/lib/libcrypto/man/threads.3 stable/8/secure/lib/libcrypto/man/ui.3 stable/8/secure/lib/libcrypto/man/ui_compat.3 stable/8/secure/lib/libcrypto/man/x509.3 stable/8/secure/lib/libssl/man/SSL_CIPHER_get_name.3 stable/8/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 stable/8/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 stable/8/secure/lib/libssl/man/SSL_CTX_add_session.3 stable/8/secure/lib/libssl/man/SSL_CTX_ctrl.3 stable/8/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 stable/8/secure/lib/libssl/man/SSL_CTX_free.3 stable/8/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 stable/8/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 stable/8/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 stable/8/secure/lib/libssl/man/SSL_CTX_new.3 stable/8/secure/lib/libssl/man/SSL_CTX_sess_number.3 stable/8/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 stable/8/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 stable/8/secure/lib/libssl/man/SSL_CTX_sessions.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_mode.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_options.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_timeout.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_verify.3 stable/8/secure/lib/libssl/man/SSL_CTX_use_certificate.3 stable/8/secure/lib/libssl/man/SSL_SESSION_free.3 stable/8/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 stable/8/secure/lib/libssl/man/SSL_SESSION_get_time.3 stable/8/secure/lib/libssl/man/SSL_accept.3 stable/8/secure/lib/libssl/man/SSL_alert_type_string.3 stable/8/secure/lib/libssl/man/SSL_clear.3 stable/8/secure/lib/libssl/man/SSL_connect.3 stable/8/secure/lib/libssl/man/SSL_do_handshake.3 stable/8/secure/lib/libssl/man/SSL_free.3 stable/8/secure/lib/libssl/man/SSL_get_SSL_CTX.3 stable/8/secure/lib/libssl/man/SSL_get_ciphers.3 stable/8/secure/lib/libssl/man/SSL_get_client_CA_list.3 stable/8/secure/lib/libssl/man/SSL_get_current_cipher.3 stable/8/secure/lib/libssl/man/SSL_get_default_timeout.3 stable/8/secure/lib/libssl/man/SSL_get_error.3 stable/8/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 stable/8/secure/lib/libssl/man/SSL_get_ex_new_index.3 stable/8/secure/lib/libssl/man/SSL_get_fd.3 stable/8/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 stable/8/secure/lib/libssl/man/SSL_get_peer_certificate.3 stable/8/secure/lib/libssl/man/SSL_get_rbio.3 stable/8/secure/lib/libssl/man/SSL_get_session.3 stable/8/secure/lib/libssl/man/SSL_get_verify_result.3 stable/8/secure/lib/libssl/man/SSL_get_version.3 stable/8/secure/lib/libssl/man/SSL_library_init.3 stable/8/secure/lib/libssl/man/SSL_load_client_CA_file.3 stable/8/secure/lib/libssl/man/SSL_new.3 stable/8/secure/lib/libssl/man/SSL_pending.3 stable/8/secure/lib/libssl/man/SSL_read.3 stable/8/secure/lib/libssl/man/SSL_rstate_string.3 stable/8/secure/lib/libssl/man/SSL_session_reused.3 stable/8/secure/lib/libssl/man/SSL_set_bio.3 stable/8/secure/lib/libssl/man/SSL_set_connect_state.3 stable/8/secure/lib/libssl/man/SSL_set_fd.3 stable/8/secure/lib/libssl/man/SSL_set_session.3 stable/8/secure/lib/libssl/man/SSL_set_shutdown.3 stable/8/secure/lib/libssl/man/SSL_set_verify_result.3 stable/8/secure/lib/libssl/man/SSL_shutdown.3 stable/8/secure/lib/libssl/man/SSL_state_string.3 stable/8/secure/lib/libssl/man/SSL_want.3 stable/8/secure/lib/libssl/man/SSL_write.3 stable/8/secure/lib/libssl/man/d2i_SSL_SESSION.3 stable/8/secure/lib/libssl/man/ssl.3 stable/8/secure/usr.bin/openssl/man/CA.pl.1 stable/8/secure/usr.bin/openssl/man/asn1parse.1 stable/8/secure/usr.bin/openssl/man/ca.1 stable/8/secure/usr.bin/openssl/man/ciphers.1 stable/8/secure/usr.bin/openssl/man/crl.1 stable/8/secure/usr.bin/openssl/man/crl2pkcs7.1 stable/8/secure/usr.bin/openssl/man/dgst.1 stable/8/secure/usr.bin/openssl/man/dhparam.1 stable/8/secure/usr.bin/openssl/man/dsa.1 stable/8/secure/usr.bin/openssl/man/dsaparam.1 stable/8/secure/usr.bin/openssl/man/ec.1 stable/8/secure/usr.bin/openssl/man/ecparam.1 stable/8/secure/usr.bin/openssl/man/enc.1 stable/8/secure/usr.bin/openssl/man/errstr.1 stable/8/secure/usr.bin/openssl/man/gendsa.1 stable/8/secure/usr.bin/openssl/man/genrsa.1 stable/8/secure/usr.bin/openssl/man/nseq.1 stable/8/secure/usr.bin/openssl/man/ocsp.1 stable/8/secure/usr.bin/openssl/man/openssl.1 stable/8/secure/usr.bin/openssl/man/passwd.1 stable/8/secure/usr.bin/openssl/man/pkcs12.1 stable/8/secure/usr.bin/openssl/man/pkcs7.1 stable/8/secure/usr.bin/openssl/man/pkcs8.1 stable/8/secure/usr.bin/openssl/man/rand.1 stable/8/secure/usr.bin/openssl/man/req.1 stable/8/secure/usr.bin/openssl/man/rsa.1 stable/8/secure/usr.bin/openssl/man/rsautl.1 stable/8/secure/usr.bin/openssl/man/s_client.1 stable/8/secure/usr.bin/openssl/man/s_server.1 stable/8/secure/usr.bin/openssl/man/s_time.1 stable/8/secure/usr.bin/openssl/man/sess_id.1 stable/8/secure/usr.bin/openssl/man/smime.1 stable/8/secure/usr.bin/openssl/man/speed.1 stable/8/secure/usr.bin/openssl/man/spkac.1 stable/8/secure/usr.bin/openssl/man/verify.1 stable/8/secure/usr.bin/openssl/man/version.1 stable/8/secure/usr.bin/openssl/man/x509.1 stable/8/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: stable/8/crypto/openssl/ (props changed) Modified: stable/8/crypto/openssl/ACKNOWLEDGMENTS ============================================================================== --- stable/8/crypto/openssl/ACKNOWLEDGMENTS Mon Jun 9 06:00:28 2014 (r267258) +++ stable/8/crypto/openssl/ACKNOWLEDGMENTS Mon Jun 9 06:03:38 2014 (r267259) @@ -10,13 +10,18 @@ OpenSSL project. We would like to identify and thank the following such sponsors for their past or current significant support of the OpenSSL project: +Major support: + + Qualys http://www.qualys.com/ + Very significant support: - OpenGear: www.opengear.com + OpenGear: http://www.opengear.com/ Significant support: - PSW Group: www.psw.net + PSW Group: http://www.psw.net/ + Acano Ltd. http://acano.com/ Please note that we ask permission to identify sponsors and that some sponsors we consider eligible for inclusion here have requested to remain anonymous. Modified: stable/8/crypto/openssl/CHANGES ============================================================================== --- stable/8/crypto/openssl/CHANGES Mon Jun 9 06:00:28 2014 (r267258) +++ stable/8/crypto/openssl/CHANGES Mon Jun 9 06:03:38 2014 (r267259) @@ -2,6 +2,64 @@ OpenSSL CHANGES _______________ + Changes between 0.9.8y and 0.9.8za [5 Jun 2014] + + *) Fix for SSL/TLS MITM flaw. An attacker using a carefully crafted + handshake can force the use of weak keying material in OpenSSL + SSL/TLS clients and servers. + + Thanks to KIKUCHI Masashi (Lepidum Co. Ltd.) for discovering and + researching this issue. (CVE-2014-0224) + [KIKUCHI Masashi, Steve Henson] + + *) Fix DTLS recursion flaw. By sending an invalid DTLS handshake to an + OpenSSL DTLS client the code can be made to recurse eventually crashing + in a DoS attack. + + Thanks to Imre Rad (Search-Lab Ltd.) for discovering this issue. + (CVE-2014-0221) + [Imre Rad, Steve Henson] + + *) Fix DTLS invalid fragment vulnerability. A buffer overrun attack can + be triggered by sending invalid DTLS fragments to an OpenSSL DTLS + client or server. This is potentially exploitable to run arbitrary + code on a vulnerable client or server. + + Thanks to Jüri Aedla for reporting this issue. (CVE-2014-0195) + [Jüri Aedla, Steve Henson] + + *) Fix bug in TLS code where clients enable anonymous ECDH ciphersuites + are subject to a denial of service attack. + + Thanks to Felix Gröbert and Ivan Fratric at Google for discovering + this issue. (CVE-2014-3470) + [Felix Gröbert, Ivan Fratric, Steve Henson] + + *) Fix for the attack described in the paper "Recovering OpenSSL + ECDSA Nonces Using the FLUSH+RELOAD Cache Side-channel Attack" + by Yuval Yarom and Naomi Benger. Details can be obtained from: + http://eprint.iacr.org/2014/140 + + Thanks to Yuval Yarom and Naomi Benger for discovering this + flaw and to Yuval Yarom for supplying a fix (CVE-2014-0076) + [Yuval Yarom and Naomi Benger] + + Thanks to mancha for backporting the fix to the 0.9.8 branch. + + *) Fix handling of warning-level alerts in SSL23 client mode so they + don't cause client-side termination (eg. on SNI unrecognized_name + warnings). Add client and server support for six additional alerts + per RFC 6066 and RFC 4279. + [mancha] + + *) Add option SSL_OP_SAFARI_ECDHE_ECDSA_BUG (part of SSL_OP_ALL) which + avoids preferring ECDHE-ECDSA ciphers when the client appears to be + Safari on OS X. Safari on OS X 10.8..10.8.3 advertises support for + several ECDHE-ECDSA ciphers, but fails to negotiate them. The bug + is fixed in OS X 10.8.4, but Apple have ruled out both hot fixing + 10.8..10.8.3 and forcing users to upgrade to 10.8.4 or newer. + [Rob Stradling, Adam Langley] + Changes between 0.9.8x and 0.9.8y [5 Feb 2013] *) Make the decoding of SSLv3, TLS and DTLS CBC records constant time. Modified: stable/8/crypto/openssl/Configure ============================================================================== --- stable/8/crypto/openssl/Configure Mon Jun 9 06:00:28 2014 (r267258) +++ stable/8/crypto/openssl/Configure Mon Jun 9 06:03:38 2014 (r267259) @@ -166,7 +166,7 @@ my %table=( "debug-ben-debug-noopt", "gcc:$gcc_devteam_warn -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -ggdb3 -pipe::(unknown)::::::", "debug-ben-strict", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe::(unknown)::::::", "debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", -"debug-bodo", "gcc:-DL_ENDIAN -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBIO_PAIR_DEBUG -DPEDANTIC -g -march=i486 -pedantic -Wshadow -Wall -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", +"debug-bodo", "gcc:$gcc_devteam_warn -Wno-error=overlength-strings -DBN_DEBUG -DBN_DEBUG_RAND -DCONF_DEBUG -DBIO_PAIR_DEBUG -m64 -DL_ENDIAN -DTERMIO -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", "debug-ulf", "gcc:-DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG -DBN_DEBUG_RAND -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations:::CYGWIN32:::${no_asm}:win32:cygwin-shared:::.dll", "debug-steve64", "gcc:$gcc_devteam_warn -m64 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-steve32", "gcc:$gcc_devteam_warn -m32 -DL_ENDIAN -DCONF_DEBUG -DDEBUG_SAFESTACK -g -pipe::-D_REENTRANT::-rdynamic -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC:-m32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", Modified: stable/8/crypto/openssl/FAQ ============================================================================== --- stable/8/crypto/openssl/FAQ Mon Jun 9 06:00:28 2014 (r267258) +++ stable/8/crypto/openssl/FAQ Mon Jun 9 06:03:38 2014 (r267259) @@ -87,7 +87,7 @@ OpenSSL 1.0.1d was released on Feb 5th, In addition to the current stable release, you can also access daily snapshots of the OpenSSL development version at , or get it by anonymous CVS access. +ftp://ftp.openssl.org/snapshot/>, or get it by anonymous Git access. * Where is the documentation? @@ -768,6 +768,9 @@ openssl-security@openssl.org if you don' acknowledging receipt then resend or mail it directly to one of the more active team members (e.g. Steve). +Note that bugs only present in the openssl utility are not in general +considered to be security issues. + [PROG] ======================================================================== * Is OpenSSL thread-safe? Modified: stable/8/crypto/openssl/Makefile ============================================================================== --- stable/8/crypto/openssl/Makefile Mon Jun 9 06:00:28 2014 (r267258) +++ stable/8/crypto/openssl/Makefile Mon Jun 9 06:03:38 2014 (r267259) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=0.9.8y +VERSION=0.9.8za MAJOR=0 MINOR=9.8 SHLIB_VERSION_NUMBER=0.9.8 @@ -71,7 +71,7 @@ ARD=ar $(ARFLAGS) d RANLIB= /usr/bin/ranlib PERL= /usr/bin/perl TAR= tar -TARFLAGS= --no-recursion +TARFLAGS= --no-recursion --record-size=10240 MAKEDEPPROG=makedepend LIBDIR=lib Modified: stable/8/crypto/openssl/Makefile.org ============================================================================== --- stable/8/crypto/openssl/Makefile.org Mon Jun 9 06:00:28 2014 (r267258) +++ stable/8/crypto/openssl/Makefile.org Mon Jun 9 06:03:38 2014 (r267259) @@ -69,7 +69,7 @@ ARD=ar $(ARFLAGS) d RANLIB= ranlib PERL= perl TAR= tar -TARFLAGS= --no-recursion +TARFLAGS= --no-recursion --record-size=10240 MAKEDEPPROG=makedepend LIBDIR=lib Modified: stable/8/crypto/openssl/NEWS ============================================================================== --- stable/8/crypto/openssl/NEWS Mon Jun 9 06:00:28 2014 (r267258) +++ stable/8/crypto/openssl/NEWS Mon Jun 9 06:03:38 2014 (r267259) @@ -5,34 +5,44 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. - Major changes between OpenSSL 0.9.8x and OpenSSL 0.9.8y: + Major changes between OpenSSL 0.9.8y and OpenSSL 0.9.8za [5 Jun 2014]: + + o Fix for CVE-2014-0224 + o Fix for CVE-2014-0221 + o Fix for CVE-2014-0195 + o Fix for CVE-2014-3470 + o Fix for CVE-2014-0076 + o Fix for CVE-2010-5298 + o Fix to TLS alert handling. + + Major changes between OpenSSL 0.9.8x and OpenSSL 0.9.8y [5 Feb 2013]: o Fix for SSL/TLS/DTLS CBC plaintext recovery attack CVE-2013-0169 o Fix OCSP bad key DoS attack CVE-2013-0166 - Major changes between OpenSSL 0.9.8w and OpenSSL 0.9.8x: + Major changes between OpenSSL 0.9.8w and OpenSSL 0.9.8x [10 May 2012]: o Fix DTLS record length checking bug CVE-2012-2333 - Major changes between OpenSSL 0.9.8v and OpenSSL 0.9.8w: + Major changes between OpenSSL 0.9.8v and OpenSSL 0.9.8w [23 Apr 2012]: o Fix for CVE-2012-2131 (corrected fix for 0.9.8 and CVE-2012-2110) - Major changes between OpenSSL 0.9.8u and OpenSSL 0.9.8v: + Major changes between OpenSSL 0.9.8u and OpenSSL 0.9.8v [19 Apr 2012]: o Fix for ASN1 overflow bug CVE-2012-2110 - Major changes between OpenSSL 0.9.8t and OpenSSL 0.9.8u: + Major changes between OpenSSL 0.9.8t and OpenSSL 0.9.8u [12 Mar 2012]: o Fix for CMS/PKCS#7 MMA CVE-2012-0884 o Corrected fix for CVE-2011-4619 o Various DTLS fixes. - Major changes between OpenSSL 0.9.8s and OpenSSL 0.9.8t: + Major changes between OpenSSL 0.9.8s and OpenSSL 0.9.8t [18 Jan 2012]: o Fix for DTLS DoS issue CVE-2012-0050 - Major changes between OpenSSL 0.9.8r and OpenSSL 0.9.8s: + Major changes between OpenSSL 0.9.8r and OpenSSL 0.9.8s [4 Jan 2012]: o Fix for DTLS plaintext recovery attack CVE-2011-4108 o Fix policy check double free error CVE-2011-4109 @@ -40,20 +50,20 @@ o Only allow one SGC handshake restart for SSL/TLS CVE-2011-4619 o Check for malformed RFC3779 data CVE-2011-4577 - Major changes between OpenSSL 0.9.8q and OpenSSL 0.9.8r: + Major changes between OpenSSL 0.9.8q and OpenSSL 0.9.8r [8 Feb 2011]: o Fix for security issue CVE-2011-0014 - Major changes between OpenSSL 0.9.8p and OpenSSL 0.9.8q: + Major changes between OpenSSL 0.9.8p and OpenSSL 0.9.8q [2 Dec 2010]: o Fix for security issue CVE-2010-4180 o Fix for CVE-2010-4252 - Major changes between OpenSSL 0.9.8o and OpenSSL 0.9.8p: + Major changes between OpenSSL 0.9.8o and OpenSSL 0.9.8p [16 Nov 2010]: o Fix for security issue CVE-2010-3864. - Major changes between OpenSSL 0.9.8n and OpenSSL 0.9.8o: + Major changes between OpenSSL 0.9.8n and OpenSSL 0.9.8o [1 Jun 2010]: o Fix for security issue CVE-2010-0742. o Various DTLS fixes. @@ -61,12 +71,12 @@ o Fix for no-rc4 compilation. o Chil ENGINE unload workaround. - Major changes between OpenSSL 0.9.8m and OpenSSL 0.9.8n: + Major changes between OpenSSL 0.9.8m and OpenSSL 0.9.8n [24 Mar 2010]: o CFB cipher definition fixes. o Fix security issues CVE-2010-0740 and CVE-2010-0433. - Major changes between OpenSSL 0.9.8l and OpenSSL 0.9.8m: + Major changes between OpenSSL 0.9.8l and OpenSSL 0.9.8m [25 Feb 2010]: o Cipher definition fixes. o Workaround for slow RAND_poll() on some WIN32 versions. @@ -78,33 +88,33 @@ o Ticket and SNI coexistence fixes. o Many fixes to DTLS handling. - Major changes between OpenSSL 0.9.8k and OpenSSL 0.9.8l: + Major changes between OpenSSL 0.9.8k and OpenSSL 0.9.8l [5 Nov 2009]: o Temporary work around for CVE-2009-3555: disable renegotiation. - Major changes between OpenSSL 0.9.8j and OpenSSL 0.9.8k: + Major changes between OpenSSL 0.9.8j and OpenSSL 0.9.8k [25 Mar 2009]: o Fix various build issues. o Fix security issues (CVE-2009-0590, CVE-2009-0591, CVE-2009-0789) - Major changes between OpenSSL 0.9.8i and OpenSSL 0.9.8j: + Major changes between OpenSSL 0.9.8i and OpenSSL 0.9.8j [7 Jan 2009]: o Fix security issue (CVE-2008-5077) o Merge FIPS 140-2 branch code. - Major changes between OpenSSL 0.9.8g and OpenSSL 0.9.8h: + Major changes between OpenSSL 0.9.8g and OpenSSL 0.9.8h [28 May 2008]: o CryptoAPI ENGINE support. o Various precautionary measures. o Fix for bugs affecting certificate request creation. o Support for local machine keyset attribute in PKCS#12 files. - Major changes between OpenSSL 0.9.8f and OpenSSL 0.9.8g: + Major changes between OpenSSL 0.9.8f and OpenSSL 0.9.8g [19 Oct 2007]: o Backport of CMS functionality to 0.9.8. o Fixes for bugs introduced with 0.9.8f. - Major changes between OpenSSL 0.9.8e and OpenSSL 0.9.8f: + Major changes between OpenSSL 0.9.8e and OpenSSL 0.9.8f [11 Oct 2007]: o Add gcc 4.2 support. o Add support for AES and SSE2 assembly lanugauge optimization @@ -115,23 +125,23 @@ o RFC4507bis support. o TLS Extensions support. - Major changes between OpenSSL 0.9.8d and OpenSSL 0.9.8e: + Major changes between OpenSSL 0.9.8d and OpenSSL 0.9.8e [23 Feb 2007]: o Various ciphersuite selection fixes. o RFC3779 support. - Major changes between OpenSSL 0.9.8c and OpenSSL 0.9.8d: + Major changes between OpenSSL 0.9.8c and OpenSSL 0.9.8d [28 Sep 2006]: o Introduce limits to prevent malicious key DoS (CVE-2006-2940) o Fix security issues (CVE-2006-2937, CVE-2006-3737, CVE-2006-4343) o Changes to ciphersuite selection algorithm - Major changes between OpenSSL 0.9.8b and OpenSSL 0.9.8c: + Major changes between OpenSSL 0.9.8b and OpenSSL 0.9.8c [5 Sep 2006]: o Fix Daniel Bleichenbacher forged signature attack, CVE-2006-4339 o New cipher Camellia - Major changes between OpenSSL 0.9.8a and OpenSSL 0.9.8b: + Major changes between OpenSSL 0.9.8a and OpenSSL 0.9.8b [4 May 2006]: o Cipher string fixes. o Fixes for VC++ 2005. @@ -141,12 +151,12 @@ o Built in dynamic engine compilation support on Win32. o Fixes auto dynamic engine loading in Win32. - Major changes between OpenSSL 0.9.8 and OpenSSL 0.9.8a: + Major changes between OpenSSL 0.9.8 and OpenSSL 0.9.8a [11 Oct 2005]: o Fix potential SSL 2.0 rollback, CVE-2005-2969 o Extended Windows CE support - Major changes between OpenSSL 0.9.7g and OpenSSL 0.9.8: + Major changes between OpenSSL 0.9.7g and OpenSSL 0.9.8 [5 Jul 2005]: o Major work on the BIGNUM library for higher efficiency and to make operations more streamlined and less contradictory. This @@ -220,36 +230,36 @@ o Added initial support for Win64. o Added alternate pkg-config files. - Major changes between OpenSSL 0.9.7l and OpenSSL 0.9.7m: + Major changes between OpenSSL 0.9.7l and OpenSSL 0.9.7m [23 Feb 2007]: o FIPS 1.1.1 module linking. o Various ciphersuite selection fixes. - Major changes between OpenSSL 0.9.7k and OpenSSL 0.9.7l: + Major changes between OpenSSL 0.9.7k and OpenSSL 0.9.7l [28 Sep 2006]: o Introduce limits to prevent malicious key DoS (CVE-2006-2940) o Fix security issues (CVE-2006-2937, CVE-2006-3737, CVE-2006-4343) - Major changes between OpenSSL 0.9.7j and OpenSSL 0.9.7k: + Major changes between OpenSSL 0.9.7j and OpenSSL 0.9.7k [5 Sep 2006]: o Fix Daniel Bleichenbacher forged signature attack, CVE-2006-4339 - Major changes between OpenSSL 0.9.7i and OpenSSL 0.9.7j: + Major changes between OpenSSL 0.9.7i and OpenSSL 0.9.7j [4 May 2006]: o Visual C++ 2005 fixes. o Update Windows build system for FIPS. - Major changes between OpenSSL 0.9.7h and OpenSSL 0.9.7i: + Major changes between OpenSSL 0.9.7h and OpenSSL 0.9.7i [14 Oct 2005]: o Give EVP_MAX_MD_SIZE it's old value, except for a FIPS build. - Major changes between OpenSSL 0.9.7g and OpenSSL 0.9.7h: + Major changes between OpenSSL 0.9.7g and OpenSSL 0.9.7h [11 Oct 2005]: o Fix SSL 2.0 Rollback, CVE-2005-2969 o Allow use of fixed-length exponent on DSA signing o Default fixed-window RSA, DSA, DH private-key operations - Major changes between OpenSSL 0.9.7f and OpenSSL 0.9.7g: + Major changes between OpenSSL 0.9.7f and OpenSSL 0.9.7g [11 Apr 2005]: o More compilation issues fixed. o Adaptation to more modern Kerberos API. @@ -258,7 +268,7 @@ o More constification. o Added processing of proxy certificates (RFC 3820). - Major changes between OpenSSL 0.9.7e and OpenSSL 0.9.7f: + Major changes between OpenSSL 0.9.7e and OpenSSL 0.9.7f [22 Mar 2005]: o Several compilation issues fixed. o Many memory allocation failure checks added. @@ -266,12 +276,12 @@ o Mandatory basic checks on certificates. o Performance improvements. - Major changes between OpenSSL 0.9.7d and OpenSSL 0.9.7e: + Major changes between OpenSSL 0.9.7d and OpenSSL 0.9.7e [25 Oct 2004]: o Fix race condition in CRL checking code. o Fixes to PKCS#7 (S/MIME) code. - Major changes between OpenSSL 0.9.7c and OpenSSL 0.9.7d: + Major changes between OpenSSL 0.9.7c and OpenSSL 0.9.7d [17 Mar 2004]: o Security: Fix Kerberos ciphersuite SSL/TLS handshaking bug o Security: Fix null-pointer assignment in do_change_cipher_spec() @@ -279,14 +289,14 @@ o Multiple X509 verification fixes o Speed up HMAC and other operations - Major changes between OpenSSL 0.9.7b and OpenSSL 0.9.7c: + Major changes between OpenSSL 0.9.7b and OpenSSL 0.9.7c [30 Sep 2003]: o Security: fix various ASN1 parsing bugs. o New -ignore_err option to OCSP utility. o Various interop and bug fixes in S/MIME code. o SSL/TLS protocol fix for unrequested client certificates. - Major changes between OpenSSL 0.9.7a and OpenSSL 0.9.7b: + Major changes between OpenSSL 0.9.7a and OpenSSL 0.9.7b [10 Apr 2003]: o Security: counter the Klima-Pokorny-Rosa extension of Bleichbacher's attack @@ -297,7 +307,7 @@ o ASN.1: treat domainComponent correctly. o Documentation: fixes and additions. - Major changes between OpenSSL 0.9.7 and OpenSSL 0.9.7a: + Major changes between OpenSSL 0.9.7 and OpenSSL 0.9.7a [19 Feb 2003]: o Security: Important security related bugfixes. o Enhanced compatibility with MIT Kerberos. @@ -308,7 +318,7 @@ o SSL/TLS: now handles manual certificate chain building. o SSL/TLS: certain session ID malfunctions corrected. - Major changes between OpenSSL 0.9.6 and OpenSSL 0.9.7: + Major changes between OpenSSL 0.9.6 and OpenSSL 0.9.7 [30 Dec 2002]: o New library section OCSP. o Complete rewrite of ASN1 code. @@ -354,23 +364,23 @@ o SSL/TLS: add callback to retrieve SSL/TLS messages. o SSL/TLS: support AES cipher suites (RFC3268). - Major changes between OpenSSL 0.9.6j and OpenSSL 0.9.6k: + Major changes between OpenSSL 0.9.6j and OpenSSL 0.9.6k [30 Sep 2003]: o Security: fix various ASN1 parsing bugs. o SSL/TLS protocol fix for unrequested client certificates. - Major changes between OpenSSL 0.9.6i and OpenSSL 0.9.6j: + Major changes between OpenSSL 0.9.6i and OpenSSL 0.9.6j [10 Apr 2003]: o Security: counter the Klima-Pokorny-Rosa extension of Bleichbacher's attack o Security: make RSA blinding default. o Build: shared library support fixes. - Major changes between OpenSSL 0.9.6h and OpenSSL 0.9.6i: + Major changes between OpenSSL 0.9.6h and OpenSSL 0.9.6i [19 Feb 2003]: o Important security related bugfixes. - Major changes between OpenSSL 0.9.6g and OpenSSL 0.9.6h: + Major changes between OpenSSL 0.9.6g and OpenSSL 0.9.6h [5 Dec 2002]: o New configuration targets for Tandem OSS and A/UX. o New OIDs for Microsoft attributes. @@ -384,25 +394,25 @@ o Fixes for smaller building problems. o Updates of manuals, FAQ and other instructive documents. - Major changes between OpenSSL 0.9.6f and OpenSSL 0.9.6g: + Major changes between OpenSSL 0.9.6f and OpenSSL 0.9.6g [9 Aug 2002]: o Important building fixes on Unix. - Major changes between OpenSSL 0.9.6e and OpenSSL 0.9.6f: + Major changes between OpenSSL 0.9.6e and OpenSSL 0.9.6f [8 Aug 2002]: o Various important bugfixes. - Major changes between OpenSSL 0.9.6d and OpenSSL 0.9.6e: + Major changes between OpenSSL 0.9.6d and OpenSSL 0.9.6e [30 Jul 2002]: o Important security related bugfixes. o Various SSL/TLS library bugfixes. - Major changes between OpenSSL 0.9.6c and OpenSSL 0.9.6d: + Major changes between OpenSSL 0.9.6c and OpenSSL 0.9.6d [9 May 2002]: o Various SSL/TLS library bugfixes. o Fix DH parameter generation for 'non-standard' generators. - Major changes between OpenSSL 0.9.6b and OpenSSL 0.9.6c: + Major changes between OpenSSL 0.9.6b and OpenSSL 0.9.6c [21 Dec 2001]: o Various SSL/TLS library bugfixes. o BIGNUM library fixes. @@ -415,7 +425,7 @@ Broadcom and Cryptographic Appliance's keyserver [in 0.9.6c-engine release]. - Major changes between OpenSSL 0.9.6a and OpenSSL 0.9.6b: + Major changes between OpenSSL 0.9.6a and OpenSSL 0.9.6b [9 Jul 2001]: o Security fix: PRNG improvements. o Security fix: RSA OAEP check. @@ -432,7 +442,7 @@ o Increase default size for BIO buffering filter. o Compatibility fixes in some scripts. - Major changes between OpenSSL 0.9.6 and OpenSSL 0.9.6a: + Major changes between OpenSSL 0.9.6 and OpenSSL 0.9.6a [5 Apr 2001]: o Security fix: change behavior of OpenSSL to avoid using environment variables when running as root. @@ -457,7 +467,7 @@ o New function BN_rand_range(). o Add "-rand" option to openssl s_client and s_server. - Major changes between OpenSSL 0.9.5a and OpenSSL 0.9.6: + Major changes between OpenSSL 0.9.5a and OpenSSL 0.9.6 [10 Oct 2000]: o Some documentation for BIO and SSL libraries. o Enhanced chain verification using key identifiers. @@ -472,7 +482,7 @@ [1] The support for external crypto devices is currently a separate distribution. See the file README.ENGINE. - Major changes between OpenSSL 0.9.5 and OpenSSL 0.9.5a: + Major changes between OpenSSL 0.9.5 and OpenSSL 0.9.5a [1 Apr 2000]: o Bug fixes for Win32, SuSE Linux, NeXTSTEP and FreeBSD 2.2.8 o Shared library support for HPUX and Solaris-gcc @@ -481,7 +491,7 @@ o New 'rand' application o New way to check for existence of algorithms from scripts - Major changes between OpenSSL 0.9.4 and OpenSSL 0.9.5: + Major changes between OpenSSL 0.9.4 and OpenSSL 0.9.5 [25 May 2000]: o S/MIME support in new 'smime' command o Documentation for the OpenSSL command line application @@ -517,7 +527,7 @@ o Enhanced support for Alpha Linux o Experimental MacOS support - Major changes between OpenSSL 0.9.3 and OpenSSL 0.9.4: + Major changes between OpenSSL 0.9.3 and OpenSSL 0.9.4 [9 Aug 1999]: o Transparent support for PKCS#8 format private keys: these are used by several software packages and are more secure than the standard @@ -528,7 +538,7 @@ o New pipe-like BIO that allows using the SSL library when actual I/O must be handled by the application (BIO pair) - Major changes between OpenSSL 0.9.2b and OpenSSL 0.9.3: + Major changes between OpenSSL 0.9.2b and OpenSSL 0.9.3 [24 May 1999]: o Lots of enhancements and cleanups to the Configuration mechanism o RSA OEAP related fixes o Added `openssl ca -revoke' option for revoking a certificate @@ -542,7 +552,7 @@ o Sparc assembler bignum implementation, optimized hash functions o Option to disable selected ciphers - Major changes between OpenSSL 0.9.1c and OpenSSL 0.9.2b: + Major changes between OpenSSL 0.9.1c and OpenSSL 0.9.2b [22 Mar 1999]: o Fixed a security hole related to session resumption o Fixed RSA encryption routines for the p < q case o "ALL" in cipher lists now means "everything except NULL ciphers" @@ -564,7 +574,7 @@ o Lots of memory leak fixes. o Lots of bug fixes. - Major changes between SSLeay 0.9.0b and OpenSSL 0.9.1c: + Major changes between SSLeay 0.9.0b and OpenSSL 0.9.1c [23 Dec 1998]: o Integration of the popular NO_RSA/NO_DSA patches o Initial support for compression inside the SSL record layer o Added BIO proxy and filtering functionality Modified: stable/8/crypto/openssl/README ============================================================================== --- stable/8/crypto/openssl/README Mon Jun 9 06:00:28 2014 (r267258) +++ stable/8/crypto/openssl/README Mon Jun 9 06:03:38 2014 (r267259) @@ -1,5 +1,5 @@ - OpenSSL 0.9.8y 5 Feb 2013 + OpenSSL 0.9.8za 5 Jun 2014 Copyright (c) 1998-2011 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson @@ -190,7 +190,7 @@ reason as to why that feature isn't implemented. Patches should be as up to date as possible, preferably relative to the - current CVS or the last snapshot. They should follow the coding style of + current Git or the last snapshot. They should follow the coding style of OpenSSL and compile without warnings. Some of the core team developer targets can be used for testing purposes, (debug-steve64, debug-geoff etc). OpenSSL compiles on many varied platforms: try to ensure you only use portable Modified: stable/8/crypto/openssl/apps/apps.c ============================================================================== --- stable/8/crypto/openssl/apps/apps.c Mon Jun 9 06:00:28 2014 (r267258) +++ stable/8/crypto/openssl/apps/apps.c Mon Jun 9 06:03:38 2014 (r267259) @@ -558,12 +558,12 @@ int password_callback(char *buf, int buf if (ok >= 0) ok = UI_add_input_string(ui,prompt,ui_flags,buf, - PW_MIN_LENGTH,BUFSIZ-1); + PW_MIN_LENGTH,bufsiz-1); if (ok >= 0 && verify) { buff = (char *)OPENSSL_malloc(bufsiz); ok = UI_add_verify_string(ui,prompt,ui_flags,buff, - PW_MIN_LENGTH,BUFSIZ-1, buf); + PW_MIN_LENGTH,bufsiz-1, buf); } if (ok >= 0) do Modified: stable/8/crypto/openssl/apps/ocsp.c ============================================================================== --- stable/8/crypto/openssl/apps/ocsp.c Mon Jun 9 06:00:28 2014 (r267258) +++ stable/8/crypto/openssl/apps/ocsp.c Mon Jun 9 06:03:38 2014 (r267259) @@ -98,6 +98,7 @@ int MAIN(int argc, char **argv) ENGINE *e = NULL; char **args; char *host = NULL, *port = NULL, *path = "/"; + char *thost = NULL, *tport = NULL, *tpath = NULL; char *reqin = NULL, *respin = NULL; char *reqout = NULL, *respout = NULL; char *signfile = NULL, *keyfile = NULL; @@ -173,6 +174,12 @@ int MAIN(int argc, char **argv) } else if (!strcmp(*args, "-url")) { + if (thost) + OPENSSL_free(thost); + if (tport) + OPENSSL_free(tport); + if (tpath) + OPENSSL_free(tpath); if (args[1]) { args++; @@ -181,6 +188,9 @@ int MAIN(int argc, char **argv) BIO_printf(bio_err, "Error parsing URL\n"); badarg = 1; } + thost = host; + tport = port; + tpath = path; } else badarg = 1; } @@ -871,12 +881,12 @@ end: sk_X509_pop_free(sign_other, X509_free); sk_X509_pop_free(verify_other, X509_free); - if (use_ssl != -1) - { - OPENSSL_free(host); - OPENSSL_free(port); - OPENSSL_free(path); - } + if (thost) + OPENSSL_free(thost); + if (tport) + OPENSSL_free(tport); + if (tpath) + OPENSSL_free(tpath); OPENSSL_EXIT(ret); } Modified: stable/8/crypto/openssl/apps/req.c ============================================================================== --- stable/8/crypto/openssl/apps/req.c Mon Jun 9 06:00:28 2014 (r267258) +++ stable/8/crypto/openssl/apps/req.c Mon Jun 9 06:03:38 2014 (r267259) @@ -1574,7 +1574,13 @@ start: #ifdef CHARSET_EBCDIC ebcdic2ascii(buf, buf, i); #endif - if(!req_check_len(i, n_min, n_max)) goto start; + if(!req_check_len(i, n_min, n_max)) + { + if (batch || value) + return 0; + goto start; + } + if (!X509_NAME_add_entry_by_NID(n,nid, chtype, (unsigned char *) buf, -1,-1,mval)) goto err; ret=1; @@ -1633,7 +1639,12 @@ start: #ifdef CHARSET_EBCDIC ebcdic2ascii(buf, buf, i); #endif - if(!req_check_len(i, n_min, n_max)) goto start; + if(!req_check_len(i, n_min, n_max)) + { + if (batch || value) + return 0; + goto start; + } if(!X509_REQ_add1_attr_by_NID(req, nid, chtype, (unsigned char *)buf, -1)) { Modified: stable/8/crypto/openssl/apps/s_cb.c ============================================================================== --- stable/8/crypto/openssl/apps/s_cb.c Mon Jun 9 06:00:28 2014 (r267258) +++ stable/8/crypto/openssl/apps/s_cb.c Mon Jun 9 06:03:38 2014 (r267259) @@ -518,6 +518,24 @@ void MS_CALLBACK msg_cb(int write_p, int case 100: str_details2 = " no_renegotiation"; break; + case 110: + str_details2 = " unsupported_extension"; + break; + case 111: + str_details2 = " certificate_unobtainable"; + break; + case 112: + str_details2 = " unrecognized_name"; + break; + case 113: + str_details2 = " bad_certificate_status_response"; + break; + case 114: + str_details2 = " bad_certificate_hash_value"; + break; + case 115: + str_details2 = " unknown_psk_identity"; + break; } } } Modified: stable/8/crypto/openssl/apps/smime.c ============================================================================== --- stable/8/crypto/openssl/apps/smime.c Mon Jun 9 06:00:28 2014 (r267258) +++ stable/8/crypto/openssl/apps/smime.c Mon Jun 9 06:03:38 2014 (r267259) @@ -521,8 +521,8 @@ int MAIN(int argc, char **argv) { if (!cipher) { -#ifndef OPENSSL_NO_RC2 - cipher = EVP_rc2_40_cbc(); +#ifndef OPENSSL_NO_DES + cipher = EVP_des_ede3_cbc(); #else BIO_printf(bio_err, "No cipher selected\n"); goto end; Modified: stable/8/crypto/openssl/crypto/asn1/a_int.c ============================================================================== --- stable/8/crypto/openssl/crypto/asn1/a_int.c Mon Jun 9 06:00:28 2014 (r267258) +++ stable/8/crypto/openssl/crypto/asn1/a_int.c Mon Jun 9 06:03:38 2014 (r267259) @@ -116,7 +116,7 @@ int i2c_ASN1_INTEGER(ASN1_INTEGER *a, un int pad=0,ret,i,neg; unsigned char *p,*n,pb=0; - if ((a == NULL) || (a->data == NULL)) return(0); + if (a == NULL) return(0); neg=a->type & V_ASN1_NEG; if (a->length == 0) ret=1; Modified: stable/8/crypto/openssl/crypto/asn1/a_strnid.c ============================================================================== --- stable/8/crypto/openssl/crypto/asn1/a_strnid.c Mon Jun 9 06:00:28 2014 (r267258) +++ stable/8/crypto/openssl/crypto/asn1/a_strnid.c Mon Jun 9 06:03:38 2014 (r267259) @@ -75,7 +75,7 @@ static int table_cmp(const void *a, cons * certain software (e.g. Netscape) has problems with them. */ -static unsigned long global_mask = 0xFFFFFFFFL; +static unsigned long global_mask = B_ASN1_UTF8STRING; void ASN1_STRING_set_default_mask(unsigned long mask) { Modified: stable/8/crypto/openssl/crypto/asn1/t_pkey.c ============================================================================== --- stable/8/crypto/openssl/crypto/asn1/t_pkey.c Mon Jun 9 06:00:28 2014 (r267258) +++ stable/8/crypto/openssl/crypto/asn1/t_pkey.c Mon Jun 9 06:03:38 2014 (r267259) @@ -208,11 +208,6 @@ int DSA_print(BIO *bp, const DSA *x, int if (x->p) buf_len = (size_t)BN_num_bytes(x->p); - else - { - DSAerr(DSA_F_DSA_PRINT,DSA_R_MISSING_PARAMETERS); - goto err; - } if (x->q) if (buf_len < (i = (size_t)BN_num_bytes(x->q))) buf_len = i; Modified: stable/8/crypto/openssl/crypto/bn/bn_mont.c ============================================================================== --- stable/8/crypto/openssl/crypto/bn/bn_mont.c Mon Jun 9 06:00:28 2014 (r267258) +++ stable/8/crypto/openssl/crypto/bn/bn_mont.c Mon Jun 9 06:03:38 2014 (r267259) @@ -701,32 +701,38 @@ BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CT BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, int lock, const BIGNUM *mod, BN_CTX *ctx) { - int got_write_lock = 0; BN_MONT_CTX *ret; CRYPTO_r_lock(lock); - if (!*pmont) + ret = *pmont; + CRYPTO_r_unlock(lock); + if (ret) + return ret; + + /* We don't want to serialise globally while doing our lazy-init math in + * BN_MONT_CTX_set. That punishes threads that are doing independent + * things. Instead, punish the case where more than one thread tries to + * lazy-init the same 'pmont', by having each do the lazy-init math work + * independently and only use the one from the thread that wins the race + * (the losers throw away the work they've done). */ + ret = BN_MONT_CTX_new(); + if (!ret) + return NULL; + if (!BN_MONT_CTX_set(ret, mod, ctx)) { - CRYPTO_r_unlock(lock); - CRYPTO_w_lock(lock); - got_write_lock = 1; + BN_MONT_CTX_free(ret); + return NULL; + } - if (!*pmont) - { - ret = BN_MONT_CTX_new(); - if (ret && !BN_MONT_CTX_set(ret, mod, ctx)) - BN_MONT_CTX_free(ret); - else - *pmont = ret; - } + /* The locked compare-and-set, after the local work is done. */ + CRYPTO_w_lock(lock); + if (*pmont) + { + BN_MONT_CTX_free(ret); + ret = *pmont; } - - ret = *pmont; - - if (got_write_lock) - CRYPTO_w_unlock(lock); else - CRYPTO_r_unlock(lock); - + *pmont = ret; + CRYPTO_w_unlock(lock); return ret; } Modified: stable/8/crypto/openssl/crypto/cms/cms_cd.c ============================================================================== --- stable/8/crypto/openssl/crypto/cms/cms_cd.c Mon Jun 9 06:00:28 2014 (r267258) +++ stable/8/crypto/openssl/crypto/cms/cms_cd.c Mon Jun 9 06:03:38 2014 (r267259) @@ -58,7 +58,9 @@ #include #include #include +#ifndef OPENSSL_NO_COMP #include +#endif #include "cms_lcl.h" DECLARE_ASN1_ITEM(CMS_CompressedData) Modified: stable/8/crypto/openssl/crypto/cms/cms_env.c ============================================================================== --- stable/8/crypto/openssl/crypto/cms/cms_env.c Mon Jun 9 06:00:28 2014 (r267258) +++ stable/8/crypto/openssl/crypto/cms/cms_env.c Mon Jun 9 06:03:38 2014 (r267259) @@ -185,6 +185,8 @@ CMS_RecipientInfo *CMS_add1_recipient_ce if (flags & CMS_USE_KEYID) { ktri->version = 2; + if (env->version < 2) + env->version = 2; type = CMS_RECIPINFO_KEYIDENTIFIER; } else Modified: stable/8/crypto/openssl/crypto/cms/cms_lib.c ============================================================================== --- stable/8/crypto/openssl/crypto/cms/cms_lib.c Mon Jun 9 06:00:28 2014 (r267258) +++ stable/8/crypto/openssl/crypto/cms/cms_lib.c Mon Jun 9 06:03:38 2014 (r267259) @@ -477,8 +477,6 @@ int CMS_add0_cert(CMS_ContentInfo *cms, pcerts = cms_get0_certificate_choices(cms); if (!pcerts) return 0; - if (!pcerts) - return 0; for (i = 0; i < sk_CMS_CertificateChoices_num(*pcerts); i++) { cch = sk_CMS_CertificateChoices_value(*pcerts, i); Modified: stable/8/crypto/openssl/crypto/cms/cms_sd.c ============================================================================== --- stable/8/crypto/openssl/crypto/cms/cms_sd.c Mon Jun 9 06:00:28 2014 (r267258) +++ stable/8/crypto/openssl/crypto/cms/cms_sd.c Mon Jun 9 06:03:38 2014 (r267259) @@ -157,8 +157,8 @@ static void cms_sd_set_version(CMS_Signe if (sd->version < 3) sd->version = 3; } - else - sd->version = 1; + else if (si->version < 1) + si->version = 1; } if (sd->version < 1) Modified: stable/8/crypto/openssl/crypto/cms/cms_smime.c ============================================================================== --- stable/8/crypto/openssl/crypto/cms/cms_smime.c Mon Jun 9 06:00:28 2014 (r267258) +++ stable/8/crypto/openssl/crypto/cms/cms_smime.c Mon Jun 9 06:03:38 2014 (r267259) @@ -622,7 +622,7 @@ int CMS_decrypt_set1_pkey(CMS_ContentInf STACK_OF(CMS_RecipientInfo) *ris; CMS_RecipientInfo *ri; int i, r; - int debug = 0; + int debug = 0, ri_match = 0; ris = CMS_get0_RecipientInfos(cms); if (ris) debug = cms->d.envelopedData->encryptedContentInfo->debug; @@ -631,6 +631,7 @@ int CMS_decrypt_set1_pkey(CMS_ContentInf ri = sk_CMS_RecipientInfo_value(ris, i); if (CMS_RecipientInfo_type(ri) != CMS_RECIPINFO_TRANS) continue; + ri_match = 1; /* If we have a cert try matching RecipientInfo * otherwise try them all. */ @@ -666,7 +667,7 @@ int CMS_decrypt_set1_pkey(CMS_ContentInf } } /* If no cert and not debugging always return success */ - if (!cert && !debug) + if (ri_match && !cert && !debug) { ERR_clear_error(); return 1; Modified: stable/8/crypto/openssl/crypto/ec/ec_lib.c ============================================================================== --- stable/8/crypto/openssl/crypto/ec/ec_lib.c Mon Jun 9 06:00:28 2014 (r267258) +++ stable/8/crypto/openssl/crypto/ec/ec_lib.c Mon Jun 9 06:03:38 2014 (r267259) @@ -480,10 +480,10 @@ int EC_GROUP_cmp(const EC_GROUP *a, cons if (EC_METHOD_get_field_type(EC_GROUP_method_of(a)) != EC_METHOD_get_field_type(EC_GROUP_method_of(b))) return 1; - /* compare the curve name (if present) */ + /* compare the curve name (if present in both) */ if (EC_GROUP_get_curve_name(a) && EC_GROUP_get_curve_name(b) && - EC_GROUP_get_curve_name(a) == EC_GROUP_get_curve_name(b)) - return 0; + EC_GROUP_get_curve_name(a) != EC_GROUP_get_curve_name(b)) + return 1; if (!ctx) ctx_new = ctx = BN_CTX_new(); @@ -1061,12 +1061,12 @@ int EC_POINT_cmp(const EC_GROUP *group, if (group->meth->point_cmp == 0) { ECerr(EC_F_EC_POINT_CMP, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); - return 0; + return -1; } if ((group->meth != a->meth) || (a->meth != b->meth)) { ECerr(EC_F_EC_POINT_CMP, EC_R_INCOMPATIBLE_OBJECTS); - return 0; + return -1; } return group->meth->point_cmp(group, a, b, ctx); } Modified: stable/8/crypto/openssl/crypto/engine/eng_all.c ============================================================================== --- stable/8/crypto/openssl/crypto/engine/eng_all.c Mon Jun 9 06:00:28 2014 (r267258) +++ stable/8/crypto/openssl/crypto/engine/eng_all.c Mon Jun 9 06:03:38 2014 (r267259) @@ -102,14 +102,14 @@ void ENGINE_load_builtin_engines(void) #if !defined(OPENSSL_NO_GMP) && !defined(OPENSSL_NO_HW_GMP) ENGINE_load_gmp(); #endif +#if defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_NO_CAPIENG) + ENGINE_load_capi(); +#endif #endif #ifndef OPENSSL_NO_HW #if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV) ENGINE_load_cryptodev(); #endif -#if defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_NO_CAPIENG) - ENGINE_load_capi(); -#endif #endif } Modified: stable/8/crypto/openssl/crypto/engine/engine.h ============================================================================== --- stable/8/crypto/openssl/crypto/engine/engine.h Mon Jun 9 06:00:28 2014 (r267258) +++ stable/8/crypto/openssl/crypto/engine/engine.h Mon Jun 9 06:03:38 2014 (r267259) @@ -335,15 +335,15 @@ void ENGINE_load_gmp(void); void ENGINE_load_nuron(void); void ENGINE_load_sureware(void); void ENGINE_load_ubsec(void); -#endif -void ENGINE_load_cryptodev(void); -void ENGINE_load_padlock(void); -void ENGINE_load_builtin_engines(void); #ifdef OPENSSL_SYS_WIN32 #ifndef OPENSSL_NO_CAPIENG void ENGINE_load_capi(void); #endif #endif +#endif +void ENGINE_load_cryptodev(void); +void ENGINE_load_padlock(void); +void ENGINE_load_builtin_engines(void); /* Get and set global flags (ENGINE_TABLE_FLAG_***) for the implementation * "registry" handling. */ Modified: stable/8/crypto/openssl/crypto/err/err_all.c ============================================================================== --- stable/8/crypto/openssl/crypto/err/err_all.c Mon Jun 9 06:00:28 2014 (r267258) +++ stable/8/crypto/openssl/crypto/err/err_all.c Mon Jun 9 06:03:38 2014 (r267259) @@ -104,7 +104,9 @@ #ifndef OPENSSL_NO_JPAKE #include #endif +#ifndef OPENSSL_NO_COMP #include +#endif void ERR_load_crypto_strings(void) { Modified: stable/8/crypto/openssl/crypto/err/openssl.ec ============================================================================== --- stable/8/crypto/openssl/crypto/err/openssl.ec Mon Jun 9 06:00:28 2014 (r267258) +++ stable/8/crypto/openssl/crypto/err/openssl.ec Mon Jun 9 06:03:38 2014 (r267259) @@ -71,6 +71,11 @@ R SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURIT R SSL_R_TLSV1_ALERT_INTERNAL_ERROR 1080 R SSL_R_TLSV1_ALERT_USER_CANCELLED 1090 R SSL_R_TLSV1_ALERT_NO_RENEGOTIATION 1100 +R SSL_R_TLSV1_UNSUPPORTED_EXTENSION 1110 +R SSL_R_TLSV1_CERTIFICATE_UNOBTAINABLE 1111 +R SSL_R_TLSV1_UNRECOGNIZED_NAME 1112 +R SSL_R_TLSV1_BAD_CERTIFICATE_STATUS_RESPONSE 1113 +R SSL_R_TLSV1_BAD_CERTIFICATE_HASH_VALUE 1114 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Mon Jun 9 07:00:28 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 16CD4652; Mon, 9 Jun 2014 07:00:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0393922E1; Mon, 9 Jun 2014 07:00:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5970ROu032693; Mon, 9 Jun 2014 07:00:27 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5970Rhs032692; Mon, 9 Jun 2014 07:00:27 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201406090700.s5970Rhs032692@svn.freebsd.org> From: Christian Brueffer Date: Mon, 9 Jun 2014 07:00:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267262 - stable/9/release/doc/en_US.ISO8859-1/hardware X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 07:00:28 -0000 Author: brueffer Date: Mon Jun 9 07:00:27 2014 New Revision: 267262 URL: http://svnweb.freebsd.org/changeset/base/267262 Log: MFC: r267184 Add vte(4) to the hardware notes. Approved by: re (kib) Modified: stable/9/release/doc/en_US.ISO8859-1/hardware/article.xml Directory Properties: stable/9/release/doc/ (props changed) stable/9/release/doc/en_US.ISO8859-1/hardware/ (props changed) Modified: stable/9/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/hardware/article.xml Mon Jun 9 06:17:02 2014 (r267261) +++ stable/9/release/doc/en_US.ISO8859-1/hardware/article.xml Mon Jun 9 07:00:27 2014 (r267262) @@ -1003,6 +1003,8 @@ &hwlist.vr; + &hwlist.vte; + &hwlist.vx; &hwlist.vxge; From owner-svn-src-stable@FreeBSD.ORG Mon Jun 9 07:21:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2AE5CB7; Mon, 9 Jun 2014 07:21:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E03C124FD; Mon, 9 Jun 2014 07:21:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s597LgwH045413; Mon, 9 Jun 2014 07:21:42 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s597LgW7045412; Mon, 9 Jun 2014 07:21:42 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201406090721.s597LgW7045412@svn.freebsd.org> From: Kevin Lo Date: Mon, 9 Jun 2014 07:21:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267263 - stable/10/sys/dev/usb/wlan X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 07:21:43 -0000 Author: kevlo Date: Mon Jun 9 07:21:42 2014 New Revision: 267263 URL: http://svnweb.freebsd.org/changeset/base/267263 Log: MFC r267089: Remove D-Link DWA140 rev D1 by accident. Modified: stable/10/sys/dev/usb/wlan/if_run.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_run.c Mon Jun 9 07:00:27 2014 (r267262) +++ stable/10/sys/dev/usb/wlan/if_run.c Mon Jun 9 07:21:42 2014 (r267263) @@ -180,6 +180,7 @@ static const STRUCT_USB_HOST_ID run_devs RUN_DEV(DLINK, DWA127), RUN_DEV(DLINK, DWA140B3), RUN_DEV(DLINK, DWA160B2), + RUN_DEV(DLINK, DWA140D1), RUN_DEV(DLINK, DWA162), RUN_DEV(DLINK2, DWA130), RUN_DEV(DLINK2, RT2870_1), From owner-svn-src-stable@FreeBSD.ORG Mon Jun 9 13:52:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6CFB04C6; Mon, 9 Jun 2014 13:52:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5941D26E2; Mon, 9 Jun 2014 13:52:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s59DqB55024915; Mon, 9 Jun 2014 13:52:11 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s59DqBdE024914; Mon, 9 Jun 2014 13:52:11 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201406091352.s59DqBdE024914@svn.freebsd.org> From: Rick Macklem Date: Mon, 9 Jun 2014 13:52:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267268 - stable/9/sys/fs/nfsserver X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 13:52:11 -0000 Author: rmacklem Date: Mon Jun 9 13:52:10 2014 New Revision: 267268 URL: http://svnweb.freebsd.org/changeset/base/267268 Log: MFC: r267191 The new NFS server would not allow a hard link to be created to a symlink. This restriction (which was inherited from OpenBSD) is not required by the NFS RFCs. Since this is allowed by the old NFS server, it is a POLA violation to not allow it. This patch modifies the new NFS server to allow this. Reported by: jhb Reviewed by: jhb Approved by: re (kib) Modified: stable/9/sys/fs/nfsserver/nfs_nfsdserv.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfsserver/nfs_nfsdserv.c ============================================================================== --- stable/9/sys/fs/nfsserver/nfs_nfsdserv.c Mon Jun 9 13:04:58 2014 (r267267) +++ stable/9/sys/fs/nfsserver/nfs_nfsdserv.c Mon Jun 9 13:52:10 2014 (r267268) @@ -1620,13 +1620,6 @@ nfsrvd_link(struct nfsrv_descript *nd, i nd->nd_repstat = NFSERR_INVAL; if (tovp) vrele(tovp); - } else if (vnode_vtype(vp) == VLNK) { - if (nd->nd_flag & ND_NFSV2) - nd->nd_repstat = NFSERR_INVAL; - else - nd->nd_repstat = NFSERR_NOTSUPP; - if (tovp) - vrele(tovp); } if (!nd->nd_repstat) { if (nd->nd_flag & ND_NFSV4) { From owner-svn-src-stable@FreeBSD.ORG Mon Jun 9 13:53:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DBF0A61D; Mon, 9 Jun 2014 13:53:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7DA326F6; Mon, 9 Jun 2014 13:53:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s59Drb8E025145; Mon, 9 Jun 2014 13:53:37 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s59DrbHd025144; Mon, 9 Jun 2014 13:53:37 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201406091353.s59DrbHd025144@svn.freebsd.org> From: Ed Maste Date: Mon, 9 Jun 2014 13:53:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267269 - stable/9/sys/dev/vt/font X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 13:53:38 -0000 Author: emaste Date: Mon Jun 9 13:53:37 2014 New Revision: 267269 URL: http://svnweb.freebsd.org/changeset/base/267269 Log: MFC r267078, r267079: Update vt(4) console font author's email address Remove extra copy of old email address. Approved by: re Modified: stable/9/sys/dev/vt/font/vt_font_default.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/vt/font/vt_font_default.c ============================================================================== --- stable/9/sys/dev/vt/font/vt_font_default.c Mon Jun 9 13:52:10 2014 (r267268) +++ stable/9/sys/dev/vt/font/vt_font_default.c Mon Jun 9 13:53:37 2014 (r267269) @@ -1,6 +1,5 @@ /*- - * Copyright (c) 2011 Dimitar Toshkov Zhekov - * All rights reserved. + * Copyright (c) 2011 Dimitar Toshkov Zhekov. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,7 +22,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Please contribute any changes back to . + * Please contribute any changes back to . */ #include From owner-svn-src-stable@FreeBSD.ORG Mon Jun 9 15:09:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D8B2D28; Mon, 9 Jun 2014 15:09:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E2A82DC9; Mon, 9 Jun 2014 15:09:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s59F96YA060272; Mon, 9 Jun 2014 15:09:06 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s59F96lo060267; Mon, 9 Jun 2014 15:09:06 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201406091509.s59F96lo060267@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 9 Jun 2014 15:09:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267279 - in stable/10/sys/dev: e1000 ixgbe virtio/network vmware/vmxnet3 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 15:09:07 -0000 Author: luigi Date: Mon Jun 9 15:09:05 2014 New Revision: 267279 URL: http://svnweb.freebsd.org/changeset/base/267279 Log: MFC svn 267065 and 267187 make sure ifp->if_transmit returns 0 if a buffer is enqueued. This should also be merged to stable/9. After this fix, drivers still known to have this bug are igxbe/ixv and i40e. Drivers using if_transmit are correct, and so are most of the other drivers that reassing if_transmit. Among other things, this bug causes panics when using netmap emulation on top of generic drivers. Modified: stable/10/sys/dev/e1000/if_igb.c stable/10/sys/dev/ixgbe/ixgbe.c stable/10/sys/dev/virtio/network/if_vtnet.c stable/10/sys/dev/vmware/vmxnet3/if_vmx.c Modified: stable/10/sys/dev/e1000/if_igb.c ============================================================================== --- stable/10/sys/dev/e1000/if_igb.c Mon Jun 9 15:00:43 2014 (r267278) +++ stable/10/sys/dev/e1000/if_igb.c Mon Jun 9 15:09:05 2014 (r267279) @@ -988,12 +988,12 @@ igb_mq_start(struct ifnet *ifp, struct m if (err) return (err); if (IGB_TX_TRYLOCK(txr)) { - err = igb_mq_start_locked(ifp, txr); + igb_mq_start_locked(ifp, txr); IGB_TX_UNLOCK(txr); } else taskqueue_enqueue(que->tq, &txr->txq_task); - return (err); + return (0); } static int Modified: stable/10/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/10/sys/dev/ixgbe/ixgbe.c Mon Jun 9 15:00:43 2014 (r267278) +++ stable/10/sys/dev/ixgbe/ixgbe.c Mon Jun 9 15:09:05 2014 (r267279) @@ -831,12 +831,12 @@ ixgbe_mq_start(struct ifnet *ifp, struct if (err) return (err); if (IXGBE_TX_TRYLOCK(txr)) { - err = ixgbe_mq_start_locked(ifp, txr); + ixgbe_mq_start_locked(ifp, txr); IXGBE_TX_UNLOCK(txr); } else taskqueue_enqueue(que->tq, &txr->txq_task); - return (err); + return (0); } static int Modified: stable/10/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- stable/10/sys/dev/virtio/network/if_vtnet.c Mon Jun 9 15:00:43 2014 (r267278) +++ stable/10/sys/dev/virtio/network/if_vtnet.c Mon Jun 9 15:09:05 2014 (r267279) @@ -2260,7 +2260,6 @@ vtnet_txq_mq_start_locked(struct vtnet_t while ((m = drbr_peek(ifp, br)) != NULL) { if (virtqueue_full(vq)) { drbr_putback(ifp, br, m); - error = ENOBUFS; break; } @@ -2283,7 +2282,7 @@ vtnet_txq_mq_start_locked(struct vtnet_t txq->vtntx_watchdog = VTNET_TX_TIMEOUT; } - return (error); + return (0); } static int Modified: stable/10/sys/dev/vmware/vmxnet3/if_vmx.c ============================================================================== --- stable/10/sys/dev/vmware/vmxnet3/if_vmx.c Mon Jun 9 15:00:43 2014 (r267278) +++ stable/10/sys/dev/vmware/vmxnet3/if_vmx.c Mon Jun 9 15:09:05 2014 (r267279) @@ -2933,7 +2933,6 @@ vmxnet3_txq_mq_start_locked(struct vmxne /* Assume worse case if this mbuf is the head of a chain. */ if (m->m_next != NULL && avail < VMXNET3_TX_MAXSEGS) { drbr_putback(ifp, br, m); - error = ENOBUFS; break; } @@ -2956,7 +2955,7 @@ vmxnet3_txq_mq_start_locked(struct vmxne txq->vxtxq_watchdog = VMXNET3_WATCHDOG_TIMEOUT; } - return (error); + return (0); } static int From owner-svn-src-stable@FreeBSD.ORG Mon Jun 9 15:15:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 05EFC124; Mon, 9 Jun 2014 15:15:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E69162FA6; Mon, 9 Jun 2014 15:15:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s59FF8n4064484; Mon, 9 Jun 2014 15:15:08 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s59FF8iL064483; Mon, 9 Jun 2014 15:15:08 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201406091515.s59FF8iL064483@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 9 Jun 2014 15:15:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267280 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 15:15:09 -0000 Author: luigi Date: Mon Jun 9 15:15:08 2014 New Revision: 267280 URL: http://svnweb.freebsd.org/changeset/base/267280 Log: MFC 267167: whitespace changes (comments) Modified: stable/10/sys/net/netmap.h Modified: stable/10/sys/net/netmap.h ============================================================================== --- stable/10/sys/net/netmap.h Mon Jun 9 15:09:05 2014 (r267279) +++ stable/10/sys/net/netmap.h Mon Jun 9 15:15:08 2014 (r267280) @@ -124,7 +124,7 @@ * space with a parent device. The ifname indicates the parent device, * which must already exist. Flags in nr_flags indicate if we want to * bind the master or slave side, the index (from nr_ringid) - * is just a cookie and does need to be sequential. + * is just a cookie and does not need to be sequential. * * + NIOCREGIF can also attach to 'monitor' rings that replicate * the content of specific rings, also from the same memory space. @@ -228,7 +228,7 @@ struct netmap_slot { * 'head' and 'cur' must be incremented as slots are filled * with new packets to be sent; * 'cur' can be moved further ahead if we need more space - * for new transmissions. + * for new transmissions. XXX todo (2014-03-12) * * In RX rings: * @@ -447,27 +447,13 @@ struct netmap_if { * * nr_arg1, nr_arg2, nr_arg3 (in/out) command specific * - * + * * */ /* * struct nmreq overlays a struct ifreq (just the name) - * - * On input, nr_ringid indicates which rings we are requesting, - * with the low flags for the specific ring number. - * selection FLAGS RING INDEX - * - * all the NIC rings 0x0000 - - * only HOST ring 0x2000 ring index - * single NIC ring 0x4000 - - * all the NIC+HOST rings 0x6000 - - * one pipe ring, master 0x8000 ring index - * *** INVALID 0xA000 - * one pipe ring, slave 0xC000 ring index - * *** INVALID 0xE000 - * */ struct nmreq { char nr_name[IFNAMSIZ]; From owner-svn-src-stable@FreeBSD.ORG Mon Jun 9 15:16:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 03B802AB; Mon, 9 Jun 2014 15:16:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CBBFC2FF0; Mon, 9 Jun 2014 15:16:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s59FGH1C064684; Mon, 9 Jun 2014 15:16:17 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s59FGHFd064683; Mon, 9 Jun 2014 15:16:17 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201406091516.s59FGHFd064683@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 9 Jun 2014 15:16:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267281 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 15:16:18 -0000 Author: luigi Date: Mon Jun 9 15:16:17 2014 New Revision: 267281 URL: http://svnweb.freebsd.org/changeset/base/267281 Log: MFC 267168: misc bugfixes: - stdio.h is needed for fprint() - make memsize uint32_t to avoid errors due to overflow - honor the *XPOLL flagg in NIOCREGIF requests - mmap fails wit MAP_FAILED, not NULL. Modified: stable/10/sys/net/netmap_user.h Modified: stable/10/sys/net/netmap_user.h ============================================================================== --- stable/10/sys/net/netmap_user.h Mon Jun 9 15:15:08 2014 (r267280) +++ stable/10/sys/net/netmap_user.h Mon Jun 9 15:16:17 2014 (r267281) @@ -133,6 +133,7 @@ nm_ring_space(struct netmap_ring *ring) #ifndef HAVE_NETMAP_WITH_LIBS #define HAVE_NETMAP_WITH_LIBS +#include #include #include #include /* memset */ @@ -192,7 +193,7 @@ struct nm_desc { struct nm_desc *self; /* point to self if netmap. */ int fd; void *mem; - int memsize; + uint32_t memsize; int done_mmap; /* set if mem is the result of mmap */ struct netmap_if * const nifp; uint16_t first_tx_ring, last_tx_ring, cur_tx_ring; @@ -293,7 +294,7 @@ typedef void (*nm_cb_t)(u_char *, const * if passed a netmap_desc with mem != NULL, * use that memory instead of mmap. */ - + static struct nm_desc *nm_open(const char *ifname, const struct nmreq *req, uint64_t flags, const struct nm_desc *arg); @@ -404,8 +405,6 @@ nm_open(const char *ifname, const struct errmsg = "invalid ringid"; goto fail; } - /* add the *XPOLL flags */ - nr_ringid |= new_flags & (NETMAP_NO_TX_POLL | NETMAP_DO_RX_POLL); d = (struct nm_desc *)calloc(1, sizeof(*d)); if (d == NULL) { @@ -461,6 +460,9 @@ nm_open(const char *ifname, const struct d->req.nr_flags = parent->req.nr_flags; } } + /* add the *XPOLL flags */ + d->req.nr_ringid |= new_flags & (NETMAP_NO_TX_POLL | NETMAP_DO_RX_POLL); + if (ioctl(d->fd, NIOCREGIF, &d->req)) { errmsg = "NIOCREGIF failed"; goto fail; @@ -472,10 +474,11 @@ nm_open(const char *ifname, const struct d->memsize = parent->memsize; d->mem = parent->mem; } else { + /* XXX TODO: check if memsize is too large (or there is overflow) */ d->memsize = d->req.nr_memsize; d->mem = mmap(0, d->memsize, PROT_WRITE | PROT_READ, MAP_SHARED, d->fd, 0); - if (d->mem == NULL) { + if (d->mem == MAP_FAILED) { errmsg = "mmap failed"; goto fail; } @@ -531,7 +534,7 @@ nm_open(const char *ifname, const struct } } #endif /* debugging */ - + d->cur_tx_ring = d->first_tx_ring; d->cur_rx_ring = d->first_rx_ring; return d; From owner-svn-src-stable@FreeBSD.ORG Mon Jun 9 15:24:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D7139F6; Mon, 9 Jun 2014 15:24:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED0EB2251; Mon, 9 Jun 2014 15:24:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s59FOl3t069028; Mon, 9 Jun 2014 15:24:47 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s59FOkR3069016; Mon, 9 Jun 2014 15:24:46 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201406091524.s59FOkR3069016@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 9 Jun 2014 15:24:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267282 - stable/10/sys/dev/netmap X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 15:24:48 -0000 Author: luigi Date: Mon Jun 9 15:24:45 2014 New Revision: 267282 URL: http://svnweb.freebsd.org/changeset/base/267282 Log: sync netmap code with the version in HEAD: - fix handling of tx mbufs in emulated netmap mode; - introduce mbq_lock() and mbq_unlock() - rate limit some error messages - many whitespace and comment fixes Modified: stable/10/sys/dev/netmap/netmap.c stable/10/sys/dev/netmap/netmap_freebsd.c stable/10/sys/dev/netmap/netmap_generic.c stable/10/sys/dev/netmap/netmap_kern.h stable/10/sys/dev/netmap/netmap_mbq.c stable/10/sys/dev/netmap/netmap_mbq.h stable/10/sys/dev/netmap/netmap_mem2.c stable/10/sys/dev/netmap/netmap_pipe.c stable/10/sys/dev/netmap/netmap_vale.c Modified: stable/10/sys/dev/netmap/netmap.c ============================================================================== --- stable/10/sys/dev/netmap/netmap.c Mon Jun 9 15:16:17 2014 (r267281) +++ stable/10/sys/dev/netmap/netmap.c Mon Jun 9 15:24:45 2014 (r267282) @@ -270,6 +270,7 @@ netmap_disable_ring(struct netmap_kring } +/* stop or enable all the rings of na */ static void netmap_set_all_rings(struct ifnet *ifp, int stopped) { @@ -303,6 +304,13 @@ netmap_set_all_rings(struct ifnet *ifp, } +/* + * Convenience function used in drivers. Waits for current txsync()s/rxsync()s + * to finish and prevents any new one from starting. Call this before turning + * netmap mode off, or before removing the harware rings (e.g., on module + * onload). As a rule of thumb for linux drivers, this should be placed near + * each napi_disable(). + */ void netmap_disable_all_rings(struct ifnet *ifp) { @@ -310,6 +318,11 @@ netmap_disable_all_rings(struct ifnet *i } +/* + * Convenience function used in drivers. Re-enables rxsync and txsync on the + * adapter's rings In linux drivers, this should be placed near each + * napi_enable(). + */ void netmap_enable_all_rings(struct ifnet *ifp) { @@ -393,6 +406,7 @@ nm_dump_buf(char *p, int len, int lim, c * Fetch configuration from the device, to cope with dynamic * reconfigurations after loading the module. */ +/* call with NMG_LOCK held */ int netmap_update_config(struct netmap_adapter *na) { @@ -447,18 +461,20 @@ netmap_rxsync_compat(struct netmap_kring return na->nm_rxsync(na, kring->ring_id, flags); } +/* kring->nm_sync callback for the host tx ring */ static int netmap_txsync_to_host_compat(struct netmap_kring *kring, int flags) { - (void)flags; + (void)flags; /* unused */ netmap_txsync_to_host(kring->na); return 0; } +/* kring->nm_sync callback for the host rx ring */ static int netmap_rxsync_from_host_compat(struct netmap_kring *kring, int flags) { - (void)flags; + (void)flags; /* unused */ netmap_rxsync_from_host(kring->na, NULL, NULL); return 0; } @@ -489,6 +505,7 @@ netmap_rxsync_from_host_compat(struct ne * Note: for compatibility, host krings are created even when not needed. * The tailroom space is currently used by vale ports for allocating leases. */ +/* call with NMG_LOCK held */ int netmap_krings_create(struct netmap_adapter *na, u_int tailroom) { @@ -567,6 +584,7 @@ netmap_krings_create(struct netmap_adapt /* undo the actions performed by netmap_krings_create */ +/* call with NMG_LOCK held */ void netmap_krings_delete(struct netmap_adapter *na) { @@ -586,6 +604,7 @@ netmap_krings_delete(struct netmap_adapt * on the rings connected to the host so we need to purge * them first. */ +/* call with NMG_LOCK held */ static void netmap_hw_krings_delete(struct netmap_adapter *na) { @@ -598,6 +617,12 @@ netmap_hw_krings_delete(struct netmap_ad } +/* create a new netmap_if for a newly registered fd. + * If this is the first registration of the adapter, + * also create the netmap rings and their in-kernel view, + * the netmap krings. + */ +/* call with NMG_LOCK held */ static struct netmap_if* netmap_if_new(const char *ifname, struct netmap_adapter *na) { @@ -608,17 +633,23 @@ netmap_if_new(const char *ifname, struct return NULL; } - if (na->active_fds) + if (na->active_fds) /* already registered */ goto final; + /* create and init the krings arrays. + * Depending on the adapter, this may also create + * the netmap rings themselves + */ if (na->nm_krings_create(na)) goto cleanup; + /* create all missing netmap rings */ if (netmap_mem_rings_create(na)) goto cleanup; final: + /* in all cases, create a new netmap if */ nifp = netmap_mem_if_new(ifname, na); if (nifp == NULL) goto cleanup; @@ -638,8 +669,8 @@ cleanup: /* grab a reference to the memory allocator, if we don't have one already. The * reference is taken from the netmap_adapter registered with the priv. - * */ +/* call with NMG_LOCK held */ static int netmap_get_memory_locked(struct netmap_priv_d* p) { @@ -672,6 +703,7 @@ netmap_get_memory_locked(struct netmap_p } +/* call with NMG_LOCK *not* held */ int netmap_get_memory(struct netmap_priv_d* p) { @@ -683,6 +715,7 @@ netmap_get_memory(struct netmap_priv_d* } +/* call with NMG_LOCK held */ static int netmap_have_memory_locked(struct netmap_priv_d* p) { @@ -690,6 +723,7 @@ netmap_have_memory_locked(struct netmap_ } +/* call with NMG_LOCK held */ static void netmap_drop_memory_locked(struct netmap_priv_d* p) { @@ -755,6 +789,7 @@ netmap_do_unregif(struct netmap_priv_d * netmap_mem_if_delete(na, nifp); } +/* call with NMG_LOCK held */ static __inline int nm_tx_si_user(struct netmap_priv_d *priv) { @@ -762,6 +797,7 @@ nm_tx_si_user(struct netmap_priv_d *priv (priv->np_txqlast - priv->np_txqfirst > 1)); } +/* call with NMG_LOCK held */ static __inline int nm_rx_si_user(struct netmap_priv_d *priv) { @@ -771,8 +807,12 @@ nm_rx_si_user(struct netmap_priv_d *priv /* + * Destructor of the netmap_priv_d, called when the fd has + * no active open() and mmap(). Also called in error paths. + * * returns 1 if this is the last instance and we can free priv */ +/* call with NMG_LOCK held */ int netmap_dtor_locked(struct netmap_priv_d *priv) { @@ -805,6 +845,7 @@ netmap_dtor_locked(struct netmap_priv_d } +/* call with NMG_LOCK *not* held */ void netmap_dtor(void *data) { @@ -1009,7 +1050,7 @@ netmap_rxsync_from_host(struct netmap_ad (void)pwait; /* disable unused warnings */ (void)td; - mtx_lock(&q->lock); + mbq_lock(q); /* First part: import newly received packets */ n = mbq_len(q); @@ -1019,7 +1060,7 @@ netmap_rxsync_from_host(struct netmap_ad nm_i = kring->nr_hwtail; stop_i = nm_prev(nm_i, lim); - while ( nm_i != stop_i && (m = mbq_dequeue(q)) != NULL ) { + while ( nm_i != stop_i && (m = mbq_dequeue(q)) != NULL ) { int len = MBUF_LEN(m); struct netmap_slot *slot = &ring->slot[nm_i]; @@ -1051,7 +1092,7 @@ netmap_rxsync_from_host(struct netmap_ad if (kring->rcur == kring->rtail && td) /* no bufs available */ selrecord(td, &kring->si); - mtx_unlock(&q->lock); + mbq_unlock(q); return ret; } @@ -1194,6 +1235,12 @@ netmap_get_na(struct nmreq *nmr, struct if (*na != NULL) /* valid match in netmap_get_bdg_na() */ goto pipes; + /* + * This must be a hardware na, lookup the name in the system. + * Note that by hardware we actually mean "it shows up in ifconfig". + * This may still be a tap, a veth/epair, or even a + * persistent VALE port. + */ ifp = ifunit_ref(nmr->nr_name); if (ifp == NULL) { return ENXIO; @@ -1212,6 +1259,11 @@ netmap_get_na(struct nmreq *nmr, struct netmap_adapter_get(ret); pipes: + /* + * If we are opening a pipe whose parent was not in netmap mode, + * we have to allocate the pipe array now. + * XXX get rid of this clumsiness (2014-03-15) + */ error = netmap_pipe_alloc(*na, nmr); out: @@ -1219,7 +1271,7 @@ out: netmap_adapter_put(ret); if (ifp) - if_rele(ifp); + if_rele(ifp); /* allow live unloading of drivers modules */ return error; } @@ -1515,7 +1567,7 @@ netmap_set_ringid(struct netmap_priv_d * if (nm_rx_si_user(priv)) na->rx_si_users++; if (netmap_verbose) { - D("%s: tx [%d,%d) rx [%d,%d) id %d", + D("%s: tx [%d,%d) rx [%d,%d) id %d", NM_IFPNAME(na->ifp), priv->np_txqfirst, priv->np_txqlast, @@ -1555,10 +1607,9 @@ netmap_do_regif(struct netmap_priv_d *pr goto out; } nifp = netmap_if_new(NM_IFPNAME(ifp), na); + + /* Allocate a netmap_if and, if necessary, all the netmap_ring's */ if (nifp == NULL) { /* allocation failed */ - /* we should drop the allocator, but only - * if we were the ones who grabbed it - */ error = ENOMEM; goto out; } @@ -1568,10 +1619,8 @@ netmap_do_regif(struct netmap_priv_d *pr } else { /* Otherwise set the card in netmap mode * and make it use the shared buffers. - * - * do not core lock because the race is harmless here, - * there cannot be any traffic to netmap_transmit() */ + /* cache the allocator info in the na */ na->na_lut = na->nm_mem->pools[NETMAP_BUF_POOL].lut; ND("%p->na_lut == %p", na, na->na_lut); na->na_lut_objtotal = na->nm_mem->pools[NETMAP_BUF_POOL].objtotal; @@ -1585,6 +1634,9 @@ out: *err = error; if (error) { priv->np_na = NULL; + /* we should drop the allocator, but only + * if we were the ones who grabbed it + */ if (need_mem) netmap_drop_memory_locked(priv); } @@ -2008,6 +2060,12 @@ flush_tx: continue; /* only one thread does txsync */ if (nm_kr_tryget(kring)) { + /* either busy or stopped + * XXX if the ring is stopped, sleeping would + * be better. In current code, however, we only + * stop the rings for brief intervals (2014-03-14) + */ + if (netmap_verbose) RD(2, "%p lost race on txring %d, ok", priv, i); @@ -2049,7 +2107,7 @@ flush_tx: */ if (want_rx) { int send_down = 0; /* transparent mode */ - /* two rounds here to for race avoidance */ + /* two rounds here for race avoidance */ do_retry_rx: for (i = priv->np_rxqfirst; i < priv->np_rxqlast; i++) { int found = 0; @@ -2120,7 +2178,7 @@ do_retry_rx: * Transparent mode: marked bufs on rx rings between * kring->nr_hwcur and ring->head * are passed to the other endpoint. - * + * * In this mode we also scan the sw rxring, which in * turn passes packets up. * @@ -2139,6 +2197,7 @@ do_retry_rx: static int netmap_hw_krings_create(struct netmap_adapter *); +/* default notify callback */ static int netmap_notify(struct netmap_adapter *na, u_int n_ring, enum txrx tx, int flags) @@ -2148,11 +2207,16 @@ netmap_notify(struct netmap_adapter *na, if (tx == NR_TX) { kring = na->tx_rings + n_ring; OS_selwakeup(&kring->si, PI_NET); + /* optimization: avoid a wake up on the global + * queue if nobody has registered for more + * than one ring + */ if (na->tx_si_users > 0) OS_selwakeup(&na->tx_si, PI_NET); } else { kring = na->rx_rings + n_ring; OS_selwakeup(&kring->si, PI_NET); + /* optimization: same as above */ if (na->rx_si_users > 0) OS_selwakeup(&na->rx_si, PI_NET); } @@ -2160,7 +2224,11 @@ netmap_notify(struct netmap_adapter *na, } -// XXX check handling of failures +/* called by all routines that create netmap_adapters. + * Attach na to the ifp (if any) and provide defaults + * for optional callbacks. Defaults assume that we + * are creating an hardware netmap_adapter. + */ int netmap_attach_common(struct netmap_adapter *na) { @@ -2182,6 +2250,10 @@ netmap_attach_common(struct netmap_adapt NETMAP_SET_CAPABLE(ifp); if (na->nm_krings_create == NULL) { + /* we assume that we have been called by a driver, + * since other port types all provide their own + * nm_krings_create + */ na->nm_krings_create = netmap_hw_krings_create; na->nm_krings_delete = netmap_hw_krings_delete; } @@ -2195,10 +2267,11 @@ netmap_attach_common(struct netmap_adapt } +/* standard cleanup, called by all destructors */ void netmap_detach_common(struct netmap_adapter *na) { - if (na->ifp) + if (na->ifp != NULL) WNA(na->ifp) = NULL; /* XXX do we need this? */ if (na->tx_rings) { /* XXX should not happen */ @@ -2255,12 +2328,17 @@ netmap_attach(struct netmap_adapter *arg hwna->nm_ndo.ndo_start_xmit = linux_netmap_start_xmit; #endif /* linux */ - D("success for %s", NM_IFPNAME(ifp)); + D("success for %s tx %d/%d rx %d/%d queues/slots", + NM_IFPNAME(ifp), + hwna->up.num_tx_rings, hwna->up.num_tx_desc, + hwna->up.num_rx_rings, hwna->up.num_rx_desc + ); return 0; fail: D("fail, arg %p ifp %p na %p", arg, ifp, hwna); - netmap_detach(ifp); + if (ifp) + netmap_detach(ifp); return (hwna ? EINVAL : ENOMEM); } @@ -2294,6 +2372,7 @@ NM_DBG(netmap_adapter_put)(struct netmap return 1; } +/* nm_krings_create callback for all hardware native adapters */ int netmap_hw_krings_create(struct netmap_adapter *na) { @@ -2309,8 +2388,7 @@ netmap_hw_krings_create(struct netmap_ad /* - * Free the allocated memory linked to the given ``netmap_adapter`` - * object. + * Called on module unload by the netmap-enabled drivers */ void netmap_detach(struct ifnet *ifp) @@ -2381,7 +2459,7 @@ netmap_transmit(struct ifnet *ifp, struc * not possible on Linux). * Also avoid overflowing the queue. */ - mtx_lock(&q->lock); + mbq_lock(q); space = kring->nr_hwtail - kring->nr_hwcur; if (space < 0) @@ -2398,13 +2476,17 @@ netmap_transmit(struct ifnet *ifp, struc m = NULL; error = 0; } - mtx_unlock(&q->lock); + mbq_unlock(q); done: if (m) m_freem(m); /* unconditionally wake up listeners */ na->nm_notify(na, na->num_rx_rings, NR_RX, 0); + /* this is normally netmap_notify(), but for nics + * connected to a bridge it is netmap_bwrap_intr_notify(), + * that possibly forwards the frames through the switch + */ return (error); } Modified: stable/10/sys/dev/netmap/netmap_freebsd.c ============================================================================== --- stable/10/sys/dev/netmap/netmap_freebsd.c Mon Jun 9 15:16:17 2014 (r267281) +++ stable/10/sys/dev/netmap/netmap_freebsd.c Mon Jun 9 15:24:45 2014 (r267282) @@ -61,7 +61,8 @@ /* ======================== FREEBSD-SPECIFIC ROUTINES ================== */ -rawsum_t nm_csum_raw(uint8_t *data, size_t len, rawsum_t cur_sum) +rawsum_t +nm_csum_raw(uint8_t *data, size_t len, rawsum_t cur_sum) { /* TODO XXX please use the FreeBSD implementation for this. */ uint16_t *words = (uint16_t *)data; @@ -80,7 +81,8 @@ rawsum_t nm_csum_raw(uint8_t *data, size /* Fold a raw checksum: 'cur_sum' is in host byte order, while the * return value is in network byte order. */ -uint16_t nm_csum_fold(rawsum_t cur_sum) +uint16_t +nm_csum_fold(rawsum_t cur_sum) { /* TODO XXX please use the FreeBSD implementation for this. */ while (cur_sum >> 16) @@ -89,7 +91,8 @@ uint16_t nm_csum_fold(rawsum_t cur_sum) return htobe16((~cur_sum) & 0xFFFF); } -uint16_t nm_csum_ipv4(struct nm_iphdr *iph) +uint16_t +nm_csum_ipv4(struct nm_iphdr *iph) { #if 0 return in_cksum_hdr((void *)iph); @@ -98,7 +101,8 @@ uint16_t nm_csum_ipv4(struct nm_iphdr *i #endif } -void nm_csum_tcpudp_ipv4(struct nm_iphdr *iph, void *data, +void +nm_csum_tcpudp_ipv4(struct nm_iphdr *iph, void *data, size_t datalen, uint16_t *check) { #ifdef INET @@ -120,7 +124,8 @@ void nm_csum_tcpudp_ipv4(struct nm_iphdr #endif } -void nm_csum_tcpudp_ipv6(struct nm_ipv6hdr *ip6h, void *data, +void +nm_csum_tcpudp_ipv6(struct nm_ipv6hdr *ip6h, void *data, size_t datalen, uint16_t *check) { #ifdef INET6 @@ -143,7 +148,8 @@ void nm_csum_tcpudp_ipv6(struct nm_ipv6h int netmap_catch_rx(struct netmap_adapter *na, int intercept) { - struct netmap_generic_adapter *gna = (struct netmap_generic_adapter *)na; + struct netmap_generic_adapter *gna = + (struct netmap_generic_adapter *)na; struct ifnet *ifp = na->ifp; if (intercept) { @@ -209,11 +215,29 @@ generic_xmit_frame(struct ifnet *ifp, st { int ret; - m->m_len = m->m_pkthdr.len = 0; + /* + * The mbuf should be a cluster from our special pool, + * so we do not need to do an m_copyback but just copy + * (and eventually, just reference the netmap buffer) + */ - // copy data to the mbuf - m_copyback(m, 0, len, addr); - // inc refcount. We are alone, so we can skip the atomic + if (*m->m_ext.ref_cnt != 1) { + D("invalid refcnt %d for %p", + *m->m_ext.ref_cnt, m); + panic("in generic_xmit_frame"); + } + // XXX the ext_size check is unnecessary if we link the netmap buf + if (m->m_ext.ext_size < len) { + RD(5, "size %d < len %d", m->m_ext.ext_size, len); + len = m->m_ext.ext_size; + } + if (1) { /* XXX seems to have negligible benefits */ + m->m_ext.ext_buf = m->m_data = addr; + } else { + bcopy(addr, m->m_data, len); + } + m->m_len = m->m_pkthdr.len = len; + // inc refcount. All ours, we could skip the atomic atomic_fetchadd_int(m->m_ext.ref_cnt, 1); m->m_flags |= M_FLOWID; m->m_pkthdr.flowid = ring_nr; @@ -223,6 +247,14 @@ generic_xmit_frame(struct ifnet *ifp, st } +#if __FreeBSD_version >= 1100005 +struct netmap_adapter * +netmap_getna(if_t ifp) +{ + return (NA((struct ifnet *)ifp)); +} +#endif /* __FreeBSD_version >= 1100005 */ + /* * The following two functions are empty until we have a generic * way to extract the info from the ifp @@ -230,7 +262,7 @@ generic_xmit_frame(struct ifnet *ifp, st int generic_find_num_desc(struct ifnet *ifp, unsigned int *tx, unsigned int *rx) { - D("called"); + D("called, in tx %d rx %d", *tx, *rx); return 0; } @@ -238,13 +270,14 @@ generic_find_num_desc(struct ifnet *ifp, void generic_find_num_queues(struct ifnet *ifp, u_int *txq, u_int *rxq) { - D("called"); + D("called, in txq %d rxq %d", *txq, *rxq); *txq = netmap_generic_rings; *rxq = netmap_generic_rings; } -void netmap_mitigation_init(struct nm_generic_mit *mit, struct netmap_adapter *na) +void +netmap_mitigation_init(struct nm_generic_mit *mit, struct netmap_adapter *na) { ND("called"); mit->mit_pending = 0; @@ -252,26 +285,30 @@ void netmap_mitigation_init(struct nm_ge } -void netmap_mitigation_start(struct nm_generic_mit *mit) +void +netmap_mitigation_start(struct nm_generic_mit *mit) { ND("called"); } -void netmap_mitigation_restart(struct nm_generic_mit *mit) +void +netmap_mitigation_restart(struct nm_generic_mit *mit) { ND("called"); } -int netmap_mitigation_active(struct nm_generic_mit *mit) +int +netmap_mitigation_active(struct nm_generic_mit *mit) { ND("called"); return 0; } -void netmap_mitigation_cleanup(struct nm_generic_mit *mit) +void +netmap_mitigation_cleanup(struct nm_generic_mit *mit) { ND("called"); } Modified: stable/10/sys/dev/netmap/netmap_generic.c ============================================================================== --- stable/10/sys/dev/netmap/netmap_generic.c Mon Jun 9 15:16:17 2014 (r267281) +++ stable/10/sys/dev/netmap/netmap_generic.c Mon Jun 9 15:24:45 2014 (r267282) @@ -81,20 +81,26 @@ __FBSDID("$FreeBSD$"); #include #include -#define rtnl_lock() D("rtnl_lock called"); -#define rtnl_unlock() D("rtnl_unlock called"); +#define rtnl_lock() ND("rtnl_lock called") +#define rtnl_unlock() ND("rtnl_unlock called") #define MBUF_TXQ(m) ((m)->m_pkthdr.flowid) #define MBUF_RXQ(m) ((m)->m_pkthdr.flowid) #define smp_mb() /* - * mbuf wrappers + * FreeBSD mbuf allocator/deallocator in emulation mode: + * + * We allocate EXT_PACKET mbuf+clusters, but need to set M_NOFREE + * so that the destructor, if invoked, will not free the packet. + * In principle we should set the destructor only on demand, + * but since there might be a race we better do it on allocation. + * As a consequence, we also need to set the destructor or we + * would leak buffers. */ /* - * we allocate an EXT_PACKET + * mbuf wrappers */ -#define netmap_get_mbuf(len) m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR|M_NOFREE) /* mbuf destructor, also need to change the type to EXT_EXTREF, * add an M_NOFREE flag, and then clear the flag and @@ -106,6 +112,32 @@ __FBSDID("$FreeBSD$"); (m)->m_ext.ext_type = EXT_EXTREF; \ } while (0) +static void +netmap_default_mbuf_destructor(struct mbuf *m) +{ + /* restore original mbuf */ + m->m_ext.ext_buf = m->m_data = m->m_ext.ext_arg1; + m->m_ext.ext_arg1 = NULL; + m->m_ext.ext_type = EXT_PACKET; + m->m_ext.ext_free = NULL; + if (*(m->m_ext.ref_cnt) == 0) + *(m->m_ext.ref_cnt) = 1; + uma_zfree(zone_pack, m); +} + +static inline struct mbuf * +netmap_get_mbuf(int len) +{ + struct mbuf *m; + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR | M_NOFREE); + if (m) { + m->m_ext.ext_arg1 = m->m_ext.ext_buf; // XXX save + m->m_ext.ext_free = (void *)netmap_default_mbuf_destructor; + m->m_ext.ext_type = EXT_EXTREF; + ND(5, "create m %p refcnt %d", m, *m->m_ext.ref_cnt); + } + return m; +} #define GET_MBUF_REFCNT(m) ((m)->m_ext.ref_cnt ? *(m)->m_ext.ref_cnt : -1) @@ -223,7 +255,7 @@ generic_netmap_register(struct netmap_ad #endif /* REG_RESET */ if (enable) { /* Enable netmap mode. */ - /* Init the mitigation support. */ + /* Init the mitigation support on all the rx queues. */ gna->mit = malloc(na->num_rx_rings * sizeof(struct nm_generic_mit), M_DEVBUF, M_NOWAIT | M_ZERO); if (!gna->mit) { @@ -373,15 +405,11 @@ out: static void generic_mbuf_destructor(struct mbuf *m) { - if (netmap_verbose) - D("Tx irq (%p) queue %d", m, MBUF_TXQ(m)); netmap_generic_irq(MBUF_IFP(m), MBUF_TXQ(m), NULL); #ifdef __FreeBSD__ - m->m_ext.ext_type = EXT_PACKET; - m->m_ext.ext_free = NULL; - if (*(m->m_ext.ref_cnt) == 0) - *(m->m_ext.ref_cnt) = 1; - uma_zfree(zone_pack, m); + if (netmap_verbose) + RD(5, "Tx irq (%p) queue %d index %d" , m, MBUF_TXQ(m), (int)(uintptr_t)m->m_ext.ext_arg1); + netmap_default_mbuf_destructor(m); #endif /* __FreeBSD__ */ IFRATE(rate_ctx.new.txirq++); } @@ -471,12 +499,12 @@ generic_set_tx_event(struct netmap_kring e = generic_tx_event_middle(kring, hwcur); m = kring->tx_pool[e]; + ND(5, "Request Event at %d mbuf %p refcnt %d", e, m, m ? GET_MBUF_REFCNT(m) : -2 ); if (m == NULL) { /* This can happen if there is already an event on the netmap slot 'e': There is nothing to do. */ return; } - ND("Event at %d mbuf %p refcnt %d", e, m, GET_MBUF_REFCNT(m)); kring->tx_pool[e] = NULL; SET_MBUF_DESTRUCTOR(m, generic_mbuf_destructor); @@ -770,6 +798,10 @@ generic_netmap_attach(struct ifnet *ifp) generic_find_num_desc(ifp, &num_tx_desc, &num_rx_desc); ND("Netmap ring size: TX = %d, RX = %d", num_tx_desc, num_rx_desc); + if (num_tx_desc == 0 || num_rx_desc == 0) { + D("Device has no hw slots (tx %u, rx %u)", num_tx_desc, num_rx_desc); + return EINVAL; + } gna = malloc(sizeof(*gna), M_DEVBUF, M_NOWAIT | M_ZERO); if (gna == NULL) { Modified: stable/10/sys/dev/netmap/netmap_kern.h ============================================================================== --- stable/10/sys/dev/netmap/netmap_kern.h Mon Jun 9 15:16:17 2014 (r267281) +++ stable/10/sys/dev/netmap/netmap_kern.h Mon Jun 9 15:24:45 2014 (r267282) @@ -62,6 +62,9 @@ #define NM_ATOMIC_TEST_AND_SET(p) (!atomic_cmpset_acq_int((p), 0, 1)) #define NM_ATOMIC_CLEAR(p) atomic_store_rel_int((p), 0) +#if __FreeBSD_version >= 1100005 +struct netmap_adapter *netmap_getna(if_t ifp); +#endif MALLOC_DECLARE(M_NETMAP); @@ -183,9 +186,6 @@ extern NMG_LOCK_T netmap_global_lock; * the next empty buffer as known by the hardware (next_to_check or so). * TX rings: hwcur + hwofs coincides with next_to_send * - * Clients cannot issue concurrent syscall on a ring. The system - * detects this and reports an error using two flags, - * NKR_WBUSY and NKR_RBUSY * For received packets, slot->flags is set to nkr_slot_flags * so we can provide a proper initial value (e.g. set NS_FORWARD * when operating in 'transparent' mode). @@ -208,7 +208,7 @@ extern NMG_LOCK_T netmap_global_lock; * The kring is manipulated by txsync/rxsync and generic netmap function. * * Concurrent rxsync or txsync on the same ring are prevented through - * by nm_kr_lock() which in turn uses nr_busy. This is all we need + * by nm_kr_(try)lock() which in turn uses nr_busy. This is all we need * for NIC rings, and for TX rings attached to the host stack. * * RX rings attached to the host stack use an mbq (rx_queue) on both @@ -440,15 +440,18 @@ struct netmap_adapter { /* * nm_dtor() is the cleanup routine called when destroying * the adapter. + * Called with NMG_LOCK held. * * nm_register() is called on NIOCREGIF and close() to enter * or exit netmap mode on the NIC + * Called with NMG_LOCK held. * * nm_txsync() pushes packets to the underlying hw/switch * * nm_rxsync() collects packets from the underlying hw/switch * * nm_config() returns configuration information from the OS + * Called with NMG_LOCK held. * * nm_krings_create() create and init the krings array * (the array layout must conform to the description @@ -456,13 +459,12 @@ struct netmap_adapter { * * nm_krings_delete() cleanup and delete the kring array * - * nm_notify() is used to act after data have become available. + * nm_notify() is used to act after data have become available + * (or the stopped state of the ring has changed) * For hw devices this is typically a selwakeup(), * but for NIC/host ports attached to a switch (or vice-versa) * we also need to invoke the 'txsync' code downstream. */ - - /* private cleanup */ void (*nm_dtor)(struct netmap_adapter *); int (*nm_register)(struct netmap_adapter *, int onoff); @@ -678,7 +680,7 @@ static inline uint32_t nm_kr_rxspace(struct netmap_kring *k) { int space = k->nr_hwtail - k->nr_hwcur; - if (space < 0) + if (space < 0) space += k->nkr_num_slots; ND("preserving %d rx slots %d -> %d", space, k->nr_hwcur, k->nr_hwtail); @@ -827,7 +829,7 @@ nm_txsync_finalize(struct netmap_kring * { /* update ring tail to what the kernel knows */ kring->ring->tail = kring->rtail = kring->nr_hwtail; - + /* note, head/rhead/hwcur might be behind cur/rcur * if no carrier */ @@ -1376,5 +1378,4 @@ void bdg_mismatch_datapath(struct netmap struct netmap_vp_adapter *dst_na, struct nm_bdg_fwd *ft_p, struct netmap_ring *ring, u_int *j, u_int lim, u_int *howmany); - #endif /* _NET_NETMAP_KERN_H_ */ Modified: stable/10/sys/dev/netmap/netmap_mbq.c ============================================================================== --- stable/10/sys/dev/netmap/netmap_mbq.c Mon Jun 9 15:16:17 2014 (r267281) +++ stable/10/sys/dev/netmap/netmap_mbq.c Mon Jun 9 15:24:45 2014 (r267282) @@ -76,9 +76,9 @@ static inline void __mbq_enqueue(struct void mbq_safe_enqueue(struct mbq *q, struct mbuf *m) { - mtx_lock(&q->lock); + mbq_lock(q); __mbq_enqueue(q, m); - mtx_unlock(&q->lock); + mbq_unlock(q); } @@ -110,9 +110,9 @@ struct mbuf *mbq_safe_dequeue(struct mbq { struct mbuf *ret; - mtx_lock(&q->lock); + mbq_lock(q); ret = __mbq_dequeue(q); - mtx_unlock(&q->lock); + mbq_unlock(q); return ret; } Modified: stable/10/sys/dev/netmap/netmap_mbq.h ============================================================================== --- stable/10/sys/dev/netmap/netmap_mbq.h Mon Jun 9 15:16:17 2014 (r267281) +++ stable/10/sys/dev/netmap/netmap_mbq.h Mon Jun 9 15:24:45 2014 (r267282) @@ -62,7 +62,17 @@ void mbq_enqueue(struct mbq *q, struct m struct mbuf *mbq_dequeue(struct mbq *q); void mbq_purge(struct mbq *q); -/* XXX missing mbq_lock() and mbq_unlock */ +static inline void +mbq_lock(struct mbq *q) +{ + mtx_lock_spin(&q->lock); +} + +static inline void +mbq_unlock(struct mbq *q) +{ + mtx_unlock_spin(&q->lock); +} void mbq_safe_init(struct mbq *q); void mbq_safe_destroy(struct mbq *q); Modified: stable/10/sys/dev/netmap/netmap_mem2.c ============================================================================== --- stable/10/sys/dev/netmap/netmap_mem2.c Mon Jun 9 15:16:17 2014 (r267281) +++ stable/10/sys/dev/netmap/netmap_mem2.c Mon Jun 9 15:24:45 2014 (r267282) @@ -992,7 +992,7 @@ netmap_mem_private_new(const char *name, if (p[NETMAP_RING_POOL].num < v) p[NETMAP_RING_POOL].num = v; /* for each pipe we only need the buffers for the 4 "real" rings. - * On the other end, the pipe ring dimension may be different from + * On the other end, the pipe ring dimension may be different from * the parent port ring dimension. As a compromise, we allocate twice the * space actually needed if the pipe rings were the same size as the parent rings */ Modified: stable/10/sys/dev/netmap/netmap_pipe.c ============================================================================== --- stable/10/sys/dev/netmap/netmap_pipe.c Mon Jun 9 15:16:17 2014 (r267281) +++ stable/10/sys/dev/netmap/netmap_pipe.c Mon Jun 9 15:24:45 2014 (r267282) @@ -391,7 +391,7 @@ err: /* netmap_pipe_reg. * * There are two cases on registration (onoff==1) - * + * * 1.a) state is * * usr1 --> e1 --> e2 @@ -403,7 +403,7 @@ err: * usr1 --> e1 --> e2 <-- usr2 * * and we are e2. Drop the ref e1 is holding. - * + * * There are two additional cases on unregister (onoff==0) * * 2.a) state is @@ -462,14 +462,14 @@ netmap_pipe_reg(struct netmap_adapter *n * * 1) state is * - * usr1 --> e1 --> e2 + * usr1 --> e1 --> e2 * - * and we are e1 (e2 is not registered, so krings_delete cannot be + * and we are e1 (e2 is not registered, so krings_delete cannot be * called on it); * * 2) state is * - * usr1 --> e1 e2 <-- usr2 + * usr1 --> e1 e2 <-- usr2 * * and we are either e1 or e2. * @@ -519,7 +519,7 @@ netmap_pipe_dtor(struct netmap_adapter * pna->peer_ref = 0; netmap_adapter_put(&pna->peer->up); } - if (pna->role == NR_REG_PIPE_MASTER) + if (pna->role == NR_REG_PIPE_MASTER) netmap_pipe_remove(pna->parent, pna); netmap_adapter_put(pna->parent); free(na->ifp, M_DEVBUF); @@ -587,7 +587,7 @@ netmap_get_pipe_na(struct nmreq *nmr, st error = ENODEV; goto put_out; } - /* we create both master and slave. + /* we create both master and slave. * The endpoint we were asked for holds a reference to * the other one. */ Modified: stable/10/sys/dev/netmap/netmap_vale.c ============================================================================== --- stable/10/sys/dev/netmap/netmap_vale.c Mon Jun 9 15:16:17 2014 (r267281) +++ stable/10/sys/dev/netmap/netmap_vale.c Mon Jun 9 15:24:45 2014 (r267282) @@ -959,6 +959,14 @@ nm_bdg_preflush(struct netmap_vp_adapter ft[ft_i].ft_next = NM_FT_NULL; buf = ft[ft_i].ft_buf = (slot->flags & NS_INDIRECT) ? (void *)(uintptr_t)slot->ptr : BDG_NMB(&na->up, slot); + if (unlikely(buf == NULL)) { + RD(5, "NULL %s buffer pointer from %s slot %d len %d", + (slot->flags & NS_INDIRECT) ? "INDIRECT" : "DIRECT", + kring->name, j, ft[ft_i].ft_len); + buf = ft[ft_i].ft_buf = NMB_VA(0); /* the 'null' buffer */ + ft[ft_i].ft_len = 0; + ft[ft_i].ft_flags = 0; + } __builtin_prefetch(buf); ++ft_i; if (slot->flags & NS_MOREFRAG) { @@ -1064,7 +1072,7 @@ netmap_bdg_learning(char *buf, u_int buf uint64_t smac, dmac; if (buf_len < 14) { - D("invalid buf length %d", buf_len); + RD(5, "invalid buf length %d", buf_len); return NM_BDG_NOPORT; } dmac = le64toh(*(uint64_t *)(buf)) & 0xffffffffffff; @@ -1312,6 +1320,7 @@ nm_bdg_flush(struct nm_bdg_fwd *ft, u_in needed = d->bq_len + brddst->bq_len; if (unlikely(dst_na->virt_hdr_len != na->virt_hdr_len)) { + RD(3, "virt_hdr_mismatch, src %d len %d", na->virt_hdr_len, dst_na->virt_hdr_len); /* There is a virtio-net header/offloadings mismatch between * source and destination. The slower mismatch datapath will * be used to cope with all the mismatches. @@ -1412,6 +1421,11 @@ retry: /* round to a multiple of 64 */ copy_len = (copy_len + 63) & ~63; + if (unlikely(copy_len > NETMAP_BUF_SIZE || + copy_len > NETMAP_BUF_SIZE)) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Mon Jun 9 16:31:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6DB597CB; Mon, 9 Jun 2014 16:31:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5596A2840; Mon, 9 Jun 2014 16:31:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s59GV3Cc098927; Mon, 9 Jun 2014 16:31:03 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s59GUvfR098723; Mon, 9 Jun 2014 16:30:57 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201406091630.s59GUvfR098723@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 9 Jun 2014 16:30:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267285 - in stable/9: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/asn1 crypto/openssl/crypto/bn crypto/openssl/crypto/cms crypto/openssl/crypto/ec cr... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 16:31:03 -0000 Author: jkim Date: Mon Jun 9 16:30:56 2014 New Revision: 267285 URL: http://svnweb.freebsd.org/changeset/base/267285 Log: Merge OpenSSL 0.9.8za. Approved by: re (kib), so (delphij) Modified: stable/9/crypto/openssl/ACKNOWLEDGMENTS stable/9/crypto/openssl/CHANGES stable/9/crypto/openssl/Configure stable/9/crypto/openssl/FAQ stable/9/crypto/openssl/Makefile stable/9/crypto/openssl/Makefile.org stable/9/crypto/openssl/NEWS stable/9/crypto/openssl/README stable/9/crypto/openssl/apps/apps.c stable/9/crypto/openssl/apps/ocsp.c stable/9/crypto/openssl/apps/req.c stable/9/crypto/openssl/apps/s_cb.c stable/9/crypto/openssl/apps/smime.c stable/9/crypto/openssl/crypto/asn1/a_int.c stable/9/crypto/openssl/crypto/asn1/a_strnid.c stable/9/crypto/openssl/crypto/asn1/t_pkey.c stable/9/crypto/openssl/crypto/bn/bn_mont.c stable/9/crypto/openssl/crypto/cms/cms_cd.c stable/9/crypto/openssl/crypto/cms/cms_env.c stable/9/crypto/openssl/crypto/cms/cms_lib.c stable/9/crypto/openssl/crypto/cms/cms_sd.c stable/9/crypto/openssl/crypto/cms/cms_smime.c stable/9/crypto/openssl/crypto/ec/ec_lib.c stable/9/crypto/openssl/crypto/engine/eng_all.c stable/9/crypto/openssl/crypto/engine/engine.h stable/9/crypto/openssl/crypto/err/err_all.c stable/9/crypto/openssl/crypto/err/openssl.ec stable/9/crypto/openssl/crypto/evp/bio_b64.c stable/9/crypto/openssl/crypto/evp/encode.c stable/9/crypto/openssl/crypto/opensslv.h stable/9/crypto/openssl/crypto/pkcs12/p12_crt.c stable/9/crypto/openssl/crypto/pkcs12/p12_kiss.c stable/9/crypto/openssl/crypto/x86cpuid.pl stable/9/crypto/openssl/demos/x509/mkreq.c stable/9/crypto/openssl/doc/apps/smime.pod stable/9/crypto/openssl/doc/apps/verify.pod stable/9/crypto/openssl/doc/crypto/CONF_modules_free.pod stable/9/crypto/openssl/doc/crypto/CONF_modules_load_file.pod stable/9/crypto/openssl/doc/crypto/ERR_get_error.pod stable/9/crypto/openssl/doc/crypto/OPENSSL_config.pod stable/9/crypto/openssl/doc/crypto/X509_NAME_ENTRY_get_object.pod stable/9/crypto/openssl/doc/crypto/ecdsa.pod stable/9/crypto/openssl/doc/fingerprints.txt stable/9/crypto/openssl/doc/ssl/SSL_COMP_add_compression_method.pod stable/9/crypto/openssl/doc/ssl/SSL_CTX_add_session.pod stable/9/crypto/openssl/doc/ssl/SSL_CTX_load_verify_locations.pod stable/9/crypto/openssl/doc/ssl/SSL_CTX_set_client_CA_list.pod stable/9/crypto/openssl/doc/ssl/SSL_CTX_set_msg_callback.pod stable/9/crypto/openssl/doc/ssl/SSL_CTX_set_options.pod stable/9/crypto/openssl/doc/ssl/SSL_CTX_set_session_id_context.pod stable/9/crypto/openssl/doc/ssl/SSL_CTX_set_ssl_version.pod stable/9/crypto/openssl/doc/ssl/SSL_accept.pod stable/9/crypto/openssl/doc/ssl/SSL_clear.pod stable/9/crypto/openssl/doc/ssl/SSL_connect.pod stable/9/crypto/openssl/doc/ssl/SSL_do_handshake.pod stable/9/crypto/openssl/doc/ssl/SSL_read.pod stable/9/crypto/openssl/doc/ssl/SSL_session_reused.pod stable/9/crypto/openssl/doc/ssl/SSL_set_fd.pod stable/9/crypto/openssl/doc/ssl/SSL_set_session.pod stable/9/crypto/openssl/doc/ssl/SSL_set_shutdown.pod stable/9/crypto/openssl/doc/ssl/SSL_shutdown.pod stable/9/crypto/openssl/doc/ssl/SSL_write.pod stable/9/crypto/openssl/openssl.spec stable/9/crypto/openssl/ssl/d1_both.c stable/9/crypto/openssl/ssl/d1_lib.c stable/9/crypto/openssl/ssl/d1_pkt.c stable/9/crypto/openssl/ssl/d1_srvr.c stable/9/crypto/openssl/ssl/s23_clnt.c stable/9/crypto/openssl/ssl/s3_cbc.c stable/9/crypto/openssl/ssl/s3_clnt.c stable/9/crypto/openssl/ssl/s3_enc.c stable/9/crypto/openssl/ssl/s3_lib.c stable/9/crypto/openssl/ssl/s3_pkt.c stable/9/crypto/openssl/ssl/s3_srvr.c stable/9/crypto/openssl/ssl/ssl.h stable/9/crypto/openssl/ssl/ssl3.h stable/9/crypto/openssl/ssl/ssl_err.c stable/9/crypto/openssl/ssl/ssl_lib.c stable/9/crypto/openssl/ssl/ssl_stat.c stable/9/crypto/openssl/ssl/ssltest.c stable/9/crypto/openssl/ssl/t1_enc.c stable/9/crypto/openssl/ssl/t1_lib.c stable/9/crypto/openssl/ssl/tls1.h stable/9/crypto/openssl/test/Makefile stable/9/crypto/openssl/test/cms-test.pl stable/9/crypto/openssl/test/testssl stable/9/crypto/openssl/util/libeay.num stable/9/crypto/openssl/util/pl/VC-32.pl stable/9/secure/lib/libcrypto/Makefile.inc stable/9/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 stable/9/secure/lib/libcrypto/man/ASN1_STRING_length.3 stable/9/secure/lib/libcrypto/man/ASN1_STRING_new.3 stable/9/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 stable/9/secure/lib/libcrypto/man/ASN1_generate_nconf.3 stable/9/secure/lib/libcrypto/man/BIO_ctrl.3 stable/9/secure/lib/libcrypto/man/BIO_f_base64.3 stable/9/secure/lib/libcrypto/man/BIO_f_buffer.3 stable/9/secure/lib/libcrypto/man/BIO_f_cipher.3 stable/9/secure/lib/libcrypto/man/BIO_f_md.3 stable/9/secure/lib/libcrypto/man/BIO_f_null.3 stable/9/secure/lib/libcrypto/man/BIO_f_ssl.3 stable/9/secure/lib/libcrypto/man/BIO_find_type.3 stable/9/secure/lib/libcrypto/man/BIO_new.3 stable/9/secure/lib/libcrypto/man/BIO_push.3 stable/9/secure/lib/libcrypto/man/BIO_read.3 stable/9/secure/lib/libcrypto/man/BIO_s_accept.3 stable/9/secure/lib/libcrypto/man/BIO_s_bio.3 stable/9/secure/lib/libcrypto/man/BIO_s_connect.3 stable/9/secure/lib/libcrypto/man/BIO_s_fd.3 stable/9/secure/lib/libcrypto/man/BIO_s_file.3 stable/9/secure/lib/libcrypto/man/BIO_s_mem.3 stable/9/secure/lib/libcrypto/man/BIO_s_null.3 stable/9/secure/lib/libcrypto/man/BIO_s_socket.3 stable/9/secure/lib/libcrypto/man/BIO_set_callback.3 stable/9/secure/lib/libcrypto/man/BIO_should_retry.3 stable/9/secure/lib/libcrypto/man/BN_BLINDING_new.3 stable/9/secure/lib/libcrypto/man/BN_CTX_new.3 stable/9/secure/lib/libcrypto/man/BN_CTX_start.3 stable/9/secure/lib/libcrypto/man/BN_add.3 stable/9/secure/lib/libcrypto/man/BN_add_word.3 stable/9/secure/lib/libcrypto/man/BN_bn2bin.3 stable/9/secure/lib/libcrypto/man/BN_cmp.3 stable/9/secure/lib/libcrypto/man/BN_copy.3 stable/9/secure/lib/libcrypto/man/BN_generate_prime.3 stable/9/secure/lib/libcrypto/man/BN_mod_inverse.3 stable/9/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 stable/9/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 stable/9/secure/lib/libcrypto/man/BN_new.3 stable/9/secure/lib/libcrypto/man/BN_num_bytes.3 stable/9/secure/lib/libcrypto/man/BN_rand.3 stable/9/secure/lib/libcrypto/man/BN_set_bit.3 stable/9/secure/lib/libcrypto/man/BN_swap.3 stable/9/secure/lib/libcrypto/man/BN_zero.3 stable/9/secure/lib/libcrypto/man/CONF_modules_free.3 stable/9/secure/lib/libcrypto/man/CONF_modules_load_file.3 stable/9/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 stable/9/secure/lib/libcrypto/man/DH_generate_key.3 stable/9/secure/lib/libcrypto/man/DH_generate_parameters.3 stable/9/secure/lib/libcrypto/man/DH_get_ex_new_index.3 stable/9/secure/lib/libcrypto/man/DH_new.3 stable/9/secure/lib/libcrypto/man/DH_set_method.3 stable/9/secure/lib/libcrypto/man/DH_size.3 stable/9/secure/lib/libcrypto/man/DSA_SIG_new.3 stable/9/secure/lib/libcrypto/man/DSA_do_sign.3 stable/9/secure/lib/libcrypto/man/DSA_dup_DH.3 stable/9/secure/lib/libcrypto/man/DSA_generate_key.3 stable/9/secure/lib/libcrypto/man/DSA_generate_parameters.3 stable/9/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 stable/9/secure/lib/libcrypto/man/DSA_new.3 stable/9/secure/lib/libcrypto/man/DSA_set_method.3 stable/9/secure/lib/libcrypto/man/DSA_sign.3 stable/9/secure/lib/libcrypto/man/DSA_size.3 stable/9/secure/lib/libcrypto/man/ERR_GET_LIB.3 stable/9/secure/lib/libcrypto/man/ERR_clear_error.3 stable/9/secure/lib/libcrypto/man/ERR_error_string.3 stable/9/secure/lib/libcrypto/man/ERR_get_error.3 stable/9/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 stable/9/secure/lib/libcrypto/man/ERR_load_strings.3 stable/9/secure/lib/libcrypto/man/ERR_print_errors.3 stable/9/secure/lib/libcrypto/man/ERR_put_error.3 stable/9/secure/lib/libcrypto/man/ERR_remove_state.3 stable/9/secure/lib/libcrypto/man/ERR_set_mark.3 stable/9/secure/lib/libcrypto/man/EVP_BytesToKey.3 stable/9/secure/lib/libcrypto/man/EVP_DigestInit.3 stable/9/secure/lib/libcrypto/man/EVP_EncryptInit.3 stable/9/secure/lib/libcrypto/man/EVP_OpenInit.3 stable/9/secure/lib/libcrypto/man/EVP_PKEY_new.3 stable/9/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 stable/9/secure/lib/libcrypto/man/EVP_SealInit.3 stable/9/secure/lib/libcrypto/man/EVP_SignInit.3 stable/9/secure/lib/libcrypto/man/EVP_VerifyInit.3 stable/9/secure/lib/libcrypto/man/OBJ_nid2obj.3 stable/9/secure/lib/libcrypto/man/OPENSSL_Applink.3 stable/9/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 stable/9/secure/lib/libcrypto/man/OPENSSL_config.3 stable/9/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 stable/9/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 stable/9/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 stable/9/secure/lib/libcrypto/man/PKCS12_create.3 stable/9/secure/lib/libcrypto/man/PKCS12_parse.3 stable/9/secure/lib/libcrypto/man/PKCS7_decrypt.3 stable/9/secure/lib/libcrypto/man/PKCS7_encrypt.3 stable/9/secure/lib/libcrypto/man/PKCS7_sign.3 stable/9/secure/lib/libcrypto/man/PKCS7_verify.3 stable/9/secure/lib/libcrypto/man/RAND_add.3 stable/9/secure/lib/libcrypto/man/RAND_bytes.3 stable/9/secure/lib/libcrypto/man/RAND_cleanup.3 stable/9/secure/lib/libcrypto/man/RAND_egd.3 stable/9/secure/lib/libcrypto/man/RAND_load_file.3 stable/9/secure/lib/libcrypto/man/RAND_set_rand_method.3 stable/9/secure/lib/libcrypto/man/RSA_blinding_on.3 stable/9/secure/lib/libcrypto/man/RSA_check_key.3 stable/9/secure/lib/libcrypto/man/RSA_generate_key.3 stable/9/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 stable/9/secure/lib/libcrypto/man/RSA_new.3 stable/9/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 stable/9/secure/lib/libcrypto/man/RSA_print.3 stable/9/secure/lib/libcrypto/man/RSA_private_encrypt.3 stable/9/secure/lib/libcrypto/man/RSA_public_encrypt.3 stable/9/secure/lib/libcrypto/man/RSA_set_method.3 stable/9/secure/lib/libcrypto/man/RSA_sign.3 stable/9/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 stable/9/secure/lib/libcrypto/man/RSA_size.3 stable/9/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 stable/9/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 stable/9/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 stable/9/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 stable/9/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 stable/9/secure/lib/libcrypto/man/X509_NAME_print_ex.3 stable/9/secure/lib/libcrypto/man/X509_new.3 stable/9/secure/lib/libcrypto/man/bio.3 stable/9/secure/lib/libcrypto/man/blowfish.3 stable/9/secure/lib/libcrypto/man/bn.3 stable/9/secure/lib/libcrypto/man/bn_internal.3 stable/9/secure/lib/libcrypto/man/buffer.3 stable/9/secure/lib/libcrypto/man/crypto.3 stable/9/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 stable/9/secure/lib/libcrypto/man/d2i_DHparams.3 stable/9/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 stable/9/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 stable/9/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 stable/9/secure/lib/libcrypto/man/d2i_X509.3 stable/9/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 stable/9/secure/lib/libcrypto/man/d2i_X509_CRL.3 stable/9/secure/lib/libcrypto/man/d2i_X509_NAME.3 stable/9/secure/lib/libcrypto/man/d2i_X509_REQ.3 stable/9/secure/lib/libcrypto/man/d2i_X509_SIG.3 stable/9/secure/lib/libcrypto/man/des.3 stable/9/secure/lib/libcrypto/man/dh.3 stable/9/secure/lib/libcrypto/man/dsa.3 stable/9/secure/lib/libcrypto/man/ecdsa.3 stable/9/secure/lib/libcrypto/man/engine.3 stable/9/secure/lib/libcrypto/man/err.3 stable/9/secure/lib/libcrypto/man/evp.3 stable/9/secure/lib/libcrypto/man/hmac.3 stable/9/secure/lib/libcrypto/man/lh_stats.3 stable/9/secure/lib/libcrypto/man/lhash.3 stable/9/secure/lib/libcrypto/man/md5.3 stable/9/secure/lib/libcrypto/man/mdc2.3 stable/9/secure/lib/libcrypto/man/pem.3 stable/9/secure/lib/libcrypto/man/rand.3 stable/9/secure/lib/libcrypto/man/rc4.3 stable/9/secure/lib/libcrypto/man/ripemd.3 stable/9/secure/lib/libcrypto/man/rsa.3 stable/9/secure/lib/libcrypto/man/sha.3 stable/9/secure/lib/libcrypto/man/threads.3 stable/9/secure/lib/libcrypto/man/ui.3 stable/9/secure/lib/libcrypto/man/ui_compat.3 stable/9/secure/lib/libcrypto/man/x509.3 stable/9/secure/lib/libssl/man/SSL_CIPHER_get_name.3 stable/9/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 stable/9/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 stable/9/secure/lib/libssl/man/SSL_CTX_add_session.3 stable/9/secure/lib/libssl/man/SSL_CTX_ctrl.3 stable/9/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 stable/9/secure/lib/libssl/man/SSL_CTX_free.3 stable/9/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 stable/9/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 stable/9/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 stable/9/secure/lib/libssl/man/SSL_CTX_new.3 stable/9/secure/lib/libssl/man/SSL_CTX_sess_number.3 stable/9/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 stable/9/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 stable/9/secure/lib/libssl/man/SSL_CTX_sessions.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_mode.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_options.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_timeout.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_verify.3 stable/9/secure/lib/libssl/man/SSL_CTX_use_certificate.3 stable/9/secure/lib/libssl/man/SSL_SESSION_free.3 stable/9/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 stable/9/secure/lib/libssl/man/SSL_SESSION_get_time.3 stable/9/secure/lib/libssl/man/SSL_accept.3 stable/9/secure/lib/libssl/man/SSL_alert_type_string.3 stable/9/secure/lib/libssl/man/SSL_clear.3 stable/9/secure/lib/libssl/man/SSL_connect.3 stable/9/secure/lib/libssl/man/SSL_do_handshake.3 stable/9/secure/lib/libssl/man/SSL_free.3 stable/9/secure/lib/libssl/man/SSL_get_SSL_CTX.3 stable/9/secure/lib/libssl/man/SSL_get_ciphers.3 stable/9/secure/lib/libssl/man/SSL_get_client_CA_list.3 stable/9/secure/lib/libssl/man/SSL_get_current_cipher.3 stable/9/secure/lib/libssl/man/SSL_get_default_timeout.3 stable/9/secure/lib/libssl/man/SSL_get_error.3 stable/9/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 stable/9/secure/lib/libssl/man/SSL_get_ex_new_index.3 stable/9/secure/lib/libssl/man/SSL_get_fd.3 stable/9/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 stable/9/secure/lib/libssl/man/SSL_get_peer_certificate.3 stable/9/secure/lib/libssl/man/SSL_get_rbio.3 stable/9/secure/lib/libssl/man/SSL_get_session.3 stable/9/secure/lib/libssl/man/SSL_get_verify_result.3 stable/9/secure/lib/libssl/man/SSL_get_version.3 stable/9/secure/lib/libssl/man/SSL_library_init.3 stable/9/secure/lib/libssl/man/SSL_load_client_CA_file.3 stable/9/secure/lib/libssl/man/SSL_new.3 stable/9/secure/lib/libssl/man/SSL_pending.3 stable/9/secure/lib/libssl/man/SSL_read.3 stable/9/secure/lib/libssl/man/SSL_rstate_string.3 stable/9/secure/lib/libssl/man/SSL_session_reused.3 stable/9/secure/lib/libssl/man/SSL_set_bio.3 stable/9/secure/lib/libssl/man/SSL_set_connect_state.3 stable/9/secure/lib/libssl/man/SSL_set_fd.3 stable/9/secure/lib/libssl/man/SSL_set_session.3 stable/9/secure/lib/libssl/man/SSL_set_shutdown.3 stable/9/secure/lib/libssl/man/SSL_set_verify_result.3 stable/9/secure/lib/libssl/man/SSL_shutdown.3 stable/9/secure/lib/libssl/man/SSL_state_string.3 stable/9/secure/lib/libssl/man/SSL_want.3 stable/9/secure/lib/libssl/man/SSL_write.3 stable/9/secure/lib/libssl/man/d2i_SSL_SESSION.3 stable/9/secure/lib/libssl/man/ssl.3 stable/9/secure/usr.bin/openssl/man/CA.pl.1 stable/9/secure/usr.bin/openssl/man/asn1parse.1 stable/9/secure/usr.bin/openssl/man/ca.1 stable/9/secure/usr.bin/openssl/man/ciphers.1 stable/9/secure/usr.bin/openssl/man/crl.1 stable/9/secure/usr.bin/openssl/man/crl2pkcs7.1 stable/9/secure/usr.bin/openssl/man/dgst.1 stable/9/secure/usr.bin/openssl/man/dhparam.1 stable/9/secure/usr.bin/openssl/man/dsa.1 stable/9/secure/usr.bin/openssl/man/dsaparam.1 stable/9/secure/usr.bin/openssl/man/ec.1 stable/9/secure/usr.bin/openssl/man/ecparam.1 stable/9/secure/usr.bin/openssl/man/enc.1 stable/9/secure/usr.bin/openssl/man/errstr.1 stable/9/secure/usr.bin/openssl/man/gendsa.1 stable/9/secure/usr.bin/openssl/man/genrsa.1 stable/9/secure/usr.bin/openssl/man/nseq.1 stable/9/secure/usr.bin/openssl/man/ocsp.1 stable/9/secure/usr.bin/openssl/man/openssl.1 stable/9/secure/usr.bin/openssl/man/passwd.1 stable/9/secure/usr.bin/openssl/man/pkcs12.1 stable/9/secure/usr.bin/openssl/man/pkcs7.1 stable/9/secure/usr.bin/openssl/man/pkcs8.1 stable/9/secure/usr.bin/openssl/man/rand.1 stable/9/secure/usr.bin/openssl/man/req.1 stable/9/secure/usr.bin/openssl/man/rsa.1 stable/9/secure/usr.bin/openssl/man/rsautl.1 stable/9/secure/usr.bin/openssl/man/s_client.1 stable/9/secure/usr.bin/openssl/man/s_server.1 stable/9/secure/usr.bin/openssl/man/s_time.1 stable/9/secure/usr.bin/openssl/man/sess_id.1 stable/9/secure/usr.bin/openssl/man/smime.1 stable/9/secure/usr.bin/openssl/man/speed.1 stable/9/secure/usr.bin/openssl/man/spkac.1 stable/9/secure/usr.bin/openssl/man/verify.1 stable/9/secure/usr.bin/openssl/man/version.1 stable/9/secure/usr.bin/openssl/man/x509.1 stable/9/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: stable/9/crypto/openssl/ (props changed) Modified: stable/9/crypto/openssl/ACKNOWLEDGMENTS ============================================================================== --- stable/9/crypto/openssl/ACKNOWLEDGMENTS Mon Jun 9 15:46:11 2014 (r267284) +++ stable/9/crypto/openssl/ACKNOWLEDGMENTS Mon Jun 9 16:30:56 2014 (r267285) @@ -10,13 +10,18 @@ OpenSSL project. We would like to identify and thank the following such sponsors for their past or current significant support of the OpenSSL project: +Major support: + + Qualys http://www.qualys.com/ + Very significant support: - OpenGear: www.opengear.com + OpenGear: http://www.opengear.com/ Significant support: - PSW Group: www.psw.net + PSW Group: http://www.psw.net/ + Acano Ltd. http://acano.com/ Please note that we ask permission to identify sponsors and that some sponsors we consider eligible for inclusion here have requested to remain anonymous. Modified: stable/9/crypto/openssl/CHANGES ============================================================================== --- stable/9/crypto/openssl/CHANGES Mon Jun 9 15:46:11 2014 (r267284) +++ stable/9/crypto/openssl/CHANGES Mon Jun 9 16:30:56 2014 (r267285) @@ -2,6 +2,64 @@ OpenSSL CHANGES _______________ + Changes between 0.9.8y and 0.9.8za [5 Jun 2014] + + *) Fix for SSL/TLS MITM flaw. An attacker using a carefully crafted + handshake can force the use of weak keying material in OpenSSL + SSL/TLS clients and servers. + + Thanks to KIKUCHI Masashi (Lepidum Co. Ltd.) for discovering and + researching this issue. (CVE-2014-0224) + [KIKUCHI Masashi, Steve Henson] + + *) Fix DTLS recursion flaw. By sending an invalid DTLS handshake to an + OpenSSL DTLS client the code can be made to recurse eventually crashing + in a DoS attack. + + Thanks to Imre Rad (Search-Lab Ltd.) for discovering this issue. + (CVE-2014-0221) + [Imre Rad, Steve Henson] + + *) Fix DTLS invalid fragment vulnerability. A buffer overrun attack can + be triggered by sending invalid DTLS fragments to an OpenSSL DTLS + client or server. This is potentially exploitable to run arbitrary + code on a vulnerable client or server. + + Thanks to Jüri Aedla for reporting this issue. (CVE-2014-0195) + [Jüri Aedla, Steve Henson] + + *) Fix bug in TLS code where clients enable anonymous ECDH ciphersuites + are subject to a denial of service attack. + + Thanks to Felix Gröbert and Ivan Fratric at Google for discovering + this issue. (CVE-2014-3470) + [Felix Gröbert, Ivan Fratric, Steve Henson] + + *) Fix for the attack described in the paper "Recovering OpenSSL + ECDSA Nonces Using the FLUSH+RELOAD Cache Side-channel Attack" + by Yuval Yarom and Naomi Benger. Details can be obtained from: + http://eprint.iacr.org/2014/140 + + Thanks to Yuval Yarom and Naomi Benger for discovering this + flaw and to Yuval Yarom for supplying a fix (CVE-2014-0076) + [Yuval Yarom and Naomi Benger] + + Thanks to mancha for backporting the fix to the 0.9.8 branch. + + *) Fix handling of warning-level alerts in SSL23 client mode so they + don't cause client-side termination (eg. on SNI unrecognized_name + warnings). Add client and server support for six additional alerts + per RFC 6066 and RFC 4279. + [mancha] + + *) Add option SSL_OP_SAFARI_ECDHE_ECDSA_BUG (part of SSL_OP_ALL) which + avoids preferring ECDHE-ECDSA ciphers when the client appears to be + Safari on OS X. Safari on OS X 10.8..10.8.3 advertises support for + several ECDHE-ECDSA ciphers, but fails to negotiate them. The bug + is fixed in OS X 10.8.4, but Apple have ruled out both hot fixing + 10.8..10.8.3 and forcing users to upgrade to 10.8.4 or newer. + [Rob Stradling, Adam Langley] + Changes between 0.9.8x and 0.9.8y [5 Feb 2013] *) Make the decoding of SSLv3, TLS and DTLS CBC records constant time. Modified: stable/9/crypto/openssl/Configure ============================================================================== --- stable/9/crypto/openssl/Configure Mon Jun 9 15:46:11 2014 (r267284) +++ stable/9/crypto/openssl/Configure Mon Jun 9 16:30:56 2014 (r267285) @@ -166,7 +166,7 @@ my %table=( "debug-ben-debug-noopt", "gcc:$gcc_devteam_warn -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -ggdb3 -pipe::(unknown)::::::", "debug-ben-strict", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe::(unknown)::::::", "debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", -"debug-bodo", "gcc:-DL_ENDIAN -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBIO_PAIR_DEBUG -DPEDANTIC -g -march=i486 -pedantic -Wshadow -Wall -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", +"debug-bodo", "gcc:$gcc_devteam_warn -Wno-error=overlength-strings -DBN_DEBUG -DBN_DEBUG_RAND -DCONF_DEBUG -DBIO_PAIR_DEBUG -m64 -DL_ENDIAN -DTERMIO -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", "debug-ulf", "gcc:-DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG -DBN_DEBUG_RAND -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations:::CYGWIN32:::${no_asm}:win32:cygwin-shared:::.dll", "debug-steve64", "gcc:$gcc_devteam_warn -m64 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-steve32", "gcc:$gcc_devteam_warn -m32 -DL_ENDIAN -DCONF_DEBUG -DDEBUG_SAFESTACK -g -pipe::-D_REENTRANT::-rdynamic -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC:-m32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", Modified: stable/9/crypto/openssl/FAQ ============================================================================== --- stable/9/crypto/openssl/FAQ Mon Jun 9 15:46:11 2014 (r267284) +++ stable/9/crypto/openssl/FAQ Mon Jun 9 16:30:56 2014 (r267285) @@ -87,7 +87,7 @@ OpenSSL 1.0.1d was released on Feb 5th, In addition to the current stable release, you can also access daily snapshots of the OpenSSL development version at , or get it by anonymous CVS access. +ftp://ftp.openssl.org/snapshot/>, or get it by anonymous Git access. * Where is the documentation? @@ -768,6 +768,9 @@ openssl-security@openssl.org if you don' acknowledging receipt then resend or mail it directly to one of the more active team members (e.g. Steve). +Note that bugs only present in the openssl utility are not in general +considered to be security issues. + [PROG] ======================================================================== * Is OpenSSL thread-safe? Modified: stable/9/crypto/openssl/Makefile ============================================================================== --- stable/9/crypto/openssl/Makefile Mon Jun 9 15:46:11 2014 (r267284) +++ stable/9/crypto/openssl/Makefile Mon Jun 9 16:30:56 2014 (r267285) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=0.9.8y +VERSION=0.9.8za MAJOR=0 MINOR=9.8 SHLIB_VERSION_NUMBER=0.9.8 @@ -71,7 +71,7 @@ ARD=ar $(ARFLAGS) d RANLIB= /usr/bin/ranlib PERL= /usr/bin/perl TAR= tar -TARFLAGS= --no-recursion +TARFLAGS= --no-recursion --record-size=10240 MAKEDEPPROG=makedepend LIBDIR=lib Modified: stable/9/crypto/openssl/Makefile.org ============================================================================== --- stable/9/crypto/openssl/Makefile.org Mon Jun 9 15:46:11 2014 (r267284) +++ stable/9/crypto/openssl/Makefile.org Mon Jun 9 16:30:56 2014 (r267285) @@ -69,7 +69,7 @@ ARD=ar $(ARFLAGS) d RANLIB= ranlib PERL= perl TAR= tar -TARFLAGS= --no-recursion +TARFLAGS= --no-recursion --record-size=10240 MAKEDEPPROG=makedepend LIBDIR=lib Modified: stable/9/crypto/openssl/NEWS ============================================================================== --- stable/9/crypto/openssl/NEWS Mon Jun 9 15:46:11 2014 (r267284) +++ stable/9/crypto/openssl/NEWS Mon Jun 9 16:30:56 2014 (r267285) @@ -5,34 +5,44 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. - Major changes between OpenSSL 0.9.8x and OpenSSL 0.9.8y: + Major changes between OpenSSL 0.9.8y and OpenSSL 0.9.8za [5 Jun 2014]: + + o Fix for CVE-2014-0224 + o Fix for CVE-2014-0221 + o Fix for CVE-2014-0195 + o Fix for CVE-2014-3470 + o Fix for CVE-2014-0076 + o Fix for CVE-2010-5298 + o Fix to TLS alert handling. + + Major changes between OpenSSL 0.9.8x and OpenSSL 0.9.8y [5 Feb 2013]: o Fix for SSL/TLS/DTLS CBC plaintext recovery attack CVE-2013-0169 o Fix OCSP bad key DoS attack CVE-2013-0166 - Major changes between OpenSSL 0.9.8w and OpenSSL 0.9.8x: + Major changes between OpenSSL 0.9.8w and OpenSSL 0.9.8x [10 May 2012]: o Fix DTLS record length checking bug CVE-2012-2333 - Major changes between OpenSSL 0.9.8v and OpenSSL 0.9.8w: + Major changes between OpenSSL 0.9.8v and OpenSSL 0.9.8w [23 Apr 2012]: o Fix for CVE-2012-2131 (corrected fix for 0.9.8 and CVE-2012-2110) - Major changes between OpenSSL 0.9.8u and OpenSSL 0.9.8v: + Major changes between OpenSSL 0.9.8u and OpenSSL 0.9.8v [19 Apr 2012]: o Fix for ASN1 overflow bug CVE-2012-2110 - Major changes between OpenSSL 0.9.8t and OpenSSL 0.9.8u: + Major changes between OpenSSL 0.9.8t and OpenSSL 0.9.8u [12 Mar 2012]: o Fix for CMS/PKCS#7 MMA CVE-2012-0884 o Corrected fix for CVE-2011-4619 o Various DTLS fixes. - Major changes between OpenSSL 0.9.8s and OpenSSL 0.9.8t: + Major changes between OpenSSL 0.9.8s and OpenSSL 0.9.8t [18 Jan 2012]: o Fix for DTLS DoS issue CVE-2012-0050 - Major changes between OpenSSL 0.9.8r and OpenSSL 0.9.8s: + Major changes between OpenSSL 0.9.8r and OpenSSL 0.9.8s [4 Jan 2012]: o Fix for DTLS plaintext recovery attack CVE-2011-4108 o Fix policy check double free error CVE-2011-4109 @@ -40,20 +50,20 @@ o Only allow one SGC handshake restart for SSL/TLS CVE-2011-4619 o Check for malformed RFC3779 data CVE-2011-4577 - Major changes between OpenSSL 0.9.8q and OpenSSL 0.9.8r: + Major changes between OpenSSL 0.9.8q and OpenSSL 0.9.8r [8 Feb 2011]: o Fix for security issue CVE-2011-0014 - Major changes between OpenSSL 0.9.8p and OpenSSL 0.9.8q: + Major changes between OpenSSL 0.9.8p and OpenSSL 0.9.8q [2 Dec 2010]: o Fix for security issue CVE-2010-4180 o Fix for CVE-2010-4252 - Major changes between OpenSSL 0.9.8o and OpenSSL 0.9.8p: + Major changes between OpenSSL 0.9.8o and OpenSSL 0.9.8p [16 Nov 2010]: o Fix for security issue CVE-2010-3864. - Major changes between OpenSSL 0.9.8n and OpenSSL 0.9.8o: + Major changes between OpenSSL 0.9.8n and OpenSSL 0.9.8o [1 Jun 2010]: o Fix for security issue CVE-2010-0742. o Various DTLS fixes. @@ -61,12 +71,12 @@ o Fix for no-rc4 compilation. o Chil ENGINE unload workaround. - Major changes between OpenSSL 0.9.8m and OpenSSL 0.9.8n: + Major changes between OpenSSL 0.9.8m and OpenSSL 0.9.8n [24 Mar 2010]: o CFB cipher definition fixes. o Fix security issues CVE-2010-0740 and CVE-2010-0433. - Major changes between OpenSSL 0.9.8l and OpenSSL 0.9.8m: + Major changes between OpenSSL 0.9.8l and OpenSSL 0.9.8m [25 Feb 2010]: o Cipher definition fixes. o Workaround for slow RAND_poll() on some WIN32 versions. @@ -78,33 +88,33 @@ o Ticket and SNI coexistence fixes. o Many fixes to DTLS handling. - Major changes between OpenSSL 0.9.8k and OpenSSL 0.9.8l: + Major changes between OpenSSL 0.9.8k and OpenSSL 0.9.8l [5 Nov 2009]: o Temporary work around for CVE-2009-3555: disable renegotiation. - Major changes between OpenSSL 0.9.8j and OpenSSL 0.9.8k: + Major changes between OpenSSL 0.9.8j and OpenSSL 0.9.8k [25 Mar 2009]: o Fix various build issues. o Fix security issues (CVE-2009-0590, CVE-2009-0591, CVE-2009-0789) - Major changes between OpenSSL 0.9.8i and OpenSSL 0.9.8j: + Major changes between OpenSSL 0.9.8i and OpenSSL 0.9.8j [7 Jan 2009]: o Fix security issue (CVE-2008-5077) o Merge FIPS 140-2 branch code. - Major changes between OpenSSL 0.9.8g and OpenSSL 0.9.8h: + Major changes between OpenSSL 0.9.8g and OpenSSL 0.9.8h [28 May 2008]: o CryptoAPI ENGINE support. o Various precautionary measures. o Fix for bugs affecting certificate request creation. o Support for local machine keyset attribute in PKCS#12 files. - Major changes between OpenSSL 0.9.8f and OpenSSL 0.9.8g: + Major changes between OpenSSL 0.9.8f and OpenSSL 0.9.8g [19 Oct 2007]: o Backport of CMS functionality to 0.9.8. o Fixes for bugs introduced with 0.9.8f. - Major changes between OpenSSL 0.9.8e and OpenSSL 0.9.8f: + Major changes between OpenSSL 0.9.8e and OpenSSL 0.9.8f [11 Oct 2007]: o Add gcc 4.2 support. o Add support for AES and SSE2 assembly lanugauge optimization @@ -115,23 +125,23 @@ o RFC4507bis support. o TLS Extensions support. - Major changes between OpenSSL 0.9.8d and OpenSSL 0.9.8e: + Major changes between OpenSSL 0.9.8d and OpenSSL 0.9.8e [23 Feb 2007]: o Various ciphersuite selection fixes. o RFC3779 support. - Major changes between OpenSSL 0.9.8c and OpenSSL 0.9.8d: + Major changes between OpenSSL 0.9.8c and OpenSSL 0.9.8d [28 Sep 2006]: o Introduce limits to prevent malicious key DoS (CVE-2006-2940) o Fix security issues (CVE-2006-2937, CVE-2006-3737, CVE-2006-4343) o Changes to ciphersuite selection algorithm - Major changes between OpenSSL 0.9.8b and OpenSSL 0.9.8c: + Major changes between OpenSSL 0.9.8b and OpenSSL 0.9.8c [5 Sep 2006]: o Fix Daniel Bleichenbacher forged signature attack, CVE-2006-4339 o New cipher Camellia - Major changes between OpenSSL 0.9.8a and OpenSSL 0.9.8b: + Major changes between OpenSSL 0.9.8a and OpenSSL 0.9.8b [4 May 2006]: o Cipher string fixes. o Fixes for VC++ 2005. @@ -141,12 +151,12 @@ o Built in dynamic engine compilation support on Win32. o Fixes auto dynamic engine loading in Win32. - Major changes between OpenSSL 0.9.8 and OpenSSL 0.9.8a: + Major changes between OpenSSL 0.9.8 and OpenSSL 0.9.8a [11 Oct 2005]: o Fix potential SSL 2.0 rollback, CVE-2005-2969 o Extended Windows CE support - Major changes between OpenSSL 0.9.7g and OpenSSL 0.9.8: + Major changes between OpenSSL 0.9.7g and OpenSSL 0.9.8 [5 Jul 2005]: o Major work on the BIGNUM library for higher efficiency and to make operations more streamlined and less contradictory. This @@ -220,36 +230,36 @@ o Added initial support for Win64. o Added alternate pkg-config files. - Major changes between OpenSSL 0.9.7l and OpenSSL 0.9.7m: + Major changes between OpenSSL 0.9.7l and OpenSSL 0.9.7m [23 Feb 2007]: o FIPS 1.1.1 module linking. o Various ciphersuite selection fixes. - Major changes between OpenSSL 0.9.7k and OpenSSL 0.9.7l: + Major changes between OpenSSL 0.9.7k and OpenSSL 0.9.7l [28 Sep 2006]: o Introduce limits to prevent malicious key DoS (CVE-2006-2940) o Fix security issues (CVE-2006-2937, CVE-2006-3737, CVE-2006-4343) - Major changes between OpenSSL 0.9.7j and OpenSSL 0.9.7k: + Major changes between OpenSSL 0.9.7j and OpenSSL 0.9.7k [5 Sep 2006]: o Fix Daniel Bleichenbacher forged signature attack, CVE-2006-4339 - Major changes between OpenSSL 0.9.7i and OpenSSL 0.9.7j: + Major changes between OpenSSL 0.9.7i and OpenSSL 0.9.7j [4 May 2006]: o Visual C++ 2005 fixes. o Update Windows build system for FIPS. - Major changes between OpenSSL 0.9.7h and OpenSSL 0.9.7i: + Major changes between OpenSSL 0.9.7h and OpenSSL 0.9.7i [14 Oct 2005]: o Give EVP_MAX_MD_SIZE it's old value, except for a FIPS build. - Major changes between OpenSSL 0.9.7g and OpenSSL 0.9.7h: + Major changes between OpenSSL 0.9.7g and OpenSSL 0.9.7h [11 Oct 2005]: o Fix SSL 2.0 Rollback, CVE-2005-2969 o Allow use of fixed-length exponent on DSA signing o Default fixed-window RSA, DSA, DH private-key operations - Major changes between OpenSSL 0.9.7f and OpenSSL 0.9.7g: + Major changes between OpenSSL 0.9.7f and OpenSSL 0.9.7g [11 Apr 2005]: o More compilation issues fixed. o Adaptation to more modern Kerberos API. @@ -258,7 +268,7 @@ o More constification. o Added processing of proxy certificates (RFC 3820). - Major changes between OpenSSL 0.9.7e and OpenSSL 0.9.7f: + Major changes between OpenSSL 0.9.7e and OpenSSL 0.9.7f [22 Mar 2005]: o Several compilation issues fixed. o Many memory allocation failure checks added. @@ -266,12 +276,12 @@ o Mandatory basic checks on certificates. o Performance improvements. - Major changes between OpenSSL 0.9.7d and OpenSSL 0.9.7e: + Major changes between OpenSSL 0.9.7d and OpenSSL 0.9.7e [25 Oct 2004]: o Fix race condition in CRL checking code. o Fixes to PKCS#7 (S/MIME) code. - Major changes between OpenSSL 0.9.7c and OpenSSL 0.9.7d: + Major changes between OpenSSL 0.9.7c and OpenSSL 0.9.7d [17 Mar 2004]: o Security: Fix Kerberos ciphersuite SSL/TLS handshaking bug o Security: Fix null-pointer assignment in do_change_cipher_spec() @@ -279,14 +289,14 @@ o Multiple X509 verification fixes o Speed up HMAC and other operations - Major changes between OpenSSL 0.9.7b and OpenSSL 0.9.7c: + Major changes between OpenSSL 0.9.7b and OpenSSL 0.9.7c [30 Sep 2003]: o Security: fix various ASN1 parsing bugs. o New -ignore_err option to OCSP utility. o Various interop and bug fixes in S/MIME code. o SSL/TLS protocol fix for unrequested client certificates. - Major changes between OpenSSL 0.9.7a and OpenSSL 0.9.7b: + Major changes between OpenSSL 0.9.7a and OpenSSL 0.9.7b [10 Apr 2003]: o Security: counter the Klima-Pokorny-Rosa extension of Bleichbacher's attack @@ -297,7 +307,7 @@ o ASN.1: treat domainComponent correctly. o Documentation: fixes and additions. - Major changes between OpenSSL 0.9.7 and OpenSSL 0.9.7a: + Major changes between OpenSSL 0.9.7 and OpenSSL 0.9.7a [19 Feb 2003]: o Security: Important security related bugfixes. o Enhanced compatibility with MIT Kerberos. @@ -308,7 +318,7 @@ o SSL/TLS: now handles manual certificate chain building. o SSL/TLS: certain session ID malfunctions corrected. - Major changes between OpenSSL 0.9.6 and OpenSSL 0.9.7: + Major changes between OpenSSL 0.9.6 and OpenSSL 0.9.7 [30 Dec 2002]: o New library section OCSP. o Complete rewrite of ASN1 code. @@ -354,23 +364,23 @@ o SSL/TLS: add callback to retrieve SSL/TLS messages. o SSL/TLS: support AES cipher suites (RFC3268). - Major changes between OpenSSL 0.9.6j and OpenSSL 0.9.6k: + Major changes between OpenSSL 0.9.6j and OpenSSL 0.9.6k [30 Sep 2003]: o Security: fix various ASN1 parsing bugs. o SSL/TLS protocol fix for unrequested client certificates. - Major changes between OpenSSL 0.9.6i and OpenSSL 0.9.6j: + Major changes between OpenSSL 0.9.6i and OpenSSL 0.9.6j [10 Apr 2003]: o Security: counter the Klima-Pokorny-Rosa extension of Bleichbacher's attack o Security: make RSA blinding default. o Build: shared library support fixes. - Major changes between OpenSSL 0.9.6h and OpenSSL 0.9.6i: + Major changes between OpenSSL 0.9.6h and OpenSSL 0.9.6i [19 Feb 2003]: o Important security related bugfixes. - Major changes between OpenSSL 0.9.6g and OpenSSL 0.9.6h: + Major changes between OpenSSL 0.9.6g and OpenSSL 0.9.6h [5 Dec 2002]: o New configuration targets for Tandem OSS and A/UX. o New OIDs for Microsoft attributes. @@ -384,25 +394,25 @@ o Fixes for smaller building problems. o Updates of manuals, FAQ and other instructive documents. - Major changes between OpenSSL 0.9.6f and OpenSSL 0.9.6g: + Major changes between OpenSSL 0.9.6f and OpenSSL 0.9.6g [9 Aug 2002]: o Important building fixes on Unix. - Major changes between OpenSSL 0.9.6e and OpenSSL 0.9.6f: + Major changes between OpenSSL 0.9.6e and OpenSSL 0.9.6f [8 Aug 2002]: o Various important bugfixes. - Major changes between OpenSSL 0.9.6d and OpenSSL 0.9.6e: + Major changes between OpenSSL 0.9.6d and OpenSSL 0.9.6e [30 Jul 2002]: o Important security related bugfixes. o Various SSL/TLS library bugfixes. - Major changes between OpenSSL 0.9.6c and OpenSSL 0.9.6d: + Major changes between OpenSSL 0.9.6c and OpenSSL 0.9.6d [9 May 2002]: o Various SSL/TLS library bugfixes. o Fix DH parameter generation for 'non-standard' generators. - Major changes between OpenSSL 0.9.6b and OpenSSL 0.9.6c: + Major changes between OpenSSL 0.9.6b and OpenSSL 0.9.6c [21 Dec 2001]: o Various SSL/TLS library bugfixes. o BIGNUM library fixes. @@ -415,7 +425,7 @@ Broadcom and Cryptographic Appliance's keyserver [in 0.9.6c-engine release]. - Major changes between OpenSSL 0.9.6a and OpenSSL 0.9.6b: + Major changes between OpenSSL 0.9.6a and OpenSSL 0.9.6b [9 Jul 2001]: o Security fix: PRNG improvements. o Security fix: RSA OAEP check. @@ -432,7 +442,7 @@ o Increase default size for BIO buffering filter. o Compatibility fixes in some scripts. - Major changes between OpenSSL 0.9.6 and OpenSSL 0.9.6a: + Major changes between OpenSSL 0.9.6 and OpenSSL 0.9.6a [5 Apr 2001]: o Security fix: change behavior of OpenSSL to avoid using environment variables when running as root. @@ -457,7 +467,7 @@ o New function BN_rand_range(). o Add "-rand" option to openssl s_client and s_server. - Major changes between OpenSSL 0.9.5a and OpenSSL 0.9.6: + Major changes between OpenSSL 0.9.5a and OpenSSL 0.9.6 [10 Oct 2000]: o Some documentation for BIO and SSL libraries. o Enhanced chain verification using key identifiers. @@ -472,7 +482,7 @@ [1] The support for external crypto devices is currently a separate distribution. See the file README.ENGINE. - Major changes between OpenSSL 0.9.5 and OpenSSL 0.9.5a: + Major changes between OpenSSL 0.9.5 and OpenSSL 0.9.5a [1 Apr 2000]: o Bug fixes for Win32, SuSE Linux, NeXTSTEP and FreeBSD 2.2.8 o Shared library support for HPUX and Solaris-gcc @@ -481,7 +491,7 @@ o New 'rand' application o New way to check for existence of algorithms from scripts - Major changes between OpenSSL 0.9.4 and OpenSSL 0.9.5: + Major changes between OpenSSL 0.9.4 and OpenSSL 0.9.5 [25 May 2000]: o S/MIME support in new 'smime' command o Documentation for the OpenSSL command line application @@ -517,7 +527,7 @@ o Enhanced support for Alpha Linux o Experimental MacOS support - Major changes between OpenSSL 0.9.3 and OpenSSL 0.9.4: + Major changes between OpenSSL 0.9.3 and OpenSSL 0.9.4 [9 Aug 1999]: o Transparent support for PKCS#8 format private keys: these are used by several software packages and are more secure than the standard @@ -528,7 +538,7 @@ o New pipe-like BIO that allows using the SSL library when actual I/O must be handled by the application (BIO pair) - Major changes between OpenSSL 0.9.2b and OpenSSL 0.9.3: + Major changes between OpenSSL 0.9.2b and OpenSSL 0.9.3 [24 May 1999]: o Lots of enhancements and cleanups to the Configuration mechanism o RSA OEAP related fixes o Added `openssl ca -revoke' option for revoking a certificate @@ -542,7 +552,7 @@ o Sparc assembler bignum implementation, optimized hash functions o Option to disable selected ciphers - Major changes between OpenSSL 0.9.1c and OpenSSL 0.9.2b: + Major changes between OpenSSL 0.9.1c and OpenSSL 0.9.2b [22 Mar 1999]: o Fixed a security hole related to session resumption o Fixed RSA encryption routines for the p < q case o "ALL" in cipher lists now means "everything except NULL ciphers" @@ -564,7 +574,7 @@ o Lots of memory leak fixes. o Lots of bug fixes. - Major changes between SSLeay 0.9.0b and OpenSSL 0.9.1c: + Major changes between SSLeay 0.9.0b and OpenSSL 0.9.1c [23 Dec 1998]: o Integration of the popular NO_RSA/NO_DSA patches o Initial support for compression inside the SSL record layer o Added BIO proxy and filtering functionality Modified: stable/9/crypto/openssl/README ============================================================================== --- stable/9/crypto/openssl/README Mon Jun 9 15:46:11 2014 (r267284) +++ stable/9/crypto/openssl/README Mon Jun 9 16:30:56 2014 (r267285) @@ -1,5 +1,5 @@ - OpenSSL 0.9.8y 5 Feb 2013 + OpenSSL 0.9.8za 5 Jun 2014 Copyright (c) 1998-2011 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson @@ -190,7 +190,7 @@ reason as to why that feature isn't implemented. Patches should be as up to date as possible, preferably relative to the - current CVS or the last snapshot. They should follow the coding style of + current Git or the last snapshot. They should follow the coding style of OpenSSL and compile without warnings. Some of the core team developer targets can be used for testing purposes, (debug-steve64, debug-geoff etc). OpenSSL compiles on many varied platforms: try to ensure you only use portable Modified: stable/9/crypto/openssl/apps/apps.c ============================================================================== --- stable/9/crypto/openssl/apps/apps.c Mon Jun 9 15:46:11 2014 (r267284) +++ stable/9/crypto/openssl/apps/apps.c Mon Jun 9 16:30:56 2014 (r267285) @@ -558,12 +558,12 @@ int password_callback(char *buf, int buf if (ok >= 0) ok = UI_add_input_string(ui,prompt,ui_flags,buf, - PW_MIN_LENGTH,BUFSIZ-1); + PW_MIN_LENGTH,bufsiz-1); if (ok >= 0 && verify) { buff = (char *)OPENSSL_malloc(bufsiz); ok = UI_add_verify_string(ui,prompt,ui_flags,buff, - PW_MIN_LENGTH,BUFSIZ-1, buf); + PW_MIN_LENGTH,bufsiz-1, buf); } if (ok >= 0) do Modified: stable/9/crypto/openssl/apps/ocsp.c ============================================================================== --- stable/9/crypto/openssl/apps/ocsp.c Mon Jun 9 15:46:11 2014 (r267284) +++ stable/9/crypto/openssl/apps/ocsp.c Mon Jun 9 16:30:56 2014 (r267285) @@ -98,6 +98,7 @@ int MAIN(int argc, char **argv) ENGINE *e = NULL; char **args; char *host = NULL, *port = NULL, *path = "/"; + char *thost = NULL, *tport = NULL, *tpath = NULL; char *reqin = NULL, *respin = NULL; char *reqout = NULL, *respout = NULL; char *signfile = NULL, *keyfile = NULL; @@ -173,6 +174,12 @@ int MAIN(int argc, char **argv) } else if (!strcmp(*args, "-url")) { + if (thost) + OPENSSL_free(thost); + if (tport) + OPENSSL_free(tport); + if (tpath) + OPENSSL_free(tpath); if (args[1]) { args++; @@ -181,6 +188,9 @@ int MAIN(int argc, char **argv) BIO_printf(bio_err, "Error parsing URL\n"); badarg = 1; } + thost = host; + tport = port; + tpath = path; } else badarg = 1; } @@ -871,12 +881,12 @@ end: sk_X509_pop_free(sign_other, X509_free); sk_X509_pop_free(verify_other, X509_free); - if (use_ssl != -1) - { - OPENSSL_free(host); - OPENSSL_free(port); - OPENSSL_free(path); - } + if (thost) + OPENSSL_free(thost); + if (tport) + OPENSSL_free(tport); + if (tpath) + OPENSSL_free(tpath); OPENSSL_EXIT(ret); } Modified: stable/9/crypto/openssl/apps/req.c ============================================================================== --- stable/9/crypto/openssl/apps/req.c Mon Jun 9 15:46:11 2014 (r267284) +++ stable/9/crypto/openssl/apps/req.c Mon Jun 9 16:30:56 2014 (r267285) @@ -1574,7 +1574,13 @@ start: #ifdef CHARSET_EBCDIC ebcdic2ascii(buf, buf, i); #endif - if(!req_check_len(i, n_min, n_max)) goto start; + if(!req_check_len(i, n_min, n_max)) + { + if (batch || value) + return 0; + goto start; + } + if (!X509_NAME_add_entry_by_NID(n,nid, chtype, (unsigned char *) buf, -1,-1,mval)) goto err; ret=1; @@ -1633,7 +1639,12 @@ start: #ifdef CHARSET_EBCDIC ebcdic2ascii(buf, buf, i); #endif - if(!req_check_len(i, n_min, n_max)) goto start; + if(!req_check_len(i, n_min, n_max)) + { + if (batch || value) + return 0; + goto start; + } if(!X509_REQ_add1_attr_by_NID(req, nid, chtype, (unsigned char *)buf, -1)) { Modified: stable/9/crypto/openssl/apps/s_cb.c ============================================================================== --- stable/9/crypto/openssl/apps/s_cb.c Mon Jun 9 15:46:11 2014 (r267284) +++ stable/9/crypto/openssl/apps/s_cb.c Mon Jun 9 16:30:56 2014 (r267285) @@ -518,6 +518,24 @@ void MS_CALLBACK msg_cb(int write_p, int case 100: str_details2 = " no_renegotiation"; break; + case 110: + str_details2 = " unsupported_extension"; + break; + case 111: + str_details2 = " certificate_unobtainable"; + break; + case 112: + str_details2 = " unrecognized_name"; + break; + case 113: + str_details2 = " bad_certificate_status_response"; + break; + case 114: + str_details2 = " bad_certificate_hash_value"; + break; + case 115: + str_details2 = " unknown_psk_identity"; + break; } } } Modified: stable/9/crypto/openssl/apps/smime.c ============================================================================== --- stable/9/crypto/openssl/apps/smime.c Mon Jun 9 15:46:11 2014 (r267284) +++ stable/9/crypto/openssl/apps/smime.c Mon Jun 9 16:30:56 2014 (r267285) @@ -521,8 +521,8 @@ int MAIN(int argc, char **argv) { if (!cipher) { -#ifndef OPENSSL_NO_RC2 - cipher = EVP_rc2_40_cbc(); +#ifndef OPENSSL_NO_DES + cipher = EVP_des_ede3_cbc(); #else BIO_printf(bio_err, "No cipher selected\n"); goto end; Modified: stable/9/crypto/openssl/crypto/asn1/a_int.c ============================================================================== --- stable/9/crypto/openssl/crypto/asn1/a_int.c Mon Jun 9 15:46:11 2014 (r267284) +++ stable/9/crypto/openssl/crypto/asn1/a_int.c Mon Jun 9 16:30:56 2014 (r267285) @@ -116,7 +116,7 @@ int i2c_ASN1_INTEGER(ASN1_INTEGER *a, un int pad=0,ret,i,neg; unsigned char *p,*n,pb=0; - if ((a == NULL) || (a->data == NULL)) return(0); + if (a == NULL) return(0); neg=a->type & V_ASN1_NEG; if (a->length == 0) ret=1; Modified: stable/9/crypto/openssl/crypto/asn1/a_strnid.c ============================================================================== --- stable/9/crypto/openssl/crypto/asn1/a_strnid.c Mon Jun 9 15:46:11 2014 (r267284) +++ stable/9/crypto/openssl/crypto/asn1/a_strnid.c Mon Jun 9 16:30:56 2014 (r267285) @@ -75,7 +75,7 @@ static int table_cmp(const void *a, cons * certain software (e.g. Netscape) has problems with them. */ -static unsigned long global_mask = 0xFFFFFFFFL; +static unsigned long global_mask = B_ASN1_UTF8STRING; void ASN1_STRING_set_default_mask(unsigned long mask) { Modified: stable/9/crypto/openssl/crypto/asn1/t_pkey.c ============================================================================== --- stable/9/crypto/openssl/crypto/asn1/t_pkey.c Mon Jun 9 15:46:11 2014 (r267284) +++ stable/9/crypto/openssl/crypto/asn1/t_pkey.c Mon Jun 9 16:30:56 2014 (r267285) @@ -208,11 +208,6 @@ int DSA_print(BIO *bp, const DSA *x, int if (x->p) buf_len = (size_t)BN_num_bytes(x->p); - else - { - DSAerr(DSA_F_DSA_PRINT,DSA_R_MISSING_PARAMETERS); - goto err; - } if (x->q) if (buf_len < (i = (size_t)BN_num_bytes(x->q))) buf_len = i; Modified: stable/9/crypto/openssl/crypto/bn/bn_mont.c ============================================================================== --- stable/9/crypto/openssl/crypto/bn/bn_mont.c Mon Jun 9 15:46:11 2014 (r267284) +++ stable/9/crypto/openssl/crypto/bn/bn_mont.c Mon Jun 9 16:30:56 2014 (r267285) @@ -701,32 +701,38 @@ BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CT BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, int lock, const BIGNUM *mod, BN_CTX *ctx) { - int got_write_lock = 0; BN_MONT_CTX *ret; CRYPTO_r_lock(lock); - if (!*pmont) + ret = *pmont; + CRYPTO_r_unlock(lock); + if (ret) + return ret; + + /* We don't want to serialise globally while doing our lazy-init math in + * BN_MONT_CTX_set. That punishes threads that are doing independent + * things. Instead, punish the case where more than one thread tries to + * lazy-init the same 'pmont', by having each do the lazy-init math work + * independently and only use the one from the thread that wins the race + * (the losers throw away the work they've done). */ + ret = BN_MONT_CTX_new(); + if (!ret) + return NULL; + if (!BN_MONT_CTX_set(ret, mod, ctx)) { - CRYPTO_r_unlock(lock); - CRYPTO_w_lock(lock); - got_write_lock = 1; + BN_MONT_CTX_free(ret); + return NULL; + } - if (!*pmont) - { - ret = BN_MONT_CTX_new(); - if (ret && !BN_MONT_CTX_set(ret, mod, ctx)) - BN_MONT_CTX_free(ret); - else - *pmont = ret; - } + /* The locked compare-and-set, after the local work is done. */ + CRYPTO_w_lock(lock); + if (*pmont) + { + BN_MONT_CTX_free(ret); + ret = *pmont; } - - ret = *pmont; - - if (got_write_lock) - CRYPTO_w_unlock(lock); else - CRYPTO_r_unlock(lock); - + *pmont = ret; + CRYPTO_w_unlock(lock); return ret; } Modified: stable/9/crypto/openssl/crypto/cms/cms_cd.c ============================================================================== --- stable/9/crypto/openssl/crypto/cms/cms_cd.c Mon Jun 9 15:46:11 2014 (r267284) +++ stable/9/crypto/openssl/crypto/cms/cms_cd.c Mon Jun 9 16:30:56 2014 (r267285) @@ -58,7 +58,9 @@ #include #include #include +#ifndef OPENSSL_NO_COMP #include +#endif #include "cms_lcl.h" DECLARE_ASN1_ITEM(CMS_CompressedData) Modified: stable/9/crypto/openssl/crypto/cms/cms_env.c ============================================================================== --- stable/9/crypto/openssl/crypto/cms/cms_env.c Mon Jun 9 15:46:11 2014 (r267284) +++ stable/9/crypto/openssl/crypto/cms/cms_env.c Mon Jun 9 16:30:56 2014 (r267285) @@ -185,6 +185,8 @@ CMS_RecipientInfo *CMS_add1_recipient_ce if (flags & CMS_USE_KEYID) { ktri->version = 2; + if (env->version < 2) + env->version = 2; type = CMS_RECIPINFO_KEYIDENTIFIER; } else Modified: stable/9/crypto/openssl/crypto/cms/cms_lib.c ============================================================================== --- stable/9/crypto/openssl/crypto/cms/cms_lib.c Mon Jun 9 15:46:11 2014 (r267284) +++ stable/9/crypto/openssl/crypto/cms/cms_lib.c Mon Jun 9 16:30:56 2014 (r267285) @@ -477,8 +477,6 @@ int CMS_add0_cert(CMS_ContentInfo *cms, pcerts = cms_get0_certificate_choices(cms); if (!pcerts) return 0; - if (!pcerts) - return 0; for (i = 0; i < sk_CMS_CertificateChoices_num(*pcerts); i++) { cch = sk_CMS_CertificateChoices_value(*pcerts, i); Modified: stable/9/crypto/openssl/crypto/cms/cms_sd.c ============================================================================== --- stable/9/crypto/openssl/crypto/cms/cms_sd.c Mon Jun 9 15:46:11 2014 (r267284) +++ stable/9/crypto/openssl/crypto/cms/cms_sd.c Mon Jun 9 16:30:56 2014 (r267285) @@ -157,8 +157,8 @@ static void cms_sd_set_version(CMS_Signe if (sd->version < 3) sd->version = 3; } - else - sd->version = 1; + else if (si->version < 1) + si->version = 1; } if (sd->version < 1) Modified: stable/9/crypto/openssl/crypto/cms/cms_smime.c ============================================================================== --- stable/9/crypto/openssl/crypto/cms/cms_smime.c Mon Jun 9 15:46:11 2014 (r267284) +++ stable/9/crypto/openssl/crypto/cms/cms_smime.c Mon Jun 9 16:30:56 2014 (r267285) @@ -622,7 +622,7 @@ int CMS_decrypt_set1_pkey(CMS_ContentInf STACK_OF(CMS_RecipientInfo) *ris; CMS_RecipientInfo *ri; int i, r; - int debug = 0; + int debug = 0, ri_match = 0; ris = CMS_get0_RecipientInfos(cms); if (ris) debug = cms->d.envelopedData->encryptedContentInfo->debug; @@ -631,6 +631,7 @@ int CMS_decrypt_set1_pkey(CMS_ContentInf ri = sk_CMS_RecipientInfo_value(ris, i); if (CMS_RecipientInfo_type(ri) != CMS_RECIPINFO_TRANS) continue; + ri_match = 1; /* If we have a cert try matching RecipientInfo * otherwise try them all. */ @@ -666,7 +667,7 @@ int CMS_decrypt_set1_pkey(CMS_ContentInf } } /* If no cert and not debugging always return success */ - if (!cert && !debug) + if (ri_match && !cert && !debug) { ERR_clear_error(); return 1; Modified: stable/9/crypto/openssl/crypto/ec/ec_lib.c ============================================================================== --- stable/9/crypto/openssl/crypto/ec/ec_lib.c Mon Jun 9 15:46:11 2014 (r267284) +++ stable/9/crypto/openssl/crypto/ec/ec_lib.c Mon Jun 9 16:30:56 2014 (r267285) @@ -480,10 +480,10 @@ int EC_GROUP_cmp(const EC_GROUP *a, cons if (EC_METHOD_get_field_type(EC_GROUP_method_of(a)) != EC_METHOD_get_field_type(EC_GROUP_method_of(b))) return 1; - /* compare the curve name (if present) */ + /* compare the curve name (if present in both) */ if (EC_GROUP_get_curve_name(a) && EC_GROUP_get_curve_name(b) && - EC_GROUP_get_curve_name(a) == EC_GROUP_get_curve_name(b)) - return 0; + EC_GROUP_get_curve_name(a) != EC_GROUP_get_curve_name(b)) + return 1; if (!ctx) ctx_new = ctx = BN_CTX_new(); @@ -1061,12 +1061,12 @@ int EC_POINT_cmp(const EC_GROUP *group, if (group->meth->point_cmp == 0) { ECerr(EC_F_EC_POINT_CMP, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); - return 0; + return -1; } if ((group->meth != a->meth) || (a->meth != b->meth)) { ECerr(EC_F_EC_POINT_CMP, EC_R_INCOMPATIBLE_OBJECTS); - return 0; + return -1; } return group->meth->point_cmp(group, a, b, ctx); } Modified: stable/9/crypto/openssl/crypto/engine/eng_all.c ============================================================================== --- stable/9/crypto/openssl/crypto/engine/eng_all.c Mon Jun 9 15:46:11 2014 (r267284) +++ stable/9/crypto/openssl/crypto/engine/eng_all.c Mon Jun 9 16:30:56 2014 (r267285) @@ -102,14 +102,14 @@ void ENGINE_load_builtin_engines(void) #if !defined(OPENSSL_NO_GMP) && !defined(OPENSSL_NO_HW_GMP) ENGINE_load_gmp(); #endif +#if defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_NO_CAPIENG) + ENGINE_load_capi(); +#endif #endif #ifndef OPENSSL_NO_HW #if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV) ENGINE_load_cryptodev(); #endif -#if defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_NO_CAPIENG) - ENGINE_load_capi(); -#endif #endif } Modified: stable/9/crypto/openssl/crypto/engine/engine.h ============================================================================== --- stable/9/crypto/openssl/crypto/engine/engine.h Mon Jun 9 15:46:11 2014 (r267284) +++ stable/9/crypto/openssl/crypto/engine/engine.h Mon Jun 9 16:30:56 2014 (r267285) @@ -335,15 +335,15 @@ void ENGINE_load_gmp(void); void ENGINE_load_nuron(void); void ENGINE_load_sureware(void); void ENGINE_load_ubsec(void); -#endif -void ENGINE_load_cryptodev(void); -void ENGINE_load_padlock(void); -void ENGINE_load_builtin_engines(void); #ifdef OPENSSL_SYS_WIN32 #ifndef OPENSSL_NO_CAPIENG void ENGINE_load_capi(void); #endif #endif +#endif +void ENGINE_load_cryptodev(void); +void ENGINE_load_padlock(void); +void ENGINE_load_builtin_engines(void); /* Get and set global flags (ENGINE_TABLE_FLAG_***) for the implementation * "registry" handling. */ Modified: stable/9/crypto/openssl/crypto/err/err_all.c ============================================================================== --- stable/9/crypto/openssl/crypto/err/err_all.c Mon Jun 9 15:46:11 2014 (r267284) +++ stable/9/crypto/openssl/crypto/err/err_all.c Mon Jun 9 16:30:56 2014 (r267285) @@ -104,7 +104,9 @@ #ifndef OPENSSL_NO_JPAKE #include #endif +#ifndef OPENSSL_NO_COMP #include +#endif void ERR_load_crypto_strings(void) { Modified: stable/9/crypto/openssl/crypto/err/openssl.ec ============================================================================== --- stable/9/crypto/openssl/crypto/err/openssl.ec Mon Jun 9 15:46:11 2014 (r267284) +++ stable/9/crypto/openssl/crypto/err/openssl.ec Mon Jun 9 16:30:56 2014 (r267285) @@ -71,6 +71,11 @@ R SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURIT R SSL_R_TLSV1_ALERT_INTERNAL_ERROR 1080 R SSL_R_TLSV1_ALERT_USER_CANCELLED 1090 R SSL_R_TLSV1_ALERT_NO_RENEGOTIATION 1100 +R SSL_R_TLSV1_UNSUPPORTED_EXTENSION 1110 +R SSL_R_TLSV1_CERTIFICATE_UNOBTAINABLE 1111 +R SSL_R_TLSV1_UNRECOGNIZED_NAME 1112 +R SSL_R_TLSV1_BAD_CERTIFICATE_STATUS_RESPONSE 1113 +R SSL_R_TLSV1_BAD_CERTIFICATE_HASH_VALUE 1114 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Mon Jun 9 17:03:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 640F9BC; Mon, 9 Jun 2014 17:03:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D2552B5F; Mon, 9 Jun 2014 17:03:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s59H3aEn022305; Mon, 9 Jun 2014 17:03:36 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s59H3HWC022163; Mon, 9 Jun 2014 17:03:17 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201406091703.s59H3HWC022163@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 9 Jun 2014 17:03:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r267286 - in stable/8/secure: lib/libcrypto lib/libcrypto/man lib/libssl/man usr.bin/openssl/man X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 17:03:36 -0000 Author: jkim Date: Mon Jun 9 17:03:16 2014 New Revision: 267286 URL: http://svnweb.freebsd.org/changeset/base/267286 Log: Correct OpenSSL 0.9.8za release date. Modified: stable/8/secure/lib/libcrypto/Makefile.inc stable/8/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 stable/8/secure/lib/libcrypto/man/ASN1_STRING_length.3 stable/8/secure/lib/libcrypto/man/ASN1_STRING_new.3 stable/8/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 stable/8/secure/lib/libcrypto/man/ASN1_generate_nconf.3 stable/8/secure/lib/libcrypto/man/BIO_ctrl.3 stable/8/secure/lib/libcrypto/man/BIO_f_base64.3 stable/8/secure/lib/libcrypto/man/BIO_f_buffer.3 stable/8/secure/lib/libcrypto/man/BIO_f_cipher.3 stable/8/secure/lib/libcrypto/man/BIO_f_md.3 stable/8/secure/lib/libcrypto/man/BIO_f_null.3 stable/8/secure/lib/libcrypto/man/BIO_f_ssl.3 stable/8/secure/lib/libcrypto/man/BIO_find_type.3 stable/8/secure/lib/libcrypto/man/BIO_new.3 stable/8/secure/lib/libcrypto/man/BIO_push.3 stable/8/secure/lib/libcrypto/man/BIO_read.3 stable/8/secure/lib/libcrypto/man/BIO_s_accept.3 stable/8/secure/lib/libcrypto/man/BIO_s_bio.3 stable/8/secure/lib/libcrypto/man/BIO_s_connect.3 stable/8/secure/lib/libcrypto/man/BIO_s_fd.3 stable/8/secure/lib/libcrypto/man/BIO_s_file.3 stable/8/secure/lib/libcrypto/man/BIO_s_mem.3 stable/8/secure/lib/libcrypto/man/BIO_s_null.3 stable/8/secure/lib/libcrypto/man/BIO_s_socket.3 stable/8/secure/lib/libcrypto/man/BIO_set_callback.3 stable/8/secure/lib/libcrypto/man/BIO_should_retry.3 stable/8/secure/lib/libcrypto/man/BN_BLINDING_new.3 stable/8/secure/lib/libcrypto/man/BN_CTX_new.3 stable/8/secure/lib/libcrypto/man/BN_CTX_start.3 stable/8/secure/lib/libcrypto/man/BN_add.3 stable/8/secure/lib/libcrypto/man/BN_add_word.3 stable/8/secure/lib/libcrypto/man/BN_bn2bin.3 stable/8/secure/lib/libcrypto/man/BN_cmp.3 stable/8/secure/lib/libcrypto/man/BN_copy.3 stable/8/secure/lib/libcrypto/man/BN_generate_prime.3 stable/8/secure/lib/libcrypto/man/BN_mod_inverse.3 stable/8/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 stable/8/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 stable/8/secure/lib/libcrypto/man/BN_new.3 stable/8/secure/lib/libcrypto/man/BN_num_bytes.3 stable/8/secure/lib/libcrypto/man/BN_rand.3 stable/8/secure/lib/libcrypto/man/BN_set_bit.3 stable/8/secure/lib/libcrypto/man/BN_swap.3 stable/8/secure/lib/libcrypto/man/BN_zero.3 stable/8/secure/lib/libcrypto/man/CONF_modules_free.3 stable/8/secure/lib/libcrypto/man/CONF_modules_load_file.3 stable/8/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 stable/8/secure/lib/libcrypto/man/DH_generate_key.3 stable/8/secure/lib/libcrypto/man/DH_generate_parameters.3 stable/8/secure/lib/libcrypto/man/DH_get_ex_new_index.3 stable/8/secure/lib/libcrypto/man/DH_new.3 stable/8/secure/lib/libcrypto/man/DH_set_method.3 stable/8/secure/lib/libcrypto/man/DH_size.3 stable/8/secure/lib/libcrypto/man/DSA_SIG_new.3 stable/8/secure/lib/libcrypto/man/DSA_do_sign.3 stable/8/secure/lib/libcrypto/man/DSA_dup_DH.3 stable/8/secure/lib/libcrypto/man/DSA_generate_key.3 stable/8/secure/lib/libcrypto/man/DSA_generate_parameters.3 stable/8/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 stable/8/secure/lib/libcrypto/man/DSA_new.3 stable/8/secure/lib/libcrypto/man/DSA_set_method.3 stable/8/secure/lib/libcrypto/man/DSA_sign.3 stable/8/secure/lib/libcrypto/man/DSA_size.3 stable/8/secure/lib/libcrypto/man/ERR_GET_LIB.3 stable/8/secure/lib/libcrypto/man/ERR_clear_error.3 stable/8/secure/lib/libcrypto/man/ERR_error_string.3 stable/8/secure/lib/libcrypto/man/ERR_get_error.3 stable/8/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 stable/8/secure/lib/libcrypto/man/ERR_load_strings.3 stable/8/secure/lib/libcrypto/man/ERR_print_errors.3 stable/8/secure/lib/libcrypto/man/ERR_put_error.3 stable/8/secure/lib/libcrypto/man/ERR_remove_state.3 stable/8/secure/lib/libcrypto/man/ERR_set_mark.3 stable/8/secure/lib/libcrypto/man/EVP_BytesToKey.3 stable/8/secure/lib/libcrypto/man/EVP_DigestInit.3 stable/8/secure/lib/libcrypto/man/EVP_EncryptInit.3 stable/8/secure/lib/libcrypto/man/EVP_OpenInit.3 stable/8/secure/lib/libcrypto/man/EVP_PKEY_new.3 stable/8/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 stable/8/secure/lib/libcrypto/man/EVP_SealInit.3 stable/8/secure/lib/libcrypto/man/EVP_SignInit.3 stable/8/secure/lib/libcrypto/man/EVP_VerifyInit.3 stable/8/secure/lib/libcrypto/man/OBJ_nid2obj.3 stable/8/secure/lib/libcrypto/man/OPENSSL_Applink.3 stable/8/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 stable/8/secure/lib/libcrypto/man/OPENSSL_config.3 stable/8/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 stable/8/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 stable/8/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 stable/8/secure/lib/libcrypto/man/PKCS12_create.3 stable/8/secure/lib/libcrypto/man/PKCS12_parse.3 stable/8/secure/lib/libcrypto/man/PKCS7_decrypt.3 stable/8/secure/lib/libcrypto/man/PKCS7_encrypt.3 stable/8/secure/lib/libcrypto/man/PKCS7_sign.3 stable/8/secure/lib/libcrypto/man/PKCS7_verify.3 stable/8/secure/lib/libcrypto/man/RAND_add.3 stable/8/secure/lib/libcrypto/man/RAND_bytes.3 stable/8/secure/lib/libcrypto/man/RAND_cleanup.3 stable/8/secure/lib/libcrypto/man/RAND_egd.3 stable/8/secure/lib/libcrypto/man/RAND_load_file.3 stable/8/secure/lib/libcrypto/man/RAND_set_rand_method.3 stable/8/secure/lib/libcrypto/man/RSA_blinding_on.3 stable/8/secure/lib/libcrypto/man/RSA_check_key.3 stable/8/secure/lib/libcrypto/man/RSA_generate_key.3 stable/8/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 stable/8/secure/lib/libcrypto/man/RSA_new.3 stable/8/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 stable/8/secure/lib/libcrypto/man/RSA_print.3 stable/8/secure/lib/libcrypto/man/RSA_private_encrypt.3 stable/8/secure/lib/libcrypto/man/RSA_public_encrypt.3 stable/8/secure/lib/libcrypto/man/RSA_set_method.3 stable/8/secure/lib/libcrypto/man/RSA_sign.3 stable/8/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 stable/8/secure/lib/libcrypto/man/RSA_size.3 stable/8/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 stable/8/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 stable/8/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 stable/8/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 stable/8/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 stable/8/secure/lib/libcrypto/man/X509_NAME_print_ex.3 stable/8/secure/lib/libcrypto/man/X509_new.3 stable/8/secure/lib/libcrypto/man/bio.3 stable/8/secure/lib/libcrypto/man/blowfish.3 stable/8/secure/lib/libcrypto/man/bn.3 stable/8/secure/lib/libcrypto/man/bn_internal.3 stable/8/secure/lib/libcrypto/man/buffer.3 stable/8/secure/lib/libcrypto/man/crypto.3 stable/8/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 stable/8/secure/lib/libcrypto/man/d2i_DHparams.3 stable/8/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 stable/8/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 stable/8/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 stable/8/secure/lib/libcrypto/man/d2i_X509.3 stable/8/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 stable/8/secure/lib/libcrypto/man/d2i_X509_CRL.3 stable/8/secure/lib/libcrypto/man/d2i_X509_NAME.3 stable/8/secure/lib/libcrypto/man/d2i_X509_REQ.3 stable/8/secure/lib/libcrypto/man/d2i_X509_SIG.3 stable/8/secure/lib/libcrypto/man/des.3 stable/8/secure/lib/libcrypto/man/dh.3 stable/8/secure/lib/libcrypto/man/dsa.3 stable/8/secure/lib/libcrypto/man/ecdsa.3 stable/8/secure/lib/libcrypto/man/engine.3 stable/8/secure/lib/libcrypto/man/err.3 stable/8/secure/lib/libcrypto/man/evp.3 stable/8/secure/lib/libcrypto/man/hmac.3 stable/8/secure/lib/libcrypto/man/lh_stats.3 stable/8/secure/lib/libcrypto/man/lhash.3 stable/8/secure/lib/libcrypto/man/md5.3 stable/8/secure/lib/libcrypto/man/mdc2.3 stable/8/secure/lib/libcrypto/man/pem.3 stable/8/secure/lib/libcrypto/man/rand.3 stable/8/secure/lib/libcrypto/man/rc4.3 stable/8/secure/lib/libcrypto/man/ripemd.3 stable/8/secure/lib/libcrypto/man/rsa.3 stable/8/secure/lib/libcrypto/man/sha.3 stable/8/secure/lib/libcrypto/man/threads.3 stable/8/secure/lib/libcrypto/man/ui.3 stable/8/secure/lib/libcrypto/man/ui_compat.3 stable/8/secure/lib/libcrypto/man/x509.3 stable/8/secure/lib/libssl/man/SSL_CIPHER_get_name.3 stable/8/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 stable/8/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 stable/8/secure/lib/libssl/man/SSL_CTX_add_session.3 stable/8/secure/lib/libssl/man/SSL_CTX_ctrl.3 stable/8/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 stable/8/secure/lib/libssl/man/SSL_CTX_free.3 stable/8/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 stable/8/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 stable/8/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 stable/8/secure/lib/libssl/man/SSL_CTX_new.3 stable/8/secure/lib/libssl/man/SSL_CTX_sess_number.3 stable/8/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 stable/8/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 stable/8/secure/lib/libssl/man/SSL_CTX_sessions.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_mode.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_options.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_timeout.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_verify.3 stable/8/secure/lib/libssl/man/SSL_CTX_use_certificate.3 stable/8/secure/lib/libssl/man/SSL_SESSION_free.3 stable/8/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 stable/8/secure/lib/libssl/man/SSL_SESSION_get_time.3 stable/8/secure/lib/libssl/man/SSL_accept.3 stable/8/secure/lib/libssl/man/SSL_alert_type_string.3 stable/8/secure/lib/libssl/man/SSL_clear.3 stable/8/secure/lib/libssl/man/SSL_connect.3 stable/8/secure/lib/libssl/man/SSL_do_handshake.3 stable/8/secure/lib/libssl/man/SSL_free.3 stable/8/secure/lib/libssl/man/SSL_get_SSL_CTX.3 stable/8/secure/lib/libssl/man/SSL_get_ciphers.3 stable/8/secure/lib/libssl/man/SSL_get_client_CA_list.3 stable/8/secure/lib/libssl/man/SSL_get_current_cipher.3 stable/8/secure/lib/libssl/man/SSL_get_default_timeout.3 stable/8/secure/lib/libssl/man/SSL_get_error.3 stable/8/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 stable/8/secure/lib/libssl/man/SSL_get_ex_new_index.3 stable/8/secure/lib/libssl/man/SSL_get_fd.3 stable/8/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 stable/8/secure/lib/libssl/man/SSL_get_peer_certificate.3 stable/8/secure/lib/libssl/man/SSL_get_rbio.3 stable/8/secure/lib/libssl/man/SSL_get_session.3 stable/8/secure/lib/libssl/man/SSL_get_verify_result.3 stable/8/secure/lib/libssl/man/SSL_get_version.3 stable/8/secure/lib/libssl/man/SSL_library_init.3 stable/8/secure/lib/libssl/man/SSL_load_client_CA_file.3 stable/8/secure/lib/libssl/man/SSL_new.3 stable/8/secure/lib/libssl/man/SSL_pending.3 stable/8/secure/lib/libssl/man/SSL_read.3 stable/8/secure/lib/libssl/man/SSL_rstate_string.3 stable/8/secure/lib/libssl/man/SSL_session_reused.3 stable/8/secure/lib/libssl/man/SSL_set_bio.3 stable/8/secure/lib/libssl/man/SSL_set_connect_state.3 stable/8/secure/lib/libssl/man/SSL_set_fd.3 stable/8/secure/lib/libssl/man/SSL_set_session.3 stable/8/secure/lib/libssl/man/SSL_set_shutdown.3 stable/8/secure/lib/libssl/man/SSL_set_verify_result.3 stable/8/secure/lib/libssl/man/SSL_shutdown.3 stable/8/secure/lib/libssl/man/SSL_state_string.3 stable/8/secure/lib/libssl/man/SSL_want.3 stable/8/secure/lib/libssl/man/SSL_write.3 stable/8/secure/lib/libssl/man/d2i_SSL_SESSION.3 stable/8/secure/lib/libssl/man/ssl.3 stable/8/secure/usr.bin/openssl/man/CA.pl.1 stable/8/secure/usr.bin/openssl/man/asn1parse.1 stable/8/secure/usr.bin/openssl/man/ca.1 stable/8/secure/usr.bin/openssl/man/ciphers.1 stable/8/secure/usr.bin/openssl/man/crl.1 stable/8/secure/usr.bin/openssl/man/crl2pkcs7.1 stable/8/secure/usr.bin/openssl/man/dgst.1 stable/8/secure/usr.bin/openssl/man/dhparam.1 stable/8/secure/usr.bin/openssl/man/dsa.1 stable/8/secure/usr.bin/openssl/man/dsaparam.1 stable/8/secure/usr.bin/openssl/man/ec.1 stable/8/secure/usr.bin/openssl/man/ecparam.1 stable/8/secure/usr.bin/openssl/man/enc.1 stable/8/secure/usr.bin/openssl/man/errstr.1 stable/8/secure/usr.bin/openssl/man/gendsa.1 stable/8/secure/usr.bin/openssl/man/genrsa.1 stable/8/secure/usr.bin/openssl/man/nseq.1 stable/8/secure/usr.bin/openssl/man/ocsp.1 stable/8/secure/usr.bin/openssl/man/openssl.1 stable/8/secure/usr.bin/openssl/man/passwd.1 stable/8/secure/usr.bin/openssl/man/pkcs12.1 stable/8/secure/usr.bin/openssl/man/pkcs7.1 stable/8/secure/usr.bin/openssl/man/pkcs8.1 stable/8/secure/usr.bin/openssl/man/rand.1 stable/8/secure/usr.bin/openssl/man/req.1 stable/8/secure/usr.bin/openssl/man/rsa.1 stable/8/secure/usr.bin/openssl/man/rsautl.1 stable/8/secure/usr.bin/openssl/man/s_client.1 stable/8/secure/usr.bin/openssl/man/s_server.1 stable/8/secure/usr.bin/openssl/man/s_time.1 stable/8/secure/usr.bin/openssl/man/sess_id.1 stable/8/secure/usr.bin/openssl/man/smime.1 stable/8/secure/usr.bin/openssl/man/speed.1 stable/8/secure/usr.bin/openssl/man/spkac.1 stable/8/secure/usr.bin/openssl/man/verify.1 stable/8/secure/usr.bin/openssl/man/version.1 stable/8/secure/usr.bin/openssl/man/x509.1 stable/8/secure/usr.bin/openssl/man/x509v3_config.1 Modified: stable/8/secure/lib/libcrypto/Makefile.inc ============================================================================== --- stable/8/secure/lib/libcrypto/Makefile.inc Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/Makefile.inc Mon Jun 9 17:03:16 2014 (r267286) @@ -4,7 +4,7 @@ # OpenSSL version used for manual page generation OPENSSL_VER= 0.9.8za -OPENSSL_DATE= 2013-06-05 +OPENSSL_DATE= 2014-06-05 LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl LCRYPTO_DOC= ${.CURDIR}/../../../crypto/openssl/doc Modified: stable/8/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_OBJECT_new 3" -.TH ASN1_OBJECT_new 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH ASN1_OBJECT_new 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/ASN1_STRING_length.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/ASN1_STRING_length.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/ASN1_STRING_length.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_length 3" -.TH ASN1_STRING_length 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH ASN1_STRING_length 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/ASN1_STRING_new.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/ASN1_STRING_new.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/ASN1_STRING_new.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_new 3" -.TH ASN1_STRING_new 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH ASN1_STRING_new 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_print_ex 3" -.TH ASN1_STRING_print_ex 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH ASN1_STRING_print_ex 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/ASN1_generate_nconf.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/ASN1_generate_nconf.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/ASN1_generate_nconf.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_generate_nconf 3" -.TH ASN1_generate_nconf 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH ASN1_generate_nconf 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BIO_ctrl.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BIO_ctrl.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BIO_ctrl.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_ctrl 3" -.TH BIO_ctrl 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_ctrl 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BIO_f_base64.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BIO_f_base64.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BIO_f_base64.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_base64 3" -.TH BIO_f_base64 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_f_base64 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BIO_f_buffer.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BIO_f_buffer.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BIO_f_buffer.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_buffer 3" -.TH BIO_f_buffer 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_f_buffer 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BIO_f_cipher.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BIO_f_cipher.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BIO_f_cipher.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_cipher 3" -.TH BIO_f_cipher 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_f_cipher 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BIO_f_md.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BIO_f_md.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BIO_f_md.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_md 3" -.TH BIO_f_md 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_f_md 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BIO_f_null.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BIO_f_null.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BIO_f_null.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_null 3" -.TH BIO_f_null 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_f_null 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BIO_f_ssl.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BIO_f_ssl.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BIO_f_ssl.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_ssl 3" -.TH BIO_f_ssl 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_f_ssl 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BIO_find_type.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BIO_find_type.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BIO_find_type.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_find_type 3" -.TH BIO_find_type 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_find_type 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BIO_new.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BIO_new.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BIO_new.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_new 3" -.TH BIO_new 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_new 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BIO_push.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BIO_push.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BIO_push.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_push 3" -.TH BIO_push 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_push 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BIO_read.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BIO_read.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BIO_read.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_read 3" -.TH BIO_read 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_read 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BIO_s_accept.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BIO_s_accept.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BIO_s_accept.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_accept 3" -.TH BIO_s_accept 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_s_accept 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BIO_s_bio.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BIO_s_bio.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BIO_s_bio.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_bio 3" -.TH BIO_s_bio 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_s_bio 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BIO_s_connect.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BIO_s_connect.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BIO_s_connect.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_connect 3" -.TH BIO_s_connect 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_s_connect 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BIO_s_fd.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BIO_s_fd.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BIO_s_fd.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_fd 3" -.TH BIO_s_fd 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_s_fd 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BIO_s_file.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BIO_s_file.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BIO_s_file.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_file 3" -.TH BIO_s_file 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_s_file 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BIO_s_mem.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BIO_s_mem.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BIO_s_mem.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_mem 3" -.TH BIO_s_mem 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_s_mem 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BIO_s_null.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BIO_s_null.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BIO_s_null.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_null 3" -.TH BIO_s_null 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_s_null 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BIO_s_socket.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BIO_s_socket.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BIO_s_socket.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_socket 3" -.TH BIO_s_socket 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_s_socket 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BIO_set_callback.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BIO_set_callback.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BIO_set_callback.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_set_callback 3" -.TH BIO_set_callback 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_set_callback 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BIO_should_retry.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BIO_should_retry.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BIO_should_retry.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_should_retry 3" -.TH BIO_should_retry 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_should_retry 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BN_BLINDING_new.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BN_BLINDING_new.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BN_BLINDING_new.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_BLINDING_new 3" -.TH BN_BLINDING_new 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_BLINDING_new 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BN_CTX_new.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BN_CTX_new.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BN_CTX_new.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_CTX_new 3" -.TH BN_CTX_new 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_CTX_new 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BN_CTX_start.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BN_CTX_start.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BN_CTX_start.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_CTX_start 3" -.TH BN_CTX_start 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_CTX_start 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BN_add.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BN_add.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BN_add.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_add 3" -.TH BN_add 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_add 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BN_add_word.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BN_add_word.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BN_add_word.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_add_word 3" -.TH BN_add_word 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_add_word 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BN_bn2bin.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BN_bn2bin.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BN_bn2bin.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_bn2bin 3" -.TH BN_bn2bin 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_bn2bin 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BN_cmp.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BN_cmp.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BN_cmp.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_cmp 3" -.TH BN_cmp 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_cmp 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BN_copy.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BN_copy.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BN_copy.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_copy 3" -.TH BN_copy 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_copy 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BN_generate_prime.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BN_generate_prime.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BN_generate_prime.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_generate_prime 3" -.TH BN_generate_prime 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_generate_prime 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BN_mod_inverse.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BN_mod_inverse.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BN_mod_inverse.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_inverse 3" -.TH BN_mod_inverse 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_mod_inverse 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_mul_montgomery 3" -.TH BN_mod_mul_montgomery 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_mod_mul_montgomery 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_mul_reciprocal 3" -.TH BN_mod_mul_reciprocal 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_mod_mul_reciprocal 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BN_new.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BN_new.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BN_new.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_new 3" -.TH BN_new 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_new 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BN_num_bytes.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BN_num_bytes.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BN_num_bytes.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_num_bytes 3" -.TH BN_num_bytes 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_num_bytes 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BN_rand.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BN_rand.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BN_rand.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_rand 3" -.TH BN_rand 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_rand 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BN_set_bit.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BN_set_bit.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BN_set_bit.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_set_bit 3" -.TH BN_set_bit 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_set_bit 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BN_swap.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BN_swap.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BN_swap.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_swap 3" -.TH BN_swap 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_swap 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/BN_zero.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/BN_zero.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/BN_zero.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_zero 3" -.TH BN_zero 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_zero 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/CONF_modules_free.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/CONF_modules_free.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/CONF_modules_free.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "CONF_modules_free 3" -.TH CONF_modules_free 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH CONF_modules_free 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/CONF_modules_load_file.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/CONF_modules_load_file.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/CONF_modules_load_file.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "CONF_modules_load_file 3" -.TH CONF_modules_load_file 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH CONF_modules_load_file 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "CRYPTO_set_ex_data 3" -.TH CRYPTO_set_ex_data 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH CRYPTO_set_ex_data 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/DH_generate_key.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/DH_generate_key.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/DH_generate_key.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "DH_generate_key 3" -.TH DH_generate_key 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH DH_generate_key 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/DH_generate_parameters.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/DH_generate_parameters.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/DH_generate_parameters.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "DH_generate_parameters 3" -.TH DH_generate_parameters 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH DH_generate_parameters 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/DH_get_ex_new_index.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/DH_get_ex_new_index.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/DH_get_ex_new_index.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "DH_get_ex_new_index 3" -.TH DH_get_ex_new_index 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH DH_get_ex_new_index 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/DH_new.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/DH_new.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/DH_new.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "DH_new 3" -.TH DH_new 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH DH_new 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/DH_set_method.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/DH_set_method.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/DH_set_method.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "DH_set_method 3" -.TH DH_set_method 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH DH_set_method 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/DH_size.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/DH_size.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/DH_size.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "DH_size 3" -.TH DH_size 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH DH_size 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/DSA_SIG_new.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/DSA_SIG_new.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/DSA_SIG_new.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "DSA_SIG_new 3" -.TH DSA_SIG_new 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH DSA_SIG_new 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/DSA_do_sign.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/DSA_do_sign.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/DSA_do_sign.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "DSA_do_sign 3" -.TH DSA_do_sign 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH DSA_do_sign 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/DSA_dup_DH.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/DSA_dup_DH.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/DSA_dup_DH.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "DSA_dup_DH 3" -.TH DSA_dup_DH 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH DSA_dup_DH 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/DSA_generate_key.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/DSA_generate_key.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/DSA_generate_key.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "DSA_generate_key 3" -.TH DSA_generate_key 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH DSA_generate_key 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/DSA_generate_parameters.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/DSA_generate_parameters.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/DSA_generate_parameters.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "DSA_generate_parameters 3" -.TH DSA_generate_parameters 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH DSA_generate_parameters 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "DSA_get_ex_new_index 3" -.TH DSA_get_ex_new_index 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH DSA_get_ex_new_index 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/DSA_new.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/DSA_new.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/DSA_new.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "DSA_new 3" -.TH DSA_new 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH DSA_new 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/DSA_set_method.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/DSA_set_method.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/DSA_set_method.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "DSA_set_method 3" -.TH DSA_set_method 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH DSA_set_method 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/DSA_sign.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/DSA_sign.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/DSA_sign.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "DSA_sign 3" -.TH DSA_sign 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH DSA_sign 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/DSA_size.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/DSA_size.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/DSA_size.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "DSA_size 3" -.TH DSA_size 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH DSA_size 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/ERR_GET_LIB.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/ERR_GET_LIB.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/ERR_GET_LIB.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "ERR_GET_LIB 3" -.TH ERR_GET_LIB 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH ERR_GET_LIB 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/ERR_clear_error.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/ERR_clear_error.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/ERR_clear_error.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "ERR_clear_error 3" -.TH ERR_clear_error 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH ERR_clear_error 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/ERR_error_string.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/ERR_error_string.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/ERR_error_string.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "ERR_error_string 3" -.TH ERR_error_string 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH ERR_error_string 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/ERR_get_error.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/ERR_get_error.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/ERR_get_error.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "ERR_get_error 3" -.TH ERR_get_error 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH ERR_get_error 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "ERR_load_crypto_strings 3" -.TH ERR_load_crypto_strings 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH ERR_load_crypto_strings 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/ERR_load_strings.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/ERR_load_strings.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/ERR_load_strings.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "ERR_load_strings 3" -.TH ERR_load_strings 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH ERR_load_strings 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/ERR_print_errors.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/ERR_print_errors.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/ERR_print_errors.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "ERR_print_errors 3" -.TH ERR_print_errors 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH ERR_print_errors 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/ERR_put_error.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/ERR_put_error.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/ERR_put_error.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "ERR_put_error 3" -.TH ERR_put_error 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH ERR_put_error 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/ERR_remove_state.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/ERR_remove_state.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/ERR_remove_state.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "ERR_remove_state 3" -.TH ERR_remove_state 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH ERR_remove_state 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/ERR_set_mark.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/ERR_set_mark.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/ERR_set_mark.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "ERR_set_mark 3" -.TH ERR_set_mark 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH ERR_set_mark 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/EVP_BytesToKey.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/EVP_BytesToKey.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/EVP_BytesToKey.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "EVP_BytesToKey 3" -.TH EVP_BytesToKey 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH EVP_BytesToKey 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/EVP_DigestInit.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/EVP_DigestInit.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/EVP_DigestInit.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "EVP_DigestInit 3" -.TH EVP_DigestInit 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH EVP_DigestInit 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/EVP_EncryptInit.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/EVP_EncryptInit.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/EVP_EncryptInit.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "EVP_EncryptInit 3" -.TH EVP_EncryptInit 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH EVP_EncryptInit 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/EVP_OpenInit.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/EVP_OpenInit.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/EVP_OpenInit.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "EVP_OpenInit 3" -.TH EVP_OpenInit 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH EVP_OpenInit 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/EVP_PKEY_new.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/EVP_PKEY_new.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/EVP_PKEY_new.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "EVP_PKEY_new 3" -.TH EVP_PKEY_new 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH EVP_PKEY_new 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "EVP_PKEY_set1_RSA 3" -.TH EVP_PKEY_set1_RSA 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH EVP_PKEY_set1_RSA 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/EVP_SealInit.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/EVP_SealInit.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/EVP_SealInit.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "EVP_SealInit 3" -.TH EVP_SealInit 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH EVP_SealInit 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/EVP_SignInit.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/EVP_SignInit.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/EVP_SignInit.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "EVP_SignInit 3" -.TH EVP_SignInit 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH EVP_SignInit 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/EVP_VerifyInit.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/EVP_VerifyInit.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/EVP_VerifyInit.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "EVP_VerifyInit 3" -.TH EVP_VerifyInit 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH EVP_VerifyInit 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/OBJ_nid2obj.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/OBJ_nid2obj.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/OBJ_nid2obj.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "OBJ_nid2obj 3" -.TH OBJ_nid2obj 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH OBJ_nid2obj 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/OPENSSL_Applink.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/OPENSSL_Applink.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/OPENSSL_Applink.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "OPENSSL_Applink 3" -.TH OPENSSL_Applink 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH OPENSSL_Applink 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "OPENSSL_VERSION_NUMBER 3" -.TH OPENSSL_VERSION_NUMBER 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH OPENSSL_VERSION_NUMBER 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/OPENSSL_config.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/OPENSSL_config.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/OPENSSL_config.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "OPENSSL_config 3" -.TH OPENSSL_config 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH OPENSSL_config 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "OPENSSL_ia32cap 3" -.TH OPENSSL_ia32cap 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH OPENSSL_ia32cap 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "OPENSSL_load_builtin_modules 3" -.TH OPENSSL_load_builtin_modules 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH OPENSSL_load_builtin_modules 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "OpenSSL_add_all_algorithms 3" -.TH OpenSSL_add_all_algorithms 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH OpenSSL_add_all_algorithms 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/8/secure/lib/libcrypto/man/PKCS12_create.3 ============================================================================== --- stable/8/secure/lib/libcrypto/man/PKCS12_create.3 Mon Jun 9 16:30:56 2014 (r267285) +++ stable/8/secure/lib/libcrypto/man/PKCS12_create.3 Mon Jun 9 17:03:16 2014 (r267286) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "PKCS12_create 3" -.TH PKCS12_create 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH PKCS12_create 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Mon Jun 9 17:23:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C093B748; Mon, 9 Jun 2014 17:23:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A98E82D31; Mon, 9 Jun 2014 17:23:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s59HN8YK031815; Mon, 9 Jun 2014 17:23:08 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s59HMnWv031660; Mon, 9 Jun 2014 17:22:49 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201406091722.s59HMnWv031660@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 9 Jun 2014 17:22:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267287 - in stable/9/secure: lib/libcrypto lib/libcrypto/man lib/libssl/man usr.bin/openssl/man X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 17:23:08 -0000 Author: jkim Date: Mon Jun 9 17:22:49 2014 New Revision: 267287 URL: http://svnweb.freebsd.org/changeset/base/267287 Log: Correct OpenSSL 0.9.8za release date. Approved by: re (delphij) Modified: stable/9/secure/lib/libcrypto/Makefile.inc stable/9/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 stable/9/secure/lib/libcrypto/man/ASN1_STRING_length.3 stable/9/secure/lib/libcrypto/man/ASN1_STRING_new.3 stable/9/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 stable/9/secure/lib/libcrypto/man/ASN1_generate_nconf.3 stable/9/secure/lib/libcrypto/man/BIO_ctrl.3 stable/9/secure/lib/libcrypto/man/BIO_f_base64.3 stable/9/secure/lib/libcrypto/man/BIO_f_buffer.3 stable/9/secure/lib/libcrypto/man/BIO_f_cipher.3 stable/9/secure/lib/libcrypto/man/BIO_f_md.3 stable/9/secure/lib/libcrypto/man/BIO_f_null.3 stable/9/secure/lib/libcrypto/man/BIO_f_ssl.3 stable/9/secure/lib/libcrypto/man/BIO_find_type.3 stable/9/secure/lib/libcrypto/man/BIO_new.3 stable/9/secure/lib/libcrypto/man/BIO_push.3 stable/9/secure/lib/libcrypto/man/BIO_read.3 stable/9/secure/lib/libcrypto/man/BIO_s_accept.3 stable/9/secure/lib/libcrypto/man/BIO_s_bio.3 stable/9/secure/lib/libcrypto/man/BIO_s_connect.3 stable/9/secure/lib/libcrypto/man/BIO_s_fd.3 stable/9/secure/lib/libcrypto/man/BIO_s_file.3 stable/9/secure/lib/libcrypto/man/BIO_s_mem.3 stable/9/secure/lib/libcrypto/man/BIO_s_null.3 stable/9/secure/lib/libcrypto/man/BIO_s_socket.3 stable/9/secure/lib/libcrypto/man/BIO_set_callback.3 stable/9/secure/lib/libcrypto/man/BIO_should_retry.3 stable/9/secure/lib/libcrypto/man/BN_BLINDING_new.3 stable/9/secure/lib/libcrypto/man/BN_CTX_new.3 stable/9/secure/lib/libcrypto/man/BN_CTX_start.3 stable/9/secure/lib/libcrypto/man/BN_add.3 stable/9/secure/lib/libcrypto/man/BN_add_word.3 stable/9/secure/lib/libcrypto/man/BN_bn2bin.3 stable/9/secure/lib/libcrypto/man/BN_cmp.3 stable/9/secure/lib/libcrypto/man/BN_copy.3 stable/9/secure/lib/libcrypto/man/BN_generate_prime.3 stable/9/secure/lib/libcrypto/man/BN_mod_inverse.3 stable/9/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 stable/9/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 stable/9/secure/lib/libcrypto/man/BN_new.3 stable/9/secure/lib/libcrypto/man/BN_num_bytes.3 stable/9/secure/lib/libcrypto/man/BN_rand.3 stable/9/secure/lib/libcrypto/man/BN_set_bit.3 stable/9/secure/lib/libcrypto/man/BN_swap.3 stable/9/secure/lib/libcrypto/man/BN_zero.3 stable/9/secure/lib/libcrypto/man/CONF_modules_free.3 stable/9/secure/lib/libcrypto/man/CONF_modules_load_file.3 stable/9/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 stable/9/secure/lib/libcrypto/man/DH_generate_key.3 stable/9/secure/lib/libcrypto/man/DH_generate_parameters.3 stable/9/secure/lib/libcrypto/man/DH_get_ex_new_index.3 stable/9/secure/lib/libcrypto/man/DH_new.3 stable/9/secure/lib/libcrypto/man/DH_set_method.3 stable/9/secure/lib/libcrypto/man/DH_size.3 stable/9/secure/lib/libcrypto/man/DSA_SIG_new.3 stable/9/secure/lib/libcrypto/man/DSA_do_sign.3 stable/9/secure/lib/libcrypto/man/DSA_dup_DH.3 stable/9/secure/lib/libcrypto/man/DSA_generate_key.3 stable/9/secure/lib/libcrypto/man/DSA_generate_parameters.3 stable/9/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 stable/9/secure/lib/libcrypto/man/DSA_new.3 stable/9/secure/lib/libcrypto/man/DSA_set_method.3 stable/9/secure/lib/libcrypto/man/DSA_sign.3 stable/9/secure/lib/libcrypto/man/DSA_size.3 stable/9/secure/lib/libcrypto/man/ERR_GET_LIB.3 stable/9/secure/lib/libcrypto/man/ERR_clear_error.3 stable/9/secure/lib/libcrypto/man/ERR_error_string.3 stable/9/secure/lib/libcrypto/man/ERR_get_error.3 stable/9/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 stable/9/secure/lib/libcrypto/man/ERR_load_strings.3 stable/9/secure/lib/libcrypto/man/ERR_print_errors.3 stable/9/secure/lib/libcrypto/man/ERR_put_error.3 stable/9/secure/lib/libcrypto/man/ERR_remove_state.3 stable/9/secure/lib/libcrypto/man/ERR_set_mark.3 stable/9/secure/lib/libcrypto/man/EVP_BytesToKey.3 stable/9/secure/lib/libcrypto/man/EVP_DigestInit.3 stable/9/secure/lib/libcrypto/man/EVP_EncryptInit.3 stable/9/secure/lib/libcrypto/man/EVP_OpenInit.3 stable/9/secure/lib/libcrypto/man/EVP_PKEY_new.3 stable/9/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 stable/9/secure/lib/libcrypto/man/EVP_SealInit.3 stable/9/secure/lib/libcrypto/man/EVP_SignInit.3 stable/9/secure/lib/libcrypto/man/EVP_VerifyInit.3 stable/9/secure/lib/libcrypto/man/OBJ_nid2obj.3 stable/9/secure/lib/libcrypto/man/OPENSSL_Applink.3 stable/9/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 stable/9/secure/lib/libcrypto/man/OPENSSL_config.3 stable/9/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 stable/9/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 stable/9/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 stable/9/secure/lib/libcrypto/man/PKCS12_create.3 stable/9/secure/lib/libcrypto/man/PKCS12_parse.3 stable/9/secure/lib/libcrypto/man/PKCS7_decrypt.3 stable/9/secure/lib/libcrypto/man/PKCS7_encrypt.3 stable/9/secure/lib/libcrypto/man/PKCS7_sign.3 stable/9/secure/lib/libcrypto/man/PKCS7_verify.3 stable/9/secure/lib/libcrypto/man/RAND_add.3 stable/9/secure/lib/libcrypto/man/RAND_bytes.3 stable/9/secure/lib/libcrypto/man/RAND_cleanup.3 stable/9/secure/lib/libcrypto/man/RAND_egd.3 stable/9/secure/lib/libcrypto/man/RAND_load_file.3 stable/9/secure/lib/libcrypto/man/RAND_set_rand_method.3 stable/9/secure/lib/libcrypto/man/RSA_blinding_on.3 stable/9/secure/lib/libcrypto/man/RSA_check_key.3 stable/9/secure/lib/libcrypto/man/RSA_generate_key.3 stable/9/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 stable/9/secure/lib/libcrypto/man/RSA_new.3 stable/9/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 stable/9/secure/lib/libcrypto/man/RSA_print.3 stable/9/secure/lib/libcrypto/man/RSA_private_encrypt.3 stable/9/secure/lib/libcrypto/man/RSA_public_encrypt.3 stable/9/secure/lib/libcrypto/man/RSA_set_method.3 stable/9/secure/lib/libcrypto/man/RSA_sign.3 stable/9/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 stable/9/secure/lib/libcrypto/man/RSA_size.3 stable/9/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 stable/9/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 stable/9/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 stable/9/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 stable/9/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 stable/9/secure/lib/libcrypto/man/X509_NAME_print_ex.3 stable/9/secure/lib/libcrypto/man/X509_new.3 stable/9/secure/lib/libcrypto/man/bio.3 stable/9/secure/lib/libcrypto/man/blowfish.3 stable/9/secure/lib/libcrypto/man/bn.3 stable/9/secure/lib/libcrypto/man/bn_internal.3 stable/9/secure/lib/libcrypto/man/buffer.3 stable/9/secure/lib/libcrypto/man/crypto.3 stable/9/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 stable/9/secure/lib/libcrypto/man/d2i_DHparams.3 stable/9/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 stable/9/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 stable/9/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 stable/9/secure/lib/libcrypto/man/d2i_X509.3 stable/9/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 stable/9/secure/lib/libcrypto/man/d2i_X509_CRL.3 stable/9/secure/lib/libcrypto/man/d2i_X509_NAME.3 stable/9/secure/lib/libcrypto/man/d2i_X509_REQ.3 stable/9/secure/lib/libcrypto/man/d2i_X509_SIG.3 stable/9/secure/lib/libcrypto/man/des.3 stable/9/secure/lib/libcrypto/man/dh.3 stable/9/secure/lib/libcrypto/man/dsa.3 stable/9/secure/lib/libcrypto/man/ecdsa.3 stable/9/secure/lib/libcrypto/man/engine.3 stable/9/secure/lib/libcrypto/man/err.3 stable/9/secure/lib/libcrypto/man/evp.3 stable/9/secure/lib/libcrypto/man/hmac.3 stable/9/secure/lib/libcrypto/man/lh_stats.3 stable/9/secure/lib/libcrypto/man/lhash.3 stable/9/secure/lib/libcrypto/man/md5.3 stable/9/secure/lib/libcrypto/man/mdc2.3 stable/9/secure/lib/libcrypto/man/pem.3 stable/9/secure/lib/libcrypto/man/rand.3 stable/9/secure/lib/libcrypto/man/rc4.3 stable/9/secure/lib/libcrypto/man/ripemd.3 stable/9/secure/lib/libcrypto/man/rsa.3 stable/9/secure/lib/libcrypto/man/sha.3 stable/9/secure/lib/libcrypto/man/threads.3 stable/9/secure/lib/libcrypto/man/ui.3 stable/9/secure/lib/libcrypto/man/ui_compat.3 stable/9/secure/lib/libcrypto/man/x509.3 stable/9/secure/lib/libssl/man/SSL_CIPHER_get_name.3 stable/9/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 stable/9/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 stable/9/secure/lib/libssl/man/SSL_CTX_add_session.3 stable/9/secure/lib/libssl/man/SSL_CTX_ctrl.3 stable/9/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 stable/9/secure/lib/libssl/man/SSL_CTX_free.3 stable/9/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 stable/9/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 stable/9/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 stable/9/secure/lib/libssl/man/SSL_CTX_new.3 stable/9/secure/lib/libssl/man/SSL_CTX_sess_number.3 stable/9/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 stable/9/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 stable/9/secure/lib/libssl/man/SSL_CTX_sessions.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_mode.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_options.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_timeout.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_verify.3 stable/9/secure/lib/libssl/man/SSL_CTX_use_certificate.3 stable/9/secure/lib/libssl/man/SSL_SESSION_free.3 stable/9/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 stable/9/secure/lib/libssl/man/SSL_SESSION_get_time.3 stable/9/secure/lib/libssl/man/SSL_accept.3 stable/9/secure/lib/libssl/man/SSL_alert_type_string.3 stable/9/secure/lib/libssl/man/SSL_clear.3 stable/9/secure/lib/libssl/man/SSL_connect.3 stable/9/secure/lib/libssl/man/SSL_do_handshake.3 stable/9/secure/lib/libssl/man/SSL_free.3 stable/9/secure/lib/libssl/man/SSL_get_SSL_CTX.3 stable/9/secure/lib/libssl/man/SSL_get_ciphers.3 stable/9/secure/lib/libssl/man/SSL_get_client_CA_list.3 stable/9/secure/lib/libssl/man/SSL_get_current_cipher.3 stable/9/secure/lib/libssl/man/SSL_get_default_timeout.3 stable/9/secure/lib/libssl/man/SSL_get_error.3 stable/9/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 stable/9/secure/lib/libssl/man/SSL_get_ex_new_index.3 stable/9/secure/lib/libssl/man/SSL_get_fd.3 stable/9/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 stable/9/secure/lib/libssl/man/SSL_get_peer_certificate.3 stable/9/secure/lib/libssl/man/SSL_get_rbio.3 stable/9/secure/lib/libssl/man/SSL_get_session.3 stable/9/secure/lib/libssl/man/SSL_get_verify_result.3 stable/9/secure/lib/libssl/man/SSL_get_version.3 stable/9/secure/lib/libssl/man/SSL_library_init.3 stable/9/secure/lib/libssl/man/SSL_load_client_CA_file.3 stable/9/secure/lib/libssl/man/SSL_new.3 stable/9/secure/lib/libssl/man/SSL_pending.3 stable/9/secure/lib/libssl/man/SSL_read.3 stable/9/secure/lib/libssl/man/SSL_rstate_string.3 stable/9/secure/lib/libssl/man/SSL_session_reused.3 stable/9/secure/lib/libssl/man/SSL_set_bio.3 stable/9/secure/lib/libssl/man/SSL_set_connect_state.3 stable/9/secure/lib/libssl/man/SSL_set_fd.3 stable/9/secure/lib/libssl/man/SSL_set_session.3 stable/9/secure/lib/libssl/man/SSL_set_shutdown.3 stable/9/secure/lib/libssl/man/SSL_set_verify_result.3 stable/9/secure/lib/libssl/man/SSL_shutdown.3 stable/9/secure/lib/libssl/man/SSL_state_string.3 stable/9/secure/lib/libssl/man/SSL_want.3 stable/9/secure/lib/libssl/man/SSL_write.3 stable/9/secure/lib/libssl/man/d2i_SSL_SESSION.3 stable/9/secure/lib/libssl/man/ssl.3 stable/9/secure/usr.bin/openssl/man/CA.pl.1 stable/9/secure/usr.bin/openssl/man/asn1parse.1 stable/9/secure/usr.bin/openssl/man/ca.1 stable/9/secure/usr.bin/openssl/man/ciphers.1 stable/9/secure/usr.bin/openssl/man/crl.1 stable/9/secure/usr.bin/openssl/man/crl2pkcs7.1 stable/9/secure/usr.bin/openssl/man/dgst.1 stable/9/secure/usr.bin/openssl/man/dhparam.1 stable/9/secure/usr.bin/openssl/man/dsa.1 stable/9/secure/usr.bin/openssl/man/dsaparam.1 stable/9/secure/usr.bin/openssl/man/ec.1 stable/9/secure/usr.bin/openssl/man/ecparam.1 stable/9/secure/usr.bin/openssl/man/enc.1 stable/9/secure/usr.bin/openssl/man/errstr.1 stable/9/secure/usr.bin/openssl/man/gendsa.1 stable/9/secure/usr.bin/openssl/man/genrsa.1 stable/9/secure/usr.bin/openssl/man/nseq.1 stable/9/secure/usr.bin/openssl/man/ocsp.1 stable/9/secure/usr.bin/openssl/man/openssl.1 stable/9/secure/usr.bin/openssl/man/passwd.1 stable/9/secure/usr.bin/openssl/man/pkcs12.1 stable/9/secure/usr.bin/openssl/man/pkcs7.1 stable/9/secure/usr.bin/openssl/man/pkcs8.1 stable/9/secure/usr.bin/openssl/man/rand.1 stable/9/secure/usr.bin/openssl/man/req.1 stable/9/secure/usr.bin/openssl/man/rsa.1 stable/9/secure/usr.bin/openssl/man/rsautl.1 stable/9/secure/usr.bin/openssl/man/s_client.1 stable/9/secure/usr.bin/openssl/man/s_server.1 stable/9/secure/usr.bin/openssl/man/s_time.1 stable/9/secure/usr.bin/openssl/man/sess_id.1 stable/9/secure/usr.bin/openssl/man/smime.1 stable/9/secure/usr.bin/openssl/man/speed.1 stable/9/secure/usr.bin/openssl/man/spkac.1 stable/9/secure/usr.bin/openssl/man/verify.1 stable/9/secure/usr.bin/openssl/man/version.1 stable/9/secure/usr.bin/openssl/man/x509.1 stable/9/secure/usr.bin/openssl/man/x509v3_config.1 Modified: stable/9/secure/lib/libcrypto/Makefile.inc ============================================================================== --- stable/9/secure/lib/libcrypto/Makefile.inc Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/Makefile.inc Mon Jun 9 17:22:49 2014 (r267287) @@ -4,7 +4,7 @@ # OpenSSL version used for manual page generation OPENSSL_VER= 0.9.8za -OPENSSL_DATE= 2013-06-05 +OPENSSL_DATE= 2014-06-05 LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl LCRYPTO_DOC= ${.CURDIR}/../../../crypto/openssl/doc Modified: stable/9/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_OBJECT_new 3" -.TH ASN1_OBJECT_new 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH ASN1_OBJECT_new 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/ASN1_STRING_length.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/ASN1_STRING_length.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/ASN1_STRING_length.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_length 3" -.TH ASN1_STRING_length 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH ASN1_STRING_length 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/ASN1_STRING_new.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/ASN1_STRING_new.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/ASN1_STRING_new.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_new 3" -.TH ASN1_STRING_new 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH ASN1_STRING_new 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_print_ex 3" -.TH ASN1_STRING_print_ex 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH ASN1_STRING_print_ex 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/ASN1_generate_nconf.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/ASN1_generate_nconf.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/ASN1_generate_nconf.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_generate_nconf 3" -.TH ASN1_generate_nconf 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH ASN1_generate_nconf 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BIO_ctrl.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BIO_ctrl.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BIO_ctrl.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_ctrl 3" -.TH BIO_ctrl 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_ctrl 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BIO_f_base64.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BIO_f_base64.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BIO_f_base64.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_base64 3" -.TH BIO_f_base64 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_f_base64 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BIO_f_buffer.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BIO_f_buffer.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BIO_f_buffer.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_buffer 3" -.TH BIO_f_buffer 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_f_buffer 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BIO_f_cipher.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BIO_f_cipher.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BIO_f_cipher.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_cipher 3" -.TH BIO_f_cipher 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_f_cipher 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BIO_f_md.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BIO_f_md.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BIO_f_md.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_md 3" -.TH BIO_f_md 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_f_md 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BIO_f_null.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BIO_f_null.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BIO_f_null.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_null 3" -.TH BIO_f_null 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_f_null 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BIO_f_ssl.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BIO_f_ssl.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BIO_f_ssl.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_ssl 3" -.TH BIO_f_ssl 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_f_ssl 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BIO_find_type.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BIO_find_type.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BIO_find_type.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_find_type 3" -.TH BIO_find_type 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_find_type 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BIO_new.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BIO_new.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BIO_new.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_new 3" -.TH BIO_new 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_new 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BIO_push.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BIO_push.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BIO_push.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_push 3" -.TH BIO_push 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_push 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BIO_read.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BIO_read.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BIO_read.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_read 3" -.TH BIO_read 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_read 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BIO_s_accept.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BIO_s_accept.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BIO_s_accept.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_accept 3" -.TH BIO_s_accept 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_s_accept 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BIO_s_bio.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BIO_s_bio.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BIO_s_bio.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_bio 3" -.TH BIO_s_bio 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_s_bio 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BIO_s_connect.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BIO_s_connect.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BIO_s_connect.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_connect 3" -.TH BIO_s_connect 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_s_connect 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BIO_s_fd.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BIO_s_fd.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BIO_s_fd.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_fd 3" -.TH BIO_s_fd 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_s_fd 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BIO_s_file.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BIO_s_file.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BIO_s_file.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_file 3" -.TH BIO_s_file 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_s_file 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BIO_s_mem.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BIO_s_mem.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BIO_s_mem.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_mem 3" -.TH BIO_s_mem 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_s_mem 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BIO_s_null.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BIO_s_null.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BIO_s_null.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_null 3" -.TH BIO_s_null 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_s_null 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BIO_s_socket.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BIO_s_socket.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BIO_s_socket.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_socket 3" -.TH BIO_s_socket 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_s_socket 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BIO_set_callback.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BIO_set_callback.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BIO_set_callback.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_set_callback 3" -.TH BIO_set_callback 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_set_callback 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BIO_should_retry.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BIO_should_retry.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BIO_should_retry.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIO_should_retry 3" -.TH BIO_should_retry 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BIO_should_retry 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BN_BLINDING_new.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BN_BLINDING_new.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BN_BLINDING_new.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_BLINDING_new 3" -.TH BN_BLINDING_new 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_BLINDING_new 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BN_CTX_new.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BN_CTX_new.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BN_CTX_new.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_CTX_new 3" -.TH BN_CTX_new 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_CTX_new 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BN_CTX_start.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BN_CTX_start.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BN_CTX_start.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_CTX_start 3" -.TH BN_CTX_start 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_CTX_start 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BN_add.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BN_add.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BN_add.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_add 3" -.TH BN_add 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_add 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BN_add_word.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BN_add_word.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BN_add_word.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_add_word 3" -.TH BN_add_word 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_add_word 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BN_bn2bin.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BN_bn2bin.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BN_bn2bin.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_bn2bin 3" -.TH BN_bn2bin 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_bn2bin 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BN_cmp.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BN_cmp.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BN_cmp.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_cmp 3" -.TH BN_cmp 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_cmp 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BN_copy.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BN_copy.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BN_copy.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_copy 3" -.TH BN_copy 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_copy 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BN_generate_prime.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BN_generate_prime.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BN_generate_prime.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_generate_prime 3" -.TH BN_generate_prime 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_generate_prime 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BN_mod_inverse.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BN_mod_inverse.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BN_mod_inverse.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_inverse 3" -.TH BN_mod_inverse 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_mod_inverse 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_mul_montgomery 3" -.TH BN_mod_mul_montgomery 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_mod_mul_montgomery 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_mul_reciprocal 3" -.TH BN_mod_mul_reciprocal 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_mod_mul_reciprocal 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BN_new.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BN_new.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BN_new.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_new 3" -.TH BN_new 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_new 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BN_num_bytes.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BN_num_bytes.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BN_num_bytes.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_num_bytes 3" -.TH BN_num_bytes 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_num_bytes 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BN_rand.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BN_rand.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BN_rand.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_rand 3" -.TH BN_rand 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_rand 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BN_set_bit.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BN_set_bit.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BN_set_bit.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_set_bit 3" -.TH BN_set_bit 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_set_bit 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BN_swap.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BN_swap.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BN_swap.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_swap 3" -.TH BN_swap 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_swap 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/BN_zero.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/BN_zero.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/BN_zero.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BN_zero 3" -.TH BN_zero 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH BN_zero 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/CONF_modules_free.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/CONF_modules_free.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/CONF_modules_free.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "CONF_modules_free 3" -.TH CONF_modules_free 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH CONF_modules_free 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/CONF_modules_load_file.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/CONF_modules_load_file.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/CONF_modules_load_file.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "CONF_modules_load_file 3" -.TH CONF_modules_load_file 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH CONF_modules_load_file 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "CRYPTO_set_ex_data 3" -.TH CRYPTO_set_ex_data 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH CRYPTO_set_ex_data 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/DH_generate_key.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/DH_generate_key.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/DH_generate_key.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "DH_generate_key 3" -.TH DH_generate_key 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH DH_generate_key 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/DH_generate_parameters.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/DH_generate_parameters.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/DH_generate_parameters.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "DH_generate_parameters 3" -.TH DH_generate_parameters 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH DH_generate_parameters 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/DH_get_ex_new_index.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/DH_get_ex_new_index.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/DH_get_ex_new_index.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "DH_get_ex_new_index 3" -.TH DH_get_ex_new_index 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH DH_get_ex_new_index 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/DH_new.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/DH_new.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/DH_new.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "DH_new 3" -.TH DH_new 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH DH_new 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/DH_set_method.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/DH_set_method.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/DH_set_method.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "DH_set_method 3" -.TH DH_set_method 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH DH_set_method 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/DH_size.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/DH_size.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/DH_size.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "DH_size 3" -.TH DH_size 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH DH_size 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/DSA_SIG_new.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/DSA_SIG_new.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/DSA_SIG_new.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "DSA_SIG_new 3" -.TH DSA_SIG_new 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH DSA_SIG_new 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/DSA_do_sign.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/DSA_do_sign.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/DSA_do_sign.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "DSA_do_sign 3" -.TH DSA_do_sign 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH DSA_do_sign 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/DSA_dup_DH.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/DSA_dup_DH.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/DSA_dup_DH.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "DSA_dup_DH 3" -.TH DSA_dup_DH 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH DSA_dup_DH 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/DSA_generate_key.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/DSA_generate_key.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/DSA_generate_key.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "DSA_generate_key 3" -.TH DSA_generate_key 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH DSA_generate_key 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/DSA_generate_parameters.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/DSA_generate_parameters.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/DSA_generate_parameters.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "DSA_generate_parameters 3" -.TH DSA_generate_parameters 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH DSA_generate_parameters 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "DSA_get_ex_new_index 3" -.TH DSA_get_ex_new_index 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH DSA_get_ex_new_index 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/DSA_new.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/DSA_new.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/DSA_new.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "DSA_new 3" -.TH DSA_new 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH DSA_new 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/DSA_set_method.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/DSA_set_method.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/DSA_set_method.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "DSA_set_method 3" -.TH DSA_set_method 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH DSA_set_method 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/DSA_sign.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/DSA_sign.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/DSA_sign.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "DSA_sign 3" -.TH DSA_sign 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH DSA_sign 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/DSA_size.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/DSA_size.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/DSA_size.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "DSA_size 3" -.TH DSA_size 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH DSA_size 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/ERR_GET_LIB.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/ERR_GET_LIB.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/ERR_GET_LIB.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "ERR_GET_LIB 3" -.TH ERR_GET_LIB 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH ERR_GET_LIB 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/ERR_clear_error.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/ERR_clear_error.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/ERR_clear_error.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "ERR_clear_error 3" -.TH ERR_clear_error 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH ERR_clear_error 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/ERR_error_string.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/ERR_error_string.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/ERR_error_string.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "ERR_error_string 3" -.TH ERR_error_string 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH ERR_error_string 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/ERR_get_error.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/ERR_get_error.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/ERR_get_error.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "ERR_get_error 3" -.TH ERR_get_error 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH ERR_get_error 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "ERR_load_crypto_strings 3" -.TH ERR_load_crypto_strings 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH ERR_load_crypto_strings 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/ERR_load_strings.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/ERR_load_strings.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/ERR_load_strings.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "ERR_load_strings 3" -.TH ERR_load_strings 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH ERR_load_strings 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/ERR_print_errors.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/ERR_print_errors.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/ERR_print_errors.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "ERR_print_errors 3" -.TH ERR_print_errors 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH ERR_print_errors 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/ERR_put_error.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/ERR_put_error.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/ERR_put_error.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "ERR_put_error 3" -.TH ERR_put_error 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH ERR_put_error 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/ERR_remove_state.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/ERR_remove_state.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/ERR_remove_state.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "ERR_remove_state 3" -.TH ERR_remove_state 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH ERR_remove_state 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/ERR_set_mark.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/ERR_set_mark.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/ERR_set_mark.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "ERR_set_mark 3" -.TH ERR_set_mark 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH ERR_set_mark 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/EVP_BytesToKey.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/EVP_BytesToKey.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/EVP_BytesToKey.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "EVP_BytesToKey 3" -.TH EVP_BytesToKey 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH EVP_BytesToKey 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/EVP_DigestInit.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/EVP_DigestInit.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/EVP_DigestInit.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "EVP_DigestInit 3" -.TH EVP_DigestInit 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH EVP_DigestInit 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/EVP_EncryptInit.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/EVP_EncryptInit.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/EVP_EncryptInit.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "EVP_EncryptInit 3" -.TH EVP_EncryptInit 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH EVP_EncryptInit 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/EVP_OpenInit.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/EVP_OpenInit.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/EVP_OpenInit.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "EVP_OpenInit 3" -.TH EVP_OpenInit 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH EVP_OpenInit 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/EVP_PKEY_new.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/EVP_PKEY_new.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/EVP_PKEY_new.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "EVP_PKEY_new 3" -.TH EVP_PKEY_new 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH EVP_PKEY_new 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "EVP_PKEY_set1_RSA 3" -.TH EVP_PKEY_set1_RSA 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH EVP_PKEY_set1_RSA 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/EVP_SealInit.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/EVP_SealInit.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/EVP_SealInit.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "EVP_SealInit 3" -.TH EVP_SealInit 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH EVP_SealInit 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/EVP_SignInit.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/EVP_SignInit.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/EVP_SignInit.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "EVP_SignInit 3" -.TH EVP_SignInit 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH EVP_SignInit 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/EVP_VerifyInit.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/EVP_VerifyInit.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/EVP_VerifyInit.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "EVP_VerifyInit 3" -.TH EVP_VerifyInit 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH EVP_VerifyInit 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/OBJ_nid2obj.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/OBJ_nid2obj.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/OBJ_nid2obj.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "OBJ_nid2obj 3" -.TH OBJ_nid2obj 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH OBJ_nid2obj 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/OPENSSL_Applink.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/OPENSSL_Applink.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/OPENSSL_Applink.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "OPENSSL_Applink 3" -.TH OPENSSL_Applink 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH OPENSSL_Applink 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "OPENSSL_VERSION_NUMBER 3" -.TH OPENSSL_VERSION_NUMBER 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH OPENSSL_VERSION_NUMBER 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/OPENSSL_config.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/OPENSSL_config.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/OPENSSL_config.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "OPENSSL_config 3" -.TH OPENSSL_config 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH OPENSSL_config 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "OPENSSL_ia32cap 3" -.TH OPENSSL_ia32cap 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH OPENSSL_ia32cap 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "OPENSSL_load_builtin_modules 3" -.TH OPENSSL_load_builtin_modules 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH OPENSSL_load_builtin_modules 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "OpenSSL_add_all_algorithms 3" -.TH OpenSSL_add_all_algorithms 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH OpenSSL_add_all_algorithms 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/9/secure/lib/libcrypto/man/PKCS12_create.3 ============================================================================== --- stable/9/secure/lib/libcrypto/man/PKCS12_create.3 Mon Jun 9 17:03:16 2014 (r267286) +++ stable/9/secure/lib/libcrypto/man/PKCS12_create.3 Mon Jun 9 17:22:49 2014 (r267287) @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "PKCS12_create 3" -.TH PKCS12_create 3 "2013-06-05" "0.9.8za" "OpenSSL" +.TH PKCS12_create 3 "2014-06-05" "0.9.8za" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Mon Jun 9 20:42:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94482BCE; Mon, 9 Jun 2014 20:42:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 805DD20B2; Mon, 9 Jun 2014 20:42:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s59Kgqrg024237; Mon, 9 Jun 2014 20:42:52 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s59Kgq9R024236; Mon, 9 Jun 2014 20:42:52 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406092042.s59Kgq9R024236@svn.freebsd.org> From: Glen Barber Date: Mon, 9 Jun 2014 20:42:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267296 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 20:42:52 -0000 Author: gjb Date: Mon Jun 9 20:42:52 2014 New Revision: 267296 URL: http://svnweb.freebsd.org/changeset/base/267296 Log: Fix copy/paste mistake in openssl SA entry. Spotted by: jkim Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jun 9 20:28:27 2014 (r267295) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jun 9 20:42:52 2014 (r267296) @@ -176,8 +176,7 @@ FreeBSD-SA-14:14.openssl 5 June 2014 - Incorrect error handling in PAM policy - parser + Multiple vulnerabilities From owner-svn-src-stable@FreeBSD.ORG Mon Jun 9 20:54:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C2126CC; Mon, 9 Jun 2014 20:54:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 384A221B7; Mon, 9 Jun 2014 20:54:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s59KsOBd029365; Mon, 9 Jun 2014 20:54:24 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s59KsO6b029364; Mon, 9 Jun 2014 20:54:24 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406092054.s59KsO6b029364@svn.freebsd.org> From: Glen Barber Date: Mon, 9 Jun 2014 20:54:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267303 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 20:54:24 -0000 Author: gjb Date: Mon Jun 9 20:54:23 2014 New Revision: 267303 URL: http://svnweb.freebsd.org/changeset/base/267303 Log: Document r267258, OpenSSL update to 1.0.1h. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jun 9 20:52:42 2014 (r267302) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jun 9 20:54:23 2014 (r267303) @@ -269,6 +269,8 @@ Sendmail has been updated to 8.14.9. + OpenSSL has + been updated to version 1.0.1h. From owner-svn-src-stable@FreeBSD.ORG Mon Jun 9 20:56:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D7A1815; Mon, 9 Jun 2014 20:56:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29A1921C6; Mon, 9 Jun 2014 20:56:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s59KuVsk029813; Mon, 9 Jun 2014 20:56:31 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s59KuVnB029812; Mon, 9 Jun 2014 20:56:31 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406092056.s59KuVnB029812@svn.freebsd.org> From: Glen Barber Date: Mon, 9 Jun 2014 20:56:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267304 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 20:56:31 -0000 Author: gjb Date: Mon Jun 9 20:56:30 2014 New Revision: 267304 URL: http://svnweb.freebsd.org/changeset/base/267304 Log: Document r267285, OpenSSL update to 0.9.8za. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jun 9 20:54:23 2014 (r267303) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jun 9 20:56:30 2014 (r267304) @@ -705,6 +705,9 @@ OpenSSH has been updated to version 6.6p1. + OpenSSL has + been updated to version 0.9.8za. + From owner-svn-src-stable@FreeBSD.ORG Mon Jun 9 23:11:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 388CDF90; Mon, 9 Jun 2014 23:11:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 250A82CD2; Mon, 9 Jun 2014 23:11:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s59NBpb0093842; Mon, 9 Jun 2014 23:11:51 GMT (envelope-from bjk@svn.freebsd.org) Received: (from bjk@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s59NBo8I093840; Mon, 9 Jun 2014 23:11:50 GMT (envelope-from bjk@svn.freebsd.org) Message-Id: <201406092311.s59NBo8I093840@svn.freebsd.org> From: Benjamin Kaduk Date: Mon, 9 Jun 2014 23:11:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267309 - in stable/10/share/man: man5 man7 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 23:11:51 -0000 Author: bjk (doc committer) Date: Mon Jun 9 23:11:50 2014 New Revision: 267309 URL: http://svnweb.freebsd.org/changeset/base/267309 Log: MFC r266416: ------------------------------------------------------------------------ r266416 | bjk | 2014-05-18 17:05:54 -0400 (Sun, 18 May 2014) | 14 lines Document some user-settable make variables in ports.7 This is not a comprehensive list, as the variables themselves are spread out over multiple files, but it is a start. Add a section to make.conf noting that variables may be set there that affect ports builds, but refer to ports.7 and elsewhere for the actual listing; any listing in make.conf.5 would likely become out of date fairly quickly. PR: docs/189199 Reviewed by: bdrewery (previous version) Approved by: hrs (mentor) ------------------------------------------------------------------------ PR: 189199 Approved by: hrs (mentor) Modified: stable/10/share/man/man5/make.conf.5 stable/10/share/man/man7/ports.7 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man5/make.conf.5 ============================================================================== --- stable/10/share/man/man5/make.conf.5 Mon Jun 9 22:09:03 2014 (r267308) +++ stable/10/share/man/man5/make.conf.5 Mon Jun 9 23:11:50 2014 (r267309) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 2, 2014 +.Dd May 17, 2014 .Dt MAKE.CONF 5 .Os .Sh NAME @@ -655,6 +655,14 @@ for simple printers, or for postscript or graphics printers with a ghostscript filter, or both. .El +.Ss "BUILDING PORTS" +Several make variables can be set that affect the building of ports. +These variables and their effects are documented in +.Xr ports 7 , +.Pa ${PORTSDIR}/Mk/* +and the +.Fx +Porter's Handbook. .Sh FILES .Bl -tag -width ".Pa /usr/share/examples/etc/make.conf" -compact .It Pa /etc/make.conf Modified: stable/10/share/man/man7/ports.7 ============================================================================== --- stable/10/share/man/man7/ports.7 Mon Jun 9 22:09:03 2014 (r267308) +++ stable/10/share/man/man7/ports.7 Mon Jun 9 23:11:50 2014 (r267309) @@ -486,6 +486,44 @@ have been configured will have a uniquel single file .Pa options . .El +.Sh MAKE VARIABLES +The following list provides a name and short description for many of the +variables that are used when building ports. +More information on these and other related variables may be found in +.Pa ${PORTSDIR}/Mk/* +and the +.Fx +Porter's Handbook. +.Bl -tag -width ".Va OVERRIDE_LINUX_BASE_PORT" +.It Va WITH_OPENSSL_PORT +.Pq Vt bool +If set, causes ports that make use of OpenSSL to use the OpenSSL from +ports +.Pq if available +instead of the OpenSSL from the base system. +.It Va WITH_DEBUG +.Pq Vt bool +If set, debugging symbols are installed for ports binaries. +.It Va WITH_DEBUG_PORTS +A list of origins for which to set +.Va WITH_DEBUG_PORTS . +.It Va WITH_SSP_PORTS +.Pq Vt bool +If set, enables +.Fl fstack-protector +for most ports. +.It Va WITH_GHOSTSCRIPT_VER +If set, the version of ghostscript to be used by ports. +.It Va OVERRIDE_LINUX_BASE_PORT +The default linux base to use. +.It Va WITH_CCACHE_BUILD +.Pq Vt bool +If set, enables the use of +.Xr ccache 1 +for building ports. +.It Va CCACHE_DIR +Which directory to use for the ccache data. +.El .Sh FILES .Bl -tag -width ".Pa /usr/ports/Mk/bsd.port.mk" -compact .It Pa /usr/ports @@ -495,6 +533,7 @@ The big Kahuna. .El .Sh SEE ALSO .Xr make 1 , +.Xr make.conf 5 , .Xr pkg 8 , .Xr portsnap 8 .Pp From owner-svn-src-stable@FreeBSD.ORG Tue Jun 10 03:23:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3858CD60; Tue, 10 Jun 2014 03:23:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22F0620A5; Tue, 10 Jun 2014 03:23:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5A3Na66012534; Tue, 10 Jun 2014 03:23:36 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5A3NZlM012525; Tue, 10 Jun 2014 03:23:35 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201406100323.s5A3NZlM012525@svn.freebsd.org> From: Bryan Venteicher Date: Tue, 10 Jun 2014 03:23:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267312 - in stable/10/sys/dev/virtio: . pci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jun 2014 03:23:37 -0000 Author: bryanv Date: Tue Jun 10 03:23:35 2014 New Revision: 267312 URL: http://svnweb.freebsd.org/changeset/base/267312 Log: MFC r266951: Split the virtio.h header file into multiple files Reorganize the previous contexts of the file as it is in Linux. The eventual goal is to install the header files and share them between the kernel and bhyve. Added: stable/10/sys/dev/virtio/virtio_config.h - copied unchanged from r266951, head/sys/dev/virtio/virtio_config.h stable/10/sys/dev/virtio/virtio_ids.h - copied unchanged from r266951, head/sys/dev/virtio/virtio_ids.h Modified: stable/10/sys/dev/virtio/pci/virtio_pci.c stable/10/sys/dev/virtio/virtio.c stable/10/sys/dev/virtio/virtio.h stable/10/sys/dev/virtio/virtqueue.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/virtio/pci/virtio_pci.c ============================================================================== --- stable/10/sys/dev/virtio/pci/virtio_pci.c Tue Jun 10 01:38:02 2014 (r267311) +++ stable/10/sys/dev/virtio/pci/virtio_pci.c Tue Jun 10 03:23:35 2014 (r267312) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: stable/10/sys/dev/virtio/virtio.c ============================================================================== --- stable/10/sys/dev/virtio/virtio.c Tue Jun 10 01:38:02 2014 (r267311) +++ stable/10/sys/dev/virtio/virtio.c Tue Jun 10 03:23:35 2014 (r267312) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include "virtio_bus_if.h" Modified: stable/10/sys/dev/virtio/virtio.h ============================================================================== --- stable/10/sys/dev/virtio/virtio.h Tue Jun 10 01:38:02 2014 (r267311) +++ stable/10/sys/dev/virtio/virtio.h Tue Jun 10 03:23:35 2014 (r267312) @@ -1,29 +1,27 @@ /*- - * This header is BSD licensed so anyone can use the definitions to implement - * compatible drivers/servers. + * Copyright (c) 2014, Bryan Venteicher + * All rights reserved. * * 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. + * notice unmodified, 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. - * 3. Neither the name of IBM nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 IBM 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. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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. * * $FreeBSD$ */ @@ -31,44 +29,9 @@ #ifndef _VIRTIO_H_ #define _VIRTIO_H_ -struct vq_alloc_info; - -/* VirtIO device IDs. */ -#define VIRTIO_ID_NETWORK 0x01 -#define VIRTIO_ID_BLOCK 0x02 -#define VIRTIO_ID_CONSOLE 0x03 -#define VIRTIO_ID_ENTROPY 0x04 -#define VIRTIO_ID_BALLOON 0x05 -#define VIRTIO_ID_IOMEMORY 0x06 -#define VIRTIO_ID_SCSI 0x08 -#define VIRTIO_ID_9P 0x09 - -/* Status byte for guest to report progress. */ -#define VIRTIO_CONFIG_STATUS_RESET 0x00 -#define VIRTIO_CONFIG_STATUS_ACK 0x01 -#define VIRTIO_CONFIG_STATUS_DRIVER 0x02 -#define VIRTIO_CONFIG_STATUS_DRIVER_OK 0x04 -#define VIRTIO_CONFIG_STATUS_FAILED 0x80 - -/* - * Generate interrupt when the virtqueue ring is - * completely used, even if we've suppressed them. - */ -#define VIRTIO_F_NOTIFY_ON_EMPTY (1 << 24) - -/* - * The guest should never negotiate this feature; it - * is used to detect faulty drivers. - */ -#define VIRTIO_F_BAD_FEATURE (1 << 30) +#include -/* - * Some VirtIO feature bits (currently bits 28 through 31) are - * reserved for the transport being used (eg. virtio_ring), the - * rest are per-device feature bits. - */ -#define VIRTIO_TRANSPORT_F_START 28 -#define VIRTIO_TRANSPORT_F_END 32 +struct vq_alloc_info; /* * Each virtqueue indirect descriptor list must be physically contiguous. Copied: stable/10/sys/dev/virtio/virtio_config.h (from r266951, head/sys/dev/virtio/virtio_config.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/virtio/virtio_config.h Tue Jun 10 03:23:35 2014 (r267312, copy of r266951, head/sys/dev/virtio/virtio_config.h) @@ -0,0 +1,61 @@ +/*- + * This header is BSD licensed so anyone can use the definitions to implement + * compatible drivers/servers. + * + * 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. + * 3. Neither the name of IBM nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 IBM 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. + * + * $FreeBSD$ + */ + +#ifndef _VIRTIO_CONFIG_H_ +#define _VIRTIO_CONFIG_H_ + +/* Status byte for guest to report progress. */ +#define VIRTIO_CONFIG_STATUS_RESET 0x00 +#define VIRTIO_CONFIG_STATUS_ACK 0x01 +#define VIRTIO_CONFIG_STATUS_DRIVER 0x03 +#define VIRTIO_CONFIG_STATUS_DRIVER_OK 0x04 +#define VIRTIO_CONFIG_STATUS_FAILED 0x80 + +/* + * Generate interrupt when the virtqueue ring is + * completely used, even if we've suppressed them. + */ +#define VIRTIO_F_NOTIFY_ON_EMPTY (1 << 24) + +/* + * The guest should never negotiate this feature; it + * is used to detect faulty drivers. + */ +#define VIRTIO_F_BAD_FEATURE (1 << 30) + +/* + * Some VirtIO feature bits (currently bits 28 through 31) are + * reserved for the transport being used (eg. virtio_ring), the + * rest are per-device feature bits. + */ +#define VIRTIO_TRANSPORT_F_START 28 +#define VIRTIO_TRANSPORT_F_END 32 + +#endif /* _VIRTIO_CONFIG_H_ */ Copied: stable/10/sys/dev/virtio/virtio_ids.h (from r266951, head/sys/dev/virtio/virtio_ids.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/virtio/virtio_ids.h Tue Jun 10 03:23:35 2014 (r267312, copy of r266951, head/sys/dev/virtio/virtio_ids.h) @@ -0,0 +1,44 @@ +/*- + * This header is BSD licensed so anyone can use the definitions to implement + * compatible drivers/servers. + * + * 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. + * 3. Neither the name of IBM nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 IBM 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. + * + * $FreeBSD$ + */ + +#ifndef _VIRTIO_IDS_H_ +#define _VIRTIO_IDS_H_ + +/* VirtIO device IDs. */ +#define VIRTIO_ID_NETWORK 0x01 +#define VIRTIO_ID_BLOCK 0x02 +#define VIRTIO_ID_CONSOLE 0x03 +#define VIRTIO_ID_ENTROPY 0x04 +#define VIRTIO_ID_BALLOON 0x05 +#define VIRTIO_ID_IOMEMORY 0x06 +#define VIRTIO_ID_SCSI 0x08 +#define VIRTIO_ID_9P 0x09 + +#endif /* _VIRTIO_IDS_H_ */ Modified: stable/10/sys/dev/virtio/virtqueue.c ============================================================================== --- stable/10/sys/dev/virtio/virtqueue.c Tue Jun 10 01:38:02 2014 (r267311) +++ stable/10/sys/dev/virtio/virtqueue.c Tue Jun 10 03:23:35 2014 (r267312) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include From owner-svn-src-stable@FreeBSD.ORG Tue Jun 10 04:28:58 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C400EB9; Tue, 10 Jun 2014 04:28:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6875C253F; Tue, 10 Jun 2014 04:28:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5A4Sw4C041945; Tue, 10 Jun 2014 04:28:58 GMT (envelope-from bjk@svn.freebsd.org) Received: (from bjk@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5A4Swqg041943; Tue, 10 Jun 2014 04:28:58 GMT (envelope-from bjk@svn.freebsd.org) Message-Id: <201406100428.s5A4Swqg041943@svn.freebsd.org> From: Benjamin Kaduk Date: Tue, 10 Jun 2014 04:28:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267314 - in stable/9/share/man: man5 man7 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jun 2014 04:28:58 -0000 Author: bjk (doc committer) Date: Tue Jun 10 04:28:57 2014 New Revision: 267314 URL: http://svnweb.freebsd.org/changeset/base/267314 Log: MFC r266416: ------------------------------------------------------------------------ r266416 | bjk | 2014-05-18 17:05:54 -0400 (Sun, 18 May 2014) | 14 lines Document some user-settable make variables in ports.7 This is not a comprehensive list, as the variables themselves are spread out over multiple files, but it is a start. Add a section to make.conf noting that variables may be set there that affect ports builds, but refer to ports.7 and elsewhere for the actual listing; any listing in make.conf.5 would likely become out of date fairly quickly. PR: docs/189199 Reviewed by: bdrewery (previous version) Approved by: hrs (mentor) ------------------------------------------------------------------------ PR: 189199 Approved by: re (gjb), hrs (mentor) Modified: stable/9/share/man/man5/make.conf.5 stable/9/share/man/man7/ports.7 Directory Properties: stable/9/share/man/man5/ (props changed) stable/9/share/man/man7/ (props changed) Modified: stable/9/share/man/man5/make.conf.5 ============================================================================== --- stable/9/share/man/man5/make.conf.5 Tue Jun 10 03:29:15 2014 (r267313) +++ stable/9/share/man/man5/make.conf.5 Tue Jun 10 04:28:57 2014 (r267314) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 2, 2014 +.Dd May 17, 2014 .Dt MAKE.CONF 5 .Os .Sh NAME @@ -655,6 +655,14 @@ for simple printers, or for postscript or graphics printers with a ghostscript filter, or both. .El +.Ss "BUILDING PORTS" +Several make variables can be set that affect the building of ports. +These variables and their effects are documented in +.Xr ports 7 , +.Pa ${PORTSDIR}/Mk/* +and the +.Fx +Porter's Handbook. .Sh FILES .Bl -tag -width ".Pa /usr/share/examples/etc/make.conf" -compact .It Pa /etc/make.conf Modified: stable/9/share/man/man7/ports.7 ============================================================================== --- stable/9/share/man/man7/ports.7 Tue Jun 10 03:29:15 2014 (r267313) +++ stable/9/share/man/man7/ports.7 Tue Jun 10 04:28:57 2014 (r267314) @@ -486,6 +486,44 @@ have been configured will have a uniquel single file .Pa options . .El +.Sh MAKE VARIABLES +The following list provides a name and short description for many of the +variables that are used when building ports. +More information on these and other related variables may be found in +.Pa ${PORTSDIR}/Mk/* +and the +.Fx +Porter's Handbook. +.Bl -tag -width ".Va OVERRIDE_LINUX_BASE_PORT" +.It Va WITH_OPENSSL_PORT +.Pq Vt bool +If set, causes ports that make use of OpenSSL to use the OpenSSL from +ports +.Pq if available +instead of the OpenSSL from the base system. +.It Va WITH_DEBUG +.Pq Vt bool +If set, debugging symbols are installed for ports binaries. +.It Va WITH_DEBUG_PORTS +A list of origins for which to set +.Va WITH_DEBUG_PORTS . +.It Va WITH_SSP_PORTS +.Pq Vt bool +If set, enables +.Fl fstack-protector +for most ports. +.It Va WITH_GHOSTSCRIPT_VER +If set, the version of ghostscript to be used by ports. +.It Va OVERRIDE_LINUX_BASE_PORT +The default linux base to use. +.It Va WITH_CCACHE_BUILD +.Pq Vt bool +If set, enables the use of +.Xr ccache 1 +for building ports. +.It Va CCACHE_DIR +Which directory to use for the ccache data. +.El .Sh FILES .Bl -tag -width ".Pa /usr/ports/Mk/bsd.port.mk" -compact .It Pa /usr/ports @@ -495,6 +533,7 @@ The big Kahuna. .El .Sh SEE ALSO .Xr make 1 , +.Xr make.conf 5 , .Xr pkg 8 , .Xr portsnap 8 .Pp From owner-svn-src-stable@FreeBSD.ORG Tue Jun 10 04:44:29 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 365BB268; Tue, 10 Jun 2014 04:44:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22F9626A3; Tue, 10 Jun 2014 04:44:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5A4iTc8050740; Tue, 10 Jun 2014 04:44:29 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5A4iSek050739; Tue, 10 Jun 2014 04:44:28 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201406100444.s5A4iSek050739@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 10 Jun 2014 04:44:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267315 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jun 2014 04:44:29 -0000 Author: hselasky Date: Tue Jun 10 04:44:28 2014 New Revision: 267315 URL: http://svnweb.freebsd.org/changeset/base/267315 Log: MFC r267212: Make WITNESS happy by giving USB mutexes different names. Modified: stable/10/sys/dev/usb/controller/usb_controller.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/usb_controller.c ============================================================================== --- stable/10/sys/dev/usb/controller/usb_controller.c Tue Jun 10 04:28:57 2014 (r267314) +++ stable/10/sys/dev/usb/controller/usb_controller.c Tue Jun 10 04:44:28 2014 (r267315) @@ -898,10 +898,10 @@ usb_bus_mem_alloc_all(struct usb_bus *bu bus->alloc_failed = 0; mtx_init(&bus->bus_mtx, device_get_nameunit(bus->parent), - NULL, MTX_DEF | MTX_RECURSE); + "usb_def_mtx", MTX_DEF | MTX_RECURSE); mtx_init(&bus->bus_spin_lock, device_get_nameunit(bus->parent), - NULL, MTX_SPIN | MTX_RECURSE); + "usb_spin_mtx", MTX_SPIN | MTX_RECURSE); usb_callout_init_mtx(&bus->power_wdog, &bus->bus_mtx, 0); From owner-svn-src-stable@FreeBSD.ORG Tue Jun 10 09:33:58 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CA16F89A; Tue, 10 Jun 2014 09:33:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B42B72E67; Tue, 10 Jun 2014 09:33:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5A9XweH090071; Tue, 10 Jun 2014 09:33:58 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5A9XwW3090070; Tue, 10 Jun 2014 09:33:58 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201406100933.s5A9XwW3090070@svn.freebsd.org> From: Marius Strobl Date: Tue, 10 Jun 2014 09:33:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267322 - stable/9/sys/i386/conf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jun 2014 09:33:58 -0000 Author: marius Date: Tue Jun 10 09:33:58 2014 New Revision: 267322 URL: http://svnweb.freebsd.org/changeset/base/267322 Log: MFC: r266821 (partial) - Actually, modules are built correctly when compiled along the kernel as they then pick up an opt_global.h from KERNBUILDDIR having PAE defined. Thus, build all modules by default except those which still really are defective as of r267058. - Minor style cleanup. Approved by: re (glebius) Modified: stable/9/sys/i386/conf/PAE Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/i386/conf/PAE ============================================================================== --- stable/9/sys/i386/conf/PAE Tue Jun 10 08:20:00 2014 (r267321) +++ stable/9/sys/i386/conf/PAE Tue Jun 10 09:33:58 2014 (r267322) @@ -10,9 +10,8 @@ ident PAE-GENERIC # To make a PAE kernel, the next option is needed options PAE # Physical Address Extensions Kernel -# Don't build modules with this kernel config, since they are not built with -# the correct options headers. -makeoptions NO_MODULES=yes +# The following modules don't build with PAE enabled. +makeoptions WITHOUT_MODULES="ctl dpt hptmv ida malo mwl" # force isp firmware to fully loaded device ispfw @@ -23,7 +22,6 @@ device ispfw # address properly may cause data corruption when used in a machine with more # than 4 gigabytes of memory. - nodevice ahb nodevice amd nodevice sym From owner-svn-src-stable@FreeBSD.ORG Tue Jun 10 09:36:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7854DA1B; Tue, 10 Jun 2014 09:36:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 648922E81; Tue, 10 Jun 2014 09:36:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5A9aBJ1090452; Tue, 10 Jun 2014 09:36:11 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5A9aBHr090451; Tue, 10 Jun 2014 09:36:11 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201406100936.s5A9aBHr090451@svn.freebsd.org> From: Marius Strobl Date: Tue, 10 Jun 2014 09:36:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267323 - stable/9/sys/i386/conf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jun 2014 09:36:11 -0000 Author: marius Date: Tue Jun 10 09:36:10 2014 New Revision: 267323 URL: http://svnweb.freebsd.org/changeset/base/267323 Log: MFC: r266820 (partial) - Shrink the list of excluded modules to what actually still doesn't build as of r267058. - Some style cleanups. Approved by: re (glebius) Modified: stable/9/sys/i386/conf/XEN Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/i386/conf/XEN ============================================================================== --- stable/9/sys/i386/conf/XEN Tue Jun 10 09:33:58 2014 (r267322) +++ stable/9/sys/i386/conf/XEN Tue Jun 10 09:36:10 2014 (r267323) @@ -7,11 +7,12 @@ cpu I686_CPU ident XEN makeoptions DEBUG=-gdwarf-2 # Build kernel with gdb(1) debug symbols -makeoptions WITHOUT_MODULES="aha ahb amd ctl cxgb dpt drm drm2 hptnr hptmv ida malo mpr mps mwl nve rdma sound sym trm xfs" + +# The following modules don't build with PAE and XEN enabled. +makeoptions WITHOUT_MODULES="ctl dpt drm drm2 hptmv ida malo mwl rdma xfs" options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption -#options SCHED_4BSD options INET # InterNETworking options INET6 # IPv6 communications protocols @@ -65,7 +66,6 @@ options MCLSHIFT=12 options SMP # Symmetric MultiProcessor Kernel device apic # I/O APIC - #device atkbdc # AT keyboard controller #device atkbd # AT keyboard device psm # PS/2 mouse @@ -87,4 +87,3 @@ device faith # IPv6-to-IPv4 relaying ( # Be aware of the administrative consequences of enabling this! # Note that 'bpf' is required for DHCP. device bpf # Berkeley packet filter - From owner-svn-src-stable@FreeBSD.ORG Tue Jun 10 17:17:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2E406C30; Tue, 10 Jun 2014 17:17:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 01CC52CD3; Tue, 10 Jun 2014 17:17:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5AHHiXx012909; Tue, 10 Jun 2014 17:17:44 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5AHHiAR012908; Tue, 10 Jun 2014 17:17:44 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201406101717.s5AHHiAR012908@svn.freebsd.org> From: Luigi Rizzo Date: Tue, 10 Jun 2014 17:17:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267333 - stable/10/sys/dev/netmap X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jun 2014 17:17:45 -0000 Author: luigi Date: Tue Jun 10 17:17:44 2014 New Revision: 267333 URL: http://svnweb.freebsd.org/changeset/base/267333 Log: MFC 267328: change the netmap mbuf destructor so the same code works also on FreeBSD 9. For head and 10 this change has no effect, but on stable/9 it would cause panics when using emulated netmap on top of a standard device driver. MFC after: 3 days Modified: stable/10/sys/dev/netmap/netmap_generic.c Modified: stable/10/sys/dev/netmap/netmap_generic.c ============================================================================== --- stable/10/sys/dev/netmap/netmap_generic.c Tue Jun 10 17:05:41 2014 (r267332) +++ stable/10/sys/dev/netmap/netmap_generic.c Tue Jun 10 17:17:44 2014 (r267333) @@ -102,24 +102,30 @@ __FBSDID("$FreeBSD$"); * mbuf wrappers */ -/* mbuf destructor, also need to change the type to EXT_EXTREF, +/* + * mbuf destructor, also need to change the type to EXT_EXTREF, * add an M_NOFREE flag, and then clear the flag and * chain into uma_zfree(zone_pack, mf) * (or reinstall the buffer ?) + * + * On FreeBSD 9 the destructor is called as ext_free(ext_arg1, ext_arg2) + * whereas newer version have ext_free(m, ext_arg1, ext_arg2) + * For compatibility we set ext_arg1 = m on allocation so we have + * the same code on both. */ #define SET_MBUF_DESTRUCTOR(m, fn) do { \ - (m)->m_ext.ext_free = (void *)fn; \ - (m)->m_ext.ext_type = EXT_EXTREF; \ -} while (0) + (m)->m_ext.ext_free = (void *)fn; \ + (m)->m_ext.ext_type = EXT_EXTREF; \ + } while (0) static void -netmap_default_mbuf_destructor(struct mbuf *m) +netmap_default_mbuf_destructor(struct mbuf *m) { - /* restore original mbuf */ - m->m_ext.ext_buf = m->m_data = m->m_ext.ext_arg1; - m->m_ext.ext_arg1 = NULL; + /* restore original data pointer and type */ + m->m_ext.ext_buf = m->m_data = m->m_ext.ext_arg2; m->m_ext.ext_type = EXT_PACKET; m->m_ext.ext_free = NULL; + m->m_ext.ext_arg1 = m->m_ext.ext_arg2 = NULL; if (*(m->m_ext.ref_cnt) == 0) *(m->m_ext.ref_cnt) = 1; uma_zfree(zone_pack, m); @@ -131,7 +137,8 @@ netmap_get_mbuf(int len) struct mbuf *m; m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR | M_NOFREE); if (m) { - m->m_ext.ext_arg1 = m->m_ext.ext_buf; // XXX save + m->m_ext.ext_arg1 = m; /* FreeBSD 9 compat */ + m->m_ext.ext_arg2 = m->m_ext.ext_buf; /* save original */ m->m_ext.ext_free = (void *)netmap_default_mbuf_destructor; m->m_ext.ext_type = EXT_EXTREF; ND(5, "create m %p refcnt %d", m, *m->m_ext.ref_cnt); From owner-svn-src-stable@FreeBSD.ORG Tue Jun 10 17:24:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 63F2826C; Tue, 10 Jun 2014 17:24:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44D932DA0; Tue, 10 Jun 2014 17:24:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5AHOlfL017270; Tue, 10 Jun 2014 17:24:47 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5AHOlmQ017269; Tue, 10 Jun 2014 17:24:47 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201406101724.s5AHOlmQ017269@svn.freebsd.org> From: Luigi Rizzo Date: Tue, 10 Jun 2014 17:24:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267334 - stable/10/sys/dev/netmap X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jun 2014 17:24:47 -0000 Author: luigi Date: Tue Jun 10 17:24:46 2014 New Revision: 267334 URL: http://svnweb.freebsd.org/changeset/base/267334 Log: MFC 267284 Fixes from Fanco Ficthner on transparent mode * The way rings are updated changed with the last API bump. Also sync ->head when moving slots in netmap_sw_to_nic(). * Remove a crashing selrecord() call. * Unclog the logic surrounding netmap_rxsync_from_host(). * Add timestamping to RX host ring. * Remove a couple of obsolete comments. Submitted by: Franco Fichtner MFC after: 3 days Sponsored by: Packetwerk Modified: stable/10/sys/dev/netmap/netmap.c Modified: stable/10/sys/dev/netmap/netmap.c ============================================================================== --- stable/10/sys/dev/netmap/netmap.c Tue Jun 10 17:17:44 2014 (r267333) +++ stable/10/sys/dev/netmap/netmap.c Tue Jun 10 17:24:46 2014 (r267334) @@ -981,7 +981,7 @@ netmap_sw_to_nic(struct netmap_adapter * dst->len = tmp.len; dst->flags = NS_BUF_CHANGED; - rdst->cur = nm_next(dst_cur, dst_lim); + rdst->head = rdst->cur = nm_next(dst_cur, dst_lim); } /* if (sent) XXX txsync ? */ } @@ -1028,11 +1028,6 @@ netmap_txsync_to_host(struct netmap_adap * They have been put in kring->rx_queue by netmap_transmit(). * We protect access to the kring using kring->rx_queue.lock * - * This routine also does the selrecord if called from the poll handler - * (we know because td != NULL). - * - * NOTE: on linux, selrecord() is defined as a macro and uses pwait - * as an additional hidden argument. * returns the number of packets delivered to tx queues in * transparent mode, or a negative value if error */ @@ -1088,10 +1083,6 @@ netmap_rxsync_from_host(struct netmap_ad nm_rxsync_finalize(kring); - /* access copies of cur,tail in the kring */ - if (kring->rcur == kring->rtail && td) /* no bufs available */ - selrecord(td, &kring->si); - mbq_unlock(q); return ret; } @@ -2124,8 +2115,6 @@ do_retry_rx: /* * transparent mode support: collect packets * from the rxring(s). - * XXX NR_FORWARD should only be read on - * physical or NIC ports */ if (netmap_fwd ||kring->ring->flags & NR_FORWARD) { ND(10, "forwarding some buffers up %d to %d", @@ -2152,13 +2141,12 @@ do_retry_rx: /* transparent mode XXX only during first pass ? */ if (na->na_flags & NAF_HOST_RINGS) { kring = &na->rx_rings[na->num_rx_rings]; - if (check_all_rx - && (netmap_fwd || kring->ring->flags & NR_FORWARD)) { - /* XXX fix to use kring fields */ - if (nm_ring_empty(kring->ring)) - send_down = netmap_rxsync_from_host(na, td, dev); - if (!nm_ring_empty(kring->ring)) - revents |= want_rx; + if (netmap_fwd || kring->ring->flags & NR_FORWARD) { + send_down = netmap_rxsync_from_host(na, td, dev); + if (send_down && (netmap_no_timestamp == 0 || + kring->ring->flags & NR_TIMESTAMP)) { + microtime(&kring->ring->ts); + } } } From owner-svn-src-stable@FreeBSD.ORG Tue Jun 10 19:00:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BBA0B820; Tue, 10 Jun 2014 19:00:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C7F027E0; Tue, 10 Jun 2014 19:00:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5AJ0EKs060232; Tue, 10 Jun 2014 19:00:14 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5AJ0EgH060231; Tue, 10 Jun 2014 19:00:14 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406101900.s5AJ0EgH060231@svn.freebsd.org> From: John Baldwin Date: Tue, 10 Jun 2014 19:00:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267339 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jun 2014 19:00:14 -0000 Author: jhb Date: Tue Jun 10 19:00:14 2014 New Revision: 267339 URL: http://svnweb.freebsd.org/changeset/base/267339 Log: MFC 261000,261785,263238,263322,264302: Various AHCI fixes: - Fix issue with stale fields from a recycled request pulled off the freelist. - Provide an indication a "PIO Setup Device to Host FIS" occurred while executing the IDENTIFY DEVICE and IDENTIFY PACKET DEVICE commands. - Provide an indication a "D2H Register FIS" occurred during a SET FEATURES command. - Though there currently isn't a way to insert new media into an ATAPI drive, at least pretend to support Asynchronous Notification (AN) to avoid a guest needlessly polling for it. - Don't reissue in-flight commands. - Constrain the amount of data returned to what is actually available not the size of the buffer. Modified: stable/10/usr.sbin/bhyve/pci_ahci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_ahci.c Tue Jun 10 18:46:00 2014 (r267338) +++ stable/10/usr.sbin/bhyve/pci_ahci.c Tue Jun 10 19:00:14 2014 (r267339) @@ -95,6 +95,13 @@ enum sata_fis_type { #define MODEPAGE_CD_CAPABILITIES 0x2A /* + * ATA commands + */ +#define ATA_SF_ENAB_SATA_SF 0x10 +#define ATA_SATA_SF_AN 0x05 +#define ATA_SF_DIS_SATA_SF 0x90 + +/* * Debug printf */ #ifdef AHCI_DEBUG @@ -127,6 +134,7 @@ struct ahci_port { uint8_t xfermode; uint8_t sense_key; uint8_t asc; + uint32_t pending; uint32_t clb; uint32_t clbu; @@ -254,6 +262,16 @@ ahci_write_fis(struct ahci_port *p, enum } static void +ahci_write_fis_piosetup(struct ahci_port *p) +{ + uint8_t fis[20]; + + memset(fis, 0, sizeof(fis)); + fis[0] = FIS_TYPE_PIOSETUP; + ahci_write_fis(p, FIS_TYPE_PIOSETUP, fis); +} + +static void ahci_write_fis_sdb(struct ahci_port *p, int slot, uint32_t tfd) { uint8_t fis[8]; @@ -454,6 +472,10 @@ ahci_handle_dma(struct ahci_port *p, int if (iovcnt > BLOCKIF_IOV_MAX) { aior->prdtl = iovcnt - BLOCKIF_IOV_MAX; iovcnt = BLOCKIF_IOV_MAX; + /* + * Mark this command in-flight. + */ + p->pending |= 1 << slot; } else aior->prdtl = 0; breq->br_iovcnt = iovcnt; @@ -477,7 +499,7 @@ ahci_handle_dma(struct ahci_port *p, int err = blockif_write(p->bctx, breq); assert(err == 0); - if (!aior->prdtl && ncq) + if (ncq) p->ci &= ~(1 << slot); } @@ -497,6 +519,8 @@ ahci_handle_flush(struct ahci_port *p, i aior->cfis = cfis; aior->slot = slot; aior->len = 0; + aior->done = 0; + aior->prdtl = 0; breq = &aior->io_req; err = blockif_flush(p->bctx, breq); @@ -519,12 +543,14 @@ write_prdt(struct ahci_port *p, int slot for (i = 0; i < hdr->prdtl && len; i++) { uint8_t *ptr; uint32_t dbcsz; + int sublen; dbcsz = (prdt->dbc & DBCMASK) + 1; ptr = paddr_guest2host(ahci_ctx(p->pr_sc), prdt->dba, dbcsz); - memcpy(ptr, from, dbcsz); - len -= dbcsz; - from += dbcsz; + sublen = len < dbcsz ? len : dbcsz; + memcpy(ptr, from, sublen); + len -= sublen; + from += sublen; prdt++; } hdr->prdbc = size - len; @@ -585,6 +611,7 @@ handle_identify(struct ahci_port *p, int buf[101] = (sectors >> 16); buf[102] = (sectors >> 32); buf[103] = (sectors >> 48); + ahci_write_fis_piosetup(p); write_prdt(p, slot, cfis, (void *)buf, sizeof(buf)); p->tfd = ATA_S_DSC | ATA_S_READY; p->is |= AHCI_P_IX_DP; @@ -627,6 +654,7 @@ handle_atapi_identify(struct ahci_port * buf[85] = (1 << 4); buf[87] = (1 << 14); buf[88] = (1 << 14 | 0x7f); + ahci_write_fis_piosetup(p); write_prdt(p, slot, cfis, (void *)buf, sizeof(buf)); p->tfd = ATA_S_DSC | ATA_S_READY; p->is |= AHCI_P_IX_DHR; @@ -1155,6 +1183,17 @@ ahci_handle_cmd(struct ahci_port *p, int case ATA_SETFEATURES: { switch (cfis[3]) { + case ATA_SF_ENAB_SATA_SF: + switch (cfis[12]) { + case ATA_SATA_SF_AN: + p->tfd = ATA_S_DSC | ATA_S_READY; + break; + default: + p->tfd = ATA_S_ERROR | ATA_S_READY; + p->tfd |= (ATA_ERROR_ABORT << 8); + break; + } + break; case ATA_SF_ENAB_WCACHE: case ATA_SF_DIS_WCACHE: case ATA_SF_ENAB_RCACHE: @@ -1180,9 +1219,7 @@ ahci_handle_cmd(struct ahci_port *p, int p->tfd |= (ATA_ERROR_ABORT << 8); break; } - p->is |= AHCI_P_IX_DP; - p->ci &= ~(1 << slot); - ahci_generate_intr(p->pr_sc); + ahci_write_fis_d2h(p, slot, cfis, p->tfd); break; } case ATA_SET_MULTI: @@ -1297,8 +1334,12 @@ ahci_handle_port(struct ahci_port *p) if (!(p->cmd & AHCI_P_CMD_ST)) return; + /* + * Search for any new commands to issue ignoring those that + * are already in-flight. + */ for (i = 0; (i < 32) && p->ci; i++) { - if (p->ci & (1 << i)) + if ((p->ci & (1 << i)) && !(p->pending & (1 << i))) ahci_handle_slot(p, i); } } @@ -1359,6 +1400,11 @@ ata_ioreq_cb(struct blockif_req *br, int p->serr |= (1 << slot); } + /* + * This command is now complete. + */ + p->pending &= ~(1 << slot); + if (ncq) { p->sact &= ~(1 << slot); ahci_write_fis_sdb(p, slot, tfd); From owner-svn-src-stable@FreeBSD.ORG Tue Jun 10 21:20:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9C05E809; Tue, 10 Jun 2014 21:20:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87FC12437; Tue, 10 Jun 2014 21:20:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5ALKc5S025439; Tue, 10 Jun 2014 21:20:38 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5ALKbG5025433; Tue, 10 Jun 2014 21:20:37 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406102120.s5ALKbG5025433@svn.freebsd.org> From: John Baldwin Date: Tue, 10 Jun 2014 21:20:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267341 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jun 2014 21:20:38 -0000 Author: jhb Date: Tue Jun 10 21:20:37 2014 New Revision: 267341 URL: http://svnweb.freebsd.org/changeset/base/267341 Log: MFC 261217: Remove support for legacy PCI devices. These haven't been needed since support for LPC uart devices was added and it conflicts with upcoming patches to add PCI INTx support. Approved by: grehan Modified: stable/10/usr.sbin/bhyve/bhyve.8 stable/10/usr.sbin/bhyve/bhyverun.c stable/10/usr.sbin/bhyve/pci_emul.c stable/10/usr.sbin/bhyve/pci_emul.h stable/10/usr.sbin/bhyve/pci_uart.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/bhyve.8 ============================================================================== --- stable/10/usr.sbin/bhyve/bhyve.8 Tue Jun 10 20:25:45 2014 (r267340) +++ stable/10/usr.sbin/bhyve/bhyve.8 Tue Jun 10 21:20:37 2014 (r267341) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 12, 2013 +.Dd January 27, 2014 .Dt BHYVE 8 .Os .Sh NAME @@ -37,7 +37,6 @@ .Op Fl g Ar gdbport .Op Fl p Ar pinnedcpu .Op Fl s Ar slot,emulation Ns Op , Ns Ar conf -.Op Fl S Ar slot,emulation Ns Op , Ns Ar conf .Op Fl l Ar lpcdev Ns Op , Ns Ar conf .Ar vmname .Sh DESCRIPTION @@ -202,13 +201,6 @@ The host device must have been reserved loader variable as described in .Xr vmm 4 . .El -.It Fl S Ar slot , Ns Ar emulation Ns Op , Ns Ar conf -Identical to the -s option except the device is instructed to use legacy -ISA addresses if possible. -Currently this only has an effect with the -.Li uart -device emulation. -This option will be deprecated in a future version. .It Fl l Ar lpcdev Ns Op , Ns Ar conf Allow devices behind the LPC PCI-ISA bridge to be configured. The only supported devices are the TTY-class devices, Modified: stable/10/usr.sbin/bhyve/bhyverun.c ============================================================================== --- stable/10/usr.sbin/bhyve/bhyverun.c Tue Jun 10 20:25:45 2014 (r267340) +++ stable/10/usr.sbin/bhyve/bhyverun.c Tue Jun 10 21:20:37 2014 (r267341) @@ -124,7 +124,7 @@ usage(int code) { fprintf(stderr, - "Usage: %s [-aehwAHIPW] [-g ] [-s ] [-S ]\n" + "Usage: %s [-aehwAHIPW] [-g ] [-s ]\n" " %*s [-c vcpus] [-p pincpu] [-m mem] [-l ] \n" " -a: local apic is in XAPIC mode (default is X2APIC)\n" " -A: create an ACPI table\n" @@ -137,7 +137,6 @@ usage(int code) " -e: exit on unhandled I/O access\n" " -h: help\n" " -s: PCI slot config\n" - " -S: legacy PCI slot config\n" " -l: LPC device configuration\n" " -m: memory size in MB\n" " -w: ignore unimplemented MSRs\n", @@ -599,7 +598,7 @@ main(int argc, char *argv[]) guest_ncpus = 1; memsize = 256 * MB; - while ((c = getopt(argc, argv, "abehwAHIPWp:g:c:s:S:m:l:")) != -1) { + while ((c = getopt(argc, argv, "abehwAHIPWp:g:c:s:m:l:")) != -1) { switch (c) { case 'a': disable_x2apic = 1; @@ -626,12 +625,7 @@ main(int argc, char *argv[]) } break; case 's': - if (pci_parse_slot(optarg, 0) != 0) - exit(1); - else - break; - case 'S': - if (pci_parse_slot(optarg, 1) != 0) + if (pci_parse_slot(optarg) != 0) exit(1); else break; Modified: stable/10/usr.sbin/bhyve/pci_emul.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_emul.c Tue Jun 10 20:25:45 2014 (r267340) +++ stable/10/usr.sbin/bhyve/pci_emul.c Tue Jun 10 21:20:37 2014 (r267341) @@ -75,7 +75,6 @@ static struct slotinfo { char *si_name; char *si_param; struct pci_devinst *si_devi; - int si_legacy; } pci_slotinfo[MAXSLOTS][MAXFUNCS]; SET_DECLARE(pci_devemu_set, struct pci_devemu); @@ -123,7 +122,7 @@ pci_parse_slot_usage(char *aopt) } int -pci_parse_slot(char *opt, int legacy) +pci_parse_slot(char *opt) { char *slot, *func, *emul, *config; char *str, *cpy; @@ -170,7 +169,6 @@ pci_parse_slot(char *opt, int legacy) error = 0; pci_slotinfo[snum][fnum].si_name = emul; pci_slotinfo[snum][fnum].si_param = config; - pci_slotinfo[snum][fnum].si_legacy = legacy; done: if (error) @@ -521,13 +519,7 @@ pci_emul_alloc_pbar(struct pci_devinst * addr = mask = lobits = 0; break; case PCIBAR_IO: - if (hostbase && - pci_slotinfo[pdi->pi_slot][pdi->pi_func].si_legacy) { - assert(hostbase < PCI_EMUL_IOBASE); - baseptr = &hostbase; - } else { - baseptr = &pci_emul_iobase; - } + baseptr = &pci_emul_iobase; limit = PCI_EMUL_IOLIMIT; mask = PCIM_BAR_IO_BASE; lobits = PCIM_BAR_IO_SPACE; @@ -1185,13 +1177,6 @@ pci_generate_msi(struct pci_devinst *pi, } int -pci_is_legacy(struct pci_devinst *pi) -{ - - return (pci_slotinfo[pi->pi_slot][pi->pi_func].si_legacy); -} - -int pci_lintr_request(struct pci_devinst *pi, int req) { int irq; Modified: stable/10/usr.sbin/bhyve/pci_emul.h ============================================================================== --- stable/10/usr.sbin/bhyve/pci_emul.h Tue Jun 10 20:25:45 2014 (r267340) +++ stable/10/usr.sbin/bhyve/pci_emul.h Tue Jun 10 21:20:37 2014 (r267341) @@ -199,7 +199,6 @@ int pci_emul_alloc_pbar(struct pci_devin uint64_t hostbase, enum pcibar_type type, uint64_t size); int pci_emul_add_msicap(struct pci_devinst *pi, int msgnum); int pci_emul_add_pciecap(struct pci_devinst *pi, int pcie_device_type); -int pci_is_legacy(struct pci_devinst *pi); void pci_generate_msi(struct pci_devinst *pi, int msgnum); void pci_generate_msix(struct pci_devinst *pi, int msgnum); void pci_lintr_assert(struct pci_devinst *pi); @@ -210,7 +209,7 @@ int pci_msix_enabled(struct pci_devinst int pci_msix_table_bar(struct pci_devinst *pi); int pci_msix_pba_bar(struct pci_devinst *pi); int pci_msi_msgnum(struct pci_devinst *pi); -int pci_parse_slot(char *opt, int legacy); +int pci_parse_slot(char *opt); void pci_populate_msicap(struct msicap *cap, int msgs, int nextptr); int pci_emul_add_msixcap(struct pci_devinst *pi, int msgnum, int barnum); int pci_emul_msix_twrite(struct pci_devinst *pi, uint64_t offset, int size, Modified: stable/10/usr.sbin/bhyve/pci_uart.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_uart.c Tue Jun 10 20:25:45 2014 (r267340) +++ stable/10/usr.sbin/bhyve/pci_uart.c Tue Jun 10 21:20:37 2014 (r267341) @@ -85,28 +85,13 @@ pci_uart_read(struct vmctx *ctx, int vcp return (val); } -static int pci_uart_nldevs; /* number of legacy uart ports allocated */ - static int pci_uart_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts) { struct uart_softc *sc; - int ioaddr, ivec; - if (pci_is_legacy(pi)) { - if (uart_legacy_alloc(pci_uart_nldevs, &ioaddr, &ivec) != 0) { - fprintf(stderr, "Unable to allocate resources for " - "legacy COM%d port at pci device %d:%d\n", - pci_uart_nldevs + 1, pi->pi_slot, pi->pi_func); - return (-1); - } - pci_uart_nldevs++; - pci_emul_alloc_pbar(pi, 0, ioaddr, PCIBAR_IO, UART_IO_BAR_SIZE); - } else { - ivec = -1; - pci_emul_alloc_bar(pi, 0, PCIBAR_IO, UART_IO_BAR_SIZE); - } - pci_lintr_request(pi, ivec); + pci_emul_alloc_bar(pi, 0, PCIBAR_IO, UART_IO_BAR_SIZE); + pci_lintr_request(pi, -1); /* initialize config space */ pci_set_cfgdata16(pi, PCIR_DEVICE, COM_DEV); From owner-svn-src-stable@FreeBSD.ORG Tue Jun 10 21:23:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 05BC5986; Tue, 10 Jun 2014 21:23:26 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CCDFF24CC; Tue, 10 Jun 2014 21:23:25 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id CBF34B94A; Tue, 10 Jun 2014 17:23:23 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Subject: Re: svn commit: r267341 - stable/10/usr.sbin/bhyve Date: Tue, 10 Jun 2014 17:23:18 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: <201406102120.s5ALKbG5025433@svn.freebsd.org> In-Reply-To: <201406102120.s5ALKbG5025433@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201406101723.18610.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 10 Jun 2014 17:23:23 -0400 (EDT) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jun 2014 21:23:26 -0000 On Tuesday, June 10, 2014 5:20:37 pm John Baldwin wrote: > Author: jhb > Date: Tue Jun 10 21:20:37 2014 > New Revision: 267341 > URL: http://svnweb.freebsd.org/changeset/base/267341 > > Log: > MFC 261217: > Remove support for legacy PCI devices. These haven't been needed since > support for LPC uart devices was added and it conflicts with upcoming > patches to add PCI INTx support. > > Approved by: grehan Note that this is a user-visible change (bhyve -S no longer works), but this option was already documented as being subject to removal in the old manual page. This hack has also not been needed for a long time. -- John Baldwin From owner-svn-src-stable@FreeBSD.ORG Tue Jun 10 22:36:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3E1A7395; Tue, 10 Jun 2014 22:36:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2AB0F2AB1; Tue, 10 Jun 2014 22:36:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5AMa2rE061943; Tue, 10 Jun 2014 22:36:02 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5AMa22C061942; Tue, 10 Jun 2014 22:36:02 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201406102236.s5AMa22C061942@svn.freebsd.org> From: Rick Macklem Date: Tue, 10 Jun 2014 22:36:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267343 - stable/10/sys/fs/nfsserver X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jun 2014 22:36:02 -0000 Author: rmacklem Date: Tue Jun 10 22:36:01 2014 New Revision: 267343 URL: http://svnweb.freebsd.org/changeset/base/267343 Log: MFC: r267191 The new NFS server would not allow a hard link to be created to a symlink. This restriction (which was inherited from OpenBSD) is not required by the NFS RFCs. Since this is allowed by the old NFS server, it is a POLA violation to not allow it. This patch modifies the new NFS server to allow this. Modified: stable/10/sys/fs/nfsserver/nfs_nfsdserv.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsserver/nfs_nfsdserv.c ============================================================================== --- stable/10/sys/fs/nfsserver/nfs_nfsdserv.c Tue Jun 10 21:40:43 2014 (r267342) +++ stable/10/sys/fs/nfsserver/nfs_nfsdserv.c Tue Jun 10 22:36:01 2014 (r267343) @@ -1620,13 +1620,6 @@ nfsrvd_link(struct nfsrv_descript *nd, i nd->nd_repstat = NFSERR_INVAL; if (tovp) vrele(tovp); - } else if (vnode_vtype(vp) == VLNK) { - if (nd->nd_flag & ND_NFSV2) - nd->nd_repstat = NFSERR_INVAL; - else - nd->nd_repstat = NFSERR_NOTSUPP; - if (tovp) - vrele(tovp); } if (!nd->nd_repstat) { if (nd->nd_flag & ND_NFSV4) { From owner-svn-src-stable@FreeBSD.ORG Wed Jun 11 03:59:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F423284; Wed, 11 Jun 2014 03:59:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B5B42362; Wed, 11 Jun 2014 03:59:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5B3xFha008954; Wed, 11 Jun 2014 03:59:15 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5B3xFQI008953; Wed, 11 Jun 2014 03:59:15 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201406110359.s5B3xFQI008953@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 11 Jun 2014 03:59:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267346 - stable/10/sys/fs/tmpfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jun 2014 03:59:15 -0000 Author: kib Date: Wed Jun 11 03:59:14 2014 New Revision: 267346 URL: http://svnweb.freebsd.org/changeset/base/267346 Log: MFC r267060: Allow shared locking for the tmpfs vnode. Modified: stable/10/sys/fs/tmpfs/tmpfs_subr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- stable/10/sys/fs/tmpfs/tmpfs_subr.c Tue Jun 10 23:22:17 2014 (r267345) +++ stable/10/sys/fs/tmpfs/tmpfs_subr.c Wed Jun 11 03:59:14 2014 (r267346) @@ -595,6 +595,8 @@ loop1: default: panic("tmpfs_alloc_vp: type %p %d", node, (int)node->tn_type); } + if (vp->v_type != VFIFO) + VN_LOCK_ASHARE(vp); error = insmntque1(vp, mp, tmpfs_insmntque_dtr, NULL); if (error) From owner-svn-src-stable@FreeBSD.ORG Wed Jun 11 05:39:10 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E453F33; Wed, 11 Jun 2014 05:39:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F1E42A63; Wed, 11 Jun 2014 05:39:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5B5dAo4053715; Wed, 11 Jun 2014 05:39:10 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5B5d8Wi053705; Wed, 11 Jun 2014 05:39:08 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201406110539.s5B5d8Wi053705@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 11 Jun 2014 05:39:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267347 - in stable/10/sys/dev/usb: . controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jun 2014 05:39:10 -0000 Author: hselasky Date: Wed Jun 11 05:39:08 2014 New Revision: 267347 URL: http://svnweb.freebsd.org/changeset/base/267347 Log: MFC r267240: Resolve a deadlock setting the USB configuration index from userspace on USB HUBs by moving the code into the USB explore threads. The deadlock happens because child devices of the USB HUB don't have the expected reference count when called from outside the explore thread. Only the HUB device itself, which the IOCTL interface locks, gets the correct reference count. Modified: stable/10/sys/dev/usb/controller/usb_controller.c stable/10/sys/dev/usb/usb_dev.c stable/10/sys/dev/usb/usb_device.h stable/10/sys/dev/usb/usb_generic.c stable/10/sys/dev/usb/usb_hub.c stable/10/sys/dev/usb/usb_hub.h stable/10/sys/dev/usb/usbdi.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/usb_controller.c ============================================================================== --- stable/10/sys/dev/usb/controller/usb_controller.c Wed Jun 11 03:59:14 2014 (r267346) +++ stable/10/sys/dev/usb/controller/usb_controller.c Wed Jun 11 05:39:08 2014 (r267347) @@ -366,7 +366,13 @@ usb_bus_explore(struct usb_proc_msg *pm) if (bus->no_explore != 0) return; - if (udev && udev->hub) { + if (udev != NULL) { + USB_BUS_UNLOCK(bus); + uhub_explore_handle_re_enumerate(udev); + USB_BUS_LOCK(bus); + } + + if (udev != NULL && udev->hub != NULL) { if (bus->do_probe) { bus->do_probe = 0; Modified: stable/10/sys/dev/usb/usb_dev.c ============================================================================== --- stable/10/sys/dev/usb/usb_dev.c Wed Jun 11 03:59:14 2014 (r267346) +++ stable/10/sys/dev/usb/usb_dev.c Wed Jun 11 05:39:08 2014 (r267347) @@ -1116,9 +1116,14 @@ usb_ioctl(struct cdev *dev, u_long cmd, usb_pause_mtx(NULL, hz / 128); - if (usb_ref_device(cpd, &refs, 1 /* need uref */)) { - err = ENXIO; - goto done; + while (usb_ref_device(cpd, &refs, 1 /* need uref */)) { + if (usb_ref_device(cpd, &refs, 0)) { + /* device no longer exits */ + err = ENXIO; + goto done; + } + usb_unref_device(cpd, &refs); + usb_pause_mtx(NULL, hz / 128); } } Modified: stable/10/sys/dev/usb/usb_device.h ============================================================================== --- stable/10/sys/dev/usb/usb_device.h Wed Jun 11 03:59:14 2014 (r267346) +++ stable/10/sys/dev/usb/usb_device.h Wed Jun 11 05:39:08 2014 (r267347) @@ -228,6 +228,7 @@ struct usb_device { uint8_t address; /* device addess */ uint8_t device_index; /* device index in "bus->devices" */ uint8_t controller_slot_id; /* controller specific value */ + uint8_t next_config_index; /* used by USB_RE_ENUM_SET_CONFIG */ uint8_t curr_config_index; /* current configuration index */ uint8_t curr_config_no; /* current configuration number */ uint8_t depth; /* distance from root HUB */ @@ -241,6 +242,7 @@ struct usb_device { #define USB_RE_ENUM_DONE 0 #define USB_RE_ENUM_START 1 #define USB_RE_ENUM_PWR_OFF 2 +#define USB_RE_ENUM_SET_CONFIG 3 uint8_t ifaces_max; /* number of interfaces present */ uint8_t endpoints_max; /* number of endpoints present */ Modified: stable/10/sys/dev/usb/usb_generic.c ============================================================================== --- stable/10/sys/dev/usb/usb_generic.c Wed Jun 11 03:59:14 2014 (r267346) +++ stable/10/sys/dev/usb/usb_generic.c Wed Jun 11 05:39:08 2014 (r267347) @@ -616,24 +616,17 @@ ugen_set_config(struct usb_fifo *f, uint /* not possible in device side mode */ return (ENOTTY); } - if (f->udev->curr_config_index == index) { - /* no change needed */ - return (0); - } + /* make sure all FIFO's are gone */ /* else there can be a deadlock */ if (ugen_fs_uninit(f)) { /* ignore any errors */ DPRINTFN(6, "no FIFOs\n"); } - /* change setting - will free generic FIFOs, if any */ - if (usbd_set_config_index(f->udev, index)) { - return (EIO); - } - /* probe and attach */ - if (usb_probe_and_attach(f->udev, USB_IFACE_INDEX_ANY)) { + + if (usbd_start_set_config(f->udev, index) != 0) return (EIO); - } + return (0); } @@ -970,11 +963,6 @@ ugen_re_enumerate(struct usb_fifo *f) DPRINTFN(6, "device mode\n"); return (ENOTTY); } - if (udev->parent_hub == NULL) { - /* the root HUB cannot be re-enumerated */ - DPRINTFN(6, "cannot reset root HUB\n"); - return (EINVAL); - } /* make sure all FIFO's are gone */ /* else there can be a deadlock */ if (ugen_fs_uninit(f)) { Modified: stable/10/sys/dev/usb/usb_hub.c ============================================================================== --- stable/10/sys/dev/usb/usb_hub.c Wed Jun 11 03:59:14 2014 (r267346) +++ stable/10/sys/dev/usb/usb_hub.c Wed Jun 11 05:39:08 2014 (r267347) @@ -427,6 +427,86 @@ done: return (retval); } +void +uhub_explore_handle_re_enumerate(struct usb_device *child) +{ + uint8_t do_unlock; + usb_error_t err; + + /* check if device should be re-enumerated */ + if (child->flags.usb_mode != USB_MODE_HOST) + return; + + do_unlock = usbd_enum_lock(child); + switch (child->re_enumerate_wait) { + case USB_RE_ENUM_START: + err = usbd_set_config_index(child, + USB_UNCONFIG_INDEX); + if (err != 0) { + DPRINTF("Unconfigure failed: %s: Ignored.\n", + usbd_errstr(err)); + } + if (child->parent_hub == NULL) { + /* the root HUB cannot be re-enumerated */ + DPRINTFN(6, "cannot reset root HUB\n"); + err = 0; + } else { + err = usbd_req_re_enumerate(child, NULL); + } + if (err == 0) + err = usbd_set_config_index(child, 0); + if (err == 0) { + err = usb_probe_and_attach(child, + USB_IFACE_INDEX_ANY); + } + child->re_enumerate_wait = USB_RE_ENUM_DONE; + break; + + case USB_RE_ENUM_PWR_OFF: + /* get the device unconfigured */ + err = usbd_set_config_index(child, + USB_UNCONFIG_INDEX); + if (err) { + DPRINTFN(0, "Could not unconfigure " + "device (ignored)\n"); + } + if (child->parent_hub == NULL) { + /* the root HUB cannot be re-enumerated */ + DPRINTFN(6, "cannot set port feature\n"); + err = 0; + } else { + /* clear port enable */ + err = usbd_req_clear_port_feature(child->parent_hub, + NULL, child->port_no, UHF_PORT_ENABLE); + if (err) { + DPRINTFN(0, "Could not disable port " + "(ignored)\n"); + } + } + child->re_enumerate_wait = USB_RE_ENUM_DONE; + break; + + case USB_RE_ENUM_SET_CONFIG: + err = usbd_set_config_index(child, + child->next_config_index); + if (err != 0) { + DPRINTF("Configure failed: %s: Ignored.\n", + usbd_errstr(err)); + } else { + err = usb_probe_and_attach(child, + USB_IFACE_INDEX_ANY); + } + child->re_enumerate_wait = USB_RE_ENUM_DONE; + break; + + default: + child->re_enumerate_wait = USB_RE_ENUM_DONE; + break; + } + if (do_unlock) + usbd_enum_unlock(child); +} + /*------------------------------------------------------------------------* * uhub_explore_sub - subroutine * @@ -455,59 +535,7 @@ uhub_explore_sub(struct uhub_softc *sc, goto done; } - /* check if device should be re-enumerated */ - - if (child->flags.usb_mode == USB_MODE_HOST) { - uint8_t do_unlock; - - do_unlock = usbd_enum_lock(child); - switch (child->re_enumerate_wait) { - case USB_RE_ENUM_START: - err = usbd_set_config_index(child, - USB_UNCONFIG_INDEX); - if (err != 0) { - DPRINTF("Unconfigure failed: " - "%s: Ignored.\n", - usbd_errstr(err)); - } - err = usbd_req_re_enumerate(child, NULL); - if (err == 0) - err = usbd_set_config_index(child, 0); - if (err == 0) { - err = usb_probe_and_attach(child, - USB_IFACE_INDEX_ANY); - } - child->re_enumerate_wait = USB_RE_ENUM_DONE; - err = 0; - break; - - case USB_RE_ENUM_PWR_OFF: - /* get the device unconfigured */ - err = usbd_set_config_index(child, - USB_UNCONFIG_INDEX); - if (err) { - DPRINTFN(0, "Could not unconfigure " - "device (ignored)\n"); - } - - /* clear port enable */ - err = usbd_req_clear_port_feature(child->parent_hub, - NULL, child->port_no, UHF_PORT_ENABLE); - if (err) { - DPRINTFN(0, "Could not disable port " - "(ignored)\n"); - } - child->re_enumerate_wait = USB_RE_ENUM_DONE; - err = 0; - break; - - default: - child->re_enumerate_wait = USB_RE_ENUM_DONE; - break; - } - if (do_unlock) - usbd_enum_unlock(child); - } + uhub_explore_handle_re_enumerate(child); /* check if probe and attach should be done */ @@ -2798,3 +2826,31 @@ usbd_start_re_enumerate(struct usb_devic usb_needs_explore(udev->bus, 0); } } + +/*-----------------------------------------------------------------------* + * usbd_start_set_config + * + * This function starts setting a USB configuration. This function + * does not need to be called BUS-locked. This function does not wait + * until the set USB configuratino is completed. + *------------------------------------------------------------------------*/ +usb_error_t +usbd_start_set_config(struct usb_device *udev, uint8_t index) +{ + if (udev->re_enumerate_wait == USB_RE_ENUM_DONE) { + if (udev->curr_config_index == index) { + /* no change needed */ + return (0); + } + udev->next_config_index = index; + udev->re_enumerate_wait = USB_RE_ENUM_SET_CONFIG; + usb_needs_explore(udev->bus, 0); + return (0); + } else if (udev->re_enumerate_wait == USB_RE_ENUM_SET_CONFIG) { + if (udev->next_config_index == index) { + /* no change needed */ + return (0); + } + } + return (USB_ERR_PENDING_REQUESTS); +} Modified: stable/10/sys/dev/usb/usb_hub.h ============================================================================== --- stable/10/sys/dev/usb/usb_hub.h Wed Jun 11 03:59:14 2014 (r267346) +++ stable/10/sys/dev/usb/usb_hub.h Wed Jun 11 05:39:08 2014 (r267347) @@ -75,5 +75,6 @@ void usb_bus_power_update(struct usb_bus void usb_bus_powerd(struct usb_bus *bus); void uhub_root_intr(struct usb_bus *, const uint8_t *, uint8_t); usb_error_t uhub_query_info(struct usb_device *, uint8_t *, uint8_t *); +void uhub_explore_handle_re_enumerate(struct usb_device *); #endif /* _USB_HUB_H_ */ Modified: stable/10/sys/dev/usb/usbdi.h ============================================================================== --- stable/10/sys/dev/usb/usbdi.h Wed Jun 11 03:59:14 2014 (r267346) +++ stable/10/sys/dev/usb/usbdi.h Wed Jun 11 05:39:08 2014 (r267347) @@ -586,6 +586,8 @@ void usbd_m_copy_in(struct usb_page_cach void usbd_frame_zero(struct usb_page_cache *cache, usb_frlength_t offset, usb_frlength_t len); void usbd_start_re_enumerate(struct usb_device *udev); +usb_error_t + usbd_start_set_config(struct usb_device *, uint8_t); int usb_fifo_attach(struct usb_device *udev, void *priv_sc, struct mtx *priv_mtx, struct usb_fifo_methods *pm, From owner-svn-src-stable@FreeBSD.ORG Wed Jun 11 05:45:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 75160209; Wed, 11 Jun 2014 05:45:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 566282B0F; Wed, 11 Jun 2014 05:45:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5B5joOt057884; Wed, 11 Jun 2014 05:45:50 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5B5jmH9057877; Wed, 11 Jun 2014 05:45:48 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201406110545.s5B5jmH9057877@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 11 Jun 2014 05:45:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r267348 - in stable/8/sys/dev/usb: . controller X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jun 2014 05:45:50 -0000 Author: hselasky Date: Wed Jun 11 05:45:48 2014 New Revision: 267348 URL: http://svnweb.freebsd.org/changeset/base/267348 Log: MFC r267240: Resolve a deadlock setting the USB configuration index from userspace on USB HUBs by moving the code into the USB explore threads. The deadlock happens because child devices of the USB HUB don't have the expected reference count when called from outside the explore thread. Only the HUB device itself, which the IOCTL interface locks, gets the correct reference count. Modified: stable/8/sys/dev/usb/controller/usb_controller.c stable/8/sys/dev/usb/usb_dev.c stable/8/sys/dev/usb/usb_device.h stable/8/sys/dev/usb/usb_generic.c stable/8/sys/dev/usb/usb_hub.c stable/8/sys/dev/usb/usb_hub.h stable/8/sys/dev/usb/usbdi.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/controller/usb_controller.c ============================================================================== --- stable/8/sys/dev/usb/controller/usb_controller.c Wed Jun 11 05:39:08 2014 (r267347) +++ stable/8/sys/dev/usb/controller/usb_controller.c Wed Jun 11 05:45:48 2014 (r267348) @@ -348,7 +348,13 @@ usb_bus_explore(struct usb_proc_msg *pm) if (bus->no_explore != 0) return; - if (udev && udev->hub) { + if (udev != NULL) { + USB_BUS_UNLOCK(bus); + uhub_explore_handle_re_enumerate(udev); + USB_BUS_LOCK(bus); + } + + if (udev != NULL && udev->hub != NULL) { if (bus->do_probe) { bus->do_probe = 0; Modified: stable/8/sys/dev/usb/usb_dev.c ============================================================================== --- stable/8/sys/dev/usb/usb_dev.c Wed Jun 11 05:39:08 2014 (r267347) +++ stable/8/sys/dev/usb/usb_dev.c Wed Jun 11 05:45:48 2014 (r267348) @@ -1101,9 +1101,14 @@ usb_ioctl(struct cdev *dev, u_long cmd, usb_pause_mtx(NULL, hz / 128); - if (usb_ref_device(cpd, &refs, 1 /* need uref */)) { - err = ENXIO; - goto done; + while (usb_ref_device(cpd, &refs, 1 /* need uref */)) { + if (usb_ref_device(cpd, &refs, 0)) { + /* device no longer exits */ + err = ENXIO; + goto done; + } + usb_unref_device(cpd, &refs); + usb_pause_mtx(NULL, hz / 128); } } Modified: stable/8/sys/dev/usb/usb_device.h ============================================================================== --- stable/8/sys/dev/usb/usb_device.h Wed Jun 11 05:39:08 2014 (r267347) +++ stable/8/sys/dev/usb/usb_device.h Wed Jun 11 05:45:48 2014 (r267348) @@ -219,6 +219,7 @@ struct usb_device { uint8_t address; /* device addess */ uint8_t device_index; /* device index in "bus->devices" */ uint8_t controller_slot_id; /* controller specific value */ + uint8_t next_config_index; /* used by USB_RE_ENUM_SET_CONFIG */ uint8_t curr_config_index; /* current configuration index */ uint8_t curr_config_no; /* current configuration number */ uint8_t depth; /* distance from root HUB */ @@ -232,6 +233,7 @@ struct usb_device { #define USB_RE_ENUM_DONE 0 #define USB_RE_ENUM_START 1 #define USB_RE_ENUM_PWR_OFF 2 +#define USB_RE_ENUM_SET_CONFIG 3 uint8_t ifaces_max; /* number of interfaces present */ uint8_t endpoints_max; /* number of endpoints present */ Modified: stable/8/sys/dev/usb/usb_generic.c ============================================================================== --- stable/8/sys/dev/usb/usb_generic.c Wed Jun 11 05:39:08 2014 (r267347) +++ stable/8/sys/dev/usb/usb_generic.c Wed Jun 11 05:45:48 2014 (r267348) @@ -610,24 +610,17 @@ ugen_set_config(struct usb_fifo *f, uint /* not possible in device side mode */ return (ENOTTY); } - if (f->udev->curr_config_index == index) { - /* no change needed */ - return (0); - } + /* make sure all FIFO's are gone */ /* else there can be a deadlock */ if (ugen_fs_uninit(f)) { /* ignore any errors */ DPRINTFN(6, "no FIFOs\n"); } - /* change setting - will free generic FIFOs, if any */ - if (usbd_set_config_index(f->udev, index)) { - return (EIO); - } - /* probe and attach */ - if (usb_probe_and_attach(f->udev, USB_IFACE_INDEX_ANY)) { + + if (usbd_start_set_config(f->udev, index) != 0) return (EIO); - } + return (0); } @@ -961,11 +954,6 @@ ugen_re_enumerate(struct usb_fifo *f) DPRINTFN(6, "device mode\n"); return (ENOTTY); } - if (udev->parent_hub == NULL) { - /* the root HUB cannot be re-enumerated */ - DPRINTFN(6, "cannot reset root HUB\n"); - return (EINVAL); - } /* make sure all FIFO's are gone */ /* else there can be a deadlock */ if (ugen_fs_uninit(f)) { Modified: stable/8/sys/dev/usb/usb_hub.c ============================================================================== --- stable/8/sys/dev/usb/usb_hub.c Wed Jun 11 05:39:08 2014 (r267347) +++ stable/8/sys/dev/usb/usb_hub.c Wed Jun 11 05:45:48 2014 (r267348) @@ -421,6 +421,86 @@ done: return (retval); } +void +uhub_explore_handle_re_enumerate(struct usb_device *child) +{ + uint8_t do_unlock; + usb_error_t err; + + /* check if device should be re-enumerated */ + if (child->flags.usb_mode != USB_MODE_HOST) + return; + + do_unlock = usbd_enum_lock(child); + switch (child->re_enumerate_wait) { + case USB_RE_ENUM_START: + err = usbd_set_config_index(child, + USB_UNCONFIG_INDEX); + if (err != 0) { + DPRINTF("Unconfigure failed: %s: Ignored.\n", + usbd_errstr(err)); + } + if (child->parent_hub == NULL) { + /* the root HUB cannot be re-enumerated */ + DPRINTFN(6, "cannot reset root HUB\n"); + err = 0; + } else { + err = usbd_req_re_enumerate(child, NULL); + } + if (err == 0) + err = usbd_set_config_index(child, 0); + if (err == 0) { + err = usb_probe_and_attach(child, + USB_IFACE_INDEX_ANY); + } + child->re_enumerate_wait = USB_RE_ENUM_DONE; + break; + + case USB_RE_ENUM_PWR_OFF: + /* get the device unconfigured */ + err = usbd_set_config_index(child, + USB_UNCONFIG_INDEX); + if (err) { + DPRINTFN(0, "Could not unconfigure " + "device (ignored)\n"); + } + if (child->parent_hub == NULL) { + /* the root HUB cannot be re-enumerated */ + DPRINTFN(6, "cannot set port feature\n"); + err = 0; + } else { + /* clear port enable */ + err = usbd_req_clear_port_feature(child->parent_hub, + NULL, child->port_no, UHF_PORT_ENABLE); + if (err) { + DPRINTFN(0, "Could not disable port " + "(ignored)\n"); + } + } + child->re_enumerate_wait = USB_RE_ENUM_DONE; + break; + + case USB_RE_ENUM_SET_CONFIG: + err = usbd_set_config_index(child, + child->next_config_index); + if (err != 0) { + DPRINTF("Configure failed: %s: Ignored.\n", + usbd_errstr(err)); + } else { + err = usb_probe_and_attach(child, + USB_IFACE_INDEX_ANY); + } + child->re_enumerate_wait = USB_RE_ENUM_DONE; + break; + + default: + child->re_enumerate_wait = USB_RE_ENUM_DONE; + break; + } + if (do_unlock) + usbd_enum_unlock(child); +} + /*------------------------------------------------------------------------* * uhub_explore_sub - subroutine * @@ -449,59 +529,7 @@ uhub_explore_sub(struct uhub_softc *sc, goto done; } - /* check if device should be re-enumerated */ - - if (child->flags.usb_mode == USB_MODE_HOST) { - uint8_t do_unlock; - - do_unlock = usbd_enum_lock(child); - switch (child->re_enumerate_wait) { - case USB_RE_ENUM_START: - err = usbd_set_config_index(child, - USB_UNCONFIG_INDEX); - if (err != 0) { - DPRINTF("Unconfigure failed: " - "%s: Ignored.\n", - usbd_errstr(err)); - } - err = usbd_req_re_enumerate(child, NULL); - if (err == 0) - err = usbd_set_config_index(child, 0); - if (err == 0) { - err = usb_probe_and_attach(child, - USB_IFACE_INDEX_ANY); - } - child->re_enumerate_wait = USB_RE_ENUM_DONE; - err = 0; - break; - - case USB_RE_ENUM_PWR_OFF: - /* get the device unconfigured */ - err = usbd_set_config_index(child, - USB_UNCONFIG_INDEX); - if (err) { - DPRINTFN(0, "Could not unconfigure " - "device (ignored)\n"); - } - - /* clear port enable */ - err = usbd_req_clear_port_feature(child->parent_hub, - NULL, child->port_no, UHF_PORT_ENABLE); - if (err) { - DPRINTFN(0, "Could not disable port " - "(ignored)\n"); - } - child->re_enumerate_wait = USB_RE_ENUM_DONE; - err = 0; - break; - - default: - child->re_enumerate_wait = USB_RE_ENUM_DONE; - break; - } - if (do_unlock) - usbd_enum_unlock(child); - } + uhub_explore_handle_re_enumerate(child); /* check if probe and attach should be done */ @@ -2782,3 +2810,31 @@ usbd_start_re_enumerate(struct usb_devic usb_needs_explore(udev->bus, 0); } } + +/*-----------------------------------------------------------------------* + * usbd_start_set_config + * + * This function starts setting a USB configuration. This function + * does not need to be called BUS-locked. This function does not wait + * until the set USB configuratino is completed. + *------------------------------------------------------------------------*/ +usb_error_t +usbd_start_set_config(struct usb_device *udev, uint8_t index) +{ + if (udev->re_enumerate_wait == USB_RE_ENUM_DONE) { + if (udev->curr_config_index == index) { + /* no change needed */ + return (0); + } + udev->next_config_index = index; + udev->re_enumerate_wait = USB_RE_ENUM_SET_CONFIG; + usb_needs_explore(udev->bus, 0); + return (0); + } else if (udev->re_enumerate_wait == USB_RE_ENUM_SET_CONFIG) { + if (udev->next_config_index == index) { + /* no change needed */ + return (0); + } + } + return (USB_ERR_PENDING_REQUESTS); +} Modified: stable/8/sys/dev/usb/usb_hub.h ============================================================================== --- stable/8/sys/dev/usb/usb_hub.h Wed Jun 11 05:39:08 2014 (r267347) +++ stable/8/sys/dev/usb/usb_hub.h Wed Jun 11 05:45:48 2014 (r267348) @@ -71,5 +71,6 @@ void usb_bus_power_update(struct usb_bus void usb_bus_powerd(struct usb_bus *bus); void uhub_root_intr(struct usb_bus *, const uint8_t *, uint8_t); usb_error_t uhub_query_info(struct usb_device *, uint8_t *, uint8_t *); +void uhub_explore_handle_re_enumerate(struct usb_device *); #endif /* _USB_HUB_H_ */ Modified: stable/8/sys/dev/usb/usbdi.h ============================================================================== --- stable/8/sys/dev/usb/usbdi.h Wed Jun 11 05:39:08 2014 (r267347) +++ stable/8/sys/dev/usb/usbdi.h Wed Jun 11 05:45:48 2014 (r267348) @@ -566,6 +566,8 @@ void usbd_m_copy_in(struct usb_page_cach void usbd_frame_zero(struct usb_page_cache *cache, usb_frlength_t offset, usb_frlength_t len); void usbd_start_re_enumerate(struct usb_device *udev); +usb_error_t + usbd_start_set_config(struct usb_device *, uint8_t); int usb_fifo_attach(struct usb_device *udev, void *priv_sc, struct mtx *priv_mtx, struct usb_fifo_methods *pm, From owner-svn-src-stable@FreeBSD.ORG Wed Jun 11 05:50:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 330EC541; Wed, 11 Jun 2014 05:50:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 149542B3B; Wed, 11 Jun 2014 05:50:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5B5o4EV058527; Wed, 11 Jun 2014 05:50:04 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5B5o4p5058524; Wed, 11 Jun 2014 05:50:04 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201406110550.s5B5o4p5058524@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 11 Jun 2014 05:50:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267349 - stable/10/sys/dev/usb/wlan X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jun 2014 05:50:05 -0000 Author: hselasky Date: Wed Jun 11 05:50:04 2014 New Revision: 267349 URL: http://svnweb.freebsd.org/changeset/base/267349 Log: MFC r267066 and r267041: Fixes for the RSU driver: - The R92S_TCR register is an 8-bit register. Don't access it like a 16-bit register. - Disable parsing the delete station event, due to many false events. - Ensure that there is only one transfer queue for each endpoint, so to hal packets transmitted don't get out of order. - Properly align temporary buffer to 32-bit. - Add an extra parenthesis to make expression clear. - Range check the association ID received from hardware. Modified: stable/10/sys/dev/usb/wlan/if_rsu.c stable/10/sys/dev/usb/wlan/if_rsureg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_rsu.c Wed Jun 11 05:45:48 2014 (r267348) +++ stable/10/sys/dev/usb/wlan/if_rsu.c Wed Jun 11 05:50:04 2014 (r267349) @@ -127,10 +127,8 @@ static const STRUCT_USB_HOST_ID rsu_devs static device_probe_t rsu_match; static device_attach_t rsu_attach; static device_detach_t rsu_detach; -static usb_callback_t rsu_bulk_tx_callback_0; -static usb_callback_t rsu_bulk_tx_callback_1; -static usb_callback_t rsu_bulk_tx_callback_2; -static usb_callback_t rsu_bulk_tx_callback_3; +static usb_callback_t rsu_bulk_tx_callback_be_bk; +static usb_callback_t rsu_bulk_tx_callback_vi_vo; static usb_callback_t rsu_bulk_rx_callback; static usb_error_t rsu_do_request(struct rsu_softc *, struct usb_device_request *, void *); @@ -220,6 +218,13 @@ MODULE_DEPEND(rsu, usb, 1, 1, 1); MODULE_DEPEND(rsu, firmware, 1, 1, 1); MODULE_VERSION(rsu, 1); +static uint8_t rsu_wme_ac_xfer_map[4] = { + [WME_AC_BE] = RSU_BULK_TX_BE_BK, + [WME_AC_BK] = RSU_BULK_TX_BE_BK, + [WME_AC_VI] = RSU_BULK_TX_VI_VO, + [WME_AC_VO] = RSU_BULK_TX_VI_VO, +}; + static const struct usb_config rsu_config[RSU_N_TRANSFER] = { [RSU_BULK_RX] = { .type = UE_BULK, @@ -232,20 +237,7 @@ static const struct usb_config rsu_confi }, .callback = rsu_bulk_rx_callback }, - [RSU_BULK_TX_BE] = { - .type = UE_BULK, - .endpoint = 0x06, - .direction = UE_DIR_OUT, - .bufsize = RSU_TXBUFSZ, - .flags = { - .ext_buffer = 1, - .pipe_bof = 1, - .force_short_xfer = 1 - }, - .callback = rsu_bulk_tx_callback_0, - .timeout = RSU_TX_TIMEOUT - }, - [RSU_BULK_TX_BK] = { + [RSU_BULK_TX_BE_BK] = { .type = UE_BULK, .endpoint = 0x06, .direction = UE_DIR_OUT, @@ -255,10 +247,10 @@ static const struct usb_config rsu_confi .pipe_bof = 1, .force_short_xfer = 1 }, - .callback = rsu_bulk_tx_callback_1, + .callback = rsu_bulk_tx_callback_be_bk, .timeout = RSU_TX_TIMEOUT }, - [RSU_BULK_TX_VI] = { + [RSU_BULK_TX_VI_VO] = { .type = UE_BULK, .endpoint = 0x04, .direction = UE_DIR_OUT, @@ -268,20 +260,7 @@ static const struct usb_config rsu_confi .pipe_bof = 1, .force_short_xfer = 1 }, - .callback = rsu_bulk_tx_callback_2, - .timeout = RSU_TX_TIMEOUT - }, - [RSU_BULK_TX_VO] = { - .type = UE_BULK, - .endpoint = 0x04, - .direction = UE_DIR_OUT, - .bufsize = RSU_TXBUFSZ, - .flags = { - .ext_buffer = 1, - .pipe_bof = 1, - .force_short_xfer = 1 - }, - .callback = rsu_bulk_tx_callback_3, + .callback = rsu_bulk_tx_callback_vi_vo, .timeout = RSU_TX_TIMEOUT }, }; @@ -613,7 +592,7 @@ rsu_alloc_tx_list(struct rsu_softc *sc) STAILQ_INIT(&sc->sc_tx_inactive); - for (i = 0; i != RSU_MAX_TX_EP; i++) { + for (i = 0; i != RSU_N_TRANSFER; i++) { STAILQ_INIT(&sc->sc_tx_active[i]); STAILQ_INIT(&sc->sc_tx_pending[i]); } @@ -633,7 +612,7 @@ rsu_free_tx_list(struct rsu_softc *sc) /* prevent further allocations from TX list(s) */ STAILQ_INIT(&sc->sc_tx_inactive); - for (i = 0; i != RSU_MAX_TX_EP; i++) { + for (i = 0; i != RSU_N_TRANSFER; i++) { STAILQ_INIT(&sc->sc_tx_active[i]); STAILQ_INIT(&sc->sc_tx_pending[i]); } @@ -873,7 +852,7 @@ rsu_read_rom(struct rsu_softc *sc) static int rsu_fw_cmd(struct rsu_softc *sc, uint8_t code, void *buf, int len) { - const uint8_t which = RSU_BULK_TX_VO - RSU_BULK_TX_BE; + const uint8_t which = rsu_wme_ac_xfer_map[WME_AC_VO]; struct rsu_data *data; struct r92s_tx_desc *txd; struct r92s_fw_cmd_hdr *cmd; @@ -912,7 +891,7 @@ rsu_fw_cmd(struct rsu_softc *sc, uint8_t DPRINTFN(2, "Tx cmd code=0x%x len=0x%x\n", code, cmdsz); data->buflen = xferlen; STAILQ_INSERT_TAIL(&sc->sc_tx_pending[which], data, next); - usbd_transfer_start(sc->sc_xfer[which + RSU_BULK_TX_BE]); + usbd_transfer_start(sc->sc_xfer[which]); return (0); } @@ -925,6 +904,7 @@ rsu_calib_task(void *arg, int pending __ uint32_t reg; DPRINTFN(6, "running calibration task\n"); + RSU_LOCK(sc); #ifdef notyet /* Read WPS PBC status. */ @@ -941,12 +921,9 @@ rsu_calib_task(void *arg, int pending __ reg = rsu_read_4(sc, R92S_IOCMD_DATA); DPRINTFN(8, "RSSI=%d%%\n", reg >> 4); } - if (sc->sc_calibrating) { - RSU_UNLOCK(sc); - taskqueue_enqueue_timeout(taskqueue_thread, &sc->calib_task, - hz * 2); - } else - RSU_UNLOCK(sc); + if (sc->sc_calibrating) + taskqueue_enqueue_timeout(taskqueue_thread, &sc->calib_task, hz); + RSU_UNLOCK(sc); } static int @@ -1000,11 +977,10 @@ rsu_newstate(struct ieee80211vap *vap, e break; } sc->sc_calibrating = 1; + /* Start periodic calibration. */ + taskqueue_enqueue_timeout(taskqueue_thread, &sc->calib_task, hz); RSU_UNLOCK(sc); IEEE80211_LOCK(ic); - /* Start periodic calibration. */ - taskqueue_enqueue_timeout(taskqueue_thread, &sc->calib_task, hz * 2); - return (uvp->newstate(vap, nstate, arg)); } @@ -1080,7 +1056,8 @@ rsu_join_bss(struct rsu_softc *sc, struc struct ndis_wlan_bssid_ex *bss; struct ndis_802_11_fixed_ies *fixed; struct r92s_fw_cmd_auth auth; - uint8_t buf[sizeof(*bss) + 128], *frm; + uint8_t buf[sizeof(*bss) + 128] __aligned(4); + uint8_t *frm; uint8_t opmode; int error; @@ -1094,7 +1071,7 @@ rsu_join_bss(struct rsu_softc *sc, struc memset(&auth, 0, sizeof(auth)); if (vap->iv_flags & IEEE80211_F_WPA) { auth.mode = R92S_AUTHMODE_WPA; - auth.dot1x = ni->ni_authmode == IEEE80211_AUTH_8021X; + auth.dot1x = (ni->ni_authmode == IEEE80211_AUTH_8021X); } else auth.mode = R92S_AUTHMODE_OPEN; DPRINTF("setting auth mode to %d\n", auth.mode); @@ -1222,6 +1199,7 @@ rsu_event_join_bss(struct rsu_softc *sc, struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); struct ieee80211_node *ni = vap->iv_bss; struct r92s_event_join_bss *rsp; + uint32_t tmp; int res; if (__predict_false(len < sizeof(*rsp))) @@ -1236,9 +1214,14 @@ rsu_event_join_bss(struct rsu_softc *sc, RSU_LOCK(sc); return; } + tmp = le32toh(rsp->associd); + if (tmp >= vap->iv_max_aid) { + DPRINTF("Assoc ID overflow\n"); + tmp = 1; + } DPRINTF("associated with %s associd=%d\n", - ether_sprintf(rsp->bss.macaddr), le32toh(rsp->associd)); - ni->ni_associd = le32toh(rsp->associd) | 0xc000; + ether_sprintf(rsp->bss.macaddr), tmp); + ni->ni_associd = tmp | 0xc000; RSU_UNLOCK(sc); ieee80211_new_state(vap, IEEE80211_S_RUN, IEEE80211_FC0_SUBTYPE_ASSOC_RESP); @@ -1277,6 +1260,9 @@ rsu_rx_event(struct rsu_softc *sc, uint8 if (vap->iv_state == IEEE80211_S_AUTH) rsu_event_join_bss(sc, buf, len); break; +#if 0 +XXX This event is occurring regularly, possibly due to some power saving event +XXX and disrupts the WLAN traffic. Disable for now. case R92S_EVT_DEL_STA: DPRINTF("disassociated from %s\n", ether_sprintf(buf)); if (vap->iv_state == IEEE80211_S_RUN && @@ -1286,6 +1272,7 @@ rsu_rx_event(struct rsu_softc *sc, uint8 RSU_LOCK(sc); } break; +#endif case R92S_EVT_WPS_PBC: DPRINTF("WPS PBC pushed.\n"); break; @@ -1295,6 +1282,8 @@ rsu_rx_event(struct rsu_softc *sc, uint8 printf("FWDBG: %s\n", (char *)buf); } break; + default: + break; } } @@ -1676,27 +1665,15 @@ tr_setup: } static void -rsu_bulk_tx_callback_0(struct usb_xfer *xfer, usb_error_t error) -{ - rsu_bulk_tx_callback_sub(xfer, error, 0); -} - -static void -rsu_bulk_tx_callback_1(struct usb_xfer *xfer, usb_error_t error) +rsu_bulk_tx_callback_be_bk(struct usb_xfer *xfer, usb_error_t error) { - rsu_bulk_tx_callback_sub(xfer, error, 1); + rsu_bulk_tx_callback_sub(xfer, error, RSU_BULK_TX_BE_BK); } static void -rsu_bulk_tx_callback_2(struct usb_xfer *xfer, usb_error_t error) +rsu_bulk_tx_callback_vi_vo(struct usb_xfer *xfer, usb_error_t error) { - rsu_bulk_tx_callback_sub(xfer, error, 2); -} - -static void -rsu_bulk_tx_callback_3(struct usb_xfer *xfer, usb_error_t error) -{ - rsu_bulk_tx_callback_sub(xfer, error, 3); + rsu_bulk_tx_callback_sub(xfer, error, RSU_BULK_TX_VI_VO); } static int @@ -1734,12 +1711,10 @@ rsu_tx_start(struct rsu_softc *sc, struc switch (type) { case IEEE80211_FC0_TYPE_CTL: case IEEE80211_FC0_TYPE_MGT: - which = RSU_BULK_TX_VO - RSU_BULK_TX_BE; + which = rsu_wme_ac_xfer_map[WME_AC_VO]; break; default: - which = M_WME_GETAC(m0); - KASSERT(which < RSU_MAX_TX_EP, - ("unsupported WME pipe %d", which)); + which = rsu_wme_ac_xfer_map[M_WME_GETAC(m0)]; break; } hasqos = 0; @@ -1804,7 +1779,7 @@ rsu_tx_start(struct rsu_softc *sc, struc STAILQ_INSERT_TAIL(&sc->sc_tx_pending[which], data, next); /* start transfer, if any */ - usbd_transfer_start(sc->sc_xfer[which + RSU_BULK_TX_BE]); + usbd_transfer_start(sc->sc_xfer[which]); return (0); } @@ -2119,7 +2094,7 @@ rsu_power_off(struct rsu_softc *sc) static int rsu_fw_loadsection(struct rsu_softc *sc, const uint8_t *buf, int len) { - const uint8_t which = RSU_BULK_TX_VO - RSU_BULK_TX_BE; + const uint8_t which = rsu_wme_ac_xfer_map[WME_AC_VO]; struct rsu_data *data; struct r92s_tx_desc *txd; int mlen; @@ -2144,7 +2119,7 @@ rsu_fw_loadsection(struct rsu_softc *sc, buf += mlen; len -= mlen; } - usbd_transfer_start(sc->sc_xfer[RSU_BULK_TX_BE + which]); + usbd_transfer_start(sc->sc_xfer[which]); return (0); } @@ -2160,6 +2135,11 @@ rsu_load_firmware(struct rsu_softc *sc) uint32_t reg; int ntries, error; + if (rsu_read_1(sc, R92S_TCR) & R92S_TCR_FWRDY) { + DPRINTF("Firmware already loaded\n"); + return (0); + } + RSU_UNLOCK(sc); /* Read firmware image from the filesystem. */ if ((fw = firmware_get("rsu-rtl8712fw")) == NULL) { @@ -2216,7 +2196,7 @@ rsu_load_firmware(struct rsu_softc *sc) /* Wait for load to complete. */ for (ntries = 0; ntries != 50; ntries++) { usb_pause_mtx(&sc->sc_mtx, hz / 100); - reg = rsu_read_2(sc, R92S_TCR); + reg = rsu_read_1(sc, R92S_TCR); if (reg & R92S_TCR_IMEM_CODE_DONE) break; } @@ -2225,7 +2205,6 @@ rsu_load_firmware(struct rsu_softc *sc) error = ETIMEDOUT; goto fail; } - /* Load EMEM section. */ error = rsu_fw_loadsection(sc, emem, ememsz); if (error != 0) { @@ -2245,7 +2224,6 @@ rsu_load_firmware(struct rsu_softc *sc) error = ETIMEDOUT; goto fail; } - /* Enable CPU. */ rsu_write_1(sc, R92S_SYS_CLKR, rsu_read_1(sc, R92S_SYS_CLKR) | R92S_SYS_CPU_CLKSEL); @@ -2264,7 +2242,7 @@ rsu_load_firmware(struct rsu_softc *sc) } /* Wait for CPU to initialize. */ for (ntries = 0; ntries < 100; ntries++) { - if (rsu_read_2(sc, R92S_TCR) & R92S_TCR_IMEM_RDY) + if (rsu_read_1(sc, R92S_TCR) & R92S_TCR_IMEM_RDY) break; rsu_ms_delay(sc); } @@ -2296,7 +2274,7 @@ rsu_load_firmware(struct rsu_softc *sc) } /* Wait for load to complete. */ for (ntries = 0; ntries < 100; ntries++) { - if (rsu_read_2(sc, R92S_TCR) & R92S_TCR_DMEM_CODE_DONE) + if (rsu_read_1(sc, R92S_TCR) & R92S_TCR_DMEM_CODE_DONE) break; rsu_ms_delay(sc); } @@ -2308,7 +2286,7 @@ rsu_load_firmware(struct rsu_softc *sc) } /* Wait for firmware readiness. */ for (ntries = 0; ntries < 60; ntries++) { - if (!(rsu_read_2(sc, R92S_TCR) & R92S_TCR_FWRDY)) + if (!(rsu_read_1(sc, R92S_TCR) & R92S_TCR_FWRDY)) break; rsu_ms_delay(sc); } @@ -2386,6 +2364,7 @@ rsu_init_locked(struct rsu_softc *sc) rsu_power_on_acut(sc); else rsu_power_on_bcut(sc); + /* Load firmware. */ error = rsu_load_firmware(sc); if (error != 0) Modified: stable/10/sys/dev/usb/wlan/if_rsureg.h ============================================================================== --- stable/10/sys/dev/usb/wlan/if_rsureg.h Wed Jun 11 05:45:48 2014 (r267348) +++ stable/10/sys/dev/usb/wlan/if_rsureg.h Wed Jun 11 05:50:04 2014 (r267349) @@ -698,11 +698,9 @@ struct rsu_host_cmd_ring { enum { RSU_BULK_RX, - RSU_BULK_TX_BE, /* = WME_AC_BE */ - RSU_BULK_TX_BK, /* = WME_AC_BK */ - RSU_BULK_TX_VI, /* = WME_AC_VI */ - RSU_BULK_TX_VO, /* = WME_AC_VI */ - RSU_N_TRANSFER = 5, + RSU_BULK_TX_BE_BK, /* = WME_AC_BE/BK */ + RSU_BULK_TX_VI_VO, /* = WME_AC_VI/VO */ + RSU_N_TRANSFER, }; struct rsu_data { @@ -727,8 +725,6 @@ struct rsu_vap { #define RSU_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx) #define RSU_ASSERT_LOCKED(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED) -#define RSU_MAX_TX_EP 4 - struct rsu_softc { struct ifnet *sc_ifp; device_t sc_dev; @@ -754,9 +750,9 @@ struct rsu_softc { STAILQ_HEAD(, rsu_data) sc_rx_active; STAILQ_HEAD(, rsu_data) sc_rx_inactive; - STAILQ_HEAD(, rsu_data) sc_tx_active[RSU_MAX_TX_EP]; + STAILQ_HEAD(, rsu_data) sc_tx_active[RSU_N_TRANSFER]; STAILQ_HEAD(, rsu_data) sc_tx_inactive; - STAILQ_HEAD(, rsu_data) sc_tx_pending[RSU_MAX_TX_EP]; + STAILQ_HEAD(, rsu_data) sc_tx_pending[RSU_N_TRANSFER]; union { struct rsu_rx_radiotap_header th; From owner-svn-src-stable@FreeBSD.ORG Wed Jun 11 06:45:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3AEE7E29; Wed, 11 Jun 2014 06:45:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1DB172F58; Wed, 11 Jun 2014 06:45:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5B6jr2f085336; Wed, 11 Jun 2014 06:45:53 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5B6jq9b085329; Wed, 11 Jun 2014 06:45:52 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201406110645.s5B6jq9b085329@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 11 Jun 2014 06:45:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267350 - in stable/9/sys/dev/usb: . controller X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jun 2014 06:45:54 -0000 Author: hselasky Date: Wed Jun 11 06:45:52 2014 New Revision: 267350 URL: http://svnweb.freebsd.org/changeset/base/267350 Log: MFC r267240: Resolve a deadlock setting the USB configuration index from userspace on USB HUBs by moving the code into the USB explore threads. The deadlock happens because child devices of the USB HUB don't have the expected reference count when called from outside the explore thread. Only the HUB device itself, which the IOCTL interface locks, gets the correct reference count. Approved by: re, marius @ Modified: stable/9/sys/dev/usb/controller/usb_controller.c stable/9/sys/dev/usb/usb_dev.c stable/9/sys/dev/usb/usb_device.h stable/9/sys/dev/usb/usb_generic.c stable/9/sys/dev/usb/usb_hub.c stable/9/sys/dev/usb/usb_hub.h stable/9/sys/dev/usb/usbdi.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/controller/usb_controller.c ============================================================================== --- stable/9/sys/dev/usb/controller/usb_controller.c Wed Jun 11 05:50:04 2014 (r267349) +++ stable/9/sys/dev/usb/controller/usb_controller.c Wed Jun 11 06:45:52 2014 (r267350) @@ -348,7 +348,13 @@ usb_bus_explore(struct usb_proc_msg *pm) if (bus->no_explore != 0) return; - if (udev && udev->hub) { + if (udev != NULL) { + USB_BUS_UNLOCK(bus); + uhub_explore_handle_re_enumerate(udev); + USB_BUS_LOCK(bus); + } + + if (udev != NULL && udev->hub != NULL) { if (bus->do_probe) { bus->do_probe = 0; Modified: stable/9/sys/dev/usb/usb_dev.c ============================================================================== --- stable/9/sys/dev/usb/usb_dev.c Wed Jun 11 05:50:04 2014 (r267349) +++ stable/9/sys/dev/usb/usb_dev.c Wed Jun 11 06:45:52 2014 (r267350) @@ -1112,9 +1112,14 @@ usb_ioctl(struct cdev *dev, u_long cmd, usb_pause_mtx(NULL, hz / 128); - if (usb_ref_device(cpd, &refs, 1 /* need uref */)) { - err = ENXIO; - goto done; + while (usb_ref_device(cpd, &refs, 1 /* need uref */)) { + if (usb_ref_device(cpd, &refs, 0)) { + /* device no longer exits */ + err = ENXIO; + goto done; + } + usb_unref_device(cpd, &refs); + usb_pause_mtx(NULL, hz / 128); } } Modified: stable/9/sys/dev/usb/usb_device.h ============================================================================== --- stable/9/sys/dev/usb/usb_device.h Wed Jun 11 05:50:04 2014 (r267349) +++ stable/9/sys/dev/usb/usb_device.h Wed Jun 11 06:45:52 2014 (r267350) @@ -220,6 +220,7 @@ struct usb_device { uint8_t address; /* device addess */ uint8_t device_index; /* device index in "bus->devices" */ uint8_t controller_slot_id; /* controller specific value */ + uint8_t next_config_index; /* used by USB_RE_ENUM_SET_CONFIG */ uint8_t curr_config_index; /* current configuration index */ uint8_t curr_config_no; /* current configuration number */ uint8_t depth; /* distance from root HUB */ @@ -233,6 +234,7 @@ struct usb_device { #define USB_RE_ENUM_DONE 0 #define USB_RE_ENUM_START 1 #define USB_RE_ENUM_PWR_OFF 2 +#define USB_RE_ENUM_SET_CONFIG 3 uint8_t ifaces_max; /* number of interfaces present */ uint8_t endpoints_max; /* number of endpoints present */ Modified: stable/9/sys/dev/usb/usb_generic.c ============================================================================== --- stable/9/sys/dev/usb/usb_generic.c Wed Jun 11 05:50:04 2014 (r267349) +++ stable/9/sys/dev/usb/usb_generic.c Wed Jun 11 06:45:52 2014 (r267350) @@ -610,24 +610,17 @@ ugen_set_config(struct usb_fifo *f, uint /* not possible in device side mode */ return (ENOTTY); } - if (f->udev->curr_config_index == index) { - /* no change needed */ - return (0); - } + /* make sure all FIFO's are gone */ /* else there can be a deadlock */ if (ugen_fs_uninit(f)) { /* ignore any errors */ DPRINTFN(6, "no FIFOs\n"); } - /* change setting - will free generic FIFOs, if any */ - if (usbd_set_config_index(f->udev, index)) { - return (EIO); - } - /* probe and attach */ - if (usb_probe_and_attach(f->udev, USB_IFACE_INDEX_ANY)) { + + if (usbd_start_set_config(f->udev, index) != 0) return (EIO); - } + return (0); } @@ -961,11 +954,6 @@ ugen_re_enumerate(struct usb_fifo *f) DPRINTFN(6, "device mode\n"); return (ENOTTY); } - if (udev->parent_hub == NULL) { - /* the root HUB cannot be re-enumerated */ - DPRINTFN(6, "cannot reset root HUB\n"); - return (EINVAL); - } /* make sure all FIFO's are gone */ /* else there can be a deadlock */ if (ugen_fs_uninit(f)) { Modified: stable/9/sys/dev/usb/usb_hub.c ============================================================================== --- stable/9/sys/dev/usb/usb_hub.c Wed Jun 11 05:50:04 2014 (r267349) +++ stable/9/sys/dev/usb/usb_hub.c Wed Jun 11 06:45:52 2014 (r267350) @@ -421,6 +421,86 @@ done: return (retval); } +void +uhub_explore_handle_re_enumerate(struct usb_device *child) +{ + uint8_t do_unlock; + usb_error_t err; + + /* check if device should be re-enumerated */ + if (child->flags.usb_mode != USB_MODE_HOST) + return; + + do_unlock = usbd_enum_lock(child); + switch (child->re_enumerate_wait) { + case USB_RE_ENUM_START: + err = usbd_set_config_index(child, + USB_UNCONFIG_INDEX); + if (err != 0) { + DPRINTF("Unconfigure failed: %s: Ignored.\n", + usbd_errstr(err)); + } + if (child->parent_hub == NULL) { + /* the root HUB cannot be re-enumerated */ + DPRINTFN(6, "cannot reset root HUB\n"); + err = 0; + } else { + err = usbd_req_re_enumerate(child, NULL); + } + if (err == 0) + err = usbd_set_config_index(child, 0); + if (err == 0) { + err = usb_probe_and_attach(child, + USB_IFACE_INDEX_ANY); + } + child->re_enumerate_wait = USB_RE_ENUM_DONE; + break; + + case USB_RE_ENUM_PWR_OFF: + /* get the device unconfigured */ + err = usbd_set_config_index(child, + USB_UNCONFIG_INDEX); + if (err) { + DPRINTFN(0, "Could not unconfigure " + "device (ignored)\n"); + } + if (child->parent_hub == NULL) { + /* the root HUB cannot be re-enumerated */ + DPRINTFN(6, "cannot set port feature\n"); + err = 0; + } else { + /* clear port enable */ + err = usbd_req_clear_port_feature(child->parent_hub, + NULL, child->port_no, UHF_PORT_ENABLE); + if (err) { + DPRINTFN(0, "Could not disable port " + "(ignored)\n"); + } + } + child->re_enumerate_wait = USB_RE_ENUM_DONE; + break; + + case USB_RE_ENUM_SET_CONFIG: + err = usbd_set_config_index(child, + child->next_config_index); + if (err != 0) { + DPRINTF("Configure failed: %s: Ignored.\n", + usbd_errstr(err)); + } else { + err = usb_probe_and_attach(child, + USB_IFACE_INDEX_ANY); + } + child->re_enumerate_wait = USB_RE_ENUM_DONE; + break; + + default: + child->re_enumerate_wait = USB_RE_ENUM_DONE; + break; + } + if (do_unlock) + usbd_enum_unlock(child); +} + /*------------------------------------------------------------------------* * uhub_explore_sub - subroutine * @@ -449,59 +529,7 @@ uhub_explore_sub(struct uhub_softc *sc, goto done; } - /* check if device should be re-enumerated */ - - if (child->flags.usb_mode == USB_MODE_HOST) { - uint8_t do_unlock; - - do_unlock = usbd_enum_lock(child); - switch (child->re_enumerate_wait) { - case USB_RE_ENUM_START: - err = usbd_set_config_index(child, - USB_UNCONFIG_INDEX); - if (err != 0) { - DPRINTF("Unconfigure failed: " - "%s: Ignored.\n", - usbd_errstr(err)); - } - err = usbd_req_re_enumerate(child, NULL); - if (err == 0) - err = usbd_set_config_index(child, 0); - if (err == 0) { - err = usb_probe_and_attach(child, - USB_IFACE_INDEX_ANY); - } - child->re_enumerate_wait = USB_RE_ENUM_DONE; - err = 0; - break; - - case USB_RE_ENUM_PWR_OFF: - /* get the device unconfigured */ - err = usbd_set_config_index(child, - USB_UNCONFIG_INDEX); - if (err) { - DPRINTFN(0, "Could not unconfigure " - "device (ignored)\n"); - } - - /* clear port enable */ - err = usbd_req_clear_port_feature(child->parent_hub, - NULL, child->port_no, UHF_PORT_ENABLE); - if (err) { - DPRINTFN(0, "Could not disable port " - "(ignored)\n"); - } - child->re_enumerate_wait = USB_RE_ENUM_DONE; - err = 0; - break; - - default: - child->re_enumerate_wait = USB_RE_ENUM_DONE; - break; - } - if (do_unlock) - usbd_enum_unlock(child); - } + uhub_explore_handle_re_enumerate(child); /* check if probe and attach should be done */ @@ -2784,3 +2812,31 @@ usbd_start_re_enumerate(struct usb_devic usb_needs_explore(udev->bus, 0); } } + +/*-----------------------------------------------------------------------* + * usbd_start_set_config + * + * This function starts setting a USB configuration. This function + * does not need to be called BUS-locked. This function does not wait + * until the set USB configuratino is completed. + *------------------------------------------------------------------------*/ +usb_error_t +usbd_start_set_config(struct usb_device *udev, uint8_t index) +{ + if (udev->re_enumerate_wait == USB_RE_ENUM_DONE) { + if (udev->curr_config_index == index) { + /* no change needed */ + return (0); + } + udev->next_config_index = index; + udev->re_enumerate_wait = USB_RE_ENUM_SET_CONFIG; + usb_needs_explore(udev->bus, 0); + return (0); + } else if (udev->re_enumerate_wait == USB_RE_ENUM_SET_CONFIG) { + if (udev->next_config_index == index) { + /* no change needed */ + return (0); + } + } + return (USB_ERR_PENDING_REQUESTS); +} Modified: stable/9/sys/dev/usb/usb_hub.h ============================================================================== --- stable/9/sys/dev/usb/usb_hub.h Wed Jun 11 05:50:04 2014 (r267349) +++ stable/9/sys/dev/usb/usb_hub.h Wed Jun 11 06:45:52 2014 (r267350) @@ -71,5 +71,6 @@ void usb_bus_power_update(struct usb_bus void usb_bus_powerd(struct usb_bus *bus); void uhub_root_intr(struct usb_bus *, const uint8_t *, uint8_t); usb_error_t uhub_query_info(struct usb_device *, uint8_t *, uint8_t *); +void uhub_explore_handle_re_enumerate(struct usb_device *); #endif /* _USB_HUB_H_ */ Modified: stable/9/sys/dev/usb/usbdi.h ============================================================================== --- stable/9/sys/dev/usb/usbdi.h Wed Jun 11 05:50:04 2014 (r267349) +++ stable/9/sys/dev/usb/usbdi.h Wed Jun 11 06:45:52 2014 (r267350) @@ -566,6 +566,8 @@ void usbd_m_copy_in(struct usb_page_cach void usbd_frame_zero(struct usb_page_cache *cache, usb_frlength_t offset, usb_frlength_t len); void usbd_start_re_enumerate(struct usb_device *udev); +usb_error_t + usbd_start_set_config(struct usb_device *, uint8_t); int usb_fifo_attach(struct usb_device *udev, void *priv_sc, struct mtx *priv_mtx, struct usb_fifo_methods *pm, From owner-svn-src-stable@FreeBSD.ORG Thu Jun 12 00:15:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 15CB73D8; Thu, 12 Jun 2014 00:15:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA64E2828; Thu, 12 Jun 2014 00:15:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5C0F7I8086457; Thu, 12 Jun 2014 00:15:07 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5C0F7ab086456; Thu, 12 Jun 2014 00:15:07 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201406120015.s5C0F7ab086456@svn.freebsd.org> From: Xin LI Date: Thu, 12 Jun 2014 00:15:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267379 - stable/9/lib/libc/gen X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 00:15:08 -0000 Author: delphij Date: Thu Jun 12 00:15:07 2014 New Revision: 267379 URL: http://svnweb.freebsd.org/changeset/base/267379 Log: Cumulative update to arc4random(3). MFC r227519, r227520, r238118, r241046: r227519 (das) Sync the style, comments, and variable names of arc4random.c with OpenBSD's version (r1.22). No functional changes, as verified with md5. r227520 (das) Further reduce diffs with OpenBSD's arc4random. The main functional change here is to ensure that when a process forks after arc4random is seeded, the parent and child don't observe the same random sequence. OpenBSD's fix introduces some additional overhead in the form of a getpid() call. The only significant remaining difference between our arc4random and OpenBSD's is in how we seed the generator in arc4_stir(). r238118 (pjd): Prefer sysctl to open/read/close for obtaining random data. This method is more sandbox-friendly and also should be faster as only one syscall is needed instead of three. In case of an error fall back to the old method. r241046 (jilles) libc: Use O_CLOEXEC for various internal file descriptors. Approved by: re (gjb) Modified: stable/9/lib/libc/gen/arc4random.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/gen/arc4random.c ============================================================================== --- stable/9/lib/libc/gen/arc4random.c Wed Jun 11 20:48:40 2014 (r267378) +++ stable/9/lib/libc/gen/arc4random.c Thu Jun 12 00:15:07 2014 (r267379) @@ -1,3 +1,5 @@ +/* $OpenBSD: arc4random.c,v 1.22 2010/12/22 08:23:42 otto Exp $ */ + /* * Copyright (c) 1996, David Mazieres * Copyright (c) 2008, Damien Miller @@ -24,11 +26,6 @@ * which is a trade secret). The same algorithm is used as a stream * cipher called "arcfour" in Tatu Ylonen's ssh package. * - * Here the stream cipher has been modified always to include the time - * when initializing the state. That makes it impossible to - * regenerate the same random sequence twice, so this can't be used - * for encryption, but will generate good random numbers. - * * RC4 is a registered trademark of RSA Laboratories. */ @@ -36,16 +33,25 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" -#include -#include -#include #include +#include +#include #include +#include +#include +#include +#include #include #include "libc_private.h" #include "un-namespace.h" +#ifdef __GNUC__ +#define inline __inline +#else /* !__GNUC__ */ +#define inline +#endif /* !__GNUC__ */ + struct arc4_stream { u_int8_t i; u_int8_t j; @@ -55,24 +61,27 @@ struct arc4_stream { static pthread_mutex_t arc4random_mtx = PTHREAD_MUTEX_INITIALIZER; #define RANDOMDEV "/dev/random" -#define KEYSIZE 128 -#define THREAD_LOCK() \ +#define KEYSIZE 128 +#define _ARC4_LOCK() \ do { \ if (__isthreaded) \ _pthread_mutex_lock(&arc4random_mtx); \ } while (0) -#define THREAD_UNLOCK() \ +#define _ARC4_UNLOCK() \ do { \ if (__isthreaded) \ _pthread_mutex_unlock(&arc4random_mtx); \ } while (0) -static struct arc4_stream rs; static int rs_initialized; -static int rs_stired; +static struct arc4_stream rs; +static pid_t arc4_stir_pid; static int arc4_count; +extern int __sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, + void *newp, size_t newlen); + static inline u_int8_t arc4_getbyte(void); static void arc4_stir(void); @@ -104,23 +113,53 @@ arc4_addrandom(u_char *dat, int datlen) rs.j = rs.i; } +static size_t +arc4_sysctl(u_char *buf, size_t size) +{ + int mib[2]; + size_t len, done; + + mib[0] = CTL_KERN; + mib[1] = KERN_ARND; + done = 0; + + do { + len = size; + if (__sysctl(mib, 2, buf, &len, NULL, 0) == -1) + return (done); + done += len; + buf += len; + size -= len; + } while (size > 0); + + return (done); +} + static void arc4_stir(void) { - int done, fd, n; + int done, fd, i; struct { struct timeval tv; - pid_t pid; - u_int8_t rnd[KEYSIZE]; + pid_t pid; + u_char rnd[KEYSIZE]; } rdat; - fd = _open(RANDOMDEV, O_RDONLY, 0); + if (!rs_initialized) { + arc4_init(); + rs_initialized = 1; + } done = 0; - if (fd >= 0) { - if (_read(fd, &rdat, KEYSIZE) == KEYSIZE) - done = 1; - (void)_close(fd); - } + if (arc4_sysctl((u_char *)&rdat, KEYSIZE) == KEYSIZE) + done = 1; + if (!done) { + fd = _open(RANDOMDEV, O_RDONLY | O_CLOEXEC, 0); + if (fd >= 0) { + if (_read(fd, &rdat, KEYSIZE) == KEYSIZE) + done = 1; + (void)_close(fd); + } + } if (!done) { (void)gettimeofday(&rdat.tv, NULL); rdat.pid = getpid(); @@ -130,17 +169,26 @@ arc4_stir(void) arc4_addrandom((u_char *)&rdat, KEYSIZE); /* - * Throw away the first N bytes of output, as suggested in the - * paper "Weaknesses in the Key Scheduling Algorithm of RC4" - * by Fluher, Mantin, and Shamir. N=1024 is based on - * suggestions in the paper "(Not So) Random Shuffles of RC4" - * by Ilya Mironov. + * Discard early keystream, as per recommendations in: + * "(Not So) Random Shuffles of RC4" by Ilya Mironov. */ - for (n = 0; n < 1024; n++) - (void) arc4_getbyte(); + for (i = 0; i < 1024; i++) + (void)arc4_getbyte(); arc4_count = 1600000; } +static void +arc4_stir_if_needed(void) +{ + pid_t pid = getpid(); + + if (arc4_count <= 0 || !rs_initialized || arc4_stir_pid != pid) + { + arc4_stir_pid = pid; + arc4_stir(); + } +} + static inline u_int8_t arc4_getbyte(void) { @@ -152,7 +200,6 @@ arc4_getbyte(void) sj = rs.s[rs.j]; rs.s[rs.i] = sj; rs.s[rs.j] = si; - return (rs.s[(si + sj) & 0xff]); } @@ -160,81 +207,55 @@ static inline u_int32_t arc4_getword(void) { u_int32_t val; - val = arc4_getbyte() << 24; val |= arc4_getbyte() << 16; val |= arc4_getbyte() << 8; val |= arc4_getbyte(); - - return (val); -} - -static void -arc4_check_init(void) -{ - if (!rs_initialized) { - arc4_init(); - rs_initialized = 1; - } -} - -static inline void -arc4_check_stir(void) -{ - if (!rs_stired || arc4_count <= 0) { - arc4_stir(); - rs_stired = 1; - } + return val; } void arc4random_stir(void) { - THREAD_LOCK(); - arc4_check_init(); + _ARC4_LOCK(); arc4_stir(); - rs_stired = 1; - THREAD_UNLOCK(); + _ARC4_UNLOCK(); } void arc4random_addrandom(u_char *dat, int datlen) { - THREAD_LOCK(); - arc4_check_init(); - arc4_check_stir(); + _ARC4_LOCK(); + if (!rs_initialized) + arc4_stir(); arc4_addrandom(dat, datlen); - THREAD_UNLOCK(); + _ARC4_UNLOCK(); } u_int32_t arc4random(void) { - u_int32_t rnd; - - THREAD_LOCK(); - arc4_check_init(); - arc4_check_stir(); - rnd = arc4_getword(); + u_int32_t val; + _ARC4_LOCK(); arc4_count -= 4; - THREAD_UNLOCK(); - - return (rnd); + arc4_stir_if_needed(); + val = arc4_getword(); + _ARC4_UNLOCK(); + return val; } void arc4random_buf(void *_buf, size_t n) { u_char *buf = (u_char *)_buf; - - THREAD_LOCK(); - arc4_check_init(); + _ARC4_LOCK(); + arc4_stir_if_needed(); while (n--) { - arc4_check_stir(); + if (--arc4_count <= 0) + arc4_stir(); buf[n] = arc4_getbyte(); - arc4_count--; } - THREAD_UNLOCK(); + _ARC4_UNLOCK(); } /* @@ -253,7 +274,7 @@ arc4random_uniform(u_int32_t upper_bound u_int32_t r, min; if (upper_bound < 2) - return (0); + return 0; #if (ULONG_MAX > 0xffffffffUL) min = 0x100000000UL % upper_bound; @@ -279,7 +300,7 @@ arc4random_uniform(u_int32_t upper_bound break; } - return (r % upper_bound); + return r % upper_bound; } #if 0 From owner-svn-src-stable@FreeBSD.ORG Thu Jun 12 00:19:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 37877645; Thu, 12 Jun 2014 00:19:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23A6B284E; Thu, 12 Jun 2014 00:19:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5C0J6VC087195; Thu, 12 Jun 2014 00:19:06 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5C0J6Nr087194; Thu, 12 Jun 2014 00:19:06 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201406120019.s5C0J6Nr087194@svn.freebsd.org> From: Xin LI Date: Thu, 12 Jun 2014 00:19:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r267380 - stable/8/lib/libc/gen X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 00:19:06 -0000 Author: delphij Date: Thu Jun 12 00:19:05 2014 New Revision: 267380 URL: http://svnweb.freebsd.org/changeset/base/267380 Log: MFC r227519, r227520: r227519 (das) Sync the style, comments, and variable names of arc4random.c with OpenBSD's version (r1.22). No functional changes, as verified with md5. r227520 (das) Further reduce diffs with OpenBSD's arc4random. The main functional change here is to ensure that when a process forks after arc4random is seeded, the parent and child don't observe the same random sequence. OpenBSD's fix introduces some additional overhead in the form of a getpid() call. The only significant remaining difference between our arc4random and OpenBSD's is in how we seed the generator in arc4_stir(). Modified: stable/8/lib/libc/gen/arc4random.c Directory Properties: stable/8/lib/libc/ (props changed) Modified: stable/8/lib/libc/gen/arc4random.c ============================================================================== --- stable/8/lib/libc/gen/arc4random.c Thu Jun 12 00:15:07 2014 (r267379) +++ stable/8/lib/libc/gen/arc4random.c Thu Jun 12 00:19:05 2014 (r267380) @@ -1,3 +1,5 @@ +/* $OpenBSD: arc4random.c,v 1.22 2010/12/22 08:23:42 otto Exp $ */ + /* * Copyright (c) 1996, David Mazieres * Copyright (c) 2008, Damien Miller @@ -24,11 +26,6 @@ * which is a trade secret). The same algorithm is used as a stream * cipher called "arcfour" in Tatu Ylonen's ssh package. * - * Here the stream cipher has been modified always to include the time - * when initializing the state. That makes it impossible to - * regenerate the same random sequence twice, so this can't be used - * for encryption, but will generate good random numbers. - * * RC4 is a registered trademark of RSA Laboratories. */ @@ -36,16 +33,24 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" -#include -#include -#include #include +#include +#include #include +#include +#include +#include #include #include "libc_private.h" #include "un-namespace.h" +#ifdef __GNUC__ +#define inline __inline +#else /* !__GNUC__ */ +#define inline +#endif /* !__GNUC__ */ + struct arc4_stream { u_int8_t i; u_int8_t j; @@ -55,22 +60,22 @@ struct arc4_stream { static pthread_mutex_t arc4random_mtx = PTHREAD_MUTEX_INITIALIZER; #define RANDOMDEV "/dev/random" -#define KEYSIZE 128 -#define THREAD_LOCK() \ +#define KEYSIZE 128 +#define _ARC4_LOCK() \ do { \ if (__isthreaded) \ _pthread_mutex_lock(&arc4random_mtx); \ } while (0) -#define THREAD_UNLOCK() \ +#define _ARC4_UNLOCK() \ do { \ if (__isthreaded) \ _pthread_mutex_unlock(&arc4random_mtx); \ } while (0) -static struct arc4_stream rs; static int rs_initialized; -static int rs_stired; +static struct arc4_stream rs; +static pid_t arc4_stir_pid; static int arc4_count; static inline u_int8_t arc4_getbyte(void); @@ -107,20 +112,24 @@ arc4_addrandom(u_char *dat, int datlen) static void arc4_stir(void) { - int done, fd, n; + int done, fd, i; struct { struct timeval tv; - pid_t pid; - u_int8_t rnd[KEYSIZE]; + pid_t pid; + u_char rnd[KEYSIZE]; } rdat; + if (!rs_initialized) { + arc4_init(); + rs_initialized = 1; + } fd = _open(RANDOMDEV, O_RDONLY, 0); done = 0; if (fd >= 0) { if (_read(fd, &rdat, KEYSIZE) == KEYSIZE) done = 1; (void)_close(fd); - } + } if (!done) { (void)gettimeofday(&rdat.tv, NULL); rdat.pid = getpid(); @@ -130,17 +139,26 @@ arc4_stir(void) arc4_addrandom((u_char *)&rdat, KEYSIZE); /* - * Throw away the first N bytes of output, as suggested in the - * paper "Weaknesses in the Key Scheduling Algorithm of RC4" - * by Fluher, Mantin, and Shamir. N=1024 is based on - * suggestions in the paper "(Not So) Random Shuffles of RC4" - * by Ilya Mironov. + * Discard early keystream, as per recommendations in: + * "(Not So) Random Shuffles of RC4" by Ilya Mironov. */ - for (n = 0; n < 1024; n++) - (void) arc4_getbyte(); + for (i = 0; i < 1024; i++) + (void)arc4_getbyte(); arc4_count = 1600000; } +static void +arc4_stir_if_needed(void) +{ + pid_t pid = getpid(); + + if (arc4_count <= 0 || !rs_initialized || arc4_stir_pid != pid) + { + arc4_stir_pid = pid; + arc4_stir(); + } +} + static inline u_int8_t arc4_getbyte(void) { @@ -152,7 +170,6 @@ arc4_getbyte(void) sj = rs.s[rs.j]; rs.s[rs.i] = sj; rs.s[rs.j] = si; - return (rs.s[(si + sj) & 0xff]); } @@ -160,81 +177,55 @@ static inline u_int32_t arc4_getword(void) { u_int32_t val; - val = arc4_getbyte() << 24; val |= arc4_getbyte() << 16; val |= arc4_getbyte() << 8; val |= arc4_getbyte(); - - return (val); -} - -static void -arc4_check_init(void) -{ - if (!rs_initialized) { - arc4_init(); - rs_initialized = 1; - } -} - -static inline void -arc4_check_stir(void) -{ - if (!rs_stired || arc4_count <= 0) { - arc4_stir(); - rs_stired = 1; - } + return val; } void arc4random_stir(void) { - THREAD_LOCK(); - arc4_check_init(); + _ARC4_LOCK(); arc4_stir(); - rs_stired = 1; - THREAD_UNLOCK(); + _ARC4_UNLOCK(); } void arc4random_addrandom(u_char *dat, int datlen) { - THREAD_LOCK(); - arc4_check_init(); - arc4_check_stir(); + _ARC4_LOCK(); + if (!rs_initialized) + arc4_stir(); arc4_addrandom(dat, datlen); - THREAD_UNLOCK(); + _ARC4_UNLOCK(); } u_int32_t arc4random(void) { - u_int32_t rnd; - - THREAD_LOCK(); - arc4_check_init(); - arc4_check_stir(); - rnd = arc4_getword(); + u_int32_t val; + _ARC4_LOCK(); arc4_count -= 4; - THREAD_UNLOCK(); - - return (rnd); + arc4_stir_if_needed(); + val = arc4_getword(); + _ARC4_UNLOCK(); + return val; } void arc4random_buf(void *_buf, size_t n) { u_char *buf = (u_char *)_buf; - - THREAD_LOCK(); - arc4_check_init(); + _ARC4_LOCK(); + arc4_stir_if_needed(); while (n--) { - arc4_check_stir(); + if (--arc4_count <= 0) + arc4_stir(); buf[n] = arc4_getbyte(); - arc4_count--; } - THREAD_UNLOCK(); + _ARC4_UNLOCK(); } /* @@ -253,7 +244,7 @@ arc4random_uniform(u_int32_t upper_bound u_int32_t r, min; if (upper_bound < 2) - return (0); + return 0; #if (ULONG_MAX > 0xffffffffUL) min = 0x100000000UL % upper_bound; @@ -279,7 +270,7 @@ arc4random_uniform(u_int32_t upper_bound break; } - return (r % upper_bound); + return r % upper_bound; } #if 0 From owner-svn-src-stable@FreeBSD.ORG Thu Jun 12 01:33:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5955351B; Thu, 12 Jun 2014 01:33:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4339A2FBA; Thu, 12 Jun 2014 01:33:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5C1X2Cn022466; Thu, 12 Jun 2014 01:33:02 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5C1X2E5022465; Thu, 12 Jun 2014 01:33:02 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201406120133.s5C1X2E5022465@svn.freebsd.org> From: Ed Maste Date: Thu, 12 Jun 2014 01:33:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267381 - stable/10/sys/dev/vt/font X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 01:33:02 -0000 Author: emaste Date: Thu Jun 12 01:33:01 2014 New Revision: 267381 URL: http://svnweb.freebsd.org/changeset/base/267381 Log: MFC r267109, r267179: Update vt(4) "Terminus BSD Console" font "Terminus BSD Console" is a derivative of Terminus that is provided by Mr. Dimitar Zhekov under the 2-clause BSD license for use by the FreeBSD vt(4) console. Clarify statement on font origin Modified: stable/10/sys/dev/vt/font/vt_font_default.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/font/vt_font_default.c ============================================================================== --- stable/10/sys/dev/vt/font/vt_font_default.c Thu Jun 12 00:19:05 2014 (r267380) +++ stable/10/sys/dev/vt/font/vt_font_default.c Thu Jun 12 01:33:01 2014 (r267381) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 Dimitar Toshkov Zhekov. All rights reserved. + * Copyright (C) 2014 Dimitar Toshkov Zhekov. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -21,8 +21,13 @@ * 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. - * - * Please contribute any changes back to . + */ + +/* + * This is the "Terminus BSD Console" font. It is identical to the standard + * variant of Terminus Font 8x16, but provided under the 2-clause BSD License + * (FreeBSD License). Please contribute any changes back to Mr. Zhekov at + * . */ #include @@ -30,7 +35,7 @@ __FBSDID("$FreeBSD$"); #include -static uint8_t font_bytes[1422 * 16] = { +static uint8_t font_bytes[1477 * 16] = { 0x00, 0x00, 0x7e, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, @@ -784,8 +789,8 @@ static uint8_t font_bytes[1422 * 16] = { 0x40, 0x20, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x04, 0x04, 0x04, 0x04, 0x44, 0x44, 0x44, 0x24, 0x14, 0x0c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x92, 0x92, - 0x92, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x92, 0x92, + 0x92, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x28, 0x28, 0x44, 0x44, 0x82, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x44, 0x44, @@ -952,68 +957,112 @@ static uint8_t font_bytes[1422 * 16] = { 0xff, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0xff, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0xef, 0x00, 0xef, 0x28, 0x28, 0x28, - 0x28, 0x28, 0x28, 0x28, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x28, 0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, + 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x20, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x20, 0xc0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x08, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, + 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xf0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, - 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x0f, 0x0f, 0x0f, 0x0f, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xfe, + 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, + 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf0, 0xf0, 0xf0, 0xf0, + 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, + 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, + 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x80, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, - 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, - 0x88, 0x22, 0x88, 0x22, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, - 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xee, 0xbb, 0xee, 0xbb, + 0x0f, 0x0f, 0x0f, 0x0f, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, + 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0xaa, 0x55, 0xaa, 0x55, + 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xee, 0xbb, 0xee, 0xbb, 0xee, 0xbb, 0xee, 0xbb, 0xee, 0xbb, 0xee, 0xbb, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xf0, 0xf0, - 0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0xf0, 0xf0, 0xf0, 0xf0, - 0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, - 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f, + 0xee, 0xbb, 0xee, 0xbb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, + 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, + 0xf0, 0xf0, 0xf0, 0xf0, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, + 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f, - 0x0f, 0x0f, 0x0f, 0x0f, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, - 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x3c, 0x3c, - 0x3c, 0x3c, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7e, 0x7e, 0x7e, 0x7e, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x38, 0x38, - 0x7c, 0x7c, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xc0, 0xf0, 0xfc, 0xff, 0xfc, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0x7c, 0x7c, 0x38, 0x38, 0x10, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0f, 0x3f, 0xff, - 0x3f, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x10, 0x38, 0x7c, 0xfe, 0x7c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x28, 0x44, 0x82, 0x44, 0x28, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, - 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xe7, 0xc3, 0xc3, 0xe7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xdb, 0xdb, 0xe7, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x7c, 0x82, 0xaa, 0x82, 0x82, 0xba, - 0x92, 0x82, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xfe, - 0xd6, 0xfe, 0xfe, 0xc6, 0xee, 0xfe, 0xfe, 0x7c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x10, 0x92, 0x54, 0x38, 0xee, 0x38, 0x54, 0x92, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x44, 0x44, 0x44, 0x38, - 0x10, 0x7c, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x06, - 0x0a, 0x12, 0x38, 0x44, 0x44, 0x44, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x10, 0x10, 0x38, 0x7c, 0xfe, 0xfe, 0x7c, 0x10, 0x10, 0x38, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x38, 0x10, 0x54, 0xfe, - 0xfe, 0x54, 0x10, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x6c, 0xfe, 0xfe, 0xfe, 0xfe, 0x7c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x3e, 0x22, 0x3e, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0xc0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x42, 0x7e, 0x42, 0x42, 0x42, - 0x42, 0x42, 0x42, 0x44, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, + 0x0f, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0xf0, 0xf0, 0xf0, 0xf0, + 0xf0, 0xf0, 0xf0, 0xf0, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x7e, 0x7e, 0x7e, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, + 0x7e, 0x7e, 0x7e, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x10, 0x38, 0x38, 0x7c, 0x7c, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf0, 0xfc, 0xff, 0xfc, 0xf0, 0xc0, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0x7c, 0x7c, + 0x38, 0x38, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x0f, 0x3f, 0xff, 0x3f, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x7c, 0xfe, 0x7c, 0x38, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x28, 0x44, 0x82, + 0x44, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x18, 0x24, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xc3, 0xc3, 0xe7, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xdb, + 0xdb, 0xe7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x7c, 0x82, + 0xaa, 0x82, 0x82, 0xba, 0x92, 0x82, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x7c, 0xfe, 0xd6, 0xfe, 0xfe, 0xc6, 0xee, 0xfe, 0xfe, 0x7c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x92, 0x54, 0x38, 0xee, + 0x38, 0x54, 0x92, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, + 0x44, 0x44, 0x44, 0x38, 0x10, 0x7c, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x1e, 0x06, 0x0a, 0x12, 0x38, 0x44, 0x44, 0x44, 0x44, 0x38, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x38, 0x7c, 0xfe, 0xfe, + 0x7c, 0x10, 0x10, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, + 0x38, 0x10, 0x54, 0xfe, 0xfe, 0x54, 0x10, 0x38, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x6c, 0xfe, 0xfe, 0xfe, 0xfe, 0x7c, 0x38, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x22, 0x3e, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x42, + 0x7e, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x44, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x02, 0x02, 0x04, 0x04, 0x88, 0x88, 0x50, 0x50, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x06, 0x06, 0xcc, 0xcc, + 0x78, 0x78, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x44, + 0x28, 0x18, 0x18, 0x14, 0x22, 0x20, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x0c, 0xcc, 0x78, 0x38, 0x38, 0x3c, 0x66, 0x60, 0xc0, 0xc0, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x88, 0x9c, 0xaa, 0x88, 0x88, 0x88, + 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x80, + 0x80, 0x80, 0xf8, 0x00, 0x11, 0x19, 0x15, 0x13, 0x11, 0x11, 0x00, 0x00, + 0x00, 0x38, 0x44, 0x44, 0x44, 0x44, 0xfe, 0xfe, 0xee, 0xc6, 0xee, 0xfe, + 0xfe, 0xfe, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff, + 0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0x80, 0x40, 0x20, 0x10, + 0x08, 0x04, 0x02, 0x01, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, + 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff, 0xff, 0x7f, 0x3f, 0x1f, + 0x0f, 0x07, 0x03, 0x01, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, + 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x6c, 0x6c, 0xfe, 0x6c, 0x6c, @@ -1903,19 +1952,39 @@ static uint8_t font_bytes[1422 * 16] = { 0x18, 0x18, 0x18, 0x18, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0xff, 0xff, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0xef, 0xef, 0x00, 0xef, 0xef, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xfe, 0xfe, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, - 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x3c, 0x3c, 0x7e, 0x7e, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf0, 0xfc, 0xff, - 0xff, 0xfc, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x7e, 0x7e, 0x3c, 0x3c, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x03, 0x0f, 0x3f, 0xff, 0xff, 0x3f, 0x0f, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x7e, 0xff, - 0x7e, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x18, 0x3c, 0x66, 0xc3, 0x66, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x42, 0x42, 0x66, 0x3c, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0f, 0x1c, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, + 0xf0, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x38, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1c, 0x0f, 0x07, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, + 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf8, 0xf8, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, + 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x1f, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x38, 0x38, 0x38, + 0x38, 0x38, 0x38, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, + 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, + 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0xfe, 0xfe, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, + 0xfe, 0xfe, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x18, 0x18, 0x3c, 0x3c, 0x7e, 0x7e, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf0, 0xfc, 0xff, 0xff, 0xfc, 0xf0, 0xc0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7e, 0x7e, + 0x3c, 0x3c, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x0f, 0x3f, 0xff, 0xff, 0x3f, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x7e, 0xff, 0x7e, 0x3c, 0x18, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x66, 0xc3, + 0x66, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x3c, 0x66, 0x42, 0x42, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x7e, 0x7e, 0x7e, 0x7e, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc3, 0x99, 0xbd, 0xbd, 0x99, 0xc3, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x18, 0xdb, 0x7e, 0x3c, 0xe7, 0x3c, 0x7e, 0xdb, 0x18, 0x00, 0x00, 0x00, 0x00, @@ -1927,9 +1996,19 @@ static uint8_t font_bytes[1422 * 16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x66, 0x7e, 0x60, 0x60, 0x60, 0x60, 0x60, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x66, 0x7e, 0x66, 0x66, 0x66, 0x66, 0x66, 0x6e, 0xec, 0xc0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x07, 0x07, 0x0e, 0x0e, 0xdc, 0xfc, 0x78, 0x78, 0x30, 0x30, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0xee, 0x7c, 0x3c, 0x3c, 0x3e, + 0x77, 0x73, 0xe0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xcc, 0xde, + 0xff, 0xcc, 0xcc, 0xcc, 0x98, 0x30, 0x60, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xfc, 0x00, 0x33, 0x3b, 0x3f, 0x37, + 0x33, 0x33, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x66, 0xff, 0xff, + 0xe7, 0xc3, 0xe7, 0xff, 0xff, 0xff, 0x00, 0x00, 0x80, 0xc0, 0x60, 0x30, + 0x18, 0x0c, 0x06, 0x03, 0x03, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0x80, + 0x01, 0x03, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0xc0, 0x60, 0x30, 0x18, + 0x0c, 0x06, 0x03, 0x01, }; -static struct vt_font_map font_mapping_normal[248] = { +static struct vt_font_map font_mapping_normal[252] = { { 0x0020, 0x0001, 0x5e }, { 0x00a0, 0x0001, 0x00 }, { 0x00a1, 0x0060, 0x6e }, { 0x0110, 0x008f, 0x00 }, { 0x0111, 0x00cf, 0x08 }, { 0x011a, 0x00d2, 0x01 }, @@ -2038,155 +2117,163 @@ static struct vt_font_map font_mapping_n { 0x2212, 0x000e, 0x00 }, { 0x2219, 0x0233, 0x01 }, { 0x221e, 0x0235, 0x01 }, { 0x2227, 0x0237, 0x03 }, { 0x2248, 0x023b, 0x00 }, { 0x2260, 0x023c, 0x01 }, - { 0x2264, 0x023e, 0x01 }, { 0x2302, 0x0240, 0x00 }, - { 0x2310, 0x0241, 0x00 }, { 0x2320, 0x0242, 0x01 }, - { 0x23ba, 0x0244, 0x03 }, { 0x2409, 0x0248, 0x04 }, - { 0x2424, 0x024d, 0x00 }, { 0x2500, 0x024e, 0x03 }, - { 0x2508, 0x0252, 0x43 }, { 0x2550, 0x0296, 0x1c }, - { 0x2580, 0x02b3, 0x08 }, { 0x258c, 0x02bc, 0x00 }, - { 0x2590, 0x02bd, 0x03 }, { 0x2596, 0x02c1, 0x0a }, - { 0x25ac, 0x02cc, 0x00 }, { 0x25ae, 0x02cd, 0x00 }, - { 0x25b2, 0x02ce, 0x00 }, { 0x25b6, 0x02cf, 0x00 }, - { 0x25bc, 0x02d0, 0x00 }, { 0x25c0, 0x02d1, 0x00 }, - { 0x25c6, 0x02d2, 0x00 }, { 0x25ca, 0x02d3, 0x01 }, - { 0x25d8, 0x02d5, 0x01 }, { 0x263a, 0x02d7, 0x02 }, - { 0x2640, 0x02da, 0x00 }, { 0x2642, 0x02db, 0x00 }, - { 0x2660, 0x02dc, 0x00 }, { 0x2663, 0x02dd, 0x00 }, - { 0x2665, 0x02de, 0x00 }, { 0x2666, 0x02d2, 0x00 }, - { 0x266a, 0x02df, 0x01 }, { 0xf6be, 0x0148, 0x00 }, + { 0x2264, 0x023e, 0x01 }, { 0x2300, 0x0230, 0x00 }, + { 0x2302, 0x0240, 0x00 }, { 0x2310, 0x0241, 0x00 }, + { 0x2320, 0x0242, 0x01 }, { 0x23ba, 0x0244, 0x03 }, + { 0x2409, 0x0248, 0x04 }, { 0x2424, 0x024d, 0x00 }, + { 0x2500, 0x024e, 0x03 }, { 0x2508, 0x0252, 0x43 }, + { 0x2550, 0x0296, 0x20 }, { 0x2574, 0x02b7, 0x1f }, + { 0x2596, 0x02d7, 0x0a }, { 0x25ac, 0x02e2, 0x00 }, + { 0x25ae, 0x02e3, 0x00 }, { 0x25b2, 0x02e4, 0x00 }, + { 0x25b6, 0x02e5, 0x00 }, { 0x25bc, 0x02e6, 0x00 }, + { 0x25c0, 0x02e7, 0x00 }, { 0x25c6, 0x02e8, 0x00 }, + { 0x25ca, 0x02e9, 0x01 }, { 0x25cf, 0x0212, 0x00 }, + { 0x25d8, 0x02eb, 0x01 }, { 0x263a, 0x02ed, 0x02 }, + { 0x2640, 0x02f0, 0x00 }, { 0x2642, 0x02f1, 0x00 }, + { 0x2660, 0x02f2, 0x00 }, { 0x2663, 0x02f3, 0x00 }, + { 0x2665, 0x02f4, 0x00 }, { 0x2666, 0x02e8, 0x00 }, + { 0x266a, 0x02f5, 0x01 }, { 0x2713, 0x02f7, 0x01 }, + { 0x2717, 0x02f9, 0x01 }, { 0xe0a0, 0x02fb, 0x02 }, + { 0xe0b0, 0x02fe, 0x03 }, { 0xf6be, 0x0148, 0x00 }, }; -static struct vt_font_map font_mapping_bold[260] = { - { 0x0021, 0x02e1, 0x0b }, { 0x002d, 0x0205, 0x00 }, - { 0x002e, 0x02ed, 0x50 }, { 0x00a1, 0x033e, 0x07 }, - { 0x00aa, 0x0346, 0x03 }, { 0x00af, 0x034a, 0x07 }, - { 0x00b7, 0x0233, 0x00 }, { 0x00b8, 0x0352, 0x57 }, - { 0x0110, 0x036a, 0x00 }, { 0x0111, 0x03aa, 0x08 }, - { 0x011a, 0x03ad, 0x01 }, { 0x011c, 0x03b3, 0x59 }, - { 0x0178, 0x040d, 0x07 }, { 0x0186, 0x0415, 0x00 }, - { 0x018e, 0x0416, 0x02 }, { 0x0192, 0x0419, 0x00 }, - { 0x019d, 0x041a, 0x01 }, { 0x01b7, 0x041c, 0x00 }, - { 0x0218, 0x041d, 0x03 }, { 0x0232, 0x0421, 0x01 }, - { 0x0237, 0x0423, 0x00 }, { 0x0254, 0x0424, 0x00 }, - { 0x0258, 0x0425, 0x01 }, { 0x025b, 0x0427, 0x00 }, - { 0x0272, 0x0428, 0x00 }, { 0x0292, 0x0429, 0x00 }, - { 0x02bb, 0x042a, 0x02 }, { 0x02c6, 0x042d, 0x01 }, - { 0x02d8, 0x042e, 0x01 }, { 0x02db, 0x0430, 0x02 }, - { 0x0300, 0x031f, 0x00 }, { 0x0301, 0x034f, 0x00 }, - { 0x0302, 0x042d, 0x00 }, { 0x0303, 0x0431, 0x00 }, - { 0x0306, 0x042e, 0x00 }, { 0x030c, 0x042e, 0x00 }, - { 0x0329, 0x0433, 0x00 }, { 0x0384, 0x0434, 0x06 }, - { 0x038c, 0x043b, 0x00 }, { 0x038e, 0x043c, 0x02 }, - { 0x0391, 0x0300, 0x01 }, { 0x0393, 0x043f, 0x01 }, - { 0x0395, 0x0304, 0x00 }, { 0x0396, 0x0319, 0x00 }, - { 0x0397, 0x0307, 0x00 }, { 0x0398, 0x0441, 0x00 }, - { 0x0399, 0x0308, 0x00 }, { 0x039a, 0x030a, 0x00 }, - { 0x039b, 0x0442, 0x00 }, { 0x039c, 0x030c, 0x01 }, - { 0x039e, 0x0443, 0x00 }, { 0x039f, 0x030e, 0x00 }, - { 0x03a0, 0x0444, 0x00 }, { 0x03a1, 0x030f, 0x00 }, - { 0x03a3, 0x0445, 0x00 }, { 0x03a4, 0x0313, 0x00 }, - { 0x03a5, 0x0318, 0x00 }, { 0x03a6, 0x0446, 0x00 }, - { 0x03a7, 0x0317, 0x00 }, { 0x03a8, 0x0447, 0x01 }, - { 0x03aa, 0x0369, 0x00 }, { 0x03ab, 0x040d, 0x00 }, - { 0x03ac, 0x0449, 0x08 }, { 0x03b5, 0x0427, 0x00 }, - { 0x03b6, 0x0452, 0x00 }, { 0x03b7, 0x041b, 0x00 }, - { 0x03b8, 0x0453, 0x01 }, { 0x03ba, 0x03cf, 0x00 }, - { 0x03bb, 0x0455, 0x00 }, { 0x03bc, 0x0350, 0x00 }, - { 0x03bd, 0x0335, 0x00 }, { 0x03be, 0x0456, 0x00 }, - { 0x03bf, 0x032e, 0x00 }, { 0x03c0, 0x0457, 0x0b }, - { 0x03cc, 0x038d, 0x00 }, { 0x03cd, 0x0463, 0x01 }, - { 0x03f3, 0x0329, 0x00 }, { 0x03f4, 0x0465, 0x00 }, - { 0x0400, 0x0362, 0x00 }, { 0x0401, 0x0365, 0x00 }, - { 0x0402, 0x0466, 0x02 }, { 0x0405, 0x0312, 0x00 }, - { 0x0406, 0x0308, 0x00 }, { 0x0407, 0x0369, 0x00 }, - { 0x0408, 0x0309, 0x00 }, { 0x0409, 0x0469, 0x06 }, - { 0x0410, 0x0300, 0x00 }, { 0x0411, 0x0470, 0x00 }, - { 0x0412, 0x0301, 0x00 }, { 0x0413, 0x043f, 0x00 }, - { 0x0414, 0x0471, 0x00 }, { 0x0415, 0x0304, 0x00 }, - { 0x0416, 0x0472, 0x00 }, { 0x0417, 0x02f2, 0x00 }, - { 0x0418, 0x0473, 0x01 }, { 0x041a, 0x030a, 0x00 }, - { 0x041b, 0x0475, 0x00 }, { 0x041c, 0x030c, 0x00 }, - { 0x041d, 0x0307, 0x00 }, { 0x041e, 0x030e, 0x00 }, - { 0x041f, 0x0444, 0x00 }, { 0x0420, 0x030f, 0x00 }, - { 0x0421, 0x0302, 0x00 }, { 0x0422, 0x0313, 0x00 }, - { 0x0423, 0x0476, 0x01 }, { 0x0425, 0x0317, 0x00 }, - { 0x0426, 0x0478, 0x09 }, { 0x0430, 0x0320, 0x00 }, - { 0x0431, 0x0482, 0x02 }, { 0x0434, 0x0326, 0x00 }, - { 0x0435, 0x0324, 0x00 }, { 0x0436, 0x0485, 0x01 }, - { 0x0438, 0x0334, 0x00 }, { 0x0439, 0x0404, 0x00 }, - { 0x043a, 0x03cf, 0x00 }, { 0x043b, 0x0487, 0x02 }, - { 0x043e, 0x032e, 0x00 }, { 0x043f, 0x0457, 0x00 }, - { 0x0440, 0x032f, 0x00 }, { 0x0441, 0x0322, 0x00 }, - { 0x0442, 0x048a, 0x00 }, { 0x0443, 0x0338, 0x00 }, - { 0x0444, 0x048b, 0x00 }, { 0x0445, 0x0337, 0x00 }, - { 0x0446, 0x048c, 0x09 }, { 0x0450, 0x0382, 0x00 }, - { 0x0451, 0x0385, 0x00 }, { 0x0452, 0x0496, 0x02 }, - { 0x0455, 0x0332, 0x00 }, { 0x0456, 0x0328, 0x00 }, - { 0x0457, 0x0389, 0x00 }, { 0x0458, 0x0329, 0x00 }, - { 0x0459, 0x0499, 0x01 }, { 0x045b, 0x03be, 0x00 }, - { 0x045c, 0x049b, 0x00 }, { 0x045d, 0x0393, 0x00 }, - { 0x045e, 0x049c, 0x01 }, { 0x0490, 0x049e, 0x0d }, - { 0x04a0, 0x04ac, 0x05 }, { 0x04aa, 0x04b2, 0x01 }, - { 0x04ae, 0x0318, 0x00 }, { 0x04af, 0x0450, 0x00 }, - { 0x04b0, 0x04b4, 0x03 }, { 0x04b6, 0x04b8, 0x05 }, - { 0x04d0, 0x039c, 0x01 }, { 0x04d2, 0x035e, 0x00 }, - { 0x04d3, 0x037e, 0x00 }, { 0x04d4, 0x0360, 0x00 }, - { 0x04d5, 0x0380, 0x00 }, { 0x04d6, 0x03ad, 0x01 }, - { 0x04d8, 0x0417, 0x00 }, { 0x04d9, 0x0426, 0x00 }, - { 0x04da, 0x04be, 0x05 }, { 0x04e2, 0x04c4, 0x00 }, - { 0x04e3, 0x0402, 0x00 }, { 0x04e4, 0x04c5, 0x00 }, - { 0x04e5, 0x0396, 0x00 }, { 0x04e6, 0x0370, 0x00 }, - { 0x04e7, 0x0390, 0x00 }, { 0x04e8, 0x0465, 0x00 }, - { 0x04e9, 0x04c6, 0x05 }, { 0x04ef, 0x0422, 0x00 }, - { 0x04f0, 0x04cc, 0x00 }, { 0x04f1, 0x0399, 0x00 }, - { 0x04f2, 0x04cd, 0x03 }, { 0x04f8, 0x04d1, 0x01 }, - { 0x1e34, 0x04d3, 0x01 }, { 0x1eb8, 0x04d5, 0x01 }, - { 0x1ebc, 0x04d7, 0x01 }, { 0x1eca, 0x04d9, 0x03 }, - { 0x1ee4, 0x04dd, 0x01 }, { 0x1ef8, 0x04df, 0x01 }, - { 0x2010, 0x0349, 0x00 }, { 0x2011, 0x0349, 0x00 }, +static struct vt_font_map font_mapping_bold[272] = { + { 0x0021, 0x0302, 0x0b }, { 0x002d, 0x0205, 0x00 }, + { 0x002e, 0x030e, 0x50 }, { 0x00a1, 0x035f, 0x07 }, + { 0x00aa, 0x0367, 0x03 }, { 0x00af, 0x036b, 0x07 }, + { 0x00b7, 0x0233, 0x00 }, { 0x00b8, 0x0373, 0x57 }, + { 0x0110, 0x038b, 0x00 }, { 0x0111, 0x03cb, 0x08 }, + { 0x011a, 0x03ce, 0x01 }, { 0x011c, 0x03d4, 0x59 }, + { 0x0178, 0x042e, 0x07 }, { 0x0186, 0x0436, 0x00 }, + { 0x018e, 0x0437, 0x02 }, { 0x0192, 0x043a, 0x00 }, + { 0x019d, 0x043b, 0x01 }, { 0x01b7, 0x043d, 0x00 }, + { 0x0218, 0x043e, 0x03 }, { 0x0232, 0x0442, 0x01 }, + { 0x0237, 0x0444, 0x00 }, { 0x0254, 0x0445, 0x00 }, + { 0x0258, 0x0446, 0x01 }, { 0x025b, 0x0448, 0x00 }, + { 0x0272, 0x0449, 0x00 }, { 0x0292, 0x044a, 0x00 }, + { 0x02bb, 0x044b, 0x02 }, { 0x02c6, 0x044e, 0x01 }, + { 0x02d8, 0x044f, 0x01 }, { 0x02db, 0x0451, 0x02 }, + { 0x0300, 0x0340, 0x00 }, { 0x0301, 0x0370, 0x00 }, + { 0x0302, 0x044e, 0x00 }, { 0x0303, 0x0452, 0x00 }, + { 0x0306, 0x044f, 0x00 }, { 0x030c, 0x044f, 0x00 }, + { 0x0329, 0x0454, 0x00 }, { 0x0384, 0x0455, 0x06 }, + { 0x038c, 0x045c, 0x00 }, { 0x038e, 0x045d, 0x02 }, + { 0x0391, 0x0321, 0x01 }, { 0x0393, 0x0460, 0x01 }, + { 0x0395, 0x0325, 0x00 }, { 0x0396, 0x033a, 0x00 }, + { 0x0397, 0x0328, 0x00 }, { 0x0398, 0x0462, 0x00 }, + { 0x0399, 0x0329, 0x00 }, { 0x039a, 0x032b, 0x00 }, + { 0x039b, 0x0463, 0x00 }, { 0x039c, 0x032d, 0x01 }, + { 0x039e, 0x0464, 0x00 }, { 0x039f, 0x032f, 0x00 }, + { 0x03a0, 0x0465, 0x00 }, { 0x03a1, 0x0330, 0x00 }, + { 0x03a3, 0x0466, 0x00 }, { 0x03a4, 0x0334, 0x00 }, + { 0x03a5, 0x0339, 0x00 }, { 0x03a6, 0x0467, 0x00 }, + { 0x03a7, 0x0338, 0x00 }, { 0x03a8, 0x0468, 0x01 }, + { 0x03aa, 0x038a, 0x00 }, { 0x03ab, 0x042e, 0x00 }, + { 0x03ac, 0x046a, 0x08 }, { 0x03b5, 0x0448, 0x00 }, + { 0x03b6, 0x0473, 0x00 }, { 0x03b7, 0x043c, 0x00 }, + { 0x03b8, 0x0474, 0x01 }, { 0x03ba, 0x03f0, 0x00 }, + { 0x03bb, 0x0476, 0x00 }, { 0x03bc, 0x0371, 0x00 }, + { 0x03bd, 0x0356, 0x00 }, { 0x03be, 0x0477, 0x00 }, + { 0x03bf, 0x034f, 0x00 }, { 0x03c0, 0x0478, 0x0b }, + { 0x03cc, 0x03ae, 0x00 }, { 0x03cd, 0x0484, 0x01 }, + { 0x03f3, 0x034a, 0x00 }, { 0x03f4, 0x0486, 0x00 }, + { 0x0400, 0x0383, 0x00 }, { 0x0401, 0x0386, 0x00 }, + { 0x0402, 0x0487, 0x02 }, { 0x0405, 0x0333, 0x00 }, + { 0x0406, 0x0329, 0x00 }, { 0x0407, 0x038a, 0x00 }, + { 0x0408, 0x032a, 0x00 }, { 0x0409, 0x048a, 0x06 }, + { 0x0410, 0x0321, 0x00 }, { 0x0411, 0x0491, 0x00 }, + { 0x0412, 0x0322, 0x00 }, { 0x0413, 0x0460, 0x00 }, + { 0x0414, 0x0492, 0x00 }, { 0x0415, 0x0325, 0x00 }, + { 0x0416, 0x0493, 0x00 }, { 0x0417, 0x0313, 0x00 }, + { 0x0418, 0x0494, 0x01 }, { 0x041a, 0x032b, 0x00 }, + { 0x041b, 0x0496, 0x00 }, { 0x041c, 0x032d, 0x00 }, + { 0x041d, 0x0328, 0x00 }, { 0x041e, 0x032f, 0x00 }, + { 0x041f, 0x0465, 0x00 }, { 0x0420, 0x0330, 0x00 }, + { 0x0421, 0x0323, 0x00 }, { 0x0422, 0x0334, 0x00 }, + { 0x0423, 0x0497, 0x01 }, { 0x0425, 0x0338, 0x00 }, + { 0x0426, 0x0499, 0x09 }, { 0x0430, 0x0341, 0x00 }, + { 0x0431, 0x04a3, 0x02 }, { 0x0434, 0x0347, 0x00 }, + { 0x0435, 0x0345, 0x00 }, { 0x0436, 0x04a6, 0x01 }, + { 0x0438, 0x0355, 0x00 }, { 0x0439, 0x0425, 0x00 }, + { 0x043a, 0x03f0, 0x00 }, { 0x043b, 0x04a8, 0x02 }, + { 0x043e, 0x034f, 0x00 }, { 0x043f, 0x0478, 0x00 }, + { 0x0440, 0x0350, 0x00 }, { 0x0441, 0x0343, 0x00 }, + { 0x0442, 0x04ab, 0x00 }, { 0x0443, 0x0359, 0x00 }, + { 0x0444, 0x04ac, 0x00 }, { 0x0445, 0x0358, 0x00 }, + { 0x0446, 0x04ad, 0x09 }, { 0x0450, 0x03a3, 0x00 }, + { 0x0451, 0x03a6, 0x00 }, { 0x0452, 0x04b7, 0x02 }, + { 0x0455, 0x0353, 0x00 }, { 0x0456, 0x0349, 0x00 }, + { 0x0457, 0x03aa, 0x00 }, { 0x0458, 0x034a, 0x00 }, + { 0x0459, 0x04ba, 0x01 }, { 0x045b, 0x03df, 0x00 }, + { 0x045c, 0x04bc, 0x00 }, { 0x045d, 0x03b4, 0x00 }, + { 0x045e, 0x04bd, 0x01 }, { 0x0490, 0x04bf, 0x0d }, + { 0x04a0, 0x04cd, 0x05 }, { 0x04aa, 0x04d3, 0x01 }, + { 0x04ae, 0x0339, 0x00 }, { 0x04af, 0x0471, 0x00 }, + { 0x04b0, 0x04d5, 0x03 }, { 0x04b6, 0x04d9, 0x05 }, + { 0x04d0, 0x03bd, 0x01 }, { 0x04d2, 0x037f, 0x00 }, + { 0x04d3, 0x039f, 0x00 }, { 0x04d4, 0x0381, 0x00 }, + { 0x04d5, 0x03a1, 0x00 }, { 0x04d6, 0x03ce, 0x01 }, + { 0x04d8, 0x0438, 0x00 }, { 0x04d9, 0x0447, 0x00 }, + { 0x04da, 0x04df, 0x05 }, { 0x04e2, 0x04e5, 0x00 }, + { 0x04e3, 0x0423, 0x00 }, { 0x04e4, 0x04e6, 0x00 }, + { 0x04e5, 0x03b7, 0x00 }, { 0x04e6, 0x0391, 0x00 }, + { 0x04e7, 0x03b1, 0x00 }, { 0x04e8, 0x0486, 0x00 }, + { 0x04e9, 0x04e7, 0x05 }, { 0x04ef, 0x0443, 0x00 }, + { 0x04f0, 0x04ed, 0x00 }, { 0x04f1, 0x03ba, 0x00 }, + { 0x04f2, 0x04ee, 0x03 }, { 0x04f8, 0x04f2, 0x01 }, + { 0x1e34, 0x04f4, 0x01 }, { 0x1eb8, 0x04f6, 0x01 }, + { 0x1ebc, 0x04f8, 0x01 }, { 0x1eca, 0x04fa, 0x03 }, + { 0x1ee4, 0x04fe, 0x01 }, { 0x1ef8, 0x0500, 0x01 }, + { 0x2010, 0x036a, 0x00 }, { 0x2011, 0x036a, 0x00 }, { 0x2012, 0x0205, 0x00 }, { 0x2013, 0x0205, 0x00 }, - { 0x2016, 0x04e1, 0x03 }, { 0x201a, 0x02ec, 0x00 }, - { 0x201b, 0x04e5, 0x06 }, { 0x2026, 0x04ec, 0x00 }, - { 0x2030, 0x04ed, 0x00 }, { 0x2032, 0x04ee, 0x01 }, - { 0x2039, 0x04f0, 0x01 }, { 0x203c, 0x04f2, 0x00 }, - { 0x203e, 0x04f3, 0x00 }, { 0x207f, 0x04f4, 0x00 }, - { 0x20a7, 0x04f5, 0x00 }, { 0x20ac, 0x04f6, 0x00 }, - { 0x20ae, 0x04f7, 0x00 }, { 0x210e, 0x0327, 0x00 }, - { 0x210f, 0x03be, 0x00 }, { 0x2126, 0x0448, 0x00 }, - { 0x2190, 0x04f8, 0x05 }, { 0x21a8, 0x04fe, 0x00 }, - { 0x21b5, 0x04ff, 0x00 }, { 0x21d0, 0x0500, 0x05 }, - { 0x2203, 0x0506, 0x00 }, { 0x2205, 0x0507, 0x00 }, - { 0x2206, 0x0440, 0x00 }, { 0x2208, 0x0508, 0x00 }, - { 0x220a, 0x0509, 0x00 }, { 0x2212, 0x0205, 0x00 }, - { 0x2219, 0x050a, 0x01 }, { 0x221e, 0x050c, 0x01 }, - { 0x2227, 0x050e, 0x03 }, { 0x2248, 0x0512, 0x00 }, - { 0x2260, 0x0513, 0x01 }, { 0x2264, 0x0515, 0x01 }, - { 0x2302, 0x0517, 0x00 }, { 0x2310, 0x0518, 0x00 }, - { 0x2320, 0x0519, 0x01 }, { 0x23ba, 0x051b, 0x02 }, - { 0x23bd, 0x02b4, 0x00 }, { 0x2409, 0x051e, 0x04 }, - { 0x2424, 0x0523, 0x00 }, { 0x2500, 0x024f, 0x00 }, - { 0x2501, 0x0524, 0x00 }, { 0x2502, 0x0251, 0x00 }, - { 0x2503, 0x0525, 0x00 }, { 0x2508, 0x0253, 0x00 }, - { 0x2509, 0x0526, 0x00 }, { 0x250a, 0x0255, 0x00 }, - { 0x250b, 0x0527, 0x00 }, { 0x250c, 0x0259, 0x00 }, - { 0x250d, 0x0528, 0x02 }, { 0x2510, 0x025d, 0x00 }, - { 0x2511, 0x052b, 0x02 }, { 0x2514, 0x0261, 0x00 }, - { 0x2515, 0x052e, 0x02 }, { 0x2518, 0x0265, 0x00 }, - { 0x2519, 0x0531, 0x02 }, { 0x251c, 0x026d, 0x00 }, - { 0x251d, 0x0534, 0x06 }, { 0x2524, 0x0275, 0x00 }, - { 0x2525, 0x053b, 0x06 }, { 0x252c, 0x027d, 0x00 }, - { 0x252d, 0x0542, 0x06 }, { 0x2534, 0x0285, 0x00 }, - { 0x2535, 0x0549, 0x06 }, { 0x253c, 0x0295, 0x00 }, - { 0x253d, 0x0550, 0x0e }, { 0x2550, 0x055f, 0x1c }, - { 0x25a0, 0x057c, 0x00 }, { 0x25ac, 0x057d, 0x00 }, - { 0x25ae, 0x057e, 0x00 }, { 0x25b2, 0x057f, 0x00 }, - { 0x25b6, 0x0580, 0x00 }, { 0x25bc, 0x0581, 0x00 }, - { 0x25c0, 0x0582, 0x00 }, { 0x25c6, 0x0583, 0x00 }, - { 0x25ca, 0x0584, 0x01 }, { 0x25d9, 0x0586, 0x00 }, - { 0x263c, 0x0587, 0x00 }, { 0x2640, 0x0588, 0x00 }, - { 0x2642, 0x0589, 0x00 }, { 0x2660, 0x058a, 0x00 }, - { 0x2663, 0x058b, 0x00 }, { 0x2666, 0x0583, 0x00 }, - { 0x266a, 0x058c, 0x01 }, { 0xf6be, 0x0423, 0x00 }, + { 0x2016, 0x0502, 0x03 }, { 0x201a, 0x030d, 0x00 }, + { 0x201b, 0x0506, 0x06 }, { 0x2026, 0x050d, 0x00 }, + { 0x2030, 0x050e, 0x00 }, { 0x2032, 0x050f, 0x01 }, + { 0x2039, 0x0511, 0x01 }, { 0x203c, 0x0513, 0x00 }, + { 0x203e, 0x0514, 0x00 }, { 0x207f, 0x0515, 0x00 }, + { 0x20a7, 0x0516, 0x00 }, { 0x20ac, 0x0517, 0x00 }, + { 0x20ae, 0x0518, 0x00 }, { 0x210e, 0x0348, 0x00 }, + { 0x210f, 0x03df, 0x00 }, { 0x2126, 0x0469, 0x00 }, + { 0x2190, 0x0519, 0x05 }, { 0x21a8, 0x051f, 0x00 }, + { 0x21b5, 0x0520, 0x00 }, { 0x21d0, 0x0521, 0x05 }, + { 0x2203, 0x0527, 0x00 }, { 0x2205, 0x0528, 0x00 }, + { 0x2206, 0x0461, 0x00 }, { 0x2208, 0x0529, 0x00 }, + { 0x220a, 0x052a, 0x00 }, { 0x2212, 0x0205, 0x00 }, + { 0x2219, 0x052b, 0x01 }, { 0x221e, 0x052d, 0x01 }, + { 0x2227, 0x052f, 0x03 }, { 0x2248, 0x0533, 0x00 }, + { 0x2260, 0x0534, 0x01 }, { 0x2264, 0x0536, 0x01 }, + { 0x2300, 0x0528, 0x00 }, { 0x2302, 0x0538, 0x00 }, + { 0x2310, 0x0539, 0x00 }, { 0x2320, 0x053a, 0x01 }, + { 0x23ba, 0x053c, 0x02 }, { 0x23bd, 0x02c4, 0x00 }, + { 0x2409, 0x053f, 0x04 }, { 0x2424, 0x0544, 0x00 }, + { 0x2500, 0x024f, 0x00 }, { 0x2501, 0x0545, 0x00 }, + { 0x2502, 0x0251, 0x00 }, { 0x2503, 0x0546, 0x00 }, + { 0x2508, 0x0253, 0x00 }, { 0x2509, 0x0547, 0x00 }, + { 0x250a, 0x0255, 0x00 }, { 0x250b, 0x0548, 0x00 }, + { 0x250c, 0x0259, 0x00 }, { 0x250d, 0x0549, 0x02 }, + { 0x2510, 0x025d, 0x00 }, { 0x2511, 0x054c, 0x02 }, + { 0x2514, 0x0261, 0x00 }, { 0x2515, 0x054f, 0x02 }, + { 0x2518, 0x0265, 0x00 }, { 0x2519, 0x0552, 0x02 }, + { 0x251c, 0x026d, 0x00 }, { 0x251d, 0x0555, 0x06 }, + { 0x2524, 0x0275, 0x00 }, { 0x2525, 0x055c, 0x06 }, + { 0x252c, 0x027d, 0x00 }, { 0x252d, 0x0563, 0x06 }, + { 0x2534, 0x0285, 0x00 }, { 0x2535, 0x056a, 0x06 }, + { 0x253c, 0x0295, 0x00 }, { 0x253d, 0x0571, 0x0e }, + { 0x2550, 0x0580, 0x20 }, { 0x2574, 0x05a1, 0x01 }, + { 0x2576, 0x02bd, 0x01 }, { 0x2578, 0x05a3, 0x07 }, + { 0x25a0, 0x05ab, 0x00 }, { 0x25ac, 0x05ac, 0x00 }, + { 0x25ae, 0x05ad, 0x00 }, { 0x25b2, 0x05ae, 0x00 }, + { 0x25b6, 0x05af, 0x00 }, { 0x25bc, 0x05b0, 0x00 }, + { 0x25c0, 0x05b1, 0x00 }, { 0x25c6, 0x05b2, 0x00 }, + { 0x25ca, 0x05b3, 0x01 }, { 0x25cf, 0x05b5, 0x00 }, + { 0x25d9, 0x05b6, 0x00 }, { 0x263c, 0x05b7, 0x00 }, + { 0x2640, 0x05b8, 0x00 }, { 0x2642, 0x05b9, 0x00 }, + { 0x2660, 0x05ba, 0x00 }, { 0x2663, 0x05bb, 0x00 }, + { 0x2666, 0x05b2, 0x00 }, { 0x266a, 0x05bc, 0x01 }, + { 0x2713, 0x02f8, 0x00 }, { 0x2714, 0x05be, 0x00 }, + { 0x2717, 0x02fa, 0x00 }, { 0x2718, 0x05bf, 0x00 }, + { 0xe0a0, 0x05c0, 0x02 }, { 0xe0b1, 0x05c3, 0x00 }, + { 0xe0b3, 0x05c4, 0x00 }, { 0xf6be, 0x0444, 0x00 }, }; struct vt_font vt_font_default = { @@ -2199,6 +2286,6 @@ struct vt_font vt_font_default = { font_mapping_bold, NULL, }, - .vf_map_count = { 248, 0, 260, 0 }, + .vf_map_count = { 252, 0, 272, 0 }, .vf_refcount = 1, }; From owner-svn-src-stable@FreeBSD.ORG Thu Jun 12 04:47:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 493132A7; Thu, 12 Jun 2014 04:47:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 343FD2E3D; Thu, 12 Jun 2014 04:47:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5C4lFG0009402; Thu, 12 Jun 2014 04:47:15 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5C4lFHF009401; Thu, 12 Jun 2014 04:47:15 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201406120447.s5C4lFHF009401@svn.freebsd.org> From: Bryan Venteicher Date: Thu, 12 Jun 2014 04:47:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267382 - stable/10/sys/dev/vmware/vmxnet3 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 04:47:15 -0000 Author: bryanv Date: Thu Jun 12 04:47:14 2014 New Revision: 267382 URL: http://svnweb.freebsd.org/changeset/base/267382 Log: MFC r267252, r267253: - Remove an unnecessary variable reassignment - Fix TSO support on VMware Fusion Modified: stable/10/sys/dev/vmware/vmxnet3/if_vmx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vmware/vmxnet3/if_vmx.c ============================================================================== --- stable/10/sys/dev/vmware/vmxnet3/if_vmx.c Thu Jun 12 01:33:01 2014 (r267381) +++ stable/10/sys/dev/vmware/vmxnet3/if_vmx.c Thu Jun 12 04:47:14 2014 (r267382) @@ -55,6 +55,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include #include #include @@ -2602,6 +2604,12 @@ vmxnet3_txq_offload_ctx(struct vmxnet3_t { struct ether_vlan_header *evh; int offset; +#if defined(INET) + struct ip *ip, iphdr; +#endif +#if defined(INET6) + struct ip6_hdr *ip6, ip6hdr; +#endif evh = mtod(m, struct ether_vlan_header *); if (evh->evl_encap_proto == htons(ETHERTYPE_VLAN)) { @@ -2615,8 +2623,7 @@ vmxnet3_txq_offload_ctx(struct vmxnet3_t switch (*etype) { #if defined(INET) - case ETHERTYPE_IP: { - struct ip *ip, iphdr; + case ETHERTYPE_IP: if (__predict_false(m->m_len < offset + sizeof(struct ip))) { m_copydata(m, offset, sizeof(struct ip), (caddr_t) &iphdr); @@ -2626,10 +2633,16 @@ vmxnet3_txq_offload_ctx(struct vmxnet3_t *proto = ip->ip_p; *start = offset + (ip->ip_hl << 2); break; - } #endif #if defined(INET6) case ETHERTYPE_IPV6: + if (__predict_false(m->m_len < + offset + sizeof(struct ip6_hdr))) { + m_copydata(m, offset, sizeof(struct ip6_hdr), + (caddr_t) &ip6hdr); + ip6 = &ip6hdr; + } else + ip6 = mtodo(m, offset); *proto = -1; *start = ip6_lasthdr(m, offset, IPPROTO_IPV6, proto); /* Assert the network stack sent us a valid packet. */ @@ -2644,6 +2657,7 @@ vmxnet3_txq_offload_ctx(struct vmxnet3_t if (m->m_pkthdr.csum_flags & CSUM_TSO) { struct tcphdr *tcp, tcphdr; + uint16_t sum; if (__predict_false(*proto != IPPROTO_TCP)) { /* Likely failed to correctly parse the mbuf. */ @@ -2652,16 +2666,38 @@ vmxnet3_txq_offload_ctx(struct vmxnet3_t txq->vxtxq_stats.vmtxs_tso++; - /* - * For TSO, the size of the protocol header is also - * included in the descriptor header size. - */ + switch (*etype) { +#if defined(INET) + case ETHERTYPE_IP: + sum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr, + htons(IPPROTO_TCP)); + break; +#endif +#if defined(INET6) + case ETHERTYPE_IPV6: + sum = in6_cksum_pseudo(ip6, 0, IPPROTO_TCP, 0); + break; +#endif + default: + sum = 0; + break; + } + if (m->m_len < *start + sizeof(struct tcphdr)) { - m_copydata(m, offset, sizeof(struct tcphdr), + m_copyback(m, *start + offsetof(struct tcphdr, th_sum), + sizeof(uint16_t), (caddr_t) &sum); + m_copydata(m, *start, sizeof(struct tcphdr), (caddr_t) &tcphdr); tcp = &tcphdr; - } else + } else { tcp = mtodo(m, *start); + tcp->th_sum = sum; + } + + /* + * For TSO, the size of the protocol header is also + * included in the descriptor header size. + */ *start += (tcp->th_off << 2); } else txq->vxtxq_stats.vmtxs_csum++; @@ -2755,7 +2791,7 @@ vmxnet3_txq_encap(struct vmxnet3_txqueue } } - txr->vxtxr_txbuf[txr->vxtxr_head].vtxb_m = m = *m0; + txr->vxtxr_txbuf[txr->vxtxr_head].vtxb_m = m; sop = &txr->vxtxr_txd[txr->vxtxr_head]; gen = txr->vxtxr_gen ^ 1; /* Owned by cpu (yet) */ From owner-svn-src-stable@FreeBSD.ORG Thu Jun 12 13:13:19 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6D368DEF; Thu, 12 Jun 2014 13:13:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 578AA2A76; Thu, 12 Jun 2014 13:13:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5CDDJWl041248; Thu, 12 Jun 2014 13:13:19 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5CDDFNm041223; Thu, 12 Jun 2014 13:13:15 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406121313.s5CDDFNm041223@svn.freebsd.org> From: John Baldwin Date: Thu, 12 Jun 2014 13:13:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267393 - in stable/10: lib/libvmmapi sys/amd64/include sys/amd64/vmm usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 13:13:19 -0000 Author: jhb Date: Thu Jun 12 13:13:15 2014 New Revision: 267393 URL: http://svnweb.freebsd.org/changeset/base/267393 Log: MFC 260239,261268,265058: Expand the support for PCI INTx interrupts including providing interrupt routing information for INTx interrupts to I/O APIC pins and enabling INTx interrupts in the virtio and AHCI backends. Added: stable/10/usr.sbin/bhyve/ioapic.c - copied unchanged from r261268, head/usr.sbin/bhyve/ioapic.c stable/10/usr.sbin/bhyve/ioapic.h - copied unchanged from r261268, head/usr.sbin/bhyve/ioapic.h Deleted: stable/10/usr.sbin/bhyve/legacy_irq.c stable/10/usr.sbin/bhyve/legacy_irq.h Modified: stable/10/lib/libvmmapi/vmmapi.c stable/10/lib/libvmmapi/vmmapi.h stable/10/sys/amd64/include/vmm_dev.h stable/10/sys/amd64/vmm/vmm_dev.c stable/10/usr.sbin/bhyve/Makefile stable/10/usr.sbin/bhyve/bhyverun.c stable/10/usr.sbin/bhyve/mptbl.c stable/10/usr.sbin/bhyve/pci_ahci.c stable/10/usr.sbin/bhyve/pci_emul.c stable/10/usr.sbin/bhyve/pci_emul.h stable/10/usr.sbin/bhyve/pci_uart.c stable/10/usr.sbin/bhyve/pci_virtio_block.c stable/10/usr.sbin/bhyve/pci_virtio_net.c stable/10/usr.sbin/bhyve/virtio.c stable/10/usr.sbin/bhyve/virtio.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libvmmapi/vmmapi.c ============================================================================== --- stable/10/lib/libvmmapi/vmmapi.c Thu Jun 12 12:43:48 2014 (r267392) +++ stable/10/lib/libvmmapi/vmmapi.c Thu Jun 12 13:13:15 2014 (r267393) @@ -454,6 +454,13 @@ vm_ioapic_pulse_irq(struct vmctx *ctx, i } int +vm_ioapic_pincount(struct vmctx *ctx, int *pincount) +{ + + return (ioctl(ctx->fd, VM_IOAPIC_PINCOUNT, pincount)); +} + +int vm_inject_nmi(struct vmctx *ctx, int vcpu) { struct vm_nmi vmnmi; Modified: stable/10/lib/libvmmapi/vmmapi.h ============================================================================== --- stable/10/lib/libvmmapi/vmmapi.h Thu Jun 12 12:43:48 2014 (r267392) +++ stable/10/lib/libvmmapi/vmmapi.h Thu Jun 12 13:13:15 2014 (r267393) @@ -72,6 +72,7 @@ int vm_lapic_msi(struct vmctx *ctx, uint int vm_ioapic_assert_irq(struct vmctx *ctx, int irq); int vm_ioapic_deassert_irq(struct vmctx *ctx, int irq); int vm_ioapic_pulse_irq(struct vmctx *ctx, int irq); +int vm_ioapic_pincount(struct vmctx *ctx, int *pincount); int vm_inject_nmi(struct vmctx *ctx, int vcpu); int vm_capability_name2type(const char *capname); const char *vm_capability_type2name(int type); Modified: stable/10/sys/amd64/include/vmm_dev.h ============================================================================== --- stable/10/sys/amd64/include/vmm_dev.h Thu Jun 12 12:43:48 2014 (r267392) +++ stable/10/sys/amd64/include/vmm_dev.h Thu Jun 12 13:13:15 2014 (r267393) @@ -181,7 +181,8 @@ enum { IOCNUM_IOAPIC_DEASSERT_IRQ = 34, IOCNUM_IOAPIC_PULSE_IRQ = 35, IOCNUM_LAPIC_MSI = 36, - IOCNUM_LAPIC_LOCAL_IRQ = 37, + IOCNUM_LAPIC_LOCAL_IRQ = 37, + IOCNUM_IOAPIC_PINCOUNT = 38, /* PCI pass-thru */ IOCNUM_BIND_PPTDEV = 40, @@ -228,6 +229,8 @@ enum { _IOW('v', IOCNUM_IOAPIC_DEASSERT_IRQ, struct vm_ioapic_irq) #define VM_IOAPIC_PULSE_IRQ \ _IOW('v', IOCNUM_IOAPIC_PULSE_IRQ, struct vm_ioapic_irq) +#define VM_IOAPIC_PINCOUNT \ + _IOR('v', IOCNUM_IOAPIC_PINCOUNT, int) #define VM_SET_CAPABILITY \ _IOW('v', IOCNUM_SET_CAPABILITY, struct vm_capability) #define VM_GET_CAPABILITY \ Modified: stable/10/sys/amd64/vmm/vmm_dev.c ============================================================================== --- stable/10/sys/amd64/vmm/vmm_dev.c Thu Jun 12 12:43:48 2014 (r267392) +++ stable/10/sys/amd64/vmm/vmm_dev.c Thu Jun 12 13:13:15 2014 (r267393) @@ -318,6 +318,9 @@ vmmdev_ioctl(struct cdev *cdev, u_long c ioapic_irq = (struct vm_ioapic_irq *)data; error = vioapic_pulse_irq(sc->vm, ioapic_irq->irq); break; + case VM_IOAPIC_PINCOUNT: + *(int *)data = vioapic_pincount(sc->vm); + break; case VM_MAP_MEMORY: seg = (struct vm_memory_segment *)data; error = vm_malloc(sc->vm, seg->gpa, seg->len); Modified: stable/10/usr.sbin/bhyve/Makefile ============================================================================== --- stable/10/usr.sbin/bhyve/Makefile Thu Jun 12 12:43:48 2014 (r267392) +++ stable/10/usr.sbin/bhyve/Makefile Thu Jun 12 13:13:15 2014 (r267393) @@ -7,11 +7,37 @@ PROG= bhyve DEBUG_FLAGS= -g -O0 MAN= bhyve.8 -SRCS= acpi.c atpic.c bhyverun.c block_if.c consport.c dbgport.c elcr.c -SRCS+= inout.c legacy_irq.c mem.c mevent.c mptbl.c pci_ahci.c -SRCS+= pci_emul.c pci_hostbridge.c pci_lpc.c pci_passthru.c pci_virtio_block.c -SRCS+= pci_virtio_net.c pci_uart.c pit_8254.c pm.c pmtmr.c post.c rtc.c -SRCS+= uart_emul.c virtio.c xmsr.c spinup_ap.c + +SRCS= \ + acpi.c \ + atpic.c \ + bhyverun.c \ + block_if.c \ + consport.c \ + dbgport.c \ + elcr.c \ + inout.c \ + ioapic.c \ + mem.c \ + mevent.c \ + mptbl.c \ + pci_ahci.c \ + pci_emul.c \ + pci_hostbridge.c \ + pci_lpc.c \ + pci_passthru.c \ + pci_virtio_block.c \ + pci_virtio_net.c \ + pci_uart.c \ + pit_8254.c \ + pm.c \ + pmtmr.c \ + post.c \ + rtc.c \ + uart_emul.c \ + virtio.c \ + xmsr.c \ + spinup_ap.c .PATH: ${.CURDIR}/../../sys/amd64/vmm SRCS+= vmm_instruction_emul.c Modified: stable/10/usr.sbin/bhyve/bhyverun.c ============================================================================== --- stable/10/usr.sbin/bhyve/bhyverun.c Thu Jun 12 12:43:48 2014 (r267392) +++ stable/10/usr.sbin/bhyve/bhyverun.c Thu Jun 12 13:13:15 2014 (r267393) @@ -55,7 +55,7 @@ __FBSDID("$FreeBSD$"); #include "acpi.h" #include "inout.h" #include "dbgport.h" -#include "legacy_irq.h" +#include "ioapic.h" #include "mem.h" #include "mevent.h" #include "mptbl.h" @@ -695,7 +695,7 @@ main(int argc, char *argv[]) init_mem(); init_inout(); - legacy_irq_init(); + ioapic_init(ctx); rtc_init(ctx); Copied: stable/10/usr.sbin/bhyve/ioapic.c (from r261268, head/usr.sbin/bhyve/ioapic.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.sbin/bhyve/ioapic.c Thu Jun 12 13:13:15 2014 (r267393, copy of r261268, head/usr.sbin/bhyve/ioapic.c) @@ -0,0 +1,74 @@ +/*- + * Copyright (c) 2014 Advanced Computing Technologies LLC + * Written by: John H. Baldwin + * All rights reserved. + * + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +#include +#include + +#include "ioapic.h" + +/* + * Assign PCI INTx interrupts to I/O APIC pins in a round-robin + * fashion. Note that we have no idea what the HPET is using, but the + * HPET is also programmable whereas this is intended for hardwired + * PCI interrupts. + * + * This assumes a single I/O APIC where pins >= 16 are permitted for + * PCI devices. + */ +static int pci_pins; + +void +ioapic_init(struct vmctx *ctx) +{ + + if (vm_ioapic_pincount(ctx, &pci_pins) < 0) { + pci_pins = 0; + return; + } + + /* Ignore the first 16 pins. */ + if (pci_pins <= 16) { + pci_pins = 0; + return; + } + pci_pins -= 16; +} + +int +ioapic_pci_alloc_irq(void) +{ + static int last_pin; + + if (pci_pins == 0) + return (-1); + return (16 + (last_pin++ % pci_pins)); +} Copied: stable/10/usr.sbin/bhyve/ioapic.h (from r261268, head/usr.sbin/bhyve/ioapic.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.sbin/bhyve/ioapic.h Thu Jun 12 13:13:15 2014 (r267393, copy of r261268, head/usr.sbin/bhyve/ioapic.h) @@ -0,0 +1,39 @@ +/*- + * Copyright (c) 2014 Advanced Computing Technologies LLC + * Written by: John H. Baldwin + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +#ifndef _IOAPIC_H_ +#define _IOAPIC_H_ + +/* + * Allocate a PCI IRQ from the I/O APIC. + */ +void ioapic_init(struct vmctx *ctx); +int ioapic_pci_alloc_irq(void); + +#endif Modified: stable/10/usr.sbin/bhyve/mptbl.c ============================================================================== --- stable/10/usr.sbin/bhyve/mptbl.c Thu Jun 12 12:43:48 2014 (r267392) +++ stable/10/usr.sbin/bhyve/mptbl.c Thu Jun 12 13:13:15 2014 (r267393) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include "acpi.h" #include "bhyverun.h" #include "mptbl.h" +#include "pci_emul.h" #define MPTABLE_BASE 0xF0000 @@ -75,9 +76,6 @@ __FBSDID("$FreeBSD$"); /* Number of local intr entries */ #define MPEII_NUM_LOCAL_IRQ 2 -/* Number of i/o intr entries */ -#define MPEII_MAX_IRQ 24 - /* Bus entry defines */ #define MPE_NUM_BUSES 2 #define MPE_BUSNAME_LEN 6 @@ -195,8 +193,42 @@ mpt_build_ioapic_entries(io_apic_entry_p mpei->apic_address = IOAPIC_PADDR; } +static int +mpt_count_ioint_entries(void) +{ + + /* + * Always include entries for the first 16 pins along with a entry + * for each active PCI INTx pin. + */ + return (16 + pci_count_lintr()); +} + static void -mpt_build_ioint_entries(int_entry_ptr mpie, int num_pins, int id) +mpt_generate_pci_int(int slot, int pin, int ioapic_irq, void *arg) +{ + int_entry_ptr *mpiep, mpie; + + mpiep = arg; + mpie = *mpiep; + memset(mpie, 0, sizeof(*mpie)); + + /* + * This is always after another I/O interrupt entry, so cheat + * and fetch the I/O APIC ID from the prior entry. + */ + mpie->type = MPCT_ENTRY_INT; + mpie->int_type = INTENTRY_TYPE_INT; + mpie->src_bus_id = 0; + mpie->src_bus_irq = slot << 2 | (pin - 1); + mpie->dst_apic_id = mpie[-1].dst_apic_id; + mpie->dst_apic_int = ioapic_irq; + + *mpiep = mpie + 1; +} + +static void +mpt_build_ioint_entries(int_entry_ptr mpie, int id) { int pin; @@ -206,8 +238,8 @@ mpt_build_ioint_entries(int_entry_ptr mp * just use the default config, tweek later if needed. */ - /* Run through all 16 pins. */ - for (pin = 0; pin < num_pins; pin++) { + /* First, generate the first 16 pins. */ + for (pin = 0; pin < 16; pin++) { memset(mpie, 0, sizeof(*mpie)); mpie->type = MPCT_ENTRY_INT; mpie->src_bus_id = 1; @@ -235,16 +267,6 @@ mpt_build_ioint_entries(int_entry_ptr mp mpie->int_type = INTENTRY_TYPE_INT; mpie->src_bus_irq = SCI_INT; break; - case 5: - case 10: - case 11: - /* - * PCI Irqs set to level triggered and active-lo. - */ - mpie->int_flags = INTENTRY_FLAGS_POLARITY_ACTIVELO | - INTENTRY_FLAGS_TRIGGER_LEVEL; - mpie->src_bus_id = 0; - /* fall through.. */ default: /* All other pins are identity mapped. */ mpie->int_type = INTENTRY_TYPE_INT; @@ -254,6 +276,8 @@ mpt_build_ioint_entries(int_entry_ptr mp mpie++; } + /* Next, generate entries for any PCI INTx interrupts. */ + pci_walk_lintr(mpt_generate_pci_int, &mpie); } void @@ -273,6 +297,7 @@ mptable_build(struct vmctx *ctx, int ncp proc_entry_ptr mpep; mpfps_t mpfp; int_entry_ptr mpie; + int ioints; char *curraddr; char *startaddr; @@ -307,9 +332,10 @@ mptable_build(struct vmctx *ctx, int ncp mpch->entry_count++; mpie = (int_entry_ptr) curraddr; - mpt_build_ioint_entries(mpie, MPEII_MAX_IRQ, 0); - curraddr += sizeof(*mpie) * MPEII_MAX_IRQ; - mpch->entry_count += MPEII_MAX_IRQ; + ioints = mpt_count_ioint_entries(); + mpt_build_ioint_entries(mpie, 0); + curraddr += sizeof(*mpie) * ioints; + mpch->entry_count += ioints; mpie = (int_entry_ptr)curraddr; mpt_build_localint_entries(mpie); Modified: stable/10/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_ahci.c Thu Jun 12 12:43:48 2014 (r267392) +++ stable/10/usr.sbin/bhyve/pci_ahci.c Thu Jun 12 13:13:15 2014 (r267393) @@ -192,6 +192,7 @@ struct pci_ahci_softc { uint32_t em_ctl; uint32_t cap2; uint32_t bohc; + uint32_t lintr; struct ahci_port port[MAX_PORTS]; }; #define ahci_ctx(sc) ((sc)->asc_pi->pi_vmctx) @@ -211,8 +212,11 @@ static inline void lba_to_msf(uint8_t *b static void ahci_generate_intr(struct pci_ahci_softc *sc) { + struct pci_devinst *pi; int i; + pi = sc->asc_pi; + for (i = 0; i < sc->ports; i++) { struct ahci_port *pr; pr = &sc->port[i]; @@ -222,8 +226,28 @@ ahci_generate_intr(struct pci_ahci_softc DPRINTF("%s %x\n", __func__, sc->is); - if (sc->is && (sc->ghc & AHCI_GHC_IE)) - pci_generate_msi(sc->asc_pi, 0); + if (sc->is && (sc->ghc & AHCI_GHC_IE)) { + if (pci_msi_enabled(pi)) { + /* + * Generate an MSI interrupt on every edge + */ + pci_generate_msi(pi, 0); + } else if (!sc->lintr) { + /* + * Only generate a pin-based interrupt if one wasn't + * in progress + */ + sc->lintr = 1; + pci_lintr_assert(pi); + } + } else if (sc->lintr) { + /* + * No interrupts: deassert pin-based signal if it had + * been asserted + */ + pci_lintr_deassert(pi); + sc->lintr = 0; + } } static void @@ -367,6 +391,12 @@ ahci_reset(struct pci_ahci_softc *sc) sc->ghc = AHCI_GHC_AE; sc->is = 0; + + if (sc->lintr) { + pci_lintr_deassert(sc->asc_pi); + sc->lintr = 0; + } + for (i = 0; i < sc->ports; i++) { sc->port[i].ie = 0; sc->port[i].is = 0; @@ -1815,6 +1845,8 @@ pci_ahci_init(struct vmctx *ctx, struct pci_emul_alloc_bar(pi, 5, PCIBAR_MEM32, AHCI_OFFSET + sc->ports * AHCI_STEP); + pci_lintr_request(pi); + open_fail: if (ret) { blockif_close(sc->port[0].bctx); Modified: stable/10/usr.sbin/bhyve/pci_emul.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_emul.c Thu Jun 12 12:43:48 2014 (r267392) +++ stable/10/usr.sbin/bhyve/pci_emul.c Thu Jun 12 13:13:15 2014 (r267393) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -47,7 +48,7 @@ __FBSDID("$FreeBSD$"); #include "acpi.h" #include "bhyverun.h" #include "inout.h" -#include "legacy_irq.h" +#include "ioapic.h" #include "mem.h" #include "pci_emul.h" #include "pci_lpc.h" @@ -71,11 +72,21 @@ do { \ #define MAXSLOTS (PCI_SLOTMAX + 1) #define MAXFUNCS (PCI_FUNCMAX + 1) -static struct slotinfo { - char *si_name; - char *si_param; - struct pci_devinst *si_devi; -} pci_slotinfo[MAXSLOTS][MAXFUNCS]; +struct funcinfo { + char *fi_name; + char *fi_param; + struct pci_devinst *fi_devi; +}; + +struct intxinfo { + int ii_count; + int ii_ioapic_irq; +}; + +struct slotinfo { + struct intxinfo si_intpins[4]; + struct funcinfo si_funcs[MAXFUNCS]; +} pci_slotinfo[MAXSLOTS]; SET_DECLARE(pci_devemu_set, struct pci_devemu); @@ -92,6 +103,7 @@ static uint64_t pci_emul_membase64; #define PCI_EMUL_MEMLIMIT64 0xFD00000000UL static struct pci_devemu *pci_emul_finddev(char *name); +static void pci_lintr_update(struct pci_devinst *pi); static int pci_emul_devices; static struct mem_range pci_mem_hole; @@ -154,7 +166,7 @@ pci_parse_slot(char *opt) goto done; } - if (pci_slotinfo[snum][fnum].si_name != NULL) { + if (pci_slotinfo[snum].si_funcs[fnum].fi_name != NULL) { fprintf(stderr, "pci slot %d:%d already occupied!\n", snum, fnum); goto done; @@ -167,8 +179,8 @@ pci_parse_slot(char *opt) } error = 0; - pci_slotinfo[snum][fnum].si_name = emul; - pci_slotinfo[snum][fnum].si_param = config; + pci_slotinfo[snum].si_funcs[fnum].fi_name = emul; + pci_slotinfo[snum].si_funcs[fnum].fi_param = config; done: if (error) @@ -666,7 +678,10 @@ pci_emul_init(struct vmctx *ctx, struct pdi->pi_bus = 0; pdi->pi_slot = slot; pdi->pi_func = func; - pdi->pi_lintr_pin = -1; + pthread_mutex_init(&pdi->pi_lintr.lock, NULL); + pdi->pi_lintr.pin = 0; + pdi->pi_lintr.state = IDLE; + pdi->pi_lintr.ioapic_irq = 0; pdi->pi_d = pde; snprintf(pdi->pi_name, PI_NAMESZ, "%s-pci-%d", pde->pe_emu, slot); @@ -682,7 +697,7 @@ pci_emul_init(struct vmctx *ctx, struct free(pdi); } else { pci_emul_devices++; - pci_slotinfo[slot][func].si_devi = pdi; + pci_slotinfo[slot].si_funcs[func].fi_devi = pdi; } return (err); @@ -816,6 +831,7 @@ msixcap_cfgwrite(struct pci_devinst *pi, pi->pi_msix.enabled = val & PCIM_MSIXCTRL_MSIX_ENABLE; pi->pi_msix.function_mask = val & PCIM_MSIXCTRL_FUNCTION_MASK; + pci_lintr_update(pi); } CFGWRITE(pi, offset, val, bytes); @@ -854,6 +870,7 @@ msicap_cfgwrite(struct pci_devinst *pi, } else { pi->pi_msi.maxmsgnum = 0; } + pci_lintr_update(pi); } CFGWRITE(pi, offset, val, bytes); @@ -993,7 +1010,7 @@ int init_pci(struct vmctx *ctx) { struct pci_devemu *pde; - struct slotinfo *si; + struct funcinfo *fi; size_t lowmem; int slot, func; int error; @@ -1004,12 +1021,12 @@ init_pci(struct vmctx *ctx) for (slot = 0; slot < MAXSLOTS; slot++) { for (func = 0; func < MAXFUNCS; func++) { - si = &pci_slotinfo[slot][func]; - if (si->si_name != NULL) { - pde = pci_emul_finddev(si->si_name); + fi = &pci_slotinfo[slot].si_funcs[func]; + if (fi->fi_name != NULL) { + pde = pci_emul_finddev(fi->fi_name); assert(pde != NULL); error = pci_emul_init(ctx, pde, slot, func, - si->si_param); + fi->fi_param); if (error) return (error); } @@ -1042,11 +1059,27 @@ init_pci(struct vmctx *ctx) return (0); } +static void +pci_prt_entry(int slot, int pin, int ioapic_irq, void *arg) +{ + int *count; + + count = arg; + dsdt_line(" Package (0x04)"); + dsdt_line(" {"); + dsdt_line(" 0x%X,", slot << 16 | 0xffff); + dsdt_line(" 0x%02X,", pin - 1); + dsdt_line(" Zero,"); + dsdt_line(" 0x%X", ioapic_irq); + dsdt_line(" }%s", *count == 1 ? "" : ","); + (*count)--; +} + void pci_write_dsdt(void) { struct pci_devinst *pi; - int slot, func; + int count, slot, func; dsdt_indent(1); dsdt_line("Scope (_SB)"); @@ -1107,11 +1140,20 @@ pci_write_dsdt(void) PCI_EMUL_MEMLIMIT64 - PCI_EMUL_MEMBASE64); dsdt_line(" ,, , AddressRangeMemory, TypeStatic)"); dsdt_line(" })"); + count = pci_count_lintr(); + if (count != 0) { + dsdt_indent(2); + dsdt_line("Name (_PRT, Package (0x%02X)", count); + dsdt_line("{"); + pci_walk_lintr(pci_prt_entry, &count); + dsdt_line("})"); + dsdt_unindent(2); + } dsdt_indent(2); for (slot = 0; slot < MAXSLOTS; slot++) { for (func = 0; func < MAXFUNCS; func++) { - pi = pci_slotinfo[slot][func].si_devi; + pi = pci_slotinfo[slot].si_funcs[func].fi_devi; if (pi != NULL && pi->pi_d->pe_write_dsdt != NULL) pi->pi_d->pe_write_dsdt(pi); } @@ -1176,18 +1218,54 @@ pci_generate_msi(struct pci_devinst *pi, } } +static bool +pci_lintr_permitted(struct pci_devinst *pi) +{ + uint16_t cmd; + + cmd = pci_get_cfgdata16(pi, PCIR_COMMAND); + return (!(pi->pi_msi.enabled || pi->pi_msix.enabled || + (cmd & PCIM_CMD_INTxDIS))); +} + int -pci_lintr_request(struct pci_devinst *pi, int req) +pci_lintr_request(struct pci_devinst *pi) { - int irq; + struct slotinfo *si; + int bestpin, bestcount, irq, pin; - irq = legacy_irq_alloc(req); - if (irq < 0) - return (-1); + /* + * First, allocate a pin from our slot. + */ + si = &pci_slotinfo[pi->pi_slot]; + bestpin = 0; + bestcount = si->si_intpins[0].ii_count; + for (pin = 1; pin < 4; pin++) { + if (si->si_intpins[pin].ii_count < bestcount) { + bestpin = pin; + bestcount = si->si_intpins[pin].ii_count; + } + } + + /* + * Attempt to allocate an I/O APIC pin for this intpin. If + * 8259A support is added we will need a separate field to + * assign the intpin to an input pin on the PCI interrupt + * router. + */ + if (si->si_intpins[bestpin].ii_count == 0) { + irq = ioapic_pci_alloc_irq(); + if (irq < 0) + return (-1); + si->si_intpins[bestpin].ii_ioapic_irq = irq; + } else + irq = si->si_intpins[bestpin].ii_ioapic_irq; + si->si_intpins[bestpin].ii_count++; - pi->pi_lintr_pin = irq; + pi->pi_lintr.pin = bestpin + 1; + pi->pi_lintr.ioapic_irq = irq; pci_set_cfgdata8(pi, PCIR_INTLINE, irq); - pci_set_cfgdata8(pi, PCIR_INTPIN, 1); + pci_set_cfgdata8(pi, PCIR_INTPIN, bestpin + 1); return (0); } @@ -1195,23 +1273,77 @@ void pci_lintr_assert(struct pci_devinst *pi) { - assert(pi->pi_lintr_pin >= 0); + assert(pi->pi_lintr.pin > 0); - if (pi->pi_lintr_state == 0) { - pi->pi_lintr_state = 1; - vm_ioapic_assert_irq(pi->pi_vmctx, pi->pi_lintr_pin); + pthread_mutex_lock(&pi->pi_lintr.lock); + if (pi->pi_lintr.state == IDLE) { + if (pci_lintr_permitted(pi)) { + pi->pi_lintr.state = ASSERTED; + vm_ioapic_assert_irq(pi->pi_vmctx, + pi->pi_lintr.ioapic_irq); + } else + pi->pi_lintr.state = PENDING; } + pthread_mutex_unlock(&pi->pi_lintr.lock); } void pci_lintr_deassert(struct pci_devinst *pi) { - assert(pi->pi_lintr_pin >= 0); + assert(pi->pi_lintr.pin > 0); + + pthread_mutex_lock(&pi->pi_lintr.lock); + if (pi->pi_lintr.state == ASSERTED) { + pi->pi_lintr.state = IDLE; + vm_ioapic_deassert_irq(pi->pi_vmctx, pi->pi_lintr.ioapic_irq); + } else if (pi->pi_lintr.state == PENDING) + pi->pi_lintr.state = IDLE; + pthread_mutex_unlock(&pi->pi_lintr.lock); +} + +static void +pci_lintr_update(struct pci_devinst *pi) +{ - if (pi->pi_lintr_state == 1) { - pi->pi_lintr_state = 0; - vm_ioapic_deassert_irq(pi->pi_vmctx, pi->pi_lintr_pin); + pthread_mutex_lock(&pi->pi_lintr.lock); + if (pi->pi_lintr.state == ASSERTED && !pci_lintr_permitted(pi)) { + vm_ioapic_deassert_irq(pi->pi_vmctx, pi->pi_lintr.ioapic_irq); + pi->pi_lintr.state = PENDING; + } else if (pi->pi_lintr.state == PENDING && pci_lintr_permitted(pi)) { + pi->pi_lintr.state = ASSERTED; + vm_ioapic_assert_irq(pi->pi_vmctx, pi->pi_lintr.ioapic_irq); + } + pthread_mutex_unlock(&pi->pi_lintr.lock); +} + +int +pci_count_lintr(void) +{ + int count, slot, pin; + + count = 0; + for (slot = 0; slot < MAXSLOTS; slot++) { + for (pin = 0; pin < 4; pin++) { + if (pci_slotinfo[slot].si_intpins[pin].ii_count != 0) + count++; + } + } + return (count); +} + +void +pci_walk_lintr(pci_lintr_cb cb, void *arg) +{ + struct intxinfo *ii; + int slot, pin; + + for (slot = 0; slot < MAXSLOTS; slot++) { + for (pin = 0; pin < 4; pin++) { + ii = &pci_slotinfo[slot].si_intpins[pin]; + if (ii->ii_count != 0) + cb(slot, pin + 1, ii->ii_ioapic_irq, arg); + } } } @@ -1226,7 +1358,7 @@ pci_emul_is_mfdev(int slot) numfuncs = 0; for (f = 0; f < MAXFUNCS; f++) { - if (pci_slotinfo[slot][f].si_devi != NULL) { + if (pci_slotinfo[slot].si_funcs[f].fi_devi != NULL) { numfuncs++; } } @@ -1348,6 +1480,12 @@ pci_emul_cmdwrite(struct pci_devinst *pi assert(0); } } + + /* + * If INTx has been unmasked and is pending, assert the + * interrupt. + */ + pci_lintr_update(pi); } static int @@ -1362,7 +1500,7 @@ pci_emul_cfgdata(struct vmctx *ctx, int assert(bytes == 1 || bytes == 2 || bytes == 4); if (cfgbus == 0) - pi = pci_slotinfo[cfgslot][cfgfunc].si_devi; + pi = pci_slotinfo[cfgslot].si_funcs[cfgfunc].fi_devi; else pi = NULL; Modified: stable/10/usr.sbin/bhyve/pci_emul.h ============================================================================== --- stable/10/usr.sbin/bhyve/pci_emul.h Thu Jun 12 12:43:48 2014 (r267392) +++ stable/10/usr.sbin/bhyve/pci_emul.h Thu Jun 12 13:13:15 2014 (r267393) @@ -32,6 +32,7 @@ #include #include #include +#include #include @@ -102,16 +103,27 @@ struct msix_table_entry { #define MAX_MSIX_TABLE_ENTRIES 2048 #define PBA_TABLE_ENTRY_SIZE 8 +enum lintr_stat { + IDLE, + ASSERTED, + PENDING +}; + struct pci_devinst { struct pci_devemu *pi_d; struct vmctx *pi_vmctx; uint8_t pi_bus, pi_slot, pi_func; - int8_t pi_lintr_pin; - int8_t pi_lintr_state; char pi_name[PI_NAMESZ]; int pi_bar_getsize; struct { + int8_t pin; + enum lintr_stat state; + int ioapic_irq; + pthread_mutex_t lock; + } pi_lintr; + + struct { int enabled; uint64_t addr; uint64_t msg_data; @@ -187,6 +199,8 @@ struct pciecap { uint16_t slot_status2; } __packed; +typedef void (*pci_lintr_cb)(int slot, int pin, int ioapic_irq, void *arg); + int init_pci(struct vmctx *ctx); void msicap_cfgwrite(struct pci_devinst *pi, int capoff, int offset, int bytes, uint32_t val); @@ -203,7 +217,7 @@ void pci_generate_msi(struct pci_devinst void pci_generate_msix(struct pci_devinst *pi, int msgnum); void pci_lintr_assert(struct pci_devinst *pi); void pci_lintr_deassert(struct pci_devinst *pi); -int pci_lintr_request(struct pci_devinst *pi, int ivec); +int pci_lintr_request(struct pci_devinst *pi); int pci_msi_enabled(struct pci_devinst *pi); int pci_msix_enabled(struct pci_devinst *pi); int pci_msix_table_bar(struct pci_devinst *pi); @@ -215,6 +229,8 @@ int pci_emul_add_msixcap(struct pci_devi int pci_emul_msix_twrite(struct pci_devinst *pi, uint64_t offset, int size, uint64_t value); uint64_t pci_emul_msix_tread(struct pci_devinst *pi, uint64_t offset, int size); +int pci_count_lintr(void); +void pci_walk_lintr(pci_lintr_cb cb, void *arg); void pci_write_dsdt(void); static __inline void Modified: stable/10/usr.sbin/bhyve/pci_uart.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_uart.c Thu Jun 12 12:43:48 2014 (r267392) +++ stable/10/usr.sbin/bhyve/pci_uart.c Thu Jun 12 13:13:15 2014 (r267393) @@ -91,7 +91,7 @@ pci_uart_init(struct vmctx *ctx, struct struct uart_softc *sc; pci_emul_alloc_bar(pi, 0, PCIBAR_IO, UART_IO_BAR_SIZE); - pci_lintr_request(pi, -1); + pci_lintr_request(pi); /* initialize config space */ pci_set_cfgdata16(pi, PCIR_DEVICE, COM_DEV); Modified: stable/10/usr.sbin/bhyve/pci_virtio_block.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_virtio_block.c Thu Jun 12 12:43:48 2014 (r267392) +++ stable/10/usr.sbin/bhyve/pci_virtio_block.c Thu Jun 12 13:13:15 2014 (r267393) @@ -117,6 +117,7 @@ static int pci_vtblk_debug; */ struct pci_vtblk_softc { struct virtio_softc vbsc_vs; + pthread_mutex_t vsc_mtx; struct vqueue_info vbsc_vq; int vbsc_fd; struct vtblk_config vbsc_cfg; @@ -304,8 +305,12 @@ pci_vtblk_init(struct vmctx *ctx, struct /* record fd of storage device/file */ sc->vbsc_fd = fd; + pthread_mutex_init(&sc->vsc_mtx, NULL); + /* init virtio softc and virtqueues */ vi_softc_linkup(&sc->vbsc_vs, &vtblk_vi_consts, sc, pi, &sc->vbsc_vq); + sc->vbsc_vs.vs_mtx = &sc->vsc_mtx; + sc->vbsc_vq.vq_qsize = VTBLK_RINGSZ; /* sc->vbsc_vq.vq_notify = we have no per-queue notify */ @@ -339,6 +344,8 @@ pci_vtblk_init(struct vmctx *ctx, struct pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_STORAGE); pci_set_cfgdata16(pi, PCIR_SUBDEV_0, VIRTIO_TYPE_BLOCK); + pci_lintr_request(pi); + if (vi_intr_init(&sc->vbsc_vs, 1, fbsdrun_virtio_msix())) return (1); vi_set_io_bar(&sc->vbsc_vs, 0); Modified: stable/10/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_virtio_net.c Thu Jun 12 12:43:48 2014 (r267392) +++ stable/10/usr.sbin/bhyve/pci_virtio_net.c Thu Jun 12 13:13:15 2014 (r267393) @@ -519,6 +519,8 @@ pci_vtnet_init(struct vmctx *ctx, struct pthread_mutex_init(&sc->vsc_mtx, NULL); vi_softc_linkup(&sc->vsc_vs, &vtnet_vi_consts, sc, pi, sc->vsc_queues); + sc->vsc_vs.vs_mtx = &sc->vsc_mtx; + sc->vsc_queues[VTNET_RXQ].vq_qsize = VTNET_RINGSZ; sc->vsc_queues[VTNET_RXQ].vq_notify = pci_vtnet_ping_rxq; sc->vsc_queues[VTNET_TXQ].vq_qsize = VTNET_RINGSZ; @@ -608,6 +610,8 @@ pci_vtnet_init(struct vmctx *ctx, struct pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_NETWORK); pci_set_cfgdata16(pi, PCIR_SUBDEV_0, VIRTIO_TYPE_NET); + pci_lintr_request(pi); + /* link always up */ sc->vsc_config.status = 1; Modified: stable/10/usr.sbin/bhyve/virtio.c ============================================================================== --- stable/10/usr.sbin/bhyve/virtio.c Thu Jun 12 12:43:48 2014 (r267392) +++ stable/10/usr.sbin/bhyve/virtio.c Thu Jun 12 13:13:15 2014 (r267393) @@ -99,7 +99,11 @@ vi_reset_dev(struct virtio_softc *vs) vs->vs_negotiated_caps = 0; vs->vs_curq = 0; /* vs->vs_status = 0; -- redundant */ + VS_LOCK(vs); + if (vs->vs_isr) + pci_lintr_deassert(vs->vs_pi); vs->vs_isr = 0; + VS_UNLOCK(vs); vs->vs_msix_cfg_idx = VIRTIO_MSI_NO_VECTOR; } @@ -137,11 +141,10 @@ vi_intr_init(struct virtio_softc *vs, in nvec = vs->vs_vc->vc_nvq + 1; if (pci_emul_add_msixcap(vs->vs_pi, nvec, barnum)) return (1); - } else { + } else vs->vs_flags &= ~VIRTIO_USE_MSIX; - /* Only 1 MSI vector for bhyve */ - pci_emul_add_msicap(vs->vs_pi, 1); - } + /* Only 1 MSI vector for bhyve */ + pci_emul_add_msicap(vs->vs_pi, 1); return (0); } @@ -591,6 +594,8 @@ bad: case VTCFG_R_ISR: value = vs->vs_isr; vs->vs_isr = 0; /* a read clears this flag */ + if (value) + pci_lintr_deassert(pi); break; case VTCFG_R_CFGVEC: value = vs->vs_msix_cfg_idx; Modified: stable/10/usr.sbin/bhyve/virtio.h ============================================================================== --- stable/10/usr.sbin/bhyve/virtio.h Thu Jun 12 12:43:48 2014 (r267392) +++ stable/10/usr.sbin/bhyve/virtio.h Thu Jun 12 13:13:15 2014 (r267393) @@ -328,6 +328,18 @@ struct virtio_softc { uint16_t vs_msix_cfg_idx; /* MSI-X vector for config event */ }; +#define VS_LOCK(vs) \ +do { \ + if (vs->vs_mtx) \ + pthread_mutex_lock(vs->vs_mtx); \ +} while (0) + +#define VS_UNLOCK(vs) \ +do { \ + if (vs->vs_mtx) \ + pthread_mutex_unlock(vs->vs_mtx); \ +} while (0) + struct virtio_consts { const char *vc_name; /* name of driver (for diagnostics) */ int vc_nvq; /* number of virtual queues */ @@ -431,11 +443,14 @@ static inline void vq_interrupt(struct virtio_softc *vs, struct vqueue_info *vq) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu Jun 12 13:17:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74289F7C; Thu, 12 Jun 2014 13:17:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60D2F2AAA; Thu, 12 Jun 2014 13:17:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5CDHCWD041931; Thu, 12 Jun 2014 13:17:12 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5CDHC1v041930; Thu, 12 Jun 2014 13:17:12 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406121317.s5CDHC1v041930@svn.freebsd.org> From: John Baldwin Date: Thu, 12 Jun 2014 13:17:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267394 - stable/10/usr.sbin/bhyveload X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 13:17:12 -0000 Author: jhb Date: Thu Jun 12 13:17:11 2014 New Revision: 267394 URL: http://svnweb.freebsd.org/changeset/base/267394 Log: MFC 261229: o Fix typo, sort .Xrs. PR: docs/186191 Modified: stable/10/usr.sbin/bhyveload/bhyveload.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyveload/bhyveload.8 ============================================================================== --- stable/10/usr.sbin/bhyveload/bhyveload.8 Thu Jun 12 13:13:15 2014 (r267393) +++ stable/10/usr.sbin/bhyveload/bhyveload.8 Thu Jun 12 13:17:11 2014 (r267394) @@ -134,10 +134,10 @@ device .Dl "bhyveload -m 256MB -h /usr/images/test -c /dev/nmdm1B test-vm" .Sh SEE ALSO .Xr bhyve 4 , +.Xr nmdm 4 , +.Xr vmm 4 , .Xr bhyve 8 , -.Xr loader 8 , -.Xr nmdm 4, -.Xr vmm 4 +.Xr loader 8 .Sh HISTORY .Nm first appeared in From owner-svn-src-stable@FreeBSD.ORG Thu Jun 12 13:48:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1253A03; Thu, 12 Jun 2014 13:48:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADF052E1D; Thu, 12 Jun 2014 13:48:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5CDmqWg055455; Thu, 12 Jun 2014 13:48:52 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5CDmqdM055454; Thu, 12 Jun 2014 13:48:52 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406121348.s5CDmqdM055454@svn.freebsd.org> From: John Baldwin Date: Thu, 12 Jun 2014 13:48:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267396 - stable/10/sys/amd64/vmm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 13:48:53 -0000 Author: jhb Date: Thu Jun 12 13:48:52 2014 New Revision: 267396 URL: http://svnweb.freebsd.org/changeset/base/267396 Log: MFC 261503,264501: Emulate the byte move and zero/sign extend instructions. Modified: stable/10/sys/amd64/vmm/vmm_instruction_emul.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/vmm/vmm_instruction_emul.c ============================================================================== --- stable/10/sys/amd64/vmm/vmm_instruction_emul.c Thu Jun 12 13:33:01 2014 (r267395) +++ stable/10/sys/amd64/vmm/vmm_instruction_emul.c Thu Jun 12 13:48:52 2014 (r267396) @@ -58,8 +58,11 @@ enum cpu_mode { enum { VIE_OP_TYPE_NONE = 0, VIE_OP_TYPE_MOV, + VIE_OP_TYPE_MOVSX, + VIE_OP_TYPE_MOVZX, VIE_OP_TYPE_AND, VIE_OP_TYPE_OR, + VIE_OP_TYPE_TWO_BYTE, VIE_OP_TYPE_LAST }; @@ -67,7 +70,22 @@ enum { #define VIE_OP_F_IMM (1 << 0) /* immediate operand present */ #define VIE_OP_F_IMM8 (1 << 1) /* 8-bit immediate operand */ +static const struct vie_op two_byte_opcodes[256] = { + [0xB6] = { + .op_byte = 0xB6, + .op_type = VIE_OP_TYPE_MOVZX, + }, + [0xBE] = { + .op_byte = 0xBE, + .op_type = VIE_OP_TYPE_MOVSX, + }, +}; + static const struct vie_op one_byte_opcodes[256] = { + [0x0F] = { + .op_byte = 0x0F, + .op_type = VIE_OP_TYPE_TWO_BYTE + }, [0x88] = { .op_byte = 0x88, .op_type = VIE_OP_TYPE_MOV, @@ -313,6 +331,85 @@ emulate_mov(void *vm, int vcpuid, uint64 return (error); } +/* + * The following simplifying assumptions are made during emulation: + * + * - guest is in 64-bit mode + * - default address size is 64-bits + * - default operand size is 32-bits + * + * - operand size override is not supported + * + * - address size override is not supported + */ +static int +emulate_movx(void *vm, int vcpuid, uint64_t gpa, struct vie *vie, + mem_region_read_t memread, mem_region_write_t memwrite, + void *arg) +{ + int error, size; + enum vm_reg_name reg; + uint64_t val; + + size = 4; + error = EINVAL; + + switch (vie->op.op_byte) { + case 0xB6: + /* + * MOV and zero extend byte from mem (ModRM:r/m) to + * reg (ModRM:reg). + * + * 0F B6/r movzx r/m8, r32 + * REX.W + 0F B6/r movzx r/m8, r64 + */ + + /* get the first operand */ + error = memread(vm, vcpuid, gpa, &val, 1, arg); + if (error) + break; + + /* get the second operand */ + reg = gpr_map[vie->reg]; + + if (vie->rex_w) + size = 8; + + /* write the result */ + error = vie_update_register(vm, vcpuid, reg, val, size); + break; + case 0xBE: + /* + * MOV and sign extend byte from mem (ModRM:r/m) to + * reg (ModRM:reg). + * + * 0F BE/r movsx r/m8, r32 + * REX.W + 0F BE/r movsx r/m8, r64 + */ + + /* get the first operand */ + error = memread(vm, vcpuid, gpa, &val, 1, arg); + if (error) + break; + + /* get the second operand */ + reg = gpr_map[vie->reg]; + + if (vie->rex_w) + size = 8; + + /* sign extend byte */ + val = (int8_t)val; + + /* write the result */ + error = vie_update_register(vm, vcpuid, reg, val, size); + break; + default: + break; + } + return (error); +} + static int emulate_and(void *vm, int vcpuid, uint64_t gpa, struct vie *vie, mem_region_read_t memread, mem_region_write_t memwrite, void *arg) @@ -447,6 +544,11 @@ vmm_emulate_instruction(void *vm, int vc error = emulate_mov(vm, vcpuid, gpa, vie, memread, memwrite, memarg); break; + case VIE_OP_TYPE_MOVSX: + case VIE_OP_TYPE_MOVZX: + error = emulate_movx(vm, vcpuid, gpa, vie, + memread, memwrite, memarg); + break; case VIE_OP_TYPE_AND: error = emulate_and(vm, vcpuid, gpa, vie, memread, memwrite, memarg); @@ -609,6 +711,23 @@ decode_rex(struct vie *vie) } static int +decode_two_byte_opcode(struct vie *vie) +{ + uint8_t x; + + if (vie_peek(vie, &x)) + return (-1); + + vie->op = two_byte_opcodes[x]; + + if (vie->op.op_type == VIE_OP_TYPE_NONE) + return (-1); + + vie_advance(vie); + return (0); +} + +static int decode_opcode(struct vie *vie) { uint8_t x; @@ -622,6 +741,10 @@ decode_opcode(struct vie *vie) return (-1); vie_advance(vie); + + if (vie->op.op_type == VIE_OP_TYPE_TWO_BYTE) + return (decode_two_byte_opcode(vie)); + return (0); } From owner-svn-src-stable@FreeBSD.ORG Thu Jun 12 15:21:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5B3D3E9; Thu, 12 Jun 2014 15:21:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F45A2818; Thu, 12 Jun 2014 15:21:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5CFL2iO099503; Thu, 12 Jun 2014 15:21:02 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5CFKxvA099459; Thu, 12 Jun 2014 15:20:59 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406121520.s5CFKxvA099459@svn.freebsd.org> From: John Baldwin Date: Thu, 12 Jun 2014 15:20:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267399 - in stable/10: lib/libvmmapi sys/amd64/include sys/amd64/vmm sys/amd64/vmm/intel sys/boot/common sys/boot/userboot/userboot usr.sbin/bhyveload X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 15:21:02 -0000 Author: jhb Date: Thu Jun 12 15:20:59 2014 New Revision: 267399 URL: http://svnweb.freebsd.org/changeset/base/267399 Log: MFC 261504: Add support for FreeBSD/i386 guests under bhyve. Added: stable/10/sys/boot/userboot/userboot/biossmap.c - copied unchanged from r261504, head/sys/boot/userboot/userboot/biossmap.c Modified: stable/10/lib/libvmmapi/vmmapi.h stable/10/lib/libvmmapi/vmmapi_freebsd.c stable/10/sys/amd64/include/vmm.h stable/10/sys/amd64/include/vmm_instruction_emul.h stable/10/sys/amd64/vmm/intel/vmx.c stable/10/sys/amd64/vmm/vmm.c stable/10/sys/amd64/vmm/vmm_instruction_emul.c stable/10/sys/boot/common/load_elf32.c stable/10/sys/boot/common/load_elf32_obj.c stable/10/sys/boot/userboot/userboot/Makefile stable/10/sys/boot/userboot/userboot/bootinfo32.c stable/10/sys/boot/userboot/userboot/bootinfo64.c stable/10/sys/boot/userboot/userboot/elf32_freebsd.c stable/10/sys/boot/userboot/userboot/libuserboot.h stable/10/usr.sbin/bhyveload/bhyveload.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libvmmapi/vmmapi.h ============================================================================== --- stable/10/lib/libvmmapi/vmmapi.h Thu Jun 12 14:20:58 2014 (r267398) +++ stable/10/lib/libvmmapi/vmmapi.h Thu Jun 12 15:20:59 2014 (r267399) @@ -111,5 +111,8 @@ int vcpu_reset(struct vmctx *ctx, int vc int vm_setup_freebsd_registers(struct vmctx *ctx, int vcpu, uint64_t rip, uint64_t cr3, uint64_t gdtbase, uint64_t rsp); +int vm_setup_freebsd_registers_i386(struct vmctx *vmctx, int vcpu, + uint32_t eip, uint32_t gdtbase, + uint32_t esp); void vm_setup_freebsd_gdt(uint64_t *gdtr); #endif /* _VMMAPI_H_ */ Modified: stable/10/lib/libvmmapi/vmmapi_freebsd.c ============================================================================== --- stable/10/lib/libvmmapi/vmmapi_freebsd.c Thu Jun 12 14:20:58 2014 (r267398) +++ stable/10/lib/libvmmapi/vmmapi_freebsd.c Thu Jun 12 15:20:59 2014 (r267399) @@ -35,14 +35,176 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include + #include "vmmapi.h" +#define I386_TSS_SIZE 104 + +#define DESC_PRESENT 0x00000080 +#define DESC_LONGMODE 0x00002000 +#define DESC_DEF32 0x00004000 +#define DESC_GRAN 0x00008000 #define DESC_UNUSABLE 0x00010000 #define GUEST_NULL_SEL 0 #define GUEST_CODE_SEL 1 #define GUEST_DATA_SEL 2 -#define GUEST_GDTR_LIMIT (3 * 8 - 1) +#define GUEST_TSS_SEL 3 +#define GUEST_GDTR_LIMIT64 (3 * 8 - 1) + +static struct segment_descriptor i386_gdt[] = { + {}, /* NULL */ + { .sd_lolimit = 0xffff, .sd_type = SDT_MEMER, /* CODE */ + .sd_p = 1, .sd_hilimit = 0xf, .sd_def32 = 1, .sd_gran = 1 }, + { .sd_lolimit = 0xffff, .sd_type = SDT_MEMRW, /* DATA */ + .sd_p = 1, .sd_hilimit = 0xf, .sd_def32 = 1, .sd_gran = 1 }, + { .sd_lolimit = I386_TSS_SIZE - 1, /* TSS */ + .sd_type = SDT_SYS386TSS, .sd_p = 1 } +}; + +/* + * Setup the 'vcpu' register set such that it will begin execution at + * 'eip' in flat mode. + */ +int +vm_setup_freebsd_registers_i386(struct vmctx *vmctx, int vcpu, uint32_t eip, + uint32_t gdtbase, uint32_t esp) +{ + uint64_t cr0, rflags, desc_base; + uint32_t desc_access, desc_limit, tssbase; + uint16_t gsel; + struct segment_descriptor *gdt; + int error, tmp; + + /* A 32-bit guest requires unrestricted mode. */ + error = vm_get_capability(vmctx, vcpu, VM_CAP_UNRESTRICTED_GUEST, &tmp); + if (error) + goto done; + error = vm_set_capability(vmctx, vcpu, VM_CAP_UNRESTRICTED_GUEST, 1); + if (error) + goto done; + + cr0 = CR0_PE | CR0_NE; + if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_CR0, cr0)) != 0) + goto done; + + if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_CR4, 0)) != 0) + goto done; + + /* + * Forcing EFER to 0 causes bhyve to clear the "IA-32e guest + * mode" entry control. + */ + if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_EFER, 0))) + goto done; + + gdt = vm_map_gpa(vmctx, gdtbase, 0x1000); + if (gdt == NULL) + return (EFAULT); + memcpy(gdt, i386_gdt, sizeof(i386_gdt)); + desc_base = gdtbase; + desc_limit = sizeof(i386_gdt) - 1; + error = vm_set_desc(vmctx, vcpu, VM_REG_GUEST_GDTR, + desc_base, desc_limit, 0); + if (error != 0) + goto done; + + /* Place the TSS one page above the GDT. */ + tssbase = gdtbase + 0x1000; + gdt[3].sd_lobase = tssbase; + + rflags = 0x2; + error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_RFLAGS, rflags); + if (error) + goto done; + + desc_base = 0; + desc_limit = 0xffffffff; + desc_access = DESC_GRAN | DESC_DEF32 | DESC_PRESENT | SDT_MEMERA; + error = vm_set_desc(vmctx, vcpu, VM_REG_GUEST_CS, + desc_base, desc_limit, desc_access); + + desc_access = DESC_GRAN | DESC_DEF32 | DESC_PRESENT | SDT_MEMRWA; + error = vm_set_desc(vmctx, vcpu, VM_REG_GUEST_DS, + desc_base, desc_limit, desc_access); + if (error) + goto done; + + error = vm_set_desc(vmctx, vcpu, VM_REG_GUEST_ES, + desc_base, desc_limit, desc_access); + if (error) + goto done; + + error = vm_set_desc(vmctx, vcpu, VM_REG_GUEST_FS, + desc_base, desc_limit, desc_access); + if (error) + goto done; + + error = vm_set_desc(vmctx, vcpu, VM_REG_GUEST_GS, + desc_base, desc_limit, desc_access); + if (error) + goto done; + + error = vm_set_desc(vmctx, vcpu, VM_REG_GUEST_SS, + desc_base, desc_limit, desc_access); + if (error) + goto done; + + desc_base = tssbase; + desc_limit = I386_TSS_SIZE - 1; + desc_access = DESC_PRESENT | SDT_SYS386BSY; + error = vm_set_desc(vmctx, vcpu, VM_REG_GUEST_TR, + desc_base, desc_limit, desc_access); + if (error) + goto done; + + + error = vm_set_desc(vmctx, vcpu, VM_REG_GUEST_LDTR, 0, 0, + DESC_UNUSABLE); + if (error) + goto done; + + gsel = GSEL(GUEST_CODE_SEL, SEL_KPL); + if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_CS, gsel)) != 0) + goto done; + + gsel = GSEL(GUEST_DATA_SEL, SEL_KPL); + if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_DS, gsel)) != 0) + goto done; + + if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_ES, gsel)) != 0) + goto done; + + if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_FS, gsel)) != 0) + goto done; + + if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_GS, gsel)) != 0) + goto done; + + if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_SS, gsel)) != 0) + goto done; + + gsel = GSEL(GUEST_TSS_SEL, SEL_KPL); + if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_TR, gsel)) != 0) + goto done; + + /* LDTR is pointing to the null selector */ + if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_LDTR, 0)) != 0) + goto done; + + /* entry point */ + if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_RIP, eip)) != 0) + goto done; + + if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_RSP, esp)) != 0) + goto done; + + error = 0; +done: + return (error); +} void vm_setup_freebsd_gdt(uint64_t *gdtr) @@ -168,7 +330,7 @@ vm_setup_freebsd_registers(struct vmctx goto done; desc_base = gdtbase; - desc_limit = GUEST_GDTR_LIMIT; + desc_limit = GUEST_GDTR_LIMIT64; error = vm_set_desc(vmctx, vcpu, VM_REG_GUEST_GDTR, desc_base, desc_limit, 0); if (error != 0) Modified: stable/10/sys/amd64/include/vmm.h ============================================================================== --- stable/10/sys/amd64/include/vmm.h Thu Jun 12 14:20:58 2014 (r267398) +++ stable/10/sys/amd64/include/vmm.h Thu Jun 12 15:20:59 2014 (r267399) @@ -323,6 +323,8 @@ struct vm_exit { uint64_t gpa; uint64_t gla; uint64_t cr3; + enum vie_cpu_mode cpu_mode; + enum vie_paging_mode paging_mode; struct vie vie; } inst_emul; /* Modified: stable/10/sys/amd64/include/vmm_instruction_emul.h ============================================================================== --- stable/10/sys/amd64/include/vmm_instruction_emul.h Thu Jun 12 14:20:58 2014 (r267398) +++ stable/10/sys/amd64/include/vmm_instruction_emul.h Thu Jun 12 15:20:59 2014 (r267399) @@ -29,6 +29,18 @@ #ifndef _VMM_INSTRUCTION_EMUL_H_ #define _VMM_INSTRUCTION_EMUL_H_ +enum vie_cpu_mode { + CPU_MODE_COMPATIBILITY, /* IA-32E mode (CS.L = 0) */ + CPU_MODE_64BIT, /* IA-32E mode (CS.L = 1) */ +}; + +enum vie_paging_mode { + PAGING_MODE_FLAT, + PAGING_MODE_32, + PAGING_MODE_PAE, + PAGING_MODE_64, +}; + /* * The data structures 'vie' and 'vie_op' are meant to be opaque to the * consumers of instruction decoding. The only reason why their contents @@ -107,7 +119,7 @@ int vmm_emulate_instruction(void *vm, in */ int vmm_fetch_instruction(struct vm *vm, int cpuid, uint64_t rip, int inst_length, uint64_t cr3, - struct vie *vie); + enum vie_paging_mode paging_mode, struct vie *vie); void vie_init(struct vie *vie); @@ -123,8 +135,8 @@ void vie_init(struct vie *vie); * in VIE_INVALID_GLA instead. */ #define VIE_INVALID_GLA (1UL << 63) /* a non-canonical address */ -int vmm_decode_instruction(struct vm *vm, int cpuid, - uint64_t gla, struct vie *vie); +int vmm_decode_instruction(struct vm *vm, int cpuid, uint64_t gla, + enum vie_cpu_mode cpu_mode, struct vie *vie); #endif /* _KERNEL */ #endif /* _VMM_INSTRUCTION_EMUL_H_ */ Modified: stable/10/sys/amd64/vmm/intel/vmx.c ============================================================================== --- stable/10/sys/amd64/vmm/intel/vmx.c Thu Jun 12 14:20:58 2014 (r267398) +++ stable/10/sys/amd64/vmm/intel/vmx.c Thu Jun 12 15:20:59 2014 (r267399) @@ -1337,6 +1337,30 @@ vmx_emulate_cr_access(struct vmx *vmx, i return (HANDLED); } +static enum vie_cpu_mode +vmx_cpu_mode(void) +{ + + if (vmcs_read(VMCS_GUEST_IA32_EFER) & EFER_LMA) + return (CPU_MODE_64BIT); + else + return (CPU_MODE_COMPATIBILITY); +} + +static enum vie_paging_mode +vmx_paging_mode(void) +{ + + if (!(vmcs_read(VMCS_GUEST_CR0) & CR0_PG)) + return (PAGING_MODE_FLAT); + if (!(vmcs_read(VMCS_GUEST_CR4) & CR4_PAE)) + return (PAGING_MODE_32); + if (vmcs_read(VMCS_GUEST_IA32_EFER) & EFER_LME) + return (PAGING_MODE_64); + else + return (PAGING_MODE_PAE); +} + static int ept_fault_type(uint64_t ept_qual) { @@ -1496,6 +1520,8 @@ vmx_handle_apic_access(struct vmx *vmx, vmexit->u.inst_emul.gpa = DEFAULT_APIC_BASE + offset; vmexit->u.inst_emul.gla = VIE_INVALID_GLA; vmexit->u.inst_emul.cr3 = vmcs_guest_cr3(); + vmexit->u.inst_emul.cpu_mode = vmx_cpu_mode(); + vmexit->u.inst_emul.paging_mode = vmx_paging_mode(); } /* @@ -1714,6 +1740,8 @@ vmx_exit_process(struct vmx *vmx, int vc vmexit->u.inst_emul.gpa = gpa; vmexit->u.inst_emul.gla = vmcs_gla(); vmexit->u.inst_emul.cr3 = vmcs_guest_cr3(); + vmexit->u.inst_emul.cpu_mode = vmx_cpu_mode(); + vmexit->u.inst_emul.paging_mode = vmx_paging_mode(); vmm_stat_incr(vmx->vm, vcpu, VMEXIT_INST_EMUL, 1); } /* Modified: stable/10/sys/amd64/vmm/vmm.c ============================================================================== --- stable/10/sys/amd64/vmm/vmm.c Thu Jun 12 14:20:58 2014 (r267398) +++ stable/10/sys/amd64/vmm/vmm.c Thu Jun 12 15:20:59 2014 (r267399) @@ -1082,6 +1082,8 @@ vm_handle_inst_emul(struct vm *vm, int v struct vm_exit *vme; int error, inst_length; uint64_t rip, gla, gpa, cr3; + enum vie_cpu_mode cpu_mode; + enum vie_paging_mode paging_mode; mem_region_read_t mread; mem_region_write_t mwrite; @@ -1094,15 +1096,18 @@ vm_handle_inst_emul(struct vm *vm, int v gla = vme->u.inst_emul.gla; gpa = vme->u.inst_emul.gpa; cr3 = vme->u.inst_emul.cr3; + cpu_mode = vme->u.inst_emul.cpu_mode; + paging_mode = vme->u.inst_emul.paging_mode; vie = &vme->u.inst_emul.vie; vie_init(vie); /* Fetch, decode and emulate the faulting instruction */ - if (vmm_fetch_instruction(vm, vcpuid, rip, inst_length, cr3, vie) != 0) + if (vmm_fetch_instruction(vm, vcpuid, rip, inst_length, cr3, + paging_mode, vie) != 0) return (EFAULT); - if (vmm_decode_instruction(vm, vcpuid, gla, vie) != 0) + if (vmm_decode_instruction(vm, vcpuid, gla, cpu_mode, vie) != 0) return (EFAULT); /* return to userland unless this is an in-kernel emulated device */ Modified: stable/10/sys/amd64/vmm/vmm_instruction_emul.c ============================================================================== --- stable/10/sys/amd64/vmm/vmm_instruction_emul.c Thu Jun 12 14:20:58 2014 (r267398) +++ stable/10/sys/amd64/vmm/vmm_instruction_emul.c Thu Jun 12 15:20:59 2014 (r267399) @@ -49,11 +49,6 @@ __FBSDID("$FreeBSD$"); #include #endif /* _KERNEL */ -enum cpu_mode { - CPU_MODE_COMPATIBILITY, /* IA-32E mode (CS.L = 0) */ - CPU_MODE_64BIT, /* IA-32E mode (CS.L = 1) */ -}; - /* struct vie_op.op_type */ enum { VIE_OP_TYPE_NONE = 0, @@ -578,16 +573,76 @@ vie_init(struct vie *vie) static int gla2gpa(struct vm *vm, uint64_t gla, uint64_t ptpphys, - uint64_t *gpa, uint64_t *gpaend) + uint64_t *gpa, enum vie_paging_mode paging_mode) { int nlevels, ptpshift, ptpindex; uint64_t *ptpbase, pte, pgsize; + uint32_t *ptpbase32, pte32; void *cookie; - /* - * XXX assumes 64-bit guest with 4 page walk levels - */ - nlevels = 4; + if (paging_mode == PAGING_MODE_FLAT) { + *gpa = gla; + return (0); + } + + if (paging_mode == PAGING_MODE_32) { + nlevels = 2; + while (--nlevels >= 0) { + /* Zero out the lower 12 bits. */ + ptpphys &= ~0xfff; + + ptpbase32 = vm_gpa_hold(vm, ptpphys, PAGE_SIZE, + VM_PROT_READ, &cookie); + + if (ptpbase32 == NULL) + goto error; + + ptpshift = PAGE_SHIFT + nlevels * 10; + ptpindex = (gla >> ptpshift) & 0x3FF; + pgsize = 1UL << ptpshift; + + pte32 = ptpbase32[ptpindex]; + + vm_gpa_release(cookie); + + if ((pte32 & PG_V) == 0) + goto error; + + if (pte32 & PG_PS) + break; + + ptpphys = pte32; + } + + /* Zero out the lower 'ptpshift' bits */ + pte32 >>= ptpshift; pte32 <<= ptpshift; + *gpa = pte32 | (gla & (pgsize - 1)); + return (0); + } + + if (paging_mode == PAGING_MODE_PAE) { + /* Zero out the lower 5 bits and the upper 12 bits */ + ptpphys >>= 5; ptpphys <<= 17; ptpphys >>= 12; + + ptpbase = vm_gpa_hold(vm, ptpphys, sizeof(*ptpbase) * 4, + VM_PROT_READ, &cookie); + if (ptpbase == NULL) + goto error; + + ptpindex = (gla >> 30) & 0x3; + + pte = ptpbase[ptpindex]; + + vm_gpa_release(cookie); + + if ((pte & PG_V) == 0) + goto error; + + ptpphys = pte; + + nlevels = 2; + } else + nlevels = 4; while (--nlevels >= 0) { /* Zero out the lower 12 bits and the upper 12 bits */ ptpphys >>= 12; ptpphys <<= 24; ptpphys >>= 12; @@ -621,7 +676,6 @@ gla2gpa(struct vm *vm, uint64_t gla, uin /* Zero out the lower 'ptpshift' bits and the upper 12 bits */ pte >>= ptpshift; pte <<= (ptpshift + 12); pte >>= 12; *gpa = pte | (gla & (pgsize - 1)); - *gpaend = pte + pgsize; return (0); error: @@ -630,10 +684,11 @@ error: int vmm_fetch_instruction(struct vm *vm, int cpuid, uint64_t rip, int inst_length, - uint64_t cr3, struct vie *vie) + uint64_t cr3, enum vie_paging_mode paging_mode, + struct vie *vie) { int n, err, prot; - uint64_t gpa, gpaend, off; + uint64_t gpa, off; void *hpa, *cookie; /* @@ -646,7 +701,7 @@ vmm_fetch_instruction(struct vm *vm, int /* Copy the instruction into 'vie' */ while (vie->num_valid < inst_length) { - err = gla2gpa(vm, rip, cr3, &gpa, &gpaend); + err = gla2gpa(vm, rip, cr3, &gpa, paging_mode); if (err) break; @@ -749,15 +804,9 @@ decode_opcode(struct vie *vie) } static int -decode_modrm(struct vie *vie) +decode_modrm(struct vie *vie, enum vie_cpu_mode cpu_mode) { uint8_t x; - enum cpu_mode cpu_mode; - - /* - * XXX assuming that guest is in IA-32E 64-bit mode - */ - cpu_mode = CPU_MODE_64BIT; if (vie_peek(vie, &x)) return (-1); @@ -1034,16 +1083,19 @@ verify_gla(struct vm *vm, int cpuid, uin } int -vmm_decode_instruction(struct vm *vm, int cpuid, uint64_t gla, struct vie *vie) +vmm_decode_instruction(struct vm *vm, int cpuid, uint64_t gla, + enum vie_cpu_mode cpu_mode, struct vie *vie) { - if (decode_rex(vie)) - return (-1); + if (cpu_mode == CPU_MODE_64BIT) { + if (decode_rex(vie)) + return (-1); + } if (decode_opcode(vie)) return (-1); - if (decode_modrm(vie)) + if (decode_modrm(vie, cpu_mode)) return (-1); if (decode_sib(vie)) Modified: stable/10/sys/boot/common/load_elf32.c ============================================================================== --- stable/10/sys/boot/common/load_elf32.c Thu Jun 12 14:20:58 2014 (r267398) +++ stable/10/sys/boot/common/load_elf32.c Thu Jun 12 15:20:59 2014 (r267399) @@ -2,5 +2,6 @@ __FBSDID("$FreeBSD$"); #define __ELF_WORD_SIZE 32 +#define _MACHINE_ELF_WANT_32BIT #include "load_elf.c" Modified: stable/10/sys/boot/common/load_elf32_obj.c ============================================================================== --- stable/10/sys/boot/common/load_elf32_obj.c Thu Jun 12 14:20:58 2014 (r267398) +++ stable/10/sys/boot/common/load_elf32_obj.c Thu Jun 12 15:20:59 2014 (r267399) @@ -2,5 +2,6 @@ __FBSDID("$FreeBSD$"); #define __ELF_WORD_SIZE 32 +#define _MACHINE_ELF_WANT_32BIT #include "load_elf_obj.c" Modified: stable/10/sys/boot/userboot/userboot/Makefile ============================================================================== --- stable/10/sys/boot/userboot/userboot/Makefile Thu Jun 12 14:20:58 2014 (r267398) +++ stable/10/sys/boot/userboot/userboot/Makefile Thu Jun 12 15:20:59 2014 (r267399) @@ -11,6 +11,7 @@ STRIP= LIBDIR= /boot SRCS= autoload.c +SRCS+= biossmap.c SRCS+= bootinfo.c SRCS+= bootinfo32.c SRCS+= bootinfo64.c Copied: stable/10/sys/boot/userboot/userboot/biossmap.c (from r261504, head/sys/boot/userboot/userboot/biossmap.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/userboot/userboot/biossmap.c Thu Jun 12 15:20:59 2014 (r267399, copy of r261504, head/sys/boot/userboot/userboot/biossmap.c) @@ -0,0 +1,74 @@ +/*- + * Copyright (c) 1998 Michael Smith + * All rights reserved. + * + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include "bootstrap.h" +#include "libuserboot.h" + +#define GB (1024UL * 1024 * 1024) + +void +bios_addsmapdata(struct preloaded_file *kfp) +{ + uint64_t lowmem, highmem; + int smapnum, len; + struct bios_smap smap[3], *sm; + + CALLBACK(getmem, &lowmem, &highmem); + + sm = &smap[0]; + + sm->base = 0; /* base memory */ + sm->length = 640 * 1024; + sm->type = SMAP_TYPE_MEMORY; + sm++; + + sm->base = 0x100000; /* extended memory */ + sm->length = lowmem - 0x100000; + sm->type = SMAP_TYPE_MEMORY; + sm++; + + smapnum = 2; + + if (highmem != 0) { + sm->base = 4 * GB; + sm->length = highmem; + sm->type = SMAP_TYPE_MEMORY; + smapnum++; + } + + len = smapnum * sizeof(struct bios_smap); + file_addmetadata(kfp, MODINFOMD_SMAP, len, &smap[0]); +} Modified: stable/10/sys/boot/userboot/userboot/bootinfo32.c ============================================================================== --- stable/10/sys/boot/userboot/userboot/bootinfo32.c Thu Jun 12 14:20:58 2014 (r267398) +++ stable/10/sys/boot/userboot/userboot/bootinfo32.c Thu Jun 12 15:20:59 2014 (r267399) @@ -66,7 +66,7 @@ static struct bootinfo bi; COPY32(strlen(s) + 1, a, c); \ if (c) \ CALLBACK(copyin, s, a, strlen(s) + 1); \ - a += roundup(strlen(s) + 1, sizeof(u_long));\ + a += roundup(strlen(s) + 1, sizeof(uint32_t));\ } #define MOD_NAME(a, s, c) MOD_STR(MODINFO_NAME, a, s, c) @@ -78,7 +78,7 @@ static struct bootinfo bi; COPY32(sizeof(s), a, c); \ if (c) \ CALLBACK(copyin, &s, a, sizeof(s)); \ - a += roundup(sizeof(s), sizeof(u_long)); \ + a += roundup(sizeof(s), sizeof(uint32_t)); \ } #define MOD_ADDR(a, s, c) MOD_VAR(MODINFO_ADDR, a, s, c) @@ -89,7 +89,7 @@ static struct bootinfo bi; COPY32(mm->md_size, a, c); \ if (c) \ CALLBACK(copyin, mm->md_data, a, mm->md_size); \ - a += roundup(mm->md_size, sizeof(u_long));\ + a += roundup(mm->md_size, sizeof(uint32_t));\ } #define MOD_END(a, c) { \ @@ -146,6 +146,7 @@ bi_load32(char *args, int *howtop, int * int bootdevnr, howto; char *kernelname; const char *kernelpath; + uint64_t lowmem, highmem; howto = bi_getboothowto(args); @@ -198,9 +199,7 @@ bi_load32(char *args, int *howtop, int * file_addmetadata(kfp, MODINFOMD_HOWTO, sizeof howto, &howto); file_addmetadata(kfp, MODINFOMD_ENVP, sizeof envp, &envp); file_addmetadata(kfp, MODINFOMD_KERNEND, sizeof kernend, &kernend); -#if 0 bios_addsmapdata(kfp); -#endif /* Figure out the size and location of the metadata */ *modulep = addr; @@ -237,11 +236,10 @@ bi_load32(char *args, int *howtop, int * bi.bi_bios_geom[i] = bd_getbigeom(i); #endif bi.bi_size = sizeof(bi); + CALLBACK(getmem, &lowmem, &highmem); bi.bi_memsizes_valid = 1; -#if 0 - bi.bi_basemem = bios_basemem / 1024; - bi.bi_extmem = bios_extmem / 1024; -#endif + bi.bi_basemem = 640; + bi.bi_extmem = (lowmem - 0x100000) / 1024; bi.bi_envp = envp; bi.bi_modulep = *modulep; bi.bi_kernend = kernend; @@ -251,7 +249,7 @@ bi_load32(char *args, int *howtop, int * /* * Copy the legacy bootinfo and kernel name to the guest at 0x2000 */ - bi.bi_kernelname = (char *) (0x2000 + sizeof(bi)); + bi.bi_kernelname = 0x2000 + sizeof(bi); CALLBACK(copyin, &bi, 0x2000, sizeof(bi)); CALLBACK(copyin, kernelname, 0x2000 + sizeof(bi), strlen(kernelname) + 1); Modified: stable/10/sys/boot/userboot/userboot/bootinfo64.c ============================================================================== --- stable/10/sys/boot/userboot/userboot/bootinfo64.c Thu Jun 12 14:20:58 2014 (r267398) +++ stable/10/sys/boot/userboot/userboot/bootinfo64.c Thu Jun 12 15:20:59 2014 (r267399) @@ -169,53 +169,6 @@ bi_checkcpu(void) #endif } -struct smap { - uint64_t base; - uint64_t length; - uint32_t type; -} __packed; - -/* From FreeBSD */ -#define SMAP_TYPE_MEMORY 1 - -#define GB (1024UL * 1024 * 1024) - -#define MODINFOMD_SMAP 0x1001 - -static void -bios_addsmapdata(struct preloaded_file *kfp) -{ - uint64_t lowmem, highmem; - int smapnum, len; - struct smap smap[3], *sm; - - CALLBACK(getmem, &lowmem, &highmem); - - sm = &smap[0]; - - sm->base = 0; /* base memory */ - sm->length = 640 * 1024; - sm->type = SMAP_TYPE_MEMORY; - sm++; - - sm->base = 0x100000; /* extended memory */ - sm->length = lowmem - 0x100000; - sm->type = SMAP_TYPE_MEMORY; - sm++; - - smapnum = 2; - - if (highmem != 0) { - sm->base = 4 * GB; - sm->length = highmem; - sm->type = SMAP_TYPE_MEMORY; - smapnum++; - } - - len = smapnum * sizeof (struct smap); - file_addmetadata(kfp, MODINFOMD_SMAP, len, &smap[0]); -} - /* * Load the information expected by an amd64 kernel. * Modified: stable/10/sys/boot/userboot/userboot/elf32_freebsd.c ============================================================================== --- stable/10/sys/boot/userboot/userboot/elf32_freebsd.c Thu Jun 12 14:20:58 2014 (r267398) +++ stable/10/sys/boot/userboot/userboot/elf32_freebsd.c Thu Jun 12 15:20:59 2014 (r267399) @@ -45,6 +45,9 @@ static int elf32_obj_exec(struct preload struct file_format i386_elf = { elf32_loadfile, elf32_exec }; struct file_format i386_elf_obj = { elf32_obj_loadfile, elf32_obj_exec }; +#define GUEST_STACK 0x1000 /* Initial stack base */ +#define GUEST_GDT 0x3000 /* Address of initial GDT */ + /* * There is an ELF kernel and one or more ELF modules loaded. * We wish to start executing the kernel image, so make such @@ -57,7 +60,7 @@ elf32_exec(struct preloaded_file *fp) Elf_Ehdr *ehdr; vm_offset_t entry, bootinfop, modulep, kernend; int boothowto, err, bootdev; - uint32_t stack[1024]; + uint32_t stack[1024], *sp; if ((md = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL) @@ -78,16 +81,27 @@ elf32_exec(struct preloaded_file *fp) /* * Build a scratch stack at physical 0x1000 */ - stack[0] = boothowto; - stack[1] = bootdev; - stack[2] = 0; - stack[3] = 0; - stack[4] = 0; - stack[5] = bootinfop; - stack[6] = modulep; - stack[7] = kernend; - CALLBACK(copyin, stack, 0x1000, sizeof(stack)); - CALLBACK(setreg, 4, 0x1000); + memset(stack, 0, sizeof(stack)); + sp = (uint32_t *)((char *)stack + sizeof(stack)); + *--sp = kernend; + *--sp = modulep; + *--sp = bootinfop; + *--sp = 0; + *--sp = 0; + *--sp = 0; + *--sp = bootdev; + *--sp = boothowto; + + /* + * Fake return address to mimic "new" boot blocks. For more + * details see recover_bootinfo in locore.S. + */ + *--sp = 0xbeefface; + CALLBACK(copyin, stack, GUEST_STACK, sizeof(stack)); + CALLBACK(setreg, 4, (char *)sp - (char *)stack + GUEST_STACK); + + CALLBACK(setgdt, GUEST_GDT, 8 * 4 - 1); + CALLBACK(exec, entry); panic("exec returned"); Modified: stable/10/sys/boot/userboot/userboot/libuserboot.h ============================================================================== --- stable/10/sys/boot/userboot/userboot/libuserboot.h Thu Jun 12 14:20:58 2014 (r267398) +++ stable/10/sys/boot/userboot/userboot/libuserboot.h Thu Jun 12 15:20:59 2014 (r267399) @@ -65,3 +65,4 @@ vm_offset_t bi_copyenv(vm_offset_t addr) int bi_load32(char *args, int *howtop, int *bootdevp, vm_offset_t *bip, vm_offset_t *modulep, vm_offset_t *kernend); int bi_load64(char *args, vm_offset_t *modulep, vm_offset_t *kernend); +void bios_addsmapdata(struct preloaded_file *kfp); Modified: stable/10/usr.sbin/bhyveload/bhyveload.c ============================================================================== --- stable/10/usr.sbin/bhyveload/bhyveload.c Thu Jun 12 14:20:58 2014 (r267398) +++ stable/10/usr.sbin/bhyveload/bhyveload.c Thu Jun 12 15:20:59 2014 (r267399) @@ -465,7 +465,12 @@ cb_exec(void *arg, uint64_t rip) { int error; - error = vm_setup_freebsd_registers(ctx, BSP, rip, cr3, gdtbase, rsp); + if (cr3 == 0) + error = vm_setup_freebsd_registers_i386(ctx, BSP, rip, gdtbase, + rsp); + else + error = vm_setup_freebsd_registers(ctx, BSP, rip, cr3, gdtbase, + rsp); if (error) { perror("vm_setup_freebsd_registers"); cb_exit(NULL, USERBOOT_EXIT_QUIT); From owner-svn-src-stable@FreeBSD.ORG Thu Jun 12 15:24:34 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 074F569E; Thu, 12 Jun 2014 15:24:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E80BF284D; Thu, 12 Jun 2014 15:24:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5CFOXgt001498; Thu, 12 Jun 2014 15:24:33 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5CFOXBG001497; Thu, 12 Jun 2014 15:24:33 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406121524.s5CFOXBG001497@svn.freebsd.org> From: John Baldwin Date: Thu, 12 Jun 2014 15:24:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267401 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 15:24:34 -0000 Author: jhb Date: Thu Jun 12 15:24:33 2014 New Revision: 267401 URL: http://svnweb.freebsd.org/changeset/base/267401 Log: MFC 262311: Fix virtio spec URL. Modified: stable/10/usr.sbin/bhyve/virtio.h Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/virtio.h ============================================================================== --- stable/10/usr.sbin/bhyve/virtio.h Thu Jun 12 15:23:51 2014 (r267400) +++ stable/10/usr.sbin/bhyve/virtio.h Thu Jun 12 15:24:33 2014 (r267401) @@ -33,7 +33,7 @@ * These are derived from several virtio specifications. * * Some useful links: - * https://github.com/rustyrussel/virtio-spec + * https://github.com/rustyrussell/virtio-spec * http://people.redhat.com/pbonzini/virtio-spec.pdf */ From owner-svn-src-stable@FreeBSD.ORG Thu Jun 12 15:46:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9AF11F09; Thu, 12 Jun 2014 15:46:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8758A2A2E; Thu, 12 Jun 2014 15:46:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5CFkODw010890; Thu, 12 Jun 2014 15:46:24 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5CFkOEv010889; Thu, 12 Jun 2014 15:46:24 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201406121546.s5CFkOEv010889@svn.freebsd.org> From: Warren Block Date: Thu, 12 Jun 2014 15:46:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267402 - stable/10/share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 15:46:24 -0000 Author: wblock (doc committer) Date: Thu Jun 12 15:46:24 2014 New Revision: 267402 URL: http://svnweb.freebsd.org/changeset/base/267402 Log: MFC r267090: Correct the document date for last change. Modified: stable/10/share/man/man5/passwd.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man5/passwd.5 ============================================================================== --- stable/10/share/man/man5/passwd.5 Thu Jun 12 15:24:33 2014 (r267401) +++ stable/10/share/man/man5/passwd.5 Thu Jun 12 15:46:24 2014 (r267402) @@ -35,7 +35,7 @@ .\" From: @(#)passwd.5 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd June 23, 2012 +.Dd May 29, 2014 .Dt PASSWD 5 .Os .Sh NAME From owner-svn-src-stable@FreeBSD.ORG Thu Jun 12 15:59:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2CF334FE; Thu, 12 Jun 2014 15:59:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 197EC2B60; Thu, 12 Jun 2014 15:59:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5CFxaod016008; Thu, 12 Jun 2014 15:59:36 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5CFxaYM016007; Thu, 12 Jun 2014 15:59:36 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201406121559.s5CFxaYM016007@svn.freebsd.org> From: Ed Maste Date: Thu, 12 Jun 2014 15:59:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267403 - stable/9/sys/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 15:59:37 -0000 Author: emaste Date: Thu Jun 12 15:59:36 2014 New Revision: 267403 URL: http://svnweb.freebsd.org/changeset/base/267403 Log: MFC r266171, r266174 by gnn: Update the amount of data we can collect for hwpmc(4) by default to work with modern processors and available memory. Upgrade the default callchain depth Approved by: re Modified: stable/9/sys/sys/pmc.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/sys/pmc.h ============================================================================== --- stable/9/sys/sys/pmc.h Thu Jun 12 15:46:24 2014 (r267402) +++ stable/9/sys/sys/pmc.h Thu Jun 12 15:59:36 2014 (r267403) @@ -593,12 +593,12 @@ struct pmc_op_getdyneventinfo { #include -#define PMC_HASH_SIZE 16 -#define PMC_MTXPOOL_SIZE 32 +#define PMC_HASH_SIZE 1024 +#define PMC_MTXPOOL_SIZE 2048 #define PMC_LOG_BUFFER_SIZE 4 -#define PMC_NLOGBUFFERS 64 -#define PMC_NSAMPLES 512 -#define PMC_CALLCHAIN_DEPTH 8 +#define PMC_NLOGBUFFERS 1024 +#define PMC_NSAMPLES 1024 +#define PMC_CALLCHAIN_DEPTH 16 #define PMC_SYSCTL_NAME_PREFIX "kern." PMC_MODULE_NAME "." From owner-svn-src-stable@FreeBSD.ORG Thu Jun 12 16:00:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 461FF650; Thu, 12 Jun 2014 16:00:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3296A2BD9; Thu, 12 Jun 2014 16:00:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5CG0dbT018193; Thu, 12 Jun 2014 16:00:39 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5CG0dPi018192; Thu, 12 Jun 2014 16:00:39 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201406121600.s5CG0dPi018192@svn.freebsd.org> From: Warren Block Date: Thu, 12 Jun 2014 16:00:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267404 - stable/9/share/man/man5 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 16:00:39 -0000 Author: wblock (doc committer) Date: Thu Jun 12 16:00:38 2014 New Revision: 267404 URL: http://svnweb.freebsd.org/changeset/base/267404 Log: MFC r267090: Correct the document date for last change. Approved by: re (gjb) Modified: stable/9/share/man/man5/passwd.5 Directory Properties: stable/9/share/man/man5/ (props changed) Modified: stable/9/share/man/man5/passwd.5 ============================================================================== --- stable/9/share/man/man5/passwd.5 Thu Jun 12 15:59:36 2014 (r267403) +++ stable/9/share/man/man5/passwd.5 Thu Jun 12 16:00:38 2014 (r267404) @@ -35,7 +35,7 @@ .\" From: @(#)passwd.5 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd June 23, 2012 +.Dd May 29, 2014 .Dt PASSWD 5 .Os .Sh NAME From owner-svn-src-stable@FreeBSD.ORG Thu Jun 12 16:16:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31AA6CE1; Thu, 12 Jun 2014 16:16:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E4142D18; Thu, 12 Jun 2014 16:16:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5CGGBtY025282; Thu, 12 Jun 2014 16:16:11 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5CGGBxu025281; Thu, 12 Jun 2014 16:16:11 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201406121616.s5CGGBxu025281@svn.freebsd.org> From: Ed Maste Date: Thu, 12 Jun 2014 16:16:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267405 - stable/9/usr.sbin/pmcannotate X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 16:16:12 -0000 Author: emaste Date: Thu Jun 12 16:16:11 2014 New Revision: 267405 URL: http://svnweb.freebsd.org/changeset/base/267405 Log: MFC r266166 by gnn: Extend the size of the function or symbol that can be annotated. Approved by: re Modified: stable/9/usr.sbin/pmcannotate/pmcannotate.c Directory Properties: stable/9/usr.sbin/pmcannotate/ (props changed) Modified: stable/9/usr.sbin/pmcannotate/pmcannotate.c ============================================================================== --- stable/9/usr.sbin/pmcannotate/pmcannotate.c Thu Jun 12 16:00:38 2014 (r267404) +++ stable/9/usr.sbin/pmcannotate/pmcannotate.c Thu Jun 12 16:16:11 2014 (r267405) @@ -41,8 +41,8 @@ __FBSDID("$FreeBSD$"); #include -#define FNBUFF 161 -#define LNBUFF 161 +#define FNBUFF 512 +#define LNBUFF 512 #define TMPPATH "/tmp/pmcannotate.XXXXXX" From owner-svn-src-stable@FreeBSD.ORG Thu Jun 12 16:17:01 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B3B55E31; Thu, 12 Jun 2014 16:17:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A04062D29; Thu, 12 Jun 2014 16:17:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5CGH15R025447; Thu, 12 Jun 2014 16:17:01 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5CGH1CC025446; Thu, 12 Jun 2014 16:17:01 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201406121617.s5CGH1CC025446@svn.freebsd.org> From: Ed Maste Date: Thu, 12 Jun 2014 16:17:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267406 - stable/9/usr.sbin/pmcstat X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 16:17:01 -0000 Author: emaste Date: Thu Jun 12 16:17:01 2014 New Revision: 267406 URL: http://svnweb.freebsd.org/changeset/base/267406 Log: MFC r266903: Update default callchain depth to 16 to match kernel Approved by: re Modified: stable/9/usr.sbin/pmcstat/pmcstat.h Directory Properties: stable/9/usr.sbin/pmcstat/ (props changed) Modified: stable/9/usr.sbin/pmcstat/pmcstat.h ============================================================================== --- stable/9/usr.sbin/pmcstat/pmcstat.h Thu Jun 12 16:16:11 2014 (r267405) +++ stable/9/usr.sbin/pmcstat/pmcstat.h Thu Jun 12 16:17:01 2014 (r267406) @@ -60,7 +60,7 @@ #define DEFAULT_DISPLAY_HEIGHT 256 /* file virtual height */ #define DEFAULT_DISPLAY_WIDTH 1024 /* file virtual width */ #define DEFAULT_BUFFER_SIZE 4096 -#define DEFAULT_CALLGRAPH_DEPTH 4 +#define DEFAULT_CALLGRAPH_DEPTH 16 #define PRINT_HEADER_PREFIX "# " #define READPIPEFD 0 From owner-svn-src-stable@FreeBSD.ORG Thu Jun 12 16:26:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7AD65171; Thu, 12 Jun 2014 16:26:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66CF92E0E; Thu, 12 Jun 2014 16:26:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5CGQRfB029908; Thu, 12 Jun 2014 16:26:27 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5CGQRLc029907; Thu, 12 Jun 2014 16:26:27 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406121626.s5CGQRLc029907@svn.freebsd.org> From: Glen Barber Date: Thu, 12 Jun 2014 16:26:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267407 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 16:26:27 -0000 Author: gjb Date: Thu Jun 12 16:26:26 2014 New Revision: 267407 URL: http://svnweb.freebsd.org/changeset/base/267407 Log: Document r267379, arc4random(3) merge. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 12 16:17:01 2014 (r267406) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 12 16:26:26 2014 (r267407) @@ -666,6 +666,9 @@ device is an active kernel console, otherwise it is equivalent to off. + The &man.arc4random.3; library has been + updated to match that of &os;-CURRENT. + &man.periodic.8; Scripts From owner-svn-src-stable@FreeBSD.ORG Thu Jun 12 16:33:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B275609; Thu, 12 Jun 2014 16:33:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 35A5C2ED0; Thu, 12 Jun 2014 16:33:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5CGX7gY034120; Thu, 12 Jun 2014 16:33:07 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5CGX76J034119; Thu, 12 Jun 2014 16:33:07 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201406121633.s5CGX76J034119@svn.freebsd.org> From: Ed Maste Date: Thu, 12 Jun 2014 16:33:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267409 - stable/9/sys/dev/vt/font X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 16:33:07 -0000 Author: emaste Date: Thu Jun 12 16:33:06 2014 New Revision: 267409 URL: http://svnweb.freebsd.org/changeset/base/267409 Log: MFC r267109, r267179: Update vt(4) "Terminus BSD Console" font "Terminus BSD Console" is a derivative of Terminus that is provided by Mr. Dimitar Zhekov under the 2-clause BSD license for use by the FreeBSD vt(4) console. Clarify statement on font origin Approved by: re Modified: stable/9/sys/dev/vt/font/vt_font_default.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/vt/font/vt_font_default.c ============================================================================== --- stable/9/sys/dev/vt/font/vt_font_default.c Thu Jun 12 16:31:15 2014 (r267408) +++ stable/9/sys/dev/vt/font/vt_font_default.c Thu Jun 12 16:33:06 2014 (r267409) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 Dimitar Toshkov Zhekov. All rights reserved. + * Copyright (C) 2014 Dimitar Toshkov Zhekov. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -21,8 +21,13 @@ * 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. - * - * Please contribute any changes back to . + */ + +/* + * This is the "Terminus BSD Console" font. It is identical to the standard + * variant of Terminus Font 8x16, but provided under the 2-clause BSD License + * (FreeBSD License). Please contribute any changes back to Mr. Zhekov at + * . */ #include @@ -30,7 +35,7 @@ __FBSDID("$FreeBSD$"); #include -static uint8_t font_bytes[1422 * 16] = { +static uint8_t font_bytes[1477 * 16] = { 0x00, 0x00, 0x7e, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, @@ -784,8 +789,8 @@ static uint8_t font_bytes[1422 * 16] = { 0x40, 0x20, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x04, 0x04, 0x04, 0x04, 0x44, 0x44, 0x44, 0x24, 0x14, 0x0c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x92, 0x92, - 0x92, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x92, 0x92, + 0x92, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x28, 0x28, 0x44, 0x44, 0x82, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x44, 0x44, @@ -952,68 +957,112 @@ static uint8_t font_bytes[1422 * 16] = { 0xff, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0xff, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0xef, 0x00, 0xef, 0x28, 0x28, 0x28, - 0x28, 0x28, 0x28, 0x28, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x28, 0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, + 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x20, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x20, 0xc0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x08, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, + 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xf0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, - 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x0f, 0x0f, 0x0f, 0x0f, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xfe, + 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, + 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf0, 0xf0, 0xf0, 0xf0, + 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, + 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, + 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x80, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, - 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, - 0x88, 0x22, 0x88, 0x22, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, - 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xee, 0xbb, 0xee, 0xbb, + 0x0f, 0x0f, 0x0f, 0x0f, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, + 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0xaa, 0x55, 0xaa, 0x55, + 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xee, 0xbb, 0xee, 0xbb, 0xee, 0xbb, 0xee, 0xbb, 0xee, 0xbb, 0xee, 0xbb, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xf0, 0xf0, - 0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0xf0, 0xf0, 0xf0, 0xf0, - 0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, - 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f, + 0xee, 0xbb, 0xee, 0xbb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, + 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, + 0xf0, 0xf0, 0xf0, 0xf0, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, + 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f, - 0x0f, 0x0f, 0x0f, 0x0f, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, - 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x3c, 0x3c, - 0x3c, 0x3c, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7e, 0x7e, 0x7e, 0x7e, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x38, 0x38, - 0x7c, 0x7c, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xc0, 0xf0, 0xfc, 0xff, 0xfc, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0x7c, 0x7c, 0x38, 0x38, 0x10, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0f, 0x3f, 0xff, - 0x3f, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x10, 0x38, 0x7c, 0xfe, 0x7c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x28, 0x44, 0x82, 0x44, 0x28, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, - 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xe7, 0xc3, 0xc3, 0xe7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xdb, 0xdb, 0xe7, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x7c, 0x82, 0xaa, 0x82, 0x82, 0xba, - 0x92, 0x82, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xfe, - 0xd6, 0xfe, 0xfe, 0xc6, 0xee, 0xfe, 0xfe, 0x7c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x10, 0x92, 0x54, 0x38, 0xee, 0x38, 0x54, 0x92, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x44, 0x44, 0x44, 0x38, - 0x10, 0x7c, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x06, - 0x0a, 0x12, 0x38, 0x44, 0x44, 0x44, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x10, 0x10, 0x38, 0x7c, 0xfe, 0xfe, 0x7c, 0x10, 0x10, 0x38, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x38, 0x10, 0x54, 0xfe, - 0xfe, 0x54, 0x10, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x6c, 0xfe, 0xfe, 0xfe, 0xfe, 0x7c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x3e, 0x22, 0x3e, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0xc0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x42, 0x7e, 0x42, 0x42, 0x42, - 0x42, 0x42, 0x42, 0x44, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, + 0x0f, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0xf0, 0xf0, 0xf0, 0xf0, + 0xf0, 0xf0, 0xf0, 0xf0, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x7e, 0x7e, 0x7e, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, + 0x7e, 0x7e, 0x7e, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x10, 0x38, 0x38, 0x7c, 0x7c, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf0, 0xfc, 0xff, 0xfc, 0xf0, 0xc0, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0x7c, 0x7c, + 0x38, 0x38, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x0f, 0x3f, 0xff, 0x3f, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x7c, 0xfe, 0x7c, 0x38, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x28, 0x44, 0x82, + 0x44, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x18, 0x24, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xc3, 0xc3, 0xe7, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xdb, + 0xdb, 0xe7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x7c, 0x82, + 0xaa, 0x82, 0x82, 0xba, 0x92, 0x82, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x7c, 0xfe, 0xd6, 0xfe, 0xfe, 0xc6, 0xee, 0xfe, 0xfe, 0x7c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x92, 0x54, 0x38, 0xee, + 0x38, 0x54, 0x92, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, + 0x44, 0x44, 0x44, 0x38, 0x10, 0x7c, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x1e, 0x06, 0x0a, 0x12, 0x38, 0x44, 0x44, 0x44, 0x44, 0x38, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x38, 0x7c, 0xfe, 0xfe, + 0x7c, 0x10, 0x10, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, + 0x38, 0x10, 0x54, 0xfe, 0xfe, 0x54, 0x10, 0x38, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x6c, 0xfe, 0xfe, 0xfe, 0xfe, 0x7c, 0x38, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x22, 0x3e, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x42, + 0x7e, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x44, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x02, 0x02, 0x04, 0x04, 0x88, 0x88, 0x50, 0x50, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x06, 0x06, 0xcc, 0xcc, + 0x78, 0x78, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x44, + 0x28, 0x18, 0x18, 0x14, 0x22, 0x20, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x0c, 0xcc, 0x78, 0x38, 0x38, 0x3c, 0x66, 0x60, 0xc0, 0xc0, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x88, 0x9c, 0xaa, 0x88, 0x88, 0x88, + 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x80, + 0x80, 0x80, 0xf8, 0x00, 0x11, 0x19, 0x15, 0x13, 0x11, 0x11, 0x00, 0x00, + 0x00, 0x38, 0x44, 0x44, 0x44, 0x44, 0xfe, 0xfe, 0xee, 0xc6, 0xee, 0xfe, + 0xfe, 0xfe, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff, + 0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0x80, 0x40, 0x20, 0x10, + 0x08, 0x04, 0x02, 0x01, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, + 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff, 0xff, 0x7f, 0x3f, 0x1f, + 0x0f, 0x07, 0x03, 0x01, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, + 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x6c, 0x6c, 0xfe, 0x6c, 0x6c, @@ -1903,19 +1952,39 @@ static uint8_t font_bytes[1422 * 16] = { 0x18, 0x18, 0x18, 0x18, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0xff, 0xff, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0xef, 0xef, 0x00, 0xef, 0xef, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xfe, 0xfe, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, - 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x3c, 0x3c, 0x7e, 0x7e, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf0, 0xfc, 0xff, - 0xff, 0xfc, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x7e, 0x7e, 0x3c, 0x3c, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x03, 0x0f, 0x3f, 0xff, 0xff, 0x3f, 0x0f, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x7e, 0xff, - 0x7e, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x18, 0x3c, 0x66, 0xc3, 0x66, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x42, 0x42, 0x66, 0x3c, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0f, 0x1c, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, + 0xf0, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x38, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1c, 0x0f, 0x07, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, + 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf8, 0xf8, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, + 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x1f, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x38, 0x38, 0x38, + 0x38, 0x38, 0x38, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, + 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, + 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0xfe, 0xfe, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, + 0xfe, 0xfe, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x18, 0x18, 0x3c, 0x3c, 0x7e, 0x7e, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf0, 0xfc, 0xff, 0xff, 0xfc, 0xf0, 0xc0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7e, 0x7e, + 0x3c, 0x3c, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x0f, 0x3f, 0xff, 0xff, 0x3f, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x7e, 0xff, 0x7e, 0x3c, 0x18, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x66, 0xc3, + 0x66, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x3c, 0x66, 0x42, 0x42, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x7e, 0x7e, 0x7e, 0x7e, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc3, 0x99, 0xbd, 0xbd, 0x99, 0xc3, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x18, 0xdb, 0x7e, 0x3c, 0xe7, 0x3c, 0x7e, 0xdb, 0x18, 0x00, 0x00, 0x00, 0x00, @@ -1927,9 +1996,19 @@ static uint8_t font_bytes[1422 * 16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x66, 0x7e, 0x60, 0x60, 0x60, 0x60, 0x60, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x66, 0x7e, 0x66, 0x66, 0x66, 0x66, 0x66, 0x6e, 0xec, 0xc0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x07, 0x07, 0x0e, 0x0e, 0xdc, 0xfc, 0x78, 0x78, 0x30, 0x30, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0xee, 0x7c, 0x3c, 0x3c, 0x3e, + 0x77, 0x73, 0xe0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xcc, 0xde, + 0xff, 0xcc, 0xcc, 0xcc, 0x98, 0x30, 0x60, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xfc, 0x00, 0x33, 0x3b, 0x3f, 0x37, + 0x33, 0x33, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x66, 0xff, 0xff, + 0xe7, 0xc3, 0xe7, 0xff, 0xff, 0xff, 0x00, 0x00, 0x80, 0xc0, 0x60, 0x30, + 0x18, 0x0c, 0x06, 0x03, 0x03, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0x80, + 0x01, 0x03, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0xc0, 0x60, 0x30, 0x18, + 0x0c, 0x06, 0x03, 0x01, }; -static struct vt_font_map font_mapping_normal[248] = { +static struct vt_font_map font_mapping_normal[252] = { { 0x0020, 0x0001, 0x5e }, { 0x00a0, 0x0001, 0x00 }, { 0x00a1, 0x0060, 0x6e }, { 0x0110, 0x008f, 0x00 }, { 0x0111, 0x00cf, 0x08 }, { 0x011a, 0x00d2, 0x01 }, @@ -2038,155 +2117,163 @@ static struct vt_font_map font_mapping_n { 0x2212, 0x000e, 0x00 }, { 0x2219, 0x0233, 0x01 }, { 0x221e, 0x0235, 0x01 }, { 0x2227, 0x0237, 0x03 }, { 0x2248, 0x023b, 0x00 }, { 0x2260, 0x023c, 0x01 }, - { 0x2264, 0x023e, 0x01 }, { 0x2302, 0x0240, 0x00 }, - { 0x2310, 0x0241, 0x00 }, { 0x2320, 0x0242, 0x01 }, - { 0x23ba, 0x0244, 0x03 }, { 0x2409, 0x0248, 0x04 }, - { 0x2424, 0x024d, 0x00 }, { 0x2500, 0x024e, 0x03 }, - { 0x2508, 0x0252, 0x43 }, { 0x2550, 0x0296, 0x1c }, - { 0x2580, 0x02b3, 0x08 }, { 0x258c, 0x02bc, 0x00 }, - { 0x2590, 0x02bd, 0x03 }, { 0x2596, 0x02c1, 0x0a }, - { 0x25ac, 0x02cc, 0x00 }, { 0x25ae, 0x02cd, 0x00 }, - { 0x25b2, 0x02ce, 0x00 }, { 0x25b6, 0x02cf, 0x00 }, - { 0x25bc, 0x02d0, 0x00 }, { 0x25c0, 0x02d1, 0x00 }, - { 0x25c6, 0x02d2, 0x00 }, { 0x25ca, 0x02d3, 0x01 }, - { 0x25d8, 0x02d5, 0x01 }, { 0x263a, 0x02d7, 0x02 }, - { 0x2640, 0x02da, 0x00 }, { 0x2642, 0x02db, 0x00 }, - { 0x2660, 0x02dc, 0x00 }, { 0x2663, 0x02dd, 0x00 }, - { 0x2665, 0x02de, 0x00 }, { 0x2666, 0x02d2, 0x00 }, - { 0x266a, 0x02df, 0x01 }, { 0xf6be, 0x0148, 0x00 }, + { 0x2264, 0x023e, 0x01 }, { 0x2300, 0x0230, 0x00 }, + { 0x2302, 0x0240, 0x00 }, { 0x2310, 0x0241, 0x00 }, + { 0x2320, 0x0242, 0x01 }, { 0x23ba, 0x0244, 0x03 }, + { 0x2409, 0x0248, 0x04 }, { 0x2424, 0x024d, 0x00 }, + { 0x2500, 0x024e, 0x03 }, { 0x2508, 0x0252, 0x43 }, + { 0x2550, 0x0296, 0x20 }, { 0x2574, 0x02b7, 0x1f }, + { 0x2596, 0x02d7, 0x0a }, { 0x25ac, 0x02e2, 0x00 }, + { 0x25ae, 0x02e3, 0x00 }, { 0x25b2, 0x02e4, 0x00 }, + { 0x25b6, 0x02e5, 0x00 }, { 0x25bc, 0x02e6, 0x00 }, + { 0x25c0, 0x02e7, 0x00 }, { 0x25c6, 0x02e8, 0x00 }, + { 0x25ca, 0x02e9, 0x01 }, { 0x25cf, 0x0212, 0x00 }, + { 0x25d8, 0x02eb, 0x01 }, { 0x263a, 0x02ed, 0x02 }, + { 0x2640, 0x02f0, 0x00 }, { 0x2642, 0x02f1, 0x00 }, + { 0x2660, 0x02f2, 0x00 }, { 0x2663, 0x02f3, 0x00 }, + { 0x2665, 0x02f4, 0x00 }, { 0x2666, 0x02e8, 0x00 }, + { 0x266a, 0x02f5, 0x01 }, { 0x2713, 0x02f7, 0x01 }, + { 0x2717, 0x02f9, 0x01 }, { 0xe0a0, 0x02fb, 0x02 }, + { 0xe0b0, 0x02fe, 0x03 }, { 0xf6be, 0x0148, 0x00 }, }; -static struct vt_font_map font_mapping_bold[260] = { - { 0x0021, 0x02e1, 0x0b }, { 0x002d, 0x0205, 0x00 }, - { 0x002e, 0x02ed, 0x50 }, { 0x00a1, 0x033e, 0x07 }, - { 0x00aa, 0x0346, 0x03 }, { 0x00af, 0x034a, 0x07 }, - { 0x00b7, 0x0233, 0x00 }, { 0x00b8, 0x0352, 0x57 }, - { 0x0110, 0x036a, 0x00 }, { 0x0111, 0x03aa, 0x08 }, - { 0x011a, 0x03ad, 0x01 }, { 0x011c, 0x03b3, 0x59 }, - { 0x0178, 0x040d, 0x07 }, { 0x0186, 0x0415, 0x00 }, - { 0x018e, 0x0416, 0x02 }, { 0x0192, 0x0419, 0x00 }, - { 0x019d, 0x041a, 0x01 }, { 0x01b7, 0x041c, 0x00 }, - { 0x0218, 0x041d, 0x03 }, { 0x0232, 0x0421, 0x01 }, - { 0x0237, 0x0423, 0x00 }, { 0x0254, 0x0424, 0x00 }, - { 0x0258, 0x0425, 0x01 }, { 0x025b, 0x0427, 0x00 }, - { 0x0272, 0x0428, 0x00 }, { 0x0292, 0x0429, 0x00 }, - { 0x02bb, 0x042a, 0x02 }, { 0x02c6, 0x042d, 0x01 }, - { 0x02d8, 0x042e, 0x01 }, { 0x02db, 0x0430, 0x02 }, - { 0x0300, 0x031f, 0x00 }, { 0x0301, 0x034f, 0x00 }, - { 0x0302, 0x042d, 0x00 }, { 0x0303, 0x0431, 0x00 }, - { 0x0306, 0x042e, 0x00 }, { 0x030c, 0x042e, 0x00 }, - { 0x0329, 0x0433, 0x00 }, { 0x0384, 0x0434, 0x06 }, - { 0x038c, 0x043b, 0x00 }, { 0x038e, 0x043c, 0x02 }, - { 0x0391, 0x0300, 0x01 }, { 0x0393, 0x043f, 0x01 }, - { 0x0395, 0x0304, 0x00 }, { 0x0396, 0x0319, 0x00 }, - { 0x0397, 0x0307, 0x00 }, { 0x0398, 0x0441, 0x00 }, - { 0x0399, 0x0308, 0x00 }, { 0x039a, 0x030a, 0x00 }, - { 0x039b, 0x0442, 0x00 }, { 0x039c, 0x030c, 0x01 }, - { 0x039e, 0x0443, 0x00 }, { 0x039f, 0x030e, 0x00 }, - { 0x03a0, 0x0444, 0x00 }, { 0x03a1, 0x030f, 0x00 }, - { 0x03a3, 0x0445, 0x00 }, { 0x03a4, 0x0313, 0x00 }, - { 0x03a5, 0x0318, 0x00 }, { 0x03a6, 0x0446, 0x00 }, - { 0x03a7, 0x0317, 0x00 }, { 0x03a8, 0x0447, 0x01 }, - { 0x03aa, 0x0369, 0x00 }, { 0x03ab, 0x040d, 0x00 }, - { 0x03ac, 0x0449, 0x08 }, { 0x03b5, 0x0427, 0x00 }, - { 0x03b6, 0x0452, 0x00 }, { 0x03b7, 0x041b, 0x00 }, - { 0x03b8, 0x0453, 0x01 }, { 0x03ba, 0x03cf, 0x00 }, - { 0x03bb, 0x0455, 0x00 }, { 0x03bc, 0x0350, 0x00 }, - { 0x03bd, 0x0335, 0x00 }, { 0x03be, 0x0456, 0x00 }, - { 0x03bf, 0x032e, 0x00 }, { 0x03c0, 0x0457, 0x0b }, - { 0x03cc, 0x038d, 0x00 }, { 0x03cd, 0x0463, 0x01 }, - { 0x03f3, 0x0329, 0x00 }, { 0x03f4, 0x0465, 0x00 }, - { 0x0400, 0x0362, 0x00 }, { 0x0401, 0x0365, 0x00 }, - { 0x0402, 0x0466, 0x02 }, { 0x0405, 0x0312, 0x00 }, - { 0x0406, 0x0308, 0x00 }, { 0x0407, 0x0369, 0x00 }, - { 0x0408, 0x0309, 0x00 }, { 0x0409, 0x0469, 0x06 }, - { 0x0410, 0x0300, 0x00 }, { 0x0411, 0x0470, 0x00 }, - { 0x0412, 0x0301, 0x00 }, { 0x0413, 0x043f, 0x00 }, - { 0x0414, 0x0471, 0x00 }, { 0x0415, 0x0304, 0x00 }, - { 0x0416, 0x0472, 0x00 }, { 0x0417, 0x02f2, 0x00 }, - { 0x0418, 0x0473, 0x01 }, { 0x041a, 0x030a, 0x00 }, - { 0x041b, 0x0475, 0x00 }, { 0x041c, 0x030c, 0x00 }, - { 0x041d, 0x0307, 0x00 }, { 0x041e, 0x030e, 0x00 }, - { 0x041f, 0x0444, 0x00 }, { 0x0420, 0x030f, 0x00 }, - { 0x0421, 0x0302, 0x00 }, { 0x0422, 0x0313, 0x00 }, - { 0x0423, 0x0476, 0x01 }, { 0x0425, 0x0317, 0x00 }, - { 0x0426, 0x0478, 0x09 }, { 0x0430, 0x0320, 0x00 }, - { 0x0431, 0x0482, 0x02 }, { 0x0434, 0x0326, 0x00 }, - { 0x0435, 0x0324, 0x00 }, { 0x0436, 0x0485, 0x01 }, - { 0x0438, 0x0334, 0x00 }, { 0x0439, 0x0404, 0x00 }, - { 0x043a, 0x03cf, 0x00 }, { 0x043b, 0x0487, 0x02 }, - { 0x043e, 0x032e, 0x00 }, { 0x043f, 0x0457, 0x00 }, - { 0x0440, 0x032f, 0x00 }, { 0x0441, 0x0322, 0x00 }, - { 0x0442, 0x048a, 0x00 }, { 0x0443, 0x0338, 0x00 }, - { 0x0444, 0x048b, 0x00 }, { 0x0445, 0x0337, 0x00 }, - { 0x0446, 0x048c, 0x09 }, { 0x0450, 0x0382, 0x00 }, - { 0x0451, 0x0385, 0x00 }, { 0x0452, 0x0496, 0x02 }, - { 0x0455, 0x0332, 0x00 }, { 0x0456, 0x0328, 0x00 }, - { 0x0457, 0x0389, 0x00 }, { 0x0458, 0x0329, 0x00 }, - { 0x0459, 0x0499, 0x01 }, { 0x045b, 0x03be, 0x00 }, - { 0x045c, 0x049b, 0x00 }, { 0x045d, 0x0393, 0x00 }, - { 0x045e, 0x049c, 0x01 }, { 0x0490, 0x049e, 0x0d }, - { 0x04a0, 0x04ac, 0x05 }, { 0x04aa, 0x04b2, 0x01 }, - { 0x04ae, 0x0318, 0x00 }, { 0x04af, 0x0450, 0x00 }, - { 0x04b0, 0x04b4, 0x03 }, { 0x04b6, 0x04b8, 0x05 }, - { 0x04d0, 0x039c, 0x01 }, { 0x04d2, 0x035e, 0x00 }, - { 0x04d3, 0x037e, 0x00 }, { 0x04d4, 0x0360, 0x00 }, - { 0x04d5, 0x0380, 0x00 }, { 0x04d6, 0x03ad, 0x01 }, - { 0x04d8, 0x0417, 0x00 }, { 0x04d9, 0x0426, 0x00 }, - { 0x04da, 0x04be, 0x05 }, { 0x04e2, 0x04c4, 0x00 }, - { 0x04e3, 0x0402, 0x00 }, { 0x04e4, 0x04c5, 0x00 }, - { 0x04e5, 0x0396, 0x00 }, { 0x04e6, 0x0370, 0x00 }, - { 0x04e7, 0x0390, 0x00 }, { 0x04e8, 0x0465, 0x00 }, - { 0x04e9, 0x04c6, 0x05 }, { 0x04ef, 0x0422, 0x00 }, - { 0x04f0, 0x04cc, 0x00 }, { 0x04f1, 0x0399, 0x00 }, - { 0x04f2, 0x04cd, 0x03 }, { 0x04f8, 0x04d1, 0x01 }, - { 0x1e34, 0x04d3, 0x01 }, { 0x1eb8, 0x04d5, 0x01 }, - { 0x1ebc, 0x04d7, 0x01 }, { 0x1eca, 0x04d9, 0x03 }, - { 0x1ee4, 0x04dd, 0x01 }, { 0x1ef8, 0x04df, 0x01 }, - { 0x2010, 0x0349, 0x00 }, { 0x2011, 0x0349, 0x00 }, +static struct vt_font_map font_mapping_bold[272] = { + { 0x0021, 0x0302, 0x0b }, { 0x002d, 0x0205, 0x00 }, + { 0x002e, 0x030e, 0x50 }, { 0x00a1, 0x035f, 0x07 }, + { 0x00aa, 0x0367, 0x03 }, { 0x00af, 0x036b, 0x07 }, + { 0x00b7, 0x0233, 0x00 }, { 0x00b8, 0x0373, 0x57 }, + { 0x0110, 0x038b, 0x00 }, { 0x0111, 0x03cb, 0x08 }, + { 0x011a, 0x03ce, 0x01 }, { 0x011c, 0x03d4, 0x59 }, + { 0x0178, 0x042e, 0x07 }, { 0x0186, 0x0436, 0x00 }, + { 0x018e, 0x0437, 0x02 }, { 0x0192, 0x043a, 0x00 }, + { 0x019d, 0x043b, 0x01 }, { 0x01b7, 0x043d, 0x00 }, + { 0x0218, 0x043e, 0x03 }, { 0x0232, 0x0442, 0x01 }, + { 0x0237, 0x0444, 0x00 }, { 0x0254, 0x0445, 0x00 }, + { 0x0258, 0x0446, 0x01 }, { 0x025b, 0x0448, 0x00 }, + { 0x0272, 0x0449, 0x00 }, { 0x0292, 0x044a, 0x00 }, + { 0x02bb, 0x044b, 0x02 }, { 0x02c6, 0x044e, 0x01 }, + { 0x02d8, 0x044f, 0x01 }, { 0x02db, 0x0451, 0x02 }, + { 0x0300, 0x0340, 0x00 }, { 0x0301, 0x0370, 0x00 }, + { 0x0302, 0x044e, 0x00 }, { 0x0303, 0x0452, 0x00 }, + { 0x0306, 0x044f, 0x00 }, { 0x030c, 0x044f, 0x00 }, + { 0x0329, 0x0454, 0x00 }, { 0x0384, 0x0455, 0x06 }, + { 0x038c, 0x045c, 0x00 }, { 0x038e, 0x045d, 0x02 }, + { 0x0391, 0x0321, 0x01 }, { 0x0393, 0x0460, 0x01 }, + { 0x0395, 0x0325, 0x00 }, { 0x0396, 0x033a, 0x00 }, + { 0x0397, 0x0328, 0x00 }, { 0x0398, 0x0462, 0x00 }, + { 0x0399, 0x0329, 0x00 }, { 0x039a, 0x032b, 0x00 }, + { 0x039b, 0x0463, 0x00 }, { 0x039c, 0x032d, 0x01 }, + { 0x039e, 0x0464, 0x00 }, { 0x039f, 0x032f, 0x00 }, + { 0x03a0, 0x0465, 0x00 }, { 0x03a1, 0x0330, 0x00 }, + { 0x03a3, 0x0466, 0x00 }, { 0x03a4, 0x0334, 0x00 }, + { 0x03a5, 0x0339, 0x00 }, { 0x03a6, 0x0467, 0x00 }, + { 0x03a7, 0x0338, 0x00 }, { 0x03a8, 0x0468, 0x01 }, + { 0x03aa, 0x038a, 0x00 }, { 0x03ab, 0x042e, 0x00 }, + { 0x03ac, 0x046a, 0x08 }, { 0x03b5, 0x0448, 0x00 }, + { 0x03b6, 0x0473, 0x00 }, { 0x03b7, 0x043c, 0x00 }, + { 0x03b8, 0x0474, 0x01 }, { 0x03ba, 0x03f0, 0x00 }, + { 0x03bb, 0x0476, 0x00 }, { 0x03bc, 0x0371, 0x00 }, + { 0x03bd, 0x0356, 0x00 }, { 0x03be, 0x0477, 0x00 }, + { 0x03bf, 0x034f, 0x00 }, { 0x03c0, 0x0478, 0x0b }, + { 0x03cc, 0x03ae, 0x00 }, { 0x03cd, 0x0484, 0x01 }, + { 0x03f3, 0x034a, 0x00 }, { 0x03f4, 0x0486, 0x00 }, + { 0x0400, 0x0383, 0x00 }, { 0x0401, 0x0386, 0x00 }, + { 0x0402, 0x0487, 0x02 }, { 0x0405, 0x0333, 0x00 }, + { 0x0406, 0x0329, 0x00 }, { 0x0407, 0x038a, 0x00 }, + { 0x0408, 0x032a, 0x00 }, { 0x0409, 0x048a, 0x06 }, + { 0x0410, 0x0321, 0x00 }, { 0x0411, 0x0491, 0x00 }, + { 0x0412, 0x0322, 0x00 }, { 0x0413, 0x0460, 0x00 }, + { 0x0414, 0x0492, 0x00 }, { 0x0415, 0x0325, 0x00 }, + { 0x0416, 0x0493, 0x00 }, { 0x0417, 0x0313, 0x00 }, + { 0x0418, 0x0494, 0x01 }, { 0x041a, 0x032b, 0x00 }, + { 0x041b, 0x0496, 0x00 }, { 0x041c, 0x032d, 0x00 }, + { 0x041d, 0x0328, 0x00 }, { 0x041e, 0x032f, 0x00 }, + { 0x041f, 0x0465, 0x00 }, { 0x0420, 0x0330, 0x00 }, + { 0x0421, 0x0323, 0x00 }, { 0x0422, 0x0334, 0x00 }, + { 0x0423, 0x0497, 0x01 }, { 0x0425, 0x0338, 0x00 }, + { 0x0426, 0x0499, 0x09 }, { 0x0430, 0x0341, 0x00 }, + { 0x0431, 0x04a3, 0x02 }, { 0x0434, 0x0347, 0x00 }, + { 0x0435, 0x0345, 0x00 }, { 0x0436, 0x04a6, 0x01 }, + { 0x0438, 0x0355, 0x00 }, { 0x0439, 0x0425, 0x00 }, + { 0x043a, 0x03f0, 0x00 }, { 0x043b, 0x04a8, 0x02 }, + { 0x043e, 0x034f, 0x00 }, { 0x043f, 0x0478, 0x00 }, + { 0x0440, 0x0350, 0x00 }, { 0x0441, 0x0343, 0x00 }, + { 0x0442, 0x04ab, 0x00 }, { 0x0443, 0x0359, 0x00 }, + { 0x0444, 0x04ac, 0x00 }, { 0x0445, 0x0358, 0x00 }, + { 0x0446, 0x04ad, 0x09 }, { 0x0450, 0x03a3, 0x00 }, + { 0x0451, 0x03a6, 0x00 }, { 0x0452, 0x04b7, 0x02 }, + { 0x0455, 0x0353, 0x00 }, { 0x0456, 0x0349, 0x00 }, + { 0x0457, 0x03aa, 0x00 }, { 0x0458, 0x034a, 0x00 }, + { 0x0459, 0x04ba, 0x01 }, { 0x045b, 0x03df, 0x00 }, + { 0x045c, 0x04bc, 0x00 }, { 0x045d, 0x03b4, 0x00 }, + { 0x045e, 0x04bd, 0x01 }, { 0x0490, 0x04bf, 0x0d }, + { 0x04a0, 0x04cd, 0x05 }, { 0x04aa, 0x04d3, 0x01 }, + { 0x04ae, 0x0339, 0x00 }, { 0x04af, 0x0471, 0x00 }, + { 0x04b0, 0x04d5, 0x03 }, { 0x04b6, 0x04d9, 0x05 }, + { 0x04d0, 0x03bd, 0x01 }, { 0x04d2, 0x037f, 0x00 }, + { 0x04d3, 0x039f, 0x00 }, { 0x04d4, 0x0381, 0x00 }, + { 0x04d5, 0x03a1, 0x00 }, { 0x04d6, 0x03ce, 0x01 }, + { 0x04d8, 0x0438, 0x00 }, { 0x04d9, 0x0447, 0x00 }, + { 0x04da, 0x04df, 0x05 }, { 0x04e2, 0x04e5, 0x00 }, + { 0x04e3, 0x0423, 0x00 }, { 0x04e4, 0x04e6, 0x00 }, + { 0x04e5, 0x03b7, 0x00 }, { 0x04e6, 0x0391, 0x00 }, + { 0x04e7, 0x03b1, 0x00 }, { 0x04e8, 0x0486, 0x00 }, + { 0x04e9, 0x04e7, 0x05 }, { 0x04ef, 0x0443, 0x00 }, + { 0x04f0, 0x04ed, 0x00 }, { 0x04f1, 0x03ba, 0x00 }, + { 0x04f2, 0x04ee, 0x03 }, { 0x04f8, 0x04f2, 0x01 }, + { 0x1e34, 0x04f4, 0x01 }, { 0x1eb8, 0x04f6, 0x01 }, + { 0x1ebc, 0x04f8, 0x01 }, { 0x1eca, 0x04fa, 0x03 }, + { 0x1ee4, 0x04fe, 0x01 }, { 0x1ef8, 0x0500, 0x01 }, + { 0x2010, 0x036a, 0x00 }, { 0x2011, 0x036a, 0x00 }, { 0x2012, 0x0205, 0x00 }, { 0x2013, 0x0205, 0x00 }, - { 0x2016, 0x04e1, 0x03 }, { 0x201a, 0x02ec, 0x00 }, - { 0x201b, 0x04e5, 0x06 }, { 0x2026, 0x04ec, 0x00 }, - { 0x2030, 0x04ed, 0x00 }, { 0x2032, 0x04ee, 0x01 }, - { 0x2039, 0x04f0, 0x01 }, { 0x203c, 0x04f2, 0x00 }, - { 0x203e, 0x04f3, 0x00 }, { 0x207f, 0x04f4, 0x00 }, - { 0x20a7, 0x04f5, 0x00 }, { 0x20ac, 0x04f6, 0x00 }, - { 0x20ae, 0x04f7, 0x00 }, { 0x210e, 0x0327, 0x00 }, - { 0x210f, 0x03be, 0x00 }, { 0x2126, 0x0448, 0x00 }, - { 0x2190, 0x04f8, 0x05 }, { 0x21a8, 0x04fe, 0x00 }, - { 0x21b5, 0x04ff, 0x00 }, { 0x21d0, 0x0500, 0x05 }, - { 0x2203, 0x0506, 0x00 }, { 0x2205, 0x0507, 0x00 }, - { 0x2206, 0x0440, 0x00 }, { 0x2208, 0x0508, 0x00 }, - { 0x220a, 0x0509, 0x00 }, { 0x2212, 0x0205, 0x00 }, - { 0x2219, 0x050a, 0x01 }, { 0x221e, 0x050c, 0x01 }, - { 0x2227, 0x050e, 0x03 }, { 0x2248, 0x0512, 0x00 }, - { 0x2260, 0x0513, 0x01 }, { 0x2264, 0x0515, 0x01 }, - { 0x2302, 0x0517, 0x00 }, { 0x2310, 0x0518, 0x00 }, - { 0x2320, 0x0519, 0x01 }, { 0x23ba, 0x051b, 0x02 }, - { 0x23bd, 0x02b4, 0x00 }, { 0x2409, 0x051e, 0x04 }, - { 0x2424, 0x0523, 0x00 }, { 0x2500, 0x024f, 0x00 }, - { 0x2501, 0x0524, 0x00 }, { 0x2502, 0x0251, 0x00 }, - { 0x2503, 0x0525, 0x00 }, { 0x2508, 0x0253, 0x00 }, - { 0x2509, 0x0526, 0x00 }, { 0x250a, 0x0255, 0x00 }, - { 0x250b, 0x0527, 0x00 }, { 0x250c, 0x0259, 0x00 }, - { 0x250d, 0x0528, 0x02 }, { 0x2510, 0x025d, 0x00 }, - { 0x2511, 0x052b, 0x02 }, { 0x2514, 0x0261, 0x00 }, - { 0x2515, 0x052e, 0x02 }, { 0x2518, 0x0265, 0x00 }, - { 0x2519, 0x0531, 0x02 }, { 0x251c, 0x026d, 0x00 }, - { 0x251d, 0x0534, 0x06 }, { 0x2524, 0x0275, 0x00 }, - { 0x2525, 0x053b, 0x06 }, { 0x252c, 0x027d, 0x00 }, - { 0x252d, 0x0542, 0x06 }, { 0x2534, 0x0285, 0x00 }, - { 0x2535, 0x0549, 0x06 }, { 0x253c, 0x0295, 0x00 }, - { 0x253d, 0x0550, 0x0e }, { 0x2550, 0x055f, 0x1c }, - { 0x25a0, 0x057c, 0x00 }, { 0x25ac, 0x057d, 0x00 }, - { 0x25ae, 0x057e, 0x00 }, { 0x25b2, 0x057f, 0x00 }, - { 0x25b6, 0x0580, 0x00 }, { 0x25bc, 0x0581, 0x00 }, - { 0x25c0, 0x0582, 0x00 }, { 0x25c6, 0x0583, 0x00 }, - { 0x25ca, 0x0584, 0x01 }, { 0x25d9, 0x0586, 0x00 }, - { 0x263c, 0x0587, 0x00 }, { 0x2640, 0x0588, 0x00 }, - { 0x2642, 0x0589, 0x00 }, { 0x2660, 0x058a, 0x00 }, - { 0x2663, 0x058b, 0x00 }, { 0x2666, 0x0583, 0x00 }, - { 0x266a, 0x058c, 0x01 }, { 0xf6be, 0x0423, 0x00 }, + { 0x2016, 0x0502, 0x03 }, { 0x201a, 0x030d, 0x00 }, + { 0x201b, 0x0506, 0x06 }, { 0x2026, 0x050d, 0x00 }, + { 0x2030, 0x050e, 0x00 }, { 0x2032, 0x050f, 0x01 }, + { 0x2039, 0x0511, 0x01 }, { 0x203c, 0x0513, 0x00 }, + { 0x203e, 0x0514, 0x00 }, { 0x207f, 0x0515, 0x00 }, + { 0x20a7, 0x0516, 0x00 }, { 0x20ac, 0x0517, 0x00 }, + { 0x20ae, 0x0518, 0x00 }, { 0x210e, 0x0348, 0x00 }, + { 0x210f, 0x03df, 0x00 }, { 0x2126, 0x0469, 0x00 }, + { 0x2190, 0x0519, 0x05 }, { 0x21a8, 0x051f, 0x00 }, + { 0x21b5, 0x0520, 0x00 }, { 0x21d0, 0x0521, 0x05 }, + { 0x2203, 0x0527, 0x00 }, { 0x2205, 0x0528, 0x00 }, + { 0x2206, 0x0461, 0x00 }, { 0x2208, 0x0529, 0x00 }, + { 0x220a, 0x052a, 0x00 }, { 0x2212, 0x0205, 0x00 }, + { 0x2219, 0x052b, 0x01 }, { 0x221e, 0x052d, 0x01 }, + { 0x2227, 0x052f, 0x03 }, { 0x2248, 0x0533, 0x00 }, + { 0x2260, 0x0534, 0x01 }, { 0x2264, 0x0536, 0x01 }, + { 0x2300, 0x0528, 0x00 }, { 0x2302, 0x0538, 0x00 }, + { 0x2310, 0x0539, 0x00 }, { 0x2320, 0x053a, 0x01 }, + { 0x23ba, 0x053c, 0x02 }, { 0x23bd, 0x02c4, 0x00 }, + { 0x2409, 0x053f, 0x04 }, { 0x2424, 0x0544, 0x00 }, + { 0x2500, 0x024f, 0x00 }, { 0x2501, 0x0545, 0x00 }, + { 0x2502, 0x0251, 0x00 }, { 0x2503, 0x0546, 0x00 }, + { 0x2508, 0x0253, 0x00 }, { 0x2509, 0x0547, 0x00 }, + { 0x250a, 0x0255, 0x00 }, { 0x250b, 0x0548, 0x00 }, + { 0x250c, 0x0259, 0x00 }, { 0x250d, 0x0549, 0x02 }, + { 0x2510, 0x025d, 0x00 }, { 0x2511, 0x054c, 0x02 }, + { 0x2514, 0x0261, 0x00 }, { 0x2515, 0x054f, 0x02 }, + { 0x2518, 0x0265, 0x00 }, { 0x2519, 0x0552, 0x02 }, + { 0x251c, 0x026d, 0x00 }, { 0x251d, 0x0555, 0x06 }, + { 0x2524, 0x0275, 0x00 }, { 0x2525, 0x055c, 0x06 }, + { 0x252c, 0x027d, 0x00 }, { 0x252d, 0x0563, 0x06 }, + { 0x2534, 0x0285, 0x00 }, { 0x2535, 0x056a, 0x06 }, + { 0x253c, 0x0295, 0x00 }, { 0x253d, 0x0571, 0x0e }, + { 0x2550, 0x0580, 0x20 }, { 0x2574, 0x05a1, 0x01 }, + { 0x2576, 0x02bd, 0x01 }, { 0x2578, 0x05a3, 0x07 }, + { 0x25a0, 0x05ab, 0x00 }, { 0x25ac, 0x05ac, 0x00 }, + { 0x25ae, 0x05ad, 0x00 }, { 0x25b2, 0x05ae, 0x00 }, + { 0x25b6, 0x05af, 0x00 }, { 0x25bc, 0x05b0, 0x00 }, + { 0x25c0, 0x05b1, 0x00 }, { 0x25c6, 0x05b2, 0x00 }, + { 0x25ca, 0x05b3, 0x01 }, { 0x25cf, 0x05b5, 0x00 }, + { 0x25d9, 0x05b6, 0x00 }, { 0x263c, 0x05b7, 0x00 }, + { 0x2640, 0x05b8, 0x00 }, { 0x2642, 0x05b9, 0x00 }, + { 0x2660, 0x05ba, 0x00 }, { 0x2663, 0x05bb, 0x00 }, + { 0x2666, 0x05b2, 0x00 }, { 0x266a, 0x05bc, 0x01 }, + { 0x2713, 0x02f8, 0x00 }, { 0x2714, 0x05be, 0x00 }, + { 0x2717, 0x02fa, 0x00 }, { 0x2718, 0x05bf, 0x00 }, + { 0xe0a0, 0x05c0, 0x02 }, { 0xe0b1, 0x05c3, 0x00 }, + { 0xe0b3, 0x05c4, 0x00 }, { 0xf6be, 0x0444, 0x00 }, }; struct vt_font vt_font_default = { @@ -2199,6 +2286,6 @@ struct vt_font vt_font_default = { font_mapping_bold, NULL, }, - .vf_map_count = { 248, 0, 260, 0 }, + .vf_map_count = { 252, 0, 272, 0 }, .vf_refcount = 1, }; From owner-svn-src-stable@FreeBSD.ORG Thu Jun 12 16:41:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87905B4A; Thu, 12 Jun 2014 16:41:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A8092FCB; Thu, 12 Jun 2014 16:41:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5CGfrpm038653; Thu, 12 Jun 2014 16:41:53 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5CGfrKG038652; Thu, 12 Jun 2014 16:41:53 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201406121641.s5CGfrKG038652@svn.freebsd.org> From: Ed Maste Date: Thu, 12 Jun 2014 16:41:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267410 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 16:41:53 -0000 Author: emaste Date: Thu Jun 12 16:41:52 2014 New Revision: 267410 URL: http://svnweb.freebsd.org/changeset/base/267410 Log: MFC r265798, r265815 by wblock: Add a man page for the new vt.4 device. Fix document title. Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Thu Jun 12 16:45:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D0F61E52; Thu, 12 Jun 2014 16:45:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD20D2FFA; Thu, 12 Jun 2014 16:45:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5CGjaoJ039371; Thu, 12 Jun 2014 16:45:36 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5CGjacu039367; Thu, 12 Jun 2014 16:45:36 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201406121645.s5CGjacu039367@svn.freebsd.org> From: Ed Maste Date: Thu, 12 Jun 2014 16:45:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267411 - stable/9/usr.sbin/pmcstat X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 16:45:37 -0000 Author: emaste Date: Thu Jun 12 16:45:35 2014 New Revision: 267411 URL: http://svnweb.freebsd.org/changeset/base/267411 Log: MFC r266209 by gnn: Add a command line argument (-l) to end event collection after some number of seconds. The number of seconds may be a fraction. Relnotes: yes Approved by: re Modified: stable/9/usr.sbin/pmcstat/pmcstat.8 stable/9/usr.sbin/pmcstat/pmcstat.c stable/9/usr.sbin/pmcstat/pmcstat.h Directory Properties: stable/9/usr.sbin/pmcstat/ (props changed) Modified: stable/9/usr.sbin/pmcstat/pmcstat.8 ============================================================================== --- stable/9/usr.sbin/pmcstat/pmcstat.8 Thu Jun 12 16:41:52 2014 (r267410) +++ stable/9/usr.sbin/pmcstat/pmcstat.8 Thu Jun 12 16:45:35 2014 (r267411) @@ -51,6 +51,7 @@ .Op Fl f Ar pluginopt .Op Fl g .Op Fl k Ar kerneldir +.Op Fl l Ar secs .Op Fl m Ar pathname .Op Fl n Ar rate .Op Fl o Ar outputfile @@ -258,6 +259,13 @@ This directory specifies where should look for the kernel and its modules. The default is .Pa /boot/kernel . +.It Fl l Ar secs +Set system-wide performance measurement duration for +.Ar secs +seconds. +The argument +.Ar secs +may be a fractional value. .It Fl m Ar pathname Print the sampled PCs with the name, the start and ending addresses of the function within they live. Modified: stable/9/usr.sbin/pmcstat/pmcstat.c ============================================================================== --- stable/9/usr.sbin/pmcstat/pmcstat.c Thu Jun 12 16:41:52 2014 (r267410) +++ stable/9/usr.sbin/pmcstat/pmcstat.c Thu Jun 12 16:45:35 2014 (r267411) @@ -509,6 +509,7 @@ pmcstat_show_usage(void) "\t -f spec\t pass \"spec\" to as plugin option\n" "\t -g\t\t produce gprof(1) compatible profiles\n" "\t -k dir\t\t set the path to the kernel\n" + "\t -l secs\t set duration time\n" "\t -m file\t print sampled PCs to \"file\"\n" "\t -n rate\t set sampling rate\n" "\t -o file\t send print output to \"file\"\n" @@ -551,6 +552,7 @@ main(int argc, char **argv) { cpuset_t cpumask; double interval; + double duration; int hcpu, option, npmc, ncpu; int c, check_driver_stats, current_cpu, current_sampling_count; int do_callchain, do_descendants, do_logproccsw, do_logprocexit; @@ -601,6 +603,7 @@ main(int argc, char **argv) args.pa_toptty = 0; args.pa_topcolor = 0; args.pa_mergepmc = 0; + args.pa_duration = 0.0; STAILQ_INIT(&args.pa_events); SLIST_INIT(&args.pa_targets); bzero(&ds_start, sizeof(ds_start)); @@ -619,7 +622,7 @@ main(int argc, char **argv) CPU_SET(hcpu, &cpumask); while ((option = getopt(argc, argv, - "CD:EF:G:M:NO:P:R:S:TWc:df:gk:m:n:o:p:qr:s:t:vw:z:")) != -1) + "CD:EF:G:M:NO:P:R:S:TWc:df:gk:l:m:n:o:p:qr:s:t:vw:z:")) != -1) switch (option) { case 'C': /* cumulative values */ use_cumulative_counts = !use_cumulative_counts; @@ -687,6 +690,15 @@ main(int argc, char **argv) args.pa_flags |= FLAG_HAS_KERNELPATH; break; + case 'l': /* time duration in seconds */ + duration = strtod(optarg, &end); + if (*end != '\0' || duration <= 0) + errx(EX_USAGE, "ERROR: Illegal duration time " + "value \"%s\".", optarg); + args.pa_flags |= FLAG_HAS_DURATION; + args.pa_duration = duration; + break; + case 'm': args.pa_flags |= FLAG_DO_ANNOTATE; args.pa_plugin = PMCSTAT_PL_ANNOTATE; @@ -917,6 +929,12 @@ main(int argc, char **argv) errx(EX_USAGE, "ERROR: options -O and -R are mutually exclusive."); + /* disallow -T and -l together */ + if ((args.pa_flags & FLAG_HAS_DURATION) && + (args.pa_flags & FLAG_DO_TOP)) + errx(EX_USAGE, "ERROR: options -T and -l are mutually " + "exclusive."); + /* -m option is allowed with -R only. */ if (args.pa_flags & FLAG_DO_ANNOTATE && args.pa_inputpath == NULL) errx(EX_USAGE, "ERROR: option -m requires an input file"); @@ -1273,6 +1291,20 @@ main(int argc, char **argv) "ERROR: Cannot register kevent for timer"); } + /* + * Setup a duration timer if we have sampling mode PMCs and + * a duration time is set + */ + if ((args.pa_flags & FLAG_HAS_SAMPLING_PMCS) && + (args.pa_flags & FLAG_HAS_DURATION)) { + EV_SET(&kev, 0, EVFILT_TIMER, EV_ADD, 0, + args.pa_duration * 1000, NULL); + + if (kevent(pmcstat_kq, &kev, 1, NULL, 0, NULL) < 0) + err(EX_OSERR, "ERROR: Cannot register kevent for " + "time duration"); + } + /* attach PMCs to the target process, starting it if specified */ if (args.pa_flags & FLAG_HAS_COMMANDLINE) pmcstat_create_process(); @@ -1349,7 +1381,7 @@ main(int argc, char **argv) /* * loop till either the target process (if any) exits, or we - * are killed by a SIGINT. + * are killed by a SIGINT or we reached the time duration. */ runstate = PMCSTAT_RUNNING; do_print = do_read = 0; @@ -1416,7 +1448,13 @@ main(int argc, char **argv) break; - case EVFILT_TIMER: /* print out counting PMCs */ + case EVFILT_TIMER: + /* time duration reached, exit */ + if (args.pa_flags & FLAG_HAS_DURATION) { + runstate = PMCSTAT_FINISHED; + break; + } + /* print out counting PMCs */ if ((args.pa_flags & FLAG_DO_TOP) && pmc_flush_logfile() == 0) do_read = 1; Modified: stable/9/usr.sbin/pmcstat/pmcstat.h ============================================================================== --- stable/9/usr.sbin/pmcstat/pmcstat.h Thu Jun 12 16:41:52 2014 (r267410) +++ stable/9/usr.sbin/pmcstat/pmcstat.h Thu Jun 12 16:45:35 2014 (r267411) @@ -54,6 +54,7 @@ #define FLAG_DO_TOP 0x00010000 /* -T */ #define FLAG_DO_ANALYSIS 0x00020000 /* -g or -G or -m or -T */ #define FLAGS_HAS_CPUMASK 0x00040000 /* -c */ +#define FLAG_HAS_DURATION 0x00080000 /* -l secs */ #define DEFAULT_SAMPLE_COUNT 65536 #define DEFAULT_WAIT_INTERVAL 5.0 @@ -148,6 +149,7 @@ struct pmcstat_args { int pa_toptty; /* output to tty or file */ int pa_topcolor; /* terminal support color */ int pa_mergepmc; /* merge PMC with same name */ + double pa_duration; /* time duration */ int pa_argc; char **pa_argv; STAILQ_HEAD(, pmcstat_ev) pa_events; From owner-svn-src-stable@FreeBSD.ORG Thu Jun 12 16:51:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C6FC52DD; Thu, 12 Jun 2014 16:51:53 +0000 (UTC) Received: from mail-qa0-x22d.google.com (mail-qa0-x22d.google.com [IPv6:2607:f8b0:400d:c00::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 56E5120D5; Thu, 12 Jun 2014 16:51:53 +0000 (UTC) Received: by mail-qa0-f45.google.com with SMTP id v10so1992871qac.4 for ; Thu, 12 Jun 2014 09:51:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=0Pb7xqEBdxfGqjVNkY0eX4dh9AEgDD6gpVLn5m11a0o=; b=WfIZ3rQgagCG+dsPK7/j+4jWlVGdM1wAERJs90DR8RE2l16Q6lQfa4tmRGUzvuFeol g7D+HuDvVcTcRIXOgAPAmkjfQQ6U0MCpAtPdeRWuw0YczTNp2UdYUH6PZpKcLX0Dktd0 e8L2pAbtm+wueXdfwxAy6P+WlNKQPzEJLSTgdOMScwMIL8KuYe8w+AIANjJ0jAJM4/Qi aW/7m7LtzRbt309dzkICUsZ1f7bfslaiVD7g6re46CA2paQzyj/s5DQY0H6434drn3mE gCNgpYTA0Pw7ErkTJEXi6u5c64Hs5/d9VmerbRoRwLH7FQB6z+tSyLXMDv5oA4abQTOK lXlw== MIME-Version: 1.0 X-Received: by 10.224.47.148 with SMTP id n20mr63133744qaf.90.1402591912452; Thu, 12 Jun 2014 09:51:52 -0700 (PDT) Sender: carpeddiem@gmail.com Received: by 10.140.49.239 with HTTP; Thu, 12 Jun 2014 09:51:52 -0700 (PDT) In-Reply-To: <201406121641.s5CGfrKG038652@svn.freebsd.org> References: <201406121641.s5CGfrKG038652@svn.freebsd.org> Date: Thu, 12 Jun 2014 12:51:52 -0400 X-Google-Sender-Auth: Ca8OCrGXGznOW7x40byVbBdt1e4 Message-ID: Subject: Re: svn commit: r267410 - stable/10 From: Ed Maste To: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 16:51:53 -0000 On 12 June 2014 12:41, Ed Maste wrote: > Author: emaste > Date: Thu Jun 12 16:41:52 2014 > New Revision: 267410 > URL: http://svnweb.freebsd.org/changeset/base/267410 > > Log: > MFC r265798, r265815 by wblock: Oops - vt.4 is already in stable/10 (and stable/9), and I had a typo in the revision. Sorry for adding bogus mergeinfo here. -Ed From owner-svn-src-stable@FreeBSD.ORG Thu Jun 12 16:52:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C7B242C; Thu, 12 Jun 2014 16:52:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4892F20EF; Thu, 12 Jun 2014 16:52:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5CGqbxH043523; Thu, 12 Jun 2014 16:52:37 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5CGqb2u043522; Thu, 12 Jun 2014 16:52:37 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406121652.s5CGqb2u043522@svn.freebsd.org> From: Glen Barber Date: Thu, 12 Jun 2014 16:52:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267412 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 16:52:37 -0000 Author: gjb Date: Thu Jun 12 16:52:36 2014 New Revision: 267412 URL: http://svnweb.freebsd.org/changeset/base/267412 Log: Document r267411, pmcstat(8) '-l' flag. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 12 16:45:35 2014 (r267411) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 12 16:52:36 2014 (r267412) @@ -669,6 +669,11 @@ The &man.arc4random.3; library has been updated to match that of &os;-CURRENT. + The &man.pmcstat.8; utility has been + updated to include a new flag, -l, which + adds event collection after the specified number of + seconds. + &man.periodic.8; Scripts From owner-svn-src-stable@FreeBSD.ORG Thu Jun 12 16:55:04 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C55965BA; Thu, 12 Jun 2014 16:55:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1BC92104; Thu, 12 Jun 2014 16:55:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5CGt4Gj043952; Thu, 12 Jun 2014 16:55:04 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5CGt4YV043951; Thu, 12 Jun 2014 16:55:04 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406121655.s5CGt4YV043951@svn.freebsd.org> From: Glen Barber Date: Thu, 12 Jun 2014 16:55:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267413 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 16:55:04 -0000 Author: gjb Date: Thu Jun 12 16:55:04 2014 New Revision: 267413 URL: http://svnweb.freebsd.org/changeset/base/267413 Log: Document r266890, pmcstat(8) '-l' flag. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 12 16:52:36 2014 (r267412) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 12 16:55:04 2014 (r267413) @@ -240,6 +240,11 @@ to filter by &man.jail.8; ID or name, in followup to the &man.ps.1; change in r265229. + The &man.pmcstat.8; utility has been + updated to include a new flag, -l, which + adds event collection after the specified number of + seconds. + The default &man.newsyslog.conf.5; now includes files in the /etc/newsyslog.conf.d/ and From owner-svn-src-stable@FreeBSD.ORG Thu Jun 12 17:06:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8C94B9AA; Thu, 12 Jun 2014 17:06:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F6532255; Thu, 12 Jun 2014 17:06:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5CH6osQ048998; Thu, 12 Jun 2014 17:06:50 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5CH6oHr048997; Thu, 12 Jun 2014 17:06:50 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201406121706.s5CH6oHr048997@svn.freebsd.org> From: Ed Maste Date: Thu, 12 Jun 2014 17:06:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267414 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 17:06:51 -0000 Author: emaste Date: Thu Jun 12 17:06:50 2014 New Revision: 267414 URL: http://svnweb.freebsd.org/changeset/base/267414 Log: Undo incorrect mergeinfo from r267410 Suggested by: gjb Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Thu Jun 12 17:08:04 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 97A35B0D; Thu, 12 Jun 2014 17:08:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84054227E; Thu, 12 Jun 2014 17:08:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5CH84p3049262; Thu, 12 Jun 2014 17:08:04 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5CH84Ef049261; Thu, 12 Jun 2014 17:08:04 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201406121708.s5CH84Ef049261@svn.freebsd.org> From: Ed Maste Date: Thu, 12 Jun 2014 17:08:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267415 - stable/9/usr.sbin/pmcstat X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 17:08:04 -0000 Author: emaste Date: Thu Jun 12 17:08:04 2014 New Revision: 267415 URL: http://svnweb.freebsd.org/changeset/base/267415 Log: MFC r266208: Speed up pmcstat by improving string hash In one case generating callgraph output from a 24MB system-wide sampling data file took 17.4 seconds on average. Profiling showed pmcstat spending a lot of time in strcmp, due to hash collisions. Replacing the XOR-only hash with FNV-1a reduces the run time for my test by 40%. Approved by: re Modified: stable/9/usr.sbin/pmcstat/pmcstat_log.c Directory Properties: stable/9/usr.sbin/pmcstat/ (props changed) Modified: stable/9/usr.sbin/pmcstat/pmcstat_log.c ============================================================================== --- stable/9/usr.sbin/pmcstat/pmcstat_log.c Thu Jun 12 17:06:50 2014 (r267414) +++ stable/9/usr.sbin/pmcstat/pmcstat_log.c Thu Jun 12 17:08:04 2014 (r267415) @@ -301,10 +301,10 @@ pmcstat_stats_reset(int reset_global) static int pmcstat_string_compute_hash(const char *s) { - int hash; + unsigned hash; - for (hash = 0; *s; s++) - hash ^= *s; + for (hash = 2166136261; *s; s++) + hash = (hash ^ *s) * 16777619; return (hash & PMCSTAT_HASH_MASK); } From owner-svn-src-stable@FreeBSD.ORG Thu Jun 12 17:12:59 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 709AFE5E; Thu, 12 Jun 2014 17:12:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CFD42345; Thu, 12 Jun 2014 17:12:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5CHCxen053354; Thu, 12 Jun 2014 17:12:59 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5CHCxuF053353; Thu, 12 Jun 2014 17:12:59 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201406121712.s5CHCxuF053353@svn.freebsd.org> From: Ed Maste Date: Thu, 12 Jun 2014 17:12:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267416 - stable/9/usr.sbin/pmcstat X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 17:12:59 -0000 Author: emaste Date: Thu Jun 12 17:12:58 2014 New Revision: 267416 URL: http://svnweb.freebsd.org/changeset/base/267416 Log: MFC r266403: Update the date on the manual page. Approved by: re Modified: stable/9/usr.sbin/pmcstat/pmcstat.8 Directory Properties: stable/9/usr.sbin/pmcstat/ (props changed) Modified: stable/9/usr.sbin/pmcstat/pmcstat.8 ============================================================================== --- stable/9/usr.sbin/pmcstat/pmcstat.8 Thu Jun 12 17:08:04 2014 (r267415) +++ stable/9/usr.sbin/pmcstat/pmcstat.8 Thu Jun 12 17:12:58 2014 (r267416) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 19, 2008 +.Dd May 16, 2014 .Dt PMCSTAT 8 .Os .Sh NAME From owner-svn-src-stable@FreeBSD.ORG Thu Jun 12 17:13:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 47323FA1; Thu, 12 Jun 2014 17:13:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34335234C; Thu, 12 Jun 2014 17:13:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5CHDaXw053524; Thu, 12 Jun 2014 17:13:36 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5CHDaEi053523; Thu, 12 Jun 2014 17:13:36 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406121713.s5CHDaEi053523@svn.freebsd.org> From: Glen Barber Date: Thu, 12 Jun 2014 17:13:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267417 - stable/10/release X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 17:13:36 -0000 Author: gjb Date: Thu Jun 12 17:13:35 2014 New Revision: 267417 URL: http://svnweb.freebsd.org/changeset/base/267417 Log: MFC r267326, r267327: r267326: Add empty pkg-stage file to CLEANFILES if WITH_DVD=1. r267327: Fix indentation level. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/release/Makefile ============================================================================== --- stable/10/release/Makefile Thu Jun 12 17:12:58 2014 (r267416) +++ stable/10/release/Makefile Thu Jun 12 17:13:35 2014 (r267417) @@ -100,6 +100,9 @@ CLEANFILES= packagesystem *.txz MANIFEST CLEANFILES+= ${I}.xz . endfor .endif +.if defined(WITH_DVD) && !empty(WITH_DVD) +CLEANFILES+= pkg-stage +.endif CLEANDIRS= dist ftp release bootonly dvd beforeclean: chflags -R noschg . From owner-svn-src-stable@FreeBSD.ORG Thu Jun 12 17:15:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A6E31A9; Thu, 12 Jun 2014 17:15:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C5042365; Thu, 12 Jun 2014 17:15:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5CHFv2m053983; Thu, 12 Jun 2014 17:15:57 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5CHFuno053980; Thu, 12 Jun 2014 17:15:56 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406121715.s5CHFuno053980@svn.freebsd.org> From: John Baldwin Date: Thu, 12 Jun 2014 17:15:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267418 - in stable/10/sys: amd64/amd64 x86/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 17:15:57 -0000 Author: jhb Date: Thu Jun 12 17:15:56 2014 New Revision: 267418 URL: http://svnweb.freebsd.org/changeset/base/267418 Log: MFC 266263,266551,266552: - Add definitions for more structured extended features as well as XSAVE Extended Features for AVX512 and MPX (Memory Protection Extensions). - Don't permit users to request a subset of the AVX512 or MPX xsave masks. Modified: stable/10/sys/amd64/amd64/fpu.c stable/10/sys/amd64/amd64/identcpu.c stable/10/sys/x86/include/specialreg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/fpu.c ============================================================================== --- stable/10/sys/amd64/amd64/fpu.c Thu Jun 12 17:13:35 2014 (r267417) +++ stable/10/sys/amd64/amd64/fpu.c Thu Jun 12 17:15:56 2014 (r267418) @@ -199,6 +199,10 @@ fpuinit_bsp1(void) TUNABLE_ULONG_FETCH("hw.xsave_mask", &xsave_mask_user); xsave_mask_user |= XFEATURE_ENABLED_X87 | XFEATURE_ENABLED_SSE; xsave_mask &= xsave_mask_user; + if ((xsave_mask & XFEATURE_AVX512) != XFEATURE_AVX512) + xsave_mask &= ~XFEATURE_AVX512; + if ((xsave_mask & XFEATURE_MPX) != XFEATURE_MPX) + xsave_mask &= ~XFEATURE_MPX; cpuid_count(0xd, 0x1, cp); if ((cp[0] & CPUID_EXTSTATE_XSAVEOPT) != 0) { Modified: stable/10/sys/amd64/amd64/identcpu.c ============================================================================== --- stable/10/sys/amd64/amd64/identcpu.c Thu Jun 12 17:13:35 2014 (r267417) +++ stable/10/sys/amd64/amd64/identcpu.c Thu Jun 12 17:15:56 2014 (r267418) @@ -385,11 +385,11 @@ printcpuinfo(void) } if (cpu_stdext_feature != 0) { - printf("\n Standard Extended Features=0x%b", + printf("\n Structured Extended Features=0x%b", cpu_stdext_feature, "\020" /* RDFSBASE/RDGSBASE/WRFSBASE/WRGSBASE */ - "\001GSFSBASE" + "\001FSGSBASE" "\002TSCADJ" /* Bit Manipulation Instructions */ "\004BMI1" @@ -401,17 +401,27 @@ printcpuinfo(void) "\010SMEP" /* Bit Manipulation Instructions */ "\011BMI2" - "\012ENHMOVSB" + "\012ERMS" /* Invalidate Processor Context ID */ "\013INVPCID" /* Restricted Transactional Memory */ "\014RTM" + /* Intel Memory Protection Extensions */ + "\017MPX" + /* AVX512 Foundation */ + "\021AVX512F" /* Enhanced NRBG */ "\023RDSEED" /* ADCX + ADOX */ "\024ADX" /* Supervisor Mode Access Prevention */ "\025SMAP" + "\030CLFLUSHOPT" + "\032PROCTRACE" + "\033AVX512PF" + "\034AVX512ER" + "\035AVX512CD" + "\036SHA" ); } Modified: stable/10/sys/x86/include/specialreg.h ============================================================================== --- stable/10/sys/x86/include/specialreg.h Thu Jun 12 17:13:35 2014 (r267417) +++ stable/10/sys/x86/include/specialreg.h Thu Jun 12 17:15:56 2014 (r267418) @@ -87,12 +87,23 @@ */ #define XCR0 0 /* XFEATURE_ENABLED_MASK register */ -#define XFEATURE_ENABLED_X87 0x00000001 -#define XFEATURE_ENABLED_SSE 0x00000002 -#define XFEATURE_ENABLED_AVX 0x00000004 +#define XFEATURE_ENABLED_X87 0x00000001 +#define XFEATURE_ENABLED_SSE 0x00000002 +#define XFEATURE_ENABLED_YMM_HI128 0x00000004 +#define XFEATURE_ENABLED_AVX XFEATURE_ENABLED_YMM_HI128 +#define XFEATURE_ENABLED_BNDREGS 0x00000008 +#define XFEATURE_ENABLED_BNDCSR 0x00000010 +#define XFEATURE_ENABLED_OPMASK 0x00000020 +#define XFEATURE_ENABLED_ZMM_HI256 0x00000040 +#define XFEATURE_ENABLED_HI16_ZMM 0x00000080 #define XFEATURE_AVX \ (XFEATURE_ENABLED_X87 | XFEATURE_ENABLED_SSE | XFEATURE_ENABLED_AVX) +#define XFEATURE_AVX512 \ + (XFEATURE_ENABLED_OPMASK | XFEATURE_ENABLED_ZMM_HI256 | \ + XFEATURE_ENABLED_HI16_ZMM) +#define XFEATURE_MPX \ + (XFEATURE_ENABLED_BNDREGS | XFEATURE_ENABLED_BNDCSR) /* * CPUID instruction features register @@ -308,7 +319,7 @@ #define AMDID_COREID_SIZE_SHIFT 12 /* - * Structured Extended Features + * CPUID instruction 7 Structured Extended Features, leaf 0 ebx info */ #define CPUID_STDEXT_FSGSBASE 0x00000001 #define CPUID_STDEXT_TSC_ADJUST 0x00000002 @@ -317,12 +328,20 @@ #define CPUID_STDEXT_AVX2 0x00000020 #define CPUID_STDEXT_SMEP 0x00000080 #define CPUID_STDEXT_BMI2 0x00000100 -#define CPUID_STDEXT_ENH_MOVSB 0x00000200 -#define CPUID_STDEXT_RTM 0x00000800 +#define CPUID_STDEXT_ERMS 0x00000200 #define CPUID_STDEXT_INVPCID 0x00000400 +#define CPUID_STDEXT_RTM 0x00000800 +#define CPUID_STDEXT_MPX 0x00004000 +#define CPUID_STDEXT_AVX512F 0x00010000 #define CPUID_STDEXT_RDSEED 0x00040000 #define CPUID_STDEXT_ADX 0x00080000 #define CPUID_STDEXT_SMAP 0x00100000 +#define CPUID_STDEXT_CLFLUSHOPT 0x00800000 +#define CPUID_STDEXT_PROCTRACE 0x02000000 +#define CPUID_STDEXT_AVX512PF 0x04000000 +#define CPUID_STDEXT_AVX512ER 0x08000000 +#define CPUID_STDEXT_AVX512CD 0x10000000 +#define CPUID_STDEXT_SHA 0x20000000 /* * CPUID manufacturers identifiers From owner-svn-src-stable@FreeBSD.ORG Thu Jun 12 17:16:29 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9543A2DE; Thu, 12 Jun 2014 17:16:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81EBC2371; Thu, 12 Jun 2014 17:16:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5CHGT4F054127; Thu, 12 Jun 2014 17:16:29 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5CHGTmk054126; Thu, 12 Jun 2014 17:16:29 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406121716.s5CHGTmk054126@svn.freebsd.org> From: Glen Barber Date: Thu, 12 Jun 2014 17:16:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267419 - stable/9/release X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 17:16:29 -0000 Author: gjb Date: Thu Jun 12 17:16:29 2014 New Revision: 267419 URL: http://svnweb.freebsd.org/changeset/base/267419 Log: MFC r267326, r267327: r267326: Add empty pkg-stage file to CLEANFILES if WITH_DVD=1. r267327: Fix indentation level. Approved by: re (marius) Sponsored by: The FreeBSD Foundation Modified: stable/9/release/Makefile Directory Properties: stable/9/release/ (props changed) Modified: stable/9/release/Makefile ============================================================================== --- stable/9/release/Makefile Thu Jun 12 17:15:56 2014 (r267418) +++ stable/9/release/Makefile Thu Jun 12 17:16:29 2014 (r267419) @@ -100,6 +100,9 @@ CLEANFILES= packagesystem *.txz MANIFEST CLEANFILES+= ${I}.xz . endfor .endif +.if defined(WITH_DVD) && !empty(WITH_DVD) +CLEANFILES+= pkg-stage +.endif CLEANDIRS= dist ftp release bootonly dvd beforeclean: chflags -R noschg . From owner-svn-src-stable@FreeBSD.ORG Thu Jun 12 17:21:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B61167D; Thu, 12 Jun 2014 17:21:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 17A1123FC; Thu, 12 Jun 2014 17:21:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5CHLBo1058007; Thu, 12 Jun 2014 17:21:11 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5CHLBa6058006; Thu, 12 Jun 2014 17:21:11 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406121721.s5CHLBa6058006@svn.freebsd.org> From: Glen Barber Date: Thu, 12 Jun 2014 17:21:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267421 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 17:21:12 -0000 Author: gjb Date: Thu Jun 12 17:21:11 2014 New Revision: 267421 URL: http://svnweb.freebsd.org/changeset/base/267421 Log: Fix a typo in note for r266890, pmcstat(8) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 12 17:19:57 2014 (r267420) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 12 17:21:11 2014 (r267421) @@ -242,7 +242,7 @@ The &man.pmcstat.8; utility has been updated to include a new flag, -l, which - adds event collection after the specified number of + ends event collection after the specified number of seconds. The default &man.newsyslog.conf.5; now From owner-svn-src-stable@FreeBSD.ORG Thu Jun 12 17:22:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B5C17BA; Thu, 12 Jun 2014 17:22:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 361722410; Thu, 12 Jun 2014 17:22:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5CHM5bB058215; Thu, 12 Jun 2014 17:22:05 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5CHM54E058214; Thu, 12 Jun 2014 17:22:05 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406121722.s5CHM54E058214@svn.freebsd.org> From: Glen Barber Date: Thu, 12 Jun 2014 17:22:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267422 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 17:22:05 -0000 Author: gjb Date: Thu Jun 12 17:22:04 2014 New Revision: 267422 URL: http://svnweb.freebsd.org/changeset/base/267422 Log: Fix a type on note for r267411, pmcstat(8) Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 12 17:21:11 2014 (r267421) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 12 17:22:04 2014 (r267422) @@ -671,7 +671,7 @@ The &man.pmcstat.8; utility has been updated to include a new flag, -l, which - adds event collection after the specified number of + ends event collection after the specified number of seconds. From owner-svn-src-stable@FreeBSD.ORG Thu Jun 12 19:58:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5FF49572; Thu, 12 Jun 2014 19:58:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A42D22C2; Thu, 12 Jun 2014 19:58:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5CJwFeO028394; Thu, 12 Jun 2014 19:58:15 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5CJwCQE028376; Thu, 12 Jun 2014 19:58:12 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406121958.s5CJwCQE028376@svn.freebsd.org> From: John Baldwin Date: Thu, 12 Jun 2014 19:58:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267427 - in stable/10: lib/libvmmapi sys/amd64/include sys/amd64/vmm sys/amd64/vmm/amd sys/amd64/vmm/intel usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 19:58:15 -0000 Author: jhb Date: Thu Jun 12 19:58:12 2014 New Revision: 267427 URL: http://svnweb.freebsd.org/changeset/base/267427 Log: MFC 261638,262144,262506,266765: Add virtualized XSAVE support to bhyve which permits guests to use XSAVE and XSAVE-enabled features like AVX. - Store a per-cpu guest xcr0 register and handle xsetbv VM exits by emulating the instruction. - Only expose XSAVE to guests if XSAVE is enabled in the host. Only expose a subset of XSAVE features currently supported by the guest and for which the proper emulation of xsetbv is known. Currently this includes X87, SSE, AVX, AVX-512, and Intel MPX. - Add support for injecting hardware exceptions into the guest and use this to trigger exceptions in the guest for invalid xsetbv operations instead of potentially faulting in the host. - Queue pending exceptions in the 'struct vcpu' instead of directly updating the processor-specific VMCS or VMCB. The pending exception will be delivered right before entering the guest. - Rename the unused ioctl VM_INJECT_EVENT to VM_INJECT_EXCEPTION and restrict it to only deliver x86 hardware exceptions. This new ioctl is now used to inject a protection fault when the guest accesses an unimplemented MSR. - Expose a subset of known-safe features from leaf 0 of the structured extended features to guests if they are supported on the host including RDFSBASE/RDGSBASE, BMI1/2, AVX2, AVX-512, HLE, ERMS, and RTM. Aside from AVX-512, these features are all new instructions available for use in ring 3 with no additional hypervisor changes needed. Modified: stable/10/lib/libvmmapi/vmmapi.c stable/10/lib/libvmmapi/vmmapi.h stable/10/sys/amd64/include/vmm.h stable/10/sys/amd64/include/vmm_dev.h stable/10/sys/amd64/vmm/amd/amdv.c stable/10/sys/amd64/vmm/intel/vmcs.h stable/10/sys/amd64/vmm/intel/vmx.c stable/10/sys/amd64/vmm/vmm.c stable/10/sys/amd64/vmm/vmm_dev.c stable/10/sys/amd64/vmm/vmm_host.c stable/10/sys/amd64/vmm/vmm_host.h stable/10/sys/amd64/vmm/x86.c stable/10/usr.sbin/bhyve/bhyverun.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libvmmapi/vmmapi.c ============================================================================== --- stable/10/lib/libvmmapi/vmmapi.c Thu Jun 12 19:01:57 2014 (r267426) +++ stable/10/lib/libvmmapi/vmmapi.c Thu Jun 12 19:58:12 2014 (r267427) @@ -343,35 +343,32 @@ vm_run(struct vmctx *ctx, int vcpu, uint } static int -vm_inject_event_real(struct vmctx *ctx, int vcpu, enum vm_event_type type, - int vector, int error_code, int error_code_valid) +vm_inject_exception_real(struct vmctx *ctx, int vcpu, int vector, + int error_code, int error_code_valid) { - struct vm_event ev; + struct vm_exception exc; - bzero(&ev, sizeof(ev)); - ev.cpuid = vcpu; - ev.type = type; - ev.vector = vector; - ev.error_code = error_code; - ev.error_code_valid = error_code_valid; + bzero(&exc, sizeof(exc)); + exc.cpuid = vcpu; + exc.vector = vector; + exc.error_code = error_code; + exc.error_code_valid = error_code_valid; - return (ioctl(ctx->fd, VM_INJECT_EVENT, &ev)); + return (ioctl(ctx->fd, VM_INJECT_EXCEPTION, &exc)); } int -vm_inject_event(struct vmctx *ctx, int vcpu, enum vm_event_type type, - int vector) +vm_inject_exception(struct vmctx *ctx, int vcpu, int vector) { - return (vm_inject_event_real(ctx, vcpu, type, vector, 0, 0)); + return (vm_inject_exception_real(ctx, vcpu, vector, 0, 0)); } int -vm_inject_event2(struct vmctx *ctx, int vcpu, enum vm_event_type type, - int vector, int error_code) +vm_inject_exception2(struct vmctx *ctx, int vcpu, int vector, int errcode) { - return (vm_inject_event_real(ctx, vcpu, type, vector, error_code, 1)); + return (vm_inject_exception_real(ctx, vcpu, vector, errcode, 1)); } int Modified: stable/10/lib/libvmmapi/vmmapi.h ============================================================================== --- stable/10/lib/libvmmapi/vmmapi.h Thu Jun 12 19:01:57 2014 (r267426) +++ stable/10/lib/libvmmapi/vmmapi.h Thu Jun 12 19:58:12 2014 (r267427) @@ -62,10 +62,8 @@ int vm_get_register(struct vmctx *ctx, i int vm_run(struct vmctx *ctx, int vcpu, uint64_t rip, struct vm_exit *ret_vmexit); int vm_apicid2vcpu(struct vmctx *ctx, int apicid); -int vm_inject_event(struct vmctx *ctx, int vcpu, enum vm_event_type type, - int vector); -int vm_inject_event2(struct vmctx *ctx, int vcpu, enum vm_event_type type, - int vector, int error_code); +int vm_inject_exception(struct vmctx *ctx, int vcpu, int vec); +int vm_inject_exception2(struct vmctx *ctx, int vcpu, int vec, int errcode); int vm_lapic_irq(struct vmctx *ctx, int vcpu, int vector); int vm_lapic_local_irq(struct vmctx *ctx, int vcpu, int vector); int vm_lapic_msi(struct vmctx *ctx, uint64_t addr, uint64_t msg); Modified: stable/10/sys/amd64/include/vmm.h ============================================================================== --- stable/10/sys/amd64/include/vmm.h Thu Jun 12 19:01:57 2014 (r267426) +++ stable/10/sys/amd64/include/vmm.h Thu Jun 12 19:58:12 2014 (r267427) @@ -34,6 +34,7 @@ #define VM_MAX_NAMELEN 32 struct vm; +struct vm_exception; struct vm_memory_segment; struct seg_desc; struct vm_exit; @@ -62,9 +63,6 @@ typedef int (*vmi_get_desc_t)(void *vmi, struct seg_desc *desc); typedef int (*vmi_set_desc_t)(void *vmi, int vcpu, int num, struct seg_desc *desc); -typedef int (*vmi_inject_event_t)(void *vmi, int vcpu, - int type, int vector, - uint32_t code, int code_valid); typedef int (*vmi_get_cap_t)(void *vmi, int vcpu, int num, int *retval); typedef int (*vmi_set_cap_t)(void *vmi, int vcpu, int num, int val); typedef struct vmspace * (*vmi_vmspace_alloc)(vm_offset_t min, vm_offset_t max); @@ -84,7 +82,6 @@ struct vmm_ops { vmi_set_register_t vmsetreg; vmi_get_desc_t vmgetdesc; vmi_set_desc_t vmsetdesc; - vmi_inject_event_t vminject; vmi_get_cap_t vmgetcap; vmi_set_cap_t vmsetcap; vmi_vmspace_alloc vmspace_alloc; @@ -117,8 +114,6 @@ int vm_get_seg_desc(struct vm *vm, int v int vm_set_seg_desc(struct vm *vm, int vcpu, int reg, struct seg_desc *desc); int vm_run(struct vm *vm, struct vm_run *vmrun); -int vm_inject_event(struct vm *vm, int vcpu, int type, - int vector, uint32_t error_code, int error_code_valid); int vm_inject_nmi(struct vm *vm, int vcpu); int vm_nmi_pending(struct vm *vm, int vcpuid); void vm_nmi_clear(struct vm *vm, int vcpuid); @@ -192,6 +187,33 @@ void vcpu_notify_event(struct vm *vm, in struct vmspace *vm_get_vmspace(struct vm *vm); int vm_assign_pptdev(struct vm *vm, int bus, int slot, int func); int vm_unassign_pptdev(struct vm *vm, int bus, int slot, int func); + +/* + * Inject exception 'vme' into the guest vcpu. This function returns 0 on + * success and non-zero on failure. + * + * Wrapper functions like 'vm_inject_gp()' should be preferred to calling + * this function directly because they enforce the trap-like or fault-like + * behavior of an exception. + * + * This function should only be called in the context of the thread that is + * executing this vcpu. + */ +int vm_inject_exception(struct vm *vm, int vcpuid, struct vm_exception *vme); + +/* + * Returns 0 if there is no exception pending for this vcpu. Returns 1 if an + * exception is pending and also updates 'vme'. The pending exception is + * cleared when this function returns. + * + * This function should only be called in the context of the thread that is + * executing this vcpu. + */ +int vm_exception_pending(struct vm *vm, int vcpuid, struct vm_exception *vme); + +void vm_inject_gp(struct vm *vm, int vcpuid); /* general protection fault */ +void vm_inject_ud(struct vm *vm, int vcpuid); /* undefined instruction fault */ + #endif /* KERNEL */ #include @@ -199,20 +221,6 @@ int vm_unassign_pptdev(struct vm *vm, in #define VM_MAXCPU 16 /* maximum virtual cpus */ /* - * Identifiers for events that can be injected into the VM - */ -enum vm_event_type { - VM_EVENT_NONE, - VM_HW_INTR, - VM_NMI, - VM_HW_EXCEPTION, - VM_SW_INTR, - VM_PRIV_SW_EXCEPTION, - VM_SW_EXCEPTION, - VM_EVENT_MAX -}; - -/* * Identifiers for architecturally defined registers. */ enum vm_reg_name { Modified: stable/10/sys/amd64/include/vmm_dev.h ============================================================================== --- stable/10/sys/amd64/include/vmm_dev.h Thu Jun 12 19:01:57 2014 (r267426) +++ stable/10/sys/amd64/include/vmm_dev.h Thu Jun 12 19:58:12 2014 (r267427) @@ -58,9 +58,8 @@ struct vm_run { struct vm_exit vm_exit; }; -struct vm_event { +struct vm_exception { int cpuid; - enum vm_event_type type; int vector; uint32_t error_code; int error_code_valid; @@ -174,7 +173,7 @@ enum { IOCNUM_GET_SEGMENT_DESCRIPTOR = 23, /* interrupt injection */ - IOCNUM_INJECT_EVENT = 30, + IOCNUM_INJECT_EXCEPTION = 30, IOCNUM_LAPIC_IRQ = 31, IOCNUM_INJECT_NMI = 32, IOCNUM_IOAPIC_ASSERT_IRQ = 33, @@ -215,8 +214,8 @@ enum { _IOW('v', IOCNUM_SET_SEGMENT_DESCRIPTOR, struct vm_seg_desc) #define VM_GET_SEGMENT_DESCRIPTOR \ _IOWR('v', IOCNUM_GET_SEGMENT_DESCRIPTOR, struct vm_seg_desc) -#define VM_INJECT_EVENT \ - _IOW('v', IOCNUM_INJECT_EVENT, struct vm_event) +#define VM_INJECT_EXCEPTION \ + _IOW('v', IOCNUM_INJECT_EXCEPTION, struct vm_exception) #define VM_LAPIC_IRQ \ _IOW('v', IOCNUM_LAPIC_IRQ, struct vm_lapic_irq) #define VM_LAPIC_LOCAL_IRQ \ Modified: stable/10/sys/amd64/vmm/amd/amdv.c ============================================================================== --- stable/10/sys/amd64/vmm/amd/amdv.c Thu Jun 12 19:01:57 2014 (r267426) +++ stable/10/sys/amd64/vmm/amd/amdv.c Thu Jun 12 19:58:12 2014 (r267427) @@ -115,15 +115,6 @@ amdv_setdesc(void *vmi, int vcpu, int nu } static int -amdv_inject_event(void *vmi, int vcpu, int type, int vector, - uint32_t error_code, int error_code_valid) -{ - - printf("amdv_inject_event: not implemented\n"); - return (EINVAL); -} - -static int amdv_getcap(void *arg, int vcpu, int type, int *retval) { @@ -180,7 +171,6 @@ struct vmm_ops vmm_ops_amd = { amdv_setreg, amdv_getdesc, amdv_setdesc, - amdv_inject_event, amdv_getcap, amdv_setcap, amdv_vmspace_alloc, Modified: stable/10/sys/amd64/vmm/intel/vmcs.h ============================================================================== --- stable/10/sys/amd64/vmm/intel/vmcs.h Thu Jun 12 19:01:57 2014 (r267426) +++ stable/10/sys/amd64/vmm/intel/vmcs.h Thu Jun 12 19:58:12 2014 (r267427) @@ -345,6 +345,8 @@ vmcs_write(uint32_t encoding, uint64_t v #define VMCS_INTR_T_MASK 0x700 /* Interruption-info type */ #define VMCS_INTR_T_HWINTR (0 << 8) #define VMCS_INTR_T_NMI (2 << 8) +#define VMCS_INTR_T_HWEXCEPTION (3 << 8) +#define VMCS_INTR_DEL_ERRCODE (1 << 11) /* * VMCS IDT-Vectoring information fields Modified: stable/10/sys/amd64/vmm/intel/vmx.c ============================================================================== --- stable/10/sys/amd64/vmm/intel/vmx.c Thu Jun 12 19:01:57 2014 (r267426) +++ stable/10/sys/amd64/vmm/intel/vmx.c Thu Jun 12 19:58:12 2014 (r267427) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include "vmm_host.h" #include "vmm_ipi.h" #include "vmm_msr.h" @@ -1090,10 +1091,27 @@ vmx_inject_nmi(struct vmx *vmx, int vcpu static void vmx_inject_interrupts(struct vmx *vmx, int vcpu, struct vlapic *vlapic) { + struct vm_exception exc; int vector, need_nmi_exiting; uint64_t rflags; uint32_t gi, info; + if (vm_exception_pending(vmx->vm, vcpu, &exc)) { + KASSERT(exc.vector >= 0 && exc.vector < 32, + ("%s: invalid exception vector %d", __func__, exc.vector)); + + info = vmcs_read(VMCS_ENTRY_INTR_INFO); + KASSERT((info & VMCS_INTR_VALID) == 0, ("%s: cannot inject " + "pending exception %d: %#x", __func__, exc.vector, info)); + + info = exc.vector | VMCS_INTR_T_HWEXCEPTION | VMCS_INTR_VALID; + if (exc.error_code_valid) { + info |= VMCS_INTR_DEL_ERRCODE; + vmcs_write(VMCS_ENTRY_EXCEPTION_ERROR, exc.error_code); + } + vmcs_write(VMCS_ENTRY_INTR_INFO, info); + } + if (vm_nmi_pending(vmx->vm, vcpu)) { /* * If there are no conditions blocking NMI injection then @@ -1169,6 +1187,7 @@ vmx_inject_interrupts(struct vmx *vmx, i * This is expected and could happen for multiple reasons: * - A vectoring VM-entry was aborted due to astpending * - A VM-exit happened during event injection. + * - An exception was injected above. * - An NMI was injected above or after "NMI window exiting" */ VCPU_CTR2(vmx->vm, vcpu, "Cannot inject vector %d due to " @@ -1228,6 +1247,82 @@ vmx_clear_nmi_blocking(struct vmx *vmx, } static int +vmx_emulate_xsetbv(struct vmx *vmx, int vcpu, struct vm_exit *vmexit) +{ + struct vmxctx *vmxctx; + uint64_t xcrval; + const struct xsave_limits *limits; + + vmxctx = &vmx->ctx[vcpu]; + limits = vmm_get_xsave_limits(); + + /* + * Note that the processor raises a GP# fault on its own if + * xsetbv is executed for CPL != 0, so we do not have to + * emulate that fault here. + */ + + /* Only xcr0 is supported. */ + if (vmxctx->guest_rcx != 0) { + vm_inject_gp(vmx->vm, vcpu); + return (HANDLED); + } + + /* We only handle xcr0 if both the host and guest have XSAVE enabled. */ + if (!limits->xsave_enabled || !(vmcs_read(VMCS_GUEST_CR4) & CR4_XSAVE)) { + vm_inject_ud(vmx->vm, vcpu); + return (HANDLED); + } + + xcrval = vmxctx->guest_rdx << 32 | (vmxctx->guest_rax & 0xffffffff); + if ((xcrval & ~limits->xcr0_allowed) != 0) { + vm_inject_gp(vmx->vm, vcpu); + return (HANDLED); + } + + if (!(xcrval & XFEATURE_ENABLED_X87)) { + vm_inject_gp(vmx->vm, vcpu); + return (HANDLED); + } + + /* AVX (YMM_Hi128) requires SSE. */ + if (xcrval & XFEATURE_ENABLED_AVX && + (xcrval & XFEATURE_AVX) != XFEATURE_AVX) { + vm_inject_gp(vmx->vm, vcpu); + return (HANDLED); + } + + /* + * AVX512 requires base AVX (YMM_Hi128) as well as OpMask, + * ZMM_Hi256, and Hi16_ZMM. + */ + if (xcrval & XFEATURE_AVX512 && + (xcrval & (XFEATURE_AVX512 | XFEATURE_AVX)) != + (XFEATURE_AVX512 | XFEATURE_AVX)) { + vm_inject_gp(vmx->vm, vcpu); + return (HANDLED); + } + + /* + * Intel MPX requires both bound register state flags to be + * set. + */ + if (((xcrval & XFEATURE_ENABLED_BNDREGS) != 0) != + ((xcrval & XFEATURE_ENABLED_BNDCSR) != 0)) { + vm_inject_gp(vmx->vm, vcpu); + return (HANDLED); + } + + /* + * This runs "inside" vmrun() with the guest's FPU state, so + * modifying xcr0 directly modifies the guest's xcr0, not the + * host's. + */ + load_xcr(0, xcrval); + return (HANDLED); +} + +static int vmx_emulate_cr_access(struct vmx *vmx, int vcpu, uint64_t exitqual) { int cr, vmcs_guest_cr, vmcs_shadow_cr; @@ -1413,7 +1508,7 @@ vmx_handle_apic_write(struct vlapic *vla if (!virtual_interrupt_delivery) return (UNHANDLED); - handled = 1; + handled = HANDLED; offset = APIC_WRITE_OFFSET(qual); switch (offset) { case APIC_OFFSET_ID: @@ -1435,7 +1530,7 @@ vmx_handle_apic_write(struct vlapic *vla retu = false; error = vlapic_icrlo_write_handler(vlapic, &retu); if (error != 0 || retu) - handled = 0; + handled = UNHANDLED; break; case APIC_OFFSET_CMCI_LVT: case APIC_OFFSET_TIMER_LVT ... APIC_OFFSET_ERROR_LVT: @@ -1448,7 +1543,7 @@ vmx_handle_apic_write(struct vlapic *vla vlapic_dcr_write_handler(vlapic); break; default: - handled = 0; + handled = UNHANDLED; break; } return (handled); @@ -1548,7 +1643,7 @@ vmx_exit_process(struct vmx *vmx, int vc CTASSERT((PINBASED_CTLS_ONE_SETTING & PINBASED_VIRTUAL_NMI) != 0); CTASSERT((PINBASED_CTLS_ONE_SETTING & PINBASED_NMI_EXITING) != 0); - handled = 0; + handled = UNHANDLED; vmxctx = &vmx->ctx[vcpu]; qual = vmexit->u.vmx.exit_qualification; @@ -1611,7 +1706,7 @@ vmx_exit_process(struct vmx *vmx, int vc vmexit->exitcode = VM_EXITCODE_RDMSR; vmexit->u.msr.code = ecx; } else if (!retu) { - handled = 1; + handled = HANDLED; } else { /* Return to userspace with a valid exitcode */ KASSERT(vmexit->exitcode != VM_EXITCODE_BOGUS, @@ -1631,7 +1726,7 @@ vmx_exit_process(struct vmx *vmx, int vc vmexit->u.msr.code = ecx; vmexit->u.msr.wval = (uint64_t)edx << 32 | eax; } else if (!retu) { - handled = 1; + handled = HANDLED; } else { /* Return to userspace with a valid exitcode */ KASSERT(vmexit->exitcode != VM_EXITCODE_BOGUS, @@ -1773,6 +1868,9 @@ vmx_exit_process(struct vmx *vmx, int vc vlapic = vm_lapic(vmx->vm, vcpu); handled = vmx_handle_apic_write(vlapic, qual); break; + case EXIT_REASON_XSETBV: + handled = vmx_emulate_xsetbv(vmx, vcpu, vmexit); + break; default: vmm_stat_incr(vmx->vm, vcpu, VMEXIT_UNKNOWN, 1); break; @@ -2198,50 +2296,6 @@ vmx_setdesc(void *arg, int vcpu, int reg } static int -vmx_inject(void *arg, int vcpu, int type, int vector, uint32_t code, - int code_valid) -{ - int error; - uint64_t info; - struct vmx *vmx = arg; - struct vmcs *vmcs = &vmx->vmcs[vcpu]; - - static uint32_t type_map[VM_EVENT_MAX] = { - 0x1, /* VM_EVENT_NONE */ - 0x0, /* VM_HW_INTR */ - 0x2, /* VM_NMI */ - 0x3, /* VM_HW_EXCEPTION */ - 0x4, /* VM_SW_INTR */ - 0x5, /* VM_PRIV_SW_EXCEPTION */ - 0x6, /* VM_SW_EXCEPTION */ - }; - - /* - * If there is already an exception pending to be delivered to the - * vcpu then just return. - */ - error = vmcs_getreg(vmcs, 0, VMCS_IDENT(VMCS_ENTRY_INTR_INFO), &info); - if (error) - return (error); - - if (info & VMCS_INTR_VALID) - return (EAGAIN); - - info = vector | (type_map[type] << 8) | (code_valid ? 1 << 11 : 0); - info |= VMCS_INTR_VALID; - error = vmcs_setreg(vmcs, 0, VMCS_IDENT(VMCS_ENTRY_INTR_INFO), info); - if (error != 0) - return (error); - - if (code_valid) { - error = vmcs_setreg(vmcs, 0, - VMCS_IDENT(VMCS_ENTRY_EXCEPTION_ERROR), - code); - } - return (error); -} - -static int vmx_getcap(void *arg, int vcpu, int type, int *retval) { struct vmx *vmx = arg; @@ -2643,7 +2697,6 @@ struct vmm_ops vmm_ops_intel = { vmx_setreg, vmx_getdesc, vmx_setdesc, - vmx_inject, vmx_getcap, vmx_setcap, ept_vmspace_alloc, Modified: stable/10/sys/amd64/vmm/vmm.c ============================================================================== --- stable/10/sys/amd64/vmm/vmm.c Thu Jun 12 19:01:57 2014 (r267426) +++ stable/10/sys/amd64/vmm/vmm.c Thu Jun 12 19:58:12 2014 (r267427) @@ -89,10 +89,13 @@ struct vcpu { struct vlapic *vlapic; int vcpuid; struct savefpu *guestfpu; /* guest fpu state */ + uint64_t guest_xcr0; void *stats; struct vm_exit exitinfo; enum x2apic_state x2apic_state; int nmi_pending; + struct vm_exception exception; + int exception_pending; }; #define vcpu_lock_init(v) mtx_init(&((v)->mtx), "vcpu lock", 0, MTX_SPIN) @@ -156,8 +159,6 @@ static struct vmm_ops *ops; (ops != NULL ? (*ops->vmgetdesc)(vmi, vcpu, num, desc) : ENXIO) #define VMSETDESC(vmi, vcpu, num, desc) \ (ops != NULL ? (*ops->vmsetdesc)(vmi, vcpu, num, desc) : ENXIO) -#define VMINJECT(vmi, vcpu, type, vec, ec, ecv) \ - (ops != NULL ? (*ops->vminject)(vmi, vcpu, type, vec, ec, ecv) : ENXIO) #define VMGETCAP(vmi, vcpu, num, retval) \ (ops != NULL ? (*ops->vmgetcap)(vmi, vcpu, num, retval) : ENXIO) #define VMSETCAP(vmi, vcpu, num, val) \ @@ -206,6 +207,7 @@ vcpu_init(struct vm *vm, uint32_t vcpu_i vcpu->vcpuid = vcpu_id; vcpu->vlapic = VLAPIC_INIT(vm->cookie, vcpu_id); vm_set_x2apic_state(vm, vcpu_id, X2APIC_ENABLED); + vcpu->guest_xcr0 = XFEATURE_ENABLED_X87; vcpu->guestfpu = fpu_save_area_alloc(); fpu_save_area_reset(vcpu->guestfpu); vcpu->stats = vmm_stat_alloc(); @@ -815,6 +817,10 @@ restore_guest_fpustate(struct vcpu *vcpu fpu_stop_emulating(); fpurestore(vcpu->guestfpu); + /* restore guest XCR0 if XSAVE is enabled in the host */ + if (rcr4() & CR4_XSAVE) + load_xcr(0, vcpu->guest_xcr0); + /* * The FPU is now "dirty" with the guest's state so turn on emulation * to trap any access to the FPU by the host. @@ -829,6 +835,12 @@ save_guest_fpustate(struct vcpu *vcpu) if ((rcr0() & CR0_TS) == 0) panic("fpu emulation not enabled in host!"); + /* save guest XCR0 and restore host XCR0 */ + if (rcr4() & CR4_XSAVE) { + vcpu->guest_xcr0 = rxcr(0); + load_xcr(0, vmm_get_host_xcr0()); + } + /* save guest FPU state */ fpu_stop_emulating(); fpusave(vcpu->guestfpu); @@ -1214,19 +1226,91 @@ restart: } int -vm_inject_event(struct vm *vm, int vcpuid, int type, - int vector, uint32_t code, int code_valid) +vm_inject_exception(struct vm *vm, int vcpuid, struct vm_exception *exception) { + struct vcpu *vcpu; + if (vcpuid < 0 || vcpuid >= VM_MAXCPU) return (EINVAL); - if ((type > VM_EVENT_NONE && type < VM_EVENT_MAX) == 0) + if (exception->vector < 0 || exception->vector >= 32) return (EINVAL); - if (vector < 0 || vector > 255) - return (EINVAL); + vcpu = &vm->vcpu[vcpuid]; + + if (vcpu->exception_pending) { + VCPU_CTR2(vm, vcpuid, "Unable to inject exception %d due to " + "pending exception %d", exception->vector, + vcpu->exception.vector); + return (EBUSY); + } + + vcpu->exception_pending = 1; + vcpu->exception = *exception; + VCPU_CTR1(vm, vcpuid, "Exception %d pending", exception->vector); + return (0); +} + +int +vm_exception_pending(struct vm *vm, int vcpuid, struct vm_exception *exception) +{ + struct vcpu *vcpu; + int pending; + + KASSERT(vcpuid >= 0 && vcpuid < VM_MAXCPU, ("invalid vcpu %d", vcpuid)); + + vcpu = &vm->vcpu[vcpuid]; + pending = vcpu->exception_pending; + if (pending) { + vcpu->exception_pending = 0; + *exception = vcpu->exception; + VCPU_CTR1(vm, vcpuid, "Exception %d delivered", + exception->vector); + } + return (pending); +} + +static void +vm_inject_fault(struct vm *vm, int vcpuid, struct vm_exception *exception) +{ + struct vm_exit *vmexit; + int error; + + error = vm_inject_exception(vm, vcpuid, exception); + KASSERT(error == 0, ("vm_inject_exception error %d", error)); + + /* + * A fault-like exception allows the instruction to be restarted + * after the exception handler returns. + * + * By setting the inst_length to 0 we ensure that the instruction + * pointer remains at the faulting instruction. + */ + vmexit = vm_exitinfo(vm, vcpuid); + vmexit->inst_length = 0; +} + +void +vm_inject_gp(struct vm *vm, int vcpuid) +{ + struct vm_exception gpf = { + .vector = IDT_GP, + .error_code_valid = 1, + .error_code = 0 + }; + + vm_inject_fault(vm, vcpuid, &gpf); +} + +void +vm_inject_ud(struct vm *vm, int vcpuid) +{ + struct vm_exception udf = { + .vector = IDT_UD, + .error_code_valid = 0 + }; - return (VMINJECT(vm->cookie, vcpuid, type, vector, code, code_valid)); + vm_inject_fault(vm, vcpuid, &udf); } static VMM_STAT(VCPU_NMI_COUNT, "number of NMIs delivered to vcpu"); Modified: stable/10/sys/amd64/vmm/vmm_dev.c ============================================================================== --- stable/10/sys/amd64/vmm/vmm_dev.c Thu Jun 12 19:01:57 2014 (r267426) +++ stable/10/sys/amd64/vmm/vmm_dev.c Thu Jun 12 19:58:12 2014 (r267427) @@ -150,7 +150,7 @@ vmmdev_ioctl(struct cdev *cdev, u_long c struct vm_register *vmreg; struct vm_seg_desc *vmsegdesc; struct vm_run *vmrun; - struct vm_event *vmevent; + struct vm_exception *vmexc; struct vm_lapic_irq *vmirq; struct vm_lapic_msi *vmmsi; struct vm_ioapic_irq *ioapic_irq; @@ -181,7 +181,7 @@ vmmdev_ioctl(struct cdev *cdev, u_long c case VM_SET_REGISTER: case VM_GET_SEGMENT_DESCRIPTOR: case VM_SET_SEGMENT_DESCRIPTOR: - case VM_INJECT_EVENT: + case VM_INJECT_EXCEPTION: case VM_GET_CAPABILITY: case VM_SET_CAPABILITY: case VM_PPTDEV_MSI: @@ -282,12 +282,9 @@ vmmdev_ioctl(struct cdev *cdev, u_long c error = vm_unassign_pptdev(sc->vm, pptdev->bus, pptdev->slot, pptdev->func); break; - case VM_INJECT_EVENT: - vmevent = (struct vm_event *)data; - error = vm_inject_event(sc->vm, vmevent->cpuid, vmevent->type, - vmevent->vector, - vmevent->error_code, - vmevent->error_code_valid); + case VM_INJECT_EXCEPTION: + vmexc = (struct vm_exception *)data; + error = vm_inject_exception(sc->vm, vmexc->cpuid, vmexc); break; case VM_INJECT_NMI: vmnmi = (struct vm_nmi *)data; Modified: stable/10/sys/amd64/vmm/vmm_host.c ============================================================================== --- stable/10/sys/amd64/vmm/vmm_host.c Thu Jun 12 19:01:57 2014 (r267426) +++ stable/10/sys/amd64/vmm/vmm_host.c Thu Jun 12 19:58:12 2014 (r267427) @@ -38,11 +38,14 @@ __FBSDID("$FreeBSD$"); #include "vmm_host.h" -static uint64_t vmm_host_efer, vmm_host_pat, vmm_host_cr0, vmm_host_cr4; +static uint64_t vmm_host_efer, vmm_host_pat, vmm_host_cr0, vmm_host_cr4, + vmm_host_xcr0; +static struct xsave_limits vmm_xsave_limits; void vmm_host_state_init(void) { + int regs[4]; vmm_host_efer = rdmsr(MSR_EFER); vmm_host_pat = rdmsr(MSR_PAT); @@ -57,6 +60,26 @@ vmm_host_state_init(void) vmm_host_cr0 = rcr0() | CR0_TS; vmm_host_cr4 = rcr4(); + + /* + * Only permit a guest to use XSAVE if the host is using + * XSAVE. Only permit a guest to use XSAVE features supported + * by the host. This ensures that the FPU state used by the + * guest is always a subset of the saved guest FPU state. + * + * In addition, only permit known XSAVE features where the + * rules for which features depend on other features is known + * to properly emulate xsetbv. + */ + if (vmm_host_cr4 & CR4_XSAVE) { + vmm_xsave_limits.xsave_enabled = 1; + vmm_host_xcr0 = rxcr(0); + vmm_xsave_limits.xcr0_allowed = vmm_host_xcr0 & + (XFEATURE_AVX | XFEATURE_MPX | XFEATURE_AVX512); + + cpuid_count(0xd, 0x0, regs); + vmm_xsave_limits.xsave_max_size = regs[1]; + } } uint64_t @@ -88,6 +111,13 @@ vmm_get_host_cr4(void) } uint64_t +vmm_get_host_xcr0(void) +{ + + return (vmm_host_xcr0); +} + +uint64_t vmm_get_host_datasel(void) { @@ -122,3 +152,10 @@ vmm_get_host_idtrbase(void) return (r_idt.rd_base); } + +const struct xsave_limits * +vmm_get_xsave_limits(void) +{ + + return (&vmm_xsave_limits); +} Modified: stable/10/sys/amd64/vmm/vmm_host.h ============================================================================== --- stable/10/sys/amd64/vmm/vmm_host.h Thu Jun 12 19:01:57 2014 (r267426) +++ stable/10/sys/amd64/vmm/vmm_host.h Thu Jun 12 19:58:12 2014 (r267427) @@ -33,17 +33,25 @@ #error "no user-servicable parts inside" #endif +struct xsave_limits { + int xsave_enabled; + uint64_t xcr0_allowed; + uint32_t xsave_max_size; +}; + void vmm_host_state_init(void); uint64_t vmm_get_host_pat(void); uint64_t vmm_get_host_efer(void); uint64_t vmm_get_host_cr0(void); uint64_t vmm_get_host_cr4(void); +uint64_t vmm_get_host_xcr0(void); uint64_t vmm_get_host_datasel(void); uint64_t vmm_get_host_codesel(void); uint64_t vmm_get_host_tsssel(void); uint64_t vmm_get_host_fsbase(void); uint64_t vmm_get_host_idtrbase(void); +const struct xsave_limits *vmm_get_xsave_limits(void); /* * Inline access to host state that is used on every VM entry Modified: stable/10/sys/amd64/vmm/x86.c ============================================================================== --- stable/10/sys/amd64/vmm/x86.c Thu Jun 12 19:01:57 2014 (r267426) +++ stable/10/sys/amd64/vmm/x86.c Thu Jun 12 19:58:12 2014 (r267427) @@ -30,17 +30,19 @@ __FBSDID("$FreeBSD$"); #include -#include +#include #include #include #include #include #include +#include #include #include +#include "vmm_host.h" #include "x86.h" #define CPUID_VM_HIGH 0x40000000 @@ -53,6 +55,8 @@ int x86_emulate_cpuid(struct vm *vm, int vcpu_id, uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx) { + const struct xsave_limits *limits; + uint64_t cr4; int error, enable_invpcid; unsigned int func, regs[4]; enum x2apic_state x2apic_state; @@ -147,11 +151,27 @@ x86_emulate_cpuid(struct vm *vm, int vcp regs[2] |= CPUID2_X2APIC; /* - * Hide xsave/osxsave/avx until the FPU save/restore - * issues are resolved + * Only advertise CPUID2_XSAVE in the guest if + * the host is using XSAVE. */ - regs[2] &= ~(CPUID2_XSAVE | CPUID2_OSXSAVE | - CPUID2_AVX); + if (!(regs[2] & CPUID2_OSXSAVE)) + regs[2] &= ~CPUID2_XSAVE; + + /* + * If CPUID2_XSAVE is being advertised and the + * guest has set CR4_XSAVE, set + * CPUID2_OSXSAVE. + */ + regs[2] &= ~CPUID2_OSXSAVE; + if (regs[2] & CPUID2_XSAVE) { + error = vm_get_register(vm, vcpu_id, + VM_REG_GUEST_CR4, &cr4); + if (error) + panic("x86_emulate_cpuid: error %d " + "fetching %%cr4", error); + if (cr4 & CR4_XSAVE) + regs[2] |= CPUID2_OSXSAVE; + } /* * Hide monitor/mwait until we know how to deal with @@ -210,6 +230,26 @@ x86_emulate_cpuid(struct vm *vm, int vcp /* leaf 0 */ if (*ecx == 0) { + cpuid_count(*eax, *ecx, regs); + + /* Only leaf 0 is supported */ + regs[0] = 0; + + /* + * Expose known-safe features. + */ + regs[1] &= (CPUID_STDEXT_FSGSBASE | + CPUID_STDEXT_BMI1 | CPUID_STDEXT_HLE | + CPUID_STDEXT_AVX2 | CPUID_STDEXT_BMI2 | + CPUID_STDEXT_ERMS | CPUID_STDEXT_RTM | + CPUID_STDEXT_AVX512F | + CPUID_STDEXT_AVX512PF | + CPUID_STDEXT_AVX512ER | + CPUID_STDEXT_AVX512CD); + regs[2] = 0; + regs[3] = 0; + + /* Advertise INVPCID if it is enabled. */ error = vm_get_capability(vm, vcpu_id, VM_CAP_ENABLE_INVPCID, &enable_invpcid); if (error == 0 && enable_invpcid) @@ -219,7 +259,6 @@ x86_emulate_cpuid(struct vm *vm, int vcp case CPUID_0000_0006: case CPUID_0000_000A: - case CPUID_0000_000D: /* * Handle the access, but report 0 for * all options @@ -240,6 +279,57 @@ x86_emulate_cpuid(struct vm *vm, int vcp regs[3] = vcpu_id; break; + case CPUID_0000_000D: + limits = vmm_get_xsave_limits(); + if (!limits->xsave_enabled) { + regs[0] = 0; + regs[1] = 0; + regs[2] = 0; + regs[3] = 0; + break; + } + + cpuid_count(*eax, *ecx, regs); + switch (*ecx) { + case 0: + /* + * Only permit the guest to use bits + * that are active in the host in + * %xcr0. Also, claim that the + * maximum save area size is + * equivalent to the host's current + * save area size. Since this runs + * "inside" of vmrun(), it runs with + * the guest's xcr0, so the current + * save area size is correct as-is. + */ + regs[0] &= limits->xcr0_allowed; + regs[2] = limits->xsave_max_size; + regs[3] &= (limits->xcr0_allowed >> 32); + break; + case 1: + /* Only permit XSAVEOPT. */ + regs[0] &= CPUID_EXTSTATE_XSAVEOPT; + regs[1] = 0; + regs[2] = 0; + regs[3] = 0; + break; + default: + /* + * If the leaf is for a permitted feature, + * pass through as-is, otherwise return + * all zeroes. + */ + if (!(limits->xcr0_allowed & (1ul << *ecx))) { + regs[0] = 0; + regs[1] = 0; + regs[2] = 0; + regs[3] = 0; + } + break; + } + break; + case 0x40000000: regs[0] = CPUID_VM_HIGH; bcopy(bhyve_id, ®s[1], 4); Modified: stable/10/usr.sbin/bhyve/bhyverun.c ============================================================================== --- stable/10/usr.sbin/bhyve/bhyverun.c Thu Jun 12 19:01:57 2014 (r267426) +++ stable/10/usr.sbin/bhyve/bhyverun.c Thu Jun 12 19:58:12 2014 (r267427) @@ -326,8 +326,11 @@ vmexit_rdmsr(struct vmctx *ctx, struct v if (error != 0) { fprintf(stderr, "rdmsr to register %#x on vcpu %d\n", vme->u.msr.code, *pvcpu); - if (strictmsr) - return (VMEXIT_ABORT); + if (strictmsr) { + error = vm_inject_exception2(ctx, *pvcpu, IDT_GP, 0); + assert(error == 0); + return (VMEXIT_RESTART); + } } eax = val; @@ -350,8 +353,11 @@ vmexit_wrmsr(struct vmctx *ctx, struct v if (error != 0) { fprintf(stderr, "wrmsr to register %#x(%#lx) on vcpu %d\n", vme->u.msr.code, vme->u.msr.wval, *pvcpu); - if (strictmsr) - return (VMEXIT_ABORT); + if (strictmsr) { + error = vm_inject_exception2(ctx, *pvcpu, IDT_GP, 0); + assert(error == 0); + return (VMEXIT_RESTART); + } } return (VMEXIT_CONTINUE); } From owner-svn-src-stable@FreeBSD.ORG Thu Jun 12 21:36:17 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B9610D4; Thu, 12 Jun 2014 21:36:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A62A02B30; Thu, 12 Jun 2014 21:36:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5CLaHI3073964; Thu, 12 Jun 2014 21:36:17 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5CLaHn9073963; Thu, 12 Jun 2014 21:36:17 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406122136.s5CLaHn9073963@svn.freebsd.org> From: John Baldwin Date: Thu, 12 Jun 2014 21:36:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267428 - stable/10/sys/amd64/vmm/intel X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 21:36:17 -0000 Author: jhb Date: Thu Jun 12 21:36:17 2014 New Revision: 267428 URL: http://svnweb.freebsd.org/changeset/base/267428 Log: MFC 262615,262624: Workaround an apparent bug in VMWare Fusion's nested VT support where it triggers a VM exit with the exit reason of an external interrupt but without a valid interrupt set in the exit interrupt information. Modified: stable/10/sys/amd64/vmm/intel/vmx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/vmm/intel/vmx.c ============================================================================== --- stable/10/sys/amd64/vmm/intel/vmx.c Thu Jun 12 19:58:12 2014 (r267427) +++ stable/10/sys/amd64/vmm/intel/vmx.c Thu Jun 12 21:36:17 2014 (r267428) @@ -1761,6 +1761,13 @@ vmx_exit_process(struct vmx *vmx, int vc * this virtual interrupt during the subsequent VM enter. */ intr_info = vmcs_read(VMCS_EXIT_INTR_INFO); + + /* + * XXX: Ignore this exit if VMCS_INTR_VALID is not set. + * This appears to be a bug in VMware Fusion? + */ + if (!(intr_info & VMCS_INTR_VALID)) + return (1); KASSERT((intr_info & VMCS_INTR_VALID) != 0 && (intr_info & VMCS_INTR_T_MASK) == VMCS_INTR_T_HWINTR, ("VM exit interruption info invalid: %#x", intr_info)); From owner-svn-src-stable@FreeBSD.ORG Thu Jun 12 22:42:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 659CE2A1; Thu, 12 Jun 2014 22:42:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FD562172; Thu, 12 Jun 2014 22:42:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5CMgWMI005716; Thu, 12 Jun 2014 22:42:32 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5CMgVdg005711; Thu, 12 Jun 2014 22:42:31 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201406122242.s5CMgVdg005711@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Thu, 12 Jun 2014 22:42:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267430 - in stable/9/sys: dev/drm2/radeon modules/drm2/radeonkms X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 22:42:32 -0000 Author: dumbbell Date: Thu Jun 12 22:42:31 2014 New Revision: 267430 URL: http://svnweb.freebsd.org/changeset/base/267430 Log: drm/radeon: Add 32bit ioctls support This allows to run 32bit applications on a 64bit host. This was tested successfully with Wine (emulators/i386-wine-devel) and StarCraft II. Before this change, running a 32bit OpenGL application would trigger a kernel panic. This is an MFC of r265262. Submitted by: Jan Kokemüller Approved by: re (gjb) Modified: stable/9/sys/dev/drm2/radeon/radeon_drv.c stable/9/sys/dev/drm2/radeon/radeon_ioc32.c stable/9/sys/modules/drm2/radeonkms/Makefile Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/dev/drm2/radeon/radeon_drv.c ============================================================================== --- stable/9/sys/dev/drm2/radeon/radeon_drv.c Thu Jun 12 21:50:46 2014 (r267429) +++ stable/9/sys/dev/drm2/radeon/radeon_drv.c Thu Jun 12 22:42:31 2014 (r267430) @@ -85,6 +85,10 @@ extern int radeon_get_crtc_scanoutpos(st int *vpos, int *hpos); extern struct drm_ioctl_desc radeon_ioctls_kms[]; extern int radeon_max_kms_ioctl; +#ifdef COMPAT_FREEBSD32 +extern struct drm_ioctl_desc radeon_compat_ioctls[]; +extern int radeon_num_compat_ioctls; +#endif #ifdef DUMBBELL_WIP int radeon_mmap(struct file *filp, struct vm_area_struct *vma); #endif /* DUMBBELL_WIP */ @@ -466,6 +470,10 @@ radeon_attach(device_t kdev) if (radeon_modeset == 1) { kms_driver.driver_features |= DRIVER_MODESET; kms_driver.max_ioctl = radeon_max_kms_ioctl; +#ifdef COMPAT_FREEBSD32 + kms_driver.compat_ioctls = radeon_compat_ioctls; + kms_driver.compat_ioctls_nr = &radeon_num_compat_ioctls; +#endif radeon_register_atpx_handler(); } dev->driver = &kms_driver; Modified: stable/9/sys/dev/drm2/radeon/radeon_ioc32.c ============================================================================== --- stable/9/sys/dev/drm2/radeon/radeon_ioc32.c Thu Jun 12 21:50:46 2014 (r267429) +++ stable/9/sys/dev/drm2/radeon/radeon_ioc32.c Thu Jun 12 22:42:31 2014 (r267430) @@ -31,10 +31,13 @@ #include __FBSDID("$FreeBSD$"); -#include +#include "opt_compat.h" -#include -#include +#ifdef COMPAT_FREEBSD32 + +#include +#include +#include #include "radeon_drv.h" typedef struct drm_radeon_init32 { @@ -60,42 +63,37 @@ typedef struct drm_radeon_init32 { u32 gart_textures_offset; } drm_radeon_init32_t; -static int compat_radeon_cp_init(struct file *file, unsigned int cmd, - unsigned long arg) +static int compat_radeon_cp_init(struct drm_device *dev, void *arg, + struct drm_file *file_priv) { - drm_radeon_init32_t init32; - drm_radeon_init_t __user *init; + drm_radeon_init32_t *init32; + drm_radeon_init_t __user init; - if (copy_from_user(&init32, (void __user *)arg, sizeof(init32))) - return -EFAULT; + init32 = arg; - init = compat_alloc_user_space(sizeof(*init)); - if (!access_ok(VERIFY_WRITE, init, sizeof(*init)) - || __put_user(init32.func, &init->func) - || __put_user(init32.sarea_priv_offset, &init->sarea_priv_offset) - || __put_user(init32.is_pci, &init->is_pci) - || __put_user(init32.cp_mode, &init->cp_mode) - || __put_user(init32.gart_size, &init->gart_size) - || __put_user(init32.ring_size, &init->ring_size) - || __put_user(init32.usec_timeout, &init->usec_timeout) - || __put_user(init32.fb_bpp, &init->fb_bpp) - || __put_user(init32.front_offset, &init->front_offset) - || __put_user(init32.front_pitch, &init->front_pitch) - || __put_user(init32.back_offset, &init->back_offset) - || __put_user(init32.back_pitch, &init->back_pitch) - || __put_user(init32.depth_bpp, &init->depth_bpp) - || __put_user(init32.depth_offset, &init->depth_offset) - || __put_user(init32.depth_pitch, &init->depth_pitch) - || __put_user(init32.fb_offset, &init->fb_offset) - || __put_user(init32.mmio_offset, &init->mmio_offset) - || __put_user(init32.ring_offset, &init->ring_offset) - || __put_user(init32.ring_rptr_offset, &init->ring_rptr_offset) - || __put_user(init32.buffers_offset, &init->buffers_offset) - || __put_user(init32.gart_textures_offset, - &init->gart_textures_offset)) - return -EFAULT; + init.func = init32->func; + init.sarea_priv_offset = (unsigned long)init32->sarea_priv_offset; + init.is_pci = init32->is_pci; + init.cp_mode = init32->cp_mode; + init.gart_size = init32->gart_size; + init.ring_size = init32->ring_size; + init.usec_timeout = init32->usec_timeout; + init.fb_bpp = init32->fb_bpp; + init.front_offset = init32->front_offset; + init.front_pitch = init32->front_pitch; + init.back_offset = init32->back_offset; + init.back_pitch = init32->back_pitch; + init.depth_bpp = init32->depth_bpp; + init.depth_offset = init32->depth_offset; + init.depth_pitch = init32->depth_pitch; + init.fb_offset = (unsigned long)init32->fb_offset; + init.mmio_offset = (unsigned long)init32->mmio_offset; + init.ring_offset = (unsigned long)init32->ring_offset; + init.ring_rptr_offset = (unsigned long)init32->ring_rptr_offset; + init.buffers_offset = (unsigned long)init32->buffers_offset; + init.gart_textures_offset = (unsigned long)init32->gart_textures_offset; - return drm_ioctl(file, DRM_IOCTL_RADEON_CP_INIT, (unsigned long)init); + return radeon_cp_init(dev, &init, file_priv); } typedef struct drm_radeon_clear32 { @@ -107,50 +105,37 @@ typedef struct drm_radeon_clear32 { u32 depth_boxes; } drm_radeon_clear32_t; -static int compat_radeon_cp_clear(struct file *file, unsigned int cmd, - unsigned long arg) +static int compat_radeon_cp_clear(struct drm_device *dev, void *arg, + struct drm_file *file_priv) { - drm_radeon_clear32_t clr32; - drm_radeon_clear_t __user *clr; + drm_radeon_clear32_t *clr32; + drm_radeon_clear_t __user clr; - if (copy_from_user(&clr32, (void __user *)arg, sizeof(clr32))) - return -EFAULT; + clr32 = arg; - clr = compat_alloc_user_space(sizeof(*clr)); - if (!access_ok(VERIFY_WRITE, clr, sizeof(*clr)) - || __put_user(clr32.flags, &clr->flags) - || __put_user(clr32.clear_color, &clr->clear_color) - || __put_user(clr32.clear_depth, &clr->clear_depth) - || __put_user(clr32.color_mask, &clr->color_mask) - || __put_user(clr32.depth_mask, &clr->depth_mask) - || __put_user((void __user *)(unsigned long)clr32.depth_boxes, - &clr->depth_boxes)) - return -EFAULT; + clr.flags = clr32->flags; + clr.clear_color = clr32->clear_color; + clr.clear_depth = clr32->clear_depth; + clr.color_mask = clr32->color_mask; + clr.depth_mask = clr32->depth_mask; + clr.depth_boxes = (drm_radeon_clear_rect_t *)(unsigned long)clr32->depth_boxes; - return drm_ioctl(file, DRM_IOCTL_RADEON_CLEAR, (unsigned long)clr); + return radeon_ioctls[DRM_IOCTL_RADEON_CLEAR].func(dev, &clr, file_priv); } typedef struct drm_radeon_stipple32 { u32 mask; } drm_radeon_stipple32_t; -static int compat_radeon_cp_stipple(struct file *file, unsigned int cmd, - unsigned long arg) +static int compat_radeon_cp_stipple(struct drm_device *dev, void *arg, + struct drm_file *file_priv) { drm_radeon_stipple32_t __user *argp = (void __user *)arg; - drm_radeon_stipple_t __user *request; - u32 mask; + drm_radeon_stipple_t __user request; - if (get_user(mask, &argp->mask)) - return -EFAULT; + request.mask = (unsigned int *)(unsigned long)argp->mask; - request = compat_alloc_user_space(sizeof(*request)); - if (!access_ok(VERIFY_WRITE, request, sizeof(*request)) - || __put_user((unsigned int __user *)(unsigned long)mask, - &request->mask)) - return -EFAULT; - - return drm_ioctl(file, DRM_IOCTL_RADEON_STIPPLE, (unsigned long)request); + return radeon_ioctls[DRM_IOCTL_RADEON_STIPPLE].func(dev, &request, file_priv); } typedef struct drm_radeon_tex_image32 { @@ -168,43 +153,32 @@ typedef struct drm_radeon_texture32 { u32 image; } drm_radeon_texture32_t; -static int compat_radeon_cp_texture(struct file *file, unsigned int cmd, - unsigned long arg) +static int compat_radeon_cp_texture(struct drm_device *dev, void *arg, + struct drm_file *file_priv) { - drm_radeon_texture32_t req32; - drm_radeon_texture_t __user *request; - drm_radeon_tex_image32_t img32; - drm_radeon_tex_image_t __user *image; - - if (copy_from_user(&req32, (void __user *)arg, sizeof(req32))) - return -EFAULT; - if (req32.image == 0) + drm_radeon_texture32_t *req32; + drm_radeon_texture_t __user request; + drm_radeon_tex_image32_t *img32; + drm_radeon_tex_image_t __user image; + + req32 = arg; + if (req32->image == 0) return -EINVAL; - if (copy_from_user(&img32, (void __user *)(unsigned long)req32.image, - sizeof(img32))) - return -EFAULT; - - request = compat_alloc_user_space(sizeof(*request) + sizeof(*image)); - if (!access_ok(VERIFY_WRITE, request, - sizeof(*request) + sizeof(*image))) - return -EFAULT; - image = (drm_radeon_tex_image_t __user *) (request + 1); - - if (__put_user(req32.offset, &request->offset) - || __put_user(req32.pitch, &request->pitch) - || __put_user(req32.format, &request->format) - || __put_user(req32.width, &request->width) - || __put_user(req32.height, &request->height) - || __put_user(image, &request->image) - || __put_user(img32.x, &image->x) - || __put_user(img32.y, &image->y) - || __put_user(img32.width, &image->width) - || __put_user(img32.height, &image->height) - || __put_user((const void __user *)(unsigned long)img32.data, - &image->data)) - return -EFAULT; + img32 = (drm_radeon_tex_image32_t *)(unsigned long)req32->image; - return drm_ioctl(file, DRM_IOCTL_RADEON_TEXTURE, (unsigned long)request); + request.offset = req32->offset; + request.pitch = req32->pitch; + request.format = req32->format; + request.width = req32->width; + request.height = req32->height; + request.image = ℑ + image.x = img32->x; + image.y = img32->y; + image.width = img32->width; + image.height = img32->height; + image.data = (void *)(unsigned long)img32->data; + + return radeon_ioctls[DRM_IOCTL_RADEON_TEXTURE].func(dev, &request, file_priv); } typedef struct drm_radeon_vertex2_32 { @@ -216,28 +190,22 @@ typedef struct drm_radeon_vertex2_32 { u32 prim; } drm_radeon_vertex2_32_t; -static int compat_radeon_cp_vertex2(struct file *file, unsigned int cmd, - unsigned long arg) +static int compat_radeon_cp_vertex2(struct drm_device *dev, void *arg, + struct drm_file *file_priv) { - drm_radeon_vertex2_32_t req32; - drm_radeon_vertex2_t __user *request; + drm_radeon_vertex2_32_t *req32; + drm_radeon_vertex2_t __user request; - if (copy_from_user(&req32, (void __user *)arg, sizeof(req32))) - return -EFAULT; + req32 = arg; - request = compat_alloc_user_space(sizeof(*request)); - if (!access_ok(VERIFY_WRITE, request, sizeof(*request)) - || __put_user(req32.idx, &request->idx) - || __put_user(req32.discard, &request->discard) - || __put_user(req32.nr_states, &request->nr_states) - || __put_user((void __user *)(unsigned long)req32.state, - &request->state) - || __put_user(req32.nr_prims, &request->nr_prims) - || __put_user((void __user *)(unsigned long)req32.prim, - &request->prim)) - return -EFAULT; + request.idx = req32->idx; + request.discard = req32->discard; + request.nr_states = req32->nr_states; + request.state = (drm_radeon_state_t *)(unsigned long)req32->state; + request.nr_prims = req32->nr_prims; + request.prim = (drm_radeon_prim_t *)(unsigned long)req32->prim; - return drm_ioctl(file, DRM_IOCTL_RADEON_VERTEX2, (unsigned long)request); + return radeon_ioctls[DRM_IOCTL_RADEON_VERTEX2].func(dev, &request, file_priv); } typedef struct drm_radeon_cmd_buffer32 { @@ -247,26 +215,20 @@ typedef struct drm_radeon_cmd_buffer32 { u32 boxes; } drm_radeon_cmd_buffer32_t; -static int compat_radeon_cp_cmdbuf(struct file *file, unsigned int cmd, - unsigned long arg) +static int compat_radeon_cp_cmdbuf(struct drm_device *dev, void *arg, + struct drm_file *file_priv) { - drm_radeon_cmd_buffer32_t req32; - drm_radeon_cmd_buffer_t __user *request; + drm_radeon_cmd_buffer32_t *req32; + drm_radeon_cmd_buffer_t __user request; - if (copy_from_user(&req32, (void __user *)arg, sizeof(req32))) - return -EFAULT; + req32 = arg; - request = compat_alloc_user_space(sizeof(*request)); - if (!access_ok(VERIFY_WRITE, request, sizeof(*request)) - || __put_user(req32.bufsz, &request->bufsz) - || __put_user((void __user *)(unsigned long)req32.buf, - &request->buf) - || __put_user(req32.nbox, &request->nbox) - || __put_user((void __user *)(unsigned long)req32.boxes, - &request->boxes)) - return -EFAULT; + request.bufsz = req32->bufsz; + request.buf = (char *)(unsigned long)req32->buf; + request.nbox = req32->nbox; + request.boxes = (struct drm_clip_rect *)(unsigned long)req32->boxes; - return drm_ioctl(file, DRM_IOCTL_RADEON_CMDBUF, (unsigned long)request); + return radeon_ioctls[DRM_IOCTL_RADEON_CMDBUF].func(dev, &request, file_priv); } typedef struct drm_radeon_getparam32 { @@ -274,23 +236,18 @@ typedef struct drm_radeon_getparam32 { u32 value; } drm_radeon_getparam32_t; -static int compat_radeon_cp_getparam(struct file *file, unsigned int cmd, - unsigned long arg) +static int compat_radeon_cp_getparam(struct drm_device *dev, void *arg, + struct drm_file *file_priv) { - drm_radeon_getparam32_t req32; - drm_radeon_getparam_t __user *request; + drm_radeon_getparam32_t *req32; + drm_radeon_getparam_t __user request; - if (copy_from_user(&req32, (void __user *)arg, sizeof(req32))) - return -EFAULT; + req32 = arg; - request = compat_alloc_user_space(sizeof(*request)); - if (!access_ok(VERIFY_WRITE, request, sizeof(*request)) - || __put_user(req32.param, &request->param) - || __put_user((void __user *)(unsigned long)req32.value, - &request->value)) - return -EFAULT; + request.param = req32->param; + request.value = (void *)(unsigned long)req32->value; - return drm_ioctl(file, DRM_IOCTL_RADEON_GETPARAM, (unsigned long)request); + return radeon_ioctls[DRM_IOCTL_RADEON_GETPARAM].func(dev, &request, file_priv); } typedef struct drm_radeon_mem_alloc32 { @@ -300,129 +257,71 @@ typedef struct drm_radeon_mem_alloc32 { u32 region_offset; /* offset from start of fb or GART */ } drm_radeon_mem_alloc32_t; -static int compat_radeon_mem_alloc(struct file *file, unsigned int cmd, - unsigned long arg) +static int compat_radeon_mem_alloc(struct drm_device *dev, void *arg, + struct drm_file *file_priv) { - drm_radeon_mem_alloc32_t req32; - drm_radeon_mem_alloc_t __user *request; + drm_radeon_mem_alloc32_t *req32; + drm_radeon_mem_alloc_t __user request; - if (copy_from_user(&req32, (void __user *)arg, sizeof(req32))) - return -EFAULT; + req32 = arg; - request = compat_alloc_user_space(sizeof(*request)); - if (!access_ok(VERIFY_WRITE, request, sizeof(*request)) - || __put_user(req32.region, &request->region) - || __put_user(req32.alignment, &request->alignment) - || __put_user(req32.size, &request->size) - || __put_user((int __user *)(unsigned long)req32.region_offset, - &request->region_offset)) - return -EFAULT; + request.region = req32->region; + request.alignment = req32->alignment; + request.size = req32->size; + request.region_offset = (int *)(unsigned long)req32->region_offset; - return drm_ioctl(file, DRM_IOCTL_RADEON_ALLOC, (unsigned long)request); + return radeon_mem_alloc(dev, &request, file_priv); } typedef struct drm_radeon_irq_emit32 { u32 irq_seq; } drm_radeon_irq_emit32_t; -static int compat_radeon_irq_emit(struct file *file, unsigned int cmd, - unsigned long arg) +static int compat_radeon_irq_emit(struct drm_device *dev, void *arg, + struct drm_file *file_priv) { - drm_radeon_irq_emit32_t req32; - drm_radeon_irq_emit_t __user *request; + drm_radeon_irq_emit32_t *req32; + drm_radeon_irq_emit_t __user request; - if (copy_from_user(&req32, (void __user *)arg, sizeof(req32))) - return -EFAULT; + req32 = arg; - request = compat_alloc_user_space(sizeof(*request)); - if (!access_ok(VERIFY_WRITE, request, sizeof(*request)) - || __put_user((int __user *)(unsigned long)req32.irq_seq, - &request->irq_seq)) - return -EFAULT; + request.irq_seq = (int *)(unsigned long)req32->irq_seq; - return drm_ioctl(file, DRM_IOCTL_RADEON_IRQ_EMIT, (unsigned long)request); + return radeon_irq_emit(dev, &request, file_priv); } /* The two 64-bit arches where alignof(u64)==4 in 32-bit code */ -#if defined (CONFIG_X86_64) || defined(CONFIG_IA64) typedef struct drm_radeon_setparam32 { int param; u64 value; } __attribute__((packed)) drm_radeon_setparam32_t; -static int compat_radeon_cp_setparam(struct file *file, unsigned int cmd, - unsigned long arg) +static int compat_radeon_cp_setparam(struct drm_device *dev, void *arg, + struct drm_file *file_priv) { - drm_radeon_setparam32_t req32; - drm_radeon_setparam_t __user *request; - - if (copy_from_user(&req32, (void __user *) arg, sizeof(req32))) - return -EFAULT; + drm_radeon_setparam32_t *req32; + drm_radeon_setparam_t __user request; - request = compat_alloc_user_space(sizeof(*request)); - if (!access_ok(VERIFY_WRITE, request, sizeof(*request)) - || __put_user(req32.param, &request->param) - || __put_user((void __user *)(unsigned long)req32.value, - &request->value)) - return -EFAULT; + req32 = arg; - return drm_ioctl(file, DRM_IOCTL_RADEON_SETPARAM, (unsigned long) request); -} -#else -#define compat_radeon_cp_setparam NULL -#endif /* X86_64 || IA64 */ - -static drm_ioctl_compat_t *radeon_compat_ioctls[] = { - [DRM_RADEON_CP_INIT] = compat_radeon_cp_init, - [DRM_RADEON_CLEAR] = compat_radeon_cp_clear, - [DRM_RADEON_STIPPLE] = compat_radeon_cp_stipple, - [DRM_RADEON_TEXTURE] = compat_radeon_cp_texture, - [DRM_RADEON_VERTEX2] = compat_radeon_cp_vertex2, - [DRM_RADEON_CMDBUF] = compat_radeon_cp_cmdbuf, - [DRM_RADEON_GETPARAM] = compat_radeon_cp_getparam, - [DRM_RADEON_SETPARAM] = compat_radeon_cp_setparam, - [DRM_RADEON_ALLOC] = compat_radeon_mem_alloc, - [DRM_RADEON_IRQ_EMIT] = compat_radeon_irq_emit, + request.param = req32->param; + request.value = req32->value; + + return radeon_ioctls[DRM_IOCTL_RADEON_SETPARAM].func(dev, &request, file_priv); +} + +struct drm_ioctl_desc radeon_compat_ioctls[] = { + DRM_IOCTL_DEF(DRM_RADEON_CP_INIT, compat_radeon_cp_init, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), + DRM_IOCTL_DEF(DRM_RADEON_CLEAR, compat_radeon_cp_clear, DRM_AUTH), + DRM_IOCTL_DEF(DRM_RADEON_STIPPLE, compat_radeon_cp_stipple, DRM_AUTH), + DRM_IOCTL_DEF(DRM_RADEON_TEXTURE, compat_radeon_cp_texture, DRM_AUTH), + DRM_IOCTL_DEF(DRM_RADEON_VERTEX2, compat_radeon_cp_vertex2, DRM_AUTH), + DRM_IOCTL_DEF(DRM_RADEON_CMDBUF, compat_radeon_cp_cmdbuf, DRM_AUTH), + DRM_IOCTL_DEF(DRM_RADEON_GETPARAM, compat_radeon_cp_getparam, DRM_AUTH), + DRM_IOCTL_DEF(DRM_RADEON_SETPARAM, compat_radeon_cp_setparam, DRM_AUTH), + DRM_IOCTL_DEF(DRM_RADEON_ALLOC, compat_radeon_mem_alloc, DRM_AUTH), + DRM_IOCTL_DEF(DRM_RADEON_IRQ_EMIT, compat_radeon_irq_emit, DRM_AUTH) }; +int radeon_num_compat_ioctls = DRM_ARRAY_SIZE(radeon_compat_ioctls); -/** - * Called whenever a 32-bit process running under a 64-bit kernel - * performs an ioctl on /dev/dri/card. - * - * \param filp file pointer. - * \param cmd command. - * \param arg user argument. - * \return zero on success or negative number on failure. - */ -long radeon_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) -{ - unsigned int nr = DRM_IOCTL_NR(cmd); - drm_ioctl_compat_t *fn = NULL; - int ret; - - if (nr < DRM_COMMAND_BASE) - return drm_compat_ioctl(filp, cmd, arg); - - if (nr < DRM_COMMAND_BASE + DRM_ARRAY_SIZE(radeon_compat_ioctls)) - fn = radeon_compat_ioctls[nr - DRM_COMMAND_BASE]; - - if (fn != NULL) - ret = (*fn) (filp, cmd, arg); - else - ret = drm_ioctl(filp, cmd, arg); - - return ret; -} - -long radeon_kms_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) -{ - unsigned int nr = DRM_IOCTL_NR(cmd); - int ret; - - if (nr < DRM_COMMAND_BASE) - return drm_compat_ioctl(filp, cmd, arg); - - ret = drm_ioctl(filp, cmd, arg); - - return ret; -} +#endif Modified: stable/9/sys/modules/drm2/radeonkms/Makefile ============================================================================== --- stable/9/sys/modules/drm2/radeonkms/Makefile Thu Jun 12 21:50:46 2014 (r267429) +++ stable/9/sys/modules/drm2/radeonkms/Makefile Thu Jun 12 22:42:31 2014 (r267430) @@ -88,7 +88,10 @@ SRCS += \ si.c \ si_blit_shaders.c -#radeon_ioc32.c +.if ${MACHINE_CPUARCH} == "amd64" +SRCS += radeon_ioc32.c +.endif + #radeon_prime.c #--radeon_trace_points.c From owner-svn-src-stable@FreeBSD.ORG Fri Jun 13 00:07:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C5ECD38C; Fri, 13 Jun 2014 00:07:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2F33291E; Fri, 13 Jun 2014 00:07:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5D07WSq044503; Fri, 13 Jun 2014 00:07:32 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5D07W3u044502; Fri, 13 Jun 2014 00:07:32 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406130007.s5D07W3u044502@svn.freebsd.org> From: Glen Barber Date: Fri, 13 Jun 2014 00:07:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267433 - stable/9/sys/conf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jun 2014 00:07:32 -0000 Author: gjb Date: Fri Jun 13 00:07:32 2014 New Revision: 267433 URL: http://svnweb.freebsd.org/changeset/base/267433 Log: Update stable/9 to -BETA3 as part of the 9.3-RELEASE cycle. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/sys/conf/newvers.sh Modified: stable/9/sys/conf/newvers.sh ============================================================================== --- stable/9/sys/conf/newvers.sh Fri Jun 13 00:05:06 2014 (r267432) +++ stable/9/sys/conf/newvers.sh Fri Jun 13 00:07:32 2014 (r267433) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="9.3" -BRANCH="BETA2" +BRANCH="BETA3" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-stable@FreeBSD.ORG Fri Jun 13 07:23:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3339DD0; Fri, 13 Jun 2014 07:23:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FEE52A7F; Fri, 13 Jun 2014 07:23:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5D7NlJ3040104; Fri, 13 Jun 2014 07:23:47 GMT (envelope-from erwin@svn.freebsd.org) Received: (from erwin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5D7NlbU040103; Fri, 13 Jun 2014 07:23:47 GMT (envelope-from erwin@svn.freebsd.org) Message-Id: <201406130723.s5D7NlbU040103@svn.freebsd.org> From: Erwin Lansing Date: Fri, 13 Jun 2014 07:23:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r267434 - stable/8/etc/namedb X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jun 2014 07:23:47 -0000 Author: erwin Date: Fri Jun 13 07:23:46 2014 New Revision: 267434 URL: http://svnweb.freebsd.org/changeset/base/267434 Log: Sync with 2014060201 which adds IPv6 to b.root-servers.net Note that this is a direct commit to stable/8 as this file is no longer in HEAD. Sponsored by: DK Hostmaster A/S Modified: stable/8/etc/namedb/named.root Modified: stable/8/etc/namedb/named.root ============================================================================== --- stable/8/etc/namedb/named.root Fri Jun 13 00:07:32 2014 (r267433) +++ stable/8/etc/namedb/named.root Fri Jun 13 07:23:46 2014 (r267434) @@ -13,8 +13,8 @@ ; on server FTP.INTERNIC.NET ; -OR- RS.INTERNIC.NET ; -; last update: Mar 26, 2014 -; related version of root zone: 2014032601 +; last update: June 2, 2014 +; related version of root zone: 2014060201 ; ; formerly NS.INTERNIC.NET ; @@ -26,6 +26,7 @@ A.ROOT-SERVERS.NET. 3600000 AA ; . 3600000 NS B.ROOT-SERVERS.NET. B.ROOT-SERVERS.NET. 3600000 A 192.228.79.201 +B.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:84::B ; ; FORMERLY C.PSI.NET ; From owner-svn-src-stable@FreeBSD.ORG Fri Jun 13 07:33:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C66DD1D9; Fri, 13 Jun 2014 07:33:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B30F32B38; Fri, 13 Jun 2014 07:33:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5D7XhHd044615; Fri, 13 Jun 2014 07:33:43 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5D7XhYx044614; Fri, 13 Jun 2014 07:33:43 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201406130733.s5D7XhYx044614@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 13 Jun 2014 07:33:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267435 - stable/10/lib/libusb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jun 2014 07:33:43 -0000 Author: hselasky Date: Fri Jun 13 07:33:43 2014 New Revision: 267435 URL: http://svnweb.freebsd.org/changeset/base/267435 Log: MFC r263191: Add libusb_log_level enum. Modified: stable/10/lib/libusb/libusb.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libusb/libusb.h ============================================================================== --- stable/10/lib/libusb/libusb.h Fri Jun 13 07:23:46 2014 (r267434) +++ stable/10/lib/libusb/libusb.h Fri Jun 13 07:33:43 2014 (r267435) @@ -194,6 +194,19 @@ enum libusb_transfer_flags { LIBUSB_TRANSFER_FREE_TRANSFER = 1 << 2, }; +enum libusb_log_level { + LIBUSB_LOG_LEVEL_NONE = 0, + LIBUSB_LOG_LEVEL_ERROR, + LIBUSB_LOG_LEVEL_WARNING, + LIBUSB_LOG_LEVEL_INFO, + LIBUSB_LOG_LEVEL_DEBUG +}; + +/* XXX */ +/* libusb_set_debug should take parameters from libusb_log_level + * above according to + * http://libusb.sourceforge.net/api-1.0/group__lib.html + */ enum libusb_debug_level { LIBUSB_DEBUG_NO=0, LIBUSB_DEBUG_FUNCTION=1, From owner-svn-src-stable@FreeBSD.ORG Fri Jun 13 12:01:55 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE4E1519; Fri, 13 Jun 2014 12:01:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB2B824B0; Fri, 13 Jun 2014 12:01:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5DC1tQ6070634; Fri, 13 Jun 2014 12:01:55 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5DC1tT6070633; Fri, 13 Jun 2014 12:01:55 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201406131201.s5DC1tT6070633@svn.freebsd.org> From: Christian Brueffer Date: Fri, 13 Jun 2014 12:01:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267442 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jun 2014 12:01:55 -0000 Author: brueffer Date: Fri Jun 13 12:01:55 2014 New Revision: 267442 URL: http://svnweb.freebsd.org/changeset/base/267442 Log: MFC: r267185 Minor improvements. Modified: stable/10/share/man/man4/xnb.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/xnb.4 ============================================================================== --- stable/10/share/man/man4/xnb.4 Fri Jun 13 10:08:18 2014 (r267441) +++ stable/10/share/man/man4/xnb.4 Fri Jun 13 12:01:55 2014 (r267442) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 6, 2012 +.Dd June 6, 2014 .Dt XNB 4 .Os .Sh NAME @@ -116,7 +116,9 @@ machine. However, when a Xennet interface is bridged to a physical interface, a correct checksum must be attached to any packets bound for that physical interface. -Currently, FreeBSD lacks any mechanism for an ethernet device to +Currently, +.Fx +lacks any mechanism for an Ethernet device to inform the OS that newly received packets are valid even though their checksums are not. So if the netfront driver is configured to offload checksum calculations, From owner-svn-src-stable@FreeBSD.ORG Fri Jun 13 12:39:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E802E7D; Fri, 13 Jun 2014 12:39:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E595227A7; Fri, 13 Jun 2014 12:39:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5DCd6SB087206; Fri, 13 Jun 2014 12:39:06 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5DCd6MY087205; Fri, 13 Jun 2014 12:39:06 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201406131239.s5DCd6MY087205@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 13 Jun 2014 12:39:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267443 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jun 2014 12:39:07 -0000 Author: jilles Date: Fri Jun 13 12:39:06 2014 New Revision: 267443 URL: http://svnweb.freebsd.org/changeset/base/267443 Log: MFC r267162: ktrace: Use designated initializers for the data_lengths array. In the .o file, this only changes some line numbers (stable/10 amd64) because element 0 is no longer explicitly initialized. This should make bugs like FreeBSD-SA-14:12.ktrace less likely. Discussed with: des Modified: stable/10/sys/kern/kern_ktrace.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_ktrace.c ============================================================================== --- stable/10/sys/kern/kern_ktrace.c Fri Jun 13 12:01:55 2014 (r267442) +++ stable/10/sys/kern/kern_ktrace.c Fri Jun 13 12:39:06 2014 (r267443) @@ -109,21 +109,20 @@ struct ktr_request { }; static int data_lengths[] = { - 0, /* none */ - offsetof(struct ktr_syscall, ktr_args), /* KTR_SYSCALL */ - sizeof(struct ktr_sysret), /* KTR_SYSRET */ - 0, /* KTR_NAMEI */ - sizeof(struct ktr_genio), /* KTR_GENIO */ - sizeof(struct ktr_psig), /* KTR_PSIG */ - sizeof(struct ktr_csw), /* KTR_CSW */ - 0, /* KTR_USER */ - 0, /* KTR_STRUCT */ - 0, /* KTR_SYSCTL */ - sizeof(struct ktr_proc_ctor), /* KTR_PROCCTOR */ - 0, /* KTR_PROCDTOR */ - sizeof(struct ktr_cap_fail), /* KTR_CAPFAIL */ - sizeof(struct ktr_fault), /* KTR_FAULT */ - sizeof(struct ktr_faultend), /* KTR_FAULTEND */ + [KTR_SYSCALL] = offsetof(struct ktr_syscall, ktr_args), + [KTR_SYSRET] = sizeof(struct ktr_sysret), + [KTR_NAMEI] = 0, + [KTR_GENIO] = sizeof(struct ktr_genio), + [KTR_PSIG] = sizeof(struct ktr_psig), + [KTR_CSW] = sizeof(struct ktr_csw), + [KTR_USER] = 0, + [KTR_STRUCT] = 0, + [KTR_SYSCTL] = 0, + [KTR_PROCCTOR] = sizeof(struct ktr_proc_ctor), + [KTR_PROCDTOR] = 0, + [KTR_CAPFAIL] = sizeof(struct ktr_cap_fail), + [KTR_FAULT] = sizeof(struct ktr_fault), + [KTR_FAULTEND] = sizeof(struct ktr_faultend), }; static STAILQ_HEAD(, ktr_request) ktr_free; From owner-svn-src-stable@FreeBSD.ORG Fri Jun 13 15:04:22 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2760C3D3; Fri, 13 Jun 2014 15:04:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 144E624F2; Fri, 13 Jun 2014 15:04:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5DF4L96055484; Fri, 13 Jun 2014 15:04:21 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5DF4L7n055482; Fri, 13 Jun 2014 15:04:21 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201406131504.s5DF4L7n055482@svn.freebsd.org> From: Bryan Drewery Date: Fri, 13 Jun 2014 15:04:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267444 - stable/10/usr.bin/rpcgen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jun 2014 15:04:22 -0000 Author: bdrewery Date: Fri Jun 13 15:04:21 2014 New Revision: 267444 URL: http://svnweb.freebsd.org/changeset/base/267444 Log: MFC r267174: Fix some rpcgen sample file issues. PR: 185582 Modified: stable/10/usr.bin/rpcgen/rpc_main.c stable/10/usr.bin/rpcgen/rpc_sample.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/rpcgen/rpc_main.c ============================================================================== --- stable/10/usr.bin/rpcgen/rpc_main.c Fri Jun 13 12:39:06 2014 (r267443) +++ stable/10/usr.bin/rpcgen/rpc_main.c Fri Jun 13 15:04:21 2014 (r267444) @@ -872,8 +872,8 @@ $(TARGETS_SVC.c) \n\n"); f_print(fout, "\t$(CC) -o $(CLIENT) $(OBJECTS_CLNT) \ $(LDLIBS) \n\n"); f_print(fout, "$(SERVER) : $(OBJECTS_SVC) \n"); - f_print(fout, "\t$(CC) -o $(SERVER) $(OBJECTS_SVC) $(LDLIBS)\n\n "); - f_print(fout, "clean:\n\t $(RM) -f core $(TARGETS) $(OBJECTS_CLNT) \ + f_print(fout, "\t$(CC) -o $(SERVER) $(OBJECTS_SVC) $(LDLIBS)\n\n"); + f_print(fout, "clean:\n\t rm -f core $(TARGETS) $(OBJECTS_CLNT) \ $(OBJECTS_SVC) $(CLIENT) $(SERVER)\n\n"); } Modified: stable/10/usr.bin/rpcgen/rpc_sample.c ============================================================================== --- stable/10/usr.bin/rpcgen/rpc_sample.c Fri Jun 13 12:39:06 2014 (r267443) +++ stable/10/usr.bin/rpcgen/rpc_sample.c Fri Jun 13 15:04:21 2014 (r267444) @@ -270,6 +270,7 @@ write_sample_clnt_main(void) version_list *vp; f_print(fout, "\n\n"); + f_print(fout, "int\n"); f_print(fout, "main(int argc, char *argv[])\n{\n"); f_print(fout, "\tchar *host;"); From owner-svn-src-stable@FreeBSD.ORG Fri Jun 13 19:10:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AA4C6A2A; Fri, 13 Jun 2014 19:10:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 943952C3C; Fri, 13 Jun 2014 19:10:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5DJAgDQ070782; Fri, 13 Jun 2014 19:10:42 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5DJAenu070766; Fri, 13 Jun 2014 19:10:40 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406131910.s5DJAenu070766@svn.freebsd.org> From: John Baldwin Date: Fri, 13 Jun 2014 19:10:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267447 - in stable/10: sys/amd64/include sys/amd64/vmm sys/amd64/vmm/intel sys/amd64/vmm/io usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jun 2014 19:10:42 -0000 Author: jhb Date: Fri Jun 13 19:10:40 2014 New Revision: 267447 URL: http://svnweb.freebsd.org/changeset/base/267447 Log: MFC 262139,262140,262236,262281,262532: Various x2APIC fixes and enhancements: - Use spinlocks for the vioapic. - Handle the SELF_IPI MSR. - Simplify the APIC mode switching between MMIO and x2APIC. The guest is no longer allowed to switch modes at runtime. Instead, the desired mode is set when the virtual machine is created. - Disallow MMIO access in x2APIC mode and MSR access in xAPIC mode. - Add support for x2APIC virtualization assist in Intel VT-x. Modified: stable/10/sys/amd64/include/vmm.h stable/10/sys/amd64/vmm/intel/vmx.c stable/10/sys/amd64/vmm/io/vioapic.c stable/10/sys/amd64/vmm/io/vlapic.c stable/10/sys/amd64/vmm/io/vlapic.h stable/10/sys/amd64/vmm/io/vlapic_priv.h stable/10/sys/amd64/vmm/vmm.c stable/10/sys/amd64/vmm/vmm_lapic.c stable/10/sys/amd64/vmm/x86.c stable/10/usr.sbin/bhyve/bhyve.8 stable/10/usr.sbin/bhyve/bhyverun.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/include/vmm.h ============================================================================== --- stable/10/sys/amd64/include/vmm.h Fri Jun 13 18:20:44 2014 (r267446) +++ stable/10/sys/amd64/include/vmm.h Fri Jun 13 19:10:40 2014 (r267447) @@ -273,9 +273,8 @@ enum vm_cap_type { }; enum x2apic_state { - X2APIC_ENABLED, - X2APIC_AVAILABLE, X2APIC_DISABLED, + X2APIC_ENABLED, X2APIC_STATE_LAST }; Modified: stable/10/sys/amd64/vmm/intel/vmx.c ============================================================================== --- stable/10/sys/amd64/vmm/intel/vmx.c Fri Jun 13 18:20:44 2014 (r267446) +++ stable/10/sys/amd64/vmm/intel/vmx.c Fri Jun 13 19:10:40 2014 (r267447) @@ -114,6 +114,9 @@ __FBSDID("$FreeBSD$"); #define guest_msr_rw(vmx, msr) \ msr_bitmap_change_access((vmx)->msr_bitmap, (msr), MSR_BITMAP_ACCESS_RW) +#define guest_msr_ro(vmx, msr) \ + msr_bitmap_change_access((vmx)->msr_bitmap, (msr), MSR_BITMAP_ACCESS_READ) + #define HANDLED 1 #define UNHANDLED 0 @@ -302,6 +305,54 @@ exit_reason_to_str(int reason) } #endif /* KTR */ +static int +vmx_allow_x2apic_msrs(struct vmx *vmx) +{ + int i, error; + + error = 0; + + /* + * Allow readonly access to the following x2APIC MSRs from the guest. + */ + error += guest_msr_ro(vmx, MSR_APIC_ID); + error += guest_msr_ro(vmx, MSR_APIC_VERSION); + error += guest_msr_ro(vmx, MSR_APIC_LDR); + error += guest_msr_ro(vmx, MSR_APIC_SVR); + + for (i = 0; i < 8; i++) + error += guest_msr_ro(vmx, MSR_APIC_ISR0 + i); + + for (i = 0; i < 8; i++) + error += guest_msr_ro(vmx, MSR_APIC_TMR0 + i); + + for (i = 0; i < 8; i++) + error += guest_msr_ro(vmx, MSR_APIC_IRR0 + i); + + error += guest_msr_ro(vmx, MSR_APIC_ESR); + error += guest_msr_ro(vmx, MSR_APIC_LVT_TIMER); + error += guest_msr_ro(vmx, MSR_APIC_LVT_THERMAL); + error += guest_msr_ro(vmx, MSR_APIC_LVT_PCINT); + error += guest_msr_ro(vmx, MSR_APIC_LVT_LINT0); + error += guest_msr_ro(vmx, MSR_APIC_LVT_LINT1); + error += guest_msr_ro(vmx, MSR_APIC_LVT_ERROR); + error += guest_msr_ro(vmx, MSR_APIC_ICR_TIMER); + error += guest_msr_ro(vmx, MSR_APIC_DCR_TIMER); + error += guest_msr_ro(vmx, MSR_APIC_ICR); + + /* + * Allow TPR, EOI and SELF_IPI MSRs to be read and written by the guest. + * + * These registers get special treatment described in the section + * "Virtualizing MSR-Based APIC Accesses". + */ + error += guest_msr_rw(vmx, MSR_APIC_TPR); + error += guest_msr_rw(vmx, MSR_APIC_EOI); + error += guest_msr_rw(vmx, MSR_APIC_SELF_IPI); + + return (error); +} + u_long vmx_fix_cr0(u_long cr0) { @@ -1499,17 +1550,53 @@ ept_emulation_fault(uint64_t ept_qual) return (TRUE); } +static __inline int +apic_access_virtualization(struct vmx *vmx, int vcpuid) +{ + uint32_t proc_ctls2; + + proc_ctls2 = vmx->cap[vcpuid].proc_ctls2; + return ((proc_ctls2 & PROCBASED2_VIRTUALIZE_APIC_ACCESSES) ? 1 : 0); +} + +static __inline int +x2apic_virtualization(struct vmx *vmx, int vcpuid) +{ + uint32_t proc_ctls2; + + proc_ctls2 = vmx->cap[vcpuid].proc_ctls2; + return ((proc_ctls2 & PROCBASED2_VIRTUALIZE_X2APIC_MODE) ? 1 : 0); +} + static int -vmx_handle_apic_write(struct vlapic *vlapic, uint64_t qual) +vmx_handle_apic_write(struct vmx *vmx, int vcpuid, struct vlapic *vlapic, + uint64_t qual) { int error, handled, offset; + uint32_t *apic_regs, vector; bool retu; - if (!virtual_interrupt_delivery) - return (UNHANDLED); - handled = HANDLED; offset = APIC_WRITE_OFFSET(qual); + + if (!apic_access_virtualization(vmx, vcpuid)) { + /* + * In general there should not be any APIC write VM-exits + * unless APIC-access virtualization is enabled. + * + * However self-IPI virtualization can legitimately trigger + * an APIC-write VM-exit so treat it specially. + */ + if (x2apic_virtualization(vmx, vcpuid) && + offset == APIC_OFFSET_SELF_IPI) { + apic_regs = (uint32_t *)(vlapic->apic_page); + vector = apic_regs[APIC_OFFSET_SELF_IPI / 4]; + vlapic_self_ipi_handler(vlapic, vector); + return (HANDLED); + } else + return (UNHANDLED); + } + switch (offset) { case APIC_OFFSET_ID: vlapic_id_write_handler(vlapic); @@ -1550,10 +1637,10 @@ vmx_handle_apic_write(struct vlapic *vla } static bool -apic_access_fault(uint64_t gpa) +apic_access_fault(struct vmx *vmx, int vcpuid, uint64_t gpa) { - if (virtual_interrupt_delivery && + if (apic_access_virtualization(vmx, vcpuid) && (gpa >= DEFAULT_APIC_BASE && gpa < DEFAULT_APIC_BASE + PAGE_SIZE)) return (true); else @@ -1566,7 +1653,7 @@ vmx_handle_apic_access(struct vmx *vmx, uint64_t qual; int access_type, offset, allowed; - if (!virtual_interrupt_delivery) + if (!apic_access_virtualization(vmx, vcpuid)) return (UNHANDLED); qual = vmexit->u.vmx.exit_qualification; @@ -1832,7 +1919,8 @@ vmx_exit_process(struct vmx *vmx, int vc * this must be an instruction that accesses MMIO space. */ gpa = vmcs_gpa(); - if (vm_mem_allocated(vmx->vm, gpa) || apic_access_fault(gpa)) { + if (vm_mem_allocated(vmx->vm, gpa) || + apic_access_fault(vmx, vcpu, gpa)) { vmexit->exitcode = VM_EXITCODE_PAGING; vmexit->u.paging.gpa = gpa; vmexit->u.paging.fault_type = ept_fault_type(qual); @@ -1873,7 +1961,7 @@ vmx_exit_process(struct vmx *vmx, int vc */ vmexit->inst_length = 0; vlapic = vm_lapic(vmx->vm, vcpu); - handled = vmx_handle_apic_write(vlapic, qual); + handled = vmx_handle_apic_write(vmx, vcpu, vlapic, qual); break; case EXIT_REASON_XSETBV: handled = vmx_emulate_xsetbv(vmx, vcpu, vmexit); @@ -2119,7 +2207,7 @@ vmx_vmcleanup(void *arg) int i, error; struct vmx *vmx = arg; - if (virtual_interrupt_delivery) + if (apic_access_virtualization(vmx, 0)) vm_unmap_mmio(vmx->vm, DEFAULT_APIC_BASE, PAGE_SIZE); for (i = 0; i < VM_MAXCPU; i++) @@ -2571,6 +2659,49 @@ vmx_set_tmr(struct vlapic *vlapic, int v } static void +vmx_enable_x2apic_mode(struct vlapic *vlapic) +{ + struct vmx *vmx; + struct vmcs *vmcs; + uint32_t proc_ctls2; + int vcpuid, error; + + vcpuid = vlapic->vcpuid; + vmx = ((struct vlapic_vtx *)vlapic)->vmx; + vmcs = &vmx->vmcs[vcpuid]; + + proc_ctls2 = vmx->cap[vcpuid].proc_ctls2; + KASSERT((proc_ctls2 & PROCBASED2_VIRTUALIZE_APIC_ACCESSES) != 0, + ("%s: invalid proc_ctls2 %#x", __func__, proc_ctls2)); + + proc_ctls2 &= ~PROCBASED2_VIRTUALIZE_APIC_ACCESSES; + proc_ctls2 |= PROCBASED2_VIRTUALIZE_X2APIC_MODE; + vmx->cap[vcpuid].proc_ctls2 = proc_ctls2; + + VMPTRLD(vmcs); + vmcs_write(VMCS_SEC_PROC_BASED_CTLS, proc_ctls2); + VMCLEAR(vmcs); + + if (vlapic->vcpuid == 0) { + /* + * The nested page table mappings are shared by all vcpus + * so unmap the APIC access page just once. + */ + error = vm_unmap_mmio(vmx->vm, DEFAULT_APIC_BASE, PAGE_SIZE); + KASSERT(error == 0, ("%s: vm_unmap_mmio error %d", + __func__, error)); + + /* + * The MSR bitmap is shared by all vcpus so modify it only + * once in the context of vcpu 0. + */ + error = vmx_allow_x2apic_msrs(vmx); + KASSERT(error == 0, ("%s: vmx_allow_x2apic_msrs error %d", + __func__, error)); + } +} + +static void vmx_post_intr(struct vlapic *vlapic, int hostcpu) { @@ -2675,6 +2806,7 @@ vmx_vlapic_init(void *arg, int vcpuid) vlapic->ops.pending_intr = vmx_pending_intr; vlapic->ops.intr_accepted = vmx_intr_accepted; vlapic->ops.set_tmr = vmx_set_tmr; + vlapic->ops.enable_x2apic_mode = vmx_enable_x2apic_mode; } if (posted_interrupts) Modified: stable/10/sys/amd64/vmm/io/vioapic.c ============================================================================== --- stable/10/sys/amd64/vmm/io/vioapic.c Fri Jun 13 18:20:44 2014 (r267446) +++ stable/10/sys/amd64/vmm/io/vioapic.c Fri Jun 13 19:10:40 2014 (r267447) @@ -64,8 +64,8 @@ struct vioapic { } rtbl[REDIR_ENTRIES]; }; -#define VIOAPIC_LOCK(vioapic) mtx_lock(&((vioapic)->mtx)) -#define VIOAPIC_UNLOCK(vioapic) mtx_unlock(&((vioapic)->mtx)) +#define VIOAPIC_LOCK(vioapic) mtx_lock_spin(&((vioapic)->mtx)) +#define VIOAPIC_UNLOCK(vioapic) mtx_unlock_spin(&((vioapic)->mtx)) #define VIOAPIC_LOCKED(vioapic) mtx_owned(&((vioapic)->mtx)) static MALLOC_DEFINE(M_VIOAPIC, "vioapic", "bhyve virtual ioapic"); @@ -476,7 +476,7 @@ vioapic_init(struct vm *vm) vioapic = malloc(sizeof(struct vioapic), M_VIOAPIC, M_WAITOK | M_ZERO); vioapic->vm = vm; - mtx_init(&vioapic->mtx, "vioapic lock", NULL, MTX_DEF); + mtx_init(&vioapic->mtx, "vioapic lock", NULL, MTX_SPIN); /* Initialize all redirection entries to mask all interrupts */ for (i = 0; i < REDIR_ENTRIES; i++) Modified: stable/10/sys/amd64/vmm/io/vlapic.c ============================================================================== --- stable/10/sys/amd64/vmm/io/vlapic.c Fri Jun 13 18:20:44 2014 (r267446) +++ stable/10/sys/amd64/vmm/io/vlapic.c Fri Jun 13 19:10:40 2014 (r267447) @@ -289,9 +289,11 @@ vlapic_set_intr_ready(struct vlapic *vla * the vlapic TMR registers. */ tmrptr = &lapic->tmr0; - KASSERT((tmrptr[idx] & mask) == (level ? mask : 0), - ("vlapic TMR[%d] is 0x%08x but interrupt is %s-triggered", - idx / 4, tmrptr[idx], level ? "level" : "edge")); + if ((tmrptr[idx] & mask) != (level ? mask : 0)) { + VLAPIC_CTR3(vlapic, "vlapic TMR[%d] is 0x%08x but " + "interrupt is %s-triggered", idx / 4, tmrptr[idx], + level ? "level" : "edge"); + } VLAPIC_CTR_IRR(vlapic, "vlapic_set_intr_ready"); return (1); @@ -997,6 +999,20 @@ vlapic_icrlo_write_handler(struct vlapic return (1); } +void +vlapic_self_ipi_handler(struct vlapic *vlapic, uint64_t val) +{ + int vec; + + KASSERT(x2apic(vlapic), ("SELF_IPI does not exist in xAPIC mode")); + + vec = val & 0xff; + lapic_intr_edge(vlapic->vm, vlapic->vcpuid, vec); + vmm_stat_array_incr(vlapic->vm, vlapic->vcpuid, IPIS_SENT, + vlapic->vcpuid, 1); + VLAPIC_CTR1(vlapic, "vlapic self-ipi %d", vec); +} + int vlapic_pending_intr(struct vlapic *vlapic, int *vecptr) { @@ -1105,12 +1121,31 @@ vlapic_svr_write_handler(struct vlapic * } int -vlapic_read(struct vlapic *vlapic, uint64_t offset, uint64_t *data, bool *retu) +vlapic_read(struct vlapic *vlapic, int mmio_access, uint64_t offset, + uint64_t *data, bool *retu) { struct LAPIC *lapic = vlapic->apic_page; uint32_t *reg; int i; + /* Ignore MMIO accesses in x2APIC mode */ + if (x2apic(vlapic) && mmio_access) { + VLAPIC_CTR1(vlapic, "MMIO read from offset %#lx in x2APIC mode", + offset); + *data = 0; + goto done; + } + + if (!x2apic(vlapic) && !mmio_access) { + /* + * XXX Generate GP fault for MSR accesses in xAPIC mode + */ + VLAPIC_CTR1(vlapic, "x2APIC MSR read from offset %#lx in " + "xAPIC mode", offset); + *data = 0; + goto done; + } + if (offset > sizeof(*lapic)) { *data = 0; goto done; @@ -1190,6 +1225,12 @@ vlapic_read(struct vlapic *vlapic, uint6 case APIC_OFFSET_TIMER_DCR: *data = lapic->dcr_timer; break; + case APIC_OFFSET_SELF_IPI: + /* + * XXX generate a GP fault if vlapic is in x2apic mode + */ + *data = 0; + break; case APIC_OFFSET_RRR: default: *data = 0; @@ -1201,7 +1242,8 @@ done: } int -vlapic_write(struct vlapic *vlapic, uint64_t offset, uint64_t data, bool *retu) +vlapic_write(struct vlapic *vlapic, int mmio_access, uint64_t offset, + uint64_t data, bool *retu) { struct LAPIC *lapic = vlapic->apic_page; uint32_t *regptr; @@ -1210,10 +1252,26 @@ vlapic_write(struct vlapic *vlapic, uint KASSERT((offset & 0xf) == 0 && offset < PAGE_SIZE, ("vlapic_write: invalid offset %#lx", offset)); - VLAPIC_CTR2(vlapic, "vlapic write offset %#x, data %#lx", offset, data); + VLAPIC_CTR2(vlapic, "vlapic write offset %#lx, data %#lx", + offset, data); - if (offset > sizeof(*lapic)) { - return 0; + if (offset > sizeof(*lapic)) + return (0); + + /* Ignore MMIO accesses in x2APIC mode */ + if (x2apic(vlapic) && mmio_access) { + VLAPIC_CTR2(vlapic, "MMIO write of %#lx to offset %#lx " + "in x2APIC mode", data, offset); + return (0); + } + + /* + * XXX Generate GP fault for MSR accesses in xAPIC mode + */ + if (!x2apic(vlapic) && !mmio_access) { + VLAPIC_CTR2(vlapic, "x2APIC MSR write of %#lx to offset %#lx " + "in xAPIC mode", data, offset); + return (0); } retval = 0; @@ -1270,6 +1328,12 @@ vlapic_write(struct vlapic *vlapic, uint case APIC_OFFSET_ESR: vlapic_esr_write_handler(vlapic); break; + + case APIC_OFFSET_SELF_IPI: + if (x2apic(vlapic)) + vlapic_self_ipi_handler(vlapic, data); + break; + case APIC_OFFSET_VER: case APIC_OFFSET_APR: case APIC_OFFSET_PPR: @@ -1354,50 +1418,52 @@ vlapic_get_apicbase(struct vlapic *vlapi return (vlapic->msr_apicbase); } -void +int vlapic_set_apicbase(struct vlapic *vlapic, uint64_t new) { - struct LAPIC *lapic; - enum x2apic_state state; - uint64_t old; - int err; - - err = vm_get_x2apic_state(vlapic->vm, vlapic->vcpuid, &state); - if (err) - panic("vlapic_set_apicbase: err %d fetching x2apic state", err); - if (state == X2APIC_DISABLED) - new &= ~APICBASE_X2APIC; - - old = vlapic->msr_apicbase; - vlapic->msr_apicbase = new; - - /* - * If the vlapic is switching between xAPIC and x2APIC modes then - * reset the mode-dependent registers. - */ - if ((old ^ new) & APICBASE_X2APIC) { - lapic = vlapic->apic_page; - lapic->id = vlapic_get_id(vlapic); - if (x2apic(vlapic)) { - lapic->ldr = x2apic_ldr(vlapic); - lapic->dfr = 0; - } else { - lapic->ldr = 0; - lapic->dfr = 0xffffffff; - } + if (vlapic->msr_apicbase != new) { + VLAPIC_CTR2(vlapic, "Changing APIC_BASE MSR from %#lx to %#lx " + "not supported", vlapic->msr_apicbase, new); + return (-1); } + + return (0); } void vlapic_set_x2apic_state(struct vm *vm, int vcpuid, enum x2apic_state state) { struct vlapic *vlapic; + struct LAPIC *lapic; vlapic = vm_lapic(vm, vcpuid); if (state == X2APIC_DISABLED) vlapic->msr_apicbase &= ~APICBASE_X2APIC; + else + vlapic->msr_apicbase |= APICBASE_X2APIC; + + /* + * Reset the local APIC registers whose values are mode-dependent. + * + * XXX this works because the APIC mode can be changed only at vcpu + * initialization time. + */ + lapic = vlapic->apic_page; + lapic->id = vlapic_get_id(vlapic); + if (x2apic(vlapic)) { + lapic->ldr = x2apic_ldr(vlapic); + lapic->dfr = 0; + } else { + lapic->ldr = 0; + lapic->dfr = 0xffffffff; + } + + if (state == X2APIC_ENABLED) { + if (vlapic->ops.enable_x2apic_mode) + (*vlapic->ops.enable_x2apic_mode)(vlapic); + } } void Modified: stable/10/sys/amd64/vmm/io/vlapic.h ============================================================================== --- stable/10/sys/amd64/vmm/io/vlapic.h Fri Jun 13 18:20:44 2014 (r267446) +++ stable/10/sys/amd64/vmm/io/vlapic.h Fri Jun 13 19:10:40 2014 (r267447) @@ -32,10 +32,10 @@ struct vm; enum x2apic_state; -int vlapic_write(struct vlapic *vlapic, uint64_t offset, uint64_t data, - bool *retu); -int vlapic_read(struct vlapic *vlapic, uint64_t offset, uint64_t *data, - bool *retu); +int vlapic_write(struct vlapic *vlapic, int mmio_access, uint64_t offset, + uint64_t data, bool *retu); +int vlapic_read(struct vlapic *vlapic, int mmio_access, uint64_t offset, + uint64_t *data, bool *retu); /* * Returns 0 if there is no eligible vector that can be delivered to the @@ -74,7 +74,7 @@ void vlapic_fire_cmci(struct vlapic *vla int vlapic_trigger_lvt(struct vlapic *vlapic, int vector); uint64_t vlapic_get_apicbase(struct vlapic *vlapic); -void vlapic_set_apicbase(struct vlapic *vlapic, uint64_t val); +int vlapic_set_apicbase(struct vlapic *vlapic, uint64_t val); void vlapic_set_x2apic_state(struct vm *vm, int vcpuid, enum x2apic_state s); bool vlapic_enabled(struct vlapic *vlapic); @@ -102,4 +102,5 @@ int vlapic_icrlo_write_handler(struct vl void vlapic_icrtmr_write_handler(struct vlapic *vlapic); void vlapic_dcr_write_handler(struct vlapic *vlapic); void vlapic_lvt_write_handler(struct vlapic *vlapic, uint32_t offset); +void vlapic_self_ipi_handler(struct vlapic *vlapic, uint64_t val); #endif /* _VLAPIC_H_ */ Modified: stable/10/sys/amd64/vmm/io/vlapic_priv.h ============================================================================== --- stable/10/sys/amd64/vmm/io/vlapic_priv.h Fri Jun 13 18:20:44 2014 (r267446) +++ stable/10/sys/amd64/vmm/io/vlapic_priv.h Fri Jun 13 19:10:40 2014 (r267447) @@ -81,6 +81,7 @@ #define APIC_OFFSET_TIMER_ICR 0x380 /* Timer's Initial Count */ #define APIC_OFFSET_TIMER_CCR 0x390 /* Timer's Current Count */ #define APIC_OFFSET_TIMER_DCR 0x3E0 /* Timer's Divide Configuration */ +#define APIC_OFFSET_SELF_IPI 0x3F0 /* Self IPI register */ #define VLAPIC_CTR0(vlapic, format) \ VCPU_CTR0((vlapic)->vm, (vlapic)->vcpuid, format) @@ -91,6 +92,9 @@ #define VLAPIC_CTR2(vlapic, format, p1, p2) \ VCPU_CTR2((vlapic)->vm, (vlapic)->vcpuid, format, p1, p2) +#define VLAPIC_CTR3(vlapic, format, p1, p2, p3) \ + VCPU_CTR3((vlapic)->vm, (vlapic)->vcpuid, format, p1, p2, p3) + #define VLAPIC_CTR_IRR(vlapic, msg) \ do { \ uint32_t *irrptr = &(vlapic)->apic_page->irr0; \ @@ -140,6 +144,7 @@ struct vlapic_ops { void (*intr_accepted)(struct vlapic *vlapic, int vector); void (*post_intr)(struct vlapic *vlapic, int hostcpu); void (*set_tmr)(struct vlapic *vlapic, int vector, bool level); + void (*enable_x2apic_mode)(struct vlapic *vlapic); }; struct vlapic { Modified: stable/10/sys/amd64/vmm/vmm.c ============================================================================== --- stable/10/sys/amd64/vmm/vmm.c Fri Jun 13 18:20:44 2014 (r267446) +++ stable/10/sys/amd64/vmm/vmm.c Fri Jun 13 19:10:40 2014 (r267447) @@ -206,7 +206,7 @@ vcpu_init(struct vm *vm, uint32_t vcpu_i vcpu->hostcpu = NOCPU; vcpu->vcpuid = vcpu_id; vcpu->vlapic = VLAPIC_INIT(vm->cookie, vcpu_id); - vm_set_x2apic_state(vm, vcpu_id, X2APIC_ENABLED); + vm_set_x2apic_state(vm, vcpu_id, X2APIC_DISABLED); vcpu->guest_xcr0 = XFEATURE_ENABLED_X87; vcpu->guestfpu = fpu_save_area_alloc(); fpu_save_area_reset(vcpu->guestfpu); Modified: stable/10/sys/amd64/vmm/vmm_lapic.c ============================================================================== --- stable/10/sys/amd64/vmm/vmm_lapic.c Fri Jun 13 18:20:44 2014 (r267446) +++ stable/10/sys/amd64/vmm/vmm_lapic.c Fri Jun 13 19:10:40 2014 (r267447) @@ -172,7 +172,7 @@ lapic_rdmsr(struct vm *vm, int cpu, u_in error = 0; } else { offset = x2apic_msr_to_regoff(msr); - error = vlapic_read(vlapic, offset, rval, retu); + error = vlapic_read(vlapic, 0, offset, rval, retu); } return (error); @@ -188,11 +188,10 @@ lapic_wrmsr(struct vm *vm, int cpu, u_in vlapic = vm_lapic(vm, cpu); if (msr == MSR_APICBASE) { - vlapic_set_apicbase(vlapic, val); - error = 0; + error = vlapic_set_apicbase(vlapic, val); } else { offset = x2apic_msr_to_regoff(msr); - error = vlapic_write(vlapic, offset, val, retu); + error = vlapic_write(vlapic, 0, offset, val, retu); } return (error); @@ -216,7 +215,7 @@ lapic_mmio_write(void *vm, int cpu, uint return (EINVAL); vlapic = vm_lapic(vm, cpu); - error = vlapic_write(vlapic, off, wval, arg); + error = vlapic_write(vlapic, 1, off, wval, arg); return (error); } @@ -238,6 +237,6 @@ lapic_mmio_read(void *vm, int cpu, uint6 return (EINVAL); vlapic = vm_lapic(vm, cpu); - error = vlapic_read(vlapic, off, rval, arg); + error = vlapic_read(vlapic, 1, off, rval, arg); return (error); } Modified: stable/10/sys/amd64/vmm/x86.c ============================================================================== --- stable/10/sys/amd64/vmm/x86.c Fri Jun 13 18:20:44 2014 (r267446) +++ stable/10/sys/amd64/vmm/x86.c Fri Jun 13 19:10:40 2014 (r267447) @@ -149,6 +149,8 @@ x86_emulate_cpuid(struct vm *vm, int vcp if (x2apic_state != X2APIC_DISABLED) regs[2] |= CPUID2_X2APIC; + else + regs[2] &= ~CPUID2_X2APIC; /* * Only advertise CPUID2_XSAVE in the guest if Modified: stable/10/usr.sbin/bhyve/bhyve.8 ============================================================================== --- stable/10/usr.sbin/bhyve/bhyve.8 Fri Jun 13 18:20:44 2014 (r267446) +++ stable/10/usr.sbin/bhyve/bhyve.8 Fri Jun 13 19:10:40 2014 (r267447) @@ -32,7 +32,7 @@ .Nd "run a guest operating system inside a virtual machine" .Sh SYNOPSIS .Nm -.Op Fl aehwAHPW +.Op Fl aehwxAHPW .Op Fl c Ar numcpus .Op Fl g Ar gdbport .Op Fl p Ar pinnedcpu @@ -58,7 +58,9 @@ exit is detected. .Sh OPTIONS .Bl -tag -width 10n .It Fl a -Disallow use of the local APIC in X2APIC mode. +The guest's local APIC is configured in xAPIC mode. +The xAPIC mode is the default setting so this option is redundant. It will be +deprecated in a future version. .It Fl A Generate ACPI tables. Required for @@ -223,6 +225,8 @@ to exit when a guest issues an access to This is intended for debug purposes. .It Fl w Ignore accesses to unimplemented Model Specific Registers (MSRs). This is intended for debug purposes. +.It Fl x +The guest's local APIC is configured in x2APIC mode. .It Fl h Print help message and exit. .It Ar vmname Modified: stable/10/usr.sbin/bhyve/bhyverun.c ============================================================================== --- stable/10/usr.sbin/bhyve/bhyverun.c Fri Jun 13 18:20:44 2014 (r267446) +++ stable/10/usr.sbin/bhyve/bhyverun.c Fri Jun 13 19:10:40 2014 (r267447) @@ -84,8 +84,9 @@ char *vmname; int guest_ncpus; static int pincpu = -1; -static int guest_vmexit_on_hlt, guest_vmexit_on_pause, disable_x2apic; +static int guest_vmexit_on_hlt, guest_vmexit_on_pause; static int virtio_msix = 1; +static int x2apic_mode = 0; /* default is xAPIC */ static int strictio; static int strictmsr = 1; @@ -126,7 +127,7 @@ usage(int code) fprintf(stderr, "Usage: %s [-aehwAHIPW] [-g ] [-s ]\n" " %*s [-c vcpus] [-p pincpu] [-m mem] [-l ] \n" - " -a: local apic is in XAPIC mode (default is X2APIC)\n" + " -a: local apic is in xAPIC mode (deprecated)\n" " -A: create an ACPI table\n" " -g: gdb port\n" " -c: # cpus (default 1)\n" @@ -139,7 +140,8 @@ usage(int code) " -s: PCI slot config\n" " -l: LPC device configuration\n" " -m: memory size in MB\n" - " -w: ignore unimplemented MSRs\n", + " -w: ignore unimplemented MSRs\n" + " -x: local apic is in x2APIC mode\n", progname, (int)strlen(progname), ""); exit(code); @@ -153,13 +155,6 @@ paddr_guest2host(struct vmctx *ctx, uint } int -fbsdrun_disable_x2apic(void) -{ - - return (disable_x2apic); -} - -int fbsdrun_vmexit_on_pause(void) { @@ -576,10 +571,10 @@ fbsdrun_set_capabilities(struct vmctx *c handler[VM_EXITCODE_PAUSE] = vmexit_pause; } - if (fbsdrun_disable_x2apic()) - err = vm_set_x2apic_state(ctx, cpu, X2APIC_DISABLED); - else + if (x2apic_mode) err = vm_set_x2apic_state(ctx, cpu, X2APIC_ENABLED); + else + err = vm_set_x2apic_state(ctx, cpu, X2APIC_DISABLED); if (err) { fprintf(stderr, "Unable to set x2apic state (%d)\n", err); @@ -604,10 +599,10 @@ main(int argc, char *argv[]) guest_ncpus = 1; memsize = 256 * MB; - while ((c = getopt(argc, argv, "abehwAHIPWp:g:c:s:m:l:")) != -1) { + while ((c = getopt(argc, argv, "abehwxAHIPWp:g:c:s:m:l:")) != -1) { switch (c) { case 'a': - disable_x2apic = 1; + x2apic_mode = 0; break; case 'A': acpi = 1; @@ -664,6 +659,9 @@ main(int argc, char *argv[]) case 'W': virtio_msix = 0; break; + case 'x': + x2apic_mode = 1; + break; case 'h': usage(0); default: From owner-svn-src-stable@FreeBSD.ORG Fri Jun 13 21:30:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 442EE22B; Fri, 13 Jun 2014 21:30:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2FCE7287A; Fri, 13 Jun 2014 21:30:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5DLUgQq033501; Fri, 13 Jun 2014 21:30:42 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5DLUfdQ033494; Fri, 13 Jun 2014 21:30:41 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406132130.s5DLUfdQ033494@svn.freebsd.org> From: John Baldwin Date: Fri, 13 Jun 2014 21:30:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267450 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jun 2014 21:30:42 -0000 Author: jhb Date: Fri Jun 13 21:30:40 2014 New Revision: 267450 URL: http://svnweb.freebsd.org/changeset/base/267450 Log: MFC 262744: Add SMBIOS support. A new option, -U, can be used to set the UUID in the System Information (Type 1) structure. Added: stable/10/usr.sbin/bhyve/smbiostbl.c - copied unchanged from r262744, head/usr.sbin/bhyve/smbiostbl.c stable/10/usr.sbin/bhyve/smbiostbl.h - copied unchanged from r262744, head/usr.sbin/bhyve/smbiostbl.h Modified: stable/10/usr.sbin/bhyve/Makefile stable/10/usr.sbin/bhyve/acpi.c stable/10/usr.sbin/bhyve/bhyverun.c stable/10/usr.sbin/bhyve/bhyverun.h Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/Makefile ============================================================================== --- stable/10/usr.sbin/bhyve/Makefile Fri Jun 13 19:40:02 2014 (r267449) +++ stable/10/usr.sbin/bhyve/Makefile Fri Jun 13 21:30:40 2014 (r267450) @@ -34,6 +34,7 @@ SRCS= \ pmtmr.c \ post.c \ rtc.c \ + smbiostbl.c \ uart_emul.c \ virtio.c \ xmsr.c \ Modified: stable/10/usr.sbin/bhyve/acpi.c ============================================================================== --- stable/10/usr.sbin/bhyve/acpi.c Fri Jun 13 19:40:02 2014 (r267449) +++ stable/10/usr.sbin/bhyve/acpi.c Fri Jun 13 21:30:40 2014 (r267450) @@ -39,14 +39,14 @@ * * Layout * ------ - * RSDP -> 0xf0400 (36 bytes fixed) - * RSDT -> 0xf0440 (36 bytes + 4*N table addrs, 2 used) - * XSDT -> 0xf0480 (36 bytes + 8*N table addrs, 2 used) - * MADT -> 0xf0500 (depends on #CPUs) - * FADT -> 0xf0600 (268 bytes) - * HPET -> 0xf0740 (56 bytes) - * FACS -> 0xf0780 (64 bytes) - * DSDT -> 0xf0800 (variable - can go up to 0x100000) + * RSDP -> 0xf2400 (36 bytes fixed) + * RSDT -> 0xf2440 (36 bytes + 4*N table addrs, 2 used) + * XSDT -> 0xf2480 (36 bytes + 8*N table addrs, 2 used) + * MADT -> 0xf2500 (depends on #CPUs) + * FADT -> 0xf2600 (268 bytes) + * HPET -> 0xf2740 (56 bytes) + * FACS -> 0xf2780 (64 bytes) + * DSDT -> 0xf2800 (variable - can go up to 0x100000) */ #include @@ -74,7 +74,7 @@ __FBSDID("$FreeBSD$"); * Define the base address of the ACPI tables, and the offsets to * the individual tables */ -#define BHYVE_ACPI_BASE 0xf0400 +#define BHYVE_ACPI_BASE 0xf2400 #define RSDT_OFFSET 0x040 #define XSDT_OFFSET 0x080 #define MADT_OFFSET 0x100 Modified: stable/10/usr.sbin/bhyve/bhyverun.c ============================================================================== --- stable/10/usr.sbin/bhyve/bhyverun.c Fri Jun 13 19:40:02 2014 (r267449) +++ stable/10/usr.sbin/bhyve/bhyverun.c Fri Jun 13 21:30:40 2014 (r267450) @@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$"); #include "mptbl.h" #include "pci_emul.h" #include "pci_lpc.h" +#include "smbiostbl.h" #include "xmsr.h" #include "spinup_ap.h" #include "rtc.h" @@ -82,6 +83,7 @@ typedef int (*vmexit_handler_t)(struct v char *vmname; int guest_ncpus; +char *guest_uuid_str; static int pincpu = -1; static int guest_vmexit_on_hlt, guest_vmexit_on_pause; @@ -141,7 +143,8 @@ usage(int code) " -l: LPC device configuration\n" " -m: memory size in MB\n" " -w: ignore unimplemented MSRs\n" - " -x: local apic is in x2APIC mode\n", + " -x: local apic is in x2APIC mode\n" + " -U: uuid\n", progname, (int)strlen(progname), ""); exit(code); @@ -599,7 +602,7 @@ main(int argc, char *argv[]) guest_ncpus = 1; memsize = 256 * MB; - while ((c = getopt(argc, argv, "abehwxAHIPWp:g:c:s:m:l:")) != -1) { + while ((c = getopt(argc, argv, "abehwxAHIPWp:g:c:s:m:l:U:")) != -1) { switch (c) { case 'a': x2apic_mode = 0; @@ -653,6 +656,9 @@ main(int argc, char *argv[]) case 'e': strictio = 1; break; + case 'U': + guest_uuid_str = optarg; + break; case 'w': strictmsr = 0; break; @@ -723,6 +729,9 @@ main(int argc, char *argv[]) */ mptable_build(ctx, guest_ncpus); + error = smbios_build(ctx); + assert(error == 0); + if (acpi) { error = acpi_build(ctx, guest_ncpus); assert(error == 0); Modified: stable/10/usr.sbin/bhyve/bhyverun.h ============================================================================== --- stable/10/usr.sbin/bhyve/bhyverun.h Fri Jun 13 19:40:02 2014 (r267449) +++ stable/10/usr.sbin/bhyve/bhyverun.h Fri Jun 13 21:30:40 2014 (r267450) @@ -37,6 +37,7 @@ struct vmctx; extern int guest_ncpus; +extern char *guest_uuid_str; extern char *vmname; void *paddr_guest2host(struct vmctx *ctx, uintptr_t addr, size_t len); Copied: stable/10/usr.sbin/bhyve/smbiostbl.c (from r262744, head/usr.sbin/bhyve/smbiostbl.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.sbin/bhyve/smbiostbl.c Fri Jun 13 21:30:40 2014 (r267450, copy of r262744, head/usr.sbin/bhyve/smbiostbl.c) @@ -0,0 +1,832 @@ +/*- + * Copyright (c) 2014 Tycho Nightingale + * All rights reserved. + * + * 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 ``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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "bhyverun.h" +#include "smbiostbl.h" + +#define MB (1024*1024) +#define GB (1024ULL*1024*1024) + +#define SMBIOS_BASE 0xF1000 + +/* BHYVE_ACPI_BASE - SMBIOS_BASE) */ +#define SMBIOS_MAX_LENGTH (0xF2400 - 0xF1000) + +#define SMBIOS_TYPE_BIOS 0 +#define SMBIOS_TYPE_SYSTEM 1 +#define SMBIOS_TYPE_CHASSIS 3 +#define SMBIOS_TYPE_PROCESSOR 4 +#define SMBIOS_TYPE_MEMARRAY 16 +#define SMBIOS_TYPE_MEMDEVICE 17 +#define SMBIOS_TYPE_MEMARRAYMAP 19 +#define SMBIOS_TYPE_BOOT 32 +#define SMBIOS_TYPE_EOT 127 + +struct smbios_structure { + uint8_t type; + uint8_t length; + uint16_t handle; +} __packed; + +typedef int (*initializer_func_t)(struct smbios_structure *template_entry, + const char **template_strings, char *curaddr, char **endaddr, + uint16_t *n, uint16_t *size); + +struct smbios_template_entry { + struct smbios_structure *entry; + const char **strings; + initializer_func_t initializer; +}; + +/* + * SMBIOS Structure Table Entry Point + */ +#define SMBIOS_ENTRY_EANCHOR "_SM_" +#define SMBIOS_ENTRY_EANCHORLEN 4 +#define SMBIOS_ENTRY_IANCHOR "_DMI_" +#define SMBIOS_ENTRY_IANCHORLEN 5 + +struct smbios_entry_point { + char eanchor[4]; /* anchor tag */ + uint8_t echecksum; /* checksum of entry point structure */ + uint8_t eplen; /* length in bytes of entry point */ + uint8_t major; /* major version of the SMBIOS spec */ + uint8_t minor; /* minor version of the SMBIOS spec */ + uint16_t maxssize; /* maximum size in bytes of a struct */ + uint8_t revision; /* entry point structure revision */ + uint8_t format[5]; /* entry point rev-specific data */ + char ianchor[5]; /* intermediate anchor tag */ + uint8_t ichecksum; /* intermediate checksum */ + uint16_t stlen; /* len in bytes of structure table */ + uint32_t staddr; /* physical addr of structure table */ + uint16_t stnum; /* number of structure table entries */ + uint8_t bcdrev; /* BCD value representing DMI ver */ +} __packed; + +/* + * BIOS Information + */ +#define SMBIOS_FL_ISA 0x00000010 /* ISA is supported */ +#define SMBIOS_FL_PCI 0x00000080 /* PCI is supported */ +#define SMBIOS_FL_SHADOW 0x00001000 /* BIOS shadowing is allowed */ +#define SMBIOS_FL_CDBOOT 0x00008000 /* Boot from CD is supported */ +#define SMBIOS_FL_SELBOOT 0x00010000 /* Selectable Boot supported */ +#define SMBIOS_FL_EDD 0x00080000 /* EDD Spec is supported */ + +#define SMBIOS_XB1_FL_ACPI 0x00000001 /* ACPI is supported */ + +#define SMBIOS_XB2_FL_BBS 0x00000001 /* BIOS Boot Specification */ +#define SMBIOS_XB2_FL_VM 0x00000010 /* Virtual Machine */ + +struct smbios_table_type0 { + struct smbios_structure header; + uint8_t vendor; /* vendor string */ + uint8_t version; /* version string */ + uint16_t segment; /* address segment location */ + uint8_t rel_date; /* release date */ + uint8_t size; /* rom size */ + uint64_t cflags; /* characteristics */ + uint8_t xc_bytes[2]; /* characteristics ext bytes */ + uint8_t sb_major_rel; /* system bios version */ + uint8_t sb_minor_rele; + uint8_t ecfw_major_rel; /* embedded ctrl fw version */ + uint8_t ecfw_minor_rel; +} __packed; + +/* + * System Information + */ +#define SMBIOS_WAKEUP_SWITCH 0x06 /* power switch */ + +struct smbios_table_type1 { + struct smbios_structure header; + uint8_t manufacturer; /* manufacturer string */ + uint8_t product; /* product name string */ + uint8_t version; /* version string */ + uint8_t serial; /* serial number string */ + uint8_t uuid[16]; /* uuid byte array */ + uint8_t wakeup; /* wake-up event */ + uint8_t sku; /* sku number string */ + uint8_t family; /* family name string */ +} __packed; + +/* + * System Enclosure or Chassis + */ +#define SMBIOS_CHT_UNKNOWN 0x02 /* unknown */ + +#define SMBIOS_CHST_SAFE 0x03 /* safe */ + +#define SMBIOS_CHSC_NONE 0x03 /* none */ + +struct smbios_table_type3 { + struct smbios_structure header; + uint8_t manufacturer; /* manufacturer string */ + uint8_t type; /* type */ + uint8_t version; /* version string */ + uint8_t serial; /* serial number string */ + uint8_t asset; /* asset tag string */ + uint8_t bustate; /* boot-up state */ + uint8_t psstate; /* power supply state */ + uint8_t tstate; /* thermal state */ + uint8_t security; /* security status */ + uint8_t uheight; /* height in 'u's */ + uint8_t cords; /* number of power cords */ + uint8_t elems; /* number of element records */ + uint8_t elemlen; /* length of records */ + uint8_t sku; /* sku number string */ +} __packed; + +/* + * Processor Information + */ +#define SMBIOS_PRT_CENTRAL 0x03 /* central processor */ + +#define SMBIOS_PRF_OTHER 0x01 /* other */ + +#define SMBIOS_PRS_PRESENT 0x40 /* socket is populated */ +#define SMBIOS_PRS_ENABLED 0x1 /* enabled */ + +#define SMBIOS_PRU_NONE 0x06 /* none */ + +#define SMBIOS_PFL_64B 0x04 /* 64-bit capable */ + +struct smbios_table_type4 { + struct smbios_structure header; + uint8_t socket; /* socket designation string */ + uint8_t type; /* processor type */ + uint8_t family; /* processor family */ + uint8_t manufacturer; /* manufacturer string */ + uint64_t cpuid; /* processor cpuid */ + uint8_t version; /* version string */ + uint8_t voltage; /* voltage */ + uint16_t clkspeed; /* ext clock speed in mhz */ + uint16_t maxspeed; /* maximum speed in mhz */ + uint16_t curspeed; /* current speed in mhz */ + uint8_t status; /* status */ + uint8_t upgrade; /* upgrade */ + uint16_t l1handle; /* l1 cache handle */ + uint16_t l2handle; /* l2 cache handle */ + uint16_t l3handle; /* l3 cache handle */ + uint8_t serial; /* serial number string */ + uint8_t asset; /* asset tag string */ + uint8_t part; /* part number string */ + uint8_t cores; /* cores per socket */ + uint8_t ecores; /* enabled cores */ + uint8_t threads; /* threads per socket */ + uint16_t cflags; /* processor characteristics */ + uint16_t family2; /* processor family 2 */ +} __packed; + +/* + * Physical Memory Array + */ +#define SMBIOS_MAL_SYSMB 0x03 /* system board or motherboard */ + +#define SMBIOS_MAU_SYSTEM 0x03 /* system memory */ + +#define SMBIOS_MAE_NONE 0x03 /* none */ + +struct smbios_table_type16 { + struct smbios_structure header; + uint8_t location; /* physical device location */ + uint8_t use; /* device functional purpose */ + uint8_t ecc; /* err detect/correct method */ + uint32_t size; /* max mem capacity in kb */ + uint16_t errhand; /* handle of error (if any) */ + uint16_t ndevs; /* num of slots or sockets */ + uint64_t xsize; /* max mem capacity in bytes */ +} __packed; + +/* + * Memory Device + */ +#define SMBIOS_MDFF_UNKNOWN 0x02 /* unknown */ + +#define SMBIOS_MDT_UNKNOWN 0x02 /* unknown */ + +#define SMBIOS_MDF_UNKNOWN 0x0004 /* unknown */ + +struct smbios_table_type17 { + struct smbios_structure header; + uint16_t arrayhand; /* handle of physl mem array */ + uint16_t errhand; /* handle of mem error data */ + uint16_t twidth; /* total width in bits */ + uint16_t dwidth; /* data width in bits */ + uint16_t size; /* size in bytes */ + uint8_t form; /* form factor */ + uint8_t set; /* set */ + uint8_t dloc; /* device locator string */ + uint8_t bloc; /* phys bank locator string */ + uint8_t type; /* memory type */ + uint16_t flags; /* memory characteristics */ + uint16_t maxspeed; /* maximum speed in mhz */ + uint8_t manufacturer; /* manufacturer string */ + uint8_t serial; /* serial number string */ + uint8_t asset; /* asset tag string */ + uint8_t part; /* part number string */ + uint8_t attributes; /* attributes */ + uint32_t xsize; /* extended size in mbs */ + uint16_t curspeed; /* current speed in mhz */ + uint16_t minvoltage; /* minimum voltage */ + uint16_t maxvoltage; /* maximum voltage */ + uint16_t curvoltage; /* configured voltage */ +} __packed; + +/* + * Memory Array Mapped Address + */ +struct smbios_table_type19 { + struct smbios_structure header; + uint32_t saddr; /* start phys addr in kb */ + uint32_t eaddr; /* end phys addr in kb */ + uint16_t arrayhand; /* physical mem array handle */ + uint8_t width; /* num of dev in row */ + uint64_t xsaddr; /* start phys addr in bytes */ + uint64_t xeaddr; /* end phys addr in bytes */ +} __packed; + +/* + * System Boot Information + */ +#define SMBIOS_BOOT_NORMAL 0 /* no errors detected */ + +struct smbios_table_type32 { + struct smbios_structure header; + uint8_t reserved[6]; + uint8_t status; /* boot status */ +} __packed; + +/* + * End-of-Table + */ +struct smbios_table_type127 { + struct smbios_structure header; +} __packed; + +struct smbios_table_type0 smbios_type0_template = { + { SMBIOS_TYPE_BIOS, sizeof (struct smbios_table_type0), 0 }, + 1, /* bios vendor string */ + 2, /* bios version string */ + 0xF000, /* bios address segment location */ + 3, /* bios release date */ + 0x0, /* bios size (64k * (n + 1) is the size in bytes) */ + SMBIOS_FL_ISA | SMBIOS_FL_PCI | SMBIOS_FL_SHADOW | + SMBIOS_FL_CDBOOT | SMBIOS_FL_EDD, + { SMBIOS_XB1_FL_ACPI, SMBIOS_XB2_FL_BBS | SMBIOS_XB2_FL_VM }, + 0x0, /* bios major release */ + 0x0, /* bios minor release */ + 0xff, /* embedded controller firmware major release */ + 0xff /* embedded controller firmware minor release */ +}; + +const char *smbios_type0_strings[] = { + "BHYVE", /* vendor string */ + __TIME__, /* bios version string */ + __DATE__, /* bios release date string */ + NULL +}; + +struct smbios_table_type1 smbios_type1_template = { + { SMBIOS_TYPE_SYSTEM, sizeof (struct smbios_table_type1), 0 }, + 1, /* manufacturer string */ + 2, /* product string */ + 3, /* version string */ + 4, /* serial number string */ + { 0 }, + SMBIOS_WAKEUP_SWITCH, + 5, /* sku string */ + 6 /* family string */ +}; + +static int smbios_type1_initializer(struct smbios_structure *template_entry, + const char **template_strings, char *curaddr, char **endaddr, + uint16_t *n, uint16_t *size); + +const char *smbios_type1_strings[] = { + " ", /* manufacturer string */ + "BHYVE", /* product name string */ + "1.0", /* version string */ + "None", /* serial number string */ + "None", /* sku string */ + " ", /* family name string */ + NULL +}; + +struct smbios_table_type3 smbios_type3_template = { + { SMBIOS_TYPE_CHASSIS, sizeof (struct smbios_table_type3), 0 }, + 1, /* manufacturer string */ + SMBIOS_CHT_UNKNOWN, + 2, /* version string */ + 3, /* serial number string */ + 4, /* asset tag string */ + SMBIOS_CHST_SAFE, + SMBIOS_CHST_SAFE, + SMBIOS_CHST_SAFE, + SMBIOS_CHSC_NONE, + 0, /* height in 'u's (0=enclosure height unspecified) */ + 0, /* number of power cords (0=number unspecified) */ + 0, /* number of contained element records */ + 0, /* length of records */ + 5 /* sku number string */ +}; + +const char *smbios_type3_strings[] = { + " ", /* manufacturer string */ + "1.0", /* version string */ + "None", /* serial number string */ + "None", /* asset tag string */ + "None", /* sku number string */ + NULL +}; + +struct smbios_table_type4 smbios_type4_template = { + { SMBIOS_TYPE_PROCESSOR, sizeof (struct smbios_table_type4), 0 }, + 1, /* socket designation string */ + SMBIOS_PRT_CENTRAL, + SMBIOS_PRF_OTHER, + 2, /* manufacturer string */ + 0, /* cpuid */ + 3, /* version string */ + 0, /* voltage */ + 0, /* external clock frequency in mhz (0=unknown) */ + 0, /* maximum frequency in mhz (0=unknown) */ + 0, /* current frequency in mhz (0=unknown) */ + SMBIOS_PRS_PRESENT | SMBIOS_PRS_ENABLED, + SMBIOS_PRU_NONE, + -1, /* l1 cache handle */ + -1, /* l2 cache handle */ + -1, /* l3 cache handle */ + 4, /* serial number string */ + 5, /* asset tag string */ + 6, /* part number string */ + 0, /* cores per socket (0=unknown) */ + 0, /* enabled cores per socket (0=unknown) */ + 0, /* threads per socket (0=unknown) */ + SMBIOS_PFL_64B, + SMBIOS_PRF_OTHER +}; + +const char *smbios_type4_strings[] = { + " ", /* socket designation string */ + " ", /* manufacturer string */ + " ", /* version string */ + "None", /* serial number string */ + "None", /* asset tag string */ + "None", /* part number string */ + NULL +}; + +static int smbios_type4_initializer(struct smbios_structure *template_entry, + const char **template_strings, char *curaddr, char **endaddr, + uint16_t *n, uint16_t *size); + +struct smbios_table_type16 smbios_type16_template = { + { SMBIOS_TYPE_MEMARRAY, sizeof (struct smbios_table_type16), 0 }, + SMBIOS_MAL_SYSMB, + SMBIOS_MAU_SYSTEM, + SMBIOS_MAE_NONE, + 0x80000000, /* max mem capacity in kb (0x80000000=use extended) */ + -1, /* handle of error (if any) */ + 0, /* number of slots or sockets (TBD) */ + 0 /* extended maximum memory capacity in bytes (TBD) */ +}; + +static int smbios_type16_initializer(struct smbios_structure *template_entry, + const char **template_strings, char *curaddr, char **endaddr, + uint16_t *n, uint16_t *size); + +struct smbios_table_type17 smbios_type17_template = { + { SMBIOS_TYPE_MEMDEVICE, sizeof (struct smbios_table_type17), 0 }, + -1, /* handle of physical memory array */ + -1, /* handle of memory error data */ + 64, /* total width in bits including ecc */ + 64, /* data width in bits */ + 0x7fff, /* size in bytes (0x7fff=use extended)*/ + SMBIOS_MDFF_UNKNOWN, + 0, /* set (0x00=none, 0xff=unknown) */ + 1, /* device locator string */ + 2, /* physical bank locator string */ + SMBIOS_MDT_UNKNOWN, + SMBIOS_MDF_UNKNOWN, + 0, /* maximum memory speed in mhz (0=unknown) */ + 3, /* manufacturer string */ + 4, /* serial number string */ + 5, /* asset tag string */ + 6, /* part number string */ + 0, /* attributes (0=unknown rank information) */ + 0, /* extended size in mb (TBD) */ + 0, /* current speed in mhz (0=unknown) */ + 0, /* minimum voltage in mv (0=unknown) */ + 0, /* maximum voltage in mv (0=unknown) */ + 0 /* configured voltage in mv (0=unknown) */ +}; + +const char *smbios_type17_strings[] = { + " ", /* device locator string */ + " ", /* physical bank locator string */ + " ", /* manufacturer string */ + "None", /* serial number string */ + "None", /* asset tag string */ + "None", /* part number string */ + NULL +}; + +static int smbios_type17_initializer(struct smbios_structure *template_entry, + const char **template_strings, char *curaddr, char **endaddr, + uint16_t *n, uint16_t *size); + +struct smbios_table_type19 smbios_type19_template = { + { SMBIOS_TYPE_MEMARRAYMAP, sizeof (struct smbios_table_type19), 0 }, + 0xffffffff, /* starting phys addr in kb (0xffffffff=use ext) */ + 0xffffffff, /* ending phys addr in kb (0xffffffff=use ext) */ + -1, /* physical memory array handle */ + 1, /* number of devices that form a row */ + 0, /* extended starting phys addr in bytes (TDB) */ + 0 /* extended ending phys addr in bytes (TDB) */ +}; + +static int smbios_type19_initializer(struct smbios_structure *template_entry, + const char **template_strings, char *curaddr, char **endaddr, + uint16_t *n, uint16_t *size); + +struct smbios_table_type32 smbios_type32_template = { + { SMBIOS_TYPE_BOOT, sizeof (struct smbios_table_type32), 0 }, + { 0, 0, 0, 0, 0, 0 }, + SMBIOS_BOOT_NORMAL +}; + +struct smbios_table_type127 smbios_type127_template = { + { SMBIOS_TYPE_EOT, sizeof (struct smbios_table_type127), 0 } +}; + +static int smbios_generic_initializer(struct smbios_structure *template_entry, + const char **template_strings, char *curaddr, char **endaddr, + uint16_t *n, uint16_t *size); + +static struct smbios_template_entry smbios_template[] = { + { (struct smbios_structure *)&smbios_type0_template, + smbios_type0_strings, + smbios_generic_initializer }, + { (struct smbios_structure *)&smbios_type1_template, + smbios_type1_strings, + smbios_type1_initializer }, + { (struct smbios_structure *)&smbios_type3_template, + smbios_type3_strings, + smbios_generic_initializer }, + { (struct smbios_structure *)&smbios_type4_template, + smbios_type4_strings, + smbios_type4_initializer }, + { (struct smbios_structure *)&smbios_type16_template, + NULL, + smbios_type16_initializer }, + { (struct smbios_structure *)&smbios_type17_template, + smbios_type17_strings, + smbios_type17_initializer }, + { (struct smbios_structure *)&smbios_type19_template, + NULL, + smbios_type19_initializer }, + { (struct smbios_structure *)&smbios_type32_template, + NULL, + smbios_generic_initializer }, + { (struct smbios_structure *)&smbios_type127_template, + NULL, + smbios_generic_initializer }, + { NULL,NULL, NULL } +}; + +static uint64_t guest_lomem, guest_himem; +static uint16_t type16_handle; + +static int +smbios_generic_initializer(struct smbios_structure *template_entry, + const char **template_strings, char *curaddr, char **endaddr, + uint16_t *n, uint16_t *size) +{ + struct smbios_structure *entry; + + memcpy(curaddr, template_entry, template_entry->length); + entry = (struct smbios_structure *)curaddr; + entry->handle = *n + 1; + curaddr += entry->length; + if (template_strings != NULL) { + int i; + + for (i = 0; template_strings[i] != NULL; i++) { + const char *string; + int len; + + string = template_strings[i]; + len = strlen(string) + 1; + memcpy(curaddr, string, len); + curaddr += len; + } + *curaddr = '\0'; + curaddr++; + } else { + /* Minimum string section is double nul */ + *curaddr = '\0'; + curaddr++; + *curaddr = '\0'; + curaddr++; + } + (*n)++; + *endaddr = curaddr; + + return (0); +} + +static int +smbios_type1_initializer(struct smbios_structure *template_entry, + const char **template_strings, char *curaddr, char **endaddr, + uint16_t *n, uint16_t *size) +{ + struct smbios_table_type1 *type1; + + smbios_generic_initializer(template_entry, template_strings, + curaddr, endaddr, n, size); + type1 = (struct smbios_table_type1 *)curaddr; + + if (guest_uuid_str != NULL) { + uuid_t uuid; + uint32_t status; + + uuid_from_string(guest_uuid_str, &uuid, &status); + if (status != uuid_s_ok) + return (-1); + + uuid_enc_le(&type1->uuid, &uuid); + } else { + MD5_CTX mdctx; + u_char digest[16]; + char hostname[MAXHOSTNAMELEN]; + + /* + * Universally unique and yet reproducible are an + * oxymoron, however reproducible is desirable in + * this case. + */ + if (gethostname(hostname, sizeof(hostname))) + return (-1); + + MD5Init(&mdctx); + MD5Update(&mdctx, vmname, strlen(vmname)); + MD5Update(&mdctx, hostname, sizeof(hostname)); + MD5Final(digest, &mdctx); + + /* + * Set the variant and version number. + */ + digest[6] &= 0x0F; + digest[6] |= 0x30; /* version 3 */ + digest[8] &= 0x3F; + digest[8] |= 0x80; + + memcpy(&type1->uuid, digest, sizeof (digest)); + } + + return (0); +} + +static int +smbios_type4_initializer(struct smbios_structure *template_entry, + const char **template_strings, char *curaddr, char **endaddr, + uint16_t *n, uint16_t *size) +{ + int i; + + for (i = 0; i < guest_ncpus; i++) { + struct smbios_table_type4 *type4; + char *p; + int nstrings, len; + + smbios_generic_initializer(template_entry, template_strings, + curaddr, endaddr, n, size); + type4 = (struct smbios_table_type4 *)curaddr; + p = curaddr + sizeof (struct smbios_table_type4); + nstrings = 0; + while (p < *endaddr - 1) { + if (*p++ == '\0') + nstrings++; + } + len = sprintf(*endaddr - 1, "CPU #%d", i) + 1; + *endaddr += len - 1; + *(*endaddr) = '\0'; + (*endaddr)++; + type4->socket = nstrings + 1; + curaddr = *endaddr; + } + + return (0); +} + +static int +smbios_type16_initializer(struct smbios_structure *template_entry, + const char **template_strings, char *curaddr, char **endaddr, + uint16_t *n, uint16_t *size) +{ + struct smbios_table_type16 *type16; + + type16_handle = *n; + smbios_generic_initializer(template_entry, template_strings, + curaddr, endaddr, n, size); + type16 = (struct smbios_table_type16 *)curaddr; + type16->xsize = guest_lomem + guest_himem; + type16->ndevs = guest_himem > 0 ? 2 : 1; + + return (0); +} + +static int +smbios_type17_initializer(struct smbios_structure *template_entry, + const char **template_strings, char *curaddr, char **endaddr, + uint16_t *n, uint16_t *size) +{ + struct smbios_table_type17 *type17; + + smbios_generic_initializer(template_entry, template_strings, + curaddr, endaddr, n, size); + type17 = (struct smbios_table_type17 *)curaddr; + type17->arrayhand = type16_handle; + type17->xsize = guest_lomem; + + if (guest_himem > 0) { + curaddr = *endaddr; + smbios_generic_initializer(template_entry, template_strings, + curaddr, endaddr, n, size); + type17 = (struct smbios_table_type17 *)curaddr; + type17->arrayhand = type16_handle; + type17->xsize = guest_himem; + } + + return (0); +} + +static int +smbios_type19_initializer(struct smbios_structure *template_entry, + const char **template_strings, char *curaddr, char **endaddr, + uint16_t *n, uint16_t *size) +{ + struct smbios_table_type19 *type19; + + smbios_generic_initializer(template_entry, template_strings, + curaddr, endaddr, n, size); + type19 = (struct smbios_table_type19 *)curaddr; + type19->arrayhand = type16_handle; + type19->xsaddr = 0; + type19->xeaddr = guest_lomem; + + if (guest_himem > 0) { + curaddr = *endaddr; + smbios_generic_initializer(template_entry, template_strings, + curaddr, endaddr, n, size); + type19 = (struct smbios_table_type19 *)curaddr; + type19->arrayhand = type16_handle; + type19->xsaddr = 4*GB; + type19->xeaddr = guest_himem; + } + + return (0); +} + +static void +smbios_ep_initializer(struct smbios_entry_point *smbios_ep, uint32_t staddr) +{ + memset(smbios_ep, 0, sizeof(*smbios_ep)); + memcpy(smbios_ep->eanchor, SMBIOS_ENTRY_EANCHOR, + SMBIOS_ENTRY_EANCHORLEN); + smbios_ep->eplen = 0x1F; + assert(sizeof (struct smbios_entry_point) == smbios_ep->eplen); + smbios_ep->major = 2; + smbios_ep->minor = 4; + smbios_ep->revision = 0; + memcpy(smbios_ep->ianchor, SMBIOS_ENTRY_IANCHOR, + SMBIOS_ENTRY_IANCHORLEN); + smbios_ep->staddr = staddr; + smbios_ep->bcdrev = 0x24; +} + +static void +smbios_ep_finalizer(struct smbios_entry_point *smbios_ep, uint16_t len, + uint16_t num, uint16_t maxssize) +{ + uint8_t checksum; + int i; + + smbios_ep->maxssize = maxssize; + smbios_ep->stlen = len; + smbios_ep->stnum = num; + + checksum = 0; + for (i = 0x10; i < 0x1f; i++) { + checksum -= ((uint8_t *)smbios_ep)[i]; + } + smbios_ep->ichecksum = checksum; + + checksum = 0; + for (i = 0; i < 0x1f; i++) { + checksum -= ((uint8_t *)smbios_ep)[i]; + } + smbios_ep->echecksum = checksum; +} + +int +smbios_build(struct vmctx *ctx) +{ + struct smbios_entry_point *smbios_ep; + uint16_t n; + uint16_t maxssize; + char *curaddr, *startaddr, *ststartaddr; + int i; + int err; + + err = vm_get_memory_seg(ctx, 0, &guest_lomem, NULL); + if (err != 0) + return (err); + + err = vm_get_memory_seg(ctx, 4*GB, &guest_himem, NULL); + if (err != 0) + return (err); + + startaddr = paddr_guest2host(ctx, SMBIOS_BASE, SMBIOS_MAX_LENGTH); + if (startaddr == NULL) { + fprintf(stderr, "smbios table requires mapped mem\n"); + return (ENOMEM); + } + + curaddr = startaddr; + + smbios_ep = (struct smbios_entry_point *)curaddr; + smbios_ep_initializer(smbios_ep, SMBIOS_BASE + + sizeof(struct smbios_entry_point)); + curaddr += sizeof(struct smbios_entry_point); + ststartaddr = curaddr; + + n = 0; + maxssize = 0; + for (i = 0; smbios_template[i].entry != NULL; i++) { + struct smbios_structure *entry; + const char **strings; + initializer_func_t initializer; + char *endaddr; + uint16_t size; + + entry = smbios_template[i].entry; + strings = smbios_template[i].strings; + initializer = smbios_template[i].initializer; + + err = (*initializer)(entry, strings, curaddr, &endaddr, + &n, &size); + if (err != 0) + return (err); + + if (size > maxssize) + maxssize = size; + + curaddr = endaddr; + } + + assert(curaddr - startaddr < SMBIOS_MAX_LENGTH); + smbios_ep_finalizer(smbios_ep, curaddr - ststartaddr, n, maxssize); + + return (0); +} Copied: stable/10/usr.sbin/bhyve/smbiostbl.h (from r262744, head/usr.sbin/bhyve/smbiostbl.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.sbin/bhyve/smbiostbl.h Fri Jun 13 21:30:40 2014 (r267450, copy of r262744, head/usr.sbin/bhyve/smbiostbl.h) @@ -0,0 +1,36 @@ +/*- + * Copyright (c) 2014 Tycho Nightingale + * All rights reserved. + * + * 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 ``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. + * + * $FreeBSD$ + */ + +#ifndef _SMBIOSTBL_H_ +#define _SMBIOSTBL_H_ + +struct vmctx; + +int smbios_build(struct vmctx *ctx); + +#endif /* _SMBIOSTBL_H_ */ From owner-svn-src-stable@FreeBSD.ORG Fri Jun 13 21:52:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5FC15759 for ; Fri, 13 Jun 2014 21:52:13 +0000 (UTC) Received: from mail-ie0-f179.google.com (mail-ie0-f179.google.com [209.85.223.179]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 240B72A25 for ; Fri, 13 Jun 2014 21:52:12 +0000 (UTC) Received: by mail-ie0-f179.google.com with SMTP id tr6so3051542ieb.10 for ; Fri, 13 Jun 2014 14:52:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=j4TKs4DAtpgMw2gI/OYDbdRy+YNhPJkf4zUvebuLl9A=; b=MMz4EnwcQZXm84FSslJJ2XkJeWewT8bLbDZmYtlAumjCmShh7iWXbDcgUkHfrXHbcg sW8MNl/5/8rnEHXkMFJ6sd5brOlqneWSvGfkoMBfKUZsyaTKWfXN8WASiFKEL1QrWfYo Jpu+wp+yrUTsBdZBitttchr7sE/s9h+E0MUNmyJ1DpACIVq4Bd6brLkA7BO74+JTyxPX q/hjHTUa0nu7y+6PuN8mSJPRUkdbfUtik+4tZ0d6UfnzVijSOuq+q2JKXrLiq1ejtgtP 1UIlerlez1135dGHaPvfTieAxSUmebxpg0XKauEAbkrvu8Iqy1bDrtYOJ+J4gRBJOcDQ 8yMg== X-Gm-Message-State: ALoCoQl2rjmYuO6mKccxEyhHeFbfNVc+VQkEzNGSAdjAdWdvb3vtrVyQzQ9+gMfnAZlJj3r4ztn+ X-Received: by 10.43.160.69 with SMTP id mb5mr6100130icc.49.1402696332274; Fri, 13 Jun 2014 14:52:12 -0700 (PDT) Received: from [10.0.0.119] (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPSA id c5sm6181577ign.1.2014.06.13.14.52.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Jun 2014 14:52:11 -0700 (PDT) Sender: Warner Losh Content-Type: multipart/signed; boundary="Apple-Mail=_A14F6696-FF56-4BE1-8FB5-BE6FEE5060DF"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) Subject: Re: svn commit: r267107 - stable/10/sys/i386/conf From: Warner Losh In-Reply-To: <20140607214835.GH679@alchemy.franken.de> Date: Fri, 13 Jun 2014 15:52:12 -0600 Message-Id: <4F65442A-DAF8-4C76-A5A5-802C3EF51769@bsdimp.com> References: <201406051308.s55D88mM053472@svn.freebsd.org> <652C13FA-F367-4884-BF65-2692E7614F93@gmail.com> <20140607214835.GH679@alchemy.franken.de> To: Marius Strobl X-Mailer: Apple Mail (2.1878.2) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jun 2014 21:52:13 -0000 --Apple-Mail=_A14F6696-FF56-4BE1-8FB5-BE6FEE5060DF Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Jun 7, 2014, at 3:48 PM, Marius Strobl = wrote: > On Sat, Jun 07, 2014 at 09:23:47AM -0600, Warner Losh wrote: >> Why? There should be no -gdwarf-2 in the tree, that was a workaround = that has since been obsoleted by (a) -g automatically changes to this in = the makefile system and (b) the default was reverted back to dwarf 2. = This wasn?t a mismerge, but an intentional fix. >=20 > Because despite what you say, -gdwarf-2 actually still is in stable/9 = and > stable/10 as of now: > marius@alchemy:/home/marius/co > grep -l -- -gdwarf-2 = {9,10}/src/sys/*/conf/* > 9/src/sys/amd64/conf/GENERIC > 9/src/sys/i386/conf/GENERIC > 9/src/sys/i386/conf/XEN > 9/src/sys/sparc64/conf/GENERIC > 10/src/sys/amd64/conf/GENERIC > 10/src/sys/i386/conf/GENERIC > 10/src/sys/i386/conf/XEN > 10/src/sys/sparc64/conf/GENERIC >=20 > And also because replacing -gdwarf-2 with -g just wasn't part of = r266820, > doing the former when MFCing that revision as r267049 simply was a = mismerge > on my part. > Apart from these I'm fully aware that -gdwarf-2 was/is only transient, = but > we're just not fully back to -g, yet. Oh, yea, the MFC issue=85. Yea, you=92re right. That mess hasn=92t been = sorted out yet :( I=92ll sort 10 out this weekend and 9 out after 9.3, = per the RE=92s request. Warner --Apple-Mail=_A14F6696-FF56-4BE1-8FB5-BE6FEE5060DF Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJTm3KMAAoJEGwc0Sh9sBEA6NcQANVFeturtIh7VWwCMOYL16QW hlIk2zz/spCwaNosO4dSZIUQhK7EI3E5rxsunJPYNQ+tw7FNxsWt/Z+nCbU8wq/G 9uga+LaM+wrNnDEJ6thxq/aKHpHK3Fnm+sE7gjHTmRLJR/nFnBZ96QjgaX+fnlbQ DDDNg03zuwMlpTm996tBv0MTTkhcuhcdoZXSuviC4ntJ0RzbgpB7LdZerl2dGmAR OGKcdr0Hg3Kp8nPyslIby1Ek4IRGEpL4Ud6xUFs9HPZJCBpPnYj/CKH1tQ1YzWFX l9gDCll6ChQzpkjgjNyx9qQ2AGHhjra4manaoVTCkoVZi9zG4/ylAaRdc1XCP+fE urmmDz1Bmm60dypE9x28q+0uIrZ81vgo5bsvCeSelO7Uow4k1FCWlpCoMlJX1X2a iabUhalu2nn2v/3BgAw+vp1PJqstlMy4gm2vywhNz7pdUw6V/kR4VO1yCnVZSkeQ tJ/xAlXTd8vvqtVYf6O/isSdKMFLv+lONotB3DjvbpwwAljLhhuvcytZZEblOGoH d0XCWhYoLyehVw+/Zoqdx/lYJ3oCpS6ctyGE0agCBojStKyoY2u7tBIzkyrctOy4 riLUi4C/2X2bE/4YBbbDLK0XACFYJrqiI0hbL5W/N//t+AAHAyYAlNsXYWYEI1s+ TtYX0bQ9M/FaToK8G7x6 =QO7C -----END PGP SIGNATURE----- --Apple-Mail=_A14F6696-FF56-4BE1-8FB5-BE6FEE5060DF-- From owner-svn-src-stable@FreeBSD.ORG Sat Jun 14 00:18:17 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E3E8D307; Sat, 14 Jun 2014 00:18:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B796A25D5; Sat, 14 Jun 2014 00:18:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5E0IH37012069; Sat, 14 Jun 2014 00:18:17 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5E0IHbL012068; Sat, 14 Jun 2014 00:18:17 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201406140018.s5E0IHbL012068@svn.freebsd.org> From: Edwin Groothuis Date: Sat, 14 Jun 2014 00:18:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org Subject: svn commit: r267456 - stable/6/share/zoneinfo X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jun 2014 00:18:18 -0000 Author: edwin Date: Sat Jun 14 00:18:17 2014 New Revision: 267456 URL: http://svnweb.freebsd.org/changeset/base/267456 Log: MFC of tzdata2014e Fix historical data for Egypt. Better prediction for future Egypt / Morocco changes. Update to Cocos / Cook islands. Fix historical data for Russia. Modified: Directory Properties: stable/6/share/zoneinfo/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Sat Jun 14 00:44:59 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4626082E; Sat, 14 Jun 2014 00:44:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2770527C9; Sat, 14 Jun 2014 00:44:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5E0ixax025143; Sat, 14 Jun 2014 00:44:59 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5E0iw6M025138; Sat, 14 Jun 2014 00:44:58 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201406140044.s5E0iw6M025138@svn.freebsd.org> From: Xin LI Date: Sat, 14 Jun 2014 00:44:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267457 - in stable/10/sys/dev: hpt27xx hptmv hptrr X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jun 2014 00:44:59 -0000 Author: delphij Date: Sat Jun 14 00:44:57 2014 New Revision: 267457 URL: http://svnweb.freebsd.org/changeset/base/267457 Log: MFC r267368: Apply vendor fixes to the High Point drivers: - Don't call xpt_free_path() in os_query_remove_device() and always return TRUE. - Update os_buildsgl() to support build logical SG table which will be used by lower RAID module. - Return CAM_SEL_TIMEOUTstatus for SCSIcommand failed as target missing. Many thanks to HighPoint for providing this driver update. Submitted by: Steve Chang Reviewed by: mav Modified: stable/10/sys/dev/hpt27xx/hpt27xx_os_bsd.c stable/10/sys/dev/hpt27xx/hpt27xx_osm_bsd.c stable/10/sys/dev/hptmv/entry.c stable/10/sys/dev/hptrr/hptrr_os_bsd.c stable/10/sys/dev/hptrr/hptrr_osm_bsd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hpt27xx/hpt27xx_os_bsd.c ============================================================================== --- stable/10/sys/dev/hpt27xx/hpt27xx_os_bsd.c Sat Jun 14 00:18:17 2014 (r267456) +++ stable/10/sys/dev/hpt27xx/hpt27xx_os_bsd.c Sat Jun 14 00:44:57 2014 (r267457) @@ -324,21 +324,7 @@ int os_revalidate_device(void *osext, in int os_query_remove_device(void *osext, int id) { - PVBUS_EXT vbus_ext = (PVBUS_EXT)osext; - struct cam_periph *periph = NULL; - struct cam_path *path; - int status,retval = 0; - - status = xpt_create_path(&path, NULL, vbus_ext->sim->path_id, id, 0); - if (status == CAM_REQ_CMP) { - if((periph = cam_periph_find(path, "da")) != NULL){ - if(periph->refcount >= 1) - retval = -1; - } - xpt_free_path(path); - } - - return retval; + return 0; } HPT_U8 os_get_vbus_seq(void *osext) Modified: stable/10/sys/dev/hpt27xx/hpt27xx_osm_bsd.c ============================================================================== --- stable/10/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Sat Jun 14 00:18:17 2014 (r267456) +++ stable/10/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Sat Jun 14 00:44:57 2014 (r267457) @@ -474,6 +474,16 @@ static void os_cmddone(PCOMMAND pCmd) static int os_buildsgl(PCOMMAND pCmd, PSG pSg, int logical) { + POS_CMDEXT ext = (POS_CMDEXT)pCmd->priv; + union ccb *ccb = ext->ccb; + + if (logical) { + os_set_sgptr(pSg, (HPT_U8 *)ccb->csio.data_ptr); + pSg->size = ccb->csio.dxfer_len; + pSg->eot = 1; + return TRUE; + } + /* since we have provided physical sg, nobody will ask us to build physical sg */ HPT_ASSERT(0); return FALSE; @@ -546,7 +556,7 @@ static void hpt_scsi_io(PVBUS_EXT vbus_e vd = ldm_find_target(vbus, ccb->ccb_h.target_id); if (!vd) { - ccb->ccb_h.status = CAM_TID_INVALID; + ccb->ccb_h.status = CAM_SEL_TIMEOUT; xpt_done(ccb); return; } Modified: stable/10/sys/dev/hptmv/entry.c ============================================================================== --- stable/10/sys/dev/hptmv/entry.c Sat Jun 14 00:18:17 2014 (r267456) +++ stable/10/sys/dev/hptmv/entry.c Sat Jun 14 00:44:57 2014 (r267457) @@ -2016,7 +2016,7 @@ hpt_probe(device_t dev) { KdPrintI((CONTROLLER_NAME " found\n")); device_set_desc(dev, CONTROLLER_NAME); - return 0; + return (BUS_PROBE_DEFAULT); } else return(ENXIO); @@ -2623,7 +2623,14 @@ launch_worker_thread(void) int HPTLIBAPI fOsBuildSgl(_VBUS_ARG PCommand pCmd, FPSCAT_GATH pSg, int logical) { - + union ccb *ccb = (union ccb *)pCmd->pOrgCommand; + + if (logical) { + pSg->dSgAddress = (ULONG_PTR)(UCHAR *)ccb->csio.data_ptr; + pSg->wSgSize = ccb->csio.dxfer_len; + pSg->wSgFlag = SG_FLAG_EOT; + return TRUE; + } /* since we have provided physical sg, nobody will ask us to build physical sg */ HPT_ASSERT(0); return FALSE; Modified: stable/10/sys/dev/hptrr/hptrr_os_bsd.c ============================================================================== --- stable/10/sys/dev/hptrr/hptrr_os_bsd.c Sat Jun 14 00:18:17 2014 (r267456) +++ stable/10/sys/dev/hptrr/hptrr_os_bsd.c Sat Jun 14 00:44:57 2014 (r267457) @@ -256,21 +256,7 @@ int os_revalidate_device(void *osext, in int os_query_remove_device(void *osext, int id) { - PVBUS_EXT vbus_ext = (PVBUS_EXT)osext; - struct cam_periph *periph = NULL; - struct cam_path *path; - int status,retval = 0; - - status = xpt_create_path(&path, NULL, vbus_ext->sim->path_id, id, 0); - if (status == CAM_REQ_CMP) { - if((periph = cam_periph_find(path, "da")) != NULL){ - if(periph->refcount >= 1) - retval = -1; - } - xpt_free_path(path); - } - - return retval; + return 0; } HPT_U8 os_get_vbus_seq(void *osext) Modified: stable/10/sys/dev/hptrr/hptrr_osm_bsd.c ============================================================================== --- stable/10/sys/dev/hptrr/hptrr_osm_bsd.c Sat Jun 14 00:18:17 2014 (r267456) +++ stable/10/sys/dev/hptrr/hptrr_osm_bsd.c Sat Jun 14 00:44:57 2014 (r267457) @@ -61,7 +61,7 @@ static int hpt_probe(device_t dev) memset(hba, 0, sizeof(HBA)); hba->ext_type = EXT_TYPE_HBA; hba->ldm_adapter.him = him; - return 0; + return (BUS_PROBE_DEFAULT); } } } @@ -482,6 +482,15 @@ static void os_cmddone(PCOMMAND pCmd) static int os_buildsgl(PCOMMAND pCmd, PSG pSg, int logical) { + POS_CMDEXT ext = (POS_CMDEXT)pCmd->priv; + union ccb *ccb = ext->ccb; + + if (logical) { + os_set_sgptr(pSg, (HPT_U8 *)ccb->csio.data_ptr); + pSg->size = ccb->csio.dxfer_len; + pSg->eot = 1; + return TRUE; + } /* since we have provided physical sg, nobody will ask us to build physical sg */ HPT_ASSERT(0); @@ -555,7 +564,7 @@ static void hpt_scsi_io(PVBUS_EXT vbus_e vd = ldm_find_target(vbus, ccb->ccb_h.target_id); if (!vd) { - ccb->ccb_h.status = CAM_TID_INVALID; + ccb->ccb_h.status = CAM_SEL_TIMEOUT; xpt_done(ccb); return; } From owner-svn-src-stable@FreeBSD.ORG Sat Jun 14 00:54:59 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 21C99A5F; Sat, 14 Jun 2014 00:54:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 043232887; Sat, 14 Jun 2014 00:54:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5E0swAN029630; Sat, 14 Jun 2014 00:54:58 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5E0sw3A029625; Sat, 14 Jun 2014 00:54:58 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201406140054.s5E0sw3A029625@svn.freebsd.org> From: Xin LI Date: Sat, 14 Jun 2014 00:54:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267458 - in stable/9/sys/dev: hpt27xx hptmv hptrr X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jun 2014 00:54:59 -0000 Author: delphij Date: Sat Jun 14 00:54:57 2014 New Revision: 267458 URL: http://svnweb.freebsd.org/changeset/base/267458 Log: MFC r267368: Apply vendor fixes to the High Point drivers: - Don't call xpt_free_path() in os_query_remove_device() and always return TRUE. - Update os_buildsgl() to support build logical SG table which will be used by lower RAID module. - Return CAM_SEL_TIMEOUTstatus for SCSIcommand failed as target missing. Many thanks to HighPoint for providing this driver update. Submitted by: Steve Chang Reviewed by: mav Approved by: re (gjb) Modified: stable/9/sys/dev/hpt27xx/hpt27xx_os_bsd.c stable/9/sys/dev/hpt27xx/hpt27xx_osm_bsd.c stable/9/sys/dev/hptmv/entry.c stable/9/sys/dev/hptrr/hptrr_os_bsd.c stable/9/sys/dev/hptrr/hptrr_osm_bsd.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/hpt27xx/hpt27xx_os_bsd.c ============================================================================== --- stable/9/sys/dev/hpt27xx/hpt27xx_os_bsd.c Sat Jun 14 00:44:57 2014 (r267457) +++ stable/9/sys/dev/hpt27xx/hpt27xx_os_bsd.c Sat Jun 14 00:54:57 2014 (r267458) @@ -324,21 +324,7 @@ int os_revalidate_device(void *osext, in int os_query_remove_device(void *osext, int id) { - PVBUS_EXT vbus_ext = (PVBUS_EXT)osext; - struct cam_periph *periph = NULL; - struct cam_path *path; - int status,retval = 0; - - status = xpt_create_path(&path, NULL, vbus_ext->sim->path_id, id, 0); - if (status == CAM_REQ_CMP) { - if((periph = cam_periph_find(path, "da")) != NULL){ - if(periph->refcount >= 1) - retval = -1; - } - xpt_free_path(path); - } - - return retval; + return 0; } HPT_U8 os_get_vbus_seq(void *osext) Modified: stable/9/sys/dev/hpt27xx/hpt27xx_osm_bsd.c ============================================================================== --- stable/9/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Sat Jun 14 00:44:57 2014 (r267457) +++ stable/9/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Sat Jun 14 00:54:57 2014 (r267458) @@ -474,6 +474,16 @@ static void os_cmddone(PCOMMAND pCmd) static int os_buildsgl(PCOMMAND pCmd, PSG pSg, int logical) { + POS_CMDEXT ext = (POS_CMDEXT)pCmd->priv; + union ccb *ccb = ext->ccb; + + if (logical) { + os_set_sgptr(pSg, (HPT_U8 *)ccb->csio.data_ptr); + pSg->size = ccb->csio.dxfer_len; + pSg->eot = 1; + return TRUE; + } + /* since we have provided physical sg, nobody will ask us to build physical sg */ HPT_ASSERT(0); return FALSE; @@ -547,7 +557,7 @@ static void hpt_scsi_io(PVBUS_EXT vbus_e vd = ldm_find_target(vbus, ccb->ccb_h.target_id); if (!vd) { - ccb->ccb_h.status = CAM_TID_INVALID; + ccb->ccb_h.status = CAM_SEL_TIMEOUT; xpt_done(ccb); return; } Modified: stable/9/sys/dev/hptmv/entry.c ============================================================================== --- stable/9/sys/dev/hptmv/entry.c Sat Jun 14 00:44:57 2014 (r267457) +++ stable/9/sys/dev/hptmv/entry.c Sat Jun 14 00:54:57 2014 (r267458) @@ -2015,7 +2015,7 @@ hpt_probe(device_t dev) { KdPrintI((CONTROLLER_NAME " found\n")); device_set_desc(dev, CONTROLLER_NAME); - return 0; + return (BUS_PROBE_DEFAULT); } else return(ENXIO); @@ -2622,7 +2622,14 @@ launch_worker_thread(void) int HPTLIBAPI fOsBuildSgl(_VBUS_ARG PCommand pCmd, FPSCAT_GATH pSg, int logical) { - + union ccb *ccb = (union ccb *)pCmd->pOrgCommand; + + if (logical) { + pSg->dSgAddress = (ULONG_PTR)(UCHAR *)ccb->csio.data_ptr; + pSg->wSgSize = ccb->csio.dxfer_len; + pSg->wSgFlag = SG_FLAG_EOT; + return TRUE; + } /* since we have provided physical sg, nobody will ask us to build physical sg */ HPT_ASSERT(0); return FALSE; Modified: stable/9/sys/dev/hptrr/hptrr_os_bsd.c ============================================================================== --- stable/9/sys/dev/hptrr/hptrr_os_bsd.c Sat Jun 14 00:44:57 2014 (r267457) +++ stable/9/sys/dev/hptrr/hptrr_os_bsd.c Sat Jun 14 00:54:57 2014 (r267458) @@ -256,21 +256,7 @@ int os_revalidate_device(void *osext, in int os_query_remove_device(void *osext, int id) { - PVBUS_EXT vbus_ext = (PVBUS_EXT)osext; - struct cam_periph *periph = NULL; - struct cam_path *path; - int status,retval = 0; - - status = xpt_create_path(&path, NULL, vbus_ext->sim->path_id, id, 0); - if (status == CAM_REQ_CMP) { - if((periph = cam_periph_find(path, "da")) != NULL){ - if(periph->refcount >= 1) - retval = -1; - } - xpt_free_path(path); - } - - return retval; + return 0; } HPT_U8 os_get_vbus_seq(void *osext) Modified: stable/9/sys/dev/hptrr/hptrr_osm_bsd.c ============================================================================== --- stable/9/sys/dev/hptrr/hptrr_osm_bsd.c Sat Jun 14 00:44:57 2014 (r267457) +++ stable/9/sys/dev/hptrr/hptrr_osm_bsd.c Sat Jun 14 00:54:57 2014 (r267458) @@ -61,7 +61,7 @@ static int hpt_probe(device_t dev) memset(hba, 0, sizeof(HBA)); hba->ext_type = EXT_TYPE_HBA; hba->ldm_adapter.him = him; - return 0; + return (BUS_PROBE_DEFAULT); } } } @@ -481,6 +481,15 @@ static void os_cmddone(PCOMMAND pCmd) static int os_buildsgl(PCOMMAND pCmd, PSG pSg, int logical) { + POS_CMDEXT ext = (POS_CMDEXT)pCmd->priv; + union ccb *ccb = ext->ccb; + + if (logical) { + os_set_sgptr(pSg, (HPT_U8 *)ccb->csio.data_ptr); + pSg->size = ccb->csio.dxfer_len; + pSg->eot = 1; + return TRUE; + } /* since we have provided physical sg, nobody will ask us to build physical sg */ HPT_ASSERT(0); @@ -554,7 +563,7 @@ static void hpt_scsi_io(PVBUS_EXT vbus_e vd = ldm_find_target(vbus, ccb->ccb_h.target_id); if (!vd) { - ccb->ccb_h.status = CAM_TID_INVALID; + ccb->ccb_h.status = CAM_SEL_TIMEOUT; xpt_done(ccb); return; } From owner-svn-src-stable@FreeBSD.ORG Sat Jun 14 01:32:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9FF8679; Sat, 14 Jun 2014 01:32:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6F3C2B6E; Sat, 14 Jun 2014 01:32:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5E1Wmnq048285; Sat, 14 Jun 2014 01:32:48 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5E1Wm1s048284; Sat, 14 Jun 2014 01:32:48 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201406140132.s5E1Wm1s048284@svn.freebsd.org> From: Ed Maste Date: Sat, 14 Jun 2014 01:32:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267463 - stable/9/usr.sbin/daemon X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jun 2014 01:32:49 -0000 Author: emaste Date: Sat Jun 14 01:32:48 2014 New Revision: 267463 URL: http://svnweb.freebsd.org/changeset/base/267463 Log: MFC r264194: fix handling of -P without -p or -r Fork a child process and wait until the process terminates when the -P option is specified. This behavior is documented on the manual page. PR: 187265, 190643 Approved by: re Modified: stable/9/usr.sbin/daemon/daemon.c Directory Properties: stable/9/usr.sbin/daemon/ (props changed) Modified: stable/9/usr.sbin/daemon/daemon.c ============================================================================== --- stable/9/usr.sbin/daemon/daemon.c Sat Jun 14 01:24:22 2014 (r267462) +++ stable/9/usr.sbin/daemon/daemon.c Sat Jun 14 01:32:48 2014 (r267463) @@ -139,7 +139,7 @@ main(int argc, char *argv[]) * get SIGCHLD eventually. */ pid = -1; - if (pidfile != NULL || restart) { + if (pidfile != NULL || ppidfile != NULL || restart) { /* * Restore default action for SIGTERM in case the * parent process decided to ignore it. From owner-svn-src-stable@FreeBSD.ORG Sat Jun 14 02:57:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3700C3C7; Sat, 14 Jun 2014 02:57:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 228852104; Sat, 14 Jun 2014 02:57:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5E2vgkk084914; Sat, 14 Jun 2014 02:57:42 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5E2veqD084908; Sat, 14 Jun 2014 02:57:40 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201406140257.s5E2veqD084908@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sat, 14 Jun 2014 02:57:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267465 - in stable/10: include include/xlocale lib/libc/string sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jun 2014 02:57:42 -0000 Author: pfg Date: Sat Jun 14 02:57:40 2014 New Revision: 267465 URL: http://svnweb.freebsd.org/changeset/base/267465 Log: MFC r266865; Fix strcasecmp_l() and strncasecmp_l() POSIX 2008 compliance. POSIX.1-2008 specifies that those two functions should be declared by including , not (the latter only has strcoll_l() and strxfrm_l()): http://pubs.opengroup.org/onlinepubs/9699919799/functions/strcasecmp.html Bump __FreeBSD_version for ports that may be using the non-standard reference. Obtained from: DragonFlyBSD Reviewed by: theraven Added: stable/10/include/xlocale/_strings.h - copied unchanged from r266865, head/include/xlocale/_strings.h Modified: stable/10/include/strings.h stable/10/include/xlocale/Makefile stable/10/include/xlocale/_string.h stable/10/lib/libc/string/strcasecmp.3 stable/10/sys/sys/param.h Modified: stable/10/include/strings.h ============================================================================== --- stable/10/include/strings.h Sat Jun 14 01:58:33 2014 (r267464) +++ stable/10/include/strings.h Sat Jun 14 02:57:40 2014 (r267465) @@ -59,6 +59,10 @@ char *rindex(const char *, int) __pure; #endif int strcasecmp(const char *, const char *) __pure; int strncasecmp(const char *, const char *, size_t) __pure; + +#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) +#include +#endif __END_DECLS #endif /* _STRINGS_H_ */ Modified: stable/10/include/xlocale/Makefile ============================================================================== --- stable/10/include/xlocale/Makefile Sat Jun 14 01:58:33 2014 (r267464) +++ stable/10/include/xlocale/Makefile Sat Jun 14 02:57:40 2014 (r267465) @@ -2,7 +2,7 @@ NO_OBJ= INCS= _ctype.h _inttypes.h _langinfo.h _locale.h _monetary.h _stdio.h\ - _stdlib.h _string.h _time.h _uchar.h _wchar.h + _stdlib.h _string.h _strings.h _time.h _uchar.h _wchar.h INCSDIR=${INCLUDEDIR}/xlocale .include Modified: stable/10/include/xlocale/_string.h ============================================================================== --- stable/10/include/xlocale/_string.h Sat Jun 14 01:58:33 2014 (r267464) +++ stable/10/include/xlocale/_string.h Sat Jun 14 02:57:40 2014 (r267465) @@ -53,9 +53,7 @@ size_t strxfrm_l(char *, const char *, #ifdef _XLOCALE_H_ #ifndef _XLOCALE_STRING2_H #define _XLOCALE_STRING2_H -int strcasecmp_l(const char *, const char *, locale_t); char *strcasestr_l(const char *, const char *, locale_t); -int strncasecmp_l(const char *, const char *, size_t, locale_t); #endif /* _XLOCALE_STRING2_H */ #endif /* _XLOCALE_H_ */ Copied: stable/10/include/xlocale/_strings.h (from r266865, head/include/xlocale/_strings.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/include/xlocale/_strings.h Sat Jun 14 02:57:40 2014 (r267465, copy of r266865, head/include/xlocale/_strings.h) @@ -0,0 +1,48 @@ +/*- + * Copyright (c) 2011, 2012 The FreeBSD Foundation + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +#ifndef _LOCALE_T_DEFINED +#define _LOCALE_T_DEFINED +typedef struct _xlocale *locale_t; +#endif + +/* + * This file is included from both strings.h and xlocale.h. We need to expose + * the declarations unconditionally if we are included from xlocale.h, but only + * if we are in POSIX2008 mode if included from string.h. + */ + +#ifndef _XLOCALE_STRINGS1_H +#define _XLOCALE_STRINGS1_H + +/* + * POSIX2008 functions + */ +int strcasecmp_l(const char *, const char *, locale_t); +int strncasecmp_l(const char *, const char *, size_t, locale_t); +#endif /* _XLOCALE_STRINGS1_H */ Modified: stable/10/lib/libc/string/strcasecmp.3 ============================================================================== --- stable/10/lib/libc/string/strcasecmp.3 Sat Jun 14 01:58:33 2014 (r267464) +++ stable/10/lib/libc/string/strcasecmp.3 Sat Jun 14 02:57:40 2014 (r267465) @@ -30,7 +30,7 @@ .\" @(#)strcasecmp.3 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd June 9, 1993 +.Dd May 29, 2014 .Dt STRCASECMP 3 .Os .Sh NAME @@ -45,7 +45,7 @@ .Fn strcasecmp "const char *s1" "const char *s2" .Ft int .Fn strncasecmp "const char *s1" "const char *s2" "size_t len" -.In string.h +.In strings.h .In xlocale.h .Ft int .Fn strcasecmp_l "const char *s1" "const char *s2" "locale_t loc" Modified: stable/10/sys/sys/param.h ============================================================================== --- stable/10/sys/sys/param.h Sat Jun 14 01:58:33 2014 (r267464) +++ stable/10/sys/sys/param.h Sat Jun 14 02:57:40 2014 (r267465) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1000709 /* Master, propagated to newvers */ +#define __FreeBSD_version 1000710 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-stable@FreeBSD.ORG Sat Jun 14 11:20:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A33785B3; Sat, 14 Jun 2014 11:20:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8DE7126EA; Sat, 14 Jun 2014 11:20:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5EBKfwp020714; Sat, 14 Jun 2014 11:20:41 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5EBKfdV020713; Sat, 14 Jun 2014 11:20:41 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201406141120.s5EBKfdV020713@svn.freebsd.org> From: Dimitry Andric Date: Sat, 14 Jun 2014 11:20:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267470 - stable/10/lib/clang X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jun 2014 11:20:41 -0000 Author: dim Date: Sat Jun 14 11:20:41 2014 New Revision: 267470 URL: http://svnweb.freebsd.org/changeset/base/267470 Log: MFC r267335: In some scenarios, when generating llvm/clang .inc.h files, multiple source files could be passed to tblgen or clang-tblgen, leading to a "Too many positional arguments specified" error message. Fix this by replacing the too-generic ${.ALLSRC} sources with explicit paths. Reported by: rysto32@gmail.com, rodrigc Modified: stable/10/lib/clang/clang.build.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/clang/clang.build.mk ============================================================================== --- stable/10/lib/clang/clang.build.mk Sat Jun 14 11:13:02 2014 (r267469) +++ stable/10/lib/clang/clang.build.mk Sat Jun 14 11:20:41 2014 (r267470) @@ -70,149 +70,160 @@ ${arch:T}Gen${hdr:H:C/$/.inc.h/}: ${LLVM Attrs.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-classes \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrDump.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-dump \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrIdentifierArg.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-identifier-arg-list \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrImpl.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-impl \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrLateParsed.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-late-parsed-list \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrList.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-list \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrParsedAttrImpl.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-parsed-attr-impl \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrParsedAttrKinds.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-parsed-attr-kinds \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrParsedAttrList.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-parsed-attr-list \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrPCHRead.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-pch-read \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrPCHWrite.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-pch-write \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrSpellings.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-spelling-list \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrSpellingListIndex.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-spelling-index \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrTemplateInstantiate.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-template-instantiate \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrTypeArg.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-type-arg-list \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Attr.td CommentCommandInfo.inc.h: ${CLANG_SRCS}/include/clang/AST/CommentCommands.td ${CLANG_TBLGEN} -gen-clang-comment-command-info \ - -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/AST/CommentCommands.td CommentCommandList.inc.h: ${CLANG_SRCS}/include/clang/AST/CommentCommands.td ${CLANG_TBLGEN} -gen-clang-comment-command-list \ - -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/AST/CommentCommands.td CommentHTMLNamedCharacterReferences.inc.h: \ ${CLANG_SRCS}/include/clang/AST/CommentHTMLNamedCharacterReferences.td ${CLANG_TBLGEN} -gen-clang-comment-html-named-character-references \ - -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/AST/CommentHTMLNamedCharacterReferences.td CommentHTMLTags.inc.h: ${CLANG_SRCS}/include/clang/AST/CommentHTMLTags.td ${CLANG_TBLGEN} -gen-clang-comment-html-tags \ - -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/AST/CommentHTMLTags.td CommentHTMLTagsProperties.inc.h: \ ${CLANG_SRCS}/include/clang/AST/CommentHTMLTags.td ${CLANG_TBLGEN} -gen-clang-comment-html-tags-properties \ - -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/AST/CommentHTMLTags.td CommentNodes.inc.h: ${CLANG_SRCS}/include/clang/Basic/CommentNodes.td ${CLANG_TBLGEN} -gen-clang-comment-nodes \ - -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Basic/CommentNodes.td DeclNodes.inc.h: ${CLANG_SRCS}/include/clang/Basic/DeclNodes.td ${CLANG_TBLGEN} -gen-clang-decl-nodes \ - -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Basic/DeclNodes.td StmtNodes.inc.h: ${CLANG_SRCS}/include/clang/Basic/StmtNodes.td ${CLANG_TBLGEN} -gen-clang-stmt-nodes \ - -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Basic/StmtNodes.td arm_neon.h: ${CLANG_SRCS}/include/clang/Basic/arm_neon.td ${CLANG_TBLGEN} -gen-arm-neon \ - -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Basic/arm_neon.td arm_neon.inc.h: ${CLANG_SRCS}/include/clang/Basic/arm_neon.td ${CLANG_TBLGEN} -gen-arm-neon-sema \ - -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Basic/arm_neon.td DiagnosticGroups.inc.h: ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td ${CLANG_TBLGEN} -gen-clang-diag-groups \ -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/\.h$/.d/} \ - -o ${.TARGET} ${.ALLSRC} + -o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td DiagnosticIndexName.inc.h: ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td ${CLANG_TBLGEN} -gen-clang-diags-index-name \ -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/\.h$/.d/} \ - -o ${.TARGET} ${.ALLSRC} + -o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td .for hdr in AST Analysis Comment Common Driver Frontend Lex Parse Sema Serialization Diagnostic${hdr}Kinds.inc.h: ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td ${CLANG_TBLGEN} -gen-clang-diags-defs -clang-component=${hdr} \ -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/\.h$/.d/} \ - -o ${.TARGET} ${.ALLSRC} + -o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td .endfor Options.inc.h: ${CLANG_SRCS}/include/clang/Driver/Options.td ${TBLGEN} -gen-opt-parser-defs \ -I ${LLVM_SRCS}/include -I ${CLANG_SRCS}/include/clang/Driver \ - -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Driver/Options.td CC1AsOptions.inc.h: ${CLANG_SRCS}/include/clang/Driver/CC1AsOptions.td ${TBLGEN} -gen-opt-parser-defs \ -I ${LLVM_SRCS}/include -I ${CLANG_SRCS}/include/clang/Driver \ - -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Driver/CC1AsOptions.td -Checkers.inc.h: ${CLANG_SRCS}/lib/StaticAnalyzer/Checkers/Checkers.td \ - ${CLANG_SRCS}/include/clang/StaticAnalyzer/Checkers/CheckerBase.td +Checkers.inc.h: ${CLANG_SRCS}/lib/StaticAnalyzer/Checkers/Checkers.td ${CLANG_TBLGEN} -gen-clang-sa-checkers \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/lib/StaticAnalyzer/Checkers/Checkers.td From owner-svn-src-stable@FreeBSD.ORG Sat Jun 14 11:36:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 22F34CC8; Sat, 14 Jun 2014 11:36:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E5C92848; Sat, 14 Jun 2014 11:36:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5EBaVxD027262; Sat, 14 Jun 2014 11:36:31 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5EBaUIr027256; Sat, 14 Jun 2014 11:36:30 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201406141136.s5EBaUIr027256@svn.freebsd.org> From: Edwin Groothuis Date: Sat, 14 Jun 2014 11:36:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org Subject: svn commit: r267474 - stable/6/share/zoneinfo X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jun 2014 11:36:31 -0000 Author: edwin Date: Sat Jun 14 11:36:29 2014 New Revision: 267474 URL: http://svnweb.freebsd.org/changeset/base/267474 Log: MFC of i267473,tzdata2013b Fix historical data for Egypt. Better prediction for future Egypt / Morocco changes. Update to Cocos / Cook islands. Fix historical data for Russia. Modified: stable/6/share/zoneinfo/africa stable/6/share/zoneinfo/australasia stable/6/share/zoneinfo/europe stable/6/share/zoneinfo/northamerica Directory Properties: stable/6/share/zoneinfo/ (props changed) Modified: stable/6/share/zoneinfo/africa ============================================================================== --- stable/6/share/zoneinfo/africa Sat Jun 14 11:34:39 2014 (r267473) +++ stable/6/share/zoneinfo/africa Sat Jun 14 11:36:29 2014 (r267474) @@ -239,13 +239,13 @@ Rule Egypt 1990 1994 - May 1 1:00 1:00 # http://www.worldtimezone.com/dst_news/dst_news_egypt04.html # Rule Egypt 1995 2010 - Apr lastFri 0:00s 1:00 S -Rule Egypt 1995 2005 - Sep lastThu 23:00s 0 - +Rule Egypt 1995 2005 - Sep lastThu 24:00 0 - # From Steffen Thorsen (2006-09-19): # The Egyptian Gazette, issue 41,090 (2006-09-18), page 1, reports: # Egypt will turn back clocks by one hour at the midnight of Thursday # after observing the daylight saving time since May. # http://news.gom.com.eg/gazette/pdf/2006/09/18/01.pdf -Rule Egypt 2006 only - Sep 21 23:00s 0 - +Rule Egypt 2006 only - Sep 21 24:00 0 - # From Dirk Losch (2007-08-14): # I received a mail from an airline which says that the daylight # saving time in Egypt will end in the night of 2007-09-06 to 2007-09-07. @@ -254,7 +254,7 @@ Rule Egypt 2006 only - Sep 21 23:00s 0 - # http://www.timeanddate.com/worldclock/city.html?n=53 # From Steffen Thorsen (2007-09-04): The official information...: # http://www.sis.gov.eg/En/EgyptOnline/Miscellaneous/000002/0207000000000000001580.htm -Rule Egypt 2007 only - Sep Thu>=1 23:00s 0 - +Rule Egypt 2007 only - Sep Thu>=1 24:00 0 - # From Abdelrahman Hassan (2007-09-06): # Due to the Hijri (lunar Islamic calendar) year being 11 days shorter # than the year of the Gregorian calendar, Ramadan shifts earlier each @@ -342,46 +342,77 @@ Rule Egypt 2007 only - Sep Thu>=1 23:00s # From Gunther Vermier (2015-05-13): # our Egypt office confirms that the change will be at 15 May "midnight" (24:00) -# From Paul Eggert (2014-05-13): +# From Imed Chihi (2014-06-04): +# We have finally "located" a precise official reference about the DST changes +# in Egypt. The Ministers Cabinet decision is explained at +# http://www.cabinet.gov.eg/Media/CabinetMeetingsDetails.aspx?id=347 ... +# [T]his (Arabic) site is not accessible outside Egypt, but the page ... +# translates into: "With regard to daylight saving time, it is scheduled to +# take effect at exactly twelve o'clock this evening, Thursday, 15 MAY 2014, +# to be suspended by twelve o'clock on the evening of Thursday, 26 JUN 2014, +# and re-established again at the end of the month of Ramadan, at twelve +# o'clock on the evening of Thursday, 31 JUL 2014." This statement has been +# reproduced by other (more accessible) sites[, e.g.,]... +# http://elgornal.net/news/news.aspx?id=4699258 + +# From Paul Eggert (2014-06-04): # Sarah El Deeb and Lee Keath of AP report that the Egyptian government says # the change is because of blackouts in Cairo, even though Ahram Online (cited -# above) says DST had no affect on electricity consumption. The AP story says -# DST will not be observed during Ramadan. There is no information about when -# DST will end. See: +# above) says DST had no affect on electricity consumption. There is +# no information about when DST will end this fall. See: # http://abcnews.go.com/International/wireStory/el-sissi-pushes-egyptians-line-23614833 # -# For now, guess that later transitions will use 2010's rules, and that -# Egypt will agree with Morocco (see below) about the date Ramadan starts and -# ends, though (unlike Morocco) it will switch at 00:00 standard time. In -# Egypt the spring-forward transitions are removed for 2020-2022, when the -# guessed spring-forward date falls during the estimated Ramadan, and all -# transitions removed for 2023-2038, where the estimated Ramadan falls entirely -# outside the guessed daylight-saving time. Ramadan intrudes on the guessed -# DST starting in 2039, but that's beyond our somewhat-arbitrary cutoff. - -Rule Egypt 2008 only - Aug lastThu 23:00s 0 - -Rule Egypt 2009 only - Aug 20 23:00s 0 - -Rule Egypt 2010 only - Aug 11 0:00 0 - -Rule Egypt 2010 only - Sep 10 0:00 1:00 S -Rule Egypt 2010 only - Sep lastThu 23:00s 0 - +# For now, guess that later spring and fall transitions will use +# 2010's rules, and guess that Egypt will switch to standard time at +# 24:00 the last Thursday before Ramadan, and back to DST at 00:00 the +# first Friday after Ramadan. To implement this, +# transition dates for 2015 through 2037 were determined by running +# the following program under GNU Emacs 24.3, with the results integrated +# by hand into the table below. Ramadan again intrudes on the guessed +# DST starting in 2038, but that's beyond our somewhat-arbitrary cutoff. +# (let ((islamic-year 1436)) +# (while (< islamic-year 1460) +# (let ((a (calendar-islamic-to-absolute (list 9 1 islamic-year))) +# (b (calendar-islamic-to-absolute (list 10 1 islamic-year))) +# (friday 5)) +# (while (/= friday (mod a 7)) +# (setq a (1- a))) +# (while (/= friday (mod b 7)) +# (setq b (1+ b))) +# (setq a (1- a)) +# (setq b (1- b)) +# (setq a (calendar-gregorian-from-absolute a)) +# (setq b (calendar-gregorian-from-absolute b)) +# (insert +# (format +# (concat "Rule\tEgypt\t%d\tonly\t-\t%s\t%2d\t24:00\t0\t-\n" +# "Rule\tEgypt\t%d\tonly\t-\t%s\t%2d\t24:00\t1:00\tS\n") +# (car (cdr (cdr a))) (calendar-month-name (car a) t) (car (cdr a)) +# (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b))))) +# (setq islamic-year (+ 1 islamic-year)))) +Rule Egypt 2008 only - Aug lastThu 24:00 0 - +Rule Egypt 2009 only - Aug 20 24:00 0 - +Rule Egypt 2010 only - Aug 10 24:00 0 - +Rule Egypt 2010 only - Sep 9 24:00 1:00 S +Rule Egypt 2010 only - Sep lastThu 24:00 0 - Rule Egypt 2014 only - May 15 24:00 1:00 S -Rule Egypt 2014 only - Jun 29 0:00s 0 - -Rule Egypt 2014 only - Jul 29 0:00s 1:00 S -Rule Egypt 2014 max - Sep lastThu 23:00s 0 - +Rule Egypt 2014 only - Jun 26 24:00 0 - +Rule Egypt 2014 only - Jul 31 24:00 1:00 S +Rule Egypt 2014 max - Sep lastThu 24:00 0 - Rule Egypt 2015 2019 - Apr lastFri 0:00s 1:00 S -Rule Egypt 2015 only - Jun 18 0:00s 0 - -Rule Egypt 2015 only - Jul 18 0:00s 1:00 S -Rule Egypt 2016 only - Jun 7 0:00s 0 - -Rule Egypt 2016 only - Jul 7 0:00s 1:00 S -Rule Egypt 2017 only - May 27 0:00s 0 - -Rule Egypt 2017 only - Jun 26 0:00s 1:00 S -Rule Egypt 2018 only - May 16 0:00s 0 - -Rule Egypt 2018 only - Jun 15 0:00s 1:00 S -Rule Egypt 2019 only - May 6 0:00s 0 - -Rule Egypt 2019 only - Jun 5 0:00s 1:00 S -Rule Egypt 2020 only - May 24 0:00s 1:00 S -Rule Egypt 2021 only - May 13 0:00s 1:00 S -Rule Egypt 2022 only - May 3 0:00s 1:00 S +Rule Egypt 2015 only - Jun 11 24:00 0 - +Rule Egypt 2015 only - Jul 23 24:00 1:00 S +Rule Egypt 2016 only - Jun 2 24:00 0 - +Rule Egypt 2016 only - Jul 7 24:00 1:00 S +Rule Egypt 2017 only - May 25 24:00 0 - +Rule Egypt 2017 only - Jun 29 24:00 1:00 S +Rule Egypt 2018 only - May 10 24:00 0 - +Rule Egypt 2018 only - Jun 14 24:00 1:00 S +Rule Egypt 2019 only - May 2 24:00 0 - +Rule Egypt 2019 only - Jun 6 24:00 1:00 S +Rule Egypt 2020 only - May 28 24:00 1:00 S +Rule Egypt 2021 only - May 13 24:00 1:00 S +Rule Egypt 2022 only - May 5 24:00 1:00 S Rule Egypt 2023 max - Apr lastFri 0:00s 1:00 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -914,39 +945,36 @@ Zone Indian/Mayotte 3:00:56 - LMT 1911 J # From Sebastien Willemijns (2014-03-18): # http://www.afriquinfos.com/articles/2014/3/18/maroc-heure-dete-avancez-tous-horloges-247891.asp -# From Paul Eggert (2014-03-19): -# To estimate what the Moroccan government will do in future years, -# transition dates for 2014 through 2038 were determined by running -# the following program under GNU Emacs 24.3: -# -# (let ((islamic-year 1435)) -# (while (< islamic-year 1461) -# (let ((a -# (calendar-gregorian-from-absolute -# (calendar-islamic-to-absolute (list 9 1 islamic-year)))) -# (b -# (calendar-gregorian-from-absolute -# (calendar-islamic-to-absolute (list 10 1 islamic-year))))) -# (insert -# (format -# (concat "Rule\tMorocco\t%d\tonly\t-\t%s\t %2d\t 3:00\t0\t-\n" -# "Rule\tMorocco\t%d\tonly\t-\t%s\t %2d\t 2:00\t1:00\tS\n") -# (car (cdr (cdr a))) (calendar-month-name (car a) t) (car (cdr a)) -# (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b))))) +# From Milamber Space Network (2014-06-05): +# The Moroccan government has recently announced that the country will return +# to standard time at 03:00 on Saturday, June 28, 2014 local time.... DST +# will resume again at 02:00 on Saturday, August 2, 2014.... +# http://www.mmsp.gov.ma/fr/actualites.aspx?id=586 + +# From Paul Eggert (2014-06-05): +# For now, guess that later spring and fall transitions will use 2014's rules, +# and guess that Morocco will switch to standard time at 03:00 the last +# Saturday before Ramadan, and back to DST at 02:00 the first Saturday after +# Ramadan. To implement this, transition dates for 2015 through 2037 were +# determined by running the following program under GNU Emacs 24.3, with the +# results integrated by hand into the table below. +# (let ((islamic-year 1436)) +# (while (< islamic-year 1460) +# (let ((a (calendar-islamic-to-absolute (list 9 1 islamic-year))) +# (b (calendar-islamic-to-absolute (list 10 1 islamic-year))) +# (saturday 6)) +# (while (/= saturday (mod (setq a (1- a)) 7))) +# (while (/= saturday (mod b 7)) +# (setq b (1+ b))) +# (setq a (calendar-gregorian-from-absolute a)) +# (setq b (calendar-gregorian-from-absolute b)) +# (insert +# (format +# (concat "Rule\tMorocco\t%d\tonly\t-\t%s\t%2d\t 3:00\t0\t-\n" +# "Rule\tMorocco\t%d\tonly\t-\t%s\t%2d\t 2:00\t1:00\tS\n") +# (car (cdr (cdr a))) (calendar-month-name (car a) t) (car (cdr a)) +# (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b))))) # (setq islamic-year (+ 1 islamic-year)))) -# -# with spring-forward transitions removed for 2023-2025, when the -# normal spring-forward date falls during the estimated Ramadan; with -# all transitions removed for 2026-2035, where the estimated Ramadan -# falls entirely outside daylight-saving time; and with fall-back -# transitions removed for 2036-2037, where the normal fall-back -# date falls during the estimated Ramadan. Normally, the table would -# stop after 2037 because 32-bit time_t values roll around early in 2038, -# but that would imply a prediction of perpetual DST after March 2038 -# due to the year-2037 glitches. So, this table instead stops after -# 2038, the first non-glitchy year after the 32-bit rollover. -# An advantage of stopping after 2038 is that it lets zic guess -# TZ='WET0WEST,M3.5.0,M10.5.0/3' for time stamps far in the future. # RULE NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -968,46 +996,44 @@ Rule Morocco 1978 only - Aug 4 0:00 0 Rule Morocco 2008 only - Jun 1 0:00 1:00 S Rule Morocco 2008 only - Sep 1 0:00 0 - Rule Morocco 2009 only - Jun 1 0:00 1:00 S -Rule Morocco 2009 only - Aug 21 0:00 0 - +Rule Morocco 2009 only - Aug 21 0:00 0 - Rule Morocco 2010 only - May 2 0:00 1:00 S Rule Morocco 2010 only - Aug 8 0:00 0 - Rule Morocco 2011 only - Apr 3 0:00 1:00 S -Rule Morocco 2011 only - Jul 31 0 0 - -Rule Morocco 2012 2013 - Apr lastSun 2:00 1:00 S -Rule Morocco 2012 only - Sep 30 3:00 0 - -Rule Morocco 2012 only - Jul 20 3:00 0 - -Rule Morocco 2012 only - Aug 20 2:00 1:00 S -Rule Morocco 2013 only - Jul 7 3:00 0 - -Rule Morocco 2013 only - Aug 10 2:00 1:00 S -Rule Morocco 2013 2035 - Oct lastSun 3:00 0 - -Rule Morocco 2014 2022 - Mar lastSun 2:00 1:00 S -Rule Morocco 2014 only - Jun 29 3:00 0 - -Rule Morocco 2014 only - Jul 29 2:00 1:00 S -Rule Morocco 2015 only - Jun 18 3:00 0 - -Rule Morocco 2015 only - Jul 18 2:00 1:00 S -Rule Morocco 2016 only - Jun 7 3:00 0 - -Rule Morocco 2016 only - Jul 7 2:00 1:00 S -Rule Morocco 2017 only - May 27 3:00 0 - -Rule Morocco 2017 only - Jun 26 2:00 1:00 S -Rule Morocco 2018 only - May 16 3:00 0 - -Rule Morocco 2018 only - Jun 15 2:00 1:00 S -Rule Morocco 2019 only - May 6 3:00 0 - -Rule Morocco 2019 only - Jun 5 2:00 1:00 S -Rule Morocco 2020 only - Apr 24 3:00 0 - -Rule Morocco 2020 only - May 24 2:00 1:00 S -Rule Morocco 2021 only - Apr 13 3:00 0 - -Rule Morocco 2021 only - May 13 2:00 1:00 S -Rule Morocco 2022 only - Apr 3 3:00 0 - -Rule Morocco 2022 only - May 3 2:00 1:00 S -Rule Morocco 2023 only - Apr 22 2:00 1:00 S -Rule Morocco 2024 only - Apr 10 2:00 1:00 S -Rule Morocco 2025 only - Mar 31 2:00 1:00 S -Rule Morocco 2026 max - Mar lastSun 2:00 1:00 S -Rule Morocco 2036 only - Oct 21 3:00 0 - -Rule Morocco 2037 only - Oct 11 3:00 0 - -Rule Morocco 2038 only - Sep 30 3:00 0 - -Rule Morocco 2038 only - Oct 30 2:00 1:00 S -Rule Morocco 2038 max - Oct lastSun 3:00 0 - +Rule Morocco 2011 only - Jul 31 0 0 - +Rule Morocco 2012 2013 - Apr lastSun 2:00 1:00 S +Rule Morocco 2012 only - Sep 30 3:00 0 - +Rule Morocco 2012 only - Jul 20 3:00 0 - +Rule Morocco 2012 only - Aug 20 2:00 1:00 S +Rule Morocco 2013 only - Jul 7 3:00 0 - +Rule Morocco 2013 only - Aug 10 2:00 1:00 S +Rule Morocco 2013 max - Oct lastSun 3:00 0 - +Rule Morocco 2014 2022 - Mar lastSun 2:00 1:00 S +Rule Morocco 2014 only - Jun 28 3:00 0 - +Rule Morocco 2014 only - Aug 2 2:00 1:00 S +Rule Morocco 2015 only - Jun 13 3:00 0 - +Rule Morocco 2015 only - Jul 18 2:00 1:00 S +Rule Morocco 2016 only - Jun 4 3:00 0 - +Rule Morocco 2016 only - Jul 9 2:00 1:00 S +Rule Morocco 2017 only - May 20 3:00 0 - +Rule Morocco 2017 only - Jul 1 2:00 1:00 S +Rule Morocco 2018 only - May 12 3:00 0 - +Rule Morocco 2018 only - Jun 16 2:00 1:00 S +Rule Morocco 2019 only - May 4 3:00 0 - +Rule Morocco 2019 only - Jun 8 2:00 1:00 S +Rule Morocco 2020 only - Apr 18 3:00 0 - +Rule Morocco 2020 only - May 30 2:00 1:00 S +Rule Morocco 2021 only - Apr 10 3:00 0 - +Rule Morocco 2021 only - May 15 2:00 1:00 S +Rule Morocco 2022 only - Apr 2 3:00 0 - +Rule Morocco 2022 only - May 7 2:00 1:00 S +Rule Morocco 2023 only - Apr 22 2:00 1:00 S +Rule Morocco 2024 only - Apr 13 2:00 1:00 S +Rule Morocco 2025 only - Apr 5 2:00 1:00 S +Rule Morocco 2026 max - Mar lastSun 2:00 1:00 S +Rule Morocco 2035 only - Oct 27 3:00 0 - +Rule Morocco 2036 only - Oct 18 3:00 0 - +Rule Morocco 2037 only - Oct 10 3:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26 Modified: stable/6/share/zoneinfo/australasia ============================================================================== --- stable/6/share/zoneinfo/australasia Sat Jun 14 11:34:39 2014 (r267473) +++ stable/6/share/zoneinfo/australasia Sat Jun 14 11:36:29 2014 (r267474) @@ -250,24 +250,14 @@ Zone Antarctica/Macquarie 0 - zzz 1899 N Zone Indian/Christmas 7:02:52 - LMT 1895 Feb 7:00 - CXT # Christmas Island Time -# Cook Is -# From Shanks & Pottenger: -# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Cook 1978 only - Nov 12 0:00 0:30 HS -Rule Cook 1979 1991 - Mar Sun>=1 0:00 0 - -Rule Cook 1979 1990 - Oct lastSun 0:00 0:30 HS -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Pacific/Rarotonga -10:39:04 - LMT 1901 # Avarua - -10:30 - CKT 1978 Nov 12 # Cook Is Time - -10:00 Cook CK%sT - -# Cocos +# Cocos (Keeling) Is # These islands were ruled by the Ross family from about 1830 to 1978. # We don't know when standard time was introduced; for now, we guess 1900. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Cocos 6:27:40 - LMT 1900 6:30 - CCT # Cocos Islands Time + # Fiji # Milne gives 11:55:44 for Suva. @@ -473,7 +463,8 @@ Rule NZ 1934 1940 - Apr lastSun 2:00 0 M Rule NZ 1934 1940 - Sep lastSun 2:00 0:30 S Rule NZ 1946 only - Jan 1 0:00 0 S # Since 1957 Chatham has been 45 minutes ahead of NZ, but there's no -# convenient notation for this so we must duplicate the Rule lines. +# convenient single notation for the date and time of this transition +# so we must duplicate the Rule lines. Rule NZ 1974 only - Nov Sun>=1 2:00s 1:00 D Rule Chatham 1974 only - Nov Sun>=1 2:45s 1:00 D Rule NZ 1975 only - Feb lastSun 2:00s 0 S @@ -511,6 +502,17 @@ Link Pacific/Auckland Antarctica/McMurdo # previously whalers, sealers, pastoralists, and scientific personnel wintered # was probably like Pacific/Auckland +# Cook Is +# From Shanks & Pottenger: +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Cook 1978 only - Nov 12 0:00 0:30 HS +Rule Cook 1979 1991 - Mar Sun>=1 0:00 0 - +Rule Cook 1979 1990 - Oct lastSun 0:00 0:30 HS +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Rarotonga -10:39:04 - LMT 1901 # Avarua + -10:30 - CKT 1978 Nov 12 # Cook Is Time + -10:00 Cook CK%sT + ############################################################################### Modified: stable/6/share/zoneinfo/europe ============================================================================== --- stable/6/share/zoneinfo/europe Sat Jun 14 11:34:39 2014 (r267473) +++ stable/6/share/zoneinfo/europe Sat Jun 14 11:36:29 2014 (r267474) @@ -6,7 +6,7 @@ # go ahead and edit the file (and please send any changes to # tz@iana.org for general use in the future). -# From Paul Eggert (2006-03-22): +# From Paul Eggert (2014-05-31): # A good source for time zone historical data outside the U.S. is # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). @@ -17,6 +17,9 @@ # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. # +# A reliable and entertaining source about time zones is +# Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). +# # Except where otherwise noted, Shanks & Pottenger is the source for # entries through 1991, and IATA SSIM is the source for entries afterwards. # @@ -26,9 +29,9 @@ # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), # which I found in the UCLA library. # -# # William Willett, The Waste of Daylight, 19th edition -# (1914-03) +# +# [PDF] (1914-03) # # Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94 # . He writes: @@ -58,10 +61,7 @@ # 1:00 CET CEST CEMT Central Europe # 1:00:14 SET Swedish (1879-1899)* # 2:00 EET EEST Eastern Europe -# 3:00 MSK MSD Moscow -# -# A reliable and entertaining source about time zones, especially in Britain, -# Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). +# 3:00 MSK MSD MSM* Moscow # From Peter Ilieve (1994-12-04), # The original six [EU members]: Belgium, France, (West) Germany, Italy, @@ -558,11 +558,11 @@ Rule Russia 1917 only - Dec 28 0:00 0 M Rule Russia 1918 only - May 31 22:00 2:00 MDST # Moscow Double Summer Time Rule Russia 1918 only - Sep 16 1:00 1:00 MST Rule Russia 1919 only - May 31 23:00 2:00 MDST -Rule Russia 1919 only - Jul 1 2:00 1:00 S -Rule Russia 1919 only - Aug 16 0:00 0 - -Rule Russia 1921 only - Feb 14 23:00 1:00 S -Rule Russia 1921 only - Mar 20 23:00 2:00 M # Midsummer -Rule Russia 1921 only - Sep 1 0:00 1:00 S +Rule Russia 1919 only - Jul 1 2:00 1:00 MSD +Rule Russia 1919 only - Aug 16 0:00 0 MSK +Rule Russia 1921 only - Feb 14 23:00 1:00 MSD +Rule Russia 1921 only - Mar 20 23:00 2:00 MSM # Midsummer +Rule Russia 1921 only - Sep 1 0:00 1:00 MSD Rule Russia 1921 only - Oct 1 0:00 0 - # Act No.925 of the Council of Ministers of the USSR (1980-10-24): Rule Russia 1981 1984 - Apr 1 0:00 1:00 S @@ -2217,6 +2217,7 @@ Zone Europe/Kaliningrad 1:22:00 - LMT 1 Zone Europe/Moscow 2:30:20 - LMT 1880 2:30 - MMT 1916 Jul 3 # Moscow Mean Time 2:30:48 Russia %s 1919 Jul 1 2:00 + 3:00 Russia %s 1921 Oct 3:00 Russia MSK/MSD 1922 Oct 2:00 - EET 1930 Jun 21 3:00 Russia MSK/MSD 1991 Mar 31 2:00s @@ -2375,7 +2376,7 @@ Zone Asia/Yakutsk 8:38:40 - LMT 1919 De Zone Asia/Vladivostok 8:47:44 - LMT 1922 Nov 15 9:00 - VLAT 1930 Jun 21 # Vladivostok Time 10:00 Russia VLA%sT 1991 Mar 31 2:00s - 9:00 Russia VLA%sST 1992 Jan 19 2:00s + 9:00 Russia VLA%sT 1992 Jan 19 2:00s 10:00 Russia VLA%sT 2011 Mar 27 2:00s 11:00 - VLAT Modified: stable/6/share/zoneinfo/northamerica ============================================================================== --- stable/6/share/zoneinfo/northamerica Sat Jun 14 11:34:39 2014 (r267473) +++ stable/6/share/zoneinfo/northamerica Sat Jun 14 11:36:29 2014 (r267474) @@ -1019,9 +1019,9 @@ Zone America/Menominee -5:50:27 - LMT 18 # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), # which I found in the UCLA library. # -# # William Willett, The Waste of Daylight, 19th edition -# (1914-03) +# +# [PDF] (1914-03) # # Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94 # . From owner-svn-src-stable@FreeBSD.ORG Sat Jun 14 11:37:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B9D2E06; Sat, 14 Jun 2014 11:37:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB7A22857; Sat, 14 Jun 2014 11:37:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5EBb2Zb027392; Sat, 14 Jun 2014 11:37:02 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5EBb2ja027387; Sat, 14 Jun 2014 11:37:02 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201406141137.s5EBb2ja027387@svn.freebsd.org> From: Edwin Groothuis Date: Sat, 14 Jun 2014 11:37:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r267475 - stable/7/share/zoneinfo X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jun 2014 11:37:03 -0000 Author: edwin Date: Sat Jun 14 11:37:01 2014 New Revision: 267475 URL: http://svnweb.freebsd.org/changeset/base/267475 Log: MFC of i267473,tzdata2013b Fix historical data for Egypt. Better prediction for future Egypt / Morocco changes. Update to Cocos / Cook islands. Fix historical data for Russia. Modified: stable/7/share/zoneinfo/africa stable/7/share/zoneinfo/australasia stable/7/share/zoneinfo/europe stable/7/share/zoneinfo/northamerica Directory Properties: stable/7/share/zoneinfo/ (props changed) Modified: stable/7/share/zoneinfo/africa ============================================================================== --- stable/7/share/zoneinfo/africa Sat Jun 14 11:36:29 2014 (r267474) +++ stable/7/share/zoneinfo/africa Sat Jun 14 11:37:01 2014 (r267475) @@ -239,13 +239,13 @@ Rule Egypt 1990 1994 - May 1 1:00 1:00 # http://www.worldtimezone.com/dst_news/dst_news_egypt04.html # Rule Egypt 1995 2010 - Apr lastFri 0:00s 1:00 S -Rule Egypt 1995 2005 - Sep lastThu 23:00s 0 - +Rule Egypt 1995 2005 - Sep lastThu 24:00 0 - # From Steffen Thorsen (2006-09-19): # The Egyptian Gazette, issue 41,090 (2006-09-18), page 1, reports: # Egypt will turn back clocks by one hour at the midnight of Thursday # after observing the daylight saving time since May. # http://news.gom.com.eg/gazette/pdf/2006/09/18/01.pdf -Rule Egypt 2006 only - Sep 21 23:00s 0 - +Rule Egypt 2006 only - Sep 21 24:00 0 - # From Dirk Losch (2007-08-14): # I received a mail from an airline which says that the daylight # saving time in Egypt will end in the night of 2007-09-06 to 2007-09-07. @@ -254,7 +254,7 @@ Rule Egypt 2006 only - Sep 21 23:00s 0 - # http://www.timeanddate.com/worldclock/city.html?n=53 # From Steffen Thorsen (2007-09-04): The official information...: # http://www.sis.gov.eg/En/EgyptOnline/Miscellaneous/000002/0207000000000000001580.htm -Rule Egypt 2007 only - Sep Thu>=1 23:00s 0 - +Rule Egypt 2007 only - Sep Thu>=1 24:00 0 - # From Abdelrahman Hassan (2007-09-06): # Due to the Hijri (lunar Islamic calendar) year being 11 days shorter # than the year of the Gregorian calendar, Ramadan shifts earlier each @@ -342,46 +342,77 @@ Rule Egypt 2007 only - Sep Thu>=1 23:00s # From Gunther Vermier (2015-05-13): # our Egypt office confirms that the change will be at 15 May "midnight" (24:00) -# From Paul Eggert (2014-05-13): +# From Imed Chihi (2014-06-04): +# We have finally "located" a precise official reference about the DST changes +# in Egypt. The Ministers Cabinet decision is explained at +# http://www.cabinet.gov.eg/Media/CabinetMeetingsDetails.aspx?id=347 ... +# [T]his (Arabic) site is not accessible outside Egypt, but the page ... +# translates into: "With regard to daylight saving time, it is scheduled to +# take effect at exactly twelve o'clock this evening, Thursday, 15 MAY 2014, +# to be suspended by twelve o'clock on the evening of Thursday, 26 JUN 2014, +# and re-established again at the end of the month of Ramadan, at twelve +# o'clock on the evening of Thursday, 31 JUL 2014." This statement has been +# reproduced by other (more accessible) sites[, e.g.,]... +# http://elgornal.net/news/news.aspx?id=4699258 + +# From Paul Eggert (2014-06-04): # Sarah El Deeb and Lee Keath of AP report that the Egyptian government says # the change is because of blackouts in Cairo, even though Ahram Online (cited -# above) says DST had no affect on electricity consumption. The AP story says -# DST will not be observed during Ramadan. There is no information about when -# DST will end. See: +# above) says DST had no affect on electricity consumption. There is +# no information about when DST will end this fall. See: # http://abcnews.go.com/International/wireStory/el-sissi-pushes-egyptians-line-23614833 # -# For now, guess that later transitions will use 2010's rules, and that -# Egypt will agree with Morocco (see below) about the date Ramadan starts and -# ends, though (unlike Morocco) it will switch at 00:00 standard time. In -# Egypt the spring-forward transitions are removed for 2020-2022, when the -# guessed spring-forward date falls during the estimated Ramadan, and all -# transitions removed for 2023-2038, where the estimated Ramadan falls entirely -# outside the guessed daylight-saving time. Ramadan intrudes on the guessed -# DST starting in 2039, but that's beyond our somewhat-arbitrary cutoff. - -Rule Egypt 2008 only - Aug lastThu 23:00s 0 - -Rule Egypt 2009 only - Aug 20 23:00s 0 - -Rule Egypt 2010 only - Aug 11 0:00 0 - -Rule Egypt 2010 only - Sep 10 0:00 1:00 S -Rule Egypt 2010 only - Sep lastThu 23:00s 0 - +# For now, guess that later spring and fall transitions will use +# 2010's rules, and guess that Egypt will switch to standard time at +# 24:00 the last Thursday before Ramadan, and back to DST at 00:00 the +# first Friday after Ramadan. To implement this, +# transition dates for 2015 through 2037 were determined by running +# the following program under GNU Emacs 24.3, with the results integrated +# by hand into the table below. Ramadan again intrudes on the guessed +# DST starting in 2038, but that's beyond our somewhat-arbitrary cutoff. +# (let ((islamic-year 1436)) +# (while (< islamic-year 1460) +# (let ((a (calendar-islamic-to-absolute (list 9 1 islamic-year))) +# (b (calendar-islamic-to-absolute (list 10 1 islamic-year))) +# (friday 5)) +# (while (/= friday (mod a 7)) +# (setq a (1- a))) +# (while (/= friday (mod b 7)) +# (setq b (1+ b))) +# (setq a (1- a)) +# (setq b (1- b)) +# (setq a (calendar-gregorian-from-absolute a)) +# (setq b (calendar-gregorian-from-absolute b)) +# (insert +# (format +# (concat "Rule\tEgypt\t%d\tonly\t-\t%s\t%2d\t24:00\t0\t-\n" +# "Rule\tEgypt\t%d\tonly\t-\t%s\t%2d\t24:00\t1:00\tS\n") +# (car (cdr (cdr a))) (calendar-month-name (car a) t) (car (cdr a)) +# (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b))))) +# (setq islamic-year (+ 1 islamic-year)))) +Rule Egypt 2008 only - Aug lastThu 24:00 0 - +Rule Egypt 2009 only - Aug 20 24:00 0 - +Rule Egypt 2010 only - Aug 10 24:00 0 - +Rule Egypt 2010 only - Sep 9 24:00 1:00 S +Rule Egypt 2010 only - Sep lastThu 24:00 0 - Rule Egypt 2014 only - May 15 24:00 1:00 S -Rule Egypt 2014 only - Jun 29 0:00s 0 - -Rule Egypt 2014 only - Jul 29 0:00s 1:00 S -Rule Egypt 2014 max - Sep lastThu 23:00s 0 - +Rule Egypt 2014 only - Jun 26 24:00 0 - +Rule Egypt 2014 only - Jul 31 24:00 1:00 S +Rule Egypt 2014 max - Sep lastThu 24:00 0 - Rule Egypt 2015 2019 - Apr lastFri 0:00s 1:00 S -Rule Egypt 2015 only - Jun 18 0:00s 0 - -Rule Egypt 2015 only - Jul 18 0:00s 1:00 S -Rule Egypt 2016 only - Jun 7 0:00s 0 - -Rule Egypt 2016 only - Jul 7 0:00s 1:00 S -Rule Egypt 2017 only - May 27 0:00s 0 - -Rule Egypt 2017 only - Jun 26 0:00s 1:00 S -Rule Egypt 2018 only - May 16 0:00s 0 - -Rule Egypt 2018 only - Jun 15 0:00s 1:00 S -Rule Egypt 2019 only - May 6 0:00s 0 - -Rule Egypt 2019 only - Jun 5 0:00s 1:00 S -Rule Egypt 2020 only - May 24 0:00s 1:00 S -Rule Egypt 2021 only - May 13 0:00s 1:00 S -Rule Egypt 2022 only - May 3 0:00s 1:00 S +Rule Egypt 2015 only - Jun 11 24:00 0 - +Rule Egypt 2015 only - Jul 23 24:00 1:00 S +Rule Egypt 2016 only - Jun 2 24:00 0 - +Rule Egypt 2016 only - Jul 7 24:00 1:00 S +Rule Egypt 2017 only - May 25 24:00 0 - +Rule Egypt 2017 only - Jun 29 24:00 1:00 S +Rule Egypt 2018 only - May 10 24:00 0 - +Rule Egypt 2018 only - Jun 14 24:00 1:00 S +Rule Egypt 2019 only - May 2 24:00 0 - +Rule Egypt 2019 only - Jun 6 24:00 1:00 S +Rule Egypt 2020 only - May 28 24:00 1:00 S +Rule Egypt 2021 only - May 13 24:00 1:00 S +Rule Egypt 2022 only - May 5 24:00 1:00 S Rule Egypt 2023 max - Apr lastFri 0:00s 1:00 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -914,39 +945,36 @@ Zone Indian/Mayotte 3:00:56 - LMT 1911 J # From Sebastien Willemijns (2014-03-18): # http://www.afriquinfos.com/articles/2014/3/18/maroc-heure-dete-avancez-tous-horloges-247891.asp -# From Paul Eggert (2014-03-19): -# To estimate what the Moroccan government will do in future years, -# transition dates for 2014 through 2038 were determined by running -# the following program under GNU Emacs 24.3: -# -# (let ((islamic-year 1435)) -# (while (< islamic-year 1461) -# (let ((a -# (calendar-gregorian-from-absolute -# (calendar-islamic-to-absolute (list 9 1 islamic-year)))) -# (b -# (calendar-gregorian-from-absolute -# (calendar-islamic-to-absolute (list 10 1 islamic-year))))) -# (insert -# (format -# (concat "Rule\tMorocco\t%d\tonly\t-\t%s\t %2d\t 3:00\t0\t-\n" -# "Rule\tMorocco\t%d\tonly\t-\t%s\t %2d\t 2:00\t1:00\tS\n") -# (car (cdr (cdr a))) (calendar-month-name (car a) t) (car (cdr a)) -# (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b))))) +# From Milamber Space Network (2014-06-05): +# The Moroccan government has recently announced that the country will return +# to standard time at 03:00 on Saturday, June 28, 2014 local time.... DST +# will resume again at 02:00 on Saturday, August 2, 2014.... +# http://www.mmsp.gov.ma/fr/actualites.aspx?id=586 + +# From Paul Eggert (2014-06-05): +# For now, guess that later spring and fall transitions will use 2014's rules, +# and guess that Morocco will switch to standard time at 03:00 the last +# Saturday before Ramadan, and back to DST at 02:00 the first Saturday after +# Ramadan. To implement this, transition dates for 2015 through 2037 were +# determined by running the following program under GNU Emacs 24.3, with the +# results integrated by hand into the table below. +# (let ((islamic-year 1436)) +# (while (< islamic-year 1460) +# (let ((a (calendar-islamic-to-absolute (list 9 1 islamic-year))) +# (b (calendar-islamic-to-absolute (list 10 1 islamic-year))) +# (saturday 6)) +# (while (/= saturday (mod (setq a (1- a)) 7))) +# (while (/= saturday (mod b 7)) +# (setq b (1+ b))) +# (setq a (calendar-gregorian-from-absolute a)) +# (setq b (calendar-gregorian-from-absolute b)) +# (insert +# (format +# (concat "Rule\tMorocco\t%d\tonly\t-\t%s\t%2d\t 3:00\t0\t-\n" +# "Rule\tMorocco\t%d\tonly\t-\t%s\t%2d\t 2:00\t1:00\tS\n") +# (car (cdr (cdr a))) (calendar-month-name (car a) t) (car (cdr a)) +# (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b))))) # (setq islamic-year (+ 1 islamic-year)))) -# -# with spring-forward transitions removed for 2023-2025, when the -# normal spring-forward date falls during the estimated Ramadan; with -# all transitions removed for 2026-2035, where the estimated Ramadan -# falls entirely outside daylight-saving time; and with fall-back -# transitions removed for 2036-2037, where the normal fall-back -# date falls during the estimated Ramadan. Normally, the table would -# stop after 2037 because 32-bit time_t values roll around early in 2038, -# but that would imply a prediction of perpetual DST after March 2038 -# due to the year-2037 glitches. So, this table instead stops after -# 2038, the first non-glitchy year after the 32-bit rollover. -# An advantage of stopping after 2038 is that it lets zic guess -# TZ='WET0WEST,M3.5.0,M10.5.0/3' for time stamps far in the future. # RULE NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -968,46 +996,44 @@ Rule Morocco 1978 only - Aug 4 0:00 0 Rule Morocco 2008 only - Jun 1 0:00 1:00 S Rule Morocco 2008 only - Sep 1 0:00 0 - Rule Morocco 2009 only - Jun 1 0:00 1:00 S -Rule Morocco 2009 only - Aug 21 0:00 0 - +Rule Morocco 2009 only - Aug 21 0:00 0 - Rule Morocco 2010 only - May 2 0:00 1:00 S Rule Morocco 2010 only - Aug 8 0:00 0 - Rule Morocco 2011 only - Apr 3 0:00 1:00 S -Rule Morocco 2011 only - Jul 31 0 0 - -Rule Morocco 2012 2013 - Apr lastSun 2:00 1:00 S -Rule Morocco 2012 only - Sep 30 3:00 0 - -Rule Morocco 2012 only - Jul 20 3:00 0 - -Rule Morocco 2012 only - Aug 20 2:00 1:00 S -Rule Morocco 2013 only - Jul 7 3:00 0 - -Rule Morocco 2013 only - Aug 10 2:00 1:00 S -Rule Morocco 2013 2035 - Oct lastSun 3:00 0 - -Rule Morocco 2014 2022 - Mar lastSun 2:00 1:00 S -Rule Morocco 2014 only - Jun 29 3:00 0 - -Rule Morocco 2014 only - Jul 29 2:00 1:00 S -Rule Morocco 2015 only - Jun 18 3:00 0 - -Rule Morocco 2015 only - Jul 18 2:00 1:00 S -Rule Morocco 2016 only - Jun 7 3:00 0 - -Rule Morocco 2016 only - Jul 7 2:00 1:00 S -Rule Morocco 2017 only - May 27 3:00 0 - -Rule Morocco 2017 only - Jun 26 2:00 1:00 S -Rule Morocco 2018 only - May 16 3:00 0 - -Rule Morocco 2018 only - Jun 15 2:00 1:00 S -Rule Morocco 2019 only - May 6 3:00 0 - -Rule Morocco 2019 only - Jun 5 2:00 1:00 S -Rule Morocco 2020 only - Apr 24 3:00 0 - -Rule Morocco 2020 only - May 24 2:00 1:00 S -Rule Morocco 2021 only - Apr 13 3:00 0 - -Rule Morocco 2021 only - May 13 2:00 1:00 S -Rule Morocco 2022 only - Apr 3 3:00 0 - -Rule Morocco 2022 only - May 3 2:00 1:00 S -Rule Morocco 2023 only - Apr 22 2:00 1:00 S -Rule Morocco 2024 only - Apr 10 2:00 1:00 S -Rule Morocco 2025 only - Mar 31 2:00 1:00 S -Rule Morocco 2026 max - Mar lastSun 2:00 1:00 S -Rule Morocco 2036 only - Oct 21 3:00 0 - -Rule Morocco 2037 only - Oct 11 3:00 0 - -Rule Morocco 2038 only - Sep 30 3:00 0 - -Rule Morocco 2038 only - Oct 30 2:00 1:00 S -Rule Morocco 2038 max - Oct lastSun 3:00 0 - +Rule Morocco 2011 only - Jul 31 0 0 - +Rule Morocco 2012 2013 - Apr lastSun 2:00 1:00 S +Rule Morocco 2012 only - Sep 30 3:00 0 - +Rule Morocco 2012 only - Jul 20 3:00 0 - +Rule Morocco 2012 only - Aug 20 2:00 1:00 S +Rule Morocco 2013 only - Jul 7 3:00 0 - +Rule Morocco 2013 only - Aug 10 2:00 1:00 S +Rule Morocco 2013 max - Oct lastSun 3:00 0 - +Rule Morocco 2014 2022 - Mar lastSun 2:00 1:00 S +Rule Morocco 2014 only - Jun 28 3:00 0 - +Rule Morocco 2014 only - Aug 2 2:00 1:00 S +Rule Morocco 2015 only - Jun 13 3:00 0 - +Rule Morocco 2015 only - Jul 18 2:00 1:00 S +Rule Morocco 2016 only - Jun 4 3:00 0 - +Rule Morocco 2016 only - Jul 9 2:00 1:00 S +Rule Morocco 2017 only - May 20 3:00 0 - +Rule Morocco 2017 only - Jul 1 2:00 1:00 S +Rule Morocco 2018 only - May 12 3:00 0 - +Rule Morocco 2018 only - Jun 16 2:00 1:00 S +Rule Morocco 2019 only - May 4 3:00 0 - +Rule Morocco 2019 only - Jun 8 2:00 1:00 S +Rule Morocco 2020 only - Apr 18 3:00 0 - +Rule Morocco 2020 only - May 30 2:00 1:00 S +Rule Morocco 2021 only - Apr 10 3:00 0 - +Rule Morocco 2021 only - May 15 2:00 1:00 S +Rule Morocco 2022 only - Apr 2 3:00 0 - +Rule Morocco 2022 only - May 7 2:00 1:00 S +Rule Morocco 2023 only - Apr 22 2:00 1:00 S +Rule Morocco 2024 only - Apr 13 2:00 1:00 S +Rule Morocco 2025 only - Apr 5 2:00 1:00 S +Rule Morocco 2026 max - Mar lastSun 2:00 1:00 S +Rule Morocco 2035 only - Oct 27 3:00 0 - +Rule Morocco 2036 only - Oct 18 3:00 0 - +Rule Morocco 2037 only - Oct 10 3:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26 Modified: stable/7/share/zoneinfo/australasia ============================================================================== --- stable/7/share/zoneinfo/australasia Sat Jun 14 11:36:29 2014 (r267474) +++ stable/7/share/zoneinfo/australasia Sat Jun 14 11:37:01 2014 (r267475) @@ -250,24 +250,14 @@ Zone Antarctica/Macquarie 0 - zzz 1899 N Zone Indian/Christmas 7:02:52 - LMT 1895 Feb 7:00 - CXT # Christmas Island Time -# Cook Is -# From Shanks & Pottenger: -# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Cook 1978 only - Nov 12 0:00 0:30 HS -Rule Cook 1979 1991 - Mar Sun>=1 0:00 0 - -Rule Cook 1979 1990 - Oct lastSun 0:00 0:30 HS -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Pacific/Rarotonga -10:39:04 - LMT 1901 # Avarua - -10:30 - CKT 1978 Nov 12 # Cook Is Time - -10:00 Cook CK%sT - -# Cocos +# Cocos (Keeling) Is # These islands were ruled by the Ross family from about 1830 to 1978. # We don't know when standard time was introduced; for now, we guess 1900. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Cocos 6:27:40 - LMT 1900 6:30 - CCT # Cocos Islands Time + # Fiji # Milne gives 11:55:44 for Suva. @@ -473,7 +463,8 @@ Rule NZ 1934 1940 - Apr lastSun 2:00 0 M Rule NZ 1934 1940 - Sep lastSun 2:00 0:30 S Rule NZ 1946 only - Jan 1 0:00 0 S # Since 1957 Chatham has been 45 minutes ahead of NZ, but there's no -# convenient notation for this so we must duplicate the Rule lines. +# convenient single notation for the date and time of this transition +# so we must duplicate the Rule lines. Rule NZ 1974 only - Nov Sun>=1 2:00s 1:00 D Rule Chatham 1974 only - Nov Sun>=1 2:45s 1:00 D Rule NZ 1975 only - Feb lastSun 2:00s 0 S @@ -511,6 +502,17 @@ Link Pacific/Auckland Antarctica/McMurdo # previously whalers, sealers, pastoralists, and scientific personnel wintered # was probably like Pacific/Auckland +# Cook Is +# From Shanks & Pottenger: +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Cook 1978 only - Nov 12 0:00 0:30 HS +Rule Cook 1979 1991 - Mar Sun>=1 0:00 0 - +Rule Cook 1979 1990 - Oct lastSun 0:00 0:30 HS +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Rarotonga -10:39:04 - LMT 1901 # Avarua + -10:30 - CKT 1978 Nov 12 # Cook Is Time + -10:00 Cook CK%sT + ############################################################################### Modified: stable/7/share/zoneinfo/europe ============================================================================== --- stable/7/share/zoneinfo/europe Sat Jun 14 11:36:29 2014 (r267474) +++ stable/7/share/zoneinfo/europe Sat Jun 14 11:37:01 2014 (r267475) @@ -6,7 +6,7 @@ # go ahead and edit the file (and please send any changes to # tz@iana.org for general use in the future). -# From Paul Eggert (2006-03-22): +# From Paul Eggert (2014-05-31): # A good source for time zone historical data outside the U.S. is # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). @@ -17,6 +17,9 @@ # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. # +# A reliable and entertaining source about time zones is +# Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). +# # Except where otherwise noted, Shanks & Pottenger is the source for # entries through 1991, and IATA SSIM is the source for entries afterwards. # @@ -26,9 +29,9 @@ # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), # which I found in the UCLA library. # -# # William Willett, The Waste of Daylight, 19th edition -# (1914-03) +# +# [PDF] (1914-03) # # Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94 # . He writes: @@ -58,10 +61,7 @@ # 1:00 CET CEST CEMT Central Europe # 1:00:14 SET Swedish (1879-1899)* # 2:00 EET EEST Eastern Europe -# 3:00 MSK MSD Moscow -# -# A reliable and entertaining source about time zones, especially in Britain, -# Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). +# 3:00 MSK MSD MSM* Moscow # From Peter Ilieve (1994-12-04), # The original six [EU members]: Belgium, France, (West) Germany, Italy, @@ -558,11 +558,11 @@ Rule Russia 1917 only - Dec 28 0:00 0 M Rule Russia 1918 only - May 31 22:00 2:00 MDST # Moscow Double Summer Time Rule Russia 1918 only - Sep 16 1:00 1:00 MST Rule Russia 1919 only - May 31 23:00 2:00 MDST -Rule Russia 1919 only - Jul 1 2:00 1:00 S -Rule Russia 1919 only - Aug 16 0:00 0 - -Rule Russia 1921 only - Feb 14 23:00 1:00 S -Rule Russia 1921 only - Mar 20 23:00 2:00 M # Midsummer -Rule Russia 1921 only - Sep 1 0:00 1:00 S +Rule Russia 1919 only - Jul 1 2:00 1:00 MSD +Rule Russia 1919 only - Aug 16 0:00 0 MSK +Rule Russia 1921 only - Feb 14 23:00 1:00 MSD +Rule Russia 1921 only - Mar 20 23:00 2:00 MSM # Midsummer +Rule Russia 1921 only - Sep 1 0:00 1:00 MSD Rule Russia 1921 only - Oct 1 0:00 0 - # Act No.925 of the Council of Ministers of the USSR (1980-10-24): Rule Russia 1981 1984 - Apr 1 0:00 1:00 S @@ -2217,6 +2217,7 @@ Zone Europe/Kaliningrad 1:22:00 - LMT 1 Zone Europe/Moscow 2:30:20 - LMT 1880 2:30 - MMT 1916 Jul 3 # Moscow Mean Time 2:30:48 Russia %s 1919 Jul 1 2:00 + 3:00 Russia %s 1921 Oct 3:00 Russia MSK/MSD 1922 Oct 2:00 - EET 1930 Jun 21 3:00 Russia MSK/MSD 1991 Mar 31 2:00s @@ -2375,7 +2376,7 @@ Zone Asia/Yakutsk 8:38:40 - LMT 1919 De Zone Asia/Vladivostok 8:47:44 - LMT 1922 Nov 15 9:00 - VLAT 1930 Jun 21 # Vladivostok Time 10:00 Russia VLA%sT 1991 Mar 31 2:00s - 9:00 Russia VLA%sST 1992 Jan 19 2:00s + 9:00 Russia VLA%sT 1992 Jan 19 2:00s 10:00 Russia VLA%sT 2011 Mar 27 2:00s 11:00 - VLAT Modified: stable/7/share/zoneinfo/northamerica ============================================================================== --- stable/7/share/zoneinfo/northamerica Sat Jun 14 11:36:29 2014 (r267474) +++ stable/7/share/zoneinfo/northamerica Sat Jun 14 11:37:01 2014 (r267475) @@ -1019,9 +1019,9 @@ Zone America/Menominee -5:50:27 - LMT 18 # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), # which I found in the UCLA library. # -# # William Willett, The Waste of Daylight, 19th edition -# (1914-03) +# +# [PDF] (1914-03) # # Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94 # . From owner-svn-src-stable@FreeBSD.ORG Sat Jun 14 11:37:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D96E4F43; Sat, 14 Jun 2014 11:37:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C48F62866; Sat, 14 Jun 2014 11:37:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5EBbsES027543; Sat, 14 Jun 2014 11:37:54 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5EBbsVC027539; Sat, 14 Jun 2014 11:37:54 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201406141137.s5EBbsVC027539@svn.freebsd.org> From: Edwin Groothuis Date: Sat, 14 Jun 2014 11:37:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r267476 - stable/8/share/zoneinfo X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jun 2014 11:37:55 -0000 Author: edwin Date: Sat Jun 14 11:37:53 2014 New Revision: 267476 URL: http://svnweb.freebsd.org/changeset/base/267476 Log: MFC of i267473,tzdata2014e Fix historical data for Egypt. Better prediction for future Egypt / Morocco changes. Update to Cocos / Cook islands. Fix historical data for Russia. Modified: stable/8/share/zoneinfo/africa stable/8/share/zoneinfo/australasia stable/8/share/zoneinfo/europe stable/8/share/zoneinfo/northamerica Directory Properties: stable/8/share/zoneinfo/ (props changed) Modified: stable/8/share/zoneinfo/africa ============================================================================== --- stable/8/share/zoneinfo/africa Sat Jun 14 11:37:01 2014 (r267475) +++ stable/8/share/zoneinfo/africa Sat Jun 14 11:37:53 2014 (r267476) @@ -239,13 +239,13 @@ Rule Egypt 1990 1994 - May 1 1:00 1:00 # http://www.worldtimezone.com/dst_news/dst_news_egypt04.html # Rule Egypt 1995 2010 - Apr lastFri 0:00s 1:00 S -Rule Egypt 1995 2005 - Sep lastThu 23:00s 0 - +Rule Egypt 1995 2005 - Sep lastThu 24:00 0 - # From Steffen Thorsen (2006-09-19): # The Egyptian Gazette, issue 41,090 (2006-09-18), page 1, reports: # Egypt will turn back clocks by one hour at the midnight of Thursday # after observing the daylight saving time since May. # http://news.gom.com.eg/gazette/pdf/2006/09/18/01.pdf -Rule Egypt 2006 only - Sep 21 23:00s 0 - +Rule Egypt 2006 only - Sep 21 24:00 0 - # From Dirk Losch (2007-08-14): # I received a mail from an airline which says that the daylight # saving time in Egypt will end in the night of 2007-09-06 to 2007-09-07. @@ -254,7 +254,7 @@ Rule Egypt 2006 only - Sep 21 23:00s 0 - # http://www.timeanddate.com/worldclock/city.html?n=53 # From Steffen Thorsen (2007-09-04): The official information...: # http://www.sis.gov.eg/En/EgyptOnline/Miscellaneous/000002/0207000000000000001580.htm -Rule Egypt 2007 only - Sep Thu>=1 23:00s 0 - +Rule Egypt 2007 only - Sep Thu>=1 24:00 0 - # From Abdelrahman Hassan (2007-09-06): # Due to the Hijri (lunar Islamic calendar) year being 11 days shorter # than the year of the Gregorian calendar, Ramadan shifts earlier each @@ -342,46 +342,77 @@ Rule Egypt 2007 only - Sep Thu>=1 23:00s # From Gunther Vermier (2015-05-13): # our Egypt office confirms that the change will be at 15 May "midnight" (24:00) -# From Paul Eggert (2014-05-13): +# From Imed Chihi (2014-06-04): +# We have finally "located" a precise official reference about the DST changes +# in Egypt. The Ministers Cabinet decision is explained at +# http://www.cabinet.gov.eg/Media/CabinetMeetingsDetails.aspx?id=347 ... +# [T]his (Arabic) site is not accessible outside Egypt, but the page ... +# translates into: "With regard to daylight saving time, it is scheduled to +# take effect at exactly twelve o'clock this evening, Thursday, 15 MAY 2014, +# to be suspended by twelve o'clock on the evening of Thursday, 26 JUN 2014, +# and re-established again at the end of the month of Ramadan, at twelve +# o'clock on the evening of Thursday, 31 JUL 2014." This statement has been +# reproduced by other (more accessible) sites[, e.g.,]... +# http://elgornal.net/news/news.aspx?id=4699258 + +# From Paul Eggert (2014-06-04): # Sarah El Deeb and Lee Keath of AP report that the Egyptian government says # the change is because of blackouts in Cairo, even though Ahram Online (cited -# above) says DST had no affect on electricity consumption. The AP story says -# DST will not be observed during Ramadan. There is no information about when -# DST will end. See: +# above) says DST had no affect on electricity consumption. There is +# no information about when DST will end this fall. See: # http://abcnews.go.com/International/wireStory/el-sissi-pushes-egyptians-line-23614833 # -# For now, guess that later transitions will use 2010's rules, and that -# Egypt will agree with Morocco (see below) about the date Ramadan starts and -# ends, though (unlike Morocco) it will switch at 00:00 standard time. In -# Egypt the spring-forward transitions are removed for 2020-2022, when the -# guessed spring-forward date falls during the estimated Ramadan, and all -# transitions removed for 2023-2038, where the estimated Ramadan falls entirely -# outside the guessed daylight-saving time. Ramadan intrudes on the guessed -# DST starting in 2039, but that's beyond our somewhat-arbitrary cutoff. - -Rule Egypt 2008 only - Aug lastThu 23:00s 0 - -Rule Egypt 2009 only - Aug 20 23:00s 0 - -Rule Egypt 2010 only - Aug 11 0:00 0 - -Rule Egypt 2010 only - Sep 10 0:00 1:00 S -Rule Egypt 2010 only - Sep lastThu 23:00s 0 - +# For now, guess that later spring and fall transitions will use +# 2010's rules, and guess that Egypt will switch to standard time at +# 24:00 the last Thursday before Ramadan, and back to DST at 00:00 the +# first Friday after Ramadan. To implement this, +# transition dates for 2015 through 2037 were determined by running +# the following program under GNU Emacs 24.3, with the results integrated +# by hand into the table below. Ramadan again intrudes on the guessed +# DST starting in 2038, but that's beyond our somewhat-arbitrary cutoff. +# (let ((islamic-year 1436)) +# (while (< islamic-year 1460) +# (let ((a (calendar-islamic-to-absolute (list 9 1 islamic-year))) +# (b (calendar-islamic-to-absolute (list 10 1 islamic-year))) +# (friday 5)) +# (while (/= friday (mod a 7)) +# (setq a (1- a))) +# (while (/= friday (mod b 7)) +# (setq b (1+ b))) +# (setq a (1- a)) +# (setq b (1- b)) +# (setq a (calendar-gregorian-from-absolute a)) +# (setq b (calendar-gregorian-from-absolute b)) +# (insert +# (format +# (concat "Rule\tEgypt\t%d\tonly\t-\t%s\t%2d\t24:00\t0\t-\n" +# "Rule\tEgypt\t%d\tonly\t-\t%s\t%2d\t24:00\t1:00\tS\n") +# (car (cdr (cdr a))) (calendar-month-name (car a) t) (car (cdr a)) +# (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b))))) +# (setq islamic-year (+ 1 islamic-year)))) +Rule Egypt 2008 only - Aug lastThu 24:00 0 - +Rule Egypt 2009 only - Aug 20 24:00 0 - +Rule Egypt 2010 only - Aug 10 24:00 0 - +Rule Egypt 2010 only - Sep 9 24:00 1:00 S +Rule Egypt 2010 only - Sep lastThu 24:00 0 - Rule Egypt 2014 only - May 15 24:00 1:00 S -Rule Egypt 2014 only - Jun 29 0:00s 0 - -Rule Egypt 2014 only - Jul 29 0:00s 1:00 S -Rule Egypt 2014 max - Sep lastThu 23:00s 0 - +Rule Egypt 2014 only - Jun 26 24:00 0 - +Rule Egypt 2014 only - Jul 31 24:00 1:00 S +Rule Egypt 2014 max - Sep lastThu 24:00 0 - Rule Egypt 2015 2019 - Apr lastFri 0:00s 1:00 S -Rule Egypt 2015 only - Jun 18 0:00s 0 - -Rule Egypt 2015 only - Jul 18 0:00s 1:00 S -Rule Egypt 2016 only - Jun 7 0:00s 0 - -Rule Egypt 2016 only - Jul 7 0:00s 1:00 S -Rule Egypt 2017 only - May 27 0:00s 0 - -Rule Egypt 2017 only - Jun 26 0:00s 1:00 S -Rule Egypt 2018 only - May 16 0:00s 0 - -Rule Egypt 2018 only - Jun 15 0:00s 1:00 S -Rule Egypt 2019 only - May 6 0:00s 0 - -Rule Egypt 2019 only - Jun 5 0:00s 1:00 S -Rule Egypt 2020 only - May 24 0:00s 1:00 S -Rule Egypt 2021 only - May 13 0:00s 1:00 S -Rule Egypt 2022 only - May 3 0:00s 1:00 S +Rule Egypt 2015 only - Jun 11 24:00 0 - +Rule Egypt 2015 only - Jul 23 24:00 1:00 S +Rule Egypt 2016 only - Jun 2 24:00 0 - +Rule Egypt 2016 only - Jul 7 24:00 1:00 S +Rule Egypt 2017 only - May 25 24:00 0 - +Rule Egypt 2017 only - Jun 29 24:00 1:00 S +Rule Egypt 2018 only - May 10 24:00 0 - +Rule Egypt 2018 only - Jun 14 24:00 1:00 S +Rule Egypt 2019 only - May 2 24:00 0 - +Rule Egypt 2019 only - Jun 6 24:00 1:00 S +Rule Egypt 2020 only - May 28 24:00 1:00 S +Rule Egypt 2021 only - May 13 24:00 1:00 S +Rule Egypt 2022 only - May 5 24:00 1:00 S Rule Egypt 2023 max - Apr lastFri 0:00s 1:00 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -914,39 +945,36 @@ Zone Indian/Mayotte 3:00:56 - LMT 1911 J # From Sebastien Willemijns (2014-03-18): # http://www.afriquinfos.com/articles/2014/3/18/maroc-heure-dete-avancez-tous-horloges-247891.asp -# From Paul Eggert (2014-03-19): -# To estimate what the Moroccan government will do in future years, -# transition dates for 2014 through 2038 were determined by running -# the following program under GNU Emacs 24.3: -# -# (let ((islamic-year 1435)) -# (while (< islamic-year 1461) -# (let ((a -# (calendar-gregorian-from-absolute -# (calendar-islamic-to-absolute (list 9 1 islamic-year)))) -# (b -# (calendar-gregorian-from-absolute -# (calendar-islamic-to-absolute (list 10 1 islamic-year))))) -# (insert -# (format -# (concat "Rule\tMorocco\t%d\tonly\t-\t%s\t %2d\t 3:00\t0\t-\n" -# "Rule\tMorocco\t%d\tonly\t-\t%s\t %2d\t 2:00\t1:00\tS\n") -# (car (cdr (cdr a))) (calendar-month-name (car a) t) (car (cdr a)) -# (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b))))) +# From Milamber Space Network (2014-06-05): +# The Moroccan government has recently announced that the country will return +# to standard time at 03:00 on Saturday, June 28, 2014 local time.... DST +# will resume again at 02:00 on Saturday, August 2, 2014.... +# http://www.mmsp.gov.ma/fr/actualites.aspx?id=586 + +# From Paul Eggert (2014-06-05): +# For now, guess that later spring and fall transitions will use 2014's rules, +# and guess that Morocco will switch to standard time at 03:00 the last +# Saturday before Ramadan, and back to DST at 02:00 the first Saturday after +# Ramadan. To implement this, transition dates for 2015 through 2037 were +# determined by running the following program under GNU Emacs 24.3, with the +# results integrated by hand into the table below. +# (let ((islamic-year 1436)) +# (while (< islamic-year 1460) +# (let ((a (calendar-islamic-to-absolute (list 9 1 islamic-year))) +# (b (calendar-islamic-to-absolute (list 10 1 islamic-year))) +# (saturday 6)) +# (while (/= saturday (mod (setq a (1- a)) 7))) +# (while (/= saturday (mod b 7)) +# (setq b (1+ b))) +# (setq a (calendar-gregorian-from-absolute a)) +# (setq b (calendar-gregorian-from-absolute b)) +# (insert +# (format +# (concat "Rule\tMorocco\t%d\tonly\t-\t%s\t%2d\t 3:00\t0\t-\n" +# "Rule\tMorocco\t%d\tonly\t-\t%s\t%2d\t 2:00\t1:00\tS\n") +# (car (cdr (cdr a))) (calendar-month-name (car a) t) (car (cdr a)) +# (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b))))) # (setq islamic-year (+ 1 islamic-year)))) -# -# with spring-forward transitions removed for 2023-2025, when the -# normal spring-forward date falls during the estimated Ramadan; with -# all transitions removed for 2026-2035, where the estimated Ramadan -# falls entirely outside daylight-saving time; and with fall-back -# transitions removed for 2036-2037, where the normal fall-back -# date falls during the estimated Ramadan. Normally, the table would -# stop after 2037 because 32-bit time_t values roll around early in 2038, -# but that would imply a prediction of perpetual DST after March 2038 -# due to the year-2037 glitches. So, this table instead stops after -# 2038, the first non-glitchy year after the 32-bit rollover. -# An advantage of stopping after 2038 is that it lets zic guess -# TZ='WET0WEST,M3.5.0,M10.5.0/3' for time stamps far in the future. # RULE NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -968,46 +996,44 @@ Rule Morocco 1978 only - Aug 4 0:00 0 Rule Morocco 2008 only - Jun 1 0:00 1:00 S Rule Morocco 2008 only - Sep 1 0:00 0 - Rule Morocco 2009 only - Jun 1 0:00 1:00 S -Rule Morocco 2009 only - Aug 21 0:00 0 - +Rule Morocco 2009 only - Aug 21 0:00 0 - Rule Morocco 2010 only - May 2 0:00 1:00 S Rule Morocco 2010 only - Aug 8 0:00 0 - Rule Morocco 2011 only - Apr 3 0:00 1:00 S -Rule Morocco 2011 only - Jul 31 0 0 - -Rule Morocco 2012 2013 - Apr lastSun 2:00 1:00 S -Rule Morocco 2012 only - Sep 30 3:00 0 - -Rule Morocco 2012 only - Jul 20 3:00 0 - -Rule Morocco 2012 only - Aug 20 2:00 1:00 S -Rule Morocco 2013 only - Jul 7 3:00 0 - -Rule Morocco 2013 only - Aug 10 2:00 1:00 S -Rule Morocco 2013 2035 - Oct lastSun 3:00 0 - -Rule Morocco 2014 2022 - Mar lastSun 2:00 1:00 S -Rule Morocco 2014 only - Jun 29 3:00 0 - -Rule Morocco 2014 only - Jul 29 2:00 1:00 S -Rule Morocco 2015 only - Jun 18 3:00 0 - -Rule Morocco 2015 only - Jul 18 2:00 1:00 S -Rule Morocco 2016 only - Jun 7 3:00 0 - -Rule Morocco 2016 only - Jul 7 2:00 1:00 S -Rule Morocco 2017 only - May 27 3:00 0 - -Rule Morocco 2017 only - Jun 26 2:00 1:00 S -Rule Morocco 2018 only - May 16 3:00 0 - -Rule Morocco 2018 only - Jun 15 2:00 1:00 S -Rule Morocco 2019 only - May 6 3:00 0 - -Rule Morocco 2019 only - Jun 5 2:00 1:00 S -Rule Morocco 2020 only - Apr 24 3:00 0 - -Rule Morocco 2020 only - May 24 2:00 1:00 S -Rule Morocco 2021 only - Apr 13 3:00 0 - -Rule Morocco 2021 only - May 13 2:00 1:00 S -Rule Morocco 2022 only - Apr 3 3:00 0 - -Rule Morocco 2022 only - May 3 2:00 1:00 S -Rule Morocco 2023 only - Apr 22 2:00 1:00 S -Rule Morocco 2024 only - Apr 10 2:00 1:00 S -Rule Morocco 2025 only - Mar 31 2:00 1:00 S -Rule Morocco 2026 max - Mar lastSun 2:00 1:00 S -Rule Morocco 2036 only - Oct 21 3:00 0 - -Rule Morocco 2037 only - Oct 11 3:00 0 - -Rule Morocco 2038 only - Sep 30 3:00 0 - -Rule Morocco 2038 only - Oct 30 2:00 1:00 S -Rule Morocco 2038 max - Oct lastSun 3:00 0 - +Rule Morocco 2011 only - Jul 31 0 0 - +Rule Morocco 2012 2013 - Apr lastSun 2:00 1:00 S +Rule Morocco 2012 only - Sep 30 3:00 0 - +Rule Morocco 2012 only - Jul 20 3:00 0 - +Rule Morocco 2012 only - Aug 20 2:00 1:00 S +Rule Morocco 2013 only - Jul 7 3:00 0 - +Rule Morocco 2013 only - Aug 10 2:00 1:00 S +Rule Morocco 2013 max - Oct lastSun 3:00 0 - +Rule Morocco 2014 2022 - Mar lastSun 2:00 1:00 S +Rule Morocco 2014 only - Jun 28 3:00 0 - +Rule Morocco 2014 only - Aug 2 2:00 1:00 S +Rule Morocco 2015 only - Jun 13 3:00 0 - +Rule Morocco 2015 only - Jul 18 2:00 1:00 S +Rule Morocco 2016 only - Jun 4 3:00 0 - +Rule Morocco 2016 only - Jul 9 2:00 1:00 S +Rule Morocco 2017 only - May 20 3:00 0 - +Rule Morocco 2017 only - Jul 1 2:00 1:00 S +Rule Morocco 2018 only - May 12 3:00 0 - +Rule Morocco 2018 only - Jun 16 2:00 1:00 S +Rule Morocco 2019 only - May 4 3:00 0 - +Rule Morocco 2019 only - Jun 8 2:00 1:00 S +Rule Morocco 2020 only - Apr 18 3:00 0 - +Rule Morocco 2020 only - May 30 2:00 1:00 S +Rule Morocco 2021 only - Apr 10 3:00 0 - +Rule Morocco 2021 only - May 15 2:00 1:00 S +Rule Morocco 2022 only - Apr 2 3:00 0 - +Rule Morocco 2022 only - May 7 2:00 1:00 S +Rule Morocco 2023 only - Apr 22 2:00 1:00 S +Rule Morocco 2024 only - Apr 13 2:00 1:00 S +Rule Morocco 2025 only - Apr 5 2:00 1:00 S +Rule Morocco 2026 max - Mar lastSun 2:00 1:00 S +Rule Morocco 2035 only - Oct 27 3:00 0 - +Rule Morocco 2036 only - Oct 18 3:00 0 - +Rule Morocco 2037 only - Oct 10 3:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26 Modified: stable/8/share/zoneinfo/australasia ============================================================================== --- stable/8/share/zoneinfo/australasia Sat Jun 14 11:37:01 2014 (r267475) +++ stable/8/share/zoneinfo/australasia Sat Jun 14 11:37:53 2014 (r267476) @@ -250,24 +250,14 @@ Zone Antarctica/Macquarie 0 - zzz 1899 N Zone Indian/Christmas 7:02:52 - LMT 1895 Feb 7:00 - CXT # Christmas Island Time -# Cook Is -# From Shanks & Pottenger: -# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Cook 1978 only - Nov 12 0:00 0:30 HS -Rule Cook 1979 1991 - Mar Sun>=1 0:00 0 - -Rule Cook 1979 1990 - Oct lastSun 0:00 0:30 HS -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Pacific/Rarotonga -10:39:04 - LMT 1901 # Avarua - -10:30 - CKT 1978 Nov 12 # Cook Is Time - -10:00 Cook CK%sT - -# Cocos +# Cocos (Keeling) Is # These islands were ruled by the Ross family from about 1830 to 1978. # We don't know when standard time was introduced; for now, we guess 1900. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Cocos 6:27:40 - LMT 1900 6:30 - CCT # Cocos Islands Time + # Fiji # Milne gives 11:55:44 for Suva. @@ -473,7 +463,8 @@ Rule NZ 1934 1940 - Apr lastSun 2:00 0 M Rule NZ 1934 1940 - Sep lastSun 2:00 0:30 S Rule NZ 1946 only - Jan 1 0:00 0 S # Since 1957 Chatham has been 45 minutes ahead of NZ, but there's no -# convenient notation for this so we must duplicate the Rule lines. +# convenient single notation for the date and time of this transition +# so we must duplicate the Rule lines. Rule NZ 1974 only - Nov Sun>=1 2:00s 1:00 D Rule Chatham 1974 only - Nov Sun>=1 2:45s 1:00 D Rule NZ 1975 only - Feb lastSun 2:00s 0 S @@ -511,6 +502,17 @@ Link Pacific/Auckland Antarctica/McMurdo # previously whalers, sealers, pastoralists, and scientific personnel wintered # was probably like Pacific/Auckland +# Cook Is +# From Shanks & Pottenger: +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Cook 1978 only - Nov 12 0:00 0:30 HS +Rule Cook 1979 1991 - Mar Sun>=1 0:00 0 - +Rule Cook 1979 1990 - Oct lastSun 0:00 0:30 HS +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Rarotonga -10:39:04 - LMT 1901 # Avarua + -10:30 - CKT 1978 Nov 12 # Cook Is Time + -10:00 Cook CK%sT + ############################################################################### Modified: stable/8/share/zoneinfo/europe ============================================================================== --- stable/8/share/zoneinfo/europe Sat Jun 14 11:37:01 2014 (r267475) +++ stable/8/share/zoneinfo/europe Sat Jun 14 11:37:53 2014 (r267476) @@ -6,7 +6,7 @@ # go ahead and edit the file (and please send any changes to # tz@iana.org for general use in the future). -# From Paul Eggert (2006-03-22): +# From Paul Eggert (2014-05-31): # A good source for time zone historical data outside the U.S. is # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). @@ -17,6 +17,9 @@ # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. # +# A reliable and entertaining source about time zones is +# Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). +# # Except where otherwise noted, Shanks & Pottenger is the source for # entries through 1991, and IATA SSIM is the source for entries afterwards. # @@ -26,9 +29,9 @@ # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), # which I found in the UCLA library. # -# # William Willett, The Waste of Daylight, 19th edition -# (1914-03) +# +# [PDF] (1914-03) # # Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94 # . He writes: @@ -58,10 +61,7 @@ # 1:00 CET CEST CEMT Central Europe # 1:00:14 SET Swedish (1879-1899)* # 2:00 EET EEST Eastern Europe -# 3:00 MSK MSD Moscow -# -# A reliable and entertaining source about time zones, especially in Britain, -# Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). +# 3:00 MSK MSD MSM* Moscow # From Peter Ilieve (1994-12-04), # The original six [EU members]: Belgium, France, (West) Germany, Italy, @@ -558,11 +558,11 @@ Rule Russia 1917 only - Dec 28 0:00 0 M Rule Russia 1918 only - May 31 22:00 2:00 MDST # Moscow Double Summer Time Rule Russia 1918 only - Sep 16 1:00 1:00 MST Rule Russia 1919 only - May 31 23:00 2:00 MDST -Rule Russia 1919 only - Jul 1 2:00 1:00 S -Rule Russia 1919 only - Aug 16 0:00 0 - -Rule Russia 1921 only - Feb 14 23:00 1:00 S -Rule Russia 1921 only - Mar 20 23:00 2:00 M # Midsummer -Rule Russia 1921 only - Sep 1 0:00 1:00 S +Rule Russia 1919 only - Jul 1 2:00 1:00 MSD +Rule Russia 1919 only - Aug 16 0:00 0 MSK +Rule Russia 1921 only - Feb 14 23:00 1:00 MSD +Rule Russia 1921 only - Mar 20 23:00 2:00 MSM # Midsummer +Rule Russia 1921 only - Sep 1 0:00 1:00 MSD Rule Russia 1921 only - Oct 1 0:00 0 - # Act No.925 of the Council of Ministers of the USSR (1980-10-24): Rule Russia 1981 1984 - Apr 1 0:00 1:00 S @@ -2217,6 +2217,7 @@ Zone Europe/Kaliningrad 1:22:00 - LMT 1 Zone Europe/Moscow 2:30:20 - LMT 1880 2:30 - MMT 1916 Jul 3 # Moscow Mean Time 2:30:48 Russia %s 1919 Jul 1 2:00 + 3:00 Russia %s 1921 Oct 3:00 Russia MSK/MSD 1922 Oct 2:00 - EET 1930 Jun 21 3:00 Russia MSK/MSD 1991 Mar 31 2:00s @@ -2375,7 +2376,7 @@ Zone Asia/Yakutsk 8:38:40 - LMT 1919 De Zone Asia/Vladivostok 8:47:44 - LMT 1922 Nov 15 9:00 - VLAT 1930 Jun 21 # Vladivostok Time 10:00 Russia VLA%sT 1991 Mar 31 2:00s - 9:00 Russia VLA%sST 1992 Jan 19 2:00s + 9:00 Russia VLA%sT 1992 Jan 19 2:00s 10:00 Russia VLA%sT 2011 Mar 27 2:00s 11:00 - VLAT Modified: stable/8/share/zoneinfo/northamerica ============================================================================== --- stable/8/share/zoneinfo/northamerica Sat Jun 14 11:37:01 2014 (r267475) +++ stable/8/share/zoneinfo/northamerica Sat Jun 14 11:37:53 2014 (r267476) @@ -1019,9 +1019,9 @@ Zone America/Menominee -5:50:27 - LMT 18 # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), # which I found in the UCLA library. # -# # William Willett, The Waste of Daylight, 19th edition -# (1914-03) +# +# [PDF] (1914-03) # # Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94 # . From owner-svn-src-stable@FreeBSD.ORG Sat Jun 14 11:46:23 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC472147; Sat, 14 Jun 2014 11:46:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7D3928FD; Sat, 14 Jun 2014 11:46:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5EBkNto031925; Sat, 14 Jun 2014 11:46:23 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5EBkMKv031921; Sat, 14 Jun 2014 11:46:22 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201406141146.s5EBkMKv031921@svn.freebsd.org> From: Edwin Groothuis Date: Sat, 14 Jun 2014 11:46:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267477 - stable/10/contrib/tzdata X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jun 2014 11:46:23 -0000 Author: edwin Date: Sat Jun 14 11:46:22 2014 New Revision: 267477 URL: http://svnweb.freebsd.org/changeset/base/267477 Log: MFC of 267473,tzdata2014e Fix historical data for Egypt. Better prediction for future Egypt / Morocco changes. Update to Cocos / Cook islands. Fix historical data for Russia. Modified: stable/10/contrib/tzdata/africa stable/10/contrib/tzdata/australasia stable/10/contrib/tzdata/europe stable/10/contrib/tzdata/northamerica Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/tzdata/africa ============================================================================== --- stable/10/contrib/tzdata/africa Sat Jun 14 11:37:53 2014 (r267476) +++ stable/10/contrib/tzdata/africa Sat Jun 14 11:46:22 2014 (r267477) @@ -239,13 +239,13 @@ Rule Egypt 1990 1994 - May 1 1:00 1:00 # http://www.worldtimezone.com/dst_news/dst_news_egypt04.html # Rule Egypt 1995 2010 - Apr lastFri 0:00s 1:00 S -Rule Egypt 1995 2005 - Sep lastThu 23:00s 0 - +Rule Egypt 1995 2005 - Sep lastThu 24:00 0 - # From Steffen Thorsen (2006-09-19): # The Egyptian Gazette, issue 41,090 (2006-09-18), page 1, reports: # Egypt will turn back clocks by one hour at the midnight of Thursday # after observing the daylight saving time since May. # http://news.gom.com.eg/gazette/pdf/2006/09/18/01.pdf -Rule Egypt 2006 only - Sep 21 23:00s 0 - +Rule Egypt 2006 only - Sep 21 24:00 0 - # From Dirk Losch (2007-08-14): # I received a mail from an airline which says that the daylight # saving time in Egypt will end in the night of 2007-09-06 to 2007-09-07. @@ -254,7 +254,7 @@ Rule Egypt 2006 only - Sep 21 23:00s 0 - # http://www.timeanddate.com/worldclock/city.html?n=53 # From Steffen Thorsen (2007-09-04): The official information...: # http://www.sis.gov.eg/En/EgyptOnline/Miscellaneous/000002/0207000000000000001580.htm -Rule Egypt 2007 only - Sep Thu>=1 23:00s 0 - +Rule Egypt 2007 only - Sep Thu>=1 24:00 0 - # From Abdelrahman Hassan (2007-09-06): # Due to the Hijri (lunar Islamic calendar) year being 11 days shorter # than the year of the Gregorian calendar, Ramadan shifts earlier each @@ -342,46 +342,77 @@ Rule Egypt 2007 only - Sep Thu>=1 23:00s # From Gunther Vermier (2015-05-13): # our Egypt office confirms that the change will be at 15 May "midnight" (24:00) -# From Paul Eggert (2014-05-13): +# From Imed Chihi (2014-06-04): +# We have finally "located" a precise official reference about the DST changes +# in Egypt. The Ministers Cabinet decision is explained at +# http://www.cabinet.gov.eg/Media/CabinetMeetingsDetails.aspx?id=347 ... +# [T]his (Arabic) site is not accessible outside Egypt, but the page ... +# translates into: "With regard to daylight saving time, it is scheduled to +# take effect at exactly twelve o'clock this evening, Thursday, 15 MAY 2014, +# to be suspended by twelve o'clock on the evening of Thursday, 26 JUN 2014, +# and re-established again at the end of the month of Ramadan, at twelve +# o'clock on the evening of Thursday, 31 JUL 2014." This statement has been +# reproduced by other (more accessible) sites[, e.g.,]... +# http://elgornal.net/news/news.aspx?id=4699258 + +# From Paul Eggert (2014-06-04): # Sarah El Deeb and Lee Keath of AP report that the Egyptian government says # the change is because of blackouts in Cairo, even though Ahram Online (cited -# above) says DST had no affect on electricity consumption. The AP story says -# DST will not be observed during Ramadan. There is no information about when -# DST will end. See: +# above) says DST had no affect on electricity consumption. There is +# no information about when DST will end this fall. See: # http://abcnews.go.com/International/wireStory/el-sissi-pushes-egyptians-line-23614833 # -# For now, guess that later transitions will use 2010's rules, and that -# Egypt will agree with Morocco (see below) about the date Ramadan starts and -# ends, though (unlike Morocco) it will switch at 00:00 standard time. In -# Egypt the spring-forward transitions are removed for 2020-2022, when the -# guessed spring-forward date falls during the estimated Ramadan, and all -# transitions removed for 2023-2038, where the estimated Ramadan falls entirely -# outside the guessed daylight-saving time. Ramadan intrudes on the guessed -# DST starting in 2039, but that's beyond our somewhat-arbitrary cutoff. - -Rule Egypt 2008 only - Aug lastThu 23:00s 0 - -Rule Egypt 2009 only - Aug 20 23:00s 0 - -Rule Egypt 2010 only - Aug 11 0:00 0 - -Rule Egypt 2010 only - Sep 10 0:00 1:00 S -Rule Egypt 2010 only - Sep lastThu 23:00s 0 - +# For now, guess that later spring and fall transitions will use +# 2010's rules, and guess that Egypt will switch to standard time at +# 24:00 the last Thursday before Ramadan, and back to DST at 00:00 the +# first Friday after Ramadan. To implement this, +# transition dates for 2015 through 2037 were determined by running +# the following program under GNU Emacs 24.3, with the results integrated +# by hand into the table below. Ramadan again intrudes on the guessed +# DST starting in 2038, but that's beyond our somewhat-arbitrary cutoff. +# (let ((islamic-year 1436)) +# (while (< islamic-year 1460) +# (let ((a (calendar-islamic-to-absolute (list 9 1 islamic-year))) +# (b (calendar-islamic-to-absolute (list 10 1 islamic-year))) +# (friday 5)) +# (while (/= friday (mod a 7)) +# (setq a (1- a))) +# (while (/= friday (mod b 7)) +# (setq b (1+ b))) +# (setq a (1- a)) +# (setq b (1- b)) +# (setq a (calendar-gregorian-from-absolute a)) +# (setq b (calendar-gregorian-from-absolute b)) +# (insert +# (format +# (concat "Rule\tEgypt\t%d\tonly\t-\t%s\t%2d\t24:00\t0\t-\n" +# "Rule\tEgypt\t%d\tonly\t-\t%s\t%2d\t24:00\t1:00\tS\n") +# (car (cdr (cdr a))) (calendar-month-name (car a) t) (car (cdr a)) +# (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b))))) +# (setq islamic-year (+ 1 islamic-year)))) +Rule Egypt 2008 only - Aug lastThu 24:00 0 - +Rule Egypt 2009 only - Aug 20 24:00 0 - +Rule Egypt 2010 only - Aug 10 24:00 0 - +Rule Egypt 2010 only - Sep 9 24:00 1:00 S +Rule Egypt 2010 only - Sep lastThu 24:00 0 - Rule Egypt 2014 only - May 15 24:00 1:00 S -Rule Egypt 2014 only - Jun 29 0:00s 0 - -Rule Egypt 2014 only - Jul 29 0:00s 1:00 S -Rule Egypt 2014 max - Sep lastThu 23:00s 0 - +Rule Egypt 2014 only - Jun 26 24:00 0 - +Rule Egypt 2014 only - Jul 31 24:00 1:00 S +Rule Egypt 2014 max - Sep lastThu 24:00 0 - Rule Egypt 2015 2019 - Apr lastFri 0:00s 1:00 S -Rule Egypt 2015 only - Jun 18 0:00s 0 - -Rule Egypt 2015 only - Jul 18 0:00s 1:00 S -Rule Egypt 2016 only - Jun 7 0:00s 0 - -Rule Egypt 2016 only - Jul 7 0:00s 1:00 S -Rule Egypt 2017 only - May 27 0:00s 0 - -Rule Egypt 2017 only - Jun 26 0:00s 1:00 S -Rule Egypt 2018 only - May 16 0:00s 0 - -Rule Egypt 2018 only - Jun 15 0:00s 1:00 S -Rule Egypt 2019 only - May 6 0:00s 0 - -Rule Egypt 2019 only - Jun 5 0:00s 1:00 S -Rule Egypt 2020 only - May 24 0:00s 1:00 S -Rule Egypt 2021 only - May 13 0:00s 1:00 S -Rule Egypt 2022 only - May 3 0:00s 1:00 S +Rule Egypt 2015 only - Jun 11 24:00 0 - +Rule Egypt 2015 only - Jul 23 24:00 1:00 S +Rule Egypt 2016 only - Jun 2 24:00 0 - +Rule Egypt 2016 only - Jul 7 24:00 1:00 S +Rule Egypt 2017 only - May 25 24:00 0 - +Rule Egypt 2017 only - Jun 29 24:00 1:00 S +Rule Egypt 2018 only - May 10 24:00 0 - +Rule Egypt 2018 only - Jun 14 24:00 1:00 S +Rule Egypt 2019 only - May 2 24:00 0 - +Rule Egypt 2019 only - Jun 6 24:00 1:00 S +Rule Egypt 2020 only - May 28 24:00 1:00 S +Rule Egypt 2021 only - May 13 24:00 1:00 S +Rule Egypt 2022 only - May 5 24:00 1:00 S Rule Egypt 2023 max - Apr lastFri 0:00s 1:00 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -914,39 +945,36 @@ Zone Indian/Mayotte 3:00:56 - LMT 1911 J # From Sebastien Willemijns (2014-03-18): # http://www.afriquinfos.com/articles/2014/3/18/maroc-heure-dete-avancez-tous-horloges-247891.asp -# From Paul Eggert (2014-03-19): -# To estimate what the Moroccan government will do in future years, -# transition dates for 2014 through 2038 were determined by running -# the following program under GNU Emacs 24.3: -# -# (let ((islamic-year 1435)) -# (while (< islamic-year 1461) -# (let ((a -# (calendar-gregorian-from-absolute -# (calendar-islamic-to-absolute (list 9 1 islamic-year)))) -# (b -# (calendar-gregorian-from-absolute -# (calendar-islamic-to-absolute (list 10 1 islamic-year))))) -# (insert -# (format -# (concat "Rule\tMorocco\t%d\tonly\t-\t%s\t %2d\t 3:00\t0\t-\n" -# "Rule\tMorocco\t%d\tonly\t-\t%s\t %2d\t 2:00\t1:00\tS\n") -# (car (cdr (cdr a))) (calendar-month-name (car a) t) (car (cdr a)) -# (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b))))) +# From Milamber Space Network (2014-06-05): +# The Moroccan government has recently announced that the country will return +# to standard time at 03:00 on Saturday, June 28, 2014 local time.... DST +# will resume again at 02:00 on Saturday, August 2, 2014.... +# http://www.mmsp.gov.ma/fr/actualites.aspx?id=586 + +# From Paul Eggert (2014-06-05): +# For now, guess that later spring and fall transitions will use 2014's rules, +# and guess that Morocco will switch to standard time at 03:00 the last +# Saturday before Ramadan, and back to DST at 02:00 the first Saturday after +# Ramadan. To implement this, transition dates for 2015 through 2037 were +# determined by running the following program under GNU Emacs 24.3, with the +# results integrated by hand into the table below. +# (let ((islamic-year 1436)) +# (while (< islamic-year 1460) +# (let ((a (calendar-islamic-to-absolute (list 9 1 islamic-year))) +# (b (calendar-islamic-to-absolute (list 10 1 islamic-year))) +# (saturday 6)) +# (while (/= saturday (mod (setq a (1- a)) 7))) +# (while (/= saturday (mod b 7)) +# (setq b (1+ b))) +# (setq a (calendar-gregorian-from-absolute a)) +# (setq b (calendar-gregorian-from-absolute b)) +# (insert +# (format +# (concat "Rule\tMorocco\t%d\tonly\t-\t%s\t%2d\t 3:00\t0\t-\n" +# "Rule\tMorocco\t%d\tonly\t-\t%s\t%2d\t 2:00\t1:00\tS\n") +# (car (cdr (cdr a))) (calendar-month-name (car a) t) (car (cdr a)) +# (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b))))) # (setq islamic-year (+ 1 islamic-year)))) -# -# with spring-forward transitions removed for 2023-2025, when the -# normal spring-forward date falls during the estimated Ramadan; with -# all transitions removed for 2026-2035, where the estimated Ramadan -# falls entirely outside daylight-saving time; and with fall-back -# transitions removed for 2036-2037, where the normal fall-back -# date falls during the estimated Ramadan. Normally, the table would -# stop after 2037 because 32-bit time_t values roll around early in 2038, -# but that would imply a prediction of perpetual DST after March 2038 -# due to the year-2037 glitches. So, this table instead stops after -# 2038, the first non-glitchy year after the 32-bit rollover. -# An advantage of stopping after 2038 is that it lets zic guess -# TZ='WET0WEST,M3.5.0,M10.5.0/3' for time stamps far in the future. # RULE NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -968,46 +996,44 @@ Rule Morocco 1978 only - Aug 4 0:00 0 Rule Morocco 2008 only - Jun 1 0:00 1:00 S Rule Morocco 2008 only - Sep 1 0:00 0 - Rule Morocco 2009 only - Jun 1 0:00 1:00 S -Rule Morocco 2009 only - Aug 21 0:00 0 - +Rule Morocco 2009 only - Aug 21 0:00 0 - Rule Morocco 2010 only - May 2 0:00 1:00 S Rule Morocco 2010 only - Aug 8 0:00 0 - Rule Morocco 2011 only - Apr 3 0:00 1:00 S -Rule Morocco 2011 only - Jul 31 0 0 - -Rule Morocco 2012 2013 - Apr lastSun 2:00 1:00 S -Rule Morocco 2012 only - Sep 30 3:00 0 - -Rule Morocco 2012 only - Jul 20 3:00 0 - -Rule Morocco 2012 only - Aug 20 2:00 1:00 S -Rule Morocco 2013 only - Jul 7 3:00 0 - -Rule Morocco 2013 only - Aug 10 2:00 1:00 S -Rule Morocco 2013 2035 - Oct lastSun 3:00 0 - -Rule Morocco 2014 2022 - Mar lastSun 2:00 1:00 S -Rule Morocco 2014 only - Jun 29 3:00 0 - -Rule Morocco 2014 only - Jul 29 2:00 1:00 S -Rule Morocco 2015 only - Jun 18 3:00 0 - -Rule Morocco 2015 only - Jul 18 2:00 1:00 S -Rule Morocco 2016 only - Jun 7 3:00 0 - -Rule Morocco 2016 only - Jul 7 2:00 1:00 S -Rule Morocco 2017 only - May 27 3:00 0 - -Rule Morocco 2017 only - Jun 26 2:00 1:00 S -Rule Morocco 2018 only - May 16 3:00 0 - -Rule Morocco 2018 only - Jun 15 2:00 1:00 S -Rule Morocco 2019 only - May 6 3:00 0 - -Rule Morocco 2019 only - Jun 5 2:00 1:00 S -Rule Morocco 2020 only - Apr 24 3:00 0 - -Rule Morocco 2020 only - May 24 2:00 1:00 S -Rule Morocco 2021 only - Apr 13 3:00 0 - -Rule Morocco 2021 only - May 13 2:00 1:00 S -Rule Morocco 2022 only - Apr 3 3:00 0 - -Rule Morocco 2022 only - May 3 2:00 1:00 S -Rule Morocco 2023 only - Apr 22 2:00 1:00 S -Rule Morocco 2024 only - Apr 10 2:00 1:00 S -Rule Morocco 2025 only - Mar 31 2:00 1:00 S -Rule Morocco 2026 max - Mar lastSun 2:00 1:00 S -Rule Morocco 2036 only - Oct 21 3:00 0 - -Rule Morocco 2037 only - Oct 11 3:00 0 - -Rule Morocco 2038 only - Sep 30 3:00 0 - -Rule Morocco 2038 only - Oct 30 2:00 1:00 S -Rule Morocco 2038 max - Oct lastSun 3:00 0 - +Rule Morocco 2011 only - Jul 31 0 0 - +Rule Morocco 2012 2013 - Apr lastSun 2:00 1:00 S +Rule Morocco 2012 only - Sep 30 3:00 0 - +Rule Morocco 2012 only - Jul 20 3:00 0 - +Rule Morocco 2012 only - Aug 20 2:00 1:00 S +Rule Morocco 2013 only - Jul 7 3:00 0 - +Rule Morocco 2013 only - Aug 10 2:00 1:00 S +Rule Morocco 2013 max - Oct lastSun 3:00 0 - +Rule Morocco 2014 2022 - Mar lastSun 2:00 1:00 S +Rule Morocco 2014 only - Jun 28 3:00 0 - +Rule Morocco 2014 only - Aug 2 2:00 1:00 S +Rule Morocco 2015 only - Jun 13 3:00 0 - +Rule Morocco 2015 only - Jul 18 2:00 1:00 S +Rule Morocco 2016 only - Jun 4 3:00 0 - +Rule Morocco 2016 only - Jul 9 2:00 1:00 S +Rule Morocco 2017 only - May 20 3:00 0 - +Rule Morocco 2017 only - Jul 1 2:00 1:00 S +Rule Morocco 2018 only - May 12 3:00 0 - +Rule Morocco 2018 only - Jun 16 2:00 1:00 S +Rule Morocco 2019 only - May 4 3:00 0 - +Rule Morocco 2019 only - Jun 8 2:00 1:00 S +Rule Morocco 2020 only - Apr 18 3:00 0 - +Rule Morocco 2020 only - May 30 2:00 1:00 S +Rule Morocco 2021 only - Apr 10 3:00 0 - +Rule Morocco 2021 only - May 15 2:00 1:00 S +Rule Morocco 2022 only - Apr 2 3:00 0 - +Rule Morocco 2022 only - May 7 2:00 1:00 S +Rule Morocco 2023 only - Apr 22 2:00 1:00 S +Rule Morocco 2024 only - Apr 13 2:00 1:00 S +Rule Morocco 2025 only - Apr 5 2:00 1:00 S +Rule Morocco 2026 max - Mar lastSun 2:00 1:00 S +Rule Morocco 2035 only - Oct 27 3:00 0 - +Rule Morocco 2036 only - Oct 18 3:00 0 - +Rule Morocco 2037 only - Oct 10 3:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26 Modified: stable/10/contrib/tzdata/australasia ============================================================================== --- stable/10/contrib/tzdata/australasia Sat Jun 14 11:37:53 2014 (r267476) +++ stable/10/contrib/tzdata/australasia Sat Jun 14 11:46:22 2014 (r267477) @@ -250,24 +250,14 @@ Zone Antarctica/Macquarie 0 - zzz 1899 N Zone Indian/Christmas 7:02:52 - LMT 1895 Feb 7:00 - CXT # Christmas Island Time -# Cook Is -# From Shanks & Pottenger: -# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Cook 1978 only - Nov 12 0:00 0:30 HS -Rule Cook 1979 1991 - Mar Sun>=1 0:00 0 - -Rule Cook 1979 1990 - Oct lastSun 0:00 0:30 HS -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Pacific/Rarotonga -10:39:04 - LMT 1901 # Avarua - -10:30 - CKT 1978 Nov 12 # Cook Is Time - -10:00 Cook CK%sT - -# Cocos +# Cocos (Keeling) Is # These islands were ruled by the Ross family from about 1830 to 1978. # We don't know when standard time was introduced; for now, we guess 1900. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Cocos 6:27:40 - LMT 1900 6:30 - CCT # Cocos Islands Time + # Fiji # Milne gives 11:55:44 for Suva. @@ -473,7 +463,8 @@ Rule NZ 1934 1940 - Apr lastSun 2:00 0 M Rule NZ 1934 1940 - Sep lastSun 2:00 0:30 S Rule NZ 1946 only - Jan 1 0:00 0 S # Since 1957 Chatham has been 45 minutes ahead of NZ, but there's no -# convenient notation for this so we must duplicate the Rule lines. +# convenient single notation for the date and time of this transition +# so we must duplicate the Rule lines. Rule NZ 1974 only - Nov Sun>=1 2:00s 1:00 D Rule Chatham 1974 only - Nov Sun>=1 2:45s 1:00 D Rule NZ 1975 only - Feb lastSun 2:00s 0 S @@ -511,6 +502,17 @@ Link Pacific/Auckland Antarctica/McMurdo # previously whalers, sealers, pastoralists, and scientific personnel wintered # was probably like Pacific/Auckland +# Cook Is +# From Shanks & Pottenger: +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Cook 1978 only - Nov 12 0:00 0:30 HS +Rule Cook 1979 1991 - Mar Sun>=1 0:00 0 - +Rule Cook 1979 1990 - Oct lastSun 0:00 0:30 HS +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Rarotonga -10:39:04 - LMT 1901 # Avarua + -10:30 - CKT 1978 Nov 12 # Cook Is Time + -10:00 Cook CK%sT + ############################################################################### Modified: stable/10/contrib/tzdata/europe ============================================================================== --- stable/10/contrib/tzdata/europe Sat Jun 14 11:37:53 2014 (r267476) +++ stable/10/contrib/tzdata/europe Sat Jun 14 11:46:22 2014 (r267477) @@ -6,7 +6,7 @@ # go ahead and edit the file (and please send any changes to # tz@iana.org for general use in the future). -# From Paul Eggert (2006-03-22): +# From Paul Eggert (2014-05-31): # A good source for time zone historical data outside the U.S. is # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). @@ -17,6 +17,9 @@ # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. # +# A reliable and entertaining source about time zones is +# Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). +# # Except where otherwise noted, Shanks & Pottenger is the source for # entries through 1991, and IATA SSIM is the source for entries afterwards. # @@ -26,9 +29,9 @@ # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), # which I found in the UCLA library. # -# # William Willett, The Waste of Daylight, 19th edition -# (1914-03) +# +# [PDF] (1914-03) # # Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94 # . He writes: @@ -58,10 +61,7 @@ # 1:00 CET CEST CEMT Central Europe # 1:00:14 SET Swedish (1879-1899)* # 2:00 EET EEST Eastern Europe -# 3:00 MSK MSD Moscow -# -# A reliable and entertaining source about time zones, especially in Britain, -# Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). +# 3:00 MSK MSD MSM* Moscow # From Peter Ilieve (1994-12-04), # The original six [EU members]: Belgium, France, (West) Germany, Italy, @@ -558,11 +558,11 @@ Rule Russia 1917 only - Dec 28 0:00 0 M Rule Russia 1918 only - May 31 22:00 2:00 MDST # Moscow Double Summer Time Rule Russia 1918 only - Sep 16 1:00 1:00 MST Rule Russia 1919 only - May 31 23:00 2:00 MDST -Rule Russia 1919 only - Jul 1 2:00 1:00 S -Rule Russia 1919 only - Aug 16 0:00 0 - -Rule Russia 1921 only - Feb 14 23:00 1:00 S -Rule Russia 1921 only - Mar 20 23:00 2:00 M # Midsummer -Rule Russia 1921 only - Sep 1 0:00 1:00 S +Rule Russia 1919 only - Jul 1 2:00 1:00 MSD +Rule Russia 1919 only - Aug 16 0:00 0 MSK +Rule Russia 1921 only - Feb 14 23:00 1:00 MSD +Rule Russia 1921 only - Mar 20 23:00 2:00 MSM # Midsummer +Rule Russia 1921 only - Sep 1 0:00 1:00 MSD Rule Russia 1921 only - Oct 1 0:00 0 - # Act No.925 of the Council of Ministers of the USSR (1980-10-24): Rule Russia 1981 1984 - Apr 1 0:00 1:00 S @@ -2217,6 +2217,7 @@ Zone Europe/Kaliningrad 1:22:00 - LMT 1 Zone Europe/Moscow 2:30:20 - LMT 1880 2:30 - MMT 1916 Jul 3 # Moscow Mean Time 2:30:48 Russia %s 1919 Jul 1 2:00 + 3:00 Russia %s 1921 Oct 3:00 Russia MSK/MSD 1922 Oct 2:00 - EET 1930 Jun 21 3:00 Russia MSK/MSD 1991 Mar 31 2:00s @@ -2375,7 +2376,7 @@ Zone Asia/Yakutsk 8:38:40 - LMT 1919 De Zone Asia/Vladivostok 8:47:44 - LMT 1922 Nov 15 9:00 - VLAT 1930 Jun 21 # Vladivostok Time 10:00 Russia VLA%sT 1991 Mar 31 2:00s - 9:00 Russia VLA%sST 1992 Jan 19 2:00s + 9:00 Russia VLA%sT 1992 Jan 19 2:00s 10:00 Russia VLA%sT 2011 Mar 27 2:00s 11:00 - VLAT Modified: stable/10/contrib/tzdata/northamerica ============================================================================== --- stable/10/contrib/tzdata/northamerica Sat Jun 14 11:37:53 2014 (r267476) +++ stable/10/contrib/tzdata/northamerica Sat Jun 14 11:46:22 2014 (r267477) @@ -1019,9 +1019,9 @@ Zone America/Menominee -5:50:27 - LMT 18 # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), # which I found in the UCLA library. # -# # William Willett, The Waste of Daylight, 19th edition -# (1914-03) +# +# [PDF] (1914-03) # # Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94 # . From owner-svn-src-stable@FreeBSD.ORG Sat Jun 14 18:48:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 773CA77B; Sat, 14 Jun 2014 18:48:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6252125BA; Sat, 14 Jun 2014 18:48:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5EImDXL023991; Sat, 14 Jun 2014 18:48:13 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5EImD6H023990; Sat, 14 Jun 2014 18:48:13 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201406141848.s5EImD6H023990@svn.freebsd.org> From: Dimitry Andric Date: Sat, 14 Jun 2014 18:48:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267484 - stable/9/lib/clang X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jun 2014 18:48:13 -0000 Author: dim Date: Sat Jun 14 18:48:12 2014 New Revision: 267484 URL: http://svnweb.freebsd.org/changeset/base/267484 Log: MFC r267335: In some scenarios, when generating llvm/clang .inc.h files, multiple source files could be passed to tblgen or clang-tblgen, leading to a "Too many positional arguments specified" error message. Fix this by replacing the too-generic ${.ALLSRC} sources with explicit paths. Reported by: rysto32@gmail.com, rodrigc Approved by: re (gjb) Modified: stable/9/lib/clang/clang.build.mk Directory Properties: stable/9/lib/clang/ (props changed) Modified: stable/9/lib/clang/clang.build.mk ============================================================================== --- stable/9/lib/clang/clang.build.mk Sat Jun 14 18:45:40 2014 (r267483) +++ stable/9/lib/clang/clang.build.mk Sat Jun 14 18:48:12 2014 (r267484) @@ -70,149 +70,160 @@ ${arch:T}Gen${hdr:H:C/$/.inc.h/}: ${LLVM Attrs.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-classes \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrDump.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-dump \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrIdentifierArg.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-identifier-arg-list \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrImpl.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-impl \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrLateParsed.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-late-parsed-list \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrList.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-list \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrParsedAttrImpl.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-parsed-attr-impl \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrParsedAttrKinds.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-parsed-attr-kinds \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrParsedAttrList.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-parsed-attr-list \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrPCHRead.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-pch-read \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrPCHWrite.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-pch-write \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrSpellings.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-spelling-list \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrSpellingListIndex.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-spelling-index \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrTemplateInstantiate.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-template-instantiate \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrTypeArg.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-type-arg-list \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Attr.td CommentCommandInfo.inc.h: ${CLANG_SRCS}/include/clang/AST/CommentCommands.td ${CLANG_TBLGEN} -gen-clang-comment-command-info \ - -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/AST/CommentCommands.td CommentCommandList.inc.h: ${CLANG_SRCS}/include/clang/AST/CommentCommands.td ${CLANG_TBLGEN} -gen-clang-comment-command-list \ - -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/AST/CommentCommands.td CommentHTMLNamedCharacterReferences.inc.h: \ ${CLANG_SRCS}/include/clang/AST/CommentHTMLNamedCharacterReferences.td ${CLANG_TBLGEN} -gen-clang-comment-html-named-character-references \ - -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/AST/CommentHTMLNamedCharacterReferences.td CommentHTMLTags.inc.h: ${CLANG_SRCS}/include/clang/AST/CommentHTMLTags.td ${CLANG_TBLGEN} -gen-clang-comment-html-tags \ - -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/AST/CommentHTMLTags.td CommentHTMLTagsProperties.inc.h: \ ${CLANG_SRCS}/include/clang/AST/CommentHTMLTags.td ${CLANG_TBLGEN} -gen-clang-comment-html-tags-properties \ - -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/AST/CommentHTMLTags.td CommentNodes.inc.h: ${CLANG_SRCS}/include/clang/Basic/CommentNodes.td ${CLANG_TBLGEN} -gen-clang-comment-nodes \ - -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Basic/CommentNodes.td DeclNodes.inc.h: ${CLANG_SRCS}/include/clang/Basic/DeclNodes.td ${CLANG_TBLGEN} -gen-clang-decl-nodes \ - -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Basic/DeclNodes.td StmtNodes.inc.h: ${CLANG_SRCS}/include/clang/Basic/StmtNodes.td ${CLANG_TBLGEN} -gen-clang-stmt-nodes \ - -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Basic/StmtNodes.td arm_neon.h: ${CLANG_SRCS}/include/clang/Basic/arm_neon.td ${CLANG_TBLGEN} -gen-arm-neon \ - -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Basic/arm_neon.td arm_neon.inc.h: ${CLANG_SRCS}/include/clang/Basic/arm_neon.td ${CLANG_TBLGEN} -gen-arm-neon-sema \ - -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Basic/arm_neon.td DiagnosticGroups.inc.h: ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td ${CLANG_TBLGEN} -gen-clang-diag-groups \ -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/\.h$/.d/} \ - -o ${.TARGET} ${.ALLSRC} + -o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td DiagnosticIndexName.inc.h: ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td ${CLANG_TBLGEN} -gen-clang-diags-index-name \ -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/\.h$/.d/} \ - -o ${.TARGET} ${.ALLSRC} + -o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td .for hdr in AST Analysis Comment Common Driver Frontend Lex Parse Sema Serialization Diagnostic${hdr}Kinds.inc.h: ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td ${CLANG_TBLGEN} -gen-clang-diags-defs -clang-component=${hdr} \ -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/\.h$/.d/} \ - -o ${.TARGET} ${.ALLSRC} + -o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td .endfor Options.inc.h: ${CLANG_SRCS}/include/clang/Driver/Options.td ${TBLGEN} -gen-opt-parser-defs \ -I ${LLVM_SRCS}/include -I ${CLANG_SRCS}/include/clang/Driver \ - -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Driver/Options.td CC1AsOptions.inc.h: ${CLANG_SRCS}/include/clang/Driver/CC1AsOptions.td ${TBLGEN} -gen-opt-parser-defs \ -I ${LLVM_SRCS}/include -I ${CLANG_SRCS}/include/clang/Driver \ - -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Driver/CC1AsOptions.td -Checkers.inc.h: ${CLANG_SRCS}/lib/StaticAnalyzer/Checkers/Checkers.td \ - ${CLANG_SRCS}/include/clang/StaticAnalyzer/Checkers/CheckerBase.td +Checkers.inc.h: ${CLANG_SRCS}/lib/StaticAnalyzer/Checkers/Checkers.td ${CLANG_TBLGEN} -gen-clang-sa-checkers \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/lib/StaticAnalyzer/Checkers/Checkers.td From owner-svn-src-stable@FreeBSD.ORG Sun Jun 15 00:53:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9F8ACC4; Sun, 15 Jun 2014 00:53:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 953612E87; Sun, 15 Jun 2014 00:53:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5F0rPj3093113; Sun, 15 Jun 2014 00:53:25 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5F0rOHm093108; Sun, 15 Jun 2014 00:53:24 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201406150053.s5F0rOHm093108@svn.freebsd.org> From: Edwin Groothuis Date: Sun, 15 Jun 2014 00:53:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267489 - stable/9/contrib/tzdata X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jun 2014 00:53:25 -0000 Author: edwin Date: Sun Jun 15 00:53:24 2014 New Revision: 267489 URL: http://svnweb.freebsd.org/changeset/base/267489 Log: MFC of 267473,tzdata2014e Fix historical data for Egypt. Better prediction for future Egypt / Morocco changes. Update to Cocos / Cook islands. Fix historical data for Russia. Approved by: re (gjb) Modified: stable/9/contrib/tzdata/africa stable/9/contrib/tzdata/australasia stable/9/contrib/tzdata/europe stable/9/contrib/tzdata/northamerica Directory Properties: stable/9/contrib/tzdata/ (props changed) Modified: stable/9/contrib/tzdata/africa ============================================================================== --- stable/9/contrib/tzdata/africa Sat Jun 14 23:36:17 2014 (r267488) +++ stable/9/contrib/tzdata/africa Sun Jun 15 00:53:24 2014 (r267489) @@ -239,13 +239,13 @@ Rule Egypt 1990 1994 - May 1 1:00 1:00 # http://www.worldtimezone.com/dst_news/dst_news_egypt04.html # Rule Egypt 1995 2010 - Apr lastFri 0:00s 1:00 S -Rule Egypt 1995 2005 - Sep lastThu 23:00s 0 - +Rule Egypt 1995 2005 - Sep lastThu 24:00 0 - # From Steffen Thorsen (2006-09-19): # The Egyptian Gazette, issue 41,090 (2006-09-18), page 1, reports: # Egypt will turn back clocks by one hour at the midnight of Thursday # after observing the daylight saving time since May. # http://news.gom.com.eg/gazette/pdf/2006/09/18/01.pdf -Rule Egypt 2006 only - Sep 21 23:00s 0 - +Rule Egypt 2006 only - Sep 21 24:00 0 - # From Dirk Losch (2007-08-14): # I received a mail from an airline which says that the daylight # saving time in Egypt will end in the night of 2007-09-06 to 2007-09-07. @@ -254,7 +254,7 @@ Rule Egypt 2006 only - Sep 21 23:00s 0 - # http://www.timeanddate.com/worldclock/city.html?n=53 # From Steffen Thorsen (2007-09-04): The official information...: # http://www.sis.gov.eg/En/EgyptOnline/Miscellaneous/000002/0207000000000000001580.htm -Rule Egypt 2007 only - Sep Thu>=1 23:00s 0 - +Rule Egypt 2007 only - Sep Thu>=1 24:00 0 - # From Abdelrahman Hassan (2007-09-06): # Due to the Hijri (lunar Islamic calendar) year being 11 days shorter # than the year of the Gregorian calendar, Ramadan shifts earlier each @@ -342,46 +342,77 @@ Rule Egypt 2007 only - Sep Thu>=1 23:00s # From Gunther Vermier (2015-05-13): # our Egypt office confirms that the change will be at 15 May "midnight" (24:00) -# From Paul Eggert (2014-05-13): +# From Imed Chihi (2014-06-04): +# We have finally "located" a precise official reference about the DST changes +# in Egypt. The Ministers Cabinet decision is explained at +# http://www.cabinet.gov.eg/Media/CabinetMeetingsDetails.aspx?id=347 ... +# [T]his (Arabic) site is not accessible outside Egypt, but the page ... +# translates into: "With regard to daylight saving time, it is scheduled to +# take effect at exactly twelve o'clock this evening, Thursday, 15 MAY 2014, +# to be suspended by twelve o'clock on the evening of Thursday, 26 JUN 2014, +# and re-established again at the end of the month of Ramadan, at twelve +# o'clock on the evening of Thursday, 31 JUL 2014." This statement has been +# reproduced by other (more accessible) sites[, e.g.,]... +# http://elgornal.net/news/news.aspx?id=4699258 + +# From Paul Eggert (2014-06-04): # Sarah El Deeb and Lee Keath of AP report that the Egyptian government says # the change is because of blackouts in Cairo, even though Ahram Online (cited -# above) says DST had no affect on electricity consumption. The AP story says -# DST will not be observed during Ramadan. There is no information about when -# DST will end. See: +# above) says DST had no affect on electricity consumption. There is +# no information about when DST will end this fall. See: # http://abcnews.go.com/International/wireStory/el-sissi-pushes-egyptians-line-23614833 # -# For now, guess that later transitions will use 2010's rules, and that -# Egypt will agree with Morocco (see below) about the date Ramadan starts and -# ends, though (unlike Morocco) it will switch at 00:00 standard time. In -# Egypt the spring-forward transitions are removed for 2020-2022, when the -# guessed spring-forward date falls during the estimated Ramadan, and all -# transitions removed for 2023-2038, where the estimated Ramadan falls entirely -# outside the guessed daylight-saving time. Ramadan intrudes on the guessed -# DST starting in 2039, but that's beyond our somewhat-arbitrary cutoff. - -Rule Egypt 2008 only - Aug lastThu 23:00s 0 - -Rule Egypt 2009 only - Aug 20 23:00s 0 - -Rule Egypt 2010 only - Aug 11 0:00 0 - -Rule Egypt 2010 only - Sep 10 0:00 1:00 S -Rule Egypt 2010 only - Sep lastThu 23:00s 0 - +# For now, guess that later spring and fall transitions will use +# 2010's rules, and guess that Egypt will switch to standard time at +# 24:00 the last Thursday before Ramadan, and back to DST at 00:00 the +# first Friday after Ramadan. To implement this, +# transition dates for 2015 through 2037 were determined by running +# the following program under GNU Emacs 24.3, with the results integrated +# by hand into the table below. Ramadan again intrudes on the guessed +# DST starting in 2038, but that's beyond our somewhat-arbitrary cutoff. +# (let ((islamic-year 1436)) +# (while (< islamic-year 1460) +# (let ((a (calendar-islamic-to-absolute (list 9 1 islamic-year))) +# (b (calendar-islamic-to-absolute (list 10 1 islamic-year))) +# (friday 5)) +# (while (/= friday (mod a 7)) +# (setq a (1- a))) +# (while (/= friday (mod b 7)) +# (setq b (1+ b))) +# (setq a (1- a)) +# (setq b (1- b)) +# (setq a (calendar-gregorian-from-absolute a)) +# (setq b (calendar-gregorian-from-absolute b)) +# (insert +# (format +# (concat "Rule\tEgypt\t%d\tonly\t-\t%s\t%2d\t24:00\t0\t-\n" +# "Rule\tEgypt\t%d\tonly\t-\t%s\t%2d\t24:00\t1:00\tS\n") +# (car (cdr (cdr a))) (calendar-month-name (car a) t) (car (cdr a)) +# (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b))))) +# (setq islamic-year (+ 1 islamic-year)))) +Rule Egypt 2008 only - Aug lastThu 24:00 0 - +Rule Egypt 2009 only - Aug 20 24:00 0 - +Rule Egypt 2010 only - Aug 10 24:00 0 - +Rule Egypt 2010 only - Sep 9 24:00 1:00 S +Rule Egypt 2010 only - Sep lastThu 24:00 0 - Rule Egypt 2014 only - May 15 24:00 1:00 S -Rule Egypt 2014 only - Jun 29 0:00s 0 - -Rule Egypt 2014 only - Jul 29 0:00s 1:00 S -Rule Egypt 2014 max - Sep lastThu 23:00s 0 - +Rule Egypt 2014 only - Jun 26 24:00 0 - +Rule Egypt 2014 only - Jul 31 24:00 1:00 S +Rule Egypt 2014 max - Sep lastThu 24:00 0 - Rule Egypt 2015 2019 - Apr lastFri 0:00s 1:00 S -Rule Egypt 2015 only - Jun 18 0:00s 0 - -Rule Egypt 2015 only - Jul 18 0:00s 1:00 S -Rule Egypt 2016 only - Jun 7 0:00s 0 - -Rule Egypt 2016 only - Jul 7 0:00s 1:00 S -Rule Egypt 2017 only - May 27 0:00s 0 - -Rule Egypt 2017 only - Jun 26 0:00s 1:00 S -Rule Egypt 2018 only - May 16 0:00s 0 - -Rule Egypt 2018 only - Jun 15 0:00s 1:00 S -Rule Egypt 2019 only - May 6 0:00s 0 - -Rule Egypt 2019 only - Jun 5 0:00s 1:00 S -Rule Egypt 2020 only - May 24 0:00s 1:00 S -Rule Egypt 2021 only - May 13 0:00s 1:00 S -Rule Egypt 2022 only - May 3 0:00s 1:00 S +Rule Egypt 2015 only - Jun 11 24:00 0 - +Rule Egypt 2015 only - Jul 23 24:00 1:00 S +Rule Egypt 2016 only - Jun 2 24:00 0 - +Rule Egypt 2016 only - Jul 7 24:00 1:00 S +Rule Egypt 2017 only - May 25 24:00 0 - +Rule Egypt 2017 only - Jun 29 24:00 1:00 S +Rule Egypt 2018 only - May 10 24:00 0 - +Rule Egypt 2018 only - Jun 14 24:00 1:00 S +Rule Egypt 2019 only - May 2 24:00 0 - +Rule Egypt 2019 only - Jun 6 24:00 1:00 S +Rule Egypt 2020 only - May 28 24:00 1:00 S +Rule Egypt 2021 only - May 13 24:00 1:00 S +Rule Egypt 2022 only - May 5 24:00 1:00 S Rule Egypt 2023 max - Apr lastFri 0:00s 1:00 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -914,39 +945,36 @@ Zone Indian/Mayotte 3:00:56 - LMT 1911 J # From Sebastien Willemijns (2014-03-18): # http://www.afriquinfos.com/articles/2014/3/18/maroc-heure-dete-avancez-tous-horloges-247891.asp -# From Paul Eggert (2014-03-19): -# To estimate what the Moroccan government will do in future years, -# transition dates for 2014 through 2038 were determined by running -# the following program under GNU Emacs 24.3: -# -# (let ((islamic-year 1435)) -# (while (< islamic-year 1461) -# (let ((a -# (calendar-gregorian-from-absolute -# (calendar-islamic-to-absolute (list 9 1 islamic-year)))) -# (b -# (calendar-gregorian-from-absolute -# (calendar-islamic-to-absolute (list 10 1 islamic-year))))) -# (insert -# (format -# (concat "Rule\tMorocco\t%d\tonly\t-\t%s\t %2d\t 3:00\t0\t-\n" -# "Rule\tMorocco\t%d\tonly\t-\t%s\t %2d\t 2:00\t1:00\tS\n") -# (car (cdr (cdr a))) (calendar-month-name (car a) t) (car (cdr a)) -# (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b))))) +# From Milamber Space Network (2014-06-05): +# The Moroccan government has recently announced that the country will return +# to standard time at 03:00 on Saturday, June 28, 2014 local time.... DST +# will resume again at 02:00 on Saturday, August 2, 2014.... +# http://www.mmsp.gov.ma/fr/actualites.aspx?id=586 + +# From Paul Eggert (2014-06-05): +# For now, guess that later spring and fall transitions will use 2014's rules, +# and guess that Morocco will switch to standard time at 03:00 the last +# Saturday before Ramadan, and back to DST at 02:00 the first Saturday after +# Ramadan. To implement this, transition dates for 2015 through 2037 were +# determined by running the following program under GNU Emacs 24.3, with the +# results integrated by hand into the table below. +# (let ((islamic-year 1436)) +# (while (< islamic-year 1460) +# (let ((a (calendar-islamic-to-absolute (list 9 1 islamic-year))) +# (b (calendar-islamic-to-absolute (list 10 1 islamic-year))) +# (saturday 6)) +# (while (/= saturday (mod (setq a (1- a)) 7))) +# (while (/= saturday (mod b 7)) +# (setq b (1+ b))) +# (setq a (calendar-gregorian-from-absolute a)) +# (setq b (calendar-gregorian-from-absolute b)) +# (insert +# (format +# (concat "Rule\tMorocco\t%d\tonly\t-\t%s\t%2d\t 3:00\t0\t-\n" +# "Rule\tMorocco\t%d\tonly\t-\t%s\t%2d\t 2:00\t1:00\tS\n") +# (car (cdr (cdr a))) (calendar-month-name (car a) t) (car (cdr a)) +# (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b))))) # (setq islamic-year (+ 1 islamic-year)))) -# -# with spring-forward transitions removed for 2023-2025, when the -# normal spring-forward date falls during the estimated Ramadan; with -# all transitions removed for 2026-2035, where the estimated Ramadan -# falls entirely outside daylight-saving time; and with fall-back -# transitions removed for 2036-2037, where the normal fall-back -# date falls during the estimated Ramadan. Normally, the table would -# stop after 2037 because 32-bit time_t values roll around early in 2038, -# but that would imply a prediction of perpetual DST after March 2038 -# due to the year-2037 glitches. So, this table instead stops after -# 2038, the first non-glitchy year after the 32-bit rollover. -# An advantage of stopping after 2038 is that it lets zic guess -# TZ='WET0WEST,M3.5.0,M10.5.0/3' for time stamps far in the future. # RULE NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -968,46 +996,44 @@ Rule Morocco 1978 only - Aug 4 0:00 0 Rule Morocco 2008 only - Jun 1 0:00 1:00 S Rule Morocco 2008 only - Sep 1 0:00 0 - Rule Morocco 2009 only - Jun 1 0:00 1:00 S -Rule Morocco 2009 only - Aug 21 0:00 0 - +Rule Morocco 2009 only - Aug 21 0:00 0 - Rule Morocco 2010 only - May 2 0:00 1:00 S Rule Morocco 2010 only - Aug 8 0:00 0 - Rule Morocco 2011 only - Apr 3 0:00 1:00 S -Rule Morocco 2011 only - Jul 31 0 0 - -Rule Morocco 2012 2013 - Apr lastSun 2:00 1:00 S -Rule Morocco 2012 only - Sep 30 3:00 0 - -Rule Morocco 2012 only - Jul 20 3:00 0 - -Rule Morocco 2012 only - Aug 20 2:00 1:00 S -Rule Morocco 2013 only - Jul 7 3:00 0 - -Rule Morocco 2013 only - Aug 10 2:00 1:00 S -Rule Morocco 2013 2035 - Oct lastSun 3:00 0 - -Rule Morocco 2014 2022 - Mar lastSun 2:00 1:00 S -Rule Morocco 2014 only - Jun 29 3:00 0 - -Rule Morocco 2014 only - Jul 29 2:00 1:00 S -Rule Morocco 2015 only - Jun 18 3:00 0 - -Rule Morocco 2015 only - Jul 18 2:00 1:00 S -Rule Morocco 2016 only - Jun 7 3:00 0 - -Rule Morocco 2016 only - Jul 7 2:00 1:00 S -Rule Morocco 2017 only - May 27 3:00 0 - -Rule Morocco 2017 only - Jun 26 2:00 1:00 S -Rule Morocco 2018 only - May 16 3:00 0 - -Rule Morocco 2018 only - Jun 15 2:00 1:00 S -Rule Morocco 2019 only - May 6 3:00 0 - -Rule Morocco 2019 only - Jun 5 2:00 1:00 S -Rule Morocco 2020 only - Apr 24 3:00 0 - -Rule Morocco 2020 only - May 24 2:00 1:00 S -Rule Morocco 2021 only - Apr 13 3:00 0 - -Rule Morocco 2021 only - May 13 2:00 1:00 S -Rule Morocco 2022 only - Apr 3 3:00 0 - -Rule Morocco 2022 only - May 3 2:00 1:00 S -Rule Morocco 2023 only - Apr 22 2:00 1:00 S -Rule Morocco 2024 only - Apr 10 2:00 1:00 S -Rule Morocco 2025 only - Mar 31 2:00 1:00 S -Rule Morocco 2026 max - Mar lastSun 2:00 1:00 S -Rule Morocco 2036 only - Oct 21 3:00 0 - -Rule Morocco 2037 only - Oct 11 3:00 0 - -Rule Morocco 2038 only - Sep 30 3:00 0 - -Rule Morocco 2038 only - Oct 30 2:00 1:00 S -Rule Morocco 2038 max - Oct lastSun 3:00 0 - +Rule Morocco 2011 only - Jul 31 0 0 - +Rule Morocco 2012 2013 - Apr lastSun 2:00 1:00 S +Rule Morocco 2012 only - Sep 30 3:00 0 - +Rule Morocco 2012 only - Jul 20 3:00 0 - +Rule Morocco 2012 only - Aug 20 2:00 1:00 S +Rule Morocco 2013 only - Jul 7 3:00 0 - +Rule Morocco 2013 only - Aug 10 2:00 1:00 S +Rule Morocco 2013 max - Oct lastSun 3:00 0 - +Rule Morocco 2014 2022 - Mar lastSun 2:00 1:00 S +Rule Morocco 2014 only - Jun 28 3:00 0 - +Rule Morocco 2014 only - Aug 2 2:00 1:00 S +Rule Morocco 2015 only - Jun 13 3:00 0 - +Rule Morocco 2015 only - Jul 18 2:00 1:00 S +Rule Morocco 2016 only - Jun 4 3:00 0 - +Rule Morocco 2016 only - Jul 9 2:00 1:00 S +Rule Morocco 2017 only - May 20 3:00 0 - +Rule Morocco 2017 only - Jul 1 2:00 1:00 S +Rule Morocco 2018 only - May 12 3:00 0 - +Rule Morocco 2018 only - Jun 16 2:00 1:00 S +Rule Morocco 2019 only - May 4 3:00 0 - +Rule Morocco 2019 only - Jun 8 2:00 1:00 S +Rule Morocco 2020 only - Apr 18 3:00 0 - +Rule Morocco 2020 only - May 30 2:00 1:00 S +Rule Morocco 2021 only - Apr 10 3:00 0 - +Rule Morocco 2021 only - May 15 2:00 1:00 S +Rule Morocco 2022 only - Apr 2 3:00 0 - +Rule Morocco 2022 only - May 7 2:00 1:00 S +Rule Morocco 2023 only - Apr 22 2:00 1:00 S +Rule Morocco 2024 only - Apr 13 2:00 1:00 S +Rule Morocco 2025 only - Apr 5 2:00 1:00 S +Rule Morocco 2026 max - Mar lastSun 2:00 1:00 S +Rule Morocco 2035 only - Oct 27 3:00 0 - +Rule Morocco 2036 only - Oct 18 3:00 0 - +Rule Morocco 2037 only - Oct 10 3:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26 Modified: stable/9/contrib/tzdata/australasia ============================================================================== --- stable/9/contrib/tzdata/australasia Sat Jun 14 23:36:17 2014 (r267488) +++ stable/9/contrib/tzdata/australasia Sun Jun 15 00:53:24 2014 (r267489) @@ -250,24 +250,14 @@ Zone Antarctica/Macquarie 0 - zzz 1899 N Zone Indian/Christmas 7:02:52 - LMT 1895 Feb 7:00 - CXT # Christmas Island Time -# Cook Is -# From Shanks & Pottenger: -# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Cook 1978 only - Nov 12 0:00 0:30 HS -Rule Cook 1979 1991 - Mar Sun>=1 0:00 0 - -Rule Cook 1979 1990 - Oct lastSun 0:00 0:30 HS -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Pacific/Rarotonga -10:39:04 - LMT 1901 # Avarua - -10:30 - CKT 1978 Nov 12 # Cook Is Time - -10:00 Cook CK%sT - -# Cocos +# Cocos (Keeling) Is # These islands were ruled by the Ross family from about 1830 to 1978. # We don't know when standard time was introduced; for now, we guess 1900. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Cocos 6:27:40 - LMT 1900 6:30 - CCT # Cocos Islands Time + # Fiji # Milne gives 11:55:44 for Suva. @@ -473,7 +463,8 @@ Rule NZ 1934 1940 - Apr lastSun 2:00 0 M Rule NZ 1934 1940 - Sep lastSun 2:00 0:30 S Rule NZ 1946 only - Jan 1 0:00 0 S # Since 1957 Chatham has been 45 minutes ahead of NZ, but there's no -# convenient notation for this so we must duplicate the Rule lines. +# convenient single notation for the date and time of this transition +# so we must duplicate the Rule lines. Rule NZ 1974 only - Nov Sun>=1 2:00s 1:00 D Rule Chatham 1974 only - Nov Sun>=1 2:45s 1:00 D Rule NZ 1975 only - Feb lastSun 2:00s 0 S @@ -511,6 +502,17 @@ Link Pacific/Auckland Antarctica/McMurdo # previously whalers, sealers, pastoralists, and scientific personnel wintered # was probably like Pacific/Auckland +# Cook Is +# From Shanks & Pottenger: +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Cook 1978 only - Nov 12 0:00 0:30 HS +Rule Cook 1979 1991 - Mar Sun>=1 0:00 0 - +Rule Cook 1979 1990 - Oct lastSun 0:00 0:30 HS +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Rarotonga -10:39:04 - LMT 1901 # Avarua + -10:30 - CKT 1978 Nov 12 # Cook Is Time + -10:00 Cook CK%sT + ############################################################################### Modified: stable/9/contrib/tzdata/europe ============================================================================== --- stable/9/contrib/tzdata/europe Sat Jun 14 23:36:17 2014 (r267488) +++ stable/9/contrib/tzdata/europe Sun Jun 15 00:53:24 2014 (r267489) @@ -6,7 +6,7 @@ # go ahead and edit the file (and please send any changes to # tz@iana.org for general use in the future). -# From Paul Eggert (2006-03-22): +# From Paul Eggert (2014-05-31): # A good source for time zone historical data outside the U.S. is # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). @@ -17,6 +17,9 @@ # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. # +# A reliable and entertaining source about time zones is +# Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). +# # Except where otherwise noted, Shanks & Pottenger is the source for # entries through 1991, and IATA SSIM is the source for entries afterwards. # @@ -26,9 +29,9 @@ # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), # which I found in the UCLA library. # -# # William Willett, The Waste of Daylight, 19th edition -# (1914-03) +# +# [PDF] (1914-03) # # Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94 # . He writes: @@ -58,10 +61,7 @@ # 1:00 CET CEST CEMT Central Europe # 1:00:14 SET Swedish (1879-1899)* # 2:00 EET EEST Eastern Europe -# 3:00 MSK MSD Moscow -# -# A reliable and entertaining source about time zones, especially in Britain, -# Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). +# 3:00 MSK MSD MSM* Moscow # From Peter Ilieve (1994-12-04), # The original six [EU members]: Belgium, France, (West) Germany, Italy, @@ -558,11 +558,11 @@ Rule Russia 1917 only - Dec 28 0:00 0 M Rule Russia 1918 only - May 31 22:00 2:00 MDST # Moscow Double Summer Time Rule Russia 1918 only - Sep 16 1:00 1:00 MST Rule Russia 1919 only - May 31 23:00 2:00 MDST -Rule Russia 1919 only - Jul 1 2:00 1:00 S -Rule Russia 1919 only - Aug 16 0:00 0 - -Rule Russia 1921 only - Feb 14 23:00 1:00 S -Rule Russia 1921 only - Mar 20 23:00 2:00 M # Midsummer -Rule Russia 1921 only - Sep 1 0:00 1:00 S +Rule Russia 1919 only - Jul 1 2:00 1:00 MSD +Rule Russia 1919 only - Aug 16 0:00 0 MSK +Rule Russia 1921 only - Feb 14 23:00 1:00 MSD +Rule Russia 1921 only - Mar 20 23:00 2:00 MSM # Midsummer +Rule Russia 1921 only - Sep 1 0:00 1:00 MSD Rule Russia 1921 only - Oct 1 0:00 0 - # Act No.925 of the Council of Ministers of the USSR (1980-10-24): Rule Russia 1981 1984 - Apr 1 0:00 1:00 S @@ -2217,6 +2217,7 @@ Zone Europe/Kaliningrad 1:22:00 - LMT 1 Zone Europe/Moscow 2:30:20 - LMT 1880 2:30 - MMT 1916 Jul 3 # Moscow Mean Time 2:30:48 Russia %s 1919 Jul 1 2:00 + 3:00 Russia %s 1921 Oct 3:00 Russia MSK/MSD 1922 Oct 2:00 - EET 1930 Jun 21 3:00 Russia MSK/MSD 1991 Mar 31 2:00s @@ -2375,7 +2376,7 @@ Zone Asia/Yakutsk 8:38:40 - LMT 1919 De Zone Asia/Vladivostok 8:47:44 - LMT 1922 Nov 15 9:00 - VLAT 1930 Jun 21 # Vladivostok Time 10:00 Russia VLA%sT 1991 Mar 31 2:00s - 9:00 Russia VLA%sST 1992 Jan 19 2:00s + 9:00 Russia VLA%sT 1992 Jan 19 2:00s 10:00 Russia VLA%sT 2011 Mar 27 2:00s 11:00 - VLAT Modified: stable/9/contrib/tzdata/northamerica ============================================================================== --- stable/9/contrib/tzdata/northamerica Sat Jun 14 23:36:17 2014 (r267488) +++ stable/9/contrib/tzdata/northamerica Sun Jun 15 00:53:24 2014 (r267489) @@ -1019,9 +1019,9 @@ Zone America/Menominee -5:50:27 - LMT 18 # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), # which I found in the UCLA library. # -# # William Willett, The Waste of Daylight, 19th edition -# (1914-03) +# +# [PDF] (1914-03) # # Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94 # . From owner-svn-src-stable@FreeBSD.ORG Sun Jun 15 05:15:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0A4EF75; Sun, 15 Jun 2014 05:15:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D286221A; Sun, 15 Jun 2014 05:15:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5F5FdZd014453; Sun, 15 Jun 2014 05:15:39 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5F5Fcbj014446; Sun, 15 Jun 2014 05:15:38 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201406150515.s5F5Fcbj014446@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 15 Jun 2014 05:15:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267494 - in stable/10/sys: conf kern modules/ufs ufs/ffs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jun 2014 05:15:39 -0000 Author: kib Date: Sun Jun 15 05:15:38 2014 New Revision: 267494 URL: http://svnweb.freebsd.org/changeset/base/267494 Log: MFC r267226: Initialize the pbuf counter for directio using SYSINIT. Mark ffs_rawread.c as requiring both ffs and directio options to be compiled into the kernel. Add ffs_rawread.c to the list of ufs.ko module' sources. Modified: stable/10/sys/conf/files stable/10/sys/kern/vfs_bio.c stable/10/sys/modules/ufs/Makefile stable/10/sys/ufs/ffs/ffs_rawread.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Sun Jun 15 05:07:01 2014 (r267493) +++ stable/10/sys/conf/files Sun Jun 15 05:15:38 2014 (r267494) @@ -3910,7 +3910,7 @@ ufs/ffs/ffs_subr.c optional ffs ufs/ffs/ffs_tables.c optional ffs ufs/ffs/ffs_vfsops.c optional ffs ufs/ffs/ffs_vnops.c optional ffs -ufs/ffs/ffs_rawread.c optional directio +ufs/ffs/ffs_rawread.c optional ffs directio ufs/ffs/ffs_suspend.c optional ffs ufs/ufs/ufs_acl.c optional ffs ufs/ufs/ufs_bmap.c optional ffs Modified: stable/10/sys/kern/vfs_bio.c ============================================================================== --- stable/10/sys/kern/vfs_bio.c Sun Jun 15 05:07:01 2014 (r267493) +++ stable/10/sys/kern/vfs_bio.c Sun Jun 15 05:15:38 2014 (r267494) @@ -77,7 +77,6 @@ __FBSDID("$FreeBSD$"); #include #include #include "opt_compat.h" -#include "opt_directio.h" #include "opt_swap.h" static MALLOC_DEFINE(M_BIOBUF, "biobuf", "BIO buffer"); @@ -351,10 +350,6 @@ sysctl_bufspace(SYSCTL_HANDLER_ARGS) } #endif -#ifdef DIRECTIO -extern void ffs_rawread_setup(void); -#endif /* DIRECTIO */ - /* * bqlock: * @@ -739,9 +734,6 @@ kern_vfs_bio_buffer_alloc(caddr_t v, lon if (nswbuf < NSWBUF_MIN) nswbuf = NSWBUF_MIN; #endif -#ifdef DIRECTIO - ffs_rawread_setup(); -#endif /* * Reserve space for the buffer cache buffers Modified: stable/10/sys/modules/ufs/Makefile ============================================================================== --- stable/10/sys/modules/ufs/Makefile Sun Jun 15 05:07:01 2014 (r267493) +++ stable/10/sys/modules/ufs/Makefile Sun Jun 15 05:15:38 2014 (r267494) @@ -6,9 +6,9 @@ KMOD= ufs SRCS= opt_ddb.h opt_directio.h opt_ffs.h opt_quota.h opt_suiddir.h opt_ufs.h \ vnode_if.h ufs_acl.c ufs_bmap.c ufs_dirhash.c ufs_extattr.c \ ufs_gjournal.c ufs_inode.c ufs_lookup.c ufs_quota.c ufs_vfsops.c \ - ufs_vnops.c ffs_alloc.c ffs_balloc.c ffs_inode.c ffs_snapshot.c \ - ffs_softdep.c ffs_subr.c ffs_suspend.c ffs_tables.c ffs_vfsops.c \ - ffs_vnops.c + ufs_vnops.c ffs_alloc.c ffs_balloc.c ffs_inode.c ffs_rawread.c \ + ffs_snapshot.c ffs_softdep.c ffs_subr.c ffs_suspend.c ffs_tables.c \ + ffs_vfsops.c ffs_vnops.c .if !defined(KERNBUILDDIR) CFLAGS+= -DSOFTUPDATES -DUFS_DIRHASH Modified: stable/10/sys/ufs/ffs/ffs_rawread.c ============================================================================== --- stable/10/sys/ufs/ffs/ffs_rawread.c Sun Jun 15 05:07:01 2014 (r267493) +++ stable/10/sys/ufs/ffs/ffs_rawread.c Sun Jun 15 05:15:38 2014 (r267494) @@ -71,8 +71,6 @@ static int ffs_rawread_sync(struct vnode int ffs_rawread(struct vnode *vp, struct uio *uio, int *workdone); -void ffs_rawread_setup(void); - SYSCTL_DECL(_vfs_ffs); static int ffsrawbufcnt = 4; @@ -87,13 +85,13 @@ static int rawreadahead = 1; SYSCTL_INT(_vfs_ffs, OID_AUTO, rawreadahead, CTLFLAG_RW, &rawreadahead, 0, "Flag to enable readahead for long raw reads"); - -void -ffs_rawread_setup(void) +static void +ffs_rawread_setup(void *arg __unused) { + ffsrawbufcnt = (nswbuf > 100 ) ? (nswbuf - (nswbuf >> 4)) : nswbuf - 8; } - +SYSINIT(ffs_raw, SI_SUB_VM_CONF, SI_ORDER_ANY, ffs_rawread_setup, NULL); static int ffs_rawread_sync(struct vnode *vp) From owner-svn-src-stable@FreeBSD.ORG Sun Jun 15 05:17:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7BBA2137; Sun, 15 Jun 2014 05:17:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 696192225; Sun, 15 Jun 2014 05:17:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5F5Hfc1014797; Sun, 15 Jun 2014 05:17:41 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5F5HfSr014796; Sun, 15 Jun 2014 05:17:41 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201406150517.s5F5HfSr014796@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 15 Jun 2014 05:17:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267495 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jun 2014 05:17:41 -0000 Author: kib Date: Sun Jun 15 05:17:40 2014 New Revision: 267495 URL: http://svnweb.freebsd.org/changeset/base/267495 Log: MFC r267227: Remove write-only local variable. Modified: stable/10/sys/kern/sched_ule.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/sched_ule.c ============================================================================== --- stable/10/sys/kern/sched_ule.c Sun Jun 15 05:15:38 2014 (r267494) +++ stable/10/sys/kern/sched_ule.c Sun Jun 15 05:17:40 2014 (r267495) @@ -2691,7 +2691,6 @@ sched_throw(struct thread *td) void sched_fork_exit(struct thread *td) { - struct td_sched *ts; struct tdq *tdq; int cpuid; @@ -2701,7 +2700,6 @@ sched_fork_exit(struct thread *td) */ cpuid = PCPU_GET(cpuid); tdq = TDQ_CPU(cpuid); - ts = td->td_sched; if (TD_IS_IDLETHREAD(td)) td->td_lock = TDQ_LOCKPTR(tdq); MPASS(td->td_lock == TDQ_LOCKPTR(tdq)); From owner-svn-src-stable@FreeBSD.ORG Sun Jun 15 18:32:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 520698E2; Sun, 15 Jun 2014 18:32:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DF49259B; Sun, 15 Jun 2014 18:32:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5FIW35Z086762; Sun, 15 Jun 2014 18:32:03 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5FIW3cY086761; Sun, 15 Jun 2014 18:32:03 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201406151832.s5FIW3cY086761@svn.freebsd.org> From: Hans Petter Selasky Date: Sun, 15 Jun 2014 18:32:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267517 - stable/10/sys/ofed/include/linux X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jun 2014 18:32:03 -0000 Author: hselasky Date: Sun Jun 15 18:32:02 2014 New Revision: 267517 URL: http://svnweb.freebsd.org/changeset/base/267517 Log: MFC r267395: - Fix out of range shifting bug in bitops.h. - Make code a bit easier to read by adding parenthesis. Modified: stable/10/sys/ofed/include/linux/bitops.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/include/linux/bitops.h ============================================================================== --- stable/10/sys/ofed/include/linux/bitops.h Sun Jun 15 18:30:26 2014 (r267516) +++ stable/10/sys/ofed/include/linux/bitops.h Sun Jun 15 18:32:02 2014 (r267517) @@ -286,14 +286,14 @@ bitmap_empty(unsigned long *addr, int si #define NBLONG (NBBY * sizeof(long)) #define set_bit(i, a) \ - atomic_set_long(&((volatile long *)(a))[(i)/NBLONG], 1UL << (i) % NBLONG) + atomic_set_long(&((volatile long *)(a))[(i)/NBLONG], 1UL << ((i) % NBLONG)) #define clear_bit(i, a) \ - atomic_clear_long(&((volatile long *)(a))[(i)/NBLONG], 1UL << (i) % NBLONG) + atomic_clear_long(&((volatile long *)(a))[(i)/NBLONG], 1UL << ((i) % NBLONG)) #define test_bit(i, a) \ !!(atomic_load_acq_long(&((volatile long *)(a))[(i)/NBLONG]) & \ - 1UL << ((i) % NBLONG)) + (1UL << ((i) % NBLONG))) static inline long test_and_clear_bit(long bit, long *var) @@ -302,7 +302,7 @@ test_and_clear_bit(long bit, long *var) var += bit / (sizeof(long) * NBBY); bit %= sizeof(long) * NBBY; - bit = 1 << bit; + bit = (1UL << bit); do { val = *(volatile long *)var; } while (atomic_cmpset_long(var, val, val & ~bit) == 0); @@ -317,7 +317,7 @@ test_and_set_bit(long bit, long *var) var += bit / (sizeof(long) * NBBY); bit %= sizeof(long) * NBBY; - bit = 1 << bit; + bit = (1UL << bit); do { val = *(volatile long *)var; } while (atomic_cmpset_long(var, val, val | bit) == 0); From owner-svn-src-stable@FreeBSD.ORG Mon Jun 16 11:26:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 03EDD130; Mon, 16 Jun 2014 11:26:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E27422568; Mon, 16 Jun 2014 11:26:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5GBQWgj048481; Mon, 16 Jun 2014 11:26:32 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5GBQUxv048470; Mon, 16 Jun 2014 11:26:30 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201406161126.s5GBQUxv048470@svn.freebsd.org> From: Aleksandr Rybalko Date: Mon, 16 Jun 2014 11:26:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267538 - in stable/10/sys/dev/vt: . hw/efifb hw/fb hw/ofwfb hw/vga hw/xboxfb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jun 2014 11:26:33 -0000 Author: ray Date: Mon Jun 16 11:26:30 2014 New Revision: 267538 URL: http://svnweb.freebsd.org/changeset/base/267538 Log: MFC 262785 263183 264182 264999 265391 265392 265395 265397 265398 265402 265403 265442 265546 265680 265681 265719 265862 265864 265867 265927 266010 266495 266540 266835 266856 266861 266862 267007 267310. 265391 Define a new method for probing vt(4) driver before attach it at early stage. 265392 Create dataset for vt(4) drivers. 265395 Set of updates to vt(4) core part. o Declare vt(4) drivers dataset. o Create single static structures for all early drivers. o Add vt(4) to be by default in the kernel consoles list. o Create one more sysinit point, to be able to initialize memory and lock requirement of early drivers. o Implement early drivers select. (Only best available will be selected). o Fix one missed "return (0)" for VTYLOCK. o Improve locking for cases when one driver replace another. o Make driver replacement notification less debug-look-like. o Minor spell fixes. 265397 Switch fb and efifb drivers to use names and new vt(4) driver probe method. 265398 Add vt(4) driver name for ofwfb driver. 265402 Revert r264997 and r265026. It is not required anymore. 265403 Switch vga drivers to use names and new vt(4) driver probe method. 265442 Implement KDMKTONE ioctl. 265546 Fix possible divide by zero. 265680 No need to assign fields required and checked on probe. 265681 Fix scrollback. 265719 Hide debug messages under VT_DEBUG. 265927 Update terminal sizes in any case when new vt(4) driver arrive. (Plus remove one unused newline) 266010 Remove extra newlines. No functional changes. 266495 Fix tty locking. o Correct expected values for VT_LOCKSWITCH ioctl. o Check current window for locked state. 266540 Proper fix of VT_LOCKSWITCH ioctl. 266835 Remove driver as unused. 267007 Fix case when vt(4) started w/o driver assigned. o Always init locks and cv ASAP. o Initialize driver-independent parts even if driver probing fail. o Allow to call vt_upgrade anytime, for later loaded drivers. o New window flag VWF_READY, to track if window already initialized. Other updates: o Pass vd as a cookie for kbd_allocate. o Do not blank window on driver replacement. Sponsored by: The FreeBSD Foundation Added: stable/10/sys/dev/vt/hw/efifb/ - copied from r262785, head/sys/dev/vt/hw/efifb/ Deleted: stable/10/sys/dev/vt/hw/xboxfb/ Modified: stable/10/sys/dev/vt/hw/efifb/efifb.c stable/10/sys/dev/vt/hw/fb/vt_early_fb.c stable/10/sys/dev/vt/hw/fb/vt_fb.c stable/10/sys/dev/vt/hw/fb/vt_fb.h stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c stable/10/sys/dev/vt/hw/vga/vga.c stable/10/sys/dev/vt/vt.h stable/10/sys/dev/vt/vt_buf.c stable/10/sys/dev/vt/vt_consolectl.c stable/10/sys/dev/vt/vt_core.c stable/10/sys/dev/vt/vt_sysmouse.c Modified: stable/10/sys/dev/vt/hw/efifb/efifb.c ============================================================================== --- head/sys/dev/vt/hw/efifb/efifb.c Wed Mar 5 14:37:45 2014 (r262785) +++ stable/10/sys/dev/vt/hw/efifb/efifb.c Mon Jun 16 11:26:30 2014 (r267538) @@ -52,42 +52,64 @@ __FBSDID("$FreeBSD$"); #include #include -static vd_init_t vt_efb_init; +static vd_init_t vt_efifb_init; +static vd_probe_t vt_efifb_probe; -static struct vt_driver vt_efb_driver = { - .vd_init = vt_efb_init, +static struct vt_driver vt_efifb_driver = { + .vd_name = "efifb", + .vd_probe = vt_efifb_probe, + .vd_init = vt_efifb_init, .vd_blank = vt_fb_blank, .vd_bitbltchr = vt_fb_bitbltchr, + .vd_maskbitbltchr = vt_fb_maskbitbltchr, /* Better than VGA, but still generic driver. */ .vd_priority = VD_PRIORITY_GENERIC + 1, }; -static struct fb_info info; -VT_CONSDEV_DECLARE(vt_efb_driver, - MAX(80, PIXEL_WIDTH(VT_FB_DEFAULT_WIDTH)), - MAX(25, PIXEL_HEIGHT(VT_FB_DEFAULT_HEIGHT)), &info); +static struct fb_info local_info; +VT_DRIVER_DECLARE(vt_efifb, vt_efifb_driver); static int -vt_efb_init(struct vt_device *vd) +vt_efifb_probe(struct vt_device *vd) { - int depth, d, disable, i, len; - struct fb_info *info; + int disabled; struct efi_fb *efifb; caddr_t kmdp; - info = vd->vd_softc; + disabled = 0; + TUNABLE_INT_FETCH("hw.syscons.disable", &disabled); + if (disabled != 0) + return (CN_DEAD); - disable = 0; - TUNABLE_INT_FETCH("hw.syscons.disable", &disable); - if (disable != 0) + kmdp = preload_search_by_type("elf kernel"); + if (kmdp == NULL) + kmdp = preload_search_by_type("elf64 kernel"); + efifb = (struct efi_fb *)preload_search_info(kmdp, + MODINFO_METADATA | MODINFOMD_EFI_FB); + if (efifb == NULL) return (CN_DEAD); + return (CN_INTERNAL); +} + +static int +vt_efifb_init(struct vt_device *vd) +{ + int depth, d, i, len; + struct fb_info *info; + struct efi_fb *efifb; + caddr_t kmdp; + + info = vd->vd_softc; + if (info == NULL) + info = vd->vd_softc = (void *)&local_info; + kmdp = preload_search_by_type("elf kernel"); if (kmdp == NULL) kmdp = preload_search_by_type("elf64 kernel"); efifb = (struct efi_fb *)preload_search_info(kmdp, MODINFO_METADATA | MODINFOMD_EFI_FB); - if (!efifb->fb_present) + if (efifb == NULL) return (CN_DEAD); info->fb_height = efifb->fb_height; @@ -137,7 +159,8 @@ vt_efb_init(struct vt_device *vd) fb_probe(info); vt_fb_init(vd); + /* Clear the screen. */ + vt_fb_blank(vd, TC_BLACK); return (CN_INTERNAL); } - Modified: stable/10/sys/dev/vt/hw/fb/vt_early_fb.c ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_early_fb.c Mon Jun 16 11:00:14 2014 (r267537) +++ stable/10/sys/dev/vt/hw/fb/vt_early_fb.c Mon Jun 16 11:26:30 2014 (r267538) @@ -52,18 +52,19 @@ __FBSDID("$FreeBSD$"); #include static vd_init_t vt_efb_init; +static vd_probe_t vt_efb_probe; static struct vt_driver vt_fb_early_driver = { + .vd_name = "efb", + .vd_probe = vt_efb_probe, .vd_init = vt_efb_init, .vd_blank = vt_fb_blank, .vd_bitbltchr = vt_fb_bitbltchr, .vd_priority = VD_PRIORITY_GENERIC, }; -static struct fb_info info; -VT_CONSDEV_DECLARE(vt_fb_early_driver, - MAX(80, PIXEL_WIDTH(VT_FB_DEFAULT_WIDTH)), - MAX(25, PIXEL_HEIGHT(VT_FB_DEFAULT_HEIGHT)), &info); +static struct fb_info local_info; +VT_DRIVER_DECLARE(vt_efb, vt_fb_early_driver); static void #ifdef FDT @@ -126,30 +127,62 @@ vt_efb_initialize(struct fb_info *info) } } -static int -vt_efb_init(struct vt_device *vd) +static phandle_t +vt_efb_get_fbnode() { - struct ofw_pci_register pciaddrs[8]; - struct fb_info *info; - int i, len, n_pciaddrs; phandle_t chosen, node; ihandle_t stdout; char type[64]; - info = vd->vd_softc; - chosen = OF_finddevice("/chosen"); OF_getprop(chosen, "stdout", &stdout, sizeof(stdout)); node = OF_instance_to_package(stdout); - if (node == -1) { - /* - * The "/chosen/stdout" does not exist try - * using "screen" directly. - */ - node = OF_finddevice("screen"); + if (node != -1) { + /* The "/chosen/stdout" present. */ + OF_getprop(node, "device_type", type, sizeof(type)); + /* Check if it has "display" type. */ + if (strcmp(type, "display") == 0) + return (node); } - OF_getprop(node, "device_type", type, sizeof(type)); - if (strcmp(type, "display") != 0) + /* Try device with name "screen". */ + node = OF_finddevice("screen"); + + return (node); +} + +static int +vt_efb_probe(struct vt_device *vd) +{ + phandle_t node; + + node = vt_efb_get_fbnode(); + if (node == -1) + return (CN_DEAD); + + if ((OF_getproplen(node, "height") <= 0) || + (OF_getproplen(node, "width") <= 0) || + (OF_getproplen(node, "depth") <= 0) || + (OF_getproplen(node, "linebytes") <= 0)) + return (CN_DEAD); + + return (CN_INTERNAL); +} + +static int +vt_efb_init(struct vt_device *vd) +{ + struct ofw_pci_register pciaddrs[8]; + struct fb_info *info; + int i, len, n_pciaddrs; + phandle_t node; + + if (vd->vd_softc == NULL) + vd->vd_softc = (void *)&local_info; + + info = vd->vd_softc; + + node = vt_efb_get_fbnode(); + if (node == -1) return (CN_DEAD); #define GET(name, var) \ @@ -249,7 +282,6 @@ vt_efb_init(struct vt_device *vd) #endif } - /* blank full size */ len = info->fb_size / 4; for (i = 0; i < len; i++) { @@ -259,13 +291,6 @@ vt_efb_init(struct vt_device *vd) /* Get pixel storage size. */ info->fb_bpp = info->fb_stride / info->fb_width * 8; - /* - * Early FB driver work with static window buffer 80x25, so reduce - * size to 640x480. - */ - info->fb_width = VT_FB_DEFAULT_WIDTH; - info->fb_height = VT_FB_DEFAULT_HEIGHT; - #ifdef FDT vt_efb_initialize(info, node); #else @@ -274,6 +299,5 @@ vt_efb_init(struct vt_device *vd) fb_probe(info); vt_fb_init(vd); - return (CN_INTERNAL); } Modified: stable/10/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_fb.c Mon Jun 16 11:00:14 2014 (r267537) +++ stable/10/sys/dev/vt/hw/fb/vt_fb.c Mon Jun 16 11:26:30 2014 (r267538) @@ -50,9 +50,11 @@ void vt_fb_drawrect(struct vt_device *vd void vt_fb_setpixel(struct vt_device *vd, int x, int y, term_color_t color); static struct vt_driver vt_fb_driver = { + .vd_name = "fb", .vd_init = vt_fb_init, .vd_blank = vt_fb_blank, .vd_bitbltchr = vt_fb_bitbltchr, + .vd_maskbitbltchr = vt_fb_maskbitbltchr, .vd_drawrect = vt_fb_drawrect, .vd_setpixel = vt_fb_setpixel, .vd_postswitch = vt_fb_postswitch, @@ -61,6 +63,8 @@ static struct vt_driver vt_fb_driver = { .vd_fb_mmap = vt_fb_mmap, }; +VT_DRIVER_DECLARE(vt_fb, vt_fb_driver); + static int vt_fb_ioctl(struct vt_device *vd, u_long cmd, caddr_t data, struct thread *td) { @@ -189,6 +193,68 @@ vt_fb_bitbltchr(struct vt_device *vd, co uint32_t fgc, bgc, cc, o; int c, l, bpp; u_long line; + uint8_t b; + const uint8_t *ch; + + info = vd->vd_softc; + bpp = FBTYPE_GET_BYTESPP(info); + fgc = info->fb_cmap[fg]; + bgc = info->fb_cmap[bg]; + b = 0; + if (bpl == 0) + bpl = (width + 7) >> 3; /* Bytes per sorce line. */ + + /* Don't try to put off screen pixels */ + if (((left + width) > info->fb_width) || ((top + height) > + info->fb_height)) + return; + + line = (info->fb_stride * top) + (left * bpp); + for (l = 0; l < height; l++) { + ch = src; + for (c = 0; c < width; c++) { + if (c % 8 == 0) + b = *ch++; + else + b <<= 1; + o = line + (c * bpp); + cc = b & 0x80 ? fgc : bgc; + + switch(bpp) { + case 1: + info->wr1(info, o, cc); + break; + case 2: + info->wr2(info, o, cc); + break; + case 3: + /* Packed mode, so unaligned. Byte access. */ + info->wr1(info, o, (cc >> 16) & 0xff); + info->wr1(info, o + 1, (cc >> 8) & 0xff); + info->wr1(info, o + 2, cc & 0xff); + break; + case 4: + info->wr4(info, o, cc); + break; + default: + /* panic? */ + break; + } + } + line += info->fb_stride; + src += bpl; + } +} + +void +vt_fb_maskbitbltchr(struct vt_device *vd, const uint8_t *src, const uint8_t *mask, + int bpl, vt_axis_t top, vt_axis_t left, unsigned int width, + unsigned int height, term_color_t fg, term_color_t bg) +{ + struct fb_info *info; + uint32_t fgc, bgc, cc, o; + int c, l, bpp; + u_long line; uint8_t b, m; const uint8_t *ch; Modified: stable/10/sys/dev/vt/hw/fb/vt_fb.h ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_fb.h Mon Jun 16 11:00:14 2014 (r267537) +++ stable/10/sys/dev/vt/hw/fb/vt_fb.h Mon Jun 16 11:26:30 2014 (r267538) @@ -41,7 +41,7 @@ int fb_probe(struct fb_info *info); vd_init_t vt_fb_init; vd_blank_t vt_fb_blank; vd_bitbltchr_t vt_fb_bitbltchr; +vd_maskbitbltchr_t vt_fb_maskbitbltchr; vd_postswitch_t vt_fb_postswitch; - #endif /* _DEV_VT_HW_FB_VT_FB_H_ */ Modified: stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c ============================================================================== --- stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Mon Jun 16 11:00:14 2014 (r267537) +++ stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Mon Jun 16 11:26:30 2014 (r267538) @@ -49,6 +49,10 @@ __FBSDID("$FreeBSD$"); struct ofwfb_softc { phandle_t sc_node; + struct ofw_pci_register sc_pciaddrs[8]; + int sc_num_pciaddrs; + + intptr_t sc_addr; int sc_depth; int sc_stride; @@ -58,21 +62,50 @@ struct ofwfb_softc { uint32_t sc_colormap[16]; }; +static vd_probe_t ofwfb_probe; static vd_init_t ofwfb_init; static vd_blank_t ofwfb_blank; static vd_bitbltchr_t ofwfb_bitbltchr; +static vd_fb_mmap_t ofwfb_mmap; static const struct vt_driver vt_ofwfb_driver = { + .vd_name = "ofwfb", + .vd_probe = ofwfb_probe, .vd_init = ofwfb_init, .vd_blank = ofwfb_blank, .vd_bitbltchr = ofwfb_bitbltchr, + .vd_maskbitbltchr = ofwfb_bitbltchr, + .vd_fb_mmap = ofwfb_mmap, .vd_priority = VD_PRIORITY_GENERIC+1, }; static struct ofwfb_softc ofwfb_conssoftc; -VT_CONSDEV_DECLARE(vt_ofwfb_driver, PIXEL_WIDTH(1920), PIXEL_HEIGHT(1200), - &ofwfb_conssoftc); -/* XXX: hardcoded max size */ +VT_DRIVER_DECLARE(vt_ofwfb, vt_ofwfb_driver); + +static int +ofwfb_probe(struct vt_device *vd) +{ + phandle_t chosen, node; + ihandle_t stdout; + char type[64]; + + chosen = OF_finddevice("/chosen"); + OF_getprop(chosen, "stdout", &stdout, sizeof(stdout)); + node = OF_instance_to_package(stdout); + if (node == -1) { + /* + * The "/chosen/stdout" does not exist try + * using "screen" directly. + */ + node = OF_finddevice("screen"); + } + OF_getprop(node, "device_type", type, sizeof(type)); + if (strcmp(type, "display") != 0) + return (CN_DEAD); + + /* Looks OK... */ + return (CN_INTERNAL); +} static void ofwfb_blank(struct vt_device *vd, term_color_t color) @@ -109,6 +142,10 @@ ofwfb_bitbltchr(struct vt_device *vd, co uint32_t fgc, bgc; int c; uint8_t b, m; + union { + uint32_t l; + uint8_t c[4]; + } ch1, ch2; fgc = sc->sc_colormap[fg]; bgc = sc->sc_colormap[bg]; @@ -120,36 +157,70 @@ ofwfb_bitbltchr(struct vt_device *vd, co return; line = (sc->sc_stride * top) + left * sc->sc_depth/8; - for (; height > 0; height--) { - for (c = 0; c < width; c++) { - if (c % 8 == 0) + if (mask == NULL && sc->sc_depth == 8 && (width % 8 == 0)) { + for (; height > 0; height--) { + for (c = 0; c < width; c += 8) { b = *src++; - else - b <<= 1; - if (mask != NULL) { + + /* + * Assume that there is more background than + * foreground in characters and init accordingly + */ + ch1.l = ch2.l = (bg << 24) | (bg << 16) | + (bg << 8) | bg; + + /* + * Calculate 2 x 4-chars at a time, and then + * write these out. + */ + if (b & 0x80) ch1.c[0] = fg; + if (b & 0x40) ch1.c[1] = fg; + if (b & 0x20) ch1.c[2] = fg; + if (b & 0x10) ch1.c[3] = fg; + + if (b & 0x08) ch2.c[0] = fg; + if (b & 0x04) ch2.c[1] = fg; + if (b & 0x02) ch2.c[2] = fg; + if (b & 0x01) ch2.c[3] = fg; + + *(uint32_t *)(sc->sc_addr + line + c) = ch1.l; + *(uint32_t *)(sc->sc_addr + line + c + 4) = + ch2.l; + } + line += sc->sc_stride; + } + } else { + for (; height > 0; height--) { + for (c = 0; c < width; c++) { if (c % 8 == 0) - m = *mask++; + b = *src++; else - m <<= 1; - /* Skip pixel write, if mask has no bit set. */ - if ((m & 0x80) == 0) - continue; - } - switch(sc->sc_depth) { - case 8: - *(uint8_t *)(sc->sc_addr + line + c) = - b & 0x80 ? fg : bg; - break; - case 32: - *(uint32_t *)(sc->sc_addr + line + 4*c) = - (b & 0x80) ? fgc : bgc; - break; - default: - /* panic? */ - break; + b <<= 1; + if (mask != NULL) { + if (c % 8 == 0) + m = *mask++; + else + m <<= 1; + /* Skip pixel write, if mask not set. */ + if ((m & 0x80) == 0) + continue; + } + switch(sc->sc_depth) { + case 8: + *(uint8_t *)(sc->sc_addr + line + c) = + b & 0x80 ? fg : bg; + break; + case 32: + *(uint32_t *)(sc->sc_addr + line + 4*c) + = (b & 0x80) ? fgc : bgc; + break; + default: + /* panic? */ + break; + } } + line += sc->sc_stride; } - line += sc->sc_stride; } } @@ -217,14 +288,12 @@ ofwfb_initialize(struct vt_device *vd) static int ofwfb_init(struct vt_device *vd) { - struct ofwfb_softc *sc = vd->vd_softc; + struct ofwfb_softc *sc; char type[64]; phandle_t chosen; ihandle_t stdout; phandle_t node; uint32_t depth, height, width; - struct ofw_pci_register pciaddrs[8]; - int n_pciaddrs; uint32_t fb_phys; int i, len; #ifdef __sparc64__ @@ -233,6 +302,9 @@ ofwfb_init(struct vt_device *vd) int space; #endif + /* Initialize softc */ + vd->vd_softc = sc = &ofwfb_conssoftc; + chosen = OF_finddevice("/chosen"); OF_getprop(chosen, "stdout", &stdout, sizeof(stdout)); node = OF_instance_to_package(stdout); @@ -275,15 +347,15 @@ ofwfb_init(struct vt_device *vd) * child of the PCI device: in that case, try the parent for * the assigned-addresses property. */ - len = OF_getprop(node, "assigned-addresses", pciaddrs, - sizeof(pciaddrs)); + len = OF_getprop(node, "assigned-addresses", sc->sc_pciaddrs, + sizeof(sc->sc_pciaddrs)); if (len == -1) { len = OF_getprop(OF_parent(node), "assigned-addresses", - pciaddrs, sizeof(pciaddrs)); + sc->sc_pciaddrs, sizeof(sc->sc_pciaddrs)); } if (len == -1) len = 0; - n_pciaddrs = len / sizeof(struct ofw_pci_register); + sc->sc_num_pciaddrs = len / sizeof(struct ofw_pci_register); /* * Grab the physical address of the framebuffer, and then map it @@ -313,13 +385,13 @@ ofwfb_init(struct vt_device *vd) * Linux does the same thing. */ - fb_phys = n_pciaddrs; - for (i = 0; i < n_pciaddrs; i++) { + fb_phys = sc->sc_num_pciaddrs; + for (i = 0; i < sc->sc_num_pciaddrs; i++) { /* If it is too small, not the framebuffer */ - if (pciaddrs[i].size_lo < sc->sc_stride*height) + if (sc->sc_pciaddrs[i].size_lo < sc->sc_stride*height) continue; /* If it is not memory, it isn't either */ - if (!(pciaddrs[i].phys_hi & + if (!(sc->sc_pciaddrs[i].phys_hi & OFW_PCI_PHYS_HI_SPACE_MEM32)) continue; @@ -327,11 +399,12 @@ ofwfb_init(struct vt_device *vd) fb_phys = i; /* If it is prefetchable, it certainly is */ - if (pciaddrs[i].phys_hi & OFW_PCI_PHYS_HI_PREFETCHABLE) + if (sc->sc_pciaddrs[i].phys_hi & + OFW_PCI_PHYS_HI_PREFETCHABLE) break; } - if (fb_phys == n_pciaddrs) /* No candidates found */ + if (fb_phys == sc->sc_num_pciaddrs) /* No candidates found */ return (CN_DEAD); #if defined(__powerpc__) @@ -348,3 +421,37 @@ ofwfb_init(struct vt_device *vd) return (CN_INTERNAL); } +static int +ofwfb_mmap(struct vt_device *vd, vm_ooffset_t offset, vm_paddr_t *paddr, + int prot, vm_memattr_t *memattr) +{ + struct ofwfb_softc *sc = vd->vd_softc; + int i; + + /* + * Make sure the requested address lies within the PCI device's + * assigned addrs + */ + for (i = 0; i < sc->sc_num_pciaddrs; i++) + if (offset >= sc->sc_pciaddrs[i].phys_lo && + offset < (sc->sc_pciaddrs[i].phys_lo + sc->sc_pciaddrs[i].size_lo)) + { + /* + * If this is a prefetchable BAR, we can (and should) + * enable write-combining. + */ + if (sc->sc_pciaddrs[i].phys_hi & + OFW_PCI_PHYS_HI_PREFETCHABLE) + *memattr = VM_MEMATTR_WRITE_COMBINING; + + *paddr = offset; + return (0); + } + + /* + * Hack for Radeon... + */ + *paddr = offset; + return (0); +} + Modified: stable/10/sys/dev/vt/hw/vga/vga.c ============================================================================== --- stable/10/sys/dev/vt/hw/vga/vga.c Mon Jun 16 11:00:14 2014 (r267537) +++ stable/10/sys/dev/vt/hw/vga/vga.c Mon Jun 16 11:26:30 2014 (r267538) @@ -71,6 +71,7 @@ struct vga_softc { #define VT_VGA_HEIGHT 480 #define VT_VGA_MEMSIZE (VT_VGA_WIDTH * VT_VGA_HEIGHT / 8) +static vd_probe_t vga_probe; static vd_init_t vga_init; static vd_blank_t vga_blank; static vd_bitbltchr_t vga_bitbltchr; @@ -81,6 +82,8 @@ static vd_putchar_t vga_putchar; static vd_postswitch_t vga_postswitch; static const struct vt_driver vt_vga_driver = { + .vd_name = "vga", + .vd_probe = vga_probe, .vd_init = vga_init, .vd_blank = vga_blank, .vd_bitbltchr = vga_bitbltchr, @@ -97,8 +100,7 @@ static const struct vt_driver vt_vga_dri * buffer is always big enough to support both. */ static struct vga_softc vga_conssoftc; -VT_CONSDEV_DECLARE(vt_vga_driver, MAX(80, PIXEL_WIDTH(VT_VGA_WIDTH)), - MAX(25, PIXEL_HEIGHT(VT_VGA_HEIGHT)), &vga_conssoftc); +VT_DRIVER_DECLARE(vt_vga, vt_vga_driver); static inline void vga_setcolor(struct vt_device *vd, term_color_t color) @@ -349,7 +351,8 @@ static const struct unicp437 cp437table[ { 0x263a, 0x01, 0x01 }, { 0x263c, 0x0f, 0x00 }, { 0x2640, 0x0c, 0x00 }, { 0x2642, 0x0b, 0x00 }, { 0x2660, 0x06, 0x00 }, { 0x2663, 0x05, 0x00 }, - { 0x2665, 0x03, 0x01 }, { 0x266a, 0x0d, 0x01 }, + { 0x2665, 0x03, 0x01 }, { 0x266a, 0x0d, 0x00 }, + { 0x266c, 0x0e, 0x00 }, }; static uint8_t @@ -631,10 +634,22 @@ vga_initialize(struct vt_device *vd, int } static int +vga_probe(struct vt_device *vd) +{ + + return (CN_INTERNAL); +} + +static int vga_init(struct vt_device *vd) { - struct vga_softc *sc = vd->vd_softc; - int textmode = 0; + struct vga_softc *sc; + int textmode; + + if (vd->vd_softc == NULL) + vd->vd_softc = (void *)&vga_conssoftc; + sc = vd->vd_softc; + textmode = 0; #if defined(__amd64__) || defined(__i386__) sc->vga_fb_tag = X86_BUS_SPACE_MEM; Modified: stable/10/sys/dev/vt/vt.h ============================================================================== --- stable/10/sys/dev/vt/vt.h Mon Jun 16 11:00:14 2014 (r267537) +++ stable/10/sys/dev/vt/vt.h Mon Jun 16 11:26:30 2014 (r267538) @@ -78,7 +78,13 @@ one 'device sc' or 'device vt'" #endif /* defined(SC_TWOBUTTON_MOUSE) || defined(VT_TWOBUTTON_MOUSE) */ #define SC_DRIVER_NAME "vt" +#ifdef VT_DEBUG #define DPRINTF(_l, ...) if (vt_debug > (_l)) printf( __VA_ARGS__ ) +#define VT_CONSOLECTL_DEBUG +#define VT_SYSMOUSE_DEBUG +#else +#define DPRINTF(_l, ...) do {} while (0) +#endif #define ISSIGVALID(sig) ((sig) > 0 && (sig) < NSIG) #define VT_SYSCTL_INT(_name, _default, _descr) \ @@ -253,6 +259,7 @@ struct vt_window { #define VWF_CONSOLE 0x8 /* Kernel message console window. */ #define VWF_VTYLOCK 0x10 /* Prevent window switch. */ #define VWF_MOUSE_HIDE 0x20 /* Disable mouse events processing. */ +#define VWF_READY 0x40 /* Window fully initialized. */ #define VWF_SWWAIT_REL 0x10000 /* Program wait for VT acquire is done. */ #define VWF_SWWAIT_ACQ 0x20000 /* Program wait for VT release is done. */ pid_t vw_pid; /* Terminal holding process */ @@ -277,6 +284,7 @@ struct vt_window { */ typedef int vd_init_t(struct vt_device *vd); +typedef int vd_probe_t(struct vt_device *vd); typedef void vd_postswitch_t(struct vt_device *vd); typedef void vd_blank_t(struct vt_device *vd, term_color_t color); typedef void vd_bitbltchr_t(struct vt_device *vd, const uint8_t *src, @@ -295,7 +303,9 @@ typedef void vd_drawrect_t(struct vt_dev typedef void vd_setpixel_t(struct vt_device *, int, int, term_color_t); struct vt_driver { + char vd_name[16]; /* Console attachment. */ + vd_probe_t *vd_probe; vd_init_t *vd_init; /* Drawing. */ @@ -337,10 +347,10 @@ void vt_upgrade(struct vt_device *vd); #define PIXEL_HEIGHT(h) ((h) / 16) #ifndef VT_FB_DEFAULT_WIDTH -#define VT_FB_DEFAULT_WIDTH 640 +#define VT_FB_DEFAULT_WIDTH 2048 #endif #ifndef VT_FB_DEFAULT_HEIGHT -#define VT_FB_DEFAULT_HEIGHT 480 +#define VT_FB_DEFAULT_HEIGHT 1200 #endif #define VT_CONSDEV_DECLARE(driver, width, height, softc) \ @@ -391,6 +401,9 @@ TERMINAL_DECLARE_EARLY(driver ## _conste SYSINIT(vt_early_cons, SI_SUB_INT_CONFIG_HOOKS, SI_ORDER_ANY, \ vt_upgrade, &driver ## _consdev) +/* name argument is not used yet. */ +#define VT_DRIVER_DECLARE(name, drv) DATA_SET(vt_drv_set, drv) + /* * Fonts. * Modified: stable/10/sys/dev/vt/vt_buf.c ============================================================================== --- stable/10/sys/dev/vt/vt_buf.c Mon Jun 16 11:00:14 2014 (r267537) +++ stable/10/sys/dev/vt/vt_buf.c Mon Jun 16 11:26:30 2014 (r267538) @@ -357,17 +357,17 @@ void vtbuf_fill_locked(struct vt_buf *vb, const term_rect_t *r, term_char_t c) { KASSERT(r->tr_begin.tp_row < vb->vb_scr_size.tp_row, - ("vtbuf_fill_locked begin.tp_row %d must be < screen width %d", + ("vtbuf_fill_locked begin.tp_row %d must be < screen height %d", r->tr_begin.tp_row, vb->vb_scr_size.tp_row)); KASSERT(r->tr_begin.tp_col < vb->vb_scr_size.tp_col, - ("vtbuf_fill_locked begin.tp_col %d must be < screen height %d", + ("vtbuf_fill_locked begin.tp_col %d must be < screen width %d", r->tr_begin.tp_col, vb->vb_scr_size.tp_col)); KASSERT(r->tr_end.tp_row <= vb->vb_scr_size.tp_row, - ("vtbuf_fill_locked end.tp_row %d must be <= screen width %d", + ("vtbuf_fill_locked end.tp_row %d must be <= screen height %d", r->tr_end.tp_row, vb->vb_scr_size.tp_row)); KASSERT(r->tr_end.tp_col <= vb->vb_scr_size.tp_col, - ("vtbuf_fill_locked end.tp_col %d must be <= screen height %d", + ("vtbuf_fill_locked end.tp_col %d must be <= screen width %d", r->tr_end.tp_col, vb->vb_scr_size.tp_col)); VTBUF_LOCK(vb); @@ -448,8 +448,9 @@ vtbuf_grow(struct vt_buf *vb, const term history_size = MAX(history_size, p->tp_row); - if (history_size > vb->vb_history_size || p->tp_col > - vb->vb_scr_size.tp_col) { + /* If new screen/history size bigger or buffer is VBF_STATIC. */ + if ((history_size > vb->vb_history_size) || (p->tp_col > + vb->vb_scr_size.tp_col) || (vb->vb_flags & VBF_STATIC)) { /* Allocate new buffer. */ bufsize = history_size * p->tp_col * sizeof(term_char_t); new = malloc(bufsize, M_VTBUF, M_WAITOK | M_ZERO); @@ -495,6 +496,9 @@ vtbuf_grow(struct vt_buf *vb, const term /* Deallocate old buffer. */ free(old, M_VTBUF); free(oldrows, M_VTBUF); + } else { + /* Just update the size. */ + vb->vb_scr_size = *p; } } Modified: stable/10/sys/dev/vt/vt_consolectl.c ============================================================================== --- stable/10/sys/dev/vt/vt_consolectl.c Mon Jun 16 11:00:14 2014 (r267537) +++ stable/10/sys/dev/vt/vt_consolectl.c Mon Jun 16 11:26:30 2014 (r267538) @@ -61,8 +61,10 @@ consolectl_ioctl(struct cdev *dev, u_lon return (0); } default: +#ifdef VT_CONSOLECTL_DEBUG printf("consolectl: unknown ioctl: %c:%lx\n", (char)IOCGROUP(cmd), IOCBASECMD(cmd)); +#endif return (ENOIOCTL); } } Modified: stable/10/sys/dev/vt/vt_core.c ============================================================================== --- stable/10/sys/dev/vt/vt_core.c Mon Jun 16 11:00:14 2014 (r267537) +++ stable/10/sys/dev/vt/vt_core.c Mon Jun 16 11:26:30 2014 (r267538) @@ -120,9 +120,10 @@ VT_SYSCTL_INT(debug, 0, "vt(9) debug lev VT_SYSCTL_INT(deadtimer, 15, "Time to wait busy process in VT_PROCESS mode"); VT_SYSCTL_INT(suspendswitch, 1, "Switch to VT0 before suspend"); +static struct vt_device vt_consdev; static unsigned int vt_unit = 0; static MALLOC_DEFINE(M_VT, "vt", "vt device"); -struct vt_device *main_vd = NULL; +struct vt_device *main_vd = &vt_consdev; /* Boot logo. */ extern unsigned int vt_logo_width; @@ -144,6 +145,85 @@ static int vt_window_switch(struct vt_wi static int vt_late_window_switch(struct vt_window *); static int vt_proc_alive(struct vt_window *); static void vt_resize(struct vt_device *); +static void vt_update_static(void *); + +SET_DECLARE(vt_drv_set, struct vt_driver); + +#define _VTDEFH MAX(100, PIXEL_HEIGHT(VT_FB_DEFAULT_HEIGHT)) +#define _VTDEFW MAX(200, PIXEL_WIDTH(VT_FB_DEFAULT_WIDTH)) + +static struct terminal vt_consterm; +static struct vt_window vt_conswindow; +static struct vt_device vt_consdev = { + .vd_driver = NULL, + .vd_softc = NULL, + .vd_flags = VDF_INVALID, + .vd_windows = { [VT_CONSWINDOW] = &vt_conswindow, }, + .vd_curwindow = &vt_conswindow, + .vd_markedwin = NULL, + .vd_kbstate = 0, +}; +static term_char_t vt_constextbuf[(_VTDEFW) * (VBF_DEFAULT_HISTORY_SIZE)]; +static term_char_t *vt_constextbufrows[VBF_DEFAULT_HISTORY_SIZE]; +static struct vt_window vt_conswindow = { + .vw_number = VT_CONSWINDOW, + .vw_flags = VWF_CONSOLE, + .vw_buf = { + .vb_buffer = vt_constextbuf, + .vb_rows = vt_constextbufrows, + .vb_history_size = VBF_DEFAULT_HISTORY_SIZE, + .vb_curroffset = 0, + .vb_roffset = 0, + .vb_flags = VBF_STATIC, + .vb_mark_start = {.tp_row = 0, .tp_col = 0,}, + .vb_mark_end = {.tp_row = 0, .tp_col = 0,}, + .vb_scr_size = { + .tp_row = _VTDEFH, + .tp_col = _VTDEFW, + }, + }, + .vw_device = &vt_consdev, + .vw_terminal = &vt_consterm, + .vw_kbdmode = K_XLATE, +}; +static struct terminal vt_consterm = { + .tm_class = &vt_termclass, + .tm_softc = &vt_conswindow, + .tm_flags = TF_CONS, +}; +static struct consdev vt_consterm_consdev = { + .cn_ops = &termcn_cnops, + .cn_arg = &vt_consterm, + .cn_name = "ttyv0", +}; + +/* Add to set of consoles. */ +DATA_SET(cons_set, vt_consterm_consdev); + +/* + * Right after kmem is done to allow early drivers to use locking and allocate + * memory. + */ +SYSINIT(vt_update_static, SI_SUB_KMEM, SI_ORDER_ANY, vt_update_static, + &vt_consdev); +/* Delay until all devices attached, to not waste time. */ +SYSINIT(vt_early_cons, SI_SUB_INT_CONFIG_HOOKS, SI_ORDER_ANY, vt_upgrade, + &vt_consdev); + +/* Initialize locks/mem depended members. */ +static void +vt_update_static(void *dummy) +{ + + if (main_vd->vd_driver != NULL) + printf("VT: running with driver \"%s\".\n", + main_vd->vd_driver->vd_name); + else + printf("VT: init without driver.\n"); + + mtx_init(&main_vd->vd_lock, "vtdev", NULL, MTX_DEF); + cv_init(&main_vd->vd_winswitch, "vtwswt"); +} static void vt_switch_timer(void *arg) @@ -203,12 +283,12 @@ vt_proc_window_switch(struct vt_window * struct vt_device *vd; int ret; - if (vw->vw_flags & VWF_VTYLOCK) - return (EBUSY); - vd = vw->vw_device; curvw = vd->vd_curwindow; + if (curvw->vw_flags & VWF_VTYLOCK) + return (EBUSY); + /* Ask current process permitions to switch away. */ if (curvw->vw_smode.mode == VT_PROCESS) { DPRINTF(30, "%s: VT_PROCESS ", __func__); @@ -556,11 +636,9 @@ vt_allocate_keyboard(struct vt_device *v keyboard_t *k0, *k; keyboard_info_t ki; - idx0 = kbd_allocate("kbdmux", -1, (void *)&vd->vd_keyboard, - vt_kbdevent, vd); - /* XXX: kb_token lost */ + idx0 = kbd_allocate("kbdmux", -1, vd, vt_kbdevent, vd); vd->vd_keyboard = idx0; - if (idx0 != -1) { + if (idx0 >= 0) { DPRINTF(20, "%s: kbdmux allocated, idx = %d\n", __func__, idx0); k0 = kbd_get_keyboard(idx0); @@ -580,8 +658,11 @@ vt_allocate_keyboard(struct vt_device *v } } else { DPRINTF(20, "%s: no kbdmux allocated\n", __func__); - idx0 = kbd_allocate("*", -1, (void *)&vd->vd_keyboard, - vt_kbdevent, vd); + idx0 = kbd_allocate("*", -1, vd, vt_kbdevent, vd); + if (idx0 < 0) { + DPRINTF(10, "%s: No keyboard found.\n", __func__); + return (-1); + } } DPRINTF(20, "%s: vd_keyboard = %d\n", __func__, vd->vd_keyboard); @@ -601,6 +682,22 @@ vtterm_bell(struct terminal *tm) } static void +vtterm_beep(struct terminal *tm, u_int param) +{ + u_int freq, period; + + if ((param == 0) || ((param & 0xffff) == 0)) { + vtterm_bell(tm); + return; + } + + period = ((param >> 16) & 0xffff) * hz / 1000; + freq = 1193182 / (param & 0xffff); + + sysbeep(freq, period); +} + +static void vtterm_cursor(struct terminal *tm, const term_pos_t *p) { struct vt_window *vw = tm->tm_softc; @@ -775,7 +872,7 @@ vt_flush(struct vt_device *vd) if ((vd->vd_flags & (VDF_MOUSECURSOR|VDF_TEXTMODE)) == VDF_MOUSECURSOR) { m = &vt_default_mouse_pointer; - bpl = (m->w + 7) >> 3; /* Bytes per sorce line. */ + bpl = (m->w + 7) >> 3; /* Bytes per source line. */ w = m->w; h = m->h; @@ -851,9 +948,11 @@ vtterm_splash(struct vt_device *vd) } #endif + static void vtterm_cnprobe(struct terminal *tm, struct consdev *cp) { + struct vt_driver *vtd, **vtdlist, *vtdbest = NULL; struct vt_window *vw = tm->tm_softc; struct vt_device *vd = vw->vw_device; struct winsize wsz; @@ -862,10 +961,27 @@ vtterm_cnprobe(struct terminal *tm, stru /* Initialization already done. */ return; - cp->cn_pri = vd->vd_driver->vd_init(vd); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Mon Jun 16 11:42:19 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB859646; Mon, 16 Jun 2014 11:42:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE4D72754; Mon, 16 Jun 2014 11:42:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5GBgJsu056890; Mon, 16 Jun 2014 11:42:19 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5GBgJGs056889; Mon, 16 Jun 2014 11:42:19 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201406161142.s5GBgJGs056889@svn.freebsd.org> From: Aleksandr Rybalko Date: Mon, 16 Jun 2014 11:42:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267539 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jun 2014 11:42:20 -0000 Author: ray Date: Mon Jun 16 11:42:19 2014 New Revision: 267539 URL: http://svnweb.freebsd.org/changeset/base/267539 Log: Record merginfo for r267538. Pointy hat to: ray Sponsored by: The FreeBSD Foundation Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Mon Jun 16 11:51:01 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 83452B70; Mon, 16 Jun 2014 11:51:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6351E27B3; Mon, 16 Jun 2014 11:51:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5GBp1IU059457; Mon, 16 Jun 2014 11:51:01 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5GBp02s059446; Mon, 16 Jun 2014 11:51:00 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201406161151.s5GBp02s059446@svn.freebsd.org> From: Aleksandr Rybalko Date: Mon, 16 Jun 2014 11:51:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267540 - in stable/10/usr.sbin: kbdcontrol vidcontrol X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jun 2014 11:51:01 -0000 Author: ray Date: Mon Jun 16 11:51:00 2014 New Revision: 267540 URL: http://svnweb.freebsd.org/changeset/base/267540 Log: MFC: 266836, 266839 vt(4) support for vidcontrol(1). o Teach vidcontrol(1) how to load vt(4) font. o Teach vidcontrol(1) to distinct which virtual terminal system is running now. o Load vt(4) fonts from different location. o Add $FreeBSD$ tag for path.h. vt(4) support for kbdcontrol(1). Enable kbdcontrol(1) to use maps from vt(4) keymaps dir /usr/share/vt/keymaps if vt(4) is present. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/kbdcontrol/kbdcontrol.c stable/10/usr.sbin/kbdcontrol/path.h stable/10/usr.sbin/vidcontrol/path.h stable/10/usr.sbin/vidcontrol/vidcontrol.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/kbdcontrol/kbdcontrol.c ============================================================================== --- stable/10/usr.sbin/kbdcontrol/kbdcontrol.c Mon Jun 16 11:42:19 2014 (r267539) +++ stable/10/usr.sbin/kbdcontrol/kbdcontrol.c Mon Jun 16 11:51:00 2014 (r267540) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "path.h" #include "lex.h" @@ -141,6 +142,17 @@ static void set_keyrates(char *opt); static void show_kbd_info(void); static void usage(void) __dead2; +/* Detect presence of vt(4). */ +static int +is_vt4(void) +{ + + if (sysctlbyname("kern.vt.deadtimer", NULL, NULL, NULL, 0) == 0) + return (1); + + return (0); +} + static char * nextarg(int ac, char **av, int *indp, int oc) { @@ -785,10 +797,13 @@ load_keymap(char *opt, int dumponly) FILE *fd; int i, j; char *name, *cp; - char blank[] = "", keymap_path[] = KEYMAP_PATH, dotkbd[] = ".kbd"; + char blank[] = "", keymap_path[] = KEYMAP_PATH; + char vt_keymap_path[] = VT_KEYMAP_PATH, dotkbd[] = ".kbd"; char *prefix[] = {blank, blank, keymap_path, NULL}; char *postfix[] = {blank, dotkbd, NULL}; + if (is_vt4()) + prefix[2] = vt_keymap_path; cp = getenv("KEYMAP_PATH"); if (cp != NULL) asprintf(&(prefix[0]), "%s/", cp); Modified: stable/10/usr.sbin/kbdcontrol/path.h ============================================================================== --- stable/10/usr.sbin/kbdcontrol/path.h Mon Jun 16 11:42:19 2014 (r267539) +++ stable/10/usr.sbin/kbdcontrol/path.h Mon Jun 16 11:51:00 2014 (r267540) @@ -1,4 +1,8 @@ +/* $FreeBSD$ */ + #define KEYMAP_PATH "/usr/share/syscons/keymaps/" #define FONT_PATH "/usr/share/syscons/fonts/" #define SCRNMAP_PATH "/usr/share/syscons/scrnmaps/" +#define VT_KEYMAP_PATH "/usr/share/vt/keymaps/" +#define VT_FONT_PATH "/usr/share/vt/fonts/" Modified: stable/10/usr.sbin/vidcontrol/path.h ============================================================================== --- stable/10/usr.sbin/vidcontrol/path.h Mon Jun 16 11:42:19 2014 (r267539) +++ stable/10/usr.sbin/vidcontrol/path.h Mon Jun 16 11:51:00 2014 (r267540) @@ -1,4 +1,8 @@ +/* $FreeBSD$ */ + #define KEYMAP_PATH "/usr/share/syscons/keymaps/" #define FONT_PATH "/usr/share/syscons/fonts/" #define SCRNMAP_PATH "/usr/share/syscons/scrnmaps/" +#define VT_KEYMAP_PATH "/usr/share/vt/keymaps/" +#define VT_FONT_PATH "/usr/share/vt/fonts/" Modified: stable/10/usr.sbin/vidcontrol/vidcontrol.c ============================================================================== --- stable/10/usr.sbin/vidcontrol/vidcontrol.c Mon Jun 16 11:42:19 2014 (r267539) +++ stable/10/usr.sbin/vidcontrol/vidcontrol.c Mon Jun 16 11:51:00 2014 (r267540) @@ -45,9 +45,12 @@ static const char rcsid[] = #include #include #include +#include #include +#include #include #include +#include #include "path.h" #include "decode.h" @@ -78,6 +81,15 @@ static struct { struct video_info video_mode_info; } cur_info; +struct vt4font_header { + uint8_t magic[8]; + uint8_t width; + uint8_t height; + uint16_t pad; + uint32_t glyph_count; + uint32_t map_count[4]; +} __packed; + static int hex = 0; static int vesa_cols; static int vesa_rows; @@ -86,6 +98,7 @@ static int colors_changed; static int video_mode_changed; static int normal_fore_color, normal_back_color; static int revers_fore_color, revers_back_color; +static int vt4_mode = 0; static struct vid_info info; static struct video_info new_mode_info; @@ -115,7 +128,9 @@ init(void) if (ioctl(0, CONS_GETINFO, &cur_info.console_info) == -1) errc(1, errno, "getting console information"); - if (ioctl(0, GIO_SCRNMAP, &cur_info.screen_map) == -1) + /* vt(4) use unicode, so no screen mapping required. */ + if (vt4_mode == 0 && + ioctl(0, GIO_SCRNMAP, &cur_info.screen_map) == -1) errc(1, errno, "getting screen map"); if (ioctl(0, CONS_GET, &cur_info.video_mode_number) == -1) @@ -153,7 +168,8 @@ revert(void) fprintf(stderr, "\033[=%dH", cur_info.console_info.mv_rev.fore); fprintf(stderr, "\033[=%dI", cur_info.console_info.mv_rev.back); - ioctl(0, PIO_SCRNMAP, &cur_info.screen_map); + if (vt4_mode == 0) + ioctl(0, PIO_SCRNMAP, &cur_info.screen_map); if (cur_info.video_mode_number >= M_VESA_BASE) ioctl(0, _IO('V', cur_info.video_mode_number - M_VESA_BASE), @@ -179,7 +195,15 @@ revert(void) static void usage(void) { - fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n", + if (vt4_mode) + fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n", +"usage: vidcontrol [-CHPpx] [-b color] [-c appearance] [-f [size] file]", +" [-g geometry] [-h size] [-i adapter | mode]", +" [-M char] [-m on | off] [-r foreground background]", +" [-S on | off] [-s number] [-T xterm | cons25] [-t N | off]", +" [mode] [foreground [background]] [show]"); + else + fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n", "usage: vidcontrol [-CdHLPpx] [-b color] [-c appearance] [-f [size] file]", " [-g geometry] [-h size] [-i adapter | mode] [-l screen_map]", " [-M char] [-m on | off] [-r foreground background]", @@ -188,6 +212,16 @@ usage(void) exit(1); } +/* Detect presence of vt(4). */ +static int +is_vt4(void) +{ + + if (sysctlbyname("kern.vt.deadtimer", NULL, NULL, NULL, 0) == 0) + return (1); + + return (0); +} /* * Retrieve the next argument from the command line (for options that require @@ -349,6 +383,72 @@ fsize(FILE *file) return -1; } +static vfnt_map_t * +load_vt4mappingtable(unsigned int nmappings, FILE *f) +{ + vfnt_map_t *t; + unsigned int i; + + if (nmappings == 0) + return (NULL); + + t = malloc(sizeof *t * nmappings); + + if (fread(t, sizeof *t * nmappings, 1, f) != 1) { + perror("mappings"); + exit(1); + } + + for (i = 0; i < nmappings; i++) { + t[i].src = be32toh(t[i].src); + t[i].dst = be16toh(t[i].dst); + t[i].len = be16toh(t[i].len); + } + + return (t); +} + +static int +load_vt4font(FILE *f) +{ + struct vt4font_header fh; + static vfnt_t vfnt; + size_t glyphsize; + unsigned int i; + + if (fread(&fh, sizeof fh, 1, f) != 1) { + perror("file_header"); + return (1); + } + + if (memcmp(fh.magic, "VFNT0002", 8) != 0) { + fprintf(stderr, "Bad magic\n"); + return (1); + } + + for (i = 0; i < VFNT_MAPS; i++) + vfnt.map_count[i] = be32toh(fh.map_count[i]); + vfnt.glyph_count = be32toh(fh.glyph_count); + vfnt.width = fh.width; + vfnt.height = fh.height; + + glyphsize = howmany(vfnt.width, 8) * vfnt.height * vfnt.glyph_count; + vfnt.glyphs = malloc(glyphsize); + + if (fread(vfnt.glyphs, glyphsize, 1, f) != 1) { + perror("glyphs"); + return (1); + } + + for (i = 0; i < VFNT_MAPS; i++) + vfnt.map[i] = load_vt4mappingtable(vfnt.map_count[i], f); + + if (ioctl(STDIN_FILENO, PIO_VFONT, &vfnt) == -1) { + perror("PIO_VFONT"); + return (1); + } + return (0); +} /* * Load a font from file and set it. @@ -362,6 +462,7 @@ load_font(const char *type, const char * unsigned long io = 0; /* silence stupid gcc(1) in the Wall mode */ char *name, *fontmap, size_sufx[6]; const char *a[] = {"", FONT_PATH, NULL}; + const char *vt4a[] = {"", VT_FONT_PATH, NULL}; const char *b[] = {filename, NULL}; const char *c[] = {"", size_sufx, NULL}; const char *d[] = {"", ".fnt", NULL}; @@ -376,21 +477,32 @@ load_font(const char *type, const char * {8, 8, PIO_FONT8x8}, {0, 0, 0}}; - _info.size = sizeof(_info); - if (ioctl(0, CONS_GETINFO, &_info) == -1) { - revert(); - warn("failed to obtain current video mode parameters"); - return; - } + if (vt4_mode) { + size_sufx[0] = '\0'; + } else { + _info.size = sizeof(_info); + if (ioctl(0, CONS_GETINFO, &_info) == -1) { + revert(); + warn("failed to obtain current video mode parameters"); + return; + } - snprintf(size_sufx, sizeof(size_sufx), "-8x%d", _info.font_size); - fd = openguess(a, b, c, d, &name); + snprintf(size_sufx, sizeof(size_sufx), "-8x%d", _info.font_size); + } + fd = openguess((vt4_mode == 0) ? a : vt4a, b, c, d, &name); if (fd == NULL) { revert(); errx(1, "%s: can't load font file", filename); } + if (vt4_mode) { + if(load_vt4font(fd)) + warn("failed to load font \"%s\"", filename); + fclose(fd); + return; + } + if (type != NULL) { size = 0; if (sscanf(type, "%dx%d", &w, &h) == 2) { @@ -1199,9 +1311,12 @@ int main(int argc, char **argv) { char *font, *type, *termmode; + const char *opts; int dumpmod, dumpopt, opt; int reterr; + vt4_mode = is_vt4(); + init(); info.size = sizeof(info); @@ -1211,8 +1326,12 @@ main(int argc, char **argv) dumpmod = 0; dumpopt = DUMP_FBF; termmode = NULL; - while ((opt = getopt(argc, argv, - "b:Cc:df:g:h:Hi:l:LM:m:pPr:S:s:T:t:x")) != -1) + if (vt4_mode) + opts = "b:Cc:f:g:h:Hi:M:m:pPr:S:s:T:t:x"; + else + opts = "b:Cc:df:g:h:Hi:l:LM:m:pPr:S:s:T:t:x"; + + while ((opt = getopt(argc, argv, opts)) != -1) switch(opt) { case 'b': set_border_color(optarg); @@ -1224,6 +1343,8 @@ main(int argc, char **argv) set_cursor_type(optarg); break; case 'd': + if (vt4_mode) + break; print_scrnmap(); break; case 'f': @@ -1255,9 +1376,13 @@ main(int argc, char **argv) show_info(optarg); break; case 'l': + if (vt4_mode) + break; load_scrnmap(optarg); break; case 'L': + if (vt4_mode) + break; load_default_scrnmap(); break; case 'M': From owner-svn-src-stable@FreeBSD.ORG Mon Jun 16 12:37:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 759F0318; Mon, 16 Jun 2014 12:37:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56E992C73; Mon, 16 Jun 2014 12:37:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5GCbBhO081444; Mon, 16 Jun 2014 12:37:11 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5GCbALO081441; Mon, 16 Jun 2014 12:37:10 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201406161237.s5GCbALO081441@svn.freebsd.org> From: Aleksandr Rybalko Date: Mon, 16 Jun 2014 12:37:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267541 - in stable/10/share/vt: . fonts keymaps X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jun 2014 12:37:11 -0000 Author: ray Date: Mon Jun 16 12:37:10 2014 New Revision: 267541 URL: http://svnweb.freebsd.org/changeset/base/267541 Log: MFC: 266838 266841 267194 Add gallant vt(4) font as an example of font loading for vt(4). Add Ukranian vt(4) keymaps as an example. Sponsored by: The FreeBSD Foundation Added: stable/10/share/vt/ - copied from r266838, head/share/vt/ stable/10/share/vt/fonts/gallant.fnt.uu - copied unchanged from r266841, head/share/vt/fonts/gallant.fnt.uu stable/10/share/vt/keymaps/ - copied from r267194, head/share/vt/keymaps/ Deleted: stable/10/share/vt/fonts/gallant.fnt Modified: stable/10/share/vt/Makefile stable/10/share/vt/fonts/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/vt/Makefile ============================================================================== --- head/share/vt/Makefile Thu May 29 13:41:07 2014 (r266838) +++ stable/10/share/vt/Makefile Mon Jun 16 12:37:10 2014 (r267541) @@ -1,5 +1,5 @@ # $FreeBSD$ -SUBDIR= fonts +SUBDIR= fonts keymaps .include Modified: stable/10/share/vt/fonts/Makefile ============================================================================== --- head/share/vt/fonts/Makefile Thu May 29 13:41:07 2014 (r266838) +++ stable/10/share/vt/fonts/Makefile Mon Jun 16 12:37:10 2014 (r267541) @@ -2,8 +2,12 @@ FILES= gallant.fnt -FILESDIR= ${SHAREDIR}/vt/fonts +CLEANFILES+= ${FILES} -NO_OBJ= +.SUFFIXES: .uu +.uu: + uudecode < ${.IMPSRC} + +FILESDIR= ${SHAREDIR}/vt/fonts .include Copied: stable/10/share/vt/fonts/gallant.fnt.uu (from r266841, head/share/vt/fonts/gallant.fnt.uu) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/vt/fonts/gallant.fnt.uu Mon Jun 16 12:37:10 2014 (r267541, copy of r266841, head/share/vt/fonts/gallant.fnt.uu) @@ -0,0 +1,192 @@ +# $FreeBSD$ +begin 644 gallant.fnt +M5D9.5#`P,#(,%@``````OP````(````````````````````````````````` +M```````````````````````````````````````````````&``8`!@`&``8` +M!@`&``8`!@`&``8```````8`!@```````````````````!F`&8`9@!F`&8`9 +M@````````````````````````````````````````````S`#,`,P!F`?\!_P +M#,`,P!F`&8!_P'_`,P!F`&8````````````````````&`!^`/\!FX&9@9@`^ +M`!^`!\`&8`9@9F!_P#^`!@```````````````````#A@1,!$P$6`.8`#``,` +M!@`,``P`&<`:(#(@,B!AP```````````````````!P`/@!C`&,`8P`^`'@`^ +M`'<`8V!AX&'`88`_X!Y@```````````````````,`!X`'@`&``8`#``8`!`` +M``````````````````````````````````````#``8`#@`,`!P`&``8`!@`& +M``8`!P`#``.``8``P```````````````````,``8`!P`#``.``8`!@`&``8` +M!@`.``P`'``8`#````````````````````````````````\`!@!F8';@&8`` +M`!F`=N!F8`8`#P`````````````````````````````````&``8`!@`&`'_@ +M?^`&``8`!@`&```````````````````````````````````````````````` +M````#``>`!X`!@`&``P`&``0``````````````````````````````!_X'_@ +M```````````````````````````````````````````````````````````, +M`!X`'@`,`````````````````````&``P`#``8`!@`,``P`&``P`#``8`!@` +M,``P`&`````````````````````'``^`$8`0P##`,,`PP##`,,`PP##`,(`8 +M@!\`#@````````````````````(`!@`.`!X`-@`&``8`!@`&``8`!@`&``8` +M!@`_P```````````````````'P`_@&'`0,``P`#``,`!@`,`!@`,`!@`,"!_ +MX'_@```````````````````/@!_`(.!`8`!@`.`'P`_``.``8`!@0&!@0#^` +M'P````````````````````&``X`#@`6`!8`)@`F`$8`1@"&`/^!_X`&``8`! +M@```````````````````#\`/P!``$``@`#^`,<``X`!@`&``8$!@8&`PP!^` +M```````````````````'``P`&``P`#``8`!G@&_`<.!@8&!@8&!P0#^`'P`` +M`````````````````!_@/^!@0`!``,``@`"``8`!``$``P`"``(`!@`$```` +M````````````````#P`1@##`,,`PP!B`#0`&``L`$8`PP##`,,`8@`\````` +M```````````````/@!'`(.!@8&!@8&!PX#]@'F``8`#``,`!@`<`/``````` +M```````````````````````````,`!X`'@`,```````,`!X`'@`,```````` +M````````````````````````````#``>`!X`#```````#``>`!X`!@`&``P` +M&``0`````````````````````&`!P`<`'@!X`'@`'@`'``'``&`````````` +M````````````````````````````?\!_P`````!_P'_````````````````` +M`````````````````````&``.``>``>``>`!X`>`'@`X`&`````````````` +M```````/`!^`.<`@P`#``,`!@`,`!@`,``P```````P`#``````````````` +M``````````````^`/\`P8&!@9R!OH&R@;*!GX&``,``_X`_@```````````` +M```````&``8`"P`+``D`$8`1@!"`/\`@P"!`0&!`8.#P```````````````` +M`````/\`8(!@P&#`8,!A@'^`8,!@8&!@8&!@8&#`_X`````````````````` +M````#\`08"`@(`!@`&``8`!@`&``8``@`#`@&$`/@``````````````````` +M``#_`&'`8,!@8&!@8&!@8&!@8&!@8&!@8$!A@/X````````````````````` +M`'_`,$`P0#``,``P@#^`,(`P`#``,``P(#`@?^`````````````````````` +M?\`P0#!`,``P`#"`/X`P@#``,``P`#``,`!X```````````````````````/ +MP!!@("`@`&``8`!@`&``8?!@8"!@,&`88`^``````````````````````/#P +M8&!@8&!@8&!@8'_@8&!@8&!@8&!@8&!@\/``````````````````````'X`& +M``8`!@`&``8`!@`&``8`!@`&``8`!@`?@``````````````````````?@`8` +M!@`&``8`!@`&``8`!@`&``8`!@`&``8`!@`&``0`.``P`````````/#@88!C +M`&8`;`!X`'@`?`!N`&<`8X!AP&#@\'``````````````````````>``P`#`` +M,``P`#``,``P`#``,``P`#`@,"!_X`````````````````````#@<&#@<.!P +MX'#@66!98%E@36!.8$Y@1&!$8.3P`````````````````````,!P8"!P('@@ +M6"!,($8@1R!#($&@0.!`X$!@X#``````````````````````#P`1P"#`(&!@ +M8&!@8&!@8&!@8&`@0#!`&(`/``````````````````````!_@##`,&`P8#!@ +M,,`W@#``,``P`#``,``P`'@```````````````````````\`$<`@P"!@8&!@ +M8&!@8&!@8&!@,$`X0!^`#@`?`".0`>``````````````_P!A@&#`8,!@P&"` +M?P!\`&X`9P!C@&'`8.#P<``````````````````````?X#!@8"!@('``/``> +M``>``<``X$!@0&!@P'^``````````````````````'_@1B`&``8`!@`&``8` +M!@`&``8`!@`&``8`'X``````````````````````\'!@(&`@8"!@(&`@8"!@ +M(&`@8"!@('!`/\`?@`````````````````````#@X&!`,(`P@#"`&0`9`!D` +M#``.``X`!``$``0``````````````````````/[P9B!F(&8@=B!W0#-`-T`[ +MP#N`&8`9@!F`&8``````````````````````\'!@(#!`.(`8@`T`!@`&``L` +M$8`1P"#`0&#@\`````````````````````#P<&`@,$`8@!B`#0`&``8`!@`& +M``8`!@`&``\``````````````````````#_@(,``P`&``8`#``,`!@`&``P` +M#``8`!@@/^````````````````````?`!\`&``8`!@`&``8`!@`&``8`!@`& +M``8`!\`'P```````````````````8`!@`#``,``8`!@`#``,``8``P`#``&` +M`8``P`#```````````````````!\`'P`#``,``P`#``,``P`#``,``P`#``, +M`'P`?`````````````````````0`#@`;`#&`8,`````````````````````` +M```````````````````````````````````````````````````````````` +M``````#_X/_@```````````!``,`!@`&``>`!X`#```````````````````` +M```````````````````````````````````/@!C`$,`#P!S`,,`PP##`.<`> +MX```````````````````(`!@`.``8`!@`&>`;\!PX&!@8&!@8&!@<&!XP$^` +M````````````````````````````````'X`QP"#`8`!@`&``8`!P0##`'X`` +M``````````````````!@`.``8`!@`&`/8#'@(.!@8&!@8&!@8'#@.6`><``` +M``````````````````````````````\`,,!@8&!@?^!@`&``,``88`^````` +M```````````````#@`3`!,`,``P`#``,`!^`#``,``P`#``,``P`'@`````` +M```````````````````````````?(#'@8,!@P&#`,8`_`&``?\`_X"!@0"!` +M('_`/X``````$``P`'``,``P`#>`.<`PP##`,,`PP##`,,`PP'G@```````` +M``````````````8`!@``````'@`&``8`!@`&``8`!@`&``8`'X`````````` +M`````````````,``P``````#P`#``,``P`#``,``P`#``,``P"#`,,`X@!\` +M#@``````8`#@`&``8`!@`&'`8P!F`'P`>`!\`&X`9P!C@/'@```````````` +M```````>``8`!@`&``8`!@`&``8`!@`&``8`!@`&``8`'X`````````````` +M``````````````````#=P&[@9F!F8&9@9F!F8&9@9F#O<``````````````` +M`````````````````">`><`PP##`,,`PP##`,,`PP'G@```````````````` +M````````````````#X`1P"#@8&!@8&!@8&!P0#B`'P`````````````````` +M``````````````#O@''`8.!@8&!@8&!@8&!`<(!_`&``8`!@`&``\``````` +M``````````````\@$>`@X&!@8&!@8&!@<&`XX!_@`&``8`!@`&``\``````` +M``````````````````````````````````` +M```````````?P##`,$`X`!X`!X`!P"#`,,`_@``````````````````````` +M``0`!``,`'_`#``,``P`#``,``P`#"`.0`>````````````````````````` +M````````>>`PP##`,,`PP##`,,`PP#G`'F`````````````````````````` +M``````#P<&`@,$`P0!B`&(`-``T`!@`&```````````````````````````` +M`````/]P9B!F(&8@-T`[0#M`&8`9@!F````````````````````````````` +M````^/!P0#B`'0`.``<`"X`1P"#@\?`````````````````````````````` +M``#P\&`@,$`P0!B`&(`-``T`!@`&``0`#``(`'@`<``````````````````` +M`'_@8.!!P`.`!P`.`!P`."!P8'_@```````````````````!P`,``P`!@`&` +M`8`#``<``P`!@`&``8`#``,``<````````````````````8`!@`&``8`!@`& +M``8`!@`&``8`!@`&``8`!@`&``8`!@`&``8`!@``````.``,``P`&``8`!@` +M#``.``P`&``8`!@`#``,`#@````````````````````````````````````` +M````'"`^8#;`9\!#@```````````````````JJ!54*J@55"JH%50JJ!54*J@ +M55"JH%50JJ!54*J@55"JH%50JJ!54*J@55`````````&``8```````8`!@`& +M``8`!@`&``8`!@`&``8`!@````````````````````$``0`#``(`'P`W@"6` +M9`!L`&@`>(`Y@!\`$``P`"``(``````````&``P`$``0`#``,``P`#X`?``8 +M`!@`&``8`#\@/^`QP```````````````````````````8"!W0#N`$<`PP##` +M.(`=P"[@0&```````````````````````````/!P8"`P0!B`&(`-``8`/\`& +M`#_`!@`&``8`#P````````````````````8`!@`&``8`!@`&``8`!@`&```` +M```&``8`!@`&``8`!@`&``8`!@``````#^`88#`@."`>`!^`,`0P`;`!L`&P`;`!L`&P`;````````` +M````````````````````````````````!@`/``\`!@`````````````````` +M``````````````````````````````````````````````````(``P`!@`F` +M!P`````````&``X`#@`&``8`!@`&``8`#P`````````````````````````` +M``````````<`"X`1P##`,,`X@!T`#@``````/^!_P``````````````````` +M`````````````````````&8`,P`9@`S`"(`1`"(`1``````````````````` +M`!@`.``X`!@`&"`88!C`&8`_0`;`#<`9P#+`9,!'X`#``,`````````````` +M&``X`#@`&``8(!A@&,`9@#_`!^`/8!I@,,!A@$,``^`#X``````````````X +M`'P`3``,`!@@#&!,P'V`.T`&P`W`&<`RP&3`1^``P`#````````````````` +M```#``,```````,``P`&``P`&``P`#``,$`YP!^`#P```````````!P`#P`# +M@`8`!@`+``L`"0`1@!&`$(`_P"#`($!`8$!@X/```````````````X`/`!P` +M!@`&``L`"P`)`!&`$8`0@#_`(,`@0$!@0&#@\``````````````&``\`&8`& +M``8`"P`+``D`$8`1@!"`/\`@P"!`0&!`8.#P``````````````S`'X`S``8` +M!@`+``L`"0`1@!&`$(`_P"#`($!`8$!@X/``````````````&8`9@```!@`& +M``L`"P`)`!&`$8`0@#_`(,`@0$!@0&#@\``````````````&``\`&8`/``8` +M"P`+``D`$8`1@!"`/\`@P"!`0&!`8.#P``````````````````````_@#B`6 +M(!8`%@`60"?`)D`^`"8`1@!&$$80Y_``````````````````````#\`08"`@ +M(`!@`&``8`!@`&``8``@`#`@&$`/@`(``P`!@`F`!P`<``\``X!_P#!`,$`P +M`#``,(`_@#"`,``P`#``,"`P('_@``````````````.`#P`<`'_`,$`P0#`` +M,``P@#^`,(`P`#``,``P(#`@?^``````````````!@`/`!F`?\`P0#!`,``P +M`#"`/X`P@#``,``P`#`@,"!_X``````````````9@!F```!_P#!`,$`P`#`` +M,(`_@#"`,``P`#``,"`P('_@`````````````!P`#P`#@!^`!@`&``8`!@`& +M``8`!@`&``8`!@`&``8`'X```````````````X`/`!P`'X`&``8`!@`&``8` +M!@`&``8`!@`&``8`!@`?@``````````````&``\`&8`?@`8`!@`&``8`!@`& +M``8`!@`&``8`!@`&`!^``````````````!F`&8```!^`!@`&``8`!@`&``8` +M!@`&``8`!@`&``8`'X``````````````````````_P!AP&#`8&!@8&!@^&#X +M8&!@8&!@8&!`88#^```````````````,P!^`,P#`<&`@<"!X(%@@3"!&($<@ +M0R!!H$#@0.!`8.`P`````````````!P`#P`#@`\`$<`@P"!@8&!@8&!@8&!@ +M8&!@($`P0!B`#P```````````````X`/`!P`#P`1P"#`(&!@8&!@8&!@8&!@ +M8&`@0#!`&(`/```````````````&``\`&8`/`!'`(,`@8&!@8&!@8&!@8&!@ +M8"!`,$`8@`\```````````````S`'X`S``\`$<`@P"!@8&!@8&!@8&!@8&!@ +M($`P0!B`#P``````````````&8`9@```#P`1P"#`(&!@8&!@8&!@8&!@8&`@ +M0#!`&(`/`````````````````````````````````&!@,,`9@`\`!@`/`!F` +M,,!@8```````````````````````8`_`$<`AP"'@8V!C8&9@;&!L8'A@.$`P +M0#B`;P``````````````'``/``.`\'!@(&`@8"!@(&`@8"!@(&`@8"!@('!` +M/\`?@``````````````#@`\`'`#P<&`@8"!@(&`@8"!@(&`@8"!@(&`@<$`_ +MP!^```````````````8`#P`9@/!P8"!@(&`@8"!@(&`@8"!@(&`@8"!P0#_` +M'X``````````````&8`9@```\'!@(&`@8"!@(&`@8"!@(&`@8"!@('!`/\`? +M@``````````````#@`\`'`#P<&`@,$`8@!B`#0`&``8`!@`&``8`!@`&``\` +M`````````````````````'@`,``P`#^`,,`P8#!@,&`P8##`/X`P`#``>``` +M``````````````````\`&8`9@#&`,8`S@#8`-@`V`#.`,<`PX#1@-F!WP``` +M```````````````````<``\``X````^`&,`0P`/`',`PP##`,,`YP![@```` +M``````````````````.`#P`<````#X`8P!#``\`X``````` +M```````````````,P!^`,P````^`&,`0P`/`',`PP##`,,`YP![@```````` +M`````````````!F`&8``````#X`8P!#``\`X``````````` +M`````````````````````!^`-D`F8`Y@/^!F`&8`9@!G8#_````````````` +M````````````````````'X`QP"#`8`!@`&``8`!P0##`'X`"``,``8`)@`<` +M````````'``/``.````/`##`8&!@8'_@8`!@`#``&&`/@``````````````` +M```````#@`\`'`````\`,,!@8&!@?^!@`&``,``88`^````````````````` +M``````8`#P`9@```#P`PP&!@8&!_X&``8``P`!A@#X`````````````````` +M````&8`9@``````/`##`8&!@8'_@8`!@`#``&&`/@``````````````````` +M```<``\``X```!X`!@`&``8`!@`&``8`!@`&`!^````````````````````` +M``.`#P`<````'@`&``8`!@`&``8`!@`&``8`'X`````````````````````` +M!@`/`!F````>``8`!@`&``8`!@`&``8`!@`?@``````````````````````9 +M@!F``````!X`!@`&``8`!@`&``8`!@`&`!^````````````````````PP!^` +M!@`?`#&``<`/P!#@(.!@8&!@8&!P0#B`'P``````````````````````#,`? +M@#,````G@'G`,,`PP##`,,`PP##`,,!YX``````````````````````<``\` +M`X````^`$<`@X&!@8&!@8&!@<$`X@!\```````````````````````.`#P`< +M````#X`1P"#@8&!@8&!@8&!P0#B`'P``````````````````````!@`/`!F` +M```/@!'`(.!@8&!@8&!@8'!`.(`?```````````````````````,P!^`,P`` +M``^`$<`@X&!@8&!@8&!@<$`X@!\``````````````````````!F`&8`````` +M#X`1P"#@8&!@8&!@8&!P0#B`'P`````````````````````````````````& +M``8``````'_@?^``````!@`&``````````````````````````````````_@ +M$<`AX&-@9F!F8&Q@>$`X@'\``````````````````````!P`#P`#@```>>`P +MP##`,,`PP##`,,`PP#G`'F```````````````````````X`/`!P```!YX##` +M,,`PP##`,,`PP##`.<`>8``````````````````````&``\`&8```'G@,,`P +MP##`,,`PP##`,,`YP!Y@`````````````````````!F`&8``````>>`PP##` +M,,`PP##`,,`PP#G`'F```````````````````````X`/`!P```#P\&`@,$`P +M0!B`&(`-``T`!@`&``0`#``(`'@`<```````X`!@`&``8`!@`&^`< Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19C49670; Mon, 16 Jun 2014 20:43:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E056E2C30; Mon, 16 Jun 2014 20:43:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5GKhhSi017510; Mon, 16 Jun 2014 20:43:43 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5GKhheI017509; Mon, 16 Jun 2014 20:43:43 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201406162043.s5GKhheI017509@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 16 Jun 2014 20:43:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267555 - stable/9/sys/ofed/include/linux X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jun 2014 20:43:44 -0000 Author: hselasky Date: Mon Jun 16 20:43:43 2014 New Revision: 267555 URL: http://svnweb.freebsd.org/changeset/base/267555 Log: MFC r254120, r257862 and r267395: - Fix out of range shifting bug in bitops.h. - Make code a bit easier to read by adding parenthesis. Approved by: re, gjb @ Modified: stable/9/sys/ofed/include/linux/bitops.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ofed/include/linux/bitops.h ============================================================================== --- stable/9/sys/ofed/include/linux/bitops.h Mon Jun 16 20:21:15 2014 (r267554) +++ stable/9/sys/ofed/include/linux/bitops.h Mon Jun 16 20:43:43 2014 (r267555) @@ -272,23 +272,26 @@ bitmap_empty(unsigned long *addr, int si return (1); } -#define NBINT (NBBY * sizeof(int)) +#define NBLONG (NBBY * sizeof(long)) #define set_bit(i, a) \ - atomic_set_int(&((volatile int *)(a))[(i)/NBINT], 1 << (i) % NBINT) + atomic_set_long(&((volatile long *)(a))[(i)/NBLONG], 1UL << ((i) % NBLONG)) #define clear_bit(i, a) \ - atomic_clear_int(&((volatile int *)(a))[(i)/NBINT], 1 << (i) % NBINT) + atomic_clear_long(&((volatile long *)(a))[(i)/NBLONG], 1UL << ((i) % NBLONG)) #define test_bit(i, a) \ - !!(atomic_load_acq_int(&((volatile int *)(a))[(i)/NBINT]) & 1 << ((i) % NBINT)) + !!(atomic_load_acq_long(&((volatile long *)(a))[(i)/NBLONG]) & \ + (1UL << ((i) % NBLONG))) static inline long test_and_clear_bit(long bit, long *var) { long val; - bit = 1 << bit; + var += bit / (sizeof(long) * NBBY); + bit %= sizeof(long) * NBBY; + bit = (1UL << bit); do { val = *(volatile long *)var; } while (atomic_cmpset_long(var, val, val & ~bit) == 0); @@ -301,7 +304,9 @@ test_and_set_bit(long bit, long *var) { long val; - bit = 1 << bit; + var += bit / (sizeof(long) * NBBY); + bit %= sizeof(long) * NBBY; + bit = (1UL << bit); do { val = *(volatile long *)var; } while (atomic_cmpset_long(var, val, val | bit) == 0); From owner-svn-src-stable@FreeBSD.ORG Tue Jun 17 05:21:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 83724D48; Tue, 17 Jun 2014 05:21:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7023424F3; Tue, 17 Jun 2014 05:21:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5H5Lnwr056986; Tue, 17 Jun 2014 05:21:49 GMT (envelope-from dchagin@svn.freebsd.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5H5LmBB056982; Tue, 17 Jun 2014 05:21:48 GMT (envelope-from dchagin@svn.freebsd.org) Message-Id: <201406170521.s5H5LmBB056982@svn.freebsd.org> From: Dmitry Chagin Date: Tue, 17 Jun 2014 05:21:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267561 - in stable/10/sys: amd64/linux32 i386/linux kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2014 05:21:49 -0000 Author: dchagin Date: Tue Jun 17 05:21:48 2014 New Revision: 267561 URL: http://svnweb.freebsd.org/changeset/base/267561 Log: Revert MFC r266925 because it can lead to instant panic at fexecve(): To allow to run interpreter itself add a new ELF branding type. Pointed out by: kib, mjg Modified: stable/10/sys/amd64/linux32/linux32_sysvec.c stable/10/sys/i386/linux/linux_sysvec.c stable/10/sys/kern/imgact_elf.c stable/10/sys/sys/imgact_elf.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- stable/10/sys/amd64/linux32/linux32_sysvec.c Tue Jun 17 02:10:40 2014 (r267560) +++ stable/10/sys/amd64/linux32/linux32_sysvec.c Tue Jun 17 05:21:48 2014 (r267561) @@ -1083,7 +1083,7 @@ static Elf32_Brandinfo linux_brand = { .sysvec = &elf_linux_sysvec, .interp_newpath = NULL, .brand_note = &linux32_brandnote, - .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE | BI_CAN_EXEC_INTERP + .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE }; static Elf32_Brandinfo linux_glibc2brand = { @@ -1095,7 +1095,7 @@ static Elf32_Brandinfo linux_glibc2brand .sysvec = &elf_linux_sysvec, .interp_newpath = NULL, .brand_note = &linux32_brandnote, - .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE | BI_CAN_EXEC_INTERP + .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE }; Elf32_Brandinfo *linux_brandlist[] = { Modified: stable/10/sys/i386/linux/linux_sysvec.c ============================================================================== --- stable/10/sys/i386/linux/linux_sysvec.c Tue Jun 17 02:10:40 2014 (r267560) +++ stable/10/sys/i386/linux/linux_sysvec.c Tue Jun 17 05:21:48 2014 (r267561) @@ -1058,7 +1058,7 @@ static Elf32_Brandinfo linux_brand = { .sysvec = &elf_linux_sysvec, .interp_newpath = NULL, .brand_note = &linux_brandnote, - .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE | BI_CAN_EXEC_INTERP + .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE }; static Elf32_Brandinfo linux_glibc2brand = { @@ -1070,7 +1070,7 @@ static Elf32_Brandinfo linux_glibc2brand .sysvec = &elf_linux_sysvec, .interp_newpath = NULL, .brand_note = &linux_brandnote, - .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE | BI_CAN_EXEC_INTERP + .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE }; Elf32_Brandinfo *linux_brandlist[] = { Modified: stable/10/sys/kern/imgact_elf.c ============================================================================== --- stable/10/sys/kern/imgact_elf.c Tue Jun 17 02:10:40 2014 (r267560) +++ stable/10/sys/kern/imgact_elf.c Tue Jun 17 05:21:48 2014 (r267561) @@ -261,8 +261,6 @@ __elfN(get_brandinfo)(struct image_param { const Elf_Ehdr *hdr = (const Elf_Ehdr *)imgp->image_header; Elf_Brandinfo *bi; - const char *fname_name, *interp_brand_name; - int fname_len, interp_len; boolean_t ret; int i; @@ -313,33 +311,6 @@ __elfN(get_brandinfo)(struct image_param } } - /* Some ABI allows to run the interpreter itself. */ - for (i = 0; i < MAX_BRANDS; i++) { - bi = elf_brand_list[i]; - if (bi == NULL || bi->flags & BI_BRAND_NOTE_MANDATORY) - continue; - if (hdr->e_machine != bi->machine || - (bi->flags & BI_CAN_EXEC_INTERP) == 0) - continue; - /* - * Compare the interpreter name not the path to allow run it - * from everywhere. - */ - interp_brand_name = strrchr(bi->interp_path, '/'); - if (interp_brand_name == NULL) - interp_brand_name = bi->interp_path; - interp_len = strlen(interp_brand_name); - fname_name = strrchr(imgp->args->fname, '/'); - if (fname_name == NULL) - fname_name = imgp->args->fname; - fname_len = strlen(fname_name); - if (fname_len < interp_len) - continue; - ret = strncmp(fname_name, interp_brand_name, interp_len); - if (ret == 0) - return (bi); - } - /* Lacking a recognized interpreter, try the default brand */ for (i = 0; i < MAX_BRANDS; i++) { bi = elf_brand_list[i]; Modified: stable/10/sys/sys/imgact_elf.h ============================================================================== --- stable/10/sys/sys/imgact_elf.h Tue Jun 17 02:10:40 2014 (r267560) +++ stable/10/sys/sys/imgact_elf.h Tue Jun 17 05:21:48 2014 (r267561) @@ -77,7 +77,6 @@ typedef struct { #define BI_CAN_EXEC_DYN 0x0001 #define BI_BRAND_NOTE 0x0002 /* May have note.ABI-tag section. */ #define BI_BRAND_NOTE_MANDATORY 0x0004 /* Must have note.ABI-tag section. */ -#define BI_CAN_EXEC_INTERP 0x0008 /* Allow to run interpreter itself. */ } __ElfN(Brandinfo); __ElfType(Auxargs); From owner-svn-src-stable@FreeBSD.ORG Tue Jun 17 05:24:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9EE87E9D; Tue, 17 Jun 2014 05:24:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C1F42511; Tue, 17 Jun 2014 05:24:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5H5Ojg9057536; Tue, 17 Jun 2014 05:24:45 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5H5OjMu057535; Tue, 17 Jun 2014 05:24:45 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201406170524.s5H5OjMu057535@svn.freebsd.org> From: Bryan Venteicher Date: Tue, 17 Jun 2014 05:24:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267562 - stable/10/sys/dev/virtio/block X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2014 05:24:45 -0000 Author: bryanv Date: Tue Jun 17 05:24:45 2014 New Revision: 267562 URL: http://svnweb.freebsd.org/changeset/base/267562 Log: MFC r267313: Always append new bios to the tail of the queue, instead of sorting them Modified: stable/10/sys/dev/virtio/block/virtio_blk.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/virtio/block/virtio_blk.c ============================================================================== --- stable/10/sys/dev/virtio/block/virtio_blk.c Tue Jun 17 05:21:48 2014 (r267561) +++ stable/10/sys/dev/virtio/block/virtio_blk.c Tue Jun 17 05:24:45 2014 (r267562) @@ -577,7 +577,7 @@ vtblk_strategy(struct bio *bp) if (sc->vtblk_flags & VTBLK_FLAG_DETACH) vtblk_finish_bio(bp, ENXIO); else { - bioq_disksort(&sc->vtblk_bioq, bp); + bioq_insert_tail(&sc->vtblk_bioq, bp); if ((sc->vtblk_flags & VTBLK_FLAG_SUSPEND) == 0) vtblk_startio(sc); From owner-svn-src-stable@FreeBSD.ORG Tue Jun 17 08:09:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87D13560; Tue, 17 Jun 2014 08:09:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 742782149; Tue, 17 Jun 2014 08:09:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5H89fRx031397; Tue, 17 Jun 2014 08:09:41 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5H89fXs031396; Tue, 17 Jun 2014 08:09:41 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406170809.s5H89fXs031396@svn.freebsd.org> From: Alexander Motin Date: Tue, 17 Jun 2014 08:09:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267571 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2014 08:09:41 -0000 Author: mav Date: Tue Jun 17 08:09:40 2014 New Revision: 267571 URL: http://svnweb.freebsd.org/changeset/base/267571 Log: MFC r267029, r267038: Replace gethrtime() with cpu_ticks(), as source of random for the taskqueue selection. gethrtime() in our port updated with HZ rate, so unusable for this specific purpose, completely draining benefit of multiple taskqueues. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Jun 17 08:02:50 2014 (r267570) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Jun 17 08:09:40 2014 (r267571) @@ -953,7 +953,11 @@ spa_taskq_dispatch_ent(spa_t *spa, zio_t if (tqs->stqs_count == 1) { tq = tqs->stqs_taskq[0]; } else { +#ifdef _KERNEL + tq = tqs->stqs_taskq[cpu_ticks() % tqs->stqs_count]; +#else tq = tqs->stqs_taskq[gethrtime() % tqs->stqs_count]; +#endif } taskq_dispatch_ent(tq, func, arg, flags, ent); From owner-svn-src-stable@FreeBSD.ORG Tue Jun 17 08:56:17 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 41F6E33E; Tue, 17 Jun 2014 08:56:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E542257F; Tue, 17 Jun 2014 08:56:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5H8uHXL053887; Tue, 17 Jun 2014 08:56:17 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5H8uHVw053886; Tue, 17 Jun 2014 08:56:17 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201406170856.s5H8uHVw053886@svn.freebsd.org> From: Christian Brueffer Date: Tue, 17 Jun 2014 08:56:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267573 - stable/10/contrib/openbsm/libbsm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2014 08:56:17 -0000 Author: brueffer Date: Tue Jun 17 08:56:16 2014 New Revision: 267573 URL: http://svnweb.freebsd.org/changeset/base/267573 Log: MFC: r267478 MFp4: change 1191346 In print_header32_tok(), correct printing in the XML case. This lead to invalid XML files before. PR: 176259 Submitted by: zi Modified: stable/10/contrib/openbsm/libbsm/bsm_io.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/openbsm/libbsm/bsm_io.c ============================================================================== --- stable/10/contrib/openbsm/libbsm/bsm_io.c Tue Jun 17 08:11:45 2014 (r267572) +++ stable/10/contrib/openbsm/libbsm/bsm_io.c Tue Jun 17 08:56:16 2014 (r267573) @@ -949,7 +949,7 @@ print_header32_tok(FILE *fp, tokenstr_t { print_tok_type(fp, tok->id, "header", oflags); - if (oflags & AU_OFLAG_RAW) { + if (oflags & AU_OFLAG_XML) { open_attr(fp, "version"); print_1_byte(fp, tok->tt.hdr32.version, "%u"); close_attr(fp); From owner-svn-src-stable@FreeBSD.ORG Tue Jun 17 11:58:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5BD77E64; Tue, 17 Jun 2014 11:58:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 481FD2689; Tue, 17 Jun 2014 11:58:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5HBwc8p037975; Tue, 17 Jun 2014 11:58:38 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5HBwc07037974; Tue, 17 Jun 2014 11:58:38 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201406171158.s5HBwc07037974@svn.freebsd.org> From: Christian Brueffer Date: Tue, 17 Jun 2014 11:58:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267576 - stable/9/contrib/openbsm/libbsm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2014 11:58:38 -0000 Author: brueffer Date: Tue Jun 17 11:58:37 2014 New Revision: 267576 URL: http://svnweb.freebsd.org/changeset/base/267576 Log: MFC: r267478 MFp4: change 1191346 In print_header32_tok(), correct printing in the XML case. This lead to invalid XML files before. PR: 176259 Submitted by: zi Approved by: re (marius) Modified: stable/9/contrib/openbsm/libbsm/bsm_io.c Directory Properties: stable/9/contrib/openbsm/ (props changed) Modified: stable/9/contrib/openbsm/libbsm/bsm_io.c ============================================================================== --- stable/9/contrib/openbsm/libbsm/bsm_io.c Tue Jun 17 09:33:22 2014 (r267575) +++ stable/9/contrib/openbsm/libbsm/bsm_io.c Tue Jun 17 11:58:37 2014 (r267576) @@ -949,7 +949,7 @@ print_header32_tok(FILE *fp, tokenstr_t { print_tok_type(fp, tok->id, "header", oflags); - if (oflags & AU_OFLAG_RAW) { + if (oflags & AU_OFLAG_XML) { open_attr(fp, "version"); print_1_byte(fp, tok->tt.hdr32.version, "%u"); close_attr(fp); From owner-svn-src-stable@FreeBSD.ORG Tue Jun 17 13:14:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D4EDECA; Tue, 17 Jun 2014 13:14:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 199492E2B; Tue, 17 Jun 2014 13:14:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5HDEVav075534; Tue, 17 Jun 2014 13:14:31 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5HDEV7H075533; Tue, 17 Jun 2014 13:14:31 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201406171314.s5HDEV7H075533@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 17 Jun 2014 13:14:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267579 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2014 13:14:32 -0000 Author: trasz Date: Tue Jun 17 13:14:31 2014 New Revision: 267579 URL: http://svnweb.freebsd.org/changeset/base/267579 Log: MFC r266007: Initialize loginclass mutex using MTX_SYSINIT instead of using SI_SUB_CPU. Modified: stable/10/sys/kern/kern_loginclass.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_loginclass.c ============================================================================== --- stable/10/sys/kern/kern_loginclass.c Tue Jun 17 13:12:30 2014 (r267578) +++ stable/10/sys/kern/kern_loginclass.c Tue Jun 17 13:14:31 2014 (r267579) @@ -69,9 +69,7 @@ LIST_HEAD(, loginclass) loginclasses; * Lock protecting loginclasses list. */ static struct mtx loginclasses_lock; - -static void lc_init(void); -SYSINIT(loginclass, SI_SUB_CPU, SI_ORDER_FIRST, lc_init, NULL); +MTX_SYSINIT(loginclasses_init, &loginclasses_lock, "loginclasses lock", MTX_DEF); void loginclass_hold(struct loginclass *lc) @@ -229,10 +227,3 @@ loginclass_racct_foreach(void (*callback (callback)(lc->lc_racct, arg2, arg3); mtx_unlock(&loginclasses_lock); } - -static void -lc_init(void) -{ - - mtx_init(&loginclasses_lock, "loginclasses lock", NULL, MTX_DEF); -} From owner-svn-src-stable@FreeBSD.ORG Tue Jun 17 17:13:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06F6234D; Tue, 17 Jun 2014 17:13:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E79092614; Tue, 17 Jun 2014 17:13:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5HHDg2W091051; Tue, 17 Jun 2014 17:13:42 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5HHDgLb091050; Tue, 17 Jun 2014 17:13:42 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406171713.s5HHDgLb091050@svn.freebsd.org> From: Glen Barber Date: Tue, 17 Jun 2014 17:13:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267584 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2014 17:13:43 -0000 Author: gjb Date: Tue Jun 17 17:13:42 2014 New Revision: 267584 URL: http://svnweb.freebsd.org/changeset/base/267584 Log: Fix the svn revision number for uhso(4) note. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jun 17 16:25:50 2014 (r267583) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jun 17 17:13:42 2014 (r267584) @@ -273,7 +273,7 @@ Hardware Random Number Generators have been disabled by default. - Support for GPS ports has been added + Support for GPS ports has been added to the &man.uhso.4; driver. A memory leak of compressed buffers From owner-svn-src-stable@FreeBSD.ORG Tue Jun 17 17:47:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4608DD95; Tue, 17 Jun 2014 17:47:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32C3C28E4; Tue, 17 Jun 2014 17:47:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5HHllqs005474; Tue, 17 Jun 2014 17:47:47 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5HHllkh005473; Tue, 17 Jun 2014 17:47:47 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406171747.s5HHllkh005473@svn.freebsd.org> From: Glen Barber Date: Tue, 17 Jun 2014 17:47:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267585 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2014 17:47:47 -0000 Author: gjb Date: Tue Jun 17 17:47:46 2014 New Revision: 267585 URL: http://svnweb.freebsd.org/changeset/base/267585 Log: Document r263662, 800.loginfail refinement. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jun 17 17:13:42 2014 (r267584) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jun 17 17:47:46 2014 (r267585) @@ -677,7 +677,10 @@ &man.periodic.8; Scripts -   + The + /etc/periodic/security/800.loginfail + &man.periodic.8; script has been refined to catch more + authentication failures and reduce false positives. From owner-svn-src-stable@FreeBSD.ORG Tue Jun 17 17:51:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D427EF30; Tue, 17 Jun 2014 17:51:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C12B42989; Tue, 17 Jun 2014 17:51:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5HHppV6009107; Tue, 17 Jun 2014 17:51:51 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5HHppkM009106; Tue, 17 Jun 2014 17:51:51 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406171751.s5HHppkM009106@svn.freebsd.org> From: Glen Barber Date: Tue, 17 Jun 2014 17:51:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267586 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2014 17:51:51 -0000 Author: gjb Date: Tue Jun 17 17:51:51 2014 New Revision: 267586 URL: http://svnweb.freebsd.org/changeset/base/267586 Log: Remove content-less sections. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jun 17 17:47:46 2014 (r267585) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jun 17 17:51:51 2014 (r267586) @@ -334,13 +334,6 @@ is now available as a loadable module, xenhvm.ko. - - Boot Loader Changes - -   - - - Hardware Support @@ -360,13 +353,6 @@ The &man.aacraid.4; driver has been updated to version 3.2.5. - - Multimedia Support - -   - - - Network Interface Support @@ -434,20 +420,6 @@ - - Network Protocols - -   - - - - - Disks and Storage - -   - - - File Systems From owner-svn-src-stable@FreeBSD.ORG Tue Jun 17 17:55:55 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 456E92B6; Tue, 17 Jun 2014 17:55:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 31E5529E2; Tue, 17 Jun 2014 17:55:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5HHttL4009703; Tue, 17 Jun 2014 17:55:55 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5HHttbp009702; Tue, 17 Jun 2014 17:55:55 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406171755.s5HHttbp009702@svn.freebsd.org> From: Glen Barber Date: Tue, 17 Jun 2014 17:55:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267587 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2014 17:55:55 -0000 Author: gjb Date: Tue Jun 17 17:55:54 2014 New Revision: 267587 URL: http://svnweb.freebsd.org/changeset/base/267587 Log: Whitespace cleanup. No content changes. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jun 17 17:51:51 2014 (r267586) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jun 17 17:55:54 2014 (r267587) @@ -416,7 +416,6 @@ The &man.bxe.4; driver has been updated to version 1.78.78. - @@ -426,7 +425,6 @@ The &man.zfs.8; filesystem has been updated to support the bookmarks feature. - @@ -653,7 +651,6 @@ /etc/periodic/security/800.loginfail &man.periodic.8; script has been refined to catch more authentication failures and reduce false positives. - @@ -666,7 +663,6 @@ The &man.rc.8; system will now re-source &man.rc.conf.5; on receipt of SIGALRM. - @@ -690,7 +686,6 @@ OpenSSL has been updated to version 0.9.8za. - @@ -711,7 +706,6 @@ &man.cap.mkdb.1;, the services.db will be created with proper endinanness as part of cross-architecture release builds. - From owner-svn-src-stable@FreeBSD.ORG Tue Jun 17 18:03:59 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9D4D4FE; Tue, 17 Jun 2014 18:03:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C4562AC6; Tue, 17 Jun 2014 18:03:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5HI3xSE014146; Tue, 17 Jun 2014 18:03:59 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5HI3xnc014145; Tue, 17 Jun 2014 18:03:59 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406171803.s5HI3xnc014145@svn.freebsd.org> From: Glen Barber Date: Tue, 17 Jun 2014 18:03:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267588 - stable/9/release/doc/en_US.ISO8859-1/installation X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2014 18:03:59 -0000 Author: gjb Date: Tue Jun 17 18:03:59 2014 New Revision: 267588 URL: http://svnweb.freebsd.org/changeset/base/267588 Log: In installation/article.xml: - Update references from 9.1R to 9.3R. - Remove CVS reference. - Update list of earlier FreeBSD versions to remove unsupported versions. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/installation/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/installation/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/installation/article.xml Tue Jun 17 17:55:54 2014 (r267587) +++ stable/9/release/doc/en_US.ISO8859-1/installation/article.xml Tue Jun 17 18:03:59 2014 (r267588) @@ -47,7 +47,7 @@ Upgrading &os; If you are upgrading from a previous release of &os;, please - read upgrading + read upgrading section in the Release Notes for notable incompatibilities carefully. @@ -59,10 +59,9 @@ &url.books.handbook;/synching.html and &url.books.handbook;/makeworld.html. - For SVN use the releng/9.1 branch + For SVN use the releng/9.3 branch which will be where any upcoming Security Advisories or Errata - Notices will be applied. The branch tag to use for updating - the source is RELENG_9_1 for CVS. + Notices will be applied. @@ -71,11 +70,10 @@ The &man.freebsd-update.8; utility supports binary upgrades of &arch.i386; and &arch.amd64; systems running earlier FreeBSD releases. Systems running - 7.[34]-RELEASE, - 8.[12]-RELEASE, - 9.0-RELEASE, - 9.1-BETA1, or - 9.1-RC[123] can upgrade as follows: + 8.4-RELEASE, + 9.[12]-RELEASE, + 9.3-BETA*, or + 9.3-RC* can upgrade as follows: First, ensure that your current system is up to date; a change was recently made to &man.freebsd-update.8; (Errata @@ -91,7 +89,7 @@ &man.freebsd-update.8; will ask for help in merging configuration files. - &prompt.root; freebsd-update upgrade -r 9.1-RELEASE + &prompt.root; freebsd-update upgrade -r 9.3-RELEASE Due to changes in the way that &os; is packaged on the release media, two complications may arise in this process if From owner-svn-src-stable@FreeBSD.ORG Tue Jun 17 18:12:58 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D245F93C; Tue, 17 Jun 2014 18:12:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE1A52BB1; Tue, 17 Jun 2014 18:12:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5HICwvo018947; Tue, 17 Jun 2014 18:12:58 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5HICwVZ018946; Tue, 17 Jun 2014 18:12:58 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406171812.s5HICwVZ018946@svn.freebsd.org> From: Glen Barber Date: Tue, 17 Jun 2014 18:12:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267590 - stable/9/release/doc/en_US.ISO8859-1/errata X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2014 18:12:58 -0000 Author: gjb Date: Tue Jun 17 18:12:58 2014 New Revision: 267590 URL: http://svnweb.freebsd.org/changeset/base/267590 Log: Trim errata/article.xml of old entries. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Tue Jun 17 18:10:06 2014 (r267589) +++ stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Tue Jun 17 18:12:58 2014 (r267590) @@ -101,51 +101,9 @@ - SA-12:01.openssl - 3 May 2012 - OpenSSL multiple vulnerabilities - - - - SA-12:02.crypt - 30 May 2012 - Incorrect crypt() hashing - - - - SA-12:03.bind - 12 June 2012 - Incorrect handling of zero-length RDATA fields in &man.named.8; - - - - SA-12:04.sysret - 12 June 2012 - Privilege escalation when returning from kernel - - - - SA-12:05.bind - 6 August 2012 - &man.named.8; DNSSEC validation Denial of Service - - - - SA-12:06.bind - 22 November 2012 - Multiple Denial of Service vulnerabilities with &man.named.8; - - - - SA-12:07.hostapd - 22 November 2012 - Insufficient message length validation for EAP-TLS messages - - - - SA-12:08.linux - 22 November 2012 - Linux compatibility layer input validation error + No security advisories. +   +   @@ -155,33 +113,6 @@ Late-Breaking News - [November 2, 2012] The current &man.mfi.4; driver has an - overflow bug when handling disks larger than 2^32 sectors in - SYSPD volumes, also known as JBODs, which will cause data - corruption. This bug has been fixed on this &os;-CURRENT but - was too late for inclusion in this release. An Errata Notice - for &release.current; is planned. - - [December 25, 2012] The Installtion Instructions had the - following wrong information about upgrading procedure. All of - them have been fixed in the online version. - - - - The link URL of upgrading section in the Release - Notes, branch names where upcoming Security - Advisories or Errata Notices will be applied, and a - command line argument of &man.freebsd-update.8; were ones - for 9.0-RELEASE, not for &release.current;. - - - - The list of releases supported by &man.freebsd-update.8; - utility were incorrect. For 9.X, The following versions are - supported: 9.0-RELEASE, - 9.1-BETA1, and - 9.1-RC[123]. - - + No late-breaking news.
From owner-svn-src-stable@FreeBSD.ORG Tue Jun 17 20:08:19 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 446B9C70; Tue, 17 Jun 2014 20:08:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2FC5A27EB; Tue, 17 Jun 2014 20:08:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5HK8JYA073004; Tue, 17 Jun 2014 20:08:19 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5HK8IV4072996; Tue, 17 Jun 2014 20:08:18 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406172008.s5HK8IV4072996@svn.freebsd.org> From: Glen Barber Date: Tue, 17 Jun 2014 20:08:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267592 - in stable/10/release/doc: en_US.ISO8859-1/relnotes share/xml X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2014 20:08:19 -0000 Author: gjb Date: Tue Jun 17 20:08:17 2014 New Revision: 267592 URL: http://svnweb.freebsd.org/changeset/base/267592 Log: MFC r265590, r265594, r265595, r265599 [1], r265601 [1], r265602 [1], r265603 [1], r265605 [1], r265607 [1], r267554 [1]: r265590: Modify release.xsl to allow proper attribution for sponsored and/or contributed works. r265594: Add two new entity files in followup to r265590, sponsor.ent and vendor.ent, which will be used for sponsor/vendor names and URLs. r265595: Add references to sponsor.ent and vendor.ent in relnotes/article.xml and share/xml/catalog.xml. r265599: Add DARPA, AFRL to sponsor.ent. r265601: Add LSI and Spectra Logic to sponsor.ent. r265602: Add Netgate to sponsor.ent. r265603: Add a note to keep the entity lists sorted alphabetically. r265605: Add Google to the sponsor.ent file. r265607: Separate &darpa; entity and create &darpa_afrl to avoid confusion. r267554: Add &citrix; and &citrix.rd; macros. [1] - Partial, entity addition only. Sponsored by: The FreeBSD Foundation Added: stable/10/release/doc/share/xml/sponsor.ent - copied, changed from r265594, head/release/doc/share/xml/sponsor.ent stable/10/release/doc/share/xml/vendor.ent - copied, changed from r265594, head/release/doc/share/xml/vendor.ent Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml stable/10/release/doc/share/xml/catalog.xml stable/10/release/doc/share/xml/release.xsl Directory Properties: stable/10/ (props changed) Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jun 17 18:51:03 2014 (r267591) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jun 17 20:08:17 2014 (r267592) @@ -3,6 +3,10 @@ "../../../share/xml/freebsd50.dtd" [ %release; + + %sponsor; + + %vendor; ]>
Modified: stable/10/release/doc/share/xml/catalog.xml ============================================================================== --- stable/10/release/doc/share/xml/catalog.xml Tue Jun 17 18:51:03 2014 (r267591) +++ stable/10/release/doc/share/xml/catalog.xml Tue Jun 17 20:08:17 2014 (r267592) @@ -7,5 +7,7 @@ rewritePrefix="../../"/> + + Modified: stable/10/release/doc/share/xml/release.xsl ============================================================================== --- stable/10/release/doc/share/xml/release.xsl Tue Jun 17 18:51:03 2014 (r267591) +++ stable/10/release/doc/share/xml/release.xsl Tue Jun 17 20:08:17 2014 (r267592) @@ -43,6 +43,51 @@ + + + + + + + + + (Sponsored by + + + + + + + + + + + + + + + + + + (Contributed / provided by + + + + + + + + + + + + + + + + + +

Copied and modified: stable/10/release/doc/share/xml/sponsor.ent (from r265594, head/release/doc/share/xml/sponsor.ent) ============================================================================== --- head/release/doc/share/xml/sponsor.ent Wed May 7 19:43:23 2014 (r265594, copy source) +++ stable/10/release/doc/share/xml/sponsor.ent Tue Jun 17 20:08:17 2014 (r267592) @@ -4,7 +4,25 @@ Sponsors of various works. + Please keep the entity list sorted alphabetically. + --> + + + + + + + + + + + + + + + + Copied and modified: stable/10/release/doc/share/xml/vendor.ent (from r265594, head/release/doc/share/xml/vendor.ent) ============================================================================== --- head/release/doc/share/xml/vendor.ent Wed May 7 19:43:23 2014 (r265594, copy source) +++ stable/10/release/doc/share/xml/vendor.ent Tue Jun 17 20:08:17 2014 (r267592) @@ -4,4 +4,6 @@ Vendors and contributors. + Please keep the entity list sorted alphabetically. + --> From owner-svn-src-stable@FreeBSD.ORG Tue Jun 17 20:32:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ACF3C52E; Tue, 17 Jun 2014 20:32:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80E302A75; Tue, 17 Jun 2014 20:32:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5HKWb8J086631; Tue, 17 Jun 2014 20:32:37 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5HKWbYp086629; Tue, 17 Jun 2014 20:32:37 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406172032.s5HKWbYp086629@svn.freebsd.org> From: Glen Barber Date: Tue, 17 Jun 2014 20:32:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267593 - in stable/10/release/doc: en_US.ISO8859-1/relnotes share/xml X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2014 20:32:37 -0000 Author: gjb Date: Tue Jun 17 20:32:36 2014 New Revision: 267593 URL: http://svnweb.freebsd.org/changeset/base/267593 Log: Add sponsorship attributions for stable/10. Add iX and Netflix to the sponsors.ent file. This is a direct commit to stable/10. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml stable/10/release/doc/share/xml/sponsor.ent Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jun 17 20:08:17 2014 (r267592) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jun 17 20:32:36 2014 (r267593) @@ -130,7 +130,8 @@ which should be resolved due to several change in the VM subsystem. - The &man.geom.4; RAID driver has been + The + &man.geom.4; RAID driver has been updated to support unmapped I/O. A new &man.sysctl.8;, @@ -138,11 +139,13 @@ which allows controlling how long the system will wait after &man.panic.9; before rebooting. - The &man.mpr.4; device has been added, + The + &man.mpr.4; device has been added, providing support for LSI Fusion-MPT 3 12Gb SCSI/SATA controllers. - The &man.mrsas.4; driver has been added, + The + &man.mrsas.4; driver has been added, providing support for LSI MegaRAID SAS controllers. The &man.mfi.4; driver will attach to the controller, by default. To enable &man.mrsas.4; add @@ -229,7 +232,8 @@ Userland Changes - A new flag is added to &man.camcontrol.8;, + A new flag is added to &man.camcontrol.8;, -b, which outputs the existing buses and their parents. Modified: stable/10/release/doc/share/xml/sponsor.ent ============================================================================== --- stable/10/release/doc/share/xml/sponsor.ent Tue Jun 17 20:08:17 2014 (r267592) +++ stable/10/release/doc/share/xml/sponsor.ent Tue Jun 17 20:32:36 2014 (r267593) @@ -21,8 +21,11 @@ + + + From owner-svn-src-stable@FreeBSD.ORG Tue Jun 17 21:07:35 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C0ECF33; Tue, 17 Jun 2014 21:07:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58D302D32; Tue, 17 Jun 2014 21:07:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5HL7ZPe001857; Tue, 17 Jun 2014 21:07:35 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5HL7ZZo001856; Tue, 17 Jun 2014 21:07:35 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406172107.s5HL7ZZo001856@svn.freebsd.org> From: Glen Barber Date: Tue, 17 Jun 2014 21:07:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267594 - stable/10/release/doc/share/xml X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2014 21:07:35 -0000 Author: gjb Date: Tue Jun 17 21:07:34 2014 New Revision: 267594 URL: http://svnweb.freebsd.org/changeset/base/267594 Log: Correct the spelling of iXsystems. Submitted by: delphij Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/share/xml/sponsor.ent Modified: stable/10/release/doc/share/xml/sponsor.ent ============================================================================== --- stable/10/release/doc/share/xml/sponsor.ent Tue Jun 17 20:32:36 2014 (r267593) +++ stable/10/release/doc/share/xml/sponsor.ent Tue Jun 17 21:07:34 2014 (r267594) @@ -21,7 +21,7 @@ - + From owner-svn-src-stable@FreeBSD.ORG Tue Jun 17 21:09:04 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60223241; Tue, 17 Jun 2014 21:09:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D5952D42; Tue, 17 Jun 2014 21:09:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5HL94Ig002248; Tue, 17 Jun 2014 21:09:04 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5HL94aJ002247; Tue, 17 Jun 2014 21:09:04 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406172109.s5HL94aJ002247@svn.freebsd.org> From: Glen Barber Date: Tue, 17 Jun 2014 21:09:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267596 - stable/10/release/doc/share/xml X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2014 21:09:04 -0000 Author: gjb Date: Tue Jun 17 21:09:03 2014 New Revision: 267596 URL: http://svnweb.freebsd.org/changeset/base/267596 Log: Drop 'Inc.' for consistency. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/share/xml/sponsor.ent Modified: stable/10/release/doc/share/xml/sponsor.ent ============================================================================== --- stable/10/release/doc/share/xml/sponsor.ent Tue Jun 17 21:08:49 2014 (r267595) +++ stable/10/release/doc/share/xml/sponsor.ent Tue Jun 17 21:09:03 2014 (r267596) @@ -19,7 +19,7 @@ - + From owner-svn-src-stable@FreeBSD.ORG Tue Jun 17 21:49:04 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2C8B329; Tue, 17 Jun 2014 21:49:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF6C320FF; Tue, 17 Jun 2014 21:49:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5HLn3u7020905; Tue, 17 Jun 2014 21:49:03 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5HLn3xX020904; Tue, 17 Jun 2014 21:49:03 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201406172149.s5HLn3xX020904@svn.freebsd.org> From: Neel Natu Date: Tue, 17 Jun 2014 21:49:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267598 - stable/10/sys/amd64/amd64 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2014 21:49:04 -0000 Author: neel Date: Tue Jun 17 21:49:03 2014 New Revision: 267598 URL: http://svnweb.freebsd.org/changeset/base/267598 Log: MFC r266901 Allocate a zeroed LDT. Failing to do this might result in the LDT appearing to run out of free descriptors because of random junk in the descriptor's 'sd_type' field. Modified: stable/10/sys/amd64/amd64/sys_machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/sys_machdep.c ============================================================================== --- stable/10/sys/amd64/amd64/sys_machdep.c Tue Jun 17 21:48:04 2014 (r267597) +++ stable/10/sys/amd64/amd64/sys_machdep.c Tue Jun 17 21:49:03 2014 (r267598) @@ -465,7 +465,7 @@ user_ldt_alloc(struct proc *p, int force new_ldt = malloc(sizeof(struct proc_ldt), M_SUBPROC, M_WAITOK); new_ldt->ldt_base = (caddr_t)kmem_malloc(kernel_arena, max_ldt_segment * sizeof(struct user_segment_descriptor), - M_WAITOK); + M_WAITOK | M_ZERO); if (new_ldt->ldt_base == NULL) { FREE(new_ldt, M_SUBPROC); mtx_lock(&dt_lock); From owner-svn-src-stable@FreeBSD.ORG Wed Jun 18 05:35:10 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 923CBCF4; Wed, 18 Jun 2014 05:35:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7353B275D; Wed, 18 Jun 2014 05:35:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5I5ZAGx037680; Wed, 18 Jun 2014 05:35:10 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5I5Z9gh037676; Wed, 18 Jun 2014 05:35:09 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201406180535.s5I5Z9gh037676@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 18 Jun 2014 05:35:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267602 - in stable/10: lib/libpmc sys/dev/hwpmc sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jun 2014 05:35:10 -0000 Author: kib Date: Wed Jun 18 05:35:09 2014 New Revision: 267602 URL: http://svnweb.freebsd.org/changeset/base/267602 Log: MFC r267062: Disable existing uncore hwpmc code for Nehalem and Westmere EX. Modified: stable/10/lib/libpmc/libpmc.c stable/10/sys/dev/hwpmc/hwpmc_core.c stable/10/sys/dev/hwpmc/hwpmc_intel.c stable/10/sys/sys/pmc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libpmc/libpmc.c ============================================================================== --- stable/10/lib/libpmc/libpmc.c Wed Jun 18 02:36:21 2014 (r267601) +++ stable/10/lib/libpmc/libpmc.c Wed Jun 18 05:35:09 2014 (r267602) @@ -190,6 +190,11 @@ static const struct pmc_event_descr core __PMC_EV_ALIAS_COREI7() }; +static const struct pmc_event_descr nehalem_ex_event_table[] = +{ + __PMC_EV_ALIAS_COREI7() +}; + static const struct pmc_event_descr haswell_event_table[] = { __PMC_EV_ALIAS_HASWELL() @@ -220,6 +225,11 @@ static const struct pmc_event_descr west __PMC_EV_ALIAS_WESTMERE() }; +static const struct pmc_event_descr westmere_ex_event_table[] = +{ + __PMC_EV_ALIAS_WESTMERE() +}; + static const struct pmc_event_descr corei7uc_event_table[] = { __PMC_EV_ALIAS_COREI7UC() @@ -255,12 +265,14 @@ PMC_MDEP_TABLE(atom_silvermont, IAP, PMC PMC_MDEP_TABLE(core, IAP, PMC_CLASS_SOFT, PMC_CLASS_TSC); PMC_MDEP_TABLE(core2, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(corei7, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); +PMC_MDEP_TABLE(nehalem_ex, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(haswell, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); PMC_MDEP_TABLE(ivybridge, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(ivybridge_xeon, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(sandybridge, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); PMC_MDEP_TABLE(sandybridge_xeon, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(westmere, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); +PMC_MDEP_TABLE(westmere_ex, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(k7, K7, PMC_CLASS_SOFT, PMC_CLASS_TSC); PMC_MDEP_TABLE(k8, K8, PMC_CLASS_SOFT, PMC_CLASS_TSC); PMC_MDEP_TABLE(p4, P4, PMC_CLASS_SOFT, PMC_CLASS_TSC); @@ -298,12 +310,14 @@ PMC_CLASS_TABLE_DESC(atom_silvermont, IA PMC_CLASS_TABLE_DESC(core, IAP, core, iap); PMC_CLASS_TABLE_DESC(core2, IAP, core2, iap); PMC_CLASS_TABLE_DESC(corei7, IAP, corei7, iap); +PMC_CLASS_TABLE_DESC(nehalem_ex, IAP, nehalem_ex, iap); PMC_CLASS_TABLE_DESC(haswell, IAP, haswell, iap); PMC_CLASS_TABLE_DESC(ivybridge, IAP, ivybridge, iap); PMC_CLASS_TABLE_DESC(ivybridge_xeon, IAP, ivybridge_xeon, iap); PMC_CLASS_TABLE_DESC(sandybridge, IAP, sandybridge, iap); PMC_CLASS_TABLE_DESC(sandybridge_xeon, IAP, sandybridge_xeon, iap); PMC_CLASS_TABLE_DESC(westmere, IAP, westmere, iap); +PMC_CLASS_TABLE_DESC(westmere_ex, IAP, westmere_ex, iap); PMC_CLASS_TABLE_DESC(ucf, UCF, ucf, ucf); PMC_CLASS_TABLE_DESC(corei7uc, UCP, corei7uc, ucp); PMC_CLASS_TABLE_DESC(haswelluc, UCP, haswelluc, ucp); @@ -608,6 +622,8 @@ static struct pmc_event_alias core2_alia #define atom_silvermont_aliases_without_iaf core2_aliases_without_iaf #define corei7_aliases core2_aliases #define corei7_aliases_without_iaf core2_aliases_without_iaf +#define nehalem_ex_aliases core2_aliases +#define nehalem_ex_aliases_without_iaf core2_aliases_without_iaf #define haswell_aliases core2_aliases #define haswell_aliases_without_iaf core2_aliases_without_iaf #define ivybridge_aliases core2_aliases @@ -620,6 +636,8 @@ static struct pmc_event_alias core2_alia #define sandybridge_xeon_aliases_without_iaf core2_aliases_without_iaf #define westmere_aliases core2_aliases #define westmere_aliases_without_iaf core2_aliases_without_iaf +#define westmere_ex_aliases core2_aliases +#define westmere_ex_aliases_without_iaf core2_aliases_without_iaf #define IAF_KW_OS "os" #define IAF_KW_USR "usr" @@ -863,7 +881,9 @@ iap_allocate_pmc(enum pmc_event pe, char } else return (-1); } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_COREI7 || - cpu_info.pm_cputype == PMC_CPU_INTEL_WESTMERE) { + cpu_info.pm_cputype == PMC_CPU_INTEL_WESTMERE || + cpu_info.pm_cputype == PMC_CPU_INTEL_NEHALEM_EX || + cpu_info.pm_cputype == PMC_CPU_INTEL_WESTMERE_EX) { if (KWPREFIXMATCH(p, IAP_KW_RSP "=")) { n = pmc_parse_mask(iap_rsp_mask_i7_wm, p, &rsp); } else @@ -2760,6 +2780,10 @@ pmc_event_names_of_class(enum pmc_class ev = corei7_event_table; count = PMC_EVENT_TABLE_SIZE(corei7); break; + case PMC_CPU_INTEL_NEHALEM_EX: + ev = nehalem_ex_event_table; + count = PMC_EVENT_TABLE_SIZE(nehalem_ex); + break; case PMC_CPU_INTEL_HASWELL: ev = haswell_event_table; count = PMC_EVENT_TABLE_SIZE(haswell); @@ -2784,6 +2808,10 @@ pmc_event_names_of_class(enum pmc_class ev = westmere_event_table; count = PMC_EVENT_TABLE_SIZE(westmere); break; + case PMC_CPU_INTEL_WESTMERE_EX: + ev = westmere_ex_event_table; + count = PMC_EVENT_TABLE_SIZE(westmere_ex); + break; } break; case PMC_CLASS_UCF: @@ -3079,6 +3107,9 @@ pmc_init(void) pmc_class_table[n++] = &corei7uc_class_table_descr; PMC_MDEP_INIT_INTEL_V2(corei7); break; + case PMC_CPU_INTEL_NEHALEM_EX: + PMC_MDEP_INIT_INTEL_V2(nehalem_ex); + break; case PMC_CPU_INTEL_HASWELL: pmc_class_table[n++] = &ucf_class_table_descr; pmc_class_table[n++] = &haswelluc_class_table_descr; @@ -3103,6 +3134,9 @@ pmc_init(void) pmc_class_table[n++] = &westmereuc_class_table_descr; PMC_MDEP_INIT_INTEL_V2(westmere); break; + case PMC_CPU_INTEL_WESTMERE_EX: + PMC_MDEP_INIT_INTEL_V2(westmere_ex); + break; case PMC_CPU_INTEL_PIV: PMC_MDEP_INIT(p4); pmc_class_table[n] = &p4_class_table_descr; @@ -3237,6 +3271,11 @@ _pmc_name_of_event(enum pmc_event pe, en ev = corei7_event_table; evfence = corei7_event_table + PMC_EVENT_TABLE_SIZE(corei7); break; + case PMC_CPU_INTEL_NEHALEM_EX: + ev = nehalem_ex_event_table; + evfence = nehalem_ex_event_table + + PMC_EVENT_TABLE_SIZE(nehalem_ex); + break; case PMC_CPU_INTEL_HASWELL: ev = haswell_event_table; evfence = haswell_event_table + PMC_EVENT_TABLE_SIZE(haswell); @@ -3261,6 +3300,11 @@ _pmc_name_of_event(enum pmc_event pe, en ev = westmere_event_table; evfence = westmere_event_table + PMC_EVENT_TABLE_SIZE(westmere); break; + case PMC_CPU_INTEL_WESTMERE_EX: + ev = westmere_ex_event_table; + evfence = westmere_ex_event_table + + PMC_EVENT_TABLE_SIZE(westmere_ex); + break; default: /* Unknown CPU type. */ break; } Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_core.c Wed Jun 18 02:36:21 2014 (r267601) +++ stable/10/sys/dev/hwpmc/hwpmc_core.c Wed Jun 18 05:35:09 2014 (r267602) @@ -2021,6 +2021,7 @@ iap_allocate_pmc(int cpu, int ri, struct switch (core_cputype) { case PMC_CPU_INTEL_COREI7: + case PMC_CPU_INTEL_NEHALEM_EX: if (iap_event_corei7_ok_on_counter(ev, ri) == 0) return (EINVAL); break; @@ -2033,6 +2034,7 @@ iap_allocate_pmc(int cpu, int ri, struct return (EINVAL); break; case PMC_CPU_INTEL_WESTMERE: + case PMC_CPU_INTEL_WESTMERE_EX: if (iap_event_westmere_ok_on_counter(ev, ri) == 0) return (EINVAL); break; @@ -2186,7 +2188,9 @@ iap_allocate_pmc(int cpu, int ri, struct ev == PMC_EV_IAP_EVENT_BBH_01H) return (EINVAL); if ((core_cputype == PMC_CPU_INTEL_COREI7 || - core_cputype == PMC_CPU_INTEL_WESTMERE) && + core_cputype == PMC_CPU_INTEL_WESTMERE || + core_cputype == PMC_CPU_INTEL_NEHALEM_EX || + core_cputype == PMC_CPU_INTEL_WESTMERE_EX) && a->pm_md.pm_iap.pm_iap_rsp & ~IA_OFFCORE_RSP_MASK_I7WM) return (EINVAL); else if ((core_cputype == PMC_CPU_INTEL_SANDYBRIDGE || Modified: stable/10/sys/dev/hwpmc/hwpmc_intel.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_intel.c Wed Jun 18 02:36:21 2014 (r267601) +++ stable/10/sys/dev/hwpmc/hwpmc_intel.c Wed Jun 18 05:35:09 2014 (r267602) @@ -139,15 +139,22 @@ pmc_intel_initialize(void) * Per Intel document 253669-032 9/2009, * pages A-2 and A-57 */ - case 0x2E: cputype = PMC_CPU_INTEL_COREI7; nclasses = 5; break; + case 0x2E: + cputype = PMC_CPU_INTEL_NEHALEM_EX; + nclasses = 3; + break; case 0x25: /* Per Intel document 253669-033US 12/2009. */ case 0x2C: /* Per Intel document 253669-033US 12/2009. */ cputype = PMC_CPU_INTEL_WESTMERE; nclasses = 5; break; + case 0x2F: /* Westmere-EX, seen in wild */ + cputype = PMC_CPU_INTEL_WESTMERE_EX; + nclasses = 3; + break; case 0x2A: /* Per Intel document 253669-039US 05/2011. */ cputype = PMC_CPU_INTEL_SANDYBRIDGE; nclasses = 5; @@ -209,9 +216,11 @@ pmc_intel_initialize(void) case PMC_CPU_INTEL_CORE2: case PMC_CPU_INTEL_CORE2EXTREME: case PMC_CPU_INTEL_COREI7: + case PMC_CPU_INTEL_NEHALEM_EX: case PMC_CPU_INTEL_IVYBRIDGE: case PMC_CPU_INTEL_SANDYBRIDGE: case PMC_CPU_INTEL_WESTMERE: + case PMC_CPU_INTEL_WESTMERE_EX: case PMC_CPU_INTEL_SANDYBRIDGE_XEON: case PMC_CPU_INTEL_IVYBRIDGE_XEON: case PMC_CPU_INTEL_HASWELL: @@ -298,10 +307,12 @@ pmc_intel_finalize(struct pmc_mdep *md) case PMC_CPU_INTEL_CORE2: case PMC_CPU_INTEL_CORE2EXTREME: case PMC_CPU_INTEL_COREI7: + case PMC_CPU_INTEL_NEHALEM_EX: case PMC_CPU_INTEL_HASWELL: case PMC_CPU_INTEL_IVYBRIDGE: case PMC_CPU_INTEL_SANDYBRIDGE: case PMC_CPU_INTEL_WESTMERE: + case PMC_CPU_INTEL_WESTMERE_EX: case PMC_CPU_INTEL_SANDYBRIDGE_XEON: case PMC_CPU_INTEL_IVYBRIDGE_XEON: pmc_core_finalize(md); Modified: stable/10/sys/sys/pmc.h ============================================================================== --- stable/10/sys/sys/pmc.h Wed Jun 18 02:36:21 2014 (r267601) +++ stable/10/sys/sys/pmc.h Wed Jun 18 05:35:09 2014 (r267602) @@ -92,6 +92,8 @@ __PMC_CPU(INTEL_IVYBRIDGE_XEON, 0x90, "Intel Ivy Bridge Xeon") \ __PMC_CPU(INTEL_HASWELL, 0x91, "Intel Haswell") \ __PMC_CPU(INTEL_ATOM_SILVERMONT, 0x92, "Intel Atom Silvermont") \ + __PMC_CPU(INTEL_NEHALEM_EX, 0x93, "Intel Nehalem Xeon 7500") \ + __PMC_CPU(INTEL_WESTMERE_EX, 0x94, "Intel Westmere Xeon E7") \ __PMC_CPU(INTEL_XSCALE, 0x100, "Intel XScale") \ __PMC_CPU(MIPS_24K, 0x200, "MIPS 24K") \ __PMC_CPU(MIPS_OCTEON, 0x201, "Cavium Octeon") \ From owner-svn-src-stable@FreeBSD.ORG Wed Jun 18 10:38:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 40117F1A; Wed, 18 Jun 2014 10:38:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 202872182; Wed, 18 Jun 2014 10:38:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5IAcTRQ077116; Wed, 18 Jun 2014 10:38:29 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5IAcT8X077115; Wed, 18 Jun 2014 10:38:29 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201406181038.s5IAcT8X077115@svn.freebsd.org> From: Marius Strobl Date: Wed, 18 Jun 2014 10:38:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r267604 - stable/8/sys/dev/acpica X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jun 2014 10:38:30 -0000 Author: marius Date: Wed Jun 18 10:38:29 2014 New Revision: 267604 URL: http://svnweb.freebsd.org/changeset/base/267604 Log: MFC: r220798 Fix a few acpi sysctls that want "IK" formatting to specify CTLTYPE_INT. MFC: r245266 Remove not very useful printf, that can be too chatty. MFC: r255077 Warn about insane _TMP temperature only once. Modified: stable/8/sys/dev/acpica/acpi_thermal.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/acpica/ (props changed) Modified: stable/8/sys/dev/acpica/acpi_thermal.c ============================================================================== --- stable/8/sys/dev/acpica/acpi_thermal.c Wed Jun 18 07:23:04 2014 (r267603) +++ stable/8/sys/dev/acpica/acpi_thermal.c Wed Jun 18 10:38:29 2014 (r267604) @@ -112,6 +112,7 @@ struct acpi_tz_softc { struct acpi_tz_zone tz_zone; /*Thermal zone parameters*/ int tz_validchecks; + int tz_insane_tmp_notified; /* passive cooling */ struct proc *tz_cooling_proc; @@ -162,6 +163,8 @@ static driver_t acpi_tz_driver = { sizeof(struct acpi_tz_softc), }; +static char *acpi_tz_tmp_name = "_TMP"; + static devclass_t acpi_tz_devclass; DRIVER_MODULE(acpi_tz, acpi, acpi_tz_driver, acpi_tz_devclass, 0, 0); MODULE_DEPEND(acpi_tz, acpi, 1, 1, 1); @@ -259,10 +262,10 @@ acpi_tz_attach(device_t dev) sc->tz_sysctl_tree = SYSCTL_ADD_NODE(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(acpi_tz_sysctl_tree), OID_AUTO, oidname, CTLFLAG_RD, 0, ""); - SYSCTL_ADD_OPAQUE(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), - OID_AUTO, "temperature", CTLFLAG_RD, &sc->tz_temperature, - sizeof(sc->tz_temperature), "IK", - "current thermal zone temperature"); + SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), + OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD, + &sc->tz_temperature, 0, sysctl_handle_int, + "IK", "current thermal zone temperature"); SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), OID_AUTO, "active", CTLTYPE_INT | CTLFLAG_RW, sc, 0, acpi_tz_active_sysctl, "I", "cooling is active"); @@ -288,9 +291,9 @@ acpi_tz_attach(device_t dev) sc, offsetof(struct acpi_tz_softc, tz_zone.crt), acpi_tz_temp_sysctl, "IK", "critical temp setpoint (shutdown now)"); - SYSCTL_ADD_OPAQUE(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), - OID_AUTO, "_ACx", CTLFLAG_RD, &sc->tz_zone.ac, - sizeof(sc->tz_zone.ac), "IK", ""); + SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), + OID_AUTO, "_ACx", CTLTYPE_INT | CTLFLAG_RD, + &sc->tz_zone.ac, 0, sysctl_handle_int, "IK", ""); SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), OID_AUTO, "_TC1", CTLTYPE_INT | CTLFLAG_RW, sc, offsetof(struct acpi_tz_softc, tz_zone.tc1), @@ -456,12 +459,11 @@ acpi_tz_get_temperature(struct acpi_tz_s { int temp; ACPI_STATUS status; - static char *tmp_name = "_TMP"; ACPI_FUNCTION_NAME ("acpi_tz_get_temperature"); /* Evaluate the thermal zone's _TMP method. */ - status = acpi_GetInteger(sc->tz_handle, tmp_name, &temp); + status = acpi_GetInteger(sc->tz_handle, acpi_tz_tmp_name, &temp); if (ACPI_FAILURE(status)) { ACPI_VPRINT(sc->tz_dev, acpi_device_get_parent_softc(sc->tz_dev), "error fetching current temperature -- %s\n", @@ -470,7 +472,7 @@ acpi_tz_get_temperature(struct acpi_tz_s } /* Check it for validity. */ - acpi_tz_sanity(sc, &temp, tmp_name); + acpi_tz_sanity(sc, &temp, acpi_tz_tmp_name); if (temp == -1) return (FALSE); @@ -509,15 +511,8 @@ acpi_tz_monitor(void *Context) */ newactive = TZ_ACTIVE_NONE; for (i = TZ_NUMLEVELS - 1; i >= 0; i--) { - if (sc->tz_zone.ac[i] != -1 && temp >= sc->tz_zone.ac[i]) { + if (sc->tz_zone.ac[i] != -1 && temp >= sc->tz_zone.ac[i]) newactive = i; - if (sc->tz_active != newactive) { - ACPI_VPRINT(sc->tz_dev, - acpi_device_get_parent_softc(sc->tz_dev), - "_AC%d: temperature %d.%d >= setpoint %d.%d\n", i, - TZ_KELVTOC(temp), TZ_KELVTOC(sc->tz_zone.ac[i])); - } - } } /* @@ -703,10 +698,29 @@ static void acpi_tz_sanity(struct acpi_tz_softc *sc, int *val, char *what) { if (*val != -1 && (*val < TZ_ZEROC || *val > TZ_ZEROC + 2000)) { - device_printf(sc->tz_dev, "%s value is absurd, ignored (%d.%dC)\n", - what, TZ_KELVTOC(*val)); + /* + * If the value we are checking is _TMP, warn the user only + * once. This avoids spamming messages if, for instance, the + * sensor is broken and always returns an invalid temperature. + * + * This is only done for _TMP; other values always emit a + * warning. + */ + if (what != acpi_tz_tmp_name || !sc->tz_insane_tmp_notified) { + device_printf(sc->tz_dev, "%s value is absurd, ignored (%d.%dC)\n", + what, TZ_KELVTOC(*val)); + + /* Don't warn the user again if the read value doesn't improve. */ + if (what == acpi_tz_tmp_name) + sc->tz_insane_tmp_notified = 1; + } *val = -1; + return; } + + /* This value is correct. Warn if it's incorrect again. */ + if (what == acpi_tz_tmp_name) + sc->tz_insane_tmp_notified = 0; } /* From owner-svn-src-stable@FreeBSD.ORG Wed Jun 18 10:57:00 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C70A4A0; Wed, 18 Jun 2014 10:57:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58E2B2350; Wed, 18 Jun 2014 10:57:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5IAv04L085775; Wed, 18 Jun 2014 10:57:00 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5IAv0tU085774; Wed, 18 Jun 2014 10:57:00 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201406181057.s5IAv0tU085774@svn.freebsd.org> From: Marius Strobl Date: Wed, 18 Jun 2014 10:57:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r267605 - stable/8/sys/dev/acpica X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jun 2014 10:57:00 -0000 Author: marius Date: Wed Jun 18 10:56:59 2014 New Revision: 267605 URL: http://svnweb.freebsd.org/changeset/base/267605 Log: MFC: r220871 Correctly output the entire array for hw.acpi.thermal._ACx. Modified: stable/8/sys/dev/acpica/acpi_thermal.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/acpica/ (props changed) Modified: stable/8/sys/dev/acpica/acpi_thermal.c ============================================================================== --- stable/8/sys/dev/acpica/acpi_thermal.c Wed Jun 18 10:38:29 2014 (r267604) +++ stable/8/sys/dev/acpica/acpi_thermal.c Wed Jun 18 10:56:59 2014 (r267605) @@ -293,7 +293,8 @@ acpi_tz_attach(device_t dev) "critical temp setpoint (shutdown now)"); SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), OID_AUTO, "_ACx", CTLTYPE_INT | CTLFLAG_RD, - &sc->tz_zone.ac, 0, sysctl_handle_int, "IK", ""); + &sc->tz_zone.ac, sizeof(sc->tz_zone.ac), + sysctl_handle_opaque, "IK", ""); SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), OID_AUTO, "_TC1", CTLTYPE_INT | CTLFLAG_RW, sc, offsetof(struct acpi_tz_softc, tz_zone.tc1), From owner-svn-src-stable@FreeBSD.ORG Wed Jun 18 19:28:55 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1A278F7; Wed, 18 Jun 2014 19:28:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF4FF27DF; Wed, 18 Jun 2014 19:28:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5IJSt94021049; Wed, 18 Jun 2014 19:28:55 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5IJSt6E021048; Wed, 18 Jun 2014 19:28:55 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201406181928.s5IJSt6E021048@svn.freebsd.org> From: Jim Harris Date: Wed, 18 Jun 2014 19:28:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267619 - stable/9/sys/dev/nvme X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jun 2014 19:28:55 -0000 Author: jimharris Date: Wed Jun 18 19:28:55 2014 New Revision: 267619 URL: http://svnweb.freebsd.org/changeset/base/267619 Log: MFC r267342: Use bitwise OR instead of logical OR when constructing value for SET_FEATURES/NUMBER_OF_QUEUES command. Sponsored by: Intel Approved by: re (gjb) Modified: stable/9/sys/dev/nvme/nvme_ctrlr_cmd.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/nvme/nvme_ctrlr_cmd.c ============================================================================== --- stable/9/sys/dev/nvme/nvme_ctrlr_cmd.c Wed Jun 18 18:31:35 2014 (r267618) +++ stable/9/sys/dev/nvme/nvme_ctrlr_cmd.c Wed Jun 18 19:28:55 2014 (r267619) @@ -205,7 +205,7 @@ nvme_ctrlr_cmd_set_num_queues(struct nvm { uint32_t cdw11; - cdw11 = ((num_queues - 1) << 16) || (num_queues - 1); + cdw11 = ((num_queues - 1) << 16) | (num_queues - 1); nvme_ctrlr_cmd_set_feature(ctrlr, NVME_FEAT_NUMBER_OF_QUEUES, cdw11, NULL, 0, cb_fn, cb_arg); } From owner-svn-src-stable@FreeBSD.ORG Wed Jun 18 19:32:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE8C2A89; Wed, 18 Jun 2014 19:32:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBD71286B; Wed, 18 Jun 2014 19:32:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5IJWc1G024774; Wed, 18 Jun 2014 19:32:38 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5IJWcE0024773; Wed, 18 Jun 2014 19:32:38 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201406181932.s5IJWcE0024773@svn.freebsd.org> From: Jim Harris Date: Wed, 18 Jun 2014 19:32:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267620 - stable/10/sys/dev/nvme X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jun 2014 19:32:38 -0000 Author: jimharris Date: Wed Jun 18 19:32:38 2014 New Revision: 267620 URL: http://svnweb.freebsd.org/changeset/base/267620 Log: MFC r267342: Use bitwise OR instead of logical OR when constructing value for SET_FEATURES/NUMBER_OF_QUEUES command. Sponsored by: Intel Modified: stable/10/sys/dev/nvme/nvme_ctrlr_cmd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/nvme/nvme_ctrlr_cmd.c ============================================================================== --- stable/10/sys/dev/nvme/nvme_ctrlr_cmd.c Wed Jun 18 19:28:55 2014 (r267619) +++ stable/10/sys/dev/nvme/nvme_ctrlr_cmd.c Wed Jun 18 19:32:38 2014 (r267620) @@ -205,7 +205,7 @@ nvme_ctrlr_cmd_set_num_queues(struct nvm { uint32_t cdw11; - cdw11 = ((num_queues - 1) << 16) || (num_queues - 1); + cdw11 = ((num_queues - 1) << 16) | (num_queues - 1); nvme_ctrlr_cmd_set_feature(ctrlr, NVME_FEAT_NUMBER_OF_QUEUES, cdw11, NULL, 0, cb_fn, cb_arg); } From owner-svn-src-stable@FreeBSD.ORG Wed Jun 18 22:09:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2EE579E; Wed, 18 Jun 2014 22:09:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D024F25A8; Wed, 18 Jun 2014 22:09:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5IM9Xoi096954; Wed, 18 Jun 2014 22:09:33 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5IM9Xje096953; Wed, 18 Jun 2014 22:09:33 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <201406182209.s5IM9Xje096953@svn.freebsd.org> From: Nick Hibma Date: Wed, 18 Jun 2014 22:09:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267621 - stable/10/sys/dev/usb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jun 2014 22:09:34 -0000 Author: n_hibma Date: Wed Jun 18 22:09:33 2014 New Revision: 267621 URL: http://svnweb.freebsd.org/changeset/base/267621 Log: MFC r261270: Fix the ordering of the arguments to printf in uhub_child_location_string(). This produced bogus information in dev...%location output from sysctl. Modified: stable/10/sys/dev/usb/usb_hub.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/usb_hub.c ============================================================================== --- stable/10/sys/dev/usb/usb_hub.c Wed Jun 18 19:32:38 2014 (r267620) +++ stable/10/sys/dev/usb/usb_hub.c Wed Jun 18 22:09:33 2014 (r267621) @@ -1625,8 +1625,9 @@ uhub_child_location_string(device_t pare goto done; } snprintf(buf, buflen, "bus=%u hubaddr=%u port=%u devaddr=%u interface=%u", + device_get_unit(res.udev->bus->bdev), (res.udev->parent_hub != NULL) ? res.udev->parent_hub->device_index : 0, - res.portno, device_get_unit(res.udev->bus->bdev), + res.portno, res.udev->device_index, res.iface_index); done: mtx_unlock(&Giant); From owner-svn-src-stable@FreeBSD.ORG Thu Jun 19 03:59:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5FC64912; Thu, 19 Jun 2014 03:59:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A3622131; Thu, 19 Jun 2014 03:59:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5J3xstP059129; Thu, 19 Jun 2014 03:59:54 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5J3xrom059124; Thu, 19 Jun 2014 03:59:53 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406190359.s5J3xrom059124@svn.freebsd.org> From: Glen Barber Date: Thu, 19 Jun 2014 03:59:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267628 - in stable/9/release/doc: en_US.ISO8859-1/relnotes share/xml X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jun 2014 03:59:54 -0000 Author: gjb Date: Thu Jun 19 03:59:52 2014 New Revision: 267628 URL: http://svnweb.freebsd.org/changeset/base/267628 Log: MFC r265590, r265594, r265595, r265599 [1], r265601 [1], r265602 [1], r265603 [1], r265605 [1], r265607 [1], r267554 [1], r267595: r265590: Modify release.xsl to allow proper attribution for sponsored and/or contributed works. r265594: Add two new entity files in followup to r265590, sponsor.ent and vendor.ent, which will be used for sponsor/vendor names and URLs. r265595: Add references to sponsor.ent and vendor.ent in relnotes/article.xml and share/xml/catalog.xml. r265599: Add DARPA, AFRL to sponsor.ent. r265601: Add LSI and Spectra Logic to sponsor.ent. r265602: Add Netgate to sponsor.ent. r265603: Add a note to keep the entity lists sorted alphabetically. r265605: Add Google to the sponsor.ent file. r265607: Separate &darpa; entity and create &darpa_afrl to avoid confusion. r267554: Add &citrix; and &citrix.rd; macros. r267595: Remove 'Inc.' for consistency. [1] - Partial, entity addition only. Approved by: re (hrs) Sponsored by: The FreeBSD Foundation Added: stable/9/release/doc/share/xml/sponsor.ent - copied, changed from r265594, head/release/doc/share/xml/sponsor.ent stable/9/release/doc/share/xml/vendor.ent - copied, changed from r265594, head/release/doc/share/xml/vendor.ent Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml stable/9/release/doc/share/xml/catalog.xml stable/9/release/doc/share/xml/release.xsl Directory Properties: stable/9/release/ (props changed) stable/9/release/doc/ (props changed) Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Jun 18 23:34:48 2014 (r267627) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 19 03:59:52 2014 (r267628) @@ -3,6 +3,10 @@ "../../../share/xml/freebsd50.dtd" [ %release; + + %sponsor; + + %vendor; ]>
Modified: stable/9/release/doc/share/xml/catalog.xml ============================================================================== --- stable/9/release/doc/share/xml/catalog.xml Wed Jun 18 23:34:48 2014 (r267627) +++ stable/9/release/doc/share/xml/catalog.xml Thu Jun 19 03:59:52 2014 (r267628) @@ -7,5 +7,7 @@ rewritePrefix="../../"/> + + Modified: stable/9/release/doc/share/xml/release.xsl ============================================================================== --- stable/9/release/doc/share/xml/release.xsl Wed Jun 18 23:34:48 2014 (r267627) +++ stable/9/release/doc/share/xml/release.xsl Thu Jun 19 03:59:52 2014 (r267628) @@ -43,6 +43,51 @@ + + + + + + + + + (Sponsored by + + + + + + + + + + + + + + + + + + (Contributed / provided by + + + + + + + + + + + + + + + + + +

Copied and modified: stable/9/release/doc/share/xml/sponsor.ent (from r265594, head/release/doc/share/xml/sponsor.ent) ============================================================================== --- head/release/doc/share/xml/sponsor.ent Wed May 7 19:43:23 2014 (r265594, copy source) +++ stable/9/release/doc/share/xml/sponsor.ent Thu Jun 19 03:59:52 2014 (r267628) @@ -4,7 +4,25 @@ Sponsors of various works. + Please keep the entity list sorted alphabetically. + --> + + + + + + + + + + + + + + + + Copied and modified: stable/9/release/doc/share/xml/vendor.ent (from r265594, head/release/doc/share/xml/vendor.ent) ============================================================================== --- head/release/doc/share/xml/vendor.ent Wed May 7 19:43:23 2014 (r265594, copy source) +++ stable/9/release/doc/share/xml/vendor.ent Thu Jun 19 03:59:52 2014 (r267628) @@ -4,4 +4,6 @@ Vendors and contributors. + Please keep the entity list sorted alphabetically. + --> From owner-svn-src-stable@FreeBSD.ORG Thu Jun 19 15:52:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 837FDF59; Thu, 19 Jun 2014 15:52:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 64C0D2E43; Thu, 19 Jun 2014 15:52:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5JFql8E004993; Thu, 19 Jun 2014 15:52:47 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5JFqlIE004990; Thu, 19 Jun 2014 15:52:47 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406191552.s5JFqlIE004990@svn.freebsd.org> From: Glen Barber Date: Thu, 19 Jun 2014 15:52:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267644 - in stable/9/release/doc: en_US.ISO8859-1/relnotes share/xml X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jun 2014 15:52:47 -0000 Author: gjb Date: Thu Jun 19 15:52:46 2014 New Revision: 267644 URL: http://svnweb.freebsd.org/changeset/base/267644 Log: Add sponsorship attribution for the following revisions: 256437, 257125, 257126, 259519, 260082, 262988, 263817, 265729, 259269, 259406, 262706, 262879 Add DK Hostmaster A/S to the sponsors.ent file. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml stable/9/release/doc/share/xml/sponsor.ent Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 19 13:19:35 2014 (r267643) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 19 15:52:46 2014 (r267644) @@ -193,7 +193,8 @@ The &man.arcmsr.4; driver has been updated to version 1.20.00.28. - The &man.isci.4; driver is now loadable + The &man.isci.4; driver is now loadable via &man.kldload.8;. System-level &man.sysctl.8; values are @@ -206,16 +207,17 @@ zfs_root() after a failed rollback has been fixed. - A new &man.sysctl.8;, + A new &man.sysctl.8;, debug.devfs_iosize_max_clamp has been added which enables and disables SSIZE_MAX-sized I/O requests on &man.devfs.5; files. - A new &man.sysctl.8;, - kern.disallow_high_osrel, has been added - which disables executing the images compiled on a userland - with a higher major version number than the major version - number of the running kernel. + A new + &man.sysctl.8;, kern.disallow_high_osrel, + has been added which disables executing the images compiled on + a userland with a higher major version number than the major + version number of the running kernel. A kernel panic triggered by unmounting a busy &man.zfs.8; filesystem has been fixed. @@ -254,11 +256,13 @@ which will list the MACHINE_ARCH values whose binaries can be run on the system. - Several problems that could trigger + Several problems that could trigger kernel panic on &man.kldload.8; and &man.kldunload.8; have been fixed. - A kernel panic triggered by some + A kernel panic triggered by some multi-threaded applications has been fixed. The &man.runfw.4; firmware has been @@ -302,7 +306,8 @@ a USB ethernet device on VIMAGE-enabled systems has been fixed. - TTM, a memory manager used by video + TTM, + a memory manager used by video drivers, has been merged. Support for @@ -321,12 +326,14 @@ A memory leak has been fixed in libzfs. - The vt driver + The vt driver has been merged from head/. - The &man.mpr.4; device has been added, - providing support for LSI Fusion-MPT 3 12Gb SCSI/SATA - controllers. + The &man.mpr.4; device has + been added, providing support for LSI Fusion-MPT 3 12Gb + SCSI/SATA controllers. A kernel bug that inhibited proper functionality of the dev.cpu.0.freq @@ -468,7 +475,8 @@ compiler error bug in &man.gcc.1; triggered by throwing a warning before parsing any tokens has been fixed. - Several updates to &man.gcc.1; + Several updates to &man.gcc.1; have been imported from Google. A byte-order bug in the Heimdal @@ -679,7 +687,8 @@ Sendmail has been updated to version 8.14.9. - BIND has + BIND has been updated to version 9.9.5. The &man.xz.1; utility has been updated @@ -700,7 +709,8 @@ &man.etcupdate.8; to work after the first upgrade of a system. - The release.sh + The release.sh script and release Makefile have been updated to use &man.pkg.7; to populate the dvd installation medium. Modified: stable/9/release/doc/share/xml/sponsor.ent ============================================================================== --- stable/9/release/doc/share/xml/sponsor.ent Thu Jun 19 13:19:35 2014 (r267643) +++ stable/9/release/doc/share/xml/sponsor.ent Thu Jun 19 15:52:46 2014 (r267644) @@ -15,6 +15,7 @@ + From owner-svn-src-stable@FreeBSD.ORG Fri Jun 20 00:01:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CECD41DD; Fri, 20 Jun 2014 00:01:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BAABD28C6; Fri, 20 Jun 2014 00:01:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5K01aDn033417; Fri, 20 Jun 2014 00:01:36 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5K01aKq033416; Fri, 20 Jun 2014 00:01:36 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406200001.s5K01aKq033416@svn.freebsd.org> From: Glen Barber Date: Fri, 20 Jun 2014 00:01:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267653 - stable/9/sys/conf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2014 00:01:36 -0000 Author: gjb Date: Fri Jun 20 00:01:36 2014 New Revision: 267653 URL: http://svnweb.freebsd.org/changeset/base/267653 Log: Update stable/9 to -RC1 in preparation of branching releng/9.3 Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/sys/conf/newvers.sh Modified: stable/9/sys/conf/newvers.sh ============================================================================== --- stable/9/sys/conf/newvers.sh Thu Jun 19 23:53:50 2014 (r267652) +++ stable/9/sys/conf/newvers.sh Fri Jun 20 00:01:36 2014 (r267653) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="9.3" -BRANCH="BETA3" +BRANCH="RC1" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-stable@FreeBSD.ORG Fri Jun 20 00:18:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D70A9E9; Fri, 20 Jun 2014 00:18:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89B3E29D5; Fri, 20 Jun 2014 00:18:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5K0IqTE040840; Fri, 20 Jun 2014 00:18:52 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5K0IqEc040839; Fri, 20 Jun 2014 00:18:52 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406200018.s5K0IqEc040839@svn.freebsd.org> From: Glen Barber Date: Fri, 20 Jun 2014 00:18:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267657 - stable/9/sys/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2014 00:18:52 -0000 Author: gjb Date: Fri Jun 20 00:18:52 2014 New Revision: 267657 URL: http://svnweb.freebsd.org/changeset/base/267657 Log: Update __FreeBSD_version now that releng/9.3 is branched. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/sys/sys/param.h Modified: stable/9/sys/sys/param.h ============================================================================== --- stable/9/sys/sys/param.h Fri Jun 20 00:18:25 2014 (r267656) +++ stable/9/sys/sys/param.h Fri Jun 20 00:18:52 2014 (r267657) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 902512 /* Master, propagated to newvers */ +#define __FreeBSD_version 903500 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-stable@FreeBSD.ORG Fri Jun 20 00:19:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42689B1F; Fri, 20 Jun 2014 00:19:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D8D629DF; Fri, 20 Jun 2014 00:19:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5K0Jbj8040996; Fri, 20 Jun 2014 00:19:37 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5K0Jb6p040995; Fri, 20 Jun 2014 00:19:37 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406200019.s5K0Jb6p040995@svn.freebsd.org> From: Glen Barber Date: Fri, 20 Jun 2014 00:19:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267658 - stable/9/sys/conf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2014 00:19:37 -0000 Author: gjb Date: Fri Jun 20 00:19:36 2014 New Revision: 267658 URL: http://svnweb.freebsd.org/changeset/base/267658 Log: Switch stable/9 back to -PRERELEASE now that releng/9.3 is branched. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/sys/conf/newvers.sh Modified: stable/9/sys/conf/newvers.sh ============================================================================== --- stable/9/sys/conf/newvers.sh Fri Jun 20 00:18:52 2014 (r267657) +++ stable/9/sys/conf/newvers.sh Fri Jun 20 00:19:36 2014 (r267658) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="9.3" -BRANCH="RC1" +BRANCH="PRERELEASE" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-stable@FreeBSD.ORG Fri Jun 20 07:32:04 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D1CB17BF; Fri, 20 Jun 2014 07:32:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD8802F3D; Fri, 20 Jun 2014 07:32:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5K7W4qC045775; Fri, 20 Jun 2014 07:32:04 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5K7W3Zt045767; Fri, 20 Jun 2014 07:32:03 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201406200732.s5K7W3Zt045767@svn.freebsd.org> From: Tijl Coosemans Date: Fri, 20 Jun 2014 07:32:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267665 - in stable/10: lib/libc/iconv lib/libiconv_modules/HZ usr.bin/iconv X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2014 07:32:04 -0000 Author: tijl Date: Fri Jun 20 07:32:03 2014 New Revision: 267665 URL: http://svnweb.freebsd.org/changeset/base/267665 Log: MFC r267436-267439: - Replace malloc+memset with calloc. - iconv_open(3): initialise ci_ilseq_invalid field of _citrus_iconv_shared struct after allocation with malloc. - iconvlist(3): reduce a memory leak by copying strings only once. - iconv(1): - Make invalids variable local to do_conv such that it prints the number of invalid characters of the current file instead of an accumulated value. - Make do_conv return an error when invalid characters have been found. Return EXIT_FAILURE from main if any file contained invalid characters. This matches the behaviour of GNU iconv. - Mark usage with __dead2 attribute. - Make the long_options array const. Tested by: Pavel Timofeev Modified: stable/10/lib/libc/iconv/bsd_iconv.c stable/10/lib/libc/iconv/citrus_db_factory.c stable/10/lib/libc/iconv/citrus_iconv.c stable/10/lib/libiconv_modules/HZ/citrus_hz.c stable/10/usr.bin/iconv/iconv.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/iconv/bsd_iconv.c ============================================================================== --- stable/10/lib/libc/iconv/bsd_iconv.c Fri Jun 20 07:01:53 2014 (r267664) +++ stable/10/lib/libc/iconv/bsd_iconv.c Fri Jun 20 07:32:03 2014 (r267665) @@ -83,6 +83,7 @@ __bsd___iconv_open(const char *out, cons } handle->cv_shared->ci_discard_ilseq = strcasestr(out, "//IGNORE"); + handle->cv_shared->ci_ilseq_invalid = false; handle->cv_shared->ci_hooks = NULL; return ((iconv_t)(void *)handle); @@ -223,7 +224,7 @@ __bsd_iconvlist(int (*do_one) (unsigned return; } strlcpy(curkey, list[i], slashpos - list[i] + 1); - names[j++] = strdup(curkey); + names[j++] = curkey; for (; (i < sz) && (memcmp(curkey, list[i], strlen(curkey)) == 0); i++) { slashpos = strchr(list[i], '/'); curitem = (char *)malloc(strlen(slashpos) + 1); @@ -235,7 +236,7 @@ __bsd_iconvlist(int (*do_one) (unsigned if (strcmp(curkey, curitem) == 0) { continue; } - names[j++] = strdup(curitem); + names[j++] = curitem; } np = (const char * const *)names; do_one(j, np, data); Modified: stable/10/lib/libc/iconv/citrus_db_factory.c ============================================================================== --- stable/10/lib/libc/iconv/citrus_db_factory.c Fri Jun 20 07:01:53 2014 (r267664) +++ stable/10/lib/libc/iconv/citrus_db_factory.c Fri Jun 20 07:32:03 2014 (r267665) @@ -270,11 +270,9 @@ _citrus_db_factory_serialize(struct _cit return (0); } /* allocate hash table */ - depp = malloc(sizeof(*depp) * df->df_num_entries); + depp = calloc(df->df_num_entries, sizeof(*depp)); if (depp == NULL) return (-1); - for (i = 0; i < df->df_num_entries; i++) - depp[i] = NULL; /* step1: store the entries which are not conflicting */ STAILQ_FOREACH(de, &df->df_entries, de_entry) { Modified: stable/10/lib/libc/iconv/citrus_iconv.c ============================================================================== --- stable/10/lib/libc/iconv/citrus_iconv.c Fri Jun 20 07:01:53 2014 (r267664) +++ stable/10/lib/libc/iconv/citrus_iconv.c Fri Jun 20 07:32:03 2014 (r267665) @@ -344,9 +344,8 @@ const char { char *buf; - if ((buf = malloc((size_t)PATH_MAX)) == NULL) + if ((buf = calloc((size_t)PATH_MAX, sizeof(*buf))) == NULL) return (NULL); - memset((void *)buf, 0, (size_t)PATH_MAX); _citrus_esdb_alias(name, buf, (size_t)PATH_MAX); return (buf); } Modified: stable/10/lib/libiconv_modules/HZ/citrus_hz.c ============================================================================== --- stable/10/lib/libiconv_modules/HZ/citrus_hz.c Fri Jun 20 07:01:53 2014 (r267664) +++ stable/10/lib/libiconv_modules/HZ/citrus_hz.c Fri Jun 20 07:32:03 2014 (r267665) @@ -532,10 +532,9 @@ _citrus_HZ_parse_graphic(void *context, p = (void **)context; escape = (escape_t *)p[0]; ei = (_HZEncodingInfo *)p[1]; - graphic = malloc(sizeof(*graphic)); + graphic = calloc(1, sizeof(*graphic)); if (graphic == NULL) return (ENOMEM); - memset(graphic, 0, sizeof(*graphic)); if (strcmp("GL", name) == 0) { if (GL(escape) != NULL) goto release; @@ -598,10 +597,9 @@ _citrus_HZ_parse_escape(void *context, c void *p[2]; ei = (_HZEncodingInfo *)context; - escape = malloc(sizeof(*escape)); + escape = calloc(1, sizeof(*escape)); if (escape == NULL) return (EINVAL); - memset(escape, 0, sizeof(*escape)); if (strcmp("0", name) == 0) { escape->set = E0SET(ei); TAILQ_INSERT_TAIL(E0SET(ei), escape, entry); Modified: stable/10/usr.bin/iconv/iconv.c ============================================================================== --- stable/10/usr.bin/iconv/iconv.c Fri Jun 20 07:01:53 2014 (r267664) +++ stable/10/usr.bin/iconv/iconv.c Fri Jun 20 07:32:03 2014 (r267665) @@ -41,13 +41,11 @@ #include #include -static unsigned long long invalids; +static int do_conv(FILE *, const char *, const char *, bool, bool); +static int do_list(unsigned int, const char * const *, void *); +static void usage(void) __dead2; -static void do_conv(FILE *, const char *, const char *, bool, bool); -static int do_list(unsigned int, const char * const *, void *); -static void usage(void); - -static struct option long_options[] = { +static const struct option long_options[] = { {"from-code", required_argument, NULL, 'f'}, {"list", no_argument, NULL, 'l'}, {"silent", no_argument, NULL, 's'}, @@ -68,12 +66,13 @@ usage(void) #define INBUFSIZE 1024 #define OUTBUFSIZE (INBUFSIZE * 2) -static void +static int do_conv(FILE *fp, const char *from, const char *to, bool silent, bool hide_invalid) { iconv_t cd; char inbuf[INBUFSIZE], outbuf[OUTBUFSIZE], *out; + unsigned long long invalids; const char *in; size_t inbytes, outbytes, ret; @@ -84,8 +83,9 @@ do_conv(FILE *fp, const char *from, cons int arg = 1; if (iconvctl(cd, ICONV_SET_DISCARD_ILSEQ, (void *)&arg) == -1) - err(1, NULL); + err(EXIT_FAILURE, NULL); } + invalids = 0; while ((inbytes = fread(inbuf, 1, INBUFSIZE, fp)) > 0) { in = inbuf; while (inbytes > 0) { @@ -135,6 +135,7 @@ do_conv(FILE *fp, const char *from, cons warnx("warning: invalid characters: %llu", invalids); iconv_close(cd); + return (invalids > 0); } static int @@ -157,7 +158,7 @@ main(int argc, char **argv) { FILE *fp; char *opt_f, *opt_t; - int ch, i; + int ch, i, res; bool opt_c = false, opt_s = false; opt_f = opt_t = strdup(""); @@ -202,18 +203,18 @@ main(int argc, char **argv) if ((strcmp(opt_f, "") == 0) && (strcmp(opt_t, "") == 0)) usage(); if (argc == 0) - do_conv(stdin, opt_f, opt_t, opt_s, opt_c); + res = do_conv(stdin, opt_f, opt_t, opt_s, opt_c); else { + res = 0; for (i = 0; i < argc; i++) { fp = (strcmp(argv[i], "-") != 0) ? fopen(argv[i], "r") : stdin; if (fp == NULL) err(EXIT_FAILURE, "Cannot open `%s'", argv[i]); - do_conv(fp, opt_f, opt_t, opt_s, - opt_c); + res |= do_conv(fp, opt_f, opt_t, opt_s, opt_c); (void)fclose(fp); } } - return (EXIT_SUCCESS); + return (res == 0 ? EXIT_SUCCESS : EXIT_FAILURE); } From owner-svn-src-stable@FreeBSD.ORG Fri Jun 20 07:35:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C112A0A; Fri, 20 Jun 2014 07:35:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1EF282F65; Fri, 20 Jun 2014 07:35:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5K7ZtK7046541; Fri, 20 Jun 2014 07:35:55 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5K7Ztha046539; Fri, 20 Jun 2014 07:35:55 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201406200735.s5K7Ztha046539@svn.freebsd.org> From: Tijl Coosemans Date: Fri, 20 Jun 2014 07:35:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267666 - in stable/10: include tools/build/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2014 07:35:56 -0000 Author: tijl Date: Fri Jun 20 07:35:55 2014 New Revision: 267666 URL: http://svnweb.freebsd.org/changeset/base/267666 Log: MFC r267441: Don't install GSS-API headers when the GSSAPI option has been disabled. Some ports assume GSS-API is supported when they find the headers. PR: 189156 Submitted by: Garrett Cooper Modified: stable/10/include/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/include/Makefile ============================================================================== --- stable/10/include/Makefile Fri Jun 20 07:32:03 2014 (r267665) +++ stable/10/include/Makefile Fri Jun 20 07:35:55 2014 (r267666) @@ -6,11 +6,11 @@ .include CLEANFILES= osreldate.h version vers.c -SUBDIR= arpa gssapi protocols rpcsvc rpc xlocale +SUBDIR= arpa protocols rpcsvc rpc xlocale INCS= a.out.h ar.h assert.h bitstring.h complex.h cpio.h _ctype.h ctype.h \ db.h \ dirent.h dlfcn.h elf.h elf-hints.h err.h fmtmsg.h fnmatch.h fstab.h \ - fts.h ftw.h getopt.h glob.h grp.h gssapi.h \ + fts.h ftw.h getopt.h glob.h grp.h \ ieeefp.h ifaddrs.h \ inttypes.h iso646.h kenv.h langinfo.h libgen.h limits.h link.h \ locale.h malloc.h malloc_np.h memory.h monetary.h mpool.h mqueue.h \ @@ -68,6 +68,11 @@ _dev_powermac_nvram= dev/powermac_nvram _dev_ieee488= dev/ieee488 .endif +.if ${MK_GSSAPI} != "no" +SUBDIR+= gssapi +INCS+= gssapi.h +.endif + .if ${MK_HESIOD} != "no" INCS+= hesiod.h .endif Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Fri Jun 20 07:32:03 2014 (r267665) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Fri Jun 20 07:35:55 2014 (r267666) @@ -1773,6 +1773,9 @@ OLD_DIRS+=usr/share/tmac .endif .if ${MK_GSSAPI} == no +OLD_FILES+=usr/include/gssapi/gssapi.h +OLD_DIRS+=usr/include/gssapi +OLD_FILES+=usr/include/gssapi.h OLD_FILES+=usr/lib/libgssapi.a OLD_FILES+=usr/lib/libgssapi.so OLD_LIBS+=usr/lib/libgssapi.so.10 From owner-svn-src-stable@FreeBSD.ORG Fri Jun 20 15:40:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D34A860D; Fri, 20 Jun 2014 15:40:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BDCD02D8B; Fri, 20 Jun 2014 15:40:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5KFeEtm073603; Fri, 20 Jun 2014 15:40:14 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5KFeEJi073598; Fri, 20 Jun 2014 15:40:14 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201406201540.s5KFeEJi073598@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Fri, 20 Jun 2014 15:40:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267676 - stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2014 15:40:14 -0000 Author: pfg Date: Fri Jun 20 15:40:13 2014 New Revision: 267676 URL: http://svnweb.freebsd.org/changeset/base/267676 Log: MFC r267513: Merge from r258379 missed the tests. 4248 dtrace(1M) should never create DOF with empty probes section 4249 Only probes from the first DTrace object file will be included Illumos Revision: 54a20ab41aadcb81c53e72fc65886e964e9add59 Added: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.multiprov.ksh - copied unchanged from r267513, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.multiprov.ksh stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.multiprov.ksh.out - copied unchanged from r267513, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.multiprov.ksh.out stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.noprobes.ksh - copied unchanged from r267513, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.noprobes.ksh Modified: Directory Properties: stable/10/ (props changed) Copied: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.multiprov.ksh (from r267513, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.multiprov.ksh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.multiprov.ksh Fri Jun 20 15:40:13 2014 (r267676, copy of r267513, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.multiprov.ksh) @@ -0,0 +1,106 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2013, Joyent, Inc. All rights reserved. +# + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 +DIR=/var/tmp/dtest.$$ + +mkdir $DIR +cd $DIR + +echo '#pragma D option quiet' > test.d +echo '#pragma D option aggsortkey' >> test.d + +cat > test.c < + +void +main() +{ +EOF + +objs= + +for oogle in doogle bagnoogle; do + cat > $oogle.c < + +void +$oogle() +{ + DTRACE_PROBE($oogle, knows); +} +EOF + + cat > $oogle.d <> test.c + echo $oogle'$target:::{@[probefunc] = count()}' >> test.d +done + +echo "}" >> test.c + +echo 'END{printa("%-10s %@d\\n", @)}' >> test.d + +cc -o test test.c $objs + +if [ $? -ne 0 ]; then + print -u2 "failed to compile test.c" + exit 1 +fi + +$dtrace -s ./test.d -Zc ./test + +if [ $? -ne 0 ]; then + print -u2 "failed to execute test" + exit 1 +fi + +cd / +/usr/bin/rm -rf $DIR +exit 0 Copied: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.multiprov.ksh.out (from r267513, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.multiprov.ksh.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.multiprov.ksh.out Fri Jun 20 15:40:13 2014 (r267676, copy of r267513, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.multiprov.ksh.out) @@ -0,0 +1,3 @@ +bagnoogle 1 +doogle 1 + Copied: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.noprobes.ksh (from r267513, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.noprobes.ksh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.noprobes.ksh Fri Jun 20 15:40:13 2014 (r267676, copy of r267513, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.noprobes.ksh) @@ -0,0 +1,59 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2013, Joyent, Inc. All rights reserved. +# + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 +DIR=/var/tmp/dtest.$$ + +mkdir $DIR +cd $DIR + +cat > test.c < doogle.d < Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3E57910; Fri, 20 Jun 2014 15:43:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B464F2E2E; Fri, 20 Jun 2014 15:43:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5KFhwnA076818; Fri, 20 Jun 2014 15:43:58 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5KFhwds076817; Fri, 20 Jun 2014 15:43:58 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201406201543.s5KFhwds076817@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Fri, 20 Jun 2014 15:43:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267677 - stable/10/lib/libc/stdtime X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2014 15:43:59 -0000 Author: pfg Date: Fri Jun 20 15:43:58 2014 New Revision: 267677 URL: http://svnweb.freebsd.org/changeset/base/267677 Log: MFC r267544: Update license to strptime(3) implementation. Our strptime(3) implementation was the base for the illumos implementation and after contacting the author, Kevin Rudy stated the code is under a 2-Clause BSD License [1] After reviewing our local changes to the file in question, the FreeBSD Foundation has agreed that their contributions to this file are not required to carry clause 3 or 4 so the file can be relicensed as in Illumos [2]. References: [1] https://www.illumos.org/issues/357 [2] Illumos Revision: 13222:02526851ba75 Approved: core (jhb) Approved: FreeBSD Foundation (emaste) Modified: stable/10/lib/libc/stdtime/strptime.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdtime/strptime.c ============================================================================== --- stable/10/lib/libc/stdtime/strptime.c Fri Jun 20 15:40:13 2014 (r267676) +++ stable/10/lib/libc/stdtime/strptime.c Fri Jun 20 15:43:58 2014 (r267677) @@ -1,25 +1,4 @@ -/* - * Powerdog Industries kindly requests feedback from anyone modifying - * this function: - * - * Date: Thu, 05 Jun 1997 23:17:17 -0400 - * From: Kevin Ruddy - * To: James FitzGibbon - * Subject: Re: Use of your strptime(3) code (fwd) - * - * The reason for the "no mod" clause was so that modifications would - * come back and we could integrate them and reissue so that a wider - * audience could use it (thereby spreading the wealth). This has - * made it possible to get strptime to work on many operating systems. - * I'm not sure why that's "plain unacceptable" to the FreeBSD team. - * - * Anyway, you can change it to "with or without modification" as - * you see fit. Enjoy. - * - * Kevin Ruddy - * Powerdog Industries, Inc. - */ -/* +/*- * Copyright (c) 1994 Powerdog Industries. All rights reserved. * * Copyright (c) 2011 The FreeBSD Foundation @@ -36,12 +15,6 @@ * notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgement: - * This product includes software developed by Powerdog Industries. - * 4. The name of Powerdog Industries may not be used to endorse or - * promote products derived from this software without specific prior - * written permission. * * THIS SOFTWARE IS PROVIDED BY POWERDOG INDUSTRIES ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -54,6 +27,10 @@ * 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. + * + * The views and conclusions contained in the software and documentation + * are those of the authors and should not be interpreted as representing + * official policies, either expressed or implied, of Powerdog Industries. */ #include From owner-svn-src-stable@FreeBSD.ORG Fri Jun 20 17:57:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B229266; Fri, 20 Jun 2014 17:57:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 754B32A50; Fri, 20 Jun 2014 17:57:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5KHvV3o040293; Fri, 20 Jun 2014 17:57:31 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5KHvUQa040279; Fri, 20 Jun 2014 17:57:30 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201406201757.s5KHvUQa040279@svn.freebsd.org> From: Devin Teske Date: Fri, 20 Jun 2014 17:57:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267683 - in stable/9/usr.sbin/bsdconfig: include share share/media share/packages X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2014 17:57:31 -0000 Author: dteske Date: Fri Jun 20 17:57:29 2014 New Revision: 267683 URL: http://svnweb.freebsd.org/changeset/base/267683 Log: MFC revisions 257795,257817,257819,257937-257938,258264-258265,258267, 258854,259113,259427 (11 revisions; summarized below). r257795: Replace pkg-tools with pkgng r257817: Fix cosmetic typos r257819: Use `pkg -vv' to obtain ABI r257937: Unbreak the installer r257938: Remove the env(1) but keep the var r258264: Kick an unused orphan to the curb ;) r258265: Improve debugging with f_eval_catch() r258267: Fix package installation from physical media such as DVD r258854: Fix PKG_ABI detection after pkg-1.2 r259113: Fix failed attempt to send pkg(8) stderr to /dev/null r259427: Export 'REPOS_DIR' when selected source medium is cdrom MFC after: 3 days Modified: stable/9/usr.sbin/bsdconfig/include/messages.subr stable/9/usr.sbin/bsdconfig/share/common.subr stable/9/usr.sbin/bsdconfig/share/media/http.subr stable/9/usr.sbin/bsdconfig/share/packages/index.subr stable/9/usr.sbin/bsdconfig/share/packages/packages.subr stable/9/usr.sbin/bsdconfig/share/variable.subr Directory Properties: stable/9/usr.sbin/bsdconfig/ (props changed) Modified: stable/9/usr.sbin/bsdconfig/include/messages.subr ============================================================================== --- stable/9/usr.sbin/bsdconfig/include/messages.subr Fri Jun 20 17:45:00 2014 (r267682) +++ stable/9/usr.sbin/bsdconfig/include/messages.subr Fri Jun 20 17:57:29 2014 (r267683) @@ -49,7 +49,7 @@ msg_assume_yes_to_all_non_critical_dialo msg_astro_desc="Applications related to astronomy." msg_attempt_automatic_dhcp_configuration="Attempt automatic DHCP configuration of interfaces" msg_attempt_ipv6_configuration_of_interfaces="Attempt IPv6 configuration of interfaces" -msg_attempting_to_fetch_file_from_selected_media="Attempting to fetch %s file from selected media." +msg_attempting_to_update_repository_catalogue="Attempting to update repository catalogue from selected media." msg_audio_desc="Audio utilities - most require a supported sound card." msg_australia="Australia" msg_austria="Austria" @@ -138,9 +138,12 @@ msg_ftp_desc="FTP client and server util msg_ftp_passive="FTP Passive" msg_ftp_username="FTP username" msg_games_desc="Various games and sundry amusements." +msg_generating_index_from_pkg_database="Generating INDEX from pkg(8) database\n(this can take a while)..." msg_geography_desc="Geography-related software." msg_german_desc="Ported software for Germanic countries." msg_germany="Germany" +msg_getting_package_categories_via_pkg_rquery="Getting package categories via pkg-rquery(8)..." +msg_getting_package_dependencies_via_pkg_rquery="Getting package dependencies via pkg-rquery(8)\n(this can take a while)..." msg_gnome_desc="Components of the Gnome Desktop environment." msg_gnustep_desc="Software for GNUstep desktop environment." msg_graphics_desc="Graphics libraries and utilities." @@ -176,7 +179,7 @@ msg_invalid_name_server_ip_address_speci msg_invalid_netmask_value="Invalid netmask value" msg_invalid_nfs_path_specification="Invalid NFS path specification. Must be of the form:\nhost:/full/pathname/to/FreeBSD/distdir" msg_io_error_while_reading_in_the_package="I/O error while reading in the %s package." -msg_io_or_format_error_on_index_file="I/O or format error on %s file.\nPlease verify media (or path to media) and try again." +msg_io_or_format_error_on_index_file="I/O or format error on INDEX file.\nPlease verify media (or path to media) and try again." msg_ipv4_address="IPv4 Address" msg_ipv4_gateway="IPv4 Gateway" msg_ipv6="IPv6" @@ -246,6 +249,7 @@ msg_no_gateway_has_been_set="No gateway msg_no_network_devices="No network devices available!" msg_no_package_name_passed_in_package_variable="No package name passed in package variable" msg_no_packages_were_selected_for_extraction="No packages were selected for extraction." +msg_no_pkg_database_found="No pkg(8) database found!" msg_no_such_file_or_directory="%s: %s: No such file or directory" msg_no_usb_devices_found="No USB devices found (try Options/Re-scan Devices)" msg_no_username="No username provided!" @@ -257,10 +261,8 @@ msg_ok="OK" msg_options="Options" msg_options_editor="Options Editor" msg_other="other" -msg_pkg_delete_failed="Warning: pkg_delete of %s failed.\n Run with debugging for details." msg_package_is_needed_by_other_installed_packages="Warning: Package %s is needed by\n %d other installed package%s." msg_package_not_installed_cannot_delete="Warning: package %s not installed\n No package can be deleted." -msg_package_read_successfully_waiting_for_pkg_add="Package %s read successfully - waiting for pkg_add(1)" msg_package_temp="Package Temp" msg_package_was_added_successfully="Package %s was added successfully" msg_packages="packages" @@ -270,7 +272,8 @@ msg_parallel_desc="Applications dealing msg_pear_desc="Software related to the Pear PHP framework." msg_perl5_desc="Utilities/modules for the PERL5 language." msg_permission_denied="%s: %s: Permission denied" -msg_pkg_add_apparently_did_not_like_the_package="pkg_add(1) apparently did not like the %s package." +msg_pkg_delete_failed="Warning: pkg-delete(8) of %s failed.\n Run with debugging for details." +msg_pkg_install_apparently_did_not_like_the_package="pkg-install(8) apparently did not like the %s package." msg_plan9_desc="Software from the Plan9 operating system." msg_please_check_the_url_and_try_again="No such directory: %s\nplease check the URL and try again.\n" msg_please_enter_password="Please enter your password for sudo(8):" @@ -373,9 +376,12 @@ msg_unable_to_get_proper_ftp_path="Unabl msg_unable_to_initialize_media_type_for_package_extract="Unable to initialize media type for package extract." msg_unable_to_make_directory_mountpoint="Unable to make %s directory mountpoint for %s!" msg_unable_to_open="Unable to open %s" +msg_unable_to_pkg_rquery_package_categories="Unable to pkg-rquery(8) package categories!" +msg_unable_to_pkg_rquery_package_dependencies="Unable to pkg-rquery(8) package dependencies!" +msg_unable_to_update_pkg_from_selected_media="Unable to update pkg(8) from selected media." msg_uninstall="Uninstall" msg_uninstall_desc="Mark this package for deletion" -msg_uninstalling_package_waiting_for_pkg_delete="Uninstalling %s package - waiting for pkg_delete(1)" +msg_uninstalling_package_waiting_for_pkg_delete="Uninstalling %s package - waiting for pkg-delete(8)" msg_unknown="unknown" msg_unknown_user="Unknown user: %s" msg_url_was_not_found="%s was not found, maybe directory or release-version are wrong?" Modified: stable/9/usr.sbin/bsdconfig/share/common.subr ============================================================================== --- stable/9/usr.sbin/bsdconfig/share/common.subr Fri Jun 20 17:45:00 2014 (r267682) +++ stable/9/usr.sbin/bsdconfig/share/common.subr Fri Jun 20 17:57:29 2014 (r267683) @@ -60,7 +60,14 @@ FAILURE=1 # export UNAME_S="$( uname -s )" # Operating System (i.e. FreeBSD) export UNAME_P="$( uname -p )" # Processor Architecture (i.e. i386) +export UNAME_M="$( uname -m )" # Machine platform (i.e. i386) export UNAME_R="$( uname -r )" # Release Level (i.e. X.Y-RELEASE) +if [ ! "${PKG_ABI+set}" ]; then + export PKG_ABI="$( + ASSUME_ALWAYS_YES=1 pkg -vv 2> /dev/null | + awk '$1=="ABI"{print $3;exit}' + )" +fi # # Default behavior is to call f_debug_init() automatically when loaded. Modified: stable/9/usr.sbin/bsdconfig/share/media/http.subr ============================================================================== --- stable/9/usr.sbin/bsdconfig/share/media/http.subr Fri Jun 20 17:45:00 2014 (r267682) +++ stable/9/usr.sbin/bsdconfig/share/media/http.subr Fri Jun 20 17:57:29 2014 (r267683) @@ -77,7 +77,8 @@ f_dialog_menu_media_http() f_dialog_title_restore local prompt="$msg_please_select_the_site_closest_to_you_or_other" local menu_list=" - '$msg_main_site' 'ftp.freebsd.org' + 'dist $msg_main_site' 'ftp.freebsd.org' + 'pkg $msg_main_site' 'pkg.freebsd.org' 'URL' '$msg_specify_some_other_http_site' " # END-QUOTE local hline="$msg_select_a_site_thats_close" @@ -322,7 +323,7 @@ f_media_set_http() device_http set type $DEVICE_TYPE_HTTP device_http set init f_media_init_http device_http set get f_media_get_http - device_http set shutdown : + device_http set shutdown f_media_shutdown_http device_http set private device_network f_struct_copy device_http device_media f_struct_free device_http @@ -453,6 +454,11 @@ f_media_init_http() local dev="$1" f_dprintf "Init routine called for HTTP device. dev=[%s]" "$dev" + if [ "$HTTP_INITIALIZED" ]; then + f_dprintf "HTTP device already initialized." + return $SUCCESS + fi + # # First verify access # @@ -494,22 +500,31 @@ f_media_init_http() # local fdir hp f_getvar $VAR_HTTP_PATH%/ hp - for fdir in $HTTP_DIRS; do - setvar $VAR_HTTP_PATH "$hp/$fdir/$rel" - if f_http_check_access; then - http_found=$SUCCESS - break - fi - done + setvar $VAR_HTTP_PATH "$hp/$PKG_ABI/latest" + if [ "$PKG_ABI" ] && f_http_check_access; then + http_found=$SUCCESS + setvar $VAR_HTTP_PATH "$hp" + else + for fdir in $HTTP_DIRS; do + setvar $VAR_HTTP_PATH "$hp/$fdir/$rel" + if f_http_check_access; then + http_found=$SUCCESS + break + fi + done + fi esac - [ $http_found -eq $SUCCESS ] && break + if [ $http_found -eq $SUCCESS ]; then + HTTP_INITIALIZED=YES + break + fi f_getvar $VAR_HTTP_PATH http_path f_show_msg "$msg_please_check_the_url_and_try_again" \ "$http_path" - unset $VAR_HTTP_PATH + unset HTTP_INITIALIZED $VAR_HTTP_PATH f_media_set_http || break done @@ -561,6 +576,11 @@ f_media_get_http() f_getvar $VAR_HTTP_HOST http_host f_getvar $VAR_HTTP_PORT http_port + if [ ! "$HTTP_INITIALIZED" ]; then + f_dprintf "No HTTP connection open, can't get file %s" "$file" + return $FAILURE + fi + if ! { f_validate_ipaddr "$http_host" || f_validate_ipaddr6 "$http_host" || @@ -652,6 +672,18 @@ f_media_get_http() return $FAILURE } +# f_media_shutdown_http $device +# +# Shuts down the HTTP device. Return status should be ignored. Note that since +# we don't maintain an open connection to the HTTP server, nothing to do. +# +f_media_shutdown_http() +{ + [ "$HTTP_INITIALIZED" ] || return $SUCCESS + + unset HTTP_INITIALIZED +} + ############################################################ MAIN f_dprintf "%s: Successfully loaded." media/http.subr Modified: stable/9/usr.sbin/bsdconfig/share/packages/index.subr ============================================================================== --- stable/9/usr.sbin/bsdconfig/share/packages/index.subr Fri Jun 20 17:45:00 2014 (r267682) +++ stable/9/usr.sbin/bsdconfig/share/packages/index.subr Fri Jun 20 17:57:29 2014 (r267683) @@ -43,24 +43,53 @@ f_include_lang $BSDCFG_LIBE/include/mess PACKAGE_INDEX= _INDEX_INITTED= +# +# Default path to pkg(8) repo-packagesite.sqlite database +# +SQLITE_REPO="/var/db/pkg/repo-packagesite.sqlite" + +# +# Default path to on-disk cache INDEX file +# +PACKAGES_INDEX_CACHEFILE="/var/run/bsdconfig/packages_INDEX.cache" + +# +# INDEX format for FreeBSD-6.0 or higher: +# +# package|port-origin|install-prefix|comment|port-desc-file|maintainer| +# categories|build-deps|run-deps|www-site|reserve|reserve|reserve|disc +# +INDEX_FORMAT="%n-%v" # package +INDEX_FORMAT="$INDEX_FORMAT|/usr/ports/%o" # port-origin +INDEX_FORMAT="$INDEX_FORMAT|%p" # install-prefix +INDEX_FORMAT="$INDEX_FORMAT|%c" # comment +INDEX_FORMAT="$INDEX_FORMAT|/usr/ports/%o/pkg-descr" # port-desc-file +INDEX_FORMAT="$INDEX_FORMAT|%m" # maintainer +INDEX_FORMAT="$INDEX_FORMAT|@CATEGORIES@" # place-holder +INDEX_FORMAT="$INDEX_FORMAT|" # build-deps +INDEX_FORMAT="$INDEX_FORMAT|@RUNDEPS@" # place-holder +INDEX_FORMAT="$INDEX_FORMAT|%w" # www-site +INDEX_FORMAT="$INDEX_FORMAT|" # reserved +INDEX_FORMAT="$INDEX_FORMAT|" # reserved +INDEX_FORMAT="$INDEX_FORMAT|" # reserved +INDEX_FORMAT="$INDEX_FORMAT|" # disc + ############################################################ FUNCTIONS -# f_index_initialize $path [$var_to_set] +# f_index_initialize [$var_to_set] # -# Read and initialize the global index. $path is to be relative to the chosen -# media (not necessarily the filesystem; e.g. FTP) -- this is usually going to -# be `packages/INDEX'. Returns success unless media cannot be initialized for -# any reason (e.g. user cancels media selection dialog) or an error occurs. The -# index is sorted before being loaded into $var_to_set. +# Read and initialize the global index. Returns success unless media cannot be +# initialized for any reason (e.g. user cancels media selection dialog or an +# error occurs). The index is sorted before being loaded into $var_to_set. # # NOTE: The index is processed with f_index_read() [below] after being loaded. # f_index_initialize() { - local __path="$1" __var_to_set="${2:-PACKAGE_INDEX}" + local __funcname=f_index_initialize + local __var_to_set="${2:-PACKAGE_INDEX}" [ "$_INDEX_INITTED" ] && return $SUCCESS - [ "$__path" ] || return $FAILURE # Got any media? f_media_verify || return $FAILURE @@ -68,20 +97,177 @@ f_index_initialize() # Does it move when you kick it? f_device_init device_media || return $FAILURE - f_show_info "$msg_attempting_to_fetch_file_from_selected_media" \ - "$__path" - eval "$__var_to_set"='$( f_device_get device_media "$__path" )' - if [ $? -ne $SUCCESS ]; then - f_show_msg "$msg_unable_to_get_file_from_selected_media" \ - "$__path" + f_show_info "$msg_attempting_to_update_repository_catalogue" + + # + # Generate $PACKAGESITE variable for pkg(8) based on media type + # + local __type __data __site + device_media get type __type + device_media get private __data + case "$__type" in + $DEVICE_TYPE_DIRECTORY) + __site="file://$__data/packages/$PKG_ABI" ;; + $DEVICE_TYPE_FLOPPY) + __site="file://${__data:-$MOUNTPOINT}/packages/$PKG_ABI" ;; + $DEVICE_TYPE_FTP) + f_getvar $VAR_FTP_PATH __site + __site="$__site/packages/$PKG_ABI" ;; + $DEVICE_TYPE_HTTP) + f_getvar $VAR_HTTP_PATH __site + __site="$__site/$PKG_ABI/latest" ;; + $DEVICE_TYPE_HTTP_PROXY) + f_getvar $VAR_HTTP_PROXY_PATH __site + __site="$__site/packages/$PKG_ABI" ;; + $DEVICE_TYPE_CDROM) + __site="file://$MOUNTPOINT/packages/$PKG_ABI" + export REPOS_DIR="$MOUNTPOINT/packages/repos" ;; + *) # UFS, DISK, CDROM, USB, DOS, NFS, etc. + __site="file://$MOUNTPOINT/packages/$PKG_ABI" + esac + + export PACKAGESITE="$__site" + f_dprintf "PACKAGESITE=[%s]" "$PACKAGESITE" + if ! f_eval_catch $__funcname pkg "pkg update"; then + f_show_err "$msg_unable_to_update_pkg_from_selected_media" + f_device_shutdown device_media + return $FAILURE + fi + + # + # Try to get contents from validated on-disk cache + # + + # + # Calculate digest used to determine if the on-disk persistant cache + # INDEX (containing this digest on the first line) is valid and can be + # used to quickly populate the environment. + # + local __sqlite_digest + if ! __sqlite_digest=$( md5 < "$SQLITE_REPO" 2> /dev/null ); then + f_show_err "$msg_no_pkg_database_found" + f_device_shutdown device_media + return $FAILURE + fi + + # + # Check to see if the persistant cache INDEX file exists + # + if [ -f "$PACKAGES_INDEX_CACHEFILE" ]; then + # + # Attempt to populate the environment with the (soon to be) + # validated on-disk cache. If validation fails, fall-back to + # generating a fresh cache. + # + if eval $__var_to_set='$( + ( # Get digest as the first word on first line + read digest rest_ignored + + # + # If the stored digest matches the calculated- + # one populate the environment from the on-disk + # cache and provide success exit status. + # + if [ "$digest" = "$__sqlite_digest" ]; then + cat + exit $SUCCESS + else + # Otherwise, return the current value + eval echo \"\$__var_to_set\" + exit $FAILURE + fi + ) < "$PACKAGES_INDEX_CACHEFILE" 2> /dev/null + )'; then + f_show_info \ + "$msg_located_index_now_reading_package_data_from_it" + if ! f_index_read "$__var_to_set"; then + f_show_err \ + "$msg_io_or_format_error_on_index_file" + return $FAILURE + fi + _INDEX_INITTED=1 + return $SUCCESS + fi + # Otherwise, fall-thru to create a fresh cache from scratch + fi + + # + # If we reach this point, we need to generate the data from scratch + # + + f_show_info "$msg_getting_package_categories_via_pkg_rquery" + if ! eval "$( pkg rquery "%n-%v %C" | awk ' + { categories[$1] = categories[$1] " " $2 } + END { + for (package in categories) + { + cats = categories[package] + sub(/^ /, "", cats) + gsub(/[^[:alnum:]_]/, "_", package) + printf "local _%s_categories=\"%s\";\n", package, cats + } + }' )"; then + f_show_err "$msg_unable_to_pkg_rquery_package_dependencies" f_device_shutdown device_media return $FAILURE fi + + f_show_info "$msg_getting_package_dependencies_via_pkg_rquery" + if ! eval "$( pkg rquery "%n-%v %dn-%dv" | awk ' + { rundeps[$1] = rundeps[$1] " " $2 } + END { + for (package in rundeps) + { + deps = rundeps[package] + sub(/^ /, "", deps) + gsub(/[^[:alnum:]_]/, "_", package) + printf "local _%s_rundeps=\"%s\";\n", package, deps + } + }' )"; then + f_show_err "$msg_unable_to_pkg_rquery_package_dependencies" + f_device_shutdown device_media + return $FAILURE + fi + + f_show_info "$msg_generating_index_from_pkg_database" + eval "$__var_to_set"='$( pkg rquery "$INDEX_FORMAT" | + while read LINE; do + package="${LINE%%|*}"; + f_str2varname "$package" varpkg; + eval f_replaceall \"\$LINE\" \"\|@CATEGORIES@\|\" \ + \"\|\$_${varpkg}_categories\|\" LINE + eval f_replaceall \"\$LINE\" \"\|@RUNDEPS@\|\" \ + \"\|\$_${varpkg}_rundeps\|\" LINE + echo "$LINE" + done + )' # always returns true (status of last item in pipe-chain) eval "$__var_to_set"='$( debug= f_getvar "$__var_to_set" | sort )' + # + # Attempt to create the persistant on-disk cache + # + + # Create a new temporary file to write to + local __tmpfile + if f_eval_catch -dk __tmpfile $__funcname mktemp \ + 'mktemp -t "%s"' "$pgm" + then + # Write the temporary file contents + echo "$__sqlite_digest" > "$__tmpfile" + debug= f_getvar "$__var_to_set" >> "$__tmpfile" + + # Finally, move the temporary file into place + case "$PACKAGES_INDEX_CACHEFILE" in + */*) f_eval_catch -d $funcname mkdir \ + 'mkdir -p "%s"' "${PACKAGES_INDEX_CACHEFILE%/*}" + esac + f_eval_catch -d $__funcname mv 'mv -f "%s" "%s"' \ + "$__tmpfile" "$PACKAGES_INDEX_CACHEFILE" + fi + f_show_info "$msg_located_index_now_reading_package_data_from_it" if ! f_index_read "$__var_to_set"; then - f_show_msg "$msg_io_or_format_error_on_index_file" "$__path" + f_show_err "$msg_io_or_format_error_on_index_file" return $FAILURE fi Modified: stable/9/usr.sbin/bsdconfig/share/packages/packages.subr ============================================================================== --- stable/9/usr.sbin/bsdconfig/share/packages/packages.subr Fri Jun 20 17:45:00 2014 (r267682) +++ stable/9/usr.sbin/bsdconfig/share/packages/packages.subr Fri Jun 20 17:57:29 2014 (r267683) @@ -53,7 +53,7 @@ f_include_lang $BSDCFG_LIBE/include/mess # # Package extensions to try # -PACKAGE_EXTENSIONS=".tbz .tbz2 .tgz" +PACKAGE_EXTENSIONS=".txz .tbz .tbz2 .tgz" # # Variables used to track runtime states @@ -164,24 +164,13 @@ f_package_deselect() # f_package_detect_installed # -# Detect installed packages. Currently this searches /var/db/pkg for directory +# Detect installed packages. Currently this uses pkg-query(8) for querying # entries and marks each entry as an installed/selected package. # f_package_detect_installed() { - local installed package varpkg - # - # XXX KLUDGE ALERT! This makes evil assumptions about how XXX - # packages register themselves and should *really* be done with - # `pkg_info -e ' except that this is too slow for an - # item check routine.. :-( - # - # NOTE: When transitioning to pkgng, make a single fork to `pkg' to - # produce a list of all installed packages and parse _that_ - # - installed=$( find -s /var/db/pkg -mindepth 1 -maxdepth 1 -type d | - sed -e 's:/var/db/pkg/::' ) - for package in $installed; do + local package varpkg + for package in $( pkg query "%n-%v" ); do f_str2varname $package varpkg export _mark_$varpkg=X # exported for awk(1) ENVIRON[] f_package_select $package @@ -983,23 +972,31 @@ f_package_extract() f_getvar $VAR_PKG_TMPDIR:-/var/tmp tmpdir f_quietly mkdir -p -m 1777 "$tmpdir" - local path + local path device_type + $device get type device_type case "$name" in */*) path="$name" ;; *) - case "$name" in - *-*|*_*) path="packages/All/$name" ;; - *) path="packages/Latest/$name" - esac + if [ "$device_type" = "$DEVICE_TYPE_HTTP" ]; then + path="$PKG_ABI/latest/All/$name" + else + path="packages/$PKG_ABI/All/$name" + fi esac - # We have a path, call the device strategy routine to get the file + # We have a path, call the device strategy routine to check the file local pkg_ext found= for pkg_ext in "" $PACKAGE_EXTENSIONS; do if f_device_get $device "$path$pkg_ext" $PROBE_EXIST; then path="$path$pkg_ext" - f_dprintf "$funcname: found path=[%s] dev=[%s]" \ - "$path" "$device" + found=1 + break + elif [ "$device_type" = "$DEVICE_TYPE_HTTP" ] && + f_device_get $device \ + "packages/$PKG_ABI/All/$name$pkg_ext" $PROBE_EXIST + then + # Mirroring physical media over HTTP + path="packages/$PKG_ABI/All/$name$pkg_ext" found=1 break fi @@ -1027,27 +1024,14 @@ f_package_extract() f_show_info "$msg_adding_package_from_media" "$name" "$devname" fi - # Get package data and pipe into pkg_add(1) while providing feedback - { - if ! f_device_get $device "$path"; then - $alert "$msg_io_error_while_reading_in_the_package" \ - "$name" \ - >&$DIALOG_TERMINAL_PASSTHRU_FD 2> /dev/null - [ "$no_confirm" ] && sleep 2 - else - f_show_info \ - "$msg_package_read_successfully_waiting_for_pkg_add" \ - "$name" >&$DIALOG_TERMINAL_PASSTHRU_FD 2> /dev/null - fi - } | { - if f_debugging; then - /usr/sbin/pkg_add -v - - else - f_quietly /usr/sbin/pkg_add - - fi - } + # Request the package be added via pkg-install(8) + if f_debugging; then + f_eval_catch $funcname pkg 'pkg -d install -y "%s"' "$name" + else + f_eval_catch $funcname pkg 'pkg install -y "%s"' "$name" + fi if [ $? -ne $SUCCESS ]; then - $alert "$msg_pkg_add_apparently_did_not_like_the_package" \ + $alert "$msg_pkg_install_apparently_did_not_like_the_package" \ "$name" [ "$no_confirm" ] && sleep 2 else @@ -1173,9 +1157,9 @@ f_package_delete() # f_show_info "$msg_uninstalling_package_waiting_for_pkg_delete" "$name" if f_debugging; then - pkg_delete -v "$name" + f_eval_catch $funcname pkg 'pkg -d delete -y "%s"' "$name" else - f_quietly pkg_delete "$name" + f_eval_catch $funcname pkg 'pkg delete -y "%s"' "$name" fi if [ $? -ne $SUCCESS ]; then f_show_msg "$msg_pkg_delete_failed" "$name" Modified: stable/9/usr.sbin/bsdconfig/share/variable.subr ============================================================================== --- stable/9/usr.sbin/bsdconfig/share/variable.subr Fri Jun 20 17:45:00 2014 (r267682) +++ stable/9/usr.sbin/bsdconfig/share/variable.subr Fri Jun 20 17:57:29 2014 (r267683) @@ -205,7 +205,7 @@ f_netinteractive() f_getvar $VAR_NETINTERACTIVE value && [ "$value" ] } -# f_zfsinteractive() +# f_zfsinteractive # # Has the user specifically requested the ZFS-portion of configuration and # setup to be performed interactively? Returns success if the user has asked From owner-svn-src-stable@FreeBSD.ORG Fri Jun 20 18:07:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 69E7F8BD; Fri, 20 Jun 2014 18:07:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E7522B3E; Fri, 20 Jun 2014 18:07:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5KI75Rn045472; Fri, 20 Jun 2014 18:07:05 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5KI755X045471; Fri, 20 Jun 2014 18:07:05 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201406201807.s5KI755X045471@svn.freebsd.org> From: Devin Teske Date: Fri, 20 Jun 2014 18:07:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267684 - in stable/9: . usr.sbin X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2014 18:07:05 -0000 Author: dteske Date: Fri Jun 20 18:07:04 2014 New Revision: 267684 URL: http://svnweb.freebsd.org/changeset/base/267684 Log: Add missing mergeinfo for 267683. Modified: Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Fri Jun 20 19:57:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D9506E6A; Fri, 20 Jun 2014 19:57:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4F45251F; Fri, 20 Jun 2014 19:57:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5KJvtxm096678; Fri, 20 Jun 2014 19:57:55 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5KJvtMi096677; Fri, 20 Jun 2014 19:57:55 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406201957.s5KJvtMi096677@svn.freebsd.org> From: Glen Barber Date: Fri, 20 Jun 2014 19:57:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267686 - stable/9/release/doc/en_US.ISO8859-1/errata X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2014 19:57:56 -0000 Author: gjb Date: Fri Jun 20 19:57:55 2014 New Revision: 267686 URL: http://svnweb.freebsd.org/changeset/base/267686 Log: Document missing SAs on the 9.2R errata page. Submitted by: pi Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Fri Jun 20 19:54:23 2014 (r267685) +++ stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Fri Jun 20 19:57:55 2014 (r267686) @@ -101,9 +101,70 @@ - No security advisories. -   -   + SA-14:01.bsnmpd + 1 January 2014 + Fix bsnmpd remote denial of service + vulnerability + + + + SA-14:02.ntpd + 1 January 2014 + Fix ntpd distributed reflection Denial of + Service vulnerability + + + + SA-14:03.ntpd + 1 January 2014 + Fix BIND remote denial of service + vulnerability + + + + SA-14:05.nfsserver + 8 April 2014 + Fix NFS deadlock vulnerability + + + + SA-14:06.openssl + 8 April 2014 + Fix ECDSA Cache Side-channel + Attack + + + + SA-14:08.tcp + 30 April 2014 + Fix TCP reassembly + vulnerability + + + + SA-14:11.sendmail + 3 June 2014 + Fix sendmail improper close-on-exec flag + handling + + + + SA-14:12.ktrace + 3 June 2014 + Fix ktrace memory disclosure + + + + SA-14:13.pam + 3 June 2014 + Fix incorrect error handling in PAM policy + parser + + + + SA-14:14.openssl + 5 June 2014 + Multiple vulnerabilities From owner-svn-src-stable@FreeBSD.ORG Fri Jun 20 20:17:04 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E92D45C; Fri, 20 Jun 2014 20:17:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20CB22706; Fri, 20 Jun 2014 20:17:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5KKH3kZ006736; Fri, 20 Jun 2014 20:17:03 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5KKH3OW006735; Fri, 20 Jun 2014 20:17:03 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406202017.s5KKH3OW006735@svn.freebsd.org> From: Glen Barber Date: Fri, 20 Jun 2014 20:17:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267687 - stable/10/release/doc/en_US.ISO8859-1/errata X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2014 20:17:04 -0000 Author: gjb Date: Fri Jun 20 20:17:03 2014 New Revision: 267687 URL: http://svnweb.freebsd.org/changeset/base/267687 Log: Update list of SAs on the 10.0R errata page. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Fri Jun 20 19:57:55 2014 (r267686) +++ stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Fri Jun 20 20:17:03 2014 (r267687) @@ -153,6 +153,54 @@ OpenSSL multiple vulnerabilities + + + SA-14:07.devfs + 30 April 2014 + Fix devfs rules not applied by default for + jails + + + + SA-14:08.tcp + 30 April 2014 + Fix TCP reassembly + vulnerability + + + + SA-14:09.openssl + 30 April 2014 + Fix OpenSSL use-after-free + vulnerability + + + + SA-14:10.openssl + 15 May 2014 + Fix OpenSSL NULL pointer deference + vulnerability + + + + SA-14:11.sendmail + 3 June 2014 + Fix sendmail improper close-on-exec flag + handling + + + + SA-14:13.pam + 3 June 2014 + Fix incorrect error handling in PAM policy + parser + + + + SA-14:14.openssl + 5 June 2014 + Multiple vulnerabilities + From owner-svn-src-stable@FreeBSD.ORG Sat Jun 21 00:30:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3AC3C986; Sat, 21 Jun 2014 00:30:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 249842B46; Sat, 21 Jun 2014 00:30:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5L0UqMs028471; Sat, 21 Jun 2014 00:30:52 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5L0UpOL028469; Sat, 21 Jun 2014 00:30:51 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201406210030.s5L0UpOL028469@svn.freebsd.org> From: Navdeep Parhar Date: Sat, 21 Jun 2014 00:30:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267694 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jun 2014 00:30:52 -0000 Author: np Date: Sat Jun 21 00:30:51 2014 New Revision: 267694 URL: http://svnweb.freebsd.org/changeset/base/267694 Log: MFC r267600: cxgbe(4): Fix bug in the fast rx buffer recycle path. In some cases rx buffers were getting recycled when they should have been left alone. Modified: stable/10/sys/dev/cxgbe/adapter.h stable/10/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/10/sys/dev/cxgbe/adapter.h Fri Jun 20 21:53:50 2014 (r267693) +++ stable/10/sys/dev/cxgbe/adapter.h Sat Jun 21 00:30:51 2014 (r267694) @@ -254,7 +254,8 @@ struct cluster_metadata { struct fl_sdesc { caddr_t cl; - uint8_t nmbuf; + uint8_t nimbuf; /* # of inline mbufs with ref on the cluster */ + uint8_t nembuf; /* # of allocated mbufs with ref */ struct cluster_layout cll; }; Modified: stable/10/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_sge.c Fri Jun 20 21:53:50 2014 (r267693) +++ stable/10/sys/dev/cxgbe/t4_sge.c Sat Jun 21 00:30:51 2014 (r267694) @@ -1498,22 +1498,22 @@ get_scatter_segment(struct adapter *sc, /* copy data to mbuf */ bcopy(payload, mtod(m, caddr_t), len); - } else if (sd->nmbuf * MSIZE < cll->region1) { + } else if (sd->nimbuf * MSIZE < cll->region1) { /* * There's spare room in the cluster for an mbuf. Create one - * and associate it with the payload that's in the cluster too. + * and associate it with the payload that's in the cluster. */ MPASS(clm != NULL); - m = (struct mbuf *)(sd->cl + sd->nmbuf * MSIZE); + m = (struct mbuf *)(sd->cl + sd->nimbuf * MSIZE); /* No bzero required */ if (m_init(m, NULL, 0, M_NOWAIT, MT_DATA, flags | M_NOFREE)) return (NULL); fl->mbuf_inlined++; m_extaddref(m, payload, padded_len, &clm->refcount, rxb_free, swz->zone, sd->cl); - sd->nmbuf++; + sd->nimbuf++; } else { @@ -1527,10 +1527,11 @@ get_scatter_segment(struct adapter *sc, if (m == NULL) return (NULL); fl->mbuf_allocated++; - if (clm != NULL) + if (clm != NULL) { m_extaddref(m, payload, padded_len, &clm->refcount, rxb_free, swz->zone, sd->cl); - else { + sd->nembuf++; + } else { m_cljset(m, sd->cl, swz->type); sd->cl = NULL; /* consumed, not a recycle candidate */ } @@ -3053,7 +3054,7 @@ refill_fl(struct adapter *sc, struct sge if (sd->cl != NULL) { - if (sd->nmbuf == 0) { + if (sd->nimbuf + sd->nembuf == 0) { /* * Fast recycle without involving any atomics on * the cluster's metadata (if the cluster has @@ -3062,6 +3063,11 @@ refill_fl(struct adapter *sc, struct sge * fit within a single mbuf each. */ fl->cl_fast_recycled++; +#ifdef INVARIANTS + clm = cl_metadata(sc, fl, &sd->cll, sd->cl); + if (clm != NULL) + MPASS(clm->refcount == 1); +#endif goto recycled_fast; } @@ -3107,7 +3113,8 @@ recycled: #endif clm->refcount = 1; } - sd->nmbuf = 0; + sd->nimbuf = 0; + sd->nembuf = 0; recycled_fast: fl->pending++; fl->needed--; @@ -3176,7 +3183,7 @@ free_fl_sdesc(struct adapter *sc, struct cll = &sd->cll; clm = cl_metadata(sc, fl, cll, sd->cl); - if (sd->nmbuf == 0 || + if (sd->nimbuf + sd->nembuf == 0 || (clm && atomic_fetchadd_int(&clm->refcount, -1) == 1)) { uma_zfree(sc->sge.sw_zone_info[cll->zidx].zone, sd->cl); } From owner-svn-src-stable@FreeBSD.ORG Sat Jun 21 00:34:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from hub.FreeBSD.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F9B6AD5; Sat, 21 Jun 2014 00:34:04 +0000 (UTC) Date: Fri, 20 Jun 2014 20:34:00 -0400 From: Glen Barber To: Devin Teske Subject: Re: svn commit: r267684 - in stable/9: . usr.sbin Message-ID: <20140621003400.GJ1218@hub.FreeBSD.org> References: <201406201807.s5KI755X045471@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="IdGNrZu1oYcejyEu" Content-Disposition: inline In-Reply-To: <201406201807.s5KI755X045471@svn.freebsd.org> X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jun 2014 00:34:05 -0000 --IdGNrZu1oYcejyEu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 20, 2014 at 06:07:05PM +0000, Devin Teske wrote: > Author: dteske > Date: Fri Jun 20 18:07:04 2014 > New Revision: 267684 > URL: http://svnweb.freebsd.org/changeset/base/267684 >=20 > Log: > Add missing mergeinfo for 267683. >=20 > Modified: > Directory Properties: > stable/9/ (props changed) > stable/9/usr.sbin/ (props changed) This looks wrong. Why is there mergeinfo to the root of the branch? Glen --IdGNrZu1oYcejyEu Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJTpNL4AAoJELls3eqvi17QY48QALnx8ONkmCvut5qlmid+82/s 867b1kX8zo+8CkYxFPR02cJrplO7UoiZpH0he0d+QMyQH9/c7ykHAwavLFnQJ0iL V+VRRCT/cMuxXk2PFRw73KDDuCCwd1hwIvlQDqMOQfwXA/DTHRNbxlnGnecCEqEG hP79oKWIw3kLhWVCOwnqcrMxhlkGlUcZHVeFKGPjWwUCHj52V00ZdCmKuqSP8pNz idrUBPrQq6t6hDTrZWC1rKjLTzxtBiOOEhpFku/FS/UBt/BzcZ9OPp7/enFnKQnJ J7Jiym3pu7RV2aXnhBDN8nY2DxHvaYHj/Bc9VlXvLTOOVjQ6fTU53y1pgh2iYua9 RI+caYSyjiNI77G4yKhFU4Y0bQQFcxJ5nmgwHBUQTIguvpiQIZfrjsgp8kdDtEmA qJk4d1qrDM+DLM1+gS+4hYcANbMVFpAbNkqbCqNnqSkoIKuKcogbex9N7Ye6lLPp P+SNgRLtYDacrM11Ujy00qit5MKggt14AR1la9RMcOu3NJbAHv4J0fWdCRwy8b5e D8oFJokLfyNoozHRPOTnSSzzAFO172LfnrdVYBmHKUveCKU1LeQb/hi3hp0xe/YX ewK5fG8bpoQoz6tD+IYoVS1cp4yMeksd2tTvwjWKBlh3q0Lt8kMPGYxvQCy4x+0e uca7owcLf2+B8CWawp9u =q+P8 -----END PGP SIGNATURE----- --IdGNrZu1oYcejyEu-- From owner-svn-src-stable@FreeBSD.ORG Sat Jun 21 00:35:21 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 25F7DC0F; Sat, 21 Jun 2014 00:35:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11B762B63; Sat, 21 Jun 2014 00:35:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5L0ZKcp030180; Sat, 21 Jun 2014 00:35:20 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5L0ZKaV030178; Sat, 21 Jun 2014 00:35:20 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201406210035.s5L0ZKaV030178@svn.freebsd.org> From: Navdeep Parhar Date: Sat, 21 Jun 2014 00:35:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267695 - stable/9/sys/dev/cxgbe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jun 2014 00:35:21 -0000 Author: np Date: Sat Jun 21 00:35:20 2014 New Revision: 267695 URL: http://svnweb.freebsd.org/changeset/base/267695 Log: MFC r267600: cxgbe(4): Fix bug in the fast rx buffer recycle path. In some cases rx buffers were getting recycled when they should have been left alone. Modified: stable/9/sys/dev/cxgbe/adapter.h stable/9/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/9/sys/dev/cxgbe/adapter.h Sat Jun 21 00:30:51 2014 (r267694) +++ stable/9/sys/dev/cxgbe/adapter.h Sat Jun 21 00:35:20 2014 (r267695) @@ -253,7 +253,8 @@ struct cluster_metadata { struct fl_sdesc { caddr_t cl; - uint8_t nmbuf; + uint8_t nimbuf; /* # of inline mbufs with ref on the cluster */ + uint8_t nembuf; /* # of allocated mbufs with ref */ struct cluster_layout cll; }; Modified: stable/9/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_sge.c Sat Jun 21 00:30:51 2014 (r267694) +++ stable/9/sys/dev/cxgbe/t4_sge.c Sat Jun 21 00:35:20 2014 (r267695) @@ -1469,22 +1469,22 @@ get_scatter_segment(struct adapter *sc, /* copy data to mbuf */ bcopy(payload, mtod(m, caddr_t), len); - } else if (sd->nmbuf * MSIZE < cll->region1) { + } else if (sd->nimbuf * MSIZE < cll->region1) { /* * There's spare room in the cluster for an mbuf. Create one - * and associate it with the payload that's in the cluster too. + * and associate it with the payload that's in the cluster. */ MPASS(clm != NULL); - m = (struct mbuf *)(sd->cl + sd->nmbuf * MSIZE); + m = (struct mbuf *)(sd->cl + sd->nimbuf * MSIZE); /* No bzero required */ if (m_init(m, NULL, 0, M_NOWAIT, MT_DATA, flags | M_NOFREE)) return (NULL); fl->mbuf_inlined++; m_extaddref(m, payload, padded_len, &clm->refcount, rxb_free, swz->zone, sd->cl); - sd->nmbuf++; + sd->nimbuf++; } else { @@ -1498,10 +1498,11 @@ get_scatter_segment(struct adapter *sc, if (m == NULL) return (NULL); fl->mbuf_allocated++; - if (clm != NULL) + if (clm != NULL) { m_extaddref(m, payload, padded_len, &clm->refcount, rxb_free, swz->zone, sd->cl); - else { + sd->nembuf++; + } else { m_cljset(m, sd->cl, swz->type); sd->cl = NULL; /* consumed, not a recycle candidate */ } @@ -3024,7 +3025,7 @@ refill_fl(struct adapter *sc, struct sge if (sd->cl != NULL) { - if (sd->nmbuf == 0) { + if (sd->nimbuf + sd->nembuf == 0) { /* * Fast recycle without involving any atomics on * the cluster's metadata (if the cluster has @@ -3033,6 +3034,11 @@ refill_fl(struct adapter *sc, struct sge * fit within a single mbuf each. */ fl->cl_fast_recycled++; +#ifdef INVARIANTS + clm = cl_metadata(sc, fl, &sd->cll, sd->cl); + if (clm != NULL) + MPASS(clm->refcount == 1); +#endif goto recycled_fast; } @@ -3078,7 +3084,8 @@ recycled: #endif clm->refcount = 1; } - sd->nmbuf = 0; + sd->nimbuf = 0; + sd->nembuf = 0; recycled_fast: fl->pending++; fl->needed--; @@ -3147,7 +3154,7 @@ free_fl_sdesc(struct adapter *sc, struct cll = &sd->cll; clm = cl_metadata(sc, fl, cll, sd->cl); - if (sd->nmbuf == 0 || + if (sd->nimbuf + sd->nembuf == 0 || (clm && atomic_fetchadd_int(&clm->refcount, -1) == 1)) { uma_zfree(sc->sge.sw_zone_info[cll->zidx].zone, sd->cl); } From owner-svn-src-stable@FreeBSD.ORG Sat Jun 21 00:45:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1EAE6E11; Sat, 21 Jun 2014 00:45:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F27D32C27; Sat, 21 Jun 2014 00:45:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5L0jiHF034772; Sat, 21 Jun 2014 00:45:44 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5L0jis7034771; Sat, 21 Jun 2014 00:45:44 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406210045.s5L0jis7034771@svn.freebsd.org> From: Glen Barber Date: Sat, 21 Jun 2014 00:45:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267696 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jun 2014 00:45:45 -0000 Author: gjb Date: Sat Jun 21 00:45:44 2014 New Revision: 267696 URL: http://svnweb.freebsd.org/changeset/base/267696 Log: Purge information from the stable/9 relnotes that applied to 9.3-RELEASE, after releng/9.3 is branched. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jun 21 00:35:20 2014 (r267695) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jun 21 00:45:44 2014 (r267696) @@ -108,79 +108,9 @@ - FreeBSD-SA-14:01.bsnmpd - 1 January 2014 - Fix &man.bsnmpd.1; remote denial of service - vulnerability - - - - FreeBSD-SA-14:02.ntpd - 1 January 2014 - Disable monitor feature in - &man.ntpd.8; by default - - - - FreeBSD-SA-14:04.bind - 1 January 2014 - Remote denial of service - vulnerability - - - - FreeBSD-SA-14:05.nfsserver - 8 April 2014 - Deadlock in the NFS server - - - - FreeBSD-SA-14:06.openssl - 8 April 2014 - ECDSA side channel leak - - - - FreeBSD-SA-14:08.tcp - 30 April 2014 - TCP reassembly vulnerability - - - - FreeBSD-SA-14:11.sendmail - 26 May 2014 - Sendmail - improper close-on-exec flag handling - - - - FreeBSD-SA-14:12.ktrace - 3 June 2014 - &man.ktrace.1; kernel memory - disclosure - - - - FreeBSD-SA-14:13.pam - 3 June 2014 - Incorrect error handling in PAM policy - parser - - - - FreeBSD-SA-14:14.openssl - 5 June 2014 - Multiple vulnerabilities + No security advisories +   +   @@ -190,536 +120,25 @@ Kernel Changes - The &man.arcmsr.4; driver has been - updated to version 1.20.00.28. - - The &man.isci.4; driver is now loadable - via &man.kldload.8;. - - System-level &man.sysctl.8; values are - now exposed to the system for the &man.ixgbe.4; device. - - The &man.mfi.4; driver has been updated - to support MegaRAID Invader controllers. - - A kernel panic triggered in - zfs_root() after a failed rollback has - been fixed. - - A new &man.sysctl.8;, - debug.devfs_iosize_max_clamp has been added - which enables and disables SSIZE_MAX-sized - I/O requests on &man.devfs.5; files. - - A new - &man.sysctl.8;, kern.disallow_high_osrel, - has been added which disables executing the images compiled on - a userland with a higher major version number than the major - version number of the running kernel. - - A kernel panic triggered by unmounting - a busy &man.zfs.8; filesystem has been fixed. - - A deadlock triggered by powering off - a USB device has been fixed. - - The &man.ata.4; driver has been updated - to support Intel Lynx Point PCH SMBus devices. - - The &man.ata.4; driver has been updated - to support Coleto Creek devices. - - The &man.ahci.4; driver has been updated - to support the PCI-express solid state drive in the - &apple; MacBook Air (model A1465). - - The &man.sysctl.8; - vfs.zfs.arc_meta_limit can now be changed - at runtime. - - The &man.mmap.2; system call has been - updated to more optimally use superpages and provide support - for tweaking the alignment of virtual mappings. - - A workaround has been implemented - in the &man.bge.4; driver for hung transmission on BCM5719 - and BCM5720 chipsets. - - A kernel panic when listing sysctls - on a system with INVARIANTS enabled has - been fixed. - - A new &man.sysctl.8;, - kern.supported_archs has been added, - which will list the MACHINE_ARCH values - whose binaries can be run on the system. - - Several problems that could trigger - kernel panic on &man.kldload.8; and &man.kldunload.8; have - been fixed. - - A kernel panic triggered by some - multi-threaded applications has been fixed. - - The &man.runfw.4; firmware has been - renamed from runfw to - run.fw for consistency with other firmware - files. - - A new &man.sysctl.8;, - kern.panic_reboot_wait_time, has been - added. This allows tuning the amount of time the system - will wait before rebooting after &man.panic.9;. The - kern.panic_reboot_wait_time value defaults - to the kernel configuration option, - PANIC_REBOOT_WAIT_TIME. - - Hardware Random Number Generators have - been disabled by default. - - Support for GPS ports has been added - to the &man.uhso.4; driver. - - A memory leak of compressed buffers - has been fixed in - l2arc_write_done(). - - The &man.netmap.4; framework has been - updated to match the version in head/, - which includes netmap pipes, kqueue support, and enhanced - VALE switch port. - - A deadlock triggered by sending - a mounted &man.zfs.8; snapshot has been fixed. - - Support for SIIG X1 PCI-e has been added - to &man.ppc.4;. - - Support for the ext4 filesystem - has been enabled, supporting read-only mounts. - - A kernel panic triggered by inserting - a USB ethernet device on VIMAGE-enabled systems has been - fixed. - - TTM, - a memory manager used by video - drivers, has been merged. - - Support for - /sys/kernel/random/uuid has been added - to &man.linprocfs.5;. - - A memory leak in the - zpool_in_use() function has been - fixed. - - The - extensible_dataset &man.zpool.8; feature - has been added. See &man.zpool-features.7; for more - information. - - A memory leak has been fixed in - libzfs. - - The vt driver - has been merged from head/. - - The &man.mpr.4; device has - been added, providing support for LSI Fusion-MPT 3 12Gb - SCSI/SATA controllers. - - A kernel bug that inhibited proper - functionality of the dev.cpu.0.freq - &man.sysctl.8; on &intel; processors with Turbo - Boost ™ enabled has been fixed. - - Support for &man.xen.4; - hardware-assisted virtualization, XENHVM, - is now available as a loadable module, - xenhvm.ko. - - - Hardware Support - - Trackpad support for - &apple; MacBook products has been added. - - The &man.nve.4; driver has been - deprecated, and the &man.nfe.4; driver should be used - instead. - - The &man.mfi.4; driver has been - updated to support MegaRAID Fury cards. - - The Radeon KMS driver has been - added. - - The &man.aacraid.4; driver has been - updated to version 3.2.5. - - - Network Interface Support - - The &man.re.4; driver has been - updated to add preliminary support for the RTL8106E - chipset. - - The &man.re.4; driver has - been updated to support the RTL8168G, RTL8168GU and - RTL8411B chipsets. - - The &man.re.4; driver has been - updated to add preliminary support for the RTL8168EP - chipset. - - The &man.oce.4; driver has been - updated to version 10.0.664.0. - - The &man.qlxgbe.4; driver has been - imported from head/. - - The &man.qlxge.4; driver has been - imported from head/. - - The &man.bge.4; driver has been - updated to support the BCM5725 chipset. - - The &man.bge.4; driver has been - updated to support the BCM57764, BCM57767, BCM57782, - BCM57786 and BCM57787 chipsets. - - The &man.run.4; driver has been - updated to support MediaTek/Ralink chipsets RT5370 and - RT5372. - - The &man.usb.4; wireless radiotap - headers have been realigned, allowing wireless adapters - to work on &arch.arm;, &arch.mips;, and other similar - platforms where alignment is important. - - The &man.run.4; firmware has been - updated to version 0.33. - - The &man.bxe.4; driver has been - merged from head/, providing support - for Broadcom NetXtreme II 10Gb PCIe adapters. - - The &man.run.4; driver has been - updated to include support for the MediaTek/Ralink RT3593 - chipset. - - The &man.run.4; driver has been - updated to include support for the DLINK DWA-127 wireless - adapter. - - The &man.axge.4; driver has been - added. - - The &man.urndis.4; driver has been - imported from OpenBSD. - - The &man.bxe.4; driver has been - updated to version 1.78.78. - - - - - File Systems - - The &man.zfs.8; filesystem has been - updated to support the bookmarks - feature. - +   Userland Changes - A new flag -c, has - been added to &man.pgrep.1; and &man.pkill.1;, which restricts - the process lookup to the specified login class. - - The &man.ddb.8; utility has been updated - to add show ioapic and show all - ioapics. - - Setting nmbcluster - values to their current value will now be ignored, instead of - failing with an error. - - The /var/cache directory is now - created with mode 0755 instead of mode - 0750, since this directory is used by - many third-party applications, which makes dropping group - privileges impossible. - - The &man.uname.1; utility has been - updated to include the -U and - -K flags, which print the - __FreeBSD_version for the running userland - and kernel, respectively. - - The &man.fetch.3; library has been - updated to support SNI (Server Name Identification), allowing - to use virtual hosts on HTTPS. - - A segmentation fault and internal - compiler error bug in &man.gcc.1; triggered by throwing - a warning before parsing any tokens has been fixed. - - Several updates to &man.gcc.1; - have been imported from Google. - - A byte-order bug in the Heimdal - gss_pseudo_random() function which would - prevent interoperability with other - Kerberos implementations has been - fixed. In particular, this would prevent interoperability - with the MIT implementation. - - The &man.hastctl.8; utility has been - updated to output the current queue sizes. - - The &man.ps.1; utility will no longer - truncate the command output column. - - The &man.protect.1; command has been - added, which allows exempting processes from being killed - when swap is exhausted. - - The &man.gmirror.8; utility now prevents - deactivating the last component of a mirror. - - A new &man.gmirror.8; command, - gmirror destroy, has been added, which will - destroy the &man.geom.8; and erase the &man.gmirror.8; - metadata. - - The &man.etcupdate.8; utility, a tool - for managing updates to files in /etc, has been merged from - head/. - - The &man.find.1; utility has been - updated to fix incorrect behavior with the - -lname and -ilname - flags. - - The - hw.uart.console is now always updated when - the comconsole setup changes. - - The &man.kldload.8; utility has been - updated to display a message directing to &man.dmesg.8;, - instead of the cryptic message Exec format - error. - - A bug that could trigger an infinite - loop in KDE and X has been fixed. - - The &man.newsyslog.8; utility has been - changed to use the size of the file, instead of the blocks the - file takes on the disk to match the behavior documented in - &man.newsyslog.conf.5;. - - A bug in &man.zdb.8; which would cause - numeric parameters to a flag as being treated as additional - flags has been fixed. - - The default number of &man.nfsd.8; - threads has been increased from 4 to - (8 * N), where N is - the number of CPUs as reported by - sysctl -n hw.ncpu. - - The &man.pciconf.8; utility now has - a -V flag, which lists information such - as serial numbers for each device. - - A bug that would allow creating - a &man.zfs.8; snapshot of an inconsistent dataset has been - fixed. - - Receiving a &man.zfs.8; dataset with - zfs recv -F now properly destroys any - snapshots that were created since the incremental source - snapshot. - - Installation from a read-only - .OBJDIR has been fixed. - - A new shared library directory, - /usr/lib/private, - has been added for internal-use shared libraries. - - A default - libmap32.conf has been added, for 32-bit - applications. - - The libucl library, - a JSON-compatible configuration file parsing library, has been - imported. - - The &man.pkg.7; package management - utility has been syncronized with head/. - This implements binary package signature verification when - bootstrapping the system with pkg - bootstrap. - - The system timezone data files have - been updated to version tzdata2014a. - - The NetBSD &man.make.1; utility, - bmake has been imported for compatibility - with the &os; Ports Collection. It is installed as - bmake, and the make - remains the &os; version. - - The &man.fetch.3; library now - supports Last-Modified timestamps which - return UTC instead of GMT. - - Aliases for the &man.zfs.8; commands - list -t snap and snap - have been added to match &oracle; Solaris 11. - - A new flag, -p, has - been added to the &man.zfs.8; list command, - providing output in a parseable form. - - OpenPAM has - been updated to Nummularia (20130907), which incorporates - several bug fixes and documentation improvements. The - &man.openpam.ttyconv.3; library has been completely - rewritten. - - The &man.sh.1; command interpreter has - been updated to expand assignments after - export, local, and - readonly differently. As result of this - change, variable assignment such as local - v=$1 will assign the first positional - parameter to v, even if - $1 contains spaces, and - local w=~/myfile - will expand the tilde (~). - - The &man.find.1; utility has been - updated to implement -ignore_readdir_race. - Prior to this change, -ignore_readdir_race - existed as an option for GNU &man.find.1; compatibility, and - was ignored if specified. A counter primary, - -noignore_readdir_race now also exists, and - is the default behavior. - - The &man.ps.1; utility has been updated - to include the -J flag, used to filter - output by matching &man.jail.8; IDs and names. Additionally, - argument 0 can be used to - -J to only list processes running on the - host system. - - The &man.top.1; utility has been updated - to filter by &man.jail.8; ID or name, in followup to the - &man.ps.1; change in r265229. - - The Blowfish &man.crypt.3; default - format has been changed to - $2b$. - - The default &man.newsyslog.conf.5; now - includes files in the - /etc/newsyslog.conf.d/ and - /usr/local/etc/newsyslog.conf.d/ - directories by default for &man.newsyslog.8;. - - A new flag, onifconsole - has been added to /etc/ttys. This allows - the system to provide a login prompt via serial console if the - device is an active kernel console, otherwise it is equivalent - to off. - - The &man.arc4random.3; library has been - updated to match that of &os;-CURRENT. - - The &man.pmcstat.8; utility has been - updated to include a new flag, -l, which - ends event collection after the specified number of - seconds. - - - &man.periodic.8; Scripts - - The - /etc/periodic/security/800.loginfail - &man.periodic.8; script has been refined to catch more - authentication failures and reduce false positives. - - - - &man.rc.8; Scripts - - Support for first boot - scripts has been added to &man.rc.8;. See &man.rc.8; and - &man.rc.conf.5; for implementation details. - - The &man.rc.8; system will now - re-source &man.rc.conf.5; on receipt of - SIGALRM. - +   Contributed Software - The &man.readline.3; library has been - updated to version 1.104. - - Sendmail has - been updated to version 8.14.9. - - BIND has - been updated to version 9.9.5. - - The &man.xz.1; utility has been updated - to a post-5.0.5 snapshot. - - OpenSSH has - been updated to version 6.6p1. - - OpenSSL has - been updated to version 0.9.8za. +   Release Engineering and Integration - As part of the release build, the - &man.etcupdate.8; utility will bootstrap the system, allowing - &man.etcupdate.8; to work after the first upgrade of a - system. - - The release.sh - script and release Makefile have been - updated to use &man.pkg.7; to populate the dvd installation - medium. - - The &man.services.mkdb.8; utility has - been updated to support multiple byte orders. Similar to - &man.cap.mkdb.1;, the services.db will - be created with proper endinanness as part of - cross-architecture release builds. +   From owner-svn-src-stable@FreeBSD.ORG Sat Jun 21 00:50:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E05D0F68; Sat, 21 Jun 2014 00:50:49 +0000 (UTC) Received: from mail-yh0-x233.google.com (mail-yh0-x233.google.com [IPv6:2607:f8b0:4002:c01::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 52ED52C3E; Sat, 21 Jun 2014 00:50:49 +0000 (UTC) Received: by mail-yh0-f51.google.com with SMTP id f10so3434175yha.10 for ; Fri, 20 Jun 2014 17:50:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type; bh=9HTfddpbdCk6ejmDtENfHkQWuUH/JW56O+873H3gnk8=; b=YGJiZtLdTWX+5nOzpV3TJoswyRCy+vAWN5CVevZ+GDG8/o2URMDF5cW9VvHaO/6hLh k2+U2gz2Osi27Jygli3YnqhzUn28my4mzvAZIiChWLRdy6461Uf2Jkg87jzdJ5lFJel7 NoMekp1oFKzrEpwA/eYT5LYDj+0A+aGWXTww34X7yiEnPB5i1uGXkdIz6wJfOX4iae78 IaXfZa0d88+HpFXT8hU03mw1ImNHcALlzpbwjHmztvtyj2o2GsVX5BuXmB0KVtz89CgP xSipi55oqGa+BymCUUTcmIj/Y5ntUY32I+pDV4jFor9dqkR6WvkLmTovPQK6Sy/lDDsF A+zw== X-Received: by 10.236.220.34 with SMTP id n32mr10531287yhp.88.1403311848500; Fri, 20 Jun 2014 17:50:48 -0700 (PDT) Received: from zhabar.att.net (107-222-186-3.lightspeed.sntcca.sbcglobal.net. [107.222.186.3]) by mx.google.com with ESMTPSA id m50sm17214930yha.8.2014.06.20.17.50.47 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Fri, 20 Jun 2014 17:50:48 -0700 (PDT) Date: Fri, 20 Jun 2014 17:50:34 -0700 From: Justin Hibbits To: Glen Barber Subject: Re: svn commit: r267684 - in stable/9: . usr.sbin Message-ID: <20140620175034.1ed119db@zhabar.att.net> In-Reply-To: <20140621003400.GJ1218@hub.FreeBSD.org> References: <201406201807.s5KI755X045471@svn.freebsd.org> <20140621003400.GJ1218@hub.FreeBSD.org> X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.22; powerpc64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/LP//cnSJHGIgXnPSJNqVU.g"; protocol="application/pgp-signature" Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Devin Teske , src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jun 2014 00:50:50 -0000 --Sig_/LP//cnSJHGIgXnPSJNqVU.g Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Fri, 20 Jun 2014 20:34:00 -0400 Glen Barber wrote: > On Fri, Jun 20, 2014 at 06:07:05PM +0000, Devin Teske wrote: > > Author: dteske > > Date: Fri Jun 20 18:07:04 2014 > > New Revision: 267684 > > URL: http://svnweb.freebsd.org/changeset/base/267684 > >=20 > > Log: > > Add missing mergeinfo for 267683. > >=20 > > Modified: > > Directory Properties: > > stable/9/ (props changed) > > stable/9/usr.sbin/ (props changed) >=20 > This looks wrong. Why is there mergeinfo to the root of the branch? >=20 > Glen >=20 I think that may be my doing in part. I MFC'd something a couple months back, forgetting about the differences between 10 and older. - Justin --Sig_/LP//cnSJHGIgXnPSJNqVU.g Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJTpNbkAAoJEDDHhY43vi25Z10H/2G5hibWfp7OgeM7tiSloZ3w Fx89pufYBVBFerplQ15pWXIXQnfv8YRW0K3OMIIQ5pGp7wNvIWGKkQuz7Lem4m+S kCxD2XX7fiGv7t/3Zi7pxA5ervtUNQhZ7zbDNH10JQnbHA377EdnZ3FuhJZnkqkO 160COpl5DwjDDqPAg1jYavonwj41nRgiPFIjyLw8cy/B5SSv4xfKiY/UH/eTMaMg z8LViwd/hf19EiLCvOtOzfUSj+HPEMRijNiR9zHd691uH5ZjXp3mEBJpn6sH6iI4 Kz2YdzL3de4qmVBQlgj4UzCLsjlgxkkFm1+GefJ2d2/y2sa/nQESylJAeNsIJmc= =5mVH -----END PGP SIGNATURE----- --Sig_/LP//cnSJHGIgXnPSJNqVU.g-- From owner-svn-src-stable@FreeBSD.ORG Sat Jun 21 01:00:22 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from hub.FreeBSD.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89E56339; Sat, 21 Jun 2014 01:00:21 +0000 (UTC) Date: Fri, 20 Jun 2014 21:00:18 -0400 From: Glen Barber To: Justin Hibbits Subject: Re: svn commit: r267684 - in stable/9: . usr.sbin Message-ID: <20140621010018.GL1218@hub.FreeBSD.org> References: <201406201807.s5KI755X045471@svn.freebsd.org> <20140621003400.GJ1218@hub.FreeBSD.org> <20140620175034.1ed119db@zhabar.att.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Og24Z7r1sh+tVSZX" Content-Disposition: inline In-Reply-To: <20140620175034.1ed119db@zhabar.att.net> X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Devin Teske , src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jun 2014 01:00:22 -0000 --Og24Z7r1sh+tVSZX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 20, 2014 at 05:50:34PM -0700, Justin Hibbits wrote: > On Fri, 20 Jun 2014 20:34:00 -0400 > Glen Barber wrote: >=20 > > On Fri, Jun 20, 2014 at 06:07:05PM +0000, Devin Teske wrote: > > > Author: dteske > > > Date: Fri Jun 20 18:07:04 2014 > > > New Revision: 267684 > > > URL: http://svnweb.freebsd.org/changeset/base/267684 > > >=20 > > > Log: > > > Add missing mergeinfo for 267683. > > >=20 > > > Modified: > > > Directory Properties: > > > stable/9/ (props changed) > > > stable/9/usr.sbin/ (props changed) > >=20 > > This looks wrong. Why is there mergeinfo to the root of the branch? > >=20 > > Glen > >=20 >=20 > I think that may be my doing in part. I MFC'd something a couple months > back, forgetting about the differences between 10 and older. >=20 No, he explicitly merged to the root of stable/9, which is wrong, regardless of if you did similar. Glen --Og24Z7r1sh+tVSZX Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJTpNkiAAoJELls3eqvi17QGg0QAJgmJyEwN3iY7kqq2f9DZmYn E0lzEON6R0JnW0/UBAM0vTiT9B+jvjWoT1tzkcbqc3PxRXviflaEJKxwYAjCKuKp TztiVd6pcB8ad/2Jhb5M6k/nGlC/y31B93dIPf+LY3Ir3Zy8ODH0jD+YkkKFnIBF 5ZFfH253q60gCcR7pNRkBOkydLDZFrjw4gVLuYrQ0JmbojP/5D0fOIFZeSgjlxvL LXDrVnFQCdgGW2sbewKGPsAQVN4RskKagUK6xnPm9AA1Nq3SeUj58VqxoXyrFoDc SWHyRcOuMVzOFTf0ZdUwn9KcHoTsbBjuakfP7KhIfSxuqwBCvpvGQYS8h8xsSGd9 AsyMG/XZHodk5EiluO4PHDda/NLPXLI7DNnsGC3qYxltncwCcn/PzH/97LFlH3Du KgDveEwsqYyIJsIYQ8dsdarnIJCG5Aja4Ea1iL5SqXzh0YbH5u8Qi+gWw5vWY/7d 0mDHoXSOLSNHYF/EAQGz54BbfaQaxpng4210s+IlTWjRSPHH1T5tF3D2I2MUX+Dg W1SI7EL0Rg7LZrlnggGKryAoF6+vTm0lFNqcTbe/srbeuPbWaaUXLpXUeCimtVwO oUDa9AqQM0jRtwsUyTzM33nEH8H+upPJ0fwhBgyGyF3wkObQFMlxaf311FP68qxr 3dO8GRU5rAcl3+a7dy9V =Yzd4 -----END PGP SIGNATURE----- --Og24Z7r1sh+tVSZX-- From owner-svn-src-stable@FreeBSD.ORG Sat Jun 21 01:21:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ADB94B2E; Sat, 21 Jun 2014 01:21:36 +0000 (UTC) Received: from shxd.cx (unknown [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96B222EF3; Sat, 21 Jun 2014 01:21:36 +0000 (UTC) Received: from [50.204.88.51] (port=26875 helo=THEMADHATTER) by shxd.cx with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1Wy5Qy-0009S9-L8; Fri, 20 Jun 2014 13:29:16 -0700 From: To: "'Glen Barber'" , "'Devin Teske'" References: <201406201807.s5KI755X045471@svn.freebsd.org> <20140621003400.GJ1218@hub.FreeBSD.org> In-Reply-To: <20140621003400.GJ1218@hub.FreeBSD.org> Subject: RE: svn commit: r267684 - in stable/9: . usr.sbin Date: Fri, 20 Jun 2014 18:21:32 -0700 Message-ID: <01b801cf8cef$2332d500$69987f00$@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQErAWbqM8rUJx5hZJygkY9nwuIKKwJGzp4anLGjFtA= Content-Language: en-us Sender: devin@shxd.cx Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jun 2014 01:21:36 -0000 Because we've been told to only ever merge things to the root of a stable branch. I made the mistake of doing the merge in the usr.sbin/bsdconfig sub-directory (because I had not made a commit in a while). This commit was just to add the missing mergeinfo to the TLDs. In other words,... I had earlier today done: cd stable/9/usr.sbin/bsdconfig svn mergeinfo --show-revs=eligible ^/head/usr.sbin/bsdconfig | dview - svn merge -cr... ^/head/usr.sbin/bsdconfig # repeat the above 2 steps until I've merged all the things for pkgng integration cd ../../../../head/usr.sbin/bsdconfig svn up cd ../../../ diff -rpuNI\$FreeBSD head/usr.sbin/bsdconfig stable/9/usr.sbin/bsdconfig # Fix a few things that got regressed due to the fact that some of the patches # I merged were out of sync (because the pkgng patches were passed-over # in the first round of MFC's leading up to release cycle) cd stable/9/usr.sbin/bsdconfig svn diff -x -p | dview - # Confirm each/every hunk as being proper and correct cd ../../../../ diff -rpuNI\$FreeBSD {head,stable/9}/usr.sbin/bsdconfig | dview - # Make sure we're converging branches satisfactorily cd stable/9/usr.sbin/bsdconfig svn diff -x -p | dview - # Last and final check (in my triple-check procedure) svn ci And where that went wrong was, that I should have been in stable/9 when I was doing "svn merge -cr...". So all this commit is doing is getting the mergeinfo recorded to stable/9 and stable/9/usr.sbin -- Devin > -----Original Message----- > From: Glen Barber [mailto:gjb@FreeBSD.org] > Sent: Friday, June 20, 2014 5:34 PM > To: Devin Teske > Cc: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src- > stable@freebsd.org; svn-src-stable-9@freebsd.org > Subject: Re: svn commit: r267684 - in stable/9: . usr.sbin > > On Fri, Jun 20, 2014 at 06:07:05PM +0000, Devin Teske wrote: > > Author: dteske > > Date: Fri Jun 20 18:07:04 2014 > > New Revision: 267684 > > URL: http://svnweb.freebsd.org/changeset/base/267684 > > > > Log: > > Add missing mergeinfo for 267683. > > > > Modified: > > Directory Properties: > > stable/9/ (props changed) > > stable/9/usr.sbin/ (props changed) > > This looks wrong. Why is there mergeinfo to the root of the branch? > > Glen From owner-svn-src-stable@FreeBSD.ORG Sat Jun 21 01:25:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from hub.FreeBSD.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8213ECBF; Sat, 21 Jun 2014 01:25:51 +0000 (UTC) Date: Fri, 20 Jun 2014 21:25:47 -0400 From: Glen Barber To: dteske@FreeBSD.org Subject: Re: svn commit: r267684 - in stable/9: . usr.sbin Message-ID: <20140621012547.GO1218@hub.FreeBSD.org> References: <201406201807.s5KI755X045471@svn.freebsd.org> <20140621003400.GJ1218@hub.FreeBSD.org> <01b801cf8cef$2332d500$69987f00$@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="uIq33vy618f2J7at" Content-Disposition: inline In-Reply-To: <01b801cf8cef$2332d500$69987f00$@FreeBSD.org> X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jun 2014 01:25:52 -0000 --uIq33vy618f2J7at Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 20, 2014 at 06:21:32PM -0700, Devin Teske wrote: > Because we've been told to only ever merge things to the > root of a stable branch. >=20 Only for stable/10 and later. The stable/9 branch and earlier are merged the "old way." Glen --uIq33vy618f2J7at Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJTpN8bAAoJELls3eqvi17QZuwP/0Rg3QQehGYQ3TQA5enICqFo JI0rs5h1t8FZCwVqLylx8vYibpjokB4+flYmLVihB5JmGPefuG7QhOMkwGPPY+vI oFXxnvArFAVA5RZP30bbu4XTGtRHixEQE8Lrdg42fBbws0k4SSbE2SDuxzccPuVf XvzhS1GxGloRfbuKikSyvhh+FJtoEtGfRw7jlEUNc56sXe0b0NzD/9IT+IAh2rE9 29QmLBi+FjJ8aEIqOY0P5lguPPmSvNPlKLXU4eMKGTIA9n1eLoYpeXvtdbcs7OT8 ko7IG9Tv+61ysuTunMZLRJAq3xW56aI56suP/ggBR37yzsM1ZoVsR38xb0duFujf TCr0455ZNmMcC02q+Fr7MXuM6WAyx0HfWvkzRLIFtXrXk77RTN7pJHmamL8yCfZ5 vk5lr68xblU87SQEhO7FwvldXGR7UA+WRDlc5Yy4v8MlIYLA0CkwaNERQTOrd8RS a6r+oDKBB79F5zcWXpz7UnFflSulXbesVx4/kxEqvtMnGOX/CtjfSYBDyUUMK/be WKPbto0zKY9VWAdZlicMi3oVFWu7Jsy7OxgCtv/XM9DpfkBnqpupAuJzOeIVSmfF LhYJZvtmBV98wWIy/OPtbmzrfcNG4Dd3d0CZ9fNl3mK0WJWTPLvS+Onze5Hcu4X3 9z9EYY7/AcpwCXwjN0d0 =Hom4 -----END PGP SIGNATURE----- --uIq33vy618f2J7at-- From owner-svn-src-stable@FreeBSD.ORG Sat Jun 21 01:47:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E285131B; Sat, 21 Jun 2014 01:47:31 +0000 (UTC) Received: from shxd.cx (unknown [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CAC6E20A1; Sat, 21 Jun 2014 01:47:31 +0000 (UTC) Received: from [50.204.88.51] (port=9353 helo=THEMADHATTER) by shxd.cx with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1Wy5q3-0009dl-Re; Fri, 20 Jun 2014 13:55:11 -0700 From: To: "'Glen Barber'" , References: <201406201807.s5KI755X045471@svn.freebsd.org> <20140621003400.GJ1218@hub.FreeBSD.org> <01b801cf8cef$2332d500$69987f00$@FreeBSD.org> <20140621012547.GO1218@hub.FreeBSD.org> In-Reply-To: <20140621012547.GO1218@hub.FreeBSD.org> Subject: RE: svn commit: r267684 - in stable/9: . usr.sbin Date: Fri, 20 Jun 2014 18:47:28 -0700 Message-ID: <01f101cf8cf2$c22877c0$46796740$@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQErAWbqM8rUJx5hZJygkY9nwuIKKwJGzp4aAagaxDUBeACezZyYq0Ew Content-Language: en-us Sender: devin@shxd.cx Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jun 2014 01:47:32 -0000 > -----Original Message----- > From: owner-src-committers@freebsd.org [mailto:owner-src- > committers@freebsd.org] On Behalf Of Glen Barber > Sent: Friday, June 20, 2014 6:26 PM > To: dteske@FreeBSD.org > Cc: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src- > stable@freebsd.org; svn-src-stable-9@freebsd.org > Subject: Re: svn commit: r267684 - in stable/9: . usr.sbin > > On Fri, Jun 20, 2014 at 06:21:32PM -0700, Devin Teske wrote: > > Because we've been told to only ever merge things to the root of a > > stable branch. > > > > Only for stable/10 and later. The stable/9 branch and earlier are merged the > "old way." > Crap. Sorry 'bout that then. So many different scenarios ;( -- Devin From owner-svn-src-stable@FreeBSD.ORG Sat Jun 21 01:48:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C2F8145E; Sat, 21 Jun 2014 01:48:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2F2D20A8; Sat, 21 Jun 2014 01:48:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5L1mkEL063024; Sat, 21 Jun 2014 01:48:46 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5L1mk3Z063021; Sat, 21 Jun 2014 01:48:46 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201406210148.s5L1mk3Z063021@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sat, 21 Jun 2014 01:48:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267701 - stable/10/usr.bin/patch X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jun 2014 01:48:47 -0000 Author: pfg Date: Sat Jun 21 01:48:45 2014 New Revision: 267701 URL: http://svnweb.freebsd.org/changeset/base/267701 Log: MFC r267426, r267464: Avoid zeroing during allocation. This change reverts a change from OpenBSD which made use of calloc, and therefore wasted time initializing arrays that will later be realloc'ed. Consistently use FreeBSD's reallocf(): - Drop some bogus casts to size_t. - The new_p_foo variables are not needed anymore. Also merge the changes from OpenBSD's manpage patch.1 Rev 1.27: "patch was moved from user portability (UP) to base in issue 7 and is no longer optional" Modified: stable/10/usr.bin/patch/patch.1 stable/10/usr.bin/patch/pch.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/patch/patch.1 ============================================================================== --- stable/10/usr.bin/patch/patch.1 Sat Jun 21 01:43:56 2014 (r267700) +++ stable/10/usr.bin/patch/patch.1 Sat Jun 21 01:48:45 2014 (r267701) @@ -19,9 +19,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: patch.1,v 1.26 2010/09/03 11:09:29 jmc Exp $ +.\" $OpenBSD: patch.1,v 1.27 2014/04/15 06:26:54 jmc Exp $ .\" $FreeBSD$ -.Dd January 29, 2013 +.Dd June 12, 2014 .Dt PATCH 1 .Os .Sh NAME @@ -639,13 +639,10 @@ The .Nm utility is compliant with the .St -p1003.1-2008 -specification -(except as detailed above for the +specification, +except as detailed above for the .Fl -posix -option), -though the presence of -.Nm -itself is optional. +option. .Pp The flags .Op Fl BCEFfstVvxz Modified: stable/10/usr.bin/patch/pch.c ============================================================================== --- stable/10/usr.bin/patch/pch.c Sat Jun 21 01:43:56 2014 (r267700) +++ stable/10/usr.bin/patch/pch.c Sat Jun 21 01:48:45 2014 (r267701) @@ -132,11 +132,11 @@ void set_hunkmax(void) { if (p_line == NULL) - p_line = calloc((size_t) hunkmax, sizeof(char *)); + p_line = malloc(hunkmax * sizeof(char *)); if (p_len == NULL) - p_len = calloc((size_t) hunkmax, sizeof(short)); + p_len = malloc(hunkmax * sizeof(short)); if (p_char == NULL) - p_char = calloc((size_t) hunkmax, sizeof(char)); + p_char = malloc(hunkmax * sizeof(char)); } /* @@ -145,31 +145,14 @@ set_hunkmax(void) static void grow_hunkmax(void) { - int new_hunkmax; - char **new_p_line; - short *new_p_len; - char *new_p_char; - - new_hunkmax = hunkmax * 2; + int new_hunkmax = hunkmax * 2; if (p_line == NULL || p_len == NULL || p_char == NULL) fatal("Internal memory allocation error\n"); - new_p_line = realloc(p_line, new_hunkmax * sizeof(char *)); - if (new_p_line == NULL) - free(p_line); - - new_p_len = realloc(p_len, new_hunkmax * sizeof(short)); - if (new_p_len == NULL) - free(p_len); - - new_p_char = realloc(p_char, new_hunkmax * sizeof(char)); - if (new_p_char == NULL) - free(p_char); - - p_char = new_p_char; - p_len = new_p_len; - p_line = new_p_line; + p_line = reallocf(p_line, new_hunkmax * sizeof(char *)); + p_len = reallocf(p_len, new_hunkmax * sizeof(short)); + p_char = reallocf(p_char, new_hunkmax * sizeof(char)); if (p_line != NULL && p_len != NULL && p_char != NULL) { hunkmax = new_hunkmax; From owner-svn-src-stable@FreeBSD.ORG Sat Jun 21 02:24:35 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF4F2A19; Sat, 21 Jun 2014 02:24:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1CBE2359; Sat, 21 Jun 2014 02:24:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5L2OZRX080945; Sat, 21 Jun 2014 02:24:35 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5L2OZ0w080944; Sat, 21 Jun 2014 02:24:35 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406210224.s5L2OZ0w080944@svn.freebsd.org> From: Glen Barber Date: Sat, 21 Jun 2014 02:24:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267702 - in stable/9: . usr.sbin X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jun 2014 02:24:36 -0000 Author: gjb Date: Sat Jun 21 02:24:35 2014 New Revision: 267702 URL: http://svnweb.freebsd.org/changeset/base/267702 Log: Remove bogus mergeinfo introduced in r267684. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Sat Jun 21 02:25:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from hub.FreeBSD.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23D3FBDC; Sat, 21 Jun 2014 02:25:37 +0000 (UTC) Date: Fri, 20 Jun 2014 22:25:33 -0400 From: Glen Barber To: dteske@FreeBSD.org Subject: Re: svn commit: r267684 - in stable/9: . usr.sbin Message-ID: <20140621022533.GR1218@hub.FreeBSD.org> References: <201406201807.s5KI755X045471@svn.freebsd.org> <20140621003400.GJ1218@hub.FreeBSD.org> <01b801cf8cef$2332d500$69987f00$@FreeBSD.org> <20140621012547.GO1218@hub.FreeBSD.org> <01f101cf8cf2$c22877c0$46796740$@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ISCXPd1dR6/8kjof" Content-Disposition: inline In-Reply-To: <01f101cf8cf2$c22877c0$46796740$@FreeBSD.org> X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jun 2014 02:25:38 -0000 --ISCXPd1dR6/8kjof Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 20, 2014 at 06:47:28PM -0700, Devin Teske wrote: >=20 > > On Fri, Jun 20, 2014 at 06:21:32PM -0700, Devin Teske wrote: > > > Because we've been told to only ever merge things to the root of a > > > stable branch. > > > > >=20 > > Only for stable/10 and later. The stable/9 branch and earlier are merg= ed > the > > "old way." > >=20 >=20 > Crap. Sorry 'bout that then. So many different scenarios ;( I've reverted the bogus mergeinfo in r267702. Glen --ISCXPd1dR6/8kjof Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJTpO0dAAoJELls3eqvi17QlMYP/2grEFL2fOQVky3KJeBtIoE9 8k7pzcdG/DV7tkh+rZglLxcTOOn2uaUK5GACpoX9t0ZRZA62jGAMo3HARbSVUVHb AS4gAcNMbAVioT489YtlFeBkqQvVT2OttcJnJoGqzTea1Qqqt3dT/6xb8qkuMkOb Ano1OI6hzl5nKFjGwo8R59FTMC7cxPIDKhVfJHWhapSHtf/EJLAa8C4L1jgX5h3o 0eoVIdSfG+GiyVxeFXDMnMgdBTFPBt2gnvY2f4S8R3+GSuPlIyJPDW9lL5uh0xkx JJJU+oZrVDdfEx+bXfRp5fb2/VlEDFizgFNWCWpTvrSt39lDKHBN+htI/y/tH1Aa x48WvmugxZSXvCOcY9aWbD7+FIhp5qOKqtlAlUFVGGhYyLEvOKNGIXuLCNQt2oC8 JiiNxUZqGzx41PqXjAMDxaYcGrtOGwKuLr6svEl5CEHXz3YRhMs3sikbR2skhLii 4XQOzgUNBdY9zjuwcfZYr8HV4UgdIUEPosVWBI+54CR0Yp7IlvIeAJgb0Jd7GptN lOhYZjzevGOOxdLqAw47Bpm29Rr2T3xNlJwYseHm48fQC9ylGvtr+U566NOTKrQ3 81/VHU8t5X4MATBcJD7AT0T8xyHIiJsF+Gto5pLGEwaLiBgTrjMMJKIZTYWMPJK5 1I61CCmpnKl8uC+RGFt0 =qGXI -----END PGP SIGNATURE----- --ISCXPd1dR6/8kjof-- From owner-svn-src-stable@FreeBSD.ORG Sat Jun 21 02:26:21 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4AC0D27; Sat, 21 Jun 2014 02:26:21 +0000 (UTC) Received: from shxd.cx (unknown [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 90C8D2375; Sat, 21 Jun 2014 02:26:21 +0000 (UTC) Received: from [50.204.88.51] (port=4664 helo=THEMADHATTER) by shxd.cx with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1Wy6Rd-0009t4-9U; Fri, 20 Jun 2014 14:34:01 -0700 From: To: "'Glen Barber'" , References: <201406201807.s5KI755X045471@svn.freebsd.org> <20140621003400.GJ1218@hub.FreeBSD.org> <01b801cf8cef$2332d500$69987f00$@FreeBSD.org> <20140621012547.GO1218@hub.FreeBSD.org> <01f101cf8cf2$c22877c0$46796740$@FreeBSD.org> <20140621022533.GR1218@hub.FreeBSD.org> In-Reply-To: <20140621022533.GR1218@hub.FreeBSD.org> Subject: RE: svn commit: r267684 - in stable/9: . usr.sbin Date: Fri, 20 Jun 2014 19:26:14 -0700 Message-ID: <020901cf8cf8$2e95a1d0$8bc0e570$@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQErAWbqM8rUJx5hZJygkY9nwuIKKwJGzp4aAagaxDUBeACezQKKChlrAZyTqracd4E3YA== Content-Language: en-us Sender: devin@shxd.cx Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jun 2014 02:26:21 -0000 > -----Original Message----- > From: owner-src-committers@freebsd.org [mailto:owner-src- > committers@freebsd.org] On Behalf Of Glen Barber > Sent: Friday, June 20, 2014 7:26 PM > To: dteske@FreeBSD.org > Cc: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src- > stable@freebsd.org; svn-src-stable-9@freebsd.org > Subject: Re: svn commit: r267684 - in stable/9: . usr.sbin > > On Fri, Jun 20, 2014 at 06:47:28PM -0700, Devin Teske wrote: > > > > > On Fri, Jun 20, 2014 at 06:21:32PM -0700, Devin Teske wrote: > > > > Because we've been told to only ever merge things to the root of a > > > > stable branch. > > > > > > > > > > Only for stable/10 and later. The stable/9 branch and earlier are > > > merged > > the > > > "old way." > > > > > > > Crap. Sorry 'bout that then. So many different scenarios ;( > > I've reverted the bogus mergeinfo in r267702. > Much thanks. -- Cheers, Devin From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 08:30:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62AE1EB5; Sun, 22 Jun 2014 08:30:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ECCF20A8; Sun, 22 Jun 2014 08:30:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5M8UikS009556; Sun, 22 Jun 2014 08:30:44 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5M8Ui6j009555; Sun, 22 Jun 2014 08:30:44 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201406220830.s5M8Ui6j009555@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 22 Jun 2014 08:30:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267713 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 08:30:44 -0000 Author: kib Date: Sun Jun 22 08:30:43 2014 New Revision: 267713 URL: http://svnweb.freebsd.org/changeset/base/267713 Log: MFC r267255: Change the nblock mutex to rwlock. MFC r267264: Devolatile as needed. Modified: stable/10/sys/kern/vfs_bio.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/vfs_bio.c ============================================================================== --- stable/10/sys/kern/vfs_bio.c Sun Jun 22 06:54:36 2014 (r267712) +++ stable/10/sys/kern/vfs_bio.c Sun Jun 22 08:30:43 2014 (r267713) @@ -251,7 +251,7 @@ static struct mtx_padalign rbreqlock; /* * Lock that protects needsbuffer and the sleeps/wakeups surrounding it. */ -static struct mtx_padalign nblock; +static struct rwlock_padalign nblock; /* * Lock that protects bdirtywait. @@ -296,7 +296,7 @@ static int runningbufreq; * Used in numdirtywakeup(), bufspacewakeup(), bufcountadd(), bwillwrite(), * getnewbuf(), and getblk(). */ -static int needsbuffer; +static volatile int needsbuffer; /* * Synchronization for bwillwrite() waiters. @@ -426,18 +426,27 @@ bdirtyadd(void) static __inline void bufspacewakeup(void) { + int need_wakeup, on; /* * If someone is waiting for BUF space, wake them up. Even * though we haven't freed the kva space yet, the waiting * process will be able to now. */ - mtx_lock(&nblock); - if (needsbuffer & VFS_BIO_NEED_BUFSPACE) { - needsbuffer &= ~VFS_BIO_NEED_BUFSPACE; - wakeup(&needsbuffer); + rw_rlock(&nblock); + for (;;) { + need_wakeup = 0; + on = needsbuffer; + if ((on & VFS_BIO_NEED_BUFSPACE) == 0) + break; + need_wakeup = 1; + if (atomic_cmpset_rel_int(&needsbuffer, on, + on & ~VFS_BIO_NEED_BUFSPACE)) + break; } - mtx_unlock(&nblock); + if (need_wakeup) + wakeup(__DEVOLATILE(void *, &needsbuffer)); + rw_runlock(&nblock); } /* @@ -497,7 +506,7 @@ runningbufwakeup(struct buf *bp) static __inline void bufcountadd(struct buf *bp) { - int old; + int mask, need_wakeup, old, on; KASSERT((bp->b_flags & B_INFREECNT) == 0, ("buf %p already counted as free", bp)); @@ -505,14 +514,22 @@ bufcountadd(struct buf *bp) old = atomic_fetchadd_int(&numfreebuffers, 1); KASSERT(old >= 0 && old < nbuf, ("numfreebuffers climbed to %d", old + 1)); - mtx_lock(&nblock); - if (needsbuffer) { - needsbuffer &= ~VFS_BIO_NEED_ANY; - if (numfreebuffers >= hifreebuffers) - needsbuffer &= ~VFS_BIO_NEED_FREE; - wakeup(&needsbuffer); + mask = VFS_BIO_NEED_ANY; + if (numfreebuffers >= hifreebuffers) + mask |= VFS_BIO_NEED_FREE; + rw_rlock(&nblock); + for (;;) { + need_wakeup = 0; + on = needsbuffer; + if (on == 0) + break; + need_wakeup = 1; + if (atomic_cmpset_rel_int(&needsbuffer, on, on & ~mask)) + break; } - mtx_unlock(&nblock); + if (need_wakeup) + wakeup(__DEVOLATILE(void *, &needsbuffer)); + rw_runlock(&nblock); } /* @@ -756,7 +773,7 @@ bufinit(void) mtx_init(&bqclean, "bufq clean lock", NULL, MTX_DEF); mtx_init(&bqdirty, "bufq dirty lock", NULL, MTX_DEF); mtx_init(&rbreqlock, "runningbufspace lock", NULL, MTX_DEF); - mtx_init(&nblock, "needsbuffer lock", NULL, MTX_DEF); + rw_init(&nblock, "needsbuffer lock"); mtx_init(&bdlock, "buffer daemon lock", NULL, MTX_DEF); mtx_init(&bdirtylock, "dirty buf lock", NULL, MTX_DEF); @@ -2054,9 +2071,7 @@ getnewbuf_bufd_help(struct vnode *vp, in waitmsg = "newbuf"; flags = VFS_BIO_NEED_ANY; } - mtx_lock(&nblock); - needsbuffer |= flags; - mtx_unlock(&nblock); + atomic_set_int(&needsbuffer, flags); mtx_unlock(&bqclean); bd_speedup(); /* heeeelp */ @@ -2066,12 +2081,11 @@ getnewbuf_bufd_help(struct vnode *vp, in td = curthread; cnt = 0; wait = MNT_NOWAIT; - mtx_lock(&nblock); - while (needsbuffer & flags) { + rw_wlock(&nblock); + while ((needsbuffer & flags) != 0) { if (vp != NULL && vp->v_type != VCHR && (td->td_pflags & TDP_BUFNEED) == 0) { - mtx_unlock(&nblock); - + rw_wunlock(&nblock); /* * getblk() is called with a vnode locked, and * some majority of the dirty buffers may as @@ -2093,15 +2107,16 @@ getnewbuf_bufd_help(struct vnode *vp, in atomic_add_long(¬bufdflushes, 1); curthread_pflags_restore(norunbuf); } - mtx_lock(&nblock); + rw_wlock(&nblock); if ((needsbuffer & flags) == 0) break; } - if (msleep(&needsbuffer, &nblock, (PRIBIO + 4) | slpflag, - waitmsg, slptimeo)) + error = rw_sleep(__DEVOLATILE(void *, &needsbuffer), &nblock, + (PRIBIO + 4) | slpflag, waitmsg, slptimeo); + if (error != 0) break; } - mtx_unlock(&nblock); + rw_wunlock(&nblock); } static void From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 08:32:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35CF3FEA; Sun, 22 Jun 2014 08:32:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08C67211E; Sun, 22 Jun 2014 08:32:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5M8WVAw012039; Sun, 22 Jun 2014 08:32:31 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5M8WV4k012038; Sun, 22 Jun 2014 08:32:31 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201406220832.s5M8WV4k012038@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 22 Jun 2014 08:32:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267714 - stable/10/sys/i386/i386 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 08:32:32 -0000 Author: kib Date: Sun Jun 22 08:32:31 2014 New Revision: 267714 URL: http://svnweb.freebsd.org/changeset/base/267714 Log: MFC r267492: Fix some cosmetic issues with the use of kmem_malloc() in the i386 LDT sysarch(2) code. Modified: stable/10/sys/i386/i386/sys_machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/i386/i386/sys_machdep.c ============================================================================== --- stable/10/sys/i386/i386/sys_machdep.c Sun Jun 22 08:30:43 2014 (r267713) +++ stable/10/sys/i386/i386/sys_machdep.c Sun Jun 22 08:32:31 2014 (r267714) @@ -164,19 +164,14 @@ sysarch(td, uap) break; case I386_SET_LDT: if (kargs.largs.descs != NULL) { - lp = (union descriptor *)kmem_malloc(kernel_arena, + lp = (union descriptor *)malloc( kargs.largs.num * sizeof(union descriptor), - M_WAITOK); - if (lp == NULL) { - error = ENOMEM; - break; - } + M_TEMP, M_WAITOK); error = copyin(kargs.largs.descs, lp, kargs.largs.num * sizeof(union descriptor)); if (error == 0) error = i386_set_ldt(td, &kargs.largs, lp); - kmem_free(kernel_arena, (vm_offset_t)lp, - kargs.largs.num * sizeof(union descriptor)); + free(lp, M_TEMP); } else { error = i386_set_ldt(td, &kargs.largs, NULL); } @@ -300,10 +295,7 @@ i386_extend_pcb(struct thread *td) }; ext = (struct pcb_ext *)kmem_malloc(kernel_arena, ctob(IOPAGES+1), - M_WAITOK); - if (ext == 0) - return (ENOMEM); - bzero(ext, sizeof(struct pcb_ext)); + M_WAITOK | M_ZERO); /* -16 is so we can convert a trapframe into vm86trapframe inplace */ ext->ext_tss.tss_esp0 = td->td_kstack + ctob(KSTACK_PAGES) - sizeof(struct pcb) - 16; @@ -474,12 +466,7 @@ user_ldt_alloc(struct mdproc *mdp, int l new_ldt->ldt_len = len = NEW_MAX_LD(len); new_ldt->ldt_base = (caddr_t)kmem_malloc(kernel_arena, - round_page(len * sizeof(union descriptor)), M_WAITOK); - if (new_ldt->ldt_base == NULL) { - free(new_ldt, M_SUBPROC); - mtx_lock_spin(&dt_lock); - return (NULL); - } + round_page(len * sizeof(union descriptor)), M_WAITOK); new_ldt->ldt_refcnt = 1; new_ldt->ldt_active = 0; @@ -514,12 +501,7 @@ user_ldt_alloc(struct mdproc *mdp, int l new_ldt->ldt_len = len = NEW_MAX_LD(len); new_ldt->ldt_base = (caddr_t)kmem_malloc(kernel_arena, - len * sizeof(union descriptor), M_WAITOK); - if (new_ldt->ldt_base == NULL) { - free(new_ldt, M_SUBPROC); - mtx_lock_spin(&dt_lock); - return (NULL); - } + len * sizeof(union descriptor), M_WAITOK); new_ldt->ldt_refcnt = 1; new_ldt->ldt_active = 0; From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 12:16:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC03C176; Sun, 22 Jun 2014 12:16:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C84CE20AC; Sun, 22 Jun 2014 12:16:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MCGRZB016862; Sun, 22 Jun 2014 12:16:27 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MCGR3h016861; Sun, 22 Jun 2014 12:16:27 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201406221216.s5MCGR3h016861@svn.freebsd.org> From: Michael Tuexen Date: Sun, 22 Jun 2014 12:16:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267717 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 12:16:28 -0000 Author: tuexen Date: Sun Jun 22 12:16:27 2014 New Revision: 267717 URL: http://svnweb.freebsd.org/changeset/base/267717 Log: MFC r267105: Use ENOBUFS instead of ENOMEM in error situations related to m_uiotombuf(). This was suggested by kevlo@. Modified: stable/9/sys/netinet/sctp_output.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_output.c ============================================================================== --- stable/9/sys/netinet/sctp_output.c Sun Jun 22 11:32:23 2014 (r267716) +++ stable/9/sys/netinet/sctp_output.c Sun Jun 22 12:16:27 2014 (r267717) @@ -11911,8 +11911,8 @@ sctp_copy_resume(struct uio *uio, m = m_uiotombuf(uio, M_WAITOK, max_send_len, 0, (M_PKTHDR | (user_marks_eor ? M_EOR : 0))); if (m == NULL) { - SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, ENOMEM); - *error = ENOMEM; + SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, ENOBUFS); + *error = ENOBUFS; } else { *sndout = m_length(m, NULL); *new_tail = m_last(m); @@ -11931,8 +11931,8 @@ sctp_copy_one(struct sctp_stream_queue_p sp->data = m_uiotombuf(uio, M_WAITOK, sp->length, resv_upfront, 0); if (sp->data == NULL) { - SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, ENOMEM); - return (ENOMEM); + SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, ENOBUFS); + return (ENOBUFS); } sp->tail_mbuf = m_last(sp->data); return (0); From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 12:18:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7392A2B9; Sun, 22 Jun 2014 12:18:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 600E720B9; Sun, 22 Jun 2014 12:18:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MCIgPv017238; Sun, 22 Jun 2014 12:18:42 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MCIga2017237; Sun, 22 Jun 2014 12:18:42 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201406221218.s5MCIga2017237@svn.freebsd.org> From: Michael Tuexen Date: Sun, 22 Jun 2014 12:18:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267718 - stable/9/sys/conf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 12:18:42 -0000 Author: tuexen Date: Sun Jun 22 12:18:41 2014 New Revision: 267718 URL: http://svnweb.freebsd.org/changeset/base/267718 Log: MFC r267329: Add support for the SCTP_LOCAL_TRACE_BUF options. While there, fix some whitespaces. Modified: stable/9/sys/conf/options Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) Modified: stable/9/sys/conf/options ============================================================================== --- stable/9/sys/conf/options Sun Jun 22 12:16:27 2014 (r267717) +++ stable/9/sys/conf/options Sun Jun 22 12:18:41 2014 (r267718) @@ -451,8 +451,9 @@ SCTP_MBCNT_LOGGING opt_sctp.h # Log to K SCTP_PACKET_LOGGING opt_sctp.h # Log to a packet buffer last N packets SCTP_LTRACE_CHUNKS opt_sctp.h # Log to KTR chunks processed SCTP_LTRACE_ERRORS opt_sctp.h # Log to KTR error returns. -SCTP_USE_PERCPU_STAT opt_sctp.h # Use per cpu stats. -SCTP_MCORE_INPUT opt_sctp.h # Have multiple input threads for input mbufs +SCTP_USE_PERCPU_STAT opt_sctp.h # Use per cpu stats. +SCTP_MCORE_INPUT opt_sctp.h # Have multiple input threads for input mbufs +SCTP_LOCAL_TRACE_BUF opt_sctp.h # Use tracebuffer exported via sysctl # # # From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 16:21:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BFE1A848; Sun, 22 Jun 2014 16:21:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93040220F; Sun, 22 Jun 2014 16:21:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MGLFJk034259; Sun, 22 Jun 2014 16:21:15 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MGLFJa034257; Sun, 22 Jun 2014 16:21:15 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201406221621.s5MGLFJa034257@svn.freebsd.org> From: Michael Tuexen Date: Sun, 22 Jun 2014 16:21:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267720 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 16:21:15 -0000 Author: tuexen Date: Sun Jun 22 16:21:14 2014 New Revision: 267720 URL: http://svnweb.freebsd.org/changeset/base/267720 Log: MFC r262252: Remove redundant code and fix a style error. Modified: stable/10/sys/netinet/sctp_input.c stable/10/sys/netinet/sctp_output.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_input.c ============================================================================== --- stable/10/sys/netinet/sctp_input.c Sun Jun 22 15:15:52 2014 (r267719) +++ stable/10/sys/netinet/sctp_input.c Sun Jun 22 16:21:14 2014 (r267720) @@ -439,7 +439,6 @@ sctp_process_init_ack(struct mbuf *m, in /* First verify that we have no illegal param's */ abort_flag = 0; - op_err = NULL; op_err = sctp_arethere_unrecognized_parameters(m, (offset + sizeof(struct sctp_init_chunk)), @@ -1553,8 +1552,7 @@ sctp_process_cookie_existing(struct mbuf return (NULL); } - switch SCTP_GET_STATE - (asoc) { + switch (SCTP_GET_STATE(asoc)) { case SCTP_STATE_COOKIE_WAIT: case SCTP_STATE_COOKIE_ECHOED: /* @@ -1644,7 +1642,7 @@ sctp_process_cookie_existing(struct mbuf * have simply lost the COOKIE-ACK */ break; - } /* end switch */ + } /* end switch */ sctp_stop_all_cookie_timers(stcb); /* * We ignore the return code here.. not sure if we should Modified: stable/10/sys/netinet/sctp_output.c ============================================================================== --- stable/10/sys/netinet/sctp_output.c Sun Jun 22 15:15:52 2014 (r267719) +++ stable/10/sys/netinet/sctp_output.c Sun Jun 22 16:21:14 2014 (r267720) @@ -3671,7 +3671,6 @@ sctp_add_cookie(struct mbuf *init, int i int sig_offset; uint16_t cookie_sz; - mret = NULL; mret = sctp_get_mbuf_for_msg((sizeof(struct sctp_state_cookie) + sizeof(struct sctp_paramhdr)), 0, M_NOWAIT, 1, MT_DATA); @@ -8960,7 +8959,6 @@ sctp_send_cookie_ack(struct sctp_tcb *st struct sctp_chunkhdr *hdr; struct sctp_tmit_chunk *chk; - cookie_ack = NULL; SCTP_TCB_LOCK_ASSERT(stcb); cookie_ack = sctp_get_mbuf_for_msg(sizeof(struct sctp_chunkhdr), 0, M_NOWAIT, 1, MT_HEADER); From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 16:22:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A725B9BD; Sun, 22 Jun 2014 16:22:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9423C222D; Sun, 22 Jun 2014 16:22:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MGMitw034565; Sun, 22 Jun 2014 16:22:44 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MGMitR034564; Sun, 22 Jun 2014 16:22:44 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201406221622.s5MGMitR034564@svn.freebsd.org> From: Michael Tuexen Date: Sun, 22 Jun 2014 16:22:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267721 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 16:22:44 -0000 Author: tuexen Date: Sun Jun 22 16:22:44 2014 New Revision: 267721 URL: http://svnweb.freebsd.org/changeset/base/267721 Log: MFC r263094: SCTP uses CRC32C and not Adler anymore. While there change the reference to RFC 4960. This does not change any code, just comments. Modified: stable/10/sys/netinet/sctp.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp.h ============================================================================== --- stable/10/sys/netinet/sctp.h Sun Jun 22 16:21:14 2014 (r267720) +++ stable/10/sys/netinet/sctp.h Sun Jun 22 16:22:44 2014 (r267721) @@ -43,13 +43,13 @@ __FBSDID("$FreeBSD$"); #define SCTP_PACKED __attribute__((packed)) /* - * SCTP protocol - RFC2960. + * SCTP protocol - RFC4960. */ struct sctphdr { uint16_t src_port; /* source port */ uint16_t dest_port; /* destination port */ uint32_t v_tag; /* verification tag of packet */ - uint32_t checksum; /* Adler32 C-Sum */ + uint32_t checksum; /* CRC32C checksum */ /* chunks follow... */ } SCTP_PACKED; From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 16:26:17 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8DA26AF9; Sun, 22 Jun 2014 16:26:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60CE7223A; Sun, 22 Jun 2014 16:26:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MGQHJ8035103; Sun, 22 Jun 2014 16:26:17 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MGQH4v035102; Sun, 22 Jun 2014 16:26:17 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201406221626.s5MGQH4v035102@svn.freebsd.org> From: Michael Tuexen Date: Sun, 22 Jun 2014 16:26:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267722 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 16:26:17 -0000 Author: tuexen Date: Sun Jun 22 16:26:16 2014 New Revision: 267722 URL: http://svnweb.freebsd.org/changeset/base/267722 Log: MFC r263096: Put the offset of the CRC32C in csum_data instead of 0. The virtio driver needs the offset to be stored in csum_data, like in the case for UDP and TCP. The virtio problem was reported by Niu Zhixiong , who helped in debugging and testing the patch. Modified: stable/10/sys/netinet/sctp_output.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_output.c ============================================================================== --- stable/10/sys/netinet/sctp_output.c Sun Jun 22 16:22:44 2014 (r267721) +++ stable/10/sys/netinet/sctp_output.c Sun Jun 22 16:26:16 2014 (r267722) @@ -4108,7 +4108,7 @@ sctp_lowlevel_chunk_output(struct sctp_i SCTP_STAT_INCR(sctps_sendnocrc); #else m->m_pkthdr.csum_flags = CSUM_SCTP; - m->m_pkthdr.csum_data = 0; + m->m_pkthdr.csum_data = offsetof(struct sctphdr, checksum); SCTP_STAT_INCR(sctps_sendhwcrc); #endif } @@ -4457,7 +4457,7 @@ sctp_lowlevel_chunk_output(struct sctp_i SCTP_STAT_INCR(sctps_sendnocrc); #else m->m_pkthdr.csum_flags = CSUM_SCTP_IPV6; - m->m_pkthdr.csum_data = 0; + m->m_pkthdr.csum_data = offsetof(struct sctphdr, checksum); SCTP_STAT_INCR(sctps_sendhwcrc); #endif } @@ -11007,7 +11007,7 @@ sctp_send_resp_msg(struct sockaddr *src, SCTP_STAT_INCR(sctps_sendnocrc); #else mout->m_pkthdr.csum_flags = CSUM_SCTP; - mout->m_pkthdr.csum_data = 0; + mout->m_pkthdr.csum_data = offsetof(struct sctphdr, checksum); SCTP_STAT_INCR(sctps_sendhwcrc); #endif } @@ -11037,7 +11037,7 @@ sctp_send_resp_msg(struct sockaddr *src, SCTP_STAT_INCR(sctps_sendnocrc); #else mout->m_pkthdr.csum_flags = CSUM_SCTP_IPV6; - mout->m_pkthdr.csum_data = 0; + mout->m_pkthdr.csum_data = offsetof(struct sctphdr, checksum); SCTP_STAT_INCR(sctps_sendhwcrc); #endif } From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 16:28:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D8EAC43; Sun, 22 Jun 2014 16:28:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 78C8B2248; Sun, 22 Jun 2014 16:28:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MGSrSG035481; Sun, 22 Jun 2014 16:28:53 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MGSqMR035474; Sun, 22 Jun 2014 16:28:52 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201406221628.s5MGSqMR035474@svn.freebsd.org> From: Michael Tuexen Date: Sun, 22 Jun 2014 16:28:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267723 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 16:28:53 -0000 Author: tuexen Date: Sun Jun 22 16:28:52 2014 New Revision: 267723 URL: http://svnweb.freebsd.org/changeset/base/267723 Log: MFC r263237: * Provide information in error causes in ASCII instead of proprietary binary format. * Add support for a diagnostic information error cause. The code is sysctlable and the default is 0, which means it is not sent. This is joint work with rrs@. Modified: stable/10/sys/netinet/sctp.h stable/10/sys/netinet/sctp_constants.h stable/10/sys/netinet/sctp_indata.c stable/10/sys/netinet/sctp_input.c stable/10/sys/netinet/sctp_output.c stable/10/sys/netinet/sctp_pcb.c stable/10/sys/netinet/sctp_sysctl.c stable/10/sys/netinet/sctp_sysctl.h stable/10/sys/netinet/sctp_timer.c stable/10/sys/netinet/sctp_usrreq.c stable/10/sys/netinet/sctputil.c stable/10/sys/netinet/sctputil.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp.h ============================================================================== --- stable/10/sys/netinet/sctp.h Sun Jun 22 16:26:16 2014 (r267722) +++ stable/10/sys/netinet/sctp.h Sun Jun 22 16:28:52 2014 (r267723) @@ -365,6 +365,12 @@ struct sctp_paramhdr { /* * error cause parameters (user visible) */ +struct sctp_gen_error_cause { + uint16_t code; + uint16_t length; + uint8_t info[]; +} SCTP_PACKED; + struct sctp_error_cause { uint16_t code; uint16_t length; Modified: stable/10/sys/netinet/sctp_constants.h ============================================================================== --- stable/10/sys/netinet/sctp_constants.h Sun Jun 22 16:26:16 2014 (r267722) +++ stable/10/sys/netinet/sctp_constants.h Sun Jun 22 16:28:52 2014 (r267723) @@ -771,6 +771,9 @@ __FBSDID("$FreeBSD$"); */ #define SCTP_DEFAULT_SPLIT_POINT_MIN 2904 +/* Maximum length of diagnostic information in error causes */ +#define SCTP_DIAG_INFO_LEN 64 + /* ABORT CODES and other tell-tale location * codes are generated by adding the below * to the instance id. Modified: stable/10/sys/netinet/sctp_indata.c ============================================================================== --- stable/10/sys/netinet/sctp_indata.c Sun Jun 22 16:26:16 2014 (r267722) +++ stable/10/sys/netinet/sctp_indata.c Sun Jun 22 16:28:52 2014 (r267723) @@ -561,7 +561,8 @@ sctp_queue_data_to_stream(struct sctp_tc struct sctp_queued_to_read *at; int queue_needed; uint16_t nxt_todel; - struct mbuf *oper; + struct mbuf *op_err; + char msg[SCTP_DIAG_INFO_LEN]; queue_needed = 1; asoc->size_on_all_streams += control->length; @@ -578,7 +579,7 @@ sctp_queue_data_to_stream(struct sctp_tc (uint32_t) nxt_todel); if (SCTP_SSN_GE(strm->last_sequence_delivered, control->sinfo_ssn)) { /* The incoming sseq is behind where we last delivered? */ - SCTPDBG(SCTP_DEBUG_INDATA1, "Duplicate S-SEQ:%d delivered:%d from peer, Abort association\n", + SCTPDBG(SCTP_DEBUG_INDATA1, "Duplicate S-SEQ:%d delivered:%d from peer, Abort association\n", control->sinfo_ssn, strm->last_sequence_delivered); protocol_error: /* @@ -586,26 +587,12 @@ protocol_error: * association destruction */ TAILQ_INSERT_HEAD(&strm->inqueue, control, next); - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_NOWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = sizeof(struct sctp_paramhdr) + - (sizeof(uint32_t) * 3); - ph = mtod(oper, struct sctp_paramhdr *); - ph->param_type = htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_1); - ippp++; - *ippp = control->sinfo_tsn; - ippp++; - *ippp = ((control->sinfo_stream << 16) | control->sinfo_ssn); - } + snprintf(msg, sizeof(msg), "Delivered SSN=%4.4x, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + strm->last_sequence_delivered, control->sinfo_tsn, + control->sinfo_stream, control->sinfo_ssn); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_1; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; @@ -839,7 +826,9 @@ static void sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc, struct sctp_tmit_chunk *chk, int *abort_flag) { - struct mbuf *oper; + struct mbuf *op_err; + char msg[SCTP_DIAG_INFO_LEN]; + uint32_t cum_ackp1, prev_tsn, post_tsn; struct sctp_tmit_chunk *at, *prev, *next; @@ -864,30 +853,14 @@ sctp_queue_data_for_reasm(struct sctp_tc * a FIRST fragment mark. */ SCTPDBG(SCTP_DEBUG_INDATA1, "Gak, Evil plot, its not first, no fragmented delivery in progress\n"); - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_NOWAIT, 1, MT_DATA); - - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = - sizeof(struct sctp_paramhdr) + - (sizeof(uint32_t) * 3); - ph = mtod(oper, struct sctp_paramhdr *); - ph->param_type = - htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_2); - ippp++; - *ippp = chk->rec.data.TSN_seq; - ippp++; - *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); - - } + snprintf(msg, sizeof(msg), + "Expected B-bit for TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + chk->rec.data.TSN_seq, + chk->rec.data.stream_number, + chk->rec.data.stream_seq); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_2; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; } else if (asoc->fragmented_delivery_inprogress && (chk->rec.data.rcv_flags & SCTP_DATA_FIRST_FRAG) == SCTP_DATA_FIRST_FRAG) { @@ -897,28 +870,14 @@ sctp_queue_data_for_reasm(struct sctp_tc * MIDDLE fragment NOT a FIRST */ SCTPDBG(SCTP_DEBUG_INDATA1, "Gak, Evil plot, it IS a first and fragmented delivery in progress\n"); - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_NOWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = - sizeof(struct sctp_paramhdr) + - (3 * sizeof(uint32_t)); - ph = mtod(oper, struct sctp_paramhdr *); - ph->param_type = - htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_3); - ippp++; - *ippp = chk->rec.data.TSN_seq; - ippp++; - *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); - } + snprintf(msg, sizeof(msg), + "Didn't expect B-bit for TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + chk->rec.data.TSN_seq, + chk->rec.data.stream_number, + chk->rec.data.stream_seq); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_3; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; } else if (asoc->fragmented_delivery_inprogress) { /* @@ -931,30 +890,15 @@ sctp_queue_data_for_reasm(struct sctp_tc SCTPDBG(SCTP_DEBUG_INDATA1, "Gak, Evil plot, it IS not same stream number %d vs %d\n", chk->rec.data.stream_number, asoc->str_of_pdapi); - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_NOWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = - sizeof(struct sctp_paramhdr) + - (sizeof(uint32_t) * 3); - ph = mtod(oper, - struct sctp_paramhdr *); - ph->param_type = - htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = - htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_4); - ippp++; - *ippp = chk->rec.data.TSN_seq; - ippp++; - *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); - } + snprintf(msg, sizeof(msg), + "Expected SID=%4.4x, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + asoc->str_of_pdapi, + chk->rec.data.TSN_seq, + chk->rec.data.stream_number, + chk->rec.data.stream_seq); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_4; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; } else if ((asoc->fragment_flags & SCTP_DATA_UNORDERED) != SCTP_DATA_UNORDERED && @@ -963,31 +907,15 @@ sctp_queue_data_for_reasm(struct sctp_tc SCTPDBG(SCTP_DEBUG_INDATA1, "Gak, Evil plot, it IS not same stream seq %d vs %d\n", chk->rec.data.stream_seq, asoc->ssn_of_pdapi); - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_NOWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = - sizeof(struct sctp_paramhdr) + - (3 * sizeof(uint32_t)); - ph = mtod(oper, - struct sctp_paramhdr *); - ph->param_type = - htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = - htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_5); - ippp++; - *ippp = chk->rec.data.TSN_seq; - ippp++; - *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); - - } + snprintf(msg, sizeof(msg), + "Expected SSN=%4.4x, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + asoc->ssn_of_pdapi, + chk->rec.data.TSN_seq, + chk->rec.data.stream_number, + chk->rec.data.stream_seq); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_5; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; } } @@ -1057,31 +985,14 @@ sctp_queue_data_for_reasm(struct sctp_tc SCTP_DATA_FIRST_FRAG) { SCTPDBG(SCTP_DEBUG_INDATA1, "Prev check - It can be a midlle or last but not a first\n"); SCTPDBG(SCTP_DEBUG_INDATA1, "Gak, Evil plot, it's a FIRST!\n"); - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_NOWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = - sizeof(struct sctp_paramhdr) + - (3 * sizeof(uint32_t)); - ph = mtod(oper, - struct sctp_paramhdr *); - ph->param_type = - htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = - htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_6); - ippp++; - *ippp = chk->rec.data.TSN_seq; - ippp++; - *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); - - } + snprintf(msg, sizeof(msg), + "Can't handle B-bit, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + chk->rec.data.TSN_seq, + chk->rec.data.stream_number, + chk->rec.data.stream_seq); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_6; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1091,33 +1002,18 @@ sctp_queue_data_for_reasm(struct sctp_tc * Huh, need the correct STR here, * they must be the same. */ - SCTP_PRINTF("Prev check - Gak, Evil plot, ssn:%d not the same as at:%d\n", + SCTP_PRINTF("Prev check - Gak, Evil plot, sid:%d not the same as at:%d\n", chk->rec.data.stream_number, prev->rec.data.stream_number); - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_NOWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = - sizeof(struct sctp_paramhdr) + - (3 * sizeof(uint32_t)); - ph = mtod(oper, - struct sctp_paramhdr *); - ph->param_type = - htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = - htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_7); - ippp++; - *ippp = chk->rec.data.TSN_seq; - ippp++; - *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); - } + snprintf(msg, sizeof(msg), + "Expect SID=%4.4x, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + prev->rec.data.stream_number, + chk->rec.data.TSN_seq, + chk->rec.data.stream_number, + chk->rec.data.stream_seq); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_7; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1131,30 +1027,15 @@ sctp_queue_data_for_reasm(struct sctp_tc SCTPDBG(SCTP_DEBUG_INDATA1, "Prev check - Gak, Evil plot, sseq:%d not the same as at:%d\n", chk->rec.data.stream_seq, prev->rec.data.stream_seq); - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_NOWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = - sizeof(struct sctp_paramhdr) + - (3 * sizeof(uint32_t)); - ph = mtod(oper, - struct sctp_paramhdr *); - ph->param_type = - htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = - htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_8); - ippp++; - *ippp = chk->rec.data.TSN_seq; - ippp++; - *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); - } + snprintf(msg, sizeof(msg), + "Expect SSN=%4.4x, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + prev->rec.data.stream_seq, + chk->rec.data.TSN_seq, + chk->rec.data.stream_number, + chk->rec.data.stream_seq); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_8; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1164,31 +1045,14 @@ sctp_queue_data_for_reasm(struct sctp_tc if ((chk->rec.data.rcv_flags & SCTP_DATA_FRAG_MASK) != SCTP_DATA_FIRST_FRAG) { SCTPDBG(SCTP_DEBUG_INDATA1, "Prev check - Gak, evil plot, its not FIRST and it must be!\n"); - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_NOWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = - sizeof(struct sctp_paramhdr) + - (3 * sizeof(uint32_t)); - ph = mtod(oper, - struct sctp_paramhdr *); - ph->param_type = - htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = - htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_9); - ippp++; - *ippp = chk->rec.data.TSN_seq; - ippp++; - *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); - - } + snprintf(msg, sizeof(msg), + "Expect B-bit, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + chk->rec.data.TSN_seq, + chk->rec.data.stream_number, + chk->rec.data.stream_seq); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_9; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1208,30 +1072,14 @@ sctp_queue_data_for_reasm(struct sctp_tc != SCTP_DATA_LAST_FRAG) { SCTPDBG(SCTP_DEBUG_INDATA1, "Next chk - Next is FIRST, we must be LAST\n"); SCTPDBG(SCTP_DEBUG_INDATA1, "Gak, Evil plot, its not a last!\n"); - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_NOWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = - sizeof(struct sctp_paramhdr) + - (3 * sizeof(uint32_t)); - ph = mtod(oper, - struct sctp_paramhdr *); - ph->param_type = - htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = - htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_10); - ippp++; - *ippp = chk->rec.data.TSN_seq; - ippp++; - *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); - } + snprintf(msg, sizeof(msg), + "Expect only E-bit, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + chk->rec.data.TSN_seq, + chk->rec.data.stream_number, + chk->rec.data.stream_seq); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_10; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1247,31 +1095,14 @@ sctp_queue_data_for_reasm(struct sctp_tc SCTP_DATA_LAST_FRAG) { SCTPDBG(SCTP_DEBUG_INDATA1, "Next chk - Next is a MIDDLE/LAST\n"); SCTPDBG(SCTP_DEBUG_INDATA1, "Gak, Evil plot, new prev chunk is a LAST\n"); - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_NOWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = - sizeof(struct sctp_paramhdr) + - (3 * sizeof(uint32_t)); - ph = mtod(oper, - struct sctp_paramhdr *); - ph->param_type = - htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = - htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_11); - ippp++; - *ippp = chk->rec.data.TSN_seq; - ippp++; - *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); - - } + snprintf(msg, sizeof(msg), + "Didn't expect E-bit, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + chk->rec.data.TSN_seq, + chk->rec.data.stream_number, + chk->rec.data.stream_seq); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_11; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1284,31 +1115,15 @@ sctp_queue_data_for_reasm(struct sctp_tc SCTPDBG(SCTP_DEBUG_INDATA1, "Next chk - Gak, Evil plot, ssn:%d not the same as at:%d\n", chk->rec.data.stream_number, next->rec.data.stream_number); - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_NOWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = - sizeof(struct sctp_paramhdr) + - (3 * sizeof(uint32_t)); - ph = mtod(oper, - struct sctp_paramhdr *); - ph->param_type = - htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = - htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_12); - ippp++; - *ippp = chk->rec.data.TSN_seq; - ippp++; - *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); - - } + snprintf(msg, sizeof(msg), + "Required SID %4.4x, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + next->rec.data.stream_number, + chk->rec.data.TSN_seq, + chk->rec.data.stream_number, + chk->rec.data.stream_seq); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_12; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1322,30 +1137,15 @@ sctp_queue_data_for_reasm(struct sctp_tc SCTPDBG(SCTP_DEBUG_INDATA1, "Next chk - Gak, Evil plot, sseq:%d not the same as at:%d\n", chk->rec.data.stream_seq, next->rec.data.stream_seq); - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_NOWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = - sizeof(struct sctp_paramhdr) + - (3 * sizeof(uint32_t)); - ph = mtod(oper, - struct sctp_paramhdr *); - ph->param_type = - htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = - htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_13); - ippp++; - *ippp = chk->rec.data.TSN_seq; - ippp++; - *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); - } + snprintf(msg, sizeof(msg), + "Required SSN %4.4x, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + next->rec.data.stream_seq, + chk->rec.data.TSN_seq, + chk->rec.data.stream_number, + chk->rec.data.stream_seq); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_13; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1430,7 +1230,8 @@ sctp_process_a_data_chunk(struct sctp_tc int the_len; int need_reasm_check = 0; uint16_t strmno, strmseq; - struct mbuf *oper; + struct mbuf *op_err; + char msg[SCTP_DIAG_INFO_LEN]; struct sctp_queued_to_read *control; int ordered; uint32_t protocol_id; @@ -1497,15 +1298,12 @@ sctp_process_a_data_chunk(struct sctp_tc */ if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) || (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) || - (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET)) - ) { + (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET))) { /* * wait a minute, this guy is gone, there is no longer a * receiver. Send peer an ABORT! */ - struct mbuf *op_err; - - op_err = sctp_generate_invmanparam(SCTP_CAUSE_OUT_OF_RESC); + op_err = sctp_generate_cause(SCTP_CAUSE_OUT_OF_RESC, ""); sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return (0); @@ -1633,27 +1431,13 @@ sctp_process_a_data_chunk(struct sctp_tc /* The incoming sseq is behind where we last delivered? */ SCTPDBG(SCTP_DEBUG_INDATA1, "EVIL/Broken-Dup S-SEQ:%d delivered:%d from peer, Abort!\n", strmseq, asoc->strmin[strmno].last_sequence_delivered); - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_NOWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = sizeof(struct sctp_paramhdr) + - (3 * sizeof(uint32_t)); - ph = mtod(oper, struct sctp_paramhdr *); - ph->param_type = htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_14); - ippp++; - *ippp = tsn; - ippp++; - *ippp = ((strmno << 16) | strmseq); - } + snprintf(msg, sizeof(msg), "Delivered SSN=%4.4x, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + asoc->strmin[strmno].last_sequence_delivered, + tsn, strmno, strmseq); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_14; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return (0); } @@ -1892,28 +1676,11 @@ failed_pdapi_express_del: control->whoFrom = NULL; } sctp_free_a_readq(stcb, control); - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_NOWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = - sizeof(struct sctp_paramhdr) + - (3 * sizeof(uint32_t)); - ph = mtod(oper, struct sctp_paramhdr *); - ph->param_type = - htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_15); - ippp++; - *ippp = tsn; - ippp++; - *ippp = ((strmno << 16) | strmseq); - } + snprintf(msg, sizeof(msg), "Reas. queue emtpy, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + tsn, strmno, strmseq); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_15; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return (0); } else { @@ -1925,31 +1692,11 @@ failed_pdapi_express_del: control->whoFrom = NULL; } sctp_free_a_readq(stcb, control); - - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_NOWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = - sizeof(struct sctp_paramhdr) + - (3 * sizeof(uint32_t)); - ph = mtod(oper, - struct sctp_paramhdr *); - ph->param_type = - htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = - htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_16); - ippp++; - *ippp = tsn; - ippp++; - *ippp = ((strmno << 16) | strmseq); - } + snprintf(msg, sizeof(msg), "PD ongoing, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + tsn, strmno, strmseq); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_16; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return (0); } @@ -1971,30 +1718,11 @@ failed_pdapi_express_del: control->whoFrom = NULL; } sctp_free_a_readq(stcb, control); - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_NOWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = - sizeof(struct sctp_paramhdr) + - (3 * sizeof(uint32_t)); - ph = mtod(oper, - struct sctp_paramhdr *); - ph->param_type = - htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = - htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_17); - ippp++; - *ippp = tsn; - ippp++; - *ippp = ((strmno << 16) | strmseq); - } + snprintf(msg, sizeof(msg), "No PD ongoing, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + tsn, strmno, strmseq); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_17; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return (0); } @@ -2601,26 +2329,11 @@ sctp_process_data(struct mbuf **mm, int * invalid data chunk. */ struct mbuf *op_err; + char msg[SCTP_DIAG_INFO_LEN]; - op_err = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 2 * sizeof(uint32_t)), - 0, M_NOWAIT, 1, MT_DATA); - - if (op_err) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(op_err) = sizeof(struct sctp_paramhdr) + - (2 * sizeof(uint32_t)); - ph = mtod(op_err, struct sctp_paramhdr *); - ph->param_type = - htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = htons(SCTP_BUF_LEN(op_err)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_19); - ippp++; - *ippp = asoc->cumulative_tsn; - - } + snprintf(msg, sizeof(msg), "DATA chunk of length %d", + chk_length); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_19; sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, @@ -2688,7 +2401,7 @@ sctp_process_data(struct mbuf **mm, int if (SCTP_BASE_SYSCTL(sctp_strict_data_order)) { struct mbuf *op_err; - op_err = sctp_generate_invmanparam(SCTP_CAUSE_PROTOCOL_VIOLATION); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, ""); sctp_abort_association(inp, stcb, m, iphlen, src, dst, @@ -3837,7 +3550,8 @@ sctp_express_handle_sack(struct sctp_tcb } if (SCTP_TSN_GE(cumack, send_s)) { #ifndef INVARIANTS - struct mbuf *oper; + struct mbuf *op_err; + char msg[SCTP_DIAG_INFO_LEN]; #endif #ifdef INVARIANTS @@ -3846,22 +3560,11 @@ sctp_express_handle_sack(struct sctp_tcb *abort_now = 1; /* XXX */ - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + sizeof(uint32_t)), - 0, M_NOWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = sizeof(struct sctp_paramhdr) + - sizeof(uint32_t); - ph = mtod(oper, struct sctp_paramhdr *); - ph->param_type = htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_25); - } + snprintf(msg, sizeof(msg), "Cum ack %8.8x greater or equal then TSN %8.8x", + cumack, send_s); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_25; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); return; #endif } @@ -4211,23 +3914,14 @@ again: (asoc->stream_queue_cnt == 0)) { if (asoc->state & SCTP_STATE_PARTIAL_MSG_LEFT) { /* Need to abort here */ - struct mbuf *oper; + struct mbuf *op_err; abort_out_now: *abort_now = 1; /* XXX */ - oper = sctp_get_mbuf_for_msg(sizeof(struct sctp_paramhdr), - 0, M_NOWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - - SCTP_BUF_LEN(oper) = sizeof(struct sctp_paramhdr); - ph = mtod(oper, struct sctp_paramhdr *); - ph->param_type = htons(SCTP_CAUSE_USER_INITIATED_ABT); - ph->param_length = htons(SCTP_BUF_LEN(oper)); - } + op_err = sctp_generate_cause(SCTP_CAUSE_USER_INITIATED_ABT, ""); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_24; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); } else { struct sctp_nets *netp; @@ -4420,7 +4114,8 @@ sctp_handle_sack(struct mbuf *m, int off send_s = asoc->sending_seq; } if (SCTP_TSN_GE(cum_ack, send_s)) { - struct mbuf *oper; + struct mbuf *op_err; + char msg[SCTP_DIAG_INFO_LEN]; /* * no way, we have not even sent this TSN out yet. @@ -4435,22 +4130,11 @@ sctp_handle_sack(struct mbuf *m, int off hopeless_peer: *abort_now = 1; /* XXX */ - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + sizeof(uint32_t)), - 0, M_NOWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = sizeof(struct sctp_paramhdr) + - sizeof(uint32_t); - ph = mtod(oper, struct sctp_paramhdr *); - ph->param_type = htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_25); - } + snprintf(msg, sizeof(msg), "Cum ack %8.8x greater or equal then TSN %8.8x", + cum_ack, send_s); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_25; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); return; } } @@ -4939,23 +4623,14 @@ sctp_handle_sack(struct mbuf *m, int off (asoc->stream_queue_cnt == 0)) { if (asoc->state & SCTP_STATE_PARTIAL_MSG_LEFT) { /* Need to abort here */ - struct mbuf *oper; + struct mbuf *op_err; abort_out_now: *abort_now = 1; /* XXX */ - oper = sctp_get_mbuf_for_msg(sizeof(struct sctp_paramhdr), - 0, M_NOWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - - SCTP_BUF_LEN(oper) = sizeof(struct sctp_paramhdr); - ph = mtod(oper, struct sctp_paramhdr *); - ph->param_type = htons(SCTP_CAUSE_USER_INITIATED_ABT); - ph->param_length = htons(SCTP_BUF_LEN(oper)); - } + op_err = sctp_generate_cause(SCTP_CAUSE_USER_INITIATED_ABT, ""); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_31; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); return; } else { struct sctp_nets *netp; @@ -5384,33 +5059,20 @@ sctp_handle_forward_tsn(struct sctp_tcb asoc->cumulative_tsn = new_cum_tsn; if (gap >= m_size) { if ((long)gap > sctp_sbspace(&stcb->asoc, &stcb->sctp_socket->so_rcv)) { - struct mbuf *oper; + struct mbuf *op_err; + char msg[SCTP_DIAG_INFO_LEN]; /* * out of range (of single byte chunks in the rwnd I * give out). This must be an attacker. */ *abort_flag = 1; - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)), - 0, M_NOWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = sizeof(struct sctp_paramhdr) + - (sizeof(uint32_t) * 3); - ph = mtod(oper, struct sctp_paramhdr *); - ph->param_type = htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_33); - ippp++; - *ippp = asoc->highest_tsn_inside_map; - ippp++; - *ippp = new_cum_tsn; - } + snprintf(msg, sizeof(msg), + "New cum ack %8.8x too high, highest TSN %8.8x", + new_cum_tsn, asoc->highest_tsn_inside_map); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_33; - sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); return; } SCTP_STAT_INCR(sctps_fwdtsn_map_over); Modified: stable/10/sys/netinet/sctp_input.c ============================================================================== --- stable/10/sys/netinet/sctp_input.c Sun Jun 22 16:26:16 2014 (r267722) +++ stable/10/sys/netinet/sctp_input.c Sun Jun 22 16:28:52 2014 (r267723) @@ -97,7 +97,7 @@ sctp_handle_init(struct mbuf *m, int iph } /* validate length */ if (ntohs(cp->ch.chunk_length) < sizeof(struct sctp_init_chunk)) { - op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM); + op_err = sctp_generate_cause(SCTP_CAUSE_INVALID_PARAM, ""); sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, use_mflowid, mflowid, vrf_id, port); @@ -109,7 +109,7 @@ sctp_handle_init(struct mbuf *m, int iph init = &cp->init; if (init->initiate_tag == 0) { /* protocol error... send abort */ - op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM); + op_err = sctp_generate_cause(SCTP_CAUSE_INVALID_PARAM, ""); sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, use_mflowid, mflowid, vrf_id, port); @@ -119,7 +119,7 @@ sctp_handle_init(struct mbuf *m, int iph } if (ntohl(init->a_rwnd) < SCTP_MIN_RWND) { /* invalid parameter... send abort */ - op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM); + op_err = sctp_generate_cause(SCTP_CAUSE_INVALID_PARAM, ""); sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, use_mflowid, mflowid, vrf_id, port); @@ -129,7 +129,7 @@ sctp_handle_init(struct mbuf *m, int iph } if (init->num_inbound_streams == 0) { /* protocol error... send abort */ - op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM); + op_err = sctp_generate_cause(SCTP_CAUSE_INVALID_PARAM, ""); sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, use_mflowid, mflowid, vrf_id, port); @@ -139,7 +139,7 @@ sctp_handle_init(struct mbuf *m, int iph } if (init->num_outbound_streams == 0) { /* protocol error... send abort */ - op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM); + op_err = sctp_generate_cause(SCTP_CAUSE_INVALID_PARAM, ""); sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, use_mflowid, mflowid, vrf_id, port); @@ -150,7 +150,9 @@ sctp_handle_init(struct mbuf *m, int iph if (sctp_validate_init_auth_params(m, offset + sizeof(*cp), offset + ntohs(cp->ch.chunk_length))) { /* auth parameter(s) error... send abort */ - sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, NULL, + op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), + "Problem with AUTH parameters"); + sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, use_mflowid, mflowid, vrf_id, port); if (stcb) @@ -179,7 +181,9 @@ sctp_handle_init(struct mbuf *m, int iph * state :-) */ if (SCTP_BASE_SYSCTL(sctp_blackhole) == 0) { - sctp_send_abort(m, iphlen, src, dst, sh, 0, NULL, + op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), + "No listener"); + sctp_send_abort(m, iphlen, src, dst, sh, 0, op_err, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 16:30:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 34BC5D88; Sun, 22 Jun 2014 16:30:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07E6822CE; Sun, 22 Jun 2014 16:30:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MGUqrJ038014; Sun, 22 Jun 2014 16:30:52 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MGUqAU038009; Sun, 22 Jun 2014 16:30:52 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201406221630.s5MGUqAU038009@svn.freebsd.org> From: Michael Tuexen Date: Sun, 22 Jun 2014 16:30:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267724 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 16:30:53 -0000 Author: tuexen Date: Sun Jun 22 16:30:52 2014 New Revision: 267724 URL: http://svnweb.freebsd.org/changeset/base/267724 Log: MFC r263921: Use SCTP_OVER_UDP_TUNNELING_PORT more consistently. Modified: stable/10/sys/netinet/sctp_constants.h stable/10/sys/netinet/sctp_sysctl.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_constants.h ============================================================================== --- stable/10/sys/netinet/sctp_constants.h Sun Jun 22 16:28:52 2014 (r267723) +++ stable/10/sys/netinet/sctp_constants.h Sun Jun 22 16:30:52 2014 (r267724) @@ -36,16 +36,10 @@ __FBSDID("$FreeBSD$"); #ifndef _NETINET_SCTP_CONSTANTS_H_ #define _NETINET_SCTP_CONSTANTS_H_ + /* IANA assigned port number for SCTP over UDP encapsulation */ -/* For freebsd we cannot bind the port at - * startup. Otherwise what will happen is - * we really won't be bound. The user must - * put it into the sysctl... or we need - * to build a special timer for this to allow - * us to wait 1 second or so after the system - * comes up. - */ -#define SCTP_OVER_UDP_TUNNELING_PORT 0 +#define SCTP_OVER_UDP_TUNNELING_PORT 9899 + /* Number of packets to get before sack sent by default */ #define SCTP_DEFAULT_SACK_FREQ 2 Modified: stable/10/sys/netinet/sctp_sysctl.h ============================================================================== --- stable/10/sys/netinet/sctp_sysctl.h Sun Jun 22 16:28:52 2014 (r267723) +++ stable/10/sys/netinet/sctp_sysctl.h Sun Jun 22 16:30:52 2014 (r267724) @@ -466,7 +466,7 @@ struct sctp_sysctl { #define SCTPCTL_UDP_TUNNELING_PORT_DESC "Set the SCTP/UDP tunneling port" #define SCTPCTL_UDP_TUNNELING_PORT_MIN 0 #define SCTPCTL_UDP_TUNNELING_PORT_MAX 65535 -#define SCTPCTL_UDP_TUNNELING_PORT_DEFAULT SCTP_OVER_UDP_TUNNELING_PORT +#define SCTPCTL_UDP_TUNNELING_PORT_DEFAULT 0 /* Enable sending of the SACK-IMMEDIATELY bit */ #define SCTPCTL_SACK_IMMEDIATELY_ENABLE_DESC "Enable sending of the SACK-IMMEDIATELY-bit." From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 16:32:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E5E5EEC5; Sun, 22 Jun 2014 16:32:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D31C522DC; Sun, 22 Jun 2014 16:32:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MGWfQZ039219; Sun, 22 Jun 2014 16:32:41 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MGWfhn039218; Sun, 22 Jun 2014 16:32:41 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201406221632.s5MGWfhn039218@svn.freebsd.org> From: Michael Tuexen Date: Sun, 22 Jun 2014 16:32:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267725 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 16:32:42 -0000 Author: tuexen Date: Sun Jun 22 16:32:41 2014 New Revision: 267725 URL: http://svnweb.freebsd.org/changeset/base/267725 Log: MFC r263922: Handle an edge case of address management similar to TCP. This needs to be reconsidered when the address handling will be reimplemented. The patch is from rrs@. Modified: stable/10/sys/netinet/sctp_pcb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_pcb.c ============================================================================== --- stable/10/sys/netinet/sctp_pcb.c Sun Jun 22 16:30:52 2014 (r267724) +++ stable/10/sys/netinet/sctp_pcb.c Sun Jun 22 16:32:41 2014 (r267725) @@ -772,7 +772,14 @@ sctp_del_addr_from_vrf(uint32_t vrf_id, } SCTPDBG(SCTP_DEBUG_PCB4, "Deleting ifa %p\n", (void *)sctp_ifap); sctp_ifap->localifa_flags &= SCTP_ADDR_VALID; - sctp_ifap->localifa_flags |= SCTP_BEING_DELETED; + /* + * We don't set the flag. This means that the structure will + * hang around in EP's that have bound specific to it until + * they close. This gives us TCP like behavior if someone + * removes an address (or for that matter adds it right + * back). + */ + /* sctp_ifap->localifa_flags |= SCTP_BEING_DELETED; */ vrf->total_ifa_count--; LIST_REMOVE(sctp_ifap, next_bucket); sctp_remove_ifa_from_ifn(sctp_ifap); From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 16:34:28 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53246FFE; Sun, 22 Jun 2014 16:34:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 405A622E5; Sun, 22 Jun 2014 16:34:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MGYSXX039552; Sun, 22 Jun 2014 16:34:28 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MGYS0F039551; Sun, 22 Jun 2014 16:34:28 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201406221634.s5MGYS0F039551@svn.freebsd.org> From: Michael Tuexen Date: Sun, 22 Jun 2014 16:34:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267726 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 16:34:28 -0000 Author: tuexen Date: Sun Jun 22 16:34:27 2014 New Revision: 267726 URL: http://svnweb.freebsd.org/changeset/base/267726 Log: MFC r264017: Increment the SSN only after processing the last fragment of an ordered user message. Modified: stable/10/sys/netinet/sctp_output.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_output.c ============================================================================== --- stable/10/sys/netinet/sctp_output.c Sun Jun 22 16:32:41 2014 (r267725) +++ stable/10/sys/netinet/sctp_output.c Sun Jun 22 16:34:27 2014 (r267726) @@ -7367,7 +7367,8 @@ dont_do_it: chk->pad_inplace = 0; chk->no_fr_allowed = 0; chk->rec.data.stream_seq = strq->next_sequence_send; - if (rcv_flags & SCTP_DATA_LAST_FRAG) { + if ((rcv_flags & SCTP_DATA_LAST_FRAG) && + !(rcv_flags & SCTP_DATA_UNORDERED)) { strq->next_sequence_send++; } chk->rec.data.stream_number = sp->stream; From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 16:36:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A3652F7; Sun, 22 Jun 2014 16:36:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0781D22EC; Sun, 22 Jun 2014 16:36:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MGaEpk039957; Sun, 22 Jun 2014 16:36:14 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MGaEGa039956; Sun, 22 Jun 2014 16:36:14 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201406221636.s5MGaEGa039956@svn.freebsd.org> From: Michael Tuexen Date: Sun, 22 Jun 2014 16:36:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267728 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 16:36:15 -0000 Author: tuexen Date: Sun Jun 22 16:36:14 2014 New Revision: 267728 URL: http://svnweb.freebsd.org/changeset/base/267728 Log: MFC r264241: Call sctp_addr_change() from rt_addrmsg() instead of rt_newaddrmsg_fib(), since rt_addrmsg() gets also called from other functions. Modified: stable/10/sys/net/route.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/route.c ============================================================================== --- stable/10/sys/net/route.c Sun Jun 22 16:35:03 2014 (r267727) +++ stable/10/sys/net/route.c Sun Jun 22 16:36:14 2014 (r267728) @@ -1780,6 +1780,16 @@ rt_addrmsg(int cmd, struct ifaddr *ifa, KASSERT(fibnum == RT_ALL_FIBS || (fibnum >= 0 && fibnum < rt_numfibs), ("%s: fib out of range 0 <=%d<%d", __func__, fibnum, rt_numfibs)); +#if defined(INET) || defined(INET6) +#ifdef SCTP + /* + * notify the SCTP stack + * this will only get called when an address is added/deleted + * XXX pass the ifaddr struct instead if ifa->ifa_addr... + */ + sctp_addr_change(ifa, cmd); +#endif /* SCTP */ +#endif return (rtsock_addrmsg(cmd, ifa, fibnum)); } @@ -1830,16 +1840,6 @@ rt_newaddrmsg_fib(int cmd, struct ifaddr KASSERT(fibnum == RT_ALL_FIBS || (fibnum >= 0 && fibnum < rt_numfibs), ("%s: fib out of range 0 <=%d<%d", __func__, fibnum, rt_numfibs)); -#if defined(INET) || defined(INET6) -#ifdef SCTP - /* - * notify the SCTP stack - * this will only get called when an address is added/deleted - * XXX pass the ifaddr struct instead if ifa->ifa_addr... - */ - sctp_addr_change(ifa, cmd); -#endif /* SCTP */ -#endif if (cmd == RTM_ADD) { rt_addrmsg(cmd, ifa, fibnum); if (rt != NULL) From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 16:38:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6EF7644F; Sun, 22 Jun 2014 16:38:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BEC3230D; Sun, 22 Jun 2014 16:38:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MGc7PT040272; Sun, 22 Jun 2014 16:38:07 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MGc6jK040268; Sun, 22 Jun 2014 16:38:06 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201406221638.s5MGc6jK040268@svn.freebsd.org> From: Michael Tuexen Date: Sun, 22 Jun 2014 16:38:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267729 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 16:38:07 -0000 Author: tuexen Date: Sun Jun 22 16:38:06 2014 New Revision: 267729 URL: http://svnweb.freebsd.org/changeset/base/267729 Log: MFC r264679: Send the correct error cause, when a DATA chunk with no user data is received. This bug was reported by Irene Ruengeler. Modified: stable/10/sys/netinet/sctp.h stable/10/sys/netinet/sctp_indata.c stable/10/sys/netinet/sctputil.c stable/10/sys/netinet/sctputil.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp.h ============================================================================== --- stable/10/sys/netinet/sctp.h Sun Jun 22 16:36:14 2014 (r267728) +++ stable/10/sys/netinet/sctp.h Sun Jun 22 16:38:06 2014 (r267729) @@ -408,6 +408,11 @@ struct sctp_error_unrecognized_chunk { struct sctp_chunkhdr ch;/* header from chunk in error */ } SCTP_PACKED; +struct sctp_error_no_user_data { + struct sctp_error_cause cause; /* code=SCTP_CAUSE_NO_USER_DATA */ + uint32_t tsn; /* TSN of the empty data chunk */ +} SCTP_PACKED; + /* * Main SCTP chunk types we place these here so natd and f/w's in user land * can find them. Modified: stable/10/sys/netinet/sctp_indata.c ============================================================================== --- stable/10/sys/netinet/sctp_indata.c Sun Jun 22 16:36:14 2014 (r267728) +++ stable/10/sys/netinet/sctp_indata.c Sun Jun 22 16:38:06 2014 (r267729) @@ -2323,7 +2323,7 @@ sctp_process_data(struct mbuf **mm, int continue; } if (ch->ch.chunk_type == SCTP_DATA) { - if ((size_t)chk_length < sizeof(struct sctp_data_chunk) + 1) { + if ((size_t)chk_length < sizeof(struct sctp_data_chunk)) { /* * Need to send an abort since we had a * invalid data chunk. @@ -2341,6 +2341,21 @@ sctp_process_data(struct mbuf **mm, int vrf_id, port); return (2); } + if ((size_t)chk_length == sizeof(struct sctp_data_chunk)) { + /* + * Need to send an abort since we had an + * empty data chunk. + */ + struct mbuf *op_err; + + op_err = sctp_generate_no_user_data_cause(ch->dp.tsn); + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_19; + sctp_abort_association(inp, stcb, m, iphlen, + src, dst, sh, op_err, + use_mflowid, mflowid, + vrf_id, port); + return (2); + } #ifdef SCTP_AUDITING_ENABLED sctp_audit_log(0xB1, 0); #endif Modified: stable/10/sys/netinet/sctputil.c ============================================================================== --- stable/10/sys/netinet/sctputil.c Sun Jun 22 16:36:14 2014 (r267728) +++ stable/10/sys/netinet/sctputil.c Sun Jun 22 16:38:06 2014 (r267729) @@ -4654,6 +4654,25 @@ sctp_generate_cause(uint16_t code, char return (m); } +struct mbuf * +sctp_generate_no_user_data_cause(uint32_t tsn) +{ + struct mbuf *m; + struct sctp_error_no_user_data *no_user_data_cause; + size_t len; + + len = sizeof(struct sctp_error_no_user_data); + m = sctp_get_mbuf_for_msg(len, 0, M_NOWAIT, 1, MT_DATA); + if (m != NULL) { + SCTP_BUF_LEN(m) = len; + no_user_data_cause = mtod(m, struct sctp_error_no_user_data *); + no_user_data_cause->cause.code = htons(SCTP_CAUSE_NO_USER_DATA); + no_user_data_cause->cause.length = htons((uint16_t) len); + no_user_data_cause->tsn = tsn; /* tsn is passed in as NBO */ + } + return (m); +} + #ifdef SCTP_MBCNT_LOGGING void sctp_free_bufspace(struct sctp_tcb *stcb, struct sctp_association *asoc, Modified: stable/10/sys/netinet/sctputil.h ============================================================================== --- stable/10/sys/netinet/sctputil.h Sun Jun 22 16:36:14 2014 (r267728) +++ stable/10/sys/netinet/sctputil.h Sun Jun 22 16:38:06 2014 (r267729) @@ -254,6 +254,7 @@ sctp_release_pr_sctp_chunk(struct sctp_t ); struct mbuf *sctp_generate_cause(uint16_t, char *); +struct mbuf *sctp_generate_no_user_data_cause(uint32_t); void sctp_bindx_add_address(struct socket *so, struct sctp_inpcb *inp, From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 16:40:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 91918680; Sun, 22 Jun 2014 16:40:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7ED622395; Sun, 22 Jun 2014 16:40:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MGeaLK040738; Sun, 22 Jun 2014 16:40:36 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MGeaRW040737; Sun, 22 Jun 2014 16:40:36 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201406221640.s5MGeaRW040737@svn.freebsd.org> From: Michael Tuexen Date: Sun, 22 Jun 2014 16:40:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267730 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 16:40:36 -0000 Author: tuexen Date: Sun Jun 22 16:40:36 2014 New Revision: 267730 URL: http://svnweb.freebsd.org/changeset/base/267730 Log: MFC r264682: Use consistently debug output instead of an unconditional printf. Modified: stable/10/sys/netinet/sctp_indata.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_indata.c ============================================================================== --- stable/10/sys/netinet/sctp_indata.c Sun Jun 22 16:38:06 2014 (r267729) +++ stable/10/sys/netinet/sctp_indata.c Sun Jun 22 16:40:36 2014 (r267730) @@ -1002,7 +1002,7 @@ sctp_queue_data_for_reasm(struct sctp_tc * Huh, need the correct STR here, * they must be the same. */ - SCTP_PRINTF("Prev check - Gak, Evil plot, sid:%d not the same as at:%d\n", + SCTPDBG(SCTP_DEBUG_INDATA1, "Prev check - Gak, Evil plot, sid:%d not the same as at:%d\n", chk->rec.data.stream_number, prev->rec.data.stream_number); snprintf(msg, sizeof(msg), From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 16:42:10 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89C0E7B6; Sun, 22 Jun 2014 16:42:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77208239F; Sun, 22 Jun 2014 16:42:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MGgA6M044045; Sun, 22 Jun 2014 16:42:10 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MGgAPd044044; Sun, 22 Jun 2014 16:42:10 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201406221642.s5MGgAPd044044@svn.freebsd.org> From: Michael Tuexen Date: Sun, 22 Jun 2014 16:42:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267731 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 16:42:10 -0000 Author: tuexen Date: Sun Jun 22 16:42:09 2014 New Revision: 267731 URL: http://svnweb.freebsd.org/changeset/base/267731 Log: MFC r264701: Send also a packet containing an ABORT chunk in response to an OOTB packet containing a COOKIE-ECHO chunk. Modified: stable/10/sys/netinet/sctputil.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctputil.c ============================================================================== --- stable/10/sys/netinet/sctputil.c Sun Jun 22 16:40:36 2014 (r267730) +++ stable/10/sys/netinet/sctputil.c Sun Jun 22 16:42:09 2014 (r267731) @@ -4047,9 +4047,6 @@ sctp_handle_ootb(struct mbuf *m, int iph case SCTP_INIT: contains_init_chunk = 1; break; - case SCTP_COOKIE_ECHO: - /* We hit here only if the assoc is being freed */ - return; case SCTP_PACKET_DROPPED: /* we don't respond to pkt-dropped */ return; From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 16:44:00 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2DDAA8E; Sun, 22 Jun 2014 16:43:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D3BB823AB; Sun, 22 Jun 2014 16:43:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MGhxaB044315; Sun, 22 Jun 2014 16:43:59 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MGhxSf044314; Sun, 22 Jun 2014 16:43:59 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201406221643.s5MGhxSf044314@svn.freebsd.org> From: Michael Tuexen Date: Sun, 22 Jun 2014 16:43:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267732 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 16:44:00 -0000 Author: tuexen Date: Sun Jun 22 16:43:59 2014 New Revision: 267732 URL: http://svnweb.freebsd.org/changeset/base/267732 Log: MFC r264704: Add consistency checks to ensure that fragments of a user message have the same U-bit. Modified: stable/10/sys/netinet/sctp_indata.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_indata.c ============================================================================== --- stable/10/sys/netinet/sctp_indata.c Sun Jun 22 16:42:09 2014 (r267731) +++ stable/10/sys/netinet/sctp_indata.c Sun Jun 22 16:43:59 2014 (r267732) @@ -828,7 +828,6 @@ sctp_queue_data_for_reasm(struct sctp_tc { struct mbuf *op_err; char msg[SCTP_DIAG_INFO_LEN]; - uint32_t cum_ackp1, prev_tsn, post_tsn; struct sctp_tmit_chunk *at, *prev, *next; @@ -1017,6 +1016,24 @@ sctp_queue_data_for_reasm(struct sctp_tc *abort_flag = 1; return; } + if ((chk->rec.data.rcv_flags & SCTP_DATA_UNORDERED) != + (prev->rec.data.rcv_flags & SCTP_DATA_UNORDERED)) { + /* + * Huh, need the same ordering here, + * they must be the same. + */ + SCTPDBG(SCTP_DEBUG_INDATA1, "Prev check - Gak, Evil plot, U-bit not constant\n"); + snprintf(msg, sizeof(msg), + "Expect U-bit=%d for TSN=%8.8x, got U-bit=%d", + (prev->rec.data.rcv_flags & SCTP_DATA_UNORDERED) ? 1 : 0, + chk->rec.data.TSN_seq, + (chk->rec.data.rcv_flags & SCTP_DATA_UNORDERED) ? 1 : 0); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_7; + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); + *abort_flag = 1; + return; + } if ((prev->rec.data.rcv_flags & SCTP_DATA_UNORDERED) == 0 && chk->rec.data.stream_seq != prev->rec.data.stream_seq) { @@ -1127,6 +1144,24 @@ sctp_queue_data_for_reasm(struct sctp_tc *abort_flag = 1; return; } + if ((chk->rec.data.rcv_flags & SCTP_DATA_UNORDERED) != + (next->rec.data.rcv_flags & SCTP_DATA_UNORDERED)) { + /* + * Huh, need the same ordering here, + * they must be the same. + */ + SCTPDBG(SCTP_DEBUG_INDATA1, "Next check - Gak, Evil plot, U-bit not constant\n"); + snprintf(msg, sizeof(msg), + "Expect U-bit=%d for TSN=%8.8x, got U-bit=%d", + (next->rec.data.rcv_flags & SCTP_DATA_UNORDERED) ? 1 : 0, + chk->rec.data.TSN_seq, + (chk->rec.data.rcv_flags & SCTP_DATA_UNORDERED) ? 1 : 0); + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_12; + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); + *abort_flag = 1; + return; + } if ((next->rec.data.rcv_flags & SCTP_DATA_UNORDERED) == 0 && chk->rec.data.stream_seq != next->rec.data.stream_seq) { From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 16:45:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89DA4BDA; Sun, 22 Jun 2014 16:45:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D3A923BC; Sun, 22 Jun 2014 16:45:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MGjhqw044901; Sun, 22 Jun 2014 16:45:43 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MGjhU9044900; Sun, 22 Jun 2014 16:45:43 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201406221645.s5MGjhU9044900@svn.freebsd.org> From: Michael Tuexen Date: Sun, 22 Jun 2014 16:45:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267733 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 16:45:43 -0000 Author: tuexen Date: Sun Jun 22 16:45:42 2014 New Revision: 267733 URL: http://svnweb.freebsd.org/changeset/base/267733 Log: MFC r264838: Don't free an mbuf twice. This only happens in very rare error cases where the peer sends illegal sequencing information in DATA chunks for an existing association. Modified: stable/10/sys/netinet/sctp_indata.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_indata.c ============================================================================== --- stable/10/sys/netinet/sctp_indata.c Sun Jun 22 16:43:59 2014 (r267732) +++ stable/10/sys/netinet/sctp_indata.c Sun Jun 22 16:45:42 2014 (r267733) @@ -1717,6 +1717,9 @@ failed_pdapi_express_del: stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_15; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; + if (last_chunk) { + *m = NULL; + } return (0); } else { if (sctp_does_tsn_belong_to_reasm(asoc, control->sinfo_tsn)) { @@ -1733,6 +1736,9 @@ failed_pdapi_express_del: stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_16; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; + if (last_chunk) { + *m = NULL; + } return (0); } } @@ -1759,6 +1765,9 @@ failed_pdapi_express_del: stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_17; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; + if (last_chunk) { + *m = NULL; + } return (0); } } @@ -1822,6 +1831,9 @@ failed_pdapi_express_del: } else { sctp_queue_data_to_stream(stcb, asoc, control, abort_flag); if (*abort_flag) { + if (last_chunk) { + *m = NULL; + } return (0); } } @@ -1834,7 +1846,9 @@ failed_pdapi_express_del: * the assoc is now gone and chk was put onto the * reasm queue, which has all been freed. */ - *m = NULL; + if (last_chunk) { + *m = NULL; + } return (0); } } From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 16:48:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 035BDDF6; Sun, 22 Jun 2014 16:48:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9B3A23CF; Sun, 22 Jun 2014 16:48:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MGmOKB045656; Sun, 22 Jun 2014 16:48:24 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MGmMAq045640; Sun, 22 Jun 2014 16:48:22 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201406221648.s5MGmMAq045640@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 22 Jun 2014 16:48:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267734 - in stable/10: . contrib/gcc etc etc/mtree gnu/usr.bin gnu/usr.bin/binutils/libbfd gnu/usr.bin/send-pr share/man/man7 share/termcap sys/mips/rmi sys/modules/svr4 usr.bin usr.bi... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 16:48:25 -0000 Author: gavin Date: Sun Jun 22 16:48:21 2014 New Revision: 267734 URL: http://svnweb.freebsd.org/changeset/base/267734 Log: Merge r267482,r267483,r267486,r267577,r267671,r267672 from head: Remove send-pr and fix up all references to it. Replace it with a stub send-pr directing people towards the web site. Added: stable/10/usr.bin/send-pr/ - copied from r267577, head/usr.bin/send-pr/ Deleted: stable/10/gnu/usr.bin/send-pr/ Modified: stable/10/MAINTAINERS stable/10/ObsoleteFiles.inc stable/10/contrib/gcc/version.c stable/10/etc/Makefile stable/10/etc/mtree/BSD.root.dist stable/10/gnu/usr.bin/Makefile stable/10/gnu/usr.bin/binutils/libbfd/Makefile stable/10/share/man/man7/hier.7 stable/10/share/man/man7/tests.7 stable/10/share/termcap/termcap.src stable/10/sys/mips/rmi/rootfs_list.txt stable/10/sys/modules/svr4/README stable/10/usr.bin/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/MAINTAINERS ============================================================================== --- stable/10/MAINTAINERS Sun Jun 22 16:45:42 2014 (r267733) +++ stable/10/MAINTAINERS Sun Jun 22 16:48:21 2014 (r267734) @@ -110,7 +110,6 @@ lib/libbluetooth emax Pre-commit review lib/libsdp emax Pre-commit review preferred. usr.bin/bluetooth emax Pre-commit review preferred. usr.sbin/bluetooth emax Pre-commit review preferred. -gnu/usr.bin/send-pr bugmaster Pre-commit review requested. *env(3) secteam Due to the problematic security history of this code, please have patches reviewed by secteam. share/zoneinfo edwin Heads-up appreciated, since our data is coming Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Sun Jun 22 16:45:42 2014 (r267733) +++ stable/10/ObsoleteFiles.inc Sun Jun 22 16:48:21 2014 (r267734) @@ -38,6 +38,10 @@ # xargs -n1 | sort | uniq -d; # done +# 20140614: send-pr removal +OLD_FILES+=usr/share/man/man1/send-pr.1.gz +OLD_FILES+=etc/gnats/freefall +OLD_DIRS+=etc/gnats # 20140512: new clang import which bumps version from 3.4 to 3.4.1. OLD_FILES+=usr/include/clang/3.4/__wmmintrin_aes.h OLD_FILES+=usr/include/clang/3.4/__wmmintrin_pclmul.h Modified: stable/10/contrib/gcc/version.c ============================================================================== --- stable/10/contrib/gcc/version.c Sun Jun 22 16:45:42 2014 (r267733) +++ stable/10/contrib/gcc/version.c Sun Jun 22 16:48:21 2014 (r267734) @@ -18,7 +18,7 @@ forward us bugs reported to you, if you determine that they are not bugs in your modifications.) */ -const char bug_report_url[] = ""; +const char bug_report_url[] = ""; /* The complete version string, assembled from several pieces. BASEVER, DATESTAMP, and DEVPHASE are defined by the Makefile. */ Modified: stable/10/etc/Makefile ============================================================================== --- stable/10/etc/Makefile Sun Jun 22 16:45:42 2014 (r267733) +++ stable/10/etc/Makefile Sun Jun 22 16:48:21 2014 (r267734) @@ -231,7 +231,6 @@ distribution: ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install ${_+_}cd ${.CURDIR}/pkg; ${MAKE} install ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install - ${_+_}cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap ${_+_}cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt ${_+_}cd ${.CURDIR}/pam.d; ${MAKE} install Modified: stable/10/etc/mtree/BSD.root.dist ============================================================================== --- stable/10/etc/mtree/BSD.root.dist Sun Jun 22 16:45:42 2014 (r267733) +++ stable/10/etc/mtree/BSD.root.dist Sun Jun 22 16:48:21 2014 (r267734) @@ -30,8 +30,6 @@ .. devd .. - gnats - .. gss .. mail Modified: stable/10/gnu/usr.bin/Makefile ============================================================================== --- stable/10/gnu/usr.bin/Makefile Sun Jun 22 16:45:42 2014 (r267733) +++ stable/10/gnu/usr.bin/Makefile Sun Jun 22 16:48:21 2014 (r267734) @@ -14,7 +14,6 @@ SUBDIR= ${_binutils} \ ${_groff} \ ${_rcs} \ sdiff \ - send-pr \ ${_tests} \ ${_texinfo} Modified: stable/10/gnu/usr.bin/binutils/libbfd/Makefile ============================================================================== --- stable/10/gnu/usr.bin/binutils/libbfd/Makefile Sun Jun 22 16:45:42 2014 (r267733) +++ stable/10/gnu/usr.bin/binutils/libbfd/Makefile Sun Jun 22 16:48:21 2014 (r267734) @@ -84,7 +84,7 @@ bfdver.h: Makefile echo '#define BFD_VERSION 217500000' > ${.TARGET} echo '#define BFD_VERSION_DATE 20070703' >> ${.TARGET} echo '#define BFD_VERSION_STRING ${VERSION}' >> ${.TARGET} - echo '#define REPORT_BUGS_TO ""' >> ${.TARGET} + echo '#define REPORT_BUGS_TO ""' >> ${.TARGET} targmatch.h: targmatch.sed config.bfd sed -f ${.ALLSRC:M*.sed} ${.ALLSRC:M*.bfd} > ${.TARGET} Modified: stable/10/share/man/man7/hier.7 ============================================================================== --- stable/10/share/man/man7/hier.7 Sun Jun 22 16:45:42 2014 (r267733) +++ stable/10/share/man/man7/hier.7 Sun Jun 22 16:48:21 2014 (r267734) @@ -90,10 +90,6 @@ see .Xr rc 8 .It Pa bluetooth/ bluetooth configuration files -.It Pa gnats/ -gnats configuration files; -see -.Xr send-pr 1 .It Pa localtime local timezone information; see Modified: stable/10/share/man/man7/tests.7 ============================================================================== --- stable/10/share/man/man7/tests.7 Sun Jun 22 16:45:42 2014 (r267733) +++ stable/10/share/man/man7/tests.7 Sun Jun 22 16:48:21 2014 (r267734) @@ -195,7 +195,7 @@ For more details please refer to: .It .Lk http://lists.freebsd.org/ "FreeBSD Mailing Lists" .It -.Lk http://www.freebsd.org/send-pr.html "Submit a FreeBSD Problem Report" +.Lk http://www.freebsd.org/support.html "Problem Reporting" .El .Sh FILES .Bl -tag -compact -width usrXlocalXetcXkyuaXkyuaXconfXX Modified: stable/10/share/termcap/termcap.src ============================================================================== --- stable/10/share/termcap/termcap.src Sun Jun 22 16:45:42 2014 (r267733) +++ stable/10/share/termcap/termcap.src Sun Jun 22 16:48:21 2014 (r267734) @@ -36,7 +36,7 @@ # John Kunze, Berkeley # Craig Leres, Berkeley # -# Please submit changes with send-pr(1). +# Please submit changes via https://bugs.freebsd.org/submit/ # # << EOH - after reordering, above header lines survive and this line dies >> # Modified: stable/10/sys/mips/rmi/rootfs_list.txt ============================================================================== --- stable/10/sys/mips/rmi/rootfs_list.txt Sun Jun 22 16:45:42 2014 (r267733) +++ stable/10/sys/mips/rmi/rootfs_list.txt Sun Jun 22 16:48:21 2014 (r267734) @@ -64,8 +64,6 @@ ./etc/defaults/rc.conf ./etc/devd ./etc/devd/asus.conf -./etc/gnats -./etc/gnats/freefall ./etc/gss ./etc/gss/mech ./etc/gss/qop Modified: stable/10/sys/modules/svr4/README ============================================================================== --- stable/10/sys/modules/svr4/README Sun Jun 22 16:45:42 2014 (r267733) +++ stable/10/sys/modules/svr4/README Sun Jun 22 16:48:21 2014 (r267734) @@ -30,7 +30,7 @@ To use it: It's early days yet, folks -- You'll probably have trouble getting 100% functionality out of most things (specifically, poll() on a socket doesn't look like it works at the moment, so Netscape doesn't work (among other -things)). Patches will be appreciated (use send-pr). +things)). Patches will be appreciated. - Mark Newton newton@atdot.dotat.org Modified: stable/10/usr.bin/Makefile ============================================================================== --- stable/10/usr.bin/Makefile Sun Jun 22 16:45:42 2014 (r267733) +++ stable/10/usr.bin/Makefile Sun Jun 22 16:48:21 2014 (r267734) @@ -143,6 +143,7 @@ SUBDIR= alias \ rwall \ script \ sed \ + send-pr \ seq \ shar \ showmount \ From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 16:50:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9E74F2A; Sun, 22 Jun 2014 16:50:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D672523D4; Sun, 22 Jun 2014 16:50:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MGokvC046822; Sun, 22 Jun 2014 16:50:46 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MGok2B046820; Sun, 22 Jun 2014 16:50:46 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201406221650.s5MGok2B046820@svn.freebsd.org> From: Michael Tuexen Date: Sun, 22 Jun 2014 16:50:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267735 - in stable/10/sys: dev/usb/net netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 16:50:47 -0000 Author: tuexen Date: Sun Jun 22 16:50:46 2014 New Revision: 267735 URL: http://svnweb.freebsd.org/changeset/base/267735 Log: MFC r265455: Remove unused code. This is triggered by the bugreport of Sylvestre Ledru which deal with useless code in the user land stack: https://bugzilla.mozilla.org/show_bug.cgi?id=1003929 Modified: stable/10/sys/dev/usb/net/if_smsc.c stable/10/sys/netinet/sctp_pcb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/net/if_smsc.c ============================================================================== --- stable/10/sys/dev/usb/net/if_smsc.c Sun Jun 22 16:48:21 2014 (r267734) +++ stable/10/sys/dev/usb/net/if_smsc.c Sun Jun 22 16:50:46 2014 (r267735) @@ -82,6 +82,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include + #include "opt_platform.h" #ifdef FDT @@ -1021,25 +1024,32 @@ smsc_bulk_read_callback(struct usb_xfer * * Ignore H/W csum for non-IPv4 packets. */ - if (be16toh(eh->ether_type) == ETHERTYPE_IP && pktlen > ETHER_MIN_LEN) { - - /* Indicate the UDP/TCP csum has been calculated */ - m->m_pkthdr.csum_flags |= CSUM_DATA_VALID; - - /* Copy the TCP/UDP checksum from the last 2 bytes - * of the transfer and put in the csum_data field. - */ - usbd_copy_out(pc, (off + pktlen), - &m->m_pkthdr.csum_data, 2); - - /* The data is copied in network order, but the - * csum algorithm in the kernel expects it to be - * in host network order. - */ - m->m_pkthdr.csum_data = ntohs(m->m_pkthdr.csum_data); - - smsc_dbg_printf(sc, "RX checksum offloaded (0x%04x)\n", - m->m_pkthdr.csum_data); + if ((be16toh(eh->ether_type) == ETHERTYPE_IP) && + (pktlen > ETHER_MIN_LEN)) { + struct ip *ip; + + ip = (struct ip *)(eh + 1); + if ((ip->ip_v == IPVERSION) && + ((ip->ip_p == IPPROTO_TCP) || + (ip->ip_p == IPPROTO_UDP))) { + /* Indicate the UDP/TCP csum has been calculated */ + m->m_pkthdr.csum_flags |= CSUM_DATA_VALID; + + /* Copy the TCP/UDP checksum from the last 2 bytes + * of the transfer and put in the csum_data field. + */ + usbd_copy_out(pc, (off + pktlen), + &m->m_pkthdr.csum_data, 2); + + /* The data is copied in network order, but the + * csum algorithm in the kernel expects it to be + * in host network order. + */ + m->m_pkthdr.csum_data = ntohs(m->m_pkthdr.csum_data); + + smsc_dbg_printf(sc, "RX checksum offloaded (0x%04x)\n", + m->m_pkthdr.csum_data); + } } /* Need to adjust the offset as well or we'll be off Modified: stable/10/sys/netinet/sctp_pcb.c ============================================================================== --- stable/10/sys/netinet/sctp_pcb.c Sun Jun 22 16:48:21 2014 (r267734) +++ stable/10/sys/netinet/sctp_pcb.c Sun Jun 22 16:50:46 2014 (r267735) @@ -2735,7 +2735,6 @@ sctp_inpcb_bind(struct socket *so, struc uint32_t vrf_id; lport = 0; - error = 0; bindall = 1; inp = (struct sctp_inpcb *)so->so_pcb; ip_inp = (struct inpcb *)so->so_pcb; @@ -2856,13 +2855,6 @@ sctp_inpcb_bind(struct socket *so, struc return (error); } } - if (p == NULL) { - SCTP_INP_DECR_REF(inp); - SCTP_INP_WUNLOCK(inp); - SCTP_INP_INFO_WUNLOCK(); - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, error); - return (error); - } SCTP_INP_WUNLOCK(inp); if (bindall) { vrf_id = inp->def_vrf_id; From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 16:55:00 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5E60E21B; Sun, 22 Jun 2014 16:55:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B480246B; Sun, 22 Jun 2014 16:55:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MGt0RG049783; Sun, 22 Jun 2014 16:55:00 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MGt014049782; Sun, 22 Jun 2014 16:55:00 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201406221655.s5MGt014049782@svn.freebsd.org> From: Michael Tuexen Date: Sun, 22 Jun 2014 16:55:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267736 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 16:55:00 -0000 Author: tuexen Date: Sun Jun 22 16:54:59 2014 New Revision: 267736 URL: http://svnweb.freebsd.org/changeset/base/267736 Log: MFC r265691: For some UDP packets (for example with 200 byte payload) and IP options, the IP header and the UDP header are not in the same mbuf. Add code to in_delayed_cksum() to deal with this case. MFC r265713: Use KASSERTs as suggested by glebius@ Modified: stable/10/sys/netinet/ip_output.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/ip_output.c ============================================================================== --- stable/10/sys/netinet/ip_output.c Sun Jun 22 16:50:46 2014 (r267735) +++ stable/10/sys/netinet/ip_output.c Sun Jun 22 16:54:59 2014 (r267736) @@ -864,17 +864,13 @@ in_delayed_cksum(struct mbuf *m) csum = 0xffff; offset += m->m_pkthdr.csum_data; /* checksum offset */ - if (offset + sizeof(u_short) > m->m_len) { - printf("delayed m_pullup, m->len: %d off: %d p: %d\n", - m->m_len, offset, ip->ip_p); - /* - * XXX - * this shouldn't happen, but if it does, the - * correct behavior may be to insert the checksum - * in the appropriate next mbuf in the chain. - */ - return; + /* find the mbuf in the chain where the checksum starts*/ + while ((m != NULL) && (offset >= m->m_len)) { + offset -= m->m_len; + m = m->m_next; } + KASSERT(m != NULL, ("in_delayed_cksum: checksum outside mbuf chain.")); + KASSERT(offset + sizeof(u_short) <= m->m_len, ("in_delayed_cksum: checksum split between mbufs.")); *(u_short *)(m->m_data + offset) = csum; } From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 16:57:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84C0E35F; Sun, 22 Jun 2014 16:57:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71C30247A; Sun, 22 Jun 2014 16:57:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MGv8mi050163; Sun, 22 Jun 2014 16:57:08 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MGv8Kn050162; Sun, 22 Jun 2014 16:57:08 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201406221657.s5MGv8Kn050162@svn.freebsd.org> From: Michael Tuexen Date: Sun, 22 Jun 2014 16:57:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267737 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 16:57:08 -0000 Author: tuexen Date: Sun Jun 22 16:57:07 2014 New Revision: 267737 URL: http://svnweb.freebsd.org/changeset/base/267737 Log: MFC r267105: Use ENOBUFS instead of ENOMEM in error situations related to m_uiotombuf(). This was suggested by kevlo@. Modified: stable/10/sys/netinet/sctp_output.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_output.c ============================================================================== --- stable/10/sys/netinet/sctp_output.c Sun Jun 22 16:54:59 2014 (r267736) +++ stable/10/sys/netinet/sctp_output.c Sun Jun 22 16:57:07 2014 (r267737) @@ -11911,8 +11911,8 @@ sctp_copy_resume(struct uio *uio, m = m_uiotombuf(uio, M_WAITOK, max_send_len, 0, (M_PKTHDR | (user_marks_eor ? M_EOR : 0))); if (m == NULL) { - SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, ENOMEM); - *error = ENOMEM; + SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, ENOBUFS); + *error = ENOBUFS; } else { *sndout = m_length(m, NULL); *new_tail = m_last(m); @@ -11931,8 +11931,8 @@ sctp_copy_one(struct sctp_stream_queue_p sp->data = m_uiotombuf(uio, M_WAITOK, sp->length, resv_upfront, 0); if (sp->data == NULL) { - SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, ENOMEM); - return (ENOMEM); + SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, ENOBUFS); + return (ENOBUFS); } sp->tail_mbuf = m_last(sp->data); return (0); From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 16:58:20 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DEA894DD; Sun, 22 Jun 2014 16:58:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8A6D248B; Sun, 22 Jun 2014 16:58:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MGwKgk050389; Sun, 22 Jun 2014 16:58:20 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MGwIKt050376; Sun, 22 Jun 2014 16:58:18 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201406221658.s5MGwIKt050376@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 22 Jun 2014 16:58:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267738 - in stable/9: . etc etc/mtree gnu/usr.bin gnu/usr.bin/binutils/libbfd gnu/usr.bin/send-pr share/man/man7 share/termcap sys/mips/rmi sys/modules/svr4 usr.bin X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 16:58:21 -0000 Author: gavin Date: Sun Jun 22 16:58:18 2014 New Revision: 267738 URL: http://svnweb.freebsd.org/changeset/base/267738 Log: Merge r267482,r267483,r267486,r267577,r267671,r267672 from head: Remove send-pr and fix up all references to it. Replace it with a stub send-pr directing people towards the web site. Added: - copied from r267577, head/usr.bin/send-pr/ Directory Properties: stable/9/usr.bin/send-pr/ (props changed) Deleted: stable/9/gnu/usr.bin/send-pr/ Modified: stable/9/MAINTAINERS (contents, props changed) stable/9/ObsoleteFiles.inc (contents, props changed) stable/9/etc/Makefile stable/9/etc/mtree/BSD.root.dist stable/9/gnu/usr.bin/Makefile stable/9/gnu/usr.bin/binutils/libbfd/Makefile stable/9/share/man/man7/hier.7 stable/9/share/termcap/termcap.src stable/9/sys/mips/rmi/rootfs_list.txt stable/9/sys/modules/svr4/README stable/9/usr.bin/Makefile Directory Properties: stable/9/etc/ (props changed) stable/9/etc/mtree/ (props changed) stable/9/gnu/usr.bin/ (props changed) stable/9/gnu/usr.bin/binutils/libbfd/ (props changed) stable/9/share/man/man7/ (props changed) stable/9/share/termcap/ (props changed) stable/9/sys/ (props changed) stable/9/sys/modules/svr4/ (props changed) stable/9/usr.bin/ (props changed) Modified: stable/9/MAINTAINERS ============================================================================== --- stable/9/MAINTAINERS Sun Jun 22 16:57:07 2014 (r267737) +++ stable/9/MAINTAINERS Sun Jun 22 16:58:18 2014 (r267738) @@ -114,7 +114,6 @@ lib/libbluetooth emax Pre-commit review lib/libsdp emax Pre-commit review preferred. usr.bin/bluetooth emax Pre-commit review preferred. usr.sbin/bluetooth emax Pre-commit review preferred. -gnu/usr.bin/send-pr bugmaster Pre-commit review requested. *env(3) secteam Due to the problematic security history of this code, please have patches reviewed by secteam. share/zoneinfo edwin Heads-up appreciated, since our data is coming Modified: stable/9/ObsoleteFiles.inc ============================================================================== --- stable/9/ObsoleteFiles.inc Sun Jun 22 16:57:07 2014 (r267737) +++ stable/9/ObsoleteFiles.inc Sun Jun 22 16:58:18 2014 (r267738) @@ -38,6 +38,10 @@ # xargs -n1 | sort | uniq -d; # done +# 20140614: send-pr removal +OLD_FILES+=usr/share/man/man1/send-pr.1.gz +OLD_FILES+=etc/gnats/freefall +OLD_DIRS+=etc/gnats # 20140512: new clang import which bumps version from 3.4 to 3.4.1. OLD_FILES+=usr/include/clang/3.4/__wmmintrin_aes.h OLD_FILES+=usr/include/clang/3.4/__wmmintrin_pclmul.h Modified: stable/9/etc/Makefile ============================================================================== --- stable/9/etc/Makefile Sun Jun 22 16:57:07 2014 (r267737) +++ stable/9/etc/Makefile Sun Jun 22 16:58:18 2014 (r267738) @@ -230,7 +230,6 @@ distribution: ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install ${_+_}cd ${.CURDIR}/pkg; ${MAKE} install ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install - ${_+_}cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap ${_+_}cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt ${_+_}cd ${.CURDIR}/pam.d; ${MAKE} install Modified: stable/9/etc/mtree/BSD.root.dist ============================================================================== --- stable/9/etc/mtree/BSD.root.dist Sun Jun 22 16:57:07 2014 (r267737) +++ stable/9/etc/mtree/BSD.root.dist Sun Jun 22 16:58:18 2014 (r267738) @@ -30,8 +30,6 @@ .. devd .. - gnats - .. gss .. mail Modified: stable/9/gnu/usr.bin/Makefile ============================================================================== --- stable/9/gnu/usr.bin/Makefile Sun Jun 22 16:57:07 2014 (r267737) +++ stable/9/gnu/usr.bin/Makefile Sun Jun 22 16:58:18 2014 (r267738) @@ -16,7 +16,6 @@ SUBDIR= ${_binutils} \ patch \ ${_rcs} \ sdiff \ - send-pr \ sort \ ${_texinfo} Modified: stable/9/gnu/usr.bin/binutils/libbfd/Makefile ============================================================================== --- stable/9/gnu/usr.bin/binutils/libbfd/Makefile Sun Jun 22 16:57:07 2014 (r267737) +++ stable/9/gnu/usr.bin/binutils/libbfd/Makefile Sun Jun 22 16:58:18 2014 (r267738) @@ -84,7 +84,7 @@ bfdver.h: Makefile echo '#define BFD_VERSION 217500000' > ${.TARGET} echo '#define BFD_VERSION_DATE 20070703' >> ${.TARGET} echo '#define BFD_VERSION_STRING ${VERSION}' >> ${.TARGET} - echo '#define REPORT_BUGS_TO ""' >> ${.TARGET} + echo '#define REPORT_BUGS_TO ""' >> ${.TARGET} targmatch.h: targmatch.sed config.bfd sed -f ${.ALLSRC:M*.sed} ${.ALLSRC:M*.bfd} > ${.TARGET} Modified: stable/9/share/man/man7/hier.7 ============================================================================== --- stable/9/share/man/man7/hier.7 Sun Jun 22 16:57:07 2014 (r267737) +++ stable/9/share/man/man7/hier.7 Sun Jun 22 16:58:18 2014 (r267738) @@ -97,10 +97,6 @@ see .Xr rc 8 .It Pa bluetooth/ bluetooth configuration files -.It Pa gnats/ -gnats configuration files; -see -.Xr send-pr 1 .It Pa localtime local timezone information; see Modified: stable/9/share/termcap/termcap.src ============================================================================== --- stable/9/share/termcap/termcap.src Sun Jun 22 16:57:07 2014 (r267737) +++ stable/9/share/termcap/termcap.src Sun Jun 22 16:58:18 2014 (r267738) @@ -36,7 +36,7 @@ # John Kunze, Berkeley # Craig Leres, Berkeley # -# Please submit changes with send-pr(1). +# Please submit changes via https://bugs.freebsd.org/submit/ # # << EOH - after reordering, above header lines survive and this line dies >> # Modified: stable/9/sys/mips/rmi/rootfs_list.txt ============================================================================== --- stable/9/sys/mips/rmi/rootfs_list.txt Sun Jun 22 16:57:07 2014 (r267737) +++ stable/9/sys/mips/rmi/rootfs_list.txt Sun Jun 22 16:58:18 2014 (r267738) @@ -64,8 +64,6 @@ ./etc/defaults/rc.conf ./etc/devd ./etc/devd/asus.conf -./etc/gnats -./etc/gnats/freefall ./etc/gss ./etc/gss/mech ./etc/gss/qop Modified: stable/9/sys/modules/svr4/README ============================================================================== --- stable/9/sys/modules/svr4/README Sun Jun 22 16:57:07 2014 (r267737) +++ stable/9/sys/modules/svr4/README Sun Jun 22 16:58:18 2014 (r267738) @@ -30,7 +30,7 @@ To use it: It's early days yet, folks -- You'll probably have trouble getting 100% functionality out of most things (specifically, poll() on a socket doesn't look like it works at the moment, so Netscape doesn't work (among other -things)). Patches will be appreciated (use send-pr). +things)). Patches will be appreciated. - Mark Newton newton@atdot.dotat.org Modified: stable/9/usr.bin/Makefile ============================================================================== --- stable/9/usr.bin/Makefile Sun Jun 22 16:57:07 2014 (r267737) +++ stable/9/usr.bin/Makefile Sun Jun 22 16:58:18 2014 (r267738) @@ -139,6 +139,7 @@ SUBDIR= alias \ rwall \ script \ sed \ + send-pr \ seq \ shar \ showmount \ From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 16:58:29 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E067A610; Sun, 22 Jun 2014 16:58:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC4AA248D; Sun, 22 Jun 2014 16:58:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MGwTDv050477; Sun, 22 Jun 2014 16:58:29 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MGwT4K050476; Sun, 22 Jun 2014 16:58:29 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201406221658.s5MGwT4K050476@svn.freebsd.org> From: Michael Tuexen Date: Sun, 22 Jun 2014 16:58:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267739 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 16:58:30 -0000 Author: tuexen Date: Sun Jun 22 16:58:29 2014 New Revision: 267739 URL: http://svnweb.freebsd.org/changeset/base/267739 Log: MFC r267329: Add support for the SCTP_LOCAL_TRACE_BUF options. While there, fix some whitespaces. Modified: stable/10/sys/conf/options Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/options ============================================================================== --- stable/10/sys/conf/options Sun Jun 22 16:58:18 2014 (r267738) +++ stable/10/sys/conf/options Sun Jun 22 16:58:29 2014 (r267739) @@ -455,8 +455,9 @@ SCTP_MBCNT_LOGGING opt_sctp.h # Log to K SCTP_PACKET_LOGGING opt_sctp.h # Log to a packet buffer last N packets SCTP_LTRACE_CHUNKS opt_sctp.h # Log to KTR chunks processed SCTP_LTRACE_ERRORS opt_sctp.h # Log to KTR error returns. -SCTP_USE_PERCPU_STAT opt_sctp.h # Use per cpu stats. -SCTP_MCORE_INPUT opt_sctp.h # Have multiple input threads for input mbufs +SCTP_USE_PERCPU_STAT opt_sctp.h # Use per cpu stats. +SCTP_MCORE_INPUT opt_sctp.h # Have multiple input threads for input mbufs +SCTP_LOCAL_TRACE_BUF opt_sctp.h # Use tracebuffer exported via sysctl # # # From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 18:01:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35C5225B; Sun, 22 Jun 2014 18:01:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16C73294C; Sun, 22 Jun 2014 18:01:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MI1eBp081054; Sun, 22 Jun 2014 18:01:40 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MI1efW081051; Sun, 22 Jun 2014 18:01:40 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406221801.s5MI1efW081051@svn.freebsd.org> From: Alexander Motin Date: Sun, 22 Jun 2014 18:01:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267740 - in stable/10/sys: nfs rpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 18:01:41 -0000 Author: mav Date: Sun Jun 22 18:01:40 2014 New Revision: 267740 URL: http://svnweb.freebsd.org/changeset/base/267740 Log: MFC r267221, r267278: Introduce new per-thread lock to protect the list of requests. This allows to slightly simplify svc_run_internal() code: if we processed all the requests in a queue, then we know that new one will not appear. Modified: stable/10/sys/nfs/nfs_fha.c stable/10/sys/rpc/svc.c stable/10/sys/rpc/svc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/nfs/nfs_fha.c ============================================================================== --- stable/10/sys/nfs/nfs_fha.c Sun Jun 22 16:58:29 2014 (r267739) +++ stable/10/sys/nfs/nfs_fha.c Sun Jun 22 18:01:40 2014 (r267740) @@ -288,11 +288,7 @@ fha_hash_entry_add_op(struct fha_hash_en * Get the service thread currently associated with the fhe that is * appropriate to handle this operation. */ -SVCTHREAD * -fha_hash_entry_choose_thread(struct fha_params *softc, - struct fha_hash_entry *fhe, struct fha_info *i, SVCTHREAD *this_thread); - -SVCTHREAD * +static SVCTHREAD * fha_hash_entry_choose_thread(struct fha_params *softc, struct fha_hash_entry *fhe, struct fha_info *i, SVCTHREAD *this_thread) { @@ -428,13 +424,13 @@ fha_assign(SVCTHREAD *this_thread, struc * Grab the pool lock here to not let chosen thread go away before * the new request inserted to its queue while we drop fhe lock. */ - mtx_lock(&(*softc->pool)->sp_lock); + mtx_lock(&thread->st_lock); mtx_unlock(fhe->mtx); return (thread); thist: req->rq_p1 = NULL; - mtx_lock(&(*softc->pool)->sp_lock); + mtx_lock(&this_thread->st_lock); return (this_thread); } Modified: stable/10/sys/rpc/svc.c ============================================================================== --- stable/10/sys/rpc/svc.c Sun Jun 22 16:58:29 2014 (r267739) +++ stable/10/sys/rpc/svc.c Sun Jun 22 18:01:40 2014 (r267740) @@ -1070,7 +1070,6 @@ svc_request_space_available(SVCPOOL *poo static void svc_run_internal(SVCPOOL *pool, bool_t ismaster) { - struct svc_reqlist reqs; SVCTHREAD *st, *stpref; SVCXPRT *xprt; enum xprt_stat stat; @@ -1079,11 +1078,11 @@ svc_run_internal(SVCPOOL *pool, bool_t i int error; st = mem_alloc(sizeof(*st)); + mtx_init(&st->st_lock, "st_lock", NULL, MTX_DEF); st->st_pool = pool; st->st_xprt = NULL; STAILQ_INIT(&st->st_reqs); cv_init(&st->st_cond, "rpcsvc"); - STAILQ_INIT(&reqs); mtx_lock(&pool->sp_lock); LIST_INSERT_HEAD(&pool->sp_threads, st, st_link); @@ -1117,7 +1116,7 @@ svc_run_internal(SVCPOOL *pool, bool_t i } xprt = st->st_xprt; - if (!xprt && STAILQ_EMPTY(&st->st_reqs)) { + if (!xprt) { /* * Enforce maxthreads count. */ @@ -1159,8 +1158,7 @@ svc_run_internal(SVCPOOL *pool, bool_t i if (!ismaster && (pool->sp_threadcount > pool->sp_minthreads) - && !st->st_xprt - && STAILQ_EMPTY(&st->st_reqs)) + && !st->st_xprt) break; } else if (error) { mtx_unlock(&pool->sp_lock); @@ -1170,93 +1168,71 @@ svc_run_internal(SVCPOOL *pool, bool_t i } continue; } + mtx_unlock(&pool->sp_lock); - if (xprt) { - /* - * Drain the transport socket and queue up any - * RPCs. - */ - xprt->xp_lastactive = time_uptime; - do { - if (!svc_request_space_available(pool)) - break; - mtx_unlock(&pool->sp_lock); - rqstp = NULL; - stat = svc_getreq(xprt, &rqstp); - if (rqstp) { - svc_change_space_used(pool, rqstp->rq_size); - /* - * See if the application has - * a preference for some other - * thread. - */ - stpref = st; - if (pool->sp_assign) - stpref = pool->sp_assign(st, - rqstp); - else - mtx_lock(&pool->sp_lock); - + /* + * Drain the transport socket and queue up any RPCs. + */ + xprt->xp_lastactive = time_uptime; + do { + if (!svc_request_space_available(pool)) + break; + rqstp = NULL; + stat = svc_getreq(xprt, &rqstp); + if (rqstp) { + svc_change_space_used(pool, rqstp->rq_size); + /* + * See if the application has a preference + * for some other thread. + */ + if (pool->sp_assign) { + stpref = pool->sp_assign(st, rqstp); rqstp->rq_thread = stpref; STAILQ_INSERT_TAIL(&stpref->st_reqs, rqstp, rq_link); - - /* - * If we assigned the request - * to another thread, make - * sure its awake and continue - * reading from the - * socket. Otherwise, try to - * find some other thread to - * read from the socket and - * execute the request - * immediately. - */ - if (stpref == st) - break; - if (stpref->st_idle) { - LIST_REMOVE(stpref, st_ilink); - stpref->st_idle = FALSE; - cv_signal(&stpref->st_cond); - } - } else - mtx_lock(&pool->sp_lock); - } while (stat == XPRT_MOREREQS - && pool->sp_state != SVCPOOL_CLOSING); - - /* - * Move this transport to the end of the - * active list to ensure fairness when - * multiple transports are active. If this was - * the last queued request, svc_getreq will - * end up calling xprt_inactive to remove from - * the active list. - */ - xprt->xp_thread = NULL; - st->st_xprt = NULL; - if (xprt->xp_active) { - if (!svc_request_space_available(pool) || - !xprt_assignthread(xprt)) - TAILQ_INSERT_TAIL(&pool->sp_active, - xprt, xp_alink); + mtx_unlock(&stpref->st_lock); + if (stpref != st) + rqstp = NULL; + } else { + rqstp->rq_thread = st; + STAILQ_INSERT_TAIL(&st->st_reqs, + rqstp, rq_link); + } } - STAILQ_CONCAT(&reqs, &st->st_reqs); - mtx_unlock(&pool->sp_lock); - SVC_RELEASE(xprt); - } else { - STAILQ_CONCAT(&reqs, &st->st_reqs); - mtx_unlock(&pool->sp_lock); + } while (rqstp == NULL && stat == XPRT_MOREREQS + && pool->sp_state != SVCPOOL_CLOSING); + + /* + * Move this transport to the end of the active list to + * ensure fairness when multiple transports are active. + * If this was the last queued request, svc_getreq will end + * up calling xprt_inactive to remove from the active list. + */ + mtx_lock(&pool->sp_lock); + xprt->xp_thread = NULL; + st->st_xprt = NULL; + if (xprt->xp_active) { + if (!svc_request_space_available(pool) || + !xprt_assignthread(xprt)) + TAILQ_INSERT_TAIL(&pool->sp_active, + xprt, xp_alink); } + mtx_unlock(&pool->sp_lock); + SVC_RELEASE(xprt); /* * Execute what we have queued. */ sz = 0; - while ((rqstp = STAILQ_FIRST(&reqs)) != NULL) { - STAILQ_REMOVE_HEAD(&reqs, rq_link); + mtx_lock(&st->st_lock); + while ((rqstp = STAILQ_FIRST(&st->st_reqs)) != NULL) { + STAILQ_REMOVE_HEAD(&st->st_reqs, rq_link); + mtx_unlock(&st->st_lock); sz += rqstp->rq_size; svc_executereq(rqstp); + mtx_lock(&st->st_lock); } + mtx_unlock(&st->st_lock); svc_change_space_used(pool, -sz); mtx_lock(&pool->sp_lock); } @@ -1273,6 +1249,7 @@ svc_run_internal(SVCPOOL *pool, bool_t i mtx_unlock(&pool->sp_lock); + mtx_destroy(&st->st_lock); cv_destroy(&st->st_cond); mem_free(st, sizeof(*st)); Modified: stable/10/sys/rpc/svc.h ============================================================================== --- stable/10/sys/rpc/svc.h Sun Jun 22 16:58:29 2014 (r267739) +++ stable/10/sys/rpc/svc.h Sun Jun 22 18:01:40 2014 (r267740) @@ -291,6 +291,7 @@ STAILQ_HEAD(svc_reqlist, svc_req); * thread to read and execute pending RPCs. */ typedef struct __rpc_svcthread { + struct mtx_padalign st_lock; /* protects st_reqs field */ struct __rpc_svcpool *st_pool; SVCXPRT *st_xprt; /* transport we are processing */ struct svc_reqlist st_reqs; /* RPC requests to execute */ From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 18:02:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1624239A; Sun, 22 Jun 2014 18:02:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF57F2954; Sun, 22 Jun 2014 18:02:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MI2dAr082195; Sun, 22 Jun 2014 18:02:39 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MI2d0P082193; Sun, 22 Jun 2014 18:02:39 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406221802.s5MI2d0P082193@svn.freebsd.org> From: Alexander Motin Date: Sun, 22 Jun 2014 18:02:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267741 - stable/10/sys/rpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 18:02:40 -0000 Author: mav Date: Sun Jun 22 18:02:39 2014 New Revision: 267741 URL: http://svnweb.freebsd.org/changeset/base/267741 Log: MFC r267223: Remove st_idle variable, duplicating st_xprt. Modified: stable/10/sys/rpc/svc.c stable/10/sys/rpc/svc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/rpc/svc.c ============================================================================== --- stable/10/sys/rpc/svc.c Sun Jun 22 18:01:40 2014 (r267740) +++ stable/10/sys/rpc/svc.c Sun Jun 22 18:02:39 2014 (r267741) @@ -340,7 +340,6 @@ xprt_assignthread(SVCXPRT *xprt) st = LIST_FIRST(&pool->sp_idlethreads); if (st) { LIST_REMOVE(st, st_ilink); - st->st_idle = FALSE; SVC_ACQUIRE(xprt); xprt->xp_thread = st; st->st_xprt = xprt; @@ -1138,7 +1137,6 @@ svc_run_internal(SVCPOOL *pool, bool_t i } LIST_INSERT_HEAD(&pool->sp_idlethreads, st, st_ilink); - st->st_idle = TRUE; if (ismaster || (!ismaster && pool->sp_threadcount > pool->sp_minthreads)) error = cv_timedwait_sig(&st->st_cond, @@ -1146,10 +1144,8 @@ svc_run_internal(SVCPOOL *pool, bool_t i else error = cv_wait_sig(&st->st_cond, &pool->sp_lock); - if (st->st_idle) { + if (st->st_xprt == NULL) LIST_REMOVE(st, st_ilink); - st->st_idle = FALSE; - } /* * Reduce worker thread count when idle. Modified: stable/10/sys/rpc/svc.h ============================================================================== --- stable/10/sys/rpc/svc.h Sun Jun 22 18:01:40 2014 (r267740) +++ stable/10/sys/rpc/svc.h Sun Jun 22 18:02:39 2014 (r267741) @@ -295,7 +295,6 @@ typedef struct __rpc_svcthread { struct __rpc_svcpool *st_pool; SVCXPRT *st_xprt; /* transport we are processing */ struct svc_reqlist st_reqs; /* RPC requests to execute */ - int st_idle; /* thread is on idle list */ struct cv st_cond; /* sleeping for work */ LIST_ENTRY(__rpc_svcthread) st_link; /* all threads list */ LIST_ENTRY(__rpc_svcthread) st_ilink; /* idle threads list */ From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 18:03:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ECAD64D1; Sun, 22 Jun 2014 18:03:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8B71295B; Sun, 22 Jun 2014 18:03:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MI3ri5082447; Sun, 22 Jun 2014 18:03:53 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MI3r93082444; Sun, 22 Jun 2014 18:03:53 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406221803.s5MI3r93082444@svn.freebsd.org> From: Alexander Motin Date: Sun, 22 Jun 2014 18:03:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267742 - stable/10/sys/rpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 18:03:54 -0000 Author: mav Date: Sun Jun 22 18:03:53 2014 New Revision: 267742 URL: http://svnweb.freebsd.org/changeset/base/267742 Log: MFC r267228: Split RPC pool threads into number of smaller semi-isolated groups. Old design with unified thread pool was good from the point of thread utilization. But single pool-wide mutex became huge congestion point for systems with many CPUs. To reduce the congestion create several thread groups within a pool (one group for every 6 CPUs and 12 threads), each group with own mutex. Each connection during its registration is assigned to one of the groups in round-robin fashion. File affinify code may still move requests between the groups, but otherwise groups are self-contained. Modified: stable/10/sys/rpc/svc.c stable/10/sys/rpc/svc.h stable/10/sys/rpc/svc_generic.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/rpc/svc.c ============================================================================== --- stable/10/sys/rpc/svc.c Sun Jun 22 18:02:39 2014 (r267741) +++ stable/10/sys/rpc/svc.c Sun Jun 22 18:03:53 2014 (r267742) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -70,7 +71,7 @@ __FBSDID("$FreeBSD$"); static struct svc_callout *svc_find(SVCPOOL *pool, rpcprog_t, rpcvers_t, char *); -static void svc_new_thread(SVCPOOL *pool); +static void svc_new_thread(SVCGROUP *grp); static void xprt_unregister_locked(SVCXPRT *xprt); static void svc_change_space_used(SVCPOOL *pool, int delta); static bool_t svc_request_space_available(SVCPOOL *pool); @@ -79,11 +80,14 @@ static bool_t svc_request_space_availabl static int svcpool_minthread_sysctl(SYSCTL_HANDLER_ARGS); static int svcpool_maxthread_sysctl(SYSCTL_HANDLER_ARGS); +static int svcpool_threads_sysctl(SYSCTL_HANDLER_ARGS); SVCPOOL* svcpool_create(const char *name, struct sysctl_oid_list *sysctl_base) { SVCPOOL *pool; + SVCGROUP *grp; + int g; pool = malloc(sizeof(SVCPOOL), M_RPC, M_WAITOK|M_ZERO); @@ -91,15 +95,22 @@ svcpool_create(const char *name, struct pool->sp_name = name; pool->sp_state = SVCPOOL_INIT; pool->sp_proc = NULL; - TAILQ_INIT(&pool->sp_xlist); - TAILQ_INIT(&pool->sp_active); TAILQ_INIT(&pool->sp_callouts); TAILQ_INIT(&pool->sp_lcallouts); - LIST_INIT(&pool->sp_threads); - LIST_INIT(&pool->sp_idlethreads); pool->sp_minthreads = 1; pool->sp_maxthreads = 1; - pool->sp_threadcount = 0; + pool->sp_groupcount = 1; + for (g = 0; g < SVC_MAXGROUPS; g++) { + grp = &pool->sp_groups[g]; + mtx_init(&grp->sg_lock, "sg_lock", NULL, MTX_DEF); + grp->sg_pool = pool; + grp->sg_state = SVCPOOL_ACTIVE; + TAILQ_INIT(&grp->sg_xlist); + TAILQ_INIT(&grp->sg_active); + LIST_INIT(&grp->sg_idlethreads); + grp->sg_minthreads = 1; + grp->sg_maxthreads = 1; + } /* * Don't use more than a quarter of mbuf clusters or more than @@ -114,12 +125,19 @@ svcpool_create(const char *name, struct if (sysctl_base) { SYSCTL_ADD_PROC(&pool->sp_sysctl, sysctl_base, OID_AUTO, "minthreads", CTLTYPE_INT | CTLFLAG_RW, - pool, 0, svcpool_minthread_sysctl, "I", ""); + pool, 0, svcpool_minthread_sysctl, "I", + "Minimal number of threads"); SYSCTL_ADD_PROC(&pool->sp_sysctl, sysctl_base, OID_AUTO, "maxthreads", CTLTYPE_INT | CTLFLAG_RW, - pool, 0, svcpool_maxthread_sysctl, "I", ""); + pool, 0, svcpool_maxthread_sysctl, "I", + "Maximal number of threads"); + SYSCTL_ADD_PROC(&pool->sp_sysctl, sysctl_base, OID_AUTO, + "threads", CTLTYPE_INT | CTLFLAG_RD, + pool, 0, svcpool_threads_sysctl, "I", + "Current number of threads"); SYSCTL_ADD_INT(&pool->sp_sysctl, sysctl_base, OID_AUTO, - "threads", CTLFLAG_RD, &pool->sp_threadcount, 0, ""); + "groups", CTLFLAG_RD, &pool->sp_groupcount, 0, + "Number of thread groups"); SYSCTL_ADD_UINT(&pool->sp_sysctl, sysctl_base, OID_AUTO, "request_space_used", CTLFLAG_RD, @@ -158,20 +176,29 @@ svcpool_create(const char *name, struct void svcpool_destroy(SVCPOOL *pool) { + SVCGROUP *grp; SVCXPRT *xprt, *nxprt; struct svc_callout *s; struct svc_loss_callout *sl; struct svcxprt_list cleanup; + int g; TAILQ_INIT(&cleanup); - mtx_lock(&pool->sp_lock); - while (TAILQ_FIRST(&pool->sp_xlist)) { - xprt = TAILQ_FIRST(&pool->sp_xlist); - xprt_unregister_locked(xprt); - TAILQ_INSERT_TAIL(&cleanup, xprt, xp_link); + for (g = 0; g < SVC_MAXGROUPS; g++) { + grp = &pool->sp_groups[g]; + mtx_lock(&grp->sg_lock); + while ((xprt = TAILQ_FIRST(&grp->sg_xlist)) != NULL) { + xprt_unregister_locked(xprt); + TAILQ_INSERT_TAIL(&cleanup, xprt, xp_link); + } + mtx_unlock(&grp->sg_lock); + } + TAILQ_FOREACH_SAFE(xprt, &cleanup, xp_link, nxprt) { + SVC_RELEASE(xprt); } + mtx_lock(&pool->sp_lock); while ((s = TAILQ_FIRST(&pool->sp_callouts)) != NULL) { mtx_unlock(&pool->sp_lock); svc_unreg(pool, s->sc_prog, s->sc_vers); @@ -184,10 +211,10 @@ svcpool_destroy(SVCPOOL *pool) } mtx_unlock(&pool->sp_lock); - TAILQ_FOREACH_SAFE(xprt, &cleanup, xp_link, nxprt) { - SVC_RELEASE(xprt); + for (g = 0; g < SVC_MAXGROUPS; g++) { + grp = &pool->sp_groups[g]; + mtx_destroy(&grp->sg_lock); } - mtx_destroy(&pool->sp_lock); if (pool->sp_rcache) @@ -197,14 +224,23 @@ svcpool_destroy(SVCPOOL *pool) free(pool, M_RPC); } -static bool_t -svcpool_active(SVCPOOL *pool) +/* + * Sysctl handler to get the present thread count on a pool + */ +static int +svcpool_threads_sysctl(SYSCTL_HANDLER_ARGS) { - enum svcpool_state state = pool->sp_state; + SVCPOOL *pool; + int threads, error, g; - if (state == SVCPOOL_INIT || state == SVCPOOL_CLOSING) - return (FALSE); - return (TRUE); + pool = oidp->oid_arg1; + threads = 0; + mtx_lock(&pool->sp_lock); + for (g = 0; g < pool->sp_groupcount; g++) + threads += pool->sp_groups[g].sg_threadcount; + mtx_unlock(&pool->sp_lock); + error = sysctl_handle_int(oidp, &threads, 0, req); + return (error); } /* @@ -214,7 +250,7 @@ static int svcpool_minthread_sysctl(SYSCTL_HANDLER_ARGS) { SVCPOOL *pool; - int newminthreads, error, n; + int newminthreads, error, g; pool = oidp->oid_arg1; newminthreads = pool->sp_minthreads; @@ -223,21 +259,11 @@ svcpool_minthread_sysctl(SYSCTL_HANDLER_ if (newminthreads > pool->sp_maxthreads) return (EINVAL); mtx_lock(&pool->sp_lock); - if (newminthreads > pool->sp_minthreads - && svcpool_active(pool)) { - /* - * If the pool is running and we are - * increasing, create some more threads now. - */ - n = newminthreads - pool->sp_threadcount; - if (n > 0) { - mtx_unlock(&pool->sp_lock); - while (n--) - svc_new_thread(pool); - mtx_lock(&pool->sp_lock); - } - } pool->sp_minthreads = newminthreads; + for (g = 0; g < pool->sp_groupcount; g++) { + pool->sp_groups[g].sg_minthreads = max(1, + pool->sp_minthreads / pool->sp_groupcount); + } mtx_unlock(&pool->sp_lock); } return (error); @@ -250,8 +276,7 @@ static int svcpool_maxthread_sysctl(SYSCTL_HANDLER_ARGS) { SVCPOOL *pool; - SVCTHREAD *st; - int newmaxthreads, error; + int newmaxthreads, error, g; pool = oidp->oid_arg1; newmaxthreads = pool->sp_maxthreads; @@ -260,17 +285,11 @@ svcpool_maxthread_sysctl(SYSCTL_HANDLER_ if (newmaxthreads < pool->sp_minthreads) return (EINVAL); mtx_lock(&pool->sp_lock); - if (newmaxthreads < pool->sp_maxthreads - && svcpool_active(pool)) { - /* - * If the pool is running and we are - * decreasing, wake up some idle threads to - * encourage them to exit. - */ - LIST_FOREACH(st, &pool->sp_idlethreads, st_ilink) - cv_signal(&st->st_cond); - } pool->sp_maxthreads = newmaxthreads; + for (g = 0; g < pool->sp_groupcount; g++) { + pool->sp_groups[g].sg_maxthreads = max(1, + pool->sp_maxthreads / pool->sp_groupcount); + } mtx_unlock(&pool->sp_lock); } return (error); @@ -283,13 +302,17 @@ void xprt_register(SVCXPRT *xprt) { SVCPOOL *pool = xprt->xp_pool; + SVCGROUP *grp; + int g; SVC_ACQUIRE(xprt); - mtx_lock(&pool->sp_lock); + g = atomic_fetchadd_int(&pool->sp_nextgroup, 1) % pool->sp_groupcount; + xprt->xp_group = grp = &pool->sp_groups[g]; + mtx_lock(&grp->sg_lock); xprt->xp_registered = TRUE; xprt->xp_active = FALSE; - TAILQ_INSERT_TAIL(&pool->sp_xlist, xprt, xp_link); - mtx_unlock(&pool->sp_lock); + TAILQ_INSERT_TAIL(&grp->sg_xlist, xprt, xp_link); + mtx_unlock(&grp->sg_lock); } /* @@ -300,29 +323,29 @@ xprt_register(SVCXPRT *xprt) static void xprt_unregister_locked(SVCXPRT *xprt) { - SVCPOOL *pool = xprt->xp_pool; + SVCGROUP *grp = xprt->xp_group; - mtx_assert(&pool->sp_lock, MA_OWNED); + mtx_assert(&grp->sg_lock, MA_OWNED); KASSERT(xprt->xp_registered == TRUE, ("xprt_unregister_locked: not registered")); xprt_inactive_locked(xprt); - TAILQ_REMOVE(&pool->sp_xlist, xprt, xp_link); + TAILQ_REMOVE(&grp->sg_xlist, xprt, xp_link); xprt->xp_registered = FALSE; } void xprt_unregister(SVCXPRT *xprt) { - SVCPOOL *pool = xprt->xp_pool; + SVCGROUP *grp = xprt->xp_group; - mtx_lock(&pool->sp_lock); + mtx_lock(&grp->sg_lock); if (xprt->xp_registered == FALSE) { /* Already unregistered by another thread */ - mtx_unlock(&pool->sp_lock); + mtx_unlock(&grp->sg_lock); return; } xprt_unregister_locked(xprt); - mtx_unlock(&pool->sp_lock); + mtx_unlock(&grp->sg_lock); SVC_RELEASE(xprt); } @@ -333,11 +356,11 @@ xprt_unregister(SVCXPRT *xprt) static int xprt_assignthread(SVCXPRT *xprt) { - SVCPOOL *pool = xprt->xp_pool; + SVCGROUP *grp = xprt->xp_group; SVCTHREAD *st; - mtx_assert(&pool->sp_lock, MA_OWNED); - st = LIST_FIRST(&pool->sp_idlethreads); + mtx_assert(&grp->sg_lock, MA_OWNED); + st = LIST_FIRST(&grp->sg_idlethreads); if (st) { LIST_REMOVE(st, st_ilink); SVC_ACQUIRE(xprt); @@ -354,10 +377,10 @@ xprt_assignthread(SVCXPRT *xprt) * from a socket upcall). Don't create more * than one thread per second. */ - if (pool->sp_state == SVCPOOL_ACTIVE - && pool->sp_lastcreatetime < time_uptime - && pool->sp_threadcount < pool->sp_maxthreads) { - pool->sp_state = SVCPOOL_THREADWANTED; + if (grp->sg_state == SVCPOOL_ACTIVE + && grp->sg_lastcreatetime < time_uptime + && grp->sg_threadcount < grp->sg_maxthreads) { + grp->sg_state = SVCPOOL_THREADWANTED; } } return (FALSE); @@ -366,40 +389,40 @@ xprt_assignthread(SVCXPRT *xprt) void xprt_active(SVCXPRT *xprt) { - SVCPOOL *pool = xprt->xp_pool; + SVCGROUP *grp = xprt->xp_group; - mtx_lock(&pool->sp_lock); + mtx_lock(&grp->sg_lock); if (!xprt->xp_registered) { /* * Race with xprt_unregister - we lose. */ - mtx_unlock(&pool->sp_lock); + mtx_unlock(&grp->sg_lock); return; } if (!xprt->xp_active) { xprt->xp_active = TRUE; if (xprt->xp_thread == NULL) { - if (!svc_request_space_available(pool) || + if (!svc_request_space_available(xprt->xp_pool) || !xprt_assignthread(xprt)) - TAILQ_INSERT_TAIL(&pool->sp_active, xprt, + TAILQ_INSERT_TAIL(&grp->sg_active, xprt, xp_alink); } } - mtx_unlock(&pool->sp_lock); + mtx_unlock(&grp->sg_lock); } void xprt_inactive_locked(SVCXPRT *xprt) { - SVCPOOL *pool = xprt->xp_pool; + SVCGROUP *grp = xprt->xp_group; - mtx_assert(&pool->sp_lock, MA_OWNED); + mtx_assert(&grp->sg_lock, MA_OWNED); if (xprt->xp_active) { if (xprt->xp_thread == NULL) - TAILQ_REMOVE(&pool->sp_active, xprt, xp_alink); + TAILQ_REMOVE(&grp->sg_active, xprt, xp_alink); xprt->xp_active = FALSE; } } @@ -407,11 +430,11 @@ xprt_inactive_locked(SVCXPRT *xprt) void xprt_inactive(SVCXPRT *xprt) { - SVCPOOL *pool = xprt->xp_pool; + SVCGROUP *grp = xprt->xp_group; - mtx_lock(&pool->sp_lock); + mtx_lock(&grp->sg_lock); xprt_inactive_locked(xprt); - mtx_unlock(&pool->sp_lock); + mtx_unlock(&grp->sg_lock); } /* @@ -991,14 +1014,14 @@ svc_executereq(struct svc_req *rqstp) } static void -svc_checkidle(SVCPOOL *pool) +svc_checkidle(SVCGROUP *grp) { SVCXPRT *xprt, *nxprt; time_t timo; struct svcxprt_list cleanup; TAILQ_INIT(&cleanup); - TAILQ_FOREACH_SAFE(xprt, &pool->sp_xlist, xp_link, nxprt) { + TAILQ_FOREACH_SAFE(xprt, &grp->sg_xlist, xp_link, nxprt) { /* * Only some transports have idle timers. Don't time * something out which is just waking up. @@ -1013,27 +1036,31 @@ svc_checkidle(SVCPOOL *pool) } } - mtx_unlock(&pool->sp_lock); + mtx_unlock(&grp->sg_lock); TAILQ_FOREACH_SAFE(xprt, &cleanup, xp_link, nxprt) { SVC_RELEASE(xprt); } - mtx_lock(&pool->sp_lock); - + mtx_lock(&grp->sg_lock); } static void svc_assign_waiting_sockets(SVCPOOL *pool) { + SVCGROUP *grp; SVCXPRT *xprt; + int g; - mtx_lock(&pool->sp_lock); - while ((xprt = TAILQ_FIRST(&pool->sp_active)) != NULL) { - if (xprt_assignthread(xprt)) - TAILQ_REMOVE(&pool->sp_active, xprt, xp_alink); - else - break; + for (g = 0; g < pool->sp_groupcount; g++) { + grp = &pool->sp_groups[g]; + mtx_lock(&grp->sg_lock); + while ((xprt = TAILQ_FIRST(&grp->sg_active)) != NULL) { + if (xprt_assignthread(xprt)) + TAILQ_REMOVE(&grp->sg_active, xprt, xp_alink); + else + break; + } + mtx_unlock(&grp->sg_lock); } - mtx_unlock(&pool->sp_lock); } static void @@ -1067,8 +1094,9 @@ svc_request_space_available(SVCPOOL *poo } static void -svc_run_internal(SVCPOOL *pool, bool_t ismaster) +svc_run_internal(SVCGROUP *grp, bool_t ismaster) { + SVCPOOL *pool = grp->sg_pool; SVCTHREAD *st, *stpref; SVCXPRT *xprt; enum xprt_stat stat; @@ -1083,35 +1111,34 @@ svc_run_internal(SVCPOOL *pool, bool_t i STAILQ_INIT(&st->st_reqs); cv_init(&st->st_cond, "rpcsvc"); - mtx_lock(&pool->sp_lock); - LIST_INSERT_HEAD(&pool->sp_threads, st, st_link); + mtx_lock(&grp->sg_lock); /* * If we are a new thread which was spawned to cope with * increased load, set the state back to SVCPOOL_ACTIVE. */ - if (pool->sp_state == SVCPOOL_THREADSTARTING) - pool->sp_state = SVCPOOL_ACTIVE; + if (grp->sg_state == SVCPOOL_THREADSTARTING) + grp->sg_state = SVCPOOL_ACTIVE; - while (pool->sp_state != SVCPOOL_CLOSING) { + while (grp->sg_state != SVCPOOL_CLOSING) { /* * Create new thread if requested. */ - if (pool->sp_state == SVCPOOL_THREADWANTED) { - pool->sp_state = SVCPOOL_THREADSTARTING; - pool->sp_lastcreatetime = time_uptime; - mtx_unlock(&pool->sp_lock); - svc_new_thread(pool); - mtx_lock(&pool->sp_lock); + if (grp->sg_state == SVCPOOL_THREADWANTED) { + grp->sg_state = SVCPOOL_THREADSTARTING; + grp->sg_lastcreatetime = time_uptime; + mtx_unlock(&grp->sg_lock); + svc_new_thread(grp); + mtx_lock(&grp->sg_lock); continue; } /* * Check for idle transports once per second. */ - if (time_uptime > pool->sp_lastidlecheck) { - pool->sp_lastidlecheck = time_uptime; - svc_checkidle(pool); + if (time_uptime > grp->sg_lastidlecheck) { + grp->sg_lastidlecheck = time_uptime; + svc_checkidle(grp); } xprt = st->st_xprt; @@ -1119,7 +1146,7 @@ svc_run_internal(SVCPOOL *pool, bool_t i /* * Enforce maxthreads count. */ - if (pool->sp_threadcount > pool->sp_maxthreads) + if (grp->sg_threadcount > grp->sg_maxthreads) break; /* @@ -1128,22 +1155,22 @@ svc_run_internal(SVCPOOL *pool, bool_t i * by a thread. */ if (svc_request_space_available(pool) && - (xprt = TAILQ_FIRST(&pool->sp_active)) != NULL) { - TAILQ_REMOVE(&pool->sp_active, xprt, xp_alink); + (xprt = TAILQ_FIRST(&grp->sg_active)) != NULL) { + TAILQ_REMOVE(&grp->sg_active, xprt, xp_alink); SVC_ACQUIRE(xprt); xprt->xp_thread = st; st->st_xprt = xprt; continue; } - LIST_INSERT_HEAD(&pool->sp_idlethreads, st, st_ilink); + LIST_INSERT_HEAD(&grp->sg_idlethreads, st, st_ilink); if (ismaster || (!ismaster && - pool->sp_threadcount > pool->sp_minthreads)) + grp->sg_threadcount > grp->sg_minthreads)) error = cv_timedwait_sig(&st->st_cond, - &pool->sp_lock, 5 * hz); + &grp->sg_lock, 5 * hz); else error = cv_wait_sig(&st->st_cond, - &pool->sp_lock); + &grp->sg_lock); if (st->st_xprt == NULL) LIST_REMOVE(st, st_ilink); @@ -1152,19 +1179,19 @@ svc_run_internal(SVCPOOL *pool, bool_t i */ if (error == EWOULDBLOCK) { if (!ismaster - && (pool->sp_threadcount - > pool->sp_minthreads) + && (grp->sg_threadcount + > grp->sg_minthreads) && !st->st_xprt) break; } else if (error) { - mtx_unlock(&pool->sp_lock); + mtx_unlock(&grp->sg_lock); svc_exit(pool); - mtx_lock(&pool->sp_lock); + mtx_lock(&grp->sg_lock); break; } continue; } - mtx_unlock(&pool->sp_lock); + mtx_unlock(&grp->sg_lock); /* * Drain the transport socket and queue up any RPCs. @@ -1196,7 +1223,7 @@ svc_run_internal(SVCPOOL *pool, bool_t i } } } while (rqstp == NULL && stat == XPRT_MOREREQS - && pool->sp_state != SVCPOOL_CLOSING); + && grp->sg_state != SVCPOOL_CLOSING); /* * Move this transport to the end of the active list to @@ -1204,16 +1231,16 @@ svc_run_internal(SVCPOOL *pool, bool_t i * If this was the last queued request, svc_getreq will end * up calling xprt_inactive to remove from the active list. */ - mtx_lock(&pool->sp_lock); + mtx_lock(&grp->sg_lock); xprt->xp_thread = NULL; st->st_xprt = NULL; if (xprt->xp_active) { if (!svc_request_space_available(pool) || !xprt_assignthread(xprt)) - TAILQ_INSERT_TAIL(&pool->sp_active, + TAILQ_INSERT_TAIL(&grp->sg_active, xprt, xp_alink); } - mtx_unlock(&pool->sp_lock); + mtx_unlock(&grp->sg_lock); SVC_RELEASE(xprt); /* @@ -1230,7 +1257,7 @@ svc_run_internal(SVCPOOL *pool, bool_t i } mtx_unlock(&st->st_lock); svc_change_space_used(pool, -sz); - mtx_lock(&pool->sp_lock); + mtx_lock(&grp->sg_lock); } if (st->st_xprt) { @@ -1238,46 +1265,43 @@ svc_run_internal(SVCPOOL *pool, bool_t i st->st_xprt = NULL; SVC_RELEASE(xprt); } - KASSERT(STAILQ_EMPTY(&st->st_reqs), ("stray reqs on exit")); - LIST_REMOVE(st, st_link); - pool->sp_threadcount--; - - mtx_unlock(&pool->sp_lock); - mtx_destroy(&st->st_lock); cv_destroy(&st->st_cond); mem_free(st, sizeof(*st)); + grp->sg_threadcount--; if (!ismaster) - wakeup(pool); + wakeup(grp); + mtx_unlock(&grp->sg_lock); } static void svc_thread_start(void *arg) { - svc_run_internal((SVCPOOL *) arg, FALSE); + svc_run_internal((SVCGROUP *) arg, FALSE); kthread_exit(); } static void -svc_new_thread(SVCPOOL *pool) +svc_new_thread(SVCGROUP *grp) { + SVCPOOL *pool = grp->sg_pool; struct thread *td; - pool->sp_threadcount++; - kthread_add(svc_thread_start, pool, - pool->sp_proc, &td, 0, 0, + grp->sg_threadcount++; + kthread_add(svc_thread_start, grp, pool->sp_proc, &td, 0, 0, "%s: service", pool->sp_name); } void svc_run(SVCPOOL *pool) { - int i; + int g, i; struct proc *p; struct thread *td; + SVCGROUP *grp; p = curproc; td = curthread; @@ -1285,35 +1309,56 @@ svc_run(SVCPOOL *pool) "%s: master", pool->sp_name); pool->sp_state = SVCPOOL_ACTIVE; pool->sp_proc = p; - pool->sp_lastcreatetime = time_uptime; - pool->sp_threadcount = 1; - for (i = 1; i < pool->sp_minthreads; i++) { - svc_new_thread(pool); + /* Choose group count based on number of threads and CPUs. */ + pool->sp_groupcount = max(1, min(SVC_MAXGROUPS, + min(pool->sp_maxthreads / 2, mp_ncpus) / 6)); + for (g = 0; g < pool->sp_groupcount; g++) { + grp = &pool->sp_groups[g]; + grp->sg_minthreads = max(1, + pool->sp_minthreads / pool->sp_groupcount); + grp->sg_maxthreads = max(1, + pool->sp_maxthreads / pool->sp_groupcount); + grp->sg_lastcreatetime = time_uptime; + } + + /* Starting threads */ + for (g = 0; g < pool->sp_groupcount; g++) { + grp = &pool->sp_groups[g]; + for (i = ((g == 0) ? 1 : 0); i < grp->sg_minthreads; i++) + svc_new_thread(grp); + } + pool->sp_groups[0].sg_threadcount++; + svc_run_internal(&pool->sp_groups[0], TRUE); + + /* Waiting for threads to stop. */ + for (g = 0; g < pool->sp_groupcount; g++) { + grp = &pool->sp_groups[g]; + mtx_lock(&grp->sg_lock); + while (grp->sg_threadcount > 0) + msleep(grp, &grp->sg_lock, 0, "svcexit", 0); + mtx_unlock(&grp->sg_lock); } - - svc_run_internal(pool, TRUE); - - mtx_lock(&pool->sp_lock); - while (pool->sp_threadcount > 0) - msleep(pool, &pool->sp_lock, 0, "svcexit", 0); - mtx_unlock(&pool->sp_lock); } void svc_exit(SVCPOOL *pool) { + SVCGROUP *grp; SVCTHREAD *st; + int g; - mtx_lock(&pool->sp_lock); - - if (pool->sp_state != SVCPOOL_CLOSING) { - pool->sp_state = SVCPOOL_CLOSING; - LIST_FOREACH(st, &pool->sp_idlethreads, st_ilink) - cv_signal(&st->st_cond); + pool->sp_state = SVCPOOL_CLOSING; + for (g = 0; g < pool->sp_groupcount; g++) { + grp = &pool->sp_groups[g]; + mtx_lock(&grp->sg_lock); + if (grp->sg_state != SVCPOOL_CLOSING) { + grp->sg_state = SVCPOOL_CLOSING; + LIST_FOREACH(st, &grp->sg_idlethreads, st_ilink) + cv_signal(&st->st_cond); + } + mtx_unlock(&grp->sg_lock); } - - mtx_unlock(&pool->sp_lock); } bool_t Modified: stable/10/sys/rpc/svc.h ============================================================================== --- stable/10/sys/rpc/svc.h Sun Jun 22 18:02:39 2014 (r267741) +++ stable/10/sys/rpc/svc.h Sun Jun 22 18:03:53 2014 (r267742) @@ -137,6 +137,7 @@ struct xp_ops2 { #ifdef _KERNEL struct __rpc_svcpool; +struct __rpc_svcgroup; struct __rpc_svcthread; #endif @@ -150,6 +151,7 @@ typedef struct __rpc_svcxprt { volatile u_int xp_refs; struct sx xp_lock; struct __rpc_svcpool *xp_pool; /* owning pool (see below) */ + struct __rpc_svcgroup *xp_group; /* owning group (see below) */ TAILQ_ENTRY(__rpc_svcxprt) xp_link; TAILQ_ENTRY(__rpc_svcxprt) xp_alink; bool_t xp_registered; /* xprt_register has been called */ @@ -245,8 +247,6 @@ struct svc_loss_callout { }; TAILQ_HEAD(svc_loss_callout_list, svc_loss_callout); -struct __rpc_svcthread; - /* * Service request */ @@ -296,7 +296,6 @@ typedef struct __rpc_svcthread { SVCXPRT *st_xprt; /* transport we are processing */ struct svc_reqlist st_reqs; /* RPC requests to execute */ struct cv st_cond; /* sleeping for work */ - LIST_ENTRY(__rpc_svcthread) st_link; /* all threads list */ LIST_ENTRY(__rpc_svcthread) st_ilink; /* idle threads list */ LIST_ENTRY(__rpc_svcthread) st_alink; /* application thread list */ int st_p2; /* application workspace */ @@ -305,6 +304,36 @@ typedef struct __rpc_svcthread { LIST_HEAD(svcthread_list, __rpc_svcthread); /* + * A thread group contain all information needed to assign subset of + * transports to subset of threads. On systems with many CPUs and many + * threads that allows to reduce lock congestion and improve performance. + * Hundreds of threads on dozens of CPUs sharing the single pool lock do + * not scale well otherwise. + */ +TAILQ_HEAD(svcxprt_list, __rpc_svcxprt); +enum svcpool_state { + SVCPOOL_INIT, /* svc_run not called yet */ + SVCPOOL_ACTIVE, /* normal running state */ + SVCPOOL_THREADWANTED, /* new service thread requested */ + SVCPOOL_THREADSTARTING, /* new service thread started */ + SVCPOOL_CLOSING /* svc_exit called */ +}; +typedef struct __rpc_svcgroup { + struct mtx_padalign sg_lock; /* protect the thread/req lists */ + struct __rpc_svcpool *sg_pool; + enum svcpool_state sg_state; /* current pool state */ + struct svcxprt_list sg_xlist; /* all transports in the group */ + struct svcxprt_list sg_active; /* transports needing service */ + struct svcthread_list sg_idlethreads; /* idle service threads */ + + int sg_minthreads; /* minimum service thread count */ + int sg_maxthreads; /* maximum service thread count */ + int sg_threadcount; /* current service thread count */ + time_t sg_lastcreatetime; /* when we last started a thread */ + time_t sg_lastidlecheck; /* when we last checked idle transports */ +} SVCGROUP; + +/* * In the kernel, we can't use global variables to store lists of * transports etc. since otherwise we could not have two unrelated RPC * services running, each on its own thread. We solve this by @@ -316,32 +345,18 @@ LIST_HEAD(svcthread_list, __rpc_svcthrea * this to support something similar to the Solaris multi-threaded RPC * server. */ -TAILQ_HEAD(svcxprt_list, __rpc_svcxprt); -enum svcpool_state { - SVCPOOL_INIT, /* svc_run not called yet */ - SVCPOOL_ACTIVE, /* normal running state */ - SVCPOOL_THREADWANTED, /* new service thread requested */ - SVCPOOL_THREADSTARTING, /* new service thread started */ - SVCPOOL_CLOSING /* svc_exit called */ -}; typedef SVCTHREAD *pool_assign_fn(SVCTHREAD *, struct svc_req *); typedef void pool_done_fn(SVCTHREAD *, struct svc_req *); +#define SVC_MAXGROUPS 16 typedef struct __rpc_svcpool { struct mtx_padalign sp_lock; /* protect the transport lists */ const char *sp_name; /* pool name (e.g. "nfsd", "NLM" */ enum svcpool_state sp_state; /* current pool state */ struct proc *sp_proc; /* process which is in svc_run */ - struct svcxprt_list sp_xlist; /* all transports in the pool */ - struct svcxprt_list sp_active; /* transports needing service */ struct svc_callout_list sp_callouts; /* (prog,vers)->dispatch list */ struct svc_loss_callout_list sp_lcallouts; /* loss->dispatch list */ - struct svcthread_list sp_threads; /* service threads */ - struct svcthread_list sp_idlethreads; /* idle service threads */ int sp_minthreads; /* minimum service thread count */ int sp_maxthreads; /* maximum service thread count */ - int sp_threadcount; /* current service thread count */ - time_t sp_lastcreatetime; /* when we last started a thread */ - time_t sp_lastidlecheck; /* when we last checked idle transports */ /* * Hooks to allow an application to control request to thread @@ -364,6 +379,10 @@ typedef struct __rpc_svcpool { struct replay_cache *sp_rcache; /* optional replay cache */ struct sysctl_ctx_list sp_sysctl; + + int sp_groupcount; /* Number of groups in the pool. */ + int sp_nextgroup; /* Next group to assign port. */ + SVCGROUP sp_groups[SVC_MAXGROUPS]; /* Thread/port groups. */ } SVCPOOL; #else Modified: stable/10/sys/rpc/svc_generic.c ============================================================================== --- stable/10/sys/rpc/svc_generic.c Sun Jun 22 18:02:39 2014 (r267741) +++ stable/10/sys/rpc/svc_generic.c Sun Jun 22 18:03:53 2014 (r267742) @@ -86,7 +86,8 @@ svc_create( rpcvers_t versnum, /* Version number */ const char *nettype) /* Networktype token */ { - int num = 0; + int g, num = 0; + SVCGROUP *grp; SVCXPRT *xprt; struct netconfig *nconf; void *handle; @@ -96,11 +97,14 @@ svc_create( return (0); } while ((nconf = __rpc_getconf(handle)) != NULL) { - mtx_lock(&pool->sp_lock); - TAILQ_FOREACH(xprt, &pool->sp_xlist, xp_link) { - if (strcmp(xprt->xp_netid, nconf->nc_netid) == 0) { + for (g = 0; g < SVC_MAXGROUPS; g++) { + grp = &pool->sp_groups[g]; + mtx_lock(&grp->sg_lock); + TAILQ_FOREACH(xprt, &grp->sg_xlist, xp_link) { + if (strcmp(xprt->xp_netid, nconf->nc_netid)) + continue; /* Found an old one, use it */ - mtx_unlock(&pool->sp_lock); + mtx_unlock(&grp->sg_lock); (void) rpcb_unset(prognum, versnum, nconf); if (svc_reg(xprt, prognum, versnum, dispatch, nconf) == FALSE) { @@ -108,15 +112,15 @@ svc_create( "svc_create: could not register prog %u vers %u on %s\n", (unsigned)prognum, (unsigned)versnum, nconf->nc_netid); - mtx_lock(&pool->sp_lock); + mtx_lock(&grp->sg_lock); } else { num++; - mtx_lock(&pool->sp_lock); + mtx_lock(&grp->sg_lock); break; } } + mtx_unlock(&grp->sg_lock); } - mtx_unlock(&pool->sp_lock); if (xprt == NULL) { /* It was not found. Now create a new one */ xprt = svc_tp_create(pool, dispatch, prognum, versnum, From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 18:06:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D6C93623; Sun, 22 Jun 2014 18:06:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA13E296A; Sun, 22 Jun 2014 18:06:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MI6BKA082944; Sun, 22 Jun 2014 18:06:11 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MI6Bsn082943; Sun, 22 Jun 2014 18:06:11 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406221806.s5MI6Bsn082943@svn.freebsd.org> From: Alexander Motin Date: Sun, 22 Jun 2014 18:06:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267743 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 18:06:11 -0000 Author: mav Date: Sun Jun 22 18:06:11 2014 New Revision: 267743 URL: http://svnweb.freebsd.org/changeset/base/267743 Log: MFC r267232, r267239: Use atomics to modify numvnodes variable. This allows to mostly avoid lock usage in getnewvnode_[drop_]reserve(), that reduces number of global vnode_free_list_mtx mutex acquisitions from 4 to 2 per NFS request on ZFS, improving SMP scalability. 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 Jun 22 18:03:53 2014 (r267742) +++ stable/10/sys/kern/vfs_subr.c Sun Jun 22 18:06:11 2014 (r267743) @@ -997,12 +997,19 @@ getnewvnode_reserve(u_int count) struct thread *td; td = curthread; + /* First try to be quick and racy. */ + if (atomic_fetchadd_long(&numvnodes, count) + count <= desiredvnodes) { + td->td_vp_reserv += count; + return; + } else + atomic_subtract_long(&numvnodes, count); + mtx_lock(&vnode_free_list_mtx); while (count > 0) { if (getnewvnode_wait(0) == 0) { count--; td->td_vp_reserv++; - numvnodes++; + atomic_add_long(&numvnodes, 1); } } mtx_unlock(&vnode_free_list_mtx); @@ -1014,10 +1021,7 @@ getnewvnode_drop_reserve(void) struct thread *td; td = curthread; - mtx_lock(&vnode_free_list_mtx); - KASSERT(numvnodes >= td->td_vp_reserv, ("reserve too large")); - numvnodes -= td->td_vp_reserv; - mtx_unlock(&vnode_free_list_mtx); + atomic_subtract_long(&numvnodes, td->td_vp_reserv); td->td_vp_reserv = 0; } @@ -1054,7 +1058,7 @@ getnewvnode(const char *tag, struct moun return (error); } #endif - numvnodes++; + atomic_add_long(&numvnodes, 1); mtx_unlock(&vnode_free_list_mtx); alloc: vp = (struct vnode *) uma_zalloc(vnode_zone, M_WAITOK|M_ZERO); @@ -2383,9 +2387,7 @@ vdropl(struct vnode *vp) * The vnode has been marked for destruction, so free it. */ CTR2(KTR_VFS, "%s: destroying the vnode %p", __func__, vp); - mtx_lock(&vnode_free_list_mtx); - numvnodes--; - mtx_unlock(&vnode_free_list_mtx); + atomic_subtract_long(&numvnodes, 1); bo = &vp->v_bufobj; VNASSERT((vp->v_iflag & VI_FREE) == 0, vp, ("cleaned vnode still on the free list.")); From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 20:24:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D09A366; Sun, 22 Jun 2014 20:24:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3977D233C; Sun, 22 Jun 2014 20:24:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MKOI3I050396; Sun, 22 Jun 2014 20:24:18 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MKOH9G050393; Sun, 22 Jun 2014 20:24:17 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201406222024.s5MKOH9G050393@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 22 Jun 2014 20:24:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267746 - stable/10/usr.bin/patch X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 20:24:18 -0000 Author: pfg Date: Sun Jun 22 20:24:17 2014 New Revision: 267746 URL: http://svnweb.freebsd.org/changeset/base/267746 Log: MFC r267490: patch: unsign the line length to avoid overflows. Patch(1) uses a short int for the line length, which is usually sufficient for regular diffs, but makes no effort to signal when there is an overflow. Change the line length to an unsigned short int to better use the fact that a length is never negative. The change is loosely inspired on a related change in DragonFly, but we avoid spending more memory than necessary. While here adjust the messages to be clearer on what is happening. Modified: stable/10/usr.bin/patch/patch.c stable/10/usr.bin/patch/pch.c stable/10/usr.bin/patch/pch.h Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/patch/patch.c ============================================================================== --- stable/10/usr.bin/patch/patch.c Sun Jun 22 20:13:57 2014 (r267745) +++ stable/10/usr.bin/patch/patch.c Sun Jun 22 20:24:17 2014 (r267746) @@ -742,14 +742,18 @@ abort_context_hunk(void) static void rej_line(int ch, LINENUM i) { - size_t len; + unsigned short len; const char *line = pfetch(i); - len = strlen(line); + len = strnlen(line, USHRT_MAX); fprintf(rejfp, "%c%s", ch, line); - if (len == 0 || line[len-1] != '\n') - fprintf(rejfp, "\n\\ No newline at end of file\n"); + if (len == 0 || line[len-1] != '\n') { + if (len >= USHRT_MAX) + fprintf(rejfp, "\n\\ Line too long\n"); + else + fprintf(rejfp, "\n\\ No newline at end of line\n"); + } } static void @@ -1016,7 +1020,7 @@ patch_match(LINENUM base, LINENUM offset LINENUM pat_lines = pch_ptrn_lines() - fuzz; const char *ilineptr; const char *plineptr; - short plinelen; + unsigned short plinelen; for (iline = base + offset + fuzz; pline <= pat_lines; pline++, iline++) { ilineptr = ifetch(iline, offset >= 0); Modified: stable/10/usr.bin/patch/pch.c ============================================================================== --- stable/10/usr.bin/patch/pch.c Sun Jun 22 20:13:57 2014 (r267745) +++ stable/10/usr.bin/patch/pch.c Sun Jun 22 20:24:17 2014 (r267746) @@ -56,7 +56,7 @@ static LINENUM p_max; /* max allowed va static LINENUM p_context = 3; /* # of context lines */ static LINENUM p_input_line = 0; /* current line # from patch file */ static char **p_line = NULL;/* the text of the hunk */ -static short *p_len = NULL; /* length of each line */ +static unsigned short *p_len = NULL; /* length of each line */ static char *p_char = NULL; /* +, -, and ! */ static int hunkmax = INITHUNKMAX; /* size of above arrays to begin with */ static int p_indent; /* indent to patch */ @@ -134,7 +134,7 @@ set_hunkmax(void) if (p_line == NULL) p_line = malloc(hunkmax * sizeof(char *)); if (p_len == NULL) - p_len = malloc(hunkmax * sizeof(short)); + p_len = malloc(hunkmax * sizeof(unsigned short)); if (p_char == NULL) p_char = malloc(hunkmax * sizeof(char)); } @@ -151,7 +151,7 @@ grow_hunkmax(void) fatal("Internal memory allocation error\n"); p_line = reallocf(p_line, new_hunkmax * sizeof(char *)); - p_len = reallocf(p_len, new_hunkmax * sizeof(short)); + p_len = reallocf(p_len, new_hunkmax * sizeof(unsigned short)); p_char = reallocf(p_char, new_hunkmax * sizeof(char)); if (p_line != NULL && p_len != NULL && p_char != NULL) { @@ -1201,7 +1201,7 @@ bool pch_swap(void) { char **tp_line; /* the text of the hunk */ - short *tp_len; /* length of each line */ + unsigned short *tp_len;/* length of each line */ char *tp_char; /* +, -, and ! */ LINENUM i; LINENUM n; @@ -1358,7 +1358,7 @@ pch_context(void) /* * Return the length of a particular patch line. */ -short +unsigned short pch_line_len(LINENUM line) { return p_len[line]; Modified: stable/10/usr.bin/patch/pch.h ============================================================================== --- stable/10/usr.bin/patch/pch.h Sun Jun 22 20:13:57 2014 (r267745) +++ stable/10/usr.bin/patch/pch.h Sun Jun 22 20:24:17 2014 (r267746) @@ -44,7 +44,7 @@ bool there_is_another_patch(void); bool another_hunk(void); bool pch_swap(void); char *pfetch(LINENUM); -short pch_line_len(LINENUM); +unsigned short pch_line_len(LINENUM); LINENUM pch_first(void); LINENUM pch_ptrn_lines(void); LINENUM pch_newfirst(void); From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 20:29:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E57525CD; Sun, 22 Jun 2014 20:29:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2142236A; Sun, 22 Jun 2014 20:29:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MKTpdT051288; Sun, 22 Jun 2014 20:29:51 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MKTpqH051286; Sun, 22 Jun 2014 20:29:51 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201406222029.s5MKTpqH051286@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 22 Jun 2014 20:29:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267747 - stable/10/usr.bin/patch X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 20:29:52 -0000 Author: pfg Date: Sun Jun 22 20:29:51 2014 New Revision: 267747 URL: http://svnweb.freebsd.org/changeset/base/267747 Log: MFC r267512: patch: add dry-run alias for compatibility with other implementations. Other implementations of patch(1), including GNU patch and "svn patch" have a --dry-run option which does the same as our -C or --check option. Add a new alias to make our implementation more compatible. Modified: stable/10/usr.bin/patch/patch.1 stable/10/usr.bin/patch/patch.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/patch/patch.1 ============================================================================== --- stable/10/usr.bin/patch/patch.1 Sun Jun 22 20:24:17 2014 (r267746) +++ stable/10/usr.bin/patch/patch.1 Sun Jun 22 20:29:51 2014 (r267747) @@ -21,7 +21,7 @@ .\" .\" $OpenBSD: patch.1,v 1.27 2014/04/15 06:26:54 jmc Exp $ .\" $FreeBSD$ -.Dd June 12, 2014 +.Dd June 15, 2014 .Dt PATCH 1 .Os .Sh NAME @@ -107,7 +107,7 @@ This is equivalent to specifying This option is currently the default, unless .Fl -posix is specified. -.It Fl C , Fl Fl check +.It Fl C , Fl Fl check , Fl Fl dry-run Checks that the patch would apply cleanly, but does not modify anything. .It Fl c , Fl Fl context Forces Modified: stable/10/usr.bin/patch/patch.c ============================================================================== --- stable/10/usr.bin/patch/patch.c Sun Jun 22 20:24:17 2014 (r267746) +++ stable/10/usr.bin/patch/patch.c Sun Jun 22 20:29:51 2014 (r267747) @@ -469,6 +469,7 @@ get_some_switches(void) {"context", no_argument, 0, 'c'}, {"debug", required_argument, 0, 'x'}, {"directory", required_argument, 0, 'd'}, + {"dry-run", no_argument, 0, 'C'}, {"ed", no_argument, 0, 'e'}, {"force", no_argument, 0, 'f'}, {"forward", no_argument, 0, 'N'}, From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 21:14:34 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE747F3B; Sun, 22 Jun 2014 21:14:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB7B0269E; Sun, 22 Jun 2014 21:14:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MLEYBZ074290; Sun, 22 Jun 2014 21:14:34 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MLEYnZ074289; Sun, 22 Jun 2014 21:14:34 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406222114.s5MLEYnZ074289@svn.freebsd.org> From: Alexander Motin Date: Sun, 22 Jun 2014 21:14:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267748 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 21:14:35 -0000 Author: mav Date: Sun Jun 22 21:14:34 2014 New Revision: 267748 URL: http://svnweb.freebsd.org/changeset/base/267748 Log: MFC r267362: Remove unneeded mountlist_mtx acquisition from sync_fsync(). All struct mount fields accessed by sync_fsync() are protected by MNT_MTX. 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 Jun 22 20:29:51 2014 (r267747) +++ stable/10/sys/kern/vfs_subr.c Sun Jun 22 21:14:34 2014 (r267748) @@ -3654,11 +3654,8 @@ sync_fsync(struct vop_fsync_args *ap) * Walk the list of vnodes pushing all that are dirty and * not already on the sync list. */ - mtx_lock(&mountlist_mtx); - if (vfs_busy(mp, MBF_NOWAIT | MBF_MNTLSTLOCK) != 0) { - mtx_unlock(&mountlist_mtx); + if (vfs_busy(mp, MBF_NOWAIT) != 0) return (0); - } if (vn_start_write(NULL, &mp, V_NOWAIT) != 0) { vfs_unbusy(mp); return (0); From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 21:16:19 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A74C41EA; Sun, 22 Jun 2014 21:16:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A39026B3; Sun, 22 Jun 2014 21:16:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MLGJte074740; Sun, 22 Jun 2014 21:16:19 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MLGJmp074739; Sun, 22 Jun 2014 21:16:19 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406222116.s5MLGJmp074739@svn.freebsd.org> From: Alexander Motin Date: Sun, 22 Jun 2014 21:16:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267749 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 21:16:19 -0000 Author: mav Date: Sun Jun 22 21:16:18 2014 New Revision: 267749 URL: http://svnweb.freebsd.org/changeset/base/267749 Log: MFC r267392: Implement simple direct-mapped cache for popular filesystem identifiers to avoid congestion on global mountlist_mtx mutex in vfs_busyfs(), while traversing through the list of mount points. This change significantly improves NFS server scalability, since it had to do this translation for every request, and the global lock becomes quite congested. This code is more optimized for relatively small number of mount points. On systems with hundreds of active mount points this simple cache may have many collisions. But the original traversal code in that case should also behave much worse, so we are not loosing much. 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 Jun 22 21:14:34 2014 (r267748) +++ stable/10/sys/kern/vfs_subr.c Sun Jun 22 21:16:18 2014 (r267749) @@ -500,23 +500,53 @@ vfs_getvfs(fsid_t *fsid) /* * Lookup a mount point by filesystem identifier, busying it before * returning. + * + * To avoid congestion on mountlist_mtx, implement simple direct-mapped + * cache for popular filesystem identifiers. The cache is lockess, using + * the fact that struct mount's are never freed. In worst case we may + * get pointer to unmounted or even different filesystem, so we have to + * check what we got, and go slow way if so. */ struct mount * vfs_busyfs(fsid_t *fsid) { +#define FSID_CACHE_SIZE 256 + typedef struct mount * volatile vmp_t; + static vmp_t cache[FSID_CACHE_SIZE]; struct mount *mp; int error; + uint32_t hash; CTR2(KTR_VFS, "%s: fsid %p", __func__, fsid); + hash = fsid->val[0] ^ fsid->val[1]; + hash = (hash >> 16 ^ hash) & (FSID_CACHE_SIZE - 1); + mp = cache[hash]; + if (mp == NULL || + mp->mnt_stat.f_fsid.val[0] != fsid->val[0] || + mp->mnt_stat.f_fsid.val[1] != fsid->val[1]) + goto slow; + if (vfs_busy(mp, 0) != 0) { + cache[hash] = NULL; + goto slow; + } + if (mp->mnt_stat.f_fsid.val[0] == fsid->val[0] && + mp->mnt_stat.f_fsid.val[1] == fsid->val[1]) + return (mp); + else + vfs_unbusy(mp); + +slow: mtx_lock(&mountlist_mtx); TAILQ_FOREACH(mp, &mountlist, mnt_list) { if (mp->mnt_stat.f_fsid.val[0] == fsid->val[0] && mp->mnt_stat.f_fsid.val[1] == fsid->val[1]) { error = vfs_busy(mp, MBF_MNTLSTLOCK); if (error) { + cache[hash] = NULL; mtx_unlock(&mountlist_mtx); return (NULL); } + cache[hash] = mp; return (mp); } } From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 21:18:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F4484F2; Sun, 22 Jun 2014 21:18:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1CB9826CD; Sun, 22 Jun 2014 21:18:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MLIO0W075307; Sun, 22 Jun 2014 21:18:24 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MLIOxX075305; Sun, 22 Jun 2014 21:18:24 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406222118.s5MLIOxX075305@svn.freebsd.org> From: Alexander Motin Date: Sun, 22 Jun 2014 21:18:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267750 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 21:18:25 -0000 Author: mav Date: Sun Jun 22 21:18:24 2014 New Revision: 267750 URL: http://svnweb.freebsd.org/changeset/base/267750 Log: MFC r267387: Allocating new bucket for bucket zone, never take it from the zone itself, since it will almost certanly fail. Take next bigger zone instead. This situation should not happen with original bucket zones configuration: "32 Bucket" zone uses "64 Bucket" and vice versa. But if "64 Bucket" zone lock is congested, zone may grow its bucket size and start biting itself. Modified: stable/10/sys/vm/uma_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/uma_core.c ============================================================================== --- stable/10/sys/vm/uma_core.c Sun Jun 22 21:16:18 2014 (r267749) +++ stable/10/sys/vm/uma_core.c Sun Jun 22 21:18:24 2014 (r267750) @@ -381,6 +381,8 @@ bucket_alloc(uma_zone_t zone, void *udat if ((uintptr_t)udata & UMA_ZFLAG_CACHEONLY) flags |= M_NOVM; ubz = bucket_zone_lookup(zone->uz_count); + if (ubz->ubz_zone == zone && (ubz + 1)->ubz_entries != 0) + ubz++; bucket = uma_zalloc_arg(ubz->ubz_zone, udata, flags); if (bucket) { #ifdef INVARIANTS From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 21:19:19 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E4DBD625; Sun, 22 Jun 2014 21:19:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D207F26D3; Sun, 22 Jun 2014 21:19:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MLJJ2g075491; Sun, 22 Jun 2014 21:19:19 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MLJJAC075490; Sun, 22 Jun 2014 21:19:19 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406222119.s5MLJJAC075490@svn.freebsd.org> From: Alexander Motin Date: Sun, 22 Jun 2014 21:19:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267751 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 21:19:20 -0000 Author: mav Date: Sun Jun 22 21:19:19 2014 New Revision: 267751 URL: http://svnweb.freebsd.org/changeset/base/267751 Log: MFC r267391: Introduce new "256 Bucket" zone to split requests and reduce congestion on "128 Bucket" zone lock. Modified: stable/10/sys/vm/uma_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/uma_core.c ============================================================================== --- stable/10/sys/vm/uma_core.c Sun Jun 22 21:18:24 2014 (r267750) +++ stable/10/sys/vm/uma_core.c Sun Jun 22 21:19:19 2014 (r267751) @@ -205,7 +205,7 @@ struct uma_bucket_zone { #define BUCKET_SIZE(n) \ (((sizeof(void *) * (n)) - sizeof(struct uma_bucket)) / sizeof(void *)) -#define BUCKET_MAX BUCKET_SIZE(128) +#define BUCKET_MAX BUCKET_SIZE(256) struct uma_bucket_zone bucket_zones[] = { { NULL, "4 Bucket", BUCKET_SIZE(4), 4096 }, @@ -216,6 +216,7 @@ struct uma_bucket_zone bucket_zones[] = { NULL, "32 Bucket", BUCKET_SIZE(32), 512 }, { NULL, "64 Bucket", BUCKET_SIZE(64), 256 }, { NULL, "128 Bucket", BUCKET_SIZE(128), 128 }, + { NULL, "256 Bucket", BUCKET_SIZE(256), 64 }, { NULL, NULL, 0} }; From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 21:21:28 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48225795; Sun, 22 Jun 2014 21:21:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B93C274D; Sun, 22 Jun 2014 21:21:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MLLRfS078047; Sun, 22 Jun 2014 21:21:27 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MLLRjY078046; Sun, 22 Jun 2014 21:21:27 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406222121.s5MLLRjY078046@svn.freebsd.org> From: Alexander Motin Date: Sun, 22 Jun 2014 21:21:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267752 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 21:21:28 -0000 Author: mav Date: Sun Jun 22 21:21:27 2014 New Revision: 267752 URL: http://svnweb.freebsd.org/changeset/base/267752 Log: MFC r267351: Move root_mount_hold() functionality to separate mutex. It has nothing to share with mutex protecting list of mounted file systems. Modified: stable/10/sys/kern/vfs_mountroot.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/vfs_mountroot.c ============================================================================== --- stable/10/sys/kern/vfs_mountroot.c Sun Jun 22 21:19:19 2014 (r267751) +++ stable/10/sys/kern/vfs_mountroot.c Sun Jun 22 21:21:27 2014 (r267752) @@ -97,6 +97,9 @@ struct vnode *rootvnode; char *rootdevnames[2] = {NULL, NULL}; +struct mtx root_holds_mtx; +MTX_SYSINIT(root_holds, &root_holds_mtx, "root_holds", MTX_DEF); + struct root_hold_token { const char *who; LIST_ENTRY(root_hold_token) list; @@ -131,9 +134,9 @@ root_mount_hold(const char *identifier) h = malloc(sizeof *h, M_DEVBUF, M_ZERO | M_WAITOK); h->who = identifier; - mtx_lock(&mountlist_mtx); + mtx_lock(&root_holds_mtx); LIST_INSERT_HEAD(&root_holds, h, list); - mtx_unlock(&mountlist_mtx); + mtx_unlock(&root_holds_mtx); return (h); } @@ -143,10 +146,10 @@ root_mount_rel(struct root_hold_token *h if (h == NULL) return; - mtx_lock(&mountlist_mtx); + mtx_lock(&root_holds_mtx); LIST_REMOVE(h, list); wakeup(&root_holds); - mtx_unlock(&mountlist_mtx); + mtx_unlock(&root_holds_mtx); free(h, M_DEVBUF); } @@ -168,12 +171,12 @@ root_mount_wait(void) */ KASSERT(curthread->td_proc->p_pid != 0, ("root_mount_wait: cannot be called from the swapper thread")); - mtx_lock(&mountlist_mtx); + mtx_lock(&root_holds_mtx); while (!root_mount_complete) { - msleep(&root_mount_complete, &mountlist_mtx, PZERO, "rootwait", + msleep(&root_mount_complete, &root_holds_mtx, PZERO, "rootwait", hz); } - mtx_unlock(&mountlist_mtx); + mtx_unlock(&root_holds_mtx); } static void @@ -908,9 +911,9 @@ vfs_mountroot_wait(void) DROP_GIANT(); g_waitidle(); PICKUP_GIANT(); - mtx_lock(&mountlist_mtx); + mtx_lock(&root_holds_mtx); if (LIST_EMPTY(&root_holds)) { - mtx_unlock(&mountlist_mtx); + mtx_unlock(&root_holds_mtx); break; } if (ppsratecheck(&lastfail, &curfail, 1)) { @@ -919,7 +922,7 @@ vfs_mountroot_wait(void) printf(" %s", h->who); printf("\n"); } - msleep(&root_holds, &mountlist_mtx, PZERO | PDROP, "roothold", + msleep(&root_holds, &root_holds_mtx, PZERO | PDROP, "roothold", hz); } } @@ -979,10 +982,10 @@ vfs_mountroot(void) vref(prison0.pr_root); mtx_unlock(&prison0.pr_mtx); - mtx_lock(&mountlist_mtx); + mtx_lock(&root_holds_mtx); atomic_store_rel_int(&root_mount_complete, 1); wakeup(&root_mount_complete); - mtx_unlock(&mountlist_mtx); + mtx_unlock(&root_holds_mtx); EVENTHANDLER_INVOKE(mountroot); } From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 21:26:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A064E93D; Sun, 22 Jun 2014 21:26:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72AF52786; Sun, 22 Jun 2014 21:26:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MLQl1N079738; Sun, 22 Jun 2014 21:26:47 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MLQlSU079737; Sun, 22 Jun 2014 21:26:47 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406222126.s5MLQlSU079737@svn.freebsd.org> From: Alexander Motin Date: Sun, 22 Jun 2014 21:26:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267753 - stable/10/sys/nfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 21:26:47 -0000 Author: mav Date: Sun Jun 22 21:26:46 2014 New Revision: 267753 URL: http://svnweb.freebsd.org/changeset/base/267753 Log: MFC r267479: Fix/improve fhe_stats sysctl output. Modified: stable/10/sys/nfs/nfs_fha.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/nfs/nfs_fha.c ============================================================================== --- stable/10/sys/nfs/nfs_fha.c Sun Jun 22 21:21:27 2014 (r267752) +++ stable/10/sys/nfs/nfs_fha.c Sun Jun 22 21:26:46 2014 (r267753) @@ -468,14 +468,14 @@ fha_nd_complete(SVCTHREAD *thread, struc int fhe_stats_sysctl(SYSCTL_HANDLER_ARGS, struct fha_params *softc) { - int error, count, i; + int error, i; struct sbuf sb; struct fha_hash_entry *fhe; - bool_t first = TRUE; + bool_t first, hfirst; SVCTHREAD *thread; SVCPOOL *pool; - sbuf_new(&sb, NULL, 4096, SBUF_FIXEDLEN); + sbuf_new(&sb, NULL, 65536, SBUF_FIXEDLEN); pool = NULL; @@ -485,42 +485,44 @@ fhe_stats_sysctl(SYSCTL_HANDLER_ARGS, st } pool = *softc->pool; - count = 0; for (i = 0; i < FHA_HASH_SIZE; i++) if (!LIST_EMPTY(&softc->fha_hash[i].list)) - count++; + break; - if (count == 0) { + if (i == FHA_HASH_SIZE) { sbuf_printf(&sb, "No file handle entries.\n"); goto out; } - for (i = 0; i < FHA_HASH_SIZE; i++) { + hfirst = TRUE; + for (; i < FHA_HASH_SIZE; i++) { mtx_lock(&softc->fha_hash[i].mtx); + if (LIST_EMPTY(&softc->fha_hash[i].list)) { + mtx_unlock(&softc->fha_hash[i].mtx); + continue; + } + sbuf_printf(&sb, "%shash %d: {\n", hfirst ? "" : ", ", i); + first = TRUE; LIST_FOREACH(fhe, &softc->fha_hash[i].list, link) { - sbuf_printf(&sb, "%sfhe %p: {\n", first ? "" : ", ", fhe); + sbuf_printf(&sb, "%sfhe %p: {\n", first ? " " : ", ", fhe); sbuf_printf(&sb, " fh: %ju\n", (uintmax_t) fhe->fh); - sbuf_printf(&sb, " num_rw: %d\n", fhe->num_rw); - sbuf_printf(&sb, " num_exclusive: %d\n", fhe->num_exclusive); + sbuf_printf(&sb, " num_rw/exclusive: %d/%d\n", + fhe->num_rw, fhe->num_exclusive); sbuf_printf(&sb, " num_threads: %d\n", fhe->num_threads); LIST_FOREACH(thread, &fhe->threads, st_alink) { - sbuf_printf(&sb, " thread %p offset %ju " - "(count %d)\n", thread, + sbuf_printf(&sb, " thread %p offset %ju " + "reqs %d\n", thread, thread->st_p3, thread->st_p2); } - sbuf_printf(&sb, "}"); + sbuf_printf(&sb, " }"); first = FALSE; - - /* Limit the output. */ - if (++count > 128) { - sbuf_printf(&sb, "..."); - break; - } } + sbuf_printf(&sb, "\n}"); mtx_unlock(&softc->fha_hash[i].mtx); + hfirst = FALSE; } out: From owner-svn-src-stable@FreeBSD.ORG Sun Jun 22 21:28:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF3F7B4A; Sun, 22 Jun 2014 21:28:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC17D278F; Sun, 22 Jun 2014 21:28:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MLS5xq080098; Sun, 22 Jun 2014 21:28:05 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MLS5RS080097; Sun, 22 Jun 2014 21:28:05 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406222128.s5MLS5RS080097@svn.freebsd.org> From: Alexander Motin Date: Sun, 22 Jun 2014 21:28:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267754 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 21:28:05 -0000 Author: mav Date: Sun Jun 22 21:28:05 2014 New Revision: 267754 URL: http://svnweb.freebsd.org/changeset/base/267754 Log: MFC r267429: Fix some leaks on LUN creation error. Modified: stable/10/sys/cam/ctl/ctl_backend_block.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Sun Jun 22 21:26:46 2014 (r267753) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Sun Jun 22 21:28:05 2014 (r267754) @@ -2115,9 +2115,14 @@ ctl_be_block_create(struct ctl_be_block_ bailout_error: req->status = CTL_LUN_ERROR; + if (be_lun->io_taskqueue != NULL) + taskqueue_free(be_lun->io_taskqueue); ctl_be_block_close(be_lun); - - free(be_lun->dev_path, M_CTLBLK); + if (be_lun->dev_path != NULL) + free(be_lun->dev_path, M_CTLBLK); + if (be_lun->lun_zone != NULL) + uma_zdestroy(be_lun->lun_zone); + mtx_destroy(&be_lun->lock); free(be_lun, M_CTLBLK); return (retval); From owner-svn-src-stable@FreeBSD.ORG Mon Jun 23 05:39:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04B1C36A; Mon, 23 Jun 2014 05:39:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E64242EB2; Mon, 23 Jun 2014 05:39:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5N5dAvW013531; Mon, 23 Jun 2014 05:39:10 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5N5dAWn013530; Mon, 23 Jun 2014 05:39:10 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201406230539.s5N5dAWn013530@svn.freebsd.org> From: Navdeep Parhar Date: Mon, 23 Jun 2014 05:39:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267764 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 05:39:11 -0000 Author: np Date: Mon Jun 23 05:39:10 2014 New Revision: 267764 URL: http://svnweb.freebsd.org/changeset/base/267764 Log: MFC r267689: Consider the total number of descriptors available (and not just those that are ready to be reclaimed) when deciding whether to resume tx after a stall. Modified: stable/10/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_sge.c Mon Jun 23 05:17:39 2014 (r267763) +++ stable/10/sys/dev/cxgbe/t4_sge.c Mon Jun 23 05:39:10 2014 (r267764) @@ -1708,7 +1708,7 @@ t4_wrq_tx_locked(struct adapter *sc, str can_reclaim = reclaimable(eq); if (__predict_false(eq->flags & EQ_STALLED)) { - if (can_reclaim < tx_resume_threshold(eq)) + if (eq->avail + can_reclaim < tx_resume_threshold(eq)) return; eq->flags &= ~EQ_STALLED; eq->unstalled++; @@ -1829,7 +1829,7 @@ t4_eth_tx(struct ifnet *ifp, struct sge_ can_reclaim = reclaimable(eq); if (__predict_false(eq->flags & EQ_STALLED)) { - if (can_reclaim < tx_resume_threshold(eq)) { + if (eq->avail + can_reclaim < tx_resume_threshold(eq)) { txq->m = m; return (0); } @@ -2003,7 +2003,8 @@ t4_update_fl_bufsize(struct ifnet *ifp) int can_resume_tx(struct sge_eq *eq) { - return (reclaimable(eq) >= tx_resume_threshold(eq)); + + return (eq->avail + reclaimable(eq) >= tx_resume_threshold(eq)); } static inline void From owner-svn-src-stable@FreeBSD.ORG Mon Jun 23 05:42:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C46EA4BD; Mon, 23 Jun 2014 05:42:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B20442F2F; Mon, 23 Jun 2014 05:42:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5N5gqY9017108; Mon, 23 Jun 2014 05:42:52 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5N5gqGU017107; Mon, 23 Jun 2014 05:42:52 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201406230542.s5N5gqGU017107@svn.freebsd.org> From: Navdeep Parhar Date: Mon, 23 Jun 2014 05:42:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267765 - stable/9/sys/dev/cxgbe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 05:42:52 -0000 Author: np Date: Mon Jun 23 05:42:52 2014 New Revision: 267765 URL: http://svnweb.freebsd.org/changeset/base/267765 Log: MFC r267689: Consider the total number of descriptors available (and not just those that are ready to be reclaimed) when deciding whether to resume tx after a stall. Modified: stable/9/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_sge.c Mon Jun 23 05:39:10 2014 (r267764) +++ stable/9/sys/dev/cxgbe/t4_sge.c Mon Jun 23 05:42:52 2014 (r267765) @@ -1679,7 +1679,7 @@ t4_wrq_tx_locked(struct adapter *sc, str can_reclaim = reclaimable(eq); if (__predict_false(eq->flags & EQ_STALLED)) { - if (can_reclaim < tx_resume_threshold(eq)) + if (eq->avail + can_reclaim < tx_resume_threshold(eq)) return; eq->flags &= ~EQ_STALLED; eq->unstalled++; @@ -1800,7 +1800,7 @@ t4_eth_tx(struct ifnet *ifp, struct sge_ can_reclaim = reclaimable(eq); if (__predict_false(eq->flags & EQ_STALLED)) { - if (can_reclaim < tx_resume_threshold(eq)) { + if (eq->avail + can_reclaim < tx_resume_threshold(eq)) { txq->m = m; return (0); } @@ -1974,7 +1974,8 @@ t4_update_fl_bufsize(struct ifnet *ifp) int can_resume_tx(struct sge_eq *eq) { - return (reclaimable(eq) >= tx_resume_threshold(eq)); + + return (eq->avail + reclaimable(eq) >= tx_resume_threshold(eq)); } static inline void From owner-svn-src-stable@FreeBSD.ORG Mon Jun 23 07:54:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 130F6295; Mon, 23 Jun 2014 07:54:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F2E5F28DE; Mon, 23 Jun 2014 07:54:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5N7sDwq075932; Mon, 23 Jun 2014 07:54:13 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5N7sCgp075926; Mon, 23 Jun 2014 07:54:12 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201406230754.s5N7sCgp075926@svn.freebsd.org> From: Michael Tuexen Date: Mon, 23 Jun 2014 07:54:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267769 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 07:54:14 -0000 Author: tuexen Date: Mon Jun 23 07:54:12 2014 New Revision: 267769 URL: http://svnweb.freebsd.org/changeset/base/267769 Log: MFC r267674: Honor jails for unbound SCTP sockets when selecting source addresses, reporting IP-addresses to the peer during the handshake, adding addresses to the host, reporting the addresses via the sysctl interface (used by netstat, for example) and reporting the addresses to the application via socket options. This issue was reported by Bernd Walter. Modified: stable/10/sys/netinet/sctp_asconf.c stable/10/sys/netinet/sctp_output.c stable/10/sys/netinet/sctp_pcb.c stable/10/sys/netinet/sctp_sysctl.c stable/10/sys/netinet/sctp_usrreq.c stable/10/sys/netinet/sctputil.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_asconf.c ============================================================================== --- stable/10/sys/netinet/sctp_asconf.c Mon Jun 23 07:45:44 2014 (r267768) +++ stable/10/sys/netinet/sctp_asconf.c Mon Jun 23 07:54:12 2014 (r267769) @@ -1889,14 +1889,22 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb * * this is boundall or subset bound w/ASCONF allowed */ - /* first, make sure it's a good address family */ + /* first, make sure that the address is IPv4 or IPv6 and not jailed */ switch (ifa->address.sa.sa_family) { #ifdef INET6 case AF_INET6: + if (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &ifa->address.sin6.sin6_addr) != 0) { + return; + } break; #endif #ifdef INET case AF_INET: + if (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &ifa->address.sin.sin_addr) != 0) { + return; + } break; #endif default: @@ -2122,6 +2130,10 @@ sctp_asconf_iterator_stcb(struct sctp_in /* we skip unspecifed addresses */ continue; } + if (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &sin6->sin6_addr) != 0) { + continue; + } if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) { if (stcb->asoc.scope.local_scope == 0) { continue; @@ -2152,6 +2164,10 @@ sctp_asconf_iterator_stcb(struct sctp_in /* we skip unspecifed addresses */ continue; } + if (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &sin->sin_addr) != 0) { + continue; + } if (stcb->asoc.scope.ipv4_local_scope == 0 && IN4_ISPRIVATE_ADDRESS(&sin->sin_addr)) { continue; @@ -2465,6 +2481,10 @@ sctp_find_valid_localaddr(struct sctp_tc /* skip unspecifed addresses */ continue; } + if (prison_check_ip4(stcb->sctp_ep->ip_inp.inp.inp_cred, + &sin->sin_addr) != 0) { + continue; + } if (stcb->asoc.scope.ipv4_local_scope == 0 && IN4_ISPRIVATE_ADDRESS(&sin->sin_addr)) continue; @@ -2498,6 +2518,10 @@ sctp_find_valid_localaddr(struct sctp_tc */ continue; } + if (prison_check_ip6(stcb->sctp_ep->ip_inp.inp.inp_cred, + &sin6->sin6_addr) != 0) { + continue; + } if (stcb->asoc.scope.local_scope == 0 && IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) continue; @@ -3112,6 +3136,10 @@ sctp_check_address_list_all(struct sctp_ #ifdef INET case AF_INET: sin = (struct sockaddr_in *)&sctp_ifa->address.sin; + if (prison_check_ip4(stcb->sctp_ep->ip_inp.inp.inp_cred, + &sin->sin_addr) != 0) { + continue; + } if ((ipv4_scope == 0) && (IN4_ISPRIVATE_ADDRESS(&sin->sin_addr))) { /* private address not in scope */ @@ -3122,6 +3150,10 @@ sctp_check_address_list_all(struct sctp_ #ifdef INET6 case AF_INET6: sin6 = (struct sockaddr_in6 *)&sctp_ifa->address.sin6; + if (prison_check_ip6(stcb->sctp_ep->ip_inp.inp.inp_cred, + &sin6->sin6_addr) != 0) { + continue; + } if ((local_scope == 0) && (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr))) { continue; @@ -3407,6 +3439,10 @@ sctp_asconf_send_nat_state_update(struct #ifdef INET case AF_INET: to = &sctp_ifap->address.sin; + if (prison_check_ip4(stcb->sctp_ep->ip_inp.inp.inp_cred, + &to->sin_addr) != 0) { + continue; + } if (IN4_ISPRIVATE_ADDRESS(&to->sin_addr)) { continue; } @@ -3418,6 +3454,10 @@ sctp_asconf_send_nat_state_update(struct #ifdef INET6 case AF_INET6: to6 = &sctp_ifap->address.sin6; + if (prison_check_ip6(stcb->sctp_ep->ip_inp.inp.inp_cred, + &to6->sin6_addr) != 0) { + continue; + } if (IN6_IS_ADDR_LOOPBACK(&to6->sin6_addr)) { continue; } Modified: stable/10/sys/netinet/sctp_output.c ============================================================================== --- stable/10/sys/netinet/sctp_output.c Mon Jun 23 07:45:44 2014 (r267768) +++ stable/10/sys/netinet/sctp_output.c Mon Jun 23 07:54:12 2014 (r267769) @@ -2060,6 +2060,20 @@ sctp_add_addresses_to_i_ia(struct sctp_i continue; } LIST_FOREACH(sctp_ifap, &sctp_ifnp->ifalist, next_ifa) { +#ifdef INET + if ((sctp_ifap->address.sa.sa_family == AF_INET) && + (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &sctp_ifap->address.sin.sin_addr) != 0)) { + continue; + } +#endif +#ifdef INET6 + if ((sctp_ifap->address.sa.sa_family == AF_INET6) && + (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &sctp_ifap->address.sin6.sin6_addr) != 0)) { + continue; + } +#endif if (sctp_is_addr_restricted(stcb, sctp_ifap)) { continue; } @@ -2089,6 +2103,20 @@ skip_count: continue; } LIST_FOREACH(sctp_ifap, &sctp_ifnp->ifalist, next_ifa) { +#ifdef INET + if ((sctp_ifap->address.sa.sa_family == AF_INET) && + (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &sctp_ifap->address.sin.sin_addr) != 0)) { + continue; + } +#endif +#ifdef INET6 + if ((sctp_ifap->address.sa.sa_family == AF_INET6) && + (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &sctp_ifap->address.sin6.sin6_addr) != 0)) { + continue; + } +#endif if (sctp_is_addr_restricted(stcb, sctp_ifap)) { continue; } @@ -2453,6 +2481,20 @@ sctp_choose_boundspecific_inp(struct sct if (sctp_ifn) { /* is a preferred one on the interface we route out? */ LIST_FOREACH(sctp_ifa, &sctp_ifn->ifalist, next_ifa) { +#ifdef INET + if ((sctp_ifa->address.sa.sa_family == AF_INET) && + (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &sctp_ifa->address.sin.sin_addr) != 0)) { + continue; + } +#endif +#ifdef INET6 + if ((sctp_ifa->address.sa.sa_family == AF_INET6) && + (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &sctp_ifa->address.sin6.sin6_addr) != 0)) { + continue; + } +#endif if ((sctp_ifa->localifa_flags & SCTP_ADDR_DEFER_USE) && (non_asoc_addr_ok == 0)) continue; @@ -2576,6 +2618,20 @@ sctp_choose_boundspecific_stcb(struct sc if (sctp_ifn) { /* first try for a preferred address on the ep */ LIST_FOREACH(sctp_ifa, &sctp_ifn->ifalist, next_ifa) { +#ifdef INET + if ((sctp_ifa->address.sa.sa_family == AF_INET) && + (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &sctp_ifa->address.sin.sin_addr) != 0)) { + continue; + } +#endif +#ifdef INET6 + if ((sctp_ifa->address.sa.sa_family == AF_INET6) && + (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &sctp_ifa->address.sin6.sin6_addr) != 0)) { + continue; + } +#endif if ((sctp_ifa->localifa_flags & SCTP_ADDR_DEFER_USE) && (non_asoc_addr_ok == 0)) continue; if (sctp_is_addr_in_ep(inp, sctp_ifa)) { @@ -2596,6 +2652,20 @@ sctp_choose_boundspecific_stcb(struct sc } /* next try for an acceptable address on the ep */ LIST_FOREACH(sctp_ifa, &sctp_ifn->ifalist, next_ifa) { +#ifdef INET + if ((sctp_ifa->address.sa.sa_family == AF_INET) && + (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &sctp_ifa->address.sin.sin_addr) != 0)) { + continue; + } +#endif +#ifdef INET6 + if ((sctp_ifa->address.sa.sa_family == AF_INET6) && + (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &sctp_ifa->address.sin6.sin6_addr) != 0)) { + continue; + } +#endif if ((sctp_ifa->localifa_flags & SCTP_ADDR_DEFER_USE) && (non_asoc_addr_ok == 0)) continue; if (sctp_is_addr_in_ep(inp, sctp_ifa)) { @@ -2700,6 +2770,7 @@ sctp_from_the_top2: static struct sctp_ifa * sctp_select_nth_preferred_addr_from_ifn_boundall(struct sctp_ifn *ifn, + struct sctp_inpcb *inp, struct sctp_tcb *stcb, int non_asoc_addr_ok, uint8_t dest_is_loop, @@ -2721,6 +2792,20 @@ sctp_select_nth_preferred_addr_from_ifn_ } #endif /* INET6 */ LIST_FOREACH(ifa, &ifn->ifalist, next_ifa) { +#ifdef INET + if ((ifa->address.sa.sa_family == AF_INET) && + (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &ifa->address.sin.sin_addr) != 0)) { + continue; + } +#endif +#ifdef INET6 + if ((ifa->address.sa.sa_family == AF_INET6) && + (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &ifa->address.sin6.sin6_addr) != 0)) { + continue; + } +#endif if ((ifa->localifa_flags & SCTP_ADDR_DEFER_USE) && (non_asoc_addr_ok == 0)) continue; @@ -2806,6 +2891,7 @@ sctp_select_nth_preferred_addr_from_ifn_ static int sctp_count_num_preferred_boundall(struct sctp_ifn *ifn, + struct sctp_inpcb *inp, struct sctp_tcb *stcb, int non_asoc_addr_ok, uint8_t dest_is_loop, @@ -2816,6 +2902,21 @@ sctp_count_num_preferred_boundall(struct int num_eligible_addr = 0; LIST_FOREACH(ifa, &ifn->ifalist, next_ifa) { +#ifdef INET + if ((ifa->address.sa.sa_family == AF_INET) && + (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &ifa->address.sin.sin_addr) != 0)) { + continue; + } +#endif +#ifdef INET6 + if ((ifa->address.sa.sa_family == AF_INET6) && + (stcb != NULL) && + (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &ifa->address.sin6.sin6_addr) != 0)) { + continue; + } +#endif if ((ifa->localifa_flags & SCTP_ADDR_DEFER_USE) && (non_asoc_addr_ok == 0)) { continue; @@ -2847,7 +2948,8 @@ sctp_count_num_preferred_boundall(struct } static struct sctp_ifa * -sctp_choose_boundall(struct sctp_tcb *stcb, +sctp_choose_boundall(struct sctp_inpcb *inp, + struct sctp_tcb *stcb, struct sctp_nets *net, sctp_route_t * ro, uint32_t vrf_id, @@ -2902,7 +3004,7 @@ sctp_choose_boundall(struct sctp_tcb *st cur_addr_num = net->indx_of_eligible_next_to_use; } num_preferred = sctp_count_num_preferred_boundall(sctp_ifn, - stcb, + inp, stcb, non_asoc_addr_ok, dest_is_loop, dest_is_priv, fam); @@ -2929,7 +3031,7 @@ sctp_choose_boundall(struct sctp_tcb *st */ SCTPDBG(SCTP_DEBUG_OUTPUT2, "cur_addr_num:%d\n", cur_addr_num); - sctp_ifa = sctp_select_nth_preferred_addr_from_ifn_boundall(sctp_ifn, stcb, non_asoc_addr_ok, dest_is_loop, + sctp_ifa = sctp_select_nth_preferred_addr_from_ifn_boundall(sctp_ifn, inp, stcb, non_asoc_addr_ok, dest_is_loop, dest_is_priv, cur_addr_num, fam, ro); /* if sctp_ifa is NULL something changed??, fall to plan b. */ @@ -2960,7 +3062,7 @@ bound_all_plan_b: SCTPDBG(SCTP_DEBUG_OUTPUT2, "already seen\n"); continue; } - num_preferred = sctp_count_num_preferred_boundall(sctp_ifn, stcb, non_asoc_addr_ok, + num_preferred = sctp_count_num_preferred_boundall(sctp_ifn, inp, stcb, non_asoc_addr_ok, dest_is_loop, dest_is_priv, fam); SCTPDBG(SCTP_DEBUG_OUTPUT2, "Found ifn:%p %d preferred source addresses\n", @@ -2982,7 +3084,7 @@ bound_all_plan_b: if (cur_addr_num >= num_preferred) { cur_addr_num = 0; } - sifa = sctp_select_nth_preferred_addr_from_ifn_boundall(sctp_ifn, stcb, non_asoc_addr_ok, dest_is_loop, + sifa = sctp_select_nth_preferred_addr_from_ifn_boundall(sctp_ifn, inp, stcb, non_asoc_addr_ok, dest_is_loop, dest_is_priv, cur_addr_num, fam, ro); if (sifa == NULL) continue; @@ -3010,6 +3112,22 @@ again_with_private_addresses_allowed: } LIST_FOREACH(sctp_ifa, &emit_ifn->ifalist, next_ifa) { SCTPDBG(SCTP_DEBUG_OUTPUT2, "ifa:%p\n", (void *)sctp_ifa); +#ifdef INET + if ((sctp_ifa->address.sa.sa_family == AF_INET) && + (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &sctp_ifa->address.sin.sin_addr) != 0)) { + SCTPDBG(SCTP_DEBUG_OUTPUT2, "Jailed\n"); + continue; + } +#endif +#ifdef INET6 + if ((sctp_ifa->address.sa.sa_family == AF_INET6) && + (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &sctp_ifa->address.sin6.sin6_addr) != 0)) { + SCTPDBG(SCTP_DEBUG_OUTPUT2, "Jailed\n"); + continue; + } +#endif if ((sctp_ifa->localifa_flags & SCTP_ADDR_DEFER_USE) && (non_asoc_addr_ok == 0)) { SCTPDBG(SCTP_DEBUG_OUTPUT2, "Defer\n"); @@ -3060,6 +3178,20 @@ plan_d: continue; } LIST_FOREACH(sctp_ifa, &sctp_ifn->ifalist, next_ifa) { +#ifdef INET + if ((sctp_ifa->address.sa.sa_family == AF_INET) && + (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &sctp_ifa->address.sin.sin_addr) != 0)) { + continue; + } +#endif +#ifdef INET6 + if ((sctp_ifa->address.sa.sa_family == AF_INET6) && + (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &sctp_ifa->address.sin6.sin6_addr) != 0)) { + continue; + } +#endif if ((sctp_ifa->localifa_flags & SCTP_ADDR_DEFER_USE) && (non_asoc_addr_ok == 0)) continue; @@ -3110,6 +3242,20 @@ out: LIST_FOREACH(sctp_ifa, &sctp_ifn->ifalist, next_ifa) { struct sctp_ifa *tmp_sifa; +#ifdef INET + if ((sctp_ifa->address.sa.sa_family == AF_INET) && + (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &sctp_ifa->address.sin.sin_addr) != 0)) { + continue; + } +#endif +#ifdef INET6 + if ((sctp_ifa->address.sa.sa_family == AF_INET6) && + (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &sctp_ifa->address.sin6.sin6_addr) != 0)) { + continue; + } +#endif if ((sctp_ifa->localifa_flags & SCTP_ADDR_DEFER_USE) && (non_asoc_addr_ok == 0)) continue; @@ -3295,7 +3441,7 @@ sctp_source_address_selection(struct sct /* * Bound all case */ - answer = sctp_choose_boundall(stcb, net, ro, vrf_id, + answer = sctp_choose_boundall(inp, stcb, net, ro, vrf_id, dest_is_priv, dest_is_loop, non_asoc_addr_ok, fam); SCTP_IPI_ADDR_RUNLOCK(); Modified: stable/10/sys/netinet/sctp_pcb.c ============================================================================== --- stable/10/sys/netinet/sctp_pcb.c Mon Jun 23 07:45:44 2014 (r267768) +++ stable/10/sys/netinet/sctp_pcb.c Mon Jun 23 07:54:12 2014 (r267769) @@ -898,6 +898,10 @@ sctp_does_stcb_own_this_addr(struct sctp IN4_ISPRIVATE_ADDRESS(&sin->sin_addr)) { continue; } + if (prison_check_ip4(stcb->sctp_ep->ip_inp.inp.inp_cred, + &sin->sin_addr) != 0) { + continue; + } if (sin->sin_addr.s_addr == rsin->sin_addr.s_addr) { SCTP_IPI_ADDR_RUNLOCK(); return (1); @@ -913,6 +917,10 @@ sctp_does_stcb_own_this_addr(struct sctp sin6 = &sctp_ifa->address.sin6; rsin6 = (struct sockaddr_in6 *)to; + if (prison_check_ip6(stcb->sctp_ep->ip_inp.inp.inp_cred, + &sin6->sin6_addr) != 0) { + continue; + } if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) { if (local_scope == 0) continue; @@ -1060,6 +1068,39 @@ sctp_tcb_special_locate(struct sctp_inpc SCTP_INP_RUNLOCK(inp); continue; } + switch (to->sa_family) { +#ifdef INET + case AF_INET: + { + struct sockaddr_in *sin; + + sin = (struct sockaddr_in *)to; + if (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &sin->sin_addr) != 0) { + SCTP_INP_RUNLOCK(inp); + continue; + } + break; + } +#endif +#ifdef INET6 + case AF_INET6: + { + struct sockaddr_in6 *sin6; + + sin6 = (struct sockaddr_in6 *)to; + if (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &sin6->sin6_addr) != 0) { + SCTP_INP_RUNLOCK(inp); + continue; + } + break; + } +#endif + default: + SCTP_INP_RUNLOCK(inp); + continue; + } if (inp->def_vrf_id != vrf_id) { SCTP_INP_RUNLOCK(inp); continue; @@ -1628,23 +1669,45 @@ sctp_endpoint_probe(struct sockaddr *nam if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUNDALL) && (inp->sctp_lport == lport)) { /* got it */ + switch (nam->sa_family) { #ifdef INET - if ((nam->sa_family == AF_INET) && - (inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) && - SCTP_IPV6_V6ONLY(inp)) { - /* IPv4 on a IPv6 socket with ONLY IPv6 set */ - SCTP_INP_RUNLOCK(inp); - continue; - } + case AF_INET: + if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) && + SCTP_IPV6_V6ONLY(inp)) { + /* + * IPv4 on a IPv6 socket with ONLY + * IPv6 set + */ + SCTP_INP_RUNLOCK(inp); + continue; + } + if (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &sin->sin_addr) != 0) { + SCTP_INP_RUNLOCK(inp); + continue; + } + break; #endif #ifdef INET6 - /* A V6 address and the endpoint is NOT bound V6 */ - if (nam->sa_family == AF_INET6 && - (inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) == 0) { - SCTP_INP_RUNLOCK(inp); - continue; - } + case AF_INET6: + /* + * A V6 address and the endpoint is NOT + * bound V6 + */ + if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) == 0) { + SCTP_INP_RUNLOCK(inp); + continue; + } + if (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &sin6->sin6_addr) != 0) { + SCTP_INP_RUNLOCK(inp); + continue; + } + break; #endif + default: + break; + } /* does a VRF id match? */ fnd = 0; if (inp->def_vrf_id == vrf_id) @@ -2403,6 +2466,7 @@ sctp_inpcb_alloc(struct socket *so, uint /* setup socket pointers */ inp->sctp_socket = so; inp->ip_inp.inp.inp_socket = so; + inp->ip_inp.inp.inp_cred = crhold(so->so_cred); #ifdef INET6 if (INP_SOCKAF(so) == AF_INET6) { if (MODULE_GLOBAL(ip6_auto_flowlabel)) { @@ -2421,6 +2485,7 @@ sctp_inpcb_alloc(struct socket *so, uint /* init the small hash table we use to track asocid <-> tcb */ inp->sctp_asocidhash = SCTP_HASH_INIT(SCTP_STACK_VTAG_HASH_SIZE, &inp->hashasocidmark); if (inp->sctp_asocidhash == NULL) { + crfree(inp->ip_inp.inp.inp_cred); SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_ep), inp); SCTP_INP_INFO_WUNLOCK(); return (ENOBUFS); @@ -2435,6 +2500,7 @@ sctp_inpcb_alloc(struct socket *so, uint ((struct in6pcb *)(&inp->ip_inp.inp))->in6p_sp = pcb_sp; } if (error != 0) { + crfree(inp->ip_inp.inp.inp_cred); SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_ep), inp); SCTP_INP_INFO_WUNLOCK(); return error; @@ -2465,6 +2531,7 @@ sctp_inpcb_alloc(struct socket *so, uint */ SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, EOPNOTSUPP); so->so_pcb = NULL; + crfree(inp->ip_inp.inp.inp_cred); SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_ep), inp); return (EOPNOTSUPP); } @@ -2484,6 +2551,7 @@ sctp_inpcb_alloc(struct socket *so, uint SCTP_PRINTF("Out of SCTP-INPCB->hashinit - no resources\n"); SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, ENOBUFS); so->so_pcb = NULL; + crfree(inp->ip_inp.inp.inp_cred); SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_ep), inp); return (ENOBUFS); } @@ -3630,6 +3698,7 @@ sctp_inpcb_free(struct sctp_inpcb *inp, inp->sctp_tcbhash = NULL; } /* Now we must put the ep memory back into the zone pool */ + crfree(inp->ip_inp.inp.inp_cred); INP_LOCK_DESTROY(&inp->ip_inp.inp); SCTP_INP_LOCK_DESTROY(inp); SCTP_INP_READ_DESTROY(inp); Modified: stable/10/sys/netinet/sctp_sysctl.c ============================================================================== --- stable/10/sys/netinet/sctp_sysctl.c Mon Jun 23 07:45:44 2014 (r267768) +++ stable/10/sys/netinet/sctp_sysctl.c Mon Jun 23 07:54:12 2014 (r267769) @@ -252,6 +252,10 @@ copy_out_local_addresses(struct sctp_inp sin = (struct sockaddr_in *)&sctp_ifa->address.sa; if (sin->sin_addr.s_addr == 0) continue; + if (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &sin->sin_addr) != 0) { + continue; + } if ((ipv4_local_scope == 0) && (IN4_ISPRIVATE_ADDRESS(&sin->sin_addr))) continue; } else { @@ -267,6 +271,10 @@ copy_out_local_addresses(struct sctp_inp sin6 = (struct sockaddr_in6 *)&sctp_ifa->address.sa; if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) continue; + if (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &sin6->sin6_addr) != 0) { + continue; + } if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) { if (local_scope == 0) continue; Modified: stable/10/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/10/sys/netinet/sctp_usrreq.c Mon Jun 23 07:45:44 2014 (r267768) +++ stable/10/sys/netinet/sctp_usrreq.c Mon Jun 23 07:54:12 2014 (r267769) @@ -1197,6 +1197,10 @@ sctp_fill_up_addresses_vrf(struct sctp_i */ continue; } + if (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &sin->sin_addr) != 0) { + continue; + } if ((ipv4_local_scope == 0) && (IN4_ISPRIVATE_ADDRESS(&sin->sin_addr))) { continue; @@ -1238,6 +1242,10 @@ sctp_fill_up_addresses_vrf(struct sctp_i */ continue; } + if (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &sin6->sin6_addr) != 0) { + continue; + } if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) { if (local_scope == 0) continue; @@ -5239,6 +5247,43 @@ sctp_setopt(struct socket *so, int optna error = EINVAL; goto out_of_it; } + } else { + switch (sspp->sspp_addr.ss_family) { +#ifdef INET + case AF_INET: + { + struct sockaddr_in *sin; + + sin = (struct sockaddr_in *)&sspp->sspp_addr; + if (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &sin->sin_addr) != 0) { + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); + error = EINVAL; + goto out_of_it; + } + break; + } +#endif +#ifdef INET6 + case AF_INET6: + { + struct sockaddr_in6 *sin6; + + sin6 = (struct sockaddr_in6 *)&sspp->sspp_addr; + if (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &sin6->sin6_addr) != 0) { + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); + error = EINVAL; + goto out_of_it; + } + break; + } +#endif + default: + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); + error = EINVAL; + goto out_of_it; + } } if (sctp_set_primary_ip_address_sa(stcb, (struct sockaddr *)&sspp->sspp_addr) != 0) { Modified: stable/10/sys/netinet/sctputil.c ============================================================================== --- stable/10/sys/netinet/sctputil.c Mon Jun 23 07:45:44 2014 (r267768) +++ stable/10/sys/netinet/sctputil.c Mon Jun 23 07:54:12 2014 (r267769) @@ -6693,6 +6693,10 @@ sctp_local_addr_count(struct sctp_tcb *s */ continue; } + if (prison_check_ip4(stcb->sctp_ep->ip_inp.inp.inp_cred, + &sin->sin_addr) != 0) { + continue; + } if ((ipv4_local_scope == 0) && (IN4_ISPRIVATE_ADDRESS(&sin->sin_addr))) { continue; @@ -6713,6 +6717,10 @@ sctp_local_addr_count(struct sctp_tcb *s if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) { continue; } + if (prison_check_ip6(stcb->sctp_ep->ip_inp.inp.inp_cred, + &sin6->sin6_addr) != 0) { + continue; + } if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) { if (local_scope == 0) continue; From owner-svn-src-stable@FreeBSD.ORG Mon Jun 23 07:56:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1DB533FD; Mon, 23 Jun 2014 07:56:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0AA7028FB; Mon, 23 Jun 2014 07:56:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5N7udjh076362; Mon, 23 Jun 2014 07:56:39 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5N7udCg076361; Mon, 23 Jun 2014 07:56:39 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201406230756.s5N7udCg076361@svn.freebsd.org> From: Michael Tuexen Date: Mon, 23 Jun 2014 07:56:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267770 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 07:56:40 -0000 Author: tuexen Date: Mon Jun 23 07:56:39 2014 New Revision: 267770 URL: http://svnweb.freebsd.org/changeset/base/267770 Log: MFC r267682: Fix a bug in the setsockopt()-handling of the SCTP specific option SCTP_PEER_ADDR_THLDS: Use the provided address as intended. Modified: stable/10/sys/netinet/sctp_usrreq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/10/sys/netinet/sctp_usrreq.c Mon Jun 23 07:54:12 2014 (r267769) +++ stable/10/sys/netinet/sctp_usrreq.c Mon Jun 23 07:56:39 2014 (r267770) @@ -5642,7 +5642,7 @@ sctp_setopt(struct socket *so, int optna SCTP_FIND_STCB(inp, stcb, thlds->spt_assoc_id); net = NULL; if (stcb) { - net = sctp_findnet(stcb, (struct sockaddr *)&thlds->spt_assoc_id); + net = sctp_findnet(stcb, (struct sockaddr *)&thlds->spt_address); } else { /* * We increment here since @@ -5653,7 +5653,7 @@ sctp_setopt(struct socket *so, int optna */ SCTP_INP_INCR_REF(inp); stcb = sctp_findassociation_ep_addr(&inp, - (struct sockaddr *)&thlds->spt_assoc_id, + (struct sockaddr *)&thlds->spt_address, &net, NULL, NULL); if (stcb == NULL) { SCTP_INP_DECR_REF(inp); @@ -5662,7 +5662,7 @@ sctp_setopt(struct socket *so, int optna if (stcb && (net == NULL)) { struct sockaddr *sa; - sa = (struct sockaddr *)&thlds->spt_assoc_id; + sa = (struct sockaddr *)&thlds->spt_address; #ifdef INET if (sa->sa_family == AF_INET) { From owner-svn-src-stable@FreeBSD.ORG Mon Jun 23 07:58:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD857553; Mon, 23 Jun 2014 07:58:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BEAF3290E; Mon, 23 Jun 2014 07:58:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5N7wfg2076713; Mon, 23 Jun 2014 07:58:41 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5N7wfoM076712; Mon, 23 Jun 2014 07:58:41 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201406230758.s5N7wfoM076712@svn.freebsd.org> From: Michael Tuexen Date: Mon, 23 Jun 2014 07:58:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267771 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 07:58:42 -0000 Author: tuexen Date: Mon Jun 23 07:58:41 2014 New Revision: 267771 URL: http://svnweb.freebsd.org/changeset/base/267771 Log: MFC r267688: Fix a bug which incorrectly allowed two listening SCTP sockets on the same port bound to the wildcard address. Modified: stable/10/sys/netinet/sctp_usrreq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/10/sys/netinet/sctp_usrreq.c Mon Jun 23 07:56:39 2014 (r267770) +++ stable/10/sys/netinet/sctp_usrreq.c Mon Jun 23 07:58:41 2014 (r267771) @@ -6098,30 +6098,29 @@ sctp_listen(struct socket *so, int backl if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_PORTREUSE)) { /* See if we have a listener */ struct sctp_inpcb *tinp; - union sctp_sockstore store, *sp; + union sctp_sockstore store; - sp = &store; if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUNDALL) == 0) { /* not bound all */ struct sctp_laddr *laddr; LIST_FOREACH(laddr, &inp->sctp_addr_list, sctp_nxt_addr) { memcpy(&store, &laddr->ifa->address, sizeof(store)); - switch (sp->sa.sa_family) { + switch (store.sa.sa_family) { #ifdef INET case AF_INET: - sp->sin.sin_port = inp->sctp_lport; + store.sin.sin_port = inp->sctp_lport; break; #endif #ifdef INET6 case AF_INET6: - sp->sin6.sin6_port = inp->sctp_lport; + store.sin6.sin6_port = inp->sctp_lport; break; #endif default: break; } - tinp = sctp_pcb_findep(&sp->sa, 0, 0, inp->def_vrf_id); + tinp = sctp_pcb_findep(&store.sa, 0, 0, inp->def_vrf_id); if (tinp && (tinp != inp) && ((tinp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) == 0) && ((tinp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) == 0) && @@ -6139,20 +6138,6 @@ sctp_listen(struct socket *so, int backl } else { /* Setup a local addr bound all */ memset(&store, 0, sizeof(store)); - switch (sp->sa.sa_family) { -#ifdef INET - case AF_INET: - store.sin.sin_port = inp->sctp_lport; - break; -#endif -#ifdef INET6 - case AF_INET6: - sp->sin6.sin6_port = inp->sctp_lport; - break; -#endif - default: - break; - } #ifdef INET6 if (inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) { store.sa.sa_family = AF_INET6; @@ -6165,7 +6150,21 @@ sctp_listen(struct socket *so, int backl store.sa.sa_len = sizeof(struct sockaddr_in); } #endif - tinp = sctp_pcb_findep(&sp->sa, 0, 0, inp->def_vrf_id); + switch (store.sa.sa_family) { +#ifdef INET + case AF_INET: + store.sin.sin_port = inp->sctp_lport; + break; +#endif +#ifdef INET6 + case AF_INET6: + store.sin6.sin6_port = inp->sctp_lport; + break; +#endif + default: + break; + } + tinp = sctp_pcb_findep(&store.sa, 0, 0, inp->def_vrf_id); if (tinp && (tinp != inp) && ((tinp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) == 0) && ((tinp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) == 0) && From owner-svn-src-stable@FreeBSD.ORG Mon Jun 23 08:08:22 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE4C3CD5; Mon, 23 Jun 2014 08:08:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BAC1F2A5C; Mon, 23 Jun 2014 08:08:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5N88Mhj081704; Mon, 23 Jun 2014 08:08:22 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5N88Mks081702; Mon, 23 Jun 2014 08:08:22 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201406230808.s5N88Mks081702@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 23 Jun 2014 08:08:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267772 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 08:08:23 -0000 Author: kib Date: Mon Jun 23 08:08:22 2014 New Revision: 267772 URL: http://svnweb.freebsd.org/changeset/base/267772 Log: MFC r267254: Make mmap(MAP_STACK) search for the available address space. MFC r267497 (by alc): Use local variable instead of sgrowsiz. Modified: stable/10/sys/vm/vm_map.c stable/10/sys/vm/vm_mmap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_map.c ============================================================================== --- stable/10/sys/vm/vm_map.c Mon Jun 23 07:58:41 2014 (r267771) +++ stable/10/sys/vm/vm_map.c Mon Jun 23 08:08:22 2014 (r267772) @@ -136,6 +136,9 @@ static void vm_map_entry_dispose(vm_map_ static void vm_map_zdtor(void *mem, int size, void *arg); static void vmspace_zdtor(void *mem, int size, void *arg); #endif +static int vm_map_stack_locked(vm_map_t map, vm_offset_t addrbos, + vm_size_t max_ssize, vm_size_t growsize, vm_prot_t prot, vm_prot_t max, + int cow); #define ENTRY_CHARGED(e) ((e)->cred != NULL || \ ((e)->object.vm_object != NULL && (e)->object.vm_object->cred != NULL && \ @@ -1399,11 +1402,19 @@ vm_map_fixed(vm_map_t map, vm_object_t o int result; end = start + length; + KASSERT((cow & (MAP_STACK_GROWS_DOWN | MAP_STACK_GROWS_UP)) == 0 || + object == NULL, + ("vm_map_fixed: non-NULL backing object for stack")); vm_map_lock(map); VM_MAP_RANGE_CHECK(map, start, end); (void) vm_map_delete(map, start, end); - result = vm_map_insert(map, object, offset, start, end, prot, - max, cow); + if ((cow & (MAP_STACK_GROWS_DOWN | MAP_STACK_GROWS_UP)) != 0) { + result = vm_map_stack_locked(map, start, length, sgrowsiz, + prot, max, cow); + } else { + result = vm_map_insert(map, object, offset, start, end, + prot, max, cow); + } vm_map_unlock(map); return (result); } @@ -1426,6 +1437,9 @@ vm_map_find(vm_map_t map, vm_object_t ob vm_offset_t alignment, initial_addr, start; int result; + KASSERT((cow & (MAP_STACK_GROWS_DOWN | MAP_STACK_GROWS_UP)) == 0 || + object == NULL, + ("vm_map_find: non-NULL backing object for stack")); if (find_space == VMFS_OPTIMAL_SPACE && (object == NULL || (object->flags & OBJ_COLORED) == 0)) find_space = VMFS_ANY_SPACE; @@ -1467,8 +1481,13 @@ again: start = *addr; } - result = vm_map_insert(map, object, offset, start, start + - length, prot, max, cow); + if ((cow & (MAP_STACK_GROWS_DOWN | MAP_STACK_GROWS_UP)) != 0) { + result = vm_map_stack_locked(map, start, length, + sgrowsiz, prot, max, cow); + } else { + result = vm_map_insert(map, object, offset, start, + start + length, prot, max, cow); + } } while (result == KERN_NO_SPACE && find_space != VMFS_NO_SPACE && find_space != VMFS_ANY_SPACE); vm_map_unlock(map); @@ -3334,11 +3353,43 @@ int vm_map_stack(vm_map_t map, vm_offset_t addrbos, vm_size_t max_ssize, vm_prot_t prot, vm_prot_t max, int cow) { + vm_size_t growsize, init_ssize; + rlim_t lmemlim, vmemlim; + int rv; + + growsize = sgrowsiz; + init_ssize = (max_ssize < growsize) ? max_ssize : growsize; + vm_map_lock(map); + PROC_LOCK(curproc); + lmemlim = lim_cur(curproc, RLIMIT_MEMLOCK); + vmemlim = lim_cur(curproc, RLIMIT_VMEM); + PROC_UNLOCK(curproc); + if (!old_mlock && map->flags & MAP_WIREFUTURE) { + if (ptoa(pmap_wired_count(map->pmap)) + init_ssize > lmemlim) { + rv = KERN_NO_SPACE; + goto out; + } + } + /* If we would blow our VMEM resource limit, no go */ + if (map->size + init_ssize > vmemlim) { + rv = KERN_NO_SPACE; + goto out; + } + rv = vm_map_stack_locked(map, addrbos, max_ssize, growsize, prot, + max, cow); +out: + vm_map_unlock(map); + return (rv); +} + +static int +vm_map_stack_locked(vm_map_t map, vm_offset_t addrbos, vm_size_t max_ssize, + vm_size_t growsize, vm_prot_t prot, vm_prot_t max, int cow) +{ vm_map_entry_t new_entry, prev_entry; vm_offset_t bot, top; - vm_size_t growsize, init_ssize; + vm_size_t init_ssize; int orient, rv; - rlim_t lmemlim, vmemlim; /* * The stack orientation is piggybacked with the cow argument. @@ -3354,34 +3405,11 @@ vm_map_stack(vm_map_t map, vm_offset_t a addrbos + max_ssize < addrbos) return (KERN_NO_SPACE); - growsize = sgrowsiz; init_ssize = (max_ssize < growsize) ? max_ssize : growsize; - PROC_LOCK(curproc); - lmemlim = lim_cur(curproc, RLIMIT_MEMLOCK); - vmemlim = lim_cur(curproc, RLIMIT_VMEM); - PROC_UNLOCK(curproc); - - vm_map_lock(map); - /* If addr is already mapped, no go */ - if (vm_map_lookup_entry(map, addrbos, &prev_entry)) { - vm_map_unlock(map); + if (vm_map_lookup_entry(map, addrbos, &prev_entry)) return (KERN_NO_SPACE); - } - - if (!old_mlock && map->flags & MAP_WIREFUTURE) { - if (ptoa(pmap_wired_count(map->pmap)) + init_ssize > lmemlim) { - vm_map_unlock(map); - return (KERN_NO_SPACE); - } - } - - /* If we would blow our VMEM resource limit, no go */ - if (map->size + init_ssize > vmemlim) { - vm_map_unlock(map); - return (KERN_NO_SPACE); - } /* * If we can't accomodate max_ssize in the current mapping, no go. @@ -3393,10 +3421,8 @@ vm_map_stack(vm_map_t map, vm_offset_t a * grow the stack. */ if ((prev_entry->next != &map->header) && - (prev_entry->next->start < addrbos + max_ssize)) { - vm_map_unlock(map); + (prev_entry->next->start < addrbos + max_ssize)) return (KERN_NO_SPACE); - } /* * We initially map a stack of only init_ssize. We will grow as @@ -3432,7 +3458,6 @@ vm_map_stack(vm_map_t map, vm_offset_t a new_entry->eflags |= MAP_ENTRY_GROWS_UP; } - vm_map_unlock(map); return (rv); } Modified: stable/10/sys/vm/vm_mmap.c ============================================================================== --- stable/10/sys/vm/vm_mmap.c Mon Jun 23 07:58:41 2014 (r267771) +++ stable/10/sys/vm/vm_mmap.c Mon Jun 23 08:08:22 2014 (r267772) @@ -1621,11 +1621,13 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, docow |= MAP_INHERIT_SHARE; if (writecounted) docow |= MAP_VN_WRITECOUNT; + if (flags & MAP_STACK) { + if (object != NULL) + return (EINVAL); + docow |= MAP_STACK_GROWS_DOWN; + } - if (flags & MAP_STACK) - rv = vm_map_stack(map, *addr, size, prot, maxprot, - docow | MAP_STACK_GROWS_DOWN); - else if (fitit) { + if (fitit) { if ((flags & MAP_ALIGNMENT_MASK) == MAP_ALIGNED_SUPER) findspace = VMFS_SUPER_SPACE; else if ((flags & MAP_ALIGNMENT_MASK) != 0) @@ -1638,9 +1640,10 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, flags & MAP_32BIT ? MAP_32BIT_MAX_ADDR : #endif 0, findspace, prot, maxprot, docow); - } else + } else { rv = vm_map_fixed(map, object, foff, *addr, size, - prot, maxprot, docow); + prot, maxprot, docow); + } if (rv == KERN_SUCCESS) { /* From owner-svn-src-stable@FreeBSD.ORG Mon Jun 23 08:27:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC1C5444; Mon, 23 Jun 2014 08:27:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEDDE2BDE; Mon, 23 Jun 2014 08:27:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5N8RFKp091189; Mon, 23 Jun 2014 08:27:15 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5N8RFQ8091184; Mon, 23 Jun 2014 08:27:15 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201406230827.s5N8RFQ8091184@svn.freebsd.org> From: Marius Strobl Date: Mon, 23 Jun 2014 08:27:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267775 - in stable/10/sys/dev/usb: . controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 08:27:16 -0000 Author: marius Date: Mon Jun 23 08:27:15 2014 New Revision: 267775 URL: http://svnweb.freebsd.org/changeset/base/267775 Log: MFC: r267321 Avoid the USB device disconnected and controller shutdown clutter on system shutdown by putting the former under !rebooting and turning the latter into debug messages. Reviewed by: hps Sponsored by: Bally Wulff Games & Entertainment GmbH Modified: stable/10/sys/dev/usb/controller/usb_controller.c stable/10/sys/dev/usb/usb_device.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/usb_controller.c ============================================================================== --- stable/10/sys/dev/usb/controller/usb_controller.c Mon Jun 23 08:25:03 2014 (r267774) +++ stable/10/sys/dev/usb/controller/usb_controller.c Mon Jun 23 08:27:15 2014 (r267775) @@ -332,7 +332,7 @@ usb_shutdown(device_t dev) return (0); } - device_printf(bus->bdev, "Controller shutdown\n"); + DPRINTF("%s: Controller shutdown\n", device_get_nameunit(bus->bdev)); USB_BUS_LOCK(bus); usb_proc_msignal(USB_BUS_EXPLORE_PROC(bus), @@ -344,7 +344,8 @@ usb_shutdown(device_t dev) } USB_BUS_UNLOCK(bus); - device_printf(bus->bdev, "Controller shutdown complete\n"); + DPRINTF("%s: Controller shutdown complete\n", + device_get_nameunit(bus->bdev)); return (0); } Modified: stable/10/sys/dev/usb/usb_device.c ============================================================================== --- stable/10/sys/dev/usb/usb_device.c Mon Jun 23 08:25:03 2014 (r267774) +++ stable/10/sys/dev/usb/usb_device.c Mon Jun 23 08:27:15 2014 (r267775) @@ -1124,10 +1124,12 @@ usb_detach_device_sub(struct usb_device */ *ppdev = NULL; - device_printf(dev, "at %s, port %d, addr %d " - "(disconnected)\n", - device_get_nameunit(udev->parent_dev), - udev->port_no, udev->address); + if (!rebooting) { + device_printf(dev, "at %s, port %d, addr %d " + "(disconnected)\n", + device_get_nameunit(udev->parent_dev), + udev->port_no, udev->address); + } if (device_is_attached(dev)) { if (udev->flags.peer_suspended) { @@ -2143,8 +2145,10 @@ usb_free_device(struct usb_device *udev, #endif #if USB_HAVE_UGEN - printf("%s: <%s> at %s (disconnected)\n", udev->ugen_name, - usb_get_manufacturer(udev), device_get_nameunit(bus->bdev)); + if (!rebooting) { + printf("%s: <%s> at %s (disconnected)\n", udev->ugen_name, + usb_get_manufacturer(udev), device_get_nameunit(bus->bdev)); + } /* Destroy UGEN symlink, if any */ if (udev->ugen_symlink) { From owner-svn-src-stable@FreeBSD.ORG Mon Jun 23 08:28:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EDDE76BE; Mon, 23 Jun 2014 08:28:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C044E2BED; Mon, 23 Jun 2014 08:28:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5N8SE7c091524; Mon, 23 Jun 2014 08:28:14 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5N8SEa2091522; Mon, 23 Jun 2014 08:28:14 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201406230828.s5N8SEa2091522@svn.freebsd.org> From: Marius Strobl Date: Mon, 23 Jun 2014 08:28:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267777 - in stable/9/sys/dev/usb: . controller X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 08:28:15 -0000 Author: marius Date: Mon Jun 23 08:28:14 2014 New Revision: 267777 URL: http://svnweb.freebsd.org/changeset/base/267777 Log: MFC: r267321 Avoid the USB device disconnected and controller shutdown clutter on system shutdown by putting the former under !rebooting and turning the latter into debug messages. Reviewed by: hps Sponsored by: Bally Wulff Games & Entertainment GmbH Modified: stable/9/sys/dev/usb/controller/usb_controller.c stable/9/sys/dev/usb/usb_device.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/controller/usb_controller.c ============================================================================== --- stable/9/sys/dev/usb/controller/usb_controller.c Mon Jun 23 08:27:27 2014 (r267776) +++ stable/9/sys/dev/usb/controller/usb_controller.c Mon Jun 23 08:28:14 2014 (r267777) @@ -314,7 +314,7 @@ usb_shutdown(device_t dev) return (0); } - device_printf(bus->bdev, "Controller shutdown\n"); + DPRINTF("%s: Controller shutdown\n", device_get_nameunit(bus->bdev)); USB_BUS_LOCK(bus); usb_proc_msignal(&bus->explore_proc, @@ -326,7 +326,8 @@ usb_shutdown(device_t dev) } USB_BUS_UNLOCK(bus); - device_printf(bus->bdev, "Controller shutdown complete\n"); + DPRINTF("%s: Controller shutdown complete\n", + device_get_nameunit(bus->bdev)); return (0); } Modified: stable/9/sys/dev/usb/usb_device.c ============================================================================== --- stable/9/sys/dev/usb/usb_device.c Mon Jun 23 08:27:27 2014 (r267776) +++ stable/9/sys/dev/usb/usb_device.c Mon Jun 23 08:28:14 2014 (r267777) @@ -1094,10 +1094,12 @@ usb_detach_device_sub(struct usb_device */ *ppdev = NULL; - device_printf(dev, "at %s, port %d, addr %d " - "(disconnected)\n", - device_get_nameunit(udev->parent_dev), - udev->port_no, udev->address); + if (!rebooting) { + device_printf(dev, "at %s, port %d, addr %d " + "(disconnected)\n", + device_get_nameunit(udev->parent_dev), + udev->port_no, udev->address); + } if (device_is_attached(dev)) { if (udev->flags.peer_suspended) { @@ -2109,8 +2111,10 @@ usb_free_device(struct usb_device *udev, #endif #if USB_HAVE_UGEN - printf("%s: <%s> at %s (disconnected)\n", udev->ugen_name, - usb_get_manufacturer(udev), device_get_nameunit(bus->bdev)); + if (!rebooting) { + printf("%s: <%s> at %s (disconnected)\n", udev->ugen_name, + usb_get_manufacturer(udev), device_get_nameunit(bus->bdev)); + } /* Destroy UGEN symlink, if any */ if (udev->ugen_symlink) { From owner-svn-src-stable@FreeBSD.ORG Mon Jun 23 08:32:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EEA1685E; Mon, 23 Jun 2014 08:32:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB6212C88; Mon, 23 Jun 2014 08:32:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5N8WaIW095281; Mon, 23 Jun 2014 08:32:36 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5N8WasL095280; Mon, 23 Jun 2014 08:32:36 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201406230832.s5N8WasL095280@svn.freebsd.org> From: Marius Strobl Date: Mon, 23 Jun 2014 08:32:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267778 - stable/10/sys/cam X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 08:32:37 -0000 Author: marius Date: Mon Jun 23 08:32:36 2014 New Revision: 267778 URL: http://svnweb.freebsd.org/changeset/base/267778 Log: MFC: r267638 Don't denounce peripherals on system shutdown. Together with r267321 (MFCed to stable/10 in r267775), we're now back to the pre-r228483 level of default verbosity. This in turn again typically allows for reading information that userland might have printed on the screen before initiating a halt, but still permits to debug potential device shutdown problems on system shutdown via CAM_DEBUG etc. Reviewed by: mav Sponsored by: Bally Wulff Games & Entertainment GmbH Modified: stable/10/sys/cam/cam_periph.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/cam_periph.c ============================================================================== --- stable/10/sys/cam/cam_periph.c Mon Jun 23 08:28:14 2014 (r267777) +++ stable/10/sys/cam/cam_periph.c Mon Jun 23 08:32:36 2014 (r267778) @@ -597,7 +597,7 @@ cam_periph_invalidate(struct cam_periph return; CAM_DEBUG(periph->path, CAM_DEBUG_INFO, ("Periph invalidated\n")); - if (periph->flags & CAM_PERIPH_ANNOUNCED) + if ((periph->flags & CAM_PERIPH_ANNOUNCED) && !rebooting) xpt_denounce_periph(periph); periph->flags |= CAM_PERIPH_INVALID; periph->flags &= ~CAM_PERIPH_NEW_DEV_FOUND; @@ -663,9 +663,9 @@ camperiphfree(struct cam_periph *periph) xpt_remove_periph(periph); xpt_unlock_buses(); - if (periph->flags & CAM_PERIPH_ANNOUNCED) { + if ((periph->flags & CAM_PERIPH_ANNOUNCED) && !rebooting) xpt_print(periph->path, "Periph destroyed\n"); - } else + else CAM_DEBUG(periph->path, CAM_DEBUG_INFO, ("Periph destroyed\n")); if (periph->flags & CAM_PERIPH_NEW_DEV_FOUND) { From owner-svn-src-stable@FreeBSD.ORG Mon Jun 23 08:32:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB35E944; Mon, 23 Jun 2014 08:32:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A85AB2C89; Mon, 23 Jun 2014 08:32:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5N8Wj5a095359; Mon, 23 Jun 2014 08:32:45 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5N8WjiZ095358; Mon, 23 Jun 2014 08:32:45 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201406230832.s5N8WjiZ095358@svn.freebsd.org> From: Marius Strobl Date: Mon, 23 Jun 2014 08:32:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267779 - stable/9/sys/cam X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 08:32:45 -0000 Author: marius Date: Mon Jun 23 08:32:45 2014 New Revision: 267779 URL: http://svnweb.freebsd.org/changeset/base/267779 Log: MFC: r267638 Don't denounce peripherals on system shutdown. Together with r267321 (MFCed to stable/9 in r267777), we're now back to the pre-r228483 level of default verbosity. This in turn again typically allows for reading information that userland might have printed on the screen before initiating a halt, but still permits to debug potential device shutdown problems on system shutdown via CAM_DEBUG etc. Reviewed by: mav Sponsored by: Bally Wulff Games & Entertainment GmbH Modified: stable/9/sys/cam/cam_periph.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/cam_periph.c ============================================================================== --- stable/9/sys/cam/cam_periph.c Mon Jun 23 08:32:36 2014 (r267778) +++ stable/9/sys/cam/cam_periph.c Mon Jun 23 08:32:45 2014 (r267779) @@ -586,7 +586,7 @@ cam_periph_invalidate(struct cam_periph return; CAM_DEBUG(periph->path, CAM_DEBUG_INFO, ("Periph invalidated\n")); - if (periph->flags & CAM_PERIPH_ANNOUNCED) + if ((periph->flags & CAM_PERIPH_ANNOUNCED) && !rebooting) xpt_denounce_periph(periph); periph->flags |= CAM_PERIPH_INVALID; periph->flags &= ~CAM_PERIPH_NEW_DEV_FOUND; @@ -650,9 +650,9 @@ camperiphfree(struct cam_periph *periph) xpt_remove_periph(periph); xpt_unlock_buses(); - if (periph->flags & CAM_PERIPH_ANNOUNCED) { + if ((periph->flags & CAM_PERIPH_ANNOUNCED) && !rebooting) xpt_print(periph->path, "Periph destroyed\n"); - } else + else CAM_DEBUG(periph->path, CAM_DEBUG_INFO, ("Periph destroyed\n")); if (periph->flags & CAM_PERIPH_NEW_DEV_FOUND) { From owner-svn-src-stable@FreeBSD.ORG Mon Jun 23 08:36:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9CF3CD2; Mon, 23 Jun 2014 08:36:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D59832CC0; Mon, 23 Jun 2014 08:36:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5N8annG096259; Mon, 23 Jun 2014 08:36:49 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5N8amxX096252; Mon, 23 Jun 2014 08:36:48 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201406230836.s5N8amxX096252@svn.freebsd.org> From: Michael Tuexen Date: Mon, 23 Jun 2014 08:36:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267780 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 08:36:50 -0000 Author: tuexen Date: Mon Jun 23 08:36:48 2014 New Revision: 267780 URL: http://svnweb.freebsd.org/changeset/base/267780 Log: MFC r267674: Honor jails for unbound SCTP sockets when selecting source addresses, reporting IP-addresses to the peer during the handshake, adding addresses to the host, reporting the addresses via the sysctl interface (used by netstat, for example) and reporting the addresses to the application via socket options. This issue was reported by Bernd Walter. Modified: stable/9/sys/netinet/sctp_asconf.c stable/9/sys/netinet/sctp_output.c stable/9/sys/netinet/sctp_pcb.c stable/9/sys/netinet/sctp_sysctl.c stable/9/sys/netinet/sctp_usrreq.c stable/9/sys/netinet/sctputil.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_asconf.c ============================================================================== --- stable/9/sys/netinet/sctp_asconf.c Mon Jun 23 08:32:45 2014 (r267779) +++ stable/9/sys/netinet/sctp_asconf.c Mon Jun 23 08:36:48 2014 (r267780) @@ -1889,14 +1889,22 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb * * this is boundall or subset bound w/ASCONF allowed */ - /* first, make sure it's a good address family */ + /* first, make sure that the address is IPv4 or IPv6 and not jailed */ switch (ifa->address.sa.sa_family) { #ifdef INET6 case AF_INET6: + if (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &ifa->address.sin6.sin6_addr) != 0) { + return; + } break; #endif #ifdef INET case AF_INET: + if (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &ifa->address.sin.sin_addr) != 0) { + return; + } break; #endif default: @@ -2122,6 +2130,10 @@ sctp_asconf_iterator_stcb(struct sctp_in /* we skip unspecifed addresses */ continue; } + if (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &sin6->sin6_addr) != 0) { + continue; + } if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) { if (stcb->asoc.scope.local_scope == 0) { continue; @@ -2152,6 +2164,10 @@ sctp_asconf_iterator_stcb(struct sctp_in /* we skip unspecifed addresses */ continue; } + if (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &sin->sin_addr) != 0) { + continue; + } if (stcb->asoc.scope.ipv4_local_scope == 0 && IN4_ISPRIVATE_ADDRESS(&sin->sin_addr)) { continue; @@ -2465,6 +2481,10 @@ sctp_find_valid_localaddr(struct sctp_tc /* skip unspecifed addresses */ continue; } + if (prison_check_ip4(stcb->sctp_ep->ip_inp.inp.inp_cred, + &sin->sin_addr) != 0) { + continue; + } if (stcb->asoc.scope.ipv4_local_scope == 0 && IN4_ISPRIVATE_ADDRESS(&sin->sin_addr)) continue; @@ -2498,6 +2518,10 @@ sctp_find_valid_localaddr(struct sctp_tc */ continue; } + if (prison_check_ip6(stcb->sctp_ep->ip_inp.inp.inp_cred, + &sin6->sin6_addr) != 0) { + continue; + } if (stcb->asoc.scope.local_scope == 0 && IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) continue; @@ -3112,6 +3136,10 @@ sctp_check_address_list_all(struct sctp_ #ifdef INET case AF_INET: sin = (struct sockaddr_in *)&sctp_ifa->address.sin; + if (prison_check_ip4(stcb->sctp_ep->ip_inp.inp.inp_cred, + &sin->sin_addr) != 0) { + continue; + } if ((ipv4_scope == 0) && (IN4_ISPRIVATE_ADDRESS(&sin->sin_addr))) { /* private address not in scope */ @@ -3122,6 +3150,10 @@ sctp_check_address_list_all(struct sctp_ #ifdef INET6 case AF_INET6: sin6 = (struct sockaddr_in6 *)&sctp_ifa->address.sin6; + if (prison_check_ip6(stcb->sctp_ep->ip_inp.inp.inp_cred, + &sin6->sin6_addr) != 0) { + continue; + } if ((local_scope == 0) && (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr))) { continue; @@ -3407,6 +3439,10 @@ sctp_asconf_send_nat_state_update(struct #ifdef INET case AF_INET: to = &sctp_ifap->address.sin; + if (prison_check_ip4(stcb->sctp_ep->ip_inp.inp.inp_cred, + &to->sin_addr) != 0) { + continue; + } if (IN4_ISPRIVATE_ADDRESS(&to->sin_addr)) { continue; } @@ -3418,6 +3454,10 @@ sctp_asconf_send_nat_state_update(struct #ifdef INET6 case AF_INET6: to6 = &sctp_ifap->address.sin6; + if (prison_check_ip6(stcb->sctp_ep->ip_inp.inp.inp_cred, + &to6->sin6_addr) != 0) { + continue; + } if (IN6_IS_ADDR_LOOPBACK(&to6->sin6_addr)) { continue; } Modified: stable/9/sys/netinet/sctp_output.c ============================================================================== --- stable/9/sys/netinet/sctp_output.c Mon Jun 23 08:32:45 2014 (r267779) +++ stable/9/sys/netinet/sctp_output.c Mon Jun 23 08:36:48 2014 (r267780) @@ -2060,6 +2060,20 @@ sctp_add_addresses_to_i_ia(struct sctp_i continue; } LIST_FOREACH(sctp_ifap, &sctp_ifnp->ifalist, next_ifa) { +#ifdef INET + if ((sctp_ifap->address.sa.sa_family == AF_INET) && + (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &sctp_ifap->address.sin.sin_addr) != 0)) { + continue; + } +#endif +#ifdef INET6 + if ((sctp_ifap->address.sa.sa_family == AF_INET6) && + (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &sctp_ifap->address.sin6.sin6_addr) != 0)) { + continue; + } +#endif if (sctp_is_addr_restricted(stcb, sctp_ifap)) { continue; } @@ -2089,6 +2103,20 @@ skip_count: continue; } LIST_FOREACH(sctp_ifap, &sctp_ifnp->ifalist, next_ifa) { +#ifdef INET + if ((sctp_ifap->address.sa.sa_family == AF_INET) && + (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &sctp_ifap->address.sin.sin_addr) != 0)) { + continue; + } +#endif +#ifdef INET6 + if ((sctp_ifap->address.sa.sa_family == AF_INET6) && + (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &sctp_ifap->address.sin6.sin6_addr) != 0)) { + continue; + } +#endif if (sctp_is_addr_restricted(stcb, sctp_ifap)) { continue; } @@ -2453,6 +2481,20 @@ sctp_choose_boundspecific_inp(struct sct if (sctp_ifn) { /* is a preferred one on the interface we route out? */ LIST_FOREACH(sctp_ifa, &sctp_ifn->ifalist, next_ifa) { +#ifdef INET + if ((sctp_ifa->address.sa.sa_family == AF_INET) && + (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &sctp_ifa->address.sin.sin_addr) != 0)) { + continue; + } +#endif +#ifdef INET6 + if ((sctp_ifa->address.sa.sa_family == AF_INET6) && + (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &sctp_ifa->address.sin6.sin6_addr) != 0)) { + continue; + } +#endif if ((sctp_ifa->localifa_flags & SCTP_ADDR_DEFER_USE) && (non_asoc_addr_ok == 0)) continue; @@ -2576,6 +2618,20 @@ sctp_choose_boundspecific_stcb(struct sc if (sctp_ifn) { /* first try for a preferred address on the ep */ LIST_FOREACH(sctp_ifa, &sctp_ifn->ifalist, next_ifa) { +#ifdef INET + if ((sctp_ifa->address.sa.sa_family == AF_INET) && + (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &sctp_ifa->address.sin.sin_addr) != 0)) { + continue; + } +#endif +#ifdef INET6 + if ((sctp_ifa->address.sa.sa_family == AF_INET6) && + (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &sctp_ifa->address.sin6.sin6_addr) != 0)) { + continue; + } +#endif if ((sctp_ifa->localifa_flags & SCTP_ADDR_DEFER_USE) && (non_asoc_addr_ok == 0)) continue; if (sctp_is_addr_in_ep(inp, sctp_ifa)) { @@ -2596,6 +2652,20 @@ sctp_choose_boundspecific_stcb(struct sc } /* next try for an acceptable address on the ep */ LIST_FOREACH(sctp_ifa, &sctp_ifn->ifalist, next_ifa) { +#ifdef INET + if ((sctp_ifa->address.sa.sa_family == AF_INET) && + (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &sctp_ifa->address.sin.sin_addr) != 0)) { + continue; + } +#endif +#ifdef INET6 + if ((sctp_ifa->address.sa.sa_family == AF_INET6) && + (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &sctp_ifa->address.sin6.sin6_addr) != 0)) { + continue; + } +#endif if ((sctp_ifa->localifa_flags & SCTP_ADDR_DEFER_USE) && (non_asoc_addr_ok == 0)) continue; if (sctp_is_addr_in_ep(inp, sctp_ifa)) { @@ -2700,6 +2770,7 @@ sctp_from_the_top2: static struct sctp_ifa * sctp_select_nth_preferred_addr_from_ifn_boundall(struct sctp_ifn *ifn, + struct sctp_inpcb *inp, struct sctp_tcb *stcb, int non_asoc_addr_ok, uint8_t dest_is_loop, @@ -2721,6 +2792,20 @@ sctp_select_nth_preferred_addr_from_ifn_ } #endif /* INET6 */ LIST_FOREACH(ifa, &ifn->ifalist, next_ifa) { +#ifdef INET + if ((ifa->address.sa.sa_family == AF_INET) && + (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &ifa->address.sin.sin_addr) != 0)) { + continue; + } +#endif +#ifdef INET6 + if ((ifa->address.sa.sa_family == AF_INET6) && + (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &ifa->address.sin6.sin6_addr) != 0)) { + continue; + } +#endif if ((ifa->localifa_flags & SCTP_ADDR_DEFER_USE) && (non_asoc_addr_ok == 0)) continue; @@ -2806,6 +2891,7 @@ sctp_select_nth_preferred_addr_from_ifn_ static int sctp_count_num_preferred_boundall(struct sctp_ifn *ifn, + struct sctp_inpcb *inp, struct sctp_tcb *stcb, int non_asoc_addr_ok, uint8_t dest_is_loop, @@ -2816,6 +2902,21 @@ sctp_count_num_preferred_boundall(struct int num_eligible_addr = 0; LIST_FOREACH(ifa, &ifn->ifalist, next_ifa) { +#ifdef INET + if ((ifa->address.sa.sa_family == AF_INET) && + (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &ifa->address.sin.sin_addr) != 0)) { + continue; + } +#endif +#ifdef INET6 + if ((ifa->address.sa.sa_family == AF_INET6) && + (stcb != NULL) && + (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &ifa->address.sin6.sin6_addr) != 0)) { + continue; + } +#endif if ((ifa->localifa_flags & SCTP_ADDR_DEFER_USE) && (non_asoc_addr_ok == 0)) { continue; @@ -2847,7 +2948,8 @@ sctp_count_num_preferred_boundall(struct } static struct sctp_ifa * -sctp_choose_boundall(struct sctp_tcb *stcb, +sctp_choose_boundall(struct sctp_inpcb *inp, + struct sctp_tcb *stcb, struct sctp_nets *net, sctp_route_t * ro, uint32_t vrf_id, @@ -2902,7 +3004,7 @@ sctp_choose_boundall(struct sctp_tcb *st cur_addr_num = net->indx_of_eligible_next_to_use; } num_preferred = sctp_count_num_preferred_boundall(sctp_ifn, - stcb, + inp, stcb, non_asoc_addr_ok, dest_is_loop, dest_is_priv, fam); @@ -2929,7 +3031,7 @@ sctp_choose_boundall(struct sctp_tcb *st */ SCTPDBG(SCTP_DEBUG_OUTPUT2, "cur_addr_num:%d\n", cur_addr_num); - sctp_ifa = sctp_select_nth_preferred_addr_from_ifn_boundall(sctp_ifn, stcb, non_asoc_addr_ok, dest_is_loop, + sctp_ifa = sctp_select_nth_preferred_addr_from_ifn_boundall(sctp_ifn, inp, stcb, non_asoc_addr_ok, dest_is_loop, dest_is_priv, cur_addr_num, fam, ro); /* if sctp_ifa is NULL something changed??, fall to plan b. */ @@ -2960,7 +3062,7 @@ bound_all_plan_b: SCTPDBG(SCTP_DEBUG_OUTPUT2, "already seen\n"); continue; } - num_preferred = sctp_count_num_preferred_boundall(sctp_ifn, stcb, non_asoc_addr_ok, + num_preferred = sctp_count_num_preferred_boundall(sctp_ifn, inp, stcb, non_asoc_addr_ok, dest_is_loop, dest_is_priv, fam); SCTPDBG(SCTP_DEBUG_OUTPUT2, "Found ifn:%p %d preferred source addresses\n", @@ -2982,7 +3084,7 @@ bound_all_plan_b: if (cur_addr_num >= num_preferred) { cur_addr_num = 0; } - sifa = sctp_select_nth_preferred_addr_from_ifn_boundall(sctp_ifn, stcb, non_asoc_addr_ok, dest_is_loop, + sifa = sctp_select_nth_preferred_addr_from_ifn_boundall(sctp_ifn, inp, stcb, non_asoc_addr_ok, dest_is_loop, dest_is_priv, cur_addr_num, fam, ro); if (sifa == NULL) continue; @@ -3010,6 +3112,22 @@ again_with_private_addresses_allowed: } LIST_FOREACH(sctp_ifa, &emit_ifn->ifalist, next_ifa) { SCTPDBG(SCTP_DEBUG_OUTPUT2, "ifa:%p\n", (void *)sctp_ifa); +#ifdef INET + if ((sctp_ifa->address.sa.sa_family == AF_INET) && + (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &sctp_ifa->address.sin.sin_addr) != 0)) { + SCTPDBG(SCTP_DEBUG_OUTPUT2, "Jailed\n"); + continue; + } +#endif +#ifdef INET6 + if ((sctp_ifa->address.sa.sa_family == AF_INET6) && + (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &sctp_ifa->address.sin6.sin6_addr) != 0)) { + SCTPDBG(SCTP_DEBUG_OUTPUT2, "Jailed\n"); + continue; + } +#endif if ((sctp_ifa->localifa_flags & SCTP_ADDR_DEFER_USE) && (non_asoc_addr_ok == 0)) { SCTPDBG(SCTP_DEBUG_OUTPUT2, "Defer\n"); @@ -3060,6 +3178,20 @@ plan_d: continue; } LIST_FOREACH(sctp_ifa, &sctp_ifn->ifalist, next_ifa) { +#ifdef INET + if ((sctp_ifa->address.sa.sa_family == AF_INET) && + (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &sctp_ifa->address.sin.sin_addr) != 0)) { + continue; + } +#endif +#ifdef INET6 + if ((sctp_ifa->address.sa.sa_family == AF_INET6) && + (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &sctp_ifa->address.sin6.sin6_addr) != 0)) { + continue; + } +#endif if ((sctp_ifa->localifa_flags & SCTP_ADDR_DEFER_USE) && (non_asoc_addr_ok == 0)) continue; @@ -3110,6 +3242,20 @@ out: LIST_FOREACH(sctp_ifa, &sctp_ifn->ifalist, next_ifa) { struct sctp_ifa *tmp_sifa; +#ifdef INET + if ((sctp_ifa->address.sa.sa_family == AF_INET) && + (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &sctp_ifa->address.sin.sin_addr) != 0)) { + continue; + } +#endif +#ifdef INET6 + if ((sctp_ifa->address.sa.sa_family == AF_INET6) && + (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &sctp_ifa->address.sin6.sin6_addr) != 0)) { + continue; + } +#endif if ((sctp_ifa->localifa_flags & SCTP_ADDR_DEFER_USE) && (non_asoc_addr_ok == 0)) continue; @@ -3295,7 +3441,7 @@ sctp_source_address_selection(struct sct /* * Bound all case */ - answer = sctp_choose_boundall(stcb, net, ro, vrf_id, + answer = sctp_choose_boundall(inp, stcb, net, ro, vrf_id, dest_is_priv, dest_is_loop, non_asoc_addr_ok, fam); SCTP_IPI_ADDR_RUNLOCK(); Modified: stable/9/sys/netinet/sctp_pcb.c ============================================================================== --- stable/9/sys/netinet/sctp_pcb.c Mon Jun 23 08:32:45 2014 (r267779) +++ stable/9/sys/netinet/sctp_pcb.c Mon Jun 23 08:36:48 2014 (r267780) @@ -898,6 +898,10 @@ sctp_does_stcb_own_this_addr(struct sctp IN4_ISPRIVATE_ADDRESS(&sin->sin_addr)) { continue; } + if (prison_check_ip4(stcb->sctp_ep->ip_inp.inp.inp_cred, + &sin->sin_addr) != 0) { + continue; + } if (sin->sin_addr.s_addr == rsin->sin_addr.s_addr) { SCTP_IPI_ADDR_RUNLOCK(); return (1); @@ -913,6 +917,10 @@ sctp_does_stcb_own_this_addr(struct sctp sin6 = &sctp_ifa->address.sin6; rsin6 = (struct sockaddr_in6 *)to; + if (prison_check_ip6(stcb->sctp_ep->ip_inp.inp.inp_cred, + &sin6->sin6_addr) != 0) { + continue; + } if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) { if (local_scope == 0) continue; @@ -1060,6 +1068,39 @@ sctp_tcb_special_locate(struct sctp_inpc SCTP_INP_RUNLOCK(inp); continue; } + switch (to->sa_family) { +#ifdef INET + case AF_INET: + { + struct sockaddr_in *sin; + + sin = (struct sockaddr_in *)to; + if (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &sin->sin_addr) != 0) { + SCTP_INP_RUNLOCK(inp); + continue; + } + break; + } +#endif +#ifdef INET6 + case AF_INET6: + { + struct sockaddr_in6 *sin6; + + sin6 = (struct sockaddr_in6 *)to; + if (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &sin6->sin6_addr) != 0) { + SCTP_INP_RUNLOCK(inp); + continue; + } + break; + } +#endif + default: + SCTP_INP_RUNLOCK(inp); + continue; + } if (inp->def_vrf_id != vrf_id) { SCTP_INP_RUNLOCK(inp); continue; @@ -1628,23 +1669,45 @@ sctp_endpoint_probe(struct sockaddr *nam if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUNDALL) && (inp->sctp_lport == lport)) { /* got it */ + switch (nam->sa_family) { #ifdef INET - if ((nam->sa_family == AF_INET) && - (inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) && - SCTP_IPV6_V6ONLY(inp)) { - /* IPv4 on a IPv6 socket with ONLY IPv6 set */ - SCTP_INP_RUNLOCK(inp); - continue; - } + case AF_INET: + if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) && + SCTP_IPV6_V6ONLY(inp)) { + /* + * IPv4 on a IPv6 socket with ONLY + * IPv6 set + */ + SCTP_INP_RUNLOCK(inp); + continue; + } + if (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &sin->sin_addr) != 0) { + SCTP_INP_RUNLOCK(inp); + continue; + } + break; #endif #ifdef INET6 - /* A V6 address and the endpoint is NOT bound V6 */ - if (nam->sa_family == AF_INET6 && - (inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) == 0) { - SCTP_INP_RUNLOCK(inp); - continue; - } + case AF_INET6: + /* + * A V6 address and the endpoint is NOT + * bound V6 + */ + if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) == 0) { + SCTP_INP_RUNLOCK(inp); + continue; + } + if (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &sin6->sin6_addr) != 0) { + SCTP_INP_RUNLOCK(inp); + continue; + } + break; #endif + default: + break; + } /* does a VRF id match? */ fnd = 0; if (inp->def_vrf_id == vrf_id) @@ -2403,6 +2466,7 @@ sctp_inpcb_alloc(struct socket *so, uint /* setup socket pointers */ inp->sctp_socket = so; inp->ip_inp.inp.inp_socket = so; + inp->ip_inp.inp.inp_cred = crhold(so->so_cred); #ifdef INET6 if (INP_SOCKAF(so) == AF_INET6) { if (MODULE_GLOBAL(ip6_auto_flowlabel)) { @@ -2421,6 +2485,7 @@ sctp_inpcb_alloc(struct socket *so, uint /* init the small hash table we use to track asocid <-> tcb */ inp->sctp_asocidhash = SCTP_HASH_INIT(SCTP_STACK_VTAG_HASH_SIZE, &inp->hashasocidmark); if (inp->sctp_asocidhash == NULL) { + crfree(inp->ip_inp.inp.inp_cred); SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_ep), inp); SCTP_INP_INFO_WUNLOCK(); return (ENOBUFS); @@ -2435,6 +2500,7 @@ sctp_inpcb_alloc(struct socket *so, uint ((struct in6pcb *)(&inp->ip_inp.inp))->in6p_sp = pcb_sp; } if (error != 0) { + crfree(inp->ip_inp.inp.inp_cred); SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_ep), inp); SCTP_INP_INFO_WUNLOCK(); return error; @@ -2465,6 +2531,7 @@ sctp_inpcb_alloc(struct socket *so, uint */ SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, EOPNOTSUPP); so->so_pcb = NULL; + crfree(inp->ip_inp.inp.inp_cred); SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_ep), inp); return (EOPNOTSUPP); } @@ -2484,6 +2551,7 @@ sctp_inpcb_alloc(struct socket *so, uint SCTP_PRINTF("Out of SCTP-INPCB->hashinit - no resources\n"); SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, ENOBUFS); so->so_pcb = NULL; + crfree(inp->ip_inp.inp.inp_cred); SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_ep), inp); return (ENOBUFS); } @@ -3630,6 +3698,7 @@ sctp_inpcb_free(struct sctp_inpcb *inp, inp->sctp_tcbhash = NULL; } /* Now we must put the ep memory back into the zone pool */ + crfree(inp->ip_inp.inp.inp_cred); INP_LOCK_DESTROY(&inp->ip_inp.inp); SCTP_INP_LOCK_DESTROY(inp); SCTP_INP_READ_DESTROY(inp); Modified: stable/9/sys/netinet/sctp_sysctl.c ============================================================================== --- stable/9/sys/netinet/sctp_sysctl.c Mon Jun 23 08:32:45 2014 (r267779) +++ stable/9/sys/netinet/sctp_sysctl.c Mon Jun 23 08:36:48 2014 (r267780) @@ -252,6 +252,10 @@ copy_out_local_addresses(struct sctp_inp sin = (struct sockaddr_in *)&sctp_ifa->address.sa; if (sin->sin_addr.s_addr == 0) continue; + if (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &sin->sin_addr) != 0) { + continue; + } if ((ipv4_local_scope == 0) && (IN4_ISPRIVATE_ADDRESS(&sin->sin_addr))) continue; } else { @@ -267,6 +271,10 @@ copy_out_local_addresses(struct sctp_inp sin6 = (struct sockaddr_in6 *)&sctp_ifa->address.sa; if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) continue; + if (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &sin6->sin6_addr) != 0) { + continue; + } if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) { if (local_scope == 0) continue; Modified: stable/9/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/9/sys/netinet/sctp_usrreq.c Mon Jun 23 08:32:45 2014 (r267779) +++ stable/9/sys/netinet/sctp_usrreq.c Mon Jun 23 08:36:48 2014 (r267780) @@ -1197,6 +1197,10 @@ sctp_fill_up_addresses_vrf(struct sctp_i */ continue; } + if (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &sin->sin_addr) != 0) { + continue; + } if ((ipv4_local_scope == 0) && (IN4_ISPRIVATE_ADDRESS(&sin->sin_addr))) { continue; @@ -1238,6 +1242,10 @@ sctp_fill_up_addresses_vrf(struct sctp_i */ continue; } + if (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &sin6->sin6_addr) != 0) { + continue; + } if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) { if (local_scope == 0) continue; @@ -5239,6 +5247,43 @@ sctp_setopt(struct socket *so, int optna error = EINVAL; goto out_of_it; } + } else { + switch (sspp->sspp_addr.ss_family) { +#ifdef INET + case AF_INET: + { + struct sockaddr_in *sin; + + sin = (struct sockaddr_in *)&sspp->sspp_addr; + if (prison_check_ip4(inp->ip_inp.inp.inp_cred, + &sin->sin_addr) != 0) { + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); + error = EINVAL; + goto out_of_it; + } + break; + } +#endif +#ifdef INET6 + case AF_INET6: + { + struct sockaddr_in6 *sin6; + + sin6 = (struct sockaddr_in6 *)&sspp->sspp_addr; + if (prison_check_ip6(inp->ip_inp.inp.inp_cred, + &sin6->sin6_addr) != 0) { + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); + error = EINVAL; + goto out_of_it; + } + break; + } +#endif + default: + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); + error = EINVAL; + goto out_of_it; + } } if (sctp_set_primary_ip_address_sa(stcb, (struct sockaddr *)&sspp->sspp_addr) != 0) { Modified: stable/9/sys/netinet/sctputil.c ============================================================================== --- stable/9/sys/netinet/sctputil.c Mon Jun 23 08:32:45 2014 (r267779) +++ stable/9/sys/netinet/sctputil.c Mon Jun 23 08:36:48 2014 (r267780) @@ -6693,6 +6693,10 @@ sctp_local_addr_count(struct sctp_tcb *s */ continue; } + if (prison_check_ip4(stcb->sctp_ep->ip_inp.inp.inp_cred, + &sin->sin_addr) != 0) { + continue; + } if ((ipv4_local_scope == 0) && (IN4_ISPRIVATE_ADDRESS(&sin->sin_addr))) { continue; @@ -6713,6 +6717,10 @@ sctp_local_addr_count(struct sctp_tcb *s if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) { continue; } + if (prison_check_ip6(stcb->sctp_ep->ip_inp.inp.inp_cred, + &sin6->sin6_addr) != 0) { + continue; + } if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) { if (local_scope == 0) continue; From owner-svn-src-stable@FreeBSD.ORG Mon Jun 23 08:38:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 716D6E4E; Mon, 23 Jun 2014 08:38:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E4BE2CE7; Mon, 23 Jun 2014 08:38:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5N8cvKv096633; Mon, 23 Jun 2014 08:38:57 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5N8cvsg096632; Mon, 23 Jun 2014 08:38:57 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201406230838.s5N8cvsg096632@svn.freebsd.org> From: Michael Tuexen Date: Mon, 23 Jun 2014 08:38:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267781 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 08:38:57 -0000 Author: tuexen Date: Mon Jun 23 08:38:56 2014 New Revision: 267781 URL: http://svnweb.freebsd.org/changeset/base/267781 Log: MFC r267682: Fix a bug in the setsockopt()-handling of the SCTP specific option SCTP_PEER_ADDR_THLDS: Use the provided address as intended. Modified: stable/9/sys/netinet/sctp_usrreq.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/9/sys/netinet/sctp_usrreq.c Mon Jun 23 08:36:48 2014 (r267780) +++ stable/9/sys/netinet/sctp_usrreq.c Mon Jun 23 08:38:56 2014 (r267781) @@ -5642,7 +5642,7 @@ sctp_setopt(struct socket *so, int optna SCTP_FIND_STCB(inp, stcb, thlds->spt_assoc_id); net = NULL; if (stcb) { - net = sctp_findnet(stcb, (struct sockaddr *)&thlds->spt_assoc_id); + net = sctp_findnet(stcb, (struct sockaddr *)&thlds->spt_address); } else { /* * We increment here since @@ -5653,7 +5653,7 @@ sctp_setopt(struct socket *so, int optna */ SCTP_INP_INCR_REF(inp); stcb = sctp_findassociation_ep_addr(&inp, - (struct sockaddr *)&thlds->spt_assoc_id, + (struct sockaddr *)&thlds->spt_address, &net, NULL, NULL); if (stcb == NULL) { SCTP_INP_DECR_REF(inp); @@ -5662,7 +5662,7 @@ sctp_setopt(struct socket *so, int optna if (stcb && (net == NULL)) { struct sockaddr *sa; - sa = (struct sockaddr *)&thlds->spt_assoc_id; + sa = (struct sockaddr *)&thlds->spt_address; #ifdef INET if (sa->sa_family == AF_INET) { From owner-svn-src-stable@FreeBSD.ORG Mon Jun 23 08:40:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A2E6DCC; Mon, 23 Jun 2014 08:40:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83FEA2D43; Mon, 23 Jun 2014 08:40:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5N8euCE099108; Mon, 23 Jun 2014 08:40:56 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5N8eu2l099107; Mon, 23 Jun 2014 08:40:56 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201406230840.s5N8eu2l099107@svn.freebsd.org> From: Michael Tuexen Date: Mon, 23 Jun 2014 08:40:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267782 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 08:40:56 -0000 Author: tuexen Date: Mon Jun 23 08:40:56 2014 New Revision: 267782 URL: http://svnweb.freebsd.org/changeset/base/267782 Log: MFC r267688: Fix a bug which incorrectly allowed two listening SCTP sockets on the same port bound to the wildcard address. Modified: stable/9/sys/netinet/sctp_usrreq.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/9/sys/netinet/sctp_usrreq.c Mon Jun 23 08:38:56 2014 (r267781) +++ stable/9/sys/netinet/sctp_usrreq.c Mon Jun 23 08:40:56 2014 (r267782) @@ -6098,30 +6098,29 @@ sctp_listen(struct socket *so, int backl if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_PORTREUSE)) { /* See if we have a listener */ struct sctp_inpcb *tinp; - union sctp_sockstore store, *sp; + union sctp_sockstore store; - sp = &store; if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUNDALL) == 0) { /* not bound all */ struct sctp_laddr *laddr; LIST_FOREACH(laddr, &inp->sctp_addr_list, sctp_nxt_addr) { memcpy(&store, &laddr->ifa->address, sizeof(store)); - switch (sp->sa.sa_family) { + switch (store.sa.sa_family) { #ifdef INET case AF_INET: - sp->sin.sin_port = inp->sctp_lport; + store.sin.sin_port = inp->sctp_lport; break; #endif #ifdef INET6 case AF_INET6: - sp->sin6.sin6_port = inp->sctp_lport; + store.sin6.sin6_port = inp->sctp_lport; break; #endif default: break; } - tinp = sctp_pcb_findep(&sp->sa, 0, 0, inp->def_vrf_id); + tinp = sctp_pcb_findep(&store.sa, 0, 0, inp->def_vrf_id); if (tinp && (tinp != inp) && ((tinp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) == 0) && ((tinp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) == 0) && @@ -6139,20 +6138,6 @@ sctp_listen(struct socket *so, int backl } else { /* Setup a local addr bound all */ memset(&store, 0, sizeof(store)); - switch (sp->sa.sa_family) { -#ifdef INET - case AF_INET: - store.sin.sin_port = inp->sctp_lport; - break; -#endif -#ifdef INET6 - case AF_INET6: - sp->sin6.sin6_port = inp->sctp_lport; - break; -#endif - default: - break; - } #ifdef INET6 if (inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) { store.sa.sa_family = AF_INET6; @@ -6165,7 +6150,21 @@ sctp_listen(struct socket *so, int backl store.sa.sa_len = sizeof(struct sockaddr_in); } #endif - tinp = sctp_pcb_findep(&sp->sa, 0, 0, inp->def_vrf_id); + switch (store.sa.sa_family) { +#ifdef INET + case AF_INET: + store.sin.sin_port = inp->sctp_lport; + break; +#endif +#ifdef INET6 + case AF_INET6: + store.sin6.sin6_port = inp->sctp_lport; + break; +#endif + default: + break; + } + tinp = sctp_pcb_findep(&store.sa, 0, 0, inp->def_vrf_id); if (tinp && (tinp != inp) && ((tinp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) == 0) && ((tinp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) == 0) && From owner-svn-src-stable@FreeBSD.ORG Mon Jun 23 13:09:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF28070B; Mon, 23 Jun 2014 13:09:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF5E125B5; Mon, 23 Jun 2014 13:09:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5ND9ohG022940; Mon, 23 Jun 2014 13:09:50 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5ND9o4J022937; Mon, 23 Jun 2014 13:09:50 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406231309.s5ND9o4J022937@svn.freebsd.org> From: Alexander Motin Date: Mon, 23 Jun 2014 13:09:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267786 - in stable/9/sys: nfs rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 13:09:51 -0000 Author: mav Date: Mon Jun 23 13:09:49 2014 New Revision: 267786 URL: http://svnweb.freebsd.org/changeset/base/267786 Log: MFC r267221, r267278: Introduce new per-thread lock to protect the list of requests. This allows to slightly simplify svc_run_internal() code: if we processed all the requests in a queue, then we know that new one will not appear. Modified: stable/9/sys/nfs/nfs_fha.c stable/9/sys/rpc/svc.c stable/9/sys/rpc/svc.h Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/nfs/nfs_fha.c ============================================================================== --- stable/9/sys/nfs/nfs_fha.c Mon Jun 23 12:43:30 2014 (r267785) +++ stable/9/sys/nfs/nfs_fha.c Mon Jun 23 13:09:49 2014 (r267786) @@ -288,11 +288,7 @@ fha_hash_entry_add_op(struct fha_hash_en * Get the service thread currently associated with the fhe that is * appropriate to handle this operation. */ -SVCTHREAD * -fha_hash_entry_choose_thread(struct fha_params *softc, - struct fha_hash_entry *fhe, struct fha_info *i, SVCTHREAD *this_thread); - -SVCTHREAD * +static SVCTHREAD * fha_hash_entry_choose_thread(struct fha_params *softc, struct fha_hash_entry *fhe, struct fha_info *i, SVCTHREAD *this_thread) { @@ -428,13 +424,13 @@ fha_assign(SVCTHREAD *this_thread, struc * Grab the pool lock here to not let chosen thread go away before * the new request inserted to its queue while we drop fhe lock. */ - mtx_lock(&(*softc->pool)->sp_lock); + mtx_lock(&thread->st_lock); mtx_unlock(fhe->mtx); return (thread); thist: req->rq_p1 = NULL; - mtx_lock(&(*softc->pool)->sp_lock); + mtx_lock(&this_thread->st_lock); return (this_thread); } Modified: stable/9/sys/rpc/svc.c ============================================================================== --- stable/9/sys/rpc/svc.c Mon Jun 23 12:43:30 2014 (r267785) +++ stable/9/sys/rpc/svc.c Mon Jun 23 13:09:49 2014 (r267786) @@ -1072,7 +1072,6 @@ svc_request_space_available(SVCPOOL *poo static void svc_run_internal(SVCPOOL *pool, bool_t ismaster) { - struct svc_reqlist reqs; SVCTHREAD *st, *stpref; SVCXPRT *xprt; enum xprt_stat stat; @@ -1081,11 +1080,11 @@ svc_run_internal(SVCPOOL *pool, bool_t i int error; st = mem_alloc(sizeof(*st)); + mtx_init(&st->st_lock, "st_lock", NULL, MTX_DEF); st->st_pool = pool; st->st_xprt = NULL; STAILQ_INIT(&st->st_reqs); cv_init(&st->st_cond, "rpcsvc"); - STAILQ_INIT(&reqs); mtx_lock(&pool->sp_lock); LIST_INSERT_HEAD(&pool->sp_threads, st, st_link); @@ -1119,7 +1118,7 @@ svc_run_internal(SVCPOOL *pool, bool_t i } xprt = st->st_xprt; - if (!xprt && STAILQ_EMPTY(&st->st_reqs)) { + if (!xprt) { /* * Enforce maxthreads count. */ @@ -1161,8 +1160,7 @@ svc_run_internal(SVCPOOL *pool, bool_t i if (!ismaster && (pool->sp_threadcount > pool->sp_minthreads) - && !st->st_xprt - && STAILQ_EMPTY(&st->st_reqs)) + && !st->st_xprt) break; } else if (error) { mtx_unlock(&pool->sp_lock); @@ -1172,93 +1170,71 @@ svc_run_internal(SVCPOOL *pool, bool_t i } continue; } + mtx_unlock(&pool->sp_lock); - if (xprt) { - /* - * Drain the transport socket and queue up any - * RPCs. - */ - xprt->xp_lastactive = time_uptime; - do { - if (!svc_request_space_available(pool)) - break; - mtx_unlock(&pool->sp_lock); - rqstp = NULL; - stat = svc_getreq(xprt, &rqstp); - if (rqstp) { - svc_change_space_used(pool, rqstp->rq_size); - /* - * See if the application has - * a preference for some other - * thread. - */ - stpref = st; - if (pool->sp_assign) - stpref = pool->sp_assign(st, - rqstp); - else - mtx_lock(&pool->sp_lock); - + /* + * Drain the transport socket and queue up any RPCs. + */ + xprt->xp_lastactive = time_uptime; + do { + if (!svc_request_space_available(pool)) + break; + rqstp = NULL; + stat = svc_getreq(xprt, &rqstp); + if (rqstp) { + svc_change_space_used(pool, rqstp->rq_size); + /* + * See if the application has a preference + * for some other thread. + */ + if (pool->sp_assign) { + stpref = pool->sp_assign(st, rqstp); rqstp->rq_thread = stpref; STAILQ_INSERT_TAIL(&stpref->st_reqs, rqstp, rq_link); - - /* - * If we assigned the request - * to another thread, make - * sure its awake and continue - * reading from the - * socket. Otherwise, try to - * find some other thread to - * read from the socket and - * execute the request - * immediately. - */ - if (stpref == st) - break; - if (stpref->st_idle) { - LIST_REMOVE(stpref, st_ilink); - stpref->st_idle = FALSE; - cv_signal(&stpref->st_cond); - } - } else - mtx_lock(&pool->sp_lock); - } while (stat == XPRT_MOREREQS - && pool->sp_state != SVCPOOL_CLOSING); - - /* - * Move this transport to the end of the - * active list to ensure fairness when - * multiple transports are active. If this was - * the last queued request, svc_getreq will - * end up calling xprt_inactive to remove from - * the active list. - */ - xprt->xp_thread = NULL; - st->st_xprt = NULL; - if (xprt->xp_active) { - if (!svc_request_space_available(pool) || - !xprt_assignthread(xprt)) - TAILQ_INSERT_TAIL(&pool->sp_active, - xprt, xp_alink); + mtx_unlock(&stpref->st_lock); + if (stpref != st) + rqstp = NULL; + } else { + rqstp->rq_thread = st; + STAILQ_INSERT_TAIL(&st->st_reqs, + rqstp, rq_link); + } } - STAILQ_CONCAT(&reqs, &st->st_reqs); - mtx_unlock(&pool->sp_lock); - SVC_RELEASE(xprt); - } else { - STAILQ_CONCAT(&reqs, &st->st_reqs); - mtx_unlock(&pool->sp_lock); + } while (rqstp == NULL && stat == XPRT_MOREREQS + && pool->sp_state != SVCPOOL_CLOSING); + + /* + * Move this transport to the end of the active list to + * ensure fairness when multiple transports are active. + * If this was the last queued request, svc_getreq will end + * up calling xprt_inactive to remove from the active list. + */ + mtx_lock(&pool->sp_lock); + xprt->xp_thread = NULL; + st->st_xprt = NULL; + if (xprt->xp_active) { + if (!svc_request_space_available(pool) || + !xprt_assignthread(xprt)) + TAILQ_INSERT_TAIL(&pool->sp_active, + xprt, xp_alink); } + mtx_unlock(&pool->sp_lock); + SVC_RELEASE(xprt); /* * Execute what we have queued. */ sz = 0; - while ((rqstp = STAILQ_FIRST(&reqs)) != NULL) { - STAILQ_REMOVE_HEAD(&reqs, rq_link); + mtx_lock(&st->st_lock); + while ((rqstp = STAILQ_FIRST(&st->st_reqs)) != NULL) { + STAILQ_REMOVE_HEAD(&st->st_reqs, rq_link); + mtx_unlock(&st->st_lock); sz += rqstp->rq_size; svc_executereq(rqstp); + mtx_lock(&st->st_lock); } + mtx_unlock(&st->st_lock); svc_change_space_used(pool, -sz); mtx_lock(&pool->sp_lock); } @@ -1275,6 +1251,7 @@ svc_run_internal(SVCPOOL *pool, bool_t i mtx_unlock(&pool->sp_lock); + mtx_destroy(&st->st_lock); cv_destroy(&st->st_cond); mem_free(st, sizeof(*st)); Modified: stable/9/sys/rpc/svc.h ============================================================================== --- stable/9/sys/rpc/svc.h Mon Jun 23 12:43:30 2014 (r267785) +++ stable/9/sys/rpc/svc.h Mon Jun 23 13:09:49 2014 (r267786) @@ -291,6 +291,7 @@ STAILQ_HEAD(svc_reqlist, svc_req); * thread to read and execute pending RPCs. */ typedef struct __rpc_svcthread { + struct mtx_padalign st_lock; /* protects st_reqs field */ struct __rpc_svcpool *st_pool; SVCXPRT *st_xprt; /* transport we are processing */ struct svc_reqlist st_reqs; /* RPC requests to execute */ From owner-svn-src-stable@FreeBSD.ORG Mon Jun 23 13:10:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0543865; Mon, 23 Jun 2014 13:10:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7098325CA; Mon, 23 Jun 2014 13:10:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5NDAoAA025021; Mon, 23 Jun 2014 13:10:50 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5NDAoTl025019; Mon, 23 Jun 2014 13:10:50 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406231310.s5NDAoTl025019@svn.freebsd.org> From: Alexander Motin Date: Mon, 23 Jun 2014 13:10:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267787 - stable/9/sys/rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 13:10:50 -0000 Author: mav Date: Mon Jun 23 13:10:49 2014 New Revision: 267787 URL: http://svnweb.freebsd.org/changeset/base/267787 Log: MFC r267223: Remove st_idle variable, duplicating st_xprt. Modified: stable/9/sys/rpc/svc.c stable/9/sys/rpc/svc.h Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/rpc/svc.c ============================================================================== --- stable/9/sys/rpc/svc.c Mon Jun 23 13:09:49 2014 (r267786) +++ stable/9/sys/rpc/svc.c Mon Jun 23 13:10:49 2014 (r267787) @@ -340,7 +340,6 @@ xprt_assignthread(SVCXPRT *xprt) st = LIST_FIRST(&pool->sp_idlethreads); if (st) { LIST_REMOVE(st, st_ilink); - st->st_idle = FALSE; SVC_ACQUIRE(xprt); xprt->xp_thread = st; st->st_xprt = xprt; @@ -1140,7 +1139,6 @@ svc_run_internal(SVCPOOL *pool, bool_t i } LIST_INSERT_HEAD(&pool->sp_idlethreads, st, st_ilink); - st->st_idle = TRUE; if (ismaster || (!ismaster && pool->sp_threadcount > pool->sp_minthreads)) error = cv_timedwait_sig(&st->st_cond, @@ -1148,10 +1146,8 @@ svc_run_internal(SVCPOOL *pool, bool_t i else error = cv_wait_sig(&st->st_cond, &pool->sp_lock); - if (st->st_idle) { + if (st->st_xprt == NULL) LIST_REMOVE(st, st_ilink); - st->st_idle = FALSE; - } /* * Reduce worker thread count when idle. Modified: stable/9/sys/rpc/svc.h ============================================================================== --- stable/9/sys/rpc/svc.h Mon Jun 23 13:09:49 2014 (r267786) +++ stable/9/sys/rpc/svc.h Mon Jun 23 13:10:49 2014 (r267787) @@ -295,7 +295,6 @@ typedef struct __rpc_svcthread { struct __rpc_svcpool *st_pool; SVCXPRT *st_xprt; /* transport we are processing */ struct svc_reqlist st_reqs; /* RPC requests to execute */ - int st_idle; /* thread is on idle list */ struct cv st_cond; /* sleeping for work */ LIST_ENTRY(__rpc_svcthread) st_link; /* all threads list */ LIST_ENTRY(__rpc_svcthread) st_ilink; /* idle threads list */ From owner-svn-src-stable@FreeBSD.ORG Mon Jun 23 13:11:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6116A9B2; Mon, 23 Jun 2014 13:11:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D0B02644; Mon, 23 Jun 2014 13:11:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5NDBmfC026565; Mon, 23 Jun 2014 13:11:48 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5NDBlgv026561; Mon, 23 Jun 2014 13:11:47 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406231311.s5NDBlgv026561@svn.freebsd.org> From: Alexander Motin Date: Mon, 23 Jun 2014 13:11:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267788 - stable/9/sys/rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 13:11:48 -0000 Author: mav Date: Mon Jun 23 13:11:47 2014 New Revision: 267788 URL: http://svnweb.freebsd.org/changeset/base/267788 Log: MFC r267228: Split RPC pool threads into number of smaller semi-isolated groups. Old design with unified thread pool was good from the point of thread utilization. But single pool-wide mutex became huge congestion point for systems with many CPUs. To reduce the congestion create several thread groups within a pool (one group for every 6 CPUs and 12 threads), each group with own mutex. Each connection during its registration is assigned to one of the groups in round-robin fashion. File affinify code may still move requests between the groups, but otherwise groups are self-contained. Modified: stable/9/sys/rpc/svc.c stable/9/sys/rpc/svc.h stable/9/sys/rpc/svc_generic.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/rpc/svc.c ============================================================================== --- stable/9/sys/rpc/svc.c Mon Jun 23 13:10:49 2014 (r267787) +++ stable/9/sys/rpc/svc.c Mon Jun 23 13:11:47 2014 (r267788) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -70,7 +71,7 @@ __FBSDID("$FreeBSD$"); static struct svc_callout *svc_find(SVCPOOL *pool, rpcprog_t, rpcvers_t, char *); -static void svc_new_thread(SVCPOOL *pool); +static void svc_new_thread(SVCGROUP *grp); static void xprt_unregister_locked(SVCXPRT *xprt); static void svc_change_space_used(SVCPOOL *pool, int delta); static bool_t svc_request_space_available(SVCPOOL *pool); @@ -79,11 +80,14 @@ static bool_t svc_request_space_availabl static int svcpool_minthread_sysctl(SYSCTL_HANDLER_ARGS); static int svcpool_maxthread_sysctl(SYSCTL_HANDLER_ARGS); +static int svcpool_threads_sysctl(SYSCTL_HANDLER_ARGS); SVCPOOL* svcpool_create(const char *name, struct sysctl_oid_list *sysctl_base) { SVCPOOL *pool; + SVCGROUP *grp; + int g; pool = malloc(sizeof(SVCPOOL), M_RPC, M_WAITOK|M_ZERO); @@ -91,15 +95,22 @@ svcpool_create(const char *name, struct pool->sp_name = name; pool->sp_state = SVCPOOL_INIT; pool->sp_proc = NULL; - TAILQ_INIT(&pool->sp_xlist); - TAILQ_INIT(&pool->sp_active); TAILQ_INIT(&pool->sp_callouts); TAILQ_INIT(&pool->sp_lcallouts); - LIST_INIT(&pool->sp_threads); - LIST_INIT(&pool->sp_idlethreads); pool->sp_minthreads = 1; pool->sp_maxthreads = 1; - pool->sp_threadcount = 0; + pool->sp_groupcount = 1; + for (g = 0; g < SVC_MAXGROUPS; g++) { + grp = &pool->sp_groups[g]; + mtx_init(&grp->sg_lock, "sg_lock", NULL, MTX_DEF); + grp->sg_pool = pool; + grp->sg_state = SVCPOOL_ACTIVE; + TAILQ_INIT(&grp->sg_xlist); + TAILQ_INIT(&grp->sg_active); + LIST_INIT(&grp->sg_idlethreads); + grp->sg_minthreads = 1; + grp->sg_maxthreads = 1; + } /* * Don't use more than a quarter of mbuf clusters or more than @@ -114,12 +125,19 @@ svcpool_create(const char *name, struct if (sysctl_base) { SYSCTL_ADD_PROC(&pool->sp_sysctl, sysctl_base, OID_AUTO, "minthreads", CTLTYPE_INT | CTLFLAG_RW, - pool, 0, svcpool_minthread_sysctl, "I", ""); + pool, 0, svcpool_minthread_sysctl, "I", + "Minimal number of threads"); SYSCTL_ADD_PROC(&pool->sp_sysctl, sysctl_base, OID_AUTO, "maxthreads", CTLTYPE_INT | CTLFLAG_RW, - pool, 0, svcpool_maxthread_sysctl, "I", ""); + pool, 0, svcpool_maxthread_sysctl, "I", + "Maximal number of threads"); + SYSCTL_ADD_PROC(&pool->sp_sysctl, sysctl_base, OID_AUTO, + "threads", CTLTYPE_INT | CTLFLAG_RD, + pool, 0, svcpool_threads_sysctl, "I", + "Current number of threads"); SYSCTL_ADD_INT(&pool->sp_sysctl, sysctl_base, OID_AUTO, - "threads", CTLFLAG_RD, &pool->sp_threadcount, 0, ""); + "groups", CTLFLAG_RD, &pool->sp_groupcount, 0, + "Number of thread groups"); SYSCTL_ADD_UINT(&pool->sp_sysctl, sysctl_base, OID_AUTO, "request_space_used", CTLFLAG_RD, @@ -158,20 +176,29 @@ svcpool_create(const char *name, struct void svcpool_destroy(SVCPOOL *pool) { + SVCGROUP *grp; SVCXPRT *xprt, *nxprt; struct svc_callout *s; struct svc_loss_callout *sl; struct svcxprt_list cleanup; + int g; TAILQ_INIT(&cleanup); - mtx_lock(&pool->sp_lock); - while (TAILQ_FIRST(&pool->sp_xlist)) { - xprt = TAILQ_FIRST(&pool->sp_xlist); - xprt_unregister_locked(xprt); - TAILQ_INSERT_TAIL(&cleanup, xprt, xp_link); + for (g = 0; g < SVC_MAXGROUPS; g++) { + grp = &pool->sp_groups[g]; + mtx_lock(&grp->sg_lock); + while ((xprt = TAILQ_FIRST(&grp->sg_xlist)) != NULL) { + xprt_unregister_locked(xprt); + TAILQ_INSERT_TAIL(&cleanup, xprt, xp_link); + } + mtx_unlock(&grp->sg_lock); + } + TAILQ_FOREACH_SAFE(xprt, &cleanup, xp_link, nxprt) { + SVC_RELEASE(xprt); } + mtx_lock(&pool->sp_lock); while ((s = TAILQ_FIRST(&pool->sp_callouts)) != NULL) { mtx_unlock(&pool->sp_lock); svc_unreg(pool, s->sc_prog, s->sc_vers); @@ -184,10 +211,10 @@ svcpool_destroy(SVCPOOL *pool) } mtx_unlock(&pool->sp_lock); - TAILQ_FOREACH_SAFE(xprt, &cleanup, xp_link, nxprt) { - SVC_RELEASE(xprt); + for (g = 0; g < SVC_MAXGROUPS; g++) { + grp = &pool->sp_groups[g]; + mtx_destroy(&grp->sg_lock); } - mtx_destroy(&pool->sp_lock); if (pool->sp_rcache) @@ -197,14 +224,23 @@ svcpool_destroy(SVCPOOL *pool) free(pool, M_RPC); } -static bool_t -svcpool_active(SVCPOOL *pool) +/* + * Sysctl handler to get the present thread count on a pool + */ +static int +svcpool_threads_sysctl(SYSCTL_HANDLER_ARGS) { - enum svcpool_state state = pool->sp_state; + SVCPOOL *pool; + int threads, error, g; - if (state == SVCPOOL_INIT || state == SVCPOOL_CLOSING) - return (FALSE); - return (TRUE); + pool = oidp->oid_arg1; + threads = 0; + mtx_lock(&pool->sp_lock); + for (g = 0; g < pool->sp_groupcount; g++) + threads += pool->sp_groups[g].sg_threadcount; + mtx_unlock(&pool->sp_lock); + error = sysctl_handle_int(oidp, &threads, 0, req); + return (error); } /* @@ -214,7 +250,7 @@ static int svcpool_minthread_sysctl(SYSCTL_HANDLER_ARGS) { SVCPOOL *pool; - int newminthreads, error, n; + int newminthreads, error, g; pool = oidp->oid_arg1; newminthreads = pool->sp_minthreads; @@ -223,21 +259,11 @@ svcpool_minthread_sysctl(SYSCTL_HANDLER_ if (newminthreads > pool->sp_maxthreads) return (EINVAL); mtx_lock(&pool->sp_lock); - if (newminthreads > pool->sp_minthreads - && svcpool_active(pool)) { - /* - * If the pool is running and we are - * increasing, create some more threads now. - */ - n = newminthreads - pool->sp_threadcount; - if (n > 0) { - mtx_unlock(&pool->sp_lock); - while (n--) - svc_new_thread(pool); - mtx_lock(&pool->sp_lock); - } - } pool->sp_minthreads = newminthreads; + for (g = 0; g < pool->sp_groupcount; g++) { + pool->sp_groups[g].sg_minthreads = max(1, + pool->sp_minthreads / pool->sp_groupcount); + } mtx_unlock(&pool->sp_lock); } return (error); @@ -250,8 +276,7 @@ static int svcpool_maxthread_sysctl(SYSCTL_HANDLER_ARGS) { SVCPOOL *pool; - SVCTHREAD *st; - int newmaxthreads, error; + int newmaxthreads, error, g; pool = oidp->oid_arg1; newmaxthreads = pool->sp_maxthreads; @@ -260,17 +285,11 @@ svcpool_maxthread_sysctl(SYSCTL_HANDLER_ if (newmaxthreads < pool->sp_minthreads) return (EINVAL); mtx_lock(&pool->sp_lock); - if (newmaxthreads < pool->sp_maxthreads - && svcpool_active(pool)) { - /* - * If the pool is running and we are - * decreasing, wake up some idle threads to - * encourage them to exit. - */ - LIST_FOREACH(st, &pool->sp_idlethreads, st_ilink) - cv_signal(&st->st_cond); - } pool->sp_maxthreads = newmaxthreads; + for (g = 0; g < pool->sp_groupcount; g++) { + pool->sp_groups[g].sg_maxthreads = max(1, + pool->sp_maxthreads / pool->sp_groupcount); + } mtx_unlock(&pool->sp_lock); } return (error); @@ -283,13 +302,17 @@ void xprt_register(SVCXPRT *xprt) { SVCPOOL *pool = xprt->xp_pool; + SVCGROUP *grp; + int g; SVC_ACQUIRE(xprt); - mtx_lock(&pool->sp_lock); + g = atomic_fetchadd_int(&pool->sp_nextgroup, 1) % pool->sp_groupcount; + xprt->xp_group = grp = &pool->sp_groups[g]; + mtx_lock(&grp->sg_lock); xprt->xp_registered = TRUE; xprt->xp_active = FALSE; - TAILQ_INSERT_TAIL(&pool->sp_xlist, xprt, xp_link); - mtx_unlock(&pool->sp_lock); + TAILQ_INSERT_TAIL(&grp->sg_xlist, xprt, xp_link); + mtx_unlock(&grp->sg_lock); } /* @@ -300,29 +323,29 @@ xprt_register(SVCXPRT *xprt) static void xprt_unregister_locked(SVCXPRT *xprt) { - SVCPOOL *pool = xprt->xp_pool; + SVCGROUP *grp = xprt->xp_group; - mtx_assert(&pool->sp_lock, MA_OWNED); + mtx_assert(&grp->sg_lock, MA_OWNED); KASSERT(xprt->xp_registered == TRUE, ("xprt_unregister_locked: not registered")); xprt_inactive_locked(xprt); - TAILQ_REMOVE(&pool->sp_xlist, xprt, xp_link); + TAILQ_REMOVE(&grp->sg_xlist, xprt, xp_link); xprt->xp_registered = FALSE; } void xprt_unregister(SVCXPRT *xprt) { - SVCPOOL *pool = xprt->xp_pool; + SVCGROUP *grp = xprt->xp_group; - mtx_lock(&pool->sp_lock); + mtx_lock(&grp->sg_lock); if (xprt->xp_registered == FALSE) { /* Already unregistered by another thread */ - mtx_unlock(&pool->sp_lock); + mtx_unlock(&grp->sg_lock); return; } xprt_unregister_locked(xprt); - mtx_unlock(&pool->sp_lock); + mtx_unlock(&grp->sg_lock); SVC_RELEASE(xprt); } @@ -333,11 +356,11 @@ xprt_unregister(SVCXPRT *xprt) static int xprt_assignthread(SVCXPRT *xprt) { - SVCPOOL *pool = xprt->xp_pool; + SVCGROUP *grp = xprt->xp_group; SVCTHREAD *st; - mtx_assert(&pool->sp_lock, MA_OWNED); - st = LIST_FIRST(&pool->sp_idlethreads); + mtx_assert(&grp->sg_lock, MA_OWNED); + st = LIST_FIRST(&grp->sg_idlethreads); if (st) { LIST_REMOVE(st, st_ilink); SVC_ACQUIRE(xprt); @@ -354,10 +377,10 @@ xprt_assignthread(SVCXPRT *xprt) * from a socket upcall). Don't create more * than one thread per second. */ - if (pool->sp_state == SVCPOOL_ACTIVE - && pool->sp_lastcreatetime < time_uptime - && pool->sp_threadcount < pool->sp_maxthreads) { - pool->sp_state = SVCPOOL_THREADWANTED; + if (grp->sg_state == SVCPOOL_ACTIVE + && grp->sg_lastcreatetime < time_uptime + && grp->sg_threadcount < grp->sg_maxthreads) { + grp->sg_state = SVCPOOL_THREADWANTED; } } return (FALSE); @@ -366,40 +389,40 @@ xprt_assignthread(SVCXPRT *xprt) void xprt_active(SVCXPRT *xprt) { - SVCPOOL *pool = xprt->xp_pool; + SVCGROUP *grp = xprt->xp_group; - mtx_lock(&pool->sp_lock); + mtx_lock(&grp->sg_lock); if (!xprt->xp_registered) { /* * Race with xprt_unregister - we lose. */ - mtx_unlock(&pool->sp_lock); + mtx_unlock(&grp->sg_lock); return; } if (!xprt->xp_active) { xprt->xp_active = TRUE; if (xprt->xp_thread == NULL) { - if (!svc_request_space_available(pool) || + if (!svc_request_space_available(xprt->xp_pool) || !xprt_assignthread(xprt)) - TAILQ_INSERT_TAIL(&pool->sp_active, xprt, + TAILQ_INSERT_TAIL(&grp->sg_active, xprt, xp_alink); } } - mtx_unlock(&pool->sp_lock); + mtx_unlock(&grp->sg_lock); } void xprt_inactive_locked(SVCXPRT *xprt) { - SVCPOOL *pool = xprt->xp_pool; + SVCGROUP *grp = xprt->xp_group; - mtx_assert(&pool->sp_lock, MA_OWNED); + mtx_assert(&grp->sg_lock, MA_OWNED); if (xprt->xp_active) { if (xprt->xp_thread == NULL) - TAILQ_REMOVE(&pool->sp_active, xprt, xp_alink); + TAILQ_REMOVE(&grp->sg_active, xprt, xp_alink); xprt->xp_active = FALSE; } } @@ -407,11 +430,11 @@ xprt_inactive_locked(SVCXPRT *xprt) void xprt_inactive(SVCXPRT *xprt) { - SVCPOOL *pool = xprt->xp_pool; + SVCGROUP *grp = xprt->xp_group; - mtx_lock(&pool->sp_lock); + mtx_lock(&grp->sg_lock); xprt_inactive_locked(xprt); - mtx_unlock(&pool->sp_lock); + mtx_unlock(&grp->sg_lock); } /* @@ -993,14 +1016,14 @@ svc_executereq(struct svc_req *rqstp) } static void -svc_checkidle(SVCPOOL *pool) +svc_checkidle(SVCGROUP *grp) { SVCXPRT *xprt, *nxprt; time_t timo; struct svcxprt_list cleanup; TAILQ_INIT(&cleanup); - TAILQ_FOREACH_SAFE(xprt, &pool->sp_xlist, xp_link, nxprt) { + TAILQ_FOREACH_SAFE(xprt, &grp->sg_xlist, xp_link, nxprt) { /* * Only some transports have idle timers. Don't time * something out which is just waking up. @@ -1015,27 +1038,31 @@ svc_checkidle(SVCPOOL *pool) } } - mtx_unlock(&pool->sp_lock); + mtx_unlock(&grp->sg_lock); TAILQ_FOREACH_SAFE(xprt, &cleanup, xp_link, nxprt) { SVC_RELEASE(xprt); } - mtx_lock(&pool->sp_lock); - + mtx_lock(&grp->sg_lock); } static void svc_assign_waiting_sockets(SVCPOOL *pool) { + SVCGROUP *grp; SVCXPRT *xprt; + int g; - mtx_lock(&pool->sp_lock); - while ((xprt = TAILQ_FIRST(&pool->sp_active)) != NULL) { - if (xprt_assignthread(xprt)) - TAILQ_REMOVE(&pool->sp_active, xprt, xp_alink); - else - break; + for (g = 0; g < pool->sp_groupcount; g++) { + grp = &pool->sp_groups[g]; + mtx_lock(&grp->sg_lock); + while ((xprt = TAILQ_FIRST(&grp->sg_active)) != NULL) { + if (xprt_assignthread(xprt)) + TAILQ_REMOVE(&grp->sg_active, xprt, xp_alink); + else + break; + } + mtx_unlock(&grp->sg_lock); } - mtx_unlock(&pool->sp_lock); } static void @@ -1069,8 +1096,9 @@ svc_request_space_available(SVCPOOL *poo } static void -svc_run_internal(SVCPOOL *pool, bool_t ismaster) +svc_run_internal(SVCGROUP *grp, bool_t ismaster) { + SVCPOOL *pool = grp->sg_pool; SVCTHREAD *st, *stpref; SVCXPRT *xprt; enum xprt_stat stat; @@ -1085,35 +1113,34 @@ svc_run_internal(SVCPOOL *pool, bool_t i STAILQ_INIT(&st->st_reqs); cv_init(&st->st_cond, "rpcsvc"); - mtx_lock(&pool->sp_lock); - LIST_INSERT_HEAD(&pool->sp_threads, st, st_link); + mtx_lock(&grp->sg_lock); /* * If we are a new thread which was spawned to cope with * increased load, set the state back to SVCPOOL_ACTIVE. */ - if (pool->sp_state == SVCPOOL_THREADSTARTING) - pool->sp_state = SVCPOOL_ACTIVE; + if (grp->sg_state == SVCPOOL_THREADSTARTING) + grp->sg_state = SVCPOOL_ACTIVE; - while (pool->sp_state != SVCPOOL_CLOSING) { + while (grp->sg_state != SVCPOOL_CLOSING) { /* * Create new thread if requested. */ - if (pool->sp_state == SVCPOOL_THREADWANTED) { - pool->sp_state = SVCPOOL_THREADSTARTING; - pool->sp_lastcreatetime = time_uptime; - mtx_unlock(&pool->sp_lock); - svc_new_thread(pool); - mtx_lock(&pool->sp_lock); + if (grp->sg_state == SVCPOOL_THREADWANTED) { + grp->sg_state = SVCPOOL_THREADSTARTING; + grp->sg_lastcreatetime = time_uptime; + mtx_unlock(&grp->sg_lock); + svc_new_thread(grp); + mtx_lock(&grp->sg_lock); continue; } /* * Check for idle transports once per second. */ - if (time_uptime > pool->sp_lastidlecheck) { - pool->sp_lastidlecheck = time_uptime; - svc_checkidle(pool); + if (time_uptime > grp->sg_lastidlecheck) { + grp->sg_lastidlecheck = time_uptime; + svc_checkidle(grp); } xprt = st->st_xprt; @@ -1121,7 +1148,7 @@ svc_run_internal(SVCPOOL *pool, bool_t i /* * Enforce maxthreads count. */ - if (pool->sp_threadcount > pool->sp_maxthreads) + if (grp->sg_threadcount > grp->sg_maxthreads) break; /* @@ -1130,22 +1157,22 @@ svc_run_internal(SVCPOOL *pool, bool_t i * by a thread. */ if (svc_request_space_available(pool) && - (xprt = TAILQ_FIRST(&pool->sp_active)) != NULL) { - TAILQ_REMOVE(&pool->sp_active, xprt, xp_alink); + (xprt = TAILQ_FIRST(&grp->sg_active)) != NULL) { + TAILQ_REMOVE(&grp->sg_active, xprt, xp_alink); SVC_ACQUIRE(xprt); xprt->xp_thread = st; st->st_xprt = xprt; continue; } - LIST_INSERT_HEAD(&pool->sp_idlethreads, st, st_ilink); + LIST_INSERT_HEAD(&grp->sg_idlethreads, st, st_ilink); if (ismaster || (!ismaster && - pool->sp_threadcount > pool->sp_minthreads)) + grp->sg_threadcount > grp->sg_minthreads)) error = cv_timedwait_sig(&st->st_cond, - &pool->sp_lock, 5 * hz); + &grp->sg_lock, 5 * hz); else error = cv_wait_sig(&st->st_cond, - &pool->sp_lock); + &grp->sg_lock); if (st->st_xprt == NULL) LIST_REMOVE(st, st_ilink); @@ -1154,19 +1181,19 @@ svc_run_internal(SVCPOOL *pool, bool_t i */ if (error == EWOULDBLOCK) { if (!ismaster - && (pool->sp_threadcount - > pool->sp_minthreads) + && (grp->sg_threadcount + > grp->sg_minthreads) && !st->st_xprt) break; } else if (error) { - mtx_unlock(&pool->sp_lock); + mtx_unlock(&grp->sg_lock); svc_exit(pool); - mtx_lock(&pool->sp_lock); + mtx_lock(&grp->sg_lock); break; } continue; } - mtx_unlock(&pool->sp_lock); + mtx_unlock(&grp->sg_lock); /* * Drain the transport socket and queue up any RPCs. @@ -1198,7 +1225,7 @@ svc_run_internal(SVCPOOL *pool, bool_t i } } } while (rqstp == NULL && stat == XPRT_MOREREQS - && pool->sp_state != SVCPOOL_CLOSING); + && grp->sg_state != SVCPOOL_CLOSING); /* * Move this transport to the end of the active list to @@ -1206,16 +1233,16 @@ svc_run_internal(SVCPOOL *pool, bool_t i * If this was the last queued request, svc_getreq will end * up calling xprt_inactive to remove from the active list. */ - mtx_lock(&pool->sp_lock); + mtx_lock(&grp->sg_lock); xprt->xp_thread = NULL; st->st_xprt = NULL; if (xprt->xp_active) { if (!svc_request_space_available(pool) || !xprt_assignthread(xprt)) - TAILQ_INSERT_TAIL(&pool->sp_active, + TAILQ_INSERT_TAIL(&grp->sg_active, xprt, xp_alink); } - mtx_unlock(&pool->sp_lock); + mtx_unlock(&grp->sg_lock); SVC_RELEASE(xprt); /* @@ -1232,7 +1259,7 @@ svc_run_internal(SVCPOOL *pool, bool_t i } mtx_unlock(&st->st_lock); svc_change_space_used(pool, -sz); - mtx_lock(&pool->sp_lock); + mtx_lock(&grp->sg_lock); } if (st->st_xprt) { @@ -1240,46 +1267,43 @@ svc_run_internal(SVCPOOL *pool, bool_t i st->st_xprt = NULL; SVC_RELEASE(xprt); } - KASSERT(STAILQ_EMPTY(&st->st_reqs), ("stray reqs on exit")); - LIST_REMOVE(st, st_link); - pool->sp_threadcount--; - - mtx_unlock(&pool->sp_lock); - mtx_destroy(&st->st_lock); cv_destroy(&st->st_cond); mem_free(st, sizeof(*st)); + grp->sg_threadcount--; if (!ismaster) - wakeup(pool); + wakeup(grp); + mtx_unlock(&grp->sg_lock); } static void svc_thread_start(void *arg) { - svc_run_internal((SVCPOOL *) arg, FALSE); + svc_run_internal((SVCGROUP *) arg, FALSE); kthread_exit(); } static void -svc_new_thread(SVCPOOL *pool) +svc_new_thread(SVCGROUP *grp) { + SVCPOOL *pool = grp->sg_pool; struct thread *td; - pool->sp_threadcount++; - kthread_add(svc_thread_start, pool, - pool->sp_proc, &td, 0, 0, + grp->sg_threadcount++; + kthread_add(svc_thread_start, grp, pool->sp_proc, &td, 0, 0, "%s: service", pool->sp_name); } void svc_run(SVCPOOL *pool) { - int i; + int g, i; struct proc *p; struct thread *td; + SVCGROUP *grp; p = curproc; td = curthread; @@ -1287,35 +1311,56 @@ svc_run(SVCPOOL *pool) "%s: master", pool->sp_name); pool->sp_state = SVCPOOL_ACTIVE; pool->sp_proc = p; - pool->sp_lastcreatetime = time_uptime; - pool->sp_threadcount = 1; - for (i = 1; i < pool->sp_minthreads; i++) { - svc_new_thread(pool); + /* Choose group count based on number of threads and CPUs. */ + pool->sp_groupcount = max(1, min(SVC_MAXGROUPS, + min(pool->sp_maxthreads / 2, mp_ncpus) / 6)); + for (g = 0; g < pool->sp_groupcount; g++) { + grp = &pool->sp_groups[g]; + grp->sg_minthreads = max(1, + pool->sp_minthreads / pool->sp_groupcount); + grp->sg_maxthreads = max(1, + pool->sp_maxthreads / pool->sp_groupcount); + grp->sg_lastcreatetime = time_uptime; + } + + /* Starting threads */ + for (g = 0; g < pool->sp_groupcount; g++) { + grp = &pool->sp_groups[g]; + for (i = ((g == 0) ? 1 : 0); i < grp->sg_minthreads; i++) + svc_new_thread(grp); + } + pool->sp_groups[0].sg_threadcount++; + svc_run_internal(&pool->sp_groups[0], TRUE); + + /* Waiting for threads to stop. */ + for (g = 0; g < pool->sp_groupcount; g++) { + grp = &pool->sp_groups[g]; + mtx_lock(&grp->sg_lock); + while (grp->sg_threadcount > 0) + msleep(grp, &grp->sg_lock, 0, "svcexit", 0); + mtx_unlock(&grp->sg_lock); } - - svc_run_internal(pool, TRUE); - - mtx_lock(&pool->sp_lock); - while (pool->sp_threadcount > 0) - msleep(pool, &pool->sp_lock, 0, "svcexit", 0); - mtx_unlock(&pool->sp_lock); } void svc_exit(SVCPOOL *pool) { + SVCGROUP *grp; SVCTHREAD *st; + int g; - mtx_lock(&pool->sp_lock); - - if (pool->sp_state != SVCPOOL_CLOSING) { - pool->sp_state = SVCPOOL_CLOSING; - LIST_FOREACH(st, &pool->sp_idlethreads, st_ilink) - cv_signal(&st->st_cond); + pool->sp_state = SVCPOOL_CLOSING; + for (g = 0; g < pool->sp_groupcount; g++) { + grp = &pool->sp_groups[g]; + mtx_lock(&grp->sg_lock); + if (grp->sg_state != SVCPOOL_CLOSING) { + grp->sg_state = SVCPOOL_CLOSING; + LIST_FOREACH(st, &grp->sg_idlethreads, st_ilink) + cv_signal(&st->st_cond); + } + mtx_unlock(&grp->sg_lock); } - - mtx_unlock(&pool->sp_lock); } bool_t Modified: stable/9/sys/rpc/svc.h ============================================================================== --- stable/9/sys/rpc/svc.h Mon Jun 23 13:10:49 2014 (r267787) +++ stable/9/sys/rpc/svc.h Mon Jun 23 13:11:47 2014 (r267788) @@ -137,6 +137,7 @@ struct xp_ops2 { #ifdef _KERNEL struct __rpc_svcpool; +struct __rpc_svcgroup; struct __rpc_svcthread; #endif @@ -150,6 +151,7 @@ typedef struct __rpc_svcxprt { volatile u_int xp_refs; struct sx xp_lock; struct __rpc_svcpool *xp_pool; /* owning pool (see below) */ + struct __rpc_svcgroup *xp_group; /* owning group (see below) */ TAILQ_ENTRY(__rpc_svcxprt) xp_link; TAILQ_ENTRY(__rpc_svcxprt) xp_alink; bool_t xp_registered; /* xprt_register has been called */ @@ -245,8 +247,6 @@ struct svc_loss_callout { }; TAILQ_HEAD(svc_loss_callout_list, svc_loss_callout); -struct __rpc_svcthread; - /* * Service request */ @@ -296,7 +296,6 @@ typedef struct __rpc_svcthread { SVCXPRT *st_xprt; /* transport we are processing */ struct svc_reqlist st_reqs; /* RPC requests to execute */ struct cv st_cond; /* sleeping for work */ - LIST_ENTRY(__rpc_svcthread) st_link; /* all threads list */ LIST_ENTRY(__rpc_svcthread) st_ilink; /* idle threads list */ LIST_ENTRY(__rpc_svcthread) st_alink; /* application thread list */ int st_p2; /* application workspace */ @@ -305,6 +304,36 @@ typedef struct __rpc_svcthread { LIST_HEAD(svcthread_list, __rpc_svcthread); /* + * A thread group contain all information needed to assign subset of + * transports to subset of threads. On systems with many CPUs and many + * threads that allows to reduce lock congestion and improve performance. + * Hundreds of threads on dozens of CPUs sharing the single pool lock do + * not scale well otherwise. + */ +TAILQ_HEAD(svcxprt_list, __rpc_svcxprt); +enum svcpool_state { + SVCPOOL_INIT, /* svc_run not called yet */ + SVCPOOL_ACTIVE, /* normal running state */ + SVCPOOL_THREADWANTED, /* new service thread requested */ + SVCPOOL_THREADSTARTING, /* new service thread started */ + SVCPOOL_CLOSING /* svc_exit called */ +}; +typedef struct __rpc_svcgroup { + struct mtx_padalign sg_lock; /* protect the thread/req lists */ + struct __rpc_svcpool *sg_pool; + enum svcpool_state sg_state; /* current pool state */ + struct svcxprt_list sg_xlist; /* all transports in the group */ + struct svcxprt_list sg_active; /* transports needing service */ + struct svcthread_list sg_idlethreads; /* idle service threads */ + + int sg_minthreads; /* minimum service thread count */ + int sg_maxthreads; /* maximum service thread count */ + int sg_threadcount; /* current service thread count */ + time_t sg_lastcreatetime; /* when we last started a thread */ + time_t sg_lastidlecheck; /* when we last checked idle transports */ +} SVCGROUP; + +/* * In the kernel, we can't use global variables to store lists of * transports etc. since otherwise we could not have two unrelated RPC * services running, each on its own thread. We solve this by @@ -316,32 +345,18 @@ LIST_HEAD(svcthread_list, __rpc_svcthrea * this to support something similar to the Solaris multi-threaded RPC * server. */ -TAILQ_HEAD(svcxprt_list, __rpc_svcxprt); -enum svcpool_state { - SVCPOOL_INIT, /* svc_run not called yet */ - SVCPOOL_ACTIVE, /* normal running state */ - SVCPOOL_THREADWANTED, /* new service thread requested */ - SVCPOOL_THREADSTARTING, /* new service thread started */ - SVCPOOL_CLOSING /* svc_exit called */ -}; typedef SVCTHREAD *pool_assign_fn(SVCTHREAD *, struct svc_req *); typedef void pool_done_fn(SVCTHREAD *, struct svc_req *); +#define SVC_MAXGROUPS 16 typedef struct __rpc_svcpool { struct mtx sp_lock; /* protect the transport lists */ const char *sp_name; /* pool name (e.g. "nfsd", "NLM" */ enum svcpool_state sp_state; /* current pool state */ struct proc *sp_proc; /* process which is in svc_run */ - struct svcxprt_list sp_xlist; /* all transports in the pool */ - struct svcxprt_list sp_active; /* transports needing service */ struct svc_callout_list sp_callouts; /* (prog,vers)->dispatch list */ struct svc_loss_callout_list sp_lcallouts; /* loss->dispatch list */ - struct svcthread_list sp_threads; /* service threads */ - struct svcthread_list sp_idlethreads; /* idle service threads */ int sp_minthreads; /* minimum service thread count */ int sp_maxthreads; /* maximum service thread count */ - int sp_threadcount; /* current service thread count */ - time_t sp_lastcreatetime; /* when we last started a thread */ - time_t sp_lastidlecheck; /* when we last checked idle transports */ /* * Hooks to allow an application to control request to thread @@ -364,6 +379,10 @@ typedef struct __rpc_svcpool { struct replay_cache *sp_rcache; /* optional replay cache */ struct sysctl_ctx_list sp_sysctl; + + int sp_groupcount; /* Number of groups in the pool. */ + int sp_nextgroup; /* Next group to assign port. */ + SVCGROUP sp_groups[SVC_MAXGROUPS]; /* Thread/port groups. */ } SVCPOOL; #else Modified: stable/9/sys/rpc/svc_generic.c ============================================================================== --- stable/9/sys/rpc/svc_generic.c Mon Jun 23 13:10:49 2014 (r267787) +++ stable/9/sys/rpc/svc_generic.c Mon Jun 23 13:11:47 2014 (r267788) @@ -86,7 +86,8 @@ svc_create( rpcvers_t versnum, /* Version number */ const char *nettype) /* Networktype token */ { - int num = 0; + int g, num = 0; + SVCGROUP *grp; SVCXPRT *xprt; struct netconfig *nconf; void *handle; @@ -96,11 +97,14 @@ svc_create( return (0); } while ((nconf = __rpc_getconf(handle)) != NULL) { - mtx_lock(&pool->sp_lock); - TAILQ_FOREACH(xprt, &pool->sp_xlist, xp_link) { - if (strcmp(xprt->xp_netid, nconf->nc_netid) == 0) { + for (g = 0; g < SVC_MAXGROUPS; g++) { + grp = &pool->sp_groups[g]; + mtx_lock(&grp->sg_lock); + TAILQ_FOREACH(xprt, &grp->sg_xlist, xp_link) { + if (strcmp(xprt->xp_netid, nconf->nc_netid)) + continue; /* Found an old one, use it */ - mtx_unlock(&pool->sp_lock); + mtx_unlock(&grp->sg_lock); (void) rpcb_unset(prognum, versnum, nconf); if (svc_reg(xprt, prognum, versnum, dispatch, nconf) == FALSE) { @@ -108,15 +112,15 @@ svc_create( "svc_create: could not register prog %u vers %u on %s\n", (unsigned)prognum, (unsigned)versnum, nconf->nc_netid); - mtx_lock(&pool->sp_lock); + mtx_lock(&grp->sg_lock); } else { num++; - mtx_lock(&pool->sp_lock); + mtx_lock(&grp->sg_lock); break; } } + mtx_unlock(&grp->sg_lock); } - mtx_unlock(&pool->sp_lock); if (xprt == NULL) { /* It was not found. Now create a new one */ xprt = svc_tp_create(pool, dispatch, prognum, versnum, From owner-svn-src-stable@FreeBSD.ORG Mon Jun 23 13:14:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 86D8DE70; Mon, 23 Jun 2014 13:14:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 59B0C267E; Mon, 23 Jun 2014 13:14:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5NDERT6027389; Mon, 23 Jun 2014 13:14:27 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5NDERcT027388; Mon, 23 Jun 2014 13:14:27 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406231314.s5NDERcT027388@svn.freebsd.org> From: Alexander Motin Date: Mon, 23 Jun 2014 13:14:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267789 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 13:14:27 -0000 Author: mav Date: Mon Jun 23 13:14:26 2014 New Revision: 267789 URL: http://svnweb.freebsd.org/changeset/base/267789 Log: MFC r267232, r267239: Use atomics to modify numvnodes variable. This allows to mostly avoid lock usage in getnewvnode_[drop_]reserve(), that reduces number of global vnode_free_list_mtx mutex acquisitions from 4 to 2 per NFS request on ZFS, improving SMP scalability. Modified: stable/9/sys/kern/vfs_subr.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_subr.c ============================================================================== --- stable/9/sys/kern/vfs_subr.c Mon Jun 23 13:11:47 2014 (r267788) +++ stable/9/sys/kern/vfs_subr.c Mon Jun 23 13:14:26 2014 (r267789) @@ -975,12 +975,19 @@ getnewvnode_reserve(u_int count) struct thread *td; td = curthread; + /* First try to be quick and racy. */ + if (atomic_fetchadd_long(&numvnodes, count) + count <= desiredvnodes) { + td->td_vp_reserv += count; + return; + } else + atomic_subtract_long(&numvnodes, count); + mtx_lock(&vnode_free_list_mtx); while (count > 0) { if (getnewvnode_wait(0) == 0) { count--; td->td_vp_reserv++; - numvnodes++; + atomic_add_long(&numvnodes, 1); } } mtx_unlock(&vnode_free_list_mtx); @@ -992,10 +999,7 @@ getnewvnode_drop_reserve(void) struct thread *td; td = curthread; - mtx_lock(&vnode_free_list_mtx); - KASSERT(numvnodes >= td->td_vp_reserv, ("reserve too large")); - numvnodes -= td->td_vp_reserv; - mtx_unlock(&vnode_free_list_mtx); + atomic_subtract_long(&numvnodes, td->td_vp_reserv); td->td_vp_reserv = 0; } @@ -1032,7 +1036,7 @@ getnewvnode(const char *tag, struct moun return (error); } #endif - numvnodes++; + atomic_add_long(&numvnodes, 1); mtx_unlock(&vnode_free_list_mtx); alloc: vp = (struct vnode *) uma_zalloc(vnode_zone, M_WAITOK|M_ZERO); @@ -2508,9 +2512,7 @@ vdropl(struct vnode *vp) * The vnode has been marked for destruction, so free it. */ CTR2(KTR_VFS, "%s: destroying the vnode %p", __func__, vp); - mtx_lock(&vnode_free_list_mtx); - numvnodes--; - mtx_unlock(&vnode_free_list_mtx); + atomic_subtract_long(&numvnodes, 1); bo = &vp->v_bufobj; VNASSERT((vp->v_iflag & VI_FREE) == 0, vp, ("cleaned vnode still on the free list.")); From owner-svn-src-stable@FreeBSD.ORG Mon Jun 23 13:15:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 99877FBB; Mon, 23 Jun 2014 13:15:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 863B52693; Mon, 23 Jun 2014 13:15:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5NDFO1e027726; Mon, 23 Jun 2014 13:15:24 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5NDFOFN027725; Mon, 23 Jun 2014 13:15:24 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406231315.s5NDFOFN027725@svn.freebsd.org> From: Alexander Motin Date: Mon, 23 Jun 2014 13:15:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267790 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 13:15:24 -0000 Author: mav Date: Mon Jun 23 13:15:24 2014 New Revision: 267790 URL: http://svnweb.freebsd.org/changeset/base/267790 Log: MFC r267362: Remove unneeded mountlist_mtx acquisition from sync_fsync(). All struct mount fields accessed by sync_fsync() are protected by MNT_MTX. Modified: stable/9/sys/kern/vfs_subr.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_subr.c ============================================================================== --- stable/9/sys/kern/vfs_subr.c Mon Jun 23 13:14:26 2014 (r267789) +++ stable/9/sys/kern/vfs_subr.c Mon Jun 23 13:15:24 2014 (r267790) @@ -3781,11 +3781,8 @@ sync_fsync(struct vop_fsync_args *ap) * Walk the list of vnodes pushing all that are dirty and * not already on the sync list. */ - mtx_lock(&mountlist_mtx); - if (vfs_busy(mp, MBF_NOWAIT | MBF_MNTLSTLOCK) != 0) { - mtx_unlock(&mountlist_mtx); + if (vfs_busy(mp, MBF_NOWAIT) != 0) return (0); - } if (vn_start_write(NULL, &mp, V_NOWAIT) != 0) { vfs_unbusy(mp); return (0); From owner-svn-src-stable@FreeBSD.ORG Mon Jun 23 13:18:28 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 616335B4; Mon, 23 Jun 2014 13:18:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42D7226C7; Mon, 23 Jun 2014 13:18:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5NDISeG028248; Mon, 23 Jun 2014 13:18:28 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5NDISDC028247; Mon, 23 Jun 2014 13:18:28 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406231318.s5NDISDC028247@svn.freebsd.org> From: Alexander Motin Date: Mon, 23 Jun 2014 13:18:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267791 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 13:18:28 -0000 Author: mav Date: Mon Jun 23 13:18:27 2014 New Revision: 267791 URL: http://svnweb.freebsd.org/changeset/base/267791 Log: MFC r267351: Move root_mount_hold() functionality to separate mutex. It has nothing to share with mutex protecting list of mounted file systems. Modified: stable/9/sys/kern/vfs_mountroot.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_mountroot.c ============================================================================== --- stable/9/sys/kern/vfs_mountroot.c Mon Jun 23 13:15:24 2014 (r267790) +++ stable/9/sys/kern/vfs_mountroot.c Mon Jun 23 13:18:27 2014 (r267791) @@ -97,6 +97,9 @@ struct vnode *rootvnode; char *rootdevnames[2] = {NULL, NULL}; +struct mtx root_holds_mtx; +MTX_SYSINIT(root_holds, &root_holds_mtx, "root_holds", MTX_DEF); + struct root_hold_token { const char *who; LIST_ENTRY(root_hold_token) list; @@ -131,9 +134,9 @@ root_mount_hold(const char *identifier) h = malloc(sizeof *h, M_DEVBUF, M_ZERO | M_WAITOK); h->who = identifier; - mtx_lock(&mountlist_mtx); + mtx_lock(&root_holds_mtx); LIST_INSERT_HEAD(&root_holds, h, list); - mtx_unlock(&mountlist_mtx); + mtx_unlock(&root_holds_mtx); return (h); } @@ -143,10 +146,10 @@ root_mount_rel(struct root_hold_token *h if (h == NULL) return; - mtx_lock(&mountlist_mtx); + mtx_lock(&root_holds_mtx); LIST_REMOVE(h, list); wakeup(&root_holds); - mtx_unlock(&mountlist_mtx); + mtx_unlock(&root_holds_mtx); free(h, M_DEVBUF); } @@ -168,12 +171,12 @@ root_mount_wait(void) */ KASSERT(curthread->td_proc->p_pid != 0, ("root_mount_wait: cannot be called from the swapper thread")); - mtx_lock(&mountlist_mtx); + mtx_lock(&root_holds_mtx); while (!root_mount_complete) { - msleep(&root_mount_complete, &mountlist_mtx, PZERO, "rootwait", + msleep(&root_mount_complete, &root_holds_mtx, PZERO, "rootwait", hz); } - mtx_unlock(&mountlist_mtx); + mtx_unlock(&root_holds_mtx); } static void @@ -911,9 +914,9 @@ vfs_mountroot_wait(void) DROP_GIANT(); g_waitidle(); PICKUP_GIANT(); - mtx_lock(&mountlist_mtx); + mtx_lock(&root_holds_mtx); if (LIST_EMPTY(&root_holds)) { - mtx_unlock(&mountlist_mtx); + mtx_unlock(&root_holds_mtx); break; } if (ppsratecheck(&lastfail, &curfail, 1)) { @@ -922,7 +925,7 @@ vfs_mountroot_wait(void) printf(" %s", h->who); printf("\n"); } - msleep(&root_holds, &mountlist_mtx, PZERO | PDROP, "roothold", + msleep(&root_holds, &root_holds_mtx, PZERO | PDROP, "roothold", hz); } } @@ -982,10 +985,10 @@ vfs_mountroot(void) vref(prison0.pr_root); mtx_unlock(&prison0.pr_mtx); - mtx_lock(&mountlist_mtx); + mtx_lock(&root_holds_mtx); atomic_store_rel_int(&root_mount_complete, 1); wakeup(&root_mount_complete); - mtx_unlock(&mountlist_mtx); + mtx_unlock(&root_holds_mtx); EVENTHANDLER_INVOKE(mountroot); } From owner-svn-src-stable@FreeBSD.ORG Mon Jun 23 13:19:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D81A77D3; Mon, 23 Jun 2014 13:19:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB5A026D8; Mon, 23 Jun 2014 13:19:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5NDJOAP028556; Mon, 23 Jun 2014 13:19:24 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5NDJOZ6028555; Mon, 23 Jun 2014 13:19:24 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406231319.s5NDJOZ6028555@svn.freebsd.org> From: Alexander Motin Date: Mon, 23 Jun 2014 13:19:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267792 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 13:19:24 -0000 Author: mav Date: Mon Jun 23 13:19:24 2014 New Revision: 267792 URL: http://svnweb.freebsd.org/changeset/base/267792 Log: MFC r267392: Implement simple direct-mapped cache for popular filesystem identifiers to avoid congestion on global mountlist_mtx mutex in vfs_busyfs(), while traversing through the list of mount points. This change significantly improves NFS server scalability, since it had to do this translation for every request, and the global lock becomes quite congested. This code is more optimized for relatively small number of mount points. On systems with hundreds of active mount points this simple cache may have many collisions. But the original traversal code in that case should also behave much worse, so we are not loosing much. Modified: stable/9/sys/kern/vfs_subr.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_subr.c ============================================================================== --- stable/9/sys/kern/vfs_subr.c Mon Jun 23 13:18:27 2014 (r267791) +++ stable/9/sys/kern/vfs_subr.c Mon Jun 23 13:19:24 2014 (r267792) @@ -474,23 +474,53 @@ vfs_getvfs(fsid_t *fsid) /* * Lookup a mount point by filesystem identifier, busying it before * returning. + * + * To avoid congestion on mountlist_mtx, implement simple direct-mapped + * cache for popular filesystem identifiers. The cache is lockess, using + * the fact that struct mount's are never freed. In worst case we may + * get pointer to unmounted or even different filesystem, so we have to + * check what we got, and go slow way if so. */ struct mount * vfs_busyfs(fsid_t *fsid) { +#define FSID_CACHE_SIZE 256 + typedef struct mount * volatile vmp_t; + static vmp_t cache[FSID_CACHE_SIZE]; struct mount *mp; int error; + uint32_t hash; CTR2(KTR_VFS, "%s: fsid %p", __func__, fsid); + hash = fsid->val[0] ^ fsid->val[1]; + hash = (hash >> 16 ^ hash) & (FSID_CACHE_SIZE - 1); + mp = cache[hash]; + if (mp == NULL || + mp->mnt_stat.f_fsid.val[0] != fsid->val[0] || + mp->mnt_stat.f_fsid.val[1] != fsid->val[1]) + goto slow; + if (vfs_busy(mp, 0) != 0) { + cache[hash] = NULL; + goto slow; + } + if (mp->mnt_stat.f_fsid.val[0] == fsid->val[0] && + mp->mnt_stat.f_fsid.val[1] == fsid->val[1]) + return (mp); + else + vfs_unbusy(mp); + +slow: mtx_lock(&mountlist_mtx); TAILQ_FOREACH(mp, &mountlist, mnt_list) { if (mp->mnt_stat.f_fsid.val[0] == fsid->val[0] && mp->mnt_stat.f_fsid.val[1] == fsid->val[1]) { error = vfs_busy(mp, MBF_MNTLSTLOCK); if (error) { + cache[hash] = NULL; mtx_unlock(&mountlist_mtx); return (NULL); } + cache[hash] = mp; return (mp); } } From owner-svn-src-stable@FreeBSD.ORG Mon Jun 23 13:20:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 58C8891B; Mon, 23 Jun 2014 13:20:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C58F26E4; Mon, 23 Jun 2014 13:20:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5NDKFW1028804; Mon, 23 Jun 2014 13:20:15 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5NDKFrw028802; Mon, 23 Jun 2014 13:20:15 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406231320.s5NDKFrw028802@svn.freebsd.org> From: Alexander Motin Date: Mon, 23 Jun 2014 13:20:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267793 - stable/9/sys/nfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 13:20:15 -0000 Author: mav Date: Mon Jun 23 13:20:14 2014 New Revision: 267793 URL: http://svnweb.freebsd.org/changeset/base/267793 Log: MFC r267479: Fix/improve fhe_stats sysctl output. Modified: stable/9/sys/nfs/nfs_fha.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/nfs/nfs_fha.c ============================================================================== --- stable/9/sys/nfs/nfs_fha.c Mon Jun 23 13:19:24 2014 (r267792) +++ stable/9/sys/nfs/nfs_fha.c Mon Jun 23 13:20:14 2014 (r267793) @@ -468,14 +468,14 @@ fha_nd_complete(SVCTHREAD *thread, struc int fhe_stats_sysctl(SYSCTL_HANDLER_ARGS, struct fha_params *softc) { - int error, count, i; + int error, i; struct sbuf sb; struct fha_hash_entry *fhe; - bool_t first = TRUE; + bool_t first, hfirst; SVCTHREAD *thread; SVCPOOL *pool; - sbuf_new(&sb, NULL, 4096, SBUF_FIXEDLEN); + sbuf_new(&sb, NULL, 65536, SBUF_FIXEDLEN); pool = NULL; @@ -485,42 +485,44 @@ fhe_stats_sysctl(SYSCTL_HANDLER_ARGS, st } pool = *softc->pool; - count = 0; for (i = 0; i < FHA_HASH_SIZE; i++) if (!LIST_EMPTY(&softc->fha_hash[i].list)) - count++; + break; - if (count == 0) { + if (i == FHA_HASH_SIZE) { sbuf_printf(&sb, "No file handle entries.\n"); goto out; } - for (i = 0; i < FHA_HASH_SIZE; i++) { + hfirst = TRUE; + for (; i < FHA_HASH_SIZE; i++) { mtx_lock(&softc->fha_hash[i].mtx); + if (LIST_EMPTY(&softc->fha_hash[i].list)) { + mtx_unlock(&softc->fha_hash[i].mtx); + continue; + } + sbuf_printf(&sb, "%shash %d: {\n", hfirst ? "" : ", ", i); + first = TRUE; LIST_FOREACH(fhe, &softc->fha_hash[i].list, link) { - sbuf_printf(&sb, "%sfhe %p: {\n", first ? "" : ", ", fhe); + sbuf_printf(&sb, "%sfhe %p: {\n", first ? " " : ", ", fhe); sbuf_printf(&sb, " fh: %ju\n", (uintmax_t) fhe->fh); - sbuf_printf(&sb, " num_rw: %d\n", fhe->num_rw); - sbuf_printf(&sb, " num_exclusive: %d\n", fhe->num_exclusive); + sbuf_printf(&sb, " num_rw/exclusive: %d/%d\n", + fhe->num_rw, fhe->num_exclusive); sbuf_printf(&sb, " num_threads: %d\n", fhe->num_threads); LIST_FOREACH(thread, &fhe->threads, st_alink) { - sbuf_printf(&sb, " thread %p offset %ju " - "(count %d)\n", thread, + sbuf_printf(&sb, " thread %p offset %ju " + "reqs %d\n", thread, thread->st_p3, thread->st_p2); } - sbuf_printf(&sb, "}"); + sbuf_printf(&sb, " }"); first = FALSE; - - /* Limit the output. */ - if (++count > 128) { - sbuf_printf(&sb, "..."); - break; - } } + sbuf_printf(&sb, "\n}"); mtx_unlock(&softc->fha_hash[i].mtx); + hfirst = FALSE; } out: From owner-svn-src-stable@FreeBSD.ORG Mon Jun 23 13:23:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6717ACED; Mon, 23 Jun 2014 13:23:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53BFF278C; Mon, 23 Jun 2014 13:23:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5NDNqtw032691; Mon, 23 Jun 2014 13:23:52 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5NDNqeX032690; Mon, 23 Jun 2014 13:23:52 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406231323.s5NDNqeX032690@svn.freebsd.org> From: Alexander Motin Date: Mon, 23 Jun 2014 13:23:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267794 - stable/9/sys/cam/ctl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 13:23:52 -0000 Author: mav Date: Mon Jun 23 13:23:51 2014 New Revision: 267794 URL: http://svnweb.freebsd.org/changeset/base/267794 Log: MFC r267429: Fix some leaks on LUN creation error. Modified: stable/9/sys/cam/ctl/ctl_backend_block.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/9/sys/cam/ctl/ctl_backend_block.c Mon Jun 23 13:20:14 2014 (r267793) +++ stable/9/sys/cam/ctl/ctl_backend_block.c Mon Jun 23 13:23:51 2014 (r267794) @@ -1818,9 +1818,14 @@ ctl_be_block_create(struct ctl_be_block_ bailout_error: req->status = CTL_LUN_ERROR; + if (be_lun->io_taskqueue != NULL) + taskqueue_free(be_lun->io_taskqueue); ctl_be_block_close(be_lun); - - free(be_lun->dev_path, M_CTLBLK); + if (be_lun->dev_path != NULL) + free(be_lun->dev_path, M_CTLBLK); + if (be_lun->lun_zone != NULL) + uma_zdestroy(be_lun->lun_zone); + mtx_destroy(&be_lun->lock); free(be_lun, M_CTLBLK); return (retval); From owner-svn-src-stable@FreeBSD.ORG Mon Jun 23 13:41:21 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70859A85; Mon, 23 Jun 2014 13:41:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D7A429BD; Mon, 23 Jun 2014 13:41:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5NDfLLl041582; Mon, 23 Jun 2014 13:41:21 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5NDfLl9041571; Mon, 23 Jun 2014 13:41:21 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406231341.s5NDfLl9041571@svn.freebsd.org> From: Alexander Motin Date: Mon, 23 Jun 2014 13:41:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267796 - stable/9/sys/rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 13:41:21 -0000 Author: mav Date: Mon Jun 23 13:41:20 2014 New Revision: 267796 URL: http://svnweb.freebsd.org/changeset/base/267796 Log: Fix r267788 build on stable/9. Modified: stable/9/sys/rpc/svc.h Modified: stable/9/sys/rpc/svc.h ============================================================================== --- stable/9/sys/rpc/svc.h Mon Jun 23 13:24:00 2014 (r267795) +++ stable/9/sys/rpc/svc.h Mon Jun 23 13:41:20 2014 (r267796) @@ -291,7 +291,7 @@ STAILQ_HEAD(svc_reqlist, svc_req); * thread to read and execute pending RPCs. */ typedef struct __rpc_svcthread { - struct mtx_padalign st_lock; /* protects st_reqs field */ + struct mtx st_lock; /* protects st_reqs field */ struct __rpc_svcpool *st_pool; SVCXPRT *st_xprt; /* transport we are processing */ struct svc_reqlist st_reqs; /* RPC requests to execute */ @@ -319,7 +319,7 @@ enum svcpool_state { SVCPOOL_CLOSING /* svc_exit called */ }; typedef struct __rpc_svcgroup { - struct mtx_padalign sg_lock; /* protect the thread/req lists */ + struct mtx sg_lock; /* protect the thread/req lists */ struct __rpc_svcpool *sg_pool; enum svcpool_state sg_state; /* current pool state */ struct svcxprt_list sg_xlist; /* all transports in the group */ From owner-svn-src-stable@FreeBSD.ORG Mon Jun 23 13:50:04 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 133C84C5; Mon, 23 Jun 2014 13:50:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9D8D2A63; Mon, 23 Jun 2014 13:50:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5NDo3Yn043961; Mon, 23 Jun 2014 13:50:03 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5NDo3P8043956; Mon, 23 Jun 2014 13:50:03 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201406231350.s5NDo3P8043956@svn.freebsd.org> From: Ed Maste Date: Mon, 23 Jun 2014 13:50:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267797 - in stable/10: etc/mtree share share/mk tools/build/options X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 13:50:04 -0000 Author: emaste Date: Mon Jun 23 13:50:02 2014 New Revision: 267797 URL: http://svnweb.freebsd.org/changeset/base/267797 Log: MFC r267124, r267582: Install VT support files They can be disabled by setting WITHOUT_VT_SUPPORT=yes in src.conf. Added: stable/10/tools/build/options/WITHOUT_VT_SUPPORT - copied, changed from r267124, head/tools/build/options/WITHOUT_VT_SUPPORT Modified: stable/10/etc/mtree/BSD.usr.dist stable/10/share/Makefile stable/10/share/mk/bsd.own.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.usr.dist ============================================================================== --- stable/10/etc/mtree/BSD.usr.dist Mon Jun 23 13:41:20 2014 (r267796) +++ stable/10/etc/mtree/BSD.usr.dist Mon Jun 23 13:50:02 2014 (r267797) @@ -1406,6 +1406,12 @@ catalog .. .. + vt + fonts + .. + keymaps + .. + .. zoneinfo Africa .. Modified: stable/10/share/Makefile ============================================================================== --- stable/10/share/Makefile Mon Jun 23 13:41:20 2014 (r267796) +++ stable/10/share/Makefile Mon Jun 23 13:50:02 2014 (r267797) @@ -28,6 +28,7 @@ SUBDIR= ${_colldef} \ termcap \ ${_tests} \ ${_timedef} \ + ${_vt} \ ${_zoneinfo} # NB: keep these sorted by MK_* knobs @@ -85,6 +86,10 @@ _syscons= syscons _tests= tests .endif +.if ${MK_VT_SUPPORT} != "no" +_vt= vt +.endif + .if ${MK_ZONEINFO} != "no" _zoneinfo= zoneinfo .endif Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Mon Jun 23 13:41:20 2014 (r267796) +++ stable/10/share/mk/bsd.own.mk Mon Jun 23 13:50:02 2014 (r267797) @@ -358,6 +358,7 @@ __DEFAULT_YES_OPTIONS = \ UNBOUND \ USB \ UTMPX \ + VT_SUPPORT \ WIRELESS \ WPA_SUPPLICANT_EAPOL \ ZFS \ Copied and modified: stable/10/tools/build/options/WITHOUT_VT_SUPPORT (from r267124, head/tools/build/options/WITHOUT_VT_SUPPORT) ============================================================================== --- head/tools/build/options/WITHOUT_VT_SUPPORT Thu Jun 5 18:53:56 2014 (r267124, copy source) +++ stable/10/tools/build/options/WITHOUT_VT_SUPPORT Mon Jun 23 13:50:02 2014 (r267797) @@ -1,4 +1,4 @@ .\" $FreeBSD$ Set to not build .Xr vt 4 -support files (fonts). +support files (fonts and keymaps). From owner-svn-src-stable@FreeBSD.ORG Mon Jun 23 15:03:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F3EE736; Mon, 23 Jun 2014 15:03:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A22E21BC; Mon, 23 Jun 2014 15:03:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5NF3pxK081764; Mon, 23 Jun 2014 15:03:52 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5NF3pBG081761; Mon, 23 Jun 2014 15:03:51 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201406231503.s5NF3pBG081761@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Mon, 23 Jun 2014 15:03:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267798 - stable/10/lib/libc/stdtime X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 15:03:52 -0000 Author: pfg Date: Mon Jun 23 15:03:51 2014 New Revision: 267798 URL: http://svnweb.freebsd.org/changeset/base/267798 Log: MFC r267601: stdtime: style(9) fixes. Obtained from: illumos Modified: stable/10/lib/libc/stdtime/strftime.c stable/10/lib/libc/stdtime/strptime.c stable/10/lib/libc/stdtime/timelocal.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdtime/strftime.c ============================================================================== --- stable/10/lib/libc/stdtime/strftime.c Mon Jun 23 13:50:02 2014 (r267797) +++ stable/10/lib/libc/stdtime/strftime.c Mon Jun 23 15:03:51 2014 (r267798) @@ -24,9 +24,9 @@ #ifndef NOID static const char elsieid[] = "@(#)strftime.3 8.3"; /* -** Based on the UCB version with the ID appearing below. -** This is ANSIish only when "multibyte character == plain character". -*/ + * Based on the UCB version with the ID appearing below. + * This is ANSIish only when "multibyte character == plain character". + */ #endif /* !defined NOID */ #endif /* !defined lint */ @@ -57,32 +57,32 @@ extern char * tzname[]; #define YEAR_2000_NAME "CHECK_STRFTIME_FORMATS_FOR_TWO_DIGIT_YEARS" #endif /* !defined YEAR_2000_NAME */ -#define IN_NONE 0 -#define IN_SOME 1 -#define IN_THIS 2 -#define IN_ALL 3 - -#define PAD_DEFAULT 0 -#define PAD_LESS 1 -#define PAD_SPACE 2 -#define PAD_ZERO 3 +#define IN_NONE 0 +#define IN_SOME 1 +#define IN_THIS 2 +#define IN_ALL 3 + +#define PAD_DEFAULT 0 +#define PAD_LESS 1 +#define PAD_SPACE 2 +#define PAD_ZERO 3 static const char fmt_padding[][4][5] = { /* DEFAULT, LESS, SPACE, ZERO */ -#define PAD_FMT_MONTHDAY 0 -#define PAD_FMT_HMS 0 -#define PAD_FMT_CENTURY 0 -#define PAD_FMT_SHORTYEAR 0 -#define PAD_FMT_MONTH 0 -#define PAD_FMT_WEEKOFYEAR 0 -#define PAD_FMT_DAYOFMONTH 0 +#define PAD_FMT_MONTHDAY 0 +#define PAD_FMT_HMS 0 +#define PAD_FMT_CENTURY 0 +#define PAD_FMT_SHORTYEAR 0 +#define PAD_FMT_MONTH 0 +#define PAD_FMT_WEEKOFYEAR 0 +#define PAD_FMT_DAYOFMONTH 0 { "%02d", "%d", "%2d", "%02d" }, -#define PAD_FMT_SDAYOFMONTH 1 -#define PAD_FMT_SHMS 1 +#define PAD_FMT_SDAYOFMONTH 1 +#define PAD_FMT_SHMS 1 { "%2d", "%d", "%2d", "%02d" }, #define PAD_FMT_DAYOFYEAR 2 { "%03d", "%d", "%3d", "%03d" }, -#define PAD_FMT_YEAR 3 +#define PAD_FMT_YEAR 3 { "%04d", "%d", "%4d", "%04d" } }; @@ -114,7 +114,7 @@ strftime_l(char * __restrict s, size_t m } #endif /* !defined NO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU */ if (p == s + maxsize) - return 0; + return (0); *p = '\0'; return p - s; } @@ -176,12 +176,12 @@ label: continue; case 'C': /* - ** %C used to do a... - ** _fmt("%a %b %e %X %Y", t); - ** ...whereas now POSIX 1003.2 calls for - ** something completely different. - ** (ado, 1993-05-24) - */ + * %C used to do a... + * _fmt("%a %b %e %X %Y", t); + * ...whereas now POSIX 1003.2 calls for + * something completely different. + * (ado, 1993-05-24) + */ pt = _yconv(t->tm_year, TM_YEAR_BASE, 1, 0, pt, ptlim); continue; @@ -210,17 +210,17 @@ label: goto label; case 'O': /* - ** C99 locale modifiers. - ** The sequences - ** %Ec %EC %Ex %EX %Ey %EY - ** %Od %oe %OH %OI %Om %OM - ** %OS %Ou %OU %OV %Ow %OW %Oy - ** are supposed to provide alternate - ** representations. - ** - ** FreeBSD extension - ** %OB - */ + * C99 locale modifiers. + * The sequences + * %Ec %EC %Ex %EX %Ey %EY + * %Od %oe %OH %OI %Om %OM + * %OS %Ou %OU %OV %Ow %OW %Oy + * are supposed to provide alternate + * representations. + * + * FreeBSD extension + * %OB + */ if (Ealternative || Oalternative) break; Oalternative++; @@ -239,7 +239,8 @@ label: case 'I': pt = _conv((t->tm_hour % 12) ? (t->tm_hour % 12) : 12, - fmt_padding[PAD_FMT_HMS][PadIndex], pt, ptlim); + fmt_padding[PAD_FMT_HMS][PadIndex], + pt, ptlim); continue; case 'j': pt = _conv(t->tm_yday + 1, @@ -247,15 +248,15 @@ label: continue; case 'k': /* - ** This used to be... - ** _conv(t->tm_hour % 12 ? - ** t->tm_hour % 12 : 12, 2, ' '); - ** ...and has been changed to the below to - ** match SunOS 4.1.1 and Arnold Robbins' - ** strftime version 3.0. That is, "%k" and - ** "%l" have been swapped. - ** (ado, 1993-05-24) - */ + * This used to be... + * _conv(t->tm_hour % 12 ? + * t->tm_hour % 12 : 12, 2, ' '); + * ...and has been changed to the below to + * match SunOS 4.1.1 and Arnold Robbins' + * strftime version 3.0. That is, "%k" and + * "%l" have been swapped. + * (ado, 1993-05-24) + */ pt = _conv(t->tm_hour, fmt_padding[PAD_FMT_SHMS][PadIndex], pt, ptlim); continue; @@ -269,17 +270,18 @@ label: #endif /* defined KITCHEN_SINK */ case 'l': /* - ** This used to be... - ** _conv(t->tm_hour, 2, ' '); - ** ...and has been changed to the below to - ** match SunOS 4.1.1 and Arnold Robbin's - ** strftime version 3.0. That is, "%k" and - ** "%l" have been swapped. - ** (ado, 1993-05-24) - */ + * This used to be... + * _conv(t->tm_hour, 2, ' '); + * ...and has been changed to the below to + * match SunOS 4.1.1 and Arnold Robbin's + * strftime version 3.0. That is, "%k" and + * "%l" have been swapped. + * (ado, 1993-05-24) + */ pt = _conv((t->tm_hour % 12) ? (t->tm_hour % 12) : 12, - fmt_padding[PAD_FMT_SHMS][PadIndex], pt, ptlim); + fmt_padding[PAD_FMT_SHMS][PadIndex], + pt, ptlim); continue; case 'M': pt = _conv(t->tm_min, fmt_padding[PAD_FMT_HMS][PadIndex], @@ -287,15 +289,15 @@ label: continue; case 'm': pt = _conv(t->tm_mon + 1, - fmt_padding[PAD_FMT_MONTH][PadIndex], pt, ptlim); + fmt_padding[PAD_FMT_MONTH][PadIndex], + pt, ptlim); continue; case 'n': pt = _add("\n", pt, ptlim); continue; case 'p': pt = _add((t->tm_hour >= (HOURSPERDAY / 2)) ? - tptr->pm : - tptr->am, + tptr->pm : tptr->am, pt, ptlim); continue; case 'R': @@ -339,11 +341,11 @@ label: continue; case 'u': /* - ** From Arnold Robbins' strftime version 3.0: - ** "ISO 8601: Weekday as a decimal number - ** [1 (Monday) - 7]" - ** (ado, 1993-05-24) - */ + * From Arnold Robbins' strftime version 3.0: + * "ISO 8601: Weekday as a decimal number + * [1 (Monday) - 7]" + * (ado, 1993-05-24) + */ pt = _conv((t->tm_wday == 0) ? DAYSPERWEEK : t->tm_wday, "%d", pt, ptlim); @@ -352,23 +354,23 @@ label: case 'G': /* ISO 8601 year (four digits) */ case 'g': /* ISO 8601 year (two digits) */ /* -** From Arnold Robbins' strftime version 3.0: "the week number of the -** year (the first Monday as the first day of week 1) as a decimal number -** (01-53)." -** (ado, 1993-05-24) -** -** From "http://www.ft.uni-erlangen.de/~mskuhn/iso-time.html" by Markus Kuhn: -** "Week 01 of a year is per definition the first week which has the -** Thursday in this year, which is equivalent to the week which contains -** the fourth day of January. In other words, the first week of a new year -** is the week which has the majority of its days in the new year. Week 01 -** might also contain days from the previous year and the week before week -** 01 of a year is the last week (52 or 53) of the previous year even if -** it contains days from the new year. A week starts with Monday (day 1) -** and ends with Sunday (day 7). For example, the first week of the year -** 1997 lasts from 1996-12-30 to 1997-01-05..." -** (ado, 1996-01-02) -*/ + * From Arnold Robbins' strftime version 3.0: "the week number of the + * year (the first Monday as the first day of week 1) as a decimal number + * (01-53)." + * (ado, 1993-05-24) + * + * From "http://www.ft.uni-erlangen.de/~mskuhn/iso-time.html" by Markus Kuhn: + * "Week 01 of a year is per definition the first week which has the + * Thursday in this year, which is equivalent to the week which contains + * the fourth day of January. In other words, the first week of a new year + * is the week which has the majority of its days in the new year. Week 01 + * might also contain days from the previous year and the week before week + * 01 of a year is the last week (52 or 53) of the previous year even if + * it contains days from the new year. A week starts with Monday (day 1) + * and ends with Sunday (day 7). For example, the first week of the year + * 1997 lasts from 1996-12-30 to 1997-01-05..." + * (ado, 1996-01-02) + */ { int year; int base; @@ -389,15 +391,15 @@ label: DAYSPERLYEAR : DAYSPERNYEAR; /* - ** What yday (-3 ... 3) does - ** the ISO year begin on? - */ + * What yday (-3 ... 3) does + * the ISO year begin on? + */ bot = ((yday + 11 - wday) % DAYSPERWEEK) - 3; /* - ** What yday does the NEXT - ** ISO year begin on? - */ + * What yday does the NEXT + * ISO year begin on? + */ top = bot - (len % DAYSPERWEEK); if (top < -3) @@ -438,10 +440,10 @@ label: continue; case 'v': /* - ** From Arnold Robbins' strftime version 3.0: - ** "date as dd-bbb-YYYY" - ** (ado, 1993-05-24) - */ + * From Arnold Robbins' strftime version 3.0: + * "date as dd-bbb-YYYY" + * (ado, 1993-05-24) + */ pt = _fmt("%e-%b-%Y", t, pt, ptlim, warnp, loc); continue; case 'W': @@ -487,10 +489,10 @@ label: pt = _add(tzname[t->tm_isdst != 0], pt, ptlim); /* - ** C99 says that %Z must be replaced by the - ** empty string if the time zone is not - ** determinable. - */ + * C99 says that %Z must be replaced by the + * empty string if the time zone is not + * determinable. + */ continue; case 'z': { @@ -503,24 +505,24 @@ label: diff = t->TM_GMTOFF; #else /* !defined TM_GMTOFF */ /* - ** C99 says that the UTC offset must - ** be computed by looking only at - ** tm_isdst. This requirement is - ** incorrect, since it means the code - ** must rely on magic (in this case - ** altzone and timezone), and the - ** magic might not have the correct - ** offset. Doing things correctly is - ** tricky and requires disobeying C99; - ** see GNU C strftime for details. - ** For now, punt and conform to the - ** standard, even though it's incorrect. - ** - ** C99 says that %z must be replaced by the - ** empty string if the time zone is not - ** determinable, so output nothing if the - ** appropriate variables are not available. - */ + * C99 says that the UTC offset must + * be computed by looking only at + * tm_isdst. This requirement is + * incorrect, since it means the code + * must rely on magic (in this case + * altzone and timezone), and the + * magic might not have the correct + * offset. Doing things correctly is + * tricky and requires disobeying C99; + * see GNU C strftime for details. + * For now, punt and conform to the + * standard, even though it's incorrect. + * + * C99 says that %z must be replaced by the + * empty string if the time zone is not + * determinable, so output nothing if the + * appropriate variables are not available. + */ if (t->tm_isdst == 0) #ifdef USG_COMPAT diff = -timezone; @@ -537,7 +539,8 @@ label: if (diff < 0) { sign = "-"; diff = -diff; - } else sign = "+"; + } else + sign = "+"; pt = _add(sign, pt, ptlim); diff /= SECSPERMIN; diff = (diff / MINSPERHOUR) * 100 + @@ -567,10 +570,10 @@ label: goto label; case '%': /* - ** X311J/88-090 (4.12.3.5): if conversion char is - ** undefined, behavior is undefined. Print out the - ** character itself as printf(3) also does. - */ + * X311J/88-090 (4.12.3.5): if conversion char is + * undefined, behavior is undefined. Print out the + * character itself as printf(3) also does. + */ default: break; } @@ -579,7 +582,7 @@ label: break; *pt++ = *format; } - return pt; + return (pt); } static char * @@ -603,16 +606,16 @@ const char * const ptlim; { while (pt < ptlim && (*pt = *str++) != '\0') ++pt; - return pt; + return (pt); } /* -** POSIX and the C Standard are unclear or inconsistent about -** what %C and %y do if the year is negative or exceeds 9999. -** Use the convention that %C concatenated with %y yields the -** same output as %Y, and that %Y contains at least 4 bytes, -** with more only if necessary. -*/ + * POSIX and the C Standard are unclear or inconsistent about + * what %C and %y do if the year is negative or exceeds 9999. + * Use the convention that %C concatenated with %y yields the + * same output as %Y, and that %Y contains at least 4 bytes, + * with more only if necessary. + */ static char * _yconv(a, b, convert_top, convert_yy, pt, ptlim) @@ -626,7 +629,7 @@ const char * const ptlim; register int lead; register int trail; -#define DIVISOR 100 +#define DIVISOR 100 trail = a % DIVISOR + b % DIVISOR; lead = a / DIVISOR + b / DIVISOR + trail / DIVISOR; trail %= DIVISOR; @@ -644,5 +647,5 @@ const char * const ptlim; } if (convert_yy) pt = _conv(((trail < 0) ? -trail : trail), "%02d", pt, ptlim); - return pt; + return (pt); } Modified: stable/10/lib/libc/stdtime/strptime.c ============================================================================== --- stable/10/lib/libc/stdtime/strptime.c Mon Jun 23 13:50:02 2014 (r267797) +++ stable/10/lib/libc/stdtime/strptime.c Mon Jun 23 15:03:51 2014 (r267798) @@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$"); static char * _strptime(const char *, const char *, struct tm *, int *, locale_t); -#define asizeof(a) (sizeof (a) / sizeof ((a)[0])) +#define asizeof(a) (sizeof (a) / sizeof ((a)[0])) static char * _strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp, @@ -64,8 +64,7 @@ _strptime(const char *buf, const char *f { char c; const char *ptr; - int i, - len; + int i, len; int Ealternative, Oalternative; struct lc_time_T *tptr = __get_current_time_locale(locale); @@ -82,7 +81,7 @@ _strptime(const char *buf, const char *f isspace_l((unsigned char)*buf, locale)) buf++; else if (c != *buf++) - return 0; + return (NULL); continue; } @@ -94,18 +93,18 @@ label: case 0: case '%': if (*buf++ != '%') - return 0; + return (NULL); break; case '+': buf = _strptime(buf, tptr->date_fmt, tm, GMTp, locale); - if (buf == 0) - return 0; + if (buf == NULL) + return (NULL); break; case 'C': if (!isdigit_l((unsigned char)*buf, locale)) - return 0; + return (NULL); /* XXX This will break for 3-digit centuries. */ len = 2; @@ -116,21 +115,21 @@ label: len--; } if (i < 19) - return 0; + return (NULL); tm->tm_year = i * 100 - 1900; break; case 'c': buf = _strptime(buf, tptr->c_fmt, tm, GMTp, locale); - if (buf == 0) - return 0; + if (buf == NULL) + return (NULL); break; case 'D': buf = _strptime(buf, "%m/%d/%y", tm, GMTp, locale); - if (buf == 0) - return 0; + if (buf == NULL) + return (NULL); break; case 'E': @@ -147,43 +146,43 @@ label: case 'F': buf = _strptime(buf, "%Y-%m-%d", tm, GMTp, locale); - if (buf == 0) - return 0; + if (buf == NULL) + return (NULL); break; case 'R': buf = _strptime(buf, "%H:%M", tm, GMTp, locale); - if (buf == 0) - return 0; + if (buf == NULL) + return (NULL); break; case 'r': buf = _strptime(buf, tptr->ampm_fmt, tm, GMTp, locale); - if (buf == 0) - return 0; + if (buf == NULL) + return (NULL); break; case 'T': buf = _strptime(buf, "%H:%M:%S", tm, GMTp, locale); - if (buf == 0) - return 0; + if (buf == NULL) + return (NULL); break; case 'X': buf = _strptime(buf, tptr->X_fmt, tm, GMTp, locale); - if (buf == 0) - return 0; + if (buf == NULL) + return (NULL); break; case 'x': buf = _strptime(buf, tptr->x_fmt, tm, GMTp, locale); - if (buf == 0) - return 0; + if (buf == NULL) + return (NULL); break; case 'j': if (!isdigit_l((unsigned char)*buf, locale)) - return 0; + return (NULL); len = 3; for (i = 0; len && *buf != 0 && @@ -193,7 +192,7 @@ label: len--; } if (i < 1 || i > 366) - return 0; + return (NULL); tm->tm_yday = i - 1; break; @@ -205,7 +204,7 @@ label: break; if (!isdigit_l((unsigned char)*buf, locale)) - return 0; + return (NULL); len = 2; for (i = 0; len && *buf != 0 && @@ -217,11 +216,11 @@ label: if (c == 'M') { if (i > 59) - return 0; + return (NULL); tm->tm_min = i; } else { if (i > 60) - return 0; + return (NULL); tm->tm_sec = i; } @@ -245,7 +244,7 @@ label: * digits if used incorrectly. */ if (!isdigit_l((unsigned char)*buf, locale)) - return 0; + return (NULL); len = 2; for (i = 0; len && *buf != 0 && @@ -256,9 +255,9 @@ label: } if (c == 'H' || c == 'k') { if (i > 23) - return 0; + return (NULL); } else if (i > 12) - return 0; + return (NULL); tm->tm_hour = i; @@ -277,7 +276,7 @@ label: len = strlen(tptr->am); if (strncasecmp_l(buf, tptr->am, len, locale) == 0) { if (tm->tm_hour > 12) - return 0; + return (NULL); if (tm->tm_hour == 12) tm->tm_hour = 0; buf += len; @@ -287,14 +286,14 @@ label: len = strlen(tptr->pm); if (strncasecmp_l(buf, tptr->pm, len, locale) == 0) { if (tm->tm_hour > 12) - return 0; + return (NULL); if (tm->tm_hour != 12) tm->tm_hour += 12; buf += len; break; } - return 0; + return (NULL); case 'A': case 'a': @@ -309,7 +308,7 @@ label: break; } if (i == asizeof(tptr->weekday)) - return 0; + return (NULL); tm->tm_wday = i; buf += len; @@ -324,7 +323,7 @@ label: * range for now. */ if (!isdigit_l((unsigned char)*buf, locale)) - return 0; + return (NULL); len = 2; for (i = 0; len && *buf != 0 && @@ -334,7 +333,7 @@ label: len--; } if (i > 53) - return 0; + return (NULL); if (*buf != 0 && isspace_l((unsigned char)*buf, locale)) @@ -345,11 +344,11 @@ label: case 'w': if (!isdigit_l((unsigned char)*buf, locale)) - return 0; + return (NULL); i = *buf - '0'; if (i > 6) - return 0; + return (NULL); tm->tm_wday = i; @@ -371,7 +370,7 @@ label: * digits if used incorrectly. */ if (!isdigit_l((unsigned char)*buf, locale)) - return 0; + return (NULL); len = 2; for (i = 0; len && *buf != 0 && @@ -381,7 +380,7 @@ label: len--; } if (i > 31) - return 0; + return (NULL); tm->tm_mday = i; @@ -424,7 +423,7 @@ label: } } if (i == asizeof(tptr->month)) - return 0; + return (NULL); tm->tm_mon = i; buf += len; @@ -432,7 +431,7 @@ label: case 'm': if (!isdigit_l((unsigned char)*buf, locale)) - return 0; + return (NULL); len = 2; for (i = 0; len && *buf != 0 && @@ -442,7 +441,7 @@ label: len--; } if (i < 1 || i > 12) - return 0; + return (NULL); tm->tm_mon = i - 1; @@ -465,7 +464,7 @@ label: n = strtol_l(buf, &cp, 10, locale); if (errno == ERANGE || (long)(t = n) != n) { errno = sverrno; - return 0; + return (NULL); } errno = sverrno; buf = cp; @@ -481,7 +480,7 @@ label: break; if (!isdigit_l((unsigned char)*buf, locale)) - return 0; + return (NULL); len = (c == 'Y') ? 4 : 2; for (i = 0; len && *buf != 0 && @@ -495,7 +494,7 @@ label: if (c == 'y' && i < 69) i += 100; if (i < 0) - return 0; + return (NULL); tm->tm_year = i; @@ -526,7 +525,7 @@ label: } else if (0 == strcmp(zonestr, tzname[1])) { tm->tm_isdst = 1; } else { - return 0; + return (NULL); } buf += cp - buf; } @@ -541,7 +540,7 @@ label: if (*buf == '-') sign = -1; else - return 0; + return (NULL); } buf++; @@ -552,7 +551,7 @@ label: i += *buf - '0'; buf++; } else - return 0; + return (NULL); } tm->tm_hour -= sign * (i / 100); @@ -562,7 +561,7 @@ label: break; } } - return (char *)buf; + return ((char *)buf); } Modified: stable/10/lib/libc/stdtime/timelocal.c ============================================================================== --- stable/10/lib/libc/stdtime/timelocal.c Mon Jun 23 13:50:02 2014 (r267797) +++ stable/10/lib/libc/stdtime/timelocal.c Mon Jun 23 15:03:51 2014 (r267798) @@ -46,7 +46,7 @@ struct xlocale_time { struct xlocale_time __xlocale_global_time; -#define LCTIME_SIZE (sizeof(struct lc_time_T) / sizeof(char *)) +#define LCTIME_SIZE (sizeof(struct lc_time_T) / sizeof(char *)) static const struct lc_time_T _C_time_locale = { { From owner-svn-src-stable@FreeBSD.ORG Mon Jun 23 22:31:29 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 16FF03DB; Mon, 23 Jun 2014 22:31:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC1212C61; Mon, 23 Jun 2014 22:31:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5NMVS07092411; Mon, 23 Jun 2014 22:31:28 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5NMVS4d092409; Mon, 23 Jun 2014 22:31:28 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201406232231.s5NMVS4d092409@svn.freebsd.org> From: Craig Rodrigues Date: Mon, 23 Jun 2014 22:31:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267807 - in stable/10: sbin/mount_nullfs sys/x86/acpica X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 22:31:29 -0000 Author: rodrigc Date: Mon Jun 23 22:31:28 2014 New Revision: 267807 URL: http://svnweb.freebsd.org/changeset/base/267807 Log: MFC r263795: Strict value checking will cause problem. Bay trail DN2820FYKH is supported on Linux but does not work on FreeBSD. This behaviour is bug-compatible with Linux-3.13.5. References: http://d.hatena.ne.jp/syuu1228/20140326 http://lxr.linux.no/linux+v3.13.5/arch/x86/kernel/acpi/boot.c#L1094 Submitted by: syuu PR: 187966 Modified: stable/10/sbin/mount_nullfs/mount_nullfs.c stable/10/sys/x86/acpica/madt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mount_nullfs/mount_nullfs.c ============================================================================== --- stable/10/sbin/mount_nullfs/mount_nullfs.c Mon Jun 23 19:47:25 2014 (r267806) +++ stable/10/sbin/mount_nullfs/mount_nullfs.c Mon Jun 23 22:31:28 2014 (r267807) @@ -103,18 +103,25 @@ main(int argc, char *argv[]) err(EX_USAGE, "%s", source); if (subdir(target, source) || subdir(source, target)) - errx(EX_USAGE, "%s (%s) and %s are not distinct paths", + errx(EX_USAGE, "%s (%s) and %s are not lldistinct paths", argv[0], target, argv[1]); + printf("Debug: 1\n"); build_iovec(&iov, &iovlen, "fstype", nullfs, (size_t)-1); build_iovec(&iov, &iovlen, "fspath", source, (size_t)-1); build_iovec(&iov, &iovlen, "target", target, (size_t)-1); build_iovec(&iov, &iovlen, "errmsg", errmsg, sizeof(errmsg)); + printf("Debug: 2, source: %zd target: %zdd\n", strlen(source), strlen(target)); if (nmount(iov, iovlen, 0) < 0) { - if (errmsg[0] != 0) + printf("Debug: 3\n"); + if (errmsg[0] != 0) { + printf("Debug 4\n"); err(1, "%s: %s", source, errmsg); - else + } + else { + printf("Debug 5\n"); err(1, "%s", source); + } } exit(0); } Modified: stable/10/sys/x86/acpica/madt.c ============================================================================== --- stable/10/sys/x86/acpica/madt.c Mon Jun 23 19:47:25 2014 (r267806) +++ stable/10/sys/x86/acpica/madt.c Mon Jun 23 22:31:28 2014 (r267807) @@ -306,10 +306,11 @@ interrupt_polarity(UINT16 IntiFlags, UIN case ACPI_MADT_POLARITY_ACTIVE_HIGH: return (INTR_POLARITY_HIGH); case ACPI_MADT_POLARITY_ACTIVE_LOW: - return (INTR_POLARITY_LOW); + break; default: - panic("Bogus Interrupt Polarity"); + printf("WARNING: Bogus Interrupt Polarity. Assume POLALITY LOW"); } + return (INTR_POLARITY_LOW); } static enum intr_trigger @@ -325,10 +326,13 @@ interrupt_trigger(UINT16 IntiFlags, UINT case ACPI_MADT_TRIGGER_EDGE: return (INTR_TRIGGER_EDGE); case ACPI_MADT_TRIGGER_LEVEL: - return (INTR_TRIGGER_LEVEL); + break; default: - panic("Bogus Interrupt Trigger Mode"); + printf("WARNING: Bogus Interrupt Trigger Mode. Assume Level trigger."); + + break; } + return (INTR_TRIGGER_LEVEL); } /* From owner-svn-src-stable@FreeBSD.ORG Mon Jun 23 22:33:21 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E889D5C9; Mon, 23 Jun 2014 22:33:20 +0000 (UTC) Received: from mail-we0-x232.google.com (mail-we0-x232.google.com [IPv6:2a00:1450:400c:c03::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E12002CAB; Mon, 23 Jun 2014 22:33:19 +0000 (UTC) Received: by mail-we0-f178.google.com with SMTP id x48so7941685wes.9 for ; Mon, 23 Jun 2014 15:33:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=6O+vWC4+Kqo6DGXES1u7qAoqkYSBXF6wVs50GN76oEo=; b=aiL8PC5xUz0M7/P3Pz/3HXF559mAFY+nia2ry96slYeHHfblstYvKaJYt5gbqNKf6e cHXjQ0KiXyhkB63gWQUdf/GZhhbK0BC7kRymUsGtBIVlEM0MtoFkBOIN08yzLjDoaBvF VFr1O+vq+BUu6qqNzy8FDDd56zfyEmc67tZmDpJXBgZzYsNB6CEAW5TSM+N6nW1RehlB aTY6lkSyqIQnEKv21fKvdCnF2+eqmhfPLobIAFq9buuevzVmtcbzAYzwUaQaFdOlOc9Q +kmfrG8Coi4KQA+kbYEFg2P+7LRuX5hwhPc2r9XcWt2k96eNSAd51wMuZALmYjtzt1fT xG+Q== X-Received: by 10.194.238.134 with SMTP id vk6mr31435307wjc.93.1403562797997; Mon, 23 Jun 2014 15:33:17 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id jv9sm39142241wjc.28.2014.06.23.15.33.16 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 23 Jun 2014 15:33:17 -0700 (PDT) Date: Tue, 24 Jun 2014 00:33:14 +0200 From: Mateusz Guzik To: Craig Rodrigues Subject: Re: svn commit: r267807 - in stable/10: sbin/mount_nullfs sys/x86/acpica Message-ID: <20140623223314.GA15832@dft-labs.eu> References: <201406232231.s5NMVS4d092409@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201406232231.s5NMVS4d092409@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 22:33:21 -0000 On Mon, Jun 23, 2014 at 10:31:28PM +0000, Craig Rodrigues wrote: > Author: rodrigc > Date: Mon Jun 23 22:31:28 2014 > New Revision: 267807 > URL: http://svnweb.freebsd.org/changeset/base/267807 > > Log: > MFC r263795: > > Strict value checking will cause problem. > Bay trail DN2820FYKH is supported on Linux but does not work on FreeBSD. > This behaviour is bug-compatible with Linux-3.13.5. > > References: > http://d.hatena.ne.jp/syuu1228/20140326 > http://lxr.linux.no/linux+v3.13.5/arch/x86/kernel/acpi/boot.c#L1094 > > Submitted by: syuu > PR: 187966 > > Modified: > stable/10/sbin/mount_nullfs/mount_nullfs.c > stable/10/sys/x86/acpica/madt.c > Directory Properties: > stable/10/ (props changed) > > Modified: stable/10/sbin/mount_nullfs/mount_nullfs.c > ============================================================================== > --- stable/10/sbin/mount_nullfs/mount_nullfs.c Mon Jun 23 19:47:25 2014 (r267806) > +++ stable/10/sbin/mount_nullfs/mount_nullfs.c Mon Jun 23 22:31:28 2014 (r267807) > @@ -103,18 +103,25 @@ main(int argc, char *argv[]) > err(EX_USAGE, "%s", source); > > if (subdir(target, source) || subdir(source, target)) > - errx(EX_USAGE, "%s (%s) and %s are not distinct paths", > + errx(EX_USAGE, "%s (%s) and %s are not lldistinct paths", > argv[0], target, argv[1]); > > + printf("Debug: 1\n"); > build_iovec(&iov, &iovlen, "fstype", nullfs, (size_t)-1); > build_iovec(&iov, &iovlen, "fspath", source, (size_t)-1); > build_iovec(&iov, &iovlen, "target", target, (size_t)-1); > build_iovec(&iov, &iovlen, "errmsg", errmsg, sizeof(errmsg)); > + printf("Debug: 2, source: %zd target: %zdd\n", strlen(source), strlen(target)); > if (nmount(iov, iovlen, 0) < 0) { > - if (errmsg[0] != 0) > + printf("Debug: 3\n"); > + if (errmsg[0] != 0) { > + printf("Debug 4\n"); > err(1, "%s: %s", source, errmsg); > - else > + } > + else { > + printf("Debug 5\n"); > err(1, "%s", source); > + } > } > exit(0); > } > Does not look intended. :> -- Mateusz Guzik From owner-svn-src-stable@FreeBSD.ORG Mon Jun 23 22:35:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF15A772; Mon, 23 Jun 2014 22:35:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8137D2CC6; Mon, 23 Jun 2014 22:35:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5NMZgqi095468; Mon, 23 Jun 2014 22:35:42 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5NMZgjP095465; Mon, 23 Jun 2014 22:35:42 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201406232235.s5NMZgjP095465@svn.freebsd.org> From: Craig Rodrigues Date: Mon, 23 Jun 2014 22:35:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267808 - in stable/10: sbin/mount_nullfs sys/x86/acpica X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 22:35:42 -0000 Author: rodrigc Date: Mon Jun 23 22:35:41 2014 New Revision: 267808 URL: http://svnweb.freebsd.org/changeset/base/267808 Log: Undo bad merge. Modified: stable/10/sbin/mount_nullfs/mount_nullfs.c stable/10/sys/x86/acpica/madt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mount_nullfs/mount_nullfs.c ============================================================================== --- stable/10/sbin/mount_nullfs/mount_nullfs.c Mon Jun 23 22:31:28 2014 (r267807) +++ stable/10/sbin/mount_nullfs/mount_nullfs.c Mon Jun 23 22:35:41 2014 (r267808) @@ -103,25 +103,18 @@ main(int argc, char *argv[]) err(EX_USAGE, "%s", source); if (subdir(target, source) || subdir(source, target)) - errx(EX_USAGE, "%s (%s) and %s are not lldistinct paths", + errx(EX_USAGE, "%s (%s) and %s are not distinct paths", argv[0], target, argv[1]); - printf("Debug: 1\n"); build_iovec(&iov, &iovlen, "fstype", nullfs, (size_t)-1); build_iovec(&iov, &iovlen, "fspath", source, (size_t)-1); build_iovec(&iov, &iovlen, "target", target, (size_t)-1); build_iovec(&iov, &iovlen, "errmsg", errmsg, sizeof(errmsg)); - printf("Debug: 2, source: %zd target: %zdd\n", strlen(source), strlen(target)); if (nmount(iov, iovlen, 0) < 0) { - printf("Debug: 3\n"); - if (errmsg[0] != 0) { - printf("Debug 4\n"); + if (errmsg[0] != 0) err(1, "%s: %s", source, errmsg); - } - else { - printf("Debug 5\n"); + else err(1, "%s", source); - } } exit(0); } Modified: stable/10/sys/x86/acpica/madt.c ============================================================================== --- stable/10/sys/x86/acpica/madt.c Mon Jun 23 22:31:28 2014 (r267807) +++ stable/10/sys/x86/acpica/madt.c Mon Jun 23 22:35:41 2014 (r267808) @@ -306,11 +306,10 @@ interrupt_polarity(UINT16 IntiFlags, UIN case ACPI_MADT_POLARITY_ACTIVE_HIGH: return (INTR_POLARITY_HIGH); case ACPI_MADT_POLARITY_ACTIVE_LOW: - break; + return (INTR_POLARITY_LOW); default: - printf("WARNING: Bogus Interrupt Polarity. Assume POLALITY LOW"); + panic("Bogus Interrupt Polarity"); } - return (INTR_POLARITY_LOW); } static enum intr_trigger @@ -326,13 +325,10 @@ interrupt_trigger(UINT16 IntiFlags, UINT case ACPI_MADT_TRIGGER_EDGE: return (INTR_TRIGGER_EDGE); case ACPI_MADT_TRIGGER_LEVEL: - break; + return (INTR_TRIGGER_LEVEL); default: - printf("WARNING: Bogus Interrupt Trigger Mode. Assume Level trigger."); - - break; + panic("Bogus Interrupt Trigger Mode"); } - return (INTR_TRIGGER_LEVEL); } /* From owner-svn-src-stable@FreeBSD.ORG Mon Jun 23 22:37:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B185C8DB; Mon, 23 Jun 2014 22:37:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E22B2CF1; Mon, 23 Jun 2014 22:37:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5NMbnS3095848; Mon, 23 Jun 2014 22:37:49 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5NMbnOr095847; Mon, 23 Jun 2014 22:37:49 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201406232237.s5NMbnOr095847@svn.freebsd.org> From: Craig Rodrigues Date: Mon, 23 Jun 2014 22:37:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267809 - stable/10/sys/x86/acpica X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 22:37:49 -0000 Author: rodrigc Date: Mon Jun 23 22:37:49 2014 New Revision: 267809 URL: http://svnweb.freebsd.org/changeset/base/267809 Log: MFC r263795: Strict value checking will cause problem. Bay trail DN2820FYKH is supported on Linux but does not work on FreeBSD. This behaviour is bug-compatible with Linux-3.13.5. References: http://d.hatena.ne.jp/syuu1228/20140326 http://lxr.linux.no/linux+v3.13.5/arch/x86/kernel/acpi/boot.c#L1094 Submitted by: syuu PR: 187966 Modified: stable/10/sys/x86/acpica/madt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/acpica/madt.c ============================================================================== --- stable/10/sys/x86/acpica/madt.c Mon Jun 23 22:35:41 2014 (r267808) +++ stable/10/sys/x86/acpica/madt.c Mon Jun 23 22:37:49 2014 (r267809) @@ -306,10 +306,11 @@ interrupt_polarity(UINT16 IntiFlags, UIN case ACPI_MADT_POLARITY_ACTIVE_HIGH: return (INTR_POLARITY_HIGH); case ACPI_MADT_POLARITY_ACTIVE_LOW: - return (INTR_POLARITY_LOW); + break; default: - panic("Bogus Interrupt Polarity"); + printf("WARNING: Bogus Interrupt Polarity. Assume POLALITY LOW"); } + return (INTR_POLARITY_LOW); } static enum intr_trigger @@ -325,10 +326,13 @@ interrupt_trigger(UINT16 IntiFlags, UINT case ACPI_MADT_TRIGGER_EDGE: return (INTR_TRIGGER_EDGE); case ACPI_MADT_TRIGGER_LEVEL: - return (INTR_TRIGGER_LEVEL); + break; default: - panic("Bogus Interrupt Trigger Mode"); + printf("WARNING: Bogus Interrupt Trigger Mode. Assume Level trigger."); + + break; } + return (INTR_TRIGGER_LEVEL); } /* From owner-svn-src-stable@FreeBSD.ORG Tue Jun 24 06:12:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 345886B2; Tue, 24 Jun 2014 06:12:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15EE1227F; Tue, 24 Jun 2014 06:12:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5O6CBBX013844; Tue, 24 Jun 2014 06:12:11 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5O6CBiN013838; Tue, 24 Jun 2014 06:12:11 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201406240612.s5O6CBiN013838@svn.freebsd.org> From: Dimitry Andric Date: Tue, 24 Jun 2014 06:12:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267813 - in stable: 10/contrib/llvm/lib/CodeGen/SelectionDAG 10/contrib/llvm/patches 9/contrib/llvm/lib/CodeGen/SelectionDAG 9/contrib/llvm/patches X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2014 06:12:12 -0000 Author: dim Date: Tue Jun 24 06:12:11 2014 New Revision: 267813 URL: http://svnweb.freebsd.org/changeset/base/267813 Log: MFC r267704: Pull in r211435 from upstream llvm trunk (by Benjamin Kramer): Legalizer: Add support for splitting insert_subvectors. We handle this by spilling the whole thing to the stack and doing the insertion as a store. PR19492. This happens in real code because the vectorizer creates v2i128 when AVX is enabled. This fixes a "fatal error: error in backend: Do not know how to split the result of this operator!" message encountered during compilation of the net-p2p/libtorrent-rasterbar port. Reported by: Evgeniy MFC r267705: Add the llvm patch for r267704. Added: stable/9/contrib/llvm/patches/patch-r267704-llvm-r211435-fix-avx-backend.diff - copied unchanged from r267705, head/contrib/llvm/patches/patch-r267704-llvm-r211435-fix-avx-backend.diff Modified: stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) Changes in other areas also in this revision: Added: stable/10/contrib/llvm/patches/patch-r267704-llvm-r211435-fix-avx-backend.diff - copied unchanged from r267705, head/contrib/llvm/patches/patch-r267704-llvm-r211435-fix-avx-backend.diff Modified: stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h ============================================================================== --- stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h Tue Jun 24 04:37:36 2014 (r267812) +++ stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h Tue Jun 24 06:12:11 2014 (r267813) @@ -569,6 +569,7 @@ private: void SplitVecRes_BUILD_VECTOR(SDNode *N, SDValue &Lo, SDValue &Hi); void SplitVecRes_CONCAT_VECTORS(SDNode *N, SDValue &Lo, SDValue &Hi); void SplitVecRes_EXTRACT_SUBVECTOR(SDNode *N, SDValue &Lo, SDValue &Hi); + void SplitVecRes_INSERT_SUBVECTOR(SDNode *N, SDValue &Lo, SDValue &Hi); void SplitVecRes_FPOWI(SDNode *N, SDValue &Lo, SDValue &Hi); void SplitVecRes_INSERT_VECTOR_ELT(SDNode *N, SDValue &Lo, SDValue &Hi); void SplitVecRes_LOAD(LoadSDNode *N, SDValue &Lo, SDValue &Hi); Modified: stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp ============================================================================== --- stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Tue Jun 24 04:37:36 2014 (r267812) +++ stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Tue Jun 24 06:12:11 2014 (r267813) @@ -506,6 +506,7 @@ void DAGTypeLegalizer::SplitVectorResult case ISD::BUILD_VECTOR: SplitVecRes_BUILD_VECTOR(N, Lo, Hi); break; case ISD::CONCAT_VECTORS: SplitVecRes_CONCAT_VECTORS(N, Lo, Hi); break; case ISD::EXTRACT_SUBVECTOR: SplitVecRes_EXTRACT_SUBVECTOR(N, Lo, Hi); break; + case ISD::INSERT_SUBVECTOR: SplitVecRes_INSERT_SUBVECTOR(N, Lo, Hi); break; case ISD::FP_ROUND_INREG: SplitVecRes_InregOp(N, Lo, Hi); break; case ISD::FPOWI: SplitVecRes_FPOWI(N, Lo, Hi); break; case ISD::INSERT_VECTOR_ELT: SplitVecRes_INSERT_VECTOR_ELT(N, Lo, Hi); break; @@ -725,6 +726,43 @@ void DAGTypeLegalizer::SplitVecRes_EXTRA TLI.getVectorIdxTy())); } +void DAGTypeLegalizer::SplitVecRes_INSERT_SUBVECTOR(SDNode *N, SDValue &Lo, + SDValue &Hi) { + SDValue Vec = N->getOperand(0); + SDValue SubVec = N->getOperand(1); + SDValue Idx = N->getOperand(2); + SDLoc dl(N); + GetSplitVector(Vec, Lo, Hi); + + // Spill the vector to the stack. + EVT VecVT = Vec.getValueType(); + EVT SubVecVT = VecVT.getVectorElementType(); + SDValue StackPtr = DAG.CreateStackTemporary(VecVT); + SDValue Store = DAG.getStore(DAG.getEntryNode(), dl, Vec, StackPtr, + MachinePointerInfo(), false, false, 0); + + // Store the new subvector into the specified index. + SDValue SubVecPtr = GetVectorElementPointer(StackPtr, SubVecVT, Idx); + Type *VecType = VecVT.getTypeForEVT(*DAG.getContext()); + unsigned Alignment = TLI.getDataLayout()->getPrefTypeAlignment(VecType); + Store = DAG.getStore(Store, dl, SubVec, SubVecPtr, MachinePointerInfo(), + false, false, 0); + + // Load the Lo part from the stack slot. + Lo = DAG.getLoad(Lo.getValueType(), dl, Store, StackPtr, MachinePointerInfo(), + false, false, false, 0); + + // Increment the pointer to the other part. + unsigned IncrementSize = Lo.getValueType().getSizeInBits() / 8; + StackPtr = + DAG.getNode(ISD::ADD, dl, StackPtr.getValueType(), StackPtr, + DAG.getConstant(IncrementSize, StackPtr.getValueType())); + + // Load the Hi part from the stack slot. + Hi = DAG.getLoad(Hi.getValueType(), dl, Store, StackPtr, MachinePointerInfo(), + false, false, false, MinAlign(Alignment, IncrementSize)); +} + void DAGTypeLegalizer::SplitVecRes_FPOWI(SDNode *N, SDValue &Lo, SDValue &Hi) { SDLoc dl(N); Copied: stable/9/contrib/llvm/patches/patch-r267704-llvm-r211435-fix-avx-backend.diff (from r267705, head/contrib/llvm/patches/patch-r267704-llvm-r211435-fix-avx-backend.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/llvm/patches/patch-r267704-llvm-r211435-fix-avx-backend.diff Tue Jun 24 06:12:11 2014 (r267813, copy of r267705, head/contrib/llvm/patches/patch-r267704-llvm-r211435-fix-avx-backend.diff) @@ -0,0 +1,125 @@ +Pull in r211435 from upstream llvm trunk (by Benjamin Kramer): + + Legalizer: Add support for splitting insert_subvectors. + + We handle this by spilling the whole thing to the stack and doing the + insertion as a store. + + PR19492. This happens in real code because the vectorizer creates + v2i128 when AVX is enabled. + +This fixes a "fatal error: error in backend: Do not know how to split +the result of this operator!" message encountered during compilation of +the net-p2p/libtorrent-rasterbar port. + +Introduced here: http://svnweb.freebsd.org/changeset/base/267704 + +Index: lib/CodeGen/SelectionDAG/LegalizeTypes.h +=================================================================== +--- lib/CodeGen/SelectionDAG/LegalizeTypes.h ++++ lib/CodeGen/SelectionDAG/LegalizeTypes.h +@@ -569,6 +569,7 @@ class LLVM_LIBRARY_VISIBILITY DAGTypeLegalizer { + void SplitVecRes_BUILD_VECTOR(SDNode *N, SDValue &Lo, SDValue &Hi); + void SplitVecRes_CONCAT_VECTORS(SDNode *N, SDValue &Lo, SDValue &Hi); + void SplitVecRes_EXTRACT_SUBVECTOR(SDNode *N, SDValue &Lo, SDValue &Hi); ++ void SplitVecRes_INSERT_SUBVECTOR(SDNode *N, SDValue &Lo, SDValue &Hi); + void SplitVecRes_FPOWI(SDNode *N, SDValue &Lo, SDValue &Hi); + void SplitVecRes_INSERT_VECTOR_ELT(SDNode *N, SDValue &Lo, SDValue &Hi); + void SplitVecRes_LOAD(LoadSDNode *N, SDValue &Lo, SDValue &Hi); +Index: lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp +=================================================================== +--- lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp ++++ lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp +@@ -506,6 +506,7 @@ void DAGTypeLegalizer::SplitVectorResult(SDNode *N + case ISD::BUILD_VECTOR: SplitVecRes_BUILD_VECTOR(N, Lo, Hi); break; + case ISD::CONCAT_VECTORS: SplitVecRes_CONCAT_VECTORS(N, Lo, Hi); break; + case ISD::EXTRACT_SUBVECTOR: SplitVecRes_EXTRACT_SUBVECTOR(N, Lo, Hi); break; ++ case ISD::INSERT_SUBVECTOR: SplitVecRes_INSERT_SUBVECTOR(N, Lo, Hi); break; + case ISD::FP_ROUND_INREG: SplitVecRes_InregOp(N, Lo, Hi); break; + case ISD::FPOWI: SplitVecRes_FPOWI(N, Lo, Hi); break; + case ISD::INSERT_VECTOR_ELT: SplitVecRes_INSERT_VECTOR_ELT(N, Lo, Hi); break; +@@ -725,6 +726,43 @@ void DAGTypeLegalizer::SplitVecRes_EXTRACT_SUBVECT + TLI.getVectorIdxTy())); + } + ++void DAGTypeLegalizer::SplitVecRes_INSERT_SUBVECTOR(SDNode *N, SDValue &Lo, ++ SDValue &Hi) { ++ SDValue Vec = N->getOperand(0); ++ SDValue SubVec = N->getOperand(1); ++ SDValue Idx = N->getOperand(2); ++ SDLoc dl(N); ++ GetSplitVector(Vec, Lo, Hi); ++ ++ // Spill the vector to the stack. ++ EVT VecVT = Vec.getValueType(); ++ EVT SubVecVT = VecVT.getVectorElementType(); ++ SDValue StackPtr = DAG.CreateStackTemporary(VecVT); ++ SDValue Store = DAG.getStore(DAG.getEntryNode(), dl, Vec, StackPtr, ++ MachinePointerInfo(), false, false, 0); ++ ++ // Store the new subvector into the specified index. ++ SDValue SubVecPtr = GetVectorElementPointer(StackPtr, SubVecVT, Idx); ++ Type *VecType = VecVT.getTypeForEVT(*DAG.getContext()); ++ unsigned Alignment = TLI.getDataLayout()->getPrefTypeAlignment(VecType); ++ Store = DAG.getStore(Store, dl, SubVec, SubVecPtr, MachinePointerInfo(), ++ false, false, 0); ++ ++ // Load the Lo part from the stack slot. ++ Lo = DAG.getLoad(Lo.getValueType(), dl, Store, StackPtr, MachinePointerInfo(), ++ false, false, false, 0); ++ ++ // Increment the pointer to the other part. ++ unsigned IncrementSize = Lo.getValueType().getSizeInBits() / 8; ++ StackPtr = ++ DAG.getNode(ISD::ADD, dl, StackPtr.getValueType(), StackPtr, ++ DAG.getConstant(IncrementSize, StackPtr.getValueType())); ++ ++ // Load the Hi part from the stack slot. ++ Hi = DAG.getLoad(Hi.getValueType(), dl, Store, StackPtr, MachinePointerInfo(), ++ false, false, false, MinAlign(Alignment, IncrementSize)); ++} ++ + void DAGTypeLegalizer::SplitVecRes_FPOWI(SDNode *N, SDValue &Lo, + SDValue &Hi) { + SDLoc dl(N); +Index: test/CodeGen/X86/vec_split.ll +=================================================================== +--- test/CodeGen/X86/vec_split.ll ++++ test/CodeGen/X86/vec_split.ll +@@ -40,3 +40,36 @@ define <32 x i16> @split32(<32 x i16> %a, <32 x i1 + %2 = select <32 x i1> %1, <32 x i16> %a, <32 x i16> %b + ret <32 x i16> %2 + } ++ ++; PR19492 ++define i128 @split128(<2 x i128> %a, <2 x i128> %b) { ++; SSE4-LABEL: split128: ++; SSE4: addq ++; SSE4: adcq ++; SSE4: addq ++; SSE4: adcq ++; SSE4: addq ++; SSE4: adcq ++; SSE4: ret ++; AVX1-LABEL: split128: ++; AVX1: addq ++; AVX1: adcq ++; AVX1: addq ++; AVX1: adcq ++; AVX1: addq ++; AVX1: adcq ++; AVX1: ret ++; AVX2-LABEL: split128: ++; AVX2: addq ++; AVX2: adcq ++; AVX2: addq ++; AVX2: adcq ++; AVX2: addq ++; AVX2: adcq ++; AVX2: ret ++ %add = add nsw <2 x i128> %a, %b ++ %rdx.shuf = shufflevector <2 x i128> %add, <2 x i128> undef, <2 x i32> ++ %bin.rdx = add <2 x i128> %add, %rdx.shuf ++ %e = extractelement <2 x i128> %bin.rdx, i32 1 ++ ret i128 %e ++} From owner-svn-src-stable@FreeBSD.ORG Tue Jun 24 06:12:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E921C6B3; Tue, 24 Jun 2014 06:12:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CAE162280; Tue, 24 Jun 2014 06:12:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5O6CChn013854; Tue, 24 Jun 2014 06:12:12 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5O6CCsb013851; Tue, 24 Jun 2014 06:12:12 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201406240612.s5O6CCsb013851@svn.freebsd.org> From: Dimitry Andric Date: Tue, 24 Jun 2014 06:12:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267813 - in stable: 10/contrib/llvm/lib/CodeGen/SelectionDAG 10/contrib/llvm/patches 9/contrib/llvm/lib/CodeGen/SelectionDAG 9/contrib/llvm/patches X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2014 06:12:13 -0000 Author: dim Date: Tue Jun 24 06:12:11 2014 New Revision: 267813 URL: http://svnweb.freebsd.org/changeset/base/267813 Log: MFC r267704: Pull in r211435 from upstream llvm trunk (by Benjamin Kramer): Legalizer: Add support for splitting insert_subvectors. We handle this by spilling the whole thing to the stack and doing the insertion as a store. PR19492. This happens in real code because the vectorizer creates v2i128 when AVX is enabled. This fixes a "fatal error: error in backend: Do not know how to split the result of this operator!" message encountered during compilation of the net-p2p/libtorrent-rasterbar port. Reported by: Evgeniy MFC r267705: Add the llvm patch for r267704. Added: stable/10/contrib/llvm/patches/patch-r267704-llvm-r211435-fix-avx-backend.diff - copied unchanged from r267705, head/contrib/llvm/patches/patch-r267704-llvm-r211435-fix-avx-backend.diff Modified: stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Added: stable/9/contrib/llvm/patches/patch-r267704-llvm-r211435-fix-avx-backend.diff - copied unchanged from r267705, head/contrib/llvm/patches/patch-r267704-llvm-r211435-fix-avx-backend.diff Modified: stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) Modified: stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h ============================================================================== --- stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h Tue Jun 24 04:37:36 2014 (r267812) +++ stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h Tue Jun 24 06:12:11 2014 (r267813) @@ -569,6 +569,7 @@ private: void SplitVecRes_BUILD_VECTOR(SDNode *N, SDValue &Lo, SDValue &Hi); void SplitVecRes_CONCAT_VECTORS(SDNode *N, SDValue &Lo, SDValue &Hi); void SplitVecRes_EXTRACT_SUBVECTOR(SDNode *N, SDValue &Lo, SDValue &Hi); + void SplitVecRes_INSERT_SUBVECTOR(SDNode *N, SDValue &Lo, SDValue &Hi); void SplitVecRes_FPOWI(SDNode *N, SDValue &Lo, SDValue &Hi); void SplitVecRes_INSERT_VECTOR_ELT(SDNode *N, SDValue &Lo, SDValue &Hi); void SplitVecRes_LOAD(LoadSDNode *N, SDValue &Lo, SDValue &Hi); Modified: stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp ============================================================================== --- stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Tue Jun 24 04:37:36 2014 (r267812) +++ stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Tue Jun 24 06:12:11 2014 (r267813) @@ -506,6 +506,7 @@ void DAGTypeLegalizer::SplitVectorResult case ISD::BUILD_VECTOR: SplitVecRes_BUILD_VECTOR(N, Lo, Hi); break; case ISD::CONCAT_VECTORS: SplitVecRes_CONCAT_VECTORS(N, Lo, Hi); break; case ISD::EXTRACT_SUBVECTOR: SplitVecRes_EXTRACT_SUBVECTOR(N, Lo, Hi); break; + case ISD::INSERT_SUBVECTOR: SplitVecRes_INSERT_SUBVECTOR(N, Lo, Hi); break; case ISD::FP_ROUND_INREG: SplitVecRes_InregOp(N, Lo, Hi); break; case ISD::FPOWI: SplitVecRes_FPOWI(N, Lo, Hi); break; case ISD::INSERT_VECTOR_ELT: SplitVecRes_INSERT_VECTOR_ELT(N, Lo, Hi); break; @@ -725,6 +726,43 @@ void DAGTypeLegalizer::SplitVecRes_EXTRA TLI.getVectorIdxTy())); } +void DAGTypeLegalizer::SplitVecRes_INSERT_SUBVECTOR(SDNode *N, SDValue &Lo, + SDValue &Hi) { + SDValue Vec = N->getOperand(0); + SDValue SubVec = N->getOperand(1); + SDValue Idx = N->getOperand(2); + SDLoc dl(N); + GetSplitVector(Vec, Lo, Hi); + + // Spill the vector to the stack. + EVT VecVT = Vec.getValueType(); + EVT SubVecVT = VecVT.getVectorElementType(); + SDValue StackPtr = DAG.CreateStackTemporary(VecVT); + SDValue Store = DAG.getStore(DAG.getEntryNode(), dl, Vec, StackPtr, + MachinePointerInfo(), false, false, 0); + + // Store the new subvector into the specified index. + SDValue SubVecPtr = GetVectorElementPointer(StackPtr, SubVecVT, Idx); + Type *VecType = VecVT.getTypeForEVT(*DAG.getContext()); + unsigned Alignment = TLI.getDataLayout()->getPrefTypeAlignment(VecType); + Store = DAG.getStore(Store, dl, SubVec, SubVecPtr, MachinePointerInfo(), + false, false, 0); + + // Load the Lo part from the stack slot. + Lo = DAG.getLoad(Lo.getValueType(), dl, Store, StackPtr, MachinePointerInfo(), + false, false, false, 0); + + // Increment the pointer to the other part. + unsigned IncrementSize = Lo.getValueType().getSizeInBits() / 8; + StackPtr = + DAG.getNode(ISD::ADD, dl, StackPtr.getValueType(), StackPtr, + DAG.getConstant(IncrementSize, StackPtr.getValueType())); + + // Load the Hi part from the stack slot. + Hi = DAG.getLoad(Hi.getValueType(), dl, Store, StackPtr, MachinePointerInfo(), + false, false, false, MinAlign(Alignment, IncrementSize)); +} + void DAGTypeLegalizer::SplitVecRes_FPOWI(SDNode *N, SDValue &Lo, SDValue &Hi) { SDLoc dl(N); Copied: stable/10/contrib/llvm/patches/patch-r267704-llvm-r211435-fix-avx-backend.diff (from r267705, head/contrib/llvm/patches/patch-r267704-llvm-r211435-fix-avx-backend.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/llvm/patches/patch-r267704-llvm-r211435-fix-avx-backend.diff Tue Jun 24 06:12:11 2014 (r267813, copy of r267705, head/contrib/llvm/patches/patch-r267704-llvm-r211435-fix-avx-backend.diff) @@ -0,0 +1,125 @@ +Pull in r211435 from upstream llvm trunk (by Benjamin Kramer): + + Legalizer: Add support for splitting insert_subvectors. + + We handle this by spilling the whole thing to the stack and doing the + insertion as a store. + + PR19492. This happens in real code because the vectorizer creates + v2i128 when AVX is enabled. + +This fixes a "fatal error: error in backend: Do not know how to split +the result of this operator!" message encountered during compilation of +the net-p2p/libtorrent-rasterbar port. + +Introduced here: http://svnweb.freebsd.org/changeset/base/267704 + +Index: lib/CodeGen/SelectionDAG/LegalizeTypes.h +=================================================================== +--- lib/CodeGen/SelectionDAG/LegalizeTypes.h ++++ lib/CodeGen/SelectionDAG/LegalizeTypes.h +@@ -569,6 +569,7 @@ class LLVM_LIBRARY_VISIBILITY DAGTypeLegalizer { + void SplitVecRes_BUILD_VECTOR(SDNode *N, SDValue &Lo, SDValue &Hi); + void SplitVecRes_CONCAT_VECTORS(SDNode *N, SDValue &Lo, SDValue &Hi); + void SplitVecRes_EXTRACT_SUBVECTOR(SDNode *N, SDValue &Lo, SDValue &Hi); ++ void SplitVecRes_INSERT_SUBVECTOR(SDNode *N, SDValue &Lo, SDValue &Hi); + void SplitVecRes_FPOWI(SDNode *N, SDValue &Lo, SDValue &Hi); + void SplitVecRes_INSERT_VECTOR_ELT(SDNode *N, SDValue &Lo, SDValue &Hi); + void SplitVecRes_LOAD(LoadSDNode *N, SDValue &Lo, SDValue &Hi); +Index: lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp +=================================================================== +--- lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp ++++ lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp +@@ -506,6 +506,7 @@ void DAGTypeLegalizer::SplitVectorResult(SDNode *N + case ISD::BUILD_VECTOR: SplitVecRes_BUILD_VECTOR(N, Lo, Hi); break; + case ISD::CONCAT_VECTORS: SplitVecRes_CONCAT_VECTORS(N, Lo, Hi); break; + case ISD::EXTRACT_SUBVECTOR: SplitVecRes_EXTRACT_SUBVECTOR(N, Lo, Hi); break; ++ case ISD::INSERT_SUBVECTOR: SplitVecRes_INSERT_SUBVECTOR(N, Lo, Hi); break; + case ISD::FP_ROUND_INREG: SplitVecRes_InregOp(N, Lo, Hi); break; + case ISD::FPOWI: SplitVecRes_FPOWI(N, Lo, Hi); break; + case ISD::INSERT_VECTOR_ELT: SplitVecRes_INSERT_VECTOR_ELT(N, Lo, Hi); break; +@@ -725,6 +726,43 @@ void DAGTypeLegalizer::SplitVecRes_EXTRACT_SUBVECT + TLI.getVectorIdxTy())); + } + ++void DAGTypeLegalizer::SplitVecRes_INSERT_SUBVECTOR(SDNode *N, SDValue &Lo, ++ SDValue &Hi) { ++ SDValue Vec = N->getOperand(0); ++ SDValue SubVec = N->getOperand(1); ++ SDValue Idx = N->getOperand(2); ++ SDLoc dl(N); ++ GetSplitVector(Vec, Lo, Hi); ++ ++ // Spill the vector to the stack. ++ EVT VecVT = Vec.getValueType(); ++ EVT SubVecVT = VecVT.getVectorElementType(); ++ SDValue StackPtr = DAG.CreateStackTemporary(VecVT); ++ SDValue Store = DAG.getStore(DAG.getEntryNode(), dl, Vec, StackPtr, ++ MachinePointerInfo(), false, false, 0); ++ ++ // Store the new subvector into the specified index. ++ SDValue SubVecPtr = GetVectorElementPointer(StackPtr, SubVecVT, Idx); ++ Type *VecType = VecVT.getTypeForEVT(*DAG.getContext()); ++ unsigned Alignment = TLI.getDataLayout()->getPrefTypeAlignment(VecType); ++ Store = DAG.getStore(Store, dl, SubVec, SubVecPtr, MachinePointerInfo(), ++ false, false, 0); ++ ++ // Load the Lo part from the stack slot. ++ Lo = DAG.getLoad(Lo.getValueType(), dl, Store, StackPtr, MachinePointerInfo(), ++ false, false, false, 0); ++ ++ // Increment the pointer to the other part. ++ unsigned IncrementSize = Lo.getValueType().getSizeInBits() / 8; ++ StackPtr = ++ DAG.getNode(ISD::ADD, dl, StackPtr.getValueType(), StackPtr, ++ DAG.getConstant(IncrementSize, StackPtr.getValueType())); ++ ++ // Load the Hi part from the stack slot. ++ Hi = DAG.getLoad(Hi.getValueType(), dl, Store, StackPtr, MachinePointerInfo(), ++ false, false, false, MinAlign(Alignment, IncrementSize)); ++} ++ + void DAGTypeLegalizer::SplitVecRes_FPOWI(SDNode *N, SDValue &Lo, + SDValue &Hi) { + SDLoc dl(N); +Index: test/CodeGen/X86/vec_split.ll +=================================================================== +--- test/CodeGen/X86/vec_split.ll ++++ test/CodeGen/X86/vec_split.ll +@@ -40,3 +40,36 @@ define <32 x i16> @split32(<32 x i16> %a, <32 x i1 + %2 = select <32 x i1> %1, <32 x i16> %a, <32 x i16> %b + ret <32 x i16> %2 + } ++ ++; PR19492 ++define i128 @split128(<2 x i128> %a, <2 x i128> %b) { ++; SSE4-LABEL: split128: ++; SSE4: addq ++; SSE4: adcq ++; SSE4: addq ++; SSE4: adcq ++; SSE4: addq ++; SSE4: adcq ++; SSE4: ret ++; AVX1-LABEL: split128: ++; AVX1: addq ++; AVX1: adcq ++; AVX1: addq ++; AVX1: adcq ++; AVX1: addq ++; AVX1: adcq ++; AVX1: ret ++; AVX2-LABEL: split128: ++; AVX2: addq ++; AVX2: adcq ++; AVX2: addq ++; AVX2: adcq ++; AVX2: addq ++; AVX2: adcq ++; AVX2: ret ++ %add = add nsw <2 x i128> %a, %b ++ %rdx.shuf = shufflevector <2 x i128> %add, <2 x i128> undef, <2 x i32> ++ %bin.rdx = add <2 x i128> %add, %rdx.shuf ++ %e = extractelement <2 x i128> %bin.rdx, i32 1 ++ ret i128 %e ++} From owner-svn-src-stable@FreeBSD.ORG Tue Jun 24 08:21:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1DAC7B09; Tue, 24 Jun 2014 08:21:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 092FB2C75; Tue, 24 Jun 2014 08:21:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5O8LikM077804; Tue, 24 Jun 2014 08:21:44 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5O8Lhjm077794; Tue, 24 Jun 2014 08:21:43 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201406240821.s5O8Lhjm077794@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 24 Jun 2014 08:21:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267816 - in stable/10/sys: fs/devfs fs/msdosfs fs/tmpfs kern sys ufs/ufs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2014 08:21:45 -0000 Author: kib Date: Tue Jun 24 08:21:43 2014 New Revision: 267816 URL: http://svnweb.freebsd.org/changeset/base/267816 Log: MFC r267564: In msdosfs_setattr(), add a check for result of the utimes(2) permissions test. Refactor the permission checks for utimes(2). Modified: stable/10/sys/fs/devfs/devfs_vnops.c stable/10/sys/fs/msdosfs/msdosfs_vnops.c stable/10/sys/fs/tmpfs/tmpfs.h stable/10/sys/fs/tmpfs/tmpfs_subr.c stable/10/sys/fs/tmpfs/tmpfs_vnops.c stable/10/sys/kern/vfs_vnops.c stable/10/sys/sys/vnode.h stable/10/sys/ufs/ufs/ufs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/devfs/devfs_vnops.c ============================================================================== --- stable/10/sys/fs/devfs/devfs_vnops.c Tue Jun 24 06:55:49 2014 (r267815) +++ stable/10/sys/fs/devfs/devfs_vnops.c Tue Jun 24 08:21:43 2014 (r267816) @@ -1533,10 +1533,8 @@ devfs_setattr(struct vop_setattr_args *a } if (vap->va_atime.tv_sec != VNOVAL || vap->va_mtime.tv_sec != VNOVAL) { - /* See the comment in ufs_vnops::ufs_setattr(). */ - if ((error = VOP_ACCESS(vp, VADMIN, ap->a_cred, td)) && - ((vap->va_vaflags & VA_UTIMES_NULL) == 0 || - (error = VOP_ACCESS(vp, VWRITE, ap->a_cred, td)))) + error = vn_utimes_perm(vp, vap, ap->a_cred, td); + if (error != 0) return (error); if (vap->va_atime.tv_sec != VNOVAL) { if (vp->v_type == VCHR) Modified: stable/10/sys/fs/msdosfs/msdosfs_vnops.c ============================================================================== --- stable/10/sys/fs/msdosfs/msdosfs_vnops.c Tue Jun 24 06:55:49 2014 (r267815) +++ stable/10/sys/fs/msdosfs/msdosfs_vnops.c Tue Jun 24 08:21:43 2014 (r267816) @@ -501,12 +501,9 @@ msdosfs_setattr(ap) if (vap->va_atime.tv_sec != VNOVAL || vap->va_mtime.tv_sec != VNOVAL) { if (vp->v_mount->mnt_flag & MNT_RDONLY) return (EROFS); - if (vap->va_vaflags & VA_UTIMES_NULL) { - error = VOP_ACCESS(vp, VADMIN, cred, td); - if (error) - error = VOP_ACCESS(vp, VWRITE, cred, td); - } else - error = VOP_ACCESS(vp, VADMIN, cred, td); + error = vn_utimes_perm(vp, vap, cred, td); + if (error != 0) + return (error); if ((pmp->pm_flags & MSDOSFSMNT_NOWIN95) == 0 && vap->va_atime.tv_sec != VNOVAL) { dep->de_flag &= ~DE_ACCESS; Modified: stable/10/sys/fs/tmpfs/tmpfs.h ============================================================================== --- stable/10/sys/fs/tmpfs/tmpfs.h Tue Jun 24 06:55:49 2014 (r267815) +++ stable/10/sys/fs/tmpfs/tmpfs.h Tue Jun 24 08:21:43 2014 (r267816) @@ -425,8 +425,8 @@ int tmpfs_chmod(struct vnode *, mode_t, int tmpfs_chown(struct vnode *, uid_t, gid_t, struct ucred *, struct thread *); int tmpfs_chsize(struct vnode *, u_quad_t, struct ucred *, struct thread *); -int tmpfs_chtimes(struct vnode *, struct timespec *, struct timespec *, - struct timespec *, int, struct ucred *, struct thread *); +int tmpfs_chtimes(struct vnode *, struct vattr *, struct ucred *cred, + struct thread *); void tmpfs_itimes(struct vnode *, const struct timespec *, const struct timespec *); Modified: stable/10/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- stable/10/sys/fs/tmpfs/tmpfs_subr.c Tue Jun 24 06:55:49 2014 (r267815) +++ stable/10/sys/fs/tmpfs/tmpfs_subr.c Tue Jun 24 08:21:43 2014 (r267816) @@ -1677,8 +1677,8 @@ tmpfs_chsize(struct vnode *vp, u_quad_t * The vnode must be locked on entry and remain locked on exit. */ int -tmpfs_chtimes(struct vnode *vp, struct timespec *atime, struct timespec *mtime, - struct timespec *birthtime, int vaflags, struct ucred *cred, struct thread *l) +tmpfs_chtimes(struct vnode *vp, struct vattr *vap, + struct ucred *cred, struct thread *l) { int error; struct tmpfs_node *node; @@ -1695,29 +1695,25 @@ tmpfs_chtimes(struct vnode *vp, struct t if (node->tn_flags & (IMMUTABLE | APPEND)) return EPERM; - /* Determine if the user have proper privilege to update time. */ - if (vaflags & VA_UTIMES_NULL) { - error = VOP_ACCESS(vp, VADMIN, cred, l); - if (error) - error = VOP_ACCESS(vp, VWRITE, cred, l); - } else - error = VOP_ACCESS(vp, VADMIN, cred, l); - if (error) + error = vn_utimes_perm(vp, vap, cred, l); + if (error != 0) return (error); - if (atime->tv_sec != VNOVAL && atime->tv_nsec != VNOVAL) + if (vap->va_atime.tv_sec != VNOVAL && vap->va_atime.tv_nsec != VNOVAL) node->tn_status |= TMPFS_NODE_ACCESSED; - if (mtime->tv_sec != VNOVAL && mtime->tv_nsec != VNOVAL) + if (vap->va_mtime.tv_sec != VNOVAL && vap->va_mtime.tv_nsec != VNOVAL) node->tn_status |= TMPFS_NODE_MODIFIED; - if (birthtime->tv_nsec != VNOVAL && birthtime->tv_nsec != VNOVAL) + if (vap->va_birthtime.tv_nsec != VNOVAL && + vap->va_birthtime.tv_nsec != VNOVAL) node->tn_status |= TMPFS_NODE_MODIFIED; - tmpfs_itimes(vp, atime, mtime); + tmpfs_itimes(vp, &vap->va_atime, &vap->va_mtime); - if (birthtime->tv_nsec != VNOVAL && birthtime->tv_nsec != VNOVAL) - node->tn_birthtime = *birthtime; + if (vap->va_birthtime.tv_nsec != VNOVAL && + vap->va_birthtime.tv_nsec != VNOVAL) + node->tn_birthtime = vap->va_birthtime; MPASS(VOP_ISLOCKED(vp)); return 0; Modified: stable/10/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- stable/10/sys/fs/tmpfs/tmpfs_vnops.c Tue Jun 24 06:55:49 2014 (r267815) +++ stable/10/sys/fs/tmpfs/tmpfs_vnops.c Tue Jun 24 08:21:43 2014 (r267816) @@ -378,10 +378,6 @@ tmpfs_getattr(struct vop_getattr_args *v return 0; } -/* --------------------------------------------------------------------- */ - -/* XXX Should this operation be atomic? I think it should, but code in - * XXX other places (e.g., ufs) doesn't seem to be... */ int tmpfs_setattr(struct vop_setattr_args *v) { @@ -425,8 +421,7 @@ tmpfs_setattr(struct vop_setattr_args *v vap->va_mtime.tv_nsec != VNOVAL) || (vap->va_birthtime.tv_sec != VNOVAL && vap->va_birthtime.tv_nsec != VNOVAL))) - error = tmpfs_chtimes(vp, &vap->va_atime, &vap->va_mtime, - &vap->va_birthtime, vap->va_vaflags, cred, td); + error = tmpfs_chtimes(vp, vap, cred, td); /* Update the node times. We give preference to the error codes * generated by this function rather than the ones that may arise Modified: stable/10/sys/kern/vfs_vnops.c ============================================================================== --- stable/10/sys/kern/vfs_vnops.c Tue Jun 24 06:55:49 2014 (r267815) +++ stable/10/sys/kern/vfs_vnops.c Tue Jun 24 08:21:43 2014 (r267816) @@ -2085,3 +2085,27 @@ drop: foffset_unlock(fp, offset, error != 0 ? FOF_NOUPDATE : 0); return (error); } + +int +vn_utimes_perm(struct vnode *vp, struct vattr *vap, struct ucred *cred, + struct thread *td) +{ + int error; + + error = VOP_ACCESSX(vp, VWRITE_ATTRIBUTES, cred, td); + + /* + * From utimes(2): + * Grant permission if the caller is the owner of the file or + * the super-user. If the time pointer is null, then write + * permission on the file is also sufficient. + * + * From NFSv4.1, draft 21, 6.2.1.3.1, Discussion of Mask Attributes: + * A user having ACL_WRITE_DATA or ACL_WRITE_ATTRIBUTES + * will be allowed to set the times [..] to the current + * server time. + */ + if (error != 0 && (vap->va_vaflags & VA_UTIMES_NULL) != 0) + error = VOP_ACCESS(vp, VWRITE, cred, td); + return (error); +} Modified: stable/10/sys/sys/vnode.h ============================================================================== --- stable/10/sys/sys/vnode.h Tue Jun 24 06:55:49 2014 (r267815) +++ stable/10/sys/sys/vnode.h Tue Jun 24 08:21:43 2014 (r267816) @@ -696,6 +696,8 @@ int vn_extattr_rm(struct vnode *vp, int const char *attrname, struct thread *td); int vn_vget_ino(struct vnode *vp, ino_t ino, int lkflags, struct vnode **rvp); +int vn_utimes_perm(struct vnode *vp, struct vattr *vap, + struct ucred *cred, struct thread *td); int vn_io_fault_uiomove(char *data, int xfersize, struct uio *uio); int vn_io_fault_pgmove(vm_page_t ma[], vm_offset_t offset, int xfersize, Modified: stable/10/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- stable/10/sys/ufs/ufs/ufs_vnops.c Tue Jun 24 06:55:49 2014 (r267815) +++ stable/10/sys/ufs/ufs/ufs_vnops.c Tue Jun 24 08:21:43 2014 (r267816) @@ -635,35 +635,8 @@ ufs_setattr(ap) return (EROFS); if ((ip->i_flags & SF_SNAPSHOT) != 0) return (EPERM); - /* - * From utimes(2): - * If times is NULL, ... The caller must be the owner of - * the file, have permission to write the file, or be the - * super-user. - * If times is non-NULL, ... The caller must be the owner of - * the file or be the super-user. - * - * Possibly for historical reasons, try to use VADMIN in - * preference to VWRITE for a NULL timestamp. This means we - * will return EACCES in preference to EPERM if neither - * check succeeds. - */ - if (vap->va_vaflags & VA_UTIMES_NULL) { - /* - * NFSv4.1, draft 21, 6.2.1.3.1, Discussion of Mask Attributes - * - * "A user having ACL_WRITE_DATA or ACL_WRITE_ATTRIBUTES - * will be allowed to set the times [..] to the current - * server time." - * - * XXX: Calling it four times seems a little excessive. - */ - error = VOP_ACCESSX(vp, VWRITE_ATTRIBUTES, cred, td); - if (error) - error = VOP_ACCESS(vp, VWRITE, cred, td); - } else - error = VOP_ACCESSX(vp, VWRITE_ATTRIBUTES, cred, td); - if (error) + error = vn_utimes_perm(vp, vap, cred, td); + if (error != 0) return (error); if (vap->va_atime.tv_sec != VNOVAL) ip->i_flag |= IN_ACCESS; From owner-svn-src-stable@FreeBSD.ORG Tue Jun 24 15:28:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C63D79BE; Tue, 24 Jun 2014 15:28:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B21A2266D; Tue, 24 Jun 2014 15:28:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5OFS9cL077522; Tue, 24 Jun 2014 15:28:09 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5OFS9dY077521; Tue, 24 Jun 2014 15:28:09 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201406241528.s5OFS9dY077521@svn.freebsd.org> From: Craig Rodrigues Date: Tue, 24 Jun 2014 15:28:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267821 - stable/9/sys/x86/acpica X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2014 15:28:09 -0000 Author: rodrigc Date: Tue Jun 24 15:28:09 2014 New Revision: 267821 URL: http://svnweb.freebsd.org/changeset/base/267821 Log: MFC r263795: Strict value checking will cause problem. Bay trail DN2820FYKH is supported on Linux but does not work on FreeBSD. This behaviour is bug-compatible with Linux-3.13.5. References: http://d.hatena.ne.jp/syuu1228/20140326 http://lxr.linux.no/linux+v3.13.5/arch/x86/kernel/acpi/boot.c#L1094 Submitted by: syuu PR: 187966 Modified: stable/9/sys/x86/acpica/madt.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/x86/acpica/madt.c ============================================================================== --- stable/9/sys/x86/acpica/madt.c Tue Jun 24 15:16:55 2014 (r267820) +++ stable/9/sys/x86/acpica/madt.c Tue Jun 24 15:28:09 2014 (r267821) @@ -306,10 +306,11 @@ interrupt_polarity(UINT16 IntiFlags, UIN case ACPI_MADT_POLARITY_ACTIVE_HIGH: return (INTR_POLARITY_HIGH); case ACPI_MADT_POLARITY_ACTIVE_LOW: - return (INTR_POLARITY_LOW); + break; default: - panic("Bogus Interrupt Polarity"); + printf("WARNING: Bogus Interrupt Polarity. Assume POLALITY LOW"); } + return (INTR_POLARITY_LOW); } static enum intr_trigger @@ -325,10 +326,13 @@ interrupt_trigger(UINT16 IntiFlags, UINT case ACPI_MADT_TRIGGER_EDGE: return (INTR_TRIGGER_EDGE); case ACPI_MADT_TRIGGER_LEVEL: - return (INTR_TRIGGER_LEVEL); + break; default: - panic("Bogus Interrupt Trigger Mode"); + printf("WARNING: Bogus Interrupt Trigger Mode. Assume Level trigger."); + + break; } + return (INTR_TRIGGER_LEVEL); } /* From owner-svn-src-stable@FreeBSD.ORG Tue Jun 24 15:54:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C600974A; Tue, 24 Jun 2014 15:54:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B25882983; Tue, 24 Jun 2014 15:54:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5OFsgO3091062; Tue, 24 Jun 2014 15:54:42 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5OFsg1i091060; Tue, 24 Jun 2014 15:54:42 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201406241554.s5OFsg1i091060@svn.freebsd.org> From: Bryan Drewery Date: Tue, 24 Jun 2014 15:54:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267822 - stable/9/usr.bin/rpcgen X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2014 15:54:42 -0000 Author: bdrewery Date: Tue Jun 24 15:54:42 2014 New Revision: 267822 URL: http://svnweb.freebsd.org/changeset/base/267822 Log: MFC r267174: Fix some rpcgen sample file issues. PR: 185582 Modified: stable/9/usr.bin/rpcgen/rpc_main.c stable/9/usr.bin/rpcgen/rpc_sample.c Directory Properties: stable/9/usr.bin/rpcgen/ (props changed) Modified: stable/9/usr.bin/rpcgen/rpc_main.c ============================================================================== --- stable/9/usr.bin/rpcgen/rpc_main.c Tue Jun 24 15:28:09 2014 (r267821) +++ stable/9/usr.bin/rpcgen/rpc_main.c Tue Jun 24 15:54:42 2014 (r267822) @@ -876,8 +876,8 @@ $(TARGETS_SVC.c) \n\n"); f_print(fout, "\t$(CC) -o $(CLIENT) $(OBJECTS_CLNT) \ $(LDLIBS) \n\n"); f_print(fout, "$(SERVER) : $(OBJECTS_SVC) \n"); - f_print(fout, "\t$(CC) -o $(SERVER) $(OBJECTS_SVC) $(LDLIBS)\n\n "); - f_print(fout, "clean:\n\t $(RM) -f core $(TARGETS) $(OBJECTS_CLNT) \ + f_print(fout, "\t$(CC) -o $(SERVER) $(OBJECTS_SVC) $(LDLIBS)\n\n"); + f_print(fout, "clean:\n\t rm -f core $(TARGETS) $(OBJECTS_CLNT) \ $(OBJECTS_SVC) $(CLIENT) $(SERVER)\n\n"); } Modified: stable/9/usr.bin/rpcgen/rpc_sample.c ============================================================================== --- stable/9/usr.bin/rpcgen/rpc_sample.c Tue Jun 24 15:28:09 2014 (r267821) +++ stable/9/usr.bin/rpcgen/rpc_sample.c Tue Jun 24 15:54:42 2014 (r267822) @@ -270,6 +270,7 @@ write_sample_clnt_main(void) version_list *vp; f_print(fout, "\n\n"); + f_print(fout, "int\n"); f_print(fout, "main(int argc, char *argv[])\n{\n"); f_print(fout, "\tchar *host;"); From owner-svn-src-stable@FreeBSD.ORG Tue Jun 24 15:57:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ADE6A946; Tue, 24 Jun 2014 15:57:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8070129E1; Tue, 24 Jun 2014 15:57:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5OFvnfo091631; Tue, 24 Jun 2014 15:57:49 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5OFvn6L091628; Tue, 24 Jun 2014 15:57:49 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201406241557.s5OFvn6L091628@svn.freebsd.org> From: Bryan Drewery Date: Tue, 24 Jun 2014 15:57:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267823 - in stable/10: . share/man/man7 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2014 15:57:49 -0000 Author: bdrewery Date: Tue Jun 24 15:57:48 2014 New Revision: 267823 URL: http://svnweb.freebsd.org/changeset/base/267823 Log: MFC r267599: - Add a LOCAL_ITOOLS to allow adding additional tools required for the installworld and distributeworld targets PR: 179562 Modified: stable/10/Makefile.inc1 stable/10/share/man/man7/build.7 Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Tue Jun 24 15:54:42 2014 (r267822) +++ stable/10/Makefile.inc1 Tue Jun 24 15:57:48 2014 (r267823) @@ -17,6 +17,7 @@ # -DNO_DOCUPDATE do not update doc in ${MAKE} update # -DNO_CTF do not run the DTrace CTF conversion tools on built objects # LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list +# LOCAL_ITOOLS="list of tools" to add additional tools to the ITOOLS list # LOCAL_LIB_DIRS="list of dirs" to add additional dirs to libraries target # LOCAL_MTREE="list of mtree files" to process to allow local directories # to be created before files are installed @@ -756,7 +757,8 @@ _nmtree_itools= nmtree ITOOLS= [ awk cap_mkdb cat chflags chmod chown \ date echo egrep find grep id install ${_install-info} \ ln lockf make mkdir mtree ${_nmtree_itools} mv pwd_mkdb \ - rm sed sh sysctl test true uname wc ${_zoneinfo} + rm sed sh sysctl test true uname wc ${_zoneinfo} \ + ${LOCAL_ITOOLS} # # distributeworld Modified: stable/10/share/man/man7/build.7 ============================================================================== --- stable/10/share/man/man7/build.7 Tue Jun 24 15:54:42 2014 (r267822) +++ stable/10/share/man/man7/build.7 Tue Jun 24 15:57:48 2014 (r267823) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 27, 2014 +.Dd June 17, 2014 .Dt BUILD 7 .Os .Sh NAME @@ -415,6 +415,12 @@ If set, this variable supplies a list of the root of the source tree to build as part of the .Cm everything target. +.It Va LOCAL_ITOOLS +If set, this variable supplies a list of additional tools that are used by the +.Cm installworld +and +.Cm distributeworld +targets. .It Va LOCAL_LIB_DIRS If set, this variable supplies a list of additional directories relative to the root of the source tree to build as part of the From owner-svn-src-stable@FreeBSD.ORG Tue Jun 24 19:04:58 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E54C6F5; Tue, 24 Jun 2014 19:04:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ECA682D55; Tue, 24 Jun 2014 19:04:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5OJ4v7W089391; Tue, 24 Jun 2014 19:04:57 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5OJ4vkU089387; Tue, 24 Jun 2014 19:04:57 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201406241904.s5OJ4vkU089387@svn.freebsd.org> From: Xin LI Date: Tue, 24 Jun 2014 19:04:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r267828 - in stable: 10/contrib/file 10/contrib/file/Magdir 8/contrib/file 9/contrib/file 9/contrib/file/Magdir X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2014 19:04:58 -0000 Author: delphij Date: Tue Jun 24 19:04:55 2014 New Revision: 267828 URL: http://svnweb.freebsd.org/changeset/base/267828 Log: Fix multiple vulnerabilities in file(1) and libmagic(3). Security: FreeBSD-SA-14:16.file Approved by: so Modified: stable/8/contrib/file/ascmagic.c stable/8/contrib/file/cdf.c stable/8/contrib/file/cdf.h stable/8/contrib/file/cdf_time.c stable/8/contrib/file/file.h stable/8/contrib/file/funcs.c stable/8/contrib/file/readcdf.c stable/8/contrib/file/softmagic.c Changes in other areas also in this revision: Modified: stable/10/contrib/file/Magdir/commands stable/10/contrib/file/ascmagic.c stable/10/contrib/file/file.h stable/10/contrib/file/funcs.c stable/10/contrib/file/softmagic.c stable/9/contrib/file/Magdir/commands stable/9/contrib/file/ascmagic.c stable/9/contrib/file/file.h stable/9/contrib/file/funcs.c stable/9/contrib/file/softmagic.c Modified: stable/8/contrib/file/ascmagic.c ============================================================================== --- stable/8/contrib/file/ascmagic.c Tue Jun 24 19:04:32 2014 (r267827) +++ stable/8/contrib/file/ascmagic.c Tue Jun 24 19:04:55 2014 (r267828) @@ -151,7 +151,7 @@ file_ascmagic_with_encoding(struct magic if ((utf8_end = encode_utf8(utf8_buf, mlen, ubuf, ulen)) == NULL) goto done; if ((rv = file_softmagic(ms, utf8_buf, (size_t)(utf8_end - utf8_buf), - TEXTTEST)) != 0) + 0, TEXTTEST)) != 0) goto done; else rv = -1; Modified: stable/8/contrib/file/cdf.c ============================================================================== --- stable/8/contrib/file/cdf.c Tue Jun 24 19:04:32 2014 (r267827) +++ stable/8/contrib/file/cdf.c Tue Jun 24 19:04:55 2014 (r267828) @@ -24,15 +24,18 @@ * POSSIBILITY OF SUCH DAMAGE. */ /* - * Parse composite document files, the format used in Microsoft Office - * document files before they switched to zipped xml. + * Parse Composite Document Files, the format used in Microsoft Office + * document files before they switched to zipped XML. * Info from: http://sc.openoffice.org/compdocfileformat.pdf + * + * N.B. This is the "Composite Document File" format, and not the + * "Compound Document Format", nor the "Channel Definition Format". */ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: cdf.c,v 1.30 2009/05/06 14:29:47 christos Exp $") +FILE_RCSID("@(#)$File: cdf.c,v 1.49 2012/02/20 20:04:37 christos Exp $") #endif #include @@ -44,6 +47,9 @@ FILE_RCSID("@(#)$File: cdf.c,v 1.30 2009 #include #include #include +#ifdef HAVE_LIMITS_H +#include +#endif #ifndef EFTYPE #define EFTYPE EINVAL @@ -51,10 +57,6 @@ FILE_RCSID("@(#)$File: cdf.c,v 1.30 2009 #include "cdf.h" -#ifndef __arraycount -#define __arraycount(a) (sizeof(a) / sizeof(a[0])) -#endif - #ifdef CDF_DEBUG #define DPRINTF(a) printf a, fflush(stdout) #else @@ -68,19 +70,21 @@ static union { #define NEED_SWAP (cdf_bo.u == (uint32_t)0x01020304) -#define CDF_TOLE8(x) (NEED_SWAP ? cdf_tole8(x) : (uint64_t)(x)) -#define CDF_TOLE4(x) (NEED_SWAP ? cdf_tole4(x) : (uint32_t)(x)) -#define CDF_TOLE2(x) (NEED_SWAP ? cdf_tole2(x) : (uint16_t)(x)) +#define CDF_TOLE8(x) ((uint64_t)(NEED_SWAP ? _cdf_tole8(x) : (uint64_t)(x))) +#define CDF_TOLE4(x) ((uint32_t)(NEED_SWAP ? _cdf_tole4(x) : (uint32_t)(x))) +#define CDF_TOLE2(x) ((uint16_t)(NEED_SWAP ? _cdf_tole2(x) : (uint16_t)(x))) +#define CDF_GETUINT32(x, y) cdf_getuint32(x, y) + /* * swap a short */ -uint16_t -cdf_tole2(uint16_t sv) +static uint16_t +_cdf_tole2(uint16_t sv) { uint16_t rv; - uint8_t *s = (uint8_t *)(void *)&sv; - uint8_t *d = (uint8_t *)(void *)&rv; + uint8_t *s = (uint8_t *)(void *)&sv; + uint8_t *d = (uint8_t *)(void *)&rv; d[0] = s[1]; d[1] = s[0]; return rv; @@ -89,12 +93,12 @@ cdf_tole2(uint16_t sv) /* * swap an int */ -uint32_t -cdf_tole4(uint32_t sv) +static uint32_t +_cdf_tole4(uint32_t sv) { uint32_t rv; - uint8_t *s = (uint8_t *)(void *)&sv; - uint8_t *d = (uint8_t *)(void *)&rv; + uint8_t *s = (uint8_t *)(void *)&sv; + uint8_t *d = (uint8_t *)(void *)&rv; d[0] = s[3]; d[1] = s[2]; d[2] = s[1]; @@ -105,12 +109,12 @@ cdf_tole4(uint32_t sv) /* * swap a quad */ -uint64_t -cdf_tole8(uint64_t sv) +static uint64_t +_cdf_tole8(uint64_t sv) { uint64_t rv; - uint8_t *s = (uint8_t *)(void *)&sv; - uint8_t *d = (uint8_t *)(void *)&rv; + uint8_t *s = (uint8_t *)(void *)&sv; + uint8_t *d = (uint8_t *)(void *)&rv; d[0] = s[7]; d[1] = s[6]; d[2] = s[5]; @@ -122,11 +126,41 @@ cdf_tole8(uint64_t sv) return rv; } +/* + * grab a uint32_t from a possibly unaligned address, and return it in + * the native host order. + */ +static uint32_t +cdf_getuint32(const uint8_t *p, size_t offs) +{ + uint32_t rv; + (void)memcpy(&rv, p + offs * sizeof(uint32_t), sizeof(rv)); + return CDF_TOLE4(rv); +} + #define CDF_UNPACK(a) \ (void)memcpy(&(a), &buf[len], sizeof(a)), len += sizeof(a) #define CDF_UNPACKA(a) \ (void)memcpy((a), &buf[len], sizeof(a)), len += sizeof(a) +uint16_t +cdf_tole2(uint16_t sv) +{ + return CDF_TOLE2(sv); +} + +uint32_t +cdf_tole4(uint32_t sv) +{ + return CDF_TOLE4(sv); +} + +uint64_t +cdf_tole8(uint64_t sv) +{ + return CDF_TOLE8(sv); +} + void cdf_swap_header(cdf_header_t *h) { @@ -145,15 +179,15 @@ cdf_swap_header(cdf_header_t *h) h->h_min_size_standard_stream = CDF_TOLE4(h->h_min_size_standard_stream); h->h_secid_first_sector_in_short_sat = - CDF_TOLE4(h->h_secid_first_sector_in_short_sat); + CDF_TOLE4((uint32_t)h->h_secid_first_sector_in_short_sat); h->h_num_sectors_in_short_sat = CDF_TOLE4(h->h_num_sectors_in_short_sat); h->h_secid_first_sector_in_master_sat = - CDF_TOLE4(h->h_secid_first_sector_in_master_sat); + CDF_TOLE4((uint32_t)h->h_secid_first_sector_in_master_sat); h->h_num_sectors_in_master_sat = CDF_TOLE4(h->h_num_sectors_in_master_sat); for (i = 0; i < __arraycount(h->h_master_sat); i++) - h->h_master_sat[i] = CDF_TOLE4(h->h_master_sat[i]); + h->h_master_sat[i] = CDF_TOLE4((uint32_t)h->h_master_sat[i]); } void @@ -186,15 +220,15 @@ void cdf_swap_dir(cdf_directory_t *d) { d->d_namelen = CDF_TOLE2(d->d_namelen); - d->d_left_child = CDF_TOLE4(d->d_left_child); - d->d_right_child = CDF_TOLE4(d->d_right_child); - d->d_storage = CDF_TOLE4(d->d_storage); + d->d_left_child = CDF_TOLE4((uint32_t)d->d_left_child); + d->d_right_child = CDF_TOLE4((uint32_t)d->d_right_child); + d->d_storage = CDF_TOLE4((uint32_t)d->d_storage); d->d_storage_uuid[0] = CDF_TOLE8(d->d_storage_uuid[0]); d->d_storage_uuid[1] = CDF_TOLE8(d->d_storage_uuid[1]); d->d_flags = CDF_TOLE4(d->d_flags); - d->d_created = CDF_TOLE8(d->d_created); - d->d_modified = CDF_TOLE8(d->d_modified); - d->d_stream_first_sector = CDF_TOLE4(d->d_stream_first_sector); + d->d_created = CDF_TOLE8((uint64_t)d->d_created); + d->d_modified = CDF_TOLE8((uint64_t)d->d_modified); + d->d_stream_first_sector = CDF_TOLE4((uint32_t)d->d_stream_first_sector); d->d_size = CDF_TOLE4(d->d_size); } @@ -228,14 +262,18 @@ cdf_unpack_dir(cdf_directory_t *d, char } static int -cdf_check_stream_offset(const cdf_stream_t *sst, const void *p, size_t tail) +cdf_check_stream_offset(const cdf_stream_t *sst, const cdf_header_t *h, + const void *p, size_t tail, int line) { const char *b = (const char *)sst->sst_tab; const char *e = ((const char *)p) + tail; - if (e >= b && (size_t)(e - b) < sst->sst_dirlen * sst->sst_len) + (void)&line; + if (e >= b && (size_t)(e - b) < CDF_SEC_SIZE(h) * sst->sst_len) return 0; - DPRINTF((stderr, "offset begin %p end %p %zu >= %zu\n", b, e, - (size_t)(e - b), sst->sst_dirlen * sst->sst_len)); + DPRINTF(("%d: offset begin %p end %p %" SIZE_T_FORMAT "u" + " >= %" SIZE_T_FORMAT "u [%" SIZE_T_FORMAT "u %" + SIZE_T_FORMAT "u]\n", line, b, e, (size_t)(e - b), + CDF_SEC_SIZE(h) * sst->sst_len, CDF_SEC_SIZE(h), sst->sst_len)); errno = EFTYPE; return -1; } @@ -278,7 +316,8 @@ cdf_read_header(const cdf_info_t *info, cdf_unpack_header(h, buf); cdf_swap_header(h); if (h->h_magic != CDF_MAGIC) { - DPRINTF(("Bad magic 0x%llx != 0x%llx\n", + DPRINTF(("Bad magic 0x%" INT64_T_FORMAT "x != 0x%" + INT64_T_FORMAT "x\n", (unsigned long long)h->h_magic, (unsigned long long)CDF_MAGIC)); goto out; @@ -303,18 +342,27 @@ ssize_t cdf_read_sector(const cdf_info_t *info, void *buf, size_t offs, size_t len, const cdf_header_t *h, cdf_secid_t id) { - assert((size_t)CDF_SEC_SIZE(h) == len); - return cdf_read(info, (off_t)CDF_SEC_POS(h, id), - ((char *)buf) + offs, len); + size_t ss = CDF_SEC_SIZE(h); + size_t pos = CDF_SEC_POS(h, id); + assert(ss == len); + return cdf_read(info, (off_t)pos, ((char *)buf) + offs, len); } ssize_t cdf_read_short_sector(const cdf_stream_t *sst, void *buf, size_t offs, size_t len, const cdf_header_t *h, cdf_secid_t id) { - assert((size_t)CDF_SHORT_SEC_SIZE(h) == len); + size_t ss = CDF_SHORT_SEC_SIZE(h); + size_t pos = CDF_SHORT_SEC_POS(h, id); + assert(ss == len); + if (pos > CDF_SEC_SIZE(h) * sst->sst_len) { + DPRINTF(("Out of bounds read %" SIZE_T_FORMAT "u > %" + SIZE_T_FORMAT "u\n", + pos, CDF_SEC_SIZE(h) * sst->sst_len)); + return -1; + } (void)memcpy(((char *)buf) + offs, - ((const char *)sst->sst_tab) + CDF_SHORT_SEC_POS(h, id), len); + ((const char *)sst->sst_tab) + pos, len); return len; } @@ -334,17 +382,20 @@ cdf_read_sat(const cdf_info_t *info, cdf break; #define CDF_SEC_LIMIT (UINT32_MAX / (4 * ss)) - if (h->h_num_sectors_in_master_sat > CDF_SEC_LIMIT / nsatpersec || + if ((nsatpersec > 0 && + h->h_num_sectors_in_master_sat > CDF_SEC_LIMIT / nsatpersec) || i > CDF_SEC_LIMIT) { - DPRINTF(("Number of sectors in master SAT too big %u %zu\n", - h->h_num_sectors_in_master_sat, i)); + DPRINTF(("Number of sectors in master SAT too big %u %" + SIZE_T_FORMAT "u\n", h->h_num_sectors_in_master_sat, i)); errno = EFTYPE; return -1; } sat->sat_len = h->h_num_sectors_in_master_sat * nsatpersec + i; - DPRINTF(("sat_len = %zu ss = %zu\n", sat->sat_len, ss)); - if ((sat->sat_tab = calloc(sat->sat_len, ss)) == NULL) + DPRINTF(("sat_len = %" SIZE_T_FORMAT "u ss = %" SIZE_T_FORMAT "u\n", + sat->sat_len, ss)); + if ((sat->sat_tab = CAST(cdf_secid_t *, calloc(sat->sat_len, ss))) + == NULL) return -1; for (i = 0; i < __arraycount(h->h_master_sat); i++) { @@ -357,7 +408,7 @@ cdf_read_sat(const cdf_info_t *info, cdf } } - if ((msa = calloc(1, ss)) == NULL) + if ((msa = CAST(cdf_secid_t *, calloc(1, ss))) == NULL) goto out1; mid = h->h_secid_first_sector_in_master_sat; @@ -374,12 +425,12 @@ cdf_read_sat(const cdf_info_t *info, cdf goto out2; } for (k = 0; k < nsatpersec; k++, i++) { - sec = CDF_TOLE4(msa[k]); + sec = CDF_TOLE4((uint32_t)msa[k]); if (sec < 0) goto out; if (i >= sat->sat_len) { - DPRINTF(("Out of bounds reading MSA %u >= %u", - i, sat->sat_len)); + DPRINTF(("Out of bounds reading MSA %" SIZE_T_FORMAT + "u >= %" SIZE_T_FORMAT "u", i, sat->sat_len)); errno = EFTYPE; goto out2; } @@ -390,7 +441,7 @@ cdf_read_sat(const cdf_info_t *info, cdf goto out2; } } - mid = CDF_TOLE4(msa[nsatpersec]); + mid = CDF_TOLE4((uint32_t)msa[nsatpersec]); } out: sat->sat_len = i; @@ -422,7 +473,7 @@ cdf_count_chain(const cdf_sat_t *sat, cd errno = EFTYPE; return (size_t)-1; } - sid = CDF_TOLE4(sat->sat_tab[sid]); + sid = CDF_TOLE4((uint32_t)sat->sat_tab[sid]); } DPRINTF(("\n")); return i; @@ -452,7 +503,8 @@ cdf_read_long_sector_chain(const cdf_inf } if (i >= scn->sst_len) { DPRINTF(("Out of bounds reading long sector chain " - "%u > %u\n", i, scn->sst_len)); + "%" SIZE_T_FORMAT "u > %" SIZE_T_FORMAT "u\n", i, + scn->sst_len)); errno = EFTYPE; goto out; } @@ -465,7 +517,7 @@ cdf_read_long_sector_chain(const cdf_inf DPRINTF(("Reading long sector chain %d", sid)); goto out; } - sid = CDF_TOLE4(sat->sat_tab[sid]); + sid = CDF_TOLE4((uint32_t)sat->sat_tab[sid]); } return 0; out: @@ -497,7 +549,8 @@ cdf_read_short_sector_chain(const cdf_he } if (i >= scn->sst_len) { DPRINTF(("Out of bounds reading short sector chain " - "%u > %u\n", i, scn->sst_len)); + "%" SIZE_T_FORMAT "u > %" SIZE_T_FORMAT "u\n", + i, scn->sst_len)); errno = EFTYPE; goto out; } @@ -506,7 +559,7 @@ cdf_read_short_sector_chain(const cdf_he DPRINTF(("Reading short sector chain %d", sid)); goto out; } - sid = CDF_TOLE4(ssat->sat_tab[sid]); + sid = CDF_TOLE4((uint32_t)ssat->sat_tab[sid]); } return 0; out: @@ -520,7 +573,7 @@ cdf_read_sector_chain(const cdf_info_t * cdf_secid_t sid, size_t len, cdf_stream_t *scn) { - if (len < h->h_min_size_standard_stream) + if (len < h->h_min_size_standard_stream && sst->sst_tab != NULL) return cdf_read_short_sector_chain(h, ssat, sst, sid, len, scn); else @@ -543,11 +596,12 @@ cdf_read_dir(const cdf_info_t *info, con nd = ss / CDF_DIRECTORY_SIZE; dir->dir_len = ns * nd; - dir->dir_tab = calloc(dir->dir_len, sizeof(dir->dir_tab[0])); + dir->dir_tab = CAST(cdf_directory_t *, + calloc(dir->dir_len, sizeof(dir->dir_tab[0]))); if (dir->dir_tab == NULL) return -1; - if ((buf = malloc(ss)) == NULL) { + if ((buf = CAST(char *, malloc(ss))) == NULL) { free(dir->dir_tab); return -1; } @@ -566,7 +620,7 @@ cdf_read_dir(const cdf_info_t *info, con cdf_unpack_dir(&dir->dir_tab[i * nd + j], &buf[j * CDF_DIRECTORY_SIZE]); } - sid = CDF_TOLE4(sat->sat_tab[sid]); + sid = CDF_TOLE4((uint32_t)sat->sat_tab[sid]); } if (NEED_SWAP) for (i = 0; i < dir->dir_len; i++) @@ -592,7 +646,7 @@ cdf_read_ssat(const cdf_info_t *info, co if (ssat->sat_len == (size_t)-1) return -1; - ssat->sat_tab = calloc(ssat->sat_len, ss); + ssat->sat_tab = CAST(cdf_secid_t *, calloc(ssat->sat_len, ss)); if (ssat->sat_tab == NULL) return -1; @@ -604,7 +658,8 @@ cdf_read_ssat(const cdf_info_t *info, co } if (i >= ssat->sat_len) { DPRINTF(("Out of bounds reading short sector chain " - "%u > %u\n", i, ssat->sat_len)); + "%" SIZE_T_FORMAT "u > %" SIZE_T_FORMAT "u\n", i, + ssat->sat_len)); errno = EFTYPE; goto out; } @@ -613,7 +668,7 @@ cdf_read_ssat(const cdf_info_t *info, co DPRINTF(("Reading short sat sector %d", sid)); goto out; } - sid = CDF_TOLE4(sat->sat_tab[sid]); + sid = CDF_TOLE4((uint32_t)sat->sat_tab[sid]); } return 0; out: @@ -641,7 +696,7 @@ cdf_read_short_stream(const cdf_info_t * if (d->d_stream_first_sector < 0) goto out; - return cdf_read_long_sector_chain(info, h, sat, + return cdf_read_long_sector_chain(info, h, sat, d->d_stream_first_sector, d->d_size, scn); out: scn->sst_tab = NULL; @@ -668,44 +723,45 @@ cdf_read_summary_info(const cdf_info_t * const cdf_directory_t *d; static const char name[] = "\05SummaryInformation"; - for (i = 0; i < dir->dir_len; i++) - if (dir->dir_tab[i].d_type == CDF_DIR_TYPE_USER_STREAM && - cdf_namecmp(name, dir->dir_tab[i].d_name, sizeof(name)) + for (i = dir->dir_len; i > 0; i--) + if (dir->dir_tab[i - 1].d_type == CDF_DIR_TYPE_USER_STREAM && + cdf_namecmp(name, dir->dir_tab[i - 1].d_name, sizeof(name)) == 0) break; - if (i == dir->dir_len) { + if (i == 0) { DPRINTF(("Cannot find summary information section\n")); - errno = EFTYPE; + errno = ESRCH; return -1; } - d = &dir->dir_tab[i]; + d = &dir->dir_tab[i - 1]; return cdf_read_sector_chain(info, h, sat, ssat, sst, d->d_stream_first_sector, d->d_size, scn); } int -cdf_read_property_info(const cdf_stream_t *sst, uint32_t offs, - cdf_property_info_t **info, size_t *count, size_t *maxcount) +cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h, + uint32_t offs, cdf_property_info_t **info, size_t *count, size_t *maxcount) { const cdf_section_header_t *shp; cdf_section_header_t sh; - const uint32_t *p, *q, *e; + const uint8_t *p, *q, *e; int16_t s16; int32_t s32; uint32_t u32; int64_t s64; uint64_t u64; cdf_timestamp_t tp; - size_t i, o, nelements, j; + size_t i, o, o4, nelements, j; cdf_property_info_t *inp; if (offs > UINT32_MAX / 4) { errno = EFTYPE; goto out; } - shp = (const void *)((const char *)sst->sst_tab + offs); - if (cdf_check_stream_offset(sst, shp, sizeof(*shp)) == -1) + shp = CAST(const cdf_section_header_t *, (const void *) + ((const char *)sst->sst_tab + offs)); + if (cdf_check_stream_offset(sst, h, shp, sizeof(*shp), __LINE__) == -1) goto out; sh.sh_len = CDF_TOLE4(shp->sh_len); #define CDF_SHLEN_LIMIT (UINT32_MAX / 8) @@ -723,105 +779,137 @@ cdf_read_property_info(const cdf_stream_ if (*maxcount > CDF_PROP_LIMIT) goto out; *maxcount += sh.sh_properties; - inp = realloc(*info, *maxcount * sizeof(*inp)); + inp = CAST(cdf_property_info_t *, + realloc(*info, *maxcount * sizeof(*inp))); } else { *maxcount = sh.sh_properties; - inp = malloc(*maxcount * sizeof(*inp)); + inp = CAST(cdf_property_info_t *, + malloc(*maxcount * sizeof(*inp))); } if (inp == NULL) goto out; *info = inp; inp += *count; *count += sh.sh_properties; - p = (const void *)((const char *)sst->sst_tab + offs + sizeof(sh)); - e = (const void *)(((const char *)shp) + sh.sh_len); - if (cdf_check_stream_offset(sst, e, 0) == -1) + p = CAST(const uint8_t *, (const void *) + ((const char *)(const void *)sst->sst_tab + + offs + sizeof(sh))); + e = CAST(const uint8_t *, (const void *) + (((const char *)(const void *)shp) + sh.sh_len)); + if (cdf_check_stream_offset(sst, h, e, 0, __LINE__) == -1) goto out; for (i = 0; i < sh.sh_properties; i++) { - q = (const uint32_t *)((const char *)p + - CDF_TOLE4(p[(i << 1) + 1])) - 2; + size_t ofs = CDF_GETUINT32(p, (i << 1) + 1); + q = (const uint8_t *)(const void *) + ((const char *)(const void *)p + ofs + - 2 * sizeof(uint32_t)); if (q > e) { DPRINTF(("Ran of the end %p > %p\n", q, e)); goto out; } - inp[i].pi_id = CDF_TOLE4(p[i << 1]); - inp[i].pi_type = CDF_TOLE4(q[0]); - DPRINTF(("%d) id=%x type=%x offs=%x\n", i, inp[i].pi_id, - inp[i].pi_type, (const char *)q - (const char *)p)); + inp[i].pi_id = CDF_GETUINT32(p, i << 1); + inp[i].pi_type = CDF_GETUINT32(q, 0); + DPRINTF(("%" SIZE_T_FORMAT "u) id=%x type=%x offs=0x%tx,0x%x\n", + i, inp[i].pi_id, inp[i].pi_type, q - p, offs)); if (inp[i].pi_type & CDF_VECTOR) { - nelements = CDF_TOLE4(q[1]); + nelements = CDF_GETUINT32(q, 1); o = 2; } else { nelements = 1; o = 1; } + o4 = o * sizeof(uint32_t); if (inp[i].pi_type & (CDF_ARRAY|CDF_BYREF|CDF_RESERVED)) goto unknown; switch (inp[i].pi_type & CDF_TYPEMASK) { + case CDF_NULL: case CDF_EMPTY: break; case CDF_SIGNED16: if (inp[i].pi_type & CDF_VECTOR) goto unknown; - (void)memcpy(&s16, &q[o], sizeof(s16)); + (void)memcpy(&s16, &q[o4], sizeof(s16)); inp[i].pi_s16 = CDF_TOLE2(s16); break; case CDF_SIGNED32: if (inp[i].pi_type & CDF_VECTOR) goto unknown; - (void)memcpy(&s32, &q[o], sizeof(s32)); - inp[i].pi_s32 = CDF_TOLE4(s32); + (void)memcpy(&s32, &q[o4], sizeof(s32)); + inp[i].pi_s32 = CDF_TOLE4((uint32_t)s32); break; case CDF_BOOL: case CDF_UNSIGNED32: if (inp[i].pi_type & CDF_VECTOR) goto unknown; - (void)memcpy(&u32, &q[o], sizeof(u32)); + (void)memcpy(&u32, &q[o4], sizeof(u32)); inp[i].pi_u32 = CDF_TOLE4(u32); break; case CDF_SIGNED64: if (inp[i].pi_type & CDF_VECTOR) goto unknown; - (void)memcpy(&s64, &q[o], sizeof(s64)); - inp[i].pi_s64 = CDF_TOLE4(s64); + (void)memcpy(&s64, &q[o4], sizeof(s64)); + inp[i].pi_s64 = CDF_TOLE8((uint64_t)s64); break; case CDF_UNSIGNED64: if (inp[i].pi_type & CDF_VECTOR) goto unknown; - (void)memcpy(&u64, &q[o], sizeof(u64)); - inp[i].pi_u64 = CDF_TOLE4(u64); + (void)memcpy(&u64, &q[o4], sizeof(u64)); + inp[i].pi_u64 = CDF_TOLE8((uint64_t)u64); + break; + case CDF_FLOAT: + if (inp[i].pi_type & CDF_VECTOR) + goto unknown; + (void)memcpy(&u32, &q[o4], sizeof(u32)); + u32 = CDF_TOLE4(u32); + memcpy(&inp[i].pi_f, &u32, sizeof(inp[i].pi_f)); + break; + case CDF_DOUBLE: + if (inp[i].pi_type & CDF_VECTOR) + goto unknown; + (void)memcpy(&u64, &q[o4], sizeof(u64)); + u64 = CDF_TOLE8((uint64_t)u64); + memcpy(&inp[i].pi_d, &u64, sizeof(inp[i].pi_d)); break; case CDF_LENGTH32_STRING: + case CDF_LENGTH32_WSTRING: if (nelements > 1) { size_t nelem = inp - *info; if (*maxcount > CDF_PROP_LIMIT || nelements > CDF_PROP_LIMIT) goto out; *maxcount += nelements; - inp = realloc(*info, *maxcount * sizeof(*inp)); + inp = CAST(cdf_property_info_t *, + realloc(*info, *maxcount * sizeof(*inp))); if (inp == NULL) goto out; *info = inp; inp = *info + nelem; } - DPRINTF(("nelements = %d\n", nelements)); + DPRINTF(("nelements = %" SIZE_T_FORMAT "u\n", + nelements)); for (j = 0; j < nelements; j++, i++) { - uint32_t l = CDF_TOLE4(q[o]); + uint32_t l = CDF_GETUINT32(q, o); inp[i].pi_str.s_len = l; - inp[i].pi_str.s_buf = (const char *)(&q[o+1]); - DPRINTF(("l = %d, r = %d, s = %s\n", l, + inp[i].pi_str.s_buf = (const char *) + (const void *)(&q[o4 + sizeof(l)]); + DPRINTF(("l = %d, r = %" SIZE_T_FORMAT + "u, s = %s\n", l, CDF_ROUND(l, sizeof(l)), inp[i].pi_str.s_buf)); - l = 4 + CDF_ROUND(l, sizeof(l)); - o += l >> 2; + if (l & 1) + l++; + o += l >> 1; + if (q + o >= e) + goto out; + o4 = o * sizeof(uint32_t); } i--; break; case CDF_FILETIME: if (inp[i].pi_type & CDF_VECTOR) goto unknown; - (void)memcpy(&tp, &q[o], sizeof(tp)); - inp[i].pi_tp = CDF_TOLE8(tp); + (void)memcpy(&tp, &q[o4], sizeof(tp)); + inp[i].pi_tp = CDF_TOLE8((uint64_t)tp); break; case CDF_CLIPBOARD: if (inp[i].pi_type & CDF_VECTOR) @@ -831,7 +919,7 @@ cdf_read_property_info(const cdf_stream_ unknown: DPRINTF(("Don't know how to deal with %x\n", inp[i].pi_type)); - goto out; + break; } } return 0; @@ -841,16 +929,18 @@ out: } int -cdf_unpack_summary_info(const cdf_stream_t *sst, cdf_summary_info_header_t *ssi, - cdf_property_info_t **info, size_t *count) +cdf_unpack_summary_info(const cdf_stream_t *sst, const cdf_header_t *h, + cdf_summary_info_header_t *ssi, cdf_property_info_t **info, size_t *count) { size_t i, maxcount; - const cdf_summary_info_header_t *si = sst->sst_tab; - const cdf_section_declaration_t *sd = (const void *) - ((const char *)sst->sst_tab + CDF_SECTION_DECLARATION_OFFSET); + const cdf_summary_info_header_t *si = + CAST(const cdf_summary_info_header_t *, sst->sst_tab); + const cdf_section_declaration_t *sd = + CAST(const cdf_section_declaration_t *, (const void *) + ((const char *)sst->sst_tab + CDF_SECTION_DECLARATION_OFFSET)); - if (cdf_check_stream_offset(sst, si, sizeof(*si)) == -1 || - cdf_check_stream_offset(sst, sd, sizeof(*sd)) == -1) + if (cdf_check_stream_offset(sst, h, si, sizeof(*si), __LINE__) == -1 || + cdf_check_stream_offset(sst, h, sd, sizeof(*sd), __LINE__) == -1) return -1; ssi->si_byte_order = CDF_TOLE2(si->si_byte_order); ssi->si_os_version = CDF_TOLE2(si->si_os_version); @@ -867,9 +957,10 @@ cdf_unpack_summary_info(const cdf_stream errno = EFTYPE; return -1; } - if (cdf_read_property_info(sst, CDF_TOLE4(sd->sd_offset), - info, count, &maxcount) == -1) + if (cdf_read_property_info(sst, h, CDF_TOLE4(sd->sd_offset), + info, count, &maxcount) == -1) { return -1; + } } return 0; } @@ -926,32 +1017,32 @@ cdf_print_property_name(char *buf, size_ int cdf_print_elapsed_time(char *buf, size_t bufsiz, cdf_timestamp_t ts) { - size_t len = 0; + int len = 0; int days, hours, mins, secs; ts /= CDF_TIME_PREC; - secs = ts % 60; + secs = (int)(ts % 60); ts /= 60; - mins = ts % 60; + mins = (int)(ts % 60); ts /= 60; - hours = ts % 24; + hours = (int)(ts % 24); ts /= 24; - days = ts; + days = (int)ts; if (days) { len += snprintf(buf + len, bufsiz - len, "%dd+", days); - if (len >= bufsiz) + if ((size_t)len >= bufsiz) return len; } if (days || hours) { len += snprintf(buf + len, bufsiz - len, "%.2d:", hours); - if (len >= bufsiz) + if ((size_t)len >= bufsiz) return len; } len += snprintf(buf + len, bufsiz - len, "%.2d:", mins); - if (len >= bufsiz) + if ((size_t)len >= bufsiz) return len; len += snprintf(buf + len, bufsiz - len, "%.2d", secs); @@ -994,13 +1085,14 @@ cdf_dump_sat(const char *prefix, const c size_t i, j, s = size / sizeof(cdf_secid_t); for (i = 0; i < sat->sat_len; i++) { - (void)fprintf(stderr, "%s[%zu]:\n%.6d: ", prefix, i, i * s); + (void)fprintf(stderr, "%s[%" SIZE_T_FORMAT "u]:\n%.6" + SIZE_T_FORMAT "u: ", prefix, i, i * s); for (j = 0; j < s; j++) { (void)fprintf(stderr, "%5d, ", CDF_TOLE4(sat->sat_tab[s * i + j])); if ((j + 1) % 10 == 0) - (void)fprintf(stderr, "\n%.6d: ", - i * s + j + 1); + (void)fprintf(stderr, "\n%.6" SIZE_T_FORMAT + "u: ", i * s + j + 1); } (void)fprintf(stderr, "\n"); } @@ -1019,7 +1111,8 @@ cdf_dump(void *v, size_t len) if (j == 16) { j = 0; abuf[15] = '\0'; - (void)fprintf(stderr, "%s\n%.4x: ", abuf, i + 1); + (void)fprintf(stderr, "%s\n%.4" SIZE_T_FORMAT "x: ", + abuf, i + 1); } } (void)fprintf(stderr, "\n"); @@ -1051,7 +1144,8 @@ cdf_dump_dir(const cdf_info_t *info, con d = &dir->dir_tab[i]; for (j = 0; j < sizeof(name); j++) name[j] = (char)CDF_TOLE2(d->d_name[j]); - (void)fprintf(stderr, "Directory %zu: %s\n", i, name); + (void)fprintf(stderr, "Directory %" SIZE_T_FORMAT "u: %s\n", + i, name); if (d->d_type < __arraycount(types)) (void)fprintf(stderr, "Type: %s\n", types[d->d_type]); else @@ -1062,9 +1156,9 @@ cdf_dump_dir(const cdf_info_t *info, con (void)fprintf(stderr, "Right child: %d\n", d->d_right_child); (void)fprintf(stderr, "Flags: 0x%x\n", d->d_flags); cdf_timestamp_to_timespec(&ts, d->d_created); - (void)fprintf(stderr, "Created %s", ctime(&ts.tv_sec)); + (void)fprintf(stderr, "Created %s", cdf_ctime(&ts.tv_sec)); cdf_timestamp_to_timespec(&ts, d->d_modified); - (void)fprintf(stderr, "Modified %s", ctime(&ts.tv_sec)); + (void)fprintf(stderr, "Modified %s", cdf_ctime(&ts.tv_sec)); (void)fprintf(stderr, "Stream %d\n", d->d_stream_first_sector); (void)fprintf(stderr, "Size %d\n", d->d_size); switch (d->d_type) { @@ -1086,7 +1180,7 @@ cdf_dump_dir(const cdf_info_t *info, con default: break; } - + } } @@ -1096,12 +1190,14 @@ cdf_dump_property_info(const cdf_propert cdf_timestamp_t tp; struct timespec ts; char buf[64]; - size_t i; + size_t i, j; for (i = 0; i < count; i++) { cdf_print_property_name(buf, sizeof(buf), info[i].pi_id); - (void)fprintf(stderr, "%zu) %s: ", i, buf); + (void)fprintf(stderr, "%" SIZE_T_FORMAT "u) %s: ", i, buf); switch (info[i].pi_type) { + case CDF_NULL: + break; case CDF_SIGNED16: (void)fprintf(stderr, "signed 16 [%hd]\n", info[i].pi_s16); @@ -1114,11 +1210,26 @@ cdf_dump_property_info(const cdf_propert (void)fprintf(stderr, "unsigned 32 [%u]\n", info[i].pi_u32); break; + case CDF_FLOAT: + (void)fprintf(stderr, "float [%g]\n", + info[i].pi_f); + break; + case CDF_DOUBLE: + (void)fprintf(stderr, "double [%g]\n", + info[i].pi_d); + break; case CDF_LENGTH32_STRING: (void)fprintf(stderr, "string %u [%.*s]\n", info[i].pi_str.s_len, info[i].pi_str.s_len, info[i].pi_str.s_buf); break; + case CDF_LENGTH32_WSTRING: + (void)fprintf(stderr, "string %u [", + info[i].pi_str.s_len); + for (j = 0; j < info[i].pi_str.s_len - 1; j++) + (void)fputc(info[i].pi_str.s_buf[j << 1], stderr); + (void)fprintf(stderr, "]\n"); + break; case CDF_FILETIME: tp = info[i].pi_tp; if (tp < 1000000000000000LL) { @@ -1127,7 +1238,7 @@ cdf_dump_property_info(const cdf_propert } else { cdf_timestamp_to_timespec(&ts, tp); (void)fprintf(stderr, "timestamp %s", - ctime(&ts.tv_sec)); + cdf_ctime(&ts.tv_sec)); } break; case CDF_CLIPBOARD: @@ -1151,7 +1262,7 @@ cdf_dump_summary_info(const cdf_header_t size_t count; (void)&h; - if (cdf_unpack_summary_info(sst, &ssi, &info, &count) == -1) + if (cdf_unpack_summary_info(sst, h, &ssi, &info, &count) == -1) return; (void)fprintf(stderr, "Endian: %x\n", ssi.si_byte_order); (void)fprintf(stderr, "Os Version %d.%d\n", ssi.si_os_version & 0xff, @@ -1203,7 +1314,7 @@ main(int argc, char *argv[]) if (cdf_read_ssat(&info, &h, &sat, &ssat) == -1) err(1, "Cannot read ssat"); #ifdef CDF_DEBUG - cdf_dump_sat("SSAT", &h, &ssat, CDF_SHORT_SEC_SIZE(&h)); + cdf_dump_sat("SSAT", &ssat, CDF_SHORT_SEC_SIZE(&h)); #endif if (cdf_read_dir(&info, &h, &sat, &dir) == -1) Modified: stable/8/contrib/file/cdf.h ============================================================================== --- stable/8/contrib/file/cdf.h Tue Jun 24 19:04:32 2014 (r267827) +++ stable/8/contrib/file/cdf.h Tue Jun 24 19:04:55 2014 (r267828) @@ -24,20 +24,35 @@ * POSSIBILITY OF SUCH DAMAGE. */ /* - * Info from: http://sc.openoffice.org/compdocfileformat.pdf + * Parse Composite Document Files, the format used in Microsoft Office + * document files before they switched to zipped XML. + * Info from: http://sc.openoffice.org/compdocfileformat.pdf + * + * N.B. This is the "Composite Document File" format, and not the + * "Compound Document Format", nor the "Channel Definition Format". */ #ifndef _H_CDF_ #define _H_CDF_ +#ifdef WIN32 +#include +#define timespec timeval +#define tv_nsec tv_usec +#endif +#ifdef __DJGPP__ +#define timespec timeval +#define tv_nsec tv_usec +#endif + typedef int32_t cdf_secid_t; #define CDF_LOOP_LIMIT 10000 #define CDF_SECID_NULL 0 #define CDF_SECID_FREE -1 -#define CDF_SECID_END_OF_CHAIN -2 -#define CDF_SECID_SECTOR_ALLOCATION_TABLE -3 +#define CDF_SECID_END_OF_CHAIN -2 +#define CDF_SECID_SECTOR_ALLOCATION_TABLE -3 #define CDF_SECID_MASTER_SECTOR_ALLOCATION_TABLE -4 typedef struct { @@ -61,15 +76,15 @@ typedef struct { cdf_secid_t h_master_sat[436/4]; } cdf_header_t; -#define CDF_SEC_SIZE(h) (1 << (h)->h_sec_size_p2) +#define CDF_SEC_SIZE(h) ((size_t)(1 << (h)->h_sec_size_p2)) #define CDF_SEC_POS(h, secid) (CDF_SEC_SIZE(h) + (secid) * CDF_SEC_SIZE(h)) -#define CDF_SHORT_SEC_SIZE(h) (1 << (h)->h_short_sec_size_p2) +#define CDF_SHORT_SEC_SIZE(h) ((size_t)(1 << (h)->h_short_sec_size_p2)) #define CDF_SHORT_SEC_POS(h, secid) ((secid) * CDF_SHORT_SEC_SIZE(h)) -typedef int32_t cdf_dirid_t; +typedef int32_t cdf_dirid_t; #define CDF_DIRID_NULL -1 -typedef int64_t cdf_timestamp_t; +typedef int64_t cdf_timestamp_t; #define CDF_BASE_YEAR 1601 #define CDF_TIME_PREC 10000000 @@ -78,11 +93,11 @@ typedef struct { uint16_t d_namelen; uint8_t d_type; #define CDF_DIR_TYPE_EMPTY 0 -#define CDF_DIR_TYPE_USER_STORAGE 1 -#define CDF_DIR_TYPE_USER_STREAM 2 -#define CDF_DIR_TYPE_LOCKBYTES 3 -#define CDF_DIR_TYPE_PROPERTY 4 -#define CDF_DIR_TYPE_ROOT_STORAGE 5 +#define CDF_DIR_TYPE_USER_STORAGE 1 +#define CDF_DIR_TYPE_USER_STREAM 2 +#define CDF_DIR_TYPE_LOCKBYTES 3 +#define CDF_DIR_TYPE_PROPERTY 4 +#define CDF_DIR_TYPE_ROOT_STORAGE 5 uint8_t d_color; #define CDF_DIR_COLOR_READ 0 #define CDF_DIR_COLOR_BLACK 1 @@ -91,8 +106,8 @@ typedef struct { cdf_dirid_t d_storage; uint64_t d_storage_uuid[2]; uint32_t d_flags; - cdf_timestamp_t d_created; - cdf_timestamp_t d_modified; + cdf_timestamp_t d_created; + cdf_timestamp_t d_modified; cdf_secid_t d_stream_first_sector; uint32_t d_size; uint32_t d_unused0; @@ -154,7 +169,9 @@ typedef struct { int32_t _pi_s32; uint64_t _pi_u64; int64_t _pi_s64; - cdf_timestamp_t _pi_tp; + cdf_timestamp_t _pi_tp; + float _pi_f; + double _pi_d; struct { uint32_t s_len; const char *s_buf; @@ -166,6 +183,8 @@ typedef struct { #define pi_s32 pi_val._pi_s32 #define pi_u16 pi_val._pi_u16 #define pi_s16 pi_val._pi_s16 +#define pi_f pi_val._pi_f +#define pi_d pi_val._pi_d #define pi_tp pi_val._pi_tp #define pi_str pi_val._pi_str } cdf_property_info_t; @@ -174,13 +193,13 @@ typedef struct { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Tue Jun 24 19:04:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F0606F4; Tue, 24 Jun 2014 19:04:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A33C2D54; Tue, 24 Jun 2014 19:04:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5OJ4vYS089381; Tue, 24 Jun 2014 19:04:57 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5OJ4um4089365; Tue, 24 Jun 2014 19:04:56 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201406241904.s5OJ4um4089365@svn.freebsd.org> From: Xin LI Date: Tue, 24 Jun 2014 19:04:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267828 - in stable: 10/contrib/file 10/contrib/file/Magdir 8/contrib/file 9/contrib/file 9/contrib/file/Magdir X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2014 19:04:57 -0000 Author: delphij Date: Tue Jun 24 19:04:55 2014 New Revision: 267828 URL: http://svnweb.freebsd.org/changeset/base/267828 Log: Fix multiple vulnerabilities in file(1) and libmagic(3). Security: FreeBSD-SA-14:16.file Approved by: so Modified: stable/9/contrib/file/Magdir/commands stable/9/contrib/file/ascmagic.c stable/9/contrib/file/file.h stable/9/contrib/file/funcs.c stable/9/contrib/file/softmagic.c Changes in other areas also in this revision: Modified: stable/10/contrib/file/Magdir/commands stable/10/contrib/file/ascmagic.c stable/10/contrib/file/file.h stable/10/contrib/file/funcs.c stable/10/contrib/file/softmagic.c stable/8/contrib/file/ascmagic.c stable/8/contrib/file/cdf.c stable/8/contrib/file/cdf.h stable/8/contrib/file/cdf_time.c stable/8/contrib/file/file.h stable/8/contrib/file/funcs.c stable/8/contrib/file/readcdf.c stable/8/contrib/file/softmagic.c Modified: stable/9/contrib/file/Magdir/commands ============================================================================== --- stable/9/contrib/file/Magdir/commands Tue Jun 24 19:04:32 2014 (r267827) +++ stable/9/contrib/file/Magdir/commands Tue Jun 24 19:04:55 2014 (r267828) @@ -49,7 +49,8 @@ !:mime text/x-awk 0 string/wt #!\ /usr/bin/awk awk script text executable !:mime text/x-awk -0 regex =^\\s*BEGIN\\s*[{] awk script text +0 regex =^\\s{0,100}BEGIN\\s{0,100}[{] awk script text +!:strength - 12 # AT&T Bell Labs' Plan 9 shell 0 string/wt #!\ /bin/rc Plan 9 rc shell script text executable Modified: stable/9/contrib/file/ascmagic.c ============================================================================== --- stable/9/contrib/file/ascmagic.c Tue Jun 24 19:04:32 2014 (r267827) +++ stable/9/contrib/file/ascmagic.c Tue Jun 24 19:04:55 2014 (r267828) @@ -147,7 +147,7 @@ file_ascmagic_with_encoding(struct magic == NULL) goto done; if ((rv = file_softmagic(ms, utf8_buf, - (size_t)(utf8_end - utf8_buf), TEXTTEST, text)) == 0) + (size_t)(utf8_end - utf8_buf), 0, TEXTTEST, text)) == 0) rv = -1; } Modified: stable/9/contrib/file/file.h ============================================================================== --- stable/9/contrib/file/file.h Tue Jun 24 19:04:32 2014 (r267827) +++ stable/9/contrib/file/file.h Tue Jun 24 19:04:55 2014 (r267828) @@ -414,7 +414,7 @@ protected int file_encoding(struct magic unichar **, size_t *, const char **, const char **, const char **); protected int file_is_tar(struct magic_set *, const unsigned char *, size_t); protected int file_softmagic(struct magic_set *, const unsigned char *, size_t, - int, int); + size_t, int, int); protected struct mlist *file_apprentice(struct magic_set *, const char *, int); protected uint64_t file_signextend(struct magic_set *, struct magic *, uint64_t); Modified: stable/9/contrib/file/funcs.c ============================================================================== --- stable/9/contrib/file/funcs.c Tue Jun 24 19:04:32 2014 (r267827) +++ stable/9/contrib/file/funcs.c Tue Jun 24 19:04:55 2014 (r267828) @@ -228,7 +228,7 @@ file_buffer(struct magic_set *ms, int fd /* try soft magic tests */ if ((ms->flags & MAGIC_NO_CHECK_SOFT) == 0) - if ((m = file_softmagic(ms, ubuf, nb, BINTEST, + if ((m = file_softmagic(ms, ubuf, nb, 0, BINTEST, looks_text)) != 0) { if ((ms->flags & MAGIC_DEBUG) != 0) (void)fprintf(stderr, "softmagic %d\n", m); Modified: stable/9/contrib/file/softmagic.c ============================================================================== --- stable/9/contrib/file/softmagic.c Tue Jun 24 19:04:32 2014 (r267827) +++ stable/9/contrib/file/softmagic.c Tue Jun 24 19:04:55 2014 (r267828) @@ -43,9 +43,9 @@ FILE_RCSID("@(#)$File: softmagic.c,v 1.1 private int match(struct magic_set *, struct magic *, uint32_t, - const unsigned char *, size_t, int, int); + const unsigned char *, size_t, int, int, int); private int mget(struct magic_set *, const unsigned char *, - struct magic *, size_t, unsigned int, int); + struct magic *, size_t, unsigned int, int, int); private int magiccheck(struct magic_set *, struct magic *); private int32_t mprint(struct magic_set *, struct magic *); private int32_t moffset(struct magic_set *, struct magic *); @@ -60,6 +60,7 @@ private void cvt_16(union VALUETYPE *, c private void cvt_32(union VALUETYPE *, const struct magic *); private void cvt_64(union VALUETYPE *, const struct magic *); +#define OFFSET_OOB(n, o, i) ((n) < (o) || (i) > ((n) - (o))) /* * softmagic - lookup one file in parsed, in-memory copy of database * Passed the name and FILE * of one file to be typed. @@ -67,13 +68,13 @@ private void cvt_64(union VALUETYPE *, c /*ARGSUSED1*/ /* nbytes passed for regularity, maybe need later */ protected int file_softmagic(struct magic_set *ms, const unsigned char *buf, size_t nbytes, - int mode, int text) + size_t level, int mode, int text) { struct mlist *ml; int rv; for (ml = ms->mlist->next; ml != ms->mlist; ml = ml->next) if ((rv = match(ms, ml->magic, ml->nmagic, buf, nbytes, mode, - text)) != 0) + text, level)) != 0) return rv; return 0; @@ -108,7 +109,8 @@ file_softmagic(struct magic_set *ms, con */ private int match(struct magic_set *ms, struct magic *magic, uint32_t nmagic, - const unsigned char *s, size_t nbytes, int mode, int text) + const unsigned char *s, size_t nbytes, int mode, int text, + int recursion_level) { uint32_t magindex = 0; unsigned int cont_level = 0; @@ -140,7 +142,7 @@ match(struct magic_set *ms, struct magic ms->line = m->lineno; /* if main entry matches, print it... */ - switch (mget(ms, s, m, nbytes, cont_level, text)) { + switch (mget(ms, s, m, nbytes, cont_level, text, recursion_level + 1)) { case -1: return -1; case 0: @@ -223,7 +225,7 @@ match(struct magic_set *ms, struct magic continue; } #endif - switch (mget(ms, s, m, nbytes, cont_level, text)) { + switch (mget(ms, s, m, nbytes, cont_level, text, recursion_level + 1)) { case -1: return -1; case 0: @@ -1018,12 +1020,18 @@ mcopy(struct magic_set *ms, union VALUET private int mget(struct magic_set *ms, const unsigned char *s, - struct magic *m, size_t nbytes, unsigned int cont_level, int text) + struct magic *m, size_t nbytes, unsigned int cont_level, int text, + int recursion_level) { uint32_t offset = ms->offset; uint32_t count = m->str_range; union VALUETYPE *p = &ms->ms_value; + if (recursion_level >= 20) { + file_error(ms, 0, "recursion nesting exceeded"); + return -1; + } + if (mcopy(ms, p, m->type, m->flag & INDIR, s, offset, nbytes, count) == -1) return -1; @@ -1073,7 +1081,7 @@ mget(struct magic_set *ms, const unsigne } switch (m->in_type) { case FILE_BYTE: - if (nbytes < (offset + 1)) + if (OFFSET_OOB(nbytes, offset, 1)) return 0; if (off) { switch (m->in_op & FILE_OPS_MASK) { @@ -1108,7 +1116,7 @@ mget(struct magic_set *ms, const unsigne offset = ~offset; break; case FILE_BESHORT: - if (nbytes < (offset + 2)) + if (OFFSET_OOB(nbytes, offset, 2)) return 0; if (off) { switch (m->in_op & FILE_OPS_MASK) { @@ -1160,7 +1168,7 @@ mget(struct magic_set *ms, const unsigne offset = ~offset; break; case FILE_LESHORT: - if (nbytes < (offset + 2)) + if (OFFSET_OOB(nbytes, offset, 2)) return 0; if (off) { switch (m->in_op & FILE_OPS_MASK) { @@ -1212,7 +1220,7 @@ mget(struct magic_set *ms, const unsigne offset = ~offset; break; case FILE_SHORT: - if (nbytes < (offset + 2)) + if (OFFSET_OOB(nbytes, offset, 2)) return 0; if (off) { switch (m->in_op & FILE_OPS_MASK) { @@ -1249,7 +1257,7 @@ mget(struct magic_set *ms, const unsigne break; case FILE_BELONG: case FILE_BEID3: - if (nbytes < (offset + 4)) + if (OFFSET_OOB(nbytes, offset, 4)) return 0; if (off) { switch (m->in_op & FILE_OPS_MASK) { @@ -1320,7 +1328,7 @@ mget(struct magic_set *ms, const unsigne break; case FILE_LELONG: case FILE_LEID3: - if (nbytes < (offset + 4)) + if (OFFSET_OOB(nbytes, offset, 4)) return 0; if (off) { switch (m->in_op & FILE_OPS_MASK) { @@ -1390,7 +1398,7 @@ mget(struct magic_set *ms, const unsigne offset = ~offset; break; case FILE_MELONG: - if (nbytes < (offset + 4)) + if (OFFSET_OOB(nbytes, offset, 4)) return 0; if (off) { switch (m->in_op & FILE_OPS_MASK) { @@ -1460,7 +1468,7 @@ mget(struct magic_set *ms, const unsigne offset = ~offset; break; case FILE_LONG: - if (nbytes < (offset + 4)) + if (OFFSET_OOB(nbytes, offset, 4)) return 0; if (off) { switch (m->in_op & FILE_OPS_MASK) { @@ -1527,14 +1535,14 @@ mget(struct magic_set *ms, const unsigne /* Verify we have enough data to match magic type */ switch (m->type) { case FILE_BYTE: - if (nbytes < (offset + 1)) /* should alway be true */ + if (OFFSET_OOB(nbytes, offset, 1)) return 0; break; case FILE_SHORT: case FILE_BESHORT: case FILE_LESHORT: - if (nbytes < (offset + 2)) + if (OFFSET_OOB(nbytes, offset, 2)) return 0; break; @@ -1553,21 +1561,21 @@ mget(struct magic_set *ms, const unsigne case FILE_FLOAT: case FILE_BEFLOAT: case FILE_LEFLOAT: - if (nbytes < (offset + 4)) + if (OFFSET_OOB(nbytes, offset, 4)) return 0; break; case FILE_DOUBLE: case FILE_BEDOUBLE: case FILE_LEDOUBLE: - if (nbytes < (offset + 8)) + if (OFFSET_OOB(nbytes, offset, 8)) return 0; break; case FILE_STRING: case FILE_PSTRING: case FILE_SEARCH: - if (nbytes < (offset + m->vallen)) + if (OFFSET_OOB(nbytes, offset, m->vallen)) return 0; break; @@ -1577,13 +1585,15 @@ mget(struct magic_set *ms, const unsigne break; case FILE_INDIRECT: + if (offset == 0) + return 0; if ((ms->flags & (MAGIC_MIME|MAGIC_APPLE)) == 0 && file_printf(ms, "%s", m->desc) == -1) return -1; if (nbytes < offset) return 0; return file_softmagic(ms, s + offset, nbytes - offset, - BINTEST, text); + recursion_level, BINTEST, text); case FILE_DEFAULT: /* nothing to check */ default: From owner-svn-src-stable@FreeBSD.ORG Tue Jun 24 19:04:59 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CDFC97B1; Tue, 24 Jun 2014 19:04:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1EA8A2D56; Tue, 24 Jun 2014 19:04:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5OJ4wf6089404; Tue, 24 Jun 2014 19:04:58 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5OJ4wNj089398; Tue, 24 Jun 2014 19:04:58 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201406241904.s5OJ4wNj089398@svn.freebsd.org> From: Xin LI Date: Tue, 24 Jun 2014 19:04:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267828 - in stable: 10/contrib/file 10/contrib/file/Magdir 8/contrib/file 9/contrib/file 9/contrib/file/Magdir X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2014 19:04:59 -0000 Author: delphij Date: Tue Jun 24 19:04:55 2014 New Revision: 267828 URL: http://svnweb.freebsd.org/changeset/base/267828 Log: Fix multiple vulnerabilities in file(1) and libmagic(3). Security: FreeBSD-SA-14:16.file Approved by: so Modified: stable/10/contrib/file/Magdir/commands stable/10/contrib/file/ascmagic.c stable/10/contrib/file/file.h stable/10/contrib/file/funcs.c stable/10/contrib/file/softmagic.c Changes in other areas also in this revision: Modified: stable/8/contrib/file/ascmagic.c stable/8/contrib/file/cdf.c stable/8/contrib/file/cdf.h stable/8/contrib/file/cdf_time.c stable/8/contrib/file/file.h stable/8/contrib/file/funcs.c stable/8/contrib/file/readcdf.c stable/8/contrib/file/softmagic.c stable/9/contrib/file/Magdir/commands stable/9/contrib/file/ascmagic.c stable/9/contrib/file/file.h stable/9/contrib/file/funcs.c stable/9/contrib/file/softmagic.c Modified: stable/10/contrib/file/Magdir/commands ============================================================================== --- stable/10/contrib/file/Magdir/commands Tue Jun 24 19:04:32 2014 (r267827) +++ stable/10/contrib/file/Magdir/commands Tue Jun 24 19:04:55 2014 (r267828) @@ -49,7 +49,8 @@ !:mime text/x-awk 0 string/wt #!\ /usr/bin/awk awk script text executable !:mime text/x-awk -0 regex =^\\s*BEGIN\\s*[{] awk script text +0 regex =^\\s{0,100}BEGIN\\s{0,100}[{] awk script text +!:strength - 12 # AT&T Bell Labs' Plan 9 shell 0 string/wt #!\ /bin/rc Plan 9 rc shell script text executable Modified: stable/10/contrib/file/ascmagic.c ============================================================================== --- stable/10/contrib/file/ascmagic.c Tue Jun 24 19:04:32 2014 (r267827) +++ stable/10/contrib/file/ascmagic.c Tue Jun 24 19:04:55 2014 (r267828) @@ -147,7 +147,7 @@ file_ascmagic_with_encoding(struct magic == NULL) goto done; if ((rv = file_softmagic(ms, utf8_buf, - (size_t)(utf8_end - utf8_buf), TEXTTEST, text)) == 0) + (size_t)(utf8_end - utf8_buf), 0, TEXTTEST, text)) == 0) rv = -1; } Modified: stable/10/contrib/file/file.h ============================================================================== --- stable/10/contrib/file/file.h Tue Jun 24 19:04:32 2014 (r267827) +++ stable/10/contrib/file/file.h Tue Jun 24 19:04:55 2014 (r267828) @@ -414,7 +414,7 @@ protected int file_encoding(struct magic unichar **, size_t *, const char **, const char **, const char **); protected int file_is_tar(struct magic_set *, const unsigned char *, size_t); protected int file_softmagic(struct magic_set *, const unsigned char *, size_t, - int, int); + size_t, int, int); protected struct mlist *file_apprentice(struct magic_set *, const char *, int); protected uint64_t file_signextend(struct magic_set *, struct magic *, uint64_t); Modified: stable/10/contrib/file/funcs.c ============================================================================== --- stable/10/contrib/file/funcs.c Tue Jun 24 19:04:32 2014 (r267827) +++ stable/10/contrib/file/funcs.c Tue Jun 24 19:04:55 2014 (r267828) @@ -228,7 +228,7 @@ file_buffer(struct magic_set *ms, int fd /* try soft magic tests */ if ((ms->flags & MAGIC_NO_CHECK_SOFT) == 0) - if ((m = file_softmagic(ms, ubuf, nb, BINTEST, + if ((m = file_softmagic(ms, ubuf, nb, 0, BINTEST, looks_text)) != 0) { if ((ms->flags & MAGIC_DEBUG) != 0) (void)fprintf(stderr, "softmagic %d\n", m); Modified: stable/10/contrib/file/softmagic.c ============================================================================== --- stable/10/contrib/file/softmagic.c Tue Jun 24 19:04:32 2014 (r267827) +++ stable/10/contrib/file/softmagic.c Tue Jun 24 19:04:55 2014 (r267828) @@ -43,9 +43,9 @@ FILE_RCSID("@(#)$File: softmagic.c,v 1.1 private int match(struct magic_set *, struct magic *, uint32_t, - const unsigned char *, size_t, int, int); + const unsigned char *, size_t, int, int, int); private int mget(struct magic_set *, const unsigned char *, - struct magic *, size_t, unsigned int, int); + struct magic *, size_t, unsigned int, int, int); private int magiccheck(struct magic_set *, struct magic *); private int32_t mprint(struct magic_set *, struct magic *); private int32_t moffset(struct magic_set *, struct magic *); @@ -60,6 +60,7 @@ private void cvt_16(union VALUETYPE *, c private void cvt_32(union VALUETYPE *, const struct magic *); private void cvt_64(union VALUETYPE *, const struct magic *); +#define OFFSET_OOB(n, o, i) ((n) < (o) || (i) > ((n) - (o))) /* * softmagic - lookup one file in parsed, in-memory copy of database * Passed the name and FILE * of one file to be typed. @@ -67,13 +68,13 @@ private void cvt_64(union VALUETYPE *, c /*ARGSUSED1*/ /* nbytes passed for regularity, maybe need later */ protected int file_softmagic(struct magic_set *ms, const unsigned char *buf, size_t nbytes, - int mode, int text) + size_t level, int mode, int text) { struct mlist *ml; int rv; for (ml = ms->mlist->next; ml != ms->mlist; ml = ml->next) if ((rv = match(ms, ml->magic, ml->nmagic, buf, nbytes, mode, - text)) != 0) + text, level)) != 0) return rv; return 0; @@ -108,7 +109,8 @@ file_softmagic(struct magic_set *ms, con */ private int match(struct magic_set *ms, struct magic *magic, uint32_t nmagic, - const unsigned char *s, size_t nbytes, int mode, int text) + const unsigned char *s, size_t nbytes, int mode, int text, + int recursion_level) { uint32_t magindex = 0; unsigned int cont_level = 0; @@ -140,7 +142,7 @@ match(struct magic_set *ms, struct magic ms->line = m->lineno; /* if main entry matches, print it... */ - switch (mget(ms, s, m, nbytes, cont_level, text)) { + switch (mget(ms, s, m, nbytes, cont_level, text, recursion_level + 1)) { case -1: return -1; case 0: @@ -223,7 +225,7 @@ match(struct magic_set *ms, struct magic continue; } #endif - switch (mget(ms, s, m, nbytes, cont_level, text)) { + switch (mget(ms, s, m, nbytes, cont_level, text, recursion_level + 1)) { case -1: return -1; case 0: @@ -1018,12 +1020,18 @@ mcopy(struct magic_set *ms, union VALUET private int mget(struct magic_set *ms, const unsigned char *s, - struct magic *m, size_t nbytes, unsigned int cont_level, int text) + struct magic *m, size_t nbytes, unsigned int cont_level, int text, + int recursion_level) { uint32_t offset = ms->offset; uint32_t count = m->str_range; union VALUETYPE *p = &ms->ms_value; + if (recursion_level >= 20) { + file_error(ms, 0, "recursion nesting exceeded"); + return -1; + } + if (mcopy(ms, p, m->type, m->flag & INDIR, s, offset, nbytes, count) == -1) return -1; @@ -1073,7 +1081,7 @@ mget(struct magic_set *ms, const unsigne } switch (m->in_type) { case FILE_BYTE: - if (nbytes < (offset + 1)) + if (OFFSET_OOB(nbytes, offset, 1)) return 0; if (off) { switch (m->in_op & FILE_OPS_MASK) { @@ -1108,7 +1116,7 @@ mget(struct magic_set *ms, const unsigne offset = ~offset; break; case FILE_BESHORT: - if (nbytes < (offset + 2)) + if (OFFSET_OOB(nbytes, offset, 2)) return 0; if (off) { switch (m->in_op & FILE_OPS_MASK) { @@ -1160,7 +1168,7 @@ mget(struct magic_set *ms, const unsigne offset = ~offset; break; case FILE_LESHORT: - if (nbytes < (offset + 2)) + if (OFFSET_OOB(nbytes, offset, 2)) return 0; if (off) { switch (m->in_op & FILE_OPS_MASK) { @@ -1212,7 +1220,7 @@ mget(struct magic_set *ms, const unsigne offset = ~offset; break; case FILE_SHORT: - if (nbytes < (offset + 2)) + if (OFFSET_OOB(nbytes, offset, 2)) return 0; if (off) { switch (m->in_op & FILE_OPS_MASK) { @@ -1249,7 +1257,7 @@ mget(struct magic_set *ms, const unsigne break; case FILE_BELONG: case FILE_BEID3: - if (nbytes < (offset + 4)) + if (OFFSET_OOB(nbytes, offset, 4)) return 0; if (off) { switch (m->in_op & FILE_OPS_MASK) { @@ -1320,7 +1328,7 @@ mget(struct magic_set *ms, const unsigne break; case FILE_LELONG: case FILE_LEID3: - if (nbytes < (offset + 4)) + if (OFFSET_OOB(nbytes, offset, 4)) return 0; if (off) { switch (m->in_op & FILE_OPS_MASK) { @@ -1390,7 +1398,7 @@ mget(struct magic_set *ms, const unsigne offset = ~offset; break; case FILE_MELONG: - if (nbytes < (offset + 4)) + if (OFFSET_OOB(nbytes, offset, 4)) return 0; if (off) { switch (m->in_op & FILE_OPS_MASK) { @@ -1460,7 +1468,7 @@ mget(struct magic_set *ms, const unsigne offset = ~offset; break; case FILE_LONG: - if (nbytes < (offset + 4)) + if (OFFSET_OOB(nbytes, offset, 4)) return 0; if (off) { switch (m->in_op & FILE_OPS_MASK) { @@ -1527,14 +1535,14 @@ mget(struct magic_set *ms, const unsigne /* Verify we have enough data to match magic type */ switch (m->type) { case FILE_BYTE: - if (nbytes < (offset + 1)) /* should alway be true */ + if (OFFSET_OOB(nbytes, offset, 1)) return 0; break; case FILE_SHORT: case FILE_BESHORT: case FILE_LESHORT: - if (nbytes < (offset + 2)) + if (OFFSET_OOB(nbytes, offset, 2)) return 0; break; @@ -1553,21 +1561,21 @@ mget(struct magic_set *ms, const unsigne case FILE_FLOAT: case FILE_BEFLOAT: case FILE_LEFLOAT: - if (nbytes < (offset + 4)) + if (OFFSET_OOB(nbytes, offset, 4)) return 0; break; case FILE_DOUBLE: case FILE_BEDOUBLE: case FILE_LEDOUBLE: - if (nbytes < (offset + 8)) + if (OFFSET_OOB(nbytes, offset, 8)) return 0; break; case FILE_STRING: case FILE_PSTRING: case FILE_SEARCH: - if (nbytes < (offset + m->vallen)) + if (OFFSET_OOB(nbytes, offset, m->vallen)) return 0; break; @@ -1577,13 +1585,15 @@ mget(struct magic_set *ms, const unsigne break; case FILE_INDIRECT: + if (offset == 0) + return 0; if ((ms->flags & (MAGIC_MIME|MAGIC_APPLE)) == 0 && file_printf(ms, "%s", m->desc) == -1) return -1; if (nbytes < offset) return 0; return file_softmagic(ms, s + offset, nbytes - offset, - BINTEST, text); + recursion_level, BINTEST, text); case FILE_DEFAULT: /* nothing to check */ default: From owner-svn-src-stable@FreeBSD.ORG Tue Jun 24 19:58:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F21426F; Tue, 24 Jun 2014 19:58:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B7E62679; Tue, 24 Jun 2014 19:58:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5OJwI6r014184; Tue, 24 Jun 2014 19:58:18 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5OJwIrq014183; Tue, 24 Jun 2014 19:58:18 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406241958.s5OJwIrq014183@svn.freebsd.org> From: John Baldwin Date: Tue, 24 Jun 2014 19:58:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267835 - stable/9/sys/dev/acpica X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2014 19:58:18 -0000 Author: jhb Date: Tue Jun 24 19:58:18 2014 New Revision: 267835 URL: http://svnweb.freebsd.org/changeset/base/267835 Log: MFC 253392: Workaround some broken BIOSes that specify edge-sensitive but active-low settings for ACPI-enumerated serial ports by forcing any IRQs that use an ISA IRQ value with these settings to active-high instead of active-low. This is known to occur with the BIOS on an Intel D2500CCE motherboard. Modified: stable/9/sys/dev/acpica/acpi_resource.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/acpica/acpi_resource.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_resource.c Tue Jun 24 19:42:37 2014 (r267834) +++ stable/9/sys/dev/acpica/acpi_resource.c Tue Jun 24 19:58:18 2014 (r267835) @@ -135,6 +135,17 @@ acpi_config_intr(device_t dev, ACPI_RESO default: panic("%s: bad resource type %u", __func__, res->Type); } + +#if defined(__amd64__) || defined(__i386__) + /* + * XXX: Certain BIOSes have buggy AML that specify an IRQ that is + * edge-sensitive and active-lo. However, edge-sensitive IRQs + * should be active-hi. Force IRQs with an ISA IRQ value to be + * active-hi instead. + */ + if (irq < 16 && trig == ACPI_EDGE_SENSITIVE && pol == ACPI_ACTIVE_LOW) + pol = ACPI_ACTIVE_HIGH; +#endif BUS_CONFIG_INTR(dev, irq, (trig == ACPI_EDGE_SENSITIVE) ? INTR_TRIGGER_EDGE : INTR_TRIGGER_LEVEL, (pol == ACPI_ACTIVE_HIGH) ? INTR_POLARITY_HIGH : INTR_POLARITY_LOW); From owner-svn-src-stable@FreeBSD.ORG Tue Jun 24 19:58:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EDAE3AA; Tue, 24 Jun 2014 19:58:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B7EC2684; Tue, 24 Jun 2014 19:58:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5OJwhPx014305; Tue, 24 Jun 2014 19:58:43 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5OJwhMU014304; Tue, 24 Jun 2014 19:58:43 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406241958.s5OJwhMU014304@svn.freebsd.org> From: John Baldwin Date: Tue, 24 Jun 2014 19:58:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r267836 - stable/8/sys/dev/acpica X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2014 19:58:43 -0000 Author: jhb Date: Tue Jun 24 19:58:42 2014 New Revision: 267836 URL: http://svnweb.freebsd.org/changeset/base/267836 Log: MFC 253392: Workaround some broken BIOSes that specify edge-sensitive but active-low settings for ACPI-enumerated serial ports by forcing any IRQs that use an ISA IRQ value with these settings to active-high instead of active-low. This is known to occur with the BIOS on an Intel D2500CCE motherboard. Modified: stable/8/sys/dev/acpica/acpi_resource.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/acpica/ (props changed) Modified: stable/8/sys/dev/acpica/acpi_resource.c ============================================================================== --- stable/8/sys/dev/acpica/acpi_resource.c Tue Jun 24 19:58:18 2014 (r267835) +++ stable/8/sys/dev/acpica/acpi_resource.c Tue Jun 24 19:58:42 2014 (r267836) @@ -134,6 +134,17 @@ acpi_config_intr(device_t dev, ACPI_RESO default: panic("%s: bad resource type %u", __func__, res->Type); } + +#if defined(__amd64__) || defined(__i386__) + /* + * XXX: Certain BIOSes have buggy AML that specify an IRQ that is + * edge-sensitive and active-lo. However, edge-sensitive IRQs + * should be active-hi. Force IRQs with an ISA IRQ value to be + * active-hi instead. + */ + if (irq < 16 && trig == ACPI_EDGE_SENSITIVE && pol == ACPI_ACTIVE_LOW) + pol = ACPI_ACTIVE_HIGH; +#endif BUS_CONFIG_INTR(dev, irq, (trig == ACPI_EDGE_SENSITIVE) ? INTR_TRIGGER_EDGE : INTR_TRIGGER_LEVEL, (pol == ACPI_ACTIVE_HIGH) ? INTR_POLARITY_HIGH : INTR_POLARITY_LOW); From owner-svn-src-stable@FreeBSD.ORG Wed Jun 25 00:10:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C320EFD5; Wed, 25 Jun 2014 00:10:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACB4C2F00; Wed, 25 Jun 2014 00:10:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5P0Afn6037319; Wed, 25 Jun 2014 00:10:41 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5P0Afxi037318; Wed, 25 Jun 2014 00:10:41 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406250010.s5P0Afxi037318@svn.freebsd.org> From: Glen Barber Date: Wed, 25 Jun 2014 00:10:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267846 - in stable: 10/release/doc/en_US.ISO8859-1/errata 9/release/doc/en_US.ISO8859-1/errata X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2014 00:10:41 -0000 Author: gjb Date: Wed Jun 25 00:10:41 2014 New Revision: 267846 URL: http://svnweb.freebsd.org/changeset/base/267846 Log: Document FreeBSD-SA-14:15.iconv and FreeBSD-SA-14:16.file Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Changes in other areas also in this revision: Modified: stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Tue Jun 24 22:15:27 2014 (r267845) +++ stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Wed Jun 25 00:10:41 2014 (r267846) @@ -201,6 +201,19 @@ 5 June 2014 Multiple vulnerabilities + + + SA-14:15.iconv + 24 June 2014 + NULL pointer dereference and out-of-bounds + array access + + + + SA-14:16.file + 24 June 2014 + Multiple vulnerabilities + From owner-svn-src-stable@FreeBSD.ORG Wed Jun 25 00:10:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1F272FD6; Wed, 25 Jun 2014 00:10:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B0EB2F01; Wed, 25 Jun 2014 00:10:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5P0Afrq037325; Wed, 25 Jun 2014 00:10:41 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5P0AfdU037324; Wed, 25 Jun 2014 00:10:41 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406250010.s5P0AfdU037324@svn.freebsd.org> From: Glen Barber Date: Wed, 25 Jun 2014 00:10:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267846 - in stable: 10/release/doc/en_US.ISO8859-1/errata 9/release/doc/en_US.ISO8859-1/errata X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2014 00:10:42 -0000 Author: gjb Date: Wed Jun 25 00:10:41 2014 New Revision: 267846 URL: http://svnweb.freebsd.org/changeset/base/267846 Log: Document FreeBSD-SA-14:15.iconv and FreeBSD-SA-14:16.file Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Changes in other areas also in this revision: Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Tue Jun 24 22:15:27 2014 (r267845) +++ stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Wed Jun 25 00:10:41 2014 (r267846) @@ -166,6 +166,12 @@ 5 June 2014 Multiple vulnerabilities + + + SA-14:16.file + 24 June 2014 + Multiple vulnerabilities + From owner-svn-src-stable@FreeBSD.ORG Wed Jun 25 02:14:55 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E8B4776F; Wed, 25 Jun 2014 02:14:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D29C329E2; Wed, 25 Jun 2014 02:14:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5P2EtQZ096105; Wed, 25 Jun 2014 02:14:55 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5P2EtY3096103; Wed, 25 Jun 2014 02:14:55 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201406250214.s5P2EtY3096103@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 25 Jun 2014 02:14:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267849 - in stable/10/sys: conf dev/cxgbe dev/cxgbe/firmware modules/cxgbe/t4_firmware modules/cxgbe/t5_firmware X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2014 02:14:56 -0000 Author: np Date: Wed Jun 25 02:14:55 2014 New Revision: 267849 URL: http://svnweb.freebsd.org/changeset/base/267849 Log: MFC r267757: cxgbe(4): Update the bundled T4 and T5 firmwares to versions 1.11.27.0 Obtained from: Chelsio Added: stable/10/sys/dev/cxgbe/firmware/t4fw-1.11.27.0.bin.uu - copied unchanged from r267757, head/sys/dev/cxgbe/firmware/t4fw-1.11.27.0.bin.uu stable/10/sys/dev/cxgbe/firmware/t5fw-1.11.27.0.bin.uu - copied unchanged from r267757, head/sys/dev/cxgbe/firmware/t5fw-1.11.27.0.bin.uu Deleted: stable/10/sys/dev/cxgbe/firmware/t4fw-1.9.12.0.bin.uu stable/10/sys/dev/cxgbe/firmware/t5fw-1.9.12.0.bin.uu Modified: stable/10/sys/conf/files stable/10/sys/dev/cxgbe/firmware/t4fw_cfg_uwire.txt stable/10/sys/dev/cxgbe/firmware/t4fw_interface.h stable/10/sys/dev/cxgbe/firmware/t5fw_cfg_uwire.txt stable/10/sys/dev/cxgbe/t4_sge.c stable/10/sys/modules/cxgbe/t4_firmware/Makefile stable/10/sys/modules/cxgbe/t5_firmware/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Wed Jun 25 00:33:30 2014 (r267848) +++ stable/10/sys/conf/files Wed Jun 25 02:14:55 2014 (r267849) @@ -1202,7 +1202,7 @@ t4fw.fwo optional cxgbe \ no-implicit-rule \ clean "t4fw.fwo" t4fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t4fw-1.9.12.0.bin.uu" \ + dependency "$S/dev/cxgbe/firmware/t4fw-1.11.27.0.bin.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t4fw.fw" @@ -1226,7 +1226,7 @@ t5fw.fwo optional cxgbe \ no-implicit-rule \ clean "t5fw.fwo" t5fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t5fw-1.9.12.0.bin.uu" \ + dependency "$S/dev/cxgbe/firmware/t5fw-1.11.27.0.bin.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t5fw.fw" Copied: stable/10/sys/dev/cxgbe/firmware/t4fw-1.11.27.0.bin.uu (from r267757, head/sys/dev/cxgbe/firmware/t4fw-1.11.27.0.bin.uu) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/cxgbe/firmware/t4fw-1.11.27.0.bin.uu Wed Jun 25 02:14:55 2014 (r267849, copy of r267757, head/sys/dev/cxgbe/firmware/t4fw-1.11.27.0.bin.uu) @@ -0,0 +1,9019 @@ +/*- + * Copyright (c) 2014 Chelsio Communications, Inc. + * All rights reserved. + * + * 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. + */ +begin-base64 644 t4fw +AAAD6QELGwAAAQkEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAA8wD2wPjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAENoZWxzaW8gRlcgUlVOTUVNIERFQlVHPTAgKEJ1aWx0IFdlZCBKdW4gMTggMTc6 +MTk6MzMgUERUIDIwMTQgb24gY2xlb3BhdHJhLmFzaWNkZXNpZ25lcnMuY29tOi9ob21lL2Zpcm13 +YXJlL2N2cy9mdy1yZWxlYXNlKSwgVmVyc2lvbiBUNHh4IDAxLjBiLjFiLjAwAAAAAAAAAG/bT/dg +AMgA4QB78AAQAADhADC4eP///x/84UCAAAAB4QB7cAAAEAAf//zc4QGUcCAAAADhAZwE4QB5AAAC +AEDhAHmAAAYAQAACAAoABgAK4QB5BAAMAACAAAEC4QB7POEAe0ThAHvk4gAAAAABAADhAHuQIAAA +AAAAgADhAHsAAABAAeEAe5wAAEAAREREQuAAAADjAARzREREQOMACAAgAAJcAAAAAB//khAAAAAA +H/+SFAAAAAAf/5IYAAAAAB//khwf/8AAAAAAAAAAAADAABL/zRP/zZMgEv/NE//NhCAEMwGTIBH/ +zBL/zJIQEf/MEv/MkhAR/8wB9DER/8siCv+SEADkMQAFMQECABL/yALnMQIWABH/x4EQAQFfwCEC +EQHJERH/xBL/xJIQEf/EEv/EkhBgAA8R/78S/8OSEBH/vxL/wpIQgRAR/8HAIJIREv/AkhLAIJIT +Ev+/khCCEALyUGUv9xH/vccvkhAR/7ySEBL/vBP/vJMgwDKTIRP/u5MigiIS/7oT/7qTICMiIRT/ +uQQzAck4E/+4gzADgxQIMxEU/7akM5MhE/+qkyJgAAjCMJMhE/+nkyIS/7GQIJAhkCKQI5AkkCWQ +JpAnkCiQKZAqkCuQLJAtkC6QLyAmECAmEYIiEv+kwDAtNzAtNzQtNzgtNzwjPQFyM+0AAgAS/6HA +MC83AC83EC83IC83MCM9AXIz7QACABL/l8AwKDcwKDc0KDc4KDc8Iz0BcjPtEv+VwDAnNwAnNxAn +NyAnNzAjPQFyM+0S/5AV/5AW/5HAMNcgBWYBYAAZAAAAAAAAAAQ2BQACANMP0w8FMwxuOxQHRxQH +BEN2MeYENgUFMwxvO+0AAgAS/4MV/4EjCgACJwIHBEMEPgUFMwwHRxRvO/ADAgAS/33JLoMghCGF +IrwidDsOhlC0VZYwtDN0M/Rj/+YAZT/iZV/fEv9xwDIDLgUDAgAS/2jAMCg3QCg3RCg3SCg3TCM9 +AXIz7QACABL/ay0nAMARAUkxAEgxAQIAwAAU/2gE0jEV/2eUUBT/ZwTTMRX/ZpRQFP9mBNQxFf9m +lFAU/2UE1TEV/2WUUBD/ZQMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf/AAA +H/wAAOMACfgf/AAAH/wAAOMACfgf/AAAH/wAAOMACfgf/4AAH/+KMOMACfgf/4owH/+KMOMAFCgf +/4owH/+KMOMAFCgf/4owH/+LuOMAFCgf/4u4H/+SCOMAFbAf/5IQH/+xHOMAHAgf/7EcH/+xHOMA +OxQf/8AAH//9yeMAOxQgAAAAIAABauMAeOAgAAF4IAABfOMAekwgAAF8IAABheMAelAgAAGYIAAB +nOMAelwgAAGcIAABpeMAemAgAAG4IAABvOMAemwgAAG8IAABxeMAenAgAAHYIAAB2OMAenwgAAHc +IAAB4uMAenwgAAH4IAAB+OMAeoQgAAH8IAAB/OMAeoQgAAIYIAACGOMAeoQgAAIcIAACHOMAeoQg +AAI4IAACOOMAeoQgAAI8IAACPOMAeoQgAAJYIAACWOMAeoQgAAJcIAACYuMAeoQgAAJ4IAACeOMA +eowgAAJ8IAACguMAeowgAAKYIAHZmeMAepQgAwAAIAMT/OMCUZggAxP8IAMT/OMCZZQgAxQAIAaQ +XOMCZZggBpBgIAaWEOMF4fggCAAAIAgOMOMF56ggCA4wIAkeUOMF9dggCR5QIAkfHOMHBfggCwAA +IAsAAOMHBsQgCwAAIAsAAOMHBsQgCwAAIAuPr+MHBsQAAAAAAAAAAAAAAAAgABGWIAARiCAAFXog +ABGIIAAU9SAAEYggABI9IAAUjSAAFBIgABGIIAATvSAAE3QgABMJIAARdSAAErQgABGIIAARiCAA +EYggABJcAAAAAP///////w/8///w////APwgAKejIACo4yAAqRMgAKjZIAComSAAqI8gAKhUIACo +SiAAqEAgAKfwIACpESAAp+YgAKfMAAAAAAAAAAAAAAAAAAAACgAAAAoAAAAUAAAACgAAAAoAAAAK +AAAACgAAAAoAAAAKAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAIAAwAEAAUABgAHAAgA +CQAKAA4AEQAVABkAHgAjAC0APABQAGQAyAEsAZAB9AAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAgAC +AAMAAwADAAMABAAEAAQABAAEAAUABQAFAAUABQAFAAYABgAHAAcAAAACAAAABgAAAAoAAAAOAAAA +FAAAABwAAAAoAAAAOAAAAFAAAABwAAAAoAAAAOAAAAFAAAABwAAAAoAAAAOAAAAFAQAABwAAAAoA +AAAOAAAAFAAAABwAAAAoAAAAOAAAAFAAAABwAAAAoAAAAOAAAAFAAAABwAAAAoAAAAOAAP8AAQIC +AAAAAAAAAAAAAAAQIEAAAAAAAAAAAAAAAAAABAACAAEAAIAAQAAgABAACCBAgAAAAAAAAAAAAAAA +AAAgCJ5CIAieQiAIngEgCJ3RIAidmiAInYAgCJ2AIAie9iAInvYgCJ2AIAie9iAInvYgCJ2AIAie +9iAInUwgCJ72IAie9iAInvYgCJ72IAie9iAInvYgCJ72IAie9iAInvYgCJ72IAie9iAInvYgCJ72 +IAie9iAInvYgCJ72IAidYSADCawAAAAAIAMJsAAAAAEgAwm4AAAAAgAAAAAAAAAAIAMJlAAAAAEg +AwmYAAAAAiADDbgAAAD/IAMHrAAAAP8gAwesAAAAACADDbgAAAAAIAMIvAAAAAEgAwjEAAAABCAD +CMwAAAAIIAMI2AAAACAgAwjoAAAAQCADCPAAAACAIAMI+AAAAQAgAwkAAAACACADCRQAAAQAIAMJ +KAAACAAgAwlAAAAQACADCVQAACAAIAMJZAAAQAAgAwlwAACAACADCYQAAQAAAAAAAAAAAAAgAwio +AAAAECADCLAAAAARIAMIkAAAAAAgAwiUAAAAASADCJgAAAACIAMIoAAAAAMAAAAAAAD//wAAAAAA +AP//IAMIEAAAAQAgAwgcAAAAgCADCCwAAABAIAMIPAAAACAgAwhMAAAAECADCFwAAAAIIAMIaAAA +AAQgAwh0AAAAAiADCIAAAAABAAAAAAAAAAAAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAA +AQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAABwAAAAcAAAAGAAAABgAMNQAAEEaq +ABRYVQAYagAAACtoAAAjgwAAGGoAAA0GAAALKgAAAAAAAAAAAAAAAAAAaCsAAGgrAABsggAAb5wA +AEpoAABKaAAATSkAAEpoAABO6gAATJgAAFI9AABPuAABhqAAAYagAAII1gACCNYAAgjVAAII1QAC +iwsAAosLAAII1QACtnIAArZyAAMNQAAEBgcAAAAAAAAAAAAAAAAgCRYVIAkWFSAJFgogCRX/IAkV +8SAJFekgCRXpIAkWGCAJFhggCRXpIAkWGCAJFhggCRXpIAkWGCAJFekgCRYYIAkWGCAJFhggCRYY +IAkWGCAJFhggCRYYIAkWGCAJFhggCRYYIAkWGCAJFhggCRYYIAkWGCAJFhggCRYYIAkWGAACAgUF +CAgLCw4OEREUFBcXGhodHSAgIyMmJikpLCwvLzIyNTU4ODs7AAAAAAAAAAEDEREICBAJAwEAAAAA +AAAgBLdgIAGTPCAANnggAWi8IAGPhCABiXwgAUegIAPaHB//6jQgAJRkIACppB//3RAgAGG8IABT +IAAAAAAAAAAAIAFqcCAAgbAAAAAAAAAAAB//1fQf/8V8H//ClB//wDAgAE4gIABGRCAAQoAgAKBk +H//j6CAGZ7gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAGbACABergg +ALNIIACyfB//8Ggf/9CgH//MOCAAfyggBRkwIAEoGCABB6QgAPCgIADkqCAA2CwgAMqkIAC2ICAE +uxggA/YcIAEcmCAEFzQgAccsIABhfAAAAAAgALOkIAWDDCAApyAgAXK4IAACmCAAmiQAAAAAAAAA +AB//87AgALNkIAP4zAAAAAAAAAAAIANWRCAAJtQgAB0MIAAlwAAAAAAgADFwIAAuyCAAK8gAAAAA +IAA2OCABIFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgADPIIAS3AAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAA1eCADXdAgADSAAAAAAAAAAAAAAAAAAAAAAAAA +AAQAAAAEAAAACAsAAAAgAxFQCAAAACADEVwIAAAAIAMRaAoAAAAgAxF0DAAAACADEYASAAAAIAMR +kA0AAAAgAxGkDgAAACADEbQTAAAAIAMRxAoAAAAgAxHYDgAAACADEeQYAAAAIAMR9A0AAAAgAxIQ +DgAAACADEiAQAAAAIAMSMBIAAAAgAxJEDgAAACADElgQAAAAIAMSaBEAAAAgAxJ8CgAAACADEpAL +AAAAIAMSnA0AAAAgAxKoFAAAACADErgKAAAAIAMS0A8AAAAgAxLcBgAAACADEuwGAAAAIAMS9AYA +AAAgAxL8BgAAACADEwQGAAAAIAMTDAkAAAAgAxMUBgAAACADEyAEAAAAIAMTKAYAAAAgAxMwCwAA +ACADEzgLAAAAIAMTRAQAAAAgAxMoBAAAACADE1AJAAAAIAMTWAkAAAAgAxNkAAAAAAAAAAANAAAA +IAMTcAoAAAAgAxOABgAAACADE4wCAAAAIAMTlAMAAAAgAw2MAQAAACADE5gAAAAAAAAAANdqpHjo +x7dWJCBw28G9zu71fA+vR4fGKqgwRhP9RpUBaYCY2ItE96///1uxiVzXvmuQESL9mHGTpnlDjkm0 +CCH2HiViwECzQCZeWlHptseq1i8QXQJEFFPYoeaB59P7yCHhzebDNwfW9NUNh0VaFO2p4+kF/O+j ++GdvAtmNKkyK//o5Qodx9oFtnWEi/eU4DKS+6kRL3s+p9rtLYL6/vHAom37G6qEn+tTvMIUEiB0F +2dTQOebbmeUfonz4xKxWZfQpIkRDKv+Xq5Qjp/yToDllW1nDjwzMkv/v9H2FhF3Rb6h+T/4s5uCj +AUMUTggRofdTfoK9OvI1KtfSu+uG05EHDBEWBwwRFgcMERYHDBEWBQkOFAUJDhQFCQ4UBQkOFAQL +EBcECxAXBAsQFwQLEBcGCg8VBgoPFQYKDxUGCg8VH//AAAAEACAgBpYQIAaZwB/83gAf/53UIAaW +QB//nuQf/6IwA4AAAIEAAAAf/6IgAP/4AAEAAAAAEAAAgQQBAIEEAAABBAAAAQQBAIAAAAAABf// +H/+FYAYAAAAqAAAAH//P+CAEMngCAAAAgBAAAEFAAABBQAEAgwAAAf//v/+/////H/+XcAQAAAgg +AwuggYAAAAwAAAAf/5Jg//8AAP//AP8AAQAAAAD//x//raAf/5q0D////x//n+gf/OIAH/+kHB// +oOQf/6OQH/+kFB/84ODg//4A4QGSAB//l+QA////H/+fnB//m/QEQQAIBAEACKUAAADAAAAAwAQA +ADAAAAAf/6AgAAAPoAAA/4AgBpBgIAtUYOEALgAf/6AUH/+b/B//oPAf/5xgH/+gQOAAAKDhADC4 +AACAAOEAYBAAAEAA4QIQAOECMADhAlAA4QJwAOEAEAgf/OFA4QB7cB//sNwf/7DUH/zgCB//sNgf +/7D0H/+w7B//sPAf/7EMH/+xBB//sQgf/53UH/+toCAGlkAf/N4AH/+e5AEAAAAf/6BgH/+fbB// +nAQf/6DsAAD/gAAAEIAf/5JgH/+g+B//oPQf/6FYBAAACAUAAACD/wAAgQAAAAAQAAAqAAAAIAAH +7CADCsgf/4lwH/+FYB//ojBnRSMB782riZi63P4QMlR2H/+AAAAAPyggAw2Mz////yALBhAQAAAA +P////wIAAABAAAAA//9//yALBzAf/6IgIAAhsCALB9AIAAAAAP///yALCEAgCwdg9////yALCjAg +AB5Y//7//yALFCAAIAAAAABAAAwAAAAAAP//AACAAA0AAAAgACRg//v//w/2gAAAA///AAAn/yAL +GFAgCxiAAAEAAAAEAAAfgAA/H/+feCAAMXAgADOEIAAuyCALGRAgCxmwIAAryCALGgAgCxqQBAEA +COAAAAAf/5+EUwAAAFIAAABRAAAAIAHRpB//nFggCx0wIAsdkCALHWAgCyAQH/+fnCALIGAf/5v8 +H/+fUCALIgAUAAAAgAAAAIAAAAJ4AAAAgAAABoAAsAAAAAoAAOMwkv//8ACAALEA4QGaAAACAAAg +CyHAH/+ZmAAAfkAf/5+IAP/AAB//n4wf/5LkKAAAACYAAAAgCyIwH/+TIAYAAAAFgAAAIAtoEB// +m8ArAAAAIABJCB//nVA1AAAAA4AAAAMAAAAH////AD///4BAAAAID///H////yAAAAAAAMAAPQAA +AB//mBAHAAAAgQQBAIEEAAAf/52wAAA6mMMAAAAAAA//AEMAAAAACAAEAAAAIAtocB//sFAf/63A +H/+XcAAGAADhAHoAH/+X4B//n3AgoAAAH/+cCB//newf/534IAtooAADB4AgC2kQH/+Z4ABAAAAA +AAkAAAAwAv/8+H/AAAAAo/+7AKP/ugDgAwAAg/+2AA////8P//gA/wAAACALaVAgCyQwIAskYCAL +aeAADwAAAAoAAP//AA8f/590A//AAIP/wAAgC2pgIAtq0B//oAQf/OIAH/+kHB//rjD/YPAAH/+u +EB//pCAf/5IgBIAACB//gFAARAAA/x///wDAAAAAAIEA8AAAAIGAAAD/f///H/zgdB//mrT/v/// +//8AAACAAAAAAIbdH/+TEB/84gzuAAAADwAAAB//n5Qf/6QYAAAPSB/84ggf/5gMH/+AYCAGkkAA +ADAAAAAnEB//3IAgC3LwH/+g5B//oEQAAP/+H/+b8N6tvu8gAwYQNAAAAD8AAAAAAIkGAJkAAB// +rXgQAAcCAcCAAB//rEiZAAAAH/+uNACIAAiCgAABH/+tyB//rNQDFQAAAxEAAAAPA/8gCyjQIAsp +MCALKYAgCyngIAspACAA30QgCyuAIAsrsCALLAAgCyxgIADk8CkAAAAgAOtsIAtzQCALc6AgC3QQ +8PDw8P8A/wCqqqqqzMzMzB//sEAAAB3gH/+uSCAA/EggC3SgIAt1EAAPQkAgBB3QH/+fzB//oDAA +CQAAAABIAIIAAAAgASBYIAt1kCALdgAACQAIH/+tPDAAAAAf/62IAAAIBgAAiMwAAIkUfwAAACAL +enAgC3sAAADgACALeLAgC3rQH/+ZnAAEA/8KAAAAH/+sZB//n0Af/5tgg/+3AIP/tiAgCzSw4QAA +ADMAAAAf/6xUH/+uhAP/4AAAP/aQAAAdKB//rZAD//AAIAtlYCALZSAgC2WAH/+vkCALNPAaAAAA +H/+b+CALNUAgAWAwH/+tjB//ncQAD///AADerR//rUAgC3uQH/+cICADB2Af/5wQH/+eBCAAZeAf +/5zsIAAFzB//mSwf/5esIAt8oB//nGwf/6L0H/+jgCALfPDABAAAH/+eECADDFAgAGbA4AEAACAL +fjAgCzhAIACkrCAAojAgC32wIAt+ACAGkGAf/5m8IAs5sOD//gAgC1iAH/+kLCALQfAf/5RIIAtM +wCALTVAgC1AAIAtQMEgAAAAgAaMgH/+dYCABpSQf/5hgH/+a9B//neQf/5tMAAAK4AAACOwf/54c +IAaWNB//m9Qf/5fk4QAuAB//nijhAF4A4QIOAP//v//hAA4A4QGOAP//vv8f/5v0IAGqQCABtmjg +BQAAA/8AAB//m5QgAwugPAAAAAAF//+DAAAAH/+a/CABy+wf/6BUIAtXoAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAgYAAAAAAAAD/////////////////////H//70B//+9Af//uYH//7mB//+5gf//uY +H//1KB//+FAf//asH//2rB//9qwgBmmoAAAAAAAAAAAAAAAAAAAAACAGbSggBm0oAAAAAAAAAAAA +AAAAAAAAACAGaaggBmmoH//5RB//+UQf//lEH//5RB//+UQf//lEAAAAACABq1gAAAAAAAAAAAAA +AAAAAAAAAgEAAAAAAAAAAAAAAAAAAAQAAAAAAAAAgYAAAAAAABAFAAAAAAAABAAAAAAAAAAAAAAA +AAAAAACBAAAAAAAAGAUAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAACAKABHyixPyi9MPA+YxAQIAFvKJF/KKd2sGkGC0Zndj+FQPBVWz +4A8UAGP/+QAAAGwQCCggBScgBykxBfgghhXgGUUA+QAOhWF3AQCKIhbyfP3k+gXgDJUA8Ve8DeAP +pQDq8ngbxwKAAKaIK4KeCnkKKZK//WANg6IAnQAogp0JiAHoFgUkDVGAACjSCPcADaiSAJ0AK2Ku +7PJtFYq5gAAqYq0swn/sqwEEc/0AAP1ACh4iAJ0ALtYI/UAKHiIAnQAvIBSk/w8PRy8kFPXgDF3S +AJ0AGfJfLiIWLCEpiBUf8l2uzJ+A6iIeLmfCgAD9AGYVoA0lAP0ARhXgC2UA7fJWHVYCgAALqgKL +FJqB6QAVBEBBAACJFQgAiig8EP0gxhXgTAUA/SDmFaAMRQDsuzYEyIEAAG25BQgAhgkCYe7yRxWg +h4AAiBXuAAUNzwKAAKmI6IwgJaQ1AAALyQxtmQIIAmEtISnTD+ohKCboBQAADQ1PLSUp/UAHdGIA +nQD/5HAF4AwVAPogqBXgHuUA6iIeLs1CgAD4ICYV4AgFAPggBhWgDQUA6BYCJdmBAABYfoL+4AAX +N8UBAPfAAEcwDZUA7eadKAQKgAD5gAVZUgCdAMAg0Q8AAADqJAAJ2ASAAOxEAAroBIAAWIBp0qDR +DwAAAADAsA+JNOnWCC32LgAA+kBoHaAbxQD8AAIdoA0VAFiDnmP/wQAA6iQACtgEgABYgerSoNEP +AP/5WA2gCAUA6iQAA9hhAAD8AAIdoA2VAFiDkmP/kcCgWa5sHfH/iNj5H/IIkA+lAGP/pNogWAti +Y/5wAAAAAAD8AAId4AoFAPpFJB2v/CoAiifrRAAKaASAAPtEABWgDAUAWHn90qDRDwAAAGwQBi4i +EJQR5SEaKtAEgAAmIAf2QSgV4B/FAOoWACrHwoAA/wJSDeFmAQAHCULxIHAN4oUBAGSB8tTwKSAF +/EBIFaAbhQD+ngANsBpFAPsgD5UiAJ0A5/HWHgvWAADl8dMbTwKAAPTADBISAJ0ApZktkp4Hagoq +or/3oBG7UgCdACmSnQqZAe6UAASOSYAAjCmLKgwHPgy7DPdgCQPiAJ0AKiBOLSBMsaj7oA3sIAsV +ACgkTiowASkiGPNADfaSAJ0AKyAHLSEk+GAkFaAMVQD9QAQFMLsRAOCqEQ3agoAAC6oCG/G7CogC +KiEHLCEJC90C+wYADHqqAQDr8bYdUwKAAArMAiohIpjgiCCc453kC6oCmuL9AAAUMAplAAqIApjh +LSIQneUsIDgb8av4ACIdoE0VAPnBJhWgzBkADNg5HfGnlOgMvTn5pgAOsAsFAJvnGPGanebt8ZsU +4AUAACwmGJvrmeroABUHSMEAAAkAiu3mDiHIQQAA7+YPJ3kBAAAJIIYPAmMJAIYPAmEMbhGl7urm +nSOAsYAAiCkvIDiniCgmCfPgCBeSAJ0AiRAJCUf5IAcBUgCdAMAg0Q+eEuokAAvYBIAAWILMjhL/ +TRAN4B/FAOwSASlQBIAA7RIAKdgEgABYf8XSoNEPAB7xcoro90AGOJIAnQAMaRGlmSuSnvdgBotS +AJ0AKZKdB2sKK7K/C5kBZJC/sKyc6O6UAAzzfgAAYAAsAAAAAADz3/BIUgCdAAlUDPSdABWv+AIA +AAAAAADrEgApUASAAFiBOtKg0Q8A6iQAA1hhAAD8ACIdoA1lAFiC5GP/aY0iwOQO3QL8QEYV7/1+ +AAAAAPhDqBWk2QEAANEEALwaDIgC+EOmFa/4xgCKJ40RwMDqrCAu2ASAAFh5UtKg0Q/aIFh/W2P+ ++QAA//c8DaAJBQDAoFmtqh7xPIro+V/5eJAfxQD//SgNoAkFAMCQwLoLqzT7wQYV7/zuAAAAAGwQ +DpUcKCIQLiIJJyE1KSAHIxYOKjIC/mCIFeANFQD8YGgdp7UBAOMhGiXb+QAAC9s5+iGmFeGZAQDn +/zYJt8KAAP7CUg3jqgEADg5C8cBwDeLTAQBk1GMmIAXB6Pn+AA8wF0UA9sAkHWIAnQCHIose9OX8 +DeAOhQArsAGfEfNgIScSAJ0AmRCZGpoUGPEO7fEOEjANAADmFgssrwKAAOhVCAzfgoAArbvrFgki +cAUAAIkanhiNG/UgBqoSAJ0AK1Kehhn9YAoj4gCdAC9SnSZivwb/AWT0ORnw/YmY9yAJmJIAnQAq +gq5koVIa8Pkjgq0qon8d8PYKOwHrFgUk2/0AAPpgCeYiAJ0Am9j6YB9mIgCdAIcphioMAz4HZgzy +wAmr4gCdACkaAPMiMg3g+vUAKyAWnBP7YAn9IgCdAIsRhsMqIDj34OYVoAYFAPfhJhWgRwUA++EG +FeCqGQAKdjkX8OeWFi0iFxbw5J36LSIbnfuJxAp2OZYX+WARSuIAnQCGHZ4f7BYDIw3ZgABgAQgZ +8M+JmGqRLosbKlKejxl7o0stUp0v8r8P3QGdFYYV6/DHFNP9AADvZAADAemAAJq4Zf8TYANKnh/8 +IGYVoAoFAFmtKxnwvomYGPC6jBPuEg8kjtsAAP//XA2gDwUAwKD6IKYVr/7mAB3wtcC6C5s0+6EG +Fe/+9gAAAAAA//sUDaAPBQCeHy8WEPwgZhWgCgUAWa0XGfCqjBMvEhCJmI4fGPCl+T/1cJIAnQBg +Ar3AoJoVixUW8KLA2g2dNO1mCC32JgAAYAKknh8vFhCcE+okAAnYBIAAWIHqjBMvEhDuEg8ldaGA +AGACWp4fLxYQ+kDwFaAMBQBYgcCMEy8SEO4SDy11ZgAAYAPHjheLE4gUjBH2IMgVr4oFACokOwyZ +DAhmApm0rNgG7gItIhDoJhspUASAAFiAZI4fjBMY8H76s6YVoQkFAHObDSsgFioK//tgBE0iAJ0A +iikrIDgPAgCjquomCSgECoAA82AEP5IAnQAmITUvwgQrIRopIhDm/zYN78KAAH/bCwoKQmSgBQsN +QmTQc/4gJhXgHYUA+f4ADvAKFQD6IaYVoAY1APYhhhWv9cYAiicvFhCLHuqsICpgBIAAWH0OLxIQ +mhMtIhv5QIgV7/zeAAAAAAAAAOogByngBIAAWIFvGPBTjBP+IegVr/2eANogWH5rGPBOjBOOH/pB +KBWv/bYAcZ6ICr8M//0AFe/+CgCLFIoWLSIQGfBUC6oCG/BUCmgChh0a8EsJiALp8EobCz4AACMW +ESUWEiYgB4XAIyEH9kEkFeBmEQDrVQELMoKAAPamAAq6MwEA5iEiKZsCgAADdwIKVQIjISQJZgKV +8IUgl/OW8v3gphXjmAEA6PYGLMoCgAAJOQLjEhEiU/kAAOn2BCquAoAA5eUCBkCBAADl9gEnyMEA +AOUSEiIUNQAAbakFCACGCQJhJiAUpGYGBkcmJBT0wAg10gCdAIgY+LOmFaEHBQDy4fIN4Pn1ACsg +FvlgCM1iAJ0AKiIXsarqJhchgKmAAIwpKyA4o8ycKfNgB5+SAJ0AjR1l0M/AINEPLyBOZPvZDngC ++EBGFaAAhgAAAAAAAPMf3MBSAJ0ADj8M//0AFe/uNgAAAAAAAOsSDilQBIAA7RIMKmAEgABYfkvS +oNEPAOsSDClQBIAAWH/W0qDRDwD6QGgdoBvFAPwAIh2gDRUAWIGAY//BixD6QGgdoAwVAO0SCyXY +YQAAWIF6Y/+pAAAmIDtkYHHqJAAOWASAAPwgKBWviQUA6SQ7LHAEgABYf8P6IQYVoAsFACsmG/pH +Zh3v+84AAAAAAOsSBSlQBIAAWAk/Y/7viifrRAAKaASAAPtEABWgDAUAWHff0qDRDwDaIFh96WP/ +COogByngBIAAWIDlY/7cAAAnIQklFhIjFhEkFhMmIAeEwCMhJPRA5BXgZhEA60QBCzKCgAAGRAIK +RAL2REQVqrUBAOsiBy3TAoAACncCCWYCKrEVmhKU8IUgl/OW8v3gphXjSAEA6PYGKiICgAAEMwLj +9gQl2IEAAPQiaBWvwwUAA7sBIxIR66kICq4CgAAF5QLl9gEmYIEAAOUSEiTJAQAA6ctDfkAEgAAt +TP4M1hGmhuaTO3fgwQAA9J/v8RIAnQBt2QUIAIYMAmFj/e2LEPpAaB2gDBUA+2JAFeANBQBYgSdj +/loAAAD7jwAMP/72AAidDA1JFG2ZBQgghgwCY+/aCAXBAQAA6UwMBUjBAAD1n+1BEgCdACvM/m25 +BQhAhgkCZWP9lAAAbBAGKCAFHO+C997+BeAaRQD7AAqdIgCdACsgTonIsLsrJE73IAjIkgCdAC5y +ru3veRcRcYAAK3KtLdJ/DbsB5rQABZEpgACwnu7GCCWIOYAALyAUs/8PD0cvJBT14BDF0gCdAC4g +c/hDqBXv+vUA+8AEANALFQDguBoHaAUAAPsXAA003QEALSRzCYgBCLg5CpkB6SYdLAcOAACKInyn +BCggTsmPfacIKyBMKSBOe5MUzGwsIBTtIgIuWBwAAGTRycAg0Q8AjifH8w+vAe8mAidQwQAAWG6V +4+9dFQE5gAAooADTD9MPA4gKKIIQ7KAHLVgEgAD6QGgdoA1FAAuAAGWv3Ikn0w9kn6YqmRTKp4qZ +ZK+cKKAAA4gKKIIQ7KAHLVgEgAD6QGgdoA01AAuAAGWv4GP/egAA//9UDaAKBQDAoFmroBzvMonI ++T/26JIAnQDAYCkgFLOZ+EKGHe/8HgAAAAAAAAAA6iQACtgEgABYfwjSoNEPACogBSsgB8HU/UAO +ZWG7AQAFBUf4oA55UgCdAJMQjTadEu3vHB2YBIAA9WAJihIAnQAMuhGnqi6invfADZzSAJ0AKqKd +DbwKLMK/DKoBZKE9+kAIFeAMFQBYILcd7xEpIQkY7xErISIvIAce7xssIST5ZgANsP8RAOgSAi/6 +goAAD8wCDswCLKYAjiCbovlAphWgDyUA6aYDL3YCgAAP7gL/QCYVoAkFAO0AFQVQYQAAsZnqgx4M +j+gAAAw5EfcgAETwCKUAKJad9L/yuRIAnQCKJ+tEAApoBIAA+0QAFaAMBQBYdvtj/jr/92wNoAsF +AMC6C5s068YIK28GAABj/tvqJAALWASAAFgIS/3dxgWv93YAiifAsPtEABWgDBUAWH+KGe7umaD+ +QAgVoBvFAPnd2AWgDBUA+UBGFaANFQD9wAAXMAgVAOjuAg14BIAA7vYBKVAEgABYgGHAINEPicj3 +IASgkgCdAAw6EaeqLqKe98AFVNIAnQAqop0NPgou4r8OqgFkoJiwn5/IZa7BiCLrFgEkBOGAAPi/ +7DlSAJ0AiicrCgD7RAAVoAwVAFh7aosQHu7KnqCMIB3uyp2i/YAAFjANFQANzAKcoYu2+0BmFe/1 +SgAAAADrVAAJUASAAFh+jmP9PI8z/iBGFe/41gD/+WQNoAoFAPogJhXgCgUAWasSHO6liciLER3u +ovk/+riSAJ0A//3IDaAKBQAAwKDAigiYNPmBBhWv/YoAAAAA6iQABdhhAAD8ACIdoA2lAFiAJmP/ +UQAAbBAEKCAU74seahgEgACKJ/pgaB3gDAUA6qwgKegEgABYdpnSoNEPAIsic75LFO6IikhqoUcb +7oQssq7Kxx3uhSyyrS3Sfw3LAX3AG7Cunkh9wCEvIBTvJBQv2tAAANogWAfjY/+nwLDAigioNOhG +CC3/FgAAiSLJlcAg0Q/AoFmq4YpIa6GtY//qAAAAAAAA+kBoHaAbxQD8ACIdoA0VAFh//MAg0Q8A +bBAILCIPLyAHKCE0JzIH/kNEFafVAQD5v8AV4AsVAOm5OQmwBIAA6yIJKlAEgAD4IIYV4AQVAOh3 +Ng9PwoAA9yJSDeH/AQALCULxIHAN4o4BAGSCcsG07HsfDpR0AAAsIE/pIE0mYAUAAAwMRywkT/0g +FKOiAJ0ALCAF+4AS/WIAnQCNIvogBhWv+zUA/WAOWOIAnQAoIhmOMvnAFNUiAJ0AiTgY7kMc7j/k +kmJv34KAAJoQmBGsu+juOhVIDQAAmRPrFgIvpwKAAKhE9eANIhIAnQCLEypCnvtAGxviAJ0AihIp +Qp3TDyqivwqZAe6UAASScYAAjCmLKgwFPtMPDLsM9WAJ2+IAnQAtGgD1ofIN4Pj1ACsgFvlgGXUi +AJ0ALCEiGe41KCEHKiEkKyEJ/EDwFeqIAQDpqgIMQwKAAAi7AhnuLhjuHw0tQOnMAg7qgoAACN0C +neCJIJzimuT7wGYV4ApVAOvuJhzOAoAACpkCmeGIL5jlLCA498EGFeANBQD9wOYV4AolAP3cPAXg +SSUA+MCIFaDMGQAMmjmY6QzbOY1lneod7hj8wMgVoAkFAOzmCyOH4YAACpwQDcwCnOyMEYlol++Z +7ohpKOYQjWot5hHsABUHSSEAAAkAiohn+OALo6IAnQAf7f0KvQIP3QKd5sDF/JOmFaEJBQD1IfIN +4Pj1ACsgFvlgE6UiAJ0ALCIZiikrIE8pIDjlqggGYAUAAOwmGSXb/QAAKyRPminzIA+PkgCdAIsU +ZbHvwCDRD58VnxaeF+okAArYBIAAWH8njhfvEgUldZGAAIwUZc/biifbMOwSACVQwQAAWHpEwCDR +DxrtzYqo90AQiJIAnQCMEytCnv1gEUOiAJ0AixIpQp0rsr8d7cQLmQHkkhRlY/0AAJzY7pQADPJm +AABgAI4oIDnxH/gOEgCdAP/75A2gCRUAAAAAAPOf7EhSAJ0ACecM9v2AFe/1+gAAAADBs3vJFCkg +OpoQ/iDGFeAM9QD9IBD9IgCdAOokAArYBIAAWH2K0qDRDwDwABgNoBrVAMChjDcrIQmNOI4y668R +Dd0CgAAPuwLkuwIJUASAAFh9bsAg0Q8AAAD//1gNoBqFAOokAAfYYQAA/CBoFeAMFQBYfyZj/wUA +AAq4ApjmwNX8k6YV4QwFAHXLDSsgFikK//lgDjViAJ0AihRkoV2LaoxnimmrewfMDJxn92DSDeAO +BQCxqoxlm2qLZppprOqre3e7AbGqjimbZpplLSA4pe6eKfOgCjeSAJ0AiScomRTKgouZyb4Z7Yco +sACfFZ8WCYgKKIIQLLAH+kBoHaANNQALgACPFYsix6P7X/KA4gCdACghNIdnLiEaii+LKeh3Ng9n +woAAd8sKCwlCyJQOC0JksLTB1Pr+AA6wDBUA/CCGFa/yrgDaIFh7emP+Coon6qwwK1gEgABYZwXS +oNEPAAD/8qgNoAkFAAAAnxWfFp4X+kDwFaAMBQBYfoKOF+8SBS1l/gAA6iQAB9hJAAD8ACIdoA0F +AFh+3WP94AAAAAAA6iAHKuAEgABYfmFj/YGfFf4gxhXgCgUAWamwGu1DiqiPFflf7tiSAJ0A//fg +DaAJBQDAkBztPcC6C6s0+4EGFe/3mgAAAAAA81/6OFIAnQAJ5wz2/YAV7/zyAIonnxXvFgYp2ASA +AOwSACVQwQAAWHmk1qD+IKgV7/oWAJ8V7xYGKVAEgABYe0L+IKgV7/q2AAAAwVP6QGgdoAsFAPwA +Ah2gDTUAWHPXKyAFjxaKEPV/2oViAJ0AY/0hnxWfFuogByrgBIAAWH4y/iCoFe/4rgAAAABsEA6T +HJUaiC+KKS4hGichNC8yBPhA8BXntQEA+3/AFeANFQAL2znrFgsp4ASAAPfhAA/xmQEA5yAFLzfC +gAD+wfIN4qoBAPFAcA3ibgEAZGRBwaQI+o364CNNIgCdAI4iixz1xFwN4AqFACuwAZ8S82AgVxIA +nQCZEZkYGOz06+z0EmgNAADtFgksrwKAAOhVCAzXgoAAq6rqFgcicAUAAIYYnhaLGfTABeoSAJ0A +KlKehhf7QAlj4gCdAC9SnSZivwb/AWT0IRns44mY9yAI4JIAnQAqgq5koTka7N8jgq0qon8d7NwK +OwHrFgMk2/0AAPpgCR4iAJ0Am9j6YB6mIgCdAIcphioMAz4HZgzywAjj4gCdACkaAPMiMg3g+vUA +KyAWnBD7YAklIgCdABvs4CkgOPvZvAWgBgUA9+DmFaBHBQD9gIgV4JkZAAl2OQm6OYsSmhSWFf1g +EdLiAJ0AhhtkYdNgAQMZ7LuJmGqRLosZKlKejxd7o0stUp0v8r8P3QGdE4YT6+yzFNP9AADvZAAD +AemAAJq4Zf8rYANKnh38IAYVoAoFAFmpFxnsqomYjBAY7KbuEg0kjtsAAP//XA2gDwUAwKD6IGYV +r/7mAB3socC6C5s0+6EGFe/+9gAAAAAA//t0DaAPBQAAnh2fHvwgBhWgCgUAWakDGeyWjBCPHomY +jh0Y7JH5P/Y4kgCdAGACvsCgmhOLExbsjsDaDZ007WYILfbuAABgAqWeHZ8enBDqJAAJ2ASAAFh9 +1owQjx7uEg0ldnmAAGACXZ4dnx76QPAVoAwFAFh9rYwQjx7uEg0tdk4AAGADxJwQ/iGmFa+JBQDp +JDsmOEEAAAcAhucSAiewgQAABgJhjceX+IrEicatfQeqDJrEd9sJnh3sFgAkyAUAAIwSixCGFY4U +mbadtwbuAu0iDylQBIAAWHxIjh0Y7GKMEPqzphWhBwUAc3sIKyAWKQr/ebl+iikrIDijquomCSgE +CoAA82AEJ5IAnQAmITSPxCshGokv5v82De/CgAB/2woKCkLIpAsNQmTQc/4gRhXgHUUA+f4ADvAK +FQD6IWYVoAY1APYhRhWv9cYAAAAAAACeHYonnx6LHOqsICpgBIAAWHjy7xIOLWAEgAD+IagVr/xS +AOogByngBIAAWH1VjBAY7Dj+IagVr/22ANogWHpRjBAY7DSOHfpBKBWv/cIAcZ6ICr8M//2AFe/+ +CgAX7DYb7DYd7DsGqQKGGxrsOu2ZAgZAQQAA5WFUZ+iBAAAlFhCTHyUgB4PABSVA6jMBCqqCgAAF +MwIHMwInIQcqISImIQn0QegV6ncBAOuqAgu7AoAAB2YCJyEkk/CDIJbzmfaa8vXgphXjqQEA5RIQ +LVICgAAKdwLn9gQpngKAAAPjAuP2ASJT/QAA4xIPIgw1AABtqQUIAIYNAmEmIBSkZgYGRyYkFPTA +CB3SAJ0AiBb4s6YVoQcFAPLh8g3g+fUAKyAW+WAItWIAnQDIP4spKiA4o7ubKfNAB9+SAJ0AjBtl +wNfAINEPLSBOZNvzCugC+EBGFaAAhgAAAAAAAPMf3dBSAJ0ACu8M//2AFe/uvgAAAAAAAOsSDClQ +BIAA7RIKKmAEgABYejfSoNEPAOsSCilQBIAAWHvC0qDRDwD6QGgdoBvFAPwAIh2gDRUAWH1sY//B +ixH6QGgdoAwVAO0SCSXYYQAAWH1mY/+pAAAAAAAmIDtkYHcr+oArJDvsEgIuWASAAAgghg0CY+z2 +CCzwBIAA7SIPKVAEgABYe6v6IMYVoAwFAPxHZh2v+8oA6xIDKVAEgABYBSlj/vKKJ+tEAApoBIAA ++0QAFaAMBQBYc8nSoNEPANogWHnTY/8A6iAHKeAEgABYfM9j/t8AAAAnIQckFhEmIAeEwJMf8kRE +FeBmEQDqRAELMoKAAAZEAhbrsiwhJIonBkQCJiEJ+mYACfp3AQDroRUruwKAAAdmAocvlPCEIJf1 +k/L34GYVozkBAOn2BimaAoAAA8wC4xIPKiYCgAAE5ALs9gQlUIEAAPXgJhWvzAUADKoBqrzkEhEm +YQEAAOyLPXxIBIAAsEgMhhGmlnbDNvSf8IiSAJ0AbYkFCUCGDQJlY/4AixH6QGgdoAwVAPtiQBXg +DQUAWH0VY/5iAAAA+w8ADP//DgAJzAwMSBRtiQUJYIYNAmfvzQgFSQEAAOhMDAbAgQAA9Z/t2JIA +nQCwzm3pBQmAhggCaWP9qAAAAGwQBiggBSMgByQKA/0PQERRMwEAKCAiZIBvAioCWHGQ/UzAgNAN +FQAsICEY62UPAgDsMxEGfVaAAKgzKTKeDwIAbpNFKzKdZLA/+kAIFaD+5QAOzgH9xgAO8A8FAPxE +Jh3gCQUA+CAGFeAMBQD4ICYV4A6VAPggRhXgDQUAWHeu9HOmFaACBQDRD8Ag0Q8AAGwQCiogBfhA +8BXgDBUA+GBoHae1AQDoFgAl2/kAAOvLOQoYBIAA6xYFLCAEgAD9QcAEUZkBAMHD/UAf5SIAnQCN +Iu/rPB6b3gAA6+s5EbARAADmFgQs94KAAK/u7hYDLNcCgACrquoWByzABIAAhxf1AAQiEgCdAIoU +J3KehhOPF/rgB1uiAJ0AJmK/L/KdBv8B7xYGJ5nRgAAlIRuKQocphioFpTb1TwAOcQsFAHyzAdWg +mBoHZgz0wAXj4gCdACoaAPVCMg3g/PUAKyAWmBr9YAX9IgCdAIpC+qAOeqIAnQCMFRvrLodDmBrr +dwEGCPmAAGAAtgAAGusQiqjoFgolDN+AAIsXjBSGEyuyno8XJmK/fLNDL/KdHOsHBv8B5PA5ZVv9 +AACbyO8WBi/7bgAAYAKbAAAAAPghZhXgCgUAWadqGur9iqiJG+gSCiUO3wAA//9MDaAPBQDA8Bzq +98C6C6s0+4EGFe//BgAAAAAA//x4DaAPBQCZG+okAArYBIAAWHw+iRvoEgoleamAAGACLgCZG/pA +8BWgDAUAWHwViRvoEgoteZYAAGADEvDgBIhSAJ0ALSEajCmXGPghRhWi7QEA6RYLLwQWAACXGPgh +RhWi7AEA6RYLJwOBgACYGukWCy7/woAAdfteDtUM+dXYBaC36QDmQgMt3IKAAAt5ApkYCGYB9oBm +FaABAgCKJ5kbKxIA6qwgKeAEgABYd3aJG/ghSBWgCyUA66QCLSAEgADqogIoBAqAAPL/+7hSAJ0A +jCmXGJgamRuOGI8W5a0MClgEgADlzAgJUASAAO1GAiroBIAA7CYJKeAEgABYd5GIGokbjxf786YV +oQ4FAHXrCCsgFiYK/3a5DMCh+iCmFa/3dgAAAADqIAcq4ASAAFh7v4kb+CFIFa//igCPKRjqvYkW +pf+fKYxDi0CNFefEAATIgQAA/A4ABTfrAQDuFgEuiKYAACcgBwcHQQh3Cidyn+6tEA1TwoAA7aoC +AkBBAADqdwEB0/0AAOfHAgGMPQAAbakFCACGCQJhi0DAgJgSGeqoGuqnLyEahhYe6qQkIQcY6qH8 +ICgVodcxAP+gAEa6RAEA7dCAKicCgADszA8mcEEAAPiGAAo0zB0A5GYAJmAFAAAMPAwU6nwNXQyI +IJ9ml2eeY51lDKQ5CYkC6WYELEYCgADkZgIh0AUAAAioAphhJiAU42YIDSAEgADmJBQoBAqAAPNg +BAqSAJ0AiBf1E6YVoQcFAPTh8g3g+fUAKyAW+WAFDWIAnQCIEtKA0Q+KFWSgosAg0Q8AAAAAAADq +JAAE2GEAAPwgiBXgDBUAWHvmY//aiif8ISYVp9tBAOqsICgECoAA9aAEYdIAnQCMFisKAezMICno +BIAAWHJYmhL6gAgV7/vuAACLFuxNEQlQBIAA/WAARfAMFQBYcDr0gGAVr/2qAGW8BPlf4AjSAJ0A +LyAg8f/ft5IAnQBj/3QAAAAAAAAA6iAHKuAEgABYe0+IEtKA0Q+KJ9ww6xIAJVCBAABYduDAsvtA +Rh3gAgUA0Q8AAAAA6zQADjgEgAD8YGgd4AwFAFhyNdtA7DQACugEgADqFgIr8ASAAO8SBilQBIAA +WHb/+oAIFe/7HgDqJAAE2EkAAPwAIh2gDQUAWHuqY/7qAABsEAiSFJMVGeoliED4IEYVr8sFAOsq +AQJwIQAA+iBmFaeIQQDkgcBiUBEAAI8TLSEFqYwswACv3wTMC+/8QC5YBIAA/4ANiuIAnQD6ICYV +oGgBAP4AIh3gDQUABv04C98L690KB9ghAACCFZ4Q+QAARXAMJQDyQQAV4A8FAPJAgBWgAg4AjRQO +VQz/4CAVoAMFAO/kAARABQAA8Q5gDeB+AQCGEyKgAC3RBQQiC+bWCAlYBIAA4hYGIzEBAAD2QAZ6 +ogCdAAgGQPIAIh2gDQUABi04C9IL690KAVghAAD3IBAVoAIVAAcjOIcVB2YLF+n8pzcncKAGMgoG +MwvsfAgBmCEAAI7QCwCJBe42LiYAAwCLItIA6qwBJMgFAAD0X/sj4gCdAAUpDA4qDPugBhWgBxUA +9WAoFeAGBQAJdjgIaAgisgAF5QgltgF+WwIiLAHitgAmfRKAABbp44sSHuni5rYBB5AFAAAGIgKG +Fe67AQxuAoAADbsCkmD6gAYV4SwdANEPixD8ICgV7/1SAAAA/E8ADf/8xgCFFRnpswXFC/gAChXg +AgUAsSLlgx4JD+gAAB3pzIYSGunM7W0BB9gFAAANuwKNFepmAQxOAoAACWYC69YAJhAFAAD2gAYV +oSIdANEPAAAAAOoWAS1oBIAA+8BoHe/51gD9jwAN//k+AGwQDPhASBWgCgUA6yAHKcgEgADygGgd +58UBAP2fwBWgBBUA7Ew5DLgEgAD8ISYVobsBAPMbXA3gDAUAmhacFZkTmxSbGy4gFhXphB3phB/p +p+8WCC3HgoAA7YgIDacCgAClRB3poygWCvnS+gWg//UAf+ETAioCWCvgGOl5Hemc6hYIJSn5gABg +ABcAAGZjy/jAHyiQ+vUAKSAW+yAZTSIAnQCJiPcgBhCSAJ0AK1KuHOltZLDRLMJ/K1KtDLsBZLDH +sJmZiBzpi2SzSyzAgCzMN/4haBWkzB0ArDzrFgImYB0AAPXABYISAJ0ALkKe/cAIK6IAnQCMGitC +nSzCvwy7AesWACWZUYAAKnEMiXeZEf1ADpxiAJ0ALHAQ63IDJglBgAD5n/so0gCdAC5yA2Tg0I8W +ZfGuhhGPGI0U7hIAKVAEgADm/zYL2ASAAO8WASngBIAAWClqGOlCHell568ubTAEgABgAvIAAMCg +WaWpGOk8iYgd6V75P/mIkgCdAP/9CA2gCwUAwLDAqgqZNPkBBhXv/M4AAGqRJCtCnnyzQYwaK0Kd +LMK/DLsB5LA1ZPP9AAD/AQYVr/0qAAAAAAD8IaYVoAoFAFmlkhjpJYmIHelI7BINJI8TAAD//IwN +oAsFAMCwwPoPnzT/AQYV7/xSAAAAAAAAAP/8GA2gCwUAAAAAihjAsZsW+V/5KuIAnQDA4J4W+V/4 +yuIAnQDrdAAJUASAAO0SCSngBIAAWCmm/gAiHeAHFQDnFgktOASAAP9AZhXv+7oAZLBJjxX+ACId +oAwFAA/sOGTAiogRhhjqJAAL2ASAAO0SBCngBIAA6GY2CPAEgADmFgEg+BEAAFgqMujo9x0wBIAA +/dIyBe/3/gAAAACLGA8CAPlhVg3gDAUAeaMCLAoB+AAiHeAOBQAMnjjsFgUnfKGAAOt0AAlQBIAA +7RIJKeAEgABYKtH3QGgd4AsVAPohJhXgChUA+uBmFa/9pgCLEBXo/CohB4lwHOj4/9G+BeqqAQD/ +QAAVOJkBAOyqAgTAPQAA/CEoFaSIHQDqtgAkQAkAAAg4DI4gmbPoXzkBs/0AAO+2Ai92AoAA7m4C +BahBAADutgEuDtYAACgSA+iMICGUVQAA6jz+KsgEgABtqQUIAIYJAmErPP4MuxGrW5sQKCAULCAE +o4j1gAihEgCdAAgJRykkFPUgCjZSAJ0AiHIoJhwpcgHoFgctqASAAPMgCjBSAJ0A8TYYDeAHBQCn +ZiZGnSogFisK/3uhCusSASlQBIAAWC32jBllwOPAINEP6xIBKVAEgABYLfEuIBYY6KL90YoF4P/1 +AP/f5RxiAJ0AY/yHiBllj9IqcBDbcPxgaB2gCRUA+1/gFaANBQDqnTgJUASAAFgoXcAg0Q8AAAD6 +QGgdoBvFAPwAIh2gDRUAWHoeY/+9AAAd6LEt0IDrEgQm6N0AAPpAaB2k3R0A/GAARvAMFQDt3Acl +2GEAAFh6E2P/jy4gFi8K///f+vRiAJ0A6xIBKVAEgABYLcnAINEPixAMbBGsu/ogBhXv+5IAKCQU +jXDxv/i6kgCdAPpAaB2gDAUAWG5o9sBgFa/8EgCKJ+s0AAnoBIAA+0QAFaAMBQBYcHfSoNEPAAAA +AAAAAOsSAilQBIAAWAHL+iAIFe/6vgAAAAAAAOokAAxgBIAAWANOiBcpcgEqFgznpAANXwKAAOtV +CAT1PYAA21DqJAAMYASAAFgDFPdAAEP/+koAiif8oGgdoAslAOqsICnoBIAAWChPK3AQ+X/xUNIA +nQApcBUJCEVkjhwrcQkc6GsqcQwvcBGOJwyqDKv/D4gJ/cKkFa/NBQDu7CAkeIkAAO3uAQRASQAA +Cvg5qH2uzu7sQCbogQAA7tteftAEgAAO6jAb6FstoQH9QAQVofkxAAv/CisiF+/yny5kAoAADN0C +C+4MD+4srt2oXv3AJB3v3YEA/cAEHe/2ggAAixT6QGgdoAwVAPtiQBXgDQUAWHmzY/4QAAAAAAD9 +rwANP/6KAGwQBCMgACQK7XQxBiIhA7wi0Q+EIYYg8kBoFaAIJQD3ZAACsJRxAPkPAAxzNgEA9GAA +QfNmgQDl6DccAQqAAABmGvZgAQG9RAEA5SIBAag5AADlIgwBmGkAAAQkLAQzKKMi0Q9sEAiKIicg +B4kwlRX4QtAVoXcBAPFdTA3omQEA+CAmFeD89QB8gR0FC0f7f8AV4AkVAOubOQlQBIAAWC1a81Mw +DeD89QAa5/OIqBbn8PcADZiSAJ0ALmKuGefwZOHbKZJ/JWKtCVUBZFHRKIz/KKYI6VQAAo2BgAAb +6AwlsIDt5+QSqN0AAPggBhXkVR0A5UUIC88CgADmmQgCqA0AAPTgCJISAJ0AKJKe9QATO+IAnQAl +kp0NeAoogr8IVQFkUYgpIBb9IyYNoOvVACowEPtAElRiAJ0AKzELvLvaIFgtGyggFCwgBKSI9YAM +QReYAQApJBT1IA4uUgCdAIoVHufjjREoIQcc58cZ59//oeAV6ogBAP8AABQ0/x0A6YgCB/gFAAAP +TwyYUIsgD+w5/KBmFeeqAQDsVgIt3gKAAOtLAgLIQQAA61YBIcBBAAD5QAlxUgCdAOhBDWJT/QAA +bakFCACGCQJhwICYFOkgBCJb/QAADLsRq1v1IAkJEgCdAIgyKCYc6TIBJdhBAACbEygWAvMgCbhQ +BQUAZpFQpUyIFAx9Eabd7NadLBAEgADRDwAAAAAA9wAOkJIAnQAMeRGmmS6SnvXADvviAJ0AJZKd +DXsKK7K/C1UBZFHNsI2dqGVe3WAAYwAAAAAAAADqJAAJ2ASAAO0SBSpgBIAAWHXX0qDRDwDAoFmj +8Brngoio+R/yGJD89QD/+VgNoAUFAAAAAAAAAPpAaB2gG8UA/AAiHaANFQBYeQhj/7HAUMDqDog0 ++UEGFa/4rgAd55ct0IAt3Df64wAV5N0dAO1NCAlQBIAA/aBgFeAMFQBYePtj/3sAAAAA+EKGHa/6 +DgAAAACKJ/0gaB2gCxUA6qwgKmgEgABYb276IIYVr/tKAIsw82AIopIAnQDiEgQr5wKAAKbMJMad +0Q8AAAAAAAAA6xIAKVAEgABYALtj/jAAAOokAAxgBIAAWAJAiTGLE4gS7KwRDSgEgADsuwgE9Z2A +AOokAAxgBIAAWAIHiBSlpaVMDH0Rpt3s1p0sEASAANEPAAAAAAAAAP/2lA2gBQUAjTWMNB7nZPpg +6BXgCSUA/HAAB7CtcQD7LwAMu4whAPsgBADTzAEA6MwID/gKgAD/gAEGfd0BAO67AQZwOQAA7rsM +BmBpAAANvSwNzCj9YABFv/W6AAAAAOokAAPYSQAA/AAiHaANBQBYeLRj/mHAoFmjjhrnIYioHecf ++R/xCJD89QD/+PANoAUFAMBQwLoLizT7QQYV7/i2ALBLDLsR61sICVAEgAD7YgAV4AwFAFhtCrNM +4hIEK+8CgACm3SzWndEPAGwQBgIqAlgtAyQwFvnOVAWipgUABqYohTeoaARECghEC+RNESlQBIAA +5EwwIqghAABYLPiIQB3nJyswFvUMHg2gBxUALNJsLdJpqt0J3RGtzBjnIh7nIaho6YJ9LW8CgADu +3QgNgQqAAO/SASvwCoAADpkCHucRDv8BLoJ/D+4CH+b6KYZ9Dv44DpkCmdIogn/Ii4bHJmwQ2mBY +BddooRuIMupCASkBCoAAAHkaCYgClaCaUZRQlUGYMtEP2mBYBesW5wcLqBGoZuYWASUCeYAAFucA +DOowixErsoWLsLCqmhAMuwhZqBuMECpilgDBBAB7GguqAipmllmoUY0y70IBKQEKgAAAfhoO3QKV +8JRQn1GVQZ0y0Q8AAAAA+gDiHaALFQBYcbiIMitifytmg+pCASkBCoAAAHkaCYgClaCUUJpRlUGY +MtEPAAAAbBAI2iBYLLDUoBvm5fnNxgXipgUABkQoFebU6UkICVcCgACrqoqgKZJ/GObbpUX7IAQE +sGMFAPggBhXgBxUA4QAFATO5AAD4gABCMADCAAAAAAM8CuXMCwtoBIAA6MKQKVAEgADszQIqWASA +AO48oCZgwQAAC4AAAQGHAzdg4QEHCfdAAADRD2wQBCYhCfhCkBXv+AUAJyAV6JgBCzYCgADomQwL +uQKAAAdmAvhChh3gBwUAJzQA+GBmHaAEFQAEZgKWMRXmhyRWrdEPAAAAAGwQBBbmtBXmkdMPpiIF +NQIlJoAkIoBnQAttCAUoIoBngAJj//PRDwBsEAQT5qsiNopj//wAAAAAbBAEKCAFJSAH+mCoFa/0 +1QD6QEgV4AMlAP0BIBHRVQEAwCDRDwCIKZorDwIA+wAIPCIAnQAa5psKWgnpofwlUAsAACqhAPsg +BLOiAJ0A82AEcBIAnQACKgJYbHgrIgIPAgADugFkr7iKJwS7AesmAiVQwQAAWGWh4+ZpFQE5gAAo +oADTD9MPA4gKKIIQ7KAHLVgEgAD6QGgdoA1FAAuAAGWv3Ikn0w9kn3YqmRTKp4qZZK9sKKAAA4gK +KIIQ7KAHLVgEgAD6QGgdoA01AAuAAGWv4GP/SgAA//9UDaAKBQDaIFhsZSsgIuq7DAlQBIAAWG2v +2lD6ACId4AwFAFhvXosiA7oB83/65mIAnQAvIAfaIPwAIh2gDQUA9WAEBzG/AQDuJgIl2H0AAFh3 +vsAg0Q8AAAAAAAAA6yAiKVAEgABYbZsqIAXBg3ihDGioKYsi82AEBX/8RgApIDrAv3uZ6vpAaB2g +CwUA/AACHaANJQBYbNJj/9cAAPpAaB2gCwUA/AACHaANJQBYbEtj/78AAGwQCogrHeY5LiAhizf8 +YMgVoP/lAA/uAS4kIQ3MAQy7DOuJCHjIBIAAwCDRDwMAhgkCYZsVKCAFJSAH+CEGFe/01QD8QEgV +4AMlAP0bQEHRVQEAiikc5i+bK/tACBRiAJ0ADFwJ68H8JmALAAAswQD9YASjogCdAPOgBGASAJ0A +2iBYbAqLIgO6AWSvm4onBLsB6yYCJVDBAABYZTQKqwLj5fsVASmAACiwANMPA4gKKIIQLLAH+kBo +HaANRQALgADrpAANfx4AAIknZJ9aKpkUK5IJyqhkv08osAADiAooghAssAf6QGgdoA01AAuAAOuk +AA1/LgAAY/8tAAAAAAD//0gNoAsFANogWGv3KyAi6rsMCVAEgABYbUHaUPoAIh3gDAUAWG7wiyID +ugHzf/rOYgCdAC8gB9og/AAiHaANBQD1YAQHMb8BAO4mAiXYfQAAWHdQwCDRDwAAAAAAAADrICIp +UASAAFhtLSogBcGDeKEMaKgpiyLzYAQFf/w6ACkgOsC/e5nq+kBoHaALBQD8AAIdoA0lAFhsZGP/ +1wAA+kBoHaALBQD8AAIdoA0lAFhr3WP/vwAAbBAEHOXXizQpMBb9YAQFtZkdAPUgCAiSAJ0A7uXS +FIiJgAD7y6IFr/3lAOTlqhSkuQAAaZUiLKF+7LMMdlARAAD7YAibogCdACsgBrC7CwtH6yQGJYLJ +gADAINEPLKF+0w/sswx2eBEAAP9gB9PiAJ0AKCAGsIgICEfoJAYsft4AAIkniyIqmRQNuwGbIouZ +ZKC0KLAABIgKKIIQ2iD9YPAVoA01AAuAAMAg0Q8AiyKKJw8CAA27AesmAiVQwQAAWGS8ya0ooAAE +iAooghDsoActWASAAPpAaB2gDUUAC4AAZa/giSdkn28qmRRkoGCKmWSvZCigAASICiiCEOygBy1Y +BIAA+kBoHaANNQALgABlr+Bj/0IAAOokAAnYBIAA7EQACugEgABYbOXAINEPAOokAAnYBIAA7EQA +CugEgABb/0HAINEPAP/9HA2gCwUA//50DaAKBQCINyLifwmIEfhAAEE/+5YAiDci4n8JiBH4QABB +P/v6AGwQBBrlZyiis2SACwnqMCuitAuZDGeQAdEPWG8G0Q8AbBAEHOV0JiAHG+VzH+V1/kEEFaDW +EQANyzmbMIcg+8p4BaAJJQD6YEYVoBgFAOg2Ayu+AoAA+OYADHFmAQD4YCYVoAwFAOUgeSs0AoAA +98YADrArBQD/pgAO8Ao1AOjlXxKCAYAAnDWcN5szGeVeCnUClTGZNiUhCZ00LyAHnDmUO/imAAkx +/wEA4jYKL/wCgAAP7gII7gLuNggtEASAANEPJyEIKiEJnDWUNwZ3AgiqApo2CHcC5zYELJAEgADR +DwAAAGwQBBjlSB3lQisgBxzlQiohCPoCAAdxuwEA7tw5DdwCgAALqgKcMOPlKhmwBIAACKoCHOUG +IzCA+kAIFeANBQCdZexmAiG43QAA+sCGFaR3HQDpfP8t3gKAAOt7AgzPAoAA62YBJMvhAACZYwIE +iZNnKGYGBiCLGOT2JSEJ9MFmFaQzHQDlZgorkASAAOgABQMowQAAbTkCBQJh0Q8AAABsEAYd5SEL +KxGtsyoyfxnlHxflAoigwED44ABE8AYVAOm5CAQBqYAALDJ4LzJ7+YAFfGIAnQBl8RQsNnwrMnkr +NnvdQA3kFgECAJSgDeQWwMn8QAXcIgCdAC8ye8HA7eUMF4ORgAAiMnwqIQSOIPPh/g2mugEAJDZ8 +9G9mFaAAHgAuNnztrwEFw/0AAAj/Au8lBCWMWQAAIjJ8sMzvMnshAPGAAMnGY/+/2iBYbyFloMIq +IQT/QQAMFpoBAMiX0Q/aIFhvFNEP2iBYbtbRDwAAAAAAAPpAaB2gCwUAWG+k0Q8uLPjq0ogvAQqA +APzAAQXf/PUADLsDC6oBKtaIWaYqJDZ8JDZ7+m/oFa/84gAAABXkoy9QaWTwalmcolhujShys9MP +yIFYbmIpUGlknylYblzIrhXk2CxSeLDM7FZ4JgLJgABYbeNj/w4AAAAAHOTS/m+IFaAKVQD8b0gV +4AtFAO0WACFr5QAAWaRb+m/oFa/7MgAuMnviNnwveh4AACI2e9EPH+TGL/KucfaL9q0mHa/+IgAA +AAAAWZxs+q8GFa/+kgBsEAQU5L4Z5Ljo5JsZXsKAAKS0I0J/qYjouAgBgiGAACoyAHipAipCexzk +sCsxBCpGfwy6Aeo1BCnQBIAAWG7TzqkpMQT/IQAMFtkBAMjX0Q/aMFhux9EP2jBYbonRDwD6QGgd +oAsFAFhvWNEPI0Z/0Q8AAGwQBPBg4A3v+fUAiCIJOQMJiAGYIoonKqwwWGOh4+RoFQEZgAAooAAD +iAooghDsoActWASAAPpAaB2gDUUAC4AAZa/giSfLkiqZFMqlipnJrSigAAOICiiCEOygBy1YBIAA ++kBoHaANNQALgABlr+DRDwAA//9cDaAKBQDRDwAAbBAIHeRgG+SCFOQ898kABaAYxQDjLOgl04EA +APhADcwnMwEADDURpFXoUp4pZsKAAKbEKUB/+QAQU+IAnQAoUp1kgf+bEeoLHg1IBIAAmRAKIIYL +AmULAmMNAIcJAmEJAmHtxwgJAQqAAP/I1AXgDhUA4+QzH3AKgACeE6/P/iCGFe//9QD/1wAPcAZF +AP4gRhWgAMIAAAAAipnJrSigAAOICiiCEOygBy1YBIAA+kBoHaANNQALgABlr+ApQiBkkO8tQHws +QH0e5FQN2wkHuwru3ggF2CsAAIqyLuCAZKE4/cf+DaAIFQAvCgANjzgP/wkH/wov/Qov/Jwv8hss +CgEM3APx4SAN58wBAAzLCQe7CuxEfCXYKwAAwND8j6Yd4AwFAI2w71KeJvP/AAAu4P//4AR7ogCd +AC9Snfbf4BWg+PUA8efADedmAQB4YXTqEgQmQAUAAOhEfSbj4QAAWG5YiRPSoOsSAiSAYYAAiqIL +qgEqJgKKJyqsMFhjKcmtKKAAA4gKKIIQ7KAHLVgEgAD6QGgdoA1FAAuAAGWv4IknZJ8XKpkUZa7u +//u0DaAKBQCMEYsQDICGDGCGCwJpCwJn0Q+PEY0QLkR/D8CGD6CGDQJtDQJr0Q+bEeoHHg1ABIAA +mBAKAIYLAmMLAmEN4IcIAm/o7AAJ0ASAAFmbzGSvr+3j4BmvAoAA5FUICWbCgAD3gABCP/kyAMCx ++7cADfAMBQD8j6Ydp7sBACtEfAu7CfdgAQXwDAUA+2FAJe/7mgAAAAtghgtAhgoCZwoCZdEPAABs +EAQY46kCA0cMMxGoMysyhBnjtiiwAIqxCYgKCiGMAgo+KIIQAwI+/EBoHaANJQALgAAiNoTRD2wQ +BBTjmwIDRwwzEQQzCCQyhCpCASZAAChACPqYaB2gqSUAAgU+AwI+eYEjGOOiCGgKKIIQ6lQAClgE +gAD8QGgdoA0lAAuAACI2hNEPAAAA6yQAClAEgABYbh/zQGgdr/82AAAAAAAAbBAEWZ8cEuOAE+Oh +DAIAKSKCCRqOA6gKiIQLgABj/+sS48ID6DAE7jAFsTCTIJQhlSIS474T44OEIAQzApMgEuO8wDAo +N0AoN0QoN0goN0wjPQFyM+0S47fAMJMgxy8T47YDIwMS47WEIAQ0AZQgEuO0hCAENAGUIBLjsoQg +BDQBlCAS47GEIAQ0AZQgxy/AMQMjAxLjroQgBDQBlCBj//wAAAAS46uDIAMTFA8zEZMgEuOowDAj +JgBX/9kQ46eRAJIBkwKUAxHjpYIQAeowohEB8DHAQATkFgACABHjoYIQIxoAAyICkhAR457AIZIQ +BOQxhAODAoIBgQAA0jABIwAAAAAQ45mRAJIBkwKUAxHjl4IQAeowohEB8THAQATkFgACABHjj4IQ +IyoAAyICkhAR44/AIZIQBOQxhAODAoIBgQAA0zABMwAAAAAQ44qRAJIBkwKUAxHjiIIQAeowohEB +8jHAQATkFgACABHjfYIQI0oAAyICkhAR44DAIZIQBOQxhAODAoIBgQAA1DABQwAAAAAAXJQBXZQC +XpQDX5QAQwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AFyQAV2QAl6QA1+QAFMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAACclAAdkAGdlAKelAOflAQIlAUJlAYKlAcLlABDAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAnJABnZACnpAHHZADn5AEeJAFeZAGepAHe5AAUwAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAANyUAB2QAd2UAt6UA9+UBASUBQWUBgaUBweUCAiUCQmUCgqU +CwuUAEMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADckAHdkALekAsdkAPfkAS0kAW1kAa2kAe3kAi4 +kAm5kAq6kAu7kABTAAAAH//89ADSMRD//goAAAAAAB///TwA0zEQ//4KAAAAAAAf//2EANQxEP/+ +CgAAAAAAAPQwCgAAAAAA9DAKAAAAAAD0MAoAAAAAbBAIiCInIAcpIhmZFfEVfA3hdwEAHeJDZJEl +FuJELdCA6+I/G9cCgADmqggG6N0AAP1TyBWk3R0ArU3p4jsW6AkAAP2ACwvgCKUAKqKdC3wKLMK/ +DKoB6hYGJQqpgACKmPdACwiSAJ0ALmKu7eIxFwiJgAAsYq0t0n/tywEFc/0AAP2AB+5iAJ0Anpj9 +gAf2YgCdAC8gFKT/Dw9HLyQU9eAJxlIAnQArMgn4IMgV54UBAPkACWlWux0A6DwQIgxBAAAqTP9t +qQUIAIYJAmHAUIkVGuIYDwIAiZDoEgYia/0AAOqZAgzmAoAADNwC/QAmFaAKBQBtuQfphgYkQQEA +AIgWjDKcFCwmHOsyAS7PAoAAqYiYE/NgCrhSAJ0A6hYALYuCAACLEOtLCAvnAoAA5swIBdv9AADr +xp0qkASAANEPBQxHaMIYiif6gGgd4AwFAOqsICpoBIAAWGmj0qDRD8Ag0Q8AAAAA6iQACdgEgADs +RAAK6ASAAFhv39Kg0Q8AAMCwCKw07JYILfhWAACNImXf1Nog/EBoHaAbxQBYbHNj/8QAAAAAAP/6 +rA2gCgUAjiJl77IrfBjqJAAJYASAAFhsamP/ocCgWZ3mGeHXipj5X/SokAilAGP/stogW/rcY/7D +jyefEYX5+eKCFa/JBQDs8RUn6IEAAAnZAZkS6ckIClcCgADqiAwCqEEAAJX5CIgy6PUUJMkBAAD4 +oAfS4gCdAGirQaWsLMzw/SAEY6IAnQDvEgYiDIUAALBObekFBQCGDwJhjNEPAgAPAgCsrOjZBCZj +wQAA+YAGRGIAnQDs1gEuKASAAGWOZGAAlAAA6iQADFgEgABb/D6LMYgTjBTqFgAtbwKAAO2ICAX0 +xYAA6iQADFgEgABb/AWOEO6uCAqQBIAA7k4IC/8CgADm/wgHc/0AAC72ndEPBZkM/CDIFaT5HQBt ++QUFIIYMAmOMEg9FDC8SBizMQOn/CAKMQQAAKFz/bYkFDECGDwJlhRIs2QQJqAyoVSVcMOXWAS5u +jgAAiRLAUOXVBCTJAQAAmdH5oAYV7/buAAxVDPXhJhXv/A4AhRIlXED1oCYV7/zuAAAAAGwQBB3h +gBrhgRzhfy3SNiqhfizCi6Pd6joMDu5CgAD9gABGcAsFACvEBCvEBVkMbPpAaB2gCwUAW/yv0Q8A +AABsEASFI4MgFOFy+ECEFaFVAQDq4XAarsKAAORUCAGAuYAA+wAEBDaYOQAJiAIoJQQiQn/RDx3h +ZxPhaB/haCZCfishBC5Cf5JgliGj//1gBAX2yzkADLsCr1/vJgAnKAUAACVGfyJGfuslBCqQBIAA +0Q8AAGwQBIIjAgJB0Q8AAGwQBIogZaBQHeFW6iIDKfbCgACu3f2v6BXgDBUA/IBABjGqAQAGqgIN +yCwI3SgnJQXtzAwEWAUAAP1tAAw/+8UA66oBDE5CgAAJWQIDqgKaIwmIAiglBNEPjyMb4UIPD0EL +/hGr6y2yfxnhPCyyfnLZGdnA8yPeDaAMBQDAwCy2fyy2fvpACBWgAEYA2MDzDEYNoAwFAHLRHI0h +mtCOICmyfZ3hnCDsJgEky/0AAPlvphXv/VoAGeEoGOEoqYio6HihIOq2fy+BLgAAza0qsn1qohgt +snv9b+YV4ABKAAAAAAAAAOy2fyf/KYAA+kAIFa/+pgAc4RmIIayZqen5DwAM8AwFAAnIOPlvxhWv +/ioAbBAE9cIqBeAGFQD0QGgdoAI1APaAQAMwAB4AALAiKFJ/6GP3cquBAADRDwBsEAT0QggVpCNB +APJaAAk/U4EABCIKhCaCIQVEKApEEaQi0Q9sEAQpIhIjIAfUUPg+AARwBTUA9QAIcJEzAQAX4Oz3 +wdwFoYnhAPUACFCSAJ0A9GAGIhIAnQAMORGmmSqSngc7Ciuyv/dACGHSAJ0AKpKdC6oB8U7ADedE +AQAoIQcZ4Ov/wdgFqogBAOvg6xxHAoAACYgCmKAY4Oj8QAgV4DwFAJyn+0CmFeAZhQCZo/lARhWg +CAUAmKbu3QIO/gKAAJ2kBf8Cn6EvIhIPj0Hopggv/wKAAJ+p7eDZGfcCgACm7iXmnSwiEioiEA3M +AuwmEilYBIAAWNCAaEIYiif6ACId4AwFAPtEABWgDRUAWGhq0qDRD8Ag0Q8c4LeLyGqxXQw5EaaZ +LZKebtNoKpKdBz0KLdK/DaoB5KBbZfP9AAD/gQYVr/zGAC8aAA+ZAvhCRhXv+7IAACgqAAiYAvhC +RhWv+8IAiSLLnGhCUMAg0Q8AAAAAAAAA//voDaAKBQDAoFmcrBzgnIvIa7GU//uUDaAKBQAAwKDA +2g29NP2BBhXv+1YAAAAA6iQAAdhhAAD8AAIdoA01AFhxwmlCrownL8kUisn/hAAVr8gFAOjuAQf4 +QQAA78UUJVPBAADqxgkncQEAAH6rKinBFR3glqqamsmdoIwg+8EoBeANFQDrpgIuZgKAAA3MAv1A +JhWgAgUA0Q8d4IydoIwg+8EWBeANFQDrpgIuZgKAAA3MAv1AJhWgAgUA0Q8AbBAYkhCOIBXgg4kj +iyGKIioWIisWJPgkZhXgBBUA9CDmFaAIBQD4IKYVoAxFAPwhRhWgDTUALRYJ9CDGFeAPJQAvFgj1 +wOoF4A+lAP4iBhXgDbUA/CImFeAMxQD8IkYVoAiFAPghxhWgBJUA9CHmFaAJdQD4IaYV4AtVAPoh +ZhXgCmUA+iGGFaAL1QD6ImYV4ArlACoWFPXAwgWgCfUA+CKmFeAIRQCYFIYWKxIkiRUnYX4sEiIi +YX8HmSgvUIAJKQj4nIgVo5kBAAOZCu6SAC9QBIAAJmI+LRIjCO4IC2AAjhcsEiQtEiIH7igvUIGu +LvicqBWj7gEAA+4KjuAqFhbqEiMtWASAAKjuC2AAjhgsEhYtEiQH7igvUIKuLvicyBWj7gEAA+4K +juAqFhfqEiItWASAAAjuCAtgAI4ZLBIXLRIWB+4oL1CDri74nOgVo+4BAAPuCo7gKhYY6hIkLVgE +gACo7gtgAI4aLBIYLRIXB+4oL1CEri74nQgVo+4BAAPuCo7gKhYZ6hIWLVgEgACo7gtgAI4bLBIZ +LRIYB+4oL1CFri74nSgVo+4BAAPuCo7gKhYa6hIXLVgEgAAI7ggLYACOHCwSGi0SGQfuKC9Qhq4u ++J1IFaPuAQAD7gqO4CoWG+oSGC1YBIAAqO4LYACOHSwSGy0SGgfuKC9Qh64u+J1oFaPuAQAD7gqO +4CoWHOoSGS1YBIAAqO4LYACOHiwSHC0SGwfuKC9QiA4uCPidiBWj7gEAA+4KLuIAKhYd6hIaLVgE +gAAI7ggLYACOHywSHS0SHAfuKC9Qia4u+J2oFaPuAQAD7gou4gAqFh7qEhstWASAAAjuCAtgAC4S +ECwSHi0SHQfuKC9Qiq4u+J3IFaPuAQAD7gqO4CoWH+oSHC1YBIAACO4IC2AALhIRLBIfLRIeB+4o +L1CLri74negVo+4BAAPuCo7gKhYg6hIdLVgEgACo7gtgAC4SEiwSIC0SHwfuKC9QjK4u+J4IFaPu +AQAD7gqO4CoWIeoSHi1YBIAAqO4LYAAsEiEuEhMtEiAvUI0H7igoQvGuLvogZhWj7gEAA+4KjuDq +Eh8tWASAAJsRqO4LYACMES4SFC0SIS9QjgfuKChC8q4u+iBGFaPuAQAD7gqO4OoSIC1YBIAAKxYj +qO4LYAAuEhUsEiONEwfuKC9Qj64u+J5oFaPuAQAD7gqO4OoSIS04BIAAJxYi6O4IC9gEgAALYACO +ESoWJCkSEi0SFY8VKxITLBIU6BIRJ/hBAADvFgUl2EEAAOsWEyZgQQAA7BYUJEBBAADoFhEm6EEA +AO0WFSTIQQAAKRYSjR+JHIgbjB6LHe8SECRAQQAA6BYLJmBBAADsFg4l2EEAAOsWDSf4QQAA7xYQ +JMhBAADpFgwm6EEAAJ0fiRaNGY8a6xIHIiEBAADsEggm6EEAAO0WCSf4QQAA7xYKIqhBAADvEgQm +YEEAAOwWCCXYQQAA6xYHJMghAADpFgYn+/0AAO8WBC/iFgAAiRCPE4sSjpCIk4ySjZGriKfMqt2v +7p6QnZGckpiT0Q8AbBAEKSIV+KAABPA4dQDpjAwBIEEAAPMgAEU/iwUA66QQJVBFAAD5AAXTYgCd +ACsKAFmYgSwiFSsiFO3NEQlABIAA/EJGFe6APQD9awANsAk1APpCZhXgCiUAbaoMjoQODo7uhgQk +QBEAAA8CANMP0w9tmiHpggQkQEEAAIqBi4KMgwkJjgoKjgsLjgwMjpmAmoGbgpyD60QACVAEgABb +/rWKIIgiiSGPIwgIjgkJjg8PjgoKjpognyMpJgHoJgIpQASAABnfNAIAhgMCYfgAChXgCbUAbZoC +CACK0Q8AAAAAAAAA/YEAFaALBQBZmFL4QGgdoAlFANMPbZoh6YIEJEBBAACKgYuCjIMJCY4KCo4L +C44MDI6ZgJqBm4Kcg+okAApYBIAAW/6T2kD/+/wNoDyFAABsEAYpIhX4QogVoEYFANMP+IAARXWZ +AQAJZgx0qwGxiComFQYqDOgmFCVRQQAA9oAHs6IAnQDrNAALYASAAFmYJfhAaB2gCUUA0w/TD22a +IemCBCRAQQAAioGLgoyDCQmOCgqOCwuODAyOmYCagZuCnIMlLBDqJAAK2ASAAFv+cAZHDPbgBY7S +AJ0A5jQICtAEgAD24GgdoAMFAOQWACpABIAA+MhoHaAJRQAKAmcIQIYKAmUIIIYKAmMIAIbqDAAJ +QASAAG2aIemCBCRAQQAAioGLgoyDCQmOCgqOCwuODAyOmYCagZuCnIPqJAAK2ASAAFv+U+pUAAGY +BQAA5mzAIiEBAADvbZpqQASAAIsQCjwRC8sI7HwMCtAEgABZl+3RDwAAAAAAAOs0AApgBIAAWZfo +0Q8AAAD2YABGMAMFAPwgBhWv/yYAbBAEGN7IGd7GGt7EE97HkyOYIpkh+kAGFaALBQArJhUrJhTR +DwAAAGwQBt4g5OIQKmAEgADnQgcr0ASAAPu9agXgGDUA40IVKZAEgADncg4i++kAAHj7JxjetQj4 +CoiAmhOcEu4WASwAIoAAAJMQKrKV7FQACVgEgABZmZlkpc/ygqYV4AIFANEPAAAAACviEgubUu4W +ASX/QYAAGt6e4xYAKVgEgADqorcq4ASAAFmZjGSlghrel9sg6qK5KuAEgABZmYdkpuAa3pPbIOqi +uyrgBIAAWZmC90jgDeN2xQAa3o3bIOqivSrgBIAAWZl8ZKbhGt6I2yDqor8q4ASAAFmZdyN9A+8C +AAGaAQAA+0BDcBIAnQArMNnBWPVgLAhiAJ0AabchJTTZixD6gqYV4AIFANEPkxAqso3sVAAJWASA +AFmZZ2SnH4sQ+oKmFeACBQDRD5MQKrKb7FQACVgEgABZmV9lrxj6IGgdoAu1AFjMifoAIh3gAwUA +6rM4BQDhgADqEgIrWASAAFmX8sipHN5ojREMrDYs1hdlMyuNEPyCphXgAgUA0Q8AAAAuQG5k7s2T +ECqysexUAAlYBIAAWZlIZa66+iBoHaAbZQBYzHH6ACId4AIFAOqyOAUAqYAA6hICK1gEgABZl9os +fQMqxShlItSNEPyCphXgAgUA0Q8AkxAqsqPsVAAJWASAAFmZNGSiuxreQNsg6qKPKuAEgABZmS9l +rlj6IGgdoAtVAFjMWfoAIh3gAgUA6rI4BSgZgADqEgIrWASAAFmXwixAb/GAJ27SAJ0AZKTlihP6 +AKId4AzVAFjMNdKg0Q+TECqyqexUAAlYBIAAWZkZZa7I+iBoHaAbJQBYzENkojsrQG7TD2S3kuoS +AitYBIAAWZetLEIWCsw2LEYWixD6gqYV4AIFANEPkxAqsqfsVAAJWASAAFmZB2SiNxreEwIrAg8C +AOqioSrgBIAAWZkBZa5o+iBoHaAL5QBYzCtkodvqEgIrWASAAFmXlyt9Aiq1FIsQ+oKmFeACBQDR +D5MQKrKZ7FQACVgEgABZmPJkoioa3f3bIOqipSrgBIAAWZjtZKOHGt352yDTD+qikyrgBIAAWZjo +Za4C+iBoHaALdQBYzBFkoXUrQG5ktwIa3e6LEuqi3ytgBIAAWZjeZaZkK0BvwMgMuwIrRG+LEPqC +phXgAgUA0Q8AAJMQKrKv7FQACVgEgABZmNNkoe8a3d/bINMP6qKRKuAEgABZmM5lrZr6IGgdoAtl +AFjL92ShDStAbmS2iRrd1IsS6qLfK2AEgABZmMRkppgrQG8sCv0MuwErRG+LEPqCphXgAgUA0Q8A +kxAqspfsVAAJWASAAFmYuWShtxrdxdsg0w/qoosq4ASAAFmYtGSi2hrdv9sg6qKrKuAEgABZmK9k +rFca3bvbIOqisyrgBIAAWZiqZaxEGt22ixLqos0rYASAAFmYpWWkaosRK7ISC5lSyJlokgf5IA9h +0gCdAIwRK8YS8oKmFeACBQDRD5MQKrKH7FQACVgEgABZmJhkoXoa3aPbIOqiiSrgBIAAWZiTZayv ++iBoHaALJQBYy7zKohrdm4sS6qLfK2AEgABZmItlrI+KE/oAQh3gDNUAWMue0qDRD8Ag0Q8AAAD6 +IGgdoAv1AFjLrmSv6uoSAitYBIAAWZcb6xIAI+ALAAAqxRX6gqYV4AIFANEPAAD6IGgdoBsVAFjL +omSvui1AbmTVJClAb/E/4W+SAJ0A8T/hL9IAnQDqEgIrWASAAFmXCS5CFwruNi5GF4sQ+oKmFeAC +BQDRDwD6IGgdoAulAFjLkGSvci9AbtMPZPSV6hICK1gEgABZlvsoQTT7AA8CogCdAIoT+gFCHeAM +1QBYy2/SoNEPAAAA+iBoHaAbVQBYy4BkrzLqEgEqWASAAOwSAitoBIAAWMsIixD6gqYV4AIFANEP +AAAA+iBoHaALlQBYy3RkrwIpQG5klDga3VKLEuqi3ytgBIAAWZhBZaJzK0BvjRD8gqYV4AwVAAy7 +AvqN5h3gAgUA0Q8AAAAAAAAA+iBoHaALFQBYy2Jkrroa3UGLEtMP6qLfK2AEgABZmDBlqySKE/oA +Ih3gDNUAWMtD0qDRDwAAAADqEgIrWASAAFmWxPVAFrKSAJ0Axy/RDwD6IGgdoAuFAFjLTvoAIh3g +AgUA6rI4BQFJgAAsQG4PAgBkw6Ea3TDrEgIrYASAAFmYGGWihi1Ab8DoDt0CLURvZS41jxD+gqYV +4AIFANEPAOoSASpYBIAAWMtDZa+cKzDZY/puAAAAAPogaB2gGwUAWMs0ZK4CKEBu0w9kgxTqEgIr +WASAAFmWnylCGIsQK0YVCpk2+IMGFeACBQDRDwAA+iBoHaALNQBYyyZkrcoa3QWLEtMP6qLFK2AE +gABZl/Tj3QodB+YAAIsRK7ISC8lRyJlokgf5P/kR0gCdAI4RjBADvQEt5hL8gqYVoAIFANEPZS2E +jxD+gqYV4AIFANEP6hICK1gEgABZln4qRTSCEPKCphWgAgUA0Q8jfQPyb4AV4AsFAPpgaB2gjAUA +WZYP6hICKdgEgABYy10jfQMjPIArMNnAxAy7Avp/Zh2nuwEA+nsmHe/l0gAjfQMjPIAoMNn6IEgV +oAklAAmIAug02StYBIAAWZZjKzDZ+nsGHa/lKgAAAIoSWYxqKH0DKID8eKkaihJZjGbspAAD2BMA +AOoSAiXb9QAAWZe5ZKG5wKL9uZ4FoDsFAFmcHMcv0Q8AGtzBixLqoscrYASAAFmXsGWuJ4sRK7IS +C8lRaJEKaJIH+T/wsdIAnQAe3MEDvQEO3QKOEYwQLeYS/IKmFaACBQDRD4oT+gEiHeAM1QBYyrfS +oNEPAAAAAPogaB2gC0UAWMrIZKxSGtynixLTD+qixStgBIAAWZeW49yvHQVmAACLESuyEgvpUciZ +aJIH+T/tUdIAnQCOEYwQA70BLeYS/IKmFaACBQDRDxrclosS6qLPK2AEgABZl4ZlrX6LESuyEguZ +UmiRCmiSB/k/62nSAJ0AH9yZghHvvwID6A8AAO8mEibqAQAALNDZwOEOzAIs1NnygqYV4AIFANEP +ihP6AQId4AzVAFjKidKg0Q8jfQMjPIArMNnAwQy7AgsLR/p7Jh3v354AAAAa3HeLEuqixytgBIAA +WZdmZaz/ixErshIL6VFokQpokgf5P+dx0gCdAB3cegO8AQ3MAo0RLNYSixD6gqYV4AIFANEPAAAA +AAD24ABCsAsFAPqgaB2gjAUAWZWKwWDqEgIq2ASAAFjK2Csw2Qa7Avp/Zh2nuwEA+nsmHe/dngAA +ACN9AyM8gCsw2cDIDLsCCwtH+nsmHe/dMgCKE/oA4h3gDNUAWMpY0qDRDwCKE/oCAh3gDMUAWMpT +0qDRD4oT+gFCHeAMxQBYyk/SoNEPihP6ASId4AzFAFjKS9Kg0Q+KE/oBAh3gDMUAWMpG0qDRDwCK +E/oCQh3gDMUAWMpC0qDRD4oT+gIiHeAMxQBYyj7SoNEPAIoT+gDCHeAMxQBYyjnSoNEPihP6AOId +4AzFAFjKNdKg0Q+KE/oAwh3gDNUAWMox0qDRDwAAbBAEJCIQZEBsKTAQKjARLDAa6zASLM4CgAAK +mQLqMBMszgKAAAuZAuswGSzOAoAACpkC6jAYJIURAAAIqhELqgLrMBstVgKAAAyqAgiqEQuqArGq +6iYWJISNAAApIhLr3BwUwCiAAAubASsmEixABS0KlX3BScAg0Q8ALjAULzAV6DAWL3YCgAAP7gLv +MBcvdgKAAAjuAgjuEQ/uAv3XYABQjQUALyISePckwKX9uBIFoDsFAFmbUcAg0Q8AAAAA+oBoHaAL +ZQBY5KDAINEPAIwnKckUi8n5hAAVr8oFAOqIAQTJAQAA6cUUJdsBAADrxgkkQQEAAHi7Bi7BFavr +m8kY2/XZsPgACB2gD0UAbfoCCQJhHNvcnLCKIP1AABUwDEUADKoCmrEpMBQqMBUe2+vvMBYszgKA +AAqZAuowFyzOAoAAD5kC7rYCLM4CgAAKmQLptgQhwCEAAOgGAAX4YQAADwCKKiISiSINqgLqJhIs +9+YAAPpAaB2gDTUAC+AAY/7pAGwQBiQiEC9AbvXgBtiQnFUAHNvSjSCONi8xC/hj8BWgClUA+CAG +FaA7BQBZmxMa28wkIhgsMQuILIlKhUf9AABEMAsFAPhBhhWgDQUA5VIOJJBWgAAtRhcKngL+gUYV +oAAqAAAAACtCF+taCAHYgQAAWZTFL0IXLjELjUCv7i5GFypQBCxQBRjbt+tQBi1WAoAADKoC6VAH +LVYCgAALqgLs27IdLgKAAAlVAghVAfSgYBXv+MUA+KAEArA7BQD+oGgd4ApVAFma7CoiEykxCytC +F6qZ6SYTIsDBAAB4sUHAINEPAAAAAAArQAV8sfAc25/8QAgV4AolAP6ACBWgOwUAWZrd+oBoHaAN +JQD8TIYd4AsVAFjkLMAg0Q8AAAAAAAAf25OOSg/uAe5GCilQBIAAWOFo+kBoHaALBQD8AAIdoA0l +AFgBg8Ag0Q8AbBAGHNuJLSIALjIF9EDoFadVAQD+v8AV4AgVAA+POfSCghWgClUA9CAGFaA7BQBZ +mr+JImWQmCYgBxfbTAYGQeoyBStHAoAAp4grgp4krB/5togF5EQdAHSzfCiCnQlrCiuyvwuIAe2E +AAQDqYAAHNtmDACHbUkCCAJhiDQe20ie0IkgHNtK6tYDJthBAADs1gIszgKAAOlJAgHggQAA6dYB +KVAEgAALgAAMbxGn/+T2nSKUdQAAiif6AUId4AwFAPtEABWgDaUAWGLX0qDRD8Ag0Q8AAAAA//4s +DaAIBQDqJAAKaASAAPrDABXgDAUAWGxQwCDRDwBsEASHJyp5FB/bQvjipBXvzQUA6HIIJVAHAADs +cgslUoEAAOqTd3PYgQAADbsBq5nowXR0yQEAAC6NAep1FCdSgQAA6pNxfDAEgAB5oX2aeO8ABQs4 +BIAABwJhBwJhBwJhBwJhBwJhBwJhBwJhBwJhBwJhBwJhF9sRl2CFIJNllGTztlgFoAelAOJmAiqu +AoAAB1UC5WYBKxAEgADRD8Ag0Q8AAAAAAAD3gGgdoAgFAPjhZhWv/nIACJoMCroMKq0BKqzg+uEG +Fa/+IgAsvED84QYVr/32AABsEATHjwhYAwg4AghIA6ho6CIIC4EKgAACIhiiMtEPAGwQBAQ4AwhY +A6ho6CIIC4EKgAACIhiiMtEPAABsEAQEOAMIWAEISAOoaOgiCAuBCoAAAiIYojLRDwAAAGwQBAVI +Awg4AQhYA6ho6CIIC4EKgAACIhiiMtEPAAAAbBAEIyIQKDAF+EJIFeCUJQB0iUj/KKADEI0FAHif +PXCfGera8BS9WIAACpoB+kJGFaACBQDRDwAAAAAA/bXWBaAKVQD8YAgV4DsFAFmaJCswbtMPabEF +LDAFdMEGwCDRDwAAAPpgaB2gDSUA/EyGHeALFQBY427AINEPAIwnL8kUi8n/hAAVr8gFAOjuAQf5 +AQAA78UUJdsBAADrxgkncQEAAH67BinBFaubm8kc2sPZsPwACB2gCkUAbaoCCQJhHNqqnLCJIB7a +vvv/4h2gDEUA6rYELM4CgAAMmQKZsSgiEo8inrINiALoJhIv+4YAAPpAaB2gDTUAC+AAwCDRD2wQ +BBPaugMiAtEPAGwQBCcgB4giHNqD9kIIFaF3AQDlgmNrzwKAAAyZCCiSnhraefcAEsLSAJ0AJJKd +CngKKIK/CEQB6NqNEhIhgAAlIhIqIgn4QUgV4FVBAAhVCiVSgOqZDAKowQAA9SAOw+IAnQArIBYt +Cv99sRX6QPAVoAwFAFhrNxzaZ/NBkA3g/fUAG9qYLyEHGtqXGNpv/7TiBar/AQDpIRov/wKAAAj/ +Ap9A+EAIFaBPBQCfQ55C+wYADTAOVQDqRgQsRgKAAA6IAphBKCIS+IDGFeA6BQCaRfgIAAUyiFEA +5ogRDVaCgAAIqgILqgKaR4opKSIVG9pwpaqlmfhCphXv6AUA6iYJIkiBAAD4gAuEIgCdAPoACB3v +iAUACQJhCQJhCQJhL0Qg+IQmHaAPBQAvRCQvRCcvRCYvRCUpYhH4h2Yd6JkdAPiHRh3omR0A+Icm +HeiZHQApRDgoIhb4h+YdqIgdAPiHxh2oiB0A+IemHaiIHQAoRDyKNCg8GPVABpgQ+fUACACI6Npa +ElChAAAKAIoa2kwpRDD4hiYdr/n1AClEMypEMoo0L0Qj+obmHaiPHQD4hEYdqJodAPiGxh3omR0A ++IamHeiZHQApRDTrAAUCQQEAAAgCYSkgBwkJQQyZEayZLpadKyAWfbEK+kDwFaA8BQBYasOJNGiQ +J4on+gCCHeAMBQD7RAAVoA1FAFhhsSsiEiz6fwy7AfpCRhXgAgUA0Q8e2jQtIhIO3QL8QkYV7/8u +AAAAAAAAAADqJAAK2ASAAFhq5uzZ9BVw6YAAYAAriW4Y2iSxmZluCJkC+IZmHeiJHQD4hkYdqIgd +APiGJh2oiB0A+IYGHa/8tgDAINEPAADrfBgpUASAAPwAIh2gDVUAWGsSwCDRDwDrfBIpUASAAPwA +Ih2gDQUAWGsMwCDRDwBsEAQqIhQpIhMc2db9s6YF5zUBAOqZDAGUHQAAZJCAKiAHCgpBDKsRrLsu +sp5u4ngrsp0Nrgou4r8f2esY2dr/YAQFsBQFAO7Z1BWC8YAALSEHDQ1K758CDu8CgAAO3QIe2fmd +sI0gn7WYspSzGNnU/6YADzAEJQDutgQu7gKAAATdAp2x6AAVBdhhAAALAIoMrxGs/yT2nS4iFKnu +LiYUaTIQwCDRDwAAiCLKgWgyNcAg0Q+KJ/oAIh3gDAUA+0QAFaANFQBYYVbSoNEPAAAA+0MAFeAM +FQD6QGgdoA0lAFhq0mkyyYwnLckUisn7hAAV784FAO67AQboQQAA7cUUJVPBAADqxgkl2QEAAHur +Ki/BFRnZpqr6msmZoIgg87OUBaAJFQDipgIsRgKAAAmIAvlAJhWgAgUA0Q8Z2ZyZoIgg87OCBaAJ +FQDipgIsRgKAAAmIAvlAJhWgAgUA0Q8AbBAGLyIYL/BYKAqOePF5KCAF6dm3FAOZgAAY2bQkIhII +RAEkJhKNOSsxCy4iEX2YfikiE6uZKSYT8oAFHlIAnQBk4MYq4gx9pz4o4gv7wGgdoAsFAPwAAh2g +DSUAC4AAKyIUKiITGdmjC6oM7NmjFVkDAAB7kxj7grYNoAkFAOkmESyQBIAA0Q/AINEPAAAA+kBo +HaALBQD8AAIdoA0lAFv/f8CQ6SYRLJAEgADRDwD9syYFoAolAP5ACBWgOwUAWZjAKiIQLaAFLgqV +ftG5wPL+TIYd4AsVAFjiDsAg0Q8c2YiN4P/AsBWgClUA9CAGFaA7BQBZmLMoIhIp+r8JiAH4QkYV +r/1uAAAA2iBY30Rj/0wAbBAILSIYK9BYKAqOeLENKSAFGNl37Nl3HIBGAADAINEPJCISKSIRCEQC +5CYSIjT6gACPLIk2JTAgJjEK/hFiHa/4xQD/KMYN5aUBACoiECugBSwKlXyxxMDS/EyGHeALFQBY +4efAINEPAAAA5JKCYdCBAACJl4me+SYAFeALZQDAIG25BQoAhgkCYdEPAAYGTiZs2whmAf9gE4wg +NxUApvj8hgAKMCslAPhBhhWgLFUA9EJGFaAmFQD3QkYNoA8FAHyhCnehB/tAILViAJ0ALzAwKDAx +GdlI7jAyL/4CgAAI/wLoMDMv/gKAAA7/AuvZQx/+AoAACP8C+eAcPmiPuQD9EAAUNe8BAAjuAhjY +/CiCPSuyiK6OCe4Rrrvt0Fgl2gEAACsmEf9gsBWgibUA+aAZDWIAnQApCpr5wBi0YJi1APnAGHQg +mWUA+cAYNGIAnQAtCpn9wBmdYARFAPdABjQiAJ0A/UAF9CIAnQApMEEuMEAvMDwtMD3oMD4vdgKA +AOnuAg/+AoAADf8CKTA/7TBCL/4CgAAI/wLoMEMvdgKAAO3uAg/+AoAA6f8CD3YCgAAI7gIP6Azt +IhAkBJuAACXSEn9RCAX4DGaAAi/WEi/SE9MP0w9+8QgP6QxmkAIu1hONvATdAp28fKFQ90AK5GIA +nQD3QBEEIgCdAMLi/0AVVCIAnQAvEBBk/hCKtyk8IPtByBWgCDUAbYoFCSCGCgJjwCDRDwAtMCPA +4Q3tOS20QS0UEP1f+aUiAJ0ALzAhf/eoLzBBLDBALTA8KDA97jA+LmYCgADvzAIO7gKAAAjdAi8w +P+gwQi7uAoAADt0C7jBDLmYCgADozAIO7gKAAO/dAg5mAoAADswCDcgM6iIQJASLgAAuohJ94QgO +3wxm8AItphItohN80QgNyAxmgAIsphMsMDgtMDmKvO4wOi5mAoAADcwC7TA7LmYCgAAOzALp2Mse +ZgKAAA3MAuSqAgZgBQAALCYWmrz5YWYV7/xiAInXKzELiZ6/uwtLS+W9fmTIwQAAY/0TAAAA+gBi +HeOE4QD5f+w+IgCdACswJCgwJekwJi3eAoAACLsC6DAnLd4CgAAJuwIIuxHouwIDSBEAAPstAAt/ +9WIAACwwIfGADM4SAJ0ALTAkLjAl7zAmLu4CgAAO3QLuMCcu7gKAAA/dAgjdEQ7dAmXRbywwTC0w +Te4wTi5mAoAADcwC7TBPLmYCgAAOzALqIhAuZgKAAA3MAmTMqC2iGP2/5ROiAJ0ALLYSLzBIKTBJ +6jBKL/4CgAAJ/wLpMEsv/gKAAAr/AujYjR/+AoAACf8CL7YUKTA2LjA0LTA1/mbwFeAKBQDqthUv +dgKAAA3uAuq2Ey92AoAACe4C6LYLL3YCgAAP7gL/YaYVr/fKACkwOCowOewwOizOAoAACpkC6jA7 +LM4CgAAMmQIImREKmQLo2HMUyAUAACkmFvlhZhWv9vYAAAAAAAAAAOzYbh74BIAA/WAIFeAKVQD0 +IAYVoDsFAFmXkCoiEsSwC6oC+kJGFaACBQDRDwAAAP/yEA2v7qUA7NhhH2gEgAD/YAgVoAolAPQg +BhXgOwUAWZeCY/uhAAAtMDguMDnvMDou7gKAAA7dAu4wOy7uAoAAD90CCN0RDt0C7NhRFugFAAAt +Jhb9YWYVr/S+AC8mEfugaB3v9JIAKiIQY/tcAABsEAgrIgcmIAcPAgAouRQFDUf1YcgVoWYBAOOy +CSQREYAA+aATEVIAnQAc2D6IIP9gSBWgClUA/b/AFeAJFQDtnTkJeASAAPggBhWgOwUAWZdbHNg1 +/GAQFeAKVQD+ShAVoDsFAFmXVRXX4uvX5BtQBIAA9MAOihIAnQAMaRGrmSySnveAEgpSAJ0AKZKd +BWwKLMK/DJkBZJH7LiEHLCBAJiAH96/MBeruAQDv2CAfdwKAAPWADkiRVgEA9YALyRIAnQD1oAuK +kgCdAMDQ+bAwBaBmEQDsIQgrMoKAAAbuAu/uAgqsAoAABcwCCMwCnpCPIPcgRhXgNgUA9yBmFaAF +BQCVlZWX/SCGFaAORQDolgYv/gKAAP/mAA+wCCUA75YBLv4CgADo/wIE4IEAAAMghgwCYwMAhgwC +YZ+Z5BMeBMkBAAAJAmkEYIYJAmcEQIYJAmXpIhItZwKAAOvMCAE5IQAA/5OmFa+aZQD3IAYUb2tF +APev4AWvmXUAJCISq0QvQigpRIEoQieY8CNCJy5CK58xJUYnJUYoI2KL6kSBJ3ysgAArQjEuMiQL +ikT7WgANMAwFAP9AAQUwDRUA+0AIFa+7gQBYXsUlRjEoQiYrQh8lRiv/BAAV78kFAAn/AeWFFCf5 +AQAAn4mfiC5idPpiKBWgDAUA/28ADbANFQBYXrf+QkgV75l1APxiSBXvmmUA/gAiHa9rRQD37wAP +8AwFAO/sOAbr/QAA7TYSJnpxgADAINEPAAAA/IBQFe/6RgD/93gNoAMFABfXbIx45hYEJg3/gAAM +qRGrmSiSnvcABIJSAJ0AKZKdBa0KLdK/DZkBZJB+sM6eeGWeHmAAFwAA/BBCHe/5JgAvIEAI/xD+ +YAYV7/ZiAIgiZY+VjTDrbBgpUASAAPmvSAXn3cEA/EgGHeAMFQD4YAYV4A1FAFhogcAg0Q8AAAAA +//csDaAJBQDAoFmTWIx4ihTr10gYBAqAAPmf+4CSAJ0A//4sDaAJBQDAkMDqDs40/uEGFa/98gBs +EAaJJyMgByiZFAMDQeeSCSQLsYAABQhH+QANcVIAnQAqIEEV1zP2AIIdoAQFAPFabA3gDAUAG9cx +DDoR9GAKehIAnQCrqi2invegENOiAJ0AKaKdBT0KLdK/DZkB6pQABI2hgAAuIEHsFgAvDp4AABjX +Mh/Xbi4hByUgBxnXbPxBBBXq7gEA9CAAAnBVEQDqVRAPdwKAAOXuAgokAoAABN0CCd0CD+4CnqCP +IJ2k+UBGFaAEBQCUpZSn+UDGFeA1BQCVo/3gABewBUUA5f8CDnYCgADl11cVSIEAAP9AJhXgDyUA +ByCGCQJjBwCGCQJhD+4CnqkMPRGr3SbWnf5BiBXvmXUAKSQF8rFoFe+YZQDoJAUn/KyAACsiEi4y +JAuKRPtaAA0wDAUA/0ABBTANFQD7QAgVr7uBAFheKCQmEogniyCULP8EABXvyQUACf8B5IUUJ/kB +AACfiZ+ILlJ0+mIoFaAMBQD/bwANsA0VAFheGioyErCq+mJGFaACBQDRDwAAAAAAAP/6KA2gBwUA +Htbajej3oAa4kgCdAAw6EauqL6Ke9+AHa6IAnQAqop0FPwov8r8PqgHkoNtmw/0AAJjo+UBoHe/6 +XgAqIEAIqhD64AYVr/kyAIieJIAEK4AFFtbx6oAGKiYCgAALRALogAcqJgKAAApEAghEEQhEAgZE +ASZMZ/aOAAswjJUA9sCAFa/4lgCJcO1kAAlQBIAA+a4OBaeZwQDpJEAh2GEAAPjgBhWgDBUAWGfi +wCDRDwDtRAACYSEAAOtMZylwBIAA/uBoHeS7HQBZlfMb1qj8IAgVr/g+AAAA//fIDaAJBQD8IAYV +oAoFAFmSrh7Wn43oG9afjBD5v/igkgCdAP/8yA2gCgUAAMCgwPoP3zT/wQYV7/yKAAAAAGwQBCki +ByMgByiZFAMDQeeSCSQK6YAAFNaM960cBaeFAQD5AAwRUgCdAPRgClISAJ0ADDkRBpkIKpKe90AN +SlIAnQApkp0EOgoqor8KmQFkkWMqIAcoIQcf1o8b1sr5QAAEMMoRAOrMEAxHAoAADIgCC4gCmJCM +IP8gRhXgPgUA/yBmFaANRQDu1sAeZgKAAA3MApyRKyBB/EEEFaAEBQD/IMYVofoBAOSWBS/8AoAA +78wCBNCBAADuzAINiSYAAMCwlJf9IIYVoAUlAAcghgoCYwcAhgoCYQi/EQX/AhXWq5+ZDD4Rpu4t +5p34QYgVr5x1ACwkBfKxaBXvmmUA6iQFJHysgAArIhIuMiQLikT7WgANMAwFAP9AAQUwDRUA+0AI +Fa+7gQBYXYMkJhKIJ4sglCz/BAAV78kFAAn/AeSFFCf5AQAAn4mfiC5SdPpiKBWgDAUA/28ADbAN +FQBYXXUqMhKwqvpiRhWgAgUA0Q8A//qMDaAHBQAV1jaKWGqhbww5EaaZK5KebrR2KZKdBDsKK7K/ +C5kB5JBpZWP9AACcWGWerWAADgAtIEAI3RD84AYV7/niAI9w6zwYKVAEgAD/rOwFp//BAP5IBh3g +DBUA/uAGFaANRQBYZ1DAINEPAPoRIh3v+3oA//mMDaAJBQDAoFmSJopYa6GF//6MDaAJBQDAkMCK +CKg0+KEGFa/+UgAAAABsEASKKo6vGNZg6CYLIUiBAADp5gAleOEAAO8mCClYBIAA/kEmFaAMBQD5 +QeYV75iFAPhAph2gDSUAWGd5wCDRDwAAAGwQBBvWUSoxDCuyfxzWMvhiEBXgFGUA+0PWDeAFBQB8 +oRbqJAAK2ASAAOw0AApoBIAAWN4QwCDRD2iRSGiSKGiUCsBA//9oDaAFBQAAfKHRe6vO2jBY3j3V +oP//EA2gBAUAAAAAAAAA/UDmDaAUZQB7owJgAAHAQNowWN5T//6EDaAFBQDaMFjeZuWkAAUBEYAA +/axcBaAKVQD8YCgV4DsFAFmVRv/95A2gBAUAAAAA//24DaAExQBsEAQpMBPxJrAN4PWFAGiRBMAg +0Q8AhCeEThzWH+0wESJIDwAA/T+GHeAKVQDuMBIiQBMAAP8bph2gOwUAWZUx6zwYIlATAADsMBEl +U/UAAFjedeU7CAJQFwAA7DASJVN5AABY3nHqJAAKWASAAFjf8sAg0Q+EJw8CAIROHNYILTARLUQC +/mJQFaAKVQD+gGYdoDsFAFmVG+s8GCJQCwAA7DARJVMhAABY3l/lOwgCUA8AAOwwEiVSoQAAWN5b +wCDRDwAAbBAE9EBgJeizHQAjVFf6qsYd4EQ1APSqph2gCHUA+KqGHaAJBQD4qmYd4EoFACpUUtEP +AGwQBI84/avQBaAKVQD8YhAV4DsFAP/gaB2h//EAWZT7KTAQ6tXiFIyRAABokllplBKINiKifwmI +EagiKCAFKQqVeYFewCDRDwAAANowWOB8/18ADeAJdQCLp4u+LLKODJ1W/SNAHejsuQDA037QEPtg +QCXgDAUAWOBGwCDRDwAAWN+vwCDRDwCLNiqifwm7EftAAEVwCwUAWN8uwCDRDwAAAADApf2rhAWg +OwUAWZTX+kBoHaALJQBY3ijAINEPAGwQBIguIyw4c4kFwCDRDwAAiy6Is+xEAAroBIAA67zgKVAE +gAALgACMIu0gBS5+7gAAZN/Vji5z6dZj/80AAABsEBYlFheHNSYxDysgB4g04xYaKkgEgACZHP4j +SBXgChUAmh/7q0gFoMhZAPwjZhWhuwEA+iLGFeP+9QD7T8QVoLZ5APoiZhXgd/kA+eOwFexIHQD6 +jwANMDhRAPggBh3vqgEA6hYUJFRWgAAGDEn8IcYVoAAyAAAAAAAAAJ4eLhIXKPE9KBYSL/If/iIG +FefuAQAuFhX1wDwhEgCdAIoi+0BBoJIAnQDw5WAN4A0FAO0WESOASYAA2kBY6Hf0AAId4AYFAC8S +G9pw/gBiHaAMJQDv7DkJ2ASAAFjoX/dAAEMwCPUAdoBV9CFmFaSWHQDjFgokyAUAAPgjBhXgAT4A +AAAqEhJkp2MrEhqLtX22n/oiSBXgDBUA7BYRKlAEgADsEhAo6ASAAFjojGankfwAYh3gBQUACtU6 +ZFd7w2CUG/IhRhXk5h0ALhYYKBIWHtT8HNT949T+HCAEgAD1AAkyEgCdAOoSGCw3AoAAo2YpYp4O +iAoogr/7IEDrogCdACZinQhmAdtg5rQABb15gACPyJsV9+A94JIAnQApMq7q1UYUu3mAAC4yrS2i +ZO3rAQfT/QAA/cA63mIAnQCayP3AOvZiAJ0AjRwsIBTTD63MDAxHLCQU9YA8flIAnQAuEhspEhTx +wMAN4Ag1APkAPYjiAJ0AZFDOihoPAgDIoWRQY+tkAAlQBIAA/ABiHaAdhQBY6ITuEg4teASAAOYS +CyKvmYAAHNUmLRIT+amsBeAKBQCa8przmvSa9elpAg9EAoAA6fYALuiCgADo3QIK9sKAAP+mAA6w +G8UA/eAmFeAKVQBZlCorEhX5YDgpUgCdAMAg7BIYKm8CgACj3SzWndEPAAAAAAAAj8j34DjgkgCd +AOkSGCo3AoAAo2YoYp75ADk74gCdACtinQ5NCi3Svw27Aea0AAW42YAAsP6eyPrAaB3v+xoALxIR +0w9k8HfrEgUpUASAAPwAYh2gHYUAWOhRGdT4FtT1jhsoEAAmYpsJ7gIZ1PQIHxTmhgsP+wKAAOn/ +AgR8oIAALBIQ7RISI1v/AAAosj8rsX2eoJ+hnaKco5uk+UCmFaAAcgAALBIQLRISK2EFiGOeoJ+h +m6KYo52knKUmrBgtEhOMHgLdEO0WBy5kAoAA7BYIK6b+AAAa1In4IWgVoA8FAP4gxhXgDyUAnx0K +iAIoFgnrZAAJUASAAPwAYh2gHYUAWOgmjRkvEhqJFisSGo/18TXQDeP+9QAc1MqLtP9ARhWgj5kA +/UAGFeBviQD9QCYVoN+hAPDQABMwz5EA7tTCHulCgADupgMsQQKAAP0GAAx5uwEA66YELmDCgAAM +ZgIIZgImpgUsEg3pnAElMGEAAOkWBiZj/QAA7BYNLnumAADrZAAJUASAAPwAYh2gHYUAWOgCFtSt +iRePGPohKBXgDQUAnRGdEp0TnRSdpP1AphXv/vUAnqKeo5ugLhIa6f8CCsbCgADo/wIA4DEAAOb/ +AgDYIQAA7RwQJTBhAADvpgEg0BEAAFjmzvlAaB3gDBUA6sk5DSgEgADpFh4lIAmAACQWH/4AIh2g +DQUACe045RYgJurhgAAT1I2IGIwXGtSMKxIbhBsV1IXxeAAUsA4VAOvrOQongoAA9IYACnYPBQAL +rzn9JgAMsA01APkmAAwwDCUAC9w5LBYdCfkCKRYZ+eYAD7AFBQD+I4YV4AMKAAAPVlD+GAAF8M/J +APwhKBXgj7EA/UAGFeDveQDs7hEMRAKAAOvMEA3agoAA7LsCCzPCgAD4xgALMM+BAP2IABYxj2kA +7O4CDEUCgAAI7gIc1F+coSgQAAbuAvvGAA9wb7kA9MgAEzu/AQD3xgAPMAYlAObuAg3dAoAA7qYE +LEICgAALiAKYpRvUV5uiGNRX+UBmFa/5jgCZoZSgnqKeo56knqWdpp2nnaidqS8SHeVcASUwoQAA +/qARnGIAnQDrZAAJUASAAPwAgh2gLYUAWOeX5FBRas7CgAD0oApgkgCdACsSHMfv+yYADPANBQDj +mQIL/S4AAI0TLBIajhKPEYvMLMIQmaGbqfVABhWgCAUAmKKYpp+jnqSdp5yljBT9QQYVr/4mAC0S +GywSGRvUMAyZAuuZAgaEGYAA8OJADe/+9QCZoZSgnqKeo56k/0CmFaANBQCdpp2nnaj9QSYV7/02 +AC8SGiIWISvyFibxOCLxOizyFejxOSs0AoAABiICJvE7LfIb7vIaLEQCgAAIZgIo8hcv8hmfop6j +naScppunmKiWpZmhlKCSqfIkKBWv+/YAAAAAAAAAAPDiQA3v+/UAmaGUoJuim6ObpPtAphXgCAUA +mKaYp5io+UEmFa/7OgAsEhqNEi/BOybBOSjBOC7BOuvCGCs0AoAA5v8CDEQCgAAI7gImwhSIzCzC +EJukmKeWqJmhnaKUoJyjn6WeqYwU/UDGFa/6GgArEhvsEhklg1GAABvT7sfv/SYADLANBQDrmQID +gPGAAJmhlKCeop6jnqSepZ2mnaedqP1BJhXv+TIALhIaIhYhLeISLOITK+IYiO2G7i/iFILvLuIR +nqKdo5ykm6WYppann6mZoZSgkqjyJCgVr/hWACsSHMff+yYADPAMBQDjmQIDgPGAAJmhlKCdop2j +naSdpZymnKecqP1BJhWv95oAmaGUoI4T/iAoFeAIBQCYopijmKSYppinmKifpf9BJhWv9woAKhIa +GdPAiqUT01glEiDkEh8lTDCAAOPTVBODuYAAHNO6ixsMuwL7P0YV7+eiAIUfwNL3rQAK/+gmAMCl +/adoBaAbxQDuThEKaASAAFmStmP4ZwAA+iKIFaAOBQCeEZ4SnhOeFFjl0iQWH+UWICViYYAA+iKI +FaALBQBY5cUkFh/0JAYV7/DaAC8SEGX4lWP4OhrTdYgbCogC+T9GFa/l1gDAoFlQ+sinG9OaK7CA +ZLBaKhIUWOW+6RIeLV9OAAD6IogVoAsVAFjlsvgjyBXv71oAAAD/4CQNoDYFAOsSEipQBIAA7BIQ +KOgEgABY5oFj+FcAACsSGowc7RIXKVAEgABYYQzSoNEPAAAAAPunBAWhSxUAWX9GLBoADKwC+6b6 +BaFLFQBZf0Zj/4UAAMCwwNoN/TTtxggtxVYAAPpAaB2gG8UA/AACHaANFQBYZDhj/6EAAAAAKxIW ++kBoHaAMBQDtEhgl2GEAAFhkMWP/hMCgWY8LHNL8j8j5/8HQkgCdAGP/t9ogW+wBY/hsiieNHMDA +6qwgLtgEgABYWqLSoOsSGCpnAoAAo8wrxp3RDwAAAAAAAP/fpA2gBgUA/+FIDaAFRQDAoFmO9hzS +5o/IHtLj+f/GuJIAnQD/4/ANoAYFAAAAAP/jlA2gCwUAwNoN/TT9gQYV7+OSAAAAAGwQBBTTRoIg +JEJ/E9NFBCIMAyIC0Q8AAGwQDBjTQxrS1hnTQCiAfSqiRimSgwmqEeqZCAR8RIAAJJ0B9JAAFaAA +MgAAACSdAyRMgBnS/ihBK/kACAxiAJ0AGtLr6gAFCMgEgAAJAmEJAmEJAmEJAmEZ0y8Y0wsf0r+O +IJ8S+CDGFaAKRQDpFgAvdgKAAArqApoRKUAHL0Er/aZMBaGZAQDj7gIMzAKAAAn/Agj/Ap8UKyA5 +/iFmFaANJQCdGQy7AusWCCgECoAA9GAEsZIAnQCJRyqZFOSgf2TggQAAjZmLwP/4Ah2gJYUA7s4B +BoIZgABtCC59sTgv0AAp0Ad18S8vwQXu+AgMzwKAAOndCARBAQAA6NsRftAEgADtpAAFAImAAGP/ +ygAA/68ADX//vgD9bwANcAkFAAqdOObUAA6BpgAA6kQACNgEgAD8AIIdoA0lAFhWVdEP//4MDaAN +BQAAACocOvpHQBXgDGUAWYuzY/9cwnaOaPoAoh2gOwUA7NLtG2gEgAD+RzAV4+4BAFmR54poCo9X +d/FtikcuoRX7RAAVr8sFAAurAavr62pwc2kBAADvogAmgYGAAH3xKCzQANMPDwIAdcEdKdAHDJkR +6d0IBcEBAADo2yR+0ASAAO2kAA1+xgAA/e8ADfAKBQALrTjm1AAG+mGAAGP/dgAA/68ADT//cgAs +IDkKDUN9yYiOIAjuEQ4+Ap5r0Q8AAAD/rwAOv/5CAGwQBiggBSwgB8GUDwIA+QAQdWHMAQApIgJl +kcMtMAEb0kbm0kgeOASAAP+hQAbQD6UALiBOZeJX7tJCHk8CgAD1gArSEgCdAKaZKJKenBALywr3 +ABGU0gCdACuyvyqSnQurAesWASWOSYAAiuj3QA64kgCdAChiru3SNBQL+YAALGKtLdJ/7csBBUP9 +AAD9gAteYgCdAJjo/YALZmIAnQApIBSkmQkJRykkFPUgDXXSAJ0AHtIyG9IsjCD4ICgV4AoFACq2 +Mu7MAg5uAoAA/WcGFaAORQAO3QIttjEb0o3ckOsPHg3QBIAADAJnC0CGDAJlCyCGDAJjCwCG7AwA +BNkBAAAK4IYLAm8KwIYLAm0KoIYLAmsKgIYLAmkuMQEoIQktIAcsMAEb0nsqIST8IAAGMN0RAOrd +EA5kAoAADcwCDKoCHdJ1LCEiC6oCKpYgDcwCiyAd0hMoliMuliQsliL9YAAVsAwlAAy7AiuWIYoz +6pYlJMgHAADtABUEymEAAAkAigx4EaaI/xOmFeflAQD5wAa5UgCdAMAg0Q8AAIro90AH4JIAnQAM +eRGmmS2Sngt7Ciuyv/egCGTSAJ0ALZKdC9sBZLEAsK2d6OsWAS305gAA/CAGFaABZgAAAAAAAOok +AAnYBIAA7EQACugEgABYX8fSoNEPAAAAAMCwD6k06eYILfTmAAD6QGgdoBvFAPwAIh2gDRUAWGL8 +Y//BAADqJAAK2ASAAFhhSNKg0Q8AixD6QGgdoAwVAPtjABXgDaUAWGLyY/+XwKBZjcwe0byK6Plf +8PiQD6UAY/+q2iBb6sL/+TQNoA+lAACKJ+tEAApoBIAA+0QAFaAMBQBYWWDSoNEPAAAAAP/3XA2g +CwUAwLgLmwL6QEYV7/0eAAAAAPwgBhWgCgUAWY20HtGliuiMEBvRoflf93iQD6UA//woDaALBQAA +wLAPrTT9wQYV7/vyAABsEAYS0ZsX0hD1o0QFoBOVAPhQyBWgpiUAKiKCf6cgKyKCf7cYKiKELKAI +JaAHdsE3iETAoAuAAAUzDGU/2tEPLSKEKSKHKiKH+WAABPuqgQB6mS8K6jArQkHDwgy7KKuq+paG +Fa/+6gAuoQsu7PgODkPu7Pwi6/0AAP+iAAq//s4AAAAMAgAvIoJ//8Yl0AduW8DccPoAoh2gCwUA +/qAAFzD/BQBZkOIlXPHKWygKcZgRwKFZhk/6ICgV4An1AAlZNpkQCbsM+iAmFeAKBQBZbQKKEApV +DGVf18ChWYZF+g4iHeAKBQBZbPxj/2YAAABsEAYoIAUmIAfnNAAK2ASAAPgCgh3gBTUA+QAPnWFm +AQALCEdoghSKIhjRUhfRVeRkAAUDyYAAwCDRDwArIh1lseGIJ4OI+wKkFe/MBQDpggskcIEAAAzs +Aey7CAp/AoAA7BYAJdkBAADzIA38YgCdAC2JFKP6r90thRT7YA3rogCdAMl1yUPZMG1JBQcAhgkC +YYrgDwIADwIAr6r7QBCsYgCdAPvABhWv/f4A7GoRAyTxAAAHqggrop4PAgD3YArZ0gCdACqinQhr +CiuyvwuqAWWgT+tsGClQBIAA/AAiHaANNQBYYljAINEPABvRJIm49yAMoJIAnQAMShEHqggsop73 +gA0B0gCdACqinQhMCizCvwyqAeShjmTr/QAALbYIZK+vGdE6maCIIP+jGAXgCxUA66YCLEYCgAAF +iAKYoYgzL/J//6JKBaiIHQCo/5+j7gAVBUhBAAD/ojIF4AgFALGI6YMeDA/oAACfphnRfPlBBhXg +GAUAmKeOIAjuEQXuAp6pDE0Rp90l1p2OIiwgBoknC+4C69FzFmAFAADsJAYkyIEAAIiR/SCCFe/M +BQAMnAHuJgIkQ0EAAOiWASbowQAA7ZUEJmEBAAB8iyIqkQUd0P2oqJiRnYCMIOuGAi5mAoAABcwC +/QAmFaACBQDRDx3Q9Z2AjCAb0VvrhgIuZgKAAAXMAv0AJhWgAgUA0Q/aIFhgXdKg0Q8AAAD/+sQN +oAoFAFv/OmP+FwAA8yBoHeAOBQD/AWYVr/e+AOO6DAOBuYAACksU7LwIK8AEgADsTDYJyASAANMP +bckFCACGCQJhiRCqeOtNDATJAQAAbdkFCCCGCQJjixAK/Aysuyu8QPvABhXv9ooAwKBZjMsb0LuJ +uBjQuPk/8viSAJ0A//n8DaAKBQDAoMDaDZ00/WEGFe/5wgCPEC/8QP/ABhXv9aYAAABsEAyIJ/hA +SBXvygUA64EVKmcCgADsPAgEQIEAAAqIAai46IxALngEgAD5gCQSogCdAC3wBysgBxbQoezc/i+o +BIAA+6BgFeH7AQDkkAlvxwKAAMAg0Q8A5o0IBsgZAAAo0p4e0JXrFgEv0ASAAPkAIjPiAJ0AG9CO +KdKdC/sKK7K/C5kB55QABKG5gAAt4ggqFgz3oCJIkgCdAC9iruvRARee4YAALmKtL7LkD+gB6BYJ +Jsv9AAD/wB4+YgCdABjQfpmI/8AeZmIAnQAtIBQpUAetmfohhhWnmQEAKSQU9SAg7dIAnQAZ0MEf +0O/qIgAtbwKAAIg0HtCB5t0IDVYCgADxAAUCUgCdACggByshJPygJBWgFIUAlHP+4EYVoAQ1AASj +AvuhGAWgiBEA43YBLEKCgAD5BgAMcAMFAPjgBhWgCCUA6gAFA9BBAABtigIKAmEuIQkpIAfy4KYV +4DilAOx2CS91AoAA+cYADzHJAQDudgYuZAKAAAy8Ag/MApx0KyEJ2iD+oCQVoAwFAOTWnS3dAoAA ++WYADbANBQBYX7jAINEPAIYnKGEV6BYDIzCBAAD2IMYVr8kFAAlmAaaI71wgJEEBAAB48wSIEwj/ +DOnyACZABQAACKgCmBf4+AAE8IgVAHiZHB/QsYgX6HYBJkv9AAD+4AYV4ZkdAPjgRhXgAFIAiRcY +0KqYcJlxifEJWRSZco8WiTYb0KaWEPngpBWimR0AC5kBG9CemBSmiCuyHe/yASRBAQAAKBYKCbsI +63YDIkgJAADr0JYczwKAAAn/CCkWCAxJCOYSCCTICQAA6PMKfM8CgAAoEgQI/wzmmQwDwEEAAOSQ +TG43AoAAmBWIGg9pCPkADuriAJ0AKRIFD4oM+iBGFaSqHQBtqQUPAIYJAmGIEikSAArPDAeICOmc +QCRQQQAAbfkFCSCGCgJjKiIACKoRGNB59uAARLAPFQD/IMYV4AxFAAyqApqVmJSIUy+yGxbQdP2g +FgWoiB0AqP+fl/wAChWgCgUA7NBwFNiBAACxquuDHg0P6AAA/yFGFaAoBQCYm480iFOKNQb/ARbQ +ZuyqAQxCQoAACP8CBv8Cn5woUAkrUAsvUAomUAjs0GAd2QKAAOb/EAxDAoAA+wYADDCmMQDr/wIN +UcKAAAr/Agj/Aoo2GM//n53+YUgV5bYdAOyqAQ3YQoAAC6oC+yHGFaRmAQDo/wELMgKAAAb/AohV +mJ+GViaWEIxXL5YSLJYRi1QrlhMqUAEvUQHr0A4YBAqAAPFABDfSAJ0AKiAHCipA7CEkLVKCgAAL +qgIqlhSIIPoDAh3gCjUA65YXLEYCgAAKiAIaz9v/IsYVoAsFAPkiphWgCCUA6gAFBNGBAABtigIK +AmEoIQkuIAf7AAAUMBqlAAqIAiiWGvmgRAWh7gEAAO4RDs4CCO4CiBErlhkvlh3ulhgkQA0AACgW +AY4RLtadLVAHiif1oABGsAwFAOvUAAVQgQAAWFdG0qDRDwAAAADpEgUmcuGAANMPbckFD0CGCQJl +Y/5DwPCfGYgZH8+NwJoJ2TTp9ggsYeYAAPpAaB2gG8UA/AAiHaANFQBYYLfAINEPAAAAAAD7jwAP +/+36AP/vJA2gCQUAjRHr/BgpUASAAP2gYBXgDBUAWGCswCDRDwAAAAAAAAD8IWYVoAoFAFmLgh7P +c43oihyMG/m/3RiSAJ0AY/+UAJwb6xIJKVAEgABb6HWKHPwhaBWv71IAAGwQBikgBSYgB9gw9gBi +HeAaRQD7IA/NIWYBAAUJR/0jAAFfxQUAiyIZz1wTz17kZAAFg7GAAMAg0Q+IJ4uILoEV6YILJHiB +AAAF+gHq7ggKbwKAAOoWACdxAQAA+yAORGIAnQAsiRSdEavarcwshRT7wA4jogCdAMk0yULZsG1J +BQMAhgkCYSwSASryAAyqCP9AESQiAJ0AmvDTsPhgaB2v/hoAAAAAAOxqEQMk/QAAA6oILaKeCWsK +K7K/96ALAdIAnQAqop0PAgALqgFloE/rbBgpUASAAPwAIh2gDTUAWGBiwCDRDwAAAAAdzy2L2JgS +92AMkJIAnQAMShGjqiyinveADRHSAJ0AKqKdCUwKLMK/DKoBZKGQsL6e2GSvrx7PRJ6gjSD9nywF +oAsVAOumAi7uAoAAB90CnaGJgyjCf/+eXgXomR0AqYiYo+8AFQVIQQAA/55GBeAIBQCxiOmDHgwP +6AAAn6YZz4b5QQYV4BgFAJinjiAI7hEH7gKeqekiBypvAoAAo90n1p0sIAbtIgIkyIEAAOWfAQZg +BQAALCQGiJEsmQQL3QLtJgIkQ0EAAOiWASZgwQAA7JUEJ/kBAAD/BTIN4AwFACqRBR3PB6iomJGd +gIsg7IYCLd4CgAAHuwL7ACYV4AIFANEPAAAdzv+dgIsgwMDshgIt3gKAAAe7AvsAJhXgAgUA0Q8A +AOokAArYBIAAWF5k0qDRDwD/+qQNoAoFAPMgaB3gDgUA/wFmFa/5ogDr6gwBgbmAAApNFOzcCCnA +BIAA7Ew2DcgEgADTD23JBQgAhgkCYYkQqjjtTgwEyQEAAG3pBQgghgkCY40RjBAK3QytzCzMQP3g +BhWv+F4AAMCgWYrUHc7Ei9iIEhnOwfl/8viSAJ0A//noDaAKBQAAwKDA6g6+NP+hBhWv+aoAAIgQ +KIxA+eAGFa/3ZgAAAABsEAQVzsQWzr7wiAATsAlFAOTPJRnGAoAACYgCKGYxBTUC52YyKhgEgADl +ZjgpMASAAANghgYCZwNAhgYCZQMghgYCYwMAhuYMAAEZAQAAIi0B5B8eARIBAAADAm8EwIYDAm0E +oIYDAmsEgIYDAmnRDwAAAGwQBiMgBxTOmAMDQerOlBnPAoAApJkokp76YAEGMAU1AOzCvywZHAAA +K5KdDLsBy7kfzxAdzxD6QAgVoA4FAJ4QnhL8ICYV4AwFAPwAoh3gHuUAWFqCDD8RpP/186YV4AIF +ANEPAAAAAAAAAOs8GClQBIAA/AAiHaANNQBYX6zHJNEPAGwQBiggcPWc7gXgBkUA6s5yFHXkgAAj +IAcDA0EMOREFmQgrkp4kIgAKOgrqor8toYQAACiSndMPCooBZKBR20BY+IvAwfwAAh3gDhUA+Z3S +BaAJBQD4ICYV4A8FAOkWAi1YBIAA6BYAKlAEgABYWloMPBGlzCbGnSogcCsK+wuqAfpOBh2gAgUA +0Q/AINEPAOs8GClQBIAA/AAiHaANRQBYX4LHJNEPAGwQBCMgBxTOURXOTPuckgWhMwEA5EJ/Kc8C +gAClmSiSngo6Ciqiv+NECAwRVAAAKJKdDwIACooBZKBE20D8AAIdoA0lAP4AQh2gHwUAWYv7/52A +BaAIFQDupgAqfgKAAAj/Ap+hjSCdogw8EfWAAEZwCyUA+5OmFeACBQDRDwAA6zwYKVAEgAD8ACId +oA0lAFhfXMck0Q8AbBAULzAQ95xOBeAKdQDz5PAN4AYFAPXgRXCSAJ0AaPIDwCDRDysgB/ogphWn +lQEA+CNmFeG7AQDrFhwslGgAACwgBfeAYIxSAJ0ALSBy86BgN5IAnQDaIFhcXftAQoiSAJ0AjiL7 +wEI4kgCdACoiECwhGog1iynoFg0uf8KAAHj7DwsJQsiZDAtC+2BaEBIAnQCOHfwjiBWgH4UA7BYZ +J2hdAAD73gAPtN0dAO0WCCboDQAAnRqdGfWAT4ISAJ0ADMsRp7sosp63SfkAYpPiAJ0AHc3xK7Kd +DcwKLMK/DLsB+2Bf6BIAnQCMKY4qDA8+LxYXDO4Mf+t3KiAiKSAjCpkM+yBh2BIAnQAoIAcazmv9 +WgAV4YgBAA2ICS6B/gnvNg/uDC6F/i0gIq/dDQ1HLSQi+6BhKBIAnQAoon/uIgsmy/0AAPsABADQ +CBUA4JkaDEAKgADp7ggEQ/0AAAjuAi4mCigSFwzpDPkgX8OiAJ0AiRoezlMsIAcoIQcdzcz+QSQV +4MwRAPWQABY6iAEA7cwCDEMCgAAI/wItISScsIogiB0czdHu3QINVgKAAAqZApmxKiEinbSfswyq +AhzOQZqyKSIQihWZtRnOP/xHEBXgDyUAn7mWt/lhBhWgDhUAnrr8AwAG8E51AA3qOQ3JOQqZAooY +5rYLIcBBAADptgYlyMEAAG2pBQgAhgkCYR7NtZ68jTDzoELSkgCdACoSGekSCS1XAoAAp6oppp0o +IBQvEhekiOgkFCeAwYAALRIXjCkrIDitzJwp82BWP5IAnQAuEhv5wFUZUgCdAMAg0Q8ALiAHLyAF +LTARDg5BLhYc+eAxZFDdOQCPItzg/8AAFbAZxQDnuwgIBAqAAPvgTICSAJ0ALRYWKLKeKhYFLBYZ ++QBN4+IAnQAazXwpsp0PAgAK6goqor8KmQEpFg7pFhooBAqAAPsgTQgSAJ0A+kBoHaALRQBZiZL7 +QE1gUAsVABzNcIzI94BNqJIAnQAtcq4ezffTD/egSf1SAJ0AKnKtLeLMGc1n0w8NrwHvFhUmQ/0A +AP1ATa5iAJ0AmJj9QEkOYgCdACkwFCkkOCgwFSgkOSYkO484jjaNOYw6iTyKOyolJSwlJC0lIy4l +Ii8lCSkkTIg9KCRNLzIQLjIRLiYVJiRxJiRyJiRwKyRzJiYdKyYZKyYYKyYXJiYbJiRPJiROKyUp +LyUoLTARKhIFLiEaDQ1DLSQ6/0Av8KIAnQAtIDgq+vz7wAQFMA8lAA/cAe/QHXVTsQAA/wAAB7AJ +FQD/LQAP+Y4dAAj/CA7/EQ+qDP+bgAWgCRUA/S0ADjAIRQAI2AEK7ywImDkK7i4OnjkZzYvv7ggL +eASAAAifORjNTd1gDI05D90CKCAUDq8c7yU0JUvxAAAOnhykjO4lNSzMAoAA6dkCDXQCgAAO3QIu +EhYpJhAsJBTtJg8nLSmAABrNZS8gB40pnSyOPp4f/iHIFaCfEQDoIQgsyoKAAAqZApng+Zs4BeH/ +AQDqIgAv/AKAAA+IAvkGAAxwDzUA6akCDVYCgAAPqgKa4f+aLAXgKgUAmuPv5gIuUgKAAAuqAo8r +luUo5gQp5gYq5gcv5gnt5ggneMEAAP4jRhXgHUUA/CCGFeAKBQD6IgYVoBmFACkWGCYkFCsSGvph +6BWgDBUA+iImFaANBQD6QAgVoAkFAPggBhXgDgUA+CBGFeAIFQD4ICYVoA8VAFhY4ywgOPrAaB3g +HwUA8iPmFeANJQD9gAQB8OwRAO7bOQtIBIAA8+0ADPDsGQD7xgAPcMwBAPLAaB3gKwUADLM5KyA5 +6GQAC3gEgAD4ZgAJ8EkFAP1gBAbwuwEA+yIAD/CMBQDtyDgNWASAAPpACBWgDQUAnREczVacEAj/ +AgP/AvIj6BXgDQUA/8YAD3AMFQD/wAAXMA9FAP/GAA9wDwUA/iBGFaAOBQBYWLnAwe/NSR1YBIAA ++kAIFaQJBQD4IAYV4A0FAPggRhXgCAUA+CAmFaAOFQBYWK4oEhHpEg8tWASAAPpACBWv/vUAnhD8 +RKQV7//1APxEhBWomQEA+zgAFLiIAQDpiAIO7AKAAP2GAA5wHqUA+CBGFaANBQD8ICYVoAwVAFhY +mgqrAvpACBWv/fUA/CAGFeAMBQAsFgEpISIoIQkuChz5IAAUv//1APkGAAxwDBUA+CBGFaANBQBY +WIsqFhIqIShZivntzRYdYASAAPpACBWv/vUAnhAuEhAt0CwbzRXu3QIGY/0AAOLpEA7oQoAA7ZkC +DmZCgAAMmQILmQKZESgiFRnNDP//4h3gHuUA+iJIFeaIHQD5BgAMcA0FAPggRhWgDBUAWFhw+0Bo +HeAMFQD6QAgVoAgFAPggBhWgDQUA+CAmFaAOBQD4IEYVoA8VAFhYZYkw8yAVepIAnQAuEhkbzGgs +IQftEhgvdwKAAKfuLeadKCANK7I4HczojyCOICkgDCrS+g67CO4gFS3eQoAAC6oIKhYTKyAHK6QH +KaQMLKUHKKQNLDIJLKUJLqQVLjIR+GIIFa/MAQAsFhQopSgspSP9oIgV4AkVAPlFJB3gG0UAK6QF +/0PGFebuHQD6IqgV4P/1AP+gAEawDgUA/ULGFeANFQBY9m4rEhMvEhYoEhQpsBX3YoYdoCsFAOuk +AyxGAoAA5qQALMkCgAD5BgAMcAkVAAmIAuimASeUIYAALCA6wN/9gBP8YgCdAC8wV8TgD+4MnhvA +0f4f4h3gDgUA7CEJJVhBAADsFgwpUASAAFj2U4kcixsmJBQoIBUmpAArpAPomREMQQKAAPkGAAxw +CRUACYgC+UAmFaALxQCKJxzMP4quiRQMAIcKAmEKAmEKAmEKAmEKAmEKAmEKAmEKAmEtEhYrdq34 +QKYd4A4VAO4kFyaBWYAALyA6wI948R4ZzB4oMFAJiAooghDsMFch2UEAAPpAaB2gDSUAC4AABQpH *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Wed Jun 25 10:17:01 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 224323F8; Wed, 25 Jun 2014 10:17:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E9EB24A5; Wed, 25 Jun 2014 10:17:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5PAH0UE030883; Wed, 25 Jun 2014 10:17:00 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5PAH0VG030882; Wed, 25 Jun 2014 10:17:00 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201406251017.s5PAH0VG030882@svn.freebsd.org> From: Marius Strobl Date: Wed, 25 Jun 2014 10:17:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267860 - stable/10/sys/geom/eli X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2014 10:17:01 -0000 Author: marius Date: Wed Jun 25 10:17:00 2014 New Revision: 267860 URL: http://svnweb.freebsd.org/changeset/base/267860 Log: MFC: r267145 Fix the keyfile being cleared prematurely after r259428 (MFCed to stable/10 in r266749). PR: 185084 Submitted by: fk@fabiankeil.de Reviewed by: pjd Modified: stable/10/sys/geom/eli/g_eli.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/eli/g_eli.c ============================================================================== --- stable/10/sys/geom/eli/g_eli.c Wed Jun 25 10:01:02 2014 (r267859) +++ stable/10/sys/geom/eli/g_eli.c Wed Jun 25 10:17:00 2014 (r267860) @@ -990,7 +990,6 @@ g_eli_keyfiles_load(struct hmac_ctx *ctx G_ELI_DEBUG(1, "Loaded keyfile %s for %s (type: %s).", file, provider, name); g_eli_crypto_hmac_update(ctx, data, size); - bzero(data, size); } } @@ -1140,6 +1139,7 @@ g_eli_taste(struct g_class *mp, struct g g_eli_keyfiles_clear(pp->name); return (NULL); } + g_eli_keyfiles_clear(pp->name); G_ELI_DEBUG(1, "Using Master Key %u for %s.", nkey, pp->name); break; } From owner-svn-src-stable@FreeBSD.ORG Wed Jun 25 10:17:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 65A77527; Wed, 25 Jun 2014 10:17:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27EDE24A8; Wed, 25 Jun 2014 10:17:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5PAHAx5030989; Wed, 25 Jun 2014 10:17:10 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5PAHADY030988; Wed, 25 Jun 2014 10:17:10 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201406251017.s5PAHADY030988@svn.freebsd.org> From: Marius Strobl Date: Wed, 25 Jun 2014 10:17:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267861 - stable/9/sys/geom/eli X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2014 10:17:11 -0000 Author: marius Date: Wed Jun 25 10:17:10 2014 New Revision: 267861 URL: http://svnweb.freebsd.org/changeset/base/267861 Log: MFC: r267145 Fix the keyfile being cleared prematurely after r259428 (MFCed to stable/9 in r266750). PR: 185084 Submitted by: fk@fabiankeil.de Reviewed by: pjd Modified: stable/9/sys/geom/eli/g_eli.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/eli/g_eli.c ============================================================================== --- stable/9/sys/geom/eli/g_eli.c Wed Jun 25 10:17:00 2014 (r267860) +++ stable/9/sys/geom/eli/g_eli.c Wed Jun 25 10:17:10 2014 (r267861) @@ -984,7 +984,6 @@ g_eli_keyfiles_load(struct hmac_ctx *ctx G_ELI_DEBUG(1, "Loaded keyfile %s for %s (type: %s).", file, provider, name); g_eli_crypto_hmac_update(ctx, data, size); - bzero(data, size); } } @@ -1133,6 +1132,7 @@ g_eli_taste(struct g_class *mp, struct g g_eli_keyfiles_clear(pp->name); return (NULL); } + g_eli_keyfiles_clear(pp->name); G_ELI_DEBUG(1, "Using Master Key %u for %s.", nkey, pp->name); break; } From owner-svn-src-stable@FreeBSD.ORG Wed Jun 25 13:33:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 64A91636; Wed, 25 Jun 2014 13:33:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 509F42878; Wed, 25 Jun 2014 13:33:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5PDXW48024916; Wed, 25 Jun 2014 13:33:32 GMT (envelope-from cy@svn.freebsd.org) Received: (from cy@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5PDXWZ5024915; Wed, 25 Jun 2014 13:33:32 GMT (envelope-from cy@svn.freebsd.org) Message-Id: <201406251333.s5PDXWZ5024915@svn.freebsd.org> From: Cy Schubert Date: Wed, 25 Jun 2014 13:33:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267868 - stable/10/sys/contrib/ipfilter/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2014 13:33:32 -0000 Author: cy Date: Wed Jun 25 13:33:31 2014 New Revision: 267868 URL: http://svnweb.freebsd.org/changeset/base/267868 Log: MFC r267634: Fix case where fastroute or "to interface" is used with incorrect FIB. PR: 183065 Submitted by: p-freebsd-bugs@ziemba.us Approved by: glebius (mentor) Modified: stable/10/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c ============================================================================== --- stable/10/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Wed Jun 25 12:32:41 2014 (r267867) +++ stable/10/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Wed Jun 25 13:33:31 2014 (r267868) @@ -787,7 +787,7 @@ ipf_fastroute(m0, mpp, fin, fdp) dst->sin_addr = fdp->fd_ip; dst->sin_len = sizeof(*dst); - in_rtalloc(ro, 0); + in_rtalloc(ro, M_GETFIB(m0)); if ((ifp == NULL) && (ro->ro_rt != NULL)) ifp = ro->ro_rt->rt_ifp; From owner-svn-src-stable@FreeBSD.ORG Wed Jun 25 17:10:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 456A9EB5; Wed, 25 Jun 2014 17:10:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 31CD42E9D; Wed, 25 Jun 2014 17:10:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5PHAQA9026355; Wed, 25 Jun 2014 17:10:26 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5PHAQ31026354; Wed, 25 Jun 2014 17:10:26 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201406251710.s5PHAQ31026354@svn.freebsd.org> From: Hajimu UMEMOTO Date: Wed, 25 Jun 2014 17:10:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267874 - stable/10/lib/libc/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2014 17:10:27 -0000 Author: ume Date: Wed Jun 25 17:10:26 2014 New Revision: 267874 URL: http://svnweb.freebsd.org/changeset/base/267874 Log: MFC r267616, 267640: Retooling addrconfig() to exclude addresses on loopback interfaces when looking for configured addresses. This change is based upon the code from the submitter, and made following changes: - Exclude addresses assigned on interfaces which are down, like NetBSD does. - Exclude addresses assigned on interfaces which are ifdisabled. Use SOCK_CLOEXEC. PR: 190824 Submitted by: Justin McOmie Modified: stable/10/lib/libc/net/getaddrinfo.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/net/getaddrinfo.c ============================================================================== --- stable/10/lib/libc/net/getaddrinfo.c Wed Jun 25 17:02:01 2014 (r267873) +++ stable/10/lib/libc/net/getaddrinfo.c Wed Jun 25 17:10:26 2014 (r267874) @@ -62,12 +62,15 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #ifdef INET6 #include #include #include -#include /* XXX */ +#include +#include #endif #include #include @@ -245,6 +248,9 @@ static int get_portmatch(const struct ad static int get_port(struct addrinfo *, const char *, int); static const struct afd *find_afd(int); static int addrconfig(struct addrinfo *); +#ifdef INET6 +static int is_ifdisabled(char *); +#endif static void set_source(struct ai_order *, struct policyhead *); static int comp_dst(const void *, const void *); #ifdef INET6 @@ -1525,10 +1531,11 @@ find_afd(int af) } /* - * post-2553: AI_ADDRCONFIG check. if we use getipnodeby* as backend, backend - * will take care of it. - * the semantics of AI_ADDRCONFIG is not defined well. we are not sure - * if the code is right or not. + * post-2553: AI_ADDRCONFIG check. Determines which address families are + * configured on the local system and correlates with pai->ai_family value. + * If an address family is not configured on the system, it will not be + * queried for. For this purpose, loopback addresses are not considered + * configured addresses. * * XXX PF_UNSPEC -> PF_INET6 + PF_INET mapping needs to be in sync with * _dns_getaddrinfo. @@ -1536,38 +1543,64 @@ find_afd(int af) static int addrconfig(struct addrinfo *pai) { - int s, af; + struct ifaddrs *ifaddrs, *ifa; + int seen_inet = 0, seen_inet6 = 0; - /* - * TODO: - * Note that implementation dependent test for address - * configuration should be done everytime called - * (or apropriate interval), - * because addresses will be dynamically assigned or deleted. - */ - af = pai->ai_family; - if (af == AF_UNSPEC) { - if ((s = _socket(AF_INET6, SOCK_DGRAM | SOCK_CLOEXEC, 0)) < 0) - af = AF_INET; - else { - _close(s); - if ((s = _socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, - 0)) < 0) - af = AF_INET6; - else - _close(s); + if (getifaddrs(&ifaddrs) != 0) + return 0; + + for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) { + if (ifa->ifa_addr == NULL || (ifa->ifa_flags & IFF_UP) == 0) + continue; + if ((ifa->ifa_flags & IFT_LOOP) != 0) + continue; + switch (ifa->ifa_addr->sa_family) { + case AF_INET: + seen_inet = 1; + break; +#ifdef INET6 + case AF_INET6: + if (!seen_inet6 && !is_ifdisabled(ifa->ifa_name)) + seen_inet6 = 1; + break; +#endif } } - if (af != AF_UNSPEC) { - if ((s = _socket(af, SOCK_DGRAM | SOCK_CLOEXEC, 0)) < 0) - return 0; - _close(s); + freeifaddrs(ifaddrs); + + switch(pai->ai_family) { + case AF_INET6: + return seen_inet6; + case AF_INET: + return seen_inet; + case AF_UNSPEC: + if (seen_inet == seen_inet6) + return seen_inet; + pai->ai_family = seen_inet ? AF_INET : AF_INET6; + return 1; } - pai->ai_family = af; return 1; } #ifdef INET6 +static int +is_ifdisabled(char *name) +{ + struct in6_ndireq nd; + int fd; + + if ((fd = _socket(AF_INET6, SOCK_DGRAM | SOCK_CLOEXEC, 0)) < 0) + return -1; + memset(&nd, 0, sizeof(nd)); + strlcpy(nd.ifname, name, sizeof(nd.ifname)); + if (_ioctl(fd, SIOCGIFINFO_IN6, &nd) < 0) { + _close(fd); + return -1; + } + _close(fd); + return ((nd.ndi.flags & ND6_IFF_IFDISABLED) != 0); +} + /* convert a string to a scope identifier. XXX: IPv6 specific */ static int ip6_str2scopeid(char *scope, struct sockaddr_in6 *sin6, u_int32_t *scopeid) From owner-svn-src-stable@FreeBSD.ORG Wed Jun 25 17:34:04 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1DCD680; Wed, 25 Jun 2014 17:34:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE6D9211C; Wed, 25 Jun 2014 17:34:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5PHY4R1039107; Wed, 25 Jun 2014 17:34:04 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5PHY4nj039106; Wed, 25 Jun 2014 17:34:04 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201406251734.s5PHY4nj039106@svn.freebsd.org> From: Hajimu UMEMOTO Date: Wed, 25 Jun 2014 17:34:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267876 - stable/9/lib/libc/net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2014 17:34:05 -0000 Author: ume Date: Wed Jun 25 17:34:04 2014 New Revision: 267876 URL: http://svnweb.freebsd.org/changeset/base/267876 Log: MFC r267616: Retooling addrconfig() to exclude addresses on loopback interfaces when looking for configured addresses. This change is based upon the code from the submitter, and made following changes: - Exclude addresses assigned on interfaces which are down, like NetBSD does. - Exclude addresses assigned on interfaces which are ifdisabled. PR: 190824 Submitted by: Justin McOmie Modified: stable/9/lib/libc/net/getaddrinfo.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/net/getaddrinfo.c ============================================================================== --- stable/9/lib/libc/net/getaddrinfo.c Wed Jun 25 17:27:15 2014 (r267875) +++ stable/9/lib/libc/net/getaddrinfo.c Wed Jun 25 17:34:04 2014 (r267876) @@ -62,12 +62,15 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #ifdef INET6 #include #include #include -#include /* XXX */ +#include +#include #endif #include #include @@ -244,6 +247,9 @@ static int get_portmatch(const struct ad static int get_port(struct addrinfo *, const char *, int); static const struct afd *find_afd(int); static int addrconfig(struct addrinfo *); +#ifdef INET6 +static int is_ifdisabled(char *); +#endif static void set_source(struct ai_order *, struct policyhead *); static int comp_dst(const void *, const void *); #ifdef INET6 @@ -1520,10 +1526,11 @@ find_afd(int af) } /* - * post-2553: AI_ADDRCONFIG check. if we use getipnodeby* as backend, backend - * will take care of it. - * the semantics of AI_ADDRCONFIG is not defined well. we are not sure - * if the code is right or not. + * post-2553: AI_ADDRCONFIG check. Determines which address families are + * configured on the local system and correlates with pai->ai_family value. + * If an address family is not configured on the system, it will not be + * queried for. For this purpose, loopback addresses are not considered + * configured addresses. * * XXX PF_UNSPEC -> PF_INET6 + PF_INET mapping needs to be in sync with * _dns_getaddrinfo. @@ -1531,37 +1538,64 @@ find_afd(int af) static int addrconfig(struct addrinfo *pai) { - int s, af; + struct ifaddrs *ifaddrs, *ifa; + int seen_inet = 0, seen_inet6 = 0; - /* - * TODO: - * Note that implementation dependent test for address - * configuration should be done everytime called - * (or apropriate interval), - * because addresses will be dynamically assigned or deleted. - */ - af = pai->ai_family; - if (af == AF_UNSPEC) { - if ((s = _socket(AF_INET6, SOCK_DGRAM, 0)) < 0) - af = AF_INET; - else { - _close(s); - if ((s = _socket(AF_INET, SOCK_DGRAM, 0)) < 0) - af = AF_INET6; - else - _close(s); + if (getifaddrs(&ifaddrs) != 0) + return 0; + + for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) { + if (ifa->ifa_addr == NULL || (ifa->ifa_flags & IFF_UP) == 0) + continue; + if ((ifa->ifa_flags & IFT_LOOP) != 0) + continue; + switch (ifa->ifa_addr->sa_family) { + case AF_INET: + seen_inet = 1; + break; +#ifdef INET6 + case AF_INET6: + if (!seen_inet6 && !is_ifdisabled(ifa->ifa_name)) + seen_inet6 = 1; + break; +#endif } } - if (af != AF_UNSPEC) { - if ((s = _socket(af, SOCK_DGRAM, 0)) < 0) - return 0; - _close(s); + freeifaddrs(ifaddrs); + + switch(pai->ai_family) { + case AF_INET6: + return seen_inet6; + case AF_INET: + return seen_inet; + case AF_UNSPEC: + if (seen_inet == seen_inet6) + return seen_inet; + pai->ai_family = seen_inet ? AF_INET : AF_INET6; + return 1; } - pai->ai_family = af; return 1; } #ifdef INET6 +static int +is_ifdisabled(char *name) +{ + struct in6_ndireq nd; + int fd; + + if ((fd = _socket(AF_INET6, SOCK_DGRAM, 0)) < 0) + return -1; + memset(&nd, 0, sizeof(nd)); + strlcpy(nd.ifname, name, sizeof(nd.ifname)); + if (_ioctl(fd, SIOCGIFINFO_IN6, &nd) < 0) { + _close(fd); + return -1; + } + _close(fd); + return ((nd.ndi.flags & ND6_IFF_IFDISABLED) != 0); +} + /* convert a string to a scope identifier. XXX: IPv6 specific */ static int ip6_str2scopeid(char *scope, struct sockaddr_in6 *sin6, u_int32_t *scopeid) From owner-svn-src-stable@FreeBSD.ORG Wed Jun 25 18:00:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1B7FEB8; Wed, 25 Jun 2014 18:00:51 +0000 (UTC) Received: from mail.ipfw.ru (mail.ipfw.ru [IPv6:2a01:4f8:120:6141::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79F2C23BE; Wed, 25 Jun 2014 18:00:51 +0000 (UTC) Received: from v6.mpls.in ([2a02:978:2::5] helo=ws.su29.net) by mail.ipfw.ru with esmtpsa (TLSv1:DHE-RSA-AES128-SHA:128) (Exim 4.82 (FreeBSD)) (envelope-from ) id 1WznZQ-000D8c-8J; Wed, 25 Jun 2014 17:49:04 +0400 Message-ID: <53AB0E0C.3050802@FreeBSD.org> Date: Wed, 25 Jun 2014 21:59:40 +0400 From: "Alexander V. Chernikov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Hajimu UMEMOTO , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r267874 - stable/10/lib/libc/net References: <201406251710.s5PHAQ31026354@svn.freebsd.org> In-Reply-To: <201406251710.s5PHAQ31026354@svn.freebsd.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2014 18:00:52 -0000 On 25.06.2014 21:10, Hajimu UMEMOTO wrote: > Author: ume > Date: Wed Jun 25 17:10:26 2014 > New Revision: 267874 > URL: http://svnweb.freebsd.org/changeset/base/267874 > > Log: > MFC r267616, 267640: > > Retooling addrconfig() to exclude addresses on loopback interfaces > when looking for configured addresses. > This change is based upon the code from the submitter, and made > following changes: > - Exclude addresses assigned on interfaces which are down, like NetBSD > does. > - Exclude addresses assigned on interfaces which are ifdisabled. > > Use SOCK_CLOEXEC. > > PR: 190824 > Submitted by: Justin McOmie > > Modified: > stable/10/lib/libc/net/getaddrinfo.c > Directory Properties: > stable/10/ (props changed) > > Modified: stable/10/lib/libc/net/getaddrinfo.c > ============================================================================== > --- stable/10/lib/libc/net/getaddrinfo.c Wed Jun 25 17:02:01 2014 (r267873) > +++ stable/10/lib/libc/net/getaddrinfo.c Wed Jun 25 17:10:26 2014 (r267874) > @@ -62,12 +62,15 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > +#include > #include > #ifdef INET6 > #include > #include > #include > -#include /* XXX */ > +#include > +#include > #endif > #include > #include > @@ -245,6 +248,9 @@ static int get_portmatch(const struct ad > static int get_port(struct addrinfo *, const char *, int); > static const struct afd *find_afd(int); > static int addrconfig(struct addrinfo *); > +#ifdef INET6 > +static int is_ifdisabled(char *); > +#endif > static void set_source(struct ai_order *, struct policyhead *); > static int comp_dst(const void *, const void *); > #ifdef INET6 > @@ -1525,10 +1531,11 @@ find_afd(int af) > } > > /* > - * post-2553: AI_ADDRCONFIG check. if we use getipnodeby* as backend, backend > - * will take care of it. > - * the semantics of AI_ADDRCONFIG is not defined well. we are not sure > - * if the code is right or not. > + * post-2553: AI_ADDRCONFIG check. Determines which address families are RFC 2553 is obsoleted by RFC 3493. > + * configured on the local system and correlates with pai->ai_family value. > + * If an address family is not configured on the system, it will not be > + * queried for. For this purpose, loopback addresses are not considered > + * configured addresses. > * > * XXX PF_UNSPEC -> PF_INET6 + PF_INET mapping needs to be in sync with > * _dns_getaddrinfo. > @@ -1536,38 +1543,64 @@ find_afd(int af) > static int > addrconfig(struct addrinfo *pai) > { > - int s, af; > + struct ifaddrs *ifaddrs, *ifa; > + int seen_inet = 0, seen_inet6 = 0; > > - /* > - * TODO: > - * Note that implementation dependent test for address > - * configuration should be done everytime called > - * (or apropriate interval), > - * because addresses will be dynamically assigned or deleted. > - */ > - af = pai->ai_family; > - if (af == AF_UNSPEC) { > - if ((s = _socket(AF_INET6, SOCK_DGRAM | SOCK_CLOEXEC, 0)) < 0) > - af = AF_INET; > - else { > - _close(s); > - if ((s = _socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, > - 0)) < 0) > - af = AF_INET6; > - else > - _close(s); > + if (getifaddrs(&ifaddrs) != 0) > + return 0; Well, two socket() calls has some predictable cost, but getaddrinfo() can be quite slow for system with many interfaces. It would be better to introduce some kernel sysctls to report IPv4/IPv6 status... It looks like style(9) needs to be altered, too.. > + > + for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) { > + if (ifa->ifa_addr == NULL || (ifa->ifa_flags & IFF_UP) == 0) > + continue; > + if ((ifa->ifa_flags & IFT_LOOP) != 0) > + continue; This is not correct. RFC 3493 talks about "loopback address" (and specifies explicit IN6_IS_ADDR_LOOPBACK macro to test in IPv6 case) and not about loopback interface. > + switch (ifa->ifa_addr->sa_family) { > + case AF_INET: > + seen_inet = 1; > + break; > +#ifdef INET6 > + case AF_INET6: > + if (!seen_inet6 && !is_ifdisabled(ifa->ifa_name)) > + seen_inet6 = 1; > + break; > +#endif > } > } > - if (af != AF_UNSPEC) { > - if ((s = _socket(af, SOCK_DGRAM | SOCK_CLOEXEC, 0)) < 0) > - return 0; > - _close(s); > + freeifaddrs(ifaddrs); > + > + switch(pai->ai_family) { > + case AF_INET6: > + return seen_inet6; > + case AF_INET: > + return seen_inet; > + case AF_UNSPEC: > + if (seen_inet == seen_inet6) > + return seen_inet; > + pai->ai_family = seen_inet ? AF_INET : AF_INET6; > + return 1; > } > - pai->ai_family = af; > return 1; > } > > #ifdef INET6 > +static int > +is_ifdisabled(char *name) > +{ > + struct in6_ndireq nd; > + int fd; > + > + if ((fd = _socket(AF_INET6, SOCK_DGRAM | SOCK_CLOEXEC, 0)) < 0) > + return -1; > + memset(&nd, 0, sizeof(nd)); > + strlcpy(nd.ifname, name, sizeof(nd.ifname)); > + if (_ioctl(fd, SIOCGIFINFO_IN6, &nd) < 0) { > + _close(fd); > + return -1; > + } > + _close(fd); > + return ((nd.ndi.flags & ND6_IFF_IFDISABLED) != 0); > +} > + > /* convert a string to a scope identifier. XXX: IPv6 specific */ > static int > ip6_str2scopeid(char *scope, struct sockaddr_in6 *sin6, u_int32_t *scopeid) > > From owner-svn-src-stable@FreeBSD.ORG Wed Jun 25 18:59:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 05444B31; Wed, 25 Jun 2014 18:59:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E67A9295B; Wed, 25 Jun 2014 18:59:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5PIxh0S078213; Wed, 25 Jun 2014 18:59:43 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5PIxhSN078212; Wed, 25 Jun 2014 18:59:43 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406251859.s5PIxhSN078212@svn.freebsd.org> From: Glen Barber Date: Wed, 25 Jun 2014 18:59:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267878 - stable/10/usr.bin/grep X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2014 18:59:44 -0000 Author: gjb Date: Wed Jun 25 18:59:43 2014 New Revision: 267878 URL: http://svnweb.freebsd.org/changeset/base/267878 Log: MFC r267693: Fix a bug in bsdgrep(1) where patterns are not correctly detected. Certain criteria must be met for this bug to show up: * the -w flag is specified, and * neither -o or --color are specified, and * the pattern is part of another word in the line, and * the other word that contains the pattern occurs first PR: 181973 Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.bin/grep/util.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/grep/util.c ============================================================================== --- stable/10/usr.bin/grep/util.c Wed Jun 25 17:54:36 2014 (r267877) +++ stable/10/usr.bin/grep/util.c Wed Jun 25 18:59:43 2014 (r267878) @@ -336,7 +336,7 @@ procline(struct str *l, int nottext) } /* One pass if we are not recording matches */ - if ((color == NULL && !oflag) || qflag || lflag) + if (!wflag && ((color == NULL && !oflag) || qflag || lflag)) break; if (st == (size_t)pmatch.rm_so) From owner-svn-src-stable@FreeBSD.ORG Wed Jun 25 19:00:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46D04C69; Wed, 25 Jun 2014 19:00:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33E2F29CE; Wed, 25 Jun 2014 19:00:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5PJ0Cp2078540; Wed, 25 Jun 2014 19:00:12 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5PJ0CbN078539; Wed, 25 Jun 2014 19:00:12 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201406251900.s5PJ0CbN078539@svn.freebsd.org> From: Glen Barber Date: Wed, 25 Jun 2014 19:00:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267879 - stable/9/usr.bin/grep X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2014 19:00:12 -0000 Author: gjb Date: Wed Jun 25 19:00:11 2014 New Revision: 267879 URL: http://svnweb.freebsd.org/changeset/base/267879 Log: MFC r267693: Fix a bug in bsdgrep(1) where patterns are not correctly detected. Certain criteria must be met for this bug to show up: * the -w flag is specified, and * neither -o or --color are specified, and * the pattern is part of another word in the line, and * the other word that contains the pattern occurs first PR: 181973 Sponsored by: The FreeBSD Foundation Modified: stable/9/usr.bin/grep/util.c Directory Properties: stable/9/usr.bin/grep/ (props changed) Modified: stable/9/usr.bin/grep/util.c ============================================================================== --- stable/9/usr.bin/grep/util.c Wed Jun 25 18:59:43 2014 (r267878) +++ stable/9/usr.bin/grep/util.c Wed Jun 25 19:00:11 2014 (r267879) @@ -336,7 +336,7 @@ procline(struct str *l, int nottext) } /* One pass if we are not recording matches */ - if ((color == NULL && !oflag) || qflag || lflag) + if (!wflag && ((color == NULL && !oflag) || qflag || lflag)) break; if (st == (size_t)pmatch.rm_so) From owner-svn-src-stable@FreeBSD.ORG Wed Jun 25 19:41:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 167DD20F; Wed, 25 Jun 2014 19:41:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 013B82D99; Wed, 25 Jun 2014 19:41:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5PJfdb9001762; Wed, 25 Jun 2014 19:41:39 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5PJfd7P001760; Wed, 25 Jun 2014 19:41:39 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201406251941.s5PJfd7P001760@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 25 Jun 2014 19:41:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267882 - in stable/9/sys: conf dev/cxgbe dev/cxgbe/firmware modules/cxgbe/t4_firmware modules/cxgbe/t5_firmware X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2014 19:41:40 -0000 Author: np Date: Wed Jun 25 19:41:39 2014 New Revision: 267882 URL: http://svnweb.freebsd.org/changeset/base/267882 Log: MFC r267757: cxgbe(4): Update the bundled T4 and T5 firmwares to versions 1.11.27.0. Obtained from: Chelsio Added: stable/9/sys/dev/cxgbe/firmware/t4fw-1.11.27.0.bin.uu - copied unchanged from r267757, head/sys/dev/cxgbe/firmware/t4fw-1.11.27.0.bin.uu stable/9/sys/dev/cxgbe/firmware/t5fw-1.11.27.0.bin.uu - copied unchanged from r267757, head/sys/dev/cxgbe/firmware/t5fw-1.11.27.0.bin.uu Deleted: stable/9/sys/dev/cxgbe/firmware/t4fw-1.9.12.0.bin.uu stable/9/sys/dev/cxgbe/firmware/t5fw-1.9.12.0.bin.uu Modified: stable/9/sys/conf/files stable/9/sys/dev/cxgbe/firmware/t4fw_cfg_uwire.txt stable/9/sys/dev/cxgbe/firmware/t4fw_interface.h stable/9/sys/dev/cxgbe/firmware/t5fw_cfg_uwire.txt stable/9/sys/dev/cxgbe/t4_sge.c stable/9/sys/modules/cxgbe/t4_firmware/Makefile stable/9/sys/modules/cxgbe/t5_firmware/Makefile Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/conf/files ============================================================================== --- stable/9/sys/conf/files Wed Jun 25 19:22:40 2014 (r267881) +++ stable/9/sys/conf/files Wed Jun 25 19:41:39 2014 (r267882) @@ -962,7 +962,7 @@ t4fw.fwo optional cxgbe \ no-implicit-rule \ clean "t4fw.fwo" t4fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t4fw-1.9.12.0.bin.uu" \ + dependency "$S/dev/cxgbe/firmware/t4fw-1.11.27.0.bin.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t4fw.fw" @@ -986,7 +986,7 @@ t5fw.fwo optional cxgbe \ no-implicit-rule \ clean "t5fw.fwo" t5fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t5fw-1.9.12.0.bin.uu" \ + dependency "$S/dev/cxgbe/firmware/t5fw-1.11.27.0.bin.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t5fw.fw" Copied: stable/9/sys/dev/cxgbe/firmware/t4fw-1.11.27.0.bin.uu (from r267757, head/sys/dev/cxgbe/firmware/t4fw-1.11.27.0.bin.uu) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/sys/dev/cxgbe/firmware/t4fw-1.11.27.0.bin.uu Wed Jun 25 19:41:39 2014 (r267882, copy of r267757, head/sys/dev/cxgbe/firmware/t4fw-1.11.27.0.bin.uu) @@ -0,0 +1,9019 @@ +/*- + * Copyright (c) 2014 Chelsio Communications, Inc. + * All rights reserved. + * + * 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. + */ +begin-base64 644 t4fw +AAAD6QELGwAAAQkEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAA8wD2wPjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAENoZWxzaW8gRlcgUlVOTUVNIERFQlVHPTAgKEJ1aWx0IFdlZCBKdW4gMTggMTc6 +MTk6MzMgUERUIDIwMTQgb24gY2xlb3BhdHJhLmFzaWNkZXNpZ25lcnMuY29tOi9ob21lL2Zpcm13 +YXJlL2N2cy9mdy1yZWxlYXNlKSwgVmVyc2lvbiBUNHh4IDAxLjBiLjFiLjAwAAAAAAAAAG/bT/dg +AMgA4QB78AAQAADhADC4eP///x/84UCAAAAB4QB7cAAAEAAf//zc4QGUcCAAAADhAZwE4QB5AAAC +AEDhAHmAAAYAQAACAAoABgAK4QB5BAAMAACAAAEC4QB7POEAe0ThAHvk4gAAAAABAADhAHuQIAAA +AAAAgADhAHsAAABAAeEAe5wAAEAAREREQuAAAADjAARzREREQOMACAAgAAJcAAAAAB//khAAAAAA +H/+SFAAAAAAf/5IYAAAAAB//khwf/8AAAAAAAAAAAADAABL/zRP/zZMgEv/NE//NhCAEMwGTIBH/ +zBL/zJIQEf/MEv/MkhAR/8wB9DER/8siCv+SEADkMQAFMQECABL/yALnMQIWABH/x4EQAQFfwCEC +EQHJERH/xBL/xJIQEf/EEv/EkhBgAA8R/78S/8OSEBH/vxL/wpIQgRAR/8HAIJIREv/AkhLAIJIT +Ev+/khCCEALyUGUv9xH/vccvkhAR/7ySEBL/vBP/vJMgwDKTIRP/u5MigiIS/7oT/7qTICMiIRT/ +uQQzAck4E/+4gzADgxQIMxEU/7akM5MhE/+qkyJgAAjCMJMhE/+nkyIS/7GQIJAhkCKQI5AkkCWQ +JpAnkCiQKZAqkCuQLJAtkC6QLyAmECAmEYIiEv+kwDAtNzAtNzQtNzgtNzwjPQFyM+0AAgAS/6HA +MC83AC83EC83IC83MCM9AXIz7QACABL/l8AwKDcwKDc0KDc4KDc8Iz0BcjPtEv+VwDAnNwAnNxAn +NyAnNzAjPQFyM+0S/5AV/5AW/5HAMNcgBWYBYAAZAAAAAAAAAAQ2BQACANMP0w8FMwxuOxQHRxQH +BEN2MeYENgUFMwxvO+0AAgAS/4MV/4EjCgACJwIHBEMEPgUFMwwHRxRvO/ADAgAS/33JLoMghCGF +IrwidDsOhlC0VZYwtDN0M/Rj/+YAZT/iZV/fEv9xwDIDLgUDAgAS/2jAMCg3QCg3RCg3SCg3TCM9 +AXIz7QACABL/ay0nAMARAUkxAEgxAQIAwAAU/2gE0jEV/2eUUBT/ZwTTMRX/ZpRQFP9mBNQxFf9m +lFAU/2UE1TEV/2WUUBD/ZQMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf/AAA +H/wAAOMACfgf/AAAH/wAAOMACfgf/AAAH/wAAOMACfgf/4AAH/+KMOMACfgf/4owH/+KMOMAFCgf +/4owH/+KMOMAFCgf/4owH/+LuOMAFCgf/4u4H/+SCOMAFbAf/5IQH/+xHOMAHAgf/7EcH/+xHOMA +OxQf/8AAH//9yeMAOxQgAAAAIAABauMAeOAgAAF4IAABfOMAekwgAAF8IAABheMAelAgAAGYIAAB +nOMAelwgAAGcIAABpeMAemAgAAG4IAABvOMAemwgAAG8IAABxeMAenAgAAHYIAAB2OMAenwgAAHc +IAAB4uMAenwgAAH4IAAB+OMAeoQgAAH8IAAB/OMAeoQgAAIYIAACGOMAeoQgAAIcIAACHOMAeoQg +AAI4IAACOOMAeoQgAAI8IAACPOMAeoQgAAJYIAACWOMAeoQgAAJcIAACYuMAeoQgAAJ4IAACeOMA +eowgAAJ8IAACguMAeowgAAKYIAHZmeMAepQgAwAAIAMT/OMCUZggAxP8IAMT/OMCZZQgAxQAIAaQ +XOMCZZggBpBgIAaWEOMF4fggCAAAIAgOMOMF56ggCA4wIAkeUOMF9dggCR5QIAkfHOMHBfggCwAA +IAsAAOMHBsQgCwAAIAsAAOMHBsQgCwAAIAuPr+MHBsQAAAAAAAAAAAAAAAAgABGWIAARiCAAFXog +ABGIIAAU9SAAEYggABI9IAAUjSAAFBIgABGIIAATvSAAE3QgABMJIAARdSAAErQgABGIIAARiCAA +EYggABJcAAAAAP///////w/8///w////APwgAKejIACo4yAAqRMgAKjZIAComSAAqI8gAKhUIACo +SiAAqEAgAKfwIACpESAAp+YgAKfMAAAAAAAAAAAAAAAAAAAACgAAAAoAAAAUAAAACgAAAAoAAAAK +AAAACgAAAAoAAAAKAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAIAAwAEAAUABgAHAAgA +CQAKAA4AEQAVABkAHgAjAC0APABQAGQAyAEsAZAB9AAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAgAC +AAMAAwADAAMABAAEAAQABAAEAAUABQAFAAUABQAFAAYABgAHAAcAAAACAAAABgAAAAoAAAAOAAAA +FAAAABwAAAAoAAAAOAAAAFAAAABwAAAAoAAAAOAAAAFAAAABwAAAAoAAAAOAAAAFAQAABwAAAAoA +AAAOAAAAFAAAABwAAAAoAAAAOAAAAFAAAABwAAAAoAAAAOAAAAFAAAABwAAAAoAAAAOAAP8AAQIC +AAAAAAAAAAAAAAAQIEAAAAAAAAAAAAAAAAAABAACAAEAAIAAQAAgABAACCBAgAAAAAAAAAAAAAAA +AAAgCJ5CIAieQiAIngEgCJ3RIAidmiAInYAgCJ2AIAie9iAInvYgCJ2AIAie9iAInvYgCJ2AIAie +9iAInUwgCJ72IAie9iAInvYgCJ72IAie9iAInvYgCJ72IAie9iAInvYgCJ72IAie9iAInvYgCJ72 +IAie9iAInvYgCJ72IAidYSADCawAAAAAIAMJsAAAAAEgAwm4AAAAAgAAAAAAAAAAIAMJlAAAAAEg +AwmYAAAAAiADDbgAAAD/IAMHrAAAAP8gAwesAAAAACADDbgAAAAAIAMIvAAAAAEgAwjEAAAABCAD +CMwAAAAIIAMI2AAAACAgAwjoAAAAQCADCPAAAACAIAMI+AAAAQAgAwkAAAACACADCRQAAAQAIAMJ +KAAACAAgAwlAAAAQACADCVQAACAAIAMJZAAAQAAgAwlwAACAACADCYQAAQAAAAAAAAAAAAAgAwio +AAAAECADCLAAAAARIAMIkAAAAAAgAwiUAAAAASADCJgAAAACIAMIoAAAAAMAAAAAAAD//wAAAAAA +AP//IAMIEAAAAQAgAwgcAAAAgCADCCwAAABAIAMIPAAAACAgAwhMAAAAECADCFwAAAAIIAMIaAAA +AAQgAwh0AAAAAiADCIAAAAABAAAAAAAAAAAAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAA +AQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAABwAAAAcAAAAGAAAABgAMNQAAEEaq +ABRYVQAYagAAACtoAAAjgwAAGGoAAA0GAAALKgAAAAAAAAAAAAAAAAAAaCsAAGgrAABsggAAb5wA +AEpoAABKaAAATSkAAEpoAABO6gAATJgAAFI9AABPuAABhqAAAYagAAII1gACCNYAAgjVAAII1QAC +iwsAAosLAAII1QACtnIAArZyAAMNQAAEBgcAAAAAAAAAAAAAAAAgCRYVIAkWFSAJFgogCRX/IAkV +8SAJFekgCRXpIAkWGCAJFhggCRXpIAkWGCAJFhggCRXpIAkWGCAJFekgCRYYIAkWGCAJFhggCRYY +IAkWGCAJFhggCRYYIAkWGCAJFhggCRYYIAkWGCAJFhggCRYYIAkWGCAJFhggCRYYIAkWGAACAgUF +CAgLCw4OEREUFBcXGhodHSAgIyMmJikpLCwvLzIyNTU4ODs7AAAAAAAAAAEDEREICBAJAwEAAAAA +AAAgBLdgIAGTPCAANnggAWi8IAGPhCABiXwgAUegIAPaHB//6jQgAJRkIACppB//3RAgAGG8IABT +IAAAAAAAAAAAIAFqcCAAgbAAAAAAAAAAAB//1fQf/8V8H//ClB//wDAgAE4gIABGRCAAQoAgAKBk +H//j6CAGZ7gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAGbACABergg +ALNIIACyfB//8Ggf/9CgH//MOCAAfyggBRkwIAEoGCABB6QgAPCgIADkqCAA2CwgAMqkIAC2ICAE +uxggA/YcIAEcmCAEFzQgAccsIABhfAAAAAAgALOkIAWDDCAApyAgAXK4IAACmCAAmiQAAAAAAAAA +AB//87AgALNkIAP4zAAAAAAAAAAAIANWRCAAJtQgAB0MIAAlwAAAAAAgADFwIAAuyCAAK8gAAAAA +IAA2OCABIFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgADPIIAS3AAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAA1eCADXdAgADSAAAAAAAAAAAAAAAAAAAAAAAAA +AAQAAAAEAAAACAsAAAAgAxFQCAAAACADEVwIAAAAIAMRaAoAAAAgAxF0DAAAACADEYASAAAAIAMR +kA0AAAAgAxGkDgAAACADEbQTAAAAIAMRxAoAAAAgAxHYDgAAACADEeQYAAAAIAMR9A0AAAAgAxIQ +DgAAACADEiAQAAAAIAMSMBIAAAAgAxJEDgAAACADElgQAAAAIAMSaBEAAAAgAxJ8CgAAACADEpAL +AAAAIAMSnA0AAAAgAxKoFAAAACADErgKAAAAIAMS0A8AAAAgAxLcBgAAACADEuwGAAAAIAMS9AYA +AAAgAxL8BgAAACADEwQGAAAAIAMTDAkAAAAgAxMUBgAAACADEyAEAAAAIAMTKAYAAAAgAxMwCwAA +ACADEzgLAAAAIAMTRAQAAAAgAxMoBAAAACADE1AJAAAAIAMTWAkAAAAgAxNkAAAAAAAAAAANAAAA +IAMTcAoAAAAgAxOABgAAACADE4wCAAAAIAMTlAMAAAAgAw2MAQAAACADE5gAAAAAAAAAANdqpHjo +x7dWJCBw28G9zu71fA+vR4fGKqgwRhP9RpUBaYCY2ItE96///1uxiVzXvmuQESL9mHGTpnlDjkm0 +CCH2HiViwECzQCZeWlHptseq1i8QXQJEFFPYoeaB59P7yCHhzebDNwfW9NUNh0VaFO2p4+kF/O+j ++GdvAtmNKkyK//o5Qodx9oFtnWEi/eU4DKS+6kRL3s+p9rtLYL6/vHAom37G6qEn+tTvMIUEiB0F +2dTQOebbmeUfonz4xKxWZfQpIkRDKv+Xq5Qjp/yToDllW1nDjwzMkv/v9H2FhF3Rb6h+T/4s5uCj +AUMUTggRofdTfoK9OvI1KtfSu+uG05EHDBEWBwwRFgcMERYHDBEWBQkOFAUJDhQFCQ4UBQkOFAQL +EBcECxAXBAsQFwQLEBcGCg8VBgoPFQYKDxUGCg8VH//AAAAEACAgBpYQIAaZwB/83gAf/53UIAaW +QB//nuQf/6IwA4AAAIEAAAAf/6IgAP/4AAEAAAAAEAAAgQQBAIEEAAABBAAAAQQBAIAAAAAABf// +H/+FYAYAAAAqAAAAH//P+CAEMngCAAAAgBAAAEFAAABBQAEAgwAAAf//v/+/////H/+XcAQAAAgg +AwuggYAAAAwAAAAf/5Jg//8AAP//AP8AAQAAAAD//x//raAf/5q0D////x//n+gf/OIAH/+kHB// +oOQf/6OQH/+kFB/84ODg//4A4QGSAB//l+QA////H/+fnB//m/QEQQAIBAEACKUAAADAAAAAwAQA +ADAAAAAf/6AgAAAPoAAA/4AgBpBgIAtUYOEALgAf/6AUH/+b/B//oPAf/5xgH/+gQOAAAKDhADC4 +AACAAOEAYBAAAEAA4QIQAOECMADhAlAA4QJwAOEAEAgf/OFA4QB7cB//sNwf/7DUH/zgCB//sNgf +/7D0H/+w7B//sPAf/7EMH/+xBB//sQgf/53UH/+toCAGlkAf/N4AH/+e5AEAAAAf/6BgH/+fbB// +nAQf/6DsAAD/gAAAEIAf/5JgH/+g+B//oPQf/6FYBAAACAUAAACD/wAAgQAAAAAQAAAqAAAAIAAH +7CADCsgf/4lwH/+FYB//ojBnRSMB782riZi63P4QMlR2H/+AAAAAPyggAw2Mz////yALBhAQAAAA +P////wIAAABAAAAA//9//yALBzAf/6IgIAAhsCALB9AIAAAAAP///yALCEAgCwdg9////yALCjAg +AB5Y//7//yALFCAAIAAAAABAAAwAAAAAAP//AACAAA0AAAAgACRg//v//w/2gAAAA///AAAn/yAL +GFAgCxiAAAEAAAAEAAAfgAA/H/+feCAAMXAgADOEIAAuyCALGRAgCxmwIAAryCALGgAgCxqQBAEA +COAAAAAf/5+EUwAAAFIAAABRAAAAIAHRpB//nFggCx0wIAsdkCALHWAgCyAQH/+fnCALIGAf/5v8 +H/+fUCALIgAUAAAAgAAAAIAAAAJ4AAAAgAAABoAAsAAAAAoAAOMwkv//8ACAALEA4QGaAAACAAAg +CyHAH/+ZmAAAfkAf/5+IAP/AAB//n4wf/5LkKAAAACYAAAAgCyIwH/+TIAYAAAAFgAAAIAtoEB// +m8ArAAAAIABJCB//nVA1AAAAA4AAAAMAAAAH////AD///4BAAAAID///H////yAAAAAAAMAAPQAA +AB//mBAHAAAAgQQBAIEEAAAf/52wAAA6mMMAAAAAAA//AEMAAAAACAAEAAAAIAtocB//sFAf/63A +H/+XcAAGAADhAHoAH/+X4B//n3AgoAAAH/+cCB//newf/534IAtooAADB4AgC2kQH/+Z4ABAAAAA +AAkAAAAwAv/8+H/AAAAAo/+7AKP/ugDgAwAAg/+2AA////8P//gA/wAAACALaVAgCyQwIAskYCAL +aeAADwAAAAoAAP//AA8f/590A//AAIP/wAAgC2pgIAtq0B//oAQf/OIAH/+kHB//rjD/YPAAH/+u +EB//pCAf/5IgBIAACB//gFAARAAA/x///wDAAAAAAIEA8AAAAIGAAAD/f///H/zgdB//mrT/v/// +//8AAACAAAAAAIbdH/+TEB/84gzuAAAADwAAAB//n5Qf/6QYAAAPSB/84ggf/5gMH/+AYCAGkkAA +ADAAAAAnEB//3IAgC3LwH/+g5B//oEQAAP/+H/+b8N6tvu8gAwYQNAAAAD8AAAAAAIkGAJkAAB// +rXgQAAcCAcCAAB//rEiZAAAAH/+uNACIAAiCgAABH/+tyB//rNQDFQAAAxEAAAAPA/8gCyjQIAsp +MCALKYAgCyngIAspACAA30QgCyuAIAsrsCALLAAgCyxgIADk8CkAAAAgAOtsIAtzQCALc6AgC3QQ +8PDw8P8A/wCqqqqqzMzMzB//sEAAAB3gH/+uSCAA/EggC3SgIAt1EAAPQkAgBB3QH/+fzB//oDAA +CQAAAABIAIIAAAAgASBYIAt1kCALdgAACQAIH/+tPDAAAAAf/62IAAAIBgAAiMwAAIkUfwAAACAL +enAgC3sAAADgACALeLAgC3rQH/+ZnAAEA/8KAAAAH/+sZB//n0Af/5tgg/+3AIP/tiAgCzSw4QAA +ADMAAAAf/6xUH/+uhAP/4AAAP/aQAAAdKB//rZAD//AAIAtlYCALZSAgC2WAH/+vkCALNPAaAAAA +H/+b+CALNUAgAWAwH/+tjB//ncQAD///AADerR//rUAgC3uQH/+cICADB2Af/5wQH/+eBCAAZeAf +/5zsIAAFzB//mSwf/5esIAt8oB//nGwf/6L0H/+jgCALfPDABAAAH/+eECADDFAgAGbA4AEAACAL +fjAgCzhAIACkrCAAojAgC32wIAt+ACAGkGAf/5m8IAs5sOD//gAgC1iAH/+kLCALQfAf/5RIIAtM +wCALTVAgC1AAIAtQMEgAAAAgAaMgH/+dYCABpSQf/5hgH/+a9B//neQf/5tMAAAK4AAACOwf/54c +IAaWNB//m9Qf/5fk4QAuAB//nijhAF4A4QIOAP//v//hAA4A4QGOAP//vv8f/5v0IAGqQCABtmjg +BQAAA/8AAB//m5QgAwugPAAAAAAF//+DAAAAH/+a/CABy+wf/6BUIAtXoAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAgYAAAAAAAAD/////////////////////H//70B//+9Af//uYH//7mB//+5gf//uY +H//1KB//+FAf//asH//2rB//9qwgBmmoAAAAAAAAAAAAAAAAAAAAACAGbSggBm0oAAAAAAAAAAAA +AAAAAAAAACAGaaggBmmoH//5RB//+UQf//lEH//5RB//+UQf//lEAAAAACABq1gAAAAAAAAAAAAA +AAAAAAAAAgEAAAAAAAAAAAAAAAAAAAQAAAAAAAAAgYAAAAAAABAFAAAAAAAABAAAAAAAAAAAAAAA +AAAAAACBAAAAAAAAGAUAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAACAKABHyixPyi9MPA+YxAQIAFvKJF/KKd2sGkGC0Zndj+FQPBVWz +4A8UAGP/+QAAAGwQCCggBScgBykxBfgghhXgGUUA+QAOhWF3AQCKIhbyfP3k+gXgDJUA8Ve8DeAP +pQDq8ngbxwKAAKaIK4KeCnkKKZK//WANg6IAnQAogp0JiAHoFgUkDVGAACjSCPcADaiSAJ0AK2Ku +7PJtFYq5gAAqYq0swn/sqwEEc/0AAP1ACh4iAJ0ALtYI/UAKHiIAnQAvIBSk/w8PRy8kFPXgDF3S +AJ0AGfJfLiIWLCEpiBUf8l2uzJ+A6iIeLmfCgAD9AGYVoA0lAP0ARhXgC2UA7fJWHVYCgAALqgKL +FJqB6QAVBEBBAACJFQgAiig8EP0gxhXgTAUA/SDmFaAMRQDsuzYEyIEAAG25BQgAhgkCYe7yRxWg +h4AAiBXuAAUNzwKAAKmI6IwgJaQ1AAALyQxtmQIIAmEtISnTD+ohKCboBQAADQ1PLSUp/UAHdGIA +nQD/5HAF4AwVAPogqBXgHuUA6iIeLs1CgAD4ICYV4AgFAPggBhWgDQUA6BYCJdmBAABYfoL+4AAX +N8UBAPfAAEcwDZUA7eadKAQKgAD5gAVZUgCdAMAg0Q8AAADqJAAJ2ASAAOxEAAroBIAAWIBp0qDR +DwAAAADAsA+JNOnWCC32LgAA+kBoHaAbxQD8AAIdoA0VAFiDnmP/wQAA6iQACtgEgABYgerSoNEP +AP/5WA2gCAUA6iQAA9hhAAD8AAIdoA2VAFiDkmP/kcCgWa5sHfH/iNj5H/IIkA+lAGP/pNogWAti +Y/5wAAAAAAD8AAId4AoFAPpFJB2v/CoAiifrRAAKaASAAPtEABWgDAUAWHn90qDRDwAAAGwQBi4i +EJQR5SEaKtAEgAAmIAf2QSgV4B/FAOoWACrHwoAA/wJSDeFmAQAHCULxIHAN4oUBAGSB8tTwKSAF +/EBIFaAbhQD+ngANsBpFAPsgD5UiAJ0A5/HWHgvWAADl8dMbTwKAAPTADBISAJ0ApZktkp4Hagoq +or/3oBG7UgCdACmSnQqZAe6UAASOSYAAjCmLKgwHPgy7DPdgCQPiAJ0AKiBOLSBMsaj7oA3sIAsV +ACgkTiowASkiGPNADfaSAJ0AKyAHLSEk+GAkFaAMVQD9QAQFMLsRAOCqEQ3agoAAC6oCG/G7CogC +KiEHLCEJC90C+wYADHqqAQDr8bYdUwKAAArMAiohIpjgiCCc453kC6oCmuL9AAAUMAplAAqIApjh +LSIQneUsIDgb8av4ACIdoE0VAPnBJhWgzBkADNg5HfGnlOgMvTn5pgAOsAsFAJvnGPGanebt8ZsU +4AUAACwmGJvrmeroABUHSMEAAAkAiu3mDiHIQQAA7+YPJ3kBAAAJIIYPAmMJAIYPAmEMbhGl7urm +nSOAsYAAiCkvIDiniCgmCfPgCBeSAJ0AiRAJCUf5IAcBUgCdAMAg0Q+eEuokAAvYBIAAWILMjhL/ +TRAN4B/FAOwSASlQBIAA7RIAKdgEgABYf8XSoNEPAB7xcoro90AGOJIAnQAMaRGlmSuSnvdgBotS +AJ0AKZKdB2sKK7K/C5kBZJC/sKyc6O6UAAzzfgAAYAAsAAAAAADz3/BIUgCdAAlUDPSdABWv+AIA +AAAAAADrEgApUASAAFiBOtKg0Q8A6iQAA1hhAAD8ACIdoA1lAFiC5GP/aY0iwOQO3QL8QEYV7/1+ +AAAAAPhDqBWk2QEAANEEALwaDIgC+EOmFa/4xgCKJ40RwMDqrCAu2ASAAFh5UtKg0Q/aIFh/W2P+ ++QAA//c8DaAJBQDAoFmtqh7xPIro+V/5eJAfxQD//SgNoAkFAMCQwLoLqzT7wQYV7/zuAAAAAGwQ +DpUcKCIQLiIJJyE1KSAHIxYOKjIC/mCIFeANFQD8YGgdp7UBAOMhGiXb+QAAC9s5+iGmFeGZAQDn +/zYJt8KAAP7CUg3jqgEADg5C8cBwDeLTAQBk1GMmIAXB6Pn+AA8wF0UA9sAkHWIAnQCHIose9OX8 +DeAOhQArsAGfEfNgIScSAJ0AmRCZGpoUGPEO7fEOEjANAADmFgssrwKAAOhVCAzfgoAArbvrFgki +cAUAAIkanhiNG/UgBqoSAJ0AK1Kehhn9YAoj4gCdAC9SnSZivwb/AWT0ORnw/YmY9yAJmJIAnQAq +gq5koVIa8Pkjgq0qon8d8PYKOwHrFgUk2/0AAPpgCeYiAJ0Am9j6YB9mIgCdAIcphioMAz4HZgzy +wAmr4gCdACkaAPMiMg3g+vUAKyAWnBP7YAn9IgCdAIsRhsMqIDj34OYVoAYFAPfhJhWgRwUA++EG +FeCqGQAKdjkX8OeWFi0iFxbw5J36LSIbnfuJxAp2OZYX+WARSuIAnQCGHZ4f7BYDIw3ZgABgAQgZ +8M+JmGqRLosbKlKejxl7o0stUp0v8r8P3QGdFYYV6/DHFNP9AADvZAADAemAAJq4Zf8TYANKnh/8 +IGYVoAoFAFmtKxnwvomYGPC6jBPuEg8kjtsAAP//XA2gDwUAwKD6IKYVr/7mAB3wtcC6C5s0+6EG +Fe/+9gAAAAAA//sUDaAPBQCeHy8WEPwgZhWgCgUAWa0XGfCqjBMvEhCJmI4fGPCl+T/1cJIAnQBg +Ar3AoJoVixUW8KLA2g2dNO1mCC32JgAAYAKknh8vFhCcE+okAAnYBIAAWIHqjBMvEhDuEg8ldaGA +AGACWp4fLxYQ+kDwFaAMBQBYgcCMEy8SEO4SDy11ZgAAYAPHjheLE4gUjBH2IMgVr4oFACokOwyZ +DAhmApm0rNgG7gItIhDoJhspUASAAFiAZI4fjBMY8H76s6YVoQkFAHObDSsgFioK//tgBE0iAJ0A +iikrIDgPAgCjquomCSgECoAA82AEP5IAnQAmITUvwgQrIRopIhDm/zYN78KAAH/bCwoKQmSgBQsN +QmTQc/4gJhXgHYUA+f4ADvAKFQD6IaYVoAY1APYhhhWv9cYAiicvFhCLHuqsICpgBIAAWH0OLxIQ +mhMtIhv5QIgV7/zeAAAAAAAAAOogByngBIAAWIFvGPBTjBP+IegVr/2eANogWH5rGPBOjBOOH/pB +KBWv/bYAcZ6ICr8M//0AFe/+CgCLFIoWLSIQGfBUC6oCG/BUCmgChh0a8EsJiALp8EobCz4AACMW +ESUWEiYgB4XAIyEH9kEkFeBmEQDrVQELMoKAAPamAAq6MwEA5iEiKZsCgAADdwIKVQIjISQJZgKV +8IUgl/OW8v3gphXjmAEA6PYGLMoCgAAJOQLjEhEiU/kAAOn2BCquAoAA5eUCBkCBAADl9gEnyMEA +AOUSEiIUNQAAbakFCACGCQJhJiAUpGYGBkcmJBT0wAg10gCdAIgY+LOmFaEHBQDy4fIN4Pn1ACsg +FvlgCM1iAJ0AKiIXsarqJhchgKmAAIwpKyA4o8ycKfNgB5+SAJ0AjR1l0M/AINEPLyBOZPvZDngC ++EBGFaAAhgAAAAAAAPMf3MBSAJ0ADj8M//0AFe/uNgAAAAAAAOsSDilQBIAA7RIMKmAEgABYfkvS +oNEPAOsSDClQBIAAWH/W0qDRDwD6QGgdoBvFAPwAIh2gDRUAWIGAY//BixD6QGgdoAwVAO0SCyXY +YQAAWIF6Y/+pAAAmIDtkYHHqJAAOWASAAPwgKBWviQUA6SQ7LHAEgABYf8P6IQYVoAsFACsmG/pH +Zh3v+84AAAAAAOsSBSlQBIAAWAk/Y/7viifrRAAKaASAAPtEABWgDAUAWHff0qDRDwDaIFh96WP/ +COogByngBIAAWIDlY/7cAAAnIQklFhIjFhEkFhMmIAeEwCMhJPRA5BXgZhEA60QBCzKCgAAGRAIK +RAL2REQVqrUBAOsiBy3TAoAACncCCWYCKrEVmhKU8IUgl/OW8v3gphXjSAEA6PYGKiICgAAEMwLj +9gQl2IEAAPQiaBWvwwUAA7sBIxIR66kICq4CgAAF5QLl9gEmYIEAAOUSEiTJAQAA6ctDfkAEgAAt +TP4M1hGmhuaTO3fgwQAA9J/v8RIAnQBt2QUIAIYMAmFj/e2LEPpAaB2gDBUA+2JAFeANBQBYgSdj +/loAAAD7jwAMP/72AAidDA1JFG2ZBQgghgwCY+/aCAXBAQAA6UwMBUjBAAD1n+1BEgCdACvM/m25 +BQhAhgkCZWP9lAAAbBAGKCAFHO+C997+BeAaRQD7AAqdIgCdACsgTonIsLsrJE73IAjIkgCdAC5y +ru3veRcRcYAAK3KtLdJ/DbsB5rQABZEpgACwnu7GCCWIOYAALyAUs/8PD0cvJBT14BDF0gCdAC4g +c/hDqBXv+vUA+8AEANALFQDguBoHaAUAAPsXAA003QEALSRzCYgBCLg5CpkB6SYdLAcOAACKInyn +BCggTsmPfacIKyBMKSBOe5MUzGwsIBTtIgIuWBwAAGTRycAg0Q8AjifH8w+vAe8mAidQwQAAWG6V +4+9dFQE5gAAooADTD9MPA4gKKIIQ7KAHLVgEgAD6QGgdoA1FAAuAAGWv3Ikn0w9kn6YqmRTKp4qZ +ZK+cKKAAA4gKKIIQ7KAHLVgEgAD6QGgdoA01AAuAAGWv4GP/egAA//9UDaAKBQDAoFmroBzvMonI ++T/26JIAnQDAYCkgFLOZ+EKGHe/8HgAAAAAAAAAA6iQACtgEgABYfwjSoNEPACogBSsgB8HU/UAO +ZWG7AQAFBUf4oA55UgCdAJMQjTadEu3vHB2YBIAA9WAJihIAnQAMuhGnqi6invfADZzSAJ0AKqKd +DbwKLMK/DKoBZKE9+kAIFeAMFQBYILcd7xEpIQkY7xErISIvIAce7xssIST5ZgANsP8RAOgSAi/6 +goAAD8wCDswCLKYAjiCbovlAphWgDyUA6aYDL3YCgAAP7gL/QCYVoAkFAO0AFQVQYQAAsZnqgx4M +j+gAAAw5EfcgAETwCKUAKJad9L/yuRIAnQCKJ+tEAApoBIAA+0QAFaAMBQBYdvtj/jr/92wNoAsF +AMC6C5s068YIK28GAABj/tvqJAALWASAAFgIS/3dxgWv93YAiifAsPtEABWgDBUAWH+KGe7umaD+ +QAgVoBvFAPnd2AWgDBUA+UBGFaANFQD9wAAXMAgVAOjuAg14BIAA7vYBKVAEgABYgGHAINEPicj3 +IASgkgCdAAw6EaeqLqKe98AFVNIAnQAqop0NPgou4r8OqgFkoJiwn5/IZa7BiCLrFgEkBOGAAPi/ +7DlSAJ0AiicrCgD7RAAVoAwVAFh7aosQHu7KnqCMIB3uyp2i/YAAFjANFQANzAKcoYu2+0BmFe/1 +SgAAAADrVAAJUASAAFh+jmP9PI8z/iBGFe/41gD/+WQNoAoFAPogJhXgCgUAWasSHO6liciLER3u +ovk/+riSAJ0A//3IDaAKBQAAwKDAigiYNPmBBhWv/YoAAAAA6iQABdhhAAD8ACIdoA2lAFiAJmP/ +UQAAbBAEKCAU74seahgEgACKJ/pgaB3gDAUA6qwgKegEgABYdpnSoNEPAIsic75LFO6IikhqoUcb +7oQssq7Kxx3uhSyyrS3Sfw3LAX3AG7Cunkh9wCEvIBTvJBQv2tAAANogWAfjY/+nwLDAigioNOhG +CC3/FgAAiSLJlcAg0Q/AoFmq4YpIa6GtY//qAAAAAAAA+kBoHaAbxQD8ACIdoA0VAFh//MAg0Q8A +bBAILCIPLyAHKCE0JzIH/kNEFafVAQD5v8AV4AsVAOm5OQmwBIAA6yIJKlAEgAD4IIYV4AQVAOh3 +Ng9PwoAA9yJSDeH/AQALCULxIHAN4o4BAGSCcsG07HsfDpR0AAAsIE/pIE0mYAUAAAwMRywkT/0g +FKOiAJ0ALCAF+4AS/WIAnQCNIvogBhWv+zUA/WAOWOIAnQAoIhmOMvnAFNUiAJ0AiTgY7kMc7j/k +kmJv34KAAJoQmBGsu+juOhVIDQAAmRPrFgIvpwKAAKhE9eANIhIAnQCLEypCnvtAGxviAJ0AihIp +Qp3TDyqivwqZAe6UAASScYAAjCmLKgwFPtMPDLsM9WAJ2+IAnQAtGgD1ofIN4Pj1ACsgFvlgGXUi +AJ0ALCEiGe41KCEHKiEkKyEJ/EDwFeqIAQDpqgIMQwKAAAi7AhnuLhjuHw0tQOnMAg7qgoAACN0C +neCJIJzimuT7wGYV4ApVAOvuJhzOAoAACpkCmeGIL5jlLCA498EGFeANBQD9wOYV4AolAP3cPAXg +SSUA+MCIFaDMGQAMmjmY6QzbOY1lneod7hj8wMgVoAkFAOzmCyOH4YAACpwQDcwCnOyMEYlol++Z +7ohpKOYQjWot5hHsABUHSSEAAAkAiohn+OALo6IAnQAf7f0KvQIP3QKd5sDF/JOmFaEJBQD1IfIN +4Pj1ACsgFvlgE6UiAJ0ALCIZiikrIE8pIDjlqggGYAUAAOwmGSXb/QAAKyRPminzIA+PkgCdAIsU +ZbHvwCDRD58VnxaeF+okAArYBIAAWH8njhfvEgUldZGAAIwUZc/biifbMOwSACVQwQAAWHpEwCDR +DxrtzYqo90AQiJIAnQCMEytCnv1gEUOiAJ0AixIpQp0rsr8d7cQLmQHkkhRlY/0AAJzY7pQADPJm +AABgAI4oIDnxH/gOEgCdAP/75A2gCRUAAAAAAPOf7EhSAJ0ACecM9v2AFe/1+gAAAADBs3vJFCkg +OpoQ/iDGFeAM9QD9IBD9IgCdAOokAArYBIAAWH2K0qDRDwDwABgNoBrVAMChjDcrIQmNOI4y668R +Dd0CgAAPuwLkuwIJUASAAFh9bsAg0Q8AAAD//1gNoBqFAOokAAfYYQAA/CBoFeAMFQBYfyZj/wUA +AAq4ApjmwNX8k6YV4QwFAHXLDSsgFikK//lgDjViAJ0AihRkoV2LaoxnimmrewfMDJxn92DSDeAO +BQCxqoxlm2qLZppprOqre3e7AbGqjimbZpplLSA4pe6eKfOgCjeSAJ0AiScomRTKgouZyb4Z7Yco +sACfFZ8WCYgKKIIQLLAH+kBoHaANNQALgACPFYsix6P7X/KA4gCdACghNIdnLiEaii+LKeh3Ng9n +woAAd8sKCwlCyJQOC0JksLTB1Pr+AA6wDBUA/CCGFa/yrgDaIFh7emP+Coon6qwwK1gEgABYZwXS +oNEPAAD/8qgNoAkFAAAAnxWfFp4X+kDwFaAMBQBYfoKOF+8SBS1l/gAA6iQAB9hJAAD8ACIdoA0F +AFh+3WP94AAAAAAA6iAHKuAEgABYfmFj/YGfFf4gxhXgCgUAWamwGu1DiqiPFflf7tiSAJ0A//fg +DaAJBQDAkBztPcC6C6s0+4EGFe/3mgAAAAAA81/6OFIAnQAJ5wz2/YAV7/zyAIonnxXvFgYp2ASA +AOwSACVQwQAAWHmk1qD+IKgV7/oWAJ8V7xYGKVAEgABYe0L+IKgV7/q2AAAAwVP6QGgdoAsFAPwA +Ah2gDTUAWHPXKyAFjxaKEPV/2oViAJ0AY/0hnxWfFuogByrgBIAAWH4y/iCoFe/4rgAAAABsEA6T +HJUaiC+KKS4hGichNC8yBPhA8BXntQEA+3/AFeANFQAL2znrFgsp4ASAAPfhAA/xmQEA5yAFLzfC +gAD+wfIN4qoBAPFAcA3ibgEAZGRBwaQI+o364CNNIgCdAI4iixz1xFwN4AqFACuwAZ8S82AgVxIA +nQCZEZkYGOz06+z0EmgNAADtFgksrwKAAOhVCAzXgoAAq6rqFgcicAUAAIYYnhaLGfTABeoSAJ0A +KlKehhf7QAlj4gCdAC9SnSZivwb/AWT0IRns44mY9yAI4JIAnQAqgq5koTka7N8jgq0qon8d7NwK +OwHrFgMk2/0AAPpgCR4iAJ0Am9j6YB6mIgCdAIcphioMAz4HZgzywAjj4gCdACkaAPMiMg3g+vUA +KyAWnBD7YAklIgCdABvs4CkgOPvZvAWgBgUA9+DmFaBHBQD9gIgV4JkZAAl2OQm6OYsSmhSWFf1g +EdLiAJ0AhhtkYdNgAQMZ7LuJmGqRLosZKlKejxd7o0stUp0v8r8P3QGdE4YT6+yzFNP9AADvZAAD +AemAAJq4Zf8rYANKnh38IAYVoAoFAFmpFxnsqomYjBAY7KbuEg0kjtsAAP//XA2gDwUAwKD6IGYV +r/7mAB3socC6C5s0+6EGFe/+9gAAAAAA//t0DaAPBQAAnh2fHvwgBhWgCgUAWakDGeyWjBCPHomY +jh0Y7JH5P/Y4kgCdAGACvsCgmhOLExbsjsDaDZ007WYILfbuAABgAqWeHZ8enBDqJAAJ2ASAAFh9 +1owQjx7uEg0ldnmAAGACXZ4dnx76QPAVoAwFAFh9rYwQjx7uEg0tdk4AAGADxJwQ/iGmFa+JBQDp +JDsmOEEAAAcAhucSAiewgQAABgJhjceX+IrEicatfQeqDJrEd9sJnh3sFgAkyAUAAIwSixCGFY4U +mbadtwbuAu0iDylQBIAAWHxIjh0Y7GKMEPqzphWhBwUAc3sIKyAWKQr/ebl+iikrIDijquomCSgE +CoAA82AEJ5IAnQAmITSPxCshGokv5v82De/CgAB/2woKCkLIpAsNQmTQc/4gRhXgHUUA+f4ADvAK +FQD6IWYVoAY1APYhRhWv9cYAAAAAAACeHYonnx6LHOqsICpgBIAAWHjy7xIOLWAEgAD+IagVr/xS +AOogByngBIAAWH1VjBAY7Dj+IagVr/22ANogWHpRjBAY7DSOHfpBKBWv/cIAcZ6ICr8M//2AFe/+ +CgAX7DYb7DYd7DsGqQKGGxrsOu2ZAgZAQQAA5WFUZ+iBAAAlFhCTHyUgB4PABSVA6jMBCqqCgAAF +MwIHMwInIQcqISImIQn0QegV6ncBAOuqAgu7AoAAB2YCJyEkk/CDIJbzmfaa8vXgphXjqQEA5RIQ +LVICgAAKdwLn9gQpngKAAAPjAuP2ASJT/QAA4xIPIgw1AABtqQUIAIYNAmEmIBSkZgYGRyYkFPTA +CB3SAJ0AiBb4s6YVoQcFAPLh8g3g+fUAKyAW+WAItWIAnQDIP4spKiA4o7ubKfNAB9+SAJ0AjBtl +wNfAINEPLSBOZNvzCugC+EBGFaAAhgAAAAAAAPMf3dBSAJ0ACu8M//2AFe/uvgAAAAAAAOsSDClQ +BIAA7RIKKmAEgABYejfSoNEPAOsSCilQBIAAWHvC0qDRDwD6QGgdoBvFAPwAIh2gDRUAWH1sY//B +ixH6QGgdoAwVAO0SCSXYYQAAWH1mY/+pAAAAAAAmIDtkYHcr+oArJDvsEgIuWASAAAgghg0CY+z2 +CCzwBIAA7SIPKVAEgABYe6v6IMYVoAwFAPxHZh2v+8oA6xIDKVAEgABYBSlj/vKKJ+tEAApoBIAA ++0QAFaAMBQBYc8nSoNEPANogWHnTY/8A6iAHKeAEgABYfM9j/t8AAAAnIQckFhEmIAeEwJMf8kRE +FeBmEQDqRAELMoKAAAZEAhbrsiwhJIonBkQCJiEJ+mYACfp3AQDroRUruwKAAAdmAocvlPCEIJf1 +k/L34GYVozkBAOn2BimaAoAAA8wC4xIPKiYCgAAE5ALs9gQlUIEAAPXgJhWvzAUADKoBqrzkEhEm +YQEAAOyLPXxIBIAAsEgMhhGmlnbDNvSf8IiSAJ0AbYkFCUCGDQJlY/4AixH6QGgdoAwVAPtiQBXg +DQUAWH0VY/5iAAAA+w8ADP//DgAJzAwMSBRtiQUJYIYNAmfvzQgFSQEAAOhMDAbAgQAA9Z/t2JIA +nQCwzm3pBQmAhggCaWP9qAAAAGwQBiggBSMgByQKA/0PQERRMwEAKCAiZIBvAioCWHGQ/UzAgNAN +FQAsICEY62UPAgDsMxEGfVaAAKgzKTKeDwIAbpNFKzKdZLA/+kAIFaD+5QAOzgH9xgAO8A8FAPxE +Jh3gCQUA+CAGFeAMBQD4ICYV4A6VAPggRhXgDQUAWHeu9HOmFaACBQDRD8Ag0Q8AAGwQCiogBfhA +8BXgDBUA+GBoHae1AQDoFgAl2/kAAOvLOQoYBIAA6xYFLCAEgAD9QcAEUZkBAMHD/UAf5SIAnQCN +Iu/rPB6b3gAA6+s5EbARAADmFgQs94KAAK/u7hYDLNcCgACrquoWByzABIAAhxf1AAQiEgCdAIoU +J3KehhOPF/rgB1uiAJ0AJmK/L/KdBv8B7xYGJ5nRgAAlIRuKQocphioFpTb1TwAOcQsFAHyzAdWg +mBoHZgz0wAXj4gCdACoaAPVCMg3g/PUAKyAWmBr9YAX9IgCdAIpC+qAOeqIAnQCMFRvrLodDmBrr +dwEGCPmAAGAAtgAAGusQiqjoFgolDN+AAIsXjBSGEyuyno8XJmK/fLNDL/KdHOsHBv8B5PA5ZVv9 +AACbyO8WBi/7bgAAYAKbAAAAAPghZhXgCgUAWadqGur9iqiJG+gSCiUO3wAA//9MDaAPBQDA8Bzq +98C6C6s0+4EGFe//BgAAAAAA//x4DaAPBQCZG+okAArYBIAAWHw+iRvoEgoleamAAGACLgCZG/pA +8BWgDAUAWHwViRvoEgoteZYAAGADEvDgBIhSAJ0ALSEajCmXGPghRhWi7QEA6RYLLwQWAACXGPgh +RhWi7AEA6RYLJwOBgACYGukWCy7/woAAdfteDtUM+dXYBaC36QDmQgMt3IKAAAt5ApkYCGYB9oBm +FaABAgCKJ5kbKxIA6qwgKeAEgABYd3aJG/ghSBWgCyUA66QCLSAEgADqogIoBAqAAPL/+7hSAJ0A +jCmXGJgamRuOGI8W5a0MClgEgADlzAgJUASAAO1GAiroBIAA7CYJKeAEgABYd5GIGokbjxf786YV +oQ4FAHXrCCsgFiYK/3a5DMCh+iCmFa/3dgAAAADqIAcq4ASAAFh7v4kb+CFIFa//igCPKRjqvYkW +pf+fKYxDi0CNFefEAATIgQAA/A4ABTfrAQDuFgEuiKYAACcgBwcHQQh3Cidyn+6tEA1TwoAA7aoC +AkBBAADqdwEB0/0AAOfHAgGMPQAAbakFCACGCQJhi0DAgJgSGeqoGuqnLyEahhYe6qQkIQcY6qH8 +ICgVodcxAP+gAEa6RAEA7dCAKicCgADszA8mcEEAAPiGAAo0zB0A5GYAJmAFAAAMPAwU6nwNXQyI +IJ9ml2eeY51lDKQ5CYkC6WYELEYCgADkZgIh0AUAAAioAphhJiAU42YIDSAEgADmJBQoBAqAAPNg +BAqSAJ0AiBf1E6YVoQcFAPTh8g3g+fUAKyAW+WAFDWIAnQCIEtKA0Q+KFWSgosAg0Q8AAAAAAADq +JAAE2GEAAPwgiBXgDBUAWHvmY//aiif8ISYVp9tBAOqsICgECoAA9aAEYdIAnQCMFisKAezMICno +BIAAWHJYmhL6gAgV7/vuAACLFuxNEQlQBIAA/WAARfAMFQBYcDr0gGAVr/2qAGW8BPlf4AjSAJ0A +LyAg8f/ft5IAnQBj/3QAAAAAAAAA6iAHKuAEgABYe0+IEtKA0Q+KJ9ww6xIAJVCBAABYduDAsvtA +Rh3gAgUA0Q8AAAAA6zQADjgEgAD8YGgd4AwFAFhyNdtA7DQACugEgADqFgIr8ASAAO8SBilQBIAA +WHb/+oAIFe/7HgDqJAAE2EkAAPwAIh2gDQUAWHuqY/7qAABsEAiSFJMVGeoliED4IEYVr8sFAOsq +AQJwIQAA+iBmFaeIQQDkgcBiUBEAAI8TLSEFqYwswACv3wTMC+/8QC5YBIAA/4ANiuIAnQD6ICYV +oGgBAP4AIh3gDQUABv04C98L690KB9ghAACCFZ4Q+QAARXAMJQDyQQAV4A8FAPJAgBWgAg4AjRQO +VQz/4CAVoAMFAO/kAARABQAA8Q5gDeB+AQCGEyKgAC3RBQQiC+bWCAlYBIAA4hYGIzEBAAD2QAZ6 +ogCdAAgGQPIAIh2gDQUABi04C9IL690KAVghAAD3IBAVoAIVAAcjOIcVB2YLF+n8pzcncKAGMgoG +MwvsfAgBmCEAAI7QCwCJBe42LiYAAwCLItIA6qwBJMgFAAD0X/sj4gCdAAUpDA4qDPugBhWgBxUA +9WAoFeAGBQAJdjgIaAgisgAF5QgltgF+WwIiLAHitgAmfRKAABbp44sSHuni5rYBB5AFAAAGIgKG +Fe67AQxuAoAADbsCkmD6gAYV4SwdANEPixD8ICgV7/1SAAAA/E8ADf/8xgCFFRnpswXFC/gAChXg +AgUAsSLlgx4JD+gAAB3pzIYSGunM7W0BB9gFAAANuwKNFepmAQxOAoAACWYC69YAJhAFAAD2gAYV +oSIdANEPAAAAAOoWAS1oBIAA+8BoHe/51gD9jwAN//k+AGwQDPhASBWgCgUA6yAHKcgEgADygGgd +58UBAP2fwBWgBBUA7Ew5DLgEgAD8ISYVobsBAPMbXA3gDAUAmhacFZkTmxSbGy4gFhXphB3phB/p +p+8WCC3HgoAA7YgIDacCgAClRB3poygWCvnS+gWg//UAf+ETAioCWCvgGOl5Hemc6hYIJSn5gABg +ABcAAGZjy/jAHyiQ+vUAKSAW+yAZTSIAnQCJiPcgBhCSAJ0AK1KuHOltZLDRLMJ/K1KtDLsBZLDH +sJmZiBzpi2SzSyzAgCzMN/4haBWkzB0ArDzrFgImYB0AAPXABYISAJ0ALkKe/cAIK6IAnQCMGitC +nSzCvwy7AesWACWZUYAAKnEMiXeZEf1ADpxiAJ0ALHAQ63IDJglBgAD5n/so0gCdAC5yA2Tg0I8W +ZfGuhhGPGI0U7hIAKVAEgADm/zYL2ASAAO8WASngBIAAWClqGOlCHell568ubTAEgABgAvIAAMCg +WaWpGOk8iYgd6V75P/mIkgCdAP/9CA2gCwUAwLDAqgqZNPkBBhXv/M4AAGqRJCtCnnyzQYwaK0Kd +LMK/DLsB5LA1ZPP9AAD/AQYVr/0qAAAAAAD8IaYVoAoFAFmlkhjpJYmIHelI7BINJI8TAAD//IwN +oAsFAMCwwPoPnzT/AQYV7/xSAAAAAAAAAP/8GA2gCwUAAAAAihjAsZsW+V/5KuIAnQDA4J4W+V/4 +yuIAnQDrdAAJUASAAO0SCSngBIAAWCmm/gAiHeAHFQDnFgktOASAAP9AZhXv+7oAZLBJjxX+ACId +oAwFAA/sOGTAiogRhhjqJAAL2ASAAO0SBCngBIAA6GY2CPAEgADmFgEg+BEAAFgqMujo9x0wBIAA +/dIyBe/3/gAAAACLGA8CAPlhVg3gDAUAeaMCLAoB+AAiHeAOBQAMnjjsFgUnfKGAAOt0AAlQBIAA +7RIJKeAEgABYKtH3QGgd4AsVAPohJhXgChUA+uBmFa/9pgCLEBXo/CohB4lwHOj4/9G+BeqqAQD/ +QAAVOJkBAOyqAgTAPQAA/CEoFaSIHQDqtgAkQAkAAAg4DI4gmbPoXzkBs/0AAO+2Ai92AoAA7m4C +BahBAADutgEuDtYAACgSA+iMICGUVQAA6jz+KsgEgABtqQUIAIYJAmErPP4MuxGrW5sQKCAULCAE +o4j1gAihEgCdAAgJRykkFPUgCjZSAJ0AiHIoJhwpcgHoFgctqASAAPMgCjBSAJ0A8TYYDeAHBQCn +ZiZGnSogFisK/3uhCusSASlQBIAAWC32jBllwOPAINEP6xIBKVAEgABYLfEuIBYY6KL90YoF4P/1 +AP/f5RxiAJ0AY/yHiBllj9IqcBDbcPxgaB2gCRUA+1/gFaANBQDqnTgJUASAAFgoXcAg0Q8AAAD6 +QGgdoBvFAPwAIh2gDRUAWHoeY/+9AAAd6LEt0IDrEgQm6N0AAPpAaB2k3R0A/GAARvAMFQDt3Acl +2GEAAFh6E2P/jy4gFi8K///f+vRiAJ0A6xIBKVAEgABYLcnAINEPixAMbBGsu/ogBhXv+5IAKCQU +jXDxv/i6kgCdAPpAaB2gDAUAWG5o9sBgFa/8EgCKJ+s0AAnoBIAA+0QAFaAMBQBYcHfSoNEPAAAA +AAAAAOsSAilQBIAAWAHL+iAIFe/6vgAAAAAAAOokAAxgBIAAWANOiBcpcgEqFgznpAANXwKAAOtV +CAT1PYAA21DqJAAMYASAAFgDFPdAAEP/+koAiif8oGgdoAslAOqsICnoBIAAWChPK3AQ+X/xUNIA +nQApcBUJCEVkjhwrcQkc6GsqcQwvcBGOJwyqDKv/D4gJ/cKkFa/NBQDu7CAkeIkAAO3uAQRASQAA +Cvg5qH2uzu7sQCbogQAA7tteftAEgAAO6jAb6FstoQH9QAQVofkxAAv/CisiF+/yny5kAoAADN0C +C+4MD+4srt2oXv3AJB3v3YEA/cAEHe/2ggAAixT6QGgdoAwVAPtiQBXgDQUAWHmzY/4QAAAAAAD9 +rwANP/6KAGwQBCMgACQK7XQxBiIhA7wi0Q+EIYYg8kBoFaAIJQD3ZAACsJRxAPkPAAxzNgEA9GAA +QfNmgQDl6DccAQqAAABmGvZgAQG9RAEA5SIBAag5AADlIgwBmGkAAAQkLAQzKKMi0Q9sEAiKIicg +B4kwlRX4QtAVoXcBAPFdTA3omQEA+CAmFeD89QB8gR0FC0f7f8AV4AkVAOubOQlQBIAAWC1a81Mw +DeD89QAa5/OIqBbn8PcADZiSAJ0ALmKuGefwZOHbKZJ/JWKtCVUBZFHRKIz/KKYI6VQAAo2BgAAb +6AwlsIDt5+QSqN0AAPggBhXkVR0A5UUIC88CgADmmQgCqA0AAPTgCJISAJ0AKJKe9QATO+IAnQAl +kp0NeAoogr8IVQFkUYgpIBb9IyYNoOvVACowEPtAElRiAJ0AKzELvLvaIFgtGyggFCwgBKSI9YAM +QReYAQApJBT1IA4uUgCdAIoVHufjjREoIQcc58cZ59//oeAV6ogBAP8AABQ0/x0A6YgCB/gFAAAP +TwyYUIsgD+w5/KBmFeeqAQDsVgIt3gKAAOtLAgLIQQAA61YBIcBBAAD5QAlxUgCdAOhBDWJT/QAA +bakFCACGCQJhwICYFOkgBCJb/QAADLsRq1v1IAkJEgCdAIgyKCYc6TIBJdhBAACbEygWAvMgCbhQ +BQUAZpFQpUyIFAx9Eabd7NadLBAEgADRDwAAAAAA9wAOkJIAnQAMeRGmmS6SnvXADvviAJ0AJZKd +DXsKK7K/C1UBZFHNsI2dqGVe3WAAYwAAAAAAAADqJAAJ2ASAAO0SBSpgBIAAWHXX0qDRDwDAoFmj +8Brngoio+R/yGJD89QD/+VgNoAUFAAAAAAAAAPpAaB2gG8UA/AAiHaANFQBYeQhj/7HAUMDqDog0 ++UEGFa/4rgAd55ct0IAt3Df64wAV5N0dAO1NCAlQBIAA/aBgFeAMFQBYePtj/3sAAAAA+EKGHa/6 +DgAAAACKJ/0gaB2gCxUA6qwgKmgEgABYb276IIYVr/tKAIsw82AIopIAnQDiEgQr5wKAAKbMJMad +0Q8AAAAAAAAA6xIAKVAEgABYALtj/jAAAOokAAxgBIAAWAJAiTGLE4gS7KwRDSgEgADsuwgE9Z2A +AOokAAxgBIAAWAIHiBSlpaVMDH0Rpt3s1p0sEASAANEPAAAAAAAAAP/2lA2gBQUAjTWMNB7nZPpg +6BXgCSUA/HAAB7CtcQD7LwAMu4whAPsgBADTzAEA6MwID/gKgAD/gAEGfd0BAO67AQZwOQAA7rsM +BmBpAAANvSwNzCj9YABFv/W6AAAAAOokAAPYSQAA/AAiHaANBQBYeLRj/mHAoFmjjhrnIYioHecf ++R/xCJD89QD/+PANoAUFAMBQwLoLizT7QQYV7/i2ALBLDLsR61sICVAEgAD7YgAV4AwFAFhtCrNM +4hIEK+8CgACm3SzWndEPAGwQBgIqAlgtAyQwFvnOVAWipgUABqYohTeoaARECghEC+RNESlQBIAA +5EwwIqghAABYLPiIQB3nJyswFvUMHg2gBxUALNJsLdJpqt0J3RGtzBjnIh7nIaho6YJ9LW8CgADu +3QgNgQqAAO/SASvwCoAADpkCHucRDv8BLoJ/D+4CH+b6KYZ9Dv44DpkCmdIogn/Ii4bHJmwQ2mBY +BddooRuIMupCASkBCoAAAHkaCYgClaCaUZRQlUGYMtEP2mBYBesW5wcLqBGoZuYWASUCeYAAFucA +DOowixErsoWLsLCqmhAMuwhZqBuMECpilgDBBAB7GguqAipmllmoUY0y70IBKQEKgAAAfhoO3QKV +8JRQn1GVQZ0y0Q8AAAAA+gDiHaALFQBYcbiIMitifytmg+pCASkBCoAAAHkaCYgClaCUUJpRlUGY +MtEPAAAAbBAI2iBYLLDUoBvm5fnNxgXipgUABkQoFebU6UkICVcCgACrqoqgKZJ/GObbpUX7IAQE +sGMFAPggBhXgBxUA4QAFATO5AAD4gABCMADCAAAAAAM8CuXMCwtoBIAA6MKQKVAEgADszQIqWASA +AO48oCZgwQAAC4AAAQGHAzdg4QEHCfdAAADRD2wQBCYhCfhCkBXv+AUAJyAV6JgBCzYCgADomQwL +uQKAAAdmAvhChh3gBwUAJzQA+GBmHaAEFQAEZgKWMRXmhyRWrdEPAAAAAGwQBBbmtBXmkdMPpiIF +NQIlJoAkIoBnQAttCAUoIoBngAJj//PRDwBsEAQT5qsiNopj//wAAAAAbBAEKCAFJSAH+mCoFa/0 +1QD6QEgV4AMlAP0BIBHRVQEAwCDRDwCIKZorDwIA+wAIPCIAnQAa5psKWgnpofwlUAsAACqhAPsg +BLOiAJ0A82AEcBIAnQACKgJYbHgrIgIPAgADugFkr7iKJwS7AesmAiVQwQAAWGWh4+ZpFQE5gAAo +oADTD9MPA4gKKIIQ7KAHLVgEgAD6QGgdoA1FAAuAAGWv3Ikn0w9kn3YqmRTKp4qZZK9sKKAAA4gK +KIIQ7KAHLVgEgAD6QGgdoA01AAuAAGWv4GP/SgAA//9UDaAKBQDaIFhsZSsgIuq7DAlQBIAAWG2v +2lD6ACId4AwFAFhvXosiA7oB83/65mIAnQAvIAfaIPwAIh2gDQUA9WAEBzG/AQDuJgIl2H0AAFh3 +vsAg0Q8AAAAAAAAA6yAiKVAEgABYbZsqIAXBg3ihDGioKYsi82AEBX/8RgApIDrAv3uZ6vpAaB2g +CwUA/AACHaANJQBYbNJj/9cAAPpAaB2gCwUA/AACHaANJQBYbEtj/78AAGwQCogrHeY5LiAhizf8 +YMgVoP/lAA/uAS4kIQ3MAQy7DOuJCHjIBIAAwCDRDwMAhgkCYZsVKCAFJSAH+CEGFe/01QD8QEgV +4AMlAP0bQEHRVQEAiikc5i+bK/tACBRiAJ0ADFwJ68H8JmALAAAswQD9YASjogCdAPOgBGASAJ0A +2iBYbAqLIgO6AWSvm4onBLsB6yYCJVDBAABYZTQKqwLj5fsVASmAACiwANMPA4gKKIIQLLAH+kBo +HaANRQALgADrpAANfx4AAIknZJ9aKpkUK5IJyqhkv08osAADiAooghAssAf6QGgdoA01AAuAAOuk +AA1/LgAAY/8tAAAAAAD//0gNoAsFANogWGv3KyAi6rsMCVAEgABYbUHaUPoAIh3gDAUAWG7wiyID +ugHzf/rOYgCdAC8gB9og/AAiHaANBQD1YAQHMb8BAO4mAiXYfQAAWHdQwCDRDwAAAAAAAADrICIp +UASAAFhtLSogBcGDeKEMaKgpiyLzYAQFf/w6ACkgOsC/e5nq+kBoHaALBQD8AAIdoA0lAFhsZGP/ +1wAA+kBoHaALBQD8AAIdoA0lAFhr3WP/vwAAbBAEHOXXizQpMBb9YAQFtZkdAPUgCAiSAJ0A7uXS +FIiJgAD7y6IFr/3lAOTlqhSkuQAAaZUiLKF+7LMMdlARAAD7YAibogCdACsgBrC7CwtH6yQGJYLJ +gADAINEPLKF+0w/sswx2eBEAAP9gB9PiAJ0AKCAGsIgICEfoJAYsft4AAIkniyIqmRQNuwGbIouZ +ZKC0KLAABIgKKIIQ2iD9YPAVoA01AAuAAMAg0Q8AiyKKJw8CAA27AesmAiVQwQAAWGS8ya0ooAAE +iAooghDsoActWASAAPpAaB2gDUUAC4AAZa/giSdkn28qmRRkoGCKmWSvZCigAASICiiCEOygBy1Y +BIAA+kBoHaANNQALgABlr+Bj/0IAAOokAAnYBIAA7EQACugEgABYbOXAINEPAOokAAnYBIAA7EQA +CugEgABb/0HAINEPAP/9HA2gCwUA//50DaAKBQCINyLifwmIEfhAAEE/+5YAiDci4n8JiBH4QABB +P/v6AGwQBBrlZyiis2SACwnqMCuitAuZDGeQAdEPWG8G0Q8AbBAEHOV0JiAHG+VzH+V1/kEEFaDW +EQANyzmbMIcg+8p4BaAJJQD6YEYVoBgFAOg2Ayu+AoAA+OYADHFmAQD4YCYVoAwFAOUgeSs0AoAA +98YADrArBQD/pgAO8Ao1AOjlXxKCAYAAnDWcN5szGeVeCnUClTGZNiUhCZ00LyAHnDmUO/imAAkx +/wEA4jYKL/wCgAAP7gII7gLuNggtEASAANEPJyEIKiEJnDWUNwZ3AgiqApo2CHcC5zYELJAEgADR +DwAAAGwQBBjlSB3lQisgBxzlQiohCPoCAAdxuwEA7tw5DdwCgAALqgKcMOPlKhmwBIAACKoCHOUG +IzCA+kAIFeANBQCdZexmAiG43QAA+sCGFaR3HQDpfP8t3gKAAOt7AgzPAoAA62YBJMvhAACZYwIE +iZNnKGYGBiCLGOT2JSEJ9MFmFaQzHQDlZgorkASAAOgABQMowQAAbTkCBQJh0Q8AAABsEAYd5SEL +KxGtsyoyfxnlHxflAoigwED44ABE8AYVAOm5CAQBqYAALDJ4LzJ7+YAFfGIAnQBl8RQsNnwrMnkr +NnvdQA3kFgECAJSgDeQWwMn8QAXcIgCdAC8ye8HA7eUMF4ORgAAiMnwqIQSOIPPh/g2mugEAJDZ8 +9G9mFaAAHgAuNnztrwEFw/0AAAj/Au8lBCWMWQAAIjJ8sMzvMnshAPGAAMnGY/+/2iBYbyFloMIq +IQT/QQAMFpoBAMiX0Q/aIFhvFNEP2iBYbtbRDwAAAAAAAPpAaB2gCwUAWG+k0Q8uLPjq0ogvAQqA +APzAAQXf/PUADLsDC6oBKtaIWaYqJDZ8JDZ7+m/oFa/84gAAABXkoy9QaWTwalmcolhujShys9MP +yIFYbmIpUGlknylYblzIrhXk2CxSeLDM7FZ4JgLJgABYbeNj/w4AAAAAHOTS/m+IFaAKVQD8b0gV +4AtFAO0WACFr5QAAWaRb+m/oFa/7MgAuMnviNnwveh4AACI2e9EPH+TGL/KucfaL9q0mHa/+IgAA +AAAAWZxs+q8GFa/+kgBsEAQU5L4Z5Ljo5JsZXsKAAKS0I0J/qYjouAgBgiGAACoyAHipAipCexzk +sCsxBCpGfwy6Aeo1BCnQBIAAWG7TzqkpMQT/IQAMFtkBAMjX0Q/aMFhux9EP2jBYbonRDwD6QGgd +oAsFAFhvWNEPI0Z/0Q8AAGwQBPBg4A3v+fUAiCIJOQMJiAGYIoonKqwwWGOh4+RoFQEZgAAooAAD +iAooghDsoActWASAAPpAaB2gDUUAC4AAZa/giSfLkiqZFMqlipnJrSigAAOICiiCEOygBy1YBIAA ++kBoHaANNQALgABlr+DRDwAA//9cDaAKBQDRDwAAbBAIHeRgG+SCFOQ898kABaAYxQDjLOgl04EA +APhADcwnMwEADDURpFXoUp4pZsKAAKbEKUB/+QAQU+IAnQAoUp1kgf+bEeoLHg1IBIAAmRAKIIYL +AmULAmMNAIcJAmEJAmHtxwgJAQqAAP/I1AXgDhUA4+QzH3AKgACeE6/P/iCGFe//9QD/1wAPcAZF +AP4gRhWgAMIAAAAAipnJrSigAAOICiiCEOygBy1YBIAA+kBoHaANNQALgABlr+ApQiBkkO8tQHws +QH0e5FQN2wkHuwru3ggF2CsAAIqyLuCAZKE4/cf+DaAIFQAvCgANjzgP/wkH/wov/Qov/Jwv8hss +CgEM3APx4SAN58wBAAzLCQe7CuxEfCXYKwAAwND8j6Yd4AwFAI2w71KeJvP/AAAu4P//4AR7ogCd +AC9Snfbf4BWg+PUA8efADedmAQB4YXTqEgQmQAUAAOhEfSbj4QAAWG5YiRPSoOsSAiSAYYAAiqIL +qgEqJgKKJyqsMFhjKcmtKKAAA4gKKIIQ7KAHLVgEgAD6QGgdoA1FAAuAAGWv4IknZJ8XKpkUZa7u +//u0DaAKBQCMEYsQDICGDGCGCwJpCwJn0Q+PEY0QLkR/D8CGD6CGDQJtDQJr0Q+bEeoHHg1ABIAA +mBAKAIYLAmMLAmEN4IcIAm/o7AAJ0ASAAFmbzGSvr+3j4BmvAoAA5FUICWbCgAD3gABCP/kyAMCx ++7cADfAMBQD8j6Ydp7sBACtEfAu7CfdgAQXwDAUA+2FAJe/7mgAAAAtghgtAhgoCZwoCZdEPAABs +EAQY46kCA0cMMxGoMysyhBnjtiiwAIqxCYgKCiGMAgo+KIIQAwI+/EBoHaANJQALgAAiNoTRD2wQ +BBTjmwIDRwwzEQQzCCQyhCpCASZAAChACPqYaB2gqSUAAgU+AwI+eYEjGOOiCGgKKIIQ6lQAClgE +gAD8QGgdoA0lAAuAACI2hNEPAAAA6yQAClAEgABYbh/zQGgdr/82AAAAAAAAbBAEWZ8cEuOAE+Oh +DAIAKSKCCRqOA6gKiIQLgABj/+sS48ID6DAE7jAFsTCTIJQhlSIS474T44OEIAQzApMgEuO8wDAo +N0AoN0QoN0goN0wjPQFyM+0S47fAMJMgxy8T47YDIwMS47WEIAQ0AZQgEuO0hCAENAGUIBLjsoQg +BDQBlCAS47GEIAQ0AZQgxy/AMQMjAxLjroQgBDQBlCBj//wAAAAS46uDIAMTFA8zEZMgEuOowDAj +JgBX/9kQ46eRAJIBkwKUAxHjpYIQAeowohEB8DHAQATkFgACABHjoYIQIxoAAyICkhAR457AIZIQ +BOQxhAODAoIBgQAA0jABIwAAAAAQ45mRAJIBkwKUAxHjl4IQAeowohEB8THAQATkFgACABHjj4IQ +IyoAAyICkhAR44/AIZIQBOQxhAODAoIBgQAA0zABMwAAAAAQ44qRAJIBkwKUAxHjiIIQAeowohEB +8jHAQATkFgACABHjfYIQI0oAAyICkhAR44DAIZIQBOQxhAODAoIBgQAA1DABQwAAAAAAXJQBXZQC +XpQDX5QAQwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AFyQAV2QAl6QA1+QAFMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAACclAAdkAGdlAKelAOflAQIlAUJlAYKlAcLlABDAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAnJABnZACnpAHHZADn5AEeJAFeZAGepAHe5AAUwAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAANyUAB2QAd2UAt6UA9+UBASUBQWUBgaUBweUCAiUCQmUCgqU +CwuUAEMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADckAHdkALekAsdkAPfkAS0kAW1kAa2kAe3kAi4 +kAm5kAq6kAu7kABTAAAAH//89ADSMRD//goAAAAAAB///TwA0zEQ//4KAAAAAAAf//2EANQxEP/+ +CgAAAAAAAPQwCgAAAAAA9DAKAAAAAAD0MAoAAAAAbBAIiCInIAcpIhmZFfEVfA3hdwEAHeJDZJEl +FuJELdCA6+I/G9cCgADmqggG6N0AAP1TyBWk3R0ArU3p4jsW6AkAAP2ACwvgCKUAKqKdC3wKLMK/ +DKoB6hYGJQqpgACKmPdACwiSAJ0ALmKu7eIxFwiJgAAsYq0t0n/tywEFc/0AAP2AB+5iAJ0Anpj9 +gAf2YgCdAC8gFKT/Dw9HLyQU9eAJxlIAnQArMgn4IMgV54UBAPkACWlWux0A6DwQIgxBAAAqTP9t +qQUIAIYJAmHAUIkVGuIYDwIAiZDoEgYia/0AAOqZAgzmAoAADNwC/QAmFaAKBQBtuQfphgYkQQEA +AIgWjDKcFCwmHOsyAS7PAoAAqYiYE/NgCrhSAJ0A6hYALYuCAACLEOtLCAvnAoAA5swIBdv9AADr +xp0qkASAANEPBQxHaMIYiif6gGgd4AwFAOqsICpoBIAAWGmj0qDRD8Ag0Q8AAAAA6iQACdgEgADs +RAAK6ASAAFhv39Kg0Q8AAMCwCKw07JYILfhWAACNImXf1Nog/EBoHaAbxQBYbHNj/8QAAAAAAP/6 +rA2gCgUAjiJl77IrfBjqJAAJYASAAFhsamP/ocCgWZ3mGeHXipj5X/SokAilAGP/stogW/rcY/7D +jyefEYX5+eKCFa/JBQDs8RUn6IEAAAnZAZkS6ckIClcCgADqiAwCqEEAAJX5CIgy6PUUJMkBAAD4 +oAfS4gCdAGirQaWsLMzw/SAEY6IAnQDvEgYiDIUAALBObekFBQCGDwJhjNEPAgAPAgCsrOjZBCZj +wQAA+YAGRGIAnQDs1gEuKASAAGWOZGAAlAAA6iQADFgEgABb/D6LMYgTjBTqFgAtbwKAAO2ICAX0 +xYAA6iQADFgEgABb/AWOEO6uCAqQBIAA7k4IC/8CgADm/wgHc/0AAC72ndEPBZkM/CDIFaT5HQBt ++QUFIIYMAmOMEg9FDC8SBizMQOn/CAKMQQAAKFz/bYkFDECGDwJlhRIs2QQJqAyoVSVcMOXWAS5u +jgAAiRLAUOXVBCTJAQAAmdH5oAYV7/buAAxVDPXhJhXv/A4AhRIlXED1oCYV7/zuAAAAAGwQBB3h +gBrhgRzhfy3SNiqhfizCi6Pd6joMDu5CgAD9gABGcAsFACvEBCvEBVkMbPpAaB2gCwUAW/yv0Q8A +AABsEASFI4MgFOFy+ECEFaFVAQDq4XAarsKAAORUCAGAuYAA+wAEBDaYOQAJiAIoJQQiQn/RDx3h +ZxPhaB/haCZCfishBC5Cf5JgliGj//1gBAX2yzkADLsCr1/vJgAnKAUAACVGfyJGfuslBCqQBIAA +0Q8AAGwQBIIjAgJB0Q8AAGwQBIogZaBQHeFW6iIDKfbCgACu3f2v6BXgDBUA/IBABjGqAQAGqgIN +yCwI3SgnJQXtzAwEWAUAAP1tAAw/+8UA66oBDE5CgAAJWQIDqgKaIwmIAiglBNEPjyMb4UIPD0EL +/hGr6y2yfxnhPCyyfnLZGdnA8yPeDaAMBQDAwCy2fyy2fvpACBWgAEYA2MDzDEYNoAwFAHLRHI0h +mtCOICmyfZ3hnCDsJgEky/0AAPlvphXv/VoAGeEoGOEoqYio6HihIOq2fy+BLgAAza0qsn1qohgt +snv9b+YV4ABKAAAAAAAAAOy2fyf/KYAA+kAIFa/+pgAc4RmIIayZqen5DwAM8AwFAAnIOPlvxhWv +/ioAbBAE9cIqBeAGFQD0QGgdoAI1APaAQAMwAB4AALAiKFJ/6GP3cquBAADRDwBsEAT0QggVpCNB +APJaAAk/U4EABCIKhCaCIQVEKApEEaQi0Q9sEAQpIhIjIAfUUPg+AARwBTUA9QAIcJEzAQAX4Oz3 +wdwFoYnhAPUACFCSAJ0A9GAGIhIAnQAMORGmmSqSngc7Ciuyv/dACGHSAJ0AKpKdC6oB8U7ADedE +AQAoIQcZ4Ov/wdgFqogBAOvg6xxHAoAACYgCmKAY4Oj8QAgV4DwFAJyn+0CmFeAZhQCZo/lARhWg +CAUAmKbu3QIO/gKAAJ2kBf8Cn6EvIhIPj0Hopggv/wKAAJ+p7eDZGfcCgACm7iXmnSwiEioiEA3M +AuwmEilYBIAAWNCAaEIYiif6ACId4AwFAPtEABWgDRUAWGhq0qDRD8Ag0Q8c4LeLyGqxXQw5EaaZ +LZKebtNoKpKdBz0KLdK/DaoB5KBbZfP9AAD/gQYVr/zGAC8aAA+ZAvhCRhXv+7IAACgqAAiYAvhC +RhWv+8IAiSLLnGhCUMAg0Q8AAAAAAAAA//voDaAKBQDAoFmcrBzgnIvIa7GU//uUDaAKBQAAwKDA +2g29NP2BBhXv+1YAAAAA6iQAAdhhAAD8AAIdoA01AFhxwmlCrownL8kUisn/hAAVr8gFAOjuAQf4 +QQAA78UUJVPBAADqxgkncQEAAH6rKinBFR3glqqamsmdoIwg+8EoBeANFQDrpgIuZgKAAA3MAv1A +JhWgAgUA0Q8d4IydoIwg+8EWBeANFQDrpgIuZgKAAA3MAv1AJhWgAgUA0Q8AbBAYkhCOIBXgg4kj +iyGKIioWIisWJPgkZhXgBBUA9CDmFaAIBQD4IKYVoAxFAPwhRhWgDTUALRYJ9CDGFeAPJQAvFgj1 +wOoF4A+lAP4iBhXgDbUA/CImFeAMxQD8IkYVoAiFAPghxhWgBJUA9CHmFaAJdQD4IaYV4AtVAPoh +ZhXgCmUA+iGGFaAL1QD6ImYV4ArlACoWFPXAwgWgCfUA+CKmFeAIRQCYFIYWKxIkiRUnYX4sEiIi +YX8HmSgvUIAJKQj4nIgVo5kBAAOZCu6SAC9QBIAAJmI+LRIjCO4IC2AAjhcsEiQtEiIH7igvUIGu +LvicqBWj7gEAA+4KjuAqFhbqEiMtWASAAKjuC2AAjhgsEhYtEiQH7igvUIKuLvicyBWj7gEAA+4K +juAqFhfqEiItWASAAAjuCAtgAI4ZLBIXLRIWB+4oL1CDri74nOgVo+4BAAPuCo7gKhYY6hIkLVgE +gACo7gtgAI4aLBIYLRIXB+4oL1CEri74nQgVo+4BAAPuCo7gKhYZ6hIWLVgEgACo7gtgAI4bLBIZ +LRIYB+4oL1CFri74nSgVo+4BAAPuCo7gKhYa6hIXLVgEgAAI7ggLYACOHCwSGi0SGQfuKC9Qhq4u ++J1IFaPuAQAD7gqO4CoWG+oSGC1YBIAAqO4LYACOHSwSGy0SGgfuKC9Qh64u+J1oFaPuAQAD7gqO +4CoWHOoSGS1YBIAAqO4LYACOHiwSHC0SGwfuKC9QiA4uCPidiBWj7gEAA+4KLuIAKhYd6hIaLVgE +gAAI7ggLYACOHywSHS0SHAfuKC9Qia4u+J2oFaPuAQAD7gou4gAqFh7qEhstWASAAAjuCAtgAC4S +ECwSHi0SHQfuKC9Qiq4u+J3IFaPuAQAD7gqO4CoWH+oSHC1YBIAACO4IC2AALhIRLBIfLRIeB+4o +L1CLri74negVo+4BAAPuCo7gKhYg6hIdLVgEgACo7gtgAC4SEiwSIC0SHwfuKC9QjK4u+J4IFaPu +AQAD7gqO4CoWIeoSHi1YBIAAqO4LYAAsEiEuEhMtEiAvUI0H7igoQvGuLvogZhWj7gEAA+4KjuDq +Eh8tWASAAJsRqO4LYACMES4SFC0SIS9QjgfuKChC8q4u+iBGFaPuAQAD7gqO4OoSIC1YBIAAKxYj +qO4LYAAuEhUsEiONEwfuKC9Qj64u+J5oFaPuAQAD7gqO4OoSIS04BIAAJxYi6O4IC9gEgAALYACO +ESoWJCkSEi0SFY8VKxITLBIU6BIRJ/hBAADvFgUl2EEAAOsWEyZgQQAA7BYUJEBBAADoFhEm6EEA +AO0WFSTIQQAAKRYSjR+JHIgbjB6LHe8SECRAQQAA6BYLJmBBAADsFg4l2EEAAOsWDSf4QQAA7xYQ +JMhBAADpFgwm6EEAAJ0fiRaNGY8a6xIHIiEBAADsEggm6EEAAO0WCSf4QQAA7xYKIqhBAADvEgQm +YEEAAOwWCCXYQQAA6xYHJMghAADpFgYn+/0AAO8WBC/iFgAAiRCPE4sSjpCIk4ySjZGriKfMqt2v +7p6QnZGckpiT0Q8AbBAEKSIV+KAABPA4dQDpjAwBIEEAAPMgAEU/iwUA66QQJVBFAAD5AAXTYgCd +ACsKAFmYgSwiFSsiFO3NEQlABIAA/EJGFe6APQD9awANsAk1APpCZhXgCiUAbaoMjoQODo7uhgQk +QBEAAA8CANMP0w9tmiHpggQkQEEAAIqBi4KMgwkJjgoKjgsLjgwMjpmAmoGbgpyD60QACVAEgABb +/rWKIIgiiSGPIwgIjgkJjg8PjgoKjpognyMpJgHoJgIpQASAABnfNAIAhgMCYfgAChXgCbUAbZoC +CACK0Q8AAAAAAAAA/YEAFaALBQBZmFL4QGgdoAlFANMPbZoh6YIEJEBBAACKgYuCjIMJCY4KCo4L +C44MDI6ZgJqBm4Kcg+okAApYBIAAW/6T2kD/+/wNoDyFAABsEAYpIhX4QogVoEYFANMP+IAARXWZ +AQAJZgx0qwGxiComFQYqDOgmFCVRQQAA9oAHs6IAnQDrNAALYASAAFmYJfhAaB2gCUUA0w/TD22a +IemCBCRAQQAAioGLgoyDCQmOCgqOCwuODAyOmYCagZuCnIMlLBDqJAAK2ASAAFv+cAZHDPbgBY7S +AJ0A5jQICtAEgAD24GgdoAMFAOQWACpABIAA+MhoHaAJRQAKAmcIQIYKAmUIIIYKAmMIAIbqDAAJ +QASAAG2aIemCBCRAQQAAioGLgoyDCQmOCgqOCwuODAyOmYCagZuCnIPqJAAK2ASAAFv+U+pUAAGY +BQAA5mzAIiEBAADvbZpqQASAAIsQCjwRC8sI7HwMCtAEgABZl+3RDwAAAAAAAOs0AApgBIAAWZfo +0Q8AAAD2YABGMAMFAPwgBhWv/yYAbBAEGN7IGd7GGt7EE97HkyOYIpkh+kAGFaALBQArJhUrJhTR +DwAAAGwQBt4g5OIQKmAEgADnQgcr0ASAAPu9agXgGDUA40IVKZAEgADncg4i++kAAHj7JxjetQj4 +CoiAmhOcEu4WASwAIoAAAJMQKrKV7FQACVgEgABZmZlkpc/ygqYV4AIFANEPAAAAACviEgubUu4W +ASX/QYAAGt6e4xYAKVgEgADqorcq4ASAAFmZjGSlghrel9sg6qK5KuAEgABZmYdkpuAa3pPbIOqi +uyrgBIAAWZmC90jgDeN2xQAa3o3bIOqivSrgBIAAWZl8ZKbhGt6I2yDqor8q4ASAAFmZdyN9A+8C +AAGaAQAA+0BDcBIAnQArMNnBWPVgLAhiAJ0AabchJTTZixD6gqYV4AIFANEPkxAqso3sVAAJWASA +AFmZZ2SnH4sQ+oKmFeACBQDRD5MQKrKb7FQACVgEgABZmV9lrxj6IGgdoAu1AFjMifoAIh3gAwUA +6rM4BQDhgADqEgIrWASAAFmX8sipHN5ojREMrDYs1hdlMyuNEPyCphXgAgUA0Q8AAAAuQG5k7s2T +ECqysexUAAlYBIAAWZlIZa66+iBoHaAbZQBYzHH6ACId4AIFAOqyOAUAqYAA6hICK1gEgABZl9os +fQMqxShlItSNEPyCphXgAgUA0Q8AkxAqsqPsVAAJWASAAFmZNGSiuxreQNsg6qKPKuAEgABZmS9l +rlj6IGgdoAtVAFjMWfoAIh3gAgUA6rI4BSgZgADqEgIrWASAAFmXwixAb/GAJ27SAJ0AZKTlihP6 +AKId4AzVAFjMNdKg0Q+TECqyqexUAAlYBIAAWZkZZa7I+iBoHaAbJQBYzENkojsrQG7TD2S3kuoS +AitYBIAAWZetLEIWCsw2LEYWixD6gqYV4AIFANEPkxAqsqfsVAAJWASAAFmZB2SiNxreEwIrAg8C +AOqioSrgBIAAWZkBZa5o+iBoHaAL5QBYzCtkodvqEgIrWASAAFmXlyt9Aiq1FIsQ+oKmFeACBQDR +D5MQKrKZ7FQACVgEgABZmPJkoioa3f3bIOqipSrgBIAAWZjtZKOHGt352yDTD+qikyrgBIAAWZjo +Za4C+iBoHaALdQBYzBFkoXUrQG5ktwIa3e6LEuqi3ytgBIAAWZjeZaZkK0BvwMgMuwIrRG+LEPqC +phXgAgUA0Q8AAJMQKrKv7FQACVgEgABZmNNkoe8a3d/bINMP6qKRKuAEgABZmM5lrZr6IGgdoAtl +AFjL92ShDStAbmS2iRrd1IsS6qLfK2AEgABZmMRkppgrQG8sCv0MuwErRG+LEPqCphXgAgUA0Q8A +kxAqspfsVAAJWASAAFmYuWShtxrdxdsg0w/qoosq4ASAAFmYtGSi2hrdv9sg6qKrKuAEgABZmK9k +rFca3bvbIOqisyrgBIAAWZiqZaxEGt22ixLqos0rYASAAFmYpWWkaosRK7ISC5lSyJlokgf5IA9h +0gCdAIwRK8YS8oKmFeACBQDRD5MQKrKH7FQACVgEgABZmJhkoXoa3aPbIOqiiSrgBIAAWZiTZayv ++iBoHaALJQBYy7zKohrdm4sS6qLfK2AEgABZmItlrI+KE/oAQh3gDNUAWMue0qDRD8Ag0Q8AAAD6 +IGgdoAv1AFjLrmSv6uoSAitYBIAAWZcb6xIAI+ALAAAqxRX6gqYV4AIFANEPAAD6IGgdoBsVAFjL +omSvui1AbmTVJClAb/E/4W+SAJ0A8T/hL9IAnQDqEgIrWASAAFmXCS5CFwruNi5GF4sQ+oKmFeAC +BQDRDwD6IGgdoAulAFjLkGSvci9AbtMPZPSV6hICK1gEgABZlvsoQTT7AA8CogCdAIoT+gFCHeAM +1QBYy2/SoNEPAAAA+iBoHaAbVQBYy4BkrzLqEgEqWASAAOwSAitoBIAAWMsIixD6gqYV4AIFANEP +AAAA+iBoHaALlQBYy3RkrwIpQG5klDga3VKLEuqi3ytgBIAAWZhBZaJzK0BvjRD8gqYV4AwVAAy7 +AvqN5h3gAgUA0Q8AAAAAAAAA+iBoHaALFQBYy2Jkrroa3UGLEtMP6qLfK2AEgABZmDBlqySKE/oA +Ih3gDNUAWMtD0qDRDwAAAADqEgIrWASAAFmWxPVAFrKSAJ0Axy/RDwD6IGgdoAuFAFjLTvoAIh3g +AgUA6rI4BQFJgAAsQG4PAgBkw6Ea3TDrEgIrYASAAFmYGGWihi1Ab8DoDt0CLURvZS41jxD+gqYV +4AIFANEPAOoSASpYBIAAWMtDZa+cKzDZY/puAAAAAPogaB2gGwUAWMs0ZK4CKEBu0w9kgxTqEgIr +WASAAFmWnylCGIsQK0YVCpk2+IMGFeACBQDRDwAA+iBoHaALNQBYyyZkrcoa3QWLEtMP6qLFK2AE +gABZl/Tj3QodB+YAAIsRK7ISC8lRyJlokgf5P/kR0gCdAI4RjBADvQEt5hL8gqYVoAIFANEPZS2E +jxD+gqYV4AIFANEP6hICK1gEgABZln4qRTSCEPKCphWgAgUA0Q8jfQPyb4AV4AsFAPpgaB2gjAUA +WZYP6hICKdgEgABYy10jfQMjPIArMNnAxAy7Avp/Zh2nuwEA+nsmHe/l0gAjfQMjPIAoMNn6IEgV +oAklAAmIAug02StYBIAAWZZjKzDZ+nsGHa/lKgAAAIoSWYxqKH0DKID8eKkaihJZjGbspAAD2BMA +AOoSAiXb9QAAWZe5ZKG5wKL9uZ4FoDsFAFmcHMcv0Q8AGtzBixLqoscrYASAAFmXsGWuJ4sRK7IS +C8lRaJEKaJIH+T/wsdIAnQAe3MEDvQEO3QKOEYwQLeYS/IKmFaACBQDRD4oT+gEiHeAM1QBYyrfS +oNEPAAAAAPogaB2gC0UAWMrIZKxSGtynixLTD+qixStgBIAAWZeW49yvHQVmAACLESuyEgvpUciZ +aJIH+T/tUdIAnQCOEYwQA70BLeYS/IKmFaACBQDRDxrclosS6qLPK2AEgABZl4ZlrX6LESuyEguZ +UmiRCmiSB/k/62nSAJ0AH9yZghHvvwID6A8AAO8mEibqAQAALNDZwOEOzAIs1NnygqYV4AIFANEP +ihP6AQId4AzVAFjKidKg0Q8jfQMjPIArMNnAwQy7AgsLR/p7Jh3v354AAAAa3HeLEuqixytgBIAA +WZdmZaz/ixErshIL6VFokQpokgf5P+dx0gCdAB3cegO8AQ3MAo0RLNYSixD6gqYV4AIFANEPAAAA +AAD24ABCsAsFAPqgaB2gjAUAWZWKwWDqEgIq2ASAAFjK2Csw2Qa7Avp/Zh2nuwEA+nsmHe/dngAA +ACN9AyM8gCsw2cDIDLsCCwtH+nsmHe/dMgCKE/oA4h3gDNUAWMpY0qDRDwCKE/oCAh3gDMUAWMpT +0qDRD4oT+gFCHeAMxQBYyk/SoNEPihP6ASId4AzFAFjKS9Kg0Q+KE/oBAh3gDMUAWMpG0qDRDwCK +E/oCQh3gDMUAWMpC0qDRD4oT+gIiHeAMxQBYyj7SoNEPAIoT+gDCHeAMxQBYyjnSoNEPihP6AOId +4AzFAFjKNdKg0Q+KE/oAwh3gDNUAWMox0qDRDwAAbBAEJCIQZEBsKTAQKjARLDAa6zASLM4CgAAK +mQLqMBMszgKAAAuZAuswGSzOAoAACpkC6jAYJIURAAAIqhELqgLrMBstVgKAAAyqAgiqEQuqArGq +6iYWJISNAAApIhLr3BwUwCiAAAubASsmEixABS0KlX3BScAg0Q8ALjAULzAV6DAWL3YCgAAP7gLv +MBcvdgKAAAjuAgjuEQ/uAv3XYABQjQUALyISePckwKX9uBIFoDsFAFmbUcAg0Q8AAAAA+oBoHaAL +ZQBY5KDAINEPAIwnKckUi8n5hAAVr8oFAOqIAQTJAQAA6cUUJdsBAADrxgkkQQEAAHi7Bi7BFavr +m8kY2/XZsPgACB2gD0UAbfoCCQJhHNvcnLCKIP1AABUwDEUADKoCmrEpMBQqMBUe2+vvMBYszgKA +AAqZAuowFyzOAoAAD5kC7rYCLM4CgAAKmQLptgQhwCEAAOgGAAX4YQAADwCKKiISiSINqgLqJhIs +9+YAAPpAaB2gDTUAC+AAY/7pAGwQBiQiEC9AbvXgBtiQnFUAHNvSjSCONi8xC/hj8BWgClUA+CAG +FaA7BQBZmxMa28wkIhgsMQuILIlKhUf9AABEMAsFAPhBhhWgDQUA5VIOJJBWgAAtRhcKngL+gUYV +oAAqAAAAACtCF+taCAHYgQAAWZTFL0IXLjELjUCv7i5GFypQBCxQBRjbt+tQBi1WAoAADKoC6VAH +LVYCgAALqgLs27IdLgKAAAlVAghVAfSgYBXv+MUA+KAEArA7BQD+oGgd4ApVAFma7CoiEykxCytC +F6qZ6SYTIsDBAAB4sUHAINEPAAAAAAArQAV8sfAc25/8QAgV4AolAP6ACBWgOwUAWZrd+oBoHaAN +JQD8TIYd4AsVAFjkLMAg0Q8AAAAAAAAf25OOSg/uAe5GCilQBIAAWOFo+kBoHaALBQD8AAIdoA0l +AFgBg8Ag0Q8AbBAGHNuJLSIALjIF9EDoFadVAQD+v8AV4AgVAA+POfSCghWgClUA9CAGFaA7BQBZ +mr+JImWQmCYgBxfbTAYGQeoyBStHAoAAp4grgp4krB/5togF5EQdAHSzfCiCnQlrCiuyvwuIAe2E +AAQDqYAAHNtmDACHbUkCCAJhiDQe20ie0IkgHNtK6tYDJthBAADs1gIszgKAAOlJAgHggQAA6dYB +KVAEgAALgAAMbxGn/+T2nSKUdQAAiif6AUId4AwFAPtEABWgDaUAWGLX0qDRD8Ag0Q8AAAAA//4s +DaAIBQDqJAAKaASAAPrDABXgDAUAWGxQwCDRDwBsEASHJyp5FB/bQvjipBXvzQUA6HIIJVAHAADs +cgslUoEAAOqTd3PYgQAADbsBq5nowXR0yQEAAC6NAep1FCdSgQAA6pNxfDAEgAB5oX2aeO8ABQs4 +BIAABwJhBwJhBwJhBwJhBwJhBwJhBwJhBwJhBwJhBwJhF9sRl2CFIJNllGTztlgFoAelAOJmAiqu +AoAAB1UC5WYBKxAEgADRD8Ag0Q8AAAAAAAD3gGgdoAgFAPjhZhWv/nIACJoMCroMKq0BKqzg+uEG +Fa/+IgAsvED84QYVr/32AABsEATHjwhYAwg4AghIA6ho6CIIC4EKgAACIhiiMtEPAGwQBAQ4AwhY +A6ho6CIIC4EKgAACIhiiMtEPAABsEAQEOAMIWAEISAOoaOgiCAuBCoAAAiIYojLRDwAAAGwQBAVI +Awg4AQhYA6ho6CIIC4EKgAACIhiiMtEPAAAAbBAEIyIQKDAF+EJIFeCUJQB0iUj/KKADEI0FAHif +PXCfGera8BS9WIAACpoB+kJGFaACBQDRDwAAAAAA/bXWBaAKVQD8YAgV4DsFAFmaJCswbtMPabEF +LDAFdMEGwCDRDwAAAPpgaB2gDSUA/EyGHeALFQBY427AINEPAIwnL8kUi8n/hAAVr8gFAOjuAQf5 +AQAA78UUJdsBAADrxgkncQEAAH67BinBFaubm8kc2sPZsPwACB2gCkUAbaoCCQJhHNqqnLCJIB7a +vvv/4h2gDEUA6rYELM4CgAAMmQKZsSgiEo8inrINiALoJhIv+4YAAPpAaB2gDTUAC+AAwCDRD2wQ +BBPaugMiAtEPAGwQBCcgB4giHNqD9kIIFaF3AQDlgmNrzwKAAAyZCCiSnhraefcAEsLSAJ0AJJKd +CngKKIK/CEQB6NqNEhIhgAAlIhIqIgn4QUgV4FVBAAhVCiVSgOqZDAKowQAA9SAOw+IAnQArIBYt +Cv99sRX6QPAVoAwFAFhrNxzaZ/NBkA3g/fUAG9qYLyEHGtqXGNpv/7TiBar/AQDpIRov/wKAAAj/ +Ap9A+EAIFaBPBQCfQ55C+wYADTAOVQDqRgQsRgKAAA6IAphBKCIS+IDGFeA6BQCaRfgIAAUyiFEA +5ogRDVaCgAAIqgILqgKaR4opKSIVG9pwpaqlmfhCphXv6AUA6iYJIkiBAAD4gAuEIgCdAPoACB3v +iAUACQJhCQJhCQJhL0Qg+IQmHaAPBQAvRCQvRCcvRCYvRCUpYhH4h2Yd6JkdAPiHRh3omR0A+Icm +HeiZHQApRDgoIhb4h+YdqIgdAPiHxh2oiB0A+IemHaiIHQAoRDyKNCg8GPVABpgQ+fUACACI6Npa +ElChAAAKAIoa2kwpRDD4hiYdr/n1AClEMypEMoo0L0Qj+obmHaiPHQD4hEYdqJodAPiGxh3omR0A ++IamHeiZHQApRDTrAAUCQQEAAAgCYSkgBwkJQQyZEayZLpadKyAWfbEK+kDwFaA8BQBYasOJNGiQ +J4on+gCCHeAMBQD7RAAVoA1FAFhhsSsiEiz6fwy7AfpCRhXgAgUA0Q8e2jQtIhIO3QL8QkYV7/8u +AAAAAAAAAADqJAAK2ASAAFhq5uzZ9BVw6YAAYAAriW4Y2iSxmZluCJkC+IZmHeiJHQD4hkYdqIgd +APiGJh2oiB0A+IYGHa/8tgDAINEPAADrfBgpUASAAPwAIh2gDVUAWGsSwCDRDwDrfBIpUASAAPwA +Ih2gDQUAWGsMwCDRDwBsEAQqIhQpIhMc2db9s6YF5zUBAOqZDAGUHQAAZJCAKiAHCgpBDKsRrLsu +sp5u4ngrsp0Nrgou4r8f2esY2dr/YAQFsBQFAO7Z1BWC8YAALSEHDQ1K758CDu8CgAAO3QIe2fmd +sI0gn7WYspSzGNnU/6YADzAEJQDutgQu7gKAAATdAp2x6AAVBdhhAAALAIoMrxGs/yT2nS4iFKnu +LiYUaTIQwCDRDwAAiCLKgWgyNcAg0Q+KJ/oAIh3gDAUA+0QAFaANFQBYYVbSoNEPAAAA+0MAFeAM +FQD6QGgdoA0lAFhq0mkyyYwnLckUisn7hAAV784FAO67AQboQQAA7cUUJVPBAADqxgkl2QEAAHur +Ki/BFRnZpqr6msmZoIgg87OUBaAJFQDipgIsRgKAAAmIAvlAJhWgAgUA0Q8Z2ZyZoIgg87OCBaAJ +FQDipgIsRgKAAAmIAvlAJhWgAgUA0Q8AbBAGLyIYL/BYKAqOePF5KCAF6dm3FAOZgAAY2bQkIhII +RAEkJhKNOSsxCy4iEX2YfikiE6uZKSYT8oAFHlIAnQBk4MYq4gx9pz4o4gv7wGgdoAsFAPwAAh2g +DSUAC4AAKyIUKiITGdmjC6oM7NmjFVkDAAB7kxj7grYNoAkFAOkmESyQBIAA0Q/AINEPAAAA+kBo +HaALBQD8AAIdoA0lAFv/f8CQ6SYRLJAEgADRDwD9syYFoAolAP5ACBWgOwUAWZjAKiIQLaAFLgqV +ftG5wPL+TIYd4AsVAFjiDsAg0Q8c2YiN4P/AsBWgClUA9CAGFaA7BQBZmLMoIhIp+r8JiAH4QkYV +r/1uAAAA2iBY30Rj/0wAbBAILSIYK9BYKAqOeLENKSAFGNl37Nl3HIBGAADAINEPJCISKSIRCEQC +5CYSIjT6gACPLIk2JTAgJjEK/hFiHa/4xQD/KMYN5aUBACoiECugBSwKlXyxxMDS/EyGHeALFQBY +4efAINEPAAAA5JKCYdCBAACJl4me+SYAFeALZQDAIG25BQoAhgkCYdEPAAYGTiZs2whmAf9gE4wg +NxUApvj8hgAKMCslAPhBhhWgLFUA9EJGFaAmFQD3QkYNoA8FAHyhCnehB/tAILViAJ0ALzAwKDAx +GdlI7jAyL/4CgAAI/wLoMDMv/gKAAA7/AuvZQx/+AoAACP8C+eAcPmiPuQD9EAAUNe8BAAjuAhjY +/CiCPSuyiK6OCe4Rrrvt0Fgl2gEAACsmEf9gsBWgibUA+aAZDWIAnQApCpr5wBi0YJi1APnAGHQg +mWUA+cAYNGIAnQAtCpn9wBmdYARFAPdABjQiAJ0A/UAF9CIAnQApMEEuMEAvMDwtMD3oMD4vdgKA +AOnuAg/+AoAADf8CKTA/7TBCL/4CgAAI/wLoMEMvdgKAAO3uAg/+AoAA6f8CD3YCgAAI7gIP6Azt +IhAkBJuAACXSEn9RCAX4DGaAAi/WEi/SE9MP0w9+8QgP6QxmkAIu1hONvATdAp28fKFQ90AK5GIA +nQD3QBEEIgCdAMLi/0AVVCIAnQAvEBBk/hCKtyk8IPtByBWgCDUAbYoFCSCGCgJjwCDRDwAtMCPA +4Q3tOS20QS0UEP1f+aUiAJ0ALzAhf/eoLzBBLDBALTA8KDA97jA+LmYCgADvzAIO7gKAAAjdAi8w +P+gwQi7uAoAADt0C7jBDLmYCgADozAIO7gKAAO/dAg5mAoAADswCDcgM6iIQJASLgAAuohJ94QgO +3wxm8AItphItohN80QgNyAxmgAIsphMsMDgtMDmKvO4wOi5mAoAADcwC7TA7LmYCgAAOzALp2Mse +ZgKAAA3MAuSqAgZgBQAALCYWmrz5YWYV7/xiAInXKzELiZ6/uwtLS+W9fmTIwQAAY/0TAAAA+gBi +HeOE4QD5f+w+IgCdACswJCgwJekwJi3eAoAACLsC6DAnLd4CgAAJuwIIuxHouwIDSBEAAPstAAt/ +9WIAACwwIfGADM4SAJ0ALTAkLjAl7zAmLu4CgAAO3QLuMCcu7gKAAA/dAgjdEQ7dAmXRbywwTC0w +Te4wTi5mAoAADcwC7TBPLmYCgAAOzALqIhAuZgKAAA3MAmTMqC2iGP2/5ROiAJ0ALLYSLzBIKTBJ +6jBKL/4CgAAJ/wLpMEsv/gKAAAr/AujYjR/+AoAACf8CL7YUKTA2LjA0LTA1/mbwFeAKBQDqthUv +dgKAAA3uAuq2Ey92AoAACe4C6LYLL3YCgAAP7gL/YaYVr/fKACkwOCowOewwOizOAoAACpkC6jA7 +LM4CgAAMmQIImREKmQLo2HMUyAUAACkmFvlhZhWv9vYAAAAAAAAAAOzYbh74BIAA/WAIFeAKVQD0 +IAYVoDsFAFmXkCoiEsSwC6oC+kJGFaACBQDRDwAAAP/yEA2v7qUA7NhhH2gEgAD/YAgVoAolAPQg +BhXgOwUAWZeCY/uhAAAtMDguMDnvMDou7gKAAA7dAu4wOy7uAoAAD90CCN0RDt0C7NhRFugFAAAt +Jhb9YWYVr/S+AC8mEfugaB3v9JIAKiIQY/tcAABsEAgrIgcmIAcPAgAouRQFDUf1YcgVoWYBAOOy +CSQREYAA+aATEVIAnQAc2D6IIP9gSBWgClUA/b/AFeAJFQDtnTkJeASAAPggBhWgOwUAWZdbHNg1 +/GAQFeAKVQD+ShAVoDsFAFmXVRXX4uvX5BtQBIAA9MAOihIAnQAMaRGrmSySnveAEgpSAJ0AKZKd +BWwKLMK/DJkBZJH7LiEHLCBAJiAH96/MBeruAQDv2CAfdwKAAPWADkiRVgEA9YALyRIAnQD1oAuK +kgCdAMDQ+bAwBaBmEQDsIQgrMoKAAAbuAu/uAgqsAoAABcwCCMwCnpCPIPcgRhXgNgUA9yBmFaAF +BQCVlZWX/SCGFaAORQDolgYv/gKAAP/mAA+wCCUA75YBLv4CgADo/wIE4IEAAAMghgwCYwMAhgwC +YZ+Z5BMeBMkBAAAJAmkEYIYJAmcEQIYJAmXpIhItZwKAAOvMCAE5IQAA/5OmFa+aZQD3IAYUb2tF +APev4AWvmXUAJCISq0QvQigpRIEoQieY8CNCJy5CK58xJUYnJUYoI2KL6kSBJ3ysgAArQjEuMiQL +ikT7WgANMAwFAP9AAQUwDRUA+0AIFa+7gQBYXsUlRjEoQiYrQh8lRiv/BAAV78kFAAn/AeWFFCf5 +AQAAn4mfiC5idPpiKBWgDAUA/28ADbANFQBYXrf+QkgV75l1APxiSBXvmmUA/gAiHa9rRQD37wAP +8AwFAO/sOAbr/QAA7TYSJnpxgADAINEPAAAA/IBQFe/6RgD/93gNoAMFABfXbIx45hYEJg3/gAAM +qRGrmSiSnvcABIJSAJ0AKZKdBa0KLdK/DZkBZJB+sM6eeGWeHmAAFwAA/BBCHe/5JgAvIEAI/xD+ +YAYV7/ZiAIgiZY+VjTDrbBgpUASAAPmvSAXn3cEA/EgGHeAMFQD4YAYV4A1FAFhogcAg0Q8AAAAA +//csDaAJBQDAoFmTWIx4ihTr10gYBAqAAPmf+4CSAJ0A//4sDaAJBQDAkMDqDs40/uEGFa/98gBs +EAaJJyMgByiZFAMDQeeSCSQLsYAABQhH+QANcVIAnQAqIEEV1zP2AIIdoAQFAPFabA3gDAUAG9cx +DDoR9GAKehIAnQCrqi2invegENOiAJ0AKaKdBT0KLdK/DZkB6pQABI2hgAAuIEHsFgAvDp4AABjX +Mh/Xbi4hByUgBxnXbPxBBBXq7gEA9CAAAnBVEQDqVRAPdwKAAOXuAgokAoAABN0CCd0CD+4CnqCP +IJ2k+UBGFaAEBQCUpZSn+UDGFeA1BQCVo/3gABewBUUA5f8CDnYCgADl11cVSIEAAP9AJhXgDyUA +ByCGCQJjBwCGCQJhD+4CnqkMPRGr3SbWnf5BiBXvmXUAKSQF8rFoFe+YZQDoJAUn/KyAACsiEi4y +JAuKRPtaAA0wDAUA/0ABBTANFQD7QAgVr7uBAFheKCQmEogniyCULP8EABXvyQUACf8B5IUUJ/kB +AACfiZ+ILlJ0+mIoFaAMBQD/bwANsA0VAFheGioyErCq+mJGFaACBQDRDwAAAAAAAP/6KA2gBwUA +Htbajej3oAa4kgCdAAw6EauqL6Ke9+AHa6IAnQAqop0FPwov8r8PqgHkoNtmw/0AAJjo+UBoHe/6 +XgAqIEAIqhD64AYVr/kyAIieJIAEK4AFFtbx6oAGKiYCgAALRALogAcqJgKAAApEAghEEQhEAgZE +ASZMZ/aOAAswjJUA9sCAFa/4lgCJcO1kAAlQBIAA+a4OBaeZwQDpJEAh2GEAAPjgBhWgDBUAWGfi +wCDRDwDtRAACYSEAAOtMZylwBIAA/uBoHeS7HQBZlfMb1qj8IAgVr/g+AAAA//fIDaAJBQD8IAYV +oAoFAFmSrh7Wn43oG9afjBD5v/igkgCdAP/8yA2gCgUAAMCgwPoP3zT/wQYV7/yKAAAAAGwQBCki +ByMgByiZFAMDQeeSCSQK6YAAFNaM960cBaeFAQD5AAwRUgCdAPRgClISAJ0ADDkRBpkIKpKe90AN +SlIAnQApkp0EOgoqor8KmQFkkWMqIAcoIQcf1o8b1sr5QAAEMMoRAOrMEAxHAoAADIgCC4gCmJCM +IP8gRhXgPgUA/yBmFaANRQDu1sAeZgKAAA3MApyRKyBB/EEEFaAEBQD/IMYVofoBAOSWBS/8AoAA +78wCBNCBAADuzAINiSYAAMCwlJf9IIYVoAUlAAcghgoCYwcAhgoCYQi/EQX/AhXWq5+ZDD4Rpu4t +5p34QYgVr5x1ACwkBfKxaBXvmmUA6iQFJHysgAArIhIuMiQLikT7WgANMAwFAP9AAQUwDRUA+0AI +Fa+7gQBYXYMkJhKIJ4sglCz/BAAV78kFAAn/AeSFFCf5AQAAn4mfiC5SdPpiKBWgDAUA/28ADbAN +FQBYXXUqMhKwqvpiRhWgAgUA0Q8A//qMDaAHBQAV1jaKWGqhbww5EaaZK5KebrR2KZKdBDsKK7K/ +C5kB5JBpZWP9AACcWGWerWAADgAtIEAI3RD84AYV7/niAI9w6zwYKVAEgAD/rOwFp//BAP5IBh3g +DBUA/uAGFaANRQBYZ1DAINEPAPoRIh3v+3oA//mMDaAJBQDAoFmSJopYa6GF//6MDaAJBQDAkMCK +CKg0+KEGFa/+UgAAAABsEASKKo6vGNZg6CYLIUiBAADp5gAleOEAAO8mCClYBIAA/kEmFaAMBQD5 +QeYV75iFAPhAph2gDSUAWGd5wCDRDwAAAGwQBBvWUSoxDCuyfxzWMvhiEBXgFGUA+0PWDeAFBQB8 +oRbqJAAK2ASAAOw0AApoBIAAWN4QwCDRD2iRSGiSKGiUCsBA//9oDaAFBQAAfKHRe6vO2jBY3j3V +oP//EA2gBAUAAAAAAAAA/UDmDaAUZQB7owJgAAHAQNowWN5T//6EDaAFBQDaMFjeZuWkAAUBEYAA +/axcBaAKVQD8YCgV4DsFAFmVRv/95A2gBAUAAAAA//24DaAExQBsEAQpMBPxJrAN4PWFAGiRBMAg +0Q8AhCeEThzWH+0wESJIDwAA/T+GHeAKVQDuMBIiQBMAAP8bph2gOwUAWZUx6zwYIlATAADsMBEl +U/UAAFjedeU7CAJQFwAA7DASJVN5AABY3nHqJAAKWASAAFjf8sAg0Q+EJw8CAIROHNYILTARLUQC +/mJQFaAKVQD+gGYdoDsFAFmVG+s8GCJQCwAA7DARJVMhAABY3l/lOwgCUA8AAOwwEiVSoQAAWN5b +wCDRDwAAbBAE9EBgJeizHQAjVFf6qsYd4EQ1APSqph2gCHUA+KqGHaAJBQD4qmYd4EoFACpUUtEP +AGwQBI84/avQBaAKVQD8YhAV4DsFAP/gaB2h//EAWZT7KTAQ6tXiFIyRAABokllplBKINiKifwmI +EagiKCAFKQqVeYFewCDRDwAAANowWOB8/18ADeAJdQCLp4u+LLKODJ1W/SNAHejsuQDA037QEPtg +QCXgDAUAWOBGwCDRDwAAWN+vwCDRDwCLNiqifwm7EftAAEVwCwUAWN8uwCDRDwAAAADApf2rhAWg +OwUAWZTX+kBoHaALJQBY3ijAINEPAGwQBIguIyw4c4kFwCDRDwAAiy6Is+xEAAroBIAA67zgKVAE +gAALgACMIu0gBS5+7gAAZN/Vji5z6dZj/80AAABsEBYlFheHNSYxDysgB4g04xYaKkgEgACZHP4j +SBXgChUAmh/7q0gFoMhZAPwjZhWhuwEA+iLGFeP+9QD7T8QVoLZ5APoiZhXgd/kA+eOwFexIHQD6 +jwANMDhRAPggBh3vqgEA6hYUJFRWgAAGDEn8IcYVoAAyAAAAAAAAAJ4eLhIXKPE9KBYSL/If/iIG +FefuAQAuFhX1wDwhEgCdAIoi+0BBoJIAnQDw5WAN4A0FAO0WESOASYAA2kBY6Hf0AAId4AYFAC8S +G9pw/gBiHaAMJQDv7DkJ2ASAAFjoX/dAAEMwCPUAdoBV9CFmFaSWHQDjFgokyAUAAPgjBhXgAT4A +AAAqEhJkp2MrEhqLtX22n/oiSBXgDBUA7BYRKlAEgADsEhAo6ASAAFjojGankfwAYh3gBQUACtU6 +ZFd7w2CUG/IhRhXk5h0ALhYYKBIWHtT8HNT949T+HCAEgAD1AAkyEgCdAOoSGCw3AoAAo2YpYp4O +iAoogr/7IEDrogCdACZinQhmAdtg5rQABb15gACPyJsV9+A94JIAnQApMq7q1UYUu3mAAC4yrS2i +ZO3rAQfT/QAA/cA63mIAnQCayP3AOvZiAJ0AjRwsIBTTD63MDAxHLCQU9YA8flIAnQAuEhspEhTx +wMAN4Ag1APkAPYjiAJ0AZFDOihoPAgDIoWRQY+tkAAlQBIAA/ABiHaAdhQBY6ITuEg4teASAAOYS +CyKvmYAAHNUmLRIT+amsBeAKBQCa8przmvSa9elpAg9EAoAA6fYALuiCgADo3QIK9sKAAP+mAA6w +G8UA/eAmFeAKVQBZlCorEhX5YDgpUgCdAMAg7BIYKm8CgACj3SzWndEPAAAAAAAAj8j34DjgkgCd +AOkSGCo3AoAAo2YoYp75ADk74gCdACtinQ5NCi3Svw27Aea0AAW42YAAsP6eyPrAaB3v+xoALxIR +0w9k8HfrEgUpUASAAPwAYh2gHYUAWOhRGdT4FtT1jhsoEAAmYpsJ7gIZ1PQIHxTmhgsP+wKAAOn/ +AgR8oIAALBIQ7RISI1v/AAAosj8rsX2eoJ+hnaKco5uk+UCmFaAAcgAALBIQLRISK2EFiGOeoJ+h +m6KYo52knKUmrBgtEhOMHgLdEO0WBy5kAoAA7BYIK6b+AAAa1In4IWgVoA8FAP4gxhXgDyUAnx0K +iAIoFgnrZAAJUASAAPwAYh2gHYUAWOgmjRkvEhqJFisSGo/18TXQDeP+9QAc1MqLtP9ARhWgj5kA +/UAGFeBviQD9QCYVoN+hAPDQABMwz5EA7tTCHulCgADupgMsQQKAAP0GAAx5uwEA66YELmDCgAAM +ZgIIZgImpgUsEg3pnAElMGEAAOkWBiZj/QAA7BYNLnumAADrZAAJUASAAPwAYh2gHYUAWOgCFtSt +iRePGPohKBXgDQUAnRGdEp0TnRSdpP1AphXv/vUAnqKeo5ugLhIa6f8CCsbCgADo/wIA4DEAAOb/ +AgDYIQAA7RwQJTBhAADvpgEg0BEAAFjmzvlAaB3gDBUA6sk5DSgEgADpFh4lIAmAACQWH/4AIh2g +DQUACe045RYgJurhgAAT1I2IGIwXGtSMKxIbhBsV1IXxeAAUsA4VAOvrOQongoAA9IYACnYPBQAL +rzn9JgAMsA01APkmAAwwDCUAC9w5LBYdCfkCKRYZ+eYAD7AFBQD+I4YV4AMKAAAPVlD+GAAF8M/J +APwhKBXgj7EA/UAGFeDveQDs7hEMRAKAAOvMEA3agoAA7LsCCzPCgAD4xgALMM+BAP2IABYxj2kA +7O4CDEUCgAAI7gIc1F+coSgQAAbuAvvGAA9wb7kA9MgAEzu/AQD3xgAPMAYlAObuAg3dAoAA7qYE +LEICgAALiAKYpRvUV5uiGNRX+UBmFa/5jgCZoZSgnqKeo56knqWdpp2nnaidqS8SHeVcASUwoQAA +/qARnGIAnQDrZAAJUASAAPwAgh2gLYUAWOeX5FBRas7CgAD0oApgkgCdACsSHMfv+yYADPANBQDj +mQIL/S4AAI0TLBIajhKPEYvMLMIQmaGbqfVABhWgCAUAmKKYpp+jnqSdp5yljBT9QQYVr/4mAC0S +GywSGRvUMAyZAuuZAgaEGYAA8OJADe/+9QCZoZSgnqKeo56k/0CmFaANBQCdpp2nnaj9QSYV7/02 +AC8SGiIWISvyFibxOCLxOizyFejxOSs0AoAABiICJvE7LfIb7vIaLEQCgAAIZgIo8hcv8hmfop6j +naScppunmKiWpZmhlKCSqfIkKBWv+/YAAAAAAAAAAPDiQA3v+/UAmaGUoJuim6ObpPtAphXgCAUA +mKaYp5io+UEmFa/7OgAsEhqNEi/BOybBOSjBOC7BOuvCGCs0AoAA5v8CDEQCgAAI7gImwhSIzCzC +EJukmKeWqJmhnaKUoJyjn6WeqYwU/UDGFa/6GgArEhvsEhklg1GAABvT7sfv/SYADLANBQDrmQID +gPGAAJmhlKCeop6jnqSepZ2mnaedqP1BJhXv+TIALhIaIhYhLeISLOITK+IYiO2G7i/iFILvLuIR +nqKdo5ykm6WYppann6mZoZSgkqjyJCgVr/hWACsSHMff+yYADPAMBQDjmQIDgPGAAJmhlKCdop2j +naSdpZymnKecqP1BJhWv95oAmaGUoI4T/iAoFeAIBQCYopijmKSYppinmKifpf9BJhWv9woAKhIa +GdPAiqUT01glEiDkEh8lTDCAAOPTVBODuYAAHNO6ixsMuwL7P0YV7+eiAIUfwNL3rQAK/+gmAMCl +/adoBaAbxQDuThEKaASAAFmStmP4ZwAA+iKIFaAOBQCeEZ4SnhOeFFjl0iQWH+UWICViYYAA+iKI +FaALBQBY5cUkFh/0JAYV7/DaAC8SEGX4lWP4OhrTdYgbCogC+T9GFa/l1gDAoFlQ+sinG9OaK7CA +ZLBaKhIUWOW+6RIeLV9OAAD6IogVoAsVAFjlsvgjyBXv71oAAAD/4CQNoDYFAOsSEipQBIAA7BIQ +KOgEgABY5oFj+FcAACsSGowc7RIXKVAEgABYYQzSoNEPAAAAAPunBAWhSxUAWX9GLBoADKwC+6b6 +BaFLFQBZf0Zj/4UAAMCwwNoN/TTtxggtxVYAAPpAaB2gG8UA/AACHaANFQBYZDhj/6EAAAAAKxIW ++kBoHaAMBQDtEhgl2GEAAFhkMWP/hMCgWY8LHNL8j8j5/8HQkgCdAGP/t9ogW+wBY/hsiieNHMDA +6qwgLtgEgABYWqLSoOsSGCpnAoAAo8wrxp3RDwAAAAAAAP/fpA2gBgUA/+FIDaAFRQDAoFmO9hzS +5o/IHtLj+f/GuJIAnQD/4/ANoAYFAAAAAP/jlA2gCwUAwNoN/TT9gQYV7+OSAAAAAGwQBBTTRoIg +JEJ/E9NFBCIMAyIC0Q8AAGwQDBjTQxrS1hnTQCiAfSqiRimSgwmqEeqZCAR8RIAAJJ0B9JAAFaAA +MgAAACSdAyRMgBnS/ihBK/kACAxiAJ0AGtLr6gAFCMgEgAAJAmEJAmEJAmEJAmEZ0y8Y0wsf0r+O +IJ8S+CDGFaAKRQDpFgAvdgKAAArqApoRKUAHL0Er/aZMBaGZAQDj7gIMzAKAAAn/Agj/Ap8UKyA5 +/iFmFaANJQCdGQy7AusWCCgECoAA9GAEsZIAnQCJRyqZFOSgf2TggQAAjZmLwP/4Ah2gJYUA7s4B +BoIZgABtCC59sTgv0AAp0Ad18S8vwQXu+AgMzwKAAOndCARBAQAA6NsRftAEgADtpAAFAImAAGP/ +ygAA/68ADX//vgD9bwANcAkFAAqdOObUAA6BpgAA6kQACNgEgAD8AIIdoA0lAFhWVdEP//4MDaAN +BQAAACocOvpHQBXgDGUAWYuzY/9cwnaOaPoAoh2gOwUA7NLtG2gEgAD+RzAV4+4BAFmR54poCo9X +d/FtikcuoRX7RAAVr8sFAAurAavr62pwc2kBAADvogAmgYGAAH3xKCzQANMPDwIAdcEdKdAHDJkR +6d0IBcEBAADo2yR+0ASAAO2kAA1+xgAA/e8ADfAKBQALrTjm1AAG+mGAAGP/dgAA/68ADT//cgAs +IDkKDUN9yYiOIAjuEQ4+Ap5r0Q8AAAD/rwAOv/5CAGwQBiggBSwgB8GUDwIA+QAQdWHMAQApIgJl +kcMtMAEb0kbm0kgeOASAAP+hQAbQD6UALiBOZeJX7tJCHk8CgAD1gArSEgCdAKaZKJKenBALywr3 +ABGU0gCdACuyvyqSnQurAesWASWOSYAAiuj3QA64kgCdAChiru3SNBQL+YAALGKtLdJ/7csBBUP9 +AAD9gAteYgCdAJjo/YALZmIAnQApIBSkmQkJRykkFPUgDXXSAJ0AHtIyG9IsjCD4ICgV4AoFACq2 +Mu7MAg5uAoAA/WcGFaAORQAO3QIttjEb0o3ckOsPHg3QBIAADAJnC0CGDAJlCyCGDAJjCwCG7AwA +BNkBAAAK4IYLAm8KwIYLAm0KoIYLAmsKgIYLAmkuMQEoIQktIAcsMAEb0nsqIST8IAAGMN0RAOrd +EA5kAoAADcwCDKoCHdJ1LCEiC6oCKpYgDcwCiyAd0hMoliMuliQsliL9YAAVsAwlAAy7AiuWIYoz +6pYlJMgHAADtABUEymEAAAkAigx4EaaI/xOmFeflAQD5wAa5UgCdAMAg0Q8AAIro90AH4JIAnQAM +eRGmmS2Sngt7Ciuyv/egCGTSAJ0ALZKdC9sBZLEAsK2d6OsWAS305gAA/CAGFaABZgAAAAAAAOok +AAnYBIAA7EQACugEgABYX8fSoNEPAAAAAMCwD6k06eYILfTmAAD6QGgdoBvFAPwAIh2gDRUAWGL8 +Y//BAADqJAAK2ASAAFhhSNKg0Q8AixD6QGgdoAwVAPtjABXgDaUAWGLyY/+XwKBZjcwe0byK6Plf +8PiQD6UAY/+q2iBb6sL/+TQNoA+lAACKJ+tEAApoBIAA+0QAFaAMBQBYWWDSoNEPAAAAAP/3XA2g +CwUAwLgLmwL6QEYV7/0eAAAAAPwgBhWgCgUAWY20HtGliuiMEBvRoflf93iQD6UA//woDaALBQAA +wLAPrTT9wQYV7/vyAABsEAYS0ZsX0hD1o0QFoBOVAPhQyBWgpiUAKiKCf6cgKyKCf7cYKiKELKAI +JaAHdsE3iETAoAuAAAUzDGU/2tEPLSKEKSKHKiKH+WAABPuqgQB6mS8K6jArQkHDwgy7KKuq+paG +Fa/+6gAuoQsu7PgODkPu7Pwi6/0AAP+iAAq//s4AAAAMAgAvIoJ//8Yl0AduW8DccPoAoh2gCwUA +/qAAFzD/BQBZkOIlXPHKWygKcZgRwKFZhk/6ICgV4An1AAlZNpkQCbsM+iAmFeAKBQBZbQKKEApV +DGVf18ChWYZF+g4iHeAKBQBZbPxj/2YAAABsEAYoIAUmIAfnNAAK2ASAAPgCgh3gBTUA+QAPnWFm +AQALCEdoghSKIhjRUhfRVeRkAAUDyYAAwCDRDwArIh1lseGIJ4OI+wKkFe/MBQDpggskcIEAAAzs +Aey7CAp/AoAA7BYAJdkBAADzIA38YgCdAC2JFKP6r90thRT7YA3rogCdAMl1yUPZMG1JBQcAhgkC +YYrgDwIADwIAr6r7QBCsYgCdAPvABhWv/f4A7GoRAyTxAAAHqggrop4PAgD3YArZ0gCdACqinQhr +CiuyvwuqAWWgT+tsGClQBIAA/AAiHaANNQBYYljAINEPABvRJIm49yAMoJIAnQAMShEHqggsop73 +gA0B0gCdACqinQhMCizCvwyqAeShjmTr/QAALbYIZK+vGdE6maCIIP+jGAXgCxUA66YCLEYCgAAF +iAKYoYgzL/J//6JKBaiIHQCo/5+j7gAVBUhBAAD/ojIF4AgFALGI6YMeDA/oAACfphnRfPlBBhXg +GAUAmKeOIAjuEQXuAp6pDE0Rp90l1p2OIiwgBoknC+4C69FzFmAFAADsJAYkyIEAAIiR/SCCFe/M +BQAMnAHuJgIkQ0EAAOiWASbowQAA7ZUEJmEBAAB8iyIqkQUd0P2oqJiRnYCMIOuGAi5mAoAABcwC +/QAmFaACBQDRDx3Q9Z2AjCAb0VvrhgIuZgKAAAXMAv0AJhWgAgUA0Q/aIFhgXdKg0Q8AAAD/+sQN +oAoFAFv/OmP+FwAA8yBoHeAOBQD/AWYVr/e+AOO6DAOBuYAACksU7LwIK8AEgADsTDYJyASAANMP +bckFCACGCQJhiRCqeOtNDATJAQAAbdkFCCCGCQJjixAK/Aysuyu8QPvABhXv9ooAwKBZjMsb0LuJ +uBjQuPk/8viSAJ0A//n8DaAKBQDAoMDaDZ00/WEGFe/5wgCPEC/8QP/ABhXv9aYAAABsEAyIJ/hA +SBXvygUA64EVKmcCgADsPAgEQIEAAAqIAai46IxALngEgAD5gCQSogCdAC3wBysgBxbQoezc/i+o +BIAA+6BgFeH7AQDkkAlvxwKAAMAg0Q8A5o0IBsgZAAAo0p4e0JXrFgEv0ASAAPkAIjPiAJ0AG9CO +KdKdC/sKK7K/C5kB55QABKG5gAAt4ggqFgz3oCJIkgCdAC9iruvRARee4YAALmKtL7LkD+gB6BYJ +Jsv9AAD/wB4+YgCdABjQfpmI/8AeZmIAnQAtIBQpUAetmfohhhWnmQEAKSQU9SAg7dIAnQAZ0MEf +0O/qIgAtbwKAAIg0HtCB5t0IDVYCgADxAAUCUgCdACggByshJPygJBWgFIUAlHP+4EYVoAQ1AASj +AvuhGAWgiBEA43YBLEKCgAD5BgAMcAMFAPjgBhWgCCUA6gAFA9BBAABtigIKAmEuIQkpIAfy4KYV +4DilAOx2CS91AoAA+cYADzHJAQDudgYuZAKAAAy8Ag/MApx0KyEJ2iD+oCQVoAwFAOTWnS3dAoAA ++WYADbANBQBYX7jAINEPAIYnKGEV6BYDIzCBAAD2IMYVr8kFAAlmAaaI71wgJEEBAAB48wSIEwj/ +DOnyACZABQAACKgCmBf4+AAE8IgVAHiZHB/QsYgX6HYBJkv9AAD+4AYV4ZkdAPjgRhXgAFIAiRcY +0KqYcJlxifEJWRSZco8WiTYb0KaWEPngpBWimR0AC5kBG9CemBSmiCuyHe/yASRBAQAAKBYKCbsI +63YDIkgJAADr0JYczwKAAAn/CCkWCAxJCOYSCCTICQAA6PMKfM8CgAAoEgQI/wzmmQwDwEEAAOSQ +TG43AoAAmBWIGg9pCPkADuriAJ0AKRIFD4oM+iBGFaSqHQBtqQUPAIYJAmGIEikSAArPDAeICOmc +QCRQQQAAbfkFCSCGCgJjKiIACKoRGNB59uAARLAPFQD/IMYV4AxFAAyqApqVmJSIUy+yGxbQdP2g +FgWoiB0AqP+fl/wAChWgCgUA7NBwFNiBAACxquuDHg0P6AAA/yFGFaAoBQCYm480iFOKNQb/ARbQ +ZuyqAQxCQoAACP8CBv8Cn5woUAkrUAsvUAomUAjs0GAd2QKAAOb/EAxDAoAA+wYADDCmMQDr/wIN +UcKAAAr/Agj/Aoo2GM//n53+YUgV5bYdAOyqAQ3YQoAAC6oC+yHGFaRmAQDo/wELMgKAAAb/AohV +mJ+GViaWEIxXL5YSLJYRi1QrlhMqUAEvUQHr0A4YBAqAAPFABDfSAJ0AKiAHCipA7CEkLVKCgAAL +qgIqlhSIIPoDAh3gCjUA65YXLEYCgAAKiAIaz9v/IsYVoAsFAPkiphWgCCUA6gAFBNGBAABtigIK +AmEoIQkuIAf7AAAUMBqlAAqIAiiWGvmgRAWh7gEAAO4RDs4CCO4CiBErlhkvlh3ulhgkQA0AACgW +AY4RLtadLVAHiif1oABGsAwFAOvUAAVQgQAAWFdG0qDRDwAAAADpEgUmcuGAANMPbckFD0CGCQJl +Y/5DwPCfGYgZH8+NwJoJ2TTp9ggsYeYAAPpAaB2gG8UA/AAiHaANFQBYYLfAINEPAAAAAAD7jwAP +/+36AP/vJA2gCQUAjRHr/BgpUASAAP2gYBXgDBUAWGCswCDRDwAAAAAAAAD8IWYVoAoFAFmLgh7P +c43oihyMG/m/3RiSAJ0AY/+UAJwb6xIJKVAEgABb6HWKHPwhaBWv71IAAGwQBikgBSYgB9gw9gBi +HeAaRQD7IA/NIWYBAAUJR/0jAAFfxQUAiyIZz1wTz17kZAAFg7GAAMAg0Q+IJ4uILoEV6YILJHiB +AAAF+gHq7ggKbwKAAOoWACdxAQAA+yAORGIAnQAsiRSdEavarcwshRT7wA4jogCdAMk0yULZsG1J +BQMAhgkCYSwSASryAAyqCP9AESQiAJ0AmvDTsPhgaB2v/hoAAAAAAOxqEQMk/QAAA6oILaKeCWsK +K7K/96ALAdIAnQAqop0PAgALqgFloE/rbBgpUASAAPwAIh2gDTUAWGBiwCDRDwAAAAAdzy2L2JgS +92AMkJIAnQAMShGjqiyinveADRHSAJ0AKqKdCUwKLMK/DKoBZKGQsL6e2GSvrx7PRJ6gjSD9nywF +oAsVAOumAi7uAoAAB90CnaGJgyjCf/+eXgXomR0AqYiYo+8AFQVIQQAA/55GBeAIBQCxiOmDHgwP +6AAAn6YZz4b5QQYV4BgFAJinjiAI7hEH7gKeqekiBypvAoAAo90n1p0sIAbtIgIkyIEAAOWfAQZg +BQAALCQGiJEsmQQL3QLtJgIkQ0EAAOiWASZgwQAA7JUEJ/kBAAD/BTIN4AwFACqRBR3PB6iomJGd +gIsg7IYCLd4CgAAHuwL7ACYV4AIFANEPAAAdzv+dgIsgwMDshgIt3gKAAAe7AvsAJhXgAgUA0Q8A +AOokAArYBIAAWF5k0qDRDwD/+qQNoAoFAPMgaB3gDgUA/wFmFa/5ogDr6gwBgbmAAApNFOzcCCnA +BIAA7Ew2DcgEgADTD23JBQgAhgkCYYkQqjjtTgwEyQEAAG3pBQgghgkCY40RjBAK3QytzCzMQP3g +BhWv+F4AAMCgWYrUHc7Ei9iIEhnOwfl/8viSAJ0A//noDaAKBQAAwKDA6g6+NP+hBhWv+aoAAIgQ +KIxA+eAGFa/3ZgAAAABsEAQVzsQWzr7wiAATsAlFAOTPJRnGAoAACYgCKGYxBTUC52YyKhgEgADl +ZjgpMASAAANghgYCZwNAhgYCZQMghgYCYwMAhuYMAAEZAQAAIi0B5B8eARIBAAADAm8EwIYDAm0E +oIYDAmsEgIYDAmnRDwAAAGwQBiMgBxTOmAMDQerOlBnPAoAApJkokp76YAEGMAU1AOzCvywZHAAA +K5KdDLsBy7kfzxAdzxD6QAgVoA4FAJ4QnhL8ICYV4AwFAPwAoh3gHuUAWFqCDD8RpP/186YV4AIF +ANEPAAAAAAAAAOs8GClQBIAA/AAiHaANNQBYX6zHJNEPAGwQBiggcPWc7gXgBkUA6s5yFHXkgAAj +IAcDA0EMOREFmQgrkp4kIgAKOgrqor8toYQAACiSndMPCooBZKBR20BY+IvAwfwAAh3gDhUA+Z3S +BaAJBQD4ICYV4A8FAOkWAi1YBIAA6BYAKlAEgABYWloMPBGlzCbGnSogcCsK+wuqAfpOBh2gAgUA +0Q/AINEPAOs8GClQBIAA/AAiHaANRQBYX4LHJNEPAGwQBCMgBxTOURXOTPuckgWhMwEA5EJ/Kc8C +gAClmSiSngo6Ciqiv+NECAwRVAAAKJKdDwIACooBZKBE20D8AAIdoA0lAP4AQh2gHwUAWYv7/52A +BaAIFQDupgAqfgKAAAj/Ap+hjSCdogw8EfWAAEZwCyUA+5OmFeACBQDRDwAA6zwYKVAEgAD8ACId +oA0lAFhfXMck0Q8AbBAULzAQ95xOBeAKdQDz5PAN4AYFAPXgRXCSAJ0AaPIDwCDRDysgB/ogphWn +lQEA+CNmFeG7AQDrFhwslGgAACwgBfeAYIxSAJ0ALSBy86BgN5IAnQDaIFhcXftAQoiSAJ0AjiL7 +wEI4kgCdACoiECwhGog1iynoFg0uf8KAAHj7DwsJQsiZDAtC+2BaEBIAnQCOHfwjiBWgH4UA7BYZ +J2hdAAD73gAPtN0dAO0WCCboDQAAnRqdGfWAT4ISAJ0ADMsRp7sosp63SfkAYpPiAJ0AHc3xK7Kd +DcwKLMK/DLsB+2Bf6BIAnQCMKY4qDA8+LxYXDO4Mf+t3KiAiKSAjCpkM+yBh2BIAnQAoIAcazmv9 +WgAV4YgBAA2ICS6B/gnvNg/uDC6F/i0gIq/dDQ1HLSQi+6BhKBIAnQAoon/uIgsmy/0AAPsABADQ +CBUA4JkaDEAKgADp7ggEQ/0AAAjuAi4mCigSFwzpDPkgX8OiAJ0AiRoezlMsIAcoIQcdzcz+QSQV +4MwRAPWQABY6iAEA7cwCDEMCgAAI/wItISScsIogiB0czdHu3QINVgKAAAqZApmxKiEinbSfswyq +AhzOQZqyKSIQihWZtRnOP/xHEBXgDyUAn7mWt/lhBhWgDhUAnrr8AwAG8E51AA3qOQ3JOQqZAooY +5rYLIcBBAADptgYlyMEAAG2pBQgAhgkCYR7NtZ68jTDzoELSkgCdACoSGekSCS1XAoAAp6oppp0o +IBQvEhekiOgkFCeAwYAALRIXjCkrIDitzJwp82BWP5IAnQAuEhv5wFUZUgCdAMAg0Q8ALiAHLyAF +LTARDg5BLhYc+eAxZFDdOQCPItzg/8AAFbAZxQDnuwgIBAqAAPvgTICSAJ0ALRYWKLKeKhYFLBYZ ++QBN4+IAnQAazXwpsp0PAgAK6goqor8KmQEpFg7pFhooBAqAAPsgTQgSAJ0A+kBoHaALRQBZiZL7 +QE1gUAsVABzNcIzI94BNqJIAnQAtcq4ezffTD/egSf1SAJ0AKnKtLeLMGc1n0w8NrwHvFhUmQ/0A +AP1ATa5iAJ0AmJj9QEkOYgCdACkwFCkkOCgwFSgkOSYkO484jjaNOYw6iTyKOyolJSwlJC0lIy4l +Ii8lCSkkTIg9KCRNLzIQLjIRLiYVJiRxJiRyJiRwKyRzJiYdKyYZKyYYKyYXJiYbJiRPJiROKyUp +LyUoLTARKhIFLiEaDQ1DLSQ6/0Av8KIAnQAtIDgq+vz7wAQFMA8lAA/cAe/QHXVTsQAA/wAAB7AJ +FQD/LQAP+Y4dAAj/CA7/EQ+qDP+bgAWgCRUA/S0ADjAIRQAI2AEK7ywImDkK7i4OnjkZzYvv7ggL +eASAAAifORjNTd1gDI05D90CKCAUDq8c7yU0JUvxAAAOnhykjO4lNSzMAoAA6dkCDXQCgAAO3QIu +EhYpJhAsJBTtJg8nLSmAABrNZS8gB40pnSyOPp4f/iHIFaCfEQDoIQgsyoKAAAqZApng+Zs4BeH/ +AQDqIgAv/AKAAA+IAvkGAAxwDzUA6akCDVYCgAAPqgKa4f+aLAXgKgUAmuPv5gIuUgKAAAuqAo8r +luUo5gQp5gYq5gcv5gnt5ggneMEAAP4jRhXgHUUA/CCGFeAKBQD6IgYVoBmFACkWGCYkFCsSGvph +6BWgDBUA+iImFaANBQD6QAgVoAkFAPggBhXgDgUA+CBGFeAIFQD4ICYVoA8VAFhY4ywgOPrAaB3g +HwUA8iPmFeANJQD9gAQB8OwRAO7bOQtIBIAA8+0ADPDsGQD7xgAPcMwBAPLAaB3gKwUADLM5KyA5 +6GQAC3gEgAD4ZgAJ8EkFAP1gBAbwuwEA+yIAD/CMBQDtyDgNWASAAPpACBWgDQUAnREczVacEAj/ +AgP/AvIj6BXgDQUA/8YAD3AMFQD/wAAXMA9FAP/GAA9wDwUA/iBGFaAOBQBYWLnAwe/NSR1YBIAA ++kAIFaQJBQD4IAYV4A0FAPggRhXgCAUA+CAmFaAOFQBYWK4oEhHpEg8tWASAAPpACBWv/vUAnhD8 +RKQV7//1APxEhBWomQEA+zgAFLiIAQDpiAIO7AKAAP2GAA5wHqUA+CBGFaANBQD8ICYVoAwVAFhY +mgqrAvpACBWv/fUA/CAGFeAMBQAsFgEpISIoIQkuChz5IAAUv//1APkGAAxwDBUA+CBGFaANBQBY +WIsqFhIqIShZivntzRYdYASAAPpACBWv/vUAnhAuEhAt0CwbzRXu3QIGY/0AAOLpEA7oQoAA7ZkC +DmZCgAAMmQILmQKZESgiFRnNDP//4h3gHuUA+iJIFeaIHQD5BgAMcA0FAPggRhWgDBUAWFhw+0Bo +HeAMFQD6QAgVoAgFAPggBhWgDQUA+CAmFaAOBQD4IEYVoA8VAFhYZYkw8yAVepIAnQAuEhkbzGgs +IQftEhgvdwKAAKfuLeadKCANK7I4HczojyCOICkgDCrS+g67CO4gFS3eQoAAC6oIKhYTKyAHK6QH +KaQMLKUHKKQNLDIJLKUJLqQVLjIR+GIIFa/MAQAsFhQopSgspSP9oIgV4AkVAPlFJB3gG0UAK6QF +/0PGFebuHQD6IqgV4P/1AP+gAEawDgUA/ULGFeANFQBY9m4rEhMvEhYoEhQpsBX3YoYdoCsFAOuk +AyxGAoAA5qQALMkCgAD5BgAMcAkVAAmIAuimASeUIYAALCA6wN/9gBP8YgCdAC8wV8TgD+4MnhvA +0f4f4h3gDgUA7CEJJVhBAADsFgwpUASAAFj2U4kcixsmJBQoIBUmpAArpAPomREMQQKAAPkGAAxw +CRUACYgC+UAmFaALxQCKJxzMP4quiRQMAIcKAmEKAmEKAmEKAmEKAmEKAmEKAmEKAmEtEhYrdq34 +QKYd4A4VAO4kFyaBWYAALyA6wI948R4ZzB4oMFAJiAooghDsMFch2UEAAPpAaB2gDSUAC4AABQpH *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu Jun 26 03:29:55 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from hub.FreeBSD.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E5C7B181; Thu, 26 Jun 2014 03:29:49 +0000 (UTC) Date: Wed, 25 Jun 2014 23:29:27 -0400 From: Glen Barber To: Devin Teske Subject: Re: svn commit: r267683 - in stable/9/usr.sbin/bsdconfig: include share share/media share/packages Message-ID: <20140626032927.GX1218@hub.FreeBSD.org> References: <201406201757.s5KHvUQa040279@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="cBjtDd/yotmg6GXq" Content-Disposition: inline In-Reply-To: <201406201757.s5KHvUQa040279@svn.freebsd.org> X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2014 03:29:55 -0000 --cBjtDd/yotmg6GXq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 20, 2014 at 05:57:30PM +0000, Devin Teske wrote: > Author: dteske > Date: Fri Jun 20 17:57:29 2014 > New Revision: 267683 > URL: http://svnweb.freebsd.org/changeset/base/267683 >=20 > Log: > MFC revisions 257795,257817,257819,257937-257938,258264-258265,258267, > 258854,259113,259427 (11 revisions; summarized below). > r257795: Replace pkg-tools with pkgng > r257817: Fix cosmetic typos > r257819: Use `pkg -vv' to obtain ABI > r257937: Unbreak the installer > r257938: Remove the env(1) but keep the var > r258264: Kick an unused orphan to the curb ;) > r258265: Improve debugging with f_eval_catch() > r258267: Fix package installation from physical media such as DVD > r258854: Fix PKG_ABI detection after pkg-1.2 > r259113: Fix failed attempt to send pkg(8) stderr to /dev/null > r259427: Export 'REPOS_DIR' when selected source medium is cdrom > =20 > MFC after: 3 days FYI, I've committed this to releng/9.3 as r267892 after testing against a patched -RC1 dvd1.iso build. Thank you very much for the updates for the 9.3-RELEASE. Glen --cBjtDd/yotmg6GXq Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJTq5OXAAoJELls3eqvi17QoycP/15xjFgiJ277n2oN2ZuTD3/U vO/vyJ4727DHyeMB1VmIfduT1czCapiyfh5l5yU/xF/VsEG3gp7fS0luxButrL8h Dk9fxSIxzNhGeMIXntyIv5IZ1M3idluLok53efZ5UxCAJXVNjz8lZD9BisF8TIuE tjBP/nQ719s+T6sA6FFkifgmUD4RscNQoJQm7dFoVCsHTQfbVZpVyIy/YbxtO6Ll qIOcobs183G1hKybjzweKDAlUV7+qmCjA5h+GaLFBSvg1C6yFHvI9Wx3KM7BT2C8 0n/uXU7QoYY/++zSWx3nnAFn2VNAdm4uNLNhfbQEFNnpp9BjN0+xv4FLA3nb6Hc5 bkRcwLWALlbbQDhN/08Qsr0JuL3hcZe+vaHyH9E4JWAqvDizX5KHXv1hR11K9xDS K2JqtsnZz15O1+6i34HCcjGT9dvurt1cTkkWuCr7gOzCxmfUnlde9QGx6xpDxufS TRAKFNOo2kcZKkZl53C1IA1wOUQhhwax0iJBNeQj8fBZ13TubSrmCrFYmIfuq8aN mM2X8jsoD8XS2uBqrG/OAMakZu//cRNJYJi9X3Goe6ztpKlbkq8eb+Ys5oGE2qfM ZrosmqJ1Qc1S1QSYxGr0mkOh0Opon/2HI3l+bZ765+FXnflx9YGue8DfnhWBc/6u wqZmeM3+izHfoV3UOBd0 =AnDy -----END PGP SIGNATURE----- --cBjtDd/yotmg6GXq-- From owner-svn-src-stable@FreeBSD.ORG Thu Jun 26 08:24:19 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 042A5C28; Thu, 26 Jun 2014 08:24:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E51F12CB8; Thu, 26 Jun 2014 08:24:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5Q8OIar050464; Thu, 26 Jun 2014 08:24:18 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5Q8OIbc050463; Thu, 26 Jun 2014 08:24:18 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201406260824.s5Q8OIbc050463@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 26 Jun 2014 08:24:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267899 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2014 08:24:19 -0000 Author: kib Date: Thu Jun 26 08:24:18 2014 New Revision: 267899 URL: http://svnweb.freebsd.org/changeset/base/267899 Log: MFC r267766: Use correct names for the flags. Modified: stable/10/sys/vm/vm_map.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_map.c ============================================================================== --- stable/10/sys/vm/vm_map.c Thu Jun 26 07:06:43 2014 (r267898) +++ stable/10/sys/vm/vm_map.c Thu Jun 26 08:24:18 2014 (r267899) @@ -1210,7 +1210,7 @@ charged: } else if ((prev_entry != &map->header) && (prev_entry->eflags == protoeflags) && - (cow & (MAP_ENTRY_GROWS_DOWN | MAP_ENTRY_GROWS_UP)) == 0 && + (cow & (MAP_STACK_GROWS_DOWN | MAP_STACK_GROWS_UP)) == 0 && (prev_entry->end == start) && (prev_entry->wired_count == 0) && (prev_entry->cred == cred || From owner-svn-src-stable@FreeBSD.ORG Thu Jun 26 08:27:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 02C4BDD5; Thu, 26 Jun 2014 08:27:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E3B552CDE; Thu, 26 Jun 2014 08:27:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5Q8R1pd050933; Thu, 26 Jun 2014 08:27:01 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5Q8R16h050932; Thu, 26 Jun 2014 08:27:01 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201406260827.s5Q8R16h050932@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 26 Jun 2014 08:27:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267900 - stable/10/lib/libc/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2014 08:27:02 -0000 Author: kib Date: Thu Jun 26 08:27:01 2014 New Revision: 267900 URL: http://svnweb.freebsd.org/changeset/base/267900 Log: MFC r267629: Tidy up code of the wrapper. Modified: stable/10/lib/libc/sys/mmap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/mmap.c ============================================================================== --- stable/10/lib/libc/sys/mmap.c Thu Jun 26 08:24:18 2014 (r267899) +++ stable/10/lib/libc/sys/mmap.c Thu Jun 26 08:27:01 2014 (r267900) @@ -44,18 +44,13 @@ __FBSDID("$FreeBSD$"); * is not supplied by GCC 1.X but is supplied by GCC 2.X. */ void * -mmap(addr, len, prot, flags, fd, offset) - void * addr; - size_t len; - int prot; - int flags; - int fd; - off_t offset; +mmap(void *addr, size_t len, int prot, int flags, int fd, off_t offset) { - if (__getosreldate() >= 700051) + if (__getosreldate() >= 700051) { return (__sys_mmap(addr, len, prot, flags, fd, offset)); - else - - return (__sys_freebsd6_mmap(addr, len, prot, flags, fd, 0, offset)); + } else { + return (__sys_freebsd6_mmap(addr, len, prot, flags, fd, 0, + offset)); + } } From owner-svn-src-stable@FreeBSD.ORG Thu Jun 26 08:30:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EA47FFB3; Thu, 26 Jun 2014 08:30:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC7E52CF5; Thu, 26 Jun 2014 08:30:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5Q8U9tc051885; Thu, 26 Jun 2014 08:30:09 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5Q8U8mD051880; Thu, 26 Jun 2014 08:30:08 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201406260830.s5Q8U8mD051880@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 26 Jun 2014 08:30:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267901 - in stable/10: lib/libc/sys sys/sys sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2014 08:30:10 -0000 Author: kib Date: Thu Jun 26 08:30:08 2014 New Revision: 267901 URL: http://svnweb.freebsd.org/changeset/base/267901 Log: MFC r267630: Add MAP_EXCL flag for mmap(2). Modified: stable/10/lib/libc/sys/mmap.2 stable/10/sys/sys/mman.h stable/10/sys/vm/vm_map.c stable/10/sys/vm/vm_map.h stable/10/sys/vm/vm_mmap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/mmap.2 ============================================================================== --- stable/10/lib/libc/sys/mmap.2 Thu Jun 26 08:27:01 2014 (r267900) +++ stable/10/lib/libc/sys/mmap.2 Thu Jun 26 08:30:08 2014 (r267901) @@ -28,7 +28,7 @@ .\" @(#)mmap.2 8.4 (Berkeley) 5/11/95 .\" $FreeBSD$ .\" -.Dd September 9, 2013 +.Dd June 19, 2014 .Dt MMAP 2 .Os .Sh NAME @@ -141,6 +141,12 @@ argument must be 0. This flag is identical to .Dv MAP_ANON and is provided for compatibility. +.It Dv MAP_EXCL +This flag can only be used in combination with +.Dv MAP_FIXED . +Please see the definition of +.Dv MAP_FIXED +for the description of its effect. .It Dv MAP_FIXED Do not permit the system to select a different address than the one specified. @@ -152,17 +158,21 @@ If is specified, .Fa addr must be a multiple of the pagesize. -If a +If +.Dv MAP_EXCL +is not specified, a successfull .Dv MAP_FIXED -request is successful, the mapping established by -.Fn mmap -replaces any previous mappings for the process' pages in the range from +request replaces any previous mappings for the process' +pages in the range from .Fa addr to .Fa addr + .Fa len . -Use of this option is discouraged. +In contrast, if +.Dv MAP_EXCL +is specified, the request will fail if a mapping +already exists within the range. .It Dv MAP_HASSEMAPHORE Notify the kernel that the region may contain semaphores and that special handling may be necessary. @@ -393,6 +403,17 @@ argument was not -1. was specified and the .Fa offset argument was not 0. +.It Bq Er EINVAL +Both +.Dv MAP_FIXED +and +.Dv MAP_EXCL +were specified, but the requested region is already used by a mapping. +.It Bq Er EINVAL +.Dv MAP_EXCL +was specified, but +.Dv MAP_FIXED +was not. .It Bq Er ENODEV .Dv MAP_ANON has not been specified and Modified: stable/10/sys/sys/mman.h ============================================================================== --- stable/10/sys/sys/mman.h Thu Jun 26 08:27:01 2014 (r267900) +++ stable/10/sys/sys/mman.h Thu Jun 26 08:30:08 2014 (r267901) @@ -89,6 +89,7 @@ /* * Extended flags */ +#define MAP_EXCL 0x00004000 /* for MAP_FIXED, fail if address is used */ #define MAP_NOCORE 0x00020000 /* dont include these pages in a coredump */ #define MAP_PREFAULT_READ 0x00040000 /* prefault mapping for reading */ #ifdef __LP64__ Modified: stable/10/sys/vm/vm_map.c ============================================================================== --- stable/10/sys/vm/vm_map.c Thu Jun 26 08:27:01 2014 (r267900) +++ stable/10/sys/vm/vm_map.c Thu Jun 26 08:30:08 2014 (r267901) @@ -1407,7 +1407,8 @@ vm_map_fixed(vm_map_t map, vm_object_t o ("vm_map_fixed: non-NULL backing object for stack")); vm_map_lock(map); VM_MAP_RANGE_CHECK(map, start, end); - (void) vm_map_delete(map, start, end); + if ((cow & MAP_CHECK_EXCL) == 0) + vm_map_delete(map, start, end); if ((cow & (MAP_STACK_GROWS_DOWN | MAP_STACK_GROWS_UP)) != 0) { result = vm_map_stack_locked(map, start, length, sgrowsiz, prot, max, cow); Modified: stable/10/sys/vm/vm_map.h ============================================================================== --- stable/10/sys/vm/vm_map.h Thu Jun 26 08:27:01 2014 (r267900) +++ stable/10/sys/vm/vm_map.h Thu Jun 26 08:30:08 2014 (r267901) @@ -315,6 +315,7 @@ long vmspace_resident_count(struct vmspa #define MAP_PREFAULT 0x0008 #define MAP_PREFAULT_PARTIAL 0x0010 #define MAP_DISABLE_SYNCER 0x0020 +#define MAP_CHECK_EXCL 0x0040 #define MAP_DISABLE_COREDUMP 0x0100 #define MAP_PREFAULT_MADVISE 0x0200 /* from (user) madvise request */ #define MAP_VN_WRITECOUNT 0x0400 Modified: stable/10/sys/vm/vm_mmap.c ============================================================================== --- stable/10/sys/vm/vm_mmap.c Thu Jun 26 08:27:01 2014 (r267900) +++ stable/10/sys/vm/vm_mmap.c Thu Jun 26 08:30:08 2014 (r267901) @@ -245,6 +245,8 @@ sys_mmap(td, uap) flags |= MAP_ANON; pos = 0; } + if ((flags & (MAP_EXCL | MAP_FIXED)) == MAP_EXCL) + return (EINVAL); /* * Align the file position to a page boundary, @@ -1626,6 +1628,8 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, return (EINVAL); docow |= MAP_STACK_GROWS_DOWN; } + if ((flags & MAP_EXCL) != 0) + docow |= MAP_CHECK_EXCL; if (fitit) { if ((flags & MAP_ALIGNMENT_MASK) == MAP_ALIGNED_SUPER) From owner-svn-src-stable@FreeBSD.ORG Thu Jun 26 08:41:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D160C38D; Thu, 26 Jun 2014 08:41:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BDF902E30; Thu, 26 Jun 2014 08:41:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5Q8fswu059611; Thu, 26 Jun 2014 08:41:54 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5Q8fs9H059609; Thu, 26 Jun 2014 08:41:54 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201406260841.s5Q8fs9H059609@svn.freebsd.org> From: Sergey Kandaurov Date: Thu, 26 Jun 2014 08:41:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267902 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2014 08:41:54 -0000 Author: pluknet Date: Thu Jun 26 08:41:54 2014 New Revision: 267902 URL: http://svnweb.freebsd.org/changeset/base/267902 Log: MFC r261901: Preserve one character space for a trailing '\0'. Modified: stable/10/sys/kern/subr_hints.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/subr_hints.c ============================================================================== --- stable/10/sys/kern/subr_hints.c Thu Jun 26 08:30:08 2014 (r267901) +++ stable/10/sys/kern/subr_hints.c Thu Jun 26 08:41:54 2014 (r267902) @@ -210,7 +210,7 @@ res_find(int *line, int *startln, if (strncmp(cp, "hint.", 5) != 0) hit = 0; else - n = sscanf(cp, "hint.%32[^.].%d.%32[^=]=%128s", + n = sscanf(cp, "hint.%32[^.].%d.%32[^=]=%127s", r_name, &r_unit, r_resname, r_value); if (hit && n != 4) { printf("CONFIG: invalid hint '%s'\n", cp); From owner-svn-src-stable@FreeBSD.ORG Thu Jun 26 08:44:29 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 32F4D4EB; Thu, 26 Jun 2014 08:44:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FBA22E48; Thu, 26 Jun 2014 08:44:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5Q8iSYN060045; Thu, 26 Jun 2014 08:44:28 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5Q8iS2b060044; Thu, 26 Jun 2014 08:44:28 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201406260844.s5Q8iS2b060044@svn.freebsd.org> From: Sergey Kandaurov Date: Thu, 26 Jun 2014 08:44:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267903 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2014 08:44:29 -0000 Author: pluknet Date: Thu Jun 26 08:44:28 2014 New Revision: 267903 URL: http://svnweb.freebsd.org/changeset/base/267903 Log: MFC r261901: Preserve one character space for a trailing '\0'. Modified: stable/9/sys/kern/subr_hints.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/subr_hints.c ============================================================================== --- stable/9/sys/kern/subr_hints.c Thu Jun 26 08:41:54 2014 (r267902) +++ stable/9/sys/kern/subr_hints.c Thu Jun 26 08:44:28 2014 (r267903) @@ -129,7 +129,7 @@ res_find(int *line, int *startln, if (strncmp(cp, "hint.", 5) != 0) hit = 0; else - n = sscanf(cp, "hint.%32[^.].%d.%32[^=]=%128s", + n = sscanf(cp, "hint.%32[^.].%d.%32[^=]=%127s", r_name, &r_unit, r_resname, r_value); if (hit && n != 4) { printf("CONFIG: invalid hint '%s'\n", cp); From owner-svn-src-stable@FreeBSD.ORG Thu Jun 26 08:55:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4CD7EA8F; Thu, 26 Jun 2014 08:55:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FCB82F31; Thu, 26 Jun 2014 08:55:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5Q8t6jL065227; Thu, 26 Jun 2014 08:55:06 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5Q8t6nd065223; Thu, 26 Jun 2014 08:55:06 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201406260855.s5Q8t6nd065223@svn.freebsd.org> From: Sergey Kandaurov Date: Thu, 26 Jun 2014 08:55:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267904 - stable/10/bin/ps X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2014 08:55:07 -0000 Author: pluknet Date: Thu Jun 26 08:55:06 2014 New Revision: 267904 URL: http://svnweb.freebsd.org/changeset/base/267904 Log: MFC r267196: Add support for inspecting process flags set in p_flag2. Modified: stable/10/bin/ps/keyword.c stable/10/bin/ps/ps.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/ps/keyword.c ============================================================================== --- stable/10/bin/ps/keyword.c Thu Jun 26 08:44:28 2014 (r267903) +++ stable/10/bin/ps/keyword.c Thu Jun 26 08:55:06 2014 (r267904) @@ -87,8 +87,10 @@ static VAR var[] = { {"etimes", "ELAPSED", NULL, USER, elapseds, 0, CHAR, NULL, 0}, {"euid", "", "uid", 0, NULL, 0, CHAR, NULL, 0}, {"f", "F", NULL, 0, kvar, KOFF(ki_flag), INT, "x", 0}, + {"f2", "F2", NULL, 0, kvar, KOFF(ki_flag2), INT, "08x", 0}, {"fib", "FIB", NULL, 0, kvar, KOFF(ki_fibnum), INT, "d", 0}, {"flags", "", "f", 0, NULL, 0, CHAR, NULL, 0}, + {"flags2", "", "f2", 0, NULL, 0, CHAR, NULL, 0}, {"gid", "GID", NULL, 0, kvar, KOFF(ki_groups), UINT, UIDFMT, 0}, {"group", "GROUP", NULL, LJUST, egroupname, 0, CHAR, NULL, 0}, {"ignored", "", "sigignore", 0, NULL, 0, CHAR, NULL, 0}, Modified: stable/10/bin/ps/ps.1 ============================================================================== --- stable/10/bin/ps/ps.1 Thu Jun 26 08:44:28 2014 (r267903) +++ stable/10/bin/ps/ps.1 Thu Jun 26 08:55:06 2014 (r267904) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd May 2, 2014 +.Dd June 6, 2014 .Dt PS 1 .Os .Sh NAME @@ -340,6 +340,15 @@ the include file .It Dv "P_SWAPPINGIN" Ta No "0x40000000" Ta "Process is being swapped in" .It Dv "P_PPTRACE" Ta No "0x80000000" Ta "Vforked child issued ptrace(PT_TRACEME)" .El +.It Cm flags2 +The flags kept in +.Va p_flag2 +associated with the process as in +the include file +.In sys/proc.h : +.Bl -column P2_INHERIT_PROTECTED 0x00000001 +.It Dv "P2_INHERIT_PROTECTED" Ta No "0x00000001" Ta "New children get P_PROTECTED" +.El .It Cm label The MAC label of the process. .It Cm lim @@ -533,6 +542,9 @@ default FIB number, see .It Cm flags the process flags, in hexadecimal (alias .Cm f ) +.It Cm flags2 +the additional set of process flags, in hexadecimal (alias +.Cm f2 ) .It Cm gid effective group ID (alias .Cm egid ) From owner-svn-src-stable@FreeBSD.ORG Thu Jun 26 10:09:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5D6C1DE; Thu, 26 Jun 2014 10:09:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8839E260D; Thu, 26 Jun 2014 10:09:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5QA9cOF098637; Thu, 26 Jun 2014 10:09:38 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5QA9btk098634; Thu, 26 Jun 2014 10:09:37 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201406261009.s5QA9btk098634@svn.freebsd.org> From: Sergey Kandaurov Date: Thu, 26 Jun 2014 10:09:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267907 - in stable/9: bin/ps sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2014 10:09:38 -0000 Author: pluknet Date: Thu Jun 26 10:09:37 2014 New Revision: 267907 URL: http://svnweb.freebsd.org/changeset/base/267907 Log: MFC r254943 (by will, partially): Add the ability to display the default FIB number for a process to the ps(1) utility, e.g. "ps -O fib". The rest was previously (mis-)merged with r260208. Modified: stable/9/bin/ps/keyword.c stable/9/bin/ps/ps.1 stable/9/sys/kern/kern_proc.c Directory Properties: stable/9/bin/ps/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/bin/ps/keyword.c ============================================================================== --- stable/9/bin/ps/keyword.c Thu Jun 26 09:42:00 2014 (r267906) +++ stable/9/bin/ps/keyword.c Thu Jun 26 10:09:37 2014 (r267907) @@ -87,6 +87,7 @@ static VAR var[] = { {"etimes", "ELAPSED", NULL, USER, elapseds, 0, CHAR, NULL, 0}, {"euid", "", "uid", 0, NULL, 0, CHAR, NULL, 0}, {"f", "F", NULL, 0, kvar, KOFF(ki_flag), INT, "x", 0}, + {"fib", "FIB", NULL, 0, kvar, KOFF(ki_fibnum), INT, "d", 0}, {"flags", "", "f", 0, NULL, 0, CHAR, NULL, 0}, {"gid", "GID", NULL, 0, kvar, KOFF(ki_groups), UINT, UIDFMT, 0}, {"group", "GROUP", NULL, LJUST, egroupname, 0, CHAR, NULL, 0}, Modified: stable/9/bin/ps/ps.1 ============================================================================== --- stable/9/bin/ps/ps.1 Thu Jun 26 09:42:00 2014 (r267906) +++ stable/9/bin/ps/ps.1 Thu Jun 26 10:09:37 2014 (r267907) @@ -523,6 +523,9 @@ elapsed running time, format minutes:seconds. .It Cm etimes elapsed running time, in decimal integer seconds +.It Cm fib +default FIB number, see +.Xr setfib 1 .It Cm flags the process flags, in hexadecimal (alias .Cm f ) Modified: stable/9/sys/kern/kern_proc.c ============================================================================== --- stable/9/sys/kern/kern_proc.c Thu Jun 26 09:42:00 2014 (r267906) +++ stable/9/sys/kern/kern_proc.c Thu Jun 26 10:09:37 2014 (r267907) @@ -864,6 +864,7 @@ fill_kinfo_proc_only(struct proc *p, str kp->ki_swtime = (ticks - p->p_swtick) / hz; kp->ki_pid = p->p_pid; kp->ki_nice = p->p_nice; + kp->ki_fibnum = p->p_fibnum; kp->ki_start = p->p_stats->p_start; timevaladd(&kp->ki_start, &boottime); PROC_SLOCK(p); From owner-svn-src-stable@FreeBSD.ORG Thu Jun 26 10:13:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF7213D2; Thu, 26 Jun 2014 10:13:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 921BF26D3; Thu, 26 Jun 2014 10:13:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5QADCa6002558; Thu, 26 Jun 2014 10:13:12 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5QADCHq002556; Thu, 26 Jun 2014 10:13:12 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201406261013.s5QADCHq002556@svn.freebsd.org> From: Sergey Kandaurov Date: Thu, 26 Jun 2014 10:13:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267908 - stable/9/bin/ps X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2014 10:13:12 -0000 Author: pluknet Date: Thu Jun 26 10:13:11 2014 New Revision: 267908 URL: http://svnweb.freebsd.org/changeset/base/267908 Log: MFC r267196: Add support for inspecting process flags set in p_flag2. Modified: stable/9/bin/ps/keyword.c stable/9/bin/ps/ps.1 Directory Properties: stable/9/bin/ps/ (props changed) Modified: stable/9/bin/ps/keyword.c ============================================================================== --- stable/9/bin/ps/keyword.c Thu Jun 26 10:09:37 2014 (r267907) +++ stable/9/bin/ps/keyword.c Thu Jun 26 10:13:11 2014 (r267908) @@ -87,8 +87,10 @@ static VAR var[] = { {"etimes", "ELAPSED", NULL, USER, elapseds, 0, CHAR, NULL, 0}, {"euid", "", "uid", 0, NULL, 0, CHAR, NULL, 0}, {"f", "F", NULL, 0, kvar, KOFF(ki_flag), INT, "x", 0}, + {"f2", "F2", NULL, 0, kvar, KOFF(ki_flag2), INT, "08x", 0}, {"fib", "FIB", NULL, 0, kvar, KOFF(ki_fibnum), INT, "d", 0}, {"flags", "", "f", 0, NULL, 0, CHAR, NULL, 0}, + {"flags2", "", "f2", 0, NULL, 0, CHAR, NULL, 0}, {"gid", "GID", NULL, 0, kvar, KOFF(ki_groups), UINT, UIDFMT, 0}, {"group", "GROUP", NULL, LJUST, egroupname, 0, CHAR, NULL, 0}, {"ignored", "", "sigignore", 0, NULL, 0, CHAR, NULL, 0}, Modified: stable/9/bin/ps/ps.1 ============================================================================== --- stable/9/bin/ps/ps.1 Thu Jun 26 10:09:37 2014 (r267907) +++ stable/9/bin/ps/ps.1 Thu Jun 26 10:13:11 2014 (r267908) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd May 2, 2014 +.Dd June 6, 2014 .Dt PS 1 .Os .Sh NAME @@ -340,6 +340,15 @@ the include file .It Dv "P_SWAPPINGIN" Ta No "0x40000000 Process is being swapped in" .It Dv "P_PPTRACE" Ta No "0x80000000" Ta "Vforked child issued ptrace(PT_TRACEME)" .El +.It Cm flags2 +The flags kept in +.Va p_flag2 +associated with the process as in +the include file +.In sys/proc.h : +.Bl -column P2_INHERIT_PROTECTED 0x00000001 +.It Dv "P2_INHERIT_PROTECTED" Ta No "0x00000001" Ta "New children get P_PROTECTED" +.El .It Cm label The MAC label of the process. .It Cm lim @@ -529,6 +538,9 @@ default FIB number, see .It Cm flags the process flags, in hexadecimal (alias .Cm f ) +.It Cm flags2 +the additional set of process flags, in hexadecimal (alias +.Cm f2 ) .It Cm gid effective group ID (alias .Cm egid ) From owner-svn-src-stable@FreeBSD.ORG Thu Jun 26 12:18:00 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD390F9D; Thu, 26 Jun 2014 12:18:00 +0000 (UTC) Received: from mail.mahoroba.org (ent.mahoroba.org [IPv6:2001:2f0:104:8010::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "asuka.mahoroba.org", Issuer "ca.mahoroba.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B971E2290; Thu, 26 Jun 2014 12:17:59 +0000 (UTC) Received: from yuga.mahoroba.org (ume@yuga.mahoroba.org [IPv6:2001:2f0:104:8010:7258:12ff:fe22:d94b]) (user=ume mech=DIGEST-MD5 bits=0) by mail.mahoroba.org (8.14.9/8.14.9) with ESMTP/inet6 id s5QCHp1v018106 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 26 Jun 2014 21:17:52 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Thu, 26 Jun 2014 21:17:59 +0900 Message-ID: From: Hajimu UMEMOTO To: "Alexander V. Chernikov" Subject: Re: svn commit: r267874 - stable/10/lib/libc/net In-Reply-To: <53AB0E0C.3050802@FreeBSD.org> References: <201406251710.s5PHAQ31026354@svn.freebsd.org> <53AB0E0C.3050802@FreeBSD.org> User-Agent: xcite1.60> Wanderlust/2.15.9 (Almost Unreal) Emacs/24.3 Mule/6.0 (HANACHIRUSATO) X-Operating-System: FreeBSD 9.3-PRERELEASE X-PGP-Key: http://www.mahoroba.org/~ume/publickey.asc X-PGP-Fingerprint: 1F00 0B9E 2164 70FC 6DC5 BF5F 04E9 F086 BF90 71FE MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.mahoroba.org [IPv6:2001:2f0:104:8010::1]); Thu, 26 Jun 2014 21:17:52 +0900 (JST) X-Virus-Scanned: clamav-milter 0.98.4 at asuka.mahoroba.org X-Virus-Status: Clean X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,T_RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on asuka.mahoroba.org Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2014 12:18:00 -0000 Hi, >>>>> On Wed, 25 Jun 2014 21:59:40 +0400 >>>>> "Alexander V. Chernikov" said: melifaro> Well, two socket() calls has some predictable cost, but getaddrinfo() melifaro> can be quite slow for system with many interfaces. It would be better to melifaro> introduce some kernel sysctls to report IPv4/IPv6 status... Yes, it should be better having some sysctls as you say. melifaro> It looks like style(9) needs to be altered, too.. melifaro> This is not correct. RFC 3493 talks about "loopback address" (and melifaro> specifies explicit IN6_IS_ADDR_LOOPBACK macro to test in IPv6 case) and melifaro> not about loopback interface. Yes, but the spec is still unclear about handling of link-local address especially on loopback interface. We have to exclude fe80::1%lo0 to make addrconfig() functional. I've committed the change: r267912. Sincerely, -- Hajimu UMEMOTO ume@mahoroba.org ume@{,jp.}FreeBSD.org http://www.mahoroba.org/~ume/ From owner-svn-src-stable@FreeBSD.ORG Thu Jun 26 19:19:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB8F7D9E; Thu, 26 Jun 2014 19:19:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D846C2E30; Thu, 26 Jun 2014 19:19:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5QJJ63b065612; Thu, 26 Jun 2014 19:19:06 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5QJJ68W065611; Thu, 26 Jun 2014 19:19:06 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406261919.s5QJJ68W065611@svn.freebsd.org> From: John Baldwin Date: Thu, 26 Jun 2014 19:19:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267928 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2014 19:19:07 -0000 Author: jhb Date: Thu Jun 26 19:19:06 2014 New Revision: 267928 URL: http://svnweb.freebsd.org/changeset/base/267928 Log: MFC 264277: Handle single-byte reads from the bvmcons port (0x220) by returning 0xff. Some guests may attempt to read from this port to identify psuedo-PNP ISA devices. (The ie(4) driver in FreeBSD/i386 is one example.) Modified: stable/10/usr.sbin/bhyve/consport.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/consport.c ============================================================================== --- stable/10/usr.sbin/bhyve/consport.c Thu Jun 26 17:59:23 2014 (r267927) +++ stable/10/usr.sbin/bhyve/consport.c Thu Jun 26 19:19:06 2014 (r267928) @@ -110,6 +110,15 @@ console_handler(struct vmctx *ctx, int v return (0); } + /* + * Guests might probe this port to look for old ISA devices + * using single-byte reads. Return 0xff for those. + */ + if (bytes == 1 && in) { + *eax = 0xff; + return (0); + } + if (bytes != 4) return (-1); From owner-svn-src-stable@FreeBSD.ORG Fri Jun 27 00:37:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60114B61; Fri, 27 Jun 2014 00:37:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 407BB2A0E; Fri, 27 Jun 2014 00:37:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5R0b5KX013657; Fri, 27 Jun 2014 00:37:05 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5R0b4QM013645; Fri, 27 Jun 2014 00:37:04 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201406270037.s5R0b4QM013645@svn.freebsd.org> From: Xin LI Date: Fri, 27 Jun 2014 00:37:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267944 - stable/9/sys/dev/oce X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jun 2014 00:37:05 -0000 Author: delphij Date: Fri Jun 27 00:37:03 2014 New Revision: 267944 URL: http://svnweb.freebsd.org/changeset/base/267944 Log: MFC r258941,267839: Apply vendor improvements to oce(4) driver: - Add support to 20Gbps, 25Gbps, 40Gbps devices; - Add support to control adaptive interrupt coalescing (AIC) via sysctl; - Improve support of BE3 devices; - Big endian support fixes; Many thanks to Emulex for their continued support of FreeBSD. Submitted by: Venkata Duvvuru Modified: stable/9/sys/dev/oce/oce_hw.c stable/9/sys/dev/oce/oce_hw.h stable/9/sys/dev/oce/oce_if.c stable/9/sys/dev/oce/oce_if.h stable/9/sys/dev/oce/oce_mbox.c stable/9/sys/dev/oce/oce_sysctl.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/oce/oce_hw.c ============================================================================== --- stable/9/sys/dev/oce/oce_hw.c Fri Jun 27 00:11:01 2014 (r267943) +++ stable/9/sys/dev/oce/oce_hw.c Fri Jun 27 00:37:03 2014 (r267944) @@ -487,11 +487,7 @@ oce_hw_start(POCE_SOFTC sc) if_link_state_change(sc->ifp, LINK_STATE_DOWN); } - if (link.mac_speed > 0 && link.mac_speed < 5) - sc->link_speed = link.mac_speed; - else - sc->link_speed = 0; - + sc->link_speed = link.phys_port_speed; sc->qos_link_speed = (uint32_t )link.qos_link_speed * 10; rc = oce_start_mq(sc->mq); Modified: stable/9/sys/dev/oce/oce_hw.h ============================================================================== --- stable/9/sys/dev/oce/oce_hw.h Fri Jun 27 00:11:01 2014 (r267943) +++ stable/9/sys/dev/oce/oce_hw.h Fri Jun 27 00:37:03 2014 (r267944) @@ -1023,7 +1023,7 @@ struct mbx_hdr { #define OCE_MBX_ADDL_STATUS(_MHDR) ((_MHDR)->u0.rsp.additional_status) #define OCE_MBX_STATUS(_MHDR) ((_MHDR)->u0.rsp.status) -/* [05] OPCODE_COMMON_QUERY_LINK_CONFIG */ +/* [05] OPCODE_COMMON_QUERY_LINK_CONFIG_V1 */ struct mbx_query_common_link_config { struct mbx_hdr hdr; union { @@ -1032,16 +1032,37 @@ struct mbx_query_common_link_config { } req; struct { - /* dw 0 */ - uint8_t physical_port; - uint8_t mac_duplex; - uint8_t mac_speed; - uint8_t mac_fault; - /* dw 1 */ - uint8_t mgmt_mac_duplex; - uint8_t mgmt_mac_speed; + #ifdef _BIG_ENDIAN + uint32_t physical_port_fault:8; + uint32_t physical_port_speed:8; + uint32_t link_duplex:8; + uint32_t pt:2; + uint32_t port_number:6; + uint16_t qos_link_speed; - uint32_t logical_link_status; + uint16_t rsvd0; + + uint32_t rsvd1:21; + uint32_t phys_fcv:1; + uint32_t phys_rxf:1; + uint32_t phys_txf:1; + uint32_t logical_link_status:8; + #else + uint32_t port_number:6; + uint32_t pt:2; + uint32_t link_duplex:8; + uint32_t physical_port_speed:8; + uint32_t physical_port_fault:8; + + uint16_t rsvd0; + uint16_t qos_link_speed; + + uint32_t logical_link_status:8; + uint32_t phys_txf:1; + uint32_t phys_rxf:1; + uint32_t phys_fcv:1; + uint32_t rsvd1:21; + #endif } rsp; } params; }; Modified: stable/9/sys/dev/oce/oce_if.c ============================================================================== --- stable/9/sys/dev/oce/oce_if.c Fri Jun 27 00:11:01 2014 (r267943) +++ stable/9/sys/dev/oce/oce_if.c Fri Jun 27 00:37:03 2014 (r267944) @@ -828,6 +828,21 @@ oce_media_status(struct ifnet *ifp, stru req->ifm_active |= IFM_10G_SR | IFM_FDX; sc->speed = 10000; break; + case 5: /* 20 Gbps */ + req->ifm_active |= IFM_10G_SR | IFM_FDX; + sc->speed = 20000; + break; + case 6: /* 25 Gbps */ + req->ifm_active |= IFM_10G_SR | IFM_FDX; + sc->speed = 25000; + break; + case 7: /* 40 Gbps */ + req->ifm_active |= IFM_40G_SR4 | IFM_FDX; + sc->speed = 40000; + break; + default: + sc->speed = 0; + break; } return; @@ -1940,7 +1955,6 @@ done: /* Is there atleast one eq that needs to be modified? */ if(num) oce_mbox_eqd_modify_periodic(sc, set_eqd, num); - } static void oce_detect_hw_error(POCE_SOFTC sc) @@ -2140,11 +2154,6 @@ process_link_state(POCE_SOFTC sc, struct sc->link_status = ASYNC_EVENT_LINK_DOWN; if_link_state_change(sc->ifp, LINK_STATE_DOWN); } - - /* Update speed */ - sc->link_speed = acqe->u0.s.speed; - sc->qos_link_speed = (uint32_t) acqe->u0.s.qos_link_speed * 10; - } @@ -2218,13 +2227,16 @@ setup_max_queues_want(POCE_SOFTC sc) (sc->function_mode & FNM_UMC_MODE) || (sc->function_mode & FNM_VNIC_MODE) || (!is_rss_enabled(sc)) || - (sc->flags & OCE_FLAGS_BE2)) { + IS_BE2(sc)) { sc->nrqs = 1; sc->nwqs = 1; } else { sc->nrqs = MIN(OCE_NCPUS, sc->nrssqs) + 1; sc->nwqs = MIN(OCE_NCPUS, sc->nrssqs); } + + if (IS_BE2(sc) && is_rss_enabled(sc)) + sc->nrqs = MIN(OCE_NCPUS, sc->nrssqs) + 1; } @@ -2238,6 +2250,9 @@ update_queues_got(POCE_SOFTC sc) sc->nrqs = 1; sc->nwqs = 1; } + + if (IS_BE2(sc)) + sc->nwqs = 1; } static int @@ -2329,18 +2344,17 @@ oce_get_config(POCE_SOFTC sc) max_rss = OCE_MAX_RSS; if (!IS_BE(sc)) { - rc = oce_get_func_config(sc); + rc = oce_get_profile_config(sc, max_rss); if (rc) { sc->nwqs = OCE_MAX_WQ; sc->nrssqs = max_rss; sc->nrqs = sc->nrssqs + 1; } } - else { - rc = oce_get_profile_config(sc); + else { /* For BE3 don't rely on fw for determining the resources */ sc->nrssqs = max_rss; sc->nrqs = sc->nrssqs + 1; - if (rc) - sc->nwqs = OCE_MAX_WQ; + sc->nwqs = OCE_MAX_WQ; + sc->max_vlans = MAX_VLANFILTER_SIZE; } } Modified: stable/9/sys/dev/oce/oce_if.h ============================================================================== --- stable/9/sys/dev/oce/oce_if.h Fri Jun 27 00:11:01 2014 (r267943) +++ stable/9/sys/dev/oce/oce_if.h Fri Jun 27 00:37:03 2014 (r267944) @@ -759,14 +759,9 @@ struct oce_rq { }; struct link_status { - uint8_t physical_port; - uint8_t mac_duplex; - uint8_t mac_speed; - uint8_t mac_fault; - uint8_t mgmt_mac_duplex; - uint8_t mgmt_mac_speed; + uint8_t phys_port_speed; + uint8_t logical_link_status; uint16_t qos_link_speed; - uint32_t logical_link_status; }; @@ -882,8 +877,8 @@ typedef struct oce_softc { uint8_t hw_error; uint16_t qnq_debug_event; uint16_t qnqid; - uint16_t pvid; - uint16_t max_vlans; + uint32_t pvid; + uint32_t max_vlans; } OCE_SOFTC, *POCE_SOFTC; @@ -1055,7 +1050,7 @@ int oce_mbox_cq_create(struct oce_cq *cq int oce_mbox_read_transrecv_data(POCE_SOFTC sc, uint32_t page_num); void oce_mbox_eqd_modify_periodic(POCE_SOFTC sc, struct oce_set_eqd *set_eqd, int num); -int oce_get_profile_config(POCE_SOFTC sc); +int oce_get_profile_config(POCE_SOFTC sc, uint32_t max_rss); int oce_get_func_config(POCE_SOFTC sc); void mbx_common_req_hdr_init(struct mbx_hdr *hdr, uint8_t dom, @@ -1099,6 +1094,9 @@ extern uint32_t oce_max_rsp_handled; /* #define OCE_ONE_PORT_EXT_LOOPBACK 0x2 #define OCE_NO_LOOPBACK 0xff +#undef IFM_40G_SR4 +#define IFM_40G_SR4 28 + #define atomic_inc_32(x) atomic_add_32(x, 1) #define atomic_dec_32(x) atomic_subtract_32(x, 1) Modified: stable/9/sys/dev/oce/oce_mbox.c ============================================================================== --- stable/9/sys/dev/oce/oce_mbox.c Fri Jun 27 00:11:01 2014 (r267943) +++ stable/9/sys/dev/oce/oce_mbox.c Fri Jun 27 00:37:03 2014 (r267944) @@ -935,7 +935,7 @@ oce_get_link_status(POCE_SOFTC sc, struc bzero(&mbx, sizeof(struct oce_mbx)); - IS_XE201(sc) ? (version = OCE_MBX_VER_V1) : (version = OCE_MBX_VER_V0); + IS_BE2(sc) ? (version = OCE_MBX_VER_V0) : (version = OCE_MBX_VER_V1); fwcmd = (struct mbx_query_common_link_config *)&mbx.payload; mbx_common_req_hdr_init(&fwcmd->hdr, 0, 0, @@ -961,9 +961,9 @@ oce_get_link_status(POCE_SOFTC sc, struc goto error; } /* interpret response */ - bcopy(&fwcmd->params.rsp, link, sizeof(struct link_status)); - link->logical_link_status = HOST_32(link->logical_link_status); - link->qos_link_speed = HOST_16(link->qos_link_speed); + link->qos_link_speed = HOST_16(fwcmd->params.rsp.qos_link_speed); + link->phys_port_speed = fwcmd->params.rsp.physical_port_speed; + link->logical_link_status = fwcmd->params.rsp.logical_link_status; error: return rc; } @@ -2025,7 +2025,7 @@ oce_mbox_eqd_modify_periodic(POCE_SOFTC } int -oce_get_profile_config(POCE_SOFTC sc) +oce_get_profile_config(POCE_SOFTC sc, uint32_t max_rss) { struct oce_mbx mbx; struct mbx_common_get_profile_config *fwcmd; @@ -2050,7 +2050,7 @@ oce_get_profile_config(POCE_SOFTC sc) fwcmd = OCE_DMAPTR(&dma, struct mbx_common_get_profile_config); bzero(fwcmd, sizeof(struct mbx_common_get_profile_config)); - if (IS_BE3(sc)) + if (!IS_XE201(sc)) version = OCE_MBX_VER_V1; else version = OCE_MBX_VER_V0; @@ -2102,13 +2102,20 @@ oce_get_profile_config(POCE_SOFTC sc) goto error; } else { - sc->max_vlans = nic_desc->vlan_count; - sc->nwqs = HOST_32(nic_desc->txq_count); + sc->max_vlans = HOST_16(nic_desc->vlan_count); + sc->nwqs = HOST_16(nic_desc->txq_count); if (sc->nwqs) sc->nwqs = MIN(sc->nwqs, OCE_MAX_WQ); else sc->nwqs = OCE_MAX_WQ; + sc->nrssqs = HOST_16(nic_desc->rssq_count); + if (sc->nrssqs) + sc->nrssqs = MIN(sc->nrssqs, max_rss); + else + sc->nrssqs = max_rss; + sc->nrqs = sc->nrssqs + 1; /* 1 for def RX */; + } error: oce_dma_free(sc, &dma); Modified: stable/9/sys/dev/oce/oce_sysctl.c ============================================================================== --- stable/9/sys/dev/oce/oce_sysctl.c Fri Jun 27 00:11:01 2014 (r267943) +++ stable/9/sys/dev/oce/oce_sysctl.c Fri Jun 27 00:37:03 2014 (r267944) @@ -44,6 +44,7 @@ static void copy_stats_to_sc_xe201(POCE_ static void copy_stats_to_sc_be3(POCE_SOFTC sc); static void copy_stats_to_sc_be2(POCE_SOFTC sc); static int oce_sysctl_loopback(SYSCTL_HANDLER_ARGS); +static int oce_sys_aic_enable(SYSCTL_HANDLER_ARGS); static int oce_be3_fwupgrade(POCE_SOFTC sc, const struct firmware *fw); static int oce_skyhawk_fwupgrade(POCE_SOFTC sc, const struct firmware *fw); static int oce_sys_fwupgrade(SYSCTL_HANDLER_ARGS); @@ -131,6 +132,10 @@ oce_add_sysctls(POCE_SOFTC sc) CTLTYPE_STRING | CTLFLAG_RW, (void *)sc, 0, oce_sys_fwupgrade, "A", "Firmware ufi file"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "aic_enable", + CTLTYPE_INT | CTLFLAG_RW, (void *)sc, 1, + oce_sys_aic_enable, "I", "aic flags"); + /* * Dumps Transceiver data * "sysctl dev.oce.0.sfp_vpd_dump=0" @@ -170,6 +175,35 @@ oce_loopback_test(struct oce_softc *sc, } static int +oce_sys_aic_enable(SYSCTL_HANDLER_ARGS) +{ + int value = 0; + uint32_t status, vector; + POCE_SOFTC sc = (struct oce_softc *)arg1; + struct oce_aic_obj *aic; + + status = sysctl_handle_int(oidp, &value, 0, req); + if (status || !req->newptr) + return status; + + for (vector = 0; vector < sc->intr_count; vector++) { + aic = &sc->aic_obj[vector]; + + if (value == 0){ + aic->max_eqd = aic->min_eqd = aic->et_eqd = 0; + aic->enable = 0; + } + else { + aic->max_eqd = OCE_MAX_EQD; + aic->min_eqd = OCE_MIN_EQD; + aic->et_eqd = OCE_MIN_EQD; + aic->enable = TRUE; + } + } + return 0; +} + +static int oce_sysctl_loopback(SYSCTL_HANDLER_ARGS) { int value = 0; From owner-svn-src-stable@FreeBSD.ORG Fri Jun 27 05:37:01 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D8096F6; Fri, 27 Jun 2014 05:37:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88AA62249; Fri, 27 Jun 2014 05:37:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5R5b135059893; Fri, 27 Jun 2014 05:37:01 GMT (envelope-from hiren@svn.freebsd.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5R5b1ia059891; Fri, 27 Jun 2014 05:37:01 GMT (envelope-from hiren@svn.freebsd.org) Message-Id: <201406270537.s5R5b1ia059891@svn.freebsd.org> From: Hiren Panchasara Date: Fri, 27 Jun 2014 05:37:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267950 - stable/10/sys/dev/mpt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jun 2014 05:37:01 -0000 Author: hiren Date: Fri Jun 27 05:37:00 2014 New Revision: 267950 URL: http://svnweb.freebsd.org/changeset/base/267950 Log: MFC r267690 Hide a harmless "QUEUE FULL EVENT" message behind bootverbose. Modified: stable/10/sys/dev/mpt/mpt_cam.c Modified: stable/10/sys/dev/mpt/mpt_cam.c ============================================================================== --- stable/10/sys/dev/mpt/mpt_cam.c Fri Jun 27 05:27:37 2014 (r267949) +++ stable/10/sys/dev/mpt/mpt_cam.c Fri Jun 27 05:37:00 2014 (r267950) @@ -2449,8 +2449,11 @@ mpt_cam_event(struct mpt_softc *mpt, req pqf = (PTR_EVENT_DATA_QUEUE_FULL)msg->Data; pqf->CurrentDepth = le16toh(pqf->CurrentDepth); - mpt_prt(mpt, "QUEUE FULL EVENT: Bus 0x%02x Target 0x%02x Depth " - "%d\n", pqf->Bus, pqf->TargetID, pqf->CurrentDepth); + if (bootverbose) { + mpt_prt(mpt, "QUEUE FULL EVENT: Bus 0x%02x Target 0x%02x " + "Depth %d\n", + pqf->Bus, pqf->TargetID, pqf->CurrentDepth); + } if (mpt->phydisk_sim && mpt_is_raid_member(mpt, pqf->TargetID) != 0) { sim = mpt->phydisk_sim; From owner-svn-src-stable@FreeBSD.ORG Fri Jun 27 05:50:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3894CC88; Fri, 27 Jun 2014 05:50:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 253D5235D; Fri, 27 Jun 2014 05:50:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5R5ouhq067560; Fri, 27 Jun 2014 05:50:56 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5R5oueK067559; Fri, 27 Jun 2014 05:50:56 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201406270550.s5R5oueK067559@svn.freebsd.org> From: Sergey Kandaurov Date: Fri, 27 Jun 2014 05:50:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267951 - stable/10/gnu/usr.bin/groff/tmac X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jun 2014 05:50:56 -0000 Author: pluknet Date: Fri Jun 27 05:50:55 2014 New Revision: 267951 URL: http://svnweb.freebsd.org/changeset/base/267951 Log: MFC r266479, r267153: - Move Nx definition to a separate block. - Add Lb string for libcuse. Modified: stable/10/gnu/usr.bin/groff/tmac/mdoc.local Directory Properties: stable/10/ (props changed) Modified: stable/10/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- stable/10/gnu/usr.bin/groff/tmac/mdoc.local Fri Jun 27 05:37:00 2014 (r267950) +++ stable/10/gnu/usr.bin/groff/tmac/mdoc.local Fri Jun 27 05:50:55 2014 (r267951) @@ -35,6 +35,7 @@ .ds doc-str-Lb-libarchive Streaming Archive Library (libarchive, \-larchive) .ds doc-str-Lb-libbluetooth Bluetooth User Library (libbluetooth, \-lbluetooth) .ds doc-str-Lb-libcapsicum Capsicum Library (libcapsicum, \-lcapsicum) +.ds doc-str-Lb-libcuse Userland Character Device Library (libcuse, \-lcuse) .ds doc-str-Lb-libedit Line Editor and History Library (libedit, \-ledit) .ds doc-str-Lb-libefi EFI Runtime Services Library (libefi, \-lefi) .ds doc-str-Lb-libelf ELF Parsing Library (libelf, \-lelf) @@ -61,6 +62,8 @@ .ds doc-operating-system-FreeBSD-10.0 10.0 .ds doc-operating-system-FreeBSD-10.1 10.1 .ds doc-operating-system-FreeBSD-11.0 11.0 +. +.\" Definitions for other *BSDs not (yet) in doc-common .ds doc-operating-system-NetBSD-7.0 7.0 . .\" Definitions not (yet) in doc-syms From owner-svn-src-stable@FreeBSD.ORG Fri Jun 27 09:11:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F7AC963; Fri, 27 Jun 2014 09:11:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EFA782550; Fri, 27 Jun 2014 09:11:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5R9BOle063336; Fri, 27 Jun 2014 09:11:24 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5R9BOaT063335; Fri, 27 Jun 2014 09:11:24 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201406270911.s5R9BOaT063335@svn.freebsd.org> From: Sergey Kandaurov Date: Fri, 27 Jun 2014 09:11:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267953 - stable/10/lib/libc/gen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jun 2014 09:11:25 -0000 Author: pluknet Date: Fri Jun 27 09:11:24 2014 New Revision: 267953 URL: http://svnweb.freebsd.org/changeset/base/267953 Log: MFC r261140: Add MLINK for fdclosedir.3 to directory.3 and sort fdopendir(3) entry. Modified: stable/10/lib/libc/gen/Makefile.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/Makefile.inc ============================================================================== --- stable/10/lib/libc/gen/Makefile.inc Fri Jun 27 06:52:37 2014 (r267952) +++ stable/10/lib/libc/gen/Makefile.inc Fri Jun 27 09:11:24 2014 (r267953) @@ -304,8 +304,9 @@ MLINKS+=devname.3 fdevname.3 MLINKS+=devname.3 fdevname_r.3 MLINKS+=directory.3 closedir.3 \ directory.3 dirfd.3 \ - directory.3 opendir.3 \ + directory.3 fdclosedir.3 \ directory.3 fdopendir.3 \ + directory.3 opendir.3 \ directory.3 readdir.3 \ directory.3 readdir_r.3 \ directory.3 rewinddir.3 \ From owner-svn-src-stable@FreeBSD.ORG Fri Jun 27 11:42:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DAFA6C1B; Fri, 27 Jun 2014 11:42:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C761D24C2; Fri, 27 Jun 2014 11:42:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5RBgpZw032778; Fri, 27 Jun 2014 11:42:51 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5RBgp26032777; Fri, 27 Jun 2014 11:42:51 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201406271142.s5RBgp26032777@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 27 Jun 2014 11:42:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267956 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jun 2014 11:42:52 -0000 Author: kib Date: Fri Jun 27 11:42:51 2014 New Revision: 267956 URL: http://svnweb.freebsd.org/changeset/base/267956 Log: MFC r267664: Assert that the new entry is inserted into the right location in the map entries list, and that it does not overlap with the previous and next entries. Modified: stable/10/sys/vm/vm_map.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_map.c ============================================================================== --- stable/10/sys/vm/vm_map.c Fri Jun 27 10:24:36 2014 (r267955) +++ stable/10/sys/vm/vm_map.c Fri Jun 27 11:42:51 2014 (r267956) @@ -940,6 +940,15 @@ vm_map_entry_link(vm_map_t map, "vm_map_entry_link: map %p, nentries %d, entry %p, after %p", map, map->nentries, entry, after_where); VM_MAP_ASSERT_LOCKED(map); + KASSERT(after_where == &map->header || + after_where->end <= entry->start, + ("vm_map_entry_link: prev end %jx new start %jx overlap", + (uintmax_t)after_where->end, (uintmax_t)entry->start)); + KASSERT(after_where->next == &map->header || + entry->end <= after_where->next->start, + ("vm_map_entry_link: new end %jx next start %jx overlap", + (uintmax_t)entry->end, (uintmax_t)after_where->next->start)); + map->nentries++; entry->prev = after_where; entry->next = after_where->next; From owner-svn-src-stable@FreeBSD.ORG Fri Jun 27 13:19:04 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E8DC3163; Fri, 27 Jun 2014 13:19:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C94D82DD7; Fri, 27 Jun 2014 13:19:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5RDJ3Uc077893; Fri, 27 Jun 2014 13:19:03 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5RDJ3XA077892; Fri, 27 Jun 2014 13:19:03 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201406271319.s5RDJ3XA077892@svn.freebsd.org> From: Marius Strobl Date: Fri, 27 Jun 2014 13:19:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r267957 - stable/8/sys/dev/pci X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jun 2014 13:19:04 -0000 Author: marius Date: Fri Jun 27 13:19:03 2014 New Revision: 267957 URL: http://svnweb.freebsd.org/changeset/base/267957 Log: MFC: r224269 Add missing XHCI early takeover code. The XHCI takeover code is supposed to disable the BIOS from using the XHCI controller after bootup. Modified: stable/8/sys/dev/pci/pci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/pci/ (props changed) Modified: stable/8/sys/dev/pci/pci.c ============================================================================== --- stable/8/sys/dev/pci/pci.c Fri Jun 27 11:42:51 2014 (r267956) +++ stable/8/sys/dev/pci/pci.c Fri Jun 27 13:19:03 2014 (r267957) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -3030,6 +3031,68 @@ ehci_early_takeover(device_t self) bus_release_resource(self, SYS_RES_MEMORY, rid, res); } +/* Perform early XHCI takeover from SMM. */ +static void +xhci_early_takeover(device_t self) +{ + struct resource *res; + uint32_t cparams; + uint32_t eec; + uint8_t eecp; + uint8_t bios_sem; + uint8_t offs; + int rid; + int i; + + rid = PCIR_BAR(0); + res = bus_alloc_resource_any(self, SYS_RES_MEMORY, &rid, RF_ACTIVE); + if (res == NULL) + return; + + cparams = bus_read_4(res, XHCI_HCSPARAMS0); + + eec = -1; + + /* Synchronise with the BIOS if it owns the controller. */ + for (eecp = XHCI_HCS0_XECP(cparams) << 2; eecp != 0 && XHCI_XECP_NEXT(eec); + eecp += XHCI_XECP_NEXT(eec) << 2) { + eec = bus_read_4(res, eecp); + + if (XHCI_XECP_ID(eec) != XHCI_ID_USB_LEGACY) + continue; + + bios_sem = bus_read_1(res, eecp + XHCI_XECP_BIOS_SEM); + if (bios_sem == 0) + continue; + + if (bootverbose) + printf("xhci early: " + "SMM active, request owner change\n"); + + bus_write_1(res, eecp + XHCI_XECP_OS_SEM, 1); + + /* wait a maximum of 5 second */ + + for (i = 0; (i < 5000) && (bios_sem != 0); i++) { + DELAY(1000); + bios_sem = bus_read_1(res, eecp + + XHCI_XECP_BIOS_SEM); + } + + if (bios_sem != 0) { + if (bootverbose) + printf("xhci early: " + "SMM does not respond\n"); + } + + /* Disable interrupts */ + offs = bus_read_1(res, XHCI_CAPLENGTH); + bus_write_4(res, offs + XHCI_USBCMD, 0); + bus_read_4(res, offs + XHCI_USBSTS); + } + bus_release_resource(self, SYS_RES_MEMORY, rid, res); +} + void pci_add_resources(device_t bus, device_t dev, int force, uint32_t prefetchmask) { @@ -3093,7 +3156,9 @@ pci_add_resources(device_t bus, device_t if (pci_usb_takeover && pci_get_class(dev) == PCIC_SERIALBUS && pci_get_subclass(dev) == PCIS_SERIALBUS_USB) { - if (pci_get_progif(dev) == PCIP_SERIALBUS_USB_EHCI) + if (pci_get_progif(dev) == PCIP_SERIALBUS_USB_XHCI) + xhci_early_takeover(dev); + else if (pci_get_progif(dev) == PCIP_SERIALBUS_USB_EHCI) ehci_early_takeover(dev); else if (pci_get_progif(dev) == PCIP_SERIALBUS_USB_OHCI) ohci_early_takeover(dev); From owner-svn-src-stable@FreeBSD.ORG Fri Jun 27 14:42:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F255E322; Fri, 27 Jun 2014 14:42:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2AC3274C; Fri, 27 Jun 2014 14:42:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5REgDji020989; Fri, 27 Jun 2014 14:42:13 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5REgDtg020988; Fri, 27 Jun 2014 14:42:13 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201406271442.s5REgDtg020988@svn.freebsd.org> From: Ed Maste Date: Fri, 27 Jun 2014 14:42:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267958 - stable/10/usr.bin/elfdump X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jun 2014 14:42:14 -0000 Author: emaste Date: Fri Jun 27 14:42:13 2014 New Revision: 267958 URL: http://svnweb.freebsd.org/changeset/base/267958 Log: MFC r265613, r267649: Handle ELF files with 65280 or more sections If e_shnum or e_shstrndx are at least SHN_LORESERVE (0xff00) then an escape value is used to indicate that the actual value is found in one of section 0's fields. Don't dump core when the ELF file has no section headers. The ELF core files created by gcore are among those. Modified: stable/10/usr.bin/elfdump/elfdump.c Modified: stable/10/usr.bin/elfdump/elfdump.c ============================================================================== --- stable/10/usr.bin/elfdump/elfdump.c Fri Jun 27 13:19:03 2014 (r267957) +++ stable/10/usr.bin/elfdump/elfdump.c Fri Jun 27 14:42:13 2014 (r267958) @@ -368,7 +368,7 @@ static u_int64_t elf_get_half(Elf32_Ehdr static u_int64_t elf_get_word(Elf32_Ehdr *e, void *base, elf_member_t member); static u_int64_t elf_get_quad(Elf32_Ehdr *e, void *base, elf_member_t member); -static void elf_print_ehdr(Elf32_Ehdr *e); +static void elf_print_ehdr(Elf32_Ehdr *e, void *sh); static void elf_print_phdr(Elf32_Ehdr *e, void *p); static void elf_print_shdr(Elf32_Ehdr *e, void *sh); static void elf_print_symtab(Elf32_Ehdr *e, void *sh, char *str); @@ -382,6 +382,33 @@ static void elf_print_note(Elf32_Ehdr *e static void usage(void); +/* + * Helpers for ELF files with shnum or shstrndx values that don't fit in the + * ELF header. If the values are too large then an escape value is used to + * indicate that the actual value is found in one of section 0's fields. + */ +static uint64_t +elf_get_shnum(Elf32_Ehdr *e, void *sh) +{ + uint64_t shnum; + + shnum = elf_get_quarter(e, e, E_SHNUM); + if (shnum == 0) + shnum = elf_get_word(e, (char *)sh, SH_SIZE); + return shnum; +} + +static uint64_t +elf_get_shstrndx(Elf32_Ehdr *e, void *sh) +{ + uint64_t shstrndx; + + shstrndx = elf_get_quarter(e, e, E_SHSTRNDX); + if (shstrndx == SHN_XINDEX) + shstrndx = elf_get_word(e, (char *)sh, SH_LINK); + return shstrndx; +} + int main(int ac, char **av) { @@ -467,12 +494,20 @@ main(int ac, char **av) phentsize = elf_get_quarter(e, e, E_PHENTSIZE); phnum = elf_get_quarter(e, e, E_PHNUM); shentsize = elf_get_quarter(e, e, E_SHENTSIZE); - shnum = elf_get_quarter(e, e, E_SHNUM); - shstrndx = elf_get_quarter(e, e, E_SHSTRNDX); p = (char *)e + phoff; - sh = (char *)e + shoff; - offset = elf_get_off(e, (char *)sh + shstrndx * shentsize, SH_OFFSET); - shstrtab = (char *)e + offset; + if (shoff > 0) { + sh = (char *)e + shoff; + shnum = elf_get_shnum(e, sh); + shstrndx = elf_get_shstrndx(e, sh); + offset = elf_get_off(e, (char *)sh + shstrndx * shentsize, + SH_OFFSET); + shstrtab = (char *)e + offset; + } else { + sh = NULL; + shnum = 0; + shstrndx = 0; + shstrtab = NULL; + } for (i = 0; (u_int64_t)i < shnum; i++) { name = elf_get_word(e, (char *)sh + i * shentsize, SH_NAME); offset = elf_get_off(e, (char *)sh + i * shentsize, SH_OFFSET); @@ -482,7 +517,7 @@ main(int ac, char **av) dynstr = (char *)e + offset; } if (flags & ED_EHDR) - elf_print_ehdr(e); + elf_print_ehdr(e, sh); if (flags & ED_PHDR) elf_print_phdr(e, p); if (flags & ED_SHDR) @@ -556,7 +591,7 @@ main(int ac, char **av) } static void -elf_print_ehdr(Elf32_Ehdr *e) +elf_print_ehdr(Elf32_Ehdr *e, void *sh) { u_int64_t class; u_int64_t data; @@ -589,8 +624,6 @@ elf_print_ehdr(Elf32_Ehdr *e) phentsize = elf_get_quarter(e, e, E_PHENTSIZE); phnum = elf_get_quarter(e, e, E_PHNUM); shentsize = elf_get_quarter(e, e, E_SHENTSIZE); - shnum = elf_get_quarter(e, e, E_SHNUM); - shstrndx = elf_get_quarter(e, e, E_SHSTRNDX); fprintf(out, "\nelf header:\n"); fprintf(out, "\n"); fprintf(out, "\te_ident: %s %s %s\n", ei_classes[class], ei_data[data], @@ -606,8 +639,12 @@ elf_print_ehdr(Elf32_Ehdr *e) fprintf(out, "\te_phentsize: %jd\n", (intmax_t)phentsize); fprintf(out, "\te_phnum: %jd\n", (intmax_t)phnum); fprintf(out, "\te_shentsize: %jd\n", (intmax_t)shentsize); - fprintf(out, "\te_shnum: %jd\n", (intmax_t)shnum); - fprintf(out, "\te_shstrndx: %jd\n", (intmax_t)shstrndx); + if (sh != NULL) { + shnum = elf_get_shnum(e, sh); + shstrndx = elf_get_shstrndx(e, sh); + fprintf(out, "\te_shnum: %jd\n", (intmax_t)shnum); + fprintf(out, "\te_shstrndx: %jd\n", (intmax_t)shstrndx); + } } static void @@ -670,8 +707,13 @@ elf_print_shdr(Elf32_Ehdr *e, void *sh) void *v; int i; + if (sh == NULL) { + fprintf(out, "\nNo section headers\n"); + return; + } + shentsize = elf_get_quarter(e, e, E_SHENTSIZE); - shnum = elf_get_quarter(e, e, E_SHNUM); + shnum = elf_get_shnum(e, sh); fprintf(out, "\nsection header:\n"); for (i = 0; (u_int64_t)i < shnum; i++) { v = (char *)sh + i * shentsize; From owner-svn-src-stable@FreeBSD.ORG Fri Jun 27 17:10:29 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7ABE070A; Fri, 27 Jun 2014 17:10:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6712425AC; Fri, 27 Jun 2014 17:10:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5RHATIq093079; Fri, 27 Jun 2014 17:10:29 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5RHATFN093077; Fri, 27 Jun 2014 17:10:29 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201406271710.s5RHATFN093077@svn.freebsd.org> From: Josh Paetzel Date: Fri, 27 Jun 2014 17:10:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267962 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jun 2014 17:10:29 -0000 Author: jpaetzel Date: Fri Jun 27 17:10:28 2014 New Revision: 267962 URL: http://svnweb.freebsd.org/changeset/base/267962 Log: MFC: 267833 Fix issues in config parser relating to lun serial numbers. Without this fix some serial numbers needed to be quoted to avoid the config parser bailing out. Submitted by: delphij Sponsored by: iXsystems Modified: stable/10/usr.sbin/ctld/parse.y stable/10/usr.sbin/ctld/token.l Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/parse.y ============================================================================== --- stable/10/usr.sbin/ctld/parse.y Fri Jun 27 16:33:43 2014 (r267961) +++ stable/10/usr.sbin/ctld/parse.y Fri Jun 27 17:10:28 2014 (r267962) @@ -659,6 +659,19 @@ lun_serial: SERIAL STR } lun_set_serial(lun, $2); free($2); + } | SERIAL NUM + { + char *str = NULL; + + if (lun->l_serial != NULL) { + log_warnx("serial for lun %d, target \"%s\" " + "specified more than once", + lun->l_lun, target->t_name); + return (1); + } + asprintf(&str, "%ju", $2); + lun_set_serial(lun, str); + free(str); } ; Modified: stable/10/usr.sbin/ctld/token.l ============================================================================== --- stable/10/usr.sbin/ctld/token.l Fri Jun 27 16:33:43 2014 (r267961) +++ stable/10/usr.sbin/ctld/token.l Fri Jun 27 17:10:28 2014 (r267962) @@ -74,8 +74,9 @@ target { return TARGET; } timeout { return TIMEOUT; } [0-9]+[kKmMgGtTpPeE]? { if (expand_number(yytext, &yylval.num) == 0) return NUM; - else - return STR; + else { + yylval.str = strdup(yytext); return STR; + } } \"[^"]+\" { yylval.str = strndup(yytext + 1, strlen(yytext) - 2); return STR; } From owner-svn-src-stable@FreeBSD.ORG Fri Jun 27 17:22:19 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC34AD8C; Fri, 27 Jun 2014 17:22:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D2662721; Fri, 27 Jun 2014 17:22:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5RHMJNt002266; Fri, 27 Jun 2014 17:22:19 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5RHMIQD002254; Fri, 27 Jun 2014 17:22:18 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406271722.s5RHMIQD002254@svn.freebsd.org> From: John Baldwin Date: Fri, 27 Jun 2014 17:22:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267964 - in stable: 10/sys/amd64/amd64 10/sys/i386/i386 10/sys/i386/include 10/sys/i386/xen 10/sys/pc98/pc98 9/sys/amd64/amd64 9/sys/i386/i386 9/sys/i386/include 9/sys/i386/xen 9/sys/p... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jun 2014 17:22:19 -0000 Author: jhb Date: Fri Jun 27 17:22:18 2014 New Revision: 267964 URL: http://svnweb.freebsd.org/changeset/base/267964 Log: MFC 261781: Don't waste a page of KVA for the boot-time memory test on x86. For amd64, reuse the first page of the crashdumpmap as CMAP1/CADDR1. For i386, remove CMAP1/CADDR1 entirely and reuse CMAP3/CADDR3 for the memory test. Modified: stable/10/sys/amd64/amd64/pmap.c stable/10/sys/i386/i386/machdep.c stable/10/sys/i386/i386/pmap.c stable/10/sys/i386/include/pmap.h stable/10/sys/i386/xen/pmap.c stable/10/sys/pc98/pc98/machdep.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/amd64/amd64/pmap.c stable/9/sys/i386/i386/machdep.c stable/9/sys/i386/i386/pmap.c stable/9/sys/i386/include/pmap.h stable/9/sys/i386/xen/pmap.c stable/9/sys/pc98/pc98/machdep.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/amd64/amd64/pmap.c ============================================================================== --- stable/10/sys/amd64/amd64/pmap.c Fri Jun 27 17:18:54 2014 (r267963) +++ stable/10/sys/amd64/amd64/pmap.c Fri Jun 27 17:22:18 2014 (r267964) @@ -812,7 +812,7 @@ void pmap_bootstrap(vm_paddr_t *firstaddr) { vm_offset_t va; - pt_entry_t *pte, *unused; + pt_entry_t *pte; /* * Create an initial set of page tables to run the kernel in. @@ -858,14 +858,11 @@ pmap_bootstrap(vm_paddr_t *firstaddr) pte = vtopte(va); /* - * CMAP1 is only used for the memory test. - */ - SYSMAP(caddr_t, CMAP1, CADDR1, 1) - - /* - * Crashdump maps. + * Crashdump maps. The first page is reused as CMAP1 for the + * memory test. */ - SYSMAP(caddr_t, unused, crashdumpmap, MAXDUMPPGS) + SYSMAP(caddr_t, CMAP1, crashdumpmap, MAXDUMPPGS) + CADDR1 = crashdumpmap; virtual_avail = va; Modified: stable/10/sys/i386/i386/machdep.c ============================================================================== --- stable/10/sys/i386/i386/machdep.c Fri Jun 27 17:18:54 2014 (r267963) +++ stable/10/sys/i386/i386/machdep.c Fri Jun 27 17:22:18 2014 (r267964) @@ -2387,7 +2387,7 @@ physmap_done: phys_avail[pa_indx++] = physmap[0]; phys_avail[pa_indx] = physmap[0]; dump_avail[da_indx] = physmap[0]; - pte = CMAP1; + pte = CMAP3; /* * Get dcons buffer address @@ -2409,7 +2409,7 @@ physmap_done: end = trunc_page(physmap[i + 1]); for (pa = round_page(physmap[i]); pa < end; pa += PAGE_SIZE) { int tmp, page_bad, full; - int *ptr = (int *)CADDR1; + int *ptr = (int *)CADDR3; full = FALSE; /* Modified: stable/10/sys/i386/i386/pmap.c ============================================================================== --- stable/10/sys/i386/i386/pmap.c Fri Jun 27 17:18:54 2014 (r267963) +++ stable/10/sys/i386/i386/pmap.c Fri Jun 27 17:22:18 2014 (r267964) @@ -256,11 +256,10 @@ struct sysmaps { caddr_t CADDR2; }; static struct sysmaps sysmaps_pcpu[MAXCPU]; -pt_entry_t *CMAP1 = 0; -static pt_entry_t *CMAP3; +pt_entry_t *CMAP3; static pd_entry_t *KPTD; -caddr_t CADDR1 = 0, ptvmmap = 0; -static caddr_t CADDR3; +caddr_t ptvmmap = 0; +caddr_t CADDR3; struct msgbuf *msgbufp = 0; /* @@ -434,7 +433,6 @@ pmap_bootstrap(vm_paddr_t firstaddr) SYSMAP(caddr_t, sysmaps->CMAP1, sysmaps->CADDR1, 1) SYSMAP(caddr_t, sysmaps->CMAP2, sysmaps->CADDR2, 1) } - SYSMAP(caddr_t, CMAP1, CADDR1, 1) SYSMAP(caddr_t, CMAP3, CADDR3, 1) /* Modified: stable/10/sys/i386/include/pmap.h ============================================================================== --- stable/10/sys/i386/include/pmap.h Fri Jun 27 17:18:54 2014 (r267963) +++ stable/10/sys/i386/include/pmap.h Fri Jun 27 17:22:18 2014 (r267964) @@ -420,8 +420,8 @@ struct pv_chunk { #ifdef _KERNEL -extern caddr_t CADDR1; -extern pt_entry_t *CMAP1; +extern caddr_t CADDR3; +extern pt_entry_t *CMAP3; extern vm_paddr_t phys_avail[]; extern vm_paddr_t dump_avail[]; extern int pseflag; Modified: stable/10/sys/i386/xen/pmap.c ============================================================================== --- stable/10/sys/i386/xen/pmap.c Fri Jun 27 17:18:54 2014 (r267963) +++ stable/10/sys/i386/xen/pmap.c Fri Jun 27 17:22:18 2014 (r267964) @@ -249,9 +249,9 @@ struct sysmaps { caddr_t CADDR2; }; static struct sysmaps sysmaps_pcpu[MAXCPU]; -static pt_entry_t *CMAP3; +pt_entry_t *CMAP3; caddr_t ptvmmap = 0; -static caddr_t CADDR3; +caddr_t CADDR3; struct msgbuf *msgbufp = 0; /* Modified: stable/10/sys/pc98/pc98/machdep.c ============================================================================== --- stable/10/sys/pc98/pc98/machdep.c Fri Jun 27 17:18:54 2014 (r267963) +++ stable/10/sys/pc98/pc98/machdep.c Fri Jun 27 17:22:18 2014 (r267964) @@ -1962,7 +1962,7 @@ getmemsize(int first) phys_avail[pa_indx++] = physmap[0]; phys_avail[pa_indx] = physmap[0]; dump_avail[da_indx] = physmap[0]; - pte = CMAP1; + pte = CMAP3; /* * Get dcons buffer address @@ -1983,7 +1983,7 @@ getmemsize(int first) end = trunc_page(physmap[i + 1]); for (pa = round_page(physmap[i]); pa < end; pa += PAGE_SIZE) { int tmp, page_bad, full; - int *ptr = (int *)CADDR1; + int *ptr = (int *)CADDR3; full = FALSE; /* From owner-svn-src-stable@FreeBSD.ORG Fri Jun 27 17:22:21 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 319BCD99; Fri, 27 Jun 2014 17:22:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 106E42722; Fri, 27 Jun 2014 17:22:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5RHMKuf002293; Fri, 27 Jun 2014 17:22:20 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5RHMJcF002272; Fri, 27 Jun 2014 17:22:19 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406271722.s5RHMJcF002272@svn.freebsd.org> From: John Baldwin Date: Fri, 27 Jun 2014 17:22:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267964 - in stable: 10/sys/amd64/amd64 10/sys/i386/i386 10/sys/i386/include 10/sys/i386/xen 10/sys/pc98/pc98 9/sys/amd64/amd64 9/sys/i386/i386 9/sys/i386/include 9/sys/i386/xen 9/sys/p... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jun 2014 17:22:21 -0000 Author: jhb Date: Fri Jun 27 17:22:18 2014 New Revision: 267964 URL: http://svnweb.freebsd.org/changeset/base/267964 Log: MFC 261781: Don't waste a page of KVA for the boot-time memory test on x86. For amd64, reuse the first page of the crashdumpmap as CMAP1/CADDR1. For i386, remove CMAP1/CADDR1 entirely and reuse CMAP3/CADDR3 for the memory test. Modified: stable/9/sys/amd64/amd64/pmap.c stable/9/sys/i386/i386/machdep.c stable/9/sys/i386/i386/pmap.c stable/9/sys/i386/include/pmap.h stable/9/sys/i386/xen/pmap.c stable/9/sys/pc98/pc98/machdep.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/amd64/amd64/pmap.c stable/10/sys/i386/i386/machdep.c stable/10/sys/i386/i386/pmap.c stable/10/sys/i386/include/pmap.h stable/10/sys/i386/xen/pmap.c stable/10/sys/pc98/pc98/machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/amd64/amd64/pmap.c ============================================================================== --- stable/9/sys/amd64/amd64/pmap.c Fri Jun 27 17:18:54 2014 (r267963) +++ stable/9/sys/amd64/amd64/pmap.c Fri Jun 27 17:22:18 2014 (r267964) @@ -619,7 +619,7 @@ void pmap_bootstrap(vm_paddr_t *firstaddr) { vm_offset_t va; - pt_entry_t *pte, *unused; + pt_entry_t *pte; /* * Create an initial set of page tables to run the kernel in. @@ -663,14 +663,11 @@ pmap_bootstrap(vm_paddr_t *firstaddr) pte = vtopte(va); /* - * CMAP1 is only used for the memory test. - */ - SYSMAP(caddr_t, CMAP1, CADDR1, 1) - - /* - * Crashdump maps. + * Crashdump maps. The first page is reused as CMAP1 for the + * memory test. */ - SYSMAP(caddr_t, unused, crashdumpmap, MAXDUMPPGS) + SYSMAP(caddr_t, CMAP1, crashdumpmap, MAXDUMPPGS) + CADDR1 = crashdumpmap; virtual_avail = va; Modified: stable/9/sys/i386/i386/machdep.c ============================================================================== --- stable/9/sys/i386/i386/machdep.c Fri Jun 27 17:18:54 2014 (r267963) +++ stable/9/sys/i386/i386/machdep.c Fri Jun 27 17:22:18 2014 (r267964) @@ -2363,7 +2363,7 @@ physmap_done: phys_avail[pa_indx++] = physmap[0]; phys_avail[pa_indx] = physmap[0]; dump_avail[da_indx] = physmap[0]; - pte = CMAP1; + pte = CMAP3; /* * Get dcons buffer address @@ -2385,7 +2385,7 @@ physmap_done: end = trunc_page(physmap[i + 1]); for (pa = round_page(physmap[i]); pa < end; pa += PAGE_SIZE) { int tmp, page_bad, full; - int *ptr = (int *)CADDR1; + int *ptr = (int *)CADDR3; full = FALSE; /* Modified: stable/9/sys/i386/i386/pmap.c ============================================================================== --- stable/9/sys/i386/i386/pmap.c Fri Jun 27 17:18:54 2014 (r267963) +++ stable/9/sys/i386/i386/pmap.c Fri Jun 27 17:22:18 2014 (r267964) @@ -271,11 +271,10 @@ struct sysmaps { caddr_t CADDR2; }; static struct sysmaps sysmaps_pcpu[MAXCPU]; -pt_entry_t *CMAP1 = 0; -static pt_entry_t *CMAP3; +pt_entry_t *CMAP3; static pd_entry_t *KPTD; -caddr_t CADDR1 = 0, ptvmmap = 0; -static caddr_t CADDR3; +caddr_t ptvmmap = 0; +caddr_t CADDR3; struct msgbuf *msgbufp = 0; /* @@ -450,7 +449,6 @@ pmap_bootstrap(vm_paddr_t firstaddr) SYSMAP(caddr_t, sysmaps->CMAP1, sysmaps->CADDR1, 1) SYSMAP(caddr_t, sysmaps->CMAP2, sysmaps->CADDR2, 1) } - SYSMAP(caddr_t, CMAP1, CADDR1, 1) SYSMAP(caddr_t, CMAP3, CADDR3, 1) /* Modified: stable/9/sys/i386/include/pmap.h ============================================================================== --- stable/9/sys/i386/include/pmap.h Fri Jun 27 17:18:54 2014 (r267963) +++ stable/9/sys/i386/include/pmap.h Fri Jun 27 17:22:18 2014 (r267964) @@ -416,8 +416,8 @@ struct pv_chunk { #ifdef _KERNEL -extern caddr_t CADDR1; -extern pt_entry_t *CMAP1; +extern caddr_t CADDR3; +extern pt_entry_t *CMAP3; extern vm_paddr_t phys_avail[]; extern vm_paddr_t dump_avail[]; extern int pseflag; Modified: stable/9/sys/i386/xen/pmap.c ============================================================================== --- stable/9/sys/i386/xen/pmap.c Fri Jun 27 17:18:54 2014 (r267963) +++ stable/9/sys/i386/xen/pmap.c Fri Jun 27 17:22:18 2014 (r267964) @@ -249,9 +249,9 @@ struct sysmaps { caddr_t CADDR2; }; static struct sysmaps sysmaps_pcpu[MAXCPU]; -static pt_entry_t *CMAP3; +pt_entry_t *CMAP3; caddr_t ptvmmap = 0; -static caddr_t CADDR3; +caddr_t CADDR3; struct msgbuf *msgbufp = 0; /* Modified: stable/9/sys/pc98/pc98/machdep.c ============================================================================== --- stable/9/sys/pc98/pc98/machdep.c Fri Jun 27 17:18:54 2014 (r267963) +++ stable/9/sys/pc98/pc98/machdep.c Fri Jun 27 17:22:18 2014 (r267964) @@ -1953,7 +1953,7 @@ getmemsize(int first) phys_avail[pa_indx++] = physmap[0]; phys_avail[pa_indx] = physmap[0]; dump_avail[da_indx] = physmap[0]; - pte = CMAP1; + pte = CMAP3; /* * Get dcons buffer address @@ -1974,7 +1974,7 @@ getmemsize(int first) end = trunc_page(physmap[i + 1]); for (pa = round_page(physmap[i]); pa < end; pa += PAGE_SIZE) { int tmp, page_bad, full; - int *ptr = (int *)CADDR1; + int *ptr = (int *)CADDR3; full = FALSE; /* From owner-svn-src-stable@FreeBSD.ORG Fri Jun 27 19:50:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A57ED8F; Fri, 27 Jun 2014 19:50:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C42525F3; Fri, 27 Jun 2014 19:50:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5RJoU0X069846; Fri, 27 Jun 2014 19:50:30 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5RJoUFZ069845; Fri, 27 Jun 2014 19:50:30 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406271950.s5RJoUFZ069845@svn.freebsd.org> From: John Baldwin Date: Fri, 27 Jun 2014 19:50:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267976 - in stable: 10/usr.bin/procstat 8/usr.bin/procstat 9/usr.bin/procstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jun 2014 19:50:31 -0000 Author: jhb Date: Fri Jun 27 19:50:30 2014 New Revision: 267976 URL: http://svnweb.freebsd.org/changeset/base/267976 Log: MFC 266296: Correct some minor nits in the per-thread signal format description such as missing posessives and misordering of fields. Modified: stable/10/usr.bin/procstat/procstat.1 Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/8/usr.bin/procstat/procstat.1 stable/9/usr.bin/procstat/procstat.1 Directory Properties: stable/8/usr.bin/procstat/ (props changed) stable/9/usr.bin/procstat/ (props changed) Modified: stable/10/usr.bin/procstat/procstat.1 ============================================================================== --- stable/10/usr.bin/procstat/procstat.1 Fri Jun 27 19:11:32 2014 (r267975) +++ stable/10/usr.bin/procstat/procstat.1 Fri Jun 27 19:50:30 2014 (r267976) @@ -65,7 +65,7 @@ Display file descriptor information for .It Fl i Display signal pending and disposition information for the process. .It Fl j -Display signal pending and blocked information for the process threads. +Display signal pending and blocked information for the process's threads. .It Fl k Display the stacks of kernel threads in the process, excluding stacks of threads currently running on a CPU and threads with stacks swapped to disk. @@ -260,15 +260,15 @@ If .Fl n switch is given, the signal numbers are shown instead of signal names. .Ss Thread Signal Information -Display signal pending and blocked for a process threads: +Display signal pending and blocked for a process's threads: .Pp .Bl -tag -width ident -compact .It PID process ID -.It COMM -command .It TID thread ID +.It COMM +command .It SIG signal name .It FLAGS @@ -285,7 +285,7 @@ The .Fl n switch has the same effect as for the .Fl i -switch, the signals numbers are shown instead of signal names. +switch: the signal numbers are shown instead of signal names. .Ss Kernel Thread Stacks Display kernel thread stacks for a process, allowing further interpretation of thread wait channels. From owner-svn-src-stable@FreeBSD.ORG Fri Jun 27 19:50:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 88F84D90; Fri, 27 Jun 2014 19:50:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C30F25F4; Fri, 27 Jun 2014 19:50:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5RJoVjE069852; Fri, 27 Jun 2014 19:50:31 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5RJoVJM069851; Fri, 27 Jun 2014 19:50:31 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406271950.s5RJoVJM069851@svn.freebsd.org> From: John Baldwin Date: Fri, 27 Jun 2014 19:50:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r267976 - in stable: 10/usr.bin/procstat 8/usr.bin/procstat 9/usr.bin/procstat X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jun 2014 19:50:31 -0000 Author: jhb Date: Fri Jun 27 19:50:30 2014 New Revision: 267976 URL: http://svnweb.freebsd.org/changeset/base/267976 Log: MFC 266296: Correct some minor nits in the per-thread signal format description such as missing posessives and misordering of fields. Modified: stable/8/usr.bin/procstat/procstat.1 Directory Properties: stable/8/usr.bin/procstat/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.bin/procstat/procstat.1 stable/9/usr.bin/procstat/procstat.1 Directory Properties: stable/10/ (props changed) stable/9/usr.bin/procstat/ (props changed) Modified: stable/8/usr.bin/procstat/procstat.1 ============================================================================== --- stable/8/usr.bin/procstat/procstat.1 Fri Jun 27 19:11:32 2014 (r267975) +++ stable/8/usr.bin/procstat/procstat.1 Fri Jun 27 19:50:30 2014 (r267976) @@ -60,7 +60,7 @@ Display file descriptor information for .It Fl i Display signal pending and disposition information for the process. .It Fl j -Display signal pending and blocked information for the process threads. +Display signal pending and blocked information for the process's threads. .It Fl k Display the stacks of kernel threads in the process, excluding stacks of threads currently running on a CPU and threads with stacks swapped to disk. @@ -231,15 +231,15 @@ If .Fl n switch is given, the signal numbers are shown instead of signal names. .Ss Thread Signal Information -Display signal pending and blocked for a process threads: +Display signal pending and blocked for a process's threads: .Pp .Bl -tag -width ident -compact .It PID process ID -.It COMM -command .It TID thread ID +.It COMM +command .It SIG signal name .It FLAGS @@ -256,7 +256,7 @@ The .Fl n switch has the same effect as for the .Fl i -switch, the signals numbers are shown instead of signal names. +switch: the signal numbers are shown instead of signal names. .Ss Kernel Thread Stacks Display kernel thread stacks for a process, allowing further interpretation of thread wait channels. From owner-svn-src-stable@FreeBSD.ORG Fri Jun 27 19:50:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB57DD91; Fri, 27 Jun 2014 19:50:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE03825F5; Fri, 27 Jun 2014 19:50:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5RJoVIS069858; Fri, 27 Jun 2014 19:50:31 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5RJoVn3069857; Fri, 27 Jun 2014 19:50:31 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406271950.s5RJoVn3069857@svn.freebsd.org> From: John Baldwin Date: Fri, 27 Jun 2014 19:50:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267976 - in stable: 10/usr.bin/procstat 8/usr.bin/procstat 9/usr.bin/procstat X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jun 2014 19:50:32 -0000 Author: jhb Date: Fri Jun 27 19:50:30 2014 New Revision: 267976 URL: http://svnweb.freebsd.org/changeset/base/267976 Log: MFC 266296: Correct some minor nits in the per-thread signal format description such as missing posessives and misordering of fields. Modified: stable/9/usr.bin/procstat/procstat.1 Directory Properties: stable/9/usr.bin/procstat/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.bin/procstat/procstat.1 stable/8/usr.bin/procstat/procstat.1 Directory Properties: stable/10/ (props changed) stable/8/usr.bin/procstat/ (props changed) Modified: stable/9/usr.bin/procstat/procstat.1 ============================================================================== --- stable/9/usr.bin/procstat/procstat.1 Fri Jun 27 19:11:32 2014 (r267975) +++ stable/9/usr.bin/procstat/procstat.1 Fri Jun 27 19:50:30 2014 (r267976) @@ -65,7 +65,7 @@ Display file descriptor information for .It Fl i Display signal pending and disposition information for the process. .It Fl j -Display signal pending and blocked information for the process threads. +Display signal pending and blocked information for the process's threads. .It Fl k Display the stacks of kernel threads in the process, excluding stacks of threads currently running on a CPU and threads with stacks swapped to disk. @@ -262,15 +262,15 @@ If .Fl n switch is given, the signal numbers are shown instead of signal names. .Ss Thread Signal Information -Display signal pending and blocked for a process threads: +Display signal pending and blocked for a process's threads: .Pp .Bl -tag -width ident -compact .It PID process ID -.It COMM -command .It TID thread ID +.It COMM +command .It SIG signal name .It FLAGS @@ -287,7 +287,7 @@ The .Fl n switch has the same effect as for the .Fl i -switch, the signals numbers are shown instead of signal names. +switch: the signal numbers are shown instead of signal names. .Ss Kernel Thread Stacks Display kernel thread stacks for a process, allowing further interpretation of thread wait channels. From owner-svn-src-stable@FreeBSD.ORG Fri Jun 27 20:34:23 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8DED93C1; Fri, 27 Jun 2014 20:34:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6EFB629D2; Fri, 27 Jun 2014 20:34:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5RKYN9q093116; Fri, 27 Jun 2014 20:34:23 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5RKYMca093108; Fri, 27 Jun 2014 20:34:22 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406272034.s5RKYMca093108@svn.freebsd.org> From: John Baldwin Date: Fri, 27 Jun 2014 20:34:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267979 - in stable: 10/usr.bin/procstat 9/usr.bin/procstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jun 2014 20:34:23 -0000 Author: jhb Date: Fri Jun 27 20:34:22 2014 New Revision: 267979 URL: http://svnweb.freebsd.org/changeset/base/267979 Log: MFC 266293: - Add support for dumping current resource usage for processes via a new -r flag to procstat. - Add an -H flag to request information about threads rather than processes when dumping statistics. Currently it is only used for -r to display resource usage for individual threads instead of the entire process. Added: stable/10/usr.bin/procstat/procstat_rusage.c - copied unchanged from r266293, head/usr.bin/procstat/procstat_rusage.c Modified: stable/10/usr.bin/procstat/Makefile stable/10/usr.bin/procstat/procstat.1 stable/10/usr.bin/procstat/procstat.c stable/10/usr.bin/procstat/procstat.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Added: stable/9/usr.bin/procstat/procstat_rusage.c - copied unchanged from r266293, head/usr.bin/procstat/procstat_rusage.c Modified: stable/9/usr.bin/procstat/Makefile stable/9/usr.bin/procstat/procstat.1 stable/9/usr.bin/procstat/procstat.c stable/9/usr.bin/procstat/procstat.h Directory Properties: stable/9/usr.bin/procstat/ (props changed) Modified: stable/10/usr.bin/procstat/Makefile ============================================================================== --- stable/10/usr.bin/procstat/Makefile Fri Jun 27 19:57:57 2014 (r267978) +++ stable/10/usr.bin/procstat/Makefile Fri Jun 27 20:34:22 2014 (r267979) @@ -11,6 +11,7 @@ SRCS= procstat.c \ procstat_files.c \ procstat_kstack.c \ procstat_rlimit.c \ + procstat_rusage.c \ procstat_sigs.c \ procstat_threads.c \ procstat_vm.c Modified: stable/10/usr.bin/procstat/procstat.1 ============================================================================== --- stable/10/usr.bin/procstat/procstat.1 Fri Jun 27 19:57:57 2014 (r267978) +++ stable/10/usr.bin/procstat/procstat.1 Fri Jun 27 20:34:22 2014 (r267979) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 11, 2014 +.Dd May 16, 2014 .Dt PROCSTAT 1 .Os .Sh NAME @@ -33,11 +33,9 @@ .Nd get detailed process information .Sh SYNOPSIS .Nm -.Op Fl h -.Op Fl n -.Op Fl C +.Op Fl CHhn .Op Fl w Ar interval -.Op Fl b | c | e | f | i | j | k | l | s | t | v | x +.Op Fl b | c | e | f | i | j | k | l | r | s | t | v | x .Op Fl a | Ar pid | Ar core ... .Sh DESCRIPTION The @@ -73,6 +71,8 @@ If the flag is repeated, function offset printed. .It Fl l Display resource limits for the process. +.It Fl r +Display resource usage information for the process. .It Fl s Display security credential information for the process. .It Fl t @@ -102,6 +102,13 @@ The flag requests the printing of additional capability information in the file descriptor view. .Pp +The +.Fl H +flag may be used to request per-thread statistics rather than per-process +statistics for some options. +For those options, the second field in the table will list the thread ID +to which the row of information corresponds. +.Pp Some information, such as VM and file descriptor information, is available only to the owner of a process or the superuser. .Ss Binary Information Modified: stable/10/usr.bin/procstat/procstat.c ============================================================================== --- stable/10/usr.bin/procstat/procstat.c Fri Jun 27 19:57:57 2014 (r267978) +++ stable/10/usr.bin/procstat/procstat.c Fri Jun 27 20:34:22 2014 (r267979) @@ -39,18 +39,19 @@ #include "procstat.h" -static int aflag, bflag, cflag, eflag, fflag, iflag, jflag, kflag, lflag, sflag; -static int tflag, vflag, xflag; -int hflag, nflag, Cflag; +static int aflag, bflag, cflag, eflag, fflag, iflag, jflag, kflag, lflag, rflag; +static int sflag, tflag, vflag, xflag; +int hflag, nflag, Cflag, Hflag; static void usage(void) { - fprintf(stderr, "usage: procstat [-h] [-C] [-M core] [-N system] " + fprintf(stderr, "usage: procstat [-CHhn] [-M core] [-N system] " "[-w interval] \n"); fprintf(stderr, " [-b | -c | -e | -f | -i | -j | -k | " - "-l | -s | -t | -v | -x] [-a | pid | core ...]\n"); + "-l | -r | -s | -t | -v | -x]\n"); + fprintf(stderr, " [-a | pid | core ...]\n"); exit(EX_USAGE); } @@ -74,6 +75,8 @@ procstat(struct procstat *prstat, struct procstat_kstack(prstat, kipp, kflag); else if (lflag) procstat_rlimit(prstat, kipp); + else if (rflag) + procstat_rusage(prstat, kipp); else if (sflag) procstat_cred(prstat, kipp); else if (tflag) @@ -125,12 +128,16 @@ main(int argc, char *argv[]) interval = 0; memf = nlistf = NULL; - while ((ch = getopt(argc, argv, "CN:M:abcefijklhstvw:x")) != -1) { + while ((ch = getopt(argc, argv, "CHN:M:abcefijklhrstvw:x")) != -1) { switch (ch) { case 'C': Cflag++; break; + case 'H': + Hflag++; + break; + case 'M': memf = optarg; break; @@ -181,6 +188,10 @@ main(int argc, char *argv[]) hflag++; break; + case 'r': + rflag++; + break; + case 's': sflag++; break; @@ -217,7 +228,7 @@ main(int argc, char *argv[]) /* We require that either 0 or 1 mode flags be set. */ tmp = bflag + cflag + eflag + fflag + iflag + jflag + (kflag ? 1 : 0) + - lflag + sflag + tflag + vflag + xflag; + lflag + rflag + sflag + tflag + vflag + xflag; if (!(tmp == 0 || tmp == 1)) usage(); Modified: stable/10/usr.bin/procstat/procstat.h ============================================================================== --- stable/10/usr.bin/procstat/procstat.h Fri Jun 27 19:57:57 2014 (r267978) +++ stable/10/usr.bin/procstat/procstat.h Fri Jun 27 20:34:22 2014 (r267979) @@ -29,7 +29,7 @@ #ifndef PROCSTAT_H #define PROCSTAT_H -extern int hflag, nflag, Cflag; +extern int hflag, nflag, Cflag, Hflag; struct kinfo_proc; void kinfo_proc_sort(struct kinfo_proc *kipp, int count); @@ -44,6 +44,7 @@ void procstat_files(struct procstat *prs void procstat_kstack(struct procstat *prstat, struct kinfo_proc *kipp, int kflag); void procstat_rlimit(struct procstat *prstat, struct kinfo_proc *kipp); +void procstat_rusage(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_sigs(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_threads(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_threads_sigs(struct procstat *prstat, struct kinfo_proc *kipp); Copied: stable/10/usr.bin/procstat/procstat_rusage.c (from r266293, head/usr.bin/procstat/procstat_rusage.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.bin/procstat/procstat_rusage.c Fri Jun 27 20:34:22 2014 (r267979, copy of r266293, head/usr.bin/procstat/procstat_rusage.c) @@ -0,0 +1,160 @@ +/*- + * Copyright (c) 2012 Advanced Computing Technologies LLC + * Written by: John H. Baldwin + * All rights reserved. + * + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include +#include +#include +#include + +#include "procstat.h" + +static struct { + const char *ri_name; + bool ri_humanize; + int ri_scale; +} rusage_info[] = { + { "maximum RSS", true, 1 }, + { "integral shared memory", true, 1 }, + { "integral unshared data", true, 1 }, + { "integral unshared stack", true, 1 }, + { "page reclaims", false, 0 }, + { "page faults", false, 0 }, + { "swaps", false, 0 }, + { "block reads", false, 0 }, + { "block writes", false, 0 }, + { "messages sent", false, 0 }, + { "messages received", false, 0 }, + { "signals received", false, 0 }, + { "voluntary context switches", false, 0 }, + { "involuntary context switches", false, 0 } +}; + +/* xxx days hh:mm:ss.uuuuuu */ +static const char * +format_time(struct timeval *tv) +{ + static char buffer[32]; + int days, hours, minutes, seconds, used; + + minutes = tv->tv_sec / 60; + seconds = tv->tv_sec % 60; + hours = minutes / 60; + minutes %= 60; + days = hours / 24; + hours %= 24; + used = 0; + if (days == 1) + used += snprintf(buffer, sizeof(buffer), "1 day "); + else if (days > 0) + used += snprintf(buffer, sizeof(buffer), "%u days ", days); + + snprintf(buffer + used, sizeof(buffer) - used, "%02u:%02u:%02u.%06u ", + hours, minutes, seconds, (unsigned int)tv->tv_usec); + return (buffer); +} + +static const char * +format_value(long value, bool humanize, int scale) +{ + static char buffer[14]; + + if (scale != 0) + value <<= scale * 10; + if (humanize) + humanize_number(buffer, sizeof(buffer), value, "B", + scale, HN_DECIMAL); + else + snprintf(buffer, sizeof(buffer), "%ld ", value); + return (buffer); +} + +static void +print_prefix(struct kinfo_proc *kipp) +{ + + printf("%5d ", kipp->ki_pid); + if (Hflag) + printf("%6d ", kipp->ki_tid); + printf("%-16s ", kipp->ki_comm); +} + +static void +print_rusage(struct kinfo_proc *kipp) +{ + long *lp; + unsigned int i; + + print_prefix(kipp); + printf("%-14s %32s\n", "user time", + format_time(&kipp->ki_rusage.ru_utime)); + print_prefix(kipp); + printf("%-14s %32s\n", "system time", + format_time(&kipp->ki_rusage.ru_stime)); + lp = &kipp->ki_rusage.ru_maxrss; + for (i = 0; i < nitems(rusage_info); i++) { + print_prefix(kipp); + printf("%-32s %14s\n", rusage_info[i].ri_name, + format_value(*lp, rusage_info[i].ri_humanize, + rusage_info[i].ri_scale)); + lp++; + } +} + +void +procstat_rusage(struct procstat *procstat, struct kinfo_proc *kipp) +{ + struct kinfo_proc *kip; + unsigned int count, i; + + if (!hflag) { + printf("%5s ", "PID"); + if (Hflag) + printf("%6s ", "TID"); + printf("%-16s %-32s %14s\n", "COMM", "TYPE", "VALUE "); + } + + if (!Hflag) { + print_rusage(kipp); + return; + } + + kip = procstat_getprocs(procstat, KERN_PROC_PID | KERN_PROC_INC_THREAD, + kipp->ki_pid, &count); + if (kip == NULL) + return; + kinfo_proc_sort(kip, count); + for (i = 0; i < count; i++) + print_rusage(&kip[i]); + procstat_freeprocs(procstat, kip); +} From owner-svn-src-stable@FreeBSD.ORG Fri Jun 27 20:34:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B61CD3C2; Fri, 27 Jun 2014 20:34:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9779B29D3; Fri, 27 Jun 2014 20:34:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5RKYOBx093129; Fri, 27 Jun 2014 20:34:24 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5RKYNjD093121; Fri, 27 Jun 2014 20:34:23 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406272034.s5RKYNjD093121@svn.freebsd.org> From: John Baldwin Date: Fri, 27 Jun 2014 20:34:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267979 - in stable: 10/usr.bin/procstat 9/usr.bin/procstat X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jun 2014 20:34:24 -0000 Author: jhb Date: Fri Jun 27 20:34:22 2014 New Revision: 267979 URL: http://svnweb.freebsd.org/changeset/base/267979 Log: MFC 266293: - Add support for dumping current resource usage for processes via a new -r flag to procstat. - Add an -H flag to request information about threads rather than processes when dumping statistics. Currently it is only used for -r to display resource usage for individual threads instead of the entire process. Added: stable/9/usr.bin/procstat/procstat_rusage.c - copied unchanged from r266293, head/usr.bin/procstat/procstat_rusage.c Modified: stable/9/usr.bin/procstat/Makefile stable/9/usr.bin/procstat/procstat.1 stable/9/usr.bin/procstat/procstat.c stable/9/usr.bin/procstat/procstat.h Directory Properties: stable/9/usr.bin/procstat/ (props changed) Changes in other areas also in this revision: Added: stable/10/usr.bin/procstat/procstat_rusage.c - copied unchanged from r266293, head/usr.bin/procstat/procstat_rusage.c Modified: stable/10/usr.bin/procstat/Makefile stable/10/usr.bin/procstat/procstat.1 stable/10/usr.bin/procstat/procstat.c stable/10/usr.bin/procstat/procstat.h Directory Properties: stable/10/ (props changed) Modified: stable/9/usr.bin/procstat/Makefile ============================================================================== --- stable/9/usr.bin/procstat/Makefile Fri Jun 27 19:57:57 2014 (r267978) +++ stable/9/usr.bin/procstat/Makefile Fri Jun 27 20:34:22 2014 (r267979) @@ -11,6 +11,7 @@ SRCS= procstat.c \ procstat_files.c \ procstat_kstack.c \ procstat_rlimit.c \ + procstat_rusage.c \ procstat_sigs.c \ procstat_threads.c \ procstat_vm.c Modified: stable/9/usr.bin/procstat/procstat.1 ============================================================================== --- stable/9/usr.bin/procstat/procstat.1 Fri Jun 27 19:57:57 2014 (r267978) +++ stable/9/usr.bin/procstat/procstat.1 Fri Jun 27 20:34:22 2014 (r267979) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 11, 2014 +.Dd May 16, 2014 .Dt PROCSTAT 1 .Os .Sh NAME @@ -33,11 +33,9 @@ .Nd get detailed process information .Sh SYNOPSIS .Nm -.Op Fl h -.Op Fl n -.Op Fl C +.Op Fl CHhn .Op Fl w Ar interval -.Op Fl b | c | e | f | i | j | k | l | s | t | v | x +.Op Fl b | c | e | f | i | j | k | l | r | s | t | v | x .Op Fl a | Ar pid | Ar core ... .Sh DESCRIPTION The @@ -73,6 +71,8 @@ If the flag is repeated, function offset printed. .It Fl l Display resource limits for the process. +.It Fl r +Display resource usage information for the process. .It Fl s Display security credential information for the process. .It Fl t @@ -102,6 +102,13 @@ The flag requests the printing of additional capability information in the file descriptor view. .Pp +The +.Fl H +flag may be used to request per-thread statistics rather than per-process +statistics for some options. +For those options, the second field in the table will list the thread ID +to which the row of information corresponds. +.Pp Some information, such as VM and file descriptor information, is available only to the owner of a process or the superuser. .Ss Binary Information Modified: stable/9/usr.bin/procstat/procstat.c ============================================================================== --- stable/9/usr.bin/procstat/procstat.c Fri Jun 27 19:57:57 2014 (r267978) +++ stable/9/usr.bin/procstat/procstat.c Fri Jun 27 20:34:22 2014 (r267979) @@ -39,18 +39,19 @@ #include "procstat.h" -static int aflag, bflag, cflag, eflag, fflag, iflag, jflag, kflag, lflag, sflag; -static int tflag, vflag, xflag; -int hflag, nflag, Cflag; +static int aflag, bflag, cflag, eflag, fflag, iflag, jflag, kflag, lflag, rflag; +static int sflag, tflag, vflag, xflag; +int hflag, nflag, Cflag, Hflag; static void usage(void) { - fprintf(stderr, "usage: procstat [-h] [-C] [-M core] [-N system] " + fprintf(stderr, "usage: procstat [-CHhn] [-M core] [-N system] " "[-w interval] \n"); fprintf(stderr, " [-b | -c | -e | -f | -i | -j | -k | " - "-l | -s | -t | -v | -x] [-a | pid | core ...]\n"); + "-l | -r | -s | -t | -v | -x]\n"); + fprintf(stderr, " [-a | pid | core ...]\n"); exit(EX_USAGE); } @@ -74,6 +75,8 @@ procstat(struct procstat *prstat, struct procstat_kstack(prstat, kipp, kflag); else if (lflag) procstat_rlimit(prstat, kipp); + else if (rflag) + procstat_rusage(prstat, kipp); else if (sflag) procstat_cred(prstat, kipp); else if (tflag) @@ -125,12 +128,16 @@ main(int argc, char *argv[]) interval = 0; memf = nlistf = NULL; - while ((ch = getopt(argc, argv, "CN:M:abcefijklhstvw:x")) != -1) { + while ((ch = getopt(argc, argv, "CHN:M:abcefijklhrstvw:x")) != -1) { switch (ch) { case 'C': Cflag++; break; + case 'H': + Hflag++; + break; + case 'M': memf = optarg; break; @@ -181,6 +188,10 @@ main(int argc, char *argv[]) hflag++; break; + case 'r': + rflag++; + break; + case 's': sflag++; break; @@ -217,7 +228,7 @@ main(int argc, char *argv[]) /* We require that either 0 or 1 mode flags be set. */ tmp = bflag + cflag + eflag + fflag + iflag + jflag + (kflag ? 1 : 0) + - lflag + sflag + tflag + vflag + xflag; + lflag + rflag + sflag + tflag + vflag + xflag; if (!(tmp == 0 || tmp == 1)) usage(); Modified: stable/9/usr.bin/procstat/procstat.h ============================================================================== --- stable/9/usr.bin/procstat/procstat.h Fri Jun 27 19:57:57 2014 (r267978) +++ stable/9/usr.bin/procstat/procstat.h Fri Jun 27 20:34:22 2014 (r267979) @@ -29,7 +29,7 @@ #ifndef PROCSTAT_H #define PROCSTAT_H -extern int hflag, nflag, Cflag; +extern int hflag, nflag, Cflag, Hflag; struct kinfo_proc; void kinfo_proc_sort(struct kinfo_proc *kipp, int count); @@ -44,6 +44,7 @@ void procstat_files(struct procstat *prs void procstat_kstack(struct procstat *prstat, struct kinfo_proc *kipp, int kflag); void procstat_rlimit(struct procstat *prstat, struct kinfo_proc *kipp); +void procstat_rusage(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_sigs(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_threads(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_threads_sigs(struct procstat *prstat, struct kinfo_proc *kipp); Copied: stable/9/usr.bin/procstat/procstat_rusage.c (from r266293, head/usr.bin/procstat/procstat_rusage.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/usr.bin/procstat/procstat_rusage.c Fri Jun 27 20:34:22 2014 (r267979, copy of r266293, head/usr.bin/procstat/procstat_rusage.c) @@ -0,0 +1,160 @@ +/*- + * Copyright (c) 2012 Advanced Computing Technologies LLC + * Written by: John H. Baldwin + * All rights reserved. + * + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include +#include +#include +#include + +#include "procstat.h" + +static struct { + const char *ri_name; + bool ri_humanize; + int ri_scale; +} rusage_info[] = { + { "maximum RSS", true, 1 }, + { "integral shared memory", true, 1 }, + { "integral unshared data", true, 1 }, + { "integral unshared stack", true, 1 }, + { "page reclaims", false, 0 }, + { "page faults", false, 0 }, + { "swaps", false, 0 }, + { "block reads", false, 0 }, + { "block writes", false, 0 }, + { "messages sent", false, 0 }, + { "messages received", false, 0 }, + { "signals received", false, 0 }, + { "voluntary context switches", false, 0 }, + { "involuntary context switches", false, 0 } +}; + +/* xxx days hh:mm:ss.uuuuuu */ +static const char * +format_time(struct timeval *tv) +{ + static char buffer[32]; + int days, hours, minutes, seconds, used; + + minutes = tv->tv_sec / 60; + seconds = tv->tv_sec % 60; + hours = minutes / 60; + minutes %= 60; + days = hours / 24; + hours %= 24; + used = 0; + if (days == 1) + used += snprintf(buffer, sizeof(buffer), "1 day "); + else if (days > 0) + used += snprintf(buffer, sizeof(buffer), "%u days ", days); + + snprintf(buffer + used, sizeof(buffer) - used, "%02u:%02u:%02u.%06u ", + hours, minutes, seconds, (unsigned int)tv->tv_usec); + return (buffer); +} + +static const char * +format_value(long value, bool humanize, int scale) +{ + static char buffer[14]; + + if (scale != 0) + value <<= scale * 10; + if (humanize) + humanize_number(buffer, sizeof(buffer), value, "B", + scale, HN_DECIMAL); + else + snprintf(buffer, sizeof(buffer), "%ld ", value); + return (buffer); +} + +static void +print_prefix(struct kinfo_proc *kipp) +{ + + printf("%5d ", kipp->ki_pid); + if (Hflag) + printf("%6d ", kipp->ki_tid); + printf("%-16s ", kipp->ki_comm); +} + +static void +print_rusage(struct kinfo_proc *kipp) +{ + long *lp; + unsigned int i; + + print_prefix(kipp); + printf("%-14s %32s\n", "user time", + format_time(&kipp->ki_rusage.ru_utime)); + print_prefix(kipp); + printf("%-14s %32s\n", "system time", + format_time(&kipp->ki_rusage.ru_stime)); + lp = &kipp->ki_rusage.ru_maxrss; + for (i = 0; i < nitems(rusage_info); i++) { + print_prefix(kipp); + printf("%-32s %14s\n", rusage_info[i].ri_name, + format_value(*lp, rusage_info[i].ri_humanize, + rusage_info[i].ri_scale)); + lp++; + } +} + +void +procstat_rusage(struct procstat *procstat, struct kinfo_proc *kipp) +{ + struct kinfo_proc *kip; + unsigned int count, i; + + if (!hflag) { + printf("%5s ", "PID"); + if (Hflag) + printf("%6s ", "TID"); + printf("%-16s %-32s %14s\n", "COMM", "TYPE", "VALUE "); + } + + if (!Hflag) { + print_rusage(kipp); + return; + } + + kip = procstat_getprocs(procstat, KERN_PROC_PID | KERN_PROC_INC_THREAD, + kipp->ki_pid, &count); + if (kip == NULL) + return; + kinfo_proc_sort(kip, count); + for (i = 0; i < count; i++) + print_rusage(&kip[i]); + procstat_freeprocs(procstat, kip); +} From owner-svn-src-stable@FreeBSD.ORG Fri Jun 27 20:39:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B9CCA08; Fri, 27 Jun 2014 20:39:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E3142A3B; Fri, 27 Jun 2014 20:39:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5RKdjGP093991; Fri, 27 Jun 2014 20:39:45 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5RKdjTI093989; Fri, 27 Jun 2014 20:39:45 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406272039.s5RKdjTI093989@svn.freebsd.org> From: John Baldwin Date: Fri, 27 Jun 2014 20:39:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267980 - in stable: 10/sys/libkern 9/sys/libkern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jun 2014 20:39:46 -0000 Author: jhb Date: Fri Jun 27 20:39:45 2014 New Revision: 267980 URL: http://svnweb.freebsd.org/changeset/base/267980 Log: MFC 267291: Use strcasecmp() instead of strcmp() when checking user-supplied encoding names so that encoding names are treated as case-insensitive. This allows the use of 'utf-8' instead of 'UTF-8' for example and matches the behavior of iconv(1). PR: 167977 Modified: stable/10/sys/libkern/iconv.c stable/10/sys/libkern/iconv_ucs.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/libkern/iconv.c stable/9/sys/libkern/iconv_ucs.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/libkern/iconv.c ============================================================================== --- stable/10/sys/libkern/iconv.c Fri Jun 27 20:34:22 2014 (r267979) +++ stable/10/sys/libkern/iconv.c Fri Jun 27 20:39:45 2014 (r267980) @@ -168,8 +168,8 @@ iconv_lookupcs(const char *to, const cha struct iconv_cspair *csp; TAILQ_FOREACH(csp, &iconv_cslist, cp_link) { - if (strcmp(csp->cp_to, to) == 0 && - strcmp(csp->cp_from, from) == 0) { + if (strcasecmp(csp->cp_to, to) == 0 && + strcasecmp(csp->cp_from, from) == 0) { if (cspp) *cspp = csp; return 0; Modified: stable/10/sys/libkern/iconv_ucs.c ============================================================================== --- stable/10/sys/libkern/iconv_ucs.c Fri Jun 27 20:34:22 2014 (r267979) +++ stable/10/sys/libkern/iconv_ucs.c Fri Jun 27 20:39:45 2014 (r267980) @@ -102,9 +102,9 @@ iconv_ucs_open(struct iconv_converter_cl if (cspf) dp->convtype |= KICONV_UCS_COMBINE; for (i = 0; unicode_family[i].name; i++) { - if (strcmp(from, unicode_family[i].name) == 0) + if (strcasecmp(from, unicode_family[i].name) == 0) dp->convtype |= unicode_family[i].from_flag; - if (strcmp(to, unicode_family[i].name) == 0) + if (strcasecmp(to, unicode_family[i].name) == 0) dp->convtype |= unicode_family[i].to_flag; } if (strcmp(ENCODING_UNICODE, ENCODING_UTF16) == 0) From owner-svn-src-stable@FreeBSD.ORG Fri Jun 27 20:39:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE580A09; Fri, 27 Jun 2014 20:39:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A129D2A3C; Fri, 27 Jun 2014 20:39:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5RKdkYM093998; Fri, 27 Jun 2014 20:39:46 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5RKdknv093996; Fri, 27 Jun 2014 20:39:46 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406272039.s5RKdknv093996@svn.freebsd.org> From: John Baldwin Date: Fri, 27 Jun 2014 20:39:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267980 - in stable: 10/sys/libkern 9/sys/libkern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jun 2014 20:39:46 -0000 Author: jhb Date: Fri Jun 27 20:39:45 2014 New Revision: 267980 URL: http://svnweb.freebsd.org/changeset/base/267980 Log: MFC 267291: Use strcasecmp() instead of strcmp() when checking user-supplied encoding names so that encoding names are treated as case-insensitive. This allows the use of 'utf-8' instead of 'UTF-8' for example and matches the behavior of iconv(1). PR: 167977 Modified: stable/9/sys/libkern/iconv.c stable/9/sys/libkern/iconv_ucs.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/libkern/iconv.c stable/10/sys/libkern/iconv_ucs.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/libkern/iconv.c ============================================================================== --- stable/9/sys/libkern/iconv.c Fri Jun 27 20:34:22 2014 (r267979) +++ stable/9/sys/libkern/iconv.c Fri Jun 27 20:39:45 2014 (r267980) @@ -167,8 +167,8 @@ iconv_lookupcs(const char *to, const cha struct iconv_cspair *csp; TAILQ_FOREACH(csp, &iconv_cslist, cp_link) { - if (strcmp(csp->cp_to, to) == 0 && - strcmp(csp->cp_from, from) == 0) { + if (strcasecmp(csp->cp_to, to) == 0 && + strcasecmp(csp->cp_from, from) == 0) { if (cspp) *cspp = csp; return 0; Modified: stable/9/sys/libkern/iconv_ucs.c ============================================================================== --- stable/9/sys/libkern/iconv_ucs.c Fri Jun 27 20:34:22 2014 (r267979) +++ stable/9/sys/libkern/iconv_ucs.c Fri Jun 27 20:39:45 2014 (r267980) @@ -102,9 +102,9 @@ iconv_ucs_open(struct iconv_converter_cl if (cspf) dp->convtype |= KICONV_UCS_COMBINE; for (i = 0; unicode_family[i].name; i++) { - if (strcmp(from, unicode_family[i].name) == 0) + if (strcasecmp(from, unicode_family[i].name) == 0) dp->convtype |= unicode_family[i].from_flag; - if (strcmp(to, unicode_family[i].name) == 0) + if (strcasecmp(to, unicode_family[i].name) == 0) dp->convtype |= unicode_family[i].to_flag; } if (strcmp(ENCODING_UNICODE, ENCODING_UTF16) == 0) From owner-svn-src-stable@FreeBSD.ORG Fri Jun 27 20:57:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A2B45FE; Fri, 27 Jun 2014 20:57:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 06B7F2C0E; Fri, 27 Jun 2014 20:57:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5RKvC2i003452; Fri, 27 Jun 2014 20:57:12 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5RKvCAD003451; Fri, 27 Jun 2014 20:57:12 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406272057.s5RKvCAD003451@svn.freebsd.org> From: John Baldwin Date: Fri, 27 Jun 2014 20:57:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267983 - in stable: 10/sys/dev/acpica 9/sys/dev/acpica X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jun 2014 20:57:13 -0000 Author: jhb Date: Fri Jun 27 20:57:12 2014 New Revision: 267983 URL: http://svnweb.freebsd.org/changeset/base/267983 Log: MFC 267647: Trust the state of a power resource that we get from a working _STA method instead of trying to cache it. Modified: stable/10/sys/dev/acpica/acpi_powerres.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/dev/acpica/acpi_powerres.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/10/sys/dev/acpica/acpi_powerres.c ============================================================================== --- stable/10/sys/dev/acpica/acpi_powerres.c Fri Jun 27 20:45:17 2014 (r267982) +++ stable/10/sys/dev/acpica/acpi_powerres.c Fri Jun 27 20:57:12 2014 (r267983) @@ -64,7 +64,6 @@ ACPI_MODULE_NAME("POWERRES") /* Return values from _STA on a power resource */ #define ACPI_PWR_OFF 0 #define ACPI_PWR_ON 1 -#define ACPI_PWR_UNK (-1) /* A relationship between a power resource and a consumer. */ struct acpi_powerreference { @@ -90,7 +89,6 @@ struct acpi_powerresource { ACPI_HANDLE ap_resource; UINT64 ap_systemlevel; UINT64 ap_order; - int ap_state; }; static TAILQ_HEAD(acpi_powerresource_list, acpi_powerresource) @@ -173,7 +171,6 @@ acpi_pwr_register_resource(ACPI_HANDLE r } rp->ap_systemlevel = obj->PowerResource.SystemLevel; rp->ap_order = obj->PowerResource.ResourceOrder; - rp->ap_state = ACPI_PWR_UNK; /* Sort the resource into the list */ status = AE_OK; @@ -638,22 +635,20 @@ acpi_pwr_switch_power(void) continue; } - /* We could cache this if we trusted it not to change under us */ status = acpi_GetInteger(rp->ap_resource, "_STA", &cur); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "can't get status of %s - %d\n", acpi_name(rp->ap_resource), status)); /* XXX is this correct? Always switch if in doubt? */ continue; - } else if (rp->ap_state == ACPI_PWR_UNK) - rp->ap_state = cur; + } /* * Switch if required. Note that we ignore the result of the switch * effort; we don't know what to do if it fails, so checking wouldn't * help much. */ - if (rp->ap_state != ACPI_PWR_ON) { + if (cur != ACPI_PWR_ON) { status = AcpiEvaluateObject(rp->ap_resource, "_ON", NULL, NULL); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, @@ -661,7 +656,6 @@ acpi_pwr_switch_power(void) acpi_name(rp->ap_resource), AcpiFormatException(status))); } else { - rp->ap_state = ACPI_PWR_ON; ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "switched %s on\n", acpi_name(rp->ap_resource))); } @@ -682,22 +676,20 @@ acpi_pwr_switch_power(void) continue; } - /* We could cache this if we trusted it not to change under us */ status = acpi_GetInteger(rp->ap_resource, "_STA", &cur); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "can't get status of %s - %d\n", acpi_name(rp->ap_resource), status)); /* XXX is this correct? Always switch if in doubt? */ continue; - } else if (rp->ap_state == ACPI_PWR_UNK) - rp->ap_state = cur; + } /* * Switch if required. Note that we ignore the result of the switch * effort; we don't know what to do if it fails, so checking wouldn't * help much. */ - if (rp->ap_state != ACPI_PWR_OFF) { + if (cur != ACPI_PWR_OFF) { status = AcpiEvaluateObject(rp->ap_resource, "_OFF", NULL, NULL); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, @@ -705,7 +697,6 @@ acpi_pwr_switch_power(void) acpi_name(rp->ap_resource), AcpiFormatException(status))); } else { - rp->ap_state = ACPI_PWR_OFF; ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "switched %s off\n", acpi_name(rp->ap_resource))); } From owner-svn-src-stable@FreeBSD.ORG Fri Jun 27 20:57:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6AA9B5FF; Fri, 27 Jun 2014 20:57:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5755D2C10; Fri, 27 Jun 2014 20:57:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5RKvDaT003458; Fri, 27 Jun 2014 20:57:13 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5RKvD3j003457; Fri, 27 Jun 2014 20:57:13 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406272057.s5RKvD3j003457@svn.freebsd.org> From: John Baldwin Date: Fri, 27 Jun 2014 20:57:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267983 - in stable: 10/sys/dev/acpica 9/sys/dev/acpica X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jun 2014 20:57:13 -0000 Author: jhb Date: Fri Jun 27 20:57:12 2014 New Revision: 267983 URL: http://svnweb.freebsd.org/changeset/base/267983 Log: MFC 267647: Trust the state of a power resource that we get from a working _STA method instead of trying to cache it. Modified: stable/9/sys/dev/acpica/acpi_powerres.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/acpica/acpi_powerres.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/dev/acpica/acpi_powerres.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_powerres.c Fri Jun 27 20:45:17 2014 (r267982) +++ stable/9/sys/dev/acpica/acpi_powerres.c Fri Jun 27 20:57:12 2014 (r267983) @@ -64,7 +64,6 @@ ACPI_MODULE_NAME("POWERRES") /* Return values from _STA on a power resource */ #define ACPI_PWR_OFF 0 #define ACPI_PWR_ON 1 -#define ACPI_PWR_UNK (-1) /* A relationship between a power resource and a consumer. */ struct acpi_powerreference { @@ -90,7 +89,6 @@ struct acpi_powerresource { ACPI_HANDLE ap_resource; UINT64 ap_systemlevel; UINT64 ap_order; - int ap_state; }; static TAILQ_HEAD(acpi_powerresource_list, acpi_powerresource) @@ -173,7 +171,6 @@ acpi_pwr_register_resource(ACPI_HANDLE r } rp->ap_systemlevel = obj->PowerResource.SystemLevel; rp->ap_order = obj->PowerResource.ResourceOrder; - rp->ap_state = ACPI_PWR_UNK; /* Sort the resource into the list */ status = AE_OK; @@ -638,22 +635,20 @@ acpi_pwr_switch_power(void) continue; } - /* We could cache this if we trusted it not to change under us */ status = acpi_GetInteger(rp->ap_resource, "_STA", &cur); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "can't get status of %s - %d\n", acpi_name(rp->ap_resource), status)); /* XXX is this correct? Always switch if in doubt? */ continue; - } else if (rp->ap_state == ACPI_PWR_UNK) - rp->ap_state = cur; + } /* * Switch if required. Note that we ignore the result of the switch * effort; we don't know what to do if it fails, so checking wouldn't * help much. */ - if (rp->ap_state != ACPI_PWR_ON) { + if (cur != ACPI_PWR_ON) { status = AcpiEvaluateObject(rp->ap_resource, "_ON", NULL, NULL); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, @@ -661,7 +656,6 @@ acpi_pwr_switch_power(void) acpi_name(rp->ap_resource), AcpiFormatException(status))); } else { - rp->ap_state = ACPI_PWR_ON; ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "switched %s on\n", acpi_name(rp->ap_resource))); } @@ -682,22 +676,20 @@ acpi_pwr_switch_power(void) continue; } - /* We could cache this if we trusted it not to change under us */ status = acpi_GetInteger(rp->ap_resource, "_STA", &cur); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "can't get status of %s - %d\n", acpi_name(rp->ap_resource), status)); /* XXX is this correct? Always switch if in doubt? */ continue; - } else if (rp->ap_state == ACPI_PWR_UNK) - rp->ap_state = cur; + } /* * Switch if required. Note that we ignore the result of the switch * effort; we don't know what to do if it fails, so checking wouldn't * help much. */ - if (rp->ap_state != ACPI_PWR_OFF) { + if (cur != ACPI_PWR_OFF) { status = AcpiEvaluateObject(rp->ap_resource, "_OFF", NULL, NULL); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, @@ -705,7 +697,6 @@ acpi_pwr_switch_power(void) acpi_name(rp->ap_resource), AcpiFormatException(status))); } else { - rp->ap_state = ACPI_PWR_OFF; ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "switched %s off\n", acpi_name(rp->ap_resource))); } From owner-svn-src-stable@FreeBSD.ORG Sun Jun 29 00:38:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23B994E6; Sun, 29 Jun 2014 00:38:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0EC27263E; Sun, 29 Jun 2014 00:38:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5T0c11u072835; Sun, 29 Jun 2014 00:38:01 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5T0c0TM072768; Sun, 29 Jun 2014 00:38:00 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201406290038.s5T0c0TM072768@svn.freebsd.org> From: Bryan Venteicher Date: Sun, 29 Jun 2014 00:38:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268010 - in stable/10/sys/dev/virtio: . network pci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jun 2014 00:38:02 -0000 Author: bryanv Date: Sun Jun 29 00:37:59 2014 New Revision: 268010 URL: http://svnweb.freebsd.org/changeset/base/268010 Log: MFC r267520, r267521, r267522, r267523, r267524: - Remove two write-only local variables - Remove unused element in the vtnet_rxq structure - Remove kernel specific macro out of the VirtIO PCI header file - Move the VIRTIO_RING_F_* defines out of virtqueue.h into virtio_config.h - Make the feature negotiation code easier to follow - Force two byte alignment for all control message headers Modified: stable/10/sys/dev/virtio/network/if_vtnet.c stable/10/sys/dev/virtio/network/if_vtnetvar.h stable/10/sys/dev/virtio/pci/virtio_pci.c stable/10/sys/dev/virtio/pci/virtio_pci.h stable/10/sys/dev/virtio/virtio.h stable/10/sys/dev/virtio/virtio_config.h stable/10/sys/dev/virtio/virtqueue.c stable/10/sys/dev/virtio/virtqueue.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- stable/10/sys/dev/virtio/network/if_vtnet.c Sat Jun 28 23:20:24 2014 (r268009) +++ stable/10/sys/dev/virtio/network/if_vtnet.c Sun Jun 29 00:37:59 2014 (r268010) @@ -550,37 +550,38 @@ vtnet_negotiate_features(struct vtnet_so mask |= VTNET_TSO_FEATURES; if (vtnet_tunable_int(sc, "lro_disable", vtnet_lro_disable)) mask |= VTNET_LRO_FEATURES; +#ifndef VTNET_LEGACY_TX if (vtnet_tunable_int(sc, "mq_disable", vtnet_mq_disable)) mask |= VIRTIO_NET_F_MQ; -#ifdef VTNET_LEGACY_TX +#else mask |= VIRTIO_NET_F_MQ; #endif features = VTNET_FEATURES & ~mask; sc->vtnet_features = virtio_negotiate_features(dev, features); - if (virtio_with_feature(dev, VTNET_LRO_FEATURES) == 0) - return; - if (virtio_with_feature(dev, VIRTIO_NET_F_MRG_RXBUF)) - return; - - /* - * LRO without mergeable buffers requires special care. This is not - * ideal because every receive buffer must be large enough to hold - * the maximum TCP packet, the Ethernet header, and the header. This - * requires up to 34 descriptors with MCLBYTES clusters. If we do - * not have indirect descriptors, LRO is disabled since the virtqueue - * will not contain very many receive buffers. - */ - if (virtio_with_feature(dev, VIRTIO_RING_F_INDIRECT_DESC) == 0) { - device_printf(dev, - "LRO disabled due to both mergeable buffers and indirect " - "descriptors not negotiated\n"); + if (virtio_with_feature(dev, VTNET_LRO_FEATURES) && + virtio_with_feature(dev, VIRTIO_NET_F_MRG_RXBUF) == 0) { + /* + * LRO without mergeable buffers requires special care. This + * is not ideal because every receive buffer must be large + * enough to hold the maximum TCP packet, the Ethernet header, + * and the header. This requires up to 34 descriptors with + * MCLBYTES clusters. If we do not have indirect descriptors, + * LRO is disabled since the virtqueue will not contain very + * many receive buffers. + */ + if (!virtio_with_feature(dev, VIRTIO_RING_F_INDIRECT_DESC)) { + device_printf(dev, + "LRO disabled due to both mergeable buffers and " + "indirect descriptors not negotiated\n"); - features &= ~VTNET_LRO_FEATURES; - sc->vtnet_features = virtio_negotiate_features(dev, features); - } else - sc->vtnet_flags |= VTNET_FLAG_LRO_NOMRG; + features &= ~VTNET_LRO_FEATURES; + sc->vtnet_features = + virtio_negotiate_features(dev, features); + } else + sc->vtnet_flags |= VTNET_FLAG_LRO_NOMRG; + } } static void @@ -2111,13 +2112,11 @@ fail: static int vtnet_txq_encap(struct vtnet_txq *txq, struct mbuf **m_head) { - struct vtnet_softc *sc; struct vtnet_tx_header *txhdr; struct virtio_net_hdr *hdr; struct mbuf *m; int error; - sc = txq->vtntx_sc; m = *m_head; M_ASSERTPKTHDR(m); @@ -2944,11 +2943,9 @@ vtnet_set_active_vq_pairs(struct vtnet_s static int vtnet_reinit(struct vtnet_softc *sc) { - device_t dev; struct ifnet *ifp; int error; - dev = sc->vtnet_dev; ifp = sc->vtnet_ifp; /* Use the current MAC address. */ @@ -3069,7 +3066,7 @@ vtnet_exec_ctrl_cmd(struct vtnet_softc * static int vtnet_ctrl_mac_cmd(struct vtnet_softc *sc, uint8_t *hwaddr) { - struct virtio_net_ctrl_hdr hdr; + struct virtio_net_ctrl_hdr hdr __aligned(2); struct sglist_seg segs[3]; struct sglist sg; uint8_t ack; @@ -3103,7 +3100,7 @@ vtnet_ctrl_mq_cmd(struct vtnet_softc *sc struct virtio_net_ctrl_mq mq; uint8_t pad2; uint8_t ack; - } s; + } s __aligned(2); int error; s.hdr.class = VIRTIO_NET_CTRL_MQ; @@ -3135,7 +3132,7 @@ vtnet_ctrl_rx_cmd(struct vtnet_softc *sc uint8_t onoff; uint8_t pad2; uint8_t ack; - } s; + } s __aligned(2); int error; KASSERT(sc->vtnet_flags & VTNET_FLAG_CTRL_RX, @@ -3218,7 +3215,7 @@ vtnet_rx_filter(struct vtnet_softc *sc) static void vtnet_rx_filter_mac(struct vtnet_softc *sc) { - struct virtio_net_ctrl_hdr hdr; + struct virtio_net_ctrl_hdr hdr __aligned(2); struct vtnet_mac_filter *filter; struct sglist_seg segs[4]; struct sglist sg; @@ -3331,7 +3328,7 @@ vtnet_exec_vlan_filter(struct vtnet_soft uint16_t tag; uint8_t pad2; uint8_t ack; - } s; + } s __aligned(2); int error; s.hdr.class = VIRTIO_NET_CTRL_VLAN; Modified: stable/10/sys/dev/virtio/network/if_vtnetvar.h ============================================================================== --- stable/10/sys/dev/virtio/network/if_vtnetvar.h Sat Jun 28 23:20:24 2014 (r268009) +++ stable/10/sys/dev/virtio/network/if_vtnetvar.h Sun Jun 29 00:37:59 2014 (r268010) @@ -74,7 +74,6 @@ struct vtnet_rxq { struct virtqueue *vtnrx_vq; struct sglist *vtnrx_sg; int vtnrx_id; - int vtnrx_process_limit; struct vtnet_rxq_stats vtnrx_stats; struct taskqueue *vtnrx_tq; struct task vtnrx_intrtask; Modified: stable/10/sys/dev/virtio/pci/virtio_pci.c ============================================================================== --- stable/10/sys/dev/virtio/pci/virtio_pci.c Sat Jun 28 23:20:24 2014 (r268009) +++ stable/10/sys/dev/virtio/pci/virtio_pci.c Sun Jun 29 00:37:59 2014 (r268010) @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -170,6 +169,9 @@ static void vtpci_config_intr(void *); #define vtpci_setup_msi_interrupt vtpci_setup_legacy_interrupt +#define VIRTIO_PCI_CONFIG(_sc) \ + VIRTIO_PCI_CONFIG_OFF((((_sc)->vtpci_flags & VTPCI_FLAG_MSIX)) != 0) + /* * I/O port read/write wrappers. */ Modified: stable/10/sys/dev/virtio/pci/virtio_pci.h ============================================================================== --- stable/10/sys/dev/virtio/pci/virtio_pci.h Sat Jun 28 23:20:24 2014 (r268009) +++ stable/10/sys/dev/virtio/pci/virtio_pci.h Sun Jun 29 00:37:59 2014 (r268010) @@ -72,8 +72,7 @@ * The remaining space is defined by each driver as the per-driver * configuration space. */ -#define VIRTIO_PCI_CONFIG(sc) \ - (((sc)->vtpci_flags & VTPCI_FLAG_MSIX) ? 24 : 20) +#define VIRTIO_PCI_CONFIG_OFF(msix_enabled) ((msix_enabled) ? 24 : 20) /* * How many bits to shift physical queue address written to QUEUE_PFN. Modified: stable/10/sys/dev/virtio/virtio.h ============================================================================== --- stable/10/sys/dev/virtio/virtio.h Sat Jun 28 23:20:24 2014 (r268009) +++ stable/10/sys/dev/virtio/virtio.h Sun Jun 29 00:37:59 2014 (r268010) @@ -30,6 +30,7 @@ #define _VIRTIO_H_ #include +#include struct vq_alloc_info; Modified: stable/10/sys/dev/virtio/virtio_config.h ============================================================================== --- stable/10/sys/dev/virtio/virtio_config.h Sat Jun 28 23:20:24 2014 (r268009) +++ stable/10/sys/dev/virtio/virtio_config.h Sun Jun 29 00:37:59 2014 (r268010) @@ -44,6 +44,12 @@ */ #define VIRTIO_F_NOTIFY_ON_EMPTY (1 << 24) +/* Support for indirect buffer descriptors. */ +#define VIRTIO_RING_F_INDIRECT_DESC (1 << 28) + +/* Support to suppress interrupt until specific index is reached. */ +#define VIRTIO_RING_F_EVENT_IDX (1 << 29) + /* * The guest should never negotiate this feature; it * is used to detect faulty drivers. Modified: stable/10/sys/dev/virtio/virtqueue.c ============================================================================== --- stable/10/sys/dev/virtio/virtqueue.c Sat Jun 28 23:20:24 2014 (r268009) +++ stable/10/sys/dev/virtio/virtqueue.c Sun Jun 29 00:37:59 2014 (r268010) @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: stable/10/sys/dev/virtio/virtqueue.h ============================================================================== --- stable/10/sys/dev/virtio/virtqueue.h Sat Jun 28 23:20:24 2014 (r268009) +++ stable/10/sys/dev/virtio/virtqueue.h Sun Jun 29 00:37:59 2014 (r268010) @@ -32,12 +32,6 @@ struct virtqueue; struct sglist; -/* Support for indirect buffer descriptors. */ -#define VIRTIO_RING_F_INDIRECT_DESC (1 << 28) - -/* Support to suppress interrupt until specific index is reached. */ -#define VIRTIO_RING_F_EVENT_IDX (1 << 29) - /* Device callback for a virtqueue interrupt. */ typedef void virtqueue_intr_t(void *); From owner-svn-src-stable@FreeBSD.ORG Sun Jun 29 00:50:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 56B436D2; Sun, 29 Jun 2014 00:50:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 435A226E2; Sun, 29 Jun 2014 00:50:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5T0ovDl077886; Sun, 29 Jun 2014 00:50:57 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5T0ou1s077883; Sun, 29 Jun 2014 00:50:56 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201406290050.s5T0ou1s077883@svn.freebsd.org> From: Bryan Venteicher Date: Sun, 29 Jun 2014 00:50:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268011 - stable/10/sys/dev/vmware/vmxnet3 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jun 2014 00:50:57 -0000 Author: bryanv Date: Sun Jun 29 00:50:56 2014 New Revision: 268011 URL: http://svnweb.freebsd.org/changeset/base/268011 Log: MFC r267661, r267662, r267663: - Remove an unnecessary kick of the host at the end of transmitting - Handle multiple calls to rxq_eof for single packet completion - Increment the pending packets more aggressively for TSO Modified: stable/10/sys/dev/vmware/vmxnet3/if_vmx.c stable/10/sys/dev/vmware/vmxnet3/if_vmxvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vmware/vmxnet3/if_vmx.c ============================================================================== --- stable/10/sys/dev/vmware/vmxnet3/if_vmx.c Sun Jun 29 00:37:59 2014 (r268010) +++ stable/10/sys/dev/vmware/vmxnet3/if_vmx.c Sun Jun 29 00:50:56 2014 (r268011) @@ -166,7 +166,6 @@ static int vmxnet3_txq_load_mbuf(struct bus_dmamap_t, bus_dma_segment_t [], int *); static void vmxnet3_txq_unload_mbuf(struct vmxnet3_txqueue *, bus_dmamap_t); static int vmxnet3_txq_encap(struct vmxnet3_txqueue *, struct mbuf **); -static void vmxnet3_txq_update_pending(struct vmxnet3_txqueue *); #ifdef VMXNET3_LEGACY_TX static void vmxnet3_start_locked(struct ifnet *); static void vmxnet3_start(struct ifnet *); @@ -2086,17 +2085,25 @@ vmxnet3_rxq_eof(struct vmxnet3_rxqueue * sc = rxq->vxrxq_sc; ifp = sc->vmx_ifp; rxc = &rxq->vxrxq_comp_ring; - m_head = m_tail = NULL; VMXNET3_RXQ_LOCK_ASSERT(rxq); if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) return; + m_head = rxq->vxrxq_mhead; + rxq->vxrxq_mhead = NULL; + m_tail = rxq->vxrxq_mtail; + rxq->vxrxq_mtail = NULL; + MPASS(m_head == NULL || m_tail != NULL); + for (;;) { rxcd = &rxc->vxcr_u.rxcd[rxc->vxcr_next]; - if (rxcd->gen != rxc->vxcr_gen) + if (rxcd->gen != rxc->vxcr_gen) { + rxq->vxrxq_mhead = m_head; + rxq->vxrxq_mtail = m_tail; break; + } vmxnet3_barrier(sc, VMXNET3_BARRIER_RD); if (++rxc->vxcr_next == rxc->vxcr_ndesc) { @@ -2328,6 +2335,12 @@ vmxnet3_rxstop(struct vmxnet3_softc *sc, struct vmxnet3_rxbuf *rxb; int i, j; + if (rxq->vxrxq_mhead != NULL) { + m_freem(rxq->vxrxq_mhead); + rxq->vxrxq_mhead = NULL; + rxq->vxrxq_mtail = NULL; + } + for (i = 0; i < VMXNET3_RXRINGS_PERQ; i++) { rxr = &rxq->vxrxq_cmd_ring[i]; @@ -2839,7 +2852,8 @@ vmxnet3_txq_encap(struct vmxnet3_txqueue vmxnet3_barrier(sc, VMXNET3_BARRIER_WR); sop->gen ^= 1; - if (++txq->vxtxq_ts->npending >= txq->vxtxq_ts->intr_threshold) { + txq->vxtxq_ts->npending += nsegs; + if (txq->vxtxq_ts->npending >= txq->vxtxq_ts->intr_threshold) { txq->vxtxq_ts->npending = 0; vmxnet3_write_bar0(sc, VMXNET3_BAR0_TXH(txq->vxtxq_id), txr->vxtxr_head); @@ -2848,20 +2862,6 @@ vmxnet3_txq_encap(struct vmxnet3_txqueue return (0); } -static void -vmxnet3_txq_update_pending(struct vmxnet3_txqueue *txq) -{ - struct vmxnet3_txring *txr; - - txr = &txq->vxtxq_cmd_ring; - - if (txq->vxtxq_ts->npending > 0) { - txq->vxtxq_ts->npending = 0; - vmxnet3_write_bar0(txq->vxtxq_sc, - VMXNET3_BAR0_TXH(txq->vxtxq_id), txr->vxtxr_head); - } -} - #ifdef VMXNET3_LEGACY_TX static void @@ -2908,10 +2908,8 @@ vmxnet3_start_locked(struct ifnet *ifp) ETHER_BPF_MTAP(ifp, m_head); } - if (tx > 0) { - vmxnet3_txq_update_pending(txq); + if (tx > 0) txq->vxtxq_watchdog = VMXNET3_WATCHDOG_TIMEOUT; - } } static void @@ -2972,8 +2970,7 @@ vmxnet3_txq_mq_start_locked(struct vmxne break; } - error = vmxnet3_txq_encap(txq, &m); - if (error) { + if (vmxnet3_txq_encap(txq, &m) != 0) { if (m != NULL) drbr_putback(ifp, br, m); else @@ -2986,10 +2983,8 @@ vmxnet3_txq_mq_start_locked(struct vmxne ETHER_BPF_MTAP(ifp, m); } - if (tx > 0) { - vmxnet3_txq_update_pending(txq); + if (tx > 0) txq->vxtxq_watchdog = VMXNET3_WATCHDOG_TIMEOUT; - } return (0); } Modified: stable/10/sys/dev/vmware/vmxnet3/if_vmxvar.h ============================================================================== --- stable/10/sys/dev/vmware/vmxnet3/if_vmxvar.h Sun Jun 29 00:37:59 2014 (r268010) +++ stable/10/sys/dev/vmware/vmxnet3/if_vmxvar.h Sun Jun 29 00:50:56 2014 (r268011) @@ -168,6 +168,8 @@ struct vmxnet3_rxqueue { struct vmxnet3_softc *vxrxq_sc; int vxrxq_id; int vxrxq_intr_idx; + struct mbuf *vxrxq_mhead; + struct mbuf *vxrxq_mtail; struct vmxnet3_rxring vxrxq_cmd_ring[VMXNET3_RXRINGS_PERQ]; struct vmxnet3_comp_ring vxrxq_comp_ring; struct vmxnet3_rxq_stats vxrxq_stats; From owner-svn-src-stable@FreeBSD.ORG Sun Jun 29 07:02:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE85D663; Sun, 29 Jun 2014 07:02:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFEDD2F07; Sun, 29 Jun 2014 07:02:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5T72lnd048777; Sun, 29 Jun 2014 07:02:47 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5T72lsU048775; Sun, 29 Jun 2014 07:02:47 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201406290702.s5T72lsU048775@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 29 Jun 2014 07:02:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268015 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jun 2014 07:02:48 -0000 Author: kib Date: Sun Jun 29 07:02:47 2014 New Revision: 268015 URL: http://svnweb.freebsd.org/changeset/base/268015 Log: MFC r267491: Use vn_io_fault for the writes from core dumping code. Modified: stable/10/sys/kern/vfs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/vfs_vnops.c ============================================================================== --- stable/10/sys/kern/vfs_vnops.c Sun Jun 29 02:28:05 2014 (r268014) +++ stable/10/sys/kern/vfs_vnops.c Sun Jun 29 07:02:47 2014 (r268015) @@ -8,7 +8,7 @@ * the permission of UNIX System Laboratories, Inc. * * Copyright (c) 2012 Konstantin Belousov - * Copyright (c) 2013 The FreeBSD Foundation + * Copyright (c) 2013, 2014 The FreeBSD Foundation * * Portions of this software were developed by Konstantin Belousov * under sponsorship from the FreeBSD Foundation. @@ -106,6 +106,53 @@ struct fileops vnops = { .fo_flags = DFLAG_PASSABLE | DFLAG_SEEKABLE }; +static const int io_hold_cnt = 16; +static int vn_io_fault_enable = 1; +SYSCTL_INT(_debug, OID_AUTO, vn_io_fault_enable, CTLFLAG_RW, + &vn_io_fault_enable, 0, "Enable vn_io_fault lock avoidance"); +static u_long vn_io_faults_cnt; +SYSCTL_ULONG(_debug, OID_AUTO, vn_io_faults, CTLFLAG_RD, + &vn_io_faults_cnt, 0, "Count of vn_io_fault lock avoidance triggers"); + +/* + * Returns true if vn_io_fault mode of handling the i/o request should + * be used. + */ +static bool +do_vn_io_fault(struct vnode *vp, struct uio *uio) +{ + struct mount *mp; + + return (uio->uio_segflg == UIO_USERSPACE && vp->v_type == VREG && + (mp = vp->v_mount) != NULL && + (mp->mnt_kern_flag & MNTK_NO_IOPF) != 0 && vn_io_fault_enable); +} + +/* + * Structure used to pass arguments to vn_io_fault1(), to do either + * file- or vnode-based I/O calls. + */ +struct vn_io_fault_args { + enum { + VN_IO_FAULT_FOP, + VN_IO_FAULT_VOP + } kind; + struct ucred *cred; + int flags; + union { + struct fop_args_tag { + struct file *fp; + fo_rdwr_t *doio; + } fop_args; + struct vop_args_tag { + struct vnode *vp; + } vop_args; + } args; +}; + +static int vn_io_fault1(struct vnode *vp, struct uio *uio, + struct vn_io_fault_args *args, struct thread *td); + int vn_open(ndp, flagp, cmode, fp) struct nameidata *ndp; @@ -439,6 +486,7 @@ vn_rdwr(enum uio_rw rw, struct vnode *vp struct mount *mp; struct ucred *cred; void *rl_cookie; + struct vn_io_fault_args args; int error, lock_flags; auio.uio_iov = &aiov; @@ -493,10 +541,17 @@ vn_rdwr(enum uio_rw rw, struct vnode *vp cred = file_cred; else cred = active_cred; - if (rw == UIO_READ) + if (do_vn_io_fault(vp, &auio)) { + args.kind = VN_IO_FAULT_VOP; + args.cred = cred; + args.flags = ioflg; + args.args.vop_args.vp = vp; + error = vn_io_fault1(vp, &auio, &args, td); + } else if (rw == UIO_READ) { error = VOP_READ(vp, &auio, ioflg, cred); - else + } else /* if (rw == UIO_WRITE) */ { error = VOP_WRITE(vp, &auio, ioflg, cred); + } } if (aresid) *aresid = auio.uio_resid; @@ -883,14 +938,6 @@ unlock: return (error); } -static const int io_hold_cnt = 16; -static int vn_io_fault_enable = 1; -SYSCTL_INT(_debug, OID_AUTO, vn_io_fault_enable, CTLFLAG_RW, - &vn_io_fault_enable, 0, "Enable vn_io_fault lock avoidance"); -static u_long vn_io_faults_cnt; -SYSCTL_ULONG(_debug, OID_AUTO, vn_io_faults, CTLFLAG_RD, - &vn_io_faults_cnt, 0, "Count of vn_io_fault lock avoidance triggers"); - /* * The vn_io_fault() is a wrapper around vn_read() and vn_write() to * prevent the following deadlock: @@ -924,38 +971,55 @@ SYSCTL_ULONG(_debug, OID_AUTO, vn_io_fau * make the current i/o request atomic with respect to other i/os and * truncations. */ + +/* + * Decode vn_io_fault_args and perform the corresponding i/o. + */ static int -vn_io_fault(struct file *fp, struct uio *uio, struct ucred *active_cred, - int flags, struct thread *td) +vn_io_fault_doio(struct vn_io_fault_args *args, struct uio *uio, + struct thread *td) +{ + + switch (args->kind) { + case VN_IO_FAULT_FOP: + return ((args->args.fop_args.doio)(args->args.fop_args.fp, + uio, args->cred, args->flags, td)); + case VN_IO_FAULT_VOP: + if (uio->uio_rw == UIO_READ) { + return (VOP_READ(args->args.vop_args.vp, uio, + args->flags, args->cred)); + } else if (uio->uio_rw == UIO_WRITE) { + return (VOP_WRITE(args->args.vop_args.vp, uio, + args->flags, args->cred)); + } + break; + } + panic("vn_io_fault_doio: unknown kind of io %d %d", args->kind, + uio->uio_rw); +} + +/* + * Common code for vn_io_fault(), agnostic to the kind of i/o request. + * Uses vn_io_fault_doio() to make the call to an actual i/o function. + * Used from vn_rdwr() and vn_io_fault(), which encode the i/o request + * into args and call vn_io_fault1() to handle faults during the user + * mode buffer accesses. + */ +static int +vn_io_fault1(struct vnode *vp, struct uio *uio, struct vn_io_fault_args *args, + struct thread *td) { vm_page_t ma[io_hold_cnt + 2]; struct uio *uio_clone, short_uio; struct iovec short_iovec[1]; - fo_rdwr_t *doio; - struct vnode *vp; - void *rl_cookie; - struct mount *mp; vm_page_t *prev_td_ma; - int error, cnt, save, saveheld, prev_td_ma_cnt; - vm_offset_t addr, end; vm_prot_t prot; + vm_offset_t addr, end; size_t len, resid; ssize_t adv; + int error, cnt, save, saveheld, prev_td_ma_cnt; - if (uio->uio_rw == UIO_READ) - doio = vn_read; - else - doio = vn_write; - vp = fp->f_vnode; - foffset_lock_uio(fp, uio, flags); - - if (uio->uio_segflg != UIO_USERSPACE || vp->v_type != VREG || - ((mp = vp->v_mount) != NULL && - (mp->mnt_kern_flag & MNTK_NO_IOPF) == 0) || - !vn_io_fault_enable) { - error = doio(fp, uio, active_cred, flags | FOF_OFFSET, td); - goto out_last; - } + prot = uio->uio_rw == UIO_READ ? VM_PROT_WRITE : VM_PROT_READ; /* * The UFS follows IO_UNIT directive and replays back both @@ -973,22 +1037,8 @@ vn_io_fault(struct file *fp, struct uio short_uio.uio_rw = uio->uio_rw; short_uio.uio_td = uio->uio_td; - if (uio->uio_rw == UIO_READ) { - prot = VM_PROT_WRITE; - rl_cookie = vn_rangelock_rlock(vp, uio->uio_offset, - uio->uio_offset + uio->uio_resid); - } else { - prot = VM_PROT_READ; - if ((fp->f_flag & O_APPEND) != 0 || (flags & FOF_OFFSET) == 0) - /* For appenders, punt and lock the whole range. */ - rl_cookie = vn_rangelock_wlock(vp, 0, OFF_MAX); - else - rl_cookie = vn_rangelock_wlock(vp, uio->uio_offset, - uio->uio_offset + uio->uio_resid); - } - save = vm_fault_disable_pagefaults(); - error = doio(fp, uio, active_cred, flags | FOF_OFFSET, td); + error = vn_io_fault_doio(args, uio, td); if (error != EFAULT) goto out; @@ -1038,8 +1088,7 @@ vn_io_fault(struct file *fp, struct uio td->td_ma = ma; td->td_ma_cnt = cnt; - error = doio(fp, &short_uio, active_cred, flags | FOF_OFFSET, - td); + error = vn_io_fault_doio(args, &short_uio, td); vm_page_unhold_pages(ma, cnt); adv = len - short_uio.uio_resid; @@ -1060,9 +1109,45 @@ vn_io_fault(struct file *fp, struct uio curthread_pflags_restore(saveheld); out: vm_fault_enable_pagefaults(save); - vn_rangelock_unlock(vp, rl_cookie); free(uio_clone, M_IOV); -out_last: + return (error); +} + +static int +vn_io_fault(struct file *fp, struct uio *uio, struct ucred *active_cred, + int flags, struct thread *td) +{ + fo_rdwr_t *doio; + struct vnode *vp; + void *rl_cookie; + struct vn_io_fault_args args; + int error; + + doio = uio->uio_rw == UIO_READ ? vn_read : vn_write; + vp = fp->f_vnode; + foffset_lock_uio(fp, uio, flags); + if (do_vn_io_fault(vp, uio)) { + args.kind = VN_IO_FAULT_FOP; + args.args.fop_args.fp = fp; + args.args.fop_args.doio = doio; + args.cred = active_cred; + args.flags = flags | FOF_OFFSET; + if (uio->uio_rw == UIO_READ) { + rl_cookie = vn_rangelock_rlock(vp, uio->uio_offset, + uio->uio_offset + uio->uio_resid); + } else if ((fp->f_flag & O_APPEND) != 0 || + (flags & FOF_OFFSET) == 0) { + /* For appenders, punt and lock the whole range. */ + rl_cookie = vn_rangelock_wlock(vp, 0, OFF_MAX); + } else { + rl_cookie = vn_rangelock_wlock(vp, uio->uio_offset, + uio->uio_offset + uio->uio_resid); + } + error = vn_io_fault1(vp, uio, &args, td); + vn_rangelock_unlock(vp, rl_cookie); + } else { + error = doio(fp, uio, active_cred, flags | FOF_OFFSET, td); + } foffset_unlock_uio(fp, uio, flags); return (error); } From owner-svn-src-stable@FreeBSD.ORG Sun Jun 29 18:54:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 923102F1; Sun, 29 Jun 2014 18:54:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65B9D2075; Sun, 29 Jun 2014 18:54:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5TIsgmC077036; Sun, 29 Jun 2014 18:54:42 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5TIsgeu077034; Sun, 29 Jun 2014 18:54:42 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201406291854.s5TIsgeu077034@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 29 Jun 2014 18:54:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268019 - stable/10/usr.bin/sed X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jun 2014 18:54:42 -0000 Author: pfg Date: Sun Jun 29 18:54:41 2014 New Revision: 268019 URL: http://svnweb.freebsd.org/changeset/base/268019 Log: MFC r267692, r267703: Add -u (unbuffered output) after GNU sed. Obtained from: NetBSD Modified: stable/10/usr.bin/sed/main.c stable/10/usr.bin/sed/sed.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/sed/main.c ============================================================================== --- stable/10/usr.bin/sed/main.c Sun Jun 29 18:53:15 2014 (r268018) +++ stable/10/usr.bin/sed/main.c Sun Jun 29 18:54:41 2014 (r268019) @@ -132,7 +132,7 @@ main(int argc, char *argv[]) fflag = 0; inplace = NULL; - while ((c = getopt(argc, argv, "EI:ae:f:i:lnr")) != -1) + while ((c = getopt(argc, argv, "EI:ae:f:i:lnru")) != -1) switch (c) { case 'r': /* Gnu sed compat */ case 'E': @@ -162,12 +162,16 @@ main(int argc, char *argv[]) ispan = 0; /* don't span across input files */ break; case 'l': - if(setlinebuf(stdout) != 0) - warnx("setlinebuf() failed"); + if(setvbuf(stdout, NULL, _IOLBF, 0) != 0) + warnx("setting line buffered output failed"); break; case 'n': nflag = 1; break; + case 'u': + if(setvbuf(stdout, NULL, _IONBF, 0) != 0) + warnx("setting unbuffered output failed"); + break; default: case '?': usage(); @@ -199,9 +203,10 @@ main(int argc, char *argv[]) static void usage(void) { - (void)fprintf(stderr, "%s\n%s\n", - "usage: sed script [-Ealn] [-i extension] [file ...]", - " sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]"); + (void)fprintf(stderr, + "usage: %s script [-Ealnru] [-i[]] [file ...]\n" + "\t%s [-Ealnu] [-i[]] [-e script] ... [-f script_file]" + " ... [file ...]\n", getprogname(), getprogname()); exit(1); } Modified: stable/10/usr.bin/sed/sed.1 ============================================================================== --- stable/10/usr.bin/sed/sed.1 Sun Jun 29 18:53:15 2014 (r268018) +++ stable/10/usr.bin/sed/sed.1 Sun Jun 29 18:54:41 2014 (r268019) @@ -31,7 +31,7 @@ .\" @(#)sed.1 8.2 (Berkeley) 12/30/93 .\" $FreeBSD$ .\" -.Dd December 9, 2013 +.Dd June 20, 2014 .Dt SED 1 .Os .Sh NAME @@ -39,7 +39,7 @@ .Nd stream editor .Sh SYNOPSIS .Nm -.Op Fl Ealnr +.Op Fl Ealnru .Ar command .Op Ar .Nm @@ -148,6 +148,8 @@ option suppresses this behavior. Same as .Fl E for compatibility with GNU sed. +.It Fl u +Make output unbuffered. .El .Pp The form of a From owner-svn-src-stable@FreeBSD.ORG Mon Jun 30 09:38:10 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60384C5D; Mon, 30 Jun 2014 09:38:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32DA621DC; Mon, 30 Jun 2014 09:38:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5U9cAeM087144; Mon, 30 Jun 2014 09:38:10 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5U9cAGZ087143; Mon, 30 Jun 2014 09:38:10 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201406300938.s5U9cAGZ087143@svn.freebsd.org> From: Marius Strobl Date: Mon, 30 Jun 2014 09:38:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268031 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2014 09:38:10 -0000 Author: marius Date: Mon Jun 30 09:38:09 2014 New Revision: 268031 URL: http://svnweb.freebsd.org/changeset/base/268031 Log: MFC: r267967, r267968 - SC_NO_SYSMOUSE isn't currently supported by vt(4), so nuke it from vt.4. - vt_vga(4) is a driver rather than a function so reference it accordingly. - Uncomment HISTORY section given that vt(4) will first appear in 9.3. Reviewed by: emaste (modulo last part) Sponsored by: Bally Wulff Games & Entertainment GmbH Modified: stable/9/share/man/man4/vt.4 Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/vt.4 ============================================================================== --- stable/9/share/man/man4/vt.4 Mon Jun 30 05:33:52 2014 (r268030) +++ stable/9/share/man/man4/vt.4 Mon Jun 30 09:38:09 2014 (r268031) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 9, 2014 +.Dd June 27, 2014 .Dt "VIRTUAL TERMINALS" 4 .Os .Sh NAME @@ -37,7 +37,6 @@ .Cd "options VT_FB_DEFAULT_WIDTH=X" .Cd "options VT_FB_DEFAULT_HEIGHT=Y" .Cd "options SC_NO_CUTPASTE" -.Cd "options SC_NO_SYSMOUSE" .Cd "device vt" .Pp In @@ -139,7 +138,6 @@ version. .It Dv VT_TWOBUTTON_MOUSE Ta Dv SC_TWOBUTTON_MOUSE .It Dv VT_MAXWINDOWS Ta Dv MAXCONS .It none Ta Dv SC_NO_CUTPASTE -.It none Ta Dv SC_NO_SYSMOUSE .El .Sh START-UP OPERATION WITH X86 BIOS SYSTEMS The computer BIOS starts in text mode, and @@ -153,13 +151,13 @@ is set, the system remains in text mode. Otherwise, .Nm switches to 640x480x16 VGA mode using -.Fn vt_vga . +.Xr vt_vga 4 . If a KMS .Pq Kernel Mode Switching video driver is available, the display is switched to high resolution and the KMS driver takes over. When a KMS driver is not available, -.Fn vt_vga +.Xr vt_vga 4 remains active. .Sh LOADER TUNABLES These settings can be entered at the @@ -201,12 +199,11 @@ terminal initialization information .Xr kbdmux 8 , .Xr kldload 8 , .Xr moused 8 -.\" WB: to be uncommented when an actual release contains vt(4) -.\" .Sh HISTORY -.\" The -.\" Nm -.\" driver first appeared in -.\" .Fx 9.3 . +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 9.3 . .Sh AUTHORS .An -nosplit The From owner-svn-src-stable@FreeBSD.ORG Mon Jun 30 09:38:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 36661DCF; Mon, 30 Jun 2014 09:38:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A58821DD; Mon, 30 Jun 2014 09:38:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5U9cE8Y087199; Mon, 30 Jun 2014 09:38:14 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5U9cEQA087198; Mon, 30 Jun 2014 09:38:14 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201406300938.s5U9cEQA087198@svn.freebsd.org> From: Marius Strobl Date: Mon, 30 Jun 2014 09:38:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268032 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2014 09:38:15 -0000 Author: marius Date: Mon Jun 30 09:38:14 2014 New Revision: 268032 URL: http://svnweb.freebsd.org/changeset/base/268032 Log: MFC: r267967, r267968 - SC_NO_SYSMOUSE isn't currently supported by vt(4), so nuke it from vt.4. - vt_vga(4) is a driver rather than a function so reference it accordingly. - Uncomment HISTORY section given that vt(4) will first appear in 9.3. Reviewed by: emaste (modulo last part) Sponsored by: Bally Wulff Games & Entertainment GmbH Modified: stable/10/share/man/man4/vt.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/vt.4 ============================================================================== --- stable/10/share/man/man4/vt.4 Mon Jun 30 09:38:09 2014 (r268031) +++ stable/10/share/man/man4/vt.4 Mon Jun 30 09:38:14 2014 (r268032) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 9, 2014 +.Dd June 27, 2014 .Dt "VIRTUAL TERMINALS" 4 .Os .Sh NAME @@ -37,7 +37,6 @@ .Cd "options VT_FB_DEFAULT_WIDTH=X" .Cd "options VT_FB_DEFAULT_HEIGHT=Y" .Cd "options SC_NO_CUTPASTE" -.Cd "options SC_NO_SYSMOUSE" .Cd "device vt" .Pp In @@ -139,7 +138,6 @@ version. .It Dv VT_TWOBUTTON_MOUSE Ta Dv SC_TWOBUTTON_MOUSE .It Dv VT_MAXWINDOWS Ta Dv MAXCONS .It none Ta Dv SC_NO_CUTPASTE -.It none Ta Dv SC_NO_SYSMOUSE .El .Sh START-UP OPERATION WITH X86 BIOS SYSTEMS The computer BIOS starts in text mode, and @@ -153,13 +151,13 @@ is set, the system remains in text mode. Otherwise, .Nm switches to 640x480x16 VGA mode using -.Fn vt_vga . +.Xr vt_vga 4 . If a KMS .Pq Kernel Mode Switching video driver is available, the display is switched to high resolution and the KMS driver takes over. When a KMS driver is not available, -.Fn vt_vga +.Xr vt_vga 4 remains active. .Sh LOADER TUNABLES These settings can be entered at the @@ -201,12 +199,11 @@ terminal initialization information .Xr kbdmux 8 , .Xr kldload 8 , .Xr moused 8 -.\" WB: to be uncommented when an actual release contains vt(4) -.\" .Sh HISTORY -.\" The -.\" Nm -.\" driver first appeared in -.\" .Fx 9.3 . +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 9.3 . .Sh AUTHORS .An -nosplit The From owner-svn-src-stable@FreeBSD.ORG Mon Jun 30 09:48:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D28AEFF; Mon, 30 Jun 2014 09:48:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8838322C1; Mon, 30 Jun 2014 09:48:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5U9mkVJ091864; Mon, 30 Jun 2014 09:48:46 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5U9miZO091853; Mon, 30 Jun 2014 09:48:44 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201406300948.s5U9miZO091853@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 30 Jun 2014 09:48:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268033 - in stable/10/sys: amd64/amd64 amd64/include crypto/aesni crypto/via i386/include i386/isa X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2014 09:48:46 -0000 Author: kib Date: Mon Jun 30 09:48:44 2014 New Revision: 268033 URL: http://svnweb.freebsd.org/changeset/base/268033 Log: MFC r267767: Add FPU_KERN_KTHR flag to fpu_kern_enter(9). Apply the flag to padlock(4) and aesni(4). In aesni_cipher_process(), do not leak FPU context state on error. Modified: stable/10/sys/amd64/amd64/fpu.c stable/10/sys/amd64/include/fpu.h stable/10/sys/crypto/aesni/aesni_wrap.c stable/10/sys/crypto/via/padlock.c stable/10/sys/crypto/via/padlock_cipher.c stable/10/sys/crypto/via/padlock_hash.c stable/10/sys/i386/include/npx.h stable/10/sys/i386/isa/npx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/fpu.c ============================================================================== --- stable/10/sys/amd64/amd64/fpu.c Mon Jun 30 09:38:14 2014 (r268032) +++ stable/10/sys/amd64/amd64/fpu.c Mon Jun 30 09:48:44 2014 (r268033) @@ -890,6 +890,7 @@ static MALLOC_DEFINE(M_FPUKERN_CTX, "fpu "Kernel contexts for FPU state"); #define FPU_KERN_CTX_FPUINITDONE 0x01 +#define FPU_KERN_CTX_DUMMY 0x02 /* avoided save for the kern thread */ struct fpu_kern_ctx { struct savefpu *prev; @@ -933,6 +934,10 @@ fpu_kern_enter(struct thread *td, struct { struct pcb *pcb; + if ((flags & FPU_KERN_KTHR) != 0 && is_fpu_kern_thread(0)) { + ctx->flags = FPU_KERN_CTX_DUMMY; + return (0); + } pcb = td->td_pcb; KASSERT(!PCB_USER_FPU(pcb) || pcb->pcb_save == get_pcb_user_save_pcb(pcb), ("mangled pcb_save")); @@ -952,6 +957,9 @@ fpu_kern_leave(struct thread *td, struct { struct pcb *pcb; + if (is_fpu_kern_thread(0) && (ctx->flags & FPU_KERN_CTX_DUMMY) != 0) + return (0); + KASSERT((ctx->flags & FPU_KERN_CTX_DUMMY) == 0, ("dummy ctx")); pcb = td->td_pcb; critical_enter(); if (curthread == PCPU_GET(fpcurthread)) Modified: stable/10/sys/amd64/include/fpu.h ============================================================================== --- stable/10/sys/amd64/include/fpu.h Mon Jun 30 09:38:14 2014 (r268032) +++ stable/10/sys/amd64/include/fpu.h Mon Jun 30 09:48:44 2014 (r268033) @@ -84,6 +84,7 @@ void fpu_save_area_reset(struct savefpu */ #define FPU_KERN_NORMAL 0x0000 #define FPU_KERN_NOWAIT 0x0001 +#define FPU_KERN_KTHR 0x0002 #endif Modified: stable/10/sys/crypto/aesni/aesni_wrap.c ============================================================================== --- stable/10/sys/crypto/aesni/aesni_wrap.c Mon Jun 30 09:38:14 2014 (r268032) +++ stable/10/sys/crypto/aesni/aesni_wrap.c Mon Jun 30 09:48:44 2014 (r268033) @@ -382,22 +382,16 @@ int aesni_cipher_setup(struct aesni_session *ses, struct cryptoini *encini) { struct thread *td; - int error, saved_ctx; + int error; td = curthread; - if (!is_fpu_kern_thread(0)) { - error = fpu_kern_enter(td, ses->fpu_ctx, FPU_KERN_NORMAL); - saved_ctx = 1; - } else { - error = 0; - saved_ctx = 0; - } - if (error == 0) { - error = aesni_cipher_setup_common(ses, encini->cri_key, - encini->cri_klen); - if (saved_ctx) - fpu_kern_leave(td, ses->fpu_ctx); - } + error = fpu_kern_enter(td, ses->fpu_ctx, FPU_KERN_NORMAL | + FPU_KERN_KTHR); + if (error != 0) + return (error); + error = aesni_cipher_setup_common(ses, encini->cri_key, + encini->cri_klen); + fpu_kern_leave(td, ses->fpu_ctx); return (error); } @@ -407,22 +401,17 @@ aesni_cipher_process(struct aesni_sessio { struct thread *td; uint8_t *buf; - int error, allocated, saved_ctx; + int error, allocated; buf = aesni_cipher_alloc(enccrd, crp, &allocated); if (buf == NULL) return (ENOMEM); td = curthread; - if (!is_fpu_kern_thread(0)) { - error = fpu_kern_enter(td, ses->fpu_ctx, FPU_KERN_NORMAL); - if (error != 0) - goto out; - saved_ctx = 1; - } else { - saved_ctx = 0; - error = 0; - } + error = fpu_kern_enter(td, ses->fpu_ctx, FPU_KERN_NORMAL | + FPU_KERN_KTHR); + if (error != 0) + goto out1; if ((enccrd->crd_flags & CRD_F_KEY_EXPLICIT) != 0) { error = aesni_cipher_setup_common(ses, enccrd->crd_key, @@ -460,8 +449,6 @@ aesni_cipher_process(struct aesni_sessio ses->iv); } } - if (saved_ctx) - fpu_kern_leave(td, ses->fpu_ctx); if (allocated) crypto_copyback(crp->crp_flags, crp->crp_buf, enccrd->crd_skip, enccrd->crd_len, buf); @@ -469,7 +456,9 @@ aesni_cipher_process(struct aesni_sessio crypto_copydata(crp->crp_flags, crp->crp_buf, enccrd->crd_skip + enccrd->crd_len - AES_BLOCK_LEN, AES_BLOCK_LEN, ses->iv); - out: +out: + fpu_kern_leave(td, ses->fpu_ctx); +out1: if (allocated) { bzero(buf, enccrd->crd_len); free(buf, M_AESNI); Modified: stable/10/sys/crypto/via/padlock.c ============================================================================== --- stable/10/sys/crypto/via/padlock.c Mon Jun 30 09:38:14 2014 (r268032) +++ stable/10/sys/crypto/via/padlock.c Mon Jun 30 09:48:44 2014 (r268033) @@ -171,7 +171,7 @@ padlock_newsession(device_t dev, uint32_ struct padlock_session *ses = NULL; struct cryptoini *encini, *macini; struct thread *td; - int error, saved_ctx; + int error; if (sidp == NULL || cri == NULL) return (EINVAL); @@ -246,18 +246,11 @@ padlock_newsession(device_t dev, uint32_ if (macini != NULL) { td = curthread; - if (!is_fpu_kern_thread(0)) { - error = fpu_kern_enter(td, ses->ses_fpu_ctx, - FPU_KERN_NORMAL); - saved_ctx = 1; - } else { - error = 0; - saved_ctx = 0; - } + error = fpu_kern_enter(td, ses->ses_fpu_ctx, FPU_KERN_NORMAL | + FPU_KERN_KTHR); if (error == 0) { error = padlock_hash_setup(ses, macini); - if (saved_ctx) - fpu_kern_leave(td, ses->ses_fpu_ctx); + fpu_kern_leave(td, ses->ses_fpu_ctx); } if (error != 0) { padlock_freesession_one(sc, ses, 0); Modified: stable/10/sys/crypto/via/padlock_cipher.c ============================================================================== --- stable/10/sys/crypto/via/padlock_cipher.c Mon Jun 30 09:38:14 2014 (r268032) +++ stable/10/sys/crypto/via/padlock_cipher.c Mon Jun 30 09:48:44 2014 (r268033) @@ -205,7 +205,7 @@ padlock_cipher_process(struct padlock_se struct thread *td; u_char *buf, *abuf; uint32_t *key; - int allocated, error, saved_ctx; + int allocated, error; buf = padlock_cipher_alloc(enccrd, crp, &allocated); if (buf == NULL) @@ -250,21 +250,13 @@ padlock_cipher_process(struct padlock_se } td = curthread; - if (!is_fpu_kern_thread(0)) { - error = fpu_kern_enter(td, ses->ses_fpu_ctx, FPU_KERN_NORMAL); - saved_ctx = 1; - } else { - error = 0; - saved_ctx = 0; - } + error = fpu_kern_enter(td, ses->ses_fpu_ctx, FPU_KERN_NORMAL | + FPU_KERN_KTHR); if (error != 0) goto out; - padlock_cbc(abuf, abuf, enccrd->crd_len / AES_BLOCK_LEN, key, cw, ses->ses_iv); - - if (saved_ctx) - fpu_kern_leave(td, ses->ses_fpu_ctx); + fpu_kern_leave(td, ses->ses_fpu_ctx); if (allocated) { crypto_copyback(crp->crp_flags, crp->crp_buf, enccrd->crd_skip, Modified: stable/10/sys/crypto/via/padlock_hash.c ============================================================================== --- stable/10/sys/crypto/via/padlock_hash.c Mon Jun 30 09:38:14 2014 (r268032) +++ stable/10/sys/crypto/via/padlock_hash.c Mon Jun 30 09:48:44 2014 (r268033) @@ -366,24 +366,18 @@ padlock_hash_process(struct padlock_sess struct cryptop *crp) { struct thread *td; - int error, saved_ctx; + int error; td = curthread; - if (!is_fpu_kern_thread(0)) { - error = fpu_kern_enter(td, ses->ses_fpu_ctx, FPU_KERN_NORMAL); - saved_ctx = 1; - } else { - error = 0; - saved_ctx = 0; - } + error = fpu_kern_enter(td, ses->ses_fpu_ctx, FPU_KERN_NORMAL | + FPU_KERN_KTHR); if (error != 0) return (error); if ((maccrd->crd_flags & CRD_F_KEY_EXPLICIT) != 0) padlock_hash_key_setup(ses, maccrd->crd_key, maccrd->crd_klen); error = padlock_authcompute(ses, maccrd, crp->crp_buf, crp->crp_flags); - if (saved_ctx) - fpu_kern_leave(td, ses->ses_fpu_ctx); + fpu_kern_leave(td, ses->ses_fpu_ctx); return (error); } Modified: stable/10/sys/i386/include/npx.h ============================================================================== --- stable/10/sys/i386/include/npx.h Mon Jun 30 09:38:14 2014 (r268032) +++ stable/10/sys/i386/include/npx.h Mon Jun 30 09:48:44 2014 (r268033) @@ -71,6 +71,7 @@ int is_fpu_kern_thread(u_int flags); */ #define FPU_KERN_NORMAL 0x0000 #define FPU_KERN_NOWAIT 0x0001 +#define FPU_KERN_KTHR 0x0002 #endif Modified: stable/10/sys/i386/isa/npx.c ============================================================================== --- stable/10/sys/i386/isa/npx.c Mon Jun 30 09:38:14 2014 (r268032) +++ stable/10/sys/i386/isa/npx.c Mon Jun 30 09:48:44 2014 (r268033) @@ -1008,6 +1008,7 @@ static MALLOC_DEFINE(M_FPUKERN_CTX, "fpu #define XSAVE_AREA_ALIGN 64 #define FPU_KERN_CTX_NPXINITDONE 0x01 +#define FPU_KERN_CTX_DUMMY 0x02 struct fpu_kern_ctx { union savefpu *prev; @@ -1051,6 +1052,10 @@ fpu_kern_enter(struct thread *td, struct { struct pcb *pcb; + if ((flags & FPU_KERN_KTHR) != 0 && is_fpu_kern_thread(0)) { + ctx->flags = FPU_KERN_CTX_DUMMY; + return (0); + } pcb = td->td_pcb; KASSERT(!PCB_USER_FPU(pcb) || pcb->pcb_save == &pcb->pcb_user_save, ("mangled pcb_save")); @@ -1070,6 +1075,8 @@ fpu_kern_leave(struct thread *td, struct { struct pcb *pcb; + if (is_fpu_kern_thread(0) && (ctx->flags & FPU_KERN_CTX_DUMMY) != 0) + return (0); pcb = td->td_pcb; critical_enter(); if (curthread == PCPU_GET(fpcurthread)) From owner-svn-src-stable@FreeBSD.ORG Mon Jun 30 09:51:28 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2859AC85; Mon, 30 Jun 2014 09:51:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A796234A; Mon, 30 Jun 2014 09:51:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5U9pR9T092928; Mon, 30 Jun 2014 09:51:27 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5U9pRa4092924; Mon, 30 Jun 2014 09:51:27 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201406300951.s5U9pRa4092924@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 30 Jun 2014 09:51:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268034 - stable/10/sys/crypto/aesni X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2014 09:51:28 -0000 Author: kib Date: Mon Jun 30 09:51:27 2014 New Revision: 268034 URL: http://svnweb.freebsd.org/changeset/base/268034 Log: MFC r267815: Put the aesni_cipher_setup() and aesni_cipher_process() functions into the file which is compiled with SSE disabled. Modified: stable/10/sys/crypto/aesni/aesni.c stable/10/sys/crypto/aesni/aesni.h stable/10/sys/crypto/aesni/aesni_wrap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/crypto/aesni/aesni.c ============================================================================== --- stable/10/sys/crypto/aesni/aesni.c Mon Jun 30 09:48:44 2014 (r268033) +++ stable/10/sys/crypto/aesni/aesni.c Mon Jun 30 09:51:27 2014 (r268034) @@ -53,6 +53,10 @@ static int aesni_newsession(device_t, ui static int aesni_freesession(device_t, uint64_t tid); static void aesni_freesession_locked(struct aesni_softc *sc, struct aesni_session *ses); +static int aesni_cipher_setup(struct aesni_session *ses, + struct cryptoini *encini); +static int aesni_cipher_process(struct aesni_session *ses, + struct cryptodesc *enccrd, struct cryptop *crp); MALLOC_DEFINE(M_AESNI, "aesni_data", "AESNI Data"); @@ -354,3 +358,91 @@ static devclass_t aesni_devclass; DRIVER_MODULE(aesni, nexus, aesni_driver, aesni_devclass, 0, 0); MODULE_VERSION(aesni, 1); MODULE_DEPEND(aesni, crypto, 1, 1, 1); + +static int +aesni_cipher_setup(struct aesni_session *ses, struct cryptoini *encini) +{ + struct thread *td; + int error; + + td = curthread; + error = fpu_kern_enter(td, ses->fpu_ctx, FPU_KERN_NORMAL | + FPU_KERN_KTHR); + if (error != 0) + return (error); + error = aesni_cipher_setup_common(ses, encini->cri_key, + encini->cri_klen); + fpu_kern_leave(td, ses->fpu_ctx); + return (error); +} + +static int +aesni_cipher_process(struct aesni_session *ses, struct cryptodesc *enccrd, + struct cryptop *crp) +{ + struct thread *td; + uint8_t *buf; + int error, allocated; + + buf = aesni_cipher_alloc(enccrd, crp, &allocated); + if (buf == NULL) + return (ENOMEM); + + td = curthread; + error = fpu_kern_enter(td, ses->fpu_ctx, FPU_KERN_NORMAL | + FPU_KERN_KTHR); + if (error != 0) + goto out1; + + if ((enccrd->crd_flags & CRD_F_KEY_EXPLICIT) != 0) { + error = aesni_cipher_setup_common(ses, enccrd->crd_key, + enccrd->crd_klen); + if (error != 0) + goto out; + } + + if ((enccrd->crd_flags & CRD_F_ENCRYPT) != 0) { + if ((enccrd->crd_flags & CRD_F_IV_EXPLICIT) != 0) + bcopy(enccrd->crd_iv, ses->iv, AES_BLOCK_LEN); + if ((enccrd->crd_flags & CRD_F_IV_PRESENT) == 0) + crypto_copyback(crp->crp_flags, crp->crp_buf, + enccrd->crd_inject, AES_BLOCK_LEN, ses->iv); + if (ses->algo == CRYPTO_AES_CBC) { + aesni_encrypt_cbc(ses->rounds, ses->enc_schedule, + enccrd->crd_len, buf, buf, ses->iv); + } else /* if (ses->algo == CRYPTO_AES_XTS) */ { + aesni_encrypt_xts(ses->rounds, ses->enc_schedule, + ses->xts_schedule, enccrd->crd_len, buf, buf, + ses->iv); + } + } else { + if ((enccrd->crd_flags & CRD_F_IV_EXPLICIT) != 0) + bcopy(enccrd->crd_iv, ses->iv, AES_BLOCK_LEN); + else + crypto_copydata(crp->crp_flags, crp->crp_buf, + enccrd->crd_inject, AES_BLOCK_LEN, ses->iv); + if (ses->algo == CRYPTO_AES_CBC) { + aesni_decrypt_cbc(ses->rounds, ses->dec_schedule, + enccrd->crd_len, buf, ses->iv); + } else /* if (ses->algo == CRYPTO_AES_XTS) */ { + aesni_decrypt_xts(ses->rounds, ses->dec_schedule, + ses->xts_schedule, enccrd->crd_len, buf, buf, + ses->iv); + } + } + if (allocated) + crypto_copyback(crp->crp_flags, crp->crp_buf, enccrd->crd_skip, + enccrd->crd_len, buf); + if ((enccrd->crd_flags & CRD_F_ENCRYPT) != 0) + crypto_copydata(crp->crp_flags, crp->crp_buf, + enccrd->crd_skip + enccrd->crd_len - AES_BLOCK_LEN, + AES_BLOCK_LEN, ses->iv); +out: + fpu_kern_leave(td, ses->fpu_ctx); +out1: + if (allocated) { + bzero(buf, enccrd->crd_len); + free(buf, M_AESNI); + } + return (error); +} Modified: stable/10/sys/crypto/aesni/aesni.h ============================================================================== --- stable/10/sys/crypto/aesni/aesni.h Mon Jun 30 09:48:44 2014 (r268033) +++ stable/10/sys/crypto/aesni/aesni.h Mon Jun 30 09:51:27 2014 (r268034) @@ -96,11 +96,8 @@ void aesni_decrypt_xts(int rounds, const const void *tweak_schedule /*__aligned(16)*/, size_t len, const uint8_t *from, uint8_t *to, const uint8_t iv[AES_BLOCK_LEN]); -int aesni_cipher_setup(struct aesni_session *ses, - struct cryptoini *encini); -int aesni_cipher_process(struct aesni_session *ses, - struct cryptodesc *enccrd, struct cryptop *crp); - +int aesni_cipher_setup_common(struct aesni_session *ses, const uint8_t *key, + int keylen); uint8_t *aesni_cipher_alloc(struct cryptodesc *enccrd, struct cryptop *crp, int *allocated); Modified: stable/10/sys/crypto/aesni/aesni_wrap.c ============================================================================== --- stable/10/sys/crypto/aesni/aesni_wrap.c Mon Jun 30 09:48:44 2014 (r268033) +++ stable/10/sys/crypto/aesni/aesni_wrap.c Mon Jun 30 09:51:27 2014 (r268034) @@ -329,7 +329,7 @@ aesni_decrypt_xts(int rounds, const void iv, 0); } -static int +int aesni_cipher_setup_common(struct aesni_session *ses, const uint8_t *key, int keylen) { @@ -377,91 +377,3 @@ aesni_cipher_setup_common(struct aesni_s return (0); } - -int -aesni_cipher_setup(struct aesni_session *ses, struct cryptoini *encini) -{ - struct thread *td; - int error; - - td = curthread; - error = fpu_kern_enter(td, ses->fpu_ctx, FPU_KERN_NORMAL | - FPU_KERN_KTHR); - if (error != 0) - return (error); - error = aesni_cipher_setup_common(ses, encini->cri_key, - encini->cri_klen); - fpu_kern_leave(td, ses->fpu_ctx); - return (error); -} - -int -aesni_cipher_process(struct aesni_session *ses, struct cryptodesc *enccrd, - struct cryptop *crp) -{ - struct thread *td; - uint8_t *buf; - int error, allocated; - - buf = aesni_cipher_alloc(enccrd, crp, &allocated); - if (buf == NULL) - return (ENOMEM); - - td = curthread; - error = fpu_kern_enter(td, ses->fpu_ctx, FPU_KERN_NORMAL | - FPU_KERN_KTHR); - if (error != 0) - goto out1; - - if ((enccrd->crd_flags & CRD_F_KEY_EXPLICIT) != 0) { - error = aesni_cipher_setup_common(ses, enccrd->crd_key, - enccrd->crd_klen); - if (error != 0) - goto out; - } - - if ((enccrd->crd_flags & CRD_F_ENCRYPT) != 0) { - if ((enccrd->crd_flags & CRD_F_IV_EXPLICIT) != 0) - bcopy(enccrd->crd_iv, ses->iv, AES_BLOCK_LEN); - if ((enccrd->crd_flags & CRD_F_IV_PRESENT) == 0) - crypto_copyback(crp->crp_flags, crp->crp_buf, - enccrd->crd_inject, AES_BLOCK_LEN, ses->iv); - if (ses->algo == CRYPTO_AES_CBC) { - aesni_encrypt_cbc(ses->rounds, ses->enc_schedule, - enccrd->crd_len, buf, buf, ses->iv); - } else /* if (ses->algo == CRYPTO_AES_XTS) */ { - aesni_encrypt_xts(ses->rounds, ses->enc_schedule, - ses->xts_schedule, enccrd->crd_len, buf, buf, - ses->iv); - } - } else { - if ((enccrd->crd_flags & CRD_F_IV_EXPLICIT) != 0) - bcopy(enccrd->crd_iv, ses->iv, AES_BLOCK_LEN); - else - crypto_copydata(crp->crp_flags, crp->crp_buf, - enccrd->crd_inject, AES_BLOCK_LEN, ses->iv); - if (ses->algo == CRYPTO_AES_CBC) { - aesni_decrypt_cbc(ses->rounds, ses->dec_schedule, - enccrd->crd_len, buf, ses->iv); - } else /* if (ses->algo == CRYPTO_AES_XTS) */ { - aesni_decrypt_xts(ses->rounds, ses->dec_schedule, - ses->xts_schedule, enccrd->crd_len, buf, buf, - ses->iv); - } - } - if (allocated) - crypto_copyback(crp->crp_flags, crp->crp_buf, enccrd->crd_skip, - enccrd->crd_len, buf); - if ((enccrd->crd_flags & CRD_F_ENCRYPT) != 0) - crypto_copydata(crp->crp_flags, crp->crp_buf, - enccrd->crd_skip + enccrd->crd_len - AES_BLOCK_LEN, - AES_BLOCK_LEN, ses->iv); -out: - fpu_kern_leave(td, ses->fpu_ctx); -out1: - if (allocated) { - bzero(buf, enccrd->crd_len); - free(buf, M_AESNI); - } - return (error); -} From owner-svn-src-stable@FreeBSD.ORG Mon Jun 30 09:54:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9ADDC90; Mon, 30 Jun 2014 09:54:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B8FEF239B; Mon, 30 Jun 2014 09:54:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5U9s8tt095994; Mon, 30 Jun 2014 09:54:08 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5U9s8MA095993; Mon, 30 Jun 2014 09:54:08 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201406300954.s5U9s8MA095993@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 30 Jun 2014 09:54:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268035 - stable/10/share/man/man9 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2014 09:54:09 -0000 Author: kib Date: Mon Jun 30 09:54:08 2014 New Revision: 268035 URL: http://svnweb.freebsd.org/changeset/base/268035 Log: MFC r267768: Add documentation for the fpu_kern(9) interfaces. MFC r267785 (by brueffer): Several small fixes. Added: stable/10/share/man/man9/fpu_kern.9 - copied, changed from r267768, head/share/man/man9/fpu_kern.9 Modified: Directory Properties: stable/10/ (props changed) Copied and modified: stable/10/share/man/man9/fpu_kern.9 (from r267768, head/share/man/man9/fpu_kern.9) ============================================================================== --- head/share/man/man9/fpu_kern.9 Mon Jun 23 07:45:44 2014 (r267768, copy source) +++ stable/10/share/man/man9/fpu_kern.9 Mon Jun 30 09:54:08 2014 (r268035) @@ -23,8 +23,8 @@ .\" .\" $FreeBSD$ .\" -.Dd June 21, 2014 -.Dt KERN_FPU 9 +.Dd June 23, 2014 +.Dt FPU_KERN 9 .Os .Sh NAME .Nm fpu_kern @@ -47,11 +47,11 @@ The .Nm family of functions allows the use of FPU hardware in kernel code. Modern FPUs are not limited to providing hardware implementation for -floating point arithmetic, they offer advanced accelerators for cryptography +floating point arithmetic; they offer advanced accelerators for cryptography and other computational-intensive algorithms. These facilities share registers with the FPU hardware. .Pp -Typical kernel code does not need to access to the FPU. +Typical kernel code does not need access to the FPU. Saving a large register file on each entry to the kernel would waste time. When kernel code uses the FPU, the current FPU state must be saved to @@ -80,6 +80,7 @@ without sleep. .It 0 No special handling is required. .El +.Pp The function returns the allocated context area, or .Va NULL if the allocation failed. @@ -121,6 +122,7 @@ The function correctly handles such contexts. .El .El +.Pp The function does not sleep or block. It could cause the .Nm Device Not Available @@ -173,7 +175,7 @@ and false otherwise. .Sh NOTES The .Nm -is currently implemented only for i386 and amd64 architectures. +is currently implemented only for the i386 and amd64 architectures. .Pp There is no way to handle floating point exceptions raised from kernel mode. From owner-svn-src-stable@FreeBSD.ORG Mon Jun 30 09:55:29 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E951045F; Mon, 30 Jun 2014 09:55:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5FFF23B0; Mon, 30 Jun 2014 09:55:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5U9tTe1096337; Mon, 30 Jun 2014 09:55:29 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5U9tTch096336; Mon, 30 Jun 2014 09:55:29 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201406300955.s5U9tTch096336@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 30 Jun 2014 09:55:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268036 - stable/10/share/man/man9 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2014 09:55:30 -0000 Author: kib Date: Mon Jun 30 09:55:29 2014 New Revision: 268036 URL: http://svnweb.freebsd.org/changeset/base/268036 Log: MFC r267854: Add fpu_kern.9 man page to the install. Modified: stable/10/share/man/man9/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man9/Makefile ============================================================================== --- stable/10/share/man/man9/Makefile Mon Jun 30 09:54:08 2014 (r268035) +++ stable/10/share/man/man9/Makefile Mon Jun 30 09:55:29 2014 (r268036) @@ -112,6 +112,7 @@ MAN= accept_filter.9 \ fail.9 \ fetch.9 \ firmware.9 \ + fpu_kern.9 \ g_access.9 \ g_attach.9 \ g_bio.9 \ @@ -669,6 +670,12 @@ MLINKS+=fetch.9 fubyte.9 \ fetch.9 fuword16.9 \ fetch.9 fuword32.9 \ fetch.9 fuword64.9 +MLINKS+=fpu_kern.9 fpu_kern_alloc_ctx.9 \ + fpu_kern.9 fpu_kern_free_ctx.9 \ + fpu_kern.9 fpu_kern_enter.9 \ + fpu_kern.9 fpu_kern_leave.9 \ + fpu_kern.9 fpu_kern_thread.9 \ + fpu_kern.9 is_fpu_kern_thread.9 MLINKS+=g_attach.9 g_detach.9 MLINKS+=g_bio.9 g_clone_bio.9 \ g_bio.9 g_destroy_bio.9 \ From owner-svn-src-stable@FreeBSD.ORG Mon Jun 30 09:59:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 255DE749; Mon, 30 Jun 2014 09:59:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA17823E1; Mon, 30 Jun 2014 09:59:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5U9xORB096843; Mon, 30 Jun 2014 09:59:24 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5U9xNeM096835; Mon, 30 Jun 2014 09:59:23 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201406300959.s5U9xNeM096835@svn.freebsd.org> From: Marius Strobl Date: Mon, 30 Jun 2014 09:59:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268037 - in stable/10: share/man/man4 sys/conf sys/dev/vt sys/kern sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2014 09:59:25 -0000 Author: marius Date: Mon Jun 30 09:59:23 2014 New Revision: 268037 URL: http://svnweb.freebsd.org/changeset/base/268037 Log: MFC: r267978 In order to get vt(4) a bit closer to the feature set provided by sc(4), implement options TERMINAL_{KERN,NORM}_ATTR. These are aliased to SC_{KERNEL_CONS,NORM}_ATTR and like these latter, allow to change the default colors of normal and kernel text respectively. Note on the naming: Although affecting the output of vt(4), technically kern/subr_terminal.c is primarily concerned with changing default colors so it would be inconsistent to term these options VT_{KERN,NORM}_ATTR. Actually, if the architecture and abstraction of terminal+teken+vt would be perfect, dev/vt/* wouldn't be touched by this commit at all. Reviewed by: emaste Sponsored by: Bally Wulff Games & Entertainment GmbH Modified: stable/10/share/man/man4/vt.4 stable/10/sys/conf/options stable/10/sys/dev/vt/vt.h stable/10/sys/dev/vt/vt_buf.c stable/10/sys/dev/vt/vt_core.c stable/10/sys/kern/subr_terminal.c stable/10/sys/sys/terminal.h Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/vt.4 ============================================================================== --- stable/10/share/man/man4/vt.4 Mon Jun 30 09:55:29 2014 (r268036) +++ stable/10/share/man/man4/vt.4 Mon Jun 30 09:59:23 2014 (r268037) @@ -31,6 +31,8 @@ .Nm vt .Nd virtual terminal console driver .Sh SYNOPSIS +.Cd "options TERMINAL_KERN_ATTR=_attribute_" +.Cd "options TERMINAL_NORM_ATTR=_attribute_" .Cd "options VT_MAXWINDOWS=N" .Cd "options VT_ALT_TO_ESC_HACK=1" .Cd "options VT_TWOBUTTON_MOUSE" @@ -106,6 +108,15 @@ These kernel options control the .Nm driver. .Bl -tag -width MAXCONS +.It Dv TERMINAL_NORM_ATTR=_attribute_ +.It Dv TERMINAL_KERN_ATTR=_attribute_ +These options allow to change the default colors used for normal and kernel +text respectively. +Available colors are defined in +.In sys/terminal.h . +See +.Sx EXAMPLES +below. .It Dv VT_MAXWINDOWS=N Set the number of virtual terminals to be created to .Fa N . @@ -135,6 +146,8 @@ These options will be removed in a futur version. .Bl -column -offset indent ".Sy vt VT_TWOBUTTON_MOUSE" ".Sy SC_TWOBUTTON_MOUSE" .It Sy vt Option Name Ta Sy sc Option Name +.It Dv TERMINAL_KERN_ATTR Ta Dv SC_KERNEL_CONS_ATTR +.It Dv TERMINAL_NORM_ATTR Ta Dv SC_NORM_ATTR .It Dv VT_TWOBUTTON_MOUSE Ta Dv SC_TWOBUTTON_MOUSE .It Dv VT_MAXWINDOWS Ta Dv MAXCONS .It none Ta Dv SC_NO_CUTPASTE @@ -170,6 +183,21 @@ Set to 1 to use virtual terminals in tex Features that require graphics mode, like loadable fonts, will be disabled. .El +.Sh EXAMPLES +The following line will change the default color of normal text. +Normal text will be green on black background. +Reversed normal text will be black on green background. +Note that you cannot put any white space inside the quoted string, +because of the current implementation of +.Xr config 8 . +.Pp +.Dl "options TERMINAL_NORM_ATTR=(FG_GREEN|BG_BLACK)" +.Pp +The following line will change the default color of kernel messages. +Kernel messages will be printed bright red on black background. +Reversed kernel messages will be black on bright red background. +.Pp +.Dl "options TERMINAL_KERN_ATTR=(FG_LIGHTRED|BG_BLACK)" .Sh FILES .Bl -tag -width /usr/share/syscons/keymaps/* -compact .It Pa /dev/console Modified: stable/10/sys/conf/options ============================================================================== --- stable/10/sys/conf/options Mon Jun 30 09:55:29 2014 (r268036) +++ stable/10/sys/conf/options Mon Jun 30 09:59:23 2014 (r268037) @@ -765,10 +765,11 @@ SC_TWOBUTTON_MOUSE opt_syscons.h DEV_SC opt_syscons.h DEV_VT opt_syscons.h - # teken terminal emulator options TEKEN_CONS25 opt_teken.h TEKEN_UTF8 opt_teken.h +TERMINAL_KERN_ATTR opt_teken.h +TERMINAL_NORM_ATTR opt_teken.h # options for printf PRINTF_BUFR_SIZE opt_printf.h Modified: stable/10/sys/dev/vt/vt.h ============================================================================== --- stable/10/sys/dev/vt/vt.h Mon Jun 30 09:55:29 2014 (r268036) +++ stable/10/sys/dev/vt/vt.h Mon Jun 30 09:59:23 2014 (r268037) @@ -230,7 +230,7 @@ void vtbuf_extract_marked(struct vt_buf ((mask)->vbm_row & ((uint64_t)1 << ((row) % 64))) #define VTBUF_DIRTYCOL(mask, col) \ ((mask)->vbm_col & ((uint64_t)1 << ((col) % 64))) -#define VTBUF_SPACE_CHAR (' ' | TC_WHITE << 26 | TC_BLACK << 29) +#define VTBUF_SPACE_CHAR(attr) (' ' | (attr)) #define VHS_SET 0 #define VHS_CUR 1 Modified: stable/10/sys/dev/vt/vt_buf.c ============================================================================== --- stable/10/sys/dev/vt/vt_buf.c Mon Jun 30 09:55:29 2014 (r268036) +++ stable/10/sys/dev/vt/vt_buf.c Mon Jun 30 09:59:23 2014 (r268037) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -385,13 +386,13 @@ vtbuf_init_rows(struct vt_buf *vb) vb->vb_history_size = MAX(vb->vb_history_size, vb->vb_scr_size.tp_row); for (r = 0; r < vb->vb_history_size; r++) - vb->vb_rows[r] = &vb->vb_buffer[r * - vb->vb_scr_size.tp_col]; + vb->vb_rows[r] = &vb->vb_buffer[r * vb->vb_scr_size.tp_col]; } void vtbuf_init_early(struct vt_buf *vb) { + term_rect_t rect; vb->vb_flags |= VBF_CURSOR; vb->vb_roffset = 0; @@ -402,6 +403,10 @@ vtbuf_init_early(struct vt_buf *vb) vb->vb_mark_end.tp_col = 0; vtbuf_init_rows(vb); + rect.tr_begin.tp_row = rect.tr_begin.tp_col = 0; + rect.tr_end = vb->vb_scr_size; + vtbuf_fill(vb, &rect, VTBUF_SPACE_CHAR((boothowto & RB_MUTE) == 0 ? + TERMINAL_KERN_ATTR : TERMINAL_NORM_ATTR)); vtbuf_make_undirty(vb); if ((vb->vb_flags & VBF_MTX_INIT) == 0) { mtx_init(&vb->vb_lock, "vtbuf", NULL, MTX_SPIN); @@ -474,20 +479,27 @@ vtbuf_grow(struct vt_buf *vb, const term /* Copy history and fill extra space. */ for (r = 0; r < history_size; r ++) { + /* + * XXX VTBUF_SPACE_CHAR(TERMINAL_NORM_ATTR) will + * extended lines of kernel text using the wrong + * background color. + */ row = rows[r]; if (r < h) { /* Copy. */ memmove(rows[r], copyrows[r], MIN(p->tp_col, w) * sizeof(term_char_t)); for (c = MIN(p->tp_col, w); c < p->tp_col; c++) { - row[c] = VTBUF_SPACE_CHAR; + row[c] = VTBUF_SPACE_CHAR( + TERMINAL_NORM_ATTR); } } else { /* Just fill. */ rect.tr_begin.tp_col = 0; rect.tr_begin.tp_row = r; rect.tr_end.tp_col = p->tp_col; rect.tr_end.tp_row = p->tp_row; - vtbuf_fill(vb, &rect, VTBUF_SPACE_CHAR); + vtbuf_fill(vb, &rect, + VTBUF_SPACE_CHAR(TERMINAL_NORM_ATTR)); break; } } Modified: stable/10/sys/dev/vt/vt_core.c ============================================================================== --- stable/10/sys/dev/vt/vt_core.c Mon Jun 30 09:55:29 2014 (r268036) +++ stable/10/sys/dev/vt/vt_core.c Mon Jun 30 09:59:23 2014 (r268037) @@ -956,6 +956,8 @@ vtterm_cnprobe(struct terminal *tm, stru struct vt_window *vw = tm->tm_softc; struct vt_device *vd = vw->vw_device; struct winsize wsz; + term_attr_t attr; + term_char_t c; if (vd->vd_flags & VDF_INITIALIZED) /* Initialization already done. */ @@ -997,7 +999,12 @@ vtterm_cnprobe(struct terminal *tm, stru vtbuf_init_early(&vw->vw_buf); vt_winsize(vd, vw->vw_font, &wsz); - terminal_set_winsize(tm, &wsz); + c = (boothowto & RB_MUTE) == 0 ? TERMINAL_KERN_ATTR : + TERMINAL_NORM_ATTR; + attr.ta_format = TCHAR_FORMAT(c); + attr.ta_fgcolor = TCHAR_FGCOLOR(c); + attr.ta_bgcolor = TCHAR_BGCOLOR(c); + terminal_set_winsize_blank(tm, &wsz, 1, &attr); if (vtdbest != NULL) { #ifdef DEV_SPLASH @@ -1155,7 +1162,7 @@ vt_change_font(struct vt_window *vw, str /* Grow the screen buffer and terminal. */ terminal_mute(tm, 1); vtbuf_grow(&vw->vw_buf, &size, vw->vw_buf.vb_history_size); - terminal_set_winsize_blank(tm, &wsz, 0); + terminal_set_winsize_blank(tm, &wsz, 0, NULL); terminal_mute(tm, 0); /* Actually apply the font to the current window. */ @@ -2116,7 +2123,7 @@ vt_allocate(struct vt_driver *drv, void /* Update console window sizes to actual. */ vt_winsize(vd, vd->vd_windows[VT_CONSWINDOW]->vw_font, &wsz); terminal_set_winsize_blank(vd->vd_windows[VT_CONSWINDOW]->vw_terminal, - &wsz, 0); + &wsz, 0, NULL); } void Modified: stable/10/sys/kern/subr_terminal.c ============================================================================== --- stable/10/sys/kern/subr_terminal.c Mon Jun 30 09:55:29 2014 (r268036) +++ stable/10/sys/kern/subr_terminal.c Mon Jun 30 09:59:23 2014 (r268037) @@ -119,20 +119,20 @@ static teken_funcs_t terminal_drawmethod /* Kernel message formatting. */ static const teken_attr_t kernel_message = { - .ta_fgcolor = TC_WHITE, - .ta_bgcolor = TC_BLACK, - .ta_format = TF_BOLD, + .ta_fgcolor = TCHAR_FGCOLOR(TERMINAL_KERN_ATTR), + .ta_bgcolor = TCHAR_BGCOLOR(TERMINAL_KERN_ATTR), + .ta_format = TCHAR_FORMAT(TERMINAL_KERN_ATTR) }; static const teken_attr_t default_message = { - .ta_fgcolor = TC_WHITE, - .ta_bgcolor = TC_BLACK, + .ta_fgcolor = TCHAR_FGCOLOR(TERMINAL_NORM_ATTR), + .ta_bgcolor = TCHAR_BGCOLOR(TERMINAL_NORM_ATTR), + .ta_format = TCHAR_FORMAT(TERMINAL_NORM_ATTR) }; -#define TCHAR_CREATE(c, a) ((c) | \ - (a)->ta_format << 21 | \ - teken_256to8((a)->ta_fgcolor) << 26 | \ - teken_256to8((a)->ta_bgcolor) << 29) +#define TCHAR_CREATE(c, a) ((c) | TFORMAT((a)->ta_format) | \ + TCOLOR_FG(teken_256to8((a)->ta_fgcolor)) | \ + TCOLOR_BG(teken_256to8((a)->ta_bgcolor))) static void terminal_init(struct terminal *tm) @@ -191,7 +191,7 @@ terminal_maketty(struct terminal *tm, co void terminal_set_winsize_blank(struct terminal *tm, const struct winsize *size, - int blank) + int blank, const term_attr_t *attr) { term_rect_t r; @@ -209,8 +209,8 @@ terminal_set_winsize_blank(struct termin TERMINAL_UNLOCK(tm); if ((blank != 0) && !(tm->tm_flags & TF_MUTE)) - tm->tm_class->tc_fill(tm, &r, TCHAR_CREATE((teken_char_t)' ', - &default_message)); + tm->tm_class->tc_fill(tm, &r, + TCHAR_CREATE((teken_char_t)' ', attr)); terminal_sync_ttysize(tm); } @@ -219,7 +219,8 @@ void terminal_set_winsize(struct terminal *tm, const struct winsize *size) { - terminal_set_winsize_blank(tm, size, 1); + terminal_set_winsize_blank(tm, size, 1, + (const term_attr_t *)&default_message); } /* Modified: stable/10/sys/sys/terminal.h ============================================================================== --- stable/10/sys/sys/terminal.h Mon Jun 30 09:55:29 2014 (r268036) +++ stable/10/sys/sys/terminal.h Mon Jun 30 09:59:23 2014 (r268037) @@ -41,6 +41,9 @@ #include +#include "opt_syscons.h" +#include "opt_teken.h" + struct terminal; struct thread; struct tty; @@ -71,11 +74,71 @@ typedef uint32_t term_char_t; #define TCHAR_CHARACTER(c) ((c) & 0x1fffff) #define TCHAR_FORMAT(c) (((c) >> 21) & 0x1f) #define TCHAR_FGCOLOR(c) (((c) >> 26) & 0x7) -#define TCHAR_BGCOLOR(c) ((c) >> 29) +#define TCHAR_BGCOLOR(c) (((c) >> 29) & 0x7) + +typedef teken_attr_t term_attr_t; typedef teken_color_t term_color_t; +#define TCOLOR_FG(c) (((c) & 0x7) << 26) +#define TCOLOR_BG(c) (((c) & 0x7) << 29) #define TCOLOR_LIGHT(c) ((c) | 0x8) #define TCOLOR_DARK(c) ((c) & ~0x8) + +#define TFORMAT(c) (((c) & 0x1f) << 21) + +/* syscons(4) compatible color attributes for foreground text */ +#define FG_BLACK TCOLOR_FG(TC_BLACK) +#define FG_BLUE TCOLOR_FG(TC_BLUE) +#define FG_GREEN TCOLOR_FG(TC_GREEN) +#define FG_CYAN TCOLOR_FG(TC_CYAN) +#define FG_RED TCOLOR_FG(TC_RED) +#define FG_MAGENTA TCOLOR_FG(TC_MAGENTA) +#define FG_BROWN TCOLOR_FG(TC_BROWN) +#define FG_LIGHTGREY TCOLOR_FG(TC_WHITE) +#define FG_DARKGREY (TFORMAT(TF_BOLD) | TCOLOR_FG(TC_BLACK)) +#define FG_LIGHTBLUE (TFORMAT(TF_BOLD) | TCOLOR_FG(TC_BLUE)) +#define FG_LIGHTGREEN (TFORMAT(TF_BOLD) | TCOLOR_FG(TC_GREEN)) +#define FG_LIGHTCYAN (TFORMAT(TF_BOLD) | TCOLOR_FG(TC_CYAN)) +#define FG_LIGHTRED (TFORMAT(TF_BOLD) | TCOLOR_FG(TC_RED)) +#define FG_LIGHTMAGENTA (TFORMAT(TF_BOLD) | TCOLOR_FG(TC_MAGENTA)) +#define FG_YELLOW (TFORMAT(TF_BOLD) | TCOLOR_FG(TC_BROWN)) +#define FG_WHITE (TFORMAT(TF_BOLD) | TCOLOR_FG(TC_WHITE)) +#define FG_BLINK TFORMAT(TF_BLINK) + +/* syscons(4) compatible color attributes for text background */ +#define BG_BLACK TCOLOR_BG(TC_BLACK) +#define BG_BLUE TCOLOR_BG(TC_BLUE) +#define BG_GREEN TCOLOR_BG(TC_GREEN) +#define BG_CYAN TCOLOR_BG(TC_CYAN) +#define BG_RED TCOLOR_BG(TC_RED) +#define BG_MAGENTA TCOLOR_BG(TC_MAGENTA) +#define BG_BROWN TCOLOR_BG(TC_BROWN) +#define BG_LIGHTGREY TCOLOR_BG(TC_WHITE) +#define BG_DARKGREY (TFORMAT(TF_BOLD) | TCOLOR_BG(TC_BLACK)) +#define BG_LIGHTBLUE (TFORMAT(TF_BOLD) | TCOLOR_BG(TC_BLUE)) +#define BG_LIGHTGREEN (TFORMAT(TF_BOLD) | TCOLOR_BG(TC_GREEN)) +#define BG_LIGHTCYAN (TFORMAT(TF_BOLD) | TCOLOR_BG(TC_CYAN)) +#define BG_LIGHTRED (TFORMAT(TF_BOLD) | TCOLOR_BG(TC_RED)) +#define BG_LIGHTMAGENTA (TFORMAT(TF_BOLD) | TCOLOR_BG(TC_MAGENTA)) +#define BG_YELLOW (TFORMAT(TF_BOLD) | TCOLOR_BG(TC_BROWN)) +#define BG_WHITE (TFORMAT(TF_BOLD) | TCOLOR_BG(TC_WHITE)) + +#ifndef TERMINAL_NORM_ATTR +#ifdef SC_NORM_ATTR +#define TERMINAL_NORM_ATTR SC_NORM_ATTR +#else +#define TERMINAL_NORM_ATTR (FG_LIGHTGREY | BG_BLACK) +#endif +#endif + +#ifndef TERMINAL_KERN_ATTR +#ifdef SC_KERNEL_CONS_ATTR +#define TERMINAL_KERN_ATTR SC_KERNEL_CONS_ATTR +#else +#define TERMINAL_KERN_ATTR (FG_WHITE | BG_BLACK) +#endif +#endif + typedef teken_pos_t term_pos_t; typedef teken_rect_t term_rect_t; @@ -138,7 +201,7 @@ struct terminal { struct terminal *terminal_alloc(const struct terminal_class *tc, void *softc); void terminal_maketty(struct terminal *tm, const char *fmt, ...); void terminal_set_winsize_blank(struct terminal *tm, - const struct winsize *size, int blank); + const struct winsize *size, int blank, const term_attr_t *attr); void terminal_set_winsize(struct terminal *tm, const struct winsize *size); void terminal_mute(struct terminal *tm, int yes); void terminal_input_char(struct terminal *tm, term_char_t c); From owner-svn-src-stable@FreeBSD.ORG Mon Jun 30 14:12:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D2666CB; Mon, 30 Jun 2014 14:12:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C19E2BCF; Mon, 30 Jun 2014 14:12:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5UECXId019354; Mon, 30 Jun 2014 14:12:33 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5UECXdH019353; Mon, 30 Jun 2014 14:12:33 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201406301412.s5UECXdH019353@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Mon, 30 Jun 2014 14:12:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268041 - stable/9/lib/libc/stdtime X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2014 14:12:33 -0000 Author: pfg Date: Mon Jun 30 14:12:32 2014 New Revision: 268041 URL: http://svnweb.freebsd.org/changeset/base/268041 Log: MFC r267544: Update license to strptime(3) implementation. Our strptime(3) implementation was the base for the illumos implementation and after contacting the author, Kevin Rudy stated the code is under a 2-Clause BSD License [1] After reviewing our local changes to the file in question, the FreeBSD Foundation has agreed that their contributions to this file are not required to carry clause 3 or 4 so the file can be relicensed as in Illumos [2]. References: [1] https://www.illumos.org/issues/357 [2] Illumos Revision: 13222:02526851ba75 Approved: core (jhb) Approved: FreeBSD Foundation (emaste) Modified: stable/9/lib/libc/stdtime/strptime.c Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/stdtime/ (props changed) Modified: stable/9/lib/libc/stdtime/strptime.c ============================================================================== --- stable/9/lib/libc/stdtime/strptime.c Mon Jun 30 12:50:09 2014 (r268040) +++ stable/9/lib/libc/stdtime/strptime.c Mon Jun 30 14:12:32 2014 (r268041) @@ -1,25 +1,4 @@ -/* - * Powerdog Industries kindly requests feedback from anyone modifying - * this function: - * - * Date: Thu, 05 Jun 1997 23:17:17 -0400 - * From: Kevin Ruddy - * To: James FitzGibbon - * Subject: Re: Use of your strptime(3) code (fwd) - * - * The reason for the "no mod" clause was so that modifications would - * come back and we could integrate them and reissue so that a wider - * audience could use it (thereby spreading the wealth). This has - * made it possible to get strptime to work on many operating systems. - * I'm not sure why that's "plain unacceptable" to the FreeBSD team. - * - * Anyway, you can change it to "with or without modification" as - * you see fit. Enjoy. - * - * Kevin Ruddy - * Powerdog Industries, Inc. - */ -/* +/*- * Copyright (c) 1994 Powerdog Industries. All rights reserved. * * Copyright (c) 2011 The FreeBSD Foundation @@ -36,12 +15,6 @@ * notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgement: - * This product includes software developed by Powerdog Industries. - * 4. The name of Powerdog Industries may not be used to endorse or - * promote products derived from this software without specific prior - * written permission. * * THIS SOFTWARE IS PROVIDED BY POWERDOG INDUSTRIES ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -54,6 +27,10 @@ * 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. + * + * The views and conclusions contained in the software and documentation + * are those of the authors and should not be interpreted as representing + * official policies, either expressed or implied, of Powerdog Industries. */ #include From owner-svn-src-stable@FreeBSD.ORG Mon Jun 30 14:15:17 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A05A9651; Mon, 30 Jun 2014 14:15:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C0292C05; Mon, 30 Jun 2014 14:15:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5UEFHVp020076; Mon, 30 Jun 2014 14:15:17 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5UEFGJQ020073; Mon, 30 Jun 2014 14:15:16 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201406301415.s5UEFGJQ020073@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Mon, 30 Jun 2014 14:15:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268042 - stable/9/lib/libc/stdtime X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2014 14:15:17 -0000 Author: pfg Date: Mon Jun 30 14:15:16 2014 New Revision: 268042 URL: http://svnweb.freebsd.org/changeset/base/268042 Log: MFC r267601: stdtime: style(9) fixes. Obtained from: illumos Modified: stable/9/lib/libc/stdtime/strftime.c stable/9/lib/libc/stdtime/strptime.c stable/9/lib/libc/stdtime/timelocal.c Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/stdtime/ (props changed) Modified: stable/9/lib/libc/stdtime/strftime.c ============================================================================== --- stable/9/lib/libc/stdtime/strftime.c Mon Jun 30 14:12:32 2014 (r268041) +++ stable/9/lib/libc/stdtime/strftime.c Mon Jun 30 14:15:16 2014 (r268042) @@ -24,9 +24,9 @@ #ifndef NOID static const char elsieid[] = "@(#)strftime.3 8.3"; /* -** Based on the UCB version with the ID appearing below. -** This is ANSIish only when "multibyte character == plain character". -*/ + * Based on the UCB version with the ID appearing below. + * This is ANSIish only when "multibyte character == plain character". + */ #endif /* !defined NOID */ #endif /* !defined lint */ @@ -57,32 +57,32 @@ extern char * tzname[]; #define YEAR_2000_NAME "CHECK_STRFTIME_FORMATS_FOR_TWO_DIGIT_YEARS" #endif /* !defined YEAR_2000_NAME */ -#define IN_NONE 0 -#define IN_SOME 1 -#define IN_THIS 2 -#define IN_ALL 3 - -#define PAD_DEFAULT 0 -#define PAD_LESS 1 -#define PAD_SPACE 2 -#define PAD_ZERO 3 +#define IN_NONE 0 +#define IN_SOME 1 +#define IN_THIS 2 +#define IN_ALL 3 + +#define PAD_DEFAULT 0 +#define PAD_LESS 1 +#define PAD_SPACE 2 +#define PAD_ZERO 3 static const char* fmt_padding[][4] = { /* DEFAULT, LESS, SPACE, ZERO */ -#define PAD_FMT_MONTHDAY 0 -#define PAD_FMT_HMS 0 -#define PAD_FMT_CENTURY 0 -#define PAD_FMT_SHORTYEAR 0 -#define PAD_FMT_MONTH 0 -#define PAD_FMT_WEEKOFYEAR 0 -#define PAD_FMT_DAYOFMONTH 0 +#define PAD_FMT_MONTHDAY 0 +#define PAD_FMT_HMS 0 +#define PAD_FMT_CENTURY 0 +#define PAD_FMT_SHORTYEAR 0 +#define PAD_FMT_MONTH 0 +#define PAD_FMT_WEEKOFYEAR 0 +#define PAD_FMT_DAYOFMONTH 0 { "%02d", "%d", "%2d", "%02d" }, -#define PAD_FMT_SDAYOFMONTH 1 -#define PAD_FMT_SHMS 1 +#define PAD_FMT_SDAYOFMONTH 1 +#define PAD_FMT_SHMS 1 { "%2d", "%d", "%2d", "%02d" }, #define PAD_FMT_DAYOFYEAR 2 { "%03d", "%d", "%3d", "%03d" }, -#define PAD_FMT_YEAR 3 +#define PAD_FMT_YEAR 3 { "%04d", "%d", "%4d", "%04d" } }; @@ -114,7 +114,7 @@ strftime_l(char * __restrict s, size_t m } #endif /* !defined NO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU */ if (p == s + maxsize) - return 0; + return (0); *p = '\0'; return p - s; } @@ -176,12 +176,12 @@ label: continue; case 'C': /* - ** %C used to do a... - ** _fmt("%a %b %e %X %Y", t); - ** ...whereas now POSIX 1003.2 calls for - ** something completely different. - ** (ado, 1993-05-24) - */ + * %C used to do a... + * _fmt("%a %b %e %X %Y", t); + * ...whereas now POSIX 1003.2 calls for + * something completely different. + * (ado, 1993-05-24) + */ pt = _yconv(t->tm_year, TM_YEAR_BASE, 1, 0, pt, ptlim); continue; @@ -210,17 +210,17 @@ label: goto label; case 'O': /* - ** C99 locale modifiers. - ** The sequences - ** %Ec %EC %Ex %EX %Ey %EY - ** %Od %oe %OH %OI %Om %OM - ** %OS %Ou %OU %OV %Ow %OW %Oy - ** are supposed to provide alternate - ** representations. - ** - ** FreeBSD extension - ** %OB - */ + * C99 locale modifiers. + * The sequences + * %Ec %EC %Ex %EX %Ey %EY + * %Od %oe %OH %OI %Om %OM + * %OS %Ou %OU %OV %Ow %OW %Oy + * are supposed to provide alternate + * representations. + * + * FreeBSD extension + * %OB + */ if (Ealternative || Oalternative) break; Oalternative++; @@ -239,7 +239,8 @@ label: case 'I': pt = _conv((t->tm_hour % 12) ? (t->tm_hour % 12) : 12, - fmt_padding[PAD_FMT_HMS][PadIndex], pt, ptlim); + fmt_padding[PAD_FMT_HMS][PadIndex], + pt, ptlim); continue; case 'j': pt = _conv(t->tm_yday + 1, @@ -247,15 +248,15 @@ label: continue; case 'k': /* - ** This used to be... - ** _conv(t->tm_hour % 12 ? - ** t->tm_hour % 12 : 12, 2, ' '); - ** ...and has been changed to the below to - ** match SunOS 4.1.1 and Arnold Robbins' - ** strftime version 3.0. That is, "%k" and - ** "%l" have been swapped. - ** (ado, 1993-05-24) - */ + * This used to be... + * _conv(t->tm_hour % 12 ? + * t->tm_hour % 12 : 12, 2, ' '); + * ...and has been changed to the below to + * match SunOS 4.1.1 and Arnold Robbins' + * strftime version 3.0. That is, "%k" and + * "%l" have been swapped. + * (ado, 1993-05-24) + */ pt = _conv(t->tm_hour, fmt_padding[PAD_FMT_SHMS][PadIndex], pt, ptlim); continue; @@ -269,17 +270,18 @@ label: #endif /* defined KITCHEN_SINK */ case 'l': /* - ** This used to be... - ** _conv(t->tm_hour, 2, ' '); - ** ...and has been changed to the below to - ** match SunOS 4.1.1 and Arnold Robbin's - ** strftime version 3.0. That is, "%k" and - ** "%l" have been swapped. - ** (ado, 1993-05-24) - */ + * This used to be... + * _conv(t->tm_hour, 2, ' '); + * ...and has been changed to the below to + * match SunOS 4.1.1 and Arnold Robbin's + * strftime version 3.0. That is, "%k" and + * "%l" have been swapped. + * (ado, 1993-05-24) + */ pt = _conv((t->tm_hour % 12) ? (t->tm_hour % 12) : 12, - fmt_padding[PAD_FMT_SHMS][PadIndex], pt, ptlim); + fmt_padding[PAD_FMT_SHMS][PadIndex], + pt, ptlim); continue; case 'M': pt = _conv(t->tm_min, fmt_padding[PAD_FMT_HMS][PadIndex], @@ -287,15 +289,15 @@ label: continue; case 'm': pt = _conv(t->tm_mon + 1, - fmt_padding[PAD_FMT_MONTH][PadIndex], pt, ptlim); + fmt_padding[PAD_FMT_MONTH][PadIndex], + pt, ptlim); continue; case 'n': pt = _add("\n", pt, ptlim); continue; case 'p': pt = _add((t->tm_hour >= (HOURSPERDAY / 2)) ? - tptr->pm : - tptr->am, + tptr->pm : tptr->am, pt, ptlim); continue; case 'R': @@ -339,11 +341,11 @@ label: continue; case 'u': /* - ** From Arnold Robbins' strftime version 3.0: - ** "ISO 8601: Weekday as a decimal number - ** [1 (Monday) - 7]" - ** (ado, 1993-05-24) - */ + * From Arnold Robbins' strftime version 3.0: + * "ISO 8601: Weekday as a decimal number + * [1 (Monday) - 7]" + * (ado, 1993-05-24) + */ pt = _conv((t->tm_wday == 0) ? DAYSPERWEEK : t->tm_wday, "%d", pt, ptlim); @@ -352,23 +354,23 @@ label: case 'G': /* ISO 8601 year (four digits) */ case 'g': /* ISO 8601 year (two digits) */ /* -** From Arnold Robbins' strftime version 3.0: "the week number of the -** year (the first Monday as the first day of week 1) as a decimal number -** (01-53)." -** (ado, 1993-05-24) -** -** From "http://www.ft.uni-erlangen.de/~mskuhn/iso-time.html" by Markus Kuhn: -** "Week 01 of a year is per definition the first week which has the -** Thursday in this year, which is equivalent to the week which contains -** the fourth day of January. In other words, the first week of a new year -** is the week which has the majority of its days in the new year. Week 01 -** might also contain days from the previous year and the week before week -** 01 of a year is the last week (52 or 53) of the previous year even if -** it contains days from the new year. A week starts with Monday (day 1) -** and ends with Sunday (day 7). For example, the first week of the year -** 1997 lasts from 1996-12-30 to 1997-01-05..." -** (ado, 1996-01-02) -*/ + * From Arnold Robbins' strftime version 3.0: "the week number of the + * year (the first Monday as the first day of week 1) as a decimal number + * (01-53)." + * (ado, 1993-05-24) + * + * From "http://www.ft.uni-erlangen.de/~mskuhn/iso-time.html" by Markus Kuhn: + * "Week 01 of a year is per definition the first week which has the + * Thursday in this year, which is equivalent to the week which contains + * the fourth day of January. In other words, the first week of a new year + * is the week which has the majority of its days in the new year. Week 01 + * might also contain days from the previous year and the week before week + * 01 of a year is the last week (52 or 53) of the previous year even if + * it contains days from the new year. A week starts with Monday (day 1) + * and ends with Sunday (day 7). For example, the first week of the year + * 1997 lasts from 1996-12-30 to 1997-01-05..." + * (ado, 1996-01-02) + */ { int year; int base; @@ -389,15 +391,15 @@ label: DAYSPERLYEAR : DAYSPERNYEAR; /* - ** What yday (-3 ... 3) does - ** the ISO year begin on? - */ + * What yday (-3 ... 3) does + * the ISO year begin on? + */ bot = ((yday + 11 - wday) % DAYSPERWEEK) - 3; /* - ** What yday does the NEXT - ** ISO year begin on? - */ + * What yday does the NEXT + * ISO year begin on? + */ top = bot - (len % DAYSPERWEEK); if (top < -3) @@ -438,10 +440,10 @@ label: continue; case 'v': /* - ** From Arnold Robbins' strftime version 3.0: - ** "date as dd-bbb-YYYY" - ** (ado, 1993-05-24) - */ + * From Arnold Robbins' strftime version 3.0: + * "date as dd-bbb-YYYY" + * (ado, 1993-05-24) + */ pt = _fmt("%e-%b-%Y", t, pt, ptlim, warnp, loc); continue; case 'W': @@ -487,10 +489,10 @@ label: pt = _add(tzname[t->tm_isdst != 0], pt, ptlim); /* - ** C99 says that %Z must be replaced by the - ** empty string if the time zone is not - ** determinable. - */ + * C99 says that %Z must be replaced by the + * empty string if the time zone is not + * determinable. + */ continue; case 'z': { @@ -503,24 +505,24 @@ label: diff = t->TM_GMTOFF; #else /* !defined TM_GMTOFF */ /* - ** C99 says that the UTC offset must - ** be computed by looking only at - ** tm_isdst. This requirement is - ** incorrect, since it means the code - ** must rely on magic (in this case - ** altzone and timezone), and the - ** magic might not have the correct - ** offset. Doing things correctly is - ** tricky and requires disobeying C99; - ** see GNU C strftime for details. - ** For now, punt and conform to the - ** standard, even though it's incorrect. - ** - ** C99 says that %z must be replaced by the - ** empty string if the time zone is not - ** determinable, so output nothing if the - ** appropriate variables are not available. - */ + * C99 says that the UTC offset must + * be computed by looking only at + * tm_isdst. This requirement is + * incorrect, since it means the code + * must rely on magic (in this case + * altzone and timezone), and the + * magic might not have the correct + * offset. Doing things correctly is + * tricky and requires disobeying C99; + * see GNU C strftime for details. + * For now, punt and conform to the + * standard, even though it's incorrect. + * + * C99 says that %z must be replaced by the + * empty string if the time zone is not + * determinable, so output nothing if the + * appropriate variables are not available. + */ if (t->tm_isdst == 0) #ifdef USG_COMPAT diff = -timezone; @@ -537,7 +539,8 @@ label: if (diff < 0) { sign = "-"; diff = -diff; - } else sign = "+"; + } else + sign = "+"; pt = _add(sign, pt, ptlim); diff /= SECSPERMIN; diff = (diff / MINSPERHOUR) * 100 + @@ -567,10 +570,10 @@ label: goto label; case '%': /* - ** X311J/88-090 (4.12.3.5): if conversion char is - ** undefined, behavior is undefined. Print out the - ** character itself as printf(3) also does. - */ + * X311J/88-090 (4.12.3.5): if conversion char is + * undefined, behavior is undefined. Print out the + * character itself as printf(3) also does. + */ default: break; } @@ -579,7 +582,7 @@ label: break; *pt++ = *format; } - return pt; + return (pt); } static char * @@ -603,16 +606,16 @@ const char * const ptlim; { while (pt < ptlim && (*pt = *str++) != '\0') ++pt; - return pt; + return (pt); } /* -** POSIX and the C Standard are unclear or inconsistent about -** what %C and %y do if the year is negative or exceeds 9999. -** Use the convention that %C concatenated with %y yields the -** same output as %Y, and that %Y contains at least 4 bytes, -** with more only if necessary. -*/ + * POSIX and the C Standard are unclear or inconsistent about + * what %C and %y do if the year is negative or exceeds 9999. + * Use the convention that %C concatenated with %y yields the + * same output as %Y, and that %Y contains at least 4 bytes, + * with more only if necessary. + */ static char * _yconv(a, b, convert_top, convert_yy, pt, ptlim) @@ -626,7 +629,7 @@ const char * const ptlim; register int lead; register int trail; -#define DIVISOR 100 +#define DIVISOR 100 trail = a % DIVISOR + b % DIVISOR; lead = a / DIVISOR + b / DIVISOR + trail / DIVISOR; trail %= DIVISOR; @@ -644,5 +647,5 @@ const char * const ptlim; } if (convert_yy) pt = _conv(((trail < 0) ? -trail : trail), "%02d", pt, ptlim); - return pt; + return (pt); } Modified: stable/9/lib/libc/stdtime/strptime.c ============================================================================== --- stable/9/lib/libc/stdtime/strptime.c Mon Jun 30 14:12:32 2014 (r268041) +++ stable/9/lib/libc/stdtime/strptime.c Mon Jun 30 14:15:16 2014 (r268042) @@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$"); static char * _strptime(const char *, const char *, struct tm *, int *, locale_t); -#define asizeof(a) (sizeof (a) / sizeof ((a)[0])) +#define asizeof(a) (sizeof (a) / sizeof ((a)[0])) static char * _strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp, @@ -64,8 +64,7 @@ _strptime(const char *buf, const char *f { char c; const char *ptr; - int i, - len; + int i, len; int Ealternative, Oalternative; struct lc_time_T *tptr = __get_current_time_locale(locale); @@ -82,7 +81,7 @@ _strptime(const char *buf, const char *f isspace_l((unsigned char)*buf, locale)) buf++; else if (c != *buf++) - return 0; + return (NULL); continue; } @@ -94,18 +93,18 @@ label: case 0: case '%': if (*buf++ != '%') - return 0; + return (NULL); break; case '+': buf = _strptime(buf, tptr->date_fmt, tm, GMTp, locale); - if (buf == 0) - return 0; + if (buf == NULL) + return (NULL); break; case 'C': if (!isdigit_l((unsigned char)*buf, locale)) - return 0; + return (NULL); /* XXX This will break for 3-digit centuries. */ len = 2; @@ -116,21 +115,21 @@ label: len--; } if (i < 19) - return 0; + return (NULL); tm->tm_year = i * 100 - 1900; break; case 'c': buf = _strptime(buf, tptr->c_fmt, tm, GMTp, locale); - if (buf == 0) - return 0; + if (buf == NULL) + return (NULL); break; case 'D': buf = _strptime(buf, "%m/%d/%y", tm, GMTp, locale); - if (buf == 0) - return 0; + if (buf == NULL) + return (NULL); break; case 'E': @@ -147,43 +146,43 @@ label: case 'F': buf = _strptime(buf, "%Y-%m-%d", tm, GMTp, locale); - if (buf == 0) - return 0; + if (buf == NULL) + return (NULL); break; case 'R': buf = _strptime(buf, "%H:%M", tm, GMTp, locale); - if (buf == 0) - return 0; + if (buf == NULL) + return (NULL); break; case 'r': buf = _strptime(buf, tptr->ampm_fmt, tm, GMTp, locale); - if (buf == 0) - return 0; + if (buf == NULL) + return (NULL); break; case 'T': buf = _strptime(buf, "%H:%M:%S", tm, GMTp, locale); - if (buf == 0) - return 0; + if (buf == NULL) + return (NULL); break; case 'X': buf = _strptime(buf, tptr->X_fmt, tm, GMTp, locale); - if (buf == 0) - return 0; + if (buf == NULL) + return (NULL); break; case 'x': buf = _strptime(buf, tptr->x_fmt, tm, GMTp, locale); - if (buf == 0) - return 0; + if (buf == NULL) + return (NULL); break; case 'j': if (!isdigit_l((unsigned char)*buf, locale)) - return 0; + return (NULL); len = 3; for (i = 0; len && *buf != 0 && @@ -193,7 +192,7 @@ label: len--; } if (i < 1 || i > 366) - return 0; + return (NULL); tm->tm_yday = i - 1; break; @@ -205,7 +204,7 @@ label: break; if (!isdigit_l((unsigned char)*buf, locale)) - return 0; + return (NULL); len = 2; for (i = 0; len && *buf != 0 && @@ -217,11 +216,11 @@ label: if (c == 'M') { if (i > 59) - return 0; + return (NULL); tm->tm_min = i; } else { if (i > 60) - return 0; + return (NULL); tm->tm_sec = i; } @@ -245,7 +244,7 @@ label: * digits if used incorrectly. */ if (!isdigit_l((unsigned char)*buf, locale)) - return 0; + return (NULL); len = 2; for (i = 0; len && *buf != 0 && @@ -256,9 +255,9 @@ label: } if (c == 'H' || c == 'k') { if (i > 23) - return 0; + return (NULL); } else if (i > 12) - return 0; + return (NULL); tm->tm_hour = i; @@ -277,7 +276,7 @@ label: len = strlen(tptr->am); if (strncasecmp_l(buf, tptr->am, len, locale) == 0) { if (tm->tm_hour > 12) - return 0; + return (NULL); if (tm->tm_hour == 12) tm->tm_hour = 0; buf += len; @@ -287,14 +286,14 @@ label: len = strlen(tptr->pm); if (strncasecmp_l(buf, tptr->pm, len, locale) == 0) { if (tm->tm_hour > 12) - return 0; + return (NULL); if (tm->tm_hour != 12) tm->tm_hour += 12; buf += len; break; } - return 0; + return (NULL); case 'A': case 'a': @@ -309,7 +308,7 @@ label: break; } if (i == asizeof(tptr->weekday)) - return 0; + return (NULL); tm->tm_wday = i; buf += len; @@ -324,7 +323,7 @@ label: * range for now. */ if (!isdigit_l((unsigned char)*buf, locale)) - return 0; + return (NULL); len = 2; for (i = 0; len && *buf != 0 && @@ -334,7 +333,7 @@ label: len--; } if (i > 53) - return 0; + return (NULL); if (*buf != 0 && isspace_l((unsigned char)*buf, locale)) @@ -345,11 +344,11 @@ label: case 'w': if (!isdigit_l((unsigned char)*buf, locale)) - return 0; + return (NULL); i = *buf - '0'; if (i > 6) - return 0; + return (NULL); tm->tm_wday = i; @@ -371,7 +370,7 @@ label: * digits if used incorrectly. */ if (!isdigit_l((unsigned char)*buf, locale)) - return 0; + return (NULL); len = 2; for (i = 0; len && *buf != 0 && @@ -381,7 +380,7 @@ label: len--; } if (i > 31) - return 0; + return (NULL); tm->tm_mday = i; @@ -424,7 +423,7 @@ label: } } if (i == asizeof(tptr->month)) - return 0; + return (NULL); tm->tm_mon = i; buf += len; @@ -432,7 +431,7 @@ label: case 'm': if (!isdigit_l((unsigned char)*buf, locale)) - return 0; + return (NULL); len = 2; for (i = 0; len && *buf != 0 && @@ -442,7 +441,7 @@ label: len--; } if (i < 1 || i > 12) - return 0; + return (NULL); tm->tm_mon = i - 1; @@ -465,7 +464,7 @@ label: n = strtol_l(buf, &cp, 10, locale); if (errno == ERANGE || (long)(t = n) != n) { errno = sverrno; - return 0; + return (NULL); } errno = sverrno; buf = cp; @@ -481,7 +480,7 @@ label: break; if (!isdigit_l((unsigned char)*buf, locale)) - return 0; + return (NULL); len = (c == 'Y') ? 4 : 2; for (i = 0; len && *buf != 0 && @@ -495,7 +494,7 @@ label: if (c == 'y' && i < 69) i += 100; if (i < 0) - return 0; + return (NULL); tm->tm_year = i; @@ -526,7 +525,7 @@ label: } else if (0 == strcmp(zonestr, tzname[1])) { tm->tm_isdst = 1; } else { - return 0; + return (NULL); } buf += cp - buf; } @@ -541,7 +540,7 @@ label: if (*buf == '-') sign = -1; else - return 0; + return (NULL); } buf++; @@ -552,7 +551,7 @@ label: i += *buf - '0'; buf++; } else - return 0; + return (NULL); } tm->tm_hour -= sign * (i / 100); @@ -562,7 +561,7 @@ label: break; } } - return (char *)buf; + return ((char *)buf); } Modified: stable/9/lib/libc/stdtime/timelocal.c ============================================================================== --- stable/9/lib/libc/stdtime/timelocal.c Mon Jun 30 14:12:32 2014 (r268041) +++ stable/9/lib/libc/stdtime/timelocal.c Mon Jun 30 14:15:16 2014 (r268042) @@ -46,7 +46,7 @@ struct xlocale_time { struct xlocale_time __xlocale_global_time; -#define LCTIME_SIZE (sizeof(struct lc_time_T) / sizeof(char *)) +#define LCTIME_SIZE (sizeof(struct lc_time_T) / sizeof(char *)) static const struct lc_time_T _C_time_locale = { { From owner-svn-src-stable@FreeBSD.ORG Mon Jun 30 14:52:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5757CAC; Mon, 30 Jun 2014 14:52:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43E6E2FF0; Mon, 30 Jun 2014 14:52:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5UEqf0k038498; Mon, 30 Jun 2014 14:52:41 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5UEqfIg038497; Mon, 30 Jun 2014 14:52:41 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201406301452.s5UEqfIg038497@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Mon, 30 Jun 2014 14:52:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268043 - stable/10/lib/libc/stdtime X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2014 14:52:41 -0000 Author: pfg Date: Mon Jun 30 14:52:40 2014 New Revision: 268043 URL: http://svnweb.freebsd.org/changeset/base/268043 Log: MFC r267627: strptime: add support for %t and %n Posix strptime() requires support for %t and %n, which were added to the illumos port. Curiously we were skipping white spaces by default in most other cases making %t meaningless. We now skip spaces in the case of the %e specifier as strftime(3) explicitly adds a space for the single digit case. Reference: http://pubs.opengroup.org/onlinepubs/009695399/functions/strptime.html PR: 173421 Obtained from: Illumos (Rev. a11c1571b6942161b0186d0588609448066892c2) Modified: stable/10/lib/libc/stdtime/strptime.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdtime/strptime.c ============================================================================== --- stable/10/lib/libc/stdtime/strptime.c Mon Jun 30 14:15:16 2014 (r268042) +++ stable/10/lib/libc/stdtime/strptime.c Mon Jun 30 14:52:40 2014 (r268043) @@ -1,4 +1,6 @@ /*- + * Copyright (c) 2014 Gary Mills + * Copyright 2011, Nexenta Systems, Inc. All rights reserved. * Copyright (c) 1994 Powerdog Industries. All rights reserved. * * Copyright (c) 2011 The FreeBSD Foundation @@ -224,11 +226,6 @@ label: tm->tm_sec = i; } - if (*buf != 0 && - isspace_l((unsigned char)*buf, locale)) - while (*ptr != 0 && - !isspace_l((unsigned char)*ptr, locale)) - ptr++; break; case 'H': @@ -261,11 +258,6 @@ label: tm->tm_hour = i; - if (*buf != 0 && - isspace_l((unsigned char)*buf, locale)) - while (*ptr != 0 && - !isspace_l((unsigned char)*ptr, locale)) - ptr++; break; case 'p': @@ -335,11 +327,6 @@ label: if (i > 53) return (NULL); - if (*buf != 0 && - isspace_l((unsigned char)*buf, locale)) - while (*ptr != 0 && - !isspace_l((unsigned char)*ptr, locale)) - ptr++; break; case 'w': @@ -352,18 +339,22 @@ label: tm->tm_wday = i; - if (*buf != 0 && - isspace_l((unsigned char)*buf, locale)) - while (*ptr != 0 && - !isspace_l((unsigned char)*ptr, locale)) - ptr++; break; - case 'd': case 'e': /* - * The %e specifier is explicitly documented as not - * being zero-padded but there is no harm in allowing + * With %e format, our strftime(3) adds a blank space + * before single digits. + */ + if (*buf != 0 && + isspace_l((unsigned char)*buf, locale)) + buf++; + /* FALLTHROUGH */ + case 'd': + /* + * The %e specifier was once explicitly documented as + * not being zero-padded but was later changed to + * equivalent to %d. There is no harm in allowing * such padding. * * XXX The %e specifier may gobble one too many @@ -384,11 +375,6 @@ label: tm->tm_mday = i; - if (*buf != 0 && - isspace_l((unsigned char)*buf, locale)) - while (*ptr != 0 && - !isspace_l((unsigned char)*ptr, locale)) - ptr++; break; case 'B': @@ -445,11 +431,6 @@ label: tm->tm_mon = i - 1; - if (*buf != 0 && - isspace_l((unsigned char)*buf, locale)) - while (*ptr != 0 && - !isspace_l((unsigned char)*ptr, locale)) - ptr++; break; case 's': @@ -498,11 +479,6 @@ label: tm->tm_year = i; - if (*buf != 0 && - isspace_l((unsigned char)*buf, locale)) - while (*ptr != 0 && - !isspace_l((unsigned char)*ptr, locale)) - ptr++; break; case 'Z': @@ -559,6 +535,12 @@ label: *GMTp = 1; } break; + + case 'n': + case 't': + while (isspace_l((unsigned char)*buf, locale)) + buf++; + break; } } return ((char *)buf); From owner-svn-src-stable@FreeBSD.ORG Mon Jun 30 16:23:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 771E92B9; Mon, 30 Jun 2014 16:23:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58DBF2939; Mon, 30 Jun 2014 16:23:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5UGNX7G083467; Mon, 30 Jun 2014 16:23:33 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5UGNWeR083459; Mon, 30 Jun 2014 16:23:32 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201406301623.s5UGNWeR083459@svn.freebsd.org> From: Xin LI Date: Mon, 30 Jun 2014 16:23:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268046 - stable/10/sys/dev/oce X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2014 16:23:33 -0000 Author: delphij Date: Mon Jun 30 16:23:31 2014 New Revision: 268046 URL: http://svnweb.freebsd.org/changeset/base/268046 Log: MFC r267839: Apply vendor fixes for big endian support and 20GBps/25GBps link speeds. Many thanks to Emulex for their continued support of FreeBSD! Submitted by: Venkata Duvvuru Modified: stable/10/sys/dev/oce/oce_hw.c stable/10/sys/dev/oce/oce_hw.h stable/10/sys/dev/oce/oce_if.c stable/10/sys/dev/oce/oce_if.h stable/10/sys/dev/oce/oce_mbox.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/oce/oce_hw.c ============================================================================== --- stable/10/sys/dev/oce/oce_hw.c Mon Jun 30 16:18:38 2014 (r268045) +++ stable/10/sys/dev/oce/oce_hw.c Mon Jun 30 16:23:31 2014 (r268046) @@ -487,11 +487,7 @@ oce_hw_start(POCE_SOFTC sc) if_link_state_change(sc->ifp, LINK_STATE_DOWN); } - if (link.mac_speed > 0 && link.mac_speed < 5) - sc->link_speed = link.mac_speed; - else - sc->link_speed = 0; - + sc->link_speed = link.phys_port_speed; sc->qos_link_speed = (uint32_t )link.qos_link_speed * 10; rc = oce_start_mq(sc->mq); Modified: stable/10/sys/dev/oce/oce_hw.h ============================================================================== --- stable/10/sys/dev/oce/oce_hw.h Mon Jun 30 16:18:38 2014 (r268045) +++ stable/10/sys/dev/oce/oce_hw.h Mon Jun 30 16:23:31 2014 (r268046) @@ -1023,7 +1023,7 @@ struct mbx_hdr { #define OCE_MBX_ADDL_STATUS(_MHDR) ((_MHDR)->u0.rsp.additional_status) #define OCE_MBX_STATUS(_MHDR) ((_MHDR)->u0.rsp.status) -/* [05] OPCODE_COMMON_QUERY_LINK_CONFIG */ +/* [05] OPCODE_COMMON_QUERY_LINK_CONFIG_V1 */ struct mbx_query_common_link_config { struct mbx_hdr hdr; union { @@ -1032,16 +1032,37 @@ struct mbx_query_common_link_config { } req; struct { - /* dw 0 */ - uint8_t physical_port; - uint8_t mac_duplex; - uint8_t mac_speed; - uint8_t mac_fault; - /* dw 1 */ - uint8_t mgmt_mac_duplex; - uint8_t mgmt_mac_speed; + #ifdef _BIG_ENDIAN + uint32_t physical_port_fault:8; + uint32_t physical_port_speed:8; + uint32_t link_duplex:8; + uint32_t pt:2; + uint32_t port_number:6; + uint16_t qos_link_speed; - uint32_t logical_link_status; + uint16_t rsvd0; + + uint32_t rsvd1:21; + uint32_t phys_fcv:1; + uint32_t phys_rxf:1; + uint32_t phys_txf:1; + uint32_t logical_link_status:8; + #else + uint32_t port_number:6; + uint32_t pt:2; + uint32_t link_duplex:8; + uint32_t physical_port_speed:8; + uint32_t physical_port_fault:8; + + uint16_t rsvd0; + uint16_t qos_link_speed; + + uint32_t logical_link_status:8; + uint32_t phys_txf:1; + uint32_t phys_rxf:1; + uint32_t phys_fcv:1; + uint32_t rsvd1:21; + #endif } rsp; } params; }; Modified: stable/10/sys/dev/oce/oce_if.c ============================================================================== --- stable/10/sys/dev/oce/oce_if.c Mon Jun 30 16:18:38 2014 (r268045) +++ stable/10/sys/dev/oce/oce_if.c Mon Jun 30 16:23:31 2014 (r268046) @@ -829,10 +829,21 @@ oce_media_status(struct ifnet *ifp, stru req->ifm_active |= IFM_10G_SR | IFM_FDX; sc->speed = 10000; break; + case 5: /* 20 Gbps */ + req->ifm_active |= IFM_10G_SR | IFM_FDX; + sc->speed = 20000; + break; + case 6: /* 25 Gbps */ + req->ifm_active |= IFM_10G_SR | IFM_FDX; + sc->speed = 25000; + break; case 7: /* 40 Gbps */ req->ifm_active |= IFM_40G_SR4 | IFM_FDX; sc->speed = 40000; break; + default: + sc->speed = 0; + break; } return; @@ -2217,13 +2228,16 @@ setup_max_queues_want(POCE_SOFTC sc) (sc->function_mode & FNM_UMC_MODE) || (sc->function_mode & FNM_VNIC_MODE) || (!is_rss_enabled(sc)) || - (sc->flags & OCE_FLAGS_BE2)) { + IS_BE2(sc)) { sc->nrqs = 1; sc->nwqs = 1; } else { sc->nrqs = MIN(OCE_NCPUS, sc->nrssqs) + 1; sc->nwqs = MIN(OCE_NCPUS, sc->nrssqs); } + + if (IS_BE2(sc) && is_rss_enabled(sc)) + sc->nrqs = MIN(OCE_NCPUS, sc->nrssqs) + 1; } @@ -2237,6 +2251,9 @@ update_queues_got(POCE_SOFTC sc) sc->nrqs = 1; sc->nwqs = 1; } + + if (IS_BE2(sc)) + sc->nwqs = 1; } static int Modified: stable/10/sys/dev/oce/oce_if.h ============================================================================== --- stable/10/sys/dev/oce/oce_if.h Mon Jun 30 16:18:38 2014 (r268045) +++ stable/10/sys/dev/oce/oce_if.h Mon Jun 30 16:23:31 2014 (r268046) @@ -759,14 +759,9 @@ struct oce_rq { }; struct link_status { - uint8_t physical_port; - uint8_t mac_duplex; - uint8_t mac_speed; - uint8_t mac_fault; - uint8_t mgmt_mac_duplex; - uint8_t mgmt_mac_speed; + uint8_t phys_port_speed; + uint8_t logical_link_status; uint16_t qos_link_speed; - uint32_t logical_link_status; }; Modified: stable/10/sys/dev/oce/oce_mbox.c ============================================================================== --- stable/10/sys/dev/oce/oce_mbox.c Mon Jun 30 16:18:38 2014 (r268045) +++ stable/10/sys/dev/oce/oce_mbox.c Mon Jun 30 16:23:31 2014 (r268046) @@ -961,9 +961,9 @@ oce_get_link_status(POCE_SOFTC sc, struc goto error; } /* interpret response */ - bcopy(&fwcmd->params.rsp, link, sizeof(struct link_status)); - link->logical_link_status = HOST_32(link->logical_link_status); - link->qos_link_speed = HOST_16(link->qos_link_speed); + link->qos_link_speed = HOST_16(fwcmd->params.rsp.qos_link_speed); + link->phys_port_speed = fwcmd->params.rsp.physical_port_speed; + link->logical_link_status = fwcmd->params.rsp.logical_link_status; error: return rc; } From owner-svn-src-stable@FreeBSD.ORG Mon Jun 30 16:31:28 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC1C874C; Mon, 30 Jun 2014 16:31:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8C5C2A0D; Mon, 30 Jun 2014 16:31:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5UGVSw6087258; Mon, 30 Jun 2014 16:31:28 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5UGVSuV087256; Mon, 30 Jun 2014 16:31:28 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201406301631.s5UGVSuV087256@svn.freebsd.org> From: Xin LI Date: Mon, 30 Jun 2014 16:31:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268047 - stable/10/lib/libz X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2014 16:31:28 -0000 Author: delphij Date: Mon Jun 30 16:31:28 2014 New Revision: 268047 URL: http://svnweb.freebsd.org/changeset/base/268047 Log: MFC r267378: Fix path for zlib examples, this have no runtime effect and was overlooked when I was doing zlib update. Modified: stable/10/lib/libz/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libz/Makefile ============================================================================== --- stable/10/lib/libz/Makefile Mon Jun 30 16:23:31 2014 (r268046) +++ stable/10/lib/libz/Makefile Mon Jun 30 16:31:28 2014 (r268047) @@ -55,6 +55,8 @@ CFLAGS+= -DSYMBOL_VERSIONING INCS= zconf.h zlib.h +.PATH: ${.CURDIR}/test + minigzip: all minigzip.o $(CC) -o minigzip minigzip.o -L. -lz From owner-svn-src-stable@FreeBSD.ORG Mon Jun 30 16:32:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9CF898A4; Mon, 30 Jun 2014 16:32:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89B4E2A20; Mon, 30 Jun 2014 16:32:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5UGWnnZ087992; Mon, 30 Jun 2014 16:32:49 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5UGWnds087991; Mon, 30 Jun 2014 16:32:49 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201406301632.s5UGWnds087991@svn.freebsd.org> From: Xin LI Date: Mon, 30 Jun 2014 16:32:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268048 - stable/9/lib/libz X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2014 16:32:49 -0000 Author: delphij Date: Mon Jun 30 16:32:49 2014 New Revision: 268048 URL: http://svnweb.freebsd.org/changeset/base/268048 Log: MFC r267378: Fix path for zlib examples, this have no runtime effect and was overlooked when I was doing zlib update. Modified: stable/9/lib/libz/Makefile Directory Properties: stable/9/lib/libz/ (props changed) Modified: stable/9/lib/libz/Makefile ============================================================================== --- stable/9/lib/libz/Makefile Mon Jun 30 16:31:28 2014 (r268047) +++ stable/9/lib/libz/Makefile Mon Jun 30 16:32:49 2014 (r268048) @@ -55,6 +55,8 @@ CFLAGS+= -DSYMBOL_VERSIONING INCS= zconf.h zlib.h +.PATH: ${.CURDIR}/test + minigzip: all minigzip.o $(CC) -o minigzip minigzip.o -L. -lz From owner-svn-src-stable@FreeBSD.ORG Mon Jun 30 16:53:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62CFE792; Mon, 30 Jun 2014 16:53:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FB782C1A; Mon, 30 Jun 2014 16:53:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5UGrDZ0000327; Mon, 30 Jun 2014 16:53:13 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5UGrDTb000326; Mon, 30 Jun 2014 16:53:13 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201406301653.s5UGrDTb000326@svn.freebsd.org> From: Hajimu UMEMOTO Date: Mon, 30 Jun 2014 16:53:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268051 - stable/10/lib/libc/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2014 16:53:13 -0000 Author: ume Date: Mon Jun 30 16:53:12 2014 New Revision: 268051 URL: http://svnweb.freebsd.org/changeset/base/268051 Log: MFC r267800: Exclude IPv4 address from doing longest match. It prevented DNS based load balancing. Modified: stable/10/lib/libc/net/getaddrinfo.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/net/getaddrinfo.c ============================================================================== --- stable/10/lib/libc/net/getaddrinfo.c Mon Jun 30 16:49:00 2014 (r268050) +++ stable/10/lib/libc/net/getaddrinfo.c Mon Jun 30 16:53:12 2014 (r268051) @@ -1009,7 +1009,8 @@ comp_dst(const void *arg1, const void *a * We compare the match length in a same AF only. */ if (dst1->aio_ai->ai_addr->sa_family == - dst2->aio_ai->ai_addr->sa_family) { + dst2->aio_ai->ai_addr->sa_family && + dst1->aio_ai->ai_addr->sa_family != AF_INET) { if (dst1->aio_matchlen > dst2->aio_matchlen) { return(-1); } From owner-svn-src-stable@FreeBSD.ORG Mon Jun 30 16:56:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0E6A901; Mon, 30 Jun 2014 16:56:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D7272C37; Mon, 30 Jun 2014 16:56:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5UGuCHU000862; Mon, 30 Jun 2014 16:56:12 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5UGuCSu000861; Mon, 30 Jun 2014 16:56:12 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201406301656.s5UGuCSu000861@svn.freebsd.org> From: Hajimu UMEMOTO Date: Mon, 30 Jun 2014 16:56:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268052 - stable/10/sys/netinet6 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2014 16:56:12 -0000 Author: ume Date: Mon Jun 30 16:56:12 2014 New Revision: 268052 URL: http://svnweb.freebsd.org/changeset/base/268052 Log: MFC r267801: Make nd6_gctimer tunable. Modified: stable/10/sys/netinet6/nd6.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/nd6.c ============================================================================== --- stable/10/sys/netinet6/nd6.c Mon Jun 30 16:53:12 2014 (r268051) +++ stable/10/sys/netinet6/nd6.c Mon Jun 30 16:56:12 2014 (r268052) @@ -2272,6 +2272,8 @@ SYSCTL_NODE(_net_inet6_icmp6, ICMPV6CTL_ CTLFLAG_RD, nd6_sysctl_prlist, ""); SYSCTL_VNET_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_MAXQLEN, nd6_maxqueuelen, CTLFLAG_RW, &VNET_NAME(nd6_maxqueuelen), 1, ""); +SYSCTL_VNET_INT(_net_inet6_icmp6, OID_AUTO, nd6_gctimer, + CTLFLAG_RW, &VNET_NAME(nd6_gctimer), (60 * 60 * 24), ""); static int nd6_sysctl_drlist(SYSCTL_HANDLER_ARGS) From owner-svn-src-stable@FreeBSD.ORG Mon Jun 30 17:03:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF066E06; Mon, 30 Jun 2014 17:03:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ABA8E2D3B; Mon, 30 Jun 2014 17:03:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5UH3WQp005167; Mon, 30 Jun 2014 17:03:32 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5UH3WYO005166; Mon, 30 Jun 2014 17:03:32 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201406301703.s5UH3WYO005166@svn.freebsd.org> From: Hajimu UMEMOTO Date: Mon, 30 Jun 2014 17:03:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268053 - stable/9/lib/libc/net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2014 17:03:32 -0000 Author: ume Date: Mon Jun 30 17:03:32 2014 New Revision: 268053 URL: http://svnweb.freebsd.org/changeset/base/268053 Log: MFC r267800: Exclude IPv4 address from doing longest match. It prevented DNS based load balancing. Modified: stable/9/lib/libc/net/getaddrinfo.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/net/getaddrinfo.c ============================================================================== --- stable/9/lib/libc/net/getaddrinfo.c Mon Jun 30 16:56:12 2014 (r268052) +++ stable/9/lib/libc/net/getaddrinfo.c Mon Jun 30 17:03:32 2014 (r268053) @@ -1007,7 +1007,8 @@ comp_dst(const void *arg1, const void *a * We compare the match length in a same AF only. */ if (dst1->aio_ai->ai_addr->sa_family == - dst2->aio_ai->ai_addr->sa_family) { + dst2->aio_ai->ai_addr->sa_family && + dst1->aio_ai->ai_addr->sa_family != AF_INET) { if (dst1->aio_matchlen > dst2->aio_matchlen) { return(-1); } From owner-svn-src-stable@FreeBSD.ORG Mon Jun 30 17:04:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3127BFED; Mon, 30 Jun 2014 17:04:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E32B2D52; Mon, 30 Jun 2014 17:04:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5UH4tAV005466; Mon, 30 Jun 2014 17:04:55 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5UH4tZA005465; Mon, 30 Jun 2014 17:04:55 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201406301704.s5UH4tZA005465@svn.freebsd.org> From: Hajimu UMEMOTO Date: Mon, 30 Jun 2014 17:04:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268054 - stable/9/sys/netinet6 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2014 17:04:56 -0000 Author: ume Date: Mon Jun 30 17:04:55 2014 New Revision: 268054 URL: http://svnweb.freebsd.org/changeset/base/268054 Log: MFC r267801: Make nd6_gctimer tunable. Modified: stable/9/sys/netinet6/nd6.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet6/nd6.c ============================================================================== --- stable/9/sys/netinet6/nd6.c Mon Jun 30 17:03:32 2014 (r268053) +++ stable/9/sys/netinet6/nd6.c Mon Jun 30 17:04:55 2014 (r268054) @@ -2281,6 +2281,8 @@ SYSCTL_NODE(_net_inet6_icmp6, ICMPV6CTL_ CTLFLAG_RD, nd6_sysctl_prlist, ""); SYSCTL_VNET_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_MAXQLEN, nd6_maxqueuelen, CTLFLAG_RW, &VNET_NAME(nd6_maxqueuelen), 1, ""); +SYSCTL_VNET_INT(_net_inet6_icmp6, OID_AUTO, nd6_gctimer, + CTLFLAG_RW, &VNET_NAME(nd6_gctimer), (60 * 60 * 24), ""); static int nd6_sysctl_drlist(SYSCTL_HANDLER_ARGS) From owner-svn-src-stable@FreeBSD.ORG Mon Jun 30 19:46:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EFD7468C; Mon, 30 Jun 2014 19:46:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC53F2D39; Mon, 30 Jun 2014 19:46:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5UJkI1M081900; Mon, 30 Jun 2014 19:46:18 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5UJkH4B081891; Mon, 30 Jun 2014 19:46:17 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201406301946.s5UJkH4B081891@svn.freebsd.org> From: Mikolaj Golub Date: Mon, 30 Jun 2014 19:46:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268061 - stable/10/sys/netgraph/bluetooth/socket X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2014 19:46:19 -0000 Author: trociny Date: Mon Jun 30 19:46:17 2014 New Revision: 268061 URL: http://svnweb.freebsd.org/changeset/base/268061 Log: MFC r267336: PF_BLUETOOTH protocols: skip initialization of non-virtualized globals for non-default VNET instances. This fixes panic on a vnet initialization when ng_btsocket is loaded. Modified: stable/10/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c stable/10/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c stable/10/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c stable/10/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c stable/10/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c ============================================================================== --- stable/10/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c Mon Jun 30 19:36:08 2014 (r268060) +++ stable/10/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c Mon Jun 30 19:46:17 2014 (r268061) @@ -51,6 +51,9 @@ #include #include #include + +#include + #include #include #include @@ -728,6 +731,10 @@ ng_btsocket_hci_raw_init(void) bitstr_t *f = NULL; int error = 0; + /* Skip initialization of globals for non-default instances. */ + if (!IS_DEFAULT_VNET(curvnet)) + return; + ng_btsocket_hci_raw_node = NULL; ng_btsocket_hci_raw_debug_level = NG_BTSOCKET_WARN_LEVEL; ng_btsocket_hci_raw_ioctl_timeout = 5; Modified: stable/10/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c ============================================================================== --- stable/10/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c Mon Jun 30 19:36:08 2014 (r268060) +++ stable/10/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c Mon Jun 30 19:46:17 2014 (r268061) @@ -1813,6 +1813,10 @@ ng_btsocket_l2cap_init(void) { int error = 0; + /* Skip initialization of globals for non-default instances. */ + if (!IS_DEFAULT_VNET(curvnet)) + return; + ng_btsocket_l2cap_node = NULL; ng_btsocket_l2cap_debug_level = NG_BTSOCKET_WARN_LEVEL; Modified: stable/10/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c ============================================================================== --- stable/10/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c Mon Jun 30 19:36:08 2014 (r268060) +++ stable/10/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c Mon Jun 30 19:46:17 2014 (r268061) @@ -50,6 +50,9 @@ #include #include #include + +#include + #include #include #include @@ -513,6 +516,10 @@ ng_btsocket_l2cap_raw_init(void) { int error = 0; + /* Skip initialization of globals for non-default instances. */ + if (!IS_DEFAULT_VNET(curvnet)) + return; + ng_btsocket_l2cap_raw_node = NULL; ng_btsocket_l2cap_raw_debug_level = NG_BTSOCKET_WARN_LEVEL; ng_btsocket_l2cap_raw_ioctl_timeout = 5; Modified: stable/10/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c ============================================================================== --- stable/10/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c Mon Jun 30 19:36:08 2014 (r268060) +++ stable/10/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c Mon Jun 30 19:46:17 2014 (r268061) @@ -328,6 +328,11 @@ ng_btsocket_rfcomm_check_fcs(u_int8_t *d void ng_btsocket_rfcomm_init(void) { + + /* Skip initialization of globals for non-default instances. */ + if (!IS_DEFAULT_VNET(curvnet)) + return; + ng_btsocket_rfcomm_debug_level = NG_BTSOCKET_WARN_LEVEL; ng_btsocket_rfcomm_timo = 60; Modified: stable/10/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c ============================================================================== --- stable/10/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c Mon Jun 30 19:36:08 2014 (r268060) +++ stable/10/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c Mon Jun 30 19:46:17 2014 (r268061) @@ -1107,6 +1107,10 @@ ng_btsocket_sco_init(void) { int error = 0; + /* Skip initialization of globals for non-default instances. */ + if (!IS_DEFAULT_VNET(curvnet)) + return; + ng_btsocket_sco_node = NULL; ng_btsocket_sco_debug_level = NG_BTSOCKET_WARN_LEVEL; From owner-svn-src-stable@FreeBSD.ORG Mon Jun 30 19:47:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1F3F7C4; Mon, 30 Jun 2014 19:47:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE35D2D42; Mon, 30 Jun 2014 19:47:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5UJlRkC082108; Mon, 30 Jun 2014 19:47:27 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5UJlQku082103; Mon, 30 Jun 2014 19:47:26 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201406301947.s5UJlQku082103@svn.freebsd.org> From: Mikolaj Golub Date: Mon, 30 Jun 2014 19:47:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268062 - stable/9/sys/netgraph/bluetooth/socket X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2014 19:47:27 -0000 Author: trociny Date: Mon Jun 30 19:47:26 2014 New Revision: 268062 URL: http://svnweb.freebsd.org/changeset/base/268062 Log: MFC r267336: PF_BLUETOOTH protocols: skip initialization of non-virtualized globals for non-default VNET instances. This fixes panic on a vnet initialization when ng_btsocket is loaded. Modified: stable/9/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c stable/9/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c stable/9/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c stable/9/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c stable/9/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c ============================================================================== --- stable/9/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c Mon Jun 30 19:46:17 2014 (r268061) +++ stable/9/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c Mon Jun 30 19:47:26 2014 (r268062) @@ -51,6 +51,9 @@ #include #include #include + +#include + #include #include #include @@ -728,6 +731,10 @@ ng_btsocket_hci_raw_init(void) bitstr_t *f = NULL; int error = 0; + /* Skip initialization of globals for non-default instances. */ + if (!IS_DEFAULT_VNET(curvnet)) + return; + ng_btsocket_hci_raw_node = NULL; ng_btsocket_hci_raw_debug_level = NG_BTSOCKET_WARN_LEVEL; ng_btsocket_hci_raw_ioctl_timeout = 5; Modified: stable/9/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c ============================================================================== --- stable/9/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c Mon Jun 30 19:46:17 2014 (r268061) +++ stable/9/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c Mon Jun 30 19:47:26 2014 (r268062) @@ -1813,6 +1813,10 @@ ng_btsocket_l2cap_init(void) { int error = 0; + /* Skip initialization of globals for non-default instances. */ + if (!IS_DEFAULT_VNET(curvnet)) + return; + ng_btsocket_l2cap_node = NULL; ng_btsocket_l2cap_debug_level = NG_BTSOCKET_WARN_LEVEL; Modified: stable/9/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c ============================================================================== --- stable/9/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c Mon Jun 30 19:46:17 2014 (r268061) +++ stable/9/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c Mon Jun 30 19:47:26 2014 (r268062) @@ -50,6 +50,9 @@ #include #include #include + +#include + #include #include #include @@ -513,6 +516,10 @@ ng_btsocket_l2cap_raw_init(void) { int error = 0; + /* Skip initialization of globals for non-default instances. */ + if (!IS_DEFAULT_VNET(curvnet)) + return; + ng_btsocket_l2cap_raw_node = NULL; ng_btsocket_l2cap_raw_debug_level = NG_BTSOCKET_WARN_LEVEL; ng_btsocket_l2cap_raw_ioctl_timeout = 5; Modified: stable/9/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c ============================================================================== --- stable/9/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c Mon Jun 30 19:46:17 2014 (r268061) +++ stable/9/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c Mon Jun 30 19:47:26 2014 (r268062) @@ -328,6 +328,11 @@ ng_btsocket_rfcomm_check_fcs(u_int8_t *d void ng_btsocket_rfcomm_init(void) { + + /* Skip initialization of globals for non-default instances. */ + if (!IS_DEFAULT_VNET(curvnet)) + return; + ng_btsocket_rfcomm_debug_level = NG_BTSOCKET_WARN_LEVEL; ng_btsocket_rfcomm_timo = 60; Modified: stable/9/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c ============================================================================== --- stable/9/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c Mon Jun 30 19:46:17 2014 (r268061) +++ stable/9/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c Mon Jun 30 19:47:26 2014 (r268062) @@ -1107,6 +1107,10 @@ ng_btsocket_sco_init(void) { int error = 0; + /* Skip initialization of globals for non-default instances. */ + if (!IS_DEFAULT_VNET(curvnet)) + return; + ng_btsocket_sco_node = NULL; ng_btsocket_sco_debug_level = NG_BTSOCKET_WARN_LEVEL; From owner-svn-src-stable@FreeBSD.ORG Mon Jun 30 20:26:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E0D76EB; Mon, 30 Jun 2014 20:26:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 09723212D; Mon, 30 Jun 2014 20:26:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5UKQUs3001936; Mon, 30 Jun 2014 20:26:30 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5UKQUQY001934; Mon, 30 Jun 2014 20:26:30 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201406302026.s5UKQUQY001934@svn.freebsd.org> From: Dimitry Andric Date: Mon, 30 Jun 2014 20:26:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268065 - in stable: 10/contrib/llvm/lib/Target/PowerPC 10/contrib/llvm/patches 9/contrib/llvm/lib/Target/PowerPC 9/contrib/llvm/patches X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2014 20:26:31 -0000 Author: dim Date: Mon Jun 30 20:26:30 2014 New Revision: 268065 URL: http://svnweb.freebsd.org/changeset/base/268065 Log: MFC r267981: Pull in r211627 from upstream llvm trunk (by Bill Schmidt): [PPC64] Fix PR20071 (fctiduz generated for targets lacking that instruction) PR20071 identifies a problem in PowerPC's fast-isel implementation for floating-point conversion to integer. The fctiduz instruction was added in Power ISA 2.06 (i.e., Power7 and later). However, this instruction is being generated regardless of which 64-bit PowerPC target is selected. The intent is for fast-isel to punt to DAG selection when this instruction is not available. This patch implements that change. For testing purposes, the existing fast-isel-conversion.ll test adds a RUN line for -mcpu=970 and tests for the expected code generation. Additionally, the existing test fast-isel-conversion-p5.ll was found to be incorrectly expecting the unavailable instruction to be generated. I've removed these test variants since we have adequate coverage in fast-isel-conversion.ll. This is needed to compile clang with debug+asserts on older powerpc64 and ppc970 targets. Requested by: jhibbits MFC r267982: Add the llvm patch for r267981. MFC r268003: Fix breakage after r267981. Pointy hat to: dim Added: stable/9/contrib/llvm/patches/patch-r267981-llvm-r211435-fix-ppc-fctiduz.diff - copied, changed from r267982, head/contrib/llvm/patches/patch-r267981-llvm-r211435-fix-ppc-fctiduz.diff Modified: stable/9/contrib/llvm/lib/Target/PowerPC/PPCFastISel.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) Changes in other areas also in this revision: Added: stable/10/contrib/llvm/patches/patch-r267981-llvm-r211435-fix-ppc-fctiduz.diff - copied, changed from r267982, head/contrib/llvm/patches/patch-r267981-llvm-r211435-fix-ppc-fctiduz.diff Modified: stable/10/contrib/llvm/lib/Target/PowerPC/PPCFastISel.cpp Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/llvm/lib/Target/PowerPC/PPCFastISel.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Target/PowerPC/PPCFastISel.cpp Mon Jun 30 20:24:00 2014 (r268064) +++ stable/9/contrib/llvm/lib/Target/PowerPC/PPCFastISel.cpp Mon Jun 30 20:26:30 2014 (r268065) @@ -1026,6 +1026,10 @@ bool PPCFastISel::SelectFPToI(const Inst if (DstVT != MVT::i32 && DstVT != MVT::i64) return false; + // If we don't have FCTIDUZ and we need it, punt to SelectionDAG. + if (DstVT == MVT::i64 && !IsSigned && !PPCSubTarget.hasFPCVT()) + return false; + Value *Src = I->getOperand(0); Type *SrcTy = Src->getType(); if (!isTypeLegal(SrcTy, SrcVT)) Copied and modified: stable/9/contrib/llvm/patches/patch-r267981-llvm-r211435-fix-ppc-fctiduz.diff (from r267982, head/contrib/llvm/patches/patch-r267981-llvm-r211435-fix-ppc-fctiduz.diff) ============================================================================== --- head/contrib/llvm/patches/patch-r267981-llvm-r211435-fix-ppc-fctiduz.diff Fri Jun 27 20:45:17 2014 (r267982, copy source) +++ stable/9/contrib/llvm/patches/patch-r267981-llvm-r211435-fix-ppc-fctiduz.diff Mon Jun 30 20:26:30 2014 (r268065) @@ -32,7 +32,7 @@ Index: lib/Target/PowerPC/PPCFastISel.cp return false; + // If we don't have FCTIDUZ and we need it, punt to SelectionDAG. -+ if (DstVT == MVT::i64 && !IsSigned && !PPCSubTarget->hasFPCVT()) ++ if (DstVT == MVT::i64 && !IsSigned && !PPCSubTarget.hasFPCVT()) + return false; + Value *Src = I->getOperand(0); From owner-svn-src-stable@FreeBSD.ORG Mon Jun 30 20:26:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A096E6ED; Mon, 30 Jun 2014 20:26:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C556212F; Mon, 30 Jun 2014 20:26:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5UKQV8e001943; Mon, 30 Jun 2014 20:26:31 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5UKQV2i001941; Mon, 30 Jun 2014 20:26:31 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201406302026.s5UKQV2i001941@svn.freebsd.org> From: Dimitry Andric Date: Mon, 30 Jun 2014 20:26:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268065 - in stable: 10/contrib/llvm/lib/Target/PowerPC 10/contrib/llvm/patches 9/contrib/llvm/lib/Target/PowerPC 9/contrib/llvm/patches X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2014 20:26:31 -0000 Author: dim Date: Mon Jun 30 20:26:30 2014 New Revision: 268065 URL: http://svnweb.freebsd.org/changeset/base/268065 Log: MFC r267981: Pull in r211627 from upstream llvm trunk (by Bill Schmidt): [PPC64] Fix PR20071 (fctiduz generated for targets lacking that instruction) PR20071 identifies a problem in PowerPC's fast-isel implementation for floating-point conversion to integer. The fctiduz instruction was added in Power ISA 2.06 (i.e., Power7 and later). However, this instruction is being generated regardless of which 64-bit PowerPC target is selected. The intent is for fast-isel to punt to DAG selection when this instruction is not available. This patch implements that change. For testing purposes, the existing fast-isel-conversion.ll test adds a RUN line for -mcpu=970 and tests for the expected code generation. Additionally, the existing test fast-isel-conversion-p5.ll was found to be incorrectly expecting the unavailable instruction to be generated. I've removed these test variants since we have adequate coverage in fast-isel-conversion.ll. This is needed to compile clang with debug+asserts on older powerpc64 and ppc970 targets. Requested by: jhibbits MFC r267982: Add the llvm patch for r267981. MFC r268003: Fix breakage after r267981. Pointy hat to: dim Added: stable/10/contrib/llvm/patches/patch-r267981-llvm-r211435-fix-ppc-fctiduz.diff - copied, changed from r267982, head/contrib/llvm/patches/patch-r267981-llvm-r211435-fix-ppc-fctiduz.diff Modified: stable/10/contrib/llvm/lib/Target/PowerPC/PPCFastISel.cpp Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Added: stable/9/contrib/llvm/patches/patch-r267981-llvm-r211435-fix-ppc-fctiduz.diff - copied, changed from r267982, head/contrib/llvm/patches/patch-r267981-llvm-r211435-fix-ppc-fctiduz.diff Modified: stable/9/contrib/llvm/lib/Target/PowerPC/PPCFastISel.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) Modified: stable/10/contrib/llvm/lib/Target/PowerPC/PPCFastISel.cpp ============================================================================== --- stable/10/contrib/llvm/lib/Target/PowerPC/PPCFastISel.cpp Mon Jun 30 20:24:00 2014 (r268064) +++ stable/10/contrib/llvm/lib/Target/PowerPC/PPCFastISel.cpp Mon Jun 30 20:26:30 2014 (r268065) @@ -1026,6 +1026,10 @@ bool PPCFastISel::SelectFPToI(const Inst if (DstVT != MVT::i32 && DstVT != MVT::i64) return false; + // If we don't have FCTIDUZ and we need it, punt to SelectionDAG. + if (DstVT == MVT::i64 && !IsSigned && !PPCSubTarget.hasFPCVT()) + return false; + Value *Src = I->getOperand(0); Type *SrcTy = Src->getType(); if (!isTypeLegal(SrcTy, SrcVT)) Copied and modified: stable/10/contrib/llvm/patches/patch-r267981-llvm-r211435-fix-ppc-fctiduz.diff (from r267982, head/contrib/llvm/patches/patch-r267981-llvm-r211435-fix-ppc-fctiduz.diff) ============================================================================== --- head/contrib/llvm/patches/patch-r267981-llvm-r211435-fix-ppc-fctiduz.diff Fri Jun 27 20:45:17 2014 (r267982, copy source) +++ stable/10/contrib/llvm/patches/patch-r267981-llvm-r211435-fix-ppc-fctiduz.diff Mon Jun 30 20:26:30 2014 (r268065) @@ -32,7 +32,7 @@ Index: lib/Target/PowerPC/PPCFastISel.cp return false; + // If we don't have FCTIDUZ and we need it, punt to SelectionDAG. -+ if (DstVT == MVT::i64 && !IsSigned && !PPCSubTarget->hasFPCVT()) ++ if (DstVT == MVT::i64 && !IsSigned && !PPCSubTarget.hasFPCVT()) + return false; + Value *Src = I->getOperand(0); From owner-svn-src-stable@FreeBSD.ORG Tue Jul 1 06:23:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 092BBE87; Tue, 1 Jul 2014 06:23:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E04D72936; Tue, 1 Jul 2014 06:23:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s616NnHi081556; Tue, 1 Jul 2014 06:23:49 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s616NmAx081549; Tue, 1 Jul 2014 06:23:48 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201407010623.s616NmAx081549@svn.freebsd.org> From: Scott Long Date: Tue, 1 Jul 2014 06:23:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268073 - in stable/10/sys/dev/isci: . scil X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jul 2014 06:23:50 -0000 Author: scottl Date: Tue Jul 1 06:23:48 2014 New Revision: 268073 URL: http://svnweb.freebsd.org/changeset/base/268073 Log: Merge r268024, 268025: Fix a case in ndling ATA_PASSTHROUGH commands that have an unaligned buffer. This impacts some home-rolled SMART tools. In rare cases, a SATA drive can stop responding to commands and trigger a reset device task request from the driver. If the drive fails to respond with a signature FIS, the driver would previously get into an endless retry loop, stalling all I/O to the drive and keeping user processes stranded. Instead, fail the i/o and invalidate the device if the task management command times out. This is controllable with the sysctl and tunable hw.isci.fail_on_task_timeout dev.isci.0.fail_on_task_timeout The default for these is 1. Obtained from: Netflix, Inc. Modified: stable/10/sys/dev/isci/isci.h stable/10/sys/dev/isci/isci_controller.c stable/10/sys/dev/isci/isci_sysctl.c stable/10/sys/dev/isci/isci_task_request.c stable/10/sys/dev/isci/scil/scic_sds_stp_request.c Modified: stable/10/sys/dev/isci/isci.h ============================================================================== --- stable/10/sys/dev/isci/isci.h Tue Jul 1 04:44:18 2014 (r268072) +++ stable/10/sys/dev/isci/isci.h Tue Jul 1 06:23:48 2014 (r268073) @@ -164,6 +164,7 @@ struct ISCI_CONTROLLER uint32_t initial_discovery_mask; BOOL is_frozen; BOOL release_queued_ccbs; + BOOL fail_on_task_timeout; uint8_t *remote_device_memory; struct ISCI_MEMORY cached_controller_memory; struct ISCI_MEMORY uncached_controller_memory; Modified: stable/10/sys/dev/isci/isci_controller.c ============================================================================== --- stable/10/sys/dev/isci/isci_controller.c Tue Jul 1 04:44:18 2014 (r268072) +++ stable/10/sys/dev/isci/isci_controller.c Tue Jul 1 06:23:48 2014 (r268073) @@ -300,6 +300,8 @@ SCI_STATUS isci_controller_initialize(st SCI_CONTROLLER_HANDLE_T scic_controller_handle; char led_name[64]; unsigned long tunable; + uint32_t io_shortage; + uint32_t fail_on_timeout; int i; scic_controller_handle = @@ -365,10 +367,12 @@ SCI_STATUS isci_controller_initialize(st * this io_shortage parameter, which will tell CAM that we have a * large queue depth than we really do. */ - uint32_t io_shortage = 0; + io_shortage = 0; TUNABLE_INT_FETCH("hw.isci.io_shortage", &io_shortage); controller->sim_queue_depth += io_shortage; + fail_on_timeout = 1; + TUNABLE_INT_FETCH("hw.isci.fail_on_task_timeout", &fail_on_timeout); /* Attach to CAM using xpt_bus_register now, then immediately freeze * the simq. It will get released later when initial domain discovery * is complete. Modified: stable/10/sys/dev/isci/isci_sysctl.c ============================================================================== --- stable/10/sys/dev/isci/isci_sysctl.c Tue Jul 1 04:44:18 2014 (r268072) +++ stable/10/sys/dev/isci/isci_sysctl.c Tue Jul 1 06:23:48 2014 (r268073) @@ -222,6 +222,24 @@ isci_sysctl_log_frozen_lun_masks(SYSCTL_ return (0); } +static int +isci_sysctl_fail_on_task_timeout(SYSCTL_HANDLER_ARGS) +{ + struct isci_softc *isci = (struct isci_softc *)arg1; + int32_t fail_on_timeout = 0; + int error, i; + + error = sysctl_handle_int(oidp, &fail_on_timeout, 0, req); + + if (error || fail_on_timeout == 0) + return (error); + + for (i = 0; i < isci->controller_count; i++) + isci->controllers[i].fail_on_task_timeout = fail_on_timeout; + + return (0); +} + void isci_sysctl_initialize(struct isci_softc *isci) { struct sysctl_ctx_list *sysctl_ctx = device_get_sysctl_ctx(isci->device); @@ -259,5 +277,10 @@ void isci_sysctl_initialize(struct isci_ "log_frozen_lun_masks", CTLTYPE_UINT| CTLFLAG_RW, isci, 0, isci_sysctl_log_frozen_lun_masks, "IU", "Log frozen lun masks to kernel log"); + + SYSCTL_ADD_PROC(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, + "fail_on_task_timeout", CTLTYPE_UINT | CTLFLAG_RW, isci, 0, + isci_sysctl_fail_on_task_timeout, "IU", + "Fail a command that has encountered a task management timeout"); } Modified: stable/10/sys/dev/isci/isci_task_request.c ============================================================================== --- stable/10/sys/dev/isci/isci_task_request.c Tue Jul 1 04:44:18 2014 (r268072) +++ stable/10/sys/dev/isci/isci_task_request.c Tue Jul 1 06:23:48 2014 (r268073) @@ -206,8 +206,17 @@ isci_task_request_complete(SCI_CONTROLLE break; case SCI_FAILURE_TIMEOUT: - retry_task = TRUE; - isci_log_message(0, "ISCI", "task timeout - retrying\n"); + if (isci_controller->fail_on_task_timeout) { + retry_task = FALSE; + isci_log_message(0, "ISCI", + "task timeout - not retrying\n"); + scif_cb_domain_device_removed(isci_controller, + isci_remote_device->domain, isci_remote_device); + } else { + retry_task = TRUE; + isci_log_message(0, "ISCI", + "task timeout - retrying\n"); + } break; case SCI_TASK_FAILURE: Modified: stable/10/sys/dev/isci/scil/scic_sds_stp_request.c ============================================================================== --- stable/10/sys/dev/isci/scil/scic_sds_stp_request.c Tue Jul 1 04:44:18 2014 (r268072) +++ stable/10/sys/dev/isci/scil/scic_sds_stp_request.c Tue Jul 1 06:23:48 2014 (r268073) @@ -1222,6 +1222,7 @@ SCI_STATUS scic_sds_stp_request_pio_data length -= copy_length; sgl_offset += copy_length; data_offset += copy_length; + source_address += copy_length; #endif } } From owner-svn-src-stable@FreeBSD.ORG Tue Jul 1 06:50:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08D66A80; Tue, 1 Jul 2014 06:50:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF2822BBE; Tue, 1 Jul 2014 06:50:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s616oZ8r092029; Tue, 1 Jul 2014 06:50:35 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s616oZTJ092028; Tue, 1 Jul 2014 06:50:35 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201407010650.s616oZTJ092028@svn.freebsd.org> From: Scott Long Date: Tue, 1 Jul 2014 06:50:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268076 - stable/10/sys/x86/x86 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jul 2014 06:50:36 -0000 Author: scottl Date: Tue Jul 1 06:50:35 2014 New Revision: 268076 URL: http://svnweb.freebsd.org/changeset/base/268076 Log: Merge r266746, 266775: Now that there are separate back-end implementations of busdma, the bounce implementation shouldn't steal flags from the common front-end. Move those flags to the back-end. Eliminate the fake contig_dmamap and replace it with a new flag, BUS_DMA_KMEM_ALLOC. They serve the same purpose, but using the flag means that the map can be NULL again, which in turn enables significant optimizations for the common case of no bouncing. Obtained from: Netflix, Inc. Modified: stable/10/sys/x86/x86/busdma_bounce.c Modified: stable/10/sys/x86/x86/busdma_bounce.c ============================================================================== --- stable/10/sys/x86/x86/busdma_bounce.c Tue Jul 1 06:43:15 2014 (r268075) +++ stable/10/sys/x86/x86/busdma_bounce.c Tue Jul 1 06:50:35 2014 (r268076) @@ -58,16 +58,21 @@ __FBSDID("$FreeBSD$"); #else #define MAX_BPAGES 8192 #endif -#define BUS_DMA_COULD_BOUNCE BUS_DMA_BUS3 -#define BUS_DMA_MIN_ALLOC_COMP BUS_DMA_BUS4 + +enum { + BUS_DMA_COULD_BOUNCE = 0x01, + BUS_DMA_MIN_ALLOC_COMP = 0x02, + BUS_DMA_KMEM_ALLOC = 0x04, +}; struct bounce_zone; struct bus_dma_tag { struct bus_dma_tag_common common; - int map_count; - bus_dma_segment_t *segments; - struct bounce_zone *bounce_zone; + int map_count; + int bounce_flags; + bus_dma_segment_t *segments; + struct bounce_zone *bounce_zone; }; struct bounce_page { @@ -121,7 +126,7 @@ struct bus_dmamap { static STAILQ_HEAD(, bus_dmamap) bounce_map_waitinglist; static STAILQ_HEAD(, bus_dmamap) bounce_map_callbacklist; -static struct bus_dmamap nobounce_dmamap, contig_dmamap; +static struct bus_dmamap nobounce_dmamap; static void init_bounce_pages(void *dummy); static int alloc_bounce_zone(bus_dma_tag_t dmat); @@ -173,14 +178,14 @@ bounce_bus_dma_tag_create(bus_dma_tag_t newtag->segments = NULL; if (parent != NULL && ((newtag->common.filter != NULL) || - ((parent->common.flags & BUS_DMA_COULD_BOUNCE) != 0))) - newtag->common.flags |= BUS_DMA_COULD_BOUNCE; + ((parent->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0))) + newtag->bounce_flags |= BUS_DMA_COULD_BOUNCE; if (newtag->common.lowaddr < ptoa((vm_paddr_t)Maxmem) || newtag->common.alignment > 1) - newtag->common.flags |= BUS_DMA_COULD_BOUNCE; + newtag->bounce_flags |= BUS_DMA_COULD_BOUNCE; - if (((newtag->common.flags & BUS_DMA_COULD_BOUNCE) != 0) && + if (((newtag->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0) && (flags & BUS_DMA_ALLOCNOW) != 0) { struct bounce_zone *bz; @@ -201,7 +206,7 @@ bounce_bus_dma_tag_create(bus_dma_tag_t error = ENOMEM; } /* Performed initial allocation */ - newtag->common.flags |= BUS_DMA_MIN_ALLOC_COMP; + newtag->bounce_flags |= BUS_DMA_MIN_ALLOC_COMP; } else error = 0; @@ -279,7 +284,7 @@ bounce_bus_dmamap_create(bus_dma_tag_t d * exclusion region, a data alignment that is stricter than 1, and/or * an active address boundary. */ - if (dmat->common.flags & BUS_DMA_COULD_BOUNCE) { + if (dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) { /* Must bounce */ if (dmat->bounce_zone == NULL) { if ((error = alloc_bounce_zone(dmat)) != 0) @@ -307,17 +312,17 @@ bounce_bus_dmamap_create(bus_dma_tag_t d else maxpages = MIN(MAX_BPAGES, Maxmem - atop(dmat->common.lowaddr)); - if ((dmat->common.flags & BUS_DMA_MIN_ALLOC_COMP) == 0 || + if ((dmat->bounce_flags & BUS_DMA_MIN_ALLOC_COMP) == 0 || (bz->map_count > 0 && bz->total_bpages < maxpages)) { pages = MAX(atop(dmat->common.maxsize), 1); pages = MIN(maxpages - bz->total_bpages, pages); pages = MAX(pages, 1); if (alloc_bounce_pages(dmat, pages) < pages) error = ENOMEM; - if ((dmat->common.flags & BUS_DMA_MIN_ALLOC_COMP) + if ((dmat->bounce_flags & BUS_DMA_MIN_ALLOC_COMP) == 0) { if (error == 0) { - dmat->common.flags |= + dmat->bounce_flags |= BUS_DMA_MIN_ALLOC_COMP; } } else @@ -342,7 +347,7 @@ static int bounce_bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map) { - if (map != NULL && map != &nobounce_dmamap && map != &contig_dmamap) { + if (map != NULL && map != &nobounce_dmamap) { if (STAILQ_FIRST(&map->bpages) != NULL) { CTR3(KTR_BUSDMA, "%s: tag %p error %d", __func__, dmat, EBUSY); @@ -416,13 +421,13 @@ bounce_bus_dmamem_alloc(bus_dma_tag_t dm *vaddr = (void *)kmem_alloc_attr(kernel_arena, dmat->common.maxsize, mflags, 0ul, dmat->common.lowaddr, attr); - *mapp = &contig_dmamap; + dmat->bounce_flags |= BUS_DMA_KMEM_ALLOC; } else { *vaddr = (void *)kmem_alloc_contig(kernel_arena, dmat->common.maxsize, mflags, 0ul, dmat->common.lowaddr, dmat->common.alignment != 0 ? dmat->common.alignment : 1ul, dmat->common.boundary, attr); - *mapp = &contig_dmamap; + dmat->bounce_flags |= BUS_DMA_KMEM_ALLOC; } if (*vaddr == NULL) { CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", @@ -445,18 +450,18 @@ bounce_bus_dmamem_free(bus_dma_tag_t dma { /* * dmamem does not need to be bounced, so the map should be - * NULL if malloc() was used and contig_dmamap if - * kmem_alloc_contig() was used. + * NULL and the BUS_DMA_KMEM_ALLOC flag cleared if malloc() + * was used and set if kmem_alloc_contig() was used. */ - if (!(map == NULL || map == &contig_dmamap)) + if (map != NULL) panic("bus_dmamem_free: Invalid map freed\n"); - if (map == NULL) + if ((dmat->bounce_flags & BUS_DMA_KMEM_ALLOC) == 0) free(vaddr, M_DEVBUF); else kmem_free(kernel_arena, (vm_offset_t)vaddr, dmat->common.maxsize); CTR3(KTR_BUSDMA, "%s: tag %p flags 0x%x", __func__, dmat, - dmat->common.flags); + dmat->bounce_flags); } static void @@ -608,13 +613,13 @@ bounce_bus_dmamap_load_phys(bus_dma_tag_ bus_addr_t curaddr; int error; - if (map == NULL || map == &contig_dmamap) + if (map == NULL) map = &nobounce_dmamap; if (segs == NULL) segs = dmat->segments; - if ((dmat->common.flags & BUS_DMA_COULD_BOUNCE) != 0) { + if ((dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0) { _bus_dmamap_count_phys(dmat, map, buf, buflen, flags); if (map->pagesneeded != 0) { error = _bus_dmamap_reserve_pages(dmat, map, flags); @@ -626,7 +631,7 @@ bounce_bus_dmamap_load_phys(bus_dma_tag_ while (buflen > 0) { curaddr = buf; sgsize = MIN(buflen, dmat->common.maxsegsz); - if (((dmat->common.flags & BUS_DMA_COULD_BOUNCE) != 0) && + if (((dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0) && map->pagesneeded != 0 && bus_dma_run_filter(&dmat->common, curaddr)) { sgsize = MIN(sgsize, PAGE_SIZE); @@ -661,13 +666,13 @@ bounce_bus_dmamap_load_buffer(bus_dma_ta vm_offset_t vaddr; int error; - if (map == NULL || map == &contig_dmamap) + if (map == NULL) map = &nobounce_dmamap; if (segs == NULL) segs = dmat->segments; - if ((dmat->common.flags & BUS_DMA_COULD_BOUNCE) != 0) { + if ((dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0) { _bus_dmamap_count_pages(dmat, map, pmap, buf, buflen, flags); if (map->pagesneeded != 0) { error = _bus_dmamap_reserve_pages(dmat, map, flags); @@ -691,7 +696,7 @@ bounce_bus_dmamap_load_buffer(bus_dma_ta */ max_sgsize = MIN(buflen, dmat->common.maxsegsz); sgsize = PAGE_SIZE - ((vm_offset_t)curaddr & PAGE_MASK); - if (((dmat->common.flags & BUS_DMA_COULD_BOUNCE) != 0) && + if (((dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0) && map->pagesneeded != 0 && bus_dma_run_filter(&dmat->common, curaddr)) { sgsize = roundup2(sgsize, dmat->common.alignment); @@ -972,7 +977,7 @@ add_bounce_page(bus_dma_tag_t dmat, bus_ struct bounce_page *bpage; KASSERT(dmat->bounce_zone != NULL, ("no bounce zone in dma tag")); - KASSERT(map != NULL && map != &nobounce_dmamap && map != &contig_dmamap, + KASSERT(map != NULL && map != &nobounce_dmamap, ("add_bounce_page: bad map %p", map)); bz = dmat->bounce_zone; From owner-svn-src-stable@FreeBSD.ORG Tue Jul 1 06:59:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 68DCAD9A; Tue, 1 Jul 2014 06:59:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C9B92C1E; Tue, 1 Jul 2014 06:59:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s616xOmu096243; Tue, 1 Jul 2014 06:59:24 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s616xOfc096242; Tue, 1 Jul 2014 06:59:24 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201407010659.s616xOfc096242@svn.freebsd.org> From: Scott Long Date: Tue, 1 Jul 2014 06:59:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268077 - stable/10/sys/ufs/ffs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jul 2014 06:59:24 -0000 Author: scottl Date: Tue Jul 1 06:59:23 2014 New Revision: 268077 URL: http://svnweb.freebsd.org/changeset/base/268077 Log: Merge r265463: Due to reasons unknown at this time, the system can be forced to write a journal block even when there are no journal entries to be written. Until the root cause is found, handle this case by ensuring that a valid journal segment is always written. Second, the data buffer used for writing journal entries was never being scrubbed of old data. Fix this. Submitted by: Takehara Mikihito Obtained from: Netflix, Inc. Modified: stable/10/sys/ufs/ffs/ffs_softdep.c Modified: stable/10/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/10/sys/ufs/ffs/ffs_softdep.c Tue Jul 1 06:50:35 2014 (r268076) +++ stable/10/sys/ufs/ffs/ffs_softdep.c Tue Jul 1 06:59:23 2014 (r268077) @@ -1275,6 +1275,7 @@ static int stat_cleanup_blkrequests; /* static int stat_cleanup_inorequests; /* Number of inode cleanup requests */ static int stat_cleanup_retries; /* Number of cleanups that needed to flush */ static int stat_cleanup_failures; /* Number of cleanup requests that failed */ +static int stat_emptyjblocks; /* Number of potentially empty journal blocks */ SYSCTL_INT(_debug_softdep, OID_AUTO, max_softdeps, CTLFLAG_RW, &max_softdeps, 0, ""); @@ -1334,6 +1335,8 @@ SYSCTL_INT(_debug_softdep, OID_AUTO, cle &stat_cleanup_failures, 0, ""); SYSCTL_INT(_debug_softdep, OID_AUTO, flushcache, CTLFLAG_RW, &softdep_flushcache, 0, ""); +SYSCTL_INT(_debug_softdep, OID_AUTO, emptyjblocks, CTLFLAG_RD, + &stat_emptyjblocks, 0, ""); SYSCTL_DECL(_vfs_ffs); @@ -3328,6 +3331,24 @@ softdep_process_journal(mp, needwk, flag */ data = bp->b_data; off = 0; + + /* + * Always put a header on the first block. + * XXX As with below, there might not be a chance to get + * into the loop. Ensure that something valid is written. + */ + jseg_write(ump, jseg, data); + off += JREC_SIZE; + data = bp->b_data + off; + + /* + * XXX Something is wrong here. There's no work to do, + * but we need to perform and I/O and allow it to complete + * anyways. + */ + if (LIST_EMPTY(&ump->softdep_journal_pending)) + stat_emptyjblocks++; + while ((wk = LIST_FIRST(&ump->softdep_journal_pending)) != NULL) { if (cnt == 0) @@ -3377,6 +3398,11 @@ softdep_process_journal(mp, needwk, flag data = bp->b_data + off; cnt--; } + + /* Clear any remaining space so we don't leak kernel data */ + if (size > off) + bzero(data, size - off); + /* * Write this one buffer and continue. */ From owner-svn-src-stable@FreeBSD.ORG Tue Jul 1 13:29:20 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C6B95404; Tue, 1 Jul 2014 13:29:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B066C2120; Tue, 1 Jul 2014 13:29:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s61DTKCt078152; Tue, 1 Jul 2014 13:29:20 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s61DTI8Q078118; Tue, 1 Jul 2014 13:29:18 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201407011329.s61DTI8Q078118@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 1 Jul 2014 13:29:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268091 - in stable/10: sbin/geom/class/part sys/conf sys/geom/part sys/modules/geom/geom_part sys/modules/geom/geom_part/geom_part_bsd64 sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jul 2014 13:29:20 -0000 Author: ae Date: Tue Jul 1 13:29:17 2014 New Revision: 268091 URL: http://svnweb.freebsd.org/changeset/base/268091 Log: MFC r267355: Add UUIDs for DragonFlyBSD's partition types. MFC r267356: Add DragonFlyBSD's Hammer FS types and type names. MFC r267357: Add aliases for DragonFlyBSD's partition types. MFC r267358: Allow dumping to DragonFlyBSD's swap partition. MFC r267359: Add disklabel64 support to GEOM_PART class. This partitioning scheme is used in DragonFlyBSD. It is similar to BSD disklabel, but has the following improvements: * metadata has own dedicated place and isn't accessible through partitions; * all offsets are 64-bit; * supports 16 partitions by default (has reserved place for more); * has reserved place for backup label (but not yet implemented); * has UUIDs for partitions and partition types; MFC r267360: Add disklabel64 support Relnotes: yes Added: stable/10/sys/geom/part/g_part_bsd64.c - copied unchanged from r267359, head/sys/geom/part/g_part_bsd64.c stable/10/sys/modules/geom/geom_part/geom_part_bsd64/ - copied from r267359, head/sys/modules/geom/geom_part/geom_part_bsd64/ Modified: stable/10/sbin/geom/class/part/gpart.8 stable/10/sys/conf/NOTES stable/10/sys/conf/files stable/10/sys/conf/options stable/10/sys/geom/part/g_part.c stable/10/sys/geom/part/g_part.h stable/10/sys/geom/part/g_part_bsd.c stable/10/sys/geom/part/g_part_gpt.c stable/10/sys/modules/geom/geom_part/Makefile stable/10/sys/sys/disklabel.h stable/10/sys/sys/gpt.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/geom/class/part/gpart.8 ============================================================================== --- stable/10/sbin/geom/class/part/gpart.8 Tue Jul 1 12:44:47 2014 (r268090) +++ stable/10/sbin/geom/class/part/gpart.8 Tue Jul 1 13:29:17 2014 (r268091) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 2, 2014 +.Dd June 11, 2014 .Dt GPART 8 .Os .Sh NAME @@ -491,6 +491,12 @@ called Requires the .Cm GEOM_PART_BSD kernel option. +.It Cm BSD64 +64-bit implementation of BSD disklabel used in DragonFlyBSD to subdivide MBR +or GPT partitions. +Requires the +.Cm GEOM_PART_BSD64 +kernel option. .It Cm LDM The Logical Disk Manager is an implementation of volume manager for Microsoft Windows NT. Modified: stable/10/sys/conf/NOTES ============================================================================== --- stable/10/sys/conf/NOTES Tue Jul 1 12:44:47 2014 (r268090) +++ stable/10/sys/conf/NOTES Tue Jul 1 13:29:17 2014 (r268091) @@ -162,6 +162,7 @@ options GEOM_MULTIPATH # Disk multipat options GEOM_NOP # Test class. options GEOM_PART_APM # Apple partitioning options GEOM_PART_BSD # BSD disklabel +options GEOM_PART_BSD64 # BSD disklabel64 options GEOM_PART_EBR # Extended Boot Records options GEOM_PART_EBR_COMPAT # Backward compatible partition names options GEOM_PART_GPT # GPT partitioning Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Tue Jul 1 12:44:47 2014 (r268090) +++ stable/10/sys/conf/files Tue Jul 1 13:29:17 2014 (r268091) @@ -2764,6 +2764,7 @@ geom/part/g_part.c standard geom/part/g_part_if.m standard geom/part/g_part_apm.c optional geom_part_apm geom/part/g_part_bsd.c optional geom_part_bsd +geom/part/g_part_bsd64.c optional geom_part_bsd64 geom/part/g_part_ebr.c optional geom_part_ebr geom/part/g_part_gpt.c optional geom_part_gpt geom/part/g_part_ldm.c optional geom_part_ldm Modified: stable/10/sys/conf/options ============================================================================== --- stable/10/sys/conf/options Tue Jul 1 12:44:47 2014 (r268090) +++ stable/10/sys/conf/options Tue Jul 1 13:29:17 2014 (r268091) @@ -109,6 +109,7 @@ GEOM_MULTIPATH opt_geom.h GEOM_NOP opt_geom.h GEOM_PART_APM opt_geom.h GEOM_PART_BSD opt_geom.h +GEOM_PART_BSD64 opt_geom.h GEOM_PART_EBR opt_geom.h GEOM_PART_EBR_COMPAT opt_geom.h GEOM_PART_GPT opt_geom.h Modified: stable/10/sys/geom/part/g_part.c ============================================================================== --- stable/10/sys/geom/part/g_part.c Tue Jul 1 12:44:47 2014 (r268090) +++ stable/10/sys/geom/part/g_part.c Tue Jul 1 13:29:17 2014 (r268091) @@ -108,6 +108,15 @@ struct g_part_alias_list { { "vmware-vmkdiag", G_PART_ALIAS_VMKDIAG }, { "vmware-reserved", G_PART_ALIAS_VMRESERVED }, { "vmware-vsanhdr", G_PART_ALIAS_VMVSANHDR }, + { "dragonfly-label32", G_PART_ALIAS_DFBSD }, + { "dragonfly-label64", G_PART_ALIAS_DFBSD64 }, + { "dragonfly-swap", G_PART_ALIAS_DFBSD_SWAP }, + { "dragonfly-ufs", G_PART_ALIAS_DFBSD_UFS }, + { "dragonfly-vinum", G_PART_ALIAS_DFBSD_VINUM }, + { "dragonfly-ccd", G_PART_ALIAS_DFBSD_CCD }, + { "dragonfly-legacy", G_PART_ALIAS_DFBSD_LEGACY }, + { "dragonfly-hammer", G_PART_ALIAS_DFBSD_HAMMER }, + { "dragonfly-hammer2", G_PART_ALIAS_DFBSD_HAMMER2 }, }; SYSCTL_DECL(_kern_geom); Modified: stable/10/sys/geom/part/g_part.h ============================================================================== --- stable/10/sys/geom/part/g_part.h Tue Jul 1 12:44:47 2014 (r268090) +++ stable/10/sys/geom/part/g_part.h Tue Jul 1 13:29:17 2014 (r268091) @@ -75,6 +75,15 @@ enum g_part_alias { G_PART_ALIAS_VMKDIAG, /* A VMware vmkDiagnostic partition entry */ G_PART_ALIAS_VMRESERVED, /* A VMware reserved partition entry */ G_PART_ALIAS_VMVSANHDR, /* A VMware vSAN header partition entry */ + G_PART_ALIAS_DFBSD, /* A DfBSD label32 partition entry */ + G_PART_ALIAS_DFBSD64, /* A DfBSD label64 partition entry */ + G_PART_ALIAS_DFBSD_SWAP, /* A DfBSD swap partition entry */ + G_PART_ALIAS_DFBSD_UFS, /* A DfBSD UFS partition entry */ + G_PART_ALIAS_DFBSD_VINUM, /* A DfBSD Vinum partition entry */ + G_PART_ALIAS_DFBSD_CCD, /* A DfBSD CCD partition entry */ + G_PART_ALIAS_DFBSD_LEGACY, /* A DfBSD legacy partition entry */ + G_PART_ALIAS_DFBSD_HAMMER, /* A DfBSD HAMMER FS partition entry */ + G_PART_ALIAS_DFBSD_HAMMER2, /* A DfBSD HAMMER2 FS partition entry */ /* Keep the following last */ G_PART_ALIAS_COUNT }; Modified: stable/10/sys/geom/part/g_part_bsd.c ============================================================================== --- stable/10/sys/geom/part/g_part_bsd.c Tue Jul 1 12:44:47 2014 (r268090) +++ stable/10/sys/geom/part/g_part_bsd.c Tue Jul 1 13:29:17 2014 (r268091) @@ -112,12 +112,26 @@ static struct g_part_scheme g_part_bsd_s }; G_PART_SCHEME_DECLARE(g_part_bsd); +static struct g_part_bsd_alias { + uint8_t type; + int alias; +} bsd_alias_match[] = { + { FS_BSDFFS, G_PART_ALIAS_FREEBSD_UFS }, + { FS_SWAP, G_PART_ALIAS_FREEBSD_SWAP }, + { FS_ZFS, G_PART_ALIAS_FREEBSD_ZFS }, + { FS_VINUM, G_PART_ALIAS_FREEBSD_VINUM }, + { FS_NANDFS, G_PART_ALIAS_FREEBSD_NANDFS }, + { FS_HAMMER, G_PART_ALIAS_DFBSD_HAMMER }, + { FS_HAMMER2, G_PART_ALIAS_DFBSD_HAMMER2 }, +}; + static int bsd_parse_type(const char *type, uint8_t *fstype) { const char *alias; char *endp; long lt; + int i; if (type[0] == '!') { lt = strtol(type + 1, &endp, 0); @@ -126,30 +140,13 @@ bsd_parse_type(const char *type, uint8_t *fstype = (u_int)lt; return (0); } - alias = g_part_alias_name(G_PART_ALIAS_FREEBSD_NANDFS); - if (!strcasecmp(type, alias)) { - *fstype = FS_NANDFS; - return (0); - } - alias = g_part_alias_name(G_PART_ALIAS_FREEBSD_SWAP); - if (!strcasecmp(type, alias)) { - *fstype = FS_SWAP; - return (0); - } - alias = g_part_alias_name(G_PART_ALIAS_FREEBSD_UFS); - if (!strcasecmp(type, alias)) { - *fstype = FS_BSDFFS; - return (0); - } - alias = g_part_alias_name(G_PART_ALIAS_FREEBSD_VINUM); - if (!strcasecmp(type, alias)) { - *fstype = FS_VINUM; - return (0); - } - alias = g_part_alias_name(G_PART_ALIAS_FREEBSD_ZFS); - if (!strcasecmp(type, alias)) { - *fstype = FS_ZFS; - return (0); + for (i = 0; + i < sizeof(bsd_alias_match) / sizeof(bsd_alias_match[0]); i++) { + alias = g_part_alias_name(bsd_alias_match[i].alias); + if (strcasecmp(type, alias) == 0) { + *fstype = bsd_alias_match[i].type; + return (0); + } } return (EINVAL); } Copied: stable/10/sys/geom/part/g_part_bsd64.c (from r267359, head/sys/geom/part/g_part_bsd64.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/geom/part/g_part_bsd64.c Tue Jul 1 13:29:17 2014 (r268091, copy of r267359, head/sys/geom/part/g_part_bsd64.c) @@ -0,0 +1,667 @@ +/*- + * Copyright (c) 2014 Andrey V. Elsukov + * All rights reserved. + * + * 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 ``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 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "g_part_if.h" + +FEATURE(geom_part_bsd64, "GEOM partitioning class for 64-bit BSD disklabels"); + +/* XXX: move this to sys/disklabel64.h */ +#define DISKMAGIC64 ((uint32_t)0xc4464c59) +#define MAXPARTITIONS64 16 +#define RESPARTITIONS64 32 + +struct disklabel64 { + char d_reserved0[512]; /* reserved or unused */ + u_int32_t d_magic; /* the magic number */ + u_int32_t d_crc; /* crc32() d_magic thru last part */ + u_int32_t d_align; /* partition alignment requirement */ + u_int32_t d_npartitions; /* number of partitions */ + struct uuid d_stor_uuid; /* unique uuid for label */ + + u_int64_t d_total_size; /* total size incl everything (bytes) */ + u_int64_t d_bbase; /* boot area base offset (bytes) */ + /* boot area is pbase - bbase */ + u_int64_t d_pbase; /* first allocatable offset (bytes) */ + u_int64_t d_pstop; /* last allocatable offset+1 (bytes) */ + u_int64_t d_abase; /* location of backup copy if not 0 */ + + u_char d_packname[64]; + u_char d_reserved[64]; + + /* + * Note: offsets are relative to the base of the slice, NOT to + * d_pbase. Unlike 32 bit disklabels the on-disk format for + * a 64 bit disklabel remains slice-relative. + * + * An uninitialized partition has a p_boffset and p_bsize of 0. + * + * If p_fstype is not supported for a live partition it is set + * to FS_OTHER. This is typically the case when the filesystem + * is identified by its uuid. + */ + struct partition64 { /* the partition table */ + u_int64_t p_boffset; /* slice relative offset, in bytes */ + u_int64_t p_bsize; /* size of partition, in bytes */ + u_int8_t p_fstype; + u_int8_t p_unused01; /* reserved, must be 0 */ + u_int8_t p_unused02; /* reserved, must be 0 */ + u_int8_t p_unused03; /* reserved, must be 0 */ + u_int32_t p_unused04; /* reserved, must be 0 */ + u_int32_t p_unused05; /* reserved, must be 0 */ + u_int32_t p_unused06; /* reserved, must be 0 */ + struct uuid p_type_uuid;/* mount type as UUID */ + struct uuid p_stor_uuid;/* unique uuid for storage */ + } d_partitions[MAXPARTITIONS64];/* actually may be more */ +}; + +struct g_part_bsd64_table { + struct g_part_table base; + + uint32_t d_align; + uint64_t d_bbase; + uint64_t d_abase; + struct uuid d_stor_uuid; + char d_reserved0[512]; + u_char d_packname[64]; + u_char d_reserved[64]; +}; + +struct g_part_bsd64_entry { + struct g_part_entry base; + + uint8_t fstype; + struct uuid type_uuid; + struct uuid stor_uuid; +}; + +static int g_part_bsd64_add(struct g_part_table *, struct g_part_entry *, + struct g_part_parms *); +static int g_part_bsd64_bootcode(struct g_part_table *, struct g_part_parms *); +static int g_part_bsd64_create(struct g_part_table *, struct g_part_parms *); +static int g_part_bsd64_destroy(struct g_part_table *, struct g_part_parms *); +static void g_part_bsd64_dumpconf(struct g_part_table *, struct g_part_entry *, + struct sbuf *, const char *); +static int g_part_bsd64_dumpto(struct g_part_table *, struct g_part_entry *); +static int g_part_bsd64_modify(struct g_part_table *, struct g_part_entry *, + struct g_part_parms *); +static const char *g_part_bsd64_name(struct g_part_table *, struct g_part_entry *, + char *, size_t); +static int g_part_bsd64_probe(struct g_part_table *, struct g_consumer *); +static int g_part_bsd64_read(struct g_part_table *, struct g_consumer *); +static const char *g_part_bsd64_type(struct g_part_table *, struct g_part_entry *, + char *, size_t); +static int g_part_bsd64_write(struct g_part_table *, struct g_consumer *); +static int g_part_bsd64_resize(struct g_part_table *, struct g_part_entry *, + struct g_part_parms *); + +static kobj_method_t g_part_bsd64_methods[] = { + KOBJMETHOD(g_part_add, g_part_bsd64_add), + KOBJMETHOD(g_part_bootcode, g_part_bsd64_bootcode), + KOBJMETHOD(g_part_create, g_part_bsd64_create), + KOBJMETHOD(g_part_destroy, g_part_bsd64_destroy), + KOBJMETHOD(g_part_dumpconf, g_part_bsd64_dumpconf), + KOBJMETHOD(g_part_dumpto, g_part_bsd64_dumpto), + KOBJMETHOD(g_part_modify, g_part_bsd64_modify), + KOBJMETHOD(g_part_resize, g_part_bsd64_resize), + KOBJMETHOD(g_part_name, g_part_bsd64_name), + KOBJMETHOD(g_part_probe, g_part_bsd64_probe), + KOBJMETHOD(g_part_read, g_part_bsd64_read), + KOBJMETHOD(g_part_type, g_part_bsd64_type), + KOBJMETHOD(g_part_write, g_part_bsd64_write), + { 0, 0 } +}; + +static struct g_part_scheme g_part_bsd64_scheme = { + "BSD64", + g_part_bsd64_methods, + sizeof(struct g_part_bsd64_table), + .gps_entrysz = sizeof(struct g_part_bsd64_entry), + .gps_minent = MAXPARTITIONS64, + .gps_maxent = MAXPARTITIONS64 +}; +G_PART_SCHEME_DECLARE(g_part_bsd64); + +#define EQUUID(a, b) (memcmp(a, b, sizeof(struct uuid)) == 0) +static struct uuid bsd64_uuid_unused = GPT_ENT_TYPE_UNUSED; +static struct uuid bsd64_uuid_dfbsd_swap = GPT_ENT_TYPE_DRAGONFLY_SWAP; +static struct uuid bsd64_uuid_dfbsd_ufs1 = GPT_ENT_TYPE_DRAGONFLY_UFS1; +static struct uuid bsd64_uuid_dfbsd_vinum = GPT_ENT_TYPE_DRAGONFLY_VINUM; +static struct uuid bsd64_uuid_dfbsd_ccd = GPT_ENT_TYPE_DRAGONFLY_CCD; +static struct uuid bsd64_uuid_dfbsd_legacy = GPT_ENT_TYPE_DRAGONFLY_LEGACY; +static struct uuid bsd64_uuid_dfbsd_hammer = GPT_ENT_TYPE_DRAGONFLY_HAMMER; +static struct uuid bsd64_uuid_dfbsd_hammer2 = GPT_ENT_TYPE_DRAGONFLY_HAMMER2; +static struct uuid bsd64_uuid_freebsd_boot = GPT_ENT_TYPE_FREEBSD_BOOT; +static struct uuid bsd64_uuid_freebsd_nandfs = GPT_ENT_TYPE_FREEBSD_NANDFS; +static struct uuid bsd64_uuid_freebsd_swap = GPT_ENT_TYPE_FREEBSD_SWAP; +static struct uuid bsd64_uuid_freebsd_ufs = GPT_ENT_TYPE_FREEBSD_UFS; +static struct uuid bsd64_uuid_freebsd_vinum = GPT_ENT_TYPE_FREEBSD_VINUM; +static struct uuid bsd64_uuid_freebsd_zfs = GPT_ENT_TYPE_FREEBSD_ZFS; + +struct bsd64_uuid_alias { + struct uuid *uuid; + uint8_t fstype; + int alias; +}; +static struct bsd64_uuid_alias dfbsd_alias_match[] = { + { &bsd64_uuid_dfbsd_swap, FS_SWAP, G_PART_ALIAS_DFBSD_SWAP }, + { &bsd64_uuid_dfbsd_ufs1, FS_BSDFFS, G_PART_ALIAS_DFBSD_UFS }, + { &bsd64_uuid_dfbsd_vinum, FS_VINUM, G_PART_ALIAS_DFBSD_VINUM }, + { &bsd64_uuid_dfbsd_ccd, FS_CCD, G_PART_ALIAS_DFBSD_CCD }, + { &bsd64_uuid_dfbsd_legacy, FS_OTHER, G_PART_ALIAS_DFBSD_LEGACY }, + { &bsd64_uuid_dfbsd_hammer, FS_HAMMER, G_PART_ALIAS_DFBSD_HAMMER }, + { &bsd64_uuid_dfbsd_hammer2, FS_HAMMER2, G_PART_ALIAS_DFBSD_HAMMER2 }, + { NULL, 0, 0} +}; +static struct bsd64_uuid_alias fbsd_alias_match[] = { + { &bsd64_uuid_freebsd_boot, FS_OTHER, G_PART_ALIAS_FREEBSD_BOOT }, + { &bsd64_uuid_freebsd_swap, FS_OTHER, G_PART_ALIAS_FREEBSD_SWAP }, + { &bsd64_uuid_freebsd_ufs, FS_OTHER, G_PART_ALIAS_FREEBSD_UFS }, + { &bsd64_uuid_freebsd_zfs, FS_OTHER, G_PART_ALIAS_FREEBSD_ZFS }, + { &bsd64_uuid_freebsd_vinum, FS_OTHER, G_PART_ALIAS_FREEBSD_VINUM }, + { &bsd64_uuid_freebsd_nandfs, FS_OTHER, G_PART_ALIAS_FREEBSD_NANDFS }, + { NULL, 0, 0} +}; + +static int +bsd64_parse_type(const char *type, struct g_part_bsd64_entry *entry) +{ + struct uuid tmp; + const struct bsd64_uuid_alias *uap; + const char *alias; + char *p; + long lt; + int error; + + if (type[0] == '!') { + if (type[1] == '\0') + return (EINVAL); + lt = strtol(type + 1, &p, 0); + /* The type specified as number */ + if (*p == '\0') { + if (lt <= 0 || lt > 255) + return (EINVAL); + entry->fstype = lt; + entry->type_uuid = bsd64_uuid_unused; + return (0); + } + /* The type specified as uuid */ + error = parse_uuid(type + 1, &tmp); + if (error != 0) + return (error); + if (EQUUID(&tmp, &bsd64_uuid_unused)) + return (EINVAL); + for (uap = &dfbsd_alias_match[0]; uap->uuid != NULL; uap++) { + if (EQUUID(&tmp, uap->uuid)) { + /* Prefer fstype for known uuids */ + entry->type_uuid = bsd64_uuid_unused; + entry->fstype = uap->fstype; + return (0); + } + } + entry->type_uuid = tmp; + entry->fstype = FS_OTHER; + return (0); + } + /* The type specified as symbolic alias name */ + for (uap = &fbsd_alias_match[0]; uap->uuid != NULL; uap++) { + alias = g_part_alias_name(uap->alias); + if (!strcasecmp(type, alias)) { + entry->type_uuid = *uap->uuid; + entry->fstype = uap->fstype; + return (0); + } + } + for (uap = &dfbsd_alias_match[0]; uap->uuid != NULL; uap++) { + alias = g_part_alias_name(uap->alias); + if (!strcasecmp(type, alias)) { + entry->type_uuid = bsd64_uuid_unused; + entry->fstype = uap->fstype; + return (0); + } + } + return (EINVAL); +} + +static int +g_part_bsd64_add(struct g_part_table *basetable, struct g_part_entry *baseentry, + struct g_part_parms *gpp) +{ + struct g_part_bsd64_entry *entry; + + if (gpp->gpp_parms & G_PART_PARM_LABEL) + return (EINVAL); + + entry = (struct g_part_bsd64_entry *)baseentry; + if (bsd64_parse_type(gpp->gpp_type, entry) != 0) + return (EINVAL); + kern_uuidgen(&entry->stor_uuid, 1); + return (0); +} + +static int +g_part_bsd64_bootcode(struct g_part_table *basetable, struct g_part_parms *gpp) +{ + + return (EOPNOTSUPP); +} + +#define PALIGN_SIZE (1024 * 1024) +#define PALIGN_MASK (PALIGN_SIZE - 1) +#define BLKSIZE (4 * 1024) +#define BOOTSIZE (32 * 1024) +#define DALIGN_SIZE (32 * 1024) +static int +g_part_bsd64_create(struct g_part_table *basetable, struct g_part_parms *gpp) +{ + struct g_part_bsd64_table *table; + struct g_part_entry *baseentry; + struct g_provider *pp; + uint64_t blkmask, pbase; + uint32_t blksize, ressize; + + pp = gpp->gpp_provider; + if (pp->mediasize < 2* PALIGN_SIZE) + return (ENOSPC); + + /* + * Use at least 4KB block size. Blksize is stored in the d_align. + * XXX: Actually it is used just for calculate d_bbase and used + * for better alignment in bsdlabel64(8). + */ + blksize = pp->sectorsize < BLKSIZE ? BLKSIZE: pp->sectorsize; + blkmask = blksize - 1; + /* Reserve enough space for RESPARTITIONS64 partitions. */ + ressize = offsetof(struct disklabel64, d_partitions[RESPARTITIONS64]); + ressize = (ressize + blkmask) & ~blkmask; + /* + * Reserve enough space for bootcode and align first allocatable + * offset to PALIGN_SIZE. + * XXX: Currently DragonFlyBSD has 32KB bootcode, but the size could + * be bigger, because it is possible change it (it is equal pbase-bbase) + * in the bsdlabel64(8). + */ + pbase = ressize + ((BOOTSIZE + blkmask) & ~blkmask); + pbase = (pbase + PALIGN_MASK) & ~PALIGN_MASK; + /* + * Take physical offset into account and make first allocatable + * offset 32KB aligned to the start of the physical disk. + * XXX: Actually there are no such restrictions, this is how + * DragonFlyBSD behaves. + */ + pbase += DALIGN_SIZE - pp->stripeoffset % DALIGN_SIZE; + + table = (struct g_part_bsd64_table *)basetable; + table->d_align = blksize; + table->d_bbase = ressize / pp->sectorsize; + table->d_abase = ((pp->mediasize - ressize) & + ~blkmask) / pp->sectorsize; + kern_uuidgen(&table->d_stor_uuid, 1); + basetable->gpt_first = pbase / pp->sectorsize; + basetable->gpt_last = table->d_abase - 1; /* XXX */ + /* + * Create 'c' partition and make it internal, so user will not be + * able use it. + */ + baseentry = g_part_new_entry(basetable, RAW_PART + 1, 0, 0); + baseentry->gpe_internal = 1; + return (0); +} + +static int +g_part_bsd64_destroy(struct g_part_table *basetable, struct g_part_parms *gpp) +{ + struct g_provider *pp; + + pp = LIST_FIRST(&basetable->gpt_gp->consumer)->provider; + if (pp->sectorsize > offsetof(struct disklabel64, d_magic)) + basetable->gpt_smhead |= 1; + else + basetable->gpt_smhead |= 3; + return (0); +} + +static void +g_part_bsd64_dumpconf(struct g_part_table *basetable, + struct g_part_entry *baseentry, struct sbuf *sb, const char *indent) +{ + struct g_part_bsd64_table *table; + struct g_part_bsd64_entry *entry; + char buf[sizeof(table->d_packname)]; + + entry = (struct g_part_bsd64_entry *)baseentry; + if (indent == NULL) { + /* conftxt: libdisk compatibility */ + sbuf_printf(sb, " xs BSD64 xt %u", entry->fstype); + } else if (entry != NULL) { + /* confxml: partition entry information */ + sbuf_printf(sb, "%s%u\n", indent, + entry->fstype); + if (!EQUUID(&bsd64_uuid_unused, &entry->type_uuid)) { + sbuf_printf(sb, "%s", indent); + sbuf_printf_uuid(sb, &entry->type_uuid); + sbuf_printf(sb, "\n"); + } + sbuf_printf(sb, "%s", indent); + sbuf_printf_uuid(sb, &entry->stor_uuid); + sbuf_printf(sb, "\n"); + } else { + /* confxml: scheme information */ + table = (struct g_part_bsd64_table *)basetable; + sbuf_printf(sb, "%s%ju\n", indent, + (uintmax_t)table->d_bbase); + if (table->d_abase) + sbuf_printf(sb, "%s%ju\n", + indent, (uintmax_t)table->d_abase); + sbuf_printf(sb, "%s", indent); + sbuf_printf_uuid(sb, &table->d_stor_uuid); + sbuf_printf(sb, "\n"); + sbuf_printf(sb, "%s\n"); + } +} + +static int +g_part_bsd64_dumpto(struct g_part_table *table, struct g_part_entry *baseentry) +{ + struct g_part_bsd64_entry *entry; + + /* Allow dumping to a swap partition. */ + entry = (struct g_part_bsd64_entry *)baseentry; + if (entry->fstype == FS_SWAP || + EQUUID(&entry->type_uuid, &bsd64_uuid_dfbsd_swap) || + EQUUID(&entry->type_uuid, &bsd64_uuid_freebsd_swap)) + return (1); + return (0); +} + +static int +g_part_bsd64_modify(struct g_part_table *basetable, + struct g_part_entry *baseentry, struct g_part_parms *gpp) +{ + struct g_part_bsd64_entry *entry; + + if (gpp->gpp_parms & G_PART_PARM_LABEL) + return (EINVAL); + + entry = (struct g_part_bsd64_entry *)baseentry; + if (gpp->gpp_parms & G_PART_PARM_TYPE) + return (bsd64_parse_type(gpp->gpp_type, entry)); + return (0); +} + +static int +g_part_bsd64_resize(struct g_part_table *basetable, + struct g_part_entry *baseentry, struct g_part_parms *gpp) +{ + struct g_part_bsd64_table *table; + struct g_provider *pp; + + if (baseentry == NULL) { + pp = LIST_FIRST(&basetable->gpt_gp->consumer)->provider; + table = (struct g_part_bsd64_table *)basetable; + table->d_abase = ((pp->mediasize - + table->d_bbase * pp->sectorsize) & ~(table->d_align - 1)) / + pp->sectorsize; + basetable->gpt_last = table->d_abase - 1; + return (0); + } + baseentry->gpe_end = baseentry->gpe_start + gpp->gpp_size - 1; + return (0); +} + +static const char * +g_part_bsd64_name(struct g_part_table *table, struct g_part_entry *baseentry, + char *buf, size_t bufsz) +{ + + snprintf(buf, bufsz, "%c", 'a' + baseentry->gpe_index - 1); + return (buf); +} + +static int +g_part_bsd64_probe(struct g_part_table *table, struct g_consumer *cp) +{ + struct g_provider *pp; + uint32_t v; + int error; + u_char *buf; + + pp = cp->provider; + if (pp->mediasize < 2 * PALIGN_SIZE) + return (ENOSPC); + v = (pp->sectorsize + + offsetof(struct disklabel64, d_magic)) & ~(pp->sectorsize - 1); + buf = g_read_data(cp, 0, v, &error); + if (buf == NULL) + return (error); + v = le32dec(buf + offsetof(struct disklabel64, d_magic)); + g_free(buf); + return (v == DISKMAGIC64 ? G_PART_PROBE_PRI_HIGH: ENXIO); +} + +static int +g_part_bsd64_read(struct g_part_table *basetable, struct g_consumer *cp) +{ + struct g_part_bsd64_table *table; + struct g_part_bsd64_entry *entry; + struct g_part_entry *baseentry; + struct g_provider *pp; + struct disklabel64 *dlp; + uint64_t v64, sz; + uint32_t v32; + int error, index; + u_char *buf; + + pp = cp->provider; + table = (struct g_part_bsd64_table *)basetable; + v32 = (pp->sectorsize + + sizeof(struct disklabel64) - 1) & ~(pp->sectorsize - 1); + buf = g_read_data(cp, 0, v32, &error); + if (buf == NULL) + return (error); + + dlp = (struct disklabel64 *)buf; + basetable->gpt_entries = le32toh(dlp->d_npartitions); + if (basetable->gpt_entries > MAXPARTITIONS64) + goto invalid_label; + v32 = le32toh(dlp->d_crc); + dlp->d_crc = 0; + if (crc32(&dlp->d_magic, offsetof(struct disklabel64, + d_partitions[basetable->gpt_entries]) - + offsetof(struct disklabel64, d_magic)) != v32) + goto invalid_label; + table->d_align = le32toh(dlp->d_align); + if (table->d_align == 0 || (table->d_align & (pp->sectorsize - 1))) + goto invalid_label; + if (le64toh(dlp->d_total_size) > pp->mediasize) + goto invalid_label; + v64 = le64toh(dlp->d_pbase); + if (v64 % pp->sectorsize) + goto invalid_label; + basetable->gpt_first = v64 / pp->sectorsize; + v64 = le64toh(dlp->d_pstop); + if (v64 % pp->sectorsize) + goto invalid_label; + basetable->gpt_last = v64 / pp->sectorsize; + basetable->gpt_isleaf = 1; + v64 = le64toh(dlp->d_bbase); + if (v64 % pp->sectorsize) + goto invalid_label; + table->d_bbase = v64 / pp->sectorsize; + v64 = le64toh(dlp->d_abase); + if (v64 % pp->sectorsize) + goto invalid_label; + table->d_abase = v64 / pp->sectorsize; + le_uuid_dec(&dlp->d_stor_uuid, &table->d_stor_uuid); + for (index = basetable->gpt_entries - 1; index >= 0; index--) { + if (index == RAW_PART) { + /* Skip 'c' partition. */ + baseentry = g_part_new_entry(basetable, + index + 1, 0, 0); + baseentry->gpe_internal = 1; + continue; + } + v64 = le64toh(dlp->d_partitions[index].p_boffset); + sz = le64toh(dlp->d_partitions[index].p_bsize); + if (sz == 0 && v64 == 0) + continue; + if (sz == 0 || (v64 % pp->sectorsize) || (sz % pp->sectorsize)) + goto invalid_label; + baseentry = g_part_new_entry(basetable, index + 1, + v64 / pp->sectorsize, (v64 + sz) / pp->sectorsize - 1); + entry = (struct g_part_bsd64_entry *)baseentry; + le_uuid_dec(&dlp->d_partitions[index].p_type_uuid, + &entry->type_uuid); + le_uuid_dec(&dlp->d_partitions[index].p_stor_uuid, + &entry->stor_uuid); + entry->fstype = dlp->d_partitions[index].p_fstype; + if (index == RAW_PART) + baseentry->gpe_internal = 1; + } + bcopy(dlp->d_reserved0, table->d_reserved0, + sizeof(table->d_reserved0)); + bcopy(dlp->d_packname, table->d_packname, sizeof(table->d_packname)); + bcopy(dlp->d_reserved, table->d_reserved, sizeof(table->d_reserved)); + g_free(buf); + return (0); + +invalid_label: + g_free(buf); + return (EINVAL); +} + +static const char * +g_part_bsd64_type(struct g_part_table *basetable, struct g_part_entry *baseentry, + char *buf, size_t bufsz) +{ + struct g_part_bsd64_entry *entry; + struct bsd64_uuid_alias *uap; + + entry = (struct g_part_bsd64_entry *)baseentry; + if (entry->fstype != FS_OTHER) { + for (uap = &dfbsd_alias_match[0]; uap->uuid != NULL; uap++) + if (uap->fstype == entry->fstype) + return (g_part_alias_name(uap->alias)); + } else { + for (uap = &fbsd_alias_match[0]; uap->uuid != NULL; uap++) + if (EQUUID(uap->uuid, &entry->type_uuid)) + return (g_part_alias_name(uap->alias)); + for (uap = &dfbsd_alias_match[0]; uap->uuid != NULL; uap++) + if (EQUUID(uap->uuid, &entry->type_uuid)) + return (g_part_alias_name(uap->alias)); + } + if (EQUUID(&bsd64_uuid_unused, &entry->type_uuid)) + snprintf(buf, bufsz, "!%d", entry->fstype); + else { + buf[0] = '!'; + snprintf_uuid(buf + 1, bufsz - 1, &entry->type_uuid); + } + return (buf); +} + +static int +g_part_bsd64_write(struct g_part_table *basetable, struct g_consumer *cp) +{ + struct g_provider *pp; + struct g_part_entry *baseentry; + struct g_part_bsd64_entry *entry; + struct g_part_bsd64_table *table; + struct disklabel64 *dlp; + uint32_t v, sz; + int error, index; + + pp = cp->provider; + table = (struct g_part_bsd64_table *)basetable; + sz = (pp->sectorsize + + sizeof(struct disklabel64) - 1) & ~(pp->sectorsize - 1); + dlp = g_malloc(sz, M_WAITOK | M_ZERO); + + memcpy(dlp->d_reserved0, table->d_reserved0, + sizeof(table->d_reserved0)); + memcpy(dlp->d_packname, table->d_packname, sizeof(table->d_packname)); + memcpy(dlp->d_reserved, table->d_reserved, sizeof(table->d_reserved)); + le32enc(&dlp->d_magic, DISKMAGIC64); + le32enc(&dlp->d_align, table->d_align); + le32enc(&dlp->d_npartitions, basetable->gpt_entries); + le_uuid_enc(&dlp->d_stor_uuid, &table->d_stor_uuid); + le64enc(&dlp->d_total_size, pp->mediasize); + le64enc(&dlp->d_bbase, table->d_bbase * pp->sectorsize); + le64enc(&dlp->d_pbase, basetable->gpt_first * pp->sectorsize); + le64enc(&dlp->d_pstop, basetable->gpt_last * pp->sectorsize); + le64enc(&dlp->d_abase, table->d_abase * pp->sectorsize); + + LIST_FOREACH(baseentry, &basetable->gpt_entry, gpe_entry) { + if (baseentry->gpe_deleted) + continue; + index = baseentry->gpe_index - 1; + entry = (struct g_part_bsd64_entry *)baseentry; + if (index == RAW_PART) + continue; + le64enc(&dlp->d_partitions[index].p_boffset, + baseentry->gpe_start * pp->sectorsize); + le64enc(&dlp->d_partitions[index].p_bsize, pp->sectorsize * + (baseentry->gpe_end - baseentry->gpe_start + 1)); + dlp->d_partitions[index].p_fstype = entry->fstype; + le_uuid_enc(&dlp->d_partitions[index].p_type_uuid, + &entry->type_uuid); + le_uuid_enc(&dlp->d_partitions[index].p_stor_uuid, + &entry->stor_uuid); + } + /* Calculate checksum. */ + v = offsetof(struct disklabel64, + d_partitions[basetable->gpt_entries]) - + offsetof(struct disklabel64, d_magic); + le32enc(&dlp->d_crc, crc32(&dlp->d_magic, v)); + error = g_write_data(cp, 0, dlp, sz); + g_free(dlp); + return (error); +} + Modified: stable/10/sys/geom/part/g_part_gpt.c ============================================================================== --- stable/10/sys/geom/part/g_part_gpt.c Tue Jul 1 12:44:47 2014 (r268090) +++ stable/10/sys/geom/part/g_part_gpt.c Tue Jul 1 13:29:17 2014 (r268091) @@ -181,6 +181,15 @@ static struct uuid gpt_uuid_netbsd_raid static struct uuid gpt_uuid_netbsd_swap = GPT_ENT_TYPE_NETBSD_SWAP; static struct uuid gpt_uuid_mbr = GPT_ENT_TYPE_MBR; static struct uuid gpt_uuid_unused = GPT_ENT_TYPE_UNUSED; +static struct uuid gpt_uuid_dfbsd_swap = GPT_ENT_TYPE_DRAGONFLY_SWAP; +static struct uuid gpt_uuid_dfbsd_ufs1 = GPT_ENT_TYPE_DRAGONFLY_UFS1; +static struct uuid gpt_uuid_dfbsd_vinum = GPT_ENT_TYPE_DRAGONFLY_VINUM; +static struct uuid gpt_uuid_dfbsd_ccd = GPT_ENT_TYPE_DRAGONFLY_CCD; +static struct uuid gpt_uuid_dfbsd_legacy = GPT_ENT_TYPE_DRAGONFLY_LEGACY; +static struct uuid gpt_uuid_dfbsd_hammer = GPT_ENT_TYPE_DRAGONFLY_HAMMER; +static struct uuid gpt_uuid_dfbsd_hammer2 = GPT_ENT_TYPE_DRAGONFLY_HAMMER2; +static struct uuid gpt_uuid_dfbsd_label32 = GPT_ENT_TYPE_DRAGONFLY_LABEL32; +static struct uuid gpt_uuid_dfbsd_label64 = GPT_ENT_TYPE_DRAGONFLY_LABEL64; static struct g_part_uuid_alias { struct uuid *uuid; @@ -222,6 +231,15 @@ static struct g_part_uuid_alias { { &gpt_uuid_netbsd_lfs, G_PART_ALIAS_NETBSD_LFS, 0 }, { &gpt_uuid_netbsd_raid, G_PART_ALIAS_NETBSD_RAID, 0 }, { &gpt_uuid_netbsd_swap, G_PART_ALIAS_NETBSD_SWAP, 0 }, + { &gpt_uuid_dfbsd_swap, G_PART_ALIAS_DFBSD_SWAP, 0 }, + { &gpt_uuid_dfbsd_ufs1, G_PART_ALIAS_DFBSD_UFS, 0 }, + { &gpt_uuid_dfbsd_vinum, G_PART_ALIAS_DFBSD_VINUM, 0 }, + { &gpt_uuid_dfbsd_ccd, G_PART_ALIAS_DFBSD_CCD, 0 }, + { &gpt_uuid_dfbsd_legacy, G_PART_ALIAS_DFBSD_LEGACY, 0 }, + { &gpt_uuid_dfbsd_hammer, G_PART_ALIAS_DFBSD_HAMMER, 0 }, + { &gpt_uuid_dfbsd_hammer2, G_PART_ALIAS_DFBSD_HAMMER2, 0 }, + { &gpt_uuid_dfbsd_label32, G_PART_ALIAS_DFBSD, 0xa5 }, + { &gpt_uuid_dfbsd_label64, G_PART_ALIAS_DFBSD64, 0xa5 }, { NULL, 0, 0 } }; @@ -706,7 +724,8 @@ g_part_gpt_dumpto(struct g_part_table *t entry = (struct g_part_gpt_entry *)baseentry; return ((EQUUID(&entry->ent.ent_type, &gpt_uuid_freebsd_swap) || - EQUUID(&entry->ent.ent_type, &gpt_uuid_linux_swap)) ? 1 : 0); + EQUUID(&entry->ent.ent_type, &gpt_uuid_linux_swap) || + EQUUID(&entry->ent.ent_type, &gpt_uuid_dfbsd_swap)) ? 1 : 0); } static int Modified: stable/10/sys/modules/geom/geom_part/Makefile ============================================================================== --- stable/10/sys/modules/geom/geom_part/Makefile Tue Jul 1 12:44:47 2014 (r268090) +++ stable/10/sys/modules/geom/geom_part/Makefile Tue Jul 1 13:29:17 2014 (r268091) @@ -2,6 +2,7 @@ SUBDIR= geom_part_apm \ geom_part_bsd \ + geom_part_bsd64 \ geom_part_ebr \ geom_part_gpt \ geom_part_ldm \ Modified: stable/10/sys/sys/disklabel.h ============================================================================== --- stable/10/sys/sys/disklabel.h Tue Jul 1 12:44:47 2014 (r268090) +++ stable/10/sys/sys/disklabel.h Tue Jul 1 13:29:17 2014 (r268091) @@ -229,6 +229,8 @@ static const char *dktypenames[] = { #define FS_NTFS 18 /* Windows/NT file system */ #define FS_CCD 20 /* concatenated disk component */ #define FS_JFS2 21 /* IBM JFS2 */ +#define FS_HAMMER 22 /* DragonFlyBSD Hammer FS */ +#define FS_HAMMER2 23 /* DragonFlyBSD Hammer2 FS */ #define FS_UDF 24 /* UDF */ #define FS_EFS 26 /* SGI's Extent File system */ #define FS_ZFS 27 /* Sun's ZFS */ @@ -258,8 +260,8 @@ static const char *fstypenames[] = { "?", "ccd", "jfs", - "?", - "?", + "HAMMER", + "HAMMER2", "UDF", "?", "EFS", Modified: stable/10/sys/sys/gpt.h ============================================================================== --- stable/10/sys/sys/gpt.h Tue Jul 1 12:44:47 2014 (r268090) +++ stable/10/sys/sys/gpt.h Tue Jul 1 13:29:17 2014 (r268091) @@ -161,6 +161,25 @@ struct gpt_ent { #define GPT_ENT_TYPE_NETBSD_CGD \ {0x2db519ec,0xb10f,0x11dc,0xb9,0x9b,{0x00,0x19,0xd1,0x87,0x96,0x48}} +#define GPT_ENT_TYPE_DRAGONFLY_LABEL32 \ + {0x9d087404,0x1ca5,0x11dc,0x88,0x17,{0x01,0x30,0x1b,0xb8,0xa9,0xf5}} +#define GPT_ENT_TYPE_DRAGONFLY_SWAP \ + {0x9d58fdbd,0x1ca5,0x11dc,0x88,0x17,{0x01,0x30,0x1b,0xb8,0xa9,0xf5}} +#define GPT_ENT_TYPE_DRAGONFLY_UFS1 \ + {0x9d94ce7c,0x1ca5,0x11dc,0x88,0x17,{0x01,0x30,0x1b,0xb8,0xa9,0xf5}} +#define GPT_ENT_TYPE_DRAGONFLY_VINUM \ + {0x9dd4478f,0x1ca5,0x11dc,0x88,0x17,{0x01,0x30,0x1b,0xb8,0xa9,0xf5}} +#define GPT_ENT_TYPE_DRAGONFLY_CCD \ + {0xdbd5211b,0x1ca5,0x11dc,0x88,0x17,{0x01,0x30,0x1b,0xb8,0xa9,0xf5}} +#define GPT_ENT_TYPE_DRAGONFLY_LABEL64 \ + {0x3d48ce54,0x1d16,0x11dc,0x86,0x96,{0x01,0x30,0x1b,0xb8,0xa9,0xf5}} +#define GPT_ENT_TYPE_DRAGONFLY_LEGACY \ + {0xbd215ab2,0x1d16,0x11dc,0x86,0x96,{0x01,0x30,0x1b,0xb8,0xa9,0xf5}} +#define GPT_ENT_TYPE_DRAGONFLY_HAMMER \ + {0x61dc63ac,0x6e38,0x11dc,0x85,0x13,{0x01,0x30,0x1b,0xb8,0xa9,0xf5}} +#define GPT_ENT_TYPE_DRAGONFLY_HAMMER2 \ + {0x5cbb9ad1,0x862d,0x11dc,0xa9,0x4d,{0x01,0x30,0x1b,0xb8,0xa9,0xf5}} + /* * Boot partition used by GRUB 2. */ From owner-svn-src-stable@FreeBSD.ORG Tue Jul 1 15:50:34 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC3713C1; Tue, 1 Jul 2014 15:50:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A93C52F90; Tue, 1 Jul 2014 15:50:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s61FoYaW048034; Tue, 1 Jul 2014 15:50:34 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s61FoYpj048033; Tue, 1 Jul 2014 15:50:34 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201407011550.s61FoYpj048033@svn.freebsd.org> From: Xin LI Date: Tue, 1 Jul 2014 15:50:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268098 - stable/10/usr.sbin/service X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jul 2014 15:50:34 -0000 Author: delphij Date: Tue Jul 1 15:50:34 2014 New Revision: 268098 URL: http://svnweb.freebsd.org/changeset/base/268098 Log: MFC r267493: Fix two issues: - Check for rc.d directory's existence before traversing it; - Don't output * when rc.d directory is empty. PR: bin/190665 Submitted by: Oleg Ginzburg (with changes) Modified: stable/10/usr.sbin/service/service.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/service/service.sh ============================================================================== --- stable/10/usr.sbin/service/service.sh Tue Jul 1 15:36:05 2014 (r268097) +++ stable/10/usr.sbin/service/service.sh Tue Jul 1 15:50:34 2014 (r268098) @@ -109,7 +109,7 @@ fi if [ -n "$LIST" ]; then for dir in /etc/rc.d $local_startup; do [ -n "$VERBOSE" ] && echo "From ${dir}:" - cd $dir && for file in *; do echo $file; done + [ -d ${dir} ] && /bin/ls -1 ${dir} done exit 0 fi From owner-svn-src-stable@FreeBSD.ORG Tue Jul 1 15:51:20 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1F5F7611; Tue, 1 Jul 2014 15:51:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D9B22057; Tue, 1 Jul 2014 15:51:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s61FpJqW048950; Tue, 1 Jul 2014 15:51:19 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s61FpJtN048949; Tue, 1 Jul 2014 15:51:19 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201407011551.s61FpJtN048949@svn.freebsd.org> From: Xin LI Date: Tue, 1 Jul 2014 15:51:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268099 - stable/9/usr.sbin/service X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jul 2014 15:51:20 -0000 Author: delphij Date: Tue Jul 1 15:51:19 2014 New Revision: 268099 URL: http://svnweb.freebsd.org/changeset/base/268099 Log: MFC r267493: Fix two issues: - Check for rc.d directory's existence before traversing it; - Don't output * when rc.d directory is empty. PR: bin/190665 Submitted by: Oleg Ginzburg (with changes) Modified: stable/9/usr.sbin/service/service.sh Directory Properties: stable/9/usr.sbin/service/ (props changed) Modified: stable/9/usr.sbin/service/service.sh ============================================================================== --- stable/9/usr.sbin/service/service.sh Tue Jul 1 15:50:34 2014 (r268098) +++ stable/9/usr.sbin/service/service.sh Tue Jul 1 15:51:19 2014 (r268099) @@ -109,7 +109,7 @@ fi if [ -n "$LIST" ]; then for dir in /etc/rc.d $local_startup; do [ -n "$VERBOSE" ] && echo "From ${dir}:" - cd $dir && for file in *; do echo $file; done + [ -d ${dir} ] && /bin/ls -1 ${dir} done exit 0 fi From owner-svn-src-stable@FreeBSD.ORG Tue Jul 1 15:55:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1763F85C; Tue, 1 Jul 2014 15:55:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEEAF20C8; Tue, 1 Jul 2014 15:55:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s61Ftfvb050239; Tue, 1 Jul 2014 15:55:41 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s61Ftf3q050238; Tue, 1 Jul 2014 15:55:41 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201407011555.s61Ftf3q050238@svn.freebsd.org> From: Xin LI Date: Tue, 1 Jul 2014 15:55:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268100 - stable/10/sys/contrib/x86emu X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jul 2014 15:55:42 -0000 Author: delphij Date: Tue Jul 1 15:55:41 2014 New Revision: 268100 URL: http://svnweb.freebsd.org/changeset/base/268100 Log: MFC r267372-267374: fix various misimplementation of instructions. Submitted by: Wolf Ramovsky Modified: stable/10/sys/contrib/x86emu/x86emu.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/contrib/x86emu/x86emu.c ============================================================================== --- stable/10/sys/contrib/x86emu/x86emu.c Tue Jul 1 15:51:19 2014 (r268099) +++ stable/10/sys/contrib/x86emu/x86emu.c Tue Jul 1 15:55:41 2014 (r268100) @@ -2151,21 +2151,24 @@ x86emuOp_mov_word_RM_SR(struct x86emu *e static void x86emuOp_lea_word_R_M(struct x86emu *emu) { - uint16_t *srcreg; uint32_t destoffset; -/* - * TODO: Need to handle address size prefix! - * - * lea eax,[eax+ebx*2] ?? - */ fetch_decode_modrm(emu); if (emu->cur_mod == 3) x86emu_halt_sys(emu); - srcreg = decode_rh_word_register(emu); destoffset = decode_rl_address(emu); - *srcreg = (uint16_t) destoffset; + if (emu->x86.mode & SYSMODE_PREFIX_ADDR) { + uint32_t *srcreg; + + srcreg = decode_rh_long_register(emu); + *srcreg = (uint32_t) destoffset; + } else { + uint16_t *srcreg; + + srcreg = decode_rh_word_register(emu); + *srcreg = (uint16_t) destoffset; + } } /* @@ -3750,12 +3753,19 @@ x86emuOp_out_word_IMM_AX(struct x86emu * static void x86emuOp_call_near_IMM(struct x86emu *emu) { - int16_t ip; - - ip = (int16_t) fetch_word_imm(emu); - ip += (int16_t) emu->x86.R_IP; /* CHECK SIGN */ - push_word(emu, emu->x86.R_IP); - emu->x86.R_IP = ip; + if (emu->x86.mode & SYSMODE_PREFIX_DATA) { + int32_t ip; + ip = (int32_t) fetch_long_imm(emu); + ip += (int32_t) emu->x86.R_EIP; + push_long(emu, emu->x86.R_EIP); + emu->x86.R_EIP = ip; + } else { + int16_t ip; + ip = (int16_t) fetch_word_imm(emu); + ip += (int16_t) emu->x86.R_IP; /* CHECK SIGN */ + push_word(emu, emu->x86.R_IP); + emu->x86.R_IP = ip; + } } /* @@ -5610,6 +5620,7 @@ x86emuOp2_32_movsx_byte_R_RM(struct x86e { uint32_t *destreg; + fetch_decode_modrm(emu); destreg = decode_rh_long_register(emu); *destreg = (int32_t)(int8_t)decode_and_fetch_byte(emu); } From owner-svn-src-stable@FreeBSD.ORG Tue Jul 1 16:00:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26C6BC3B; Tue, 1 Jul 2014 16:00:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE3392185; Tue, 1 Jul 2014 16:00:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s61G0maT052999; Tue, 1 Jul 2014 16:00:48 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s61G0mqe052998; Tue, 1 Jul 2014 16:00:48 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201407011600.s61G0mqe052998@svn.freebsd.org> From: Xin LI Date: Tue, 1 Jul 2014 16:00:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268101 - stable/9/sys/contrib/x86emu X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jul 2014 16:00:49 -0000 Author: delphij Date: Tue Jul 1 16:00:48 2014 New Revision: 268101 URL: http://svnweb.freebsd.org/changeset/base/268101 Log: MFC r267372-267374: fix various misimplementation of instructions. Submitted by: Wolf Ramovsky Modified: stable/9/sys/contrib/x86emu/x86emu.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/contrib/x86emu/x86emu.c ============================================================================== --- stable/9/sys/contrib/x86emu/x86emu.c Tue Jul 1 15:55:41 2014 (r268100) +++ stable/9/sys/contrib/x86emu/x86emu.c Tue Jul 1 16:00:48 2014 (r268101) @@ -2151,21 +2151,24 @@ x86emuOp_mov_word_RM_SR(struct x86emu *e static void x86emuOp_lea_word_R_M(struct x86emu *emu) { - uint16_t *srcreg; uint32_t destoffset; -/* - * TODO: Need to handle address size prefix! - * - * lea eax,[eax+ebx*2] ?? - */ fetch_decode_modrm(emu); if (emu->cur_mod == 3) x86emu_halt_sys(emu); - srcreg = decode_rh_word_register(emu); destoffset = decode_rl_address(emu); - *srcreg = (uint16_t) destoffset; + if (emu->x86.mode & SYSMODE_PREFIX_ADDR) { + uint32_t *srcreg; + + srcreg = decode_rh_long_register(emu); + *srcreg = (uint32_t) destoffset; + } else { + uint16_t *srcreg; + + srcreg = decode_rh_word_register(emu); + *srcreg = (uint16_t) destoffset; + } } /* @@ -3750,12 +3753,19 @@ x86emuOp_out_word_IMM_AX(struct x86emu * static void x86emuOp_call_near_IMM(struct x86emu *emu) { - int16_t ip; - - ip = (int16_t) fetch_word_imm(emu); - ip += (int16_t) emu->x86.R_IP; /* CHECK SIGN */ - push_word(emu, emu->x86.R_IP); - emu->x86.R_IP = ip; + if (emu->x86.mode & SYSMODE_PREFIX_DATA) { + int32_t ip; + ip = (int32_t) fetch_long_imm(emu); + ip += (int32_t) emu->x86.R_EIP; + push_long(emu, emu->x86.R_EIP); + emu->x86.R_EIP = ip; + } else { + int16_t ip; + ip = (int16_t) fetch_word_imm(emu); + ip += (int16_t) emu->x86.R_IP; /* CHECK SIGN */ + push_word(emu, emu->x86.R_IP); + emu->x86.R_IP = ip; + } } /* @@ -5610,6 +5620,7 @@ x86emuOp2_32_movsx_byte_R_RM(struct x86e { uint32_t *destreg; + fetch_decode_modrm(emu); destreg = decode_rh_long_register(emu); *destreg = (int32_t)(int8_t)decode_and_fetch_byte(emu); } From owner-svn-src-stable@FreeBSD.ORG Tue Jul 1 16:01:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F24E9E63; Tue, 1 Jul 2014 16:01:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C61402198; Tue, 1 Jul 2014 16:01:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s61G1msU053720; Tue, 1 Jul 2014 16:01:48 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s61G1mEv053719; Tue, 1 Jul 2014 16:01:48 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201407011601.s61G1mEv053719@svn.freebsd.org> From: Xin LI Date: Tue, 1 Jul 2014 16:01:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r268102 - stable/8/sys/contrib/x86emu X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jul 2014 16:01:49 -0000 Author: delphij Date: Tue Jul 1 16:01:48 2014 New Revision: 268102 URL: http://svnweb.freebsd.org/changeset/base/268102 Log: MFC r267372-267374: fix various misimplementation of instructions. Submitted by: Wolf Ramovsky Modified: stable/8/sys/contrib/x86emu/x86emu.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/contrib/ (props changed) Modified: stable/8/sys/contrib/x86emu/x86emu.c ============================================================================== --- stable/8/sys/contrib/x86emu/x86emu.c Tue Jul 1 16:00:48 2014 (r268101) +++ stable/8/sys/contrib/x86emu/x86emu.c Tue Jul 1 16:01:48 2014 (r268102) @@ -2131,21 +2131,24 @@ x86emuOp_mov_word_RM_SR(struct x86emu *e static void x86emuOp_lea_word_R_M(struct x86emu *emu) { - uint16_t *srcreg; uint32_t destoffset; -/* - * TODO: Need to handle address size prefix! - * - * lea eax,[eax+ebx*2] ?? - */ fetch_decode_modrm(emu); if (emu->cur_mod == 3) x86emu_halt_sys(emu); - srcreg = decode_rh_word_register(emu); destoffset = decode_rl_address(emu); - *srcreg = (uint16_t) destoffset; + if (emu->x86.mode & SYSMODE_PREFIX_ADDR) { + uint32_t *srcreg; + + srcreg = decode_rh_long_register(emu); + *srcreg = (uint32_t) destoffset; + } else { + uint16_t *srcreg; + + srcreg = decode_rh_word_register(emu); + *srcreg = (uint16_t) destoffset; + } } /* @@ -3709,12 +3712,19 @@ x86emuOp_out_word_IMM_AX(struct x86emu * static void x86emuOp_call_near_IMM(struct x86emu *emu) { - int16_t ip; - - ip = (int16_t) fetch_word_imm(emu); - ip += (int16_t) emu->x86.R_IP; /* CHECK SIGN */ - push_word(emu, emu->x86.R_IP); - emu->x86.R_IP = ip; + if (emu->x86.mode & SYSMODE_PREFIX_DATA) { + int32_t ip; + ip = (int32_t) fetch_long_imm(emu); + ip += (int32_t) emu->x86.R_EIP; + push_long(emu, emu->x86.R_EIP); + emu->x86.R_EIP = ip; + } else { + int16_t ip; + ip = (int16_t) fetch_word_imm(emu); + ip += (int16_t) emu->x86.R_IP; /* CHECK SIGN */ + push_word(emu, emu->x86.R_IP); + emu->x86.R_IP = ip; + } } /* @@ -5566,6 +5576,7 @@ x86emuOp2_32_movsx_byte_R_RM(struct x86e { uint32_t *destreg; + fetch_decode_modrm(emu); destreg = decode_rh_long_register(emu); *destreg = (int32_t)(int8_t)decode_and_fetch_byte(emu); } From owner-svn-src-stable@FreeBSD.ORG Tue Jul 1 18:23:01 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A8BDC12E; Tue, 1 Jul 2014 18:23:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 954682F36; Tue, 1 Jul 2014 18:23:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s61IN15J021637; Tue, 1 Jul 2014 18:23:01 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s61IN13H021629; Tue, 1 Jul 2014 18:23:01 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201407011823.s61IN13H021629@svn.freebsd.org> From: John Baldwin Date: Tue, 1 Jul 2014 18:23:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268108 - in stable: 10/usr.bin/procstat 9/usr.bin/procstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jul 2014 18:23:01 -0000 Author: jhb Date: Tue Jul 1 18:23:00 2014 New Revision: 268108 URL: http://svnweb.freebsd.org/changeset/base/268108 Log: MFC 266322,266323: - Use 'RESOURCE' instead of the more generic 'TYPE' for the resource name column header when displaying resource usage. This more closely matches other procstat displays. - Add descriptions of the display formats for -e, -l, -r, and -x. Fix a few typos in indent settings while here. Modified: stable/10/usr.bin/procstat/procstat.1 stable/10/usr.bin/procstat/procstat_rusage.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/usr.bin/procstat/procstat.1 stable/9/usr.bin/procstat/procstat_rusage.c Directory Properties: stable/9/usr.bin/procstat/ (props changed) Modified: stable/10/usr.bin/procstat/procstat.1 ============================================================================== --- stable/10/usr.bin/procstat/procstat.1 Tue Jul 1 18:05:38 2014 (r268107) +++ stable/10/usr.bin/procstat/procstat.1 Tue Jul 1 18:23:00 2014 (r268108) @@ -135,6 +135,17 @@ command .It ARGS command line arguments (if available) .El +.Ss Environment Variables +Display the process ID, command, and environment variables: +.Pp +.Bl -tag -width "ENVIRONMENT" -compact +.It PID +process ID +.It COMM +command +.It ENVIRONMENT +environment variables (if available) +.El .Ss File Descriptors Display detailed information about each file descriptor referenced by a process, including the process ID, command, file descriptor number, and @@ -244,7 +255,7 @@ present for each capability descriptor. .Ss Signal Disposition Information Display signal pending and disposition for a process: .Pp -.Bl -tag -width ident -compact +.Bl -tag -width indent -compact .It PID process ID .It COMM @@ -269,7 +280,7 @@ switch is given, the signal numbers are .Ss Thread Signal Information Display signal pending and blocked for a process's threads: .Pp -.Bl -tag -width ident -compact +.Bl -tag -width indent -compact .It PID process ID .It TID @@ -318,6 +329,45 @@ thread name .It KSTACK kernel thread call stack .El +.Ss Resource Limits +Display resource limits for a process: +.Pp +.Bl -tag -width indent -compact +.It PID +process ID +.It COMM +command +.It RLIMIT +resource limit name +.It SOFT +soft limit +.It HARD +hard limit +.El +.Ss Resource Usage +Display resource usage for a process. +If the +.Fl H +flag is specified, +resource usage for individual threads is displayed instead. +.Pp +.Bl -tag -width "RESOURCE" -compact +.It PID +process ID +.It TID +thread ID +.Po +if +.Fl H +is specified +.Pc +.It COMM +command +.It RESOURCE +resource name +.It VALUE +current usage +.El .Ss Security Credentials Display process credential information: .Pp @@ -450,6 +500,19 @@ grows down (top-down stack) .It U grows up (bottom-up stack) .El +.Ss ELF Auxiliary Vector +Display ELF auxiliary vector values: +.Pp +.Bl -tag -width indent -compact +.It PID +process ID +.It COMM +command +.It AUXV +auxiliary vector name +.It VALUE +auxiliary vector value +.El .Sh EXIT STATUS .Ex -std .Sh SEE ALSO Modified: stable/10/usr.bin/procstat/procstat_rusage.c ============================================================================== --- stable/10/usr.bin/procstat/procstat_rusage.c Tue Jul 1 18:05:38 2014 (r268107) +++ stable/10/usr.bin/procstat/procstat_rusage.c Tue Jul 1 18:23:00 2014 (r268108) @@ -141,7 +141,8 @@ procstat_rusage(struct procstat *procsta printf("%5s ", "PID"); if (Hflag) printf("%6s ", "TID"); - printf("%-16s %-32s %14s\n", "COMM", "TYPE", "VALUE "); + printf("%-16s %-32s %14s\n", "COMM", "RESOURCE", + "VALUE "); } if (!Hflag) { From owner-svn-src-stable@FreeBSD.ORG Tue Jul 1 18:23:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2A7812F; Tue, 1 Jul 2014 18:23:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF5352F37; Tue, 1 Jul 2014 18:23:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s61IN1CQ021658; Tue, 1 Jul 2014 18:23:01 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s61IN1Ea021656; Tue, 1 Jul 2014 18:23:01 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201407011823.s61IN1Ea021656@svn.freebsd.org> From: John Baldwin Date: Tue, 1 Jul 2014 18:23:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268108 - in stable: 10/usr.bin/procstat 9/usr.bin/procstat X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jul 2014 18:23:02 -0000 Author: jhb Date: Tue Jul 1 18:23:00 2014 New Revision: 268108 URL: http://svnweb.freebsd.org/changeset/base/268108 Log: MFC 266322,266323: - Use 'RESOURCE' instead of the more generic 'TYPE' for the resource name column header when displaying resource usage. This more closely matches other procstat displays. - Add descriptions of the display formats for -e, -l, -r, and -x. Fix a few typos in indent settings while here. Modified: stable/9/usr.bin/procstat/procstat.1 stable/9/usr.bin/procstat/procstat_rusage.c Directory Properties: stable/9/usr.bin/procstat/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.bin/procstat/procstat.1 stable/10/usr.bin/procstat/procstat_rusage.c Directory Properties: stable/10/ (props changed) Modified: stable/9/usr.bin/procstat/procstat.1 ============================================================================== --- stable/9/usr.bin/procstat/procstat.1 Tue Jul 1 18:05:38 2014 (r268107) +++ stable/9/usr.bin/procstat/procstat.1 Tue Jul 1 18:23:00 2014 (r268108) @@ -135,6 +135,17 @@ command .It ARGS command line arguments (if available) .El +.Ss Environment Variables +Display the process ID, command, and environment variables: +.Pp +.Bl -tag -width "ENVIRONMENT" -compact +.It PID +process ID +.It COMM +command +.It ENVIRONMENT +environment variables (if available) +.El .Ss File Descriptors Display detailed information about each file descriptor referenced by a process, including the process ID, command, file descriptor number, and @@ -246,7 +257,7 @@ present for each capability descriptor. .Ss Signal Disposition Information Display signal pending and disposition for a process: .Pp -.Bl -tag -width ident -compact +.Bl -tag -width indent -compact .It PID process ID .It COMM @@ -271,7 +282,7 @@ switch is given, the signal numbers are .Ss Thread Signal Information Display signal pending and blocked for a process's threads: .Pp -.Bl -tag -width ident -compact +.Bl -tag -width indent -compact .It PID process ID .It TID @@ -320,6 +331,45 @@ thread name .It KSTACK kernel thread call stack .El +.Ss Resource Limits +Display resource limits for a process: +.Pp +.Bl -tag -width indent -compact +.It PID +process ID +.It COMM +command +.It RLIMIT +resource limit name +.It SOFT +soft limit +.It HARD +hard limit +.El +.Ss Resource Usage +Display resource usage for a process. +If the +.Fl H +flag is specified, +resource usage for individual threads is displayed instead. +.Pp +.Bl -tag -width "RESOURCE" -compact +.It PID +process ID +.It TID +thread ID +.Po +if +.Fl H +is specified +.Pc +.It COMM +command +.It RESOURCE +resource name +.It VALUE +current usage +.El .Ss Security Credentials Display process credential information: .Pp @@ -452,6 +502,19 @@ grows down (top-down stack) .It U grows up (bottom-up stack) .El +.Ss ELF Auxiliary Vector +Display ELF auxiliary vector values: +.Pp +.Bl -tag -width indent -compact +.It PID +process ID +.It COMM +command +.It AUXV +auxiliary vector name +.It VALUE +auxiliary vector value +.El .Sh EXIT STATUS .Ex -std .Sh SEE ALSO Modified: stable/9/usr.bin/procstat/procstat_rusage.c ============================================================================== --- stable/9/usr.bin/procstat/procstat_rusage.c Tue Jul 1 18:05:38 2014 (r268107) +++ stable/9/usr.bin/procstat/procstat_rusage.c Tue Jul 1 18:23:00 2014 (r268108) @@ -141,7 +141,8 @@ procstat_rusage(struct procstat *procsta printf("%5s ", "PID"); if (Hflag) printf("%6s ", "TID"); - printf("%-16s %-32s %14s\n", "COMM", "TYPE", "VALUE "); + printf("%-16s %-32s %14s\n", "COMM", "RESOURCE", + "VALUE "); } if (!Hflag) { From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 01:28:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A6944A5; Wed, 2 Jul 2014 01:28:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CDF2251A; Wed, 2 Jul 2014 01:28:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s621SdIx025686; Wed, 2 Jul 2014 01:28:39 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s621SdT1025685; Wed, 2 Jul 2014 01:28:39 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201407020128.s621SdT1025685@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Wed, 2 Jul 2014 01:28:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268132 - stable/10/sys/cddl/contrib/opensolaris/common/unicode X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 01:28:39 -0000 Author: pfg Date: Wed Jul 2 01:28:38 2014 New Revision: 268132 URL: http://svnweb.freebsd.org/changeset/base/268132 Log: MVC r268014: Reduce some warnings in the Solaris unicode support. Clean some warnings from parenthesis and minor style issues. Modified: stable/10/sys/cddl/contrib/opensolaris/common/unicode/u8_textprep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/common/unicode/u8_textprep.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/common/unicode/u8_textprep.c Tue Jul 1 23:41:54 2014 (r268131) +++ stable/10/sys/cddl/contrib/opensolaris/common/unicode/u8_textprep.c Wed Jul 2 01:28:38 2014 (r268132) @@ -23,7 +23,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" /* @@ -143,10 +142,10 @@ #define U8_16BIT_TABLE_INDICATOR (0x8000U) /* The following are some convenience macros. */ -#define U8_PUT_3BYTES_INTO_UTF32(u, b1, b2, b3) \ - (u) = ((uint32_t)(b1) & 0x0F) << 12 | ((uint32_t)(b2) & 0x3F) << 6 | \ - (uint32_t)(b3) & 0x3F; - +#define U8_PUT_3BYTES_INTO_UTF32(u, b1, b2, b3) \ + (u) = ((((uint32_t)(b1) & 0x0F) << 12) | \ + (((uint32_t)(b2) & 0x3F) << 6) | \ + ((uint32_t)(b3) & 0x3F)); #define U8_SIMPLE_SWAP(a, b, t) \ (t) = (a); \ (a) = (b); \ @@ -216,10 +215,10 @@ const int8_t u8_number_of_bytes[0x100] = /* 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F */ I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, -/* 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F */ +/* 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F */ I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, -/* A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF */ +/* A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF */ I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, /* B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF */ From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 01:32:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 223586F8; Wed, 2 Jul 2014 01:32:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E93B825AE; Wed, 2 Jul 2014 01:32:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s621WeK7029593; Wed, 2 Jul 2014 01:32:40 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s621Weux029592; Wed, 2 Jul 2014 01:32:40 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201407020132.s621Weux029592@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Wed, 2 Jul 2014 01:32:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268133 - stable/9/sys/cddl/contrib/opensolaris/common/unicode X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 01:32:41 -0000 Author: pfg Date: Wed Jul 2 01:32:40 2014 New Revision: 268133 URL: http://svnweb.freebsd.org/changeset/base/268133 Log: MVC r268014: Reduce some warnings in the Solaris unicode support. Clean some warnings from parenthesis and minor style issues. Modified: stable/9/sys/cddl/contrib/opensolaris/common/unicode/u8_textprep.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/common/unicode/u8_textprep.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/common/unicode/u8_textprep.c Wed Jul 2 01:28:38 2014 (r268132) +++ stable/9/sys/cddl/contrib/opensolaris/common/unicode/u8_textprep.c Wed Jul 2 01:32:40 2014 (r268133) @@ -23,7 +23,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" /* @@ -143,10 +142,10 @@ #define U8_16BIT_TABLE_INDICATOR (0x8000U) /* The following are some convenience macros. */ -#define U8_PUT_3BYTES_INTO_UTF32(u, b1, b2, b3) \ - (u) = ((uint32_t)(b1) & 0x0F) << 12 | ((uint32_t)(b2) & 0x3F) << 6 | \ - (uint32_t)(b3) & 0x3F; - +#define U8_PUT_3BYTES_INTO_UTF32(u, b1, b2, b3) \ + (u) = ((((uint32_t)(b1) & 0x0F) << 12) | \ + (((uint32_t)(b2) & 0x3F) << 6) | \ + ((uint32_t)(b3) & 0x3F)); #define U8_SIMPLE_SWAP(a, b, t) \ (t) = (a); \ (a) = (b); \ @@ -216,10 +215,10 @@ const int8_t u8_number_of_bytes[0x100] = /* 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F */ I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, -/* 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F */ +/* 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F */ I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, -/* A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF */ +/* A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF */ I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, /* B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF */ From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 10:16:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E2A62C3; Wed, 2 Jul 2014 10:16:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED414237E; Wed, 2 Jul 2014 10:16:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62AGDvw074206; Wed, 2 Jul 2014 10:16:13 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62AGDFp074201; Wed, 2 Jul 2014 10:16:13 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407021016.s62AGDFp074201@svn.freebsd.org> From: Alexander Motin Date: Wed, 2 Jul 2014 10:16:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268139 - in stable/10/sys: cam/scsi compat/freebsd32 compat/linux X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 10:16:14 -0000 Author: mav Date: Wed Jul 2 10:16:12 2014 New Revision: 268139 URL: http://svnweb.freebsd.org/changeset/base/268139 Log: MFC r266981: Overhaul CAM SG driver IOCTL interfaces. Make it really work for native FreeBSD programs. Before this it was broken for years due to different number of pointer dereferences in Linux and FreeBSD IOCTL paths, permanently returning errors to FreeBSD programs. This change breaks the driver FreeBSD IOCTL ABI, making it more strict, but since it was not working any way -- who bother. Add shims for 32-bit programs on 64-bit host, translating the argument of the SG_IO IOCTL for both FreeBSD and Linux ABIs. With this change I was able to run 32-bit Linux sg3_utils tools and simple 32 and 64-bit FreeBSD test tools on both 32 and 64-bit FreeBSD systems. Modified: stable/10/sys/cam/scsi/scsi_sg.c stable/10/sys/cam/scsi/scsi_sg.h stable/10/sys/compat/freebsd32/freebsd32_ioctl.c stable/10/sys/compat/freebsd32/freebsd32_ioctl.h stable/10/sys/compat/linux/linux_ioctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_sg.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_sg.c Wed Jul 2 08:49:06 2014 (r268138) +++ stable/10/sys/cam/scsi/scsi_sg.c Wed Jul 2 10:16:12 2014 (r268139) @@ -494,7 +494,7 @@ sgioctl(struct cdev *dev, u_long cmd, ca struct ccb_scsiio *csio; struct cam_periph *periph; struct sg_softc *softc; - struct sg_io_hdr req; + struct sg_io_hdr *req; int dir, error; periph = (struct cam_periph *)dev->si_drv1; @@ -507,40 +507,22 @@ sgioctl(struct cdev *dev, u_long cmd, ca error = 0; switch (cmd) { - case LINUX_SCSI_GET_BUS_NUMBER: { - int busno; - - busno = xpt_path_path_id(periph->path); - error = copyout(&busno, arg, sizeof(busno)); - break; - } - case LINUX_SCSI_GET_IDLUN: { - struct scsi_idlun idlun; - struct cam_sim *sim; + case SG_GET_VERSION_NUM: + { + int *version = (int *)arg; - idlun.dev_id = xpt_path_target_id(periph->path); - sim = xpt_path_sim(periph->path); - idlun.host_unique_id = sim->unit_number; - error = copyout(&idlun, arg, sizeof(idlun)); + *version = sg_version; break; } - case SG_GET_VERSION_NUM: - case LINUX_SG_GET_VERSION_NUM: - error = copyout(&sg_version, arg, sizeof(sg_version)); - break; case SG_SET_TIMEOUT: - case LINUX_SG_SET_TIMEOUT: { - u_int user_timeout; + { + u_int user_timeout = *(u_int *)arg; - error = copyin(arg, &user_timeout, sizeof(u_int)); - if (error == 0) { - softc->sg_user_timeout = user_timeout; - softc->sg_timeout = user_timeout / SG_DEFAULT_HZ * hz; - } + softc->sg_user_timeout = user_timeout; + softc->sg_timeout = user_timeout / SG_DEFAULT_HZ * hz; break; } case SG_GET_TIMEOUT: - case LINUX_SG_GET_TIMEOUT: /* * The value is returned directly to the syscall. */ @@ -548,17 +530,14 @@ sgioctl(struct cdev *dev, u_long cmd, ca error = 0; break; case SG_IO: - case LINUX_SG_IO: - error = copyin(arg, &req, sizeof(req)); - if (error) - break; + req = (struct sg_io_hdr *)arg; - if (req.cmd_len > IOCDBLEN) { + if (req->cmd_len > IOCDBLEN) { error = EINVAL; break; } - if (req.iovec_count != 0) { + if (req->iovec_count != 0) { error = EOPNOTSUPP; break; } @@ -566,14 +545,14 @@ sgioctl(struct cdev *dev, u_long cmd, ca ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); csio = &ccb->csio; - error = copyin(req.cmdp, &csio->cdb_io.cdb_bytes, - req.cmd_len); + error = copyin(req->cmdp, &csio->cdb_io.cdb_bytes, + req->cmd_len); if (error) { xpt_release_ccb(ccb); break; } - switch(req.dxfer_direction) { + switch(req->dxfer_direction) { case SG_DXFER_TO_DEV: dir = CAM_DIR_OUT; break; @@ -594,62 +573,57 @@ sgioctl(struct cdev *dev, u_long cmd, ca sgdone, dir|CAM_DEV_QFRZDIS, MSG_SIMPLE_Q_TAG, - req.dxferp, - req.dxfer_len, - req.mx_sb_len, - req.cmd_len, - req.timeout); + req->dxferp, + req->dxfer_len, + req->mx_sb_len, + req->cmd_len, + req->timeout); error = sgsendccb(periph, ccb); if (error) { - req.host_status = DID_ERROR; - req.driver_status = DRIVER_INVALID; + req->host_status = DID_ERROR; + req->driver_status = DRIVER_INVALID; xpt_release_ccb(ccb); break; } - req.status = csio->scsi_status; - req.masked_status = (csio->scsi_status >> 1) & 0x7f; - sg_scsiio_status(csio, &req.host_status, &req.driver_status); - req.resid = csio->resid; - req.duration = csio->ccb_h.timeout; - req.info = 0; - - error = copyout(&req, arg, sizeof(req)); - if ((error == 0) && (csio->ccb_h.status & CAM_AUTOSNS_VALID) - && (req.sbp != NULL)) { - req.sb_len_wr = req.mx_sb_len - csio->sense_resid; - error = copyout(&csio->sense_data, req.sbp, - req.sb_len_wr); + req->status = csio->scsi_status; + req->masked_status = (csio->scsi_status >> 1) & 0x7f; + sg_scsiio_status(csio, &req->host_status, &req->driver_status); + req->resid = csio->resid; + req->duration = csio->ccb_h.timeout; + req->info = 0; + + if ((csio->ccb_h.status & CAM_AUTOSNS_VALID) + && (req->sbp != NULL)) { + req->sb_len_wr = req->mx_sb_len - csio->sense_resid; + error = copyout(&csio->sense_data, req->sbp, + req->sb_len_wr); } xpt_release_ccb(ccb); break; case SG_GET_RESERVED_SIZE: - case LINUX_SG_GET_RESERVED_SIZE: { - int size = 32768; - - error = copyout(&size, arg, sizeof(size)); + { + int *size = (int *)arg; + *size = DFLTPHYS; break; } case SG_GET_SCSI_ID: - case LINUX_SG_GET_SCSI_ID: { - struct sg_scsi_id id; - - id.host_no = cam_sim_path(xpt_path_sim(periph->path)); - id.channel = xpt_path_path_id(periph->path); - id.scsi_id = xpt_path_target_id(periph->path); - id.lun = xpt_path_lun_id(periph->path); - id.scsi_type = softc->pd_type; - id.h_cmd_per_lun = 1; - id.d_queue_depth = 1; - id.unused[0] = 0; - id.unused[1] = 0; + struct sg_scsi_id *id = (struct sg_scsi_id *)arg; - error = copyout(&id, arg, sizeof(id)); + id->host_no = cam_sim_path(xpt_path_sim(periph->path)); + id->channel = xpt_path_path_id(periph->path); + id->scsi_id = xpt_path_target_id(periph->path); + id->lun = xpt_path_lun_id(periph->path); + id->scsi_type = softc->pd_type; + id->h_cmd_per_lun = 1; + id->d_queue_depth = 1; + id->unused[0] = 0; + id->unused[1] = 0; break; } @@ -672,25 +646,6 @@ sgioctl(struct cdev *dev, u_long cmd, ca case SG_SET_COMMAND_Q: case SG_SET_DEBUG: case SG_NEXT_CMD_LEN: - case LINUX_SG_EMULATED_HOST: - case LINUX_SG_SET_TRANSFORM: - case LINUX_SG_GET_TRANSFORM: - case LINUX_SG_GET_NUM_WAITING: - case LINUX_SG_SCSI_RESET: - case LINUX_SG_GET_REQUEST_TABLE: - case LINUX_SG_SET_KEEP_ORPHAN: - case LINUX_SG_GET_KEEP_ORPHAN: - case LINUX_SG_GET_ACCESS_COUNT: - case LINUX_SG_SET_FORCE_LOW_DMA: - case LINUX_SG_GET_LOW_DMA: - case LINUX_SG_GET_SG_TABLESIZE: - case LINUX_SG_SET_FORCE_PACK_ID: - case LINUX_SG_GET_PACK_ID: - case LINUX_SG_SET_RESERVED_SIZE: - case LINUX_SG_GET_COMMAND_Q: - case LINUX_SG_SET_COMMAND_Q: - case LINUX_SG_SET_DEBUG: - case LINUX_SG_NEXT_CMD_LEN: default: #ifdef CAMDEBUG printf("sgioctl: rejecting cmd 0x%lx\n", cmd); Modified: stable/10/sys/cam/scsi/scsi_sg.h ============================================================================== --- stable/10/sys/cam/scsi/scsi_sg.h Wed Jul 2 08:49:06 2014 (r268138) +++ stable/10/sys/cam/scsi/scsi_sg.h Wed Jul 2 10:16:12 2014 (r268139) @@ -8,31 +8,31 @@ #define _SCSI_SG_H #define SGIOC '"' -#define SG_SET_TIMEOUT _IO(SGIOC, 0x01) +#define SG_SET_TIMEOUT _IOW(SGIOC, 0x01, u_int) #define SG_GET_TIMEOUT _IO(SGIOC, 0x02) -#define SG_EMULATED_HOST _IO(SGIOC, 0x03) +#define SG_EMULATED_HOST _IOR(SGIOC, 0x03, int) #define SG_SET_TRANSFORM _IO(SGIOC, 0x04) #define SG_GET_TRANSFORM _IO(SGIOC, 0x05) -#define SG_GET_COMMAND_Q _IO(SGIOC, 0x70) -#define SG_SET_COMMAND_Q _IO(SGIOC, 0x71) -#define SG_GET_RESERVED_SIZE _IO(SGIOC, 0x72) -#define SG_SET_RESERVED_SIZE _IO(SGIOC, 0x75) -#define SG_GET_SCSI_ID _IO(SGIOC, 0x76) -#define SG_SET_FORCE_LOW_DMA _IO(SGIOC, 0x79) -#define SG_GET_LOW_DMA _IO(SGIOC, 0x7a) -#define SG_SET_FORCE_PACK_ID _IO(SGIOC, 0x7b) -#define SG_GET_PACK_ID _IO(SGIOC, 0x7c) -#define SG_GET_NUM_WAITING _IO(SGIOC, 0x7d) -#define SG_SET_DEBUG _IO(SGIOC, 0x7e) -#define SG_GET_SG_TABLESIZE _IO(SGIOC, 0x7f) -#define SG_GET_VERSION_NUM _IO(SGIOC, 0x82) -#define SG_NEXT_CMD_LEN _IO(SGIOC, 0x83) -#define SG_SCSI_RESET _IO(SGIOC, 0x84) -#define SG_IO _IO(SGIOC, 0x85) +#define SG_GET_COMMAND_Q _IOW(SGIOC, 0x70, int) +#define SG_SET_COMMAND_Q _IOR(SGIOC, 0x71, int) +#define SG_GET_RESERVED_SIZE _IOR(SGIOC, 0x72, int) +#define SG_SET_RESERVED_SIZE _IOW(SGIOC, 0x75, int) +#define SG_GET_SCSI_ID _IOR(SGIOC, 0x76, struct sg_scsi_id) +#define SG_SET_FORCE_LOW_DMA _IOW(SGIOC, 0x79, int) +#define SG_GET_LOW_DMA _IOR(SGIOC, 0x7a, int) +#define SG_SET_FORCE_PACK_ID _IOW(SGIOC, 0x7b, int) +#define SG_GET_PACK_ID _IOR(SGIOC, 0x7c, int) +#define SG_GET_NUM_WAITING _IOR(SGIOC, 0x7d, int) +#define SG_SET_DEBUG _IOW(SGIOC, 0x7e, int) +#define SG_GET_SG_TABLESIZE _IOR(SGIOC, 0x7f, int) +#define SG_GET_VERSION_NUM _IOR(SGIOC, 0x82, int) +#define SG_NEXT_CMD_LEN _IOW(SGIOC, 0x83, int) +#define SG_SCSI_RESET _IOW(SGIOC, 0x84, int) +#define SG_IO _IOWR(SGIOC, 0x85, struct sg_io_hdr) #define SG_GET_REQUEST_TABLE _IO(SGIOC, 0x86) -#define SG_SET_KEEP_ORPHAN _IO(SGIOC, 0x87) -#define SG_GET_KEEP_ORPHAN _IO(SGIOC, 0x88) -#define SG_GET_ACCESS_COUNT _IO(SGIOC, 0x89) +#define SG_SET_KEEP_ORPHAN _IOW(SGIOC, 0x87, int) +#define SG_GET_KEEP_ORPHAN _IOR(SGIOC, 0x88, int) +#define SG_GET_ACCESS_COUNT _IOR(SGIOC, 0x89, int) struct sg_io_hdr { int interface_id; @@ -59,6 +59,31 @@ struct sg_io_hdr { u_int info; }; +struct sg_io_hdr32 { + int interface_id; + int dxfer_direction; + u_char cmd_len; + u_char mx_sb_len; + u_short iovec_count; + u_int dxfer_len; + uint32_t dxferp; + uint32_t cmdp; + uint32_t sbp; + u_int timeout; + u_int flags; + int pack_id; + uint32_t usr_ptr; + u_char status; + u_char masked_status; + u_char msg_status; + u_char sb_len_wr; + u_short host_status; + u_short driver_status; + int resid; + u_int duration; + u_int info; +}; + #define SG_DXFER_NONE -1 #define SG_DXFER_TO_DEV -2 #define SG_DXFER_FROM_DEV -3 Modified: stable/10/sys/compat/freebsd32/freebsd32_ioctl.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_ioctl.c Wed Jul 2 08:49:06 2014 (r268138) +++ stable/10/sys/compat/freebsd32/freebsd32_ioctl.c Wed Jul 2 10:16:12 2014 (r268139) @@ -344,6 +344,71 @@ cleanup: return (error); } +static int +freebsd32_ioctl_sg(struct thread *td, + struct freebsd32_ioctl_args *uap, struct file *fp) +{ + struct sg_io_hdr io; + struct sg_io_hdr32 io32; + int error; + + if ((error = copyin(uap->data, &io32, sizeof(io32))) != 0) + return (error); + + CP(io32, io, interface_id); + CP(io32, io, dxfer_direction); + CP(io32, io, cmd_len); + CP(io32, io, mx_sb_len); + CP(io32, io, iovec_count); + CP(io32, io, dxfer_len); + PTRIN_CP(io32, io, dxferp); + PTRIN_CP(io32, io, cmdp); + PTRIN_CP(io32, io, sbp); + CP(io32, io, timeout); + CP(io32, io, flags); + CP(io32, io, pack_id); + PTRIN_CP(io32, io, usr_ptr); + CP(io32, io, status); + CP(io32, io, masked_status); + CP(io32, io, msg_status); + CP(io32, io, sb_len_wr); + CP(io32, io, host_status); + CP(io32, io, driver_status); + CP(io32, io, resid); + CP(io32, io, duration); + CP(io32, io, info); + + if ((error = fo_ioctl(fp, SG_IO, (caddr_t)&io, td->td_ucred, td)) != 0) + return (error); + + CP(io, io32, interface_id); + CP(io, io32, dxfer_direction); + CP(io, io32, cmd_len); + CP(io, io32, mx_sb_len); + CP(io, io32, iovec_count); + CP(io, io32, dxfer_len); + PTROUT_CP(io, io32, dxferp); + PTROUT_CP(io, io32, cmdp); + PTROUT_CP(io, io32, sbp); + CP(io, io32, timeout); + CP(io, io32, flags); + CP(io, io32, pack_id); + PTROUT_CP(io, io32, usr_ptr); + CP(io, io32, status); + CP(io, io32, masked_status); + CP(io, io32, msg_status); + CP(io, io32, sb_len_wr); + CP(io, io32, host_status); + CP(io, io32, driver_status); + CP(io, io32, resid); + CP(io, io32, duration); + CP(io, io32, info); + + error = copyout(&io32, uap->data, sizeof(io32)); + + return (error); +} + int freebsd32_ioctl(struct thread *td, struct freebsd32_ioctl_args *uap) { @@ -393,6 +458,10 @@ freebsd32_ioctl(struct thread *td, struc error = freebsd32_ioctl_pciocgetconf(td, uap, fp); break; + case SG_IO_32: + error = freebsd32_ioctl_sg(td, uap, fp); + break; + default: fdrop(fp, td); ap.fd = uap->fd; Modified: stable/10/sys/compat/freebsd32/freebsd32_ioctl.h ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_ioctl.h Wed Jul 2 08:49:06 2014 (r268138) +++ stable/10/sys/compat/freebsd32/freebsd32_ioctl.h Wed Jul 2 10:16:12 2014 (r268139) @@ -32,6 +32,8 @@ #ifndef _COMPAT_FREEBSD32_IOCTL_H_ #define _COMPAT_FREEBSD32_IOCTL_H_ +#include + typedef __uint32_t caddr_t32; struct ioc_toc_header32 { @@ -122,5 +124,6 @@ struct pci_conf_io32 { #define MEMRANGE_GET32 _IOWR('m', 50, struct mem_range_op32) #define MEMRANGE_SET32 _IOW('m', 51, struct mem_range_op32) #define PCIOCGETCONF_32 _IOWR('p', 5, struct pci_conf_io32) +#define SG_IO_32 _IOWR(SGIOC, 0x85, struct sg_io_hdr32) #endif /* _COMPAT_FREEBSD32_IOCTL_H_ */ Modified: stable/10/sys/compat/linux/linux_ioctl.c ============================================================================== --- stable/10/sys/compat/linux/linux_ioctl.c Wed Jul 2 08:49:06 2014 (r268138) +++ stable/10/sys/compat/linux/linux_ioctl.c Wed Jul 2 10:16:12 2014 (r268139) @@ -91,6 +91,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + CTASSERT(LINUX_IFNAMSIZ == IFNAMSIZ); FEATURE(linuxulator_v4l, "V4L ioctl wrapper support in the linuxulator"); @@ -1645,9 +1647,32 @@ linux_ioctl_cdrom(struct thread *td, str } case LINUX_SCSI_GET_BUS_NUMBER: + { + struct sg_scsi_id id; + + error = fo_ioctl(fp, SG_GET_SCSI_ID, (caddr_t)&id, + td->td_ucred, td); + if (error) + break; + error = copyout(&id.channel, (void *)args->arg, sizeof(int)); + break; + } + case LINUX_SCSI_GET_IDLUN: - error = linux_ioctl_sg(td, args); + { + struct sg_scsi_id id; + struct scsi_idlun idl; + + error = fo_ioctl(fp, SG_GET_SCSI_ID, (caddr_t)&id, + td->td_ucred, td); + if (error) + break; + idl.dev_id = (id.scsi_id & 0xff) + ((id.lun & 0xff) << 8) + + ((id.channel & 0xff) << 16) + ((id.host_no & 0xff) << 24); + idl.host_unique_id = id.host_no; + error = copyout(&idl, (void *)args->arg, sizeof(idl)); break; + } /* LINUX_CDROM_SEND_PACKET */ /* LINUX_CDROM_NEXT_WRITABLE */ @@ -2617,12 +2642,20 @@ linux_ioctl_drm(struct thread *td, struc return sys_ioctl(td, (struct ioctl_args *)args); } +#ifdef COMPAT_LINUX32 +#define CP(src,dst,fld) do { (dst).fld = (src).fld; } while (0) +#define PTRIN_CP(src,dst,fld) \ + do { (dst).fld = PTRIN((src).fld); } while (0) +#define PTROUT_CP(src,dst,fld) \ + do { (dst).fld = PTROUT((src).fld); } while (0) + static int -linux_ioctl_sg(struct thread *td, struct linux_ioctl_args *args) +linux_ioctl_sg_io(struct thread *td, struct linux_ioctl_args *args) { + struct sg_io_hdr io; + struct sg_io_hdr32 io32; cap_rights_t rights; struct file *fp; - u_long cmd; int error; error = fget(td, args->fd, cap_rights_init(&rights, CAP_IOCTL), &fp); @@ -2630,12 +2663,98 @@ linux_ioctl_sg(struct thread *td, struct printf("sg_linux_ioctl: fget returned %d\n", error); return (error); } - cmd = args->cmd; - error = (fo_ioctl(fp, cmd, (caddr_t)args->arg, td->td_ucred, td)); + if ((error = copyin((void *)args->arg, &io32, sizeof(io32))) != 0) + goto out; + + CP(io32, io, interface_id); + CP(io32, io, dxfer_direction); + CP(io32, io, cmd_len); + CP(io32, io, mx_sb_len); + CP(io32, io, iovec_count); + CP(io32, io, dxfer_len); + PTRIN_CP(io32, io, dxferp); + PTRIN_CP(io32, io, cmdp); + PTRIN_CP(io32, io, sbp); + CP(io32, io, timeout); + CP(io32, io, flags); + CP(io32, io, pack_id); + PTRIN_CP(io32, io, usr_ptr); + CP(io32, io, status); + CP(io32, io, masked_status); + CP(io32, io, msg_status); + CP(io32, io, sb_len_wr); + CP(io32, io, host_status); + CP(io32, io, driver_status); + CP(io32, io, resid); + CP(io32, io, duration); + CP(io32, io, info); + + if ((error = fo_ioctl(fp, SG_IO, (caddr_t)&io, td->td_ucred, td)) != 0) + goto out; + + CP(io, io32, interface_id); + CP(io, io32, dxfer_direction); + CP(io, io32, cmd_len); + CP(io, io32, mx_sb_len); + CP(io, io32, iovec_count); + CP(io, io32, dxfer_len); + PTROUT_CP(io, io32, dxferp); + PTROUT_CP(io, io32, cmdp); + PTROUT_CP(io, io32, sbp); + CP(io, io32, timeout); + CP(io, io32, flags); + CP(io, io32, pack_id); + PTROUT_CP(io, io32, usr_ptr); + CP(io, io32, status); + CP(io, io32, masked_status); + CP(io, io32, msg_status); + CP(io, io32, sb_len_wr); + CP(io, io32, host_status); + CP(io, io32, driver_status); + CP(io, io32, resid); + CP(io, io32, duration); + CP(io, io32, info); + + error = copyout(&io32, (void *)args->arg, sizeof(io32)); + +out: fdrop(fp, td); return (error); } +#endif + +static int +linux_ioctl_sg(struct thread *td, struct linux_ioctl_args *args) +{ + + switch (args->cmd) { + case LINUX_SG_GET_VERSION_NUM: + args->cmd = SG_GET_VERSION_NUM; + break; + case LINUX_SG_SET_TIMEOUT: + args->cmd = SG_SET_TIMEOUT; + break; + case LINUX_SG_GET_TIMEOUT: + args->cmd = SG_GET_TIMEOUT; + break; + case LINUX_SG_IO: + args->cmd = SG_IO; +#ifdef COMPAT_LINUX32 + return (linux_ioctl_sg_io(td, args)); +#endif + break; + case LINUX_SG_GET_RESERVED_SIZE: + args->cmd = SG_GET_RESERVED_SIZE; + break; + case LINUX_SG_GET_SCSI_ID: + args->cmd = SG_GET_SCSI_ID; + break; + default: + return (ENODEV); + } + return (sys_ioctl(td, (struct ioctl_args *)args)); +} /* * Video4Linux (V4L) ioctl handler From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 10:18:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ACC32513; Wed, 2 Jul 2014 10:18:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F8C923A1; Wed, 2 Jul 2014 10:18:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62AIgwK074705; Wed, 2 Jul 2014 10:18:42 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62AIghR074704; Wed, 2 Jul 2014 10:18:42 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407021018.s62AIghR074704@svn.freebsd.org> From: Alexander Motin Date: Wed, 2 Jul 2014 10:18:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268140 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 10:18:42 -0000 Author: mav Date: Wed Jul 2 10:18:42 2014 New Revision: 268140 URL: http://svnweb.freebsd.org/changeset/base/268140 Log: MFC r267606: On discovery stage add set of TargetAddress keys to reply, reporting to the client all the portal groups addresses and ports. Modified: stable/10/usr.sbin/ctld/discovery.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/discovery.c ============================================================================== --- stable/10/usr.sbin/ctld/discovery.c Wed Jul 2 10:16:12 2014 (r268139) +++ stable/10/usr.sbin/ctld/discovery.c Wed Jul 2 10:18:42 2014 (r268140) @@ -35,6 +35,8 @@ #include #include #include +#include +#include #include "ctld.h" #include "iscsi_proto.h" @@ -155,6 +157,48 @@ logout_new_response(struct pdu *request) return (response); } +static void +discovery_add_target(struct keys *response_keys, struct target *targ) +{ + struct portal *portal; + char *buf; + char hbuf[NI_MAXHOST], sbuf[NI_MAXSERV]; + struct addrinfo *ai; + int ret; + + keys_add(response_keys, "TargetName", targ->t_name); + TAILQ_FOREACH(portal, &targ->t_portal_group->pg_portals, p_next) { + ai = portal->p_ai; + ret = getnameinfo(ai->ai_addr, ai->ai_addrlen, + hbuf, sizeof(hbuf), sbuf, sizeof(sbuf), + NI_NUMERICHOST | NI_NUMERICSERV); + if (ret != 0) { + log_warnx("getnameinfo: %s", gai_strerror(ret)); + continue; + } + switch (ai->ai_addr->sa_family) { + case AF_INET: + if (strcmp(hbuf, "0.0.0.0") == 0) + continue; + ret = asprintf(&buf, "%s:%s,%d", hbuf, sbuf, + targ->t_portal_group->pg_tag); + break; + case AF_INET6: + if (strcmp(hbuf, "::") == 0) + continue; + ret = asprintf(&buf, "[%s]:%s,%d", hbuf, sbuf, + targ->t_portal_group->pg_tag); + break; + default: + continue; + } + if (ret <= 0) + log_err(1, "asprintf"); + keys_add(response_keys, "TargetAddress", buf); + free(buf); + } +} + void discovery(struct connection *conn) { @@ -186,7 +230,7 @@ discovery(struct connection *conn) targ->t_name); continue; } - keys_add(response_keys, "TargetName", targ->t_name); + discovery_add_target(response_keys, targ); } } else { targ = target_find(conn->conn_portal->p_portal_group->pg_conf, @@ -194,9 +238,8 @@ discovery(struct connection *conn) if (targ == NULL) { log_debugx("initiator requested information on unknown " "target \"%s\"; returning nothing", send_targets); - } else { - keys_add(response_keys, "TargetName", targ->t_name); - } + } else + discovery_add_target(response_keys, targ); } keys_save(response_keys, response); From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 10:20:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1072655; Wed, 2 Jul 2014 10:20:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9439823AD; Wed, 2 Jul 2014 10:20:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62AK8rL075103; Wed, 2 Jul 2014 10:20:08 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62AK8dT075102; Wed, 2 Jul 2014 10:20:08 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407021020.s62AK8dT075102@svn.freebsd.org> From: Alexander Motin Date: Wed, 2 Jul 2014 10:20:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268141 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 10:20:08 -0000 Author: mav Date: Wed Jul 2 10:20:08 2014 New Revision: 268141 URL: http://svnweb.freebsd.org/changeset/base/268141 Log: MFC r267872: Allow to use iSCSI immediate data by several ctl_datamove() calls. While for FreeBSD client that is only a minor optimization, VMWare client doesn't support additional data requests after all data being sent once as immediate. Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed Jul 2 10:18:42 2014 (r268140) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed Jul 2 10:20:08 2014 (r268141) @@ -737,12 +737,15 @@ cfiscsi_handle_data_segment(struct icl_p buffer_offset = ntohl(bhsdo->bhsdo_buffer_offset); else buffer_offset = 0; + len = icl_pdu_data_segment_length(request); /* * Make sure the offset, as sent by the initiator, matches the offset * we're supposed to be at in the scatter-gather list. */ - if (buffer_offset != + if (buffer_offset > + io->scsiio.kern_rel_offset + io->scsiio.ext_data_filled || + buffer_offset + len <= io->scsiio.kern_rel_offset + io->scsiio.ext_data_filled) { CFISCSI_SESSION_WARN(cs, "received bad buffer offset %zd, " "expected %zd; dropping connection", buffer_offset, @@ -758,8 +761,8 @@ cfiscsi_handle_data_segment(struct icl_p * to buffer_offset, which is the offset within the task (SCSI * command). */ - off = 0; - len = icl_pdu_data_segment_length(request); + off = io->scsiio.kern_rel_offset + io->scsiio.ext_data_filled - + buffer_offset; /* * Iterate over the scatter/gather segments, filling them with data @@ -816,12 +819,8 @@ cfiscsi_handle_data_segment(struct icl_p * This obviously can only happen with SCSI Command PDU. */ if ((request->ip_bhs->bhs_opcode & ~ISCSI_BHS_OPCODE_IMMEDIATE) == - ISCSI_BHS_OPCODE_SCSI_COMMAND) { - CFISCSI_SESSION_DEBUG(cs, "received too much immediate " - "data: got %zd bytes, expected %zd", - icl_pdu_data_segment_length(request), off); + ISCSI_BHS_OPCODE_SCSI_COMMAND) return (true); - } CFISCSI_SESSION_WARN(cs, "received too much data: got %zd bytes, " "expected %zd; dropping connection", @@ -2623,8 +2622,8 @@ cfiscsi_datamove_out(union ctl_io *io) cdw->cdw_target_transfer_tag = target_transfer_tag; cdw->cdw_initiator_task_tag = bhssc->bhssc_initiator_task_tag; - if (cs->cs_immediate_data && io->scsiio.kern_rel_offset == 0 && - icl_pdu_data_segment_length(request) > 0) { + if (cs->cs_immediate_data && io->scsiio.kern_rel_offset < + icl_pdu_data_segment_length(request)) { done = cfiscsi_handle_data_segment(request, cdw); if (done) { uma_zfree(cfiscsi_data_wait_zone, cdw); From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 10:32:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F3C6A9D; Wed, 2 Jul 2014 10:32:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4959252C; Wed, 2 Jul 2014 10:32:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62AWiUj083408; Wed, 2 Jul 2014 10:32:44 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62AWif5083407; Wed, 2 Jul 2014 10:32:44 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407021032.s62AWif5083407@svn.freebsd.org> From: Alexander Motin Date: Wed, 2 Jul 2014 10:32:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268142 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 10:32:45 -0000 Author: mav Date: Wed Jul 2 10:32:44 2014 New Revision: 268142 URL: http://svnweb.freebsd.org/changeset/base/268142 Log: MFC r265323 (by trasz): Provide better descriptions for 'struct ctl_scsiio' fields; based mostly on emails from ken@. Modified: stable/10/sys/cam/ctl/ctl_io.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_io.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_io.h Wed Jul 2 10:20:08 2014 (r268141) +++ stable/10/sys/cam/ctl/ctl_io.h Wed Jul 2 10:32:44 2014 (r268142) @@ -293,21 +293,60 @@ union ctl_io; */ struct ctl_scsiio { struct ctl_io_hdr io_hdr; /* common to all I/O types */ + + /* + * The ext_* fields are generally intended for frontend use; CTL itself + * doesn't modify or use them. + */ uint32_t ext_sg_entries; /* 0 = no S/G list, > 0 = num entries */ uint8_t *ext_data_ptr; /* data buffer or S/G list */ uint32_t ext_data_len; /* Data transfer length */ uint32_t ext_data_filled; /* Amount of data filled so far */ - uint32_t kern_sg_entries; /* 0 = no S/G list, > 0 = num entries */ - uint32_t rem_sg_entries; /* 0 = no S/G list, > 0 = num entries */ - uint8_t *kern_data_ptr; /* data buffer or S/G list */ - uint32_t kern_data_len; /* Length of this S/G list/buffer */ - uint32_t kern_total_len; /* Total length of this transaction */ - uint32_t kern_data_resid; /* Length left to transfer after this*/ - uint32_t kern_rel_offset; /* Byte Offset of this transfer */ + + /* + * The number of scatter/gather entries in the list pointed to + * by kern_data_ptr. 0 means there is no list, just a data pointer. + */ + uint32_t kern_sg_entries; + + uint32_t rem_sg_entries; /* Unused. */ + + /* + * The data pointer or a pointer to the scatter/gather list. + */ + uint8_t *kern_data_ptr; + + /* + * Length of the data buffer or scatter/gather list. It's also + * the length of this particular piece of the data transfer, + * ie. number of bytes expected to be transferred by the current + * invocation of frontend's datamove() callback. It's always + * less than or equal to kern_total_len. + */ + uint32_t kern_data_len; + + /* + * Total length of data to be transferred during this particular + * SCSI command, as decoded from SCSI CDB. + */ + uint32_t kern_total_len; + + /* + * Amount of data left after the current data transfer. + */ + uint32_t kern_data_resid; + + /* + * Byte offset of this transfer, equal to the amount of data + * already transferred for this SCSI command during previous + * datamove() invocations. + */ + uint32_t kern_rel_offset; + struct scsi_sense_data sense_data; /* sense data */ uint8_t sense_len; /* Returned sense length */ uint8_t scsi_status; /* SCSI status byte */ - uint8_t sense_residual; /* sense residual length */ + uint8_t sense_residual; /* Unused. */ uint32_t residual; /* data residual length */ uint32_t tag_num; /* tag number */ ctl_tag_type tag_type; /* simple, ordered, head of queue,etc.*/ From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 10:35:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 91FA8C11; Wed, 2 Jul 2014 10:35:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E0DF2544; Wed, 2 Jul 2014 10:35:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62AZ74Q083916; Wed, 2 Jul 2014 10:35:07 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62AZ6h7083909; Wed, 2 Jul 2014 10:35:06 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407021035.s62AZ6h7083909@svn.freebsd.org> From: Alexander Motin Date: Wed, 2 Jul 2014 10:35:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268143 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 10:35:07 -0000 Author: mav Date: Wed Jul 2 10:35:06 2014 New Revision: 268143 URL: http://svnweb.freebsd.org/changeset/base/268143 Log: MFC r267481, r267952: Implement small KPI to access LUN options instead doing it by hands. Modified: stable/10/sys/cam/ctl/ctl_backend.c stable/10/sys/cam/ctl/ctl_backend.h stable/10/sys/cam/ctl/ctl_backend_block.c stable/10/sys/cam/ctl/ctl_backend_ramdisk.c stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_backend.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend.c Wed Jul 2 10:32:44 2014 (r268142) +++ stable/10/sys/cam/ctl/ctl_backend.c Wed Jul 2 10:35:06 2014 (r268143) @@ -173,6 +173,45 @@ ctl_backend_find(char *backend_name) return (NULL); } -/* - * vim: ts=8 - */ +void +ctl_init_opts(struct ctl_be_lun *be_lun, struct ctl_lun_req *req) +{ + struct ctl_be_lun_option *opt; + int i; + + STAILQ_INIT(&be_lun->options); + for (i = 0; i < req->num_be_args; i++) { + opt = malloc(sizeof(*opt), M_CTL, M_WAITOK); + opt->name = malloc(strlen(req->kern_be_args[i].kname) + 1, M_CTL, M_WAITOK); + strcpy(opt->name, req->kern_be_args[i].kname); + opt->value = malloc(strlen(req->kern_be_args[i].kvalue) + 1, M_CTL, M_WAITOK); + strcpy(opt->value, req->kern_be_args[i].kvalue); + STAILQ_INSERT_TAIL(&be_lun->options, opt, links); + } +} + +void +ctl_free_opts(struct ctl_be_lun *be_lun) +{ + struct ctl_be_lun_option *opt; + + while ((opt = STAILQ_FIRST(&be_lun->options)) != NULL) { + STAILQ_REMOVE_HEAD(&be_lun->options, links); + free(opt->name, M_CTL); + free(opt->value, M_CTL); + free(opt, M_CTL); + } +} + +char * +ctl_get_opt(struct ctl_be_lun *be_lun, const char *name) +{ + struct ctl_be_lun_option *opt; + + STAILQ_FOREACH(opt, &be_lun->options, links) { + if (strcmp(opt->name, name) == 0) { + return (opt->value); + } + } + return (NULL); +} Modified: stable/10/sys/cam/ctl/ctl_backend.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend.h Wed Jul 2 10:32:44 2014 (r268142) +++ stable/10/sys/cam/ctl/ctl_backend.h Wed Jul 2 10:35:06 2014 (r268143) @@ -301,6 +301,14 @@ int ctl_lun_online(struct ctl_be_lun *be */ void ctl_lun_capacity_changed(struct ctl_be_lun *be_lun); +/* + * KPI to manipulate LUN options + */ +struct ctl_lun_req; +void ctl_init_opts(struct ctl_be_lun *be_lun, struct ctl_lun_req *req); +void ctl_free_opts(struct ctl_be_lun *be_lun); +char * ctl_get_opt(struct ctl_be_lun *be_lun, const char *name); + #endif /* _KERNEL */ #endif /* _CTL_BACKEND_H_ */ Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Wed Jul 2 10:32:44 2014 (r268142) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Wed Jul 2 10:35:06 2014 (r268143) @@ -1824,9 +1824,12 @@ ctl_be_block_create(struct ctl_be_block_ struct ctl_be_block_lun *be_lun; struct ctl_lun_create_params *params; struct ctl_be_arg *file_arg; + char num_thread_str[16]; char tmpstr[32]; + char *value; int retval, num_threads, unmap; int i; + int tmp_num_threads; params = &req->reqdata.create; retval = 0; @@ -1841,9 +1844,9 @@ ctl_be_block_create(struct ctl_be_block_ STAILQ_INIT(&be_lun->input_queue); STAILQ_INIT(&be_lun->config_write_queue); STAILQ_INIT(&be_lun->datamove_queue); - STAILQ_INIT(&be_lun->ctl_be_lun.options); sprintf(be_lun->lunname, "cblk%d", softc->num_luns); mtx_init(&be_lun->lock, be_lun->lunname, NULL, MTX_DEF); + ctl_init_opts(&be_lun->ctl_be_lun, req); be_lun->lun_zone = uma_zcreate(be_lun->lunname, CTLBLK_MAX_SEG, NULL, NULL, NULL, NULL, /*align*/ 0, /*flags*/0); @@ -1916,50 +1919,27 @@ ctl_be_block_create(struct ctl_be_block_ * XXX This searching loop might be refactored to be combined with * the loop above, */ - unmap = 0; - for (i = 0; i < req->num_be_args; i++) { - if (strcmp(req->kern_be_args[i].kname, "num_threads") == 0) { - struct ctl_be_arg *thread_arg; - char num_thread_str[16]; - int tmp_num_threads; - - - thread_arg = &req->kern_be_args[i]; - - strlcpy(num_thread_str, (char *)thread_arg->kvalue, - min(thread_arg->vallen, - sizeof(num_thread_str))); - - tmp_num_threads = strtol(num_thread_str, NULL, 0); - - /* - * We don't let the user specify less than one - * thread, but hope he's clueful enough not to - * specify 1000 threads. - */ - if (tmp_num_threads < 1) { - snprintf(req->error_str, sizeof(req->error_str), - "%s: invalid number of threads %s", - __func__, num_thread_str); - goto bailout_error; - } + value = ctl_get_opt(&be_lun->ctl_be_lun, "num_threads"); + if (value != NULL) { + tmp_num_threads = strtol(value, NULL, 0); - num_threads = tmp_num_threads; - } else if (strcmp(req->kern_be_args[i].kname, "unmap") == 0 && - strcmp(req->kern_be_args[i].kvalue, "on") == 0) { - unmap = 1; - } else if (strcmp(req->kern_be_args[i].kname, "file") != 0 && - strcmp(req->kern_be_args[i].kname, "dev") != 0) { - struct ctl_be_lun_option *opt; - - opt = malloc(sizeof(*opt), M_CTLBLK, M_WAITOK); - opt->name = malloc(strlen(req->kern_be_args[i].kname) + 1, M_CTLBLK, M_WAITOK); - strcpy(opt->name, req->kern_be_args[i].kname); - opt->value = malloc(strlen(req->kern_be_args[i].kvalue) + 1, M_CTLBLK, M_WAITOK); - strcpy(opt->value, req->kern_be_args[i].kvalue); - STAILQ_INSERT_TAIL(&be_lun->ctl_be_lun.options, opt, links); + /* + * We don't let the user specify less than one + * thread, but hope he's clueful enough not to + * specify 1000 threads. + */ + if (tmp_num_threads < 1) { + snprintf(req->error_str, sizeof(req->error_str), + "%s: invalid number of threads %s", + __func__, num_thread_str); + goto bailout_error; } + num_threads = tmp_num_threads; } + unmap = 0; + value = ctl_get_opt(&be_lun->ctl_be_lun, "unmap"); + if (value != NULL && strcmp(value, "on") == 0) + unmap = 1; be_lun->flags = CTL_BE_BLOCK_LUN_UNCONFIGURED; be_lun->ctl_be_lun.flags = CTL_LUN_FLAG_PRIMARY; @@ -2122,6 +2102,7 @@ bailout_error: free(be_lun->dev_path, M_CTLBLK); if (be_lun->lun_zone != NULL) uma_zdestroy(be_lun->lun_zone); + ctl_free_opts(&be_lun->ctl_be_lun); mtx_destroy(&be_lun->lock); free(be_lun, M_CTLBLK); @@ -2208,6 +2189,7 @@ ctl_be_block_rm(struct ctl_be_block_soft uma_zdestroy(be_lun->lun_zone); + ctl_free_opts(&be_lun->ctl_be_lun); free(be_lun->dev_path, M_CTLBLK); free(be_lun, M_CTLBLK); Modified: stable/10/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Wed Jul 2 10:32:44 2014 (r268142) +++ stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Wed Jul 2 10:35:06 2014 (r268143) @@ -502,6 +502,7 @@ ctl_backend_ramdisk_rm(struct ctl_be_ram if (retval == 0) { taskqueue_drain(be_lun->io_taskqueue, &be_lun->io_task); taskqueue_free(be_lun->io_taskqueue); + ctl_free_opts(&be_lun->ctl_be_lun); mtx_destroy(&be_lun->lock); free(be_lun, M_RAMDISK); } @@ -523,8 +524,9 @@ ctl_backend_ramdisk_create(struct ctl_be struct ctl_be_ramdisk_lun *be_lun; struct ctl_lun_create_params *params; uint32_t blocksize; + char *value; char tmpstr[32]; - int i, retval, unmap; + int retval, unmap; retval = 0; params = &req->reqdata.create; @@ -543,7 +545,7 @@ ctl_backend_ramdisk_create(struct ctl_be goto bailout_error; } sprintf(be_lun->lunname, "cram%d", softc->num_luns); - STAILQ_INIT(&be_lun->ctl_be_lun.options); + ctl_init_opts(&be_lun->ctl_be_lun, req); if (params->flags & CTL_LUN_FLAG_DEV_TYPE) be_lun->ctl_be_lun.lun_type = params->device_type; @@ -581,21 +583,9 @@ ctl_backend_ramdisk_create(struct ctl_be be_lun->softc = softc; unmap = 0; - for (i = 0; i < req->num_be_args; i++) { - if (strcmp(req->kern_be_args[i].kname, "unmap") == 0 && - strcmp(req->kern_be_args[i].kvalue, "on") == 0) { - unmap = 1; - } else { - struct ctl_be_lun_option *opt; - - opt = malloc(sizeof(*opt), M_RAMDISK, M_WAITOK); - opt->name = malloc(strlen(req->kern_be_args[i].kname) + 1, M_RAMDISK, M_WAITOK); - strcpy(opt->name, req->kern_be_args[i].kname); - opt->value = malloc(strlen(req->kern_be_args[i].kvalue) + 1, M_RAMDISK, M_WAITOK); - strcpy(opt->value, req->kern_be_args[i].kvalue); - STAILQ_INSERT_TAIL(&be_lun->ctl_be_lun.options, opt, links); - } - } + value = ctl_get_opt(&be_lun->ctl_be_lun, "unmap"); + if (value != NULL && strcmp(value, "on") == 0) + unmap = 1; be_lun->flags = CTL_BE_RAMDISK_LUN_UNCONFIGURED; be_lun->ctl_be_lun.flags = CTL_LUN_FLAG_PRIMARY; @@ -728,6 +718,7 @@ bailout_error: if (be_lun->io_taskqueue != NULL) { taskqueue_free(be_lun->io_taskqueue); } + ctl_free_opts(&be_lun->ctl_be_lun); mtx_destroy(&be_lun->lock); free(be_lun, M_RAMDISK); } Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed Jul 2 10:32:44 2014 (r268142) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed Jul 2 10:35:06 2014 (r268143) @@ -2311,22 +2311,18 @@ cfiscsi_lun_enable(void *arg, struct ctl { struct cfiscsi_softc *softc; struct cfiscsi_target *ct; - struct ctl_be_lun_option *opt; const char *target = NULL, *target_alias = NULL; const char *lun = NULL; unsigned long tmp; softc = (struct cfiscsi_softc *)arg; - STAILQ_FOREACH(opt, - &control_softc->ctl_luns[lun_id]->be_lun->options, links) { - if (strcmp(opt->name, "cfiscsi_target") == 0) - target = opt->value; - else if (strcmp(opt->name, "cfiscsi_target_alias") == 0) - target_alias = opt->value; - else if (strcmp(opt->name, "cfiscsi_lun") == 0) - lun = opt->value; - } + target = ctl_get_opt(control_softc->ctl_luns[lun_id]->be_lun, + "cfiscsi_target"); + target_alias = ctl_get_opt(control_softc->ctl_luns[lun_id]->be_lun, + "cfiscsi_target_alias"); + lun = ctl_get_opt(control_softc->ctl_luns[lun_id]->be_lun, + "cfiscsi_lun"); if (target == NULL && lun == NULL) return (0); From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 10:36:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84149D47; Wed, 2 Jul 2014 10:36:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 581D9254B; Wed, 2 Jul 2014 10:36:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62Aa5gs084099; Wed, 2 Jul 2014 10:36:05 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62Aa4L5084096; Wed, 2 Jul 2014 10:36:04 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407021036.s62Aa4L5084096@svn.freebsd.org> From: Alexander Motin Date: Wed, 2 Jul 2014 10:36:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268144 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 10:36:05 -0000 Author: mav Date: Wed Jul 2 10:36:04 2014 New Revision: 268144 URL: http://svnweb.freebsd.org/changeset/base/268144 Log: MFC r267485: Remove non-functional remnants of control LUN -- 18MB of RAM for nothing. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_private.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Wed Jul 2 10:35:06 2014 (r268143) +++ stable/10/sys/cam/ctl/ctl.c Wed Jul 2 10:36:04 2014 (r268144) @@ -961,7 +961,6 @@ ctl_init(void) struct ctl_softc *softc; struct ctl_io_pool *internal_pool, *emergency_pool, *other_pool; struct ctl_frontend *fe; - struct ctl_lun *lun; uint8_t sc_id =0; int i, error, retval; //int isc_retval; @@ -1049,8 +1048,6 @@ ctl_init(void) STAILQ_INIT(&softc->be_list); STAILQ_INIT(&softc->io_pools); - lun = &softc->lun; - /* * We don't bother calling these with ctl_lock held here, because, * in theory, no one else can try to do anything while we're in our @@ -1085,16 +1082,6 @@ ctl_init(void) softc->emergency_pool = emergency_pool; softc->othersc_pool = other_pool; - /* - * We used to allocate a processor LUN here. The new scheme is to - * just let the user allocate LUNs as he sees fit. - */ -#if 0 - mtx_lock(&softc->ctl_lock); - ctl_alloc_lun(softc, lun, /*be_lun*/NULL, /*target*/softc->target); - mtx_unlock(&softc->ctl_lock); -#endif - if (worker_threads > MAXCPU || worker_threads == 0) { printf("invalid kern.cam.ctl.worker_threads value; " "setting to 1"); @@ -1116,9 +1103,6 @@ ctl_init(void) &softc->work_thread, NULL, 0, 0, "ctl", "work%d", i); if (error != 0) { printf("error creating CTL work thread!\n"); - mtx_lock(&softc->ctl_lock); - ctl_free_lun(lun); - mtx_unlock(&softc->ctl_lock); ctl_pool_free(internal_pool); ctl_pool_free(emergency_pool); ctl_pool_free(other_pool); Modified: stable/10/sys/cam/ctl/ctl_private.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_private.h Wed Jul 2 10:35:06 2014 (r268143) +++ stable/10/sys/cam/ctl/ctl_private.h Wed Jul 2 10:36:04 2014 (r268144) @@ -426,7 +426,6 @@ struct ctl_softc { struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; struct ctl_ioctl_info ioctl_info; - struct ctl_lun lun; struct ctl_io_pool *internal_pool; struct ctl_io_pool *emergency_pool; struct ctl_io_pool *othersc_pool; From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 10:37:23 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D525EAC; Wed, 2 Jul 2014 10:37:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A3242571; Wed, 2 Jul 2014 10:37:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62AbNLH084374; Wed, 2 Jul 2014 10:37:23 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62AbMSc084372; Wed, 2 Jul 2014 10:37:22 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407021037.s62AbMSc084372@svn.freebsd.org> From: Alexander Motin Date: Wed, 2 Jul 2014 10:37:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268145 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 10:37:23 -0000 Author: mav Date: Wed Jul 2 10:37:22 2014 New Revision: 268145 URL: http://svnweb.freebsd.org/changeset/base/268145 Log: MFC r267496, r267498: Add "vendor", "product" and "revision" options to control inquiry data. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Wed Jul 2 10:36:04 2014 (r268144) +++ stable/10/sys/cam/ctl/ctl.c Wed Jul 2 10:37:22 2014 (r268145) @@ -9303,6 +9303,7 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio struct ctl_softc *ctl_softc; struct ctl_lun *lun; struct ctl_frontend *fe; + char *val; #ifndef CTL_USE_BACKEND_SN char tmpstr[32]; #endif /* CTL_USE_BACKEND_SN */ @@ -9396,7 +9397,13 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio */ desc->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_LUN | SVPD_ID_TYPE_T10; desc->length = sizeof(*t10id) + CTL_DEVID_LEN; - strncpy((char *)t10id->vendor, CTL_VENDOR, sizeof(t10id->vendor)); + if (lun == NULL || (val = ctl_get_opt(lun->be_lun, "vendor")) == NULL) { + strncpy((char *)t10id->vendor, CTL_VENDOR, sizeof(t10id->vendor)); + } else { + memset(t10id->vendor, ' ', sizeof(t10id->vendor)); + strncpy(t10id->vendor, val, + min(sizeof(t10id->vendor), strlen(val))); + } /* * desc1 is for the WWPN which is a port asscociation. @@ -9634,6 +9641,7 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio struct scsi_inquiry *cdb; struct ctl_softc *ctl_softc; struct ctl_lun *lun; + char *val; uint32_t alloc_len; int is_fc; @@ -9778,10 +9786,16 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio * We have 8 bytes for the vendor name, and 16 bytes for the device * name and 4 bytes for the revision. */ - strncpy(inq_ptr->vendor, CTL_VENDOR, sizeof(inq_ptr->vendor)); + if (lun == NULL || (val = ctl_get_opt(lun->be_lun, "vendor")) == NULL) { + strcpy(inq_ptr->vendor, CTL_VENDOR); + } else { + memset(inq_ptr->vendor, ' ', sizeof(inq_ptr->vendor)); + strncpy(inq_ptr->vendor, val, + min(sizeof(inq_ptr->vendor), strlen(val))); + } if (lun == NULL) { strcpy(inq_ptr->product, CTL_DIRECT_PRODUCT); - } else { + } else if ((val = ctl_get_opt(lun->be_lun, "product")) == NULL) { switch (lun->be_lun->lun_type) { case T_DIRECT: strcpy(inq_ptr->product, CTL_DIRECT_PRODUCT); @@ -9793,13 +9807,23 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio strcpy(inq_ptr->product, CTL_UNKNOWN_PRODUCT); break; } + } else { + memset(inq_ptr->product, ' ', sizeof(inq_ptr->product)); + strncpy(inq_ptr->product, val, + min(sizeof(inq_ptr->product), strlen(val))); } /* * XXX make this a macro somewhere so it automatically gets * incremented when we make changes. */ - strncpy(inq_ptr->revision, "0001", sizeof(inq_ptr->revision)); + if (lun == NULL || (val = ctl_get_opt(lun->be_lun, "revision")) == NULL) { + strncpy(inq_ptr->revision, "0001", sizeof(inq_ptr->revision)); + } else { + memset(inq_ptr->revision, ' ', sizeof(inq_ptr->revision)); + strncpy(inq_ptr->revision, val, + min(sizeof(inq_ptr->revision), strlen(val))); + } /* * For parallel SCSI, we support double transition and single Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed Jul 2 10:36:04 2014 (r268144) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed Jul 2 10:37:22 2014 (r268145) @@ -2037,6 +2037,7 @@ cfiscsi_devid(struct ctl_scsiio *ctsio, struct scsi_vpd_id_t10 *t10id; struct ctl_lun *lun; const struct icl_pdu *request; + char *val; size_t devid_len, wwpn_len; lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; @@ -2101,7 +2102,13 @@ cfiscsi_devid(struct ctl_scsiio *ctsio, desc->proto_codeset = (SCSI_PROTO_ISCSI << 4) | SVPD_ID_CODESET_ASCII; desc->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_LUN | SVPD_ID_TYPE_T10; desc->length = sizeof(*t10id) + CTL_DEVID_LEN; - strncpy((char *)t10id->vendor, CTL_VENDOR, sizeof(t10id->vendor)); + if (lun == NULL || (val = ctl_get_opt(lun->be_lun, "vendor")) == NULL) { + strncpy((char *)t10id->vendor, CTL_VENDOR, sizeof(t10id->vendor)); + } else { + memset(t10id->vendor, ' ', sizeof(t10id->vendor)); + strncpy(t10id->vendor, val, + min(sizeof(t10id->vendor), strlen(val))); + } /* * If we've actually got a backend, copy the device id from the From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 10:38:23 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4FE0CFE0; Wed, 2 Jul 2014 10:38:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22CBA2576; Wed, 2 Jul 2014 10:38:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62AcNmv084579; Wed, 2 Jul 2014 10:38:23 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62AcM6K084577; Wed, 2 Jul 2014 10:38:23 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407021038.s62AcM6K084577@svn.freebsd.org> From: Alexander Motin Date: Wed, 2 Jul 2014 10:38:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268146 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 10:38:23 -0000 Author: mav Date: Wed Jul 2 10:38:22 2014 New Revision: 268146 URL: http://svnweb.freebsd.org/changeset/base/268146 Log: MFC r267499: Remove custom processing for "file" option. Modified: stable/10/sys/cam/ctl/ctl_backend_block.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Wed Jul 2 10:37:22 2014 (r268145) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Wed Jul 2 10:38:22 2014 (r268146) @@ -1823,12 +1823,10 @@ ctl_be_block_create(struct ctl_be_block_ { struct ctl_be_block_lun *be_lun; struct ctl_lun_create_params *params; - struct ctl_be_arg *file_arg; char num_thread_str[16]; char tmpstr[32]; char *value; int retval, num_threads, unmap; - int i; int tmp_num_threads; params = &req->reqdata.create; @@ -1836,8 +1834,6 @@ ctl_be_block_create(struct ctl_be_block_ num_threads = cbb_num_threads; - file_arg = NULL; - be_lun = malloc(sizeof(*be_lun), M_CTLBLK, M_ZERO | M_WAITOK); be_lun->softc = softc; @@ -1863,24 +1859,13 @@ ctl_be_block_create(struct ctl_be_block_ be_lun->ctl_be_lun.lun_type = T_DIRECT; if (be_lun->ctl_be_lun.lun_type == T_DIRECT) { - for (i = 0; i < req->num_be_args; i++) { - if (strcmp(req->kern_be_args[i].kname, "file") == 0) { - file_arg = &req->kern_be_args[i]; - break; - } - } - - if (file_arg == NULL) { + value = ctl_get_opt(&be_lun->ctl_be_lun, "file"); + if (value == NULL) { snprintf(req->error_str, sizeof(req->error_str), "%s: no file argument specified", __func__); goto bailout_error; } - - be_lun->dev_path = malloc(file_arg->vallen, M_CTLBLK, - M_WAITOK | M_ZERO); - - strlcpy(be_lun->dev_path, (char *)file_arg->kvalue, - file_arg->vallen); + be_lun->dev_path = strdup(value, M_CTLBLK); retval = ctl_be_block_open(softc, be_lun, req); if (retval != 0) { @@ -2518,25 +2503,6 @@ ctl_be_block_lun_info(void *be_lun, stru retval = sbuf_printf(sb, ""); - /* - * For processor devices, we don't have a path variable. - */ - if ((retval != 0) - || (lun->dev_path == NULL)) - goto bailout; - - retval = sbuf_printf(sb, ""); - - if (retval != 0) - goto bailout; - - retval = ctl_sbuf_printf_esc(sb, lun->dev_path); - - if (retval != 0) - goto bailout; - - retval = sbuf_printf(sb, "\n"); - bailout: return (retval); From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 10:39:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C7FD71AE; Wed, 2 Jul 2014 10:39:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B4F48257F; Wed, 2 Jul 2014 10:39:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62Adjps084856; Wed, 2 Jul 2014 10:39:45 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62AdjcA084855; Wed, 2 Jul 2014 10:39:45 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407021039.s62AdjcA084855@svn.freebsd.org> From: Alexander Motin Date: Wed, 2 Jul 2014 10:39:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268147 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 10:39:45 -0000 Author: mav Date: Wed Jul 2 10:39:45 2014 New Revision: 268147 URL: http://svnweb.freebsd.org/changeset/base/268147 Log: MFC r267500: Format Portal Group Tag same as istgt does -- %4.4x instead of %x. SPC-4 spec tells it should be "two or more hexadecimal digits". RFC3720 tells it is 16-bit value. Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed Jul 2 10:38:22 2014 (r268146) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Wed Jul 2 10:39:45 2014 (r268147) @@ -2045,7 +2045,7 @@ cfiscsi_devid(struct ctl_scsiio *ctsio, cs = PDU_SESSION(request); wwpn_len = strlen(cs->cs_target->ct_name); - wwpn_len += strlen(",t,0x01"); + wwpn_len += strlen(",t,0x0001"); wwpn_len += 1; /* '\0' */ if ((wwpn_len % 4) != 0) wwpn_len += (4 - (wwpn_len % 4)); @@ -2134,7 +2134,7 @@ cfiscsi_devid(struct ctl_scsiio *ctsio, desc1->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_PORT | SVPD_ID_TYPE_SCSI_NAME; desc1->length = wwpn_len; - snprintf(desc1->identifier, wwpn_len, "%s,t,0x%x", + snprintf(desc1->identifier, wwpn_len, "%s,t,0x%4.4x", cs->cs_target->ct_name, cs->cs_portal_group_tag); /* From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 10:41:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 86C4C302; Wed, 2 Jul 2014 10:41:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73B152592; Wed, 2 Jul 2014 10:41:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62AfCuo087666; Wed, 2 Jul 2014 10:41:12 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62AfBED087663; Wed, 2 Jul 2014 10:41:11 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407021041.s62AfBED087663@svn.freebsd.org> From: Alexander Motin Date: Wed, 2 Jul 2014 10:41:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268148 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 10:41:12 -0000 Author: mav Date: Wed Jul 2 10:41:11 2014 New Revision: 268148 URL: http://svnweb.freebsd.org/changeset/base/268148 Log: MFC r267514: Move kern_total_len setting from backend to core code. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_backend_block.c stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Wed Jul 2 10:39:45 2014 (r268147) +++ stable/10/sys/cam/ctl/ctl.c Wed Jul 2 10:41:11 2014 (r268148) @@ -8800,6 +8800,9 @@ ctl_read_write(struct ctl_scsiio *ctsio) memcpy(ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes, &lbalen, sizeof(lbalen)); + ctsio->kern_total_len = num_blocks * lun->be_lun->blocksize; + ctsio->kern_rel_offset = 0; + CTL_DEBUG_PRINT(("ctl_read_write: calling data_submit()\n")); retval = lun->backend->data_submit((union ctl_io *)ctsio); Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Wed Jul 2 10:39:45 2014 (r268147) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Wed Jul 2 10:41:11 2014 (r268148) @@ -1385,15 +1385,11 @@ ctl_be_block_worker(void *context, int p static int ctl_be_block_submit(union ctl_io *io) { - struct ctl_lba_len lbalen; struct ctl_be_block_lun *be_lun; struct ctl_be_lun *ctl_be_lun; - int retval; DPRINTF("entered\n"); - retval = CTL_RETVAL_COMPLETE; - ctl_be_lun = (struct ctl_be_lun *)io->io_hdr.ctl_private[ CTL_PRIV_BACKEND_LUN].ptr; be_lun = (struct ctl_be_block_lun *)ctl_be_lun->be_lun; @@ -1404,11 +1400,6 @@ ctl_be_block_submit(union ctl_io *io) KASSERT(io->io_hdr.io_type == CTL_IO_SCSI, ("Non-SCSI I/O (type " "%#x) encountered", io->io_hdr.io_type)); - memcpy(&lbalen, io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes, - sizeof(lbalen)); - io->scsiio.kern_total_len = lbalen.len * be_lun->blocksize; - io->scsiio.kern_rel_offset = 0; - mtx_lock(&be_lun->lock); /* * XXX KDM make sure that links is okay to use at this point. @@ -1417,10 +1408,9 @@ ctl_be_block_submit(union ctl_io *io) */ STAILQ_INSERT_TAIL(&be_lun->input_queue, &io->io_hdr, links); mtx_unlock(&be_lun->lock); - taskqueue_enqueue(be_lun->io_taskqueue, &be_lun->io_task); - return (retval); + return (CTL_RETVAL_COMPLETE); } static int Modified: stable/10/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Wed Jul 2 10:39:45 2014 (r268147) +++ stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Wed Jul 2 10:41:11 2014 (r268148) @@ -274,20 +274,8 @@ ctl_backend_ramdisk_move_done(union ctl_ static int ctl_backend_ramdisk_submit(union ctl_io *io) { - struct ctl_lba_len lbalen; - struct ctl_be_lun *ctl_be_lun; - ctl_be_lun = (struct ctl_be_lun *)io->io_hdr.ctl_private[ - CTL_PRIV_BACKEND_LUN].ptr; - - memcpy(&lbalen, io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes, - sizeof(lbalen)); - io->scsiio.be_move_done = ctl_backend_ramdisk_move_done; - io->scsiio.kern_total_len = lbalen.len * ctl_be_lun->blocksize; - io->scsiio.kern_rel_offset = 0; - io->scsiio.kern_data_resid = 0; ctl_backend_ramdisk_continue(io); - return (CTL_RETVAL_COMPLETE); } @@ -328,6 +316,8 @@ ctl_backend_ramdisk_continue(union ctl_i io->scsiio.kern_data_ptr = softc->ramdisk_buffer; #endif /* CTL_RAMDISK_PAGES */ + io->scsiio.be_move_done = ctl_backend_ramdisk_move_done; + io->scsiio.kern_data_resid = 0; io->scsiio.kern_data_len = len_filled; io->scsiio.kern_sg_entries = sg_filled; io->io_hdr.flags |= CTL_FLAG_ALLOCATED; From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 10:42:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 020BE449; Wed, 2 Jul 2014 10:42:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E2628260E; Wed, 2 Jul 2014 10:42:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62Aghe9088427; Wed, 2 Jul 2014 10:42:43 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62AghFg088425; Wed, 2 Jul 2014 10:42:43 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407021042.s62AghFg088425@svn.freebsd.org> From: Alexander Motin Date: Wed, 2 Jul 2014 10:42:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268149 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 10:42:44 -0000 Author: mav Date: Wed Jul 2 10:42:43 2014 New Revision: 268149 URL: http://svnweb.freebsd.org/changeset/base/268149 Log: MFC r267515: Remove memcpy() from ctl_private[] accesses. That union is aligned enough to access data directly. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_backend_block.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Wed Jul 2 10:41:11 2014 (r268148) +++ stable/10/sys/cam/ctl/ctl.c Wed Jul 2 10:42:43 2014 (r268149) @@ -5779,7 +5779,7 @@ int ctl_write_same(struct ctl_scsiio *ctsio) { struct ctl_lun *lun; - struct ctl_lba_len_flags lbalen; + struct ctl_lba_len_flags *lbalen; uint64_t lba; uint32_t num_blocks; int len, retval; @@ -5872,11 +5872,10 @@ ctl_write_same(struct ctl_scsiio *ctsio) return (CTL_RETVAL_COMPLETE); } - lbalen.lba = lba; - lbalen.len = num_blocks; - lbalen.flags = byte2; - memcpy(ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes, &lbalen, - sizeof(lbalen)); + lbalen = (struct ctl_lba_len_flags *)&ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; + lbalen->lba = lba; + lbalen->len = num_blocks; + lbalen->flags = byte2; retval = lun->backend->config_write((union ctl_io *)ctsio); return (retval); @@ -5887,7 +5886,7 @@ ctl_unmap(struct ctl_scsiio *ctsio) { struct ctl_lun *lun; struct scsi_unmap *cdb; - struct ctl_ptr_len_flags ptrlen; + struct ctl_ptr_len_flags *ptrlen; struct scsi_unmap_header *hdr; struct scsi_unmap_desc *buf, *end; uint64_t lba; @@ -5942,11 +5941,10 @@ ctl_unmap(struct ctl_scsiio *ctsio) buf = (struct scsi_unmap_desc *)(hdr + 1); end = buf + len / sizeof(*buf); - ptrlen.ptr = (void *)buf; - ptrlen.len = len; - ptrlen.flags = byte2; - memcpy(ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes, &ptrlen, - sizeof(ptrlen)); + ptrlen = (struct ctl_ptr_len_flags *)&ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; + ptrlen->ptr = (void *)buf; + ptrlen->len = len; + ptrlen->flags = byte2; for (; buf < end; buf++) { lba = scsi_8btou64(buf->lba); @@ -12755,7 +12753,7 @@ ctl_process_done(union ctl_io *io, int h switch (io->io_hdr.io_type) { case CTL_IO_SCSI: { int isread; - struct ctl_lba_len lbalen; + struct ctl_lba_len *lbalen; isread = 0; switch (io->scsiio.cdb[0]) { @@ -12772,12 +12770,12 @@ ctl_process_done(union ctl_io *io, int h case WRITE_VERIFY_10: case WRITE_VERIFY_12: case WRITE_VERIFY_16: - memcpy(&lbalen, io->io_hdr.ctl_private[ - CTL_PRIV_LBA_LEN].bytes, sizeof(lbalen)); + lbalen = (struct ctl_lba_len *) + &io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; if (isread) { lun->stats.ports[targ_port].bytes[CTL_STATS_READ] += - lbalen.len * blocksize; + lbalen->len * blocksize; lun->stats.ports[targ_port].operations[CTL_STATS_READ]++; #ifdef CTL_TIME_IO @@ -12807,7 +12805,7 @@ ctl_process_done(union ctl_io *io, int h #endif /* CTL_TIME_IO */ } else { lun->stats.ports[targ_port].bytes[CTL_STATS_WRITE] += - lbalen.len * blocksize; + lbalen->len * blocksize; lun->stats.ports[targ_port].operations[ CTL_STATS_WRITE]++; Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Wed Jul 2 10:41:11 2014 (r268148) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Wed Jul 2 10:42:43 2014 (r268149) @@ -788,7 +788,7 @@ ctl_be_block_unmap_dev(struct ctl_be_blo { union ctl_io *io; struct ctl_be_block_devdata *dev_data; - struct ctl_ptr_len_flags ptrlen; + struct ctl_ptr_len_flags *ptrlen; struct scsi_unmap_desc *buf, *end; uint64_t len; @@ -802,10 +802,9 @@ ctl_be_block_unmap_dev(struct ctl_be_blo if (beio->io_offset == -1) { beio->io_len = 0; - memcpy(&ptrlen, io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes, - sizeof(ptrlen)); - buf = (struct scsi_unmap_desc *)ptrlen.ptr; - end = buf + ptrlen.len / sizeof(*buf); + ptrlen = (struct ctl_ptr_len_flags *)&io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; + buf = (struct scsi_unmap_desc *)ptrlen->ptr; + end = buf + ptrlen->len / sizeof(*buf); for (; buf < end; buf++) { len = (uint64_t)scsi_4btoul(buf->length) * be_lun->blocksize; @@ -928,7 +927,7 @@ ctl_be_block_cw_dispatch_ws(struct ctl_b { struct ctl_be_block_io *beio; struct ctl_be_block_softc *softc; - struct ctl_lba_len_flags lbalen; + struct ctl_lba_len_flags *lbalen; uint64_t len_left, lba; int i, seglen; uint8_t *buf, *end; @@ -937,11 +936,10 @@ ctl_be_block_cw_dispatch_ws(struct ctl_b beio = io->io_hdr.ctl_private[CTL_PRIV_BACKEND].ptr; softc = be_lun->softc; - memcpy(&lbalen, io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes, - sizeof(lbalen)); + lbalen = (struct ctl_lba_len_flags *)&io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; - if (lbalen.flags & ~(SWS_LBDATA | SWS_UNMAP) || - (lbalen.flags & SWS_UNMAP && be_lun->unmap == NULL)) { + if (lbalen->flags & ~(SWS_LBDATA | SWS_UNMAP) || + (lbalen->flags & SWS_UNMAP && be_lun->unmap == NULL)) { ctl_free_beio(beio); ctl_set_invalid_field(&io->scsiio, /*sks_valid*/ 1, @@ -977,9 +975,9 @@ ctl_be_block_cw_dispatch_ws(struct ctl_b break; } - if (lbalen.flags & SWS_UNMAP) { - beio->io_offset = lbalen.lba * be_lun->blocksize; - beio->io_len = (uint64_t)lbalen.len * be_lun->blocksize; + if (lbalen->flags & SWS_UNMAP) { + beio->io_offset = lbalen->lba * be_lun->blocksize; + beio->io_len = (uint64_t)lbalen->len * be_lun->blocksize; beio->bio_cmd = BIO_DELETE; beio->ds_trans_type = DEVSTAT_FREE; @@ -991,9 +989,9 @@ ctl_be_block_cw_dispatch_ws(struct ctl_b beio->ds_trans_type = DEVSTAT_WRITE; DPRINTF("WRITE SAME at LBA %jx len %u\n", - (uintmax_t)lbalen.lba, lbalen.len); + (uintmax_t)lbalen->lba, lbalen->len); - len_left = (uint64_t)lbalen.len * be_lun->blocksize; + len_left = (uint64_t)lbalen->len * be_lun->blocksize; for (i = 0, lba = 0; i < CTLBLK_MAX_SEGS && len_left > 0; i++) { /* @@ -1014,21 +1012,19 @@ ctl_be_block_cw_dispatch_ws(struct ctl_b end = buf + seglen; for (; buf < end; buf += be_lun->blocksize) { memcpy(buf, io->scsiio.kern_data_ptr, be_lun->blocksize); - if (lbalen.flags & SWS_LBDATA) - scsi_ulto4b(lbalen.lba + lba, buf); + if (lbalen->flags & SWS_LBDATA) + scsi_ulto4b(lbalen->lba + lba, buf); lba++; } } - beio->io_offset = lbalen.lba * be_lun->blocksize; + beio->io_offset = lbalen->lba * be_lun->blocksize; beio->io_len = lba * be_lun->blocksize; /* We can not do all in one run. Correct and schedule rerun. */ if (len_left > 0) { - lbalen.lba += lba; - lbalen.len -= lba; - memcpy(io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes, &lbalen, - sizeof(lbalen)); + lbalen->lba += lba; + lbalen->len -= lba; beio->beio_cont = ctl_be_block_cw_done_ws; } @@ -1041,16 +1037,15 @@ ctl_be_block_cw_dispatch_unmap(struct ct { struct ctl_be_block_io *beio; struct ctl_be_block_softc *softc; - struct ctl_ptr_len_flags ptrlen; + struct ctl_ptr_len_flags *ptrlen; DPRINTF("entered\n"); beio = io->io_hdr.ctl_private[CTL_PRIV_BACKEND].ptr; softc = be_lun->softc; - memcpy(&ptrlen, io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes, - sizeof(ptrlen)); + ptrlen = (struct ctl_ptr_len_flags *)&io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; - if (ptrlen.flags != 0 || be_lun->unmap == NULL) { + if (ptrlen->flags != 0 || be_lun->unmap == NULL) { ctl_free_beio(beio); ctl_set_invalid_field(&io->scsiio, /*sks_valid*/ 0, @@ -1092,8 +1087,7 @@ ctl_be_block_cw_dispatch_unmap(struct ct beio->bio_cmd = BIO_DELETE; beio->ds_trans_type = DEVSTAT_FREE; - DPRINTF("WRITE SAME at LBA %jx len %u\n", - (uintmax_t)lbalen.lba, lbalen.len); + DPRINTF("UNMAP\n"); be_lun->unmap(be_lun, beio); } @@ -1188,7 +1182,7 @@ ctl_be_block_dispatch(struct ctl_be_bloc { struct ctl_be_block_io *beio; struct ctl_be_block_softc *softc; - struct ctl_lba_len lbalen; + struct ctl_lba_len *lbalen; uint64_t len_left, lbaoff; int i; @@ -1248,14 +1242,13 @@ ctl_be_block_dispatch(struct ctl_be_bloc beio->ds_trans_type = DEVSTAT_WRITE; } - memcpy(&lbalen, io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes, - sizeof(lbalen)); + lbalen = (struct ctl_lba_len *)&io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; DPRINTF("%s at LBA %jx len %u @%ju\n", (beio->bio_cmd == BIO_READ) ? "READ" : "WRITE", - (uintmax_t)lbalen.lba, lbalen.len, lbaoff); + (uintmax_t)lbalen->lba, lbalen->len, lbaoff); lbaoff = io->scsiio.kern_rel_offset / be_lun->blocksize; - beio->io_offset = (lbalen.lba + lbaoff) * be_lun->blocksize; - beio->io_len = MIN((lbalen.len - lbaoff) * be_lun->blocksize, + beio->io_offset = (lbalen->lba + lbaoff) * be_lun->blocksize; + beio->io_len = MIN((lbalen->len - lbaoff) * be_lun->blocksize, CTLBLK_MAX_IO_SIZE); beio->io_len -= beio->io_len % be_lun->blocksize; From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 10:43:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A84EE58C; Wed, 2 Jul 2014 10:43:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 94B5B2619; Wed, 2 Jul 2014 10:43:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62Ahs6Z088636; Wed, 2 Jul 2014 10:43:54 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62AhsS8088634; Wed, 2 Jul 2014 10:43:54 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407021043.s62AhsS8088634@svn.freebsd.org> From: Alexander Motin Date: Wed, 2 Jul 2014 10:43:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268150 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 10:43:54 -0000 Author: mav Date: Wed Jul 2 10:43:53 2014 New Revision: 268150 URL: http://svnweb.freebsd.org/changeset/base/268150 Log: MFC r267519: Make backends track completion by processed number of sectors instead of total transfer size. Commands such as VERIFY or COMPARE AND WRITE may have transfer size not matching directly to number of sectors. Modified: stable/10/sys/cam/ctl/ctl_backend_block.c stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Wed Jul 2 10:42:43 2014 (r268149) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Wed Jul 2 10:43:53 2014 (r268150) @@ -105,6 +105,9 @@ __FBSDID("$FreeBSD$"); #define DPRINTF(fmt, args...) do {} while(0) #endif +#define PRIV(io) \ + ((struct ctl_ptr_len_flags *)&(io)->io_hdr.ctl_private[CTL_PRIV_BACKEND]) + SDT_PROVIDER_DEFINE(cbb); typedef enum { @@ -358,9 +361,7 @@ ctl_be_block_move_done(union ctl_io *io) struct bintime cur_bt; #endif - beio = (struct ctl_be_block_io *) - io->io_hdr.ctl_private[CTL_PRIV_BACKEND].ptr; - + beio = (struct ctl_be_block_io *)PRIV(io)->ptr; be_lun = beio->lun; DPRINTF("entered\n"); @@ -934,7 +935,7 @@ ctl_be_block_cw_dispatch_ws(struct ctl_b DPRINTF("entered\n"); - beio = io->io_hdr.ctl_private[CTL_PRIV_BACKEND].ptr; + beio = (struct ctl_be_block_io *)PRIV(io)->ptr; softc = be_lun->softc; lbalen = (struct ctl_lba_len_flags *)&io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; @@ -1041,7 +1042,7 @@ ctl_be_block_cw_dispatch_unmap(struct ct DPRINTF("entered\n"); - beio = io->io_hdr.ctl_private[CTL_PRIV_BACKEND].ptr; + beio = (struct ctl_be_block_io *)PRIV(io)->ptr; softc = be_lun->softc; ptrlen = (struct ctl_ptr_len_flags *)&io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; @@ -1116,7 +1117,7 @@ ctl_be_block_cw_dispatch(struct ctl_be_b beio->io = io; beio->lun = be_lun; beio->beio_cont = ctl_be_block_cw_done; - io->io_hdr.ctl_private[CTL_PRIV_BACKEND].ptr = beio; + PRIV(io)->ptr = (void *)beio; switch (io->scsiio.cdb[0]) { case SYNCHRONIZE_CACHE: @@ -1183,7 +1184,8 @@ ctl_be_block_dispatch(struct ctl_be_bloc struct ctl_be_block_io *beio; struct ctl_be_block_softc *softc; struct ctl_lba_len *lbalen; - uint64_t len_left, lbaoff; + struct ctl_ptr_len_flags *bptrlen; + uint64_t len_left, lbas; int i; softc = be_lun->softc; @@ -1199,7 +1201,8 @@ ctl_be_block_dispatch(struct ctl_be_bloc beio = ctl_alloc_beio(softc); beio->io = io; beio->lun = be_lun; - io->io_hdr.ctl_private[CTL_PRIV_BACKEND].ptr = beio; + bptrlen = PRIV(io); + bptrlen->ptr = (void *)beio; /* * If the I/O came down with an ordered or head of queue tag, set @@ -1245,12 +1248,12 @@ ctl_be_block_dispatch(struct ctl_be_bloc lbalen = (struct ctl_lba_len *)&io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; DPRINTF("%s at LBA %jx len %u @%ju\n", (beio->bio_cmd == BIO_READ) ? "READ" : "WRITE", - (uintmax_t)lbalen->lba, lbalen->len, lbaoff); - lbaoff = io->scsiio.kern_rel_offset / be_lun->blocksize; - beio->io_offset = (lbalen->lba + lbaoff) * be_lun->blocksize; - beio->io_len = MIN((lbalen->len - lbaoff) * be_lun->blocksize, - CTLBLK_MAX_IO_SIZE); - beio->io_len -= beio->io_len % be_lun->blocksize; + (uintmax_t)lbalen->lba, lbalen->len, bptrlen->len); + lbas = MIN(lbalen->len - bptrlen->len, + CTLBLK_MAX_IO_SIZE / be_lun->blocksize); + beio->io_offset = (lbalen->lba + bptrlen->len) * be_lun->blocksize; + beio->io_len = lbas * be_lun->blocksize; + bptrlen->len += lbas; for (i = 0, len_left = beio->io_len; len_left > 0; i++) { KASSERT(i < CTLBLK_MAX_SEGS, ("Too many segs (%d >= %d)", @@ -1268,8 +1271,7 @@ ctl_be_block_dispatch(struct ctl_be_bloc beio->num_segs++; len_left -= beio->sg_segs[i].len; } - if (io->scsiio.kern_rel_offset + beio->io_len < - io->scsiio.kern_total_len) + if (bptrlen->len < lbalen->len) beio->beio_cont = ctl_be_block_next; io->scsiio.be_move_done = ctl_be_block_move_done; io->scsiio.kern_data_ptr = (uint8_t *)beio->sg_segs; @@ -1320,8 +1322,7 @@ ctl_be_block_worker(void *context, int p mtx_unlock(&be_lun->lock); - beio = (struct ctl_be_block_io *) - io->io_hdr.ctl_private[CTL_PRIV_BACKEND].ptr; + beio = (struct ctl_be_block_io *)PRIV(io)->ptr; be_lun->dispatch(be_lun, beio); @@ -1393,6 +1394,8 @@ ctl_be_block_submit(union ctl_io *io) KASSERT(io->io_hdr.io_type == CTL_IO_SCSI, ("Non-SCSI I/O (type " "%#x) encountered", io->io_hdr.io_type)); + PRIV(io)->len = 0; + mtx_lock(&be_lun->lock); /* * XXX KDM make sure that links is okay to use at this point. Modified: stable/10/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Wed Jul 2 10:42:43 2014 (r268149) +++ stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Wed Jul 2 10:43:53 2014 (r268150) @@ -241,7 +241,7 @@ ctl_backend_ramdisk_move_done(union ctl_ if ((io->io_hdr.port_status == 0) && ((io->io_hdr.flags & CTL_FLAG_ABORT) == 0) && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)) { - if (io->scsiio.kern_rel_offset < io->scsiio.kern_total_len) { + if (io->io_hdr.ctl_private[CTL_PRIV_BACKEND].integer > 0) { mtx_lock(&be_lun->lock); STAILQ_INSERT_TAIL(&be_lun->cont_queue, &io->io_hdr, links); @@ -274,7 +274,14 @@ ctl_backend_ramdisk_move_done(union ctl_ static int ctl_backend_ramdisk_submit(union ctl_io *io) { + struct ctl_be_lun *ctl_be_lun; + struct ctl_lba_len *lbalen; + ctl_be_lun = (struct ctl_be_lun *)io->io_hdr.ctl_private[ + CTL_PRIV_BACKEND_LUN].ptr; + lbalen = (struct ctl_lba_len *)&io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; + io->io_hdr.ctl_private[CTL_PRIV_BACKEND].integer = + lbalen->len * ctl_be_lun->blocksize; ctl_backend_ramdisk_continue(io); return (CTL_RETVAL_COMPLETE); } @@ -290,7 +297,7 @@ ctl_backend_ramdisk_continue(union ctl_i #endif softc = &rd_softc; - len = io->scsiio.kern_total_len - io->scsiio.kern_rel_offset; + len = io->io_hdr.ctl_private[CTL_PRIV_BACKEND].integer; #ifdef CTL_RAMDISK_PAGES sg_filled = min(btoc(len), softc->num_pages); if (sg_filled > 1) { @@ -321,6 +328,7 @@ ctl_backend_ramdisk_continue(union ctl_i io->scsiio.kern_data_len = len_filled; io->scsiio.kern_sg_entries = sg_filled; io->io_hdr.flags |= CTL_FLAG_ALLOCATED; + io->io_hdr.ctl_private[CTL_PRIV_BACKEND].integer -= len_filled; #ifdef CTL_TIME_IO getbintime(&io->io_hdr.dma_start_bt); #endif From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 10:45:34 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 705C8786; Wed, 2 Jul 2014 10:45:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C560263A; Wed, 2 Jul 2014 10:45:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62AjYgd089059; Wed, 2 Jul 2014 10:45:34 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62AjWkZ089046; Wed, 2 Jul 2014 10:45:32 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407021045.s62AjWkZ089046@svn.freebsd.org> From: Alexander Motin Date: Wed, 2 Jul 2014 10:45:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268151 - in stable/10/sys/cam: ctl scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 10:45:34 -0000 Author: mav Date: Wed Jul 2 10:45:31 2014 New Revision: 268151 URL: http://svnweb.freebsd.org/changeset/base/268151 Log: MFC r267537: Add support for VERIFY(10/12/16) and COMPARE AND WRITE SCSI commands. Make data_submit backends method support not only read and write requests, but also two new ones: verify and compare. Verify just checks readability of the data in specified location without transferring them outside. Compare reads the specified data and compares them to received data, returning error if they are different. VERIFY(10/12/16) commands request either verify or compare from backend, depending on BYTCHK CDB field. COMPARE AND WRITE command executed in two stages: first it requests compare, and then, if succeesed, requests write. Atomicity of operation is guarantied by CTL request ordering code. Sponsored by: iXsystems, Inc. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl.h stable/10/sys/cam/ctl/ctl_backend_block.c stable/10/sys/cam/ctl/ctl_backend_ramdisk.c stable/10/sys/cam/ctl/ctl_cmd_table.c stable/10/sys/cam/ctl/ctl_io.h stable/10/sys/cam/ctl/ctl_private.h stable/10/sys/cam/scsi/scsi_all.c stable/10/sys/cam/scsi/scsi_all.h stable/10/sys/cam/scsi/scsi_da.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Wed Jul 2 10:43:53 2014 (r268150) +++ stable/10/sys/cam/ctl/ctl.c Wed Jul 2 10:45:31 2014 (r268151) @@ -4996,6 +4996,30 @@ bailout: /* * This gets called by a backend driver when it is done with a + * data_submit method. + */ +void +ctl_data_submit_done(union ctl_io *io) +{ + /* + * If the IO_CONT flag is set, we need to call the supplied + * function to continue processing the I/O, instead of completing + * the I/O just yet. + * + * If there is an error, though, we don't want to keep processing. + * Instead, just send status back to the initiator. + */ + if ((io->io_hdr.flags & CTL_FLAG_IO_CONT) + && (((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE) + || ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS))) { + io->scsiio.io_cont(io); + return; + } + ctl_done(io); +} + +/* + * This gets called by a backend driver when it is done with a * configuration write. */ void @@ -8582,7 +8606,7 @@ int ctl_read_write(struct ctl_scsiio *ctsio) { struct ctl_lun *lun; - struct ctl_lba_len lbalen; + struct ctl_lba_len_flags *lbalen; uint64_t lba; uint32_t num_blocks; int reladdr, fua, dpo, ebp; @@ -8793,10 +8817,11 @@ ctl_read_write(struct ctl_scsiio *ctsio) return (CTL_RETVAL_COMPLETE); } - lbalen.lba = lba; - lbalen.len = num_blocks; - memcpy(ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes, &lbalen, - sizeof(lbalen)); + lbalen = (struct ctl_lba_len_flags *) + &ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; + lbalen->lba = lba; + lbalen->len = num_blocks; + lbalen->flags = isread ? CTL_LLF_READ : CTL_LLF_WRITE; ctsio->kern_total_len = num_blocks * lun->be_lun->blocksize; ctsio->kern_rel_offset = 0; @@ -8808,6 +8833,228 @@ ctl_read_write(struct ctl_scsiio *ctsio) return (retval); } +static int +ctl_cnw_cont(union ctl_io *io) +{ + struct ctl_scsiio *ctsio; + struct ctl_lun *lun; + struct ctl_lba_len_flags *lbalen; + int retval; + + ctsio = &io->scsiio; + ctsio->io_hdr.status = CTL_STATUS_NONE; + ctsio->io_hdr.flags &= ~CTL_FLAG_IO_CONT; + lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + lbalen = (struct ctl_lba_len_flags *) + &ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; + lbalen->flags = CTL_LLF_WRITE; + + CTL_DEBUG_PRINT(("ctl_cnw_cont: calling data_submit()\n")); + retval = lun->backend->data_submit((union ctl_io *)ctsio); + return (retval); +} + +int +ctl_cnw(struct ctl_scsiio *ctsio) +{ + struct ctl_lun *lun; + struct ctl_lba_len_flags *lbalen; + uint64_t lba; + uint32_t num_blocks; + int fua, dpo; + int retval; + + lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + + CTL_DEBUG_PRINT(("ctl_cnw: command: %#x\n", ctsio->cdb[0])); + + fua = 0; + dpo = 0; + + retval = CTL_RETVAL_COMPLETE; + + switch (ctsio->cdb[0]) { + case COMPARE_AND_WRITE: { + struct scsi_compare_and_write *cdb; + + cdb = (struct scsi_compare_and_write *)ctsio->cdb; + + if (cdb->byte2 & SRW10_FUA) + fua = 1; + if (cdb->byte2 & SRW10_DPO) + dpo = 1; + lba = scsi_8btou64(cdb->addr); + num_blocks = cdb->length; + break; + } + default: + /* + * We got a command we don't support. This shouldn't + * happen, commands should be filtered out above us. + */ + ctl_set_invalid_opcode(ctsio); + ctl_done((union ctl_io *)ctsio); + + return (CTL_RETVAL_COMPLETE); + break; /* NOTREACHED */ + } + + /* + * XXX KDM what do we do with the DPO and FUA bits? FUA might be + * interesting for us, but if RAIDCore is in write-back mode, + * getting it to do write-through for a particular transaction may + * not be possible. + */ + + /* + * The first check is to make sure we're in bounds, the second + * check is to catch wrap-around problems. If the lba + num blocks + * is less than the lba, then we've wrapped around and the block + * range is invalid anyway. + */ + if (((lba + num_blocks) > (lun->be_lun->maxlba + 1)) + || ((lba + num_blocks) < lba)) { + ctl_set_lba_out_of_range(ctsio); + ctl_done((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); + } + + /* + * According to SBC-3, a transfer length of 0 is not an error. + */ + if (num_blocks == 0) { + ctl_set_success(ctsio); + ctl_done((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); + } + + ctsio->kern_total_len = 2 * num_blocks * lun->be_lun->blocksize; + ctsio->kern_rel_offset = 0; + + /* + * Set the IO_CONT flag, so that if this I/O gets passed to + * ctl_data_submit_done(), it'll get passed back to + * ctl_ctl_cnw_cont() for further processing. + */ + ctsio->io_hdr.flags |= CTL_FLAG_IO_CONT; + ctsio->io_cont = ctl_cnw_cont; + + lbalen = (struct ctl_lba_len_flags *) + &ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; + lbalen->lba = lba; + lbalen->len = num_blocks; + lbalen->flags = CTL_LLF_COMPARE; + + CTL_DEBUG_PRINT(("ctl_cnw: calling data_submit()\n")); + retval = lun->backend->data_submit((union ctl_io *)ctsio); + return (retval); +} + +int +ctl_verify(struct ctl_scsiio *ctsio) +{ + struct ctl_lun *lun; + struct ctl_lba_len_flags *lbalen; + uint64_t lba; + uint32_t num_blocks; + int bytchk, dpo; + int retval; + + lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + + CTL_DEBUG_PRINT(("ctl_verify: command: %#x\n", ctsio->cdb[0])); + + bytchk = 0; + dpo = 0; + retval = CTL_RETVAL_COMPLETE; + + switch (ctsio->cdb[0]) { + case VERIFY_10: { + struct scsi_verify_10 *cdb; + + cdb = (struct scsi_verify_10 *)ctsio->cdb; + if (cdb->byte2 & SVFY_BYTCHK) + bytchk = 1; + if (cdb->byte2 & SVFY_DPO) + dpo = 1; + lba = scsi_4btoul(cdb->addr); + num_blocks = scsi_2btoul(cdb->length); + break; + } + case VERIFY_12: { + struct scsi_verify_12 *cdb; + + cdb = (struct scsi_verify_12 *)ctsio->cdb; + if (cdb->byte2 & SVFY_BYTCHK) + bytchk = 1; + if (cdb->byte2 & SVFY_DPO) + dpo = 1; + lba = scsi_4btoul(cdb->addr); + num_blocks = scsi_4btoul(cdb->length); + break; + } + case VERIFY_16: { + struct scsi_rw_16 *cdb; + + cdb = (struct scsi_rw_16 *)ctsio->cdb; + if (cdb->byte2 & SVFY_BYTCHK) + bytchk = 1; + if (cdb->byte2 & SVFY_DPO) + dpo = 1; + lba = scsi_8btou64(cdb->addr); + num_blocks = scsi_4btoul(cdb->length); + break; + } + default: + /* + * We got a command we don't support. This shouldn't + * happen, commands should be filtered out above us. + */ + ctl_set_invalid_opcode(ctsio); + ctl_done((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); + } + + /* + * The first check is to make sure we're in bounds, the second + * check is to catch wrap-around problems. If the lba + num blocks + * is less than the lba, then we've wrapped around and the block + * range is invalid anyway. + */ + if (((lba + num_blocks) > (lun->be_lun->maxlba + 1)) + || ((lba + num_blocks) < lba)) { + ctl_set_lba_out_of_range(ctsio); + ctl_done((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); + } + + /* + * According to SBC-3, a transfer length of 0 is not an error. + */ + if (num_blocks == 0) { + ctl_set_success(ctsio); + ctl_done((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); + } + + lbalen = (struct ctl_lba_len_flags *) + &ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; + lbalen->lba = lba; + lbalen->len = num_blocks; + if (bytchk) { + lbalen->flags = CTL_LLF_COMPARE; + ctsio->kern_total_len = num_blocks * lun->be_lun->blocksize; + } else { + lbalen->flags = CTL_LLF_VERIFY; + ctsio->kern_total_len = 0; + } + ctsio->kern_rel_offset = 0; + + CTL_DEBUG_PRINT(("ctl_verify: calling data_submit()\n")); + retval = lun->backend->data_submit((union ctl_io *)ctsio); + return (retval); +} + int ctl_report_luns(struct ctl_scsiio *ctsio) { @@ -9526,6 +9773,7 @@ ctl_inquiry_evpd_block_limits(struct ctl bl_ptr->page_code = SVPD_BLOCK_LIMITS; scsi_ulto2b(sizeof(*bl_ptr), bl_ptr->page_length); + bl_ptr->max_cmp_write_len = 0xff; scsi_ulto4b(0xffffffff, bl_ptr->max_txfer_len); scsi_ulto4b(MAXPHYS / bs, bl_ptr->opt_txfer_len); if (lun->be_lun->flags & CTL_LUN_FLAG_UNMAP) { @@ -9937,6 +10185,15 @@ ctl_get_lba_len(union ctl_io *io, uint64 return (1); switch (io->scsiio.cdb[0]) { + case COMPARE_AND_WRITE: { + struct scsi_compare_and_write *cdb; + + cdb = (struct scsi_compare_and_write *)io->scsiio.cdb; + + *lba = scsi_8btou64(cdb->addr); + *len = cdb->length; + break; + } case READ_6: case WRITE_6: { struct scsi_rw_6 *cdb; @@ -10025,6 +10282,33 @@ ctl_get_lba_len(union ctl_io *io, uint64 *len = scsi_4btoul(cdb->length); break; } + case VERIFY_10: { + struct scsi_verify_10 *cdb; + + cdb = (struct scsi_verify_10 *)io->scsiio.cdb; + + *lba = scsi_4btoul(cdb->addr); + *len = scsi_2btoul(cdb->length); + break; + } + case VERIFY_12: { + struct scsi_verify_12 *cdb; + + cdb = (struct scsi_verify_12 *)io->scsiio.cdb; + + *lba = scsi_4btoul(cdb->addr); + *len = scsi_4btoul(cdb->length); + break; + } + case VERIFY_16: { + struct scsi_verify_16 *cdb; + + cdb = (struct scsi_verify_16 *)io->scsiio.cdb; + + *lba = scsi_8btou64(cdb->addr); + *len = scsi_4btoul(cdb->length); + break; + } default: return (1); break; /* NOTREACHED */ @@ -12753,7 +13037,7 @@ ctl_process_done(union ctl_io *io, int h switch (io->io_hdr.io_type) { case CTL_IO_SCSI: { int isread; - struct ctl_lba_len *lbalen; + struct ctl_lba_len_flags *lbalen; isread = 0; switch (io->scsiio.cdb[0]) { @@ -12770,7 +13054,7 @@ ctl_process_done(union ctl_io *io, int h case WRITE_VERIFY_10: case WRITE_VERIFY_12: case WRITE_VERIFY_16: - lbalen = (struct ctl_lba_len *) + lbalen = (struct ctl_lba_len_flags *) &io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; if (isread) { Modified: stable/10/sys/cam/ctl/ctl.h ============================================================================== --- stable/10/sys/cam/ctl/ctl.h Wed Jul 2 10:43:53 2014 (r268150) +++ stable/10/sys/cam/ctl/ctl.h Wed Jul 2 10:45:31 2014 (r268151) @@ -195,6 +195,7 @@ int ctl_debugconf_sp_select_handler(stru int ctl_config_move_done(union ctl_io *io); void ctl_datamove(union ctl_io *io); void ctl_done(union ctl_io *io); +void ctl_data_submit_done(union ctl_io *io); void ctl_config_write_done(union ctl_io *io); #if 0 int ctl_thread(void *arg); Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Wed Jul 2 10:43:53 2014 (r268150) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Wed Jul 2 10:45:31 2014 (r268151) @@ -94,9 +94,11 @@ __FBSDID("$FreeBSD$"); * The idea here is that we'll allocate enough S/G space to hold a 1MB * I/O. If we get an I/O larger than that, we'll split it. */ -#define CTLBLK_MAX_IO_SIZE (1024 * 1024) +#define CTLBLK_HALF_IO_SIZE (512 * 1024) +#define CTLBLK_MAX_IO_SIZE (CTLBLK_HALF_IO_SIZE * 2) #define CTLBLK_MAX_SEG MAXPHYS -#define CTLBLK_MAX_SEGS MAX(CTLBLK_MAX_IO_SIZE / CTLBLK_MAX_SEG, 1) +#define CTLBLK_HALF_SEGS MAX(CTLBLK_HALF_IO_SIZE / CTLBLK_MAX_SEG, 1) +#define CTLBLK_MAX_SEGS (CTLBLK_HALF_SEGS * 2) #ifdef CTLBLK_DEBUG #define DPRINTF(fmt, args...) \ @@ -107,6 +109,8 @@ __FBSDID("$FreeBSD$"); #define PRIV(io) \ ((struct ctl_ptr_len_flags *)&(io)->io_hdr.ctl_private[CTL_PRIV_BACKEND]) +#define ARGS(io) \ + ((struct ctl_lba_len_flags *)&(io)->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]) SDT_PROVIDER_DEFINE(cbb); @@ -314,6 +318,13 @@ ctl_free_beio(struct ctl_be_block_io *be uma_zfree(beio->lun->lun_zone, beio->sg_segs[i].addr); beio->sg_segs[i].addr = NULL; + + /* For compare we had two equal S/G lists. */ + if (ARGS(beio->io)->flags & CTL_LLF_COMPARE) { + uma_zfree(beio->lun->lun_zone, + beio->sg_segs[i + CTLBLK_HALF_SEGS].addr); + beio->sg_segs[i + CTLBLK_HALF_SEGS].addr = NULL; + } } if (duplicate_free > 0) { @@ -348,7 +359,7 @@ ctl_complete_beio(struct ctl_be_block_io beio->beio_cont(beio); } else { ctl_free_beio(beio); - ctl_done(io); + ctl_data_submit_done(io); } } @@ -357,9 +368,11 @@ ctl_be_block_move_done(union ctl_io *io) { struct ctl_be_block_io *beio; struct ctl_be_block_lun *be_lun; + struct ctl_lba_len_flags *lbalen; #ifdef CTL_TIME_IO struct bintime cur_bt; -#endif +#endif + int i; beio = (struct ctl_be_block_io *)PRIV(io)->ptr; be_lun = beio->lun; @@ -372,16 +385,37 @@ ctl_be_block_move_done(union ctl_io *io) bintime_add(&io->io_hdr.dma_bt, &cur_bt); io->io_hdr.num_dmas++; #endif + io->scsiio.kern_rel_offset += io->scsiio.kern_data_len; /* * We set status at this point for read commands, and write * commands with errors. */ - if ((beio->bio_cmd == BIO_READ) - && (io->io_hdr.port_status == 0) - && ((io->io_hdr.flags & CTL_FLAG_ABORT) == 0) - && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)) - ctl_set_success(&io->scsiio); + if ((io->io_hdr.port_status == 0) && + ((io->io_hdr.flags & CTL_FLAG_ABORT) == 0) && + ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)) { + lbalen = ARGS(beio->io); + if (lbalen->flags & CTL_LLF_READ) { + ctl_set_success(&io->scsiio); + } else if (lbalen->flags & CTL_LLF_COMPARE) { + /* We have two data blocks ready for comparison. */ + for (i = 0; i < beio->num_segs; i++) { + if (memcmp(beio->sg_segs[i].addr, + beio->sg_segs[i + CTLBLK_HALF_SEGS].addr, + beio->sg_segs[i].len) != 0) + break; + } + if (i < beio->num_segs) + ctl_set_sense(&io->scsiio, + /*current_error*/ 1, + /*sense_key*/ SSD_KEY_MISCOMPARE, + /*asc*/ 0x1D, + /*ascq*/ 0x00, + SSD_ELEM_NONE); + else + ctl_set_success(&io->scsiio); + } + } else if ((io->io_hdr.port_status != 0) && ((io->io_hdr.flags & CTL_FLAG_ABORT) == 0) && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)) { @@ -493,12 +527,13 @@ ctl_be_block_biodone(struct bio *bio) } /* - * If this is a write, a flush or a delete, we're all done. + * If this is a write, a flush, a delete or verify, we're all done. * If this is a read, we can now send the data to the user. */ if ((beio->bio_cmd == BIO_WRITE) || (beio->bio_cmd == BIO_FLUSH) - || (beio->bio_cmd == BIO_DELETE)) { + || (beio->bio_cmd == BIO_DELETE) + || (ARGS(io)->flags & CTL_LLF_VERIFY)) { ctl_set_success(&io->scsiio); ctl_complete_beio(beio); } else { @@ -574,18 +609,14 @@ ctl_be_block_dispatch_file(struct ctl_be io = beio->io; flags = beio->bio_flags; + bzero(&xuio, sizeof(xuio)); if (beio->bio_cmd == BIO_READ) { SDT_PROBE(cbb, kernel, read, file_start, 0, 0, 0, 0, 0); + xuio.uio_rw = UIO_READ; } else { SDT_PROBE(cbb, kernel, write, file_start, 0, 0, 0, 0, 0); - } - - bzero(&xuio, sizeof(xuio)); - if (beio->bio_cmd == BIO_READ) - xuio.uio_rw = UIO_READ; - else xuio.uio_rw = UIO_WRITE; - + } xuio.uio_offset = beio->io_offset; xuio.uio_resid = beio->io_len; xuio.uio_segflg = UIO_SYSSPACE; @@ -628,6 +659,7 @@ ctl_be_block_dispatch_file(struct ctl_be (IO_DIRECT|IO_SYNC) : 0, file_data->cred); VOP_UNLOCK(be_lun->vn, 0); + SDT_PROBE(cbb, kernel, read, file_done, 0, 0, 0, 0, 0); } else { struct mount *mountpoint; int lock_flags; @@ -669,6 +701,7 @@ ctl_be_block_dispatch_file(struct ctl_be VOP_UNLOCK(be_lun->vn, 0); vn_finished_write(mountpoint); + SDT_PROBE(cbb, kernel, write, file_done, 0, 0, 0, 0, 0); } /* @@ -695,12 +728,10 @@ ctl_be_block_dispatch_file(struct ctl_be * If this is a write, we're all done. * If this is a read, we can now send the data to the user. */ - if (beio->bio_cmd == BIO_WRITE) { + if (ARGS(io)->flags & (CTL_LLF_WRITE | CTL_LLF_VERIFY)) { ctl_set_success(&io->scsiio); - SDT_PROBE(cbb, kernel, write, file_done, 0, 0, 0, 0, 0); ctl_complete_beio(beio); } else { - SDT_PROBE(cbb, kernel, read, file_done, 0, 0, 0, 0, 0); #ifdef CTL_TIME_IO getbintime(&io->io_hdr.dma_start_bt); #endif @@ -937,7 +968,7 @@ ctl_be_block_cw_dispatch_ws(struct ctl_b beio = (struct ctl_be_block_io *)PRIV(io)->ptr; softc = be_lun->softc; - lbalen = (struct ctl_lba_len_flags *)&io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; + lbalen = ARGS(beio->io); if (lbalen->flags & ~(SWS_LBDATA | SWS_UNMAP) || (lbalen->flags & SWS_UNMAP && be_lun->unmap == NULL)) { @@ -1157,11 +1188,10 @@ ctl_be_block_next(struct ctl_be_block_io ctl_free_beio(beio); if (((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE) && ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS)) { - ctl_done(io); + ctl_data_submit_done(io); return; } - io->scsiio.kern_rel_offset += io->scsiio.kern_data_len; io->io_hdr.status &= ~CTL_STATUS_MASK; io->io_hdr.status |= CTL_STATUS_NONE; @@ -1183,7 +1213,7 @@ ctl_be_block_dispatch(struct ctl_be_bloc { struct ctl_be_block_io *beio; struct ctl_be_block_softc *softc; - struct ctl_lba_len *lbalen; + struct ctl_lba_len_flags *lbalen; struct ctl_ptr_len_flags *bptrlen; uint64_t len_left, lbas; int i; @@ -1192,10 +1222,11 @@ ctl_be_block_dispatch(struct ctl_be_bloc DPRINTF("entered\n"); - if ((io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_IN) { - SDT_PROBE(cbb, kernel, read, start, 0, 0, 0, 0, 0); - } else { + lbalen = ARGS(io); + if (lbalen->flags & CTL_LLF_WRITE) { SDT_PROBE(cbb, kernel, write, start, 0, 0, 0, 0, 0); + } else { + SDT_PROBE(cbb, kernel, read, start, 0, 0, 0, 0, 0); } beio = ctl_alloc_beio(softc); @@ -1233,24 +1264,22 @@ ctl_be_block_dispatch(struct ctl_be_bloc break; } - /* - * This path handles read and write only. The config write path - * handles flush operations. - */ - if ((io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_IN) { - beio->bio_cmd = BIO_READ; - beio->ds_trans_type = DEVSTAT_READ; - } else { + if (lbalen->flags & CTL_LLF_WRITE) { beio->bio_cmd = BIO_WRITE; beio->ds_trans_type = DEVSTAT_WRITE; + } else { + beio->bio_cmd = BIO_READ; + beio->ds_trans_type = DEVSTAT_READ; } - lbalen = (struct ctl_lba_len *)&io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; DPRINTF("%s at LBA %jx len %u @%ju\n", (beio->bio_cmd == BIO_READ) ? "READ" : "WRITE", (uintmax_t)lbalen->lba, lbalen->len, bptrlen->len); - lbas = MIN(lbalen->len - bptrlen->len, - CTLBLK_MAX_IO_SIZE / be_lun->blocksize); + if (lbalen->flags & CTL_LLF_COMPARE) + lbas = CTLBLK_HALF_IO_SIZE; + else + lbas = CTLBLK_MAX_IO_SIZE; + lbas = MIN(lbalen->len - bptrlen->len, lbas / be_lun->blocksize); beio->io_offset = (lbalen->lba + bptrlen->len) * be_lun->blocksize; beio->io_len = lbas * be_lun->blocksize; bptrlen->len += lbas; @@ -1268,13 +1297,25 @@ ctl_be_block_dispatch(struct ctl_be_bloc DPRINTF("segment %d addr %p len %zd\n", i, beio->sg_segs[i].addr, beio->sg_segs[i].len); + /* Set up second segment for compare operation. */ + if (lbalen->flags & CTL_LLF_COMPARE) { + beio->sg_segs[i + CTLBLK_HALF_SEGS].len = + beio->sg_segs[i].len; + beio->sg_segs[i + CTLBLK_HALF_SEGS].addr = + uma_zalloc(be_lun->lun_zone, M_WAITOK); + } + beio->num_segs++; len_left -= beio->sg_segs[i].len; } if (bptrlen->len < lbalen->len) beio->beio_cont = ctl_be_block_next; io->scsiio.be_move_done = ctl_be_block_move_done; - io->scsiio.kern_data_ptr = (uint8_t *)beio->sg_segs; + /* For compare we have separate S/G lists for read and datamove. */ + if (lbalen->flags & CTL_LLF_COMPARE) + io->scsiio.kern_data_ptr = (uint8_t *)&beio->sg_segs[CTLBLK_HALF_SEGS]; + else + io->scsiio.kern_data_ptr = (uint8_t *)beio->sg_segs; io->scsiio.kern_data_len = beio->io_len; io->scsiio.kern_data_resid = 0; io->scsiio.kern_sg_entries = beio->num_segs; Modified: stable/10/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Wed Jul 2 10:43:53 2014 (r268150) +++ stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Wed Jul 2 10:45:31 2014 (r268151) @@ -267,7 +267,7 @@ ctl_backend_ramdisk_move_done(union ctl_ /*retry_count*/ io->io_hdr.port_status); } - ctl_done(io); + ctl_data_submit_done(io); return(0); } @@ -275,11 +275,16 @@ static int ctl_backend_ramdisk_submit(union ctl_io *io) { struct ctl_be_lun *ctl_be_lun; - struct ctl_lba_len *lbalen; + struct ctl_lba_len_flags *lbalen; ctl_be_lun = (struct ctl_be_lun *)io->io_hdr.ctl_private[ CTL_PRIV_BACKEND_LUN].ptr; - lbalen = (struct ctl_lba_len *)&io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; + lbalen = (struct ctl_lba_len_flags *)&io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; + if (lbalen->flags & CTL_LLF_VERIFY) { + ctl_set_success(&io->scsiio); + ctl_data_submit_done(io); + return (CTL_RETVAL_COMPLETE); + } io->io_hdr.ctl_private[CTL_PRIV_BACKEND].integer = lbalen->len * ctl_be_lun->blocksize; ctl_backend_ramdisk_continue(io); Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_cmd_table.c Wed Jul 2 10:43:53 2014 (r268150) +++ stable/10/sys/cam/ctl/ctl_cmd_table.c Wed Jul 2 10:45:31 2014 (r268151) @@ -273,7 +273,10 @@ struct ctl_cmd_entry ctl_cmd_table[] = CTL_LUN_PAT_WRITE | CTL_LUN_PAT_RANGE}, /* 2F VERIFY(10) */ -{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, +{ctl_verify, CTL_SERIDX_READ, CTL_CMD_FLAG_OK_ON_SLUN | + CTL_FLAG_DATA_OUT | + CTL_CMD_FLAG_ALLOW_ON_PR_RESV, + CTL_LUN_PAT_READ | CTL_LUN_PAT_RANGE}, /* 30 SEARCH DATA HIGH(10) */ {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, @@ -591,8 +594,9 @@ struct ctl_cmd_entry ctl_cmd_table[] = CTL_CMD_FLAG_ALLOW_ON_PR_RESV, CTL_LUN_PAT_READ | CTL_LUN_PAT_RANGE}, -/* 89 */ -{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, +/* 89 COMPARE AND WRITE */ +{ctl_cnw, CTL_SERIDX_WRITE, CTL_CMD_FLAG_OK_ON_SLUN| CTL_FLAG_DATA_OUT, + CTL_LUN_PAT_WRITE | CTL_LUN_PAT_RANGE}, /* 8A WRITE(16) */ {ctl_read_write, CTL_SERIDX_WRITE, CTL_CMD_FLAG_OK_ON_SLUN| CTL_FLAG_DATA_OUT, @@ -612,7 +616,10 @@ struct ctl_cmd_entry ctl_cmd_table[] = CTL_LUN_PAT_WRITE | CTL_LUN_PAT_RANGE}, /* 8F VERIFY(16) */ -{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, +{ctl_verify, CTL_SERIDX_READ, CTL_CMD_FLAG_OK_ON_SLUN | + CTL_FLAG_DATA_OUT | + CTL_CMD_FLAG_ALLOW_ON_PR_RESV, + CTL_LUN_PAT_READ | CTL_LUN_PAT_RANGE}, /* 90 PRE-FETCH(16) */ {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, @@ -737,7 +744,10 @@ struct ctl_cmd_entry ctl_cmd_table[] = CTL_LUN_PAT_WRITE | CTL_LUN_PAT_RANGE}, /* AF VERIFY(12) */ -{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, +{ctl_verify, CTL_SERIDX_READ, CTL_CMD_FLAG_OK_ON_SLUN | + CTL_FLAG_DATA_OUT | + CTL_CMD_FLAG_ALLOW_ON_PR_RESV, + CTL_LUN_PAT_READ | CTL_LUN_PAT_RANGE}, /* B0 SEARCH DATA HIGH(12) */ {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, Modified: stable/10/sys/cam/ctl/ctl_io.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_io.h Wed Jul 2 10:43:53 2014 (r268150) +++ stable/10/sys/cam/ctl/ctl_io.h Wed Jul 2 10:45:31 2014 (r268151) @@ -138,6 +138,10 @@ struct ctl_lba_len_flags { uint64_t lba; uint32_t len; uint32_t flags; +#define CTL_LLF_READ 0x10000000 +#define CTL_LLF_WRITE 0x20000000 +#define CTL_LLF_VERIFY 0x40000000 +#define CTL_LLF_COMPARE 0x80000000 }; struct ctl_ptr_len_flags { Modified: stable/10/sys/cam/ctl/ctl_private.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_private.h Wed Jul 2 10:43:53 2014 (r268150) +++ stable/10/sys/cam/ctl/ctl_private.h Wed Jul 2 10:45:31 2014 (r268151) @@ -477,9 +477,11 @@ int ctl_mode_sense(struct ctl_scsiio *ct int ctl_read_capacity(struct ctl_scsiio *ctsio); int ctl_service_action_in(struct ctl_scsiio *ctsio); int ctl_read_write(struct ctl_scsiio *ctsio); +int ctl_cnw(struct ctl_scsiio *ctsio); int ctl_report_luns(struct ctl_scsiio *ctsio); int ctl_request_sense(struct ctl_scsiio *ctsio); int ctl_tur(struct ctl_scsiio *ctsio); +int ctl_verify(struct ctl_scsiio *ctsio); int ctl_inquiry(struct ctl_scsiio *ctsio); int ctl_persistent_reserve_in(struct ctl_scsiio *ctsio); int ctl_persistent_reserve_out(struct ctl_scsiio *ctsio); Modified: stable/10/sys/cam/scsi/scsi_all.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.c Wed Jul 2 10:43:53 2014 (r268150) +++ stable/10/sys/cam/scsi/scsi_all.c Wed Jul 2 10:45:31 2014 (r268151) @@ -471,7 +471,8 @@ static struct op_table_entry scsi_op_cod */ /* 88 MM O O O READ(16) */ { 0x88, D | T | W | O | B, "READ(16)" }, - /* 89 */ + /* 89 O COMPARE AND WRITE*/ + { 0x89, D, "COMPARE AND WRITE" }, /* 8A OM O O O WRITE(16) */ { 0x8A, D | T | W | O | B, "WRITE(16)" }, /* 8B O ORWRITE */ Modified: stable/10/sys/cam/scsi/scsi_all.h ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.h Wed Jul 2 10:43:53 2014 (r268150) +++ stable/10/sys/cam/scsi/scsi_all.h Wed Jul 2 10:45:31 2014 (r268151) @@ -1041,8 +1041,10 @@ struct ata_pass_16 { #define PERSISTENT_RES_OUT 0x5F #define ATA_PASS_16 0x85 #define READ_16 0x88 +#define COMPARE_AND_WRITE 0x89 #define WRITE_16 0x8A #define WRITE_VERIFY_16 0x8E +#define VERIFY_16 0x8F #define SYNCHRONIZE_CACHE_16 0x91 #define WRITE_SAME_16 0x93 #define SERVICE_ACTION_IN 0x9E @@ -1054,6 +1056,7 @@ struct ata_pass_16 { #define READ_12 0xA8 #define WRITE_12 0xAA #define WRITE_VERIFY_12 0xAE +#define VERIFY_12 0xAF #define READ_ELEMENT_STATUS 0xB8 #define READ_CD 0xBE Modified: stable/10/sys/cam/scsi/scsi_da.h ============================================================================== --- stable/10/sys/cam/scsi/scsi_da.h Wed Jul 2 10:43:53 2014 (r268150) +++ stable/10/sys/cam/scsi/scsi_da.h Wed Jul 2 10:45:31 2014 (r268151) @@ -222,18 +222,49 @@ struct scsi_read_format_capacities uint8_t reserved1[3]; }; -struct scsi_verify +struct scsi_verify_10 { - uint8_t opcode; /* VERIFY */ + uint8_t opcode; /* VERIFY(10) */ uint8_t byte2; #define SVFY_LUN_MASK 0xE0 #define SVFY_RELADR 0x01 -#define SVFY_BYTECHK 0x02 +#define SVFY_BYTCHK 0x02 #define SVFY_DPO 0x10 uint8_t addr[4]; /* LBA to begin verification at */ - uint8_t reserved0[1]; - uint8_t len[2]; /* number of blocks to verify */ - uint8_t reserved1[3]; + uint8_t group; + uint8_t length[2]; /* number of blocks to verify */ + uint8_t control; +}; + +struct scsi_verify_12 +{ + uint8_t opcode; /* VERIFY(12) */ + uint8_t byte2; + uint8_t addr[4]; /* LBA to begin verification at */ + uint8_t length[4]; /* number of blocks to verify */ + uint8_t group; + uint8_t control; +}; + +struct scsi_verify_16 +{ + uint8_t opcode; /* VERIFY(16) */ + uint8_t byte2; + uint8_t addr[8]; /* LBA to begin verification at */ + uint8_t length[4]; /* number of blocks to verify */ + uint8_t group; + uint8_t control; +}; + +struct scsi_compare_and_write +{ + uint8_t opcode; /* COMPARE AND WRITE */ + uint8_t byte2; + uint8_t addr[8]; /* LBA to begin verification at */ + uint8_t reserved[3]; + uint8_t length; /* number of blocks */ + uint8_t group; + uint8_t control; }; struct scsi_write_and_verify From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 10:48:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F10228F1; Wed, 2 Jul 2014 10:48:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDF1E2655; Wed, 2 Jul 2014 10:48:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62Am6HL089488; Wed, 2 Jul 2014 10:48:06 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62Am6A2089487; Wed, 2 Jul 2014 10:48:06 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407021048.s62Am6A2089487@svn.freebsd.org> From: Alexander Motin Date: Wed, 2 Jul 2014 10:48:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268152 - stable/10/usr.sbin/ctladm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 10:48:07 -0000 Author: mav Date: Wed Jul 2 10:48:06 2014 New Revision: 268152 URL: http://svnweb.freebsd.org/changeset/base/268152 Log: MFC r267506: Document additional LUN/backend options. Modified: stable/10/usr.sbin/ctladm/ctladm.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctladm/ctladm.8 ============================================================================== --- stable/10/usr.sbin/ctladm/ctladm.8 Wed Jul 2 10:45:31 2014 (r268151) +++ stable/10/usr.sbin/ctladm/ctladm.8 Wed Jul 2 10:48:06 2014 (r268152) @@ -34,7 +34,7 @@ .\" $Id: //depot/users/kenm/FreeBSD-test2/usr.sbin/ctladm/ctladm.8#3 $ .\" $FreeBSD$ .\" -.Dd October 30, 2013 +.Dd June 15, 2014 .Dt CTLADM 8 .Os .Sh NAME @@ -933,6 +933,29 @@ Display .Nm usage information. .El +.Sh OPTIONS +Number of additional configuration options may be specified for LUNs. +Some options are global, others are backend-specific. +.Pp +Global options: +.Bl -tag +.It Va vendor +Specifies LUN vendor string up to 8 chars. +.It Va product +Specifies LUN product string up to 16 chars. +.It Va revision +Specifies LUN revision string up to 4 chars. +.It Va unmap +Set to "on", enables UNMAP support for the LUN. +.El +.Pp +Options specific for block backend: +.Bl -tag +.It Va file +Specifies file or device name to use for backing store. +.It Va num_threads +Specifies number of backend threads to use for this LUN. +.El .Sh EXAMPLES .Dl ctladm tur 0:1 .Pp From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 10:49:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E4070A28; Wed, 2 Jul 2014 10:49:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0F5D265A; Wed, 2 Jul 2014 10:49:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62An6EM089680; Wed, 2 Jul 2014 10:49:06 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62An6P2089679; Wed, 2 Jul 2014 10:49:06 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407021049.s62An6P2089679@svn.freebsd.org> From: Alexander Motin Date: Wed, 2 Jul 2014 10:49:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268153 - stable/10/usr.sbin/ctladm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 10:49:07 -0000 Author: mav Date: Wed Jul 2 10:49:06 2014 New Revision: 268153 URL: http://svnweb.freebsd.org/changeset/base/268153 Log: MFC r267516i (by joel): mdoc: add missing width to Bl -tag. Modified: stable/10/usr.sbin/ctladm/ctladm.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctladm/ctladm.8 ============================================================================== --- stable/10/usr.sbin/ctladm/ctladm.8 Wed Jul 2 10:48:06 2014 (r268152) +++ stable/10/usr.sbin/ctladm/ctladm.8 Wed Jul 2 10:49:06 2014 (r268153) @@ -938,7 +938,7 @@ Number of additional configuration optio Some options are global, others are backend-specific. .Pp Global options: -.Bl -tag +.Bl -tag -width 12n .It Va vendor Specifies LUN vendor string up to 8 chars. .It Va product @@ -950,7 +950,7 @@ Set to "on", enables UNMAP support for t .El .Pp Options specific for block backend: -.Bl -tag +.Bl -tag -width 12n .It Va file Specifies file or device name to use for backing store. .It Va num_threads From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 11:49:16 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 77444CEE; Wed, 2 Jul 2014 11:49:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6288C2B5C; Wed, 2 Jul 2014 11:49:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62BnGkp018057; Wed, 2 Jul 2014 11:49:16 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62BnG1B018056; Wed, 2 Jul 2014 11:49:16 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201407021149.s62BnG1B018056@svn.freebsd.org> From: Hajimu UMEMOTO Date: Wed, 2 Jul 2014 11:49:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268154 - stable/10/usr.bin/whois X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 11:49:16 -0000 Author: ume Date: Wed Jul 2 11:49:15 2014 New Revision: 268154 URL: http://svnweb.freebsd.org/changeset/base/268154 Log: MFC r267871: Introduce $RA_SERVER to set default whois server. Requested by: nork Reviewed by: nork Modified: stable/10/usr.bin/whois/whois.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/whois/whois.c ============================================================================== --- stable/10/usr.bin/whois/whois.c Wed Jul 2 10:49:06 2014 (r268153) +++ stable/10/usr.bin/whois/whois.c Wed Jul 2 11:49:15 2014 (r268154) @@ -179,10 +179,12 @@ main(int argc, char *argv[]) * back to NICHOST. */ if (host == NULL && country == NULL) { - use_qnichost = 1; - host = NICHOST; - if (!(flags & WHOIS_QUICK)) - flags |= WHOIS_RECURSE; + if ((host = getenv("RA_SERVER")) == NULL) { + use_qnichost = 1; + host = NICHOST; + if (!(flags & WHOIS_QUICK)) + flags |= WHOIS_RECURSE; + } } while (argc-- > 0) { if (country != NULL) { From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 11:51:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60429F09; Wed, 2 Jul 2014 11:51:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B46F2B83; Wed, 2 Jul 2014 11:51:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62Bp2qN020195; Wed, 2 Jul 2014 11:51:02 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62Bp2ns020194; Wed, 2 Jul 2014 11:51:02 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201407021151.s62Bp2ns020194@svn.freebsd.org> From: Hajimu UMEMOTO Date: Wed, 2 Jul 2014 11:51:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268155 - stable/9/usr.bin/whois X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 11:51:02 -0000 Author: ume Date: Wed Jul 2 11:51:01 2014 New Revision: 268155 URL: http://svnweb.freebsd.org/changeset/base/268155 Log: MFC r267871: Introduce $RA_SERVER to set default whois server. Requested by: nork Reviewed by: nork Modified: stable/9/usr.bin/whois/whois.c Directory Properties: stable/9/usr.bin/whois/ (props changed) Modified: stable/9/usr.bin/whois/whois.c ============================================================================== --- stable/9/usr.bin/whois/whois.c Wed Jul 2 11:49:15 2014 (r268154) +++ stable/9/usr.bin/whois/whois.c Wed Jul 2 11:51:01 2014 (r268155) @@ -179,10 +179,12 @@ main(int argc, char *argv[]) * back to NICHOST. */ if (host == NULL && country == NULL) { - use_qnichost = 1; - host = NICHOST; - if (!(flags & WHOIS_QUICK)) - flags |= WHOIS_RECURSE; + if ((host = getenv("RA_SERVER")) == NULL) { + use_qnichost = 1; + host = NICHOST; + if (!(flags & WHOIS_QUICK)) + flags |= WHOIS_RECURSE; + } } while (argc-- > 0) { if (country != NULL) { From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 13:09:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D1017197; Wed, 2 Jul 2014 13:09:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B186A2337; Wed, 2 Jul 2014 13:09:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62D9RuC056281; Wed, 2 Jul 2014 13:09:27 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62D9QnG056273; Wed, 2 Jul 2014 13:09:26 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201407021309.s62D9QnG056273@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 2 Jul 2014 13:09:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268157 - in stable/10: share/man/man4 sys/dev/cpuctl sys/sys usr.sbin/cpucontrol X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 13:09:27 -0000 Author: kib Date: Wed Jul 2 13:09:26 2014 New Revision: 268157 URL: http://svnweb.freebsd.org/changeset/base/268157 Log: MFC r267651 (by attilio): Add the possibility to specify ecx when performing cpuid calls. MFC r267673: Restore the ABI of the cpuctl(4) ioctl request CPUCTL_CPUID. MFC r267814: Make cpuctl_do_cpuid() and cpuctl_do_cpuid_count() return void. Modified: stable/10/share/man/man4/cpuctl.4 stable/10/sys/dev/cpuctl/cpuctl.c stable/10/sys/sys/cpuctl.h stable/10/usr.sbin/cpucontrol/cpucontrol.8 stable/10/usr.sbin/cpucontrol/cpucontrol.c Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/cpuctl.4 ============================================================================== --- stable/10/share/man/man4/cpuctl.4 Wed Jul 2 12:13:11 2014 (r268156) +++ stable/10/share/man/man4/cpuctl.4 Wed Jul 2 13:09:26 2014 (r268157) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 30, 2009 +.Dd June 20, 2014 .Dt CPUCTL 4 .Os .Sh NAME @@ -65,7 +65,7 @@ All of the supported operations are invo .Xr ioctl 2 system call. Currently, the following ioctls are defined: -.Bl -tag -width CPUCTL_UPDATE +.Bl -tag -width CPUCTL_CPUID_COUNT .It Dv CPUCTL_RDMSR Fa cpuctl_msr_args_t *args .It Dv CPUCTL_WRMSR Fa cpuctl_msr_args_t *args Read/write CPU machine specific register. @@ -87,20 +87,59 @@ Set/clear MSR bits according to the mask field. .It Dv CPUCTL_CPUID Fa cpuctl_cpuid_args_t *args Retrieve CPUID information. -Arguments are supplied in -the following struct: +Arguments are supplied in the following structure: .Bd -literal typedef struct { - int level; /* CPUID level */ + int level; /* CPUID level */ uint32_t data[4]; } cpuctl_cpuid_args_t; .Ed -.Pp +It is equivalent to the +.Dv CPUCTL_CPUID_COUNT +request with +.Va level_type +set to 0. +.It Dv CPUCTL_CPUID_COUNT Fa cpuctl_cpuid_count_args_t *args +Retrieve CPUID information. +Arguments are supplied in the following structure: +.Bd -literal +typedef struct { + int level; /* CPUID level */ + int level_type; /* CPUID level type */ + uint32_t data[4]; +} cpuctl_cpuid_count_args_t; +.Ed The .Va level -field indicates the CPUID level to retrieve information for, while the +field indicates the CPUID level to retrieve, +it is loaded into the +.Va %eax +register before the CPUID instruction is executed, +The +.Va level_type +field indicates the CPUID level type to retrieve, +it is loaded into the +.Va %ecx +register. +.Pp +The .Va data field is used to store the received CPUID data. +That is, +.Va data[0] +contains the value of +.Va %eax +register after the CPUID instruction is executed, +.Va data[1] +is for +.Va %ebx , +.Va data[2] +for +.Va %ecx , +and +.Va data[3] +for +.Va %edx . .It Dv CPUCTL_UPDATE cpuctl_update_args_t *args Update CPU firmware (microcode). The structure is defined in Modified: stable/10/sys/dev/cpuctl/cpuctl.c ============================================================================== --- stable/10/sys/dev/cpuctl/cpuctl.c Wed Jul 2 12:13:11 2014 (r268156) +++ stable/10/sys/dev/cpuctl/cpuctl.c Wed Jul 2 13:09:26 2014 (r268157) @@ -67,7 +67,9 @@ static d_ioctl_t cpuctl_ioctl; static int cpuctl_do_msr(int cpu, cpuctl_msr_args_t *data, u_long cmd, struct thread *td); -static int cpuctl_do_cpuid(int cpu, cpuctl_cpuid_args_t *data, +static void cpuctl_do_cpuid(int cpu, cpuctl_cpuid_args_t *data, + struct thread *td); +static void cpuctl_do_cpuid_count(int cpu, cpuctl_cpuid_count_args_t *data, struct thread *td); static int cpuctl_do_update(int cpu, cpuctl_update_args_t *data, struct thread *td); @@ -169,7 +171,8 @@ cpuctl_ioctl(struct cdev *dev, u_long cm ret = cpuctl_do_msr(cpu, (cpuctl_msr_args_t *)data, cmd, td); break; case CPUCTL_CPUID: - ret = cpuctl_do_cpuid(cpu, (cpuctl_cpuid_args_t *)data, td); + cpuctl_do_cpuid(cpu, (cpuctl_cpuid_args_t *)data, td); + ret = 0; break; case CPUCTL_UPDATE: ret = priv_check(td, PRIV_CPUCTL_UPDATE); @@ -177,6 +180,11 @@ cpuctl_ioctl(struct cdev *dev, u_long cm goto fail; ret = cpuctl_do_update(cpu, (cpuctl_update_args_t *)data, td); break; + case CPUCTL_CPUID_COUNT: + cpuctl_do_cpuid_count(cpu, (cpuctl_cpuid_count_args_t *)data, + td); + ret = 0; + break; default: ret = EINVAL; break; @@ -188,8 +196,9 @@ fail: /* * Actually perform cpuid operation. */ -static int -cpuctl_do_cpuid(int cpu, cpuctl_cpuid_args_t *data, struct thread *td) +static void +cpuctl_do_cpuid_count(int cpu, cpuctl_cpuid_count_args_t *data, + struct thread *td) { int is_bound = 0; int oldcpu; @@ -199,14 +208,25 @@ cpuctl_do_cpuid(int cpu, cpuctl_cpuid_ar /* Explicitly clear cpuid data to avoid returning stale info. */ bzero(data->data, sizeof(data->data)); - DPRINTF("[cpuctl,%d]: retriving cpuid level %#0x for %d cpu\n", - __LINE__, data->level, cpu); + DPRINTF("[cpuctl,%d]: retrieving cpuid lev %#0x type %#0x for %d cpu\n", + __LINE__, data->level, data->level_type, cpu); oldcpu = td->td_oncpu; is_bound = cpu_sched_is_bound(td); set_cpu(cpu, td); - cpuid_count(data->level, 0, data->data); + cpuid_count(data->level, data->level_type, data->data); restore_cpu(oldcpu, is_bound, td); - return (0); +} + +static void +cpuctl_do_cpuid(int cpu, cpuctl_cpuid_args_t *data, struct thread *td) +{ + cpuctl_cpuid_count_args_t cdata; + + cdata.level = data->level; + /* Override the level type. */ + cdata.level_type = 0; + cpuctl_do_cpuid_count(cpu, &cdata, td); + bcopy(cdata.data, data->data, sizeof(data->data)); /* Ignore error */ } /* @@ -271,12 +291,7 @@ cpuctl_do_update(int cpu, cpuctl_update_ ("[cpuctl,%d]: bad cpu number %d", __LINE__, cpu)); DPRINTF("[cpuctl,%d]: XXX %d", __LINE__, cpu); - ret = cpuctl_do_cpuid(cpu, &args, td); - if (ret != 0) { - DPRINTF("[cpuctl,%d]: cannot retrive cpuid info for cpu %d", - __LINE__, cpu); - return (ENXIO); - } + cpuctl_do_cpuid(cpu, &args, td); ((uint32_t *)vendor)[0] = args.data[1]; ((uint32_t *)vendor)[1] = args.data[3]; ((uint32_t *)vendor)[2] = args.data[2]; Modified: stable/10/sys/sys/cpuctl.h ============================================================================== --- stable/10/sys/sys/cpuctl.h Wed Jul 2 12:13:11 2014 (r268156) +++ stable/10/sys/sys/cpuctl.h Wed Jul 2 13:09:26 2014 (r268157) @@ -35,11 +35,17 @@ typedef struct { } cpuctl_msr_args_t; typedef struct { - int level; /* CPUID level */ + int level; /* CPUID level */ uint32_t data[4]; } cpuctl_cpuid_args_t; typedef struct { + int level; /* CPUID level */ + int level_type; /* CPUID level type */ + uint32_t data[4]; +} cpuctl_cpuid_count_args_t; + +typedef struct { void *data; size_t size; } cpuctl_update_args_t; @@ -50,5 +56,6 @@ typedef struct { #define CPUCTL_UPDATE _IOWR('c', 4, cpuctl_update_args_t) #define CPUCTL_MSRSBIT _IOWR('c', 5, cpuctl_msr_args_t) #define CPUCTL_MSRCBIT _IOWR('c', 6, cpuctl_msr_args_t) +#define CPUCTL_CPUID_COUNT _IOWR('c', 7, cpuctl_cpuid_count_args_t) #endif /* _CPUCTL_H_ */ Modified: stable/10/usr.sbin/cpucontrol/cpucontrol.8 ============================================================================== --- stable/10/usr.sbin/cpucontrol/cpucontrol.8 Wed Jul 2 12:13:11 2014 (r268156) +++ stable/10/usr.sbin/cpucontrol/cpucontrol.8 Wed Jul 2 13:09:26 2014 (r268157) @@ -65,6 +65,12 @@ device .Ek .Nm .Op Fl vh +.Fl i Ar level,level_type +.Bk +.Ar device +.Ek +.Nm +.Op Fl vh .Op Fl d Ar datadir .Fl u .Bk @@ -114,6 +120,9 @@ In this case the inverted value of mask .It Fl i Ar level Retrieve CPUID info. Level should be given as a hex number. +.It Fl i Ar level,level_type +Retrieve CPUID info. +Level and level_type should be given as hex numbers. .It Fl u Apply CPU firmware updates. The Modified: stable/10/usr.sbin/cpucontrol/cpucontrol.c ============================================================================== --- stable/10/usr.sbin/cpucontrol/cpucontrol.c Wed Jul 2 12:13:11 2014 (r268156) +++ stable/10/usr.sbin/cpucontrol/cpucontrol.c Wed Jul 2 13:09:26 2014 (r268157) @@ -99,6 +99,7 @@ static struct ucode_handler { static void usage(void); static int isdir(const char *path); static int do_cpuid(const char *cmdarg, const char *dev); +static int do_cpuid_count(const char *cmdarg, const char *dev); static int do_msr(const char *cmdarg, const char *dev); static int do_update(const char *dev); static void datadir_add(const char *path); @@ -112,7 +113,7 @@ usage(void) if (name == NULL) name = "cpuctl"; fprintf(stderr, "Usage: %s [-vh] [-d datadir] [-m msr[=value] | " - "-i level | -u] device\n", name); + "-i level | -i level,level_type | -u] device\n", name); exit(EX_USAGE); } @@ -170,6 +171,57 @@ do_cpuid(const char *cmdarg, const char } static int +do_cpuid_count(const char *cmdarg, const char *dev) +{ + char *cmdarg1, *endptr, *endptr1; + unsigned int level, level_type; + cpuctl_cpuid_count_args_t args; + int fd, error; + + assert(cmdarg != NULL); + assert(dev != NULL); + + level = strtoul(cmdarg, &endptr, 16); + if (*cmdarg == '\0' || *endptr == '\0') { + WARNX(0, "incorrect or missing operand: %s", cmdarg); + usage(); + /* NOTREACHED */ + } + /* Locate the comma... */ + cmdarg1 = strstr(endptr, ","); + /* ... and skip past it */ + cmdarg1 += 1; + level_type = strtoul(cmdarg1, &endptr1, 16); + if (*cmdarg1 == '\0' || *endptr1 != '\0') { + WARNX(0, "incorrect or missing operand: %s", cmdarg); + usage(); + /* NOTREACHED */ + } + + /* + * Fill ioctl argument structure. + */ + args.level = level; + args.level_type = level_type; + fd = open(dev, O_RDONLY); + if (fd < 0) { + WARN(0, "error opening %s for reading", dev); + return (1); + } + error = ioctl(fd, CPUCTL_CPUID_COUNT, &args); + if (error < 0) { + WARN(0, "ioctl(%s, CPUCTL_CPUID_COUNT)", dev); + close(fd); + return (error); + } + fprintf(stdout, "cpuid level 0x%x, level_type 0x%x: 0x%.8x 0x%.8x " + "0x%.8x 0x%.8x\n", level, level_type, args.data[0], args.data[1], + args.data[2], args.data[3]); + close(fd); + return (0); +} + +static int do_msr(const char *cmdarg, const char *dev) { unsigned int msr; @@ -414,7 +466,10 @@ main(int argc, char *argv[]) c = flags & (FLAG_I | FLAG_M | FLAG_U); switch (c) { case FLAG_I: - error = do_cpuid(cmdarg, dev); + if (strstr(cmdarg, ",") != NULL) + error = do_cpuid_count(cmdarg, dev); + else + error = do_cpuid(cmdarg, dev); break; case FLAG_M: error = do_msr(cmdarg, dev); From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 14:54:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C2ACDB57; Wed, 2 Jul 2014 14:54:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD3252E47; Wed, 2 Jul 2014 14:54:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62Esio4009021; Wed, 2 Jul 2014 14:54:44 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62Esg64009007; Wed, 2 Jul 2014 14:54:42 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201407021454.s62Esg64009007@svn.freebsd.org> From: Marcel Moolenaar Date: Wed, 2 Jul 2014 14:54:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268161 - in stable/10/usr.bin: . mkimg X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 14:54:44 -0000 Author: marcel Date: Wed Jul 2 14:54:41 2014 New Revision: 268161 URL: http://svnweb.freebsd.org/changeset/base/268161 Log: MFC mkimg(1) -- revisions 268159, 268134, 266556, 266514, 266513, 266512, 266511, 266510, 266509, 266176, 265468, 265467, 265462, 265170, 263926, 263924, 263923, 263919 and 263918. Revision 267182 changed mkimg.1 alongside other unrelated manpages. The change to mkimg.1 has been applied without registering a merge of the revision. This allows a future merge of r267182 to happen. Relnotes: yes Added: stable/10/usr.bin/mkimg/ - copied from r263918, head/usr.bin/mkimg/ stable/10/usr.bin/mkimg/format.c - copied unchanged from r266176, head/usr.bin/mkimg/format.c stable/10/usr.bin/mkimg/format.h - copied unchanged from r266176, head/usr.bin/mkimg/format.h stable/10/usr.bin/mkimg/image.c - copied, changed from r266176, head/usr.bin/mkimg/image.c stable/10/usr.bin/mkimg/image.h - copied unchanged from r266176, head/usr.bin/mkimg/image.h stable/10/usr.bin/mkimg/raw.c - copied unchanged from r266176, head/usr.bin/mkimg/raw.c stable/10/usr.bin/mkimg/vmdk.c - copied unchanged from r266176, head/usr.bin/mkimg/vmdk.c Modified: stable/10/usr.bin/Makefile stable/10/usr.bin/mkimg/Makefile (contents, props changed) stable/10/usr.bin/mkimg/apm.c stable/10/usr.bin/mkimg/bsd.c stable/10/usr.bin/mkimg/ebr.c stable/10/usr.bin/mkimg/gpt.c stable/10/usr.bin/mkimg/mbr.c stable/10/usr.bin/mkimg/mkimg.1 (contents, props changed) stable/10/usr.bin/mkimg/mkimg.c (contents, props changed) stable/10/usr.bin/mkimg/mkimg.h stable/10/usr.bin/mkimg/pc98.c stable/10/usr.bin/mkimg/scheme.c (contents, props changed) stable/10/usr.bin/mkimg/scheme.h (contents, props changed) stable/10/usr.bin/mkimg/vtoc8.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/Makefile ============================================================================== --- stable/10/usr.bin/Makefile Wed Jul 2 14:47:48 2014 (r268160) +++ stable/10/usr.bin/Makefile Wed Jul 2 14:54:41 2014 (r268161) @@ -106,6 +106,7 @@ SUBDIR= alias \ mkdep \ ${_mkesdb} \ mkfifo \ + mkimg \ mklocale \ mktemp \ mkulzma \ Modified: stable/10/usr.bin/mkimg/Makefile ============================================================================== --- head/usr.bin/mkimg/Makefile Sat Mar 29 19:03:10 2014 (r263918) +++ stable/10/usr.bin/mkimg/Makefile Wed Jul 2 14:54:41 2014 (r268161) @@ -1,11 +1,16 @@ # $FreeBSD$ PROG= mkimg -SRCS= mkimg.c scheme.c +SRCS= format.c image.c mkimg.c scheme.c MAN= mkimg.1 CFLAGS+=-DSPARSE_WRITE +# List of formats to support +SRCS+= \ + raw.c \ + vmdk.c + # List of schemes to support SRCS+= \ apm.c \ Modified: stable/10/usr.bin/mkimg/apm.c ============================================================================== --- head/usr.bin/mkimg/apm.c Sat Mar 29 19:03:10 2014 (r263918) +++ stable/10/usr.bin/mkimg/apm.c Wed Jul 2 14:54:41 2014 (r268161) @@ -35,11 +35,17 @@ __FBSDID("$FreeBSD$"); #include #include +#include "image.h" #include "mkimg.h" #include "scheme.h" +#ifndef APM_ENT_TYPE_FREEBSD_NANDFS +#define APM_ENT_TYPE_FREEBSD_NANDFS "FreeBSD-nandfs" +#endif + static struct mkimg_alias apm_aliases[] = { { ALIAS_FREEBSD, ALIAS_PTR2TYPE(APM_ENT_TYPE_FREEBSD) }, + { ALIAS_FREEBSD_BOOT, ALIAS_PTR2TYPE(APM_ENT_TYPE_APPLE_BOOT) }, { ALIAS_FREEBSD_NANDFS, ALIAS_PTR2TYPE(APM_ENT_TYPE_FREEBSD_NANDFS) }, { ALIAS_FREEBSD_SWAP, ALIAS_PTR2TYPE(APM_ENT_TYPE_FREEBSD_SWAP) }, { ALIAS_FREEBSD_UFS, ALIAS_PTR2TYPE(APM_ENT_TYPE_FREEBSD_UFS) }, @@ -58,13 +64,12 @@ apm_metadata(u_int where) } static int -apm_write(int fd __unused, lba_t imgsz __unused, void *bootcode __unused) +apm_write(lba_t imgsz, void *bootcode __unused) { u_char *buf; struct apm_ddr *ddr; struct apm_ent *ent; struct part *part; - ssize_t nbytes; int error; buf = calloc(nparts + 2, secsz); @@ -81,8 +86,8 @@ apm_write(int fd __unused, lba_t imgsz _ be32enc(&ent->ent_pmblkcnt, nparts + 1); be32enc(&ent->ent_start, 1); be32enc(&ent->ent_size, nparts + 1); - strcpy(ent->ent_type, APM_ENT_TYPE_SELF); - strcpy(ent->ent_name, "Apple"); + strncpy(ent->ent_type, APM_ENT_TYPE_SELF, sizeof(ent->ent_type)); + strncpy(ent->ent_name, "Apple", sizeof(ent->ent_name)); STAILQ_FOREACH(part, &partlist, link) { ent = (void *)(buf + (part->index + 2) * secsz); @@ -90,17 +95,14 @@ apm_write(int fd __unused, lba_t imgsz _ be32enc(&ent->ent_pmblkcnt, nparts + 1); be32enc(&ent->ent_start, part->block); be32enc(&ent->ent_size, part->size); - strcpy(ent->ent_type, ALIAS_TYPE2PTR(part->type)); + strncpy(ent->ent_type, ALIAS_TYPE2PTR(part->type), + sizeof(ent->ent_type)); if (part->label != NULL) - strcpy(ent->ent_name, part->label); + strncpy(ent->ent_name, part->label, + sizeof(ent->ent_name)); } - error = mkimg_seek(fd, 0); - if (error == 0) { - nbytes = (nparts + 2) * secsz; - if (write(fd, buf, nbytes) != nbytes) - error = errno; - } + error = image_write(0, buf, nparts + 2); free(buf); return (error); } Modified: stable/10/usr.bin/mkimg/bsd.c ============================================================================== --- head/usr.bin/mkimg/bsd.c Sat Mar 29 19:03:10 2014 (r263918) +++ stable/10/usr.bin/mkimg/bsd.c Wed Jul 2 14:54:41 2014 (r268161) @@ -35,9 +35,14 @@ __FBSDID("$FreeBSD$"); #include #include +#include "image.h" #include "mkimg.h" #include "scheme.h" +#ifndef FS_NANDFS +#define FS_NANDFS 30 +#endif + static struct mkimg_alias bsd_aliases[] = { { ALIAS_FREEBSD_NANDFS, ALIAS_INT2TYPE(FS_NANDFS) }, { ALIAS_FREEBSD_SWAP, ALIAS_INT2TYPE(FS_SWAP) }, @@ -57,7 +62,7 @@ bsd_metadata(u_int where) } static int -bsd_write(int fd, lba_t imgsz, void *bootcode) +bsd_write(lba_t imgsz, void *bootcode) { u_char *buf, *p; struct disklabel *d; @@ -75,8 +80,12 @@ bsd_write(int fd, lba_t imgsz, void *boo } else memset(buf, 0, BBSIZE); - imgsz = ncyls * nheads * nsecs; - ftruncate(fd, imgsz * secsz); + imgsz = (lba_t)ncyls * nheads * nsecs; + error = image_set_size(imgsz); + if (error) { + free(buf); + return (error); + } d = (void *)(buf + secsz); le32enc(&d->d_magic, DISKMAGIC); @@ -107,11 +116,7 @@ bsd_write(int fd, lba_t imgsz, void *boo checksum ^= le16dec(p); le16enc(&d->d_checksum, checksum); - error = mkimg_seek(fd, 0); - if (error == 0) { - if (write(fd, buf, BBSIZE) != BBSIZE) - error = errno; - } + error = image_write(0, buf, BBSIZE / secsz); free(buf); return (error); } Modified: stable/10/usr.bin/mkimg/ebr.c ============================================================================== --- head/usr.bin/mkimg/ebr.c Sat Mar 29 19:03:10 2014 (r263918) +++ stable/10/usr.bin/mkimg/ebr.c Wed Jul 2 14:54:41 2014 (r268161) @@ -35,9 +35,14 @@ __FBSDID("$FreeBSD$"); #include #include +#include "image.h" #include "mkimg.h" #include "scheme.h" +#ifndef DOSPTYP_FAT32 +#define DOSPTYP_FAT32 0x0b +#endif + static struct mkimg_alias ebr_aliases[] = { { ALIAS_FAT32, ALIAS_INT2TYPE(DOSPTYP_FAT32) }, { ALIAS_FREEBSD, ALIAS_INT2TYPE(DOSPTYP_386BSD) }, @@ -63,7 +68,7 @@ ebr_chs(u_char *cyl, u_char *hd, u_char } static int -ebr_write(int fd, lba_t imgsz __unused, void *bootcode __unused) +ebr_write(lba_t imgsz __unused, void *bootcode __unused) { u_char *ebr; struct dos_partition *dp; @@ -100,11 +105,7 @@ ebr_write(int fd, lba_t imgsz __unused, le32enc(&dp->dp_size, next->size + nsecs); } - error = mkimg_seek(fd, block); - if (error == 0) { - if (write(fd, ebr, secsz) != (ssize_t)secsz) - error = errno; - } + error = image_write(block, ebr, 1); if (error) break; Copied: stable/10/usr.bin/mkimg/format.c (from r266176, head/usr.bin/mkimg/format.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.bin/mkimg/format.c Wed Jul 2 14:54:41 2014 (r268161, copy of r266176, head/usr.bin/mkimg/format.c) @@ -0,0 +1,91 @@ +/*- + * Copyright (c) 2014 Juniper Networks, Inc. + * All rights reserved. + * + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "image.h" +#include "format.h" +#include "mkimg.h" + +static struct mkimg_format *format; + +int +format_resize(lba_t end) +{ + + if (format == NULL) + return (ENOSYS); + return (format->resize(end)); +} + +int +format_select(const char *spec) +{ + struct mkimg_format *f, **iter; + + SET_FOREACH(iter, formats) { + f = *iter; + if (strcasecmp(spec, f->name) == 0) { + format = f; + return (0); + } + } + return (EINVAL); +} + +struct mkimg_format * +format_selected(void) +{ + + return (format); +} + +int +format_write(int fd) +{ + lba_t size; + int error; + + if (format == NULL) + return (ENOSYS); + size = image_get_size(); + error = format->resize(size); + if (!error) + error = format->write(fd); + return (error); +} Copied: stable/10/usr.bin/mkimg/format.h (from r266176, head/usr.bin/mkimg/format.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.bin/mkimg/format.h Wed Jul 2 14:54:41 2014 (r268161, copy of r266176, head/usr.bin/mkimg/format.h) @@ -0,0 +1,49 @@ +/*- + * Copyright (c) 2014 Juniper Networks, Inc. + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +#ifndef _MKIMG_FORMAT_H_ +#define _MKIMG_FORMAT_H_ + +#include + +struct mkimg_format { + const char *name; + const char *description; + int (*resize)(lba_t); + int (*write)(int); +}; + +SET_DECLARE(formats, struct mkimg_format); +#define FORMAT_DEFINE(nm) DATA_SET(formats, nm) + +int format_resize(lba_t); +int format_select(const char *); +struct mkimg_format *format_selected(void); +int format_write(int); + +#endif /* _MKIMG_FORMAT_H_ */ Modified: stable/10/usr.bin/mkimg/gpt.c ============================================================================== --- head/usr.bin/mkimg/gpt.c Sat Mar 29 19:03:10 2014 (r263918) +++ stable/10/usr.bin/mkimg/gpt.c Wed Jul 2 14:54:41 2014 (r268161) @@ -39,9 +39,15 @@ __FBSDID("$FreeBSD$"); #include #include +#include "image.h" #include "mkimg.h" #include "scheme.h" +#ifndef GPT_ENT_TYPE_FREEBSD_NANDFS +#define GPT_ENT_TYPE_FREEBSD_NANDFS \ + {0x74ba7dd9,0xa689,0x11e1,0xbd,0x04,{0x00,0xe0,0x81,0x28,0x6a,0xcf}} +#endif + static uuid_t gpt_uuid_efi = GPT_ENT_TYPE_EFI; static uuid_t gpt_uuid_freebsd = GPT_ENT_TYPE_FREEBSD; static uuid_t gpt_uuid_freebsd_boot = GPT_ENT_TYPE_FREEBSD_BOOT; @@ -123,6 +129,21 @@ crc32(const void *buf, size_t sz) return (crc ^ ~0U); } +static void +gpt_uuid_enc(void *buf, const uuid_t *uuid) +{ + uint8_t *p = buf; + int i; + + le32enc(p, uuid->time_low); + le16enc(p + 4, uuid->time_mid); + le16enc(p + 6, uuid->time_hi_and_version); + p[8] = uuid->clock_seq_hi_and_reserved; + p[9] = uuid->clock_seq_low; + for (i = 0; i < _UUID_NODE_LEN; i++) + p[10 + i] = uuid->node[i]; +} + static u_int gpt_tblsz(void) { @@ -146,20 +167,7 @@ gpt_metadata(u_int where) } static int -gpt_filewrite(int fd, lba_t blk, void *buf, ssize_t bufsz) -{ - int error; - - error = mkimg_seek(fd, blk); - if (error == 0) { - if (write(fd, buf, bufsz) != bufsz) - error = errno; - } - return (error); -} - -static int -gpt_write_pmbr(int fd, lba_t blks, void *bootcode) +gpt_write_pmbr(lba_t blks, void *bootcode) { u_char *pmbr; uint32_t secs; @@ -183,7 +191,7 @@ gpt_write_pmbr(int fd, lba_t blks, void le32enc(pmbr + DOSPARTOFF + 8, 1); le32enc(pmbr + DOSPARTOFF + 12, secs); le16enc(pmbr + DOSMAGICOFFSET, DOSMAGIC); - error = gpt_filewrite(fd, 0, pmbr, secsz); + error = image_write(0, pmbr, 1); free(pmbr); return (error); } @@ -202,9 +210,9 @@ gpt_mktbl(u_int tblsz) STAILQ_FOREACH(part, &partlist, link) { ent = tbl + part->index; - uuid_enc_le(&ent->ent_type, ALIAS_TYPE2PTR(part->type)); + gpt_uuid_enc(&ent->ent_type, ALIAS_TYPE2PTR(part->type)); uuidgen(&uuid, 1); - uuid_enc_le(&ent->ent_uuid, &uuid); + gpt_uuid_enc(&ent->ent_uuid, &uuid); le64enc(&ent->ent_lba_start, part->block); le64enc(&ent->ent_lba_end, part->block + part->size - 1); if (part->label != NULL) { @@ -219,8 +227,7 @@ gpt_mktbl(u_int tblsz) } static int -gpt_write_hdr(int fd, struct gpt_hdr *hdr, uint64_t self, uint64_t alt, - uint64_t tbl) +gpt_write_hdr(struct gpt_hdr *hdr, uint64_t self, uint64_t alt, uint64_t tbl) { uint32_t crc; @@ -230,11 +237,11 @@ gpt_write_hdr(int fd, struct gpt_hdr *hd hdr->hdr_crc_self = 0; crc = crc32(hdr, offsetof(struct gpt_hdr, padding)); le64enc(&hdr->hdr_crc_self, crc); - return (gpt_filewrite(fd, self, hdr, secsz)); + return (image_write(self, hdr, 1)); } static int -gpt_write(int fd, lba_t imgsz, void *bootcode) +gpt_write(lba_t imgsz, void *bootcode) { uuid_t uuid; struct gpt_ent *tbl; @@ -244,7 +251,7 @@ gpt_write(int fd, lba_t imgsz, void *boo int error; /* PMBR */ - error = gpt_write_pmbr(fd, imgsz, bootcode); + error = gpt_write_pmbr(imgsz, bootcode); if (error) return (error); @@ -253,10 +260,10 @@ gpt_write(int fd, lba_t imgsz, void *boo tbl = gpt_mktbl(tblsz); if (tbl == NULL) return (errno); - error = gpt_filewrite(fd, 2, tbl, tblsz * secsz); + error = image_write(2, tbl, tblsz); if (error) goto out; - error = gpt_filewrite(fd, imgsz - (tblsz + 1), tbl, tblsz * secsz); + error = image_write(imgsz - (tblsz + 1), tbl, tblsz); if (error) goto out; @@ -273,14 +280,14 @@ gpt_write(int fd, lba_t imgsz, void *boo le64enc(&hdr->hdr_lba_start, 2 + tblsz); le64enc(&hdr->hdr_lba_end, imgsz - tblsz - 2); uuidgen(&uuid, 1); - uuid_enc_le(&hdr->hdr_uuid, &uuid); + gpt_uuid_enc(&hdr->hdr_uuid, &uuid); le32enc(&hdr->hdr_entries, nparts); le32enc(&hdr->hdr_entsz, sizeof(struct gpt_ent)); crc = crc32(tbl, nparts * sizeof(struct gpt_ent)); le32enc(&hdr->hdr_crc_table, crc); - error = gpt_write_hdr(fd, hdr, 1, imgsz - 1, 2); + error = gpt_write_hdr(hdr, 1, imgsz - 1, 2); if (!error) - error = gpt_write_hdr(fd, hdr, imgsz - 1, 1, imgsz - tblsz - 1); + error = gpt_write_hdr(hdr, imgsz - 1, 1, imgsz - tblsz - 1); free(hdr); out: Copied and modified: stable/10/usr.bin/mkimg/image.c (from r266176, head/usr.bin/mkimg/image.c) ============================================================================== --- head/usr.bin/mkimg/image.c Thu May 15 19:19:57 2014 (r266176, copy source) +++ stable/10/usr.bin/mkimg/image.c Wed Jul 2 14:54:41 2014 (r268161) @@ -30,6 +30,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include #include #include @@ -38,7 +41,7 @@ __FBSDID("$FreeBSD$"); #define BUFFER_SIZE (1024*1024) -static char image_tmpfile[] = "/tmp/mkimg-XXXXXX"; +static char image_tmpfile[PATH_MAX]; static int image_fd = -1; static lba_t image_size; @@ -98,11 +101,11 @@ image_copyout(int fd) ofs = lseek(fd, 0L, SEEK_CUR); + if (lseek(image_fd, 0, SEEK_SET) != 0) + return (errno); buffer = malloc(BUFFER_SIZE); if (buffer == NULL) return (errno); - if (lseek(image_fd, 0, SEEK_SET) != 0) - return (errno); error = 0; while (1) { rdsz = read(image_fd, buffer, BUFFER_SIZE); @@ -119,8 +122,12 @@ image_copyout(int fd) } } free(buffer); + if (error) + return (error); ofs = lseek(fd, 0L, SEEK_CUR); - ftruncate(fd, ofs); + if (ofs == -1) + return (errno); + error = (ftruncate(fd, ofs) == -1) ? errno : 0; return (error); } @@ -157,9 +164,14 @@ image_write(lba_t blk, void *buf, ssize_ int image_init(void) { + const char *tmpdir; if (atexit(cleanup) == -1) return (errno); + if ((tmpdir = getenv("TMPDIR")) == NULL || *tmpdir == '\0') + tmpdir = _PATH_TMP; + snprintf(image_tmpfile, sizeof(image_tmpfile), "%s/mkimg-XXXXXX", + tmpdir); image_fd = mkstemp(image_tmpfile); if (image_fd == -1) return (errno); Copied: stable/10/usr.bin/mkimg/image.h (from r266176, head/usr.bin/mkimg/image.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.bin/mkimg/image.h Wed Jul 2 14:54:41 2014 (r268161, copy of r266176, head/usr.bin/mkimg/image.h) @@ -0,0 +1,41 @@ +/*- + * Copyright (c) 2014 Juniper Networks, Inc. + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +#ifndef _MKIMG_IMAGE_H_ +#define _MKIMG_IMAGE_H_ + +typedef int64_t lba_t; + +int image_copyin(lba_t blk, int fd, uint64_t *sizep); +int image_copyout(int fd); +lba_t image_get_size(void); +int image_init(void); +int image_set_size(lba_t blk); +int image_write(lba_t blk, void *buf, ssize_t len); + +#endif /* _MKIMG_IMAGE_H_ */ Modified: stable/10/usr.bin/mkimg/mbr.c ============================================================================== --- head/usr.bin/mkimg/mbr.c Sat Mar 29 19:03:10 2014 (r263918) +++ stable/10/usr.bin/mkimg/mbr.c Wed Jul 2 14:54:41 2014 (r268161) @@ -35,9 +35,14 @@ __FBSDID("$FreeBSD$"); #include #include +#include "image.h" #include "mkimg.h" #include "scheme.h" +#ifndef DOSPTYP_FAT32 +#define DOSPTYP_FAT32 0x0b +#endif + static struct mkimg_alias mbr_aliases[] = { { ALIAS_EBR, ALIAS_INT2TYPE(DOSPTYP_EXT) }, { ALIAS_FAT32, ALIAS_INT2TYPE(DOSPTYP_FAT32) }, @@ -64,7 +69,7 @@ mbr_chs(u_char *cyl, u_char *hd, u_char } static int -mbr_write(int fd, lba_t imgsz __unused, void *bootcode) +mbr_write(lba_t imgsz __unused, void *bootcode) { u_char *mbr; struct dos_partition *dpbase, *dp; @@ -92,11 +97,7 @@ mbr_write(int fd, lba_t imgsz __unused, le32enc(&dp->dp_start, part->block); le32enc(&dp->dp_size, part->size); } - error = mkimg_seek(fd, 0); - if (error == 0) { - if (write(fd, mbr, secsz) != (ssize_t)secsz) - error = errno; - } + error = image_write(0, mbr, 1); free(mbr); return (error); } Modified: stable/10/usr.bin/mkimg/mkimg.1 ============================================================================== --- head/usr.bin/mkimg/mkimg.1 Sat Mar 29 19:03:10 2014 (r263918) +++ stable/10/usr.bin/mkimg/mkimg.1 Wed Jul 2 14:54:41 2014 (r268161) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 27, 2014 +.Dd July 2, 2014 .Dt MKIMG 1 .Os .Sh NAME @@ -37,6 +37,7 @@ .Op Fl S Ar secsz .Op Fl T Ar tracksz .Op Fl b Ar bootcode +.Op Fl f Ar format .Op Fl o Ar outfile .Op Fl v .Fl s Ar scheme @@ -56,6 +57,10 @@ The disk image is written to by default or the file specified with the .Ar outfile argument. +The image file is a raw disk image by default, but the format of the +image file can be specified with the +.Ar format +argument. .Pp The disk image can be made bootable by specifying the scheme-specific boot block contents with the @@ -106,10 +111,16 @@ option increases the level of output tha .Nm utility prints. .Pp -For a complete list of supported partitioning schemes or for a detailed -description of how to specify partitions, run the +For a complete list of supported partitioning schemes or supported output +format, or for a detailed description of how to specify partitions, run the .Nm utility without any arguments. +.Sh ENVIRONMENT +.Bl -tag -width "TMPDIR" -compact +.It Ev TMPDIR +Directory to put temporary files in; default is +.Pa /tmp . +.El .Sh EXAMPLES To create a bootable disk image that is partitioned using the GPT scheme and containing a root file system that was previously created using @@ -121,6 +132,14 @@ utility as follows: -p freebsd-ufs:=root-file-system.ufs -p freebsd-swap::1G \ -o gpt.img .Pp +The command line given above results in a raw image file. +This is because no output format was given. +To create a VMDK image for example, add the +.Fl f Ar vmdk +argument to the +.Nm +utility and name the output file accordingly. +.Pp A nested partitioning scheme is created by running the .Nm utility twice. @@ -154,8 +173,8 @@ In the following example the file system .Sh HISTORY The .Nm -utility appeared in -.Fx 11.0 +utility first appeared in +.Fx 10.1 . .Sh AUTHORS The .Nm Modified: stable/10/usr.bin/mkimg/mkimg.c ============================================================================== --- head/usr.bin/mkimg/mkimg.c Sat Mar 29 19:03:10 2014 (r263918) +++ stable/10/usr.bin/mkimg/mkimg.c Wed Jul 2 14:54:41 2014 (r268161) @@ -42,15 +42,11 @@ __FBSDID("$FreeBSD$"); #include #include +#include "image.h" +#include "format.h" #include "mkimg.h" #include "scheme.h" -#if !defined(SPARSE_WRITE) -#define sparse_write write -#endif - -#define BUFFER_SIZE (1024*1024) - struct partlisthead partlist = STAILQ_HEAD_INITIALIZER(partlist); u_int nparts = 0; @@ -62,31 +58,18 @@ u_int nsecs = 1; u_int secsz = 512; u_int blksz = 0; -static int bcfd = -1; -static int outfd = 0; -static int tmpfd = -1; - -static char tmpfname[] = "/tmp/mkimg-XXXXXX"; - -static void -cleanup(void) -{ - - if (tmpfd != -1) - close(tmpfd); - unlink(tmpfname); -} - static void usage(const char *why) { - struct mkimg_scheme *s, **iter; + struct mkimg_format *f, **f_iter; + struct mkimg_scheme *s, **s_iter; warnx("error: %s", why); fprintf(stderr, "\nusage: %s \n", getprogname()); fprintf(stderr, " options:\n"); fprintf(stderr, "\t-b \t- file containing boot code\n"); + fprintf(stderr, "\t-f \n"); fprintf(stderr, "\t-o \t- file to write image into\n"); fprintf(stderr, "\t-p \n"); fprintf(stderr, "\t-s \n"); @@ -95,13 +78,19 @@ usage(const char *why) fprintf(stderr, "\t-S \t- logical sector size\n"); fprintf(stderr, "\t-T \t- number of tracks to simulate\n"); - fprintf(stderr, " schemes:\n"); - SET_FOREACH(iter, schemes) { - s = *iter; + fprintf(stderr, "\n formats:\n"); + SET_FOREACH(f_iter, formats) { + f = *f_iter; + fprintf(stderr, "\t%s\t- %s\n", f->name, f->description); + } + + fprintf(stderr, "\n schemes:\n"); + SET_FOREACH(s_iter, schemes) { + s = *s_iter; fprintf(stderr, "\t%s\t- %s\n", s->name, s->description); } - fprintf(stderr, " partition specification:\n"); + fprintf(stderr, "\n partition specification:\n"); fprintf(stderr, "\t[/]::\t- empty partition of given " "size\n"); fprintf(stderr, "\t[/]:=\t- partition content and size " @@ -228,14 +217,15 @@ parse_part(const char *spec) } #if defined(SPARSE_WRITE) -static ssize_t -sparse_write(int fd, const char *buf, size_t sz) +ssize_t +sparse_write(int fd, const void *ptr, size_t sz) { - const char *p; + const char *buf, *p; off_t ofs; size_t len; ssize_t wr, wrsz; + buf = ptr; wrsz = 0; p = memchr(buf, 0, sz); while (sz > 0) { @@ -268,53 +258,8 @@ sparse_write(int fd, const char *buf, si } #endif /* SPARSE_WRITE */ -static int -fdcopy(int src, int dst, uint64_t *count) -{ - char *buffer; - off_t ofs; - ssize_t rdsz, wrsz; - - /* A return value of -1 means that we can't write a sparse file. */ - ofs = lseek(dst, 0L, SEEK_CUR); - - if (count != NULL) - *count = 0; - - buffer = malloc(BUFFER_SIZE); - if (buffer == NULL) - return (errno); - while (1) { - rdsz = read(src, buffer, BUFFER_SIZE); - if (rdsz <= 0) { - free(buffer); - return ((rdsz < 0) ? errno : 0); - } - if (count != NULL) - *count += rdsz; - wrsz = (ofs == -1) ? - write(dst, buffer, rdsz) : - sparse_write(dst, buffer, rdsz); - if (wrsz < 0) - break; - } - free(buffer); - return (errno); -} - -int -mkimg_seek(int fd, lba_t blk) -{ - off_t off; - - off = blk * secsz; - if (lseek(fd, off, SEEK_SET) != off) - return (errno); - return (0); -} - static void -mkimg(int bfd) +mkimg(void) { FILE *fp; struct part *part; @@ -322,10 +267,6 @@ mkimg(int bfd) off_t bytesize; int error, fd; - error = scheme_bootcode(bfd); - if (error) - errc(EX_DATAERR, error, "boot code"); - /* First check partition information */ STAILQ_FOREACH(part, &partlist, link) { error = scheme_check_part(part); @@ -340,7 +281,6 @@ mkimg(int bfd) fprintf(stderr, "partition %d: starting block %llu " "... ", part->index + 1, (long long)block); part->block = block; - error = mkimg_seek(tmpfd, block); switch (part->kind) { case PART_KIND_SIZE: if (expand_number(part->contents, &bytesize) == -1) @@ -349,7 +289,7 @@ mkimg(int bfd) case PART_KIND_FILE: fd = open(part->contents, O_RDONLY, 0); if (fd != -1) { - error = fdcopy(fd, tmpfd, &bytesize); + error = image_copyin(block, fd, &bytesize); close(fd); } else error = errno; @@ -357,7 +297,8 @@ mkimg(int bfd) case PART_KIND_PIPE: fp = popen(part->contents, "r"); if (fp != NULL) { - error = fdcopy(fileno(fp), tmpfd, &bytesize); + fd = fileno(fp); + error = image_copyin(block, fd, &bytesize); pclose(fp); } else error = errno; @@ -376,15 +317,27 @@ mkimg(int bfd) } block = scheme_metadata(SCHEME_META_IMG_END, block); - error = (scheme_write(tmpfd, block)); + error = image_set_size(block); + if (!error) + error = format_resize(block); + if (error) + errc(EX_IOERR, error, "image sizing"); + block = image_get_size(); + ncyls = block / (nsecs * nheads); + error = (scheme_write(block)); + if (error) + errc(EX_IOERR, error, "writing metadata"); } int main(int argc, char *argv[]) { + int bcfd, outfd; int c, error; - while ((c = getopt(argc, argv, "b:o:p:s:vH:P:S:T:")) != -1) { + bcfd = -1; + outfd = 1; /* Write to stdout by default */ + while ((c = getopt(argc, argv, "b:f:o:p:s:vH:P:S:T:")) != -1) { switch (c) { case 'b': /* BOOT CODE */ if (bcfd != -1) @@ -393,8 +346,15 @@ main(int argc, char *argv[]) if (bcfd == -1) err(EX_UNAVAILABLE, "%s", optarg); break; + case 'f': /* OUTPUT FORMAT */ + if (format_selected() != NULL) + usage("multiple formats given"); + error = format_select(optarg); + if (error) + errc(EX_DATAERR, error, "format"); + break; case 'o': /* OUTPUT FILE */ - if (outfd != 0) + if (outfd != 1) usage("multiple output files given"); outfd = open(optarg, O_WRONLY | O_CREAT | O_TRUNC, S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH); @@ -467,35 +427,43 @@ main(int argc, char *argv[]) errx(EX_DATAERR, "%d partitions supported; %d given", scheme_max_parts(), nparts); - if (outfd == 0) { - if (atexit(cleanup) == -1) - err(EX_OSERR, "cannot register cleanup function"); - outfd = 1; - tmpfd = mkstemp(tmpfname); - if (tmpfd == -1) - err(EX_OSERR, "cannot create temporary file"); - } else - tmpfd = outfd; + if (format_selected() == NULL) + format_select("raw"); + + if (bcfd != -1) { + error = scheme_bootcode(bcfd); + close(bcfd); + if (error) + errc(EX_DATAERR, error, "boot code"); + } if (verbose) { fprintf(stderr, "Logical sector size: %u\n", secsz); fprintf(stderr, "Physical block size: %u\n", blksz); fprintf(stderr, "Sectors per track: %u\n", nsecs); fprintf(stderr, "Number of heads: %u\n", nheads); + fputc('\n', stderr); + fprintf(stderr, "Partitioning scheme: %s\n", + scheme_selected()->name); + fprintf(stderr, "Output file format: %s\n", + format_selected()->name); + fputc('\n', stderr); } - mkimg(bcfd); + error = image_init(); + if (error) + errc(EX_OSERR, error, "cannot initialize"); - if (verbose) - fprintf(stderr, "Number of cylinders: %u\n", ncyls); + mkimg(); - if (tmpfd != outfd) { - error = mkimg_seek(tmpfd, 0); - if (error == 0) - error = fdcopy(tmpfd, outfd, NULL); - if (error) - errc(EX_IOERR, error, "writing to stdout"); + if (verbose) { + fputc('\n', stderr); + fprintf(stderr, "Number of cylinders: %u\n", ncyls); } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 17:32:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF2E14DC; Wed, 2 Jul 2014 17:32:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0F2C2DBA; Wed, 2 Jul 2014 17:32:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62HWhtI087238; Wed, 2 Jul 2014 17:32:43 GMT (envelope-from truckman@svn.freebsd.org) Received: (from truckman@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62HWhYw087237; Wed, 2 Jul 2014 17:32:43 GMT (envelope-from truckman@svn.freebsd.org) Message-Id: <201407021732.s62HWhYw087237@svn.freebsd.org> From: Don Lewis Date: Wed, 2 Jul 2014 17:32:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268167 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 17:32:44 -0000 Author: truckman Date: Wed Jul 2 17:32:43 2014 New Revision: 268167 URL: http://svnweb.freebsd.org/changeset/base/268167 Log: MFC r266814 Initialize r_flags the same way in all cases using a sanitized copy of flags that has several bits cleared. The RF_WANTED and RF_FIRSTSHARE bits are invalid in this context, and we want to defer setting RF_ACTIVE in r_flags until later. This should make rman_get_flags() return the correct answer in all cases. Add a KASSERT() to catch callers which incorrectly pass the RF_WANTED or RF_FIRSTSHARE flags. Do a strict equality check on the share type bits of flags. In particular, do an equality check on RF_PREFETCHABLE. The previous code would allow one type of mismatch of RF_PREFETCHABLE but disallow the other type of mismatch. Also, ignore the the RF_ALIGNMENT_MASK bits since alignment validity should be handled by the amask check. This field contains an integer value, but previous code did a strange bitwise comparison on it. Leave the original value of flags unmolested as a minor debug aid. Change the start+amask overflow check to a KASSERT() since it is just meant to catch a highly unlikely programming error in the caller. Reviewed by: jhb Modified: stable/10/sys/kern/subr_rman.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/subr_rman.c ============================================================================== --- stable/10/sys/kern/subr_rman.c Wed Jul 2 17:25:28 2014 (r268166) +++ stable/10/sys/kern/subr_rman.c Wed Jul 2 17:32:43 2014 (r268167) @@ -435,12 +435,14 @@ rman_adjust_resource(struct resource *rr return (0); } +#define SHARE_TYPE(f) (f & (RF_SHAREABLE | RF_TIMESHARE | RF_PREFETCHABLE)) + struct resource * rman_reserve_resource_bound(struct rman *rm, u_long start, u_long end, u_long count, u_long bound, u_int flags, struct device *dev) { - u_int want_activate; + u_int new_rflags; struct resource_i *r, *s, *rv; u_long rstart, rend, amask, bmask; @@ -450,8 +452,10 @@ rman_reserve_resource_bound(struct rman "length %#lx, flags %u, device %s\n", rm->rm_descr, start, end, count, flags, dev == NULL ? "" : device_get_nameunit(dev))); - want_activate = (flags & RF_ACTIVE); - flags &= ~RF_ACTIVE; + KASSERT((flags & (RF_WANTED | RF_FIRSTSHARE)) == 0, + ("invalid flags %#x", flags)); + new_rflags = (flags & ~(RF_ACTIVE | RF_WANTED | RF_FIRSTSHARE)) | + RF_ALLOCATED; mtx_lock(rm->rm_mtx); @@ -466,10 +470,8 @@ rman_reserve_resource_bound(struct rman } amask = (1ul << RF_ALIGNMENT(flags)) - 1; - if (start > ULONG_MAX - amask) { - DPRINTF(("start+amask would wrap around\n")); - goto out; - } + KASSERT(start <= ULONG_MAX - amask, + ("start (%#lx) + amask (%#lx) would wrap around", start, amask)); /* If bound is 0, bmask will also be 0 */ bmask = ~(bound - 1); @@ -522,7 +524,7 @@ rman_reserve_resource_bound(struct rman if ((s->r_end - s->r_start + 1) == count) { DPRINTF(("candidate region is entire chunk\n")); rv = s; - rv->r_flags |= RF_ALLOCATED | flags; + rv->r_flags = new_rflags; rv->r_dev = dev; goto out; } @@ -542,7 +544,7 @@ rman_reserve_resource_bound(struct rman goto out; rv->r_start = rstart; rv->r_end = rstart + count - 1; - rv->r_flags = flags | RF_ALLOCATED; + rv->r_flags = new_rflags; rv->r_dev = dev; rv->r_rm = rm; @@ -603,7 +605,7 @@ rman_reserve_resource_bound(struct rman goto out; for (s = r; s && s->r_end <= end; s = TAILQ_NEXT(s, r_link)) { - if ((s->r_flags & flags) == flags && + if (SHARE_TYPE(s->r_flags) == SHARE_TYPE(flags) && s->r_start >= start && (s->r_end - s->r_start + 1) == count && (s->r_start & amask) == 0 && @@ -613,8 +615,7 @@ rman_reserve_resource_bound(struct rman goto out; rv->r_start = s->r_start; rv->r_end = s->r_end; - rv->r_flags = s->r_flags & - (RF_ALLOCATED | RF_SHAREABLE | RF_TIMESHARE); + rv->r_flags = new_rflags; rv->r_dev = dev; rv->r_rm = rm; if (s->r_sharehead == NULL) { @@ -641,13 +642,12 @@ rman_reserve_resource_bound(struct rman */ out: /* - * If the user specified RF_ACTIVE in the initial flags, - * which is reflected in `want_activate', we attempt to atomically + * If the user specified RF_ACTIVE in flags, we attempt to atomically * activate the resource. If this fails, we release the resource * and indicate overall failure. (This behavior probably doesn't * make sense for RF_TIMESHARE-type resources.) */ - if (rv && want_activate) { + if (rv && (flags & RF_ACTIVE) != 0) { struct resource_i *whohas; if (int_rman_activate_resource(rm, rv, &whohas)) { int_rman_release_resource(rm, rv); From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 19:18:59 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1372CDC; Wed, 2 Jul 2014 19:18:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE1E92796; Wed, 2 Jul 2014 19:18:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62JIx2a037066; Wed, 2 Jul 2014 19:18:59 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62JIxDB037065; Wed, 2 Jul 2014 19:18:59 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201407021918.s62JIxDB037065@svn.freebsd.org> From: Bryan Drewery Date: Wed, 2 Jul 2014 19:18:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r268168 - stable/8/etc/rc.d X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 19:19:00 -0000 Author: bdrewery Date: Wed Jul 2 19:18:59 2014 New Revision: 268168 URL: http://svnweb.freebsd.org/changeset/base/268168 Log: MFC r243080: Only pass ip[46].addr when _addrl contains a value Partial MFC r204759: Redirect stdin from /dev/null when starting a jail: At least in RELENG_7 this fixes some start problems for some programs from the ports. It is also more correct, as a jail shall not expect input (interactivity) from the jail-host. PR: 180916 Modified: stable/8/etc/rc.d/jail Directory Properties: stable/8/etc/ (props changed) stable/8/etc/rc.d/ (props changed) Modified: stable/8/etc/rc.d/jail ============================================================================== --- stable/8/etc/rc.d/jail Wed Jul 2 17:32:43 2014 (r268167) +++ stable/8/etc/rc.d/jail Wed Jul 2 19:18:59 2014 (r268168) @@ -654,7 +654,9 @@ jail_start() done eval ${_setfib} jail -n ${_jail} ${_flags} -i -c path=${_rootdir} host.hostname=${_hostname} \ - ip4.addr=\"${_addrl}\" ip6.addr=\"${_addr6l}\" ${_parameters} command=${_exec_start} > ${_tmp_jail} 2>&1 + ${_addrl:+ip4.addr=\"${_addrl}\"} ${_addr6l:+ip6.addr=\"${_addr6l}\"} \ + ${_parameters} command=${_exec_start} > ${_tmp_jail} 2>&1 \ + Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8FAE958F; Wed, 2 Jul 2014 19:25:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7BF88288E; Wed, 2 Jul 2014 19:25:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62JPQh3041723; Wed, 2 Jul 2014 19:25:26 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62JPQee041722; Wed, 2 Jul 2014 19:25:26 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201407021925.s62JPQee041722@svn.freebsd.org> From: Devin Teske Date: Wed, 2 Jul 2014 19:25:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268170 - stable/10/usr.sbin/bsdconfig/share/packages X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 19:25:26 -0000 Author: dteske Date: Wed Jul 2 19:25:25 2014 New Revision: 268170 URL: http://svnweb.freebsd.org/changeset/base/268170 Log: MFC r267680: Fix a code typo that prevented mkdir from firing (unnoticed usually because another part of the code succeeded in making the same directory). Modified: stable/10/usr.sbin/bsdconfig/share/packages/index.subr Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdconfig/share/packages/index.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/packages/index.subr Wed Jul 2 19:22:12 2014 (r268169) +++ stable/10/usr.sbin/bsdconfig/share/packages/index.subr Wed Jul 2 19:25:25 2014 (r268170) @@ -258,7 +258,7 @@ f_index_initialize() # Finally, move the temporary file into place case "$PACKAGES_INDEX_CACHEFILE" in - */*) f_eval_catch -d $funcname mkdir \ + */*) f_eval_catch -d $__funcname mkdir \ 'mkdir -p "%s"' "${PACKAGES_INDEX_CACHEFILE%/*}" esac f_eval_catch -d $__funcname mv 'mv -f "%s" "%s"' \ From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 19:25:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E8A116C9; Wed, 2 Jul 2014 19:25:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D500C2892; Wed, 2 Jul 2014 19:25:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62JPnDx041813; Wed, 2 Jul 2014 19:25:49 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62JPnjZ041812; Wed, 2 Jul 2014 19:25:49 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201407021925.s62JPnjZ041812@svn.freebsd.org> From: Devin Teske Date: Wed, 2 Jul 2014 19:25:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268171 - stable/9/usr.sbin/bsdconfig/share/packages X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 19:25:50 -0000 Author: dteske Date: Wed Jul 2 19:25:49 2014 New Revision: 268171 URL: http://svnweb.freebsd.org/changeset/base/268171 Log: MFC r267680: Fix a code typo that prevented mkdir from firing (unnoticed usually because another part of the code succeeded in making the same directory). Modified: stable/9/usr.sbin/bsdconfig/share/packages/index.subr Directory Properties: stable/9/usr.sbin/bsdconfig/ (props changed) Modified: stable/9/usr.sbin/bsdconfig/share/packages/index.subr ============================================================================== --- stable/9/usr.sbin/bsdconfig/share/packages/index.subr Wed Jul 2 19:25:25 2014 (r268170) +++ stable/9/usr.sbin/bsdconfig/share/packages/index.subr Wed Jul 2 19:25:49 2014 (r268171) @@ -258,7 +258,7 @@ f_index_initialize() # Finally, move the temporary file into place case "$PACKAGES_INDEX_CACHEFILE" in - */*) f_eval_catch -d $funcname mkdir \ + */*) f_eval_catch -d $__funcname mkdir \ 'mkdir -p "%s"' "${PACKAGES_INDEX_CACHEFILE%/*}" esac f_eval_catch -d $__funcname mv 'mv -f "%s" "%s"' \ From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 21:53:35 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 381FF758; Wed, 2 Jul 2014 21:53:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 24E992616; Wed, 2 Jul 2014 21:53:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62LrZKn014319; Wed, 2 Jul 2014 21:53:35 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62LrZXB014318; Wed, 2 Jul 2014 21:53:35 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201407022153.s62LrZXB014318@svn.freebsd.org> From: Marcel Moolenaar Date: Wed, 2 Jul 2014 21:53:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268181 - stable/10/sys/ia64/ia64 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 21:53:35 -0000 Author: marcel Date: Wed Jul 2 21:53:34 2014 New Revision: 268181 URL: http://svnweb.freebsd.org/changeset/base/268181 Log: MFC 257475: Respect the kern.smp.disabled tunable. Modified: stable/10/sys/ia64/ia64/mp_machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ia64/ia64/mp_machdep.c ============================================================================== --- stable/10/sys/ia64/ia64/mp_machdep.c Wed Jul 2 21:28:50 2014 (r268180) +++ stable/10/sys/ia64/ia64/mp_machdep.c Wed Jul 2 21:53:34 2014 (r268181) @@ -65,6 +65,8 @@ __FBSDID("$FreeBSD$"); extern uint64_t bdata[]; +extern int smp_disabled; + MALLOC_DEFINE(M_SMP, "SMP", "SMP related allocations"); void ia64_ap_startup(void); @@ -292,6 +294,9 @@ cpu_mp_add(u_int acpi_id, u_int id, u_in void *dpcpu; u_int cpuid, sapic_id; + if (smp_disabled) + return; + sapic_id = SAPIC_ID_SET(id, eid); cpuid = (IA64_LID_GET_SAPIC_ID(ia64_get_lid()) == sapic_id) ? 0 : smp_cpus++; From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 22:06:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5BE1EFE; Wed, 2 Jul 2014 22:06:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA6B6274F; Wed, 2 Jul 2014 22:06:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62M6WUJ021817; Wed, 2 Jul 2014 22:06:32 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62M6WAm021812; Wed, 2 Jul 2014 22:06:32 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201407022206.s62M6WAm021812@svn.freebsd.org> From: Marcel Moolenaar Date: Wed, 2 Jul 2014 22:06:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268184 - in stable/10/sys/ia64: ia64 include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 22:06:32 -0000 Author: marcel Date: Wed Jul 2 22:06:31 2014 New Revision: 268184 URL: http://svnweb.freebsd.org/changeset/base/268184 Log: MFC r257477: Purge the translation cache of APs before we unleash them. Modified: stable/10/sys/ia64/ia64/mp_machdep.c stable/10/sys/ia64/ia64/pmap.c stable/10/sys/ia64/include/pmap.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ia64/ia64/mp_machdep.c ============================================================================== --- stable/10/sys/ia64/ia64/mp_machdep.c Wed Jul 2 22:04:14 2014 (r268183) +++ stable/10/sys/ia64/ia64/mp_machdep.c Wed Jul 2 22:06:31 2014 (r268184) @@ -240,6 +240,8 @@ ia64_ap_startup(void) KASSERT(PCPU_GET(idlethread) != NULL, ("no idle thread")); PCPU_SET(curthread, PCPU_GET(idlethread)); + pmap_invalidate_all(); + atomic_add_int(&ia64_ap_state.as_awake, 1); while (!smp_started) cpu_spinwait(); Modified: stable/10/sys/ia64/ia64/pmap.c ============================================================================== --- stable/10/sys/ia64/ia64/pmap.c Wed Jul 2 22:04:14 2014 (r268183) +++ stable/10/sys/ia64/ia64/pmap.c Wed Jul 2 22:06:31 2014 (r268184) @@ -262,7 +262,6 @@ static vm_page_t pmap_pv_reclaim(pmap_t static void pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot); static void pmap_free_pte(struct ia64_lpte *pte, vm_offset_t va); -static void pmap_invalidate_all(void); static int pmap_remove_pte(pmap_t pmap, struct ia64_lpte *pte, vm_offset_t va, pv_entry_t pv, int freepte); static int pmap_remove_vhpt(vm_offset_t va); @@ -537,13 +536,12 @@ pmap_invalidate_page(vm_offset_t va) critical_exit(); } -static void -pmap_invalidate_all_1(void *arg) +void +pmap_invalidate_all(void) { uint64_t addr; int i, j; - critical_enter(); addr = pmap_ptc_e_base; for (i = 0; i < pmap_ptc_e_count1; i++) { for (j = 0; j < pmap_ptc_e_count2; j++) { @@ -552,20 +550,7 @@ pmap_invalidate_all_1(void *arg) } addr += pmap_ptc_e_stride1; } - critical_exit(); -} - -static void -pmap_invalidate_all(void) -{ - -#ifdef SMP - if (mp_ncpus > 1) { - smp_rendezvous(NULL, pmap_invalidate_all_1, NULL, NULL); - return; - } -#endif - pmap_invalidate_all_1(NULL); + ia64_srlz_i(); } static uint32_t Modified: stable/10/sys/ia64/include/pmap.h ============================================================================== --- stable/10/sys/ia64/include/pmap.h Wed Jul 2 22:04:14 2014 (r268183) +++ stable/10/sys/ia64/include/pmap.h Wed Jul 2 22:06:31 2014 (r268184) @@ -122,6 +122,7 @@ extern int pmap_vhpt_log2size; vm_offset_t pmap_alloc_vhpt(void); void pmap_bootstrap(void); +void pmap_invalidate_all(void); void pmap_kenter(vm_offset_t va, vm_offset_t pa); vm_paddr_t pmap_kextract(vm_offset_t va); void pmap_kremove(vm_offset_t); From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 22:19:59 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CA07221B; Wed, 2 Jul 2014 22:19:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6B3A287F; Wed, 2 Jul 2014 22:19:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62MJxFQ028768; Wed, 2 Jul 2014 22:19:59 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62MJxX9028767; Wed, 2 Jul 2014 22:19:59 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201407022219.s62MJxX9028767@svn.freebsd.org> From: Marcel Moolenaar Date: Wed, 2 Jul 2014 22:19:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268189 - stable/10/sys/ia64/ia64 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 22:19:59 -0000 Author: marcel Date: Wed Jul 2 22:19:59 2014 New Revision: 268189 URL: http://svnweb.freebsd.org/changeset/base/268189 Log: MFC r257484: Change PAL_PTCE_INFO related variables. Modified: stable/10/sys/ia64/ia64/pmap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ia64/ia64/pmap.c ============================================================================== --- stable/10/sys/ia64/ia64/pmap.c Wed Jul 2 22:17:27 2014 (r268188) +++ stable/10/sys/ia64/ia64/pmap.c Wed Jul 2 22:19:59 2014 (r268189) @@ -195,12 +195,12 @@ extern struct ia64_lpte ***ia64_kptdir; vm_offset_t kernel_vm_end; -/* Values for ptc.e. XXX values for SKI. */ -static uint64_t pmap_ptc_e_base = 0x100000000; -static uint64_t pmap_ptc_e_count1 = 3; -static uint64_t pmap_ptc_e_count2 = 2; -static uint64_t pmap_ptc_e_stride1 = 0x2000; -static uint64_t pmap_ptc_e_stride2 = 0x100000000; +/* Defaults for ptc.e. */ +static uint64_t pmap_ptc_e_base = 0; +static uint32_t pmap_ptc_e_count1 = 1; +static uint32_t pmap_ptc_e_count2 = 1; +static uint32_t pmap_ptc_e_stride1 = 0; +static uint32_t pmap_ptc_e_stride2 = 0; struct mtx pmap_ptc_mutex; @@ -324,12 +324,12 @@ pmap_bootstrap() panic("Can't configure ptc.e parameters"); pmap_ptc_e_base = res.pal_result[0]; pmap_ptc_e_count1 = res.pal_result[1] >> 32; - pmap_ptc_e_count2 = res.pal_result[1] & ((1L<<32) - 1); + pmap_ptc_e_count2 = res.pal_result[1]; pmap_ptc_e_stride1 = res.pal_result[2] >> 32; - pmap_ptc_e_stride2 = res.pal_result[2] & ((1L<<32) - 1); + pmap_ptc_e_stride2 = res.pal_result[2]; if (bootverbose) - printf("ptc.e base=0x%lx, count1=%ld, count2=%ld, " - "stride1=0x%lx, stride2=0x%lx\n", + printf("ptc.e base=0x%lx, count1=%u, count2=%u, " + "stride1=0x%x, stride2=0x%x\n", pmap_ptc_e_base, pmap_ptc_e_count1, pmap_ptc_e_count2, From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 23:05:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D6659351; Wed, 2 Jul 2014 23:05:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B078E2C69; Wed, 2 Jul 2014 23:05:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62N5vl3051745; Wed, 2 Jul 2014 23:05:57 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62N5vQ1051744; Wed, 2 Jul 2014 23:05:57 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201407022305.s62N5vQ1051744@svn.freebsd.org> From: Marcel Moolenaar Date: Wed, 2 Jul 2014 23:05:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268192 - stable/10/sys/ia64/ia64 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 23:05:57 -0000 Author: marcel Date: Wed Jul 2 23:05:57 2014 New Revision: 268192 URL: http://svnweb.freebsd.org/changeset/base/268192 Log: MFC r259959 & r260009: Add prototypical support for minidumps. Modified: stable/10/sys/ia64/ia64/dump_machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ia64/ia64/dump_machdep.c ============================================================================== --- stable/10/sys/ia64/ia64/dump_machdep.c Wed Jul 2 22:34:06 2014 (r268191) +++ stable/10/sys/ia64/ia64/dump_machdep.c Wed Jul 2 23:05:57 2014 (r268192) @@ -56,7 +56,10 @@ CTASSERT(sizeof(struct kerneldumpheader) #define MD_ALIGN(x) (((off_t)(x) + EFI_PAGE_MASK) & ~EFI_PAGE_MASK) #define DEV_ALIGN(x) (((off_t)(x) + (DEV_BSIZE-1)) & ~(DEV_BSIZE-1)) -typedef int callback_t(struct efi_md*, int, void*); +static int minidump = 0; +TUNABLE_INT("debug.minidump", &minidump); +SYSCTL_INT(_debug, OID_AUTO, minidump, CTLFLAG_RW, &minidump, 0, + "Enable mini crash dumps"); static struct kerneldumpheader kdh; static off_t dumplo, fileofs; @@ -83,7 +86,7 @@ buf_write(struct dumperinfo *di, char *p error = dump_write(di, buffer, 0, dumplo, DEV_BSIZE); if (error) - return error; + return (error); dumplo += DEV_BSIZE; fragsz = 0; } @@ -106,8 +109,14 @@ buf_flush(struct dumperinfo *di) return (error); } +/* + * Physical dump support + */ + +typedef int phys_callback_t(struct efi_md*, int, void*); + static int -cb_dumpdata(struct efi_md *mdp, int seqnr, void *arg) +phys_cb_dumpdata(struct efi_md *mdp, int seqnr, void *arg) { struct dumperinfo *di = (struct dumperinfo*)arg; vm_offset_t pa; @@ -153,7 +162,7 @@ cb_dumpdata(struct efi_md *mdp, int seqn } static int -cb_dumphdr(struct efi_md *mdp, int seqnr, void *arg) +phys_cb_dumphdr(struct efi_md *mdp, int seqnr, void *arg) { struct dumperinfo *di = (struct dumperinfo*)arg; Elf64_Phdr phdr; @@ -175,7 +184,7 @@ cb_dumphdr(struct efi_md *mdp, int seqnr } static int -cb_size(struct efi_md *mdp, int seqnr, void *arg) +phys_cb_size(struct efi_md *mdp, int seqnr, void *arg) { uint64_t *sz = (uint64_t*)arg; @@ -184,7 +193,7 @@ cb_size(struct efi_md *mdp, int seqnr, v } static int -foreach_chunk(callback_t cb, void *arg) +phys_foreach(phys_callback_t cb, void *arg) { struct efi_md *mdp; int error, seqnr; @@ -206,6 +215,117 @@ foreach_chunk(callback_t cb, void *arg) return (seqnr); } +/* + * Virtual dump (aka minidump) support + */ + +typedef int virt_callback_t(vm_offset_t, vm_size_t, int, void*); + +static int +virt_cb_size(vm_offset_t va, vm_size_t sz, int seqnr, void *arg) +{ + uint64_t *dumpsize = (uint64_t *)arg; + + *dumpsize += sz; + return (0); +} + +static int +virt_cb_dumphdr(vm_offset_t va, vm_size_t sz, int seqnr, void *arg) +{ + struct dumperinfo *di = (struct dumperinfo *)arg; + Elf64_Phdr phdr; + int error; + + bzero(&phdr, sizeof(phdr)); + phdr.p_type = PT_LOAD; + phdr.p_flags = PF_R; /* XXX */ + phdr.p_offset = fileofs; + phdr.p_vaddr = va; + phdr.p_paddr = ~0UL; + phdr.p_filesz = sz; + phdr.p_memsz = sz; + phdr.p_align = PAGE_SIZE; + + error = buf_write(di, (char*)&phdr, sizeof(phdr)); + fileofs += phdr.p_filesz; + return (error); +} + +static int +virt_cb_dumpdata(vm_offset_t va, vm_size_t sz, int seqnr, void *arg) +{ + struct dumperinfo *di = (struct dumperinfo *)arg; + size_t counter, iosz; + int c, error, twiddle; + + error = 0; /* catch case in which pgs is 0 */ + counter = 0; /* Update twiddle every 16MB */ + twiddle = 0; + + printf(" chunk %d: %ld pages ", seqnr, atop(sz)); + + while (sz) { + iosz = (sz > DFLTPHYS) ? DFLTPHYS : sz; + counter += iosz; + if (counter >> 24) { + printf("%c\b", "|/-\\"[twiddle++ & 3]); + counter &= (1<<24) - 1; + } +#ifdef SW_WATCHDOG + wdog_kern_pat(WD_LASTVAL); +#endif + error = dump_write(di, (void*)va, 0, dumplo, iosz); + if (error) + break; + dumplo += iosz; + sz -= iosz; + va += iosz; + + /* Check for user abort. */ + c = cncheckc(); + if (c == 0x03) + return (ECANCELED); + if (c != -1) + printf("(CTRL-C to abort) "); + } + printf("... %s\n", (error) ? "fail" : "ok"); + return (error); +} + +static int +virt_foreach(virt_callback_t cb, void *arg) +{ + vm_offset_t va; + vm_size_t sz; + int error, seqnr; + + seqnr = 0; + while (1) { + switch (seqnr) { + case 0: + va = IA64_PBVM_BASE; + sz = round_page(bootinfo->bi_kernend) - va; + break; + default: + va = 0; + sz = 0; + break; + } + if (va == 0 && sz == 0) + break; + error = (*cb)(va, sz, seqnr, arg); + if (error) + return (-error); + seqnr++; + } + return (seqnr); +} + +/* + * main entry point. + */ + void dumpsys(struct dumperinfo *di) { @@ -213,7 +333,7 @@ dumpsys(struct dumperinfo *di) uint64_t dumpsize; off_t hdrgap; size_t hdrsz; - int error; + int error, status; bzero(&ehdr, sizeof(ehdr)); ehdr.e_ident[EI_MAG0] = ELFMAG0; @@ -230,18 +350,25 @@ dumpsys(struct dumperinfo *di) ehdr.e_ident[EI_OSABI] = ELFOSABI_STANDALONE; /* XXX big picture? */ ehdr.e_type = ET_CORE; ehdr.e_machine = EM_IA_64; - ehdr.e_entry = ia64_tpa((uintptr_t)bootinfo); + ehdr.e_entry = (minidump) ? (uintptr_t)bootinfo : + ia64_tpa((uintptr_t)bootinfo); ehdr.e_phoff = sizeof(ehdr); - ehdr.e_flags = EF_IA_64_ABSOLUTE; /* XXX misuse? */ + ehdr.e_flags = (minidump) ? 0 : EF_IA_64_ABSOLUTE; /* XXX misuse? */ ehdr.e_ehsize = sizeof(ehdr); ehdr.e_phentsize = sizeof(Elf64_Phdr); ehdr.e_shentsize = sizeof(Elf64_Shdr); /* Calculate dump size. */ dumpsize = 0L; - ehdr.e_phnum = foreach_chunk(cb_size, &dumpsize); + status = (minidump) ? virt_foreach(virt_cb_size, &dumpsize) : + phys_foreach(phys_cb_size, &dumpsize); + if (status < 0) { + error = -status; + goto fail; + } + ehdr.e_phnum = status; hdrsz = ehdr.e_phoff + ehdr.e_phnum * ehdr.e_phentsize; - fileofs = MD_ALIGN(hdrsz); + fileofs = (minidump) ? round_page(hdrsz) : MD_ALIGN(hdrsz); dumpsize += fileofs; hdrgap = fileofs - DEV_ALIGN(hdrsz); @@ -270,24 +397,30 @@ dumpsys(struct dumperinfo *di) goto fail; /* Dump program headers */ - error = foreach_chunk(cb_dumphdr, di); - if (error < 0) + status = (minidump) ? virt_foreach(virt_cb_dumphdr, di) : + phys_foreach(phys_cb_dumphdr, di); + if (status < 0) { + error = -status; goto fail; + } buf_flush(di); /* * All headers are written using blocked I/O, so we know the - * current offset is (still) block aligned. Skip the alignement + * current offset is (still) block aligned. Skip the alignment * in the file to have the segment contents aligned at page - * boundary. We cannot use MD_ALIGN on dumplo, because we don't - * care and may very well be unaligned within the dump device. + * boundary. For physical dumps, it's the EFI page size (= 4K). + * For minidumps it's the kernel's page size (= 8K). */ dumplo += hdrgap; /* Dump memory chunks (updates dumplo) */ - error = foreach_chunk(cb_dumpdata, di); - if (error < 0) + status = (minidump) ? virt_foreach(virt_cb_dumpdata, di) : + phys_foreach(phys_cb_dumpdata, di); + if (status < 0) { + error = -status; goto fail; + } /* Dump trailer */ error = dump_write(di, &kdh, 0, dumplo, sizeof(kdh)); @@ -300,9 +433,6 @@ dumpsys(struct dumperinfo *di) return; fail: - if (error < 0) - error = -error; - if (error == ECANCELED) printf("\nDump aborted\n"); else From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 23:12:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E86A2A79; Wed, 2 Jul 2014 23:12:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C93922D42; Wed, 2 Jul 2014 23:12:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62NCusY056508; Wed, 2 Jul 2014 23:12:56 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62NCun6056507; Wed, 2 Jul 2014 23:12:56 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201407022312.s62NCun6056507@svn.freebsd.org> From: Marcel Moolenaar Date: Wed, 2 Jul 2014 23:12:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268194 - stable/10/sys/ia64/ia64 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 23:12:57 -0000 Author: marcel Date: Wed Jul 2 23:12:56 2014 New Revision: 268194 URL: http://svnweb.freebsd.org/changeset/base/268194 Log: MFC r262726: When reading physical memory, make sure to access it using the right memory attributes. Modified: stable/10/sys/ia64/ia64/mem.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ia64/ia64/mem.c ============================================================================== --- stable/10/sys/ia64/ia64/mem.c Wed Jul 2 23:07:01 2014 (r268193) +++ stable/10/sys/ia64/ia64/mem.c Wed Jul 2 23:12:56 2014 (r268194) @@ -47,19 +47,11 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include -#include -#include -#include -#include -#include #include #include - -#include -#include +#include #include #include @@ -69,10 +61,25 @@ __FBSDID("$FreeBSD$"); struct mem_range_softc mem_range_softc; -static __inline int -ia64_pa_access(vm_offset_t pa) +static int +mem_phys2virt(vm_offset_t offset, int prot, void **ptr, u_long *limit) { - return (VM_PROT_READ|VM_PROT_WRITE); + struct efi_md *md; + + if (prot & ~(VM_PROT_READ | VM_PROT_WRITE)) + return (EPERM); + + md = efi_md_find(offset); + if (md == NULL) + return (EFAULT); + + if (md->md_type == EFI_MD_TYPE_BAD) + return (EIO); + + *ptr = (void *)((md->md_attr & EFI_MD_ATTR_WB) + ? IA64_PHYS_TO_RR7(offset) : IA64_PHYS_TO_RR6(offset)); + *limit = (md->md_pages * EFI_PAGE_SIZE) - (offset - md->md_phys); + return (0); } /* ARGSUSED */ @@ -80,10 +87,15 @@ int memrw(struct cdev *dev, struct uio *uio, int flags) { struct iovec *iov; - vm_offset_t addr, eaddr, o, v; - int c, error, rw; + off_t ofs; + vm_offset_t addr; + void *ptr; + u_long limit; + int count, error, phys, rw; error = 0; + rw = (uio->uio_rw == UIO_READ) ? VM_PROT_READ : VM_PROT_WRITE; + while (uio->uio_resid > 0 && !error) { iov = uio->uio_iov; if (iov->iov_len == 0) { @@ -94,51 +106,41 @@ memrw(struct cdev *dev, struct uio *uio, continue; } - if (dev2unit(dev) == CDEV_MINOR_MEM) { - v = uio->uio_offset; -kmemphys: - /* Allow reads only in RAM. */ - rw = (uio->uio_rw == UIO_READ) - ? VM_PROT_READ : VM_PROT_WRITE; - if ((ia64_pa_access(v) & rw) != rw) { - error = EFAULT; - c = 0; - break; - } + ofs = uio->uio_offset; - o = uio->uio_offset & PAGE_MASK; - c = min(uio->uio_resid, (int)(PAGE_SIZE - o)); - error = uiomove((caddr_t)IA64_PHYS_TO_RR7(v), c, uio); - continue; + phys = (dev2unit(dev) == CDEV_MINOR_MEM) ? 1 : 0; + if (phys == 0 && ofs >= IA64_RR_BASE(6)) { + ofs = IA64_RR_MASK(ofs); + phys++; } - else if (dev2unit(dev) == CDEV_MINOR_KMEM) { - v = uio->uio_offset; - - if (v >= IA64_RR_BASE(6)) { - v = IA64_RR_MASK(v); - goto kmemphys; - } - c = min(iov->iov_len, MAXPHYS); + if (phys) { + error = mem_phys2virt(ofs, rw, &ptr, &limit); + if (error) + return (error); + + count = min(uio->uio_resid, limit); + error = uiomove(ptr, count, uio); + } else { + ptr = (void *)ofs; + count = iov->iov_len; /* * Make sure that all of the pages are currently * resident so that we don't create any zero-fill * pages. */ - addr = trunc_page(v); - eaddr = round_page(v + c); + limit = round_page(ofs + count); + addr = trunc_page(ofs); if (addr < VM_MAXUSER_ADDRESS) - return (EFAULT); - for (; addr < eaddr; addr += PAGE_SIZE) { + return (EINVAL); + for (; addr < limit; addr += PAGE_SIZE) { if (pmap_kextract(addr) == 0) return (EFAULT); } - if (!kernacc((caddr_t)v, c, (uio->uio_rw == UIO_READ) - ? VM_PROT_READ : VM_PROT_WRITE)) + if (!kernacc(ptr, count, rw)) return (EFAULT); - error = uiomove((caddr_t)v, c, uio); - continue; + error = uiomove(ptr, count, uio); } /* else panic! */ } @@ -153,6 +155,10 @@ int memmmap(struct cdev *dev, vm_ooffset_t offset, vm_paddr_t *paddr, int prot, vm_memattr_t *memattr) { + void *ptr; + u_long limit; + int error; + /* * /dev/mem is the only one that makes sense through this * interface. For /dev/kmem any physaddr we return here @@ -160,13 +166,14 @@ memmmap(struct cdev *dev, vm_ooffset_t o * a later time. */ if (dev2unit(dev) != CDEV_MINOR_MEM) - return (-1); + return (ENXIO); - /* - * Allow access only in RAM. - */ - if ((prot & ia64_pa_access(atop((vm_offset_t)offset))) != prot) - return (-1); - *paddr = IA64_PHYS_TO_RR7(offset); + error = mem_phys2virt(offset, prot, &ptr, &limit); + if (error) + return (error); + + *paddr = offset; + *memattr = ((uintptr_t)ptr >= IA64_RR_BASE(7)) ? + VM_MEMATTR_WRITE_BACK : VM_MEMATTR_UNCACHEABLE; return (0); } From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 23:23:19 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 696ACD82; Wed, 2 Jul 2014 23:23:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DE332E10; Wed, 2 Jul 2014 23:23:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62NNJx3061183; Wed, 2 Jul 2014 23:23:19 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62NNIBB061175; Wed, 2 Jul 2014 23:23:18 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201407022323.s62NNIBB061175@svn.freebsd.org> From: Marcel Moolenaar Date: Wed, 2 Jul 2014 23:23:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268195 - stable/10/sys/ia64/ia64 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 23:23:19 -0000 Author: marcel Date: Wed Jul 2 23:23:18 2014 New Revision: 268195 URL: http://svnweb.freebsd.org/changeset/base/268195 Log: MFC r263248 & r263257: In intr_event_handle() we already save and set td_intr_frame, so don't do it also in ia64_handle_intr(). Modified: stable/10/sys/ia64/ia64/clock.c stable/10/sys/ia64/ia64/interrupt.c stable/10/sys/ia64/ia64/mp_machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ia64/ia64/clock.c ============================================================================== --- stable/10/sys/ia64/ia64/clock.c Wed Jul 2 23:12:56 2014 (r268194) +++ stable/10/sys/ia64/ia64/clock.c Wed Jul 2 23:23:18 2014 (r268195) @@ -76,6 +76,7 @@ static u_int ia64_ih_clock(struct thread *td, u_int xiv, struct trapframe *tf) { struct eventtimer *et; + struct trapframe *stf; uint64_t itc, load; uint32_t mode; @@ -96,8 +97,12 @@ ia64_ih_clock(struct thread *td, u_int x ia64_srlz_d(); et = &ia64_clock_et; - if (et->et_active) + if (et->et_active) { + stf = td->td_intr_frame; + td->td_intr_frame = tf; et->et_event_cb(et, et->et_arg); + td->td_intr_frame = stf; + } return (1); } Modified: stable/10/sys/ia64/ia64/interrupt.c ============================================================================== --- stable/10/sys/ia64/ia64/interrupt.c Wed Jul 2 23:12:56 2014 (r268194) +++ stable/10/sys/ia64/ia64/interrupt.c Wed Jul 2 23:23:18 2014 (r268195) @@ -301,7 +301,6 @@ void ia64_handle_intr(struct trapframe *tf) { struct thread *td; - struct trapframe *stf; u_int xiv; td = curthread; @@ -316,9 +315,6 @@ ia64_handle_intr(struct trapframe *tf) } critical_enter(); - stf = td->td_intr_frame; - td->td_intr_frame = tf; - do { CTR2(KTR_INTR, "INTR: ITC=%u, XIV=%u", (u_int)tf->tf_special.ifa, xiv); @@ -329,8 +325,6 @@ ia64_handle_intr(struct trapframe *tf) xiv = ia64_get_ivr(); ia64_srlz_d(); } while (xiv != 15); - - td->td_intr_frame = stf; critical_exit(); out: Modified: stable/10/sys/ia64/ia64/mp_machdep.c ============================================================================== --- stable/10/sys/ia64/ia64/mp_machdep.c Wed Jul 2 23:12:56 2014 (r268194) +++ stable/10/sys/ia64/ia64/mp_machdep.c Wed Jul 2 23:23:18 2014 (r268195) @@ -113,10 +113,14 @@ ia64_ih_ast(struct thread *td, u_int xiv static u_int ia64_ih_hardclock(struct thread *td, u_int xiv, struct trapframe *tf) { + struct trapframe *stf; PCPU_INC(md.stats.pcs_nhardclocks); CTR1(KTR_SMP, "IPI_HARDCLOCK, cpuid=%d", PCPU_GET(cpuid)); + stf = td->td_intr_frame; + td->td_intr_frame = tf; hardclockintr(); + td->td_intr_frame = stf; return (0); } From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 23:32:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B2CCB551; Wed, 2 Jul 2014 23:32:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E4E52EF9; Wed, 2 Jul 2014 23:32:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62NW61k066140; Wed, 2 Jul 2014 23:32:06 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62NW565066135; Wed, 2 Jul 2014 23:32:05 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201407022332.s62NW565066135@svn.freebsd.org> From: Scott Long Date: Wed, 2 Jul 2014 23:32:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268197 - stable/10/sys/dev/mps X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 23:32:06 -0000 Author: scottl Date: Wed Jul 2 23:32:05 2014 New Revision: 268197 URL: http://svnweb.freebsd.org/changeset/base/268197 Log: Merge r268071, 268072, 268088 Refactor some code in mps.c to reduce header pollution. Add accessor functions for manipulating the CAM CCB status field. Don't overload the CCB status field within the driver. Reviewed by: gibbs, slm Obtained from: Netflix, Inc. Modified: stable/10/sys/dev/mps/mps.c stable/10/sys/dev/mps/mps_sas.c stable/10/sys/dev/mps/mps_sas.h stable/10/sys/dev/mps/mps_user.c stable/10/sys/dev/mps/mpsvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mps/mps.c ============================================================================== --- stable/10/sys/dev/mps/mps.c Wed Jul 2 23:28:21 2014 (r268196) +++ stable/10/sys/dev/mps/mps.c Wed Jul 2 23:32:05 2014 (r268197) @@ -75,7 +75,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include static int mps_diag_reset(struct mps_softc *sc, int sleep_flag); static int mps_init_queues(struct mps_softc *sc); @@ -328,11 +327,9 @@ mps_transition_operational(struct mps_so static int mps_iocfacts_allocate(struct mps_softc *sc, uint8_t attaching) { - int error, i; + int error; Mpi2IOCFactsReply_t saved_facts; uint8_t saved_mode, reallocating; - struct mpssas_lun *lun, *lun_tmp; - struct mpssas_target *targ; mps_dprint(sc, MPS_TRACE, "%s\n", __func__); @@ -489,27 +486,7 @@ mps_iocfacts_allocate(struct mps_softc * */ if (reallocating) { mps_iocfacts_free(sc); - - /* - * The number of targets is based on IOC Facts, so free all of - * the allocated LUNs for each target and then the target buffer - * itself. - */ - for (i=0; i< saved_facts.MaxTargets; i++) { - targ = &sc->sassc->targets[i]; - SLIST_FOREACH_SAFE(lun, &targ->luns, lun_link, - lun_tmp) { - free(lun, M_MPT2); - } - } - free(sc->sassc->targets, M_MPT2); - - sc->sassc->targets = malloc(sizeof(struct mpssas_target) * - sc->facts->MaxTargets, M_MPT2, M_WAITOK|M_ZERO); - if (!sc->sassc->targets) { - panic("%s failed to alloc targets with error %d\n", - __func__, ENOMEM); - } + mpssas_realloc_targets(sc, saved_facts.MaxTargets); } /* Modified: stable/10/sys/dev/mps/mps_sas.c ============================================================================== --- stable/10/sys/dev/mps/mps_sas.c Wed Jul 2 23:28:21 2014 (r268196) +++ stable/10/sys/dev/mps/mps_sas.c Wed Jul 2 23:32:05 2014 (r268197) @@ -597,7 +597,7 @@ mpssas_remove_device(struct mps_softc *s mps_dprint(sc, MPS_XINFO, "Completing missed command %p\n", tm); ccb = tm->cm_complete_data; - ccb->ccb_h.status = CAM_DEV_NOT_THERE; + mpssas_set_ccbstatus(ccb, CAM_DEV_NOT_THERE); mpssas_scsiio_complete(sc, tm); } } @@ -986,7 +986,7 @@ mpssas_action(struct cam_sim *sim, union */ cpi->maxio = 256 * 1024; #endif - cpi->ccb_h.status = CAM_REQ_CMP; + mpssas_set_ccbstatus(ccb, CAM_REQ_CMP); break; } case XPT_GET_TRAN_SETTINGS: @@ -1005,7 +1005,7 @@ mpssas_action(struct cam_sim *sim, union cts->ccb_h.target_id)); targ = &sassc->targets[cts->ccb_h.target_id]; if (targ->handle == 0x0) { - cts->ccb_h.status = CAM_SEL_TIMEOUT; + mpssas_set_ccbstatus(ccb, CAM_SEL_TIMEOUT); break; } @@ -1032,12 +1032,12 @@ mpssas_action(struct cam_sim *sim, union scsi->valid = CTS_SCSI_VALID_TQ; scsi->flags = CTS_SCSI_FLAGS_TAG_ENB; - cts->ccb_h.status = CAM_REQ_CMP; + mpssas_set_ccbstatus(ccb, CAM_REQ_CMP); break; } case XPT_CALC_GEOMETRY: cam_calc_geometry(&ccb->ccg, /*extended*/1); - ccb->ccb_h.status = CAM_REQ_CMP; + mpssas_set_ccbstatus(ccb, CAM_REQ_CMP); break; case XPT_RESET_DEV: mps_dprint(sassc->sc, MPS_XINFO, "mpssas_action XPT_RESET_DEV\n"); @@ -1048,7 +1048,7 @@ mpssas_action(struct cam_sim *sim, union case XPT_TERM_IO: mps_dprint(sassc->sc, MPS_XINFO, "mpssas_action faking success for abort or reset\n"); - ccb->ccb_h.status = CAM_REQ_CMP; + mpssas_set_ccbstatus(ccb, CAM_REQ_CMP); break; case XPT_SCSI_IO: mpssas_action_scsiio(sassc, ccb); @@ -1059,7 +1059,7 @@ mpssas_action(struct cam_sim *sim, union return; #endif default: - ccb->ccb_h.status = CAM_FUNC_NOTAVAIL; + mpssas_set_ccbstatus(ccb, CAM_FUNC_NOTAVAIL); break; } xpt_done(ccb); @@ -1588,8 +1588,7 @@ mpssas_scsiio_timeout(void *data) /* XXX first, check the firmware state, to see if it's still * operational. if not, do a diag reset. */ - - cm->cm_ccb->ccb_h.status = CAM_CMD_TIMEOUT; + mpssas_set_ccbstatus(cm->cm_ccb, CAM_CMD_TIMEOUT); cm->cm_state = MPS_CM_STATE_TIMEDOUT; TAILQ_INSERT_TAIL(&targ->timedout_commands, cm, cm_recovery); @@ -1650,14 +1649,14 @@ mpssas_action_scsiio(struct mpssas_softc if (targ->handle == 0x0) { mps_dprint(sc, MPS_ERROR, "%s NULL handle for target %u\n", __func__, csio->ccb_h.target_id); - csio->ccb_h.status = CAM_SEL_TIMEOUT; + mpssas_set_ccbstatus(ccb, CAM_SEL_TIMEOUT); xpt_done(ccb); return; } if (targ->flags & MPS_TARGET_FLAGS_RAID_COMPONENT) { mps_dprint(sc, MPS_ERROR, "%s Raid component no SCSI IO " "supported %u\n", __func__, csio->ccb_h.target_id); - csio->ccb_h.status = CAM_TID_INVALID; + mpssas_set_ccbstatus(ccb, CAM_TID_INVALID); xpt_done(ccb); return; } @@ -1666,7 +1665,7 @@ mpssas_action_scsiio(struct mpssas_softc * Progress" and was actually aborted by the upper layer. Check for * this here and complete the command without error. */ - if (ccb->ccb_h.status != CAM_REQ_INPROG) { + if (mpssas_get_ccbstatus(ccb) != CAM_REQ_INPROG) { mps_dprint(sc, MPS_TRACE, "%s Command is not in progress for " "target %u\n", __func__, csio->ccb_h.target_id); xpt_done(ccb); @@ -1679,16 +1678,16 @@ mpssas_action_scsiio(struct mpssas_softc */ if (targ->flags & MPSSAS_TARGET_INREMOVAL) { if (targ->devinfo == 0) - csio->ccb_h.status = CAM_REQ_CMP; + mpssas_set_ccbstatus(ccb, CAM_REQ_CMP); else - csio->ccb_h.status = CAM_SEL_TIMEOUT; + mpssas_set_ccbstatus(ccb, CAM_SEL_TIMEOUT); xpt_done(ccb); return; } if ((sc->mps_flags & MPS_FLAGS_SHUTDOWN) != 0) { mps_dprint(sc, MPS_INFO, "%s shutting down\n", __func__); - csio->ccb_h.status = CAM_TID_INVALID; + mpssas_set_ccbstatus(ccb, CAM_TID_INVALID); xpt_done(ccb); return; } @@ -1767,7 +1766,7 @@ mpssas_action_scsiio(struct mpssas_softc req->Control = htole32(mpi_control); if (MPS_SET_LUN(req->LUN, csio->ccb_h.target_lun) != 0) { mps_free_command(sc, cm); - ccb->ccb_h.status = CAM_LUN_INVALID; + mpssas_set_ccbstatus(ccb, CAM_LUN_INVALID); xpt_done(ccb); return; } @@ -1855,10 +1854,10 @@ mpssas_action_scsiio(struct mpssas_softc * the I/O to the IR volume itself. */ if (sc->WD_valid_config) { - if (ccb->ccb_h.status != MPS_WD_RETRY) { + if (ccb->ccb_h.sim_priv.entries[0].field == MPS_WD_RETRY) { mpssas_direct_drive_io(sassc, cm, ccb); } else { - ccb->ccb_h.status = CAM_REQ_INPROG; + mpssas_set_ccbstatus(ccb, CAM_REQ_INPROG); } } @@ -2152,7 +2151,7 @@ mpssas_scsiio_complete(struct mps_softc * because there can be no reply when we haven't actually * gone out to the hardware. */ - ccb->ccb_h.status = CAM_REQUEUE_REQ; + mpssas_set_ccbstatus(ccb, CAM_REQUEUE_REQ); /* * Currently the only error included in the mask is @@ -2175,11 +2174,11 @@ mpssas_scsiio_complete(struct mps_softc /* Take the fast path to completion */ if (cm->cm_reply == NULL) { - if ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_INPROG) { + if (mpssas_get_ccbstatus(ccb) == CAM_REQ_INPROG) { if ((sc->mps_flags & MPS_FLAGS_DIAGRESET) != 0) - ccb->ccb_h.status = CAM_SCSI_BUS_RESET; + mpssas_set_ccbstatus(ccb, CAM_SCSI_BUS_RESET); else { - ccb->ccb_h.status = CAM_REQ_CMP; + mpssas_set_ccbstatus(ccb, CAM_REQ_CMP); ccb->csio.scsi_status = SCSI_STATUS_OK; } if (sassc->flags & MPSSAS_QUEUE_FROZEN) { @@ -2195,10 +2194,10 @@ mpssas_scsiio_complete(struct mps_softc * CAM_REQ_CMP. The first is if MPS_CM_FLAGS_ERROR_MASK is * set, the second is in the MPS_FLAGS_DIAGRESET above. */ - if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { + if (mpssas_get_ccbstatus(ccb) != CAM_REQ_CMP) { /* * Freeze the dev queue so that commands are - * executed in the correct order with after error + * executed in the correct order after error * recovery. */ ccb->ccb_h.status |= CAM_DEV_QFRZN; @@ -2222,10 +2221,11 @@ mpssas_scsiio_complete(struct mps_softc */ if (cm->cm_flags & MPS_CM_FLAGS_DD_IO) { mps_free_command(sc, cm); - ccb->ccb_h.status = MPS_WD_RETRY; + ccb->ccb_h.sim_priv.entries[0].field = MPS_WD_RETRY; mpssas_action_scsiio(sassc, ccb); return; - } + } else + ccb->ccb_h.sim_priv.entries[0].field = 0; switch (le16toh(rep->IOCStatus) & MPI2_IOCSTATUS_MASK) { case MPI2_IOCSTATUS_SCSI_DATA_UNDERRUN: @@ -2241,7 +2241,7 @@ mpssas_scsiio_complete(struct mps_softc /* Completion failed at the transport level. */ if (rep->SCSIState & (MPI2_SCSI_STATE_NO_SCSI_STATUS | MPI2_SCSI_STATE_TERMINATED)) { - ccb->ccb_h.status = CAM_REQ_CMP_ERR; + mpssas_set_ccbstatus(ccb, CAM_REQ_CMP_ERR); break; } @@ -2250,7 +2250,7 @@ mpssas_scsiio_complete(struct mps_softc * recover the command. */ if (rep->SCSIState & MPI2_SCSI_STATE_AUTOSENSE_FAILED) { - ccb->ccb_h.status = CAM_AUTOSENSE_FAIL; + mpssas_set_ccbstatus(ccb, CAM_AUTOSENSE_FAIL); break; } @@ -2274,16 +2274,16 @@ mpssas_scsiio_complete(struct mps_softc */ if ((rep->SCSIStatus == MPI2_SCSI_STATUS_COMMAND_TERMINATED) || (rep->SCSIStatus == MPI2_SCSI_STATUS_TASK_ABORTED)) { - ccb->ccb_h.status = CAM_REQ_ABORTED; + mpssas_set_ccbstatus(ccb, CAM_REQ_ABORTED); break; } /* Handle normal status and sense */ csio->scsi_status = rep->SCSIStatus; if (rep->SCSIStatus == MPI2_SCSI_STATUS_GOOD) - ccb->ccb_h.status = CAM_REQ_CMP; + mpssas_set_ccbstatus(ccb, CAM_REQ_CMP); else - ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR; + mpssas_set_ccbstatus(ccb, CAM_SCSI_STATUS_ERROR); if (rep->SCSIState & MPI2_SCSI_STATE_AUTOSENSE_VALID) { int sense_len, returned_sense_len; @@ -2347,13 +2347,13 @@ mpssas_scsiio_complete(struct mps_softc * failed. */ if (cm->cm_targ->devinfo == 0) - ccb->ccb_h.status = CAM_REQ_CMP; + mpssas_set_ccbstatus(ccb, CAM_REQ_CMP); else - ccb->ccb_h.status = CAM_DEV_NOT_THERE; + mpssas_set_ccbstatus(ccb, CAM_DEV_NOT_THERE); break; case MPI2_IOCSTATUS_INVALID_SGL: mps_print_scsiio_cmd(sc, cm); - ccb->ccb_h.status = CAM_UNREC_HBA_ERROR; + mpssas_set_ccbstatus(ccb, CAM_UNREC_HBA_ERROR); break; case MPI2_IOCSTATUS_SCSI_TASK_TERMINATED: /* @@ -2366,14 +2366,14 @@ mpssas_scsiio_complete(struct mps_softc * on the console. */ if (cm->cm_state == MPS_CM_STATE_TIMEDOUT) - ccb->ccb_h.status = CAM_CMD_TIMEOUT; + mpssas_set_ccbstatus(ccb, CAM_CMD_TIMEOUT); else - ccb->ccb_h.status = CAM_REQ_ABORTED; + mpssas_set_ccbstatus(ccb, CAM_REQ_ABORTED); break; case MPI2_IOCSTATUS_SCSI_DATA_OVERRUN: /* resid is ignored for this condition */ csio->resid = 0; - ccb->ccb_h.status = CAM_DATA_RUN_ERR; + mpssas_set_ccbstatus(ccb, CAM_DATA_RUN_ERR); break; case MPI2_IOCSTATUS_SCSI_IOC_TERMINATED: case MPI2_IOCSTATUS_SCSI_EXT_TERMINATED: @@ -2382,7 +2382,7 @@ mpssas_scsiio_complete(struct mps_softc * transient transport-related) errors, retry these without * decrementing the retry count. */ - ccb->ccb_h.status = CAM_REQUEUE_REQ; + mpssas_set_ccbstatus(ccb, CAM_REQUEUE_REQ); mpssas_log_command(cm, MPS_INFO, "terminated ioc %x scsi %x state %x xfer %u\n", le16toh(rep->IOCStatus), rep->SCSIStatus, rep->SCSIState, @@ -2404,7 +2404,7 @@ mpssas_scsiio_complete(struct mps_softc le16toh(rep->IOCStatus), rep->SCSIStatus, rep->SCSIState, le32toh(rep->TransferCount)); csio->resid = cm->cm_length; - ccb->ccb_h.status = CAM_REQ_CMP_ERR; + mpssas_set_ccbstatus(ccb, CAM_REQ_CMP_ERR); break; } @@ -2417,7 +2417,7 @@ mpssas_scsiio_complete(struct mps_softc "unfreezing SIM queue\n"); } - if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { + if (mpssas_get_ccbstatus(ccb) != CAM_REQ_CMP) { ccb->ccb_h.status |= CAM_DEV_QFRZN; xpt_freeze_devq(ccb->ccb_h.path, /*count*/ 1); } @@ -2715,14 +2715,14 @@ mpssas_smpio_complete(struct mps_softc * if ((cm->cm_flags & MPS_CM_FLAGS_ERROR_MASK) != 0) { mps_dprint(sc, MPS_ERROR,"%s: cm_flags = %#x on SMP request!\n", __func__, cm->cm_flags); - ccb->ccb_h.status = CAM_REQ_CMP_ERR; + mpssas_set_ccbstatus(ccb, CAM_REQ_CMP_ERR); goto bailout; } rpl = (MPI2_SMP_PASSTHROUGH_REPLY *)cm->cm_reply; if (rpl == NULL) { mps_dprint(sc, MPS_ERROR, "%s: NULL cm_reply!\n", __func__); - ccb->ccb_h.status = CAM_REQ_CMP_ERR; + mpssas_set_ccbstatus(ccb, CAM_REQ_CMP_ERR); goto bailout; } @@ -2735,7 +2735,7 @@ mpssas_smpio_complete(struct mps_softc * rpl->SASStatus != MPI2_SASSTATUS_SUCCESS) { mps_dprint(sc, MPS_XINFO, "%s: IOCStatus %04x SASStatus %02x\n", __func__, le16toh(rpl->IOCStatus), rpl->SASStatus); - ccb->ccb_h.status = CAM_REQ_CMP_ERR; + mpssas_set_ccbstatus(ccb, CAM_REQ_CMP_ERR); goto bailout; } @@ -2744,9 +2744,9 @@ mpssas_smpio_complete(struct mps_softc * (uintmax_t)sasaddr); if (ccb->smpio.smp_response[2] == SMP_FR_ACCEPTED) - ccb->ccb_h.status = CAM_REQ_CMP; + mpssas_set_ccbstatus(ccb, CAM_REQ_CMP); else - ccb->ccb_h.status = CAM_SMP_STATUS_ERROR; + mpssas_set_ccbstatus(ccb, CAM_SMP_STATUS_ERROR); bailout: /* @@ -2782,7 +2782,7 @@ mpssas_send_smpcmd(struct mpssas_softc * case CAM_DATA_SG_PADDR: mps_dprint(sc, MPS_ERROR, "%s: physical addresses not supported\n", __func__); - ccb->ccb_h.status = CAM_REQ_INVALID; + mpssas_set_ccbstatus(ccb, CAM_REQ_INVALID); xpt_done(ccb); return; case CAM_DATA_SG: @@ -2796,7 +2796,7 @@ mpssas_send_smpcmd(struct mpssas_softc * "%s: multiple request or response " "buffer segments not supported for SMP\n", __func__); - ccb->ccb_h.status = CAM_REQ_INVALID; + mpssas_set_ccbstatus(ccb, CAM_REQ_INVALID); xpt_done(ccb); return; } @@ -2830,7 +2830,7 @@ mpssas_send_smpcmd(struct mpssas_softc * response = ccb->smpio.smp_response; break; default: - ccb->ccb_h.status = CAM_REQ_INVALID; + mpssas_set_ccbstatus(ccb, CAM_REQ_INVALID); xpt_done(ccb); return; } @@ -2839,7 +2839,7 @@ mpssas_send_smpcmd(struct mpssas_softc * if (cm == NULL) { mps_dprint(sc, MPS_ERROR, "%s: cannot allocate command\n", __func__); - ccb->ccb_h.status = CAM_RESRC_UNAVAIL; + mpssas_set_ccbstatus(ccb, CAM_RESRC_UNAVAIL); xpt_done(ccb); return; } @@ -2927,7 +2927,7 @@ mpssas_send_smpcmd(struct mpssas_softc * bailout_error: mps_free_command(sc, cm); - ccb->ccb_h.status = CAM_RESRC_UNAVAIL; + mpssas_set_ccbstatus(ccb, CAM_RESRC_UNAVAIL); xpt_done(ccb); return; @@ -2952,7 +2952,7 @@ mpssas_action_smpio(struct mpssas_softc mps_dprint(sc, MPS_ERROR, "%s: target %d does not exist!\n", __func__, ccb->ccb_h.target_id); - ccb->ccb_h.status = CAM_SEL_TIMEOUT; + mpssas_set_ccbstatus(ccb, CAM_SEL_TIMEOUT); xpt_done(ccb); return; } @@ -3001,7 +3001,7 @@ mpssas_action_smpio(struct mpssas_softc mps_dprint(sc, MPS_ERROR, "%s: handle %d does not have a valid " "parent handle!\n", __func__, targ->handle); - ccb->ccb_h.status = CAM_REQ_INVALID; + mpssas_set_ccbstatus(ccb, CAM_REQ_INVALID); goto bailout; } #ifdef OLD_MPS_PROBE @@ -3012,7 +3012,7 @@ mpssas_action_smpio(struct mpssas_softc mps_dprint(sc, MPS_ERROR, "%s: handle %d does not have a valid " "parent target!\n", __func__, targ->handle); - ccb->ccb_h.status = CAM_REQ_INVALID; + mpssas_set_ccbstatus(ccb, CAM_REQ_INVALID); goto bailout; } @@ -3022,7 +3022,7 @@ mpssas_action_smpio(struct mpssas_softc "%s: handle %d parent %d does not " "have an SMP target!\n", __func__, targ->handle, parent_target->handle); - ccb->ccb_h.status = CAM_REQ_INVALID; + mpssas_set_ccbstatus(ccb, CAM_REQ_INVALID); goto bailout; } @@ -3035,7 +3035,7 @@ mpssas_action_smpio(struct mpssas_softc "%s: handle %d parent %d does not " "have an SMP target!\n", __func__, targ->handle, targ->parent_handle); - ccb->ccb_h.status = CAM_REQ_INVALID; + mpssas_set_ccbstatus(ccb, CAM_REQ_INVALID); goto bailout; } @@ -3044,7 +3044,7 @@ mpssas_action_smpio(struct mpssas_softc "%s: handle %d parent handle %d does " "not have a valid SAS address!\n", __func__, targ->handle, targ->parent_handle); - ccb->ccb_h.status = CAM_REQ_INVALID; + mpssas_set_ccbstatus(ccb, CAM_REQ_INVALID); goto bailout; } @@ -3057,7 +3057,7 @@ mpssas_action_smpio(struct mpssas_softc mps_dprint(sc, MPS_INFO, "%s: unable to find SAS address for handle %d\n", __func__, targ->handle); - ccb->ccb_h.status = CAM_REQ_INVALID; + mpssas_set_ccbstatus(ccb, CAM_REQ_INVALID); goto bailout; } mpssas_send_smpcmd(sassc, ccb, sasaddr); @@ -3089,7 +3089,7 @@ mpssas_action_resetdev(struct mpssas_sof if (tm == NULL) { mps_dprint(sc, MPS_ERROR, "command alloc failure in mpssas_action_resetdev\n"); - ccb->ccb_h.status = CAM_RESRC_UNAVAIL; + mpssas_set_ccbstatus(ccb, CAM_RESRC_UNAVAIL); xpt_done(ccb); return; } @@ -3137,7 +3137,7 @@ mpssas_resetdev_complete(struct mps_soft "%s: cm_flags = %#x for reset of handle %#04x! " "This should not happen!\n", __func__, tm->cm_flags, req->DevHandle); - ccb->ccb_h.status = CAM_REQ_CMP_ERR; + mpssas_set_ccbstatus(ccb, CAM_REQ_CMP_ERR); goto bailout; } @@ -3146,12 +3146,12 @@ mpssas_resetdev_complete(struct mps_soft le16toh(resp->IOCStatus), le32toh(resp->ResponseCode)); if (le32toh(resp->ResponseCode) == MPI2_SCSITASKMGMT_RSP_TM_COMPLETE) { - ccb->ccb_h.status = CAM_REQ_CMP; + mpssas_set_ccbstatus(ccb, CAM_REQ_CMP); mpssas_announce_reset(sc, AC_SENT_BDR, tm->cm_targ->tid, CAM_LUN_WILDCARD); } else - ccb->ccb_h.status = CAM_REQ_CMP_ERR; + mpssas_set_ccbstatus(ccb, CAM_REQ_CMP_ERR); bailout: @@ -3253,7 +3253,7 @@ mpssas_async(void *callback_arg, uint32_ cam_release_devq(cdai.ccb_h.path, 0, 0, 0, FALSE); - if (((cdai.ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) + if ((mpssas_get_ccbstatus((union ccb *)&cdai) == CAM_REQ_CMP) && (rcap_buf.prot & SRC16_PROT_EN)) { lun->eedp_formatted = TRUE; lun->eedp_block_size = scsi_4btoul(rcap_buf.length); @@ -3455,7 +3455,7 @@ mpssas_read_cap_done(struct cam_periph * * the lun as not supporting EEDP and set the block size * to 0. */ - if (((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) + if ((mpssas_get_ccbstatus(done_ccb) != CAM_REQ_CMP) || (done_ccb->csio.scsi_status != SCSI_STATUS_OK)) { lun->eedp_formatted = FALSE; lun->eedp_block_size = 0; @@ -3593,3 +3593,33 @@ mpssas_check_id(struct mpssas_softc *sas return (0); } + +void +mpssas_realloc_targets(struct mps_softc *sc, int maxtargets) +{ + struct mpssas_softc *sassc; + struct mpssas_lun *lun, *lun_tmp; + struct mpssas_target *targ; + int i; + + sassc = sc->sassc; + /* + * The number of targets is based on IOC Facts, so free all of + * the allocated LUNs for each target and then the target buffer + * itself. + */ + for (i=0; i< maxtargets; i++) { + targ = &sassc->targets[i]; + SLIST_FOREACH_SAFE(lun, &targ->luns, lun_link, lun_tmp) { + free(lun, M_MPT2); + } + } + free(sassc->targets, M_MPT2); + + sassc->targets = malloc(sizeof(struct mpssas_target) * maxtargets, + M_MPT2, M_WAITOK|M_ZERO); + if (!sassc->targets) { + panic("%s failed to alloc targets with error %d\n", + __func__, ENOMEM); + } +} Modified: stable/10/sys/dev/mps/mps_sas.h ============================================================================== --- stable/10/sys/dev/mps/mps_sas.h Wed Jul 2 23:28:21 2014 (r268196) +++ stable/10/sys/dev/mps/mps_sas.h Wed Jul 2 23:32:05 2014 (r268197) @@ -145,6 +145,19 @@ mpssas_set_lun(uint8_t *lun, u_int ccblu return (0); } +static __inline void +mpssas_set_ccbstatus(union ccb *ccb, int status) +{ + ccb->ccb_h.status &= ~CAM_STATUS_MASK; + ccb->ccb_h.status |= status; +} + +static __inline int +mpssas_get_ccbstatus(union ccb *ccb) +{ + return (ccb->ccb_h.status & CAM_STATUS_MASK); +} + #define MPS_SET_SINGLE_LUN(req, lun) \ do { \ bzero((req)->LUN, 8); \ @@ -156,7 +169,5 @@ void mpssas_discovery_end(struct mpssas_ void mpssas_startup_increment(struct mpssas_softc *sassc); void mpssas_startup_decrement(struct mpssas_softc *sassc); -struct mps_command * mpssas_alloc_tm(struct mps_softc *sc); -void mpssas_free_tm(struct mps_softc *sc, struct mps_command *tm); void mpssas_firmware_event_work(void *arg, int pending); int mpssas_check_id(struct mpssas_softc *sassc, int id); Modified: stable/10/sys/dev/mps/mps_user.c ============================================================================== --- stable/10/sys/dev/mps/mps_user.c Wed Jul 2 23:28:21 2014 (r268196) +++ stable/10/sys/dev/mps/mps_user.c Wed Jul 2 23:32:05 2014 (r268197) @@ -101,7 +101,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: stable/10/sys/dev/mps/mpsvar.h ============================================================================== --- stable/10/sys/dev/mps/mpsvar.h Wed Jul 2 23:28:21 2014 (r268196) +++ stable/10/sys/dev/mps/mpsvar.h Wed Jul 2 23:32:05 2014 (r268197) @@ -756,6 +756,9 @@ void mpssas_prepare_remove(struct mpssas void mpssas_prepare_volume_remove(struct mpssas_softc *sassc, uint16_t handle); int mpssas_startup(struct mps_softc *sc); struct mpssas_target * mpssas_find_target_by_handle(struct mpssas_softc *, int, uint16_t); +void mpssas_realloc_targets(struct mps_softc *sc, int maxtargets); +struct mps_command * mpssas_alloc_tm(struct mps_softc *sc); +void mpssas_free_tm(struct mps_softc *sc, struct mps_command *tm); SYSCTL_DECL(_hw_mps); From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 23:33:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D111476C; Wed, 2 Jul 2014 23:33:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE3C52F08; Wed, 2 Jul 2014 23:33:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62NX74f066553; Wed, 2 Jul 2014 23:33:07 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62NX7fD066542; Wed, 2 Jul 2014 23:33:07 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201407022333.s62NX7fD066542@svn.freebsd.org> From: Marcel Moolenaar Date: Wed, 2 Jul 2014 23:33:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268198 - stable/10/sys/ia64/ia64 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 23:33:07 -0000 Author: marcel Date: Wed Jul 2 23:33:07 2014 New Revision: 268198 URL: http://svnweb.freebsd.org/changeset/base/268198 Log: MFC r263253: Don't use the ITC as the faulting address for external interrupts. Modified: stable/10/sys/ia64/ia64/exception.S stable/10/sys/ia64/ia64/interrupt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ia64/ia64/exception.S ============================================================================== --- stable/10/sys/ia64/ia64/exception.S Wed Jul 2 23:32:05 2014 (r268197) +++ stable/10/sys/ia64/ia64/exception.S Wed Jul 2 23:33:07 2014 (r268198) @@ -1388,7 +1388,7 @@ IVT_END(Break_Instruction) IVT_ENTRY(External_Interrupt, 0x3000) { .mib - mov r17=ar.itc // Put the ITC in the trapframe. + mov r17=0 mov r16=ip br.sptk exception_save ;; Modified: stable/10/sys/ia64/ia64/interrupt.c ============================================================================== --- stable/10/sys/ia64/ia64/interrupt.c Wed Jul 2 23:32:05 2014 (r268197) +++ stable/10/sys/ia64/ia64/interrupt.c Wed Jul 2 23:33:07 2014 (r268198) @@ -316,8 +316,8 @@ ia64_handle_intr(struct trapframe *tf) critical_enter(); do { - CTR2(KTR_INTR, "INTR: ITC=%u, XIV=%u", - (u_int)tf->tf_special.ifa, xiv); + CTR3(KTR_INTR, "INTR: XIV=%u, #%u: frame=%p", xiv, + PCPU_GET(cnt.v_intr), tf); if (!(ia64_handler[xiv])(td, xiv, tf)) { ia64_set_eoi(0); ia64_srlz_d(); From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 23:37:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC2C3C59; Wed, 2 Jul 2014 23:37:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8ED382F46; Wed, 2 Jul 2014 23:37:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62NbFFb067437; Wed, 2 Jul 2014 23:37:15 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62NbFvc067435; Wed, 2 Jul 2014 23:37:15 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201407022337.s62NbFvc067435@svn.freebsd.org> From: Marcel Moolenaar Date: Wed, 2 Jul 2014 23:37:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268199 - in stable/10/sys/ia64: ia64 include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 23:37:15 -0000 Author: marcel Date: Wed Jul 2 23:37:14 2014 New Revision: 268199 URL: http://svnweb.freebsd.org/changeset/base/268199 Log: MFC r263254: Move the implementation of kdb_cpu_trap() from to machdep.c. Modified: stable/10/sys/ia64/ia64/machdep.c stable/10/sys/ia64/include/kdb.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ia64/ia64/machdep.c ============================================================================== --- stable/10/sys/ia64/ia64/machdep.c Wed Jul 2 23:33:07 2014 (r268198) +++ stable/10/sys/ia64/ia64/machdep.c Wed Jul 2 23:37:14 2014 (r268199) @@ -86,6 +86,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -562,6 +563,18 @@ spinlock_exit(void) } void +kdb_cpu_trap(int vector, int code __unused) +{ + + __asm __volatile("flushrs;;"); + + /* Restart after the break instruction. */ + if (vector == IA64_VEC_BREAK && + kdb_frame->tf_special.ifa == IA64_FIXED_BREAK) + kdb_frame->tf_special.psr += IA64_PSR_RI_1; +} + +void map_vhpt(uintptr_t vhpt) { pt_entry_t pte; Modified: stable/10/sys/ia64/include/kdb.h ============================================================================== --- stable/10/sys/ia64/include/kdb.h Wed Jul 2 23:33:07 2014 (r268198) +++ stable/10/sys/ia64/include/kdb.h Wed Jul 2 23:37:14 2014 (r268199) @@ -35,6 +35,8 @@ #define KDB_STOPPEDPCB(pc) (&(pc)->pc_md.pcb) +void kdb_cpu_trap(int, int); + static __inline void kdb_cpu_clear_singlestep(void) { @@ -62,14 +64,4 @@ kdb_cpu_sync_icache(unsigned char *addr, } } -static __inline void -kdb_cpu_trap(int vector, int _) -{ - __asm __volatile("flushrs;;"); - - if (vector == IA64_VEC_BREAK && - kdb_frame->tf_special.ifa == IA64_FIXED_BREAK) - kdb_frame->tf_special.psr += IA64_PSR_RI_1; -} - #endif /* _MACHINE_KDB_H_ */ From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 23:47:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A96D80B; Wed, 2 Jul 2014 23:47:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9B95208A; Wed, 2 Jul 2014 23:47:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62NljG7073399; Wed, 2 Jul 2014 23:47:45 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62Nlh84073386; Wed, 2 Jul 2014 23:47:43 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201407022347.s62Nlh84073386@svn.freebsd.org> From: Marcel Moolenaar Date: Wed, 2 Jul 2014 23:47:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268200 - in stable/10/sys: conf ia64/ia64 ia64/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 23:47:46 -0000 Author: marcel Date: Wed Jul 2 23:47:43 2014 New Revision: 268200 URL: http://svnweb.freebsd.org/changeset/base/268200 Log: MFC r263323: Fix and improve exception tracing. Added: stable/10/sys/ia64/ia64/xtrace.c - copied unchanged from r263323, head/sys/ia64/ia64/xtrace.c Modified: stable/10/sys/conf/files.ia64 stable/10/sys/conf/options.ia64 stable/10/sys/ia64/ia64/db_machdep.c stable/10/sys/ia64/ia64/exception.S stable/10/sys/ia64/ia64/interrupt.c stable/10/sys/ia64/ia64/machdep.c stable/10/sys/ia64/ia64/mp_machdep.c stable/10/sys/ia64/ia64/trap.c stable/10/sys/ia64/include/md_var.h stable/10/sys/ia64/include/pcpu.h stable/10/sys/ia64/include/smp.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files.ia64 ============================================================================== --- stable/10/sys/conf/files.ia64 Wed Jul 2 23:37:14 2014 (r268199) +++ stable/10/sys/conf/files.ia64 Wed Jul 2 23:47:43 2014 (r268200) @@ -110,6 +110,7 @@ ia64/ia64/uma_machdep.c standard ia64/ia64/unaligned.c standard ia64/ia64/unwind.c standard ia64/ia64/vm_machdep.c standard +ia64/ia64/xtrace.c optional xtrace ia64/isa/isa.c optional isa ia64/isa/isa_dma.c optional isa ia64/pci/pci_cfgreg.c optional pci Modified: stable/10/sys/conf/options.ia64 ============================================================================== --- stable/10/sys/conf/options.ia64 Wed Jul 2 23:37:14 2014 (r268199) +++ stable/10/sys/conf/options.ia64 Wed Jul 2 23:47:43 2014 (r268200) @@ -13,7 +13,7 @@ COMPAT_FREEBSD32 opt_compat.h PV_STATS opt_pmap.h -EXCEPTION_TRACING opt_xtrace.h +XTRACE VGA_ALT_SEQACCESS opt_vga.h VGA_DEBUG opt_vga.h Modified: stable/10/sys/ia64/ia64/db_machdep.c ============================================================================== --- stable/10/sys/ia64/ia64/db_machdep.c Wed Jul 2 23:37:14 2014 (r268199) +++ stable/10/sys/ia64/ia64/db_machdep.c Wed Jul 2 23:47:43 2014 (r268200) @@ -26,11 +26,11 @@ * SUCH DAMAGE. */ +#include "opt_xtrace.h" + #include __FBSDID("$FreeBSD$"); -#include "opt_xtrace.h" - #include #include #include @@ -585,6 +585,10 @@ db_show_mdpcpu(struct pcpu *pc) db_printf("MD: clock_load = %#lx\n", md->clock_load); db_printf("MD: stats = %p\n", &md->stats); db_printf("MD: pmap = %p\n", md->current_pmap); +#ifdef XTRACE + db_printf("MD: xtrace_buffer = %p\n", md->xtrace_buffer); + db_printf("MD: xtrace_tail = %#lx\n", md->xtrace_tail); +#endif } void @@ -604,29 +608,3 @@ db_trace_thread(struct thread *td, int c ctx = kdb_thr_ctx(td); return (db_backtrace(td, ctx, count)); } - -#ifdef EXCEPTION_TRACING - -extern long xtrace[]; -extern long *xhead; - -DB_COMMAND(xtrace, db_xtrace) -{ - long *p; - - p = (*xhead == 0) ? xtrace : xhead; - - db_printf("ITC\t\t IVT\t\t IIP\t\t IFA\t\t ISR\n"); - if (*p == 0) - return; - - do { - db_printf("%016lx %016lx %016lx %016lx %016lx\n", p[0], p[1], - p[2], p[3], p[4]); - p += 5; - if (p == (void *)&xhead) - p = xtrace; - } while (p != xhead); -} - -#endif Modified: stable/10/sys/ia64/ia64/exception.S ============================================================================== --- stable/10/sys/ia64/ia64/exception.S Wed Jul 2 23:37:14 2014 (r268199) +++ stable/10/sys/ia64/ia64/exception.S Wed Jul 2 23:47:43 2014 (r268200) @@ -50,63 +50,185 @@ __FBSDID("$FreeBSD$"); .section .ivt.data, "aw" + .align 8 .global ia64_kptdir + .size ia64_kptdir, 8 ia64_kptdir: data8 0 -#ifdef EXCEPTION_TRACING +#ifdef XTRACE - .global xtrace, xhead -xtrace: .space 1024*5*8 -xhead: data8 xtrace + .align 8 + .global ia64_xtrace_mask + .size ia64_xtrace_mask, 8 +ia64_xtrace_mask: data8 0 + + .align 4 + .global ia64_xtrace_enabled + .size ia64_xtrace_enabled, 4 +ia64_xtrace_enabled: data4 0 -#define XTRACE(offset) \ -{ .mmi ; \ - mov r24=ar.itc ; \ - mov r25=cr.iip ; \ - mov r27=offset ; \ -} ; \ -{ .mlx ; \ - mov r28=cr.ifa ; \ - movl r29=xhead ;; \ -} ; \ -{ .mmi ; \ - ld8 r29=[r29] ;; \ - st8 [r29]=r24,8 ; \ - nop 0 ;; \ -} ; \ -{ .mmi ; \ - st8 [r29]=r27,8 ;; \ - mov r24=cr.isr ; \ - add r27=8,r29 ;; \ -} ; \ -{ .mmi ; \ - st8 [r29]=r25,16 ;; \ - st8 [r27]=r28,16 ; \ - mov r25=pr ;; \ +#define XTRACE_HOOK(offset) \ +{ .mii ; \ + nop 0 ; \ + mov r31 = b7 ; \ + mov r28 = pr ; \ } ; \ -{ .mlx ; \ - st8 [r29]=r24 ; \ - movl r28=xhead ;; \ +{ .mib ; \ + nop 0 ; \ + mov r25 = ip ; \ + br.sptk ia64_xtrace_write ;; \ } ; \ { .mii ; \ - cmp.eq p15,p0=r27,r28 ; \ - addl r29=1024*5*8,r0 ;; \ -(p15) sub r27=r28,r29 ;; \ -} ; \ -{ .mmi ; \ - st8 [r28]=r27 ; \ - nop 0 ; \ - mov pr=r25,0x1ffff ;; \ + nop 0 ; \ + mov b7 = r31 ; \ + mov pr = r28, 0x1ffff ;; \ } -#else + .section .ivt.text, "ax" + +// We can only use r25, r26 & r27 +ENTRY_NOPROFILE(ia64_xtrace_write, 0) +{ .mlx + add r25 = 16, r25 + movl r26 = ia64_xtrace_enabled + ;; +} +{ .mmi + mov r27 = ar.k3 + ld4 r26 = [r26] + mov b7 = r25 + ;; +} +{ .mib + add r25 = -32, r25 + cmp.eq p15,p0 = r0, r26 +(p15) br.dptk.few b7 + ;; +} +{ .mib + nop 0 + cmp.eq p15,p0 = r0, r27 +(p15) br.dptk.few b7 + ;; +} +{ .mmi + st8 [r27] = r25, 8 // 0x00 IVT + mov r26 = ar.itc + nop 0 + ;; +} +{ .mmi + st8 [r27] = r26, 8 // 0x08 ITC + mov r25 = cr.iip + nop 0 + ;; +} +{ .mmi + st8 [r27] = r25, 8 // 0x10 IIP + mov r26 = cr.ifa + nop 0 + ;; +} +{ .mmi + st8 [r27] = r26, 8 // 0x18 IFA + mov r25 = cr.isr + nop 0 + ;; +} +{ .mmi + st8 [r27] = r25, 8 // 0x20 ISR + mov r26 = cr.ipsr + nop 0 + ;; +} +{ .mmi + st8 [r27] = r26, 8 // 0x28 IPSR + mov r25 = cr.itir + nop 0 + ;; +} +{ .mmi + st8 [r27] = r25, 8 // 0x30 ITIR + mov r26 = cr.iipa + nop 0 + ;; +} +{ .mmi + st8 [r27] = r26, 8 // 0x38 IIPA + mov r25 = cr.ifs + nop 0 + ;; +} +{ .mmi + st8 [r27] = r25, 8 // 0x40 IFS + mov r26 = cr.iim + nop 0 + ;; +} +{ .mmi + st8 [r27] = r26, 8 // 0x48 IIM + mov r25 = cr.iha + nop 0 + ;; +} +{ .mmi + st8 [r27] = r25, 8 // 0x50 IHA + mov r26 = ar.unat + nop 0 + ;; +} +{ .mmi + st8 [r27] = r26, 8 // 0x58 UNAT + mov r25 = ar.rsc + nop 0 + ;; +} +{ .mmi + st8 [r27] = r25, 8 // 0x60 RSC + mov r26 = ar.bsp + nop 0 + ;; +} +{ .mmi + st8 [r27] = r26, 8 // 0x68 BSP + mov r25 = r13 + nop 0 + ;; +} +{ .mmi + st8 [r27] = r25, 8 // 0x70 PCPU/TLS + mov r26 = r12 + nop 0 + ;; +} +{ .mlx + st8 [r27] = r26, 8 // 0x78 SP + movl r25 = ia64_xtrace_mask + ;; +} +{ .mmi + ld8 r26 = [r25] + ;; + and r25 = r27, r26 + nop 0 + ;; +} +{ .mib + mov ar.k3 = r25 + nop 0 + br.sptk b7 + ;; +} +END(ia64_xtrace_write) -#define XTRACE(offset) +#else /* XTRACE */ -#endif +#define XTRACE_HOOK(offset) .section .ivt.text, "ax" +#endif /* XTRACE */ + /* * exception_save: save interrupted state * @@ -632,6 +754,7 @@ ENTRY_NOPROFILE(exception_restore, 0) ssm psr.dt ;; srlz.d + mov r16 = r25 exception_restore_restart: { .mmi @@ -649,20 +772,21 @@ exception_restore_restart: ;; } { .mmi + mov cr.ifs=r16 mov ar.k6=r31 - mov ar.rnat=r21 - nop 0 + mov pr=r18,0x1ffff ;; } { .mmi - mov ar.unat=r17 mov cr.iip=r19 + mov ar.unat=r17 nop 0 + ;; } { .mmi mov cr.ipsr=r24 - mov cr.ifs=r25 - mov pr=r18,0x1ffff + mov ar.rnat=r21 + nop 0 ;; } { .mmb @@ -713,7 +837,7 @@ END(exception_restore) .save rp, r0; \ .body; \ ivt_##name: \ - XTRACE(offset) + XTRACE_HOOK(offset) #define IVT_END(name) \ .endp ivt_##name Modified: stable/10/sys/ia64/ia64/interrupt.c ============================================================================== --- stable/10/sys/ia64/ia64/interrupt.c Wed Jul 2 23:37:14 2014 (r268199) +++ stable/10/sys/ia64/ia64/interrupt.c Wed Jul 2 23:47:43 2014 (r268200) @@ -25,6 +25,7 @@ */ #include "opt_ddb.h" +#include "opt_xtrace.h" #include __FBSDID("$FreeBSD$"); @@ -305,6 +306,11 @@ ia64_handle_intr(struct trapframe *tf) td = curthread; ia64_set_fpsr(IA64_FPSR_DEFAULT); + +#ifdef XTRACE + ia64_xtrace_save(); +#endif + PCPU_INC(cnt.v_intr); xiv = ia64_get_ivr(); Modified: stable/10/sys/ia64/ia64/machdep.c ============================================================================== --- stable/10/sys/ia64/ia64/machdep.c Wed Jul 2 23:37:14 2014 (r268199) +++ stable/10/sys/ia64/ia64/machdep.c Wed Jul 2 23:47:43 2014 (r268200) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ddb.h" #include "opt_kstack_pages.h" #include "opt_sched.h" +#include "opt_xtrace.h" #include #include @@ -177,9 +178,6 @@ void (*cpu_idle_hook)(sbintime_t) = NULL struct kva_md_info kmi; -#define Mhz 1000000L -#define Ghz (1000L*Mhz) - static void identifycpu(void) { @@ -566,6 +564,9 @@ void kdb_cpu_trap(int vector, int code __unused) { +#ifdef XTRACE + ia64_xtrace_stop(); +#endif __asm __volatile("flushrs;;"); /* Restart after the break instruction. */ @@ -892,6 +893,10 @@ ia64_init(void) */ pmap_bootstrap(); +#ifdef XTRACE + ia64_xtrace_init_bsp(); +#endif + /* * Initialize debuggers, and break into them if appropriate. */ Modified: stable/10/sys/ia64/ia64/mp_machdep.c ============================================================================== --- stable/10/sys/ia64/ia64/mp_machdep.c Wed Jul 2 23:37:14 2014 (r268199) +++ stable/10/sys/ia64/ia64/mp_machdep.c Wed Jul 2 23:47:43 2014 (r268200) @@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$"); #include "opt_kstack_pages.h" +#include "opt_xtrace.h" #include #include @@ -236,6 +237,10 @@ ia64_ap_startup(void) ia64_set_fpsr(IA64_FPSR_DEFAULT); +#ifdef XTRACE + ia64_xtrace_init_ap(ia64_ap_state.as_xtrace_buffer); +#endif + /* Wait until it's time for us to be unleashed */ while (ia64_ap_state.as_spin) cpu_spinwait(); @@ -398,6 +403,10 @@ cpu_mp_start() ia64_ap_state.as_kstack = stp; ia64_ap_state.as_kstack_top = stp + KSTACK_PAGES * PAGE_SIZE; +#ifdef XTRACE + ia64_ap_state.as_xtrace_buffer = ia64_xtrace_alloc(); +#endif + ia64_ap_state.as_trace = 0; ia64_ap_state.as_delay = 2000; ia64_ap_state.as_awake = 0; Modified: stable/10/sys/ia64/ia64/trap.c ============================================================================== --- stable/10/sys/ia64/ia64/trap.c Wed Jul 2 23:37:14 2014 (r268199) +++ stable/10/sys/ia64/ia64/trap.c Wed Jul 2 23:47:43 2014 (r268200) @@ -354,6 +354,12 @@ trap(int vector, struct trapframe *tf) ksiginfo_t ksi; user = TRAPF_USERMODE(tf) ? 1 : 0; + if (user) + ia64_set_fpsr(IA64_FPSR_DEFAULT); + +#ifdef XTRACE + ia64_xtrace_save(); +#endif PCPU_INC(cnt.v_trap); @@ -362,7 +368,6 @@ trap(int vector, struct trapframe *tf) ucode = 0; if (user) { - ia64_set_fpsr(IA64_FPSR_DEFAULT); td->td_pticks = 0; td->td_frame = tf; if (td->td_ucred != p->p_ucred) Copied: stable/10/sys/ia64/ia64/xtrace.c (from r263323, head/sys/ia64/ia64/xtrace.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/ia64/ia64/xtrace.c Wed Jul 2 23:47:43 2014 (r268200, copy of r263323, head/sys/ia64/ia64/xtrace.c) @@ -0,0 +1,220 @@ +/*- + * Copyright (c) 2014 Marcel Moolenaar + * All rights reserved. + * + * 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. + */ + +#include "opt_ddb.h" +#include "opt_xtrace.h" + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define XTRACE_LOG2SZ 14 /* 16KB trace buffers */ + +struct ia64_xtrace_record { + uint64_t ivt; + uint64_t itc; + uint64_t iip; + uint64_t ifa; + uint64_t isr; + uint64_t ipsr; + uint64_t itir; + uint64_t iipa; + + uint64_t ifs; + uint64_t iim; + uint64_t iha; + uint64_t unat; + uint64_t rsc; + uint64_t bsp; + uint64_t tp; + uint64_t sp; +}; + +extern uint32_t ia64_xtrace_enabled; +extern uint64_t ia64_xtrace_mask; + +static uint64_t ia64_xtrace_base; + +static void +ia64_xtrace_init_common(vm_paddr_t pa) +{ + uint64_t psr; + pt_entry_t pte; + + pte = PTE_PRESENT | PTE_MA_WB | PTE_ACCESSED | PTE_DIRTY | + PTE_PL_KERN | PTE_AR_RW; + pte |= pa & PTE_PPN_MASK; + + __asm __volatile("ptr.d %0,%1" :: "r"(ia64_xtrace_base), + "r"(XTRACE_LOG2SZ << 2)); + + __asm __volatile("mov %0=psr" : "=r"(psr)); + __asm __volatile("rsm psr.ic|psr.i"); + ia64_srlz_i(); + + ia64_set_ifa(ia64_xtrace_base); + ia64_set_itir(XTRACE_LOG2SZ << 2); + ia64_srlz_d(); + __asm __volatile("itr.d dtr[%0]=%1" :: "r"(6), "r"(pte)); + + __asm __volatile("mov psr.l=%0" :: "r" (psr)); + ia64_srlz_i(); + + PCPU_SET(md.xtrace_tail, ia64_xtrace_base); + ia64_set_k3(ia64_xtrace_base); +} + +void * +ia64_xtrace_alloc(void) +{ + uintptr_t buf; + size_t sz; + + sz = 1UL << XTRACE_LOG2SZ; + buf = kmem_alloc_contig(kernel_arena, sz, M_WAITOK | M_ZERO, + 0UL, ~0UL, sz, 0, VM_MEMATTR_DEFAULT); + return ((void *)buf); +} + +void +ia64_xtrace_init_ap(void *buf) +{ + vm_paddr_t pa; + + if (buf == NULL) { + ia64_set_k3(0); + return; + } + PCPU_SET(md.xtrace_buffer, buf); + pa = ia64_tpa((uintptr_t)buf); + ia64_xtrace_init_common(pa); +} + +void +ia64_xtrace_init_bsp(void) +{ + void *buf; + vm_paddr_t pa; + size_t sz; + + sz = 1UL << XTRACE_LOG2SZ; + ia64_xtrace_base = VM_MIN_KERNEL_ADDRESS + (sz << 1); + ia64_xtrace_mask = ~sz; + + buf = ia64_physmem_alloc(sz, sz); + if (buf == NULL) { + ia64_set_k3(0); + return; + } + PCPU_SET(md.xtrace_buffer, buf); + pa = IA64_RR_MASK((uintptr_t)buf); + ia64_xtrace_init_common(pa); +} + +static void +ia64_xtrace_init(void *dummy __unused) +{ + + TUNABLE_INT_FETCH("machdep.xtrace.enabled", &ia64_xtrace_enabled); +} +SYSINIT(xtrace, SI_SUB_CPU, SI_ORDER_ANY, ia64_xtrace_init, NULL); + +void +ia64_xtrace_save(void) +{ + struct ia64_xtrace_record *rec; + uint64_t head, tail; + + critical_enter(); + head = ia64_get_k3(); + tail = PCPU_GET(md.xtrace_tail); + if (head == 0 || tail == 0) { + critical_exit(); + return; + } + while (head != tail) { + rec = (void *)(uintptr_t)tail; + CTR6(KTR_TRAP, "XTRACE: itc=%lu, ticks=%d: " + "IVT=%#lx, IIP=%#lx, IFA=%#lx, ISR=%#lx", + rec->itc, ticks, + rec->ivt, rec->iip, rec->ifa, rec->isr); + tail += sizeof(*rec); + tail &= ia64_xtrace_mask; + } + PCPU_SET(md.xtrace_tail, tail); + critical_exit(); +} + +void +ia64_xtrace_stop(void) +{ + ia64_xtrace_enabled = 0; +} + +#if 0 +#ifdef DDB + +#include + +DB_SHOW_COMMAND(xtrace, db_xtrace) +{ + struct ia64_xtrace_record *p, *r; + + p = (ia64_xtptr == 0) ? ia64_xtptr1 : ia64_xtptr; + if (p == 0) { + db_printf("Exception trace buffer not allocated\n"); + return; + } + + r = (p->ivt == 0) ? ia64_xtbase : p; + if (r->ivt == 0) { + db_printf("No exception trace records written\n"); + return; + } + + db_printf("IVT\t\t ITC\t\t IIP\t\t IFA\n"); + do { + db_printf("%016lx %016lx %016lx %016lx\n", + r->ivt, r->itc, r->iip, r->ifa); + r++; + if (r == ia64_xtlim) + r = ia64_xtbase; + } while (r != p); +} + +#endif /* DDB */ +#endif Modified: stable/10/sys/ia64/include/md_var.h ============================================================================== --- stable/10/sys/ia64/include/md_var.h Wed Jul 2 23:37:14 2014 (r268199) +++ stable/10/sys/ia64/include/md_var.h Wed Jul 2 23:47:43 2014 (r268200) @@ -102,6 +102,11 @@ int ia64_physmem_init(void); int ia64_physmem_track(vm_paddr_t, vm_size_t); void ia64_probe_sapics(void); void ia64_sync_icache(vm_offset_t, vm_size_t); +void *ia64_xtrace_alloc(void); +void ia64_xtrace_init_ap(void *); +void ia64_xtrace_init_bsp(void); +void ia64_xtrace_save(void); +void ia64_xtrace_stop(void); void interrupt(struct trapframe *); void map_gateway_page(void); void map_pal_code(void); Modified: stable/10/sys/ia64/include/pcpu.h ============================================================================== --- stable/10/sys/ia64/include/pcpu.h Wed Jul 2 23:37:14 2014 (r268199) +++ stable/10/sys/ia64/include/pcpu.h Wed Jul 2 23:47:43 2014 (r268200) @@ -56,6 +56,8 @@ struct pcpu_md { uint32_t clock_mode; /* Clock ET mode */ uint32_t awake:1; /* CPU is awake? */ struct pcpu_stats stats; /* Interrupt stats. */ + void *xtrace_buffer; + uint64_t xtrace_tail; #ifdef _KERNEL struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; @@ -65,7 +67,7 @@ struct pcpu_md { #define PCPU_MD_FIELDS \ uint32_t pc_acpi_id; /* ACPI CPU id. */ \ struct pcpu_md pc_md; /* MD fields. */ \ - char __pad[1265] + char __pad[10*128] #ifdef _KERNEL Modified: stable/10/sys/ia64/include/smp.h ============================================================================== --- stable/10/sys/ia64/include/smp.h Wed Jul 2 23:37:14 2014 (r268199) +++ stable/10/sys/ia64/include/smp.h Wed Jul 2 23:47:43 2014 (r268200) @@ -32,6 +32,7 @@ struct ia64_ap_state { void *as_kstack; void *as_kstack_top; struct pcpu *as_pcpu; + void *as_xtrace_buffer; volatile int as_delay; volatile u_int as_awake; volatile u_int as_spin; From owner-svn-src-stable@FreeBSD.ORG Wed Jul 2 23:57:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 325C1ED2; Wed, 2 Jul 2014 23:57:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E32621A7; Wed, 2 Jul 2014 23:57:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62Nvuqp078042; Wed, 2 Jul 2014 23:57:56 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62NvtPH078037; Wed, 2 Jul 2014 23:57:55 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201407022357.s62NvtPH078037@svn.freebsd.org> From: Marcel Moolenaar Date: Wed, 2 Jul 2014 23:57:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268201 - in stable/10/sys/ia64: ia64 include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 23:57:56 -0000 Author: marcel Date: Wed Jul 2 23:57:55 2014 New Revision: 268201 URL: http://svnweb.freebsd.org/changeset/base/268201 Log: MFC r263380 & r268185: Add KTR events for the PMAP interface functions. Modified: stable/10/sys/ia64/ia64/machdep.c stable/10/sys/ia64/ia64/pmap.c stable/10/sys/ia64/include/pmap.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ia64/ia64/machdep.c ============================================================================== --- stable/10/sys/ia64/ia64/machdep.c Wed Jul 2 23:47:43 2014 (r268200) +++ stable/10/sys/ia64/ia64/machdep.c Wed Jul 2 23:57:55 2014 (r268201) @@ -133,6 +133,7 @@ SYSCTL_UINT(_hw_freq, OID_AUTO, itc, CTL "ITC frequency"); int cold = 1; +int unmapped_buf_allowed = 0; struct bootinfo *bootinfo; @@ -746,8 +747,8 @@ ia64_init(void) mdlen = md->md_pages * EFI_PAGE_SIZE; switch (md->md_type) { case EFI_MD_TYPE_IOPORT: - ia64_port_base = (uintptr_t)pmap_mapdev(md->md_phys, - mdlen); + ia64_port_base = pmap_mapdev_priv(md->md_phys, + mdlen, VM_MEMATTR_UNCACHEABLE); break; case EFI_MD_TYPE_PALCODE: ia64_pal_base = md->md_phys; Modified: stable/10/sys/ia64/ia64/pmap.c ============================================================================== --- stable/10/sys/ia64/ia64/pmap.c Wed Jul 2 23:47:43 2014 (r268200) +++ stable/10/sys/ia64/ia64/pmap.c Wed Jul 2 23:57:55 2014 (r268201) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -484,6 +485,8 @@ void pmap_page_init(vm_page_t m) { + CTR2(KTR_PMAP, "%s(m=%p)", __func__, m); + TAILQ_INIT(&m->md.pv_list); m->md.memattr = VM_MEMATTR_DEFAULT; } @@ -497,6 +500,8 @@ void pmap_init(void) { + CTR1(KTR_PMAP, "%s()", __func__); + ptezone = uma_zcreate("PT ENTRY", sizeof (struct ia64_lpte), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM|UMA_ZONE_NOFREE); } @@ -604,13 +609,25 @@ pmap_free_rid(uint32_t rid) * Page table page management routines..... ***************************************************/ +static void +pmap_pinit_common(pmap_t pmap) +{ + int i; + + for (i = 0; i < IA64_VM_MINKERN_REGION; i++) + pmap->pm_rid[i] = pmap_allocate_rid(); + TAILQ_INIT(&pmap->pm_pvchunk); + bzero(&pmap->pm_stats, sizeof pmap->pm_stats); +} + void -pmap_pinit0(struct pmap *pmap) +pmap_pinit0(pmap_t pmap) { + CTR2(KTR_PMAP, "%s(pm=%p)", __func__, pmap); + PMAP_LOCK_INIT(pmap); - /* kernel_pmap is the same as any other pmap. */ - pmap_pinit(pmap); + pmap_pinit_common(pmap); } /* @@ -618,14 +635,12 @@ pmap_pinit0(struct pmap *pmap) * such as one in a vmspace structure. */ int -pmap_pinit(struct pmap *pmap) +pmap_pinit(pmap_t pmap) { - int i; - for (i = 0; i < IA64_VM_MINKERN_REGION; i++) - pmap->pm_rid[i] = pmap_allocate_rid(); - TAILQ_INIT(&pmap->pm_pvchunk); - bzero(&pmap->pm_stats, sizeof pmap->pm_stats); + CTR2(KTR_PMAP, "%s(pm=%p)", __func__, pmap); + + pmap_pinit_common(pmap); return (1); } @@ -643,6 +658,8 @@ pmap_release(pmap_t pmap) { int i; + CTR2(KTR_PMAP, "%s(pm=%p)", __func__, pmap); + for (i = 0; i < IA64_VM_MINKERN_REGION; i++) if (pmap->pm_rid[i]) pmap_free_rid(pmap->pm_rid[i]); @@ -658,6 +675,8 @@ pmap_growkernel(vm_offset_t addr) struct ia64_lpte *leaf; vm_page_t nkpg; + CTR2(KTR_PMAP, "%s(va=%#lx)", __func__, addr); + while (kernel_vm_end <= addr) { if (nkpt == PAGE_SIZE/8 + PAGE_SIZE*PAGE_SIZE/64) panic("%s: out of kernel address space", __func__); @@ -1152,6 +1171,8 @@ pmap_extract(pmap_t pmap, vm_offset_t va pmap_t oldpmap; vm_paddr_t pa; + CTR3(KTR_PMAP, "%s(pm=%p, va=%#lx)", __func__, pmap, va); + pa = 0; PMAP_LOCK(pmap); oldpmap = pmap_switch(pmap); @@ -1178,6 +1199,9 @@ pmap_extract_and_hold(pmap_t pmap, vm_of vm_page_t m; vm_paddr_t pa; + CTR4(KTR_PMAP, "%s(pm=%p, va=%#lx, prot=%#x)", __func__, pmap, va, + prot); + pa = 0; m = NULL; PMAP_LOCK(pmap); @@ -1359,6 +1383,8 @@ pmap_kextract(vm_offset_t va) vm_paddr_t pa; u_int idx; + CTR2(KTR_PMAP, "%s(va=%#lx)", __func__, va); + KASSERT(va >= VM_MAXUSER_ADDRESS, ("Must be kernel VA")); /* Regions 6 and 7 are direct mapped. */ @@ -1419,6 +1445,8 @@ pmap_qenter(vm_offset_t va, vm_page_t *m struct ia64_lpte *pte; int i; + CTR4(KTR_PMAP, "%s(va=%#lx, m_p=%p, cnt=%d)", __func__, va, m, count); + for (i = 0; i < count; i++) { pte = pmap_find_kpte(va); if (pmap_present(pte)) @@ -1442,6 +1470,8 @@ pmap_qremove(vm_offset_t va, int count) struct ia64_lpte *pte; int i; + CTR3(KTR_PMAP, "%s(va=%#lx, cnt=%d)", __func__, va, count); + for (i = 0; i < count; i++) { pte = pmap_find_kpte(va); if (pmap_present(pte)) { @@ -1458,10 +1488,12 @@ pmap_qremove(vm_offset_t va, int count) * to not have the PTE reflect that, nor update statistics. */ void -pmap_kenter(vm_offset_t va, vm_offset_t pa) +pmap_kenter(vm_offset_t va, vm_paddr_t pa) { struct ia64_lpte *pte; + CTR3(KTR_PMAP, "%s(va=%#lx, pa=%#lx)", __func__, va, pa); + pte = pmap_find_kpte(va); if (pmap_present(pte)) pmap_invalidate_page(va); @@ -1480,6 +1512,8 @@ pmap_kremove(vm_offset_t va) { struct ia64_lpte *pte; + CTR2(KTR_PMAP, "%s(va=%#lx)", __func__, va); + pte = pmap_find_kpte(va); if (pmap_present(pte)) { pmap_remove_vhpt(va); @@ -1503,6 +1537,10 @@ pmap_kremove(vm_offset_t va) vm_offset_t pmap_map(vm_offset_t *virt, vm_offset_t start, vm_offset_t end, int prot) { + + CTR5(KTR_PMAP, "%s(va_p=%p, sva=%#lx, eva=%#lx, prot=%#x)", __func__, + virt, start, end, prot); + return IA64_PHYS_TO_RR7(start); } @@ -1522,6 +1560,9 @@ pmap_remove(pmap_t pmap, vm_offset_t sva vm_offset_t va; struct ia64_lpte *pte; + CTR4(KTR_PMAP, "%s(pm=%p, sva=%#lx, eva=%#lx)", __func__, pmap, sva, + eva); + /* * Perform an unsynchronized read. This is, however, safe. */ @@ -1553,13 +1594,14 @@ pmap_remove(pmap_t pmap, vm_offset_t sva * inefficient because they iteratively called * pmap_remove (slow...) */ - void pmap_remove_all(vm_page_t m) { pmap_t oldpmap; pv_entry_t pv; + CTR2(KTR_PMAP, "%s(m=%p)", __func__, m); + KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_remove_all: page %p is not managed", m)); rw_wlock(&pvh_global_lock); @@ -1592,6 +1634,9 @@ pmap_protect(pmap_t pmap, vm_offset_t sv pmap_t oldpmap; struct ia64_lpte *pte; + CTR5(KTR_PMAP, "%s(pm=%p, sva=%#lx, eva=%#lx, prot=%#x)", __func__, + pmap, sva, eva, prot); + if ((prot & VM_PROT_READ) == VM_PROT_NONE) { pmap_remove(pmap, sva, eva); return; @@ -1658,6 +1703,9 @@ pmap_enter(pmap_t pmap, vm_offset_t va, struct ia64_lpte *pte; boolean_t icache_inval, managed; + CTR6(KTR_PMAP, "pmap_enter(pm=%p, va=%#lx, acc=%#x, m=%p, prot=%#x, " + "wired=%u)", pmap, va, access, m, prot, wired); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); oldpmap = pmap_switch(pmap); @@ -1789,6 +1837,9 @@ pmap_enter_object(pmap_t pmap, vm_offset vm_page_t m; vm_pindex_t diff, psize; + CTR6(KTR_PMAP, "%s(pm=%p, sva=%#lx, eva=%#lx, m=%p, prot=%#x)", + __func__, pmap, start, end, m_start, prot); + VM_OBJECT_ASSERT_LOCKED(m_start->object); psize = atop(end - start); @@ -1813,12 +1864,14 @@ pmap_enter_object(pmap_t pmap, vm_offset * 4. No page table pages. * but is *MUCH* faster than pmap_enter... */ - void pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot) { pmap_t oldpmap; + CTR5(KTR_PMAP, "%s(pm=%p, va=%#lx, m=%p, prot=%#x)", __func__, pmap, + va, m, prot); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); oldpmap = pmap_switch(pmap); @@ -1876,11 +1929,13 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ * faults on process startup and immediately after an mmap. */ void -pmap_object_init_pt(pmap_t pmap, vm_offset_t addr, - vm_object_t object, vm_pindex_t pindex, - vm_size_t size) +pmap_object_init_pt(pmap_t pmap, vm_offset_t addr, vm_object_t object, + vm_pindex_t pindex, vm_size_t size) { + CTR6(KTR_PMAP, "%s(pm=%p, va=%#lx, obj=%p, idx=%lu, sz=%#lx)", + __func__, pmap, addr, object, pindex, size); + VM_OBJECT_ASSERT_WLOCKED(object); KASSERT(object->type == OBJT_DEVICE || object->type == OBJT_SG, ("pmap_object_init_pt: non-device object")); @@ -1894,14 +1949,14 @@ pmap_object_init_pt(pmap_t pmap, vm_offs * The mapping must already exist in the pmap. */ void -pmap_change_wiring(pmap, va, wired) - register pmap_t pmap; - vm_offset_t va; - boolean_t wired; +pmap_change_wiring(pmap_t pmap, vm_offset_t va, boolean_t wired) { pmap_t oldpmap; struct ia64_lpte *pte; + CTR4(KTR_PMAP, "%s(pm=%p, va=%#lx, wired=%u)", __func__, pmap, va, + wired); + PMAP_LOCK(pmap); oldpmap = pmap_switch(pmap); @@ -1919,8 +1974,6 @@ pmap_change_wiring(pmap, va, wired) PMAP_UNLOCK(pmap); } - - /* * Copy the range specified by src_addr/len * from the source map to the range dst_addr/len @@ -1928,30 +1981,31 @@ pmap_change_wiring(pmap, va, wired) * * This routine is only advisory and need not do anything. */ - void -pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_size_t len, - vm_offset_t src_addr) +pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_va, vm_size_t len, + vm_offset_t src_va) { -} + CTR6(KTR_PMAP, "%s(dpm=%p, spm=%p, dva=%#lx, sz=%#lx, sva=%#lx)", + __func__, dst_pmap, src_pmap, dst_va, len, src_va); +} /* * pmap_zero_page zeros the specified hardware page by * mapping it into virtual memory and using bzero to clear * its contents. */ - void pmap_zero_page(vm_page_t m) { void *p; + CTR2(KTR_PMAP, "%s(m=%p)", __func__, m); + p = (void *)pmap_page_to_va(m); bzero(p, PAGE_SIZE); } - /* * pmap_zero_page_area zeros the specified hardware page by * mapping it into virtual memory and using bzero to clear @@ -1959,33 +2013,33 @@ pmap_zero_page(vm_page_t m) * * off and size must reside within a single page. */ - void pmap_zero_page_area(vm_page_t m, int off, int size) { char *p; + CTR4(KTR_PMAP, "%s(m=%p, ofs=%d, len=%d)", __func__, m, off, size); + p = (void *)pmap_page_to_va(m); bzero(p + off, size); } - /* * pmap_zero_page_idle zeros the specified hardware page by * mapping it into virtual memory and using bzero to clear * its contents. This is for the vm_idlezero process. */ - void pmap_zero_page_idle(vm_page_t m) { void *p; + CTR2(KTR_PMAP, "%s(m=%p)", __func__, m); + p = (void *)pmap_page_to_va(m); bzero(p, PAGE_SIZE); } - /* * pmap_copy_page copies the specified (machine independent) * page by mapping the page into virtual memory and using @@ -1997,13 +2051,13 @@ pmap_copy_page(vm_page_t msrc, vm_page_t { void *dst, *src; + CTR3(KTR_PMAP, "%s(sm=%p, dm=%p)", __func__, msrc, mdst); + src = (void *)pmap_page_to_va(msrc); dst = (void *)pmap_page_to_va(mdst); bcopy(src, dst, PAGE_SIZE); } -int unmapped_buf_allowed; - void pmap_copy_pages(vm_page_t ma[], vm_offset_t a_offset, vm_page_t mb[], vm_offset_t b_offset, int xfersize) @@ -2012,6 +2066,9 @@ pmap_copy_pages(vm_page_t ma[], vm_offse vm_offset_t a_pg_offset, b_pg_offset; int cnt; + CTR6(KTR_PMAP, "%s(m0=%p, va0=%#lx, m1=%p, va1=%#lx, sz=%#x)", + __func__, ma, a_offset, mb, b_offset, xfersize); + while (xfersize > 0) { a_pg_offset = a_offset & PAGE_MASK; cnt = min(xfersize, PAGE_SIZE - a_pg_offset); @@ -2042,6 +2099,8 @@ pmap_page_exists_quick(pmap_t pmap, vm_p int loops = 0; boolean_t rv; + CTR3(KTR_PMAP, "%s(pm=%p, m=%p)", __func__, pmap, m); + KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_page_exists_quick: page %p is not managed", m)); rv = FALSE; @@ -2073,6 +2132,8 @@ pmap_page_wired_mappings(vm_page_t m) pv_entry_t pv; int count; + CTR2(KTR_PMAP, "%s(m=%p)", __func__, m); + count = 0; if ((m->oflags & VPO_UNMANAGED) != 0) return (count); @@ -2112,6 +2173,8 @@ pmap_remove_pages(pmap_t pmap) u_long inuse, bitmask; int allfree, bit, field, idx; + CTR2(KTR_PMAP, "%s(pm=%p)", __func__, pmap); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); oldpmap = pmap_switch(pmap); @@ -2179,6 +2242,8 @@ pmap_ts_referenced(vm_page_t m) pv_entry_t pv; int count = 0; + CTR2(KTR_PMAP, "%s(m=%p)", __func__, m); + KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_ts_referenced: page %p is not managed", m)); rw_wlock(&pvh_global_lock); @@ -2214,6 +2279,8 @@ pmap_is_modified(vm_page_t m) pv_entry_t pv; boolean_t rv; + CTR2(KTR_PMAP, "%s(m=%p)", __func__, m); + KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_is_modified: page %p is not managed", m)); rv = FALSE; @@ -2254,6 +2321,8 @@ pmap_is_prefaultable(pmap_t pmap, vm_off { struct ia64_lpte *pte; + CTR3(KTR_PMAP, "%s(pm=%p, va=%#lx)", __func__, pmap, addr); + pte = pmap_find_vhpt(addr); if (pte != NULL && pmap_present(pte)) return (FALSE); @@ -2274,6 +2343,8 @@ pmap_is_referenced(vm_page_t m) pv_entry_t pv; boolean_t rv; + CTR2(KTR_PMAP, "%s(m=%p)", __func__, m); + KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_is_referenced: page %p is not managed", m)); rv = FALSE; @@ -2306,6 +2377,9 @@ pmap_advise(pmap_t pmap, vm_offset_t sva pmap_t oldpmap; vm_page_t m; + CTR5(KTR_PMAP, "%s(pm=%p, sva=%#lx, eva=%#lx, adv=%d)", __func__, + pmap, sva, eva, advice); + PMAP_LOCK(pmap); oldpmap = pmap_switch(pmap); for (; sva < eva; sva += PAGE_SIZE) { @@ -2348,6 +2422,8 @@ pmap_clear_modify(vm_page_t m) pmap_t oldpmap, pmap; pv_entry_t pv; + CTR2(KTR_PMAP, "%s(m=%p)", __func__, m); + KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_clear_modify: page %p is not managed", m)); VM_OBJECT_ASSERT_WLOCKED(m->object); @@ -2389,6 +2465,8 @@ pmap_remove_write(vm_page_t m) pv_entry_t pv; vm_prot_t prot; + CTR2(KTR_PMAP, "%s(m=%p)", __func__, m); + KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_remove_write: page %p is not managed", m)); @@ -2425,20 +2503,13 @@ pmap_remove_write(vm_page_t m) rw_wunlock(&pvh_global_lock); } -/* - * Map a set of physical memory pages into the kernel virtual - * address space. Return a pointer to where it is mapped. This - * routine is intended to be used for mapping device memory, - * NOT real memory. - */ -void * -pmap_mapdev(vm_paddr_t pa, vm_size_t sz) +vm_offset_t +pmap_mapdev_priv(vm_paddr_t pa, vm_size_t sz, vm_memattr_t attr) { - static void *last_va = NULL; - static vm_paddr_t last_pa = 0; + static vm_offset_t last_va = 0; + static vm_paddr_t last_pa = ~0UL; static vm_size_t last_sz = 0; struct efi_md *md; - vm_offset_t va; if (pa == last_pa && sz == last_sz) return (last_va); @@ -2447,30 +2518,48 @@ pmap_mapdev(vm_paddr_t pa, vm_size_t sz) if (md == NULL) { printf("%s: [%#lx..%#lx] not covered by memory descriptor\n", __func__, pa, pa + sz - 1); - return ((void *)IA64_PHYS_TO_RR6(pa)); + return (IA64_PHYS_TO_RR6(pa)); } if (md->md_type == EFI_MD_TYPE_FREE) { printf("%s: [%#lx..%#lx] is in DRAM\n", __func__, pa, pa + sz - 1); - return (NULL); + return (0); } - va = (md->md_attr & EFI_MD_ATTR_WB) ? IA64_PHYS_TO_RR7(pa) : + last_va = (md->md_attr & EFI_MD_ATTR_WB) ? IA64_PHYS_TO_RR7(pa) : IA64_PHYS_TO_RR6(pa); - - last_va = (void *)va; last_pa = pa; last_sz = sz; return (last_va); } /* - * 'Unmap' a range mapped by pmap_mapdev(). + * Map a set of physical memory pages into the kernel virtual + * address space. Return a pointer to where it is mapped. This + * routine is intended to be used for mapping device memory, + * NOT real memory. + */ +void * +pmap_mapdev_attr(vm_paddr_t pa, vm_size_t sz, vm_memattr_t attr) +{ + vm_offset_t va; + + CTR4(KTR_PMAP, "%s(pa=%#lx, sz=%#lx, attr=%#x)", __func__, pa, sz, + attr); + + va = pmap_mapdev_priv(pa, sz, attr); + return ((void *)(uintptr_t)va); +} + +/* + * 'Unmap' a range mapped by pmap_mapdev_attr(). */ void pmap_unmapdev(vm_offset_t va, vm_size_t size) { + + CTR3(KTR_PMAP, "%s(va=%#lx, sz=%#lx)", __func__, va, size); } /* @@ -2496,6 +2585,8 @@ pmap_page_set_memattr(vm_page_t m, vm_me pv_entry_t pv; void *va; + CTR3(KTR_PMAP, "%s(m=%p, attr=%#x)", __func__, m, ma); + rw_wlock(&pvh_global_lock); m->md.memattr = ma; TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { @@ -2542,6 +2633,9 @@ pmap_mincore(pmap_t pmap, vm_offset_t ad vm_paddr_t pa; int val; + CTR4(KTR_PMAP, "%s(pm=%p, va=%#lx, pa_p=%p)", __func__, pmap, addr, + locked_pa); + PMAP_LOCK(pmap); retry: oldpmap = pmap_switch(pmap); @@ -2574,9 +2668,15 @@ out: return (val); } +/* + * + */ void pmap_activate(struct thread *td) { + + CTR2(KTR_PMAP, "%s(td=%p)", __func__, td); + pmap_switch(vmspace_pmap(td->td_proc->p_vmspace)); } @@ -2609,6 +2709,9 @@ out: return (prevpm); } +/* + * + */ void pmap_sync_icache(pmap_t pm, vm_offset_t va, vm_size_t sz) { @@ -2617,6 +2720,8 @@ pmap_sync_icache(pmap_t pm, vm_offset_t vm_offset_t lim; vm_size_t len; + CTR4(KTR_PMAP, "%s(pm=%p, va=%#lx, sz=%#lx)", __func__, pm, va, sz); + sz += va & 31; va &= ~31; sz = (sz + 31) & ~31; @@ -2644,6 +2749,9 @@ void pmap_align_superpage(vm_object_t object, vm_ooffset_t offset, vm_offset_t *addr, vm_size_t size) { + + CTR5(KTR_PMAP, "%s(obj=%p, ofs=%#lx, va_p=%p, sz=%#lx)", __func__, + object, offset, addr, size); } #include "opt_ddb.h" Modified: stable/10/sys/ia64/include/pmap.h ============================================================================== --- stable/10/sys/ia64/include/pmap.h Wed Jul 2 23:47:43 2014 (r268200) +++ stable/10/sys/ia64/include/pmap.h Wed Jul 2 23:57:55 2014 (r268201) @@ -114,24 +114,29 @@ extern vm_offset_t virtual_end; extern uint64_t pmap_vhpt_base[]; extern int pmap_vhpt_log2size; +#define pmap_mapbios(pa,sz) pmap_mapdev_attr(pa,sz,VM_MEMATTR_UNCACHEABLE) +#define pmap_mapdev(pa,sz) pmap_mapdev_attr(pa,sz,VM_MEMATTR_UNCACHEABLE) +#define pmap_unmapbios(va,sz) pmap_unmapdev(va,sz) + #define pmap_page_get_memattr(m) ((m)->md.memattr) -#define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list)) +#define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list)) #define pmap_page_is_write_mapped(m) (((m)->aflags & PGA_WRITEABLE) != 0) -#define pmap_mapbios(pa, sz) pmap_mapdev(pa, sz) -#define pmap_unmapbios(va, sz) pmap_unmapdev(va, sz) -vm_offset_t pmap_alloc_vhpt(void); -void pmap_bootstrap(void); -void pmap_invalidate_all(void); -void pmap_kenter(vm_offset_t va, vm_offset_t pa); +void pmap_kenter(vm_offset_t va, vm_paddr_t pa); vm_paddr_t pmap_kextract(vm_offset_t va); void pmap_kremove(vm_offset_t); -void *pmap_mapdev(vm_paddr_t, vm_size_t); +void *pmap_mapdev_attr(vm_paddr_t, vm_size_t, vm_memattr_t); void pmap_page_set_memattr(vm_page_t, vm_memattr_t); +void pmap_unmapdev(vm_offset_t, vm_size_t); + +/* Machine-architecture private */ +vm_offset_t pmap_alloc_vhpt(void); +void pmap_bootstrap(void); +void pmap_invalidate_all(void); +vm_offset_t pmap_mapdev_priv(vm_paddr_t, vm_size_t, vm_memattr_t); vm_offset_t pmap_page_to_va(vm_page_t); vm_offset_t pmap_steal_memory(vm_size_t); struct pmap *pmap_switch(struct pmap *pmap); -void pmap_unmapdev(vm_offset_t, vm_size_t); #endif /* _KERNEL */ From owner-svn-src-stable@FreeBSD.ORG Thu Jul 3 06:44:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF503145; Thu, 3 Jul 2014 06:44:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8236F21F9; Thu, 3 Jul 2014 06:44:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s636iuPN069333; Thu, 3 Jul 2014 06:44:56 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s636itKK069329; Thu, 3 Jul 2014 06:44:55 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201407030644.s636itKK069329@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 3 Jul 2014 06:44:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268206 - in stable/10/sys/dev/usb: net serial X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2014 06:44:56 -0000 Author: hselasky Date: Thu Jul 3 06:44:55 2014 New Revision: 268206 URL: http://svnweb.freebsd.org/changeset/base/268206 Log: MFC r268078 and r268080: Fix for memory use after free() and mtx_destroy(). Modified: stable/10/sys/dev/usb/net/uhso.c stable/10/sys/dev/usb/serial/usb_serial.c stable/10/sys/dev/usb/serial/usb_serial.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/net/uhso.c ============================================================================== --- stable/10/sys/dev/usb/net/uhso.c Thu Jul 3 05:22:13 2014 (r268205) +++ stable/10/sys/dev/usb/net/uhso.c Thu Jul 3 06:44:55 2014 (r268206) @@ -558,8 +558,6 @@ uhso_attach(device_t self) mtx_init(&sc->sc_mtx, "uhso", NULL, MTX_DEF); ucom_ref(&sc->sc_super_ucom); - sc->sc_ucom = NULL; - sc->sc_ttys = 0; sc->sc_radio = 1; id = usbd_get_interface_descriptor(uaa->iface); @@ -679,9 +677,6 @@ uhso_detach(device_t self) UHSO_CTRL_MAX); } } - - free(sc->sc_tty, M_USBDEV); - free(sc->sc_ucom, M_USBDEV); } if (sc->sc_ifp != NULL) { @@ -709,6 +704,8 @@ static void uhso_free_softc(struct uhso_softc *sc) { if (ucom_unref(&sc->sc_super_ucom)) { + free(sc->sc_tty, M_USBDEV); + free(sc->sc_ucom, M_USBDEV); mtx_destroy(&sc->sc_mtx); device_free_softc(sc); } Modified: stable/10/sys/dev/usb/serial/usb_serial.c ============================================================================== --- stable/10/sys/dev/usb/serial/usb_serial.c Thu Jul 3 05:22:13 2014 (r268205) +++ stable/10/sys/dev/usb/serial/usb_serial.c Thu Jul 3 06:44:55 2014 (r268206) @@ -203,7 +203,7 @@ ucom_uninit(void *arg) mtx_destroy(&ucom_mtx); } -SYSUNINIT(ucom_uninit, SI_SUB_KLD - 2, SI_ORDER_ANY, ucom_uninit, NULL); +SYSUNINIT(ucom_uninit, SI_SUB_KLD - 3, SI_ORDER_ANY, ucom_uninit, NULL); /* * Mark a unit number (the X in cuaUX) as in use. Modified: stable/10/sys/dev/usb/serial/usb_serial.h ============================================================================== --- stable/10/sys/dev/usb/serial/usb_serial.h Thu Jul 3 05:22:13 2014 (r268205) +++ stable/10/sys/dev/usb/serial/usb_serial.h Thu Jul 3 06:44:55 2014 (r268206) @@ -195,7 +195,7 @@ struct ucom_softc { #define UCOM_MTX_LOCK(sc) mtx_lock((sc)->sc_mtx) #define UCOM_MTX_UNLOCK(sc) mtx_unlock((sc)->sc_mtx) #define UCOM_UNLOAD_DRAIN(x) \ -SYSUNINIT(var, SI_SUB_KLD - 3, SI_ORDER_ANY, ucom_drain_all, 0) +SYSUNINIT(var, SI_SUB_KLD - 2, SI_ORDER_ANY, ucom_drain_all, 0) #define ucom_cfg_do_request(udev,com,req,ptr,flags,timo) \ usbd_do_request_proc(udev,&(com)->sc_super->sc_tq,req,ptr,flags,NULL,timo) From owner-svn-src-stable@FreeBSD.ORG Thu Jul 3 08:07:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1BDAE223; Thu, 3 Jul 2014 08:07:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E29202877; Thu, 3 Jul 2014 08:07:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6387cI7006638; Thu, 3 Jul 2014 08:07:38 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6387c4D006635; Thu, 3 Jul 2014 08:07:38 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201407030807.s6387c4D006635@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 3 Jul 2014 08:07:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268208 - in stable/9/sys/dev/usb: net serial X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2014 08:07:39 -0000 Author: hselasky Date: Thu Jul 3 08:07:37 2014 New Revision: 268208 URL: http://svnweb.freebsd.org/changeset/base/268208 Log: MFC r268078 and r268080: Fix for memory use after free() and mtx_destroy(). Modified: stable/9/sys/dev/usb/net/uhso.c stable/9/sys/dev/usb/serial/usb_serial.c stable/9/sys/dev/usb/serial/usb_serial.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/net/uhso.c ============================================================================== --- stable/9/sys/dev/usb/net/uhso.c Thu Jul 3 06:52:26 2014 (r268207) +++ stable/9/sys/dev/usb/net/uhso.c Thu Jul 3 08:07:37 2014 (r268208) @@ -558,8 +558,6 @@ uhso_attach(device_t self) mtx_init(&sc->sc_mtx, "uhso", NULL, MTX_DEF); ucom_ref(&sc->sc_super_ucom); - sc->sc_ucom = NULL; - sc->sc_ttys = 0; sc->sc_radio = 1; id = usbd_get_interface_descriptor(uaa->iface); @@ -679,9 +677,6 @@ uhso_detach(device_t self) UHSO_CTRL_MAX); } } - - free(sc->sc_tty, M_USBDEV); - free(sc->sc_ucom, M_USBDEV); } if (sc->sc_ifp != NULL) { @@ -709,6 +704,8 @@ static void uhso_free_softc(struct uhso_softc *sc) { if (ucom_unref(&sc->sc_super_ucom)) { + free(sc->sc_tty, M_USBDEV); + free(sc->sc_ucom, M_USBDEV); mtx_destroy(&sc->sc_mtx); device_free_softc(sc); } Modified: stable/9/sys/dev/usb/serial/usb_serial.c ============================================================================== --- stable/9/sys/dev/usb/serial/usb_serial.c Thu Jul 3 06:52:26 2014 (r268207) +++ stable/9/sys/dev/usb/serial/usb_serial.c Thu Jul 3 08:07:37 2014 (r268208) @@ -203,7 +203,7 @@ ucom_uninit(void *arg) mtx_destroy(&ucom_mtx); } -SYSUNINIT(ucom_uninit, SI_SUB_KLD - 2, SI_ORDER_ANY, ucom_uninit, NULL); +SYSUNINIT(ucom_uninit, SI_SUB_KLD - 3, SI_ORDER_ANY, ucom_uninit, NULL); /* * Mark a unit number (the X in cuaUX) as in use. Modified: stable/9/sys/dev/usb/serial/usb_serial.h ============================================================================== --- stable/9/sys/dev/usb/serial/usb_serial.h Thu Jul 3 06:52:26 2014 (r268207) +++ stable/9/sys/dev/usb/serial/usb_serial.h Thu Jul 3 08:07:37 2014 (r268208) @@ -195,7 +195,7 @@ struct ucom_softc { #define UCOM_MTX_LOCK(sc) mtx_lock((sc)->sc_mtx) #define UCOM_MTX_UNLOCK(sc) mtx_unlock((sc)->sc_mtx) #define UCOM_UNLOAD_DRAIN(x) \ -SYSUNINIT(var, SI_SUB_KLD - 3, SI_ORDER_ANY, ucom_drain_all, 0) +SYSUNINIT(var, SI_SUB_KLD - 2, SI_ORDER_ANY, ucom_drain_all, 0) #define ucom_cfg_do_request(udev,com,req,ptr,flags,timo) \ usbd_do_request_proc(udev,&(com)->sc_super->sc_tq,req,ptr,flags,NULL,timo) From owner-svn-src-stable@FreeBSD.ORG Thu Jul 3 10:59:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7B2FE8AF; Thu, 3 Jul 2014 10:59:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D57E2928; Thu, 3 Jul 2014 10:59:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s63Axh1I085955; Thu, 3 Jul 2014 10:59:43 GMT (envelope-from daichi@svn.freebsd.org) Received: (from daichi@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s63AxhfH085954; Thu, 3 Jul 2014 10:59:43 GMT (envelope-from daichi@svn.freebsd.org) Message-Id: <201407031059.s63AxhfH085954@svn.freebsd.org> From: Daichi GOTO Date: Thu, 3 Jul 2014 10:59:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268210 - stable/10/sys/dev/glxiic X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2014 10:59:43 -0000 Author: daichi (ports committer) Date: Thu Jul 3 10:59:42 2014 New Revision: 268210 URL: http://svnweb.freebsd.org/changeset/base/268210 Log: MFC: r267852 Fixed an IIC timing issue between the glxiic master and a slave of peripheral devices. When transmitting (rx) from slave to master, sometimes nAKC delays. As a result, some slaves fails their transmission. Submitted by: Masanori OZAWA Reviewed by: brix Modified: stable/10/sys/dev/glxiic/glxiic.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/glxiic/glxiic.c ============================================================================== --- stable/10/sys/dev/glxiic/glxiic.c Thu Jul 3 10:49:46 2014 (r268209) +++ stable/10/sys/dev/glxiic/glxiic.c Thu Jul 3 10:59:42 2014 (r268210) @@ -711,6 +711,7 @@ static int glxiic_state_master_addr_callback(struct glxiic_softc *sc, uint8_t status) { uint8_t slave; + uint8_t ctrl1; GLXIIC_ASSERT_LOCKED(sc); @@ -746,6 +747,13 @@ glxiic_state_master_addr_callback(struct bus_write_1(sc->smb_res, GLXIIC_SMB_SDA, slave); + if ((sc->msg->flags & IIC_M_RD) != 0 && sc->ndata == 1) { + /* Last byte from slave, set NACK. */ + ctrl1 = bus_read_1(sc->smb_res, GLXIIC_SMB_CTRL1); + bus_write_1(sc->smb_res, GLXIIC_SMB_CTRL1, + ctrl1 | GLXIIC_SMB_CTRL1_ACK_BIT); + } + return (IIC_NOERR); } @@ -811,13 +819,6 @@ glxiic_state_master_rx_callback(struct g return (IIC_ENOACK); } - if (sc->ndata == 1) { - /* Last byte from slave, set NACK. */ - ctrl1 = bus_read_1(sc->smb_res, GLXIIC_SMB_CTRL1); - bus_write_1(sc->smb_res, GLXIIC_SMB_CTRL1, - ctrl1 | GLXIIC_SMB_CTRL1_ACK_BIT); - } - if ((status & GLXIIC_SMB_STS_STASTR_BIT) != 0) { /* Bus is stalled, clear and wait for data. */ bus_write_1(sc->smb_res, GLXIIC_SMB_STS, @@ -837,6 +838,13 @@ glxiic_state_master_rx_callback(struct g return (glxiic_state_table[sc->state].callback(sc, status)); } + if (sc->ndata == 1) { + /* Last byte from slave, set NACK. */ + ctrl1 = bus_read_1(sc->smb_res, GLXIIC_SMB_CTRL1); + bus_write_1(sc->smb_res, GLXIIC_SMB_CTRL1, + ctrl1 | GLXIIC_SMB_CTRL1_ACK_BIT); + } + glxiic_start_timeout_locked(sc); return (IIC_NOERR); From owner-svn-src-stable@FreeBSD.ORG Thu Jul 3 15:56:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E74C412; Thu, 3 Jul 2014 15:56:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1C9C27C2; Thu, 3 Jul 2014 15:56:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s63FuU3X027910; Thu, 3 Jul 2014 15:56:30 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s63FuUCr027909; Thu, 3 Jul 2014 15:56:30 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201407031556.s63FuUCr027909@svn.freebsd.org> From: Hajimu UMEMOTO Date: Thu, 3 Jul 2014 15:56:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268216 - stable/10/lib/libc/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2014 15:56:31 -0000 Author: ume Date: Thu Jul 3 15:56:30 2014 New Revision: 268216 URL: http://svnweb.freebsd.org/changeset/base/268216 Log: MFC r267912, r267915: - Exclude loopback address rather than loopback interface. - style(9) Spotted by: melifaro Modified: stable/10/lib/libc/net/getaddrinfo.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/net/getaddrinfo.c ============================================================================== --- stable/10/lib/libc/net/getaddrinfo.c Thu Jul 3 13:51:10 2014 (r268215) +++ stable/10/lib/libc/net/getaddrinfo.c Thu Jul 3 15:56:30 2014 (r268216) @@ -1532,7 +1532,7 @@ find_afd(int af) } /* - * post-2553: AI_ADDRCONFIG check. Determines which address families are + * RFC 3493: AI_ADDRCONFIG check. Determines which address families are * configured on the local system and correlates with pai->ai_family value. * If an address family is not configured on the system, it will not be * queried for. For this purpose, loopback addresses are not considered @@ -1545,24 +1545,40 @@ static int addrconfig(struct addrinfo *pai) { struct ifaddrs *ifaddrs, *ifa; + struct sockaddr_in *sin; +#ifdef INET6 + struct sockaddr_in6 *sin6; +#endif int seen_inet = 0, seen_inet6 = 0; if (getifaddrs(&ifaddrs) != 0) - return 0; + return (0); for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) { if (ifa->ifa_addr == NULL || (ifa->ifa_flags & IFF_UP) == 0) continue; - if ((ifa->ifa_flags & IFT_LOOP) != 0) - continue; switch (ifa->ifa_addr->sa_family) { case AF_INET: + if (seen_inet) + continue; + sin = (struct sockaddr_in *)(ifa->ifa_addr); + if (IN_LOOPBACK(htonl(sin->sin_addr.s_addr))) + continue; seen_inet = 1; break; #ifdef INET6 case AF_INET6: - if (!seen_inet6 && !is_ifdisabled(ifa->ifa_name)) - seen_inet6 = 1; + if (seen_inet6) + continue; + sin6 = (struct sockaddr_in6 *)(ifa->ifa_addr); + if (IN6_IS_ADDR_LOOPBACK(&sin6->sin6_addr)) + continue; + if ((ifa->ifa_flags & IFT_LOOP) != 0 && + IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) + continue; + if (is_ifdisabled(ifa->ifa_name)) + continue; + seen_inet6 = 1; break; #endif } @@ -1571,16 +1587,16 @@ addrconfig(struct addrinfo *pai) switch(pai->ai_family) { case AF_INET6: - return seen_inet6; + return (seen_inet6); case AF_INET: - return seen_inet; + return (seen_inet); case AF_UNSPEC: if (seen_inet == seen_inet6) - return seen_inet; + return (seen_inet); pai->ai_family = seen_inet ? AF_INET : AF_INET6; - return 1; + return (1); } - return 1; + return (1); } #ifdef INET6 @@ -1591,12 +1607,12 @@ is_ifdisabled(char *name) int fd; if ((fd = _socket(AF_INET6, SOCK_DGRAM | SOCK_CLOEXEC, 0)) < 0) - return -1; + return (-1); memset(&nd, 0, sizeof(nd)); strlcpy(nd.ifname, name, sizeof(nd.ifname)); if (_ioctl(fd, SIOCGIFINFO_IN6, &nd) < 0) { _close(fd); - return -1; + return (-1); } _close(fd); return ((nd.ndi.flags & ND6_IFF_IFDISABLED) != 0); From owner-svn-src-stable@FreeBSD.ORG Thu Jul 3 16:00:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA795969; Thu, 3 Jul 2014 16:00:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BAD7A288A; Thu, 3 Jul 2014 16:00:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s63G0v78031328; Thu, 3 Jul 2014 16:00:57 GMT (envelope-from truckman@svn.freebsd.org) Received: (from truckman@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s63G0vWW031327; Thu, 3 Jul 2014 16:00:57 GMT (envelope-from truckman@svn.freebsd.org) Message-Id: <201407031600.s63G0vWW031327@svn.freebsd.org> From: Don Lewis Date: Thu, 3 Jul 2014 16:00:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268217 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2014 16:00:58 -0000 Author: truckman Date: Thu Jul 3 16:00:57 2014 New Revision: 268217 URL: http://svnweb.freebsd.org/changeset/base/268217 Log: MFC r266814 Initialize r_flags the same way in all cases using a sanitized copy of flags that has several bits cleared. The RF_WANTED and RF_FIRSTSHARE bits are invalid in this context, and we want to defer setting RF_ACTIVE in r_flags until later. This should make rman_get_flags() return the correct answer in all cases. Add a KASSERT() to catch callers which incorrectly pass the RF_WANTED or RF_FIRSTSHARE flags. Do a strict equality check on the share type bits of flags. In particular, do an equality check on RF_PREFETCHABLE. The previous code would allow one type of mismatch of RF_PREFETCHABLE but disallow the other type of mismatch. Also, ignore the the RF_ALIGNMENT_MASK bits since alignment validity should be handled by the amask check. This field contains an integer value, but previous code did a strange bitwise comparison on it. Leave the original value of flags unmolested as a minor debug aid. Change the start+amask overflow check to a KASSERT() since it is just meant to catch a highly unlikely programming error in the caller. Reviewed by: jhb Modified: stable/9/sys/kern/subr_rman.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/subr_rman.c ============================================================================== --- stable/9/sys/kern/subr_rman.c Thu Jul 3 15:56:30 2014 (r268216) +++ stable/9/sys/kern/subr_rman.c Thu Jul 3 16:00:57 2014 (r268217) @@ -430,12 +430,14 @@ rman_adjust_resource(struct resource *rr return (0); } +#define SHARE_TYPE(f) (f & (RF_SHAREABLE | RF_TIMESHARE | RF_PREFETCHABLE)) + struct resource * rman_reserve_resource_bound(struct rman *rm, u_long start, u_long end, u_long count, u_long bound, u_int flags, struct device *dev) { - u_int want_activate; + u_int new_rflags; struct resource_i *r, *s, *rv; u_long rstart, rend, amask, bmask; @@ -445,8 +447,10 @@ rman_reserve_resource_bound(struct rman "length %#lx, flags %u, device %s\n", rm->rm_descr, start, end, count, flags, dev == NULL ? "" : device_get_nameunit(dev))); - want_activate = (flags & RF_ACTIVE); - flags &= ~RF_ACTIVE; + KASSERT((flags & (RF_WANTED | RF_FIRSTSHARE)) == 0, + ("invalid flags %#x", flags)); + new_rflags = (flags & ~(RF_ACTIVE | RF_WANTED | RF_FIRSTSHARE)) | + RF_ALLOCATED; mtx_lock(rm->rm_mtx); @@ -461,10 +465,8 @@ rman_reserve_resource_bound(struct rman } amask = (1ul << RF_ALIGNMENT(flags)) - 1; - if (start > ULONG_MAX - amask) { - DPRINTF(("start+amask would wrap around\n")); - goto out; - } + KASSERT(start <= ULONG_MAX - amask, + ("start (%#lx) + amask (%#lx) would wrap around", start, amask)); /* If bound is 0, bmask will also be 0 */ bmask = ~(bound - 1); @@ -517,7 +519,7 @@ rman_reserve_resource_bound(struct rman if ((s->r_end - s->r_start + 1) == count) { DPRINTF(("candidate region is entire chunk\n")); rv = s; - rv->r_flags |= RF_ALLOCATED | flags; + rv->r_flags = new_rflags; rv->r_dev = dev; goto out; } @@ -537,7 +539,7 @@ rman_reserve_resource_bound(struct rman goto out; rv->r_start = rstart; rv->r_end = rstart + count - 1; - rv->r_flags = flags | RF_ALLOCATED; + rv->r_flags = new_rflags; rv->r_dev = dev; rv->r_rm = rm; @@ -598,7 +600,7 @@ rman_reserve_resource_bound(struct rman goto out; for (s = r; s && s->r_end <= end; s = TAILQ_NEXT(s, r_link)) { - if ((s->r_flags & flags) == flags && + if (SHARE_TYPE(s->r_flags) == SHARE_TYPE(flags) && s->r_start >= start && (s->r_end - s->r_start + 1) == count && (s->r_start & amask) == 0 && @@ -608,8 +610,7 @@ rman_reserve_resource_bound(struct rman goto out; rv->r_start = s->r_start; rv->r_end = s->r_end; - rv->r_flags = s->r_flags & - (RF_ALLOCATED | RF_SHAREABLE | RF_TIMESHARE); + rv->r_flags = new_rflags; rv->r_dev = dev; rv->r_rm = rm; if (s->r_sharehead == NULL) { @@ -636,13 +637,12 @@ rman_reserve_resource_bound(struct rman */ out: /* - * If the user specified RF_ACTIVE in the initial flags, - * which is reflected in `want_activate', we attempt to atomically + * If the user specified RF_ACTIVE in flags, we attempt to atomically * activate the resource. If this fails, we release the resource * and indicate overall failure. (This behavior probably doesn't * make sense for RF_TIMESHARE-type resources.) */ - if (rv && want_activate) { + if (rv && (flags & RF_ACTIVE) != 0) { struct resource_i *whohas; if (int_rman_activate_resource(rm, rv, &whohas)) { int_rman_release_resource(rm, rv); From owner-svn-src-stable@FreeBSD.ORG Thu Jul 3 16:01:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C508AB8C; Thu, 3 Jul 2014 16:01:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7625289F; Thu, 3 Jul 2014 16:01:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s63G1UHn032009; Thu, 3 Jul 2014 16:01:30 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s63G1UrT032008; Thu, 3 Jul 2014 16:01:30 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201407031601.s63G1UrT032008@svn.freebsd.org> From: Hajimu UMEMOTO Date: Thu, 3 Jul 2014 16:01:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268218 - stable/9/lib/libc/net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2014 16:01:31 -0000 Author: ume Date: Thu Jul 3 16:01:30 2014 New Revision: 268218 URL: http://svnweb.freebsd.org/changeset/base/268218 Log: MFC r267912, r267915: - Exclude loopback address rather than loopback interface. - style(9) Spotted by: melifaro Modified: stable/9/lib/libc/net/getaddrinfo.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/net/getaddrinfo.c ============================================================================== --- stable/9/lib/libc/net/getaddrinfo.c Thu Jul 3 16:00:57 2014 (r268217) +++ stable/9/lib/libc/net/getaddrinfo.c Thu Jul 3 16:01:30 2014 (r268218) @@ -1527,7 +1527,7 @@ find_afd(int af) } /* - * post-2553: AI_ADDRCONFIG check. Determines which address families are + * RFC 3493: AI_ADDRCONFIG check. Determines which address families are * configured on the local system and correlates with pai->ai_family value. * If an address family is not configured on the system, it will not be * queried for. For this purpose, loopback addresses are not considered @@ -1540,24 +1540,40 @@ static int addrconfig(struct addrinfo *pai) { struct ifaddrs *ifaddrs, *ifa; + struct sockaddr_in *sin; +#ifdef INET6 + struct sockaddr_in6 *sin6; +#endif int seen_inet = 0, seen_inet6 = 0; if (getifaddrs(&ifaddrs) != 0) - return 0; + return (0); for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) { if (ifa->ifa_addr == NULL || (ifa->ifa_flags & IFF_UP) == 0) continue; - if ((ifa->ifa_flags & IFT_LOOP) != 0) - continue; switch (ifa->ifa_addr->sa_family) { case AF_INET: + if (seen_inet) + continue; + sin = (struct sockaddr_in *)(ifa->ifa_addr); + if (IN_LOOPBACK(htonl(sin->sin_addr.s_addr))) + continue; seen_inet = 1; break; #ifdef INET6 case AF_INET6: - if (!seen_inet6 && !is_ifdisabled(ifa->ifa_name)) - seen_inet6 = 1; + if (seen_inet6) + continue; + sin6 = (struct sockaddr_in6 *)(ifa->ifa_addr); + if (IN6_IS_ADDR_LOOPBACK(&sin6->sin6_addr)) + continue; + if ((ifa->ifa_flags & IFT_LOOP) != 0 && + IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) + continue; + if (is_ifdisabled(ifa->ifa_name)) + continue; + seen_inet6 = 1; break; #endif } @@ -1566,16 +1582,16 @@ addrconfig(struct addrinfo *pai) switch(pai->ai_family) { case AF_INET6: - return seen_inet6; + return (seen_inet6); case AF_INET: - return seen_inet; + return (seen_inet); case AF_UNSPEC: if (seen_inet == seen_inet6) - return seen_inet; + return (seen_inet); pai->ai_family = seen_inet ? AF_INET : AF_INET6; - return 1; + return (1); } - return 1; + return (1); } #ifdef INET6 @@ -1586,12 +1602,12 @@ is_ifdisabled(char *name) int fd; if ((fd = _socket(AF_INET6, SOCK_DGRAM, 0)) < 0) - return -1; + return (-1); memset(&nd, 0, sizeof(nd)); strlcpy(nd.ifname, name, sizeof(nd.ifname)); if (_ioctl(fd, SIOCGIFINFO_IN6, &nd) < 0) { _close(fd); - return -1; + return (-1); } _close(fd); return ((nd.ndi.flags & ND6_IFF_IFDISABLED) != 0); From owner-svn-src-stable@FreeBSD.ORG Thu Jul 3 16:13:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BAB44529; Thu, 3 Jul 2014 16:13:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C02929FE; Thu, 3 Jul 2014 16:13:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s63GDim2038424; Thu, 3 Jul 2014 16:13:44 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s63GDiCW038423; Thu, 3 Jul 2014 16:13:44 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201407031613.s63GDiCW038423@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 3 Jul 2014 16:13:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268219 - stable/10/sys/dev/usb/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2014 16:13:44 -0000 Author: hselasky Date: Thu Jul 3 16:13:44 2014 New Revision: 268219 URL: http://svnweb.freebsd.org/changeset/base/268219 Log: MFC r267955 and r268209: - Add proper rangechecks in "axge_rx_frame()" function and fix receive loop header parsing. - Disable hardware checksumming until it is properly tested. PR: 191432 Modified: stable/10/sys/dev/usb/net/if_axge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/net/if_axge.c ============================================================================== --- stable/10/sys/dev/usb/net/if_axge.c Thu Jul 3 16:01:30 2014 (r268218) +++ stable/10/sys/dev/usb/net/if_axge.c Thu Jul 3 16:13:44 2014 (r268219) @@ -123,8 +123,8 @@ static int axge_attach_post_sub(struct u static int axge_ifmedia_upd(struct ifnet *); static void axge_ifmedia_sts(struct ifnet *, struct ifmediareq *); static int axge_ioctl(struct ifnet *, u_long, caddr_t); -static int axge_rx_frame(struct usb_ether *, struct usb_page_cache *, int); -static int axge_rxeof(struct usb_ether *, struct usb_page_cache *, +static void axge_rx_frame(struct usb_ether *, struct usb_page_cache *, int); +static void axge_rxeof(struct usb_ether *, struct usb_page_cache *, unsigned int, unsigned int, uint32_t); static void axge_csum_cfg(struct usb_ether *); @@ -605,8 +605,7 @@ axge_bulk_read_callback(struct usb_xfer switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: pc = usbd_xfer_get_frame(xfer, 0); - if (axge_rx_frame(ue, pc, actlen) != 0) - goto tr_setup; + axge_rx_frame(ue, pc, actlen); /* FALLTHROUGH */ case USB_ST_SETUP: @@ -926,18 +925,21 @@ axge_ioctl(struct ifnet *ifp, u_long cmd return (error); } -static int +static void axge_rx_frame(struct usb_ether *ue, struct usb_page_cache *pc, int actlen) { - int error, pos; - int pkt_cnt; - uint32_t rxhdr, pkt_hdr; - uint16_t hdr_off; - uint16_t len, pktlen; + uint32_t pos; + uint32_t pkt_cnt; + uint32_t rxhdr; + uint32_t pkt_hdr; + uint32_t hdr_off; + uint32_t pktlen; + + /* verify we have enough data */ + if (actlen < (int)sizeof(rxhdr)) + return; pos = 0; - len = 0; - error = 0; usbd_copy_out(pc, actlen - sizeof(rxhdr), &rxhdr, sizeof(rxhdr)); rxhdr = le32toh(rxhdr); @@ -945,31 +947,36 @@ axge_rx_frame(struct usb_ether *ue, stru pkt_cnt = (uint16_t)rxhdr; hdr_off = (uint16_t)(rxhdr >> 16); - usbd_copy_out(pc, hdr_off, &pkt_hdr, sizeof(pkt_hdr)); - - while (pkt_cnt > 0) { - if ((int)(sizeof(pkt_hdr)) > actlen) { - error = EINVAL; + while (pkt_cnt--) { + /* verify the header offset */ + if ((int)(hdr_off + sizeof(pkt_hdr)) > actlen) { + DPRINTF("End of packet headers\n"); + break; + } + if ((int)pos >= actlen) { + DPRINTF("Data position reached end\n"); break; } + usbd_copy_out(pc, hdr_off, &pkt_hdr, sizeof(pkt_hdr)); + pkt_hdr = le32toh(pkt_hdr); pktlen = (pkt_hdr >> 16) & 0x1fff; - if ((pkt_hdr & AXGE_RXHDR_CRC_ERR) || - (pkt_hdr & AXGE_RXHDR_DROP_ERR)) + if (pkt_hdr & (AXGE_RXHDR_CRC_ERR | AXGE_RXHDR_DROP_ERR)) { + DPRINTF("Dropped a packet\n"); ue->ue_ifp->if_ierrors++; - axge_rxeof(ue, pc, pos + 2, pktlen - 6, pkt_hdr); - len = (pktlen + 7) & ~7; - pos += len; - pkt_hdr++; - pkt_cnt--; + } + if (pktlen >= 2 && (int)(pos + pktlen) <= actlen) { + axge_rxeof(ue, pc, pos + 2, pktlen - 2, pkt_hdr); + } else { + DPRINTF("Invalid packet pos=%d len=%d\n", + (int)pos, (int)pktlen); + } + pos += (pktlen + 7) & ~7; + hdr_off += sizeof(pkt_hdr); } - - if (error != 0) - ue->ue_ifp->if_ierrors++; - return (error); } -static int +static void axge_rxeof(struct usb_ether *ue, struct usb_page_cache *pc, unsigned int offset, unsigned int len, uint32_t pkt_hdr) { @@ -979,37 +986,34 @@ axge_rxeof(struct usb_ether *ue, struct ifp = ue->ue_ifp; if (len < ETHER_HDR_LEN || len > MCLBYTES - ETHER_ALIGN) { ifp->if_ierrors++; - return (EINVAL); + return; } m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) { ifp->if_iqdrops++; - return (ENOMEM); + return; } - m->m_len = m->m_pkthdr.len = MCLBYTES; + m->m_pkthdr.rcvif = ifp; + m->m_len = m->m_pkthdr.len = len + ETHER_ALIGN; m_adj(m, ETHER_ALIGN); usbd_copy_out(pc, offset, mtod(m, uint8_t *), len); ifp->if_ipackets++; - m->m_pkthdr.rcvif = ifp; - m->m_pkthdr.len = m->m_len = len; - +#if 0 if ((pkt_hdr & (AXGE_RXHDR_L4CSUM_ERR | AXGE_RXHDR_L3CSUM_ERR)) == 0) { - m->m_pkthdr.csum_flags |= CSUM_IP_CHECKED | CSUM_IP_VALID; if ((pkt_hdr & AXGE_RXHDR_L4_TYPE_MASK) == AXGE_RXHDR_L4_TYPE_TCP || (pkt_hdr & AXGE_RXHDR_L4_TYPE_MASK) == AXGE_RXHDR_L4_TYPE_UDP) { m->m_pkthdr.csum_flags |= CSUM_DATA_VALID | - CSUM_PSEUDO_HDR; + CSUM_PSEUDO_HDR | CSUM_IP_CHECKED | CSUM_IP_VALID; m->m_pkthdr.csum_data = 0xffff; } } - +#endif _IF_ENQUEUE(&ue->ue_rxq, m); - return (0); } static void From owner-svn-src-stable@FreeBSD.ORG Thu Jul 3 16:20:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 88CE9C95 for ; Thu, 3 Jul 2014 16:20:43 +0000 (UTC) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 533C02A81 for ; Thu, 3 Jul 2014 16:20:42 +0000 (UTC) Received: from compute3.internal (compute3.nyi.mail.srv.osa [10.202.2.43]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 1010322235 for ; Thu, 3 Jul 2014 12:20:41 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute3.internal (MEProxy); Thu, 03 Jul 2014 12:20:41 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.net; h= message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; s=mesmtp; bh=8tmGp7gXkuLW2OC1qy0wKGxAfuY=; b=O+I+Hw98oKnv/Th9FlSb/EFTx3k1 xIuJh4j53dIsPVuT94boyQ9qt8N0r+4U1s+Bz1Kc5cVb58HHNXLuDaYbOiMT1O2d VdRLVto+FMo0kI/LKzso4TV++ULOcI6aLQsLQyAd7aNpXD2sEpHe06UA5KorC7qy JijOCUvjB68XQHY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=8tmGp7gXkuLW2OC1qy0wKG xAfuY=; b=hvtWWwguePzodcjpQQzyZ4fiaMHSxoDU7ePsH059PQXlOa2oIjGOmL 5VeEbY3/HjGPrTD6oycrEQW5rbP/Xxi9AVzMVh6VZt5bxKTxCNDh9jcoO7nYZABo ko7M6IjH2Ia9oT0uOXcIFkQJ4AjIKQoV627sM20SD3ylQt4rpRjuM= X-Sasl-enc: gTmrYg4t+n1+b91eBJLefERHApRv+75TK3OSlksdMm+m 1404404440 Received: from [192.168.1.66] (unknown [86.136.6.163]) by mail.messagingengine.com (Postfix) with ESMTPA id 4871FC00003; Thu, 3 Jul 2014 12:20:40 -0400 (EDT) Message-ID: <53B582D7.9010901@fastmail.net> Date: Thu, 03 Jul 2014 17:20:39 +0100 From: Bruce Simpson User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Daichi GOTO , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r268210 - stable/10/sys/dev/glxiic References: <201407031059.s63AxhfH085954@svn.freebsd.org> In-Reply-To: <201407031059.s63AxhfH085954@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2014 16:20:43 -0000 Daichi-san, Just FYI: I could not get IIC to work with the glxiic(4) driver in tree on my PC Engines ALIX 6D2, although this driver [1] appears to work. Tested with a Dallas Semiconductor DS1337 RTC module some time ago. Bruce [1] http://www.phisch.org/website/glxiic/ From owner-svn-src-stable@FreeBSD.ORG Thu Jul 3 16:29:23 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C91128F; Thu, 3 Jul 2014 16:29:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D6162B82; Thu, 3 Jul 2014 16:29:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s63GTNdF044634; Thu, 3 Jul 2014 16:29:23 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s63GTLQV044624; Thu, 3 Jul 2014 16:29:21 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201407031629.s63GTLQV044624@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 3 Jul 2014 16:29:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268221 - in stable/9/sys/dev: firewire my nfe siba sis sk tx usb/net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2014 16:29:23 -0000 Author: hselasky Date: Thu Jul 3 16:29:21 2014 New Revision: 268221 URL: http://svnweb.freebsd.org/changeset/base/268221 Log: MFC r266270: Remove some unused variables. Modified: stable/9/sys/dev/firewire/sbp.c stable/9/sys/dev/my/if_my.c stable/9/sys/dev/nfe/if_nfe.c stable/9/sys/dev/siba/siba_core.c stable/9/sys/dev/sis/if_sis.c stable/9/sys/dev/sk/if_sk.c stable/9/sys/dev/tx/if_tx.c stable/9/sys/dev/usb/net/if_axge.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/firewire/sbp.c ============================================================================== --- stable/9/sys/dev/firewire/sbp.c Thu Jul 3 16:26:37 2014 (r268220) +++ stable/9/sys/dev/firewire/sbp.c Thu Jul 3 16:29:21 2014 (r268221) @@ -2745,7 +2745,6 @@ sbp_dequeue_ocb(struct sbp_dev *sdev, st struct sbp_ocb *ocb; struct sbp_ocb *next; int s = splfw(), order = 0; - int flags; SBP_DEBUG(1) device_printf(sdev->target->sbp->fd.dev, @@ -2759,7 +2758,6 @@ END_DEBUG SBP_LOCK(sdev->target->sbp); for (ocb = STAILQ_FIRST(&sdev->ocbs); ocb != NULL; ocb = next) { next = STAILQ_NEXT(ocb, ocb); - flags = ocb->flags; if (OCB_MATCH(ocb, sbp_status)) { /* found */ STAILQ_REMOVE(&sdev->ocbs, ocb, sbp_ocb, ocb); Modified: stable/9/sys/dev/my/if_my.c ============================================================================== --- stable/9/sys/dev/my/if_my.c Thu Jul 3 16:26:37 2014 (r268220) +++ stable/9/sys/dev/my/if_my.c Thu Jul 3 16:29:21 2014 (r268221) @@ -657,10 +657,8 @@ static void my_setmode_mii(struct my_softc * sc, int media) { u_int16_t bmcr; - struct ifnet *ifp; MY_LOCK_ASSERT(sc); - ifp = sc->my_ifp; /* * If an autoneg session is in progress, stop it. */ Modified: stable/9/sys/dev/nfe/if_nfe.c ============================================================================== --- stable/9/sys/dev/nfe/if_nfe.c Thu Jul 3 16:26:37 2014 (r268220) +++ stable/9/sys/dev/nfe/if_nfe.c Thu Jul 3 16:29:21 2014 (r268221) @@ -1376,15 +1376,12 @@ nfe_free_rx_ring(struct nfe_softc *sc, s { struct nfe_rx_data *data; void *desc; - int i, descsize; + int i; - if (sc->nfe_flags & NFE_40BIT_ADDR) { + if (sc->nfe_flags & NFE_40BIT_ADDR) desc = ring->desc64; - descsize = sizeof (struct nfe_desc64); - } else { + else desc = ring->desc32; - descsize = sizeof (struct nfe_desc32); - } for (i = 0; i < NFE_RX_RING_COUNT; i++) { data = &ring->data[i]; Modified: stable/9/sys/dev/siba/siba_core.c ============================================================================== --- stable/9/sys/dev/siba/siba_core.c Thu Jul 3 16:26:37 2014 (r268220) +++ stable/9/sys/dev/siba/siba_core.c Thu Jul 3 16:29:21 2014 (r268221) @@ -1739,12 +1739,10 @@ static void siba_pcicore_init(struct siba_pci *spc) { struct siba_dev_softc *sd = spc->spc_dev; - struct siba_softc *siba; if (sd == NULL) return; - siba = sd->sd_bus; if (!siba_dev_isup_sub(sd)) siba_dev_up_sub(sd, 0); Modified: stable/9/sys/dev/sis/if_sis.c ============================================================================== --- stable/9/sys/dev/sis/if_sis.c Thu Jul 3 16:26:37 2014 (r268220) +++ stable/9/sys/dev/sis/if_sis.c Thu Jul 3 16:29:21 2014 (r268221) @@ -1617,11 +1617,9 @@ sis_tick(void *xsc) { struct sis_softc *sc; struct mii_data *mii; - struct ifnet *ifp; sc = xsc; SIS_LOCK_ASSERT(sc); - ifp = sc->sis_ifp; mii = device_get_softc(sc->sis_miibus); mii_tick(mii); Modified: stable/9/sys/dev/sk/if_sk.c ============================================================================== --- stable/9/sys/dev/sk/if_sk.c Thu Jul 3 16:26:37 2014 (r268220) +++ stable/9/sys/dev/sk/if_sk.c Thu Jul 3 16:29:21 2014 (r268221) @@ -2877,13 +2877,11 @@ static void sk_txeof(sc_if) struct sk_if_softc *sc_if; { - struct sk_softc *sc; struct sk_txdesc *txd; struct sk_tx_desc *cur_tx; struct ifnet *ifp; u_int32_t idx, sk_ctl; - sc = sc_if->sk_softc; ifp = sc_if->sk_ifp; txd = STAILQ_FIRST(&sc_if->sk_cdata.sk_txbusyq); Modified: stable/9/sys/dev/tx/if_tx.c ============================================================================== --- stable/9/sys/dev/tx/if_tx.c Thu Jul 3 16:26:37 2014 (r268220) +++ stable/9/sys/dev/tx/if_tx.c Thu Jul 3 16:29:21 2014 (r268221) @@ -1150,12 +1150,10 @@ epic_ifmedia_sts(struct ifnet *ifp, stru { epic_softc_t *sc; struct mii_data *mii; - struct ifmedia *ifm; sc = ifp->if_softc; mii = device_get_softc(sc->miibus); EPIC_LOCK(sc); - ifm = &mii->mii_media; /* Nothing should be selected if interface is down. */ if ((ifp->if_flags & IFF_UP) == 0) { Modified: stable/9/sys/dev/usb/net/if_axge.c ============================================================================== --- stable/9/sys/dev/usb/net/if_axge.c Thu Jul 3 16:26:37 2014 (r268220) +++ stable/9/sys/dev/usb/net/if_axge.c Thu Jul 3 16:29:21 2014 (r268221) @@ -910,7 +910,6 @@ axge_ioctl(struct ifnet *ifp, u_long cmd static int axge_rx_frame(struct usb_ether *ue, struct usb_page_cache *pc, int actlen) { - struct axge_softc *sc; struct axge_csum_hdr csum_hdr; int error, len, pos; int pkt_cnt; @@ -918,7 +917,6 @@ axge_rx_frame(struct usb_ether *ue, stru uint16_t hdr_off; uint16_t pktlen; - sc = uether_getsc(ue); pos = 0; len = 0; error = 0; From owner-svn-src-stable@FreeBSD.ORG Thu Jul 3 16:34:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 27D6960F; Thu, 3 Jul 2014 16:34:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 086DC2C3F; Thu, 3 Jul 2014 16:34:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s63GY2ue048568; Thu, 3 Jul 2014 16:34:02 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s63GY1EG048564; Thu, 3 Jul 2014 16:34:01 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201407031634.s63GY1EG048564@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 3 Jul 2014 16:34:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268222 - in stable/9/sys/dev/usb: . net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2014 16:34:02 -0000 Author: hselasky Date: Thu Jul 3 16:34:01 2014 New Revision: 268222 URL: http://svnweb.freebsd.org/changeset/base/268222 Log: MFC r266490, r266738, r267955, and r268209: - Improve performance by fixing incorrect Rx/Tx handling - Rename definition of AXGE_* to reflect reality - Add new USB IDs - Add proper rangechecks in "axge_rx_frame()" function and fix receive loop header parsing. - Disable hardware checksumming until it is properly tested. PR: 191432 Modified: stable/9/sys/dev/usb/net/if_axge.c stable/9/sys/dev/usb/net/if_axgereg.h stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/net/if_axge.c ============================================================================== --- stable/9/sys/dev/usb/net/if_axge.c Thu Jul 3 16:29:21 2014 (r268221) +++ stable/9/sys/dev/usb/net/if_axge.c Thu Jul 3 16:34:01 2014 (r268222) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Kevin Lo + * Copyright (c) 2013-2014 Kevin Lo * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -66,17 +66,22 @@ static const STRUCT_USB_HOST_ID axge_dev #define AXGE_DEV(v,p) { USB_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p) } AXGE_DEV(ASIX, AX88178A), AXGE_DEV(ASIX, AX88179), - /* AXGE_DEV(SITECOMEU, LN032), */ + AXGE_DEV(DLINK, DUB1312), + AXGE_DEV(SITECOMEU, LN032), #undef AXGE_DEV }; static const struct { - unsigned char ctrl, timer_l, timer_h, size, ifg; -} AX88179_BULKIN_SIZE[] = { - {7, 0x4f, 0, 0x12, 0xff}, - {7, 0x20, 3, 0x16, 0xff}, - {7, 0xae, 7, 0x18, 0xff}, - {7, 0xcc, 0x4c, 0x18, 8}, + uint8_t ctrl; + uint8_t timer_l; + uint8_t timer_h; + uint8_t size; + uint8_t ifg; +} axge_bulk_size[] = { + { 7, 0x4f, 0x00, 0x12, 0xff }, + { 7, 0x20, 0x03, 0x16, 0xff }, + { 7, 0xae, 0x07, 0x18, 0xff }, + { 7, 0xcc, 0x4c, 0x18, 0x08 } }; /* prototypes */ @@ -104,10 +109,11 @@ static int axge_read_mem(struct axge_sof uint16_t, void *, int); static void axge_write_mem(struct axge_softc *, uint8_t, uint16_t, uint16_t, void *, int); +static uint8_t axge_read_cmd_1(struct axge_softc *, uint8_t, uint16_t); static uint16_t axge_read_cmd_2(struct axge_softc *, uint8_t, uint16_t, uint16_t); static void axge_write_cmd_1(struct axge_softc *, uint8_t, uint16_t, - uint16_t, uint8_t); + uint8_t); static void axge_write_cmd_2(struct axge_softc *, uint8_t, uint16_t, uint16_t, uint16_t); static void axge_chip_init(struct axge_softc *); @@ -117,9 +123,9 @@ static int axge_attach_post_sub(struct u static int axge_ifmedia_upd(struct ifnet *); static void axge_ifmedia_sts(struct ifnet *, struct ifmediareq *); static int axge_ioctl(struct ifnet *, u_long, caddr_t); -static int axge_rx_frame(struct usb_ether *, struct usb_page_cache *, int); -static int axge_rxeof(struct usb_ether *, struct usb_page_cache *, - unsigned int, unsigned int, struct axge_csum_hdr *); +static void axge_rx_frame(struct usb_ether *, struct usb_page_cache *, int); +static void axge_rxeof(struct usb_ether *, struct usb_page_cache *, + unsigned int, unsigned int, uint32_t); static void axge_csum_cfg(struct usb_ether *); #define AXGE_CSUM_FEATURES (CSUM_IP | CSUM_TCP | CSUM_UDP) @@ -138,7 +144,7 @@ static const struct usb_config axge_conf .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, .frames = 16, - .bufsize = 16 * (MCLBYTES + 16), + .bufsize = 16 * MCLBYTES, .flags = {.pipe_bof = 1,.force_short_xfer = 1,}, .callback = axge_bulk_write_callback, .timeout = 10000, /* 10 seconds */ @@ -233,6 +239,15 @@ axge_write_mem(struct axge_softc *sc, ui } } +static uint8_t +axge_read_cmd_1(struct axge_softc *sc, uint8_t cmd, uint16_t reg) +{ + uint8_t val; + + axge_read_mem(sc, cmd, 1, reg, &val, 1); + return (val); +} + static uint16_t axge_read_cmd_2(struct axge_softc *sc, uint8_t cmd, uint16_t index, uint16_t reg) @@ -244,10 +259,9 @@ axge_read_cmd_2(struct axge_softc *sc, u } static void -axge_write_cmd_1(struct axge_softc *sc, uint8_t cmd, uint16_t index, - uint16_t reg, uint8_t val) +axge_write_cmd_1(struct axge_softc *sc, uint8_t cmd, uint16_t reg, uint8_t val) { - axge_write_mem(sc, cmd, index, reg, &val, 1); + axge_write_mem(sc, cmd, 1, reg, &val, 1); } static void @@ -307,6 +321,7 @@ axge_miibus_statchg(device_t dev) struct axge_softc *sc; struct mii_data *mii; struct ifnet *ifp; + uint8_t link_status, tmp[5]; uint16_t val; int locked; @@ -339,26 +354,41 @@ axge_miibus_statchg(device_t dev) if ((sc->sc_flags & AXGE_FLAG_LINK) == 0) goto done; + link_status = axge_read_cmd_1(sc, AXGE_ACCESS_MAC, AXGE_PLSR); + val = 0; if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) != 0) { - val |= AXGE_MEDIUM_FULL_DUPLEX; + val |= MSR_FD; if ((IFM_OPTIONS(mii->mii_media_active) & IFM_ETH_TXPAUSE) != 0) - val |= AXGE_MEDIUM_TXFLOW_CTRLEN; + val |= MSR_TFC; if ((IFM_OPTIONS(mii->mii_media_active) & IFM_ETH_RXPAUSE) != 0) - val |= AXGE_MEDIUM_RXFLOW_CTRLEN; + val |= MSR_RFC; } - val |= AXGE_MEDIUM_RECEIVE_EN | AXGE_MEDIUM_ALWAYS_ONE; + val |= MSR_RE; switch (IFM_SUBTYPE(mii->mii_media_active)) { case IFM_1000_T: - val |= AXGE_MEDIUM_GIGAMODE; + val |= MSR_GM | MSR_EN_125MHZ; + if (link_status & PLSR_USB_SS) + memcpy(tmp, &axge_bulk_size[0], 5); + else if (link_status & PLSR_USB_HS) + memcpy(tmp, &axge_bulk_size[1], 5); + else + memcpy(tmp, &axge_bulk_size[3], 5); + break; case IFM_100_TX: - val |= AXGE_MEDIUM_PS; + val |= MSR_PS; + if (link_status & (PLSR_USB_SS | PLSR_USB_HS)) + memcpy(tmp, &axge_bulk_size[2], 5); + else + memcpy(tmp, &axge_bulk_size[3], 5); + break; case IFM_10_T: - /* Doesn't need to be handled. */ + memcpy(tmp, &axge_bulk_size[3], 5); break; } - axge_write_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_MEDIUM_STATUS_MODE, val); - + /* Rx bulk configuration. */ + axge_write_mem(sc, AXGE_ACCESS_MAC, 5, AXGE_RX_BULKIN_QCTRL, tmp, 5); + axge_write_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_MSR, val); done: if (!locked) AXGE_UNLOCK(sc); @@ -368,11 +398,10 @@ static void axge_chip_init(struct axge_softc *sc) { /* Power up ethernet PHY. */ - axge_write_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_PHYPWR_RSTCTL, 0); - axge_write_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_PHYPWR_RSTCTL, - AXGE_PHYPWR_RSTCTL_IPRL); + axge_write_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_EPPRCR, 0); + axge_write_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_EPPRCR, EPPRCR_IPRL); uether_pause(&sc->sc_ue, hz / 4); - axge_write_cmd_1(sc, AXGE_ACCESS_MAC, 1, AXGE_CLK_SELECT, + axge_write_cmd_1(sc, AXGE_ACCESS_MAC, AXGE_CLK_SELECT, AXGE_CLK_SELECT_ACS | AXGE_CLK_SELECT_BCS); uether_pause(&sc->sc_ue, hz / 10); } @@ -401,17 +430,13 @@ static void axge_attach_post(struct usb_ether *ue) { struct axge_softc *sc; - uint8_t tmp[5]; sc = uether_getsc(ue); sc->sc_phyno = 3; /* Initialize controller and get station address. */ axge_chip_init(sc); - - memcpy(tmp, &AX88179_BULKIN_SIZE[0], 5); - axge_read_mem(sc, AXGE_ACCESS_MAC, 5, AXGE_RX_BULKIN_QCTRL, tmp, 5); - axge_read_mem(sc, AXGE_ACCESS_MAC, ETHER_ADDR_LEN, AXGE_NODE_ID, + axge_read_mem(sc, AXGE_ACCESS_MAC, ETHER_ADDR_LEN, AXGE_NIDR, ue->ue_eaddr, ETHER_ADDR_LEN); } @@ -439,7 +464,7 @@ axge_attach_post_sub(struct usb_ether *u mtx_lock(&Giant); error = mii_attach(ue->ue_dev, &ue->ue_miibus, ifp, uether_ifmedia_upd, ue->ue_methods->ue_mii_sts, - BMSR_DEFCAPMASK, sc->sc_phyno, MII_OFFSET_ANY, 0); + BMSR_DEFCAPMASK, sc->sc_phyno, MII_OFFSET_ANY, MIIF_DOPAUSE); mtx_unlock(&Giant); return (error); @@ -608,9 +633,7 @@ axge_bulk_write_callback(struct usb_xfer struct usb_page_cache *pc; struct mbuf *m; uint32_t txhdr; - uint32_t txhdr2; - int nframes; - int frm_len; + int nframes, pos; sc = usbd_xfer_softc(xfer); ifp = uether_getifp(&sc->sc_ue); @@ -637,26 +660,18 @@ tr_setup: break; usbd_xfer_set_frame_offset(xfer, nframes * MCLBYTES, nframes); - frm_len = 0; + pos = 0; pc = usbd_xfer_get_frame(xfer, nframes); - - txhdr = m->m_pkthdr.len; - txhdr = htole32(txhdr); + txhdr = htole32(m->m_pkthdr.len); usbd_copy_in(pc, 0, &txhdr, sizeof(txhdr)); - frm_len += sizeof(txhdr); - - txhdr2 = 0; - if ((m->m_pkthdr.len + sizeof(txhdr) + sizeof(txhdr2)) % - usbd_xfer_max_framelen(xfer) == 0) { - txhdr2 |= 0x80008000; - } - txhdr2 = htole32(txhdr2); - usbd_copy_in(pc, frm_len, &txhdr2, sizeof(txhdr2)); - frm_len += sizeof(txhdr2); - - /* Next copy in the actual packet. */ - usbd_m_copy_in(pc, frm_len, m, 0, m->m_pkthdr.len); - frm_len += m->m_pkthdr.len; + txhdr = 0; + txhdr = htole32(txhdr); + usbd_copy_in(pc, 4, &txhdr, sizeof(txhdr)); + pos += 8; + usbd_m_copy_in(pc, pos, m, 0, m->m_pkthdr.len); + pos += m->m_pkthdr.len; + if ((pos % usbd_xfer_max_framelen(xfer)) == 0) + txhdr |= 0x80008000; /* * XXX @@ -678,7 +693,7 @@ tr_setup: m_freem(m); /* Set frame length. */ - usbd_xfer_set_frame_len(xfer, nframes, frm_len); + usbd_xfer_set_frame_len(xfer, nframes, pos); } if (nframes != 0) { usbd_xfer_set_frames(xfer, nframes); @@ -733,13 +748,13 @@ axge_setmulti(struct usb_ether *ue) h = 0; AXGE_LOCK_ASSERT(sc, MA_OWNED); - rxmode = axge_read_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_RX_CTL); + rxmode = axge_read_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_RCR); if (ifp->if_flags & (IFF_ALLMULTI | IFF_PROMISC)) { - rxmode |= AXGE_RX_CTL_AMALL; - axge_write_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_RX_CTL, rxmode); + rxmode |= RCR_AMALL; + axge_write_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_RCR, rxmode); return; } - rxmode &= ~AXGE_RX_CTL_AMALL; + rxmode &= ~RCR_AMALL; if_maddr_rlock(ifp); TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { @@ -751,9 +766,8 @@ axge_setmulti(struct usb_ether *ue) } if_maddr_runlock(ifp); - axge_write_mem(sc, AXGE_ACCESS_MAC, 8, AXGE_MULTI_FILTER_ARRY, - (void *)&hashtbl, 8); - axge_write_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_RX_CTL, rxmode); + axge_write_mem(sc, AXGE_ACCESS_MAC, 8, AXGE_MFA, (void *)&hashtbl, 8); + axge_write_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_RCR, rxmode); } static void @@ -765,14 +779,14 @@ axge_setpromisc(struct usb_ether *ue) sc = uether_getsc(ue); ifp = uether_getifp(ue); - rxmode = axge_read_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_RX_CTL); + rxmode = axge_read_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_RCR); if (ifp->if_flags & IFF_PROMISC) - rxmode |= AXGE_RX_CTL_PRO; + rxmode |= RCR_PRO; else - rxmode &= ~AXGE_RX_CTL_PRO; + rxmode &= ~RCR_PRO; - axge_write_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_RX_CTL, rxmode); + axge_write_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_RCR, rxmode); axge_setmulti(ue); } @@ -811,27 +825,31 @@ axge_init(struct usb_ether *ue) axge_reset(sc); /* Set MAC address. */ - axge_write_mem(sc, AXGE_ACCESS_MAC, ETHER_ADDR_LEN, AXGE_NODE_ID, + axge_write_mem(sc, AXGE_ACCESS_MAC, ETHER_ADDR_LEN, AXGE_NIDR, IF_LLADDR(ifp), ETHER_ADDR_LEN); - axge_write_cmd_1(sc, AXGE_ACCESS_MAC, 1, AXGE_PAUSE_WATERLVL_LOW, 0x34); - axge_write_cmd_1(sc, AXGE_ACCESS_MAC, 1, AXGE_PAUSE_WATERLVL_HIGH, - 0x52); + axge_write_cmd_1(sc, AXGE_ACCESS_MAC, AXGE_PWLLR, 0x34); + axge_write_cmd_1(sc, AXGE_ACCESS_MAC, AXGE_PWLHR, 0x52); /* Configure TX/RX checksum offloading. */ axge_csum_cfg(ue); /* Configure RX settings. */ - rxmode = (AXGE_RX_CTL_IPE | AXGE_RX_CTL_AM | AXGE_RX_CTL_START); + rxmode = (RCR_AM | RCR_SO | RCR_DROP_CRCE); + if ((ifp->if_capenable & IFCAP_RXCSUM) != 0) + rxmode |= RCR_IPE; /* If we want promiscuous mode, set the allframes bit. */ if (ifp->if_flags & IFF_PROMISC) - rxmode |= AXGE_RX_CTL_PRO; + rxmode |= RCR_PRO; if (ifp->if_flags & IFF_BROADCAST) - rxmode |= AXGE_RX_CTL_AB; + rxmode |= RCR_AB; + + axge_write_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_RCR, rxmode); - axge_write_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_RX_CTL, rxmode); + axge_write_cmd_1(sc, AXGE_ACCESS_MAC, AXGE_MMSR, + MMSR_PME_TYPE | MMSR_PME_POL | MMSR_RWMP); /* Load the multicast filter. */ axge_setmulti(ue); @@ -907,51 +925,60 @@ axge_ioctl(struct ifnet *ifp, u_long cmd return (error); } -static int +static void axge_rx_frame(struct usb_ether *ue, struct usb_page_cache *pc, int actlen) { - struct axge_csum_hdr csum_hdr; - int error, len, pos; - int pkt_cnt; + uint32_t pos; + uint32_t pkt_cnt; uint32_t rxhdr; - uint16_t hdr_off; - uint16_t pktlen; + uint32_t pkt_hdr; + uint32_t hdr_off; + uint32_t pktlen; + + /* verify we have enough data */ + if (actlen < (int)sizeof(rxhdr)) + return; pos = 0; - len = 0; - error = 0; usbd_copy_out(pc, actlen - sizeof(rxhdr), &rxhdr, sizeof(rxhdr)); - actlen -= sizeof(rxhdr); rxhdr = le32toh(rxhdr); pkt_cnt = (uint16_t)rxhdr; hdr_off = (uint16_t)(rxhdr >> 16); - usbd_copy_out(pc, pos + hdr_off, &csum_hdr, sizeof(csum_hdr)); - csum_hdr.len = le16toh(csum_hdr.len); - csum_hdr.cstatus = le16toh(csum_hdr.cstatus); - while (pkt_cnt--) { - if (actlen <= sizeof(csum_hdr) + sizeof(struct ether_header)) { - error = EINVAL; + /* verify the header offset */ + if ((int)(hdr_off + sizeof(pkt_hdr)) > actlen) { + DPRINTF("End of packet headers\n"); + break; + } + if ((int)pos >= actlen) { + DPRINTF("Data position reached end\n"); break; } - pktlen = AXGE_CSUM_RXBYTES(csum_hdr.len); + usbd_copy_out(pc, hdr_off, &pkt_hdr, sizeof(pkt_hdr)); - if (pkt_cnt == 0) - /* Skip the 2-byte IP alignment header. */ - axge_rxeof(ue, pc, 2, pktlen - 2, &csum_hdr); + pkt_hdr = le32toh(pkt_hdr); + pktlen = (pkt_hdr >> 16) & 0x1fff; + if (pkt_hdr & (AXGE_RXHDR_CRC_ERR | AXGE_RXHDR_DROP_ERR)) { + DPRINTF("Dropped a packet\n"); + ue->ue_ifp->if_ierrors++; + } + if (pktlen >= 2 && (int)(pos + pktlen) <= actlen) { + axge_rxeof(ue, pc, pos + 2, pktlen - 2, pkt_hdr); + } else { + DPRINTF("Invalid packet pos=%d len=%d\n", + (int)pos, (int)pktlen); + } + pos += (pktlen + 7) & ~7; + hdr_off += sizeof(pkt_hdr); } - - if (error != 0) - ue->ue_ifp->if_ierrors++; - return (error); } -static int +static void axge_rxeof(struct usb_ether *ue, struct usb_page_cache *pc, - unsigned int offset, unsigned int len, struct axge_csum_hdr *csum_hdr) + unsigned int offset, unsigned int len, uint32_t pkt_hdr) { struct ifnet *ifp; struct mbuf *m; @@ -959,42 +986,34 @@ axge_rxeof(struct usb_ether *ue, struct ifp = ue->ue_ifp; if (len < ETHER_HDR_LEN || len > MCLBYTES - ETHER_ALIGN) { ifp->if_ierrors++; - return (EINVAL); + return; } m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) { ifp->if_iqdrops++; - return (ENOMEM); + return; } - m->m_len = m->m_pkthdr.len = MCLBYTES; + m->m_pkthdr.rcvif = ifp; + m->m_len = m->m_pkthdr.len = len + ETHER_ALIGN; m_adj(m, ETHER_ALIGN); usbd_copy_out(pc, offset, mtod(m, uint8_t *), len); ifp->if_ipackets++; - m->m_pkthdr.rcvif = ifp; - m->m_pkthdr.len = m->m_len = len; - - if (csum_hdr != NULL && - csum_hdr->cstatus & AXGE_CSUM_HDR_L3_TYPE_IPV4) { - if ((csum_hdr->cstatus & (AXGE_CSUM_HDR_L4_CSUM_ERR | - AXGE_RXHDR_L4CSUM_ERR)) == 0) { - m->m_pkthdr.csum_flags |= CSUM_IP_CHECKED | - CSUM_IP_VALID; - if ((csum_hdr->cstatus & AXGE_CSUM_HDR_L4_TYPE_MASK) == - AXGE_CSUM_HDR_L4_TYPE_TCP || - (csum_hdr->cstatus & AXGE_CSUM_HDR_L4_TYPE_MASK) == - AXGE_CSUM_HDR_L4_TYPE_UDP) { - m->m_pkthdr.csum_flags |= - CSUM_DATA_VALID | CSUM_PSEUDO_HDR; - m->m_pkthdr.csum_data = 0xffff; - } +#if 0 + if ((pkt_hdr & (AXGE_RXHDR_L4CSUM_ERR | AXGE_RXHDR_L3CSUM_ERR)) == 0) { + if ((pkt_hdr & AXGE_RXHDR_L4_TYPE_MASK) == + AXGE_RXHDR_L4_TYPE_TCP || + (pkt_hdr & AXGE_RXHDR_L4_TYPE_MASK) == + AXGE_RXHDR_L4_TYPE_UDP) { + m->m_pkthdr.csum_flags |= CSUM_DATA_VALID | + CSUM_PSEUDO_HDR | CSUM_IP_CHECKED | CSUM_IP_VALID; + m->m_pkthdr.csum_data = 0xffff; } } - +#endif _IF_ENQUEUE(&ue->ue_rxq, m); - return (0); } static void @@ -1010,12 +1029,11 @@ axge_csum_cfg(struct usb_ether *ue) csum = 0; if ((ifp->if_capenable & IFCAP_TXCSUM) != 0) - csum |= AXGE_TXCOE_IP | AXGE_TXCOE_TCP | AXGE_TXCOE_UDP; - axge_write_cmd_1(sc, AXGE_ACCESS_MAC, 1, AXGE_TXCOE_CTL, csum); + csum |= CTCR_IP | CTCR_TCP | CTCR_UDP; + axge_write_cmd_1(sc, AXGE_ACCESS_MAC, AXGE_CTCR, csum); csum = 0; if ((ifp->if_capenable & IFCAP_RXCSUM) != 0) - csum |= AXGE_RXCOE_IP | AXGE_RXCOE_TCP | AXGE_RXCOE_UDP | - AXGE_RXCOE_ICMP | AXGE_RXCOE_IGMP; - axge_write_cmd_1(sc, AXGE_ACCESS_MAC, 1, AXGE_RXCOE_CTL, csum); + csum |= CRCR_IP | CRCR_TCP | CRCR_UDP; + axge_write_cmd_1(sc, AXGE_ACCESS_MAC, AXGE_CRCR, csum); } Modified: stable/9/sys/dev/usb/net/if_axgereg.h ============================================================================== --- stable/9/sys/dev/usb/net/if_axgereg.h Thu Jul 3 16:29:21 2014 (r268221) +++ stable/9/sys/dev/usb/net/if_axgereg.h Thu Jul 3 16:34:01 2014 (r268222) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Kevin Lo + * Copyright (c) 2013-2014 Kevin Lo * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,13 +26,6 @@ * $FreeBSD$ */ -#define AX88179_PHY_ID 0x03 -#define AXGE_MCAST_FILTER_SIZE 8 -#define AXGE_MAXGE_MCAST 64 -#define AXGE_EEPROM_LEN 0x40 -#define AXGE_RX_CHECKSUM 1 -#define AXGE_TX_CHECKSUM 2 - #define AXGE_ACCESS_MAC 0x01 #define AXGE_ACCESS_PHY 0x02 #define AXGE_ACCESS_WAKEUP 0x03 @@ -43,74 +36,73 @@ #define AXGE_WRITE_EFUSE_DIS 0x0A #define AXGE_ACCESS_MFAB 0x10 -#define AXGE_LINK_STATUS 0x02 -#define AXGE_LINK_STATUS_USB_FS 0x01 -#define AXGE_LINK_STATUS_USB_HS 0x02 -#define AXGE_LINK_STATUS_USB_SS 0x04 - -#define AXGE_SROM_ADDR 0x07 -#define AXGE_SROM_DATA_LOW 0x08 -#define AXGE_SROM_DATA_HIGH 0x09 -#define AXGE_SROM_CMD 0x0a -#define AXGE_SROM_CMD_RD 0x04 /* EEprom read command */ -#define AXGE_SROM_CMD_WR 0x08 /* EEprom write command */ -#define AXGE_SROM_CMD_BUSY 0x10 /* EEprom access module busy */ - -#define AXGE_RX_CTL 0x0b -#define AXGE_RX_CTL_DROPCRCERR 0x0100 /* Drop CRC error packet */ -#define AXGE_RX_CTL_IPE 0x0200 /* 4-byte IP header alignment */ -#define AXGE_RX_CTL_TXPADCRC 0x0400 /* Csum value in rx header 3 */ -#define AXGE_RX_CTL_START 0x0080 /* Ethernet MAC start */ -#define AXGE_RX_CTL_AP 0x0020 /* Accept physical address from - multicast array */ -#define AXGE_RX_CTL_AM 0x0010 -#define AXGE_RX_CTL_AB 0x0008 -#define AXGE_RX_CTL_HA8B 0x0004 -#define AXGE_RX_CTL_AMALL 0x0002 /* Accept all multicast frames */ -#define AXGE_RX_CTL_PRO 0x0001 /* Promiscuous Mode */ -#define AXGE_RX_CTL_STOP 0x0000 /* Stop MAC */ - -#define AXGE_NODE_ID 0x10 -#define AXGE_MULTI_FILTER_ARRY 0x16 - -#define AXGE_MEDIUM_STATUS_MODE 0x22 -#define AXGE_MEDIUM_GIGAMODE 0x0001 -#define AXGE_MEDIUM_FULL_DUPLEX 0x0002 -#define AXGE_MEDIUM_ALWAYS_ONE 0x0004 -#define AXGE_MEDIUM_EN_125MHZ 0x0008 -#define AXGE_MEDIUM_RXFLOW_CTRLEN 0x0010 -#define AXGE_MEDIUM_TXFLOW_CTRLEN 0x0020 -#define AXGE_MEDIUM_RECEIVE_EN 0x0100 -#define AXGE_MEDIUM_PS 0x0200 -#define AXGE_MEDIUM_JUMBO_EN 0x8040 - -#define AXGE_MONITOR_MODE 0x24 -#define AXGE_MONITOR_MODE_RWLC 0x02 -#define AXGE_MONITOR_MODE_RWMP 0x04 -#define AXGE_MONITOR_MODE_RWWF 0x08 -#define AXGE_MONITOR_MODE_RW_FLAG 0x10 -#define AXGE_MONITOR_MODE_PMEPOL 0x20 -#define AXGE_MONITOR_MODE_PMETYPE 0x40 - -#define AXGE_GPIO_CTRL 0x25 -#define AXGE_GPIO_CTRL_GPIO3EN 0x80 -#define AXGE_GPIO_CTRL_GPIO2EN 0x40 -#define AXGE_GPIO_CTRL_GPIO1EN 0x20 - -#define AXGE_PHYPWR_RSTCTL 0x26 -#define AXGE_PHYPWR_RSTCTL_BZ 0x0010 -#define AXGE_PHYPWR_RSTCTL_IPRL 0x0020 -#define AXGE_PHYPWR_RSTCTL_AUTODETACH 0x1000 +/* Physical link status register */ +#define AXGE_PLSR 0x02 +#define PLSR_USB_FS 0x01 +#define PLSR_USB_HS 0x02 +#define PLSR_USB_SS 0x04 + +/* EEPROM address register */ +#define AXGE_EAR 0x07 + +/* EEPROM data low register */ +#define AXGE_EDLR 0x08 + +/* EEPROM data high register */ +#define AXGE_EDHR 0x09 + +/* EEPROM command register */ +#define AXGE_ECR 0x0a + +/* Rx control register */ +#define AXGE_RCR 0x0b +#define RCR_STOP 0x0000 +#define RCR_PRO 0x0001 +#define RCR_AMALL 0x0002 +#define RCR_AB 0x0008 +#define RCR_AM 0x0010 +#define RCR_AP 0x0020 +#define RCR_SO 0x0080 +#define RCR_DROP_CRCE 0x0100 +#define RCR_IPE 0x0200 +#define RCR_TX_CRC_PAD 0x0400 + +/* Node id register */ +#define AXGE_NIDR 0x10 + +/* Multicast filter array */ +#define AXGE_MFA 0x16 + +/* Medium status register */ +#define AXGE_MSR 0x22 +#define MSR_GM 0x0001 +#define MSR_FD 0x0002 +#define MSR_EN_125MHZ 0x0008 +#define MSR_RFC 0x0010 +#define MSR_TFC 0x0020 +#define MSR_RE 0x0100 +#define MSR_PS 0x0200 + +/* Monitor mode status register */ +#define AXGE_MMSR 0x24 +#define MMSR_RWLC 0x02 +#define MMSR_RWMP 0x04 +#define MMSR_RWWF 0x08 +#define MMSR_RW_FLAG 0x10 +#define MMSR_PME_POL 0x20 +#define MMSR_PME_TYPE 0x40 +#define MMSR_PME_IND 0x80 + +/* GPIO control/status register */ +#define AXGE_GPIOCR 0x25 + +/* Ethernet PHY power & reset control register */ +#define AXGE_EPPRCR 0x26 +#define EPPRCR_BZ 0x0010 +#define EPPRCR_IPRL 0x0020 +#define EPPRCR_AUTODETACH 0x1000 #define AXGE_RX_BULKIN_QCTRL 0x2e -#define AXGE_RX_BULKIN_QCTRL_TIME 0x01 -#define AXGE_RX_BULKIN_QCTRL_IFG 0x02 -#define AXGE_RX_BULKIN_QCTRL_SIZE 0x04 - -#define AXGE_RX_BULKIN_QTIMR_LOW 0x2f -#define AXGE_RX_BULKIN_QTIMR_HIGH 0x30 -#define AXGE_RX_BULKIN_QSIZE 0x31 -#define AXGE_RX_BULKIN_QIFG 0x32 #define AXGE_CLK_SELECT 0x33 #define AXGE_CLK_SELECT_BCS 0x01 @@ -118,75 +110,44 @@ #define AXGE_CLK_SELECT_ACSREQ 0x10 #define AXGE_CLK_SELECT_ULR 0x08 -#define AXGE_RXCOE_CTL 0x34 -#define AXGE_RXCOE_IP 0x01 -#define AXGE_RXCOE_TCP 0x02 -#define AXGE_RXCOE_UDP 0x04 -#define AXGE_RXCOE_ICMP 0x08 -#define AXGE_RXCOE_IGMP 0x10 -#define AXGE_RXCOE_TCPV6 0x20 -#define AXGE_RXCOE_UDPV6 0x40 -#define AXGE_RXCOE_ICMV6 0x80 - -#define AXGE_TXCOE_CTL 0x35 -#define AXGE_TXCOE_IP 0x01 -#define AXGE_TXCOE_TCP 0x02 -#define AXGE_TXCOE_UDP 0x04 -#define AXGE_TXCOE_ICMP 0x08 -#define AXGE_TXCOE_IGMP 0x10 -#define AXGE_TXCOE_TCPV6 0x20 -#define AXGE_TXCOE_UDPV6 0x40 -#define AXGE_TXCOE_ICMV6 0x80 +/* COE Rx control register */ +#define AXGE_CRCR 0x34 +#define CRCR_IP 0x01 +#define CRCR_TCP 0x02 +#define CRCR_UDP 0x04 +#define CRCR_ICMP 0x08 +#define CRCR_IGMP 0x10 +#define CRCR_TCPV6 0x20 +#define CRCR_UDPV6 0x40 +#define CRCR_ICMPV6 0x80 + +/* COE Tx control register */ +#define AXGE_CTCR 0x35 +#define CTCR_IP 0x01 +#define CTCR_TCP 0x02 +#define CTCR_UDP 0x04 +#define CTCR_ICMP 0x08 +#define CTCR_IGMP 0x10 +#define CTCR_TCPV6 0x20 +#define CTCR_UDPV6 0x40 +#define CTCR_ICMPV6 0x80 -#define AXGE_PAUSE_WATERLVL_HIGH 0x54 -#define AXGE_PAUSE_WATERLVL_LOW 0x55 +/* Pause water level high register */ +#define AXGE_PWLHR 0x54 -#define AXGE_EEP_EFUSE_CORRECT 0x00 -#define AX88179_EEPROM_MAGIC 0x17900b95 +/* Pause water level low register */ +#define AXGE_PWLLR 0x55 #define AXGE_CONFIG_IDX 0 /* config number 1 */ #define AXGE_IFACE_IDX 0 -#define AXGE_RXHDR_CRC_ERR 0x80000000 -#define AXGE_RXHDR_L4_ERR (1 << 8) -#define AXGE_RXHDR_L3_ERR (1 << 9) - -#define AXGE_RXHDR_L4_TYPE_ICMP 2 -#define AXGE_RXHDR_L4_TYPE_IGMP 3 -#define AXGE_RXHDR_L4_TYPE_TCMPV6 5 - -#define AXGE_RXHDR_L3_TYPE_IP 1 -#define AXGE_RXHDR_L3_TYPE_IPV6 2 - #define AXGE_RXHDR_L4_TYPE_MASK 0x1c +#define AXGE_RXHDR_L4CSUM_ERR 1 +#define AXGE_RXHDR_L3CSUM_ERR 2 #define AXGE_RXHDR_L4_TYPE_UDP 4 #define AXGE_RXHDR_L4_TYPE_TCP 16 -#define AXGE_RXHDR_L3CSUM_ERR 2 -#define AXGE_RXHDR_L4CSUM_ERR 1 -#define AXGE_RXHDR_CRC_ERR 0x80000000 -#define AXGE_RXHDR_DROP_ERR 0x40000000 - -struct axge_csum_hdr { - uint16_t cstatus; -#define AXGE_CSUM_HDR_L4_CSUM_ERR 0x0001 -#define AXGE_CSUM_HDR_L3_CSUM_ERR 0x0002 -#define AXGE_CSUM_HDR_L4_TYPE_UDP 0x0004 -#define AXGE_CSUM_HDR_L4_TYPE_ICMP 0x0008 -#define AXGE_CSUM_HDR_L4_TYPE_IGMP 0x000C -#define AXGE_CSUM_HDR_L4_TYPE_TCP 0x0010 -#define AXGE_CSUM_HDR_L4_TYPE_TCPV6 0x0014 -#define AXGE_CSUM_HDR_L4_TYPE_MASK 0x001C -#define AXGE_CSUM_HDR_L3_TYPE_IPV4 0x0020 -#define AXGE_CSUM_HDR_L3_TYPE_IPV6 0x0040 -#define AXGE_CSUM_HDR_VLAN_MASK 0x0700 - uint16_t len; -#define AXGE_CSUM_HDR_LEN_MASK 0x1FFF -#define AXGE_CSUM_HDR_CRC_ERR 0x2000 -#define AXGE_CSUM_HDR_MII_ERR 0x4000 -#define AXGE_CSUM_HDR_DROP 0x8000 -} __packed; - -#define AXGE_CSUM_RXBYTES(x) ((x) & AXGE_CSUM_HDR_LEN_MASK) +#define AXGE_RXHDR_CRC_ERR 0x20000000 +#define AXGE_RXHDR_DROP_ERR 0x80000000 #define GET_MII(sc) uether_getmii(&(sc)->sc_ue) Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Thu Jul 3 16:29:21 2014 (r268221) +++ stable/9/sys/dev/usb/usbdevs Thu Jul 3 16:34:01 2014 (r268222) @@ -1614,6 +1614,7 @@ product DLINK DSB650TX 0x4002 10/100 Et product DLINK DSB650TX_PNA 0x4003 1/10/100 Ethernet product DLINK DSB650TX3 0x400b 10/100 Ethernet product DLINK DSB650TX2 0x4102 10/100 Ethernet +product DLINK DUB1312 0x4a00 10/100/1000 Ethernet product DLINK DSB650 0xabc1 10/100 Ethernet product DLINK DUBH7 0xf103 DUB-H7 USB 2.0 7-Port Hub product DLINK DWR510_CD 0xa805 DWR-510 CD-ROM Mode @@ -4091,6 +4092,7 @@ product SITECOMEU RT3072_6 0x004d RT3072 product SITECOMEU RTL8188CU_1 0x0052 RTL8188CU product SITECOMEU RTL8188CU_2 0x005c RTL8188CU product SITECOMEU RTL8192CU 0x0061 RTL8192CU +product SITECOMEU LN032 0x0072 LN-032 product SITECOMEU LN028 0x061c LN-028 product SITECOMEU WL113 0x9071 WL-113 product SITECOMEU ZD1211B 0x9075 ZD1211B From owner-svn-src-stable@FreeBSD.ORG Thu Jul 3 17:35:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B3BCC49B; Thu, 3 Jul 2014 17:35:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A06AA21BB; Thu, 3 Jul 2014 17:35:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s63HZ2BY078869; Thu, 3 Jul 2014 17:35:02 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s63HZ2Ch078867; Thu, 3 Jul 2014 17:35:02 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201407031735.s63HZ2Ch078867@svn.freebsd.org> From: Sergey Kandaurov Date: Thu, 3 Jul 2014 17:35:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268223 - stable/10/lib/libc/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2014 17:35:02 -0000 Author: pluknet Date: Thu Jul 3 17:35:01 2014 New Revision: 268223 URL: http://svnweb.freebsd.org/changeset/base/268223 Log: MFC r267909: Document EINVAL. PR: 191382 Modified: stable/10/lib/libc/sys/bind.2 stable/10/lib/libc/sys/connect.2 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/bind.2 ============================================================================== --- stable/10/lib/libc/sys/bind.2 Thu Jul 3 16:34:01 2014 (r268222) +++ stable/10/lib/libc/sys/bind.2 Thu Jul 3 17:35:01 2014 (r268223) @@ -28,7 +28,7 @@ .\" @(#)bind.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd June 26, 2014 .Dt BIND 2 .Os .Sh NAME @@ -85,6 +85,10 @@ is not a valid descriptor. .It Bq Er EINVAL The socket is already bound to an address, and the protocol does not support binding to a new address; or the socket has been shut down. +.It Bq Er EINVAL +The +.Fa addrlen +argument is not a valid length for the address family. .It Bq Er ENOTSOCK The .Fa s Modified: stable/10/lib/libc/sys/connect.2 ============================================================================== --- stable/10/lib/libc/sys/connect.2 Thu Jul 3 16:34:01 2014 (r268222) +++ stable/10/lib/libc/sys/connect.2 Thu Jul 3 17:35:01 2014 (r268223) @@ -28,7 +28,7 @@ .\" @(#)connect.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 5, 2010 +.Dd June 26, 2014 .Dt CONNECT 2 .Os .Sh NAME @@ -80,6 +80,10 @@ The .Fa s argument is not a valid descriptor. +.It Bq Er EINVAL +The +.Fa namelen +argument is not a valid length for the address family. .It Bq Er ENOTSOCK The .Fa s From owner-svn-src-stable@FreeBSD.ORG Thu Jul 3 17:37:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 03CBB756; Thu, 3 Jul 2014 17:37:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E47A821EF; Thu, 3 Jul 2014 17:37:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s63HbpkP079425; Thu, 3 Jul 2014 17:37:51 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s63Hbpnd079418; Thu, 3 Jul 2014 17:37:51 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201407031737.s63Hbpnd079418@svn.freebsd.org> From: Sergey Kandaurov Date: Thu, 3 Jul 2014 17:37:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268225 - stable/9/lib/libc/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2014 17:37:52 -0000 Author: pluknet Date: Thu Jul 3 17:37:51 2014 New Revision: 268225 URL: http://svnweb.freebsd.org/changeset/base/268225 Log: MFC r267909: Document EINVAL. PR: 191382 Modified: stable/9/lib/libc/sys/bind.2 stable/9/lib/libc/sys/connect.2 Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) Modified: stable/9/lib/libc/sys/bind.2 ============================================================================== --- stable/9/lib/libc/sys/bind.2 Thu Jul 3 17:36:59 2014 (r268224) +++ stable/9/lib/libc/sys/bind.2 Thu Jul 3 17:37:51 2014 (r268225) @@ -28,7 +28,7 @@ .\" @(#)bind.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd June 26, 2014 .Dt BIND 2 .Os .Sh NAME @@ -85,6 +85,10 @@ is not a valid descriptor. .It Bq Er EINVAL The socket is already bound to an address, and the protocol does not support binding to a new address; or the socket has been shut down. +.It Bq Er EINVAL +The +.Fa addrlen +argument is not a valid length for the address family. .It Bq Er ENOTSOCK The .Fa s Modified: stable/9/lib/libc/sys/connect.2 ============================================================================== --- stable/9/lib/libc/sys/connect.2 Thu Jul 3 17:36:59 2014 (r268224) +++ stable/9/lib/libc/sys/connect.2 Thu Jul 3 17:37:51 2014 (r268225) @@ -28,7 +28,7 @@ .\" @(#)connect.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 5, 2010 +.Dd June 26, 2014 .Dt CONNECT 2 .Os .Sh NAME @@ -80,6 +80,10 @@ The .Fa s argument is not a valid descriptor. +.It Bq Er EINVAL +The +.Fa namelen +argument is not a valid length for the address family. .It Bq Er ENOTSOCK The .Fa s From owner-svn-src-stable@FreeBSD.ORG Thu Jul 3 17:57:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5DE5329D; Thu, 3 Jul 2014 17:57:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3EC3823C6; Thu, 3 Jul 2014 17:57:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s63HvDwH089149; Thu, 3 Jul 2014 17:57:13 GMT (envelope-from truckman@svn.freebsd.org) Received: (from truckman@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s63HvD8G089148; Thu, 3 Jul 2014 17:57:13 GMT (envelope-from truckman@svn.freebsd.org) Message-Id: <201407031757.s63HvD8G089148@svn.freebsd.org> From: Don Lewis Date: Thu, 3 Jul 2014 17:57:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r268228 - stable/8/sys/kern X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2014 17:57:13 -0000 Author: truckman Date: Thu Jul 3 17:57:12 2014 New Revision: 268228 URL: http://svnweb.freebsd.org/changeset/base/268228 Log: MFC r266814 Initialize r_flags the same way in all cases using a sanitized copy of flags that has several bits cleared. The RF_WANTED and RF_FIRSTSHARE bits are invalid in this context, and we want to defer setting RF_ACTIVE in r_flags until later. This should make rman_get_flags() return the correct answer in all cases. Add a KASSERT() to catch callers which incorrectly pass the RF_WANTED or RF_FIRSTSHARE flags. Do a strict equality check on the share type bits of flags. In particular, do an equality check on RF_PREFETCHABLE. The previous code would allow one type of mismatch of RF_PREFETCHABLE but disallow the other type of mismatch. Also, ignore the the RF_ALIGNMENT_MASK bits since alignment validity should be handled by the amask check. This field contains an integer value, but previous code did a strange bitwise comparison on it. Leave the original value of flags unmolested as a minor debug aid. Change the start+amask overflow check to a KASSERT() since it is just meant to catch a highly unlikely programming error in the caller. Reviewed by: jhb Modified: stable/8/sys/kern/subr_rman.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) Modified: stable/8/sys/kern/subr_rman.c ============================================================================== --- stable/8/sys/kern/subr_rman.c Thu Jul 3 17:53:28 2014 (r268227) +++ stable/8/sys/kern/subr_rman.c Thu Jul 3 17:57:12 2014 (r268228) @@ -430,12 +430,14 @@ rman_adjust_resource(struct resource *rr return (0); } +#define SHARE_TYPE(f) (f & (RF_SHAREABLE | RF_TIMESHARE | RF_PREFETCHABLE)) + struct resource * rman_reserve_resource_bound(struct rman *rm, u_long start, u_long end, u_long count, u_long bound, u_int flags, struct device *dev) { - u_int want_activate; + u_int new_rflags; struct resource_i *r, *s, *rv; u_long rstart, rend, amask, bmask; @@ -445,8 +447,10 @@ rman_reserve_resource_bound(struct rman "length %#lx, flags %u, device %s\n", rm->rm_descr, start, end, count, flags, dev == NULL ? "" : device_get_nameunit(dev))); - want_activate = (flags & RF_ACTIVE); - flags &= ~RF_ACTIVE; + KASSERT((flags & (RF_WANTED | RF_FIRSTSHARE)) == 0, + ("invalid flags %#x", flags)); + new_rflags = (flags & ~(RF_ACTIVE | RF_WANTED | RF_FIRSTSHARE)) | + RF_ALLOCATED; mtx_lock(rm->rm_mtx); @@ -461,10 +465,8 @@ rman_reserve_resource_bound(struct rman } amask = (1ul << RF_ALIGNMENT(flags)) - 1; - if (start > ULONG_MAX - amask) { - DPRINTF(("start+amask would wrap around\n")); - goto out; - } + KASSERT(start <= ULONG_MAX - amask, + ("start (%#lx) + amask (%#lx) would wrap around", start, amask)); /* If bound is 0, bmask will also be 0 */ bmask = ~(bound - 1); @@ -517,7 +519,7 @@ rman_reserve_resource_bound(struct rman if ((s->r_end - s->r_start + 1) == count) { DPRINTF(("candidate region is entire chunk\n")); rv = s; - rv->r_flags |= RF_ALLOCATED | flags; + rv->r_flags = new_rflags; rv->r_dev = dev; goto out; } @@ -537,7 +539,7 @@ rman_reserve_resource_bound(struct rman goto out; rv->r_start = rstart; rv->r_end = rstart + count - 1; - rv->r_flags = flags | RF_ALLOCATED; + rv->r_flags = new_rflags; rv->r_dev = dev; rv->r_rm = rm; @@ -598,7 +600,7 @@ rman_reserve_resource_bound(struct rman goto out; for (s = r; s && s->r_end <= end; s = TAILQ_NEXT(s, r_link)) { - if ((s->r_flags & flags) == flags && + if (SHARE_TYPE(s->r_flags) == SHARE_TYPE(flags) && s->r_start >= start && (s->r_end - s->r_start + 1) == count && (s->r_start & amask) == 0 && @@ -608,8 +610,7 @@ rman_reserve_resource_bound(struct rman goto out; rv->r_start = s->r_start; rv->r_end = s->r_end; - rv->r_flags = s->r_flags & - (RF_ALLOCATED | RF_SHAREABLE | RF_TIMESHARE); + rv->r_flags = new_rflags; rv->r_dev = dev; rv->r_rm = rm; if (s->r_sharehead == NULL) { @@ -636,13 +637,12 @@ rman_reserve_resource_bound(struct rman */ out: /* - * If the user specified RF_ACTIVE in the initial flags, - * which is reflected in `want_activate', we attempt to atomically + * If the user specified RF_ACTIVE in flags, we attempt to atomically * activate the resource. If this fails, we release the resource * and indicate overall failure. (This behavior probably doesn't * make sense for RF_TIMESHARE-type resources.) */ - if (rv && want_activate) { + if (rv && (flags & RF_ACTIVE) != 0) { struct resource_i *whohas; if (int_rman_activate_resource(rm, rv, &whohas)) { int_rman_release_resource(rm, rv); From owner-svn-src-stable@FreeBSD.ORG Fri Jul 4 06:03:55 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE0BD197; Fri, 4 Jul 2014 06:03:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DAA1121E2; Fri, 4 Jul 2014 06:03:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6463sNa042863; Fri, 4 Jul 2014 06:03:54 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6463sn0042862; Fri, 4 Jul 2014 06:03:54 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201407040603.s6463sn0042862@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 4 Jul 2014 06:03:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268243 - stable/10/sbin/sysctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jul 2014 06:03:55 -0000 Author: hselasky Date: Fri Jul 4 06:03:54 2014 New Revision: 268243 URL: http://svnweb.freebsd.org/changeset/base/268243 Log: MFC r267960: Don't hide zero-length strings when doing sysctl listings. Modified: stable/10/sbin/sysctl/sysctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/sysctl/sysctl.c ============================================================================== --- stable/10/sbin/sysctl/sysctl.c Fri Jul 4 04:47:29 2014 (r268242) +++ stable/10/sbin/sysctl/sysctl.c Fri Jul 4 06:03:54 2014 (r268243) @@ -710,9 +710,10 @@ show_var(int *oid, int nlen) warnx("malloc failed"); return (1); } + ctltype = (kind & CTLTYPE); len = j; i = sysctl(oid, nlen, val, &len, 0, 0); - if (i || !len) { + if (i != 0 || (len == 0 && ctltype != CTLTYPE_STRING)) { free(oval); return (1); } @@ -724,7 +725,6 @@ show_var(int *oid, int nlen) } val[len] = '\0'; p = val; - ctltype = (kind & CTLTYPE); sign = ctl_sign[ctltype]; intlen = ctl_size[ctltype]; From owner-svn-src-stable@FreeBSD.ORG Fri Jul 4 06:05:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1C913C5; Fri, 4 Jul 2014 06:05:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE22C21F9; Fri, 4 Jul 2014 06:05:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6465dqs043283; Fri, 4 Jul 2014 06:05:39 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6465di2043282; Fri, 4 Jul 2014 06:05:39 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201407040605.s6465di2043282@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 4 Jul 2014 06:05:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268244 - stable/9/sbin/sysctl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jul 2014 06:05:40 -0000 Author: hselasky Date: Fri Jul 4 06:05:39 2014 New Revision: 268244 URL: http://svnweb.freebsd.org/changeset/base/268244 Log: MFC r267960: Don't hide zero-length strings when doing sysctl listings. Modified: stable/9/sbin/sysctl/sysctl.c Directory Properties: stable/9/sbin/sysctl/ (props changed) Modified: stable/9/sbin/sysctl/sysctl.c ============================================================================== --- stable/9/sbin/sysctl/sysctl.c Fri Jul 4 06:03:54 2014 (r268243) +++ stable/9/sbin/sysctl/sysctl.c Fri Jul 4 06:05:39 2014 (r268244) @@ -582,9 +582,10 @@ show_var(int *oid, int nlen) warnx("malloc failed"); return (1); } + ctltype = (kind & CTLTYPE); len = j; i = sysctl(oid, nlen, val, &len, 0, 0); - if (i || !len) { + if (i != 0 || (len == 0 && ctltype != CTLTYPE_STRING)) { free(oval); return (1); } @@ -598,7 +599,6 @@ show_var(int *oid, int nlen) fmt = buf; oidfmt(oid, nlen, fmt, &kind); p = val; - ctltype = (kind & CTLTYPE); sign = ctl_sign[ctltype]; intlen = ctl_size[ctltype]; From owner-svn-src-stable@FreeBSD.ORG Fri Jul 4 13:57:59 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60788999; Fri, 4 Jul 2014 13:57:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CD102CF7; Fri, 4 Jul 2014 13:57:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s64DvxDS072823; Fri, 4 Jul 2014 13:57:59 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s64Dvxg2072822; Fri, 4 Jul 2014 13:57:59 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201407041357.s64Dvxg2072822@svn.freebsd.org> From: Marius Strobl Date: Fri, 4 Jul 2014 13:57:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268250 - stable/10/sys/dev/ata/chipsets X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jul 2014 13:57:59 -0000 Author: marius Date: Fri Jul 4 13:57:58 2014 New Revision: 268250 URL: http://svnweb.freebsd.org/changeset/base/268250 Log: MFC: r268095 Actually pro AMD chipsets, making r244146 work. Sponsored by: Bally Wulff Games & Entertainment GmbH Modified: stable/10/sys/dev/ata/chipsets/ata-ati.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ata/chipsets/ata-ati.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-ati.c Fri Jul 4 09:34:24 2014 (r268249) +++ stable/10/sys/dev/ata/chipsets/ata-ati.c Fri Jul 4 13:57:58 2014 (r268250) @@ -98,7 +98,7 @@ ata_ati_probe(device_t dev) { ATA_AMD_HUDSON2_S5, 0x00, ATI_AHCI, 0, ATA_SA300, "Hudson-2" }, { 0, 0, 0, 0, 0, 0}}; - if (pci_get_vendor(dev) != ATA_ATI_ID) + if (pci_get_vendor(dev) != ATA_AMD_ID && pci_get_vendor(dev) != ATA_ATI_ID) return ENXIO; if (!(ctlr->chip = ata_match_chip(dev, ids))) From owner-svn-src-stable@FreeBSD.ORG Fri Jul 4 13:59:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BA3F4AEE; Fri, 4 Jul 2014 13:59:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A6C342D01; Fri, 4 Jul 2014 13:59:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s64DxmGm073160; Fri, 4 Jul 2014 13:59:48 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s64DxmZT073159; Fri, 4 Jul 2014 13:59:48 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201407041359.s64DxmZT073159@svn.freebsd.org> From: Marius Strobl Date: Fri, 4 Jul 2014 13:59:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268251 - stable/9/sys/dev/ata/chipsets X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jul 2014 13:59:48 -0000 Author: marius Date: Fri Jul 4 13:59:48 2014 New Revision: 268251 URL: http://svnweb.freebsd.org/changeset/base/268251 Log: MFC: r268095 Actually pro AMD chipsets, making r244146 (MFCed to stable/9 in r245797) work. Sponsored by: Bally Wulff Games & Entertainment GmbH Modified: stable/9/sys/dev/ata/chipsets/ata-ati.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ata/chipsets/ata-ati.c ============================================================================== --- stable/9/sys/dev/ata/chipsets/ata-ati.c Fri Jul 4 13:57:58 2014 (r268250) +++ stable/9/sys/dev/ata/chipsets/ata-ati.c Fri Jul 4 13:59:48 2014 (r268251) @@ -99,7 +99,7 @@ ata_ati_probe(device_t dev) { ATA_AMD_HUDSON2_S5, 0x00, ATI_AHCI, 0, ATA_SA300, "Hudson-2" }, { 0, 0, 0, 0, 0, 0}}; - if (pci_get_vendor(dev) != ATA_ATI_ID) + if (pci_get_vendor(dev) != ATA_AMD_ID && pci_get_vendor(dev) != ATA_ATI_ID) return ENXIO; if (!(ctlr->chip = ata_match_chip(dev, ids))) From owner-svn-src-stable@FreeBSD.ORG Fri Jul 4 14:00:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62149C2D; Fri, 4 Jul 2014 14:00:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4EF102D0B; Fri, 4 Jul 2014 14:00:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s64E0UIO074424; Fri, 4 Jul 2014 14:00:30 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s64E0UEa074423; Fri, 4 Jul 2014 14:00:30 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201407041400.s64E0UEa074423@svn.freebsd.org> From: Marius Strobl Date: Fri, 4 Jul 2014 14:00:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r268252 - stable/8/sys/dev/ata/chipsets X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jul 2014 14:00:30 -0000 Author: marius Date: Fri Jul 4 14:00:29 2014 New Revision: 268252 URL: http://svnweb.freebsd.org/changeset/base/268252 Log: MFC: r268095 Actually pro AMD chipsets, making r244146 (MFCed to stable/8 in r245801) work. Sponsored by: Bally Wulff Games & Entertainment GmbH Modified: stable/8/sys/dev/ata/chipsets/ata-ati.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/ata/ (props changed) Modified: stable/8/sys/dev/ata/chipsets/ata-ati.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-ati.c Fri Jul 4 13:59:48 2014 (r268251) +++ stable/8/sys/dev/ata/chipsets/ata-ati.c Fri Jul 4 14:00:29 2014 (r268252) @@ -99,7 +99,7 @@ ata_ati_probe(device_t dev) { ATA_AMD_HUDSON2_S5, 0x00, ATI_AHCI, 0, ATA_SA300, "Hudson-2" }, { 0, 0, 0, 0, 0, 0}}; - if (pci_get_vendor(dev) != ATA_ATI_ID) + if (pci_get_vendor(dev) != ATA_AMD_ID && pci_get_vendor(dev) != ATA_ATI_ID) return ENXIO; if (!(ctlr->chip = ata_match_chip(dev, ids))) From owner-svn-src-stable@FreeBSD.ORG Fri Jul 4 15:09:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 27DADB17; Fri, 4 Jul 2014 15:09:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EEB7B2320; Fri, 4 Jul 2014 15:09:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s64F9usv008368; Fri, 4 Jul 2014 15:09:56 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s64F9uLg008365; Fri, 4 Jul 2014 15:09:56 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407041509.s64F9uLg008365@svn.freebsd.org> From: Alexander Motin Date: Fri, 4 Jul 2014 15:09:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268255 - in stable/10/sys: cam/scsi compat/linux X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jul 2014 15:09:57 -0000 Author: mav Date: Fri Jul 4 15:09:56 2014 New Revision: 268255 URL: http://svnweb.freebsd.org/changeset/base/268255 Log: MFC r267051: - Add support for SG_GET_SG_TABLESIZE IOCTL to report that we don't support scatter/gather lists. - Return error for still unsupported SG 3.x API read/write calls. Modified: stable/10/sys/cam/scsi/scsi_sg.c stable/10/sys/compat/linux/linux_ioctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_sg.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_sg.c Fri Jul 4 14:49:40 2014 (r268254) +++ stable/10/sys/cam/scsi/scsi_sg.c Fri Jul 4 15:09:56 2014 (r268255) @@ -627,6 +627,13 @@ sgioctl(struct cdev *dev, u_long cmd, ca break; } + case SG_GET_SG_TABLESIZE: + { + int *size = (int *)arg; + *size = 0; + break; + } + case SG_EMULATED_HOST: case SG_SET_TRANSFORM: case SG_GET_TRANSFORM: @@ -638,7 +645,6 @@ sgioctl(struct cdev *dev, u_long cmd, ca case SG_GET_ACCESS_COUNT: case SG_SET_FORCE_LOW_DMA: case SG_GET_LOW_DMA: - case SG_GET_SG_TABLESIZE: case SG_SET_FORCE_PACK_ID: case SG_GET_PACK_ID: case SG_SET_RESERVED_SIZE: @@ -684,6 +690,12 @@ sgwrite(struct cdev *dev, struct uio *ui if (error) goto out_hdr; + /* XXX: We don't support SG 3.x read/write API. */ + if (hdr->reply_len < 0) { + error = ENODEV; + goto out_hdr; + } + ccb = xpt_alloc_ccb(); if (ccb == NULL) { error = ENOMEM; Modified: stable/10/sys/compat/linux/linux_ioctl.c ============================================================================== --- stable/10/sys/compat/linux/linux_ioctl.c Fri Jul 4 14:49:40 2014 (r268254) +++ stable/10/sys/compat/linux/linux_ioctl.c Fri Jul 4 15:09:56 2014 (r268255) @@ -2750,6 +2750,9 @@ linux_ioctl_sg(struct thread *td, struct case LINUX_SG_GET_SCSI_ID: args->cmd = SG_GET_SCSI_ID; break; + case LINUX_SG_GET_SG_TABLESIZE: + args->cmd = SG_GET_SG_TABLESIZE; + break; default: return (ENODEV); } From owner-svn-src-stable@FreeBSD.ORG Fri Jul 4 16:06:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6AD5922D; Fri, 4 Jul 2014 16:06:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D3E92877; Fri, 4 Jul 2014 16:06:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s64G6vAG036418; Fri, 4 Jul 2014 16:06:57 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s64G6vub036417; Fri, 4 Jul 2014 16:06:57 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407041606.s64G6vub036417@svn.freebsd.org> From: Alexander Motin Date: Fri, 4 Jul 2014 16:06:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268257 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jul 2014 16:06:57 -0000 Author: mav Date: Fri Jul 4 16:06:56 2014 New Revision: 268257 URL: http://svnweb.freebsd.org/changeset/base/268257 Log: MFC r267547, r267551 (by trasz): Add LUN-associated name to VPD, to make Hyper-V Failover Cluster happy. Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Fri Jul 4 15:55:32 2014 (r268256) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Fri Jul 4 16:06:56 2014 (r268257) @@ -2032,13 +2032,13 @@ cfiscsi_devid(struct ctl_scsiio *ctsio, { struct cfiscsi_session *cs; struct scsi_vpd_device_id *devid_ptr; - struct scsi_vpd_id_descriptor *desc, *desc1; - struct scsi_vpd_id_descriptor *desc2, *desc3; /* for types 4h and 5h */ + struct scsi_vpd_id_descriptor *desc, *desc1, *desc2, *desc3, *desc4; struct scsi_vpd_id_t10 *t10id; struct ctl_lun *lun; const struct icl_pdu *request; + int i, ret; char *val; - size_t devid_len, wwpn_len; + size_t devid_len, wwpn_len, lun_name_len; lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; request = ctsio->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr; @@ -2050,9 +2050,20 @@ cfiscsi_devid(struct ctl_scsiio *ctsio, if ((wwpn_len % 4) != 0) wwpn_len += (4 - (wwpn_len % 4)); + if (lun == NULL) { + lun_name_len = 0; + } else { + lun_name_len = strlen(cs->cs_target->ct_name); + lun_name_len += strlen(",lun,XXXXXXXX"); + lun_name_len += 1; /* '\0' */ + if ((lun_name_len % 4) != 0) + lun_name_len += (4 - (lun_name_len % 4)); + } + devid_len = sizeof(struct scsi_vpd_device_id) + sizeof(struct scsi_vpd_id_descriptor) + sizeof(struct scsi_vpd_id_t10) + CTL_DEVID_LEN + + sizeof(struct scsi_vpd_id_descriptor) + lun_name_len + sizeof(struct scsi_vpd_id_descriptor) + wwpn_len + sizeof(struct scsi_vpd_id_descriptor) + sizeof(struct scsi_vpd_id_rel_trgt_port_id) + @@ -2081,8 +2092,10 @@ cfiscsi_devid(struct ctl_scsiio *ctsio, desc1 = (struct scsi_vpd_id_descriptor *)(&desc->identifier[0] + sizeof(struct scsi_vpd_id_t10) + CTL_DEVID_LEN); desc2 = (struct scsi_vpd_id_descriptor *)(&desc1->identifier[0] + - wwpn_len); + lun_name_len); desc3 = (struct scsi_vpd_id_descriptor *)(&desc2->identifier[0] + + wwpn_len); + desc4 = (struct scsi_vpd_id_descriptor *)(&desc3->identifier[0] + sizeof(struct scsi_vpd_id_rel_trgt_port_id)); if (lun != NULL) @@ -2128,33 +2141,61 @@ cfiscsi_devid(struct ctl_scsiio *ctsio, } /* - * desc1 is for the WWPN which is a port asscociation. - */ - desc1->proto_codeset = (SCSI_PROTO_ISCSI << 4) | SVPD_ID_CODESET_UTF8; - desc1->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_PORT | - SVPD_ID_TYPE_SCSI_NAME; - desc1->length = wwpn_len; - snprintf(desc1->identifier, wwpn_len, "%s,t,0x%4.4x", - cs->cs_target->ct_name, cs->cs_portal_group_tag); + * desc1 is for the unique LUN name. + * + * XXX: According to SPC-3, LUN must report the same ID through + * all the ports. The code below, however, reports the + * ID only via iSCSI. + */ + desc1->proto_codeset = (SCSI_PROTO_ISCSI << 4) | SVPD_ID_CODESET_UTF8; + desc1->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_LUN | + SVPD_ID_TYPE_SCSI_NAME; + desc1->length = lun_name_len; + if (lun != NULL) { + /* + * Find the per-target LUN number. + */ + for (i = 0; i < CTL_MAX_LUNS; i++) { + if (cs->cs_target->ct_luns[i] == lun->lun) + break; + } + KASSERT(i < CTL_MAX_LUNS, + ("lun %jd not found", (uintmax_t)lun->lun)); + ret = snprintf(desc1->identifier, lun_name_len, "%s,lun,%d", + cs->cs_target->ct_name, i); + KASSERT(ret > 0 && ret <= lun_name_len, ("bad snprintf")); + } else { + KASSERT(lun_name_len == 0, ("no lun, but lun_name_len != 0")); + } /* - * desc2 is for the Relative Target Port(type 4h) identifier + * desc2 is for the WWPN which is a port asscociation. */ - desc2->proto_codeset = (SCSI_PROTO_ISCSI << 4) | SVPD_ID_CODESET_BINARY; + desc2->proto_codeset = (SCSI_PROTO_ISCSI << 4) | SVPD_ID_CODESET_UTF8; desc2->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_PORT | - SVPD_ID_TYPE_RELTARG; - desc2->length = 4; - desc2->identifier[3] = 1; + SVPD_ID_TYPE_SCSI_NAME; + desc2->length = wwpn_len; + snprintf(desc2->identifier, wwpn_len, "%s,t,0x%4.4x", + cs->cs_target->ct_name, cs->cs_portal_group_tag); /* - * desc3 is for the Target Port Group(type 5h) identifier + * desc3 is for the Relative Target Port(type 4h) identifier */ desc3->proto_codeset = (SCSI_PROTO_ISCSI << 4) | SVPD_ID_CODESET_BINARY; desc3->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_PORT | - SVPD_ID_TYPE_TPORTGRP; + SVPD_ID_TYPE_RELTARG; desc3->length = 4; desc3->identifier[3] = 1; + /* + * desc4 is for the Target Port Group(type 5h) identifier + */ + desc4->proto_codeset = (SCSI_PROTO_ISCSI << 4) | SVPD_ID_CODESET_BINARY; + desc4->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_PORT | + SVPD_ID_TYPE_TPORTGRP; + desc4->length = 4; + desc4->identifier[3] = 1; + ctsio->scsi_status = SCSI_STATUS_OK; ctsio->be_move_done = ctl_config_move_done; From owner-svn-src-stable@FreeBSD.ORG Fri Jul 4 16:07:58 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 125C8469; Fri, 4 Jul 2014 16:07:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F337D28A1; Fri, 4 Jul 2014 16:07:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s64G7vBC036779; Fri, 4 Jul 2014 16:07:57 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s64G7vpv036777; Fri, 4 Jul 2014 16:07:57 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407041607.s64G7vpv036777@svn.freebsd.org> From: Alexander Motin Date: Fri, 4 Jul 2014 16:07:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268258 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jul 2014 16:07:58 -0000 Author: mav Date: Fri Jul 4 16:07:57 2014 New Revision: 268258 URL: http://svnweb.freebsd.org/changeset/base/268258 Log: MFC r267574 (by trasz): Make cs_terminating a bool; no functional changes. Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/sys/cam/ctl/ctl_frontend_iscsi.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Fri Jul 4 16:06:56 2014 (r268257) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Fri Jul 4 16:07:57 2014 (r268258) @@ -1129,8 +1129,6 @@ cfiscsi_maintenance_thread(void *arg) icl_conn_shutdown(cs->cs_conn); icl_conn_close(cs->cs_conn); - cs->cs_terminating++; - /* * XXX: We used to wait up to 30 seconds to deliver queued PDUs * to the initiator. We also tried hard to deliver SCSI Responses @@ -1150,9 +1148,9 @@ static void cfiscsi_session_terminate(struct cfiscsi_session *cs) { - if (cs->cs_terminating != 0) + if (cs->cs_terminating) return; - cs->cs_terminating = 1; + cs->cs_terminating = true; cv_signal(&cs->cs_maintenance_cv); #ifdef ICL_KERNEL_PROXY cv_signal(&cs->cs_login_cv); Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.h Fri Jul 4 16:06:56 2014 (r268257) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.h Fri Jul 4 16:07:57 2014 (r268258) @@ -72,7 +72,7 @@ struct cfiscsi_session { int cs_timeout; int cs_portal_group_tag; struct cv cs_maintenance_cv; - int cs_terminating; + bool cs_terminating; size_t cs_max_data_segment_length; size_t cs_max_burst_length; bool cs_immediate_data; From owner-svn-src-stable@FreeBSD.ORG Fri Jul 4 16:09:10 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1AD285A3; Fri, 4 Jul 2014 16:09:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EFED128AB; Fri, 4 Jul 2014 16:09:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s64G99ee037056; Fri, 4 Jul 2014 16:09:09 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s64G99me037055; Fri, 4 Jul 2014 16:09:09 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407041609.s64G99me037055@svn.freebsd.org> From: Alexander Motin Date: Fri, 4 Jul 2014 16:09:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268259 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jul 2014 16:09:10 -0000 Author: mav Date: Fri Jul 4 16:09:09 2014 New Revision: 268259 URL: http://svnweb.freebsd.org/changeset/base/268259 Log: MFC r267610 (by trasz): Rework session termination in iSCSI target to actually wait for any outstanding commands to be properly aborted by CTL. Without it, in some cases (such as files backing the LUNs stored on failing disk drives), terminating a busy session would result in panic. Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Fri Jul 4 16:07:57 2014 (r268258) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Fri Jul 4 16:09:09 2014 (r268259) @@ -1044,7 +1044,7 @@ cfiscsi_session_terminate_tasks(struct c { struct cfiscsi_data_wait *cdw, *tmpcdw; union ctl_io *io; - int error; + int error, last; #ifdef notyet io = ctl_alloc_io(cs->cs_target->ct_softc->fe.ctl_pool_ref); @@ -1101,12 +1101,31 @@ cfiscsi_session_terminate_tasks(struct c CFISCSI_SESSION_DEBUG(cs, "removing csw for initiator task tag " "0x%x", cdw->cdw_initiator_task_tag); #endif + /* + * Set nonzero port status; this prevents backends from + * assuming that the data transfer actually succeeded + * and writing uninitialized data to disk. + */ + cdw->cdw_ctl_io->scsiio.io_hdr.port_status = 42; cdw->cdw_ctl_io->scsiio.be_move_done(cdw->cdw_ctl_io); TAILQ_REMOVE(&cs->cs_waiting_for_data_out, cdw, cdw_next); uma_zfree(cfiscsi_data_wait_zone, cdw); } CFISCSI_SESSION_UNLOCK(cs); #endif + + /* + * Wait for CTL to terminate all the tasks. + */ + for (;;) { + refcount_acquire(&cs->cs_outstanding_ctl_pdus); + last = refcount_release(&cs->cs_outstanding_ctl_pdus); + if (last != 0) + break; + CFISCSI_SESSION_WARN(cs, "waiting for CTL to terminate tasks, " + "%d remaining", cs->cs_outstanding_ctl_pdus); + pause("cfiscsi_terminate", 1); + } } static void @@ -1123,19 +1142,22 @@ cfiscsi_maintenance_thread(void *arg) CFISCSI_SESSION_UNLOCK(cs); if (cs->cs_terminating) { - cfiscsi_session_terminate_tasks(cs); - callout_drain(&cs->cs_callout); + /* + * We used to wait up to 30 seconds to deliver queued + * PDUs to the initiator. We also tried hard to deliver + * SCSI Responses for the aborted PDUs. We don't do + * that anymore. We might need to revisit that. + */ + callout_drain(&cs->cs_callout); icl_conn_shutdown(cs->cs_conn); icl_conn_close(cs->cs_conn); /* - * XXX: We used to wait up to 30 seconds to deliver queued PDUs - * to the initiator. We also tried hard to deliver SCSI Responses - * for the aborted PDUs. We don't do that anymore. We might need - * to revisit that. + * At this point ICL receive thread is no longer + * running; no new tasks can be queued. */ - + cfiscsi_session_terminate_tasks(cs); cfiscsi_session_delete(cs); kthread_exit(); return; From owner-svn-src-stable@FreeBSD.ORG Fri Jul 4 16:10:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17D527D4; Fri, 4 Jul 2014 16:10:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0440228BC; Fri, 4 Jul 2014 16:10:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s64GAEfI037383; Fri, 4 Jul 2014 16:10:14 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s64GAEI8037382; Fri, 4 Jul 2014 16:10:14 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407041610.s64GAEI8037382@svn.freebsd.org> From: Alexander Motin Date: Fri, 4 Jul 2014 16:10:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268260 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jul 2014 16:10:15 -0000 Author: mav Date: Fri Jul 4 16:10:14 2014 New Revision: 268260 URL: http://svnweb.freebsd.org/changeset/base/268260 Log: MFC r267637: Add iSCSI Target Name ID descriptor to VPD 83h. It shall/should be there according to SPC-4, and istgt also provides it. Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Fri Jul 4 16:09:09 2014 (r268259) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Fri Jul 4 16:10:14 2014 (r268260) @@ -2053,12 +2053,13 @@ cfiscsi_devid(struct ctl_scsiio *ctsio, struct cfiscsi_session *cs; struct scsi_vpd_device_id *devid_ptr; struct scsi_vpd_id_descriptor *desc, *desc1, *desc2, *desc3, *desc4; + struct scsi_vpd_id_descriptor *desc5; struct scsi_vpd_id_t10 *t10id; struct ctl_lun *lun; const struct icl_pdu *request; int i, ret; char *val; - size_t devid_len, wwpn_len, lun_name_len; + size_t devid_len, wwnn_len, wwpn_len, lun_name_len; lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; request = ctsio->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr; @@ -2070,6 +2071,11 @@ cfiscsi_devid(struct ctl_scsiio *ctsio, if ((wwpn_len % 4) != 0) wwpn_len += (4 - (wwpn_len % 4)); + wwnn_len = strlen(cs->cs_target->ct_name); + wwnn_len += 1; /* '\0' */ + if ((wwnn_len % 4) != 0) + wwnn_len += (4 - (wwnn_len % 4)); + if (lun == NULL) { lun_name_len = 0; } else { @@ -2084,6 +2090,7 @@ cfiscsi_devid(struct ctl_scsiio *ctsio, sizeof(struct scsi_vpd_id_descriptor) + sizeof(struct scsi_vpd_id_t10) + CTL_DEVID_LEN + sizeof(struct scsi_vpd_id_descriptor) + lun_name_len + + sizeof(struct scsi_vpd_id_descriptor) + wwnn_len + sizeof(struct scsi_vpd_id_descriptor) + wwpn_len + sizeof(struct scsi_vpd_id_descriptor) + sizeof(struct scsi_vpd_id_rel_trgt_port_id) + @@ -2114,8 +2121,10 @@ cfiscsi_devid(struct ctl_scsiio *ctsio, desc2 = (struct scsi_vpd_id_descriptor *)(&desc1->identifier[0] + lun_name_len); desc3 = (struct scsi_vpd_id_descriptor *)(&desc2->identifier[0] + - wwpn_len); + wwnn_len); desc4 = (struct scsi_vpd_id_descriptor *)(&desc3->identifier[0] + + wwpn_len); + desc5 = (struct scsi_vpd_id_descriptor *)(&desc4->identifier[0] + sizeof(struct scsi_vpd_id_rel_trgt_port_id)); if (lun != NULL) @@ -2189,32 +2198,41 @@ cfiscsi_devid(struct ctl_scsiio *ctsio, } /* - * desc2 is for the WWPN which is a port asscociation. + * desc2 is for the Target Name. + */ + desc2->proto_codeset = (SCSI_PROTO_ISCSI << 4) | SVPD_ID_CODESET_UTF8; + desc2->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_TARGET | + SVPD_ID_TYPE_SCSI_NAME; + desc2->length = wwnn_len; + snprintf(desc2->identifier, wwnn_len, "%s", cs->cs_target->ct_name); + + /* + * desc3 is for the WWPN which is a port asscociation. */ - desc2->proto_codeset = (SCSI_PROTO_ISCSI << 4) | SVPD_ID_CODESET_UTF8; - desc2->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_PORT | + desc3->proto_codeset = (SCSI_PROTO_ISCSI << 4) | SVPD_ID_CODESET_UTF8; + desc3->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_PORT | SVPD_ID_TYPE_SCSI_NAME; - desc2->length = wwpn_len; - snprintf(desc2->identifier, wwpn_len, "%s,t,0x%4.4x", + desc3->length = wwpn_len; + snprintf(desc3->identifier, wwpn_len, "%s,t,0x%4.4x", cs->cs_target->ct_name, cs->cs_portal_group_tag); /* * desc3 is for the Relative Target Port(type 4h) identifier */ - desc3->proto_codeset = (SCSI_PROTO_ISCSI << 4) | SVPD_ID_CODESET_BINARY; - desc3->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_PORT | + desc4->proto_codeset = (SCSI_PROTO_ISCSI << 4) | SVPD_ID_CODESET_BINARY; + desc4->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_PORT | SVPD_ID_TYPE_RELTARG; - desc3->length = 4; - desc3->identifier[3] = 1; + desc4->length = 4; + desc4->identifier[3] = 1; /* * desc4 is for the Target Port Group(type 5h) identifier */ - desc4->proto_codeset = (SCSI_PROTO_ISCSI << 4) | SVPD_ID_CODESET_BINARY; - desc4->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_PORT | + desc5->proto_codeset = (SCSI_PROTO_ISCSI << 4) | SVPD_ID_CODESET_BINARY; + desc5->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_PORT | SVPD_ID_TYPE_TPORTGRP; - desc4->length = 4; - desc4->identifier[3] = 1; + desc5->length = 4; + desc5->identifier[3] = 1; ctsio->scsi_status = SCSI_STATUS_OK; From owner-svn-src-stable@FreeBSD.ORG Fri Jul 4 16:11:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3FDB5918; Fri, 4 Jul 2014 16:11:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1276E2938; Fri, 4 Jul 2014 16:11:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s64GBU0n038992; Fri, 4 Jul 2014 16:11:30 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s64GBUc2038990; Fri, 4 Jul 2014 16:11:30 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407041611.s64GBUc2038990@svn.freebsd.org> From: Alexander Motin Date: Fri, 4 Jul 2014 16:11:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268261 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jul 2014 16:11:31 -0000 Author: mav Date: Fri Jul 4 16:11:30 2014 New Revision: 268261 URL: http://svnweb.freebsd.org/changeset/base/268261 Log: MFC r267641: Add some more CTL_FLAG_ABORT check points. This should allow to abort commands doing mostly disk I/O, such as VERIFY or WRITE SAME. Before this change CTL_FLAG_ABORT was only checked around data moves, which for these commands may not happen for a very long time. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_backend_block.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Fri Jul 4 16:10:14 2014 (r268260) +++ stable/10/sys/cam/ctl/ctl.c Fri Jul 4 16:11:30 2014 (r268261) @@ -5009,9 +5009,10 @@ ctl_data_submit_done(union ctl_io *io) * If there is an error, though, we don't want to keep processing. * Instead, just send status back to the initiator. */ - if ((io->io_hdr.flags & CTL_FLAG_IO_CONT) - && (((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE) - || ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS))) { + if ((io->io_hdr.flags & CTL_FLAG_IO_CONT) && + (io->io_hdr.flags & CTL_FLAG_ABORT) == 0 && + ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || + (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { io->scsiio.io_cont(io); return; } Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Fri Jul 4 16:10:14 2014 (r268260) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Fri Jul 4 16:11:30 2014 (r268261) @@ -944,8 +944,9 @@ ctl_be_block_cw_done_ws(struct ctl_be_bl io = beio->io; ctl_free_beio(beio); - if (((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE) - && ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS)) { + if ((io->io_hdr.flags & CTL_FLAG_ABORT) || + ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE && + (io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS)) { ctl_config_write_done(io); return; } @@ -1186,8 +1187,9 @@ ctl_be_block_next(struct ctl_be_block_io io = beio->io; be_lun = beio->lun; ctl_free_beio(beio); - if (((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE) - && ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS)) { + if ((io->io_hdr.flags & CTL_FLAG_ABORT) || + ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE && + (io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS)) { ctl_data_submit_done(io); return; } From owner-svn-src-stable@FreeBSD.ORG Fri Jul 4 16:17:16 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4734BB9C; Fri, 4 Jul 2014 16:17:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34160297B; Fri, 4 Jul 2014 16:17:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s64GHGJd041835; Fri, 4 Jul 2014 16:17:16 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s64GHGt4041834; Fri, 4 Jul 2014 16:17:16 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407041617.s64GHGt4041834@svn.freebsd.org> From: Alexander Motin Date: Fri, 4 Jul 2014 16:17:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268262 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jul 2014 16:17:16 -0000 Author: mav Date: Fri Jul 4 16:17:15 2014 New Revision: 268262 URL: http://svnweb.freebsd.org/changeset/base/268262 Log: MFC r267648: serial_num and device_id fields are not necessarily null-terminated. Before this it was impossible to use all 16 bytes of serial number, and client always got serial number NULL-terminated, that is not required. 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.c Fri Jul 4 16:11:30 2014 (r268261) +++ stable/10/usr.sbin/ctld/kernel.c Fri Jul 4 16:17:15 2014 (r268262) @@ -413,13 +413,13 @@ kernel_lun_add(struct lun *lun) req.reqdata.create.device_type = T_DIRECT; if (lun->l_serial != NULL) { - strlcpy(req.reqdata.create.serial_num, lun->l_serial, + strncpy(req.reqdata.create.serial_num, lun->l_serial, sizeof(req.reqdata.create.serial_num)); req.reqdata.create.flags |= CTL_LUN_FLAG_SERIAL_NUM; } if (lun->l_device_id != NULL) { - strlcpy(req.reqdata.create.device_id, lun->l_device_id, + strncpy(req.reqdata.create.device_id, lun->l_device_id, sizeof(req.reqdata.create.device_id)); req.reqdata.create.flags |= CTL_LUN_FLAG_DEVID; } From owner-svn-src-stable@FreeBSD.ORG Fri Jul 4 18:26:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B424AD7; Fri, 4 Jul 2014 18:26:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87F1224E0; Fri, 4 Jul 2014 18:26:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s64IQWac002021; Fri, 4 Jul 2014 18:26:32 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s64IQWRC002020; Fri, 4 Jul 2014 18:26:32 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201407041826.s64IQWRC002020@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 4 Jul 2014 18:26:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268263 - stable/9/sbin/sysctl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jul 2014 18:26:32 -0000 Author: hselasky Date: Fri Jul 4 18:26:32 2014 New Revision: 268263 URL: http://svnweb.freebsd.org/changeset/base/268263 Log: Undo MFC of r267960: This patch cannot be ported as-is to 9-stable. Modified: stable/9/sbin/sysctl/sysctl.c Directory Properties: stable/9/sbin/sysctl/ (props changed) Modified: stable/9/sbin/sysctl/sysctl.c ============================================================================== --- stable/9/sbin/sysctl/sysctl.c Fri Jul 4 16:17:15 2014 (r268262) +++ stable/9/sbin/sysctl/sysctl.c Fri Jul 4 18:26:32 2014 (r268263) @@ -582,10 +582,9 @@ show_var(int *oid, int nlen) warnx("malloc failed"); return (1); } - ctltype = (kind & CTLTYPE); len = j; i = sysctl(oid, nlen, val, &len, 0, 0); - if (i != 0 || (len == 0 && ctltype != CTLTYPE_STRING)) { + if (i || !len) { free(oval); return (1); } @@ -599,6 +598,7 @@ show_var(int *oid, int nlen) fmt = buf; oidfmt(oid, nlen, fmt, &kind); p = val; + ctltype = (kind & CTLTYPE); sign = ctl_sign[ctltype]; intlen = ctl_size[ctltype]; From owner-svn-src-stable@FreeBSD.ORG Sat Jul 5 01:14:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C78AF7F0; Sat, 5 Jul 2014 01:14:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B35D725D8; Sat, 5 Jul 2014 01:14:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s651EEG2005485; Sat, 5 Jul 2014 01:14:14 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s651EEfV005484; Sat, 5 Jul 2014 01:14:14 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407050114.s651EEfV005484@svn.freebsd.org> From: Alexander Motin Date: Sat, 5 Jul 2014 01:14:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268274 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jul 2014 01:14:14 -0000 Author: mav Date: Sat Jul 5 01:14:14 2014 New Revision: 268274 URL: http://svnweb.freebsd.org/changeset/base/268274 Log: MFC r268178: Fix bug in sync control in new "dev" mode of ZVOL (r265678). Don't check ZVOL_WCE flag, used in Solaris to control device "write cache". It is not applicable on FreeBSD and by default set to "disable". Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Fri Jul 4 22:47:07 2014 (r268273) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Sat Jul 5 01:14:14 2014 (r268274) @@ -1628,7 +1628,11 @@ zvol_write(struct cdev *dev, struct uio } #endif +#ifdef sun sync = !(zv->zv_flags & ZVOL_WCE) || +#else + sync = +#endif (zv->zv_objset->os_sync == ZFS_SYNC_ALWAYS); rl = zfs_range_lock(&zv->zv_znode, uio->uio_loffset, uio->uio_resid, From owner-svn-src-stable@FreeBSD.ORG Sat Jul 5 03:48:22 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE1B126F; Sat, 5 Jul 2014 03:48:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CCFF203F; Sat, 5 Jul 2014 03:48:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s653mMCx076024; Sat, 5 Jul 2014 03:48:22 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s653mMcM076023; Sat, 5 Jul 2014 03:48:22 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201407050348.s653mMcM076023@svn.freebsd.org> From: Bryan Venteicher Date: Sat, 5 Jul 2014 03:48:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268281 - stable/10/sys/dev/vmware/vmxnet3 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jul 2014 03:48:22 -0000 Author: bryanv Date: Sat Jul 5 03:48:22 2014 New Revision: 268281 URL: http://svnweb.freebsd.org/changeset/base/268281 Log: MFC r268012, r268196: - Remove some write only variables - Give each interrupt a descriptive name when using MSIX Modified: stable/10/sys/dev/vmware/vmxnet3/if_vmx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vmware/vmxnet3/if_vmx.c ============================================================================== --- stable/10/sys/dev/vmware/vmxnet3/if_vmx.c Sat Jul 5 03:34:52 2014 (r268280) +++ stable/10/sys/dev/vmware/vmxnet3/if_vmx.c Sat Jul 5 03:48:22 2014 (r268281) @@ -692,6 +692,8 @@ vmxnet3_setup_msix_interrupts(struct vmx vmxnet3_txq_intr, txq, &intr->vmxi_handler); if (error) return (error); + bus_describe_intr(dev, intr->vmxi_irq, intr->vmxi_handler, + "tq%d", i); txq->vxtxq_intr_idx = intr->vmxi_rid - 1; } @@ -701,6 +703,8 @@ vmxnet3_setup_msix_interrupts(struct vmx vmxnet3_rxq_intr, rxq, &intr->vmxi_handler); if (error) return (error); + bus_describe_intr(dev, intr->vmxi_irq, intr->vmxi_handler, + "rq%d", i); rxq->vxrxq_intr_idx = intr->vmxi_rid - 1; } @@ -708,6 +712,7 @@ vmxnet3_setup_msix_interrupts(struct vmx vmxnet3_event_intr, sc, &intr->vmxi_handler); if (error) return (error); + bus_describe_intr(dev, intr->vmxi_irq, intr->vmxi_handler, "event"); sc->vmx_event_intr_idx = intr->vmxi_rid - 1; return (0); @@ -2219,12 +2224,10 @@ vmxnet3_legacy_intr(void *xsc) struct vmxnet3_softc *sc; struct vmxnet3_rxqueue *rxq; struct vmxnet3_txqueue *txq; - struct ifnet *ifp; sc = xsc; rxq = &sc->vmx_rxq[0]; txq = &sc->vmx_txq[0]; - ifp = sc->vmx_ifp; if (sc->vmx_intr_type == VMXNET3_IT_LEGACY) { if (vmxnet3_read_bar1(sc, VMXNET3_BAR1_INTR) == 0) @@ -2253,11 +2256,9 @@ vmxnet3_txq_intr(void *xtxq) { struct vmxnet3_softc *sc; struct vmxnet3_txqueue *txq; - struct ifnet *ifp; txq = xtxq; sc = txq->vxtxq_sc; - ifp = sc->vmx_ifp; if (sc->vmx_intr_mask_mode == VMXNET3_IMM_ACTIVE) vmxnet3_disable_intr(sc, txq->vxtxq_intr_idx); @@ -2765,7 +2766,6 @@ static int vmxnet3_txq_encap(struct vmxnet3_txqueue *txq, struct mbuf **m0) { struct vmxnet3_softc *sc; - struct ifnet *ifp; struct vmxnet3_txring *txr; struct vmxnet3_txdesc *txd, *sop; struct mbuf *m; @@ -2774,7 +2774,6 @@ vmxnet3_txq_encap(struct vmxnet3_txqueue int i, gen, nsegs, etype, proto, start, error; sc = txq->vxtxq_sc; - ifp = sc->vmx_ifp; start = 0; txd = NULL; txr = &txq->vxtxq_cmd_ring; From owner-svn-src-stable@FreeBSD.ORG Sun Jul 6 03:31:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 25949ED0; Sun, 6 Jul 2014 03:31:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0912D2AA5; Sun, 6 Jul 2014 03:31:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s663V1sE022531; Sun, 6 Jul 2014 03:31:01 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s663V1V5022529; Sun, 6 Jul 2014 03:31:01 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201407060331.s663V1V5022529@svn.freebsd.org> From: Glen Barber Date: Sun, 6 Jul 2014 03:31:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268305 - stable/10/release/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jul 2014 03:31:02 -0000 Author: gjb Date: Sun Jul 6 03:31:01 2014 New Revision: 268305 URL: http://svnweb.freebsd.org/changeset/base/268305 Log: MFC r268232: The u-boot tarball needed for some boards, BEAGLEBONE for example, explicitly hard-code gcc(1) as the compiler. Partially revert r264703, which did a post-chroot install of gcc(1). This was initially removed because gcc(1) fails to build usr.bin/dtc/ causing the xdev target to fail. So this time, move the gcc(1) installation after xdev is built. This change is likely applicable to stable/10 arm build failures, as well. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/arm/release.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/release/arm/release.sh ============================================================================== --- stable/10/release/arm/release.sh Sat Jul 5 21:50:59 2014 (r268304) +++ stable/10/release/arm/release.sh Sun Jul 6 03:31:01 2014 (r268305) @@ -111,6 +111,9 @@ main() { BATCH=1 FORCE_PKG_REGISTER=1 install clean distclean done + eval chroot ${CHROOTDIR} make -C /usr/src/gnu/usr.bin/cc \ + WITH_GCC=1 ${WORLD_FLAGS} -j1 obj depend all install + mkdir -p ${CHROOTDIR}/tmp/crochet/work before_build install_crochet From owner-svn-src-stable@FreeBSD.ORG Sun Jul 6 17:18:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1ADEC92E; Sun, 6 Jul 2014 17:18:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 06BD222EB; Sun, 6 Jul 2014 17:18:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s66HImIf009104; Sun, 6 Jul 2014 17:18:48 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s66HImHi009103; Sun, 6 Jul 2014 17:18:48 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201407061718.s66HImHi009103@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 6 Jul 2014 17:18:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268323 - stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jul 2014 17:18:49 -0000 Author: pfg Date: Sun Jul 6 17:18:48 2014 New Revision: 268323 URL: http://svnweb.freebsd.org/changeset/base/268323 Log: MFC r268125: Small merges from OpenSolaris: These have no effect on FreeBSD, in fact they are ifdef'ed, but make easier future merges: 6699767 panic in spec_open() 6718877 crgetzoneid() use can cause problems when forking processes with USDT providers in a non global zone Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sun Jul 6 16:42:04 2014 (r268322) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sun Jul 6 17:18:48 2014 (r268323) @@ -11689,7 +11689,8 @@ dtrace_enabling_matchall(void) #if defined(sun) cred_t *cr = enab->dten_vstate->dtvs_state->dts_cred.dcr_cred; - if (INGLOBALZONE(curproc) || getzoneid() == crgetzoneid(cr)) + if (INGLOBALZONE(curproc) || + cr != NULL && getzoneid() == crgetzoneid(cr)) #endif (void) dtrace_enabling_match(enab, NULL); } @@ -15697,7 +15698,8 @@ dtrace_open(struct cdev *dev, int oflags * If this wasn't an open with the "helper" minor, then it must be * the "dtrace" minor. */ - ASSERT(getminor(*devp) == DTRACEMNRN_DTRACE); + if (getminor(*devp) == DTRACEMNRN_DTRACE) + return (ENXIO); #else cred_t *cred_p = NULL; From owner-svn-src-stable@FreeBSD.ORG Sun Jul 6 17:23:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E195BA7; Sun, 6 Jul 2014 17:23:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A4C92394; Sun, 6 Jul 2014 17:23:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s66HNPWs012939; Sun, 6 Jul 2014 17:23:25 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s66HNPOT012938; Sun, 6 Jul 2014 17:23:25 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201407061723.s66HNPOT012938@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 6 Jul 2014 17:23:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268324 - stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jul 2014 17:23:26 -0000 Author: pfg Date: Sun Jul 6 17:23:25 2014 New Revision: 268324 URL: http://svnweb.freebsd.org/changeset/base/268324 Log: MFC r268125: Small merges from OpenSolaris: These have no effect on FreeBSD, in fact they are ifdef'ed, but make easier future merges: 6699767 panic in spec_open() 6718877 crgetzoneid() use can cause problems when forking processes with USDT providers in a non global zone Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sun Jul 6 17:18:48 2014 (r268323) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sun Jul 6 17:23:25 2014 (r268324) @@ -11676,7 +11676,8 @@ dtrace_enabling_matchall(void) #if defined(sun) cred_t *cr = enab->dten_vstate->dtvs_state->dts_cred.dcr_cred; - if (INGLOBALZONE(curproc) || getzoneid() == crgetzoneid(cr)) + if (INGLOBALZONE(curproc) || + cr != NULL && getzoneid() == crgetzoneid(cr)) #endif (void) dtrace_enabling_match(enab, NULL); } @@ -15682,7 +15683,8 @@ dtrace_open(struct cdev *dev, int oflags * If this wasn't an open with the "helper" minor, then it must be * the "dtrace" minor. */ - ASSERT(getminor(*devp) == DTRACEMNRN_DTRACE); + if (getminor(*devp) == DTRACEMNRN_DTRACE) + return (ENXIO); #else cred_t *cred_p = NULL; From owner-svn-src-stable@FreeBSD.ORG Sun Jul 6 17:29:20 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5CFCA17F; Sun, 6 Jul 2014 17:29:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4945D23E7; Sun, 6 Jul 2014 17:29:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s66HTKWx014013; Sun, 6 Jul 2014 17:29:20 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s66HTK4T014012; Sun, 6 Jul 2014 17:29:20 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201407061729.s66HTK4T014012@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 6 Jul 2014 17:29:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268325 - stable/10/usr.bin/sed X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jul 2014 17:29:20 -0000 Author: pfg Date: Sun Jul 6 17:29:19 2014 New Revision: 268325 URL: http://svnweb.freebsd.org/changeset/base/268325 Log: MFC r268193, r268203: Fix sed(1) usage: the -i extension is not an optional. Modified: stable/10/usr.bin/sed/main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/sed/main.c ============================================================================== --- stable/10/usr.bin/sed/main.c Sun Jul 6 17:23:25 2014 (r268324) +++ stable/10/usr.bin/sed/main.c Sun Jul 6 17:29:19 2014 (r268325) @@ -204,8 +204,8 @@ static void usage(void) { (void)fprintf(stderr, - "usage: %s script [-Ealnru] [-i[]] [file ...]\n" - "\t%s [-Ealnu] [-i[]] [-e script] ... [-f script_file]" + "usage: %s script [-Ealnru] [-i extension] [file ...]\n" + "\t%s [-Ealnu] [-i extension] [-e script] ... [-f script_file]" " ... [file ...]\n", getprogname(), getprogname()); exit(1); } From owner-svn-src-stable@FreeBSD.ORG Sun Jul 6 22:47:19 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78049544; Sun, 6 Jul 2014 22:47:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 588182D0B; Sun, 6 Jul 2014 22:47:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s66MlJkk068692; Sun, 6 Jul 2014 22:47:19 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s66MlI8e068689; Sun, 6 Jul 2014 22:47:18 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201407062247.s66MlI8e068689@svn.freebsd.org> From: Mateusz Guzik Date: Sun, 6 Jul 2014 22:47:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268335 - in stable/10/sys: fs/fifofs kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jul 2014 22:47:19 -0000 Author: mjg Date: Sun Jul 6 22:47:18 2014 New Revision: 268335 URL: http://svnweb.freebsd.org/changeset/base/268335 Log: MFC r265206: Ignore the error from pipespace_new when creating a pipe. It can fail if pipe map is exhausted (as a result of too many pipes created), but it is not fatal and could be provoked by unprivileged users. The only consequence is worse performance with given pipe. Modified: stable/10/sys/fs/fifofs/fifo_vnops.c stable/10/sys/kern/sys_pipe.c stable/10/sys/sys/pipe.h Modified: stable/10/sys/fs/fifofs/fifo_vnops.c ============================================================================== --- stable/10/sys/fs/fifofs/fifo_vnops.c Sun Jul 6 22:09:50 2014 (r268334) +++ stable/10/sys/fs/fifofs/fifo_vnops.c Sun Jul 6 22:47:18 2014 (r268335) @@ -146,9 +146,7 @@ fifo_open(ap) if (fp == NULL || (ap->a_mode & FEXEC) != 0) return (EINVAL); if ((fip = vp->v_fifoinfo) == NULL) { - error = pipe_named_ctor(&fpipe, td); - if (error != 0) - return (error); + pipe_named_ctor(&fpipe, td); fip = malloc(sizeof(*fip), M_VNODE, M_WAITOK); fip->fi_pipe = fpipe; fpipe->pipe_wgen = fip->fi_readers = fip->fi_writers = 0; Modified: stable/10/sys/kern/sys_pipe.c ============================================================================== --- stable/10/sys/kern/sys_pipe.c Sun Jul 6 22:09:50 2014 (r268334) +++ stable/10/sys/kern/sys_pipe.c Sun Jul 6 22:47:18 2014 (r268335) @@ -221,8 +221,8 @@ SYSCTL_INT(_kern_ipc, OID_AUTO, piperesi static void pipeinit(void *dummy __unused); static void pipeclose(struct pipe *cpipe); static void pipe_free_kmem(struct pipe *cpipe); -static int pipe_create(struct pipe *pipe, int backing); -static int pipe_paircreate(struct thread *td, struct pipepair **p_pp); +static void pipe_create(struct pipe *pipe, int backing); +static void pipe_paircreate(struct thread *td, struct pipepair **p_pp); static __inline int pipelock(struct pipe *cpipe, int catch); static __inline void pipeunlock(struct pipe *cpipe); #ifndef PIPE_NODIRECT @@ -331,12 +331,11 @@ pipe_zone_fini(void *mem, int size) mtx_destroy(&pp->pp_mtx); } -static int +static void pipe_paircreate(struct thread *td, struct pipepair **p_pp) { struct pipepair *pp; struct pipe *rpipe, *wpipe; - int error; *p_pp = pp = uma_zalloc(pipe_zone, M_WAITOK); #ifdef MAC @@ -355,30 +354,21 @@ pipe_paircreate(struct thread *td, struc knlist_init_mtx(&wpipe->pipe_sel.si_note, PIPE_MTX(wpipe)); /* Only the forward direction pipe is backed by default */ - if ((error = pipe_create(rpipe, 1)) != 0 || - (error = pipe_create(wpipe, 0)) != 0) { - pipeclose(rpipe); - pipeclose(wpipe); - return (error); - } + pipe_create(rpipe, 1); + pipe_create(wpipe, 0); rpipe->pipe_state |= PIPE_DIRECTOK; wpipe->pipe_state |= PIPE_DIRECTOK; - return (0); } -int +void pipe_named_ctor(struct pipe **ppipe, struct thread *td) { struct pipepair *pp; - int error; - error = pipe_paircreate(td, &pp); - if (error != 0) - return (error); + pipe_paircreate(td, &pp); pp->pp_rpipe.pipe_state |= PIPE_NAMED; *ppipe = &pp->pp_rpipe; - return (0); } void @@ -419,9 +409,7 @@ kern_pipe2(struct thread *td, int fildes int fd, fflags, error; fdp = td->td_proc->p_fd; - error = pipe_paircreate(td, &pp); - if (error != 0) - return (error); + pipe_paircreate(td, &pp); rpipe = &pp->pp_rpipe; wpipe = &pp->pp_wpipe; error = falloc(td, &rf, &fd, flags); @@ -642,24 +630,27 @@ pipeselwakeup(cpipe) * Initialize and allocate VM and memory for pipe. The structure * will start out zero'd from the ctor, so we just manage the kmem. */ -static int +static void pipe_create(pipe, backing) struct pipe *pipe; int backing; { - int error; if (backing) { + /* + * Note that these functions can fail if pipe map is exhausted + * (as a result of too many pipes created), but we ignore the + * error as it is not fatal and could be provoked by + * unprivileged users. The only consequence is worse performance + * with given pipe. + */ if (amountpipekva > maxpipekva / 2) - error = pipespace_new(pipe, SMALL_PIPE_SIZE); + (void)pipespace_new(pipe, SMALL_PIPE_SIZE); else - error = pipespace_new(pipe, PIPE_SIZE); - } else { - /* If we're not backing this pipe, no need to do anything. */ - error = 0; + (void)pipespace_new(pipe, PIPE_SIZE); } + pipe->pipe_ino = -1; - return (error); } /* ARGSUSED */ Modified: stable/10/sys/sys/pipe.h ============================================================================== --- stable/10/sys/sys/pipe.h Sun Jul 6 22:09:50 2014 (r268334) +++ stable/10/sys/sys/pipe.h Sun Jul 6 22:47:18 2014 (r268335) @@ -142,6 +142,6 @@ struct pipepair { #define PIPE_LOCK_ASSERT(pipe, type) mtx_assert(PIPE_MTX(pipe), (type)) void pipe_dtor(struct pipe *dpipe); -int pipe_named_ctor(struct pipe **ppipe, struct thread *td); +void pipe_named_ctor(struct pipe **ppipe, struct thread *td); void pipeselwakeup(struct pipe *cpipe); #endif /* !_SYS_PIPE_H_ */ From owner-svn-src-stable@FreeBSD.ORG Sun Jul 6 22:49:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B91376F4; Sun, 6 Jul 2014 22:49:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A64A32D1C; Sun, 6 Jul 2014 22:49:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s66Mn7Fc068993; Sun, 6 Jul 2014 22:49:07 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s66Mn74s068992; Sun, 6 Jul 2014 22:49:07 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201407062249.s66Mn74s068992@svn.freebsd.org> From: Mateusz Guzik Date: Sun, 6 Jul 2014 22:49:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268336 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jul 2014 22:49:07 -0000 Author: mjg Date: Sun Jul 6 22:49:07 2014 New Revision: 268336 URL: http://svnweb.freebsd.org/changeset/base/268336 Log: MFC r265247: Request a non-exiting process in sysctl_kern_proc_{o,}filedesc This fixes a race with exit1 freeing p_textvp. Modified: stable/10/sys/kern/kern_descrip.c Modified: stable/10/sys/kern/kern_descrip.c ============================================================================== --- stable/10/sys/kern/kern_descrip.c Sun Jul 6 22:47:18 2014 (r268335) +++ stable/10/sys/kern/kern_descrip.c Sun Jul 6 22:49:07 2014 (r268336) @@ -3043,7 +3043,7 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLE struct tty *tp; name = (int *)arg1; - error = pget((pid_t)name[0], PGET_CANDEBUG, &p); + error = pget((pid_t)name[0], PGET_CANDEBUG | PGET_NOTWEXIT, &p); if (error != 0) return (error); fdp = fdhold(p); @@ -3540,7 +3540,7 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER name = (int *)arg1; sbuf_new_for_sysctl(&sb, NULL, FILEDESC_SBUF_SIZE, req); - error = pget((pid_t)name[0], PGET_CANDEBUG, &p); + error = pget((pid_t)name[0], PGET_CANDEBUG | PGET_NOTWEXIT, &p); if (error != 0) { sbuf_delete(&sb); return (error); From owner-svn-src-stable@FreeBSD.ORG Sun Jul 6 22:51:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3F37F866; Sun, 6 Jul 2014 22:51:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C0D22D98; Sun, 6 Jul 2014 22:51:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s66MpsiP072547; Sun, 6 Jul 2014 22:51:54 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s66Mpsol072546; Sun, 6 Jul 2014 22:51:54 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201407062251.s66Mpsol072546@svn.freebsd.org> From: Mateusz Guzik Date: Sun, 6 Jul 2014 22:51:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268337 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jul 2014 22:51:54 -0000 Author: mjg Date: Sun Jul 6 22:51:53 2014 New Revision: 268337 URL: http://svnweb.freebsd.org/changeset/base/268337 Log: MFC r267708: do_dup: plug redundant adjustment of fd_lastfile By that time it was already set by fdalloc, or was there in the first place if fd is replaced. Modified: stable/10/sys/kern/kern_descrip.c Modified: stable/10/sys/kern/kern_descrip.c ============================================================================== --- stable/10/sys/kern/kern_descrip.c Sun Jul 6 22:49:07 2014 (r268336) +++ stable/10/sys/kern/kern_descrip.c Sun Jul 6 22:51:53 2014 (r268337) @@ -886,8 +886,6 @@ do_dup(struct thread *td, int flags, int newfde->fde_flags = oldfde->fde_flags | UF_EXCLOSE; else newfde->fde_flags = oldfde->fde_flags & ~UF_EXCLOSE; - if (new > fdp->fd_lastfile) - fdp->fd_lastfile = new; *retval = new; if (delfp != NULL) { From owner-svn-src-stable@FreeBSD.ORG Sun Jul 6 22:54:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 937CBA0E; Sun, 6 Jul 2014 22:54:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 805982DB4; Sun, 6 Jul 2014 22:54:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s66MsI4H072912; Sun, 6 Jul 2014 22:54:18 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s66MsHHv072908; Sun, 6 Jul 2014 22:54:17 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201407062254.s66MsHHv072908@svn.freebsd.org> From: Mateusz Guzik Date: Sun, 6 Jul 2014 22:54:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268338 - in stable/10/sys: kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jul 2014 22:54:18 -0000 Author: mjg Date: Sun Jul 6 22:54:17 2014 New Revision: 268338 URL: http://svnweb.freebsd.org/changeset/base/268338 Log: MFC r267710: fd: replace fd_nfiles with fd_lastfile where appropriate fd_lastfile is guaranteed to be the biggest open fd, so when the intent is to iterate over active fds or lookup one, there is no point in looking beyond that limit. Few places are left unpatched for now. Modified: stable/10/sys/kern/kern_descrip.c stable/10/sys/kern/sys_generic.c stable/10/sys/kern/vfs_syscalls.c stable/10/sys/sys/filedesc.h Modified: stable/10/sys/kern/kern_descrip.c ============================================================================== --- stable/10/sys/kern/kern_descrip.c Sun Jul 6 22:51:53 2014 (r268337) +++ stable/10/sys/kern/kern_descrip.c Sun Jul 6 22:54:17 2014 (r268338) @@ -1235,7 +1235,7 @@ sys_closefrom(struct thread *td, struct if (uap->lowfd < 0) uap->lowfd = 0; FILEDESC_SLOCK(fdp); - for (fd = uap->lowfd; fd < fdp->fd_nfiles; fd++) { + for (fd = uap->lowfd; fd <= fdp->fd_lastfile; fd++) { if (fdp->fd_ofiles[fd].fde_file != NULL) { FILEDESC_SUNLOCK(fdp); (void)kern_close(td, fd); @@ -2949,7 +2949,7 @@ sysctl_kern_file(SYSCTL_HANDLER_ARGS) if (fdp == NULL) continue; FILEDESC_SLOCK(fdp); - for (n = 0; fdp->fd_refcnt > 0 && n < fdp->fd_nfiles; ++n) { + for (n = 0; fdp->fd_refcnt > 0 && n <= fdp->fd_lastfile; ++n) { if ((fp = fdp->fd_ofiles[n].fde_file) == NULL) continue; xf.xf_fd = n; @@ -3059,7 +3059,7 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLE if (fdp->fd_jdir != NULL) export_vnode_for_osysctl(fdp->fd_jdir, KF_FD_TYPE_JAIL, kif, fdp, req); - for (i = 0; fdp->fd_refcnt > 0 && i < fdp->fd_nfiles; i++) { + for (i = 0; fdp->fd_refcnt > 0 && i <= fdp->fd_lastfile; i++) { if ((fp = fdp->fd_ofiles[i].fde_file) == NULL) continue; bzero(kif, sizeof(*kif)); @@ -3430,7 +3430,7 @@ kern_proc_filedesc_out(struct proc *p, export_fd_to_sb(data, KF_TYPE_VNODE, KF_FD_TYPE_JAIL, FREAD, -1, -1, NULL, efbuf); } - for (i = 0; fdp->fd_refcnt > 0 && i < fdp->fd_nfiles; i++) { + for (i = 0; fdp->fd_refcnt > 0 && i <= fdp->fd_lastfile; i++) { if ((fp = fdp->fd_ofiles[i].fde_file) == NULL) continue; data = NULL; @@ -3803,7 +3803,7 @@ file_to_first_proc(struct file *fp) fdp = p->p_fd; if (fdp == NULL) continue; - for (n = 0; n < fdp->fd_nfiles; n++) { + for (n = 0; n <= fdp->fd_lastfile; n++) { if (fp == fdp->fd_ofiles[n].fde_file) return (p); } @@ -3853,7 +3853,7 @@ DB_SHOW_COMMAND(files, db_show_files) continue; if ((fdp = p->p_fd) == NULL) continue; - for (n = 0; n < fdp->fd_nfiles; ++n) { + for (n = 0; n <= fdp->fd_lastfile; ++n) { if ((fp = fdp->fd_ofiles[n].fde_file) == NULL) continue; db_print_file(fp, header); Modified: stable/10/sys/kern/sys_generic.c ============================================================================== --- stable/10/sys/kern/sys_generic.c Sun Jul 6 22:51:53 2014 (r268337) +++ stable/10/sys/kern/sys_generic.c Sun Jul 6 22:54:17 2014 (r268338) @@ -1458,7 +1458,7 @@ pollscan(td, fds, nfd) FILEDESC_SLOCK(fdp); for (i = 0; i < nfd; i++, fds++) { - if (fds->fd >= fdp->fd_nfiles) { + if (fds->fd > fdp->fd_lastfile) { fds->revents = POLLNVAL; n++; } else if (fds->fd < 0) { Modified: stable/10/sys/kern/vfs_syscalls.c ============================================================================== --- stable/10/sys/kern/vfs_syscalls.c Sun Jul 6 22:51:53 2014 (r268337) +++ stable/10/sys/kern/vfs_syscalls.c Sun Jul 6 22:54:17 2014 (r268338) @@ -829,7 +829,7 @@ chroot_refuse_vdir_fds(fdp) FILEDESC_LOCK_ASSERT(fdp); - for (fd = 0; fd < fdp->fd_nfiles ; fd++) { + for (fd = 0; fd <= fdp->fd_lastfile; fd++) { fp = fget_locked(fdp, fd); if (fp == NULL) continue; Modified: stable/10/sys/sys/filedesc.h ============================================================================== --- stable/10/sys/sys/filedesc.h Sun Jul 6 22:51:53 2014 (r268337) +++ stable/10/sys/sys/filedesc.h Sun Jul 6 22:54:17 2014 (r268338) @@ -176,7 +176,7 @@ fget_locked(struct filedesc *fdp, int fd FILEDESC_LOCK_ASSERT(fdp); - if (fd < 0 || fd >= fdp->fd_nfiles) + if (fd < 0 || fd > fdp->fd_lastfile) return (NULL); return (fdp->fd_ofiles[fd].fde_file); From owner-svn-src-stable@FreeBSD.ORG Sun Jul 6 22:56:35 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C900B58; Sun, 6 Jul 2014 22:56:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 396902DCB; Sun, 6 Jul 2014 22:56:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s66MuZlV073324; Sun, 6 Jul 2014 22:56:35 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s66MuZ2F073323; Sun, 6 Jul 2014 22:56:35 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201407062256.s66MuZ2F073323@svn.freebsd.org> From: Mateusz Guzik Date: Sun, 6 Jul 2014 22:56:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268339 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jul 2014 22:56:35 -0000 Author: mjg Date: Sun Jul 6 22:56:34 2014 New Revision: 268339 URL: http://svnweb.freebsd.org/changeset/base/268339 Log: MFC r267755: Don't take filedesc lock in fdunshare(). We can read refcnt safely and only care if it is equal to 1. If it could suddenly change from 1 to something bigger the code would be buggy even in the previous form and transitions from > 1 to 1 are equally racy and harmless (we copy even though there is no need). Modified: stable/10/sys/kern/kern_descrip.c Modified: stable/10/sys/kern/kern_descrip.c ============================================================================== --- stable/10/sys/kern/kern_descrip.c Sun Jul 6 22:54:17 2014 (r268338) +++ stable/10/sys/kern/kern_descrip.c Sun Jul 6 22:56:34 2014 (r268339) @@ -1885,17 +1885,14 @@ fdshare(struct filedesc *fdp) void fdunshare(struct proc *p, struct thread *td) { + struct filedesc *tmp; - FILEDESC_XLOCK(p->p_fd); - if (p->p_fd->fd_refcnt > 1) { - struct filedesc *tmp; - - FILEDESC_XUNLOCK(p->p_fd); - tmp = fdcopy(p->p_fd); - fdescfree(td); - p->p_fd = tmp; - } else - FILEDESC_XUNLOCK(p->p_fd); + if (p->p_fd->fd_refcnt == 1) + return; + + tmp = fdcopy(p->p_fd); + fdescfree(td); + p->p_fd = tmp; } /* From owner-svn-src-stable@FreeBSD.ORG Sun Jul 6 22:58:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE0D3C9E; Sun, 6 Jul 2014 22:58:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9116F2DD5; Sun, 6 Jul 2014 22:58:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s66MwrQb073692; Sun, 6 Jul 2014 22:58:53 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s66MwrnL073691; Sun, 6 Jul 2014 22:58:53 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201407062258.s66MwrnL073691@svn.freebsd.org> From: Mateusz Guzik Date: Sun, 6 Jul 2014 22:58:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268340 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jul 2014 22:58:53 -0000 Author: mjg Date: Sun Jul 6 22:58:53 2014 New Revision: 268340 URL: http://svnweb.freebsd.org/changeset/base/268340 Log: MFC r267760: Tidy up fd-related functions called by do_execve o assert in each one that fdp is not shared o remove unnecessary NULL checks - all userspace processes have fdtables and kernel processes cannot execve o remove comments about the danger of fd_ofiles getting reallocated - fdtable is not shared and fd_ofiles could be only reallocated if new fd was about to be added, but if that was possible the code would already be buggy as setugidsafety work could be undone Modified: stable/10/sys/kern/kern_descrip.c Modified: stable/10/sys/kern/kern_descrip.c ============================================================================== --- stable/10/sys/kern/kern_descrip.c Sun Jul 6 22:56:34 2014 (r268339) +++ stable/10/sys/kern/kern_descrip.c Sun Jul 6 22:58:53 2014 (r268340) @@ -2114,15 +2114,8 @@ setugidsafety(struct thread *td) struct file *fp; int i; - /* Certain daemons might not have file descriptors. */ fdp = td->td_proc->p_fd; - if (fdp == NULL) - return; - - /* - * Note: fdp->fd_ofiles may be reallocated out from under us while - * we are blocked in a close. Be careful! - */ + KASSERT(fdp->fd_refcnt == 1, ("the fdtable should not be shared")); FILEDESC_XLOCK(fdp); for (i = 0; i <= fdp->fd_lastfile; i++) { if (i > 2) @@ -2174,15 +2167,8 @@ fdcloseexec(struct thread *td) struct file *fp; int i; - /* Certain daemons might not have file descriptors. */ fdp = td->td_proc->p_fd; - if (fdp == NULL) - return; - - /* - * We cannot cache fd_ofiles since operations - * may block and rip them out from under us. - */ + KASSERT(fdp->fd_refcnt == 1, ("the fdtable should not be shared")); FILEDESC_XLOCK(fdp); for (i = 0; i <= fdp->fd_lastfile; i++) { fde = &fdp->fd_ofiles[i]; @@ -2213,8 +2199,6 @@ fdcheckstd(struct thread *td) int i, error, devnull; fdp = td->td_proc->p_fd; - if (fdp == NULL) - return (0); KASSERT(fdp->fd_refcnt == 1, ("the fdtable should not be shared")); devnull = -1; error = 0; From owner-svn-src-stable@FreeBSD.ORG Sun Jul 6 23:01:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EA74DDF; Sun, 6 Jul 2014 23:01:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B83D2DE6; Sun, 6 Jul 2014 23:01:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s66N1ULq076827; Sun, 6 Jul 2014 23:01:30 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s66N1US8076826; Sun, 6 Jul 2014 23:01:30 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201407062301.s66N1US8076826@svn.freebsd.org> From: Mateusz Guzik Date: Sun, 6 Jul 2014 23:01:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268341 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jul 2014 23:01:30 -0000 Author: mjg Date: Sun Jul 6 23:01:29 2014 New Revision: 268341 URL: http://svnweb.freebsd.org/changeset/base/268341 Log: MFC r267947: Check lower bound of cmsg_len. If passed cm->cmsg_len was below cmsghdr size the experssion: datalen = (caddr_t)cm + cm->cmsg_len - (caddr_t)data; would give negative result. However, in practice it would not result in a crash because the kernel would try to obtain garbage fds for given process and would error out with EBADF. PR: 124908 Submitted by: campbell mumble.net (modified a little) Modified: stable/10/sys/kern/uipc_usrreq.c Modified: stable/10/sys/kern/uipc_usrreq.c ============================================================================== --- stable/10/sys/kern/uipc_usrreq.c Sun Jul 6 22:58:53 2014 (r268340) +++ stable/10/sys/kern/uipc_usrreq.c Sun Jul 6 23:01:29 2014 (r268341) @@ -1859,7 +1859,7 @@ unp_internalize(struct mbuf **controlp, *controlp = NULL; while (cm != NULL) { if (sizeof(*cm) > clen || cm->cmsg_level != SOL_SOCKET - || cm->cmsg_len > clen) { + || cm->cmsg_len > clen || cm->cmsg_len < sizeof(*cm)) { error = EINVAL; goto out; } From owner-svn-src-stable@FreeBSD.ORG Sun Jul 6 23:17:21 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF5B84B4; Sun, 6 Jul 2014 23:17:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92C952F41; Sun, 6 Jul 2014 23:17:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s66NHLsN083248; Sun, 6 Jul 2014 23:17:21 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s66NHLNk083247; Sun, 6 Jul 2014 23:17:21 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201407062317.s66NHLNk083247@svn.freebsd.org> From: Mateusz Guzik Date: Sun, 6 Jul 2014 23:17:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268343 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jul 2014 23:17:21 -0000 Author: mjg Date: Sun Jul 6 23:17:21 2014 New Revision: 268343 URL: http://svnweb.freebsd.org/changeset/base/268343 Log: Add mergeinfo missed in r268335-r268341 Prodded by: gjb Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Sun Jul 6 23:20:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 599FE60F; Sun, 6 Jul 2014 23:20:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4664A2FBA; Sun, 6 Jul 2014 23:20:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s66NKnFm086438; Sun, 6 Jul 2014 23:20:49 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s66NKnce086437; Sun, 6 Jul 2014 23:20:49 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201407062320.s66NKnce086437@svn.freebsd.org> From: Mateusz Guzik Date: Sun, 6 Jul 2014 23:20:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268344 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jul 2014 23:20:49 -0000 Author: mjg Date: Sun Jul 6 23:20:48 2014 New Revision: 268344 URL: http://svnweb.freebsd.org/changeset/base/268344 Log: MFC r268000: Make sure to always clear p_fd for process getting rid of its filetable. Filetable can be shared with other processes. Previous code failed to clear the pointer for all but the last process getting rid of the table. This is mostly cosmetics. Get rid of 'This should happen earlier' comment. Clearing the pointer in this place is fine as consumers can reliably check for files availability by inspecting fd_refcnt and vnodes availabity by NULL-checking them. Modified: stable/10/sys/kern/kern_descrip.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_descrip.c ============================================================================== --- stable/10/sys/kern/kern_descrip.c Sun Jul 6 23:17:21 2014 (r268343) +++ stable/10/sys/kern/kern_descrip.c Sun Jul 6 23:20:48 2014 (r268344) @@ -2036,6 +2036,11 @@ fdescfree(struct thread *td) if (fdtol != NULL) free(fdtol, M_FILEDESC_TO_LEADER); } + + mtx_lock(&fdesc_mtx); + td->td_proc->p_fd = NULL; + mtx_unlock(&fdesc_mtx); + FILEDESC_XLOCK(fdp); i = --fdp->fd_refcnt; FILEDESC_XUNLOCK(fdp); @@ -2053,11 +2058,6 @@ fdescfree(struct thread *td) } FILEDESC_XLOCK(fdp); - /* XXX This should happen earlier. */ - mtx_lock(&fdesc_mtx); - td->td_proc->p_fd = NULL; - mtx_unlock(&fdesc_mtx); - if (fdp->fd_nfiles > NDFILE) free(fdp->fd_ofiles, M_FILEDESC); if (NDSLOTS(fdp->fd_nfiles) > NDSLOTS(NDFILE)) From owner-svn-src-stable@FreeBSD.ORG Sun Jul 6 23:23:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A8EB764; Sun, 6 Jul 2014 23:23:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D5502FD3; Sun, 6 Jul 2014 23:23:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s66NN2Jr087255; Sun, 6 Jul 2014 23:23:02 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s66NN2JX087250; Sun, 6 Jul 2014 23:23:02 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201407062323.s66NN2JX087250@svn.freebsd.org> From: Mateusz Guzik Date: Sun, 6 Jul 2014 23:23:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268345 - in stable/10/sys: kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jul 2014 23:23:03 -0000 Author: mjg Date: Sun Jul 6 23:23:01 2014 New Revision: 268345 URL: http://svnweb.freebsd.org/changeset/base/268345 Log: MFC r268001: Make fdunshare accept only td parameter. Proc had to match the thread anyway and 2 parameters were inconsistent with the rest. Modified: stable/10/sys/kern/kern_descrip.c stable/10/sys/kern/kern_exec.c stable/10/sys/kern/kern_fork.c stable/10/sys/sys/filedesc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_descrip.c ============================================================================== --- stable/10/sys/kern/kern_descrip.c Sun Jul 6 23:20:48 2014 (r268344) +++ stable/10/sys/kern/kern_descrip.c Sun Jul 6 23:23:01 2014 (r268345) @@ -1883,9 +1883,10 @@ fdshare(struct filedesc *fdp) * Unshare a filedesc structure, if necessary by making a copy */ void -fdunshare(struct proc *p, struct thread *td) +fdunshare(struct thread *td) { struct filedesc *tmp; + struct proc *p = td->td_proc; if (p->p_fd->fd_refcnt == 1) return; Modified: stable/10/sys/kern/kern_exec.c ============================================================================== --- stable/10/sys/kern/kern_exec.c Sun Jul 6 23:20:48 2014 (r268344) +++ stable/10/sys/kern/kern_exec.c Sun Jul 6 23:23:01 2014 (r268345) @@ -597,7 +597,7 @@ interpret: * For security and other reasons, the file descriptor table cannot * be shared after an exec. */ - fdunshare(p, td); + fdunshare(td); /* * Malloc things before we need locks. Modified: stable/10/sys/kern/kern_fork.c ============================================================================== --- stable/10/sys/kern/kern_fork.c Sun Jul 6 23:20:48 2014 (r268344) +++ stable/10/sys/kern/kern_fork.c Sun Jul 6 23:23:01 2014 (r268345) @@ -347,8 +347,8 @@ fork_norfproc(struct thread *td, int fla /* * Unshare file descriptors (from parent). */ - if (flags & RFFDG) - fdunshare(p1, td); + if (flags & RFFDG) + fdunshare(td); fail: if (((p1->p_flag & (P_HADTHREADS|P_SYSTEM)) == P_HADTHREADS) && Modified: stable/10/sys/sys/filedesc.h ============================================================================== --- stable/10/sys/sys/filedesc.h Sun Jul 6 23:20:48 2014 (r268344) +++ stable/10/sys/sys/filedesc.h Sun Jul 6 23:23:01 2014 (r268345) @@ -153,7 +153,7 @@ int fdcheckstd(struct thread *td); void fdclose(struct filedesc *fdp, struct file *fp, int idx, struct thread *td); void fdcloseexec(struct thread *td); struct filedesc *fdcopy(struct filedesc *fdp); -void fdunshare(struct proc *p, struct thread *td); +void fdunshare(struct thread *td); void fdescfree(struct thread *td); struct filedesc *fdinit(struct filedesc *fdp); struct filedesc *fdshare(struct filedesc *fdp); From owner-svn-src-stable@FreeBSD.ORG Sun Jul 6 23:24:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D4188A1; Sun, 6 Jul 2014 23:24:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79C8C2FE1; Sun, 6 Jul 2014 23:24:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s66NO77c087455; Sun, 6 Jul 2014 23:24:07 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s66NO6Hl087451; Sun, 6 Jul 2014 23:24:06 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201407062324.s66NO6Hl087451@svn.freebsd.org> From: Baptiste Daroussin Date: Sun, 6 Jul 2014 23:24:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268346 - stable/10/usr.sbin/pw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jul 2014 23:24:07 -0000 Author: bapt Date: Sun Jul 6 23:24:06 2014 New Revision: 268346 URL: http://svnweb.freebsd.org/changeset/base/268346 Log: MFH: r264781, r267669, r267670 Simplify reading pw.conf(5) by using getline(3) Removed compatibility with pre FreeBSD 2.2 pw_mkdb command [1] Fix some broken indentattion [1] Fix changing the username [2] PR: 189172 [1], 189173 [2] Submitted by: fullermd@over-yonder.net [1][2] Modified: stable/10/usr.sbin/pw/pw.h stable/10/usr.sbin/pw/pw_conf.c stable/10/usr.sbin/pw/pwupd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pw/pw.h ============================================================================== --- stable/10/usr.sbin/pw/pw.h Sun Jul 6 23:23:01 2014 (r268345) +++ stable/10/usr.sbin/pw/pw.h Sun Jul 6 23:24:06 2014 (r268346) @@ -26,6 +26,7 @@ * $FreeBSD$ */ +#define _WITH_GETLINE #include #include #include Modified: stable/10/usr.sbin/pw/pw_conf.c ============================================================================== --- stable/10/usr.sbin/pw/pw_conf.c Sun Jul 6 23:23:01 2014 (r268345) +++ stable/10/usr.sbin/pw/pw_conf.c Sun Jul 6 23:24:06 2014 (r268346) @@ -226,35 +226,21 @@ newstr(char const * p) struct userconf * read_userconfig(char const * file) { - FILE *fp; + FILE *fp; + char *buf, *p; + size_t linecap; + ssize_t linelen; + + buf = NULL; + linecap = 0; extendarray(&config.groups, &config.numgroups, 200); memset(config.groups, 0, config.numgroups * sizeof(char *)); if (file == NULL) file = _PATH_PW_CONF; - if ((fp = fopen(file, "r")) != NULL) { - int buflen = LNBUFSZ; - char *buf = malloc(buflen); - - nextline: - while (fgets(buf, buflen, fp) != NULL) { - char *p; - - while ((p = strchr(buf, '\n')) == NULL) { - int l; - if (extendline(&buf, &buflen, buflen + LNBUFSZ) == -1) { - int ch; - while ((ch = fgetc(fp)) != '\n' && ch != EOF); - goto nextline; /* Ignore it */ - } - l = strlen(buf); - if (fgets(buf + l, buflen - l, fp) == NULL) - break; /* Unterminated last line */ - } - - if (p != NULL) - *p = '\0'; + if ((fp = fopen(file, "r")) != NULL) { + while ((linelen = getline(&buf, &linecap, fp)) > 0) { if (*buf && (p = strtok(buf, " \t\r\n=")) != NULL && *p != '#') { static char const toks[] = " \t\r\n,="; char *q = strtok(NULL, toks); @@ -368,7 +354,8 @@ read_userconfig(char const * file) } } } - free(buf); + if (linecap > 0) + free(buf); fclose(fp); } return &config; Modified: stable/10/usr.sbin/pw/pwupd.c ============================================================================== --- stable/10/usr.sbin/pw/pwupd.c Sun Jul 6 23:23:01 2014 (r268345) +++ stable/10/usr.sbin/pw/pwupd.c Sun Jul 6 23:24:06 2014 (r268346) @@ -45,9 +45,6 @@ static const char rcsid[] = #include "pwupd.h" -#define HAVE_PWDB_C 1 -#define HAVE_PWDB_U 1 - static char pathpwd[] = _PATH_PWD; static char * pwpath = pathpwd; @@ -112,22 +109,14 @@ pw_update(struct passwd * pwd, char cons { int rc = 0; - /* - * First, let's check the see if the database is alright - * Note: -C is only available in FreeBSD 2.2 and above - */ -#ifdef HAVE_PWDB_C rc = pwdb("-C", (char *)NULL); /* Check only */ if (rc == 0) { -#else - { /* No -C */ -#endif int pfd, tfd; struct passwd *pw = NULL; struct passwd *old_pw = NULL; - if (pwd != NULL) - pw = pw_dup(pwd); + if (pwd != NULL) + pw = pw_dup(pwd); if (user != NULL) old_pw = GETPWNAM(user); @@ -150,7 +139,7 @@ pw_update(struct passwd * pwd, char cons * in case of deletion of a user, the whole database * needs to be regenerated */ - if (pw_mkdb(pw != NULL ? user : NULL) == -1) { + if (pw_mkdb(pw != NULL ? pw->pw_name : NULL) == -1) { pw_fini(); err(1, "pw_mkdb()"); } From owner-svn-src-stable@FreeBSD.ORG Sun Jul 6 23:27:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 729E3B0D; Sun, 6 Jul 2014 23:27:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5FD992034; Sun, 6 Jul 2014 23:27:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s66NREsc088017; Sun, 6 Jul 2014 23:27:14 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s66NREiZ088016; Sun, 6 Jul 2014 23:27:14 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201407062327.s66NREiZ088016@svn.freebsd.org> From: Mateusz Guzik Date: Sun, 6 Jul 2014 23:27:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268348 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jul 2014 23:27:14 -0000 Author: mjg Date: Sun Jul 6 23:27:13 2014 New Revision: 268348 URL: http://svnweb.freebsd.org/changeset/base/268348 Log: MFC r268002: Call fdcloseexec right after fdunshare. No functional changes. Modified: stable/10/sys/kern/kern_exec.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_exec.c ============================================================================== --- stable/10/sys/kern/kern_exec.c Sun Jul 6 23:26:34 2014 (r268347) +++ stable/10/sys/kern/kern_exec.c Sun Jul 6 23:27:13 2014 (r268348) @@ -598,6 +598,8 @@ interpret: * be shared after an exec. */ fdunshare(td); + /* close files on exec */ + fdcloseexec(td); /* * Malloc things before we need locks. @@ -611,8 +613,6 @@ interpret: bcopy(imgp->args->begin_argv, newargs->ar_args, i); } - /* close files on exec */ - fdcloseexec(td); vn_lock(imgp->vp, LK_SHARED | LK_RETRY); /* Get a reference to the vnode prior to locking the proc */ From owner-svn-src-stable@FreeBSD.ORG Mon Jul 7 02:47:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B912267; Mon, 7 Jul 2014 02:47:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 476532E67; Mon, 7 Jul 2014 02:47:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s672lg0U079845; Mon, 7 Jul 2014 02:47:42 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s672lfMx079842; Mon, 7 Jul 2014 02:47:41 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201407070247.s672lfMx079842@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Mon, 7 Jul 2014 02:47:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268352 - stable/10/lib/libc/stdlib X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jul 2014 02:47:42 -0000 Author: pfg Date: Mon Jul 7 02:47:41 2014 New Revision: 268352 URL: http://svnweb.freebsd.org/changeset/base/268352 Log: MFC r267745, r268268: getopt(3): recognize option:: as GNU extension for "optional options". Also ANSIfy a function declaration. While here update the OpenBSD patch level in getopt_long.c as we already have the corresponding change. Obtained from: NetBSD MFC after: 2 weeks Modified: stable/10/lib/libc/stdlib/getopt.3 stable/10/lib/libc/stdlib/getopt.c stable/10/lib/libc/stdlib/getopt_long.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdlib/getopt.3 ============================================================================== --- stable/10/lib/libc/stdlib/getopt.3 Mon Jul 7 00:27:09 2014 (r268351) +++ stable/10/lib/libc/stdlib/getopt.3 Mon Jul 7 02:47:41 2014 (r268352) @@ -1,4 +1,4 @@ -.\" $NetBSD: getopt.3,v 1.31 2003/09/23 10:26:54 wiz Exp $ +.\" $NetBSD: getopt.3,v 1.34 2014/06/05 22:09:50 wiz Exp $ .\" .\" Copyright (c) 1988, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -30,7 +30,7 @@ .\" @(#)getopt.3 8.5 (Berkeley) 4/27/95 .\" $FreeBSD$ .\" -.Dd April 27, 1995 +.Dd June 5, 2014 .Dt GETOPT 3 .Os .Sh NAME @@ -65,6 +65,17 @@ The option string may contain the following elements: individual characters, and characters followed by a colon to indicate an option argument is to follow. +If an individual character is followed by two colons, then the +option argument is optional; +.Va optarg +is set to the rest of the current +.Va argv +word, or +.Dv NULL +if there were no more characters in the current word. +This is a +.It Tn GNU +extension. For example, an option string .Li \&"x" recognizes an option Modified: stable/10/lib/libc/stdlib/getopt.c ============================================================================== --- stable/10/lib/libc/stdlib/getopt.c Mon Jul 7 00:27:09 2014 (r268351) +++ stable/10/lib/libc/stdlib/getopt.c Mon Jul 7 02:47:41 2014 (r268352) @@ -1,4 +1,4 @@ -/* $NetBSD: getopt.c,v 1.26 2003/08/07 16:43:40 agc Exp $ */ +/* $NetBSD: getopt.c,v 1.29 2014/06/05 22:00:22 christos Exp $ */ /* * Copyright (c) 1987, 1993, 1994 @@ -59,10 +59,7 @@ char *optarg; /* argument associated wi * Parse argc/argv argument vector. */ int -getopt(nargc, nargv, ostr) - int nargc; - char * const nargv[]; - const char *ostr; +getopt(int nargc, char * const nargv[], const char *ostr) { static char *place = EMSG; /* option letter processing */ char *oli; /* option letter list index */ @@ -115,6 +112,12 @@ getopt(nargc, nargv, ostr) entire next argument. */ if (*place) optarg = place; + else if (oli[2] == ':') + /* + * GNU Extension, for optional arguments if the rest of + * the argument is empty, we return NULL + */ + optarg = NULL; else if (nargc > ++optind) optarg = nargv[optind]; else { Modified: stable/10/lib/libc/stdlib/getopt_long.c ============================================================================== --- stable/10/lib/libc/stdlib/getopt_long.c Mon Jul 7 00:27:09 2014 (r268351) +++ stable/10/lib/libc/stdlib/getopt_long.c Mon Jul 7 02:47:41 2014 (r268352) @@ -1,4 +1,4 @@ -/* $OpenBSD: getopt_long.c,v 1.22 2006/10/04 21:29:04 jmc Exp $ */ +/* $OpenBSD: getopt_long.c,v 1.23 2007/10/31 12:34:57 chl Exp $ */ /* $NetBSD: getopt_long.c,v 1.15 2002/01/31 22:43:40 tv Exp $ */ /* From owner-svn-src-stable@FreeBSD.ORG Mon Jul 7 05:31:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6EE21A16; Mon, 7 Jul 2014 05:31:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41E1A2AF0; Mon, 7 Jul 2014 05:31:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s675VpxH055483; Mon, 7 Jul 2014 05:31:51 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s675Vpmv055482; Mon, 7 Jul 2014 05:31:51 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201407070531.s675Vpmv055482@svn.freebsd.org> From: "Andrey A. Chernov" Date: Mon, 7 Jul 2014 05:31:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268355 - stable/10/lib/libc/stdlib X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jul 2014 05:31:51 -0000 Author: ache Date: Mon Jul 7 05:31:50 2014 New Revision: 268355 URL: http://svnweb.freebsd.org/changeset/base/268355 Log: MFC 267756: Merge intermediate OpenBSD v1.25 changes (almost identical to ours) to reduce diff and bump OpenBSD patch level to v1.26. Modified: stable/10/lib/libc/stdlib/getopt_long.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdlib/getopt_long.c ============================================================================== --- stable/10/lib/libc/stdlib/getopt_long.c Mon Jul 7 05:17:16 2014 (r268354) +++ stable/10/lib/libc/stdlib/getopt_long.c Mon Jul 7 05:31:50 2014 (r268355) @@ -1,4 +1,4 @@ -/* $OpenBSD: getopt_long.c,v 1.23 2007/10/31 12:34:57 chl Exp $ */ +/* $OpenBSD: getopt_long.c,v 1.26 2013/06/08 22:47:56 millert Exp $ */ /* $NetBSD: getopt_long.c,v 1.15 2002/01/31 22:43:40 tv Exp $ */ /* @@ -248,7 +248,7 @@ parse_long_options(char * const *nargv, if (short_too && current_argv_len == 1) continue; - if (match == -1) /* first partial match */ + if (match == -1) /* first partial match */ match = i; else if ((flags & FLAG_LONGONLY) || long_options[i].has_arg != @@ -359,37 +359,31 @@ getopt_internal(int nargc, char * const { char *oli; /* option letter list index */ int optchar, short_too; - int posixly_correct; /* no static, can be changed on the fly */ + static int posixly_correct = -1; if (options == NULL) return (-1); /* + * XXX Some GNU programs (like cvs) set optind to 0 instead of + * XXX using optreset. Work around this braindamage. + */ + if (optind == 0) + optind = optreset = 1; + + /* * Disable GNU extensions if POSIXLY_CORRECT is set or options * string begins with a '+'. */ - posixly_correct = (getenv("POSIXLY_CORRECT") != NULL); -#ifdef GNU_COMPATIBLE + if (posixly_correct == -1 || optreset) + posixly_correct = (getenv("POSIXLY_CORRECT") != NULL); if (*options == '-') flags |= FLAG_ALLARGS; else if (posixly_correct || *options == '+') flags &= ~FLAG_PERMUTE; -#else - if (posixly_correct || *options == '+') - flags &= ~FLAG_PERMUTE; - else if (*options == '-') - flags |= FLAG_ALLARGS; -#endif if (*options == '+' || *options == '-') options++; - /* - * XXX Some GNU programs (like cvs) set optind to 0 instead of - * XXX using optreset. Work around this braindamage. - */ - if (optind == 0) - optind = optreset = 1; - optarg = NULL; if (optreset) nonopt_start = nonopt_end = -1; From owner-svn-src-stable@FreeBSD.ORG Mon Jul 7 14:16:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE631B0C; Mon, 7 Jul 2014 14:16:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D723F2A0E; Mon, 7 Jul 2014 14:16:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s67EG7GN005662; Mon, 7 Jul 2014 14:16:07 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s67EG6qV005651; Mon, 7 Jul 2014 14:16:06 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201407071416.s67EG6qV005651@svn.freebsd.org> From: Aleksandr Rybalko Date: Mon, 7 Jul 2014 14:16:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268366 - in stable/10: share/man/man4 sys/amd64/conf sys/conf sys/dev/syscons sys/dev/vt sys/dev/vt/hw/vga sys/i386/conf sys/kern sys/sys usr.sbin/kbdcontrol usr.sbin/vidcontrol X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jul 2014 14:16:08 -0000 Author: ray Date: Mon Jul 7 14:16:05 2014 New Revision: 268366 URL: http://svnweb.freebsd.org/changeset/base/268366 Log: 267622 Log: Rename vt(4) vga module to dismiss interference with syscons(4) vga module. 267623 Log: Remove stale link to deleted vt(4) xboxfb driver. 267624 Log: syscons(4) and vt(4) can be built together now. 267625 Log: Allow to disable syscons(4) if "hw.syscons.disable" kenv is set. 267626 Log: Suspend vt(4) initialization if "kern.vt.disable" kenv is set. 267965 by emaste@ Log: Use a common tunable to choose between vt(4)/sc(4) With this change and previous work from ray@ it will be possible to put both in GENERIC, and have one enabled by default, but allow the other to be selected via the loader. (The previous implementation had separate kern.vt.disable and hw.syscons.disable tunables, and would panic if both drivers were compiled in and neither was explicitly disabled.) 268175 by emaste@ Log: Fix vt(4) detection in kbdcontrol and vidcontrol As sc(4) and vt(4) coexist and are both enabled in GENERIC, the existence of a vt(4) sysctl is not sufficient to determine that vt(4) is in use. Reported by: Trond Endrestøl 268045 by emaste@ Log: Add vt(4) to GENERIC and retire the separate VT config vt(4) and sc(4) can now coexist in the same kernel. To choose the vt driver, set the loader tunable kern.vty=vt . Sponsored by: The FreeBSD Foundation Added: stable/10/sys/dev/vt/hw/vga/vt_vga.c - copied unchanged from r267622, head/sys/dev/vt/hw/vga/vt_vga.c stable/10/sys/dev/vt/hw/vga/vt_vga_reg.h - copied unchanged from r267622, head/sys/dev/vt/hw/vga/vt_vga_reg.h Deleted: stable/10/sys/amd64/conf/VT stable/10/sys/dev/vt/hw/vga/vga.c stable/10/sys/dev/vt/hw/vga/vga_reg.h stable/10/sys/i386/conf/VT Modified: stable/10/share/man/man4/vt.4 stable/10/sys/amd64/conf/GENERIC stable/10/sys/conf/files stable/10/sys/conf/files.i386 stable/10/sys/dev/syscons/syscons.c stable/10/sys/dev/syscons/sysmouse.c stable/10/sys/dev/vt/vt.h stable/10/sys/dev/vt/vt_consolectl.c stable/10/sys/dev/vt/vt_core.c stable/10/sys/dev/vt/vt_sysmouse.c stable/10/sys/i386/conf/GENERIC stable/10/sys/kern/kern_cons.c stable/10/sys/sys/cons.h stable/10/usr.sbin/kbdcontrol/kbdcontrol.c stable/10/usr.sbin/vidcontrol/vidcontrol.c Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/vt.4 ============================================================================== --- stable/10/share/man/man4/vt.4 Mon Jul 7 14:03:30 2014 (r268365) +++ stable/10/share/man/man4/vt.4 Mon Jul 7 14:16:05 2014 (r268366) @@ -44,6 +44,7 @@ In .Xr loader.conf 5 : .Cd hw.vga.textmode=1 +.Cd kern.vty=vt .Sh DESCRIPTION The .Nm @@ -182,6 +183,12 @@ prompt or in Set to 1 to use virtual terminals in text mode instead of graphics mode. Features that require graphics mode, like loadable fonts, will be disabled. +.It Va kern.vty +Set to vt to choose the +.Nm +driver for the system console, if the +.Xr syscons 4 +driver is also compiled in and is the default. .El .Sh EXAMPLES The following line will change the default color of normal text. Modified: stable/10/sys/amd64/conf/GENERIC ============================================================================== --- stable/10/sys/amd64/conf/GENERIC Mon Jul 7 14:03:30 2014 (r268365) +++ stable/10/sys/amd64/conf/GENERIC Mon Jul 7 14:16:05 2014 (r268366) @@ -176,6 +176,11 @@ device splash # Splash screen and scr device sc options SC_PIXEL_MODE # add support for the raster text mode +# vt is the new video console driver +device vt +device vt_vga +device vt_efifb + device agp # support several AGP chipsets # PCCARD (PCMCIA) support Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Mon Jul 7 14:03:30 2014 (r268365) +++ stable/10/sys/conf/files Mon Jul 7 14:16:05 2014 (r268366) @@ -2535,7 +2535,7 @@ dev/vt/colors/vt_termcolors.c optional v dev/vt/font/vt_font_default.c optional vt dev/vt/font/vt_mouse_cursor.c optional vt dev/vt/hw/fb/vt_fb.c optional vt -dev/vt/hw/vga/vga.c optional vt vt_vga +dev/vt/hw/vga/vt_vga.c optional vt vt_vga dev/vt/logo/logo_freebsd.c optional vt splash dev/vt/vt_buf.c optional vt dev/vt/vt_consolectl.c optional vt Modified: stable/10/sys/conf/files.i386 ============================================================================== --- stable/10/sys/conf/files.i386 Mon Jul 7 14:03:30 2014 (r268365) +++ stable/10/sys/conf/files.i386 Mon Jul 7 14:16:05 2014 (r268366) @@ -293,7 +293,6 @@ dev/viawd/viawd.c optional viawd dev/vmware/vmxnet3/if_vmx.c optional vmx dev/acpica/acpi_if.m standard dev/acpi_support/acpi_wmi_if.m standard -dev/vt/hw/xboxfb/xboxfb.c optional vt_xboxfb dev/wbwd/wbwd.c optional wbwd dev/wpi/if_wpi.c optional wpi dev/isci/isci.c optional isci Modified: stable/10/sys/dev/syscons/syscons.c ============================================================================== --- stable/10/sys/dev/syscons/syscons.c Mon Jul 7 14:03:30 2014 (r268365) +++ stable/10/sys/dev/syscons/syscons.c Mon Jul 7 14:16:05 2014 (r268366) @@ -267,6 +267,8 @@ static struct cdevsw consolectl_devsw = int sc_probe_unit(int unit, int flags) { + if (!vty_enabled(VTY_SC)) + return ENXIO; if (!scvidprobe(unit, flags, FALSE)) { if (bootverbose) printf("%s%d: no video adapter found.\n", SC_DRIVER_NAME, unit); @@ -492,6 +494,9 @@ sc_attach_unit(int unit, int flags) struct cdev *dev; int vc; + if (!vty_enabled(VTY_SC)) + return ENXIO; + flags &= ~SC_KERNEL_CONSOLE; if (sc_console_unit == unit) { @@ -576,6 +581,8 @@ sc_attach_unit(int unit, int flags) static void scmeminit(void *arg) { + if (!vty_enabled(VTY_SC)) + return; if (sc_malloc) return; sc_malloc = TRUE; @@ -1589,6 +1596,11 @@ sc_cnprobe(struct consdev *cp) int unit; int flags; + if (!vty_enabled(VTY_SC)) { + cp->cn_pri = CN_DEAD; + return; + } + cp->cn_pri = sc_get_cons_priority(&unit, &flags); /* a video card is always required */ Modified: stable/10/sys/dev/syscons/sysmouse.c ============================================================================== --- stable/10/sys/dev/syscons/sysmouse.c Mon Jul 7 14:03:30 2014 (r268365) +++ stable/10/sys/dev/syscons/sysmouse.c Mon Jul 7 14:16:05 2014 (r268366) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -165,6 +166,8 @@ static struct ttydevsw smdev_ttydevsw = static void sm_attach_mouse(void *unused) { + if (!vty_enabled(VTY_SC)) + return; sysmouse_tty = tty_alloc(&smdev_ttydevsw, NULL); tty_makedev(sysmouse_tty, NULL, "sysmouse"); } Copied: stable/10/sys/dev/vt/hw/vga/vt_vga.c (from r267622, head/sys/dev/vt/hw/vga/vt_vga.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/vt/hw/vga/vt_vga.c Mon Jul 7 14:16:05 2014 (r268366, copy of r267622, head/sys/dev/vt/hw/vga/vt_vga.c) @@ -0,0 +1,690 @@ +/*- + * Copyright (c) 2005 Marcel Moolenaar + * All rights reserved. + * + * Copyright (c) 2009 The FreeBSD Foundation + * All rights reserved. + * + * Portions of this software were developed by Ed Schouten + * under sponsorship from the FreeBSD Foundation. + * + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include +#include + +#include + +#if defined(__amd64__) || defined(__i386__) +#include +#include +#include +#include +#endif /* __amd64__ || __i386__ */ + +struct vga_softc { + bus_space_tag_t vga_fb_tag; + bus_space_handle_t vga_fb_handle; + bus_space_tag_t vga_reg_tag; + bus_space_handle_t vga_reg_handle; + int vga_curcolor; +}; + +/* Convenience macros. */ +#define MEM_READ1(sc, ofs) \ + bus_space_read_1(sc->vga_fb_tag, sc->vga_fb_handle, ofs) +#define MEM_WRITE1(sc, ofs, val) \ + bus_space_write_1(sc->vga_fb_tag, sc->vga_fb_handle, ofs, val) +#define REG_READ1(sc, reg) \ + bus_space_read_1(sc->vga_reg_tag, sc->vga_reg_handle, reg) +#define REG_WRITE1(sc, reg, val) \ + bus_space_write_1(sc->vga_reg_tag, sc->vga_reg_handle, reg, val) + +#define VT_VGA_WIDTH 640 +#define VT_VGA_HEIGHT 480 +#define VT_VGA_MEMSIZE (VT_VGA_WIDTH * VT_VGA_HEIGHT / 8) + +static vd_probe_t vga_probe; +static vd_init_t vga_init; +static vd_blank_t vga_blank; +static vd_bitbltchr_t vga_bitbltchr; +static vd_maskbitbltchr_t vga_maskbitbltchr; +static vd_drawrect_t vga_drawrect; +static vd_setpixel_t vga_setpixel; +static vd_putchar_t vga_putchar; +static vd_postswitch_t vga_postswitch; + +static const struct vt_driver vt_vga_driver = { + .vd_name = "vga", + .vd_probe = vga_probe, + .vd_init = vga_init, + .vd_blank = vga_blank, + .vd_bitbltchr = vga_bitbltchr, + .vd_maskbitbltchr = vga_maskbitbltchr, + .vd_drawrect = vga_drawrect, + .vd_setpixel = vga_setpixel, + .vd_putchar = vga_putchar, + .vd_postswitch = vga_postswitch, + .vd_priority = VD_PRIORITY_GENERIC, +}; + +/* + * Driver supports both text mode and graphics mode. Make sure the + * buffer is always big enough to support both. + */ +static struct vga_softc vga_conssoftc; +VT_DRIVER_DECLARE(vt_vga, vt_vga_driver); + +static inline void +vga_setcolor(struct vt_device *vd, term_color_t color) +{ + struct vga_softc *sc = vd->vd_softc; + + if (sc->vga_curcolor != color) { + REG_WRITE1(sc, VGA_GC_ADDRESS, VGA_GC_SET_RESET); + REG_WRITE1(sc, VGA_GC_DATA, color); + sc->vga_curcolor = color; + } +} + +static void +vga_blank(struct vt_device *vd, term_color_t color) +{ + struct vga_softc *sc = vd->vd_softc; + u_int ofs; + + vga_setcolor(vd, color); + for (ofs = 0; ofs < VT_VGA_MEMSIZE; ofs++) + MEM_WRITE1(sc, ofs, 0xff); +} + +static inline void +vga_bitblt_put(struct vt_device *vd, u_long dst, term_color_t color, + uint8_t v) +{ + struct vga_softc *sc = vd->vd_softc; + + /* Skip empty writes, in order to avoid palette changes. */ + if (v != 0x00) { + vga_setcolor(vd, color); + /* + * When this MEM_READ1() gets disabled, all sorts of + * artifacts occur. This is because this read loads the + * set of 8 pixels that are about to be changed. There + * is one scenario where we can avoid the read, namely + * if all pixels are about to be overwritten anyway. + */ + if (v != 0xff) + MEM_READ1(sc, dst); + MEM_WRITE1(sc, dst, v); + } +} + +static void +vga_setpixel(struct vt_device *vd, int x, int y, term_color_t color) +{ + + vga_bitblt_put(vd, (y * VT_VGA_WIDTH / 8) + (x / 8), color, + 0x80 >> (x % 8)); +} + +static void +vga_drawrect(struct vt_device *vd, int x1, int y1, int x2, int y2, int fill, + term_color_t color) +{ + int x, y; + + for (y = y1; y <= y2; y++) { + if (fill || (y == y1) || (y == y2)) { + for (x = x1; x <= x2; x++) + vga_setpixel(vd, x, y, color); + } else { + vga_setpixel(vd, x1, y, color); + vga_setpixel(vd, x2, y, color); + } + } +} + +static inline void +vga_bitblt_draw(struct vt_device *vd, const uint8_t *src, + u_long ldst, uint8_t shift, unsigned int width, unsigned int height, + term_color_t color, int negate) +{ + u_long dst; + int w; + uint8_t b, r, out; + + for (; height > 0; height--) { + dst = ldst; + ldst += VT_VGA_WIDTH / 8; + r = 0; + for (w = width; w > 0; w -= 8) { + b = *src++; + if (negate) { + b = ~b; + /* Don't go too far. */ + if (w < 8) + b &= 0xff << (8 - w); + } + /* Reintroduce bits from previous column. */ + out = (b >> shift) | r; + r = b << (8 - shift); + vga_bitblt_put(vd, dst++, color, out); + } + /* Print the remainder. */ + vga_bitblt_put(vd, dst, color, r); + } +} + +static void +vga_bitbltchr(struct vt_device *vd, const uint8_t *src, const uint8_t *mask, + int bpl, vt_axis_t top, vt_axis_t left, unsigned int width, + unsigned int height, term_color_t fg, term_color_t bg) +{ + u_long dst, ldst; + int w; + + /* Don't try to put off screen pixels */ + if (((left + width) > VT_VGA_WIDTH) || ((top + height) > + VT_VGA_HEIGHT)) + return; + + dst = (VT_VGA_WIDTH * top + left) / 8; + + for (; height > 0; height--) { + ldst = dst; + for (w = width; w > 0; w -= 8) { + vga_bitblt_put(vd, ldst, fg, *src); + vga_bitblt_put(vd, ldst, bg, ~*src); + ldst++; + src++; + } + dst += VT_VGA_WIDTH / 8; + } +} + +/* Bitblt with mask support. Slow. */ +static void +vga_maskbitbltchr(struct vt_device *vd, const uint8_t *src, const uint8_t *mask, + int bpl, vt_axis_t top, vt_axis_t left, unsigned int width, + unsigned int height, term_color_t fg, term_color_t bg) +{ + struct vga_softc *sc = vd->vd_softc; + u_long dst; + uint8_t shift; + + dst = (VT_VGA_WIDTH * top + left) / 8; + shift = left % 8; + + /* Don't try to put off screen pixels */ + if (((left + width) > VT_VGA_WIDTH) || ((top + height) > + VT_VGA_HEIGHT)) + return; + + if (sc->vga_curcolor == fg) { + vga_bitblt_draw(vd, src, dst, shift, width, height, fg, 0); + vga_bitblt_draw(vd, src, dst, shift, width, height, bg, 1); + } else { + vga_bitblt_draw(vd, src, dst, shift, width, height, bg, 1); + vga_bitblt_draw(vd, src, dst, shift, width, height, fg, 0); + } +} + +/* + * Binary searchable table for Unicode to CP437 conversion. + */ + +struct unicp437 { + uint16_t unicode_base; + uint8_t cp437_base; + uint8_t length; +}; + +static const struct unicp437 cp437table[] = { + { 0x0020, 0x20, 0x5e }, { 0x00a0, 0x20, 0x00 }, + { 0x00a1, 0xad, 0x00 }, { 0x00a2, 0x9b, 0x00 }, + { 0x00a3, 0x9c, 0x00 }, { 0x00a5, 0x9d, 0x00 }, + { 0x00a7, 0x15, 0x00 }, { 0x00aa, 0xa6, 0x00 }, + { 0x00ab, 0xae, 0x00 }, { 0x00ac, 0xaa, 0x00 }, + { 0x00b0, 0xf8, 0x00 }, { 0x00b1, 0xf1, 0x00 }, + { 0x00b2, 0xfd, 0x00 }, { 0x00b5, 0xe6, 0x00 }, + { 0x00b6, 0x14, 0x00 }, { 0x00b7, 0xfa, 0x00 }, + { 0x00ba, 0xa7, 0x00 }, { 0x00bb, 0xaf, 0x00 }, + { 0x00bc, 0xac, 0x00 }, { 0x00bd, 0xab, 0x00 }, + { 0x00bf, 0xa8, 0x00 }, { 0x00c4, 0x8e, 0x01 }, + { 0x00c6, 0x92, 0x00 }, { 0x00c7, 0x80, 0x00 }, + { 0x00c9, 0x90, 0x00 }, { 0x00d1, 0xa5, 0x00 }, + { 0x00d6, 0x99, 0x00 }, { 0x00dc, 0x9a, 0x00 }, + { 0x00df, 0xe1, 0x00 }, { 0x00e0, 0x85, 0x00 }, + { 0x00e1, 0xa0, 0x00 }, { 0x00e2, 0x83, 0x00 }, + { 0x00e4, 0x84, 0x00 }, { 0x00e5, 0x86, 0x00 }, + { 0x00e6, 0x91, 0x00 }, { 0x00e7, 0x87, 0x00 }, + { 0x00e8, 0x8a, 0x00 }, { 0x00e9, 0x82, 0x00 }, + { 0x00ea, 0x88, 0x01 }, { 0x00ec, 0x8d, 0x00 }, + { 0x00ed, 0xa1, 0x00 }, { 0x00ee, 0x8c, 0x00 }, + { 0x00ef, 0x8b, 0x00 }, { 0x00f0, 0xeb, 0x00 }, + { 0x00f1, 0xa4, 0x00 }, { 0x00f2, 0x95, 0x00 }, + { 0x00f3, 0xa2, 0x00 }, { 0x00f4, 0x93, 0x00 }, + { 0x00f6, 0x94, 0x00 }, { 0x00f7, 0xf6, 0x00 }, + { 0x00f8, 0xed, 0x00 }, { 0x00f9, 0x97, 0x00 }, + { 0x00fa, 0xa3, 0x00 }, { 0x00fb, 0x96, 0x00 }, + { 0x00fc, 0x81, 0x00 }, { 0x00ff, 0x98, 0x00 }, + { 0x0192, 0x9f, 0x00 }, { 0x0393, 0xe2, 0x00 }, + { 0x0398, 0xe9, 0x00 }, { 0x03a3, 0xe4, 0x00 }, + { 0x03a6, 0xe8, 0x00 }, { 0x03a9, 0xea, 0x00 }, + { 0x03b1, 0xe0, 0x01 }, { 0x03b4, 0xeb, 0x00 }, + { 0x03b5, 0xee, 0x00 }, { 0x03bc, 0xe6, 0x00 }, + { 0x03c0, 0xe3, 0x00 }, { 0x03c3, 0xe5, 0x00 }, + { 0x03c4, 0xe7, 0x00 }, { 0x03c6, 0xed, 0x00 }, + { 0x03d5, 0xed, 0x00 }, { 0x2010, 0x2d, 0x00 }, + { 0x2014, 0x2d, 0x00 }, { 0x2018, 0x60, 0x00 }, + { 0x2019, 0x27, 0x00 }, { 0x201c, 0x22, 0x00 }, + { 0x201d, 0x22, 0x00 }, { 0x2022, 0x07, 0x00 }, + { 0x203c, 0x13, 0x00 }, { 0x207f, 0xfc, 0x00 }, + { 0x20a7, 0x9e, 0x00 }, { 0x20ac, 0xee, 0x00 }, + { 0x2126, 0xea, 0x00 }, { 0x2190, 0x1b, 0x00 }, + { 0x2191, 0x18, 0x00 }, { 0x2192, 0x1a, 0x00 }, + { 0x2193, 0x19, 0x00 }, { 0x2194, 0x1d, 0x00 }, + { 0x2195, 0x12, 0x00 }, { 0x21a8, 0x17, 0x00 }, + { 0x2202, 0xeb, 0x00 }, { 0x2208, 0xee, 0x00 }, + { 0x2211, 0xe4, 0x00 }, { 0x2212, 0x2d, 0x00 }, + { 0x2219, 0xf9, 0x00 }, { 0x221a, 0xfb, 0x00 }, + { 0x221e, 0xec, 0x00 }, { 0x221f, 0x1c, 0x00 }, + { 0x2229, 0xef, 0x00 }, { 0x2248, 0xf7, 0x00 }, + { 0x2261, 0xf0, 0x00 }, { 0x2264, 0xf3, 0x00 }, + { 0x2265, 0xf2, 0x00 }, { 0x2302, 0x7f, 0x00 }, + { 0x2310, 0xa9, 0x00 }, { 0x2320, 0xf4, 0x00 }, + { 0x2321, 0xf5, 0x00 }, { 0x2500, 0xc4, 0x00 }, + { 0x2502, 0xb3, 0x00 }, { 0x250c, 0xda, 0x00 }, + { 0x2510, 0xbf, 0x00 }, { 0x2514, 0xc0, 0x00 }, + { 0x2518, 0xd9, 0x00 }, { 0x251c, 0xc3, 0x00 }, + { 0x2524, 0xb4, 0x00 }, { 0x252c, 0xc2, 0x00 }, + { 0x2534, 0xc1, 0x00 }, { 0x253c, 0xc5, 0x00 }, + { 0x2550, 0xcd, 0x00 }, { 0x2551, 0xba, 0x00 }, + { 0x2552, 0xd5, 0x00 }, { 0x2553, 0xd6, 0x00 }, + { 0x2554, 0xc9, 0x00 }, { 0x2555, 0xb8, 0x00 }, + { 0x2556, 0xb7, 0x00 }, { 0x2557, 0xbb, 0x00 }, + { 0x2558, 0xd4, 0x00 }, { 0x2559, 0xd3, 0x00 }, + { 0x255a, 0xc8, 0x00 }, { 0x255b, 0xbe, 0x00 }, + { 0x255c, 0xbd, 0x00 }, { 0x255d, 0xbc, 0x00 }, + { 0x255e, 0xc6, 0x01 }, { 0x2560, 0xcc, 0x00 }, + { 0x2561, 0xb5, 0x00 }, { 0x2562, 0xb6, 0x00 }, + { 0x2563, 0xb9, 0x00 }, { 0x2564, 0xd1, 0x01 }, + { 0x2566, 0xcb, 0x00 }, { 0x2567, 0xcf, 0x00 }, + { 0x2568, 0xd0, 0x00 }, { 0x2569, 0xca, 0x00 }, + { 0x256a, 0xd8, 0x00 }, { 0x256b, 0xd7, 0x00 }, + { 0x256c, 0xce, 0x00 }, { 0x2580, 0xdf, 0x00 }, + { 0x2584, 0xdc, 0x00 }, { 0x2588, 0xdb, 0x00 }, + { 0x258c, 0xdd, 0x00 }, { 0x2590, 0xde, 0x00 }, + { 0x2591, 0xb0, 0x02 }, { 0x25a0, 0xfe, 0x00 }, + { 0x25ac, 0x16, 0x00 }, { 0x25b2, 0x1e, 0x00 }, + { 0x25ba, 0x10, 0x00 }, { 0x25bc, 0x1f, 0x00 }, + { 0x25c4, 0x11, 0x00 }, { 0x25cb, 0x09, 0x00 }, + { 0x25d8, 0x08, 0x00 }, { 0x25d9, 0x0a, 0x00 }, + { 0x263a, 0x01, 0x01 }, { 0x263c, 0x0f, 0x00 }, + { 0x2640, 0x0c, 0x00 }, { 0x2642, 0x0b, 0x00 }, + { 0x2660, 0x06, 0x00 }, { 0x2663, 0x05, 0x00 }, + { 0x2665, 0x03, 0x01 }, { 0x266a, 0x0d, 0x00 }, + { 0x266c, 0x0e, 0x00 }, +}; + +static uint8_t +vga_get_cp437(term_char_t c) +{ + int min, mid, max; + + min = 0; + max = (sizeof(cp437table) / sizeof(struct unicp437)) - 1; + + if (c < cp437table[0].unicode_base || + c > cp437table[max].unicode_base + cp437table[max].length) + return '?'; + + while (max >= min) { + mid = (min + max) / 2; + if (c < cp437table[mid].unicode_base) + max = mid - 1; + else if (c > cp437table[mid].unicode_base + + cp437table[mid].length) + min = mid + 1; + else + return (c - cp437table[mid].unicode_base + + cp437table[mid].cp437_base); + } + + return '?'; +} + +static void +vga_putchar(struct vt_device *vd, term_char_t c, + vt_axis_t top, vt_axis_t left, term_color_t fg, term_color_t bg) +{ + struct vga_softc *sc = vd->vd_softc; + uint8_t ch, attr; + + /* + * Convert character to CP437, which is the character set used + * by the VGA hardware by default. + */ + ch = vga_get_cp437(c); + + /* + * Convert colors to VGA attributes. + */ + attr = bg << 4 | fg; + + MEM_WRITE1(sc, 0x18000 + (top * 80 + left) * 2 + 0, ch); + MEM_WRITE1(sc, 0x18000 + (top * 80 + left) * 2 + 1, attr); +} + +static void +vga_initialize_graphics(struct vt_device *vd) +{ + struct vga_softc *sc = vd->vd_softc; + + /* Clock select. */ + REG_WRITE1(sc, VGA_GEN_MISC_OUTPUT_W, VGA_GEN_MO_VSP | VGA_GEN_MO_HSP | + VGA_GEN_MO_PB | VGA_GEN_MO_ER | VGA_GEN_MO_IOA); + /* Set sequencer clocking and memory mode. */ + REG_WRITE1(sc, VGA_SEQ_ADDRESS, VGA_SEQ_CLOCKING_MODE); + REG_WRITE1(sc, VGA_SEQ_DATA, VGA_SEQ_CM_89); + REG_WRITE1(sc, VGA_SEQ_ADDRESS, VGA_SEQ_MEMORY_MODE); + REG_WRITE1(sc, VGA_SEQ_DATA, VGA_SEQ_MM_OE | VGA_SEQ_MM_EM); + + /* Set the graphics controller in graphics mode. */ + REG_WRITE1(sc, VGA_GC_ADDRESS, VGA_GC_MISCELLANEOUS); + REG_WRITE1(sc, VGA_GC_DATA, 0x04 + VGA_GC_MISC_GA); + /* Program the CRT controller. */ + REG_WRITE1(sc, VGA_CRTC_ADDRESS, VGA_CRTC_HORIZ_TOTAL); + REG_WRITE1(sc, VGA_CRTC_DATA, 0x5f); /* 760 */ + REG_WRITE1(sc, VGA_CRTC_ADDRESS, VGA_CRTC_HORIZ_DISP_END); + REG_WRITE1(sc, VGA_CRTC_DATA, 0x4f); /* 640 - 8 */ + REG_WRITE1(sc, VGA_CRTC_ADDRESS, VGA_CRTC_START_HORIZ_BLANK); + REG_WRITE1(sc, VGA_CRTC_DATA, 0x50); /* 640 */ + REG_WRITE1(sc, VGA_CRTC_ADDRESS, VGA_CRTC_END_HORIZ_BLANK); + REG_WRITE1(sc, VGA_CRTC_DATA, VGA_CRTC_EHB_CR + 2); + REG_WRITE1(sc, VGA_CRTC_ADDRESS, VGA_CRTC_START_HORIZ_RETRACE); + REG_WRITE1(sc, VGA_CRTC_DATA, 0x54); /* 672 */ + REG_WRITE1(sc, VGA_CRTC_ADDRESS, VGA_CRTC_END_HORIZ_RETRACE); + REG_WRITE1(sc, VGA_CRTC_DATA, VGA_CRTC_EHR_EHB + 0); + REG_WRITE1(sc, VGA_CRTC_ADDRESS, VGA_CRTC_VERT_TOTAL); + REG_WRITE1(sc, VGA_CRTC_DATA, 0x0b); /* 523 */ + REG_WRITE1(sc, VGA_CRTC_ADDRESS, VGA_CRTC_OVERFLOW); + REG_WRITE1(sc, VGA_CRTC_DATA, VGA_CRTC_OF_VT9 | VGA_CRTC_OF_LC8 | + VGA_CRTC_OF_VBS8 | VGA_CRTC_OF_VRS8 | VGA_CRTC_OF_VDE8); + REG_WRITE1(sc, VGA_CRTC_ADDRESS, VGA_CRTC_MAX_SCAN_LINE); + REG_WRITE1(sc, VGA_CRTC_DATA, VGA_CRTC_MSL_LC9); + REG_WRITE1(sc, VGA_CRTC_ADDRESS, VGA_CRTC_VERT_RETRACE_START); + REG_WRITE1(sc, VGA_CRTC_DATA, 0xea); /* 480 + 10 */ + REG_WRITE1(sc, VGA_CRTC_ADDRESS, VGA_CRTC_VERT_RETRACE_END); + REG_WRITE1(sc, VGA_CRTC_DATA, 0x0c); + REG_WRITE1(sc, VGA_CRTC_ADDRESS, VGA_CRTC_VERT_DISPLAY_END); + REG_WRITE1(sc, VGA_CRTC_DATA, 0xdf); /* 480 - 1*/ + REG_WRITE1(sc, VGA_CRTC_ADDRESS, VGA_CRTC_OFFSET); + REG_WRITE1(sc, VGA_CRTC_DATA, 0x28); + REG_WRITE1(sc, VGA_CRTC_ADDRESS, VGA_CRTC_START_VERT_BLANK); + REG_WRITE1(sc, VGA_CRTC_DATA, 0xe7); /* 480 + 7 */ + REG_WRITE1(sc, VGA_CRTC_ADDRESS, VGA_CRTC_END_VERT_BLANK); + REG_WRITE1(sc, VGA_CRTC_DATA, 0x04); + REG_WRITE1(sc, VGA_CRTC_ADDRESS, VGA_CRTC_MODE_CONTROL); + REG_WRITE1(sc, VGA_CRTC_DATA, VGA_CRTC_MC_WB | VGA_CRTC_MC_AW | + VGA_CRTC_MC_SRS | VGA_CRTC_MC_CMS); + REG_WRITE1(sc, VGA_CRTC_ADDRESS, VGA_CRTC_LINE_COMPARE); + REG_WRITE1(sc, VGA_CRTC_DATA, 0xff); /* 480 + 31 */ + + REG_WRITE1(sc, VGA_GEN_FEATURE_CTRL_W, 0); + + REG_WRITE1(sc, VGA_SEQ_ADDRESS, VGA_SEQ_MAP_MASK); + REG_WRITE1(sc, VGA_SEQ_DATA, VGA_SEQ_MM_EM3 | VGA_SEQ_MM_EM2 | + VGA_SEQ_MM_EM1 | VGA_SEQ_MM_EM0); + REG_WRITE1(sc, VGA_SEQ_ADDRESS, VGA_SEQ_CHAR_MAP_SELECT); + REG_WRITE1(sc, VGA_SEQ_DATA, 0); + + REG_WRITE1(sc, VGA_GC_ADDRESS, VGA_GC_SET_RESET); + REG_WRITE1(sc, VGA_GC_DATA, 0); + REG_WRITE1(sc, VGA_GC_ADDRESS, VGA_GC_ENABLE_SET_RESET); + REG_WRITE1(sc, VGA_GC_DATA, 0x0f); + REG_WRITE1(sc, VGA_GC_ADDRESS, VGA_GC_COLOR_COMPARE); + REG_WRITE1(sc, VGA_GC_DATA, 0); + REG_WRITE1(sc, VGA_GC_ADDRESS, VGA_GC_DATA_ROTATE); + REG_WRITE1(sc, VGA_GC_DATA, 0); + REG_WRITE1(sc, VGA_GC_ADDRESS, VGA_GC_READ_MAP_SELECT); + REG_WRITE1(sc, VGA_GC_DATA, 0); + REG_WRITE1(sc, VGA_GC_ADDRESS, VGA_GC_MODE); + REG_WRITE1(sc, VGA_GC_DATA, 0); + REG_WRITE1(sc, VGA_GC_ADDRESS, VGA_GC_COLOR_DONT_CARE); + REG_WRITE1(sc, VGA_GC_DATA, 0x0f); + REG_WRITE1(sc, VGA_GC_ADDRESS, VGA_GC_BIT_MASK); + REG_WRITE1(sc, VGA_GC_DATA, 0xff); +} + +static void +vga_initialize(struct vt_device *vd, int textmode) +{ + struct vga_softc *sc = vd->vd_softc; + uint8_t x; + + /* Make sure the VGA adapter is not in monochrome emulation mode. */ + x = REG_READ1(sc, VGA_GEN_MISC_OUTPUT_R); + REG_WRITE1(sc, VGA_GEN_MISC_OUTPUT_W, x | VGA_GEN_MO_IOA); + + /* Unprotect CRTC registers 0-7. */ + REG_WRITE1(sc, VGA_CRTC_ADDRESS, VGA_CRTC_VERT_RETRACE_END); + x = REG_READ1(sc, VGA_CRTC_DATA); + REG_WRITE1(sc, VGA_CRTC_DATA, x & ~VGA_CRTC_VRE_PR); + + /* + * Wait for the vertical retrace. + * NOTE: this code reads the VGA_GEN_INPUT_STAT_1 register, which has + * the side-effect of clearing the internal flip-flip of the attribute + * controller's write register. This means that because this code is + * here, we know for sure that the first write to the attribute + * controller will be a write to the address register. Removing this + * code therefore also removes that guarantee and appropriate measures + * need to be taken. + */ + do { + x = REG_READ1(sc, VGA_GEN_INPUT_STAT_1); + x &= VGA_GEN_IS1_VR | VGA_GEN_IS1_DE; + } while (x != (VGA_GEN_IS1_VR | VGA_GEN_IS1_DE)); + + /* Now, disable the sync. signals. */ + REG_WRITE1(sc, VGA_CRTC_ADDRESS, VGA_CRTC_MODE_CONTROL); + x = REG_READ1(sc, VGA_CRTC_DATA); + REG_WRITE1(sc, VGA_CRTC_DATA, x & ~VGA_CRTC_MC_HR); + + /* Asynchronous sequencer reset. */ + REG_WRITE1(sc, VGA_SEQ_ADDRESS, VGA_SEQ_RESET); + REG_WRITE1(sc, VGA_SEQ_DATA, VGA_SEQ_RST_SR); + + if (!textmode) + vga_initialize_graphics(vd); + + REG_WRITE1(sc, VGA_CRTC_ADDRESS, VGA_CRTC_PRESET_ROW_SCAN); + REG_WRITE1(sc, VGA_CRTC_DATA, 0); + REG_WRITE1(sc, VGA_CRTC_ADDRESS, VGA_CRTC_CURSOR_START); + REG_WRITE1(sc, VGA_CRTC_DATA, VGA_CRTC_CS_COO); + REG_WRITE1(sc, VGA_CRTC_ADDRESS, VGA_CRTC_CURSOR_END); + REG_WRITE1(sc, VGA_CRTC_DATA, 0); + REG_WRITE1(sc, VGA_CRTC_ADDRESS, VGA_CRTC_START_ADDR_HIGH); + REG_WRITE1(sc, VGA_CRTC_DATA, 0); + REG_WRITE1(sc, VGA_CRTC_ADDRESS, VGA_CRTC_START_ADDR_LOW); + REG_WRITE1(sc, VGA_CRTC_DATA, 0); + REG_WRITE1(sc, VGA_CRTC_ADDRESS, VGA_CRTC_CURSOR_LOC_HIGH); + REG_WRITE1(sc, VGA_CRTC_DATA, 0); + REG_WRITE1(sc, VGA_CRTC_ADDRESS, VGA_CRTC_CURSOR_LOC_LOW); + REG_WRITE1(sc, VGA_CRTC_DATA, 0x59); + REG_WRITE1(sc, VGA_CRTC_ADDRESS, VGA_CRTC_UNDERLINE_LOC); + REG_WRITE1(sc, VGA_CRTC_DATA, VGA_CRTC_UL_UL); + + if (textmode) { + /* Set the attribute controller to blink disable. */ + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_MODE_CONTROL); + REG_WRITE1(sc, VGA_AC_WRITE, 0); + } else { + /* Set the attribute controller in graphics mode. */ + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_MODE_CONTROL); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_MC_GA); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_HORIZ_PIXEL_PANNING); + REG_WRITE1(sc, VGA_AC_WRITE, 0); + } + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_PALETTE(0)); + REG_WRITE1(sc, VGA_AC_WRITE, 0); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_PALETTE(1)); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_PAL_R); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_PALETTE(2)); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_PAL_G); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_PALETTE(3)); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_PAL_SG | VGA_AC_PAL_R); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_PALETTE(4)); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_PAL_B); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_PALETTE(5)); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_PAL_R | VGA_AC_PAL_B); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_PALETTE(6)); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_PAL_G | VGA_AC_PAL_B); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_PALETTE(7)); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_PAL_R | VGA_AC_PAL_G | VGA_AC_PAL_B); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_PALETTE(8)); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_PAL_SR | VGA_AC_PAL_SG | + VGA_AC_PAL_SB); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_PALETTE(9)); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_PAL_SR | VGA_AC_PAL_SG | + VGA_AC_PAL_SB | VGA_AC_PAL_R); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_PALETTE(10)); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_PAL_SR | VGA_AC_PAL_SG | + VGA_AC_PAL_SB | VGA_AC_PAL_G); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_PALETTE(11)); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_PAL_SR | VGA_AC_PAL_SG | + VGA_AC_PAL_SB | VGA_AC_PAL_R | VGA_AC_PAL_G); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_PALETTE(12)); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_PAL_SR | VGA_AC_PAL_SG | + VGA_AC_PAL_SB | VGA_AC_PAL_B); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_PALETTE(13)); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_PAL_SR | VGA_AC_PAL_SG | + VGA_AC_PAL_SB | VGA_AC_PAL_R | VGA_AC_PAL_B); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_PALETTE(14)); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_PAL_SR | VGA_AC_PAL_SG | + VGA_AC_PAL_SB | VGA_AC_PAL_G | VGA_AC_PAL_B); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_PALETTE(15)); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_PAL_SR | VGA_AC_PAL_SG | + VGA_AC_PAL_SB | VGA_AC_PAL_R | VGA_AC_PAL_G | VGA_AC_PAL_B); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_OVERSCAN_COLOR); + REG_WRITE1(sc, VGA_AC_WRITE, 0); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_COLOR_PLANE_ENABLE); + REG_WRITE1(sc, VGA_AC_WRITE, 0x0f); + REG_WRITE1(sc, VGA_AC_WRITE, VGA_AC_COLOR_SELECT); + REG_WRITE1(sc, VGA_AC_WRITE, 0); + + if (!textmode) { + u_int ofs; + + /* + * Done. Clear the frame buffer. All bit planes are + * enabled, so a single-paged loop should clear all + * planes. + */ + for (ofs = 0; ofs < VT_VGA_MEMSIZE; ofs++) { + MEM_READ1(sc, ofs); + MEM_WRITE1(sc, ofs, 0); + } + } + + /* Re-enable the sequencer. */ + REG_WRITE1(sc, VGA_SEQ_ADDRESS, VGA_SEQ_RESET); + REG_WRITE1(sc, VGA_SEQ_DATA, VGA_SEQ_RST_SR | VGA_SEQ_RST_NAR); + /* Re-enable the sync signals. */ + REG_WRITE1(sc, VGA_CRTC_ADDRESS, VGA_CRTC_MODE_CONTROL); + x = REG_READ1(sc, VGA_CRTC_DATA); + REG_WRITE1(sc, VGA_CRTC_DATA, x | VGA_CRTC_MC_HR); + + if (!textmode) { + /* Switch to write mode 3, because we'll mainly do bitblt. */ + REG_WRITE1(sc, VGA_GC_ADDRESS, VGA_GC_MODE); + REG_WRITE1(sc, VGA_GC_DATA, 3); + REG_WRITE1(sc, VGA_GC_ADDRESS, VGA_GC_ENABLE_SET_RESET); + REG_WRITE1(sc, VGA_GC_DATA, 0x0f); + } +} + +static int +vga_probe(struct vt_device *vd) +{ + + return (CN_INTERNAL); +} + +static int +vga_init(struct vt_device *vd) +{ + struct vga_softc *sc; + int textmode; + + if (vd->vd_softc == NULL) + vd->vd_softc = (void *)&vga_conssoftc; + sc = vd->vd_softc; + textmode = 0; + +#if defined(__amd64__) || defined(__i386__) + sc->vga_fb_tag = X86_BUS_SPACE_MEM; + sc->vga_fb_handle = KERNBASE + VGA_MEM_BASE; + sc->vga_reg_tag = X86_BUS_SPACE_IO; + sc->vga_reg_handle = VGA_REG_BASE; +#elif defined(__ia64__) + sc->vga_fb_tag = IA64_BUS_SPACE_MEM; + sc->vga_fb_handle = IA64_PHYS_TO_RR6(VGA_MEM_BASE); + sc->vga_reg_tag = IA64_BUS_SPACE_IO; + sc->vga_reg_handle = VGA_REG_BASE; +#else +# error "Architecture not yet supported!" +#endif + + TUNABLE_INT_FETCH("hw.vga.textmode", &textmode); + if (textmode) { + vd->vd_flags |= VDF_TEXTMODE; + vd->vd_width = 80; + vd->vd_height = 25; + } else { + vd->vd_width = VT_VGA_WIDTH; + vd->vd_height = VT_VGA_HEIGHT; + } + vga_initialize(vd, textmode); + + return (CN_INTERNAL); +} + +static void +vga_postswitch(struct vt_device *vd) +{ + + /* Reinit VGA mode, to restore view after app which change mode. */ + vga_initialize(vd, (vd->vd_flags & VDF_TEXTMODE)); + /* Ask vt(9) to update chars on visible area. */ + vd->vd_flags |= VDF_INVALID; +} Copied: stable/10/sys/dev/vt/hw/vga/vt_vga_reg.h (from r267622, head/sys/dev/vt/hw/vga/vt_vga_reg.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/vt/hw/vga/vt_vga_reg.h Mon Jul 7 14:16:05 2014 (r268366, copy of r267622, head/sys/dev/vt/hw/vga/vt_vga_reg.h) @@ -0,0 +1,220 @@ +/*- + * Copyright (c) 2005 Marcel Moolenaar + * All rights reserved. + * + * 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 ``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 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. + * + * $FreeBSD$ + */ + +#ifndef _DEV_VT_HW_VGA_VGA_REG_H_ +#define _DEV_VT_HW_VGA_VGA_REG_H_ + +/* + * The VGA adapter uses two I/O port blocks. One of these blocks, the CRT + * controller registers, can be located either at 0x3B0 or at 0x3D0 in I/O + * port space. This allows compatibility with the monochrome adapter, which + * has the CRT controller registers at 0x3B0. + * + * It is assumed that compatibility with the monochrome adapter is not of + * interest anymore. As such, the CRT controller can be located at 0x3D0 in + * I/O port space unconditionally. This means that the 2 I/O blocks are + * always adjacent and can therefore be treated as a single logical I/O port + * range. In practical terms: there only has to be a single tag and handle + * to access all registers. + * + * The following definitions are taken from or inspired by: + * Programmer's Guide to the EGA, VGA, and Super VGA Cards -- 3rd ed., + * Richard F. Ferraro, Addison-Wesley, ISBN 0-201-62490-7 + */ + +#define VGA_MEM_BASE 0xA0000 +#define VGA_MEM_SIZE 0x10000 +#define VGA_REG_BASE 0x3c0 +#define VGA_REG_SIZE 0x10+0x0c + +/* Attribute controller registers. */ +#define VGA_AC_WRITE 0x00 +#define VGA_AC_READ 0x01 +#define VGA_AC_PALETTE(x) (x) /* 0 <= x <= 15 */ +#define VGA_AC_PAL_SR 0x20 /* Secondary red */ +#define VGA_AC_PAL_SG 0x10 /* Secondary green */ +#define VGA_AC_PAL_SB 0x08 /* Secondary blue */ +#define VGA_AC_PAL_R 0x04 /* Red */ +#define VGA_AC_PAL_G 0x02 /* Green */ +#define VGA_AC_PAL_B 0x01 /* Blue */ +#define VGA_AC_MODE_CONTROL (32+16) +#define VGA_AC_MC_IPS 0x80 /* Internal palette size */ +#define VGA_AC_MC_PCS 0x40 /* Pixel clock select */ +#define VGA_AC_MC_PPC 0x20 /* Pixel panning compat. */ +#define VGA_AC_MC_BI 0x08 /* Blink/intensity */ +#define VGA_AC_MC_ELG 0x04 /* Enable line graphics cc. */ +#define VGA_AC_MC_DT 0x02 /* Display type */ +#define VGA_AC_MC_GA 0x01 /* Graphics/alphanumeric */ +#define VGA_AC_OVERSCAN_COLOR (32+17) +#define VGA_AC_COLOR_PLANE_ENABLE (32+18) +#define VGA_AC_HORIZ_PIXEL_PANNING (32+19) +#define VGA_AC_COLOR_SELECT (32+20) +#define VGA_AC_CS_C67 0x0C /* Color reg. addr. bits 6+7 */ +#define VGA_AC_CS_C45 0x03 /* Color reg. addr. bits 4+5 */ + +/* General registers. */ +#define VGA_GEN_MISC_OUTPUT_W 0x02 /* Write only. */ +#define VGA_GEN_MISC_OUTPUT_R 0x0c /* Read only. */ +#define VGA_GEN_MO_VSP 0x80 /* Vertical sync. polarity */ +#define VGA_GEN_MO_HSP 0x40 /* Horiz. sync. polarity */ +#define VGA_GEN_MO_PB 0x20 /* Page bit for odd/even */ +#define VGA_GEN_MO_CS 0x0C /* Clock select */ +#define VGA_GEN_MO_ER 0x02 /* Enable RAM */ +#define VGA_GEN_MO_IOA 0x01 /* Input/output address */ +#define VGA_GEN_INPUT_STAT_0 0x02 /* Read only. */ +#define VGA_GEN_FEATURE_CTRL_W 0x1a /* Write only. */ +#define VGA_GEN_FEATURE_CTRL_R 0x0a /* Read only. */ +#define VGA_GEN_INPUT_STAT_1 0x1a /* Read only. */ +#define VGA_GEN_IS1_VR 0x08 /* Vertical retrace */ +#define VGA_GEN_IS1_DE 0x01 /* Display enable not */ + +/* Sequencer registers. */ +#define VGA_SEQ_ADDRESS 0x04 +#define VGA_SEQ_RESET 0 +#define VGA_SEQ_RST_SR 0x02 /* Synchronous reset */ +#define VGA_SEQ_RST_NAR 0x01 /* No async. reset */ +#define VGA_SEQ_CLOCKING_MODE 1 +#define VGA_SEQ_CM_SO 0x20 /* Screen off */ +#define VGA_SEQ_CM_S4 0x10 /* Shift four */ +#define VGA_SEQ_CM_DC 0x08 /* Dot clock */ +#define VGA_SEQ_CM_SL 0x04 /* Shift load */ +#define VGA_SEQ_CM_89 0x01 /* 8/9 Dot clocks */ +#define VGA_SEQ_MAP_MASK 2 +#define VGA_SEQ_MM_EM3 0x08 /* Enable memory plane 3 */ +#define VGA_SEQ_MM_EM2 0x04 /* Enable memory plane 2 */ +#define VGA_SEQ_MM_EM1 0x02 /* Enable memory plane 1 */ +#define VGA_SEQ_MM_EM0 0x01 /* Enable memory plane 0 */ +#define VGA_SEQ_CHAR_MAP_SELECT 3 +#define VGA_SEQ_CMS_SAH 0x20 /* Char. A (bit 2) */ +#define VGA_SEQ_CMS_SBH 0x10 /* Char. B (bit 2) */ +#define VGA_SEQ_CMS_SA 0x0C /* Char. A (bit 0+1) */ +#define VGA_SEQ_CMS_SB 0x03 /* Char. B (bit 0+1) */ +#define VGA_SEQ_MEMORY_MODE 4 +#define VGA_SEQ_MM_C4 0x08 /* Chain four */ +#define VGA_SEQ_MM_OE 0x04 /* Odd/even */ +#define VGA_SEQ_MM_EM 0x02 /* Extended memory */ +#define VGA_SEQ_DATA 0x05 + +/* Color registers. */ +#define VGA_PEL_MASK 0x06 +#define VGA_PEL_ADDR_RD_MODE 0x07 /* Write only. */ +#define VGA_DAC_STATE 0x07 /* Read only. */ +#define VGA_PEL_ADDR_WR_MODE 0x08 +#define VGA_PEL_DATA 0x09 + +/* Graphics controller registers. */ +#define VGA_GC_ADDRESS 0x0e +#define VGA_GC_SET_RESET 0 +#define VGA_GC_ENABLE_SET_RESET 1 +#define VGA_GC_COLOR_COMPARE 2 +#define VGA_GC_DATA_ROTATE 3 +#define VGA_GC_DR_FS_XOR 0x18 /* Function select - XOR */ +#define VGA_GC_DR_FS_OR 0x10 /* Function select - OR */ +#define VGA_GC_DR_FS_AND 0x08 /* Function select - AND */ +#define VGA_GC_DR_RC 0x07 /* Rotate count */ +#define VGA_GC_READ_MAP_SELECT 4 +#define VGA_GC_MODE 5 +#define VGA_GC_MODE_SR 0x60 /* Shift register */ +#define VGA_GC_MODE_OE 0x10 /* Odd/even */ +#define VGA_GC_MODE_RM 0x08 /* Read mode */ +#define VGA_GC_MODE_WM 0x03 /* Write mode */ +#define VGA_GC_MISCELLANEOUS 6 +#define VGA_GC_MISC_MM 0x0C /* memory map */ +#define VGA_GC_MISC_COE 0x02 /* Chain odd/even */ +#define VGA_GC_MISC_GA 0x01 /* Graphics/text mode */ +#define VGA_GC_COLOR_DONT_CARE 7 +#define VGA_GC_BIT_MASK 8 +#define VGA_GC_DATA 0x0f + +/* CRT controller registers. */ +#define VGA_CRTC_ADDRESS 0x14 +#define VGA_CRTC_HORIZ_TOTAL 0 +#define VGA_CRTC_HORIZ_DISP_END 1 +#define VGA_CRTC_START_HORIZ_BLANK 2 +#define VGA_CRTC_END_HORIZ_BLANK 3 +#define VGA_CRTC_EHB_CR 0x80 /* Compatible read */ +#define VGA_CRTC_EHB_DES 0x60 /* Display enable skew */ +#define VGA_CRTC_EHB_EHB 0x1F /* End horizontal blank */ +#define VGA_CRTC_START_HORIZ_RETRACE 4 +#define VGA_CRTC_END_HORIZ_RETRACE 5 +#define VGA_CRTC_EHR_EHB 0x80 /* End horizontal blanking */ +#define VGA_CRTC_EHR_HRD 0x60 /* Horizontal retrace delay */ +#define VGA_CRTC_EHR_EHR 0x1F /* End horizontal retrace */ +#define VGA_CRTC_VERT_TOTAL 6 +#define VGA_CRTC_OVERFLOW 7 +#define VGA_CRTC_OF_VRS9 0x80 /* Vertical retrace start */ +#define VGA_CRTC_OF_VDE9 0x40 /* Vertical disp. enable end */ +#define VGA_CRTC_OF_VT9 0x20 /* Vertical total (bit 9) */ +#define VGA_CRTC_OF_LC8 0x10 /* Line compare */ +#define VGA_CRTC_OF_VBS8 0x08 /* Start vertical blanking */ +#define VGA_CRTC_OF_VRS8 0x04 /* Vertical retrace start */ +#define VGA_CRTC_OF_VDE8 0x02 /* Vertical disp. enable end */ +#define VGA_CRTC_OF_VT8 0x01 /* Vertical total (bit 8) */ +#define VGA_CRTC_PRESET_ROW_SCAN 8 +#define VGA_CRTC_PRS_BP 0x60 /* Byte panning */ +#define VGA_CRTC_PRS_PRS 0x1F /* Preset row scan */ +#define VGA_CRTC_MAX_SCAN_LINE 9 +#define VGA_CRTC_MSL_2T4 0x80 /* 200-to-400 line conversion */ +#define VGA_CRTC_MSL_LC9 0x40 /* Line compare (bit 9) */ +#define VGA_CRTC_MSL_VBS9 0x20 /* Start vertical blanking */ +#define VGA_CRTC_MSL_MSL 0x1F /* Maximum scan line */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Mon Jul 7 15:31:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53235996; Mon, 7 Jul 2014 15:31:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 273BE2202; Mon, 7 Jul 2014 15:31:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s67FVlqd047000; Mon, 7 Jul 2014 15:31:47 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s67FVlUc046999; Mon, 7 Jul 2014 15:31:47 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201407071531.s67FVlUc046999@svn.freebsd.org> From: Hajimu UMEMOTO Date: Mon, 7 Jul 2014 15:31:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268367 - stable/10/sbin/ifconfig X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jul 2014 15:31:47 -0000 Author: ume Date: Mon Jul 7 15:31:46 2014 New Revision: 268367 URL: http://svnweb.freebsd.org/changeset/base/268367 Log: MFC r268049: Fix ifconfig to show pltime and vltime with -L option, again after usage change from time_second to time_uptime. PR: 188520 Submitted by: Guy Yur Modified: stable/10/sbin/ifconfig/af_inet6.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ifconfig/af_inet6.c ============================================================================== --- stable/10/sbin/ifconfig/af_inet6.c Mon Jul 7 14:16:05 2014 (r268366) +++ stable/10/sbin/ifconfig/af_inet6.c Mon Jul 7 15:31:46 2014 (r268367) @@ -42,6 +42,7 @@ static const char rcsid[] = #include #include #include +#include #include #include @@ -98,20 +99,21 @@ static void setip6lifetime(const char *cmd, const char *val, int s, const struct afswtch *afp) { - time_t newval, t; + struct timespec now; + time_t newval; char *ep; - t = time(NULL); + clock_gettime(CLOCK_MONOTONIC_FAST, &now); newval = (time_t)strtoul(val, &ep, 0); if (val == ep) errx(1, "invalid %s", cmd); if (afp->af_af != AF_INET6) errx(1, "%s not allowed for the AF", cmd); if (strcmp(cmd, "vltime") == 0) { - in6_addreq.ifra_lifetime.ia6t_expire = t + newval; + in6_addreq.ifra_lifetime.ia6t_expire = now.tv_sec + newval; in6_addreq.ifra_lifetime.ia6t_vltime = newval; } else if (strcmp(cmd, "pltime") == 0) { - in6_addreq.ifra_lifetime.ia6t_preferred = t + newval; + in6_addreq.ifra_lifetime.ia6t_preferred = now.tv_sec + newval; in6_addreq.ifra_lifetime.ia6t_pltime = newval; } } @@ -172,9 +174,11 @@ in6_status(int s __unused, const struct int s6; u_int32_t flags6; struct in6_addrlifetime lifetime; - time_t t = time(NULL); + struct timespec now; int error; + clock_gettime(CLOCK_MONOTONIC_FAST, &now); + memset(&null_sin, 0, sizeof(null_sin)); sin = (struct sockaddr_in6 *)ifa->ifa_addr; @@ -258,15 +262,15 @@ in6_status(int s __unused, const struct if (ip6lifetime && (lifetime.ia6t_preferred || lifetime.ia6t_expire)) { printf("pltime "); if (lifetime.ia6t_preferred) { - printf("%s ", lifetime.ia6t_preferred < t - ? "0" : sec2str(lifetime.ia6t_preferred - t)); + printf("%s ", lifetime.ia6t_preferred < now.tv_sec + ? "0" : sec2str(lifetime.ia6t_preferred - now.tv_sec)); } else printf("infty "); printf("vltime "); if (lifetime.ia6t_expire) { - printf("%s ", lifetime.ia6t_expire < t - ? "0" : sec2str(lifetime.ia6t_expire - t)); + printf("%s ", lifetime.ia6t_expire < now.tv_sec + ? "0" : sec2str(lifetime.ia6t_expire - now.tv_sec)); } else printf("infty "); } From owner-svn-src-stable@FreeBSD.ORG Mon Jul 7 19:31:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08A7D99C; Mon, 7 Jul 2014 19:31:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9EB1282B; Mon, 7 Jul 2014 19:31:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s67JV2CN060024; Mon, 7 Jul 2014 19:31:02 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s67JV29c060023; Mon, 7 Jul 2014 19:31:02 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201407071931.s67JV29c060023@svn.freebsd.org> From: Aleksandr Rybalko Date: Mon, 7 Jul 2014 19:31:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268371 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jul 2014 19:31:03 -0000 Author: ray Date: Mon Jul 7 19:31:02 2014 New Revision: 268371 URL: http://svnweb.freebsd.org/changeset/base/268371 Log: MFC of r263873. Pointed by: Ivan Klymenko Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/conf/files Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Mon Jul 7 17:34:48 2014 (r268370) +++ stable/10/sys/conf/files Mon Jul 7 19:31:02 2014 (r268371) @@ -2534,6 +2534,7 @@ dev/vr/if_vr.c optional vr pci dev/vt/colors/vt_termcolors.c optional vt dev/vt/font/vt_font_default.c optional vt dev/vt/font/vt_mouse_cursor.c optional vt +dev/vt/hw/efifb/efifb.c optional vt_efifb dev/vt/hw/fb/vt_fb.c optional vt dev/vt/hw/vga/vt_vga.c optional vt vt_vga dev/vt/logo/logo_freebsd.c optional vt splash From owner-svn-src-stable@FreeBSD.ORG Mon Jul 7 21:27:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD1C31BC; Mon, 7 Jul 2014 21:27:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9FC62305; Mon, 7 Jul 2014 21:27:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s67LRlrR015227; Mon, 7 Jul 2014 21:27:47 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s67LRljA015226; Mon, 7 Jul 2014 21:27:47 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201407072127.s67LRljA015226@svn.freebsd.org> From: Aleksandr Rybalko Date: Mon, 7 Jul 2014 21:27:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268372 - stable/10/sys/amd64/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jul 2014 21:27:48 -0000 Author: ray Date: Mon Jul 7 21:27:47 2014 New Revision: 268372 URL: http://svnweb.freebsd.org/changeset/base/268372 Log: Temporary disable build of vt_efifb vt(4) driver, not all parts of UEFI support here yet. This direct commit to STABLE-10, because HEAD already support UEFI FB. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/amd64/conf/GENERIC Modified: stable/10/sys/amd64/conf/GENERIC ============================================================================== --- stable/10/sys/amd64/conf/GENERIC Mon Jul 7 19:31:02 2014 (r268371) +++ stable/10/sys/amd64/conf/GENERIC Mon Jul 7 21:27:47 2014 (r268372) @@ -179,7 +179,6 @@ options SC_PIXEL_MODE # add support fo # vt is the new video console driver device vt device vt_vga -device vt_efifb device agp # support several AGP chipsets From owner-svn-src-stable@FreeBSD.ORG Tue Jul 8 00:59:35 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C135D624; Tue, 8 Jul 2014 00:59:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE12D2479; Tue, 8 Jul 2014 00:59:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s680xZ9s013604; Tue, 8 Jul 2014 00:59:35 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s680xZWB013603; Tue, 8 Jul 2014 00:59:35 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201407080059.s680xZWB013603@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 8 Jul 2014 00:59:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268378 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jul 2014 00:59:35 -0000 Author: ae Date: Tue Jul 8 00:59:35 2014 New Revision: 268378 URL: http://svnweb.freebsd.org/changeset/base/268378 Log: MFC r268089: Linux uses its own UUID for data partitions. Modified: stable/10/sys/sys/gpt.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/gpt.h ============================================================================== --- stable/10/sys/sys/gpt.h Mon Jul 7 23:21:25 2014 (r268377) +++ stable/10/sys/sys/gpt.h Tue Jul 8 00:59:35 2014 (r268378) @@ -114,7 +114,8 @@ struct gpt_ent { #define GPT_ENT_TYPE_MS_LDM_DATA \ {0xaf9b60a0,0x1431,0x4f62,0xbc,0x68,{0x33,0x11,0x71,0x4a,0x69,0xad}} -#define GPT_ENT_TYPE_LINUX_DATA GPT_ENT_TYPE_MS_BASIC_DATA +#define GPT_ENT_TYPE_LINUX_DATA \ + {0x0fc63daf,0x8483,0x4772,0x8e,0x79,{0x3d,0x69,0xd8,0x47,0x7d,0xe4}} #define GPT_ENT_TYPE_LINUX_RAID \ {0xa19d880f,0x05fc,0x4d3b,0xa0,0x06,{0x74,0x3f,0x0f,0x84,0x91,0x1e}} #define GPT_ENT_TYPE_LINUX_SWAP \ From owner-svn-src-stable@FreeBSD.ORG Tue Jul 8 01:01:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0C235780; Tue, 8 Jul 2014 01:01:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB54624FD; Tue, 8 Jul 2014 01:01:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6811Uwn017156; Tue, 8 Jul 2014 01:01:30 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6811UrD017155; Tue, 8 Jul 2014 01:01:30 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201407080101.s6811UrD017155@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 8 Jul 2014 01:01:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268379 - stable/10/sbin/geom/class/part X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jul 2014 01:01:31 -0000 Author: ae Date: Tue Jul 8 01:01:30 2014 New Revision: 268379 URL: http://svnweb.freebsd.org/changeset/base/268379 Log: MFC r268090: Document all aliases supported by GEOM_PART class. Modified: stable/10/sbin/geom/class/part/gpart.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/geom/class/part/gpart.8 ============================================================================== --- stable/10/sbin/geom/class/part/gpart.8 Tue Jul 8 00:59:35 2014 (r268378) +++ stable/10/sbin/geom/class/part/gpart.8 Tue Jul 8 01:01:30 2014 (r268379) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 11, 2014 +.Dd July 1, 2014 .Dt GPART 8 .Os .Sh NAME @@ -550,8 +550,9 @@ The .Nm utility also allows the user to specify scheme-specific partition types for partition types that do not have symbolic names. -Symbolic names currently understood are: -.Bl -tag -width ".Cm ms-ldm-metadata" +Symbolic names currently understood and used by +.Fx are: +.Bl -tag -width ".Cm dragonfly-disklabel64" .It Cm bios-boot The system partition dedicated to second stage of the boot loader program. Usually it is used by the GRUB 2 loader for GPT partitioning schemes. @@ -563,16 +564,6 @@ Interface (EFI). In such cases, the GPT partitioning scheme is used and the actual partition type for the system partition can also be specified as .Qq Li "!c12a7328-f81f-11d2-ba4b-00a0c93ec93b" . -.It Cm fat16 -A partition that contains a FAT16 filesystem. -The scheme-specific type is -.Qq Li "!6" -for MBR. -.It Cm fat32 -A partition that contains a FAT32 filesystem. -The scheme-specific type is -.Qq Li "!11" -for MBR. .It Cm freebsd A .Fx @@ -631,6 +622,145 @@ The scheme-specific types are for APM, .Qq Li "!516e7cba-6ecf-11d6-8ff8-00022d09712b" for GPT, and 0x0904 for VTOC8. +.El +.Pp +Another symbolic names that can be used with +.Cm gpart +utility are: +.Bl -tag -width ".Cm dragonfly-disklabel64" +.It Cm apple-boot +An Apple Mac OS X partition dedicated to bootloader. +The scheme-specific types are +.Qq Li "!Apple_Bootstrap" +for APM and +.Qq Li "!426f6f74-0000-11aa-aa11-00306543ecac" +for GPT. +.It Cm apple-hfs +An Apple Mac OS X partition that contains a HFS or HFS+ filesystem. +The scheme-specific types are +.Qq Li "!Apple_HFS" +for APM and +.Qq Li "!48465300-0000-11aa-aa11-00306543ecac" +for GPT. +.It Cm apple-label +An Apple Mac OS X partition dedicated to partition metadata that descibes +disk device. +The scheme-specific type is +.Qq Li "!4c616265-6c00-11aa-aa11-00306543ecac" +for GPT. +.It Cm apple-raid +An Apple Mac OS X partition used in a software RAID configuration. +The scheme-specific type is +.Qq Li "!52414944-0000-11aa-aa11-00306543ecac" +for GPT. +.It Cm apple-raid-offline +An Apple Mac OS X partition used in a software RAID configuration. +The scheme-specific type is +.Qq Li "!52414944-5f4f-11aa-aa11-00306543ecac" +for GPT. +.It Cm apple-tv-recovery +An Apple Mac OS X partition used by Apple TV. +The scheme-specific type is +.Qq Li "!5265636f-7665-11aa-aa11-00306543ecac" +for GPT. +.It Cm apple-ufs +An Apple Mac OS X partition that contains a UFS filesystem. +The scheme-specific types are +.Qq Li "!Apple_UNIX_SVR2" +for APM and +.Qq Li "!55465300-0000-11aa-aa11-00306543ecac" +for GPT. +.It Cm dragonfly-label32 +A DragonFlyBSD partition subdivided into filesystems with a +.Bx +disklabel. +The scheme-specific type is +.Qq Li "!9d087404-1ca5-11dc-8817-01301bb8a9f5" +for GPT. +.It Cm dragonfly-label64 +A DragonFlyBSD partition subdivided into filesystems with a +disklabel64. +The scheme-specific type is +.Qq Li "!3d48ce54-1d16-11dc-8696-01301bb8a9f5" +for GPT. +.It Cm dragonfly-legacy +A legacy partition type used in DragonFlyBSD. +The scheme-specific type is +.Qq Li "!bd215ab2-1d16-11dc-8696-01301bb8a9f5" +for GPT. +.It Cm dragonfly-ccd +A DragonFlyBSD partition used with Concatenated Disk driver. +The scheme-specific type is +.Qq Li "!dbd5211b-1ca5-11dc-8817-01301bb8a9f5" +for GPT. +.It Cm dragonfly-hammer +A DragonFlyBSD partition that contains a Hammer filesystem. +The scheme-specific type is +.Qq Li "!61dc63ac-6e38-11dc-8513-01301bb8a9f5" +for GPT. +.It Cm dragonfly-hammer2 +A DragonFlyBSD partition that contains a Hammer2 filesystem. +The scheme-specific type is +.Qq Li "!5cbb9ad1-862d-11dc-a94d-01301bb8a9f5" +for GPT. +.It Cm dragonfly-swap +A DragonFlyBSD partition dedicated to swap space. +The scheme-specific type is +.Qq Li "!9d58fdbd-1ca5-11dc-8817-01301bb8a9f5" +for GPT. +.It Cm dragonfly-ufs +A DragonFlyBSD partition that contains an UFS1 filesystem. +The scheme-specific type is +.Qq Li "!9d94ce7c-1ca5-11dc-8817-01301bb8a9f5" +for GPT. +.It Cm dragonfly-vinum +A DragonFlyBSD partition used with Logical Volume Manager. +The scheme-specific type is +.Qq Li "!9dd4478f-1ca5-11dc-8817-01301bb8a9f5" +for GPT. +.It Cm ebr +A partition subdivided into filesystems with a EBR. +The scheme-specific type is +.Qq Li "!5" +for MBR. +.It Cm fat16 +A partition that contains a FAT16 filesystem. +The scheme-specific type is +.Qq Li "!6" +for MBR. +.It Cm fat32 +A partition that contains a FAT32 filesystem. +The scheme-specific type is +.Qq Li "!11" +for MBR. +.It Cm linux-data +A Linux partition that contains some filesystem with data. +The scheme-specific types are +.Qq Li "!131" +for MBR and +.Qq Li "!0fc63daf-8483-4772-8e79-3d69d8477de4" +for GPT. +.It Cm linux-lvm +A Linux partition dedicated to Logical Volume Manager. +The scheme-specific types are +.Qq Li "!142" +for MBR and +.Qq Li "!e6d6d379-f507-44c2-a23c-238f2a3df928" +for GPT. +.It Cm linux-raid +A Linux partition used in a software RAID configuration. +The scheme-specific types are +.Qq Li "!253" +for MBR and +.Qq Li "!a19d880f-05fc-4d3b-a006-743f0f84911e" +for GPT. +.It Cm linux-swap +A Linux partition dedicated to swap space. +The scheme-specific types are +.Qq Li "!130" +for MBR and +.Qq Li "!0657fd6d-a4ab-43c4-84e5-0933c84b4f4f" +for GPT. .It Cm mbr A partition that is sub-partitioned by a Master Boot Record (MBR). This type is known as @@ -658,6 +788,36 @@ A partition that contains Logical Disk M The scheme-specific type is .Qq Li "!5808c8aa-7e8f-42e0-85d2-e1e90434cfb3" for GPT. +.It Cm netbsd-ccd +A NetBSD partition used with Concatenated Disk driver. +The scheme-specific type is +.Qq Li "!2db519c4-b10f-11dc-b99b-0019d1879648" +for GPT. +.It Cm netbsd-cgd +An encrypted NetBSD partition. +The scheme-specific type is +.Qq Li "!2db519ec-b10f-11dc-b99b-0019d1879648" +for GPT. +.It Cm netbsd-ffs +A NetBSD partition that contains an UFS filesystem. +The scheme-specific type is +.Qq Li "!49f48d5a-b10e-11dc-b99b-0019d1879648" +for GPT. +.It Cm netbsd-lfs +A NetBSD partition that contains an LFS filesystem. +The scheme-specific type is +.Qq Li "!49f48d82-b10e-11dc-b99b-0019d1879648" +for GPT. +.It Cm netbsd-raid +A NetBSD partition used in a software RAID configuration. +The scheme-specific type is +.Qq Li "!49f48daa-b10e-11dc-b99b-0019d1879648" +for GPT. +.It Cm netbsd-swap +A NetBSD partition dedicated to swap space. +The scheme-specific type is +.Qq Li "!49f48d32-b10e-11dc-b99b-0019d1879648" +for GPT. .It Cm ntfs A partition that contains a NTFS or exFAT filesystem. The scheme-specific type is From owner-svn-src-stable@FreeBSD.ORG Tue Jul 8 09:47:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8730CC7; Tue, 8 Jul 2014 09:47:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73E192F49; Tue, 8 Jul 2014 09:47:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s689lrOo063581; Tue, 8 Jul 2014 09:47:53 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s689lrjP063580; Tue, 8 Jul 2014 09:47:53 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201407080947.s689lrjP063580@svn.freebsd.org> From: Ed Maste Date: Tue, 8 Jul 2014 09:47:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268389 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jul 2014 09:47:53 -0000 Author: emaste Date: Tue Jul 8 09:47:52 2014 New Revision: 268389 URL: http://svnweb.freebsd.org/changeset/base/268389 Log: MFC r268059: Add missing VT_ kernel config knobs Modified: stable/10/sys/conf/options Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/options ============================================================================== --- stable/10/sys/conf/options Tue Jul 8 09:37:41 2014 (r268388) +++ stable/10/sys/conf/options Tue Jul 8 09:47:52 2014 (r268389) @@ -739,8 +739,6 @@ SAFE_RNDTEST opt_safe.h # syscons/vt options MAXCONS opt_syscons.h -VT_FB_DEFAULT_WIDTH opt_syscons.h -VT_FB_DEFAULT_HEIGHT opt_syscons.h SC_ALT_MOUSE_IMAGE opt_syscons.h SC_CUT_SPACES2TABS opt_syscons.h SC_CUT_SEPCHARS opt_syscons.h @@ -763,6 +761,11 @@ SC_NORM_REV_ATTR opt_syscons.h SC_PIXEL_MODE opt_syscons.h SC_RENDER_DEBUG opt_syscons.h SC_TWOBUTTON_MOUSE opt_syscons.h +VT_ALT_TO_ESC_HACK opt_syscons.h +VT_FB_DEFAULT_WIDTH opt_syscons.h +VT_FB_DEFAULT_HEIGHT opt_syscons.h +VT_MAXWINDOWS opt_syscons.h +VT_TWOBUTTON_MOUSE opt_syscons.h DEV_SC opt_syscons.h DEV_VT opt_syscons.h From owner-svn-src-stable@FreeBSD.ORG Tue Jul 8 13:16:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E3D11AA1; Tue, 8 Jul 2014 13:16:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0D3421A9; Tue, 8 Jul 2014 13:16:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s68DG3RS069507; Tue, 8 Jul 2014 13:16:03 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s68DG3H8069506; Tue, 8 Jul 2014 13:16:03 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201407081316.s68DG3H8069506@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 8 Jul 2014 13:16:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268396 - stable/10/lib/libc/stdlib X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jul 2014 13:16:04 -0000 Author: pluknet Date: Tue Jul 8 13:16:03 2014 New Revision: 268396 URL: http://svnweb.freebsd.org/changeset/base/268396 Log: MFC r268393: [mdoc] Fix previous. Modified: stable/10/lib/libc/stdlib/getopt.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdlib/getopt.3 ============================================================================== --- stable/10/lib/libc/stdlib/getopt.3 Tue Jul 8 13:01:36 2014 (r268395) +++ stable/10/lib/libc/stdlib/getopt.3 Tue Jul 8 13:16:03 2014 (r268396) @@ -74,7 +74,7 @@ word, or .Dv NULL if there were no more characters in the current word. This is a -.It Tn GNU +.Tn GNU extension. For example, an option string .Li \&"x" From owner-svn-src-stable@FreeBSD.ORG Tue Jul 8 14:04:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A2C5438; Tue, 8 Jul 2014 14:04:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2CC812696; Tue, 8 Jul 2014 14:04:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s68E4bTi093338; Tue, 8 Jul 2014 14:04:37 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s68E4aMq093332; Tue, 8 Jul 2014 14:04:36 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201407081404.s68E4aMq093332@svn.freebsd.org> From: Ed Maste Date: Tue, 8 Jul 2014 14:04:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268399 - in stable/10: . share share/mk tools/build/options X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jul 2014 14:04:37 -0000 Author: emaste Date: Tue Jul 8 14:04:36 2014 New Revision: 268399 URL: http://svnweb.freebsd.org/changeset/base/268399 Log: MFC r268022: Rename the WITHOUT_VT_SUPPORT knob to WITHOUT_VT The _SUPPORT knobs have a consistent meaning which differs from the behaviour controlled by this knob. As the knob is opt-out and has not appeared in a release the impact should be low. Added: stable/10/tools/build/options/WITHOUT_VT - copied unchanged from r268022, head/tools/build/options/WITHOUT_VT Deleted: stable/10/tools/build/options/WITHOUT_VT_SUPPORT Modified: stable/10/UPDATING stable/10/share/Makefile stable/10/share/mk/bsd.own.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/UPDATING ============================================================================== --- stable/10/UPDATING Tue Jul 8 13:28:37 2014 (r268398) +++ stable/10/UPDATING Tue Jul 8 14:04:36 2014 (r268399) @@ -16,6 +16,11 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20140708: + The WITHOUT_VT_SUPPORT kernel config knob has been renamed + WITHOUT_VT. (The other _SUPPORT knobs have a consistent meaning + which differs from the behaviour controlled by this knob.) + 20140608: On i386 and amd64 systems, the onifconsole flag is now set by default in /etc/ttys for ttyu0. This causes ttyu0 to be automatically enabled Modified: stable/10/share/Makefile ============================================================================== --- stable/10/share/Makefile Tue Jul 8 13:28:37 2014 (r268398) +++ stable/10/share/Makefile Tue Jul 8 14:04:36 2014 (r268399) @@ -86,7 +86,7 @@ _syscons= syscons _tests= tests .endif -.if ${MK_VT_SUPPORT} != "no" +.if ${MK_VT} != "no" _vt= vt .endif Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Tue Jul 8 13:28:37 2014 (r268398) +++ stable/10/share/mk/bsd.own.mk Tue Jul 8 14:04:36 2014 (r268399) @@ -358,7 +358,7 @@ __DEFAULT_YES_OPTIONS = \ UNBOUND \ USB \ UTMPX \ - VT_SUPPORT \ + VT \ WIRELESS \ WPA_SUPPLICANT_EAPOL \ ZFS \ Copied: stable/10/tools/build/options/WITHOUT_VT (from r268022, head/tools/build/options/WITHOUT_VT) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_VT Tue Jul 8 14:04:36 2014 (r268399, copy of r268022, head/tools/build/options/WITHOUT_VT) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not build +.Xr vt 4 +support files (fonts and keymaps). From owner-svn-src-stable@FreeBSD.ORG Tue Jul 8 14:11:28 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D49FF61F; Tue, 8 Jul 2014 14:11:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C15A726FF; Tue, 8 Jul 2014 14:11:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s68EBSrf097440; Tue, 8 Jul 2014 14:11:28 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s68EBSid097439; Tue, 8 Jul 2014 14:11:28 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201407081411.s68EBSid097439@svn.freebsd.org> From: Ed Maste Date: Tue, 8 Jul 2014 14:11:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268400 - stable/10/share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jul 2014 14:11:28 -0000 Author: emaste Date: Tue Jul 8 14:11:28 2014 New Revision: 268400 URL: http://svnweb.freebsd.org/changeset/base/268400 Log: Regen src.conf(5) after r268399 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 Tue Jul 8 14:04:36 2014 (r268399) +++ stable/10/share/man/man5/src.conf.5 Tue Jul 8 14:11:28 2014 (r268400) @@ -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 .\" $FreeBSD$ -.Dd April 14, 2014 +.Dd July 8, 2014 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1052,6 +1052,11 @@ Set to not build user accounting tools s .Xr lastlogin 8 and .Xr utx 8 . +.It Va WITHOUT_VT +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_VT 268399 2014-07-08 14:04:36Z emaste +Set to not build +.Xr vt 4 +support files (fonts and keymaps). .It Va WITHOUT_WIRELESS .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_WIRELESS 183242 2008-09-21 22:02:26Z sam Set to not build programs used for 802.11 wireless networks; especially From owner-svn-src-stable@FreeBSD.ORG Tue Jul 8 15:09:55 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 95DE548A; Tue, 8 Jul 2014 15:09:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 828A42DB1; Tue, 8 Jul 2014 15:09:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s68F9t9J023301; Tue, 8 Jul 2014 15:09:55 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s68F9tf4023300; Tue, 8 Jul 2014 15:09:55 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201407081509.s68F9tf4023300@svn.freebsd.org> From: Glen Barber Date: Tue, 8 Jul 2014 15:09:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268411 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jul 2014 15:09:55 -0000 Author: gjb Date: Tue Jul 8 15:09:55 2014 New Revision: 268411 URL: http://svnweb.freebsd.org/changeset/base/268411 Log: Document r268161, mkimg(1) merged to stable/10. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jul 8 15:04:35 2014 (r268410) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jul 8 15:09:55 2014 (r268411) @@ -265,6 +265,9 @@ device is an active kernel console, otherwise it is equivalent to off. + The &man.mkimg.1; utility has been merged + from &os;-CURRENT. + <filename>/etc/rc.d</filename> Scripts From owner-svn-src-stable@FreeBSD.ORG Tue Jul 8 15:11:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DCCF46D2; Tue, 8 Jul 2014 15:11:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C95D22E39; Tue, 8 Jul 2014 15:11:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s68FBXsf026402; Tue, 8 Jul 2014 15:11:33 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s68FBXq6026401; Tue, 8 Jul 2014 15:11:33 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201407081511.s68FBXq6026401@svn.freebsd.org> From: Glen Barber Date: Tue, 8 Jul 2014 15:11:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268412 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jul 2014 15:11:34 -0000 Author: gjb Date: Tue Jul 8 15:11:33 2014 New Revision: 268412 URL: http://svnweb.freebsd.org/changeset/base/268412 Log: Document r268091, disklabel64 partition scheme. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jul 8 15:09:55 2014 (r268411) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jul 8 15:11:33 2014 (r268412) @@ -217,8 +217,9 @@ Disks and Storage -   - + Support for the + disklabel64 partitioning scheme has been + added to &man.gpart.8;. From owner-svn-src-stable@FreeBSD.ORG Tue Jul 8 15:30:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C22AFFE5; Tue, 8 Jul 2014 15:30:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEE682F87; Tue, 8 Jul 2014 15:30:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s68FU5hQ032933; Tue, 8 Jul 2014 15:30:05 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s68FU5Dc032932; Tue, 8 Jul 2014 15:30:05 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201407081530.s68FU5Dc032932@svn.freebsd.org> From: Brooks Davis Date: Tue, 8 Jul 2014 15:30:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r268415 - stable/8/sys/geom X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jul 2014 15:30:05 -0000 Author: brooks Date: Tue Jul 8 15:30:05 2014 New Revision: 268415 URL: http://svnweb.freebsd.org/changeset/base/268415 Log: MFC r223930: Remove include of sys/sbuf.h from geom/geom.h. sbuf support is not always required for geom/geom.h users, and no need to depend from it. PR: 158398 Modified: stable/8/sys/geom/geom.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/geom/ (props changed) Modified: stable/8/sys/geom/geom.h ============================================================================== --- stable/8/sys/geom/geom.h Tue Jul 8 15:14:39 2014 (r268414) +++ stable/8/sys/geom/geom.h Tue Jul 8 15:30:05 2014 (r268415) @@ -44,7 +44,6 @@ #include #include #include -#include #include struct g_class; From owner-svn-src-stable@FreeBSD.ORG Tue Jul 8 19:15:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A95FF9CD; Tue, 8 Jul 2014 19:15:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96232269A; Tue, 8 Jul 2014 19:15:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s68JFWs4041151; Tue, 8 Jul 2014 19:15:32 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s68JFWxb041150; Tue, 8 Jul 2014 19:15:32 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201407081915.s68JFWxb041150@svn.freebsd.org> From: Brooks Davis Date: Tue, 8 Jul 2014 19:15:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r268422 - stable/8/sys/geom X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jul 2014 19:15:32 -0000 Author: brooks Date: Tue Jul 8 19:15:32 2014 New Revision: 268422 URL: http://svnweb.freebsd.org/changeset/base/268422 Log: Revert r268415. I botched testing and a large set of changes needs to be applied for this to work. Modified: stable/8/sys/geom/geom.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/geom/ (props changed) Modified: stable/8/sys/geom/geom.h ============================================================================== --- stable/8/sys/geom/geom.h Tue Jul 8 18:51:03 2014 (r268421) +++ stable/8/sys/geom/geom.h Tue Jul 8 19:15:32 2014 (r268422) @@ -44,6 +44,7 @@ #include #include #include +#include #include struct g_class; From owner-svn-src-stable@FreeBSD.ORG Tue Jul 8 21:54:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D903E418; Tue, 8 Jul 2014 21:54:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B991625E3; Tue, 8 Jul 2014 21:54:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s68LspVV019067; Tue, 8 Jul 2014 21:54:51 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s68LsoZL019063; Tue, 8 Jul 2014 21:54:50 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201407082154.s68LsoZL019063@svn.freebsd.org> From: Xin LI Date: Tue, 8 Jul 2014 21:54:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268432 - in stable: 10/sys/kern 10/sys/netinet 8/sys/kern 8/sys/netinet 9/sys/kern 9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jul 2014 21:54:52 -0000 Author: delphij Date: Tue Jul 8 21:54:50 2014 New Revision: 268432 URL: http://svnweb.freebsd.org/changeset/base/268432 Log: Fix kernel memory disclosure in control message and SCTP notifications. Security: FreeBSD-SA-14:17.kmem Security: CVE-2014-3952, CVE-2014-3953 Modified: stable/9/sys/kern/uipc_sockbuf.c stable/9/sys/netinet/sctp_auth.c stable/9/sys/netinet/sctp_indata.c stable/9/sys/netinet/sctputil.c Changes in other areas also in this revision: Modified: stable/10/sys/kern/uipc_sockbuf.c stable/10/sys/netinet/sctp_auth.c stable/10/sys/netinet/sctp_indata.c stable/10/sys/netinet/sctputil.c stable/8/sys/kern/uipc_sockbuf.c stable/8/sys/netinet/sctp_auth.c stable/8/sys/netinet/sctp_indata.c stable/8/sys/netinet/sctputil.c Modified: stable/9/sys/kern/uipc_sockbuf.c ============================================================================== --- stable/9/sys/kern/uipc_sockbuf.c Tue Jul 8 21:54:27 2014 (r268431) +++ stable/9/sys/kern/uipc_sockbuf.c Tue Jul 8 21:54:50 2014 (r268432) @@ -1045,6 +1045,11 @@ sbcreatecontrol(caddr_t p, int size, int m->m_len = 0; KASSERT(CMSG_SPACE((u_int)size) <= M_TRAILINGSPACE(m), ("sbcreatecontrol: short mbuf")); + /* + * Don't leave the padding between the msg header and the + * cmsg data and the padding after the cmsg data un-initialized. + */ + bzero(cp, CMSG_SPACE((u_int)size)); if (p != NULL) (void)memcpy(CMSG_DATA(cp), p, size); m->m_len = CMSG_SPACE(size); Modified: stable/9/sys/netinet/sctp_auth.c ============================================================================== --- stable/9/sys/netinet/sctp_auth.c Tue Jul 8 21:54:27 2014 (r268431) +++ stable/9/sys/netinet/sctp_auth.c Tue Jul 8 21:54:50 2014 (r268432) @@ -1790,6 +1790,7 @@ sctp_notify_authentication(struct sctp_t SCTP_BUF_LEN(m_notify) = 0; auth = mtod(m_notify, struct sctp_authkey_event *); + memset(auth, 0, sizeof(struct sctp_authkey_event)); auth->auth_type = SCTP_AUTHENTICATION_EVENT; auth->auth_flags = 0; auth->auth_length = sizeof(*auth); Modified: stable/9/sys/netinet/sctp_indata.c ============================================================================== --- stable/9/sys/netinet/sctp_indata.c Tue Jul 8 21:54:27 2014 (r268431) +++ stable/9/sys/netinet/sctp_indata.c Tue Jul 8 21:54:50 2014 (r268432) @@ -250,6 +250,11 @@ sctp_build_ctl_nchunk(struct sctp_inpcb /* We need a CMSG header followed by the struct */ cmh = mtod(ret, struct cmsghdr *); + /* + * Make sure that there is no un-initialized padding between the + * cmsg header and cmsg data and after the cmsg data. + */ + memset(cmh, 0, len); if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_RECVRCVINFO)) { cmh->cmsg_level = IPPROTO_SCTP; cmh->cmsg_len = CMSG_LEN(sizeof(struct sctp_rcvinfo)); Modified: stable/9/sys/netinet/sctputil.c ============================================================================== --- stable/9/sys/netinet/sctputil.c Tue Jul 8 21:54:27 2014 (r268431) +++ stable/9/sys/netinet/sctputil.c Tue Jul 8 21:54:50 2014 (r268432) @@ -2622,6 +2622,7 @@ sctp_notify_assoc_change(uint16_t state, } SCTP_BUF_NEXT(m_notify) = NULL; sac = mtod(m_notify, struct sctp_assoc_change *); + memset(sac, 0, notif_len); sac->sac_type = SCTP_ASSOC_CHANGE; sac->sac_flags = 0; sac->sac_length = sizeof(struct sctp_assoc_change); @@ -2835,21 +2836,21 @@ sctp_notify_send_failed(struct sctp_tcb if (m_notify == NULL) /* no space left */ return; - length += chk->send_size; - length -= sizeof(struct sctp_data_chunk); SCTP_BUF_LEN(m_notify) = 0; if (sctp_stcb_is_feature_on(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVNSENDFAILEVNT)) { ssfe = mtod(m_notify, struct sctp_send_failed_event *); + memset(ssfe, 0, length); ssfe->ssfe_type = SCTP_SEND_FAILED_EVENT; if (sent) { ssfe->ssfe_flags = SCTP_DATA_SENT; } else { ssfe->ssfe_flags = SCTP_DATA_UNSENT; } + length += chk->send_size; + length -= sizeof(struct sctp_data_chunk); ssfe->ssfe_length = length; ssfe->ssfe_error = error; /* not exactly what the user sent in, but should be close :) */ - bzero(&ssfe->ssfe_info, sizeof(ssfe->ssfe_info)); ssfe->ssfe_info.snd_sid = chk->rec.data.stream_number; ssfe->ssfe_info.snd_flags = chk->rec.data.rcv_flags; ssfe->ssfe_info.snd_ppid = chk->rec.data.payloadtype; @@ -2859,12 +2860,15 @@ sctp_notify_send_failed(struct sctp_tcb SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_send_failed_event); } else { ssf = mtod(m_notify, struct sctp_send_failed *); + memset(ssf, 0, length); ssf->ssf_type = SCTP_SEND_FAILED; if (sent) { ssf->ssf_flags = SCTP_DATA_SENT; } else { ssf->ssf_flags = SCTP_DATA_UNSENT; } + length += chk->send_size; + length -= sizeof(struct sctp_data_chunk); ssf->ssf_length = length; ssf->ssf_error = error; /* not exactly what the user sent in, but should be close :) */ @@ -2948,16 +2952,16 @@ sctp_notify_send_failed2(struct sctp_tcb /* no space left */ return; } - length += sp->length; SCTP_BUF_LEN(m_notify) = 0; if (sctp_stcb_is_feature_on(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVNSENDFAILEVNT)) { ssfe = mtod(m_notify, struct sctp_send_failed_event *); + memset(ssfe, 0, length); ssfe->ssfe_type = SCTP_SEND_FAILED_EVENT; ssfe->ssfe_flags = SCTP_DATA_UNSENT; + length += sp->length; ssfe->ssfe_length = length; ssfe->ssfe_error = error; /* not exactly what the user sent in, but should be close :) */ - bzero(&ssfe->ssfe_info, sizeof(ssfe->ssfe_info)); ssfe->ssfe_info.snd_sid = sp->stream; if (sp->some_taken) { ssfe->ssfe_info.snd_flags = SCTP_DATA_LAST_FRAG; @@ -2971,12 +2975,13 @@ sctp_notify_send_failed2(struct sctp_tcb SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_send_failed_event); } else { ssf = mtod(m_notify, struct sctp_send_failed *); + memset(ssf, 0, length); ssf->ssf_type = SCTP_SEND_FAILED; ssf->ssf_flags = SCTP_DATA_UNSENT; + length += sp->length; ssf->ssf_length = length; ssf->ssf_error = error; /* not exactly what the user sent in, but should be close :) */ - bzero(&ssf->ssf_info, sizeof(ssf->ssf_info)); ssf->ssf_info.sinfo_stream = sp->stream; ssf->ssf_info.sinfo_ssn = 0; if (sp->some_taken) { @@ -3038,6 +3043,7 @@ sctp_notify_adaptation_layer(struct sctp return; SCTP_BUF_LEN(m_notify) = 0; sai = mtod(m_notify, struct sctp_adaptation_event *); + memset(sai, 0, sizeof(struct sctp_adaptation_event)); sai->sai_type = SCTP_ADAPTATION_INDICATION; sai->sai_flags = 0; sai->sai_length = sizeof(struct sctp_adaptation_event); @@ -3093,6 +3099,7 @@ sctp_notify_partial_delivery_indication( return; SCTP_BUF_LEN(m_notify) = 0; pdapi = mtod(m_notify, struct sctp_pdapi_event *); + memset(pdapi, 0, sizeof(struct sctp_pdapi_event)); pdapi->pdapi_type = SCTP_PARTIAL_DELIVERY_EVENT; pdapi->pdapi_flags = 0; pdapi->pdapi_length = sizeof(struct sctp_pdapi_event); @@ -3202,6 +3209,7 @@ sctp_notify_shutdown_event(struct sctp_t /* no space left */ return; sse = mtod(m_notify, struct sctp_shutdown_event *); + memset(sse, 0, sizeof(struct sctp_shutdown_event)); sse->sse_type = SCTP_SHUTDOWN_EVENT; sse->sse_flags = 0; sse->sse_length = sizeof(struct sctp_shutdown_event); @@ -3252,6 +3260,7 @@ sctp_notify_sender_dry_event(struct sctp } SCTP_BUF_LEN(m_notify) = 0; event = mtod(m_notify, struct sctp_sender_dry_event *); + memset(event, 0, sizeof(struct sctp_sender_dry_event)); event->sender_dry_type = SCTP_SENDER_DRY_EVENT; event->sender_dry_flags = 0; event->sender_dry_length = sizeof(struct sctp_sender_dry_event); @@ -3284,7 +3293,6 @@ sctp_notify_stream_reset_add(struct sctp struct mbuf *m_notify; struct sctp_queued_to_read *control; struct sctp_stream_change_event *stradd; - int len; if ((stcb == NULL) || (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_STREAM_CHANGEEVNT))) { @@ -3297,25 +3305,20 @@ sctp_notify_stream_reset_add(struct sctp return; } stcb->asoc.peer_req_out = 0; - m_notify = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_DONTWAIT, 1, MT_DATA); + m_notify = sctp_get_mbuf_for_msg(sizeof(struct sctp_stream_change_event), 0, M_DONTWAIT, 1, MT_DATA); if (m_notify == NULL) /* no space left */ return; SCTP_BUF_LEN(m_notify) = 0; - len = sizeof(struct sctp_stream_change_event); - if (len > M_TRAILINGSPACE(m_notify)) { - /* never enough room */ - sctp_m_freem(m_notify); - return; - } stradd = mtod(m_notify, struct sctp_stream_change_event *); + memset(stradd, 0, sizeof(struct sctp_stream_change_event)); stradd->strchange_type = SCTP_STREAM_CHANGE_EVENT; stradd->strchange_flags = flag; - stradd->strchange_length = len; + stradd->strchange_length = sizeof(struct sctp_stream_change_event); stradd->strchange_assoc_id = sctp_get_associd(stcb); stradd->strchange_instrms = numberin; stradd->strchange_outstrms = numberout; - SCTP_BUF_LEN(m_notify) = len; + SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_stream_change_event); SCTP_BUF_NEXT(m_notify) = NULL; if (sctp_sbspace(&stcb->asoc, &stcb->sctp_socket->so_rcv) < SCTP_BUF_LEN(m_notify)) { /* no space */ @@ -3346,32 +3349,26 @@ sctp_notify_stream_reset_tsn(struct sctp struct mbuf *m_notify; struct sctp_queued_to_read *control; struct sctp_assoc_reset_event *strasoc; - int len; if ((stcb == NULL) || (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_ASSOC_RESETEVNT))) { /* event not enabled */ return; } - m_notify = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_DONTWAIT, 1, MT_DATA); + m_notify = sctp_get_mbuf_for_msg(sizeof(struct sctp_assoc_reset_event), 0, M_DONTWAIT, 1, MT_DATA); if (m_notify == NULL) /* no space left */ return; SCTP_BUF_LEN(m_notify) = 0; - len = sizeof(struct sctp_assoc_reset_event); - if (len > M_TRAILINGSPACE(m_notify)) { - /* never enough room */ - sctp_m_freem(m_notify); - return; - } strasoc = mtod(m_notify, struct sctp_assoc_reset_event *); + memset(strasoc, 0, sizeof(struct sctp_assoc_reset_event)); strasoc->assocreset_type = SCTP_ASSOC_RESET_EVENT; strasoc->assocreset_flags = flag; - strasoc->assocreset_length = len; + strasoc->assocreset_length = sizeof(struct sctp_assoc_reset_event); strasoc->assocreset_assoc_id = sctp_get_associd(stcb); strasoc->assocreset_local_tsn = sending_tsn; strasoc->assocreset_remote_tsn = recv_tsn; - SCTP_BUF_LEN(m_notify) = len; + SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_assoc_reset_event); SCTP_BUF_NEXT(m_notify) = NULL; if (sctp_sbspace(&stcb->asoc, &stcb->sctp_socket->so_rcv) < SCTP_BUF_LEN(m_notify)) { /* no space */ @@ -3424,6 +3421,7 @@ sctp_notify_stream_reset(struct sctp_tcb return; } strreset = mtod(m_notify, struct sctp_stream_reset_event *); + memset(strreset, 0, len); strreset->strreset_type = SCTP_STREAM_RESET_EVENT; strreset->strreset_flags = flag; strreset->strreset_length = len; @@ -6236,9 +6234,12 @@ sctp_soreceive(struct socket *so, fromlen = 0; } + if (filling_sinfo) { + memset(&sinfo, 0, sizeof(struct sctp_extrcvinfo)); + } error = sctp_sorecvmsg(so, uio, mp0, from, fromlen, flagsp, (struct sctp_sndrcvinfo *)&sinfo, filling_sinfo); - if ((controlp) && (filling_sinfo)) { + if (controlp != NULL) { /* copy back the sinfo in a CMSG format */ if (filling_sinfo) *controlp = sctp_build_ctl_nchunk(inp, From owner-svn-src-stable@FreeBSD.ORG Tue Jul 8 21:54:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5C2E419; Tue, 8 Jul 2014 21:54:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B744325E4; Tue, 8 Jul 2014 21:54:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s68LsqSN019078; Tue, 8 Jul 2014 21:54:52 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s68LspBG019074; Tue, 8 Jul 2014 21:54:51 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201407082154.s68LspBG019074@svn.freebsd.org> From: Xin LI Date: Tue, 8 Jul 2014 21:54:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r268432 - in stable: 10/sys/kern 10/sys/netinet 8/sys/kern 8/sys/netinet 9/sys/kern 9/sys/netinet X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jul 2014 21:54:53 -0000 Author: delphij Date: Tue Jul 8 21:54:50 2014 New Revision: 268432 URL: http://svnweb.freebsd.org/changeset/base/268432 Log: Fix kernel memory disclosure in control message and SCTP notifications. Security: FreeBSD-SA-14:17.kmem Security: CVE-2014-3952, CVE-2014-3953 Modified: stable/8/sys/kern/uipc_sockbuf.c stable/8/sys/netinet/sctp_auth.c stable/8/sys/netinet/sctp_indata.c stable/8/sys/netinet/sctputil.c Changes in other areas also in this revision: Modified: stable/10/sys/kern/uipc_sockbuf.c stable/10/sys/netinet/sctp_auth.c stable/10/sys/netinet/sctp_indata.c stable/10/sys/netinet/sctputil.c stable/9/sys/kern/uipc_sockbuf.c stable/9/sys/netinet/sctp_auth.c stable/9/sys/netinet/sctp_indata.c stable/9/sys/netinet/sctputil.c Modified: stable/8/sys/kern/uipc_sockbuf.c ============================================================================== --- stable/8/sys/kern/uipc_sockbuf.c Tue Jul 8 21:54:27 2014 (r268431) +++ stable/8/sys/kern/uipc_sockbuf.c Tue Jul 8 21:54:50 2014 (r268432) @@ -1018,6 +1018,11 @@ sbcreatecontrol(caddr_t p, int size, int m->m_len = 0; KASSERT(CMSG_SPACE((u_int)size) <= M_TRAILINGSPACE(m), ("sbcreatecontrol: short mbuf")); + /* + * Don't leave the padding between the msg header and the + * cmsg data and the padding after the cmsg data un-initialized. + */ + bzero(cp, CMSG_SPACE((u_int)size)); if (p != NULL) (void)memcpy(CMSG_DATA(cp), p, size); m->m_len = CMSG_SPACE(size); Modified: stable/8/sys/netinet/sctp_auth.c ============================================================================== --- stable/8/sys/netinet/sctp_auth.c Tue Jul 8 21:54:27 2014 (r268431) +++ stable/8/sys/netinet/sctp_auth.c Tue Jul 8 21:54:50 2014 (r268432) @@ -1876,6 +1876,7 @@ sctp_notify_authentication(struct sctp_t SCTP_BUF_LEN(m_notify) = 0; auth = mtod(m_notify, struct sctp_authkey_event *); + memset(auth, 0, sizeof(struct sctp_authkey_event)); auth->auth_type = SCTP_AUTHENTICATION_EVENT; auth->auth_flags = 0; auth->auth_length = sizeof(*auth); Modified: stable/8/sys/netinet/sctp_indata.c ============================================================================== --- stable/8/sys/netinet/sctp_indata.c Tue Jul 8 21:54:27 2014 (r268431) +++ stable/8/sys/netinet/sctp_indata.c Tue Jul 8 21:54:50 2014 (r268432) @@ -250,6 +250,11 @@ sctp_build_ctl_nchunk(struct sctp_inpcb /* We need a CMSG header followed by the struct */ cmh = mtod(ret, struct cmsghdr *); + /* + * Make sure that there is no un-initialized padding between the + * cmsg header and cmsg data and after the cmsg data. + */ + memset(cmh, 0, len); if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_RECVRCVINFO)) { cmh->cmsg_level = IPPROTO_SCTP; cmh->cmsg_len = CMSG_LEN(sizeof(struct sctp_rcvinfo)); Modified: stable/8/sys/netinet/sctputil.c ============================================================================== --- stable/8/sys/netinet/sctputil.c Tue Jul 8 21:54:27 2014 (r268431) +++ stable/8/sys/netinet/sctputil.c Tue Jul 8 21:54:50 2014 (r268432) @@ -2622,6 +2622,7 @@ sctp_notify_assoc_change(uint16_t state, } SCTP_BUF_NEXT(m_notify) = NULL; sac = mtod(m_notify, struct sctp_assoc_change *); + memset(sac, 0, notif_len); sac->sac_type = SCTP_ASSOC_CHANGE; sac->sac_flags = 0; sac->sac_length = sizeof(struct sctp_assoc_change); @@ -2835,21 +2836,21 @@ sctp_notify_send_failed(struct sctp_tcb if (m_notify == NULL) /* no space left */ return; - length += chk->send_size; - length -= sizeof(struct sctp_data_chunk); SCTP_BUF_LEN(m_notify) = 0; if (sctp_stcb_is_feature_on(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVNSENDFAILEVNT)) { ssfe = mtod(m_notify, struct sctp_send_failed_event *); + memset(ssfe, 0, length); ssfe->ssfe_type = SCTP_SEND_FAILED_EVENT; if (sent) { ssfe->ssfe_flags = SCTP_DATA_SENT; } else { ssfe->ssfe_flags = SCTP_DATA_UNSENT; } + length += chk->send_size; + length -= sizeof(struct sctp_data_chunk); ssfe->ssfe_length = length; ssfe->ssfe_error = error; /* not exactly what the user sent in, but should be close :) */ - bzero(&ssfe->ssfe_info, sizeof(ssfe->ssfe_info)); ssfe->ssfe_info.snd_sid = chk->rec.data.stream_number; ssfe->ssfe_info.snd_flags = chk->rec.data.rcv_flags; ssfe->ssfe_info.snd_ppid = chk->rec.data.payloadtype; @@ -2859,12 +2860,15 @@ sctp_notify_send_failed(struct sctp_tcb SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_send_failed_event); } else { ssf = mtod(m_notify, struct sctp_send_failed *); + memset(ssf, 0, length); ssf->ssf_type = SCTP_SEND_FAILED; if (sent) { ssf->ssf_flags = SCTP_DATA_SENT; } else { ssf->ssf_flags = SCTP_DATA_UNSENT; } + length += chk->send_size; + length -= sizeof(struct sctp_data_chunk); ssf->ssf_length = length; ssf->ssf_error = error; /* not exactly what the user sent in, but should be close :) */ @@ -2948,16 +2952,16 @@ sctp_notify_send_failed2(struct sctp_tcb /* no space left */ return; } - length += sp->length; SCTP_BUF_LEN(m_notify) = 0; if (sctp_stcb_is_feature_on(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVNSENDFAILEVNT)) { ssfe = mtod(m_notify, struct sctp_send_failed_event *); + memset(ssfe, 0, length); ssfe->ssfe_type = SCTP_SEND_FAILED_EVENT; ssfe->ssfe_flags = SCTP_DATA_UNSENT; + length += sp->length; ssfe->ssfe_length = length; ssfe->ssfe_error = error; /* not exactly what the user sent in, but should be close :) */ - bzero(&ssfe->ssfe_info, sizeof(ssfe->ssfe_info)); ssfe->ssfe_info.snd_sid = sp->stream; if (sp->some_taken) { ssfe->ssfe_info.snd_flags = SCTP_DATA_LAST_FRAG; @@ -2971,12 +2975,13 @@ sctp_notify_send_failed2(struct sctp_tcb SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_send_failed_event); } else { ssf = mtod(m_notify, struct sctp_send_failed *); + memset(ssf, 0, length); ssf->ssf_type = SCTP_SEND_FAILED; ssf->ssf_flags = SCTP_DATA_UNSENT; + length += sp->length; ssf->ssf_length = length; ssf->ssf_error = error; /* not exactly what the user sent in, but should be close :) */ - bzero(&ssf->ssf_info, sizeof(ssf->ssf_info)); ssf->ssf_info.sinfo_stream = sp->stream; ssf->ssf_info.sinfo_ssn = 0; if (sp->some_taken) { @@ -3038,6 +3043,7 @@ sctp_notify_adaptation_layer(struct sctp return; SCTP_BUF_LEN(m_notify) = 0; sai = mtod(m_notify, struct sctp_adaptation_event *); + memset(sai, 0, sizeof(struct sctp_adaptation_event)); sai->sai_type = SCTP_ADAPTATION_INDICATION; sai->sai_flags = 0; sai->sai_length = sizeof(struct sctp_adaptation_event); @@ -3093,6 +3099,7 @@ sctp_notify_partial_delivery_indication( return; SCTP_BUF_LEN(m_notify) = 0; pdapi = mtod(m_notify, struct sctp_pdapi_event *); + memset(pdapi, 0, sizeof(struct sctp_pdapi_event)); pdapi->pdapi_type = SCTP_PARTIAL_DELIVERY_EVENT; pdapi->pdapi_flags = 0; pdapi->pdapi_length = sizeof(struct sctp_pdapi_event); @@ -3202,6 +3209,7 @@ sctp_notify_shutdown_event(struct sctp_t /* no space left */ return; sse = mtod(m_notify, struct sctp_shutdown_event *); + memset(sse, 0, sizeof(struct sctp_shutdown_event)); sse->sse_type = SCTP_SHUTDOWN_EVENT; sse->sse_flags = 0; sse->sse_length = sizeof(struct sctp_shutdown_event); @@ -3252,6 +3260,7 @@ sctp_notify_sender_dry_event(struct sctp } SCTP_BUF_LEN(m_notify) = 0; event = mtod(m_notify, struct sctp_sender_dry_event *); + memset(event, 0, sizeof(struct sctp_sender_dry_event)); event->sender_dry_type = SCTP_SENDER_DRY_EVENT; event->sender_dry_flags = 0; event->sender_dry_length = sizeof(struct sctp_sender_dry_event); @@ -3284,7 +3293,6 @@ sctp_notify_stream_reset_add(struct sctp struct mbuf *m_notify; struct sctp_queued_to_read *control; struct sctp_stream_change_event *stradd; - int len; if ((stcb == NULL) || (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_STREAM_CHANGEEVNT))) { @@ -3297,25 +3305,20 @@ sctp_notify_stream_reset_add(struct sctp return; } stcb->asoc.peer_req_out = 0; - m_notify = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_DONTWAIT, 1, MT_DATA); + m_notify = sctp_get_mbuf_for_msg(sizeof(struct sctp_stream_change_event), 0, M_DONTWAIT, 1, MT_DATA); if (m_notify == NULL) /* no space left */ return; SCTP_BUF_LEN(m_notify) = 0; - len = sizeof(struct sctp_stream_change_event); - if (len > M_TRAILINGSPACE(m_notify)) { - /* never enough room */ - sctp_m_freem(m_notify); - return; - } stradd = mtod(m_notify, struct sctp_stream_change_event *); + memset(stradd, 0, sizeof(struct sctp_stream_change_event)); stradd->strchange_type = SCTP_STREAM_CHANGE_EVENT; stradd->strchange_flags = flag; - stradd->strchange_length = len; + stradd->strchange_length = sizeof(struct sctp_stream_change_event); stradd->strchange_assoc_id = sctp_get_associd(stcb); stradd->strchange_instrms = numberin; stradd->strchange_outstrms = numberout; - SCTP_BUF_LEN(m_notify) = len; + SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_stream_change_event); SCTP_BUF_NEXT(m_notify) = NULL; if (sctp_sbspace(&stcb->asoc, &stcb->sctp_socket->so_rcv) < SCTP_BUF_LEN(m_notify)) { /* no space */ @@ -3346,32 +3349,26 @@ sctp_notify_stream_reset_tsn(struct sctp struct mbuf *m_notify; struct sctp_queued_to_read *control; struct sctp_assoc_reset_event *strasoc; - int len; if ((stcb == NULL) || (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_ASSOC_RESETEVNT))) { /* event not enabled */ return; } - m_notify = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_DONTWAIT, 1, MT_DATA); + m_notify = sctp_get_mbuf_for_msg(sizeof(struct sctp_assoc_reset_event), 0, M_DONTWAIT, 1, MT_DATA); if (m_notify == NULL) /* no space left */ return; SCTP_BUF_LEN(m_notify) = 0; - len = sizeof(struct sctp_assoc_reset_event); - if (len > M_TRAILINGSPACE(m_notify)) { - /* never enough room */ - sctp_m_freem(m_notify); - return; - } strasoc = mtod(m_notify, struct sctp_assoc_reset_event *); + memset(strasoc, 0, sizeof(struct sctp_assoc_reset_event)); strasoc->assocreset_type = SCTP_ASSOC_RESET_EVENT; strasoc->assocreset_flags = flag; - strasoc->assocreset_length = len; + strasoc->assocreset_length = sizeof(struct sctp_assoc_reset_event); strasoc->assocreset_assoc_id = sctp_get_associd(stcb); strasoc->assocreset_local_tsn = sending_tsn; strasoc->assocreset_remote_tsn = recv_tsn; - SCTP_BUF_LEN(m_notify) = len; + SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_assoc_reset_event); SCTP_BUF_NEXT(m_notify) = NULL; if (sctp_sbspace(&stcb->asoc, &stcb->sctp_socket->so_rcv) < SCTP_BUF_LEN(m_notify)) { /* no space */ @@ -3424,6 +3421,7 @@ sctp_notify_stream_reset(struct sctp_tcb return; } strreset = mtod(m_notify, struct sctp_stream_reset_event *); + memset(strreset, 0, len); strreset->strreset_type = SCTP_STREAM_RESET_EVENT; strreset->strreset_flags = flag; strreset->strreset_length = len; @@ -6215,9 +6213,12 @@ sctp_soreceive(struct socket *so, fromlen = 0; } + if (filling_sinfo) { + memset(&sinfo, 0, sizeof(struct sctp_extrcvinfo)); + } error = sctp_sorecvmsg(so, uio, mp0, from, fromlen, flagsp, (struct sctp_sndrcvinfo *)&sinfo, filling_sinfo); - if ((controlp) && (filling_sinfo)) { + if (controlp != NULL) { /* copy back the sinfo in a CMSG format */ if (filling_sinfo) *controlp = sctp_build_ctl_nchunk(inp, From owner-svn-src-stable@FreeBSD.ORG Tue Jul 8 21:54:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B32F84ED; Tue, 8 Jul 2014 21:54:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B273825E5; Tue, 8 Jul 2014 21:54:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s68Lsrvf019088; Tue, 8 Jul 2014 21:54:53 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s68LsqlS019083; Tue, 8 Jul 2014 21:54:52 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201407082154.s68LsqlS019083@svn.freebsd.org> From: Xin LI Date: Tue, 8 Jul 2014 21:54:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268432 - in stable: 10/sys/kern 10/sys/netinet 8/sys/kern 8/sys/netinet 9/sys/kern 9/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jul 2014 21:54:54 -0000 Author: delphij Date: Tue Jul 8 21:54:50 2014 New Revision: 268432 URL: http://svnweb.freebsd.org/changeset/base/268432 Log: Fix kernel memory disclosure in control message and SCTP notifications. Security: FreeBSD-SA-14:17.kmem Security: CVE-2014-3952, CVE-2014-3953 Modified: stable/10/sys/kern/uipc_sockbuf.c stable/10/sys/netinet/sctp_auth.c stable/10/sys/netinet/sctp_indata.c stable/10/sys/netinet/sctputil.c Changes in other areas also in this revision: Modified: stable/8/sys/kern/uipc_sockbuf.c stable/8/sys/netinet/sctp_auth.c stable/8/sys/netinet/sctp_indata.c stable/8/sys/netinet/sctputil.c stable/9/sys/kern/uipc_sockbuf.c stable/9/sys/netinet/sctp_auth.c stable/9/sys/netinet/sctp_indata.c stable/9/sys/netinet/sctputil.c Modified: stable/10/sys/kern/uipc_sockbuf.c ============================================================================== --- stable/10/sys/kern/uipc_sockbuf.c Tue Jul 8 21:54:27 2014 (r268431) +++ stable/10/sys/kern/uipc_sockbuf.c Tue Jul 8 21:54:50 2014 (r268432) @@ -1071,6 +1071,11 @@ sbcreatecontrol(caddr_t p, int size, int m->m_len = 0; KASSERT(CMSG_SPACE((u_int)size) <= M_TRAILINGSPACE(m), ("sbcreatecontrol: short mbuf")); + /* + * Don't leave the padding between the msg header and the + * cmsg data and the padding after the cmsg data un-initialized. + */ + bzero(cp, CMSG_SPACE((u_int)size)); if (p != NULL) (void)memcpy(CMSG_DATA(cp), p, size); m->m_len = CMSG_SPACE(size); Modified: stable/10/sys/netinet/sctp_auth.c ============================================================================== --- stable/10/sys/netinet/sctp_auth.c Tue Jul 8 21:54:27 2014 (r268431) +++ stable/10/sys/netinet/sctp_auth.c Tue Jul 8 21:54:50 2014 (r268432) @@ -1790,6 +1790,7 @@ sctp_notify_authentication(struct sctp_t SCTP_BUF_LEN(m_notify) = 0; auth = mtod(m_notify, struct sctp_authkey_event *); + memset(auth, 0, sizeof(struct sctp_authkey_event)); auth->auth_type = SCTP_AUTHENTICATION_EVENT; auth->auth_flags = 0; auth->auth_length = sizeof(*auth); Modified: stable/10/sys/netinet/sctp_indata.c ============================================================================== --- stable/10/sys/netinet/sctp_indata.c Tue Jul 8 21:54:27 2014 (r268431) +++ stable/10/sys/netinet/sctp_indata.c Tue Jul 8 21:54:50 2014 (r268432) @@ -250,6 +250,11 @@ sctp_build_ctl_nchunk(struct sctp_inpcb /* We need a CMSG header followed by the struct */ cmh = mtod(ret, struct cmsghdr *); + /* + * Make sure that there is no un-initialized padding between the + * cmsg header and cmsg data and after the cmsg data. + */ + memset(cmh, 0, len); if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_RECVRCVINFO)) { cmh->cmsg_level = IPPROTO_SCTP; cmh->cmsg_len = CMSG_LEN(sizeof(struct sctp_rcvinfo)); Modified: stable/10/sys/netinet/sctputil.c ============================================================================== --- stable/10/sys/netinet/sctputil.c Tue Jul 8 21:54:27 2014 (r268431) +++ stable/10/sys/netinet/sctputil.c Tue Jul 8 21:54:50 2014 (r268432) @@ -2622,6 +2622,7 @@ sctp_notify_assoc_change(uint16_t state, } SCTP_BUF_NEXT(m_notify) = NULL; sac = mtod(m_notify, struct sctp_assoc_change *); + memset(sac, 0, notif_len); sac->sac_type = SCTP_ASSOC_CHANGE; sac->sac_flags = 0; sac->sac_length = sizeof(struct sctp_assoc_change); @@ -2835,21 +2836,21 @@ sctp_notify_send_failed(struct sctp_tcb if (m_notify == NULL) /* no space left */ return; - length += chk->send_size; - length -= sizeof(struct sctp_data_chunk); SCTP_BUF_LEN(m_notify) = 0; if (sctp_stcb_is_feature_on(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVNSENDFAILEVNT)) { ssfe = mtod(m_notify, struct sctp_send_failed_event *); + memset(ssfe, 0, length); ssfe->ssfe_type = SCTP_SEND_FAILED_EVENT; if (sent) { ssfe->ssfe_flags = SCTP_DATA_SENT; } else { ssfe->ssfe_flags = SCTP_DATA_UNSENT; } + length += chk->send_size; + length -= sizeof(struct sctp_data_chunk); ssfe->ssfe_length = length; ssfe->ssfe_error = error; /* not exactly what the user sent in, but should be close :) */ - bzero(&ssfe->ssfe_info, sizeof(ssfe->ssfe_info)); ssfe->ssfe_info.snd_sid = chk->rec.data.stream_number; ssfe->ssfe_info.snd_flags = chk->rec.data.rcv_flags; ssfe->ssfe_info.snd_ppid = chk->rec.data.payloadtype; @@ -2859,12 +2860,15 @@ sctp_notify_send_failed(struct sctp_tcb SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_send_failed_event); } else { ssf = mtod(m_notify, struct sctp_send_failed *); + memset(ssf, 0, length); ssf->ssf_type = SCTP_SEND_FAILED; if (sent) { ssf->ssf_flags = SCTP_DATA_SENT; } else { ssf->ssf_flags = SCTP_DATA_UNSENT; } + length += chk->send_size; + length -= sizeof(struct sctp_data_chunk); ssf->ssf_length = length; ssf->ssf_error = error; /* not exactly what the user sent in, but should be close :) */ @@ -2948,16 +2952,16 @@ sctp_notify_send_failed2(struct sctp_tcb /* no space left */ return; } - length += sp->length; SCTP_BUF_LEN(m_notify) = 0; if (sctp_stcb_is_feature_on(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVNSENDFAILEVNT)) { ssfe = mtod(m_notify, struct sctp_send_failed_event *); + memset(ssfe, 0, length); ssfe->ssfe_type = SCTP_SEND_FAILED_EVENT; ssfe->ssfe_flags = SCTP_DATA_UNSENT; + length += sp->length; ssfe->ssfe_length = length; ssfe->ssfe_error = error; /* not exactly what the user sent in, but should be close :) */ - bzero(&ssfe->ssfe_info, sizeof(ssfe->ssfe_info)); ssfe->ssfe_info.snd_sid = sp->stream; if (sp->some_taken) { ssfe->ssfe_info.snd_flags = SCTP_DATA_LAST_FRAG; @@ -2971,12 +2975,13 @@ sctp_notify_send_failed2(struct sctp_tcb SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_send_failed_event); } else { ssf = mtod(m_notify, struct sctp_send_failed *); + memset(ssf, 0, length); ssf->ssf_type = SCTP_SEND_FAILED; ssf->ssf_flags = SCTP_DATA_UNSENT; + length += sp->length; ssf->ssf_length = length; ssf->ssf_error = error; /* not exactly what the user sent in, but should be close :) */ - bzero(&ssf->ssf_info, sizeof(ssf->ssf_info)); ssf->ssf_info.sinfo_stream = sp->stream; ssf->ssf_info.sinfo_ssn = 0; if (sp->some_taken) { @@ -3038,6 +3043,7 @@ sctp_notify_adaptation_layer(struct sctp return; SCTP_BUF_LEN(m_notify) = 0; sai = mtod(m_notify, struct sctp_adaptation_event *); + memset(sai, 0, sizeof(struct sctp_adaptation_event)); sai->sai_type = SCTP_ADAPTATION_INDICATION; sai->sai_flags = 0; sai->sai_length = sizeof(struct sctp_adaptation_event); @@ -3093,6 +3099,7 @@ sctp_notify_partial_delivery_indication( return; SCTP_BUF_LEN(m_notify) = 0; pdapi = mtod(m_notify, struct sctp_pdapi_event *); + memset(pdapi, 0, sizeof(struct sctp_pdapi_event)); pdapi->pdapi_type = SCTP_PARTIAL_DELIVERY_EVENT; pdapi->pdapi_flags = 0; pdapi->pdapi_length = sizeof(struct sctp_pdapi_event); @@ -3202,6 +3209,7 @@ sctp_notify_shutdown_event(struct sctp_t /* no space left */ return; sse = mtod(m_notify, struct sctp_shutdown_event *); + memset(sse, 0, sizeof(struct sctp_shutdown_event)); sse->sse_type = SCTP_SHUTDOWN_EVENT; sse->sse_flags = 0; sse->sse_length = sizeof(struct sctp_shutdown_event); @@ -3252,6 +3260,7 @@ sctp_notify_sender_dry_event(struct sctp } SCTP_BUF_LEN(m_notify) = 0; event = mtod(m_notify, struct sctp_sender_dry_event *); + memset(event, 0, sizeof(struct sctp_sender_dry_event)); event->sender_dry_type = SCTP_SENDER_DRY_EVENT; event->sender_dry_flags = 0; event->sender_dry_length = sizeof(struct sctp_sender_dry_event); @@ -3284,7 +3293,6 @@ sctp_notify_stream_reset_add(struct sctp struct mbuf *m_notify; struct sctp_queued_to_read *control; struct sctp_stream_change_event *stradd; - int len; if ((stcb == NULL) || (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_STREAM_CHANGEEVNT))) { @@ -3297,25 +3305,20 @@ sctp_notify_stream_reset_add(struct sctp return; } stcb->asoc.peer_req_out = 0; - m_notify = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_NOWAIT, 1, MT_DATA); + m_notify = sctp_get_mbuf_for_msg(sizeof(struct sctp_stream_change_event), 0, M_NOWAIT, 1, MT_DATA); if (m_notify == NULL) /* no space left */ return; SCTP_BUF_LEN(m_notify) = 0; - len = sizeof(struct sctp_stream_change_event); - if (len > M_TRAILINGSPACE(m_notify)) { - /* never enough room */ - sctp_m_freem(m_notify); - return; - } stradd = mtod(m_notify, struct sctp_stream_change_event *); + memset(stradd, 0, sizeof(struct sctp_stream_change_event)); stradd->strchange_type = SCTP_STREAM_CHANGE_EVENT; stradd->strchange_flags = flag; - stradd->strchange_length = len; + stradd->strchange_length = sizeof(struct sctp_stream_change_event); stradd->strchange_assoc_id = sctp_get_associd(stcb); stradd->strchange_instrms = numberin; stradd->strchange_outstrms = numberout; - SCTP_BUF_LEN(m_notify) = len; + SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_stream_change_event); SCTP_BUF_NEXT(m_notify) = NULL; if (sctp_sbspace(&stcb->asoc, &stcb->sctp_socket->so_rcv) < SCTP_BUF_LEN(m_notify)) { /* no space */ @@ -3346,32 +3349,26 @@ sctp_notify_stream_reset_tsn(struct sctp struct mbuf *m_notify; struct sctp_queued_to_read *control; struct sctp_assoc_reset_event *strasoc; - int len; if ((stcb == NULL) || (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_ASSOC_RESETEVNT))) { /* event not enabled */ return; } - m_notify = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_NOWAIT, 1, MT_DATA); + m_notify = sctp_get_mbuf_for_msg(sizeof(struct sctp_assoc_reset_event), 0, M_NOWAIT, 1, MT_DATA); if (m_notify == NULL) /* no space left */ return; SCTP_BUF_LEN(m_notify) = 0; - len = sizeof(struct sctp_assoc_reset_event); - if (len > M_TRAILINGSPACE(m_notify)) { - /* never enough room */ - sctp_m_freem(m_notify); - return; - } strasoc = mtod(m_notify, struct sctp_assoc_reset_event *); + memset(strasoc, 0, sizeof(struct sctp_assoc_reset_event)); strasoc->assocreset_type = SCTP_ASSOC_RESET_EVENT; strasoc->assocreset_flags = flag; - strasoc->assocreset_length = len; + strasoc->assocreset_length = sizeof(struct sctp_assoc_reset_event); strasoc->assocreset_assoc_id = sctp_get_associd(stcb); strasoc->assocreset_local_tsn = sending_tsn; strasoc->assocreset_remote_tsn = recv_tsn; - SCTP_BUF_LEN(m_notify) = len; + SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_assoc_reset_event); SCTP_BUF_NEXT(m_notify) = NULL; if (sctp_sbspace(&stcb->asoc, &stcb->sctp_socket->so_rcv) < SCTP_BUF_LEN(m_notify)) { /* no space */ @@ -3424,6 +3421,7 @@ sctp_notify_stream_reset(struct sctp_tcb return; } strreset = mtod(m_notify, struct sctp_stream_reset_event *); + memset(strreset, 0, len); strreset->strreset_type = SCTP_STREAM_RESET_EVENT; strreset->strreset_flags = flag; strreset->strreset_length = len; @@ -6236,9 +6234,12 @@ sctp_soreceive(struct socket *so, fromlen = 0; } + if (filling_sinfo) { + memset(&sinfo, 0, sizeof(struct sctp_extrcvinfo)); + } error = sctp_sorecvmsg(so, uio, mp0, from, fromlen, flagsp, (struct sctp_sndrcvinfo *)&sinfo, filling_sinfo); - if ((controlp) && (filling_sinfo)) { + if (controlp != NULL) { /* copy back the sinfo in a CMSG format */ if (filling_sinfo) *controlp = sctp_build_ctl_nchunk(inp, From owner-svn-src-stable@FreeBSD.ORG Tue Jul 8 23:19:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F25593A; Tue, 8 Jul 2014 23:19:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB6862183; Tue, 8 Jul 2014 23:19:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s68N7Atv074590; Tue, 8 Jul 2014 23:07:10 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s68N7Aeq074589; Tue, 8 Jul 2014 23:07:10 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201407082307.s68N7Aeq074589@svn.freebsd.org> From: Glen Barber Date: Tue, 8 Jul 2014 23:07:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268439 - in stable: 10/release/doc/en_US.ISO8859-1/errata 9/release/doc/en_US.ISO8859-1/errata X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jul 2014 23:19:52 -0000 Author: gjb Date: Tue Jul 8 23:07:09 2014 New Revision: 268439 URL: http://svnweb.freebsd.org/changeset/base/268439 Log: Document FreeBSD-SA-14:17.kmem Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Changes in other areas also in this revision: Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Tue Jul 8 22:54:11 2014 (r268438) +++ stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Tue Jul 8 23:07:09 2014 (r268439) @@ -172,6 +172,13 @@ 24 June 2014 Multiple vulnerabilities + + + SA-14:17.kmem + 8 July 2014 + Kernel memory disclosure in control messages + and SCTP notifications + From owner-svn-src-stable@FreeBSD.ORG Tue Jul 8 23:19:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F7EE93B; Tue, 8 Jul 2014 23:19:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 075212184; Tue, 8 Jul 2014 23:19:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s68N7AxS074582; Tue, 8 Jul 2014 23:07:10 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s68N7AUO074581; Tue, 8 Jul 2014 23:07:10 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201407082307.s68N7AUO074581@svn.freebsd.org> From: Glen Barber Date: Tue, 8 Jul 2014 23:07:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268439 - in stable: 10/release/doc/en_US.ISO8859-1/errata 9/release/doc/en_US.ISO8859-1/errata X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jul 2014 23:19:57 -0000 Author: gjb Date: Tue Jul 8 23:07:09 2014 New Revision: 268439 URL: http://svnweb.freebsd.org/changeset/base/268439 Log: Document FreeBSD-SA-14:17.kmem Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Changes in other areas also in this revision: Modified: stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Tue Jul 8 22:54:11 2014 (r268438) +++ stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Tue Jul 8 23:07:09 2014 (r268439) @@ -214,6 +214,13 @@ 24 June 2014 Multiple vulnerabilities + + + SA-14:17.kmem + 8 July 2014 + Kernel memory disclosure in control messages + and SCTP notifications + From owner-svn-src-stable@FreeBSD.ORG Wed Jul 9 00:12:16 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5CF09554; Wed, 9 Jul 2014 00:12:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A6B62664; Wed, 9 Jul 2014 00:12:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s690CG5q004551; Wed, 9 Jul 2014 00:12:16 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s690CGAW004550; Wed, 9 Jul 2014 00:12:16 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201407090012.s690CGAW004550@svn.freebsd.org> From: Peter Wemm Date: Wed, 9 Jul 2014 00:12:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268442 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jul 2014 00:12:16 -0000 Author: peter Date: Wed Jul 9 00:12:15 2014 New Revision: 268442 URL: http://svnweb.freebsd.org/changeset/base/268442 Log: Bump __FreeBSD_version after last SA-14:17.kmem so we have something to test against in the freebsd.org cluster. Modified: stable/10/sys/sys/param.h Modified: stable/10/sys/sys/param.h ============================================================================== --- stable/10/sys/sys/param.h Wed Jul 9 00:12:05 2014 (r268441) +++ stable/10/sys/sys/param.h Wed Jul 9 00:12:15 2014 (r268442) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1000710 /* Master, propagated to newvers */ +#define __FreeBSD_version 1000711 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-stable@FreeBSD.ORG Wed Jul 9 00:12:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F198C6E9; Wed, 9 Jul 2014 00:12:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DED90266B; Wed, 9 Jul 2014 00:12:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s690CgX5004640; Wed, 9 Jul 2014 00:12:42 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s690CgLu004639; Wed, 9 Jul 2014 00:12:42 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201407090012.s690CgLu004639@svn.freebsd.org> From: Peter Wemm Date: Wed, 9 Jul 2014 00:12:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268443 - stable/9/sys/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jul 2014 00:12:43 -0000 Author: peter Date: Wed Jul 9 00:12:42 2014 New Revision: 268443 URL: http://svnweb.freebsd.org/changeset/base/268443 Log: Bump __FreeBSD_version after SA-14:17.kmem so we have something to test against in the freebsd.org cluster. Modified: stable/9/sys/sys/param.h Modified: stable/9/sys/sys/param.h ============================================================================== --- stable/9/sys/sys/param.h Wed Jul 9 00:12:15 2014 (r268442) +++ stable/9/sys/sys/param.h Wed Jul 9 00:12:42 2014 (r268443) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 903500 /* Master, propagated to newvers */ +#define __FreeBSD_version 903501 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-stable@FreeBSD.ORG Wed Jul 9 00:12:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B7F747CA; Wed, 9 Jul 2014 00:12:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A570B266E; Wed, 9 Jul 2014 00:12:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s690Cuvw004702; Wed, 9 Jul 2014 00:12:56 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s690Cunh004701; Wed, 9 Jul 2014 00:12:56 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201407090012.s690Cunh004701@svn.freebsd.org> From: Peter Wemm Date: Wed, 9 Jul 2014 00:12:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r268444 - stable/8/sys/sys X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jul 2014 00:12:56 -0000 Author: peter Date: Wed Jul 9 00:12:56 2014 New Revision: 268444 URL: http://svnweb.freebsd.org/changeset/base/268444 Log: Bump __FreeBSD_version after SA-14:17.kmem so we have something to test against in the freebsd.org cluster. Modified: stable/8/sys/sys/param.h Modified: stable/8/sys/sys/param.h ============================================================================== --- stable/8/sys/sys/param.h Wed Jul 9 00:12:42 2014 (r268443) +++ stable/8/sys/sys/param.h Wed Jul 9 00:12:56 2014 (r268444) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 804502 /* Master, propagated to newvers */ +#define __FreeBSD_version 804503 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-stable@FreeBSD.ORG Wed Jul 9 15:29:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [8.8.178.116]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39197E49; Wed, 9 Jul 2014 15:29:45 +0000 (UTC) Received: from butcher-nb.yandex.net (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) by mx2.freebsd.org (Postfix) with ESMTP id A24712738; Wed, 9 Jul 2014 15:29:43 +0000 (UTC) Message-ID: <53BD5F9A.7060801@FreeBSD.org> Date: Wed, 09 Jul 2014 19:28:26 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Brooks Davis , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r268415 - stable/8/sys/geom References: <201407081530.s68FU5Dc032932@svn.freebsd.org> In-Reply-To: <201407081530.s68FU5Dc032932@svn.freebsd.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jul 2014 15:29:45 -0000 On 08.07.2014 19:30, Brooks Davis wrote: > Author: brooks > Date: Tue Jul 8 15:30:05 2014 > New Revision: 268415 > URL: http://svnweb.freebsd.org/changeset/base/268415 > > Log: > MFC r223930: > > Remove include of sys/sbuf.h from geom/geom.h. > sbuf support is not always required for geom/geom.h users, and no need to > depend from it. > > PR: 158398 Hi, I think this will break the build. Also this can break third-party software. -- WBR, Andrey V. Elsukov From owner-svn-src-stable@FreeBSD.ORG Wed Jul 9 15:32:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [8.8.178.116]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 85DB4FF1; Wed, 9 Jul 2014 15:32:05 +0000 (UTC) Received: from butcher-nb.yandex.net (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) by mx2.freebsd.org (Postfix) with ESMTP id F3DE9298F; Wed, 9 Jul 2014 15:32:03 +0000 (UTC) Message-ID: <53BD6026.9090405@FreeBSD.org> Date: Wed, 09 Jul 2014 19:30:46 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Brooks Davis , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r268422 - stable/8/sys/geom References: <201407081915.s68JFWxb041150@svn.freebsd.org> In-Reply-To: <201407081915.s68JFWxb041150@svn.freebsd.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jul 2014 15:32:05 -0000 On 08.07.2014 23:15, Brooks Davis wrote: > Author: brooks > Date: Tue Jul 8 19:15:32 2014 > New Revision: 268422 > URL: http://svnweb.freebsd.org/changeset/base/268422 > > Log: > Revert r268415. > > I botched testing and a large set of changes needs to be applied for this to > work. I didn't planned to merge this fix, because it can break third-party software. -- WBR, Andrey V. Elsukov From owner-svn-src-stable@FreeBSD.ORG Wed Jul 9 15:49:55 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E83D382B; Wed, 9 Jul 2014 15:49:55 +0000 (UTC) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CBC42C5C; Wed, 9 Jul 2014 15:49:55 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.7/8.14.7) with ESMTP id s69Fnlk5010233; Wed, 9 Jul 2014 10:49:47 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.7/8.14.7/Submit) id s69Fnltn010232; Wed, 9 Jul 2014 10:49:47 -0500 (CDT) (envelope-from brooks) Date: Wed, 9 Jul 2014 10:49:47 -0500 From: Brooks Davis To: "Andrey V. Elsukov" Subject: Re: svn commit: r268415 - stable/8/sys/geom Message-ID: <20140709154947.GA1070@lor.one-eyed-alien.net> References: <201407081530.s68FU5Dc032932@svn.freebsd.org> <53BD5F9A.7060801@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Kj7319i9nmIyA2yE" Content-Disposition: inline In-Reply-To: <53BD5F9A.7060801@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Brooks Davis , src-committers@freebsd.org, svn-src-stable-8@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jul 2014 15:49:56 -0000 --Kj7319i9nmIyA2yE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 09, 2014 at 07:28:26PM +0400, Andrey V. Elsukov wrote: > On 08.07.2014 19:30, Brooks Davis wrote: > > Author: brooks > > Date: Tue Jul 8 15:30:05 2014 > > New Revision: 268415 > > URL: http://svnweb.freebsd.org/changeset/base/268415 > >=20 > > Log: > > MFC r223930: > > =20 > > Remove include of sys/sbuf.h from geom/geom.h. > > sbuf support is not always required for geom/geom.h users, and no nee= d to > > depend from it. > > =20 > > PR: 158398 >=20 > Hi, >=20 > I think this will break the build. It did. I've backed it out. > Also this can break third-party software. Given that 9+ don't include it I doubt that is a serious problem. -- Brooks --Kj7319i9nmIyA2yE Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iKYEARECAGYFAlO9ZJtfFIAAAAAALgAoaXNzdWVyLWZwckBub3RhdGlvbnMub3Bl bnBncC5maWZ0aGhvcnNlbWFuLm5ldDY1NUQ1MTlDMjZBNzgyRTcyNTI5OUJGMDVE OEU4QkU5RjIzODFBRDQACgkQXY6L6fI4GtSCOACg10WaaG5BnEOlr90v6kz9v37W JjYAni/pCAN7t/T6HNJmvErhk+niCBVT =ffBh -----END PGP SIGNATURE----- --Kj7319i9nmIyA2yE-- From owner-svn-src-stable@FreeBSD.ORG Wed Jul 9 15:51:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BCF3E976; Wed, 9 Jul 2014 15:51:44 +0000 (UTC) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 752042CD9; Wed, 9 Jul 2014 15:51:44 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.7/8.14.7) with ESMTP id s69FphO0010258; Wed, 9 Jul 2014 10:51:43 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.7/8.14.7/Submit) id s69Fph95010257; Wed, 9 Jul 2014 10:51:43 -0500 (CDT) (envelope-from brooks) Date: Wed, 9 Jul 2014 10:51:43 -0500 From: Brooks Davis To: "Andrey V. Elsukov" Subject: Re: svn commit: r268422 - stable/8/sys/geom Message-ID: <20140709155143.GB1070@lor.one-eyed-alien.net> References: <201407081915.s68JFWxb041150@svn.freebsd.org> <53BD6026.9090405@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ADZbWkCsHQ7r3kzd" Content-Disposition: inline In-Reply-To: <53BD6026.9090405@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jul 2014 15:51:44 -0000 --ADZbWkCsHQ7r3kzd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 09, 2014 at 07:30:46PM +0400, Andrey V. Elsukov wrote: > On 08.07.2014 23:15, Brooks Davis wrote: > > Author: brooks > > Date: Tue Jul 8 19:15:32 2014 > > New Revision: 268422 > > URL: http://svnweb.freebsd.org/changeset/base/268422 > >=20 > > Log: > > Revert r268415. > > =20 > > I botched testing and a large set of changes needs to be applied for = this to > > work. >=20 > I didn't planned to merge this fix, because it can break third-party > software. In that case you should have closed the PR rather than dumping it in the patched state. -- Brooks --ADZbWkCsHQ7r3kzd Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iKYEARECAGYFAlO9ZQ5fFIAAAAAALgAoaXNzdWVyLWZwckBub3RhdGlvbnMub3Bl bnBncC5maWZ0aGhvcnNlbWFuLm5ldDY1NUQ1MTlDMjZBNzgyRTcyNTI5OUJGMDVE OEU4QkU5RjIzODFBRDQACgkQXY6L6fI4GtQrcwCgtsE4cFAiPI14QHMxaV94yl6v TZ4An26QSI+ziI+bDfAU6OgFr9zeoYJH =ifGD -----END PGP SIGNATURE----- --ADZbWkCsHQ7r3kzd-- From owner-svn-src-stable@FreeBSD.ORG Thu Jul 10 09:08:02 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D190AD07; Thu, 10 Jul 2014 09:08:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE2222398; Thu, 10 Jul 2014 09:08:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6A982L9062891; Thu, 10 Jul 2014 09:08:02 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6A982fn062890; Thu, 10 Jul 2014 09:08:02 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201407100908.s6A982fn062890@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 10 Jul 2014 09:08:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268483 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jul 2014 09:08:02 -0000 Author: kib Date: Thu Jul 10 09:08:02 2014 New Revision: 268483 URL: http://svnweb.freebsd.org/changeset/base/268483 Log: MFC r268211: Micro-manage clang to get the expected inlining for cpu_search(). Modified: stable/10/sys/kern/sched_ule.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/sched_ule.c ============================================================================== --- stable/10/sys/kern/sched_ule.c Thu Jul 10 07:16:55 2014 (r268482) +++ stable/10/sys/kern/sched_ule.c Thu Jul 10 09:08:02 2014 (r268483) @@ -622,12 +622,14 @@ struct cpu_search { for ((cpu) = 0; (cpu) <= mp_maxid; (cpu)++) \ if (CPU_ISSET(cpu, &mask)) -static __inline int cpu_search(const struct cpu_group *cg, struct cpu_search *low, - struct cpu_search *high, const int match); -int cpu_search_lowest(const struct cpu_group *cg, struct cpu_search *low); -int cpu_search_highest(const struct cpu_group *cg, struct cpu_search *high); -int cpu_search_both(const struct cpu_group *cg, struct cpu_search *low, +static __always_inline int cpu_search(const struct cpu_group *cg, + struct cpu_search *low, struct cpu_search *high, const int match); +int __noinline cpu_search_lowest(const struct cpu_group *cg, + struct cpu_search *low); +int __noinline cpu_search_highest(const struct cpu_group *cg, struct cpu_search *high); +int __noinline cpu_search_both(const struct cpu_group *cg, + struct cpu_search *low, struct cpu_search *high); /* * Search the tree of cpu_groups for the lowest or highest loaded cpu @@ -640,7 +642,7 @@ int cpu_search_both(const struct cpu_gro * match argument. It is reduced to the minimum set for each case. It is * also recursive to the depth of the tree. */ -static __inline int +static __always_inline int cpu_search(const struct cpu_group *cg, struct cpu_search *low, struct cpu_search *high, const int match) { From owner-svn-src-stable@FreeBSD.ORG Thu Jul 10 09:09:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5D6AEE3; Thu, 10 Jul 2014 09:09:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9668723AC; Thu, 10 Jul 2014 09:09:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6A99bJi063329; Thu, 10 Jul 2014 09:09:37 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6A99bDQ063328; Thu, 10 Jul 2014 09:09:37 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201407100909.s6A99bDQ063328@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 10 Jul 2014 09:09:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268484 - stable/10/lib/libc/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jul 2014 09:09:37 -0000 Author: kib Date: Thu Jul 10 09:09:37 2014 New Revision: 268484 URL: http://svnweb.freebsd.org/changeset/base/268484 Log: MFC r268212: Note that most errors are possible for all syscalls from utimes(2) family. Minor wording corrections. Modified: stable/10/lib/libc/sys/utimes.2 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/utimes.2 ============================================================================== --- stable/10/lib/libc/sys/utimes.2 Thu Jul 10 09:08:02 2014 (r268483) +++ stable/10/lib/libc/sys/utimes.2 Thu Jul 10 09:09:37 2014 (r268484) @@ -30,7 +30,7 @@ .\" @(#)utimes.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd April 10, 2008 +.Dd July 3, 2014 .Dt UTIMES 2 .Os .Sh NAME @@ -119,22 +119,18 @@ is passed the special value .Dv AT_FDCWD in the .Fa fd -parameter, the current working directory is used and the behavior is identical to -a call to +parameter, the current working directory is used and the behavior +is identical to a call to .Fn utimes . .Sh RETURN VALUES .Rv -std .Sh ERRORS -The -.Fn utimes -and -.Fn lutimes -system calls -will fail if: +All of the system call will fail if: .Bl -tag -width Er .It Bq Er EACCES -Search permission is denied for a component of the path prefix; -or the +Search permission is denied for a component of the path prefix. +.It Bq Er EACCES +The .Fa times argument is .Dv NULL @@ -148,6 +144,17 @@ or .Fa times argument points outside the process's allocated address space. +.It Bq Er EFAULT +The +.Fa times +argument +points outside the process's allocated address space. +.It Bq Er EINVAL +The +.Va tv_usec +component of at least one of the values specified by the +.Fa times +argument has a value less than 0 or greater than 999999. .It Bq Er EIO An I/O error occurred while reading or writing the affected inode. .It Bq Er ELOOP @@ -170,7 +177,8 @@ argument is not and the calling process's effective user ID does not match the owner of the file and is not the super-user. .It Bq Er EPERM -The named file has its immutable or append-only flag set, see the +The named file has its immutable or append-only flags set. +See the .Xr chflags 2 manual page for more information. .It Bq Er EROFS @@ -189,40 +197,6 @@ argument does not refer to a valid descriptor. .El .Pp -All of the system calls will fail if: -.Bl -tag -width Er -.It Bq Er EACCES -The -.Fa times -argument is -.Dv NULL -and the effective user ID of the process does not -match the owner of the file, and is not the super-user, and write -access is denied. -.It Bq Er EFAULT -The -.Fa times -argument -points outside the process's allocated address space. -.It Bq Er EINVAL -The -.Va tv_usec -component of at least one of the values specified by the -.Fa times -argument has a value less than 0 or greater than 999999. -.It Bq Er EIO -An I/O error occurred while reading or writing the affected inode. -.It Bq Er EPERM -The -.Fa times -argument is not -.Dv NULL -and the calling process's effective user ID -does not match the owner of the file and is not the super-user. -.It Bq Er EROFS -The file system containing the file is mounted read-only. -.El -.Pp In addition to the errors returned by the .Fn utimes , the From owner-svn-src-stable@FreeBSD.ORG Thu Jul 10 09:11:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29C1E18F; Thu, 10 Jul 2014 09:11:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A4B82430; Thu, 10 Jul 2014 09:11:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6A9Bdsl066981; Thu, 10 Jul 2014 09:11:39 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6A9BdW5066980; Thu, 10 Jul 2014 09:11:39 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201407100911.s6A9BdW5066980@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 10 Jul 2014 09:11:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268485 - stable/9/lib/libc/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jul 2014 09:11:40 -0000 Author: kib Date: Thu Jul 10 09:11:39 2014 New Revision: 268485 URL: http://svnweb.freebsd.org/changeset/base/268485 Log: MFC r268212: Note that most errors are possible for all syscalls from utimes(2) family. Minor wording corrections. Modified: stable/9/lib/libc/sys/utimes.2 Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) Modified: stable/9/lib/libc/sys/utimes.2 ============================================================================== --- stable/9/lib/libc/sys/utimes.2 Thu Jul 10 09:09:37 2014 (r268484) +++ stable/9/lib/libc/sys/utimes.2 Thu Jul 10 09:11:39 2014 (r268485) @@ -30,7 +30,7 @@ .\" @(#)utimes.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd April 10, 2008 +.Dd July 3, 2014 .Dt UTIMES 2 .Os .Sh NAME @@ -119,22 +119,18 @@ is passed the special value .Dv AT_FDCWD in the .Fa fd -parameter, the current working directory is used and the behavior is identical to -a call to +parameter, the current working directory is used and the behavior +is identical to a call to .Fn utimes . .Sh RETURN VALUES .Rv -std .Sh ERRORS -The -.Fn utimes -and -.Fn lutimes -system calls -will fail if: +All of the system call will fail if: .Bl -tag -width Er .It Bq Er EACCES -Search permission is denied for a component of the path prefix; -or the +Search permission is denied for a component of the path prefix. +.It Bq Er EACCES +The .Fa times argument is .Dv NULL @@ -148,6 +144,17 @@ or .Fa times argument points outside the process's allocated address space. +.It Bq Er EFAULT +The +.Fa times +argument +points outside the process's allocated address space. +.It Bq Er EINVAL +The +.Va tv_usec +component of at least one of the values specified by the +.Fa times +argument has a value less than 0 or greater than 999999. .It Bq Er EIO An I/O error occurred while reading or writing the affected inode. .It Bq Er ELOOP @@ -170,7 +177,8 @@ argument is not and the calling process's effective user ID does not match the owner of the file and is not the super-user. .It Bq Er EPERM -The named file has its immutable or append-only flag set, see the +The named file has its immutable or append-only flags set. +See the .Xr chflags 2 manual page for more information. .It Bq Er EROFS @@ -189,40 +197,6 @@ argument does not refer to a valid descriptor. .El .Pp -All of the system calls will fail if: -.Bl -tag -width Er -.It Bq Er EACCES -The -.Fa times -argument is -.Dv NULL -and the effective user ID of the process does not -match the owner of the file, and is not the super-user, and write -access is denied. -.It Bq Er EFAULT -The -.Fa times -argument -points outside the process's allocated address space. -.It Bq Er EINVAL -The -.Va tv_usec -component of at least one of the values specified by the -.Fa times -argument has a value less than 0 or greater than 999999. -.It Bq Er EIO -An I/O error occurred while reading or writing the affected inode. -.It Bq Er EPERM -The -.Fa times -argument is not -.Dv NULL -and the calling process's effective user ID -does not match the owner of the file and is not the super-user. -.It Bq Er EROFS -The file system containing the file is mounted read-only. -.El -.Pp In addition to the errors returned by the .Fn utimes , the From owner-svn-src-stable@FreeBSD.ORG Thu Jul 10 21:02:59 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A8B275C; Thu, 10 Jul 2014 21:02:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DA352470; Thu, 10 Jul 2014 21:02:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6AL2wIa013105; Thu, 10 Jul 2014 21:02:58 GMT (envelope-from hiren@svn.freebsd.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6AL2w2D013104; Thu, 10 Jul 2014 21:02:58 GMT (envelope-from hiren@svn.freebsd.org) Message-Id: <201407102102.s6AL2w2D013104@svn.freebsd.org> From: Hiren Panchasara Date: Thu, 10 Jul 2014 21:02:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268506 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jul 2014 21:02:59 -0000 Author: hiren Date: Thu Jul 10 21:02:58 2014 New Revision: 268506 URL: http://svnweb.freebsd.org/changeset/base/268506 Log: MFC r256920 The TCP delayed ACK logic isn't aware of LRO passing up large aggregated segments thinking it received only one segment. This causes it to enable the delay the ACK for 100ms to wait for another segment which may never come because all the data was received already. Doing delayed ACK for LRO segments is bogus for two reasons: a) it pushes us further away from acking every other packet; b) it introduces additional delay in responding to the sender. The latter is especially bad because it is in the nature of LRO to aggregated all segments of a burst with no more coming until an ACK is sent back. Change the delayed ACK logic to detect LRO segments by being larger than the MSS for this connection and issuing an immediate ACK for them to keep the ACK clock ticking without interruption. Modified: stable/9/sys/netinet/tcp_input.c Modified: stable/9/sys/netinet/tcp_input.c ============================================================================== --- stable/9/sys/netinet/tcp_input.c Thu Jul 10 20:59:54 2014 (r268505) +++ stable/9/sys/netinet/tcp_input.c Thu Jul 10 21:02:58 2014 (r268506) @@ -502,10 +502,13 @@ do { \ * the ack that opens up a 0-sized window and * - delayed acks are enabled or * - this is a half-synchronized T/TCP connection. + * - the segment size is not larger than the MSS and LRO wasn't used + * for this segment. */ -#define DELAY_ACK(tp) \ +#define DELAY_ACK(tp, tlen) \ ((!tcp_timer_active(tp, TT_DELACK) && \ (tp->t_flags & TF_RXWIN0SENT) == 0) && \ + (tlen <= tp->t_maxopd) && \ (V_tcp_delack_enabled || (tp->t_flags & TF_NEEDSYN))) /* @@ -1850,7 +1853,7 @@ tcp_do_segment(struct mbuf *m, struct tc } /* NB: sorwakeup_locked() does an implicit unlock. */ sorwakeup_locked(so); - if (DELAY_ACK(tp)) { + if (DELAY_ACK(tp, tlen)) { tp->t_flags |= TF_DELACK; } else { tp->t_flags |= TF_ACKNOW; @@ -1938,7 +1941,7 @@ tcp_do_segment(struct mbuf *m, struct tc * If there's data, delay ACK; if there's also a FIN * ACKNOW will be turned on later. */ - if (DELAY_ACK(tp) && tlen != 0) + if (DELAY_ACK(tp, tlen) && tlen != 0) tcp_timer_activate(tp, TT_DELACK, tcp_delacktime); else @@ -2905,7 +2908,7 @@ dodata: /* XXX */ if (th->th_seq == tp->rcv_nxt && LIST_EMPTY(&tp->t_segq) && TCPS_HAVEESTABLISHED(tp->t_state)) { - if (DELAY_ACK(tp)) + if (DELAY_ACK(tp, tlen)) tp->t_flags |= TF_DELACK; else tp->t_flags |= TF_ACKNOW; From owner-svn-src-stable@FreeBSD.ORG Thu Jul 10 22:00:22 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9709F4A0; Thu, 10 Jul 2014 22:00:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84BDD29D5; Thu, 10 Jul 2014 22:00:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6AM0MSv038364; Thu, 10 Jul 2014 22:00:22 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6AM0MbQ038363; Thu, 10 Jul 2014 22:00:22 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201407102200.s6AM0MbQ038363@svn.freebsd.org> From: Glen Barber Date: Thu, 10 Jul 2014 22:00:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268513 - stable/9 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jul 2014 22:00:22 -0000 Author: gjb Date: Thu Jul 10 22:00:22 2014 New Revision: 268513 URL: http://svnweb.freebsd.org/changeset/base/268513 Log: Anticipate when we will announce 9.3-RELEASE. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/UPDATING Modified: stable/9/UPDATING ============================================================================== --- stable/9/UPDATING Thu Jul 10 21:53:54 2014 (r268512) +++ stable/9/UPDATING Thu Jul 10 22:00:22 2014 (r268513) @@ -11,6 +11,9 @@ handbook: Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. +20140716: + 9.3-RELEASE. + 20140608: On i386 and amd64 systems, the onifconsole flag is now set by default in /etc/ttys for ttyu0. This causes ttyu0 to be automatically enabled From owner-svn-src-stable@FreeBSD.ORG Fri Jul 11 00:00:01 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C9907588; Fri, 11 Jul 2014 00:00:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B15F1249A; Fri, 11 Jul 2014 00:00:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6B001T3095233; Fri, 11 Jul 2014 00:00:01 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6B0013I095178; Fri, 11 Jul 2014 00:00:01 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201407110000.s6B0013I095178@svn.freebsd.org> From: Xin LI Date: Fri, 11 Jul 2014 00:00:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268515 - in stable/10: contrib/file contrib/file/Magdir contrib/file/doc contrib/file/m4 contrib/file/magic contrib/file/python contrib/file/src contrib/file/tests lib/libmagic usr.bin... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jul 2014 00:00:02 -0000 Author: delphij Date: Fri Jul 11 00:00:00 2014 New Revision: 268515 URL: http://svnweb.freebsd.org/changeset/base/268515 Log: MFC r267897: MFV r267843: Update file/libmagic to 5.19. Added: stable/10/contrib/file/config.guess - copied unchanged from r267897, head/contrib/file/config.guess stable/10/contrib/file/config.sub - copied unchanged from r267897, head/contrib/file/config.sub stable/10/contrib/file/depcomp - copied unchanged from r267897, head/contrib/file/depcomp stable/10/contrib/file/doc/ - copied from r267897, head/contrib/file/doc/ stable/10/contrib/file/ltmain.sh - copied unchanged from r267897, head/contrib/file/ltmain.sh stable/10/contrib/file/m4/ - copied from r267897, head/contrib/file/m4/ stable/10/contrib/file/magic/ - copied from r267897, head/contrib/file/magic/ stable/10/contrib/file/missing - copied unchanged from r267897, head/contrib/file/missing stable/10/contrib/file/python/ - copied from r267897, head/contrib/file/python/ stable/10/contrib/file/src/ - copied from r267897, head/contrib/file/src/ stable/10/contrib/file/tests/escapevel.result - copied unchanged from r267897, head/contrib/file/tests/escapevel.result stable/10/contrib/file/tests/escapevel.testfile - copied unchanged from r267897, head/contrib/file/tests/escapevel.testfile stable/10/contrib/file/tests/issue311docx.result - copied unchanged from r267897, head/contrib/file/tests/issue311docx.result stable/10/contrib/file/tests/issue311docx.testfile - copied unchanged from r267897, head/contrib/file/tests/issue311docx.testfile Deleted: stable/10/contrib/file/Header stable/10/contrib/file/Localstuff stable/10/contrib/file/Magdir/ stable/10/contrib/file/Makefile.am-src stable/10/contrib/file/apprentice.c stable/10/contrib/file/apptype.c stable/10/contrib/file/ascmagic.c stable/10/contrib/file/asprintf.c stable/10/contrib/file/cdf.c stable/10/contrib/file/cdf.h stable/10/contrib/file/cdf_time.c stable/10/contrib/file/compress.c stable/10/contrib/file/elfclass.h stable/10/contrib/file/encoding.c stable/10/contrib/file/file.c stable/10/contrib/file/file.h stable/10/contrib/file/file.man stable/10/contrib/file/file_opts.h stable/10/contrib/file/fsmagic.c stable/10/contrib/file/funcs.c stable/10/contrib/file/getline.c stable/10/contrib/file/getopt_long.c stable/10/contrib/file/is_tar.c stable/10/contrib/file/libmagic.man stable/10/contrib/file/magic.c stable/10/contrib/file/magic.h stable/10/contrib/file/magic.man stable/10/contrib/file/magic2mime stable/10/contrib/file/mygetopt.h stable/10/contrib/file/names.h stable/10/contrib/file/print.c stable/10/contrib/file/readcdf.c stable/10/contrib/file/readelf.c stable/10/contrib/file/readelf.h stable/10/contrib/file/softmagic.c stable/10/contrib/file/strlcat.c stable/10/contrib/file/strlcpy.c stable/10/contrib/file/tar.h stable/10/contrib/file/tests/gedcom.magic stable/10/contrib/file/vasprintf.c Modified: stable/10/contrib/file/ChangeLog stable/10/contrib/file/Makefile.am stable/10/contrib/file/Makefile.in stable/10/contrib/file/README stable/10/contrib/file/TODO stable/10/contrib/file/aclocal.m4 stable/10/contrib/file/compile stable/10/contrib/file/config.h.in stable/10/contrib/file/configure stable/10/contrib/file/configure.ac stable/10/contrib/file/install-sh stable/10/contrib/file/tests/Makefile.am stable/10/contrib/file/tests/Makefile.in stable/10/contrib/file/tests/README stable/10/contrib/file/tests/gedcom.result stable/10/lib/libmagic/Makefile stable/10/lib/libmagic/config.h stable/10/usr.bin/file/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/file/ChangeLog ============================================================================== --- stable/10/contrib/file/ChangeLog Thu Jul 10 22:54:38 2014 (r268514) +++ stable/10/contrib/file/ChangeLog Fri Jul 11 00:00:00 2014 (r268515) @@ -1,3 +1,245 @@ +2014-06-12 12:28 Christos Zoulas + + * release 5.19 + +2014-06-09 9:04 Christos Zoulas + + * Misc buffer overruns and missing buffer size tests in cdf parsing + (Francisco Alonso, Jan Kaluza) + +2014-06-02 14:50 Christos Zoulas + + * Enforce limit of 8K on regex searches that have no limits + * Allow the l modifier for regex to mean line count. Default + to byte count. If line count is specified, assume a max + of 80 characters per line to limit the byte count. + * Don't allow conversions to be used for dates, allowing + the mask field to be used as an offset. + +2014-05-30 12:51 Christos Zoulas + + * Make the range operator limit the length of the + regex search. + +2014-05-14 19:23 Christos Zoulas + + * PR/347: Windows fixes + * PR/352: Hangul word processor recognition + * PR/354: Encoding irregularities in text files + +2014-05-06 6:12 Christos Zoulas + + * Fix uninitialized title in CDF files (Jan Kaluza) + +2014-05-04 14:55 Christos Zoulas + + * PR/351: Fix compilation of empty files + +2014-04-30 17:39 Christos Zoulas + + * Fix integer formats: We don't specify 'l' or + 'h' and 'hh' specifiers anymore, only 'll' for + quads and nothing for the rest. This is so that + magic writing is simpler. + +2014-04-01 15:25 Christos Zoulas + + * PR/341: Jan Kaluza, fix memory leak + * PR/342: Jan Kaluza, fix out of bounds read + +2014-03-28 15:25 Christos Zoulas + + * Fix issue with long formats not matching fmtcheck + +2014-03-26 11:25 Christos Zoulas + + * release 5.18 + +2014-03-15 17:45 Christos Zoulas + + * add fmtcheck(3) for those who don't have it + +2014-03-14 15:12 Christos Zoulas + + * prevent mime entries from being attached to magic + entries with no descriptions + + * adjust magic strength for regex type + + * remove superfluous ascmagic with encoding test + +2014-03-06 12:01 Christos Zoulas + + * fix regression fix echo -ne "\012\013\014" | file -i - + which printed "binary" instead of "application/octet-stream" + + * add size_t overflow check for magic file size + +2014-02-27 16:01 Christos Zoulas + + * experimental support for matching with CFD CLSID + +2014-02-18 13:04 Kimmo Suominen (kimmo@suominen.com) + + * Cache old LC_CTYPE locale before setting it to "C", so + we can use it to restore LC_CTYPE instead of asking + setlocale() to scan the environment variables. + +2014-02-12 18:21 Christos Zoulas + + * Count recursion levels through indirect magic + +2014-02-11 10:40 Christos Zoulas + + * Prevent infinite recursion on files with indirect offsets of 0 + +2014-01-30 21:00 Christos Zoulas + + * Add -E flag that makes file print filesystem errors to stderr + and exit. + +2014-01-08 17:20 Christos Zoulas + + * mime printing could print results from multiple magic entries + if there were multiple matches. + * in some cases overflow was not detected when computing offsets + in softmagic. + +2013-12-05 12:00 Christos Zoulas + + * use strcasestr() to for cdf strings + * reset to the "C" locale while doing regex operations, or case + insensitive comparisons; this is provisional + +2013-11-19 20:10 Christos Zoulas + + * always leave magic file loaded, don't unload for magic_check, etc. + * fix default encoding to binary instead of unknown which broke recently + * handle empty and one byte files, less specially so that + --mime-encoding does not break completely. + ` +2013-11-06 14:40 Christos Zoulas + + * fix erroneous non-zero exit code from non-existant file and message + +2013-10-29 14:25 Christos Zoulas + + * add CDF MSI file detection (Guy Helmer) + +2013-09-03 11:56 Christos Zoulas + + * Don't mix errors and regular output if there was an error + * in magic_descriptor() don't close the file and try to restore + its position + +2013-05-30 17:25 Christos Zoulas + + * Don't treat magic as an error if offset was past EOF (Christoph Biedl) + +2013-05-28 17:25 Christos Zoulas + + * Fix spacing issues in softmagic and elf (Jan Kaluza) + +2013-05-02 18:00 Christos Zoulas + + * Fix segmentation fault with multiple magic_load commands. + +2013-04-22 11:20 Christos Zoulas + + * The way "default" was implemented was not very useful + because the "if something was printed at that level" + was not easily controlled by the user, and the format + was bound to a string which is too restrictive. Add + a "clear" for that level keyword and make "default" + void. This way one can do: + + >>13 clear x + >>13 lelong 1 foo + >>13 lelong 2 bar + >>13 default x + >>>13 lelong x unknown %x + +2013-03-25 13:20 Christos Zoulas + + * disallow strength setting in "name" entries + +2013-03-06 21:24 Christos Zoulas + + * fix recursive magic separator printing + +2013-02-26 19:28 Christos Zoulas + + * limit recursion level for mget + * fix pread() related breakage in cdf + * handle offsets properly in recursive "use" + +2013-02-18 10:39 Christos Zoulas + + * add elf reading of debug info to determine if file is stripped + (Jan Kaluza) + * use pread() + +2013-01-25 18:05 Christos Zoulas + + * change mime description size from 64 to 80 to accommodate OOXML. + +2013-01-11 14:50 Christos Zoulas + + * Warn about inconsistent continuation levels. + * Change fsmagic to add a space after it prints. + +2013-01-10 21:00 Christos Zoulas + + * Make getline public so that file can link against it. + Perhaps it is better to rename it, or hide it differently. + Fixes builds on platforms that do not provide it. + +2013-01-07 16:30 Christos Zoulas + + * Add SuS d{,1,2,4,8}, u{,1,2,4,8} and document + what long, int, short, etc is (Guy Harris) + +2013-01-06 11:20 Christos Zoulas + + * add magic_version function and constant + * Redo memory allocation and de-allocation. + (prevents double frees on non mmap platforms) + * Fix bug with name/use having to do with passing + found state from the parent to the child and back. + +2012-12-19 8:47 Christos Zoulas + + * Only print elf capabilities for archs we know (Jan Kaluza) + +2012-10-30 19:14 Christos Zoulas + + * Add "name" and "use" file types in order to look + inside mach-o files. + +2012-09-06 10:40 Christos Zoulas + + * make --version exit 0 (Matthew Schultz) + * add string/T (Jan Kaluza) + +2012-08-09 2:15 Christos Zoulas + + * add z and t modifiers for our own vasprintf + * search for $HOME/.magic.mgc if it is there first + * fix reads from a pipe, and preserve errno + +2012-05-15 13:12 Christos Zoulas + + * use ctime_r, asctime_r + +2012-04-06 17:18 Christos Zoulas + + * Fixes for indirect offsets to handle apple disk formats + +2012-04-03 18:26 Christos Zoulas + + * Add windows date field types + * More info for windows shortcuts (incomplete) + 2012-02-20 17:33 Christos Zoulas * Fix CDF parsing issues found by CERT's fuzzing tool (Will Dormann) @@ -851,7 +1093,7 @@ * Identify gnu tar vs. posix tar - * When keep going, don't print spurious newlines (Radek Vokál) + * When keep going, don't print spurious newlines (Radek Vokal) 2006-04-01 12:02 Christos Zoulas @@ -875,7 +1117,7 @@ 2005-10-31 8:54 Christos Zoulas * Fix regression where the core info was not completely processed - (Radek Vokál) + (Radek Vokal) 2005-10-20 11:15 Christos Zoulas @@ -892,7 +1134,7 @@ 2005-09-20 13:33 Christos Zoulas * Don't print SVR4 Style in core files multiple times - (Radek Vokál) + (Radek Vokal) 2005-08-27 04:09 Christos Zoulas Modified: stable/10/contrib/file/Makefile.am ============================================================================== --- stable/10/contrib/file/Makefile.am Thu Jul 10 22:54:38 2014 (r268514) +++ stable/10/contrib/file/Makefile.am Fri Jul 11 00:00:00 2014 (r268515) @@ -1,280 +1,5 @@ -# -# $File: Makefile.am,v 1.78 2012/01/27 01:41:26 christos Exp $ -# -MAGIC_FRAGMENT_BASE = Magdir -MAGIC_DIR = $(top_srcdir)/magic -MAGIC_FRAGMENT_DIR = $(MAGIC_DIR)/$(MAGIC_FRAGMENT_BASE) +ACLOCAL_AMFLAGS = -I m4 -pkgdata_DATA = magic.mgc +EXTRA_DIST = MAINT -EXTRA_DIST = \ -$(MAGIC_DIR)/Header \ -$(MAGIC_DIR)/Localstuff \ -$(MAGIC_FRAGMENT_DIR)/acorn \ -$(MAGIC_FRAGMENT_DIR)/adi \ -$(MAGIC_FRAGMENT_DIR)/adventure \ -$(MAGIC_FRAGMENT_DIR)/allegro \ -$(MAGIC_FRAGMENT_DIR)/alliant \ -$(MAGIC_FRAGMENT_DIR)/amanda \ -$(MAGIC_FRAGMENT_DIR)/amigaos \ -$(MAGIC_FRAGMENT_DIR)/animation \ -$(MAGIC_FRAGMENT_DIR)/apl \ -$(MAGIC_FRAGMENT_DIR)/apple \ -$(MAGIC_FRAGMENT_DIR)/applix \ -$(MAGIC_FRAGMENT_DIR)/archive \ -$(MAGIC_FRAGMENT_DIR)/assembler \ -$(MAGIC_FRAGMENT_DIR)/asterix \ -$(MAGIC_FRAGMENT_DIR)/att3b \ -$(MAGIC_FRAGMENT_DIR)/audio \ -$(MAGIC_FRAGMENT_DIR)/basis \ -$(MAGIC_FRAGMENT_DIR)/bflt \ -$(MAGIC_FRAGMENT_DIR)/blcr \ -$(MAGIC_FRAGMENT_DIR)/blender \ -$(MAGIC_FRAGMENT_DIR)/blit \ -$(MAGIC_FRAGMENT_DIR)/bout \ -$(MAGIC_FRAGMENT_DIR)/bsdi \ -$(MAGIC_FRAGMENT_DIR)/bsi \ -$(MAGIC_FRAGMENT_DIR)/btsnoop \ -$(MAGIC_FRAGMENT_DIR)/c-lang \ -$(MAGIC_FRAGMENT_DIR)/c64 \ -$(MAGIC_FRAGMENT_DIR)/cad \ -$(MAGIC_FRAGMENT_DIR)/cafebabe \ -$(MAGIC_FRAGMENT_DIR)/cddb \ -$(MAGIC_FRAGMENT_DIR)/chord \ -$(MAGIC_FRAGMENT_DIR)/cisco \ -$(MAGIC_FRAGMENT_DIR)/citrus \ -$(MAGIC_FRAGMENT_DIR)/clarion \ -$(MAGIC_FRAGMENT_DIR)/claris \ -$(MAGIC_FRAGMENT_DIR)/clipper \ -$(MAGIC_FRAGMENT_DIR)/commands \ -$(MAGIC_FRAGMENT_DIR)/communications \ -$(MAGIC_FRAGMENT_DIR)/compress \ -$(MAGIC_FRAGMENT_DIR)/console \ -$(MAGIC_FRAGMENT_DIR)/convex \ -$(MAGIC_FRAGMENT_DIR)/cracklib \ -$(MAGIC_FRAGMENT_DIR)/ctags \ -$(MAGIC_FRAGMENT_DIR)/cups \ -$(MAGIC_FRAGMENT_DIR)/dact \ -$(MAGIC_FRAGMENT_DIR)/database \ -$(MAGIC_FRAGMENT_DIR)/diamond \ -$(MAGIC_FRAGMENT_DIR)/diff \ -$(MAGIC_FRAGMENT_DIR)/digital \ -$(MAGIC_FRAGMENT_DIR)/dolby \ -$(MAGIC_FRAGMENT_DIR)/dump \ -$(MAGIC_FRAGMENT_DIR)/dyadic \ -$(MAGIC_FRAGMENT_DIR)/ebml \ -$(MAGIC_FRAGMENT_DIR)/editors \ -$(MAGIC_FRAGMENT_DIR)/efi \ -$(MAGIC_FRAGMENT_DIR)/elf \ -$(MAGIC_FRAGMENT_DIR)/encore \ -$(MAGIC_FRAGMENT_DIR)/epoc \ -$(MAGIC_FRAGMENT_DIR)/erlang \ -$(MAGIC_FRAGMENT_DIR)/esri \ -$(MAGIC_FRAGMENT_DIR)/fcs \ -$(MAGIC_FRAGMENT_DIR)/filesystems \ -$(MAGIC_FRAGMENT_DIR)/flash \ -$(MAGIC_FRAGMENT_DIR)/fonts \ -$(MAGIC_FRAGMENT_DIR)/fortran \ -$(MAGIC_FRAGMENT_DIR)/frame \ -$(MAGIC_FRAGMENT_DIR)/freebsd \ -$(MAGIC_FRAGMENT_DIR)/fsav \ -$(MAGIC_FRAGMENT_DIR)/fusecompress \ -$(MAGIC_FRAGMENT_DIR)/games \ -$(MAGIC_FRAGMENT_DIR)/gcc \ -$(MAGIC_FRAGMENT_DIR)/geo \ -$(MAGIC_FRAGMENT_DIR)/geos \ -$(MAGIC_FRAGMENT_DIR)/gimp \ -$(MAGIC_FRAGMENT_DIR)/gnome-keyring \ -$(MAGIC_FRAGMENT_DIR)/gnu \ -$(MAGIC_FRAGMENT_DIR)/gnumeric \ -$(MAGIC_FRAGMENT_DIR)/grace \ -$(MAGIC_FRAGMENT_DIR)/graphviz \ -$(MAGIC_FRAGMENT_DIR)/gringotts \ -$(MAGIC_FRAGMENT_DIR)/guile \ -$(MAGIC_FRAGMENT_DIR)/hitachi-sh \ -$(MAGIC_FRAGMENT_DIR)/hp \ -$(MAGIC_FRAGMENT_DIR)/human68k \ -$(MAGIC_FRAGMENT_DIR)/ibm370 \ -$(MAGIC_FRAGMENT_DIR)/ibm6000 \ -$(MAGIC_FRAGMENT_DIR)/iff \ -$(MAGIC_FRAGMENT_DIR)/images \ -$(MAGIC_FRAGMENT_DIR)/inform \ -$(MAGIC_FRAGMENT_DIR)/intel \ -$(MAGIC_FRAGMENT_DIR)/interleaf \ -$(MAGIC_FRAGMENT_DIR)/island \ -$(MAGIC_FRAGMENT_DIR)/ispell \ -$(MAGIC_FRAGMENT_DIR)/isz \ -$(MAGIC_FRAGMENT_DIR)/java \ -$(MAGIC_FRAGMENT_DIR)/jpeg \ -$(MAGIC_FRAGMENT_DIR)/karma \ -$(MAGIC_FRAGMENT_DIR)/kde \ -$(MAGIC_FRAGMENT_DIR)/kml \ -$(MAGIC_FRAGMENT_DIR)/lecter \ -$(MAGIC_FRAGMENT_DIR)/lex \ -$(MAGIC_FRAGMENT_DIR)/lif \ -$(MAGIC_FRAGMENT_DIR)/linux \ -$(MAGIC_FRAGMENT_DIR)/lisp \ -$(MAGIC_FRAGMENT_DIR)/llvm \ -$(MAGIC_FRAGMENT_DIR)/lua \ -$(MAGIC_FRAGMENT_DIR)/luks \ -$(MAGIC_FRAGMENT_DIR)/m4 \ -$(MAGIC_FRAGMENT_DIR)/mach \ -$(MAGIC_FRAGMENT_DIR)/macintosh \ -$(MAGIC_FRAGMENT_DIR)/magic \ -$(MAGIC_FRAGMENT_DIR)/mail.news \ -$(MAGIC_FRAGMENT_DIR)/make \ -$(MAGIC_FRAGMENT_DIR)/maple \ -$(MAGIC_FRAGMENT_DIR)/marc21 \ -$(MAGIC_FRAGMENT_DIR)/mathcad \ -$(MAGIC_FRAGMENT_DIR)/mathematica \ -$(MAGIC_FRAGMENT_DIR)/matroska \ -$(MAGIC_FRAGMENT_DIR)/mcrypt \ -$(MAGIC_FRAGMENT_DIR)/mercurial \ -$(MAGIC_FRAGMENT_DIR)/metastore \ -$(MAGIC_FRAGMENT_DIR)/mime \ -$(MAGIC_FRAGMENT_DIR)/mips \ -$(MAGIC_FRAGMENT_DIR)/mirage \ -$(MAGIC_FRAGMENT_DIR)/misctools \ -$(MAGIC_FRAGMENT_DIR)/mkid \ -$(MAGIC_FRAGMENT_DIR)/mlssa \ -$(MAGIC_FRAGMENT_DIR)/mmdf \ -$(MAGIC_FRAGMENT_DIR)/modem \ -$(MAGIC_FRAGMENT_DIR)/motorola \ -$(MAGIC_FRAGMENT_DIR)/mozilla \ -$(MAGIC_FRAGMENT_DIR)/msdos \ -$(MAGIC_FRAGMENT_DIR)/msooxml \ -$(MAGIC_FRAGMENT_DIR)/msvc \ -$(MAGIC_FRAGMENT_DIR)/mup \ -$(MAGIC_FRAGMENT_DIR)/music \ -$(MAGIC_FRAGMENT_DIR)/natinst \ -$(MAGIC_FRAGMENT_DIR)/ncr \ -$(MAGIC_FRAGMENT_DIR)/netbsd \ -$(MAGIC_FRAGMENT_DIR)/netscape \ -$(MAGIC_FRAGMENT_DIR)/netware \ -$(MAGIC_FRAGMENT_DIR)/news \ -$(MAGIC_FRAGMENT_DIR)/nitpicker \ -$(MAGIC_FRAGMENT_DIR)/oasis \ -$(MAGIC_FRAGMENT_DIR)/ocaml \ -$(MAGIC_FRAGMENT_DIR)/octave \ -$(MAGIC_FRAGMENT_DIR)/ole2compounddocs \ -$(MAGIC_FRAGMENT_DIR)/olf \ -$(MAGIC_FRAGMENT_DIR)/os2 \ -$(MAGIC_FRAGMENT_DIR)/os400 \ -$(MAGIC_FRAGMENT_DIR)/os9 \ -$(MAGIC_FRAGMENT_DIR)/osf1 \ -$(MAGIC_FRAGMENT_DIR)/palm \ -$(MAGIC_FRAGMENT_DIR)/parix \ -$(MAGIC_FRAGMENT_DIR)/parrot \ -$(MAGIC_FRAGMENT_DIR)/pascal \ -$(MAGIC_FRAGMENT_DIR)/pbm \ -$(MAGIC_FRAGMENT_DIR)/pdf \ -$(MAGIC_FRAGMENT_DIR)/pdp \ -$(MAGIC_FRAGMENT_DIR)/perl \ -$(MAGIC_FRAGMENT_DIR)/pgp \ -$(MAGIC_FRAGMENT_DIR)/pkgadd \ -$(MAGIC_FRAGMENT_DIR)/plan9 \ -$(MAGIC_FRAGMENT_DIR)/plus5 \ -$(MAGIC_FRAGMENT_DIR)/printer \ -$(MAGIC_FRAGMENT_DIR)/project \ -$(MAGIC_FRAGMENT_DIR)/psdbms \ -$(MAGIC_FRAGMENT_DIR)/pulsar \ -$(MAGIC_FRAGMENT_DIR)/pyramid \ -$(MAGIC_FRAGMENT_DIR)/python \ -$(MAGIC_FRAGMENT_DIR)/revision \ -$(MAGIC_FRAGMENT_DIR)/riff \ -$(MAGIC_FRAGMENT_DIR)/rinex \ -$(MAGIC_FRAGMENT_DIR)/rpm \ -$(MAGIC_FRAGMENT_DIR)/rtf \ -$(MAGIC_FRAGMENT_DIR)/ruby \ -$(MAGIC_FRAGMENT_DIR)/sc \ -$(MAGIC_FRAGMENT_DIR)/sccs \ -$(MAGIC_FRAGMENT_DIR)/scientific \ -$(MAGIC_FRAGMENT_DIR)/securitycerts \ -$(MAGIC_FRAGMENT_DIR)/selinux \ -$(MAGIC_FRAGMENT_DIR)/sendmail \ -$(MAGIC_FRAGMENT_DIR)/sequent \ -$(MAGIC_FRAGMENT_DIR)/sgi \ -$(MAGIC_FRAGMENT_DIR)/sgml \ -$(MAGIC_FRAGMENT_DIR)/sharc \ -$(MAGIC_FRAGMENT_DIR)/sinclair \ -$(MAGIC_FRAGMENT_DIR)/sisu \ -$(MAGIC_FRAGMENT_DIR)/sketch \ -$(MAGIC_FRAGMENT_DIR)/smalltalk \ -$(MAGIC_FRAGMENT_DIR)/smile \ -$(MAGIC_FRAGMENT_DIR)/sniffer \ -$(MAGIC_FRAGMENT_DIR)/softquad \ -$(MAGIC_FRAGMENT_DIR)/spec \ -$(MAGIC_FRAGMENT_DIR)/spectrum \ -$(MAGIC_FRAGMENT_DIR)/sql \ -$(MAGIC_FRAGMENT_DIR)/ssh \ -$(MAGIC_FRAGMENT_DIR)/ssl \ -$(MAGIC_FRAGMENT_DIR)/sun \ -$(MAGIC_FRAGMENT_DIR)/sysex \ -$(MAGIC_FRAGMENT_DIR)/tcl \ -$(MAGIC_FRAGMENT_DIR)/teapot \ -$(MAGIC_FRAGMENT_DIR)/terminfo \ -$(MAGIC_FRAGMENT_DIR)/tex \ -$(MAGIC_FRAGMENT_DIR)/tgif \ -$(MAGIC_FRAGMENT_DIR)/ti-8x \ -$(MAGIC_FRAGMENT_DIR)/timezone \ -$(MAGIC_FRAGMENT_DIR)/troff \ -$(MAGIC_FRAGMENT_DIR)/tuxedo \ -$(MAGIC_FRAGMENT_DIR)/typeset \ -$(MAGIC_FRAGMENT_DIR)/unicode \ -$(MAGIC_FRAGMENT_DIR)/unknown \ -$(MAGIC_FRAGMENT_DIR)/uuencode \ -$(MAGIC_FRAGMENT_DIR)/varied.out \ -$(MAGIC_FRAGMENT_DIR)/varied.script \ -$(MAGIC_FRAGMENT_DIR)/vax \ -$(MAGIC_FRAGMENT_DIR)/vicar \ -$(MAGIC_FRAGMENT_DIR)/virtual \ -$(MAGIC_FRAGMENT_DIR)/virtutech \ -$(MAGIC_FRAGMENT_DIR)/visx \ -$(MAGIC_FRAGMENT_DIR)/vms \ -$(MAGIC_FRAGMENT_DIR)/vmware \ -$(MAGIC_FRAGMENT_DIR)/vorbis \ -$(MAGIC_FRAGMENT_DIR)/vxl \ -$(MAGIC_FRAGMENT_DIR)/warc \ -$(MAGIC_FRAGMENT_DIR)/weak \ -$(MAGIC_FRAGMENT_DIR)/windows \ -$(MAGIC_FRAGMENT_DIR)/wireless \ -$(MAGIC_FRAGMENT_DIR)/wordprocessors \ -$(MAGIC_FRAGMENT_DIR)/wsdl \ -$(MAGIC_FRAGMENT_DIR)/xdelta \ -$(MAGIC_FRAGMENT_DIR)/xenix \ -$(MAGIC_FRAGMENT_DIR)/xilinx \ -$(MAGIC_FRAGMENT_DIR)/xo65 \ -$(MAGIC_FRAGMENT_DIR)/xwindows \ -$(MAGIC_FRAGMENT_DIR)/zfs \ -$(MAGIC_FRAGMENT_DIR)/zilog \ -$(MAGIC_FRAGMENT_DIR)/zyxel - -MAGIC = magic.mgc -CLEANFILES = ${MAGIC} $(MAGIC_FRAGMENT_DIR)/Localstuff - -# FIXME: Build file natively as well so that it can be used to compile -# the target's magic file; for now we bail if the local version does not match -if IS_CROSS_COMPILE -FILE_COMPILE = file -FILE_COMPILE_DEP = -else -FILE_COMPILE = $(top_builddir)/src/file -FILE_COMPILE_DEP = $(FILE_COMPILE) -endif - -${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE_DEP) - @rm -fr magic - @mkdir magic && cp -p $(EXTRA_DIST) magic - @(if expr "${FILE_COMPILE}" : '.*/.*' > /dev/null; then \ - echo "Using ${FILE_COMPILE} to generate ${MAGIC}" > /dev/null; \ - else \ - v=$$(file --version | sed -e s/file-// -e q); \ - if [ "$$v" != "${PACKAGE_VERSION}" ]; then \ - echo "Cannot use the installed version of file ($$v) to"; \ - echo "cross-compile file ${PACKAGE_VERSION}"; \ - echo "Please install file ${PACKAGE_VERSION} locally first"; \ - exit 1; \ - fi; \ - fi) - $(FILE_COMPILE) -C -m magic - @rm -fr magic +SUBDIRS = src magic tests doc python Modified: stable/10/contrib/file/Makefile.in ============================================================================== --- stable/10/contrib/file/Makefile.in Thu Jul 10 22:54:38 2014 (r268514) +++ stable/10/contrib/file/Makefile.in Fri Jul 11 00:00:00 2014 (r268515) @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,8 +13,52 @@ # PARTICULAR PURPOSE. @SET_MAKE@ - VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ @@ -33,8 +76,12 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -subdir = magic -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +subdir = . +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/configure $(am__configure_deps) \ + $(srcdir)/config.h.in AUTHORS COPYING ChangeLog INSTALL NEWS \ + README TODO compile config.guess config.sub depcomp install-sh \ + missing ltmain.sh ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ @@ -42,42 +89,111 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/l $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(pkgdatadir)" -DATA = $(pkgdata_DATA) +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + cscope distdir dist dist-all distcheck +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)config.h.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +CSCOPE = cscope +DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +DIST_TARGETS = dist-gzip +distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' +distcleancheck_listfiles = find . -type f -print pkgdatadir = @pkgdatadir@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -90,11 +206,13 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CFLAG_VISIBILITY = @CFLAG_VISIBILITY@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -104,6 +222,7 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ +HAVE_VISIBILITY = @HAVE_VISIBILITY@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -118,6 +237,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MINGW = @MINGW@ MKDIR_P = @MKDIR_P@ NM = @NM@ @@ -145,6 +265,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -178,7 +299,6 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -194,332 +314,181 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ - -# -# $File: Makefile.am,v 1.78 2012/01/27 01:41:26 christos Exp $ -# -MAGIC_FRAGMENT_BASE = Magdir -MAGIC_DIR = $(top_srcdir)/magic -MAGIC_FRAGMENT_DIR = $(MAGIC_DIR)/$(MAGIC_FRAGMENT_BASE) -pkgdata_DATA = magic.mgc -EXTRA_DIST = \ -$(MAGIC_DIR)/Header \ -$(MAGIC_DIR)/Localstuff \ -$(MAGIC_FRAGMENT_DIR)/acorn \ -$(MAGIC_FRAGMENT_DIR)/adi \ -$(MAGIC_FRAGMENT_DIR)/adventure \ -$(MAGIC_FRAGMENT_DIR)/allegro \ -$(MAGIC_FRAGMENT_DIR)/alliant \ -$(MAGIC_FRAGMENT_DIR)/amanda \ -$(MAGIC_FRAGMENT_DIR)/amigaos \ -$(MAGIC_FRAGMENT_DIR)/animation \ -$(MAGIC_FRAGMENT_DIR)/apl \ -$(MAGIC_FRAGMENT_DIR)/apple \ -$(MAGIC_FRAGMENT_DIR)/applix \ -$(MAGIC_FRAGMENT_DIR)/archive \ -$(MAGIC_FRAGMENT_DIR)/assembler \ -$(MAGIC_FRAGMENT_DIR)/asterix \ -$(MAGIC_FRAGMENT_DIR)/att3b \ -$(MAGIC_FRAGMENT_DIR)/audio \ -$(MAGIC_FRAGMENT_DIR)/basis \ -$(MAGIC_FRAGMENT_DIR)/bflt \ -$(MAGIC_FRAGMENT_DIR)/blcr \ -$(MAGIC_FRAGMENT_DIR)/blender \ -$(MAGIC_FRAGMENT_DIR)/blit \ -$(MAGIC_FRAGMENT_DIR)/bout \ -$(MAGIC_FRAGMENT_DIR)/bsdi \ -$(MAGIC_FRAGMENT_DIR)/bsi \ -$(MAGIC_FRAGMENT_DIR)/btsnoop \ -$(MAGIC_FRAGMENT_DIR)/c-lang \ -$(MAGIC_FRAGMENT_DIR)/c64 \ -$(MAGIC_FRAGMENT_DIR)/cad \ -$(MAGIC_FRAGMENT_DIR)/cafebabe \ -$(MAGIC_FRAGMENT_DIR)/cddb \ -$(MAGIC_FRAGMENT_DIR)/chord \ -$(MAGIC_FRAGMENT_DIR)/cisco \ -$(MAGIC_FRAGMENT_DIR)/citrus \ -$(MAGIC_FRAGMENT_DIR)/clarion \ -$(MAGIC_FRAGMENT_DIR)/claris \ -$(MAGIC_FRAGMENT_DIR)/clipper \ -$(MAGIC_FRAGMENT_DIR)/commands \ -$(MAGIC_FRAGMENT_DIR)/communications \ -$(MAGIC_FRAGMENT_DIR)/compress \ -$(MAGIC_FRAGMENT_DIR)/console \ -$(MAGIC_FRAGMENT_DIR)/convex \ -$(MAGIC_FRAGMENT_DIR)/cracklib \ -$(MAGIC_FRAGMENT_DIR)/ctags \ -$(MAGIC_FRAGMENT_DIR)/cups \ -$(MAGIC_FRAGMENT_DIR)/dact \ -$(MAGIC_FRAGMENT_DIR)/database \ -$(MAGIC_FRAGMENT_DIR)/diamond \ -$(MAGIC_FRAGMENT_DIR)/diff \ -$(MAGIC_FRAGMENT_DIR)/digital \ -$(MAGIC_FRAGMENT_DIR)/dolby \ -$(MAGIC_FRAGMENT_DIR)/dump \ -$(MAGIC_FRAGMENT_DIR)/dyadic \ -$(MAGIC_FRAGMENT_DIR)/ebml \ -$(MAGIC_FRAGMENT_DIR)/editors \ -$(MAGIC_FRAGMENT_DIR)/efi \ -$(MAGIC_FRAGMENT_DIR)/elf \ -$(MAGIC_FRAGMENT_DIR)/encore \ -$(MAGIC_FRAGMENT_DIR)/epoc \ -$(MAGIC_FRAGMENT_DIR)/erlang \ -$(MAGIC_FRAGMENT_DIR)/esri \ -$(MAGIC_FRAGMENT_DIR)/fcs \ -$(MAGIC_FRAGMENT_DIR)/filesystems \ -$(MAGIC_FRAGMENT_DIR)/flash \ -$(MAGIC_FRAGMENT_DIR)/fonts \ -$(MAGIC_FRAGMENT_DIR)/fortran \ -$(MAGIC_FRAGMENT_DIR)/frame \ -$(MAGIC_FRAGMENT_DIR)/freebsd \ -$(MAGIC_FRAGMENT_DIR)/fsav \ -$(MAGIC_FRAGMENT_DIR)/fusecompress \ -$(MAGIC_FRAGMENT_DIR)/games \ -$(MAGIC_FRAGMENT_DIR)/gcc \ -$(MAGIC_FRAGMENT_DIR)/geo \ -$(MAGIC_FRAGMENT_DIR)/geos \ -$(MAGIC_FRAGMENT_DIR)/gimp \ -$(MAGIC_FRAGMENT_DIR)/gnome-keyring \ -$(MAGIC_FRAGMENT_DIR)/gnu \ -$(MAGIC_FRAGMENT_DIR)/gnumeric \ -$(MAGIC_FRAGMENT_DIR)/grace \ -$(MAGIC_FRAGMENT_DIR)/graphviz \ -$(MAGIC_FRAGMENT_DIR)/gringotts \ -$(MAGIC_FRAGMENT_DIR)/guile \ -$(MAGIC_FRAGMENT_DIR)/hitachi-sh \ -$(MAGIC_FRAGMENT_DIR)/hp \ -$(MAGIC_FRAGMENT_DIR)/human68k \ -$(MAGIC_FRAGMENT_DIR)/ibm370 \ -$(MAGIC_FRAGMENT_DIR)/ibm6000 \ -$(MAGIC_FRAGMENT_DIR)/iff \ -$(MAGIC_FRAGMENT_DIR)/images \ -$(MAGIC_FRAGMENT_DIR)/inform \ -$(MAGIC_FRAGMENT_DIR)/intel \ -$(MAGIC_FRAGMENT_DIR)/interleaf \ -$(MAGIC_FRAGMENT_DIR)/island \ -$(MAGIC_FRAGMENT_DIR)/ispell \ -$(MAGIC_FRAGMENT_DIR)/isz \ -$(MAGIC_FRAGMENT_DIR)/java \ -$(MAGIC_FRAGMENT_DIR)/jpeg \ -$(MAGIC_FRAGMENT_DIR)/karma \ -$(MAGIC_FRAGMENT_DIR)/kde \ -$(MAGIC_FRAGMENT_DIR)/kml \ -$(MAGIC_FRAGMENT_DIR)/lecter \ -$(MAGIC_FRAGMENT_DIR)/lex \ -$(MAGIC_FRAGMENT_DIR)/lif \ -$(MAGIC_FRAGMENT_DIR)/linux \ -$(MAGIC_FRAGMENT_DIR)/lisp \ -$(MAGIC_FRAGMENT_DIR)/llvm \ -$(MAGIC_FRAGMENT_DIR)/lua \ -$(MAGIC_FRAGMENT_DIR)/luks \ -$(MAGIC_FRAGMENT_DIR)/m4 \ -$(MAGIC_FRAGMENT_DIR)/mach \ -$(MAGIC_FRAGMENT_DIR)/macintosh \ -$(MAGIC_FRAGMENT_DIR)/magic \ -$(MAGIC_FRAGMENT_DIR)/mail.news \ -$(MAGIC_FRAGMENT_DIR)/make \ -$(MAGIC_FRAGMENT_DIR)/maple \ -$(MAGIC_FRAGMENT_DIR)/marc21 \ -$(MAGIC_FRAGMENT_DIR)/mathcad \ -$(MAGIC_FRAGMENT_DIR)/mathematica \ -$(MAGIC_FRAGMENT_DIR)/matroska \ -$(MAGIC_FRAGMENT_DIR)/mcrypt \ -$(MAGIC_FRAGMENT_DIR)/mercurial \ -$(MAGIC_FRAGMENT_DIR)/metastore \ -$(MAGIC_FRAGMENT_DIR)/mime \ -$(MAGIC_FRAGMENT_DIR)/mips \ -$(MAGIC_FRAGMENT_DIR)/mirage \ -$(MAGIC_FRAGMENT_DIR)/misctools \ -$(MAGIC_FRAGMENT_DIR)/mkid \ -$(MAGIC_FRAGMENT_DIR)/mlssa \ -$(MAGIC_FRAGMENT_DIR)/mmdf \ -$(MAGIC_FRAGMENT_DIR)/modem \ -$(MAGIC_FRAGMENT_DIR)/motorola \ -$(MAGIC_FRAGMENT_DIR)/mozilla \ -$(MAGIC_FRAGMENT_DIR)/msdos \ -$(MAGIC_FRAGMENT_DIR)/msooxml \ -$(MAGIC_FRAGMENT_DIR)/msvc \ -$(MAGIC_FRAGMENT_DIR)/mup \ -$(MAGIC_FRAGMENT_DIR)/music \ -$(MAGIC_FRAGMENT_DIR)/natinst \ -$(MAGIC_FRAGMENT_DIR)/ncr \ -$(MAGIC_FRAGMENT_DIR)/netbsd \ -$(MAGIC_FRAGMENT_DIR)/netscape \ -$(MAGIC_FRAGMENT_DIR)/netware \ -$(MAGIC_FRAGMENT_DIR)/news \ -$(MAGIC_FRAGMENT_DIR)/nitpicker \ -$(MAGIC_FRAGMENT_DIR)/oasis \ -$(MAGIC_FRAGMENT_DIR)/ocaml \ -$(MAGIC_FRAGMENT_DIR)/octave \ -$(MAGIC_FRAGMENT_DIR)/ole2compounddocs \ -$(MAGIC_FRAGMENT_DIR)/olf \ -$(MAGIC_FRAGMENT_DIR)/os2 \ -$(MAGIC_FRAGMENT_DIR)/os400 \ -$(MAGIC_FRAGMENT_DIR)/os9 \ -$(MAGIC_FRAGMENT_DIR)/osf1 \ -$(MAGIC_FRAGMENT_DIR)/palm \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Fri Jul 11 00:08:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D667187D; Fri, 11 Jul 2014 00:08:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C33FA2579; Fri, 11 Jul 2014 00:08:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6B08DL8001058; Fri, 11 Jul 2014 00:08:13 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6B08Dk6001057; Fri, 11 Jul 2014 00:08:13 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201407110008.s6B08Dk6001057@svn.freebsd.org> From: Xin LI Date: Fri, 11 Jul 2014 00:08:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268516 - stable/10/usr.bin/gzip X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jul 2014 00:08:13 -0000 Author: delphij Date: Fri Jul 11 00:08:13 2014 New Revision: 268516 URL: http://svnweb.freebsd.org/changeset/base/268516 Log: MFC r267887: Correct buffer size. Submitted by: Sascha Wildner Modified: stable/10/usr.bin/gzip/zuncompress.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/gzip/zuncompress.c ============================================================================== --- stable/10/usr.bin/gzip/zuncompress.c Fri Jul 11 00:00:00 2014 (r268515) +++ stable/10/usr.bin/gzip/zuncompress.c Fri Jul 11 00:08:13 2014 (r268516) @@ -145,7 +145,7 @@ zuncompress(FILE *in, FILE *out, char *p else compressed_pre = NULL; - while ((bin = fread(buf, 1, sizeof(buf), in)) != 0) { + while ((bin = fread(buf, 1, BUFSIZE, in)) != 0) { if (tflag == 0 && (off_t)fwrite(buf, 1, bin, out) != bin) { free(buf); return -1; From owner-svn-src-stable@FreeBSD.ORG Fri Jul 11 00:11:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C74C0AD6; Fri, 11 Jul 2014 00:11:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B46922619; Fri, 11 Jul 2014 00:11:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6B0BOKS002796; Fri, 11 Jul 2014 00:11:24 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6B0BOHK002795; Fri, 11 Jul 2014 00:11:24 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201407110011.s6B0BOHK002795@svn.freebsd.org> From: Xin LI Date: Fri, 11 Jul 2014 00:11:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268517 - stable/10/usr.bin/procstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jul 2014 00:11:24 -0000 Author: delphij Date: Fri Jul 11 00:11:24 2014 New Revision: 268517 URL: http://svnweb.freebsd.org/changeset/base/268517 Log: MFC r267886: Use correct length for buffer. Submitted by: Sascha Wildner Modified: stable/10/usr.bin/procstat/procstat_files.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/procstat/procstat_files.c ============================================================================== --- stable/10/usr.bin/procstat/procstat_files.c Fri Jul 11 00:08:13 2014 (r268516) +++ stable/10/usr.bin/procstat/procstat_files.c Fri Jul 11 00:11:24 2014 (r268517) @@ -114,7 +114,7 @@ addr_to_string(struct sockaddr_storage * snprintf(buffer, buflen, "%s.%d", buffer2, ntohs(sin6->sin6_port)); else - strlcpy(buffer, "-", sizeof(buffer)); + strlcpy(buffer, "-", buflen); break; default: From owner-svn-src-stable@FreeBSD.ORG Fri Jul 11 00:14:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 22365D24; Fri, 11 Jul 2014 00:14:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F1E62632; Fri, 11 Jul 2014 00:14:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6B0ETLU005565; Fri, 11 Jul 2014 00:14:29 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6B0ETpc005564; Fri, 11 Jul 2014 00:14:29 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201407110014.s6B0ETpc005564@svn.freebsd.org> From: Xin LI Date: Fri, 11 Jul 2014 00:14:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268518 - stable/10/sys/dev/mrsas X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jul 2014 00:14:30 -0000 Author: delphij Date: Fri Jul 11 00:14:29 2014 New Revision: 268518 URL: http://svnweb.freebsd.org/changeset/base/268518 Log: Correct memset size. Submitted by: Sascha Wildner (swildner at dragonflybsd dot org) Reviewed by: Kashyap Desai Modified: stable/10/sys/dev/mrsas/mrsas_fp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mrsas/mrsas_fp.c ============================================================================== --- stable/10/sys/dev/mrsas/mrsas_fp.c Fri Jul 11 00:11:24 2014 (r268517) +++ stable/10/sys/dev/mrsas/mrsas_fp.c Fri Jul 11 00:14:29 2014 (r268518) @@ -1219,7 +1219,7 @@ void mrsas_set_pd_lba(MRSAS_RAID_SCSI_IO opcode = cdb[0] == READ_6 ? READ_10 : WRITE_10; control = cdb[5]; - memset(cdb, 0, sizeof(cdb)); + memset(cdb, 0, sizeof(io_request->CDB.CDB32)); cdb[0] = opcode; cdb[9] = control; From owner-svn-src-stable@FreeBSD.ORG Fri Jul 11 00:26:58 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2E7BB1A3; Fri, 11 Jul 2014 00:26:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B4E8273B; Fri, 11 Jul 2014 00:26:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6B0QvpD010525; Fri, 11 Jul 2014 00:26:57 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6B0Qvtn010524; Fri, 11 Jul 2014 00:26:57 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201407110026.s6B0Qvtn010524@svn.freebsd.org> From: Xin LI Date: Fri, 11 Jul 2014 00:26:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268519 - stable/10/sys/dev/random X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jul 2014 00:26:58 -0000 Author: delphij Date: Fri Jul 11 00:26:57 2014 New Revision: 268519 URL: http://svnweb.freebsd.org/changeset/base/268519 Log: MFC r267984: Use Intel's official name (Secure Key) per Intel® Digital Random Number Generator (DRNG) Software Implementation Guide. Reviewed by: kib Approved by: so Modified: stable/10/sys/dev/random/ivy.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/random/ivy.c ============================================================================== --- stable/10/sys/dev/random/ivy.c Fri Jul 11 00:14:29 2014 (r268518) +++ stable/10/sys/dev/random/ivy.c Fri Jul 11 00:26:57 2014 (r268519) @@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$"); static int random_ivy_read(void *, int); static struct random_hardware_source random_ivy = { - .ident = "Hardware, Intel IvyBridge+ RNG", + .ident = "Hardware, Intel Secure Key RNG", .source = RANDOM_PURE_RDRAND, .read = random_ivy_read }; From owner-svn-src-stable@FreeBSD.ORG Sat Jul 12 01:59:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 121DBE3B; Sat, 12 Jul 2014 01:59:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D85E32EFD; Sat, 12 Jul 2014 01:59:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6C1x79d011019; Sat, 12 Jul 2014 01:59:07 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6C1x7aB011018; Sat, 12 Jul 2014 01:59:07 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407120159.s6C1x7aB011018@svn.freebsd.org> From: Alexander Motin Date: Sat, 12 Jul 2014 01:59:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268545 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2014 01:59:08 -0000 Author: mav Date: Sat Jul 12 01:59:07 2014 New Revision: 268545 URL: http://svnweb.freebsd.org/changeset/base/268545 Log: MFC r267986: Remove odd practice of inverting error codes. -EPERM is equal to ERESTART, returning which from ioctl() handler causes infinite syscall restart. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Sat Jul 12 01:06:29 2014 (r268544) +++ stable/10/sys/cam/ctl/ctl.c Sat Jul 12 01:59:07 2014 (r268545) @@ -2191,14 +2191,14 @@ ctl_ioctl(struct cdev *dev, u_long cmd, * to this FETD. */ if ((softc->ioctl_info.flags & CTL_IOCTL_FLAG_ENABLED) == 0) { - retval = -EPERM; + retval = EPERM; break; } io = ctl_alloc_io(softc->ioctl_info.fe.ctl_pool_ref); if (io == NULL) { printf("ctl_ioctl: can't allocate ctl_io!\n"); - retval = -ENOSPC; + retval = ENOSPC; break; } @@ -2728,7 +2728,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, softc->flags |= CTL_FLAG_REAL_SYNC; break; default: - retval = -EINVAL; + retval = EINVAL; break; } mtx_unlock(&softc->ctl_lock); @@ -3199,7 +3199,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, if (found == 0) { printf("ctl: unknown ioctl command %#lx or backend " "%d\n", cmd, type); - retval = -EINVAL; + retval = EINVAL; break; } retval = backend->ioctl(dev, cmd, addr, flag, td); @@ -3364,7 +3364,7 @@ ctl_pool_create(struct ctl_softc *ctl_so pool = (struct ctl_io_pool *)malloc(sizeof(*pool), M_CTL, M_NOWAIT | M_ZERO); if (pool == NULL) { - retval = -ENOMEM; + retval = ENOMEM; goto bailout; } @@ -3447,7 +3447,7 @@ ctl_pool_acquire(struct ctl_io_pool *poo mtx_assert(&pool->ctl_softc->pool_lock, MA_OWNED); if (pool->flags & CTL_POOL_FLAG_INVALID) - return (-EINVAL); + return (EINVAL); pool->refcount++; @@ -9396,7 +9396,7 @@ ctl_tur(struct ctl_scsiio *ctsio) CTL_DEBUG_PRINT(("ctl_tur\n")); if (lun == NULL) - return (-EINVAL); + return (EINVAL); ctsio->scsi_status = SCSI_STATUS_OK; ctsio->io_hdr.status = CTL_SUCCESS; @@ -13417,7 +13417,7 @@ ctl_queue(union ctl_io *io) default: mtx_unlock(&ctl_softc->ctl_lock); printf("ctl_queue: unknown I/O type %d\n", io->io_hdr.io_type); - return (-EINVAL); + return (EINVAL); break; /* NOTREACHED */ } mtx_unlock(&ctl_softc->ctl_lock); From owner-svn-src-stable@FreeBSD.ORG Sat Jul 12 02:03:29 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 93706112; Sat, 12 Jul 2014 02:03:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F7312F99; Sat, 12 Jul 2014 02:03:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6C23TDB015599; Sat, 12 Jul 2014 02:03:29 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6C23T5O015598; Sat, 12 Jul 2014 02:03:29 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407120203.s6C23T5O015598@svn.freebsd.org> From: Alexander Motin Date: Sat, 12 Jul 2014 02:03:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268546 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2014 02:03:29 -0000 Author: mav Date: Sat Jul 12 02:03:29 2014 New Revision: 268546 URL: http://svnweb.freebsd.org/changeset/base/268546 Log: MFC r268419: Fix use-after-free on XPT_RESET_BUS. That command is not queued, so does not use later status update. Modified: stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Sat Jul 12 01:59:07 2014 (r268545) +++ stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Sat Jul 12 02:03:29 2014 (r268546) @@ -505,6 +505,10 @@ cfcs_done(union ctl_io *io) union ccb *ccb; ccb = io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr; + if (ccb == NULL) { + ctl_free_io(io); + return; + } /* * At this point we should have status. If we don't, that's a bug. @@ -786,7 +790,8 @@ cfcs_action(struct cam_sim *sim, union c ctl_zero_io(io); /* Save pointers on both sides */ - io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = ccb; + if (ccb->ccb_h.func_code == XPT_RESET_DEV) + io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = ccb; ccb->ccb_h.io_ptr = io; io->io_hdr.io_type = CTL_IO_TASK; From owner-svn-src-stable@FreeBSD.ORG Sat Jul 12 02:04:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2CB662BB; Sat, 12 Jul 2014 02:04:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F3CFE2FA7; Sat, 12 Jul 2014 02:04:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6C24jFG016043; Sat, 12 Jul 2014 02:04:45 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6C24jbO016042; Sat, 12 Jul 2014 02:04:45 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407120204.s6C24jbO016042@svn.freebsd.org> From: Alexander Motin Date: Sat, 12 Jul 2014 02:04:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268547 - stable/9/sys/cam/ctl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2014 02:04:46 -0000 Author: mav Date: Sat Jul 12 02:04:45 2014 New Revision: 268547 URL: http://svnweb.freebsd.org/changeset/base/268547 Log: MFC r267986: Remove odd practice of inverting error codes. -EPERM is equal to ERESTART, returning which from ioctl() handler causes infinite syscall restart. Modified: stable/9/sys/cam/ctl/ctl.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ctl/ctl.c ============================================================================== --- stable/9/sys/cam/ctl/ctl.c Sat Jul 12 02:03:29 2014 (r268546) +++ stable/9/sys/cam/ctl/ctl.c Sat Jul 12 02:04:45 2014 (r268547) @@ -2180,14 +2180,14 @@ ctl_ioctl(struct cdev *dev, u_long cmd, * to this FETD. */ if ((softc->ioctl_info.flags & CTL_IOCTL_FLAG_ENABLED) == 0) { - retval = -EPERM; + retval = EPERM; break; } io = ctl_alloc_io(softc->ioctl_info.fe.ctl_pool_ref); if (io == NULL) { printf("ctl_ioctl: can't allocate ctl_io!\n"); - retval = -ENOSPC; + retval = ENOSPC; break; } @@ -2717,7 +2717,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, softc->flags |= CTL_FLAG_REAL_SYNC; break; default: - retval = -EINVAL; + retval = EINVAL; break; } mtx_unlock(&softc->ctl_lock); @@ -3166,7 +3166,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, if (found == 0) { printf("ctl: unknown ioctl command %#lx or backend " "%d\n", cmd, type); - retval = -EINVAL; + retval = EINVAL; break; } retval = backend->ioctl(dev, cmd, addr, flag, td); @@ -3331,7 +3331,7 @@ ctl_pool_create(struct ctl_softc *ctl_so pool = (struct ctl_io_pool *)malloc(sizeof(*pool), M_CTL, M_NOWAIT | M_ZERO); if (pool == NULL) { - retval = -ENOMEM; + retval = ENOMEM; goto bailout; } @@ -3414,7 +3414,7 @@ ctl_pool_acquire(struct ctl_io_pool *poo mtx_assert(&pool->ctl_softc->pool_lock, MA_OWNED); if (pool->flags & CTL_POOL_FLAG_INVALID) - return (-EINVAL); + return (EINVAL); pool->refcount++; @@ -8901,7 +8901,7 @@ ctl_tur(struct ctl_scsiio *ctsio) CTL_DEBUG_PRINT(("ctl_tur\n")); if (lun == NULL) - return (-EINVAL); + return (EINVAL); ctsio->scsi_status = SCSI_STATUS_OK; ctsio->io_hdr.status = CTL_SUCCESS; @@ -12704,7 +12704,7 @@ ctl_queue(union ctl_io *io) default: mtx_unlock(&ctl_softc->ctl_lock); printf("ctl_queue: unknown I/O type %d\n", io->io_hdr.io_type); - return (-EINVAL); + return (EINVAL); break; /* NOTREACHED */ } mtx_unlock(&ctl_softc->ctl_lock); From owner-svn-src-stable@FreeBSD.ORG Sat Jul 12 02:05:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A2B64DB; Sat, 12 Jul 2014 02:05:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 666212FB3; Sat, 12 Jul 2014 02:05:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6C25qB0016652; Sat, 12 Jul 2014 02:05:52 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6C25qo9016651; Sat, 12 Jul 2014 02:05:52 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407120205.s6C25qo9016651@svn.freebsd.org> From: Alexander Motin Date: Sat, 12 Jul 2014 02:05:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268548 - stable/9/sys/cam/ctl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2014 02:05:52 -0000 Author: mav Date: Sat Jul 12 02:05:51 2014 New Revision: 268548 URL: http://svnweb.freebsd.org/changeset/base/268548 Log: MFC r268419: Fix use-after-free on XPT_RESET_BUS. That command is not queued, so does not use later status update. Modified: stable/9/sys/cam/ctl/ctl_frontend_cam_sim.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- stable/9/sys/cam/ctl/ctl_frontend_cam_sim.c Sat Jul 12 02:04:45 2014 (r268547) +++ stable/9/sys/cam/ctl/ctl_frontend_cam_sim.c Sat Jul 12 02:05:51 2014 (r268548) @@ -512,6 +512,10 @@ cfcs_done(union ctl_io *io) struct cam_sim *sim; ccb = io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr; + if (ccb == NULL) { + ctl_free_io(io); + return; + } sim = xpt_path_sim(ccb->ccb_h.path); softc = (struct cfcs_softc *)cam_sim_softc(sim); @@ -799,7 +803,8 @@ cfcs_action(struct cam_sim *sim, union c ctl_zero_io(io); /* Save pointers on both sides */ - io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = ccb; + if (ccb->ccb_h.func_code == XPT_RESET_DEV) + io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = ccb; ccb->ccb_h.io_ptr = io; io->io_hdr.io_type = CTL_IO_TASK; From owner-svn-src-stable@FreeBSD.ORG Sat Jul 12 02:17:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1F5F86E5; Sat, 12 Jul 2014 02:17:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A9E720A4; Sat, 12 Jul 2014 02:17:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6C2HB3t023093; Sat, 12 Jul 2014 02:17:11 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6C2HAkM023091; Sat, 12 Jul 2014 02:17:10 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407120217.s6C2HAkM023091@svn.freebsd.org> From: Alexander Motin Date: Sat, 12 Jul 2014 02:17:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268549 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2014 02:17:11 -0000 Author: mav Date: Sat Jul 12 02:17:10 2014 New Revision: 268549 URL: http://svnweb.freebsd.org/changeset/base/268549 Log: MFC r267877: Lock devstat updates in block backend to make it usable. Polish lock names. Modified: stable/10/sys/cam/ctl/ctl_backend_block.c stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Sat Jul 12 02:05:51 2014 (r268548) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Sat Jul 12 02:17:10 2014 (r268549) @@ -162,7 +162,6 @@ struct ctl_be_block_lun { cbb_dispatch_t dispatch; cbb_dispatch_t lun_flush; cbb_dispatch_t unmap; - struct mtx lock; uma_zone_t lun_zone; uint64_t size_blocks; uint64_t size_bytes; @@ -181,6 +180,8 @@ struct ctl_be_block_lun { STAILQ_HEAD(, ctl_io_hdr) input_queue; STAILQ_HEAD(, ctl_io_hdr) config_write_queue; STAILQ_HEAD(, ctl_io_hdr) datamove_queue; + struct mtx_padalign io_lock; + struct mtx_padalign queue_lock; }; /* @@ -338,22 +339,7 @@ ctl_free_beio(struct ctl_be_block_io *be static void ctl_complete_beio(struct ctl_be_block_io *beio) { - union ctl_io *io; - int io_len; - - io = beio->io; - - if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) - io_len = beio->io_len; - else - io_len = 0; - - devstat_end_transaction(beio->lun->disk_stats, - /*bytes*/ io_len, - beio->ds_tag_type, - beio->ds_trans_type, - /*now*/ NULL, - /*then*/&beio->ds_t0); + union ctl_io *io = beio->io; if (beio->beio_cont != NULL) { beio->beio_cont(beio); @@ -451,14 +437,14 @@ ctl_be_block_move_done(union ctl_io *io) * This move done routine is generally called in the SIM's * interrupt context, and therefore we cannot block. */ - mtx_lock(&be_lun->lock); + mtx_lock(&be_lun->queue_lock); /* * XXX KDM make sure that links is okay to use at this point. * Otherwise, we either need to add another field to ctl_io_hdr, * or deal with resource allocation here. */ STAILQ_INSERT_TAIL(&be_lun->datamove_queue, &io->io_hdr, links); - mtx_unlock(&be_lun->lock); + mtx_unlock(&be_lun->queue_lock); taskqueue_enqueue(be_lun->io_taskqueue, &be_lun->io_task); @@ -480,7 +466,7 @@ ctl_be_block_biodone(struct bio *bio) DPRINTF("entered\n"); error = bio->bio_error; - mtx_lock(&be_lun->lock); + mtx_lock(&be_lun->io_lock); if (error != 0) beio->num_errors++; @@ -498,7 +484,7 @@ ctl_be_block_biodone(struct bio *bio) */ if ((beio->send_complete == 0) || (beio->num_bios_done < beio->num_bios_sent)) { - mtx_unlock(&be_lun->lock); + mtx_unlock(&be_lun->io_lock); return; } @@ -506,7 +492,10 @@ ctl_be_block_biodone(struct bio *bio) * At this point, we've verified that we are the last I/O to * complete, so it's safe to drop the lock. */ - mtx_unlock(&be_lun->lock); + devstat_end_transaction(beio->lun->disk_stats, beio->io_len, + beio->ds_tag_type, beio->ds_trans_type, + /*now*/ NULL, /*then*/&beio->ds_t0); + mtx_unlock(&be_lun->io_lock); /* * If there are any errors from the backing device, we fail the @@ -548,15 +537,18 @@ static void ctl_be_block_flush_file(struct ctl_be_block_lun *be_lun, struct ctl_be_block_io *beio) { - union ctl_io *io; + union ctl_io *io = beio->io; struct mount *mountpoint; int error, lock_flags; DPRINTF("entered\n"); - io = beio->io; + binuptime(&beio->ds_t0); + mtx_lock(&be_lun->io_lock); + devstat_start_transaction(beio->lun->disk_stats, &beio->ds_t0); + mtx_unlock(&be_lun->io_lock); - (void) vn_start_write(be_lun->vn, &mountpoint, V_WAIT); + (void) vn_start_write(be_lun->vn, &mountpoint, V_WAIT); if (MNT_SHARED_WRITES(mountpoint) || ((mountpoint == NULL) @@ -567,14 +559,17 @@ ctl_be_block_flush_file(struct ctl_be_bl vn_lock(be_lun->vn, lock_flags | LK_RETRY); - binuptime(&beio->ds_t0); - devstat_start_transaction(beio->lun->disk_stats, &beio->ds_t0); - error = VOP_FSYNC(be_lun->vn, MNT_WAIT, curthread); VOP_UNLOCK(be_lun->vn, 0); vn_finished_write(mountpoint); + mtx_lock(&be_lun->io_lock); + devstat_end_transaction(beio->lun->disk_stats, beio->io_len, + beio->ds_tag_type, beio->ds_trans_type, + /*now*/ NULL, /*then*/&beio->ds_t0); + mtx_unlock(&be_lun->io_lock); + if (error == 0) ctl_set_success(&io->scsiio); else { @@ -629,12 +624,14 @@ ctl_be_block_dispatch_file(struct ctl_be xiovec->iov_len = beio->sg_segs[i].len; } + binuptime(&beio->ds_t0); + mtx_lock(&be_lun->io_lock); + devstat_start_transaction(beio->lun->disk_stats, &beio->ds_t0); + mtx_unlock(&be_lun->io_lock); + if (beio->bio_cmd == BIO_READ) { vn_lock(be_lun->vn, LK_SHARED | LK_RETRY); - binuptime(&beio->ds_t0); - devstat_start_transaction(beio->lun->disk_stats, &beio->ds_t0); - /* * UFS pays attention to IO_DIRECT for reads. If the * DIRECTIO option is configured into the kernel, it calls @@ -675,9 +672,6 @@ ctl_be_block_dispatch_file(struct ctl_be vn_lock(be_lun->vn, lock_flags | LK_RETRY); - binuptime(&beio->ds_t0); - devstat_start_transaction(beio->lun->disk_stats, &beio->ds_t0); - /* * UFS pays attention to IO_DIRECT for writes. The write * is done asynchronously. (Normally the write would just @@ -704,6 +698,12 @@ ctl_be_block_dispatch_file(struct ctl_be SDT_PROBE(cbb, kernel, write, file_done, 0, 0, 0, 0, 0); } + mtx_lock(&be_lun->io_lock); + devstat_end_transaction(beio->lun->disk_stats, beio->io_len, + beio->ds_tag_type, beio->ds_trans_type, + /*now*/ NULL, /*then*/&beio->ds_t0); + mtx_unlock(&be_lun->io_lock); + /* * If we got an error, set the sense data to "MEDIUM ERROR" and * return the I/O to the user. @@ -773,7 +773,9 @@ ctl_be_block_flush_dev(struct ctl_be_blo beio->send_complete = 1; binuptime(&beio->ds_t0); + mtx_lock(&be_lun->io_lock); devstat_start_transaction(be_lun->disk_stats, &beio->ds_t0); + mtx_unlock(&be_lun->io_lock); (*dev_data->csw->d_strategy)(bio); } @@ -804,11 +806,11 @@ ctl_be_block_unmap_dev_range(struct ctl_ off += bio->bio_length; len -= bio->bio_length; - mtx_lock(&be_lun->lock); + mtx_lock(&be_lun->io_lock); beio->num_bios_sent++; if (last && len == 0) beio->send_complete = 1; - mtx_unlock(&be_lun->lock); + mtx_unlock(&be_lun->io_lock); (*dev_data->csw->d_strategy)(bio); } @@ -830,7 +832,9 @@ ctl_be_block_unmap_dev(struct ctl_be_blo DPRINTF("entered\n"); binuptime(&beio->ds_t0); + mtx_lock(&be_lun->io_lock); devstat_start_transaction(be_lun->disk_stats, &beio->ds_t0); + mtx_unlock(&be_lun->io_lock); if (beio->io_offset == -1) { beio->io_len = 0; @@ -854,6 +858,7 @@ static void ctl_be_block_dispatch_dev(struct ctl_be_block_lun *be_lun, struct ctl_be_block_io *beio) { + TAILQ_HEAD(, bio) queue = TAILQ_HEAD_INITIALIZER(queue); int i; struct bio *bio; struct ctl_be_block_devdata *dev_data; @@ -874,14 +879,6 @@ ctl_be_block_dispatch_dev(struct ctl_be_ max_iosize = DFLTPHYS; cur_offset = beio->io_offset; - - /* - * XXX KDM need to accurately reflect the number of I/Os outstanding - * to a device. - */ - binuptime(&beio->ds_t0); - devstat_start_transaction(be_lun->disk_stats, &beio->ds_t0); - for (i = 0; i < beio->num_segs; i++) { size_t cur_size; uint8_t *cur_ptr; @@ -909,32 +906,23 @@ ctl_be_block_dispatch_dev(struct ctl_be_ cur_ptr += bio->bio_length; cur_size -= bio->bio_length; - /* - * Make sure we set the complete bit just before we - * issue the last bio so we don't wind up with a - * race. - * - * Use the LUN mutex here instead of a combination - * of atomic variables for simplicity. - * - * XXX KDM we could have a per-IO lock, but that - * would cause additional per-IO setup and teardown - * overhead. Hopefully there won't be too much - * contention on the LUN lock. - */ - mtx_lock(&be_lun->lock); - + TAILQ_INSERT_TAIL(&queue, bio, bio_queue); beio->num_bios_sent++; - - if ((i == beio->num_segs - 1) - && (cur_size == 0)) - beio->send_complete = 1; - - mtx_unlock(&be_lun->lock); - - (*dev_data->csw->d_strategy)(bio); } } + binuptime(&beio->ds_t0); + mtx_lock(&be_lun->io_lock); + devstat_start_transaction(be_lun->disk_stats, &beio->ds_t0); + beio->send_complete = 1; + mtx_unlock(&be_lun->io_lock); + + /* + * Fire off all allocated requests! + */ + while ((bio = TAILQ_FIRST(&queue)) != NULL) { + TAILQ_REMOVE(&queue, bio, bio_queue); + (*dev_data->csw->d_strategy)(bio); + } } static void @@ -1197,14 +1185,14 @@ ctl_be_block_next(struct ctl_be_block_io io->io_hdr.status &= ~CTL_STATUS_MASK; io->io_hdr.status |= CTL_STATUS_NONE; - mtx_lock(&be_lun->lock); + mtx_lock(&be_lun->queue_lock); /* * XXX KDM make sure that links is okay to use at this point. * Otherwise, we either need to add another field to ctl_io_hdr, * or deal with resource allocation here. */ STAILQ_INSERT_TAIL(&be_lun->input_queue, &io->io_hdr, links); - mtx_unlock(&be_lun->lock); + mtx_unlock(&be_lun->queue_lock); taskqueue_enqueue(be_lun->io_taskqueue, &be_lun->io_task); } @@ -1352,7 +1340,7 @@ ctl_be_block_worker(void *context, int p DPRINTF("entered\n"); - mtx_lock(&be_lun->lock); + mtx_lock(&be_lun->queue_lock); for (;;) { io = (union ctl_io *)STAILQ_FIRST(&be_lun->datamove_queue); if (io != NULL) { @@ -1363,13 +1351,13 @@ ctl_be_block_worker(void *context, int p STAILQ_REMOVE(&be_lun->datamove_queue, &io->io_hdr, ctl_io_hdr, links); - mtx_unlock(&be_lun->lock); + mtx_unlock(&be_lun->queue_lock); beio = (struct ctl_be_block_io *)PRIV(io)->ptr; be_lun->dispatch(be_lun, beio); - mtx_lock(&be_lun->lock); + mtx_lock(&be_lun->queue_lock); continue; } io = (union ctl_io *)STAILQ_FIRST(&be_lun->config_write_queue); @@ -1380,11 +1368,11 @@ ctl_be_block_worker(void *context, int p STAILQ_REMOVE(&be_lun->config_write_queue, &io->io_hdr, ctl_io_hdr, links); - mtx_unlock(&be_lun->lock); + mtx_unlock(&be_lun->queue_lock); ctl_be_block_cw_dispatch(be_lun, io); - mtx_lock(&be_lun->lock); + mtx_lock(&be_lun->queue_lock); continue; } io = (union ctl_io *)STAILQ_FIRST(&be_lun->input_queue); @@ -1393,7 +1381,7 @@ ctl_be_block_worker(void *context, int p STAILQ_REMOVE(&be_lun->input_queue, &io->io_hdr, ctl_io_hdr, links); - mtx_unlock(&be_lun->lock); + mtx_unlock(&be_lun->queue_lock); /* * We must drop the lock, since this routine and @@ -1401,7 +1389,7 @@ ctl_be_block_worker(void *context, int p */ ctl_be_block_dispatch(be_lun, io); - mtx_lock(&be_lun->lock); + mtx_lock(&be_lun->queue_lock); continue; } @@ -1411,7 +1399,7 @@ ctl_be_block_worker(void *context, int p */ break; } - mtx_unlock(&be_lun->lock); + mtx_unlock(&be_lun->queue_lock); } /* @@ -1439,14 +1427,14 @@ ctl_be_block_submit(union ctl_io *io) PRIV(io)->len = 0; - mtx_lock(&be_lun->lock); + mtx_lock(&be_lun->queue_lock); /* * XXX KDM make sure that links is okay to use at this point. * Otherwise, we either need to add another field to ctl_io_hdr, * or deal with resource allocation here. */ STAILQ_INSERT_TAIL(&be_lun->input_queue, &io->io_hdr, links); - mtx_unlock(&be_lun->lock); + mtx_unlock(&be_lun->queue_lock); taskqueue_enqueue(be_lun->io_taskqueue, &be_lun->io_task); return (CTL_RETVAL_COMPLETE); @@ -1870,7 +1858,8 @@ ctl_be_block_create(struct ctl_be_block_ STAILQ_INIT(&be_lun->config_write_queue); STAILQ_INIT(&be_lun->datamove_queue); sprintf(be_lun->lunname, "cblk%d", softc->num_luns); - mtx_init(&be_lun->lock, be_lun->lunname, NULL, MTX_DEF); + mtx_init(&be_lun->io_lock, "cblk io lock", NULL, MTX_DEF); + mtx_init(&be_lun->queue_lock, "cblk queue lock", NULL, MTX_DEF); ctl_init_opts(&be_lun->ctl_be_lun, req); be_lun->lun_zone = uma_zcreate(be_lun->lunname, CTLBLK_MAX_SEG, @@ -2117,7 +2106,8 @@ bailout_error: if (be_lun->lun_zone != NULL) uma_zdestroy(be_lun->lun_zone); ctl_free_opts(&be_lun->ctl_be_lun); - mtx_destroy(&be_lun->lock); + mtx_destroy(&be_lun->queue_lock); + mtx_destroy(&be_lun->io_lock); free(be_lun, M_CTLBLK); return (retval); @@ -2205,7 +2195,8 @@ ctl_be_block_rm(struct ctl_be_block_soft ctl_free_opts(&be_lun->ctl_be_lun); free(be_lun->dev_path, M_CTLBLK); - + mtx_destroy(&be_lun->queue_lock); + mtx_destroy(&be_lun->io_lock); free(be_lun, M_CTLBLK); req->status = CTL_LUN_OK; @@ -2452,10 +2443,10 @@ ctl_be_block_config_write(union ctl_io * * user asked to be synced out. When they issue a sync * cache command, we'll sync out the whole thing. */ - mtx_lock(&be_lun->lock); + mtx_lock(&be_lun->queue_lock); STAILQ_INSERT_TAIL(&be_lun->config_write_queue, &io->io_hdr, links); - mtx_unlock(&be_lun->lock); + mtx_unlock(&be_lun->queue_lock); taskqueue_enqueue(be_lun->io_taskqueue, &be_lun->io_task); break; case START_STOP_UNIT: { @@ -2546,7 +2537,7 @@ ctl_be_block_init(void) softc = &backend_block_softc; retval = 0; - mtx_init(&softc->lock, "ctlblk", NULL, MTX_DEF); + mtx_init(&softc->lock, "ctlblock", NULL, MTX_DEF); beio_zone = uma_zcreate("beio", sizeof(struct ctl_be_block_io), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); STAILQ_INIT(&softc->disk_list); Modified: stable/10/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Sat Jul 12 02:05:51 2014 (r268548) +++ stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Sat Jul 12 02:17:10 2014 (r268549) @@ -84,7 +84,7 @@ struct ctl_be_ramdisk_lun { struct taskqueue *io_taskqueue; struct task io_task; STAILQ_HEAD(, ctl_io_hdr) cont_queue; - struct mtx lock; + struct mtx_padalign queue_lock; }; struct ctl_be_ramdisk_softc { @@ -150,7 +150,7 @@ ctl_backend_ramdisk_init(void) memset(softc, 0, sizeof(*softc)); - mtx_init(&softc->lock, "ramdisk", NULL, MTX_DEF); + mtx_init(&softc->lock, "ctlramdisk", NULL, MTX_DEF); STAILQ_INIT(&softc->lun_list); softc->rd_size = 1024 * 1024; @@ -242,10 +242,10 @@ ctl_backend_ramdisk_move_done(union ctl_ && ((io->io_hdr.flags & CTL_FLAG_ABORT) == 0) && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)) { if (io->io_hdr.ctl_private[CTL_PRIV_BACKEND].integer > 0) { - mtx_lock(&be_lun->lock); + mtx_lock(&be_lun->queue_lock); STAILQ_INSERT_TAIL(&be_lun->cont_queue, &io->io_hdr, links); - mtx_unlock(&be_lun->lock); + mtx_unlock(&be_lun->queue_lock); taskqueue_enqueue(be_lun->io_taskqueue, &be_lun->io_task); return (0); @@ -350,18 +350,18 @@ ctl_backend_ramdisk_worker(void *context be_lun = (struct ctl_be_ramdisk_lun *)context; softc = be_lun->softc; - mtx_lock(&be_lun->lock); + mtx_lock(&be_lun->queue_lock); for (;;) { io = (union ctl_io *)STAILQ_FIRST(&be_lun->cont_queue); if (io != NULL) { STAILQ_REMOVE(&be_lun->cont_queue, &io->io_hdr, ctl_io_hdr, links); - mtx_unlock(&be_lun->lock); + mtx_unlock(&be_lun->queue_lock); ctl_backend_ramdisk_continue(io); - mtx_lock(&be_lun->lock); + mtx_lock(&be_lun->queue_lock); continue; } @@ -371,7 +371,7 @@ ctl_backend_ramdisk_worker(void *context */ break; } - mtx_unlock(&be_lun->lock); + mtx_unlock(&be_lun->queue_lock); } static int @@ -506,7 +506,7 @@ ctl_backend_ramdisk_rm(struct ctl_be_ram taskqueue_drain(be_lun->io_taskqueue, &be_lun->io_task); taskqueue_free(be_lun->io_taskqueue); ctl_free_opts(&be_lun->ctl_be_lun); - mtx_destroy(&be_lun->lock); + mtx_destroy(&be_lun->queue_lock); free(be_lun, M_RAMDISK); } @@ -639,7 +639,7 @@ ctl_backend_ramdisk_create(struct ctl_be } STAILQ_INIT(&be_lun->cont_queue); - mtx_init(&be_lun->lock, "CTL ramdisk", NULL, MTX_DEF); + mtx_init(&be_lun->queue_lock, "cram queue lock", NULL, MTX_DEF); TASK_INIT(&be_lun->io_task, /*priority*/0, ctl_backend_ramdisk_worker, be_lun); @@ -722,7 +722,7 @@ bailout_error: taskqueue_free(be_lun->io_taskqueue); } ctl_free_opts(&be_lun->ctl_be_lun); - mtx_destroy(&be_lun->lock); + mtx_destroy(&be_lun->queue_lock); free(be_lun, M_RAMDISK); } From owner-svn-src-stable@FreeBSD.ORG Sat Jul 12 02:24:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5AEA4927; Sat, 12 Jul 2014 02:24:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B19D2159; Sat, 12 Jul 2014 02:24:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6C2Orop028228; Sat, 12 Jul 2014 02:24:53 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6C2OqLM028219; Sat, 12 Jul 2014 02:24:52 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407120224.s6C2OqLM028219@svn.freebsd.org> From: Alexander Motin Date: Sat, 12 Jul 2014 02:24:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268550 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2014 02:24:53 -0000 Author: mav Date: Sat Jul 12 02:24:52 2014 New Revision: 268550 URL: http://svnweb.freebsd.org/changeset/base/268550 Log: MFC r267905: Add READ BUFFER and improve WRITE BUFFER SCSI commands support. This gives some use to 512KB per-LUN buffers, allocated for Copan-specific processor code and not used. It allows, for example, to test transport performance and/or correctness without accessing the media, as supported by Linux version of sg3_utils. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_cmd_table.c stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/sys/cam/ctl/ctl_private.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Sat Jul 12 02:17:10 2014 (r268549) +++ stable/10/sys/cam/ctl/ctl.c Sat Jul 12 02:24:52 2014 (r268550) @@ -4954,7 +4954,8 @@ ctl_config_move_done(union ctl_io *io) /*sks_valid*/ 1, /*retry_count*/ io->io_hdr.port_status); - free(io->scsiio.kern_data_ptr, M_CTL); + if (io->io_hdr.flags & CTL_FLAG_ALLOCATED) + free(io->scsiio.kern_data_ptr, M_CTL); ctl_done(io); goto bailout; } @@ -4967,7 +4968,8 @@ ctl_config_move_done(union ctl_io *io) * S/G list. If we start using S/G lists for config data, * we'll need to know how to clean them up here as well. */ - free(io->scsiio.kern_data_ptr, M_CTL); + if (io->io_hdr.flags & CTL_FLAG_ALLOCATED) + free(io->scsiio.kern_data_ptr, M_CTL); /* Hopefully the user has already set the status... */ ctl_done(io); } else { @@ -5712,26 +5714,40 @@ bailout: } int -ctl_write_buffer(struct ctl_scsiio *ctsio) +ctl_read_buffer(struct ctl_scsiio *ctsio) { - struct scsi_write_buffer *cdb; - struct copan_page_header *header; + struct scsi_read_buffer *cdb; struct ctl_lun *lun; - struct ctl_softc *ctl_softc; int buffer_offset, len; - int retval; + static uint8_t descr[4]; + static uint8_t echo_descr[4] = { 0 }; - header = NULL; + CTL_DEBUG_PRINT(("ctl_read_buffer\n")); - retval = CTL_RETVAL_COMPLETE; + lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + cdb = (struct scsi_read_buffer *)ctsio->cdb; - CTL_DEBUG_PRINT(("ctl_write_buffer\n")); + if (lun->flags & CTL_LUN_PR_RESERVED) { + uint32_t residx; - lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; - ctl_softc = control_softc; - cdb = (struct scsi_write_buffer *)ctsio->cdb; + /* + * XXX KDM need a lock here. + */ + residx = ctl_get_resindex(&ctsio->io_hdr.nexus); + if ((lun->res_type == SPR_TYPE_EX_AC + && residx != lun->pr_res_idx) + || ((lun->res_type == SPR_TYPE_EX_AC_RO + || lun->res_type == SPR_TYPE_EX_AC_AR) + && !lun->per_res[residx].registered)) { + ctl_set_reservation_conflict(ctsio); + ctl_done((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); + } + } - if ((cdb->byte2 & RWB_MODE) != RWB_MODE_DATA) { + if ((cdb->byte2 & RWB_MODE) != RWB_MODE_DATA && + (cdb->byte2 & RWB_MODE) != RWB_MODE_ECHO_DESCR && + (cdb->byte2 & RWB_MODE) != RWB_MODE_DESCR) { ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, /*command*/ 1, @@ -5755,7 +5771,7 @@ ctl_write_buffer(struct ctl_scsiio *ctsi len = scsi_3btoul(cdb->length); buffer_offset = scsi_3btoul(cdb->offset); - if (len > sizeof(lun->write_buffer)) { + if (buffer_offset + len > sizeof(lun->write_buffer)) { ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, /*command*/ 1, @@ -5766,11 +5782,68 @@ ctl_write_buffer(struct ctl_scsiio *ctsi return (CTL_RETVAL_COMPLETE); } - if (buffer_offset != 0) { + if ((cdb->byte2 & RWB_MODE) == RWB_MODE_DESCR) { + descr[0] = 0; + scsi_ulto3b(sizeof(lun->write_buffer), &descr[1]); + ctsio->kern_data_ptr = descr; + len = min(len, sizeof(descr)); + } else if ((cdb->byte2 & RWB_MODE) == RWB_MODE_ECHO_DESCR) { + ctsio->kern_data_ptr = echo_descr; + len = min(len, sizeof(echo_descr)); + } else + ctsio->kern_data_ptr = lun->write_buffer + buffer_offset; + ctsio->kern_data_len = len; + ctsio->kern_total_len = len; + ctsio->kern_data_resid = 0; + ctsio->kern_rel_offset = 0; + ctsio->kern_sg_entries = 0; + ctsio->be_move_done = ctl_config_move_done; + ctl_datamove((union ctl_io *)ctsio); + + return (CTL_RETVAL_COMPLETE); +} + +int +ctl_write_buffer(struct ctl_scsiio *ctsio) +{ + struct scsi_write_buffer *cdb; + struct ctl_lun *lun; + int buffer_offset, len; + + CTL_DEBUG_PRINT(("ctl_write_buffer\n")); + + lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + cdb = (struct scsi_write_buffer *)ctsio->cdb; + + if ((cdb->byte2 & RWB_MODE) != RWB_MODE_DATA) { + ctl_set_invalid_field(ctsio, + /*sks_valid*/ 1, + /*command*/ 1, + /*field*/ 1, + /*bit_valid*/ 1, + /*bit*/ 4); + ctl_done((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); + } + if (cdb->buffer_id != 0) { + ctl_set_invalid_field(ctsio, + /*sks_valid*/ 1, + /*command*/ 1, + /*field*/ 2, + /*bit_valid*/ 0, + /*bit*/ 0); + ctl_done((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); + } + + len = scsi_3btoul(cdb->length); + buffer_offset = scsi_3btoul(cdb->offset); + + if (buffer_offset + len > sizeof(lun->write_buffer)) { ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, /*command*/ 1, - /*field*/ 3, + /*field*/ 6, /*bit_valid*/ 0, /*bit*/ 0); ctl_done((union ctl_io *)ctsio); @@ -5782,7 +5855,7 @@ ctl_write_buffer(struct ctl_scsiio *ctsi * malloc it and tell the caller the data buffer is here. */ if ((ctsio->io_hdr.flags & CTL_FLAG_ALLOCATED) == 0) { - ctsio->kern_data_ptr = lun->write_buffer; + ctsio->kern_data_ptr = lun->write_buffer + buffer_offset; ctsio->kern_data_len = len; ctsio->kern_total_len = len; ctsio->kern_data_resid = 0; @@ -6993,6 +7066,7 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) ctsio->scsi_status = SCSI_STATUS_OK; + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); @@ -7052,6 +7126,7 @@ ctl_read_capacity(struct ctl_scsiio *cts ctsio->scsi_status = SCSI_STATUS_OK; + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); @@ -7114,6 +7189,7 @@ ctl_read_capacity_16(struct ctl_scsiio * ctsio->scsi_status = SCSI_STATUS_OK; + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); @@ -7287,6 +7363,7 @@ ctl_maintenance_in(struct ctl_scsiio *ct } } + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; CTL_DEBUG_PRINT(("buf = %x %x %x %x %x %x %x %x\n", @@ -7512,6 +7589,7 @@ retry: } mtx_unlock(&softc->ctl_lock); + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; CTL_DEBUG_PRINT(("buf = %x %x %x %x %x %x %x %x\n", @@ -9225,6 +9303,7 @@ ctl_report_luns(struct ctl_scsiio *ctsio */ ctsio->scsi_status = SCSI_STATUS_OK; + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); @@ -9351,7 +9430,7 @@ ctl_request_sense(struct ctl_scsiio *cts * parameter data. */ ctsio->sense_len = 0; - + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); @@ -9380,6 +9459,7 @@ no_sense: * autosense in this case. We're reporting sense as parameter data. */ ctsio->sense_len = 0; + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); @@ -9467,6 +9547,7 @@ ctl_inquiry_evpd_supported(struct ctl_sc ctsio->scsi_status = SCSI_STATUS_OK; + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); @@ -9535,6 +9616,7 @@ ctl_inquiry_evpd_serial(struct ctl_scsii #endif ctsio->scsi_status = SCSI_STATUS_OK; + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); @@ -9728,6 +9810,7 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio ctsio->scsi_status = SCSI_STATUS_OK; + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); @@ -9784,6 +9867,7 @@ ctl_inquiry_evpd_block_limits(struct ctl scsi_u64to8b(UINT64_MAX, bl_ptr->max_write_same_length); ctsio->scsi_status = SCSI_STATUS_OK; + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); @@ -9833,6 +9917,7 @@ ctl_inquiry_evpd_lbp(struct ctl_scsiio * lbp_ptr->flags = SVPD_LBP_UNMAP | SVPD_LBP_WS16 | SVPD_LBP_WS10; ctsio->scsi_status = SCSI_STATUS_OK; + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); @@ -10117,6 +10202,7 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio ctsio->scsi_status = SCSI_STATUS_OK; if (ctsio->kern_data_len > 0) { + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); } else { Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_cmd_table.c Sat Jul 12 02:17:10 2014 (r268549) +++ stable/10/sys/cam/ctl/ctl_cmd_table.c Sat Jul 12 02:24:52 2014 (r268550) @@ -314,12 +314,15 @@ struct ctl_cmd_entry ctl_cmd_table[] = {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, /* 3B WRITE BUFFER */ -{ctl_write_buffer, CTL_SERIDX_WRITE, CTL_CMD_FLAG_OK_ON_PROC | - CTL_FLAG_DATA_OUT, +{ctl_write_buffer, CTL_SERIDX_MD_SEL, CTL_CMD_FLAG_OK_ON_BOTH | + CTL_FLAG_DATA_OUT, CTL_LUN_PAT_NONE}, /* 3C READ BUFFER */ -{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, +{ctl_read_buffer, CTL_SERIDX_MD_SNS, CTL_CMD_FLAG_OK_ON_BOTH | + CTL_FLAG_DATA_IN | + CTL_CMD_FLAG_ALLOW_ON_PR_RESV, + CTL_LUN_PAT_NONE}, /* 3D UPDATE BLOCK */ {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Sat Jul 12 02:17:10 2014 (r268549) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Sat Jul 12 02:24:52 2014 (r268550) @@ -2236,6 +2236,7 @@ cfiscsi_devid(struct ctl_scsiio *ctsio, ctsio->scsi_status = SCSI_STATUS_OK; + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); Modified: stable/10/sys/cam/ctl/ctl_private.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_private.h Sat Jul 12 02:17:10 2014 (r268549) +++ stable/10/sys/cam/ctl/ctl_private.h Sat Jul 12 02:24:52 2014 (r268550) @@ -469,6 +469,7 @@ int ctl_scsi_reserve(struct ctl_scsiio * int ctl_start_stop(struct ctl_scsiio *ctsio); int ctl_sync_cache(struct ctl_scsiio *ctsio); int ctl_format(struct ctl_scsiio *ctsio); +int ctl_read_buffer(struct ctl_scsiio *ctsio); int ctl_write_buffer(struct ctl_scsiio *ctsio); int ctl_write_same(struct ctl_scsiio *ctsio); int ctl_unmap(struct ctl_scsiio *ctsio); From owner-svn-src-stable@FreeBSD.ORG Sat Jul 12 02:26:12 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8054FA6E; Sat, 12 Jul 2014 02:26:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C8EE2165; Sat, 12 Jul 2014 02:26:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6C2QCd6028685; Sat, 12 Jul 2014 02:26:12 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6C2QBxT028682; Sat, 12 Jul 2014 02:26:11 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407120226.s6C2QBxT028682@svn.freebsd.org> From: Alexander Motin Date: Sat, 12 Jul 2014 02:26:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268551 - in stable/10/sys/cam: ctl scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2014 02:26:12 -0000 Author: mav Date: Sat Jul 12 02:26:11 2014 New Revision: 268551 URL: http://svnweb.freebsd.org/changeset/base/268551 Log: MFC r267906: Allow MODE SENSE commands through Write Exclusive persistent reservation, as required by SPC-4. Report that fact in persistent reservation capabilities. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_cmd_table.c stable/10/sys/cam/scsi/scsi_all.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Sat Jul 12 02:24:52 2014 (r268550) +++ stable/10/sys/cam/ctl/ctl.c Sat Jul 12 02:26:11 2014 (r268551) @@ -6772,6 +6772,24 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) else control_dev = 0; + if (lun->flags & CTL_LUN_PR_RESERVED) { + uint32_t residx; + + /* + * XXX KDM need a lock here. + */ + residx = ctl_get_resindex(&ctsio->io_hdr.nexus); + if ((lun->res_type == SPR_TYPE_EX_AC + && residx != lun->pr_res_idx) + || ((lun->res_type == SPR_TYPE_EX_AC_RO + || lun->res_type == SPR_TYPE_EX_AC_AR) + && !lun->per_res[residx].registered)) { + ctl_set_reservation_conflict(ctsio); + ctl_done((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); + } + } + switch (ctsio->cdb[0]) { case MODE_SENSE_6: { struct scsi_mode_sense_6 *cdb; @@ -7568,7 +7586,7 @@ retry: res_cap = (struct scsi_per_res_cap *)ctsio->kern_data_ptr; scsi_ulto2b(sizeof(*res_cap), res_cap->length); - res_cap->flags2 |= SPRI_TMV; + res_cap->flags2 |= SPRI_TMV | SPRI_ALLOW_3; type_mask = SPRI_TM_WR_EX_AR | SPRI_TM_EX_AC_RO | SPRI_TM_WR_EX_RO | Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_cmd_table.c Sat Jul 12 02:24:52 2014 (r268550) +++ stable/10/sys/cam/ctl/ctl_cmd_table.c Sat Jul 12 02:26:11 2014 (r268551) @@ -192,7 +192,8 @@ struct ctl_cmd_entry ctl_cmd_table[] = CTL_CMD_FLAG_OK_ON_STOPPED | CTL_CMD_FLAG_OK_ON_INOPERABLE | CTL_CMD_FLAG_OK_ON_SECONDARY | - CTL_FLAG_DATA_IN, + CTL_FLAG_DATA_IN | + CTL_CMD_FLAG_ALLOW_ON_PR_RESV, CTL_LUN_PAT_NONE}, /* 1B START STOP UNIT */ @@ -436,7 +437,8 @@ struct ctl_cmd_entry ctl_cmd_table[] = CTL_CMD_FLAG_OK_ON_STOPPED | CTL_CMD_FLAG_OK_ON_INOPERABLE | CTL_CMD_FLAG_OK_ON_SECONDARY | - CTL_FLAG_DATA_IN, + CTL_FLAG_DATA_IN | + CTL_CMD_FLAG_ALLOW_ON_PR_RESV, CTL_LUN_PAT_NONE}, /* 5B CLOSE TRACK/SESSION */ Modified: stable/10/sys/cam/scsi/scsi_all.h ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.h Sat Jul 12 02:24:52 2014 (r268550) +++ stable/10/sys/cam/scsi/scsi_all.h Sat Jul 12 02:26:11 2014 (r268551) @@ -308,6 +308,11 @@ struct scsi_per_res_cap #define SPRI_PTPL_C 0x01 uint8_t flags2; #define SPRI_TMV 0x80 +#define SPRI_ALLOW_MASK 0x70 +#define SPRI_ALLOW_0 0x00 +#define SPRI_ALLOW_1 0x10 +#define SPRI_ALLOW_2 0x20 +#define SPRI_ALLOW_3 0x30 #define SPRI_PTPL_A 0x01 uint8_t type_mask[2]; #define SPRI_TM_WR_EX_AR 0x8000 @@ -746,12 +751,16 @@ struct scsi_read_buffer { u_int8_t opcode; u_int8_t byte2; -#define RWB_MODE 0x07 +#define RWB_MODE 0x1F #define RWB_MODE_HDR_DATA 0x00 #define RWB_MODE_VENDOR 0x01 #define RWB_MODE_DATA 0x02 +#define RWB_MODE_DESCR 0x03 #define RWB_MODE_DOWNLOAD 0x04 #define RWB_MODE_DOWNLOAD_SAVE 0x05 +#define RWB_MODE_ECHO 0x0A +#define RWB_MODE_ECHO_DESCR 0x0B +#define RWB_MODE_ERROR_HISTORY 0x1C u_int8_t buffer_id; u_int8_t offset[3]; u_int8_t length[3]; From owner-svn-src-stable@FreeBSD.ORG Sat Jul 12 02:28:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E0C7BBCB; Sat, 12 Jul 2014 02:28:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1042217C; Sat, 12 Jul 2014 02:28:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6C2SBQN029207; Sat, 12 Jul 2014 02:28:11 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6C2SBfj029206; Sat, 12 Jul 2014 02:28:11 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407120228.s6C2SBfj029206@svn.freebsd.org> From: Alexander Motin Date: Sat, 12 Jul 2014 02:28:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268552 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2014 02:28:12 -0000 Author: mav Date: Sat Jul 12 02:28:11 2014 New Revision: 268552 URL: http://svnweb.freebsd.org/changeset/base/268552 Log: MFC r267933: Simplify statistics calculation. Instead of trying to guess size of disk I/O operations (it just won't work that way for newly added commands, and is equal to data move size for old ones), account data move traffic. If disk I/Os are that interesting, then backends have to account and provide that information. Block backend already exports the information about disk I/Os via devstat, so having it here too is excessive. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Sat Jul 12 02:26:11 2014 (r268551) +++ stable/10/sys/cam/ctl/ctl.c Sat Jul 12 02:28:11 2014 (r268552) @@ -13127,132 +13127,34 @@ ctl_process_done(union ctl_io *io, int h * * XXX KDM should we also track I/O latency? */ - if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) { - uint32_t blocksize; + if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS && + io->io_hdr.io_type == CTL_IO_SCSI) { #ifdef CTL_TIME_IO struct bintime cur_bt; #endif + int type; - if ((lun->be_lun != NULL) - && (lun->be_lun->blocksize != 0)) - blocksize = lun->be_lun->blocksize; + if ((io->io_hdr.flags & CTL_FLAG_DATA_MASK) == + CTL_FLAG_DATA_IN) + type = CTL_STATS_READ; + else if ((io->io_hdr.flags & CTL_FLAG_DATA_MASK) == + CTL_FLAG_DATA_OUT) + type = CTL_STATS_WRITE; else - blocksize = 512; - - switch (io->io_hdr.io_type) { - case CTL_IO_SCSI: { - int isread; - struct ctl_lba_len_flags *lbalen; - - isread = 0; - switch (io->scsiio.cdb[0]) { - case READ_6: - case READ_10: - case READ_12: - case READ_16: - isread = 1; - /* FALLTHROUGH */ - case WRITE_6: - case WRITE_10: - case WRITE_12: - case WRITE_16: - case WRITE_VERIFY_10: - case WRITE_VERIFY_12: - case WRITE_VERIFY_16: - lbalen = (struct ctl_lba_len_flags *) - &io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; - - if (isread) { - lun->stats.ports[targ_port].bytes[CTL_STATS_READ] += - lbalen->len * blocksize; - lun->stats.ports[targ_port].operations[CTL_STATS_READ]++; - -#ifdef CTL_TIME_IO - bintime_add( - &lun->stats.ports[targ_port].dma_time[CTL_STATS_READ], - &io->io_hdr.dma_bt); - lun->stats.ports[targ_port].num_dmas[CTL_STATS_READ] += - io->io_hdr.num_dmas; - getbintime(&cur_bt); - bintime_sub(&cur_bt, - &io->io_hdr.start_bt); - - bintime_add( - &lun->stats.ports[targ_port].time[CTL_STATS_READ], - &cur_bt); - -#if 0 - cs_prof_gettime(&cur_ticks); - lun->stats.time[CTL_STATS_READ] += - cur_ticks - - io->io_hdr.start_ticks; -#endif -#if 0 - lun->stats.time[CTL_STATS_READ] += - jiffies - io->io_hdr.start_time; -#endif -#endif /* CTL_TIME_IO */ - } else { - lun->stats.ports[targ_port].bytes[CTL_STATS_WRITE] += - lbalen->len * blocksize; - lun->stats.ports[targ_port].operations[ - CTL_STATS_WRITE]++; - -#ifdef CTL_TIME_IO - bintime_add( - &lun->stats.ports[targ_port].dma_time[CTL_STATS_WRITE], - &io->io_hdr.dma_bt); - lun->stats.ports[targ_port].num_dmas[CTL_STATS_WRITE] += - io->io_hdr.num_dmas; - getbintime(&cur_bt); - bintime_sub(&cur_bt, - &io->io_hdr.start_bt); - - bintime_add( - &lun->stats.ports[targ_port].time[CTL_STATS_WRITE], - &cur_bt); -#if 0 - cs_prof_gettime(&cur_ticks); - lun->stats.ports[targ_port].time[CTL_STATS_WRITE] += - cur_ticks - - io->io_hdr.start_ticks; - lun->stats.ports[targ_port].time[CTL_STATS_WRITE] += - jiffies - io->io_hdr.start_time; -#endif -#endif /* CTL_TIME_IO */ - } - break; - default: - lun->stats.ports[targ_port].operations[CTL_STATS_NO_IO]++; + type = CTL_STATS_NO_IO; + lun->stats.ports[targ_port].bytes[type] += + io->scsiio.kern_total_len; + lun->stats.ports[targ_port].operations[type]++; #ifdef CTL_TIME_IO - bintime_add( - &lun->stats.ports[targ_port].dma_time[CTL_STATS_NO_IO], - &io->io_hdr.dma_bt); - lun->stats.ports[targ_port].num_dmas[CTL_STATS_NO_IO] += - io->io_hdr.num_dmas; - getbintime(&cur_bt); - bintime_sub(&cur_bt, &io->io_hdr.start_bt); - - bintime_add(&lun->stats.ports[targ_port].time[CTL_STATS_NO_IO], - &cur_bt); - -#if 0 - cs_prof_gettime(&cur_ticks); - lun->stats.ports[targ_port].time[CTL_STATS_NO_IO] += - cur_ticks - - io->io_hdr.start_ticks; - lun->stats.ports[targ_port].time[CTL_STATS_NO_IO] += - jiffies - io->io_hdr.start_time; + bintime_add(&lun->stats.ports[targ_port].dma_time[type], + &io->io_hdr.dma_bt); + lun->stats.ports[targ_port].num_dmas[type] += + io->io_hdr.num_dmas; + getbintime(&cur_bt); + bintime_sub(&cur_bt, &io->io_hdr.start_bt); + bintime_add(&lun->stats.ports[targ_port].time[type], &cur_bt); #endif -#endif /* CTL_TIME_IO */ - break; - } - break; - } - default: - break; - } } TAILQ_REMOVE(&lun->ooa_queue, &io->io_hdr, ooa_links); From owner-svn-src-stable@FreeBSD.ORG Sat Jul 12 02:29:34 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8295FD15; Sat, 12 Jul 2014 02:29:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5645A2183; Sat, 12 Jul 2014 02:29:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6C2TYTa029589; Sat, 12 Jul 2014 02:29:34 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6C2TYt0029588; Sat, 12 Jul 2014 02:29:34 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407120229.s6C2TYt0029588@svn.freebsd.org> From: Alexander Motin Date: Sat, 12 Jul 2014 02:29:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268553 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2014 02:29:34 -0000 Author: mav Date: Sat Jul 12 02:29:33 2014 New Revision: 268553 URL: http://svnweb.freebsd.org/changeset/base/268553 Log: MFC r268204: Use separate memory type M_CTLIO for I/Os. CTL allocate large amount of RAM. This change give some more stats. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Sat Jul 12 02:28:11 2014 (r268552) +++ stable/10/sys/cam/ctl/ctl.c Sat Jul 12 02:29:33 2014 (r268553) @@ -460,6 +460,7 @@ static struct cdevsw ctl_cdevsw = { MALLOC_DEFINE(M_CTL, "ctlmem", "Memory used for CTL"); +MALLOC_DEFINE(M_CTLIO, "ctlio", "Memory used for CTL requests"); static int ctl_module_event_handler(module_t, int /*modeventtype_t*/, void *); @@ -3387,7 +3388,7 @@ ctl_pool_create(struct ctl_softc *ctl_so * tracking. */ for (i = 0; i < total_ctl_io; i++) { - cur_io = (union ctl_io *)malloc(sizeof(*cur_io), M_CTL, + cur_io = (union ctl_io *)malloc(sizeof(*cur_io), M_CTLIO, M_NOWAIT); if (cur_io == NULL) { retval = ENOMEM; @@ -3406,7 +3407,7 @@ ctl_pool_create(struct ctl_softc *ctl_so links); STAILQ_REMOVE(&pool->free_queue, &cur_io->io_hdr, ctl_io_hdr, links); - free(cur_io, M_CTL); + free(cur_io, M_CTLIO); } free(pool, M_CTL); @@ -3468,7 +3469,7 @@ ctl_pool_release(struct ctl_io_pool *poo while ((io = (union ctl_io *)STAILQ_FIRST(&pool->free_queue)) != NULL) { STAILQ_REMOVE(&pool->free_queue, &io->io_hdr, ctl_io_hdr, links); - free(io, M_CTL); + free(io, M_CTLIO); } STAILQ_REMOVE(&ctl_softc->io_pools, pool, ctl_io_pool, links); @@ -3572,7 +3573,7 @@ ctl_alloc_io(void *pool_ref) * The emergency pool (if it exists) didn't have one, so try an * atomic (i.e. nonblocking) malloc and see if we get lucky. */ - io = (union ctl_io *)malloc(sizeof(*io), M_CTL, M_NOWAIT); + io = (union ctl_io *)malloc(sizeof(*io), M_CTLIO, M_NOWAIT); if (io != NULL) { /* * If the emergency pool exists but is empty, add this @@ -3664,7 +3665,7 @@ ctl_free_io(union ctl_io *io) * Otherwise, just free it. We probably malloced it and * the emergency pool wasn't available. */ - free(io, M_CTL); + free(io, M_CTLIO); } } From owner-svn-src-stable@FreeBSD.ORG Sat Jul 12 02:33:04 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 37FAEF22; Sat, 12 Jul 2014 02:33:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2160C220F; Sat, 12 Jul 2014 02:33:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6C2X42h033799; Sat, 12 Jul 2014 02:33:04 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6C2X3Co033798; Sat, 12 Jul 2014 02:33:03 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407120233.s6C2X3Co033798@svn.freebsd.org> From: Alexander Motin Date: Sat, 12 Jul 2014 02:33:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268554 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2014 02:33:04 -0000 Author: mav Date: Sat Jul 12 02:33:03 2014 New Revision: 268554 URL: http://svnweb.freebsd.org/changeset/base/268554 Log: MFC r268392: Do not return statuses for aborted iSCSI commands. Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Sat Jul 12 02:29:33 2014 (r268553) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Sat Jul 12 02:33:03 2014 (r268554) @@ -2807,6 +2807,16 @@ cfiscsi_scsi_command_done(union ctl_io * CFISCSI_SESSION_UNLOCK(cs); #endif + /* + * Do not return status for aborted commands. + * There are exceptions, but none supported by CTL yet. + */ + if (io->io_hdr.status == CTL_CMD_ABORTED) { + ctl_free_io(io); + icl_pdu_free(request); + return; + } + response = cfiscsi_pdu_new_response(request, M_WAITOK); bhssr = (struct iscsi_bhs_scsi_response *)response->ip_bhs; bhssr->bhssr_opcode = ISCSI_BHS_OPCODE_SCSI_RESPONSE; From owner-svn-src-stable@FreeBSD.ORG Sat Jul 12 02:40:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DBC7C231; Sat, 12 Jul 2014 02:40:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBDA72246; Sat, 12 Jul 2014 02:40:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6C2ePcC036959; Sat, 12 Jul 2014 02:40:25 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6C2ePA9036957; Sat, 12 Jul 2014 02:40:25 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407120240.s6C2ePA9036957@svn.freebsd.org> From: Alexander Motin Date: Sat, 12 Jul 2014 02:40:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268555 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2014 02:40:26 -0000 Author: mav Date: Sat Jul 12 02:40:25 2014 New Revision: 268555 URL: http://svnweb.freebsd.org/changeset/base/268555 Log: MFC r268283: Improve readability of XML generated by CTL_LUN_LIST. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_backend_block.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Sat Jul 12 02:33:03 2014 (r268554) +++ stable/10/sys/cam/ctl/ctl.c Sat Jul 12 02:40:25 2014 (r268555) @@ -3049,7 +3049,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, if (retval != 0) break; - retval = sbuf_printf(sb, "%s" + retval = sbuf_printf(sb, "\t%s" "\n", (lun->backend == NULL) ? "none" : lun->backend->name); @@ -3057,7 +3057,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, if (retval != 0) break; - retval = sbuf_printf(sb, "%d\n", + retval = sbuf_printf(sb, "\t%d\n", lun->be_lun->lun_type); if (retval != 0) @@ -3070,20 +3070,20 @@ ctl_ioctl(struct cdev *dev, u_long cmd, continue; } - retval = sbuf_printf(sb, "%ju\n", + retval = sbuf_printf(sb, "\t%ju\n", (lun->be_lun->maxlba > 0) ? lun->be_lun->maxlba + 1 : 0); if (retval != 0) break; - retval = sbuf_printf(sb, "%u\n", + retval = sbuf_printf(sb, "\t%u\n", lun->be_lun->blocksize); if (retval != 0) break; - retval = sbuf_printf(sb, ""); + retval = sbuf_printf(sb, "\t"); if (retval != 0) break; @@ -3099,7 +3099,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, if (retval != 0) break; - retval = sbuf_printf(sb, ""); + retval = sbuf_printf(sb, "\t"); if (retval != 0) break; @@ -3120,7 +3120,8 @@ ctl_ioctl(struct cdev *dev, u_long cmd, break; } STAILQ_FOREACH(opt, &lun->be_lun->options, links) { - retval = sbuf_printf(sb, "<%s>%s", opt->name, opt->value, opt->name); + retval = sbuf_printf(sb, "\t<%s>%s\n", + opt->name, opt->value, opt->name); if (retval != 0) break; } Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Sat Jul 12 02:33:03 2014 (r268554) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Sat Jul 12 02:40:25 2014 (r268555) @@ -2511,7 +2511,7 @@ ctl_be_block_lun_info(void *be_lun, stru lun = (struct ctl_be_block_lun *)be_lun; retval = 0; - retval = sbuf_printf(sb, ""); + retval = sbuf_printf(sb, "\t"); if (retval != 0) goto bailout; @@ -2521,7 +2521,7 @@ ctl_be_block_lun_info(void *be_lun, stru if (retval != 0) goto bailout; - retval = sbuf_printf(sb, ""); + retval = sbuf_printf(sb, "\n"); bailout: From owner-svn-src-stable@FreeBSD.ORG Sat Jul 12 04:34:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A9091C0; Sat, 12 Jul 2014 04:34:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0699E2BFE; Sat, 12 Jul 2014 04:34:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6C4YdGo008786; Sat, 12 Jul 2014 04:34:39 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6C4Ydjm008784; Sat, 12 Jul 2014 04:34:39 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407120434.s6C4Ydjm008784@svn.freebsd.org> From: Alexander Motin Date: Sat, 12 Jul 2014 04:34:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268556 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2014 04:34:40 -0000 Author: mav Date: Sat Jul 12 04:34:39 2014 New Revision: 268556 URL: http://svnweb.freebsd.org/changeset/base/268556 Log: MFC r267643, r267873, r268391, r268398: Introduce fine-grained CTL locking to improve SMP scalability. Split global ctl_lock, historically protecting most of CTL context: - remaining ctl_lock now protects lists of fronends and backends; - per-LUN lun_lock(s) protect LUN-specific information; - per-thread queue_lock(s) protect request queues. This allows to radically reduce congestion on ctl_lock. Create multiple worker threads, depending on number of CPUs, and assign each LUN to one of them. This allows to spread load between multiple CPUs, still avoiging congestion on queues and LUNs locks. On 40-core server, exporting 5 LUNs, each backed by gstripe of SATA SSDs, accessed via 6 iSCSI connections, this change improves peak request rate from 250K to 680K IOPS. Sponsored by: iXsystems, Inc. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl.h stable/10/sys/cam/ctl/ctl_io.h stable/10/sys/cam/ctl/ctl_private.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Sat Jul 12 02:40:25 2014 (r268555) +++ stable/10/sys/cam/ctl/ctl.c Sat Jul 12 04:34:39 2014 (r268556) @@ -83,14 +83,6 @@ __FBSDID("$FreeBSD$"); struct ctl_softc *control_softc = NULL; /* - * The default is to run with CTL_DONE_THREAD turned on. Completed - * transactions are queued for processing by the CTL work thread. When - * CTL_DONE_THREAD is not defined, completed transactions are processed in - * the caller's context. - */ -#define CTL_DONE_THREAD - -/* * Use the serial number and device ID provided by the backend, rather than * making up our own. */ @@ -321,7 +313,7 @@ static int ctl_is_single = 1; static int index_to_aps_page; SYSCTL_NODE(_kern_cam, OID_AUTO, ctl, CTLFLAG_RD, 0, "CAM Target Layer"); -static int worker_threads = 1; +static int worker_threads = -1; TUNABLE_INT("kern.cam.ctl.worker_threads", &worker_threads); SYSCTL_INT(_kern_cam_ctl, OID_AUTO, worker_threads, CTLFLAG_RDTUN, &worker_threads, 1, "Number of worker threads"); @@ -350,7 +342,7 @@ static int ctl_ioctl_targ_disable(void * static int ctl_ioctl_lun_enable(void *arg, struct ctl_id targ_id, int lun_id); static int ctl_ioctl_lun_disable(void *arg, struct ctl_id targ_id, int lun_id); static int ctl_ioctl_do_datamove(struct ctl_scsiio *ctsio); -static int ctl_serialize_other_sc_cmd(struct ctl_scsiio *ctsio, int have_lock); +static int ctl_serialize_other_sc_cmd(struct ctl_scsiio *ctsio); static int ctl_ioctl_submit_wait(union ctl_io *io); static void ctl_ioctl_datamove(union ctl_io *io); static void ctl_ioctl_done(union ctl_io *io); @@ -420,7 +412,7 @@ static int ctl_target_reset(struct ctl_s static int ctl_lun_reset(struct ctl_lun *lun, union ctl_io *io, ctl_ua_type ua_type); static int ctl_abort_task(union ctl_io *io); -static void ctl_run_task_queue(struct ctl_softc *ctl_softc); +static void ctl_run_task(union ctl_io *io); #ifdef CTL_IO_DELAY static void ctl_datamove_timer_wakeup(void *arg); static void ctl_done_timer_wakeup(void *arg); @@ -437,8 +429,13 @@ static int ctl_datamove_remote_xfer(unio ctl_ha_dt_cb callback); static void ctl_datamove_remote_read(union ctl_io *io); static void ctl_datamove_remote(union ctl_io *io); -static int ctl_process_done(union ctl_io *io, int have_lock); +static int ctl_process_done(union ctl_io *io); +static void ctl_lun_thread(void *arg); static void ctl_work_thread(void *arg); +static void ctl_enqueue_incoming(union ctl_io *io); +static void ctl_enqueue_rtr(union ctl_io *io); +static void ctl_enqueue_done(union ctl_io *io); +static void ctl_enqueue_isc(union ctl_io *io); /* * Load the serialization table. This isn't very pretty, but is probably @@ -497,8 +494,7 @@ ctl_isc_handler_finish_xfer(struct ctl_s sizeof(ctsio->sense_data)); memcpy(&ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes, &msg_info->scsi.lbalen, sizeof(msg_info->scsi.lbalen)); - STAILQ_INSERT_TAIL(&ctl_softc->isc_queue, &ctsio->io_hdr, links); - ctl_wakeup_thread(); + ctl_enqueue_isc((union ctl_io *)ctsio); } static void @@ -544,8 +540,7 @@ ctl_isc_handler_finish_ser_only(struct c } #endif ctsio->io_hdr.msg_type = CTL_MSG_FINISH_IO; - STAILQ_INSERT_TAIL(&ctl_softc->isc_queue, &ctsio->io_hdr, links); - ctl_wakeup_thread(); + ctl_enqueue_isc((union ctl_io *)ctsio); } /* @@ -580,7 +575,6 @@ ctl_isc_event_handler(ctl_ha_channel cha isc_status); return; } - mtx_lock(&ctl_softc->ctl_lock); switch (msg_info.hdr.msg_type) { case CTL_MSG_SERIALIZE: @@ -593,7 +587,6 @@ ctl_isc_event_handler(ctl_ha_channel cha "ctl_io!\n"); /* Bad Juju */ /* Need to set busy and send msg back */ - mtx_unlock(&ctl_softc->ctl_lock); msg_info.hdr.msg_type = CTL_MSG_BAD_JUJU; msg_info.hdr.status = CTL_SCSI_ERROR; msg_info.scsi.scsi_status = SCSI_STATUS_BUSY; @@ -644,9 +637,7 @@ ctl_isc_event_handler(ctl_ha_channel cha io->io_hdr.flags |= entry->flags & CTL_FLAG_DATA_MASK; } - STAILQ_INSERT_TAIL(&ctl_softc->isc_queue, - &io->io_hdr, links); - ctl_wakeup_thread(); + ctl_enqueue_isc(io); break; /* Performed on the Originating SC, XFER mode only */ @@ -750,11 +741,8 @@ ctl_isc_event_handler(ctl_ha_channel cha * the full S/G list. Queue processing in the thread. * Otherwise wait for the next piece. */ - if (msg_info.dt.sg_last != 0) { - STAILQ_INSERT_TAIL(&ctl_softc->isc_queue, - &io->io_hdr, links); - ctl_wakeup_thread(); - } + if (msg_info.dt.sg_last != 0) + ctl_enqueue_isc(io); break; } /* Performed on the Serializing (primary) SC, XFER mode only */ @@ -780,10 +768,7 @@ ctl_isc_event_handler(ctl_ha_channel cha io->scsiio.residual = msg_info.scsi.residual; memcpy(&io->scsiio.sense_data,&msg_info.scsi.sense_data, sizeof(io->scsiio.sense_data)); - - STAILQ_INSERT_TAIL(&ctl_softc->isc_queue, - &io->io_hdr, links); - ctl_wakeup_thread(); + ctl_enqueue_isc(io); break; } @@ -792,7 +777,6 @@ ctl_isc_event_handler(ctl_ha_channel cha io = msg_info.hdr.original_sc; if (io == NULL) { printf("%s: Major Bummer\n", __func__); - mtx_unlock(&ctl_softc->ctl_lock); return; } else { #if 0 @@ -801,9 +785,7 @@ ctl_isc_event_handler(ctl_ha_channel cha } io->io_hdr.msg_type = CTL_MSG_R2R; io->io_hdr.serializing_sc = msg_info.hdr.serializing_sc; - STAILQ_INSERT_TAIL(&ctl_softc->isc_queue, - &io->io_hdr, links); - ctl_wakeup_thread(); + ctl_enqueue_isc(io); break; /* @@ -840,9 +822,7 @@ ctl_isc_event_handler(ctl_ha_channel cha /* io = msg_info.hdr.serializing_sc; */ io->io_hdr.msg_type = CTL_MSG_BAD_JUJU; - STAILQ_INSERT_TAIL(&ctl_softc->isc_queue, - &io->io_hdr, links); - ctl_wakeup_thread(); + ctl_enqueue_isc(io); break; /* Handle resets sent from the other side */ @@ -856,7 +836,6 @@ ctl_isc_event_handler(ctl_ha_channel cha /* Bad Juju */ /* should I just call the proper reset func here??? */ - mtx_unlock(&ctl_softc->ctl_lock); goto bailout; } ctl_zero_io((union ctl_io *)taskio); @@ -873,10 +852,7 @@ ctl_isc_event_handler(ctl_ha_channel cha cs_prof_gettime(&taskio->io_hdr.start_ticks); #endif #endif /* CTL_TIME_IO */ - STAILQ_INSERT_TAIL(&ctl_softc->task_queue, - &taskio->io_hdr, links); - ctl_softc->flags |= CTL_FLAG_TASK_PENDING; - ctl_wakeup_thread(); + ctl_run_task((union ctl_io *)taskio); break; } /* Persistent Reserve action which needs attention */ @@ -888,15 +864,12 @@ ctl_isc_event_handler(ctl_ha_channel cha "ctl_io!\n"); /* Bad Juju */ /* Need to set busy and send msg back */ - mtx_unlock(&ctl_softc->ctl_lock); goto bailout; } ctl_zero_io((union ctl_io *)presio); presio->io_hdr.msg_type = CTL_MSG_PERS_ACTION; presio->pr_msg = msg_info.pr; - STAILQ_INSERT_TAIL(&ctl_softc->isc_queue, - &presio->io_hdr, links); - ctl_wakeup_thread(); + ctl_enqueue_isc((union ctl_io *)presio); break; case CTL_MSG_SYNC_FE: rcv_sync_msg = 1; @@ -909,23 +882,21 @@ ctl_isc_event_handler(ctl_ha_channel cha struct copan_aps_subpage *current_sp; uint32_t targ_lun; - targ_lun = msg_info.hdr.nexus.targ_lun; - if (msg_info.hdr.nexus.lun_map_fn != NULL) - targ_lun = msg_info.hdr.nexus.lun_map_fn(msg_info.hdr.nexus.lun_map_arg, targ_lun); - + targ_lun = msg_info.hdr.nexus.targ_mapped_lun; lun = ctl_softc->ctl_luns[targ_lun]; + mtx_lock(&lun->lun_lock); page_index = &lun->mode_pages.index[index_to_aps_page]; current_sp = (struct copan_aps_subpage *) (page_index->page_data + (page_index->page_len * CTL_PAGE_CURRENT)); current_sp->lock_active = msg_info.aps.lock_flag; + mtx_unlock(&lun->lun_lock); break; } default: printf("How did I get here?\n"); } - mtx_unlock(&ctl_softc->ctl_lock); } else if (event == CTL_HA_EVT_MSG_SENT) { if (param != CTL_HA_STATUS_SUCCESS) { printf("Bad status from ctl_ha_msg_send status %d\n", @@ -1040,20 +1011,10 @@ ctl_init(void) softc->target.wwid[1] = 0x87654321; STAILQ_INIT(&softc->lun_list); STAILQ_INIT(&softc->pending_lun_queue); - STAILQ_INIT(&softc->task_queue); - STAILQ_INIT(&softc->incoming_queue); - STAILQ_INIT(&softc->rtr_queue); - STAILQ_INIT(&softc->done_queue); - STAILQ_INIT(&softc->isc_queue); STAILQ_INIT(&softc->fe_list); STAILQ_INIT(&softc->be_list); STAILQ_INIT(&softc->io_pools); - /* - * We don't bother calling these with ctl_lock held here, because, - * in theory, no one else can try to do anything while we're in our - * module init routine. - */ if (ctl_pool_create(softc, CTL_POOL_INTERNAL, CTL_POOL_ENTRIES_INTERNAL, &internal_pool)!= 0){ printf("ctl: can't allocate %d entry internal pool, " @@ -1083,25 +1044,23 @@ ctl_init(void) softc->emergency_pool = emergency_pool; softc->othersc_pool = other_pool; - if (worker_threads > MAXCPU || worker_threads == 0) { - printf("invalid kern.cam.ctl.worker_threads value; " - "setting to 1"); - worker_threads = 1; - } else if (worker_threads < 0) { - if (mp_ncpus > 2) { - /* - * Using more than two worker threads actually hurts - * performance due to lock contention. - */ - worker_threads = 2; - } else { - worker_threads = 1; - } - } + if (worker_threads <= 0) + worker_threads = max(1, mp_ncpus / 4); + if (worker_threads > CTL_MAX_THREADS) + worker_threads = CTL_MAX_THREADS; for (i = 0; i < worker_threads; i++) { - error = kproc_kthread_add(ctl_work_thread, softc, - &softc->work_thread, NULL, 0, 0, "ctl", "work%d", i); + struct ctl_thread *thr = &softc->threads[i]; + + mtx_init(&thr->queue_lock, "CTL queue mutex", NULL, MTX_DEF); + thr->ctl_softc = softc; + STAILQ_INIT(&thr->incoming_queue); + STAILQ_INIT(&thr->rtr_queue); + STAILQ_INIT(&thr->done_queue); + STAILQ_INIT(&thr->isc_queue); + + error = kproc_kthread_add(ctl_work_thread, thr, + &softc->ctl_proc, &thr->thread, 0, 0, "ctl", "work%d", i); if (error != 0) { printf("error creating CTL work thread!\n"); ctl_pool_free(internal_pool); @@ -1110,6 +1069,15 @@ ctl_init(void) return (error); } } + error = kproc_kthread_add(ctl_lun_thread, softc, + &softc->ctl_proc, NULL, 0, 0, "ctl", "lun"); + if (error != 0) { + printf("error creating CTL lun thread!\n"); + ctl_pool_free(internal_pool); + ctl_pool_free(emergency_pool); + ctl_pool_free(other_pool); + return (error); + } if (bootverbose) printf("ctl: CAM Target Layer loaded\n"); @@ -1193,6 +1161,7 @@ ctl_shutdown(void) #if 0 ctl_shutdown_thread(softc->work_thread); + mtx_destroy(&softc->queue_lock); #endif mtx_destroy(&softc->pool_lock); @@ -1684,7 +1653,7 @@ bailout: * (SER_ONLY mode). */ static int -ctl_serialize_other_sc_cmd(struct ctl_scsiio *ctsio, int have_lock) +ctl_serialize_other_sc_cmd(struct ctl_scsiio *ctsio) { struct ctl_softc *ctl_softc; union ctl_ha_msg msg_info; @@ -1693,12 +1662,8 @@ ctl_serialize_other_sc_cmd(struct ctl_sc uint32_t targ_lun; ctl_softc = control_softc; - if (have_lock == 0) - mtx_lock(&ctl_softc->ctl_lock); - targ_lun = ctsio->io_hdr.nexus.targ_lun; - if (ctsio->io_hdr.nexus.lun_map_fn != NULL) - targ_lun = ctsio->io_hdr.nexus.lun_map_fn(ctsio->io_hdr.nexus.lun_map_arg, targ_lun); + targ_lun = ctsio->io_hdr.nexus.targ_mapped_lun; lun = ctl_softc->ctl_luns[targ_lun]; if (lun==NULL) { @@ -1727,12 +1692,11 @@ ctl_serialize_other_sc_cmd(struct ctl_sc if (ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info, sizeof(msg_info), 0 ) > CTL_HA_STATUS_SUCCESS) { } - if (have_lock == 0) - mtx_unlock(&ctl_softc->ctl_lock); return(1); } + mtx_lock(&lun->lun_lock); TAILQ_INSERT_TAIL(&lun->ooa_queue, &ctsio->io_hdr, ooa_links); switch (ctl_check_ooa(lun, (union ctl_io *)ctsio, @@ -1747,8 +1711,7 @@ ctl_serialize_other_sc_cmd(struct ctl_sc case CTL_ACTION_SKIP: if (ctl_softc->ha_mode == CTL_HA_MODE_XFER) { ctsio->io_hdr.flags |= CTL_FLAG_IS_WAS_ON_RTR; - STAILQ_INSERT_TAIL(&ctl_softc->rtr_queue, - &ctsio->io_hdr, links); + ctl_enqueue_rtr((union ctl_io *)ctsio); } else { /* send msg back to other side */ @@ -1843,8 +1806,7 @@ ctl_serialize_other_sc_cmd(struct ctl_sc } break; } - if (have_lock == 0) - mtx_unlock(&ctl_softc->ctl_lock); + mtx_unlock(&lun->lun_lock); return (retval); } @@ -2003,8 +1965,7 @@ ctl_ioctl_fill_ooa(struct ctl_lun *lun, retval = 0; - mtx_assert(&control_softc->ctl_lock, MA_OWNED); - + mtx_lock(&lun->lun_lock); for (io = (union ctl_io *)TAILQ_FIRST(&lun->ooa_queue); (io != NULL); (*cur_fill_num)++, io = (union ctl_io *)TAILQ_NEXT(&io->io_hdr, ooa_links)) { @@ -2041,6 +2002,7 @@ ctl_ioctl_fill_ooa(struct ctl_lun *lun, if (io->io_hdr.flags & CTL_FLAG_DMA_QUEUED) entry->cmd_flags |= CTL_OOACMD_FLAG_DMA_QUEUED; } + mtx_unlock(&lun->lun_lock); return (retval); } @@ -2413,6 +2375,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, mtx_lock(&softc->ctl_lock); printf("Dumping OOA queues:\n"); STAILQ_FOREACH(lun, &softc->lun_list, links) { + mtx_lock(&lun->lun_lock); for (io = (union ctl_io *)TAILQ_FIRST( &lun->ooa_queue); io != NULL; io = (union ctl_io *)TAILQ_NEXT(&io->io_hdr, @@ -2434,6 +2397,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, sbuf_finish(&sb); printf("%s\n", sbuf_data(&sb)); } + mtx_unlock(&lun->lun_lock); } printf("OOA queues dump done\n"); mtx_unlock(&softc->ctl_lock); @@ -2549,15 +2513,16 @@ ctl_ioctl(struct cdev *dev, u_long cmd, ooa_info->status = CTL_OOA_INVALID_LUN; break; } - + mtx_lock(&lun->lun_lock); + mtx_unlock(&softc->ctl_lock); ooa_info->num_entries = 0; for (io = (union ctl_io *)TAILQ_FIRST(&lun->ooa_queue); io != NULL; io = (union ctl_io *)TAILQ_NEXT( &io->io_hdr, ooa_links)) { ooa_info->num_entries++; } + mtx_unlock(&lun->lun_lock); - mtx_unlock(&softc->ctl_lock); ooa_info->status = CTL_OOA_SUCCESS; break; @@ -2675,6 +2640,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, delay_info->status = CTL_DELAY_STATUS_INVALID_LUN; } else { lun = softc->ctl_luns[delay_info->lun_id]; + mtx_lock(&lun->lun_lock); delay_info->status = CTL_DELAY_STATUS_OK; @@ -2707,6 +2673,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, CTL_DELAY_STATUS_INVALID_LOC; break; } + mtx_unlock(&lun->lun_lock); } mtx_unlock(&softc->ctl_lock); @@ -2767,12 +2734,13 @@ ctl_ioctl(struct cdev *dev, u_long cmd, * in the set case, hopefully the user won't do something * silly. */ + mtx_lock(&lun->lun_lock); + mtx_unlock(&softc->ctl_lock); if (cmd == CTL_GETSYNC) sync_info->sync_interval = lun->sync_interval; else lun->sync_interval = sync_info->sync_interval; - - mtx_unlock(&softc->ctl_lock); + mtx_unlock(&lun->lun_lock); sync_info->status = CTL_GS_SYNC_OK; @@ -2833,6 +2801,8 @@ ctl_ioctl(struct cdev *dev, u_long cmd, retval = EINVAL; break; } + mtx_lock(&lun->lun_lock); + mtx_unlock(&softc->ctl_lock); /* * We could do some checking here to verify the validity @@ -2855,7 +2825,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, err_desc->serial = lun->error_serial; lun->error_serial++; - mtx_unlock(&softc->ctl_lock); + mtx_unlock(&lun->lun_lock); break; } case CTL_ERROR_INJECT_DELETE: { @@ -2875,6 +2845,8 @@ ctl_ioctl(struct cdev *dev, u_long cmd, retval = EINVAL; break; } + mtx_lock(&lun->lun_lock); + mtx_unlock(&softc->ctl_lock); STAILQ_FOREACH_SAFE(desc, &lun->error_list, links, desc2) { if (desc->serial != delete_desc->serial) continue; @@ -2884,7 +2856,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, free(desc, M_CTL); delete_done = 1; } - mtx_unlock(&softc->ctl_lock); + mtx_unlock(&lun->lun_lock); if (delete_done == 0) { printf("%s: CTL_ERROR_INJECT_DELETE: can't find " "error serial %ju on LUN %u\n", __func__, @@ -3037,8 +3009,8 @@ ctl_ioctl(struct cdev *dev, u_long cmd, sbuf_printf(sb, "\n"); mtx_lock(&softc->ctl_lock); - STAILQ_FOREACH(lun, &softc->lun_list, links) { + mtx_lock(&lun->lun_lock); retval = sbuf_printf(sb, "\n", (uintmax_t)lun->lun); @@ -3130,7 +3102,10 @@ ctl_ioctl(struct cdev *dev, u_long cmd, if (retval != 0) break; + mtx_unlock(&lun->lun_lock); } + if (lun != NULL) + mtx_unlock(&lun->lun_lock); mtx_unlock(&softc->ctl_lock); if ((retval != 0) @@ -3612,49 +3587,9 @@ ctl_free_io(union ctl_io *io) */ if (io->io_hdr.pool != NULL) { struct ctl_io_pool *pool; -#if 0 - struct ctl_softc *ctl_softc; - union ctl_io *tmp_io; - unsigned long xflags; - int i; - - ctl_softc = control_softc; -#endif pool = (struct ctl_io_pool *)io->io_hdr.pool; - mtx_lock(&pool->ctl_softc->pool_lock); -#if 0 - save_flags(xflags); - - for (i = 0, tmp_io = (union ctl_io *)STAILQ_FIRST( - &ctl_softc->task_queue); tmp_io != NULL; i++, - tmp_io = (union ctl_io *)STAILQ_NEXT(&tmp_io->io_hdr, - links)) { - if (tmp_io == io) { - printf("%s: %p is still on the task queue!\n", - __func__, tmp_io); - printf("%s: (%d): type %d " - "msg %d cdb %x iptl: " - "%d:%d:%d:%d tag 0x%04x " - "flg %#lx\n", - __func__, i, - tmp_io->io_hdr.io_type, - tmp_io->io_hdr.msg_type, - tmp_io->scsiio.cdb[0], - tmp_io->io_hdr.nexus.initid.id, - tmp_io->io_hdr.nexus.targ_port, - tmp_io->io_hdr.nexus.targ_target.id, - tmp_io->io_hdr.nexus.targ_lun, - (tmp_io->io_hdr.io_type == - CTL_IO_TASK) ? - tmp_io->taskio.tag_num : - tmp_io->scsiio.tag_num, - xflags); - panic("I/O still on the task queue!"); - } - } -#endif io->io_hdr.io_type = 0xff; STAILQ_INSERT_TAIL(&pool->free_queue, &io->io_hdr, links); pool->total_freed++; @@ -4304,6 +4239,7 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft } ctl_set_mask(ctl_softc->ctl_lun_mask, lun_number); + mtx_init(&lun->lun_lock, "CTL LUN", NULL, MTX_DEF); lun->target = target_id; lun->lun = lun_number; lun->be_lun = be_lun; @@ -4423,7 +4359,6 @@ ctl_free_lun(struct ctl_lun *lun) struct ctl_frontend *fe; #endif struct ctl_lun *nlun; - union ctl_io *io, *next_io; int i; softc = lun->ctl_softc; @@ -4436,49 +4371,8 @@ ctl_free_lun(struct ctl_lun *lun) softc->ctl_luns[lun->lun] = NULL; - if (TAILQ_FIRST(&lun->ooa_queue) != NULL) { - printf("ctl_free_lun: aieee!! freeing a LUN with " - "outstanding I/O!!\n"); - } - - /* - * If we have anything pending on the RtR queue, remove it. - */ - for (io = (union ctl_io *)STAILQ_FIRST(&softc->rtr_queue); io != NULL; - io = next_io) { - uint32_t targ_lun; - - next_io = (union ctl_io *)STAILQ_NEXT(&io->io_hdr, links); - targ_lun = io->io_hdr.nexus.targ_lun; - if (io->io_hdr.nexus.lun_map_fn != NULL) - targ_lun = io->io_hdr.nexus.lun_map_fn(io->io_hdr.nexus.lun_map_arg, targ_lun); - if ((io->io_hdr.nexus.targ_target.id == lun->target.id) - && (targ_lun == lun->lun)) - STAILQ_REMOVE(&softc->rtr_queue, &io->io_hdr, - ctl_io_hdr, links); - } - - /* - * Then remove everything from the blocked queue. - */ - for (io = (union ctl_io *)TAILQ_FIRST(&lun->blocked_queue); io != NULL; - io = next_io) { - next_io = (union ctl_io *)TAILQ_NEXT(&io->io_hdr,blocked_links); - TAILQ_REMOVE(&lun->blocked_queue, &io->io_hdr, blocked_links); - io->io_hdr.flags &= ~CTL_FLAG_BLOCKED; - } - - /* - * Now clear out the OOA queue, and free all the I/O. - * XXX KDM should we notify the FETD here? We probably need to - * quiesce the LUN before deleting it. - */ - for (io = (union ctl_io *)TAILQ_FIRST(&lun->ooa_queue); io != NULL; - io = next_io) { - next_io = (union ctl_io *)TAILQ_NEXT(&io->io_hdr, ooa_links); - TAILQ_REMOVE(&lun->ooa_queue, &io->io_hdr, ooa_links); - ctl_free_io(io); - } + if (!TAILQ_EMPTY(&lun->ooa_queue)) + panic("Freeing a LUN %p with outstanding I/O!!\n", lun); softc->num_luns--; @@ -4540,6 +4434,7 @@ ctl_free_lun(struct ctl_lun *lun) atomic_subtract_int(&lun->be_lun->be->num_luns, 1); lun->be_lun->lun_shutdown(lun->be_lun->be_lun); + mtx_destroy(&lun->lun_lock); if (lun->flags & CTL_LUN_MALLOCED) free(lun, M_CTL); @@ -4568,15 +4463,12 @@ ctl_create_lun(struct ctl_be_lun *be_lun int ctl_add_lun(struct ctl_be_lun *be_lun) { - struct ctl_softc *ctl_softc; - - ctl_softc = control_softc; + struct ctl_softc *ctl_softc = control_softc; mtx_lock(&ctl_softc->ctl_lock); STAILQ_INSERT_TAIL(&ctl_softc->pending_lun_queue, be_lun, links); mtx_unlock(&ctl_softc->ctl_lock); - - ctl_wakeup_thread(); + wakeup(&ctl_softc->pending_lun_queue); return (0); } @@ -4594,15 +4486,18 @@ ctl_enable_lun(struct ctl_be_lun *be_lun lun = (struct ctl_lun *)be_lun->ctl_lun; mtx_lock(&ctl_softc->ctl_lock); + mtx_lock(&lun->lun_lock); if ((lun->flags & CTL_LUN_DISABLED) == 0) { /* * eh? Why did we get called if the LUN is already * enabled? */ + mtx_unlock(&lun->lun_lock); mtx_unlock(&ctl_softc->ctl_lock); return (0); } lun->flags &= ~CTL_LUN_DISABLED; + mtx_unlock(&lun->lun_lock); for (fe = STAILQ_FIRST(&ctl_softc->fe_list); fe != NULL; fe = nfe) { nfe = STAILQ_NEXT(fe, links); @@ -4647,12 +4542,14 @@ ctl_disable_lun(struct ctl_be_lun *be_lu lun = (struct ctl_lun *)be_lun->ctl_lun; mtx_lock(&ctl_softc->ctl_lock); - + mtx_lock(&lun->lun_lock); if (lun->flags & CTL_LUN_DISABLED) { + mtx_unlock(&lun->lun_lock); mtx_unlock(&ctl_softc->ctl_lock); return (0); } lun->flags |= CTL_LUN_DISABLED; + mtx_unlock(&lun->lun_lock); STAILQ_FOREACH(fe, &ctl_softc->fe_list, links) { mtx_unlock(&ctl_softc->ctl_lock); @@ -4689,9 +4586,9 @@ ctl_start_lun(struct ctl_be_lun *be_lun) lun = (struct ctl_lun *)be_lun->ctl_lun; - mtx_lock(&ctl_softc->ctl_lock); + mtx_lock(&lun->lun_lock); lun->flags &= ~CTL_LUN_STOPPED; - mtx_unlock(&ctl_softc->ctl_lock); + mtx_unlock(&lun->lun_lock); return (0); } @@ -4706,9 +4603,9 @@ ctl_stop_lun(struct ctl_be_lun *be_lun) lun = (struct ctl_lun *)be_lun->ctl_lun; - mtx_lock(&ctl_softc->ctl_lock); + mtx_lock(&lun->lun_lock); lun->flags |= CTL_LUN_STOPPED; - mtx_unlock(&ctl_softc->ctl_lock); + mtx_unlock(&lun->lun_lock); return (0); } @@ -4723,9 +4620,9 @@ ctl_lun_offline(struct ctl_be_lun *be_lu lun = (struct ctl_lun *)be_lun->ctl_lun; - mtx_lock(&ctl_softc->ctl_lock); + mtx_lock(&lun->lun_lock); lun->flags |= CTL_LUN_OFFLINE; - mtx_unlock(&ctl_softc->ctl_lock); + mtx_unlock(&lun->lun_lock); return (0); } @@ -4740,9 +4637,9 @@ ctl_lun_online(struct ctl_be_lun *be_lun lun = (struct ctl_lun *)be_lun->ctl_lun; - mtx_lock(&ctl_softc->ctl_lock); + mtx_lock(&lun->lun_lock); lun->flags &= ~CTL_LUN_OFFLINE; - mtx_unlock(&ctl_softc->ctl_lock); + mtx_unlock(&lun->lun_lock); return (0); } @@ -4757,13 +4654,13 @@ ctl_invalidate_lun(struct ctl_be_lun *be lun = (struct ctl_lun *)be_lun->ctl_lun; - mtx_lock(&ctl_softc->ctl_lock); + mtx_lock(&lun->lun_lock); /* * The LUN needs to be disabled before it can be marked invalid. */ if ((lun->flags & CTL_LUN_DISABLED) == 0) { - mtx_unlock(&ctl_softc->ctl_lock); + mtx_unlock(&lun->lun_lock); return (-1); } /* @@ -4776,9 +4673,13 @@ ctl_invalidate_lun(struct ctl_be_lun *be * If we have something in the OOA queue, we'll free it when the * last I/O completes. */ - if (TAILQ_FIRST(&lun->ooa_queue) == NULL) + if (TAILQ_EMPTY(&lun->ooa_queue)) { + mtx_unlock(&lun->lun_lock); + mtx_lock(&ctl_softc->ctl_lock); ctl_free_lun(lun); - mtx_unlock(&ctl_softc->ctl_lock); + mtx_unlock(&ctl_softc->ctl_lock); + } else + mtx_unlock(&lun->lun_lock); return (0); } @@ -4792,9 +4693,9 @@ ctl_lun_inoperable(struct ctl_be_lun *be ctl_softc = control_softc; lun = (struct ctl_lun *)be_lun->ctl_lun; - mtx_lock(&ctl_softc->ctl_lock); + mtx_lock(&lun->lun_lock); lun->flags |= CTL_LUN_INOPERABLE; - mtx_unlock(&ctl_softc->ctl_lock); + mtx_unlock(&lun->lun_lock); return (0); } @@ -4808,9 +4709,9 @@ ctl_lun_operable(struct ctl_be_lun *be_l ctl_softc = control_softc; lun = (struct ctl_lun *)be_lun->ctl_lun; - mtx_lock(&ctl_softc->ctl_lock); + mtx_lock(&lun->lun_lock); lun->flags &= ~CTL_LUN_INOPERABLE; - mtx_unlock(&ctl_softc->ctl_lock); + mtx_unlock(&lun->lun_lock); return (0); } @@ -4830,6 +4731,7 @@ ctl_lun_power_lock(struct ctl_be_lun *be mtx_lock(&softc->ctl_lock); lun = (struct ctl_lun *)be_lun->ctl_lun; + mtx_lock(&lun->lun_lock); page_index = NULL; for (i = 0; i < CTL_NUM_MODE_PAGES; i++) { @@ -4843,6 +4745,7 @@ ctl_lun_power_lock(struct ctl_be_lun *be } if (page_index == NULL) { + mtx_unlock(&lun->lun_lock); mtx_unlock(&softc->ctl_lock); printf("%s: APS subpage not found for lun %ju!\n", __func__, (uintmax_t)lun->lun); @@ -4853,6 +4756,7 @@ ctl_lun_power_lock(struct ctl_be_lun *be && (softc->aps_locked_lun != lun->lun)) { printf("%s: attempt to lock LUN %llu when %llu is already " "locked\n"); + mtx_unlock(&lun->lun_lock); mtx_unlock(&softc->ctl_lock); return (1); } @@ -4889,11 +4793,13 @@ ctl_lun_power_lock(struct ctl_be_lun *be if (isc_retval > CTL_HA_STATUS_SUCCESS) { printf("%s: APS (lock=%d) error returned from " "ctl_ha_msg_send: %d\n", __func__, lock, isc_retval); + mtx_unlock(&lun->lun_lock); mtx_unlock(&softc->ctl_lock); return (1); } } + mtx_unlock(&lun->lun_lock); mtx_unlock(&softc->ctl_lock); return (0); @@ -4908,14 +4814,14 @@ ctl_lun_capacity_changed(struct ctl_be_l softc = control_softc; - mtx_lock(&softc->ctl_lock); - lun = (struct ctl_lun *)be_lun->ctl_lun; + mtx_lock(&lun->lun_lock); + for (i = 0; i < CTL_MAX_INITIATORS; i++) lun->pending_sense[i].ua_pending |= CTL_UA_CAPACITY_CHANGED; - mtx_unlock(&softc->ctl_lock); + mtx_unlock(&lun->lun_lock); } /* @@ -5156,7 +5062,7 @@ ctl_scsi_release(struct ctl_scsiio *ctsi if (length > 0) thirdparty_id = scsi_8btou64(ctsio->kern_data_ptr); - mtx_lock(&ctl_softc->ctl_lock); + mtx_lock(&lun->lun_lock); /* * According to SPC, it is not an error for an intiator to attempt @@ -5174,6 +5080,8 @@ ctl_scsi_release(struct ctl_scsiio *ctsi } } + mtx_unlock(&lun->lun_lock); + ctsio->scsi_status = SCSI_STATUS_OK; ctsio->io_hdr.status = CTL_SUCCESS; @@ -5182,8 +5090,6 @@ ctl_scsi_release(struct ctl_scsiio *ctsi ctsio->io_hdr.flags &= ~CTL_FLAG_ALLOCATED; } - mtx_unlock(&ctl_softc->ctl_lock); - ctl_done((union ctl_io *)ctsio); return (CTL_RETVAL_COMPLETE); } @@ -5291,7 +5197,7 @@ ctl_scsi_reserve(struct ctl_scsiio *ctsi if (length > 0) thirdparty_id = scsi_8btou64(ctsio->kern_data_ptr); - mtx_lock(&ctl_softc->ctl_lock); + mtx_lock(&lun->lun_lock); if (lun->flags & CTL_LUN_RESERVED) { if ((ctsio->io_hdr.nexus.initid.id != lun->rsv_nexus.initid.id) || (ctsio->io_hdr.nexus.targ_port != lun->rsv_nexus.targ_port) @@ -5310,13 +5216,13 @@ ctl_scsi_reserve(struct ctl_scsiio *ctsi ctsio->io_hdr.status = CTL_SUCCESS; bailout: + mtx_unlock(&lun->lun_lock); + if (ctsio->io_hdr.flags & CTL_FLAG_ALLOCATED) { free(ctsio->kern_data_ptr, M_CTL); ctsio->io_hdr.flags &= ~CTL_FLAG_ALLOCATED; } - mtx_unlock(&ctl_softc->ctl_lock); - ctl_done((union ctl_io *)ctsio); return (CTL_RETVAL_COMPLETE); } @@ -5425,7 +5331,7 @@ ctl_start_stop(struct ctl_scsiio *ctsio) * Figure out a reasonable way to port this? */ #ifdef NEEDTOPORT - mtx_lock(&ctl_softc->ctl_lock); + mtx_lock(&lun->lun_lock); if (((cdb->byte2 & SSS_ONOFFLINE) == 0) && (lun->flags & CTL_LUN_OFFLINE)) { @@ -5433,11 +5339,11 @@ ctl_start_stop(struct ctl_scsiio *ctsio) * If the LUN is offline, and the on/offline bit isn't set, * reject the start or stop. Otherwise, let it through. */ - mtx_unlock(&ctl_softc->ctl_lock); + mtx_unlock(&lun->lun_lock); ctl_set_lun_not_ready(ctsio); ctl_done((union ctl_io *)ctsio); } else { - mtx_unlock(&ctl_softc->ctl_lock); + mtx_unlock(&lun->lun_lock); #endif /* NEEDTOPORT */ /* * This could be a start or a stop when we're online, @@ -5598,14 +5504,14 @@ ctl_sync_cache(struct ctl_scsiio *ctsio) * Check to see whether we're configured to send the SYNCHRONIZE * CACHE command directly to the back end. */ - mtx_lock(&ctl_softc->ctl_lock); + mtx_lock(&lun->lun_lock); if ((ctl_softc->flags & CTL_FLAG_REAL_SYNC) && (++(lun->sync_count) >= lun->sync_interval)) { lun->sync_count = 0; - mtx_unlock(&ctl_softc->ctl_lock); + mtx_unlock(&lun->lun_lock); retval = lun->backend->config_write((union ctl_io *)ctsio); } else { - mtx_unlock(&ctl_softc->ctl_lock); + mtx_unlock(&lun->lun_lock); ctl_set_success(ctsio); ctl_done((union ctl_io *)ctsio); } @@ -5698,9 +5604,9 @@ ctl_format(struct ctl_scsiio *ctsio) * get them to issue a command that will basically make them think * they're blowing away the media. */ - mtx_lock(&ctl_softc->ctl_lock); + mtx_lock(&lun->lun_lock); lun->flags &= ~CTL_LUN_INOPERABLE; - mtx_unlock(&ctl_softc->ctl_lock); + mtx_unlock(&lun->lun_lock); ctsio->scsi_status = SCSI_STATUS_OK; ctsio->io_hdr.status = CTL_SUCCESS; @@ -6099,7 +6005,7 @@ ctl_control_page_handler(struct ctl_scsi softc = control_softc; - mtx_lock(&softc->ctl_lock); + mtx_lock(&lun->lun_lock); if (((current_cp->rlec & SCP_DSENSE) == 0) && ((user_cp->rlec & SCP_DSENSE) != 0)) { /* @@ -6195,7 +6101,7 @@ ctl_control_page_handler(struct ctl_scsi CTL_UA_MODE_CHANGE; } } - mtx_unlock(&softc->ctl_lock); + mtx_unlock(&lun->lun_lock); return (0); } @@ -7279,10 +7185,7 @@ ctl_maintenance_in(struct ctl_scsiio *ct return(retval); } - mtx_lock(&softc->ctl_lock); single = ctl_is_single; - mtx_unlock(&softc->ctl_lock); - if (single) num_target_port_groups = NUM_TARGET_PORT_GROUPS - 1; else @@ -7416,7 +7319,7 @@ ctl_persistent_reserve_in(struct ctl_scs lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; retry: - mtx_lock(&softc->ctl_lock); + mtx_lock(&lun->lun_lock); switch (cdb->action) { case SPRI_RK: /* read keys */ total_len = sizeof(struct scsi_per_res_in_keys) + @@ -7434,7 +7337,7 @@ retry: break; case SPRI_RS: /* read full status */ default: - mtx_unlock(&softc->ctl_lock); + mtx_unlock(&lun->lun_lock); ctl_set_invalid_field(ctsio, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat Jul 12 05:59:20 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BA06366D; Sat, 12 Jul 2014 05:59:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CF4D21EB; Sat, 12 Jul 2014 05:59:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6C5xK6g056190; Sat, 12 Jul 2014 05:59:20 GMT (envelope-from cy@svn.freebsd.org) Received: (from cy@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6C5xJNP056186; Sat, 12 Jul 2014 05:59:19 GMT (envelope-from cy@svn.freebsd.org) Message-Id: <201407120559.s6C5xJNP056186@svn.freebsd.org> From: Cy Schubert Date: Sat, 12 Jul 2014 05:59:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268563 - stable/10/contrib/ipfilter/lib X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2014 05:59:20 -0000 Author: cy Date: Sat Jul 12 05:59:19 2014 New Revision: 268563 URL: http://svnweb.freebsd.org/changeset/base/268563 Log: MFC r268286: Fix compile-time errors when NO_WERROR and WITHOUT_INET6_SUPPORT (NO_INET6) are specified. Approved by: glebius (mentor) Modified: stable/10/contrib/ipfilter/lib/printhost.c stable/10/contrib/ipfilter/lib/printhostmask.c stable/10/contrib/ipfilter/lib/save_v1trap.c stable/10/contrib/ipfilter/lib/save_v2trap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/ipfilter/lib/printhost.c ============================================================================== --- stable/10/contrib/ipfilter/lib/printhost.c Sat Jul 12 05:46:33 2014 (r268562) +++ stable/10/contrib/ipfilter/lib/printhost.c Sat Jul 12 05:59:19 2014 (r268563) @@ -23,9 +23,9 @@ printhost(family, addr) if ((family == -1) || !*addr) PRINTF("any"); else { +#ifdef USE_INET6 void *ptr = addr; -#ifdef USE_INET6 PRINTF("%s", inet_ntop(family, ptr, ipbuf, sizeof(ipbuf))); #else ipa.s_addr = *addr; Modified: stable/10/contrib/ipfilter/lib/printhostmask.c ============================================================================== --- stable/10/contrib/ipfilter/lib/printhostmask.c Sat Jul 12 05:46:33 2014 (r268562) +++ stable/10/contrib/ipfilter/lib/printhostmask.c Sat Jul 12 05:59:19 2014 (r268563) @@ -25,9 +25,9 @@ printhostmask(family, addr, mask) if ((family == -1) || ((!addr || !*addr) && (!mask || !*mask))) PRINTF("any"); else { +#ifdef USE_INET6 void *ptr = addr; -#ifdef USE_INET6 PRINTF("%s", inet_ntop(family, ptr, ipbuf, sizeof(ipbuf))); #else ipa.s_addr = *addr; Modified: stable/10/contrib/ipfilter/lib/save_v1trap.c ============================================================================== --- stable/10/contrib/ipfilter/lib/save_v1trap.c Sat Jul 12 05:46:33 2014 (r268562) +++ stable/10/contrib/ipfilter/lib/save_v1trap.c Sat Jul 12 05:59:19 2014 (r268563) @@ -178,7 +178,7 @@ snmpv1_parse(char **strings) if (ctx->fd >= 0) { ctx->sin.sin_family = AF_INET; ctx->sin.sin_port = htons(162); - if (connect(ctx->fd, &ctx->sin, + if (connect(ctx->fd, (struct sockaddr *)&ctx->sin, sizeof(ctx->sin)) != 0) { snmpv1_destroy(ctx); return NULL; Modified: stable/10/contrib/ipfilter/lib/save_v2trap.c ============================================================================== --- stable/10/contrib/ipfilter/lib/save_v2trap.c Sat Jul 12 05:46:33 2014 (r268562) +++ stable/10/contrib/ipfilter/lib/save_v2trap.c Sat Jul 12 05:59:19 2014 (r268563) @@ -181,7 +181,7 @@ snmpv2_parse(char **strings) if (ctx->fd >= 0) { ctx->sin.sin_family = AF_INET; ctx->sin.sin_port = htons(162); - if (connect(ctx->fd, &ctx->sin, + if (connect(ctx->fd, (struct sockaddr *)&ctx->sin, sizeof(ctx->sin)) != 0) { snmpv2_destroy(ctx); return NULL; From owner-svn-src-stable@FreeBSD.ORG Sat Jul 12 17:39:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 59EF82D9; Sat, 12 Jul 2014 17:39:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2BABC24B8; Sat, 12 Jul 2014 17:39:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6CHdEwZ020335; Sat, 12 Jul 2014 17:39:14 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6CHdEkg020334; Sat, 12 Jul 2014 17:39:14 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201407121739.s6CHdEkg020334@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sat, 12 Jul 2014 17:39:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268571 - stable/10/lib/libc/locale X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2014 17:39:14 -0000 Author: pfg Date: Sat Jul 12 17:39:13 2014 New Revision: 268571 URL: http://svnweb.freebsd.org/changeset/base/268571 Log: MFC r268272: minor perf enhancement for UTF-8 Reduce some duplicate code. Reference: https://www.illumos.org/issues/628 Obtained from: Illumos Modified: stable/10/lib/libc/locale/utf8.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/locale/utf8.c ============================================================================== --- stable/10/lib/libc/locale/utf8.c Sat Jul 12 15:35:04 2014 (r268570) +++ stable/10/lib/libc/locale/utf8.c Sat Jul 12 17:39:13 2014 (r268571) @@ -1,4 +1,5 @@ /*- + * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2002-2004 Tim J. Robbins * All rights reserved. * @@ -112,13 +113,6 @@ _UTF8_mbrtowc(wchar_t * __restrict pwc, /* Incomplete multibyte sequence */ return ((size_t)-2); - if (us->want == 0 && ((ch = (unsigned char)*s) & ~0x7f) == 0) { - /* Fast path for plain ASCII characters. */ - if (pwc != NULL) - *pwc = ch; - return (ch != '\0' ? 1 : 0); - } - if (us->want == 0) { /* * Determine the number of octets that make up this character @@ -134,10 +128,12 @@ _UTF8_mbrtowc(wchar_t * __restrict pwc, */ ch = (unsigned char)*s; if ((ch & 0x80) == 0) { - mask = 0x7f; - want = 1; - lbound = 0; - } else if ((ch & 0xe0) == 0xc0) { + /* Fast path for plain ASCII characters. */ + if (pwc != NULL) + *pwc = ch; + return (ch != '\0' ? 1 : 0); + } + if ((ch & 0xe0) == 0xc0) { mask = 0x1f; want = 2; lbound = 0x80; @@ -316,12 +312,6 @@ _UTF8_wcrtomb(char * __restrict s, wchar /* Reset to initial shift state (no-op) */ return (1); - if ((wc & ~0x7f) == 0) { - /* Fast path for plain ASCII characters. */ - *s = (char)wc; - return (1); - } - /* * Determine the number of octets needed to represent this character. * We always output the shortest sequence possible. Also specify the @@ -329,8 +319,9 @@ _UTF8_wcrtomb(char * __restrict s, wchar * about the sequence length. */ if ((wc & ~0x7f) == 0) { - lead = 0; - len = 1; + /* Fast path for plain ASCII characters. */ + *s = (char)wc; + return (1); } else if ((wc & ~0x7ff) == 0) { lead = 0xc0; len = 2; From owner-svn-src-stable@FreeBSD.ORG Sat Jul 12 18:23:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CF40149; Sat, 12 Jul 2014 18:23:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 098572896; Sat, 12 Jul 2014 18:23:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6CINZG9043680; Sat, 12 Jul 2014 18:23:35 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6CINZiN043677; Sat, 12 Jul 2014 18:23:35 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201407121823.s6CINZiN043677@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sat, 12 Jul 2014 18:23:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268572 - in stable/10/sys/cddl/contrib/opensolaris/uts/common: dtrace sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2014 18:23:36 -0000 Author: pfg Date: Sat Jul 12 18:23:35 2014 New Revision: 268572 URL: http://svnweb.freebsd.org/changeset/base/268572 Log: MFC r268130, r268224, r268230, r268231: Various DTrace Merges from OpenSolaris/Illumos: 15-Sep-2008: 6735480 race between probe enabling and provider registration 20-Apr-2008: 6822482 DOF validation needs to handle loadable sections flagged as unloadable 22-Apr-2009: 6823388 DTrace ioctl handlers must validate all structure members 30-Jun-2009: 6851093 system drops to kmdb with anonymous dtrace probes + kmdb Obtained from: OpenSolaris Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sat Jul 12 17:39:13 2014 (r268571) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sat Jul 12 18:23:35 2014 (r268572) @@ -27,8 +27,6 @@ * Copyright (c) 2012 by Delphix. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * DTrace - Dynamic Tracing for Solaris * @@ -233,6 +231,7 @@ static dtrace_ecb_t *dtrace_ecb_create_c static dtrace_genid_t dtrace_probegen; /* current probe generation */ static dtrace_helpers_t *dtrace_deferred_pid; /* deferred helper list */ static dtrace_enabling_t *dtrace_retained; /* list of retained enablings */ +static dtrace_genid_t dtrace_retained_gen; /* current retained enab gen */ static dtrace_dynvar_t dtrace_dynhash_sink; /* end of dynamic hash chains */ #if !defined(sun) static struct mtx dtrace_unr_mtx; @@ -8854,7 +8853,7 @@ dtrace_difo_validate(dtrace_difo_t *dp, break; default: - err += efunc(dp->dtdo_len - 1, "bad return size"); + err += efunc(dp->dtdo_len - 1, "bad return size\n"); } } @@ -11467,6 +11466,7 @@ dtrace_enabling_destroy(dtrace_enabling_ ASSERT(enab->dten_vstate->dtvs_state != NULL); ASSERT(enab->dten_vstate->dtvs_state->dts_nretained > 0); enab->dten_vstate->dtvs_state->dts_nretained--; + dtrace_retained_gen++; } if (enab->dten_prev == NULL) { @@ -11509,6 +11509,7 @@ dtrace_enabling_retain(dtrace_enabling_t return (ENOSPC); state->dts_nretained++; + dtrace_retained_gen++; if (dtrace_retained == NULL) { dtrace_retained = enab; @@ -11751,6 +11752,7 @@ dtrace_enabling_provide(dtrace_provider_ { int i, all = 0; dtrace_probedesc_t desc; + dtrace_genid_t gen; ASSERT(MUTEX_HELD(&dtrace_lock)); ASSERT(MUTEX_HELD(&dtrace_provider_lock)); @@ -11761,15 +11763,25 @@ dtrace_enabling_provide(dtrace_provider_ } do { - dtrace_enabling_t *enab = dtrace_retained; + dtrace_enabling_t *enab; void *parg = prv->dtpv_arg; - for (; enab != NULL; enab = enab->dten_next) { +retry: + gen = dtrace_retained_gen; + for (enab = dtrace_retained; enab != NULL; + enab = enab->dten_next) { for (i = 0; i < enab->dten_ndesc; i++) { desc = enab->dten_desc[i]->dted_probe; mutex_exit(&dtrace_lock); prv->dtpv_pops.dtps_provide(parg, &desc); mutex_enter(&dtrace_lock); + /* + * Process the retained enablings again if + * they have changed while we weren't holding + * dtrace_lock. + */ + if (gen != dtrace_retained_gen) + goto retry; } } } while (all && (prv = prv->dtpv_next) != NULL); @@ -11970,7 +11982,8 @@ dtrace_dof_copyin(uintptr_t uarg, int *e dof = kmem_alloc(hdr.dofh_loadsz, KM_SLEEP); - if (copyin((void *)uarg, dof, hdr.dofh_loadsz) != 0) { + if (copyin((void *)uarg, dof, hdr.dofh_loadsz) != 0 || + dof->dofh_loadsz != hdr.dofh_loadsz) { kmem_free(dof, hdr.dofh_loadsz); *errp = EFAULT; return (NULL); @@ -12780,6 +12793,13 @@ dtrace_dof_slurp(dof_hdr_t *dof, dtrace_ } } + if (DOF_SEC_ISLOADABLE(sec->dofs_type) && + !(sec->dofs_flags & DOF_SECF_LOAD)) { + dtrace_dof_error(dof, "loadable section with load " + "flag unset"); + return (-1); + } + if (!(sec->dofs_flags & DOF_SECF_LOAD)) continue; /* just ignore non-loadable sections */ @@ -15778,7 +15798,7 @@ dtrace_open(struct cdev *dev, int oflags if (state == NULL) { #if defined(sun) - if (--dtrace_opens == 0) + if (--dtrace_opens == 0 && dtrace_anon.dta_enabling == NULL) (void) kdi_dtrace_set(KDI_DTSET_DTRACE_DEACTIVATE); #else --dtrace_opens; @@ -15855,7 +15875,11 @@ dtrace_dtr(void *data) ASSERT(dtrace_opens > 0); #if defined(sun) - if (--dtrace_opens == 0) + /* + * Only relinquish control of the kernel debugger interface when there + * are no consumers and no anonymous enablings. + */ + if (--dtrace_opens == 0 && dtrace_anon.dta_enabling == NULL) (void) kdi_dtrace_set(KDI_DTSET_DTRACE_DEACTIVATE); #else --dtrace_opens; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Sat Jul 12 17:39:13 2014 (r268571) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Sat Jul 12 18:23:35 2014 (r268572) @@ -2089,7 +2089,8 @@ fasttrap_ioctl(struct cdev *dev, u_long probe = kmem_alloc(size, KM_SLEEP); - if (copyin(uprobe, probe, size) != 0) { + if (copyin(uprobe, probe, size) != 0 || + probe->ftps_noffs != noffs) { kmem_free(probe, size); return (EFAULT); } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Sat Jul 12 17:39:13 2014 (r268571) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Sat Jul 12 18:23:35 2014 (r268572) @@ -723,6 +723,20 @@ typedef struct dof_sec { #define DOF_SECF_LOAD 1 /* section should be loaded */ +#define DOF_SEC_ISLOADABLE(x) \ + (((x) == DOF_SECT_ECBDESC) || ((x) == DOF_SECT_PROBEDESC) || \ + ((x) == DOF_SECT_ACTDESC) || ((x) == DOF_SECT_DIFOHDR) || \ + ((x) == DOF_SECT_DIF) || ((x) == DOF_SECT_STRTAB) || \ + ((x) == DOF_SECT_VARTAB) || ((x) == DOF_SECT_RELTAB) || \ + ((x) == DOF_SECT_TYPTAB) || ((x) == DOF_SECT_URELHDR) || \ + ((x) == DOF_SECT_KRELHDR) || ((x) == DOF_SECT_OPTDESC) || \ + ((x) == DOF_SECT_PROVIDER) || ((x) == DOF_SECT_PROBES) || \ + ((x) == DOF_SECT_PRARGS) || ((x) == DOF_SECT_PROFFS) || \ + ((x) == DOF_SECT_INTTAB) || ((x) == DOF_SECT_XLTAB) || \ + ((x) == DOF_SECT_XLMEMBERS) || ((x) == DOF_SECT_XLIMPORT) || \ + ((x) == DOF_SECT_XLIMPORT) || ((x) == DOF_SECT_XLEXPORT) || \ + ((x) == DOF_SECT_PREXPORT) || ((x) == DOF_SECT_PRENOFFS)) + typedef struct dof_ecbdesc { dof_secidx_t dofe_probes; /* link to DOF_SECT_PROBEDESC */ dof_secidx_t dofe_pred; /* link to DOF_SECT_DIFOHDR */ From owner-svn-src-stable@FreeBSD.ORG Sat Jul 12 18:30:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A84E3EC; Sat, 12 Jul 2014 18:30:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F21A428C5; Sat, 12 Jul 2014 18:30:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6CIUZIl046892; Sat, 12 Jul 2014 18:30:35 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6CIUZ8P046891; Sat, 12 Jul 2014 18:30:35 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201407121830.s6CIUZ8P046891@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sat, 12 Jul 2014 18:30:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268573 - stable/9/lib/libc/locale X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2014 18:30:36 -0000 Author: pfg Date: Sat Jul 12 18:30:35 2014 New Revision: 268573 URL: http://svnweb.freebsd.org/changeset/base/268573 Log: MFC r268272: minor perf enhancement for UTF-8 Reduce some duplicate code. Reference: https://www.illumos.org/issues/628 Obtained from: Illumos Modified: stable/9/lib/libc/locale/utf8.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/locale/utf8.c ============================================================================== --- stable/9/lib/libc/locale/utf8.c Sat Jul 12 18:23:35 2014 (r268572) +++ stable/9/lib/libc/locale/utf8.c Sat Jul 12 18:30:35 2014 (r268573) @@ -1,4 +1,5 @@ /*- + * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2002-2004 Tim J. Robbins * All rights reserved. * @@ -112,13 +113,6 @@ _UTF8_mbrtowc(wchar_t * __restrict pwc, /* Incomplete multibyte sequence */ return ((size_t)-2); - if (us->want == 0 && ((ch = (unsigned char)*s) & ~0x7f) == 0) { - /* Fast path for plain ASCII characters. */ - if (pwc != NULL) - *pwc = ch; - return (ch != '\0' ? 1 : 0); - } - if (us->want == 0) { /* * Determine the number of octets that make up this character @@ -134,10 +128,12 @@ _UTF8_mbrtowc(wchar_t * __restrict pwc, */ ch = (unsigned char)*s; if ((ch & 0x80) == 0) { - mask = 0x7f; - want = 1; - lbound = 0; - } else if ((ch & 0xe0) == 0xc0) { + /* Fast path for plain ASCII characters. */ + if (pwc != NULL) + *pwc = ch; + return (ch != '\0' ? 1 : 0); + } + if ((ch & 0xe0) == 0xc0) { mask = 0x1f; want = 2; lbound = 0x80; @@ -309,12 +305,6 @@ _UTF8_wcrtomb(char * __restrict s, wchar /* Reset to initial shift state (no-op) */ return (1); - if ((wc & ~0x7f) == 0) { - /* Fast path for plain ASCII characters. */ - *s = (char)wc; - return (1); - } - /* * Determine the number of octets needed to represent this character. * We always output the shortest sequence possible. Also specify the @@ -322,8 +312,9 @@ _UTF8_wcrtomb(char * __restrict s, wchar * about the sequence length. */ if ((wc & ~0x7f) == 0) { - lead = 0; - len = 1; + /* Fast path for plain ASCII characters. */ + *s = (char)wc; + return (1); } else if ((wc & ~0x7ff) == 0) { lead = 0xc0; len = 2; From owner-svn-src-stable@FreeBSD.ORG Sat Jul 12 18:44:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06E727A9; Sat, 12 Jul 2014 18:44:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7E7C2A13; Sat, 12 Jul 2014 18:44:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6CIil8c053419; Sat, 12 Jul 2014 18:44:47 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6CIilKb053418; Sat, 12 Jul 2014 18:44:47 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201407121844.s6CIilKb053418@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sat, 12 Jul 2014 18:44:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268574 - stable/9/lib/libc/stdtime X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2014 18:44:48 -0000 Author: pfg Date: Sat Jul 12 18:44:47 2014 New Revision: 268574 URL: http://svnweb.freebsd.org/changeset/base/268574 Log: MFC r267627: strptime: add support for %t and %n Posix strptime() requires support for %t and %n, which were added to the illumos port. Curiously we were skipping white spaces by default in most other cases making %t meaningless. We now skip spaces in the case of the %e specifier as strftime(3) explicitly adds a space for the single digit case. Reference: http://pubs.opengroup.org/onlinepubs/009695399/functions/strptime.html PR: 173421 Obtained from: Illumos (Rev. a11c1571b6942161b0186d0588609448066892c2) Modified: stable/9/lib/libc/stdtime/strptime.c Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/stdtime/ (props changed) Modified: stable/9/lib/libc/stdtime/strptime.c ============================================================================== --- stable/9/lib/libc/stdtime/strptime.c Sat Jul 12 18:30:35 2014 (r268573) +++ stable/9/lib/libc/stdtime/strptime.c Sat Jul 12 18:44:47 2014 (r268574) @@ -1,4 +1,6 @@ /*- + * Copyright (c) 2014 Gary Mills + * Copyright 2011, Nexenta Systems, Inc. All rights reserved. * Copyright (c) 1994 Powerdog Industries. All rights reserved. * * Copyright (c) 2011 The FreeBSD Foundation @@ -224,11 +226,6 @@ label: tm->tm_sec = i; } - if (*buf != 0 && - isspace_l((unsigned char)*buf, locale)) - while (*ptr != 0 && - !isspace_l((unsigned char)*ptr, locale)) - ptr++; break; case 'H': @@ -261,11 +258,6 @@ label: tm->tm_hour = i; - if (*buf != 0 && - isspace_l((unsigned char)*buf, locale)) - while (*ptr != 0 && - !isspace_l((unsigned char)*ptr, locale)) - ptr++; break; case 'p': @@ -335,11 +327,6 @@ label: if (i > 53) return (NULL); - if (*buf != 0 && - isspace_l((unsigned char)*buf, locale)) - while (*ptr != 0 && - !isspace_l((unsigned char)*ptr, locale)) - ptr++; break; case 'w': @@ -352,18 +339,22 @@ label: tm->tm_wday = i; - if (*buf != 0 && - isspace_l((unsigned char)*buf, locale)) - while (*ptr != 0 && - !isspace_l((unsigned char)*ptr, locale)) - ptr++; break; - case 'd': case 'e': /* - * The %e specifier is explicitly documented as not - * being zero-padded but there is no harm in allowing + * With %e format, our strftime(3) adds a blank space + * before single digits. + */ + if (*buf != 0 && + isspace_l((unsigned char)*buf, locale)) + buf++; + /* FALLTHROUGH */ + case 'd': + /* + * The %e specifier was once explicitly documented as + * not being zero-padded but was later changed to + * equivalent to %d. There is no harm in allowing * such padding. * * XXX The %e specifier may gobble one too many @@ -384,11 +375,6 @@ label: tm->tm_mday = i; - if (*buf != 0 && - isspace_l((unsigned char)*buf, locale)) - while (*ptr != 0 && - !isspace_l((unsigned char)*ptr, locale)) - ptr++; break; case 'B': @@ -445,11 +431,6 @@ label: tm->tm_mon = i - 1; - if (*buf != 0 && - isspace_l((unsigned char)*buf, locale)) - while (*ptr != 0 && - !isspace_l((unsigned char)*ptr, locale)) - ptr++; break; case 's': @@ -498,11 +479,6 @@ label: tm->tm_year = i; - if (*buf != 0 && - isspace_l((unsigned char)*buf, locale)) - while (*ptr != 0 && - !isspace_l((unsigned char)*ptr, locale)) - ptr++; break; case 'Z': @@ -559,6 +535,12 @@ label: *GMTp = 1; } break; + + case 'n': + case 't': + while (isspace_l((unsigned char)*buf, locale)) + buf++; + break; } } return ((char *)buf); From owner-svn-src-stable@FreeBSD.ORG Sat Jul 12 22:56:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF03BAA9; Sat, 12 Jul 2014 22:56:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C66AC2BCF; Sat, 12 Jul 2014 22:56:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6CMuhPG071425; Sat, 12 Jul 2014 22:56:43 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6CMugR4071412; Sat, 12 Jul 2014 22:56:42 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201407122256.s6CMugR4071412@svn.freebsd.org> From: Rui Paulo Date: Sat, 12 Jul 2014 22:56:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268578 - in stable/10: cddl/contrib/opensolaris/cmd/dtrace cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json cddl/contri... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2014 22:56:44 -0000 Author: rpaulo Date: Sat Jul 12 22:56:41 2014 New Revision: 268578 URL: http://svnweb.freebsd.org/changeset/base/268578 Log: MFC 267929, 267937, 267939, 267940, 267941, 267942, 267987, 268006: 2915 DTrace in a zone should see "cpu", "curpsinfo", et al 2916 DTrace in a zone should be able to access fds[] 2917 DTrace in a zone should have limited provider access 4477 DTrace should speak JSON Add stubs for CTF functions which are not yet implemented. 4474 DTrace Userland CTF Support 4475 DTrace userland Keyword 4476 DTrace tests should be better citizens 4479 pid provider types 4480 dof emulation is missing checks 4471 DTrace count() with histogram 4472 DTrace full width distribution histograms 4473 DTrace frequency trails Added: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggencoding.d - copied unchanged from r267942, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggencoding.d stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggencoding.d.out - copied unchanged from r267942, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggencoding.d.out stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.agghist.d - copied unchanged from r267942, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.agghist.d stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.agghist.d.out - copied unchanged from r267942, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.agghist.d.out stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggpack.d - copied unchanged from r267942, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggpack.d stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggpack.d.out - copied unchanged from r267942, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggpack.d.out stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggpackbanner.ksh - copied unchanged from r267942, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggpackbanner.ksh stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggpackbanner.ksh.out - copied unchanged from r267942, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggpackbanner.ksh.out stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggpackzoom.d - copied unchanged from r267942, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggpackzoom.d stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggpackzoom.d.out - copied unchanged from r267942, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggpackzoom.d.out stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggzoom.d - copied unchanged from r267942, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggzoom.d stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggzoom.d.out - copied unchanged from r267942, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggzoom.d.out stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/ - copied from r267937, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/privs/tst.fds.ksh - copied unchanged from r267929, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/privs/tst.fds.ksh stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/privs/tst.getf.ksh - copied unchanged from r267929, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/privs/tst.getf.ksh stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/privs/tst.procpriv.ksh - copied unchanged from r267929, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/privs/tst.procpriv.ksh stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/privs/tst.providers.ksh - copied unchanged from r267929, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/privs/tst.providers.ksh stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/strtoll/ - copied from r267937, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/strtoll/ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/ - copied from r267941, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/ stable/10/cddl/contrib/opensolaris/common/util/ - copied from r267937, head/cddl/contrib/opensolaris/common/util/ Modified: stable/10/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.subr.d stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/privs/tst.func_access.ksh stable/10/cddl/contrib/opensolaris/common/ctf/ctf_open.c stable/10/cddl/contrib/opensolaris/common/ctf/ctf_types.c stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_as.c stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_decl.c stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_decl.h stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dis.c stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_error.c stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_grammar.y stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_ident.c stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.h stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_options.c stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.h stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pid.c stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pid.h stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_print.c stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_xlator.c stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dtrace.h stable/10/cddl/lib/libdtrace/libproc_compat.h stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/sdt_subr.c stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/ctf_api.h stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h stable/10/sys/cddl/dev/dtrace/dtrace_cddl.h stable/10/sys/modules/dtrace/dtrace/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c Sat Jul 12 22:27:21 2014 (r268577) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c Sat Jul 12 22:56:41 2014 (r268578) @@ -25,6 +25,7 @@ */ /* * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #include @@ -513,6 +514,7 @@ static void print_probe_info(const dtrace_probeinfo_t *p) { char buf[BUFSIZ]; + char *user; int i; oprintf("\n\tProbe Description Attributes\n"); @@ -536,10 +538,14 @@ print_probe_info(const dtrace_probeinfo_ oprintf("\n\tArgument Types\n"); for (i = 0; i < p->dtp_argc; i++) { + if (p->dtp_argv[i].dtt_flags & DTT_FL_USER) + user = "userland "; + else + user = ""; if (ctf_type_name(p->dtp_argv[i].dtt_ctfp, p->dtp_argv[i].dtt_type, buf, sizeof (buf)) == NULL) (void) strlcpy(buf, "(unknown)", sizeof (buf)); - oprintf("\t\targs[%d]: %s\n", i, buf); + oprintf("\t\targs[%d]: %s%s\n", i, user, buf); } if (p->dtp_argc == 0) Copied: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggencoding.d (from r267942, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggencoding.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggencoding.d Sat Jul 12 22:56:41 2014 (r268578, copy of r267942, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggencoding.d) @@ -0,0 +1,32 @@ +/* + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + */ + +/* + * Copyright (c) 2013 Joyent, Inc. All rights reserved. + */ + +#pragma D option quiet +#pragma D option encoding=utf8 +#pragma D option aggzoom + +tick-1ms +/i++ < 320/ +{ + @ = lquantize(i, 0, 640, 1, i); + @ = lquantize(641 - i, 0, 640, 1, i); +} + +tick-1ms +/i == 320/ +{ + printa(@); + exit(0); +} Copied: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggencoding.d.out (from r267942, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggencoding.d.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggencoding.d.out Sat Jul 12 22:56:41 2014 (r268578, copy of r267942, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggencoding.d.out) @@ -0,0 +1,646 @@ + + + value ------------- Distribution ------------- count + 0 | 0 + 1 | 1 + 2 |■2 + 3 |▎ 3 + 4 |■4 + 5 |▌ 5 + 6 |▋ 6 + 7 |▊ 7 + 8 |▉ 8 + 9 |█ 9 + 10 |█■10 + 11 |█▎ 11 + 12 |█■12 + 13 |█▌ 13 + 14 |█▋ 14 + 15 |█▊ 15 + 16 |█▉ 16 + 17 |██ 17 + 18 |██■18 + 19 |██▎ 19 + 20 |██■20 + 21 |██■21 + 22 |██▌ 22 + 23 |██▋ 23 + 24 |██▊ 24 + 25 |██▉ 25 + 26 |███ 26 + 27 |███■27 + 28 |███▎ 28 + 29 |███■29 + 30 |███▌ 30 + 31 |███▋ 31 + 32 |███▊ 32 + 33 |███▉ 33 + 34 |████ 34 + 35 |████■35 + 36 |████▎ 36 + 37 |████■37 + 38 |████▌ 38 + 39 |████▋ 39 + 40 |████▊ 40 + 41 |████▊ 41 + 42 |████▉ 42 + 43 |█████ 43 + 44 |█████■44 + 45 |█████▎ 45 + 46 |█████■46 + 47 |█████▌ 47 + 48 |█████▋ 48 + 49 |█████▊ 49 + 50 |█████▉ 50 + 51 |██████ 51 + 52 |██████■52 + 53 |██████▎ 53 + 54 |██████■54 + 55 |██████▌ 55 + 56 |██████▋ 56 + 57 |██████▊ 57 + 58 |██████▉ 58 + 59 |███████ 59 + 60 |███████■60 + 61 |███████■61 + 62 |███████▎ 62 + 63 |███████■63 + 64 |███████▌ 64 + 65 |███████▋ 65 + 66 |███████▊ 66 + 67 |███████▉ 67 + 68 |████████ 68 + 69 |████████■69 + 70 |████████▎ 70 + 71 |████████■71 + 72 |████████▌ 72 + 73 |████████▋ 73 + 74 |████████▊ 74 + 75 |████████▉ 75 + 76 |█████████ 76 + 77 |█████████■77 + 78 |█████████▎ 78 + 79 |█████████■79 + 80 |█████████▌ 80 + 81 |█████████▌ 81 + 82 |█████████▋ 82 + 83 |█████████▊ 83 + 84 |█████████▉ 84 + 85 |██████████ 85 + 86 |██████████■86 + 87 |██████████▎ 87 + 88 |██████████■88 + 89 |██████████▌ 89 + 90 |██████████▋ 90 + 91 |██████████▊ 91 + 92 |██████████▉ 92 + 93 |███████████ 93 + 94 |███████████■94 + 95 |███████████▎ 95 + 96 |███████████■96 + 97 |███████████▌ 97 + 98 |███████████▋ 98 + 99 |███████████▊ 99 + 100 |███████████▉ 100 + 101 |███████████▉ 101 + 102 |████████████ 102 + 103 |████████████■103 + 104 |████████████▎ 104 + 105 |████████████■105 + 106 |████████████▌ 106 + 107 |████████████▋ 107 + 108 |████████████▊ 108 + 109 |████████████▉ 109 + 110 |█████████████ 110 + 111 |█████████████■111 + 112 |█████████████▎ 112 + 113 |█████████████■113 + 114 |█████████████▌ 114 + 115 |█████████████▋ 115 + 116 |█████████████▊ 116 + 117 |█████████████▉ 117 + 118 |██████████████ 118 + 119 |██████████████■119 + 120 |██████████████▎ 120 + 121 |██████████████▎ 121 + 122 |██████████████■122 + 123 |██████████████▌ 123 + 124 |██████████████▋ 124 + 125 |██████████████▊ 125 + 126 |██████████████▉ 126 + 127 |███████████████ 127 + 128 |███████████████■128 + 129 |███████████████▎ 129 + 130 |███████████████■130 + 131 |███████████████▌ 131 + 132 |███████████████▋ 132 + 133 |███████████████▊ 133 + 134 |███████████████▉ 134 + 135 |████████████████ 135 + 136 |████████████████■136 + 137 |████████████████▎ 137 + 138 |████████████████■138 + 139 |████████████████▌ 139 + 140 |████████████████▋ 140 + 141 |████████████████▋ 141 + 142 |████████████████▊ 142 + 143 |████████████████▉ 143 + 144 |█████████████████ 144 + 145 |█████████████████■145 + 146 |█████████████████▎ 146 + 147 |█████████████████■147 + 148 |█████████████████▌ 148 + 149 |█████████████████▋ 149 + 150 |█████████████████▊ 150 + 151 |█████████████████▉ 151 + 152 |██████████████████ 152 + 153 |██████████████████■153 + 154 |██████████████████▎ 154 + 155 |██████████████████■155 + 156 |██████████████████▌ 156 + 157 |██████████████████▋ 157 + 158 |██████████████████▊ 158 + 159 |██████████████████▉ 159 + 160 |███████████████████ 160 + 161 |███████████████████ 161 + 162 |███████████████████■162 + 163 |███████████████████▎ 163 + 164 |███████████████████■164 + 165 |███████████████████▌ 165 + 166 |███████████████████▋ 166 + 167 |███████████████████▊ 167 + 168 |███████████████████▉ 168 + 169 |████████████████████ 169 + 170 |████████████████████■170 + 171 |████████████████████▎ 171 + 172 |████████████████████■172 + 173 |████████████████████▌ 173 + 174 |████████████████████▋ 174 + 175 |████████████████████▊ 175 + 176 |████████████████████▉ 176 + 177 |█████████████████████ 177 + 178 |█████████████████████■178 + 179 |█████████████████████▎ 179 + 180 |█████████████████████■180 + 181 |█████████████████████■181 + 182 |█████████████████████▌ 182 + 183 |█████████████████████▋ 183 + 184 |█████████████████████▊ 184 + 185 |█████████████████████▉ 185 + 186 |██████████████████████ 186 + 187 |██████████████████████■187 + 188 |██████████████████████▎ 188 + 189 |██████████████████████■189 + 190 |██████████████████████▌ 190 + 191 |██████████████████████▋ 191 + 192 |██████████████████████▊ 192 + 193 |██████████████████████▉ 193 + 194 |███████████████████████ 194 + 195 |███████████████████████■195 + 196 |███████████████████████▎ 196 + 197 |███████████████████████■197 + 198 |███████████████████████▌ 198 + 199 |███████████████████████▋ 199 + 200 |███████████████████████▊ 200 + 201 |███████████████████████▊ 201 + 202 |███████████████████████▉ 202 + 203 |████████████████████████ 203 + 204 |████████████████████████■204 + 205 |████████████████████████▎ 205 + 206 |████████████████████████■206 + 207 |████████████████████████▌ 207 + 208 |████████████████████████▋ 208 + 209 |████████████████████████▊ 209 + 210 |████████████████████████▉ 210 + 211 |█████████████████████████ 211 + 212 |█████████████████████████■212 + 213 |█████████████████████████▎ 213 + 214 |█████████████████████████■214 + 215 |█████████████████████████▌ 215 + 216 |█████████████████████████▋ 216 + 217 |█████████████████████████▊ 217 + 218 |█████████████████████████▉ 218 + 219 |██████████████████████████ 219 + 220 |██████████████████████████■220 + 221 |██████████████████████████■221 + 222 |██████████████████████████▎ 222 + 223 |██████████████████████████■223 + 224 |██████████████████████████▌ 224 + 225 |██████████████████████████▋ 225 + 226 |██████████████████████████▊ 226 + 227 |██████████████████████████▉ 227 + 228 |███████████████████████████ 228 + 229 |███████████████████████████■229 + 230 |███████████████████████████▎ 230 + 231 |███████████████████████████■231 + 232 |███████████████████████████▌ 232 + 233 |███████████████████████████▋ 233 + 234 |███████████████████████████▊ 234 + 235 |███████████████████████████▉ 235 + 236 |████████████████████████████ 236 + 237 |████████████████████████████■237 + 238 |████████████████████████████▎ 238 + 239 |████████████████████████████■239 + 240 |████████████████████████████▌ 240 + 241 |████████████████████████████▌ 241 + 242 |████████████████████████████▋ 242 + 243 |████████████████████████████▊ 243 + 244 |████████████████████████████▉ 244 + 245 |█████████████████████████████ 245 + 246 |█████████████████████████████■246 + 247 |█████████████████████████████▎ 247 + 248 |█████████████████████████████■248 + 249 |█████████████████████████████▌ 249 + 250 |█████████████████████████████▋ 250 + 251 |█████████████████████████████▊ 251 + 252 |█████████████████████████████▉ 252 + 253 |██████████████████████████████ 253 + 254 |██████████████████████████████■254 + 255 |██████████████████████████████▎ 255 + 256 |██████████████████████████████■256 + 257 |██████████████████████████████▌ 257 + 258 |██████████████████████████████▋ 258 + 259 |██████████████████████████████▊ 259 + 260 |██████████████████████████████▉ 260 + 261 |██████████████████████████████▉ 261 + 262 |███████████████████████████████ 262 + 263 |███████████████████████████████■263 + 264 |███████████████████████████████▎ 264 + 265 |███████████████████████████████■265 + 266 |███████████████████████████████▌ 266 + 267 |███████████████████████████████▋ 267 + 268 |███████████████████████████████▊ 268 + 269 |███████████████████████████████▉ 269 + 270 |████████████████████████████████ 270 + 271 |████████████████████████████████■271 + 272 |████████████████████████████████▎ 272 + 273 |████████████████████████████████■273 + 274 |████████████████████████████████▌ 274 + 275 |████████████████████████████████▋ 275 + 276 |████████████████████████████████▊ 276 + 277 |████████████████████████████████▉ 277 + 278 |█████████████████████████████████ 278 + 279 |█████████████████████████████████■279 + 280 |█████████████████████████████████▎ 280 + 281 |█████████████████████████████████▎ 281 + 282 |█████████████████████████████████■282 + 283 |█████████████████████████████████▌ 283 + 284 |█████████████████████████████████▋ 284 + 285 |█████████████████████████████████▊ 285 + 286 |█████████████████████████████████▉ 286 + 287 |██████████████████████████████████ 287 + 288 |██████████████████████████████████■288 + 289 |██████████████████████████████████▎ 289 + 290 |██████████████████████████████████■290 + 291 |██████████████████████████████████▌ 291 + 292 |██████████████████████████████████▋ 292 + 293 |██████████████████████████████████▊ 293 + 294 |██████████████████████████████████▉ 294 + 295 |███████████████████████████████████ 295 + 296 |███████████████████████████████████■296 + 297 |███████████████████████████████████▎ 297 + 298 |███████████████████████████████████■298 + 299 |███████████████████████████████████▌ 299 + 300 |███████████████████████████████████▋ 300 + 301 |███████████████████████████████████▋ 301 + 302 |███████████████████████████████████▊ 302 + 303 |███████████████████████████████████▉ 303 + 304 |████████████████████████████████████ 304 + 305 |████████████████████████████████████■305 + 306 |████████████████████████████████████▎ 306 + 307 |████████████████████████████████████■307 + 308 |████████████████████████████████████▌ 308 + 309 |████████████████████████████████████▋ 309 + 310 |████████████████████████████████████▊ 310 + 311 |████████████████████████████████████▉ 311 + 312 |█████████████████████████████████████ 312 + 313 |█████████████████████████████████████■313 + 314 |█████████████████████████████████████▎ 314 + 315 |█████████████████████████████████████■315 + 316 |█████████████████████████████████████▌ 316 + 317 |█████████████████████████████████████▋ 317 + 318 |█████████████████████████████████████▊ 318 + 319 |█████████████████████████████████████▉ 319 + 320 |██████████████████████████████████████ 320 + 321 |██████████████████████████████████████ 320 + 322 |█████████████████████████████████████▉ 319 + 323 |█████████████████████████████████████▊ 318 + 324 |█████████████████████████████████████▋ 317 + 325 |█████████████████████████████████████▌ 316 + 326 |█████████████████████████████████████■315 + 327 |█████████████████████████████████████▎ 314 + 328 |█████████████████████████████████████■313 + 329 |█████████████████████████████████████ 312 + 330 |████████████████████████████████████▉ 311 + 331 |████████████████████████████████████▊ 310 + 332 |████████████████████████████████████▋ 309 + 333 |████████████████████████████████████▌ 308 + 334 |████████████████████████████████████■307 + 335 |████████████████████████████████████▎ 306 + 336 |████████████████████████████████████■305 + 337 |████████████████████████████████████ 304 + 338 |███████████████████████████████████▉ 303 + 339 |███████████████████████████████████▊ 302 + 340 |███████████████████████████████████▋ 301 + 341 |███████████████████████████████████▋ 300 + 342 |███████████████████████████████████▌ 299 + 343 |███████████████████████████████████■298 + 344 |███████████████████████████████████▎ 297 + 345 |███████████████████████████████████■296 + 346 |███████████████████████████████████ 295 + 347 |██████████████████████████████████▉ 294 + 348 |██████████████████████████████████▊ 293 + 349 |██████████████████████████████████▋ 292 + 350 |██████████████████████████████████▌ 291 + 351 |██████████████████████████████████■290 + 352 |██████████████████████████████████▎ 289 + 353 |██████████████████████████████████■288 + 354 |██████████████████████████████████ 287 + 355 |█████████████████████████████████▉ 286 + 356 |█████████████████████████████████▊ 285 + 357 |█████████████████████████████████▋ 284 + 358 |█████████████████████████████████▌ 283 + 359 |█████████████████████████████████■282 + 360 |█████████████████████████████████▎ 281 + 361 |█████████████████████████████████▎ 280 + 362 |█████████████████████████████████■279 + 363 |█████████████████████████████████ 278 + 364 |████████████████████████████████▉ 277 + 365 |████████████████████████████████▊ 276 + 366 |████████████████████████████████▋ 275 + 367 |████████████████████████████████▌ 274 + 368 |████████████████████████████████■273 + 369 |████████████████████████████████▎ 272 + 370 |████████████████████████████████■271 + 371 |████████████████████████████████ 270 + 372 |███████████████████████████████▉ 269 + 373 |███████████████████████████████▊ 268 + 374 |███████████████████████████████▋ 267 + 375 |███████████████████████████████▌ 266 + 376 |███████████████████████████████■265 + 377 |███████████████████████████████▎ 264 + 378 |███████████████████████████████■263 + 379 |███████████████████████████████ 262 + 380 |██████████████████████████████▉ 261 + 381 |██████████████████████████████▉ 260 + 382 |██████████████████████████████▊ 259 + 383 |██████████████████████████████▋ 258 + 384 |██████████████████████████████▌ 257 + 385 |██████████████████████████████■256 + 386 |██████████████████████████████▎ 255 + 387 |██████████████████████████████■254 + 388 |██████████████████████████████ 253 + 389 |█████████████████████████████▉ 252 + 390 |█████████████████████████████▊ 251 + 391 |█████████████████████████████▋ 250 + 392 |█████████████████████████████▌ 249 + 393 |█████████████████████████████■248 + 394 |█████████████████████████████▎ 247 + 395 |█████████████████████████████■246 + 396 |█████████████████████████████ 245 + 397 |████████████████████████████▉ 244 + 398 |████████████████████████████▊ 243 + 399 |████████████████████████████▋ 242 + 400 |████████████████████████████▌ 241 + 401 |████████████████████████████▌ 240 + 402 |████████████████████████████■239 + 403 |████████████████████████████▎ 238 + 404 |████████████████████████████■237 + 405 |████████████████████████████ 236 + 406 |███████████████████████████▉ 235 + 407 |███████████████████████████▊ 234 + 408 |███████████████████████████▋ 233 + 409 |███████████████████████████▌ 232 + 410 |███████████████████████████■231 + 411 |███████████████████████████▎ 230 + 412 |███████████████████████████■229 + 413 |███████████████████████████ 228 + 414 |██████████████████████████▉ 227 + 415 |██████████████████████████▊ 226 + 416 |██████████████████████████▋ 225 + 417 |██████████████████████████▌ 224 + 418 |██████████████████████████■223 + 419 |██████████████████████████▎ 222 + 420 |██████████████████████████■221 + 421 |██████████████████████████■220 + 422 |██████████████████████████ 219 + 423 |█████████████████████████▉ 218 + 424 |█████████████████████████▊ 217 + 425 |█████████████████████████▋ 216 + 426 |█████████████████████████▌ 215 + 427 |█████████████████████████■214 + 428 |█████████████████████████▎ 213 + 429 |█████████████████████████■212 + 430 |█████████████████████████ 211 + 431 |████████████████████████▉ 210 + 432 |████████████████████████▊ 209 + 433 |████████████████████████▋ 208 + 434 |████████████████████████▌ 207 + 435 |████████████████████████■206 + 436 |████████████████████████▎ 205 + 437 |████████████████████████■204 + 438 |████████████████████████ 203 + 439 |███████████████████████▉ 202 + 440 |███████████████████████▊ 201 + 441 |███████████████████████▊ 200 + 442 |███████████████████████▋ 199 + 443 |███████████████████████▌ 198 + 444 |███████████████████████■197 + 445 |███████████████████████▎ 196 + 446 |███████████████████████■195 + 447 |███████████████████████ 194 + 448 |██████████████████████▉ 193 + 449 |██████████████████████▊ 192 + 450 |██████████████████████▋ 191 + 451 |██████████████████████▌ 190 + 452 |██████████████████████■189 + 453 |██████████████████████▎ 188 + 454 |██████████████████████■187 + 455 |██████████████████████ 186 + 456 |█████████████████████▉ 185 + 457 |█████████████████████▊ 184 + 458 |█████████████████████▋ 183 + 459 |█████████████████████▌ 182 + 460 |█████████████████████■181 + 461 |█████████████████████■180 + 462 |█████████████████████▎ 179 + 463 |█████████████████████■178 + 464 |█████████████████████ 177 + 465 |████████████████████▉ 176 + 466 |████████████████████▊ 175 + 467 |████████████████████▋ 174 + 468 |████████████████████▌ 173 + 469 |████████████████████■172 + 470 |████████████████████▎ 171 + 471 |████████████████████■170 + 472 |████████████████████ 169 + 473 |███████████████████▉ 168 + 474 |███████████████████▊ 167 + 475 |███████████████████▋ 166 + 476 |███████████████████▌ 165 + 477 |███████████████████■164 + 478 |███████████████████▎ 163 + 479 |███████████████████■162 + 480 |███████████████████ 161 + 481 |███████████████████ 160 + 482 |██████████████████▉ 159 + 483 |██████████████████▊ 158 + 484 |██████████████████▋ 157 + 485 |██████████████████▌ 156 + 486 |██████████████████■155 + 487 |██████████████████▎ 154 + 488 |██████████████████■153 + 489 |██████████████████ 152 + 490 |█████████████████▉ 151 + 491 |█████████████████▊ 150 + 492 |█████████████████▋ 149 + 493 |█████████████████▌ 148 + 494 |█████████████████■147 + 495 |█████████████████▎ 146 + 496 |█████████████████■145 + 497 |█████████████████ 144 + 498 |████████████████▉ 143 + 499 |████████████████▊ 142 + 500 |████████████████▋ 141 + 501 |████████████████▋ 140 + 502 |████████████████▌ 139 + 503 |████████████████■138 + 504 |████████████████▎ 137 + 505 |████████████████■136 + 506 |████████████████ 135 + 507 |███████████████▉ 134 + 508 |███████████████▊ 133 + 509 |███████████████▋ 132 + 510 |███████████████▌ 131 + 511 |███████████████■130 + 512 |███████████████▎ 129 + 513 |███████████████■128 + 514 |███████████████ 127 + 515 |██████████████▉ 126 + 516 |██████████████▊ 125 + 517 |██████████████▋ 124 + 518 |██████████████▌ 123 + 519 |██████████████■122 + 520 |██████████████▎ 121 + 521 |██████████████▎ 120 + 522 |██████████████■119 + 523 |██████████████ 118 + 524 |█████████████▉ 117 + 525 |█████████████▊ 116 + 526 |█████████████▋ 115 + 527 |█████████████▌ 114 + 528 |█████████████■113 + 529 |█████████████▎ 112 + 530 |█████████████■111 + 531 |█████████████ 110 + 532 |████████████▉ 109 + 533 |████████████▊ 108 + 534 |████████████▋ 107 + 535 |████████████▌ 106 + 536 |████████████■105 + 537 |████████████▎ 104 + 538 |████████████■103 + 539 |████████████ 102 + 540 |███████████▉ 101 + 541 |███████████▉ 100 + 542 |███████████▊ 99 + 543 |███████████▋ 98 + 544 |███████████▌ 97 + 545 |███████████■96 + 546 |███████████▎ 95 + 547 |███████████■94 + 548 |███████████ 93 + 549 |██████████▉ 92 + 550 |██████████▊ 91 + 551 |██████████▋ 90 + 552 |██████████▌ 89 + 553 |██████████■88 + 554 |██████████▎ 87 + 555 |██████████■86 + 556 |██████████ 85 + 557 |█████████▉ 84 + 558 |█████████▊ 83 + 559 |█████████▋ 82 + 560 |█████████▌ 81 + 561 |█████████▌ 80 + 562 |█████████■79 + 563 |█████████▎ 78 + 564 |█████████■77 + 565 |█████████ 76 + 566 |████████▉ 75 + 567 |████████▊ 74 + 568 |████████▋ 73 + 569 |████████▌ 72 + 570 |████████■71 + 571 |████████▎ 70 + 572 |████████■69 + 573 |████████ 68 + 574 |███████▉ 67 + 575 |███████▊ 66 + 576 |███████▋ 65 + 577 |███████▌ 64 + 578 |███████■63 + 579 |███████▎ 62 + 580 |███████■61 + 581 |███████■60 + 582 |███████ 59 + 583 |██████▉ 58 + 584 |██████▊ 57 + 585 |██████▋ 56 + 586 |██████▌ 55 + 587 |██████■54 + 588 |██████▎ 53 + 589 |██████■52 + 590 |██████ 51 + 591 |█████▉ 50 + 592 |█████▊ 49 + 593 |█████▋ 48 + 594 |█████▌ 47 + 595 |█████■46 + 596 |█████▎ 45 + 597 |█████■44 + 598 |█████ 43 + 599 |████▉ 42 + 600 |████▊ 41 + 601 |████▊ 40 + 602 |████▋ 39 + 603 |████▌ 38 + 604 |████■37 + 605 |████▎ 36 + 606 |████■35 + 607 |████ 34 + 608 |███▉ 33 + 609 |███▊ 32 + 610 |███▋ 31 + 611 |███▌ 30 + 612 |███■29 + 613 |███▎ 28 + 614 |███■27 + 615 |███ 26 + 616 |██▉ 25 + 617 |██▊ 24 + 618 |██▋ 23 + 619 |██▌ 22 + 620 |██■21 + 621 |██■20 + 622 |██▎ 19 + 623 |██■18 + 624 |██ 17 + 625 |█▉ 16 + 626 |█▊ 15 + 627 |█▋ 14 + 628 |█▌ 13 + 629 |█■12 + 630 |█▎ 11 + 631 |█■10 + 632 |█ 9 + 633 |▉ 8 + 634 |▊ 7 + 635 |▋ 6 + 636 |▌ 5 + 637 |■4 + 638 |▎ 3 + 639 |■2 + >= 640 | 1 + + Copied: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.agghist.d (from r267942, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.agghist.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.agghist.d Sat Jul 12 22:56:41 2014 (r268578, copy of r267942, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.agghist.d) @@ -0,0 +1,46 @@ +/* + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + */ + +/* + * Copyright (c) 2013 Joyent, Inc. All rights reserved. + */ + +#pragma D option agghist +#pragma D option quiet + +BEGIN +{ + @["demerit"] = sum(-10); + @["wtf"] = sum(10); + @["bot"] = sum(20); + + @bagnoogle["SOAP/XML"] = sum(1); + @bagnoogle["XACML store"] = sum(5); + @bagnoogle["SAML token"] = sum(6); + + @stalloogle["breakfast"] = sum(-5); + @stalloogle["non-diet pepsi"] = sum(-20); + @stalloogle["parrot"] = sum(-100); + + printa(@); + printa(@bagnoogle); + printa(@stalloogle); + + printf("\nzoomed:"); + + setopt("aggzoom"); + printa(@); + printa(@bagnoogle); + printa(@stalloogle); + + exit(0); +} + Copied: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.agghist.d.out (from r267942, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.agghist.d.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.agghist.d.out Sat Jul 12 22:56:41 2014 (r268578, copy of r267942, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.agghist.d.out) @@ -0,0 +1,38 @@ + + + key ------------- Distribution ------------- count + demerit @@@@@| -10 + wtf |@@@@@ 10 + bot |@@@@@@@@@@ 20 + + + key ------------- Distribution ------------- count + SOAP/XML |@@@ 1 + XACML store |@@@@@@@@@@@@@@@@@ 5 + SAML token |@@@@@@@@@@@@@@@@@@@@ 6 + + + key ------------- Distribution ------------- count + parrot @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -100 + non-diet pepsi @@@@@@| -20 + breakfast @@| -5 + +zoomed: + + key ------------- Distribution ------------- count + demerit @@@@@@@@@@| -10 + wtf |@@@@@@@@@@ 10 + bot |@@@@@@@@@@@@@@@@@@@ 20 + + + key ------------- Distribution ------------- count + SOAP/XML |@@@@@@@ 1 + XACML store |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 5 + SAML token |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 6 + + + key ------------- Distribution ------------- count + parrot @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -100 + non-diet pepsi @@@@@@@@| -20 + breakfast @@| -5 + Copied: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggpack.d (from r267942, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggpack.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggpack.d Sat Jul 12 22:56:41 2014 (r268578, copy of r267942, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggpack.d) @@ -0,0 +1,53 @@ +/* + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + */ + +/* + * Copyright (c) 2013 Joyent, Inc. All rights reserved. + */ + +#pragma D option aggpack +#pragma D option encoding=ascii +#pragma D option quiet + +BEGIN +{ + @x = quantize(1 << 32); + @y[1] = quantize(1); + @z["mumble"] = quantize(1); + @xx["foo", (char)1, (short)2, (long)3] = quantize(1); + + @neg = lquantize(-10, -10, 20, 1, -1); + @neg = lquantize(-5, -10, 20, 1, 1); + @neg = lquantize(0, -10, 20, 1, 1); + + i = 0; +} + +tick-1ms +{ + @a[i] = quantize(0, i); + @a[i] = quantize(1, 100 - i); + i++; +} + +tick-1ms +/i > 100/ +{ + exit(0); +} + +END +{ + setopt("aggzoom", "true"); + printa(@neg); + setopt("aggzoom", "false"); + printa(@neg); +} Copied: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggpack.d.out (from r267942, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggpack.d.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggpack.d.out Sat Jul 12 22:56:41 2014 (r268578, copy of r267942, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggpack.d.out) @@ -0,0 +1,124 @@ + + + min .--------------------------------. max | count + < -10 : V X X : >= 20 | 1 + + + min .--------------------------------. max | count + < -10 : v x x : >= 20 | 1 + + + min .---. max | count + 2147483648 : X : 8589934592 | 1 + + key min .---. max | count + 1 0 : X : 2 | 1 + + key min .---. max | count + mumble 0 : X : 2 | 1 + + key min .---. max | count + foo 1 2 3 0 : X : 2 | 1 + + key min .---. max | count + 100 0 :X : 2 | 100 + 99 0 :X_ : 2 | 100 + 98 0 :X_ : 2 | 100 + 97 0 :X_ : 2 | 100 + 96 0 :X_ : 2 | 100 + 95 0 :X_ : 2 | 100 + 94 0 :X_ : 2 | 100 + 93 0 :X_ : 2 | 100 + 92 0 :X_ : 2 | 100 + 91 0 :X_ : 2 | 100 + 90 0 :X_ : 2 | 100 + 89 0 :X_ : 2 | 100 + 88 0 :X_ : 2 | 100 + 87 0 :X_ : 2 | 100 + 86 0 :X_ : 2 | 100 + 85 0 :X_ : 2 | 100 + 84 0 :X_ : 2 | 100 + 83 0 :X_ : 2 | 100 + 82 0 :X_ : 2 | 100 + 81 0 :X_ : 2 | 100 + 80 0 :X_ : 2 | 100 + 79 0 :X_ : 2 | 100 + 78 0 :xx : 2 | 100 + 77 0 :xx : 2 | 100 + 76 0 :xx : 2 | 100 + 75 0 :xx : 2 | 100 + 74 0 :xx : 2 | 100 + 73 0 :xx : 2 | 100 + 72 0 :xx : 2 | 100 + 71 0 :xx : 2 | 100 + 70 0 :xx : 2 | 100 + 69 0 :xx : 2 | 100 + 68 0 :xx : 2 | 100 + 67 0 :xx : 2 | 100 + 66 0 :xx : 2 | 100 + 65 0 :xx : 2 | 100 + 64 0 :xx : 2 | 100 + 63 0 :xx : 2 | 100 + 62 0 :xx : 2 | 100 + 61 0 :xx : 2 | 100 + 60 0 :xx : 2 | 100 + 59 0 :xx : 2 | 100 + 58 0 :xx : 2 | 100 + 57 0 :xx : 2 | 100 + 56 0 :xx : 2 | 100 + 55 0 :xx : 2 | 100 + 54 0 :xx : 2 | 100 + 53 0 :xx : 2 | 100 + 52 0 :xx : 2 | 100 + 51 0 :xx : 2 | 100 + 50 0 :xx : 2 | 100 + 49 0 :xx : 2 | 100 + 48 0 :xx : 2 | 100 + 47 0 :xx : 2 | 100 + 46 0 :xx : 2 | 100 + 45 0 :xx : 2 | 100 + 44 0 :xx : 2 | 100 + 43 0 :xx : 2 | 100 + 42 0 :xx : 2 | 100 + 41 0 :xx : 2 | 100 + 40 0 :xx : 2 | 100 + 39 0 :xx : 2 | 100 + 38 0 :xx : 2 | 100 + 37 0 :xx : 2 | 100 + 36 0 :xx : 2 | 100 + 35 0 :xx : 2 | 100 + 34 0 :xx : 2 | 100 + 33 0 :xx : 2 | 100 + 32 0 :xx : 2 | 100 + 31 0 :xx : 2 | 100 + 30 0 :xx : 2 | 100 + 29 0 :xx : 2 | 100 + 28 0 :xx : 2 | 100 + 27 0 :xx : 2 | 100 + 26 0 :xx : 2 | 100 + 25 0 :xx : 2 | 100 + 24 0 :xx : 2 | 100 + 23 0 :xx : 2 | 100 + 22 0 :xx : 2 | 100 + 21 0 :_X : 2 | 100 + 20 0 :_X : 2 | 100 + 19 0 :_X : 2 | 100 + 18 0 :_X : 2 | 100 + 17 0 :_X : 2 | 100 + 16 0 :_X : 2 | 100 + 15 0 :_X : 2 | 100 + 14 0 :_X : 2 | 100 + 13 0 :_X : 2 | 100 + 12 0 :_X : 2 | 100 + 11 0 :_X : 2 | 100 + 10 0 :_X : 2 | 100 + 9 0 :_X : 2 | 100 + 8 0 :_X : 2 | 100 + 7 0 :_X : 2 | 100 + 6 0 :_X : 2 | 100 + 5 0 :_X : 2 | 100 + 4 0 :_X : 2 | 100 + 3 0 :_X : 2 | 100 + 2 0 :_X : 2 | 100 + 1 0 :_X : 2 | 100 + 0 0 : X : 2 | 100 Copied: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggpackbanner.ksh (from r267942, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggpackbanner.ksh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggpackbanner.ksh Sat Jul 12 22:56:41 2014 (r268578, copy of r267942, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.aggpackbanner.ksh) @@ -0,0 +1,75 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat Jul 12 23:27:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35821EE6; Sat, 12 Jul 2014 23:27:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 081492DC0; Sat, 12 Jul 2014 23:27:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6CNRcVB086052; Sat, 12 Jul 2014 23:27:38 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6CNRcqi086051; Sat, 12 Jul 2014 23:27:38 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201407122327.s6CNRcqi086051@svn.freebsd.org> From: Rick Macklem Date: Sat, 12 Jul 2014 23:27:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268579 - stable/9/sys/fs/nfsclient X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2014 23:27:39 -0000 Author: rmacklem Date: Sat Jul 12 23:27:38 2014 New Revision: 268579 URL: http://svnweb.freebsd.org/changeset/base/268579 Log: MFC: r268008 There might be a potential race condition for the NFSv4 client when a newly created file has another open done on it that update the open mode. This patch moves the code that updates the open mode up into the block where the mutex is held to ensure this cannot happen. No bug caused by this potential race has been observed, but this fix is a safety belt to ensure it cannot happen. Modified: stable/9/sys/fs/nfsclient/nfs_clstate.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- stable/9/sys/fs/nfsclient/nfs_clstate.c Sat Jul 12 22:56:41 2014 (r268578) +++ stable/9/sys/fs/nfsclient/nfs_clstate.c Sat Jul 12 23:27:38 2014 (r268579) @@ -261,6 +261,23 @@ nfscl_open(vnode_t vp, u_int8_t *nfhp, i newonep); /* + * Now, check the mode on the open and return the appropriate + * value. + */ + if (retp != NULL) { + if (nfhp != NULL && dp != NULL && nop == NULL) + /* new local open on delegation */ + *retp = NFSCLOPEN_SETCRED; + else + *retp = NFSCLOPEN_OK; + } + if (op != NULL && (amode & ~(op->nfso_mode))) { + op->nfso_mode |= amode; + if (retp != NULL && dp == NULL) + *retp = NFSCLOPEN_DOOPEN; + } + + /* * Serialize modifications to the open owner for multiple threads * within the same process using a read/write sleep lock. */ @@ -275,23 +292,6 @@ nfscl_open(vnode_t vp, u_int8_t *nfhp, i *owpp = owp; if (opp != NULL) *opp = op; - if (retp != NULL) { - if (nfhp != NULL && dp != NULL && nop == NULL) - /* new local open on delegation */ - *retp = NFSCLOPEN_SETCRED; - else - *retp = NFSCLOPEN_OK; - } - - /* - * Now, check the mode on the open and return the appropriate - * value. - */ - if (op != NULL && (amode & ~(op->nfso_mode))) { - op->nfso_mode |= amode; - if (retp != NULL && dp == NULL) - *retp = NFSCLOPEN_DOOPEN; - } return (0); } From owner-svn-src-stable@FreeBSD.ORG Sun Jul 13 00:19:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B2F6433; Sun, 13 Jul 2014 00:19:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D248D20EA; Sun, 13 Jul 2014 00:19:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6D0JdG4011076; Sun, 13 Jul 2014 00:19:39 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6D0JdbU011075; Sun, 13 Jul 2014 00:19:39 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201407130019.s6D0JdbU011075@svn.freebsd.org> From: Rick Macklem Date: Sun, 13 Jul 2014 00:19:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268580 - stable/10/sys/fs/nfsclient X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jul 2014 00:19:40 -0000 Author: rmacklem Date: Sun Jul 13 00:19:39 2014 New Revision: 268580 URL: http://svnweb.freebsd.org/changeset/base/268580 Log: MFC: r268008 There might be a potential race condition for the NFSv4 client when a newly created file has another open done on it that update the open mode. This patch moves the code that updates the open mode up into the block where the mutex is held to ensure this cannot happen. No bug caused by this potential race has been observed, but this fix is a safety belt to ensure it cannot happen. Modified: stable/10/sys/fs/nfsclient/nfs_clstate.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clstate.c Sat Jul 12 23:27:38 2014 (r268579) +++ stable/10/sys/fs/nfsclient/nfs_clstate.c Sun Jul 13 00:19:39 2014 (r268580) @@ -281,6 +281,23 @@ nfscl_open(vnode_t vp, u_int8_t *nfhp, i newonep); /* + * Now, check the mode on the open and return the appropriate + * value. + */ + if (retp != NULL) { + if (nfhp != NULL && dp != NULL && nop == NULL) + /* new local open on delegation */ + *retp = NFSCLOPEN_SETCRED; + else + *retp = NFSCLOPEN_OK; + } + if (op != NULL && (amode & ~(op->nfso_mode))) { + op->nfso_mode |= amode; + if (retp != NULL && dp == NULL) + *retp = NFSCLOPEN_DOOPEN; + } + + /* * Serialize modifications to the open owner for multiple threads * within the same process using a read/write sleep lock. */ @@ -295,23 +312,6 @@ nfscl_open(vnode_t vp, u_int8_t *nfhp, i *owpp = owp; if (opp != NULL) *opp = op; - if (retp != NULL) { - if (nfhp != NULL && dp != NULL && nop == NULL) - /* new local open on delegation */ - *retp = NFSCLOPEN_SETCRED; - else - *retp = NFSCLOPEN_OK; - } - - /* - * Now, check the mode on the open and return the appropriate - * value. - */ - if (op != NULL && (amode & ~(op->nfso_mode))) { - op->nfso_mode |= amode; - if (retp != NULL && dp == NULL) - *retp = NFSCLOPEN_DOOPEN; - } return (0); } From owner-svn-src-stable@FreeBSD.ORG Sun Jul 13 15:13:25 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC1DBE4A; Sun, 13 Jul 2014 15:13:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A95502E47; Sun, 13 Jul 2014 15:13:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6DFDP72025627; Sun, 13 Jul 2014 15:13:25 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6DFDPkb025626; Sun, 13 Jul 2014 15:13:25 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201407131513.s6DFDPkb025626@svn.freebsd.org> From: Kevin Lo Date: Sun, 13 Jul 2014 15:13:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268586 - stable/10/sys/dev/usb/wlan X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jul 2014 15:13:25 -0000 Author: kevlo Date: Sun Jul 13 15:13:25 2014 New Revision: 268586 URL: http://svnweb.freebsd.org/changeset/base/268586 Log: MFC r268487: Enable 8051 before downloading firmware. Tested by: Carlos Jacobo Puga Medina chip & URTWN_CHIP_88E)) { + urtwn_write_2(sc, R92C_SYS_FUNC_EN, + urtwn_read_2(sc, R92C_SYS_FUNC_EN) | + R92C_SYS_FUNC_EN_CPUEN); + } urtwn_write_1(sc, R92C_MCUFWDL, urtwn_read_1(sc, R92C_MCUFWDL) | R92C_MCUFWDL_EN); urtwn_write_1(sc, R92C_MCUFWDL + 2, From owner-svn-src-stable@FreeBSD.ORG Sun Jul 13 17:04:23 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF8F5F0F; Sun, 13 Jul 2014 17:04:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CA86271A; Sun, 13 Jul 2014 17:04:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6DH4Nqm077419; Sun, 13 Jul 2014 17:04:23 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6DH4N7r077418; Sun, 13 Jul 2014 17:04:23 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201407131704.s6DH4N7r077418@svn.freebsd.org> From: Glen Barber Date: Sun, 13 Jul 2014 17:04:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268592 - stable/9/sys/conf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jul 2014 17:04:23 -0000 Author: gjb Date: Sun Jul 13 17:04:22 2014 New Revision: 268592 URL: http://svnweb.freebsd.org/changeset/base/268592 Log: Switch stable/9 back to STABLE now that release/9.3.0 is tagged. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/sys/conf/newvers.sh Modified: stable/9/sys/conf/newvers.sh ============================================================================== --- stable/9/sys/conf/newvers.sh Sun Jul 13 16:27:57 2014 (r268591) +++ stable/9/sys/conf/newvers.sh Sun Jul 13 17:04:22 2014 (r268592) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="9.3" -BRANCH="PRERELEASE" +BRANCH="STABLE" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-stable@FreeBSD.ORG Sun Jul 13 17:49:28 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3FB1CA17; Sun, 13 Jul 2014 17:49:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C31C2A43; Sun, 13 Jul 2014 17:49:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6DHnSJS099035; Sun, 13 Jul 2014 17:49:28 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6DHnSFW099033; Sun, 13 Jul 2014 17:49:28 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201407131749.s6DHnSFW099033@svn.freebsd.org> From: John Baldwin Date: Sun, 13 Jul 2014 17:49:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268594 - stable/10/share/examples/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jul 2014 17:49:28 -0000 Author: jhb Date: Sun Jul 13 17:49:27 2014 New Revision: 268594 URL: http://svnweb.freebsd.org/changeset/base/268594 Log: MFC 267963: The latest versoin of file/libmagic identifes a filesystem image is identified as "DOS/MBR boot sector" as opposed to "x86 boot sector". This trips up vmrun.sh when using the new file(1) and makes it want to boot into the installer instead. Fix this by just looking for "boot sector" instead. Modified: stable/10/share/examples/bhyve/vmrun.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/share/examples/bhyve/vmrun.sh ============================================================================== --- stable/10/share/examples/bhyve/vmrun.sh Sun Jul 13 17:05:03 2014 (r268593) +++ stable/10/share/examples/bhyve/vmrun.sh Sun Jul 13 17:49:27 2014 (r268594) @@ -138,7 +138,7 @@ echo "Launching virtual machine \"$vmnam while [ 1 ]; do ${BHYVECTL} --vm=${vmname} --destroy > /dev/null 2>&1 - file ${virtio_diskdev} | grep ": x86 boot sector" > /dev/null + file ${virtio_diskdev} | grep "boot sector" > /dev/null rc=$? if [ $rc -ne 0 ]; then file ${virtio_diskdev} | grep ": Unix Fast File sys" > /dev/null From owner-svn-src-stable@FreeBSD.ORG Sun Jul 13 17:50:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0DC21D1E; Sun, 13 Jul 2014 17:50:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E26DC2A5C; Sun, 13 Jul 2014 17:50:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6DHoopB000360; Sun, 13 Jul 2014 17:50:50 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6DHooMR000359; Sun, 13 Jul 2014 17:50:50 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201407131750.s6DHooMR000359@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 13 Jul 2014 17:50:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268595 - stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jul 2014 17:50:51 -0000 Author: pfg Date: Sun Jul 13 17:50:50 2014 New Revision: 268595 URL: http://svnweb.freebsd.org/changeset/base/268595 Log: MFC r268290: Merge from OpenSolaris (24-Jul-2010): 6679140 asymmetric alloc/dealloc activity can induce dynamic variable drops 6679193 dtrace_dynvar walker produces flood of dtrace_dynhash_sink This finishes a set of merges from the older OpenSolaris releases. Still the FreeBSD port has many differences that are difficult to account for but that seems normal given that the kernels are different. Obtained from: OpenSolaris (through Illumos) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sun Jul 13 17:49:27 2014 (r268594) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sun Jul 13 17:50:50 2014 (r268595) @@ -22,7 +22,7 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. * Copyright (c) 2012 by Delphix. All rights reserved. */ @@ -235,6 +235,7 @@ static dtrace_helpers_t *dtrace_deferred static dtrace_enabling_t *dtrace_retained; /* list of retained enablings */ static dtrace_genid_t dtrace_retained_gen; /* current retained enab gen */ static dtrace_dynvar_t dtrace_dynhash_sink; /* end of dynamic hash chains */ +static int dtrace_dynvar_failclean; /* dynvars failed to clean */ #if !defined(sun) static struct mtx dtrace_unr_mtx; MTX_SYSINIT(dtrace_unr_mtx, &dtrace_unr_mtx, "Unique resource identifier", MTX_DEF); @@ -1555,12 +1556,12 @@ dtrace_dynvar_clean(dtrace_dstate_t *dst { dtrace_dynvar_t *dirty; dtrace_dstate_percpu_t *dcpu; - int i, work = 0; + dtrace_dynvar_t **rinsep; + int i, j, work = 0; for (i = 0; i < NCPU; i++) { dcpu = &dstate->dtds_percpu[i]; - - ASSERT(dcpu->dtdsc_rinsing == NULL); + rinsep = &dcpu->dtdsc_rinsing; /* * If the dirty list is NULL, there is no dirty work to do. @@ -1568,14 +1569,62 @@ dtrace_dynvar_clean(dtrace_dstate_t *dst if (dcpu->dtdsc_dirty == NULL) continue; - /* - * If the clean list is non-NULL, then we're not going to do - * any work for this CPU -- it means that there has not been - * a dtrace_dynvar() allocation on this CPU (or from this CPU) - * since the last time we cleaned house. - */ - if (dcpu->dtdsc_clean != NULL) + if (dcpu->dtdsc_rinsing != NULL) { + /* + * If the rinsing list is non-NULL, then it is because + * this CPU was selected to accept another CPU's + * dirty list -- and since that time, dirty buffers + * have accumulated. This is a highly unlikely + * condition, but we choose to ignore the dirty + * buffers -- they'll be picked up a future cleanse. + */ continue; + } + + if (dcpu->dtdsc_clean != NULL) { + /* + * If the clean list is non-NULL, then we're in a + * situation where a CPU has done deallocations (we + * have a non-NULL dirty list) but no allocations (we + * also have a non-NULL clean list). We can't simply + * move the dirty list into the clean list on this + * CPU, yet we also don't want to allow this condition + * to persist, lest a short clean list prevent a + * massive dirty list from being cleaned (which in + * turn could lead to otherwise avoidable dynamic + * drops). To deal with this, we look for some CPU + * with a NULL clean list, NULL dirty list, and NULL + * rinsing list -- and then we borrow this CPU to + * rinse our dirty list. + */ + for (j = 0; j < NCPU; j++) { + dtrace_dstate_percpu_t *rinser; + + rinser = &dstate->dtds_percpu[j]; + + if (rinser->dtdsc_rinsing != NULL) + continue; + + if (rinser->dtdsc_dirty != NULL) + continue; + + if (rinser->dtdsc_clean != NULL) + continue; + + rinsep = &rinser->dtdsc_rinsing; + break; + } + + if (j == NCPU) { + /* + * We were unable to find another CPU that + * could accept this dirty list -- we are + * therefore unable to clean it now. + */ + dtrace_dynvar_failclean++; + continue; + } + } work = 1; @@ -1592,7 +1641,7 @@ dtrace_dynvar_clean(dtrace_dstate_t *dst * on a hash chain, either the dirty list or the * rinsing list for some CPU must be non-NULL.) */ - dcpu->dtdsc_rinsing = dirty; + *rinsep = dirty; dtrace_membar_producer(); } while (dtrace_casptr(&dcpu->dtdsc_dirty, dirty, NULL) != dirty); @@ -2023,7 +2072,7 @@ retry: ASSERT(clean->dtdv_hashval == DTRACE_DYNHASH_FREE); /* - * Now we'll move the clean list to the free list. + * Now we'll move the clean list to our free list. * It's impossible for this to fail: the only way * the free list can be updated is through this * code path, and only one CPU can own the clean list. @@ -2036,6 +2085,7 @@ retry: * owners of the clean lists out before resetting * the clean lists. */ + dcpu = &dstate->dtds_percpu[me]; rval = dtrace_casptr(&dcpu->dtdsc_free, NULL, clean); ASSERT(rval == NULL); goto retry; @@ -4726,7 +4776,7 @@ dtrace_dif_subr(uint_t subr, uint_t rd, int64_t index = (int64_t)tupregs[1].dttk_value; int64_t remaining = (int64_t)tupregs[2].dttk_value; size_t len = dtrace_strlen((char *)s, size); - int64_t i = 0; + int64_t i; if (!dtrace_canload(s, len + 1, mstate, vstate)) { regs[rd] = 0; From owner-svn-src-stable@FreeBSD.ORG Mon Jul 14 07:25:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AFD8D2B5; Mon, 14 Jul 2014 07:25:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C0D8278D; Mon, 14 Jul 2014 07:25:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6E7PVEv095411; Mon, 14 Jul 2014 07:25:31 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6E7PVOh095409; Mon, 14 Jul 2014 07:25:31 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201407140725.s6E7PVOh095409@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 14 Jul 2014 07:25:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268602 - stable/9/sys/dev/usb/controller X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jul 2014 07:25:31 -0000 Author: hselasky Date: Mon Jul 14 07:25:30 2014 New Revision: 268602 URL: http://svnweb.freebsd.org/changeset/base/268602 Log: MFC r268354: Improve support for Intel Lynx Point USB 3.0 controllers by masking the port routing bits like done in Linux. Modified: stable/9/sys/dev/usb/controller/xhci_pci.c stable/9/sys/dev/usb/controller/xhcireg.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/9/sys/dev/usb/controller/xhci_pci.c Mon Jul 14 06:00:01 2014 (r268601) +++ stable/9/sys/dev/usb/controller/xhci_pci.c Mon Jul 14 07:25:30 2014 (r268602) @@ -147,6 +147,9 @@ xhci_pci_port_route(device_t self, uint3 temp |= set; temp &= ~clear; + /* Don't set bits which the hardware doesn't support */ + temp &= pci_read_config(self, PCI_XHCI_INTEL_USB3PRM, 4); + pci_write_config(self, PCI_XHCI_INTEL_USB3_PSSEN, temp, 4); pci_write_config(self, PCI_XHCI_INTEL_XUSB2PR, temp, 4); Modified: stable/9/sys/dev/usb/controller/xhcireg.h ============================================================================== --- stable/9/sys/dev/usb/controller/xhcireg.h Mon Jul 14 06:00:01 2014 (r268601) +++ stable/9/sys/dev/usb/controller/xhcireg.h Mon Jul 14 07:25:30 2014 (r268602) @@ -35,7 +35,9 @@ #define PCI_XHCI_FLADJ 0x61 /* RW frame length adjust */ #define PCI_XHCI_INTEL_XUSB2PR 0xD0 /* Intel USB2 Port Routing */ +#define PCI_XHCI_INTEL_USB2PRM 0xD4 /* Intel USB2 Port Routing Mask */ #define PCI_XHCI_INTEL_USB3_PSSEN 0xD8 /* Intel USB3 Port SuperSpeed Enable */ +#define PCI_XHCI_INTEL_USB3PRM 0xDC /* Intel USB3 Port Routing Mask */ /* XHCI capability registers */ #define XHCI_CAPLENGTH 0x00 /* RO capability */ From owner-svn-src-stable@FreeBSD.ORG Mon Jul 14 07:27:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF267450; Mon, 14 Jul 2014 07:27:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9B4B527A0; Mon, 14 Jul 2014 07:27:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6E7RBX6095765; Mon, 14 Jul 2014 07:27:11 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6E7RBdL095763; Mon, 14 Jul 2014 07:27:11 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201407140727.s6E7RBdL095763@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 14 Jul 2014 07:27:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r268603 - stable/8/sys/dev/usb/controller X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jul 2014 07:27:11 -0000 Author: hselasky Date: Mon Jul 14 07:27:10 2014 New Revision: 268603 URL: http://svnweb.freebsd.org/changeset/base/268603 Log: MFC r268354: Improve support for Intel Lynx Point USB 3.0 controllers by masking the port routing bits like done in Linux. Modified: stable/8/sys/dev/usb/controller/xhci_pci.c stable/8/sys/dev/usb/controller/xhcireg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/8/sys/dev/usb/controller/xhci_pci.c Mon Jul 14 07:25:30 2014 (r268602) +++ stable/8/sys/dev/usb/controller/xhci_pci.c Mon Jul 14 07:27:10 2014 (r268603) @@ -147,6 +147,9 @@ xhci_pci_port_route(device_t self, uint3 temp |= set; temp &= ~clear; + /* Don't set bits which the hardware doesn't support */ + temp &= pci_read_config(self, PCI_XHCI_INTEL_USB3PRM, 4); + pci_write_config(self, PCI_XHCI_INTEL_USB3_PSSEN, temp, 4); pci_write_config(self, PCI_XHCI_INTEL_XUSB2PR, temp, 4); Modified: stable/8/sys/dev/usb/controller/xhcireg.h ============================================================================== --- stable/8/sys/dev/usb/controller/xhcireg.h Mon Jul 14 07:25:30 2014 (r268602) +++ stable/8/sys/dev/usb/controller/xhcireg.h Mon Jul 14 07:27:10 2014 (r268603) @@ -35,7 +35,9 @@ #define PCI_XHCI_FLADJ 0x61 /* RW frame length adjust */ #define PCI_XHCI_INTEL_XUSB2PR 0xD0 /* Intel USB2 Port Routing */ +#define PCI_XHCI_INTEL_USB2PRM 0xD4 /* Intel USB2 Port Routing Mask */ #define PCI_XHCI_INTEL_USB3_PSSEN 0xD8 /* Intel USB3 Port SuperSpeed Enable */ +#define PCI_XHCI_INTEL_USB3PRM 0xDC /* Intel USB3 Port Routing Mask */ /* XHCI capability registers */ #define XHCI_CAPLENGTH 0x00 /* RO capability */ From owner-svn-src-stable@FreeBSD.ORG Mon Jul 14 07:30:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B78C35DC; Mon, 14 Jul 2014 07:30:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A40C327C1; Mon, 14 Jul 2014 07:30:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6E7U5Pu096286; Mon, 14 Jul 2014 07:30:05 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6E7U5f9096283; Mon, 14 Jul 2014 07:30:05 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201407140730.s6E7U5f9096283@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 14 Jul 2014 07:30:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268604 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jul 2014 07:30:05 -0000 Author: hselasky Date: Mon Jul 14 07:30:04 2014 New Revision: 268604 URL: http://svnweb.freebsd.org/changeset/base/268604 Log: MFC r268354: Improve support for Intel Lynx Point USB 3.0 controllers by masking the port routing bits like done in Linux. Modified: stable/10/sys/dev/usb/controller/xhci_pci.c stable/10/sys/dev/usb/controller/xhcireg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci_pci.c Mon Jul 14 07:27:10 2014 (r268603) +++ stable/10/sys/dev/usb/controller/xhci_pci.c Mon Jul 14 07:30:04 2014 (r268604) @@ -157,6 +157,9 @@ xhci_pci_port_route(device_t self, uint3 temp |= set; temp &= ~clear; + /* Don't set bits which the hardware doesn't support */ + temp &= pci_read_config(self, PCI_XHCI_INTEL_USB3PRM, 4); + pci_write_config(self, PCI_XHCI_INTEL_USB3_PSSEN, temp, 4); pci_write_config(self, PCI_XHCI_INTEL_XUSB2PR, temp, 4); Modified: stable/10/sys/dev/usb/controller/xhcireg.h ============================================================================== --- stable/10/sys/dev/usb/controller/xhcireg.h Mon Jul 14 07:27:10 2014 (r268603) +++ stable/10/sys/dev/usb/controller/xhcireg.h Mon Jul 14 07:30:04 2014 (r268604) @@ -35,7 +35,9 @@ #define PCI_XHCI_FLADJ 0x61 /* RW frame length adjust */ #define PCI_XHCI_INTEL_XUSB2PR 0xD0 /* Intel USB2 Port Routing */ +#define PCI_XHCI_INTEL_USB2PRM 0xD4 /* Intel USB2 Port Routing Mask */ #define PCI_XHCI_INTEL_USB3_PSSEN 0xD8 /* Intel USB3 Port SuperSpeed Enable */ +#define PCI_XHCI_INTEL_USB3PRM 0xDC /* Intel USB3 Port Routing Mask */ /* XHCI capability registers */ #define XHCI_CAPLENGTH 0x00 /* RO capability */ From owner-svn-src-stable@FreeBSD.ORG Mon Jul 14 11:07:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 131DBAF4; Mon, 14 Jul 2014 11:07:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9A702B5A; Mon, 14 Jul 2014 11:07:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6EB7hEl004118; Mon, 14 Jul 2014 11:07:43 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6EB7h1s004116; Mon, 14 Jul 2014 11:07:43 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201407141107.s6EB7h1s004116@svn.freebsd.org> From: Tijl Coosemans Date: Mon, 14 Jul 2014 11:07:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268618 - in stable/9: include tools/build/mk X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jul 2014 11:07:44 -0000 Author: tijl Date: Mon Jul 14 11:07:43 2014 New Revision: 268618 URL: http://svnweb.freebsd.org/changeset/base/268618 Log: MFC r267441: Don't install GSS-API headers when the GSSAPI option has been disabled. Some ports assume GSS-API is supported when they find the headers. PR: 189156 Submitted by: Garrett Cooper Modified: stable/9/include/Makefile stable/9/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/9/ (props changed) stable/9/include/ (props changed) stable/9/tools/ (props changed) stable/9/tools/build/ (props changed) Modified: stable/9/include/Makefile ============================================================================== --- stable/9/include/Makefile Mon Jul 14 09:52:33 2014 (r268617) +++ stable/9/include/Makefile Mon Jul 14 11:07:43 2014 (r268618) @@ -6,11 +6,11 @@ .include CLEANFILES= osreldate.h version vers.c -SUBDIR= arpa gssapi protocols rpcsvc rpc xlocale +SUBDIR= arpa protocols rpcsvc rpc xlocale INCS= a.out.h ar.h assert.h bitstring.h complex.h cpio.h _ctype.h ctype.h \ db.h \ dirent.h dlfcn.h elf.h elf-hints.h err.h fmtmsg.h fnmatch.h fstab.h \ - fts.h ftw.h getopt.h glob.h grp.h gssapi.h \ + fts.h ftw.h getopt.h glob.h grp.h \ ieeefp.h ifaddrs.h \ inttypes.h iso646.h kenv.h langinfo.h libgen.h limits.h link.h \ locale.h malloc.h malloc_np.h memory.h monetary.h mpool.h mqueue.h \ @@ -68,6 +68,11 @@ _dev_powermac_nvram= dev/powermac_nvram _dev_ieee488= dev/ieee488 .endif +.if ${MK_GSSAPI} != "no" +SUBDIR+= gssapi +INCS+= gssapi.h +.endif + .if ${MK_HESIOD} != "no" INCS+= hesiod.h .endif Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/9/tools/build/mk/OptionalObsoleteFiles.inc Mon Jul 14 09:52:33 2014 (r268617) +++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc Mon Jul 14 11:07:43 2014 (r268618) @@ -1976,6 +1976,9 @@ OLD_DIRS+=usr/share/tmac .endif .if ${MK_GSSAPI} == no +OLD_FILES+=usr/include/gssapi/gssapi.h +OLD_DIRS+=usr/include/gssapi +OLD_FILES+=usr/include/gssapi.h OLD_FILES+=usr/lib/libgssapi.a OLD_FILES+=usr/lib/libgssapi.so OLD_LIBS+=usr/lib/libgssapi.so.10 From owner-svn-src-stable@FreeBSD.ORG Mon Jul 14 15:54:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D4B0835E; Mon, 14 Jul 2014 15:54:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C148825FF; Mon, 14 Jul 2014 15:54:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6EFsoDW041770; Mon, 14 Jul 2014 15:54:50 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6EFsohH041769; Mon, 14 Jul 2014 15:54:50 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201407141554.s6EFsohH041769@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Mon, 14 Jul 2014 15:54:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268622 - stable/10/tools/test/dtrace X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jul 2014 15:54:50 -0000 Author: pfg Date: Mon Jul 14 15:54:50 2014 New Revision: 268622 URL: http://svnweb.freebsd.org/changeset/base/268622 Log: MFC r268538: Avoid hardcoding "gcc" in the DTrace tests. At least one test doesn't work yet without gcc, however gcc is not always available in base. Using the environment compiler is more trustable and will also work with an external compiler. Reviewed by: markj Modified: stable/10/tools/test/dtrace/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/test/dtrace/Makefile ============================================================================== --- stable/10/tools/test/dtrace/Makefile Mon Jul 14 14:33:03 2014 (r268621) +++ stable/10/tools/test/dtrace/Makefile Mon Jul 14 15:54:50 2014 (r268622) @@ -340,7 +340,7 @@ listprgs : .for _f in ${ALL_TESTCFILES} ${_f:T:S/c$/exe/} : ${_f} - gcc -o ${.TARGET} ${_f} -lrt + ${CC} -o ${.TARGET} ${_f} -lrt .endfor listcfiles : From owner-svn-src-stable@FreeBSD.ORG Mon Jul 14 20:07:23 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F23EEE5; Mon, 14 Jul 2014 20:07:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8BDD32DC3; Mon, 14 Jul 2014 20:07:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6EK7NWN066141; Mon, 14 Jul 2014 20:07:23 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6EK7N75066136; Mon, 14 Jul 2014 20:07:23 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201407142007.s6EK7N75066136@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Mon, 14 Jul 2014 20:07:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268629 - stable/10/sbin/fsck_msdosfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jul 2014 20:07:23 -0000 Author: pfg Date: Mon Jul 14 20:07:23 2014 New Revision: 268629 URL: http://svnweb.freebsd.org/changeset/base/268629 Log: fsck_msdosfs: be a bit more permissive The free space value in the FSInfo block is merely unitialized when it is 0xffffffff. This fixes a bug found in NetBSD. It must be noted that we never supported all the checks that NetBSD does as some of them would cause failures with a freshly created FAT32 from MS-Windows. While here, bring some space fixes. Obtained from: NetBSD (rev. 1.22) Modified: stable/10/sbin/fsck_msdosfs/fat.c Modified: stable/10/sbin/fsck_msdosfs/fat.c ============================================================================== --- stable/10/sbin/fsck_msdosfs/fat.c Mon Jul 14 19:16:49 2014 (r268628) +++ stable/10/sbin/fsck_msdosfs/fat.c Mon Jul 14 20:07:23 2014 (r268629) @@ -242,7 +242,7 @@ readfat(int fs, struct bootblock *boot, ret |= FSDIRTY; else { /* just some odd byte sequence in FAT */ - + switch (boot->ClustMask) { case CLUST32_MASK: pwarn("%s (%02x%02x%02x%02x%02x%02x%02x%02x)\n", @@ -262,7 +262,7 @@ readfat(int fs, struct bootblock *boot, break; } - + if (ask(1, "Correct")) ret |= FSFIXFAT; } @@ -653,7 +653,7 @@ checklost(int dosfs, struct bootblock *b cl_t head; int mod = FSOK; int ret; - + for (head = CLUST_FIRST; head < boot->NumClusters; head++) { /* find next untravelled chain */ if (fat[head].head != head @@ -677,8 +677,9 @@ checklost(int dosfs, struct bootblock *b if (boot->bpbFSInfo) { ret = 0; - if (boot->FSFree != boot->NumFree) { - pwarn("Free space in FSInfo block (%d) not correct (%d)\n", + if (boot->FSFree != 0xffffffffU && + boot->FSFree != boot->NumFree) { + pwarn("Free space in FSInfo block (%u) not correct (%u)\n", boot->FSFree, boot->NumFree); if (ask(1, "Fix")) { boot->FSFree = boot->NumFree; From owner-svn-src-stable@FreeBSD.ORG Mon Jul 14 20:13:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BD0A72C9; Mon, 14 Jul 2014 20:13:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA4082EA9; Mon, 14 Jul 2014 20:13:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6EKDO73070463; Mon, 14 Jul 2014 20:13:24 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6EKDOtm070462; Mon, 14 Jul 2014 20:13:24 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201407142013.s6EKDOtm070462@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Mon, 14 Jul 2014 20:13:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268630 - stable/10/sbin/fsck_msdosfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jul 2014 20:13:24 -0000 Author: pfg Date: Mon Jul 14 20:13:24 2014 New Revision: 268630 URL: http://svnweb.freebsd.org/changeset/base/268630 Log: Revert r268629: This was supposed to go to head first :( Modified: stable/10/sbin/fsck_msdosfs/fat.c Modified: stable/10/sbin/fsck_msdosfs/fat.c ============================================================================== --- stable/10/sbin/fsck_msdosfs/fat.c Mon Jul 14 20:07:23 2014 (r268629) +++ stable/10/sbin/fsck_msdosfs/fat.c Mon Jul 14 20:13:24 2014 (r268630) @@ -242,7 +242,7 @@ readfat(int fs, struct bootblock *boot, ret |= FSDIRTY; else { /* just some odd byte sequence in FAT */ - + switch (boot->ClustMask) { case CLUST32_MASK: pwarn("%s (%02x%02x%02x%02x%02x%02x%02x%02x)\n", @@ -262,7 +262,7 @@ readfat(int fs, struct bootblock *boot, break; } - + if (ask(1, "Correct")) ret |= FSFIXFAT; } @@ -653,7 +653,7 @@ checklost(int dosfs, struct bootblock *b cl_t head; int mod = FSOK; int ret; - + for (head = CLUST_FIRST; head < boot->NumClusters; head++) { /* find next untravelled chain */ if (fat[head].head != head @@ -677,9 +677,8 @@ checklost(int dosfs, struct bootblock *b if (boot->bpbFSInfo) { ret = 0; - if (boot->FSFree != 0xffffffffU && - boot->FSFree != boot->NumFree) { - pwarn("Free space in FSInfo block (%u) not correct (%u)\n", + if (boot->FSFree != boot->NumFree) { + pwarn("Free space in FSInfo block (%d) not correct (%d)\n", boot->FSFree, boot->NumFree); if (ask(1, "Fix")) { boot->FSFree = boot->NumFree; From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 04:33:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8CB1E658; Tue, 15 Jul 2014 04:33:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79E412736; Tue, 15 Jul 2014 04:33:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6F4XBu0011329; Tue, 15 Jul 2014 04:33:11 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6F4XB6P011328; Tue, 15 Jul 2014 04:33:11 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201407150433.s6F4XB6P011328@svn.freebsd.org> From: Xin LI Date: Tue, 15 Jul 2014 04:33:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268645 - stable/10/cddl/contrib/opensolaris/cmd/zdb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 04:33:11 -0000 Author: delphij Date: Tue Jul 15 04:33:11 2014 New Revision: 268645 URL: http://svnweb.freebsd.org/changeset/base/268645 Log: MFC r267572: MFV r249332 (illumos-gate 14005:55fc53126003) Illumos ZFS issues: 3654 zdb should print number of ganged blocks Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c Tue Jul 15 03:28:37 2014 (r268644) +++ stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c Tue Jul 15 04:33:11 2014 (r268645) @@ -2108,6 +2108,8 @@ typedef struct zdb_blkstats { uint64_t zb_lsize; uint64_t zb_psize; uint64_t zb_count; + uint64_t zb_gangs; + uint64_t zb_ditto_samevdev; uint64_t zb_psize_histogram[PSIZE_HISTO_SIZE]; } zdb_blkstats_t; @@ -2155,6 +2157,7 @@ zdb_count_block(zdb_cb_t *zcb, zilog_t * for (int i = 0; i < 4; i++) { int l = (i < 2) ? BP_GET_LEVEL(bp) : ZB_TOTAL; int t = (i & 1) ? type : ZDB_OT_TOTAL; + int equal; zdb_blkstats_t *zb = &zcb->zcb_type[l][t]; zb->zb_asize += BP_GET_ASIZE(bp); @@ -2162,6 +2165,27 @@ zdb_count_block(zdb_cb_t *zcb, zilog_t * zb->zb_psize += BP_GET_PSIZE(bp); zb->zb_count++; zb->zb_psize_histogram[BP_GET_PSIZE(bp) >> SPA_MINBLOCKSHIFT]++; + + zb->zb_gangs += BP_COUNT_GANG(bp); + + switch (BP_GET_NDVAS(bp)) { + case 2: + if (DVA_GET_VDEV(&bp->blk_dva[0]) == + DVA_GET_VDEV(&bp->blk_dva[1])) + zb->zb_ditto_samevdev++; + break; + case 3: + equal = (DVA_GET_VDEV(&bp->blk_dva[0]) == + DVA_GET_VDEV(&bp->blk_dva[1])) + + (DVA_GET_VDEV(&bp->blk_dva[0]) == + DVA_GET_VDEV(&bp->blk_dva[2])) + + (DVA_GET_VDEV(&bp->blk_dva[1]) == + DVA_GET_VDEV(&bp->blk_dva[2])); + if (equal != 0) + zb->zb_ditto_samevdev++; + break; + } + } if (dump_opt['L']) @@ -2552,6 +2576,8 @@ dump_block_stats(spa_t *spa) (void) printf("\n"); (void) printf("\tbp count: %10llu\n", (u_longlong_t)tzb->zb_count); + (void) printf("\tganged count: %10llu\n", + (longlong_t)tzb->zb_gangs); (void) printf("\tbp logical: %10llu avg: %6llu\n", (u_longlong_t)tzb->zb_lsize, (u_longlong_t)(tzb->zb_lsize / tzb->zb_count)); @@ -2573,6 +2599,11 @@ dump_block_stats(spa_t *spa) (void) printf("\tSPA allocated: %10llu used: %5.2f%%\n", (u_longlong_t)norm_alloc, 100.0 * norm_alloc / norm_space); + if (tzb->zb_ditto_samevdev != 0) { + (void) printf("\tDittoed blocks on same vdev: %llu\n", + (longlong_t)tzb->zb_ditto_samevdev); + } + if (dump_opt['b'] >= 2) { int l, t, level; (void) printf("\nBlocks\tLSIZE\tPSIZE\tASIZE" @@ -2580,7 +2611,7 @@ dump_block_stats(spa_t *spa) for (t = 0; t <= ZDB_OT_TOTAL; t++) { char csize[32], lsize[32], psize[32], asize[32]; - char avg[32]; + char avg[32], gang[32]; char *typename; if (t < DMU_OT_NUMTYPES) @@ -2621,6 +2652,7 @@ dump_block_stats(spa_t *spa) zdb_nicenum(zb->zb_psize, psize); zdb_nicenum(zb->zb_asize, asize); zdb_nicenum(zb->zb_asize / zb->zb_count, avg); + zdb_nicenum(zb->zb_gangs, gang); (void) printf("%6s\t%5s\t%5s\t%5s\t%5s" "\t%5.2f\t%6.2f\t", @@ -2634,6 +2666,11 @@ dump_block_stats(spa_t *spa) (void) printf(" L%d %s\n", level, typename); + if (dump_opt['b'] >= 3 && zb->zb_gangs > 0) { + (void) printf("\t number of ganged " + "blocks: %s\n", gang); + } + if (dump_opt['b'] >= 4) { (void) printf("psize " "(in 512-byte sectors): " From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 04:39:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 210AA944; Tue, 15 Jul 2014 04:39:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E50832784; Tue, 15 Jul 2014 04:39:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6F4duL7012450; Tue, 15 Jul 2014 04:39:56 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6F4dtUe012443; Tue, 15 Jul 2014 04:39:55 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201407150439.s6F4dtUe012443@svn.freebsd.org> From: Xin LI Date: Tue, 15 Jul 2014 04:39:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268647 - in stable/10: cddl/contrib/opensolaris/cmd/zfs sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/f... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 04:39:57 -0000 Author: delphij Date: Tue Jul 15 04:39:55 2014 New Revision: 268647 URL: http://svnweb.freebsd.org/changeset/base/268647 Log: MFC r266771: MFV r266766: Add a new zfs property, "redundant_metadata" which can have values "all" or "most". The default will be "all", which is the current behavior. When set to all, ZFS stores an extra copy of all metadata. If a single on-disk block is corrupt, at worst a single block of user data (which is recordsize bytes long) can be lost. Setting to "most" will cause us to only store 1 copy of level-1 indirect blocks of user data files. This can improve performance of random writes, because less metadata has to be written. In practice, at worst about 100 blocks (of recordsize bytes each) of user data can be lost if a single on-disk block is corrupt. The exact behavior of which metadata blocks are stored redundantly may change in future releases. Illumos issue: 3835 zfs need not store 2 copies of all metadata Modified: stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Jul 15 04:39:23 2014 (r268646) +++ stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Jul 15 04:39:55 2014 (r268647) @@ -18,7 +18,7 @@ .\" information: Portions Copyright [yyyy] [name of copyright owner] .\" .\" Copyright (c) 2010, Sun Microsystems, Inc. All Rights Reserved. -.\" Copyright (c) 2013 by Delphix. All rights reserved. +.\" Copyright (c) 2014 by Delphix. All rights reserved. .\" Copyright (c) 2011, Pawel Jakub Dawidek .\" Copyright (c) 2012, Glen Barber .\" Copyright (c) 2012, Bryan Drewery @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 23, 2014 +.Dd May 27, 2014 .Dt ZFS 8 .Os .Sh NAME @@ -1193,6 +1193,53 @@ affects only files created afterward; ex .Pp This property can also be referred to by its shortened column name, .Sy recsize . +.It Sy redundant_metadata Ns = Ns Cm all | most +Controls what types of metadata are stored redundantly. +ZFS stores an extra copy of metadata, so that if a single block is corrupted, +the amount of user data lost is limited. +This extra copy is in addition to any redundancy provided at the pool level +.Pq e.g. by mirroring or RAID-Z , +and is in addition to an extra copy specified by the +.Sy copies +property +.Pq up to a total of 3 copies . +For example if the pool is mirrored, +.Cm copies Ns = Ns Ar 2 , +and +.Cm redundant_metadata Ns = Ns Ar most , +then ZFS +stores 6 copies of most metadata, and 4 copies of data and some +metadata. +.Pp +When set to +.Cm all , +ZFS stores an extra copy of all metadata. +If a +single on-disk block is corrupt, at worst a single block of user data +.Po which is +.Cm recordsize +bytes long +can be lost. +.Pc +.Pp +When set to +.Cm most , +ZFS stores an extra copy of most types of +metadata. +This can improve performance of random writes, because less +metadata must be written. +In practice, at worst about 100 blocks +.Po of +.Cm recordsize +bytes each +.Pc +of user data can be lost if a single +on-disk block is corrupt. +The exact behavior of which metadata blocks +are stored redundantly may change in future releases. +.Pp +The default value is +.Cm all . .It Sy refquota Ns = Ns Ar size | Cm none Limits the amount of space a dataset can consume. This property enforces a hard limit on the amount of space used. This hard limit does not include space used Modified: stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Tue Jul 15 04:39:23 2014 (r268646) +++ stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Tue Jul 15 04:39:55 2014 (r268647) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ @@ -206,7 +206,18 @@ zfs_prop_init(void) { NULL } }; + static zprop_index_t redundant_metadata_table[] = { + { "all", ZFS_REDUNDANT_METADATA_ALL }, + { "most", ZFS_REDUNDANT_METADATA_MOST }, + { NULL } + }; + /* inherit index properties */ + zprop_register_index(ZFS_PROP_REDUNDANT_METADATA, "redundant_metadata", + ZFS_REDUNDANT_METADATA_ALL, + PROP_INHERIT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, + "all | most", "REDUND_MD", + redundant_metadata_table); zprop_register_index(ZFS_PROP_SYNC, "sync", ZFS_SYNC_STANDARD, PROP_INHERIT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, "standard | always | disabled", "SYNC", Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Tue Jul 15 04:39:23 2014 (r268646) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Tue Jul 15 04:39:55 2014 (r268647) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. */ /* Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ /* Copyright (c) 2013, Joyent, Inc. All rights reserved. */ @@ -1630,6 +1630,12 @@ TUNABLE_INT("vfs.zfs.mdcomp_disable", &z SYSCTL_INT(_vfs_zfs, OID_AUTO, mdcomp_disable, CTLFLAG_RW, &zfs_mdcomp_disable, 0, "Disable metadata compression"); +/* + * When the "redundant_metadata" property is set to "most", only indirect + * blocks of this level and higher will have an additional ditto block. + */ +int zfs_redundant_metadata_most_ditto_level = 2; + void dmu_write_policy(objset_t *os, dnode_t *dn, int level, int wp, zio_prop_t *zp) { @@ -1669,6 +1675,13 @@ dmu_write_policy(objset_t *os, dnode_t * if (zio_checksum_table[checksum].ci_correctable < 1 || zio_checksum_table[checksum].ci_eck) checksum = ZIO_CHECKSUM_FLETCHER_4; + + if (os->os_redundant_metadata == ZFS_REDUNDANT_METADATA_ALL || + (os->os_redundant_metadata == + ZFS_REDUNDANT_METADATA_MOST && + (level >= zfs_redundant_metadata_most_ditto_level || + DMU_OT_IS_METADATA(type) || (wp & WP_SPILL)))) + copies++; } else if (wp & WP_NOFILL) { ASSERT(level == 0); @@ -1716,7 +1729,7 @@ dmu_write_policy(objset_t *os, dnode_t * zp->zp_compress = compress; zp->zp_type = (wp & WP_SPILL) ? dn->dn_bonustype : type; zp->zp_level = level; - zp->zp_copies = MIN(copies + ismd, spa_max_replication(os->os_spa)); + zp->zp_copies = MIN(copies, spa_max_replication(os->os_spa)); zp->zp_dedup = dedup; zp->zp_dedup_verify = dedup && dedup_verify; zp->zp_nopwrite = nopwrite; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Tue Jul 15 04:39:23 2014 (r268646) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Tue Jul 15 04:39:55 2014 (r268647) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ @@ -115,13 +115,13 @@ dmu_objset_id(objset_t *os) return (ds ? ds->ds_object : 0); } -uint64_t +zfs_sync_type_t dmu_objset_syncprop(objset_t *os) { return (os->os_sync); } -uint64_t +zfs_logbias_op_t dmu_objset_logbias(objset_t *os) { return (os->os_logbias); @@ -230,6 +230,20 @@ sync_changed_cb(void *arg, uint64_t newv } static void +redundant_metadata_changed_cb(void *arg, uint64_t newval) +{ + objset_t *os = arg; + + /* + * Inheritance and range checking should have been done by now. + */ + ASSERT(newval == ZFS_REDUNDANT_METADATA_ALL || + newval == ZFS_REDUNDANT_METADATA_MOST); + + os->os_redundant_metadata = newval; +} + +static void logbias_changed_cb(void *arg, uint64_t newval) { objset_t *os = arg; @@ -364,6 +378,12 @@ dmu_objset_open_impl(spa_t *spa, dsl_dat zfs_prop_to_name(ZFS_PROP_SYNC), sync_changed_cb, os); } + if (err == 0) { + err = dsl_prop_register(ds, + zfs_prop_to_name( + ZFS_PROP_REDUNDANT_METADATA), + redundant_metadata_changed_cb, os); + } } if (err != 0) { VERIFY(arc_buf_remove_ref(os->os_phys_buf, @@ -377,9 +397,9 @@ dmu_objset_open_impl(spa_t *spa, dsl_dat os->os_compress = ZIO_COMPRESS_LZJB; os->os_copies = spa_max_replication(spa); os->os_dedup_checksum = ZIO_CHECKSUM_OFF; - os->os_dedup_verify = 0; - os->os_logbias = 0; - os->os_sync = 0; + os->os_dedup_verify = B_FALSE; + os->os_logbias = ZFS_LOGBIAS_LATENCY; + os->os_sync = ZFS_SYNC_STANDARD; os->os_primary_cache = ZFS_CACHE_ALL; os->os_secondary_cache = ZFS_CACHE_ALL; } @@ -622,6 +642,9 @@ dmu_objset_evict(objset_t *os) VERIFY0(dsl_prop_unregister(ds, zfs_prop_to_name(ZFS_PROP_SYNC), sync_changed_cb, os)); + VERIFY0(dsl_prop_unregister(ds, + zfs_prop_to_name(ZFS_PROP_REDUNDANT_METADATA), + redundant_metadata_changed_cb, os)); } VERIFY0(dsl_prop_unregister(ds, zfs_prop_to_name(ZFS_PROP_PRIMARYCACHE), Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Tue Jul 15 04:39:23 2014 (r268646) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Tue Jul 15 04:39:55 2014 (r268647) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright 2013 DEY Storage Systems, Inc. @@ -746,8 +746,8 @@ extern struct dsl_dataset *dmu_objset_ds extern void dmu_objset_name(objset_t *os, char *buf); extern dmu_objset_type_t dmu_objset_type(objset_t *os); extern uint64_t dmu_objset_id(objset_t *os); -extern uint64_t dmu_objset_syncprop(objset_t *os); -extern uint64_t dmu_objset_logbias(objset_t *os); +extern zfs_sync_type_t dmu_objset_syncprop(objset_t *os); +extern zfs_logbias_op_t dmu_objset_logbias(objset_t *os); extern int dmu_snapshot_list_next(objset_t *os, int namelen, char *name, uint64_t *id, uint64_t *offp, boolean_t *case_conflict); extern int dmu_snapshot_realname(objset_t *os, char *name, char *real, Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h Tue Jul 15 04:39:23 2014 (r268646) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h Tue Jul 15 04:39:55 2014 (r268647) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ @@ -85,15 +85,16 @@ struct objset { zilog_t *os_zil; /* can change, under dsl_dir's locks: */ - uint8_t os_checksum; - uint8_t os_compress; + enum zio_checksum os_checksum; + enum zio_compress os_compress; uint8_t os_copies; - uint8_t os_dedup_checksum; - uint8_t os_dedup_verify; - uint8_t os_logbias; - uint8_t os_primary_cache; - uint8_t os_secondary_cache; - uint8_t os_sync; + enum zio_checksum os_dedup_checksum; + boolean_t os_dedup_verify; + zfs_logbias_op_t os_logbias; + zfs_cache_type_t os_primary_cache; + zfs_cache_type_t os_secondary_cache; + zfs_sync_type_t os_sync; + zfs_redundant_metadata_type_t os_redundant_metadata; /* no lock needed: */ struct dmu_tx *os_synctx; /* XXX sketchy */ Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Tue Jul 15 04:39:23 2014 (r268646) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Tue Jul 15 04:39:55 2014 (r268647) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. * Copyright (c) 2012, Martin Matuska . All rights reserved. @@ -150,6 +150,7 @@ typedef enum { ZFS_PROP_SNAPSHOT_LIMIT, ZFS_PROP_FILESYSTEM_COUNT, ZFS_PROP_SNAPSHOT_COUNT, + ZFS_PROP_REDUNDANT_METADATA, ZFS_NUM_PROPS } zfs_prop_t; @@ -349,6 +350,11 @@ typedef enum { ZFS_VOLMODE_NONE = 3 } zfs_volmode_t; +typedef enum { + ZFS_REDUNDANT_METADATA_ALL, + ZFS_REDUNDANT_METADATA_MOST +} zfs_redundant_metadata_type_t; + /* * On-disk version number. */ From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 04:44:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE650AAB; Tue, 15 Jul 2014 04:44:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA9F7280B; Tue, 15 Jul 2014 04:44:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6F4i687016239; Tue, 15 Jul 2014 04:44:06 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6F4i6A6016237; Tue, 15 Jul 2014 04:44:06 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201407150444.s6F4i6A6016237@svn.freebsd.org> From: Xin LI Date: Tue, 15 Jul 2014 04:44:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268648 - stable/10/cddl/contrib/opensolaris/cmd/zstreamdump X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 04:44:07 -0000 Author: delphij Date: Tue Jul 15 04:44:06 2014 New Revision: 268648 URL: http://svnweb.freebsd.org/changeset/base/268648 Log: MFC r260142: MFV r258972: 4373 add block contents print to zstreamdump Modified: stable/10/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 stable/10/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 Tue Jul 15 04:39:55 2014 (r268647) +++ stable/10/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 Tue Jul 15 04:44:06 2014 (r268648) @@ -18,10 +18,11 @@ .\" information: Portions Copyright [yyyy] [name of copyright owner] .\" .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved. +.\" Copyright (c) 2013, Delphix. All Rights Reserved. .\" .\" $FreeBSD$ .\" -.Dd November 26, 2011 +.Dd December 31, 2013 .Dt ZSTREAMDUMP 8 .Os .Sh NAME @@ -30,6 +31,7 @@ .Sh SYNOPSIS .Nm .Op Fl C +.Op Fl d .Op Fl v .Sh DESCRIPTION The @@ -43,6 +45,8 @@ The following options are supported: .Bl -tag -width indent .It Fl C Suppress the validation of checksums. +.It Fl d +Dump contents of blocks modified, implies verbose. .It Fl v Verbose. Dump all headers, not only begin and end headers. .El Modified: stable/10/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c Tue Jul 15 04:39:55 2014 (r268647) +++ stable/10/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c Tue Jul 15 04:44:06 2014 (r268648) @@ -24,6 +24,11 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2013 by Delphix. All rights reserved. + */ + +#include #include #include #include @@ -34,6 +39,16 @@ #include #include +/* + * If dump mode is enabled, the number of bytes to print per line + */ +#define BYTES_PER_LINE 16 +/* + * If dump mode is enabled, the number of bytes to group together, separated + * by newlines or spaces + */ +#define DUMP_GROUPING 4 + uint64_t drr_record_count[DRR_NUMTYPES]; uint64_t total_write_size = 0; uint64_t total_stream_len = 0; @@ -45,9 +60,11 @@ boolean_t do_cksum = B_TRUE; static void usage(void) { - (void) fprintf(stderr, "usage: zstreamdump [-v] [-C] < file\n"); + (void) fprintf(stderr, "usage: zstreamdump [-v] [-C] [-d] < file\n"); (void) fprintf(stderr, "\t -v -- verbose\n"); (void) fprintf(stderr, "\t -C -- suppress checksum verification\n"); + (void) fprintf(stderr, "\t -d -- dump contents of blocks modified, " + "implies verbose\n"); exit(1); } @@ -75,6 +92,70 @@ ssread(void *buf, size_t len, zio_cksum_ return (outlen); } +/* + * Print part of a block in ASCII characters + */ +static void +print_ascii_block(char *subbuf, int length) +{ + int i; + + for (i = 0; i < length; i++) { + char char_print = isprint(subbuf[i]) ? subbuf[i] : '.'; + if (i != 0 && i % DUMP_GROUPING == 0) { + (void) printf(" "); + } + (void) printf("%c", char_print); + } + (void) printf("\n"); +} + +/* + * print_block - Dump the contents of a modified block to STDOUT + * + * Assume that buf has capacity evenly divisible by BYTES_PER_LINE + */ +static void +print_block(char *buf, int length) +{ + int i; + /* + * Start printing ASCII characters at a constant offset, after + * the hex prints. Leave 3 characters per byte on a line (2 digit + * hex number plus 1 space) plus spaces between characters and + * groupings + */ + int ascii_start = BYTES_PER_LINE * 3 + + BYTES_PER_LINE / DUMP_GROUPING + 2; + + for (i = 0; i < length; i += BYTES_PER_LINE) { + int j; + int this_line_length = MIN(BYTES_PER_LINE, length - i); + int print_offset = 0; + + for (j = 0; j < this_line_length; j++) { + int buf_offset = i + j; + + /* + * Separate every DUMP_GROUPING bytes by a space. + */ + if (buf_offset % DUMP_GROUPING == 0) { + print_offset += printf(" "); + } + + /* + * Print the two-digit hex value for this byte. + */ + unsigned char hex_print = buf[buf_offset]; + print_offset += printf("%02x ", hex_print); + } + + (void) printf("%*s", ascii_start - print_offset, " "); + + print_ascii_block(buf + i, this_line_length); + } +} + int main(int argc, char *argv[]) { @@ -92,11 +173,17 @@ main(int argc, char *argv[]) char c; boolean_t verbose = B_FALSE; boolean_t first = B_TRUE; + /* + * dump flag controls whether the contents of any modified data blocks + * are printed to the console during processing of the stream. Warning: + * for large streams, this can obviously lead to massive prints. + */ + boolean_t dump = B_FALSE; int err; zio_cksum_t zc = { 0 }; zio_cksum_t pcksum = { 0 }; - while ((c = getopt(argc, argv, ":vC")) != -1) { + while ((c = getopt(argc, argv, ":vCd")) != -1) { switch (c) { case 'C': do_cksum = B_FALSE; @@ -104,6 +191,10 @@ main(int argc, char *argv[]) case 'v': verbose = B_TRUE; break; + case 'd': + dump = B_TRUE; + verbose = B_TRUE; + break; case ':': (void) fprintf(stderr, "missing argument for '%c' option\n", optopt); @@ -128,6 +219,10 @@ main(int argc, char *argv[]) pcksum = zc; while (ssread(drr, sizeof (dmu_replay_record_t), &zc)) { + /* + * If this is the first DMU record being processed, check for + * the magic bytes and figure out the endian-ness based on them. + */ if (first) { if (drrb->drr_magic == BSWAP_64(DMU_BACKUP_MAGIC)) { do_byteswap = B_TRUE; @@ -209,7 +304,7 @@ main(int argc, char *argv[]) nvlist_t *nv; int sz = drr->drr_payloadlen; - if (sz > 1<<20) { + if (sz > INITIAL_BUFLEN) { free(buf); buf = malloc(sz); } @@ -283,6 +378,10 @@ main(int argc, char *argv[]) if (drro->drr_bonuslen > 0) { (void) ssread(buf, P2ROUNDUP(drro->drr_bonuslen, 8), &zc); + if (dump) { + print_block(buf, + P2ROUNDUP(drro->drr_bonuslen, 8)); + } } break; @@ -312,6 +411,10 @@ main(int argc, char *argv[]) drrw->drr_key.ddk_prop = BSWAP_64(drrw->drr_key.ddk_prop); } + /* + * If this is verbose and/or dump output, + * print info on the modified block + */ if (verbose) { (void) printf("WRITE object = %llu type = %u " "checksum type = %u\n" @@ -324,7 +427,16 @@ main(int argc, char *argv[]) (u_longlong_t)drrw->drr_length, (u_longlong_t)drrw->drr_key.ddk_prop); } + /* + * Read the contents of the block in from STDIN to buf + */ (void) ssread(buf, drrw->drr_length, &zc); + /* + * If in dump mode + */ + if (dump) { + print_block(buf, drrw->drr_length); + } total_write_size += drrw->drr_length; break; @@ -390,6 +502,9 @@ main(int argc, char *argv[]) drrs->drr_length); } (void) ssread(buf, drrs->drr_length, &zc); + if (dump) { + print_block(buf, drrs->drr_length); + } break; } pcksum = zc; From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 04:53:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A705C83; Tue, 15 Jul 2014 04:53:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 740A328C7; Tue, 15 Jul 2014 04:53:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6F4rcDv020692; Tue, 15 Jul 2014 04:53:38 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6F4rYxA020667; Tue, 15 Jul 2014 04:53:34 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201407150453.s6F4rYxA020667@svn.freebsd.org> From: Xin LI Date: Tue, 15 Jul 2014 04:53:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268649 - in stable/10: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/cmd/zstreamdump cddl/contrib/openso... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 04:53:38 -0000 Author: delphij Date: Tue Jul 15 04:53:34 2014 New Revision: 268649 URL: http://svnweb.freebsd.org/changeset/base/268649 Log: MFC r268075: MFV r267565: 4757 ZFS embedded-data block pointers ("zero block compression") 4913 zfs release should not be subject to space checks Added: stable/10/sys/cddl/boot/zfs/blkptr.c - copied unchanged from r268075, head/sys/cddl/boot/zfs/blkptr.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/blkptr.c - copied unchanged from r268075, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/blkptr.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/blkptr.h - copied unchanged from r268075, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/blkptr.h Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 stable/10/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c stable/10/cddl/contrib/opensolaris/cmd/ztest/ztest.c stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c stable/10/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c stable/10/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h stable/10/cddl/sbin/zpool/Makefile stable/10/cddl/usr.bin/zinject/Makefile stable/10/cddl/usr.sbin/zdb/Makefile stable/10/cddl/usr.sbin/zhack/Makefile stable/10/sys/boot/zfs/zfsimpl.c stable/10/sys/cddl/boot/zfs/README stable/10/sys/cddl/boot/zfs/zfsimpl.h stable/10/sys/cddl/boot/zfs/zfssubr.c stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.c stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.h stable/10/sys/cddl/contrib/opensolaris/uts/common/Makefile.files stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_impl.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_send.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c stable/10/sys/conf/files Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c Tue Jul 15 04:44:06 2014 (r268648) +++ stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c Tue Jul 15 04:53:34 2014 (r268649) @@ -1059,8 +1059,17 @@ snprintf_blkptr_compact(char *blkbuf, si return; } - blkbuf[0] = '\0'; + if (BP_IS_EMBEDDED(bp)) { + (void) sprintf(blkbuf, + "EMBEDDED et=%u %llxL/%llxP B=%llu", + (int)BPE_GET_ETYPE(bp), + (u_longlong_t)BPE_GET_LSIZE(bp), + (u_longlong_t)BPE_GET_PSIZE(bp), + (u_longlong_t)bp->blk_birth); + return; + } + blkbuf[0] = '\0'; for (int i = 0; i < ndvas; i++) (void) snprintf(blkbuf + strlen(blkbuf), buflen - strlen(blkbuf), "%llu:%llx:%llx ", @@ -1078,7 +1087,7 @@ snprintf_blkptr_compact(char *blkbuf, si "%llxL/%llxP F=%llu B=%llu/%llu", (u_longlong_t)BP_GET_LSIZE(bp), (u_longlong_t)BP_GET_PSIZE(bp), - (u_longlong_t)bp->blk_fill, + (u_longlong_t)BP_GET_FILL(bp), (u_longlong_t)bp->blk_birth, (u_longlong_t)BP_PHYSICAL_BIRTH(bp)); } @@ -1091,8 +1100,10 @@ print_indirect(blkptr_t *bp, const zbook char blkbuf[BP_SPRINTF_LEN]; int l; - ASSERT3U(BP_GET_TYPE(bp), ==, dnp->dn_type); - ASSERT3U(BP_GET_LEVEL(bp), ==, zb->zb_level); + if (!BP_IS_EMBEDDED(bp)) { + ASSERT3U(BP_GET_TYPE(bp), ==, dnp->dn_type); + ASSERT3U(BP_GET_LEVEL(bp), ==, zb->zb_level); + } (void) printf("%16llx ", (u_longlong_t)blkid2offset(dnp, bp, zb)); @@ -1146,10 +1157,10 @@ visit_indirect(spa_t *spa, const dnode_p err = visit_indirect(spa, dnp, cbp, &czb); if (err) break; - fill += cbp->blk_fill; + fill += BP_GET_FILL(cbp); } if (!err) - ASSERT3U(fill, ==, bp->blk_fill); + ASSERT3U(fill, ==, BP_GET_FILL(bp)); (void) arc_buf_remove_ref(buf, &buf); } @@ -1816,14 +1827,14 @@ dump_dir(objset_t *os) if (dds.dds_type == DMU_OST_META) { dds.dds_creation_txg = TXG_INITIAL; - usedobjs = os->os_rootbp->blk_fill; + usedobjs = BP_GET_FILL(os->os_rootbp); refdbytes = os->os_spa->spa_dsl_pool-> dp_mos_dir->dd_phys->dd_used_bytes; } else { dmu_objset_space(os, &refdbytes, &scratch, &usedobjs, &scratch); } - ASSERT3U(usedobjs, ==, os->os_rootbp->blk_fill); + ASSERT3U(usedobjs, ==, BP_GET_FILL(os->os_rootbp)); zdb_nicenum(refdbytes, numbuf); @@ -2134,6 +2145,9 @@ typedef struct zdb_cb { zdb_blkstats_t zcb_type[ZB_TOTAL + 1][ZDB_OT_TOTAL + 1]; uint64_t zcb_dedup_asize; uint64_t zcb_dedup_blocks; + uint64_t zcb_embedded_blocks[NUM_BP_EMBEDDED_TYPES]; + uint64_t zcb_embedded_histogram[NUM_BP_EMBEDDED_TYPES] + [BPE_PAYLOAD_SIZE]; uint64_t zcb_start; uint64_t zcb_lastprint; uint64_t zcb_totalasize; @@ -2188,6 +2202,13 @@ zdb_count_block(zdb_cb_t *zcb, zilog_t * } + if (BP_IS_EMBEDDED(bp)) { + zcb->zcb_embedded_blocks[BPE_GET_ETYPE(bp)]++; + zcb->zcb_embedded_histogram[BPE_GET_ETYPE(bp)] + [BPE_GET_PSIZE(bp)]++; + return; + } + if (dump_opt['L']) return; @@ -2287,7 +2308,8 @@ zdb_blkptr_cb(spa_t *spa, zilog_t *zilog is_metadata = (BP_GET_LEVEL(bp) != 0 || DMU_OT_IS_METADATA(type)); - if (dump_opt['c'] > 1 || (dump_opt['c'] && is_metadata)) { + if (!BP_IS_EMBEDDED(bp) && + (dump_opt['c'] > 1 || (dump_opt['c'] && is_metadata))) { size_t size = BP_GET_PSIZE(bp); void *data = zio_data_buf_alloc(size); int flags = ZIO_FLAG_CANFAIL | ZIO_FLAG_SCRUB | ZIO_FLAG_RAW; @@ -2479,7 +2501,7 @@ dump_block_stats(spa_t *spa) zdb_blkstats_t *zb, *tzb; uint64_t norm_alloc, norm_space, total_alloc, total_found; int flags = TRAVERSE_PRE | TRAVERSE_PREFETCH_METADATA | TRAVERSE_HARD; - int leaks = 0; + boolean_t leaks = B_FALSE; (void) printf("\nTraversing all blocks %s%s%s%s%s...\n\n", (dump_opt['c'] || !dump_opt['L']) ? "to verify " : "", @@ -2567,7 +2589,7 @@ dump_block_stats(spa_t *spa) (u_longlong_t)total_alloc, (dump_opt['L']) ? "unreachable" : "leaked", (longlong_t)(total_alloc - total_found)); - leaks = 1; + leaks = B_TRUE; } if (tzb->zb_count == 0) @@ -2599,6 +2621,23 @@ dump_block_stats(spa_t *spa) (void) printf("\tSPA allocated: %10llu used: %5.2f%%\n", (u_longlong_t)norm_alloc, 100.0 * norm_alloc / norm_space); + for (bp_embedded_type_t i = 0; i < NUM_BP_EMBEDDED_TYPES; i++) { + if (zcb.zcb_embedded_blocks[i] == 0) + continue; + (void) printf("\n"); + (void) printf("\tadditional, non-pointer bps of type %u: " + "%10llu\n", + i, (u_longlong_t)zcb.zcb_embedded_blocks[i]); + + if (dump_opt['b'] >= 3) { + (void) printf("\t number of (compressed) bytes: " + "number of bps\n"); + dump_histogram(zcb.zcb_embedded_histogram[i], + sizeof (zcb.zcb_embedded_histogram[i]) / + sizeof (zcb.zcb_embedded_histogram[i][0]), 0); + } + } + if (tzb->zb_ditto_samevdev != 0) { (void) printf("\tDittoed blocks on same vdev: %llu\n", (longlong_t)tzb->zb_ditto_samevdev); @@ -2711,14 +2750,14 @@ zdb_ddt_add_cb(spa_t *spa, zilog_t *zilo avl_index_t where; zdb_ddt_entry_t *zdde, zdde_search; - if (BP_IS_HOLE(bp)) + if (BP_IS_HOLE(bp) || BP_IS_EMBEDDED(bp)) return (0); if (dump_opt['S'] > 1 && zb->zb_level == ZB_ROOT_LEVEL) { (void) printf("traversing objset %llu, %llu objects, " "%lu blocks so far\n", (u_longlong_t)zb->zb_objset, - (u_longlong_t)bp->blk_fill, + (u_longlong_t)BP_GET_FILL(bp), avl_numnodes(t)); } Modified: stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Jul 15 04:44:06 2014 (r268648) +++ stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Jul 15 04:53:34 2014 (r268649) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 27, 2014 +.Dd June 30, 2014 .Dt ZFS 8 .Os .Sh NAME @@ -179,11 +179,12 @@ .Ar bookmark .Nm .Cm send -.Op Fl DnPpRv +.Op Fl DnPpRve .Op Fl i Ar snapshot | Fl I Ar snapshot .Ar snapshot .Nm .Cm send +.Op Fl e .Op Fl i Ar snapshot Ns | Ns bookmark .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot .Nm @@ -2476,7 +2477,7 @@ feature. .It Xo .Nm .Cm send -.Op Fl DnPpRv +.Op Fl DnPpRve .Op Fl i Ar snapshot | Fl I Ar snapshot .Ar snapshot .Xc @@ -2548,6 +2549,29 @@ be used regardless of the dataset's property, but performance will be much better if the filesystem uses a dedup-capable checksum (eg. .Sy sha256 ) . +.It Fl e +Generate a more compact stream by using WRITE_EMBEDDED records for blocks +which are stored more compactly on disk by the +.Sy embedded_data +pool +feature. +This flag has no effect if the +.Sy embedded_data +feature is +disabled. +The receiving system must have the +.Sy embedded_data +feature +enabled. +If the +.Sy lz4_compress +feature is active on the sending system, +then the receiving system must have that feature enabled as well. +See +.Xr zpool-features 7 +for details on ZFS feature flags and the +.Sy embedded_data +feature. .It Fl p Include the dataset's properties in the stream. This flag is implicit when .Fl R @@ -2572,6 +2596,7 @@ on future versions of .It Xo .Nm .Cm send +.Op Fl e .Op Fl i Ar snapshot Ns | Ns Ar bookmark .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot .Xc @@ -2597,6 +2622,29 @@ specified as the last component of the n If the incremental target is a clone, the incremental source can be the origin snapshot, or an earlier snapshot in the origin's filesystem, or the origin's origin, etc. +.It Fl e +Generate a more compact stream by using WRITE_EMBEDDED records for blocks +which are stored more compactly on disk by the +.Sy embedded_data +pool +feature. +This flag has no effect if the +.Sy embedded_data +feature is +disabled. +The receiving system must have the +.Sy embedded_data +feature +enabled. +If the +.Sy lz4_compress +feature is active on the sending system, +then the receiving system must have that feature enabled as well. +See +.Xr zpool-features 7 +for details on ZFS feature flags and the +.Sy embedded_data +feature. .El .It Xo .Nm Modified: stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Tue Jul 15 04:44:06 2014 (r268648) +++ stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Tue Jul 15 04:53:34 2014 (r268649) @@ -274,9 +274,9 @@ get_usage(zfs_help_t idx) case HELP_ROLLBACK: return (gettext("\trollback [-rRf] \n")); case HELP_SEND: - return (gettext("\tsend [-DnPpRv] [-[iI] snapshot] " + return (gettext("\tsend [-DnPpRve] [-[iI] snapshot] " "\n" - "\tsend [-i snapshot|bookmark] " + "\tsend [-e] [-i snapshot|bookmark] " "\n")); case HELP_SET: return (gettext("\tset " @@ -590,6 +590,7 @@ finish_progress(char *done) free(pt_header); pt_header = NULL; } + /* * zfs clone [-p] [-o prop=value] ... * @@ -3368,6 +3369,7 @@ rollback_check_dependent(zfs_handle_t *z zfs_close(zhp); return (0); } + /* * Report any snapshots more recent than the one specified. Used when '-r' is * not specified. We reuse this same callback for the snapshot dependents - if @@ -3707,7 +3709,7 @@ zfs_do_send(int argc, char **argv) boolean_t extraverbose = B_FALSE; /* check options */ - while ((c = getopt(argc, argv, ":i:I:RDpvnP")) != -1) { + while ((c = getopt(argc, argv, ":i:I:RDpvnPe")) != -1) { switch (c) { case 'i': if (fromname) @@ -3742,6 +3744,9 @@ zfs_do_send(int argc, char **argv) case 'n': flags.dryrun = B_TRUE; break; + case 'e': + flags.embed_data = B_TRUE; + break; case ':': (void) fprintf(stderr, gettext("missing argument for " "'%c' option\n"), optopt); @@ -3780,6 +3785,7 @@ zfs_do_send(int argc, char **argv) if (strchr(argv[0], '@') == NULL || (fromname && strchr(fromname, '#') != NULL)) { char frombuf[ZFS_MAXNAMELEN]; + enum lzc_send_flags lzc_flags = 0; if (flags.replicate || flags.doall || flags.props || flags.dedup || flags.dryrun || flags.verbose || @@ -3794,6 +3800,9 @@ zfs_do_send(int argc, char **argv) if (zhp == NULL) return (1); + if (flags.embed_data) + lzc_flags |= LZC_SEND_FLAG_EMBED_DATA; + if (fromname != NULL && (fromname[0] == '#' || fromname[0] == '@')) { /* @@ -3807,7 +3816,7 @@ zfs_do_send(int argc, char **argv) (void) strlcat(frombuf, fromname, sizeof (frombuf)); fromname = frombuf; } - err = zfs_send_one(zhp, fromname, STDOUT_FILENO); + err = zfs_send_one(zhp, fromname, STDOUT_FILENO, lzc_flags); zfs_close(zhp); return (err != 0); } Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Tue Jul 15 04:44:06 2014 (r268648) +++ stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Tue Jul 15 04:53:34 2014 (r268649) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 23, 2014 +.Dd June 30, 2014 .Dt ZPOOL-FEATURES 7 .Os .Sh NAME @@ -396,6 +396,34 @@ This feature becomes as soon as it is enabled and will never return to being .Sy enabled . +.It Sy embedded_data +.Bl -column "READ\-ONLY COMPATIBLE" "com.delphix:embedded_data" +.It GUID Ta com.delphix:embedded_data +.It READ\-ONLY COMPATIBLE Ta no +.It DEPENDENCIES Ta none +.El +.Pp +This feature improves the performance and compression ratio of +highly-compressible blocks. +Blocks whose contents can compress to 112 bytes +or smaller can take advantage of this feature. +.Pp +When this feature is enabled, the contents of highly-compressible blocks are +stored in the block "pointer" itself +.Po a misnomer in this case, as it contains +the compresseed data, rather than a pointer to its location on disk +.Pc . +Thus +the space of the block +.Pq one sector, typically 512 bytes or 4KB +is saved, +and no additional i/o is needed to read and write the data block. +.Pp +This feature becomes +.Sy active +as soon as it is enabled and will +never return to being +.Sy enabled . .El .Sh SEE ALSO .Xr zpool 8 Modified: stable/10/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c Tue Jul 15 04:44:06 2014 (r268648) +++ stable/10/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c Tue Jul 15 04:53:34 2014 (r268649) @@ -49,7 +49,6 @@ */ #define DUMP_GROUPING 4 -uint64_t drr_record_count[DRR_NUMTYPES]; uint64_t total_write_size = 0; uint64_t total_stream_len = 0; FILE *send_stream = 0; @@ -123,7 +122,7 @@ print_block(char *buf, int length) * Start printing ASCII characters at a constant offset, after * the hex prints. Leave 3 characters per byte on a line (2 digit * hex number plus 1 space) plus spaces between characters and - * groupings + * groupings. */ int ascii_start = BYTES_PER_LINE * 3 + BYTES_PER_LINE / DUMP_GROUPING + 2; @@ -160,6 +159,8 @@ int main(int argc, char *argv[]) { char *buf = malloc(INITIAL_BUFLEN); + uint64_t drr_record_count[DRR_NUMTYPES] = { 0 }; + uint64_t total_records = 0; dmu_replay_record_t thedrr; dmu_replay_record_t *drr = &thedrr; struct drr_begin *drrb = &thedrr.drr_u.drr_begin; @@ -170,6 +171,7 @@ main(int argc, char *argv[]) struct drr_write_byref *drrwbr = &thedrr.drr_u.drr_write_byref; struct drr_free *drrf = &thedrr.drr_u.drr_free; struct drr_spill *drrs = &thedrr.drr_u.drr_spill; + struct drr_write_embedded *drrwe = &thedrr.drr_u.drr_write_embedded; char c; boolean_t verbose = B_FALSE; boolean_t first = B_TRUE; @@ -264,6 +266,7 @@ main(int argc, char *argv[]) } drr_record_count[drr->drr_type]++; + total_records++; switch (drr->drr_type) { case DRR_BEGIN: @@ -376,8 +379,8 @@ main(int argc, char *argv[]) drro->drr_bonuslen); } if (drro->drr_bonuslen > 0) { - (void) ssread(buf, P2ROUNDUP(drro->drr_bonuslen, - 8), &zc); + (void) ssread(buf, + P2ROUNDUP(drro->drr_bonuslen, 8), &zc); if (dump) { print_block(buf, P2ROUNDUP(drro->drr_bonuslen, 8)); @@ -506,6 +509,38 @@ main(int argc, char *argv[]) print_block(buf, drrs->drr_length); } break; + case DRR_WRITE_EMBEDDED: + if (do_byteswap) { + drrwe->drr_object = + BSWAP_64(drrwe->drr_object); + drrwe->drr_offset = + BSWAP_64(drrwe->drr_offset); + drrwe->drr_length = + BSWAP_64(drrwe->drr_length); + drrwe->drr_toguid = + BSWAP_64(drrwe->drr_toguid); + drrwe->drr_lsize = + BSWAP_32(drrwe->drr_lsize); + drrwe->drr_psize = + BSWAP_32(drrwe->drr_psize); + } + if (verbose) { + (void) printf("WRITE_EMBEDDED object = %llu " + "offset = %llu length = %llu\n" + "toguid = %llx comp = %u etype = %u " + "lsize = %u psize = %u\n", + (u_longlong_t)drrwe->drr_object, + (u_longlong_t)drrwe->drr_offset, + (u_longlong_t)drrwe->drr_length, + (u_longlong_t)drrwe->drr_toguid, + drrwe->drr_compression, + drrwe->drr_etype, + drrwe->drr_lsize, + drrwe->drr_psize); + } + (void) ssread(buf, + P2ROUNDUP(drrwe->drr_psize, 8), &zc); + break; } pcksum = zc; } @@ -524,18 +559,16 @@ main(int argc, char *argv[]) (u_longlong_t)drr_record_count[DRR_FREEOBJECTS]); (void) printf("\tTotal DRR_WRITE records = %lld\n", (u_longlong_t)drr_record_count[DRR_WRITE]); + (void) printf("\tTotal DRR_WRITE_BYREF records = %lld\n", + (u_longlong_t)drr_record_count[DRR_WRITE_BYREF]); + (void) printf("\tTotal DRR_WRITE_EMBEDDED records = %lld\n", + (u_longlong_t)drr_record_count[DRR_WRITE_EMBEDDED]); (void) printf("\tTotal DRR_FREE records = %lld\n", (u_longlong_t)drr_record_count[DRR_FREE]); (void) printf("\tTotal DRR_SPILL records = %lld\n", (u_longlong_t)drr_record_count[DRR_SPILL]); (void) printf("\tTotal records = %lld\n", - (u_longlong_t)(drr_record_count[DRR_BEGIN] + - drr_record_count[DRR_OBJECT] + - drr_record_count[DRR_FREEOBJECTS] + - drr_record_count[DRR_WRITE] + - drr_record_count[DRR_FREE] + - drr_record_count[DRR_SPILL] + - drr_record_count[DRR_END])); + (u_longlong_t)total_records); (void) printf("\tTotal write size = %lld (0x%llx)\n", (u_longlong_t)total_write_size, (u_longlong_t)total_write_size); (void) printf("\tTotal stream length = %lld (0x%llx)\n", Modified: stable/10/cddl/contrib/opensolaris/cmd/ztest/ztest.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/ztest/ztest.c Tue Jul 15 04:44:06 2014 (r268648) +++ stable/10/cddl/contrib/opensolaris/cmd/ztest/ztest.c Tue Jul 15 04:53:34 2014 (r268649) @@ -53,7 +53,7 @@ * At random times, the child self-immolates with a SIGKILL. * This is the software equivalent of pulling the power cord. * The parent then runs the test again, using the existing - * storage pool, as many times as desired. If backwards compatability + * storage pool, as many times as desired. If backwards compatibility * testing is enabled ztest will sometimes run the "older" version * of ztest after a SIGKILL. * @@ -1267,13 +1267,13 @@ static void ztest_bt_verify(ztest_block_tag_t *bt, objset_t *os, uint64_t object, uint64_t offset, uint64_t gen, uint64_t txg, uint64_t crtxg) { - ASSERT(bt->bt_magic == BT_MAGIC); - ASSERT(bt->bt_objset == dmu_objset_id(os)); - ASSERT(bt->bt_object == object); - ASSERT(bt->bt_offset == offset); - ASSERT(bt->bt_gen <= gen); - ASSERT(bt->bt_txg <= txg); - ASSERT(bt->bt_crtxg == crtxg); + ASSERT3U(bt->bt_magic, ==, BT_MAGIC); + ASSERT3U(bt->bt_objset, ==, dmu_objset_id(os)); + ASSERT3U(bt->bt_object, ==, object); + ASSERT3U(bt->bt_offset, ==, offset); + ASSERT3U(bt->bt_gen, <=, gen); + ASSERT3U(bt->bt_txg, <=, txg); + ASSERT3U(bt->bt_crtxg, ==, crtxg); } static ztest_block_tag_t * @@ -3472,6 +3472,11 @@ ztest_dsl_dataset_promote_busy(ztest_ds_ if (error) fatal(0, "dmu_objset_own(%s) = %d", snap2name, error); error = dsl_dataset_promote(clone2name, NULL); + if (error == ENOSPC) { + dmu_objset_disown(os, FTAG); + ztest_record_enospc(FTAG); + goto out; + } if (error != EBUSY) fatal(0, "dsl_dataset_promote(%s), %d, not EBUSY", clone2name, error); @@ -3627,11 +3632,19 @@ ztest_dmu_read_write(ztest_ds_t *zd, uin return; } - dmu_object_set_checksum(os, bigobj, - (enum zio_checksum)ztest_random_dsl_prop(ZFS_PROP_CHECKSUM), tx); + enum zio_checksum cksum; + do { + cksum = (enum zio_checksum) + ztest_random_dsl_prop(ZFS_PROP_CHECKSUM); + } while (cksum >= ZIO_CHECKSUM_LEGACY_FUNCTIONS); + dmu_object_set_checksum(os, bigobj, cksum, tx); - dmu_object_set_compress(os, bigobj, - (enum zio_compress)ztest_random_dsl_prop(ZFS_PROP_COMPRESSION), tx); + enum zio_compress comp; + do { + comp = (enum zio_compress) + ztest_random_dsl_prop(ZFS_PROP_COMPRESSION); + } while (comp >= ZIO_COMPRESS_LEGACY_FUNCTIONS); + dmu_object_set_compress(os, bigobj, comp, tx); /* * For each index from n to n + s, verify that the existing bufwad @@ -4711,8 +4724,13 @@ ztest_dmu_snapshot_hold(ztest_ds_t *zd, error = dsl_dataset_user_hold(holds, 0, NULL); fnvlist_free(holds); - if (error) - fatal(0, "dsl_dataset_user_hold(%s)", fullname, tag); + if (error == ENOSPC) { + ztest_record_enospc("dsl_dataset_user_hold"); + goto out; + } else if (error) { + fatal(0, "dsl_dataset_user_hold(%s, %s) = %u", + fullname, tag, error); + } error = dsl_destroy_snapshot(fullname, B_FALSE); if (error != EBUSY) { @@ -5165,7 +5183,7 @@ ztest_run_zdb(char *pool) isa = strdup(isa); /* LINTED */ (void) sprintf(bin, - "/usr/sbin%.*s/zdb -bcc%s%s -U %s %s", + "/usr/sbin%.*s/zdb -bcc%s%s -d -U %s %s", isalen, isa, ztest_opts.zo_verbose >= 3 ? "s" : "", Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Tue Jul 15 04:44:06 2014 (r268648) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Tue Jul 15 04:53:34 2014 (r268649) @@ -42,6 +42,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { @@ -607,13 +608,16 @@ typedef struct sendflags { /* show progress (ie. -v) */ boolean_t progress; + + /* WRITE_EMBEDDED records of type DATA are permitted */ + boolean_t embed_data; } sendflags_t; typedef boolean_t (snapfilter_cb_t)(zfs_handle_t *, void *); extern int zfs_send(zfs_handle_t *, const char *, const char *, sendflags_t *, int, snapfilter_cb_t, void *, nvlist_t **); -extern int zfs_send_one(zfs_handle_t *, const char *, int); +extern int zfs_send_one(zfs_handle_t *, const char *, int, enum lzc_send_flags); extern int zfs_promote(zfs_handle_t *); extern int zfs_hold(zfs_handle_t *, const char *, const char *, Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Tue Jul 15 04:44:06 2014 (r268648) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Tue Jul 15 04:53:34 2014 (r268649) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2012 Pawel Jakub Dawidek . * All rights reserved. @@ -45,6 +45,7 @@ #include #include +#include #include "zfs_namecheck.h" #include "zfs_prop.h" @@ -222,6 +223,7 @@ cksummer(void *arg) struct drr_object *drro = &thedrr.drr_u.drr_object; struct drr_write *drrw = &thedrr.drr_u.drr_write; struct drr_spill *drrs = &thedrr.drr_u.drr_spill; + struct drr_write_embedded *drrwe = &thedrr.drr_u.drr_write_embedded; FILE *ofp; int outfd; dmu_replay_record_t wbr_drr = {0}; @@ -418,6 +420,20 @@ cksummer(void *arg) break; } + case DRR_WRITE_EMBEDDED: + { + if (cksum_and_write(drr, sizeof (dmu_replay_record_t), + &stream_cksum, outfd) == -1) + goto out; + (void) ssread(buf, + P2ROUNDUP((uint64_t)drrwe->drr_psize, 8), ofp); + if (cksum_and_write(buf, + P2ROUNDUP((uint64_t)drrwe->drr_psize, 8), + &stream_cksum, outfd) == -1) + goto out; + break; + } + case DRR_FREE: { if (cksum_and_write(drr, sizeof (dmu_replay_record_t), @@ -799,7 +815,7 @@ typedef struct send_dump_data { char prevsnap[ZFS_MAXNAMELEN]; uint64_t prevsnap_obj; boolean_t seenfrom, seento, replicate, doall, fromorigin; - boolean_t verbose, dryrun, parsable, progress; + boolean_t verbose, dryrun, parsable, progress, embed_data; int outfd; boolean_t err; nvlist_t *fss; @@ -878,7 +894,8 @@ estimate_ioctl(zfs_handle_t *zhp, uint64 */ static int dump_ioctl(zfs_handle_t *zhp, const char *fromsnap, uint64_t fromsnap_obj, - boolean_t fromorigin, int outfd, nvlist_t *debugnv) + boolean_t fromorigin, int outfd, enum lzc_send_flags flags, + nvlist_t *debugnv) { zfs_cmd_t zc = { 0 }; libzfs_handle_t *hdl = zhp->zfs_hdl; @@ -892,6 +909,7 @@ dump_ioctl(zfs_handle_t *zhp, const char zc.zc_obj = fromorigin; zc.zc_sendobj = zfs_prop_get_int(zhp, ZFS_PROP_OBJSETID); zc.zc_fromobj = fromsnap_obj; + zc.zc_flags = flags; VERIFY(0 == nvlist_alloc(&thisdbg, NV_UNIQUE_NAME, 0)); if (fromsnap && fromsnap[0] != '\0') { @@ -1144,8 +1162,12 @@ dump_snapshot(zfs_handle_t *zhp, void *a } } + enum lzc_send_flags flags = 0; + if (sdd->embed_data) + flags |= LZC_SEND_FLAG_EMBED_DATA; + err = dump_ioctl(zhp, sdd->prevsnap, sdd->prevsnap_obj, - fromorigin, sdd->outfd, sdd->debugnv); + fromorigin, sdd->outfd, flags, sdd->debugnv); if (sdd->progress) { (void) pthread_cancel(tid); @@ -1489,6 +1511,7 @@ zfs_send(zfs_handle_t *zhp, const char * sdd.parsable = flags->parsable; sdd.progress = flags->progress; sdd.dryrun = flags->dryrun; + sdd.embed_data = flags->embed_data; sdd.filter_cb = filter_func; sdd.filter_cb_arg = cb_arg; if (debugnvp) @@ -1620,7 +1643,8 @@ err_out: } int -zfs_send_one(zfs_handle_t *zhp, const char *from, int fd) +zfs_send_one(zfs_handle_t *zhp, const char *from, int fd, + enum lzc_send_flags flags) { int err; libzfs_handle_t *hdl = zhp->zfs_hdl; @@ -1629,7 +1653,7 @@ zfs_send_one(zfs_handle_t *zhp, const ch (void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN, "warning: cannot send '%s'"), zhp->zfs_name); - err = lzc_send(zhp->zfs_name, from, fd); + err = lzc_send(zhp->zfs_name, from, fd, flags); if (err != 0) { switch (errno) { case EXDEV: @@ -2576,6 +2600,16 @@ recv_skip(libzfs_handle_t *hdl, int fd, (void) recv_read(hdl, fd, buf, drr->drr_u.drr_spill.drr_length, B_FALSE, NULL); break; + case DRR_WRITE_EMBEDDED: + if (byteswap) { + drr->drr_u.drr_write_embedded.drr_psize = + BSWAP_32(drr->drr_u.drr_write_embedded. + drr_psize); + } + (void) recv_read(hdl, fd, buf, + P2ROUNDUP(drr->drr_u.drr_write_embedded.drr_psize, + 8), B_FALSE, NULL); + break; case DRR_WRITE_BYREF: case DRR_FREEOBJECTS: case DRR_FREE: Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c Tue Jul 15 04:44:06 2014 (r268648) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c Tue Jul 15 04:53:34 2014 (r268649) @@ -486,6 +486,8 @@ lzc_get_holds(const char *snapname, nvli } /* + * Generate a zfs send stream for the specified snapshot and write it to + * the specified file descriptor. * * "snapname" is the full name of the snapshot to send (e.g. "pool/fs@snap") * @@ -499,9 +501,15 @@ lzc_get_holds(const char *snapname, nvli * snapshot in the origin, etc. * * "fd" is the file descriptor to write the send stream to. + * + * If "flags" contains LZC_SEND_FLAG_EMBED_DATA, the stream is permitted + * to contain DRR_WRITE_EMBEDDED records with drr_etype==BP_EMBEDDED_TYPE_DATA, + * which the receiving system must support (as indicated by support + * for the "embedded_data" feature). */ int -lzc_send(const char *snapname, const char *from, int fd) +lzc_send(const char *snapname, const char *from, int fd, + enum lzc_send_flags flags) { nvlist_t *args; int err; @@ -510,6 +518,8 @@ lzc_send(const char *snapname, const cha fnvlist_add_int32(args, "fd", fd); if (from != NULL) fnvlist_add_string(args, "fromsnap", from); + if (flags & LZC_SEND_FLAG_EMBED_DATA) + fnvlist_add_boolean(args, "embedok"); err = lzc_ioctl(ZFS_IOC_SEND_NEW, snapname, args, NULL); nvlist_free(args); return (err); Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h Tue Jul 15 04:44:06 2014 (r268648) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h Tue Jul 15 04:53:34 2014 (r268649) @@ -53,7 +53,11 @@ int lzc_hold(nvlist_t *, int, nvlist_t * int lzc_release(nvlist_t *, nvlist_t **); int lzc_get_holds(const char *, nvlist_t **); -int lzc_send(const char *, const char *, int); +enum lzc_send_flags { + LZC_SEND_FLAG_EMBED_DATA = 1 << 0 +}; + +int lzc_send(const char *, const char *, int, enum lzc_send_flags); int lzc_receive(const char *, nvlist_t *, const char *, boolean_t, int); int lzc_send_space(const char *, const char *, uint64_t *); Modified: stable/10/cddl/sbin/zpool/Makefile ============================================================================== --- stable/10/cddl/sbin/zpool/Makefile Tue Jul 15 04:44:06 2014 (r268648) +++ stable/10/cddl/sbin/zpool/Makefile Tue Jul 15 04:53:34 2014 (r268649) @@ -18,6 +18,7 @@ CFLAGS+= -I${.CURDIR}/../../../cddl/cont CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libuutil/common CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libumem/common CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs/common +CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs_core/common CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libnvpair CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common Modified: stable/10/cddl/usr.bin/zinject/Makefile ============================================================================== --- stable/10/cddl/usr.bin/zinject/Makefile Tue Jul 15 04:44:06 2014 (r268648) +++ stable/10/cddl/usr.bin/zinject/Makefile Tue Jul 15 04:53:34 2014 (r268649) @@ -11,6 +11,7 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/include CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/lib/libumem CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libzfs/common +CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libzfs_core/common CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libzpool/common CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libnvpair CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs Modified: stable/10/cddl/usr.sbin/zdb/Makefile ============================================================================== --- stable/10/cddl/usr.sbin/zdb/Makefile Tue Jul 15 04:44:06 2014 (r268648) +++ stable/10/cddl/usr.sbin/zdb/Makefile Tue Jul 15 04:53:34 2014 (r268649) @@ -15,6 +15,7 @@ CFLAGS+= -I${.CURDIR}/../../../cddl/comp CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libnvpair CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libuutil/common CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs/common +CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs_core/common CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common Modified: stable/10/cddl/usr.sbin/zhack/Makefile ============================================================================== --- stable/10/cddl/usr.sbin/zhack/Makefile Tue Jul 15 04:44:06 2014 (r268648) +++ stable/10/cddl/usr.sbin/zhack/Makefile Tue Jul 15 04:53:34 2014 (r268649) @@ -14,6 +14,7 @@ CFLAGS+= -I${.CURDIR}/../../../cddl/comp CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libnvpair CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libuutil/common CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs/common +CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs_core/common CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common Modified: stable/10/sys/boot/zfs/zfsimpl.c ============================================================================== --- stable/10/sys/boot/zfs/zfsimpl.c Tue Jul 15 04:44:06 2014 (r268648) +++ stable/10/sys/boot/zfs/zfsimpl.c Tue Jul 15 04:53:34 2014 (r268649) @@ -56,6 +56,7 @@ static const char *features_for_read[] = "org.illumos:lz4_compress", "com.delphix:hole_birth", "com.delphix:extensible_dataset", + "com.delphix:embedded_data", NULL }; @@ -1133,6 +1134,34 @@ zio_read(const spa_t *spa, const blkptr_ void *pbuf; int i, error; + /* + * Process data embedded in block pointer + */ + if (BP_IS_EMBEDDED(bp)) { + ASSERT(BPE_GET_ETYPE(bp) == BP_EMBEDDED_TYPE_DATA); + + size = BPE_GET_PSIZE(bp); + ASSERT(size <= BPE_PAYLOAD_SIZE); + + if (cpfunc != ZIO_COMPRESS_OFF) + pbuf = zfs_alloc(size); + else + pbuf = buf; + + decode_embedded_bp_compressed(bp, pbuf); + error = 0; + + if (cpfunc != ZIO_COMPRESS_OFF) { + error = zio_decompress_data(cpfunc, pbuf, + size, buf, BP_GET_LSIZE(bp)); + zfs_free(pbuf, size); + } + if (error != 0) + printf("ZFS: i/o error - unable to decompress block pointer data, error %d\n", + error); + return (error); + } + error = EIO; for (i = 0; i < SPA_DVAS_PER_BP; i++) { Modified: stable/10/sys/cddl/boot/zfs/README ============================================================================== --- stable/10/sys/cddl/boot/zfs/README Tue Jul 15 04:44:06 2014 (r268648) +++ stable/10/sys/cddl/boot/zfs/README Tue Jul 15 04:53:34 2014 (r268649) @@ -7,9 +7,10 @@ are used by the ZFS bootstrap: sha256.c checksum support lz4.c compression support lzjb.c compression support + blkptr.c ZFS embedded-data block pointers support zfssubr.c checksum, compression and raidz support zfsimpl.h mostly describing the physical layout -The files fletcher.c, lzjb.c and sha256.c are largely identical to the -ZFS base code (with write support removed) and could be shared but -that might complicate future imports from OpenSolaris. +The files fletcher.c, lzjb.c, lz4.c, sha256.c and blkptr.c are largely identical +to the ZFS base code (with write support removed) and could be shared but that +might complicate future imports from Illumos. Copied: stable/10/sys/cddl/boot/zfs/blkptr.c (from r268075, head/sys/cddl/boot/zfs/blkptr.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/cddl/boot/zfs/blkptr.c Tue Jul 15 04:53:34 2014 (r268649, copy of r268075, head/sys/cddl/boot/zfs/blkptr.c) @@ -0,0 +1,73 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2013 by Delphix. All rights reserved. + */ + +/* + * Embedded-data Block Pointers + * + * Normally, block pointers point (via their DVAs) to a block which holds data. + * If the data that we need to store is very small, this is an inefficient + * use of space, because a block must be at minimum 1 sector (typically 512 + * bytes or 4KB). Additionally, reading these small blocks tends to generate + * more random reads. + * + * Embedded-data Block Pointers allow small pieces of data (the "payload", + * up to 112 bytes) to be stored in the block pointer itself, instead of + * being pointed to. The "Pointer" part of this name is a bit of a + * misnomer, as nothing is pointed to. + * + * BP_EMBEDDED_TYPE_DATA block pointers allow highly-compressible data to + * be embedded in the block pointer. The logic for this is handled in + * the SPA, by the zio pipeline. Therefore most code outside the zio + * pipeline doesn't need special-cases to handle these block pointers. + * + * See spa.h for details on the exact layout of embedded block pointers. + */ + +/* + * buf must be at least BPE_GET_PSIZE(bp) bytes long (which will never be + * more than BPE_PAYLOAD_SIZE bytes). + */ +void +decode_embedded_bp_compressed(const blkptr_t *bp, void *buf) +{ + int psize; + uint8_t *buf8 = buf; + uint64_t w = 0; + const uint64_t *bp64 = (const uint64_t *)bp; + + ASSERT(BP_IS_EMBEDDED(bp)); + + psize = BPE_GET_PSIZE(bp); + + /* + * Decode the words of the block pointer into the byte array. + * Low bits of first word are the first byte (little endian). + */ + for (int i = 0; i < psize; i++) { + if (i % sizeof (w) == 0) { + /* beginning of a word */ + ASSERT3P(bp64, <, bp + 1); + w = *bp64; + bp64++; + if (!BPE_IS_PAYLOADWORD(bp, bp64)) + bp64++; + } + buf8[i] = BF64_GET(w, (i % sizeof (w)) * NBBY, NBBY); + } +} Modified: stable/10/sys/cddl/boot/zfs/zfsimpl.h ============================================================================== --- stable/10/sys/cddl/boot/zfs/zfsimpl.h Tue Jul 15 04:44:06 2014 (r268648) +++ stable/10/sys/cddl/boot/zfs/zfsimpl.h Tue Jul 15 04:53:34 2014 (r268649) @@ -55,9 +55,14 @@ /* * Copyright 2013 by Saso Kiselkov. All rights reserved. */ +/* + * Copyright (c) 2013 by Delphix. All rights reserved. + */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 05:00:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6AB1AE1C; Tue, 15 Jul 2014 05:00:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5443528F8; Tue, 15 Jul 2014 05:00:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6F50o4g022659; Tue, 15 Jul 2014 05:00:50 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6F50kNZ022473; Tue, 15 Jul 2014 05:00:46 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201407150500.s6F50kNZ022473@svn.freebsd.org> From: Xin LI Date: Tue, 15 Jul 2014 05:00:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268650 - in stable/10: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zf... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 05:00:50 -0000 Author: delphij Date: Tue Jul 15 05:00:46 2014 New Revision: 268650 URL: http://svnweb.freebsd.org/changeset/base/268650 Log: MFC r268079: MFV r267566: 4390 i/o errors when deleting filesystem/zvol can lead to space map corruption Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c stable/10/sys/cddl/contrib/opensolaris/common/zfs/zpool_prop.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/bptree.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_scan.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_debug.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_debug.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c Tue Jul 15 04:53:34 2014 (r268649) +++ stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c Tue Jul 15 05:00:46 2014 (r268650) @@ -75,9 +75,9 @@ DMU_OT_ZAP_OTHER : DMU_OT_NUMTYPES)) #ifndef lint -extern int zfs_recover; +extern boolean_t zfs_recover; #else -int zfs_recover; +boolean_t zfs_recover; #endif const char cmdname[] = "zdb"; Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Tue Jul 15 04:53:34 2014 (r268649) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Tue Jul 15 05:00:46 2014 (r268650) @@ -303,6 +303,7 @@ zpool_get_prop(zpool_handle_t *zhp, zpoo case ZPOOL_PROP_ALLOCATED: case ZPOOL_PROP_FREE: case ZPOOL_PROP_FREEING: + case ZPOOL_PROP_LEAKED: case ZPOOL_PROP_EXPANDSZ: if (literal) { (void) snprintf(buf, len, "%llu", Modified: stable/10/sys/cddl/contrib/opensolaris/common/zfs/zpool_prop.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/common/zfs/zpool_prop.c Tue Jul 15 04:53:34 2014 (r268649) +++ stable/10/sys/cddl/contrib/opensolaris/common/zfs/zpool_prop.c Tue Jul 15 05:00:46 2014 (r268650) @@ -81,6 +81,8 @@ zpool_prop_init(void) ZFS_TYPE_POOL, "", "FREE"); zprop_register_number(ZPOOL_PROP_FREEING, "freeing", 0, PROP_READONLY, ZFS_TYPE_POOL, "", "FREEING"); + zprop_register_number(ZPOOL_PROP_LEAKED, "leaked", 0, PROP_READONLY, + ZFS_TYPE_POOL, "", "LEAKED"); zprop_register_number(ZPOOL_PROP_ALLOCATED, "allocated", 0, PROP_READONLY, ZFS_TYPE_POOL, "", "ALLOC"); zprop_register_number(ZPOOL_PROP_EXPANDSZ, "expandsize", 0, Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c Tue Jul 15 04:53:34 2014 (r268649) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c Tue Jul 15 05:00:46 2014 (r268650) @@ -102,13 +102,27 @@ bptree_free(objset_t *os, uint64_t obj, return (dmu_object_free(os, obj, tx)); } +boolean_t +bptree_is_empty(objset_t *os, uint64_t obj) +{ + dmu_buf_t *db; + bptree_phys_t *bt; + boolean_t rv; + + VERIFY0(dmu_bonus_hold(os, obj, FTAG, &db)); + bt = db->db_data; + rv = (bt->bt_begin == bt->bt_end); + dmu_buf_rele(db, FTAG); + return (rv); +} + void bptree_add(objset_t *os, uint64_t obj, blkptr_t *bp, uint64_t birth_txg, uint64_t bytes, uint64_t comp, uint64_t uncomp, dmu_tx_t *tx) { dmu_buf_t *db; bptree_phys_t *bt; - bptree_entry_phys_t bte; + bptree_entry_phys_t bte = { 0 }; /* * bptree objects are in the pool mos, therefore they can only be @@ -122,7 +136,6 @@ bptree_add(objset_t *os, uint64_t obj, b bte.be_birth_txg = birth_txg; bte.be_bp = *bp; - bzero(&bte.be_zb, sizeof (bte.be_zb)); dmu_write(os, obj, bt->bt_end * sizeof (bte), sizeof (bte), &bte, tx); dmu_buf_will_dirty(db, tx); @@ -153,10 +166,27 @@ bptree_visit_cb(spa_t *spa, zilog_t *zil return (err); } +/* + * If "free" is set: + * - It is assumed that "func" will be freeing the block pointers. + * - If "func" returns nonzero, the bookmark will be remembered and + * iteration will be restarted from this point on next invocation. + * - If an i/o error is encountered (e.g. "func" returns EIO or ECKSUM), + * bptree_iterate will remember the bookmark, continue traversing + * any additional entries, and return 0. + * + * If "free" is not set, traversal will stop and return an error if + * an i/o error is encountered. + * + * In either case, if zfs_free_leak_on_eio is set, i/o errors will be + * ignored and traversal will continue (i.e. TRAVERSE_HARD will be passed to + * traverse_dataset_destroyed()). + */ int bptree_iterate(objset_t *os, uint64_t obj, boolean_t free, bptree_itor_t func, void *arg, dmu_tx_t *tx) { + boolean_t ioerr = B_FALSE; int err; uint64_t i; dmu_buf_t *db; @@ -182,49 +212,82 @@ bptree_iterate(objset_t *os, uint64_t ob bptree_entry_phys_t bte; int flags = TRAVERSE_PREFETCH_METADATA | TRAVERSE_POST; - ASSERT(!free || i == ba.ba_phys->bt_begin); - err = dmu_read(os, obj, i * sizeof (bte), sizeof (bte), &bte, DMU_READ_NO_PREFETCH); if (err != 0) break; - if (zfs_recover) + if (zfs_free_leak_on_eio) flags |= TRAVERSE_HARD; + zfs_dbgmsg("bptree index %d: traversing from min_txg=%lld " + "bookmark %lld/%lld/%lld/%lld", + i, (longlong_t)bte.be_birth_txg, + (longlong_t)bte.be_zb.zb_objset, + (longlong_t)bte.be_zb.zb_object, + (longlong_t)bte.be_zb.zb_level, + (longlong_t)bte.be_zb.zb_blkid); err = traverse_dataset_destroyed(os->os_spa, &bte.be_bp, bte.be_birth_txg, &bte.be_zb, flags, bptree_visit_cb, &ba); if (free) { - if (err == ERESTART) { + /* + * The callback has freed the visited block pointers. + * Record our traversal progress on disk, either by + * updating this record's bookmark, or by logically + * removing this record by advancing bt_begin. + */ + if (err != 0) { /* save bookmark for future resume */ ASSERT3U(bte.be_zb.zb_objset, ==, ZB_DESTROYED_OBJSET); ASSERT0(bte.be_zb.zb_level); dmu_write(os, obj, i * sizeof (bte), sizeof (bte), &bte, tx); - break; - } - if (err != 0) { + if (err == EIO || err == ECKSUM || + err == ENXIO) { + /* + * Skip the rest of this tree and + * continue on to the next entry. + */ + err = 0; + ioerr = B_TRUE; + } else { + break; + } + } else if (ioerr) { /* - * We can not properly handle an i/o - * error, because the traversal code - * does not know how to resume from an - * arbitrary bookmark. + * This entry is finished, but there were + * i/o errors on previous entries, so we + * can't adjust bt_begin. Set this entry's + * be_birth_txg such that it will be + * treated as a no-op in future traversals. */ - zfs_panic_recover("error %u from " - "traverse_dataset_destroyed()", err); + bte.be_birth_txg = UINT64_MAX; + dmu_write(os, obj, i * sizeof (bte), + sizeof (bte), &bte, tx); } - ba.ba_phys->bt_begin++; - (void) dmu_free_range(os, obj, - i * sizeof (bte), sizeof (bte), tx); + if (!ioerr) { + ba.ba_phys->bt_begin++; + (void) dmu_free_range(os, obj, + i * sizeof (bte), sizeof (bte), tx); + } + } else if (err != 0) { + break; } } - ASSERT(!free || err != 0 || ba.ba_phys->bt_begin == ba.ba_phys->bt_end); + ASSERT(!free || err != 0 || ioerr || + ba.ba_phys->bt_begin == ba.ba_phys->bt_end); /* if all blocks are free there should be no used space */ if (ba.ba_phys->bt_begin == ba.ba_phys->bt_end) { + if (zfs_free_leak_on_eio) { + ba.ba_phys->bt_bytes = 0; + ba.ba_phys->bt_comp = 0; + ba.ba_phys->bt_uncomp = 0; + } + ASSERT0(ba.ba_phys->bt_bytes); ASSERT0(ba.ba_phys->bt_comp); ASSERT0(ba.ba_phys->bt_uncomp); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Tue Jul 15 04:53:34 2014 (r268649) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Tue Jul 15 05:00:46 2014 (r268650) @@ -58,6 +58,7 @@ typedef struct traverse_data { zbookmark_t *td_resume; int td_flags; prefetch_data_t *td_pfd; + boolean_t td_paused; blkptr_cb_t *td_func; void *td_arg; } traverse_data_t; @@ -163,7 +164,6 @@ resume_skip_check(traverse_data_t *td, c * If we found the block we're trying to resume from, zero * the bookmark out to indicate that we have resumed. */ - ASSERT3U(zb->zb_object, <=, td->td_resume->zb_object); if (bcmp(zb, td->td_resume, sizeof (*zb)) == 0) { bzero(td->td_resume, sizeof (*zb)); if (td->td_flags & TRAVERSE_POST) @@ -174,14 +174,6 @@ resume_skip_check(traverse_data_t *td, c } static void -traverse_pause(traverse_data_t *td, const zbookmark_t *zb) -{ - ASSERT(td->td_resume != NULL); - ASSERT0(zb->zb_level); - bcopy(zb, td->td_resume, sizeof (*td->td_resume)); -} - -static void traverse_prefetch_metadata(traverse_data_t *td, const blkptr_t *bp, const zbookmark_t *zb) { @@ -210,11 +202,10 @@ traverse_visitbp(traverse_data_t *td, co const blkptr_t *bp, const zbookmark_t *zb) { zbookmark_t czb; - int err = 0, lasterr = 0; + int err = 0; arc_buf_t *buf = NULL; prefetch_data_t *pd = td->td_pfd; boolean_t hard = td->td_flags & TRAVERSE_HARD; - boolean_t pause = B_FALSE; switch (resume_skip_check(td, dnp, zb)) { case RESUME_SKIP_ALL: @@ -253,7 +244,9 @@ traverse_visitbp(traverse_data_t *td, co if (BP_IS_HOLE(bp)) { err = td->td_func(td->td_spa, NULL, bp, zb, dnp, td->td_arg); - return (err); + if (err != 0) + goto post; + return (0); } if (pd && !pd->pd_exited && @@ -273,8 +266,6 @@ traverse_visitbp(traverse_data_t *td, co td->td_arg); if (err == TRAVERSE_VISIT_NO_CHILDREN) return (0); - if (err == ERESTART) - pause = B_TRUE; /* handle pausing at a common point */ if (err != 0) goto post; } @@ -288,7 +279,7 @@ traverse_visitbp(traverse_data_t *td, co err = arc_read(NULL, td->td_spa, bp, arc_getbuf_func, &buf, ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, zb); if (err != 0) - return (err); + goto post; cbp = buf->b_data; for (i = 0; i < epb; i++) { @@ -304,11 +295,8 @@ traverse_visitbp(traverse_data_t *td, co zb->zb_level - 1, zb->zb_blkid * epb + i); err = traverse_visitbp(td, dnp, &cbp[i], &czb); - if (err != 0) { - if (!hard) - break; - lasterr = err; - } + if (err != 0) + break; } } else if (BP_GET_TYPE(bp) == DMU_OT_DNODE) { uint32_t flags = ARC_WAIT; @@ -318,7 +306,7 @@ traverse_visitbp(traverse_data_t *td, co err = arc_read(NULL, td->td_spa, bp, arc_getbuf_func, &buf, ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, zb); if (err != 0) - return (err); + goto post; dnp = buf->b_data; for (i = 0; i < epb; i++) { @@ -330,11 +318,8 @@ traverse_visitbp(traverse_data_t *td, co for (i = 0; i < epb; i++) { err = traverse_dnode(td, &dnp[i], zb->zb_objset, zb->zb_blkid * epb + i); - if (err != 0) { - if (!hard) - break; - lasterr = err; - } + if (err != 0) + break; } } else if (BP_GET_TYPE(bp) == DMU_OT_OBJSET) { uint32_t flags = ARC_WAIT; @@ -344,7 +329,7 @@ traverse_visitbp(traverse_data_t *td, co err = arc_read(NULL, td->td_spa, bp, arc_getbuf_func, &buf, ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, zb); if (err != 0) - return (err); + goto post; osp = buf->b_data; dnp = &osp->os_meta_dnode; @@ -359,19 +344,11 @@ traverse_visitbp(traverse_data_t *td, co err = traverse_dnode(td, dnp, zb->zb_objset, DMU_META_DNODE_OBJECT); - if (err && hard) { - lasterr = err; - err = 0; - } if (err == 0 && arc_buf_size(buf) >= sizeof (objset_phys_t)) { dnp = &osp->os_groupused_dnode; err = traverse_dnode(td, dnp, zb->zb_objset, DMU_GROUPUSED_OBJECT); } - if (err && hard) { - lasterr = err; - err = 0; - } if (err == 0 && arc_buf_size(buf) >= sizeof (objset_phys_t)) { dnp = &osp->os_userused_dnode; err = traverse_dnode(td, dnp, zb->zb_objset, @@ -383,19 +360,37 @@ traverse_visitbp(traverse_data_t *td, co (void) arc_buf_remove_ref(buf, &buf); post: - if (err == 0 && (td->td_flags & TRAVERSE_POST)) { + if (err == 0 && (td->td_flags & TRAVERSE_POST)) err = td->td_func(td->td_spa, NULL, bp, zb, dnp, td->td_arg); - if (err == ERESTART) - pause = B_TRUE; + + if (hard && (err == EIO || err == ECKSUM)) { + /* + * Ignore this disk error as requested by the HARD flag, + * and continue traversal. + */ + err = 0; } - if (pause && td->td_resume != NULL) { - ASSERT3U(err, ==, ERESTART); - ASSERT(!hard); - traverse_pause(td, zb); + /* + * If we are stopping here, set td_resume. + */ + if (td->td_resume != NULL && err != 0 && !td->td_paused) { + td->td_resume->zb_objset = zb->zb_objset; + td->td_resume->zb_object = zb->zb_object; + td->td_resume->zb_level = 0; + /* + * If we have stopped on an indirect block (e.g. due to + * i/o error), we have not visited anything below it. + * Set the bookmark to the first level-0 block that we need + * to visit. This way, the resuming code does not need to + * deal with resuming from indirect blocks. + */ + td->td_resume->zb_blkid = zb->zb_blkid << + (zb->zb_level * (dnp->dn_indblkshift - SPA_BLKPTRSHIFT)); + td->td_paused = B_TRUE; } - return (err != 0 ? err : lasterr); + return (err); } static void @@ -420,30 +415,21 @@ static int traverse_dnode(traverse_data_t *td, const dnode_phys_t *dnp, uint64_t objset, uint64_t object) { - int j, err = 0, lasterr = 0; + int j, err = 0; zbookmark_t czb; - boolean_t hard = (td->td_flags & TRAVERSE_HARD); for (j = 0; j < dnp->dn_nblkptr; j++) { SET_BOOKMARK(&czb, objset, object, dnp->dn_nlevels - 1, j); err = traverse_visitbp(td, dnp, &dnp->dn_blkptr[j], &czb); - if (err != 0) { - if (!hard) - break; - lasterr = err; - } + if (err != 0) + break; } if (dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) { SET_BOOKMARK(&czb, objset, object, 0, DMU_SPILL_BLKID); err = traverse_visitbp(td, dnp, &dnp->dn_spill, &czb); - if (err != 0) { - if (!hard) - return (err); - lasterr = err; - } } - return (err != 0 ? err : lasterr); + return (err); } /* ARGSUSED */ @@ -530,6 +516,7 @@ traverse_impl(spa_t *spa, dsl_dataset_t td.td_arg = arg; td.td_pfd = &pd; td.td_flags = flags; + td.td_paused = B_FALSE; pd.pd_blks_max = zfs_pd_blks_max; pd.pd_flags = flags; @@ -603,7 +590,7 @@ int traverse_pool(spa_t *spa, uint64_t txg_start, int flags, blkptr_cb_t func, void *arg) { - int err, lasterr = 0; + int err; uint64_t obj; dsl_pool_t *dp = spa_get_dsl(spa); objset_t *mos = dp->dp_meta_objset; @@ -616,16 +603,15 @@ traverse_pool(spa_t *spa, uint64_t txg_s return (err); /* visit each dataset */ - for (obj = 1; err == 0 || (err != ESRCH && hard); + for (obj = 1; err == 0; err = dmu_object_next(mos, &obj, FALSE, txg_start)) { dmu_object_info_t doi; err = dmu_object_info(mos, obj, &doi); if (err != 0) { - if (!hard) - return (err); - lasterr = err; - continue; + if (hard) + continue; + break; } if (doi.doi_bonus_type == DMU_OT_DSL_DATASET) { @@ -636,23 +622,19 @@ traverse_pool(spa_t *spa, uint64_t txg_s err = dsl_dataset_hold_obj(dp, obj, FTAG, &ds); dsl_pool_config_exit(dp, FTAG); if (err != 0) { - if (!hard) - return (err); - lasterr = err; - continue; + if (hard) + continue; + break; } if (ds->ds_phys->ds_prev_snap_txg > txg) txg = ds->ds_phys->ds_prev_snap_txg; err = traverse_dataset(ds, txg, flags, func, arg); dsl_dataset_rele(ds, FTAG); - if (err != 0) { - if (!hard) - return (err); - lasterr = err; - } + if (err != 0) + break; } } if (err == ESRCH) err = 0; - return (err != 0 ? err : lasterr); + return (err); } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Tue Jul 15 04:53:34 2014 (r268649) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Tue Jul 15 05:00:46 2014 (r268650) @@ -278,6 +278,13 @@ dsl_pool_open(dsl_pool_t *dp) dp->dp_meta_objset, obj)); } + /* + * Note: errors ignored, because the leak dir will not exist if we + * have not encountered a leak yet. + */ + (void) dsl_pool_open_special_dir(dp, LEAK_DIR_NAME, + &dp->dp_leak_dir); + if (spa_feature_is_active(dp->dp_spa, SPA_FEATURE_ASYNC_DESTROY)) { err = zap_lookup(dp->dp_meta_objset, DMU_POOL_DIRECTORY_OBJECT, DMU_POOL_BPTREE_OBJ, sizeof (uint64_t), 1, @@ -325,6 +332,8 @@ dsl_pool_close(dsl_pool_t *dp) dsl_dir_rele(dp->dp_mos_dir, dp); if (dp->dp_free_dir) dsl_dir_rele(dp->dp_free_dir, dp); + if (dp->dp_leak_dir) + dsl_dir_rele(dp->dp_leak_dir, dp); if (dp->dp_root_dir) dsl_dir_rele(dp->dp_root_dir, dp); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Tue Jul 15 04:53:34 2014 (r268649) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Tue Jul 15 05:00:46 2014 (r268650) @@ -52,9 +52,7 @@ typedef int (scan_cb_t)(dsl_pool_t *, const blkptr_t *, const zbookmark_t *); -static scan_cb_t dsl_scan_defrag_cb; static scan_cb_t dsl_scan_scrub_cb; -static scan_cb_t dsl_scan_remove_cb; static void dsl_scan_cancel_sync(void *, dmu_tx_t *); static void dsl_scan_sync_state(dsl_scan_t *, dmu_tx_t *tx); @@ -68,7 +66,7 @@ unsigned int zfs_free_min_time_ms = 1000 unsigned int zfs_resilver_min_time_ms = 3000; /* min millisecs to resilver per txg */ boolean_t zfs_no_scrub_io = B_FALSE; /* set to disable scrub i/o */ -boolean_t zfs_no_scrub_prefetch = B_FALSE; /* set to disable srub prefetching */ +boolean_t zfs_no_scrub_prefetch = B_FALSE; /* set to disable scrub prefetch */ SYSCTL_DECL(_vfs_zfs); TUNABLE_INT("vfs.zfs.top_maxinflight", &zfs_top_maxinflight); @@ -1389,7 +1387,7 @@ dsl_scan_active(dsl_scan_t *scn) if (spa_shutting_down(spa)) return (B_FALSE); if (scn->scn_phys.scn_state == DSS_SCANNING || - scn->scn_async_destroying) + (scn->scn_async_destroying && !scn->scn_async_stalled)) return (B_TRUE); if (spa_version(scn->scn_dp->dp_spa) >= SPA_VERSION_DEADLISTS) { @@ -1404,7 +1402,7 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t * { dsl_scan_t *scn = dp->dp_scan; spa_t *spa = dp->dp_spa; - int err; + int err = 0; /* * Check for scn_restart_txg before checking spa_load_state, so @@ -1422,7 +1420,10 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t * dsl_scan_setup_sync(&func, tx); } - if (!dsl_scan_active(scn) || + /* + * If the scan is inactive due to a stalled async destroy, try again. + */ + if ((!scn->scn_async_stalled && !dsl_scan_active(scn)) || spa_sync_pass(dp->dp_spa) > 1) return; @@ -1432,10 +1433,11 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t * spa->spa_scrub_active = B_TRUE; /* - * First process the free list. If we pause the free, don't do - * any scanning. This ensures that there is no free list when - * we are scanning, so the scan code doesn't have to worry about - * traversing it. + * First process the async destroys. If we pause, don't do + * any scrubbing or resilvering. This ensures that there are no + * async destroys while we are scanning, so the scan code doesn't + * have to worry about traversing it. It is also faster to free the + * blocks than to scrub them. */ if (spa_version(dp->dp_spa) >= SPA_VERSION_DEADLISTS) { scn->scn_is_bptree = B_FALSE; @@ -1445,48 +1447,92 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t * dsl_scan_free_block_cb, scn, tx); VERIFY3U(0, ==, zio_wait(scn->scn_zio_root)); - if (err == 0 && spa_feature_is_active(spa, - SPA_FEATURE_ASYNC_DESTROY)) { - ASSERT(scn->scn_async_destroying); - scn->scn_is_bptree = B_TRUE; - scn->scn_zio_root = zio_root(dp->dp_spa, NULL, - NULL, ZIO_FLAG_MUSTSUCCEED); - err = bptree_iterate(dp->dp_meta_objset, - dp->dp_bptree_obj, B_TRUE, dsl_scan_free_block_cb, - scn, tx); - VERIFY0(zio_wait(scn->scn_zio_root)); - - if (err == 0) { - /* finished; deactivate async destroy feature */ - spa_feature_decr(spa, SPA_FEATURE_ASYNC_DESTROY, - tx); - ASSERT(!spa_feature_is_active(spa, - SPA_FEATURE_ASYNC_DESTROY)); - VERIFY0(zap_remove(dp->dp_meta_objset, - DMU_POOL_DIRECTORY_OBJECT, - DMU_POOL_BPTREE_OBJ, tx)); - VERIFY0(bptree_free(dp->dp_meta_objset, - dp->dp_bptree_obj, tx)); - dp->dp_bptree_obj = 0; - scn->scn_async_destroying = B_FALSE; - } - } - if (scn->scn_visited_this_txg) { - zfs_dbgmsg("freed %llu blocks in %llums from " - "free_bpobj/bptree txg %llu", - (longlong_t)scn->scn_visited_this_txg, - (longlong_t) - NSEC2MSEC(gethrtime() - scn->scn_sync_start_time), - (longlong_t)tx->tx_txg); - scn->scn_visited_this_txg = 0; - /* - * Re-sync the ddt so that we can further modify - * it when doing bprewrite. - */ - ddt_sync(spa, tx->tx_txg); + if (err != 0 && err != ERESTART) + zfs_panic_recover("error %u from bpobj_iterate()", err); + } + + if (err == 0 && spa_feature_is_active(spa, SPA_FEATURE_ASYNC_DESTROY)) { + ASSERT(scn->scn_async_destroying); + scn->scn_is_bptree = B_TRUE; + scn->scn_zio_root = zio_root(dp->dp_spa, NULL, + NULL, ZIO_FLAG_MUSTSUCCEED); + err = bptree_iterate(dp->dp_meta_objset, + dp->dp_bptree_obj, B_TRUE, dsl_scan_free_block_cb, scn, tx); + VERIFY0(zio_wait(scn->scn_zio_root)); + + if (err == EIO || err == ECKSUM) { + err = 0; + } else if (err != 0 && err != ERESTART) { + zfs_panic_recover("error %u from " + "traverse_dataset_destroyed()", err); } - if (err == ERESTART) - return; + + /* + * If we didn't make progress, mark the async destroy as + * stalled, so that we will not initiate a spa_sync() on + * its behalf. + */ + scn->scn_async_stalled = (scn->scn_visited_this_txg == 0); + + if (bptree_is_empty(dp->dp_meta_objset, dp->dp_bptree_obj)) { + /* finished; deactivate async destroy feature */ + spa_feature_decr(spa, SPA_FEATURE_ASYNC_DESTROY, tx); + ASSERT(!spa_feature_is_active(spa, + SPA_FEATURE_ASYNC_DESTROY)); + VERIFY0(zap_remove(dp->dp_meta_objset, + DMU_POOL_DIRECTORY_OBJECT, + DMU_POOL_BPTREE_OBJ, tx)); + VERIFY0(bptree_free(dp->dp_meta_objset, + dp->dp_bptree_obj, tx)); + dp->dp_bptree_obj = 0; + scn->scn_async_destroying = B_FALSE; + } + } + if (scn->scn_visited_this_txg) { + zfs_dbgmsg("freed %llu blocks in %llums from " + "free_bpobj/bptree txg %llu; err=%u", + (longlong_t)scn->scn_visited_this_txg, + (longlong_t) + NSEC2MSEC(gethrtime() - scn->scn_sync_start_time), + (longlong_t)tx->tx_txg, err); + scn->scn_visited_this_txg = 0; + + /* + * Write out changes to the DDT that may be required as a + * result of the blocks freed. This ensures that the DDT + * is clean when a scrub/resilver runs. + */ + ddt_sync(spa, tx->tx_txg); + } + if (err != 0) + return; + if (!scn->scn_async_destroying && zfs_free_leak_on_eio && + (dp->dp_free_dir->dd_phys->dd_used_bytes != 0 || + dp->dp_free_dir->dd_phys->dd_compressed_bytes != 0 || + dp->dp_free_dir->dd_phys->dd_uncompressed_bytes != 0)) { + /* + * We have finished background destroying, but there is still + * some space left in the dp_free_dir. Transfer this leaked + * space to the dp_leak_dir. + */ + if (dp->dp_leak_dir == NULL) { + rrw_enter(&dp->dp_config_rwlock, RW_WRITER, FTAG); + (void) dsl_dir_create_sync(dp, dp->dp_root_dir, + LEAK_DIR_NAME, tx); + VERIFY0(dsl_pool_open_special_dir(dp, + LEAK_DIR_NAME, &dp->dp_leak_dir)); + rrw_exit(&dp->dp_config_rwlock, FTAG); + } + dsl_dir_diduse_space(dp->dp_leak_dir, DD_USED_HEAD, + dp->dp_free_dir->dd_phys->dd_used_bytes, + dp->dp_free_dir->dd_phys->dd_compressed_bytes, + dp->dp_free_dir->dd_phys->dd_uncompressed_bytes, tx); + dsl_dir_diduse_space(dp->dp_free_dir, DD_USED_HEAD, + -dp->dp_free_dir->dd_phys->dd_used_bytes, + -dp->dp_free_dir->dd_phys->dd_compressed_bytes, + -dp->dp_free_dir->dd_phys->dd_uncompressed_bytes, tx); + } + if (!scn->scn_async_destroying) { /* finished; verify that space accounting went to zero */ ASSERT0(dp->dp_free_dir->dd_phys->dd_used_bytes); ASSERT0(dp->dp_free_dir->dd_phys->dd_compressed_bytes); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Jul 15 04:53:34 2014 (r268649) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Jul 15 05:00:46 2014 (r268650) @@ -258,19 +258,25 @@ spa_prop_get_config(spa_t *spa, nvlist_t } if (pool != NULL) { - dsl_dir_t *freedir = pool->dp_free_dir; - /* * The $FREE directory was introduced in SPA_VERSION_DEADLISTS, * when opening pools before this version freedir will be NULL. */ - if (freedir != NULL) { + if (pool->dp_free_dir != NULL) { spa_prop_add_list(*nvp, ZPOOL_PROP_FREEING, NULL, - freedir->dd_phys->dd_used_bytes, src); + pool->dp_free_dir->dd_phys->dd_used_bytes, src); } else { spa_prop_add_list(*nvp, ZPOOL_PROP_FREEING, NULL, 0, src); } + + if (pool->dp_leak_dir != NULL) { + spa_prop_add_list(*nvp, ZPOOL_PROP_LEAKED, NULL, + pool->dp_leak_dir->dd_phys->dd_used_bytes, src); + } else { + spa_prop_add_list(*nvp, ZPOOL_PROP_LEAKED, + NULL, 0, src); + } } spa_prop_add_list(*nvp, ZPOOL_PROP_GUID, NULL, spa_guid(spa), src); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Tue Jul 15 04:53:34 2014 (r268649) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Tue Jul 15 05:00:46 2014 (r268650) @@ -255,13 +255,44 @@ SYSCTL_INT(_debug, OID_AUTO, zfs_flags, * This should only be used as a last resort, as it typically results * in leaked space, or worse. */ -int zfs_recover = 0; +boolean_t zfs_recover = B_FALSE; SYSCTL_DECL(_vfs_zfs); TUNABLE_INT("vfs.zfs.recover", &zfs_recover); SYSCTL_INT(_vfs_zfs, OID_AUTO, recover, CTLFLAG_RDTUN, &zfs_recover, 0, "Try to recover from otherwise-fatal errors."); /* + * If destroy encounters an EIO while reading metadata (e.g. indirect + * blocks), space referenced by the missing metadata can not be freed. + * Normally this causes the background destroy to become "stalled", as + * it is unable to make forward progress. While in this stalled state, + * all remaining space to free from the error-encountering filesystem is + * "temporarily leaked". Set this flag to cause it to ignore the EIO, + * permanently leak the space from indirect blocks that can not be read, + * and continue to free everything else that it can. + * + * The default, "stalling" behavior is useful if the storage partially + * fails (i.e. some but not all i/os fail), and then later recovers. In + * this case, we will be able to continue pool operations while it is + * partially failed, and when it recovers, we can continue to free the + * space, with no leaks. However, note that this case is actually + * fairly rare. + * + * Typically pools either (a) fail completely (but perhaps temporarily, + * e.g. a top-level vdev going offline), or (b) have localized, + * permanent errors (e.g. disk returns the wrong data due to bit flip or + * firmware bug). In case (a), this setting does not matter because the + * pool will be suspended and the sync thread will not be able to make + * forward progress regardless. In case (b), because the error is + * permanent, the best we can do is leak the minimum amount of space, + * which is what setting this flag will do. Therefore, it is reasonable + * for this flag to normally be set, but we chose the more conservative + * approach of not setting it, so that there is no possibility of + * leaking space in the "partial temporary" failure case. + */ +boolean_t zfs_free_leak_on_eio = B_FALSE; + +/* * Expiration time in milliseconds. This value has two meanings. First it is * used to determine when the spa_deadman() logic should fire. By default the * spa_deadman() will fire if spa_sync() has not completed in 1000 seconds. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/bptree.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/bptree.h Tue Jul 15 04:53:34 2014 (r268649) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/bptree.h Tue Jul 15 05:00:46 2014 (r268650) @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. */ #ifndef _SYS_BPTREE_H @@ -50,6 +50,7 @@ typedef int bptree_itor_t(void *arg, con uint64_t bptree_alloc(objset_t *os, dmu_tx_t *tx); int bptree_free(objset_t *os, uint64_t obj, dmu_tx_t *tx); +boolean_t bptree_is_empty(objset_t *os, uint64_t obj); void bptree_add(objset_t *os, uint64_t obj, blkptr_t *bp, uint64_t birth_txg, uint64_t bytes, uint64_t comp, uint64_t uncomp, dmu_tx_t *tx); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Tue Jul 15 04:53:34 2014 (r268649) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Tue Jul 15 05:00:46 2014 (r268650) @@ -253,7 +253,6 @@ void zfs_znode_byteswap(void *buf, size_ #define DMU_USERUSED_OBJECT (-1ULL) #define DMU_GROUPUSED_OBJECT (-2ULL) -#define DMU_DEADLIST_OBJECT (-3ULL) /* * artificial blkids for bonus buffer and spill blocks Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h Tue Jul 15 04:53:34 2014 (r268649) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h Tue Jul 15 05:00:46 2014 (r268650) @@ -160,6 +160,7 @@ boolean_t dsl_dir_is_zapified(dsl_dir_t #define ORIGIN_DIR_NAME "$ORIGIN" #define XLATION_DIR_NAME "$XLATION" #define FREE_DIR_NAME "$FREE" +#define LEAK_DIR_NAME "$LEAK" #ifdef ZFS_DEBUG #define dprintf_dd(dd, fmt, ...) do { \ Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h Tue Jul 15 04:53:34 2014 (r268649) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h Tue Jul 15 05:00:46 2014 (r268650) @@ -84,6 +84,7 @@ typedef struct dsl_pool { struct dsl_dir *dp_root_dir; struct dsl_dir *dp_mos_dir; struct dsl_dir *dp_free_dir; + struct dsl_dir *dp_leak_dir; struct dsl_dataset *dp_origin_snap; uint64_t dp_root_dir_obj; struct taskq *dp_vnrele_taskq; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_scan.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_scan.h Tue Jul 15 04:53:34 2014 (r268649) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_scan.h Tue Jul 15 05:00:46 2014 (r268650) @@ -114,6 +114,7 @@ typedef struct dsl_scan { /* for freeing blocks */ boolean_t scn_is_bptree; boolean_t scn_async_destroying; + boolean_t scn_async_stalled; /* for debugging / information */ uint64_t scn_visited_this_txg; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_debug.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_debug.h Tue Jul 15 04:53:34 2014 (r268649) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_debug.h Tue Jul 15 05:00:46 2014 (r268650) @@ -49,7 +49,8 @@ extern "C" { #endif extern int zfs_flags; -extern int zfs_recover; +extern boolean_t zfs_recover; +extern boolean_t zfs_free_leak_on_eio; #define ZFS_DEBUG_DPRINTF (1<<0) #define ZFS_DEBUG_DBUF_VERIFY (1<<1) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_debug.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_debug.c Tue Jul 15 04:53:34 2014 (r268649) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_debug.c Tue Jul 15 05:00:46 2014 (r268650) @@ -28,7 +28,7 @@ list_t zfs_dbgmsgs; int zfs_dbgmsg_size; kmutex_t zfs_dbgmsgs_lock; -int zfs_dbgmsg_maxsize = 1<<20; /* 1MB */ +int zfs_dbgmsg_maxsize = 4<<20; /* 4MB */ void zfs_dbgmsg_init(void) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Tue Jul 15 04:53:34 2014 (r268649) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Tue Jul 15 05:00:46 2014 (r268650) @@ -3367,13 +3367,6 @@ zbookmark_is_before(const dnode_phys_t * ASSERT(zb1->zb_objset == zb2->zb_objset); ASSERT(zb2->zb_level == 0); - /* - * A bookmark in the deadlist is considered to be after - * everything else. - */ - if (zb2->zb_object == DMU_DEADLIST_OBJECT) - return (B_TRUE); - /* The objset_phys_t isn't before anything. */ if (dnp == NULL) return (B_FALSE); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Tue Jul 15 04:53:34 2014 (r268649) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Tue Jul 15 05:00:46 2014 (r268650) @@ -193,6 +193,7 @@ typedef enum { ZPOOL_PROP_COMMENT, ZPOOL_PROP_EXPANDSZ, ZPOOL_PROP_FREEING, + ZPOOL_PROP_LEAKED, ZPOOL_NUM_PROPS } zpool_prop_t; From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 05:12:17 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1F89C376; Tue, 15 Jul 2014 05:12:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E78AC2A5C; Tue, 15 Jul 2014 05:12:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6F5CGMr030697; Tue, 15 Jul 2014 05:12:16 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6F5CGoq030696; Tue, 15 Jul 2014 05:12:16 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201407150512.s6F5CGoq030696@svn.freebsd.org> From: Xin LI Date: Tue, 15 Jul 2014 05:12:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268651 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 05:12:17 -0000 Author: delphij Date: Tue Jul 15 05:12:16 2014 New Revision: 268651 URL: http://svnweb.freebsd.org/changeset/base/268651 Log: MFC r268082: MFV r267567: 4881 zfs send performance degradation when embedded block pointers are encountered Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Tue Jul 15 05:00:46 2014 (r268650) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Tue Jul 15 05:12:16 2014 (r268651) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. */ #include @@ -197,6 +197,16 @@ traverse_prefetch_metadata(traverse_data ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, zb); } +static boolean_t +prefetch_needed(prefetch_data_t *pfd, const blkptr_t *bp) +{ + ASSERT(pfd->pd_flags & TRAVERSE_PREFETCH_DATA); + if (BP_IS_HOLE(bp) || BP_IS_EMBEDDED(bp) || + BP_GET_TYPE(bp) == DMU_OT_INTENT_LOG) + return (B_FALSE); + return (B_TRUE); +} + static int traverse_visitbp(traverse_data_t *td, const dnode_phys_t *dnp, const blkptr_t *bp, const zbookmark_t *zb) @@ -242,16 +252,7 @@ traverse_visitbp(traverse_data_t *td, co return (0); } - if (BP_IS_HOLE(bp)) { - err = td->td_func(td->td_spa, NULL, bp, zb, dnp, td->td_arg); - if (err != 0) - goto post; - return (0); - } - - if (pd && !pd->pd_exited && - ((pd->pd_flags & TRAVERSE_PREFETCH_DATA) || - BP_GET_TYPE(bp) == DMU_OT_DNODE || BP_GET_LEVEL(bp) > 0)) { + if (pd != NULL && !pd->pd_exited && prefetch_needed(pd, bp)) { mutex_enter(&pd->pd_mtx); ASSERT(pd->pd_blks_fetched >= 0); while (pd->pd_blks_fetched == 0 && !pd->pd_exited) @@ -261,6 +262,13 @@ traverse_visitbp(traverse_data_t *td, co mutex_exit(&pd->pd_mtx); } + if (BP_IS_HOLE(bp)) { + err = td->td_func(td->td_spa, NULL, bp, zb, dnp, td->td_arg); + if (err != 0) + goto post; + return (0); + } + if (td->td_flags & TRAVERSE_PRE) { err = td->td_func(td->td_spa, NULL, bp, zb, dnp, td->td_arg); @@ -444,10 +452,7 @@ traverse_prefetcher(spa_t *spa, zilog_t if (pfd->pd_cancel) return (SET_ERROR(EINTR)); - if (BP_IS_HOLE(bp) || BP_IS_EMBEDDED(bp) || - !((pfd->pd_flags & TRAVERSE_PREFETCH_DATA) || - BP_GET_TYPE(bp) == DMU_OT_DNODE || BP_GET_LEVEL(bp) > 0) || - BP_GET_TYPE(bp) == DMU_OT_INTENT_LOG) + if (!prefetch_needed(pfd, bp)) return (0); mutex_enter(&pfd->pd_mtx); From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 05:28:59 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A504B9CA; Tue, 15 Jul 2014 05:28:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F39A2B43; Tue, 15 Jul 2014 05:28:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6F5Sxce036690; Tue, 15 Jul 2014 05:28:59 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6F5SwYC036686; Tue, 15 Jul 2014 05:28:58 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201407150528.s6F5SwYC036686@svn.freebsd.org> From: Xin LI Date: Tue, 15 Jul 2014 05:28:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268653 - in stable/10/cddl/contrib/opensolaris: cmd/zdb lib/libzpool/common lib/libzpool/common/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 05:28:59 -0000 Author: delphij Date: Tue Jul 15 05:28:58 2014 New Revision: 268653 URL: http://svnweb.freebsd.org/changeset/base/268653 Log: MFC r268084: MFV r267568: 4891 want zdb option to dump all metadata Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.8 stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c stable/10/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.8 ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Tue Jul 15 05:16:00 2014 (r268652) +++ stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Tue Jul 15 05:28:58 2014 (r268653) @@ -14,12 +14,12 @@ .\" .\" Copyright 2012, Richard Lowe. .\" Copyright (c) 2012, Marcelo Araujo . -.\" Copyright (c) 2012 by Delphix. All rights reserved. +.\" Copyright (c) 2012, 2014 by Delphix. All rights reserved. .\" All Rights Reserved. .\" .\" $FreeBSD$ .\" -.Dd March 20, 2014 +.Dd July 1, 2014 .Dt ZDB 8 .Os .Sh NAME @@ -32,6 +32,7 @@ .Op Fl t Ar txg .Op Fl U Ar cache .Op Fl M Ar inflight I/Os +.Op Fl x Ar dumpdir .Ar poolname .Op Ar object ... .Nm @@ -217,6 +218,14 @@ Operate on an exported pool, not present The .Fl p flag specifies the path under which devices are to be searched. +.It Fl x Ar dumpdir +All blocks accessed will be copied to files in the specified directory. +The blocks will be placed in sparse files whose name is the same as +that of the file or device read. zdb can be then run on the generated files. +Note that the +.Fl bbc +flags are sufficient to access (and thus copy) +all metadata on the pool. .It Fl F Attempt to make an unreadable pool readable by trying progressively older transactions. Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c Tue Jul 15 05:16:00 2014 (r268652) +++ stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c Tue Jul 15 05:28:58 2014 (r268653) @@ -112,7 +112,7 @@ usage(void) { (void) fprintf(stderr, "Usage: %s [-CumdibcsDvhLXFPA] [-t txg] [-e [-p path...]] " - "[-U config] [-M inflight I/Os] poolname [object...]\n" + "[-U config] [-M inflight I/Os] [-x dumpdir] poolname [object...]\n" " %s [-divPA] [-e -p path...] [-U config] dataset " "[object...]\n" " %s -m [-LXFPA] [-t txg] [-e [-p path...]] [-U config] " @@ -150,7 +150,7 @@ usage(void) (void) fprintf(stderr, " -R read and display block from a " "device\n\n"); (void) fprintf(stderr, " Below options are intended for use " - "with other options (except -l):\n"); + "with other options:\n"); (void) fprintf(stderr, " -A ignore assertions (-A), enable " "panic recovery (-AA) or both (-AAA)\n"); (void) fprintf(stderr, " -F attempt automatic rewind within " @@ -163,11 +163,14 @@ usage(void) "has altroot/not in a cachefile\n"); (void) fprintf(stderr, " -p -- use one or more with " "-e to specify path to vdev dir\n"); - (void) fprintf(stderr, " -P print numbers in parseable form\n"); + (void) fprintf(stderr, " -x -- " + "dump all read blocks into specified directory\n"); + (void) fprintf(stderr, " -P print numbers in parseable form\n"); (void) fprintf(stderr, " -t -- highest txg to use when " "searching for uberblocks\n"); (void) fprintf(stderr, " -M -- " - "specify the maximum number of checksumming I/Os [default is 200]"); + "specify the maximum number of " + "checksumming I/Os [default is 200]\n"); (void) fprintf(stderr, "Specify an option more than once (e.g. -bb) " "to make only that option verbose\n"); (void) fprintf(stderr, "Default is to dump everything non-verbosely\n"); @@ -3355,7 +3358,8 @@ main(int argc, char **argv) dprintf_setup(&argc, argv); - while ((c = getopt(argc, argv, "bcdhilmM:suCDRSAFLXevp:t:U:P")) != -1) { + while ((c = getopt(argc, argv, + "bcdhilmM:suCDRSAFLXx:evp:t:U:P")) != -1) { switch (c) { case 'b': case 'c': @@ -3408,6 +3412,9 @@ main(int argc, char **argv) } searchdirs[nsearch++] = optarg; break; + case 'x': + vn_dumpdir = optarg; + break; case 't': max_txg = strtoull(optarg, NULL, 0); if (max_txg < TXG_INITIAL) { Modified: stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Tue Jul 15 05:16:00 2014 (r268652) +++ stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Tue Jul 15 05:28:58 2014 (r268653) @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -52,6 +53,9 @@ char hw_serial[HW_HOSTID_LEN]; kmutex_t cpu_lock; #endif +/* If set, all blocks read will be copied to the specified directory. */ +char *vn_dumpdir = NULL; + struct utsname utsname = { "userland", "libzpool", "1", "1", "na" }; @@ -415,6 +419,7 @@ int vn_open(char *path, int x1, int flags, int mode, vnode_t **vpp, int x2, int x3) { int fd; + int dump_fd; vnode_t *vp; int old_umask; char realpath[MAXPATHLEN]; @@ -463,6 +468,17 @@ vn_open(char *path, int x1, int flags, i if (flags & FCREAT) (void) umask(old_umask); + if (vn_dumpdir != NULL) { + char dumppath[MAXPATHLEN]; + (void) snprintf(dumppath, sizeof (dumppath), + "%s/%s", vn_dumpdir, basename(realpath)); + dump_fd = open64(dumppath, O_CREAT | O_WRONLY, 0666); + if (dump_fd == -1) + return (errno); + } else { + dump_fd = -1; + } + if (fd == -1) return (errno); @@ -478,6 +494,7 @@ vn_open(char *path, int x1, int flags, i vp->v_fd = fd; vp->v_size = st.st_size; vp->v_path = spa_strdup(path); + vp->v_dump_fd = dump_fd; return (0); } @@ -510,6 +527,11 @@ vn_rdwr(int uio, vnode_t *vp, void *addr if (uio == UIO_READ) { iolen = pread64(vp->v_fd, addr, len, offset); + if (vp->v_dump_fd != -1) { + int status = + pwrite64(vp->v_dump_fd, addr, iolen, offset); + ASSERT(status != -1); + } } else { /* * To simulate partial disk writes, we split writes into two @@ -536,6 +558,8 @@ void vn_close(vnode_t *vp, int openflag, cred_t *cr, kthread_t *td) { close(vp->v_fd); + if (vp->v_dump_fd != -1) + close(vp->v_dump_fd); spa_strfree(vp->v_path); umem_free(vp, sizeof (vnode_t)); } Modified: stable/10/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Tue Jul 15 05:16:00 2014 (r268652) +++ stable/10/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Tue Jul 15 05:28:58 2014 (r268653) @@ -424,8 +424,10 @@ typedef struct vnode { uint64_t v_size; int v_fd; char *v_path; + int v_dump_fd; } vnode_t; +extern char *vn_dumpdir; #define AV_SCANSTAMP_SZ 32 /* length of anti-virus scanstamp */ typedef struct xoptattr { From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 05:32:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE257B1C; Tue, 15 Jul 2014 05:32:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA9CE2BC1; Tue, 15 Jul 2014 05:32:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6F5WrPG040436; Tue, 15 Jul 2014 05:32:53 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6F5WrkQ040435; Tue, 15 Jul 2014 05:32:53 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201407150532.s6F5WrkQ040435@svn.freebsd.org> From: Xin LI Date: Tue, 15 Jul 2014 05:32:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268654 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 05:32:54 -0000 Author: delphij Date: Tue Jul 15 05:32:53 2014 New Revision: 268654 URL: http://svnweb.freebsd.org/changeset/base/268654 Log: MFC r268085: MFV r267569: 4897 Space accounting mismatch in L2ARC/zpool Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Jul 15 05:28:58 2014 (r268653) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Jul 15 05:32:53 2014 (r268654) @@ -22,7 +22,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2014 by Saso Kiselkov. All rights reserved. - * Copyright 2013 Nexenta Systems, Inc. All rights reserved. + * Copyright 2014 Nexenta Systems, Inc. All rights reserved. */ /* @@ -1748,6 +1748,8 @@ arc_hdr_destroy(arc_buf_hdr_t *hdr) list_remove(l2hdr->b_dev->l2ad_buflist, hdr); ARCSTAT_INCR(arcstat_l2_size, -hdr->b_size); ARCSTAT_INCR(arcstat_l2_asize, -l2hdr->b_asize); + vdev_space_update(l2hdr->b_dev->l2ad_vdev, + -l2hdr->b_asize, 0, 0); kmem_free(l2hdr, sizeof (l2arc_buf_hdr_t)); if (hdr->b_state == arc_l2c_only) l2arc_hdr_stat_remove(); @@ -3701,6 +3703,8 @@ arc_release(arc_buf_t *buf, void *tag) if (l2hdr) { ARCSTAT_INCR(arcstat_l2_asize, -l2hdr->b_asize); + vdev_space_update(l2hdr->b_dev->l2ad_vdev, + -l2hdr->b_asize, 0, 0); trim_map_free(l2hdr->b_dev->l2ad_vdev, l2hdr->b_daddr, hdr->b_size, 0); kmem_free(l2hdr, sizeof (l2arc_buf_hdr_t)); @@ -4602,6 +4606,7 @@ l2arc_write_done(zio_t *zio) arc_buf_hdr_t *head, *ab, *ab_prev; l2arc_buf_hdr_t *abl2; kmutex_t *hash_lock; + int64_t bytes_dropped = 0; cb = zio->io_private; ASSERT(cb != NULL); @@ -4649,6 +4654,7 @@ l2arc_write_done(zio_t *zio) */ list_remove(buflist, ab); ARCSTAT_INCR(arcstat_l2_asize, -abl2->b_asize); + bytes_dropped += abl2->b_asize; ab->b_l2hdr = NULL; trim_map_free(abl2->b_dev->l2ad_vdev, abl2->b_daddr, ab->b_size, 0); @@ -4669,6 +4675,8 @@ l2arc_write_done(zio_t *zio) kmem_cache_free(hdr_cache, head); mutex_exit(&l2arc_buflist_mtx); + vdev_space_update(dev->l2ad_vdev, -bytes_dropped, 0, 0); + l2arc_do_free_on_write(); kmem_free(cb, sizeof (l2arc_write_callback_t)); @@ -4808,6 +4816,7 @@ l2arc_evict(l2arc_dev_t *dev, uint64_t d arc_buf_hdr_t *ab, *ab_prev; kmutex_t *hash_lock; uint64_t taddr; + int64_t bytes_evicted = 0; buflist = dev->l2ad_buflist; @@ -4906,6 +4915,7 @@ top: if (ab->b_l2hdr != NULL) { abl2 = ab->b_l2hdr; ARCSTAT_INCR(arcstat_l2_asize, -abl2->b_asize); + bytes_evicted += abl2->b_asize; ab->b_l2hdr = NULL; kmem_free(abl2, sizeof (l2arc_buf_hdr_t)); ARCSTAT_INCR(arcstat_l2_size, -ab->b_size); @@ -4922,7 +4932,7 @@ top: } mutex_exit(&l2arc_buflist_mtx); - vdev_space_update(dev->l2ad_vdev, -(taddr - dev->l2ad_evict), 0, 0); + vdev_space_update(dev->l2ad_vdev, -bytes_evicted, 0, 0); dev->l2ad_evict = taddr; } @@ -5175,15 +5185,13 @@ l2arc_write_buffers(spa_t *spa, l2arc_de ARCSTAT_INCR(arcstat_l2_write_bytes, write_asize); ARCSTAT_INCR(arcstat_l2_size, write_sz); ARCSTAT_INCR(arcstat_l2_asize, write_asize); - vdev_space_update(dev->l2ad_vdev, write_psize, 0, 0); + vdev_space_update(dev->l2ad_vdev, write_asize, 0, 0); /* * Bump device hand to the device start if it is approaching the end. * l2arc_evict() will already have evicted ahead for this case. */ if (dev->l2ad_hand >= (dev->l2ad_end - target_sz)) { - vdev_space_update(dev->l2ad_vdev, - dev->l2ad_end - dev->l2ad_hand, 0, 0); dev->l2ad_hand = dev->l2ad_start; dev->l2ad_evict = dev->l2ad_start; dev->l2ad_first = B_FALSE; From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 05:36:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D26F8DAF; Tue, 15 Jul 2014 05:36:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE39B2BD9; Tue, 15 Jul 2014 05:36:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6F5aQZY041162; Tue, 15 Jul 2014 05:36:26 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6F5aQnk041160; Tue, 15 Jul 2014 05:36:26 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201407150536.s6F5aQnk041160@svn.freebsd.org> From: Xin LI Date: Tue, 15 Jul 2014 05:36:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268656 - in stable/10: cddl/contrib/opensolaris/cmd/ztest sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 05:36:27 -0000 Author: delphij Date: Tue Jul 15 05:36:26 2014 New Revision: 268656 URL: http://svnweb.freebsd.org/changeset/base/268656 Log: MFC r268086: MFV r267570: 4756 metaslab_group_preload() could deadlock Modified: stable/10/cddl/contrib/opensolaris/cmd/ztest/ztest.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/ztest/ztest.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/ztest/ztest.c Tue Jul 15 05:34:27 2014 (r268655) +++ stable/10/cddl/contrib/opensolaris/cmd/ztest/ztest.c Tue Jul 15 05:36:26 2014 (r268656) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2012 Martin Matuska . All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. @@ -187,6 +187,7 @@ static const ztest_shared_opts_t ztest_o extern uint64_t metaslab_gang_bang; extern uint64_t metaslab_df_alloc_threshold; extern uint64_t zfs_deadman_synctime_ms; +extern int metaslab_preload_limit; static ztest_shared_opts_t *ztest_shared_opts; static ztest_shared_opts_t ztest_opts; @@ -5596,6 +5597,7 @@ ztest_run(ztest_shared_t *zs) kernel_init(FREAD | FWRITE); VERIFY0(spa_open(ztest_opts.zo_pool, &spa, FTAG)); spa->spa_debug = B_TRUE; + metaslab_preload_limit = ztest_random(20) + 1; ztest_spa = spa; VERIFY0(dmu_objset_own(ztest_opts.zo_pool, Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Tue Jul 15 05:34:27 2014 (r268655) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Tue Jul 15 05:36:26 2014 (r268656) @@ -1299,6 +1299,8 @@ metaslab_preload(void *arg) metaslab_t *msp = arg; spa_t *spa = msp->ms_group->mg_vd->vdev_spa; + ASSERT(!MUTEX_HELD(&msp->ms_group->mg_lock)); + mutex_enter(&msp->ms_lock); metaslab_load_wait(msp); if (!msp->ms_loaded) @@ -1323,19 +1325,36 @@ metaslab_group_preload(metaslab_group_t taskq_wait(mg->mg_taskq); return; } - mutex_enter(&mg->mg_lock); + mutex_enter(&mg->mg_lock); /* - * Prefetch the next potential metaslabs + * Load the next potential metaslabs */ - for (msp = avl_first(t); msp != NULL; msp = AVL_NEXT(t, msp)) { + msp = avl_first(t); + while (msp != NULL) { + metaslab_t *msp_next = AVL_NEXT(t, msp); /* If we have reached our preload limit then we're done */ if (++m > metaslab_preload_limit) break; + /* + * We must drop the metaslab group lock here to preserve + * lock ordering with the ms_lock (when grabbing both + * the mg_lock and the ms_lock, the ms_lock must be taken + * first). As a result, it is possible that the ordering + * of the metaslabs within the avl tree may change before + * we reacquire the lock. The metaslab cannot be removed from + * the tree while we're in syncing context so it is safe to + * drop the mg_lock here. If the metaslabs are reordered + * nothing will break -- we just may end up loading a + * less than optimal one. + */ + mutex_exit(&mg->mg_lock); VERIFY(taskq_dispatch(mg->mg_taskq, metaslab_preload, msp, TQ_SLEEP) != 0); + mutex_enter(&mg->mg_lock); + msp = msp_next; } mutex_exit(&mg->mg_lock); } From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 05:39:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B3584FEE; Tue, 15 Jul 2014 05:39:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CCD12BFB; Tue, 15 Jul 2014 05:39:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6F5dREi041721; Tue, 15 Jul 2014 05:39:27 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6F5dMGS041686; Tue, 15 Jul 2014 05:39:22 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201407150539.s6F5dMGS041686@svn.freebsd.org> From: Xin LI Date: Tue, 15 Jul 2014 05:39:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268657 - in stable/10: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/commo... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 05:39:27 -0000 Author: delphij Date: Tue Jul 15 05:39:22 2014 New Revision: 268657 URL: http://svnweb.freebsd.org/changeset/base/268657 Log: MFC r268123: MFV r268119: 4914 zfs on-disk bookmark structure should be named *_phys_t Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_diff.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_errlog.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/bptree.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_traverse.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_scan.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_inject.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c Tue Jul 15 05:36:26 2014 (r268656) +++ stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c Tue Jul 15 05:39:22 2014 (r268657) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. */ #include @@ -1035,7 +1035,8 @@ dump_dnode(objset_t *os, uint64_t object } static uint64_t -blkid2offset(const dnode_phys_t *dnp, const blkptr_t *bp, const zbookmark_t *zb) +blkid2offset(const dnode_phys_t *dnp, const blkptr_t *bp, + const zbookmark_phys_t *zb) { if (dnp == NULL) { ASSERT(zb->zb_level < 0); @@ -1097,7 +1098,7 @@ snprintf_blkptr_compact(char *blkbuf, si } static void -print_indirect(blkptr_t *bp, const zbookmark_t *zb, +print_indirect(blkptr_t *bp, const zbookmark_phys_t *zb, const dnode_phys_t *dnp) { char blkbuf[BP_SPRINTF_LEN]; @@ -1126,7 +1127,7 @@ print_indirect(blkptr_t *bp, const zbook static int visit_indirect(spa_t *spa, const dnode_phys_t *dnp, - blkptr_t *bp, const zbookmark_t *zb) + blkptr_t *bp, const zbookmark_phys_t *zb) { int err = 0; @@ -1152,7 +1153,7 @@ visit_indirect(spa_t *spa, const dnode_p /* recursively visit blocks below this */ cbp = buf->b_data; for (i = 0; i < epb; i++, cbp++) { - zbookmark_t czb; + zbookmark_phys_t czb; SET_BOOKMARK(&czb, zb->zb_objset, zb->zb_object, zb->zb_level - 1, @@ -1176,7 +1177,7 @@ dump_indirect(dnode_t *dn) { dnode_phys_t *dnp = dn->dn_phys; int j; - zbookmark_t czb; + zbookmark_phys_t czb; (void) printf("Indirect blocks:\n"); @@ -2248,7 +2249,7 @@ zdb_blkptr_done(zio_t *zio) blkptr_t *bp = zio->io_bp; int ioerr = zio->io_error; zdb_cb_t *zcb = zio->io_private; - zbookmark_t *zb = &zio->io_bookmark; + zbookmark_phys_t *zb = &zio->io_bookmark; zio_data_buf_free(zio->io_data, zio->io_size); @@ -2283,7 +2284,7 @@ zdb_blkptr_done(zio_t *zio) /* ARGSUSED */ static int zdb_blkptr_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, - const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) + const zbookmark_phys_t *zb, const dnode_phys_t *dnp, void *arg) { zdb_cb_t *zcb = arg; dmu_object_type_t type; @@ -2747,7 +2748,7 @@ typedef struct zdb_ddt_entry { /* ARGSUSED */ static int zdb_ddt_add_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, - const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) + const zbookmark_phys_t *zb, const dnode_phys_t *dnp, void *arg) { avl_tree_t *t = arg; avl_index_t where; Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c Tue Jul 15 05:36:26 2014 (r268656) +++ stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c Tue Jul 15 05:39:22 2014 (r268657) @@ -24,7 +24,7 @@ */ /* - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013, 2014 by Delphix. All rights reserved. */ /* @@ -122,7 +122,7 @@ zil_prt_rec_write(zilog_t *zilog, int tx { char *data, *dlimit; blkptr_t *bp = &lr->lr_blkptr; - zbookmark_t zb; + zbookmark_phys_t zb; char buf[SPA_MAXBLOCKSIZE]; int verbose = MAX(dump_opt['d'], dump_opt['i']); int error; Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Tue Jul 15 05:36:26 2014 (r268656) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Tue Jul 15 05:39:22 2014 (r268657) @@ -22,7 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ @@ -3513,7 +3513,7 @@ zpool_vdev_name(libzfs_handle_t *hdl, zp static int zbookmark_compare(const void *a, const void *b) { - return (memcmp(a, b, sizeof (zbookmark_t))); + return (memcmp(a, b, sizeof (zbookmark_phys_t))); } /* @@ -3525,7 +3525,7 @@ zpool_get_errlog(zpool_handle_t *zhp, nv { zfs_cmd_t zc = { 0 }; uint64_t count; - zbookmark_t *zb = NULL; + zbookmark_phys_t *zb = NULL; int i; /* @@ -3538,7 +3538,7 @@ zpool_get_errlog(zpool_handle_t *zhp, nv if (count == 0) return (0); if ((zc.zc_nvlist_dst = (uintptr_t)zfs_alloc(zhp->zpool_hdl, - count * sizeof (zbookmark_t))) == (uintptr_t)NULL) + count * sizeof (zbookmark_phys_t))) == (uintptr_t)NULL) return (-1); zc.zc_nvlist_dst_size = count; (void) strcpy(zc.zc_name, zhp->zpool_name); @@ -3547,11 +3547,14 @@ zpool_get_errlog(zpool_handle_t *zhp, nv &zc) != 0) { free((void *)(uintptr_t)zc.zc_nvlist_dst); if (errno == ENOMEM) { + void *dst; + count = zc.zc_nvlist_dst_size; - if ((zc.zc_nvlist_dst = (uintptr_t) - zfs_alloc(zhp->zpool_hdl, count * - sizeof (zbookmark_t))) == (uintptr_t)NULL) + dst = zfs_alloc(zhp->zpool_hdl, count * + sizeof (zbookmark_phys_t)); + if (dst == NULL) return (-1); + zc.zc_nvlist_dst = (uintptr_t)dst; } else { return (-1); } @@ -3567,11 +3570,11 @@ zpool_get_errlog(zpool_handle_t *zhp, nv * _not_ copied as part of the process. So we point the start of our * array appropriate and decrement the total number of elements. */ - zb = ((zbookmark_t *)(uintptr_t)zc.zc_nvlist_dst) + + zb = ((zbookmark_phys_t *)(uintptr_t)zc.zc_nvlist_dst) + zc.zc_nvlist_dst_size; count -= zc.zc_nvlist_dst_size; - qsort(zb, count, sizeof (zbookmark_t), zbookmark_compare); + qsort(zb, count, sizeof (zbookmark_phys_t), zbookmark_compare); verify(nvlist_alloc(nverrlistp, 0, KM_SLEEP) == 0); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Jul 15 05:36:26 2014 (r268656) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Jul 15 05:39:22 2014 (r268657) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright (c) 2014 by Saso Kiselkov. All rights reserved. * Copyright 2014 Nexenta Systems, Inc. All rights reserved. */ @@ -782,7 +782,7 @@ typedef struct l2arc_read_callback { arc_buf_t *l2rcb_buf; /* read buffer */ spa_t *l2rcb_spa; /* spa */ blkptr_t l2rcb_bp; /* original blkptr */ - zbookmark_t l2rcb_zb; /* original bookmark */ + zbookmark_phys_t l2rcb_zb; /* original bookmark */ int l2rcb_flags; /* original flags */ enum zio_compress l2rcb_compress; /* applied compress */ } l2arc_read_callback_t; @@ -3146,7 +3146,7 @@ arc_read_done(zio_t *zio) int arc_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, arc_done_func_t *done, void *private, zio_priority_t priority, int zio_flags, uint32_t *arc_flags, - const zbookmark_t *zb) + const zbookmark_phys_t *zb) { arc_buf_hdr_t *hdr = NULL; arc_buf_t *buf = NULL; @@ -3340,7 +3340,7 @@ top: */ ASSERT3U(hdr->b_size, ==, size); DTRACE_PROBE4(arc__miss, arc_buf_hdr_t *, hdr, blkptr_t *, bp, - uint64_t, size, zbookmark_t *, zb); + uint64_t, size, zbookmark_phys_t *, zb); ARCSTAT_BUMP(arcstat_misses); ARCSTAT_CONDSTAT(!(hdr->b_flags & ARC_PREFETCH), demand, prefetch, hdr->b_type != ARC_BUFC_METADATA, @@ -3874,7 +3874,7 @@ arc_write(zio_t *pio, spa_t *spa, uint64 blkptr_t *bp, arc_buf_t *buf, boolean_t l2arc, boolean_t l2arc_compress, const zio_prop_t *zp, arc_done_func_t *ready, arc_done_func_t *physdone, arc_done_func_t *done, void *private, zio_priority_t priority, - int zio_flags, const zbookmark_t *zb) + int zio_flags, const zbookmark_phys_t *zb) { arc_buf_hdr_t *hdr = buf->b_hdr; arc_write_callback_t *callback; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c Tue Jul 15 05:36:26 2014 (r268656) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c Tue Jul 15 05:39:22 2014 (r268657) @@ -20,7 +20,7 @@ */ /* - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. */ #include @@ -149,7 +149,7 @@ bptree_add(objset_t *os, uint64_t obj, b /* ARGSUSED */ static int bptree_visit_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, - const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) + const zbookmark_phys_t *zb, const dnode_phys_t *dnp, void *arg) { int err; struct bptree_args *ba = arg; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Tue Jul 15 05:36:26 2014 (r268656) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Tue Jul 15 05:39:22 2014 (r268657) @@ -521,7 +521,7 @@ static void dbuf_read_impl(dmu_buf_impl_t *db, zio_t *zio, uint32_t *flags) { dnode_t *dn; - zbookmark_t zb; + zbookmark_phys_t zb; uint32_t aflags = ARC_NOWAIT; DB_DNODE_ENTER(db); @@ -1856,7 +1856,7 @@ dbuf_prefetch(dnode_t *dn, uint64_t blki if (bp && !BP_IS_HOLE(bp) && !BP_IS_EMBEDDED(bp)) { dsl_dataset_t *ds = dn->dn_objset->os_dsl_dataset; uint32_t aflags = ARC_NOWAIT | ARC_PREFETCH; - zbookmark_t zb; + zbookmark_phys_t zb; SET_BOOKMARK(&zb, ds ? ds->ds_object : DMU_META_OBJSET, dn->dn_object, 0, blkid); @@ -2725,7 +2725,7 @@ dbuf_write(dbuf_dirty_record_t *dr, arc_ objset_t *os; dmu_buf_impl_t *parent = db->db_parent; uint64_t txg = tx->tx_txg; - zbookmark_t zb; + zbookmark_phys_t zb; zio_prop_t zp; zio_t *zio; int wp_flag = 0; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Tue Jul 15 05:36:26 2014 (r268656) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Tue Jul 15 05:39:22 2014 (r268657) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. */ /* Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ /* Copyright (c) 2013, Joyent, Inc. All rights reserved. */ @@ -1448,7 +1448,7 @@ dmu_sync_late_arrival_done(zio_t *zio) static int dmu_sync_late_arrival(zio_t *pio, objset_t *os, dmu_sync_cb_t *done, zgd_t *zgd, - zio_prop_t *zp, zbookmark_t *zb) + zio_prop_t *zp, zbookmark_phys_t *zb) { dmu_sync_arg_t *dsa; dmu_tx_t *tx; @@ -1509,7 +1509,7 @@ dmu_sync(zio_t *pio, uint64_t txg, dmu_s dsl_dataset_t *ds = os->os_dsl_dataset; dbuf_dirty_record_t *dr; dmu_sync_arg_t *dsa; - zbookmark_t zb; + zbookmark_phys_t zb; zio_prop_t zp; dnode_t *dn; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_diff.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_diff.c Tue Jul 15 05:36:26 2014 (r268656) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_diff.c Tue Jul 15 05:39:22 2014 (r268657) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. */ #include @@ -130,7 +130,7 @@ report_dnode(struct diffarg *da, uint64_ /* ARGSUSED */ static int diff_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, - const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) + const zbookmark_phys_t *zb, const dnode_phys_t *dnp, void *arg) { struct diffarg *da = arg; int err = 0; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Tue Jul 15 05:36:26 2014 (r268656) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Tue Jul 15 05:39:22 2014 (r268657) @@ -286,7 +286,7 @@ dmu_objset_open_impl(spa_t *spa, dsl_dat os->os_rootbp = bp; if (!BP_IS_HOLE(os->os_rootbp)) { uint32_t aflags = ARC_WAIT; - zbookmark_t zb; + zbookmark_phys_t zb; SET_BOOKMARK(&zb, ds ? ds->ds_object : DMU_META_OBJSET, ZB_ROOT_OBJECT, ZB_ROOT_LEVEL, ZB_ROOT_BLKID); @@ -1023,7 +1023,7 @@ void dmu_objset_sync(objset_t *os, zio_t *pio, dmu_tx_t *tx) { int txgoff; - zbookmark_t zb; + zbookmark_phys_t zb; zio_prop_t zp; zio_t *zio; list_t *list; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Tue Jul 15 05:36:26 2014 (r268656) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Tue Jul 15 05:39:22 2014 (r268657) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright (c) 2014, Joyent, Inc. All rights reserved. * Copyright (c) 2012, Martin Matuska . All rights reserved. */ @@ -441,7 +441,7 @@ backup_do_embed(dmu_sendarg_t *dsp, cons /* ARGSUSED */ static int backup_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, - const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) + const zbookmark_phys_t *zb, const dnode_phys_t *dnp, void *arg) { dmu_sendarg_t *dsp = arg; dmu_object_type_t type = bp ? BP_GET_TYPE(bp) : DMU_OT_NONE; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Tue Jul 15 05:36:26 2014 (r268656) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Tue Jul 15 05:39:22 2014 (r268657) @@ -55,7 +55,7 @@ typedef struct traverse_data { uint64_t td_objset; blkptr_t *td_rootbp; uint64_t td_min_txg; - zbookmark_t *td_resume; + zbookmark_phys_t *td_resume; int td_flags; prefetch_data_t *td_pfd; boolean_t td_paused; @@ -72,7 +72,7 @@ static int traverse_zil_block(zilog_t *zilog, blkptr_t *bp, void *arg, uint64_t claim_txg) { traverse_data_t *td = arg; - zbookmark_t zb; + zbookmark_phys_t zb; if (BP_IS_HOLE(bp)) return (0); @@ -96,7 +96,7 @@ traverse_zil_record(zilog_t *zilog, lr_t if (lrc->lrc_txtype == TX_WRITE) { lr_write_t *lr = (lr_write_t *)lrc; blkptr_t *bp = &lr->lr_blkptr; - zbookmark_t zb; + zbookmark_phys_t zb; if (BP_IS_HOLE(bp)) return (0); @@ -150,7 +150,7 @@ typedef enum resume_skip { */ static resume_skip_t resume_skip_check(traverse_data_t *td, const dnode_phys_t *dnp, - const zbookmark_t *zb) + const zbookmark_phys_t *zb) { if (td->td_resume != NULL && !ZB_IS_ZERO(td->td_resume)) { /* @@ -175,7 +175,7 @@ resume_skip_check(traverse_data_t *td, c static void traverse_prefetch_metadata(traverse_data_t *td, - const blkptr_t *bp, const zbookmark_t *zb) + const blkptr_t *bp, const zbookmark_phys_t *zb) { uint32_t flags = ARC_NOWAIT | ARC_PREFETCH; @@ -209,9 +209,9 @@ prefetch_needed(prefetch_data_t *pfd, co static int traverse_visitbp(traverse_data_t *td, const dnode_phys_t *dnp, - const blkptr_t *bp, const zbookmark_t *zb) + const blkptr_t *bp, const zbookmark_phys_t *zb) { - zbookmark_t czb; + zbookmark_phys_t czb; int err = 0; arc_buf_t *buf = NULL; prefetch_data_t *pd = td->td_pfd; @@ -406,7 +406,7 @@ prefetch_dnode_metadata(traverse_data_t uint64_t objset, uint64_t object) { int j; - zbookmark_t czb; + zbookmark_phys_t czb; for (j = 0; j < dnp->dn_nblkptr; j++) { SET_BOOKMARK(&czb, objset, object, dnp->dn_nlevels - 1, j); @@ -424,7 +424,7 @@ traverse_dnode(traverse_data_t *td, cons uint64_t objset, uint64_t object) { int j, err = 0; - zbookmark_t czb; + zbookmark_phys_t czb; for (j = 0; j < dnp->dn_nblkptr; j++) { SET_BOOKMARK(&czb, objset, object, dnp->dn_nlevels - 1, j); @@ -443,7 +443,7 @@ traverse_dnode(traverse_data_t *td, cons /* ARGSUSED */ static int traverse_prefetcher(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, - const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) + const zbookmark_phys_t *zb, const dnode_phys_t *dnp, void *arg) { prefetch_data_t *pfd = arg; uint32_t aflags = ARC_NOWAIT | ARC_PREFETCH; @@ -473,7 +473,7 @@ traverse_prefetch_thread(void *arg) { traverse_data_t *td_main = arg; traverse_data_t td = *td_main; - zbookmark_t czb; + zbookmark_phys_t czb; td.td_func = traverse_prefetcher; td.td_arg = td_main->td_pfd; @@ -495,12 +495,12 @@ traverse_prefetch_thread(void *arg) */ static int traverse_impl(spa_t *spa, dsl_dataset_t *ds, uint64_t objset, blkptr_t *rootbp, - uint64_t txg_start, zbookmark_t *resume, int flags, + uint64_t txg_start, zbookmark_phys_t *resume, int flags, blkptr_cb_t func, void *arg) { traverse_data_t td; prefetch_data_t pd = { 0 }; - zbookmark_t czb; + zbookmark_phys_t czb; int err; ASSERT(ds == NULL || objset == ds->ds_object); @@ -581,7 +581,7 @@ traverse_dataset(dsl_dataset_t *ds, uint int traverse_dataset_destroyed(spa_t *spa, blkptr_t *blkptr, - uint64_t txg_start, zbookmark_t *resume, int flags, + uint64_t txg_start, zbookmark_phys_t *resume, int flags, blkptr_cb_t func, void *arg) { return (traverse_impl(spa, NULL, ZB_DESTROYED_OBJSET, Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c Tue Jul 15 05:36:26 2014 (r268656) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c Tue Jul 15 05:39:22 2014 (r268657) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. * Copyright (c) 2013 by Joyent, Inc. All rights reserved. */ @@ -534,7 +534,7 @@ struct killarg { /* ARGSUSED */ static int kill_blkptr(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, - const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) + const zbookmark_phys_t *zb, const dnode_phys_t *dnp, void *arg) { struct killarg *ka = arg; dmu_tx_t *tx = ka->tx; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Tue Jul 15 05:36:26 2014 (r268656) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Tue Jul 15 05:39:22 2014 (r268657) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. */ #include @@ -50,7 +50,8 @@ #include #endif -typedef int (scan_cb_t)(dsl_pool_t *, const blkptr_t *, const zbookmark_t *); +typedef int (scan_cb_t)(dsl_pool_t *, const blkptr_t *, + const zbookmark_phys_t *); static scan_cb_t dsl_scan_scrub_cb; static void dsl_scan_cancel_sync(void *, dmu_tx_t *); @@ -379,7 +380,7 @@ dsl_scan_cancel(dsl_pool_t *dp) } static void dsl_scan_visitbp(blkptr_t *bp, - const zbookmark_t *zb, dnode_phys_t *dnp, arc_buf_t *pbuf, + const zbookmark_phys_t *zb, dnode_phys_t *dnp, arc_buf_t *pbuf, dsl_dataset_t *ds, dsl_scan_t *scn, dmu_objset_type_t ostype, dmu_tx_t *tx); static void dsl_scan_visitdnode(dsl_scan_t *, dsl_dataset_t *ds, @@ -419,7 +420,7 @@ dsl_scan_sync_state(dsl_scan_t *scn, dmu } static boolean_t -dsl_scan_check_pause(dsl_scan_t *scn, const zbookmark_t *zb) +dsl_scan_check_pause(dsl_scan_t *scn, const zbookmark_phys_t *zb) { uint64_t elapsed_nanosecs; unsigned int mintime; @@ -477,7 +478,7 @@ dsl_scan_zil_block(zilog_t *zilog, blkpt dsl_pool_t *dp = zsa->zsa_dp; dsl_scan_t *scn = dp->dp_scan; zil_header_t *zh = zsa->zsa_zh; - zbookmark_t zb; + zbookmark_phys_t zb; if (BP_IS_HOLE(bp) || bp->blk_birth <= scn->scn_phys.scn_cur_min_txg) return (0); @@ -509,7 +510,7 @@ dsl_scan_zil_record(zilog_t *zilog, lr_t zil_header_t *zh = zsa->zsa_zh; lr_write_t *lr = (lr_write_t *)lrc; blkptr_t *bp = &lr->lr_blkptr; - zbookmark_t zb; + zbookmark_phys_t zb; if (BP_IS_HOLE(bp) || bp->blk_birth <= scn->scn_phys.scn_cur_min_txg) @@ -559,7 +560,7 @@ static void dsl_scan_prefetch(dsl_scan_t *scn, arc_buf_t *buf, blkptr_t *bp, uint64_t objset, uint64_t object, uint64_t blkid) { - zbookmark_t czb; + zbookmark_phys_t czb; uint32_t flags = ARC_NOWAIT | ARC_PREFETCH; if (zfs_no_scrub_prefetch) @@ -578,7 +579,7 @@ dsl_scan_prefetch(dsl_scan_t *scn, arc_b static boolean_t dsl_scan_check_resume(dsl_scan_t *scn, const dnode_phys_t *dnp, - const zbookmark_t *zb) + const zbookmark_phys_t *zb) { /* * We never skip over user/group accounting objects (obj<0) @@ -618,7 +619,7 @@ dsl_scan_check_resume(dsl_scan_t *scn, c static int dsl_scan_recurse(dsl_scan_t *scn, dsl_dataset_t *ds, dmu_objset_type_t ostype, dnode_phys_t *dnp, const blkptr_t *bp, - const zbookmark_t *zb, dmu_tx_t *tx, arc_buf_t **bufp) + const zbookmark_phys_t *zb, dmu_tx_t *tx, arc_buf_t **bufp) { dsl_pool_t *dp = scn->scn_dp; int zio_flags = ZIO_FLAG_CANFAIL | ZIO_FLAG_SCAN_THREAD; @@ -641,7 +642,7 @@ dsl_scan_recurse(dsl_scan_t *scn, dsl_da zb->zb_object, zb->zb_blkid * epb + i); } for (i = 0, cbp = (*bufp)->b_data; i < epb; i++, cbp++) { - zbookmark_t czb; + zbookmark_phys_t czb; SET_BOOKMARK(&czb, zb->zb_objset, zb->zb_object, zb->zb_level - 1, @@ -725,7 +726,7 @@ dsl_scan_visitdnode(dsl_scan_t *scn, dsl int j; for (j = 0; j < dnp->dn_nblkptr; j++) { - zbookmark_t czb; + zbookmark_phys_t czb; SET_BOOKMARK(&czb, ds ? ds->ds_object : 0, object, dnp->dn_nlevels - 1, j); @@ -734,7 +735,7 @@ dsl_scan_visitdnode(dsl_scan_t *scn, dsl } if (dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) { - zbookmark_t czb; + zbookmark_phys_t czb; SET_BOOKMARK(&czb, ds ? ds->ds_object : 0, object, 0, DMU_SPILL_BLKID); dsl_scan_visitbp(&dnp->dn_spill, @@ -747,7 +748,7 @@ dsl_scan_visitdnode(dsl_scan_t *scn, dsl * first 5; we want them to be useful. */ static void -dsl_scan_visitbp(blkptr_t *bp, const zbookmark_t *zb, +dsl_scan_visitbp(blkptr_t *bp, const zbookmark_phys_t *zb, dnode_phys_t *dnp, arc_buf_t *pbuf, dsl_dataset_t *ds, dsl_scan_t *scn, dmu_objset_type_t ostype, dmu_tx_t *tx) @@ -811,7 +812,7 @@ static void dsl_scan_visit_rootbp(dsl_scan_t *scn, dsl_dataset_t *ds, blkptr_t *bp, dmu_tx_t *tx) { - zbookmark_t zb; + zbookmark_phys_t zb; SET_BOOKMARK(&zb, ds ? ds->ds_object : DMU_META_OBJSET, ZB_ROOT_OBJECT, ZB_ROOT_LEVEL, ZB_ROOT_BLKID); @@ -1238,7 +1239,7 @@ dsl_scan_ddt_entry(dsl_scan_t *scn, enum const ddt_key_t *ddk = &dde->dde_key; ddt_phys_t *ddp = dde->dde_phys; blkptr_t bp; - zbookmark_t zb = { 0 }; + zbookmark_phys_t zb = { 0 }; if (scn->scn_phys.scn_state != DSS_SCANNING) return; @@ -1306,7 +1307,7 @@ dsl_scan_visit(dsl_scan_t *scn, dmu_tx_t * In case we were paused right at the end of the ds, zero the * bookmark so we don't think that we're still trying to resume. */ - bzero(&scn->scn_phys.scn_bookmark, sizeof (zbookmark_t)); + bzero(&scn->scn_phys.scn_bookmark, sizeof (zbookmark_phys_t)); /* keep pulling things out of the zap-object-as-queue */ while (zap_cursor_init(&zc, dp->dp_meta_objset, @@ -1703,7 +1704,7 @@ dsl_scan_scrub_done(zio_t *zio) static int dsl_scan_scrub_cb(dsl_pool_t *dp, - const blkptr_t *bp, const zbookmark_t *zb) + const blkptr_t *bp, const zbookmark_phys_t *zb) { dsl_scan_t *scn = dp->dp_scan; size_t size = BP_GET_PSIZE(bp); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Jul 15 05:36:26 2014 (r268656) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Jul 15 05:39:22 2014 (r268657) @@ -810,7 +810,7 @@ spa_error_entry_compare(const void *a, c int ret; ret = bcmp(&sa->se_bookmark, &sb->se_bookmark, - sizeof (zbookmark_t)); + sizeof (zbookmark_phys_t)); if (ret < 0) return (-1); @@ -1887,7 +1887,7 @@ spa_load_verify_done(zio_t *zio) /*ARGSUSED*/ static int spa_load_verify_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, - const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) + const zbookmark_phys_t *zb, const dnode_phys_t *dnp, void *arg) { if (!BP_IS_HOLE(bp) && !BP_IS_EMBEDDED(bp)) { zio_t *rio = arg; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_errlog.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_errlog.c Tue Jul 15 05:36:26 2014 (r268656) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_errlog.c Tue Jul 15 05:39:22 2014 (r268657) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013, 2014 by Delphix. All rights reserved. */ /* @@ -35,7 +35,7 @@ * deleted from the log when the scrub completes. * * The log is stored using a ZAP object whose key is a string form of the - * zbookmark tuple (objset, object, level, blkid), and whose contents is an + * zbookmark_phys tuple (objset, object, level, blkid), and whose contents is an * optional 'objset:object' human-readable string describing the data. When an * error is first logged, this string will be empty, indicating that no name is * known. This prevents us from having to issue a potentially large amount of @@ -59,7 +59,7 @@ * Convert a bookmark to a string. */ static void -bookmark_to_name(zbookmark_t *zb, char *buf, size_t len) +bookmark_to_name(zbookmark_phys_t *zb, char *buf, size_t len) { (void) snprintf(buf, len, "%llx:%llx:%llx:%llx", (u_longlong_t)zb->zb_objset, (u_longlong_t)zb->zb_object, @@ -71,7 +71,7 @@ bookmark_to_name(zbookmark_t *zb, char * */ #ifdef _KERNEL static void -name_to_bookmark(char *buf, zbookmark_t *zb) +name_to_bookmark(char *buf, zbookmark_phys_t *zb) { zb->zb_objset = strtonum(buf, &buf); ASSERT(*buf == ':'); @@ -92,7 +92,7 @@ name_to_bookmark(char *buf, zbookmark_t void spa_log_error(spa_t *spa, zio_t *zio) { - zbookmark_t *zb = &zio->io_logical->io_bookmark; + zbookmark_phys_t *zb = &zio->io_logical->io_bookmark; spa_error_entry_t search; spa_error_entry_t *new; avl_tree_t *tree; @@ -165,7 +165,7 @@ process_error_log(spa_t *spa, uint64_t o { zap_cursor_t zc; zap_attribute_t za; - zbookmark_t zb; + zbookmark_phys_t zb; if (obj == 0) return (0); @@ -182,8 +182,8 @@ process_error_log(spa_t *spa, uint64_t o name_to_bookmark(za.za_name, &zb); if (copyout(&zb, (char *)addr + - (*count - 1) * sizeof (zbookmark_t), - sizeof (zbookmark_t)) != 0) { + (*count - 1) * sizeof (zbookmark_phys_t), + sizeof (zbookmark_phys_t)) != 0) { zap_cursor_fini(&zc); return (SET_ERROR(EFAULT)); } @@ -207,8 +207,8 @@ process_error_list(avl_tree_t *list, voi return (SET_ERROR(ENOMEM)); if (copyout(&se->se_bookmark, (char *)addr + - (*count - 1) * sizeof (zbookmark_t), - sizeof (zbookmark_t)) != 0) + (*count - 1) * sizeof (zbookmark_phys_t), + sizeof (zbookmark_phys_t)) != 0) return (SET_ERROR(EFAULT)); *count -= 1; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Tue Jul 15 05:36:26 2014 (r268656) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Tue Jul 15 05:39:22 2014 (r268657) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ @@ -105,12 +105,12 @@ int arc_referenced(arc_buf_t *buf); int arc_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, arc_done_func_t *done, void *priv, zio_priority_t priority, int flags, - uint32_t *arc_flags, const zbookmark_t *zb); + uint32_t *arc_flags, const zbookmark_phys_t *zb); zio_t *arc_write(zio_t *pio, spa_t *spa, uint64_t txg, blkptr_t *bp, arc_buf_t *buf, boolean_t l2arc, boolean_t l2arc_compress, const zio_prop_t *zp, arc_done_func_t *ready, arc_done_func_t *physdone, arc_done_func_t *done, void *priv, zio_priority_t priority, - int zio_flags, const zbookmark_t *zb); + int zio_flags, const zbookmark_phys_t *zb); void arc_freed(spa_t *spa, const blkptr_t *bp); void arc_set_callback(arc_buf_t *buf, arc_evict_func_t *func, void *priv); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/bptree.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/bptree.h Tue Jul 15 05:36:26 2014 (r268656) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/bptree.h Tue Jul 15 05:39:22 2014 (r268657) @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. */ #ifndef _SYS_BPTREE_H @@ -43,7 +43,7 @@ typedef struct bptree_phys { typedef struct bptree_entry_phys { blkptr_t be_bp; uint64_t be_birth_txg; /* only delete blocks born after this txg */ - zbookmark_t be_zb; /* holds traversal resume point if needed */ + zbookmark_phys_t be_zb; /* holds traversal resume point if needed */ } bptree_entry_phys_t; typedef int bptree_itor_t(void *arg, const blkptr_t *bp, dmu_tx_t *tx); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Tue Jul 15 05:36:26 2014 (r268656) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Tue Jul 15 05:39:22 2014 (r268657) @@ -64,7 +64,7 @@ struct dsl_pool; struct dnode; struct drr_begin; struct drr_end; -struct zbookmark; +struct zbookmark_phys; struct spa; struct nvlist; struct arc_buf; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_traverse.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_traverse.h Tue Jul 15 05:36:26 2014 (r268656) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_traverse.h Tue Jul 15 05:39:22 2014 (r268657) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. */ #ifndef _SYS_DMU_TRAVERSE_H @@ -40,7 +40,7 @@ struct zilog; struct arc_buf; typedef int (blkptr_cb_t)(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, - const zbookmark_t *zb, const struct dnode_phys *dnp, void *arg); + const zbookmark_phys_t *zb, const struct dnode_phys *dnp, void *arg); #define TRAVERSE_PRE (1<<0) #define TRAVERSE_POST (1<<1) @@ -55,7 +55,7 @@ typedef int (blkptr_cb_t)(spa_t *spa, zi int traverse_dataset(struct dsl_dataset *ds, uint64_t txg_start, int flags, blkptr_cb_t func, void *arg); int traverse_dataset_destroyed(spa_t *spa, blkptr_t *blkptr, - uint64_t txg_start, zbookmark_t *resume, int flags, + uint64_t txg_start, zbookmark_phys_t *resume, int flags, blkptr_cb_t func, void *arg); int traverse_pool(spa_t *spa, uint64_t txg_start, int flags, blkptr_cb_t func, void *arg); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_scan.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_scan.h Tue Jul 15 05:36:26 2014 (r268656) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_scan.h Tue Jul 15 05:39:22 2014 (r268657) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. */ #ifndef _SYS_DSL_SCAN_H @@ -62,7 +62,7 @@ typedef struct dsl_scan_phys { uint64_t scn_errors; /* scan I/O error count */ uint64_t scn_ddt_class_max; ddt_bookmark_t scn_ddt_bookmark; - zbookmark_t scn_bookmark; + zbookmark_phys_t scn_bookmark; uint64_t scn_flags; /* dsl_scan_flags_t */ } dsl_scan_phys_t; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Tue Jul 15 05:36:26 2014 (r268656) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Tue Jul 15 05:39:22 2014 (r268657) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. */ @@ -820,7 +820,7 @@ extern void spa_history_log_internal_dd( dmu_tx_t *tx, const char *fmt, ...); /* error handling */ -struct zbookmark; +struct zbookmark_phys; extern void spa_log_error(spa_t *spa, zio_t *zio); extern void zfs_ereport_post(const char *cls, spa_t *spa, vdev_t *vd, zio_t *zio, uint64_t stateoroffset, uint64_t length); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h Tue Jul 15 05:36:26 2014 (r268656) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h Tue Jul 15 05:39:22 2014 (r268657) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright 2013 Martin Matuska . All rights reserved. */ @@ -47,9 +47,9 @@ extern "C" { #endif typedef struct spa_error_entry { - zbookmark_t se_bookmark; - char *se_name; - avl_node_t se_avl; + zbookmark_phys_t se_bookmark; + char *se_name; + avl_node_t se_avl; } spa_error_entry_t; typedef struct spa_history_phys { Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Tue Jul 15 05:36:26 2014 (r268656) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Tue Jul 15 05:39:22 2014 (r268657) @@ -22,8 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ @@ -262,16 +261,16 @@ extern const char *zio_type_name[ZIO_TYP * Note: this structure is called a bookmark because its original purpose * was to remember where to resume a pool-wide traverse. * - * Note: this structure is passed between userland and the kernel. - * Therefore it must not change size or alignment between 32/64 bit - * compilation options. + * Note: this structure is passed between userland and the kernel, and is + * stored on disk (by virtue of being incorporated into other on-disk + * structures, e.g. dsl_scan_phys_t). */ -typedef struct zbookmark { +typedef struct zbookmark_phys { uint64_t zb_objset; uint64_t zb_object; int64_t zb_level; uint64_t zb_blkid; -} zbookmark_t; +} zbookmark_phys_t; #define SET_BOOKMARK(zb, objset, object, level, blkid) \ { \ @@ -415,7 +414,7 @@ extern zio_trim_stats_t zio_trim_stats; struct zio { /* Core information about this I/O */ - zbookmark_t io_bookmark; + zbookmark_phys_t io_bookmark; zio_prop_t io_prop; zio_type_t io_type; enum zio_child io_child_type; @@ -497,17 +496,17 @@ extern zio_t *zio_root(spa_t *spa, extern zio_t *zio_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, void *data, uint64_t size, zio_done_func_t *done, void *priv, - zio_priority_t priority, enum zio_flag flags, const zbookmark_t *zb); + zio_priority_t priority, enum zio_flag flags, const zbookmark_phys_t *zb); extern zio_t *zio_write(zio_t *pio, spa_t *spa, uint64_t txg, blkptr_t *bp, void *data, uint64_t size, const zio_prop_t *zp, zio_done_func_t *ready, zio_done_func_t *physdone, zio_done_func_t *done, void *priv, - zio_priority_t priority, enum zio_flag flags, const zbookmark_t *zb); + zio_priority_t priority, enum zio_flag flags, const zbookmark_phys_t *zb); extern zio_t *zio_rewrite(zio_t *pio, spa_t *spa, uint64_t txg, blkptr_t *bp, void *data, uint64_t size, zio_done_func_t *done, void *priv, - zio_priority_t priority, enum zio_flag flags, zbookmark_t *zb); + zio_priority_t priority, enum zio_flag flags, zbookmark_phys_t *zb); extern void zio_write_override(zio_t *zio, blkptr_t *bp, int copies, boolean_t nopwrite); @@ -629,9 +628,9 @@ extern void zfs_ereport_post_checksum(sp /* Called from spa_sync(), but primarily an injection handler */ extern void spa_handle_ignored_writes(spa_t *spa); -/* zbookmark functions */ +/* zbookmark_phys functions */ boolean_t zbookmark_is_before(const struct dnode_phys *dnp, - const zbookmark_t *zb1, const zbookmark_t *zb2); + const zbookmark_phys_t *zb1, const zbookmark_phys_t *zb2); #ifdef __cplusplus } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Tue Jul 15 05:36:26 2014 (r268656) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Tue Jul 15 05:39:22 2014 (r268657) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -195,7 +195,7 @@ zil_read_log_block(zilog_t *zilog, const enum zio_flag zio_flags = ZIO_FLAG_CANFAIL; uint32_t aflags = ARC_WAIT; arc_buf_t *abuf = NULL; - zbookmark_t zb; + zbookmark_phys_t zb; int error; if (zilog->zl_header->zh_claim_txg == 0) @@ -268,7 +268,7 @@ zil_read_log_data(zilog_t *zilog, const const blkptr_t *bp = &lr->lr_blkptr; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 05:42:10 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9C8CE1D0; Tue, 15 Jul 2014 05:42:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 872422C7D; Tue, 15 Jul 2014 05:42:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6F5gAQm045289; Tue, 15 Jul 2014 05:42:10 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6F5g9jZ045283; Tue, 15 Jul 2014 05:42:09 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201407150542.s6F5g9jZ045283@svn.freebsd.org> From: Xin LI Date: Tue, 15 Jul 2014 05:42:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268658 - in stable/10: cddl/contrib/opensolaris/cmd/zpool sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 05:42:10 -0000 Author: delphij Date: Tue Jul 15 05:42:09 2014 New Revision: 268658 URL: http://svnweb.freebsd.org/changeset/base/268658 Log: MFC r268126: MFV r268121: 4924 LZ4 Compression for metadata Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Tue Jul 15 05:39:22 2014 (r268657) +++ stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Tue Jul 15 05:42:09 2014 (r268658) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 30, 2014 +.Dd July 1, 2014 .Dt ZPOOL-FEATURES 7 .Os .Sh NAME @@ -235,14 +235,11 @@ administrator can turn on compression on any dataset on the pool using the .Xr zfs 8 -command. Please note that doing so will -immediately activate the -.Sy lz4_compress -feature on the underlying -pool -.Pq even before any data is written , -and the feature will not be -deactivated. +command. +Also, all newly written metadata +will be compressed with +.Sy lz4 +algorithm. Since this feature is not read-only compatible, this operation will render the pool unimportable on systems without support for the @@ -251,6 +248,12 @@ feature. Booting off of .Sy lz4 -compressed root pools is supported. +.Pp +This feature becomes +.Sy active +as soon as it is enabled and will +never return to being +.Sy enabled . .It Sy multi_vdev_crash_dump .Bl -column "READ\-ONLY COMPATIBLE" "com.joyent:multi_vdev_crash_dump" .It GUID Ta com.joyent:multi_vdev_crash_dump Modified: stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c Tue Jul 15 05:39:22 2014 (r268657) +++ stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c Tue Jul 15 05:42:09 2014 (r268658) @@ -23,6 +23,7 @@ * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. + * Copyright (c) 2014, Nexenta Systems, Inc. All rights reserved. */ #ifdef _KERNEL @@ -168,7 +169,7 @@ zpool_feature_init(void) zfeature_register(SPA_FEATURE_LZ4_COMPRESS, "org.illumos:lz4_compress", "lz4_compress", "LZ4 compression algorithm support.", B_FALSE, B_FALSE, - B_FALSE, NULL); + B_TRUE, NULL); zfeature_register(SPA_FEATURE_MULTI_VDEV_CRASH_DUMP, "com.joyent:multi_vdev_crash_dump", "multi_vdev_crash_dump", Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Tue Jul 15 05:39:22 2014 (r268657) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Tue Jul 15 05:42:09 2014 (r268658) @@ -24,6 +24,7 @@ */ /* Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ /* Copyright (c) 2013, Joyent, Inc. All rights reserved. */ +/* Copyright (c) 2014, Nexenta Systems, Inc. All rights reserved. */ #include #include @@ -44,6 +45,7 @@ #include #include #include +#include #ifdef _KERNEL #include #include @@ -1707,8 +1709,16 @@ dmu_write_policy(objset_t *os, dnode_t * * XXX -- we should design a compression algorithm * that specializes in arrays of bps. */ - compress = zfs_mdcomp_disable ? ZIO_COMPRESS_EMPTY : - ZIO_COMPRESS_LZJB; + boolean_t lz4_ac = spa_feature_is_active(os->os_spa, + SPA_FEATURE_LZ4_COMPRESS); + + if (zfs_mdcomp_disable) { + compress = ZIO_COMPRESS_EMPTY; + } else if (lz4_ac) { + compress = ZIO_COMPRESS_LZ4; + } else { + compress = ZIO_COMPRESS_LZJB; + } /* * Metadata always gets checksummed. If the data Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Jul 15 05:39:22 2014 (r268657) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Jul 15 05:42:09 2014 (r268658) @@ -22,7 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. - * Copyright 2013 Nexenta Systems, Inc. All rights reserved. + * Copyright (c) 2013, 2014, Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2013 Martin Matuska . All rights reserved. */ @@ -6429,6 +6429,22 @@ spa_sync_upgrades(spa_t *spa, dmu_tx_t * spa->spa_uberblock.ub_version >= SPA_VERSION_FEATURES) { spa_feature_create_zap_objects(spa, tx); } + + /* + * LZ4_COMPRESS feature's behaviour was changed to activate_on_enable + * when possibility to use lz4 compression for metadata was added + * Old pools that have this feature enabled must be upgraded to have + * this feature active + */ + if (spa->spa_uberblock.ub_version >= SPA_VERSION_FEATURES) { + boolean_t lz4_en = spa_feature_is_enabled(spa, + SPA_FEATURE_LZ4_COMPRESS); + boolean_t lz4_ac = spa_feature_is_active(spa, + SPA_FEATURE_LZ4_COMPRESS); + + if (lz4_en && !lz4_ac) + spa_feature_incr(spa, SPA_FEATURE_LZ4_COMPRESS, tx); + } rrw_exit(&dp->dp_config_rwlock, FTAG); } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Jul 15 05:39:22 2014 (r268657) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Jul 15 05:42:09 2014 (r268658) @@ -29,6 +29,7 @@ * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. + * Copyright (c) 2014, Nexenta Systems, Inc. All rights reserved. */ /* @@ -2504,37 +2505,6 @@ zfs_prop_set_special(const char *dsname, } break; } - case ZFS_PROP_COMPRESSION: - { - if (intval == ZIO_COMPRESS_LZ4) { - spa_t *spa; - - if ((err = spa_open(dsname, &spa, FTAG)) != 0) - return (err); - - /* - * Setting the LZ4 compression algorithm activates - * the feature. - */ - if (!spa_feature_is_active(spa, - SPA_FEATURE_LZ4_COMPRESS)) { - if ((err = zfs_prop_activate_feature(spa, - SPA_FEATURE_LZ4_COMPRESS)) != 0) { - spa_close(spa, FTAG); - return (err); - } - } - - spa_close(spa, FTAG); - } - /* - * We still want the default set action to be performed in the - * caller, we only performed zfeature settings here. - */ - err = -1; - break; - } - default: err = -1; } From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 05:45:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8DDAB3C9; Tue, 15 Jul 2014 05:45:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F40E2C96; Tue, 15 Jul 2014 05:45:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6F5jplM046059; Tue, 15 Jul 2014 05:45:51 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6F5jol4046051; Tue, 15 Jul 2014 05:45:50 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201407150545.s6F5jol4046051@svn.freebsd.org> From: Xin LI Date: Tue, 15 Jul 2014 05:45:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268659 - in stable/10/sys/cddl/contrib/opensolaris: common/zfs uts/common/fs/zfs uts/common/sys/fs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 05:45:51 -0000 Author: delphij Date: Tue Jul 15 05:45:50 2014 New Revision: 268659 URL: http://svnweb.freebsd.org/changeset/base/268659 Log: MFC r268128: MFV r268122: 4929 want prevsnap property Modified: stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Tue Jul 15 05:42:09 2014 (r268658) +++ stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Tue Jul 15 05:45:50 2014 (r268659) @@ -435,6 +435,8 @@ zfs_prop_init(void) PROP_READONLY, ZFS_TYPE_DATASET, "OBJSETID"); zprop_register_hidden(ZFS_PROP_INCONSISTENT, "inconsistent", PROP_TYPE_NUMBER, PROP_READONLY, ZFS_TYPE_DATASET, "INCONSISTENT"); + zprop_register_hidden(ZFS_PROP_PREV_SNAP, "prevsnap", PROP_TYPE_STRING, + PROP_READONLY, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, "PREVSNAP"); /* oddball properties */ zprop_register_impl(ZFS_PROP_CREATION, "creation", PROP_TYPE_NUMBER, 0, Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Tue Jul 15 05:42:09 2014 (r268658) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Tue Jul 15 05:45:50 2014 (r268659) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Portions Copyright (c) 2011 Martin Matuska - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013, 2014 by Delphix. All rights reserved. * Copyright (c) 2014, Joyent, Inc. All rights reserved. * Copyright (c) 2014 RackTop Systems. */ @@ -1603,6 +1603,12 @@ dsl_dataset_stats(dsl_dataset_t *ds, nvl ds->ds_phys->ds_unique_bytes); get_clones_stat(ds, nv); } else { + if (ds->ds_prev != NULL && ds->ds_prev != dp->dp_origin_snap) { + char buf[MAXNAMELEN]; + dsl_dataset_name(ds->ds_prev, buf); + dsl_prop_nvlist_add_string(nv, ZFS_PROP_PREV_SNAP, buf); + } + dsl_dir_stats(ds->ds_dir, nv); } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Tue Jul 15 05:42:09 2014 (r268658) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Tue Jul 15 05:45:50 2014 (r268659) @@ -151,6 +151,7 @@ typedef enum { ZFS_PROP_FILESYSTEM_COUNT, ZFS_PROP_SNAPSHOT_COUNT, ZFS_PROP_REDUNDANT_METADATA, + ZFS_PROP_PREV_SNAP, ZFS_NUM_PROPS } zfs_prop_t; From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 10:01:34 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D540E7C; Tue, 15 Jul 2014 10:01:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A10123D6; Tue, 15 Jul 2014 10:01:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FA1Xri069407; Tue, 15 Jul 2014 10:01:33 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FA1Xua069405; Tue, 15 Jul 2014 10:01:33 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201407151001.s6FA1Xua069405@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 15 Jul 2014 10:01:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268661 - in stable/10/sys: amd64/amd64 i386/i386 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 10:01:34 -0000 Author: kib Date: Tue Jul 15 10:01:33 2014 New Revision: 268661 URL: http://svnweb.freebsd.org/changeset/base/268661 Log: MFC r268383: Correct si_code for the SIGBUS signal generated by the alignment trap. Modified: stable/10/sys/amd64/amd64/trap.c stable/10/sys/i386/i386/trap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/trap.c ============================================================================== --- stable/10/sys/amd64/amd64/trap.c Tue Jul 15 09:30:43 2014 (r268660) +++ stable/10/sys/amd64/amd64/trap.c Tue Jul 15 10:01:33 2014 (r268661) @@ -345,6 +345,10 @@ trap(struct trapframe *frame) i = SIGBUS; ucode = BUS_OBJERR; break; + case T_ALIGNFLT: + i = SIGBUS; + ucode = BUS_ADRALN; + break; case T_DOUBLEFLT: /* double fault */ default: i = SIGBUS; Modified: stable/10/sys/i386/i386/trap.c ============================================================================== --- stable/10/sys/i386/i386/trap.c Tue Jul 15 09:30:43 2014 (r268660) +++ stable/10/sys/i386/i386/trap.c Tue Jul 15 10:01:33 2014 (r268661) @@ -398,6 +398,10 @@ trap(struct trapframe *frame) i = SIGBUS; ucode = BUS_OBJERR; break; + case T_ALIGNFLT: + i = SIGBUS; + ucode = BUS_ADRALN; + break; case T_DOUBLEFLT: /* double fault */ default: i = SIGBUS; From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 10:04:09 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E0915FF3; Tue, 15 Jul 2014 10:04:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD68C2460; Tue, 15 Jul 2014 10:04:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FA49wE069966; Tue, 15 Jul 2014 10:04:09 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FA49V3069962; Tue, 15 Jul 2014 10:04:09 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201407151004.s6FA49V3069962@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 15 Jul 2014 10:04:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268662 - in stable/9/sys: amd64/amd64 i386/i386 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 10:04:10 -0000 Author: kib Date: Tue Jul 15 10:04:09 2014 New Revision: 268662 URL: http://svnweb.freebsd.org/changeset/base/268662 Log: MFC r268383: Correct si_code for the SIGBUS signal generated by the alignment trap. Modified: stable/9/sys/amd64/amd64/trap.c stable/9/sys/i386/i386/trap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/trap.c ============================================================================== --- stable/9/sys/amd64/amd64/trap.c Tue Jul 15 10:01:33 2014 (r268661) +++ stable/9/sys/amd64/amd64/trap.c Tue Jul 15 10:04:09 2014 (r268662) @@ -345,6 +345,10 @@ trap(struct trapframe *frame) i = SIGBUS; ucode = BUS_OBJERR; break; + case T_ALIGNFLT: + i = SIGBUS; + ucode = BUS_ADRALN; + break; case T_DOUBLEFLT: /* double fault */ default: i = SIGBUS; Modified: stable/9/sys/i386/i386/trap.c ============================================================================== --- stable/9/sys/i386/i386/trap.c Tue Jul 15 10:01:33 2014 (r268661) +++ stable/9/sys/i386/i386/trap.c Tue Jul 15 10:04:09 2014 (r268662) @@ -397,6 +397,10 @@ trap(struct trapframe *frame) i = SIGBUS; ucode = BUS_OBJERR; break; + case T_ALIGNFLT: + i = SIGBUS; + ucode = BUS_ADRALN; + break; case T_DOUBLEFLT: /* double fault */ default: i = SIGBUS; From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 10:05:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C5A11C2; Tue, 15 Jul 2014 10:05:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 593472467; Tue, 15 Jul 2014 10:05:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FA5rbo070382; Tue, 15 Jul 2014 10:05:53 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FA5roO070381; Tue, 15 Jul 2014 10:05:53 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201407151005.s6FA5roO070381@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 15 Jul 2014 10:05:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268663 - stable/10/tools/regression/file/flock X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 10:05:53 -0000 Author: kib Date: Tue Jul 15 10:05:52 2014 New Revision: 268663 URL: http://svnweb.freebsd.org/changeset/base/268663 Log: MFC r268385: Make this compilable on latest Linux'es without warnings. Modified: stable/10/tools/regression/file/flock/flock.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/regression/file/flock/flock.c ============================================================================== --- stable/10/tools/regression/file/flock/flock.c Tue Jul 15 10:04:09 2014 (r268662) +++ stable/10/tools/regression/file/flock/flock.c Tue Jul 15 10:05:52 2014 (r268663) @@ -27,6 +27,7 @@ * $FreeBSD$ */ +#include #include #ifdef __FreeBSD__ #include @@ -39,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -51,9 +53,13 @@ #include #else #ifndef __unused +#ifdef __GNUC__ +#define __unused __attribute__((__unused__)) +#else #define __unused #endif #endif +#endif int verbose = 0; @@ -1329,7 +1335,6 @@ test15(int fd, __unused int argc, const */ int pid; int pfd[2]; - int fd2; struct flock fl; char ch; int res; @@ -1366,7 +1371,7 @@ test15(int fd, __unused int argc, const if (read(pfd[0], &ch, 1) != 1) err(1, "reading from pipe (child)"); - fd2 = dup(fd); + (void)dup(fd); if (flock(fd, LOCK_SH) < 0) err(1, "flock shared"); From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 10:07:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 85860318; Tue, 15 Jul 2014 10:07:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72E172484; Tue, 15 Jul 2014 10:07:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FA76dD070667; Tue, 15 Jul 2014 10:07:06 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FA76sc070666; Tue, 15 Jul 2014 10:07:06 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201407151007.s6FA76sc070666@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 15 Jul 2014 10:07:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268664 - stable/9/tools/regression/file/flock X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 10:07:06 -0000 Author: kib Date: Tue Jul 15 10:07:05 2014 New Revision: 268664 URL: http://svnweb.freebsd.org/changeset/base/268664 Log: MFC r268385: Make this compilable on latest Linux'es without warnings. Modified: stable/9/tools/regression/file/flock/flock.c Directory Properties: stable/9/tools/regression/file/flock/ (props changed) Modified: stable/9/tools/regression/file/flock/flock.c ============================================================================== --- stable/9/tools/regression/file/flock/flock.c Tue Jul 15 10:05:52 2014 (r268663) +++ stable/9/tools/regression/file/flock/flock.c Tue Jul 15 10:07:05 2014 (r268664) @@ -27,6 +27,7 @@ * $FreeBSD$ */ +#include #include #ifdef __FreeBSD__ #include @@ -39,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -51,9 +53,13 @@ #include #else #ifndef __unused +#ifdef __GNUC__ +#define __unused __attribute__((__unused__)) +#else #define __unused #endif #endif +#endif int verbose = 0; @@ -1329,7 +1335,6 @@ test15(int fd, __unused int argc, const */ int pid; int pfd[2]; - int fd2; struct flock fl; char ch; int res; @@ -1366,7 +1371,7 @@ test15(int fd, __unused int argc, const if (read(pfd[0], &ch, 1) != 1) err(1, "reading from pipe (child)"); - fd2 = dup(fd); + (void)dup(fd); if (flock(fd, LOCK_SH) < 0) err(1, "flock shared"); From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 16:49:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1A7A6A4; Tue, 15 Jul 2014 16:49:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 45EDD2A96; Tue, 15 Jul 2014 16:49:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FGnaEg072226; Tue, 15 Jul 2014 16:49:36 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FGnZjq072220; Tue, 15 Jul 2014 16:49:35 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407151649.s6FGnZjq072220@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jul 2014 16:49:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268673 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 16:49:36 -0000 Author: mav Date: Tue Jul 15 16:49:35 2014 New Revision: 268673 URL: http://svnweb.freebsd.org/changeset/base/268673 Log: MFC r267639: Increase CTL_DEVID_LEN from 16 to 64 bytes. SPC-4 recommends T10 vendor ID based LUN ID was created by concatenating product name and serial number (and istgt follows that). But product name is 16 bytes long by itself, so 16 bytes total length is clearly not enough to fit both. To keep compatibility with existing configurations, pad short device IDs to old length of 16, same as before. This change probably breaks CTL user-level ABI, so control tools should be rebuilt after this change. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl.h stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Tue Jul 15 15:40:33 2014 (r268672) +++ stable/10/sys/cam/ctl/ctl.c Tue Jul 15 16:49:35 2014 (r268673) @@ -83,12 +83,6 @@ __FBSDID("$FreeBSD$"); struct ctl_softc *control_softc = NULL; /* - * Use the serial number and device ID provided by the backend, rather than - * making up our own. - */ -#define CTL_USE_BACKEND_SN - -/* * Size and alignment macros needed for Copan-specific HA hardware. These * can go away when the HA code is re-written, and uses busdma for any * hardware. @@ -9480,9 +9474,6 @@ ctl_inquiry_evpd_serial(struct ctl_scsii { struct scsi_vpd_unit_serial_number *sn_ptr; struct ctl_lun *lun; -#ifndef CTL_USE_BACKEND_SN - char tmpstr[32]; -#endif lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; @@ -9516,7 +9507,6 @@ ctl_inquiry_evpd_serial(struct ctl_scsii sn_ptr->page_code = SVPD_UNIT_SERIAL_NUMBER; sn_ptr->length = ctl_min(sizeof(*sn_ptr) - 4, CTL_SN_LEN); -#ifdef CTL_USE_BACKEND_SN /* * If we don't have a LUN, we just leave the serial number as * all spaces. @@ -9526,15 +9516,6 @@ ctl_inquiry_evpd_serial(struct ctl_scsii strncpy((char *)sn_ptr->serial_num, (char *)lun->be_lun->serial_num, CTL_SN_LEN); } -#else - /* - * Note that we're using a non-unique serial number here, - */ - snprintf(tmpstr, sizeof(tmpstr), "MYSERIALNUMIS000"); - memset(sn_ptr->serial_num, 0x20, sizeof(sn_ptr->serial_num)); - strncpy(sn_ptr->serial_num, tmpstr, ctl_min(CTL_SN_LEN, - ctl_min(sizeof(tmpstr), sizeof(*sn_ptr) - 4))); -#endif ctsio->scsi_status = SCSI_STATUS_OK; ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; @@ -9556,10 +9537,7 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio struct ctl_lun *lun; struct ctl_frontend *fe; char *val; -#ifndef CTL_USE_BACKEND_SN - char tmpstr[32]; -#endif /* CTL_USE_BACKEND_SN */ - int devid_len; + int data_len, devid_len; ctl_softc = control_softc; @@ -9570,23 +9548,30 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; - devid_len = sizeof(struct scsi_vpd_device_id) + + if (lun == NULL) { + devid_len = CTL_DEVID_MIN_LEN; + } else { + devid_len = max(CTL_DEVID_MIN_LEN, + strnlen(lun->be_lun->device_id, CTL_DEVID_LEN)); + } + + data_len = sizeof(struct scsi_vpd_device_id) + sizeof(struct scsi_vpd_id_descriptor) + - sizeof(struct scsi_vpd_id_t10) + CTL_DEVID_LEN + + sizeof(struct scsi_vpd_id_t10) + devid_len + sizeof(struct scsi_vpd_id_descriptor) + CTL_WWPN_LEN + sizeof(struct scsi_vpd_id_descriptor) + sizeof(struct scsi_vpd_id_rel_trgt_port_id) + sizeof(struct scsi_vpd_id_descriptor) + sizeof(struct scsi_vpd_id_trgt_port_grp_id); - ctsio->kern_data_ptr = malloc(devid_len, M_CTL, M_WAITOK | M_ZERO); + ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); devid_ptr = (struct scsi_vpd_device_id *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; - if (devid_len < alloc_len) { - ctsio->residual = alloc_len - devid_len; - ctsio->kern_data_len = devid_len; - ctsio->kern_total_len = devid_len; + if (data_len < alloc_len) { + ctsio->residual = alloc_len - data_len; + ctsio->kern_data_len = data_len; + ctsio->kern_total_len = data_len; } else { ctsio->residual = 0; ctsio->kern_data_len = alloc_len; @@ -9599,7 +9584,7 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio desc = (struct scsi_vpd_id_descriptor *)devid_ptr->desc_list; t10id = (struct scsi_vpd_id_t10 *)&desc->identifier[0]; desc1 = (struct scsi_vpd_id_descriptor *)(&desc->identifier[0] + - sizeof(struct scsi_vpd_id_t10) + CTL_DEVID_LEN); + sizeof(struct scsi_vpd_id_t10) + devid_len); desc2 = (struct scsi_vpd_id_descriptor *)(&desc1->identifier[0] + CTL_WWPN_LEN); desc3 = (struct scsi_vpd_id_descriptor *)(&desc2->identifier[0] + @@ -9617,7 +9602,7 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio devid_ptr->page_code = SVPD_DEVICE_ID; - scsi_ulto2b(devid_len - 4, devid_ptr->length); + scsi_ulto2b(data_len - 4, devid_ptr->length); /* * For Fibre channel, @@ -9643,7 +9628,7 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio * per-LUN identifier. */ desc->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_LUN | SVPD_ID_TYPE_T10; - desc->length = sizeof(*t10id) + CTL_DEVID_LEN; + desc->length = sizeof(*t10id) + devid_len; if (lun == NULL || (val = ctl_get_opt(lun->be_lun, "vendor")) == NULL) { strncpy((char *)t10id->vendor, CTL_VENDOR, sizeof(t10id->vendor)); } else { @@ -9700,7 +9685,6 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio else desc3->identifier[3] = 2; -#ifdef CTL_USE_BACKEND_SN /* * If we've actually got a backend, copy the device id from the * per-LUN data. Otherwise, set it to all spaces. @@ -9710,19 +9694,13 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio * Copy the backend's LUN ID. */ strncpy((char *)t10id->vendor_spec_id, - (char *)lun->be_lun->device_id, CTL_DEVID_LEN); + (char *)lun->be_lun->device_id, devid_len); } else { /* * No backend, set this to spaces. */ - memset(t10id->vendor_spec_id, 0x20, CTL_DEVID_LEN); + memset(t10id->vendor_spec_id, 0x20, devid_len); } -#else - snprintf(tmpstr, sizeof(tmpstr), "MYDEVICEIDIS%4d", - (lun != NULL) ? (int)lun->lun : 0); - strncpy(t10id->vendor_spec_id, tmpstr, ctl_min(CTL_DEVID_LEN, - sizeof(tmpstr))); -#endif ctsio->scsi_status = SCSI_STATUS_OK; Modified: stable/10/sys/cam/ctl/ctl.h ============================================================================== --- stable/10/sys/cam/ctl/ctl.h Tue Jul 15 15:40:33 2014 (r268672) +++ stable/10/sys/cam/ctl/ctl.h Tue Jul 15 16:49:35 2014 (r268673) @@ -96,7 +96,8 @@ union ctl_modepage_info { /* * Device ID length, for VPD page 0x83. */ -#define CTL_DEVID_LEN 16 +#define CTL_DEVID_LEN 64 +#define CTL_DEVID_MIN_LEN 16 /* * WWPN length, for VPD page 0x83. */ Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Tue Jul 15 15:40:33 2014 (r268672) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Tue Jul 15 16:49:35 2014 (r268673) @@ -2059,7 +2059,7 @@ cfiscsi_devid(struct ctl_scsiio *ctsio, const struct icl_pdu *request; int i, ret; char *val; - size_t devid_len, wwnn_len, wwpn_len, lun_name_len; + size_t data_len, devid_len, wwnn_len, wwpn_len, lun_name_len; lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; request = ctsio->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr; @@ -2077,8 +2077,11 @@ cfiscsi_devid(struct ctl_scsiio *ctsio, wwnn_len += (4 - (wwnn_len % 4)); if (lun == NULL) { + devid_len = CTL_DEVID_MIN_LEN; lun_name_len = 0; } else { + devid_len = max(CTL_DEVID_MIN_LEN, + strnlen(lun->be_lun->device_id, CTL_DEVID_LEN)); lun_name_len = strlen(cs->cs_target->ct_name); lun_name_len += strlen(",lun,XXXXXXXX"); lun_name_len += 1; /* '\0' */ @@ -2086,9 +2089,9 @@ cfiscsi_devid(struct ctl_scsiio *ctsio, lun_name_len += (4 - (lun_name_len % 4)); } - devid_len = sizeof(struct scsi_vpd_device_id) + + data_len = sizeof(struct scsi_vpd_device_id) + sizeof(struct scsi_vpd_id_descriptor) + - sizeof(struct scsi_vpd_id_t10) + CTL_DEVID_LEN + + sizeof(struct scsi_vpd_id_t10) + devid_len + sizeof(struct scsi_vpd_id_descriptor) + lun_name_len + sizeof(struct scsi_vpd_id_descriptor) + wwnn_len + sizeof(struct scsi_vpd_id_descriptor) + wwpn_len + @@ -2097,14 +2100,14 @@ cfiscsi_devid(struct ctl_scsiio *ctsio, sizeof(struct scsi_vpd_id_descriptor) + sizeof(struct scsi_vpd_id_trgt_port_grp_id); - ctsio->kern_data_ptr = malloc(devid_len, M_CTL, M_WAITOK | M_ZERO); + ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); devid_ptr = (struct scsi_vpd_device_id *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; - if (devid_len < alloc_len) { - ctsio->residual = alloc_len - devid_len; - ctsio->kern_data_len = devid_len; - ctsio->kern_total_len = devid_len; + if (data_len < alloc_len) { + ctsio->residual = alloc_len - data_len; + ctsio->kern_data_len = data_len; + ctsio->kern_total_len = data_len; } else { ctsio->residual = 0; ctsio->kern_data_len = alloc_len; @@ -2117,7 +2120,7 @@ cfiscsi_devid(struct ctl_scsiio *ctsio, desc = (struct scsi_vpd_id_descriptor *)devid_ptr->desc_list; t10id = (struct scsi_vpd_id_t10 *)&desc->identifier[0]; desc1 = (struct scsi_vpd_id_descriptor *)(&desc->identifier[0] + - sizeof(struct scsi_vpd_id_t10) + CTL_DEVID_LEN); + sizeof(struct scsi_vpd_id_t10) + devid_len); desc2 = (struct scsi_vpd_id_descriptor *)(&desc1->identifier[0] + lun_name_len); desc3 = (struct scsi_vpd_id_descriptor *)(&desc2->identifier[0] + @@ -2135,7 +2138,7 @@ cfiscsi_devid(struct ctl_scsiio *ctsio, devid_ptr->page_code = SVPD_DEVICE_ID; - scsi_ulto2b(devid_len - 4, devid_ptr->length); + scsi_ulto2b(data_len - 4, devid_ptr->length); /* * We're using a LUN association here. i.e., this device ID is a @@ -2143,7 +2146,7 @@ cfiscsi_devid(struct ctl_scsiio *ctsio, */ desc->proto_codeset = (SCSI_PROTO_ISCSI << 4) | SVPD_ID_CODESET_ASCII; desc->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_LUN | SVPD_ID_TYPE_T10; - desc->length = sizeof(*t10id) + CTL_DEVID_LEN; + desc->length = sizeof(*t10id) + devid_len; if (lun == NULL || (val = ctl_get_opt(lun->be_lun, "vendor")) == NULL) { strncpy((char *)t10id->vendor, CTL_VENDOR, sizeof(t10id->vendor)); } else { @@ -2161,12 +2164,12 @@ cfiscsi_devid(struct ctl_scsiio *ctsio, * Copy the backend's LUN ID. */ strncpy((char *)t10id->vendor_spec_id, - (char *)lun->be_lun->device_id, CTL_DEVID_LEN); + (char *)lun->be_lun->device_id, devid_len); } else { /* * No backend, set this to spaces. */ - memset(t10id->vendor_spec_id, 0x20, CTL_DEVID_LEN); + memset(t10id->vendor_spec_id, 0x20, devid_len); } /* From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 16:53:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43CBBA24; Tue, 15 Jul 2014 16:53:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F38E2B4C; Tue, 15 Jul 2014 16:53:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FGr5ZZ076234; Tue, 15 Jul 2014 16:53:05 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FGr5Tp076232; Tue, 15 Jul 2014 16:53:05 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407151653.s6FGr5Tp076232@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jul 2014 16:53:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268674 - in stable/10/sys/cam: ctl scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 16:53:05 -0000 Author: mav Date: Tue Jul 15 16:53:04 2014 New Revision: 268674 URL: http://svnweb.freebsd.org/changeset/base/268674 Log: MFC r268096, r268306, r268361: Add more formal and strict command parsing and validation. For every supported command define CDB length and mask of bits that are allowed to be set. This allows to remove bunch of checks through the code and still make the validation more strict. To properly do it for commands supporting multiple service actions, formalize their parsing by adding subtables for each of such commands. As visible effect, this change allows to add support for REPORT SUPPORTED OPERATION CODES command, reporting to client all the data about supported SCSI commands, except timeouts. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_cmd_table.c stable/10/sys/cam/ctl/ctl_private.h stable/10/sys/cam/scsi/scsi_all.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Tue Jul 15 16:49:35 2014 (r268673) +++ stable/10/sys/cam/ctl/ctl.c Tue Jul 15 16:53:04 2014 (r268674) @@ -392,7 +392,7 @@ static ctl_action ctl_check_ooa(struct c static int ctl_check_blocked(struct ctl_lun *lun); static int ctl_scsiio_lun_check(struct ctl_softc *ctl_softc, struct ctl_lun *lun, - struct ctl_cmd_entry *entry, + const struct ctl_cmd_entry *entry, struct ctl_scsiio *ctsio); //static int ctl_check_rtr(union ctl_io *pending_io, struct ctl_softc *softc); static void ctl_failover(void); @@ -430,6 +430,12 @@ static void ctl_enqueue_incoming(union c static void ctl_enqueue_rtr(union ctl_io *io); static void ctl_enqueue_done(union ctl_io *io); static void ctl_enqueue_isc(union ctl_io *io); +static const struct ctl_cmd_entry * + ctl_get_cmd_entry(struct ctl_scsiio *ctsio); +static const struct ctl_cmd_entry * + ctl_validate_command(struct ctl_scsiio *ctsio); +static int ctl_cmd_applicable(uint8_t lun_type, + const struct ctl_cmd_entry *entry); /* * Load the serialization table. This isn't very pretty, but is probably @@ -622,11 +628,9 @@ ctl_isc_event_handler(ctl_ha_channel cha memcpy(io->scsiio.cdb, msg_info.scsi.cdb, CTL_MAX_CDBLEN); if (ctl_softc->ha_mode == CTL_HA_MODE_XFER) { - struct ctl_cmd_entry *entry; - uint8_t opcode; + const struct ctl_cmd_entry *entry; - opcode = io->scsiio.cdb[0]; - entry = &ctl_cmd_table[opcode]; + entry = ctl_get_cmd_entry(&io->scsiio); io->io_hdr.flags &= ~CTL_FLAG_DATA_MASK; io->io_hdr.flags |= entry->flags & CTL_FLAG_DATA_MASK; @@ -4973,50 +4977,11 @@ ctl_scsi_release(struct ctl_scsiio *ctsi ctl_softc = control_softc; switch (ctsio->cdb[0]) { - case RELEASE: { - struct scsi_release *cdb; - - cdb = (struct scsi_release *)ctsio->cdb; - if ((cdb->byte2 & 0x1f) != 0) { - ctl_set_invalid_field(ctsio, - /*sks_valid*/ 1, - /*command*/ 1, - /*field*/ 1, - /*bit_valid*/ 0, - /*bit*/ 0); - ctl_done((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); - } - break; - } case RELEASE_10: { struct scsi_release_10 *cdb; cdb = (struct scsi_release_10 *)ctsio->cdb; - if ((cdb->byte2 & SR10_EXTENT) != 0) { - ctl_set_invalid_field(ctsio, - /*sks_valid*/ 1, - /*command*/ 1, - /*field*/ 1, - /*bit_valid*/ 1, - /*bit*/ 0); - ctl_done((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); - - } - - if ((cdb->byte2 & SR10_3RDPTY) != 0) { - ctl_set_invalid_field(ctsio, - /*sks_valid*/ 1, - /*command*/ 1, - /*field*/ 1, - /*bit_valid*/ 1, - /*bit*/ 4); - ctl_done((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); - } - if (cdb->byte2 & SR10_LONGID) longid = 1; else @@ -5110,49 +5075,11 @@ ctl_scsi_reserve(struct ctl_scsiio *ctsi ctl_softc = control_softc; switch (ctsio->cdb[0]) { - case RESERVE: { - struct scsi_reserve *cdb; - - cdb = (struct scsi_reserve *)ctsio->cdb; - if ((cdb->byte2 & 0x1f) != 0) { - ctl_set_invalid_field(ctsio, - /*sks_valid*/ 1, - /*command*/ 1, - /*field*/ 1, - /*bit_valid*/ 0, - /*bit*/ 0); - ctl_done((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); - } - resv_id = cdb->resv_id; - length = scsi_2btoul(cdb->length); - break; - } case RESERVE_10: { struct scsi_reserve_10 *cdb; cdb = (struct scsi_reserve_10 *)ctsio->cdb; - if ((cdb->byte2 & SR10_EXTENT) != 0) { - ctl_set_invalid_field(ctsio, - /*sks_valid*/ 1, - /*command*/ 1, - /*field*/ 1, - /*bit_valid*/ 1, - /*bit*/ 0); - ctl_done((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); - } - if ((cdb->byte2 & SR10_3RDPTY) != 0) { - ctl_set_invalid_field(ctsio, - /*sks_valid*/ 1, - /*command*/ 1, - /*field*/ 1, - /*bit_valid*/ 1, - /*bit*/ 4); - ctl_done((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); - } if (cdb->byte2 & SR10_LONGID) longid = 1; else @@ -5265,35 +5192,6 @@ ctl_start_stop(struct ctl_scsiio *ctsio) return (CTL_RETVAL_COMPLETE); } - /* - * We don't support the power conditions field. We need to check - * this prior to checking the load/eject and start/stop bits. - */ - if ((cdb->how & SSS_PC_MASK) != SSS_PC_START_VALID) { - ctl_set_invalid_field(ctsio, - /*sks_valid*/ 1, - /*command*/ 1, - /*field*/ 4, - /*bit_valid*/ 1, - /*bit*/ 4); - ctl_done((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); - } - - /* - * Media isn't removable, so we can't load or eject it. - */ - if ((cdb->how & SSS_LOEJ) != 0) { - ctl_set_invalid_field(ctsio, - /*sks_valid*/ 1, - /*command*/ 1, - /*field*/ 4, - /*bit_valid*/ 1, - /*bit*/ 1); - ctl_done((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); - } - if ((lun->flags & CTL_LUN_PR_RESERVED) && ((cdb->how & SSS_START)==0)) { uint32_t residx; @@ -5391,7 +5289,6 @@ ctl_sync_cache(struct ctl_scsiio *ctsio) struct ctl_softc *ctl_softc; uint64_t starting_lba; uint32_t block_count; - int reladr, immed; int retval; CTL_DEBUG_PRINT(("ctl_sync_cache\n")); @@ -5399,20 +5296,12 @@ ctl_sync_cache(struct ctl_scsiio *ctsio) lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; ctl_softc = control_softc; retval = 0; - reladr = 0; - immed = 0; switch (ctsio->cdb[0]) { case SYNCHRONIZE_CACHE: { struct scsi_sync_cache *cdb; cdb = (struct scsi_sync_cache *)ctsio->cdb; - if (cdb->byte2 & SSC_RELADR) - reladr = 1; - - if (cdb->byte2 & SSC_IMMED) - immed = 1; - starting_lba = scsi_4btoul(cdb->begin_lba); block_count = scsi_2btoul(cdb->lb_count); break; @@ -5421,12 +5310,6 @@ ctl_sync_cache(struct ctl_scsiio *ctsio) struct scsi_sync_cache_16 *cdb; cdb = (struct scsi_sync_cache_16 *)ctsio->cdb; - if (cdb->byte2 & SSC_RELADR) - reladr = 1; - - if (cdb->byte2 & SSC_IMMED) - immed = 1; - starting_lba = scsi_8btou64(cdb->begin_lba); block_count = scsi_4btoul(cdb->lb_count); break; @@ -5438,41 +5321,6 @@ ctl_sync_cache(struct ctl_scsiio *ctsio) break; /* NOTREACHED */ } - if (immed) { - /* - * We don't support the immediate bit. Since it's in the - * same place for the 10 and 16 byte SYNCHRONIZE CACHE - * commands, we can just return the same error in either - * case. - */ - ctl_set_invalid_field(ctsio, - /*sks_valid*/ 1, - /*command*/ 1, - /*field*/ 1, - /*bit_valid*/ 1, - /*bit*/ 1); - ctl_done((union ctl_io *)ctsio); - goto bailout; - } - - if (reladr) { - /* - * We don't support the reladr bit either. It can only be - * used with linked commands, and we don't support linked - * commands. Since the bit is in the same place for the - * 10 and 16 byte SYNCHRONIZE CACHE * commands, we can - * just return the same error in either case. - */ - ctl_set_invalid_field(ctsio, - /*sks_valid*/ 1, - /*command*/ 1, - /*field*/ 1, - /*bit_valid*/ 1, - /*bit*/ 0); - ctl_done((union ctl_io *)ctsio); - goto bailout; - } - /* * We check the LBA and length, but don't do anything with them. * A SYNCHRONIZE CACHE will cause the entire cache for this lun to @@ -5659,16 +5507,6 @@ ctl_read_buffer(struct ctl_scsiio *ctsio ctl_done((union ctl_io *)ctsio); return (CTL_RETVAL_COMPLETE); } - if (cdb->buffer_id != 0) { - ctl_set_invalid_field(ctsio, - /*sks_valid*/ 1, - /*command*/ 1, - /*field*/ 2, - /*bit_valid*/ 0, - /*bit*/ 0); - ctl_done((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); - } len = scsi_3btoul(cdb->length); buffer_offset = scsi_3btoul(cdb->offset); @@ -5727,16 +5565,6 @@ ctl_write_buffer(struct ctl_scsiio *ctsi ctl_done((union ctl_io *)ctsio); return (CTL_RETVAL_COMPLETE); } - if (cdb->buffer_id != 0) { - ctl_set_invalid_field(ctsio, - /*sks_valid*/ 1, - /*command*/ 1, - /*field*/ 2, - /*bit_valid*/ 0, - /*bit*/ 0); - ctl_done((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); - } len = scsi_3btoul(cdb->length); buffer_offset = scsi_3btoul(cdb->offset); @@ -7053,7 +6881,7 @@ ctl_read_capacity(struct ctl_scsiio *cts return (CTL_RETVAL_COMPLETE); } -static int +int ctl_read_capacity_16(struct ctl_scsiio *ctsio) { struct scsi_read_capacity_16 *cdb; @@ -7117,37 +6945,7 @@ ctl_read_capacity_16(struct ctl_scsiio * } int -ctl_service_action_in(struct ctl_scsiio *ctsio) -{ - struct scsi_service_action_in *cdb; - int retval; - - CTL_DEBUG_PRINT(("ctl_service_action_in\n")); - - cdb = (struct scsi_service_action_in *)ctsio->cdb; - - retval = CTL_RETVAL_COMPLETE; - - switch (cdb->service_action) { - case SRC16_SERVICE_ACTION: - retval = ctl_read_capacity_16(ctsio); - break; - default: - ctl_set_invalid_field(/*ctsio*/ ctsio, - /*sks_valid*/ 1, - /*command*/ 1, - /*field*/ 1, - /*bit_valid*/ 1, - /*bit*/ 4); - ctl_done((union ctl_io *)ctsio); - break; - } - - return (retval); -} - -int -ctl_maintenance_in(struct ctl_scsiio *ctsio) +ctl_report_tagret_port_groups(struct ctl_scsiio *ctsio) { struct scsi_maintenance_in *cdb; int retval; @@ -7160,7 +6958,7 @@ ctl_maintenance_in(struct ctl_scsiio *ct struct scsi_target_port_descriptor *tp_desc_ptr1_1, *tp_desc_ptr1_2, *tp_desc_ptr2_1, *tp_desc_ptr2_2; - CTL_DEBUG_PRINT(("ctl_maintenance_in\n")); + CTL_DEBUG_PRINT(("ctl_report_tagret_port_groups\n")); cdb = (struct scsi_maintenance_in *)ctsio->cdb; softc = control_softc; @@ -7168,17 +6966,6 @@ ctl_maintenance_in(struct ctl_scsiio *ct retval = CTL_RETVAL_COMPLETE; - if ((cdb->byte2 & SERVICE_ACTION_MASK) != SA_RPRT_TRGT_GRP) { - ctl_set_invalid_field(/*ctsio*/ ctsio, - /*sks_valid*/ 1, - /*command*/ 1, - /*field*/ 1, - /*bit_valid*/ 1, - /*bit*/ 4); - ctl_done((union ctl_io *)ctsio); - return(retval); - } - single = ctl_is_single; if (single) num_target_port_groups = NUM_TARGET_PORT_GROUPS - 1; @@ -7294,6 +7081,217 @@ ctl_maintenance_in(struct ctl_scsiio *ct } int +ctl_report_supported_opcodes(struct ctl_scsiio *ctsio) +{ + struct ctl_lun *lun; + struct scsi_report_supported_opcodes *cdb; + const struct ctl_cmd_entry *entry, *sentry; + struct scsi_report_supported_opcodes_all *all; + struct scsi_report_supported_opcodes_descr *descr; + struct scsi_report_supported_opcodes_one *one; + int retval; + int alloc_len, total_len; + int opcode, service_action, i, j, num; + + CTL_DEBUG_PRINT(("ctl_report_supported_opcodes\n")); + + cdb = (struct scsi_report_supported_opcodes *)ctsio->cdb; + lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + + retval = CTL_RETVAL_COMPLETE; + + opcode = cdb->requested_opcode; + service_action = scsi_2btoul(cdb->requested_service_action); + switch (cdb->options & RSO_OPTIONS_MASK) { + case RSO_OPTIONS_ALL: + num = 0; + for (i = 0; i < 256; i++) { + entry = &ctl_cmd_table[i]; + if (entry->flags & CTL_CMD_FLAG_SA5) { + for (j = 0; j < 32; j++) { + sentry = &((const struct ctl_cmd_entry *) + entry->execute)[j]; + if (ctl_cmd_applicable( + lun->be_lun->lun_type, sentry)) + num++; + } + } else { + if (ctl_cmd_applicable(lun->be_lun->lun_type, + entry)) + num++; + } + } + total_len = sizeof(struct scsi_report_supported_opcodes_all) + + num * sizeof(struct scsi_report_supported_opcodes_descr); + break; + case RSO_OPTIONS_OC: + if (ctl_cmd_table[opcode].flags & CTL_CMD_FLAG_SA5) { + ctl_set_invalid_field(/*ctsio*/ ctsio, + /*sks_valid*/ 1, + /*command*/ 1, + /*field*/ 2, + /*bit_valid*/ 1, + /*bit*/ 2); + ctl_done((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); + } + total_len = sizeof(struct scsi_report_supported_opcodes_one) + 32; + break; + case RSO_OPTIONS_OC_SA: + if ((ctl_cmd_table[opcode].flags & CTL_CMD_FLAG_SA5) == 0 || + service_action >= 32) { + ctl_set_invalid_field(/*ctsio*/ ctsio, + /*sks_valid*/ 1, + /*command*/ 1, + /*field*/ 2, + /*bit_valid*/ 1, + /*bit*/ 2); + ctl_done((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); + } + total_len = sizeof(struct scsi_report_supported_opcodes_one) + 32; + break; + default: + ctl_set_invalid_field(/*ctsio*/ ctsio, + /*sks_valid*/ 1, + /*command*/ 1, + /*field*/ 2, + /*bit_valid*/ 1, + /*bit*/ 2); + ctl_done((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); + } + + alloc_len = scsi_4btoul(cdb->length); + + ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); + + ctsio->kern_sg_entries = 0; + + if (total_len < alloc_len) { + ctsio->residual = alloc_len - total_len; + ctsio->kern_data_len = total_len; + ctsio->kern_total_len = total_len; + } else { + ctsio->residual = 0; + ctsio->kern_data_len = alloc_len; + ctsio->kern_total_len = alloc_len; + } + ctsio->kern_data_resid = 0; + ctsio->kern_rel_offset = 0; + + switch (cdb->options & RSO_OPTIONS_MASK) { + case RSO_OPTIONS_ALL: + all = (struct scsi_report_supported_opcodes_all *) + ctsio->kern_data_ptr; + num = 0; + for (i = 0; i < 256; i++) { + entry = &ctl_cmd_table[i]; + if (entry->flags & CTL_CMD_FLAG_SA5) { + for (j = 0; j < 32; j++) { + sentry = &((const struct ctl_cmd_entry *) + entry->execute)[j]; + if (!ctl_cmd_applicable( + lun->be_lun->lun_type, sentry)) + continue; + descr = &all->descr[num++]; + descr->opcode = i; + scsi_ulto2b(j, descr->service_action); + descr->flags = RSO_SERVACTV; + scsi_ulto2b(sentry->length, + descr->cdb_length); + } + } else { + if (!ctl_cmd_applicable(lun->be_lun->lun_type, + entry)) + continue; + descr = &all->descr[num++]; + descr->opcode = i; + scsi_ulto2b(0, descr->service_action); + descr->flags = 0; + scsi_ulto2b(entry->length, descr->cdb_length); + } + } + scsi_ulto4b( + num * sizeof(struct scsi_report_supported_opcodes_descr), + all->length); + break; + case RSO_OPTIONS_OC: + one = (struct scsi_report_supported_opcodes_one *) + ctsio->kern_data_ptr; + entry = &ctl_cmd_table[opcode]; + goto fill_one; + case RSO_OPTIONS_OC_SA: + one = (struct scsi_report_supported_opcodes_one *) + ctsio->kern_data_ptr; + entry = &ctl_cmd_table[opcode]; + entry = &((const struct ctl_cmd_entry *) + entry->execute)[service_action]; +fill_one: + if (ctl_cmd_applicable(lun->be_lun->lun_type, entry)) { + one->support = 3; + scsi_ulto2b(entry->length, one->cdb_length); + one->cdb_usage[0] = opcode; + memcpy(&one->cdb_usage[1], entry->usage, + entry->length - 1); + } else + one->support = 1; + break; + } + + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; + ctsio->be_move_done = ctl_config_move_done; + + ctl_datamove((union ctl_io *)ctsio); + return(retval); +} + +int +ctl_report_supported_tmf(struct ctl_scsiio *ctsio) +{ + struct ctl_lun *lun; + struct scsi_report_supported_tmf *cdb; + struct scsi_report_supported_tmf_data *data; + int retval; + int alloc_len, total_len; + + CTL_DEBUG_PRINT(("ctl_report_supported_tmf\n")); + + cdb = (struct scsi_report_supported_tmf *)ctsio->cdb; + lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + + retval = CTL_RETVAL_COMPLETE; + + total_len = sizeof(struct scsi_report_supported_tmf_data); + alloc_len = scsi_4btoul(cdb->length); + + ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); + + ctsio->kern_sg_entries = 0; + + if (total_len < alloc_len) { + ctsio->residual = alloc_len - total_len; + ctsio->kern_data_len = total_len; + ctsio->kern_total_len = total_len; + } else { + ctsio->residual = 0; + ctsio->kern_data_len = alloc_len; + ctsio->kern_total_len = alloc_len; + } + ctsio->kern_data_resid = 0; + ctsio->kern_rel_offset = 0; + + data = (struct scsi_report_supported_tmf_data *)ctsio->kern_data_ptr; + data->byte1 |= RST_ATS | RST_LURS | RST_TRS; + + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; + ctsio->be_move_done = ctl_config_move_done; + + ctl_datamove((union ctl_io *)ctsio); + return (retval); +} + +int ctl_persistent_reserve_in(struct ctl_scsiio *ctsio) { struct scsi_per_res_in *cdb; @@ -7329,18 +7327,8 @@ retry: case SPRI_RC: /* report capabilities */ total_len = sizeof(struct scsi_per_res_cap); break; - case SPRI_RS: /* read full status */ default: - mtx_unlock(&lun->lun_lock); - ctl_set_invalid_field(ctsio, - /*sks_valid*/ 1, - /*command*/ 1, - /*field*/ 1, - /*bit_valid*/ 1, - /*bit*/ 0); - ctl_done((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); - break; /* NOTREACHED */ + panic("Invalid PR type %x", cdb->action); } mtx_unlock(&lun->lun_lock); @@ -8049,28 +8037,6 @@ ctl_persistent_reserve_out(struct ctl_sc } } - switch (cdb->action & SPRO_ACTION_MASK) { - case SPRO_REGISTER: - case SPRO_RESERVE: - case SPRO_RELEASE: - case SPRO_CLEAR: - case SPRO_PREEMPT: - case SPRO_REG_IGNO: - break; - case SPRO_REG_MOVE: - case SPRO_PRE_ABO: - default: - ctl_set_invalid_field(/*ctsio*/ ctsio, - /*sks_valid*/ 1, - /*command*/ 1, - /*field*/ 1, - /*bit_valid*/ 1, - /*bit*/ 0); - ctl_done((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); - break; /* NOTREACHED */ - } - param_len = scsi_4btoul(cdb->length); if ((ctsio->io_hdr.flags & CTL_FLAG_ALLOCATED) == 0) { @@ -8439,19 +8405,8 @@ ctl_persistent_reserve_out(struct ctl_sc return (CTL_RETVAL_COMPLETE); break; } - case SPRO_REG_MOVE: - case SPRO_PRE_ABO: default: - free(ctsio->kern_data_ptr, M_CTL); - ctl_set_invalid_field(/*ctsio*/ ctsio, - /*sks_valid*/ 1, - /*command*/ 1, - /*field*/ 1, - /*bit_valid*/ 1, - /*bit*/ 0); - ctl_done((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); - break; /* NOTREACHED */ + panic("Invalid PR type %x", cdb->action); } done: @@ -8600,7 +8555,7 @@ ctl_read_write(struct ctl_scsiio *ctsio) struct ctl_lba_len_flags *lbalen; uint64_t lba; uint32_t num_blocks; - int reladdr, fua, dpo, ebp; + int fua, dpo; int retval; int isread; @@ -8608,10 +8563,8 @@ ctl_read_write(struct ctl_scsiio *ctsio) CTL_DEBUG_PRINT(("ctl_read_write: command: %#x\n", ctsio->cdb[0])); - reladdr = 0; fua = 0; dpo = 0; - ebp = 0; retval = CTL_RETVAL_COMPLETE; @@ -8659,17 +8612,11 @@ ctl_read_write(struct ctl_scsiio *ctsio) cdb = (struct scsi_rw_10 *)ctsio->cdb; - if (cdb->byte2 & SRW10_RELADDR) - reladdr = 1; if (cdb->byte2 & SRW10_FUA) fua = 1; if (cdb->byte2 & SRW10_DPO) dpo = 1; - if ((cdb->opcode == WRITE_10) - && (cdb->byte2 & SRW10_EBP)) - ebp = 1; - lba = scsi_4btoul(cdb->addr); num_blocks = scsi_2btoul(cdb->length); break; @@ -8699,8 +8646,6 @@ ctl_read_write(struct ctl_scsiio *ctsio) cdb = (struct scsi_rw_12 *)ctsio->cdb; - if (cdb->byte2 & SRW12_RELADDR) - reladdr = 1; if (cdb->byte2 & SRW12_FUA) fua = 1; if (cdb->byte2 & SRW12_DPO) @@ -8728,8 +8673,6 @@ ctl_read_write(struct ctl_scsiio *ctsio) cdb = (struct scsi_rw_16 *)ctsio->cdb; - if (cdb->byte2 & SRW12_RELADDR) - reladdr = 1; if (cdb->byte2 & SRW12_FUA) fua = 1; if (cdb->byte2 & SRW12_DPO) @@ -8769,20 +8712,6 @@ ctl_read_write(struct ctl_scsiio *ctsio) * getting it to do write-through for a particular transaction may * not be possible. */ - /* - * We don't support relative addressing. That also requires - * supporting linked commands, which we don't do. - */ - if (reladdr != 0) { - ctl_set_invalid_field(ctsio, - /*sks_valid*/ 1, - /*command*/ 1, - /*field*/ 1, - /*bit_valid*/ 1, - /*bit*/ 0); - ctl_done((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); - } /* * The first check is to make sure we're in bounds, the second @@ -10332,7 +10261,7 @@ ctl_extent_check(union ctl_io *io1, unio static ctl_action ctl_check_for_blockage(union ctl_io *pending_io, union ctl_io *ooa_io) { - struct ctl_cmd_entry *pending_entry, *ooa_entry; + const struct ctl_cmd_entry *pending_entry, *ooa_entry; ctl_serialize_action *serialize_row; /* @@ -10405,8 +10334,8 @@ ctl_check_for_blockage(union ctl_io *pen || (ooa_io->scsiio.tag_type == CTL_TAG_ORDERED))) return (CTL_ACTION_BLOCK); - pending_entry = &ctl_cmd_table[pending_io->scsiio.cdb[0]]; - ooa_entry = &ctl_cmd_table[ooa_io->scsiio.cdb[0]]; + pending_entry = ctl_get_cmd_entry(&pending_io->scsiio); + ooa_entry = ctl_get_cmd_entry(&ooa_io->scsiio); serialize_row = ctl_serialize_table[ooa_entry->seridx]; @@ -10536,9 +10465,8 @@ ctl_check_blocked(struct ctl_lun *lun) case CTL_ACTION_PASS: case CTL_ACTION_SKIP: { struct ctl_softc *softc; - struct ctl_cmd_entry *entry; + const struct ctl_cmd_entry *entry; uint32_t initidx; - uint8_t opcode; int isc_retval; /* @@ -10575,8 +10503,7 @@ ctl_check_blocked(struct ctl_lun *lun) } break; } - opcode = cur_blocked->scsiio.cdb[0]; - entry = &ctl_cmd_table[opcode]; + entry = ctl_get_cmd_entry(&cur_blocked->scsiio); softc = control_softc; initidx = ctl_get_initindex(&cur_blocked->io_hdr.nexus); @@ -10624,7 +10551,7 @@ ctl_check_blocked(struct ctl_lun *lun) */ static int ctl_scsiio_lun_check(struct ctl_softc *ctl_softc, struct ctl_lun *lun, - struct ctl_cmd_entry *entry, struct ctl_scsiio *ctsio) + const struct ctl_cmd_entry *entry, struct ctl_scsiio *ctsio) { int retval; @@ -10984,8 +10911,7 @@ static int ctl_scsiio_precheck(struct ctl_softc *ctl_softc, struct ctl_scsiio *ctsio) { struct ctl_lun *lun; - struct ctl_cmd_entry *entry; - uint8_t opcode; + const struct ctl_cmd_entry *entry; uint32_t initidx, targ_lun; int retval; @@ -10993,8 +10919,6 @@ ctl_scsiio_precheck(struct ctl_softc *ct lun = NULL; - opcode = ctsio->cdb[0]; - targ_lun = ctsio->io_hdr.nexus.targ_mapped_lun; if ((targ_lun < CTL_MAX_LUNS) && (ctl_softc->ctl_luns[targ_lun] != NULL)) { @@ -11013,13 +10937,27 @@ ctl_scsiio_precheck(struct ctl_softc *ct if (lun->be_lun->lun_type == T_PROCESSOR) { ctsio->io_hdr.flags |= CTL_FLAG_CONTROL_DEV; } + + /* + * Every I/O goes into the OOA queue for a + * particular LUN, and stays there until completion. + */ + mtx_lock(&lun->lun_lock); + TAILQ_INSERT_TAIL(&lun->ooa_queue, &ctsio->io_hdr, + ooa_links); } } else { ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr = NULL; ctsio->io_hdr.ctl_private[CTL_PRIV_BACKEND_LUN].ptr = NULL; } - entry = &ctl_cmd_table[opcode]; + /* Get command entry and return error if it is unsuppotyed. */ + entry = ctl_validate_command(ctsio); + if (entry == NULL) { + if (lun) + mtx_unlock(&lun->lun_lock); + return (retval); + } ctsio->io_hdr.flags &= ~CTL_FLAG_DATA_MASK; ctsio->io_hdr.flags |= entry->flags & CTL_FLAG_DATA_MASK; @@ -11043,43 +10981,15 @@ ctl_scsiio_precheck(struct ctl_softc *ct CTL_DEBUG_PRINT(("ctl_scsiio_precheck: bailing out due to invalid LUN\n")); return (retval); } else { - mtx_lock(&lun->lun_lock); - - /* - * Every I/O goes into the OOA queue for a particular LUN, and - * stays there until completion. - */ - TAILQ_INSERT_TAIL(&lun->ooa_queue, &ctsio->io_hdr, ooa_links); - /* * Make sure we support this particular command on this LUN. * e.g., we don't support writes to the control LUN. */ - switch (lun->be_lun->lun_type) { - case T_PROCESSOR: - if (((entry->flags & CTL_CMD_FLAG_OK_ON_PROC) == 0) - && ((entry->flags & CTL_CMD_FLAG_OK_ON_ALL_LUNS) - == 0)) { - mtx_unlock(&lun->lun_lock); - ctl_set_invalid_opcode(ctsio); - ctl_done((union ctl_io *)ctsio); - return (retval); - } - break; - case T_DIRECT: - if (((entry->flags & CTL_CMD_FLAG_OK_ON_SLUN) == 0) - && ((entry->flags & CTL_CMD_FLAG_OK_ON_ALL_LUNS) - == 0)){ - mtx_unlock(&lun->lun_lock); - ctl_set_invalid_opcode(ctsio); - ctl_done((union ctl_io *)ctsio); - return (retval); - } - break; - default: + if (!ctl_cmd_applicable(lun->be_lun->lun_type, entry)) { mtx_unlock(&lun->lun_lock); - panic("Unsupported CTL LUN type %d\n", - lun->be_lun->lun_type); + ctl_set_invalid_opcode(ctsio); + ctl_done((union ctl_io *)ctsio); + return (retval); } } @@ -11091,7 +11001,7 @@ ctl_scsiio_precheck(struct ctl_softc *ct * this initiator, clear it, because it sent down a command other * than request sense. */ - if ((opcode != REQUEST_SENSE) + if ((ctsio->cdb[0] != REQUEST_SENSE) && (ctl_is_set(lun->have_ca, initidx))) ctl_clear_mask(lun->have_ca, initidx); @@ -11187,7 +11097,7 @@ ctl_scsiio_precheck(struct ctl_softc *ct CTL_HA_STATUS_SUCCESS) { printf("CTL:precheck, ctl_ha_msg_send returned %d\n", isc_retval); - printf("CTL:opcode is %x\n",opcode); + printf("CTL:opcode is %x\n", ctsio->cdb[0]); } else { #if 0 printf("CTL:Precheck sent msg, opcode is %x\n",opcode); @@ -11242,17 +11152,85 @@ ctl_scsiio_precheck(struct ctl_softc *ct return (retval); } +const struct ctl_cmd_entry * +ctl_get_cmd_entry(struct ctl_scsiio *ctsio) +{ + const struct ctl_cmd_entry *entry; + int service_action; + + entry = &ctl_cmd_table[ctsio->cdb[0]]; + if (entry->flags & CTL_CMD_FLAG_SA5) { + service_action = ctsio->cdb[1] & SERVICE_ACTION_MASK; + entry = &((const struct ctl_cmd_entry *) + entry->execute)[service_action]; + } + return (entry); +} + +const struct ctl_cmd_entry * +ctl_validate_command(struct ctl_scsiio *ctsio) +{ + const struct ctl_cmd_entry *entry; + int i; + uint8_t diff; + + entry = ctl_get_cmd_entry(ctsio); + if (entry->execute == NULL) { + ctl_set_invalid_opcode(ctsio); + ctl_done((union ctl_io *)ctsio); + return (NULL); + } + KASSERT(entry->length > 0, + ("Not defined length for command 0x%02x/0x%02x", + ctsio->cdb[0], ctsio->cdb[1])); + for (i = 1; i < entry->length; i++) { + diff = ctsio->cdb[i] & ~entry->usage[i - 1]; + if (diff == 0) + continue; + ctl_set_invalid_field(ctsio, + /*sks_valid*/ 1, + /*command*/ 1, + /*field*/ i, + /*bit_valid*/ 1, + /*bit*/ fls(diff) - 1); + ctl_done((union ctl_io *)ctsio); + return (NULL); + } + return (entry); +} + +static int +ctl_cmd_applicable(uint8_t lun_type, const struct ctl_cmd_entry *entry) +{ + + switch (lun_type) { + case T_PROCESSOR: + if (((entry->flags & CTL_CMD_FLAG_OK_ON_PROC) == 0) && + ((entry->flags & CTL_CMD_FLAG_OK_ON_ALL_LUNS) == 0)) + return (0); + break; + case T_DIRECT: + if (((entry->flags & CTL_CMD_FLAG_OK_ON_SLUN) == 0) && + ((entry->flags & CTL_CMD_FLAG_OK_ON_ALL_LUNS) == 0)) + return (0); + break; + default: + return (0); + } + return (1); +} + static int ctl_scsiio(struct ctl_scsiio *ctsio) { int retval; - struct ctl_cmd_entry *entry; + const struct ctl_cmd_entry *entry; retval = CTL_RETVAL_COMPLETE; CTL_DEBUG_PRINT(("ctl_scsiio cdb[0]=%02X\n", ctsio->cdb[0])); - entry = &ctl_cmd_table[ctsio->cdb[0]]; + entry = ctl_get_cmd_entry(ctsio); /* * If this I/O has been aborted, just send it straight to @@ -11684,15 +11662,13 @@ ctl_handle_isc(union ctl_io *io) free_io = ctl_serialize_other_sc_cmd(&io->scsiio); break; case CTL_MSG_R2R: { - uint8_t opcode; - struct ctl_cmd_entry *entry; + const struct ctl_cmd_entry *entry; /* * This is only used in SER_ONLY mode. */ free_io = 0; - opcode = io->scsiio.cdb[0]; - entry = &ctl_cmd_table[opcode]; + entry = ctl_get_cmd_entry(&io->scsiio); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 16:54:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 80427B61; Tue, 15 Jul 2014 16:54:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6BBA72B56; Tue, 15 Jul 2014 16:54:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FGs5cG076422; Tue, 15 Jul 2014 16:54:05 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FGs4gK076412; Tue, 15 Jul 2014 16:54:04 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407151654.s6FGs4gK076412@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jul 2014 16:54:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268675 - in stable/10/sys/cam: ctl scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 16:54:05 -0000 Author: mav Date: Tue Jul 15 16:54:04 2014 New Revision: 268675 URL: http://svnweb.freebsd.org/changeset/base/268675 Log: MFC r268103: Add support for REPORT TIMESTAMP command. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_cmd_table.c stable/10/sys/cam/ctl/ctl_private.h stable/10/sys/cam/scsi/scsi_all.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Tue Jul 15 16:53:04 2014 (r268674) +++ stable/10/sys/cam/ctl/ctl.c Tue Jul 15 16:54:04 2014 (r268675) @@ -7292,6 +7292,58 @@ ctl_report_supported_tmf(struct ctl_scsi } int +ctl_report_timestamp(struct ctl_scsiio *ctsio) +{ + struct ctl_lun *lun; + struct scsi_report_timestamp *cdb; + struct scsi_report_timestamp_data *data; + struct timeval tv; + int64_t timestamp; + int retval; + int alloc_len, total_len; + + CTL_DEBUG_PRINT(("ctl_report_timestamp\n")); + + cdb = (struct scsi_report_timestamp *)ctsio->cdb; + lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + + retval = CTL_RETVAL_COMPLETE; + + total_len = sizeof(struct scsi_report_timestamp_data); + alloc_len = scsi_4btoul(cdb->length); + + ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); + + ctsio->kern_sg_entries = 0; + + if (total_len < alloc_len) { + ctsio->residual = alloc_len - total_len; + ctsio->kern_data_len = total_len; + ctsio->kern_total_len = total_len; + } else { + ctsio->residual = 0; + ctsio->kern_data_len = alloc_len; + ctsio->kern_total_len = alloc_len; + } + ctsio->kern_data_resid = 0; + ctsio->kern_rel_offset = 0; + + data = (struct scsi_report_timestamp_data *)ctsio->kern_data_ptr; + scsi_ulto2b(sizeof(*data) - 2, data->length); + data->origin = RTS_ORIG_OUTSIDE; + getmicrotime(&tv); + timestamp = (int64_t)tv.tv_sec * 1000 + tv.tv_usec / 1000; + scsi_ulto4b(timestamp >> 16, data->timestamp); + scsi_ulto2b(timestamp & 0xffff, &data->timestamp[4]); + + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; + ctsio->be_move_done = ctl_config_move_done; + + ctl_datamove((union ctl_io *)ctsio); + return (retval); +} + +int ctl_persistent_reserve_in(struct ctl_scsiio *ctsio) { struct scsi_per_res_in *cdb; Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_cmd_table.c Tue Jul 15 16:53:04 2014 (r268674) +++ stable/10/sys/cam/ctl/ctl_cmd_table.c Tue Jul 15 16:54:04 2014 (r268675) @@ -309,7 +309,19 @@ const struct ctl_cmd_entry ctl_cmd_table CTL_LUN_PAT_NONE, 12, {0x0d, 0, 0, 0, 0, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, -/* 0e-1f */ +/* 0E */ +{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, + +/* 0F REPORT TIMESTAMP */ +{ctl_report_timestamp, CTL_SERIDX_MAIN_IN, CTL_CMD_FLAG_OK_ON_BOTH | + CTL_CMD_FLAG_OK_ON_STOPPED | + CTL_CMD_FLAG_OK_ON_INOPERABLE | + CTL_CMD_FLAG_OK_ON_SECONDARY | + CTL_FLAG_DATA_IN, + CTL_LUN_PAT_NONE, + 12, {0x0f, 0, 0, 0, 0, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, + +/* 10-1f */ }; const struct ctl_cmd_entry ctl_cmd_table[256] = Modified: stable/10/sys/cam/ctl/ctl_private.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_private.h Tue Jul 15 16:53:04 2014 (r268674) +++ stable/10/sys/cam/ctl/ctl_private.h Tue Jul 15 16:54:04 2014 (r268675) @@ -501,6 +501,7 @@ int ctl_persistent_reserve_out(struct ct int ctl_report_tagret_port_groups(struct ctl_scsiio *ctsio); int ctl_report_supported_opcodes(struct ctl_scsiio *ctsio); int ctl_report_supported_tmf(struct ctl_scsiio *ctsio); +int ctl_report_timestamp(struct ctl_scsiio *ctsio); int ctl_isc(struct ctl_scsiio *ctsio); #endif /* _KERNEL */ Modified: stable/10/sys/cam/scsi/scsi_all.h ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.h Tue Jul 15 16:53:04 2014 (r268674) +++ stable/10/sys/cam/scsi/scsi_all.h Tue Jul 15 16:54:04 2014 (r268675) @@ -1059,6 +1059,29 @@ struct scsi_report_supported_tmf_data uint8_t reserved[2]; }; +struct scsi_report_timestamp +{ + uint8_t opcode; + uint8_t service_action; + uint8_t reserved[4]; + uint8_t length[4]; + uint8_t reserved1; + uint8_t control; +}; + +struct scsi_report_timestamp_data +{ + uint8_t length[2]; + uint8_t origin; +#define RTS_ORIG_MASK 0x00 +#define RTS_ORIG_ZERO 0x00 +#define RTS_ORIG_SET 0x02 +#define RTS_ORIG_OUTSIDE 0x03 + uint8_t reserved; + uint8_t timestamp[6]; + uint8_t reserve2[2]; +}; + struct ata_pass_16 { u_int8_t opcode; u_int8_t protocol; From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 16:55:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A19BCB0; Tue, 15 Jul 2014 16:55:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A9152B65; Tue, 15 Jul 2014 16:55:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FGtFF2076845; Tue, 15 Jul 2014 16:55:15 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FGtD58076836; Tue, 15 Jul 2014 16:55:13 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407151655.s6FGtD58076836@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jul 2014 16:55:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268676 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 16:55:15 -0000 Author: mav Date: Tue Jul 15 16:55:13 2014 New Revision: 268676 URL: http://svnweb.freebsd.org/changeset/base/268676 Log: MFC r268265: Remove targ_enable()/targ_disable() frontend methods. Those methods were never implemented, and I believe that their concept is wrong, since single frontend (SCSI port) can not handle several targets. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_frontend.h stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c stable/10/sys/cam/ctl/ctl_frontend_internal.c stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/sys/cam/ctl/scsi_ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Tue Jul 15 16:54:04 2014 (r268675) +++ stable/10/sys/cam/ctl/ctl.c Tue Jul 15 16:55:13 2014 (r268676) @@ -331,8 +331,6 @@ static int ctl_open(struct cdev *dev, in static int ctl_close(struct cdev *dev, int flags, int fmt, struct thread *td); static void ctl_ioctl_online(void *arg); static void ctl_ioctl_offline(void *arg); -static int ctl_ioctl_targ_enable(void *arg, struct ctl_id targ_id); -static int ctl_ioctl_targ_disable(void *arg, struct ctl_id targ_id); static int ctl_ioctl_lun_enable(void *arg, struct ctl_id targ_id, int lun_id); static int ctl_ioctl_lun_disable(void *arg, struct ctl_id targ_id, int lun_id); static int ctl_ioctl_do_datamove(struct ctl_scsiio *ctsio); @@ -1095,8 +1093,6 @@ ctl_init(void) fe->port_online = ctl_ioctl_online; fe->port_offline = ctl_ioctl_offline; fe->onoff_arg = &softc->ioctl_info; - fe->targ_enable = ctl_ioctl_targ_enable; - fe->targ_disable = ctl_ioctl_targ_disable; fe->lun_enable = ctl_ioctl_lun_enable; fe->lun_disable = ctl_ioctl_lun_disable; fe->targ_lun_arg = &softc->ioctl_info; @@ -1451,22 +1447,6 @@ bailout: return (retval); } -/* - * XXX KDM should we pretend to do something in the target/lun - * enable/disable functions? - */ -static int -ctl_ioctl_targ_enable(void *arg, struct ctl_id targ_id) -{ - return (0); -} - -static int -ctl_ioctl_targ_disable(void *arg, struct ctl_id targ_id) -{ - return (0); -} - static int ctl_ioctl_lun_enable(void *arg, struct ctl_id targ_id, int lun_id) { @@ -4313,24 +4293,6 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft STAILQ_FOREACH(fe, &ctl_softc->fe_list, links) { int retval; - /* - * XXX KDM this only works for ONE TARGET ID. We'll need - * to do things differently if we go to a multiple target - * ID scheme. - */ - if ((fe->status & CTL_PORT_STATUS_TARG_ONLINE) == 0) { - - retval = fe->targ_enable(fe->targ_lun_arg, target_id); - if (retval != 0) { - printf("ctl_alloc_lun: FETD %s port %d " - "returned error %d for targ_enable on " - "target %ju\n", fe->port_name, - fe->targ_port, retval, - (uintmax_t)target_id.id); - } else - fe->status |= CTL_PORT_STATUS_TARG_ONLINE; - } - retval = fe->lun_enable(fe->targ_lun_arg, target_id,lun_number); if (retval != 0) { printf("ctl_alloc_lun: FETD %s port %d returned error " Modified: stable/10/sys/cam/ctl/ctl_frontend.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend.h Tue Jul 15 16:54:04 2014 (r268675) +++ stable/10/sys/cam/ctl/ctl_frontend.h Tue Jul 15 16:55:13 2014 (r268676) @@ -105,30 +105,6 @@ typedef int (*fe_devid_t)(struct ctl_scs * and port_offline(). This is specified by the * FETD. * - * targ_enable(): This function is called, with targ_lun_arg and a - * target ID as its arguments, by CTL when it wants - * the FETD to enable a particular target. targ_enable() - * will always be called for a particular target ID - * before any LUN is enabled for that target. If the - * FETD does not support enabling targets, but rather - * LUNs, it should ignore this call and return 0. If - * the FETD does support enabling targets, it should - * return 0 for success and non-zero if it cannot - * enable the given target. - * - * TODO: Add the ability to specify a WWID here. - * - * targ_disable(): This function is called, with targ_lun_arg and a - * target ID as its arguments, by CTL when it wants - * the FETD to disable a particular target. - * targ_disable() will always be called for a - * particular target ID after all LUNs are disabled - * on that particular target. If the FETD does not - * support enabling targets, it should ignore this - * call and return 0. If the FETD does support - * enabling targets, it should return 0 for success, - * and non-zero if it cannot disable the given target. - * * lun_enable(): This function is called, with targ_lun_arg, a target * ID and a LUN ID as its arguments, by CTL when it * wants the FETD to enable a particular LUN. If the @@ -212,8 +188,6 @@ struct ctl_frontend { port_func_t port_online; /* passed to CTL */ port_func_t port_offline; /* passed to CTL */ void *onoff_arg; /* passed to CTL */ - targ_func_t targ_enable; /* passed to CTL */ - targ_func_t targ_disable; /* passed to CTL */ lun_func_t lun_enable; /* passed to CTL */ lun_func_t lun_disable; /* passed to CTL */ fe_ioctl_t ioctl; /* passed to CTL */ Modified: stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Tue Jul 15 16:54:04 2014 (r268675) +++ stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Tue Jul 15 16:55:13 2014 (r268676) @@ -101,8 +101,6 @@ void cfcs_shutdown(void); static void cfcs_poll(struct cam_sim *sim); static void cfcs_online(void *arg); static void cfcs_offline(void *arg); -static int cfcs_targ_enable(void *arg, struct ctl_id targ_id); -static int cfcs_targ_disable(void *arg, struct ctl_id targ_id); static int cfcs_lun_enable(void *arg, struct ctl_id target_id, int lun_id); static int cfcs_lun_disable(void *arg, struct ctl_id target_id, int lun_id); static void cfcs_datamove(union ctl_io *io); @@ -163,8 +161,6 @@ cfcs_init(void) fe->port_online = cfcs_online; fe->port_offline = cfcs_offline; fe->onoff_arg = softc; - fe->targ_enable = cfcs_targ_enable; - fe->targ_disable = cfcs_targ_disable; fe->lun_enable = cfcs_lun_enable; fe->lun_disable = cfcs_lun_disable; fe->targ_lun_arg = softc; @@ -336,18 +332,6 @@ cfcs_offline(void *arg) } static int -cfcs_targ_enable(void *arg, struct ctl_id targ_id) -{ - return (0); -} - -static int -cfcs_targ_disable(void *arg, struct ctl_id targ_id) -{ - return (0); -} - -static int cfcs_lun_enable(void *arg, struct ctl_id target_id, int lun_id) { return (0); Modified: stable/10/sys/cam/ctl/ctl_frontend_internal.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_internal.c Tue Jul 15 16:54:04 2014 (r268675) +++ stable/10/sys/cam/ctl/ctl_frontend_internal.c Tue Jul 15 16:55:13 2014 (r268676) @@ -192,8 +192,6 @@ int cfi_init(void); void cfi_shutdown(void) __unused; static void cfi_online(void *arg); static void cfi_offline(void *arg); -static int cfi_targ_enable(void *arg, struct ctl_id targ_id); -static int cfi_targ_disable(void *arg, struct ctl_id targ_id); static int cfi_lun_enable(void *arg, struct ctl_id target_id, int lun_id); static int cfi_lun_disable(void *arg, struct ctl_id target_id, int lun_id); static void cfi_datamove(union ctl_io *io); @@ -261,8 +259,6 @@ cfi_init(void) fe->port_online = cfi_online; fe->port_offline = cfi_offline; fe->onoff_arg = softc; - fe->targ_enable = cfi_targ_enable; - fe->targ_disable = cfi_targ_disable; fe->lun_enable = cfi_lun_enable; fe->lun_disable = cfi_lun_disable; fe->targ_lun_arg = softc; @@ -347,18 +343,6 @@ cfi_offline(void *arg) } static int -cfi_targ_enable(void *arg, struct ctl_id targ_id) -{ - return (0); -} - -static int -cfi_targ_disable(void *arg, struct ctl_id targ_id) -{ - return (0); -} - -static int cfi_lun_enable(void *arg, struct ctl_id target_id, int lun_id) { struct cfi_softc *softc; Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Tue Jul 15 16:54:04 2014 (r268675) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Tue Jul 15 16:55:13 2014 (r268676) @@ -149,8 +149,6 @@ SYSCTL_INT(_kern_cam_ctl_iscsi, OID_AUTO int cfiscsi_init(void); static void cfiscsi_online(void *arg); static void cfiscsi_offline(void *arg); -static int cfiscsi_targ_enable(void *arg, struct ctl_id targ_id); -static int cfiscsi_targ_disable(void *arg, struct ctl_id targ_id); static int cfiscsi_lun_enable(void *arg, struct ctl_id target_id, int lun_id); static int cfiscsi_lun_disable(void *arg, @@ -1346,8 +1344,6 @@ cfiscsi_init(void) fe->port_online = cfiscsi_online; fe->port_offline = cfiscsi_offline; fe->onoff_arg = softc; - fe->targ_enable = cfiscsi_targ_enable; - fe->targ_disable = cfiscsi_targ_disable; fe->lun_enable = cfiscsi_lun_enable; fe->lun_disable = cfiscsi_lun_disable; fe->targ_lun_arg = softc; @@ -1451,20 +1447,6 @@ cfiscsi_offline(void *arg) #endif } -static int -cfiscsi_targ_enable(void *arg, struct ctl_id targ_id) -{ - - return (0); -} - -static int -cfiscsi_targ_disable(void *arg, struct ctl_id targ_id) -{ - - return (0); -} - static void cfiscsi_ioctl_handoff(struct ctl_iscsi *ci) { Modified: stable/10/sys/cam/ctl/scsi_ctl.c ============================================================================== --- stable/10/sys/cam/ctl/scsi_ctl.c Tue Jul 15 16:54:04 2014 (r268675) +++ stable/10/sys/cam/ctl/scsi_ctl.c Tue Jul 15 16:55:13 2014 (r268676) @@ -211,8 +211,6 @@ static void ctlfedone(struct cam_periph static void ctlfe_onoffline(void *arg, int online); static void ctlfe_online(void *arg); static void ctlfe_offline(void *arg); -static int ctlfe_targ_enable(void *arg, struct ctl_id targ_id); -static int ctlfe_targ_disable(void *arg, struct ctl_id targ_id); static int ctlfe_lun_enable(void *arg, struct ctl_id targ_id, int lun_id); static int ctlfe_lun_disable(void *arg, struct ctl_id targ_id, @@ -410,8 +408,6 @@ ctlfeasync(void *callback_arg, uint32_t fe->port_online = ctlfe_online; fe->port_offline = ctlfe_offline; fe->onoff_arg = bus_softc; - fe->targ_enable = ctlfe_targ_enable; - fe->targ_disable = ctlfe_targ_disable; fe->lun_enable = ctlfe_lun_enable; fe->lun_disable = ctlfe_lun_disable; fe->targ_lun_arg = bus_softc; @@ -1927,18 +1923,6 @@ ctlfe_offline(void *arg) xpt_free_path(path); } -static int -ctlfe_targ_enable(void *arg, struct ctl_id targ_id) -{ - return (0); -} - -static int -ctlfe_targ_disable(void *arg, struct ctl_id targ_id) -{ - return (0); -} - /* * This will get called to enable a LUN on every bus that is attached to * CTL. So we only need to create a path/periph for this particular bus. From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 16:57:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 64663EE0; Tue, 15 Jul 2014 16:57:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F9A62B7C; Tue, 15 Jul 2014 16:57:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FGvV45077760; Tue, 15 Jul 2014 16:57:31 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FGvUw0077752; Tue, 15 Jul 2014 16:57:30 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407151657.s6FGvUw0077752@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jul 2014 16:57:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268677 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 16:57:31 -0000 Author: mav Date: Tue Jul 15 16:57:30 2014 New Revision: 268677 URL: http://svnweb.freebsd.org/changeset/base/268677 Log: MFC r268266, r268275: Separate concepts of frontend and port. Before iSCSI implementation CTL had no knowledge about frontend drivers, it had only frontends, which really were ports (alike to LUNs, if comparing to backends). But iSCSI added there ioctl() method, which does not belong to frontend as a port, but belongs to a frontend driver. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_frontend.c stable/10/sys/cam/ctl/ctl_frontend.h stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c stable/10/sys/cam/ctl/ctl_frontend_internal.c stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/sys/cam/ctl/ctl_frontend_iscsi.h stable/10/sys/cam/ctl/ctl_private.h stable/10/sys/cam/ctl/scsi_ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Tue Jul 15 16:55:13 2014 (r268676) +++ stable/10/sys/cam/ctl/ctl.c Tue Jul 15 16:57:30 2014 (r268677) @@ -468,6 +468,11 @@ static moduledata_t ctl_moduledata = { DECLARE_MODULE(ctl, ctl_moduledata, SI_SUB_CONFIGURE, SI_ORDER_THIRD); MODULE_VERSION(ctl, 1); +static struct ctl_frontend ioctl_frontend = +{ + .name = "ioctl", +}; + static void ctl_isc_handler_finish_xfer(struct ctl_softc *ctl_softc, union ctl_ha_msg *msg_info) @@ -928,7 +933,7 @@ ctl_init(void) { struct ctl_softc *softc; struct ctl_io_pool *internal_pool, *emergency_pool, *other_pool; - struct ctl_frontend *fe; + struct ctl_port *port; uint8_t sc_id =0; int i, error, retval; //int isc_retval; @@ -1008,6 +1013,7 @@ ctl_init(void) STAILQ_INIT(&softc->lun_list); STAILQ_INIT(&softc->pending_lun_queue); STAILQ_INIT(&softc->fe_list); + STAILQ_INIT(&softc->port_list); STAILQ_INIT(&softc->be_list); STAILQ_INIT(&softc->io_pools); @@ -1085,23 +1091,25 @@ ctl_init(void) /* * Initialize the ioctl front end. */ - fe = &softc->ioctl_info.fe; - sprintf(softc->ioctl_info.port_name, "CTL ioctl"); - fe->port_type = CTL_PORT_IOCTL; - fe->num_requested_ctl_io = 100; - fe->port_name = softc->ioctl_info.port_name; - fe->port_online = ctl_ioctl_online; - fe->port_offline = ctl_ioctl_offline; - fe->onoff_arg = &softc->ioctl_info; - fe->lun_enable = ctl_ioctl_lun_enable; - fe->lun_disable = ctl_ioctl_lun_disable; - fe->targ_lun_arg = &softc->ioctl_info; - fe->fe_datamove = ctl_ioctl_datamove; - fe->fe_done = ctl_ioctl_done; - fe->max_targets = 15; - fe->max_target_id = 15; + ctl_frontend_register(&ioctl_frontend); + port = &softc->ioctl_info.port; + port->frontend = &ioctl_frontend; + sprintf(softc->ioctl_info.port_name, "ioctl"); + port->port_type = CTL_PORT_IOCTL; + port->num_requested_ctl_io = 100; + port->port_name = softc->ioctl_info.port_name; + port->port_online = ctl_ioctl_online; + port->port_offline = ctl_ioctl_offline; + port->onoff_arg = &softc->ioctl_info; + port->lun_enable = ctl_ioctl_lun_enable; + port->lun_disable = ctl_ioctl_lun_disable; + port->targ_lun_arg = &softc->ioctl_info; + port->fe_datamove = ctl_ioctl_datamove; + port->fe_done = ctl_ioctl_done; + port->max_targets = 15; + port->max_target_id = 15; - if (ctl_frontend_register(&softc->ioctl_info.fe, + if (ctl_port_register(&softc->ioctl_info.port, (softc->flags & CTL_FLAG_MASTER_SHELF)) != 0) { printf("ctl: ioctl front end registration failed, will " "continue anyway\n"); @@ -1127,7 +1135,7 @@ ctl_shutdown(void) softc = (struct ctl_softc *)control_softc; - if (ctl_frontend_deregister(&softc->ioctl_info.fe) != 0) + if (ctl_port_deregister(&softc->ioctl_info.port) != 0) printf("ctl: ioctl front end deregistration failed\n"); mtx_lock(&softc->ctl_lock); @@ -1142,6 +1150,8 @@ ctl_shutdown(void) mtx_unlock(&softc->ctl_lock); + ctl_frontend_deregister(&ioctl_frontend); + /* * This will rip the rug out from under any FETDs or anyone else * that has a pool allocated. Since we increment our module @@ -1206,7 +1216,7 @@ int ctl_port_enable(ctl_port_type port_type) { struct ctl_softc *softc; - struct ctl_frontend *fe; + struct ctl_port *port; if (ctl_is_single == 0) { union ctl_ha_msg msg_info; @@ -1235,13 +1245,13 @@ ctl_port_enable(ctl_port_type port_type) softc = control_softc; - STAILQ_FOREACH(fe, &softc->fe_list, links) { - if (port_type & fe->port_type) + STAILQ_FOREACH(port, &softc->port_list, links) { + if (port_type & port->port_type) { #if 0 - printf("port %d\n", fe->targ_port); + printf("port %d\n", port->targ_port); #endif - ctl_frontend_online(fe); + ctl_port_online(port); } } @@ -1252,13 +1262,13 @@ int ctl_port_disable(ctl_port_type port_type) { struct ctl_softc *softc; - struct ctl_frontend *fe; + struct ctl_port *port; softc = control_softc; - STAILQ_FOREACH(fe, &softc->fe_list, links) { - if (port_type & fe->port_type) - ctl_frontend_offline(fe); + STAILQ_FOREACH(port, &softc->port_list, links) { + if (port_type & port->port_type) + ctl_port_offline(port); } return (0); @@ -1276,7 +1286,7 @@ ctl_port_list(struct ctl_port_entry *ent ctl_port_type port_type, int no_virtual) { struct ctl_softc *softc; - struct ctl_frontend *fe; + struct ctl_port *port; int entries_dropped, entries_filled; int retval; int i; @@ -1289,14 +1299,14 @@ ctl_port_list(struct ctl_port_entry *ent i = 0; mtx_lock(&softc->ctl_lock); - STAILQ_FOREACH(fe, &softc->fe_list, links) { + STAILQ_FOREACH(port, &softc->port_list, links) { struct ctl_port_entry *entry; - if ((fe->port_type & port_type) == 0) + if ((port->port_type & port_type) == 0) continue; if ((no_virtual != 0) - && (fe->virtual_port != 0)) + && (port->virtual_port != 0)) continue; if (entries_filled >= num_entries_alloced) { @@ -1305,13 +1315,13 @@ ctl_port_list(struct ctl_port_entry *ent } entry = &entries[i]; - entry->port_type = fe->port_type; - strlcpy(entry->port_name, fe->port_name, + entry->port_type = port->port_type; + strlcpy(entry->port_name, port->port_name, sizeof(entry->port_name)); - entry->physical_port = fe->physical_port; - entry->virtual_port = fe->virtual_port; - entry->wwnn = fe->wwnn; - entry->wwpn = fe->wwpn; + entry->physical_port = port->physical_port; + entry->virtual_port = port->virtual_port; + entry->wwnn = port->wwnn; + entry->wwpn = port->wwpn; i++; entries_filled++; @@ -2136,7 +2146,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, break; } - io = ctl_alloc_io(softc->ioctl_info.fe.ctl_pool_ref); + io = ctl_alloc_io(softc->ioctl_info.port.ctl_pool_ref); if (io == NULL) { printf("ctl_ioctl: can't allocate ctl_io!\n"); retval = ENOSPC; @@ -2160,7 +2170,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, /* * The user sets the initiator ID, target and LUN IDs. */ - io->io_hdr.nexus.targ_port = softc->ioctl_info.fe.targ_port; + io->io_hdr.nexus.targ_port = softc->ioctl_info.port.targ_port; io->io_hdr.flags |= CTL_FLAG_USER_REQ; if ((io->io_hdr.io_type == CTL_IO_SCSI) && (io->scsiio.tag_type != CTL_TAG_UNTAGGED)) @@ -2183,20 +2193,20 @@ ctl_ioctl(struct cdev *dev, u_long cmd, case CTL_ENABLE_PORT: case CTL_DISABLE_PORT: case CTL_SET_PORT_WWNS: { - struct ctl_frontend *fe; + struct ctl_port *port; struct ctl_port_entry *entry; entry = (struct ctl_port_entry *)addr; mtx_lock(&softc->ctl_lock); - STAILQ_FOREACH(fe, &softc->fe_list, links) { + STAILQ_FOREACH(port, &softc->port_list, links) { int action, done; action = 0; done = 0; if ((entry->port_type == CTL_PORT_NONE) - && (entry->targ_port == fe->targ_port)) { + && (entry->targ_port == port->targ_port)) { /* * If the user only wants to enable or * disable or set WWNs on a specific port, @@ -2204,7 +2214,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, */ action = 1; done = 1; - } else if (entry->port_type & fe->port_type) { + } else if (entry->port_type & port->port_type) { /* * Compare the user's type mask with the * particular frontend type to see if we @@ -2239,21 +2249,21 @@ ctl_ioctl(struct cdev *dev, u_long cmd, STAILQ_FOREACH(lun, &softc->lun_list, links) { - fe->lun_enable(fe->targ_lun_arg, + port->lun_enable(port->targ_lun_arg, lun->target, lun->lun); } - ctl_frontend_online(fe); + ctl_port_online(port); } else if (cmd == CTL_DISABLE_PORT) { struct ctl_lun *lun; - ctl_frontend_offline(fe); + ctl_port_offline(port); STAILQ_FOREACH(lun, &softc->lun_list, links) { - fe->lun_disable( - fe->targ_lun_arg, + port->lun_disable( + port->targ_lun_arg, lun->target, lun->lun); } @@ -2262,7 +2272,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, mtx_lock(&softc->ctl_lock); if (cmd == CTL_SET_PORT_WWNS) - ctl_frontend_set_wwns(fe, + ctl_port_set_wwns(port, (entry->flags & CTL_PORT_WWNN_VALID) ? 1 : 0, entry->wwnn, (entry->flags & CTL_PORT_WWPN_VALID) ? @@ -2275,7 +2285,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, break; } case CTL_GET_PORT_LIST: { - struct ctl_frontend *fe; + struct ctl_port *port; struct ctl_port_list *list; int i; @@ -2295,7 +2305,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, list->dropped_num = 0; i = 0; mtx_lock(&softc->ctl_lock); - STAILQ_FOREACH(fe, &softc->fe_list, links) { + STAILQ_FOREACH(port, &softc->port_list, links) { struct ctl_port_entry entry, *list_entry; if (list->fill_num >= list->alloc_num) { @@ -2303,15 +2313,15 @@ ctl_ioctl(struct cdev *dev, u_long cmd, continue; } - entry.port_type = fe->port_type; - strlcpy(entry.port_name, fe->port_name, + entry.port_type = port->port_type; + strlcpy(entry.port_name, port->port_name, sizeof(entry.port_name)); - entry.targ_port = fe->targ_port; - entry.physical_port = fe->physical_port; - entry.virtual_port = fe->virtual_port; - entry.wwnn = fe->wwnn; - entry.wwpn = fe->wwpn; - if (fe->status & CTL_PORT_STATUS_ONLINE) + entry.targ_port = port->targ_port; + entry.physical_port = port->physical_port; + entry.virtual_port = port->virtual_port; + entry.wwnn = port->wwnn; + entry.wwpn = port->wwpn; + if (port->status & CTL_PORT_STATUS_ONLINE) entry.online = 1; else entry.online = 0; @@ -2846,6 +2856,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, } case CTL_DUMP_STRUCTS: { int i, j, k; + struct ctl_port *port; struct ctl_frontend *fe; printf("CTL IID to WWPN map start:\n"); @@ -2883,26 +2894,25 @@ ctl_ioctl(struct cdev *dev, u_long cmd, } } printf("CTL Persistent Reservation information end\n"); - printf("CTL Frontends:\n"); + printf("CTL Ports:\n"); /* * XXX KDM calling this without a lock. We'd likely want * to drop the lock before calling the frontend's dump * routine anyway. */ + STAILQ_FOREACH(port, &softc->port_list, links) { + printf("Port %s Frontend %s Type %u pport %d vport %d WWNN " + "%#jx WWPN %#jx\n", port->port_name, + port->frontend->name, port->port_type, + port->physical_port, port->virtual_port, + (uintmax_t)port->wwnn, (uintmax_t)port->wwpn); + } + printf("CTL Port information end\n"); + printf("CTL Frontends:\n"); STAILQ_FOREACH(fe, &softc->fe_list, links) { - printf("Frontend %s Type %u pport %d vport %d WWNN " - "%#jx WWPN %#jx\n", fe->port_name, fe->port_type, - fe->physical_port, fe->virtual_port, - (uintmax_t)fe->wwnn, (uintmax_t)fe->wwpn); - - /* - * Frontends are not required to support the dump - * routine. - */ - if (fe->fe_dump == NULL) - continue; - - fe->fe_dump(); + printf("Frontend %s\n", fe->name); + if (fe->fe_dump != NULL) + fe->fe_dump(); } printf("CTL Frontend information end\n"); break; @@ -3115,14 +3125,15 @@ ctl_ioctl(struct cdev *dev, u_long cmd, mtx_lock(&softc->ctl_lock); STAILQ_FOREACH(fe, &softc->fe_list, links) { - if (strcmp(fe->port_name, "iscsi") == 0) + if (strcmp(fe->name, "iscsi") == 0) break; } mtx_unlock(&softc->ctl_lock); if (fe == NULL) { ci->status = CTL_ISCSI_ERROR; - snprintf(ci->error_str, sizeof(ci->error_str), "Backend \"iscsi\" not found."); + snprintf(ci->error_str, sizeof(ci->error_str), + "Frontend \"iscsi\" not found."); break; } @@ -3381,7 +3392,6 @@ ctl_pool_create(struct ctl_softc *ctl_so #if 0 if ((pool_type != CTL_POOL_EMERGENCY) && (pool_type != CTL_POOL_INTERNAL) - && (pool_type != CTL_POOL_IOCTL) && (pool_type != CTL_POOL_4OTHERSC)) MOD_INC_USE_COUNT; #endif @@ -3435,7 +3445,7 @@ ctl_pool_release(struct ctl_io_pool *poo #if 0 if ((pool->type != CTL_POOL_EMERGENCY) && (pool->type != CTL_POOL_INTERNAL) - && (pool->type != CTL_POOL_IOCTL)) + && (pool->type != CTL_POOL_4OTHERSC)) MOD_DEC_USE_COUNT; #endif @@ -4141,7 +4151,7 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft struct ctl_be_lun *const be_lun, struct ctl_id target_id) { struct ctl_lun *nlun, *lun; - struct ctl_frontend *fe; + struct ctl_port *port; int lun_number, i, lun_malloced; if (be_lun == NULL) @@ -4290,17 +4300,17 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft * already. Enable the target ID if it hasn't been enabled, and * enable this particular LUN. */ - STAILQ_FOREACH(fe, &ctl_softc->fe_list, links) { + STAILQ_FOREACH(port, &ctl_softc->port_list, links) { int retval; - retval = fe->lun_enable(fe->targ_lun_arg, target_id,lun_number); + retval = port->lun_enable(port->targ_lun_arg, target_id,lun_number); if (retval != 0) { printf("ctl_alloc_lun: FETD %s port %d returned error " "%d for lun_enable on target %ju lun %d\n", - fe->port_name, fe->targ_port, retval, + port->port_name, port->targ_port, retval, (uintmax_t)target_id.id, lun_number); } else - fe->status |= CTL_PORT_STATUS_LUN_ONLINE; + port->status |= CTL_PORT_STATUS_LUN_ONLINE; } return (0); } @@ -4316,7 +4326,7 @@ ctl_free_lun(struct ctl_lun *lun) { struct ctl_softc *softc; #if 0 - struct ctl_frontend *fe; + struct ctl_port *port; #endif struct ctl_lun *nlun; int i; @@ -4340,7 +4350,7 @@ ctl_free_lun(struct ctl_lun *lun) * XXX KDM this scheme only works for a single target/multiple LUN * setup. It needs to be revamped for a multiple target scheme. * - * XXX KDM this results in fe->lun_disable() getting called twice, + * XXX KDM this results in port->lun_disable() getting called twice, * once when ctl_disable_lun() is called, and a second time here. * We really need to re-think the LUN disable semantics. There * should probably be several steps/levels to LUN removal: @@ -4352,37 +4362,37 @@ ctl_free_lun(struct ctl_lun *lun) * the front end ports, at least for individual LUNs. */ #if 0 - STAILQ_FOREACH(fe, &softc->fe_list, links) { + STAILQ_FOREACH(port, &softc->port_list, links) { int retval; - retval = fe->lun_disable(fe->targ_lun_arg, lun->target, + retval = port->lun_disable(port->targ_lun_arg, lun->target, lun->lun); if (retval != 0) { printf("ctl_free_lun: FETD %s port %d returned error " "%d for lun_disable on target %ju lun %jd\n", - fe->port_name, fe->targ_port, retval, + port->port_name, port->targ_port, retval, (uintmax_t)lun->target.id, (intmax_t)lun->lun); } if (STAILQ_FIRST(&softc->lun_list) == NULL) { - fe->status &= ~CTL_PORT_STATUS_LUN_ONLINE; + port->status &= ~CTL_PORT_STATUS_LUN_ONLINE; - retval = fe->targ_disable(fe->targ_lun_arg,lun->target); + retval = port->targ_disable(port->targ_lun_arg,lun->target); if (retval != 0) { printf("ctl_free_lun: FETD %s port %d " "returned error %d for targ_disable on " - "target %ju\n", fe->port_name, - fe->targ_port, retval, + "target %ju\n", port->port_name, + port->targ_port, retval, (uintmax_t)lun->target.id); } else - fe->status &= ~CTL_PORT_STATUS_TARG_ONLINE; + port->status &= ~CTL_PORT_STATUS_TARG_ONLINE; - if ((fe->status & CTL_PORT_STATUS_TARG_ONLINE) != 0) + if ((port->status & CTL_PORT_STATUS_TARG_ONLINE) != 0) continue; #if 0 - fe->port_offline(fe->onoff_arg); - fe->status &= ~CTL_PORT_STATUS_ONLINE; + port->port_offline(port->onoff_arg); + port->status &= ~CTL_PORT_STATUS_ONLINE; #endif } } @@ -4437,7 +4447,7 @@ int ctl_enable_lun(struct ctl_be_lun *be_lun) { struct ctl_softc *ctl_softc; - struct ctl_frontend *fe, *nfe; + struct ctl_port *port, *nport; struct ctl_lun *lun; int retval; @@ -4459,8 +4469,8 @@ ctl_enable_lun(struct ctl_be_lun *be_lun lun->flags &= ~CTL_LUN_DISABLED; mtx_unlock(&lun->lun_lock); - for (fe = STAILQ_FIRST(&ctl_softc->fe_list); fe != NULL; fe = nfe) { - nfe = STAILQ_NEXT(fe, links); + for (port = STAILQ_FIRST(&ctl_softc->port_list); port != NULL; port = nport) { + nport = STAILQ_NEXT(port, links); /* * Drop the lock while we call the FETD's enable routine. @@ -4468,18 +4478,18 @@ ctl_enable_lun(struct ctl_be_lun *be_lun * case of the internal initiator frontend. */ mtx_unlock(&ctl_softc->ctl_lock); - retval = fe->lun_enable(fe->targ_lun_arg, lun->target,lun->lun); + retval = port->lun_enable(port->targ_lun_arg, lun->target,lun->lun); mtx_lock(&ctl_softc->ctl_lock); if (retval != 0) { printf("%s: FETD %s port %d returned error " "%d for lun_enable on target %ju lun %jd\n", - __func__, fe->port_name, fe->targ_port, retval, + __func__, port->port_name, port->targ_port, retval, (uintmax_t)lun->target.id, (intmax_t)lun->lun); } #if 0 else { /* NOTE: TODO: why does lun enable affect port status? */ - fe->status |= CTL_PORT_STATUS_LUN_ONLINE; + port->status |= CTL_PORT_STATUS_LUN_ONLINE; } #endif } @@ -4493,7 +4503,7 @@ int ctl_disable_lun(struct ctl_be_lun *be_lun) { struct ctl_softc *ctl_softc; - struct ctl_frontend *fe; + struct ctl_port *port; struct ctl_lun *lun; int retval; @@ -4511,7 +4521,7 @@ ctl_disable_lun(struct ctl_be_lun *be_lu lun->flags |= CTL_LUN_DISABLED; mtx_unlock(&lun->lun_lock); - STAILQ_FOREACH(fe, &ctl_softc->fe_list, links) { + STAILQ_FOREACH(port, &ctl_softc->port_list, links) { mtx_unlock(&ctl_softc->ctl_lock); /* * Drop the lock before we call the frontend's disable @@ -4520,13 +4530,13 @@ ctl_disable_lun(struct ctl_be_lun *be_lu * XXX KDM what happens if the frontend list changes while * we're traversing it? It's unlikely, but should be handled. */ - retval = fe->lun_disable(fe->targ_lun_arg, lun->target, + retval = port->lun_disable(port->targ_lun_arg, lun->target, lun->lun); mtx_lock(&ctl_softc->ctl_lock); if (retval != 0) { printf("ctl_alloc_lun: FETD %s port %d returned error " "%d for lun_disable on target %ju lun %jd\n", - fe->port_name, fe->targ_port, retval, + port->port_name, port->targ_port, retval, (uintmax_t)lun->target.id, (intmax_t)lun->lun); } } @@ -9478,16 +9488,16 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio struct scsi_vpd_id_t10 *t10id; struct ctl_softc *ctl_softc; struct ctl_lun *lun; - struct ctl_frontend *fe; + struct ctl_port *port; char *val; int data_len, devid_len; ctl_softc = control_softc; - fe = ctl_softc->ctl_ports[ctl_port_idx(ctsio->io_hdr.nexus.targ_port)]; + port = ctl_softc->ctl_ports[ctl_port_idx(ctsio->io_hdr.nexus.targ_port)]; - if (fe->devid != NULL) - return ((fe->devid)(ctsio, alloc_len)); + if (port->devid != NULL) + return ((port->devid)(ctsio, alloc_len)); lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; @@ -9550,7 +9560,7 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio /* * For Fibre channel, */ - if (fe->port_type == CTL_PORT_FC) + if (port->port_type == CTL_PORT_FC) { desc->proto_codeset = (SCSI_PROTO_FC << 4) | SVPD_ID_CODESET_ASCII; @@ -9599,7 +9609,7 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio desc1->identifier[7] += ctsio->io_hdr.nexus.targ_port; #endif - be64enc(desc1->identifier, fe->wwpn); + be64enc(desc1->identifier, port->wwpn); /* * desc2 is for the Relative Target Port(type 4h) identifier Modified: stable/10/sys/cam/ctl/ctl_frontend.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend.c Tue Jul 15 16:55:13 2014 (r268676) +++ stable/10/sys/cam/ctl/ctl_frontend.c Tue Jul 15 16:57:30 2014 (r268677) @@ -66,7 +66,60 @@ __FBSDID("$FreeBSD$"); extern struct ctl_softc *control_softc; int -ctl_frontend_register(struct ctl_frontend *fe, int master_shelf) +ctl_frontend_register(struct ctl_frontend *fe) +{ + struct ctl_frontend *fe_tmp; + + KASSERT(control_softc != NULL, ("CTL is not initialized")); + + /* + * Sanity check, make sure this isn't a duplicate registration. + */ + mtx_lock(&control_softc->ctl_lock); + STAILQ_FOREACH(fe_tmp, &control_softc->fe_list, links) { + if (strcmp(fe_tmp->name, fe->name) == 0) { + mtx_unlock(&control_softc->ctl_lock); + return (-1); + } + } + mtx_unlock(&control_softc->ctl_lock); + STAILQ_INIT(&fe->port_list); + + /* + * Call the frontend's initialization routine. + */ + if (fe->init != NULL) + fe->init(); + + mtx_lock(&control_softc->ctl_lock); + control_softc->num_frontends++; + STAILQ_INSERT_TAIL(&control_softc->fe_list, fe, links); + mtx_unlock(&control_softc->ctl_lock); + return (0); +} + +int +ctl_frontend_deregister(struct ctl_frontend *fe) +{ + + if (!STAILQ_EMPTY(&fe->port_list)) + return (-1); + + mtx_lock(&control_softc->ctl_lock); + STAILQ_REMOVE(&control_softc->fe_list, fe, ctl_frontend, links); + control_softc->num_frontends--; + mtx_unlock(&control_softc->ctl_lock); + + /* + * Call the frontend's shutdown routine. + */ + if (fe->shutdown != NULL) + fe->shutdown(); + return (0); +} + +int +ctl_port_register(struct ctl_port *port, int master_shelf) { struct ctl_io_pool *pool; int port_num; @@ -80,13 +133,13 @@ ctl_frontend_register(struct ctl_fronten port_num = ctl_ffz(&control_softc->ctl_port_mask, CTL_MAX_PORTS); if ((port_num == -1) || (ctl_set_mask(&control_softc->ctl_port_mask, port_num) == -1)) { - fe->targ_port = -1; + port->targ_port = -1; mtx_unlock(&control_softc->ctl_lock); return (1); } - control_softc->num_frontends++; - + control_softc->num_ports++; mtx_unlock(&control_softc->ctl_lock); + /* * We add 20 to whatever the caller requests, so he doesn't get * burned by queueing things back to the pending sense queue. In @@ -95,36 +148,30 @@ ctl_frontend_register(struct ctl_fronten * pending sense queue on the next command, whether or not it is * a REQUEST SENSE. */ - retval = ctl_pool_create(control_softc, - (fe->port_type != CTL_PORT_IOCTL) ? - CTL_POOL_FETD : CTL_POOL_IOCTL, - fe->num_requested_ctl_io + 20, &pool); + retval = ctl_pool_create(control_softc, CTL_POOL_FETD, + port->num_requested_ctl_io + 20, &pool); if (retval != 0) { - fe->targ_port = -1; + port->targ_port = -1; mtx_lock(&control_softc->ctl_lock); ctl_clear_mask(&control_softc->ctl_port_mask, port_num); mtx_unlock(&control_softc->ctl_lock); return (retval); } + port->ctl_pool_ref = pool; mtx_lock(&control_softc->ctl_lock); - - /* For now assume master shelf */ - //fe->targ_port = port_num; - fe->targ_port = port_num + (master_shelf!=0 ? 0 : CTL_MAX_PORTS); - fe->max_initiators = CTL_MAX_INIT_PER_PORT; - STAILQ_INSERT_TAIL(&control_softc->fe_list, fe, links); - control_softc->ctl_ports[port_num] = fe; - + port->targ_port = port_num + (master_shelf != 0 ? 0 : CTL_MAX_PORTS); + port->max_initiators = CTL_MAX_INIT_PER_PORT; + STAILQ_INSERT_TAIL(&port->frontend->port_list, port, fe_links); + STAILQ_INSERT_TAIL(&control_softc->port_list, port, links); + control_softc->ctl_ports[port_num] = port; mtx_unlock(&control_softc->ctl_lock); - fe->ctl_pool_ref = pool; - return (retval); } int -ctl_frontend_deregister(struct ctl_frontend *fe) +ctl_port_deregister(struct ctl_port *port) { struct ctl_io_pool *pool; int port_num; @@ -132,18 +179,19 @@ ctl_frontend_deregister(struct ctl_front retval = 0; - pool = (struct ctl_io_pool *)fe->ctl_pool_ref; + pool = (struct ctl_io_pool *)port->ctl_pool_ref; - if (fe->targ_port == -1) { + if (port->targ_port == -1) { retval = 1; goto bailout; } mtx_lock(&control_softc->ctl_lock); - STAILQ_REMOVE(&control_softc->fe_list, fe, ctl_frontend, links); - control_softc->num_frontends--; - port_num = (fe->targ_port < CTL_MAX_PORTS) ? fe->targ_port : - fe->targ_port - CTL_MAX_PORTS; + STAILQ_REMOVE(&control_softc->port_list, port, ctl_port, links); + STAILQ_REMOVE(&port->frontend->port_list, port, ctl_port, fe_links); + control_softc->num_ports--; + port_num = (port->targ_port < CTL_MAX_PORTS) ? port->targ_port : + port->targ_port - CTL_MAX_PORTS; ctl_clear_mask(&control_softc->ctl_port_mask, port_num); control_softc->ctl_ports[port_num] = NULL; mtx_unlock(&control_softc->ctl_lock); @@ -155,30 +203,30 @@ bailout: } void -ctl_frontend_set_wwns(struct ctl_frontend *fe, int wwnn_valid, uint64_t wwnn, +ctl_port_set_wwns(struct ctl_port *port, int wwnn_valid, uint64_t wwnn, int wwpn_valid, uint64_t wwpn) { if (wwnn_valid) - fe->wwnn = wwnn; + port->wwnn = wwnn; if (wwpn_valid) - fe->wwpn = wwpn; + port->wwpn = wwpn; } void -ctl_frontend_online(struct ctl_frontend *fe) +ctl_port_online(struct ctl_port *port) { - fe->port_online(fe->onoff_arg); + port->port_online(port->onoff_arg); /* XXX KDM need a lock here? */ - fe->status |= CTL_PORT_STATUS_ONLINE; + port->status |= CTL_PORT_STATUS_ONLINE; } void -ctl_frontend_offline(struct ctl_frontend *fe) +ctl_port_offline(struct ctl_port *port) { - fe->port_offline(fe->onoff_arg); + port->port_offline(port->onoff_arg); /* XXX KDM need a lock here? */ - fe->status &= ~CTL_PORT_STATUS_ONLINE; + port->status &= ~CTL_PORT_STATUS_ONLINE; } /* Modified: stable/10/sys/cam/ctl/ctl_frontend.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend.h Tue Jul 15 16:55:13 2014 (r268676) +++ stable/10/sys/cam/ctl/ctl_frontend.h Tue Jul 15 16:57:30 2014 (r268677) @@ -39,6 +39,8 @@ #ifndef _CTL_FRONTEND_H_ #define _CTL_FRONTEND_H_ +#define CTL_FE_NAME_LEN 32 + typedef enum { CTL_PORT_STATUS_NONE = 0x00, CTL_PORT_STATUS_ONLINE = 0x01, @@ -46,6 +48,8 @@ typedef enum { CTL_PORT_STATUS_LUN_ONLINE = 0x04 } ctl_port_status; +typedef int (*fe_init_t)(void); +typedef void (*fe_shutdown_t)(void); typedef void (*port_func_t)(void *onoff_arg); typedef int (*targ_func_t)(void *arg, struct ctl_id targ_id); typedef int (*lun_func_t)(void *arg, struct ctl_id targ_id, int lun_id); @@ -53,6 +57,31 @@ typedef int (*fe_ioctl_t)(struct cdev *d struct thread *td); typedef int (*fe_devid_t)(struct ctl_scsiio *ctsio, int alloc_len); +#define CTL_FRONTEND_DECLARE(name, driver) \ + static int name ## _modevent(module_t mod, int type, void *data) \ + { \ + switch (type) { \ + case MOD_LOAD: \ + ctl_frontend_register( \ + (struct ctl_frontend *)data); \ + break; \ + case MOD_UNLOAD: \ + printf(#name " module unload - not possible for this module type\n"); \ + return EINVAL; \ + default: \ + return EOPNOTSUPP; \ + } \ + return 0; \ + } \ + static moduledata_t name ## _mod = { \ + #name, \ + name ## _modevent, \ + (void *)&driver \ + }; \ + DECLARE_MODULE(name, name ## _mod, SI_SUB_CONFIGURE, SI_ORDER_FOURTH); \ + MODULE_DEPEND(name, ctl, 1, 1, 1); \ + MODULE_DEPEND(name, cam, 1, 1, 1) + /* * The ctl_frontend structure is the registration mechanism between a FETD * (Front End Target Driver) and the CTL layer. Here is a description of @@ -179,7 +208,8 @@ typedef int (*fe_devid_t)(struct ctl_scs * links: Linked list pointers, used by CTL. The FETD * shouldn't touch this field. */ -struct ctl_frontend { +struct ctl_port { + struct ctl_frontend *frontend; ctl_port_type port_type; /* passed to CTL */ int num_requested_ctl_io; /* passed to CTL */ char *port_name; /* passed to CTL */ @@ -190,12 +220,10 @@ struct ctl_frontend { void *onoff_arg; /* passed to CTL */ lun_func_t lun_enable; /* passed to CTL */ lun_func_t lun_disable; /* passed to CTL */ - fe_ioctl_t ioctl; /* passed to CTL */ fe_devid_t devid; /* passed to CTL */ void *targ_lun_arg; /* passed to CTL */ void (*fe_datamove)(union ctl_io *io); /* passed to CTL */ void (*fe_done)(union ctl_io *io); /* passed to CTL */ - void (*fe_dump)(void); /* passed to CTL */ int max_targets; /* passed to CTL */ int max_target_id; /* passed to CTL */ int32_t targ_port; /* passed back to FETD */ @@ -204,6 +232,17 @@ struct ctl_frontend { uint64_t wwnn; /* set by CTL before online */ uint64_t wwpn; /* set by CTL before online */ ctl_port_status status; /* used by CTL */ + STAILQ_ENTRY(ctl_port) fe_links; /* used by CTL */ + STAILQ_ENTRY(ctl_port) links; /* used by CTL */ +}; + +struct ctl_frontend { + char name[CTL_FE_NAME_LEN]; /* passed to CTL */ + fe_init_t init; /* passed to CTL */ + fe_ioctl_t ioctl; /* passed to CTL */ + void (*fe_dump)(void); /* passed to CTL */ + fe_shutdown_t shutdown; /* passed to CTL */ + STAILQ_HEAD(, ctl_port) port_list; /* used by CTL */ STAILQ_ENTRY(ctl_frontend) links; /* used by CTL */ }; @@ -211,7 +250,7 @@ struct ctl_frontend { * This may block until resources are allocated. Called at FETD module load * time. Returns 0 for success, non-zero for failure. */ -int ctl_frontend_register(struct ctl_frontend *fe, int master_SC); +int ctl_frontend_register(struct ctl_frontend *fe); /* * Called at FETD module unload time. @@ -220,20 +259,32 @@ int ctl_frontend_register(struct ctl_fro int ctl_frontend_deregister(struct ctl_frontend *fe); /* + * This may block until resources are allocated. Called at FETD module load + * time. Returns 0 for success, non-zero for failure. + */ +int ctl_port_register(struct ctl_port *fe, int master_SC); + +/* + * Called at FETD module unload time. + * Returns 0 for success, non-zero for failure. + */ +int ctl_port_deregister(struct ctl_port *fe); + +/* * Called to set the WWNN and WWPN for a particular frontend. */ -void ctl_frontend_set_wwns(struct ctl_frontend *fe, int wwnn_valid, +void ctl_port_set_wwns(struct ctl_port *port, int wwnn_valid, uint64_t wwnn, int wwpn_valid, uint64_t wwpn); /* * Called to bring a particular frontend online. */ -void ctl_frontend_online(struct ctl_frontend *fe); +void ctl_port_online(struct ctl_port *fe); /* * Called to take a particular frontend offline. */ -void ctl_frontend_offline(struct ctl_frontend *fe); +void ctl_port_offline(struct ctl_port *fe); /* * This routine queues I/O and task management requests from the FETD to the Modified: stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Tue Jul 15 16:55:13 2014 (r268676) +++ stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Tue Jul 15 16:57:30 2014 (r268677) @@ -74,13 +74,12 @@ struct cfcs_io { }; struct cfcs_softc { - struct ctl_frontend fe; + struct ctl_port port; char port_name[32]; struct cam_sim *sim; struct cam_devq *devq; struct cam_path *path; struct mtx lock; - char lock_desc[32]; uint64_t wwnn; uint64_t wwpn; uint32_t cur_tag_num; @@ -97,7 +96,6 @@ struct cfcs_softc { CAM_SENSE_PHYS) int cfcs_init(void); -void cfcs_shutdown(void); static void cfcs_poll(struct cam_sim *sim); static void cfcs_online(void *arg); static void cfcs_offline(void *arg); @@ -122,25 +120,19 @@ SYSCTL_NODE(_kern_cam, OID_AUTO, ctl2cam SYSCTL_INT(_kern_cam_ctl2cam, OID_AUTO, max_sense, CTLFLAG_RW, &cfcs_max_sense, 0, "Maximum sense data size"); -static int cfcs_module_event_handler(module_t, int /*modeventtype_t*/, void *); - -static moduledata_t cfcs_moduledata = { - "ctlcfcs", - cfcs_module_event_handler, - NULL +static struct ctl_frontend cfcs_frontend = +{ + .name = "camsim", + .init = cfcs_init, }; - -DECLARE_MODULE(ctlcfcs, cfcs_moduledata, SI_SUB_CONFIGURE, SI_ORDER_FOURTH); -MODULE_VERSION(ctlcfcs, 1); -MODULE_DEPEND(ctlcfi, ctl, 1, 1, 1); -MODULE_DEPEND(ctlcfi, cam, 1, 1, 1); +CTL_FRONTEND_DECLARE(ctlcfcs, cfcs_frontend); int cfcs_init(void) { struct cfcs_softc *softc; struct ccb_setasync csa; - struct ctl_frontend *fe; + struct ctl_port *port; #ifdef NEEDTOPORT char wwnn[8]; #endif @@ -149,32 +141,32 @@ cfcs_init(void) softc = &cfcs_softc; retval = 0; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 16:58:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A7CC4193; Tue, 15 Jul 2014 16:58:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92E7A2B8A; Tue, 15 Jul 2014 16:58:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FGwecc078400; Tue, 15 Jul 2014 16:58:40 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FGwd9i078393; Tue, 15 Jul 2014 16:58:39 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407151658.s6FGwd9i078393@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jul 2014 16:58:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268678 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 16:58:40 -0000 Author: mav Date: Tue Jul 15 16:58:38 2014 New Revision: 268678 URL: http://svnweb.freebsd.org/changeset/base/268678 Log: MFC r268280: Make options KPI more generic to allow it to be used for ports too, not only for LUNs. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl.h stable/10/sys/cam/ctl/ctl_backend.c stable/10/sys/cam/ctl/ctl_backend.h stable/10/sys/cam/ctl/ctl_backend_block.c stable/10/sys/cam/ctl/ctl_backend_ramdisk.c stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Tue Jul 15 16:57:30 2014 (r268677) +++ stable/10/sys/cam/ctl/ctl.c Tue Jul 15 16:58:38 2014 (r268678) @@ -2956,7 +2956,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, struct sbuf *sb; struct ctl_lun *lun; struct ctl_lun_list *list; - struct ctl_be_lun_option *opt; + struct ctl_option *opt; list = (struct ctl_lun_list *)addr; @@ -9582,7 +9582,8 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio */ desc->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_LUN | SVPD_ID_TYPE_T10; desc->length = sizeof(*t10id) + devid_len; - if (lun == NULL || (val = ctl_get_opt(lun->be_lun, "vendor")) == NULL) { + if (lun == NULL || (val = ctl_get_opt(&lun->be_lun->options, + "vendor")) == NULL) { strncpy((char *)t10id->vendor, CTL_VENDOR, sizeof(t10id->vendor)); } else { memset(t10id->vendor, ' ', sizeof(t10id->vendor)); @@ -9966,7 +9967,8 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio * We have 8 bytes for the vendor name, and 16 bytes for the device * name and 4 bytes for the revision. */ - if (lun == NULL || (val = ctl_get_opt(lun->be_lun, "vendor")) == NULL) { + if (lun == NULL || (val = ctl_get_opt(&lun->be_lun->options, + "vendor")) == NULL) { strcpy(inq_ptr->vendor, CTL_VENDOR); } else { memset(inq_ptr->vendor, ' ', sizeof(inq_ptr->vendor)); @@ -9975,7 +9977,7 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio } if (lun == NULL) { strcpy(inq_ptr->product, CTL_DIRECT_PRODUCT); - } else if ((val = ctl_get_opt(lun->be_lun, "product")) == NULL) { + } else if ((val = ctl_get_opt(&lun->be_lun->options, "product")) == NULL) { switch (lun->be_lun->lun_type) { case T_DIRECT: strcpy(inq_ptr->product, CTL_DIRECT_PRODUCT); @@ -9997,7 +9999,8 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio * XXX make this a macro somewhere so it automatically gets * incremented when we make changes. */ - if (lun == NULL || (val = ctl_get_opt(lun->be_lun, "revision")) == NULL) { + if (lun == NULL || (val = ctl_get_opt(&lun->be_lun->options, + "revision")) == NULL) { strncpy(inq_ptr->revision, "0001", sizeof(inq_ptr->revision)); } else { memset(inq_ptr->revision, ' ', sizeof(inq_ptr->revision)); Modified: stable/10/sys/cam/ctl/ctl.h ============================================================================== --- stable/10/sys/cam/ctl/ctl.h Tue Jul 15 16:57:30 2014 (r268677) +++ stable/10/sys/cam/ctl/ctl.h Tue Jul 15 16:58:38 2014 (r268678) @@ -186,6 +186,22 @@ void ctl_config_write_done(union ctl_io void ctl_portDB_changed(int portnum); void ctl_init_isc_msg(void); +/* + * KPI to manipulate LUN/port options + */ + +struct ctl_option { + STAILQ_ENTRY(ctl_option) links; + char *name; + char *value; +}; +typedef STAILQ_HEAD(ctl_options, ctl_option) ctl_options_t; + +struct ctl_be_arg; +void ctl_init_opts(ctl_options_t *opts, int num_args, struct ctl_be_arg *args); +void ctl_free_opts(ctl_options_t *opts); +char * ctl_get_opt(ctl_options_t *opts, const char *name); + #endif /* _KERNEL */ #endif /* _CTL_H_ */ Modified: stable/10/sys/cam/ctl/ctl_backend.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend.c Tue Jul 15 16:57:30 2014 (r268677) +++ stable/10/sys/cam/ctl/ctl_backend.c Tue Jul 15 16:58:38 2014 (r268678) @@ -174,29 +174,29 @@ ctl_backend_find(char *backend_name) } void -ctl_init_opts(struct ctl_be_lun *be_lun, struct ctl_lun_req *req) +ctl_init_opts(ctl_options_t *opts, int num_args, struct ctl_be_arg *args) { - struct ctl_be_lun_option *opt; + struct ctl_option *opt; int i; - STAILQ_INIT(&be_lun->options); - for (i = 0; i < req->num_be_args; i++) { + STAILQ_INIT(opts); + for (i = 0; i < num_args; i++) { opt = malloc(sizeof(*opt), M_CTL, M_WAITOK); - opt->name = malloc(strlen(req->kern_be_args[i].kname) + 1, M_CTL, M_WAITOK); - strcpy(opt->name, req->kern_be_args[i].kname); - opt->value = malloc(strlen(req->kern_be_args[i].kvalue) + 1, M_CTL, M_WAITOK); - strcpy(opt->value, req->kern_be_args[i].kvalue); - STAILQ_INSERT_TAIL(&be_lun->options, opt, links); + opt->name = malloc(strlen(args[i].kname) + 1, M_CTL, M_WAITOK); + strcpy(opt->name, args[i].kname); + opt->value = malloc(strlen(args[i].kvalue) + 1, M_CTL, M_WAITOK); + strcpy(opt->value, args[i].kvalue); + STAILQ_INSERT_TAIL(opts, opt, links); } } void -ctl_free_opts(struct ctl_be_lun *be_lun) +ctl_free_opts(ctl_options_t *opts) { - struct ctl_be_lun_option *opt; + struct ctl_option *opt; - while ((opt = STAILQ_FIRST(&be_lun->options)) != NULL) { - STAILQ_REMOVE_HEAD(&be_lun->options, links); + while ((opt = STAILQ_FIRST(opts)) != NULL) { + STAILQ_REMOVE_HEAD(opts, links); free(opt->name, M_CTL); free(opt->value, M_CTL); free(opt, M_CTL); @@ -204,11 +204,11 @@ ctl_free_opts(struct ctl_be_lun *be_lun) } char * -ctl_get_opt(struct ctl_be_lun *be_lun, const char *name) +ctl_get_opt(ctl_options_t *opts, const char *name) { - struct ctl_be_lun_option *opt; + struct ctl_option *opt; - STAILQ_FOREACH(opt, &be_lun->options, links) { + STAILQ_FOREACH(opt, opts, links) { if (strcmp(opt->name, name) == 0) { return (opt->value); } Modified: stable/10/sys/cam/ctl/ctl_backend.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend.h Tue Jul 15 16:57:30 2014 (r268677) +++ stable/10/sys/cam/ctl/ctl_backend.h Tue Jul 15 16:58:38 2014 (r268678) @@ -180,12 +180,6 @@ typedef void (*be_lun_config_t)(void *be * The links field is for CTL internal use only, and should not be used by * the backend. */ -struct ctl_be_lun_option { - STAILQ_ENTRY(ctl_be_lun_option) links; - char *name; - char *value; -}; - struct ctl_be_lun { uint8_t lun_type; /* passed to CTL */ ctl_backend_lun_flags flags; /* passed to CTL */ @@ -202,7 +196,7 @@ struct ctl_be_lun { be_lun_config_t lun_config_status; /* passed to CTL */ struct ctl_backend_driver *be; /* passed to CTL */ void *ctl_lun; /* used by CTL */ - STAILQ_HEAD(, ctl_be_lun_option) options; /* passed to CTL */ + ctl_options_t options; /* passed to CTL */ STAILQ_ENTRY(ctl_be_lun) links; /* used by CTL */ }; @@ -301,14 +295,6 @@ int ctl_lun_online(struct ctl_be_lun *be */ void ctl_lun_capacity_changed(struct ctl_be_lun *be_lun); -/* - * KPI to manipulate LUN options - */ -struct ctl_lun_req; -void ctl_init_opts(struct ctl_be_lun *be_lun, struct ctl_lun_req *req); -void ctl_free_opts(struct ctl_be_lun *be_lun); -char * ctl_get_opt(struct ctl_be_lun *be_lun, const char *name); - #endif /* _KERNEL */ #endif /* _CTL_BACKEND_H_ */ Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Tue Jul 15 16:57:30 2014 (r268677) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Tue Jul 15 16:58:38 2014 (r268678) @@ -1860,7 +1860,8 @@ ctl_be_block_create(struct ctl_be_block_ sprintf(be_lun->lunname, "cblk%d", softc->num_luns); mtx_init(&be_lun->io_lock, "cblk io lock", NULL, MTX_DEF); mtx_init(&be_lun->queue_lock, "cblk queue lock", NULL, MTX_DEF); - ctl_init_opts(&be_lun->ctl_be_lun, req); + ctl_init_opts(&be_lun->ctl_be_lun.options, + req->num_be_args, req->kern_be_args); be_lun->lun_zone = uma_zcreate(be_lun->lunname, CTLBLK_MAX_SEG, NULL, NULL, NULL, NULL, /*align*/ 0, /*flags*/0); @@ -1877,7 +1878,7 @@ ctl_be_block_create(struct ctl_be_block_ be_lun->ctl_be_lun.lun_type = T_DIRECT; if (be_lun->ctl_be_lun.lun_type == T_DIRECT) { - value = ctl_get_opt(&be_lun->ctl_be_lun, "file"); + value = ctl_get_opt(&be_lun->ctl_be_lun.options, "file"); if (value == NULL) { snprintf(req->error_str, sizeof(req->error_str), "%s: no file argument specified", __func__); @@ -1922,7 +1923,7 @@ ctl_be_block_create(struct ctl_be_block_ * XXX This searching loop might be refactored to be combined with * the loop above, */ - value = ctl_get_opt(&be_lun->ctl_be_lun, "num_threads"); + value = ctl_get_opt(&be_lun->ctl_be_lun.options, "num_threads"); if (value != NULL) { tmp_num_threads = strtol(value, NULL, 0); @@ -1940,7 +1941,7 @@ ctl_be_block_create(struct ctl_be_block_ num_threads = tmp_num_threads; } unmap = 0; - value = ctl_get_opt(&be_lun->ctl_be_lun, "unmap"); + value = ctl_get_opt(&be_lun->ctl_be_lun.options, "unmap"); if (value != NULL && strcmp(value, "on") == 0) unmap = 1; @@ -2105,7 +2106,7 @@ bailout_error: free(be_lun->dev_path, M_CTLBLK); if (be_lun->lun_zone != NULL) uma_zdestroy(be_lun->lun_zone); - ctl_free_opts(&be_lun->ctl_be_lun); + ctl_free_opts(&be_lun->ctl_be_lun.options); mtx_destroy(&be_lun->queue_lock); mtx_destroy(&be_lun->io_lock); free(be_lun, M_CTLBLK); @@ -2193,7 +2194,7 @@ ctl_be_block_rm(struct ctl_be_block_soft uma_zdestroy(be_lun->lun_zone); - ctl_free_opts(&be_lun->ctl_be_lun); + ctl_free_opts(&be_lun->ctl_be_lun.options); free(be_lun->dev_path, M_CTLBLK); mtx_destroy(&be_lun->queue_lock); mtx_destroy(&be_lun->io_lock); Modified: stable/10/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Tue Jul 15 16:57:30 2014 (r268677) +++ stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Tue Jul 15 16:58:38 2014 (r268678) @@ -505,7 +505,7 @@ ctl_backend_ramdisk_rm(struct ctl_be_ram if (retval == 0) { taskqueue_drain(be_lun->io_taskqueue, &be_lun->io_task); taskqueue_free(be_lun->io_taskqueue); - ctl_free_opts(&be_lun->ctl_be_lun); + ctl_free_opts(&be_lun->ctl_be_lun.options); mtx_destroy(&be_lun->queue_lock); free(be_lun, M_RAMDISK); } @@ -548,7 +548,8 @@ ctl_backend_ramdisk_create(struct ctl_be goto bailout_error; } sprintf(be_lun->lunname, "cram%d", softc->num_luns); - ctl_init_opts(&be_lun->ctl_be_lun, req); + ctl_init_opts(&be_lun->ctl_be_lun.options, + req->num_be_args, req->kern_be_args); if (params->flags & CTL_LUN_FLAG_DEV_TYPE) be_lun->ctl_be_lun.lun_type = params->device_type; @@ -586,7 +587,7 @@ ctl_backend_ramdisk_create(struct ctl_be be_lun->softc = softc; unmap = 0; - value = ctl_get_opt(&be_lun->ctl_be_lun, "unmap"); + value = ctl_get_opt(&be_lun->ctl_be_lun.options, "unmap"); if (value != NULL && strcmp(value, "on") == 0) unmap = 1; @@ -721,7 +722,7 @@ bailout_error: if (be_lun->io_taskqueue != NULL) { taskqueue_free(be_lun->io_taskqueue); } - ctl_free_opts(&be_lun->ctl_be_lun); + ctl_free_opts(&be_lun->ctl_be_lun.options); mtx_destroy(&be_lun->queue_lock); free(be_lun, M_RAMDISK); } Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Tue Jul 15 16:57:30 2014 (r268677) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Tue Jul 15 16:58:38 2014 (r268678) @@ -2110,7 +2110,8 @@ cfiscsi_devid(struct ctl_scsiio *ctsio, desc->proto_codeset = (SCSI_PROTO_ISCSI << 4) | SVPD_ID_CODESET_ASCII; desc->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_LUN | SVPD_ID_TYPE_T10; desc->length = sizeof(*t10id) + devid_len; - if (lun == NULL || (val = ctl_get_opt(lun->be_lun, "vendor")) == NULL) { + if (lun == NULL || (val = ctl_get_opt(&lun->be_lun->options, + "vendor")) == NULL) { strncpy((char *)t10id->vendor, CTL_VENDOR, sizeof(t10id->vendor)); } else { memset(t10id->vendor, ' ', sizeof(t10id->vendor)); @@ -2370,11 +2371,11 @@ cfiscsi_lun_enable(void *arg, struct ctl softc = (struct cfiscsi_softc *)arg; - target = ctl_get_opt(control_softc->ctl_luns[lun_id]->be_lun, + target = ctl_get_opt(&control_softc->ctl_luns[lun_id]->be_lun->options, "cfiscsi_target"); - target_alias = ctl_get_opt(control_softc->ctl_luns[lun_id]->be_lun, + target_alias = ctl_get_opt(&control_softc->ctl_luns[lun_id]->be_lun->options, "cfiscsi_target_alias"); - lun = ctl_get_opt(control_softc->ctl_luns[lun_id]->be_lun, + lun = ctl_get_opt(&control_softc->ctl_luns[lun_id]->be_lun->options, "cfiscsi_lun"); if (target == NULL && lun == NULL) From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 16:59:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 141212D5; Tue, 15 Jul 2014 16:59:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F379F2B93; Tue, 15 Jul 2014 16:59:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FGxkEh078621; Tue, 15 Jul 2014 16:59:46 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FGxkCk078617; Tue, 15 Jul 2014 16:59:46 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407151659.s6FGxkCk078617@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jul 2014 16:59:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268679 - in stable/10: sys/cam/ctl usr.sbin/ctladm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 16:59:47 -0000 Author: mav Date: Tue Jul 15 16:59:46 2014 New Revision: 268679 URL: http://svnweb.freebsd.org/changeset/base/268679 Log: MFC r268284: Introduce new IOCTL CTL_PORT_LIST reporting in more flexible XML format. Leave old CTL_GET_PORT_LIST in place so far. Garbage-collect it later. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_ioctl.h stable/10/usr.sbin/ctladm/ctladm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Tue Jul 15 16:58:38 2014 (r268678) +++ stable/10/sys/cam/ctl/ctl.c Tue Jul 15 16:59:46 2014 (r268679) @@ -3140,6 +3140,104 @@ ctl_ioctl(struct cdev *dev, u_long cmd, retval = fe->ioctl(dev, cmd, addr, flag, td); break; } + case CTL_PORT_LIST: { + struct sbuf *sb; + struct ctl_port *port; + struct ctl_lun_list *list; +// struct ctl_option *opt; + + list = (struct ctl_lun_list *)addr; + + sb = sbuf_new(NULL, NULL, list->alloc_len, SBUF_FIXEDLEN); + if (sb == NULL) { + list->status = CTL_LUN_LIST_ERROR; + snprintf(list->error_str, sizeof(list->error_str), + "Unable to allocate %d bytes for LUN list", + list->alloc_len); + break; + } + + sbuf_printf(sb, "\n"); + + mtx_lock(&softc->ctl_lock); + STAILQ_FOREACH(port, &softc->port_list, links) { + retval = sbuf_printf(sb, "\n", + (uintmax_t)port->targ_port); + + /* + * Bail out as soon as we see that we've overfilled + * the buffer. + */ + if (retval != 0) + break; + + retval = sbuf_printf(sb, "\t%s" + "\n", port->frontend->name); + if (retval != 0) + break; + + retval = sbuf_printf(sb, "\t%d\n", + port->port_type); + if (retval != 0) + break; + + retval = sbuf_printf(sb, "\t%s\n", + (port->status & CTL_PORT_STATUS_ONLINE) ? "YES" : "NO"); + if (retval != 0) + break; + + retval = sbuf_printf(sb, "\t%s\n", + port->port_name); + if (retval != 0) + break; + + retval = sbuf_printf(sb, "\t%d\n", + port->physical_port); + if (retval != 0) + break; + + retval = sbuf_printf(sb, "\t%d\n", + port->virtual_port); + if (retval != 0) + break; + + retval = sbuf_printf(sb, "\t%#jx\n", + (uintmax_t)port->wwnn); + if (retval != 0) + break; + + retval = sbuf_printf(sb, "\t%#jx\n", + (uintmax_t)port->wwpn); + if (retval != 0) + break; + + retval = sbuf_printf(sb, "\n"); + if (retval != 0) + break; + } + mtx_unlock(&softc->ctl_lock); + + if ((retval != 0) + || ((retval = sbuf_printf(sb, "\n")) != 0)) { + retval = 0; + sbuf_delete(sb); + list->status = CTL_LUN_LIST_NEED_MORE_SPACE; + snprintf(list->error_str, sizeof(list->error_str), + "Out of space, %d bytes is too small", + list->alloc_len); + break; + } + + sbuf_finish(sb); + + retval = copyout(sbuf_data(sb), list->lun_xml, + sbuf_len(sb) + 1); + + list->fill_len = sbuf_len(sb) + 1; + list->status = CTL_LUN_LIST_OK; + sbuf_delete(sb); + break; + } default: { /* XXX KDM should we fix this? */ #if 0 Modified: stable/10/sys/cam/ctl/ctl_ioctl.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_ioctl.h Tue Jul 15 16:58:38 2014 (r268678) +++ stable/10/sys/cam/ctl/ctl_ioctl.h Tue Jul 15 16:59:46 2014 (r268679) @@ -789,6 +789,7 @@ struct ctl_iscsi { #define CTL_ERROR_INJECT_DELETE _IOW(CTL_MINOR, 0x23, struct ctl_error_desc) #define CTL_SET_PORT_WWNS _IOW(CTL_MINOR, 0x24, struct ctl_port_entry) #define CTL_ISCSI _IOWR(CTL_MINOR, 0x25, struct ctl_iscsi) +#define CTL_PORT_LIST _IOWR(CTL_MINOR, 0x26, struct ctl_lun_list) #endif /* _CTL_IOCTL_H_ */ Modified: stable/10/usr.sbin/ctladm/ctladm.c ============================================================================== --- stable/10/usr.sbin/ctladm/ctladm.c Tue Jul 15 16:58:38 2014 (r268678) +++ stable/10/usr.sbin/ctladm/ctladm.c Tue Jul 15 16:59:46 2014 (r268679) @@ -95,6 +95,7 @@ typedef enum { CTLADM_CMD_READ, CTLADM_CMD_WRITE, CTLADM_CMD_PORT, + CTLADM_CMD_PORTLIST, CTLADM_CMD_READCAPACITY, CTLADM_CMD_MODESENSE, CTLADM_CMD_DUMPOOA, @@ -190,6 +191,7 @@ static struct ctladm_opts option_table[] {"modesense", CTLADM_CMD_MODESENSE, CTLADM_ARG_NEED_TL, "P:S:dlm:c:"}, {"modify", CTLADM_CMD_MODIFY, CTLADM_ARG_NONE, "b:l:s:"}, {"port", CTLADM_CMD_PORT, CTLADM_ARG_NONE, "lo:p:qt:w:W:x"}, + {"portlist", CTLADM_CMD_PORTLIST, CTLADM_ARG_NONE, "f:vx"}, {"prin", CTLADM_CMD_PRES_IN, CTLADM_ARG_NEED_TL, "a:"}, {"prout", CTLADM_CMD_PRES_OUT, CTLADM_ARG_NEED_TL, "a:k:r:s:"}, {"read", CTLADM_CMD_READ, CTLADM_ARG_NEED_TL, rw_opts}, @@ -4073,6 +4075,269 @@ bailout: return (retval); } +/* + * Port information. + */ +struct cctl_port { + uint64_t port_id; + char *online; + char *frontend_type; + char *name; + int pp, vp; + char *wwnn, *wwpn; + STAILQ_HEAD(,cctl_lun_nv) attr_list; + STAILQ_ENTRY(cctl_port) links; +}; + +struct cctl_portlist_data { + int num_ports; + STAILQ_HEAD(,cctl_port) port_list; + struct cctl_port *cur_port; + int level; + struct sbuf *cur_sb[32]; +}; + +static void +cctl_start_pelement(void *user_data, const char *name, const char **attr) +{ + int i; + struct cctl_portlist_data *portlist; + struct cctl_port *cur_port; + + portlist = (struct cctl_portlist_data *)user_data; + cur_port = portlist->cur_port; + portlist->level++; + if ((u_int)portlist->level >= (sizeof(portlist->cur_sb) / + sizeof(portlist->cur_sb[0]))) + errx(1, "%s: too many nesting levels, %zd max", __func__, + sizeof(portlist->cur_sb) / sizeof(portlist->cur_sb[0])); + + portlist->cur_sb[portlist->level] = sbuf_new_auto(); + if (portlist->cur_sb[portlist->level] == NULL) + err(1, "%s: Unable to allocate sbuf", __func__); + + if (strcmp(name, "targ_port") == 0) { + if (cur_port != NULL) + errx(1, "%s: improper port element nesting", __func__); + + cur_port = calloc(1, sizeof(*cur_port)); + if (cur_port == NULL) + err(1, "%s: cannot allocate %zd bytes", __func__, + sizeof(*cur_port)); + + portlist->num_ports++; + portlist->cur_port = cur_port; + + STAILQ_INIT(&cur_port->attr_list); + STAILQ_INSERT_TAIL(&portlist->port_list, cur_port, links); + + for (i = 0; attr[i] != NULL; i += 2) { + if (strcmp(attr[i], "id") == 0) { + cur_port->port_id = strtoull(attr[i+1], NULL, 0); + } else { + errx(1, "%s: invalid LUN attribute %s = %s", + __func__, attr[i], attr[i+1]); + } + } + } +} + +static void +cctl_end_pelement(void *user_data, const char *name) +{ + struct cctl_portlist_data *portlist; + struct cctl_port *cur_port; + char *str; + + portlist = (struct cctl_portlist_data *)user_data; + cur_port = portlist->cur_port; + + if ((cur_port == NULL) + && (strcmp(name, "ctlportlist") != 0)) + errx(1, "%s: cur_port == NULL! (name = %s)", __func__, name); + + if (portlist->cur_sb[portlist->level] == NULL) + errx(1, "%s: no valid sbuf at level %d (name %s)", __func__, + portlist->level, name); + + if (sbuf_finish(portlist->cur_sb[portlist->level]) != 0) + err(1, "%s: sbuf_finish", __func__); + str = strdup(sbuf_data(portlist->cur_sb[portlist->level])); + if (str == NULL) + err(1, "%s can't allocate %zd bytes for string", __func__, + sbuf_len(portlist->cur_sb[portlist->level])); + + if (strlen(str) == 0) { + free(str); + str = NULL; + } + + sbuf_delete(portlist->cur_sb[portlist->level]); + portlist->cur_sb[portlist->level] = NULL; + portlist->level--; + + if (strcmp(name, "frontend_type") == 0) { + cur_port->frontend_type = str; + str = NULL; + } else if (strcmp(name, "port_name") == 0) { + cur_port->name = str; + str = NULL; + } else if (strcmp(name, "online") == 0) { + cur_port->online = str; + str = NULL; + } else if (strcmp(name, "physical_port") == 0) { + cur_port->pp = strtoull(str, NULL, 0); + } else if (strcmp(name, "virtual_port") == 0) { + cur_port->pp = strtoull(str, NULL, 0); + } else if (strcmp(name, "wwnn") == 0) { + cur_port->wwnn = str; + str = NULL; + } else if (strcmp(name, "wwpn") == 0) { + cur_port->wwpn = str; + str = NULL; + } else if (strcmp(name, "targ_port") == 0) { + portlist->cur_port = NULL; + } else if (strcmp(name, "ctlportlist") == 0) { + + } else { + struct cctl_lun_nv *nv; + + nv = calloc(1, sizeof(*nv)); + if (nv == NULL) + err(1, "%s: can't allocate %zd bytes for nv pair", + __func__, sizeof(*nv)); + + nv->name = strdup(name); + if (nv->name == NULL) + err(1, "%s: can't allocated %zd bytes for string", + __func__, strlen(name)); + + nv->value = str; + str = NULL; + STAILQ_INSERT_TAIL(&cur_port->attr_list, nv, links); + } + + free(str); +} + +static void +cctl_char_phandler(void *user_data, const XML_Char *str, int len) +{ + struct cctl_portlist_data *portlist; + + portlist = (struct cctl_portlist_data *)user_data; + + sbuf_bcat(portlist->cur_sb[portlist->level], str, len); +} + +static int +cctl_portlist(int fd, int argc, char **argv, char *combinedopt) +{ + struct ctl_lun_list list; + struct cctl_portlist_data portlist; + struct cctl_port *port; + XML_Parser parser; + char *port_str; + int port_len; + int dump_xml = 0; + int retval, c; + char *frontend = NULL; + int verbose = 0; + + retval = 0; + port_len = 4096; + + bzero(&portlist, sizeof(portlist)); + STAILQ_INIT(&portlist.port_list); + + while ((c = getopt(argc, argv, combinedopt)) != -1) { + switch (c) { + case 'f': + frontend = strdup(optarg); + break; + case 'v': + verbose++; + break; + case 'x': + dump_xml = 1; + break; + default: + break; + } + } + +retry: + port_str = malloc(port_len); + + bzero(&list, sizeof(list)); + list.alloc_len = port_len; + list.status = CTL_LUN_LIST_NONE; + list.lun_xml = port_str; + + if (ioctl(fd, CTL_PORT_LIST, &list) == -1) { + warn("%s: error issuing CTL_PORT_LIST ioctl", __func__); + retval = 1; + goto bailout; + } + + if (list.status == CTL_LUN_LIST_ERROR) { + warnx("%s: error returned from CTL_PORT_LIST ioctl:\n%s", + __func__, list.error_str); + } else if (list.status == CTL_LUN_LIST_NEED_MORE_SPACE) { + port_len = port_len << 1; + goto retry; + } + + if (dump_xml != 0) { + printf("%s", port_str); + goto bailout; + } + + parser = XML_ParserCreate(NULL); + if (parser == NULL) { + warn("%s: Unable to create XML parser", __func__); + retval = 1; + goto bailout; + } + + XML_SetUserData(parser, &portlist); + XML_SetElementHandler(parser, cctl_start_pelement, cctl_end_pelement); + XML_SetCharacterDataHandler(parser, cctl_char_phandler); + + retval = XML_Parse(parser, port_str, strlen(port_str), 1); + XML_ParserFree(parser); + if (retval != 1) { + retval = 1; + goto bailout; + } + + printf("Port Online Frontend %-12s pp vp %-18s %-18s\n", + "Name", "WWNN", "WWPN"); + STAILQ_FOREACH(port, &portlist.port_list, links) { + struct cctl_lun_nv *nv; + + if ((frontend != NULL) + && (strcmp(port->frontend_type, frontend) != 0)) + continue; + + printf("%-4ju %-6s %-8s %-12s %-2d %-2d %-18s %-18s\n", + (uintmax_t)port->port_id, port->online, + port->frontend_type, port->name, port->pp, port->vp, + port->wwnn, port->wwpn); + + if (verbose == 0) + continue; + + STAILQ_FOREACH(nv, &port->attr_list, links) { + printf(" %s=%s\n", nv->name, nv->value); + } + } +bailout: + free(port_str); + + return (retval); +} + void usage(int error) { @@ -4104,7 +4369,7 @@ usage(int error) " [-S serial_num] [-t dev_type]\n" " ctladm remove <-b backend> <-l lun_id> [-o name=value]\n" " ctladm modify <-b backend> <-l lun_id> <-s size_bytes>\n" -" ctladm devlist [-b][-v][-x]\n" +" ctladm devlist [-b backend] [-v] [-x]\n" " ctladm shutdown\n" " ctladm startup\n" " ctladm hardstop\n" @@ -4120,6 +4385,7 @@ usage(int error) " [-s len fmt [args]] [-c] [-d delete_id]\n" " ctladm port <-l | -o | [-w wwnn][-W wwpn]>\n" " [-p targ_port] [-t port_type] [-q] [-x]\n" +" ctladm portlist [-f frontend] [-v] [-x]\n" " ctladm islist [-v | -x]\n" " ctladm islogout <-a | -c connection-id | -i name | -p portal>\n" " ctladm isterminate <-a | -c connection-id | -i name | -p portal>\n" @@ -4429,6 +4695,9 @@ main(int argc, char **argv) case CTLADM_CMD_PORT: retval = cctl_port(fd, argc, argv, combinedopt); break; + case CTLADM_CMD_PORTLIST: + retval = cctl_portlist(fd, argc, argv, combinedopt); + break; case CTLADM_CMD_READCAPACITY: retval = cctl_read_capacity(fd, target, lun, initid, retries, argc, argv, combinedopt); From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 17:00:42 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 59C6541E; Tue, 15 Jul 2014 17:00:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2BC362C08; Tue, 15 Jul 2014 17:00:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FH0glH081542; Tue, 15 Jul 2014 17:00:42 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FH0fwJ081537; Tue, 15 Jul 2014 17:00:41 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407151700.s6FH0fwJ081537@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jul 2014 17:00:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268680 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 17:00:42 -0000 Author: mav Date: Tue Jul 15 17:00:41 2014 New Revision: 268680 URL: http://svnweb.freebsd.org/changeset/base/268680 Log: MFC r268287: Implement and use ctl_frontend_find(). Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_frontend.c stable/10/sys/cam/ctl/ctl_frontend.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Tue Jul 15 16:59:46 2014 (r268679) +++ stable/10/sys/cam/ctl/ctl.c Tue Jul 15 17:00:41 2014 (r268680) @@ -3123,13 +3123,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, ci = (struct ctl_iscsi *)addr; - mtx_lock(&softc->ctl_lock); - STAILQ_FOREACH(fe, &softc->fe_list, links) { - if (strcmp(fe->name, "iscsi") == 0) - break; - } - mtx_unlock(&softc->ctl_lock); - + fe = ctl_frontend_find("iscsi"); if (fe == NULL) { ci->status = CTL_ISCSI_ERROR; snprintf(ci->error_str, sizeof(ci->error_str), Modified: stable/10/sys/cam/ctl/ctl_frontend.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend.c Tue Jul 15 16:59:46 2014 (r268679) +++ stable/10/sys/cam/ctl/ctl_frontend.c Tue Jul 15 17:00:41 2014 (r268680) @@ -118,6 +118,23 @@ ctl_frontend_deregister(struct ctl_front return (0); } +struct ctl_frontend * +ctl_frontend_find(char *frontend_name) +{ + struct ctl_softc *ctl_softc = control_softc; + struct ctl_frontend *fe; + + mtx_lock(&ctl_softc->ctl_lock); + STAILQ_FOREACH(fe, &ctl_softc->fe_list, links) { + if (strcmp(fe->name, frontend_name) == 0) { + mtx_unlock(&ctl_softc->ctl_lock); + return (fe); + } + } + mtx_unlock(&ctl_softc->ctl_lock); + return (NULL); +} + int ctl_port_register(struct ctl_port *port, int master_shelf) { Modified: stable/10/sys/cam/ctl/ctl_frontend.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend.h Tue Jul 15 16:59:46 2014 (r268679) +++ stable/10/sys/cam/ctl/ctl_frontend.h Tue Jul 15 17:00:41 2014 (r268680) @@ -259,6 +259,11 @@ int ctl_frontend_register(struct ctl_fro int ctl_frontend_deregister(struct ctl_frontend *fe); /* + * Find the frontend by its name. Returns NULL if not found. + */ +struct ctl_frontend * ctl_frontend_find(char *frontend_name); + +/* * This may block until resources are allocated. Called at FETD module load * time. Returns 0 for success, non-zero for failure. */ From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 17:01:40 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1DCC63B; Tue, 15 Jul 2014 17:01:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D9DB2C19; Tue, 15 Jul 2014 17:01:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FH1eRx082613; Tue, 15 Jul 2014 17:01:40 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FH1eqG082608; Tue, 15 Jul 2014 17:01:40 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407151701.s6FH1eqG082608@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jul 2014 17:01:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268681 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 17:01:40 -0000 Author: mav Date: Tue Jul 15 17:01:39 2014 New Revision: 268681 URL: http://svnweb.freebsd.org/changeset/base/268681 Log: MFC r268288: Improve CTL_BEARG_* flags support, including optional values copyout. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_backend.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Tue Jul 15 17:00:41 2014 (r268680) +++ stable/10/sys/cam/ctl/ctl.c Tue Jul 15 17:01:39 2014 (r268681) @@ -2015,40 +2015,40 @@ ctl_copyin_alloc(void *user_addr, int le } static void -ctl_free_args(int num_be_args, struct ctl_be_arg *be_args) +ctl_free_args(int num_args, struct ctl_be_arg *args) { int i; - if (be_args == NULL) + if (args == NULL) return; - for (i = 0; i < num_be_args; i++) { - free(be_args[i].kname, M_CTL); - free(be_args[i].kvalue, M_CTL); + for (i = 0; i < num_args; i++) { + free(args[i].kname, M_CTL); + free(args[i].kvalue, M_CTL); } - free(be_args, M_CTL); + free(args, M_CTL); } static struct ctl_be_arg * -ctl_copyin_args(int num_be_args, struct ctl_be_arg *be_args, +ctl_copyin_args(int num_args, struct ctl_be_arg *uargs, char *error_str, size_t error_str_len) { struct ctl_be_arg *args; int i; - args = ctl_copyin_alloc(be_args, num_be_args * sizeof(*be_args), + args = ctl_copyin_alloc(uargs, num_args * sizeof(*args), error_str, error_str_len); if (args == NULL) goto bailout; - for (i = 0; i < num_be_args; i++) { + for (i = 0; i < num_args; i++) { args[i].kname = NULL; args[i].kvalue = NULL; } - for (i = 0; i < num_be_args; i++) { + for (i = 0; i < num_args; i++) { uint8_t *tmpptr; args[i].kname = ctl_copyin_alloc(args[i].name, @@ -2062,31 +2062,43 @@ ctl_copyin_args(int num_be_args, struct goto bailout; } - args[i].kvalue = NULL; - - tmpptr = ctl_copyin_alloc(args[i].value, - args[i].vallen, error_str, error_str_len); - if (tmpptr == NULL) - goto bailout; - - args[i].kvalue = tmpptr; - - if ((args[i].flags & CTL_BEARG_ASCII) - && (tmpptr[args[i].vallen - 1] != '\0')) { - snprintf(error_str, error_str_len, "Argument %d " - "value is not NUL-terminated", i); - goto bailout; + if (args[i].flags & CTL_BEARG_RD) { + tmpptr = ctl_copyin_alloc(args[i].value, + args[i].vallen, error_str, error_str_len); + if (tmpptr == NULL) + goto bailout; + if ((args[i].flags & CTL_BEARG_ASCII) + && (tmpptr[args[i].vallen - 1] != '\0')) { + snprintf(error_str, error_str_len, "Argument " + "%d value is not NUL-terminated", i); + goto bailout; + } + args[i].kvalue = tmpptr; + } else { + args[i].kvalue = malloc(args[i].vallen, + M_CTL, M_WAITOK | M_ZERO); } } return (args); bailout: - ctl_free_args(num_be_args, args); + ctl_free_args(num_args, args); return (NULL); } +static void +ctl_copyout_args(int num_args, struct ctl_be_arg *args) +{ + int i; + + for (i = 0; i < num_args; i++) { + if (args[i].flags & CTL_BEARG_WR) + copyout(args[i].kvalue, args[i].value, args[i].vallen); + } +} + /* * Escape characters that are illegal or not recommended in XML. */ @@ -2947,6 +2959,8 @@ ctl_ioctl(struct cdev *dev, u_long cmd, retval = backend->ioctl(dev, cmd, addr, flag, td); if (lun_req->num_be_args > 0) { + ctl_copyout_args(lun_req->num_be_args, + lun_req->kern_be_args); ctl_free_args(lun_req->num_be_args, lun_req->kern_be_args); } Modified: stable/10/sys/cam/ctl/ctl_backend.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend.c Tue Jul 15 17:00:41 2014 (r268680) +++ stable/10/sys/cam/ctl/ctl_backend.c Tue Jul 15 17:01:39 2014 (r268681) @@ -181,6 +181,10 @@ ctl_init_opts(ctl_options_t *opts, int n STAILQ_INIT(opts); for (i = 0; i < num_args; i++) { + if ((args[i].flags & CTL_BEARG_RD) == 0) + continue; + if ((args[i].flags & CTL_BEARG_ASCII) == 0) + continue; opt = malloc(sizeof(*opt), M_CTL, M_WAITOK); opt->name = malloc(strlen(args[i].kname) + 1, M_CTL, M_WAITOK); strcpy(opt->name, args[i].kname); From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 17:05:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 50C53B3E; Tue, 15 Jul 2014 17:05:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BA812C63; Tue, 15 Jul 2014 17:05:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FH5EHW083560; Tue, 15 Jul 2014 17:05:14 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FH5CxF083536; Tue, 15 Jul 2014 17:05:12 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407151705.s6FH5CxF083536@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jul 2014 17:05:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268682 - in stable/10: sys/cam/ctl usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 17:05:14 -0000 Author: mav Date: Tue Jul 15 17:05:11 2014 New Revision: 268682 URL: http://svnweb.freebsd.org/changeset/base/268682 Log: MFC r268291: Create separate CTL port for every iSCSI target (and maybe portal group). Having single port for all iSCSI connections makes problematic implementing some more advanced SCSI functionality in CTL, that require proper ports enumeration and identification. This change extends CTL iSCSI API, making ctld daemon to control list of iSCSI ports in CTL. When new target is defined in config fine, ctld will create respective port in CTL. When target is removed -- port will be also removed after all active commands through that port properly aborted. This change require ctld to be rebuilt to match the kernel. As a minor side effect, this allows to have iSCSI targets without LUNs. While that may look odd and not very useful, that is not incorrect. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl.h stable/10/sys/cam/ctl/ctl_frontend.c stable/10/sys/cam/ctl/ctl_frontend.h stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/sys/cam/ctl/ctl_frontend_iscsi.h stable/10/sys/cam/ctl/ctl_ioctl.h stable/10/usr.sbin/ctld/ctld.c stable/10/usr.sbin/ctld/ctld.h stable/10/usr.sbin/ctld/kernel.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Tue Jul 15 17:01:39 2014 (r268681) +++ stable/10/sys/cam/ctl/ctl.c Tue Jul 15 17:05:11 2014 (r268682) @@ -3148,11 +3148,41 @@ ctl_ioctl(struct cdev *dev, u_long cmd, retval = fe->ioctl(dev, cmd, addr, flag, td); break; } + case CTL_PORT_REQ: { + struct ctl_req *req; + struct ctl_frontend *fe; + + req = (struct ctl_req *)addr; + + fe = ctl_frontend_find(req->driver); + if (fe == NULL) { + req->status = CTL_LUN_ERROR; + snprintf(req->error_str, sizeof(req->error_str), + "Frontend \"%s\" not found.", req->driver); + break; + } + if (req->num_args > 0) { + req->kern_args = ctl_copyin_args(req->num_args, + req->args, req->error_str, sizeof(req->error_str)); + if (req->kern_args == NULL) { + req->status = CTL_LUN_ERROR; + break; + } + } + + retval = fe->ioctl(dev, cmd, addr, flag, td); + + if (req->num_args > 0) { + ctl_copyout_args(req->num_args, req->kern_args); + ctl_free_args(req->num_args, req->kern_args); + } + break; + } case CTL_PORT_LIST: { struct sbuf *sb; struct ctl_port *port; struct ctl_lun_list *list; -// struct ctl_option *opt; + struct ctl_option *opt; list = (struct ctl_lun_list *)addr; @@ -3219,6 +3249,13 @@ ctl_ioctl(struct cdev *dev, u_long cmd, if (retval != 0) break; + STAILQ_FOREACH(opt, &port->options, links) { + retval = sbuf_printf(sb, "\t<%s>%s\n", + opt->name, opt->value, opt->name); + if (retval != 0) + break; + } + retval = sbuf_printf(sb, "\n"); if (retval != 0) break; Modified: stable/10/sys/cam/ctl/ctl.h ============================================================================== --- stable/10/sys/cam/ctl/ctl.h Tue Jul 15 17:01:39 2014 (r268681) +++ stable/10/sys/cam/ctl/ctl.h Tue Jul 15 17:05:11 2014 (r268682) @@ -103,6 +103,8 @@ union ctl_modepage_info { */ #define CTL_WWPN_LEN 8 +#define CTL_DRIVER_NAME_LEN 32 + /* * Unit attention types. ASC/ASCQ values for these should be placed in * ctl_build_ua. These are also listed in order of reporting priority. Modified: stable/10/sys/cam/ctl/ctl_frontend.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend.c Tue Jul 15 17:01:39 2014 (r268681) +++ stable/10/sys/cam/ctl/ctl_frontend.c Tue Jul 15 17:05:11 2014 (r268682) @@ -176,6 +176,9 @@ ctl_port_register(struct ctl_port *port, } port->ctl_pool_ref = pool; + if (port->options.stqh_first == NULL) + STAILQ_INIT(&port->options); + mtx_lock(&control_softc->ctl_lock); port->targ_port = port_num + (master_shelf != 0 ? 0 : CTL_MAX_PORTS); port->max_initiators = CTL_MAX_INIT_PER_PORT; @@ -214,6 +217,7 @@ ctl_port_deregister(struct ctl_port *por mtx_unlock(&control_softc->ctl_lock); ctl_pool_free(pool); + ctl_free_opts(&port->options); bailout: return (retval); Modified: stable/10/sys/cam/ctl/ctl_frontend.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend.h Tue Jul 15 17:01:39 2014 (r268681) +++ stable/10/sys/cam/ctl/ctl_frontend.h Tue Jul 15 17:05:11 2014 (r268682) @@ -39,8 +39,6 @@ #ifndef _CTL_FRONTEND_H_ #define _CTL_FRONTEND_H_ -#define CTL_FE_NAME_LEN 32 - typedef enum { CTL_PORT_STATUS_NONE = 0x00, CTL_PORT_STATUS_ONLINE = 0x01, @@ -232,12 +230,13 @@ struct ctl_port { uint64_t wwnn; /* set by CTL before online */ uint64_t wwpn; /* set by CTL before online */ ctl_port_status status; /* used by CTL */ + ctl_options_t options; /* passed to CTL */ STAILQ_ENTRY(ctl_port) fe_links; /* used by CTL */ STAILQ_ENTRY(ctl_port) links; /* used by CTL */ }; struct ctl_frontend { - char name[CTL_FE_NAME_LEN]; /* passed to CTL */ + char name[CTL_DRIVER_NAME_LEN]; /* passed to CTL */ fe_init_t init; /* passed to CTL */ fe_ioctl_t ioctl; /* passed to CTL */ void (*fe_dump)(void); /* passed to CTL */ Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Tue Jul 15 17:01:39 2014 (r268681) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Tue Jul 15 17:05:11 2014 (r268682) @@ -168,6 +168,8 @@ static void cfiscsi_pdu_handle_logout_re static void cfiscsi_session_terminate(struct cfiscsi_session *cs); static struct cfiscsi_target *cfiscsi_target_find(struct cfiscsi_softc *softc, const char *name); +static struct cfiscsi_target *cfiscsi_target_find_or_create( + struct cfiscsi_softc *softc, const char *name, const char *alias); static void cfiscsi_target_release(struct cfiscsi_target *ct); static void cfiscsi_session_delete(struct cfiscsi_session *cs); @@ -540,7 +542,7 @@ cfiscsi_pdu_handle_scsi_command(struct i cfiscsi_session_terminate(cs); return; } - io = ctl_alloc_io(cs->cs_target->ct_softc->port.ctl_pool_ref); + io = ctl_alloc_io(cs->cs_target->ct_port.ctl_pool_ref); if (io == NULL) { CFISCSI_SESSION_WARN(cs, "can't allocate ctl_io; " "dropping connection"); @@ -552,7 +554,7 @@ cfiscsi_pdu_handle_scsi_command(struct i io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = request; io->io_hdr.io_type = CTL_IO_SCSI; io->io_hdr.nexus.initid.id = cs->cs_ctl_initid; - io->io_hdr.nexus.targ_port = cs->cs_target->ct_softc->port.targ_port; + io->io_hdr.nexus.targ_port = cs->cs_target->ct_port.targ_port; io->io_hdr.nexus.targ_target.id = 0; io->io_hdr.nexus.targ_lun = cfiscsi_decode_lun(bhssc->bhssc_lun); io->io_hdr.nexus.lun_map_fn = cfiscsi_map_lun; @@ -606,7 +608,7 @@ cfiscsi_pdu_handle_task_request(struct i cs = PDU_SESSION(request); bhstmr = (struct iscsi_bhs_task_management_request *)request->ip_bhs; - io = ctl_alloc_io(cs->cs_target->ct_softc->port.ctl_pool_ref); + io = ctl_alloc_io(cs->cs_target->ct_port.ctl_pool_ref); if (io == NULL) { CFISCSI_SESSION_WARN(cs, "can't allocate ctl_io;" "dropping connection"); @@ -618,7 +620,7 @@ cfiscsi_pdu_handle_task_request(struct i io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = request; io->io_hdr.io_type = CTL_IO_TASK; io->io_hdr.nexus.initid.id = cs->cs_ctl_initid; - io->io_hdr.nexus.targ_port = cs->cs_target->ct_softc->port.targ_port; + io->io_hdr.nexus.targ_port = cs->cs_target->ct_port.targ_port; io->io_hdr.nexus.targ_target.id = 0; io->io_hdr.nexus.targ_lun = cfiscsi_decode_lun(bhstmr->bhstmr_lun); io->io_hdr.nexus.lun_map_fn = cfiscsi_map_lun; @@ -1040,7 +1042,7 @@ cfiscsi_session_terminate_tasks(struct c int error, last; #ifdef notyet - io = ctl_alloc_io(cs->cs_target->ct_softc->port.ctl_pool_ref); + io = ctl_alloc_io(cs->cs_target->ct_port.ctl_pool_ref); if (io == NULL) { CFISCSI_SESSION_WARN(cs, "can't allocate ctl_io"); return; @@ -1049,7 +1051,7 @@ cfiscsi_session_terminate_tasks(struct c io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = NULL; io->io_hdr.io_type = CTL_IO_TASK; io->io_hdr.nexus.initid.id = cs->cs_ctl_initid; - io->io_hdr.nexus.targ_port = cs->cs_target->ct_softc->port.targ_port; + io->io_hdr.nexus.targ_port = cs->cs_target->ct_port.targ_port; io->io_hdr.nexus.targ_target.id = 0; io->io_hdr.nexus.targ_lun = lun; io->taskio.tag_type = CTL_TAG_SIMPLE; /* XXX */ @@ -1068,7 +1070,7 @@ cfiscsi_session_terminate_tasks(struct c CFISCSI_SESSION_LOCK(cs); TAILQ_FOREACH_SAFE(cdw, &cs->cs_waiting_for_data_out, cdw_next, tmpcdw) { - io = ctl_alloc_io(cs->cs_target->ct_softc->port.ctl_pool_ref); + io = ctl_alloc_io(cs->cs_target->ct_port.ctl_pool_ref); if (io == NULL) { CFISCSI_SESSION_WARN(cs, "can't allocate ctl_io"); return; @@ -1077,8 +1079,7 @@ cfiscsi_session_terminate_tasks(struct c io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = NULL; io->io_hdr.io_type = CTL_IO_TASK; io->io_hdr.nexus.initid.id = cs->cs_ctl_initid; - io->io_hdr.nexus.targ_port = - cs->cs_target->ct_softc->port.targ_port; + io->io_hdr.nexus.targ_port = cs->cs_target->ct_port.targ_port; io->io_hdr.nexus.targ_target.id = 0; //io->io_hdr.nexus.targ_lun = lun; /* Not needed? */ io->taskio.tag_type = CTL_TAG_SIMPLE; /* XXX */ @@ -1201,7 +1202,7 @@ cfiscsi_session_register_initiator(struc i, softc->max_initiators); #endif cs->cs_ctl_initid = i; - error = ctl_add_initiator(0x0, softc->port.targ_port, cs->cs_ctl_initid); + error = ctl_add_initiator(0x0, cs->cs_target->ct_port.targ_port, cs->cs_ctl_initid); if (error != 0) { CFISCSI_SESSION_WARN(cs, "ctl_add_initiator failed with error %d", error); mtx_lock(&softc->lock); @@ -1225,7 +1226,7 @@ cfiscsi_session_unregister_initiator(str softc = &cfiscsi_softc; - error = ctl_remove_initiator(softc->port.targ_port, cs->cs_ctl_initid); + error = ctl_remove_initiator(cs->cs_target->ct_port.targ_port, cs->cs_ctl_initid); if (error != 0) { CFISCSI_SESSION_WARN(cs, "ctl_remove_initiator failed with error %d", error); @@ -1316,7 +1317,6 @@ int cfiscsi_init(void) { struct cfiscsi_softc *softc; - struct ctl_port *port; int retval; softc = &cfiscsi_softc; @@ -1330,46 +1330,13 @@ cfiscsi_init(void) TAILQ_INIT(&softc->sessions); TAILQ_INIT(&softc->targets); - port = &softc->port; - port->frontend = &cfiscsi_frontend; - port->port_type = CTL_PORT_ISCSI; - /* XXX KDM what should the real number be here? */ - port->num_requested_ctl_io = 4096; - snprintf(softc->port_name, sizeof(softc->port_name), "iscsi"); - port->port_name = softc->port_name; - port->port_online = cfiscsi_online; - port->port_offline = cfiscsi_offline; - port->onoff_arg = softc; - port->lun_enable = cfiscsi_lun_enable; - port->lun_disable = cfiscsi_lun_disable; - port->targ_lun_arg = softc; - port->devid = cfiscsi_devid; - port->fe_datamove = cfiscsi_datamove; - port->fe_done = cfiscsi_done; - - /* XXX KDM what should we report here? */ - /* XXX These should probably be fetched from CTL. */ - port->max_targets = 1; - port->max_target_id = 15; - - retval = ctl_port_register(port, /*master_SC*/ 1); - if (retval != 0) { - CFISCSI_WARN("ctl_frontend_register() failed with error %d", - retval); - retval = 1; - goto bailout; - } - - softc->max_initiators = port->max_initiators; + softc->max_initiators = CTL_MAX_INIT_PER_PORT; cfiscsi_data_wait_zone = uma_zcreate("cfiscsi_data_wait", sizeof(struct cfiscsi_data_wait), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); return (0); - -bailout: - return (retval); } #ifdef ICL_KERNEL_PROXY @@ -1396,10 +1363,23 @@ static void cfiscsi_online(void *arg) { struct cfiscsi_softc *softc; + struct cfiscsi_target *ct; + int online; + + ct = (struct cfiscsi_target *)arg; + softc = ct->ct_softc; - softc = (struct cfiscsi_softc *)arg; + mtx_lock(&softc->lock); + if (ct->ct_online) { + mtx_unlock(&softc->lock); + return; + } + ct->ct_online = 1; + online = softc->online++; + mtx_unlock(&softc->lock); + if (online > 0) + return; - softc->online = 1; #ifdef ICL_KERNEL_PROXY if (softc->listener != NULL) icl_listen_free(softc->listener); @@ -1411,16 +1391,28 @@ static void cfiscsi_offline(void *arg) { struct cfiscsi_softc *softc; + struct cfiscsi_target *ct; struct cfiscsi_session *cs; + int online; - softc = (struct cfiscsi_softc *)arg; - - softc->online = 0; + ct = (struct cfiscsi_target *)arg; + softc = ct->ct_softc; mtx_lock(&softc->lock); - TAILQ_FOREACH(cs, &softc->sessions, cs_next) - cfiscsi_session_terminate(cs); + if (!ct->ct_online) { + mtx_unlock(&softc->lock); + return; + } + ct->ct_online = 0; + online = --softc->online; + + TAILQ_FOREACH(cs, &softc->sessions, cs_next) { + if (cs->cs_target == ct) + cfiscsi_session_terminate(cs); + } mtx_unlock(&softc->lock); + if (online > 0) + return; #ifdef ICL_KERNEL_PROXY icl_listen_free(softc->listener); @@ -1444,18 +1436,19 @@ cfiscsi_ioctl_handoff(struct ctl_iscsi * cihp->initiator_name, cihp->initiator_addr, cihp->target_name); - if (softc->online == 0) { + ct = cfiscsi_target_find(softc, cihp->target_name); + if (ct == NULL) { ci->status = CTL_ISCSI_ERROR; snprintf(ci->error_str, sizeof(ci->error_str), - "%s: port offline", __func__); + "%s: target not found", __func__); return; } - ct = cfiscsi_target_find(softc, cihp->target_name); - if (ct == NULL) { + if (ct->ct_online == 0) { ci->status = CTL_ISCSI_ERROR; snprintf(ci->error_str, sizeof(ci->error_str), - "%s: target not found", __func__); + "%s: port offline", __func__); + cfiscsi_target_release(ct); return; } @@ -1953,11 +1946,148 @@ cfiscsi_ioctl_receive(struct ctl_iscsi * #endif /* !ICL_KERNEL_PROXY */ +static void +cfiscsi_ioctl_port_create(struct ctl_req *req) +{ + struct cfiscsi_target *ct; + struct ctl_port *port; + const char *target, *alias, *tag; + ctl_options_t opts; + int retval; + + ctl_init_opts(&opts, req->num_args, req->kern_args); + target = ctl_get_opt(&opts, "cfiscsi_target"); + alias = ctl_get_opt(&opts, "cfiscsi_target_alias"); + tag = ctl_get_opt(&opts, "cfiscsi_portal_group_tag"); + if (target == NULL || tag == NULL) { + ctl_free_opts(&opts); + req->status = CTL_LUN_ERROR; + snprintf(req->error_str, sizeof(req->error_str), + "Missing required argument"); + return; + } + ct = cfiscsi_target_find_or_create(&cfiscsi_softc, target, alias); + if (ct == NULL) { + ctl_free_opts(&opts); + req->status = CTL_LUN_ERROR; + snprintf(req->error_str, sizeof(req->error_str), + "failed to create target \"%s\"", target); + return; + } + if (ct->ct_state == CFISCSI_TARGET_STATE_ACTIVE) { + cfiscsi_target_release(ct); + ctl_free_opts(&opts); + req->status = CTL_LUN_ERROR; + snprintf(req->error_str, sizeof(req->error_str), + "target \"%s\" already exist", target); + return; + } + port = &ct->ct_port; + if (ct->ct_state == CFISCSI_TARGET_STATE_DYING) + goto done; + + port->frontend = &cfiscsi_frontend; + port->port_type = CTL_PORT_ISCSI; + /* XXX KDM what should the real number be here? */ + port->num_requested_ctl_io = 4096; + port->port_name = "iscsi"; + port->virtual_port = strtoul(tag, NULL, 0); + port->port_online = cfiscsi_online; + port->port_offline = cfiscsi_offline; + port->onoff_arg = ct; + port->lun_enable = cfiscsi_lun_enable; + port->lun_disable = cfiscsi_lun_disable; + port->targ_lun_arg = ct; + port->devid = cfiscsi_devid; + port->fe_datamove = cfiscsi_datamove; + port->fe_done = cfiscsi_done; + + /* XXX KDM what should we report here? */ + /* XXX These should probably be fetched from CTL. */ + port->max_targets = 1; + port->max_target_id = 15; + + port->options = opts; + STAILQ_INIT(&opts); + + retval = ctl_port_register(port, /*master_SC*/ 1); + if (retval != 0) { + ctl_free_opts(&port->options); + cfiscsi_target_release(ct); + req->status = CTL_LUN_ERROR; + snprintf(req->error_str, sizeof(req->error_str), + "ctl_frontend_register() failed with error %d", retval); + return; + } +done: + ct->ct_state = CFISCSI_TARGET_STATE_ACTIVE; + req->status = CTL_LUN_OK; + memcpy(req->kern_args[0].kvalue, &port->targ_port, + sizeof(port->targ_port)); //XXX +} + +static void +cfiscsi_ioctl_port_remove(struct ctl_req *req) +{ + struct cfiscsi_target *ct; + const char *target; + ctl_options_t opts; + + ctl_init_opts(&opts, req->num_args, req->kern_args); + target = ctl_get_opt(&opts, "cfiscsi_target"); + if (target == NULL) { + ctl_free_opts(&opts); + req->status = CTL_LUN_ERROR; + snprintf(req->error_str, sizeof(req->error_str), + "Missing required argument"); + return; + } + ct = cfiscsi_target_find(&cfiscsi_softc, target); + if (ct == NULL) { + ctl_free_opts(&opts); + req->status = CTL_LUN_ERROR; + snprintf(req->error_str, sizeof(req->error_str), + "can't find target \"%s\"", target); + return; + } + if (ct->ct_state != CFISCSI_TARGET_STATE_ACTIVE) { + ctl_free_opts(&opts); + req->status = CTL_LUN_ERROR; + snprintf(req->error_str, sizeof(req->error_str), + "target \"%s\" is already dying", target); + return; + } + ctl_free_opts(&opts); + + ct->ct_state = CFISCSI_TARGET_STATE_DYING; + ctl_port_offline(&ct->ct_port); + cfiscsi_target_release(ct); + cfiscsi_target_release(ct); +} + static int cfiscsi_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) { struct ctl_iscsi *ci; + struct ctl_req *req; + + if (cmd == CTL_PORT_REQ) { + req = (struct ctl_req *)addr; + switch (req->reqtype) { + case CTL_REQ_CREATE: + cfiscsi_ioctl_port_create(req); + break; + case CTL_REQ_REMOVE: + cfiscsi_ioctl_port_remove(req); + break; + default: + req->status = CTL_LUN_ERROR; + snprintf(req->error_str, sizeof(req->error_str), + "Unsupported request type %d", req->reqtype); + } + return (0); + } if (cmd != CTL_ISCSI) return (ENOTTY); @@ -2227,6 +2357,12 @@ cfiscsi_target_release(struct cfiscsi_ta if (refcount_release(&ct->ct_refcount)) { TAILQ_REMOVE(&softc->targets, ct, ct_next); mtx_unlock(&softc->lock); + if (ct->ct_state != CFISCSI_TARGET_STATE_INVALID) { + ct->ct_state = CFISCSI_TARGET_STATE_INVALID; + if (ctl_port_deregister(&ct->ct_port) != 0) + printf("%s: ctl_port_deregister() failed\n", + __func__); + } free(ct, M_CFISCSI); return; @@ -2241,7 +2377,8 @@ cfiscsi_target_find(struct cfiscsi_softc mtx_lock(&softc->lock); TAILQ_FOREACH(ct, &softc->targets, ct_next) { - if (strcmp(name, ct->ct_name) != 0) + if (strcmp(name, ct->ct_name) != 0 || + ct->ct_state != CFISCSI_TARGET_STATE_ACTIVE) continue; cfiscsi_target_hold(ct); mtx_unlock(&softc->lock); @@ -2266,7 +2403,8 @@ cfiscsi_target_find_or_create(struct cfi mtx_lock(&softc->lock); TAILQ_FOREACH(ct, &softc->targets, ct_next) { - if (strcmp(name, ct->ct_name) != 0) + if (strcmp(name, ct->ct_name) != 0 || + ct->ct_state == CFISCSI_TARGET_STATE_INVALID) continue; cfiscsi_target_hold(ct); mtx_unlock(&softc->lock); @@ -2340,22 +2478,6 @@ cfiscsi_target_set_lun(struct cfiscsi_ta #endif ct->ct_luns[lun_id] = ctl_lun_id; - cfiscsi_target_hold(ct); - - return (0); -} - -static int -cfiscsi_target_unset_lun(struct cfiscsi_target *ct, unsigned long lun_id) -{ - - if (ct->ct_luns[lun_id] < 0) { - CFISCSI_WARN("lun %ld not allocated", lun_id); - return (-1); - } - - ct->ct_luns[lun_id] = -1; - cfiscsi_target_release(ct); return (0); } @@ -2365,16 +2487,15 @@ cfiscsi_lun_enable(void *arg, struct ctl { struct cfiscsi_softc *softc; struct cfiscsi_target *ct; - const char *target = NULL, *target_alias = NULL; + const char *target = NULL; const char *lun = NULL; unsigned long tmp; - softc = (struct cfiscsi_softc *)arg; + ct = (struct cfiscsi_target *)arg; + softc = ct->ct_softc; target = ctl_get_opt(&control_softc->ctl_luns[lun_id]->be_lun->options, "cfiscsi_target"); - target_alias = ctl_get_opt(&control_softc->ctl_luns[lun_id]->be_lun->options, - "cfiscsi_target_alias"); lun = ctl_get_opt(&control_softc->ctl_luns[lun_id]->be_lun->options, "cfiscsi_lun"); @@ -2387,15 +2508,11 @@ cfiscsi_lun_enable(void *arg, struct ctl return (0); } - ct = cfiscsi_target_find_or_create(softc, target, target_alias); - if (ct == NULL) { - CFISCSI_WARN("failed to create target \"%s\"", target); + if (strcmp(target, ct->ct_name) != 0) return (0); - } tmp = strtoul(lun, NULL, 10); cfiscsi_target_set_lun(ct, tmp, lun_id); - cfiscsi_target_release(ct); return (0); } @@ -2406,19 +2523,17 @@ cfiscsi_lun_disable(void *arg, struct ct struct cfiscsi_target *ct; int i; - softc = (struct cfiscsi_softc *)arg; + ct = (struct cfiscsi_target *)arg; + softc = ct->ct_softc; mtx_lock(&softc->lock); - TAILQ_FOREACH(ct, &softc->targets, ct_next) { - for (i = 0; i < CTL_MAX_LUNS; i++) { - if (ct->ct_luns[i] < 0) - continue; - if (ct->ct_luns[i] != lun_id) - continue; - mtx_unlock(&softc->lock); - cfiscsi_target_unset_lun(ct, i); - return (0); - } + for (i = 0; i < CTL_MAX_LUNS; i++) { + if (ct->ct_luns[i] < 0) + continue; + if (ct->ct_luns[i] != lun_id) + continue; + ct->ct_luns[lun_id] = -1; + break; } mtx_unlock(&softc->lock); return (0); Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.h Tue Jul 15 17:01:39 2014 (r268681) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.h Tue Jul 15 17:05:11 2014 (r268682) @@ -32,6 +32,10 @@ #ifndef CTL_FRONTEND_ISCSI_H #define CTL_FRONTEND_ISCSI_H +#define CFISCSI_TARGET_STATE_INVALID 0 +#define CFISCSI_TARGET_STATE_ACTIVE 1 +#define CFISCSI_TARGET_STATE_DYING 2 + struct cfiscsi_target { TAILQ_ENTRY(cfiscsi_target) ct_next; int ct_luns[CTL_MAX_LUNS]; @@ -39,6 +43,9 @@ struct cfiscsi_target { volatile u_int ct_refcount; char ct_name[CTL_ISCSI_NAME_LEN]; char ct_alias[CTL_ISCSI_ALIAS_LEN]; + int ct_state; + int ct_online; + struct ctl_port ct_port; }; struct cfiscsi_data_wait { @@ -96,7 +103,6 @@ struct icl_listen; #endif struct cfiscsi_softc { - struct ctl_port port; struct mtx lock; char port_name[32]; int online; Modified: stable/10/sys/cam/ctl/ctl_ioctl.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_ioctl.h Tue Jul 15 17:01:39 2014 (r268681) +++ stable/10/sys/cam/ctl/ctl_ioctl.h Tue Jul 15 17:05:11 2014 (r268682) @@ -595,6 +595,45 @@ struct ctl_lun_list { }; /* + * Port request interface: + * + * driver: This is required, and is NUL-terminated a string + * that is the name of the frontend, like "iscsi" . + * + * reqtype: The type of request, CTL_REQ_CREATE to create a + * port, CTL_REQ_REMOVE to delete a port. + * + * num_be_args: This is the number of frontend-specific arguments + * in the be_args array. + * + * be_args: This is an array of frontend-specific arguments. + * See above for a description of the fields in this + * structure. + * + * status: Status of the request. + * + * error_str: If the status is CTL_LUN_ERROR, this will + * contain a string describing the error. + * + * kern_be_args: For kernel use only. + */ +typedef enum { + CTL_REQ_CREATE, + CTL_REQ_REMOVE, + CTL_REQ_MODIFY, +} ctl_req_type; + +struct ctl_req { + char driver[CTL_DRIVER_NAME_LEN]; + ctl_req_type reqtype; + int num_args; + struct ctl_be_arg *args; + ctl_lun_status status; + char error_str[CTL_ERROR_STR_LEN]; + struct ctl_be_arg *kern_args; +}; + +/* * iSCSI status * * OK: Request completed successfully. @@ -789,7 +828,8 @@ struct ctl_iscsi { #define CTL_ERROR_INJECT_DELETE _IOW(CTL_MINOR, 0x23, struct ctl_error_desc) #define CTL_SET_PORT_WWNS _IOW(CTL_MINOR, 0x24, struct ctl_port_entry) #define CTL_ISCSI _IOWR(CTL_MINOR, 0x25, struct ctl_iscsi) -#define CTL_PORT_LIST _IOWR(CTL_MINOR, 0x26, struct ctl_lun_list) +#define CTL_PORT_REQ _IOWR(CTL_MINOR, 0x26, struct ctl_req) +#define CTL_PORT_LIST _IOWR(CTL_MINOR, 0x27, struct ctl_lun_list) #endif /* _CTL_IOCTL_H_ */ Modified: stable/10/usr.sbin/ctld/ctld.c ============================================================================== --- stable/10/usr.sbin/ctld/ctld.c Tue Jul 15 17:01:39 2014 (r268681) +++ stable/10/usr.sbin/ctld/ctld.c Tue Jul 15 17:05:11 2014 (r268682) @@ -1120,7 +1120,6 @@ conf_verify(struct conf *conf) if (!found_lun) { log_warnx("no LUNs defined for target \"%s\"", targ->t_name); - return (1); } } TAILQ_FOREACH(pg, &conf->conf_portal_groups, pg_next) { @@ -1209,19 +1208,6 @@ conf_apply(struct conf *oldconf, struct } } - if (oldconf->conf_kernel_port_on != newconf->conf_kernel_port_on) { - if (newconf->conf_kernel_port_on == true) { - log_debugx("enabling CTL iSCSI port"); - error = kernel_port_on(); - if (error != 0) - log_errx(1, "failed to enable CTL iSCSI port; exiting"); - } else { - error = kernel_port_off(); - if (error != 0) - log_warnx("failed to disable CTL iSCSI port"); - } - } - /* * XXX: If target or lun removal fails, we should somehow "move" * the old lun or target into newconf, so that subsequent @@ -1253,6 +1239,7 @@ conf_apply(struct conf *oldconf, struct } lun_delete(oldlun); } + kernel_port_remove(oldtarg); target_delete(oldtarg); continue; } @@ -1387,6 +1374,8 @@ conf_apply(struct conf *oldconf, struct cumulated_error++; } } + if (oldtarg == NULL) + kernel_port_add(newtarg); } /* Modified: stable/10/usr.sbin/ctld/ctld.h ============================================================================== --- stable/10/usr.sbin/ctld/ctld.h Tue Jul 15 17:01:39 2014 (r268681) +++ stable/10/usr.sbin/ctld/ctld.h Tue Jul 15 17:05:11 2014 (r268682) @@ -272,8 +272,8 @@ int kernel_lun_add(struct lun *lun); int kernel_lun_resize(struct lun *lun); int kernel_lun_remove(struct lun *lun); void kernel_handoff(struct connection *conn); -int kernel_port_on(void); -int kernel_port_off(void); +int kernel_port_add(struct target *targ); +int kernel_port_remove(struct target *targ); void kernel_capsicate(void); #ifdef ICL_KERNEL_PROXY Modified: stable/10/usr.sbin/ctld/kernel.c ============================================================================== --- stable/10/usr.sbin/ctld/kernel.c Tue Jul 15 17:01:39 2014 (r268681) +++ stable/10/usr.sbin/ctld/kernel.c Tue Jul 15 17:05:11 2014 (r268682) @@ -119,10 +119,21 @@ struct cctl_lun { STAILQ_ENTRY(cctl_lun) links; }; +struct cctl_port { + uint32_t port_id; + char *cfiscsi_target; + uint16_t cfiscsi_portal_group_tag; + STAILQ_HEAD(,cctl_lun_nv) attr_list; + STAILQ_ENTRY(cctl_port) links; +}; + struct cctl_devlist_data { int num_luns; STAILQ_HEAD(,cctl_lun) lun_list; struct cctl_lun *cur_lun; + int num_ports; + STAILQ_HEAD(,cctl_port) port_list; + struct cctl_port *cur_port; int level; struct sbuf *cur_sb[32]; }; @@ -247,6 +258,109 @@ cctl_end_element(void *user_data, const } static void +cctl_start_pelement(void *user_data, const char *name, const char **attr) +{ + int i; + struct cctl_devlist_data *devlist; + struct cctl_port *cur_port; + + devlist = (struct cctl_devlist_data *)user_data; + cur_port = devlist->cur_port; + devlist->level++; + if ((u_int)devlist->level >= (sizeof(devlist->cur_sb) / + sizeof(devlist->cur_sb[0]))) + log_errx(1, "%s: too many nesting levels, %zd max", __func__, + sizeof(devlist->cur_sb) / sizeof(devlist->cur_sb[0])); + + devlist->cur_sb[devlist->level] = sbuf_new_auto(); + if (devlist->cur_sb[devlist->level] == NULL) + log_err(1, "%s: unable to allocate sbuf", __func__); + + if (strcmp(name, "targ_port") == 0) { + if (cur_port != NULL) + log_errx(1, "%s: improper port element nesting (%s)", + __func__, name); + + cur_port = calloc(1, sizeof(*cur_port)); + if (cur_port == NULL) + log_err(1, "%s: cannot allocate %zd bytes", __func__, + sizeof(*cur_port)); + + devlist->num_ports++; + devlist->cur_port = cur_port; + + STAILQ_INIT(&cur_port->attr_list); + STAILQ_INSERT_TAIL(&devlist->port_list, cur_port, links); + + for (i = 0; attr[i] != NULL; i += 2) { + if (strcmp(attr[i], "id") == 0) { + cur_port->port_id = strtoul(attr[i+1], NULL, 0); + } else { + log_errx(1, "%s: invalid LUN attribute %s = %s", + __func__, attr[i], attr[i+1]); + } + } + } +} + +static void +cctl_end_pelement(void *user_data, const char *name) +{ + struct cctl_devlist_data *devlist; + struct cctl_port *cur_port; + char *str; + + devlist = (struct cctl_devlist_data *)user_data; + cur_port = devlist->cur_port; + + if ((cur_port == NULL) + && (strcmp(name, "ctlportlist") != 0)) + log_errx(1, "%s: cur_port == NULL! (name = %s)", __func__, name); + + if (devlist->cur_sb[devlist->level] == NULL) + log_errx(1, "%s: no valid sbuf at level %d (name %s)", __func__, + devlist->level, name); + + sbuf_finish(devlist->cur_sb[devlist->level]); + str = checked_strdup(sbuf_data(devlist->cur_sb[devlist->level])); + + if (strlen(str) == 0) { + free(str); + str = NULL; + } + + sbuf_delete(devlist->cur_sb[devlist->level]); + devlist->cur_sb[devlist->level] = NULL; + devlist->level--; + + if (strcmp(name, "cfiscsi_target") == 0) { + cur_port->cfiscsi_target = str; + str = NULL; + } else if (strcmp(name, "cfiscsi_portal_group_tag") == 0) { + cur_port->cfiscsi_portal_group_tag = strtoul(str, NULL, 0); + } else if (strcmp(name, "targ_port") == 0) { + devlist->cur_port = NULL; + } else if (strcmp(name, "ctlportlist") == 0) { + + } else { + struct cctl_lun_nv *nv; + + nv = calloc(1, sizeof(*nv)); + if (nv == NULL) + log_err(1, "%s: can't allocate %zd bytes for nv pair", + __func__, sizeof(*nv)); + + nv->name = checked_strdup(name); + + nv->value = str; + str = NULL; + STAILQ_INSERT_TAIL(&cur_port->attr_list, nv, links); + } + + free(str); +} + +static void cctl_char_handler(void *user_data, const XML_Char *str, int len) { struct cctl_devlist_data *devlist; @@ -266,50 +380,51 @@ conf_new_from_kernel(void) struct ctl_lun_list list; struct cctl_devlist_data devlist; struct cctl_lun *lun; + struct cctl_port *port; XML_Parser parser; - char *lun_str = NULL; - int lun_len; - int retval; - - lun_len = 4096; + char *str; + int len, retval; bzero(&devlist, sizeof(devlist)); STAILQ_INIT(&devlist.lun_list); + STAILQ_INIT(&devlist.port_list); log_debugx("obtaining previously configured CTL luns from the kernel"); + str = NULL; + len = 4096; retry: - lun_str = realloc(lun_str, lun_len); - if (lun_str == NULL) + str = realloc(str, len); + if (str == NULL) log_err(1, "realloc"); bzero(&list, sizeof(list)); - list.alloc_len = lun_len; + list.alloc_len = len; list.status = CTL_LUN_LIST_NONE; - list.lun_xml = lun_str; + list.lun_xml = str; if (ioctl(ctl_fd, CTL_LUN_LIST, &list) == -1) { log_warn("error issuing CTL_LUN_LIST ioctl"); - free(lun_str); + free(str); return (NULL); } if (list.status == CTL_LUN_LIST_ERROR) { log_warnx("error returned from CTL_LUN_LIST ioctl: %s", list.error_str); - free(lun_str); + free(str); return (NULL); } if (list.status == CTL_LUN_LIST_NEED_MORE_SPACE) { - lun_len = lun_len << 1; + len = len << 1; goto retry; } parser = XML_ParserCreate(NULL); if (parser == NULL) { log_warnx("unable to create XML parser"); - free(lun_str); + free(str); return (NULL); } @@ -317,9 +432,58 @@ retry: XML_SetElementHandler(parser, cctl_start_element, cctl_end_element); XML_SetCharacterDataHandler(parser, cctl_char_handler); - retval = XML_Parse(parser, lun_str, strlen(lun_str), 1); + retval = XML_Parse(parser, str, strlen(str), 1); + XML_ParserFree(parser); + free(str); + if (retval != 1) { + log_warnx("XML_Parse failed"); + return (NULL); + } + + str = NULL; + len = 4096; +retry_port: + str = realloc(str, len); + if (str == NULL) + log_err(1, "realloc"); + + bzero(&list, sizeof(list)); + list.alloc_len = len; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 17:06:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 173E2C87; Tue, 15 Jul 2014 17:06:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 022DF2C75; Tue, 15 Jul 2014 17:06:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FH6CTY083830; Tue, 15 Jul 2014 17:06:12 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FH6B1F083817; Tue, 15 Jul 2014 17:06:11 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407151706.s6FH6B1F083817@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jul 2014 17:06:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268683 - in stable/10: sys/cam/ctl usr.sbin/ctladm usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 17:06:13 -0000 Author: mav Date: Tue Jul 15 17:06:10 2014 New Revision: 268683 URL: http://svnweb.freebsd.org/changeset/base/268683 Log: MFC r268293: Burry devid port method, which was a gross hack. Instead make ports provide wanted port and target IDs, and LUNs provide wanted LUN IDs. After that core Device ID VPD code only had to link all of them together and add relative port and port group numbers. LUN ID for iSCSI LUNs no longer created by CTL, but by ctld, and passed to CTL as "scsiname" LUN option. This makes LUNs to report the same set of IDs, independently from the port through which it is accessed, as required by SCSI specifications. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_frontend.c stable/10/sys/cam/ctl/ctl_frontend.h stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/sys/cam/ctl/ctl_private.h stable/10/sys/cam/ctl/scsi_ctl.c stable/10/usr.sbin/ctladm/ctladm.8 stable/10/usr.sbin/ctld/kernel.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Tue Jul 15 17:05:11 2014 (r268682) +++ stable/10/sys/cam/ctl/ctl.c Tue Jul 15 17:06:10 2014 (r268683) @@ -4295,7 +4295,11 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft { struct ctl_lun *nlun, *lun; struct ctl_port *port; + struct scsi_vpd_id_descriptor *desc; + struct scsi_vpd_id_t10 *t10id; + const char *scsiname, *vendor; int lun_number, i, lun_malloced; + int devidlen, idlen1, idlen2, len; if (be_lun == NULL) return (EINVAL); @@ -4327,6 +4331,43 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft if (lun_malloced) lun->flags = CTL_LUN_MALLOCED; + /* Generate LUN ID. */ + devidlen = max(CTL_DEVID_MIN_LEN, + strnlen(be_lun->device_id, CTL_DEVID_LEN)); + idlen1 = sizeof(*t10id) + devidlen; + len = sizeof(struct scsi_vpd_id_descriptor) + idlen1; + scsiname = ctl_get_opt(&be_lun->options, "scsiname"); + if (scsiname != NULL) { + idlen2 = roundup2(strlen(scsiname) + 1, 4); + len += sizeof(struct scsi_vpd_id_descriptor) + idlen2; + } + lun->lun_devid = malloc(sizeof(struct ctl_devid) + len, + M_CTL, M_WAITOK | M_ZERO); + lun->lun_devid->len = len; + desc = (struct scsi_vpd_id_descriptor *)lun->lun_devid->data; + desc->proto_codeset = SVPD_ID_CODESET_ASCII; + desc->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_LUN | SVPD_ID_TYPE_T10; + desc->length = idlen1; + t10id = (struct scsi_vpd_id_t10 *)&desc->identifier[0]; + memset(t10id->vendor, ' ', sizeof(t10id->vendor)); + if ((vendor = ctl_get_opt(&be_lun->options, "vendor")) == NULL) { + strncpy((char *)t10id->vendor, CTL_VENDOR, sizeof(t10id->vendor)); + } else { + strncpy(t10id->vendor, vendor, + min(sizeof(t10id->vendor), strlen(vendor))); + } + strncpy((char *)t10id->vendor_spec_id, + (char *)be_lun->device_id, devidlen); + if (scsiname != NULL) { + desc = (struct scsi_vpd_id_descriptor *)(&desc->identifier[0] + + desc->length); + desc->proto_codeset = SVPD_ID_CODESET_UTF8; + desc->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_LUN | + SVPD_ID_TYPE_SCSI_NAME; + desc->length = idlen2; + strlcpy(desc->identifier, scsiname, idlen2); + } + mtx_lock(&ctl_softc->ctl_lock); /* * See if the caller requested a particular LUN number. If so, see @@ -4548,6 +4589,7 @@ ctl_free_lun(struct ctl_lun *lun) lun->be_lun->lun_shutdown(lun->be_lun->be_lun); mtx_destroy(&lun->lun_lock); + free(lun->lun_devid, M_CTL); if (lun->flags & CTL_LUN_MALLOCED) free(lun, M_CTL); @@ -9626,39 +9668,29 @@ static int ctl_inquiry_evpd_devid(struct ctl_scsiio *ctsio, int alloc_len) { struct scsi_vpd_device_id *devid_ptr; - struct scsi_vpd_id_descriptor *desc, *desc1; - struct scsi_vpd_id_descriptor *desc2, *desc3; /* for types 4h and 5h */ - struct scsi_vpd_id_t10 *t10id; + struct scsi_vpd_id_descriptor *desc; struct ctl_softc *ctl_softc; struct ctl_lun *lun; struct ctl_port *port; - char *val; - int data_len, devid_len; + int data_len; + uint8_t proto; ctl_softc = control_softc; port = ctl_softc->ctl_ports[ctl_port_idx(ctsio->io_hdr.nexus.targ_port)]; - - if (port->devid != NULL) - return ((port->devid)(ctsio, alloc_len)); - lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; - if (lun == NULL) { - devid_len = CTL_DEVID_MIN_LEN; - } else { - devid_len = max(CTL_DEVID_MIN_LEN, - strnlen(lun->be_lun->device_id, CTL_DEVID_LEN)); - } - data_len = sizeof(struct scsi_vpd_device_id) + - sizeof(struct scsi_vpd_id_descriptor) + - sizeof(struct scsi_vpd_id_t10) + devid_len + - sizeof(struct scsi_vpd_id_descriptor) + CTL_WWPN_LEN + - sizeof(struct scsi_vpd_id_descriptor) + + sizeof(struct scsi_vpd_id_descriptor) + sizeof(struct scsi_vpd_id_rel_trgt_port_id) + - sizeof(struct scsi_vpd_id_descriptor) + + sizeof(struct scsi_vpd_id_descriptor) + sizeof(struct scsi_vpd_id_trgt_port_grp_id); + if (lun && lun->lun_devid) + data_len += lun->lun_devid->len; + if (port->port_devid) + data_len += port->port_devid->len; + if (port->target_devid) + data_len += port->target_devid->len; ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); devid_ptr = (struct scsi_vpd_device_id *)ctsio->kern_data_ptr; @@ -9677,15 +9709,6 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; - desc = (struct scsi_vpd_id_descriptor *)devid_ptr->desc_list; - t10id = (struct scsi_vpd_id_t10 *)&desc->identifier[0]; - desc1 = (struct scsi_vpd_id_descriptor *)(&desc->identifier[0] + - sizeof(struct scsi_vpd_id_t10) + devid_len); - desc2 = (struct scsi_vpd_id_descriptor *)(&desc1->identifier[0] + - CTL_WWPN_LEN); - desc3 = (struct scsi_vpd_id_descriptor *)(&desc2->identifier[0] + - sizeof(struct scsi_vpd_id_rel_trgt_port_id)); - /* * The control device is always connected. The disk device, on the * other hand, may not be online all the time. @@ -9695,112 +9718,69 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio lun->be_lun->lun_type; else devid_ptr->device = (SID_QUAL_LU_OFFLINE << 5) | T_DIRECT; - devid_ptr->page_code = SVPD_DEVICE_ID; - scsi_ulto2b(data_len - 4, devid_ptr->length); - /* - * For Fibre channel, - */ if (port->port_type == CTL_PORT_FC) - { - desc->proto_codeset = (SCSI_PROTO_FC << 4) | - SVPD_ID_CODESET_ASCII; - desc1->proto_codeset = (SCSI_PROTO_FC << 4) | - SVPD_ID_CODESET_BINARY; - } + proto = SCSI_PROTO_FC << 4; + else if (port->port_type == CTL_PORT_ISCSI) + proto = SCSI_PROTO_ISCSI << 4; else - { - desc->proto_codeset = (SCSI_PROTO_SPI << 4) | - SVPD_ID_CODESET_ASCII; - desc1->proto_codeset = (SCSI_PROTO_SPI << 4) | - SVPD_ID_CODESET_BINARY; - } - desc2->proto_codeset = desc3->proto_codeset = desc1->proto_codeset; + proto = SCSI_PROTO_SPI << 4; + desc = (struct scsi_vpd_id_descriptor *)devid_ptr->desc_list; /* * We're using a LUN association here. i.e., this device ID is a * per-LUN identifier. */ - desc->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_LUN | SVPD_ID_TYPE_T10; - desc->length = sizeof(*t10id) + devid_len; - if (lun == NULL || (val = ctl_get_opt(&lun->be_lun->options, - "vendor")) == NULL) { - strncpy((char *)t10id->vendor, CTL_VENDOR, sizeof(t10id->vendor)); - } else { - memset(t10id->vendor, ' ', sizeof(t10id->vendor)); - strncpy(t10id->vendor, val, - min(sizeof(t10id->vendor), strlen(val))); + if (lun && lun->lun_devid) { + memcpy(desc, lun->lun_devid->data, lun->lun_devid->len); + desc = (struct scsi_vpd_id_descriptor *)((uint8_t *)desc + + lun->lun_devid->len); } /* - * desc1 is for the WWPN which is a port asscociation. + * This is for the WWPN which is a port association. */ - desc1->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_PORT | SVPD_ID_TYPE_NAA; - desc1->length = CTL_WWPN_LEN; - /* XXX Call Reggie's get_WWNN func here then add port # to the end */ - /* For testing just create the WWPN */ -#if 0 - ddb_GetWWNN((char *)desc1->identifier); - - /* NOTE: if the port is 0 or 8 we don't want to subtract 1 */ - /* This is so Copancontrol will return something sane */ - if (ctsio->io_hdr.nexus.targ_port!=0 && - ctsio->io_hdr.nexus.targ_port!=8) - desc1->identifier[7] += ctsio->io_hdr.nexus.targ_port-1; - else - desc1->identifier[7] += ctsio->io_hdr.nexus.targ_port; -#endif - - be64enc(desc1->identifier, port->wwpn); + if (port->port_devid) { + memcpy(desc, port->port_devid->data, port->port_devid->len); + desc = (struct scsi_vpd_id_descriptor *)((uint8_t *)desc + + port->port_devid->len); + } /* - * desc2 is for the Relative Target Port(type 4h) identifier + * This is for the Relative Target Port(type 4h) identifier */ - desc2->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_PORT - | SVPD_ID_TYPE_RELTARG; - desc2->length = 4; -//#if 0 - /* NOTE: if the port is 0 or 8 we don't want to subtract 1 */ - /* This is so Copancontrol will return something sane */ - if (ctsio->io_hdr.nexus.targ_port!=0 && - ctsio->io_hdr.nexus.targ_port!=8) - desc2->identifier[3] = ctsio->io_hdr.nexus.targ_port - 1; - else - desc2->identifier[3] = ctsio->io_hdr.nexus.targ_port; -//#endif + desc->proto_codeset = proto | SVPD_ID_CODESET_BINARY; + desc->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_PORT | + SVPD_ID_TYPE_RELTARG; + desc->length = 4; + scsi_ulto2b(ctsio->io_hdr.nexus.targ_port, &desc->identifier[2]); + desc = (struct scsi_vpd_id_descriptor *)(&desc->identifier[0] + + sizeof(struct scsi_vpd_id_rel_trgt_port_id)); /* - * desc3 is for the Target Port Group(type 5h) identifier + * This is for the Target Port Group(type 5h) identifier */ - desc3->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_PORT - | SVPD_ID_TYPE_TPORTGRP; - desc3->length = 4; + desc->proto_codeset = proto | SVPD_ID_CODESET_BINARY; + desc->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_PORT | + SVPD_ID_TYPE_TPORTGRP; + desc->length = 4; if (ctsio->io_hdr.nexus.targ_port < CTL_MAX_PORTS || ctl_is_single) - desc3->identifier[3] = 1; + scsi_ulto2b(1, &desc->identifier[2]); else - desc3->identifier[3] = 2; + scsi_ulto2b(2, &desc->identifier[2]); + desc = (struct scsi_vpd_id_descriptor *)(&desc->identifier[0] + + sizeof(struct scsi_vpd_id_trgt_port_grp_id)); /* - * If we've actually got a backend, copy the device id from the - * per-LUN data. Otherwise, set it to all spaces. + * This is for the Target identifier */ - if (lun != NULL) { - /* - * Copy the backend's LUN ID. - */ - strncpy((char *)t10id->vendor_spec_id, - (char *)lun->be_lun->device_id, devid_len); - } else { - /* - * No backend, set this to spaces. - */ - memset(t10id->vendor_spec_id, 0x20, devid_len); + if (port->target_devid) { + memcpy(desc, port->target_devid->data, port->target_devid->len); } ctsio->scsi_status = SCSI_STATUS_OK; - ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); Modified: stable/10/sys/cam/ctl/ctl_frontend.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend.c Tue Jul 15 17:05:11 2014 (r268682) +++ stable/10/sys/cam/ctl/ctl_frontend.c Tue Jul 15 17:06:10 2014 (r268683) @@ -219,6 +219,11 @@ ctl_port_deregister(struct ctl_port *por ctl_pool_free(pool); ctl_free_opts(&port->options); + free(port->port_devid, M_CTL); + port->port_devid = NULL; + free(port->target_devid, M_CTL); + port->target_devid = NULL; + bailout: return (retval); } @@ -227,11 +232,49 @@ void ctl_port_set_wwns(struct ctl_port *port, int wwnn_valid, uint64_t wwnn, int wwpn_valid, uint64_t wwpn) { - if (wwnn_valid) + struct scsi_vpd_id_descriptor *desc; + int len, proto; + + if (port->port_type == CTL_PORT_FC) + proto = SCSI_PROTO_FC << 4; + else if (port->port_type == CTL_PORT_ISCSI) + proto = SCSI_PROTO_ISCSI << 4; + else + proto = SCSI_PROTO_SPI << 4; + + if (wwnn_valid) { port->wwnn = wwnn; - if (wwpn_valid) + free(port->target_devid, M_CTL); + + len = sizeof(struct scsi_vpd_device_id) + CTL_WWPN_LEN; + port->target_devid = malloc(sizeof(struct ctl_devid) + len, + M_CTL, M_WAITOK | M_ZERO); + port->target_devid->len = len; + desc = (struct scsi_vpd_id_descriptor *)port->target_devid->data; + desc->proto_codeset = proto | SVPD_ID_CODESET_BINARY; + desc->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_TARGET | + SVPD_ID_TYPE_NAA; + desc->length = CTL_WWPN_LEN; + scsi_u64to8b(port->wwnn, desc->identifier); + } + + if (wwpn_valid) { port->wwpn = wwpn; + + free(port->port_devid, M_CTL); + + len = sizeof(struct scsi_vpd_device_id) + CTL_WWPN_LEN; + port->port_devid = malloc(sizeof(struct ctl_devid) + len, + M_CTL, M_WAITOK | M_ZERO); + port->port_devid->len = len; + desc = (struct scsi_vpd_id_descriptor *)port->port_devid->data; + desc->proto_codeset = proto | SVPD_ID_CODESET_BINARY; + desc->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_PORT | + SVPD_ID_TYPE_NAA; + desc->length = CTL_WWPN_LEN; + scsi_u64to8b(port->wwpn, desc->identifier); + } } void Modified: stable/10/sys/cam/ctl/ctl_frontend.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend.h Tue Jul 15 17:05:11 2014 (r268682) +++ stable/10/sys/cam/ctl/ctl_frontend.h Tue Jul 15 17:06:10 2014 (r268683) @@ -53,7 +53,6 @@ typedef int (*targ_func_t)(void *arg, st typedef int (*lun_func_t)(void *arg, struct ctl_id targ_id, int lun_id); typedef int (*fe_ioctl_t)(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td); -typedef int (*fe_devid_t)(struct ctl_scsiio *ctsio, int alloc_len); #define CTL_FRONTEND_DECLARE(name, driver) \ static int name ## _modevent(module_t mod, int type, void *data) \ @@ -218,7 +217,6 @@ struct ctl_port { void *onoff_arg; /* passed to CTL */ lun_func_t lun_enable; /* passed to CTL */ lun_func_t lun_disable; /* passed to CTL */ - fe_devid_t devid; /* passed to CTL */ void *targ_lun_arg; /* passed to CTL */ void (*fe_datamove)(union ctl_io *io); /* passed to CTL */ void (*fe_done)(union ctl_io *io); /* passed to CTL */ @@ -231,6 +229,8 @@ struct ctl_port { uint64_t wwpn; /* set by CTL before online */ ctl_port_status status; /* used by CTL */ ctl_options_t options; /* passed to CTL */ + struct ctl_devid *port_devid; /* passed to CTL */ + struct ctl_devid *target_devid; /* passed to CTL */ STAILQ_ENTRY(ctl_port) fe_links; /* used by CTL */ STAILQ_ENTRY(ctl_port) links; /* used by CTL */ }; Modified: stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Tue Jul 15 17:05:11 2014 (r268682) +++ stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Tue Jul 15 17:06:10 2014 (r268683) @@ -193,8 +193,7 @@ cfcs_init(void) /* Company ID */ 0x5000000000000000ULL | /* NL-Port */ 0x0300; softc->wwpn = softc->wwnn + port->targ_port + 1; - port->wwnn = softc->wwnn; - port->wwpn = softc->wwpn; + ctl_port_set_wwns(port, true, softc->wwnn, true, softc->wwpn); } else { softc->wwnn = port->wwnn; softc->wwpn = port->wwpn; Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Tue Jul 15 17:05:11 2014 (r268682) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Tue Jul 15 17:06:10 2014 (r268683) @@ -155,7 +155,6 @@ static int cfiscsi_lun_disable(void *arg struct ctl_id target_id, int lun_id); static int cfiscsi_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td); -static int cfiscsi_devid(struct ctl_scsiio *ctsio, int alloc_len); static void cfiscsi_datamove(union ctl_io *io); static void cfiscsi_done(union ctl_io *io); static uint32_t cfiscsi_map_lun(void *arg, uint32_t lun); @@ -1952,8 +1951,9 @@ cfiscsi_ioctl_port_create(struct ctl_req struct cfiscsi_target *ct; struct ctl_port *port; const char *target, *alias, *tag; + struct scsi_vpd_id_descriptor *desc; ctl_options_t opts; - int retval; + int retval, len, idlen; ctl_init_opts(&opts, req->num_args, req->kern_args); target = ctl_get_opt(&opts, "cfiscsi_target"); @@ -1998,7 +1998,6 @@ cfiscsi_ioctl_port_create(struct ctl_req port->lun_enable = cfiscsi_lun_enable; port->lun_disable = cfiscsi_lun_disable; port->targ_lun_arg = ct; - port->devid = cfiscsi_devid; port->fe_datamove = cfiscsi_datamove; port->fe_done = cfiscsi_done; @@ -2010,10 +2009,41 @@ cfiscsi_ioctl_port_create(struct ctl_req port->options = opts; STAILQ_INIT(&opts); + /* Generate Port ID. */ + idlen = strlen(target) + strlen(",t,0x0001") + 1; + idlen = roundup2(idlen, 4); + len = sizeof(struct scsi_vpd_device_id) + idlen; + port->port_devid = malloc(sizeof(struct ctl_devid) + len, + M_CTL, M_WAITOK | M_ZERO); + port->port_devid->len = len; + desc = (struct scsi_vpd_id_descriptor *)port->port_devid->data; + desc->proto_codeset = (SCSI_PROTO_ISCSI << 4) | SVPD_ID_CODESET_UTF8; + desc->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_PORT | + SVPD_ID_TYPE_SCSI_NAME; + desc->length = idlen; + snprintf(desc->identifier, idlen, "%s,t,0x%4.4x", + target, port->virtual_port); + + /* Generate Target ID. */ + idlen = strlen(target) + 1; + idlen = roundup2(idlen, 4); + len = sizeof(struct scsi_vpd_device_id) + idlen; + port->target_devid = malloc(sizeof(struct ctl_devid) + len, + M_CTL, M_WAITOK | M_ZERO); + port->target_devid->len = len; + desc = (struct scsi_vpd_id_descriptor *)port->target_devid->data; + desc->proto_codeset = (SCSI_PROTO_ISCSI << 4) | SVPD_ID_CODESET_UTF8; + desc->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_TARGET | + SVPD_ID_TYPE_SCSI_NAME; + desc->length = idlen; + strlcpy(desc->identifier, target, idlen); + retval = ctl_port_register(port, /*master_SC*/ 1); if (retval != 0) { ctl_free_opts(&port->options); cfiscsi_target_release(ct); + free(port->port_devid, M_CFISCSI); + free(port->target_devid, M_CFISCSI); req->status = CTL_LUN_ERROR; snprintf(req->error_str, sizeof(req->error_str), "ctl_frontend_register() failed with error %d", retval); @@ -2140,206 +2170,6 @@ cfiscsi_ioctl(struct cdev *dev, return (0); } -static int -cfiscsi_devid(struct ctl_scsiio *ctsio, int alloc_len) -{ - struct cfiscsi_session *cs; - struct scsi_vpd_device_id *devid_ptr; - struct scsi_vpd_id_descriptor *desc, *desc1, *desc2, *desc3, *desc4; - struct scsi_vpd_id_descriptor *desc5; - struct scsi_vpd_id_t10 *t10id; - struct ctl_lun *lun; - const struct icl_pdu *request; - int i, ret; - char *val; - size_t data_len, devid_len, wwnn_len, wwpn_len, lun_name_len; - - lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; - request = ctsio->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr; - cs = PDU_SESSION(request); - - wwpn_len = strlen(cs->cs_target->ct_name); - wwpn_len += strlen(",t,0x0001"); - wwpn_len += 1; /* '\0' */ - if ((wwpn_len % 4) != 0) - wwpn_len += (4 - (wwpn_len % 4)); - - wwnn_len = strlen(cs->cs_target->ct_name); - wwnn_len += 1; /* '\0' */ - if ((wwnn_len % 4) != 0) - wwnn_len += (4 - (wwnn_len % 4)); - - if (lun == NULL) { - devid_len = CTL_DEVID_MIN_LEN; - lun_name_len = 0; - } else { - devid_len = max(CTL_DEVID_MIN_LEN, - strnlen(lun->be_lun->device_id, CTL_DEVID_LEN)); - lun_name_len = strlen(cs->cs_target->ct_name); - lun_name_len += strlen(",lun,XXXXXXXX"); - lun_name_len += 1; /* '\0' */ - if ((lun_name_len % 4) != 0) - lun_name_len += (4 - (lun_name_len % 4)); - } - - data_len = sizeof(struct scsi_vpd_device_id) + - sizeof(struct scsi_vpd_id_descriptor) + - sizeof(struct scsi_vpd_id_t10) + devid_len + - sizeof(struct scsi_vpd_id_descriptor) + lun_name_len + - sizeof(struct scsi_vpd_id_descriptor) + wwnn_len + - sizeof(struct scsi_vpd_id_descriptor) + wwpn_len + - sizeof(struct scsi_vpd_id_descriptor) + - sizeof(struct scsi_vpd_id_rel_trgt_port_id) + - sizeof(struct scsi_vpd_id_descriptor) + - sizeof(struct scsi_vpd_id_trgt_port_grp_id); - - ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); - devid_ptr = (struct scsi_vpd_device_id *)ctsio->kern_data_ptr; - ctsio->kern_sg_entries = 0; - - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } - ctsio->kern_data_resid = 0; - ctsio->kern_rel_offset = 0; - ctsio->kern_sg_entries = 0; - - desc = (struct scsi_vpd_id_descriptor *)devid_ptr->desc_list; - t10id = (struct scsi_vpd_id_t10 *)&desc->identifier[0]; - desc1 = (struct scsi_vpd_id_descriptor *)(&desc->identifier[0] + - sizeof(struct scsi_vpd_id_t10) + devid_len); - desc2 = (struct scsi_vpd_id_descriptor *)(&desc1->identifier[0] + - lun_name_len); - desc3 = (struct scsi_vpd_id_descriptor *)(&desc2->identifier[0] + - wwnn_len); - desc4 = (struct scsi_vpd_id_descriptor *)(&desc3->identifier[0] + - wwpn_len); - desc5 = (struct scsi_vpd_id_descriptor *)(&desc4->identifier[0] + - sizeof(struct scsi_vpd_id_rel_trgt_port_id)); - - if (lun != NULL) - devid_ptr->device = (SID_QUAL_LU_CONNECTED << 5) | - lun->be_lun->lun_type; - else - devid_ptr->device = (SID_QUAL_LU_OFFLINE << 5) | T_DIRECT; - - devid_ptr->page_code = SVPD_DEVICE_ID; - - scsi_ulto2b(data_len - 4, devid_ptr->length); - - /* - * We're using a LUN association here. i.e., this device ID is a - * per-LUN identifier. - */ - desc->proto_codeset = (SCSI_PROTO_ISCSI << 4) | SVPD_ID_CODESET_ASCII; - desc->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_LUN | SVPD_ID_TYPE_T10; - desc->length = sizeof(*t10id) + devid_len; - if (lun == NULL || (val = ctl_get_opt(&lun->be_lun->options, - "vendor")) == NULL) { - strncpy((char *)t10id->vendor, CTL_VENDOR, sizeof(t10id->vendor)); - } else { - memset(t10id->vendor, ' ', sizeof(t10id->vendor)); - strncpy(t10id->vendor, val, - min(sizeof(t10id->vendor), strlen(val))); - } - - /* - * If we've actually got a backend, copy the device id from the - * per-LUN data. Otherwise, set it to all spaces. - */ - if (lun != NULL) { - /* - * Copy the backend's LUN ID. - */ - strncpy((char *)t10id->vendor_spec_id, - (char *)lun->be_lun->device_id, devid_len); - } else { - /* - * No backend, set this to spaces. - */ - memset(t10id->vendor_spec_id, 0x20, devid_len); - } - - /* - * desc1 is for the unique LUN name. - * - * XXX: According to SPC-3, LUN must report the same ID through - * all the ports. The code below, however, reports the - * ID only via iSCSI. - */ - desc1->proto_codeset = (SCSI_PROTO_ISCSI << 4) | SVPD_ID_CODESET_UTF8; - desc1->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_LUN | - SVPD_ID_TYPE_SCSI_NAME; - desc1->length = lun_name_len; - if (lun != NULL) { - /* - * Find the per-target LUN number. - */ - for (i = 0; i < CTL_MAX_LUNS; i++) { - if (cs->cs_target->ct_luns[i] == lun->lun) - break; - } - KASSERT(i < CTL_MAX_LUNS, - ("lun %jd not found", (uintmax_t)lun->lun)); - ret = snprintf(desc1->identifier, lun_name_len, "%s,lun,%d", - cs->cs_target->ct_name, i); - KASSERT(ret > 0 && ret <= lun_name_len, ("bad snprintf")); - } else { - KASSERT(lun_name_len == 0, ("no lun, but lun_name_len != 0")); - } - - /* - * desc2 is for the Target Name. - */ - desc2->proto_codeset = (SCSI_PROTO_ISCSI << 4) | SVPD_ID_CODESET_UTF8; - desc2->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_TARGET | - SVPD_ID_TYPE_SCSI_NAME; - desc2->length = wwnn_len; - snprintf(desc2->identifier, wwnn_len, "%s", cs->cs_target->ct_name); - - /* - * desc3 is for the WWPN which is a port asscociation. - */ - desc3->proto_codeset = (SCSI_PROTO_ISCSI << 4) | SVPD_ID_CODESET_UTF8; - desc3->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_PORT | - SVPD_ID_TYPE_SCSI_NAME; - desc3->length = wwpn_len; - snprintf(desc3->identifier, wwpn_len, "%s,t,0x%4.4x", - cs->cs_target->ct_name, cs->cs_portal_group_tag); - - /* - * desc3 is for the Relative Target Port(type 4h) identifier - */ - desc4->proto_codeset = (SCSI_PROTO_ISCSI << 4) | SVPD_ID_CODESET_BINARY; - desc4->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_PORT | - SVPD_ID_TYPE_RELTARG; - desc4->length = 4; - desc4->identifier[3] = 1; - - /* - * desc4 is for the Target Port Group(type 5h) identifier - */ - desc5->proto_codeset = (SCSI_PROTO_ISCSI << 4) | SVPD_ID_CODESET_BINARY; - desc5->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_PORT | - SVPD_ID_TYPE_TPORTGRP; - desc5->length = 4; - desc5->identifier[3] = 1; - - ctsio->scsi_status = SCSI_STATUS_OK; - - ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; - ctsio->be_move_done = ctl_config_move_done; - ctl_datamove((union ctl_io *)ctsio); - - return (CTL_RETVAL_COMPLETE); -} - static void cfiscsi_target_hold(struct cfiscsi_target *ct) { Modified: stable/10/sys/cam/ctl/ctl_private.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_private.h Tue Jul 15 17:05:11 2014 (r268682) +++ stable/10/sys/cam/ctl/ctl_private.h Tue Jul 15 17:06:10 2014 (r268683) @@ -367,6 +367,11 @@ struct ctl_per_res_info { #define CTL_PR_ALL_REGISTRANTS 0xFFFF #define CTL_PR_NO_RESERVATION 0xFFF0 +struct ctl_devid { + int len; + uint8_t data[]; +}; + /* * For report target port groups. */ @@ -402,6 +407,7 @@ struct ctl_lun { uint16_t pr_res_idx; uint8_t res_type; uint8_t write_buffer[524288]; + struct ctl_devid *lun_devid; }; typedef enum { Modified: stable/10/sys/cam/ctl/scsi_ctl.c ============================================================================== --- stable/10/sys/cam/ctl/scsi_ctl.c Tue Jul 15 17:05:11 2014 (r268682) +++ stable/10/sys/cam/ctl/scsi_ctl.c Tue Jul 15 17:06:10 2014 (r268683) @@ -1732,10 +1732,9 @@ ctlfe_onoffline(void *arg, int online) * using with the frontend code so it's reported * accurately. */ - bus_softc->port.wwnn = - ccb->knob.xport_specific.fc.wwnn; - bus_softc->port.wwpn = - ccb->knob.xport_specific.fc.wwpn; + ctl_port_set_wwns(&bus_softc->port, + true, ccb->knob.xport_specific.fc.wwnn, + true, ccb->knob.xport_specific.fc.wwpn); set_wwnn = 1; #else /* RANDOM_WWNN */ /* @@ -1751,10 +1750,9 @@ ctlfe_onoffline(void *arg, int online) bus_softc->port.wwpn; set_wwnn = 1; } else { - bus_softc->port.wwnn = - ccb->knob.xport_specific.fc.wwnn; - bus_softc->port.wwpn = - ccb->knob.xport_specific.fc.wwpn; + ctl_port_set_wwns(&bus_softc->port, + true, ccb->knob.xport_specific.fc.wwnn, + true, ccb->knob.xport_specific.fc.wwpn); } #endif /* RANDOM_WWNN */ Modified: stable/10/usr.sbin/ctladm/ctladm.8 ============================================================================== --- stable/10/usr.sbin/ctladm/ctladm.8 Tue Jul 15 17:05:11 2014 (r268682) +++ stable/10/usr.sbin/ctladm/ctladm.8 Tue Jul 15 17:06:10 2014 (r268683) @@ -945,6 +945,8 @@ Specifies LUN vendor string up to 8 char Specifies LUN product string up to 16 chars. .It Va revision Specifies LUN revision string up to 4 chars. +.It Va scsiname +Specifies LUN SCSI name string. .It Va unmap Set to "on", enables UNMAP support for the LUN. .El Modified: stable/10/usr.sbin/ctld/kernel.c ============================================================================== --- stable/10/usr.sbin/ctld/kernel.c Tue Jul 15 17:05:11 2014 (r268682) +++ stable/10/usr.sbin/ctld/kernel.c Tue Jul 15 17:06:10 2014 (r268683) @@ -113,7 +113,6 @@ struct cctl_lun { char *serial_number; char *device_id; char *cfiscsi_target; - char *cfiscsi_target_alias; int cfiscsi_lun; STAILQ_HEAD(,cctl_lun_nv) attr_list; STAILQ_ENTRY(cctl_lun) links; @@ -230,9 +229,6 @@ cctl_end_element(void *user_data, const } else if (strcmp(name, "cfiscsi_target") == 0) { cur_lun->cfiscsi_target = str; str = NULL; - } else if (strcmp(name, "cfiscsi_target_alias") == 0) { - cur_lun->cfiscsi_target_alias = str; - str = NULL; } else if (strcmp(name, "cfiscsi_lun") == 0) { cur_lun->cfiscsi_lun = strtoul(str, NULL, 0); } else if (strcmp(name, "lun") == 0) { @@ -640,17 +636,6 @@ kernel_lun_add(struct lun *lun) assert(lo != NULL); } - if (lun->l_target->t_alias != NULL) { - lo = lun_option_find(lun, "cfiscsi_target_alias"); - if (lo != NULL) { - lun_option_set(lo, lun->l_target->t_alias); - } else { - lo = lun_option_new(lun, "cfiscsi_target_alias", - lun->l_target->t_alias); - assert(lo != NULL); - } - } - asprintf(&tmp, "%d", lun->l_lun); if (tmp == NULL) log_errx(1, "asprintf"); @@ -664,6 +649,19 @@ kernel_lun_add(struct lun *lun) assert(lo != NULL); } + asprintf(&tmp, "%s,lun,%d", lun->l_target->t_name, lun->l_lun); + if (tmp == NULL) + log_errx(1, "asprintf"); + lo = lun_option_find(lun, "scsiname"); + if (lo != NULL) { + lun_option_set(lo, tmp); + free(tmp); + } else { + lo = lun_option_new(lun, "scsiname", tmp); + free(tmp); + assert(lo != NULL); + } + num_options = 0; TAILQ_FOREACH(lo, &lun->l_options, lo_next) num_options++; From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 17:07:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DEE0DDEE; Tue, 15 Jul 2014 17:07:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA91F2C99; Tue, 15 Jul 2014 17:07:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FH78wo084120; Tue, 15 Jul 2014 17:07:08 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FH77hh084113; Tue, 15 Jul 2014 17:07:07 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407151707.s6FH77hh084113@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jul 2014 17:07:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268684 - in stable/10: sys/cam/ctl usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 17:07:09 -0000 Author: mav Date: Tue Jul 15 17:07:07 2014 New Revision: 268684 URL: http://svnweb.freebsd.org/changeset/base/268684 Log: MFC r268302: Pass through iSCSI session ISID from LOGIN request to the CTL frontend. ISID is an important part of initiator transport ID for iSCSI. It is not used now, but should be to properly implement persistent reservation. Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/sys/cam/ctl/ctl_frontend_iscsi.h stable/10/sys/cam/ctl/ctl_ioctl.h stable/10/usr.sbin/ctld/ctld.h stable/10/usr.sbin/ctld/kernel.c stable/10/usr.sbin/ctld/login.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Tue Jul 15 17:06:10 2014 (r268683) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Tue Jul 15 17:07:07 2014 (r268684) @@ -1511,6 +1511,13 @@ cfiscsi_ioctl_handoff(struct ctl_iscsi * cihp->initiator_addr, sizeof(cs->cs_initiator_addr)); strlcpy(cs->cs_initiator_alias, cihp->initiator_alias, sizeof(cs->cs_initiator_alias)); + memcpy(cs->cs_initiator_isid, + cihp->initiator_isid, sizeof(cs->cs_initiator_isid)); + snprintf(cs->cs_initiator_id, sizeof(cs->cs_initiator_id), + "%s,i,0x%02x%02x%02x%02x%02x%02x", cs->cs_initiator_name, + cihp->initiator_isid[0], cihp->initiator_isid[1], + cihp->initiator_isid[2], cihp->initiator_isid[3], + cihp->initiator_isid[4], cihp->initiator_isid[5]); #ifdef ICL_KERNEL_PROXY if (cihp->socket > 0) { Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.h Tue Jul 15 17:06:10 2014 (r268683) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.h Tue Jul 15 17:07:07 2014 (r268684) @@ -86,6 +86,8 @@ struct cfiscsi_session { char cs_initiator_name[CTL_ISCSI_NAME_LEN]; char cs_initiator_addr[CTL_ISCSI_ADDR_LEN]; char cs_initiator_alias[CTL_ISCSI_ALIAS_LEN]; + char cs_initiator_isid[6]; + char cs_initiator_id[CTL_ISCSI_NAME_LEN + 5 + 6 + 1]; unsigned int cs_id; int cs_ctl_initid; #ifdef ICL_KERNEL_PROXY Modified: stable/10/sys/cam/ctl/ctl_ioctl.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_ioctl.h Tue Jul 15 17:06:10 2014 (r268683) +++ stable/10/sys/cam/ctl/ctl_ioctl.h Tue Jul 15 17:07:07 2014 (r268684) @@ -681,6 +681,7 @@ struct ctl_iscsi_handoff_params { char initiator_name[CTL_ISCSI_NAME_LEN]; char initiator_addr[CTL_ISCSI_ADDR_LEN]; char initiator_alias[CTL_ISCSI_ALIAS_LEN]; + uint8_t initiator_isid[6]; char target_name[CTL_ISCSI_NAME_LEN]; int socket; int portal_group_tag; Modified: stable/10/usr.sbin/ctld/ctld.h ============================================================================== --- stable/10/usr.sbin/ctld/ctld.h Tue Jul 15 17:06:10 2014 (r268683) +++ stable/10/usr.sbin/ctld/ctld.h Tue Jul 15 17:07:07 2014 (r268684) @@ -178,6 +178,7 @@ struct connection { char *conn_initiator_name; char *conn_initiator_addr; char *conn_initiator_alias; + uint8_t conn_initiator_isid[6]; uint32_t conn_cmdsn; uint32_t conn_statsn; size_t conn_max_data_segment_length; Modified: stable/10/usr.sbin/ctld/kernel.c ============================================================================== --- stable/10/usr.sbin/ctld/kernel.c Tue Jul 15 17:06:10 2014 (r268683) +++ stable/10/usr.sbin/ctld/kernel.c Tue Jul 15 17:07:07 2014 (r268684) @@ -787,6 +787,8 @@ kernel_handoff(struct connection *conn) strlcpy(req.data.handoff.initiator_alias, conn->conn_initiator_alias, sizeof(req.data.handoff.initiator_alias)); } + memcpy(req.data.handoff.initiator_isid, conn->conn_initiator_isid, + sizeof(req.data.handoff.initiator_isid)); strlcpy(req.data.handoff.target_name, conn->conn_target->t_name, sizeof(req.data.handoff.target_name)); #ifdef ICL_KERNEL_PROXY Modified: stable/10/usr.sbin/ctld/login.c ============================================================================== --- stable/10/usr.sbin/ctld/login.c Tue Jul 15 17:06:10 2014 (r268683) +++ stable/10/usr.sbin/ctld/login.c Tue Jul 15 17:07:07 2014 (r268684) @@ -850,6 +850,9 @@ login(struct connection *conn) log_errx(1, "received Login PDU with non-zero TSIH"); } + memcpy(conn->conn_initiator_isid, bhslr->bhslr_isid, + sizeof(conn->conn_initiator_isid)); + /* * XXX: Implement the C flag some day. */ From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 17:08:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1808AF3B; Tue, 15 Jul 2014 17:08:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 038C42CA7; Tue, 15 Jul 2014 17:08:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FH85mx084347; Tue, 15 Jul 2014 17:08:05 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FH84ZS084338; Tue, 15 Jul 2014 17:08:04 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407151708.s6FH84ZS084338@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jul 2014 17:08:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268685 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 17:08:06 -0000 Author: mav Date: Tue Jul 15 17:08:04 2014 New Revision: 268685 URL: http://svnweb.freebsd.org/changeset/base/268685 Log: MFC r268307: Move lun_map() method from command nexus to port. Previous implementation made impossible to do some things, such as calling it for ports other then one through which command arrived. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_frontend.h stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/sys/cam/ctl/ctl_frontend_iscsi.h stable/10/sys/cam/ctl/ctl_io.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Tue Jul 15 17:07:07 2014 (r268684) +++ stable/10/sys/cam/ctl/ctl.c Tue Jul 15 17:08:04 2014 (r268685) @@ -348,6 +348,7 @@ static int ctl_ioctl(struct cdev *dev, u struct thread *td); uint32_t ctl_get_resindex(struct ctl_nexus *nexus); uint32_t ctl_port_idx(int port_num); +static uint32_t ctl_map_lun(int port_num, uint32_t lun); #ifdef unused static union ctl_io *ctl_malloc_io(ctl_io_type io_type, uint32_t targ_port, uint32_t targ_target, uint32_t targ_lun, @@ -3347,6 +3348,19 @@ ctl_port_idx(int port_num) return(port_num - CTL_MAX_PORTS); } +static uint32_t +ctl_map_lun(int port_num, uint32_t lun_id) +{ + struct ctl_port *port; + + port = control_softc->ctl_ports[ctl_port_idx(port_num)]; + if (port == NULL) + return (UINT32_MAX); + if (port->lun_map == NULL) + return (lun_id); + return (port->lun_map(port->targ_lun_arg, lun_id)); +} + /* * Note: This only works for bitmask sizes that are at least 32 bits, and * that are a power of 2. @@ -9258,9 +9272,7 @@ ctl_report_luns(struct ctl_scsiio *ctsio mtx_lock(&control_softc->ctl_lock); for (targ_lun_id = 0, num_filled = 0; targ_lun_id < CTL_MAX_LUNS && num_filled < num_luns; targ_lun_id++) { - lun_id = targ_lun_id; - if (ctsio->io_hdr.nexus.lun_map_fn != NULL) - lun_id = ctsio->io_hdr.nexus.lun_map_fn(ctsio->io_hdr.nexus.lun_map_arg, lun_id); + lun_id = ctl_map_lun(ctsio->io_hdr.nexus.targ_port, targ_lun_id); if (lun_id >= CTL_MAX_LUNS) continue; lun = control_softc->ctl_luns[lun_id]; @@ -13238,8 +13250,7 @@ ctl_queue_sense(union ctl_io *io) * information. */ targ_lun = io->io_hdr.nexus.targ_lun; - if (io->io_hdr.nexus.lun_map_fn != NULL) - targ_lun = io->io_hdr.nexus.lun_map_fn(io->io_hdr.nexus.lun_map_arg, targ_lun); + targ_lun = ctl_map_lun(io->io_hdr.nexus.targ_port, targ_lun); if ((targ_lun < CTL_MAX_LUNS) && (ctl_softc->ctl_luns[targ_lun] != NULL)) lun = ctl_softc->ctl_luns[targ_lun]; @@ -13290,11 +13301,8 @@ ctl_queue(union ctl_io *io) #endif /* CTL_TIME_IO */ /* Map FE-specific LUN ID into global one. */ - if (io->io_hdr.nexus.lun_map_fn != NULL) - io->io_hdr.nexus.targ_mapped_lun = io->io_hdr.nexus.lun_map_fn( - io->io_hdr.nexus.lun_map_arg, io->io_hdr.nexus.targ_lun); - else - io->io_hdr.nexus.targ_mapped_lun = io->io_hdr.nexus.targ_lun; + io->io_hdr.nexus.targ_mapped_lun = + ctl_map_lun(io->io_hdr.nexus.targ_port, io->io_hdr.nexus.targ_lun); switch (io->io_hdr.io_type) { case CTL_IO_SCSI: Modified: stable/10/sys/cam/ctl/ctl_frontend.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend.h Tue Jul 15 17:07:07 2014 (r268684) +++ stable/10/sys/cam/ctl/ctl_frontend.h Tue Jul 15 17:08:04 2014 (r268685) @@ -49,8 +49,8 @@ typedef enum { typedef int (*fe_init_t)(void); typedef void (*fe_shutdown_t)(void); typedef void (*port_func_t)(void *onoff_arg); -typedef int (*targ_func_t)(void *arg, struct ctl_id targ_id); typedef int (*lun_func_t)(void *arg, struct ctl_id targ_id, int lun_id); +typedef uint32_t (*lun_map_func_t)(void *arg, uint32_t lun_id); typedef int (*fe_ioctl_t)(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td); @@ -217,6 +217,7 @@ struct ctl_port { void *onoff_arg; /* passed to CTL */ lun_func_t lun_enable; /* passed to CTL */ lun_func_t lun_disable; /* passed to CTL */ + lun_map_func_t lun_map; /* passed to CTL */ void *targ_lun_arg; /* passed to CTL */ void (*fe_datamove)(union ctl_io *io); /* passed to CTL */ void (*fe_done)(union ctl_io *io); /* passed to CTL */ Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Tue Jul 15 17:07:07 2014 (r268684) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Tue Jul 15 17:08:04 2014 (r268685) @@ -153,11 +153,11 @@ static int cfiscsi_lun_enable(void *arg, struct ctl_id target_id, int lun_id); static int cfiscsi_lun_disable(void *arg, struct ctl_id target_id, int lun_id); +static uint32_t cfiscsi_lun_map(void *arg, uint32_t lun); static int cfiscsi_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td); static void cfiscsi_datamove(union ctl_io *io); static void cfiscsi_done(union ctl_io *io); -static uint32_t cfiscsi_map_lun(void *arg, uint32_t lun); static bool cfiscsi_pdu_update_cmdsn(const struct icl_pdu *request); static void cfiscsi_pdu_handle_nop_out(struct icl_pdu *request); static void cfiscsi_pdu_handle_scsi_command(struct icl_pdu *request); @@ -556,8 +556,6 @@ cfiscsi_pdu_handle_scsi_command(struct i io->io_hdr.nexus.targ_port = cs->cs_target->ct_port.targ_port; io->io_hdr.nexus.targ_target.id = 0; io->io_hdr.nexus.targ_lun = cfiscsi_decode_lun(bhssc->bhssc_lun); - io->io_hdr.nexus.lun_map_fn = cfiscsi_map_lun; - io->io_hdr.nexus.lun_map_arg = cs; io->scsiio.tag_num = bhssc->bhssc_initiator_task_tag; switch ((bhssc->bhssc_flags & BHSSC_FLAGS_ATTR)) { case BHSSC_FLAGS_ATTR_UNTAGGED: @@ -622,8 +620,6 @@ cfiscsi_pdu_handle_task_request(struct i io->io_hdr.nexus.targ_port = cs->cs_target->ct_port.targ_port; io->io_hdr.nexus.targ_target.id = 0; io->io_hdr.nexus.targ_lun = cfiscsi_decode_lun(bhstmr->bhstmr_lun); - io->io_hdr.nexus.lun_map_fn = cfiscsi_map_lun; - io->io_hdr.nexus.lun_map_arg = cs; io->taskio.tag_type = CTL_TAG_SIMPLE; /* XXX */ switch (bhstmr->bhstmr_function & ~0x80) { @@ -2004,6 +2000,7 @@ cfiscsi_ioctl_port_create(struct ctl_req port->onoff_arg = ct; port->lun_enable = cfiscsi_lun_enable; port->lun_disable = cfiscsi_lun_disable; + port->lun_map = cfiscsi_lun_map; port->targ_lun_arg = ct; port->fe_datamove = cfiscsi_datamove; port->fe_done = cfiscsi_done; @@ -2250,7 +2247,7 @@ cfiscsi_target_find_or_create(struct cfi } for (i = 0; i < CTL_MAX_LUNS; i++) - newct->ct_luns[i] = -1; + newct->ct_luns[i] = UINT32_MAX; strlcpy(newct->ct_name, name, sizeof(newct->ct_name)); if (alias != NULL) @@ -2267,22 +2264,16 @@ cfiscsi_target_find_or_create(struct cfi * Takes LUN from the target space and returns LUN from the CTL space. */ static uint32_t -cfiscsi_map_lun(void *arg, uint32_t lun) +cfiscsi_lun_map(void *arg, uint32_t lun) { - struct cfiscsi_session *cs; - - cs = arg; + struct cfiscsi_target *ct = arg; if (lun >= CTL_MAX_LUNS) { CFISCSI_DEBUG("requested lun number %d is higher " "than maximum %d", lun, CTL_MAX_LUNS - 1); - return (0xffffffff); + return (UINT32_MAX); } - - if (cs->cs_target->ct_luns[lun] < 0) - return (0xffffffff); - - return (cs->cs_target->ct_luns[lun]); + return (ct->ct_luns[lun]); } static int @@ -2296,7 +2287,7 @@ cfiscsi_target_set_lun(struct cfiscsi_ta return (-1); } - if (ct->ct_luns[lun_id] >= 0) { + if (ct->ct_luns[lun_id] < CTL_MAX_LUNS) { /* * CTL calls cfiscsi_lun_enable() twice for each LUN - once * when the LUN is created, and a second time just before @@ -2365,11 +2356,9 @@ cfiscsi_lun_disable(void *arg, struct ct mtx_lock(&softc->lock); for (i = 0; i < CTL_MAX_LUNS; i++) { - if (ct->ct_luns[i] < 0) - continue; if (ct->ct_luns[i] != lun_id) continue; - ct->ct_luns[lun_id] = -1; + ct->ct_luns[i] = UINT32_MAX; break; } mtx_unlock(&softc->lock); Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.h Tue Jul 15 17:07:07 2014 (r268684) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.h Tue Jul 15 17:08:04 2014 (r268685) @@ -38,7 +38,7 @@ struct cfiscsi_target { TAILQ_ENTRY(cfiscsi_target) ct_next; - int ct_luns[CTL_MAX_LUNS]; + uint32_t ct_luns[CTL_MAX_LUNS]; struct cfiscsi_softc *ct_softc; volatile u_int ct_refcount; char ct_name[CTL_ISCSI_NAME_LEN]; Modified: stable/10/sys/cam/ctl/ctl_io.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_io.h Tue Jul 15 17:07:07 2014 (r268684) +++ stable/10/sys/cam/ctl/ctl_io.h Tue Jul 15 17:08:04 2014 (r268685) @@ -221,8 +221,6 @@ struct ctl_nexus { struct ctl_id targ_target; /* Destination target */ uint32_t targ_lun; /* Destination lun */ uint32_t targ_mapped_lun; /* Destination lun CTL-wide */ - uint32_t (*lun_map_fn)(void *arg, uint32_t lun); - void *lun_map_arg; }; typedef enum { From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 17:09:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1FF37137; Tue, 15 Jul 2014 17:09:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C0862CBC; Tue, 15 Jul 2014 17:09:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FH92eJ084572; Tue, 15 Jul 2014 17:09:02 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FH92pQ084565; Tue, 15 Jul 2014 17:09:02 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407151709.s6FH92pQ084565@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jul 2014 17:09:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268686 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 17:09:03 -0000 Author: mav Date: Tue Jul 15 17:09:02 2014 New Revision: 268686 URL: http://svnweb.freebsd.org/changeset/base/268686 Log: MFC r268308: Make REPORT TARGET PORT GROUPS command report realistic data instead of hardcoded garbage. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_private.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Tue Jul 15 17:08:04 2014 (r268685) +++ stable/10/sys/cam/ctl/ctl.c Tue Jul 15 17:09:02 2014 (r268686) @@ -349,6 +349,7 @@ static int ctl_ioctl(struct cdev *dev, u uint32_t ctl_get_resindex(struct ctl_nexus *nexus); uint32_t ctl_port_idx(int port_num); static uint32_t ctl_map_lun(int port_num, uint32_t lun); +static uint32_t ctl_map_lun_back(int port_num, uint32_t lun); #ifdef unused static union ctl_io *ctl_malloc_io(ctl_io_type io_type, uint32_t targ_port, uint32_t targ_target, uint32_t targ_lun, @@ -3361,6 +3362,22 @@ ctl_map_lun(int port_num, uint32_t lun_i return (port->lun_map(port->targ_lun_arg, lun_id)); } +static uint32_t +ctl_map_lun_back(int port_num, uint32_t lun_id) +{ + struct ctl_port *port; + uint32_t i; + + port = control_softc->ctl_ports[ctl_port_idx(port_num)]; + if (port->lun_map == NULL) + return (lun_id); + for (i = 0; i < CTL_MAX_LUNS; i++) { + if (port->lun_map(port->targ_lun_arg, i) == lun_id) + return (i); + } + return (UINT32_MAX); +} + /* * Note: This only works for bitmask sizes that are at least 32 bits, and * that are a power of 2. @@ -7120,14 +7137,14 @@ ctl_report_tagret_port_groups(struct ctl { struct scsi_maintenance_in *cdb; int retval; - int alloc_len, total_len = 0; - int num_target_port_groups, single; + int alloc_len, ext, total_len = 0, g, p, pc, pg; + int num_target_port_groups, num_target_ports, single; struct ctl_lun *lun; struct ctl_softc *softc; + struct ctl_port *port; struct scsi_target_group_data *rtg_ptr; - struct scsi_target_port_group_descriptor *tpg_desc_ptr1, *tpg_desc_ptr2; - struct scsi_target_port_descriptor *tp_desc_ptr1_1, *tp_desc_ptr1_2, - *tp_desc_ptr2_1, *tp_desc_ptr2_2; + struct scsi_target_group_data_extended *rtg_ext_ptr; + struct scsi_target_port_group_descriptor *tpg_desc; CTL_DEBUG_PRINT(("ctl_report_tagret_port_groups\n")); @@ -7137,17 +7154,48 @@ ctl_report_tagret_port_groups(struct ctl retval = CTL_RETVAL_COMPLETE; + switch (cdb->byte2 & STG_PDF_MASK) { + case STG_PDF_LENGTH: + ext = 0; + break; + case STG_PDF_EXTENDED: + ext = 1; + break; + default: + ctl_set_invalid_field(/*ctsio*/ ctsio, + /*sks_valid*/ 1, + /*command*/ 1, + /*field*/ 2, + /*bit_valid*/ 1, + /*bit*/ 5); + ctl_done((union ctl_io *)ctsio); + return(retval); + } + single = ctl_is_single; if (single) - num_target_port_groups = NUM_TARGET_PORT_GROUPS - 1; + num_target_port_groups = 1; else - num_target_port_groups = NUM_TARGET_PORT_GROUPS; + num_target_port_groups = NUM_TARGET_PORT_GROUPS; + num_target_ports = 0; + mtx_lock(&softc->ctl_lock); + STAILQ_FOREACH(port, &softc->port_list, links) { + if ((port->status & CTL_PORT_STATUS_ONLINE) == 0) + continue; + if (ctl_map_lun_back(port->targ_port, lun->lun) >= CTL_MAX_LUNS) + continue; + num_target_ports++; + } + mtx_unlock(&softc->ctl_lock); - total_len = sizeof(struct scsi_target_group_data) + - sizeof(struct scsi_target_port_group_descriptor) * + if (ext) + total_len = sizeof(struct scsi_target_group_data_extended); + else + total_len = sizeof(struct scsi_target_group_data); + total_len += sizeof(struct scsi_target_port_group_descriptor) * num_target_port_groups + - sizeof(struct scsi_target_port_descriptor) * - NUM_PORTS_PER_GRP * num_target_port_groups; + sizeof(struct scsi_target_port_descriptor) * + num_target_ports * num_target_port_groups; alloc_len = scsi_4btoul(cdb->length); @@ -7167,76 +7215,51 @@ ctl_report_tagret_port_groups(struct ctl ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; - rtg_ptr = (struct scsi_target_group_data *)ctsio->kern_data_ptr; - - tpg_desc_ptr1 = &rtg_ptr->groups[0]; - tp_desc_ptr1_1 = &tpg_desc_ptr1->descriptors[0]; - tp_desc_ptr1_2 = (struct scsi_target_port_descriptor *) - &tp_desc_ptr1_1->desc_list[0]; - - if (single == 0) { - tpg_desc_ptr2 = (struct scsi_target_port_group_descriptor *) - &tp_desc_ptr1_2->desc_list[0]; - tp_desc_ptr2_1 = &tpg_desc_ptr2->descriptors[0]; - tp_desc_ptr2_2 = (struct scsi_target_port_descriptor *) - &tp_desc_ptr2_1->desc_list[0]; - } else { - tpg_desc_ptr2 = NULL; - tp_desc_ptr2_1 = NULL; - tp_desc_ptr2_2 = NULL; - } - - scsi_ulto4b(total_len - 4, rtg_ptr->length); - if (single == 0) { - if (ctsio->io_hdr.nexus.targ_port < CTL_MAX_PORTS) { - if (lun->flags & CTL_LUN_PRIMARY_SC) { - tpg_desc_ptr1->pref_state = TPG_PRIMARY; - tpg_desc_ptr2->pref_state = - TPG_ASYMMETRIC_ACCESS_NONOPTIMIZED; - } else { - tpg_desc_ptr1->pref_state = - TPG_ASYMMETRIC_ACCESS_NONOPTIMIZED; - tpg_desc_ptr2->pref_state = TPG_PRIMARY; - } - } else { - if (lun->flags & CTL_LUN_PRIMARY_SC) { - tpg_desc_ptr1->pref_state = - TPG_ASYMMETRIC_ACCESS_NONOPTIMIZED; - tpg_desc_ptr2->pref_state = TPG_PRIMARY; - } else { - tpg_desc_ptr1->pref_state = TPG_PRIMARY; - tpg_desc_ptr2->pref_state = - TPG_ASYMMETRIC_ACCESS_NONOPTIMIZED; - } - } + if (ext) { + rtg_ext_ptr = (struct scsi_target_group_data_extended *) + ctsio->kern_data_ptr; + scsi_ulto4b(total_len - 4, rtg_ext_ptr->length); + rtg_ext_ptr->format_type = 0x10; + rtg_ext_ptr->implicit_transition_time = 0; + tpg_desc = &rtg_ext_ptr->groups[0]; } else { - tpg_desc_ptr1->pref_state = TPG_PRIMARY; + rtg_ptr = (struct scsi_target_group_data *) + ctsio->kern_data_ptr; + scsi_ulto4b(total_len - 4, rtg_ptr->length); + tpg_desc = &rtg_ptr->groups[0]; } - tpg_desc_ptr1->support = 0; - tpg_desc_ptr1->target_port_group[1] = 1; - tpg_desc_ptr1->status = TPG_IMPLICIT; - tpg_desc_ptr1->target_port_count= NUM_PORTS_PER_GRP; - - if (single == 0) { - tpg_desc_ptr2->support = 0; - tpg_desc_ptr2->target_port_group[1] = 2; - tpg_desc_ptr2->status = TPG_IMPLICIT; - tpg_desc_ptr2->target_port_count = NUM_PORTS_PER_GRP; - tp_desc_ptr1_1->relative_target_port_identifier[1] = 1; - tp_desc_ptr1_2->relative_target_port_identifier[1] = 2; - - tp_desc_ptr2_1->relative_target_port_identifier[1] = 9; - tp_desc_ptr2_2->relative_target_port_identifier[1] = 10; - } else { - if (ctsio->io_hdr.nexus.targ_port < CTL_MAX_PORTS) { - tp_desc_ptr1_1->relative_target_port_identifier[1] = 1; - tp_desc_ptr1_2->relative_target_port_identifier[1] = 2; - } else { - tp_desc_ptr1_1->relative_target_port_identifier[1] = 9; - tp_desc_ptr1_2->relative_target_port_identifier[1] = 10; - } + pg = ctsio->io_hdr.nexus.targ_port / CTL_MAX_PORTS; + mtx_lock(&softc->ctl_lock); + for (g = 0; g < num_target_port_groups; g++) { + if (g == pg) + tpg_desc->pref_state = TPG_PRIMARY | + TPG_ASYMMETRIC_ACCESS_OPTIMIZED; + else + tpg_desc->pref_state = + TPG_ASYMMETRIC_ACCESS_NONOPTIMIZED; + tpg_desc->support = TPG_AO_SUP; + if (!single) + tpg_desc->support = TPG_AN_SUP; + scsi_ulto2b(g + 1, tpg_desc->target_port_group); + tpg_desc->status = TPG_IMPLICIT; + pc = 0; + STAILQ_FOREACH(port, &softc->port_list, links) { + if ((port->status & CTL_PORT_STATUS_ONLINE) == 0) + continue; + if (ctl_map_lun_back(port->targ_port, lun->lun) >= + CTL_MAX_LUNS) + continue; + p = port->targ_port % CTL_MAX_PORTS + g * CTL_MAX_PORTS; + scsi_ulto2b(p, tpg_desc->descriptors[pc]. + relative_target_port_identifier); + pc++; + } + tpg_desc->target_port_count = pc; + tpg_desc = (struct scsi_target_port_group_descriptor *) + &tpg_desc->descriptors[pc]; } + mtx_unlock(&softc->ctl_lock); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; @@ -9778,10 +9801,8 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio desc->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_PORT | SVPD_ID_TYPE_TPORTGRP; desc->length = 4; - if (ctsio->io_hdr.nexus.targ_port < CTL_MAX_PORTS || ctl_is_single) - scsi_ulto2b(1, &desc->identifier[2]); - else - scsi_ulto2b(2, &desc->identifier[2]); + scsi_ulto2b(ctsio->io_hdr.nexus.targ_port / CTL_MAX_PORTS + 1, + &desc->identifier[2]); desc = (struct scsi_vpd_id_descriptor *)(&desc->identifier[0] + sizeof(struct scsi_vpd_id_trgt_port_grp_id)); Modified: stable/10/sys/cam/ctl/ctl_private.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_private.h Tue Jul 15 17:08:04 2014 (r268685) +++ stable/10/sys/cam/ctl/ctl_private.h Tue Jul 15 17:09:02 2014 (r268686) @@ -376,7 +376,6 @@ struct ctl_devid { * For report target port groups. */ #define NUM_TARGET_PORT_GROUPS 2 -#define NUM_PORTS_PER_GRP 2 struct ctl_lun { struct mtx lun_lock; From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 17:09:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6CDB0386; Tue, 15 Jul 2014 17:09:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D1662CDA; Tue, 15 Jul 2014 17:09:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FH9rqd085123; Tue, 15 Jul 2014 17:09:53 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FH9qmp085121; Tue, 15 Jul 2014 17:09:52 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407151709.s6FH9qmp085121@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jul 2014 17:09:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268687 - in stable/10/sys/cam: ctl scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 17:09:53 -0000 Author: mav Date: Tue Jul 15 17:09:52 2014 New Revision: 268687 URL: http://svnweb.freebsd.org/changeset/base/268687 Log: MFC r268309: Add support for SCSI Ports (88h) VPD page. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/scsi/scsi_all.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Tue Jul 15 17:09:02 2014 (r268686) +++ stable/10/sys/cam/ctl/ctl.c Tue Jul 15 17:09:52 2014 (r268687) @@ -317,10 +317,11 @@ SYSCTL_INT(_kern_cam_ctl, OID_AUTO, verb &verbose, 0, "Show SCSI errors returned to initiator"); /* - * Serial number (0x80), device id (0x83), supported pages (0x00), - * Block limits (0xB0) and Logical Block Provisioning (0xB2) + * Supported pages (0x00), Serial number (0x80), Device ID (0x83), + * SCSI Ports (0x88), Block limits (0xB0) and + * Logical Block Provisioning (0xB2) */ -#define SCSI_EVPD_NUM_SUPPORTED_PAGES 5 +#define SCSI_EVPD_NUM_SUPPORTED_PAGES 6 static void ctl_isc_event_handler(ctl_ha_channel chanel, ctl_ha_event event, int param); @@ -378,6 +379,8 @@ static void ctl_hndl_per_res_out_on_othe static int ctl_inquiry_evpd_supported(struct ctl_scsiio *ctsio, int alloc_len); static int ctl_inquiry_evpd_serial(struct ctl_scsiio *ctsio, int alloc_len); static int ctl_inquiry_evpd_devid(struct ctl_scsiio *ctsio, int alloc_len); +static int ctl_inquiry_evpd_scsi_ports(struct ctl_scsiio *ctsio, + int alloc_len); static int ctl_inquiry_evpd_block_limits(struct ctl_scsiio *ctsio, int alloc_len); static int ctl_inquiry_evpd_lbp(struct ctl_scsiio *ctsio, int alloc_len); @@ -7240,7 +7243,7 @@ ctl_report_tagret_port_groups(struct ctl TPG_ASYMMETRIC_ACCESS_NONOPTIMIZED; tpg_desc->support = TPG_AO_SUP; if (!single) - tpg_desc->support = TPG_AN_SUP; + tpg_desc->support |= TPG_AN_SUP; scsi_ulto2b(g + 1, tpg_desc->target_port_group); tpg_desc->status = TPG_IMPLICIT; pc = 0; @@ -9628,10 +9631,12 @@ ctl_inquiry_evpd_supported(struct ctl_sc pages->page_list[1] = SVPD_UNIT_SERIAL_NUMBER; /* Device Identification */ pages->page_list[2] = SVPD_DEVICE_ID; + /* SCSI Ports */ + pages->page_list[3] = SVPD_SCSI_PORTS; /* Block limits */ - pages->page_list[3] = SVPD_BLOCK_LIMITS; + pages->page_list[4] = SVPD_BLOCK_LIMITS; /* Logical Block Provisioning */ - pages->page_list[4] = SVPD_LBP; + pages->page_list[5] = SVPD_LBP; ctsio->scsi_status = SCSI_STATUS_OK; @@ -9822,6 +9827,117 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio } static int +ctl_inquiry_evpd_scsi_ports(struct ctl_scsiio *ctsio, int alloc_len) +{ + struct ctl_softc *softc = control_softc; + struct scsi_vpd_scsi_ports *sp; + struct scsi_vpd_port_designation *pd; + struct scsi_vpd_port_designation_cont *pdc; + struct ctl_lun *lun; + struct ctl_port *port; + int data_len, num_target_ports, id_len, g, pg, p; + int num_target_port_groups, single; + + lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + + single = ctl_is_single; + if (single) + num_target_port_groups = 1; + else + num_target_port_groups = NUM_TARGET_PORT_GROUPS; + num_target_ports = 0; + id_len = 0; + mtx_lock(&softc->ctl_lock); + STAILQ_FOREACH(port, &softc->port_list, links) { + if ((port->status & CTL_PORT_STATUS_ONLINE) == 0) + continue; + if (ctl_map_lun_back(port->targ_port, lun->lun) >= + CTL_MAX_LUNS) + continue; + num_target_ports++; + if (port->port_devid) + id_len += port->port_devid->len; + } + mtx_unlock(&softc->ctl_lock); + + data_len = sizeof(struct scsi_vpd_scsi_ports) + num_target_port_groups * + num_target_ports * (sizeof(struct scsi_vpd_port_designation) + + sizeof(struct scsi_vpd_port_designation_cont)) + id_len; + ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); + sp = (struct scsi_vpd_scsi_ports *)ctsio->kern_data_ptr; + ctsio->kern_sg_entries = 0; + + if (data_len < alloc_len) { + ctsio->residual = alloc_len - data_len; + ctsio->kern_data_len = data_len; + ctsio->kern_total_len = data_len; + } else { + ctsio->residual = 0; + ctsio->kern_data_len = alloc_len; + ctsio->kern_total_len = alloc_len; + } + ctsio->kern_data_resid = 0; + ctsio->kern_rel_offset = 0; + ctsio->kern_sg_entries = 0; + + /* + * The control device is always connected. The disk device, on the + * other hand, may not be online all the time. Need to change this + * to figure out whether the disk device is actually online or not. + */ + if (lun != NULL) + sp->device = (SID_QUAL_LU_CONNECTED << 5) | + lun->be_lun->lun_type; + else + sp->device = (SID_QUAL_LU_OFFLINE << 5) | T_DIRECT; + + sp->page_code = SVPD_SCSI_PORTS; + scsi_ulto2b(data_len - sizeof(struct scsi_vpd_scsi_ports), + sp->page_length); + pd = &sp->design[0]; + + mtx_lock(&softc->ctl_lock); + if (softc->flags & CTL_FLAG_MASTER_SHELF) + pg = 0; + else + pg = 1; + for (g = 0; g < num_target_port_groups; g++) { + STAILQ_FOREACH(port, &softc->port_list, links) { + if ((port->status & CTL_PORT_STATUS_ONLINE) == 0) + continue; + if (ctl_map_lun_back(port->targ_port, lun->lun) >= + CTL_MAX_LUNS) + continue; + p = port->targ_port % CTL_MAX_PORTS + g * CTL_MAX_PORTS; + scsi_ulto2b(p, pd->relative_port_id); + scsi_ulto2b(0, pd->initiator_transportid_length); + pdc = (struct scsi_vpd_port_designation_cont *) + &pd->initiator_transportid[0]; + if (port->port_devid && g == pg) { + id_len = port->port_devid->len; + scsi_ulto2b(port->port_devid->len, + pdc->target_port_descriptors_length); + memcpy(pdc->target_port_descriptors, + port->port_devid->data, port->port_devid->len); + } else { + id_len = 0; + scsi_ulto2b(0, pdc->target_port_descriptors_length); + } + pd = (struct scsi_vpd_port_designation *) + ((uint8_t *)pdc->target_port_descriptors + id_len); + } + } + mtx_unlock(&softc->ctl_lock); + + ctsio->scsi_status = SCSI_STATUS_OK; + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; + ctsio->be_move_done = ctl_config_move_done; + ctl_datamove((union ctl_io *)ctsio); + + return (CTL_RETVAL_COMPLETE); +} + +static int ctl_inquiry_evpd_block_limits(struct ctl_scsiio *ctsio, int alloc_len) { struct scsi_vpd_block_limits *bl_ptr; @@ -9952,6 +10068,9 @@ ctl_inquiry_evpd(struct ctl_scsiio *ctsi case SVPD_DEVICE_ID: retval = ctl_inquiry_evpd_devid(ctsio, alloc_len); break; + case SVPD_SCSI_PORTS: + retval = ctl_inquiry_evpd_scsi_ports(ctsio, alloc_len); + break; case SVPD_BLOCK_LIMITS: retval = ctl_inquiry_evpd_block_limits(ctsio, alloc_len); break; Modified: stable/10/sys/cam/scsi/scsi_all.h ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.h Tue Jul 15 17:09:02 2014 (r268686) +++ stable/10/sys/cam/scsi/scsi_all.h Tue Jul 15 17:09:52 2014 (r268687) @@ -1564,6 +1564,31 @@ struct scsi_diag_page { uint8_t params[0]; }; +struct scsi_vpd_port_designation +{ + uint8_t reserved[2]; + uint8_t relative_port_id[2]; + uint8_t reserved2[2]; + uint8_t initiator_transportid_length[2]; + uint8_t initiator_transportid[0]; +}; + +struct scsi_vpd_port_designation_cont +{ + uint8_t reserved[2]; + uint8_t target_port_descriptors_length[2]; + struct scsi_vpd_id_descriptor target_port_descriptors[0]; +}; + +struct scsi_vpd_scsi_ports +{ + u_int8_t device; + u_int8_t page_code; +#define SVPD_SCSI_PORTS 0x88 + u_int8_t page_length[2]; + struct scsi_vpd_port_designation design[]; +}; + /* * ATA Information VPD Page based on * T10/2126-D Revision 04 @@ -1754,8 +1779,9 @@ struct scsi_target_group { uint8_t opcode; uint8_t service_action; +#define STG_PDF_MASK 0xe0 #define STG_PDF_LENGTH 0x00 -#define RPL_PDF_EXTENDED 0x20 +#define STG_PDF_EXTENDED 0x20 uint8_t reserved1[4]; uint8_t length[4]; uint8_t reserved2; @@ -1805,7 +1831,7 @@ struct scsi_target_group_data { struct scsi_target_group_data_extended { uint8_t length[4]; /* length of returned data, in bytes */ - uint8_t format_type; /* STG_PDF_LENGTH or RPL_PDF_EXTENDED */ + uint8_t format_type; /* STG_PDF_LENGTH or STG_PDF_EXTENDED */ uint8_t implicit_transition_time; uint8_t reserved[2]; struct scsi_target_port_group_descriptor groups[]; From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 17:10:49 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9EF9D4C7; Tue, 15 Jul 2014 17:10:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F4AB2CE6; Tue, 15 Jul 2014 17:10:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FHAnN8087555; Tue, 15 Jul 2014 17:10:49 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FHAmoV087551; Tue, 15 Jul 2014 17:10:48 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407151710.s6FHAmoV087551@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jul 2014 17:10:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268688 - in stable/10: sys/cam/ctl usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 17:10:49 -0000 Author: mav Date: Tue Jul 15 17:10:48 2014 New Revision: 268688 URL: http://svnweb.freebsd.org/changeset/base/268688 Log: MFC r268328: Close race in r268291 between port destruction, delayed by sessions teardown, and new port creation during `service ctld restart`. Close it by returning iSCSI port internal state, that allows to identify dying ports, which should not be counted as existing, from really alive. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_frontend.h stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/usr.sbin/ctld/kernel.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Tue Jul 15 17:09:52 2014 (r268687) +++ stable/10/sys/cam/ctl/ctl.c Tue Jul 15 17:10:48 2014 (r268688) @@ -3254,6 +3254,11 @@ ctl_ioctl(struct cdev *dev, u_long cmd, if (retval != 0) break; + if (port->port_info != NULL) { + retval = port->port_info(port->onoff_arg, sb); + if (retval != 0) + break; + } STAILQ_FOREACH(opt, &port->options, links) { retval = sbuf_printf(sb, "\t<%s>%s\n", opt->name, opt->value, opt->name); Modified: stable/10/sys/cam/ctl/ctl_frontend.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend.h Tue Jul 15 17:09:52 2014 (r268687) +++ stable/10/sys/cam/ctl/ctl_frontend.h Tue Jul 15 17:10:48 2014 (r268688) @@ -49,6 +49,7 @@ typedef enum { typedef int (*fe_init_t)(void); typedef void (*fe_shutdown_t)(void); typedef void (*port_func_t)(void *onoff_arg); +typedef int (*port_info_func_t)(void *onoff_arg, struct sbuf *sb); typedef int (*lun_func_t)(void *arg, struct ctl_id targ_id, int lun_id); typedef uint32_t (*lun_map_func_t)(void *arg, uint32_t lun_id); typedef int (*fe_ioctl_t)(struct cdev *dev, u_long cmd, caddr_t addr, int flag, @@ -214,6 +215,7 @@ struct ctl_port { int virtual_port; /* passed to CTL */ port_func_t port_online; /* passed to CTL */ port_func_t port_offline; /* passed to CTL */ + port_info_func_t port_info; /* passed to CTL */ void *onoff_arg; /* passed to CTL */ lun_func_t lun_enable; /* passed to CTL */ lun_func_t lun_disable; /* passed to CTL */ Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Tue Jul 15 17:09:52 2014 (r268687) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Tue Jul 15 17:10:48 2014 (r268688) @@ -149,6 +149,7 @@ SYSCTL_INT(_kern_cam_ctl_iscsi, OID_AUTO int cfiscsi_init(void); static void cfiscsi_online(void *arg); static void cfiscsi_offline(void *arg); +static int cfiscsi_info(void *arg, struct sbuf *sb); static int cfiscsi_lun_enable(void *arg, struct ctl_id target_id, int lun_id); static int cfiscsi_lun_disable(void *arg, @@ -1415,6 +1416,17 @@ cfiscsi_offline(void *arg) #endif } +static int +cfiscsi_info(void *arg, struct sbuf *sb) +{ + struct cfiscsi_target *ct = (struct cfiscsi_target *)arg; + int retval; + + retval = sbuf_printf(sb, "\t%d\n", + ct->ct_state); + return (retval); +} + static void cfiscsi_ioctl_handoff(struct ctl_iscsi *ci) { @@ -1997,6 +2009,7 @@ cfiscsi_ioctl_port_create(struct ctl_req port->virtual_port = strtoul(tag, NULL, 0); port->port_online = cfiscsi_online; port->port_offline = cfiscsi_offline; + port->port_info = cfiscsi_info; port->onoff_arg = ct; port->lun_enable = cfiscsi_lun_enable; port->lun_disable = cfiscsi_lun_disable; Modified: stable/10/usr.sbin/ctld/kernel.c ============================================================================== --- stable/10/usr.sbin/ctld/kernel.c Tue Jul 15 17:09:52 2014 (r268687) +++ stable/10/usr.sbin/ctld/kernel.c Tue Jul 15 17:10:48 2014 (r268688) @@ -120,6 +120,7 @@ struct cctl_lun { struct cctl_port { uint32_t port_id; + int cfiscsi_status; char *cfiscsi_target; uint16_t cfiscsi_portal_group_tag; STAILQ_HEAD(,cctl_lun_nv) attr_list; @@ -332,6 +333,8 @@ cctl_end_pelement(void *user_data, const if (strcmp(name, "cfiscsi_target") == 0) { cur_port->cfiscsi_target = str; str = NULL; + } else if (strcmp(name, "cfiscsi_status") == 0) { + cur_port->cfiscsi_status = strtoul(str, NULL, 0); } else if (strcmp(name, "cfiscsi_portal_group_tag") == 0) { cur_port->cfiscsi_portal_group_tag = strtoul(str, NULL, 0); } else if (strcmp(name, "targ_port") == 0) { @@ -494,6 +497,11 @@ retry_port: "ignoring", (uintmax_t)port->port_id); continue; } + if (port->cfiscsi_status != 1) { + log_debugx("CTL port %ju is not active (%d); ignoring", + (uintmax_t)port->port_id, port->cfiscsi_status); + continue; + } targ = target_find(conf, port->cfiscsi_target); if (targ == NULL) { From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 17:11:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5AA07618; Tue, 15 Jul 2014 17:11:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46C8C2D67; Tue, 15 Jul 2014 17:11:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FHBhf4088416; Tue, 15 Jul 2014 17:11:43 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FHBhm9088415; Tue, 15 Jul 2014 17:11:43 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407151711.s6FHBhm9088415@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jul 2014 17:11:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268689 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 17:11:43 -0000 Author: mav Date: Tue Jul 15 17:11:42 2014 New Revision: 268689 URL: http://svnweb.freebsd.org/changeset/base/268689 Log: MFC r268330: Make gcc happy, init idlen2. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Tue Jul 15 17:10:48 2014 (r268688) +++ stable/10/sys/cam/ctl/ctl.c Tue Jul 15 17:11:42 2014 (r268689) @@ -4338,7 +4338,7 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft struct scsi_vpd_id_t10 *t10id; const char *scsiname, *vendor; int lun_number, i, lun_malloced; - int devidlen, idlen1, idlen2, len; + int devidlen, idlen1, idlen2 = 0, len; if (be_lun == NULL) return (EINVAL); From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 17:12:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CBC37765; Tue, 15 Jul 2014 17:12:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B715D2D75; Tue, 15 Jul 2014 17:12:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FHCcYV089052; Tue, 15 Jul 2014 17:12:38 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FHCbnq089043; Tue, 15 Jul 2014 17:12:37 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407151712.s6FHCbnq089043@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jul 2014 17:12:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268690 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 17:12:38 -0000 Author: mav Date: Tue Jul 15 17:12:37 2014 New Revision: 268690 URL: http://svnweb.freebsd.org/changeset/base/268690 Log: MFC r268353: Implement ABORT TASK SET and I_T NEXUS RESET task management functions. Use the last one to terminate active commands on iSCSI session termination. Previous code was aborting only commands doing some data moves. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl.h stable/10/sys/cam/ctl/ctl_error.c stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/sys/cam/ctl/ctl_io.h stable/10/sys/cam/ctl/ctl_util.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Tue Jul 15 17:11:42 2014 (r268689) +++ stable/10/sys/cam/ctl/ctl.c Tue Jul 15 17:12:37 2014 (r268690) @@ -409,6 +409,8 @@ static int ctl_target_reset(struct ctl_s static int ctl_lun_reset(struct ctl_lun *lun, union ctl_io *io, ctl_ua_type ua_type); static int ctl_abort_task(union ctl_io *io); +static int ctl_abort_task_set(union ctl_io *io); +static int ctl_i_t_nexus_reset(union ctl_io *io); static void ctl_run_task(union ctl_io *io); #ifdef CTL_IO_DELAY static void ctl_datamove_timer_wakeup(void *arg); @@ -7484,7 +7486,8 @@ ctl_report_supported_tmf(struct ctl_scsi ctsio->kern_rel_offset = 0; data = (struct scsi_report_supported_tmf_data *)ctsio->kern_data_ptr; - data->byte1 |= RST_ATS | RST_LURS | RST_TRS; + data->byte1 |= RST_ATS | RST_ATSS | RST_LURS | RST_TRS; + data->byte2 |= RST_ITNRS; ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; @@ -11675,6 +11678,97 @@ ctl_lun_reset(struct ctl_lun *lun, union } static int +ctl_abort_tasks_lun(struct ctl_lun *lun, uint32_t targ_port, uint32_t init_id, + int other_sc) +{ + union ctl_io *xio; + int found; + + mtx_assert(&lun->lun_lock, MA_OWNED); + + /* + * Run through the OOA queue and attempt to find the given I/O. + * The target port, initiator ID, tag type and tag number have to + * match the values that we got from the initiator. If we have an + * untagged command to abort, simply abort the first untagged command + * we come to. We only allow one untagged command at a time of course. + */ + for (xio = (union ctl_io *)TAILQ_FIRST(&lun->ooa_queue); xio != NULL; + xio = (union ctl_io *)TAILQ_NEXT(&xio->io_hdr, ooa_links)) { + + if ((targ_port == xio->io_hdr.nexus.targ_port) && + (init_id == xio->io_hdr.nexus.initid.id)) { + xio->io_hdr.flags |= CTL_FLAG_ABORT; + found = 1; + if (!other_sc && !(lun->flags & CTL_LUN_PRIMARY_SC)) { + union ctl_ha_msg msg_info; + + msg_info.hdr.nexus = xio->io_hdr.nexus; + msg_info.task.task_action = CTL_TASK_ABORT_TASK; + msg_info.task.tag_num = xio->scsiio.tag_num; + msg_info.task.tag_type = xio->scsiio.tag_type; + msg_info.hdr.msg_type = CTL_MSG_MANAGE_TASKS; + msg_info.hdr.original_sc = NULL; + msg_info.hdr.serializing_sc = NULL; + ctl_ha_msg_send(CTL_HA_CHAN_CTL, + (void *)&msg_info, sizeof(msg_info), 0); + } + } + } + return (found); +} + +static int +ctl_abort_task_set(union ctl_io *io) +{ + struct ctl_softc *softc = control_softc; + struct ctl_lun *lun; + uint32_t targ_lun; + + /* + * Look up the LUN. + */ + targ_lun = io->io_hdr.nexus.targ_mapped_lun; + mtx_lock(&softc->ctl_lock); + if ((targ_lun < CTL_MAX_LUNS) && (softc->ctl_luns[targ_lun] != NULL)) + lun = softc->ctl_luns[targ_lun]; + else { + mtx_unlock(&softc->ctl_lock); + return (1); + } + + mtx_lock(&lun->lun_lock); + mtx_unlock(&softc->ctl_lock); + ctl_abort_tasks_lun(lun, io->io_hdr.nexus.targ_port, + io->io_hdr.nexus.initid.id, + (io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) != 0); + mtx_unlock(&lun->lun_lock); + return (0); +} + +static int +ctl_i_t_nexus_reset(union ctl_io *io) +{ + struct ctl_softc *softc = control_softc; + struct ctl_lun *lun; + uint32_t initindex; + + initindex = ctl_get_initindex(&io->io_hdr.nexus); + mtx_lock(&softc->ctl_lock); + STAILQ_FOREACH(lun, &softc->lun_list, links) { + mtx_lock(&lun->lun_lock); + ctl_abort_tasks_lun(lun, io->io_hdr.nexus.targ_port, + io->io_hdr.nexus.initid.id, + (io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) != 0); + ctl_clear_mask(lun->have_ca, initindex); + lun->pending_sense[initindex].ua_pending |= CTL_UA_I_T_NEXUS_LOSS; + mtx_unlock(&lun->lun_lock); + } + mtx_unlock(&softc->ctl_lock); + return (0); +} + +static int ctl_abort_task(union ctl_io *io) { union ctl_io *xio; @@ -11873,11 +11967,15 @@ ctl_run_task(union ctl_io *io) retval = ctl_abort_task(io); break; case CTL_TASK_ABORT_TASK_SET: + retval = ctl_abort_task_set(io); break; case CTL_TASK_CLEAR_ACA: break; case CTL_TASK_CLEAR_TASK_SET: break; + case CTL_TASK_I_T_NEXUS_RESET: + retval = ctl_i_t_nexus_reset(io); + break; case CTL_TASK_LUN_RESET: { struct ctl_lun *lun; uint32_t targ_lun; Modified: stable/10/sys/cam/ctl/ctl.h ============================================================================== --- stable/10/sys/cam/ctl/ctl.h Tue Jul 15 17:11:42 2014 (r268689) +++ stable/10/sys/cam/ctl/ctl.h Tue Jul 15 17:12:37 2014 (r268690) @@ -115,17 +115,18 @@ typedef enum { CTL_UA_POWERON = 0x0001, CTL_UA_BUS_RESET = 0x0002, CTL_UA_TARG_RESET = 0x0004, - CTL_UA_LUN_RESET = 0x0008, - CTL_UA_LUN_CHANGE = 0x0010, - CTL_UA_MODE_CHANGE = 0x0020, - CTL_UA_LOG_CHANGE = 0x0040, - CTL_UA_LVD = 0x0080, - CTL_UA_SE = 0x0100, - CTL_UA_RES_PREEMPT = 0x0200, - CTL_UA_RES_RELEASE = 0x0400, - CTL_UA_REG_PREEMPT = 0x0800, - CTL_UA_ASYM_ACC_CHANGE = 0x1000, - CTL_UA_CAPACITY_CHANGED = 0x2000 + CTL_UA_I_T_NEXUS_LOSS = 0x0008, + CTL_UA_LUN_RESET = 0x0010, + CTL_UA_LUN_CHANGE = 0x0020, + CTL_UA_MODE_CHANGE = 0x0030, + CTL_UA_LOG_CHANGE = 0x0080, + CTL_UA_LVD = 0x0100, + CTL_UA_SE = 0x0200, + CTL_UA_RES_PREEMPT = 0x0400, + CTL_UA_RES_RELEASE = 0x0800, + CTL_UA_REG_PREEMPT = 0x1000, + CTL_UA_ASYM_ACC_CHANGE = 0x2000, + CTL_UA_CAPACITY_CHANGED = 0x4000 } ctl_ua_type; #ifdef _KERNEL Modified: stable/10/sys/cam/ctl/ctl_error.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_error.c Tue Jul 15 17:11:42 2014 (r268689) +++ stable/10/sys/cam/ctl/ctl_error.c Tue Jul 15 17:12:37 2014 (r268690) @@ -401,6 +401,11 @@ ctl_build_ua(ctl_ua_type ua_type, struct asc = 0x29; ascq = 0x03; break; + case CTL_UA_I_T_NEXUS_LOSS: + /* 29h/07h I_T NEXUS LOSS OCCURRED */ + asc = 0x29; + ascq = 0x07; + break; case CTL_UA_LUN_RESET: /* 29h/00h POWER ON, RESET, OR BUS DEVICE RESET OCCURRED */ /* Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Tue Jul 15 17:11:42 2014 (r268689) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Tue Jul 15 17:12:37 2014 (r268690) @@ -631,6 +631,12 @@ cfiscsi_pdu_handle_task_request(struct i io->taskio.task_action = CTL_TASK_ABORT_TASK; io->taskio.tag_num = bhstmr->bhstmr_referenced_task_tag; break; + case BHSTMR_FUNCTION_ABORT_TASK_SET: +#if 0 + CFISCSI_SESSION_DEBUG(cs, "BHSTMR_FUNCTION_ABORT_TASK_SET"); +#endif + io->taskio.task_action = CTL_TASK_ABORT_TASK_SET; + break; case BHSTMR_FUNCTION_LOGICAL_UNIT_RESET: #if 0 CFISCSI_SESSION_DEBUG(cs, "BHSTMR_FUNCTION_LOGICAL_UNIT_RESET"); @@ -1033,64 +1039,36 @@ cfiscsi_callout(void *context) static void cfiscsi_session_terminate_tasks(struct cfiscsi_session *cs) { - struct cfiscsi_data_wait *cdw, *tmpcdw; + struct cfiscsi_data_wait *cdw; union ctl_io *io; int error, last; -#ifdef notyet io = ctl_alloc_io(cs->cs_target->ct_port.ctl_pool_ref); if (io == NULL) { CFISCSI_SESSION_WARN(cs, "can't allocate ctl_io"); return; } ctl_zero_io(io); - io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = NULL; + io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = cs; io->io_hdr.io_type = CTL_IO_TASK; io->io_hdr.nexus.initid.id = cs->cs_ctl_initid; io->io_hdr.nexus.targ_port = cs->cs_target->ct_port.targ_port; io->io_hdr.nexus.targ_target.id = 0; - io->io_hdr.nexus.targ_lun = lun; + io->io_hdr.nexus.targ_lun = 0; io->taskio.tag_type = CTL_TAG_SIMPLE; /* XXX */ - io->taskio.task_action = CTL_TASK_ABORT_TASK_SET; + io->taskio.task_action = CTL_TASK_I_T_NEXUS_RESET; + refcount_acquire(&cs->cs_outstanding_ctl_pdus); error = ctl_queue(io); if (error != CTL_RETVAL_COMPLETE) { CFISCSI_SESSION_WARN(cs, "ctl_queue() failed; error %d", error); + refcount_release(&cs->cs_outstanding_ctl_pdus); ctl_free_io(io); } -#else - /* - * CTL doesn't currently support CTL_TASK_ABORT_TASK_SET, so instead - * just iterate over tasks that are waiting for something - data - and - * terminate those. - */ + CFISCSI_SESSION_LOCK(cs); - TAILQ_FOREACH_SAFE(cdw, - &cs->cs_waiting_for_data_out, cdw_next, tmpcdw) { - io = ctl_alloc_io(cs->cs_target->ct_port.ctl_pool_ref); - if (io == NULL) { - CFISCSI_SESSION_WARN(cs, "can't allocate ctl_io"); - return; - } - ctl_zero_io(io); - io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = NULL; - io->io_hdr.io_type = CTL_IO_TASK; - io->io_hdr.nexus.initid.id = cs->cs_ctl_initid; - io->io_hdr.nexus.targ_port = cs->cs_target->ct_port.targ_port; - io->io_hdr.nexus.targ_target.id = 0; - //io->io_hdr.nexus.targ_lun = lun; /* Not needed? */ - io->taskio.tag_type = CTL_TAG_SIMPLE; /* XXX */ - io->taskio.task_action = CTL_TASK_ABORT_TASK; - io->taskio.tag_num = cdw->cdw_initiator_task_tag; - error = ctl_queue(io); - if (error != CTL_RETVAL_COMPLETE) { - CFISCSI_SESSION_WARN(cs, "ctl_queue() failed; error %d", error); - ctl_free_io(io); - return; - } -#if 0 - CFISCSI_SESSION_DEBUG(cs, "removing csw for initiator task tag " - "0x%x", cdw->cdw_initiator_task_tag); -#endif + while ((cdw = TAILQ_FIRST(&cs->cs_waiting_for_data_out)) != NULL) { + TAILQ_REMOVE(&cs->cs_waiting_for_data_out, cdw, cdw_next); + CFISCSI_SESSION_UNLOCK(cs); /* * Set nonzero port status; this prevents backends from * assuming that the data transfer actually succeeded @@ -1098,11 +1076,10 @@ cfiscsi_session_terminate_tasks(struct c */ cdw->cdw_ctl_io->scsiio.io_hdr.port_status = 42; cdw->cdw_ctl_io->scsiio.be_move_done(cdw->cdw_ctl_io); - TAILQ_REMOVE(&cs->cs_waiting_for_data_out, cdw, cdw_next); uma_zfree(cfiscsi_data_wait_zone, cdw); + CFISCSI_SESSION_LOCK(cs); } CFISCSI_SESSION_UNLOCK(cs); -#endif /* * Wait for CTL to terminate all the tasks. @@ -1114,7 +1091,7 @@ cfiscsi_session_terminate_tasks(struct c break; CFISCSI_SESSION_WARN(cs, "waiting for CTL to terminate tasks, " "%d remaining", cs->cs_outstanding_ctl_pdus); - pause("cfiscsi_terminate", 1); + pause("cfiscsi_terminate", hz / 100); } } @@ -2864,14 +2841,18 @@ cfiscsi_done(union ctl_io *io) KASSERT(((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE), ("invalid CTL status %#x", io->io_hdr.status)); - request = io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr; - if (request == NULL) { + if (io->io_hdr.io_type == CTL_IO_TASK && + io->taskio.task_action == CTL_TASK_I_T_NEXUS_RESET) { /* * Implicit task termination has just completed; nothing to do. */ + cs = io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr; + refcount_release(&cs->cs_outstanding_ctl_pdus); + ctl_free_io(io); return; } + request = io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr; cs = PDU_SESSION(request); refcount_release(&cs->cs_outstanding_ctl_pdus); Modified: stable/10/sys/cam/ctl/ctl_io.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_io.h Tue Jul 15 17:11:42 2014 (r268689) +++ stable/10/sys/cam/ctl/ctl_io.h Tue Jul 15 17:12:37 2014 (r268690) @@ -364,6 +364,7 @@ typedef enum { CTL_TASK_ABORT_TASK_SET, CTL_TASK_CLEAR_ACA, CTL_TASK_CLEAR_TASK_SET, + CTL_TASK_I_T_NEXUS_RESET, CTL_TASK_LUN_RESET, CTL_TASK_TARGET_RESET, CTL_TASK_BUS_RESET, Modified: stable/10/sys/cam/ctl/ctl_util.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_util.c Tue Jul 15 17:11:42 2014 (r268689) +++ stable/10/sys/cam/ctl/ctl_util.c Tue Jul 15 17:12:37 2014 (r268690) @@ -84,6 +84,7 @@ static struct ctl_task_desc ctl_task_tab {CTL_TASK_ABORT_TASK_SET, "Abort Task Set"}, {CTL_TASK_CLEAR_ACA, "Clear ACA"}, {CTL_TASK_CLEAR_TASK_SET, "Clear Task Set"}, + {CTL_TASK_I_T_NEXUS_RESET, "I_T Nexus Reset"}, {CTL_TASK_LUN_RESET, "LUN Reset"}, {CTL_TASK_TARGET_RESET, "Target Reset"}, {CTL_TASK_BUS_RESET, "Bus Reset"}, From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 17:13:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CFC88CB; Tue, 15 Jul 2014 17:13:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08E812D84; Tue, 15 Jul 2014 17:13:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FHDn87089304; Tue, 15 Jul 2014 17:13:49 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FHDnG8089301; Tue, 15 Jul 2014 17:13:49 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407151713.s6FHDnG8089301@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jul 2014 17:13:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268691 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 17:13:50 -0000 Author: mav Date: Tue Jul 15 17:13:49 2014 New Revision: 268691 URL: http://svnweb.freebsd.org/changeset/base/268691 Log: MFC r268356, r268357: When new connection comes in, check whether we already have session from the same intiator (Name+ISID). If so -- terminate the old session and let the new one take its place, as required by iSCSI RFC. Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/sys/cam/ctl/ctl_frontend_iscsi.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Tue Jul 15 17:12:37 2014 (r268690) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Tue Jul 15 17:13:49 2014 (r268691) @@ -1091,7 +1091,8 @@ cfiscsi_session_terminate_tasks(struct c break; CFISCSI_SESSION_WARN(cs, "waiting for CTL to terminate tasks, " "%d remaining", cs->cs_outstanding_ctl_pdus); - pause("cfiscsi_terminate", hz / 100); + tsleep(__DEVOLATILE(void *, &cs->cs_outstanding_ctl_pdus), + 0, "cfiscsi_terminate", hz / 100); } } @@ -1408,7 +1409,7 @@ static void cfiscsi_ioctl_handoff(struct ctl_iscsi *ci) { struct cfiscsi_softc *softc; - struct cfiscsi_session *cs; + struct cfiscsi_session *cs, *cs2; struct cfiscsi_target *ct; struct ctl_iscsi_handoff_params *cihp; int error; @@ -1504,12 +1505,36 @@ cfiscsi_ioctl_handoff(struct ctl_iscsi * cihp->initiator_isid[2], cihp->initiator_isid[3], cihp->initiator_isid[4], cihp->initiator_isid[5]); + refcount_acquire(&cs->cs_outstanding_ctl_pdus); +restart: + if (!cs->cs_terminating) { + mtx_lock(&softc->lock); + TAILQ_FOREACH(cs2, &softc->sessions, cs_next) { + if (cs2 != cs && cs2->cs_tasks_aborted == false && + cs->cs_target == cs2->cs_target && + cs->cs_portal_group_tag == cs2->cs_portal_group_tag && + strcmp(cs->cs_initiator_id, cs2->cs_initiator_id) == 0) { + cfiscsi_session_terminate(cs2); + mtx_unlock(&softc->lock); + pause("cfiscsi_reinstate", 1); + goto restart; + } + } + mtx_unlock(&softc->lock); + } + + /* + * Register initiator with CTL. + */ + cfiscsi_session_register_initiator(cs); + #ifdef ICL_KERNEL_PROXY if (cihp->socket > 0) { #endif error = icl_conn_handoff(cs->cs_conn, cihp->socket); if (error != 0) { - cfiscsi_session_delete(cs); + cfiscsi_session_terminate(cs); + refcount_release(&cs->cs_outstanding_ctl_pdus); ci->status = CTL_ISCSI_ERROR; snprintf(ci->error_str, sizeof(ci->error_str), "%s: icl_conn_handoff failed with error %d", @@ -1520,11 +1545,6 @@ cfiscsi_ioctl_handoff(struct ctl_iscsi * } #endif - /* - * Register initiator with CTL. - */ - cfiscsi_session_register_initiator(cs); - #ifdef ICL_KERNEL_PROXY cs->cs_login_phase = false; @@ -1539,6 +1559,7 @@ cfiscsi_ioctl_handoff(struct ctl_iscsi * } #endif + refcount_release(&cs->cs_outstanding_ctl_pdus); ci->status = CTL_ISCSI_OK; } @@ -2847,7 +2868,9 @@ cfiscsi_done(union ctl_io *io) * Implicit task termination has just completed; nothing to do. */ cs = io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr; + cs->cs_tasks_aborted = true; refcount_release(&cs->cs_outstanding_ctl_pdus); + wakeup(__DEVOLATILE(void *, &cs->cs_outstanding_ctl_pdus)); ctl_free_io(io); return; } Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.h Tue Jul 15 17:12:37 2014 (r268690) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.h Tue Jul 15 17:13:49 2014 (r268691) @@ -80,6 +80,7 @@ struct cfiscsi_session { int cs_portal_group_tag; struct cv cs_maintenance_cv; bool cs_terminating; + bool cs_tasks_aborted; size_t cs_max_data_segment_length; size_t cs_max_burst_length; bool cs_immediate_data; From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 17:14:55 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81F57B01; Tue, 15 Jul 2014 17:14:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6209F2DA3; Tue, 15 Jul 2014 17:14:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FHEt7T089816; Tue, 15 Jul 2014 17:14:55 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FHEs2e089805; Tue, 15 Jul 2014 17:14:54 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407151714.s6FHEs2e089805@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jul 2014 17:14:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268692 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 17:14:55 -0000 Author: mav Date: Tue Jul 15 17:14:53 2014 New Revision: 268692 URL: http://svnweb.freebsd.org/changeset/base/268692 Log: MFC r268362: Teach ctl_add_initiator() to dynamically allocate IIDs from pool. If port passed negative IID value, the function will try to allocate IID from the pool of unused, based on passed wwpn or name arguments. It does all its best to make IID unique and persistent across reconnects. This makes persistent reservation properly work for iSCSI. Previously, in case of reconnects, reservation could be unexpectedly lost, or even migrate between intiators. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_frontend.c stable/10/sys/cam/ctl/ctl_frontend.h stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/sys/cam/ctl/ctl_frontend_iscsi.h stable/10/sys/cam/ctl/ctl_private.h stable/10/sys/cam/ctl/scsi_ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Tue Jul 15 17:13:49 2014 (r268691) +++ stable/10/sys/cam/ctl/ctl.c Tue Jul 15 17:14:53 2014 (r268692) @@ -1091,11 +1091,6 @@ ctl_init(void) printf("ctl: CAM Target Layer loaded\n"); /* - * Initialize the initiator and portname mappings - */ - memset(softc->wwpn_iid, 0, sizeof(softc->wwpn_iid)); - - /* * Initialize the ioctl front end. */ ctl_frontend_register(&ioctl_frontend); @@ -1367,32 +1362,24 @@ ctl_ioctl_offline(void *arg) /* * Remove an initiator by port number and initiator ID. - * Returns 0 for success, 1 for failure. + * Returns 0 for success, -1 for failure. */ int -ctl_remove_initiator(int32_t targ_port, uint32_t iid) +ctl_remove_initiator(struct ctl_port *port, int iid) { - struct ctl_softc *softc; - - softc = control_softc; + struct ctl_softc *softc = control_softc; mtx_assert(&softc->ctl_lock, MA_NOTOWNED); - if ((targ_port < 0) - || (targ_port > CTL_MAX_PORTS)) { - printf("%s: invalid port number %d\n", __func__, targ_port); - return (1); - } if (iid > CTL_MAX_INIT_PER_PORT) { printf("%s: initiator ID %u > maximun %u!\n", __func__, iid, CTL_MAX_INIT_PER_PORT); - return (1); + return (-1); } mtx_lock(&softc->ctl_lock); - - softc->wwpn_iid[targ_port][iid].in_use = 0; - + port->wwpn_iid[iid].in_use--; + port->wwpn_iid[iid].last_use = time_uptime; mtx_unlock(&softc->ctl_lock); return (0); @@ -1400,41 +1387,91 @@ ctl_remove_initiator(int32_t targ_port, /* * Add an initiator to the initiator map. - * Returns 0 for success, 1 for failure. + * Returns iid for success, < 0 for failure. */ int -ctl_add_initiator(uint64_t wwpn, int32_t targ_port, uint32_t iid) +ctl_add_initiator(struct ctl_port *port, int iid, uint64_t wwpn, char *name) { - struct ctl_softc *softc; - int retval; - - softc = control_softc; + struct ctl_softc *softc = control_softc; + time_t best_time; + int i, best; mtx_assert(&softc->ctl_lock, MA_NOTOWNED); - retval = 0; - - if ((targ_port < 0) - || (targ_port > CTL_MAX_PORTS)) { - printf("%s: invalid port number %d\n", __func__, targ_port); - return (1); - } - if (iid > CTL_MAX_INIT_PER_PORT) { - printf("%s: WWPN %#jx initiator ID %u > maximun %u!\n", + if (iid >= CTL_MAX_INIT_PER_PORT) { + printf("%s: WWPN %#jx initiator ID %u > maximum %u!\n", __func__, wwpn, iid, CTL_MAX_INIT_PER_PORT); - return (1); + free(name, M_CTL); + return (-1); } mtx_lock(&softc->ctl_lock); - if (softc->wwpn_iid[targ_port][iid].in_use != 0) { + if (iid < 0 && (wwpn != 0 || name != NULL)) { + for (i = 0; i < CTL_MAX_INIT_PER_PORT; i++) { + if (wwpn != 0 && wwpn == port->wwpn_iid[i].wwpn) { + iid = i; + break; + } + if (name != NULL && port->wwpn_iid[i].name != NULL && + strcmp(name, port->wwpn_iid[i].name) == 0) { + iid = i; + break; + } + } + } + + if (iid < 0) { + for (i = 0; i < CTL_MAX_INIT_PER_PORT; i++) { + if (port->wwpn_iid[i].in_use == 0 && + port->wwpn_iid[i].wwpn == 0 && + port->wwpn_iid[i].name == NULL) { + iid = i; + break; + } + } + } + + if (iid < 0) { + best = -1; + best_time = INT32_MAX; + for (i = 0; i < CTL_MAX_INIT_PER_PORT; i++) { + if (port->wwpn_iid[i].in_use == 0) { + if (port->wwpn_iid[i].last_use < best_time) { + best = i; + best_time = port->wwpn_iid[i].last_use; + } + } + } + iid = best; + } + + if (iid < 0) { + mtx_unlock(&softc->ctl_lock); + free(name, M_CTL); + return (-2); + } + + if (port->wwpn_iid[iid].in_use > 0 && (wwpn != 0 || name != NULL)) { /* - * We don't treat this as an error. + * This is not an error yet. */ - if (softc->wwpn_iid[targ_port][iid].wwpn == wwpn) { - printf("%s: port %d iid %u WWPN %#jx arrived again?\n", - __func__, targ_port, iid, (uintmax_t)wwpn); - goto bailout; + if (wwpn != 0 && wwpn == port->wwpn_iid[iid].wwpn) { +#if 0 + printf("%s: port %d iid %u WWPN %#jx arrived" + " again\n", __func__, port->targ_port, + iid, (uintmax_t)wwpn); +#endif + goto take; + } + if (name != NULL && port->wwpn_iid[iid].name != NULL && + strcmp(name, port->wwpn_iid[iid].name) == 0) { +#if 0 + printf("%s: port %d iid %u name '%s' arrived" + " again\n", __func__, port->targ_port, + iid, name); +#endif + goto take; } /* @@ -1442,26 +1479,25 @@ ctl_add_initiator(uint64_t wwpn, int32_t * driver is telling us we have a new WWPN for this * initiator ID, so we pretty much need to use it. */ - printf("%s: port %d iid %u WWPN %#jx arrived, WWPN %#jx is " - "still at that address\n", __func__, targ_port, iid, - (uintmax_t)wwpn, - (uintmax_t)softc->wwpn_iid[targ_port][iid].wwpn); + printf("%s: port %d iid %u WWPN %#jx '%s' arrived," + " but WWPN %#jx '%s' is still at that address\n", + __func__, port->targ_port, iid, wwpn, name, + (uintmax_t)port->wwpn_iid[iid].wwpn, + port->wwpn_iid[iid].name); /* * XXX KDM clear have_ca and ua_pending on each LUN for * this initiator. */ } - softc->wwpn_iid[targ_port][iid].in_use = 1; - softc->wwpn_iid[targ_port][iid].iid = iid; - softc->wwpn_iid[targ_port][iid].wwpn = wwpn; - softc->wwpn_iid[targ_port][iid].port = targ_port; - -bailout: - +take: + free(port->wwpn_iid[iid].name, M_CTL); + port->wwpn_iid[iid].name = name; + port->wwpn_iid[iid].wwpn = wwpn; + port->wwpn_iid[iid].in_use++; mtx_unlock(&softc->ctl_lock); - return (retval); + return (iid); } static int @@ -2874,23 +2910,11 @@ ctl_ioctl(struct cdev *dev, u_long cmd, break; } case CTL_DUMP_STRUCTS: { - int i, j, k; + int i, j, k, idx; struct ctl_port *port; struct ctl_frontend *fe; - printf("CTL IID to WWPN map start:\n"); - for (i = 0; i < CTL_MAX_PORTS; i++) { - for (j = 0; j < CTL_MAX_INIT_PER_PORT; j++) { - if (softc->wwpn_iid[i][j].in_use == 0) - continue; - - printf("port %d iid %u WWPN %#jx\n", - softc->wwpn_iid[i][j].port, - softc->wwpn_iid[i][j].iid, - (uintmax_t)softc->wwpn_iid[i][j].wwpn); - } - } - printf("CTL IID to WWPN map end\n"); + mtx_lock(&softc->ctl_lock); printf("CTL Persistent Reservation information start:\n"); for (i = 0; i < CTL_MAX_LUNS; i++) { struct ctl_lun *lun; @@ -2903,33 +2927,46 @@ ctl_ioctl(struct cdev *dev, u_long cmd, for (j = 0; j < (CTL_MAX_PORTS * 2); j++) { for (k = 0; k < CTL_MAX_INIT_PER_PORT; k++){ - if (lun->per_res[j+k].registered == 0) + idx = j * CTL_MAX_INIT_PER_PORT + k; + if (lun->per_res[idx].registered == 0) continue; - printf("LUN %d port %d iid %d key " + printf(" LUN %d port %d iid %d key " "%#jx\n", i, j, k, (uintmax_t)scsi_8btou64( - lun->per_res[j+k].res_key.key)); + lun->per_res[idx].res_key.key)); } } } printf("CTL Persistent Reservation information end\n"); printf("CTL Ports:\n"); - /* - * XXX KDM calling this without a lock. We'd likely want - * to drop the lock before calling the frontend's dump - * routine anyway. - */ STAILQ_FOREACH(port, &softc->port_list, links) { - printf("Port %s Frontend %s Type %u pport %d vport %d WWNN " - "%#jx WWPN %#jx\n", port->port_name, + printf(" Port %d '%s' Frontend '%s' Type %u pp %d vp %d WWNN " + "%#jx WWPN %#jx\n", port->targ_port, port->port_name, port->frontend->name, port->port_type, port->physical_port, port->virtual_port, (uintmax_t)port->wwnn, (uintmax_t)port->wwpn); + for (j = 0; j < CTL_MAX_INIT_PER_PORT; j++) { + if (port->wwpn_iid[j].in_use == 0 && + port->wwpn_iid[j].wwpn == 0 && + port->wwpn_iid[j].name == NULL) + continue; + + printf(" iid %u use %d WWPN %#jx '%s'\n", + j, port->wwpn_iid[j].in_use, + (uintmax_t)port->wwpn_iid[j].wwpn, + port->wwpn_iid[j].name); + } } printf("CTL Port information end\n"); + mtx_unlock(&softc->ctl_lock); + /* + * XXX KDM calling this without a lock. We'd likely want + * to drop the lock before calling the frontend's dump + * routine anyway. + */ printf("CTL Frontends:\n"); STAILQ_FOREACH(fe, &softc->fe_list, links) { - printf("Frontend %s\n", fe->name); + printf(" Frontend '%s'\n", fe->name); if (fe->fe_dump != NULL) fe->fe_dump(); } Modified: stable/10/sys/cam/ctl/ctl_frontend.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend.c Tue Jul 15 17:13:49 2014 (r268691) +++ stable/10/sys/cam/ctl/ctl_frontend.c Tue Jul 15 17:14:53 2014 (r268692) @@ -158,6 +158,17 @@ ctl_port_register(struct ctl_port *port, mtx_unlock(&control_softc->ctl_lock); /* + * Initialize the initiator and portname mappings + */ + port->max_initiators = CTL_MAX_INIT_PER_PORT; + port->wwpn_iid = malloc(sizeof(*port->wwpn_iid) * port->max_initiators, + M_CTL, M_NOWAIT | M_ZERO); + if (port->wwpn_iid == NULL) { + retval = ENOMEM; + goto error; + } + + /* * We add 20 to whatever the caller requests, so he doesn't get * burned by queueing things back to the pending sense queue. In * theory, there should probably only be one outstanding item, at @@ -168,6 +179,8 @@ ctl_port_register(struct ctl_port *port, retval = ctl_pool_create(control_softc, CTL_POOL_FETD, port->num_requested_ctl_io + 20, &pool); if (retval != 0) { + free(port->wwpn_iid, M_CTL); +error: port->targ_port = -1; mtx_lock(&control_softc->ctl_lock); ctl_clear_mask(&control_softc->ctl_port_mask, port_num); @@ -181,7 +194,6 @@ ctl_port_register(struct ctl_port *port, mtx_lock(&control_softc->ctl_lock); port->targ_port = port_num + (master_shelf != 0 ? 0 : CTL_MAX_PORTS); - port->max_initiators = CTL_MAX_INIT_PER_PORT; STAILQ_INSERT_TAIL(&port->frontend->port_list, port, fe_links); STAILQ_INSERT_TAIL(&control_softc->port_list, port, links); control_softc->ctl_ports[port_num] = port; @@ -194,8 +206,7 @@ int ctl_port_deregister(struct ctl_port *port) { struct ctl_io_pool *pool; - int port_num; - int retval; + int port_num, retval, i; retval = 0; @@ -223,6 +234,9 @@ ctl_port_deregister(struct ctl_port *por port->port_devid = NULL; free(port->target_devid, M_CTL); port->target_devid = NULL; + for (i = 0; i < port->max_initiators; i++) + free(port->wwpn_iid[i].name, M_CTL); + free(port->wwpn_iid, M_CTL); bailout: return (retval); Modified: stable/10/sys/cam/ctl/ctl_frontend.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend.h Tue Jul 15 17:13:49 2014 (r268691) +++ stable/10/sys/cam/ctl/ctl_frontend.h Tue Jul 15 17:14:53 2014 (r268692) @@ -80,6 +80,13 @@ typedef int (*fe_ioctl_t)(struct cdev *d MODULE_DEPEND(name, ctl, 1, 1, 1); \ MODULE_DEPEND(name, cam, 1, 1, 1) +struct ctl_wwpn_iid { + int in_use; + time_t last_use; + uint64_t wwpn; + char *name; +}; + /* * The ctl_frontend structure is the registration mechanism between a FETD * (Front End Target Driver) and the CTL layer. Here is a description of @@ -228,6 +235,7 @@ struct ctl_port { int32_t targ_port; /* passed back to FETD */ void *ctl_pool_ref; /* passed back to FETD */ uint32_t max_initiators; /* passed back to FETD */ + struct ctl_wwpn_iid *wwpn_iid; /* used by CTL */ uint64_t wwnn; /* set by CTL before online */ uint64_t wwpn; /* set by CTL before online */ ctl_port_status status; /* used by CTL */ @@ -269,13 +277,13 @@ struct ctl_frontend * ctl_frontend_find( * This may block until resources are allocated. Called at FETD module load * time. Returns 0 for success, non-zero for failure. */ -int ctl_port_register(struct ctl_port *fe, int master_SC); +int ctl_port_register(struct ctl_port *port, int master_SC); /* * Called at FETD module unload time. * Returns 0 for success, non-zero for failure. */ -int ctl_port_deregister(struct ctl_port *fe); +int ctl_port_deregister(struct ctl_port *port); /* * Called to set the WWNN and WWPN for a particular frontend. @@ -312,21 +320,18 @@ int ctl_queue(union ctl_io *io); int ctl_queue_sense(union ctl_io *io); /* - * This routine adds an initiator to CTL's port database. The WWPN should - * be the FC WWPN, if available. The targ_port field should be the same as - * the targ_port passed back from CTL in the ctl_frontend structure above. + * This routine adds an initiator to CTL's port database. * The iid field should be the same as the iid passed in the nexus of each * ctl_io from this initiator. + * The WWPN should be the FC WWPN, if available. */ -int ctl_add_initiator(uint64_t wwpn, int32_t targ_port, uint32_t iid); +int ctl_add_initiator(struct ctl_port *port, int iid, uint64_t wwpn, char *name); /* - * This routine will remove an initiator from CTL's port database. The - * targ_port field should be the same as the targ_port passed back in the - * ctl_frontend structure above. The iid field should be the same as the - * iid passed in the nexus of each ctl_io from this initiator. + * This routine will remove an initiator from CTL's port database. + * The iid field should be the same as the iid passed in the nexus of each + * ctl_io from this initiator. */ -int -ctl_remove_initiator(int32_t targ_port, uint32_t iid); +int ctl_remove_initiator(struct ctl_port *port, int iid); #endif /* _CTL_FRONTEND_H_ */ Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Tue Jul 15 17:13:49 2014 (r268691) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Tue Jul 15 17:14:53 2014 (r268692) @@ -1150,41 +1150,25 @@ cfiscsi_session_terminate(struct cfiscsi static int cfiscsi_session_register_initiator(struct cfiscsi_session *cs) { - int error, i; - struct cfiscsi_softc *softc; + struct cfiscsi_target *ct; + char *name; + int i; KASSERT(cs->cs_ctl_initid == -1, ("already registered")); - softc = &cfiscsi_softc; - - mtx_lock(&softc->lock); - for (i = 0; i < softc->max_initiators; i++) { - if (softc->ctl_initids[i] == 0) - break; - } - if (i == softc->max_initiators) { - CFISCSI_SESSION_WARN(cs, "too many concurrent sessions (%d)", - softc->max_initiators); - mtx_unlock(&softc->lock); + ct = cs->cs_target; + name = strdup(cs->cs_initiator_id, M_CTL); + i = ctl_add_initiator(&ct->ct_port, -1, 0, name); + if (i < 0) { + CFISCSI_SESSION_WARN(cs, "ctl_add_initiator failed with error %d", + i); + cs->cs_ctl_initid = -1; return (1); } - softc->ctl_initids[i] = 1; - mtx_unlock(&softc->lock); - + cs->cs_ctl_initid = i; #if 0 - CFISCSI_SESSION_DEBUG(cs, "adding initiator id %d, max %d", - i, softc->max_initiators); + CFISCSI_SESSION_DEBUG(cs, "added initiator id %d", i); #endif - cs->cs_ctl_initid = i; - error = ctl_add_initiator(0x0, cs->cs_target->ct_port.targ_port, cs->cs_ctl_initid); - if (error != 0) { - CFISCSI_SESSION_WARN(cs, "ctl_add_initiator failed with error %d", error); - mtx_lock(&softc->lock); - softc->ctl_initids[cs->cs_ctl_initid] = 0; - mtx_unlock(&softc->lock); - cs->cs_ctl_initid = -1; - return (1); - } return (0); } @@ -1193,21 +1177,15 @@ static void cfiscsi_session_unregister_initiator(struct cfiscsi_session *cs) { int error; - struct cfiscsi_softc *softc; if (cs->cs_ctl_initid == -1) return; - softc = &cfiscsi_softc; - - error = ctl_remove_initiator(cs->cs_target->ct_port.targ_port, cs->cs_ctl_initid); + error = ctl_remove_initiator(&cs->cs_target->ct_port, cs->cs_ctl_initid); if (error != 0) { CFISCSI_SESSION_WARN(cs, "ctl_remove_initiator failed with error %d", error); } - mtx_lock(&softc->lock); - softc->ctl_initids[cs->cs_ctl_initid] = 0; - mtx_unlock(&softc->lock); cs->cs_ctl_initid = -1; } @@ -1304,8 +1282,6 @@ cfiscsi_init(void) TAILQ_INIT(&softc->sessions); TAILQ_INIT(&softc->targets); - softc->max_initiators = CTL_MAX_INIT_PER_PORT; - cfiscsi_data_wait_zone = uma_zcreate("cfiscsi_data_wait", sizeof(struct cfiscsi_data_wait), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.h Tue Jul 15 17:13:49 2014 (r268691) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.h Tue Jul 15 17:14:53 2014 (r268692) @@ -112,8 +112,6 @@ struct cfiscsi_softc { unsigned int last_session_id; TAILQ_HEAD(, cfiscsi_target) targets; TAILQ_HEAD(, cfiscsi_session) sessions; - char ctl_initids[CTL_MAX_INIT_PER_PORT]; - int max_initiators; #ifdef ICL_KERNEL_PROXY struct icl_listen *listener; struct cv accept_cv; Modified: stable/10/sys/cam/ctl/ctl_private.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_private.h Tue Jul 15 17:13:49 2014 (r268691) +++ stable/10/sys/cam/ctl/ctl_private.h Tue Jul 15 17:14:53 2014 (r268692) @@ -414,13 +414,6 @@ typedef enum { CTL_FLAG_MASTER_SHELF = 0x04 } ctl_gen_flags; -struct ctl_wwpn_iid { - int in_use; - uint64_t wwpn; - uint32_t iid; - int32_t port; -}; - #define CTL_MAX_THREADS 16 struct ctl_thread { @@ -453,7 +446,6 @@ struct ctl_softc { int targ_online; uint32_t ctl_lun_mask[CTL_MAX_LUNS >> 5]; struct ctl_lun *ctl_luns[CTL_MAX_LUNS]; - struct ctl_wwpn_iid wwpn_iid[CTL_MAX_PORTS][CTL_MAX_INIT_PER_PORT]; uint32_t ctl_port_mask; uint64_t aps_locked_lun; STAILQ_HEAD(, ctl_lun) lun_list; Modified: stable/10/sys/cam/ctl/scsi_ctl.c ============================================================================== --- stable/10/sys/cam/ctl/scsi_ctl.c Tue Jul 15 17:13:49 2014 (r268691) +++ stable/10/sys/cam/ctl/scsi_ctl.c Tue Jul 15 17:14:53 2014 (r268692) @@ -484,14 +484,14 @@ ctlfeasync(void *callback_arg, uint32_t break; } if (dev_chg->arrived != 0) { - retval = ctl_add_initiator(dev_chg->wwpn, - softc->port.targ_port, dev_chg->target); + retval = ctl_add_initiator(&softc->port, + dev_chg->target, dev_chg->wwpn, NULL); } else { - retval = ctl_remove_initiator( - softc->port.targ_port, dev_chg->target); + retval = ctl_remove_initiator(&softc->port, + dev_chg->target); } - if (retval != 0) { + if (retval < 0) { printf("%s: could not %s port %d iid %u " "WWPN %#jx!\n", __func__, (dev_chg->arrived != 0) ? "add" : From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 17:16:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46D4CE1C; Tue, 15 Jul 2014 17:16:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 289A92DC4; Tue, 15 Jul 2014 17:16:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FHG8Cv090185; Tue, 15 Jul 2014 17:16:08 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FHG7mU090176; Tue, 15 Jul 2014 17:16:07 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407151716.s6FHG7mU090176@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jul 2014 17:16:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268694 - in stable/10: sys/cam/ctl usr.sbin/ctladm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 17:16:08 -0000 Author: mav Date: Tue Jul 15 17:16:06 2014 New Revision: 268694 URL: http://svnweb.freebsd.org/changeset/base/268694 Log: MFC r268363: Add support for READ FULL STATUS action of PERSISTENT RESERVE IN command. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl.h stable/10/sys/cam/ctl/ctl_cmd_table.c stable/10/sys/cam/ctl/scsi_ctl.c stable/10/usr.sbin/ctladm/ctladm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Tue Jul 15 17:16:06 2014 (r268693) +++ stable/10/sys/cam/ctl/ctl.c Tue Jul 15 17:16:06 2014 (r268694) @@ -1501,6 +1501,61 @@ take: } static int +ctl_create_iid(struct ctl_port *port, int iid, uint8_t *buf) +{ + int len; + + switch (port->port_type) { + case CTL_PORT_FC: + { + struct scsi_transportid_fcp *id = + (struct scsi_transportid_fcp *)buf; + if (port->wwpn_iid[iid].wwpn == 0) + return (0); + memset(id, 0, sizeof(*id)); + id->format_protocol = SCSI_PROTO_FC; + scsi_u64to8b(port->wwpn_iid[iid].wwpn, id->n_port_name); + return (sizeof(*id)); + } + case CTL_PORT_ISCSI: + { + struct scsi_transportid_iscsi_port *id = + (struct scsi_transportid_iscsi_port *)buf; + if (port->wwpn_iid[iid].name == NULL) + return (0); + memset(id, 0, 256); + id->format_protocol = SCSI_TRN_ISCSI_FORMAT_PORT | + SCSI_PROTO_ISCSI; + len = strlcpy(id->iscsi_name, port->wwpn_iid[iid].name, 252) + 1; + len = roundup2(min(len, 252), 4); + scsi_ulto2b(len, id->additional_length); + return (sizeof(*id) + len); + } + case CTL_PORT_SAS: + { + struct scsi_transportid_sas *id = + (struct scsi_transportid_sas *)buf; + if (port->wwpn_iid[iid].wwpn == 0) + return (0); + memset(id, 0, sizeof(*id)); + id->format_protocol = SCSI_PROTO_SAS; + scsi_u64to8b(port->wwpn_iid[iid].wwpn, id->sas_address); + return (sizeof(*id)); + } + default: + { + struct scsi_transportid_spi *id = + (struct scsi_transportid_spi *)buf; + memset(id, 0, sizeof(*id)); + id->format_protocol = SCSI_PROTO_SPI; + scsi_ulto2b(iid, id->scsi_addr); + scsi_ulto2b(port->targ_port, id->rel_trgt_port_id); + return (sizeof(*id)); + } + } +} + +static int ctl_ioctl_lun_enable(void *arg, struct ctl_id targ_id, int lun_id) { return (0); @@ -7621,6 +7676,11 @@ retry: case SPRI_RC: /* report capabilities */ total_len = sizeof(struct scsi_per_res_cap); break; + case SPRI_RS: /* read full status */ + total_len = sizeof(struct scsi_per_res_in_header) + + (sizeof(struct scsi_per_res_in_full_desc) + 256) * + lun->pr_key_count; + break; default: panic("Invalid PR type %x", cdb->action); } @@ -7777,7 +7837,62 @@ retry: scsi_ulto2b(type_mask, res_cap->type_mask); break; } - case SPRI_RS: //read full status + case SPRI_RS: { // read full status + struct scsi_per_res_in_full *res_status; + struct scsi_per_res_in_full_desc *res_desc; + struct ctl_port *port; + int i, len; + + res_status = (struct scsi_per_res_in_full*)ctsio->kern_data_ptr; + + /* + * We had to drop the lock to allocate our buffer, which + * leaves time for someone to come in with another + * persistent reservation. (That is unlikely, though, + * since this should be the only persistent reservation + * command active right now.) + */ + if (total_len < (sizeof(struct scsi_per_res_in_header) + + (sizeof(struct scsi_per_res_in_full_desc) + 256) * + lun->pr_key_count)){ + mtx_unlock(&lun->lun_lock); + free(ctsio->kern_data_ptr, M_CTL); + printf("%s: reservation length changed, retrying\n", + __func__); + goto retry; + } + + scsi_ulto4b(lun->PRGeneration, res_status->header.generation); + + res_desc = &res_status->desc[0]; + for (i = 0; i < 2*CTL_MAX_INITIATORS; i++) { + if (!lun->per_res[i].registered) + continue; + + memcpy(&res_desc->res_key, &lun->per_res[i].res_key.key, + sizeof(res_desc->res_key)); + if ((lun->flags & CTL_LUN_PR_RESERVED) && + (lun->pr_res_idx == i || + lun->pr_res_idx == CTL_PR_ALL_REGISTRANTS)) { + res_desc->flags = SPRI_FULL_R_HOLDER; + res_desc->scopetype = lun->res_type; + } + scsi_ulto2b(i / CTL_MAX_INIT_PER_PORT, + res_desc->rel_trgt_port_id); + len = 0; + port = softc->ctl_ports[i / CTL_MAX_INIT_PER_PORT]; + if (port != NULL) + len = ctl_create_iid(port, + i % CTL_MAX_INIT_PER_PORT, + res_desc->transport_id); + scsi_ulto4b(len, res_desc->additional_length); + res_desc = (struct scsi_per_res_in_full_desc *) + &res_desc->transport_id[len]; + } + scsi_ulto4b((uint8_t *)res_desc - (uint8_t *)&res_status->desc[0], + res_status->header.length); + break; + } default: /* * This is a bug, because we just checked for this above, Modified: stable/10/sys/cam/ctl/ctl.h ============================================================================== --- stable/10/sys/cam/ctl/ctl.h Tue Jul 15 17:16:06 2014 (r268693) +++ stable/10/sys/cam/ctl/ctl.h Tue Jul 15 17:16:06 2014 (r268694) @@ -53,6 +53,7 @@ typedef enum { CTL_PORT_IOCTL = 0x04, CTL_PORT_INTERNAL = 0x08, CTL_PORT_ISCSI = 0x10, + CTL_PORT_SAS = 0x20, CTL_PORT_ALL = 0xff, CTL_PORT_ISC = 0x100 // FC port for inter-shelf communication } ctl_port_type; Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_cmd_table.c Tue Jul 15 17:16:06 2014 (r268693) +++ stable/10/sys/cam/ctl/ctl_cmd_table.c Tue Jul 15 17:16:06 2014 (r268694) @@ -99,7 +99,15 @@ const struct ctl_cmd_entry ctl_cmd_table 10, { 0x02, 0, 0, 0, 0, 0, 0xff, 0xff, 0x07}}, /* 03 READ FULL STATUS */ -{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, +{ctl_persistent_reserve_in, CTL_SERIDX_INQ, CTL_CMD_FLAG_ALLOW_ON_RESV | + CTL_CMD_FLAG_OK_ON_BOTH | + CTL_CMD_FLAG_OK_ON_STOPPED | + CTL_CMD_FLAG_OK_ON_INOPERABLE | + CTL_CMD_FLAG_OK_ON_SECONDARY | + CTL_FLAG_DATA_IN | + CTL_CMD_FLAG_ALLOW_ON_PR_RESV, + CTL_LUN_PAT_NONE, + 10, { 0x03, 0, 0, 0, 0, 0, 0xff, 0xff, 0x07}}, /* 04-1f */ }; Modified: stable/10/sys/cam/ctl/scsi_ctl.c ============================================================================== --- stable/10/sys/cam/ctl/scsi_ctl.c Tue Jul 15 17:16:06 2014 (r268693) +++ stable/10/sys/cam/ctl/scsi_ctl.c Tue Jul 15 17:16:06 2014 (r268694) @@ -372,6 +372,8 @@ ctlfeasync(void *callback_arg, uint32_t */ if (cpi->transport == XPORT_FC) port->port_type = CTL_PORT_FC; + else if (cpi->transport == XPORT_SAS) + port->port_type = CTL_PORT_SAS; else port->port_type = CTL_PORT_SCSI; Modified: stable/10/usr.sbin/ctladm/ctladm.c ============================================================================== --- stable/10/usr.sbin/ctladm/ctladm.c Tue Jul 15 17:16:06 2014 (r268693) +++ stable/10/usr.sbin/ctladm/ctladm.c Tue Jul 15 17:16:06 2014 (r268694) @@ -500,6 +500,9 @@ retry: case CTL_PORT_ISCSI: type = "ISCSI"; break; + case CTL_PORT_SAS: + type = "SAS"; + break; default: type = "UNKNOWN"; break; @@ -590,6 +593,7 @@ static struct ctladm_opts cctl_fe_table[ {"scsi", CTL_PORT_SCSI, CTLADM_ARG_NONE, NULL}, {"internal", CTL_PORT_INTERNAL, CTLADM_ARG_NONE, NULL}, {"iscsi", CTL_PORT_ISCSI, CTLADM_ARG_NONE, NULL}, + {"sas", CTL_PORT_SAS, CTLADM_ARG_NONE, NULL}, {"all", CTL_PORT_ALL, CTLADM_ARG_NONE, NULL}, {NULL, 0, 0, NULL} }; From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 17:16:58 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98E0D14A; Tue, 15 Jul 2014 17:16:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84FC22DE6; Tue, 15 Jul 2014 17:16:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FHGwmQ090574; Tue, 15 Jul 2014 17:16:58 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FHGwLK090573; Tue, 15 Jul 2014 17:16:58 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407151716.s6FHGwLK090573@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jul 2014 17:16:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268695 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 17:16:58 -0000 Author: mav Date: Tue Jul 15 17:16:58 2014 New Revision: 268695 URL: http://svnweb.freebsd.org/changeset/base/268695 Log: MFC r268364: Fix "use after free" on port creation error in r268291. Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Tue Jul 15 17:16:06 2014 (r268694) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Tue Jul 15 17:16:58 2014 (r268695) @@ -1949,26 +1949,26 @@ cfiscsi_ioctl_port_create(struct ctl_req alias = ctl_get_opt(&opts, "cfiscsi_target_alias"); tag = ctl_get_opt(&opts, "cfiscsi_portal_group_tag"); if (target == NULL || tag == NULL) { - ctl_free_opts(&opts); req->status = CTL_LUN_ERROR; snprintf(req->error_str, sizeof(req->error_str), "Missing required argument"); + ctl_free_opts(&opts); return; } ct = cfiscsi_target_find_or_create(&cfiscsi_softc, target, alias); if (ct == NULL) { - ctl_free_opts(&opts); req->status = CTL_LUN_ERROR; snprintf(req->error_str, sizeof(req->error_str), "failed to create target \"%s\"", target); + ctl_free_opts(&opts); return; } if (ct->ct_state == CFISCSI_TARGET_STATE_ACTIVE) { - cfiscsi_target_release(ct); - ctl_free_opts(&opts); req->status = CTL_LUN_ERROR; snprintf(req->error_str, sizeof(req->error_str), "target \"%s\" already exist", target); + cfiscsi_target_release(ct); + ctl_free_opts(&opts); return; } port = &ct->ct_port; From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 17:17:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84702291; Tue, 15 Jul 2014 17:17:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58B5A2DF6; Tue, 15 Jul 2014 17:17:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FHHrxH090819; Tue, 15 Jul 2014 17:17:53 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FHHrqn090818; Tue, 15 Jul 2014 17:17:53 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407151717.s6FHHrqn090818@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jul 2014 17:17:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268696 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 17:17:53 -0000 Author: mav Date: Tue Jul 15 17:17:52 2014 New Revision: 268696 URL: http://svnweb.freebsd.org/changeset/base/268696 Log: MFC r268387: Fix task management functions status: task not found is not an error, while not implemented function is. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Tue Jul 15 17:16:58 2014 (r268695) +++ stable/10/sys/cam/ctl/ctl.c Tue Jul 15 17:17:52 2014 (r268696) @@ -11946,7 +11946,7 @@ ctl_abort_task(union ctl_io *io) lun = ctl_softc->ctl_luns[targ_lun]; else { mtx_unlock(&ctl_softc->ctl_lock); - goto bailout; + return (1); } #if 0 @@ -12049,8 +12049,6 @@ ctl_abort_task(union ctl_io *io) } mtx_unlock(&lun->lun_lock); -bailout: - if (found == 0) { /* * This isn't really an error. It's entirely possible for @@ -12066,23 +12064,19 @@ bailout: io->io_hdr.nexus.targ_lun, io->taskio.tag_num, io->taskio.tag_type); #endif - return (1); - } else - return (0); + } + return (0); } static void ctl_run_task(union ctl_io *io) { - struct ctl_softc *ctl_softc; - int retval; + struct ctl_softc *ctl_softc = control_softc; + int retval = 1; const char *task_desc; CTL_DEBUG_PRINT(("ctl_run_task\n")); - ctl_softc = control_softc; - retval = 0; - KASSERT(io->io_hdr.io_type == CTL_IO_TASK, ("ctl_run_task: Unextected io_type %d\n", io->io_hdr.io_type)); @@ -12131,7 +12125,6 @@ ctl_run_task(union ctl_io *io) case CTL_TASK_LUN_RESET: { struct ctl_lun *lun; uint32_t targ_lun; - int retval; targ_lun = io->io_hdr.nexus.targ_mapped_lun; mtx_lock(&ctl_softc->ctl_lock); @@ -12188,12 +12181,6 @@ ctl_run_task(union ctl_io *io) io->io_hdr.status = CTL_SUCCESS; else io->io_hdr.status = CTL_ERROR; - - /* - * This will queue this I/O to the done queue, but the - * work thread won't be able to process it until we - * return and the lock is released. - */ ctl_done(io); } From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 17:18:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B2E64CA; Tue, 15 Jul 2014 17:18:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46E602E0D; Tue, 15 Jul 2014 17:18:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FHIqbX091200; Tue, 15 Jul 2014 17:18:52 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FHIoAG091193; Tue, 15 Jul 2014 17:18:50 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407151718.s6FHIoAG091193@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jul 2014 17:18:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268697 - in stable/10/sys/cam: ctl scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 17:18:52 -0000 Author: mav Date: Tue Jul 15 17:18:50 2014 New Revision: 268697 URL: http://svnweb.freebsd.org/changeset/base/268697 Log: MFC r268418: Enable TAS feature: notify initiator if its command was aborted by other. That should make operation more kind to multi-initiator environment. Without this, other initiators may find out that something bad happened to their commands only via command timeout. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_error.c stable/10/sys/cam/ctl/ctl_error.h stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/sys/cam/ctl/ctl_io.h stable/10/sys/cam/ctl/scsi_ctl.c stable/10/sys/cam/scsi/scsi_all.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Tue Jul 15 17:17:52 2014 (r268696) +++ stable/10/sys/cam/ctl/ctl.c Tue Jul 15 17:18:50 2014 (r268697) @@ -282,8 +282,10 @@ static struct scsi_control_page control_ /*rlec*/0, /*queue_flags*/0, /*eca_and_aen*/0, - /*reserved*/0, - /*aen_holdoff_period*/{0, 0} + /*flags4*/SCP_TAS, + /*aen_holdoff_period*/{0, 0}, + /*busy_timeout_period*/{0, 0}, + /*extended_selftest_completion_time*/{0, 0} }; static struct scsi_control_page control_page_changeable = { @@ -292,8 +294,10 @@ static struct scsi_control_page control_ /*rlec*/SCP_DSENSE, /*queue_flags*/0, /*eca_and_aen*/0, - /*reserved*/0, - /*aen_holdoff_period*/{0, 0} + /*flags4*/0, + /*aen_holdoff_period*/{0, 0}, + /*busy_timeout_period*/{0, 0}, + /*extended_selftest_completion_time*/{0, 0} }; @@ -7578,7 +7582,7 @@ ctl_report_supported_tmf(struct ctl_scsi ctsio->kern_rel_offset = 0; data = (struct scsi_report_supported_tmf_data *)ctsio->kern_data_ptr; - data->byte1 |= RST_ATS | RST_ATSS | RST_LURS | RST_TRS; + data->byte1 |= RST_ATS | RST_ATSS | RST_CTSS | RST_LURS | RST_TRS; data->byte2 |= RST_ITNRS; ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; @@ -11795,7 +11799,7 @@ ctl_lun_reset(struct ctl_lun *lun, union #endif for (xio = (union ctl_io *)TAILQ_FIRST(&lun->ooa_queue); xio != NULL; xio = (union ctl_io *)TAILQ_NEXT(&xio->io_hdr, ooa_links)) { - xio->io_hdr.flags |= CTL_FLAG_ABORT; + xio->io_hdr.flags |= CTL_FLAG_ABORT | CTL_FLAG_ABORT_STATUS; } /* @@ -11848,8 +11852,13 @@ ctl_abort_tasks_lun(struct ctl_lun *lun, for (xio = (union ctl_io *)TAILQ_FIRST(&lun->ooa_queue); xio != NULL; xio = (union ctl_io *)TAILQ_NEXT(&xio->io_hdr, ooa_links)) { - if ((targ_port == xio->io_hdr.nexus.targ_port) && - (init_id == xio->io_hdr.nexus.initid.id)) { + if ((targ_port == UINT32_MAX || + targ_port == xio->io_hdr.nexus.targ_port) && + (init_id == UINT32_MAX || + init_id == xio->io_hdr.nexus.initid.id)) { + if (targ_port != xio->io_hdr.nexus.targ_port || + init_id != xio->io_hdr.nexus.initid.id) + xio->io_hdr.flags |= CTL_FLAG_ABORT_STATUS; xio->io_hdr.flags |= CTL_FLAG_ABORT; found = 1; if (!other_sc && !(lun->flags & CTL_LUN_PRIMARY_SC)) { @@ -11891,9 +11900,14 @@ ctl_abort_task_set(union ctl_io *io) mtx_lock(&lun->lun_lock); mtx_unlock(&softc->ctl_lock); - ctl_abort_tasks_lun(lun, io->io_hdr.nexus.targ_port, - io->io_hdr.nexus.initid.id, - (io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) != 0); + if (io->taskio.task_action == CTL_TASK_ABORT_TASK_SET) { + ctl_abort_tasks_lun(lun, io->io_hdr.nexus.targ_port, + io->io_hdr.nexus.initid.id, + (io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) != 0); + } else { /* CTL_TASK_CLEAR_TASK_SET */ + ctl_abort_tasks_lun(lun, UINT32_MAX, UINT32_MAX, + (io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) != 0); + } mtx_unlock(&lun->lun_lock); return (0); } @@ -12113,12 +12127,11 @@ ctl_run_task(union ctl_io *io) retval = ctl_abort_task(io); break; case CTL_TASK_ABORT_TASK_SET: + case CTL_TASK_CLEAR_TASK_SET: retval = ctl_abort_task_set(io); break; case CTL_TASK_CLEAR_ACA: break; - case CTL_TASK_CLEAR_TASK_SET: - break; case CTL_TASK_I_T_NEXUS_RESET: retval = ctl_i_t_nexus_reset(io); break; @@ -13476,7 +13489,7 @@ ctl_process_done(union ctl_io *io) * whatever it needs to do to clean up its state. */ if (io->io_hdr.flags & CTL_FLAG_ABORT) - io->io_hdr.status = CTL_CMD_ABORTED; + ctl_set_task_aborted(&io->scsiio); /* * We print out status for every task management command. For SCSI Modified: stable/10/sys/cam/ctl/ctl_error.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_error.c Tue Jul 15 17:17:52 2014 (r268696) +++ stable/10/sys/cam/ctl/ctl_error.c Tue Jul 15 17:18:50 2014 (r268697) @@ -795,6 +795,18 @@ ctl_set_busy(struct ctl_scsiio *ctsio) } void +ctl_set_task_aborted(struct ctl_scsiio *ctsio) +{ + struct scsi_sense_data *sense; + + sense = &ctsio->sense_data; + memset(sense, 0, sizeof(*sense)); + ctsio->scsi_status = SCSI_STATUS_TASK_ABORTED; + ctsio->sense_len = 0; + ctsio->io_hdr.status = CTL_CMD_ABORTED; +} + +void ctl_set_success(struct ctl_scsiio *ctsio) { struct scsi_sense_data *sense; Modified: stable/10/sys/cam/ctl/ctl_error.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_error.h Tue Jul 15 17:17:52 2014 (r268696) +++ stable/10/sys/cam/ctl/ctl_error.h Tue Jul 15 17:18:50 2014 (r268697) @@ -80,6 +80,7 @@ void ctl_set_data_phase_error(struct ctl void ctl_set_reservation_conflict(struct ctl_scsiio *ctsio); void ctl_set_queue_full(struct ctl_scsiio *ctsio); void ctl_set_busy(struct ctl_scsiio *ctsio); +void ctl_set_task_aborted(struct ctl_scsiio *ctsio); void ctl_set_success(struct ctl_scsiio *ctsio); #endif /* _CTL_ERROR_H_ */ Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Tue Jul 15 17:17:52 2014 (r268696) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Tue Jul 15 17:18:50 2014 (r268697) @@ -2706,7 +2706,8 @@ cfiscsi_scsi_command_done(union ctl_io * * Do not return status for aborted commands. * There are exceptions, but none supported by CTL yet. */ - if (io->io_hdr.status == CTL_CMD_ABORTED) { + if (io->io_hdr.status == CTL_CMD_ABORTED && + (io->io_hdr.flags & CTL_FLAG_ABORT_STATUS) == 0) { ctl_free_io(io); icl_pdu_free(request); return; Modified: stable/10/sys/cam/ctl/ctl_io.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_io.h Tue Jul 15 17:17:52 2014 (r268696) +++ stable/10/sys/cam/ctl/ctl_io.h Tue Jul 15 17:18:50 2014 (r268697) @@ -96,6 +96,7 @@ typedef enum { CTL_FLAG_CONTROL_DEV = 0x00000080, /* processor device */ CTL_FLAG_ALLOCATED = 0x00000100, /* data space allocated */ CTL_FLAG_BLOCKED = 0x00000200, /* on the blocked queue */ + CTL_FLAG_ABORT_STATUS = 0x00000400, /* return TASK ABORTED status */ CTL_FLAG_ABORT = 0x00000800, /* this I/O should be aborted */ CTL_FLAG_DMA_INPROG = 0x00001000, /* DMA in progress */ CTL_FLAG_NO_DATASYNC = 0x00002000, /* don't cache flush data */ Modified: stable/10/sys/cam/ctl/scsi_ctl.c ============================================================================== --- stable/10/sys/cam/ctl/scsi_ctl.c Tue Jul 15 17:17:52 2014 (r268696) +++ stable/10/sys/cam/ctl/scsi_ctl.c Tue Jul 15 17:18:50 2014 (r268697) @@ -805,7 +805,8 @@ ctlfestart(struct cam_periph *periph, un scsi_status = SCSI_STATUS_BUSY; csio->sense_len = 0; } else if ((io->io_hdr.status & CTL_STATUS_MASK) == - CTL_CMD_ABORTED) { + CTL_CMD_ABORTED && + (io->io_hdr.flags & CTL_FLAG_ABORT_STATUS) == 0) { io->io_hdr.flags &= ~CTL_FLAG_STATUS_QUEUED; /* Modified: stable/10/sys/cam/scsi/scsi_all.h ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.h Tue Jul 15 17:17:52 2014 (r268696) +++ stable/10/sys/cam/scsi/scsi_all.h Tue Jul 15 17:18:50 2014 (r268697) @@ -475,15 +475,24 @@ struct scsi_control_page { #define SCP_QUEUE_ALG_MASK 0xF0 #define SCP_QUEUE_ALG_RESTRICTED 0x00 #define SCP_QUEUE_ALG_UNRESTRICTED 0x10 +#define SCP_NUAR 0x08 /*No UA on release*/ #define SCP_QUEUE_ERR 0x02 /*Queued I/O aborted for CACs*/ #define SCP_QUEUE_DQUE 0x01 /*Queued I/O disabled*/ u_int8_t eca_and_aen; #define SCP_EECA 0x80 /*Enable Extended CA*/ +#define SCP_RAC 0x40 /*Report a check*/ +#define SCP_SWP 0x08 /*Software Write Protect*/ #define SCP_RAENP 0x04 /*Ready AEN Permission*/ #define SCP_UAAENP 0x02 /*UA AEN Permission*/ #define SCP_EAENP 0x01 /*Error AEN Permission*/ - u_int8_t reserved; + u_int8_t flags4; +#define SCP_ATO 0x80 /*Application tag owner*/ +#define SCP_TAS 0x40 /*Task aborted status*/ +#define SCP_ATMPE 0x20 /*Application tag mode page*/ +#define SCP_RWWP 0x10 /*Reject write without prot*/ u_int8_t aen_holdoff_period[2]; + u_int8_t busy_timeout_period[2]; + u_int8_t extended_selftest_completion_time[2]; }; struct scsi_cache_page { From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 17:19:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84C7563A; Tue, 15 Jul 2014 17:19:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70F762E1C; Tue, 15 Jul 2014 17:19:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FHJiAr091373; Tue, 15 Jul 2014 17:19:44 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FHJiDq091372; Tue, 15 Jul 2014 17:19:44 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407151719.s6FHJiDq091372@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jul 2014 17:19:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268698 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 17:19:44 -0000 Author: mav Date: Tue Jul 15 17:19:43 2014 New Revision: 268698 URL: http://svnweb.freebsd.org/changeset/base/268698 Log: MFC r268421: Remove status setting from datamove() path. Leave that to other places. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Tue Jul 15 17:18:50 2014 (r268697) +++ stable/10/sys/cam/ctl/ctl.c Tue Jul 15 17:19:43 2014 (r268698) @@ -12508,7 +12508,6 @@ ctl_datamove(union ctl_io *io) io->io_hdr.nexus.targ_port, (uintmax_t)io->io_hdr.nexus.targ_target.id, io->io_hdr.nexus.targ_lun); - io->io_hdr.status = CTL_CMD_ABORTED; io->io_hdr.port_status = 31337; /* * Note that the backend, in this case, will get the @@ -13264,24 +13263,18 @@ ctl_datamove_remote(union ctl_io *io) /* * Note that we look for an aborted I/O here, but don't do some of - * the other checks that ctl_datamove() normally does. We don't - * need to run the task queue, because this I/O is on the ISC - * queue, which is executed by the work thread after the task queue. + * the other checks that ctl_datamove() normally does. * We don't need to run the datamove delay code, since that should * have been done if need be on the other controller. */ if (io->io_hdr.flags & CTL_FLAG_ABORT) { - printf("%s: tag 0x%04x on (%d:%d:%d:%d) aborted\n", __func__, io->scsiio.tag_num, io->io_hdr.nexus.initid.id, io->io_hdr.nexus.targ_port, io->io_hdr.nexus.targ_target.id, io->io_hdr.nexus.targ_lun); - io->io_hdr.status = CTL_CMD_ABORTED; io->io_hdr.port_status = 31338; - ctl_send_datamove_done(io, /*have_lock*/ 0); - return; } From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 17:20:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A93D1784; Tue, 15 Jul 2014 17:20:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A8482E2C; Tue, 15 Jul 2014 17:20:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FHKfxg091648; Tue, 15 Jul 2014 17:20:41 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FHKffo091646; Tue, 15 Jul 2014 17:20:41 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407151720.s6FHKffo091646@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jul 2014 17:20:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268699 - in stable/10: sys/cam/ctl usr.sbin/ctladm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 17:20:41 -0000 Author: mav Date: Tue Jul 15 17:20:40 2014 New Revision: 268699 URL: http://svnweb.freebsd.org/changeset/base/268699 Log: MFC r268447: Add LUN options to specify 64-bit EUI and NAA identifiers. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/usr.sbin/ctladm/ctladm.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Tue Jul 15 17:19:43 2014 (r268698) +++ stable/10/sys/cam/ctl/ctl.c Tue Jul 15 17:20:40 2014 (r268699) @@ -4434,7 +4434,7 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft struct ctl_port *port; struct scsi_vpd_id_descriptor *desc; struct scsi_vpd_id_t10 *t10id; - const char *scsiname, *vendor; + const char *eui, *naa, *scsiname, *vendor; int lun_number, i, lun_malloced; int devidlen, idlen1, idlen2 = 0, len; @@ -4478,6 +4478,14 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft idlen2 = roundup2(strlen(scsiname) + 1, 4); len += sizeof(struct scsi_vpd_id_descriptor) + idlen2; } + eui = ctl_get_opt(&be_lun->options, "eui"); + if (eui != NULL) { + len += sizeof(struct scsi_vpd_id_descriptor) + 8; + } + naa = ctl_get_opt(&be_lun->options, "naa"); + if (naa != NULL) { + len += sizeof(struct scsi_vpd_id_descriptor) + 8; + } lun->lun_devid = malloc(sizeof(struct ctl_devid) + len, M_CTL, M_WAITOK | M_ZERO); lun->lun_devid->len = len; @@ -4504,6 +4512,24 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft desc->length = idlen2; strlcpy(desc->identifier, scsiname, idlen2); } + if (eui != NULL) { + desc = (struct scsi_vpd_id_descriptor *)(&desc->identifier[0] + + desc->length); + desc->proto_codeset = SVPD_ID_CODESET_BINARY; + desc->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_LUN | + SVPD_ID_TYPE_EUI64; + desc->length = 8; + scsi_u64to8b(strtouq(eui, NULL, 0), desc->identifier); + } + if (naa != NULL) { + desc = (struct scsi_vpd_id_descriptor *)(&desc->identifier[0] + + desc->length); + desc->proto_codeset = SVPD_ID_CODESET_BINARY; + desc->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_LUN | + SVPD_ID_TYPE_NAA; + desc->length = 8; + scsi_u64to8b(strtouq(naa, NULL, 0), desc->identifier); + } mtx_lock(&ctl_softc->ctl_lock); /* Modified: stable/10/usr.sbin/ctladm/ctladm.8 ============================================================================== --- stable/10/usr.sbin/ctladm/ctladm.8 Tue Jul 15 17:19:43 2014 (r268698) +++ stable/10/usr.sbin/ctladm/ctladm.8 Tue Jul 15 17:20:40 2014 (r268699) @@ -34,7 +34,7 @@ .\" $Id: //depot/users/kenm/FreeBSD-test2/usr.sbin/ctladm/ctladm.8#3 $ .\" $FreeBSD$ .\" -.Dd June 15, 2014 +.Dd July 9, 2014 .Dt CTLADM 8 .Os .Sh NAME @@ -947,6 +947,10 @@ Specifies LUN product string up to 16 ch Specifies LUN revision string up to 4 chars. .It Va scsiname Specifies LUN SCSI name string. +.It Va eui +Specifies LUN EUI-64 identified. +.It Va naa +Specifies LUN NAA identifier. .It Va unmap Set to "on", enables UNMAP support for the LUN. .El From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 17:26:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 95404A75; Tue, 15 Jul 2014 17:26:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F3BF2F0F; Tue, 15 Jul 2014 17:26:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FHQigV095857; Tue, 15 Jul 2014 17:26:44 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FHQhv8095844; Tue, 15 Jul 2014 17:26:43 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407151726.s6FHQhv8095844@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jul 2014 17:26:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268700 - in stable/10: sbin/camcontrol sys/cam/scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 17:26:44 -0000 Author: mav Date: Tue Jul 15 17:26:43 2014 New Revision: 268700 URL: http://svnweb.freebsd.org/changeset/base/268700 Log: MFC r268240 (by ken): Add persistent reservation support to camcontrol(8). camcontrol(8) now supports a new 'persist' subcommand that allows users to issue SCSI PERSISTENT RESERVE IN / OUT commands. Added: stable/10/sbin/camcontrol/persist.c - copied unchanged from r268240, head/sbin/camcontrol/persist.c Modified: stable/10/sbin/camcontrol/Makefile stable/10/sbin/camcontrol/camcontrol.8 stable/10/sbin/camcontrol/camcontrol.c stable/10/sbin/camcontrol/camcontrol.h stable/10/sys/cam/scsi/scsi_all.c stable/10/sys/cam/scsi/scsi_all.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/camcontrol/Makefile ============================================================================== --- stable/10/sbin/camcontrol/Makefile Tue Jul 15 17:20:40 2014 (r268699) +++ stable/10/sbin/camcontrol/Makefile Tue Jul 15 17:26:43 2014 (r268700) @@ -3,7 +3,7 @@ PROG= camcontrol SRCS= camcontrol.c util.c .if !defined(RELEASE_CRUNCH) -SRCS+= fwdownload.c modeedit.c progress.c +SRCS+= fwdownload.c modeedit.c persist.c progress.c .else CFLAGS+= -DMINIMALISTIC .endif Modified: stable/10/sbin/camcontrol/camcontrol.8 ============================================================================== --- stable/10/sbin/camcontrol/camcontrol.8 Tue Jul 15 17:20:40 2014 (r268699) +++ stable/10/sbin/camcontrol/camcontrol.8 Tue Jul 15 17:26:43 2014 (r268700) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 6, 2013 +.Dd November 20, 2013 .Dt CAMCONTROL 8 .Os .Sh NAME @@ -269,6 +269,21 @@ .Op Fl U Ar pwd .Op Fl y .Nm +.Ic persist +.Op device id +.Op generic args +.Aq Fl i Ar action | Fl o Ar action +.Op Fl a +.Op Fl I Ar trans_id +.Op Fl k Ar key +.Op Fl K Ar sa_key +.Op Fl p +.Op Fl R Ar rel_tgt_port +.Op Fl s Ar scope +.Op Fl S +.Op Fl T Ar res_type +.Op Fl U +.Nm .Ic help .Sh DESCRIPTION The @@ -1473,6 +1488,276 @@ to output a line for every firmware segm fwdownload command -- the same as the ones shown in simulation mode. .El +.It Ic persist +Persistent reservation support. +Persistent reservations are a way to reserve a particular +.Tn SCSI +LUN for use by one or more +.Tn SCSI +initiators. +If the +.Fl i +option is specified, +.Nm +will issue the +.Tn SCSI +PERSISTENT RESERVE IN +command using the requested service action. +If the +.Fl o +option is specified, +.Nm +will issue the +.Tn SCSI +PERSISTENT RESERVE OUT +command using the requested service action. +One of those two options is required. +.Pp +Persistent reservations are complex, and fully explaining them is outside +the scope of this manual. +Please visit +http://www.t10.org +and download the latest SPC spec for a full explanation of persistent +reservations. +.Bl -tag -width 8n +.It Fl i Ar mode +Specify the service action for the PERSISTENT RESERVE IN command. +Supported service actions: +.Bl -tag -width 19n +.It read_keys +Report the current persistent reservation generation (PRgeneration) and any +registered keys. +.It read_reservation +Report the persistent reservation, if any. +.It report_capabilities +Report the persistent reservation capabilities of the LUN. +.It read_full_status +Report the full status of persistent reservations on the LUN. +.El +.It Fl o Ar mode +Specify the service action for the PERSISTENT RESERVE OUT command. +For service actions like register that are components of other service +action names, the entire name must be specified. +Otherwise, enough of the service action name must be specified to +distinguish it from other possible service actions. +Supported service actions: +.Bl -tag -width 15n +.It register +Register a reservation key with the LUN or unregister a reservation key. +To register a key, specify the requested key as the Service Action +Reservation Key. +To unregister a key, specify the previously registered key as the +Reservation Key. +To change a key, specify the old key as the Reservation Key and the new +key as the Service Action Reservation Key. +.It register_ignore +This is similar to the register subcommand, except that the Reservation Key +is ignored. +The Service Action Reservation Key will overwrite any previous key +registered for the initiator. +.It reserve +Create a reservation. +A key must be registered with the LUN before the LUN can be reserved, and +it must be specified as the Reservation Key. +The type of reservation must also be specified. +The scope defaults to LUN scope (LU_SCOPE), but may be changed. +.It release +Release a reservation. +The Reservation Key must be specified. +.It clear +Release a reservation and remove all keys from the device. +The Reservation Key must be specified. +.It preempt +Remove a reservation belonging to another initiator. +The Reservation Key must be specified. +The Service Action Reservation Key may be specified, depending on the +operation being performed. +.It preempt_abort +Remove a reservation belonging to another initiator and abort all +outstanding commands from that initiator. +The Reservation Key must be specified. +The Service Action Reservation Key may be specified, depending on the +operation being performed. +.It register_move +Register another initiator with the LUN, and establish a reservation on the +LUN for that initiator. +The Reservation Key and Service Action Reservation Key must be specified. +.It replace_lost +Replace Lost Reservation information. +.El +.It Fl a +Set the All Target Ports (ALL_TG_PT) bit. +This requests that the key registration be applied to all target ports and +not just the particular target port that receives the command. +This only applies to the register and register_ignore actions. +.It Fl I Ar tid +Specify a Transport ID. +This only applies to the Register and Register and Move service actions for +Persistent Reserve Out. +Multiple Transport IDs may be specified with multiple +.Fl I +arguments. +With the Register service action, specifying one or more Transport IDs +implicitly enables the +.Fl S +option which turns on the SPEC_I_PT bit. +Transport IDs generally have the format protocol,id. +.Bl -tag -width 5n +.It SAS +A SAS Transport ID consists of +.Dq sas, +followed by a 64-bit SAS address. +For example: +.Pp +.Dl sas,0x1234567812345678 +.It FC +A Fibre Channel Transport ID consists of +.Dq fcp, +followed by a 64-bit Fibre Channel World Wide Name. +For example: +.Pp +.Dl fcp,0x1234567812345678 +.It SPI +A Parallel SCSI address consists of +.Dq spi, +followed by a SCSI target ID and a relative target port identifier. +For example: +.Pp +.Dl spi,4,1 +.It 1394 +An IEEE 1394 (Firewire) Transport ID consists of +.Dq sbp, +followed by a 64-bit EUI-64 IEEE 1394 node unique identifier. +For example: +.Pp +.Dl sbp,0x1234567812345678 +.It RDMA +A SCSI over RDMA Transport ID consists of +.Dq srp, +followed by a 128-bit RDMA initiator port identifier. +The port identifier must be exactly 32 or 34 (if the leading 0x is +included) hexadecimal digits. +Only hexadecimal (base 16) numbers are supported. +For example: +.Pp +.Dl srp,0x12345678123456781234567812345678 +.It iSCSI +An iSCSI Transport ID consists an iSCSI name and optionally a separator and +iSCSI session ID. +For example, if only the iSCSI name is specified: +.Pp +.Dl iqn.2012-06.com.example:target0 +.Pp +If the iSCSI separator and initiator session ID are specified: +.Pp +.Dl iqn.2012-06.com.example:target0,i,0x123 +.It PCIe +A SCSI over PCIe Transport ID consists of +.Dq sop, +followed by a PCIe Routing ID. +The Routing ID consists of a bus, device and function or in the alternate +form, a bus and function. +The bus must be in the range of 0 to 255 inclusive and the device must be +in the range of 0 to 31 inclusive. +The function must be in the range of 0 to 7 inclusive if the standard form +is used, and in the range of 0 to 255 inclusive if the alternate form is +used. +For example, if a bus, device and function are specified for the standard +Routing ID form: +.Pp +.Dl sop,4,5,1 +.Pp +If the alternate Routing ID form is used: +.Pp +.Dl sop,4,1 +.El +.It Fl k Ar key +Specify the Reservation Key. +This may be in decimal, octal or hexadecimal format. +The value is zero by default if not otherwise specified. +The value must be between 0 and 2^64 - 1, inclusive. +.It Fl K Ar key +Specify the Service Action Reservation Key. +This may be in decimal, octal or hexadecimal format. +The value is zero by default if not otherwise specified. +The value must be between 0 and 2^64 - 1, inclusive. +.It Fl p +Enable the Activate Persist Through Power Loss bit. +This is only used for the register and register_ignore actions. +This requests that the reservation persist across power loss events. +.It Fl s Ar scope +Specify the scope of the reservation. +The scope may be specified by name or by number. +The scope is ignored for register, register_ignore and clear. +If the desired scope isn't available by name, you may specify the number. +.Bl -tag -width 7n +.It lun +LUN scope (0x00). +This encompasses the entire LUN. +.It extent +Extent scope (0x01). +.It element +Element scope (0x02). +.El +.It Fl R Ar rtp +Specify the Relative Target Port. +This only applies to the Register and Move service action of the Persistent +Reserve Out command. +.It Fl S +Enable the SPEC_I_PT bit. +This only applies to the Register service action of Persistent Reserve Out. +You must also specify at least one Transport ID with +.Fl I +if this option is set. +If you specify a Transport ID, this option is automatically set. +It is an error to specify this option for any service action other than +Register. +.It Fl T Ar type +Specify the reservation type. +The reservation type may be specified by name or by number. +If the desired reservation type isn't available by name, you may specify +the number. +Supported reservation type names: +.Bl -tag -width 11n +.It read_shared +Read Shared mode. +.It wr_ex +Write Exclusive mode. +May also be specified as +.Dq write_exclusive . +.It rd_ex +Read Exclusive mode. +May also be specified as +.Dq read_exclusive . +.It ex_ac +Exclusive access mode. +May also be specified as +.Dq exclusive_access . +.It wr_ex_ro +Write Exclusive Registrants Only mode. +May also be specified as +.Dq write_exclusive_reg_only . +.It ex_ac_ro +Exclusive Access Registrants Only mode. +May also be specified as +.Dq exclusive_access_reg_only . +.It wr_ex_ar +Write Exclusive All Registrants mode. +May also be specified as +.Dq write_exclusive_all_regs . +.It ex_ac_ar +Exclusive Access All Registrants mode. +May also be specified as +.Dq exclusive_access_all_regs . +.El +.It Fl U +Specify that the target should unregister the initiator that sent +the Register and Move request. +By default, the target will not unregister the initiator that sends the +Register and Move request. +This option only applies to the Register and Move service action of the +Persistent Reserve Out command. +.El .It Ic help Print out verbose usage information. .El @@ -1639,6 +1924,66 @@ power-on or hardware reset! .Pp .Em DO NOT use this on a device which has an active filesystem! +.Pp +.Bd -literal -offset indent +camcontrol persist da0 -v -i read_keys +.Ed +.Pp +This will read any persistent reservation keys registered with da0, and +display any errors encountered when sending the PERSISTENT RESERVE IN +.Tn SCSI +command. +.Bd -literal -offset indent +camcontrol persist da0 -v -o register -a -K 0x12345678 +.Ed +.Pp +This will register the persistent reservation key 0x12345678 with da0, +apply that registration to all ports on da0, and display any errors that +occur when sending the PERSISTENT RESERVE OUT command. +.Bd -literal -offset indent +camcontrol persist da0 -v -o reserve -s lun -k 0x12345678 -T ex_ac +.Ed +.Pp +This will reserve da0 for the exlusive use of the initiator issuing the +command. +The scope of the reservation is the entire LUN. +Any errors sending the PERSISTENT RESERVE OUT command will be displayed. +.Bd -literal -offset indent +camcontrol persist da0 -v -i read_full +.Ed +.Pp +This will display the full status of all reservations on da0 and print out +status if there are any errors. +.Bd -literal -offset indent +camcontrol persist da0 -v -o release -k 0x12345678 -T ex_ac +.Ed +.Pp +This will release a reservation on da0 of the type ex_ac +(Exclusive Access). +The Reservation Key for this registration is 0x12345678. +Any errors that occur will be displayed. +.Bd -literal -offset indent +camcontrol persist da0 -v -o register -K 0x12345678 -S \e + -I sas,0x1234567812345678 -I sas,0x8765432187654321 +.Ed +.Pp +This will register the key 0x12345678 with da0, specifying that it applies +to the SAS initiators with SAS addresses 0x1234567812345678 and +0x8765432187654321. +.Bd -literal -offset indent +camcontrol persist da0 -v -o register_move -k 0x87654321 \e + -K 0x12345678 -U -p -R 2 -I fcp,0x1234567812345678 +.Ed +.Pp +This will move the registration from the current initiator, whose +Registration Key is 0x87654321, to the Fibre Channel initiator with the +Fiber Channel World Wide Node Name 0x1234567812345678. +A new registration key, 0x12345678, will be registered for the initiator +with the Fibre Channel World Wide Node Name 0x1234567812345678, and the +current initiator will be unregistered from the target. +The reservation will be moved to relative target port 2 on the target +device. +The registration will persist across power losses. .Sh SEE ALSO .Xr cam 3 , .Xr cam_cdbparse 3 , Modified: stable/10/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/10/sbin/camcontrol/camcontrol.c Tue Jul 15 17:20:40 2014 (r268699) +++ stable/10/sbin/camcontrol/camcontrol.c Tue Jul 15 17:26:43 2014 (r268700) @@ -96,6 +96,7 @@ typedef enum { CAM_CMD_SECURITY = 0x0000001d, CAM_CMD_HPA = 0x0000001e, CAM_CMD_SANITIZE = 0x0000001f, + CAM_CMD_PERSIST = 0x00000020 } cam_cmdmask; typedef enum { @@ -218,6 +219,7 @@ static struct camcontrol_opts option_tab {"fwdownload", CAM_CMD_DOWNLOAD_FW, CAM_ARG_NONE, "f:ys"}, {"security", CAM_CMD_SECURITY, CAM_ARG_NONE, "d:e:fh:k:l:qs:T:U:y"}, {"hpa", CAM_CMD_HPA, CAM_ARG_NONE, "Pflp:qs:U:y"}, + {"persist", CAM_CMD_PERSIST, CAM_ARG_NONE, "ai:I:k:K:o:ps:ST:U"}, #endif /* MINIMALISTIC */ {"help", CAM_CMD_USAGE, CAM_ARG_NONE, NULL}, {"-?", CAM_CMD_USAGE, CAM_ARG_NONE, NULL}, @@ -225,12 +227,6 @@ static struct camcontrol_opts option_tab {NULL, 0, 0, NULL} }; -typedef enum { - CC_OR_NOT_FOUND, - CC_OR_AMBIGUOUS, - CC_OR_FOUND -} camcontrol_optret; - struct cam_devitem { struct device_match_result dev_match; int num_periphs; @@ -7826,6 +7822,9 @@ usage(int printlong) " [-U ] [-y]\n" " camcontrol hpa [dev_id][generic args] [-f] [-l] [-P] [-p pwd]\n" " [-q] [-s max_sectors] [-U pwd] [-y]\n" +" camcontrol persist [dev_id][generic args] <-i action|-o action>\n" +" [-a][-I tid][-k key][-K sa_key][-p][-R rtp]\n" +" [-s scope][-S][-T type][-U]\n" #endif /* MINIMALISTIC */ " camcontrol help\n"); if (!printlong) @@ -7862,8 +7861,9 @@ usage(int printlong) "idle send the ATA IDLE command to the named device\n" "standby send the ATA STANDBY command to the named device\n" "sleep send the ATA SLEEP command to the named device\n" -"fwdownload program firmware of the named device with the given image" +"fwdownload program firmware of the named device with the given image\n" "security report or send ATA security commands to the named device\n" +"persist send the SCSI PERSISTENT RESERVE IN or OUT commands\n" "help this message\n" "Device Identifiers:\n" "bus:target specify the bus and target, lun defaults to 0\n" @@ -7998,6 +7998,22 @@ usage(int printlong) " device\n" "-U pwd unlock the HPA configuration of the device\n" "-y don't ask any questions\n" +"persist arguments:\n" +"-i action specify read_keys, read_reservation, report_cap, or\n" +" read_full_status\n" +"-o action specify register, register_ignore, reserve, release,\n" +" clear, preempt, preempt_abort, register_move, replace_lost\n" +"-a set the All Target Ports (ALL_TG_PT) bit\n" +"-I tid specify a Transport ID, e.g.: sas,0x1234567812345678\n" +"-k key specify the Reservation Key\n" +"-K sa_key specify the Service Action Reservation Key\n" +"-p set the Activate Persist Through Power Loss bit\n" +"-R rtp specify the Relative Target Port\n" +"-s scope specify the scope: lun, extent, element or a number\n" +"-S specify Transport ID for register, requires -I\n" +"-T res_type specify the reservation type: read_shared, wr_ex, rd_ex,\n" +" ex_ac, wr_ex_ro, ex_ac_ro, wr_ex_ar, ex_ac_ar\n" +"-U unregister the current initiator for register_move\n" ); #endif /* MINIMALISTIC */ } @@ -8332,6 +8348,11 @@ main(int argc, char **argv) error = scsisanitize(cam_dev, argc, argv, combinedopt, retry_count, timeout); break; + case CAM_CMD_PERSIST: + error = scsipersist(cam_dev, argc, argv, combinedopt, + retry_count, timeout, arglist & CAM_ARG_VERBOSE, + arglist & CAM_ARG_ERR_RECOVER); + break; #endif /* MINIMALISTIC */ case CAM_CMD_USAGE: usage(1); Modified: stable/10/sbin/camcontrol/camcontrol.h ============================================================================== --- stable/10/sbin/camcontrol/camcontrol.h Tue Jul 15 17:20:40 2014 (r268699) +++ stable/10/sbin/camcontrol/camcontrol.h Tue Jul 15 17:26:43 2014 (r268700) @@ -30,6 +30,13 @@ #ifndef _CAMCONTROL_H #define _CAMCONTROL_H + +typedef enum { + CC_OR_NOT_FOUND, + CC_OR_AMBIGUOUS, + CC_OR_FOUND +} camcontrol_optret; + /* * get_hook: Structure for evaluating args in a callback. */ @@ -56,6 +63,9 @@ void mode_list(struct cam_device *device int retry_count, int timeout); int scsidoinquiry(struct cam_device *device, int argc, char **argv, char *combinedopt, int retry_count, int timeout); +int scsipersist(struct cam_device *device, int argc, char **argv, + char *combinedopt, int retry_count, int timeout, int verbose, + int err_recover); char *cget(void *hook, char *name); int iget(void *hook, char *name); void arg_put(void *hook, int letter, void *arg, int count, char *name); Copied: stable/10/sbin/camcontrol/persist.c (from r268240, head/sbin/camcontrol/persist.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sbin/camcontrol/persist.c Tue Jul 15 17:26:43 2014 (r268700, copy of r268240, head/sbin/camcontrol/persist.c) @@ -0,0 +1,966 @@ +/*- + * Copyright (c) 2013 Spectra Logic Corporation + * All rights reserved. + * + * 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, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. + * + * Authors: Ken Merry (Spectra Logic Corporation) + */ +/* + * SCSI Persistent Reservation support for camcontrol(8). + */ + +#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 "camcontrol.h" + +struct persist_transport_id { + struct scsi_transportid_header *hdr; + unsigned int alloc_len; + STAILQ_ENTRY(persist_transport_id) links; +}; + +/* + * Service Actions for PERSISTENT RESERVE IN. + */ +static struct scsi_nv persist_in_actions[] = { + { "read_keys", SPRI_RK }, + { "read_reservation", SPRI_RR }, + { "report_capabilities", SPRI_RC }, + { "read_full_status", SPRI_RS } +}; + +/* + * Service Actions for PERSISTENT RESERVE OUT. + */ +static struct scsi_nv persist_out_actions[] = { + { "register", SPRO_REGISTER }, + { "reserve", SPRO_RESERVE }, + { "release" , SPRO_RELEASE }, + { "clear", SPRO_CLEAR }, + { "preempt", SPRO_PREEMPT }, + { "preempt_abort", SPRO_PRE_ABO }, + { "register_ignore", SPRO_REG_IGNO }, + { "register_move", SPRO_REG_MOVE }, + { "replace_lost", SPRO_REPL_LOST_RES } +}; + +/* + * Known reservation scopes. As of SPC-4, only LU_SCOPE is used in the + * spec. The others are obsolete. + */ +static struct scsi_nv persist_scope_table[] = { + { "lun", SPR_LU_SCOPE }, + { "extent", SPR_EXTENT_SCOPE }, + { "element", SPR_ELEMENT_SCOPE } +}; + +/* + * Reservation types. The longer name for a given reservation type is + * listed first, so that it makes more sense when we print out the + * reservation type. We step through the table linearly when looking for + * the text name for a particular numeric reservation type value. + */ +static struct scsi_nv persist_type_table[] = { + { "read_shared", SPR_TYPE_RD_SHARED }, + { "write_exclusive", SPR_TYPE_WR_EX }, + { "wr_ex", SPR_TYPE_WR_EX }, + { "read_exclusive", SPR_TYPE_RD_EX }, + { "rd_ex", SPR_TYPE_RD_EX }, + { "exclusive_access", SPR_TYPE_EX_AC }, + { "ex_ac", SPR_TYPE_EX_AC }, + { "write_exclusive_reg_only", SPR_TYPE_WR_EX_RO }, + { "wr_ex_ro", SPR_TYPE_WR_EX_RO }, + { "exclusive_access_reg_only", SPR_TYPE_EX_AC_RO }, + { "ex_ac_ro", SPR_TYPE_EX_AC_RO }, + { "write_exclusive_all_regs", SPR_TYPE_WR_EX_AR }, + { "wr_ex_ar", SPR_TYPE_WR_EX_AR }, + { "exclusive_access_all_regs", SPR_TYPE_EX_AC_AR }, + { "ex_ac_ar", SPR_TYPE_EX_AC_AR } +}; + +/* + * Print out the standard scope/type field. + */ +static void +persist_print_scopetype(uint8_t scopetype) +{ + const char *tmpstr; + int num_entries; + + num_entries = sizeof(persist_scope_table) / + sizeof(persist_scope_table[0]); + tmpstr = scsi_nv_to_str(persist_scope_table, num_entries, + scopetype & SPR_SCOPE_MASK); + fprintf(stdout, "Scope: %s (%#x)\n", (tmpstr != NULL) ? tmpstr : + "Unknown", (scopetype & SPR_SCOPE_MASK) >> SPR_SCOPE_SHIFT); + + num_entries = sizeof(persist_type_table) / + sizeof(persist_type_table[0]); + tmpstr = scsi_nv_to_str(persist_type_table, num_entries, + scopetype & SPR_TYPE_MASK); + fprintf(stdout, "Type: %s (%#x)\n", (tmpstr != NULL) ? tmpstr : + "Unknown", scopetype & SPR_TYPE_MASK); +} + +static void +persist_print_transportid(uint8_t *buf, uint32_t len) +{ + struct sbuf *sb; + + sb = sbuf_new_auto(); + if (sb == NULL) + fprintf(stderr, "Unable to allocate sbuf\n"); + + scsi_transportid_sbuf(sb, (struct scsi_transportid_header *)buf, len); + + sbuf_finish(sb); + + fprintf(stdout, "%s\n", sbuf_data(sb)); + + sbuf_delete(sb); +} + +/* + * Print out a persistent reservation. This is used with the READ + * RESERVATION (0x01) service action of the PERSISTENT RESERVE IN command. + */ +static void +persist_print_res(struct scsi_per_res_in_header *hdr, uint32_t valid_len) +{ + uint32_t length; + struct scsi_per_res_in_rsrv *res; + + length = scsi_4btoul(hdr->length); + length = MIN(length, valid_len); + + res = (struct scsi_per_res_in_rsrv *)hdr; + + if (length < sizeof(res->data) - sizeof(res->data.extent_length)) { + if (length == 0) + fprintf(stdout, "No reservations.\n"); + else + warnx("unable to print reservation, only got %u " + "valid bytes", length); + return; + } + fprintf(stdout, "PRgeneration: %#x\n", + scsi_4btoul(res->header.generation)); + fprintf(stdout, "Reservation Key: %#jx\n", + (uintmax_t)scsi_8btou64(res->data.reservation)); + fprintf(stdout, "Scope address: %#x\n", + scsi_4btoul(res->data.scope_addr)); + + persist_print_scopetype(res->data.scopetype); + + fprintf(stdout, "Extent length: %u\n", + scsi_2btoul(res->data.extent_length)); +} + +/* + * Print out persistent reservation keys. This is used with the READ KEYS + * service action of the PERSISTENT RESERVE IN command. + */ +static void +persist_print_keys(struct scsi_per_res_in_header *hdr, uint32_t valid_len) +{ + uint32_t length, num_keys, i; + struct scsi_per_res_key *key; + + length = scsi_4btoul(hdr->length); + length = MIN(length, valid_len); + + num_keys = length / sizeof(*key); + + fprintf(stdout, "PRgeneration: %#x\n", scsi_4btoul(hdr->generation)); + fprintf(stdout, "%u key%s%s\n", num_keys, (num_keys == 1) ? "" : "s", + (num_keys == 0) ? "." : ":"); + + for (i = 0, key = (struct scsi_per_res_key *)&hdr[1]; i < num_keys; + i++, key++) { + fprintf(stdout, "%u: %#jx\n", i, + (uintmax_t)scsi_8btou64(key->key)); + } +} + +/* + * Print out persistent reservation capabilities. This is used with the + * REPORT CAPABILITIES service action of the PERSISTENT RESERVE IN command. + */ +static void +persist_print_cap(struct scsi_per_res_cap *cap, uint32_t valid_len) +{ + uint32_t length; + int check_type_mask = 0; + + length = scsi_2btoul(cap->length); + length = MIN(length, valid_len); + + if (length < __offsetof(struct scsi_per_res_cap, type_mask)) { + fprintf(stdout, "Insufficient data (%u bytes) to report " + "full capabilities\n", length); + return; + } + if (length >= __offsetof(struct scsi_per_res_cap, reserved)) + check_type_mask = 1; + + fprintf(stdout, "Replace Lost Reservation Capable (RLR_C): %d\n", + (cap->flags1 & SPRI_RLR_C) ? 1 : 0); + fprintf(stdout, "Compatible Reservation Handling (CRH): %d\n", + (cap->flags1 & SPRI_CRH) ? 1 : 0); + fprintf(stdout, "Specify Initiator Ports Capable (SIP_C): %d\n", + (cap->flags1 & SPRI_SIP_C) ? 1 : 0); + fprintf(stdout, "All Target Ports Capable (ATP_C): %d\n", + (cap->flags1 & SPRI_ATP_C) ? 1 : 0); + fprintf(stdout, "Persist Through Power Loss Capable (PTPL_C): %d\n", + (cap->flags1 & SPRI_PTPL_C) ? 1 : 0); + fprintf(stdout, "ALLOW COMMANDS field: (%#x)\n", + (cap->flags2 & SPRI_ALLOW_CMD_MASK) >> SPRI_ALLOW_CMD_SHIFT); + /* + * These cases are cut-and-pasted from SPC4r36l. There is no + * succinct way to describe these otherwise, and even with the + * verbose description, the user will probably have to refer to + * the spec to fully understand what is going on. + */ + switch (cap->flags2 & SPRI_ALLOW_CMD_MASK) { + case SPRI_ALLOW_1: + fprintf(stdout, +" The device server allows the TEST UNIT READY command through Write\n" +" Exclusive type reservations and Exclusive Access type reservations\n" +" and does not provide information about whether the following commands\n" +" are allowed through Write Exclusive type reservations:\n" +" a) the MODE SENSE command, READ ATTRIBUTE command, READ BUFFER\n" +" command, RECEIVE COPY RESULTS command, RECEIVE DIAGNOSTIC\n" +" RESULTS command, REPORT SUPPORTED OPERATION CODES command,\n" +" and REPORT SUPPORTED TASK MANAGEMENT FUNCTION command; and\n" +" b) the READ DEFECT DATA command (see SBC-3).\n"); + break; + case SPRI_ALLOW_2: + fprintf(stdout, +" The device server allows the TEST UNIT READY command through Write\n" +" Exclusive type reservations and Exclusive Access type reservations\n" +" and does not allow the following commands through Write Exclusive type\n" +" reservations:\n" +" a) the MODE SENSE command, READ ATTRIBUTE command, READ BUFFER\n" +" command, RECEIVE DIAGNOSTIC RESULTS command, REPORT SUPPORTED\n" +" OPERATION CODES command, and REPORT SUPPORTED TASK MANAGEMENT\n" +" FUNCTION command; and\n" +" b) the READ DEFECT DATA command.\n" +" The device server does not allow the RECEIVE COPY RESULTS command\n" +" through Write Exclusive type reservations or Exclusive Access type\n" +" reservations.\n"); + break; + case SPRI_ALLOW_3: + fprintf(stdout, +" The device server allows the TEST UNIT READY command through Write\n" +" Exclusive type reservations and Exclusive Access type reservations\n" +" and allows the following commands through Write Exclusive type\n" +" reservations:\n" +" a) the MODE SENSE command, READ ATTRIBUTE command, READ BUFFER\n" +" command, RECEIVE DIAGNOSTIC RESULTS command, REPORT SUPPORTED\n" +" OPERATION CODES command, and REPORT SUPPORTED TASK MANAGEMENT\n" +" FUNCTION command; and\n" +" b) the READ DEFECT DATA command.\n" +" The device server does not allow the RECEIVE COPY RESULTS command\n" +" through Write Exclusive type reservations or Exclusive Access type\n" +" reservations.\n"); + break; + case SPRI_ALLOW_4: + fprintf(stdout, +" The device server allows the TEST UNIT READY command and the RECEIVE\n" +" COPY RESULTS command through Write Exclusive type reservations and\n" +" Exclusive Access type reservations and allows the following commands\n" +" through Write Exclusive type reservations:\n" +" a) the MODE SENSE command, READ ATTRIBUTE command, READ BUFFER\n" +" command, RECEIVE DIAGNOSTIC RESULTS command, REPORT SUPPORTED\n" +" OPERATION CODES command, and REPORT SUPPORTED TASK MANAGEMENT\n" +" FUNCTION command; and\n" +" b) the READ DEFECT DATA command.\n"); + break; + case SPRI_ALLOW_NA: + fprintf(stdout, +" No information is provided about whether certain commands are allowed\n" +" through certain types of persistent reservations.\n"); + break; + default: + fprintf(stdout, +" Unknown ALLOW COMMANDS value %#x\n", + (cap->flags2 & SPRI_ALLOW_CMD_MASK) >> + SPRI_ALLOW_CMD_SHIFT); + break; + } + fprintf(stdout, "Persist Through Power Loss Activated (PTPL_A): %d\n", + (cap->flags2 & SPRI_PTPL_A) ? 1 : 0); + if ((check_type_mask != 0) + && (cap->flags2 & SPRI_TMV)) { + fprintf(stdout, "Supported Persistent Reservation Types:\n"); + fprintf(stdout, " Write Exclusive - All Registrants " + "(WR_EX_AR): %d\n", + (cap->type_mask[0] & SPRI_TM_WR_EX_AR)? 1 : 0); + fprintf(stdout, " Exclusive Access - Registrants Only " + "(EX_AC_RO): %d\n", + (cap->type_mask[0] & SPRI_TM_EX_AC_RO) ? 1 : 0); + fprintf(stdout, " Write Exclusive - Registrants Only " + "(WR_EX_RO): %d\n", + (cap->type_mask[0] & SPRI_TM_WR_EX_RO)? 1 : 0); + fprintf(stdout, " Exclusive Access (EX_AC): %d\n", + (cap->type_mask[0] & SPRI_TM_EX_AC) ? 1 : 0); + fprintf(stdout, " Write Exclusive (WR_EX): %d\n", + (cap->type_mask[0] & SPRI_TM_WR_EX) ? 1 : 0); + fprintf(stdout, " Exclusive Access - All Registrants " + "(EX_AC_AR): %d\n", + (cap->type_mask[1] & SPRI_TM_EX_AC_AR) ? 1 : 0); + } else { + fprintf(stdout, "Persistent Reservation Type Mask is NOT " + "valid\n"); + } + + +} + +static void +persist_print_full(struct scsi_per_res_in_header *hdr, uint32_t valid_len) +{ + uint32_t length, len_to_go = 0; + struct scsi_per_res_in_full_desc *desc; + uint8_t *cur_pos; + int i; + + length = scsi_4btoul(hdr->length); + length = MIN(length, valid_len); + + if (length < sizeof(*desc)) { + if (length == 0) + fprintf(stdout, "No reservations.\n"); + else + warnx("unable to print reservation, only got %u " + "valid bytes", length); + return; + } + + fprintf(stdout, "PRgeneration: %#x\n", scsi_4btoul(hdr->generation)); + cur_pos = (uint8_t *)&hdr[1]; + for (len_to_go = length, i = 0, + desc = (struct scsi_per_res_in_full_desc *)cur_pos; + len_to_go >= sizeof(*desc); + desc = (struct scsi_per_res_in_full_desc *)cur_pos, i++) { + uint32_t additional_length, cur_length; + + + fprintf(stdout, "Reservation Key: %#jx\n", + (uintmax_t)scsi_8btou64(desc->res_key.key)); + fprintf(stdout, "All Target Ports (ALL_TG_PT): %d\n", + (desc->flags & SPRI_FULL_ALL_TG_PT) ? 1 : 0); + fprintf(stdout, "Reservation Holder (R_HOLDER): %d\n", + (desc->flags & SPRI_FULL_R_HOLDER) ? 1 : 0); + + if (desc->flags & SPRI_FULL_R_HOLDER) + persist_print_scopetype(desc->scopetype); + + if ((desc->flags & SPRI_FULL_ALL_TG_PT) == 0) + fprintf(stdout, "Relative Target Port ID: %#x\n", + scsi_2btoul(desc->rel_trgt_port_id)); + + additional_length = scsi_4btoul(desc->additional_length); + + persist_print_transportid(desc->transport_id, + additional_length); + + cur_length = sizeof(*desc) + additional_length; + len_to_go -= cur_length; + cur_pos += cur_length; + } +} + +int +scsipersist(struct cam_device *device, int argc, char **argv, char *combinedopt, + int retry_count, int timeout, int verbosemode, int err_recover) +{ + union ccb *ccb = NULL; + int c, in = 0, out = 0; + int action = -1, num_ids = 0; + int error = 0; + uint32_t res_len = 0; + unsigned long rel_tgt_port = 0; + uint8_t *res_buf = NULL; + int scope = SPR_LU_SCOPE, res_type = 0, key_set = 0, sa_key_set = 0; + struct persist_transport_id *id, *id2; + STAILQ_HEAD(, persist_transport_id) transport_id_list; + uint64_t key = 0, sa_key = 0; + struct scsi_nv *table = NULL; + size_t table_size = 0, id_len = 0; + uint32_t valid_len = 0; + int all_tg_pt = 0, aptpl = 0, spec_i_pt = 0, unreg = 0,rel_port_set = 0; + + STAILQ_INIT(&transport_id_list); + + ccb = cam_getccb(device); + if (ccb == NULL) { + warnx("%s: error allocating CCB", __func__); + error = 1; + goto bailout; + } + + bzero(&(&ccb->ccb_h)[1], + sizeof(union ccb) - sizeof(struct ccb_hdr)); + + while ((c = getopt(argc, argv, combinedopt)) != -1) { + switch (c) { + case 'a': + all_tg_pt = 1; + break; + case 'I': { + int error_str_len = 128; + char error_str[error_str_len]; + char *id_str; + + id = malloc(sizeof(*id)); + if (id == NULL) { + warnx("%s: error allocating %zu bytes", + __func__, sizeof(*id)); + error = 1; + goto bailout; + } + bzero(id, sizeof(*id)); + + id_str = strdup(optarg); + if (id_str == NULL) { + warnx("%s: error duplicating string %s", + __func__, optarg); + free(id); + error = 1; + goto bailout; + } + error = scsi_parse_transportid(id_str, &id->hdr, + &id->alloc_len, error_str, error_str_len); + if (error != 0) { + warnx("%s", error_str); + error = 1; + free(id); + free(id_str); + goto bailout; + } + free(id_str); + + STAILQ_INSERT_TAIL(&transport_id_list, id, links); + num_ids++; + id_len += id->alloc_len; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 18:21:28 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 83847BC; Tue, 15 Jul 2014 18:21:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 642DB24AF; Tue, 15 Jul 2014 18:21:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FILSbZ025504; Tue, 15 Jul 2014 18:21:28 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FILRNM025491; Tue, 15 Jul 2014 18:21:27 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407151821.s6FILRNM025491@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jul 2014 18:21:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268703 - in stable/10: sys/dev/iscsi usr.sbin/iscsid X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 18:21:28 -0000 Author: mav Date: Tue Jul 15 18:21:26 2014 New Revision: 268703 URL: http://svnweb.freebsd.org/changeset/base/268703 Log: MFC r268326: Make iSCSI initiator keep Initiator Session ID (ISID) across reconnects. Previously ISID was changed every time, that made impossible correct persistent reservation, because reconnected session was identified as completely new one. Modified: stable/10/sys/dev/iscsi/iscsi.c stable/10/sys/dev/iscsi/iscsi.h stable/10/sys/dev/iscsi/iscsi_ioctl.h stable/10/usr.sbin/iscsid/iscsid.c stable/10/usr.sbin/iscsid/iscsid.h stable/10/usr.sbin/iscsid/login.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.c Tue Jul 15 17:39:53 2014 (r268702) +++ stable/10/sys/dev/iscsi/iscsi.c Tue Jul 15 18:21:26 2014 (r268703) @@ -1226,6 +1226,9 @@ iscsi_ioctl_daemon_wait(struct iscsi_sof ISCSI_SESSION_UNLOCK(is); request->idr_session_id = is->is_id; + memcpy(&request->idr_isid, &is->is_isid, + sizeof(request->idr_isid)); + request->idr_tsih = 0; /* New or reinstated session. */ memcpy(&request->idr_conf, &is->is_conf, sizeof(request->idr_conf)); @@ -1275,7 +1278,7 @@ iscsi_ioctl_daemon_handoff(struct iscsi_ strlcpy(is->is_target_alias, handoff->idh_target_alias, sizeof(is->is_target_alias)); - memcpy(is->is_isid, handoff->idh_isid, sizeof(is->is_isid)); + is->is_tsih = handoff->idh_tsih; is->is_statsn = handoff->idh_statsn; is->is_initial_r2t = handoff->idh_initial_r2t; is->is_immediate_data = handoff->idh_immediate_data; @@ -1651,6 +1654,9 @@ iscsi_ioctl_session_add(struct iscsi_sof is->is_softc = sc; sc->sc_last_session_id++; is->is_id = sc->sc_last_session_id; + is->is_isid[0] = 0x80; /* RFC 3720, 10.12.5: 10b, "Random" ISID. */ + arc4rand(&is->is_isid[1], 5, 0); + is->is_tsih = 0; callout_init(&is->is_callout, 1); callout_reset(&is->is_callout, 1 * hz, iscsi_callout, is); TAILQ_INSERT_TAIL(&sc->sc_sessions, is, is_next); Modified: stable/10/sys/dev/iscsi/iscsi.h ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.h Tue Jul 15 17:39:53 2014 (r268702) +++ stable/10/sys/dev/iscsi/iscsi.h Tue Jul 15 18:21:26 2014 (r268703) @@ -64,6 +64,7 @@ struct iscsi_session { size_t is_max_burst_length; size_t is_first_burst_length; uint8_t is_isid[6]; + uint16_t is_tsih; bool is_immediate_data; size_t is_max_data_segment_length; char is_target_alias[ISCSI_ALIAS_LEN]; Modified: stable/10/sys/dev/iscsi/iscsi_ioctl.h ============================================================================== --- stable/10/sys/dev/iscsi/iscsi_ioctl.h Tue Jul 15 17:39:53 2014 (r268702) +++ stable/10/sys/dev/iscsi/iscsi_ioctl.h Tue Jul 15 18:21:26 2014 (r268703) @@ -91,8 +91,8 @@ struct iscsi_session_state { struct iscsi_daemon_request { unsigned int idr_session_id; struct iscsi_session_conf idr_conf; - uint8_t idr_spare_isid[6]; - uint16_t idr_spare_tsih; + uint8_t idr_isid[6]; + uint16_t idr_tsih; uint16_t idr_spare_cid; int idr_spare[4]; }; @@ -101,9 +101,9 @@ struct iscsi_daemon_handoff { unsigned int idh_session_id; int idh_socket; char idh_target_alias[ISCSI_ALIAS_LEN]; - uint8_t idh_isid[6]; - uint16_t idr_spare_tsih; - uint16_t idr_spare_cid; + uint8_t idh_spare_isid[6]; + uint16_t idh_tsih; + uint16_t idh_spare_cid; uint32_t idh_statsn; int idh_header_digest; int idh_data_digest; Modified: stable/10/usr.sbin/iscsid/iscsid.c ============================================================================== --- stable/10/usr.sbin/iscsid/iscsid.c Tue Jul 15 17:39:53 2014 (r268702) +++ stable/10/usr.sbin/iscsid/iscsid.c Tue Jul 15 18:21:26 2014 (r268703) @@ -149,8 +149,8 @@ resolve_addr(const struct connection *co } static struct connection * -connection_new(unsigned int session_id, const struct iscsi_session_conf *conf, - int iscsi_fd) +connection_new(unsigned int session_id, const uint8_t isid[8], uint16_t tsih, + const struct iscsi_session_conf *conf, int iscsi_fd) { struct connection *conn; struct addrinfo *from_ai, *to_ai; @@ -176,6 +176,8 @@ connection_new(unsigned int session_id, conn->conn_first_burst_length = 65536; conn->conn_session_id = session_id; + memcpy(&conn->conn_isid, isid, sizeof(conn->conn_isid)); + conn->conn_tsih = tsih; conn->conn_iscsi_fd = iscsi_fd; /* @@ -264,7 +266,7 @@ handoff(struct connection *conn) idh.idh_socket = conn->conn_socket; strlcpy(idh.idh_target_alias, conn->conn_target_alias, sizeof(idh.idh_target_alias)); - memcpy(idh.idh_isid, conn->conn_isid, sizeof(idh.idh_isid)); + idh.idh_tsih = conn->conn_tsih; idh.idh_statsn = conn->conn_statsn; idh.idh_header_digest = conn->conn_header_digest; idh.idh_data_digest = conn->conn_data_digest; @@ -430,7 +432,8 @@ handle_request(int iscsi_fd, const struc setproctitle("%s", request->idr_conf.isc_target_addr); } - conn = connection_new(request->idr_session_id, &request->idr_conf, iscsi_fd); + conn = connection_new(request->idr_session_id, request->idr_isid, + request->idr_tsih, &request->idr_conf, iscsi_fd); set_timeout(timeout); capsicate(conn); login(conn); Modified: stable/10/usr.sbin/iscsid/iscsid.h ============================================================================== --- stable/10/usr.sbin/iscsid/iscsid.h Tue Jul 15 17:39:53 2014 (r268702) +++ stable/10/usr.sbin/iscsid/iscsid.h Tue Jul 15 18:21:26 2014 (r268703) @@ -51,6 +51,7 @@ struct connection { struct iscsi_session_conf conn_conf; char conn_target_alias[ISCSI_ADDR_LEN]; uint8_t conn_isid[6]; + uint16_t conn_tsih; uint32_t conn_statsn; int conn_header_digest; int conn_data_digest; Modified: stable/10/usr.sbin/iscsid/login.c ============================================================================== --- stable/10/usr.sbin/iscsid/login.c Tue Jul 15 17:39:53 2014 (r268702) +++ stable/10/usr.sbin/iscsid/login.c Tue Jul 15 18:21:26 2014 (r268703) @@ -199,6 +199,7 @@ login_receive(struct connection *conn, b "is %d, should be %d", ntohl(bhslr->bhslr_statsn), conn->conn_statsn + 1); } + conn->conn_tsih = ntohs(bhslr->bhslr_tsih); conn->conn_statsn = ntohl(bhslr->bhslr_statsn); return (response); @@ -218,6 +219,7 @@ login_new_request(struct connection *con login_set_csg(request, BHSLR_STAGE_SECURITY_NEGOTIATION); login_set_nsg(request, BHSLR_STAGE_OPERATIONAL_NEGOTIATION); memcpy(bhslr->bhslr_isid, &conn->conn_isid, sizeof(bhslr->bhslr_isid)); + bhslr->bhslr_tsih = htons(conn->conn_tsih); bhslr->bhslr_initiator_task_tag = 0; bhslr->bhslr_cmdsn = 0; bhslr->bhslr_expstatsn = htonl(conn->conn_statsn + 1); @@ -749,24 +751,6 @@ login_chap(struct connection *conn) log_debugx("CHAP authentication done"); } -static void -login_create_isid(struct connection *conn) -{ - int rv; - - /* - * RFC 3720, 10.12.5: 10b, "Random" ISID. - * - */ - conn->conn_isid[0] = 0x80; - - rv = RAND_bytes(&conn->conn_isid[1], 3); - if (rv != 1) { - log_errx(1, "RAND_bytes failed: %s", - ERR_error_string(ERR_get_error(), NULL)); - } -} - void login(struct connection *conn) { @@ -777,8 +761,6 @@ login(struct connection *conn) const char *auth_method; int i; - login_create_isid(conn); - log_debugx("beginning Login phase; sending Login PDU"); request = login_new_request(conn); From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 18:22:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 932782A5; Tue, 15 Jul 2014 18:22:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7438B24D7; Tue, 15 Jul 2014 18:22:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FIMInN025770; Tue, 15 Jul 2014 18:22:18 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FIMInu025769; Tue, 15 Jul 2014 18:22:18 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407151822.s6FIMInu025769@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jul 2014 18:22:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268704 - stable/10/sys/dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 18:22:18 -0000 Author: mav Date: Tue Jul 15 18:22:17 2014 New Revision: 268704 URL: http://svnweb.freebsd.org/changeset/base/268704 Log: MFC r268370: Make XPT_GET_TRAN_SETTINGS to report CAM that command queueing is enabled, but make couple changes to handle non-queued commands too, if happen. Modified: stable/10/sys/dev/iscsi/iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.c Tue Jul 15 18:21:26 2014 (r268703) +++ stable/10/sys/dev/iscsi/iscsi.c Tue Jul 15 18:22:17 2014 (r268704) @@ -1346,7 +1346,7 @@ iscsi_ioctl_daemon_handoff(struct iscsi_ is->is_sim = cam_sim_alloc(iscsi_action, iscsi_poll, "iscsi", is, is->is_id /* unit */, &is->is_lock, - maxtags, maxtags, is->is_devq); + 1, maxtags, is->is_devq); if (is->is_sim == NULL) { ISCSI_SESSION_UNLOCK(is); ISCSI_SESSION_WARN(is, "failed to allocate SIM"); @@ -1948,23 +1948,24 @@ iscsi_action_scsiio(struct iscsi_session break; } - switch (csio->tag_action) { - case MSG_HEAD_OF_Q_TAG: - bhssc->bhssc_flags |= BHSSC_FLAGS_ATTR_HOQ; - break; - break; - case MSG_ORDERED_Q_TAG: - bhssc->bhssc_flags |= BHSSC_FLAGS_ATTR_ORDERED; - break; - case MSG_ACA_TASK: - bhssc->bhssc_flags |= BHSSC_FLAGS_ATTR_ACA; - break; - case CAM_TAG_ACTION_NONE: - case MSG_SIMPLE_Q_TAG: - default: - bhssc->bhssc_flags |= BHSSC_FLAGS_ATTR_SIMPLE; - break; - } + if ((ccb->ccb_h.flags & CAM_TAG_ACTION_VALID) != 0) { + switch (csio->tag_action) { + case MSG_HEAD_OF_Q_TAG: + bhssc->bhssc_flags |= BHSSC_FLAGS_ATTR_HOQ; + break; + case MSG_ORDERED_Q_TAG: + bhssc->bhssc_flags |= BHSSC_FLAGS_ATTR_ORDERED; + break; + case MSG_ACA_TASK: + bhssc->bhssc_flags |= BHSSC_FLAGS_ATTR_ACA; + break; + case MSG_SIMPLE_Q_TAG: + default: + bhssc->bhssc_flags |= BHSSC_FLAGS_ATTR_SIMPLE; + break; + } + } else + bhssc->bhssc_flags |= BHSSC_FLAGS_ATTR_UNTAGGED; bhssc->bhssc_lun = iscsi_encode_lun(csio->ccb_h.target_lun); bhssc->bhssc_initiator_task_tag = is->is_initiator_task_tag; @@ -2059,6 +2060,23 @@ iscsi_action(struct cam_sim *sim, union cpi->ccb_h.status = CAM_REQ_CMP; break; } + case XPT_GET_TRAN_SETTINGS: + { + struct ccb_trans_settings *cts; + struct ccb_trans_settings_scsi *scsi; + + cts = &ccb->cts; + scsi = &cts->proto_specific.scsi; + + cts->protocol = PROTO_SCSI; + cts->protocol_version = SCSI_REV_SPC3; + cts->transport = XPORT_ISCSI; + cts->transport_version = 0; + scsi->valid = CTS_SCSI_VALID_TQ; + scsi->flags = CTS_SCSI_FLAGS_TAG_ENB; + cts->ccb_h.status = CAM_REQ_CMP; + break; + } case XPT_CALC_GEOMETRY: cam_calc_geometry(&ccb->ccg, /*extended*/1); ccb->ccb_h.status = CAM_REQ_CMP; From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 18:23:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1425F409; Tue, 15 Jul 2014 18:23:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F30E524E0; Tue, 15 Jul 2014 18:23:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FINEEx025999; Tue, 15 Jul 2014 18:23:14 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FINEff025998; Tue, 15 Jul 2014 18:23:14 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407151823.s6FINEff025998@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jul 2014 18:23:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268705 - stable/10/sys/dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 18:23:15 -0000 Author: mav Date: Tue Jul 15 18:23:14 2014 New Revision: 268705 URL: http://svnweb.freebsd.org/changeset/base/268705 Log: MFC r268388: Add XPT_ABORT support to iSCSI initiator. While CAM does not use it normally, it is useful for targets testing. Modified: stable/10/sys/dev/iscsi/iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.c Tue Jul 15 18:22:17 2014 (r268704) +++ stable/10/sys/dev/iscsi/iscsi.c Tue Jul 15 18:23:14 2014 (r268705) @@ -157,6 +157,7 @@ static void iscsi_pdu_queue(struct icl_p static void iscsi_pdu_update_statsn(const struct icl_pdu *response); static void iscsi_pdu_handle_nop_in(struct icl_pdu *response); static void iscsi_pdu_handle_scsi_response(struct icl_pdu *response); +static void iscsi_pdu_handle_task_response(struct icl_pdu *response); static void iscsi_pdu_handle_data_in(struct icl_pdu *response); static void iscsi_pdu_handle_logout_response(struct icl_pdu *response); static void iscsi_pdu_handle_r2t(struct icl_pdu *response); @@ -168,7 +169,7 @@ static void iscsi_action(struct cam_sim static void iscsi_poll(struct cam_sim *sim); static struct iscsi_outstanding *iscsi_outstanding_find(struct iscsi_session *is, uint32_t initiator_task_tag); -static int iscsi_outstanding_add(struct iscsi_session *is, +static struct iscsi_outstanding *iscsi_outstanding_add(struct iscsi_session *is, uint32_t initiator_task_tag, union ccb *ccb); static void iscsi_outstanding_remove(struct iscsi_session *is, struct iscsi_outstanding *io); @@ -279,27 +280,35 @@ iscsi_session_logout(struct iscsi_sessio } static void -iscsi_session_terminate_tasks(struct iscsi_session *is, bool requeue) +iscsi_session_terminate_task(struct iscsi_session *is, + struct iscsi_outstanding *io, bool requeue) { - struct iscsi_outstanding *io, *tmp; - ISCSI_SESSION_LOCK_ASSERT(is); - - TAILQ_FOREACH_SAFE(io, &is->is_outstanding, io_next, tmp) { - if (requeue) { - io->io_ccb->ccb_h.status &= ~CAM_SIM_QUEUED; + if (io->io_ccb != NULL) { + io->io_ccb->ccb_h.status &= ~(CAM_SIM_QUEUED | CAM_STATUS_MASK); + if (requeue) io->io_ccb->ccb_h.status |= CAM_REQUEUE_REQ; - } else { - io->io_ccb->ccb_h.status = CAM_REQ_ABORTED; - } - + else + io->io_ccb->ccb_h.status |= CAM_REQ_ABORTED; if ((io->io_ccb->ccb_h.status & CAM_DEV_QFRZN) == 0) { + io->io_ccb->ccb_h.status |= CAM_DEV_QFRZN; xpt_freeze_devq(io->io_ccb->ccb_h.path, 1); ISCSI_SESSION_DEBUG(is, "freezing devq"); } - io->io_ccb->ccb_h.status |= CAM_DEV_QFRZN; xpt_done(io->io_ccb); - iscsi_outstanding_remove(is, io); + } + iscsi_outstanding_remove(is, io); +} + +static void +iscsi_session_terminate_tasks(struct iscsi_session *is, bool requeue) +{ + struct iscsi_outstanding *io, *tmp; + + ISCSI_SESSION_LOCK_ASSERT(is); + + TAILQ_FOREACH_SAFE(io, &is->is_outstanding, io_next, tmp) { + iscsi_session_terminate_task(is, io, requeue); } } @@ -698,6 +707,9 @@ iscsi_receive_callback(struct icl_pdu *r case ISCSI_BHS_OPCODE_SCSI_RESPONSE: iscsi_pdu_handle_scsi_response(response); break; + case ISCSI_BHS_OPCODE_TASK_RESPONSE: + iscsi_pdu_handle_task_response(response); + break; case ISCSI_BHS_OPCODE_SCSI_DATA_IN: iscsi_pdu_handle_data_in(response); break; @@ -818,7 +830,7 @@ iscsi_pdu_handle_scsi_response(struct ic bhssr = (struct iscsi_bhs_scsi_response *)response->ip_bhs; io = iscsi_outstanding_find(is, bhssr->bhssr_initiator_task_tag); - if (io == NULL) { + if (io == NULL || io->io_ccb == NULL) { ISCSI_SESSION_WARN(is, "bad itt 0x%x", bhssr->bhssr_initiator_task_tag); icl_pdu_free(response); iscsi_session_reconnect(is); @@ -918,6 +930,38 @@ out: } static void +iscsi_pdu_handle_task_response(struct icl_pdu *response) +{ + struct iscsi_bhs_task_management_response *bhstmr; + struct iscsi_outstanding *io, *aio; + struct iscsi_session *is; + + is = PDU_SESSION(response); + + bhstmr = (struct iscsi_bhs_task_management_response *)response->ip_bhs; + io = iscsi_outstanding_find(is, bhstmr->bhstmr_initiator_task_tag); + if (io == NULL || io->io_ccb != NULL) { + ISCSI_SESSION_WARN(is, "bad itt 0x%x", + bhstmr->bhstmr_initiator_task_tag); + icl_pdu_free(response); + iscsi_session_reconnect(is); + return; + } + + if (bhstmr->bhstmr_response != BHSTMR_RESPONSE_FUNCTION_COMPLETE) { + ISCSI_SESSION_WARN(is, "task response 0x%x", + bhstmr->bhstmr_response); + } else { + aio = iscsi_outstanding_find(is, io->io_datasn); + if (aio != NULL && aio->io_ccb != NULL) + iscsi_session_terminate_task(is, aio, false); + } + + iscsi_outstanding_remove(is, io); + icl_pdu_free(response); +} + +static void iscsi_pdu_handle_data_in(struct icl_pdu *response) { struct iscsi_bhs_data_in *bhsdi; @@ -929,7 +973,7 @@ iscsi_pdu_handle_data_in(struct icl_pdu is = PDU_SESSION(response); bhsdi = (struct iscsi_bhs_data_in *)response->ip_bhs; io = iscsi_outstanding_find(is, bhsdi->bhsdi_initiator_task_tag); - if (io == NULL) { + if (io == NULL || io->io_ccb == NULL) { ISCSI_SESSION_WARN(is, "bad itt 0x%x", bhsdi->bhsdi_initiator_task_tag); icl_pdu_free(response); iscsi_session_reconnect(is); @@ -1042,7 +1086,7 @@ iscsi_pdu_handle_r2t(struct icl_pdu *res bhsr2t = (struct iscsi_bhs_r2t *)response->ip_bhs; io = iscsi_outstanding_find(is, bhsr2t->bhsr2t_initiator_task_tag); - if (io == NULL) { + if (io == NULL || io->io_ccb == NULL) { ISCSI_SESSION_WARN(is, "bad itt 0x%x; reconnecting", bhsr2t->bhsr2t_initiator_task_tag); icl_pdu_free(response); @@ -1866,7 +1910,21 @@ iscsi_outstanding_find(struct iscsi_sess return (NULL); } -static int +static struct iscsi_outstanding * +iscsi_outstanding_find_ccb(struct iscsi_session *is, union ccb *ccb) +{ + struct iscsi_outstanding *io; + + ISCSI_SESSION_LOCK_ASSERT(is); + + TAILQ_FOREACH(io, &is->is_outstanding, io_next) { + if (io->io_ccb == ccb) + return (io); + } + return (NULL); +} + +static struct iscsi_outstanding * iscsi_outstanding_add(struct iscsi_session *is, uint32_t initiator_task_tag, union ccb *ccb) { @@ -1880,12 +1938,12 @@ iscsi_outstanding_add(struct iscsi_sessi io = uma_zalloc(iscsi_outstanding_zone, M_NOWAIT | M_ZERO); if (io == NULL) { ISCSI_SESSION_WARN(is, "failed to allocate %zd bytes", sizeof(*io)); - return (ENOMEM); + return (NULL); } io->io_initiator_task_tag = initiator_task_tag; io->io_ccb = ccb; TAILQ_INSERT_TAIL(&is->is_outstanding, io, io_next); - return (0); + return (io); } static void @@ -1899,11 +1957,66 @@ iscsi_outstanding_remove(struct iscsi_se } static void +iscsi_action_abort(struct iscsi_session *is, union ccb *ccb) +{ + struct icl_pdu *request; + struct iscsi_bhs_task_management_request *bhstmr; + struct ccb_abort *cab = &ccb->cab; + struct iscsi_outstanding *io, *aio; + + ISCSI_SESSION_LOCK_ASSERT(is); + +#if 0 + KASSERT(is->is_login_phase == false, ("%s called during Login Phase", __func__)); +#else + if (is->is_login_phase) { + ccb->ccb_h.status = CAM_REQ_ABORTED; + xpt_done(ccb); + return; + } +#endif + + aio = iscsi_outstanding_find_ccb(is, cab->abort_ccb); + if (aio == NULL) { + ccb->ccb_h.status = CAM_REQ_CMP; + xpt_done(ccb); + return; + } + + request = icl_pdu_new_bhs(is->is_conn, M_NOWAIT); + if (request == NULL) { + ccb->ccb_h.status = CAM_RESRC_UNAVAIL; + xpt_done(ccb); + return; + } + + bhstmr = (struct iscsi_bhs_task_management_request *)request->ip_bhs; + bhstmr->bhstmr_opcode = ISCSI_BHS_OPCODE_TASK_REQUEST; + bhstmr->bhstmr_function = 0x80 | BHSTMR_FUNCTION_ABORT_TASK; + + bhstmr->bhstmr_lun = htobe64(CAM_EXTLUN_BYTE_SWIZZLE(ccb->ccb_h.target_lun)); + bhstmr->bhstmr_initiator_task_tag = is->is_initiator_task_tag; + is->is_initiator_task_tag++; + bhstmr->bhstmr_referenced_task_tag = aio->io_initiator_task_tag; + + io = iscsi_outstanding_add(is, bhstmr->bhstmr_initiator_task_tag, NULL); + if (io == NULL) { + icl_pdu_free(request); + ccb->ccb_h.status = CAM_RESRC_UNAVAIL; + xpt_done(ccb); + return; + } + io->io_datasn = aio->io_initiator_task_tag; + iscsi_pdu_queue_locked(request); +} + +static void iscsi_action_scsiio(struct iscsi_session *is, union ccb *ccb) { struct icl_pdu *request; struct iscsi_bhs_scsi_command *bhssc; struct ccb_scsiio *csio; + struct iscsi_outstanding *io; size_t len; int error; @@ -1979,8 +2092,8 @@ iscsi_action_scsiio(struct iscsi_session else memcpy(&bhssc->bhssc_cdb, csio->cdb_io.cdb_bytes, csio->cdb_len); - error = iscsi_outstanding_add(is, bhssc->bhssc_initiator_task_tag, ccb); - if (error != 0) { + io = iscsi_outstanding_add(is, bhssc->bhssc_initiator_task_tag, ccb); + if (io == NULL) { icl_pdu_free(request); if ((ccb->ccb_h.status & CAM_DEV_QFRZN) == 0) { xpt_freeze_devq(ccb->ccb_h.path, 1); @@ -2086,12 +2199,14 @@ iscsi_action(struct cam_sim *sim, union * XXX: What's the point? */ case XPT_RESET_BUS: - case XPT_ABORT: case XPT_TERM_IO: ISCSI_SESSION_DEBUG(is, "faking success for reset, abort, or term_io"); ccb->ccb_h.status = CAM_REQ_CMP; break; #endif + case XPT_ABORT: + iscsi_action_abort(is, ccb); + return; case XPT_SCSI_IO: iscsi_action_scsiio(is, ccb); return; From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 18:27:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE80F6C3; Tue, 15 Jul 2014 18:27:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9B3452500; Tue, 15 Jul 2014 18:27:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FIRINt026692; Tue, 15 Jul 2014 18:27:18 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FIRIW7026691; Tue, 15 Jul 2014 18:27:18 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407151827.s6FIRIW7026691@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jul 2014 18:27:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268707 - stable/10/sys/dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 18:27:18 -0000 Author: mav Date: Tue Jul 15 18:27:18 2014 New Revision: 268707 URL: http://svnweb.freebsd.org/changeset/base/268707 Log: Fix build on stable/10. Modified: stable/10/sys/dev/iscsi/iscsi.c Modified: stable/10/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.c Tue Jul 15 18:24:41 2014 (r268706) +++ stable/10/sys/dev/iscsi/iscsi.c Tue Jul 15 18:27:18 2014 (r268707) @@ -1994,7 +1994,7 @@ iscsi_action_abort(struct iscsi_session bhstmr->bhstmr_opcode = ISCSI_BHS_OPCODE_TASK_REQUEST; bhstmr->bhstmr_function = 0x80 | BHSTMR_FUNCTION_ABORT_TASK; - bhstmr->bhstmr_lun = htobe64(CAM_EXTLUN_BYTE_SWIZZLE(ccb->ccb_h.target_lun)); + bhstmr->bhstmr_lun = iscsi_encode_lun(ccb->ccb_h.target_lun); bhstmr->bhstmr_initiator_task_tag = is->is_initiator_task_tag; is->is_initiator_task_tag++; bhstmr->bhstmr_referenced_task_tag = aio->io_initiator_task_tag; From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 18:41:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35CECB2D; Tue, 15 Jul 2014 18:41:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22BB626B8; Tue, 15 Jul 2014 18:41:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FIfV8w034238; Tue, 15 Jul 2014 18:41:31 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FIfUqo034237; Tue, 15 Jul 2014 18:41:30 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407151841.s6FIfUqo034237@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jul 2014 18:41:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268708 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 18:41:31 -0000 Author: mav Date: Tue Jul 15 18:41:30 2014 New Revision: 268708 URL: http://svnweb.freebsd.org/changeset/base/268708 Log: Document CTL and iSCSI ABI breakages. Modified: stable/10/UPDATING Modified: stable/10/UPDATING ============================================================================== --- stable/10/UPDATING Tue Jul 15 18:27:18 2014 (r268707) +++ stable/10/UPDATING Tue Jul 15 18:41:30 2014 (r268708) @@ -16,6 +16,11 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20140715: + Several ABI breaking changes were merged to CTL and new iSCSI code. + All CTL and iSCSI-related tools, such as ctladm, ctld, iscsid and + iscsictl need to be rebuilt to work with a new kernel. + 20140708: The WITHOUT_VT_SUPPORT kernel config knob has been renamed WITHOUT_VT. (The other _SUPPORT knobs have a consistent meaning From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 19:18:46 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A23A1867; Tue, 15 Jul 2014 19:18:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F1122A13; Tue, 15 Jul 2014 19:18:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FJIkfI051240; Tue, 15 Jul 2014 19:18:46 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FJIkmL051239; Tue, 15 Jul 2014 19:18:46 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201407151918.s6FJIkmL051239@svn.freebsd.org> From: John Baldwin Date: Tue, 15 Jul 2014 19:18:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r268709 - stable/8/sys/rpc X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 19:18:46 -0000 Author: jhb Date: Tue Jul 15 19:18:46 2014 New Revision: 268709 URL: http://svnweb.freebsd.org/changeset/base/268709 Log: MFC 255284: It was reported via email that the cu_sent field used by the krpc client side UDP was observed as way out of range and caused the rpc.lockd daemon to hang trying to do an RPC. Inspection of the code found two places where the RPC request is re-queued, but the value of cu_sent was not incremented. Since cu_sent is always decremented when the RPC request is dequeued, I think this could have caused cu_sent to go out of range. This patch adds lines to increment cu_sent for these two cases. Modified: stable/8/sys/rpc/clnt_dg.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/rpc/ (props changed) Modified: stable/8/sys/rpc/clnt_dg.c ============================================================================== --- stable/8/sys/rpc/clnt_dg.c Tue Jul 15 18:41:30 2014 (r268708) +++ stable/8/sys/rpc/clnt_dg.c Tue Jul 15 19:18:46 2014 (r268709) @@ -682,6 +682,7 @@ get_reply: next_sendtime += retransmit_time; goto send_again; } + cu->cu_sent += CWNDSCALE; TAILQ_INSERT_TAIL(&cs->cs_pending, cr, cr_link); } @@ -733,6 +734,7 @@ got_reply: */ XDR_DESTROY(&xdrs); mtx_lock(&cs->cs_lock); + cu->cu_sent += CWNDSCALE; TAILQ_INSERT_TAIL(&cs->cs_pending, cr, cr_link); cr->cr_mrep = NULL; From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 22:44:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 001E7FA; Tue, 15 Jul 2014 22:44:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E15F52DA4; Tue, 15 Jul 2014 22:44:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FMiAo6050968; Tue, 15 Jul 2014 22:44:10 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FMiAOT050967; Tue, 15 Jul 2014 22:44:10 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201407152244.s6FMiAOT050967@svn.freebsd.org> From: Warren Block Date: Tue, 15 Jul 2014 22:44:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268721 - stable/10/lib/libc/stdtime X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 22:44:11 -0000 Author: wblock (doc committer) Date: Tue Jul 15 22:44:10 2014 New Revision: 268721 URL: http://svnweb.freebsd.org/changeset/base/268721 Log: MFC r267618: Fix syntax error. Modified: stable/10/lib/libc/stdtime/strftime.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdtime/strftime.3 ============================================================================== --- stable/10/lib/libc/stdtime/strftime.3 Tue Jul 15 22:44:04 2014 (r268720) +++ stable/10/lib/libc/stdtime/strftime.3 Tue Jul 15 22:44:10 2014 (r268721) @@ -248,7 +248,7 @@ function conforms to .St -isoC with a lot of extensions including -.Ql %C , +.Ql \&%C , .Ql \&%D , .Ql %E* , .Ql %e , From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 23:16:34 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 85A29952; Tue, 15 Jul 2014 23:16:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 720802048; Tue, 15 Jul 2014 23:16:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FNGY2h068642; Tue, 15 Jul 2014 23:16:34 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FNGYxH068641; Tue, 15 Jul 2014 23:16:34 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201407152316.s6FNGYxH068641@svn.freebsd.org> From: Warren Block Date: Tue, 15 Jul 2014 23:16:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268723 - stable/9/lib/libc/stdtime X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 23:16:34 -0000 Author: wblock (doc committer) Date: Tue Jul 15 23:16:33 2014 New Revision: 268723 URL: http://svnweb.freebsd.org/changeset/base/268723 Log: MFC r267618: Fix syntax error. Modified: stable/9/lib/libc/stdtime/strftime.3 Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/stdtime/ (props changed) Modified: stable/9/lib/libc/stdtime/strftime.3 ============================================================================== --- stable/9/lib/libc/stdtime/strftime.3 Tue Jul 15 22:57:50 2014 (r268722) +++ stable/9/lib/libc/stdtime/strftime.3 Tue Jul 15 23:16:33 2014 (r268723) @@ -248,7 +248,7 @@ function conforms to .St -isoC with a lot of extensions including -.Ql %C , +.Ql \&%C , .Ql \&%D , .Ql %E* , .Ql %e , From owner-svn-src-stable@FreeBSD.ORG Tue Jul 15 23:20:26 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8C45AB07; Tue, 15 Jul 2014 23:20:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5EDD92084; Tue, 15 Jul 2014 23:20:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FNKQeE071605; Tue, 15 Jul 2014 23:20:26 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FNKQBP071604; Tue, 15 Jul 2014 23:20:26 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201407152320.s6FNKQBP071604@svn.freebsd.org> From: Warren Block Date: Tue, 15 Jul 2014 23:20:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268724 - stable/10/sbin/geom/class/eli X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 23:20:26 -0000 Author: wblock (doc committer) Date: Tue Jul 15 23:20:25 2014 New Revision: 268724 URL: http://svnweb.freebsd.org/changeset/base/268724 Log: MFC r267617: Fix spelling, typos, missing articles, contractions. Expanded version of patch supplied with PR. Modified: stable/10/sbin/geom/class/eli/geli.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/geom/class/eli/geli.8 ============================================================================== --- stable/10/sbin/geom/class/eli/geli.8 Tue Jul 15 23:16:33 2014 (r268723) +++ stable/10/sbin/geom/class/eli/geli.8 Tue Jul 15 23:20:25 2014 (r268724) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 1, 2013 +.Dd June 18, 2014 .Dt GELI 8 .Os .Sh NAME @@ -331,7 +331,7 @@ key length. .It Nm AES-XTS .Em 128 , 256 -.It Nm AES-CBC , Nm Camilla-CBC +.It Nm AES-CBC , Nm Camellia-CBC .Em 128 , 192, 256 @@ -353,13 +353,14 @@ because encryption/decryption which requ is done per sector; fewer sectors means less computational work. .It Fl V Ar version Metadata version to use. -This option is helpful when creating provider that may be used by older +This option is helpful when creating a provider that may be used by older .Nm FreeBSD/GELI versions. Consult the .Sx HISTORY section to find which metadata version is supported by which FreeBSD version. -Note that using older metadata version may limit numer of features available. +Note that using an older version of metadata may limit the number of +features available. .El .It Cm attach Attach the given provider. @@ -619,7 +620,7 @@ devices. .El .It Cm resume Resume previously suspended device. -The caller must ensure that executing this subcommand doesn't access the +The caller must ensure that executing this subcommand does not access the suspended device, leading to a deadlock. For example suspending a device which contains the file system where the .Nm @@ -823,7 +824,7 @@ Enter passphrase: .Pp Create an encrypted provider, but use two User Keys: one for your employee and one for you as the company's security officer -(so it's not a tragedy if the employee +(so it is not a tragedy if the employee .Qq accidentally forgets his passphrase): .Bd -literal -offset indent From owner-svn-src-stable@FreeBSD.ORG Wed Jul 16 00:34:21 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 69A06E36; Wed, 16 Jul 2014 00:34:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 538CE2735; Wed, 16 Jul 2014 00:34:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6G0YLeI008984; Wed, 16 Jul 2014 00:34:21 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6G0YLIk008983; Wed, 16 Jul 2014 00:34:21 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201407160034.s6G0YLIk008983@svn.freebsd.org> From: Warren Block Date: Wed, 16 Jul 2014 00:34:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268729 - stable/9/sbin/geom/class/eli X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 00:34:21 -0000 Author: wblock (doc committer) Date: Wed Jul 16 00:34:20 2014 New Revision: 268729 URL: http://svnweb.freebsd.org/changeset/base/268729 Log: MFC r267617: Fix spelling, typos, missing articles, contractions. Expanded version of patch supplied with PR. Modified: stable/9/sbin/geom/class/eli/geli.8 Directory Properties: stable/9/sbin/geom/class/eli/ (props changed) Modified: stable/9/sbin/geom/class/eli/geli.8 ============================================================================== --- stable/9/sbin/geom/class/eli/geli.8 Wed Jul 16 00:12:57 2014 (r268728) +++ stable/9/sbin/geom/class/eli/geli.8 Wed Jul 16 00:34:20 2014 (r268729) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 1, 2013 +.Dd June 18, 2014 .Dt GELI 8 .Os .Sh NAME @@ -560,9 +560,9 @@ devices. .El .It Cm resume Resume previously suspended device. -The caller must ensure that executing this subcommand won't try to access -suspended device, which will lead to a deadlock. -For example suspending device, which contains file system where the +The caller must ensure that executing this subcommand does not access the +suspended device, leading to a deadlock. +For example suspending a device which contains the file system where the .Nm utility is stored is bad idea. .Pp From owner-svn-src-stable@FreeBSD.ORG Wed Jul 16 00:36:56 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC24FF8B; Wed, 16 Jul 2014 00:36:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8234274B; Wed, 16 Jul 2014 00:36:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6G0atpZ009486; Wed, 16 Jul 2014 00:36:55 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6G0atka009485; Wed, 16 Jul 2014 00:36:55 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201407160036.s6G0atka009485@svn.freebsd.org> From: Warren Block Date: Wed, 16 Jul 2014 00:36:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268730 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 00:36:56 -0000 Author: wblock (doc committer) Date: Wed Jul 16 00:36:55 2014 New Revision: 268730 URL: http://svnweb.freebsd.org/changeset/base/268730 Log: MFC r268187: Improve markup, change references to nonexistent vt_vga(4), remove some language redundancy, and move the examples so sections are in the standard order. Modified: stable/10/share/man/man4/vt.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/vt.4 ============================================================================== --- stable/10/share/man/man4/vt.4 Wed Jul 16 00:34:20 2014 (r268729) +++ stable/10/share/man/man4/vt.4 Wed Jul 16 00:36:55 2014 (r268730) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 27, 2014 +.Dd July 2, 2014 .Dt "VIRTUAL TERMINALS" 4 .Os .Sh NAME @@ -109,10 +109,10 @@ These kernel options control the .Nm driver. .Bl -tag -width MAXCONS -.It Dv TERMINAL_NORM_ATTR=_attribute_ -.It Dv TERMINAL_KERN_ATTR=_attribute_ -These options allow to change the default colors used for normal and kernel -text respectively. +.It Dv TERMINAL_NORM_ATTR= Ns Pa attribute +.It Dv TERMINAL_KERN_ATTR= Ns Pa attribute +These options allow changing the default colors used for normal and kernel +text. Available colors are defined in .In sys/terminal.h . See @@ -165,13 +165,13 @@ is set, the system remains in text mode. Otherwise, .Nm switches to 640x480x16 VGA mode using -.Xr vt_vga 4 . +.Cm vt_vga . If a KMS .Pq Kernel Mode Switching video driver is available, the display is switched to high resolution and the KMS driver takes over. When a KMS driver is not available, -.Xr vt_vga 4 +.Cm vt_vga remains active. .Sh LOADER TUNABLES These settings can be entered at the @@ -184,27 +184,18 @@ Set to 1 to use virtual terminals in tex Features that require graphics mode, like loadable fonts, will be disabled. .It Va kern.vty -Set to vt to choose the +When both .Nm -driver for the system console, if the -.Xr syscons 4 -driver is also compiled in and is the default. +and +.Xr sc 4 have been compiled into the kernel, the one to use for the +system console can be selected by setting this value to +.Ql vt +or +.Ql sc . +If this value is not set, +.Xr sc 4 +is used. .El -.Sh EXAMPLES -The following line will change the default color of normal text. -Normal text will be green on black background. -Reversed normal text will be black on green background. -Note that you cannot put any white space inside the quoted string, -because of the current implementation of -.Xr config 8 . -.Pp -.Dl "options TERMINAL_NORM_ATTR=(FG_GREEN|BG_BLACK)" -.Pp -The following line will change the default color of kernel messages. -Kernel messages will be printed bright red on black background. -Reversed kernel messages will be black on bright red background. -.Pp -.Dl "options TERMINAL_KERN_ATTR=(FG_LIGHTRED|BG_BLACK)" .Sh FILES .Bl -tag -width /usr/share/syscons/keymaps/* -compact .It Pa /dev/console @@ -214,6 +205,19 @@ virtual terminals .It Pa /etc/ttys terminal initialization information .El +.Sh EXAMPLES +This example changes the default color of normal text to green on a +black background, or black on a green background when reversed. +Note that white space cannot be used inside the attribute string +because of the current implementation of +.Xr config 8 . +.Pp +.Dl "options TERMINAL_NORM_ATTR=(FG_GREEN|BG_BLACK)" +.Pp +This line changes the default color of kernel messages to be bright red +on a black background, or black on a bright red background when reversed. +.Pp +.Dl "options TERMINAL_KERN_ATTR=(FG_LIGHTRED|BG_BLACK)" .Sh SEE ALSO .Xr kbdcontrol 1 , .Xr login 1 , From owner-svn-src-stable@FreeBSD.ORG Wed Jul 16 00:39:58 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC75F18F; Wed, 16 Jul 2014 00:39:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD2CA2770; Wed, 16 Jul 2014 00:39:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6G0dwHt009928; Wed, 16 Jul 2014 00:39:58 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6G0dwZd009927; Wed, 16 Jul 2014 00:39:58 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201407160039.s6G0dwZd009927@svn.freebsd.org> From: Warren Block Date: Wed, 16 Jul 2014 00:39:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268731 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 00:39:59 -0000 Author: wblock (doc committer) Date: Wed Jul 16 00:39:58 2014 New Revision: 268731 URL: http://svnweb.freebsd.org/changeset/base/268731 Log: MFC r268187: Improve markup, change references to nonexistent vt_vga(4), remove some language redundancy, and move the examples so sections are in the standard order. Modified: stable/9/share/man/man4/vt.4 Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/vt.4 ============================================================================== --- stable/9/share/man/man4/vt.4 Wed Jul 16 00:36:55 2014 (r268730) +++ stable/9/share/man/man4/vt.4 Wed Jul 16 00:39:58 2014 (r268731) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 27, 2014 +.Dd July 2, 2014 .Dt "VIRTUAL TERMINALS" 4 .Os .Sh NAME @@ -106,6 +106,15 @@ These kernel options control the .Nm driver. .Bl -tag -width MAXCONS +.It Dv TERMINAL_NORM_ATTR= Ns Pa attribute +.It Dv TERMINAL_KERN_ATTR= Ns Pa attribute +These options allow changing the default colors used for normal and kernel +text. +Available colors are defined in +.In sys/terminal.h . +See +.Sx EXAMPLES +below. .It Dv VT_MAXWINDOWS=N Set the number of virtual terminals to be created to .Fa N . @@ -151,13 +160,13 @@ is set, the system remains in text mode. Otherwise, .Nm switches to 640x480x16 VGA mode using -.Xr vt_vga 4 . +.Cm vt_vga . If a KMS .Pq Kernel Mode Switching video driver is available, the display is switched to high resolution and the KMS driver takes over. When a KMS driver is not available, -.Xr vt_vga 4 +.Cm vt_vga remains active. .Sh LOADER TUNABLES These settings can be entered at the @@ -169,6 +178,18 @@ prompt or in Set to 1 to use virtual terminals in text mode instead of graphics mode. Features that require graphics mode, like loadable fonts, will be disabled. +.It Va kern.vty +When both +.Nm +and +.Xr sc 4 have been compiled into the kernel, the one to use for the +system console can be selected by setting this value to +.Ql vt +or +.Ql sc . +If this value is not set, +.Xr sc 4 +is used. .El .Sh FILES .Bl -tag -width /usr/share/syscons/keymaps/* -compact @@ -179,6 +200,19 @@ virtual terminals .It Pa /etc/ttys terminal initialization information .El +.Sh EXAMPLES +This example changes the default color of normal text to green on a +black background, or black on a green background when reversed. +Note that white space cannot be used inside the attribute string +because of the current implementation of +.Xr config 8 . +.Pp +.Dl "options TERMINAL_NORM_ATTR=(FG_GREEN|BG_BLACK)" +.Pp +This line changes the default color of kernel messages to be bright red +on a black background, or black on a bright red background when reversed. +.Pp +.Dl "options TERMINAL_KERN_ATTR=(FG_LIGHTRED|BG_BLACK)" .Sh SEE ALSO .Xr kbdcontrol 1 , .Xr login 1 , From owner-svn-src-stable@FreeBSD.ORG Wed Jul 16 00:41:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B52252DB; Wed, 16 Jul 2014 00:41:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A195A27ED; Wed, 16 Jul 2014 00:41:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6G0flvM013418; Wed, 16 Jul 2014 00:41:47 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6G0fl0h013417; Wed, 16 Jul 2014 00:41:47 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201407160041.s6G0fl0h013417@svn.freebsd.org> From: Warren Block Date: Wed, 16 Jul 2014 00:41:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268732 - stable/10/usr.bin/showmount X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 00:41:47 -0000 Author: wblock (doc committer) Date: Wed Jul 16 00:41:47 2014 New Revision: 268732 URL: http://svnweb.freebsd.org/changeset/base/268732 Log: MFC r268381 Make synopsis version of -3 flag match other uses in the page. Modified: stable/10/usr.bin/showmount/showmount.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/showmount/showmount.8 ============================================================================== --- stable/10/usr.bin/showmount/showmount.8 Wed Jul 16 00:39:58 2014 (r268731) +++ stable/10/usr.bin/showmount/showmount.8 Wed Jul 16 00:41:47 2014 (r268732) @@ -40,7 +40,8 @@ .Sh SYNOPSIS .Nm .Op Fl a | d -.Op Fl e3 +.Op Fl e +.Op Fl 3 .Op Ar host .Sh DESCRIPTION The From owner-svn-src-stable@FreeBSD.ORG Wed Jul 16 00:43:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A317422; Wed, 16 Jul 2014 00:43:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 06B6527F8; Wed, 16 Jul 2014 00:43:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6G0hrQA013752; Wed, 16 Jul 2014 00:43:53 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6G0hrfR013751; Wed, 16 Jul 2014 00:43:53 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201407160043.s6G0hrfR013751@svn.freebsd.org> From: Warren Block Date: Wed, 16 Jul 2014 00:43:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268733 - stable/9/usr.bin/showmount X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 00:43:54 -0000 Author: wblock (doc committer) Date: Wed Jul 16 00:43:53 2014 New Revision: 268733 URL: http://svnweb.freebsd.org/changeset/base/268733 Log: MFC r268381: Make synopsis version of -3 flag match other uses in the page. Modified: stable/9/usr.bin/showmount/showmount.8 Directory Properties: stable/9/usr.bin/showmount/ (props changed) Modified: stable/9/usr.bin/showmount/showmount.8 ============================================================================== --- stable/9/usr.bin/showmount/showmount.8 Wed Jul 16 00:41:47 2014 (r268732) +++ stable/9/usr.bin/showmount/showmount.8 Wed Jul 16 00:43:53 2014 (r268733) @@ -40,7 +40,8 @@ .Sh SYNOPSIS .Nm .Op Fl a | d -.Op Fl e3 +.Op Fl e +.Op Fl 3 .Op Ar host .Sh DESCRIPTION The From owner-svn-src-stable@FreeBSD.ORG Wed Jul 16 02:02:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EE5D408; Wed, 16 Jul 2014 02:02:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F7E02DFF; Wed, 16 Jul 2014 02:02:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6G22lwO050553; Wed, 16 Jul 2014 02:02:47 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6G22kbJ050551; Wed, 16 Jul 2014 02:02:46 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201407160202.s6G22kbJ050551@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Wed, 16 Jul 2014 02:02:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268734 - in stable/10/sys: cddl/contrib/opensolaris/uts/common/dtrace modules/dtrace/fasttrap X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 02:02:48 -0000 Author: pfg Date: Wed Jul 16 02:02:46 2014 New Revision: 268734 URL: http://svnweb.freebsd.org/changeset/base/268734 Log: MFC r268097: MFV r260708 4427 pid provider rejects probes with valid UTF-8 names This make use of Solaris' u8_validate() which we happen to use since r185029 for ZFS. Use of u8_textprep.c required -Wno-cast-qual for powerpc. Illumos Revision: 1444d846b126463eb1059a572ff114d51f7562e5 Reference: https://www.illumos.org/issues/4427 Obtained from: Illumos Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c stable/10/sys/modules/dtrace/fasttrap/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Wed Jul 16 00:43:53 2014 (r268733) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Wed Jul 16 02:02:46 2014 (r268734) @@ -28,9 +28,9 @@ * Use is subject to license terms. */ -#if defined(sun) -#pragma ident "%Z%%M% %I% %E% SMI" -#endif +/* + * Copyright (c) 2013, Joyent, Inc. All rights reserved. + */ #include #include @@ -63,6 +63,7 @@ #if !defined(sun) #include #include +#include #include #endif @@ -2068,8 +2069,7 @@ fasttrap_ioctl(struct cdev *dev, u_long fasttrap_probe_spec_t *probe; uint64_t noffs; size_t size; - int ret; - char *c; + int ret, err; if (copyin(&uprobe->ftps_noffs, &noffs, sizeof (uprobe->ftps_noffs))) @@ -2099,18 +2099,16 @@ fasttrap_ioctl(struct cdev *dev, u_long * Verify that the function and module strings contain no * funny characters. */ - for (c = &probe->ftps_func[0]; *c != '\0'; c++) { - if (*c < 0x20 || 0x7f <= *c) { - ret = EINVAL; - goto err; - } + if (u8_validate(probe->ftps_func, strlen(probe->ftps_func), + NULL, U8_VALIDATE_ENTIRE, &err) < 0) { + ret = EINVAL; + goto err; } - for (c = &probe->ftps_mod[0]; *c != '\0'; c++) { - if (*c < 0x20 || 0x7f <= *c) { - ret = EINVAL; - goto err; - } + if (u8_validate(probe->ftps_mod, strlen(probe->ftps_mod), + NULL, U8_VALIDATE_ENTIRE, &err) < 0) { + ret = EINVAL; + goto err; } #ifdef notyet Modified: stable/10/sys/modules/dtrace/fasttrap/Makefile ============================================================================== --- stable/10/sys/modules/dtrace/fasttrap/Makefile Wed Jul 16 00:43:53 2014 (r268733) +++ stable/10/sys/modules/dtrace/fasttrap/Makefile Wed Jul 16 02:02:46 2014 (r268734) @@ -18,9 +18,13 @@ CFLAGS+= -I${.CURDIR}/../../../cddl/cont .PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/uts/powerpc/dtrace .endif +.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/common/unicode +SRCS+= u8_textprep.c + CFLAGS+= -DSMP .include CFLAGS+= -include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h +CWARNFLAGS+= -Wno-cast-qual CWARNFLAGS+= -Wno-unused From owner-svn-src-stable@FreeBSD.ORG Wed Jul 16 06:18:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 322FEFF5; Wed, 16 Jul 2014 06:18:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 04EBE2158; Wed, 16 Jul 2014 06:18:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6G6I2fj076926; Wed, 16 Jul 2014 06:18:02 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6G6I21u076924; Wed, 16 Jul 2014 06:18:02 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201407160618.s6G6I21u076924@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 16 Jul 2014 06:18:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268736 - stable/9/sys/dev/usb/net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 06:18:03 -0000 Author: hselasky Date: Wed Jul 16 06:18:02 2014 New Revision: 268736 URL: http://svnweb.freebsd.org/changeset/base/268736 Log: MFC r268582: Fix performance problems with AXGE network adapter in RX direction: - Remove 4 extra bytes from the ethernet payload. - The maximum RX buffer was incorrectly set. Increase it to 64K for now, until the exact limit is understood. - Enable hardware checksumming again. - Make hardware data structure packed. Modified: stable/9/sys/dev/usb/net/if_axge.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/net/if_axge.c ============================================================================== --- stable/9/sys/dev/usb/net/if_axge.c Wed Jul 16 06:14:41 2014 (r268735) +++ stable/9/sys/dev/usb/net/if_axge.c Wed Jul 16 06:18:02 2014 (r268736) @@ -77,7 +77,7 @@ static const struct { uint8_t timer_h; uint8_t size; uint8_t ifg; -} axge_bulk_size[] = { +} __packed axge_bulk_size[] = { { 7, 0x4f, 0x00, 0x12, 0xff }, { 7, 0x20, 0x03, 0x16, 0xff }, { 7, 0xae, 0x07, 0x18, 0xff }, @@ -153,7 +153,7 @@ static const struct usb_config axge_conf .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .bufsize = 20480, + .bufsize = 65536, .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, .callback = axge_bulk_read_callback, .timeout = 0, /* no timeout */ @@ -613,15 +613,14 @@ tr_setup: usbd_xfer_set_frame_len(xfer, 0, usbd_xfer_max_len(xfer)); usbd_transfer_submit(xfer); uether_rxflush(ue); - return; + break; default: if (error != USB_ERR_CANCELLED) { usbd_xfer_set_stall(xfer); goto tr_setup; } - return; - + break; } } @@ -965,8 +964,8 @@ axge_rx_frame(struct usb_ether *ue, stru DPRINTF("Dropped a packet\n"); ue->ue_ifp->if_ierrors++; } - if (pktlen >= 2 && (int)(pos + pktlen) <= actlen) { - axge_rxeof(ue, pc, pos + 2, pktlen - 2, pkt_hdr); + if (pktlen >= 6 && (int)(pos + pktlen) <= actlen) { + axge_rxeof(ue, pc, pos + 2, pktlen - 6, pkt_hdr); } else { DPRINTF("Invalid packet pos=%d len=%d\n", (int)pos, (int)pktlen); @@ -1001,7 +1000,7 @@ axge_rxeof(struct usb_ether *ue, struct usbd_copy_out(pc, offset, mtod(m, uint8_t *), len); ifp->if_ipackets++; -#if 0 + if ((pkt_hdr & (AXGE_RXHDR_L4CSUM_ERR | AXGE_RXHDR_L3CSUM_ERR)) == 0) { if ((pkt_hdr & AXGE_RXHDR_L4_TYPE_MASK) == AXGE_RXHDR_L4_TYPE_TCP || @@ -1012,7 +1011,7 @@ axge_rxeof(struct usb_ether *ue, struct m->m_pkthdr.csum_data = 0xffff; } } -#endif + _IF_ENQUEUE(&ue->ue_rxq, m); } From owner-svn-src-stable@FreeBSD.ORG Wed Jul 16 06:20:19 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 760F02AD; Wed, 16 Jul 2014 06:20:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4930721D6; Wed, 16 Jul 2014 06:20:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6G6KJP0077561; Wed, 16 Jul 2014 06:20:19 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6G6KJQ6077560; Wed, 16 Jul 2014 06:20:19 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201407160620.s6G6KJQ6077560@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 16 Jul 2014 06:20:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268737 - stable/10/sys/dev/usb/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 06:20:19 -0000 Author: hselasky Date: Wed Jul 16 06:20:18 2014 New Revision: 268737 URL: http://svnweb.freebsd.org/changeset/base/268737 Log: MFC r268582: Fix performance problems with AXGE network adapter in RX direction: - Remove 4 extra bytes from the ethernet payload. - The maximum RX buffer was incorrectly set. Increase it to 64K for now, until the exact limit is understood. - Enable hardware checksumming again. - Make hardware data structure packed. Modified: stable/10/sys/dev/usb/net/if_axge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/net/if_axge.c ============================================================================== --- stable/10/sys/dev/usb/net/if_axge.c Wed Jul 16 06:18:02 2014 (r268736) +++ stable/10/sys/dev/usb/net/if_axge.c Wed Jul 16 06:20:18 2014 (r268737) @@ -77,7 +77,7 @@ static const struct { uint8_t timer_h; uint8_t size; uint8_t ifg; -} axge_bulk_size[] = { +} __packed axge_bulk_size[] = { { 7, 0x4f, 0x00, 0x12, 0xff }, { 7, 0x20, 0x03, 0x16, 0xff }, { 7, 0xae, 0x07, 0x18, 0xff }, @@ -153,7 +153,7 @@ static const struct usb_config axge_conf .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .bufsize = 20480, + .bufsize = 65536, .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, .callback = axge_bulk_read_callback, .timeout = 0, /* no timeout */ @@ -613,15 +613,14 @@ tr_setup: usbd_xfer_set_frame_len(xfer, 0, usbd_xfer_max_len(xfer)); usbd_transfer_submit(xfer); uether_rxflush(ue); - return; + break; default: if (error != USB_ERR_CANCELLED) { usbd_xfer_set_stall(xfer); goto tr_setup; } - return; - + break; } } @@ -965,8 +964,8 @@ axge_rx_frame(struct usb_ether *ue, stru DPRINTF("Dropped a packet\n"); ue->ue_ifp->if_ierrors++; } - if (pktlen >= 2 && (int)(pos + pktlen) <= actlen) { - axge_rxeof(ue, pc, pos + 2, pktlen - 2, pkt_hdr); + if (pktlen >= 6 && (int)(pos + pktlen) <= actlen) { + axge_rxeof(ue, pc, pos + 2, pktlen - 6, pkt_hdr); } else { DPRINTF("Invalid packet pos=%d len=%d\n", (int)pos, (int)pktlen); @@ -1001,7 +1000,7 @@ axge_rxeof(struct usb_ether *ue, struct usbd_copy_out(pc, offset, mtod(m, uint8_t *), len); ifp->if_ipackets++; -#if 0 + if ((pkt_hdr & (AXGE_RXHDR_L4CSUM_ERR | AXGE_RXHDR_L3CSUM_ERR)) == 0) { if ((pkt_hdr & AXGE_RXHDR_L4_TYPE_MASK) == AXGE_RXHDR_L4_TYPE_TCP || @@ -1012,7 +1011,7 @@ axge_rxeof(struct usb_ether *ue, struct m->m_pkthdr.csum_data = 0xffff; } } -#endif + _IF_ENQUEUE(&ue->ue_rxq, m); } From owner-svn-src-stable@FreeBSD.ORG Wed Jul 16 06:22:36 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 25AA2416; Wed, 16 Jul 2014 06:22:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 124DE21FE; Wed, 16 Jul 2014 06:22:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6G6MZxq080975; Wed, 16 Jul 2014 06:22:35 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6G6MZrs080974; Wed, 16 Jul 2014 06:22:35 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201407160622.s6G6MZrs080974@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 16 Jul 2014 06:22:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268738 - stable/10/sys/dev/usb/input X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 06:22:36 -0000 Author: hselasky Date: Wed Jul 16 06:22:35 2014 New Revision: 268738 URL: http://svnweb.freebsd.org/changeset/base/268738 Log: MFC r268583: Turn off blinking device leds at attach. PR: 183735 Modified: stable/10/sys/dev/usb/input/uhid.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/input/uhid.c ============================================================================== --- stable/10/sys/dev/usb/input/uhid.c Wed Jul 16 06:20:18 2014 (r268737) +++ stable/10/sys/dev/usb/input/uhid.c Wed Jul 16 06:22:35 2014 (r268738) @@ -759,9 +759,20 @@ uhid_attach(device_t dev) sc->sc_flags |= UHID_FLAG_STATIC_DESC; } } else if ((uaa->info.bInterfaceClass == UICLASS_VENDOR) && - (uaa->info.bInterfaceSubClass == UISUBCLASS_XBOX360_CONTROLLER) && + (uaa->info.bInterfaceSubClass == UISUBCLASS_XBOX360_CONTROLLER) && (uaa->info.bInterfaceProtocol == UIPROTO_XBOX360_GAMEPAD)) { - + static const uint8_t reportbuf[3] = {1, 3, 0}; + /* + * Turn off the four LEDs on the gamepad which + * are blinking by default: + */ + error = usbd_req_set_report(uaa->device, NULL, + __DECONST(void *, reportbuf), sizeof(reportbuf), + uaa->info.bIfaceIndex, UHID_OUTPUT_REPORT, 0); + if (error) { + DPRINTF("set output report failed, error=%s (ignored)\n", + usbd_errstr(error)); + } /* the Xbox 360 gamepad has no report descriptor */ sc->sc_repdesc_size = sizeof(uhid_xb360gp_report_descr); sc->sc_repdesc_ptr = (void *)&uhid_xb360gp_report_descr; From owner-svn-src-stable@FreeBSD.ORG Wed Jul 16 06:23:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CC85C594; Wed, 16 Jul 2014 06:23:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B981F2210; Wed, 16 Jul 2014 06:23:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6G6NsGZ081235; Wed, 16 Jul 2014 06:23:54 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6G6NsOn081234; Wed, 16 Jul 2014 06:23:54 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201407160623.s6G6NsOn081234@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 16 Jul 2014 06:23:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268739 - stable/9/sys/dev/usb/input X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 06:23:54 -0000 Author: hselasky Date: Wed Jul 16 06:23:54 2014 New Revision: 268739 URL: http://svnweb.freebsd.org/changeset/base/268739 Log: MFC r268583: Turn off blinking device leds at attach. PR: 183735 Modified: stable/9/sys/dev/usb/input/uhid.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/input/uhid.c ============================================================================== --- stable/9/sys/dev/usb/input/uhid.c Wed Jul 16 06:22:35 2014 (r268738) +++ stable/9/sys/dev/usb/input/uhid.c Wed Jul 16 06:23:54 2014 (r268739) @@ -759,9 +759,20 @@ uhid_attach(device_t dev) sc->sc_flags |= UHID_FLAG_STATIC_DESC; } } else if ((uaa->info.bInterfaceClass == UICLASS_VENDOR) && - (uaa->info.bInterfaceSubClass == UISUBCLASS_XBOX360_CONTROLLER) && + (uaa->info.bInterfaceSubClass == UISUBCLASS_XBOX360_CONTROLLER) && (uaa->info.bInterfaceProtocol == UIPROTO_XBOX360_GAMEPAD)) { - + static const uint8_t reportbuf[3] = {1, 3, 0}; + /* + * Turn off the four LEDs on the gamepad which + * are blinking by default: + */ + error = usbd_req_set_report(uaa->device, NULL, + __DECONST(void *, reportbuf), sizeof(reportbuf), + uaa->info.bIfaceIndex, UHID_OUTPUT_REPORT, 0); + if (error) { + DPRINTF("set output report failed, error=%s (ignored)\n", + usbd_errstr(error)); + } /* the Xbox 360 gamepad has no report descriptor */ sc->sc_repdesc_size = sizeof(uhid_xb360gp_report_descr); sc->sc_repdesc_ptr = (void *)&uhid_xb360gp_report_descr; From owner-svn-src-stable@FreeBSD.ORG Wed Jul 16 06:25:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A9C0714; Wed, 16 Jul 2014 06:25:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 776782222; Wed, 16 Jul 2014 06:25:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6G6PjES081694; Wed, 16 Jul 2014 06:25:45 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6G6Pj7k081693; Wed, 16 Jul 2014 06:25:45 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201407160625.s6G6Pj7k081693@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 16 Jul 2014 06:25:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r268740 - stable/8/sys/dev/usb/input X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 06:25:45 -0000 Author: hselasky Date: Wed Jul 16 06:25:44 2014 New Revision: 268740 URL: http://svnweb.freebsd.org/changeset/base/268740 Log: MFC r268583: Turn off blinking device leds at attach. PR: 183735 Modified: stable/8/sys/dev/usb/input/uhid.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/input/uhid.c ============================================================================== --- stable/8/sys/dev/usb/input/uhid.c Wed Jul 16 06:23:54 2014 (r268739) +++ stable/8/sys/dev/usb/input/uhid.c Wed Jul 16 06:25:44 2014 (r268740) @@ -759,9 +759,20 @@ uhid_attach(device_t dev) sc->sc_flags |= UHID_FLAG_STATIC_DESC; } } else if ((uaa->info.bInterfaceClass == UICLASS_VENDOR) && - (uaa->info.bInterfaceSubClass == UISUBCLASS_XBOX360_CONTROLLER) && + (uaa->info.bInterfaceSubClass == UISUBCLASS_XBOX360_CONTROLLER) && (uaa->info.bInterfaceProtocol == UIPROTO_XBOX360_GAMEPAD)) { - + static const uint8_t reportbuf[3] = {1, 3, 0}; + /* + * Turn off the four LEDs on the gamepad which + * are blinking by default: + */ + error = usbd_req_set_report(uaa->device, NULL, + __DECONST(void *, reportbuf), sizeof(reportbuf), + uaa->info.bIfaceIndex, UHID_OUTPUT_REPORT, 0); + if (error) { + DPRINTF("set output report failed, error=%s (ignored)\n", + usbd_errstr(error)); + } /* the Xbox 360 gamepad has no report descriptor */ sc->sc_repdesc_size = sizeof(uhid_xb360gp_report_descr); sc->sc_repdesc_ptr = (void *)&uhid_xb360gp_report_descr; From owner-svn-src-stable@FreeBSD.ORG Wed Jul 16 08:52:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9DDC112D; Wed, 16 Jul 2014 08:52:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B0732F30; Wed, 16 Jul 2014 08:52:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6G8qipV054661; Wed, 16 Jul 2014 08:52:44 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6G8qiiE054660; Wed, 16 Jul 2014 08:52:44 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201407160852.s6G8qiiE054660@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 16 Jul 2014 08:52:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268741 - stable/10/lib/libc/gen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 08:52:44 -0000 Author: kib Date: Wed Jul 16 08:52:44 2014 New Revision: 268741 URL: http://svnweb.freebsd.org/changeset/base/268741 Log: MFC r268467: Implement sysconf(_SC_GETGR_R_SIZE_MAX) and sysconf(_SC_GETPW_R_SIZE_MAX). Modified: stable/10/lib/libc/gen/sysconf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/sysconf.c ============================================================================== --- stable/10/lib/libc/gen/sysconf.c Wed Jul 16 06:25:44 2014 (r268740) +++ stable/10/lib/libc/gen/sysconf.c Wed Jul 16 08:52:44 2014 (r268741) @@ -367,11 +367,17 @@ yesno: * _POSIX_FILE_LOCKING, so we can't answer this one. */ #endif -#if _POSIX_THREAD_SAFE_FUNCTIONS > -1 + + /* + * SUSv4tc1 says the following about _SC_GETGR_R_SIZE_MAX and + * _SC_GETPW_R_SIZE_MAX: + * Note that sysconf(_SC_GETGR_R_SIZE_MAX) may return -1 if + * there is no hard limit on the size of the buffer needed to + * store all the groups returned. + */ case _SC_GETGR_R_SIZE_MAX: case _SC_GETPW_R_SIZE_MAX: -#error "somebody needs to implement this" -#endif + return (-1); case _SC_HOST_NAME_MAX: return (MAXHOSTNAMELEN - 1); /* does not include \0 */ case _SC_LOGIN_NAME_MAX: From owner-svn-src-stable@FreeBSD.ORG Wed Jul 16 08:55:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 15A582EE; Wed, 16 Jul 2014 08:55:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02DF62F46; Wed, 16 Jul 2014 08:55:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6G8trVZ055341; Wed, 16 Jul 2014 08:55:53 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6G8trUR055340; Wed, 16 Jul 2014 08:55:53 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201407160855.s6G8trUR055340@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 16 Jul 2014 08:55:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268742 - stable/10/sys/amd64/amd64 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 08:55:54 -0000 Author: kib Date: Wed Jul 16 08:55:53 2014 New Revision: 268742 URL: http://svnweb.freebsd.org/changeset/base/268742 Log: MFC r268471: For safety, ensure that any consumer of the set_regs() and ptrace_set_pc() use the correct return to userspace using iret. Modified: stable/10/sys/amd64/amd64/machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/machdep.c ============================================================================== --- stable/10/sys/amd64/amd64/machdep.c Wed Jul 16 08:52:44 2014 (r268741) +++ stable/10/sys/amd64/amd64/machdep.c Wed Jul 16 08:55:53 2014 (r268742) @@ -1979,7 +1979,9 @@ makectx(struct trapframe *tf, struct pcb int ptrace_set_pc(struct thread *td, unsigned long addr) { + td->td_frame->tf_rip = addr; + set_pcb_flags(td->td_pcb, PCB_FULL_IRET); return (0); } @@ -2079,8 +2081,8 @@ set_regs(struct thread *td, struct reg * tp->tf_fs = regs->r_fs; tp->tf_gs = regs->r_gs; tp->tf_flags = TF_HASSEGS; - set_pcb_flags(td->td_pcb, PCB_FULL_IRET); } + set_pcb_flags(td->td_pcb, PCB_FULL_IRET); return (0); } From owner-svn-src-stable@FreeBSD.ORG Wed Jul 16 08:58:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB6BC621; Wed, 16 Jul 2014 08:58:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A80A32F6C; Wed, 16 Jul 2014 08:58:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6G8wcMj055772; Wed, 16 Jul 2014 08:58:38 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6G8wcJs055771; Wed, 16 Jul 2014 08:58:38 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201407160858.s6G8wcJs055771@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 16 Jul 2014 08:58:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268743 - stable/9/lib/libc/gen X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 08:58:38 -0000 Author: kib Date: Wed Jul 16 08:58:38 2014 New Revision: 268743 URL: http://svnweb.freebsd.org/changeset/base/268743 Log: MFC r268467: Implement sysconf(_SC_GETGR_R_SIZE_MAX) and sysconf(_SC_GETPW_R_SIZE_MAX). Modified: stable/9/lib/libc/gen/sysconf.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/gen/sysconf.c ============================================================================== --- stable/9/lib/libc/gen/sysconf.c Wed Jul 16 08:55:53 2014 (r268742) +++ stable/9/lib/libc/gen/sysconf.c Wed Jul 16 08:58:38 2014 (r268743) @@ -367,11 +367,17 @@ yesno: * _POSIX_FILE_LOCKING, so we can't answer this one. */ #endif -#if _POSIX_THREAD_SAFE_FUNCTIONS > -1 + + /* + * SUSv4tc1 says the following about _SC_GETGR_R_SIZE_MAX and + * _SC_GETPW_R_SIZE_MAX: + * Note that sysconf(_SC_GETGR_R_SIZE_MAX) may return -1 if + * there is no hard limit on the size of the buffer needed to + * store all the groups returned. + */ case _SC_GETGR_R_SIZE_MAX: case _SC_GETPW_R_SIZE_MAX: -#error "somebody needs to implement this" -#endif + return (-1); case _SC_HOST_NAME_MAX: return (MAXHOSTNAMELEN - 1); /* does not include \0 */ case _SC_LOGIN_NAME_MAX: From owner-svn-src-stable@FreeBSD.ORG Wed Jul 16 08:59:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 01E53781; Wed, 16 Jul 2014 08:59:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E396C2F83; Wed, 16 Jul 2014 08:59:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6G8xipO055985; Wed, 16 Jul 2014 08:59:44 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6G8xiuw055984; Wed, 16 Jul 2014 08:59:44 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201407160859.s6G8xiuw055984@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 16 Jul 2014 08:59:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268744 - stable/9/sys/amd64/amd64 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 08:59:45 -0000 Author: kib Date: Wed Jul 16 08:59:44 2014 New Revision: 268744 URL: http://svnweb.freebsd.org/changeset/base/268744 Log: MFC r268471: For safety, ensure that any consumer of the set_regs() and ptrace_set_pc() use the correct return to userspace using iret. Modified: stable/9/sys/amd64/amd64/machdep.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/machdep.c ============================================================================== --- stable/9/sys/amd64/amd64/machdep.c Wed Jul 16 08:58:38 2014 (r268743) +++ stable/9/sys/amd64/amd64/machdep.c Wed Jul 16 08:59:44 2014 (r268744) @@ -1945,7 +1945,9 @@ makectx(struct trapframe *tf, struct pcb int ptrace_set_pc(struct thread *td, unsigned long addr) { + td->td_frame->tf_rip = addr; + set_pcb_flags(td->td_pcb, PCB_FULL_IRET); return (0); } @@ -2045,8 +2047,8 @@ set_regs(struct thread *td, struct reg * tp->tf_fs = regs->r_fs; tp->tf_gs = regs->r_gs; tp->tf_flags = TF_HASSEGS; - set_pcb_flags(td->td_pcb, PCB_FULL_IRET); } + set_pcb_flags(td->td_pcb, PCB_FULL_IRET); return (0); } From owner-svn-src-stable@FreeBSD.ORG Wed Jul 16 12:37:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 02442AA4; Wed, 16 Jul 2014 12:37:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E26C322F3; Wed, 16 Jul 2014 12:37:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6GCbaEa060446; Wed, 16 Jul 2014 12:37:36 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6GCbalh060445; Wed, 16 Jul 2014 12:37:36 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201407161237.s6GCbalh060445@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 16 Jul 2014 12:37:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268752 - stable/10/usr.bin/calendar/calendars X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 12:37:37 -0000 Author: gavin Date: Wed Jul 16 12:37:36 2014 New Revision: 268752 URL: http://svnweb.freebsd.org/changeset/base/268752 Log: Merge r268292 from head: Dominion Day became Canada Day in 1982, update the holiday calendar. PR: 191533 Submitted by: db Modified: stable/10/usr.bin/calendar/calendars/calendar.holiday Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/calendar/calendars/calendar.holiday ============================================================================== --- stable/10/usr.bin/calendar/calendars/calendar.holiday Wed Jul 16 12:09:12 2014 (r268751) +++ stable/10/usr.bin/calendar/calendars/calendar.holiday Wed Jul 16 12:37:36 2014 (r268752) @@ -248,7 +248,7 @@ 06/30 Day of the Army in Guatemala 06/MonFirst Jefferson Davis's Birthday in Alabama & Mississippi (1st Monday) 06/MonFirst Jefferson Davis's Birthday in Florida, Georgia, & S. Carolina -07/01 Dominion Day in Canada +07/01 Canada Day 07/01 Freedom Day in Suriname 07/01 Independence Day in Burundi 07/01 National Day in Rwanda From owner-svn-src-stable@FreeBSD.ORG Wed Jul 16 12:38:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29720CC6; Wed, 16 Jul 2014 12:38:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 159A22302; Wed, 16 Jul 2014 12:38:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6GCckYl060692; Wed, 16 Jul 2014 12:38:46 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6GCck8I060691; Wed, 16 Jul 2014 12:38:46 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201407161238.s6GCck8I060691@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 16 Jul 2014 12:38:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268753 - stable/9/usr.bin/calendar/calendars X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 12:38:47 -0000 Author: gavin Date: Wed Jul 16 12:38:46 2014 New Revision: 268753 URL: http://svnweb.freebsd.org/changeset/base/268753 Log: Merge r268292 from head: Dominion Day became Canada Day in 1982, update the holiday calendar. PR: 191533 Submitted by: db Modified: stable/9/usr.bin/calendar/calendars/calendar.holiday Directory Properties: stable/9/usr.bin/calendar/ (props changed) stable/9/usr.bin/calendar/calendars/ (props changed) Modified: stable/9/usr.bin/calendar/calendars/calendar.holiday ============================================================================== --- stable/9/usr.bin/calendar/calendars/calendar.holiday Wed Jul 16 12:37:36 2014 (r268752) +++ stable/9/usr.bin/calendar/calendars/calendar.holiday Wed Jul 16 12:38:46 2014 (r268753) @@ -248,7 +248,7 @@ 06/30 Day of the Army in Guatemala 06/MonFirst Jefferson Davis's Birthday in Alabama & Mississippi (1st Monday) 06/MonFirst Jefferson Davis's Birthday in Florida, Georgia, & S. Carolina -07/01 Dominion Day in Canada +07/01 Canada Day 07/01 Freedom Day in Suriname 07/01 Independence Day in Burundi 07/01 National Day in Rwanda From owner-svn-src-stable@FreeBSD.ORG Wed Jul 16 12:41:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 05ECFE2A; Wed, 16 Jul 2014 12:41:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E66F4238F; Wed, 16 Jul 2014 12:41:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6GCfnuQ064297; Wed, 16 Jul 2014 12:41:49 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6GCfnhD064296; Wed, 16 Jul 2014 12:41:49 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201407161241.s6GCfnhD064296@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 16 Jul 2014 12:41:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268754 - stable/9/games/fortune/datfiles X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 12:41:50 -0000 Author: gavin Date: Wed Jul 16 12:41:49 2014 New Revision: 268754 URL: http://svnweb.freebsd.org/changeset/base/268754 Log: Merge r268295 from head: Fix equation and limerick to be correct. NetBSD fixed this 14 years ago (src/games/fortune/datfiles/fortunes2 1.7). PR: 188714 Submitted by: ksmakoto dd.iij4u.or.jp Modified: stable/9/games/fortune/datfiles/fortunes Directory Properties: stable/9/games/fortune/ (props changed) Modified: stable/9/games/fortune/datfiles/fortunes ============================================================================== --- stable/9/games/fortune/datfiles/fortunes Wed Jul 16 12:38:46 2014 (r268753) +++ stable/9/games/fortune/datfiles/fortunes Wed Jul 16 12:41:49 2014 (r268754) @@ -570,7 +570,7 @@ writing. Always pick on the correct idi the verb. Last but not least, avoid cliches like the plague; seek viable alternatives. % - 1/2 + 1/3 /\(3) | 2 1/3 | z dz cos(3 * PI / 9) = ln (e ) @@ -578,7 +578,7 @@ viable alternatives. \/ 1 The integral of z squared, dz -From 1 to the square root of 3 +From 1 to the cube root of 3 Times the cosine Of 3 PI over nine Is the log of the cube root of e From owner-svn-src-stable@FreeBSD.ORG Wed Jul 16 12:41:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66B3AE2C; Wed, 16 Jul 2014 12:41:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 533E12391; Wed, 16 Jul 2014 12:41:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6GCfpEg064361; Wed, 16 Jul 2014 12:41:51 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6GCfpcI064360; Wed, 16 Jul 2014 12:41:51 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201407161241.s6GCfpcI064360@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 16 Jul 2014 12:41:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268755 - stable/10/games/fortune/datfiles X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 12:41:51 -0000 Author: gavin Date: Wed Jul 16 12:41:50 2014 New Revision: 268755 URL: http://svnweb.freebsd.org/changeset/base/268755 Log: Merge r268295 from head: Fix equation and limerick to be correct. NetBSD fixed this 14 years ago (src/games/fortune/datfiles/fortunes2 1.7). PR: 188714 Submitted by: ksmakoto dd.iij4u.or.jp Modified: stable/10/games/fortune/datfiles/fortunes Directory Properties: stable/10/ (props changed) Modified: stable/10/games/fortune/datfiles/fortunes ============================================================================== --- stable/10/games/fortune/datfiles/fortunes Wed Jul 16 12:41:49 2014 (r268754) +++ stable/10/games/fortune/datfiles/fortunes Wed Jul 16 12:41:50 2014 (r268755) @@ -570,7 +570,7 @@ writing. Always pick on the correct idi the verb. Last but not least, avoid cliches like the plague; seek viable alternatives. % - 1/2 + 1/3 /\(3) | 2 1/3 | z dz cos(3 * PI / 9) = ln (e ) @@ -578,7 +578,7 @@ viable alternatives. \/ 1 The integral of z squared, dz -From 1 to the square root of 3 +From 1 to the cube root of 3 Times the cosine Of 3 PI over nine Is the log of the cube root of e From owner-svn-src-stable@FreeBSD.ORG Wed Jul 16 12:45:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 14D712A2; Wed, 16 Jul 2014 12:45:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0165A23E8; Wed, 16 Jul 2014 12:45:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6GCjDG1065048; Wed, 16 Jul 2014 12:45:13 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6GCjDxO065047; Wed, 16 Jul 2014 12:45:13 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201407161245.s6GCjDxO065047@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 16 Jul 2014 12:45:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268756 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 12:45:14 -0000 Author: gavin Date: Wed Jul 16 12:45:13 2014 New Revision: 268756 URL: http://svnweb.freebsd.org/changeset/base/268756 Log: Merge r268342 from head: Remove /usr/share/doc/psd/28.cvs/paper.ps.gz if it exists, as it is obsolete since r251794. PR: 191003 Submitted by: Vick Khera Modified: stable/10/ObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Wed Jul 16 12:41:50 2014 (r268755) +++ stable/10/ObsoleteFiles.inc Wed Jul 16 12:45:13 2014 (r268756) @@ -442,6 +442,7 @@ OLD_FILES+=usr/share/man/man9/vfs_mount. OLD_FILES+=usr/bin/cvs OLD_FILES+=usr/bin/cvsbug OLD_FILES+=usr/share/doc/psd/28.cvs/paper.ascii.gz +OLD_FILES+=usr/share/doc/psd/28.cvs/paper.ps.gz OLD_DIRS+=usr/share/doc/psd/28.cvs OLD_FILES+=usr/share/examples/cvs/contrib/README OLD_FILES+=usr/share/examples/cvs/contrib/clmerge From owner-svn-src-stable@FreeBSD.ORG Wed Jul 16 12:49:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1AB75867; Wed, 16 Jul 2014 12:49:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 070492474; Wed, 16 Jul 2014 12:49:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6GCngWG065792; Wed, 16 Jul 2014 12:49:42 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6GCngRN065791; Wed, 16 Jul 2014 12:49:42 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201407161249.s6GCngRN065791@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 16 Jul 2014 12:49:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268757 - stable/9/share/examples/etc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 12:49:43 -0000 Author: gavin Date: Wed Jul 16 12:49:42 2014 New Revision: 268757 URL: http://svnweb.freebsd.org/changeset/base/268757 Log: Merge r267865 from head: Drop example variables for updating over csup. These have not functioned since r252305. Modified: stable/9/share/examples/etc/make.conf Directory Properties: stable/9/share/examples/ (props changed) stable/9/share/examples/etc/ (props changed) Modified: stable/9/share/examples/etc/make.conf ============================================================================== --- stable/9/share/examples/etc/make.conf Wed Jul 16 12:45:13 2014 (r268756) +++ stable/9/share/examples/etc/make.conf Wed Jul 16 12:49:42 2014 (r268757) @@ -172,18 +172,6 @@ #ENABLE_SUID_K5SU= # # -# CVSup update flags. Edit SUPFILE settings to reflect whichever distribution -# file(s) you use on your site (see /usr/share/examples/cvsup/README for more -# information on CVSup and these files). To use, do "make update" in /usr/src. -# -#SUP_UPDATE= -# -#SUP= /usr/bin/csup -#SUPFLAGS= -L 2 -#SUPHOST= cvsup.uk.FreeBSD.org -#SUPFILE= /usr/share/examples/cvsup/standard-supfile -#PORTSSUPFILE= /usr/share/examples/cvsup/ports-supfile -# # top(1) uses a hash table for the user names. The size of this hash # can be tuned to match the number of local users. The table size should # be a prime number approximately twice as large as the number of lines in From owner-svn-src-stable@FreeBSD.ORG Wed Jul 16 12:49:57 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60E619AA; Wed, 16 Jul 2014 12:49:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CF90247B; Wed, 16 Jul 2014 12:49:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6GCnvrP065873; Wed, 16 Jul 2014 12:49:57 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6GCnvSd065872; Wed, 16 Jul 2014 12:49:57 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201407161249.s6GCnvSd065872@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 16 Jul 2014 12:49:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268758 - stable/10/share/examples/etc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 12:49:57 -0000 Author: gavin Date: Wed Jul 16 12:49:56 2014 New Revision: 268758 URL: http://svnweb.freebsd.org/changeset/base/268758 Log: Merge r267865 from head: Drop example variables for updating over csup. These have not functioned since r251084 Modified: stable/10/share/examples/etc/make.conf Directory Properties: stable/10/ (props changed) Modified: stable/10/share/examples/etc/make.conf ============================================================================== --- stable/10/share/examples/etc/make.conf Wed Jul 16 12:49:42 2014 (r268757) +++ stable/10/share/examples/etc/make.conf Wed Jul 16 12:49:56 2014 (r268758) @@ -178,18 +178,6 @@ #ENABLE_SUID_K5SU= # # -# CVSup update flags. Edit SUPFILE settings to reflect whichever distribution -# file(s) you use on your site (see /usr/share/examples/cvsup/README for more -# information on CVSup and these files). To use, do "make update" in /usr/src. -# -#SUP_UPDATE= -# -#SUP= /usr/bin/csup -#SUPFLAGS= -L 2 -#SUPHOST= cvsup.uk.FreeBSD.org -#SUPFILE= /usr/share/examples/cvsup/standard-supfile -#PORTSSUPFILE= /usr/share/examples/cvsup/ports-supfile -# # top(1) uses a hash table for the user names. The size of this hash # can be tuned to match the number of local users. The table size should # be a prime number approximately twice as large as the number of lines in From owner-svn-src-stable@FreeBSD.ORG Wed Jul 16 12:51:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 32D9BBD1; Wed, 16 Jul 2014 12:51:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1EE8C24B3; Wed, 16 Jul 2014 12:51:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6GCpTDS069278; Wed, 16 Jul 2014 12:51:29 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6GCpT7u069277; Wed, 16 Jul 2014 12:51:29 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201407161251.s6GCpT7u069277@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 16 Jul 2014 12:51:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268759 - stable/10/share/man/man7 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 12:51:30 -0000 Author: gavin Date: Wed Jul 16 12:51:29 2014 New Revision: 268759 URL: http://svnweb.freebsd.org/changeset/base/268759 Log: Merge r267866 from head: Drop references to updating over csup from build(7). Modified: stable/10/share/man/man7/build.7 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man7/build.7 ============================================================================== --- stable/10/share/man/man7/build.7 Wed Jul 16 12:49:56 2014 (r268758) +++ stable/10/share/man/man7/build.7 Wed Jul 16 12:51:29 2014 (r268759) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 17, 2014 +.Dd June 25, 2014 .Dt BUILD 7 .Os .Sh NAME @@ -40,8 +40,7 @@ normally and .Pa /usr/ports . These directories may be initially empty or non-existent until updated with -.Xr csup 1 , -.Xr svn 1 , +.Xr svn 1 or .Xr portsnap 8 . Directory @@ -616,7 +615,6 @@ make TARGET=sparc64 DESTDIR=/clients/spa .Ed .Sh SEE ALSO .Xr cc 1 , -.Xr csup 1 , .Xr install 1 , .Xr make 1 , .Xr svn 1 , From owner-svn-src-stable@FreeBSD.ORG Wed Jul 16 12:52:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 57C19D9F; Wed, 16 Jul 2014 12:52:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44029253C; Wed, 16 Jul 2014 12:52:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6GCq63p069466; Wed, 16 Jul 2014 12:52:06 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6GCq6Tg069465; Wed, 16 Jul 2014 12:52:06 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201407161252.s6GCq6Tg069465@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 16 Jul 2014 12:52:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268760 - stable/9/share/man/man7 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 12:52:06 -0000 Author: gavin Date: Wed Jul 16 12:52:05 2014 New Revision: 268760 URL: http://svnweb.freebsd.org/changeset/base/268760 Log: Merge r267866 from head: Drop references to updating over csup from build(7). Modified: stable/9/share/man/man7/build.7 Directory Properties: stable/9/share/man/man7/ (props changed) Modified: stable/9/share/man/man7/build.7 ============================================================================== --- stable/9/share/man/man7/build.7 Wed Jul 16 12:51:29 2014 (r268759) +++ stable/9/share/man/man7/build.7 Wed Jul 16 12:52:05 2014 (r268760) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 10, 2012 +.Dd June 25, 2014 .Dt BUILD 7 .Os .Sh NAME @@ -40,8 +40,7 @@ normally and .Pa /usr/ports . These directories may be initially empty or non-existent until updated with -.Xr csup 1 , -.Xr svn 1 , +.Xr svn 1 or .Xr portsnap 8 . Directory @@ -593,7 +592,6 @@ make TARGET=sparc64 DESTDIR=/clients/spa .Ed .Sh SEE ALSO .Xr cc 1 , -.Xr csup 1 , .Xr install 1 , .Xr make 1 , .Xr svn 1 , From owner-svn-src-stable@FreeBSD.ORG Wed Jul 16 12:57:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E4740FBD; Wed, 16 Jul 2014 12:57:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0B242596; Wed, 16 Jul 2014 12:57:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6GCvoGA070491; Wed, 16 Jul 2014 12:57:50 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6GCvohl070490; Wed, 16 Jul 2014 12:57:50 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201407161257.s6GCvohl070490@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 16 Jul 2014 12:57:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268761 - stable/9/usr.sbin/uhsoctl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 12:57:51 -0000 Author: gavin Date: Wed Jul 16 12:57:50 2014 New Revision: 268761 URL: http://svnweb.freebsd.org/changeset/base/268761 Log: Merge r268298,r268299 from head: Correct format string to fix build of uhsoctl when DEBUG is defined PR: 185007 Submitted by: saper saper.info Modified: stable/9/usr.sbin/uhsoctl/uhsoctl.c Directory Properties: stable/9/usr.sbin/uhsoctl/ (props changed) Modified: stable/9/usr.sbin/uhsoctl/uhsoctl.c ============================================================================== --- stable/9/usr.sbin/uhsoctl/uhsoctl.c Wed Jul 16 12:52:05 2014 (r268760) +++ stable/9/usr.sbin/uhsoctl/uhsoctl.c Wed Jul 16 12:57:50 2014 (r268761) @@ -601,7 +601,7 @@ at_cmd(struct ctx *ctx, const char *resp if (resp != NULL) { l = strlen(resp); #ifdef DEBUG - fprintf(stderr, "SYNC_EXP: %s (%d)\n", resp, l); + fprintf(stderr, "SYNC_EXP: %s (%zu)\n", resp, l); #endif } From owner-svn-src-stable@FreeBSD.ORG Wed Jul 16 12:57:53 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0C5612D; Wed, 16 Jul 2014 12:57:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D8ED2598; Wed, 16 Jul 2014 12:57:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6GCvrOw070551; Wed, 16 Jul 2014 12:57:53 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6GCvr59070550; Wed, 16 Jul 2014 12:57:53 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201407161257.s6GCvr59070550@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 16 Jul 2014 12:57:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268762 - stable/10/usr.sbin/uhsoctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 12:57:53 -0000 Author: gavin Date: Wed Jul 16 12:57:53 2014 New Revision: 268762 URL: http://svnweb.freebsd.org/changeset/base/268762 Log: Merge r268298,r268299 from head: Correct format string to fix build of uhsoctl when DEBUG is defined PR: 185007 Submitted by: saper saper.info Modified: stable/10/usr.sbin/uhsoctl/uhsoctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/uhsoctl/uhsoctl.c ============================================================================== --- stable/10/usr.sbin/uhsoctl/uhsoctl.c Wed Jul 16 12:57:50 2014 (r268761) +++ stable/10/usr.sbin/uhsoctl/uhsoctl.c Wed Jul 16 12:57:53 2014 (r268762) @@ -601,7 +601,7 @@ at_cmd(struct ctx *ctx, const char *resp if (resp != NULL) { l = strlen(resp); #ifdef DEBUG - fprintf(stderr, "SYNC_EXP: %s (%d)\n", resp, l); + fprintf(stderr, "SYNC_EXP: %s (%zu)\n", resp, l); #endif } From owner-svn-src-stable@FreeBSD.ORG Wed Jul 16 21:04:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D342DA3; Wed, 16 Jul 2014 21:04:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E264F2362; Wed, 16 Jul 2014 21:04:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6GL4V1U008653; Wed, 16 Jul 2014 21:04:31 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6GL4VXo008650; Wed, 16 Jul 2014 21:04:31 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201407162104.s6GL4VXo008650@svn.freebsd.org> From: Dimitry Andric Date: Wed, 16 Jul 2014 21:04:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268775 - stable/10/lib/libproc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 21:04:32 -0000 Author: dim Date: Wed Jul 16 21:04:31 2014 New Revision: 268775 URL: http://svnweb.freebsd.org/changeset/base/268775 Log: MFC r268463: In libproc, avoid calling __cxa_demangle(), and thus depending on either libcxxrt or libsupc++, if WITHOUT_CXX is defined. [1] Noticed by: sbruno [1] However, on stable/10 this is more accurately described by WITHOUT_GNUCXX, so I've changed the test to that instead. Modified: stable/10/lib/libproc/Makefile stable/10/lib/libproc/proc_sym.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libproc/Makefile ============================================================================== --- stable/10/lib/libproc/Makefile Wed Jul 16 20:37:03 2014 (r268774) +++ stable/10/lib/libproc/Makefile Wed Jul 16 21:04:31 2014 (r268775) @@ -18,9 +18,11 @@ CFLAGS+= -I${.CURDIR} .if ${MK_LIBCPLUSPLUS} != "no" LDADD+= -lcxxrt DPADD+= ${LIBCXXRT} -.else +.elif ${MK_GNUCXX} != "no" LDADD+= -lsupc++ DPADD+= ${LIBSTDCPLUSPLUS} +.else +CFLAGS+= -DNO_CXA_DEMANGLE .endif SHLIB_MAJOR= 2 Modified: stable/10/lib/libproc/proc_sym.c ============================================================================== --- stable/10/lib/libproc/proc_sym.c Wed Jul 16 20:37:03 2014 (r268774) +++ stable/10/lib/libproc/proc_sym.c Wed Jul 16 21:04:31 2014 (r268775) @@ -46,27 +46,34 @@ #include "_libproc.h" +#ifndef NO_CXA_DEMANGLE extern char *__cxa_demangle(const char *, char *, size_t *, int *); +#endif /* NO_CXA_DEMANGLE */ static void proc_rdl2prmap(rd_loadobj_t *, prmap_t *); static void demangle(const char *symbol, char *buf, size_t len) { +#ifndef NO_CXA_DEMANGLE char *dembuf; - size_t demlen = len; + size_t demlen; - dembuf = malloc(len); - if (!dembuf) - goto fail; - dembuf = __cxa_demangle(symbol, dembuf, &demlen, NULL); - if (!dembuf) - goto fail; - strlcpy(buf, dembuf, len); - free(dembuf); + if (symbol[0] == '_' && symbol[1] == 'Z' && symbol[2]) { + dembuf = malloc(len); + if (!dembuf) + goto fail; + demlen = len; + dembuf = __cxa_demangle(symbol, dembuf, &demlen, NULL); + if (!dembuf) + goto fail; + strlcpy(buf, dembuf, len); + free(dembuf); + } return; fail: +#endif /* NO_CXA_DEMANGLE */ strlcpy(buf, symbol, len); } @@ -291,10 +298,7 @@ proc_addr2sym(struct proc_handle *p, uin if (addr >= rsym && addr < rsym + sym.st_size) { s = elf_strptr(e, dynsymstridx, sym.st_name); if (s) { - if (s[0] == '_' && s[1] == 'Z' && s[2]) - demangle(s, name, namesz); - else - strlcpy(name, s, namesz); + demangle(s, name, namesz); memcpy(symcopy, &sym, sizeof(sym)); /* * DTrace expects the st_value to contain @@ -329,10 +333,7 @@ symtab: if (addr >= rsym && addr < rsym + sym.st_size) { s = elf_strptr(e, symtabstridx, sym.st_name); if (s) { - if (s[0] == '_' && s[1] == 'Z' && s[2]) - demangle(s, name, namesz); - else - strlcpy(name, s, namesz); + demangle(s, name, namesz); memcpy(symcopy, &sym, sizeof(sym)); /* * DTrace expects the st_value to contain